diff --git a/src/internal/connector/graph/betasdk/models/aad_user_conversation_member.go b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member.go new file mode 100644 index 000000000..fbe65d98d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AadUserConversationMember +type AadUserConversationMember struct { + ConversationMember + // The email address of the user. + email *string + // TenantId which the Azure AD user belongs to. + tenantId *string + // The user property + user Userable + // The GUID of the user. + userId *string +} +// NewAadUserConversationMember instantiates a new AadUserConversationMember and sets the default values. +func NewAadUserConversationMember()(*AadUserConversationMember) { + m := &AadUserConversationMember{ + ConversationMember: *NewConversationMember(), + } + odataTypeValue := "#microsoft.graph.aadUserConversationMember"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAadUserConversationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAadUserConversationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAadUserConversationMember(), nil +} +// GetEmail gets the email property value. The email address of the user. +func (m *AadUserConversationMember) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AadUserConversationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConversationMember.GetFieldDeserializers() + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(Userable)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. TenantId which the Azure AD user belongs to. +func (m *AadUserConversationMember) GetTenantId()(*string) { + return m.tenantId +} +// GetUser gets the user property value. The user property +func (m *AadUserConversationMember) GetUser()(Userable) { + return m.user +} +// GetUserId gets the userId property value. The GUID of the user. +func (m *AadUserConversationMember) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *AadUserConversationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConversationMember.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. The email address of the user. +func (m *AadUserConversationMember) SetEmail(value *string)() { + m.email = value +} +// SetTenantId sets the tenantId property value. TenantId which the Azure AD user belongs to. +func (m *AadUserConversationMember) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUser sets the user property value. The user property +func (m *AadUserConversationMember) SetUser(value Userable)() { + m.user = value +} +// SetUserId sets the userId property value. The GUID of the user. +func (m *AadUserConversationMember) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_response.go b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_response.go new file mode 100644 index 000000000..111651c42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AadUserConversationMemberCollectionResponse +type AadUserConversationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AadUserConversationMemberable +} +// NewAadUserConversationMemberCollectionResponse instantiates a new AadUserConversationMemberCollectionResponse and sets the default values. +func NewAadUserConversationMemberCollectionResponse()(*AadUserConversationMemberCollectionResponse) { + m := &AadUserConversationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAadUserConversationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAadUserConversationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAadUserConversationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AadUserConversationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAadUserConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AadUserConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(AadUserConversationMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AadUserConversationMemberCollectionResponse) GetValue()([]AadUserConversationMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *AadUserConversationMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AadUserConversationMemberCollectionResponse) SetValue(value []AadUserConversationMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_responseable.go new file mode 100644 index 000000000..ee54d6619 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aad_user_conversation_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AadUserConversationMemberCollectionResponseable +type AadUserConversationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AadUserConversationMemberable) + SetValue(value []AadUserConversationMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aad_user_conversation_memberable.go b/src/internal/connector/graph/betasdk/models/aad_user_conversation_memberable.go new file mode 100644 index 000000000..37e1d0334 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aad_user_conversation_memberable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AadUserConversationMemberable +type AadUserConversationMemberable interface { + ConversationMemberable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetTenantId()(*string) + GetUser()(Userable) + GetUserId()(*string) + SetEmail(value *string)() + SetTenantId(value *string)() + SetUser(value Userable)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_action.go b/src/internal/connector/graph/betasdk/models/access_action.go new file mode 100644 index 000000000..a41859c81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_action.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessAction +type AccessAction 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 OdataType property + odataType *string +} +// NewAccessAction instantiates a new accessAction and sets the default values. +func NewAccessAction()(*AccessAction) { + m := &AccessAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessAction(), 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 *AccessAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_actionable.go b/src/internal/connector/graph/betasdk/models/access_actionable.go new file mode 100644 index 000000000..18edf03da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessActionable +type AccessActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package.go b/src/internal/connector/graph/betasdk/models/access_package.go new file mode 100644 index 000000000..0b39a9d6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package.go @@ -0,0 +1,465 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackage +type AccessPackage struct { + Entity + // Read-only. Nullable. Supports $expand. + accessPackageAssignmentPolicies []AccessPackageAssignmentPolicyable + // The accessPackageCatalog property + accessPackageCatalog AccessPackageCatalogable + // The accessPackageResourceRoleScopes property + accessPackageResourceRoleScopes []AccessPackageResourceRoleScopeable + // The access packages that are incompatible with this package. Read-only. + accessPackagesIncompatibleWith []AccessPackageable + // Identifier of the access package catalog referencing this access package. Read-only. + catalogId *string + // The userPrincipalName of the user or identity of the subject who created this resource. Read-only. + createdBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of the access package. + description *string + // The display name of the access package. Supports $filter (eq, contains). + displayName *string + // The access packages whose assigned users are ineligible to be assigned this access package. + incompatibleAccessPackages []AccessPackageable + // The groups whose members are ineligible to be assigned this access package. + incompatibleGroups []Groupable + // Whether the access package is hidden from the requestor. + isHidden *bool + // Indicates whether role scopes are visible. + isRoleScopesVisible *bool + // The userPrincipalName of the user who last modified this resource. Read-only. + modifiedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAccessPackage instantiates a new accessPackage and sets the default values. +func NewAccessPackage()(*AccessPackage) { + m := &AccessPackage{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackage(), nil +} +// GetAccessPackageAssignmentPolicies gets the accessPackageAssignmentPolicies property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackage) GetAccessPackageAssignmentPolicies()([]AccessPackageAssignmentPolicyable) { + return m.accessPackageAssignmentPolicies +} +// GetAccessPackageCatalog gets the accessPackageCatalog property value. The accessPackageCatalog property +func (m *AccessPackage) GetAccessPackageCatalog()(AccessPackageCatalogable) { + return m.accessPackageCatalog +} +// GetAccessPackageResourceRoleScopes gets the accessPackageResourceRoleScopes property value. The accessPackageResourceRoleScopes property +func (m *AccessPackage) GetAccessPackageResourceRoleScopes()([]AccessPackageResourceRoleScopeable) { + return m.accessPackageResourceRoleScopes +} +// GetAccessPackagesIncompatibleWith gets the accessPackagesIncompatibleWith property value. The access packages that are incompatible with this package. Read-only. +func (m *AccessPackage) GetAccessPackagesIncompatibleWith()([]AccessPackageable) { + return m.accessPackagesIncompatibleWith +} +// GetCatalogId gets the catalogId property value. Identifier of the access package catalog referencing this access package. Read-only. +func (m *AccessPackage) GetCatalogId()(*string) { + return m.catalogId +} +// GetCreatedBy gets the createdBy property value. The userPrincipalName of the user or identity of the subject who created this resource. Read-only. +func (m *AccessPackage) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackage) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of the access package. +func (m *AccessPackage) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the access package. Supports $filter (eq, contains). +func (m *AccessPackage) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageAssignmentPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentPolicyable) + } + m.SetAccessPackageAssignmentPolicies(res) + } + return nil + } + res["accessPackageCatalog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageCatalogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageCatalog(val.(AccessPackageCatalogable)) + } + return nil + } + res["accessPackageResourceRoleScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleScopeable) + } + m.SetAccessPackageResourceRoleScopes(res) + } + return nil + } + res["accessPackagesIncompatibleWith"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageable) + } + m.SetAccessPackagesIncompatibleWith(res) + } + return nil + } + res["catalogId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCatalogId(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["incompatibleAccessPackages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageable) + } + m.SetIncompatibleAccessPackages(res) + } + return nil + } + res["incompatibleGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Groupable, len(val)) + for i, v := range val { + res[i] = v.(Groupable) + } + m.SetIncompatibleGroups(res) + } + return nil + } + res["isHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHidden(val) + } + return nil + } + res["isRoleScopesVisible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRoleScopesVisible(val) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + return res +} +// GetIncompatibleAccessPackages gets the incompatibleAccessPackages property value. The access packages whose assigned users are ineligible to be assigned this access package. +func (m *AccessPackage) GetIncompatibleAccessPackages()([]AccessPackageable) { + return m.incompatibleAccessPackages +} +// GetIncompatibleGroups gets the incompatibleGroups property value. The groups whose members are ineligible to be assigned this access package. +func (m *AccessPackage) GetIncompatibleGroups()([]Groupable) { + return m.incompatibleGroups +} +// GetIsHidden gets the isHidden property value. Whether the access package is hidden from the requestor. +func (m *AccessPackage) GetIsHidden()(*bool) { + return m.isHidden +} +// GetIsRoleScopesVisible gets the isRoleScopesVisible property value. Indicates whether role scopes are visible. +func (m *AccessPackage) GetIsRoleScopesVisible()(*bool) { + return m.isRoleScopesVisible +} +// GetModifiedBy gets the modifiedBy property value. The userPrincipalName of the user who last modified this resource. Read-only. +func (m *AccessPackage) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackage) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// Serialize serializes information the current object +func (m *AccessPackage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessPackageAssignmentPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentPolicies())) + for i, v := range m.GetAccessPackageAssignmentPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageCatalog", m.GetAccessPackageCatalog()) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceRoleScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceRoleScopes())) + for i, v := range m.GetAccessPackageResourceRoleScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceRoleScopes", cast) + if err != nil { + return err + } + } + if m.GetAccessPackagesIncompatibleWith() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackagesIncompatibleWith())) + for i, v := range m.GetAccessPackagesIncompatibleWith() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackagesIncompatibleWith", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("catalogId", m.GetCatalogId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIncompatibleAccessPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncompatibleAccessPackages())) + for i, v := range m.GetIncompatibleAccessPackages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("incompatibleAccessPackages", cast) + if err != nil { + return err + } + } + if m.GetIncompatibleGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncompatibleGroups())) + for i, v := range m.GetIncompatibleGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("incompatibleGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isHidden", m.GetIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRoleScopesVisible", m.GetIsRoleScopesVisible()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageAssignmentPolicies sets the accessPackageAssignmentPolicies property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackage) SetAccessPackageAssignmentPolicies(value []AccessPackageAssignmentPolicyable)() { + m.accessPackageAssignmentPolicies = value +} +// SetAccessPackageCatalog sets the accessPackageCatalog property value. The accessPackageCatalog property +func (m *AccessPackage) SetAccessPackageCatalog(value AccessPackageCatalogable)() { + m.accessPackageCatalog = value +} +// SetAccessPackageResourceRoleScopes sets the accessPackageResourceRoleScopes property value. The accessPackageResourceRoleScopes property +func (m *AccessPackage) SetAccessPackageResourceRoleScopes(value []AccessPackageResourceRoleScopeable)() { + m.accessPackageResourceRoleScopes = value +} +// SetAccessPackagesIncompatibleWith sets the accessPackagesIncompatibleWith property value. The access packages that are incompatible with this package. Read-only. +func (m *AccessPackage) SetAccessPackagesIncompatibleWith(value []AccessPackageable)() { + m.accessPackagesIncompatibleWith = value +} +// SetCatalogId sets the catalogId property value. Identifier of the access package catalog referencing this access package. Read-only. +func (m *AccessPackage) SetCatalogId(value *string)() { + m.catalogId = value +} +// SetCreatedBy sets the createdBy property value. The userPrincipalName of the user or identity of the subject who created this resource. Read-only. +func (m *AccessPackage) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackage) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of the access package. +func (m *AccessPackage) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the access package. Supports $filter (eq, contains). +func (m *AccessPackage) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIncompatibleAccessPackages sets the incompatibleAccessPackages property value. The access packages whose assigned users are ineligible to be assigned this access package. +func (m *AccessPackage) SetIncompatibleAccessPackages(value []AccessPackageable)() { + m.incompatibleAccessPackages = value +} +// SetIncompatibleGroups sets the incompatibleGroups property value. The groups whose members are ineligible to be assigned this access package. +func (m *AccessPackage) SetIncompatibleGroups(value []Groupable)() { + m.incompatibleGroups = value +} +// SetIsHidden sets the isHidden property value. Whether the access package is hidden from the requestor. +func (m *AccessPackage) SetIsHidden(value *bool)() { + m.isHidden = value +} +// SetIsRoleScopesVisible sets the isRoleScopesVisible property value. Indicates whether role scopes are visible. +func (m *AccessPackage) SetIsRoleScopesVisible(value *bool)() { + m.isRoleScopesVisible = value +} +// SetModifiedBy sets the modifiedBy property value. The userPrincipalName of the user who last modified this resource. Read-only. +func (m *AccessPackage) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackage) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer.go b/src/internal/connector/graph/betasdk/models/access_package_answer.go new file mode 100644 index 000000000..ba482a1ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswer +type AccessPackageAnswer 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 question the answer is for. Required and Read-only. + answeredQuestion AccessPackageQuestionable + // The display value of the answer. Required. + displayValue *string + // The OdataType property + odataType *string +} +// NewAccessPackageAnswer instantiates a new accessPackageAnswer and sets the default values. +func NewAccessPackageAnswer()(*AccessPackageAnswer) { + m := &AccessPackageAnswer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageAnswerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAnswerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessPackageAnswerString": + return NewAccessPackageAnswerString(), nil + } + } + } + } + return NewAccessPackageAnswer(), 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 *AccessPackageAnswer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAnsweredQuestion gets the answeredQuestion property value. The question the answer is for. Required and Read-only. +func (m *AccessPackageAnswer) GetAnsweredQuestion()(AccessPackageQuestionable) { + return m.answeredQuestion +} +// GetDisplayValue gets the displayValue property value. The display value of the answer. Required. +func (m *AccessPackageAnswer) GetDisplayValue()(*string) { + return m.displayValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAnswer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["answeredQuestion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAnsweredQuestion(val.(AccessPackageQuestionable)) + } + return nil + } + res["displayValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayValue(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageAnswer) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageAnswer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("answeredQuestion", m.GetAnsweredQuestion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayValue", m.GetDisplayValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessPackageAnswer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAnsweredQuestion sets the answeredQuestion property value. The question the answer is for. Required and Read-only. +func (m *AccessPackageAnswer) SetAnsweredQuestion(value AccessPackageQuestionable)() { + m.answeredQuestion = value +} +// SetDisplayValue sets the displayValue property value. The display value of the answer. Required. +func (m *AccessPackageAnswer) SetDisplayValue(value *string)() { + m.displayValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageAnswer) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_choice.go b/src/internal/connector/graph/betasdk/models/access_package_answer_choice.go new file mode 100644 index 000000000..da9b5ca14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_choice.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerChoice +type AccessPackageAnswerChoice struct { + // The actual value of the selected choice. This is typically a string value which is understandable by applications. Required. + actualValue *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 localized display values shown to the requestor and approvers. Required. + displayValue AccessPackageLocalizedContentable + // The OdataType property + odataType *string +} +// NewAccessPackageAnswerChoice instantiates a new accessPackageAnswerChoice and sets the default values. +func NewAccessPackageAnswerChoice()(*AccessPackageAnswerChoice) { + m := &AccessPackageAnswerChoice{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageAnswerChoiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAnswerChoiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAnswerChoice(), nil +} +// GetActualValue gets the actualValue property value. The actual value of the selected choice. This is typically a string value which is understandable by applications. Required. +func (m *AccessPackageAnswerChoice) GetActualValue()(*string) { + return m.actualValue +} +// 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 *AccessPackageAnswerChoice) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayValue gets the displayValue property value. The localized display values shown to the requestor and approvers. Required. +func (m *AccessPackageAnswerChoice) GetDisplayValue()(AccessPackageLocalizedContentable) { + return m.displayValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAnswerChoice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actualValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActualValue(val) + } + return nil + } + res["displayValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageLocalizedContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDisplayValue(val.(AccessPackageLocalizedContentable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageAnswerChoice) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageAnswerChoice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actualValue", m.GetActualValue()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("displayValue", m.GetDisplayValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActualValue sets the actualValue property value. The actual value of the selected choice. This is typically a string value which is understandable by applications. Required. +func (m *AccessPackageAnswerChoice) SetActualValue(value *string)() { + m.actualValue = value +} +// 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 *AccessPackageAnswerChoice) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayValue sets the displayValue property value. The localized display values shown to the requestor and approvers. Required. +func (m *AccessPackageAnswerChoice) SetDisplayValue(value AccessPackageLocalizedContentable)() { + m.displayValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageAnswerChoice) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_response.go new file mode 100644 index 000000000..7d35221b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerChoiceCollectionResponse +type AccessPackageAnswerChoiceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAnswerChoiceable +} +// NewAccessPackageAnswerChoiceCollectionResponse instantiates a new AccessPackageAnswerChoiceCollectionResponse and sets the default values. +func NewAccessPackageAnswerChoiceCollectionResponse()(*AccessPackageAnswerChoiceCollectionResponse) { + m := &AccessPackageAnswerChoiceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAnswerChoiceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAnswerChoiceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAnswerChoiceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAnswerChoiceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAnswerChoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAnswerChoiceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAnswerChoiceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAnswerChoiceCollectionResponse) GetValue()([]AccessPackageAnswerChoiceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAnswerChoiceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAnswerChoiceCollectionResponse) SetValue(value []AccessPackageAnswerChoiceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_responseable.go new file mode 100644 index 000000000..922e12e04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_choice_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerChoiceCollectionResponseable +type AccessPackageAnswerChoiceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAnswerChoiceable) + SetValue(value []AccessPackageAnswerChoiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_choiceable.go b/src/internal/connector/graph/betasdk/models/access_package_answer_choiceable.go new file mode 100644 index 000000000..d81f56863 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_choiceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerChoiceable +type AccessPackageAnswerChoiceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActualValue()(*string) + GetDisplayValue()(AccessPackageLocalizedContentable) + GetOdataType()(*string) + SetActualValue(value *string)() + SetDisplayValue(value AccessPackageLocalizedContentable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_answer_collection_response.go new file mode 100644 index 000000000..66d1573ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerCollectionResponse +type AccessPackageAnswerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAnswerable +} +// NewAccessPackageAnswerCollectionResponse instantiates a new AccessPackageAnswerCollectionResponse and sets the default values. +func NewAccessPackageAnswerCollectionResponse()(*AccessPackageAnswerCollectionResponse) { + m := &AccessPackageAnswerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAnswerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAnswerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAnswerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAnswerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAnswerable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAnswerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAnswerCollectionResponse) GetValue()([]AccessPackageAnswerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAnswerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAnswerCollectionResponse) SetValue(value []AccessPackageAnswerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_answer_collection_responseable.go new file mode 100644 index 000000000..345e8e8c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerCollectionResponseable +type AccessPackageAnswerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAnswerable) + SetValue(value []AccessPackageAnswerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_string.go b/src/internal/connector/graph/betasdk/models/access_package_answer_string.go new file mode 100644 index 000000000..7c10ca69f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_string.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerString +type AccessPackageAnswerString struct { + AccessPackageAnswer + // The value stored on the requestor's user profile, if this answer is configured to be stored as a specific attribute. + value *string +} +// NewAccessPackageAnswerString instantiates a new AccessPackageAnswerString and sets the default values. +func NewAccessPackageAnswerString()(*AccessPackageAnswerString) { + m := &AccessPackageAnswerString{ + AccessPackageAnswer: *NewAccessPackageAnswer(), + } + odataTypeValue := "#microsoft.graph.accessPackageAnswerString"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessPackageAnswerStringFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAnswerStringFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAnswerString(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAnswerString) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessPackageAnswer.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. The value stored on the requestor's user profile, if this answer is configured to be stored as a specific attribute. +func (m *AccessPackageAnswerString) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAnswerString) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessPackageAnswer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value stored on the requestor's user profile, if this answer is configured to be stored as a specific attribute. +func (m *AccessPackageAnswerString) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answer_stringable.go b/src/internal/connector/graph/betasdk/models/access_package_answer_stringable.go new file mode 100644 index 000000000..61e808456 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answer_stringable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerStringable +type AccessPackageAnswerStringable interface { + AccessPackageAnswerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_answerable.go b/src/internal/connector/graph/betasdk/models/access_package_answerable.go new file mode 100644 index 000000000..c01cad7bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_answerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAnswerable +type AccessPackageAnswerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnsweredQuestion()(AccessPackageQuestionable) + GetDisplayValue()(*string) + GetOdataType()(*string) + SetAnsweredQuestion(value AccessPackageQuestionable)() + SetDisplayValue(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment.go b/src/internal/connector/graph/betasdk/models/access_package_assignment.go new file mode 100644 index 000000000..b0f69880b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment.go @@ -0,0 +1,415 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignment +type AccessPackageAssignment struct { + Entity + // Read-only. Nullable. Supports $filter (eq) on the id property and $expand query parameters. + accessPackage AccessPackageable + // Read-only. Nullable. Supports $filter (eq) on the id property + accessPackageAssignmentPolicy AccessPackageAssignmentPolicyable + // The accessPackageAssignmentRequests property + accessPackageAssignmentRequests []AccessPackageAssignmentRequestable + // The resource roles delivered to the target user for this assignment. Read-only. Nullable. + accessPackageAssignmentResourceRoles []AccessPackageAssignmentResourceRoleable + // The identifier of the access package. Read-only. + accessPackageId *string + // The identifier of the access package assignment policy. Read-only. + assignmentPolicyId *string + // The state of the access package assignment. Possible values are Delivering, Delivered, or Expired. Read-only. Supports $filter (eq). + assignmentState *string + // More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only. + assignmentStatus *string + // The identifier of the catalog containing the access package. Read-only. + catalogId *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + expiredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates whether the access package assignment is extended. Read-only. + isExtended *bool + // When the access assignment is to be in place. Read-only. + schedule RequestScheduleable + // The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId. + target AccessPackageSubjectable + // The ID of the subject with the assignment. Read-only. + targetId *string +} +// NewAccessPackageAssignment instantiates a new accessPackageAssignment and sets the default values. +func NewAccessPackageAssignment()(*AccessPackageAssignment) { + m := &AccessPackageAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignment(), nil +} +// GetAccessPackage gets the accessPackage property value. Read-only. Nullable. Supports $filter (eq) on the id property and $expand query parameters. +func (m *AccessPackageAssignment) GetAccessPackage()(AccessPackageable) { + return m.accessPackage +} +// GetAccessPackageAssignmentPolicy gets the accessPackageAssignmentPolicy property value. Read-only. Nullable. Supports $filter (eq) on the id property +func (m *AccessPackageAssignment) GetAccessPackageAssignmentPolicy()(AccessPackageAssignmentPolicyable) { + return m.accessPackageAssignmentPolicy +} +// GetAccessPackageAssignmentRequests gets the accessPackageAssignmentRequests property value. The accessPackageAssignmentRequests property +func (m *AccessPackageAssignment) GetAccessPackageAssignmentRequests()([]AccessPackageAssignmentRequestable) { + return m.accessPackageAssignmentRequests +} +// GetAccessPackageAssignmentResourceRoles gets the accessPackageAssignmentResourceRoles property value. The resource roles delivered to the target user for this assignment. Read-only. Nullable. +func (m *AccessPackageAssignment) GetAccessPackageAssignmentResourceRoles()([]AccessPackageAssignmentResourceRoleable) { + return m.accessPackageAssignmentResourceRoles +} +// GetAccessPackageId gets the accessPackageId property value. The identifier of the access package. Read-only. +func (m *AccessPackageAssignment) GetAccessPackageId()(*string) { + return m.accessPackageId +} +// GetAssignmentPolicyId gets the assignmentPolicyId property value. The identifier of the access package assignment policy. Read-only. +func (m *AccessPackageAssignment) GetAssignmentPolicyId()(*string) { + return m.assignmentPolicyId +} +// GetAssignmentState gets the assignmentState property value. The state of the access package assignment. Possible values are Delivering, Delivered, or Expired. Read-only. Supports $filter (eq). +func (m *AccessPackageAssignment) GetAssignmentState()(*string) { + return m.assignmentState +} +// GetAssignmentStatus gets the assignmentStatus property value. More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only. +func (m *AccessPackageAssignment) GetAssignmentStatus()(*string) { + return m.assignmentStatus +} +// GetCatalogId gets the catalogId property value. The identifier of the catalog containing the access package. Read-only. +func (m *AccessPackageAssignment) GetCatalogId()(*string) { + return m.catalogId +} +// GetExpiredDateTime gets the expiredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignment) GetExpiredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expiredDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackage(val.(AccessPackageable)) + } + return nil + } + res["accessPackageAssignmentPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageAssignmentPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageAssignmentPolicy(val.(AccessPackageAssignmentPolicyable)) + } + return nil + } + res["accessPackageAssignmentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentRequestable) + } + m.SetAccessPackageAssignmentRequests(res) + } + return nil + } + res["accessPackageAssignmentResourceRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentResourceRoleable) + } + m.SetAccessPackageAssignmentResourceRoles(res) + } + return nil + } + res["accessPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageId(val) + } + return nil + } + res["assignmentPolicyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentPolicyId(val) + } + return nil + } + res["assignmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentState(val) + } + return nil + } + res["assignmentStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentStatus(val) + } + return nil + } + res["catalogId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCatalogId(val) + } + return nil + } + res["expiredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiredDateTime(val) + } + return nil + } + res["isExtended"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsExtended(val) + } + return nil + } + res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedule(val.(RequestScheduleable)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(AccessPackageSubjectable)) + } + return nil + } + res["targetId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetId(val) + } + return nil + } + return res +} +// GetIsExtended gets the isExtended property value. Indicates whether the access package assignment is extended. Read-only. +func (m *AccessPackageAssignment) GetIsExtended()(*bool) { + return m.isExtended +} +// GetSchedule gets the schedule property value. When the access assignment is to be in place. Read-only. +func (m *AccessPackageAssignment) GetSchedule()(RequestScheduleable) { + return m.schedule +} +// GetTarget gets the target property value. The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId. +func (m *AccessPackageAssignment) GetTarget()(AccessPackageSubjectable) { + return m.target +} +// GetTargetId gets the targetId property value. The ID of the subject with the assignment. Read-only. +func (m *AccessPackageAssignment) GetTargetId()(*string) { + return m.targetId +} +// Serialize serializes information the current object +func (m *AccessPackageAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackage", m.GetAccessPackage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageAssignmentPolicy", m.GetAccessPackageAssignmentPolicy()) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignmentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentRequests())) + for i, v := range m.GetAccessPackageAssignmentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentRequests", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignmentResourceRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentResourceRoles())) + for i, v := range m.GetAccessPackageAssignmentResourceRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentResourceRoles", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accessPackageId", m.GetAccessPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignmentPolicyId", m.GetAssignmentPolicyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignmentState", m.GetAssignmentState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignmentStatus", m.GetAssignmentStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("catalogId", m.GetCatalogId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expiredDateTime", m.GetExpiredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isExtended", m.GetIsExtended()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedule", m.GetSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetId", m.GetTargetId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackage sets the accessPackage property value. Read-only. Nullable. Supports $filter (eq) on the id property and $expand query parameters. +func (m *AccessPackageAssignment) SetAccessPackage(value AccessPackageable)() { + m.accessPackage = value +} +// SetAccessPackageAssignmentPolicy sets the accessPackageAssignmentPolicy property value. Read-only. Nullable. Supports $filter (eq) on the id property +func (m *AccessPackageAssignment) SetAccessPackageAssignmentPolicy(value AccessPackageAssignmentPolicyable)() { + m.accessPackageAssignmentPolicy = value +} +// SetAccessPackageAssignmentRequests sets the accessPackageAssignmentRequests property value. The accessPackageAssignmentRequests property +func (m *AccessPackageAssignment) SetAccessPackageAssignmentRequests(value []AccessPackageAssignmentRequestable)() { + m.accessPackageAssignmentRequests = value +} +// SetAccessPackageAssignmentResourceRoles sets the accessPackageAssignmentResourceRoles property value. The resource roles delivered to the target user for this assignment. Read-only. Nullable. +func (m *AccessPackageAssignment) SetAccessPackageAssignmentResourceRoles(value []AccessPackageAssignmentResourceRoleable)() { + m.accessPackageAssignmentResourceRoles = value +} +// SetAccessPackageId sets the accessPackageId property value. The identifier of the access package. Read-only. +func (m *AccessPackageAssignment) SetAccessPackageId(value *string)() { + m.accessPackageId = value +} +// SetAssignmentPolicyId sets the assignmentPolicyId property value. The identifier of the access package assignment policy. Read-only. +func (m *AccessPackageAssignment) SetAssignmentPolicyId(value *string)() { + m.assignmentPolicyId = value +} +// SetAssignmentState sets the assignmentState property value. The state of the access package assignment. Possible values are Delivering, Delivered, or Expired. Read-only. Supports $filter (eq). +func (m *AccessPackageAssignment) SetAssignmentState(value *string)() { + m.assignmentState = value +} +// SetAssignmentStatus sets the assignmentStatus property value. More information about the assignment lifecycle. Possible values include Delivering, Delivered, NearExpiry1DayNotificationTriggered, or ExpiredNotificationTriggered. Read-only. +func (m *AccessPackageAssignment) SetAssignmentStatus(value *string)() { + m.assignmentStatus = value +} +// SetCatalogId sets the catalogId property value. The identifier of the catalog containing the access package. Read-only. +func (m *AccessPackageAssignment) SetCatalogId(value *string)() { + m.catalogId = value +} +// SetExpiredDateTime sets the expiredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignment) SetExpiredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expiredDateTime = value +} +// SetIsExtended sets the isExtended property value. Indicates whether the access package assignment is extended. Read-only. +func (m *AccessPackageAssignment) SetIsExtended(value *bool)() { + m.isExtended = value +} +// SetSchedule sets the schedule property value. When the access assignment is to be in place. Read-only. +func (m *AccessPackageAssignment) SetSchedule(value RequestScheduleable)() { + m.schedule = value +} +// SetTarget sets the target property value. The subject of the access package assignment. Read-only. Nullable. Supports $expand. Supports $filter (eq) on objectId. +func (m *AccessPackageAssignment) SetTarget(value AccessPackageSubjectable)() { + m.target = value +} +// SetTargetId sets the targetId property value. The ID of the subject with the assignment. Read-only. +func (m *AccessPackageAssignment) SetTargetId(value *string)() { + m.targetId = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_response.go new file mode 100644 index 000000000..d5eaabeb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentCollectionResponse +type AccessPackageAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAssignmentable +} +// NewAccessPackageAssignmentCollectionResponse instantiates a new AccessPackageAssignmentCollectionResponse and sets the default values. +func NewAccessPackageAssignmentCollectionResponse()(*AccessPackageAssignmentCollectionResponse) { + m := &AccessPackageAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAssignmentCollectionResponse) GetValue()([]AccessPackageAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAssignmentCollectionResponse) SetValue(value []AccessPackageAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_responseable.go new file mode 100644 index 000000000..de6d0bba2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentCollectionResponseable +type AccessPackageAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAssignmentable) + SetValue(value []AccessPackageAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_policy.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy.go new file mode 100644 index 000000000..883e59ba4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy.go @@ -0,0 +1,493 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentPolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageAssignmentPolicy struct { + Entity + // The access package with this policy. Read-only. Nullable. Supports $expand. + accessPackage AccessPackageable + // The accessPackageCatalog property + accessPackageCatalog AccessPackageCatalogable + // Identifier of the access package. + accessPackageId *string + // Who must review, and how often, the assignments to the access package from this policy. This property is null if reviews are not required. + accessReviewSettings AssignmentReviewSettingsable + // Indicates whether a user can extend the access package assignment duration after approval. + canExtend *bool + // The createdBy property + createdBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. + customExtensionHandlers []CustomExtensionHandlerable + // The description of the policy. + description *string + // The display name of the policy. Supports $filter (eq). + displayName *string + // The number of days in which assignments from this policy last until they are expired. + durationInDays *int32 + // The expiration date for assignments created in this policy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The modifiedBy property + modifiedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Questions that are posed to the requestor. + questions []AccessPackageQuestionable + // Who must approve requests for access package in this policy. + requestApprovalSettings ApprovalSettingsable + // Who can request this access package from this policy. + requestorSettings RequestorSettingsable +} +// NewAccessPackageAssignmentPolicy instantiates a new accessPackageAssignmentPolicy and sets the default values. +func NewAccessPackageAssignmentPolicy()(*AccessPackageAssignmentPolicy) { + m := &AccessPackageAssignmentPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageAssignmentPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentPolicy(), nil +} +// GetAccessPackage gets the accessPackage property value. The access package with this policy. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentPolicy) GetAccessPackage()(AccessPackageable) { + return m.accessPackage +} +// GetAccessPackageCatalog gets the accessPackageCatalog property value. The accessPackageCatalog property +func (m *AccessPackageAssignmentPolicy) GetAccessPackageCatalog()(AccessPackageCatalogable) { + return m.accessPackageCatalog +} +// GetAccessPackageId gets the accessPackageId property value. Identifier of the access package. +func (m *AccessPackageAssignmentPolicy) GetAccessPackageId()(*string) { + return m.accessPackageId +} +// GetAccessReviewSettings gets the accessReviewSettings property value. Who must review, and how often, the assignments to the access package from this policy. This property is null if reviews are not required. +func (m *AccessPackageAssignmentPolicy) GetAccessReviewSettings()(AssignmentReviewSettingsable) { + return m.accessReviewSettings +} +// GetCanExtend gets the canExtend property value. Indicates whether a user can extend the access package assignment duration after approval. +func (m *AccessPackageAssignmentPolicy) GetCanExtend()(*bool) { + return m.canExtend +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *AccessPackageAssignmentPolicy) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomExtensionHandlers gets the customExtensionHandlers property value. The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. +func (m *AccessPackageAssignmentPolicy) GetCustomExtensionHandlers()([]CustomExtensionHandlerable) { + return m.customExtensionHandlers +} +// GetDescription gets the description property value. The description of the policy. +func (m *AccessPackageAssignmentPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the policy. Supports $filter (eq). +func (m *AccessPackageAssignmentPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetDurationInDays gets the durationInDays property value. The number of days in which assignments from this policy last until they are expired. +func (m *AccessPackageAssignmentPolicy) GetDurationInDays()(*int32) { + return m.durationInDays +} +// GetExpirationDateTime gets the expirationDateTime property value. The expiration date for assignments created in this policy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackage(val.(AccessPackageable)) + } + return nil + } + res["accessPackageCatalog"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageCatalogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageCatalog(val.(AccessPackageCatalogable)) + } + return nil + } + res["accessPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageId(val) + } + return nil + } + res["accessReviewSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAssignmentReviewSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessReviewSettings(val.(AssignmentReviewSettingsable)) + } + return nil + } + res["canExtend"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanExtend(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customExtensionHandlers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomExtensionHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomExtensionHandlerable, len(val)) + for i, v := range val { + res[i] = v.(CustomExtensionHandlerable) + } + m.SetCustomExtensionHandlers(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["durationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInDays(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["questions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageQuestionable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageQuestionable) + } + m.SetQuestions(res) + } + return nil + } + res["requestApprovalSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApprovalSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestApprovalSettings(val.(ApprovalSettingsable)) + } + return nil + } + res["requestorSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestorSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestorSettings(val.(RequestorSettingsable)) + } + return nil + } + return res +} +// GetModifiedBy gets the modifiedBy property value. The modifiedBy property +func (m *AccessPackageAssignmentPolicy) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetQuestions gets the questions property value. Questions that are posed to the requestor. +func (m *AccessPackageAssignmentPolicy) GetQuestions()([]AccessPackageQuestionable) { + return m.questions +} +// GetRequestApprovalSettings gets the requestApprovalSettings property value. Who must approve requests for access package in this policy. +func (m *AccessPackageAssignmentPolicy) GetRequestApprovalSettings()(ApprovalSettingsable) { + return m.requestApprovalSettings +} +// GetRequestorSettings gets the requestorSettings property value. Who can request this access package from this policy. +func (m *AccessPackageAssignmentPolicy) GetRequestorSettings()(RequestorSettingsable) { + return m.requestorSettings +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackage", m.GetAccessPackage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageCatalog", m.GetAccessPackageCatalog()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accessPackageId", m.GetAccessPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessReviewSettings", m.GetAccessReviewSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("canExtend", m.GetCanExtend()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustomExtensionHandlers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomExtensionHandlers())) + for i, v := range m.GetCustomExtensionHandlers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customExtensionHandlers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("durationInDays", m.GetDurationInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetQuestions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetQuestions())) + for i, v := range m.GetQuestions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("questions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requestApprovalSettings", m.GetRequestApprovalSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requestorSettings", m.GetRequestorSettings()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackage sets the accessPackage property value. The access package with this policy. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentPolicy) SetAccessPackage(value AccessPackageable)() { + m.accessPackage = value +} +// SetAccessPackageCatalog sets the accessPackageCatalog property value. The accessPackageCatalog property +func (m *AccessPackageAssignmentPolicy) SetAccessPackageCatalog(value AccessPackageCatalogable)() { + m.accessPackageCatalog = value +} +// SetAccessPackageId sets the accessPackageId property value. Identifier of the access package. +func (m *AccessPackageAssignmentPolicy) SetAccessPackageId(value *string)() { + m.accessPackageId = value +} +// SetAccessReviewSettings sets the accessReviewSettings property value. Who must review, and how often, the assignments to the access package from this policy. This property is null if reviews are not required. +func (m *AccessPackageAssignmentPolicy) SetAccessReviewSettings(value AssignmentReviewSettingsable)() { + m.accessReviewSettings = value +} +// SetCanExtend sets the canExtend property value. Indicates whether a user can extend the access package assignment duration after approval. +func (m *AccessPackageAssignmentPolicy) SetCanExtend(value *bool)() { + m.canExtend = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *AccessPackageAssignmentPolicy) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomExtensionHandlers sets the customExtensionHandlers property value. The collection of stages when to execute one or more custom access package workflow extensions. Supports $expand. +func (m *AccessPackageAssignmentPolicy) SetCustomExtensionHandlers(value []CustomExtensionHandlerable)() { + m.customExtensionHandlers = value +} +// SetDescription sets the description property value. The description of the policy. +func (m *AccessPackageAssignmentPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the policy. Supports $filter (eq). +func (m *AccessPackageAssignmentPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDurationInDays sets the durationInDays property value. The number of days in which assignments from this policy last until they are expired. +func (m *AccessPackageAssignmentPolicy) SetDurationInDays(value *int32)() { + m.durationInDays = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expiration date for assignments created in this policy. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetModifiedBy sets the modifiedBy property value. The modifiedBy property +func (m *AccessPackageAssignmentPolicy) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageAssignmentPolicy) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetQuestions sets the questions property value. Questions that are posed to the requestor. +func (m *AccessPackageAssignmentPolicy) SetQuestions(value []AccessPackageQuestionable)() { + m.questions = value +} +// SetRequestApprovalSettings sets the requestApprovalSettings property value. Who must approve requests for access package in this policy. +func (m *AccessPackageAssignmentPolicy) SetRequestApprovalSettings(value ApprovalSettingsable)() { + m.requestApprovalSettings = value +} +// SetRequestorSettings sets the requestorSettings property value. Who can request this access package from this policy. +func (m *AccessPackageAssignmentPolicy) SetRequestorSettings(value RequestorSettingsable)() { + m.requestorSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_response.go new file mode 100644 index 000000000..cf64cfc1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentPolicyCollectionResponse +type AccessPackageAssignmentPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAssignmentPolicyable +} +// NewAccessPackageAssignmentPolicyCollectionResponse instantiates a new AccessPackageAssignmentPolicyCollectionResponse and sets the default values. +func NewAccessPackageAssignmentPolicyCollectionResponse()(*AccessPackageAssignmentPolicyCollectionResponse) { + m := &AccessPackageAssignmentPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAssignmentPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAssignmentPolicyCollectionResponse) GetValue()([]AccessPackageAssignmentPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAssignmentPolicyCollectionResponse) SetValue(value []AccessPackageAssignmentPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_responseable.go new file mode 100644 index 000000000..2918eef17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentPolicyCollectionResponseable +type AccessPackageAssignmentPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAssignmentPolicyable) + SetValue(value []AccessPackageAssignmentPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_policyable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_policyable.go new file mode 100644 index 000000000..f8a26b219 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_policyable.go @@ -0,0 +1,46 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentPolicyable +type AccessPackageAssignmentPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackage()(AccessPackageable) + GetAccessPackageCatalog()(AccessPackageCatalogable) + GetAccessPackageId()(*string) + GetAccessReviewSettings()(AssignmentReviewSettingsable) + GetCanExtend()(*bool) + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomExtensionHandlers()([]CustomExtensionHandlerable) + GetDescription()(*string) + GetDisplayName()(*string) + GetDurationInDays()(*int32) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetQuestions()([]AccessPackageQuestionable) + GetRequestApprovalSettings()(ApprovalSettingsable) + GetRequestorSettings()(RequestorSettingsable) + SetAccessPackage(value AccessPackageable)() + SetAccessPackageCatalog(value AccessPackageCatalogable)() + SetAccessPackageId(value *string)() + SetAccessReviewSettings(value AssignmentReviewSettingsable)() + SetCanExtend(value *bool)() + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomExtensionHandlers(value []CustomExtensionHandlerable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDurationInDays(value *int32)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetQuestions(value []AccessPackageQuestionable)() + SetRequestApprovalSettings(value ApprovalSettingsable)() + SetRequestorSettings(value RequestorSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_request.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_request.go new file mode 100644 index 000000000..e3d82e5f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_request.go @@ -0,0 +1,415 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentRequest provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageAssignmentRequest struct { + Entity + // The access package associated with the accessPackageAssignmentRequest. An access package defines the collections of resource roles and the policies for how one or more users can get access to those resources. Read-only. Nullable. Supports $expand. + accessPackage AccessPackageable + // For a requestType of UserAdd or AdminAdd, this is an access package assignment requested to be created. For a requestType of UserRemove, AdminRemove or SystemRemove, this has the id property of an existing assignment to be removed. Supports $expand. + accessPackageAssignment AccessPackageAssignmentable + // Answers provided by the requestor to accessPackageQuestions asked of them at the time of request. + answers []AccessPackageAnswerable + // The date of the end of processing, either successful or failure, of a request. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + completedDate *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A collection of custom workflow extension instances being run on an assignment request. Read-only. + customExtensionHandlerInstances []CustomExtensionHandlerInstanceable + // The expirationDateTime property + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // True if the request is not to be processed for assignment. + isValidationOnly *bool + // The requestor's supplied justification. + justification *string + // The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand. + requestor AccessPackageSubjectable + // One of PendingApproval, Canceled, Denied, Delivering, Delivered, PartiallyDelivered, DeliveryFailed, Submitted or Scheduled. Read-only. + requestState *string + // More information on the request processing status. Read-only. + requestStatus *string + // One of UserAdd, UserExtend, UserUpdate, UserRemove, AdminAdd, AdminRemove or SystemRemove. A request from the user themselves would have requestType of UserAdd, UserUpdate or UserRemove. Read-only. + requestType *string + // The range of dates that access is to be assigned to the requestor. Read-only. + schedule RequestScheduleable +} +// NewAccessPackageAssignmentRequest instantiates a new accessPackageAssignmentRequest and sets the default values. +func NewAccessPackageAssignmentRequest()(*AccessPackageAssignmentRequest) { + m := &AccessPackageAssignmentRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageAssignmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentRequest(), nil +} +// GetAccessPackage gets the accessPackage property value. The access package associated with the accessPackageAssignmentRequest. An access package defines the collections of resource roles and the policies for how one or more users can get access to those resources. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentRequest) GetAccessPackage()(AccessPackageable) { + return m.accessPackage +} +// GetAccessPackageAssignment gets the accessPackageAssignment property value. For a requestType of UserAdd or AdminAdd, this is an access package assignment requested to be created. For a requestType of UserRemove, AdminRemove or SystemRemove, this has the id property of an existing assignment to be removed. Supports $expand. +func (m *AccessPackageAssignmentRequest) GetAccessPackageAssignment()(AccessPackageAssignmentable) { + return m.accessPackageAssignment +} +// GetAnswers gets the answers property value. Answers provided by the requestor to accessPackageQuestions asked of them at the time of request. +func (m *AccessPackageAssignmentRequest) GetAnswers()([]AccessPackageAnswerable) { + return m.answers +} +// GetCompletedDate gets the completedDate property value. The date of the end of processing, either successful or failure, of a request. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageAssignmentRequest) GetCompletedDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDate +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageAssignmentRequest) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomExtensionHandlerInstances gets the customExtensionHandlerInstances property value. A collection of custom workflow extension instances being run on an assignment request. Read-only. +func (m *AccessPackageAssignmentRequest) GetCustomExtensionHandlerInstances()([]CustomExtensionHandlerInstanceable) { + return m.customExtensionHandlerInstances +} +// GetExpirationDateTime gets the expirationDateTime property value. The expirationDateTime property +func (m *AccessPackageAssignmentRequest) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackage(val.(AccessPackageable)) + } + return nil + } + res["accessPackageAssignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageAssignment(val.(AccessPackageAssignmentable)) + } + return nil + } + res["answers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAnswerable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAnswerable) + } + m.SetAnswers(res) + } + return nil + } + res["completedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDate(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customExtensionHandlerInstances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomExtensionHandlerInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomExtensionHandlerInstanceable, len(val)) + for i, v := range val { + res[i] = v.(CustomExtensionHandlerInstanceable) + } + m.SetCustomExtensionHandlerInstances(res) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["isValidationOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValidationOnly(val) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["requestor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestor(val.(AccessPackageSubjectable)) + } + return nil + } + res["requestState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestState(val) + } + return nil + } + res["requestStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestStatus(val) + } + return nil + } + res["requestType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestType(val) + } + return nil + } + res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedule(val.(RequestScheduleable)) + } + return nil + } + return res +} +// GetIsValidationOnly gets the isValidationOnly property value. True if the request is not to be processed for assignment. +func (m *AccessPackageAssignmentRequest) GetIsValidationOnly()(*bool) { + return m.isValidationOnly +} +// GetJustification gets the justification property value. The requestor's supplied justification. +func (m *AccessPackageAssignmentRequest) GetJustification()(*string) { + return m.justification +} +// GetRequestor gets the requestor property value. The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentRequest) GetRequestor()(AccessPackageSubjectable) { + return m.requestor +} +// GetRequestState gets the requestState property value. One of PendingApproval, Canceled, Denied, Delivering, Delivered, PartiallyDelivered, DeliveryFailed, Submitted or Scheduled. Read-only. +func (m *AccessPackageAssignmentRequest) GetRequestState()(*string) { + return m.requestState +} +// GetRequestStatus gets the requestStatus property value. More information on the request processing status. Read-only. +func (m *AccessPackageAssignmentRequest) GetRequestStatus()(*string) { + return m.requestStatus +} +// GetRequestType gets the requestType property value. One of UserAdd, UserExtend, UserUpdate, UserRemove, AdminAdd, AdminRemove or SystemRemove. A request from the user themselves would have requestType of UserAdd, UserUpdate or UserRemove. Read-only. +func (m *AccessPackageAssignmentRequest) GetRequestType()(*string) { + return m.requestType +} +// GetSchedule gets the schedule property value. The range of dates that access is to be assigned to the requestor. Read-only. +func (m *AccessPackageAssignmentRequest) GetSchedule()(RequestScheduleable) { + return m.schedule +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackage", m.GetAccessPackage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageAssignment", m.GetAccessPackageAssignment()) + if err != nil { + return err + } + } + if m.GetAnswers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAnswers())) + for i, v := range m.GetAnswers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("answers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDate", m.GetCompletedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustomExtensionHandlerInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomExtensionHandlerInstances())) + for i, v := range m.GetCustomExtensionHandlerInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customExtensionHandlerInstances", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isValidationOnly", m.GetIsValidationOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requestor", m.GetRequestor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestState", m.GetRequestState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestStatus", m.GetRequestStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestType", m.GetRequestType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedule", m.GetSchedule()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackage sets the accessPackage property value. The access package associated with the accessPackageAssignmentRequest. An access package defines the collections of resource roles and the policies for how one or more users can get access to those resources. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentRequest) SetAccessPackage(value AccessPackageable)() { + m.accessPackage = value +} +// SetAccessPackageAssignment sets the accessPackageAssignment property value. For a requestType of UserAdd or AdminAdd, this is an access package assignment requested to be created. For a requestType of UserRemove, AdminRemove or SystemRemove, this has the id property of an existing assignment to be removed. Supports $expand. +func (m *AccessPackageAssignmentRequest) SetAccessPackageAssignment(value AccessPackageAssignmentable)() { + m.accessPackageAssignment = value +} +// SetAnswers sets the answers property value. Answers provided by the requestor to accessPackageQuestions asked of them at the time of request. +func (m *AccessPackageAssignmentRequest) SetAnswers(value []AccessPackageAnswerable)() { + m.answers = value +} +// SetCompletedDate sets the completedDate property value. The date of the end of processing, either successful or failure, of a request. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageAssignmentRequest) SetCompletedDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDate = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageAssignmentRequest) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomExtensionHandlerInstances sets the customExtensionHandlerInstances property value. A collection of custom workflow extension instances being run on an assignment request. Read-only. +func (m *AccessPackageAssignmentRequest) SetCustomExtensionHandlerInstances(value []CustomExtensionHandlerInstanceable)() { + m.customExtensionHandlerInstances = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expirationDateTime property +func (m *AccessPackageAssignmentRequest) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIsValidationOnly sets the isValidationOnly property value. True if the request is not to be processed for assignment. +func (m *AccessPackageAssignmentRequest) SetIsValidationOnly(value *bool)() { + m.isValidationOnly = value +} +// SetJustification sets the justification property value. The requestor's supplied justification. +func (m *AccessPackageAssignmentRequest) SetJustification(value *string)() { + m.justification = value +} +// SetRequestor sets the requestor property value. The subject who requested or, if a direct assignment, was assigned. Read-only. Nullable. Supports $expand. +func (m *AccessPackageAssignmentRequest) SetRequestor(value AccessPackageSubjectable)() { + m.requestor = value +} +// SetRequestState sets the requestState property value. One of PendingApproval, Canceled, Denied, Delivering, Delivered, PartiallyDelivered, DeliveryFailed, Submitted or Scheduled. Read-only. +func (m *AccessPackageAssignmentRequest) SetRequestState(value *string)() { + m.requestState = value +} +// SetRequestStatus sets the requestStatus property value. More information on the request processing status. Read-only. +func (m *AccessPackageAssignmentRequest) SetRequestStatus(value *string)() { + m.requestStatus = value +} +// SetRequestType sets the requestType property value. One of UserAdd, UserExtend, UserUpdate, UserRemove, AdminAdd, AdminRemove or SystemRemove. A request from the user themselves would have requestType of UserAdd, UserUpdate or UserRemove. Read-only. +func (m *AccessPackageAssignmentRequest) SetRequestType(value *string)() { + m.requestType = value +} +// SetSchedule sets the schedule property value. The range of dates that access is to be assigned to the requestor. Read-only. +func (m *AccessPackageAssignmentRequest) SetSchedule(value RequestScheduleable)() { + m.schedule = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_response.go new file mode 100644 index 000000000..63e54b711 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentRequestCollectionResponse +type AccessPackageAssignmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAssignmentRequestable +} +// NewAccessPackageAssignmentRequestCollectionResponse instantiates a new AccessPackageAssignmentRequestCollectionResponse and sets the default values. +func NewAccessPackageAssignmentRequestCollectionResponse()(*AccessPackageAssignmentRequestCollectionResponse) { + m := &AccessPackageAssignmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAssignmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAssignmentRequestCollectionResponse) GetValue()([]AccessPackageAssignmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAssignmentRequestCollectionResponse) SetValue(value []AccessPackageAssignmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_responseable.go new file mode 100644 index 000000000..49372976e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentRequestCollectionResponseable +type AccessPackageAssignmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAssignmentRequestable) + SetValue(value []AccessPackageAssignmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_requestable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_requestable.go new file mode 100644 index 000000000..4850c305e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_requestable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentRequestable +type AccessPackageAssignmentRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackage()(AccessPackageable) + GetAccessPackageAssignment()(AccessPackageAssignmentable) + GetAnswers()([]AccessPackageAnswerable) + GetCompletedDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomExtensionHandlerInstances()([]CustomExtensionHandlerInstanceable) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsValidationOnly()(*bool) + GetJustification()(*string) + GetRequestor()(AccessPackageSubjectable) + GetRequestState()(*string) + GetRequestStatus()(*string) + GetRequestType()(*string) + GetSchedule()(RequestScheduleable) + SetAccessPackage(value AccessPackageable)() + SetAccessPackageAssignment(value AccessPackageAssignmentable)() + SetAnswers(value []AccessPackageAnswerable)() + SetCompletedDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomExtensionHandlerInstances(value []CustomExtensionHandlerInstanceable)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsValidationOnly(value *bool)() + SetJustification(value *string)() + SetRequestor(value AccessPackageSubjectable)() + SetRequestState(value *string)() + SetRequestStatus(value *string)() + SetRequestType(value *string)() + SetSchedule(value RequestScheduleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role.go new file mode 100644 index 000000000..d5854758a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role.go @@ -0,0 +1,224 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentResourceRole provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageAssignmentResourceRole struct { + Entity + // The access package assignments resulting in this role assignment. Read-only. Nullable. + accessPackageAssignments []AccessPackageAssignmentable + // The accessPackageResourceRole property + accessPackageResourceRole AccessPackageResourceRoleable + // The accessPackageResourceScope property + accessPackageResourceScope AccessPackageResourceScopeable + // Read-only. Nullable. Supports $filter (eq) on objectId and $expand query parameters. + accessPackageSubject AccessPackageSubjectable + // A unique identifier relative to the origin system, corresponding to the originId property of the accessPackageResourceRole. + originId *string + // The system where the role assignment is to be created or has been created for an access package assignment, such as SharePointOnline, AadGroup or AadApplication, corresponding to the originSystem property of the accessPackageResourceRole. + originSystem *string + // The value is PendingFulfillment when the access package assignment has not yet been delivered to the origin system, and Fulfilled when the access package assignment has been delivered to the origin system. + status *string +} +// NewAccessPackageAssignmentResourceRole instantiates a new accessPackageAssignmentResourceRole and sets the default values. +func NewAccessPackageAssignmentResourceRole()(*AccessPackageAssignmentResourceRole) { + m := &AccessPackageAssignmentResourceRole{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageAssignmentResourceRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentResourceRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentResourceRole(), nil +} +// GetAccessPackageAssignments gets the accessPackageAssignments property value. The access package assignments resulting in this role assignment. Read-only. Nullable. +func (m *AccessPackageAssignmentResourceRole) GetAccessPackageAssignments()([]AccessPackageAssignmentable) { + return m.accessPackageAssignments +} +// GetAccessPackageResourceRole gets the accessPackageResourceRole property value. The accessPackageResourceRole property +func (m *AccessPackageAssignmentResourceRole) GetAccessPackageResourceRole()(AccessPackageResourceRoleable) { + return m.accessPackageResourceRole +} +// GetAccessPackageResourceScope gets the accessPackageResourceScope property value. The accessPackageResourceScope property +func (m *AccessPackageAssignmentResourceRole) GetAccessPackageResourceScope()(AccessPackageResourceScopeable) { + return m.accessPackageResourceScope +} +// GetAccessPackageSubject gets the accessPackageSubject property value. Read-only. Nullable. Supports $filter (eq) on objectId and $expand query parameters. +func (m *AccessPackageAssignmentResourceRole) GetAccessPackageSubject()(AccessPackageSubjectable) { + return m.accessPackageSubject +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentResourceRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentable) + } + m.SetAccessPackageAssignments(res) + } + return nil + } + res["accessPackageResourceRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResourceRole(val.(AccessPackageResourceRoleable)) + } + return nil + } + res["accessPackageResourceScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResourceScope(val.(AccessPackageResourceScopeable)) + } + return nil + } + res["accessPackageSubject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageSubject(val.(AccessPackageSubjectable)) + } + return nil + } + res["originId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginId(val) + } + return nil + } + res["originSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginSystem(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetOriginId gets the originId property value. A unique identifier relative to the origin system, corresponding to the originId property of the accessPackageResourceRole. +func (m *AccessPackageAssignmentResourceRole) GetOriginId()(*string) { + return m.originId +} +// GetOriginSystem gets the originSystem property value. The system where the role assignment is to be created or has been created for an access package assignment, such as SharePointOnline, AadGroup or AadApplication, corresponding to the originSystem property of the accessPackageResourceRole. +func (m *AccessPackageAssignmentResourceRole) GetOriginSystem()(*string) { + return m.originSystem +} +// GetStatus gets the status property value. The value is PendingFulfillment when the access package assignment has not yet been delivered to the origin system, and Fulfilled when the access package assignment has been delivered to the origin system. +func (m *AccessPackageAssignmentResourceRole) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentResourceRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessPackageAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignments())) + for i, v := range m.GetAccessPackageAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageResourceRole", m.GetAccessPackageResourceRole()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageResourceScope", m.GetAccessPackageResourceScope()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageSubject", m.GetAccessPackageSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originId", m.GetOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originSystem", m.GetOriginSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageAssignments sets the accessPackageAssignments property value. The access package assignments resulting in this role assignment. Read-only. Nullable. +func (m *AccessPackageAssignmentResourceRole) SetAccessPackageAssignments(value []AccessPackageAssignmentable)() { + m.accessPackageAssignments = value +} +// SetAccessPackageResourceRole sets the accessPackageResourceRole property value. The accessPackageResourceRole property +func (m *AccessPackageAssignmentResourceRole) SetAccessPackageResourceRole(value AccessPackageResourceRoleable)() { + m.accessPackageResourceRole = value +} +// SetAccessPackageResourceScope sets the accessPackageResourceScope property value. The accessPackageResourceScope property +func (m *AccessPackageAssignmentResourceRole) SetAccessPackageResourceScope(value AccessPackageResourceScopeable)() { + m.accessPackageResourceScope = value +} +// SetAccessPackageSubject sets the accessPackageSubject property value. Read-only. Nullable. Supports $filter (eq) on objectId and $expand query parameters. +func (m *AccessPackageAssignmentResourceRole) SetAccessPackageSubject(value AccessPackageSubjectable)() { + m.accessPackageSubject = value +} +// SetOriginId sets the originId property value. A unique identifier relative to the origin system, corresponding to the originId property of the accessPackageResourceRole. +func (m *AccessPackageAssignmentResourceRole) SetOriginId(value *string)() { + m.originId = value +} +// SetOriginSystem sets the originSystem property value. The system where the role assignment is to be created or has been created for an access package assignment, such as SharePointOnline, AadGroup or AadApplication, corresponding to the originSystem property of the accessPackageResourceRole. +func (m *AccessPackageAssignmentResourceRole) SetOriginSystem(value *string)() { + m.originSystem = value +} +// SetStatus sets the status property value. The value is PendingFulfillment when the access package assignment has not yet been delivered to the origin system, and Fulfilled when the access package assignment has been delivered to the origin system. +func (m *AccessPackageAssignmentResourceRole) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_response.go new file mode 100644 index 000000000..6f094a6c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentResourceRoleCollectionResponse +type AccessPackageAssignmentResourceRoleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageAssignmentResourceRoleable +} +// NewAccessPackageAssignmentResourceRoleCollectionResponse instantiates a new AccessPackageAssignmentResourceRoleCollectionResponse and sets the default values. +func NewAccessPackageAssignmentResourceRoleCollectionResponse()(*AccessPackageAssignmentResourceRoleCollectionResponse) { + m := &AccessPackageAssignmentResourceRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageAssignmentResourceRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageAssignmentResourceRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageAssignmentResourceRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageAssignmentResourceRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentResourceRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageAssignmentResourceRoleCollectionResponse) GetValue()([]AccessPackageAssignmentResourceRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageAssignmentResourceRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageAssignmentResourceRoleCollectionResponse) SetValue(value []AccessPackageAssignmentResourceRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_responseable.go new file mode 100644 index 000000000..7026e9932 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_role_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentResourceRoleCollectionResponseable +type AccessPackageAssignmentResourceRoleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageAssignmentResourceRoleable) + SetValue(value []AccessPackageAssignmentResourceRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_roleable.go b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_roleable.go new file mode 100644 index 000000000..bce2858d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignment_resource_roleable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentResourceRoleable +type AccessPackageAssignmentResourceRoleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageAssignments()([]AccessPackageAssignmentable) + GetAccessPackageResourceRole()(AccessPackageResourceRoleable) + GetAccessPackageResourceScope()(AccessPackageResourceScopeable) + GetAccessPackageSubject()(AccessPackageSubjectable) + GetOriginId()(*string) + GetOriginSystem()(*string) + GetStatus()(*string) + SetAccessPackageAssignments(value []AccessPackageAssignmentable)() + SetAccessPackageResourceRole(value AccessPackageResourceRoleable)() + SetAccessPackageResourceScope(value AccessPackageResourceScopeable)() + SetAccessPackageSubject(value AccessPackageSubjectable)() + SetOriginId(value *string)() + SetOriginSystem(value *string)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_assignmentable.go b/src/internal/connector/graph/betasdk/models/access_package_assignmentable.go new file mode 100644 index 000000000..4d7cc7a47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_assignmentable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageAssignmentable +type AccessPackageAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackage()(AccessPackageable) + GetAccessPackageAssignmentPolicy()(AccessPackageAssignmentPolicyable) + GetAccessPackageAssignmentRequests()([]AccessPackageAssignmentRequestable) + GetAccessPackageAssignmentResourceRoles()([]AccessPackageAssignmentResourceRoleable) + GetAccessPackageId()(*string) + GetAssignmentPolicyId()(*string) + GetAssignmentState()(*string) + GetAssignmentStatus()(*string) + GetCatalogId()(*string) + GetExpiredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsExtended()(*bool) + GetSchedule()(RequestScheduleable) + GetTarget()(AccessPackageSubjectable) + GetTargetId()(*string) + SetAccessPackage(value AccessPackageable)() + SetAccessPackageAssignmentPolicy(value AccessPackageAssignmentPolicyable)() + SetAccessPackageAssignmentRequests(value []AccessPackageAssignmentRequestable)() + SetAccessPackageAssignmentResourceRoles(value []AccessPackageAssignmentResourceRoleable)() + SetAccessPackageId(value *string)() + SetAssignmentPolicyId(value *string)() + SetAssignmentState(value *string)() + SetAssignmentStatus(value *string)() + SetCatalogId(value *string)() + SetExpiredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsExtended(value *bool)() + SetSchedule(value RequestScheduleable)() + SetTarget(value AccessPackageSubjectable)() + SetTargetId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_catalog.go b/src/internal/connector/graph/betasdk/models/access_package_catalog.go new file mode 100644 index 000000000..499ec7614 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_catalog.go @@ -0,0 +1,439 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCatalog +type AccessPackageCatalog struct { + Entity + // The roles in each resource in a catalog. Read-only. + accessPackageResourceRoles []AccessPackageResourceRoleable + // The accessPackageResources property + accessPackageResources []AccessPackageResourceable + // The accessPackageResourceScopes property + accessPackageResourceScopes []AccessPackageResourceScopeable + // The access packages in this catalog. Read-only. Nullable. Supports $expand. + accessPackages []AccessPackageable + // Has the value Published if the access packages are available for management. + catalogStatus *string + // One of UserManaged or ServiceDefault. + catalogType *string + // UPN of the user who created this resource. Read-only. + createdBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The customAccessPackageWorkflowExtensions property + customAccessPackageWorkflowExtensions []CustomAccessPackageWorkflowExtensionable + // The description of the access package catalog. + description *string + // The display name of the access package catalog. Supports $filter (eq, contains). + displayName *string + // Whether the access packages in this catalog can be requested by users outside of the tenant. + isExternallyVisible *bool + // The UPN of the user who last modified this resource. Read-only. + modifiedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAccessPackageCatalog instantiates a new accessPackageCatalog and sets the default values. +func NewAccessPackageCatalog()(*AccessPackageCatalog) { + m := &AccessPackageCatalog{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageCatalogFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageCatalogFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageCatalog(), nil +} +// GetAccessPackageResourceRoles gets the accessPackageResourceRoles property value. The roles in each resource in a catalog. Read-only. +func (m *AccessPackageCatalog) GetAccessPackageResourceRoles()([]AccessPackageResourceRoleable) { + return m.accessPackageResourceRoles +} +// GetAccessPackageResources gets the accessPackageResources property value. The accessPackageResources property +func (m *AccessPackageCatalog) GetAccessPackageResources()([]AccessPackageResourceable) { + return m.accessPackageResources +} +// GetAccessPackageResourceScopes gets the accessPackageResourceScopes property value. The accessPackageResourceScopes property +func (m *AccessPackageCatalog) GetAccessPackageResourceScopes()([]AccessPackageResourceScopeable) { + return m.accessPackageResourceScopes +} +// GetAccessPackages gets the accessPackages property value. The access packages in this catalog. Read-only. Nullable. Supports $expand. +func (m *AccessPackageCatalog) GetAccessPackages()([]AccessPackageable) { + return m.accessPackages +} +// GetCatalogStatus gets the catalogStatus property value. Has the value Published if the access packages are available for management. +func (m *AccessPackageCatalog) GetCatalogStatus()(*string) { + return m.catalogStatus +} +// GetCatalogType gets the catalogType property value. One of UserManaged or ServiceDefault. +func (m *AccessPackageCatalog) GetCatalogType()(*string) { + return m.catalogType +} +// GetCreatedBy gets the createdBy property value. UPN of the user who created this resource. Read-only. +func (m *AccessPackageCatalog) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageCatalog) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomAccessPackageWorkflowExtensions gets the customAccessPackageWorkflowExtensions property value. The customAccessPackageWorkflowExtensions property +func (m *AccessPackageCatalog) GetCustomAccessPackageWorkflowExtensions()([]CustomAccessPackageWorkflowExtensionable) { + return m.customAccessPackageWorkflowExtensions +} +// GetDescription gets the description property value. The description of the access package catalog. +func (m *AccessPackageCatalog) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the access package catalog. Supports $filter (eq, contains). +func (m *AccessPackageCatalog) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageCatalog) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResourceRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleable) + } + m.SetAccessPackageResourceRoles(res) + } + return nil + } + res["accessPackageResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceable) + } + m.SetAccessPackageResources(res) + } + return nil + } + res["accessPackageResourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceScopeable) + } + m.SetAccessPackageResourceScopes(res) + } + return nil + } + res["accessPackages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageable) + } + m.SetAccessPackages(res) + } + return nil + } + res["catalogStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCatalogStatus(val) + } + return nil + } + res["catalogType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCatalogType(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customAccessPackageWorkflowExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomAccessPackageWorkflowExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomAccessPackageWorkflowExtensionable, len(val)) + for i, v := range val { + res[i] = v.(CustomAccessPackageWorkflowExtensionable) + } + m.SetCustomAccessPackageWorkflowExtensions(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isExternallyVisible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsExternallyVisible(val) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + return res +} +// GetIsExternallyVisible gets the isExternallyVisible property value. Whether the access packages in this catalog can be requested by users outside of the tenant. +func (m *AccessPackageCatalog) GetIsExternallyVisible()(*bool) { + return m.isExternallyVisible +} +// GetModifiedBy gets the modifiedBy property value. The UPN of the user who last modified this resource. Read-only. +func (m *AccessPackageCatalog) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageCatalog) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// Serialize serializes information the current object +func (m *AccessPackageCatalog) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessPackageResourceRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceRoles())) + for i, v := range m.GetAccessPackageResourceRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceRoles", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResources())) + for i, v := range m.GetAccessPackageResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResources", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceScopes())) + for i, v := range m.GetAccessPackageResourceScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceScopes", cast) + if err != nil { + return err + } + } + if m.GetAccessPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackages())) + for i, v := range m.GetAccessPackages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("catalogStatus", m.GetCatalogStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("catalogType", m.GetCatalogType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustomAccessPackageWorkflowExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomAccessPackageWorkflowExtensions())) + for i, v := range m.GetCustomAccessPackageWorkflowExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customAccessPackageWorkflowExtensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isExternallyVisible", m.GetIsExternallyVisible()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResourceRoles sets the accessPackageResourceRoles property value. The roles in each resource in a catalog. Read-only. +func (m *AccessPackageCatalog) SetAccessPackageResourceRoles(value []AccessPackageResourceRoleable)() { + m.accessPackageResourceRoles = value +} +// SetAccessPackageResources sets the accessPackageResources property value. The accessPackageResources property +func (m *AccessPackageCatalog) SetAccessPackageResources(value []AccessPackageResourceable)() { + m.accessPackageResources = value +} +// SetAccessPackageResourceScopes sets the accessPackageResourceScopes property value. The accessPackageResourceScopes property +func (m *AccessPackageCatalog) SetAccessPackageResourceScopes(value []AccessPackageResourceScopeable)() { + m.accessPackageResourceScopes = value +} +// SetAccessPackages sets the accessPackages property value. The access packages in this catalog. Read-only. Nullable. Supports $expand. +func (m *AccessPackageCatalog) SetAccessPackages(value []AccessPackageable)() { + m.accessPackages = value +} +// SetCatalogStatus sets the catalogStatus property value. Has the value Published if the access packages are available for management. +func (m *AccessPackageCatalog) SetCatalogStatus(value *string)() { + m.catalogStatus = value +} +// SetCatalogType sets the catalogType property value. One of UserManaged or ServiceDefault. +func (m *AccessPackageCatalog) SetCatalogType(value *string)() { + m.catalogType = value +} +// SetCreatedBy sets the createdBy property value. UPN of the user who created this resource. Read-only. +func (m *AccessPackageCatalog) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageCatalog) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomAccessPackageWorkflowExtensions sets the customAccessPackageWorkflowExtensions property value. The customAccessPackageWorkflowExtensions property +func (m *AccessPackageCatalog) SetCustomAccessPackageWorkflowExtensions(value []CustomAccessPackageWorkflowExtensionable)() { + m.customAccessPackageWorkflowExtensions = value +} +// SetDescription sets the description property value. The description of the access package catalog. +func (m *AccessPackageCatalog) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the access package catalog. Supports $filter (eq, contains). +func (m *AccessPackageCatalog) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsExternallyVisible sets the isExternallyVisible property value. Whether the access packages in this catalog can be requested by users outside of the tenant. +func (m *AccessPackageCatalog) SetIsExternallyVisible(value *bool)() { + m.isExternallyVisible = value +} +// SetModifiedBy sets the modifiedBy property value. The UPN of the user who last modified this resource. Read-only. +func (m *AccessPackageCatalog) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageCatalog) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_response.go new file mode 100644 index 000000000..302fea8ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCatalogCollectionResponse +type AccessPackageCatalogCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageCatalogable +} +// NewAccessPackageCatalogCollectionResponse instantiates a new AccessPackageCatalogCollectionResponse and sets the default values. +func NewAccessPackageCatalogCollectionResponse()(*AccessPackageCatalogCollectionResponse) { + m := &AccessPackageCatalogCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageCatalogCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageCatalogCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageCatalogCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageCatalogCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageCatalogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageCatalogable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageCatalogable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageCatalogCollectionResponse) GetValue()([]AccessPackageCatalogable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageCatalogCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageCatalogCollectionResponse) SetValue(value []AccessPackageCatalogable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_responseable.go new file mode 100644 index 000000000..5aed1a559 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_catalog_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCatalogCollectionResponseable +type AccessPackageCatalogCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageCatalogable) + SetValue(value []AccessPackageCatalogable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_catalogable.go b/src/internal/connector/graph/betasdk/models/access_package_catalogable.go new file mode 100644 index 000000000..b188bd46c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_catalogable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCatalogable +type AccessPackageCatalogable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResourceRoles()([]AccessPackageResourceRoleable) + GetAccessPackageResources()([]AccessPackageResourceable) + GetAccessPackageResourceScopes()([]AccessPackageResourceScopeable) + GetAccessPackages()([]AccessPackageable) + GetCatalogStatus()(*string) + GetCatalogType()(*string) + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomAccessPackageWorkflowExtensions()([]CustomAccessPackageWorkflowExtensionable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsExternallyVisible()(*bool) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccessPackageResourceRoles(value []AccessPackageResourceRoleable)() + SetAccessPackageResources(value []AccessPackageResourceable)() + SetAccessPackageResourceScopes(value []AccessPackageResourceScopeable)() + SetAccessPackages(value []AccessPackageable)() + SetCatalogStatus(value *string)() + SetCatalogType(value *string)() + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomAccessPackageWorkflowExtensions(value []CustomAccessPackageWorkflowExtensionable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsExternallyVisible(value *bool)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_collection_response.go new file mode 100644 index 000000000..80ff3c6ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCollectionResponse +type AccessPackageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageable +} +// NewAccessPackageCollectionResponse instantiates a new AccessPackageCollectionResponse and sets the default values. +func NewAccessPackageCollectionResponse()(*AccessPackageCollectionResponse) { + m := &AccessPackageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageCollectionResponse) GetValue()([]AccessPackageable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageCollectionResponse) SetValue(value []AccessPackageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_collection_responseable.go new file mode 100644 index 000000000..3452dccb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageCollectionResponseable +type AccessPackageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageable) + SetValue(value []AccessPackageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_custom_extension_handler_status.go b/src/internal/connector/graph/betasdk/models/access_package_custom_extension_handler_status.go new file mode 100644 index 000000000..0c546bb33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_custom_extension_handler_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageCustomExtensionHandlerStatus int + +const ( + REQUESTSENT_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS AccessPackageCustomExtensionHandlerStatus = iota + REQUESTRECEIVED_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS + UNKNOWNFUTUREVALUE_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS +) + +func (i AccessPackageCustomExtensionHandlerStatus) String() string { + return []string{"requestSent", "requestReceived", "unknownFutureValue"}[i] +} +func ParseAccessPackageCustomExtensionHandlerStatus(v string) (interface{}, error) { + result := REQUESTSENT_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS + switch v { + case "requestSent": + result = REQUESTSENT_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS + case "requestReceived": + result = REQUESTRECEIVED_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSPACKAGECUSTOMEXTENSIONHANDLERSTATUS + default: + return 0, errors.New("Unknown AccessPackageCustomExtensionHandlerStatus value: " + v) + } + return &result, nil +} +func SerializeAccessPackageCustomExtensionHandlerStatus(values []AccessPackageCustomExtensionHandlerStatus) []string { + 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/access_package_custom_extension_stage.go b/src/internal/connector/graph/betasdk/models/access_package_custom_extension_stage.go new file mode 100644 index 000000000..dd54b521a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_custom_extension_stage.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageCustomExtensionStage int + +const ( + ASSIGNMENTREQUESTCREATED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE AccessPackageCustomExtensionStage = iota + ASSIGNMENTREQUESTAPPROVED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + ASSIGNMENTREQUESTGRANTED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + ASSIGNMENTREQUESTREMOVED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + ASSIGNMENTFOURTEENDAYSBEFOREEXPIRATION_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + ASSIGNMENTONEDAYBEFOREEXPIRATION_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + UNKNOWNFUTUREVALUE_ACCESSPACKAGECUSTOMEXTENSIONSTAGE +) + +func (i AccessPackageCustomExtensionStage) String() string { + return []string{"assignmentRequestCreated", "assignmentRequestApproved", "assignmentRequestGranted", "assignmentRequestRemoved", "assignmentFourteenDaysBeforeExpiration", "assignmentOneDayBeforeExpiration", "unknownFutureValue"}[i] +} +func ParseAccessPackageCustomExtensionStage(v string) (interface{}, error) { + result := ASSIGNMENTREQUESTCREATED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + switch v { + case "assignmentRequestCreated": + result = ASSIGNMENTREQUESTCREATED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "assignmentRequestApproved": + result = ASSIGNMENTREQUESTAPPROVED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "assignmentRequestGranted": + result = ASSIGNMENTREQUESTGRANTED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "assignmentRequestRemoved": + result = ASSIGNMENTREQUESTREMOVED_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "assignmentFourteenDaysBeforeExpiration": + result = ASSIGNMENTFOURTEENDAYSBEFOREEXPIRATION_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "assignmentOneDayBeforeExpiration": + result = ASSIGNMENTONEDAYBEFOREEXPIRATION_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSPACKAGECUSTOMEXTENSIONSTAGE + default: + return 0, errors.New("Unknown AccessPackageCustomExtensionStage value: " + v) + } + return &result, nil +} +func SerializeAccessPackageCustomExtensionStage(values []AccessPackageCustomExtensionStage) []string { + 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/access_package_localized_content.go b/src/internal/connector/graph/betasdk/models/access_package_localized_content.go new file mode 100644 index 000000000..e17f8bde6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_content.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedContent +type AccessPackageLocalizedContent 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 fallback string, which is used when a requested localization is not available. Required. + defaultText *string + // Content represented in a format for a specific locale. + localizedTexts []AccessPackageLocalizedTextable + // The OdataType property + odataType *string +} +// NewAccessPackageLocalizedContent instantiates a new accessPackageLocalizedContent and sets the default values. +func NewAccessPackageLocalizedContent()(*AccessPackageLocalizedContent) { + m := &AccessPackageLocalizedContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageLocalizedContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageLocalizedContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageLocalizedContent(), 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 *AccessPackageLocalizedContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultText gets the defaultText property value. The fallback string, which is used when a requested localization is not available. Required. +func (m *AccessPackageLocalizedContent) GetDefaultText()(*string) { + return m.defaultText +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageLocalizedContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultText(val) + } + return nil + } + res["localizedTexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageLocalizedTextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageLocalizedTextable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageLocalizedTextable) + } + m.SetLocalizedTexts(res) + } + 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 + } + return res +} +// GetLocalizedTexts gets the localizedTexts property value. Content represented in a format for a specific locale. +func (m *AccessPackageLocalizedContent) GetLocalizedTexts()([]AccessPackageLocalizedTextable) { + return m.localizedTexts +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageLocalizedContent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageLocalizedContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultText", m.GetDefaultText()) + if err != nil { + return err + } + } + if m.GetLocalizedTexts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizedTexts())) + for i, v := range m.GetLocalizedTexts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("localizedTexts", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessPackageLocalizedContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultText sets the defaultText property value. The fallback string, which is used when a requested localization is not available. Required. +func (m *AccessPackageLocalizedContent) SetDefaultText(value *string)() { + m.defaultText = value +} +// SetLocalizedTexts sets the localizedTexts property value. Content represented in a format for a specific locale. +func (m *AccessPackageLocalizedContent) SetLocalizedTexts(value []AccessPackageLocalizedTextable)() { + m.localizedTexts = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageLocalizedContent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_localized_contentable.go b/src/internal/connector/graph/betasdk/models/access_package_localized_contentable.go new file mode 100644 index 000000000..9b04bd364 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_contentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedContentable +type AccessPackageLocalizedContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultText()(*string) + GetLocalizedTexts()([]AccessPackageLocalizedTextable) + GetOdataType()(*string) + SetDefaultText(value *string)() + SetLocalizedTexts(value []AccessPackageLocalizedTextable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_localized_text.go b/src/internal/connector/graph/betasdk/models/access_package_localized_text.go new file mode 100644 index 000000000..c8e2ac440 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_text.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedText +type AccessPackageLocalizedText 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 ISO code for the intended language. Required. + languageCode *string + // The OdataType property + odataType *string + // The text in the specific language. Required. + text *string +} +// NewAccessPackageLocalizedText instantiates a new accessPackageLocalizedText and sets the default values. +func NewAccessPackageLocalizedText()(*AccessPackageLocalizedText) { + m := &AccessPackageLocalizedText{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageLocalizedTextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageLocalizedTextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageLocalizedText(), 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 *AccessPackageLocalizedText) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageLocalizedText) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["languageCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageCode(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["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetLanguageCode gets the languageCode property value. The ISO code for the intended language. Required. +func (m *AccessPackageLocalizedText) GetLanguageCode()(*string) { + return m.languageCode +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageLocalizedText) GetOdataType()(*string) { + return m.odataType +} +// GetText gets the text property value. The text in the specific language. Required. +func (m *AccessPackageLocalizedText) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *AccessPackageLocalizedText) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("languageCode", m.GetLanguageCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + 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 *AccessPackageLocalizedText) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLanguageCode sets the languageCode property value. The ISO code for the intended language. Required. +func (m *AccessPackageLocalizedText) SetLanguageCode(value *string)() { + m.languageCode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageLocalizedText) SetOdataType(value *string)() { + m.odataType = value +} +// SetText sets the text property value. The text in the specific language. Required. +func (m *AccessPackageLocalizedText) SetText(value *string)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_response.go new file mode 100644 index 000000000..661bb71f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedTextCollectionResponse +type AccessPackageLocalizedTextCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageLocalizedTextable +} +// NewAccessPackageLocalizedTextCollectionResponse instantiates a new AccessPackageLocalizedTextCollectionResponse and sets the default values. +func NewAccessPackageLocalizedTextCollectionResponse()(*AccessPackageLocalizedTextCollectionResponse) { + m := &AccessPackageLocalizedTextCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageLocalizedTextCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageLocalizedTextCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageLocalizedTextCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageLocalizedTextCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageLocalizedTextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageLocalizedTextable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageLocalizedTextable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageLocalizedTextCollectionResponse) GetValue()([]AccessPackageLocalizedTextable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageLocalizedTextCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageLocalizedTextCollectionResponse) SetValue(value []AccessPackageLocalizedTextable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_responseable.go new file mode 100644 index 000000000..31653f4b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_text_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedTextCollectionResponseable +type AccessPackageLocalizedTextCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageLocalizedTextable) + SetValue(value []AccessPackageLocalizedTextable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_localized_textable.go b/src/internal/connector/graph/betasdk/models/access_package_localized_textable.go new file mode 100644 index 000000000..4737b7051 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_localized_textable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageLocalizedTextable +type AccessPackageLocalizedTextable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguageCode()(*string) + GetOdataType()(*string) + GetText()(*string) + SetLanguageCode(value *string)() + SetOdataType(value *string)() + SetText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_question.go b/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_question.go new file mode 100644 index 000000000..aa622c4fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_question.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageMultipleChoiceQuestion +type AccessPackageMultipleChoiceQuestion struct { + AccessPackageQuestion + // Indicates whether requestor can select multiple choices as their answer. + allowsMultipleSelection *bool + // List of answer choices. + choices []AccessPackageAnswerChoiceable +} +// NewAccessPackageMultipleChoiceQuestion instantiates a new AccessPackageMultipleChoiceQuestion and sets the default values. +func NewAccessPackageMultipleChoiceQuestion()(*AccessPackageMultipleChoiceQuestion) { + m := &AccessPackageMultipleChoiceQuestion{ + AccessPackageQuestion: *NewAccessPackageQuestion(), + } + odataTypeValue := "#microsoft.graph.accessPackageMultipleChoiceQuestion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessPackageMultipleChoiceQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageMultipleChoiceQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageMultipleChoiceQuestion(), nil +} +// GetAllowsMultipleSelection gets the allowsMultipleSelection property value. Indicates whether requestor can select multiple choices as their answer. +func (m *AccessPackageMultipleChoiceQuestion) GetAllowsMultipleSelection()(*bool) { + return m.allowsMultipleSelection +} +// GetChoices gets the choices property value. List of answer choices. +func (m *AccessPackageMultipleChoiceQuestion) GetChoices()([]AccessPackageAnswerChoiceable) { + return m.choices +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageMultipleChoiceQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessPackageQuestion.GetFieldDeserializers() + res["allowsMultipleSelection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsMultipleSelection(val) + } + return nil + } + res["choices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAnswerChoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAnswerChoiceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAnswerChoiceable) + } + m.SetChoices(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AccessPackageMultipleChoiceQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessPackageQuestion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowsMultipleSelection", m.GetAllowsMultipleSelection()) + if err != nil { + return err + } + } + if m.GetChoices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChoices())) + for i, v := range m.GetChoices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("choices", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowsMultipleSelection sets the allowsMultipleSelection property value. Indicates whether requestor can select multiple choices as their answer. +func (m *AccessPackageMultipleChoiceQuestion) SetAllowsMultipleSelection(value *bool)() { + m.allowsMultipleSelection = value +} +// SetChoices sets the choices property value. List of answer choices. +func (m *AccessPackageMultipleChoiceQuestion) SetChoices(value []AccessPackageAnswerChoiceable)() { + m.choices = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_questionable.go b/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_questionable.go new file mode 100644 index 000000000..b15409573 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_multiple_choice_questionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageMultipleChoiceQuestionable +type AccessPackageMultipleChoiceQuestionable interface { + AccessPackageQuestionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsMultipleSelection()(*bool) + GetChoices()([]AccessPackageAnswerChoiceable) + SetAllowsMultipleSelection(value *bool)() + SetChoices(value []AccessPackageAnswerChoiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_question.go b/src/internal/connector/graph/betasdk/models/access_package_question.go new file mode 100644 index 000000000..f5164262c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_question.go @@ -0,0 +1,221 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageQuestion +type AccessPackageQuestion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // ID of the question. + id *string + // Specifies whether the requestor is allowed to edit answers to questions. + isAnswerEditable *bool + // Whether the requestor is required to supply an answer or not. + isRequired *bool + // The OdataType property + odataType *string + // Relative position of this question when displaying a list of questions to the requestor. + sequence *int32 + // The text of the question to show to the requestor. + text AccessPackageLocalizedContentable +} +// NewAccessPackageQuestion instantiates a new accessPackageQuestion and sets the default values. +func NewAccessPackageQuestion()(*AccessPackageQuestion) { + m := &AccessPackageQuestion{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessPackageMultipleChoiceQuestion": + return NewAccessPackageMultipleChoiceQuestion(), nil + case "#microsoft.graph.accessPackageTextInputQuestion": + return NewAccessPackageTextInputQuestion(), nil + } + } + } + } + return NewAccessPackageQuestion(), 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 *AccessPackageQuestion) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isAnswerEditable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAnswerEditable(val) + } + return nil + } + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(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["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageLocalizedContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetText(val.(AccessPackageLocalizedContentable)) + } + return nil + } + return res +} +// GetId gets the id property value. ID of the question. +func (m *AccessPackageQuestion) GetId()(*string) { + return m.id +} +// GetIsAnswerEditable gets the isAnswerEditable property value. Specifies whether the requestor is allowed to edit answers to questions. +func (m *AccessPackageQuestion) GetIsAnswerEditable()(*bool) { + return m.isAnswerEditable +} +// GetIsRequired gets the isRequired property value. Whether the requestor is required to supply an answer or not. +func (m *AccessPackageQuestion) GetIsRequired()(*bool) { + return m.isRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageQuestion) GetOdataType()(*string) { + return m.odataType +} +// GetSequence gets the sequence property value. Relative position of this question when displaying a list of questions to the requestor. +func (m *AccessPackageQuestion) GetSequence()(*int32) { + return m.sequence +} +// GetText gets the text property value. The text of the question to show to the requestor. +func (m *AccessPackageQuestion) GetText()(AccessPackageLocalizedContentable) { + return m.text +} +// Serialize serializes information the current object +func (m *AccessPackageQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAnswerEditable", m.GetIsAnswerEditable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("text", m.GetText()) + 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 *AccessPackageQuestion) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. ID of the question. +func (m *AccessPackageQuestion) SetId(value *string)() { + m.id = value +} +// SetIsAnswerEditable sets the isAnswerEditable property value. Specifies whether the requestor is allowed to edit answers to questions. +func (m *AccessPackageQuestion) SetIsAnswerEditable(value *bool)() { + m.isAnswerEditable = value +} +// SetIsRequired sets the isRequired property value. Whether the requestor is required to supply an answer or not. +func (m *AccessPackageQuestion) SetIsRequired(value *bool)() { + m.isRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageQuestion) SetOdataType(value *string)() { + m.odataType = value +} +// SetSequence sets the sequence property value. Relative position of this question when displaying a list of questions to the requestor. +func (m *AccessPackageQuestion) SetSequence(value *int32)() { + m.sequence = value +} +// SetText sets the text property value. The text of the question to show to the requestor. +func (m *AccessPackageQuestion) SetText(value AccessPackageLocalizedContentable)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_question_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_question_collection_response.go new file mode 100644 index 000000000..375820a58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_question_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageQuestionCollectionResponse +type AccessPackageQuestionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageQuestionable +} +// NewAccessPackageQuestionCollectionResponse instantiates a new AccessPackageQuestionCollectionResponse and sets the default values. +func NewAccessPackageQuestionCollectionResponse()(*AccessPackageQuestionCollectionResponse) { + m := &AccessPackageQuestionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageQuestionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageQuestionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageQuestionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageQuestionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageQuestionable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageQuestionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageQuestionCollectionResponse) GetValue()([]AccessPackageQuestionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageQuestionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageQuestionCollectionResponse) SetValue(value []AccessPackageQuestionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_question_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_question_collection_responseable.go new file mode 100644 index 000000000..61a2ffd9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_question_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageQuestionCollectionResponseable +type AccessPackageQuestionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageQuestionable) + SetValue(value []AccessPackageQuestionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_questionable.go b/src/internal/connector/graph/betasdk/models/access_package_questionable.go new file mode 100644 index 000000000..f9f2e969e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_questionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageQuestionable +type AccessPackageQuestionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetIsAnswerEditable()(*bool) + GetIsRequired()(*bool) + GetOdataType()(*string) + GetSequence()(*int32) + GetText()(AccessPackageLocalizedContentable) + SetId(value *string)() + SetIsAnswerEditable(value *bool)() + SetIsRequired(value *bool)() + SetOdataType(value *string)() + SetSequence(value *int32)() + SetText(value AccessPackageLocalizedContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource.go b/src/internal/connector/graph/betasdk/models/access_package_resource.go new file mode 100644 index 000000000..30f1af35a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource.go @@ -0,0 +1,397 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResource +type AccessPackageResource struct { + Entity + // Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment's originId.Supports $expand. + accessPackageResourceEnvironment AccessPackageResourceEnvironmentable + // Read-only. Nullable. Supports $expand. + accessPackageResourceRoles []AccessPackageResourceRoleable + // Read-only. Nullable. Supports $expand. + accessPackageResourceScopes []AccessPackageResourceScopeable + // The name of the user or application that first added this resource. Read-only. + addedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + addedOn *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains information about the attributes to be collected from the requestor and sent to the resource application. + attributes []AccessPackageResourceAttributeable + // A description for the resource. + description *string + // The display name of the resource, such as the application name, group name or site name. + displayName *string + // True if the resource is not yet available for assignment. Read-only. + isPendingOnboarding *bool + // The unique identifier of the resource in the origin system. In the case of an Azure AD group, this is the identifier of the group. + originId *string + // The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. + originSystem *string + // The type of the resource, such as Application if it is an Azure AD connected application, or SharePoint Online Site for a SharePoint Online site. + resourceType *string + // A unique resource locator for the resource, such as the URL for signing a user into an application. + url *string +} +// NewAccessPackageResource instantiates a new accessPackageResource and sets the default values. +func NewAccessPackageResource()(*AccessPackageResource) { + m := &AccessPackageResource{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResource(), nil +} +// GetAccessPackageResourceEnvironment gets the accessPackageResourceEnvironment property value. Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment's originId.Supports $expand. +func (m *AccessPackageResource) GetAccessPackageResourceEnvironment()(AccessPackageResourceEnvironmentable) { + return m.accessPackageResourceEnvironment +} +// GetAccessPackageResourceRoles gets the accessPackageResourceRoles property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResource) GetAccessPackageResourceRoles()([]AccessPackageResourceRoleable) { + return m.accessPackageResourceRoles +} +// GetAccessPackageResourceScopes gets the accessPackageResourceScopes property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResource) GetAccessPackageResourceScopes()([]AccessPackageResourceScopeable) { + return m.accessPackageResourceScopes +} +// GetAddedBy gets the addedBy property value. The name of the user or application that first added this resource. Read-only. +func (m *AccessPackageResource) GetAddedBy()(*string) { + return m.addedBy +} +// GetAddedOn gets the addedOn property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageResource) GetAddedOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.addedOn +} +// GetAttributes gets the attributes property value. Contains information about the attributes to be collected from the requestor and sent to the resource application. +func (m *AccessPackageResource) GetAttributes()([]AccessPackageResourceAttributeable) { + return m.attributes +} +// GetDescription gets the description property value. A description for the resource. +func (m *AccessPackageResource) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the resource, such as the application name, group name or site name. +func (m *AccessPackageResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResourceEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceEnvironmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResourceEnvironment(val.(AccessPackageResourceEnvironmentable)) + } + return nil + } + res["accessPackageResourceRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleable) + } + m.SetAccessPackageResourceRoles(res) + } + return nil + } + res["accessPackageResourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceScopeable) + } + m.SetAccessPackageResourceScopes(res) + } + return nil + } + res["addedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedBy(val) + } + return nil + } + res["addedOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedOn(val) + } + return nil + } + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceAttributeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceAttributeable) + } + m.SetAttributes(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isPendingOnboarding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPendingOnboarding(val) + } + return nil + } + res["originId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginId(val) + } + return nil + } + res["originSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginSystem(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetIsPendingOnboarding gets the isPendingOnboarding property value. True if the resource is not yet available for assignment. Read-only. +func (m *AccessPackageResource) GetIsPendingOnboarding()(*bool) { + return m.isPendingOnboarding +} +// GetOriginId gets the originId property value. The unique identifier of the resource in the origin system. In the case of an Azure AD group, this is the identifier of the group. +func (m *AccessPackageResource) GetOriginId()(*string) { + return m.originId +} +// GetOriginSystem gets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. +func (m *AccessPackageResource) GetOriginSystem()(*string) { + return m.originSystem +} +// GetResourceType gets the resourceType property value. The type of the resource, such as Application if it is an Azure AD connected application, or SharePoint Online Site for a SharePoint Online site. +func (m *AccessPackageResource) GetResourceType()(*string) { + return m.resourceType +} +// GetUrl gets the url property value. A unique resource locator for the resource, such as the URL for signing a user into an application. +func (m *AccessPackageResource) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AccessPackageResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackageResourceEnvironment", m.GetAccessPackageResourceEnvironment()) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceRoles())) + for i, v := range m.GetAccessPackageResourceRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceRoles", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceScopes())) + for i, v := range m.GetAccessPackageResourceScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceScopes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("addedBy", m.GetAddedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("addedOn", m.GetAddedOn()) + if err != nil { + return err + } + } + if m.GetAttributes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttributes())) + for i, v := range m.GetAttributes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attributes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPendingOnboarding", m.GetIsPendingOnboarding()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originId", m.GetOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originSystem", m.GetOriginSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceType", m.GetResourceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResourceEnvironment sets the accessPackageResourceEnvironment property value. Contains the environment information for the resource. This can be set using either the @odata.bind annotation or the environment's originId.Supports $expand. +func (m *AccessPackageResource) SetAccessPackageResourceEnvironment(value AccessPackageResourceEnvironmentable)() { + m.accessPackageResourceEnvironment = value +} +// SetAccessPackageResourceRoles sets the accessPackageResourceRoles property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResource) SetAccessPackageResourceRoles(value []AccessPackageResourceRoleable)() { + m.accessPackageResourceRoles = value +} +// SetAccessPackageResourceScopes sets the accessPackageResourceScopes property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResource) SetAccessPackageResourceScopes(value []AccessPackageResourceScopeable)() { + m.accessPackageResourceScopes = value +} +// SetAddedBy sets the addedBy property value. The name of the user or application that first added this resource. Read-only. +func (m *AccessPackageResource) SetAddedBy(value *string)() { + m.addedBy = value +} +// SetAddedOn sets the addedOn property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessPackageResource) SetAddedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.addedOn = value +} +// SetAttributes sets the attributes property value. Contains information about the attributes to be collected from the requestor and sent to the resource application. +func (m *AccessPackageResource) SetAttributes(value []AccessPackageResourceAttributeable)() { + m.attributes = value +} +// SetDescription sets the description property value. A description for the resource. +func (m *AccessPackageResource) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the resource, such as the application name, group name or site name. +func (m *AccessPackageResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsPendingOnboarding sets the isPendingOnboarding property value. True if the resource is not yet available for assignment. Read-only. +func (m *AccessPackageResource) SetIsPendingOnboarding(value *bool)() { + m.isPendingOnboarding = value +} +// SetOriginId sets the originId property value. The unique identifier of the resource in the origin system. In the case of an Azure AD group, this is the identifier of the group. +func (m *AccessPackageResource) SetOriginId(value *string)() { + m.originId = value +} +// SetOriginSystem sets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. +func (m *AccessPackageResource) SetOriginSystem(value *string)() { + m.originSystem = value +} +// SetResourceType sets the resourceType property value. The type of the resource, such as Application if it is an Azure AD connected application, or SharePoint Online Site for a SharePoint Online site. +func (m *AccessPackageResource) SetResourceType(value *string)() { + m.resourceType = value +} +// SetUrl sets the url property value. A unique resource locator for the resource, such as the URL for signing a user into an application. +func (m *AccessPackageResource) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute.go new file mode 100644 index 000000000..0a1f13007 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttribute +type AccessPackageResourceAttribute struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Information about how to set the attribute, currently a accessPackageUserDirectoryAttributeStore object type. + attributeDestination AccessPackageResourceAttributeDestinationable + // The name of the attribute in the end system. If the destination is accessPackageUserDirectoryAttributeStore, then a user property such as jobTitle or a directory schema extension for the user object type, such as extension_2b676109c7c74ae2b41549205f1947ed_personalTitle. + attributeName *string + // Information about how to populate the attribute value when an accessPackageAssignmentRequest is being fulfilled, currently a accessPackageResourceAttributeQuestion object type. + attributeSource AccessPackageResourceAttributeSourceable + // Unique identifier for the attribute on the access package resource. Read-only. + id *string + // Specifies whether or not an existing attribute value can be edited by the requester. + isEditable *bool + // Specifies whether the attribute will remain in the end system after an assignment ends. + isPersistedOnAssignmentRemoval *bool + // The OdataType property + odataType *string +} +// NewAccessPackageResourceAttribute instantiates a new accessPackageResourceAttribute and sets the default values. +func NewAccessPackageResourceAttribute()(*AccessPackageResourceAttribute) { + m := &AccessPackageResourceAttribute{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageResourceAttributeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceAttributeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceAttribute(), 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 *AccessPackageResourceAttribute) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttributeDestination gets the attributeDestination property value. Information about how to set the attribute, currently a accessPackageUserDirectoryAttributeStore object type. +func (m *AccessPackageResourceAttribute) GetAttributeDestination()(AccessPackageResourceAttributeDestinationable) { + return m.attributeDestination +} +// GetAttributeName gets the attributeName property value. The name of the attribute in the end system. If the destination is accessPackageUserDirectoryAttributeStore, then a user property such as jobTitle or a directory schema extension for the user object type, such as extension_2b676109c7c74ae2b41549205f1947ed_personalTitle. +func (m *AccessPackageResourceAttribute) GetAttributeName()(*string) { + return m.attributeName +} +// GetAttributeSource gets the attributeSource property value. Information about how to populate the attribute value when an accessPackageAssignmentRequest is being fulfilled, currently a accessPackageResourceAttributeQuestion object type. +func (m *AccessPackageResourceAttribute) GetAttributeSource()(AccessPackageResourceAttributeSourceable) { + return m.attributeSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceAttribute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributeDestination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceAttributeDestinationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributeDestination(val.(AccessPackageResourceAttributeDestinationable)) + } + return nil + } + res["attributeName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAttributeName(val) + } + return nil + } + res["attributeSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceAttributeSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttributeSource(val.(AccessPackageResourceAttributeSourceable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isEditable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEditable(val) + } + return nil + } + res["isPersistedOnAssignmentRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPersistedOnAssignmentRemoval(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 + } + return res +} +// GetId gets the id property value. Unique identifier for the attribute on the access package resource. Read-only. +func (m *AccessPackageResourceAttribute) GetId()(*string) { + return m.id +} +// GetIsEditable gets the isEditable property value. Specifies whether or not an existing attribute value can be edited by the requester. +func (m *AccessPackageResourceAttribute) GetIsEditable()(*bool) { + return m.isEditable +} +// GetIsPersistedOnAssignmentRemoval gets the isPersistedOnAssignmentRemoval property value. Specifies whether the attribute will remain in the end system after an assignment ends. +func (m *AccessPackageResourceAttribute) GetIsPersistedOnAssignmentRemoval()(*bool) { + return m.isPersistedOnAssignmentRemoval +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttribute) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageResourceAttribute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attributeDestination", m.GetAttributeDestination()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("attributeName", m.GetAttributeName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("attributeSource", m.GetAttributeSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEditable", m.GetIsEditable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPersistedOnAssignmentRemoval", m.GetIsPersistedOnAssignmentRemoval()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessPackageResourceAttribute) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttributeDestination sets the attributeDestination property value. Information about how to set the attribute, currently a accessPackageUserDirectoryAttributeStore object type. +func (m *AccessPackageResourceAttribute) SetAttributeDestination(value AccessPackageResourceAttributeDestinationable)() { + m.attributeDestination = value +} +// SetAttributeName sets the attributeName property value. The name of the attribute in the end system. If the destination is accessPackageUserDirectoryAttributeStore, then a user property such as jobTitle or a directory schema extension for the user object type, such as extension_2b676109c7c74ae2b41549205f1947ed_personalTitle. +func (m *AccessPackageResourceAttribute) SetAttributeName(value *string)() { + m.attributeName = value +} +// SetAttributeSource sets the attributeSource property value. Information about how to populate the attribute value when an accessPackageAssignmentRequest is being fulfilled, currently a accessPackageResourceAttributeQuestion object type. +func (m *AccessPackageResourceAttribute) SetAttributeSource(value AccessPackageResourceAttributeSourceable)() { + m.attributeSource = value +} +// SetId sets the id property value. Unique identifier for the attribute on the access package resource. Read-only. +func (m *AccessPackageResourceAttribute) SetId(value *string)() { + m.id = value +} +// SetIsEditable sets the isEditable property value. Specifies whether or not an existing attribute value can be edited by the requester. +func (m *AccessPackageResourceAttribute) SetIsEditable(value *bool)() { + m.isEditable = value +} +// SetIsPersistedOnAssignmentRemoval sets the isPersistedOnAssignmentRemoval property value. Specifies whether the attribute will remain in the end system after an assignment ends. +func (m *AccessPackageResourceAttribute) SetIsPersistedOnAssignmentRemoval(value *bool)() { + m.isPersistedOnAssignmentRemoval = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttribute) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_response.go new file mode 100644 index 000000000..757068975 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeCollectionResponse +type AccessPackageResourceAttributeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceAttributeable +} +// NewAccessPackageResourceAttributeCollectionResponse instantiates a new AccessPackageResourceAttributeCollectionResponse and sets the default values. +func NewAccessPackageResourceAttributeCollectionResponse()(*AccessPackageResourceAttributeCollectionResponse) { + m := &AccessPackageResourceAttributeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceAttributeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceAttributeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceAttributeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceAttributeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceAttributeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceAttributeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceAttributeCollectionResponse) GetValue()([]AccessPackageResourceAttributeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceAttributeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceAttributeCollectionResponse) SetValue(value []AccessPackageResourceAttributeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_responseable.go new file mode 100644 index 000000000..cb5599798 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeCollectionResponseable +type AccessPackageResourceAttributeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceAttributeable) + SetValue(value []AccessPackageResourceAttributeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destination.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destination.go new file mode 100644 index 000000000..85c1538f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destination.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeDestination +type AccessPackageResourceAttributeDestination 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 OdataType property + odataType *string +} +// NewAccessPackageResourceAttributeDestination instantiates a new accessPackageResourceAttributeDestination and sets the default values. +func NewAccessPackageResourceAttributeDestination()(*AccessPackageResourceAttributeDestination) { + m := &AccessPackageResourceAttributeDestination{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageResourceAttributeDestinationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceAttributeDestinationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessPackageUserDirectoryAttributeStore": + return NewAccessPackageUserDirectoryAttributeStore(), nil + } + } + } + } + return NewAccessPackageResourceAttributeDestination(), 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 *AccessPackageResourceAttributeDestination) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceAttributeDestination) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttributeDestination) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageResourceAttributeDestination) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessPackageResourceAttributeDestination) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttributeDestination) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destinationable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destinationable.go new file mode 100644 index 000000000..b7f0ff632 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_destinationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeDestinationable +type AccessPackageResourceAttributeDestinationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_question.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_question.go new file mode 100644 index 000000000..f9ac21e2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_question.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeQuestion +type AccessPackageResourceAttributeQuestion struct { + AccessPackageResourceAttributeSource + // The question asked in order to get the value of the attribute + question AccessPackageQuestionable +} +// NewAccessPackageResourceAttributeQuestion instantiates a new AccessPackageResourceAttributeQuestion and sets the default values. +func NewAccessPackageResourceAttributeQuestion()(*AccessPackageResourceAttributeQuestion) { + m := &AccessPackageResourceAttributeQuestion{ + AccessPackageResourceAttributeSource: *NewAccessPackageResourceAttributeSource(), + } + odataTypeValue := "#microsoft.graph.accessPackageResourceAttributeQuestion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessPackageResourceAttributeQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceAttributeQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceAttributeQuestion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceAttributeQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessPackageResourceAttributeSource.GetFieldDeserializers() + res["question"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQuestion(val.(AccessPackageQuestionable)) + } + return nil + } + return res +} +// GetQuestion gets the question property value. The question asked in order to get the value of the attribute +func (m *AccessPackageResourceAttributeQuestion) GetQuestion()(AccessPackageQuestionable) { + return m.question +} +// Serialize serializes information the current object +func (m *AccessPackageResourceAttributeQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessPackageResourceAttributeSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("question", m.GetQuestion()) + if err != nil { + return err + } + } + return nil +} +// SetQuestion sets the question property value. The question asked in order to get the value of the attribute +func (m *AccessPackageResourceAttributeQuestion) SetQuestion(value AccessPackageQuestionable)() { + m.question = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_questionable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_questionable.go new file mode 100644 index 000000000..325603c9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_questionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeQuestionable +type AccessPackageResourceAttributeQuestionable interface { + AccessPackageResourceAttributeSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetQuestion()(AccessPackageQuestionable) + SetQuestion(value AccessPackageQuestionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_source.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_source.go new file mode 100644 index 000000000..3aa0ba97b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_source.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeSource +type AccessPackageResourceAttributeSource 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 OdataType property + odataType *string +} +// NewAccessPackageResourceAttributeSource instantiates a new accessPackageResourceAttributeSource and sets the default values. +func NewAccessPackageResourceAttributeSource()(*AccessPackageResourceAttributeSource) { + m := &AccessPackageResourceAttributeSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessPackageResourceAttributeSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceAttributeSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessPackageResourceAttributeQuestion": + return NewAccessPackageResourceAttributeQuestion(), nil + } + } + } + } + return NewAccessPackageResourceAttributeSource(), 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 *AccessPackageResourceAttributeSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceAttributeSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttributeSource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessPackageResourceAttributeSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessPackageResourceAttributeSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessPackageResourceAttributeSource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_sourceable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_sourceable.go new file mode 100644 index 000000000..9c5679e71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attribute_sourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeSourceable +type AccessPackageResourceAttributeSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_attributeable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_attributeable.go new file mode 100644 index 000000000..f25dcf36f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_attributeable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceAttributeable +type AccessPackageResourceAttributeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributeDestination()(AccessPackageResourceAttributeDestinationable) + GetAttributeName()(*string) + GetAttributeSource()(AccessPackageResourceAttributeSourceable) + GetId()(*string) + GetIsEditable()(*bool) + GetIsPersistedOnAssignmentRemoval()(*bool) + GetOdataType()(*string) + SetAttributeDestination(value AccessPackageResourceAttributeDestinationable)() + SetAttributeName(value *string)() + SetAttributeSource(value AccessPackageResourceAttributeSourceable)() + SetId(value *string)() + SetIsEditable(value *bool)() + SetIsPersistedOnAssignmentRemoval(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_collection_response.go new file mode 100644 index 000000000..8e31ddf63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceCollectionResponse +type AccessPackageResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceable +} +// NewAccessPackageResourceCollectionResponse instantiates a new AccessPackageResourceCollectionResponse and sets the default values. +func NewAccessPackageResourceCollectionResponse()(*AccessPackageResourceCollectionResponse) { + m := &AccessPackageResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceCollectionResponse) GetValue()([]AccessPackageResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceCollectionResponse) SetValue(value []AccessPackageResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_collection_responseable.go new file mode 100644 index 000000000..1fff50fe1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceCollectionResponseable +type AccessPackageResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceable) + SetValue(value []AccessPackageResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_environment.go b/src/internal/connector/graph/betasdk/models/access_package_resource_environment.go new file mode 100644 index 000000000..4f107e626 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_environment.go @@ -0,0 +1,329 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceEnvironment +type AccessPackageResourceEnvironment struct { + Entity + // Read-only. Required. + accessPackageResources []AccessPackageResourceable + // Connection information of an environment used to connect to a resource. + connectionInfo ConnectionInfoable + // The display name of the user that created this object. + createdBy *string + // The date and time that this object was created. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of this object. + description *string + // The display name of this object. + displayName *string + // Determines whether this is default environment or not. It is set to true for all static origin systems, such as Azure AD groups and Azure AD Applications. + isDefaultEnvironment *bool + // The display name of the entity that last modified this object. + modifiedBy *string + // The date and time that this object was last modified. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of this environment in the origin system. + originId *string + // The type of the resource in the origin system, that is, SharePointOnline. Requires $filter (eq). + originSystem *string +} +// NewAccessPackageResourceEnvironment instantiates a new accessPackageResourceEnvironment and sets the default values. +func NewAccessPackageResourceEnvironment()(*AccessPackageResourceEnvironment) { + m := &AccessPackageResourceEnvironment{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceEnvironmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceEnvironmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceEnvironment(), nil +} +// GetAccessPackageResources gets the accessPackageResources property value. Read-only. Required. +func (m *AccessPackageResourceEnvironment) GetAccessPackageResources()([]AccessPackageResourceable) { + return m.accessPackageResources +} +// GetConnectionInfo gets the connectionInfo property value. Connection information of an environment used to connect to a resource. +func (m *AccessPackageResourceEnvironment) GetConnectionInfo()(ConnectionInfoable) { + return m.connectionInfo +} +// GetCreatedBy gets the createdBy property value. The display name of the user that created this object. +func (m *AccessPackageResourceEnvironment) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time that this object was created. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AccessPackageResourceEnvironment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of this object. +func (m *AccessPackageResourceEnvironment) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of this object. +func (m *AccessPackageResourceEnvironment) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceEnvironment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceable) + } + m.SetAccessPackageResources(res) + } + return nil + } + res["connectionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConnectionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConnectionInfo(val.(ConnectionInfoable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isDefaultEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultEnvironment(val) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["originId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginId(val) + } + return nil + } + res["originSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginSystem(val) + } + return nil + } + return res +} +// GetIsDefaultEnvironment gets the isDefaultEnvironment property value. Determines whether this is default environment or not. It is set to true for all static origin systems, such as Azure AD groups and Azure AD Applications. +func (m *AccessPackageResourceEnvironment) GetIsDefaultEnvironment()(*bool) { + return m.isDefaultEnvironment +} +// GetModifiedBy gets the modifiedBy property value. The display name of the entity that last modified this object. +func (m *AccessPackageResourceEnvironment) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The date and time that this object was last modified. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AccessPackageResourceEnvironment) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetOriginId gets the originId property value. The unique identifier of this environment in the origin system. +func (m *AccessPackageResourceEnvironment) GetOriginId()(*string) { + return m.originId +} +// GetOriginSystem gets the originSystem property value. The type of the resource in the origin system, that is, SharePointOnline. Requires $filter (eq). +func (m *AccessPackageResourceEnvironment) GetOriginSystem()(*string) { + return m.originSystem +} +// Serialize serializes information the current object +func (m *AccessPackageResourceEnvironment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessPackageResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResources())) + for i, v := range m.GetAccessPackageResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("connectionInfo", m.GetConnectionInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultEnvironment", m.GetIsDefaultEnvironment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originId", m.GetOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originSystem", m.GetOriginSystem()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResources sets the accessPackageResources property value. Read-only. Required. +func (m *AccessPackageResourceEnvironment) SetAccessPackageResources(value []AccessPackageResourceable)() { + m.accessPackageResources = value +} +// SetConnectionInfo sets the connectionInfo property value. Connection information of an environment used to connect to a resource. +func (m *AccessPackageResourceEnvironment) SetConnectionInfo(value ConnectionInfoable)() { + m.connectionInfo = value +} +// SetCreatedBy sets the createdBy property value. The display name of the user that created this object. +func (m *AccessPackageResourceEnvironment) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time that this object was created. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AccessPackageResourceEnvironment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of this object. +func (m *AccessPackageResourceEnvironment) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of this object. +func (m *AccessPackageResourceEnvironment) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsDefaultEnvironment sets the isDefaultEnvironment property value. Determines whether this is default environment or not. It is set to true for all static origin systems, such as Azure AD groups and Azure AD Applications. +func (m *AccessPackageResourceEnvironment) SetIsDefaultEnvironment(value *bool)() { + m.isDefaultEnvironment = value +} +// SetModifiedBy sets the modifiedBy property value. The display name of the entity that last modified this object. +func (m *AccessPackageResourceEnvironment) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The date and time that this object was last modified. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AccessPackageResourceEnvironment) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetOriginId sets the originId property value. The unique identifier of this environment in the origin system. +func (m *AccessPackageResourceEnvironment) SetOriginId(value *string)() { + m.originId = value +} +// SetOriginSystem sets the originSystem property value. The type of the resource in the origin system, that is, SharePointOnline. Requires $filter (eq). +func (m *AccessPackageResourceEnvironment) SetOriginSystem(value *string)() { + m.originSystem = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_response.go new file mode 100644 index 000000000..24b379519 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceEnvironmentCollectionResponse +type AccessPackageResourceEnvironmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceEnvironmentable +} +// NewAccessPackageResourceEnvironmentCollectionResponse instantiates a new AccessPackageResourceEnvironmentCollectionResponse and sets the default values. +func NewAccessPackageResourceEnvironmentCollectionResponse()(*AccessPackageResourceEnvironmentCollectionResponse) { + m := &AccessPackageResourceEnvironmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceEnvironmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceEnvironmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceEnvironmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceEnvironmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceEnvironmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceEnvironmentable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceEnvironmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceEnvironmentCollectionResponse) GetValue()([]AccessPackageResourceEnvironmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceEnvironmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceEnvironmentCollectionResponse) SetValue(value []AccessPackageResourceEnvironmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_responseable.go new file mode 100644 index 000000000..8a8ca3a14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_environment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceEnvironmentCollectionResponseable +type AccessPackageResourceEnvironmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceEnvironmentable) + SetValue(value []AccessPackageResourceEnvironmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_environmentable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_environmentable.go new file mode 100644 index 000000000..8ae223c36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_environmentable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceEnvironmentable +type AccessPackageResourceEnvironmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResources()([]AccessPackageResourceable) + GetConnectionInfo()(ConnectionInfoable) + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsDefaultEnvironment()(*bool) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOriginId()(*string) + GetOriginSystem()(*string) + SetAccessPackageResources(value []AccessPackageResourceable)() + SetConnectionInfo(value ConnectionInfoable)() + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsDefaultEnvironment(value *bool)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOriginId(value *string)() + SetOriginSystem(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_request.go b/src/internal/connector/graph/betasdk/models/access_package_resource_request.go new file mode 100644 index 000000000..a4b994c58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_request.go @@ -0,0 +1,295 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRequest provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageResourceRequest struct { + Entity + // The accessPackageResource property + accessPackageResource AccessPackageResourceable + // The unique ID of the access package catalog. + catalogId *string + // The executeImmediately property + executeImmediately *bool + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // If set, does not add the resource. + isValidationOnly *bool + // The requestor's justification for adding or removing the resource. + justification *string + // Read-only. Nullable. Supports $expand. + requestor AccessPackageSubjectable + // The outcome of whether the service was able to add the resource to the catalog. The value is Delivered if the resource was added or removed. Read-Only. + requestState *string + // The requestStatus property + requestStatus *string + // Use AdminAdd to add a resource, if the caller is an administrator or resource owner, AdminUpdate to update a resource, or AdminRemove to remove a resource. + requestType *string +} +// NewAccessPackageResourceRequest instantiates a new accessPackageResourceRequest and sets the default values. +func NewAccessPackageResourceRequest()(*AccessPackageResourceRequest) { + m := &AccessPackageResourceRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRequest(), nil +} +// GetAccessPackageResource gets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceRequest) GetAccessPackageResource()(AccessPackageResourceable) { + return m.accessPackageResource +} +// GetCatalogId gets the catalogId property value. The unique ID of the access package catalog. +func (m *AccessPackageResourceRequest) GetCatalogId()(*string) { + return m.catalogId +} +// GetExecuteImmediately gets the executeImmediately property value. The executeImmediately property +func (m *AccessPackageResourceRequest) GetExecuteImmediately()(*bool) { + return m.executeImmediately +} +// GetExpirationDateTime gets the expirationDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRequest) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResource(val.(AccessPackageResourceable)) + } + return nil + } + res["catalogId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCatalogId(val) + } + return nil + } + res["executeImmediately"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExecuteImmediately(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["isValidationOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValidationOnly(val) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["requestor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestor(val.(AccessPackageSubjectable)) + } + return nil + } + res["requestState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestState(val) + } + return nil + } + res["requestStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestStatus(val) + } + return nil + } + res["requestType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestType(val) + } + return nil + } + return res +} +// GetIsValidationOnly gets the isValidationOnly property value. If set, does not add the resource. +func (m *AccessPackageResourceRequest) GetIsValidationOnly()(*bool) { + return m.isValidationOnly +} +// GetJustification gets the justification property value. The requestor's justification for adding or removing the resource. +func (m *AccessPackageResourceRequest) GetJustification()(*string) { + return m.justification +} +// GetRequestor gets the requestor property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResourceRequest) GetRequestor()(AccessPackageSubjectable) { + return m.requestor +} +// GetRequestState gets the requestState property value. The outcome of whether the service was able to add the resource to the catalog. The value is Delivered if the resource was added or removed. Read-Only. +func (m *AccessPackageResourceRequest) GetRequestState()(*string) { + return m.requestState +} +// GetRequestStatus gets the requestStatus property value. The requestStatus property +func (m *AccessPackageResourceRequest) GetRequestStatus()(*string) { + return m.requestStatus +} +// GetRequestType gets the requestType property value. Use AdminAdd to add a resource, if the caller is an administrator or resource owner, AdminUpdate to update a resource, or AdminRemove to remove a resource. +func (m *AccessPackageResourceRequest) GetRequestType()(*string) { + return m.requestType +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackageResource", m.GetAccessPackageResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("catalogId", m.GetCatalogId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("executeImmediately", m.GetExecuteImmediately()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isValidationOnly", m.GetIsValidationOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requestor", m.GetRequestor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestState", m.GetRequestState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestStatus", m.GetRequestStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestType", m.GetRequestType()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResource sets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceRequest) SetAccessPackageResource(value AccessPackageResourceable)() { + m.accessPackageResource = value +} +// SetCatalogId sets the catalogId property value. The unique ID of the access package catalog. +func (m *AccessPackageResourceRequest) SetCatalogId(value *string)() { + m.catalogId = value +} +// SetExecuteImmediately sets the executeImmediately property value. The executeImmediately property +func (m *AccessPackageResourceRequest) SetExecuteImmediately(value *bool)() { + m.executeImmediately = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRequest) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIsValidationOnly sets the isValidationOnly property value. If set, does not add the resource. +func (m *AccessPackageResourceRequest) SetIsValidationOnly(value *bool)() { + m.isValidationOnly = value +} +// SetJustification sets the justification property value. The requestor's justification for adding or removing the resource. +func (m *AccessPackageResourceRequest) SetJustification(value *string)() { + m.justification = value +} +// SetRequestor sets the requestor property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResourceRequest) SetRequestor(value AccessPackageSubjectable)() { + m.requestor = value +} +// SetRequestState sets the requestState property value. The outcome of whether the service was able to add the resource to the catalog. The value is Delivered if the resource was added or removed. Read-Only. +func (m *AccessPackageResourceRequest) SetRequestState(value *string)() { + m.requestState = value +} +// SetRequestStatus sets the requestStatus property value. The requestStatus property +func (m *AccessPackageResourceRequest) SetRequestStatus(value *string)() { + m.requestStatus = value +} +// SetRequestType sets the requestType property value. Use AdminAdd to add a resource, if the caller is an administrator or resource owner, AdminUpdate to update a resource, or AdminRemove to remove a resource. +func (m *AccessPackageResourceRequest) SetRequestType(value *string)() { + m.requestType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_response.go new file mode 100644 index 000000000..7a7b5a1e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRequestCollectionResponse +type AccessPackageResourceRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceRequestable +} +// NewAccessPackageResourceRequestCollectionResponse instantiates a new AccessPackageResourceRequestCollectionResponse and sets the default values. +func NewAccessPackageResourceRequestCollectionResponse()(*AccessPackageResourceRequestCollectionResponse) { + m := &AccessPackageResourceRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRequestable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceRequestCollectionResponse) GetValue()([]AccessPackageResourceRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceRequestCollectionResponse) SetValue(value []AccessPackageResourceRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_responseable.go new file mode 100644 index 000000000..a502eea5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRequestCollectionResponseable +type AccessPackageResourceRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceRequestable) + SetValue(value []AccessPackageResourceRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_requestable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_requestable.go new file mode 100644 index 000000000..cf7acba9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_requestable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRequestable +type AccessPackageResourceRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResource()(AccessPackageResourceable) + GetCatalogId()(*string) + GetExecuteImmediately()(*bool) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsValidationOnly()(*bool) + GetJustification()(*string) + GetRequestor()(AccessPackageSubjectable) + GetRequestState()(*string) + GetRequestStatus()(*string) + GetRequestType()(*string) + SetAccessPackageResource(value AccessPackageResourceable)() + SetCatalogId(value *string)() + SetExecuteImmediately(value *bool)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsValidationOnly(value *bool)() + SetJustification(value *string)() + SetRequestor(value AccessPackageSubjectable)() + SetRequestState(value *string)() + SetRequestStatus(value *string)() + SetRequestType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role.go new file mode 100644 index 000000000..4c951124a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRole provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageResourceRole struct { + Entity + // The accessPackageResource property + accessPackageResource AccessPackageResourceable + // A description for the resource role. + description *string + // The display name of the resource role such as the role defined by the application. + displayName *string + // The unique identifier of the resource role in the origin system. For a SharePoint Online site, the originId will be the sequence number of the role in the site. + originId *string + // The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. + originSystem *string +} +// NewAccessPackageResourceRole instantiates a new accessPackageResourceRole and sets the default values. +func NewAccessPackageResourceRole()(*AccessPackageResourceRole) { + m := &AccessPackageResourceRole{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRole(), nil +} +// GetAccessPackageResource gets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceRole) GetAccessPackageResource()(AccessPackageResourceable) { + return m.accessPackageResource +} +// GetDescription gets the description property value. A description for the resource role. +func (m *AccessPackageResourceRole) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the resource role such as the role defined by the application. +func (m *AccessPackageResourceRole) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResource(val.(AccessPackageResourceable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["originId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginId(val) + } + return nil + } + res["originSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginSystem(val) + } + return nil + } + return res +} +// GetOriginId gets the originId property value. The unique identifier of the resource role in the origin system. For a SharePoint Online site, the originId will be the sequence number of the role in the site. +func (m *AccessPackageResourceRole) GetOriginId()(*string) { + return m.originId +} +// GetOriginSystem gets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. +func (m *AccessPackageResourceRole) GetOriginSystem()(*string) { + return m.originSystem +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackageResource", m.GetAccessPackageResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originId", m.GetOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originSystem", m.GetOriginSystem()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResource sets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceRole) SetAccessPackageResource(value AccessPackageResourceable)() { + m.accessPackageResource = value +} +// SetDescription sets the description property value. A description for the resource role. +func (m *AccessPackageResourceRole) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the resource role such as the role defined by the application. +func (m *AccessPackageResourceRole) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOriginId sets the originId property value. The unique identifier of the resource role in the origin system. For a SharePoint Online site, the originId will be the sequence number of the role in the site. +func (m *AccessPackageResourceRole) SetOriginId(value *string)() { + m.originId = value +} +// SetOriginSystem sets the originSystem property value. The type of the resource in the origin system, such as SharePointOnline, AadApplication or AadGroup. +func (m *AccessPackageResourceRole) SetOriginSystem(value *string)() { + m.originSystem = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_response.go new file mode 100644 index 000000000..21795711e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleCollectionResponse +type AccessPackageResourceRoleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceRoleable +} +// NewAccessPackageResourceRoleCollectionResponse instantiates a new AccessPackageResourceRoleCollectionResponse and sets the default values. +func NewAccessPackageResourceRoleCollectionResponse()(*AccessPackageResourceRoleCollectionResponse) { + m := &AccessPackageResourceRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceRoleCollectionResponse) GetValue()([]AccessPackageResourceRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceRoleCollectionResponse) SetValue(value []AccessPackageResourceRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_responseable.go new file mode 100644 index 000000000..479728742 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleCollectionResponseable +type AccessPackageResourceRoleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceRoleable) + SetValue(value []AccessPackageResourceRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope.go new file mode 100644 index 000000000..a28f32b87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleScope provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageResourceRoleScope struct { + Entity + // Read-only. Nullable. Supports $expand. + accessPackageResourceRole AccessPackageResourceRoleable + // The accessPackageResourceScope property + accessPackageResourceScope AccessPackageResourceScopeable + // The createdBy property + createdBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The modifiedBy property + modifiedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAccessPackageResourceRoleScope instantiates a new accessPackageResourceRoleScope and sets the default values. +func NewAccessPackageResourceRoleScope()(*AccessPackageResourceRoleScope) { + m := &AccessPackageResourceRoleScope{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceRoleScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRoleScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRoleScope(), nil +} +// GetAccessPackageResourceRole gets the accessPackageResourceRole property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResourceRoleScope) GetAccessPackageResourceRole()(AccessPackageResourceRoleable) { + return m.accessPackageResourceRole +} +// GetAccessPackageResourceScope gets the accessPackageResourceScope property value. The accessPackageResourceScope property +func (m *AccessPackageResourceRoleScope) GetAccessPackageResourceScope()(AccessPackageResourceScopeable) { + return m.accessPackageResourceScope +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *AccessPackageResourceRoleScope) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRoleScope) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRoleScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResourceRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResourceRole(val.(AccessPackageResourceRoleable)) + } + return nil + } + res["accessPackageResourceScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResourceScope(val.(AccessPackageResourceScopeable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + return res +} +// GetModifiedBy gets the modifiedBy property value. The modifiedBy property +func (m *AccessPackageResourceRoleScope) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRoleScope) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRoleScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackageResourceRole", m.GetAccessPackageResourceRole()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessPackageResourceScope", m.GetAccessPackageResourceScope()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResourceRole sets the accessPackageResourceRole property value. Read-only. Nullable. Supports $expand. +func (m *AccessPackageResourceRoleScope) SetAccessPackageResourceRole(value AccessPackageResourceRoleable)() { + m.accessPackageResourceRole = value +} +// SetAccessPackageResourceScope sets the accessPackageResourceScope property value. The accessPackageResourceScope property +func (m *AccessPackageResourceRoleScope) SetAccessPackageResourceScope(value AccessPackageResourceScopeable)() { + m.accessPackageResourceScope = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *AccessPackageResourceRoleScope) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRoleScope) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetModifiedBy sets the modifiedBy property value. The modifiedBy property +func (m *AccessPackageResourceRoleScope) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AccessPackageResourceRoleScope) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_response.go new file mode 100644 index 000000000..aa0d10cbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleScopeCollectionResponse +type AccessPackageResourceRoleScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceRoleScopeable +} +// NewAccessPackageResourceRoleScopeCollectionResponse instantiates a new AccessPackageResourceRoleScopeCollectionResponse and sets the default values. +func NewAccessPackageResourceRoleScopeCollectionResponse()(*AccessPackageResourceRoleScopeCollectionResponse) { + m := &AccessPackageResourceRoleScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceRoleScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceRoleScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceRoleScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceRoleScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceRoleScopeCollectionResponse) GetValue()([]AccessPackageResourceRoleScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceRoleScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceRoleScopeCollectionResponse) SetValue(value []AccessPackageResourceRoleScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_responseable.go new file mode 100644 index 000000000..50bf4300f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleScopeCollectionResponseable +type AccessPackageResourceRoleScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceRoleScopeable) + SetValue(value []AccessPackageResourceRoleScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_role_scopeable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scopeable.go new file mode 100644 index 000000000..b0e855853 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_role_scopeable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleScopeable +type AccessPackageResourceRoleScopeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResourceRole()(AccessPackageResourceRoleable) + GetAccessPackageResourceScope()(AccessPackageResourceScopeable) + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccessPackageResourceRole(value AccessPackageResourceRoleable)() + SetAccessPackageResourceScope(value AccessPackageResourceScopeable)() + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_roleable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_roleable.go new file mode 100644 index 000000000..6875d1582 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_roleable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceRoleable +type AccessPackageResourceRoleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResource()(AccessPackageResourceable) + GetDescription()(*string) + GetDisplayName()(*string) + GetOriginId()(*string) + GetOriginSystem()(*string) + SetAccessPackageResource(value AccessPackageResourceable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetOriginId(value *string)() + SetOriginSystem(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_scope.go b/src/internal/connector/graph/betasdk/models/access_package_resource_scope.go new file mode 100644 index 000000000..4962b16e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_scope.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceScope provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageResourceScope struct { + Entity + // The accessPackageResource property + accessPackageResource AccessPackageResourceable + // The description of the scope. + description *string + // The display name of the scope. + displayName *string + // True if the scopes are arranged in a hierarchy and this is the top or root scope of the resource. + isRootScope *bool + // The unique identifier for the scope in the resource as defined in the origin system. + originId *string + // The origin system for the scope. + originSystem *string + // The origin system for the role, if different. + roleOriginId *string + // A resource locator for the scope. + url *string +} +// NewAccessPackageResourceScope instantiates a new accessPackageResourceScope and sets the default values. +func NewAccessPackageResourceScope()(*AccessPackageResourceScope) { + m := &AccessPackageResourceScope{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageResourceScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceScope(), nil +} +// GetAccessPackageResource gets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceScope) GetAccessPackageResource()(AccessPackageResourceable) { + return m.accessPackageResource +} +// GetDescription gets the description property value. The description of the scope. +func (m *AccessPackageResourceScope) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the scope. +func (m *AccessPackageResourceScope) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageResource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageResource(val.(AccessPackageResourceable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isRootScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRootScope(val) + } + return nil + } + res["originId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginId(val) + } + return nil + } + res["originSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginSystem(val) + } + return nil + } + res["roleOriginId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleOriginId(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetIsRootScope gets the isRootScope property value. True if the scopes are arranged in a hierarchy and this is the top or root scope of the resource. +func (m *AccessPackageResourceScope) GetIsRootScope()(*bool) { + return m.isRootScope +} +// GetOriginId gets the originId property value. The unique identifier for the scope in the resource as defined in the origin system. +func (m *AccessPackageResourceScope) GetOriginId()(*string) { + return m.originId +} +// GetOriginSystem gets the originSystem property value. The origin system for the scope. +func (m *AccessPackageResourceScope) GetOriginSystem()(*string) { + return m.originSystem +} +// GetRoleOriginId gets the roleOriginId property value. The origin system for the role, if different. +func (m *AccessPackageResourceScope) GetRoleOriginId()(*string) { + return m.roleOriginId +} +// GetUrl gets the url property value. A resource locator for the scope. +func (m *AccessPackageResourceScope) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *AccessPackageResourceScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessPackageResource", m.GetAccessPackageResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRootScope", m.GetIsRootScope()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originId", m.GetOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originSystem", m.GetOriginSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleOriginId", m.GetRoleOriginId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageResource sets the accessPackageResource property value. The accessPackageResource property +func (m *AccessPackageResourceScope) SetAccessPackageResource(value AccessPackageResourceable)() { + m.accessPackageResource = value +} +// SetDescription sets the description property value. The description of the scope. +func (m *AccessPackageResourceScope) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the scope. +func (m *AccessPackageResourceScope) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsRootScope sets the isRootScope property value. True if the scopes are arranged in a hierarchy and this is the top or root scope of the resource. +func (m *AccessPackageResourceScope) SetIsRootScope(value *bool)() { + m.isRootScope = value +} +// SetOriginId sets the originId property value. The unique identifier for the scope in the resource as defined in the origin system. +func (m *AccessPackageResourceScope) SetOriginId(value *string)() { + m.originId = value +} +// SetOriginSystem sets the originSystem property value. The origin system for the scope. +func (m *AccessPackageResourceScope) SetOriginSystem(value *string)() { + m.originSystem = value +} +// SetRoleOriginId sets the roleOriginId property value. The origin system for the role, if different. +func (m *AccessPackageResourceScope) SetRoleOriginId(value *string)() { + m.roleOriginId = value +} +// SetUrl sets the url property value. A resource locator for the scope. +func (m *AccessPackageResourceScope) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_response.go new file mode 100644 index 000000000..35cd85e7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceScopeCollectionResponse +type AccessPackageResourceScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageResourceScopeable +} +// NewAccessPackageResourceScopeCollectionResponse instantiates a new AccessPackageResourceScopeCollectionResponse and sets the default values. +func NewAccessPackageResourceScopeCollectionResponse()(*AccessPackageResourceScopeCollectionResponse) { + m := &AccessPackageResourceScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageResourceScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageResourceScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageResourceScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageResourceScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageResourceScopeCollectionResponse) GetValue()([]AccessPackageResourceScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageResourceScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageResourceScopeCollectionResponse) SetValue(value []AccessPackageResourceScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_responseable.go new file mode 100644 index 000000000..f1bc9dbaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceScopeCollectionResponseable +type AccessPackageResourceScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageResourceScopeable) + SetValue(value []AccessPackageResourceScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resource_scopeable.go b/src/internal/connector/graph/betasdk/models/access_package_resource_scopeable.go new file mode 100644 index 000000000..f338ef507 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resource_scopeable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceScopeable +type AccessPackageResourceScopeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResource()(AccessPackageResourceable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsRootScope()(*bool) + GetOriginId()(*string) + GetOriginSystem()(*string) + GetRoleOriginId()(*string) + GetUrl()(*string) + SetAccessPackageResource(value AccessPackageResourceable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsRootScope(value *bool)() + SetOriginId(value *string)() + SetOriginSystem(value *string)() + SetRoleOriginId(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_resourceable.go b/src/internal/connector/graph/betasdk/models/access_package_resourceable.go new file mode 100644 index 000000000..520688fba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_resourceable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageResourceable +type AccessPackageResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageResourceEnvironment()(AccessPackageResourceEnvironmentable) + GetAccessPackageResourceRoles()([]AccessPackageResourceRoleable) + GetAccessPackageResourceScopes()([]AccessPackageResourceScopeable) + GetAddedBy()(*string) + GetAddedOn()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAttributes()([]AccessPackageResourceAttributeable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsPendingOnboarding()(*bool) + GetOriginId()(*string) + GetOriginSystem()(*string) + GetResourceType()(*string) + GetUrl()(*string) + SetAccessPackageResourceEnvironment(value AccessPackageResourceEnvironmentable)() + SetAccessPackageResourceRoles(value []AccessPackageResourceRoleable)() + SetAccessPackageResourceScopes(value []AccessPackageResourceScopeable)() + SetAddedBy(value *string)() + SetAddedOn(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAttributes(value []AccessPackageResourceAttributeable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsPendingOnboarding(value *bool)() + SetOriginId(value *string)() + SetOriginSystem(value *string)() + SetResourceType(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_subject.go b/src/internal/connector/graph/betasdk/models/access_package_subject.go new file mode 100644 index 000000000..0f335d1f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_subject.go @@ -0,0 +1,295 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageSubject +type AccessPackageSubject struct { + Entity + // The altSecId property + altSecId *string + // The connected organization of the subject. Read-only. Nullable. + connectedOrganization ConnectedOrganizationable + // The identifier of the connected organization of the subject. + connectedOrganizationId *string + // The display name of the subject. + displayName *string + // The email address of the subject. + email *string + // The object identifier of the subject. null if the subject is not yet a user in the tenant. + objectId *string + // The onPremisesSecurityIdentifier property + onPremisesSecurityIdentifier *string + // The principal name, if known, of the subject. + principalName *string + // The subjectLifecycle property + subjectLifecycle *AccessPackageSubjectLifecycle + // The resource type of the subject. + type_escaped *string +} +// NewAccessPackageSubject instantiates a new accessPackageSubject and sets the default values. +func NewAccessPackageSubject()(*AccessPackageSubject) { + m := &AccessPackageSubject{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessPackageSubjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageSubjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageSubject(), nil +} +// GetAltSecId gets the altSecId property value. The altSecId property +func (m *AccessPackageSubject) GetAltSecId()(*string) { + return m.altSecId +} +// GetConnectedOrganization gets the connectedOrganization property value. The connected organization of the subject. Read-only. Nullable. +func (m *AccessPackageSubject) GetConnectedOrganization()(ConnectedOrganizationable) { + return m.connectedOrganization +} +// GetConnectedOrganizationId gets the connectedOrganizationId property value. The identifier of the connected organization of the subject. +func (m *AccessPackageSubject) GetConnectedOrganizationId()(*string) { + return m.connectedOrganizationId +} +// GetDisplayName gets the displayName property value. The display name of the subject. +func (m *AccessPackageSubject) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email address of the subject. +func (m *AccessPackageSubject) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageSubject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["altSecId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAltSecId(val) + } + return nil + } + res["connectedOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConnectedOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConnectedOrganization(val.(ConnectedOrganizationable)) + } + return nil + } + res["connectedOrganizationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectedOrganizationId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["objectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectId(val) + } + return nil + } + res["onPremisesSecurityIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSecurityIdentifier(val) + } + return nil + } + res["principalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalName(val) + } + return nil + } + res["subjectLifecycle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessPackageSubjectLifecycle) + if err != nil { + return err + } + if val != nil { + m.SetSubjectLifecycle(val.(*AccessPackageSubjectLifecycle)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetObjectId gets the objectId property value. The object identifier of the subject. null if the subject is not yet a user in the tenant. +func (m *AccessPackageSubject) GetObjectId()(*string) { + return m.objectId +} +// GetOnPremisesSecurityIdentifier gets the onPremisesSecurityIdentifier property value. The onPremisesSecurityIdentifier property +func (m *AccessPackageSubject) GetOnPremisesSecurityIdentifier()(*string) { + return m.onPremisesSecurityIdentifier +} +// GetPrincipalName gets the principalName property value. The principal name, if known, of the subject. +func (m *AccessPackageSubject) GetPrincipalName()(*string) { + return m.principalName +} +// GetSubjectLifecycle gets the subjectLifecycle property value. The subjectLifecycle property +func (m *AccessPackageSubject) GetSubjectLifecycle()(*AccessPackageSubjectLifecycle) { + return m.subjectLifecycle +} +// GetType gets the type property value. The resource type of the subject. +func (m *AccessPackageSubject) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AccessPackageSubject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("altSecId", m.GetAltSecId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("connectedOrganization", m.GetConnectedOrganization()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectedOrganizationId", m.GetConnectedOrganizationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("objectId", m.GetObjectId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesSecurityIdentifier", m.GetOnPremisesSecurityIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalName", m.GetPrincipalName()) + if err != nil { + return err + } + } + if m.GetSubjectLifecycle() != nil { + cast := (*m.GetSubjectLifecycle()).String() + err = writer.WriteStringValue("subjectLifecycle", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetAltSecId sets the altSecId property value. The altSecId property +func (m *AccessPackageSubject) SetAltSecId(value *string)() { + m.altSecId = value +} +// SetConnectedOrganization sets the connectedOrganization property value. The connected organization of the subject. Read-only. Nullable. +func (m *AccessPackageSubject) SetConnectedOrganization(value ConnectedOrganizationable)() { + m.connectedOrganization = value +} +// SetConnectedOrganizationId sets the connectedOrganizationId property value. The identifier of the connected organization of the subject. +func (m *AccessPackageSubject) SetConnectedOrganizationId(value *string)() { + m.connectedOrganizationId = value +} +// SetDisplayName sets the displayName property value. The display name of the subject. +func (m *AccessPackageSubject) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email address of the subject. +func (m *AccessPackageSubject) SetEmail(value *string)() { + m.email = value +} +// SetObjectId sets the objectId property value. The object identifier of the subject. null if the subject is not yet a user in the tenant. +func (m *AccessPackageSubject) SetObjectId(value *string)() { + m.objectId = value +} +// SetOnPremisesSecurityIdentifier sets the onPremisesSecurityIdentifier property value. The onPremisesSecurityIdentifier property +func (m *AccessPackageSubject) SetOnPremisesSecurityIdentifier(value *string)() { + m.onPremisesSecurityIdentifier = value +} +// SetPrincipalName sets the principalName property value. The principal name, if known, of the subject. +func (m *AccessPackageSubject) SetPrincipalName(value *string)() { + m.principalName = value +} +// SetSubjectLifecycle sets the subjectLifecycle property value. The subjectLifecycle property +func (m *AccessPackageSubject) SetSubjectLifecycle(value *AccessPackageSubjectLifecycle)() { + m.subjectLifecycle = value +} +// SetType sets the type property value. The resource type of the subject. +func (m *AccessPackageSubject) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_subject_collection_response.go b/src/internal/connector/graph/betasdk/models/access_package_subject_collection_response.go new file mode 100644 index 000000000..6de2f799b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_subject_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageSubjectCollectionResponse +type AccessPackageSubjectCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessPackageSubjectable +} +// NewAccessPackageSubjectCollectionResponse instantiates a new AccessPackageSubjectCollectionResponse and sets the default values. +func NewAccessPackageSubjectCollectionResponse()(*AccessPackageSubjectCollectionResponse) { + m := &AccessPackageSubjectCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessPackageSubjectCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageSubjectCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageSubjectCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageSubjectCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageSubjectable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageSubjectable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessPackageSubjectCollectionResponse) GetValue()([]AccessPackageSubjectable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessPackageSubjectCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessPackageSubjectCollectionResponse) SetValue(value []AccessPackageSubjectable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_subject_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_package_subject_collection_responseable.go new file mode 100644 index 000000000..878d1db9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_subject_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageSubjectCollectionResponseable +type AccessPackageSubjectCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessPackageSubjectable) + SetValue(value []AccessPackageSubjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_subject_lifecycle.go b/src/internal/connector/graph/betasdk/models/access_package_subject_lifecycle.go new file mode 100644 index 000000000..f96bfe3af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_subject_lifecycle.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessPackageSubjectLifecycle int + +const ( + NOTDEFINED_ACCESSPACKAGESUBJECTLIFECYCLE AccessPackageSubjectLifecycle = iota + NOTGOVERNED_ACCESSPACKAGESUBJECTLIFECYCLE + GOVERNED_ACCESSPACKAGESUBJECTLIFECYCLE + UNKNOWNFUTUREVALUE_ACCESSPACKAGESUBJECTLIFECYCLE +) + +func (i AccessPackageSubjectLifecycle) String() string { + return []string{"notDefined", "notGoverned", "governed", "unknownFutureValue"}[i] +} +func ParseAccessPackageSubjectLifecycle(v string) (interface{}, error) { + result := NOTDEFINED_ACCESSPACKAGESUBJECTLIFECYCLE + switch v { + case "notDefined": + result = NOTDEFINED_ACCESSPACKAGESUBJECTLIFECYCLE + case "notGoverned": + result = NOTGOVERNED_ACCESSPACKAGESUBJECTLIFECYCLE + case "governed": + result = GOVERNED_ACCESSPACKAGESUBJECTLIFECYCLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSPACKAGESUBJECTLIFECYCLE + default: + return 0, errors.New("Unknown AccessPackageSubjectLifecycle value: " + v) + } + return &result, nil +} +func SerializeAccessPackageSubjectLifecycle(values []AccessPackageSubjectLifecycle) []string { + 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/access_package_subjectable.go b/src/internal/connector/graph/betasdk/models/access_package_subjectable.go new file mode 100644 index 000000000..7f7aa24a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_subjectable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageSubjectable +type AccessPackageSubjectable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAltSecId()(*string) + GetConnectedOrganization()(ConnectedOrganizationable) + GetConnectedOrganizationId()(*string) + GetDisplayName()(*string) + GetEmail()(*string) + GetObjectId()(*string) + GetOnPremisesSecurityIdentifier()(*string) + GetPrincipalName()(*string) + GetSubjectLifecycle()(*AccessPackageSubjectLifecycle) + GetType()(*string) + SetAltSecId(value *string)() + SetConnectedOrganization(value ConnectedOrganizationable)() + SetConnectedOrganizationId(value *string)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetObjectId(value *string)() + SetOnPremisesSecurityIdentifier(value *string)() + SetPrincipalName(value *string)() + SetSubjectLifecycle(value *AccessPackageSubjectLifecycle)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_text_input_question.go b/src/internal/connector/graph/betasdk/models/access_package_text_input_question.go new file mode 100644 index 000000000..8305a9638 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_text_input_question.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageTextInputQuestion +type AccessPackageTextInputQuestion struct { + AccessPackageQuestion + // Indicates whether the answer will be in single or multiple line format. + isSingleLineQuestion *bool + // This is the regex pattern that the corresponding text answer must follow. + regexPattern *string +} +// NewAccessPackageTextInputQuestion instantiates a new AccessPackageTextInputQuestion and sets the default values. +func NewAccessPackageTextInputQuestion()(*AccessPackageTextInputQuestion) { + m := &AccessPackageTextInputQuestion{ + AccessPackageQuestion: *NewAccessPackageQuestion(), + } + odataTypeValue := "#microsoft.graph.accessPackageTextInputQuestion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessPackageTextInputQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageTextInputQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageTextInputQuestion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageTextInputQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessPackageQuestion.GetFieldDeserializers() + res["isSingleLineQuestion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSingleLineQuestion(val) + } + return nil + } + res["regexPattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegexPattern(val) + } + return nil + } + return res +} +// GetIsSingleLineQuestion gets the isSingleLineQuestion property value. Indicates whether the answer will be in single or multiple line format. +func (m *AccessPackageTextInputQuestion) GetIsSingleLineQuestion()(*bool) { + return m.isSingleLineQuestion +} +// GetRegexPattern gets the regexPattern property value. This is the regex pattern that the corresponding text answer must follow. +func (m *AccessPackageTextInputQuestion) GetRegexPattern()(*string) { + return m.regexPattern +} +// Serialize serializes information the current object +func (m *AccessPackageTextInputQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessPackageQuestion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isSingleLineQuestion", m.GetIsSingleLineQuestion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("regexPattern", m.GetRegexPattern()) + if err != nil { + return err + } + } + return nil +} +// SetIsSingleLineQuestion sets the isSingleLineQuestion property value. Indicates whether the answer will be in single or multiple line format. +func (m *AccessPackageTextInputQuestion) SetIsSingleLineQuestion(value *bool)() { + m.isSingleLineQuestion = value +} +// SetRegexPattern sets the regexPattern property value. This is the regex pattern that the corresponding text answer must follow. +func (m *AccessPackageTextInputQuestion) SetRegexPattern(value *string)() { + m.regexPattern = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_text_input_questionable.go b/src/internal/connector/graph/betasdk/models/access_package_text_input_questionable.go new file mode 100644 index 000000000..95a76bddc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_text_input_questionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageTextInputQuestionable +type AccessPackageTextInputQuestionable interface { + AccessPackageQuestionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsSingleLineQuestion()(*bool) + GetRegexPattern()(*string) + SetIsSingleLineQuestion(value *bool)() + SetRegexPattern(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_store.go b/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_store.go new file mode 100644 index 000000000..76083316c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_store.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageUserDirectoryAttributeStore +type AccessPackageUserDirectoryAttributeStore struct { + AccessPackageResourceAttributeDestination +} +// NewAccessPackageUserDirectoryAttributeStore instantiates a new AccessPackageUserDirectoryAttributeStore and sets the default values. +func NewAccessPackageUserDirectoryAttributeStore()(*AccessPackageUserDirectoryAttributeStore) { + m := &AccessPackageUserDirectoryAttributeStore{ + AccessPackageResourceAttributeDestination: *NewAccessPackageResourceAttributeDestination(), + } + odataTypeValue := "#microsoft.graph.accessPackageUserDirectoryAttributeStore"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessPackageUserDirectoryAttributeStoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessPackageUserDirectoryAttributeStoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessPackageUserDirectoryAttributeStore(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessPackageUserDirectoryAttributeStore) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessPackageResourceAttributeDestination.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AccessPackageUserDirectoryAttributeStore) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessPackageResourceAttributeDestination.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_storeable.go b/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_storeable.go new file mode 100644 index 000000000..bd75b7f25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_package_user_directory_attribute_storeable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageUserDirectoryAttributeStoreable +type AccessPackageUserDirectoryAttributeStoreable interface { + AccessPackageResourceAttributeDestinationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/access_packageable.go b/src/internal/connector/graph/betasdk/models/access_packageable.go new file mode 100644 index 000000000..ed5d4a608 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_packageable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessPackageable +type AccessPackageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageAssignmentPolicies()([]AccessPackageAssignmentPolicyable) + GetAccessPackageCatalog()(AccessPackageCatalogable) + GetAccessPackageResourceRoleScopes()([]AccessPackageResourceRoleScopeable) + GetAccessPackagesIncompatibleWith()([]AccessPackageable) + GetCatalogId()(*string) + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetIncompatibleAccessPackages()([]AccessPackageable) + GetIncompatibleGroups()([]Groupable) + GetIsHidden()(*bool) + GetIsRoleScopesVisible()(*bool) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccessPackageAssignmentPolicies(value []AccessPackageAssignmentPolicyable)() + SetAccessPackageCatalog(value AccessPackageCatalogable)() + SetAccessPackageResourceRoleScopes(value []AccessPackageResourceRoleScopeable)() + SetAccessPackagesIncompatibleWith(value []AccessPackageable)() + SetCatalogId(value *string)() + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIncompatibleAccessPackages(value []AccessPackageable)() + SetIncompatibleGroups(value []Groupable)() + SetIsHidden(value *bool)() + SetIsRoleScopesVisible(value *bool)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review.go b/src/internal/connector/graph/betasdk/models/access_review.go new file mode 100644 index 000000000..1187eac74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review.go @@ -0,0 +1,431 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReview +type AccessReview struct { + Entity + // The business flow template identifier. Required on create. This value is case sensitive. + businessFlowTemplateId *string + // The user who created this review. + createdBy UserIdentityable + // The collection of decisions for this access review. + decisions []AccessReviewDecisionable + // The description provided by the access review creator, to show to the reviewers. + description *string + // The access review name. Required on create. + displayName *string + // The DateTime when the review is scheduled to end. This must be at least one day later than the start date. Required on create. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of access reviews instances past, present and future, if this object is a recurring access review. + instances []AccessReviewable + // The collection of decisions for the caller, if the caller is a reviewer. + myDecisions []AccessReviewDecisionable + // The object for which the access reviews is reviewing the access rights assignments. This can be the group for the review of memberships of users in a group, or the app for a review of assignments of users to an application. Required on create. + reviewedEntity Identityable + // The collection of reviewers for an access review, if access review reviewerType is of type delegated. + reviewers []AccessReviewReviewerable + // The relationship type of reviewer to the target object, one of self, delegated or entityOwners. Required on create. + reviewerType *string + // The settings of an accessReview, see type definition below. + settings AccessReviewSettingsable + // The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // This read-only field specifies the status of an accessReview. The typical states include Initializing, NotStarted, Starting,InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. + status *string +} +// NewAccessReview instantiates a new AccessReview and sets the default values. +func NewAccessReview()(*AccessReview) { + m := &AccessReview{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReview(), nil +} +// GetBusinessFlowTemplateId gets the businessFlowTemplateId property value. The business flow template identifier. Required on create. This value is case sensitive. +func (m *AccessReview) GetBusinessFlowTemplateId()(*string) { + return m.businessFlowTemplateId +} +// GetCreatedBy gets the createdBy property value. The user who created this review. +func (m *AccessReview) GetCreatedBy()(UserIdentityable) { + return m.createdBy +} +// GetDecisions gets the decisions property value. The collection of decisions for this access review. +func (m *AccessReview) GetDecisions()([]AccessReviewDecisionable) { + return m.decisions +} +// GetDescription gets the description property value. The description provided by the access review creator, to show to the reviewers. +func (m *AccessReview) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The access review name. Required on create. +func (m *AccessReview) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDateTime gets the endDateTime property value. The DateTime when the review is scheduled to end. This must be at least one day later than the start date. Required on create. +func (m *AccessReview) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["businessFlowTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBusinessFlowTemplateId(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(UserIdentityable)) + } + return nil + } + res["decisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewDecisionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewDecisionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewDecisionable) + } + m.SetDecisions(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["instances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewable) + } + m.SetInstances(res) + } + return nil + } + res["myDecisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewDecisionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewDecisionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewDecisionable) + } + m.SetMyDecisions(res) + } + return nil + } + res["reviewedEntity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewedEntity(val.(Identityable)) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerable) + } + m.SetReviewers(res) + } + return nil + } + res["reviewerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewerType(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(AccessReviewSettingsable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetInstances gets the instances property value. The collection of access reviews instances past, present and future, if this object is a recurring access review. +func (m *AccessReview) GetInstances()([]AccessReviewable) { + return m.instances +} +// GetMyDecisions gets the myDecisions property value. The collection of decisions for the caller, if the caller is a reviewer. +func (m *AccessReview) GetMyDecisions()([]AccessReviewDecisionable) { + return m.myDecisions +} +// GetReviewedEntity gets the reviewedEntity property value. The object for which the access reviews is reviewing the access rights assignments. This can be the group for the review of memberships of users in a group, or the app for a review of assignments of users to an application. Required on create. +func (m *AccessReview) GetReviewedEntity()(Identityable) { + return m.reviewedEntity +} +// GetReviewers gets the reviewers property value. The collection of reviewers for an access review, if access review reviewerType is of type delegated. +func (m *AccessReview) GetReviewers()([]AccessReviewReviewerable) { + return m.reviewers +} +// GetReviewerType gets the reviewerType property value. The relationship type of reviewer to the target object, one of self, delegated or entityOwners. Required on create. +func (m *AccessReview) GetReviewerType()(*string) { + return m.reviewerType +} +// GetSettings gets the settings property value. The settings of an accessReview, see type definition below. +func (m *AccessReview) GetSettings()(AccessReviewSettingsable) { + return m.settings +} +// GetStartDateTime gets the startDateTime property value. The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create. +func (m *AccessReview) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. This read-only field specifies the status of an accessReview. The typical states include Initializing, NotStarted, Starting,InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. +func (m *AccessReview) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("businessFlowTemplateId", m.GetBusinessFlowTemplateId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + if m.GetDecisions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDecisions())) + for i, v := range m.GetDecisions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("decisions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstances())) + for i, v := range m.GetInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("instances", cast) + if err != nil { + return err + } + } + if m.GetMyDecisions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMyDecisions())) + for i, v := range m.GetMyDecisions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("myDecisions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewedEntity", m.GetReviewedEntity()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reviewerType", m.GetReviewerType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetBusinessFlowTemplateId sets the businessFlowTemplateId property value. The business flow template identifier. Required on create. This value is case sensitive. +func (m *AccessReview) SetBusinessFlowTemplateId(value *string)() { + m.businessFlowTemplateId = value +} +// SetCreatedBy sets the createdBy property value. The user who created this review. +func (m *AccessReview) SetCreatedBy(value UserIdentityable)() { + m.createdBy = value +} +// SetDecisions sets the decisions property value. The collection of decisions for this access review. +func (m *AccessReview) SetDecisions(value []AccessReviewDecisionable)() { + m.decisions = value +} +// SetDescription sets the description property value. The description provided by the access review creator, to show to the reviewers. +func (m *AccessReview) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The access review name. Required on create. +func (m *AccessReview) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDateTime sets the endDateTime property value. The DateTime when the review is scheduled to end. This must be at least one day later than the start date. Required on create. +func (m *AccessReview) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetInstances sets the instances property value. The collection of access reviews instances past, present and future, if this object is a recurring access review. +func (m *AccessReview) SetInstances(value []AccessReviewable)() { + m.instances = value +} +// SetMyDecisions sets the myDecisions property value. The collection of decisions for the caller, if the caller is a reviewer. +func (m *AccessReview) SetMyDecisions(value []AccessReviewDecisionable)() { + m.myDecisions = value +} +// SetReviewedEntity sets the reviewedEntity property value. The object for which the access reviews is reviewing the access rights assignments. This can be the group for the review of memberships of users in a group, or the app for a review of assignments of users to an application. Required on create. +func (m *AccessReview) SetReviewedEntity(value Identityable)() { + m.reviewedEntity = value +} +// SetReviewers sets the reviewers property value. The collection of reviewers for an access review, if access review reviewerType is of type delegated. +func (m *AccessReview) SetReviewers(value []AccessReviewReviewerable)() { + m.reviewers = value +} +// SetReviewerType sets the reviewerType property value. The relationship type of reviewer to the target object, one of self, delegated or entityOwners. Required on create. +func (m *AccessReview) SetReviewerType(value *string)() { + m.reviewerType = value +} +// SetSettings sets the settings property value. The settings of an accessReview, see type definition below. +func (m *AccessReview) SetSettings(value AccessReviewSettingsable)() { + m.settings = value +} +// SetStartDateTime sets the startDateTime property value. The DateTime when the review is scheduled to be start. This could be a date in the future. Required on create. +func (m *AccessReview) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. This read-only field specifies the status of an accessReview. The typical states include Initializing, NotStarted, Starting,InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. +func (m *AccessReview) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_apply_action.go b/src/internal/connector/graph/betasdk/models/access_review_apply_action.go new file mode 100644 index 000000000..5540bd532 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_apply_action.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewApplyAction +type AccessReviewApplyAction 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 OdataType property + odataType *string +} +// NewAccessReviewApplyAction instantiates a new accessReviewApplyAction and sets the default values. +func NewAccessReviewApplyAction()(*AccessReviewApplyAction) { + m := &AccessReviewApplyAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewApplyActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewApplyActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.disableAndDeleteUserApplyAction": + return NewDisableAndDeleteUserApplyAction(), nil + case "#microsoft.graph.removeAccessApplyAction": + return NewRemoveAccessApplyAction(), nil + } + } + } + } + return NewAccessReviewApplyAction(), 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 *AccessReviewApplyAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewApplyAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewApplyAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewApplyAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewApplyAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewApplyAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_response.go new file mode 100644 index 000000000..02c4cfcfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewApplyActionCollectionResponse +type AccessReviewApplyActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewApplyActionable +} +// NewAccessReviewApplyActionCollectionResponse instantiates a new AccessReviewApplyActionCollectionResponse and sets the default values. +func NewAccessReviewApplyActionCollectionResponse()(*AccessReviewApplyActionCollectionResponse) { + m := &AccessReviewApplyActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewApplyActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewApplyActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewApplyActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewApplyActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewApplyActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewApplyActionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewApplyActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewApplyActionCollectionResponse) GetValue()([]AccessReviewApplyActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewApplyActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewApplyActionCollectionResponse) SetValue(value []AccessReviewApplyActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_responseable.go new file mode 100644 index 000000000..03a124fe3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_apply_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewApplyActionCollectionResponseable +type AccessReviewApplyActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewApplyActionable) + SetValue(value []AccessReviewApplyActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_apply_actionable.go b/src/internal/connector/graph/betasdk/models/access_review_apply_actionable.go new file mode 100644 index 000000000..3aa24a246 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_apply_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewApplyActionable +type AccessReviewApplyActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_collection_response.go new file mode 100644 index 000000000..80ea3990e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewCollectionResponse +type AccessReviewCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewable +} +// NewAccessReviewCollectionResponse instantiates a new AccessReviewCollectionResponse and sets the default values. +func NewAccessReviewCollectionResponse()(*AccessReviewCollectionResponse) { + m := &AccessReviewCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewCollectionResponse) GetValue()([]AccessReviewable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewCollectionResponse) SetValue(value []AccessReviewable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_collection_responseable.go new file mode 100644 index 000000000..aa46433e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewCollectionResponseable +type AccessReviewCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewable) + SetValue(value []AccessReviewable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_decision.go b/src/internal/connector/graph/betasdk/models/access_review_decision.go new file mode 100644 index 000000000..e68126407 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_decision.go @@ -0,0 +1,269 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewDecision provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewDecision struct { + Entity + // The feature- generated recommendation shown to the reviewer, one of Approve, Deny or NotAvailable. + accessRecommendation *string + // The feature-generated id of the access review. + accessReviewId *string + // When the review completes, if the results were manually applied, the user identity of the user who applied the decision. If the review was auto-applied, the userPrincipalName is empty. + appliedBy UserIdentityable + // The date and time when the review decision was applied. + appliedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The outcome of applying the decision, one of NotApplied, Success, Failed, NotFound or NotSupported. + applyResult *string + // The reviewer's business justification, if supplied. + justification *string + // The identity of the reviewer. If the recommendation was used as the review, the userPrincipalName is empty. + reviewedBy UserIdentityable + // The reviewedDateTime property + reviewedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The result of the review, one of NotReviewed, Deny, DontKnow or Approve. + reviewResult *string +} +// NewAccessReviewDecision instantiates a new accessReviewDecision and sets the default values. +func NewAccessReviewDecision()(*AccessReviewDecision) { + m := &AccessReviewDecision{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewDecisionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewDecisionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewDecision(), nil +} +// GetAccessRecommendation gets the accessRecommendation property value. The feature- generated recommendation shown to the reviewer, one of Approve, Deny or NotAvailable. +func (m *AccessReviewDecision) GetAccessRecommendation()(*string) { + return m.accessRecommendation +} +// GetAccessReviewId gets the accessReviewId property value. The feature-generated id of the access review. +func (m *AccessReviewDecision) GetAccessReviewId()(*string) { + return m.accessReviewId +} +// GetAppliedBy gets the appliedBy property value. When the review completes, if the results were manually applied, the user identity of the user who applied the decision. If the review was auto-applied, the userPrincipalName is empty. +func (m *AccessReviewDecision) GetAppliedBy()(UserIdentityable) { + return m.appliedBy +} +// GetAppliedDateTime gets the appliedDateTime property value. The date and time when the review decision was applied. +func (m *AccessReviewDecision) GetAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.appliedDateTime +} +// GetApplyResult gets the applyResult property value. The outcome of applying the decision, one of NotApplied, Success, Failed, NotFound or NotSupported. +func (m *AccessReviewDecision) GetApplyResult()(*string) { + return m.applyResult +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewDecision) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessRecommendation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessRecommendation(val) + } + return nil + } + res["accessReviewId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessReviewId(val) + } + return nil + } + res["appliedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppliedBy(val.(UserIdentityable)) + } + return nil + } + res["appliedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAppliedDateTime(val) + } + return nil + } + res["applyResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyResult(val) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["reviewedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewedBy(val.(UserIdentityable)) + } + return nil + } + res["reviewedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewedDateTime(val) + } + return nil + } + res["reviewResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewResult(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The reviewer's business justification, if supplied. +func (m *AccessReviewDecision) GetJustification()(*string) { + return m.justification +} +// GetReviewedBy gets the reviewedBy property value. The identity of the reviewer. If the recommendation was used as the review, the userPrincipalName is empty. +func (m *AccessReviewDecision) GetReviewedBy()(UserIdentityable) { + return m.reviewedBy +} +// GetReviewedDateTime gets the reviewedDateTime property value. The reviewedDateTime property +func (m *AccessReviewDecision) GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewedDateTime +} +// GetReviewResult gets the reviewResult property value. The result of the review, one of NotReviewed, Deny, DontKnow or Approve. +func (m *AccessReviewDecision) GetReviewResult()(*string) { + return m.reviewResult +} +// Serialize serializes information the current object +func (m *AccessReviewDecision) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accessRecommendation", m.GetAccessRecommendation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accessReviewId", m.GetAccessReviewId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("appliedBy", m.GetAppliedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("appliedDateTime", m.GetAppliedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("applyResult", m.GetApplyResult()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewedBy", m.GetReviewedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewedDateTime", m.GetReviewedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reviewResult", m.GetReviewResult()) + if err != nil { + return err + } + } + return nil +} +// SetAccessRecommendation sets the accessRecommendation property value. The feature- generated recommendation shown to the reviewer, one of Approve, Deny or NotAvailable. +func (m *AccessReviewDecision) SetAccessRecommendation(value *string)() { + m.accessRecommendation = value +} +// SetAccessReviewId sets the accessReviewId property value. The feature-generated id of the access review. +func (m *AccessReviewDecision) SetAccessReviewId(value *string)() { + m.accessReviewId = value +} +// SetAppliedBy sets the appliedBy property value. When the review completes, if the results were manually applied, the user identity of the user who applied the decision. If the review was auto-applied, the userPrincipalName is empty. +func (m *AccessReviewDecision) SetAppliedBy(value UserIdentityable)() { + m.appliedBy = value +} +// SetAppliedDateTime sets the appliedDateTime property value. The date and time when the review decision was applied. +func (m *AccessReviewDecision) SetAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.appliedDateTime = value +} +// SetApplyResult sets the applyResult property value. The outcome of applying the decision, one of NotApplied, Success, Failed, NotFound or NotSupported. +func (m *AccessReviewDecision) SetApplyResult(value *string)() { + m.applyResult = value +} +// SetJustification sets the justification property value. The reviewer's business justification, if supplied. +func (m *AccessReviewDecision) SetJustification(value *string)() { + m.justification = value +} +// SetReviewedBy sets the reviewedBy property value. The identity of the reviewer. If the recommendation was used as the review, the userPrincipalName is empty. +func (m *AccessReviewDecision) SetReviewedBy(value UserIdentityable)() { + m.reviewedBy = value +} +// SetReviewedDateTime sets the reviewedDateTime property value. The reviewedDateTime property +func (m *AccessReviewDecision) SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewedDateTime = value +} +// SetReviewResult sets the reviewResult property value. The result of the review, one of NotReviewed, Deny, DontKnow or Approve. +func (m *AccessReviewDecision) SetReviewResult(value *string)() { + m.reviewResult = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_decision_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_decision_collection_response.go new file mode 100644 index 000000000..d43e18685 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_decision_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewDecisionCollectionResponse +type AccessReviewDecisionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewDecisionable +} +// NewAccessReviewDecisionCollectionResponse instantiates a new AccessReviewDecisionCollectionResponse and sets the default values. +func NewAccessReviewDecisionCollectionResponse()(*AccessReviewDecisionCollectionResponse) { + m := &AccessReviewDecisionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewDecisionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewDecisionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewDecisionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewDecisionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewDecisionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewDecisionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewDecisionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewDecisionCollectionResponse) GetValue()([]AccessReviewDecisionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewDecisionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewDecisionCollectionResponse) SetValue(value []AccessReviewDecisionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_decision_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_decision_collection_responseable.go new file mode 100644 index 000000000..807d861ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_decision_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewDecisionCollectionResponseable +type AccessReviewDecisionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewDecisionable) + SetValue(value []AccessReviewDecisionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_decisionable.go b/src/internal/connector/graph/betasdk/models/access_review_decisionable.go new file mode 100644 index 000000000..2878cc712 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_decisionable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewDecisionable +type AccessReviewDecisionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessRecommendation()(*string) + GetAccessReviewId()(*string) + GetAppliedBy()(UserIdentityable) + GetAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetApplyResult()(*string) + GetJustification()(*string) + GetReviewedBy()(UserIdentityable) + GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewResult()(*string) + SetAccessRecommendation(value *string)() + SetAccessReviewId(value *string)() + SetAppliedBy(value UserIdentityable)() + SetAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetApplyResult(value *string)() + SetJustification(value *string)() + SetReviewedBy(value UserIdentityable)() + SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewResult(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_error.go b/src/internal/connector/graph/betasdk/models/access_review_error.go new file mode 100644 index 000000000..27aafea15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_error.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewError +type AccessReviewError struct { + GenericError +} +// NewAccessReviewError instantiates a new AccessReviewError and sets the default values. +func NewAccessReviewError()(*AccessReviewError) { + m := &AccessReviewError{ + GenericError: *NewGenericError(), + } + odataTypeValue := "#microsoft.graph.accessReviewError"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewError(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GenericError.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AccessReviewError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GenericError.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_error_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_error_collection_response.go new file mode 100644 index 000000000..c20433a79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewErrorCollectionResponse +type AccessReviewErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewErrorable +} +// NewAccessReviewErrorCollectionResponse instantiates a new AccessReviewErrorCollectionResponse and sets the default values. +func NewAccessReviewErrorCollectionResponse()(*AccessReviewErrorCollectionResponse) { + m := &AccessReviewErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewErrorable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewErrorCollectionResponse) GetValue()([]AccessReviewErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewErrorCollectionResponse) SetValue(value []AccessReviewErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_error_collection_responseable.go new file mode 100644 index 000000000..0f96dca13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewErrorCollectionResponseable +type AccessReviewErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewErrorable) + SetValue(value []AccessReviewErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_errorable.go b/src/internal/connector/graph/betasdk/models/access_review_errorable.go new file mode 100644 index 000000000..81e613a07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_errorable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewErrorable +type AccessReviewErrorable interface { + GenericErrorable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_decision_filter.go b/src/internal/connector/graph/betasdk/models/access_review_history_decision_filter.go new file mode 100644 index 000000000..3062fe4ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_decision_filter.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewHistoryDecisionFilter int + +const ( + APPROVE_ACCESSREVIEWHISTORYDECISIONFILTER AccessReviewHistoryDecisionFilter = iota + DENY_ACCESSREVIEWHISTORYDECISIONFILTER + NOTREVIEWED_ACCESSREVIEWHISTORYDECISIONFILTER + DONTKNOW_ACCESSREVIEWHISTORYDECISIONFILTER + NOTNOTIFIED_ACCESSREVIEWHISTORYDECISIONFILTER + UNKNOWNFUTUREVALUE_ACCESSREVIEWHISTORYDECISIONFILTER +) + +func (i AccessReviewHistoryDecisionFilter) String() string { + return []string{"approve", "deny", "notReviewed", "dontKnow", "notNotified", "unknownFutureValue"}[i] +} +func ParseAccessReviewHistoryDecisionFilter(v string) (interface{}, error) { + result := APPROVE_ACCESSREVIEWHISTORYDECISIONFILTER + switch v { + case "approve": + result = APPROVE_ACCESSREVIEWHISTORYDECISIONFILTER + case "deny": + result = DENY_ACCESSREVIEWHISTORYDECISIONFILTER + case "notReviewed": + result = NOTREVIEWED_ACCESSREVIEWHISTORYDECISIONFILTER + case "dontKnow": + result = DONTKNOW_ACCESSREVIEWHISTORYDECISIONFILTER + case "notNotified": + result = NOTNOTIFIED_ACCESSREVIEWHISTORYDECISIONFILTER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSREVIEWHISTORYDECISIONFILTER + default: + return 0, errors.New("Unknown AccessReviewHistoryDecisionFilter value: " + v) + } + return &result, nil +} +func SerializeAccessReviewHistoryDecisionFilter(values []AccessReviewHistoryDecisionFilter) []string { + 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/access_review_history_definition.go b/src/internal/connector/graph/betasdk/models/access_review_history_definition.go new file mode 100644 index 000000000..58ecbd6d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_definition.go @@ -0,0 +1,368 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewHistoryDefinition struct { + Entity + // The createdBy property + createdBy UserIdentityable + // Timestamp when the access review definition was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Determines which review decisions will be included in the fetched review history data if specified. Optional on create. All decisions will be included by default if no decisions are provided on create. Possible values are: approve, deny, dontKnow, notReviewed, and notNotified. + decisions []AccessReviewHistoryDecisionFilter + // Name for the access review history data collection. Required. + displayName *string + // The downloadUri property + downloadUri *string + // The fulfilledDateTime property + fulfilledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // If the accessReviewHistoryDefinition is a recurring definition, instances represent each recurrence. A definition that does not recur will have exactly one instance. + instances []AccessReviewHistoryInstanceable + // A timestamp. Reviews ending on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. + reviewHistoryPeriodEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A timestamp. Reviews starting on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. + reviewHistoryPeriodStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The settings for a recurring access review history definition series. Only required if reviewHistoryPeriodStartDateTime or reviewHistoryPeriodEndDateTime are not defined. Not supported yet. + scheduleSettings AccessReviewHistoryScheduleSettingsable + // Used to scope what reviews are included in the fetched history data. Fetches reviews whose scope matches with this provided scope. Required. + scopes []AccessReviewScopeable + // Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. + status *AccessReviewHistoryStatus +} +// NewAccessReviewHistoryDefinition instantiates a new accessReviewHistoryDefinition and sets the default values. +func NewAccessReviewHistoryDefinition()(*AccessReviewHistoryDefinition) { + m := &AccessReviewHistoryDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewHistoryDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewHistoryDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewHistoryDefinition(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *AccessReviewHistoryDefinition) GetCreatedBy()(UserIdentityable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp when the access review definition was created. +func (m *AccessReviewHistoryDefinition) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDecisions gets the decisions property value. Determines which review decisions will be included in the fetched review history data if specified. Optional on create. All decisions will be included by default if no decisions are provided on create. Possible values are: approve, deny, dontKnow, notReviewed, and notNotified. +func (m *AccessReviewHistoryDefinition) GetDecisions()([]AccessReviewHistoryDecisionFilter) { + return m.decisions +} +// GetDisplayName gets the displayName property value. Name for the access review history data collection. Required. +func (m *AccessReviewHistoryDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetDownloadUri gets the downloadUri property value. The downloadUri property +func (m *AccessReviewHistoryDefinition) GetDownloadUri()(*string) { + return m.downloadUri +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewHistoryDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(UserIdentityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["decisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAccessReviewHistoryDecisionFilter) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewHistoryDecisionFilter, len(val)) + for i, v := range val { + res[i] = *(v.(*AccessReviewHistoryDecisionFilter)) + } + m.SetDecisions(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["downloadUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUri(val) + } + return nil + } + res["fulfilledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFulfilledDateTime(val) + } + return nil + } + res["instances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewHistoryInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewHistoryInstanceable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewHistoryInstanceable) + } + m.SetInstances(res) + } + return nil + } + res["reviewHistoryPeriodEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewHistoryPeriodEndDateTime(val) + } + return nil + } + res["reviewHistoryPeriodStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewHistoryPeriodStartDateTime(val) + } + return nil + } + res["scheduleSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewHistoryScheduleSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScheduleSettings(val.(AccessReviewHistoryScheduleSettingsable)) + } + return nil + } + res["scopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScopeable) + } + m.SetScopes(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessReviewHistoryStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AccessReviewHistoryStatus)) + } + return nil + } + return res +} +// GetFulfilledDateTime gets the fulfilledDateTime property value. The fulfilledDateTime property +func (m *AccessReviewHistoryDefinition) GetFulfilledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fulfilledDateTime +} +// GetInstances gets the instances property value. If the accessReviewHistoryDefinition is a recurring definition, instances represent each recurrence. A definition that does not recur will have exactly one instance. +func (m *AccessReviewHistoryDefinition) GetInstances()([]AccessReviewHistoryInstanceable) { + return m.instances +} +// GetReviewHistoryPeriodEndDateTime gets the reviewHistoryPeriodEndDateTime property value. A timestamp. Reviews ending on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. +func (m *AccessReviewHistoryDefinition) GetReviewHistoryPeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewHistoryPeriodEndDateTime +} +// GetReviewHistoryPeriodStartDateTime gets the reviewHistoryPeriodStartDateTime property value. A timestamp. Reviews starting on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. +func (m *AccessReviewHistoryDefinition) GetReviewHistoryPeriodStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewHistoryPeriodStartDateTime +} +// GetScheduleSettings gets the scheduleSettings property value. The settings for a recurring access review history definition series. Only required if reviewHistoryPeriodStartDateTime or reviewHistoryPeriodEndDateTime are not defined. Not supported yet. +func (m *AccessReviewHistoryDefinition) GetScheduleSettings()(AccessReviewHistoryScheduleSettingsable) { + return m.scheduleSettings +} +// GetScopes gets the scopes property value. Used to scope what reviews are included in the fetched history data. Fetches reviews whose scope matches with this provided scope. Required. +func (m *AccessReviewHistoryDefinition) GetScopes()([]AccessReviewScopeable) { + return m.scopes +} +// GetStatus gets the status property value. Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. +func (m *AccessReviewHistoryDefinition) GetStatus()(*AccessReviewHistoryStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReviewHistoryDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDecisions() != nil { + err = writer.WriteCollectionOfStringValues("decisions", SerializeAccessReviewHistoryDecisionFilter(m.GetDecisions())) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("downloadUri", m.GetDownloadUri()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("fulfilledDateTime", m.GetFulfilledDateTime()) + if err != nil { + return err + } + } + if m.GetInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstances())) + for i, v := range m.GetInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("instances", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewHistoryPeriodEndDateTime", m.GetReviewHistoryPeriodEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewHistoryPeriodStartDateTime", m.GetReviewHistoryPeriodStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("scheduleSettings", m.GetScheduleSettings()) + if err != nil { + return err + } + } + if m.GetScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScopes())) + for i, v := range m.GetScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scopes", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *AccessReviewHistoryDefinition) SetCreatedBy(value UserIdentityable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp when the access review definition was created. +func (m *AccessReviewHistoryDefinition) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDecisions sets the decisions property value. Determines which review decisions will be included in the fetched review history data if specified. Optional on create. All decisions will be included by default if no decisions are provided on create. Possible values are: approve, deny, dontKnow, notReviewed, and notNotified. +func (m *AccessReviewHistoryDefinition) SetDecisions(value []AccessReviewHistoryDecisionFilter)() { + m.decisions = value +} +// SetDisplayName sets the displayName property value. Name for the access review history data collection. Required. +func (m *AccessReviewHistoryDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDownloadUri sets the downloadUri property value. The downloadUri property +func (m *AccessReviewHistoryDefinition) SetDownloadUri(value *string)() { + m.downloadUri = value +} +// SetFulfilledDateTime sets the fulfilledDateTime property value. The fulfilledDateTime property +func (m *AccessReviewHistoryDefinition) SetFulfilledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fulfilledDateTime = value +} +// SetInstances sets the instances property value. If the accessReviewHistoryDefinition is a recurring definition, instances represent each recurrence. A definition that does not recur will have exactly one instance. +func (m *AccessReviewHistoryDefinition) SetInstances(value []AccessReviewHistoryInstanceable)() { + m.instances = value +} +// SetReviewHistoryPeriodEndDateTime sets the reviewHistoryPeriodEndDateTime property value. A timestamp. Reviews ending on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. +func (m *AccessReviewHistoryDefinition) SetReviewHistoryPeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewHistoryPeriodEndDateTime = value +} +// SetReviewHistoryPeriodStartDateTime sets the reviewHistoryPeriodStartDateTime property value. A timestamp. Reviews starting on or before this date will be included in the fetched history data. Only required if scheduleSettings is not defined. +func (m *AccessReviewHistoryDefinition) SetReviewHistoryPeriodStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewHistoryPeriodStartDateTime = value +} +// SetScheduleSettings sets the scheduleSettings property value. The settings for a recurring access review history definition series. Only required if reviewHistoryPeriodStartDateTime or reviewHistoryPeriodEndDateTime are not defined. Not supported yet. +func (m *AccessReviewHistoryDefinition) SetScheduleSettings(value AccessReviewHistoryScheduleSettingsable)() { + m.scheduleSettings = value +} +// SetScopes sets the scopes property value. Used to scope what reviews are included in the fetched history data. Fetches reviews whose scope matches with this provided scope. Required. +func (m *AccessReviewHistoryDefinition) SetScopes(value []AccessReviewScopeable)() { + m.scopes = value +} +// SetStatus sets the status property value. Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. +func (m *AccessReviewHistoryDefinition) SetStatus(value *AccessReviewHistoryStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_response.go new file mode 100644 index 000000000..03408d701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryDefinitionCollectionResponse +type AccessReviewHistoryDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewHistoryDefinitionable +} +// NewAccessReviewHistoryDefinitionCollectionResponse instantiates a new AccessReviewHistoryDefinitionCollectionResponse and sets the default values. +func NewAccessReviewHistoryDefinitionCollectionResponse()(*AccessReviewHistoryDefinitionCollectionResponse) { + m := &AccessReviewHistoryDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewHistoryDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewHistoryDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewHistoryDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewHistoryDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewHistoryDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewHistoryDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewHistoryDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewHistoryDefinitionCollectionResponse) GetValue()([]AccessReviewHistoryDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewHistoryDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewHistoryDefinitionCollectionResponse) SetValue(value []AccessReviewHistoryDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_responseable.go new file mode 100644 index 000000000..152055478 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryDefinitionCollectionResponseable +type AccessReviewHistoryDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewHistoryDefinitionable) + SetValue(value []AccessReviewHistoryDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_definitionable.go b/src/internal/connector/graph/betasdk/models/access_review_history_definitionable.go new file mode 100644 index 000000000..7f5f4a52f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_definitionable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryDefinitionable +type AccessReviewHistoryDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(UserIdentityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDecisions()([]AccessReviewHistoryDecisionFilter) + GetDisplayName()(*string) + GetDownloadUri()(*string) + GetFulfilledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInstances()([]AccessReviewHistoryInstanceable) + GetReviewHistoryPeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewHistoryPeriodStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetScheduleSettings()(AccessReviewHistoryScheduleSettingsable) + GetScopes()([]AccessReviewScopeable) + GetStatus()(*AccessReviewHistoryStatus) + SetCreatedBy(value UserIdentityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDecisions(value []AccessReviewHistoryDecisionFilter)() + SetDisplayName(value *string)() + SetDownloadUri(value *string)() + SetFulfilledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInstances(value []AccessReviewHistoryInstanceable)() + SetReviewHistoryPeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewHistoryPeriodStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetScheduleSettings(value AccessReviewHistoryScheduleSettingsable)() + SetScopes(value []AccessReviewScopeable)() + SetStatus(value *AccessReviewHistoryStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_instance.go b/src/internal/connector/graph/betasdk/models/access_review_history_instance.go new file mode 100644 index 000000000..f9ad5ad2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_instance.go @@ -0,0 +1,218 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryInstance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewHistoryInstance struct { + Entity + // Uri which can be used to retrieve review history data. This URI will be active for 24 hours after being generated. Required. + downloadUri *string + // Timestamp when this instance and associated data expires and the history is deleted. Required. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp when all of the available data for this instance was collected. This will be set after this instance's status is set to done. Required. + fulfilledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp, reviews ending on or before this date will be included in the fetched history data. + reviewHistoryPeriodEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp, reviews starting on or after this date will be included in the fetched history data. + reviewHistoryPeriodStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp when the instance's history data is scheduled to be generated. + runDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. Once the status has been marked as done, a link can be generated to retrieve the instance's data by calling generateDownloadUri method. + status *AccessReviewHistoryStatus +} +// NewAccessReviewHistoryInstance instantiates a new accessReviewHistoryInstance and sets the default values. +func NewAccessReviewHistoryInstance()(*AccessReviewHistoryInstance) { + m := &AccessReviewHistoryInstance{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewHistoryInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewHistoryInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewHistoryInstance(), nil +} +// GetDownloadUri gets the downloadUri property value. Uri which can be used to retrieve review history data. This URI will be active for 24 hours after being generated. Required. +func (m *AccessReviewHistoryInstance) GetDownloadUri()(*string) { + return m.downloadUri +} +// GetExpirationDateTime gets the expirationDateTime property value. Timestamp when this instance and associated data expires and the history is deleted. Required. +func (m *AccessReviewHistoryInstance) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewHistoryInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["downloadUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadUri(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["fulfilledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFulfilledDateTime(val) + } + return nil + } + res["reviewHistoryPeriodEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewHistoryPeriodEndDateTime(val) + } + return nil + } + res["reviewHistoryPeriodStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewHistoryPeriodStartDateTime(val) + } + return nil + } + res["runDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRunDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessReviewHistoryStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AccessReviewHistoryStatus)) + } + return nil + } + return res +} +// GetFulfilledDateTime gets the fulfilledDateTime property value. Timestamp when all of the available data for this instance was collected. This will be set after this instance's status is set to done. Required. +func (m *AccessReviewHistoryInstance) GetFulfilledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.fulfilledDateTime +} +// GetReviewHistoryPeriodEndDateTime gets the reviewHistoryPeriodEndDateTime property value. Timestamp, reviews ending on or before this date will be included in the fetched history data. +func (m *AccessReviewHistoryInstance) GetReviewHistoryPeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewHistoryPeriodEndDateTime +} +// GetReviewHistoryPeriodStartDateTime gets the reviewHistoryPeriodStartDateTime property value. Timestamp, reviews starting on or after this date will be included in the fetched history data. +func (m *AccessReviewHistoryInstance) GetReviewHistoryPeriodStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewHistoryPeriodStartDateTime +} +// GetRunDateTime gets the runDateTime property value. Timestamp when the instance's history data is scheduled to be generated. +func (m *AccessReviewHistoryInstance) GetRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.runDateTime +} +// GetStatus gets the status property value. Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. Once the status has been marked as done, a link can be generated to retrieve the instance's data by calling generateDownloadUri method. +func (m *AccessReviewHistoryInstance) GetStatus()(*AccessReviewHistoryStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReviewHistoryInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("downloadUri", m.GetDownloadUri()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("fulfilledDateTime", m.GetFulfilledDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewHistoryPeriodEndDateTime", m.GetReviewHistoryPeriodEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewHistoryPeriodStartDateTime", m.GetReviewHistoryPeriodStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("runDateTime", m.GetRunDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDownloadUri sets the downloadUri property value. Uri which can be used to retrieve review history data. This URI will be active for 24 hours after being generated. Required. +func (m *AccessReviewHistoryInstance) SetDownloadUri(value *string)() { + m.downloadUri = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Timestamp when this instance and associated data expires and the history is deleted. Required. +func (m *AccessReviewHistoryInstance) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetFulfilledDateTime sets the fulfilledDateTime property value. Timestamp when all of the available data for this instance was collected. This will be set after this instance's status is set to done. Required. +func (m *AccessReviewHistoryInstance) SetFulfilledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.fulfilledDateTime = value +} +// SetReviewHistoryPeriodEndDateTime sets the reviewHistoryPeriodEndDateTime property value. Timestamp, reviews ending on or before this date will be included in the fetched history data. +func (m *AccessReviewHistoryInstance) SetReviewHistoryPeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewHistoryPeriodEndDateTime = value +} +// SetReviewHistoryPeriodStartDateTime sets the reviewHistoryPeriodStartDateTime property value. Timestamp, reviews starting on or after this date will be included in the fetched history data. +func (m *AccessReviewHistoryInstance) SetReviewHistoryPeriodStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewHistoryPeriodStartDateTime = value +} +// SetRunDateTime sets the runDateTime property value. Timestamp when the instance's history data is scheduled to be generated. +func (m *AccessReviewHistoryInstance) SetRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.runDateTime = value +} +// SetStatus sets the status property value. Represents the status of the review history data collection. The possible values are: done, inProgress, error, requested, unknownFutureValue. Once the status has been marked as done, a link can be generated to retrieve the instance's data by calling generateDownloadUri method. +func (m *AccessReviewHistoryInstance) SetStatus(value *AccessReviewHistoryStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_response.go new file mode 100644 index 000000000..5d7da97ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryInstanceCollectionResponse +type AccessReviewHistoryInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewHistoryInstanceable +} +// NewAccessReviewHistoryInstanceCollectionResponse instantiates a new AccessReviewHistoryInstanceCollectionResponse and sets the default values. +func NewAccessReviewHistoryInstanceCollectionResponse()(*AccessReviewHistoryInstanceCollectionResponse) { + m := &AccessReviewHistoryInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewHistoryInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewHistoryInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewHistoryInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewHistoryInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewHistoryInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewHistoryInstanceable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewHistoryInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewHistoryInstanceCollectionResponse) GetValue()([]AccessReviewHistoryInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewHistoryInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewHistoryInstanceCollectionResponse) SetValue(value []AccessReviewHistoryInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_responseable.go new file mode 100644 index 000000000..bc11306bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryInstanceCollectionResponseable +type AccessReviewHistoryInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewHistoryInstanceable) + SetValue(value []AccessReviewHistoryInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_instanceable.go b/src/internal/connector/graph/betasdk/models/access_review_history_instanceable.go new file mode 100644 index 000000000..256bd11b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_instanceable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryInstanceable +type AccessReviewHistoryInstanceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDownloadUri()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFulfilledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewHistoryPeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewHistoryPeriodStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*AccessReviewHistoryStatus) + SetDownloadUri(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFulfilledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewHistoryPeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewHistoryPeriodStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *AccessReviewHistoryStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settings.go b/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settings.go new file mode 100644 index 000000000..372799cb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryScheduleSettings +type AccessReviewHistoryScheduleSettings 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 OdataType property + odataType *string + // The recurrence property + recurrence PatternedRecurrenceable + // A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the 1st of every month, the reportRange is P1M. In this case, on the first of every month, access review history data will be collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required. + reportRange *string +} +// NewAccessReviewHistoryScheduleSettings instantiates a new accessReviewHistoryScheduleSettings and sets the default values. +func NewAccessReviewHistoryScheduleSettings()(*AccessReviewHistoryScheduleSettings) { + m := &AccessReviewHistoryScheduleSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewHistoryScheduleSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewHistoryScheduleSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewHistoryScheduleSettings(), 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 *AccessReviewHistoryScheduleSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewHistoryScheduleSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["reportRange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRange(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewHistoryScheduleSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrence gets the recurrence property value. The recurrence property +func (m *AccessReviewHistoryScheduleSettings) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetReportRange gets the reportRange property value. A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the 1st of every month, the reportRange is P1M. In this case, on the first of every month, access review history data will be collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required. +func (m *AccessReviewHistoryScheduleSettings) GetReportRange()(*string) { + return m.reportRange +} +// Serialize serializes information the current object +func (m *AccessReviewHistoryScheduleSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reportRange", m.GetReportRange()) + 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 *AccessReviewHistoryScheduleSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewHistoryScheduleSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrence sets the recurrence property value. The recurrence property +func (m *AccessReviewHistoryScheduleSettings) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetReportRange sets the reportRange property value. A duration string in ISO 8601 duration format specifying the lookback period of the generated review history data. For example, if a history definition is scheduled to run on the 1st of every month, the reportRange is P1M. In this case, on the first of every month, access review history data will be collected containing only the previous month's review data. Note: Only years, months, and days ISO 8601 properties are supported. Required. +func (m *AccessReviewHistoryScheduleSettings) SetReportRange(value *string)() { + m.reportRange = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settingsable.go b/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settingsable.go new file mode 100644 index 000000000..3e035cd16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_schedule_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewHistoryScheduleSettingsable +type AccessReviewHistoryScheduleSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRecurrence()(PatternedRecurrenceable) + GetReportRange()(*string) + SetOdataType(value *string)() + SetRecurrence(value PatternedRecurrenceable)() + SetReportRange(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_history_status.go b/src/internal/connector/graph/betasdk/models/access_review_history_status.go new file mode 100644 index 000000000..400a02c47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_history_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewHistoryStatus int + +const ( + DONE_ACCESSREVIEWHISTORYSTATUS AccessReviewHistoryStatus = iota + INPROGRESS_ACCESSREVIEWHISTORYSTATUS + ERROR_ACCESSREVIEWHISTORYSTATUS + REQUESTED_ACCESSREVIEWHISTORYSTATUS + UNKNOWNFUTUREVALUE_ACCESSREVIEWHISTORYSTATUS +) + +func (i AccessReviewHistoryStatus) String() string { + return []string{"done", "inprogress", "error", "requested", "unknownFutureValue"}[i] +} +func ParseAccessReviewHistoryStatus(v string) (interface{}, error) { + result := DONE_ACCESSREVIEWHISTORYSTATUS + switch v { + case "done": + result = DONE_ACCESSREVIEWHISTORYSTATUS + case "inprogress": + result = INPROGRESS_ACCESSREVIEWHISTORYSTATUS + case "error": + result = ERROR_ACCESSREVIEWHISTORYSTATUS + case "requested": + result = REQUESTED_ACCESSREVIEWHISTORYSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSREVIEWHISTORYSTATUS + default: + return 0, errors.New("Unknown AccessReviewHistoryStatus value: " + v) + } + return &result, nil +} +func SerializeAccessReviewHistoryStatus(values []AccessReviewHistoryStatus) []string { + 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/access_review_inactive_users_query_scope.go b/src/internal/connector/graph/betasdk/models/access_review_inactive_users_query_scope.go new file mode 100644 index 000000000..1ff3fb2cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_inactive_users_query_scope.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInactiveUsersQueryScope +type AccessReviewInactiveUsersQueryScope struct { + AccessReviewQueryScope + // Defines the duration of inactivity. Inactivity is based on the last sign in date of the user compared to the access review instance's start date. If this property is not specified, it's assigned the default value PT0S. + inactiveDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewAccessReviewInactiveUsersQueryScope instantiates a new AccessReviewInactiveUsersQueryScope and sets the default values. +func NewAccessReviewInactiveUsersQueryScope()(*AccessReviewInactiveUsersQueryScope) { + m := &AccessReviewInactiveUsersQueryScope{ + AccessReviewQueryScope: *NewAccessReviewQueryScope(), + } + odataTypeValue := "#microsoft.graph.accessReviewInactiveUsersQueryScope"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInactiveUsersQueryScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInactiveUsersQueryScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInactiveUsersQueryScope(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInactiveUsersQueryScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewQueryScope.GetFieldDeserializers() + res["inactiveDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetInactiveDuration(val) + } + return nil + } + return res +} +// GetInactiveDuration gets the inactiveDuration property value. Defines the duration of inactivity. Inactivity is based on the last sign in date of the user compared to the access review instance's start date. If this property is not specified, it's assigned the default value PT0S. +func (m *AccessReviewInactiveUsersQueryScope) GetInactiveDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.inactiveDuration +} +// Serialize serializes information the current object +func (m *AccessReviewInactiveUsersQueryScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewQueryScope.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("inactiveDuration", m.GetInactiveDuration()) + if err != nil { + return err + } + } + return nil +} +// SetInactiveDuration sets the inactiveDuration property value. Defines the duration of inactivity. Inactivity is based on the last sign in date of the user compared to the access review instance's start date. If this property is not specified, it's assigned the default value PT0S. +func (m *AccessReviewInactiveUsersQueryScope) SetInactiveDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.inactiveDuration = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_inactive_users_query_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_inactive_users_query_scopeable.go new file mode 100644 index 000000000..daf67c920 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_inactive_users_query_scopeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInactiveUsersQueryScopeable +type AccessReviewInactiveUsersQueryScopeable interface { + AccessReviewQueryScopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInactiveDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetInactiveDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance.go b/src/internal/connector/graph/betasdk/models/access_review_instance.go new file mode 100644 index 000000000..f0ee6998f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance.go @@ -0,0 +1,369 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewInstance struct { + Entity + // Returns the collection of reviewers who were contacted to complete this review. While the reviewers and fallbackReviewers properties of the accessReviewScheduleDefinition might specify group owners or managers as reviewers, contactedReviewers returns their individual identities. Supports $select. Read-only. + contactedReviewers []AccessReviewReviewerable + // Each user reviewed in an accessReviewInstance has a decision item representing if they were approved, denied, or not yet reviewed. + decisions []AccessReviewInstanceDecisionItemable + // There is exactly one accessReviewScheduleDefinition associated with each instance. It is the parent schedule for the instance, where instances are created for each recurrence of a review definition and each group selected to review by the definition. + definition AccessReviewScheduleDefinitionable + // DateTime when review instance is scheduled to end.The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Collection of errors in an access review instance lifecycle. Read-only. + errors []AccessReviewErrorable + // This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. Supports $select. + fallbackReviewers []AccessReviewReviewerScopeable + // This collection of access review scopes is used to define who the reviewers are. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. + reviewers []AccessReviewReviewerScopeable + // Created based on scope and instanceEnumerationScope at the accessReviewScheduleDefinition level. Defines the scope of users reviewed in a group. Supports $select and $filter (contains only). Read-only. + scope AccessReviewScopeable + // If the instance has multiple stages, this returns the collection of stages. A new stage will only be created when the previous stage ends. The existence, number, and settings of stages on a review instance are created based on the accessReviewStageSettings on the parent accessReviewScheduleDefinition. + stages []AccessReviewStageable + // DateTime when review instance is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the status of an accessReview. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. + status *string +} +// NewAccessReviewInstance instantiates a new accessReviewInstance and sets the default values. +func NewAccessReviewInstance()(*AccessReviewInstance) { + m := &AccessReviewInstance{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstance(), nil +} +// GetContactedReviewers gets the contactedReviewers property value. Returns the collection of reviewers who were contacted to complete this review. While the reviewers and fallbackReviewers properties of the accessReviewScheduleDefinition might specify group owners or managers as reviewers, contactedReviewers returns their individual identities. Supports $select. Read-only. +func (m *AccessReviewInstance) GetContactedReviewers()([]AccessReviewReviewerable) { + return m.contactedReviewers +} +// GetDecisions gets the decisions property value. Each user reviewed in an accessReviewInstance has a decision item representing if they were approved, denied, or not yet reviewed. +func (m *AccessReviewInstance) GetDecisions()([]AccessReviewInstanceDecisionItemable) { + return m.decisions +} +// GetDefinition gets the definition property value. There is exactly one accessReviewScheduleDefinition associated with each instance. It is the parent schedule for the instance, where instances are created for each recurrence of a review definition and each group selected to review by the definition. +func (m *AccessReviewInstance) GetDefinition()(AccessReviewScheduleDefinitionable) { + return m.definition +} +// GetEndDateTime gets the endDateTime property value. DateTime when review instance is scheduled to end.The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstance) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetErrors gets the errors property value. Collection of errors in an access review instance lifecycle. Read-only. +func (m *AccessReviewInstance) GetErrors()([]AccessReviewErrorable) { + return m.errors +} +// GetFallbackReviewers gets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. Supports $select. +func (m *AccessReviewInstance) GetFallbackReviewers()([]AccessReviewReviewerScopeable) { + return m.fallbackReviewers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contactedReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerable) + } + m.SetContactedReviewers(res) + } + return nil + } + res["decisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceDecisionItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceDecisionItemable) + } + m.SetDecisions(res) + } + return nil + } + res["definition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScheduleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinition(val.(AccessReviewScheduleDefinitionable)) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewErrorable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewErrorable) + } + m.SetErrors(res) + } + return nil + } + res["fallbackReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetFallbackReviewers(res) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetReviewers(res) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(AccessReviewScopeable)) + } + return nil + } + res["stages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewStageable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewStageable) + } + m.SetStages(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetReviewers gets the reviewers property value. This collection of access review scopes is used to define who the reviewers are. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. +func (m *AccessReviewInstance) GetReviewers()([]AccessReviewReviewerScopeable) { + return m.reviewers +} +// GetScope gets the scope property value. Created based on scope and instanceEnumerationScope at the accessReviewScheduleDefinition level. Defines the scope of users reviewed in a group. Supports $select and $filter (contains only). Read-only. +func (m *AccessReviewInstance) GetScope()(AccessReviewScopeable) { + return m.scope +} +// GetStages gets the stages property value. If the instance has multiple stages, this returns the collection of stages. A new stage will only be created when the previous stage ends. The existence, number, and settings of stages on a review instance are created based on the accessReviewStageSettings on the parent accessReviewScheduleDefinition. +func (m *AccessReviewInstance) GetStages()([]AccessReviewStageable) { + return m.stages +} +// GetStartDateTime gets the startDateTime property value. DateTime when review instance is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstance) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. Specifies the status of an accessReview. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstance) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReviewInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetContactedReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContactedReviewers())) + for i, v := range m.GetContactedReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contactedReviewers", cast) + if err != nil { + return err + } + } + if m.GetDecisions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDecisions())) + for i, v := range m.GetDecisions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("decisions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definition", m.GetDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("errors", cast) + if err != nil { + return err + } + } + if m.GetFallbackReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFallbackReviewers())) + for i, v := range m.GetFallbackReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fallbackReviewers", cast) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("scope", m.GetScope()) + if err != nil { + return err + } + } + if m.GetStages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStages())) + for i, v := range m.GetStages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("stages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetContactedReviewers sets the contactedReviewers property value. Returns the collection of reviewers who were contacted to complete this review. While the reviewers and fallbackReviewers properties of the accessReviewScheduleDefinition might specify group owners or managers as reviewers, contactedReviewers returns their individual identities. Supports $select. Read-only. +func (m *AccessReviewInstance) SetContactedReviewers(value []AccessReviewReviewerable)() { + m.contactedReviewers = value +} +// SetDecisions sets the decisions property value. Each user reviewed in an accessReviewInstance has a decision item representing if they were approved, denied, or not yet reviewed. +func (m *AccessReviewInstance) SetDecisions(value []AccessReviewInstanceDecisionItemable)() { + m.decisions = value +} +// SetDefinition sets the definition property value. There is exactly one accessReviewScheduleDefinition associated with each instance. It is the parent schedule for the instance, where instances are created for each recurrence of a review definition and each group selected to review by the definition. +func (m *AccessReviewInstance) SetDefinition(value AccessReviewScheduleDefinitionable)() { + m.definition = value +} +// SetEndDateTime sets the endDateTime property value. DateTime when review instance is scheduled to end.The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstance) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetErrors sets the errors property value. Collection of errors in an access review instance lifecycle. Read-only. +func (m *AccessReviewInstance) SetErrors(value []AccessReviewErrorable)() { + m.errors = value +} +// SetFallbackReviewers sets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. Supports $select. +func (m *AccessReviewInstance) SetFallbackReviewers(value []AccessReviewReviewerScopeable)() { + m.fallbackReviewers = value +} +// SetReviewers sets the reviewers property value. This collection of access review scopes is used to define who the reviewers are. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. +func (m *AccessReviewInstance) SetReviewers(value []AccessReviewReviewerScopeable)() { + m.reviewers = value +} +// SetScope sets the scope property value. Created based on scope and instanceEnumerationScope at the accessReviewScheduleDefinition level. Defines the scope of users reviewed in a group. Supports $select and $filter (contains only). Read-only. +func (m *AccessReviewInstance) SetScope(value AccessReviewScopeable)() { + m.scope = value +} +// SetStages sets the stages property value. If the instance has multiple stages, this returns the collection of stages. A new stage will only be created when the previous stage ends. The existence, number, and settings of stages on a review instance are created based on the accessReviewStageSettings on the parent accessReviewScheduleDefinition. +func (m *AccessReviewInstance) SetStages(value []AccessReviewStageable)() { + m.stages = value +} +// SetStartDateTime sets the startDateTime property value. DateTime when review instance is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstance) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. Specifies the status of an accessReview. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstance) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_instance_collection_response.go new file mode 100644 index 000000000..1072baf90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceCollectionResponse +type AccessReviewInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewInstanceable +} +// NewAccessReviewInstanceCollectionResponse instantiates a new AccessReviewInstanceCollectionResponse and sets the default values. +func NewAccessReviewInstanceCollectionResponse()(*AccessReviewInstanceCollectionResponse) { + m := &AccessReviewInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewInstanceCollectionResponse) GetValue()([]AccessReviewInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewInstanceCollectionResponse) SetValue(value []AccessReviewInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_collection_responseable.go new file mode 100644 index 000000000..36c51155d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceCollectionResponseable +type AccessReviewInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewInstanceable) + SetValue(value []AccessReviewInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item.go new file mode 100644 index 000000000..882619ff5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item.go @@ -0,0 +1,485 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewInstanceDecisionItem struct { + Entity + // The identifier of the accessReviewInstance parent. Supports $select. Read-only. + accessReviewId *string + // The identifier of the user who applied the decision. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't applied the decision or it was automatically applied. Read-only. + appliedBy UserIdentityable + // The timestamp when the approval decision was applied. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. + appliedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The result of applying the decision. Possible values: New, AppliedSuccessfully, AppliedWithUnknownFailure, AppliedSuccessfullyButObjectNotFound and ApplyNotSupported. Supports $select, $orderby, and $filter (eq only). Read-only. + applyResult *string + // Result of the review. Possible values: Approve, Deny, NotReviewed, or DontKnow. Supports $select, $orderby, and $filter (eq only). + decision *string + // Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. + insights []GovernanceInsightable + // There is exactly one accessReviewInstance associated with each decision. The instance is the parent of the decision item, representing the recurrence of the access review the decision is made on. + instance AccessReviewInstanceable + // Justification left by the reviewer when they made the decision. + justification *string + // Every decision item in an access review represents a principal's access to a resource. This property represents details of the principal. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is 'Bob' and the resource is 'Sales'. Principals can be of two types - userIdentity and servicePrincipalIdentity. Supports $select. Read-only. + principal Identityable + // Link to the principal object. For example: https://graph.microsoft.com/v1.0/users/a6c7aecb-cbfd-4763-87ef-e91b4bd509d9. Read-only. + principalLink *string + // Every decision item in an access review represents a principal's membership to a resource. This property provides the details of the membership. For example, whether the principal has direct access or indirect access to the resource. Supports $select. Read-only. + principalResourceMembership DecisionItemPrincipalResourceMembershipable + // A system-generated recommendation for the approval decision based off last interactive sign-in to tenant. Recommend approve if sign-in is within thirty days of start of review. Recommend deny if sign-in is greater than thirty days of start of review. Recommendation not available otherwise. Possible values: Approve, Deny, or NoInfoAvailable. Supports $select, $orderby, and $filter (eq only). Read-only. + recommendation *string + // Every decision item in an access review represents a principal's access to a resource. This property represents details of the resource. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is Bob and the resource is 'Sales'. Resources can be of multiple types. See accessReviewInstanceDecisionItemResource. Read-only. + resource AccessReviewInstanceDecisionItemResourceable + // A link to the resource. For example, https://graph.microsoft.com/v1.0/servicePrincipals/c86300f3-8695-4320-9f6e-32a2555f5ff8. Supports $select. Read-only. + resourceLink *string + // The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Supports $select. Read-only. + reviewedBy UserIdentityable + // The timestamp when the review decision occurred. Supports $select. Read-only. + reviewedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The target of this specific decision. Decision targets can be of different types – each one with its own specific properties. See accessReviewInstanceDecisionItemTarget. Read-only. This property has been replaced by the principal and resource properties in v1.0. + target AccessReviewInstanceDecisionItemTargetable +} +// NewAccessReviewInstanceDecisionItem instantiates a new accessReviewInstanceDecisionItem and sets the default values. +func NewAccessReviewInstanceDecisionItem()(*AccessReviewInstanceDecisionItem) { + m := &AccessReviewInstanceDecisionItem{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItem(), nil +} +// GetAccessReviewId gets the accessReviewId property value. The identifier of the accessReviewInstance parent. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetAccessReviewId()(*string) { + return m.accessReviewId +} +// GetAppliedBy gets the appliedBy property value. The identifier of the user who applied the decision. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't applied the decision or it was automatically applied. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetAppliedBy()(UserIdentityable) { + return m.appliedBy +} +// GetAppliedDateTime gets the appliedDateTime property value. The timestamp when the approval decision was applied. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.appliedDateTime +} +// GetApplyResult gets the applyResult property value. The result of applying the decision. Possible values: New, AppliedSuccessfully, AppliedWithUnknownFailure, AppliedSuccessfullyButObjectNotFound and ApplyNotSupported. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstanceDecisionItem) GetApplyResult()(*string) { + return m.applyResult +} +// GetDecision gets the decision property value. Result of the review. Possible values: Approve, Deny, NotReviewed, or DontKnow. Supports $select, $orderby, and $filter (eq only). +func (m *AccessReviewInstanceDecisionItem) GetDecision()(*string) { + return m.decision +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessReviewId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessReviewId(val) + } + return nil + } + res["appliedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppliedBy(val.(UserIdentityable)) + } + return nil + } + res["appliedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAppliedDateTime(val) + } + return nil + } + res["applyResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyResult(val) + } + return nil + } + res["decision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDecision(val) + } + return nil + } + res["insights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceInsightable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceInsightable) + } + m.SetInsights(res) + } + return nil + } + res["instance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstance(val.(AccessReviewInstanceable)) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(Identityable)) + } + return nil + } + res["principalLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalLink(val) + } + return nil + } + res["principalResourceMembership"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDecisionItemPrincipalResourceMembershipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipalResourceMembership(val.(DecisionItemPrincipalResourceMembershipable)) + } + return nil + } + res["recommendation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendation(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewInstanceDecisionItemResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(AccessReviewInstanceDecisionItemResourceable)) + } + return nil + } + res["resourceLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceLink(val) + } + return nil + } + res["reviewedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewedBy(val.(UserIdentityable)) + } + return nil + } + res["reviewedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewedDateTime(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewInstanceDecisionItemTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(AccessReviewInstanceDecisionItemTargetable)) + } + return nil + } + return res +} +// GetInsights gets the insights property value. Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. +func (m *AccessReviewInstanceDecisionItem) GetInsights()([]GovernanceInsightable) { + return m.insights +} +// GetInstance gets the instance property value. There is exactly one accessReviewInstance associated with each decision. The instance is the parent of the decision item, representing the recurrence of the access review the decision is made on. +func (m *AccessReviewInstanceDecisionItem) GetInstance()(AccessReviewInstanceable) { + return m.instance +} +// GetJustification gets the justification property value. Justification left by the reviewer when they made the decision. +func (m *AccessReviewInstanceDecisionItem) GetJustification()(*string) { + return m.justification +} +// GetPrincipal gets the principal property value. Every decision item in an access review represents a principal's access to a resource. This property represents details of the principal. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is 'Bob' and the resource is 'Sales'. Principals can be of two types - userIdentity and servicePrincipalIdentity. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetPrincipal()(Identityable) { + return m.principal +} +// GetPrincipalLink gets the principalLink property value. Link to the principal object. For example: https://graph.microsoft.com/v1.0/users/a6c7aecb-cbfd-4763-87ef-e91b4bd509d9. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetPrincipalLink()(*string) { + return m.principalLink +} +// GetPrincipalResourceMembership gets the principalResourceMembership property value. Every decision item in an access review represents a principal's membership to a resource. This property provides the details of the membership. For example, whether the principal has direct access or indirect access to the resource. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetPrincipalResourceMembership()(DecisionItemPrincipalResourceMembershipable) { + return m.principalResourceMembership +} +// GetRecommendation gets the recommendation property value. A system-generated recommendation for the approval decision based off last interactive sign-in to tenant. Recommend approve if sign-in is within thirty days of start of review. Recommend deny if sign-in is greater than thirty days of start of review. Recommendation not available otherwise. Possible values: Approve, Deny, or NoInfoAvailable. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstanceDecisionItem) GetRecommendation()(*string) { + return m.recommendation +} +// GetResource gets the resource property value. Every decision item in an access review represents a principal's access to a resource. This property represents details of the resource. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is Bob and the resource is 'Sales'. Resources can be of multiple types. See accessReviewInstanceDecisionItemResource. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetResource()(AccessReviewInstanceDecisionItemResourceable) { + return m.resource +} +// GetResourceLink gets the resourceLink property value. A link to the resource. For example, https://graph.microsoft.com/v1.0/servicePrincipals/c86300f3-8695-4320-9f6e-32a2555f5ff8. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetResourceLink()(*string) { + return m.resourceLink +} +// GetReviewedBy gets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetReviewedBy()(UserIdentityable) { + return m.reviewedBy +} +// GetReviewedDateTime gets the reviewedDateTime property value. The timestamp when the review decision occurred. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewedDateTime +} +// GetTarget gets the target property value. The target of this specific decision. Decision targets can be of different types – each one with its own specific properties. See accessReviewInstanceDecisionItemTarget. Read-only. This property has been replaced by the principal and resource properties in v1.0. +func (m *AccessReviewInstanceDecisionItem) GetTarget()(AccessReviewInstanceDecisionItemTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accessReviewId", m.GetAccessReviewId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("appliedBy", m.GetAppliedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("appliedDateTime", m.GetAppliedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("applyResult", m.GetApplyResult()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("decision", m.GetDecision()) + if err != nil { + return err + } + } + if m.GetInsights() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInsights())) + for i, v := range m.GetInsights() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("insights", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("instance", m.GetInstance()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalLink", m.GetPrincipalLink()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principalResourceMembership", m.GetPrincipalResourceMembership()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recommendation", m.GetRecommendation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceLink", m.GetResourceLink()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewedBy", m.GetReviewedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewedDateTime", m.GetReviewedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetAccessReviewId sets the accessReviewId property value. The identifier of the accessReviewInstance parent. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetAccessReviewId(value *string)() { + m.accessReviewId = value +} +// SetAppliedBy sets the appliedBy property value. The identifier of the user who applied the decision. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't applied the decision or it was automatically applied. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetAppliedBy(value UserIdentityable)() { + m.appliedBy = value +} +// SetAppliedDateTime sets the appliedDateTime property value. The timestamp when the approval decision was applied. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.appliedDateTime = value +} +// SetApplyResult sets the applyResult property value. The result of applying the decision. Possible values: New, AppliedSuccessfully, AppliedWithUnknownFailure, AppliedSuccessfullyButObjectNotFound and ApplyNotSupported. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstanceDecisionItem) SetApplyResult(value *string)() { + m.applyResult = value +} +// SetDecision sets the decision property value. Result of the review. Possible values: Approve, Deny, NotReviewed, or DontKnow. Supports $select, $orderby, and $filter (eq only). +func (m *AccessReviewInstanceDecisionItem) SetDecision(value *string)() { + m.decision = value +} +// SetInsights sets the insights property value. Insights are recommendations to reviewers on whether to approve or deny a decision. There can be multiple insights associated with an accessReviewInstanceDecisionItem. +func (m *AccessReviewInstanceDecisionItem) SetInsights(value []GovernanceInsightable)() { + m.insights = value +} +// SetInstance sets the instance property value. There is exactly one accessReviewInstance associated with each decision. The instance is the parent of the decision item, representing the recurrence of the access review the decision is made on. +func (m *AccessReviewInstanceDecisionItem) SetInstance(value AccessReviewInstanceable)() { + m.instance = value +} +// SetJustification sets the justification property value. Justification left by the reviewer when they made the decision. +func (m *AccessReviewInstanceDecisionItem) SetJustification(value *string)() { + m.justification = value +} +// SetPrincipal sets the principal property value. Every decision item in an access review represents a principal's access to a resource. This property represents details of the principal. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is 'Bob' and the resource is 'Sales'. Principals can be of two types - userIdentity and servicePrincipalIdentity. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetPrincipal(value Identityable)() { + m.principal = value +} +// SetPrincipalLink sets the principalLink property value. Link to the principal object. For example: https://graph.microsoft.com/v1.0/users/a6c7aecb-cbfd-4763-87ef-e91b4bd509d9. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetPrincipalLink(value *string)() { + m.principalLink = value +} +// SetPrincipalResourceMembership sets the principalResourceMembership property value. Every decision item in an access review represents a principal's membership to a resource. This property provides the details of the membership. For example, whether the principal has direct access or indirect access to the resource. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetPrincipalResourceMembership(value DecisionItemPrincipalResourceMembershipable)() { + m.principalResourceMembership = value +} +// SetRecommendation sets the recommendation property value. A system-generated recommendation for the approval decision based off last interactive sign-in to tenant. Recommend approve if sign-in is within thirty days of start of review. Recommend deny if sign-in is greater than thirty days of start of review. Recommendation not available otherwise. Possible values: Approve, Deny, or NoInfoAvailable. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewInstanceDecisionItem) SetRecommendation(value *string)() { + m.recommendation = value +} +// SetResource sets the resource property value. Every decision item in an access review represents a principal's access to a resource. This property represents details of the resource. For example, if a decision item represents access of User 'Bob' to Group 'Sales' - The principal is Bob and the resource is 'Sales'. Resources can be of multiple types. See accessReviewInstanceDecisionItemResource. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetResource(value AccessReviewInstanceDecisionItemResourceable)() { + m.resource = value +} +// SetResourceLink sets the resourceLink property value. A link to the resource. For example, https://graph.microsoft.com/v1.0/servicePrincipals/c86300f3-8695-4320-9f6e-32a2555f5ff8. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetResourceLink(value *string)() { + m.resourceLink = value +} +// SetReviewedBy sets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetReviewedBy(value UserIdentityable)() { + m.reviewedBy = value +} +// SetReviewedDateTime sets the reviewedDateTime property value. The timestamp when the review decision occurred. Supports $select. Read-only. +func (m *AccessReviewInstanceDecisionItem) SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewedDateTime = value +} +// SetTarget sets the target property value. The target of this specific decision. Decision targets can be of different types – each one with its own specific properties. See accessReviewInstanceDecisionItemTarget. Read-only. This property has been replaced by the principal and resource properties in v1.0. +func (m *AccessReviewInstanceDecisionItem) SetTarget(value AccessReviewInstanceDecisionItemTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resource.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resource.go new file mode 100644 index 000000000..dcb4dfc00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resource.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource +type AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource struct { + AccessReviewInstanceDecisionItemResource + // Display name of the access package to which access has been granted. + accessPackageDisplayName *string + // Identifier of the access package to which access has been granted. + accessPackageId *string +} +// NewAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource instantiates a new AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource and sets the default values. +func NewAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource()(*AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) { + m := &AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource{ + AccessReviewInstanceDecisionItemResource: *NewAccessReviewInstanceDecisionItemResource(), + } + odataTypeValue := "#microsoft.graph.accessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource(), nil +} +// GetAccessPackageDisplayName gets the accessPackageDisplayName property value. Display name of the access package to which access has been granted. +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) GetAccessPackageDisplayName()(*string) { + return m.accessPackageDisplayName +} +// GetAccessPackageId gets the accessPackageId property value. Identifier of the access package to which access has been granted. +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) GetAccessPackageId()(*string) { + return m.accessPackageId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewInstanceDecisionItemResource.GetFieldDeserializers() + res["accessPackageDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageDisplayName(val) + } + return nil + } + res["accessPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessPackageId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewInstanceDecisionItemResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accessPackageDisplayName", m.GetAccessPackageDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accessPackageId", m.GetAccessPackageId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageDisplayName sets the accessPackageDisplayName property value. Display name of the access package to which access has been granted. +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) SetAccessPackageDisplayName(value *string)() { + m.accessPackageDisplayName = value +} +// SetAccessPackageId sets the accessPackageId property value. Identifier of the access package to which access has been granted. +func (m *AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource) SetAccessPackageId(value *string)() { + m.accessPackageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resourceable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resourceable.go new file mode 100644 index 000000000..110916e6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_access_package_assignment_policy_resourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResourceable +type AccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResourceable interface { + AccessReviewInstanceDecisionItemResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageDisplayName()(*string) + GetAccessPackageId()(*string) + SetAccessPackageDisplayName(value *string)() + SetAccessPackageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resource.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resource.go new file mode 100644 index 000000000..6cd82d46d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemAzureRoleResource +type AccessReviewInstanceDecisionItemAzureRoleResource struct { + AccessReviewInstanceDecisionItemResource + // Details of the scope this role is associated with. + scope AccessReviewInstanceDecisionItemResourceable +} +// NewAccessReviewInstanceDecisionItemAzureRoleResource instantiates a new AccessReviewInstanceDecisionItemAzureRoleResource and sets the default values. +func NewAccessReviewInstanceDecisionItemAzureRoleResource()(*AccessReviewInstanceDecisionItemAzureRoleResource) { + m := &AccessReviewInstanceDecisionItemAzureRoleResource{ + AccessReviewInstanceDecisionItemResource: *NewAccessReviewInstanceDecisionItemResource(), + } + odataTypeValue := "#microsoft.graph.accessReviewInstanceDecisionItemAzureRoleResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInstanceDecisionItemAzureRoleResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemAzureRoleResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemAzureRoleResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemAzureRoleResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewInstanceDecisionItemResource.GetFieldDeserializers() + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewInstanceDecisionItemResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(AccessReviewInstanceDecisionItemResourceable)) + } + return nil + } + return res +} +// GetScope gets the scope property value. Details of the scope this role is associated with. +func (m *AccessReviewInstanceDecisionItemAzureRoleResource) GetScope()(AccessReviewInstanceDecisionItemResourceable) { + return m.scope +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemAzureRoleResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewInstanceDecisionItemResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("scope", m.GetScope()) + if err != nil { + return err + } + } + return nil +} +// SetScope sets the scope property value. Details of the scope this role is associated with. +func (m *AccessReviewInstanceDecisionItemAzureRoleResource) SetScope(value AccessReviewInstanceDecisionItemResourceable)() { + m.scope = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resourceable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resourceable.go new file mode 100644 index 000000000..bd7085ff4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_azure_role_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemAzureRoleResourceable +type AccessReviewInstanceDecisionItemAzureRoleResourceable interface { + AccessReviewInstanceDecisionItemResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScope()(AccessReviewInstanceDecisionItemResourceable) + SetScope(value AccessReviewInstanceDecisionItemResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_response.go new file mode 100644 index 000000000..15dce3ee4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemCollectionResponse +type AccessReviewInstanceDecisionItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewInstanceDecisionItemable +} +// NewAccessReviewInstanceDecisionItemCollectionResponse instantiates a new AccessReviewInstanceDecisionItemCollectionResponse and sets the default values. +func NewAccessReviewInstanceDecisionItemCollectionResponse()(*AccessReviewInstanceDecisionItemCollectionResponse) { + m := &AccessReviewInstanceDecisionItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewInstanceDecisionItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceDecisionItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceDecisionItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewInstanceDecisionItemCollectionResponse) GetValue()([]AccessReviewInstanceDecisionItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewInstanceDecisionItemCollectionResponse) SetValue(value []AccessReviewInstanceDecisionItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_responseable.go new file mode 100644 index 000000000..a0e113b06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemCollectionResponseable +type AccessReviewInstanceDecisionItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewInstanceDecisionItemable) + SetValue(value []AccessReviewInstanceDecisionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resource.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resource.go new file mode 100644 index 000000000..feca7752d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resource.go @@ -0,0 +1,171 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemResource +type AccessReviewInstanceDecisionItemResource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name of the resource + displayName *string + // Resource ID + id *string + // The OdataType property + odataType *string + // Type of resource. Types include: Group, ServicePrincipal, DirectoryRole, AzureRole, AccessPackageAssignmentPolicy. + type_escaped *string +} +// NewAccessReviewInstanceDecisionItemResource instantiates a new accessReviewInstanceDecisionItemResource and sets the default values. +func NewAccessReviewInstanceDecisionItemResource()(*AccessReviewInstanceDecisionItemResource) { + m := &AccessReviewInstanceDecisionItemResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewInstanceDecisionItemResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource": + return NewAccessReviewInstanceDecisionItemAccessPackageAssignmentPolicyResource(), nil + case "#microsoft.graph.accessReviewInstanceDecisionItemAzureRoleResource": + return NewAccessReviewInstanceDecisionItemAzureRoleResource(), nil + case "#microsoft.graph.accessReviewInstanceDecisionItemServicePrincipalResource": + return NewAccessReviewInstanceDecisionItemServicePrincipalResource(), nil + } + } + } + } + return NewAccessReviewInstanceDecisionItemResource(), 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 *AccessReviewInstanceDecisionItemResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name of the resource +func (m *AccessReviewInstanceDecisionItemResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetId gets the id property value. Resource ID +func (m *AccessReviewInstanceDecisionItemResource) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewInstanceDecisionItemResource) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Type of resource. Types include: Group, ServicePrincipal, DirectoryRole, AzureRole, AccessPackageAssignmentPolicy. +func (m *AccessReviewInstanceDecisionItemResource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *AccessReviewInstanceDecisionItemResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name of the resource +func (m *AccessReviewInstanceDecisionItemResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. Resource ID +func (m *AccessReviewInstanceDecisionItemResource) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewInstanceDecisionItemResource) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Type of resource. Types include: Group, ServicePrincipal, DirectoryRole, AzureRole, AccessPackageAssignmentPolicy. +func (m *AccessReviewInstanceDecisionItemResource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resourceable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resourceable.go new file mode 100644 index 000000000..176b621e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_resourceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemResourceable +type AccessReviewInstanceDecisionItemResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + GetType()(*string) + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resource.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resource.go new file mode 100644 index 000000000..74be6a70a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemServicePrincipalResource +type AccessReviewInstanceDecisionItemServicePrincipalResource struct { + AccessReviewInstanceDecisionItemResource + // The appId property + appId *string +} +// NewAccessReviewInstanceDecisionItemServicePrincipalResource instantiates a new AccessReviewInstanceDecisionItemServicePrincipalResource and sets the default values. +func NewAccessReviewInstanceDecisionItemServicePrincipalResource()(*AccessReviewInstanceDecisionItemServicePrincipalResource) { + m := &AccessReviewInstanceDecisionItemServicePrincipalResource{ + AccessReviewInstanceDecisionItemResource: *NewAccessReviewInstanceDecisionItemResource(), + } + odataTypeValue := "#microsoft.graph.accessReviewInstanceDecisionItemServicePrincipalResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInstanceDecisionItemServicePrincipalResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemServicePrincipalResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemServicePrincipalResource(), nil +} +// GetAppId gets the appId property value. The appId property +func (m *AccessReviewInstanceDecisionItemServicePrincipalResource) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemServicePrincipalResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewInstanceDecisionItemResource.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemServicePrincipalResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewInstanceDecisionItemResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. The appId property +func (m *AccessReviewInstanceDecisionItemServicePrincipalResource) SetAppId(value *string)() { + m.appId = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resourceable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resourceable.go new file mode 100644 index 000000000..30ffde95a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemServicePrincipalResourceable +type AccessReviewInstanceDecisionItemServicePrincipalResourceable interface { + AccessReviewInstanceDecisionItemResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + SetAppId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_target.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_target.go new file mode 100644 index 000000000..b1b876b1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_target.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemServicePrincipalTarget +type AccessReviewInstanceDecisionItemServicePrincipalTarget struct { + AccessReviewInstanceDecisionItemTarget + // The appId for the service principal entity being reviewed. + appId *string + // The display name of the service principal whose access is being reviewed. + servicePrincipalDisplayName *string + // The servicePrincipalId property + servicePrincipalId *string +} +// NewAccessReviewInstanceDecisionItemServicePrincipalTarget instantiates a new AccessReviewInstanceDecisionItemServicePrincipalTarget and sets the default values. +func NewAccessReviewInstanceDecisionItemServicePrincipalTarget()(*AccessReviewInstanceDecisionItemServicePrincipalTarget) { + m := &AccessReviewInstanceDecisionItemServicePrincipalTarget{ + AccessReviewInstanceDecisionItemTarget: *NewAccessReviewInstanceDecisionItemTarget(), + } + odataTypeValue := "#microsoft.graph.accessReviewInstanceDecisionItemServicePrincipalTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInstanceDecisionItemServicePrincipalTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemServicePrincipalTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemServicePrincipalTarget(), nil +} +// GetAppId gets the appId property value. The appId for the service principal entity being reviewed. +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewInstanceDecisionItemTarget.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["servicePrincipalDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalDisplayName(val) + } + return nil + } + res["servicePrincipalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalId(val) + } + return nil + } + return res +} +// GetServicePrincipalDisplayName gets the servicePrincipalDisplayName property value. The display name of the service principal whose access is being reviewed. +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) GetServicePrincipalDisplayName()(*string) { + return m.servicePrincipalDisplayName +} +// GetServicePrincipalId gets the servicePrincipalId property value. The servicePrincipalId property +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) GetServicePrincipalId()(*string) { + return m.servicePrincipalId +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewInstanceDecisionItemTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalDisplayName", m.GetServicePrincipalDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalId", m.GetServicePrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. The appId for the service principal entity being reviewed. +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) SetAppId(value *string)() { + m.appId = value +} +// SetServicePrincipalDisplayName sets the servicePrincipalDisplayName property value. The display name of the service principal whose access is being reviewed. +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) SetServicePrincipalDisplayName(value *string)() { + m.servicePrincipalDisplayName = value +} +// SetServicePrincipalId sets the servicePrincipalId property value. The servicePrincipalId property +func (m *AccessReviewInstanceDecisionItemServicePrincipalTarget) SetServicePrincipalId(value *string)() { + m.servicePrincipalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_targetable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_targetable.go new file mode 100644 index 000000000..32a29237a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_service_principal_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemServicePrincipalTargetable +type AccessReviewInstanceDecisionItemServicePrincipalTargetable interface { + AccessReviewInstanceDecisionItemTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetServicePrincipalDisplayName()(*string) + GetServicePrincipalId()(*string) + SetAppId(value *string)() + SetServicePrincipalDisplayName(value *string)() + SetServicePrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_target.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_target.go new file mode 100644 index 000000000..c8d38e654 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_target.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemTarget +type AccessReviewInstanceDecisionItemTarget 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 OdataType property + odataType *string +} +// NewAccessReviewInstanceDecisionItemTarget instantiates a new accessReviewInstanceDecisionItemTarget and sets the default values. +func NewAccessReviewInstanceDecisionItemTarget()(*AccessReviewInstanceDecisionItemTarget) { + m := &AccessReviewInstanceDecisionItemTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewInstanceDecisionItemTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewInstanceDecisionItemServicePrincipalTarget": + return NewAccessReviewInstanceDecisionItemServicePrincipalTarget(), nil + case "#microsoft.graph.accessReviewInstanceDecisionItemUserTarget": + return NewAccessReviewInstanceDecisionItemUserTarget(), nil + } + } + } + } + return NewAccessReviewInstanceDecisionItemTarget(), 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 *AccessReviewInstanceDecisionItemTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewInstanceDecisionItemTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewInstanceDecisionItemTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewInstanceDecisionItemTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_targetable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_targetable.go new file mode 100644 index 000000000..b93aa7621 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemTargetable +type AccessReviewInstanceDecisionItemTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_target.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_target.go new file mode 100644 index 000000000..2d03f1ec6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_target.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemUserTarget +type AccessReviewInstanceDecisionItemUserTarget struct { + AccessReviewInstanceDecisionItemTarget + // The name of user. + userDisplayName *string + // The identifier of user. + userId *string + // The user principal name. + userPrincipalName *string +} +// NewAccessReviewInstanceDecisionItemUserTarget instantiates a new AccessReviewInstanceDecisionItemUserTarget and sets the default values. +func NewAccessReviewInstanceDecisionItemUserTarget()(*AccessReviewInstanceDecisionItemUserTarget) { + m := &AccessReviewInstanceDecisionItemUserTarget{ + AccessReviewInstanceDecisionItemTarget: *NewAccessReviewInstanceDecisionItemTarget(), + } + odataTypeValue := "#microsoft.graph.accessReviewInstanceDecisionItemUserTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewInstanceDecisionItemUserTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewInstanceDecisionItemUserTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewInstanceDecisionItemUserTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewInstanceDecisionItemUserTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewInstanceDecisionItemTarget.GetFieldDeserializers() + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserDisplayName gets the userDisplayName property value. The name of user. +func (m *AccessReviewInstanceDecisionItemUserTarget) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserId gets the userId property value. The identifier of user. +func (m *AccessReviewInstanceDecisionItemUserTarget) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name. +func (m *AccessReviewInstanceDecisionItemUserTarget) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *AccessReviewInstanceDecisionItemUserTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewInstanceDecisionItemTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetUserDisplayName sets the userDisplayName property value. The name of user. +func (m *AccessReviewInstanceDecisionItemUserTarget) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserId sets the userId property value. The identifier of user. +func (m *AccessReviewInstanceDecisionItemUserTarget) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name. +func (m *AccessReviewInstanceDecisionItemUserTarget) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_targetable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_targetable.go new file mode 100644 index 000000000..714cc6ce0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_item_user_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemUserTargetable +type AccessReviewInstanceDecisionItemUserTargetable interface { + AccessReviewInstanceDecisionItemTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserDisplayName()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + SetUserDisplayName(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instance_decision_itemable.go b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_itemable.go new file mode 100644 index 000000000..7ac82af7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instance_decision_itemable.go @@ -0,0 +1,46 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceDecisionItemable +type AccessReviewInstanceDecisionItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessReviewId()(*string) + GetAppliedBy()(UserIdentityable) + GetAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetApplyResult()(*string) + GetDecision()(*string) + GetInsights()([]GovernanceInsightable) + GetInstance()(AccessReviewInstanceable) + GetJustification()(*string) + GetPrincipal()(Identityable) + GetPrincipalLink()(*string) + GetPrincipalResourceMembership()(DecisionItemPrincipalResourceMembershipable) + GetRecommendation()(*string) + GetResource()(AccessReviewInstanceDecisionItemResourceable) + GetResourceLink()(*string) + GetReviewedBy()(UserIdentityable) + GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTarget()(AccessReviewInstanceDecisionItemTargetable) + SetAccessReviewId(value *string)() + SetAppliedBy(value UserIdentityable)() + SetAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetApplyResult(value *string)() + SetDecision(value *string)() + SetInsights(value []GovernanceInsightable)() + SetInstance(value AccessReviewInstanceable)() + SetJustification(value *string)() + SetPrincipal(value Identityable)() + SetPrincipalLink(value *string)() + SetPrincipalResourceMembership(value DecisionItemPrincipalResourceMembershipable)() + SetRecommendation(value *string)() + SetResource(value AccessReviewInstanceDecisionItemResourceable)() + SetResourceLink(value *string)() + SetReviewedBy(value UserIdentityable)() + SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTarget(value AccessReviewInstanceDecisionItemTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_instanceable.go b/src/internal/connector/graph/betasdk/models/access_review_instanceable.go new file mode 100644 index 000000000..425397b54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_instanceable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewInstanceable +type AccessReviewInstanceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContactedReviewers()([]AccessReviewReviewerable) + GetDecisions()([]AccessReviewInstanceDecisionItemable) + GetDefinition()(AccessReviewScheduleDefinitionable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetErrors()([]AccessReviewErrorable) + GetFallbackReviewers()([]AccessReviewReviewerScopeable) + GetReviewers()([]AccessReviewReviewerScopeable) + GetScope()(AccessReviewScopeable) + GetStages()([]AccessReviewStageable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + SetContactedReviewers(value []AccessReviewReviewerable)() + SetDecisions(value []AccessReviewInstanceDecisionItemable)() + SetDefinition(value AccessReviewScheduleDefinitionable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetErrors(value []AccessReviewErrorable)() + SetFallbackReviewers(value []AccessReviewReviewerScopeable)() + SetReviewers(value []AccessReviewReviewerScopeable)() + SetScope(value AccessReviewScopeable)() + SetStages(value []AccessReviewStageable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item.go new file mode 100644 index 000000000..b5038cdd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientItem +type AccessReviewNotificationRecipientItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Determines the recipient of the notification email. + notificationRecipientScope AccessReviewNotificationRecipientScopeable + // Indicates the type of access review email to be sent. Supported template type is CompletedAdditionalRecipients which sends review completion notifications to the recipients. + notificationTemplateType *string + // The OdataType property + odataType *string +} +// NewAccessReviewNotificationRecipientItem instantiates a new accessReviewNotificationRecipientItem and sets the default values. +func NewAccessReviewNotificationRecipientItem()(*AccessReviewNotificationRecipientItem) { + m := &AccessReviewNotificationRecipientItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewNotificationRecipientItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewNotificationRecipientItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewNotificationRecipientItem(), 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 *AccessReviewNotificationRecipientItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewNotificationRecipientItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["notificationRecipientScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewNotificationRecipientScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotificationRecipientScope(val.(AccessReviewNotificationRecipientScopeable)) + } + return nil + } + res["notificationTemplateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationTemplateType(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 + } + return res +} +// GetNotificationRecipientScope gets the notificationRecipientScope property value. Determines the recipient of the notification email. +func (m *AccessReviewNotificationRecipientItem) GetNotificationRecipientScope()(AccessReviewNotificationRecipientScopeable) { + return m.notificationRecipientScope +} +// GetNotificationTemplateType gets the notificationTemplateType property value. Indicates the type of access review email to be sent. Supported template type is CompletedAdditionalRecipients which sends review completion notifications to the recipients. +func (m *AccessReviewNotificationRecipientItem) GetNotificationTemplateType()(*string) { + return m.notificationTemplateType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewNotificationRecipientItem) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewNotificationRecipientItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("notificationRecipientScope", m.GetNotificationRecipientScope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notificationTemplateType", m.GetNotificationTemplateType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewNotificationRecipientItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNotificationRecipientScope sets the notificationRecipientScope property value. Determines the recipient of the notification email. +func (m *AccessReviewNotificationRecipientItem) SetNotificationRecipientScope(value AccessReviewNotificationRecipientScopeable)() { + m.notificationRecipientScope = value +} +// SetNotificationTemplateType sets the notificationTemplateType property value. Indicates the type of access review email to be sent. Supported template type is CompletedAdditionalRecipients which sends review completion notifications to the recipients. +func (m *AccessReviewNotificationRecipientItem) SetNotificationTemplateType(value *string)() { + m.notificationTemplateType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewNotificationRecipientItem) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_response.go new file mode 100644 index 000000000..db4505022 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientItemCollectionResponse +type AccessReviewNotificationRecipientItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewNotificationRecipientItemable +} +// NewAccessReviewNotificationRecipientItemCollectionResponse instantiates a new AccessReviewNotificationRecipientItemCollectionResponse and sets the default values. +func NewAccessReviewNotificationRecipientItemCollectionResponse()(*AccessReviewNotificationRecipientItemCollectionResponse) { + m := &AccessReviewNotificationRecipientItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewNotificationRecipientItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewNotificationRecipientItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewNotificationRecipientItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewNotificationRecipientItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewNotificationRecipientItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewNotificationRecipientItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewNotificationRecipientItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewNotificationRecipientItemCollectionResponse) GetValue()([]AccessReviewNotificationRecipientItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewNotificationRecipientItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewNotificationRecipientItemCollectionResponse) SetValue(value []AccessReviewNotificationRecipientItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_responseable.go new file mode 100644 index 000000000..c1686581a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientItemCollectionResponseable +type AccessReviewNotificationRecipientItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewNotificationRecipientItemable) + SetValue(value []AccessReviewNotificationRecipientItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_itemable.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_itemable.go new file mode 100644 index 000000000..5baaf964a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientItemable +type AccessReviewNotificationRecipientItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNotificationRecipientScope()(AccessReviewNotificationRecipientScopeable) + GetNotificationTemplateType()(*string) + GetOdataType()(*string) + SetNotificationRecipientScope(value AccessReviewNotificationRecipientScopeable)() + SetNotificationTemplateType(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scope.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scope.go new file mode 100644 index 000000000..d821ab815 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scope.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientQueryScope +type AccessReviewNotificationRecipientQueryScope struct { + AccessReviewNotificationRecipientScope + // This represents the query for who the recipients are. For example, /groups/{group id}/members for group members and /users/{user id} for a specific user. + query *string + // In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query that is, ./manager) is specified. + queryRoot *string + // Indicates the type of query. Allowed value is MicrosoftGraph. + queryType *string +} +// NewAccessReviewNotificationRecipientQueryScope instantiates a new AccessReviewNotificationRecipientQueryScope and sets the default values. +func NewAccessReviewNotificationRecipientQueryScope()(*AccessReviewNotificationRecipientQueryScope) { + m := &AccessReviewNotificationRecipientQueryScope{ + AccessReviewNotificationRecipientScope: *NewAccessReviewNotificationRecipientScope(), + } + odataTypeValue := "#microsoft.graph.accessReviewNotificationRecipientQueryScope"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewNotificationRecipientQueryScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewNotificationRecipientQueryScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewNotificationRecipientQueryScope(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewNotificationRecipientQueryScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewNotificationRecipientScope.GetFieldDeserializers() + res["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + res["queryRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryRoot(val) + } + return nil + } + res["queryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryType(val) + } + return nil + } + return res +} +// GetQuery gets the query property value. This represents the query for who the recipients are. For example, /groups/{group id}/members for group members and /users/{user id} for a specific user. +func (m *AccessReviewNotificationRecipientQueryScope) GetQuery()(*string) { + return m.query +} +// GetQueryRoot gets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query that is, ./manager) is specified. +func (m *AccessReviewNotificationRecipientQueryScope) GetQueryRoot()(*string) { + return m.queryRoot +} +// GetQueryType gets the queryType property value. Indicates the type of query. Allowed value is MicrosoftGraph. +func (m *AccessReviewNotificationRecipientQueryScope) GetQueryType()(*string) { + return m.queryType +} +// Serialize serializes information the current object +func (m *AccessReviewNotificationRecipientQueryScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewNotificationRecipientScope.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryRoot", m.GetQueryRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryType", m.GetQueryType()) + if err != nil { + return err + } + } + return nil +} +// SetQuery sets the query property value. This represents the query for who the recipients are. For example, /groups/{group id}/members for group members and /users/{user id} for a specific user. +func (m *AccessReviewNotificationRecipientQueryScope) SetQuery(value *string)() { + m.query = value +} +// SetQueryRoot sets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query that is, ./manager) is specified. +func (m *AccessReviewNotificationRecipientQueryScope) SetQueryRoot(value *string)() { + m.queryRoot = value +} +// SetQueryType sets the queryType property value. Indicates the type of query. Allowed value is MicrosoftGraph. +func (m *AccessReviewNotificationRecipientQueryScope) SetQueryType(value *string)() { + m.queryType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scopeable.go new file mode 100644 index 000000000..b473107b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_query_scopeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientQueryScopeable +type AccessReviewNotificationRecipientQueryScopeable interface { + AccessReviewNotificationRecipientScopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetQuery()(*string) + GetQueryRoot()(*string) + GetQueryType()(*string) + SetQuery(value *string)() + SetQueryRoot(value *string)() + SetQueryType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scope.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scope.go new file mode 100644 index 000000000..6008cdd54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scope.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientScope +type AccessReviewNotificationRecipientScope 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 OdataType property + odataType *string +} +// NewAccessReviewNotificationRecipientScope instantiates a new accessReviewNotificationRecipientScope and sets the default values. +func NewAccessReviewNotificationRecipientScope()(*AccessReviewNotificationRecipientScope) { + m := &AccessReviewNotificationRecipientScope{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewNotificationRecipientScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewNotificationRecipientScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewNotificationRecipientQueryScope": + return NewAccessReviewNotificationRecipientQueryScope(), nil + } + } + } + } + return NewAccessReviewNotificationRecipientScope(), 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 *AccessReviewNotificationRecipientScope) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewNotificationRecipientScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewNotificationRecipientScope) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewNotificationRecipientScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewNotificationRecipientScope) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewNotificationRecipientScope) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scopeable.go new file mode 100644 index 000000000..bc2bcfc70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_notification_recipient_scopeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewNotificationRecipientScopeable +type AccessReviewNotificationRecipientScopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_policy.go b/src/internal/connector/graph/betasdk/models/access_review_policy.go new file mode 100644 index 000000000..234475c88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_policy.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewPolicy +type AccessReviewPolicy struct { + Entity + // Description for this policy. Read-only. + description *string + // Display name for this policy. Read-only. + displayName *string + // If true, group owners can create and manage access reviews on groups they own. + isGroupOwnerManagementEnabled *bool +} +// NewAccessReviewPolicy instantiates a new accessReviewPolicy and sets the default values. +func NewAccessReviewPolicy()(*AccessReviewPolicy) { + m := &AccessReviewPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewPolicy(), nil +} +// GetDescription gets the description property value. Description for this policy. Read-only. +func (m *AccessReviewPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for this policy. Read-only. +func (m *AccessReviewPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isGroupOwnerManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsGroupOwnerManagementEnabled(val) + } + return nil + } + return res +} +// GetIsGroupOwnerManagementEnabled gets the isGroupOwnerManagementEnabled property value. If true, group owners can create and manage access reviews on groups they own. +func (m *AccessReviewPolicy) GetIsGroupOwnerManagementEnabled()(*bool) { + return m.isGroupOwnerManagementEnabled +} +// Serialize serializes information the current object +func (m *AccessReviewPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isGroupOwnerManagementEnabled", m.GetIsGroupOwnerManagementEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description for this policy. Read-only. +func (m *AccessReviewPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for this policy. Read-only. +func (m *AccessReviewPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsGroupOwnerManagementEnabled sets the isGroupOwnerManagementEnabled property value. If true, group owners can create and manage access reviews on groups they own. +func (m *AccessReviewPolicy) SetIsGroupOwnerManagementEnabled(value *bool)() { + m.isGroupOwnerManagementEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_policyable.go b/src/internal/connector/graph/betasdk/models/access_review_policyable.go new file mode 100644 index 000000000..019709ad5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewPolicyable +type AccessReviewPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIsGroupOwnerManagementEnabled()(*bool) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsGroupOwnerManagementEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_query_scope.go b/src/internal/connector/graph/betasdk/models/access_review_query_scope.go new file mode 100644 index 000000000..ae0ce8c4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_query_scope.go @@ -0,0 +1,132 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewQueryScope +type AccessReviewQueryScope struct { + AccessReviewScope + // The query representing what will be reviewed in an access review. + query *string + // In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query is specified. For example, ./manager. + queryRoot *string + // Indicates the type of query. Types include MicrosoftGraph and ARM. + queryType *string +} +// NewAccessReviewQueryScope instantiates a new AccessReviewQueryScope and sets the default values. +func NewAccessReviewQueryScope()(*AccessReviewQueryScope) { + m := &AccessReviewQueryScope{ + AccessReviewScope: *NewAccessReviewScope(), + } + odataTypeValue := "#microsoft.graph.accessReviewQueryScope"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewQueryScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewQueryScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewInactiveUsersQueryScope": + return NewAccessReviewInactiveUsersQueryScope(), nil + } + } + } + } + return NewAccessReviewQueryScope(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewQueryScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewScope.GetFieldDeserializers() + res["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + res["queryRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryRoot(val) + } + return nil + } + res["queryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryType(val) + } + return nil + } + return res +} +// GetQuery gets the query property value. The query representing what will be reviewed in an access review. +func (m *AccessReviewQueryScope) GetQuery()(*string) { + return m.query +} +// GetQueryRoot gets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query is specified. For example, ./manager. +func (m *AccessReviewQueryScope) GetQueryRoot()(*string) { + return m.queryRoot +} +// GetQueryType gets the queryType property value. Indicates the type of query. Types include MicrosoftGraph and ARM. +func (m *AccessReviewQueryScope) GetQueryType()(*string) { + return m.queryType +} +// Serialize serializes information the current object +func (m *AccessReviewQueryScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewScope.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryRoot", m.GetQueryRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryType", m.GetQueryType()) + if err != nil { + return err + } + } + return nil +} +// SetQuery sets the query property value. The query representing what will be reviewed in an access review. +func (m *AccessReviewQueryScope) SetQuery(value *string)() { + m.query = value +} +// SetQueryRoot sets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query is specified. For example, ./manager. +func (m *AccessReviewQueryScope) SetQueryRoot(value *string)() { + m.queryRoot = value +} +// SetQueryType sets the queryType property value. Indicates the type of query. Types include MicrosoftGraph and ARM. +func (m *AccessReviewQueryScope) SetQueryType(value *string)() { + m.queryType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_query_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_query_scopeable.go new file mode 100644 index 000000000..73e5e366c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_query_scopeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewQueryScopeable +type AccessReviewQueryScopeable interface { + AccessReviewScopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetQuery()(*string) + GetQueryRoot()(*string) + GetQueryType()(*string) + SetQuery(value *string)() + SetQueryRoot(value *string)() + SetQueryType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting.go b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting.go new file mode 100644 index 000000000..c849d6cd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecommendationInsightSetting +type AccessReviewRecommendationInsightSetting 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 OdataType property + odataType *string +} +// NewAccessReviewRecommendationInsightSetting instantiates a new accessReviewRecommendationInsightSetting and sets the default values. +func NewAccessReviewRecommendationInsightSetting()(*AccessReviewRecommendationInsightSetting) { + m := &AccessReviewRecommendationInsightSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewRecommendationInsightSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewRecommendationInsightSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupPeerOutlierRecommendationInsightSettings": + return NewGroupPeerOutlierRecommendationInsightSettings(), nil + case "#microsoft.graph.userLastSignInRecommendationInsightSetting": + return NewUserLastSignInRecommendationInsightSetting(), nil + } + } + } + } + return NewAccessReviewRecommendationInsightSetting(), 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 *AccessReviewRecommendationInsightSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewRecommendationInsightSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewRecommendationInsightSetting) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewRecommendationInsightSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewRecommendationInsightSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewRecommendationInsightSetting) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_response.go new file mode 100644 index 000000000..324a5b891 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecommendationInsightSettingCollectionResponse +type AccessReviewRecommendationInsightSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewRecommendationInsightSettingable +} +// NewAccessReviewRecommendationInsightSettingCollectionResponse instantiates a new AccessReviewRecommendationInsightSettingCollectionResponse and sets the default values. +func NewAccessReviewRecommendationInsightSettingCollectionResponse()(*AccessReviewRecommendationInsightSettingCollectionResponse) { + m := &AccessReviewRecommendationInsightSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewRecommendationInsightSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewRecommendationInsightSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewRecommendationInsightSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewRecommendationInsightSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewRecommendationInsightSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewRecommendationInsightSettingable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewRecommendationInsightSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewRecommendationInsightSettingCollectionResponse) GetValue()([]AccessReviewRecommendationInsightSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewRecommendationInsightSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewRecommendationInsightSettingCollectionResponse) SetValue(value []AccessReviewRecommendationInsightSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_responseable.go new file mode 100644 index 000000000..1bb1907d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecommendationInsightSettingCollectionResponseable +type AccessReviewRecommendationInsightSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewRecommendationInsightSettingable) + SetValue(value []AccessReviewRecommendationInsightSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_settingable.go b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_settingable.go new file mode 100644 index 000000000..4dca37ddc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recommendation_insight_settingable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecommendationInsightSettingable +type AccessReviewRecommendationInsightSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recurrence_settings.go b/src/internal/connector/graph/betasdk/models/access_review_recurrence_settings.go new file mode 100644 index 000000000..ee9fcfc53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recurrence_settings.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecurrenceSettings +type AccessReviewRecurrenceSettings 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 duration in days for recurrence. + durationInDays *int32 + // The OdataType property + odataType *string + // The count of recurrences, if the value of recurrenceEndType is occurrences, or 0 otherwise. + recurrenceCount *int32 + // How the recurrence ends. Possible values: never, endBy, occurrences, or recurrenceCount. If it is never, then there is no explicit end of the recurrence series. If it is endBy, then the recurrence ends at a certain date. If it is occurrences, then the series ends after recurrenceCount instances of the review have completed. + recurrenceEndType *string + // The recurrence interval. Possible vaules: onetime, weekly, monthly, quarterly, halfyearly or annual. + recurrenceType *string +} +// NewAccessReviewRecurrenceSettings instantiates a new accessReviewRecurrenceSettings and sets the default values. +func NewAccessReviewRecurrenceSettings()(*AccessReviewRecurrenceSettings) { + m := &AccessReviewRecurrenceSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewRecurrenceSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewRecurrenceSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewRecurrenceSettings(), 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 *AccessReviewRecurrenceSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDurationInDays gets the durationInDays property value. The duration in days for recurrence. +func (m *AccessReviewRecurrenceSettings) GetDurationInDays()(*int32) { + return m.durationInDays +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewRecurrenceSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["durationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInDays(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["recurrenceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceCount(val) + } + return nil + } + res["recurrenceEndType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceEndType(val) + } + return nil + } + res["recurrenceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewRecurrenceSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrenceCount gets the recurrenceCount property value. The count of recurrences, if the value of recurrenceEndType is occurrences, or 0 otherwise. +func (m *AccessReviewRecurrenceSettings) GetRecurrenceCount()(*int32) { + return m.recurrenceCount +} +// GetRecurrenceEndType gets the recurrenceEndType property value. How the recurrence ends. Possible values: never, endBy, occurrences, or recurrenceCount. If it is never, then there is no explicit end of the recurrence series. If it is endBy, then the recurrence ends at a certain date. If it is occurrences, then the series ends after recurrenceCount instances of the review have completed. +func (m *AccessReviewRecurrenceSettings) GetRecurrenceEndType()(*string) { + return m.recurrenceEndType +} +// GetRecurrenceType gets the recurrenceType property value. The recurrence interval. Possible vaules: onetime, weekly, monthly, quarterly, halfyearly or annual. +func (m *AccessReviewRecurrenceSettings) GetRecurrenceType()(*string) { + return m.recurrenceType +} +// Serialize serializes information the current object +func (m *AccessReviewRecurrenceSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("durationInDays", m.GetDurationInDays()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("recurrenceCount", m.GetRecurrenceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recurrenceEndType", m.GetRecurrenceEndType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recurrenceType", m.GetRecurrenceType()) + 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 *AccessReviewRecurrenceSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDurationInDays sets the durationInDays property value. The duration in days for recurrence. +func (m *AccessReviewRecurrenceSettings) SetDurationInDays(value *int32)() { + m.durationInDays = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewRecurrenceSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrenceCount sets the recurrenceCount property value. The count of recurrences, if the value of recurrenceEndType is occurrences, or 0 otherwise. +func (m *AccessReviewRecurrenceSettings) SetRecurrenceCount(value *int32)() { + m.recurrenceCount = value +} +// SetRecurrenceEndType sets the recurrenceEndType property value. How the recurrence ends. Possible values: never, endBy, occurrences, or recurrenceCount. If it is never, then there is no explicit end of the recurrence series. If it is endBy, then the recurrence ends at a certain date. If it is occurrences, then the series ends after recurrenceCount instances of the review have completed. +func (m *AccessReviewRecurrenceSettings) SetRecurrenceEndType(value *string)() { + m.recurrenceEndType = value +} +// SetRecurrenceType sets the recurrenceType property value. The recurrence interval. Possible vaules: onetime, weekly, monthly, quarterly, halfyearly or annual. +func (m *AccessReviewRecurrenceSettings) SetRecurrenceType(value *string)() { + m.recurrenceType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_recurrence_settingsable.go b/src/internal/connector/graph/betasdk/models/access_review_recurrence_settingsable.go new file mode 100644 index 000000000..5b7dc5784 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_recurrence_settingsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewRecurrenceSettingsable +type AccessReviewRecurrenceSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationInDays()(*int32) + GetOdataType()(*string) + GetRecurrenceCount()(*int32) + GetRecurrenceEndType()(*string) + GetRecurrenceType()(*string) + SetDurationInDays(value *int32)() + SetOdataType(value *string)() + SetRecurrenceCount(value *int32)() + SetRecurrenceEndType(value *string)() + SetRecurrenceType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer.go new file mode 100644 index 000000000..80ce61c0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewer provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewReviewer struct { + Entity + // The date when the reviewer was added for the access review. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of reviewer. + displayName *string + // User principal name of the user. + userPrincipalName *string +} +// NewAccessReviewReviewer instantiates a new accessReviewReviewer and sets the default values. +func NewAccessReviewReviewer()(*AccessReviewReviewer) { + m := &AccessReviewReviewer{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewReviewerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewReviewerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewReviewer(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date when the reviewer was added for the access review. +func (m *AccessReviewReviewer) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Name of reviewer. +func (m *AccessReviewReviewer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewReviewer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserPrincipalName gets the userPrincipalName property value. User principal name of the user. +func (m *AccessReviewReviewer) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *AccessReviewReviewer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date when the reviewer was added for the access review. +func (m *AccessReviewReviewer) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Name of reviewer. +func (m *AccessReviewReviewer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User principal name of the user. +func (m *AccessReviewReviewer) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_response.go new file mode 100644 index 000000000..ae1ffa073 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerCollectionResponse +type AccessReviewReviewerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewReviewerable +} +// NewAccessReviewReviewerCollectionResponse instantiates a new AccessReviewReviewerCollectionResponse and sets the default values. +func NewAccessReviewReviewerCollectionResponse()(*AccessReviewReviewerCollectionResponse) { + m := &AccessReviewReviewerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewReviewerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewReviewerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewReviewerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewReviewerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewReviewerCollectionResponse) GetValue()([]AccessReviewReviewerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewReviewerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewReviewerCollectionResponse) SetValue(value []AccessReviewReviewerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_responseable.go new file mode 100644 index 000000000..a5c70ddf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerCollectionResponseable +type AccessReviewReviewerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewReviewerable) + SetValue(value []AccessReviewReviewerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope.go new file mode 100644 index 000000000..9b0640732 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerScope +type AccessReviewReviewerScope struct { + AccessReviewScope + // The query specifying who will be the reviewer. + query *string + // In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query, for example, ./manager, is specified. Possible value: decisions. + queryRoot *string + // The type of query. Examples include MicrosoftGraph and ARM. + queryType *string +} +// NewAccessReviewReviewerScope instantiates a new AccessReviewReviewerScope and sets the default values. +func NewAccessReviewReviewerScope()(*AccessReviewReviewerScope) { + m := &AccessReviewReviewerScope{ + AccessReviewScope: *NewAccessReviewScope(), + } + odataTypeValue := "#microsoft.graph.accessReviewReviewerScope"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAccessReviewReviewerScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewReviewerScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewReviewerScope(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewReviewerScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewScope.GetFieldDeserializers() + res["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + res["queryRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryRoot(val) + } + return nil + } + res["queryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQueryType(val) + } + return nil + } + return res +} +// GetQuery gets the query property value. The query specifying who will be the reviewer. +func (m *AccessReviewReviewerScope) GetQuery()(*string) { + return m.query +} +// GetQueryRoot gets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query, for example, ./manager, is specified. Possible value: decisions. +func (m *AccessReviewReviewerScope) GetQueryRoot()(*string) { + return m.queryRoot +} +// GetQueryType gets the queryType property value. The type of query. Examples include MicrosoftGraph and ARM. +func (m *AccessReviewReviewerScope) GetQueryType()(*string) { + return m.queryType +} +// Serialize serializes information the current object +func (m *AccessReviewReviewerScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewScope.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryRoot", m.GetQueryRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("queryType", m.GetQueryType()) + if err != nil { + return err + } + } + return nil +} +// SetQuery sets the query property value. The query specifying who will be the reviewer. +func (m *AccessReviewReviewerScope) SetQuery(value *string)() { + m.query = value +} +// SetQueryRoot sets the queryRoot property value. In the scenario where reviewers need to be specified dynamically, this property is used to indicate the relative source of the query. This property is only required if a relative query, for example, ./manager, is specified. Possible value: decisions. +func (m *AccessReviewReviewerScope) SetQueryRoot(value *string)() { + m.queryRoot = value +} +// SetQueryType sets the queryType property value. The type of query. Examples include MicrosoftGraph and ARM. +func (m *AccessReviewReviewerScope) SetQueryType(value *string)() { + m.queryType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_response.go new file mode 100644 index 000000000..3c0a8c96e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerScopeCollectionResponse +type AccessReviewReviewerScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewReviewerScopeable +} +// NewAccessReviewReviewerScopeCollectionResponse instantiates a new AccessReviewReviewerScopeCollectionResponse and sets the default values. +func NewAccessReviewReviewerScopeCollectionResponse()(*AccessReviewReviewerScopeCollectionResponse) { + m := &AccessReviewReviewerScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewReviewerScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewReviewerScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewReviewerScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewReviewerScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewReviewerScopeCollectionResponse) GetValue()([]AccessReviewReviewerScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewReviewerScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewReviewerScopeCollectionResponse) SetValue(value []AccessReviewReviewerScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_responseable.go new file mode 100644 index 000000000..aad34b34b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerScopeCollectionResponseable +type AccessReviewReviewerScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewReviewerScopeable) + SetValue(value []AccessReviewReviewerScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewer_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scopeable.go new file mode 100644 index 000000000..bd2e81356 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewer_scopeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerScopeable +type AccessReviewReviewerScopeable interface { + AccessReviewScopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetQuery()(*string) + GetQueryRoot()(*string) + GetQueryType()(*string) + SetQuery(value *string)() + SetQueryRoot(value *string)() + SetQueryType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_reviewerable.go b/src/internal/connector/graph/betasdk/models/access_review_reviewerable.go new file mode 100644 index 000000000..711d4e101 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_reviewerable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewReviewerable +type AccessReviewReviewerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetUserPrincipalName()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_definition.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition.go new file mode 100644 index 000000000..c9c9551c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition.go @@ -0,0 +1,499 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleDefinition +type AccessReviewScheduleDefinition struct { + Entity + // Defines the list of additional users or group members to be notified of the access review progress. + additionalNotificationRecipients []AccessReviewNotificationRecipientItemable + // The backupReviewers property + backupReviewers []AccessReviewReviewerScopeable + // User who created this review. Read-only. + createdBy UserIdentityable + // Timestamp when the access review series was created. Supports $select. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description provided by review creators to provide more context of the review to admins. Supports $select. + descriptionForAdmins *string + // Description provided by review creators to provide more context of the review to reviewers. Reviewers will see this description in the email sent to them requesting their review. Email notifications support up to 256 characters. Supports $select. + descriptionForReviewers *string + // Name of the access review series. Supports $select and $orderBy. Required on create. + displayName *string + // This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. See accessReviewReviewerScope. Replaces backupReviewers. Supports $select. NOTE: The value of this property will be ignored if fallback reviewers are assigned through the stageSettings property. + fallbackReviewers []AccessReviewReviewerScopeable + // This property is required when scoping a review to guest users' access across all Microsoft 365 groups and determines which Microsoft 365 groups are reviewed. Each group will become a unique accessReviewInstance of the access review series. For supported scopes, see accessReviewScope. Supports $select. For examples of options for configuring instanceEnumerationScope, see Configure the scope of your access review definition using the Microsoft Graph API. + instanceEnumerationScope AccessReviewScopeable + // Set of access reviews instances for this access review series. Access reviews that do not recur will only have one instance; otherwise, there is an instance for each recurrence. + instances []AccessReviewInstanceable + // Timestamp when the access review series was last modified. Supports $select. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // This collection of access review scopes is used to define who are the reviewers. The reviewers property is only updatable if individual users are assigned as reviewers. Required on create. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will be ignored if reviewers are assigned through the stageSettings property. + reviewers []AccessReviewReviewerScopeable + // Defines the entities whose access is reviewed. For supported scopes, see accessReviewScope. Required on create. Supports $select and $filter (contains only). For examples of options for configuring scope, see Configure the scope of your access review definition using the Microsoft Graph API. + scope AccessReviewScopeable + // The settings for an access review series, see type definition below. Supports $select. Required on create. + settings AccessReviewScheduleSettingsable + // Required only for a multi-stage access review to define the stages and their settings. You can break down each review instance into up to three sequential stages, where each stage can have a different set of reviewers, fallback reviewers, and settings. Stages will be created sequentially based on the dependsOn property. Optional. When this property is defined, its settings are used instead of the corresponding settings in the accessReviewScheduleDefinition object and its settings, reviewers, and fallbackReviewers properties. + stageSettings []AccessReviewStageSettingsable + // This read-only field specifies the status of an access review. The typical states include Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. + status *string +} +// NewAccessReviewScheduleDefinition instantiates a new accessReviewScheduleDefinition and sets the default values. +func NewAccessReviewScheduleDefinition()(*AccessReviewScheduleDefinition) { + m := &AccessReviewScheduleDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewScheduleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewScheduleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewScheduleDefinition(), nil +} +// GetAdditionalNotificationRecipients gets the additionalNotificationRecipients property value. Defines the list of additional users or group members to be notified of the access review progress. +func (m *AccessReviewScheduleDefinition) GetAdditionalNotificationRecipients()([]AccessReviewNotificationRecipientItemable) { + return m.additionalNotificationRecipients +} +// GetBackupReviewers gets the backupReviewers property value. The backupReviewers property +func (m *AccessReviewScheduleDefinition) GetBackupReviewers()([]AccessReviewReviewerScopeable) { + return m.backupReviewers +} +// GetCreatedBy gets the createdBy property value. User who created this review. Read-only. +func (m *AccessReviewScheduleDefinition) GetCreatedBy()(UserIdentityable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp when the access review series was created. Supports $select. Read-only. +func (m *AccessReviewScheduleDefinition) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescriptionForAdmins gets the descriptionForAdmins property value. Description provided by review creators to provide more context of the review to admins. Supports $select. +func (m *AccessReviewScheduleDefinition) GetDescriptionForAdmins()(*string) { + return m.descriptionForAdmins +} +// GetDescriptionForReviewers gets the descriptionForReviewers property value. Description provided by review creators to provide more context of the review to reviewers. Reviewers will see this description in the email sent to them requesting their review. Email notifications support up to 256 characters. Supports $select. +func (m *AccessReviewScheduleDefinition) GetDescriptionForReviewers()(*string) { + return m.descriptionForReviewers +} +// GetDisplayName gets the displayName property value. Name of the access review series. Supports $select and $orderBy. Required on create. +func (m *AccessReviewScheduleDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFallbackReviewers gets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. See accessReviewReviewerScope. Replaces backupReviewers. Supports $select. NOTE: The value of this property will be ignored if fallback reviewers are assigned through the stageSettings property. +func (m *AccessReviewScheduleDefinition) GetFallbackReviewers()([]AccessReviewReviewerScopeable) { + return m.fallbackReviewers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewScheduleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalNotificationRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewNotificationRecipientItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewNotificationRecipientItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewNotificationRecipientItemable) + } + m.SetAdditionalNotificationRecipients(res) + } + return nil + } + res["backupReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetBackupReviewers(res) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(UserIdentityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["descriptionForAdmins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescriptionForAdmins(val) + } + return nil + } + res["descriptionForReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescriptionForReviewers(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fallbackReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetFallbackReviewers(res) + } + return nil + } + res["instanceEnumerationScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstanceEnumerationScope(val.(AccessReviewScopeable)) + } + return nil + } + res["instances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceable) + } + m.SetInstances(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetReviewers(res) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(AccessReviewScopeable)) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScheduleSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(AccessReviewScheduleSettingsable)) + } + return nil + } + res["stageSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewStageSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewStageSettingsable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewStageSettingsable) + } + m.SetStageSettings(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetInstanceEnumerationScope gets the instanceEnumerationScope property value. This property is required when scoping a review to guest users' access across all Microsoft 365 groups and determines which Microsoft 365 groups are reviewed. Each group will become a unique accessReviewInstance of the access review series. For supported scopes, see accessReviewScope. Supports $select. For examples of options for configuring instanceEnumerationScope, see Configure the scope of your access review definition using the Microsoft Graph API. +func (m *AccessReviewScheduleDefinition) GetInstanceEnumerationScope()(AccessReviewScopeable) { + return m.instanceEnumerationScope +} +// GetInstances gets the instances property value. Set of access reviews instances for this access review series. Access reviews that do not recur will only have one instance; otherwise, there is an instance for each recurrence. +func (m *AccessReviewScheduleDefinition) GetInstances()([]AccessReviewInstanceable) { + return m.instances +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Timestamp when the access review series was last modified. Supports $select. Read-only. +func (m *AccessReviewScheduleDefinition) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetReviewers gets the reviewers property value. This collection of access review scopes is used to define who are the reviewers. The reviewers property is only updatable if individual users are assigned as reviewers. Required on create. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will be ignored if reviewers are assigned through the stageSettings property. +func (m *AccessReviewScheduleDefinition) GetReviewers()([]AccessReviewReviewerScopeable) { + return m.reviewers +} +// GetScope gets the scope property value. Defines the entities whose access is reviewed. For supported scopes, see accessReviewScope. Required on create. Supports $select and $filter (contains only). For examples of options for configuring scope, see Configure the scope of your access review definition using the Microsoft Graph API. +func (m *AccessReviewScheduleDefinition) GetScope()(AccessReviewScopeable) { + return m.scope +} +// GetSettings gets the settings property value. The settings for an access review series, see type definition below. Supports $select. Required on create. +func (m *AccessReviewScheduleDefinition) GetSettings()(AccessReviewScheduleSettingsable) { + return m.settings +} +// GetStageSettings gets the stageSettings property value. Required only for a multi-stage access review to define the stages and their settings. You can break down each review instance into up to three sequential stages, where each stage can have a different set of reviewers, fallback reviewers, and settings. Stages will be created sequentially based on the dependsOn property. Optional. When this property is defined, its settings are used instead of the corresponding settings in the accessReviewScheduleDefinition object and its settings, reviewers, and fallbackReviewers properties. +func (m *AccessReviewScheduleDefinition) GetStageSettings()([]AccessReviewStageSettingsable) { + return m.stageSettings +} +// GetStatus gets the status property value. This read-only field specifies the status of an access review. The typical states include Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewScheduleDefinition) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReviewScheduleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdditionalNotificationRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalNotificationRecipients())) + for i, v := range m.GetAdditionalNotificationRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalNotificationRecipients", cast) + if err != nil { + return err + } + } + if m.GetBackupReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBackupReviewers())) + for i, v := range m.GetBackupReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("backupReviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("descriptionForAdmins", m.GetDescriptionForAdmins()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("descriptionForReviewers", m.GetDescriptionForReviewers()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetFallbackReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFallbackReviewers())) + for i, v := range m.GetFallbackReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fallbackReviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("instanceEnumerationScope", m.GetInstanceEnumerationScope()) + if err != nil { + return err + } + } + if m.GetInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstances())) + for i, v := range m.GetInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("instances", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetStageSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStageSettings())) + for i, v := range m.GetStageSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("stageSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalNotificationRecipients sets the additionalNotificationRecipients property value. Defines the list of additional users or group members to be notified of the access review progress. +func (m *AccessReviewScheduleDefinition) SetAdditionalNotificationRecipients(value []AccessReviewNotificationRecipientItemable)() { + m.additionalNotificationRecipients = value +} +// SetBackupReviewers sets the backupReviewers property value. The backupReviewers property +func (m *AccessReviewScheduleDefinition) SetBackupReviewers(value []AccessReviewReviewerScopeable)() { + m.backupReviewers = value +} +// SetCreatedBy sets the createdBy property value. User who created this review. Read-only. +func (m *AccessReviewScheduleDefinition) SetCreatedBy(value UserIdentityable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp when the access review series was created. Supports $select. Read-only. +func (m *AccessReviewScheduleDefinition) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescriptionForAdmins sets the descriptionForAdmins property value. Description provided by review creators to provide more context of the review to admins. Supports $select. +func (m *AccessReviewScheduleDefinition) SetDescriptionForAdmins(value *string)() { + m.descriptionForAdmins = value +} +// SetDescriptionForReviewers sets the descriptionForReviewers property value. Description provided by review creators to provide more context of the review to reviewers. Reviewers will see this description in the email sent to them requesting their review. Email notifications support up to 256 characters. Supports $select. +func (m *AccessReviewScheduleDefinition) SetDescriptionForReviewers(value *string)() { + m.descriptionForReviewers = value +} +// SetDisplayName sets the displayName property value. Name of the access review series. Supports $select and $orderBy. Required on create. +func (m *AccessReviewScheduleDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFallbackReviewers sets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. See accessReviewReviewerScope. Replaces backupReviewers. Supports $select. NOTE: The value of this property will be ignored if fallback reviewers are assigned through the stageSettings property. +func (m *AccessReviewScheduleDefinition) SetFallbackReviewers(value []AccessReviewReviewerScopeable)() { + m.fallbackReviewers = value +} +// SetInstanceEnumerationScope sets the instanceEnumerationScope property value. This property is required when scoping a review to guest users' access across all Microsoft 365 groups and determines which Microsoft 365 groups are reviewed. Each group will become a unique accessReviewInstance of the access review series. For supported scopes, see accessReviewScope. Supports $select. For examples of options for configuring instanceEnumerationScope, see Configure the scope of your access review definition using the Microsoft Graph API. +func (m *AccessReviewScheduleDefinition) SetInstanceEnumerationScope(value AccessReviewScopeable)() { + m.instanceEnumerationScope = value +} +// SetInstances sets the instances property value. Set of access reviews instances for this access review series. Access reviews that do not recur will only have one instance; otherwise, there is an instance for each recurrence. +func (m *AccessReviewScheduleDefinition) SetInstances(value []AccessReviewInstanceable)() { + m.instances = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Timestamp when the access review series was last modified. Supports $select. Read-only. +func (m *AccessReviewScheduleDefinition) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetReviewers sets the reviewers property value. This collection of access review scopes is used to define who are the reviewers. The reviewers property is only updatable if individual users are assigned as reviewers. Required on create. Supports $select. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will be ignored if reviewers are assigned through the stageSettings property. +func (m *AccessReviewScheduleDefinition) SetReviewers(value []AccessReviewReviewerScopeable)() { + m.reviewers = value +} +// SetScope sets the scope property value. Defines the entities whose access is reviewed. For supported scopes, see accessReviewScope. Required on create. Supports $select and $filter (contains only). For examples of options for configuring scope, see Configure the scope of your access review definition using the Microsoft Graph API. +func (m *AccessReviewScheduleDefinition) SetScope(value AccessReviewScopeable)() { + m.scope = value +} +// SetSettings sets the settings property value. The settings for an access review series, see type definition below. Supports $select. Required on create. +func (m *AccessReviewScheduleDefinition) SetSettings(value AccessReviewScheduleSettingsable)() { + m.settings = value +} +// SetStageSettings sets the stageSettings property value. Required only for a multi-stage access review to define the stages and their settings. You can break down each review instance into up to three sequential stages, where each stage can have a different set of reviewers, fallback reviewers, and settings. Stages will be created sequentially based on the dependsOn property. Optional. When this property is defined, its settings are used instead of the corresponding settings in the accessReviewScheduleDefinition object and its settings, reviewers, and fallbackReviewers properties. +func (m *AccessReviewScheduleDefinition) SetStageSettings(value []AccessReviewStageSettingsable)() { + m.stageSettings = value +} +// SetStatus sets the status property value. This read-only field specifies the status of an access review. The typical states include Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $select, $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewScheduleDefinition) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_response.go new file mode 100644 index 000000000..4584873b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleDefinitionCollectionResponse +type AccessReviewScheduleDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewScheduleDefinitionable +} +// NewAccessReviewScheduleDefinitionCollectionResponse instantiates a new AccessReviewScheduleDefinitionCollectionResponse and sets the default values. +func NewAccessReviewScheduleDefinitionCollectionResponse()(*AccessReviewScheduleDefinitionCollectionResponse) { + m := &AccessReviewScheduleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewScheduleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewScheduleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewScheduleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewScheduleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScheduleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScheduleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScheduleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewScheduleDefinitionCollectionResponse) GetValue()([]AccessReviewScheduleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewScheduleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewScheduleDefinitionCollectionResponse) SetValue(value []AccessReviewScheduleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_responseable.go new file mode 100644 index 000000000..8bbaa71cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleDefinitionCollectionResponseable +type AccessReviewScheduleDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewScheduleDefinitionable) + SetValue(value []AccessReviewScheduleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_definitionable.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_definitionable.go new file mode 100644 index 000000000..d85ce2cea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_definitionable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleDefinitionable +type AccessReviewScheduleDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalNotificationRecipients()([]AccessReviewNotificationRecipientItemable) + GetBackupReviewers()([]AccessReviewReviewerScopeable) + GetCreatedBy()(UserIdentityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescriptionForAdmins()(*string) + GetDescriptionForReviewers()(*string) + GetDisplayName()(*string) + GetFallbackReviewers()([]AccessReviewReviewerScopeable) + GetInstanceEnumerationScope()(AccessReviewScopeable) + GetInstances()([]AccessReviewInstanceable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewers()([]AccessReviewReviewerScopeable) + GetScope()(AccessReviewScopeable) + GetSettings()(AccessReviewScheduleSettingsable) + GetStageSettings()([]AccessReviewStageSettingsable) + GetStatus()(*string) + SetAdditionalNotificationRecipients(value []AccessReviewNotificationRecipientItemable)() + SetBackupReviewers(value []AccessReviewReviewerScopeable)() + SetCreatedBy(value UserIdentityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescriptionForAdmins(value *string)() + SetDescriptionForReviewers(value *string)() + SetDisplayName(value *string)() + SetFallbackReviewers(value []AccessReviewReviewerScopeable)() + SetInstanceEnumerationScope(value AccessReviewScopeable)() + SetInstances(value []AccessReviewInstanceable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewers(value []AccessReviewReviewerScopeable)() + SetScope(value AccessReviewScopeable)() + SetSettings(value AccessReviewScheduleSettingsable)() + SetStageSettings(value []AccessReviewStageSettingsable)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_settings.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_settings.go new file mode 100644 index 000000000..1e17a3277 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_settings.go @@ -0,0 +1,425 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleSettings +type AccessReviewScheduleSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Optional field. Describes the actions to take once a review is complete. There are two types that are currently supported: removeAccessApplyAction (default) and disableAndDeleteUserApplyAction. Field only needs to be specified in the case of disableAndDeleteUserApplyAction. + applyActions []AccessReviewApplyActionable + // Indicates whether decisions are automatically applied. When set to false, an admin must apply the decisions manually once the reviewer completes the access review. When set to true, decisions are applied automatically after the access review instance duration ends, whether or not the reviewers have responded. Default value is false. + autoApplyDecisionsEnabled *bool + // Indicates whether decisions on previous access review stages are available for reviewers on an accessReviewInstance with multiple subsequent stages. If not provided, the default is disabled (false). + decisionHistoriesForReviewersEnabled *bool + // Decision chosen if defaultDecisionEnabled is enabled. Can be one of Approve, Deny, or Recommendation. + defaultDecision *string + // Indicates whether the default decision is enabled or disabled when reviewers do not respond. Default value is false. + defaultDecisionEnabled *bool + // Duration of each recurrence of review (accessReviewInstance) in number of days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its durationInDays setting will be used instead of the value of this property. + instanceDurationInDays *int32 + // Indicates whether reviewers are required to provide justification with their decision. Default value is false. + justificationRequiredOnApproval *bool + // Indicates whether emails are enabled or disabled. Default value is false. + mailNotificationsEnabled *bool + // The OdataType property + odataType *string + // Optional. Describes the types of insights that aid reviewers to make access review decisions. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationInsightSettings setting will be used instead of the value of this property. + recommendationInsightSettings []AccessReviewRecommendationInsightSettingable + // Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. + recommendationLookBackDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Indicates whether decision recommendations are enabled or disabled. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationsEnabled setting will be used instead of the value of this property. + recommendationsEnabled *bool + // Detailed settings for recurrence using the standard Outlook recurrence object. Note: Only dayOfMonth, interval, and type (weekly, absoluteMonthly) properties are supported. Use the property startDate on recurrenceRange to determine the day the review starts. + recurrence PatternedRecurrenceable + // Indicates whether reminders are enabled or disabled. Default value is false. + reminderNotificationsEnabled *bool +} +// NewAccessReviewScheduleSettings instantiates a new accessReviewScheduleSettings and sets the default values. +func NewAccessReviewScheduleSettings()(*AccessReviewScheduleSettings) { + m := &AccessReviewScheduleSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewScheduleSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewScheduleSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewScheduleSettings(), 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 *AccessReviewScheduleSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplyActions gets the applyActions property value. Optional field. Describes the actions to take once a review is complete. There are two types that are currently supported: removeAccessApplyAction (default) and disableAndDeleteUserApplyAction. Field only needs to be specified in the case of disableAndDeleteUserApplyAction. +func (m *AccessReviewScheduleSettings) GetApplyActions()([]AccessReviewApplyActionable) { + return m.applyActions +} +// GetAutoApplyDecisionsEnabled gets the autoApplyDecisionsEnabled property value. Indicates whether decisions are automatically applied. When set to false, an admin must apply the decisions manually once the reviewer completes the access review. When set to true, decisions are applied automatically after the access review instance duration ends, whether or not the reviewers have responded. Default value is false. +func (m *AccessReviewScheduleSettings) GetAutoApplyDecisionsEnabled()(*bool) { + return m.autoApplyDecisionsEnabled +} +// GetDecisionHistoriesForReviewersEnabled gets the decisionHistoriesForReviewersEnabled property value. Indicates whether decisions on previous access review stages are available for reviewers on an accessReviewInstance with multiple subsequent stages. If not provided, the default is disabled (false). +func (m *AccessReviewScheduleSettings) GetDecisionHistoriesForReviewersEnabled()(*bool) { + return m.decisionHistoriesForReviewersEnabled +} +// GetDefaultDecision gets the defaultDecision property value. Decision chosen if defaultDecisionEnabled is enabled. Can be one of Approve, Deny, or Recommendation. +func (m *AccessReviewScheduleSettings) GetDefaultDecision()(*string) { + return m.defaultDecision +} +// GetDefaultDecisionEnabled gets the defaultDecisionEnabled property value. Indicates whether the default decision is enabled or disabled when reviewers do not respond. Default value is false. +func (m *AccessReviewScheduleSettings) GetDefaultDecisionEnabled()(*bool) { + return m.defaultDecisionEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewScheduleSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applyActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewApplyActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewApplyActionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewApplyActionable) + } + m.SetApplyActions(res) + } + return nil + } + res["autoApplyDecisionsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoApplyDecisionsEnabled(val) + } + return nil + } + res["decisionHistoriesForReviewersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDecisionHistoriesForReviewersEnabled(val) + } + return nil + } + res["defaultDecision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDecision(val) + } + return nil + } + res["defaultDecisionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDecisionEnabled(val) + } + return nil + } + res["instanceDurationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstanceDurationInDays(val) + } + return nil + } + res["justificationRequiredOnApproval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetJustificationRequiredOnApproval(val) + } + return nil + } + res["mailNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNotificationsEnabled(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["recommendationInsightSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewRecommendationInsightSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewRecommendationInsightSettingable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewRecommendationInsightSettingable) + } + m.SetRecommendationInsightSettings(res) + } + return nil + } + res["recommendationLookBackDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationLookBackDuration(val) + } + return nil + } + res["recommendationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationsEnabled(val) + } + return nil + } + res["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["reminderNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetReminderNotificationsEnabled(val) + } + return nil + } + return res +} +// GetInstanceDurationInDays gets the instanceDurationInDays property value. Duration of each recurrence of review (accessReviewInstance) in number of days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its durationInDays setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) GetInstanceDurationInDays()(*int32) { + return m.instanceDurationInDays +} +// GetJustificationRequiredOnApproval gets the justificationRequiredOnApproval property value. Indicates whether reviewers are required to provide justification with their decision. Default value is false. +func (m *AccessReviewScheduleSettings) GetJustificationRequiredOnApproval()(*bool) { + return m.justificationRequiredOnApproval +} +// GetMailNotificationsEnabled gets the mailNotificationsEnabled property value. Indicates whether emails are enabled or disabled. Default value is false. +func (m *AccessReviewScheduleSettings) GetMailNotificationsEnabled()(*bool) { + return m.mailNotificationsEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewScheduleSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecommendationInsightSettings gets the recommendationInsightSettings property value. Optional. Describes the types of insights that aid reviewers to make access review decisions. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationInsightSettings setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) GetRecommendationInsightSettings()([]AccessReviewRecommendationInsightSettingable) { + return m.recommendationInsightSettings +} +// GetRecommendationLookBackDuration gets the recommendationLookBackDuration property value. Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) GetRecommendationLookBackDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.recommendationLookBackDuration +} +// GetRecommendationsEnabled gets the recommendationsEnabled property value. Indicates whether decision recommendations are enabled or disabled. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationsEnabled setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) GetRecommendationsEnabled()(*bool) { + return m.recommendationsEnabled +} +// GetRecurrence gets the recurrence property value. Detailed settings for recurrence using the standard Outlook recurrence object. Note: Only dayOfMonth, interval, and type (weekly, absoluteMonthly) properties are supported. Use the property startDate on recurrenceRange to determine the day the review starts. +func (m *AccessReviewScheduleSettings) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetReminderNotificationsEnabled gets the reminderNotificationsEnabled property value. Indicates whether reminders are enabled or disabled. Default value is false. +func (m *AccessReviewScheduleSettings) GetReminderNotificationsEnabled()(*bool) { + return m.reminderNotificationsEnabled +} +// Serialize serializes information the current object +func (m *AccessReviewScheduleSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplyActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApplyActions())) + for i, v := range m.GetApplyActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("applyActions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("autoApplyDecisionsEnabled", m.GetAutoApplyDecisionsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("decisionHistoriesForReviewersEnabled", m.GetDecisionHistoriesForReviewersEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultDecision", m.GetDefaultDecision()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("defaultDecisionEnabled", m.GetDefaultDecisionEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("instanceDurationInDays", m.GetInstanceDurationInDays()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("justificationRequiredOnApproval", m.GetJustificationRequiredOnApproval()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("mailNotificationsEnabled", m.GetMailNotificationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecommendationInsightSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecommendationInsightSettings())) + for i, v := range m.GetRecommendationInsightSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("recommendationInsightSettings", cast) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("recommendationLookBackDuration", m.GetRecommendationLookBackDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("recommendationsEnabled", m.GetRecommendationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("reminderNotificationsEnabled", m.GetReminderNotificationsEnabled()) + 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 *AccessReviewScheduleSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplyActions sets the applyActions property value. Optional field. Describes the actions to take once a review is complete. There are two types that are currently supported: removeAccessApplyAction (default) and disableAndDeleteUserApplyAction. Field only needs to be specified in the case of disableAndDeleteUserApplyAction. +func (m *AccessReviewScheduleSettings) SetApplyActions(value []AccessReviewApplyActionable)() { + m.applyActions = value +} +// SetAutoApplyDecisionsEnabled sets the autoApplyDecisionsEnabled property value. Indicates whether decisions are automatically applied. When set to false, an admin must apply the decisions manually once the reviewer completes the access review. When set to true, decisions are applied automatically after the access review instance duration ends, whether or not the reviewers have responded. Default value is false. +func (m *AccessReviewScheduleSettings) SetAutoApplyDecisionsEnabled(value *bool)() { + m.autoApplyDecisionsEnabled = value +} +// SetDecisionHistoriesForReviewersEnabled sets the decisionHistoriesForReviewersEnabled property value. Indicates whether decisions on previous access review stages are available for reviewers on an accessReviewInstance with multiple subsequent stages. If not provided, the default is disabled (false). +func (m *AccessReviewScheduleSettings) SetDecisionHistoriesForReviewersEnabled(value *bool)() { + m.decisionHistoriesForReviewersEnabled = value +} +// SetDefaultDecision sets the defaultDecision property value. Decision chosen if defaultDecisionEnabled is enabled. Can be one of Approve, Deny, or Recommendation. +func (m *AccessReviewScheduleSettings) SetDefaultDecision(value *string)() { + m.defaultDecision = value +} +// SetDefaultDecisionEnabled sets the defaultDecisionEnabled property value. Indicates whether the default decision is enabled or disabled when reviewers do not respond. Default value is false. +func (m *AccessReviewScheduleSettings) SetDefaultDecisionEnabled(value *bool)() { + m.defaultDecisionEnabled = value +} +// SetInstanceDurationInDays sets the instanceDurationInDays property value. Duration of each recurrence of review (accessReviewInstance) in number of days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its durationInDays setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) SetInstanceDurationInDays(value *int32)() { + m.instanceDurationInDays = value +} +// SetJustificationRequiredOnApproval sets the justificationRequiredOnApproval property value. Indicates whether reviewers are required to provide justification with their decision. Default value is false. +func (m *AccessReviewScheduleSettings) SetJustificationRequiredOnApproval(value *bool)() { + m.justificationRequiredOnApproval = value +} +// SetMailNotificationsEnabled sets the mailNotificationsEnabled property value. Indicates whether emails are enabled or disabled. Default value is false. +func (m *AccessReviewScheduleSettings) SetMailNotificationsEnabled(value *bool)() { + m.mailNotificationsEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewScheduleSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommendationInsightSettings sets the recommendationInsightSettings property value. Optional. Describes the types of insights that aid reviewers to make access review decisions. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationInsightSettings setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) SetRecommendationInsightSettings(value []AccessReviewRecommendationInsightSettingable)() { + m.recommendationInsightSettings = value +} +// SetRecommendationLookBackDuration sets the recommendationLookBackDuration property value. Optional field. Indicates the period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look-back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationLookBackDuration setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) SetRecommendationLookBackDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.recommendationLookBackDuration = value +} +// SetRecommendationsEnabled sets the recommendationsEnabled property value. Indicates whether decision recommendations are enabled or disabled. NOTE: If the stageSettings of the accessReviewScheduleDefinition object is defined, its recommendationsEnabled setting will be used instead of the value of this property. +func (m *AccessReviewScheduleSettings) SetRecommendationsEnabled(value *bool)() { + m.recommendationsEnabled = value +} +// SetRecurrence sets the recurrence property value. Detailed settings for recurrence using the standard Outlook recurrence object. Note: Only dayOfMonth, interval, and type (weekly, absoluteMonthly) properties are supported. Use the property startDate on recurrenceRange to determine the day the review starts. +func (m *AccessReviewScheduleSettings) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetReminderNotificationsEnabled sets the reminderNotificationsEnabled property value. Indicates whether reminders are enabled or disabled. Default value is false. +func (m *AccessReviewScheduleSettings) SetReminderNotificationsEnabled(value *bool)() { + m.reminderNotificationsEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_schedule_settingsable.go b/src/internal/connector/graph/betasdk/models/access_review_schedule_settingsable.go new file mode 100644 index 000000000..a3f751dec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_schedule_settingsable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScheduleSettingsable +type AccessReviewScheduleSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplyActions()([]AccessReviewApplyActionable) + GetAutoApplyDecisionsEnabled()(*bool) + GetDecisionHistoriesForReviewersEnabled()(*bool) + GetDefaultDecision()(*string) + GetDefaultDecisionEnabled()(*bool) + GetInstanceDurationInDays()(*int32) + GetJustificationRequiredOnApproval()(*bool) + GetMailNotificationsEnabled()(*bool) + GetOdataType()(*string) + GetRecommendationInsightSettings()([]AccessReviewRecommendationInsightSettingable) + GetRecommendationLookBackDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetRecommendationsEnabled()(*bool) + GetRecurrence()(PatternedRecurrenceable) + GetReminderNotificationsEnabled()(*bool) + SetApplyActions(value []AccessReviewApplyActionable)() + SetAutoApplyDecisionsEnabled(value *bool)() + SetDecisionHistoriesForReviewersEnabled(value *bool)() + SetDefaultDecision(value *string)() + SetDefaultDecisionEnabled(value *bool)() + SetInstanceDurationInDays(value *int32)() + SetJustificationRequiredOnApproval(value *bool)() + SetMailNotificationsEnabled(value *bool)() + SetOdataType(value *string)() + SetRecommendationInsightSettings(value []AccessReviewRecommendationInsightSettingable)() + SetRecommendationLookBackDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetRecommendationsEnabled(value *bool)() + SetRecurrence(value PatternedRecurrenceable)() + SetReminderNotificationsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_scope.go b/src/internal/connector/graph/betasdk/models/access_review_scope.go new file mode 100644 index 000000000..3470d1c72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_scope.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScope +type AccessReviewScope 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 OdataType property + odataType *string +} +// NewAccessReviewScope instantiates a new accessReviewScope and sets the default values. +func NewAccessReviewScope()(*AccessReviewScope) { + m := &AccessReviewScope{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewInactiveUsersQueryScope": + return NewAccessReviewInactiveUsersQueryScope(), nil + case "#microsoft.graph.accessReviewQueryScope": + return NewAccessReviewQueryScope(), nil + case "#microsoft.graph.accessReviewReviewerScope": + return NewAccessReviewReviewerScope(), nil + case "#microsoft.graph.principalResourceMembershipsScope": + return NewPrincipalResourceMembershipsScope(), nil + } + } + } + } + return NewAccessReviewScope(), 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 *AccessReviewScope) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewScope) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AccessReviewScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AccessReviewScope) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewScope) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_scope_collection_response.go new file mode 100644 index 000000000..46d2346c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScopeCollectionResponse +type AccessReviewScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewScopeable +} +// NewAccessReviewScopeCollectionResponse instantiates a new AccessReviewScopeCollectionResponse and sets the default values. +func NewAccessReviewScopeCollectionResponse()(*AccessReviewScopeCollectionResponse) { + m := &AccessReviewScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewScopeCollectionResponse) GetValue()([]AccessReviewScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewScopeCollectionResponse) SetValue(value []AccessReviewScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_scope_collection_responseable.go new file mode 100644 index 000000000..9f55653d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScopeCollectionResponseable +type AccessReviewScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewScopeable) + SetValue(value []AccessReviewScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_scopeable.go b/src/internal/connector/graph/betasdk/models/access_review_scopeable.go new file mode 100644 index 000000000..51bcf94f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_scopeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewScopeable +type AccessReviewScopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_set.go b/src/internal/connector/graph/betasdk/models/access_review_set.go new file mode 100644 index 000000000..e56e59a73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_set.go @@ -0,0 +1,162 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewSet +type AccessReviewSet struct { + Entity + // Represents an Azure AD access review decision on an instance of a review. + decisions []AccessReviewInstanceDecisionItemable + // Represents the template and scheduling for an access review. + definitions []AccessReviewScheduleDefinitionable + // Represents a collection of access review history data and the scopes used to collect that data. + historyDefinitions []AccessReviewHistoryDefinitionable + // Resource that enables administrators to manage directory-level access review policies in their tenant. + policy AccessReviewPolicyable +} +// NewAccessReviewSet instantiates a new AccessReviewSet and sets the default values. +func NewAccessReviewSet()(*AccessReviewSet) { + m := &AccessReviewSet{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewSet(), nil +} +// GetDecisions gets the decisions property value. Represents an Azure AD access review decision on an instance of a review. +func (m *AccessReviewSet) GetDecisions()([]AccessReviewInstanceDecisionItemable) { + return m.decisions +} +// GetDefinitions gets the definitions property value. Represents the template and scheduling for an access review. +func (m *AccessReviewSet) GetDefinitions()([]AccessReviewScheduleDefinitionable) { + return m.definitions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["decisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceDecisionItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceDecisionItemable) + } + m.SetDecisions(res) + } + return nil + } + res["definitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScheduleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScheduleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScheduleDefinitionable) + } + m.SetDefinitions(res) + } + return nil + } + res["historyDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewHistoryDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewHistoryDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewHistoryDefinitionable) + } + m.SetHistoryDefinitions(res) + } + return nil + } + res["policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicy(val.(AccessReviewPolicyable)) + } + return nil + } + return res +} +// GetHistoryDefinitions gets the historyDefinitions property value. Represents a collection of access review history data and the scopes used to collect that data. +func (m *AccessReviewSet) GetHistoryDefinitions()([]AccessReviewHistoryDefinitionable) { + return m.historyDefinitions +} +// GetPolicy gets the policy property value. Resource that enables administrators to manage directory-level access review policies in their tenant. +func (m *AccessReviewSet) GetPolicy()(AccessReviewPolicyable) { + return m.policy +} +// Serialize serializes information the current object +func (m *AccessReviewSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDecisions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDecisions())) + for i, v := range m.GetDecisions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("decisions", cast) + if err != nil { + return err + } + } + if m.GetDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefinitions())) + for i, v := range m.GetDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("definitions", cast) + if err != nil { + return err + } + } + if m.GetHistoryDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistoryDefinitions())) + for i, v := range m.GetHistoryDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("historyDefinitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("policy", m.GetPolicy()) + if err != nil { + return err + } + } + return nil +} +// SetDecisions sets the decisions property value. Represents an Azure AD access review decision on an instance of a review. +func (m *AccessReviewSet) SetDecisions(value []AccessReviewInstanceDecisionItemable)() { + m.decisions = value +} +// SetDefinitions sets the definitions property value. Represents the template and scheduling for an access review. +func (m *AccessReviewSet) SetDefinitions(value []AccessReviewScheduleDefinitionable)() { + m.definitions = value +} +// SetHistoryDefinitions sets the historyDefinitions property value. Represents a collection of access review history data and the scopes used to collect that data. +func (m *AccessReviewSet) SetHistoryDefinitions(value []AccessReviewHistoryDefinitionable)() { + m.historyDefinitions = value +} +// SetPolicy sets the policy property value. Resource that enables administrators to manage directory-level access review policies in their tenant. +func (m *AccessReviewSet) SetPolicy(value AccessReviewPolicyable)() { + m.policy = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_setable.go b/src/internal/connector/graph/betasdk/models/access_review_setable.go new file mode 100644 index 000000000..782c362cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_setable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewSetable +type AccessReviewSetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecisions()([]AccessReviewInstanceDecisionItemable) + GetDefinitions()([]AccessReviewScheduleDefinitionable) + GetHistoryDefinitions()([]AccessReviewHistoryDefinitionable) + GetPolicy()(AccessReviewPolicyable) + SetDecisions(value []AccessReviewInstanceDecisionItemable)() + SetDefinitions(value []AccessReviewScheduleDefinitionable)() + SetHistoryDefinitions(value []AccessReviewHistoryDefinitionable)() + SetPolicy(value AccessReviewPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_settings.go b/src/internal/connector/graph/betasdk/models/access_review_settings.go new file mode 100644 index 000000000..5b6594b3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_settings.go @@ -0,0 +1,323 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewSettings +type AccessReviewSettings struct { + // Indicates whether showing recommendations to reviewers is enabled. + accessRecommendationsEnabled *bool + // The number of days of user activities to show to reviewers. + activityDurationInDays *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Indicates whether the auto-apply capability, to automatically change the target object access resource, is enabled. If not enabled, a user must, after the review completes, apply the access review. + autoApplyReviewResultsEnabled *bool + // Indicates whether a decision should be set if the reviewer did not supply one. For use when auto-apply is enabled. If you don't want to have a review decision recorded unless the reviewer makes an explicit choice, set it to false. + autoReviewEnabled *bool + // Detailed settings for how the feature should set the review decision. For use when auto-apply is enabled. + autoReviewSettings AutoReviewSettingsable + // Indicates whether reviewers are required to provide a justification when reviewing access. + justificationRequiredOnApproval *bool + // Indicates whether sending mails to reviewers and the review creator is enabled. + mailNotificationsEnabled *bool + // The OdataType property + odataType *string + // Detailed settings for recurrence. + recurrenceSettings AccessReviewRecurrenceSettingsable + // Indicates whether sending reminder emails to reviewers is enabled. + remindersEnabled *bool +} +// NewAccessReviewSettings instantiates a new accessReviewSettings and sets the default values. +func NewAccessReviewSettings()(*AccessReviewSettings) { + m := &AccessReviewSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.businessFlowSettings": + return NewBusinessFlowSettings(), nil + } + } + } + } + return NewAccessReviewSettings(), nil +} +// GetAccessRecommendationsEnabled gets the accessRecommendationsEnabled property value. Indicates whether showing recommendations to reviewers is enabled. +func (m *AccessReviewSettings) GetAccessRecommendationsEnabled()(*bool) { + return m.accessRecommendationsEnabled +} +// GetActivityDurationInDays gets the activityDurationInDays property value. The number of days of user activities to show to reviewers. +func (m *AccessReviewSettings) GetActivityDurationInDays()(*int32) { + return m.activityDurationInDays +} +// 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 *AccessReviewSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAutoApplyReviewResultsEnabled gets the autoApplyReviewResultsEnabled property value. Indicates whether the auto-apply capability, to automatically change the target object access resource, is enabled. If not enabled, a user must, after the review completes, apply the access review. +func (m *AccessReviewSettings) GetAutoApplyReviewResultsEnabled()(*bool) { + return m.autoApplyReviewResultsEnabled +} +// GetAutoReviewEnabled gets the autoReviewEnabled property value. Indicates whether a decision should be set if the reviewer did not supply one. For use when auto-apply is enabled. If you don't want to have a review decision recorded unless the reviewer makes an explicit choice, set it to false. +func (m *AccessReviewSettings) GetAutoReviewEnabled()(*bool) { + return m.autoReviewEnabled +} +// GetAutoReviewSettings gets the autoReviewSettings property value. Detailed settings for how the feature should set the review decision. For use when auto-apply is enabled. +func (m *AccessReviewSettings) GetAutoReviewSettings()(AutoReviewSettingsable) { + return m.autoReviewSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessRecommendationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessRecommendationsEnabled(val) + } + return nil + } + res["activityDurationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActivityDurationInDays(val) + } + return nil + } + res["autoApplyReviewResultsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoApplyReviewResultsEnabled(val) + } + return nil + } + res["autoReviewEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoReviewEnabled(val) + } + return nil + } + res["autoReviewSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAutoReviewSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutoReviewSettings(val.(AutoReviewSettingsable)) + } + return nil + } + res["justificationRequiredOnApproval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetJustificationRequiredOnApproval(val) + } + return nil + } + res["mailNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNotificationsEnabled(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["recurrenceSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewRecurrenceSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceSettings(val.(AccessReviewRecurrenceSettingsable)) + } + return nil + } + res["remindersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRemindersEnabled(val) + } + return nil + } + return res +} +// GetJustificationRequiredOnApproval gets the justificationRequiredOnApproval property value. Indicates whether reviewers are required to provide a justification when reviewing access. +func (m *AccessReviewSettings) GetJustificationRequiredOnApproval()(*bool) { + return m.justificationRequiredOnApproval +} +// GetMailNotificationsEnabled gets the mailNotificationsEnabled property value. Indicates whether sending mails to reviewers and the review creator is enabled. +func (m *AccessReviewSettings) GetMailNotificationsEnabled()(*bool) { + return m.mailNotificationsEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrenceSettings gets the recurrenceSettings property value. Detailed settings for recurrence. +func (m *AccessReviewSettings) GetRecurrenceSettings()(AccessReviewRecurrenceSettingsable) { + return m.recurrenceSettings +} +// GetRemindersEnabled gets the remindersEnabled property value. Indicates whether sending reminder emails to reviewers is enabled. +func (m *AccessReviewSettings) GetRemindersEnabled()(*bool) { + return m.remindersEnabled +} +// Serialize serializes information the current object +func (m *AccessReviewSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("accessRecommendationsEnabled", m.GetAccessRecommendationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("activityDurationInDays", m.GetActivityDurationInDays()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("autoApplyReviewResultsEnabled", m.GetAutoApplyReviewResultsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("autoReviewEnabled", m.GetAutoReviewEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("autoReviewSettings", m.GetAutoReviewSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("justificationRequiredOnApproval", m.GetJustificationRequiredOnApproval()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("mailNotificationsEnabled", m.GetMailNotificationsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recurrenceSettings", m.GetRecurrenceSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("remindersEnabled", m.GetRemindersEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessRecommendationsEnabled sets the accessRecommendationsEnabled property value. Indicates whether showing recommendations to reviewers is enabled. +func (m *AccessReviewSettings) SetAccessRecommendationsEnabled(value *bool)() { + m.accessRecommendationsEnabled = value +} +// SetActivityDurationInDays sets the activityDurationInDays property value. The number of days of user activities to show to reviewers. +func (m *AccessReviewSettings) SetActivityDurationInDays(value *int32)() { + m.activityDurationInDays = value +} +// 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 *AccessReviewSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAutoApplyReviewResultsEnabled sets the autoApplyReviewResultsEnabled property value. Indicates whether the auto-apply capability, to automatically change the target object access resource, is enabled. If not enabled, a user must, after the review completes, apply the access review. +func (m *AccessReviewSettings) SetAutoApplyReviewResultsEnabled(value *bool)() { + m.autoApplyReviewResultsEnabled = value +} +// SetAutoReviewEnabled sets the autoReviewEnabled property value. Indicates whether a decision should be set if the reviewer did not supply one. For use when auto-apply is enabled. If you don't want to have a review decision recorded unless the reviewer makes an explicit choice, set it to false. +func (m *AccessReviewSettings) SetAutoReviewEnabled(value *bool)() { + m.autoReviewEnabled = value +} +// SetAutoReviewSettings sets the autoReviewSettings property value. Detailed settings for how the feature should set the review decision. For use when auto-apply is enabled. +func (m *AccessReviewSettings) SetAutoReviewSettings(value AutoReviewSettingsable)() { + m.autoReviewSettings = value +} +// SetJustificationRequiredOnApproval sets the justificationRequiredOnApproval property value. Indicates whether reviewers are required to provide a justification when reviewing access. +func (m *AccessReviewSettings) SetJustificationRequiredOnApproval(value *bool)() { + m.justificationRequiredOnApproval = value +} +// SetMailNotificationsEnabled sets the mailNotificationsEnabled property value. Indicates whether sending mails to reviewers and the review creator is enabled. +func (m *AccessReviewSettings) SetMailNotificationsEnabled(value *bool)() { + m.mailNotificationsEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrenceSettings sets the recurrenceSettings property value. Detailed settings for recurrence. +func (m *AccessReviewSettings) SetRecurrenceSettings(value AccessReviewRecurrenceSettingsable)() { + m.recurrenceSettings = value +} +// SetRemindersEnabled sets the remindersEnabled property value. Indicates whether sending reminder emails to reviewers is enabled. +func (m *AccessReviewSettings) SetRemindersEnabled(value *bool)() { + m.remindersEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_settingsable.go b/src/internal/connector/graph/betasdk/models/access_review_settingsable.go new file mode 100644 index 000000000..779669905 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_settingsable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewSettingsable +type AccessReviewSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessRecommendationsEnabled()(*bool) + GetActivityDurationInDays()(*int32) + GetAutoApplyReviewResultsEnabled()(*bool) + GetAutoReviewEnabled()(*bool) + GetAutoReviewSettings()(AutoReviewSettingsable) + GetJustificationRequiredOnApproval()(*bool) + GetMailNotificationsEnabled()(*bool) + GetOdataType()(*string) + GetRecurrenceSettings()(AccessReviewRecurrenceSettingsable) + GetRemindersEnabled()(*bool) + SetAccessRecommendationsEnabled(value *bool)() + SetActivityDurationInDays(value *int32)() + SetAutoApplyReviewResultsEnabled(value *bool)() + SetAutoReviewEnabled(value *bool)() + SetAutoReviewSettings(value AutoReviewSettingsable)() + SetJustificationRequiredOnApproval(value *bool)() + SetMailNotificationsEnabled(value *bool)() + SetOdataType(value *string)() + SetRecurrenceSettings(value AccessReviewRecurrenceSettingsable)() + SetRemindersEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage.go b/src/internal/connector/graph/betasdk/models/access_review_stage.go new file mode 100644 index 000000000..300f7cf5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage.go @@ -0,0 +1,215 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewStage struct { + Entity + // Each user reviewed in an accessReviewStage has a decision item representing if they were approved, denied, or not yet reviewed. + decisions []AccessReviewInstanceDecisionItemable + // DateTime when review stage is scheduled to end. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. This property is the cumulative total of the durationInDays for all stages. Read-only. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. + fallbackReviewers []AccessReviewReviewerScopeable + // This collection of access review scopes is used to define who the reviewers are. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. + reviewers []AccessReviewReviewerScopeable + // DateTime when review stage is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the status of an accessReviewStage. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $orderby, and $filter (eq only). Read-only. + status *string +} +// NewAccessReviewStage instantiates a new accessReviewStage and sets the default values. +func NewAccessReviewStage()(*AccessReviewStage) { + m := &AccessReviewStage{ + Entity: *NewEntity(), + } + return m +} +// CreateAccessReviewStageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewStageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewStage(), nil +} +// GetDecisions gets the decisions property value. Each user reviewed in an accessReviewStage has a decision item representing if they were approved, denied, or not yet reviewed. +func (m *AccessReviewStage) GetDecisions()([]AccessReviewInstanceDecisionItemable) { + return m.decisions +} +// GetEndDateTime gets the endDateTime property value. DateTime when review stage is scheduled to end. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. This property is the cumulative total of the durationInDays for all stages. Read-only. +func (m *AccessReviewStage) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFallbackReviewers gets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. +func (m *AccessReviewStage) GetFallbackReviewers()([]AccessReviewReviewerScopeable) { + return m.fallbackReviewers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewStage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["decisions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewInstanceDecisionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewInstanceDecisionItemable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewInstanceDecisionItemable) + } + m.SetDecisions(res) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["fallbackReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetFallbackReviewers(res) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetReviewers(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetReviewers gets the reviewers property value. This collection of access review scopes is used to define who the reviewers are. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. +func (m *AccessReviewStage) GetReviewers()([]AccessReviewReviewerScopeable) { + return m.reviewers +} +// GetStartDateTime gets the startDateTime property value. DateTime when review stage is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessReviewStage) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. Specifies the status of an accessReviewStage. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewStage) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *AccessReviewStage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDecisions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDecisions())) + for i, v := range m.GetDecisions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("decisions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetFallbackReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFallbackReviewers())) + for i, v := range m.GetFallbackReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fallbackReviewers", cast) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetDecisions sets the decisions property value. Each user reviewed in an accessReviewStage has a decision item representing if they were approved, denied, or not yet reviewed. +func (m *AccessReviewStage) SetDecisions(value []AccessReviewInstanceDecisionItemable)() { + m.decisions = value +} +// SetEndDateTime sets the endDateTime property value. DateTime when review stage is scheduled to end. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. This property is the cumulative total of the durationInDays for all stages. Read-only. +func (m *AccessReviewStage) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetFallbackReviewers sets the fallbackReviewers property value. This collection of reviewer scopes is used to define the list of fallback reviewers. These fallback reviewers will be notified to take action if no users are found from the list of reviewers specified. This could occur when either the group owner is specified as the reviewer but the group owner does not exist, or manager is specified as reviewer but a user's manager does not exist. +func (m *AccessReviewStage) SetFallbackReviewers(value []AccessReviewReviewerScopeable)() { + m.fallbackReviewers = value +} +// SetReviewers sets the reviewers property value. This collection of access review scopes is used to define who the reviewers are. For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. +func (m *AccessReviewStage) SetReviewers(value []AccessReviewReviewerScopeable)() { + m.reviewers = value +} +// SetStartDateTime sets the startDateTime property value. DateTime when review stage is scheduled to start. May be in the future. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AccessReviewStage) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. Specifies the status of an accessReviewStage. Possible values: Initializing, NotStarted, Starting, InProgress, Completing, Completed, AutoReviewing, and AutoReviewed. Supports $orderby, and $filter (eq only). Read-only. +func (m *AccessReviewStage) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_stage_collection_response.go new file mode 100644 index 000000000..ce78c0964 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageCollectionResponse +type AccessReviewStageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewStageable +} +// NewAccessReviewStageCollectionResponse instantiates a new AccessReviewStageCollectionResponse and sets the default values. +func NewAccessReviewStageCollectionResponse()(*AccessReviewStageCollectionResponse) { + m := &AccessReviewStageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewStageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewStageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewStageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewStageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewStageable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewStageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewStageCollectionResponse) GetValue()([]AccessReviewStageable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewStageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewStageCollectionResponse) SetValue(value []AccessReviewStageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_stage_collection_responseable.go new file mode 100644 index 000000000..554e91c8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageCollectionResponseable +type AccessReviewStageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewStageable) + SetValue(value []AccessReviewStageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_settings.go b/src/internal/connector/graph/betasdk/models/access_review_stage_settings.go new file mode 100644 index 000000000..d7a2ee401 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_settings.go @@ -0,0 +1,337 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageSettings +type AccessReviewStageSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Indicate which decisions will go to the next stage. Can be a sub-set of Approve, Deny, Recommendation, or NotReviewed. If not provided, all decisions will go to the next stage. Optional. + decisionsThatWillMoveToNextStage []string + // Defines the sequential or parallel order of the stages and depends on the stageId. Only sequential stages are currently supported. For example, if stageId is 2, then dependsOn must be 1. If stageId is 1, do not specify dependsOn. Required if stageId is not 1. + dependsOn []string + // The duration of the stage. Required. NOTE: The cumulative value of this property across all stages 1. Will override the instanceDurationInDays setting on the accessReviewScheduleDefinition object. 2. Cannot exceed the length of one recurrence. That is, if the review recurs weekly, the cumulative durationInDays cannot exceed 7. + durationInDays *int32 + // If provided, the fallback reviewers are asked to complete a review if the primary reviewers do not exist. For example, if managers are selected as reviewers and a principal under review does not have a manager in Azure AD, the fallback reviewers are asked to review that principal. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. + fallbackReviewers []AccessReviewReviewerScopeable + // The OdataType property + odataType *string + // The recommendationInsightSettings property + recommendationInsightSettings []AccessReviewRecommendationInsightSettingable + // Optional field. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. + recommendationLookBackDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Indicates whether showing recommendations to reviewers is enabled. Required. NOTE: The value of this property will override override the corresponding setting on the accessReviewScheduleDefinition object. + recommendationsEnabled *bool + // Defines who the reviewers are. If none are specified, the review is a self-review (users review their own access). For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition. + reviewers []AccessReviewReviewerScopeable + // Unique identifier of the accessReviewStageSettings. The stageId will be used in dependsOn property to indicate the stage relationship. Required. + stageId *string +} +// NewAccessReviewStageSettings instantiates a new accessReviewStageSettings and sets the default values. +func NewAccessReviewStageSettings()(*AccessReviewStageSettings) { + m := &AccessReviewStageSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccessReviewStageSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewStageSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewStageSettings(), 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 *AccessReviewStageSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDecisionsThatWillMoveToNextStage gets the decisionsThatWillMoveToNextStage property value. Indicate which decisions will go to the next stage. Can be a sub-set of Approve, Deny, Recommendation, or NotReviewed. If not provided, all decisions will go to the next stage. Optional. +func (m *AccessReviewStageSettings) GetDecisionsThatWillMoveToNextStage()([]string) { + return m.decisionsThatWillMoveToNextStage +} +// GetDependsOn gets the dependsOn property value. Defines the sequential or parallel order of the stages and depends on the stageId. Only sequential stages are currently supported. For example, if stageId is 2, then dependsOn must be 1. If stageId is 1, do not specify dependsOn. Required if stageId is not 1. +func (m *AccessReviewStageSettings) GetDependsOn()([]string) { + return m.dependsOn +} +// GetDurationInDays gets the durationInDays property value. The duration of the stage. Required. NOTE: The cumulative value of this property across all stages 1. Will override the instanceDurationInDays setting on the accessReviewScheduleDefinition object. 2. Cannot exceed the length of one recurrence. That is, if the review recurs weekly, the cumulative durationInDays cannot exceed 7. +func (m *AccessReviewStageSettings) GetDurationInDays()(*int32) { + return m.durationInDays +} +// GetFallbackReviewers gets the fallbackReviewers property value. If provided, the fallback reviewers are asked to complete a review if the primary reviewers do not exist. For example, if managers are selected as reviewers and a principal under review does not have a manager in Azure AD, the fallback reviewers are asked to review that principal. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) GetFallbackReviewers()([]AccessReviewReviewerScopeable) { + return m.fallbackReviewers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewStageSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["decisionsThatWillMoveToNextStage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDecisionsThatWillMoveToNextStage(res) + } + return nil + } + res["dependsOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDependsOn(res) + } + return nil + } + res["durationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInDays(val) + } + return nil + } + res["fallbackReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetFallbackReviewers(res) + } + 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["recommendationInsightSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewRecommendationInsightSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewRecommendationInsightSettingable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewRecommendationInsightSettingable) + } + m.SetRecommendationInsightSettings(res) + } + return nil + } + res["recommendationLookBackDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationLookBackDuration(val) + } + return nil + } + res["recommendationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationsEnabled(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetReviewers(res) + } + return nil + } + res["stageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStageId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccessReviewStageSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecommendationInsightSettings gets the recommendationInsightSettings property value. The recommendationInsightSettings property +func (m *AccessReviewStageSettings) GetRecommendationInsightSettings()([]AccessReviewRecommendationInsightSettingable) { + return m.recommendationInsightSettings +} +// GetRecommendationLookBackDuration gets the recommendationLookBackDuration property value. Optional field. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) GetRecommendationLookBackDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.recommendationLookBackDuration +} +// GetRecommendationsEnabled gets the recommendationsEnabled property value. Indicates whether showing recommendations to reviewers is enabled. Required. NOTE: The value of this property will override override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) GetRecommendationsEnabled()(*bool) { + return m.recommendationsEnabled +} +// GetReviewers gets the reviewers property value. Defines who the reviewers are. If none are specified, the review is a self-review (users review their own access). For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition. +func (m *AccessReviewStageSettings) GetReviewers()([]AccessReviewReviewerScopeable) { + return m.reviewers +} +// GetStageId gets the stageId property value. Unique identifier of the accessReviewStageSettings. The stageId will be used in dependsOn property to indicate the stage relationship. Required. +func (m *AccessReviewStageSettings) GetStageId()(*string) { + return m.stageId +} +// Serialize serializes information the current object +func (m *AccessReviewStageSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDecisionsThatWillMoveToNextStage() != nil { + err := writer.WriteCollectionOfStringValues("decisionsThatWillMoveToNextStage", m.GetDecisionsThatWillMoveToNextStage()) + if err != nil { + return err + } + } + if m.GetDependsOn() != nil { + err := writer.WriteCollectionOfStringValues("dependsOn", m.GetDependsOn()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("durationInDays", m.GetDurationInDays()) + if err != nil { + return err + } + } + if m.GetFallbackReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFallbackReviewers())) + for i, v := range m.GetFallbackReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("fallbackReviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecommendationInsightSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecommendationInsightSettings())) + for i, v := range m.GetRecommendationInsightSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("recommendationInsightSettings", cast) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("recommendationLookBackDuration", m.GetRecommendationLookBackDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("recommendationsEnabled", m.GetRecommendationsEnabled()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stageId", m.GetStageId()) + 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 *AccessReviewStageSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDecisionsThatWillMoveToNextStage sets the decisionsThatWillMoveToNextStage property value. Indicate which decisions will go to the next stage. Can be a sub-set of Approve, Deny, Recommendation, or NotReviewed. If not provided, all decisions will go to the next stage. Optional. +func (m *AccessReviewStageSettings) SetDecisionsThatWillMoveToNextStage(value []string)() { + m.decisionsThatWillMoveToNextStage = value +} +// SetDependsOn sets the dependsOn property value. Defines the sequential or parallel order of the stages and depends on the stageId. Only sequential stages are currently supported. For example, if stageId is 2, then dependsOn must be 1. If stageId is 1, do not specify dependsOn. Required if stageId is not 1. +func (m *AccessReviewStageSettings) SetDependsOn(value []string)() { + m.dependsOn = value +} +// SetDurationInDays sets the durationInDays property value. The duration of the stage. Required. NOTE: The cumulative value of this property across all stages 1. Will override the instanceDurationInDays setting on the accessReviewScheduleDefinition object. 2. Cannot exceed the length of one recurrence. That is, if the review recurs weekly, the cumulative durationInDays cannot exceed 7. +func (m *AccessReviewStageSettings) SetDurationInDays(value *int32)() { + m.durationInDays = value +} +// SetFallbackReviewers sets the fallbackReviewers property value. If provided, the fallback reviewers are asked to complete a review if the primary reviewers do not exist. For example, if managers are selected as reviewers and a principal under review does not have a manager in Azure AD, the fallback reviewers are asked to review that principal. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) SetFallbackReviewers(value []AccessReviewReviewerScopeable)() { + m.fallbackReviewers = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccessReviewStageSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommendationInsightSettings sets the recommendationInsightSettings property value. The recommendationInsightSettings property +func (m *AccessReviewStageSettings) SetRecommendationInsightSettings(value []AccessReviewRecommendationInsightSettingable)() { + m.recommendationInsightSettings = value +} +// SetRecommendationLookBackDuration sets the recommendationLookBackDuration property value. Optional field. Indicates the time period of inactivity (with respect to the start date of the review instance) that recommendations will be configured from. The recommendation will be to deny if the user is inactive during the look back duration. For reviews of groups and Azure AD roles, any duration is accepted. For reviews of applications, 30 days is the maximum duration. If not specified, the duration is 30 days. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) SetRecommendationLookBackDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.recommendationLookBackDuration = value +} +// SetRecommendationsEnabled sets the recommendationsEnabled property value. Indicates whether showing recommendations to reviewers is enabled. Required. NOTE: The value of this property will override override the corresponding setting on the accessReviewScheduleDefinition object. +func (m *AccessReviewStageSettings) SetRecommendationsEnabled(value *bool)() { + m.recommendationsEnabled = value +} +// SetReviewers sets the reviewers property value. Defines who the reviewers are. If none are specified, the review is a self-review (users review their own access). For examples of options for assigning reviewers, see Assign reviewers to your access review definition using the Microsoft Graph API. NOTE: The value of this property will override the corresponding setting on the accessReviewScheduleDefinition. +func (m *AccessReviewStageSettings) SetReviewers(value []AccessReviewReviewerScopeable)() { + m.reviewers = value +} +// SetStageId sets the stageId property value. Unique identifier of the accessReviewStageSettings. The stageId will be used in dependsOn property to indicate the stage relationship. Required. +func (m *AccessReviewStageSettings) SetStageId(value *string)() { + m.stageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_response.go b/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_response.go new file mode 100644 index 000000000..7d47332f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageSettingsCollectionResponse +type AccessReviewStageSettingsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AccessReviewStageSettingsable +} +// NewAccessReviewStageSettingsCollectionResponse instantiates a new AccessReviewStageSettingsCollectionResponse and sets the default values. +func NewAccessReviewStageSettingsCollectionResponse()(*AccessReviewStageSettingsCollectionResponse) { + m := &AccessReviewStageSettingsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccessReviewStageSettingsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccessReviewStageSettingsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccessReviewStageSettingsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccessReviewStageSettingsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewStageSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewStageSettingsable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewStageSettingsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccessReviewStageSettingsCollectionResponse) GetValue()([]AccessReviewStageSettingsable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccessReviewStageSettingsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccessReviewStageSettingsCollectionResponse) SetValue(value []AccessReviewStageSettingsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_responseable.go b/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_responseable.go new file mode 100644 index 000000000..a426dac0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_settings_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageSettingsCollectionResponseable +type AccessReviewStageSettingsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AccessReviewStageSettingsable) + SetValue(value []AccessReviewStageSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stage_settingsable.go b/src/internal/connector/graph/betasdk/models/access_review_stage_settingsable.go new file mode 100644 index 000000000..ca57b099f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stage_settingsable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageSettingsable +type AccessReviewStageSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecisionsThatWillMoveToNextStage()([]string) + GetDependsOn()([]string) + GetDurationInDays()(*int32) + GetFallbackReviewers()([]AccessReviewReviewerScopeable) + GetOdataType()(*string) + GetRecommendationInsightSettings()([]AccessReviewRecommendationInsightSettingable) + GetRecommendationLookBackDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetRecommendationsEnabled()(*bool) + GetReviewers()([]AccessReviewReviewerScopeable) + GetStageId()(*string) + SetDecisionsThatWillMoveToNextStage(value []string)() + SetDependsOn(value []string)() + SetDurationInDays(value *int32)() + SetFallbackReviewers(value []AccessReviewReviewerScopeable)() + SetOdataType(value *string)() + SetRecommendationInsightSettings(value []AccessReviewRecommendationInsightSettingable)() + SetRecommendationLookBackDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetRecommendationsEnabled(value *bool)() + SetReviewers(value []AccessReviewReviewerScopeable)() + SetStageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_stageable.go b/src/internal/connector/graph/betasdk/models/access_review_stageable.go new file mode 100644 index 000000000..337fc1e75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_stageable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewStageable +type AccessReviewStageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecisions()([]AccessReviewInstanceDecisionItemable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFallbackReviewers()([]AccessReviewReviewerScopeable) + GetReviewers()([]AccessReviewReviewerScopeable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + SetDecisions(value []AccessReviewInstanceDecisionItemable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFallbackReviewers(value []AccessReviewReviewerScopeable)() + SetReviewers(value []AccessReviewReviewerScopeable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_review_timeout_behavior.go b/src/internal/connector/graph/betasdk/models/access_review_timeout_behavior.go new file mode 100644 index 000000000..a9fde350e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_review_timeout_behavior.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessReviewTimeoutBehavior int + +const ( + KEEPACCESS_ACCESSREVIEWTIMEOUTBEHAVIOR AccessReviewTimeoutBehavior = iota + REMOVEACCESS_ACCESSREVIEWTIMEOUTBEHAVIOR + ACCEPTACCESSRECOMMENDATION_ACCESSREVIEWTIMEOUTBEHAVIOR + UNKNOWNFUTUREVALUE_ACCESSREVIEWTIMEOUTBEHAVIOR +) + +func (i AccessReviewTimeoutBehavior) String() string { + return []string{"keepAccess", "removeAccess", "acceptAccessRecommendation", "unknownFutureValue"}[i] +} +func ParseAccessReviewTimeoutBehavior(v string) (interface{}, error) { + result := KEEPACCESS_ACCESSREVIEWTIMEOUTBEHAVIOR + switch v { + case "keepAccess": + result = KEEPACCESS_ACCESSREVIEWTIMEOUTBEHAVIOR + case "removeAccess": + result = REMOVEACCESS_ACCESSREVIEWTIMEOUTBEHAVIOR + case "acceptAccessRecommendation": + result = ACCEPTACCESSRECOMMENDATION_ACCESSREVIEWTIMEOUTBEHAVIOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSREVIEWTIMEOUTBEHAVIOR + default: + return 0, errors.New("Unknown AccessReviewTimeoutBehavior value: " + v) + } + return &result, nil +} +func SerializeAccessReviewTimeoutBehavior(values []AccessReviewTimeoutBehavior) []string { + 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/access_reviewable.go b/src/internal/connector/graph/betasdk/models/access_reviewable.go new file mode 100644 index 000000000..3e287ba9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_reviewable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccessReviewable +type AccessReviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBusinessFlowTemplateId()(*string) + GetCreatedBy()(UserIdentityable) + GetDecisions()([]AccessReviewDecisionable) + GetDescription()(*string) + GetDisplayName()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInstances()([]AccessReviewable) + GetMyDecisions()([]AccessReviewDecisionable) + GetReviewedEntity()(Identityable) + GetReviewers()([]AccessReviewReviewerable) + GetReviewerType()(*string) + GetSettings()(AccessReviewSettingsable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + SetBusinessFlowTemplateId(value *string)() + SetCreatedBy(value UserIdentityable)() + SetDecisions(value []AccessReviewDecisionable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInstances(value []AccessReviewable)() + SetMyDecisions(value []AccessReviewDecisionable)() + SetReviewedEntity(value Identityable)() + SetReviewers(value []AccessReviewReviewerable)() + SetReviewerType(value *string)() + SetSettings(value AccessReviewSettingsable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/access_type.go b/src/internal/connector/graph/betasdk/models/access_type.go new file mode 100644 index 000000000..1fcd87109 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/access_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessType int + +const ( + GRANT_ACCESSTYPE AccessType = iota + DENY_ACCESSTYPE +) + +func (i AccessType) String() string { + return []string{"grant", "deny"}[i] +} +func ParseAccessType(v string) (interface{}, error) { + result := GRANT_ACCESSTYPE + switch v { + case "grant": + result = GRANT_ACCESSTYPE + case "deny": + result = DENY_ACCESSTYPE + default: + return 0, errors.New("Unknown AccessType value: " + v) + } + return &result, nil +} +func SerializeAccessType(values []AccessType) []string { + 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/account.go b/src/internal/connector/graph/betasdk/models/account.go new file mode 100644 index 000000000..aa69d3b3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Account +type Account struct { + Entity + // The blocked property + blocked *bool + // The category property + category *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The subCategory property + subCategory *string +} +// NewAccount instantiates a new Account and sets the default values. +func NewAccount()(*Account) { + m := &Account{ + Entity: *NewEntity(), + } + return m +} +// CreateAccountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccount(), nil +} +// GetBlocked gets the blocked property value. The blocked property +func (m *Account) GetBlocked()(*bool) { + return m.blocked +} +// GetCategory gets the category property value. The category property +func (m *Account) GetCategory()(*string) { + return m.category +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Account) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Account) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["blocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlocked(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["subCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubCategory(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Account) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *Account) GetNumber()(*string) { + return m.number +} +// GetSubCategory gets the subCategory property value. The subCategory property +func (m *Account) GetSubCategory()(*string) { + return m.subCategory +} +// Serialize serializes information the current object +func (m *Account) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("blocked", m.GetBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subCategory", m.GetSubCategory()) + if err != nil { + return err + } + } + return nil +} +// SetBlocked sets the blocked property value. The blocked property +func (m *Account) SetBlocked(value *bool)() { + m.blocked = value +} +// SetCategory sets the category property value. The category property +func (m *Account) SetCategory(value *string)() { + m.category = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Account) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Account) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *Account) SetNumber(value *string)() { + m.number = value +} +// SetSubCategory sets the subCategory property value. The subCategory property +func (m *Account) SetSubCategory(value *string)() { + m.subCategory = value +} diff --git a/src/internal/connector/graph/betasdk/models/account_collection_response.go b/src/internal/connector/graph/betasdk/models/account_collection_response.go new file mode 100644 index 000000000..48f7b769f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccountCollectionResponse +type AccountCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Accountable +} +// NewAccountCollectionResponse instantiates a new AccountCollectionResponse and sets the default values. +func NewAccountCollectionResponse()(*AccountCollectionResponse) { + m := &AccountCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAccountCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccountCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAccountCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccountCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Accountable, len(val)) + for i, v := range val { + res[i] = v.(Accountable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AccountCollectionResponse) GetValue()([]Accountable) { + return m.value +} +// Serialize serializes information the current object +func (m *AccountCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AccountCollectionResponse) SetValue(value []Accountable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/account_collection_responseable.go b/src/internal/connector/graph/betasdk/models/account_collection_responseable.go new file mode 100644 index 000000000..61bb85882 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccountCollectionResponseable +type AccountCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Accountable) + SetValue(value []Accountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/account_status.go b/src/internal/connector/graph/betasdk/models/account_status.go new file mode 100644 index 000000000..b806bd2d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccountStatus int + +const ( + UNKNOWN_ACCOUNTSTATUS AccountStatus = iota + STAGED_ACCOUNTSTATUS + ACTIVE_ACCOUNTSTATUS + SUSPENDED_ACCOUNTSTATUS + DELETED_ACCOUNTSTATUS + UNKNOWNFUTUREVALUE_ACCOUNTSTATUS +) + +func (i AccountStatus) String() string { + return []string{"unknown", "staged", "active", "suspended", "deleted", "unknownFutureValue"}[i] +} +func ParseAccountStatus(v string) (interface{}, error) { + result := UNKNOWN_ACCOUNTSTATUS + switch v { + case "unknown": + result = UNKNOWN_ACCOUNTSTATUS + case "staged": + result = STAGED_ACCOUNTSTATUS + case "active": + result = ACTIVE_ACCOUNTSTATUS + case "suspended": + result = SUSPENDED_ACCOUNTSTATUS + case "deleted": + result = DELETED_ACCOUNTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCOUNTSTATUS + default: + return 0, errors.New("Unknown AccountStatus value: " + v) + } + return &result, nil +} +func SerializeAccountStatus(values []AccountStatus) []string { + 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/account_target_content.go b/src/internal/connector/graph/betasdk/models/account_target_content.go new file mode 100644 index 000000000..053fc625b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_target_content.go @@ -0,0 +1,118 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccountTargetContent +type AccountTargetContent 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 OdataType property + odataType *string + // The type of account target content. Possible values are: unknown,includeAll, addressBook, unknownFutureValue. + type_escaped *AccountTargetContentType +} +// NewAccountTargetContent instantiates a new accountTargetContent and sets the default values. +func NewAccountTargetContent()(*AccountTargetContent) { + m := &AccountTargetContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAccountTargetContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAccountTargetContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.addressBookAccountTargetContent": + return NewAddressBookAccountTargetContent(), nil + case "#microsoft.graph.includeAllAccountTargetContent": + return NewIncludeAllAccountTargetContent(), nil + } + } + } + } + return NewAccountTargetContent(), 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 *AccountTargetContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AccountTargetContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccountTargetContentType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AccountTargetContentType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AccountTargetContent) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of account target content. Possible values are: unknown,includeAll, addressBook, unknownFutureValue. +func (m *AccountTargetContent) GetType()(*AccountTargetContentType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AccountTargetContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *AccountTargetContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AccountTargetContent) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of account target content. Possible values are: unknown,includeAll, addressBook, unknownFutureValue. +func (m *AccountTargetContent) SetType(value *AccountTargetContentType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/account_target_content_type.go b/src/internal/connector/graph/betasdk/models/account_target_content_type.go new file mode 100644 index 000000000..f6e631c0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_target_content_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccountTargetContentType int + +const ( + UNKNOWN_ACCOUNTTARGETCONTENTTYPE AccountTargetContentType = iota + INCLUDEALL_ACCOUNTTARGETCONTENTTYPE + ADDRESSBOOK_ACCOUNTTARGETCONTENTTYPE + UNKNOWNFUTUREVALUE_ACCOUNTTARGETCONTENTTYPE +) + +func (i AccountTargetContentType) String() string { + return []string{"unknown", "includeAll", "addressBook", "unknownFutureValue"}[i] +} +func ParseAccountTargetContentType(v string) (interface{}, error) { + result := UNKNOWN_ACCOUNTTARGETCONTENTTYPE + switch v { + case "unknown": + result = UNKNOWN_ACCOUNTTARGETCONTENTTYPE + case "includeAll": + result = INCLUDEALL_ACCOUNTTARGETCONTENTTYPE + case "addressBook": + result = ADDRESSBOOK_ACCOUNTTARGETCONTENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCOUNTTARGETCONTENTTYPE + default: + return 0, errors.New("Unknown AccountTargetContentType value: " + v) + } + return &result, nil +} +func SerializeAccountTargetContentType(values []AccountTargetContentType) []string { + 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/account_target_contentable.go b/src/internal/connector/graph/betasdk/models/account_target_contentable.go new file mode 100644 index 000000000..389039baa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/account_target_contentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AccountTargetContentable +type AccountTargetContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*AccountTargetContentType) + SetOdataType(value *string)() + SetType(value *AccountTargetContentType)() +} diff --git a/src/internal/connector/graph/betasdk/models/accountable.go b/src/internal/connector/graph/betasdk/models/accountable.go new file mode 100644 index 000000000..20fef1eb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/accountable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Accountable +type Accountable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlocked()(*bool) + GetCategory()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetSubCategory()(*string) + SetBlocked(value *bool)() + SetCategory(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetSubCategory(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/acl.go b/src/internal/connector/graph/betasdk/models/acl.go new file mode 100644 index 000000000..c3c3a584e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/acl.go @@ -0,0 +1,178 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Acl +type Acl struct { + // The accessType property + accessType *AccessType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The identitySource property + identitySource *IdentitySourceType + // The OdataType property + odataType *string + // The type property + type_escaped *AclType + // The value property + value *string +} +// NewAcl instantiates a new acl and sets the default values. +func NewAcl()(*Acl) { + m := &Acl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAclFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAclFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAcl(), nil +} +// GetAccessType gets the accessType property value. The accessType property +func (m *Acl) GetAccessType()(*AccessType) { + return m.accessType +} +// 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 *Acl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Acl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessType) + if err != nil { + return err + } + if val != nil { + m.SetAccessType(val.(*AccessType)) + } + return nil + } + res["identitySource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentitySourceType) + if err != nil { + return err + } + if val != nil { + m.SetIdentitySource(val.(*IdentitySourceType)) + } + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAclType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AclType)) + } + 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 +} +// GetIdentitySource gets the identitySource property value. The identitySource property +func (m *Acl) GetIdentitySource()(*IdentitySourceType) { + return m.identitySource +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Acl) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *Acl) GetType()(*AclType) { + return m.type_escaped +} +// GetValue gets the value property value. The value property +func (m *Acl) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *Acl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessType() != nil { + cast := (*m.GetAccessType()).String() + err := writer.WriteStringValue("accessType", &cast) + if err != nil { + return err + } + } + if m.GetIdentitySource() != nil { + cast := (*m.GetIdentitySource()).String() + err := writer.WriteStringValue("identitySource", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + 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 +} +// SetAccessType sets the accessType property value. The accessType property +func (m *Acl) SetAccessType(value *AccessType)() { + m.accessType = value +} +// 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 *Acl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdentitySource sets the identitySource property value. The identitySource property +func (m *Acl) SetIdentitySource(value *IdentitySourceType)() { + m.identitySource = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Acl) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *Acl) SetType(value *AclType)() { + m.type_escaped = value +} +// SetValue sets the value property value. The value property +func (m *Acl) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/acl_collection_response.go b/src/internal/connector/graph/betasdk/models/acl_collection_response.go new file mode 100644 index 000000000..1c2ecd874 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/acl_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AclCollectionResponse +type AclCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Aclable +} +// NewAclCollectionResponse instantiates a new AclCollectionResponse and sets the default values. +func NewAclCollectionResponse()(*AclCollectionResponse) { + m := &AclCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAclCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAclCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAclCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AclCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAclFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Aclable, len(val)) + for i, v := range val { + res[i] = v.(Aclable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AclCollectionResponse) GetValue()([]Aclable) { + return m.value +} +// Serialize serializes information the current object +func (m *AclCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AclCollectionResponse) SetValue(value []Aclable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/acl_collection_responseable.go b/src/internal/connector/graph/betasdk/models/acl_collection_responseable.go new file mode 100644 index 000000000..3e36cda3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/acl_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AclCollectionResponseable +type AclCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Aclable) + SetValue(value []Aclable)() +} diff --git a/src/internal/connector/graph/betasdk/models/acl_type.go b/src/internal/connector/graph/betasdk/models/acl_type.go new file mode 100644 index 000000000..4a79f7226 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/acl_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AclType int + +const ( + USER_ACLTYPE AclType = iota + GROUP_ACLTYPE + EVERYONE_ACLTYPE + EVERYONEEXCEPTGUESTS_ACLTYPE + EXTERNALGROUP_ACLTYPE + UNKNOWNFUTUREVALUE_ACLTYPE +) + +func (i AclType) String() string { + return []string{"user", "group", "everyone", "everyoneExceptGuests", "externalGroup", "unknownFutureValue"}[i] +} +func ParseAclType(v string) (interface{}, error) { + result := USER_ACLTYPE + switch v { + case "user": + result = USER_ACLTYPE + case "group": + result = GROUP_ACLTYPE + case "everyone": + result = EVERYONE_ACLTYPE + case "everyoneExceptGuests": + result = EVERYONEEXCEPTGUESTS_ACLTYPE + case "externalGroup": + result = EXTERNALGROUP_ACLTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACLTYPE + default: + return 0, errors.New("Unknown AclType value: " + v) + } + return &result, nil +} +func SerializeAclType(values []AclType) []string { + 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/aclable.go b/src/internal/connector/graph/betasdk/models/aclable.go new file mode 100644 index 000000000..4a16bb5e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aclable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Aclable +type Aclable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessType()(*AccessType) + GetIdentitySource()(*IdentitySourceType) + GetOdataType()(*string) + GetType()(*AclType) + GetValue()(*string) + SetAccessType(value *AccessType)() + SetIdentitySource(value *IdentitySourceType)() + SetOdataType(value *string)() + SetType(value *AclType)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/action_source.go b/src/internal/connector/graph/betasdk/models/action_source.go new file mode 100644 index 000000000..fd29750a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_source.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type ActionSource int + +const ( + MANUAL_ACTIONSOURCE ActionSource = iota + AUTOMATIC_ACTIONSOURCE + RECOMMENDED_ACTIONSOURCE + DEFAULT_ESCAPED_ACTIONSOURCE +) + +func (i ActionSource) String() string { + return []string{"manual", "automatic", "recommended", "default"}[i] +} +func ParseActionSource(v string) (interface{}, error) { + result := MANUAL_ACTIONSOURCE + switch v { + case "manual": + result = MANUAL_ACTIONSOURCE + case "automatic": + result = AUTOMATIC_ACTIONSOURCE + case "recommended": + result = RECOMMENDED_ACTIONSOURCE + case "default": + result = DEFAULT_ESCAPED_ACTIONSOURCE + default: + return 0, errors.New("Unknown ActionSource value: " + v) + } + return &result, nil +} +func SerializeActionSource(values []ActionSource) []string { + 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/action_state.go b/src/internal/connector/graph/betasdk/models/action_state.go new file mode 100644 index 000000000..23f8fc947 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_state.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ActionState int + +const ( + NONE_ACTIONSTATE ActionState = iota + PENDING_ACTIONSTATE + CANCELED_ACTIONSTATE + ACTIVE_ACTIONSTATE + DONE_ACTIONSTATE + FAILED_ACTIONSTATE + NOTSUPPORTED_ACTIONSTATE +) + +func (i ActionState) String() string { + return []string{"none", "pending", "canceled", "active", "done", "failed", "notSupported"}[i] +} +func ParseActionState(v string) (interface{}, error) { + result := NONE_ACTIONSTATE + switch v { + case "none": + result = NONE_ACTIONSTATE + case "pending": + result = PENDING_ACTIONSTATE + case "canceled": + result = CANCELED_ACTIONSTATE + case "active": + result = ACTIVE_ACTIONSTATE + case "done": + result = DONE_ACTIONSTATE + case "failed": + result = FAILED_ACTIONSTATE + case "notSupported": + result = NOTSUPPORTED_ACTIONSTATE + default: + return 0, errors.New("Unknown ActionState value: " + v) + } + return &result, nil +} +func SerializeActionState(values []ActionState) []string { + 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/action_step.go b/src/internal/connector/graph/betasdk/models/action_step.go new file mode 100644 index 000000000..6067f6a2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_step.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionStep +type ActionStep struct { + // The actionUrl property + actionUrl ActionUrlable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string + // The stepNumber property + stepNumber *int64 + // The text property + text *string +} +// NewActionStep instantiates a new actionStep and sets the default values. +func NewActionStep()(*ActionStep) { + m := &ActionStep{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateActionStepFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActionStepFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionStep(), nil +} +// GetActionUrl gets the actionUrl property value. The actionUrl property +func (m *ActionStep) GetActionUrl()(ActionUrlable) { + return m.actionUrl +} +// 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 *ActionStep) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActionStep) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActionUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActionUrl(val.(ActionUrlable)) + } + 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["stepNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetStepNumber(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ActionStep) GetOdataType()(*string) { + return m.odataType +} +// GetStepNumber gets the stepNumber property value. The stepNumber property +func (m *ActionStep) GetStepNumber()(*int64) { + return m.stepNumber +} +// GetText gets the text property value. The text property +func (m *ActionStep) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *ActionStep) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("actionUrl", m.GetActionUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("stepNumber", m.GetStepNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionUrl sets the actionUrl property value. The actionUrl property +func (m *ActionStep) SetActionUrl(value ActionUrlable)() { + m.actionUrl = value +} +// 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 *ActionStep) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ActionStep) SetOdataType(value *string)() { + m.odataType = value +} +// SetStepNumber sets the stepNumber property value. The stepNumber property +func (m *ActionStep) SetStepNumber(value *int64)() { + m.stepNumber = value +} +// SetText sets the text property value. The text property +func (m *ActionStep) SetText(value *string)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/action_step_collection_response.go b/src/internal/connector/graph/betasdk/models/action_step_collection_response.go new file mode 100644 index 000000000..055a6e876 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_step_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionStepCollectionResponse +type ActionStepCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActionStepable +} +// NewActionStepCollectionResponse instantiates a new ActionStepCollectionResponse and sets the default values. +func NewActionStepCollectionResponse()(*ActionStepCollectionResponse) { + m := &ActionStepCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActionStepCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActionStepCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionStepCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActionStepCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActionStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActionStepable, len(val)) + for i, v := range val { + res[i] = v.(ActionStepable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActionStepCollectionResponse) GetValue()([]ActionStepable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActionStepCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActionStepCollectionResponse) SetValue(value []ActionStepable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/action_step_collection_responseable.go b/src/internal/connector/graph/betasdk/models/action_step_collection_responseable.go new file mode 100644 index 000000000..61ce563c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_step_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionStepCollectionResponseable +type ActionStepCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActionStepable) + SetValue(value []ActionStepable)() +} diff --git a/src/internal/connector/graph/betasdk/models/action_stepable.go b/src/internal/connector/graph/betasdk/models/action_stepable.go new file mode 100644 index 000000000..2e12b6fd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_stepable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionStepable +type ActionStepable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionUrl()(ActionUrlable) + GetOdataType()(*string) + GetStepNumber()(*int64) + GetText()(*string) + SetActionUrl(value ActionUrlable)() + SetOdataType(value *string)() + SetStepNumber(value *int64)() + SetText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/action_url.go b/src/internal/connector/graph/betasdk/models/action_url.go new file mode 100644 index 000000000..82cf20eaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_url.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionUrl +type ActionUrl 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 displayName property + displayName *string + // The OdataType property + odataType *string + // The url property + url *string +} +// NewActionUrl instantiates a new actionUrl and sets the default values. +func NewActionUrl()(*ActionUrl) { + m := &ActionUrl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateActionUrlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActionUrlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionUrl(), 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 *ActionUrl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ActionUrl) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActionUrl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ActionUrl) GetOdataType()(*string) { + return m.odataType +} +// GetUrl gets the url property value. The url property +func (m *ActionUrl) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ActionUrl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *ActionUrl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ActionUrl) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ActionUrl) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrl sets the url property value. The url property +func (m *ActionUrl) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/action_url_collection_response.go b/src/internal/connector/graph/betasdk/models/action_url_collection_response.go new file mode 100644 index 000000000..7d34c8c47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_url_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionUrlCollectionResponse +type ActionUrlCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActionUrlable +} +// NewActionUrlCollectionResponse instantiates a new ActionUrlCollectionResponse and sets the default values. +func NewActionUrlCollectionResponse()(*ActionUrlCollectionResponse) { + m := &ActionUrlCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActionUrlCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActionUrlCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActionUrlCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActionUrlCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActionUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActionUrlable, len(val)) + for i, v := range val { + res[i] = v.(ActionUrlable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActionUrlCollectionResponse) GetValue()([]ActionUrlable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActionUrlCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActionUrlCollectionResponse) SetValue(value []ActionUrlable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/action_url_collection_responseable.go b/src/internal/connector/graph/betasdk/models/action_url_collection_responseable.go new file mode 100644 index 000000000..8dbdffa0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_url_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionUrlCollectionResponseable +type ActionUrlCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActionUrlable) + SetValue(value []ActionUrlable)() +} diff --git a/src/internal/connector/graph/betasdk/models/action_urlable.go b/src/internal/connector/graph/betasdk/models/action_urlable.go new file mode 100644 index 000000000..f8e2ab183 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/action_urlable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActionUrlable +type ActionUrlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetUrl()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/activate_device_esim_action_result.go b/src/internal/connector/graph/betasdk/models/activate_device_esim_action_result.go new file mode 100644 index 000000000..d657c4086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activate_device_esim_action_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivateDeviceEsimActionResult +type ActivateDeviceEsimActionResult struct { + DeviceActionResult + // Carrier Url to activate the device eSIM + carrierUrl *string +} +// NewActivateDeviceEsimActionResult instantiates a new ActivateDeviceEsimActionResult and sets the default values. +func NewActivateDeviceEsimActionResult()(*ActivateDeviceEsimActionResult) { + m := &ActivateDeviceEsimActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateActivateDeviceEsimActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivateDeviceEsimActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivateDeviceEsimActionResult(), nil +} +// GetCarrierUrl gets the carrierUrl property value. Carrier Url to activate the device eSIM +func (m *ActivateDeviceEsimActionResult) GetCarrierUrl()(*string) { + return m.carrierUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivateDeviceEsimActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["carrierUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCarrierUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ActivateDeviceEsimActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("carrierUrl", m.GetCarrierUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCarrierUrl sets the carrierUrl property value. Carrier Url to activate the device eSIM +func (m *ActivateDeviceEsimActionResult) SetCarrierUrl(value *string)() { + m.carrierUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/activate_device_esim_action_resultable.go b/src/internal/connector/graph/betasdk/models/activate_device_esim_action_resultable.go new file mode 100644 index 000000000..3dc233d2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activate_device_esim_action_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivateDeviceEsimActionResultable +type ActivateDeviceEsimActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCarrierUrl()(*string) + SetCarrierUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile.go b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile.go new file mode 100644 index 000000000..e5b1fa02a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActiveDirectoryWindowsAutopilotDeploymentProfile +type ActiveDirectoryWindowsAutopilotDeploymentProfile struct { + WindowsAutopilotDeploymentProfile + // Configuration to join Active Directory domain + domainJoinConfiguration WindowsDomainJoinConfigurationable + // The Autopilot Hybrid Azure AD join flow will continue even if it does not establish domain controller connectivity during OOBE. + hybridAzureADJoinSkipConnectivityCheck *bool +} +// NewActiveDirectoryWindowsAutopilotDeploymentProfile instantiates a new ActiveDirectoryWindowsAutopilotDeploymentProfile and sets the default values. +func NewActiveDirectoryWindowsAutopilotDeploymentProfile()(*ActiveDirectoryWindowsAutopilotDeploymentProfile) { + m := &ActiveDirectoryWindowsAutopilotDeploymentProfile{ + WindowsAutopilotDeploymentProfile: *NewWindowsAutopilotDeploymentProfile(), + } + odataTypeValue := "#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateActiveDirectoryWindowsAutopilotDeploymentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActiveDirectoryWindowsAutopilotDeploymentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActiveDirectoryWindowsAutopilotDeploymentProfile(), nil +} +// GetDomainJoinConfiguration gets the domainJoinConfiguration property value. Configuration to join Active Directory domain +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) GetDomainJoinConfiguration()(WindowsDomainJoinConfigurationable) { + return m.domainJoinConfiguration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WindowsAutopilotDeploymentProfile.GetFieldDeserializers() + res["domainJoinConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsDomainJoinConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDomainJoinConfiguration(val.(WindowsDomainJoinConfigurationable)) + } + return nil + } + res["hybridAzureADJoinSkipConnectivityCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHybridAzureADJoinSkipConnectivityCheck(val) + } + return nil + } + return res +} +// GetHybridAzureADJoinSkipConnectivityCheck gets the hybridAzureADJoinSkipConnectivityCheck property value. The Autopilot Hybrid Azure AD join flow will continue even if it does not establish domain controller connectivity during OOBE. +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) GetHybridAzureADJoinSkipConnectivityCheck()(*bool) { + return m.hybridAzureADJoinSkipConnectivityCheck +} +// Serialize serializes information the current object +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WindowsAutopilotDeploymentProfile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("domainJoinConfiguration", m.GetDomainJoinConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hybridAzureADJoinSkipConnectivityCheck", m.GetHybridAzureADJoinSkipConnectivityCheck()) + if err != nil { + return err + } + } + return nil +} +// SetDomainJoinConfiguration sets the domainJoinConfiguration property value. Configuration to join Active Directory domain +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) SetDomainJoinConfiguration(value WindowsDomainJoinConfigurationable)() { + m.domainJoinConfiguration = value +} +// SetHybridAzureADJoinSkipConnectivityCheck sets the hybridAzureADJoinSkipConnectivityCheck property value. The Autopilot Hybrid Azure AD join flow will continue even if it does not establish domain controller connectivity during OOBE. +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfile) SetHybridAzureADJoinSkipConnectivityCheck(value *bool)() { + m.hybridAzureADJoinSkipConnectivityCheck = value +} diff --git a/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_response.go new file mode 100644 index 000000000..54453b18a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse +type ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActiveDirectoryWindowsAutopilotDeploymentProfileable +} +// NewActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse instantiates a new ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse and sets the default values. +func NewActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse()(*ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse) { + m := &ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActiveDirectoryWindowsAutopilotDeploymentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActiveDirectoryWindowsAutopilotDeploymentProfileable, len(val)) + for i, v := range val { + res[i] = v.(ActiveDirectoryWindowsAutopilotDeploymentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse) GetValue()([]ActiveDirectoryWindowsAutopilotDeploymentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponse) SetValue(value []ActiveDirectoryWindowsAutopilotDeploymentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_responseable.go new file mode 100644 index 000000000..1512d80f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponseable +type ActiveDirectoryWindowsAutopilotDeploymentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActiveDirectoryWindowsAutopilotDeploymentProfileable) + SetValue(value []ActiveDirectoryWindowsAutopilotDeploymentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profileable.go b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profileable.go new file mode 100644 index 000000000..885251131 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/active_directory_windows_autopilot_deployment_profileable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActiveDirectoryWindowsAutopilotDeploymentProfileable +type ActiveDirectoryWindowsAutopilotDeploymentProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WindowsAutopilotDeploymentProfileable + GetDomainJoinConfiguration()(WindowsDomainJoinConfigurationable) + GetHybridAzureADJoinSkipConnectivityCheck()(*bool) + SetDomainJoinConfiguration(value WindowsDomainJoinConfigurationable)() + SetHybridAzureADJoinSkipConnectivityCheck(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy.go b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy.go new file mode 100644 index 000000000..d05c6f3fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityBasedTimeoutPolicy +type ActivityBasedTimeoutPolicy struct { + StsPolicy +} +// NewActivityBasedTimeoutPolicy instantiates a new ActivityBasedTimeoutPolicy and sets the default values. +func NewActivityBasedTimeoutPolicy()(*ActivityBasedTimeoutPolicy) { + m := &ActivityBasedTimeoutPolicy{ + StsPolicy: *NewStsPolicy(), + } + odataTypeValue := "#microsoft.graph.activityBasedTimeoutPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateActivityBasedTimeoutPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityBasedTimeoutPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityBasedTimeoutPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityBasedTimeoutPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StsPolicy.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ActivityBasedTimeoutPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StsPolicy.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_response.go new file mode 100644 index 000000000..4d23b8c63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityBasedTimeoutPolicyCollectionResponse +type ActivityBasedTimeoutPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActivityBasedTimeoutPolicyable +} +// NewActivityBasedTimeoutPolicyCollectionResponse instantiates a new ActivityBasedTimeoutPolicyCollectionResponse and sets the default values. +func NewActivityBasedTimeoutPolicyCollectionResponse()(*ActivityBasedTimeoutPolicyCollectionResponse) { + m := &ActivityBasedTimeoutPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActivityBasedTimeoutPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityBasedTimeoutPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityBasedTimeoutPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityBasedTimeoutPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActivityBasedTimeoutPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActivityBasedTimeoutPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ActivityBasedTimeoutPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActivityBasedTimeoutPolicyCollectionResponse) GetValue()([]ActivityBasedTimeoutPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActivityBasedTimeoutPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActivityBasedTimeoutPolicyCollectionResponse) SetValue(value []ActivityBasedTimeoutPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_responseable.go new file mode 100644 index 000000000..98e174f69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityBasedTimeoutPolicyCollectionResponseable +type ActivityBasedTimeoutPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActivityBasedTimeoutPolicyable) + SetValue(value []ActivityBasedTimeoutPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_based_timeout_policyable.go b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policyable.go new file mode 100644 index 000000000..fb7c7cc0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_based_timeout_policyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityBasedTimeoutPolicyable +type ActivityBasedTimeoutPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + StsPolicyable +} diff --git a/src/internal/connector/graph/betasdk/models/activity_history_item.go b/src/internal/connector/graph/betasdk/models/activity_history_item.go new file mode 100644 index 000000000..d978431e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_history_item.go @@ -0,0 +1,270 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityHistoryItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ActivityHistoryItem struct { + Entity + // The activeDurationSeconds property + activeDurationSeconds *int32 + // The activity property + activity UserActivityable + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The expirationDateTime property + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastActiveDateTime property + lastActiveDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The startedDateTime property + startedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *Status + // The userTimezone property + userTimezone *string +} +// NewActivityHistoryItem instantiates a new activityHistoryItem and sets the default values. +func NewActivityHistoryItem()(*ActivityHistoryItem) { + m := &ActivityHistoryItem{ + Entity: *NewEntity(), + } + return m +} +// CreateActivityHistoryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityHistoryItem(), nil +} +// GetActiveDurationSeconds gets the activeDurationSeconds property value. The activeDurationSeconds property +func (m *ActivityHistoryItem) GetActiveDurationSeconds()(*int32) { + return m.activeDurationSeconds +} +// GetActivity gets the activity property value. The activity property +func (m *ActivityHistoryItem) GetActivity()(UserActivityable) { + return m.activity +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ActivityHistoryItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetExpirationDateTime gets the expirationDateTime property value. The expirationDateTime property +func (m *ActivityHistoryItem) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activeDurationSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveDurationSeconds(val) + } + return nil + } + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(UserActivityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["lastActiveDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActiveDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["startedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*Status)) + } + return nil + } + res["userTimezone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserTimezone(val) + } + return nil + } + return res +} +// GetLastActiveDateTime gets the lastActiveDateTime property value. The lastActiveDateTime property +func (m *ActivityHistoryItem) GetLastActiveDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActiveDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ActivityHistoryItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStartedDateTime gets the startedDateTime property value. The startedDateTime property +func (m *ActivityHistoryItem) GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startedDateTime +} +// GetStatus gets the status property value. The status property +func (m *ActivityHistoryItem) GetStatus()(*Status) { + return m.status +} +// GetUserTimezone gets the userTimezone property value. The userTimezone property +func (m *ActivityHistoryItem) GetUserTimezone()(*string) { + return m.userTimezone +} +// Serialize serializes information the current object +func (m *ActivityHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("activeDurationSeconds", m.GetActiveDurationSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActiveDateTime", m.GetLastActiveDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startedDateTime", m.GetStartedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userTimezone", m.GetUserTimezone()) + if err != nil { + return err + } + } + return nil +} +// SetActiveDurationSeconds sets the activeDurationSeconds property value. The activeDurationSeconds property +func (m *ActivityHistoryItem) SetActiveDurationSeconds(value *int32)() { + m.activeDurationSeconds = value +} +// SetActivity sets the activity property value. The activity property +func (m *ActivityHistoryItem) SetActivity(value UserActivityable)() { + m.activity = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ActivityHistoryItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expirationDateTime property +func (m *ActivityHistoryItem) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetLastActiveDateTime sets the lastActiveDateTime property value. The lastActiveDateTime property +func (m *ActivityHistoryItem) SetLastActiveDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActiveDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ActivityHistoryItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStartedDateTime sets the startedDateTime property value. The startedDateTime property +func (m *ActivityHistoryItem) SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *ActivityHistoryItem) SetStatus(value *Status)() { + m.status = value +} +// SetUserTimezone sets the userTimezone property value. The userTimezone property +func (m *ActivityHistoryItem) SetUserTimezone(value *string)() { + m.userTimezone = value +} diff --git a/src/internal/connector/graph/betasdk/models/activity_history_item_collection_response.go b/src/internal/connector/graph/betasdk/models/activity_history_item_collection_response.go new file mode 100644 index 000000000..b6dae5a01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_history_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityHistoryItemCollectionResponse +type ActivityHistoryItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActivityHistoryItemable +} +// NewActivityHistoryItemCollectionResponse instantiates a new ActivityHistoryItemCollectionResponse and sets the default values. +func NewActivityHistoryItemCollectionResponse()(*ActivityHistoryItemCollectionResponse) { + m := &ActivityHistoryItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActivityHistoryItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityHistoryItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityHistoryItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityHistoryItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActivityHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActivityHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(ActivityHistoryItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActivityHistoryItemCollectionResponse) GetValue()([]ActivityHistoryItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActivityHistoryItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActivityHistoryItemCollectionResponse) SetValue(value []ActivityHistoryItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/activity_history_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/activity_history_item_collection_responseable.go new file mode 100644 index 000000000..d70b5dcbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_history_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityHistoryItemCollectionResponseable +type ActivityHistoryItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActivityHistoryItemable) + SetValue(value []ActivityHistoryItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_history_itemable.go b/src/internal/connector/graph/betasdk/models/activity_history_itemable.go new file mode 100644 index 000000000..cc3ba96ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_history_itemable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityHistoryItemable +type ActivityHistoryItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveDurationSeconds()(*int32) + GetActivity()(UserActivityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActiveDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*Status) + GetUserTimezone()(*string) + SetActiveDurationSeconds(value *int32)() + SetActivity(value UserActivityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActiveDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *Status)() + SetUserTimezone(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_statistics.go b/src/internal/connector/graph/betasdk/models/activity_statistics.go new file mode 100644 index 000000000..422d5d60a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_statistics.go @@ -0,0 +1,191 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityStatistics provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ActivityStatistics struct { + Entity + // The type of activity for which statistics are returned. The possible values are: call, chat, email, focus, and meeting. + activity *AnalyticsActivityType + // Total hours spent on the activity. The value is represented in ISO 8601 format for durations. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Date when the activity ended, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-03' that follows the YYYY-MM-DD format. + endDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Date when the activity started, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-04' that follows the YYYY-MM-DD format. + startDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The time zone that the user sets in Microsoft Outlook is used for the computation. For example, the property value could be 'Pacific Standard Time.' + timeZoneUsed *string +} +// NewActivityStatistics instantiates a new activityStatistics and sets the default values. +func NewActivityStatistics()(*ActivityStatistics) { + m := &ActivityStatistics{ + Entity: *NewEntity(), + } + return m +} +// CreateActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.callActivityStatistics": + return NewCallActivityStatistics(), nil + case "#microsoft.graph.chatActivityStatistics": + return NewChatActivityStatistics(), nil + case "#microsoft.graph.emailActivityStatistics": + return NewEmailActivityStatistics(), nil + case "#microsoft.graph.focusActivityStatistics": + return NewFocusActivityStatistics(), nil + case "#microsoft.graph.meetingActivityStatistics": + return NewMeetingActivityStatistics(), nil + } + } + } + } + return NewActivityStatistics(), nil +} +// GetActivity gets the activity property value. The type of activity for which statistics are returned. The possible values are: call, chat, email, focus, and meeting. +func (m *ActivityStatistics) GetActivity()(*AnalyticsActivityType) { + return m.activity +} +// GetDuration gets the duration property value. Total hours spent on the activity. The value is represented in ISO 8601 format for durations. +func (m *ActivityStatistics) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetEndDate gets the endDate property value. Date when the activity ended, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-03' that follows the YYYY-MM-DD format. +func (m *ActivityStatistics) GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnalyticsActivityType) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(*AnalyticsActivityType)) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["endDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDate(val) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + res["timeZoneUsed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeZoneUsed(val) + } + return nil + } + return res +} +// GetStartDate gets the startDate property value. Date when the activity started, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-04' that follows the YYYY-MM-DD format. +func (m *ActivityStatistics) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startDate +} +// GetTimeZoneUsed gets the timeZoneUsed property value. The time zone that the user sets in Microsoft Outlook is used for the computation. For example, the property value could be 'Pacific Standard Time.' +func (m *ActivityStatistics) GetTimeZoneUsed()(*string) { + return m.timeZoneUsed +} +// Serialize serializes information the current object +func (m *ActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivity() != nil { + cast := (*m.GetActivity()).String() + err = writer.WriteStringValue("activity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("endDate", m.GetEndDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("timeZoneUsed", m.GetTimeZoneUsed()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. The type of activity for which statistics are returned. The possible values are: call, chat, email, focus, and meeting. +func (m *ActivityStatistics) SetActivity(value *AnalyticsActivityType)() { + m.activity = value +} +// SetDuration sets the duration property value. Total hours spent on the activity. The value is represented in ISO 8601 format for durations. +func (m *ActivityStatistics) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetEndDate sets the endDate property value. Date when the activity ended, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-03' that follows the YYYY-MM-DD format. +func (m *ActivityStatistics) SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endDate = value +} +// SetStartDate sets the startDate property value. Date when the activity started, expressed in ISO 8601 format for calendar dates. For example, the property value could be '2019-07-04' that follows the YYYY-MM-DD format. +func (m *ActivityStatistics) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startDate = value +} +// SetTimeZoneUsed sets the timeZoneUsed property value. The time zone that the user sets in Microsoft Outlook is used for the computation. For example, the property value could be 'Pacific Standard Time.' +func (m *ActivityStatistics) SetTimeZoneUsed(value *string)() { + m.timeZoneUsed = value +} diff --git a/src/internal/connector/graph/betasdk/models/activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/activity_statistics_collection_response.go new file mode 100644 index 000000000..ef837a54b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityStatisticsCollectionResponse +type ActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ActivityStatisticsable +} +// NewActivityStatisticsCollectionResponse instantiates a new ActivityStatisticsCollectionResponse and sets the default values. +func NewActivityStatisticsCollectionResponse()(*ActivityStatisticsCollectionResponse) { + m := &ActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(ActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ActivityStatisticsCollectionResponse) GetValue()([]ActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *ActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ActivityStatisticsCollectionResponse) SetValue(value []ActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/activity_statistics_collection_responseable.go new file mode 100644 index 000000000..ab26e2faf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityStatisticsCollectionResponseable +type ActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ActivityStatisticsable) + SetValue(value []ActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/activity_statisticsable.go new file mode 100644 index 000000000..7bf110592 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_statisticsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivityStatisticsable +type ActivityStatisticsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*AnalyticsActivityType) + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTimeZoneUsed()(*string) + SetActivity(value *AnalyticsActivityType)() + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTimeZoneUsed(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/activity_type.go b/src/internal/connector/graph/betasdk/models/activity_type.go new file mode 100644 index 000000000..acb3c9496 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/activity_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ActivityType int + +const ( + SIGNIN_ACTIVITYTYPE ActivityType = iota + USER_ACTIVITYTYPE + UNKNOWNFUTUREVALUE_ACTIVITYTYPE + SERVICEPRINCIPAL_ACTIVITYTYPE +) + +func (i ActivityType) String() string { + return []string{"signin", "user", "unknownFutureValue", "servicePrincipal"}[i] +} +func ParseActivityType(v string) (interface{}, error) { + result := SIGNIN_ACTIVITYTYPE + switch v { + case "signin": + result = SIGNIN_ACTIVITYTYPE + case "user": + result = USER_ACTIVITYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACTIVITYTYPE + case "servicePrincipal": + result = SERVICEPRINCIPAL_ACTIVITYTYPE + default: + return 0, errors.New("Unknown ActivityType value: " + v) + } + return &result, nil +} +func SerializeActivityType(values []ActivityType) []string { + 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/add_content_footer_action.go b/src/internal/connector/graph/betasdk/models/add_content_footer_action.go new file mode 100644 index 000000000..4928179a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_content_footer_action.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentFooterAction +type AddContentFooterAction struct { + InformationProtectionAction + // The alignment property + alignment *ContentAlignment + // Color of the font to use for the footer. + fontColor *string + // Name of the font to use for the footer. + fontName *string + // Font size to use for the footer. + fontSize *int32 + // The margin of the header from the bottom of the document. + margin *int32 + // The contents of the footer itself. + text *string + // The name of the UI element where the footer should be placed. + uiElementName *string +} +// NewAddContentFooterAction instantiates a new AddContentFooterAction and sets the default values. +func NewAddContentFooterAction()(*AddContentFooterAction) { + m := &AddContentFooterAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.addContentFooterAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddContentFooterActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddContentFooterActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddContentFooterAction(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddContentFooterAction) GetAlignment()(*ContentAlignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddContentFooterAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*ContentAlignment)) + } + return nil + } + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the footer. +func (m *AddContentFooterAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the footer. +func (m *AddContentFooterAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the footer. +func (m *AddContentFooterAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetMargin gets the margin property value. The margin of the header from the bottom of the document. +func (m *AddContentFooterAction) GetMargin()(*int32) { + return m.margin +} +// GetText gets the text property value. The contents of the footer itself. +func (m *AddContentFooterAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the footer should be placed. +func (m *AddContentFooterAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddContentFooterAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddContentFooterAction) SetAlignment(value *ContentAlignment)() { + m.alignment = value +} +// SetFontColor sets the fontColor property value. Color of the font to use for the footer. +func (m *AddContentFooterAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the footer. +func (m *AddContentFooterAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the footer. +func (m *AddContentFooterAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetMargin sets the margin property value. The margin of the header from the bottom of the document. +func (m *AddContentFooterAction) SetMargin(value *int32)() { + m.margin = value +} +// SetText sets the text property value. The contents of the footer itself. +func (m *AddContentFooterAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the footer should be placed. +func (m *AddContentFooterAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_content_footer_actionable.go b/src/internal/connector/graph/betasdk/models/add_content_footer_actionable.go new file mode 100644 index 000000000..b8ad9a757 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_content_footer_actionable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentFooterActionable +type AddContentFooterActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*ContentAlignment) + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetMargin()(*int32) + GetText()(*string) + GetUiElementName()(*string) + SetAlignment(value *ContentAlignment)() + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetMargin(value *int32)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_content_header_action.go b/src/internal/connector/graph/betasdk/models/add_content_header_action.go new file mode 100644 index 000000000..1a141ec15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_content_header_action.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentHeaderAction +type AddContentHeaderAction struct { + InformationProtectionAction + // The alignment property + alignment *ContentAlignment + // Color of the font to use for the header. + fontColor *string + // Name of the font to use for the header. + fontName *string + // Font size to use for the header. + fontSize *int32 + // The margin of the header from the top of the document. + margin *int32 + // The contents of the header itself. + text *string + // The name of the UI element where the header should be placed. + uiElementName *string +} +// NewAddContentHeaderAction instantiates a new AddContentHeaderAction and sets the default values. +func NewAddContentHeaderAction()(*AddContentHeaderAction) { + m := &AddContentHeaderAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.addContentHeaderAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddContentHeaderActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddContentHeaderActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddContentHeaderAction(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddContentHeaderAction) GetAlignment()(*ContentAlignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddContentHeaderAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*ContentAlignment)) + } + return nil + } + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the header. +func (m *AddContentHeaderAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the header. +func (m *AddContentHeaderAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the header. +func (m *AddContentHeaderAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetMargin gets the margin property value. The margin of the header from the top of the document. +func (m *AddContentHeaderAction) GetMargin()(*int32) { + return m.margin +} +// GetText gets the text property value. The contents of the header itself. +func (m *AddContentHeaderAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the header should be placed. +func (m *AddContentHeaderAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddContentHeaderAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddContentHeaderAction) SetAlignment(value *ContentAlignment)() { + m.alignment = value +} +// SetFontColor sets the fontColor property value. Color of the font to use for the header. +func (m *AddContentHeaderAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the header. +func (m *AddContentHeaderAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the header. +func (m *AddContentHeaderAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetMargin sets the margin property value. The margin of the header from the top of the document. +func (m *AddContentHeaderAction) SetMargin(value *int32)() { + m.margin = value +} +// SetText sets the text property value. The contents of the header itself. +func (m *AddContentHeaderAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the header should be placed. +func (m *AddContentHeaderAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_content_header_actionable.go b/src/internal/connector/graph/betasdk/models/add_content_header_actionable.go new file mode 100644 index 000000000..99acf7d41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_content_header_actionable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentHeaderActionable +type AddContentHeaderActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*ContentAlignment) + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetMargin()(*int32) + GetText()(*string) + GetUiElementName()(*string) + SetAlignment(value *ContentAlignment)() + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetMargin(value *int32)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_footer.go b/src/internal/connector/graph/betasdk/models/add_footer.go new file mode 100644 index 000000000..0afd1cdb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_footer.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddFooter +type AddFooter struct { + MarkContent + // The alignment property + alignment *Alignment + // The margin property + margin *int32 +} +// NewAddFooter instantiates a new AddFooter and sets the default values. +func NewAddFooter()(*AddFooter) { + m := &AddFooter{ + MarkContent: *NewMarkContent(), + } + odataTypeValue := "#microsoft.graph.addFooter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddFooterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddFooterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddFooter(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddFooter) GetAlignment()(*Alignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddFooter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MarkContent.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*Alignment)) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + return res +} +// GetMargin gets the margin property value. The margin property +func (m *AddFooter) GetMargin()(*int32) { + return m.margin +} +// Serialize serializes information the current object +func (m *AddFooter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MarkContent.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddFooter) SetAlignment(value *Alignment)() { + m.alignment = value +} +// SetMargin sets the margin property value. The margin property +func (m *AddFooter) SetMargin(value *int32)() { + m.margin = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_footerable.go b/src/internal/connector/graph/betasdk/models/add_footerable.go new file mode 100644 index 000000000..42feca952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_footerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddFooterable +type AddFooterable interface { + MarkContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*Alignment) + GetMargin()(*int32) + SetAlignment(value *Alignment)() + SetMargin(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_header.go b/src/internal/connector/graph/betasdk/models/add_header.go new file mode 100644 index 000000000..4c10d2fb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_header.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddHeader +type AddHeader struct { + MarkContent + // The alignment property + alignment *Alignment + // The margin property + margin *int32 +} +// NewAddHeader instantiates a new AddHeader and sets the default values. +func NewAddHeader()(*AddHeader) { + m := &AddHeader{ + MarkContent: *NewMarkContent(), + } + odataTypeValue := "#microsoft.graph.addHeader"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddHeaderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddHeaderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddHeader(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddHeader) GetAlignment()(*Alignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddHeader) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MarkContent.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*Alignment)) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + return res +} +// GetMargin gets the margin property value. The margin property +func (m *AddHeader) GetMargin()(*int32) { + return m.margin +} +// Serialize serializes information the current object +func (m *AddHeader) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MarkContent.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddHeader) SetAlignment(value *Alignment)() { + m.alignment = value +} +// SetMargin sets the margin property value. The margin property +func (m *AddHeader) SetMargin(value *int32)() { + m.margin = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_headerable.go b/src/internal/connector/graph/betasdk/models/add_headerable.go new file mode 100644 index 000000000..6da7c7853 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_headerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddHeaderable +type AddHeaderable interface { + MarkContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*Alignment) + GetMargin()(*int32) + SetAlignment(value *Alignment)() + SetMargin(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_in.go b/src/internal/connector/graph/betasdk/models/add_in.go new file mode 100644 index 000000000..18fbf72ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_in.go @@ -0,0 +1,158 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddIn +type AddIn 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 id property + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // The properties property + properties []KeyValueable + // The type property + type_escaped *string +} +// NewAddIn instantiates a new addIn and sets the default values. +func NewAddIn()(*AddIn) { + m := &AddIn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAddInFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddInFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddIn(), 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 *AddIn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddIn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetProperties(res) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *AddIn) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AddIn) GetOdataType()(*string) { + return m.odataType +} +// GetProperties gets the properties property value. The properties property +func (m *AddIn) GetProperties()([]KeyValueable) { + return m.properties +} +// GetType gets the type property value. The type property +func (m *AddIn) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AddIn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *AddIn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *AddIn) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AddIn) SetOdataType(value *string)() { + m.odataType = value +} +// SetProperties sets the properties property value. The properties property +func (m *AddIn) SetProperties(value []KeyValueable)() { + m.properties = value +} +// SetType sets the type property value. The type property +func (m *AddIn) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_in_collection_response.go b/src/internal/connector/graph/betasdk/models/add_in_collection_response.go new file mode 100644 index 000000000..6de9f65e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_in_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddInCollectionResponse +type AddInCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AddInable +} +// NewAddInCollectionResponse instantiates a new AddInCollectionResponse and sets the default values. +func NewAddInCollectionResponse()(*AddInCollectionResponse) { + m := &AddInCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAddInCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddInCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddInCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddInCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAddInFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AddInable, len(val)) + for i, v := range val { + res[i] = v.(AddInable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AddInCollectionResponse) GetValue()([]AddInable) { + return m.value +} +// Serialize serializes information the current object +func (m *AddInCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AddInCollectionResponse) SetValue(value []AddInable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_in_collection_responseable.go b/src/internal/connector/graph/betasdk/models/add_in_collection_responseable.go new file mode 100644 index 000000000..d2246cbe6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_in_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddInCollectionResponseable +type AddInCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AddInable) + SetValue(value []AddInable)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_inable.go b/src/internal/connector/graph/betasdk/models/add_inable.go new file mode 100644 index 000000000..e12e436f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_inable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddInable +type AddInable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetProperties()([]KeyValueable) + GetType()(*string) + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetProperties(value []KeyValueable)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation.go b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation.go new file mode 100644 index 000000000..583bcfe8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddLargeGalleryViewOperation +type AddLargeGalleryViewOperation struct { + CommsOperation +} +// NewAddLargeGalleryViewOperation instantiates a new AddLargeGalleryViewOperation and sets the default values. +func NewAddLargeGalleryViewOperation()(*AddLargeGalleryViewOperation) { + m := &AddLargeGalleryViewOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateAddLargeGalleryViewOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddLargeGalleryViewOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddLargeGalleryViewOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddLargeGalleryViewOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AddLargeGalleryViewOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_response.go new file mode 100644 index 000000000..6bc357b21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddLargeGalleryViewOperationCollectionResponse +type AddLargeGalleryViewOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AddLargeGalleryViewOperationable +} +// NewAddLargeGalleryViewOperationCollectionResponse instantiates a new AddLargeGalleryViewOperationCollectionResponse and sets the default values. +func NewAddLargeGalleryViewOperationCollectionResponse()(*AddLargeGalleryViewOperationCollectionResponse) { + m := &AddLargeGalleryViewOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAddLargeGalleryViewOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddLargeGalleryViewOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddLargeGalleryViewOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddLargeGalleryViewOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAddLargeGalleryViewOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AddLargeGalleryViewOperationable, len(val)) + for i, v := range val { + res[i] = v.(AddLargeGalleryViewOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AddLargeGalleryViewOperationCollectionResponse) GetValue()([]AddLargeGalleryViewOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AddLargeGalleryViewOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AddLargeGalleryViewOperationCollectionResponse) SetValue(value []AddLargeGalleryViewOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_responseable.go new file mode 100644 index 000000000..990e2a0f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddLargeGalleryViewOperationCollectionResponseable +type AddLargeGalleryViewOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AddLargeGalleryViewOperationable) + SetValue(value []AddLargeGalleryViewOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operationable.go b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operationable.go new file mode 100644 index 000000000..0e2f876f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_large_gallery_view_operationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddLargeGalleryViewOperationable +type AddLargeGalleryViewOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/add_watermark.go b/src/internal/connector/graph/betasdk/models/add_watermark.go new file mode 100644 index 000000000..9c23b9210 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_watermark.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermark +type AddWatermark struct { + MarkContent + // The orientation property + orientation *PageOrientation +} +// NewAddWatermark instantiates a new AddWatermark and sets the default values. +func NewAddWatermark()(*AddWatermark) { + m := &AddWatermark{ + MarkContent: *NewMarkContent(), + } + odataTypeValue := "#microsoft.graph.addWatermark"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddWatermarkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddWatermarkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddWatermark(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddWatermark) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MarkContent.GetFieldDeserializers() + res["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePageOrientation) + if err != nil { + return err + } + if val != nil { + m.SetOrientation(val.(*PageOrientation)) + } + return nil + } + return res +} +// GetOrientation gets the orientation property value. The orientation property +func (m *AddWatermark) GetOrientation()(*PageOrientation) { + return m.orientation +} +// Serialize serializes information the current object +func (m *AddWatermark) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MarkContent.Serialize(writer) + if err != nil { + return err + } + if m.GetOrientation() != nil { + cast := (*m.GetOrientation()).String() + err = writer.WriteStringValue("orientation", &cast) + if err != nil { + return err + } + } + return nil +} +// SetOrientation sets the orientation property value. The orientation property +func (m *AddWatermark) SetOrientation(value *PageOrientation)() { + m.orientation = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_watermark_action.go b/src/internal/connector/graph/betasdk/models/add_watermark_action.go new file mode 100644 index 000000000..84b96f4ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_watermark_action.go @@ -0,0 +1,193 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermarkAction +type AddWatermarkAction struct { + InformationProtectionAction + // Color of the font to use for the watermark. + fontColor *string + // Name of the font to use for the watermark. + fontName *string + // Font size to use for the watermark. + fontSize *int32 + // The layout property + layout *WatermarkLayout + // The contents of the watermark itself. + text *string + // The name of the UI element where the watermark should be placed. + uiElementName *string +} +// NewAddWatermarkAction instantiates a new AddWatermarkAction and sets the default values. +func NewAddWatermarkAction()(*AddWatermarkAction) { + m := &AddWatermarkAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.addWatermarkAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddWatermarkActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddWatermarkActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddWatermarkAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddWatermarkAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["layout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWatermarkLayout) + if err != nil { + return err + } + if val != nil { + m.SetLayout(val.(*WatermarkLayout)) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the watermark. +func (m *AddWatermarkAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the watermark. +func (m *AddWatermarkAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the watermark. +func (m *AddWatermarkAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetLayout gets the layout property value. The layout property +func (m *AddWatermarkAction) GetLayout()(*WatermarkLayout) { + return m.layout +} +// GetText gets the text property value. The contents of the watermark itself. +func (m *AddWatermarkAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the watermark should be placed. +func (m *AddWatermarkAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddWatermarkAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + if m.GetLayout() != nil { + cast := (*m.GetLayout()).String() + err = writer.WriteStringValue("layout", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetFontColor sets the fontColor property value. Color of the font to use for the watermark. +func (m *AddWatermarkAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the watermark. +func (m *AddWatermarkAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the watermark. +func (m *AddWatermarkAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetLayout sets the layout property value. The layout property +func (m *AddWatermarkAction) SetLayout(value *WatermarkLayout)() { + m.layout = value +} +// SetText sets the text property value. The contents of the watermark itself. +func (m *AddWatermarkAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the watermark should be placed. +func (m *AddWatermarkAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/add_watermark_actionable.go b/src/internal/connector/graph/betasdk/models/add_watermark_actionable.go new file mode 100644 index 000000000..95e402f90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_watermark_actionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermarkActionable +type AddWatermarkActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetLayout()(*WatermarkLayout) + GetText()(*string) + GetUiElementName()(*string) + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetLayout(value *WatermarkLayout)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/add_watermarkable.go b/src/internal/connector/graph/betasdk/models/add_watermarkable.go new file mode 100644 index 000000000..9fb588c34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/add_watermarkable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermarkable +type AddWatermarkable interface { + MarkContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrientation()(*PageOrientation) + SetOrientation(value *PageOrientation)() +} diff --git a/src/internal/connector/graph/betasdk/models/address_book_account_target_content.go b/src/internal/connector/graph/betasdk/models/address_book_account_target_content.go new file mode 100644 index 000000000..842c80564 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/address_book_account_target_content.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddressBookAccountTargetContent +type AddressBookAccountTargetContent struct { + AccountTargetContent + // List of user emails targeted for an attack simulation training campaign. + accountTargetEmails []string +} +// NewAddressBookAccountTargetContent instantiates a new AddressBookAccountTargetContent and sets the default values. +func NewAddressBookAccountTargetContent()(*AddressBookAccountTargetContent) { + m := &AddressBookAccountTargetContent{ + AccountTargetContent: *NewAccountTargetContent(), + } + odataTypeValue := "#microsoft.graph.addressBookAccountTargetContent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddressBookAccountTargetContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddressBookAccountTargetContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddressBookAccountTargetContent(), nil +} +// GetAccountTargetEmails gets the accountTargetEmails property value. List of user emails targeted for an attack simulation training campaign. +func (m *AddressBookAccountTargetContent) GetAccountTargetEmails()([]string) { + return m.accountTargetEmails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddressBookAccountTargetContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccountTargetContent.GetFieldDeserializers() + res["accountTargetEmails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAccountTargetEmails(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AddressBookAccountTargetContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccountTargetContent.Serialize(writer) + if err != nil { + return err + } + if m.GetAccountTargetEmails() != nil { + err = writer.WriteCollectionOfStringValues("accountTargetEmails", m.GetAccountTargetEmails()) + if err != nil { + return err + } + } + return nil +} +// SetAccountTargetEmails sets the accountTargetEmails property value. List of user emails targeted for an attack simulation training campaign. +func (m *AddressBookAccountTargetContent) SetAccountTargetEmails(value []string)() { + m.accountTargetEmails = value +} diff --git a/src/internal/connector/graph/betasdk/models/address_book_account_target_contentable.go b/src/internal/connector/graph/betasdk/models/address_book_account_target_contentable.go new file mode 100644 index 000000000..502098110 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/address_book_account_target_contentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddressBookAccountTargetContentable +type AddressBookAccountTargetContentable interface { + AccountTargetContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountTargetEmails()([]string) + SetAccountTargetEmails(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/admin_consent.go b/src/internal/connector/graph/betasdk/models/admin_consent.go new file mode 100644 index 000000000..e1e4855ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_consent.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminConsent admin consent information. +type AdminConsent 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 OdataType property + odataType *string + // Admin consent state. + shareAPNSData *AdminConsentState + // Admin consent state. + shareUserExperienceAnalyticsData *AdminConsentState +} +// NewAdminConsent instantiates a new adminConsent and sets the default values. +func NewAdminConsent()(*AdminConsent) { + m := &AdminConsent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAdminConsentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminConsentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminConsent(), 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 *AdminConsent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminConsent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["shareAPNSData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminConsentState) + if err != nil { + return err + } + if val != nil { + m.SetShareAPNSData(val.(*AdminConsentState)) + } + return nil + } + res["shareUserExperienceAnalyticsData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdminConsentState) + if err != nil { + return err + } + if val != nil { + m.SetShareUserExperienceAnalyticsData(val.(*AdminConsentState)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AdminConsent) GetOdataType()(*string) { + return m.odataType +} +// GetShareAPNSData gets the shareAPNSData property value. Admin consent state. +func (m *AdminConsent) GetShareAPNSData()(*AdminConsentState) { + return m.shareAPNSData +} +// GetShareUserExperienceAnalyticsData gets the shareUserExperienceAnalyticsData property value. Admin consent state. +func (m *AdminConsent) GetShareUserExperienceAnalyticsData()(*AdminConsentState) { + return m.shareUserExperienceAnalyticsData +} +// Serialize serializes information the current object +func (m *AdminConsent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetShareAPNSData() != nil { + cast := (*m.GetShareAPNSData()).String() + err := writer.WriteStringValue("shareAPNSData", &cast) + if err != nil { + return err + } + } + if m.GetShareUserExperienceAnalyticsData() != nil { + cast := (*m.GetShareUserExperienceAnalyticsData()).String() + err := writer.WriteStringValue("shareUserExperienceAnalyticsData", &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 *AdminConsent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AdminConsent) SetOdataType(value *string)() { + m.odataType = value +} +// SetShareAPNSData sets the shareAPNSData property value. Admin consent state. +func (m *AdminConsent) SetShareAPNSData(value *AdminConsentState)() { + m.shareAPNSData = value +} +// SetShareUserExperienceAnalyticsData sets the shareUserExperienceAnalyticsData property value. Admin consent state. +func (m *AdminConsent) SetShareUserExperienceAnalyticsData(value *AdminConsentState)() { + m.shareUserExperienceAnalyticsData = value +} diff --git a/src/internal/connector/graph/betasdk/models/admin_consent_request_policy.go b/src/internal/connector/graph/betasdk/models/admin_consent_request_policy.go new file mode 100644 index 000000000..645c378a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_consent_request_policy.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminConsentRequestPolicy +type AdminConsentRequestPolicy struct { + Entity + // Specifies whether the admin consent request feature is enabled or disabled. Required. + isEnabled *bool + // Specifies whether reviewers will receive notifications. Required. + notifyReviewers *bool + // Specifies whether reviewers will receive reminder emails. Required. + remindersEnabled *bool + // Specifies the duration the request is active before it automatically expires if no decision is applied. + requestDurationInDays *int32 + // Required. + reviewers []AccessReviewReviewerScopeable + // Specifies the version of this policy. When the policy is updated, this version is updated. Read-only. + version *int32 +} +// NewAdminConsentRequestPolicy instantiates a new AdminConsentRequestPolicy and sets the default values. +func NewAdminConsentRequestPolicy()(*AdminConsentRequestPolicy) { + m := &AdminConsentRequestPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAdminConsentRequestPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminConsentRequestPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminConsentRequestPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminConsentRequestPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["notifyReviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNotifyReviewers(val) + } + return nil + } + res["remindersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRemindersEnabled(val) + } + return nil + } + res["requestDurationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequestDurationInDays(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewReviewerScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewReviewerScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewReviewerScopeable) + } + m.SetReviewers(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Specifies whether the admin consent request feature is enabled or disabled. Required. +func (m *AdminConsentRequestPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetNotifyReviewers gets the notifyReviewers property value. Specifies whether reviewers will receive notifications. Required. +func (m *AdminConsentRequestPolicy) GetNotifyReviewers()(*bool) { + return m.notifyReviewers +} +// GetRemindersEnabled gets the remindersEnabled property value. Specifies whether reviewers will receive reminder emails. Required. +func (m *AdminConsentRequestPolicy) GetRemindersEnabled()(*bool) { + return m.remindersEnabled +} +// GetRequestDurationInDays gets the requestDurationInDays property value. Specifies the duration the request is active before it automatically expires if no decision is applied. +func (m *AdminConsentRequestPolicy) GetRequestDurationInDays()(*int32) { + return m.requestDurationInDays +} +// GetReviewers gets the reviewers property value. Required. +func (m *AdminConsentRequestPolicy) GetReviewers()([]AccessReviewReviewerScopeable) { + return m.reviewers +} +// GetVersion gets the version property value. Specifies the version of this policy. When the policy is updated, this version is updated. Read-only. +func (m *AdminConsentRequestPolicy) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *AdminConsentRequestPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("notifyReviewers", m.GetNotifyReviewers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("remindersEnabled", m.GetRemindersEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("requestDurationInDays", m.GetRequestDurationInDays()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetIsEnabled sets the isEnabled property value. Specifies whether the admin consent request feature is enabled or disabled. Required. +func (m *AdminConsentRequestPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetNotifyReviewers sets the notifyReviewers property value. Specifies whether reviewers will receive notifications. Required. +func (m *AdminConsentRequestPolicy) SetNotifyReviewers(value *bool)() { + m.notifyReviewers = value +} +// SetRemindersEnabled sets the remindersEnabled property value. Specifies whether reviewers will receive reminder emails. Required. +func (m *AdminConsentRequestPolicy) SetRemindersEnabled(value *bool)() { + m.remindersEnabled = value +} +// SetRequestDurationInDays sets the requestDurationInDays property value. Specifies the duration the request is active before it automatically expires if no decision is applied. +func (m *AdminConsentRequestPolicy) SetRequestDurationInDays(value *int32)() { + m.requestDurationInDays = value +} +// SetReviewers sets the reviewers property value. Required. +func (m *AdminConsentRequestPolicy) SetReviewers(value []AccessReviewReviewerScopeable)() { + m.reviewers = value +} +// SetVersion sets the version property value. Specifies the version of this policy. When the policy is updated, this version is updated. Read-only. +func (m *AdminConsentRequestPolicy) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/admin_consent_request_policyable.go b/src/internal/connector/graph/betasdk/models/admin_consent_request_policyable.go new file mode 100644 index 000000000..1c4555994 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_consent_request_policyable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminConsentRequestPolicyable +type AdminConsentRequestPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetNotifyReviewers()(*bool) + GetRemindersEnabled()(*bool) + GetRequestDurationInDays()(*int32) + GetReviewers()([]AccessReviewReviewerScopeable) + GetVersion()(*int32) + SetIsEnabled(value *bool)() + SetNotifyReviewers(value *bool)() + SetRemindersEnabled(value *bool)() + SetRequestDurationInDays(value *int32)() + SetReviewers(value []AccessReviewReviewerScopeable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/admin_consent_state.go b/src/internal/connector/graph/betasdk/models/admin_consent_state.go new file mode 100644 index 000000000..93fd421d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_consent_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AdminConsentState int + +const ( + // Admin did not configure the item + NOTCONFIGURED_ADMINCONSENTSTATE AdminConsentState = iota + // Admin granted item + GRANTED_ADMINCONSENTSTATE + // Admin deos not grant item + NOTGRANTED_ADMINCONSENTSTATE +) + +func (i AdminConsentState) String() string { + return []string{"notConfigured", "granted", "notGranted"}[i] +} +func ParseAdminConsentState(v string) (interface{}, error) { + result := NOTCONFIGURED_ADMINCONSENTSTATE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ADMINCONSENTSTATE + case "granted": + result = GRANTED_ADMINCONSENTSTATE + case "notGranted": + result = NOTGRANTED_ADMINCONSENTSTATE + default: + return 0, errors.New("Unknown AdminConsentState value: " + v) + } + return &result, nil +} +func SerializeAdminConsentState(values []AdminConsentState) []string { + 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/admin_consentable.go b/src/internal/connector/graph/betasdk/models/admin_consentable.go new file mode 100644 index 000000000..5c896fe6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_consentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminConsentable +type AdminConsentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetShareAPNSData()(*AdminConsentState) + GetShareUserExperienceAnalyticsData()(*AdminConsentState) + SetOdataType(value *string)() + SetShareAPNSData(value *AdminConsentState)() + SetShareUserExperienceAnalyticsData(value *AdminConsentState)() +} diff --git a/src/internal/connector/graph/betasdk/models/admin_report_settings.go b/src/internal/connector/graph/betasdk/models/admin_report_settings.go new file mode 100644 index 000000000..60606e035 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_report_settings.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminReportSettings +type AdminReportSettings struct { + Entity + // If set to true, all reports will conceal user information such as usernames, groups, and sites. If false, all reports will show identifiable information. This property represents a setting in the Microsoft 365 admin center. Required. + displayConcealedNames *bool +} +// NewAdminReportSettings instantiates a new AdminReportSettings and sets the default values. +func NewAdminReportSettings()(*AdminReportSettings) { + m := &AdminReportSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateAdminReportSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdminReportSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdminReportSettings(), nil +} +// GetDisplayConcealedNames gets the displayConcealedNames property value. If set to true, all reports will conceal user information such as usernames, groups, and sites. If false, all reports will show identifiable information. This property represents a setting in the Microsoft 365 admin center. Required. +func (m *AdminReportSettings) GetDisplayConcealedNames()(*bool) { + return m.displayConcealedNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdminReportSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayConcealedNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayConcealedNames(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AdminReportSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("displayConcealedNames", m.GetDisplayConcealedNames()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayConcealedNames sets the displayConcealedNames property value. If set to true, all reports will conceal user information such as usernames, groups, and sites. If false, all reports will show identifiable information. This property represents a setting in the Microsoft 365 admin center. Required. +func (m *AdminReportSettings) SetDisplayConcealedNames(value *bool)() { + m.displayConcealedNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/admin_report_settingsable.go b/src/internal/connector/graph/betasdk/models/admin_report_settingsable.go new file mode 100644 index 000000000..5b6a08a80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/admin_report_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdminReportSettingsable +type AdminReportSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayConcealedNames()(*bool) + SetDisplayConcealedNames(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/administrative_unit.go b/src/internal/connector/graph/betasdk/models/administrative_unit.go new file mode 100644 index 000000000..ee3647dc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/administrative_unit.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdministrativeUnit +type AdministrativeUnit struct { + DirectoryObject + // An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. + description *string + // Display name for the administrative unit. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. + displayName *string + // The collection of open extensions defined for this administrative unit. Nullable. + extensions []Extensionable + // The isMemberManagementRestricted property + isMemberManagementRestricted *bool + // Users and groups that are members of this administrative unit. Supports $expand. + members []DirectoryObjectable + // Scoped-role members of this administrative unit. + scopedRoleMembers []ScopedRoleMembershipable + // Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership or Public. If not set, the default behavior is Public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. + visibility *string +} +// NewAdministrativeUnit instantiates a new AdministrativeUnit and sets the default values. +func NewAdministrativeUnit()(*AdministrativeUnit) { + m := &AdministrativeUnit{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.administrativeUnit"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAdministrativeUnitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdministrativeUnitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdministrativeUnit(), nil +} +// GetDescription gets the description property value. An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. +func (m *AdministrativeUnit) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the administrative unit. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *AdministrativeUnit) GetDisplayName()(*string) { + return m.displayName +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for this administrative unit. Nullable. +func (m *AdministrativeUnit) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdministrativeUnit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["isMemberManagementRestricted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMemberManagementRestricted(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMembers(res) + } + return nil + } + res["scopedRoleMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScopedRoleMembershipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScopedRoleMembershipable, len(val)) + for i, v := range val { + res[i] = v.(ScopedRoleMembershipable) + } + m.SetScopedRoleMembers(res) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + return res +} +// GetIsMemberManagementRestricted gets the isMemberManagementRestricted property value. The isMemberManagementRestricted property +func (m *AdministrativeUnit) GetIsMemberManagementRestricted()(*bool) { + return m.isMemberManagementRestricted +} +// GetMembers gets the members property value. Users and groups that are members of this administrative unit. Supports $expand. +func (m *AdministrativeUnit) GetMembers()([]DirectoryObjectable) { + return m.members +} +// GetScopedRoleMembers gets the scopedRoleMembers property value. Scoped-role members of this administrative unit. +func (m *AdministrativeUnit) GetScopedRoleMembers()([]ScopedRoleMembershipable) { + return m.scopedRoleMembers +} +// GetVisibility gets the visibility property value. Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership or Public. If not set, the default behavior is Public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. +func (m *AdministrativeUnit) GetVisibility()(*string) { + return m.visibility +} +// Serialize serializes information the current object +func (m *AdministrativeUnit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMemberManagementRestricted", m.GetIsMemberManagementRestricted()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetScopedRoleMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScopedRoleMembers())) + for i, v := range m.GetScopedRoleMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scopedRoleMembers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. An optional description for the administrative unit. Supports $filter (eq, ne, in, startsWith), $search. +func (m *AdministrativeUnit) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the administrative unit. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *AdministrativeUnit) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for this administrative unit. Nullable. +func (m *AdministrativeUnit) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetIsMemberManagementRestricted sets the isMemberManagementRestricted property value. The isMemberManagementRestricted property +func (m *AdministrativeUnit) SetIsMemberManagementRestricted(value *bool)() { + m.isMemberManagementRestricted = value +} +// SetMembers sets the members property value. Users and groups that are members of this administrative unit. Supports $expand. +func (m *AdministrativeUnit) SetMembers(value []DirectoryObjectable)() { + m.members = value +} +// SetScopedRoleMembers sets the scopedRoleMembers property value. Scoped-role members of this administrative unit. +func (m *AdministrativeUnit) SetScopedRoleMembers(value []ScopedRoleMembershipable)() { + m.scopedRoleMembers = value +} +// SetVisibility sets the visibility property value. Controls whether the administrative unit and its members are hidden or public. Can be set to HiddenMembership or Public. If not set, the default behavior is Public. When set to HiddenMembership, only members of the administrative unit can list other members of the administrative unit. +func (m *AdministrativeUnit) SetVisibility(value *string)() { + m.visibility = value +} diff --git a/src/internal/connector/graph/betasdk/models/administrative_unit_collection_response.go b/src/internal/connector/graph/betasdk/models/administrative_unit_collection_response.go new file mode 100644 index 000000000..b7d49c5f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/administrative_unit_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdministrativeUnitCollectionResponse +type AdministrativeUnitCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AdministrativeUnitable +} +// NewAdministrativeUnitCollectionResponse instantiates a new AdministrativeUnitCollectionResponse and sets the default values. +func NewAdministrativeUnitCollectionResponse()(*AdministrativeUnitCollectionResponse) { + m := &AdministrativeUnitCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAdministrativeUnitCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdministrativeUnitCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdministrativeUnitCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdministrativeUnitCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdministrativeUnitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdministrativeUnitable, len(val)) + for i, v := range val { + res[i] = v.(AdministrativeUnitable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AdministrativeUnitCollectionResponse) GetValue()([]AdministrativeUnitable) { + return m.value +} +// Serialize serializes information the current object +func (m *AdministrativeUnitCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AdministrativeUnitCollectionResponse) SetValue(value []AdministrativeUnitable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/administrative_unit_collection_responseable.go b/src/internal/connector/graph/betasdk/models/administrative_unit_collection_responseable.go new file mode 100644 index 000000000..f3078d860 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/administrative_unit_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdministrativeUnitCollectionResponseable +type AdministrativeUnitCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AdministrativeUnitable) + SetValue(value []AdministrativeUnitable)() +} diff --git a/src/internal/connector/graph/betasdk/models/administrative_unitable.go b/src/internal/connector/graph/betasdk/models/administrative_unitable.go new file mode 100644 index 000000000..dc61a3720 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/administrative_unitable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdministrativeUnitable +type AdministrativeUnitable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetExtensions()([]Extensionable) + GetIsMemberManagementRestricted()(*bool) + GetMembers()([]DirectoryObjectable) + GetScopedRoleMembers()([]ScopedRoleMembershipable) + GetVisibility()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExtensions(value []Extensionable)() + SetIsMemberManagementRestricted(value *bool)() + SetMembers(value []DirectoryObjectable)() + SetScopedRoleMembers(value []ScopedRoleMembershipable)() + SetVisibility(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_bit_locker_state.go b/src/internal/connector/graph/betasdk/models/advanced_bit_locker_state.go new file mode 100644 index 000000000..ec28e6f30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_bit_locker_state.go @@ -0,0 +1,96 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AdvancedBitLockerState int + +const ( + // Advanced BitLocker State Success + SUCCESS_ADVANCEDBITLOCKERSTATE AdvancedBitLockerState = iota + // User never gave consent for Encryption + NOUSERCONSENT_ADVANCEDBITLOCKERSTATE + // Un-protected OS Volume was detected + OSVOLUMEUNPROTECTED_ADVANCEDBITLOCKERSTATE + // TPM not used for protection of OS volume, but is required by policy + OSVOLUMETPMREQUIRED_ADVANCEDBITLOCKERSTATE + // TPM only protection not used for OS volume, but is required by policy + OSVOLUMETPMONLYREQUIRED_ADVANCEDBITLOCKERSTATE + // TPM+PIN protection not used for OS volume, but is required by policy + OSVOLUMETPMPINREQUIRED_ADVANCEDBITLOCKERSTATE + // TPM+Startup Key protection not used for OS volume, but is required by policy + OSVOLUMETPMSTARTUPKEYREQUIRED_ADVANCEDBITLOCKERSTATE + // TPM+PIN+Startup Key not used for OS volume, but is required by policy + OSVOLUMETPMPINSTARTUPKEYREQUIRED_ADVANCEDBITLOCKERSTATE + // Encryption method of OS Volume is different than that set by policy + OSVOLUMEENCRYPTIONMETHODMISMATCH_ADVANCEDBITLOCKERSTATE + // Recovery key backup failed + RECOVERYKEYBACKUPFAILED_ADVANCEDBITLOCKERSTATE + // Fixed Drive not encrypted + FIXEDDRIVENOTENCRYPTED_ADVANCEDBITLOCKERSTATE + // Encryption method of Fixed Drive is different than that set by policy + FIXEDDRIVEENCRYPTIONMETHODMISMATCH_ADVANCEDBITLOCKERSTATE + // Logged on user is non-admin. This requires “AllowStandardUserEncryption” policy set to 1 + LOGGEDONUSERNONADMIN_ADVANCEDBITLOCKERSTATE + // WinRE is not configured + WINDOWSRECOVERYENVIRONMENTNOTCONFIGURED_ADVANCEDBITLOCKERSTATE + // TPM is not available for BitLocker. This means TPM is not present, or TPM unavailable registry override is set or host OS is on portable/rome-able drive + TPMNOTAVAILABLE_ADVANCEDBITLOCKERSTATE + // TPM is not ready for BitLocker + TPMNOTREADY_ADVANCEDBITLOCKERSTATE + // Network not available. This is required for recovery key backup. This is reported for Drive Encryption capable devices + NETWORKERROR_ADVANCEDBITLOCKERSTATE +) + +func (i AdvancedBitLockerState) String() string { + return []string{"success", "noUserConsent", "osVolumeUnprotected", "osVolumeTpmRequired", "osVolumeTpmOnlyRequired", "osVolumeTpmPinRequired", "osVolumeTpmStartupKeyRequired", "osVolumeTpmPinStartupKeyRequired", "osVolumeEncryptionMethodMismatch", "recoveryKeyBackupFailed", "fixedDriveNotEncrypted", "fixedDriveEncryptionMethodMismatch", "loggedOnUserNonAdmin", "windowsRecoveryEnvironmentNotConfigured", "tpmNotAvailable", "tpmNotReady", "networkError"}[i] +} +func ParseAdvancedBitLockerState(v string) (interface{}, error) { + result := SUCCESS_ADVANCEDBITLOCKERSTATE + switch v { + case "success": + result = SUCCESS_ADVANCEDBITLOCKERSTATE + case "noUserConsent": + result = NOUSERCONSENT_ADVANCEDBITLOCKERSTATE + case "osVolumeUnprotected": + result = OSVOLUMEUNPROTECTED_ADVANCEDBITLOCKERSTATE + case "osVolumeTpmRequired": + result = OSVOLUMETPMREQUIRED_ADVANCEDBITLOCKERSTATE + case "osVolumeTpmOnlyRequired": + result = OSVOLUMETPMONLYREQUIRED_ADVANCEDBITLOCKERSTATE + case "osVolumeTpmPinRequired": + result = OSVOLUMETPMPINREQUIRED_ADVANCEDBITLOCKERSTATE + case "osVolumeTpmStartupKeyRequired": + result = OSVOLUMETPMSTARTUPKEYREQUIRED_ADVANCEDBITLOCKERSTATE + case "osVolumeTpmPinStartupKeyRequired": + result = OSVOLUMETPMPINSTARTUPKEYREQUIRED_ADVANCEDBITLOCKERSTATE + case "osVolumeEncryptionMethodMismatch": + result = OSVOLUMEENCRYPTIONMETHODMISMATCH_ADVANCEDBITLOCKERSTATE + case "recoveryKeyBackupFailed": + result = RECOVERYKEYBACKUPFAILED_ADVANCEDBITLOCKERSTATE + case "fixedDriveNotEncrypted": + result = FIXEDDRIVENOTENCRYPTED_ADVANCEDBITLOCKERSTATE + case "fixedDriveEncryptionMethodMismatch": + result = FIXEDDRIVEENCRYPTIONMETHODMISMATCH_ADVANCEDBITLOCKERSTATE + case "loggedOnUserNonAdmin": + result = LOGGEDONUSERNONADMIN_ADVANCEDBITLOCKERSTATE + case "windowsRecoveryEnvironmentNotConfigured": + result = WINDOWSRECOVERYENVIRONMENTNOTCONFIGURED_ADVANCEDBITLOCKERSTATE + case "tpmNotAvailable": + result = TPMNOTAVAILABLE_ADVANCEDBITLOCKERSTATE + case "tpmNotReady": + result = TPMNOTREADY_ADVANCEDBITLOCKERSTATE + case "networkError": + result = NETWORKERROR_ADVANCEDBITLOCKERSTATE + default: + return 0, errors.New("Unknown AdvancedBitLockerState value: " + v) + } + return &result, nil +} +func SerializeAdvancedBitLockerState(values []AdvancedBitLockerState) []string { + 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/advanced_config_state.go b/src/internal/connector/graph/betasdk/models/advanced_config_state.go new file mode 100644 index 000000000..682269751 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_config_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AdvancedConfigState int + +const ( + DEFAULT_ESCAPED_ADVANCEDCONFIGSTATE AdvancedConfigState = iota + ENABLED_ADVANCEDCONFIGSTATE + DISABLED_ADVANCEDCONFIGSTATE + UNKNOWNFUTUREVALUE_ADVANCEDCONFIGSTATE +) + +func (i AdvancedConfigState) String() string { + return []string{"default", "enabled", "disabled", "unknownFutureValue"}[i] +} +func ParseAdvancedConfigState(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_ADVANCEDCONFIGSTATE + switch v { + case "default": + result = DEFAULT_ESCAPED_ADVANCEDCONFIGSTATE + case "enabled": + result = ENABLED_ADVANCEDCONFIGSTATE + case "disabled": + result = DISABLED_ADVANCEDCONFIGSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ADVANCEDCONFIGSTATE + default: + return 0, errors.New("Unknown AdvancedConfigState value: " + v) + } + return &result, nil +} +func SerializeAdvancedConfigState(values []AdvancedConfigState) []string { + 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/advanced_threat_protection_onboarding_device_setting_state.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state.go new file mode 100644 index 000000000..c8c178cd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state.go @@ -0,0 +1,349 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingDeviceSettingState aTP onboarding State for a given device. +type AdvancedThreatProtectionOnboardingDeviceSettingState struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Device Id that is being reported + deviceId *string + // The device model that is being reported + deviceModel *string + // The Device Name that is being reported + deviceName *string + // Device type. + platformType *DeviceType + // The setting class name and property name. + setting *string + // The Setting Name that is being reported + settingName *string + // The state property + state *ComplianceStatus + // The User email address that is being reported + userEmail *string + // The user Id that is being reported + userId *string + // The User Name that is being reported + userName *string + // The User PrincipalName that is being reported + userPrincipalName *string +} +// NewAdvancedThreatProtectionOnboardingDeviceSettingState instantiates a new advancedThreatProtectionOnboardingDeviceSettingState and sets the default values. +func NewAdvancedThreatProtectionOnboardingDeviceSettingState()(*AdvancedThreatProtectionOnboardingDeviceSettingState) { + m := &AdvancedThreatProtectionOnboardingDeviceSettingState{ + Entity: *NewEntity(), + } + return m +} +// CreateAdvancedThreatProtectionOnboardingDeviceSettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdvancedThreatProtectionOnboardingDeviceSettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedThreatProtectionOnboardingDeviceSettingState(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceId gets the deviceId property value. The Device Id that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetDeviceName gets the deviceName property value. The Device Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetDeviceName()(*string) { + return m.deviceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*DeviceType)) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetPlatformType gets the platformType property value. Device type. +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetPlatformType()(*DeviceType) { + return m.platformType +} +// GetSetting gets the setting property value. The setting class name and property name. +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetSetting()(*string) { + return m.setting +} +// GetSettingName gets the settingName property value. The Setting Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetSettingName()(*string) { + return m.settingName +} +// GetState gets the state property value. The state property +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserEmail gets the userEmail property value. The User email address that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. The user Id that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The User PrincipalName that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceId sets the deviceId property value. The Device Id that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetDeviceName sets the deviceName property value. The Device Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetPlatformType sets the platformType property value. Device type. +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetPlatformType(value *DeviceType)() { + m.platformType = value +} +// SetSetting sets the setting property value. The setting class name and property name. +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetSetting(value *string)() { + m.setting = value +} +// SetSettingName sets the settingName property value. The Setting Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetState sets the state property value. The state property +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserEmail sets the userEmail property value. The User email address that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. The user Id that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The User PrincipalName that is being reported +func (m *AdvancedThreatProtectionOnboardingDeviceSettingState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_response.go new file mode 100644 index 000000000..ddbc8594e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse +type AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AdvancedThreatProtectionOnboardingDeviceSettingStateable +} +// NewAdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse instantiates a new AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse and sets the default values. +func NewAdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse()(*AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse) { + m := &AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdvancedThreatProtectionOnboardingDeviceSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdvancedThreatProtectionOnboardingDeviceSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(AdvancedThreatProtectionOnboardingDeviceSettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse) GetValue()([]AdvancedThreatProtectionOnboardingDeviceSettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponse) SetValue(value []AdvancedThreatProtectionOnboardingDeviceSettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_responseable.go new file mode 100644 index 000000000..8e9dfb11b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponseable +type AdvancedThreatProtectionOnboardingDeviceSettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AdvancedThreatProtectionOnboardingDeviceSettingStateable) + SetValue(value []AdvancedThreatProtectionOnboardingDeviceSettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_stateable.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_stateable.go new file mode 100644 index 000000000..0c4493bec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_device_setting_stateable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingDeviceSettingStateable +type AdvancedThreatProtectionOnboardingDeviceSettingStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceId()(*string) + GetDeviceModel()(*string) + GetDeviceName()(*string) + GetPlatformType()(*DeviceType) + GetSetting()(*string) + GetSettingName()(*string) + GetState()(*ComplianceStatus) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceId(value *string)() + SetDeviceModel(value *string)() + SetDeviceName(value *string)() + SetPlatformType(value *DeviceType)() + SetSetting(value *string)() + SetSettingName(value *string)() + SetState(value *ComplianceStatus)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summary.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summary.go new file mode 100644 index 000000000..aa0aed5f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summary.go @@ -0,0 +1,276 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingStateSummary +type AdvancedThreatProtectionOnboardingStateSummary struct { + Entity + // Not yet documented + advancedThreatProtectionOnboardingDeviceSettingStates []AdvancedThreatProtectionOnboardingDeviceSettingStateable + // Number of compliant devices + compliantDeviceCount *int32 + // Number of conflict devices + conflictDeviceCount *int32 + // Number of error devices + errorDeviceCount *int32 + // Number of NonCompliant devices + nonCompliantDeviceCount *int32 + // Number of not applicable devices + notApplicableDeviceCount *int32 + // Number of not assigned devices + notAssignedDeviceCount *int32 + // Number of remediated devices + remediatedDeviceCount *int32 + // Number of unknown devices + unknownDeviceCount *int32 +} +// NewAdvancedThreatProtectionOnboardingStateSummary instantiates a new advancedThreatProtectionOnboardingStateSummary and sets the default values. +func NewAdvancedThreatProtectionOnboardingStateSummary()(*AdvancedThreatProtectionOnboardingStateSummary) { + m := &AdvancedThreatProtectionOnboardingStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateAdvancedThreatProtectionOnboardingStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAdvancedThreatProtectionOnboardingStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAdvancedThreatProtectionOnboardingStateSummary(), nil +} +// GetAdvancedThreatProtectionOnboardingDeviceSettingStates gets the advancedThreatProtectionOnboardingDeviceSettingStates property value. Not yet documented +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetAdvancedThreatProtectionOnboardingDeviceSettingStates()([]AdvancedThreatProtectionOnboardingDeviceSettingStateable) { + return m.advancedThreatProtectionOnboardingDeviceSettingStates +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. Number of compliant devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. Number of conflict devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Number of error devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["advancedThreatProtectionOnboardingDeviceSettingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdvancedThreatProtectionOnboardingDeviceSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdvancedThreatProtectionOnboardingDeviceSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(AdvancedThreatProtectionOnboardingDeviceSettingStateable) + } + m.SetAdvancedThreatProtectionOnboardingDeviceSettingStates(res) + } + return nil + } + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["nonCompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantDeviceCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["notAssignedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotAssignedDeviceCount(val) + } + return nil + } + res["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetNonCompliantDeviceCount gets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetNonCompliantDeviceCount()(*int32) { + return m.nonCompliantDeviceCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetNotAssignedDeviceCount gets the notAssignedDeviceCount property value. Number of not assigned devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetNotAssignedDeviceCount()(*int32) { + return m.notAssignedDeviceCount +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. Number of remediated devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Number of unknown devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *AdvancedThreatProtectionOnboardingStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionOnboardingDeviceSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdvancedThreatProtectionOnboardingDeviceSettingStates())) + for i, v := range m.GetAdvancedThreatProtectionOnboardingDeviceSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("advancedThreatProtectionOnboardingDeviceSettingStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantDeviceCount", m.GetNonCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notAssignedDeviceCount", m.GetNotAssignedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionOnboardingDeviceSettingStates sets the advancedThreatProtectionOnboardingDeviceSettingStates property value. Not yet documented +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetAdvancedThreatProtectionOnboardingDeviceSettingStates(value []AdvancedThreatProtectionOnboardingDeviceSettingStateable)() { + m.advancedThreatProtectionOnboardingDeviceSettingStates = value +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. Number of compliant devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. Number of conflict devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Number of error devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetNonCompliantDeviceCount sets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetNonCompliantDeviceCount(value *int32)() { + m.nonCompliantDeviceCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetNotAssignedDeviceCount sets the notAssignedDeviceCount property value. Number of not assigned devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetNotAssignedDeviceCount(value *int32)() { + m.notAssignedDeviceCount = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. Number of remediated devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Number of unknown devices +func (m *AdvancedThreatProtectionOnboardingStateSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summaryable.go b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summaryable.go new file mode 100644 index 000000000..9bd69383d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/advanced_threat_protection_onboarding_state_summaryable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AdvancedThreatProtectionOnboardingStateSummaryable +type AdvancedThreatProtectionOnboardingStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionOnboardingDeviceSettingStates()([]AdvancedThreatProtectionOnboardingDeviceSettingStateable) + GetCompliantDeviceCount()(*int32) + GetConflictDeviceCount()(*int32) + GetErrorDeviceCount()(*int32) + GetNonCompliantDeviceCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetNotAssignedDeviceCount()(*int32) + GetRemediatedDeviceCount()(*int32) + GetUnknownDeviceCount()(*int32) + SetAdvancedThreatProtectionOnboardingDeviceSettingStates(value []AdvancedThreatProtectionOnboardingDeviceSettingStateable)() + SetCompliantDeviceCount(value *int32)() + SetConflictDeviceCount(value *int32)() + SetErrorDeviceCount(value *int32)() + SetNonCompliantDeviceCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetNotAssignedDeviceCount(value *int32)() + SetRemediatedDeviceCount(value *int32)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_payable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_payable.go new file mode 100644 index 000000000..1d14465d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_payable.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsPayable +type AgedAccountsPayable struct { + Entity + // The agedAsOfDate property + agedAsOfDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The balanceDue property + balanceDue *float64 + // The currencyCode property + currencyCode *string + // The currentAmount property + currentAmount *float64 + // The name property + name *string + // The period1Amount property + period1Amount *float64 + // The period2Amount property + period2Amount *float64 + // The period3Amount property + period3Amount *float64 + // The periodLengthFilter property + periodLengthFilter *string + // The vendorNumber property + vendorNumber *string +} +// NewAgedAccountsPayable instantiates a new AgedAccountsPayable and sets the default values. +func NewAgedAccountsPayable()(*AgedAccountsPayable) { + m := &AgedAccountsPayable{ + Entity: *NewEntity(), + } + return m +} +// CreateAgedAccountsPayableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgedAccountsPayableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgedAccountsPayable(), nil +} +// GetAgedAsOfDate gets the agedAsOfDate property value. The agedAsOfDate property +func (m *AgedAccountsPayable) GetAgedAsOfDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.agedAsOfDate +} +// GetBalanceDue gets the balanceDue property value. The balanceDue property +func (m *AgedAccountsPayable) GetBalanceDue()(*float64) { + return m.balanceDue +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *AgedAccountsPayable) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrentAmount gets the currentAmount property value. The currentAmount property +func (m *AgedAccountsPayable) GetCurrentAmount()(*float64) { + return m.currentAmount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgedAccountsPayable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agedAsOfDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetAgedAsOfDate(val) + } + return nil + } + res["balanceDue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetBalanceDue(val) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currentAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetCurrentAmount(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["period1Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod1Amount(val) + } + return nil + } + res["period2Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod2Amount(val) + } + return nil + } + res["period3Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod3Amount(val) + } + return nil + } + res["periodLengthFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodLengthFilter(val) + } + return nil + } + res["vendorNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendorNumber(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *AgedAccountsPayable) GetName()(*string) { + return m.name +} +// GetPeriod1Amount gets the period1Amount property value. The period1Amount property +func (m *AgedAccountsPayable) GetPeriod1Amount()(*float64) { + return m.period1Amount +} +// GetPeriod2Amount gets the period2Amount property value. The period2Amount property +func (m *AgedAccountsPayable) GetPeriod2Amount()(*float64) { + return m.period2Amount +} +// GetPeriod3Amount gets the period3Amount property value. The period3Amount property +func (m *AgedAccountsPayable) GetPeriod3Amount()(*float64) { + return m.period3Amount +} +// GetPeriodLengthFilter gets the periodLengthFilter property value. The periodLengthFilter property +func (m *AgedAccountsPayable) GetPeriodLengthFilter()(*string) { + return m.periodLengthFilter +} +// GetVendorNumber gets the vendorNumber property value. The vendorNumber property +func (m *AgedAccountsPayable) GetVendorNumber()(*string) { + return m.vendorNumber +} +// Serialize serializes information the current object +func (m *AgedAccountsPayable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("agedAsOfDate", m.GetAgedAsOfDate()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("balanceDue", m.GetBalanceDue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("currentAmount", m.GetCurrentAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period1Amount", m.GetPeriod1Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period2Amount", m.GetPeriod2Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period3Amount", m.GetPeriod3Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("periodLengthFilter", m.GetPeriodLengthFilter()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vendorNumber", m.GetVendorNumber()) + if err != nil { + return err + } + } + return nil +} +// SetAgedAsOfDate sets the agedAsOfDate property value. The agedAsOfDate property +func (m *AgedAccountsPayable) SetAgedAsOfDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.agedAsOfDate = value +} +// SetBalanceDue sets the balanceDue property value. The balanceDue property +func (m *AgedAccountsPayable) SetBalanceDue(value *float64)() { + m.balanceDue = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *AgedAccountsPayable) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrentAmount sets the currentAmount property value. The currentAmount property +func (m *AgedAccountsPayable) SetCurrentAmount(value *float64)() { + m.currentAmount = value +} +// SetName sets the name property value. The name property +func (m *AgedAccountsPayable) SetName(value *string)() { + m.name = value +} +// SetPeriod1Amount sets the period1Amount property value. The period1Amount property +func (m *AgedAccountsPayable) SetPeriod1Amount(value *float64)() { + m.period1Amount = value +} +// SetPeriod2Amount sets the period2Amount property value. The period2Amount property +func (m *AgedAccountsPayable) SetPeriod2Amount(value *float64)() { + m.period2Amount = value +} +// SetPeriod3Amount sets the period3Amount property value. The period3Amount property +func (m *AgedAccountsPayable) SetPeriod3Amount(value *float64)() { + m.period3Amount = value +} +// SetPeriodLengthFilter sets the periodLengthFilter property value. The periodLengthFilter property +func (m *AgedAccountsPayable) SetPeriodLengthFilter(value *string)() { + m.periodLengthFilter = value +} +// SetVendorNumber sets the vendorNumber property value. The vendorNumber property +func (m *AgedAccountsPayable) SetVendorNumber(value *string)() { + m.vendorNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_response.go b/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_response.go new file mode 100644 index 000000000..71ae8be72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsPayableCollectionResponse +type AgedAccountsPayableCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AgedAccountsPayableable +} +// NewAgedAccountsPayableCollectionResponse instantiates a new AgedAccountsPayableCollectionResponse and sets the default values. +func NewAgedAccountsPayableCollectionResponse()(*AgedAccountsPayableCollectionResponse) { + m := &AgedAccountsPayableCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgedAccountsPayableCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgedAccountsPayableCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgedAccountsPayableCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgedAccountsPayableCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgedAccountsPayableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgedAccountsPayableable, len(val)) + for i, v := range val { + res[i] = v.(AgedAccountsPayableable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgedAccountsPayableCollectionResponse) GetValue()([]AgedAccountsPayableable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgedAccountsPayableCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgedAccountsPayableCollectionResponse) SetValue(value []AgedAccountsPayableable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_responseable.go new file mode 100644 index 000000000..cfc869d48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_payable_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsPayableCollectionResponseable +type AgedAccountsPayableCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AgedAccountsPayableable) + SetValue(value []AgedAccountsPayableable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_payableable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_payableable.go new file mode 100644 index 000000000..a7c41f35c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_payableable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsPayableable +type AgedAccountsPayableable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgedAsOfDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetBalanceDue()(*float64) + GetCurrencyCode()(*string) + GetCurrentAmount()(*float64) + GetName()(*string) + GetPeriod1Amount()(*float64) + GetPeriod2Amount()(*float64) + GetPeriod3Amount()(*float64) + GetPeriodLengthFilter()(*string) + GetVendorNumber()(*string) + SetAgedAsOfDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetBalanceDue(value *float64)() + SetCurrencyCode(value *string)() + SetCurrentAmount(value *float64)() + SetName(value *string)() + SetPeriod1Amount(value *float64)() + SetPeriod2Amount(value *float64)() + SetPeriod3Amount(value *float64)() + SetPeriodLengthFilter(value *string)() + SetVendorNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_receivable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable.go new file mode 100644 index 000000000..2be30515f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsReceivable +type AgedAccountsReceivable struct { + Entity + // The agedAsOfDate property + agedAsOfDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The balanceDue property + balanceDue *float64 + // The currencyCode property + currencyCode *string + // The currentAmount property + currentAmount *float64 + // The customerNumber property + customerNumber *string + // The name property + name *string + // The period1Amount property + period1Amount *float64 + // The period2Amount property + period2Amount *float64 + // The period3Amount property + period3Amount *float64 + // The periodLengthFilter property + periodLengthFilter *string +} +// NewAgedAccountsReceivable instantiates a new AgedAccountsReceivable and sets the default values. +func NewAgedAccountsReceivable()(*AgedAccountsReceivable) { + m := &AgedAccountsReceivable{ + Entity: *NewEntity(), + } + return m +} +// CreateAgedAccountsReceivableFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgedAccountsReceivableFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgedAccountsReceivable(), nil +} +// GetAgedAsOfDate gets the agedAsOfDate property value. The agedAsOfDate property +func (m *AgedAccountsReceivable) GetAgedAsOfDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.agedAsOfDate +} +// GetBalanceDue gets the balanceDue property value. The balanceDue property +func (m *AgedAccountsReceivable) GetBalanceDue()(*float64) { + return m.balanceDue +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *AgedAccountsReceivable) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrentAmount gets the currentAmount property value. The currentAmount property +func (m *AgedAccountsReceivable) GetCurrentAmount()(*float64) { + return m.currentAmount +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *AgedAccountsReceivable) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgedAccountsReceivable) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agedAsOfDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetAgedAsOfDate(val) + } + return nil + } + res["balanceDue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetBalanceDue(val) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currentAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetCurrentAmount(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["period1Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod1Amount(val) + } + return nil + } + res["period2Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod2Amount(val) + } + return nil + } + res["period3Amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPeriod3Amount(val) + } + return nil + } + res["periodLengthFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodLengthFilter(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *AgedAccountsReceivable) GetName()(*string) { + return m.name +} +// GetPeriod1Amount gets the period1Amount property value. The period1Amount property +func (m *AgedAccountsReceivable) GetPeriod1Amount()(*float64) { + return m.period1Amount +} +// GetPeriod2Amount gets the period2Amount property value. The period2Amount property +func (m *AgedAccountsReceivable) GetPeriod2Amount()(*float64) { + return m.period2Amount +} +// GetPeriod3Amount gets the period3Amount property value. The period3Amount property +func (m *AgedAccountsReceivable) GetPeriod3Amount()(*float64) { + return m.period3Amount +} +// GetPeriodLengthFilter gets the periodLengthFilter property value. The periodLengthFilter property +func (m *AgedAccountsReceivable) GetPeriodLengthFilter()(*string) { + return m.periodLengthFilter +} +// Serialize serializes information the current object +func (m *AgedAccountsReceivable) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("agedAsOfDate", m.GetAgedAsOfDate()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("balanceDue", m.GetBalanceDue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("currentAmount", m.GetCurrentAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period1Amount", m.GetPeriod1Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period2Amount", m.GetPeriod2Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("period3Amount", m.GetPeriod3Amount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("periodLengthFilter", m.GetPeriodLengthFilter()) + if err != nil { + return err + } + } + return nil +} +// SetAgedAsOfDate sets the agedAsOfDate property value. The agedAsOfDate property +func (m *AgedAccountsReceivable) SetAgedAsOfDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.agedAsOfDate = value +} +// SetBalanceDue sets the balanceDue property value. The balanceDue property +func (m *AgedAccountsReceivable) SetBalanceDue(value *float64)() { + m.balanceDue = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *AgedAccountsReceivable) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrentAmount sets the currentAmount property value. The currentAmount property +func (m *AgedAccountsReceivable) SetCurrentAmount(value *float64)() { + m.currentAmount = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *AgedAccountsReceivable) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetName sets the name property value. The name property +func (m *AgedAccountsReceivable) SetName(value *string)() { + m.name = value +} +// SetPeriod1Amount sets the period1Amount property value. The period1Amount property +func (m *AgedAccountsReceivable) SetPeriod1Amount(value *float64)() { + m.period1Amount = value +} +// SetPeriod2Amount sets the period2Amount property value. The period2Amount property +func (m *AgedAccountsReceivable) SetPeriod2Amount(value *float64)() { + m.period2Amount = value +} +// SetPeriod3Amount sets the period3Amount property value. The period3Amount property +func (m *AgedAccountsReceivable) SetPeriod3Amount(value *float64)() { + m.period3Amount = value +} +// SetPeriodLengthFilter sets the periodLengthFilter property value. The periodLengthFilter property +func (m *AgedAccountsReceivable) SetPeriodLengthFilter(value *string)() { + m.periodLengthFilter = value +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_response.go b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_response.go new file mode 100644 index 000000000..518685713 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsReceivableCollectionResponse +type AgedAccountsReceivableCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AgedAccountsReceivableable +} +// NewAgedAccountsReceivableCollectionResponse instantiates a new AgedAccountsReceivableCollectionResponse and sets the default values. +func NewAgedAccountsReceivableCollectionResponse()(*AgedAccountsReceivableCollectionResponse) { + m := &AgedAccountsReceivableCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgedAccountsReceivableCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgedAccountsReceivableCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgedAccountsReceivableCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgedAccountsReceivableCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgedAccountsReceivableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgedAccountsReceivableable, len(val)) + for i, v := range val { + res[i] = v.(AgedAccountsReceivableable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgedAccountsReceivableCollectionResponse) GetValue()([]AgedAccountsReceivableable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgedAccountsReceivableCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgedAccountsReceivableCollectionResponse) SetValue(value []AgedAccountsReceivableable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_responseable.go new file mode 100644 index 000000000..1f046d169 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_receivable_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsReceivableCollectionResponseable +type AgedAccountsReceivableCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AgedAccountsReceivableable) + SetValue(value []AgedAccountsReceivableable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aged_accounts_receivableable.go b/src/internal/connector/graph/betasdk/models/aged_accounts_receivableable.go new file mode 100644 index 000000000..35c8db1db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aged_accounts_receivableable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgedAccountsReceivableable +type AgedAccountsReceivableable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgedAsOfDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetBalanceDue()(*float64) + GetCurrencyCode()(*string) + GetCurrentAmount()(*float64) + GetCustomerNumber()(*string) + GetName()(*string) + GetPeriod1Amount()(*float64) + GetPeriod2Amount()(*float64) + GetPeriod3Amount()(*float64) + GetPeriodLengthFilter()(*string) + SetAgedAsOfDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetBalanceDue(value *float64)() + SetCurrencyCode(value *string)() + SetCurrentAmount(value *float64)() + SetCustomerNumber(value *string)() + SetName(value *string)() + SetPeriod1Amount(value *float64)() + SetPeriod2Amount(value *float64)() + SetPeriod3Amount(value *float64)() + SetPeriodLengthFilter(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/agent_status.go b/src/internal/connector/graph/betasdk/models/agent_status.go new file mode 100644 index 000000000..98f943fe9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agent_status.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AgentStatus int + +const ( + ACTIVE_AGENTSTATUS AgentStatus = iota + INACTIVE_AGENTSTATUS +) + +func (i AgentStatus) String() string { + return []string{"active", "inactive"}[i] +} +func ParseAgentStatus(v string) (interface{}, error) { + result := ACTIVE_AGENTSTATUS + switch v { + case "active": + result = ACTIVE_AGENTSTATUS + case "inactive": + result = INACTIVE_AGENTSTATUS + default: + return 0, errors.New("Unknown AgentStatus value: " + v) + } + return &result, nil +} +func SerializeAgentStatus(values []AgentStatus) []string { + 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/aggregation_option.go b/src/internal/connector/graph/betasdk/models/aggregation_option.go new file mode 100644 index 000000000..bd3c654b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aggregation_option.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AggregationOption +type AggregationOption 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 bucketDefinition property + bucketDefinition BucketAggregationDefinitionable + // Computes aggregation on the field while the field exists in current entity type. Required. + field *string + // The OdataType property + odataType *string + // The number of searchBucket resources to be returned. This is not required when the range is provided manually in the search request. Optional. + size *int32 +} +// NewAggregationOption instantiates a new aggregationOption and sets the default values. +func NewAggregationOption()(*AggregationOption) { + m := &AggregationOption{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAggregationOptionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAggregationOptionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAggregationOption(), 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 *AggregationOption) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBucketDefinition gets the bucketDefinition property value. The bucketDefinition property +func (m *AggregationOption) GetBucketDefinition()(BucketAggregationDefinitionable) { + return m.bucketDefinition +} +// GetField gets the field property value. Computes aggregation on the field while the field exists in current entity type. Required. +func (m *AggregationOption) GetField()(*string) { + return m.field +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AggregationOption) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bucketDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBucketAggregationDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBucketDefinition(val.(BucketAggregationDefinitionable)) + } + return nil + } + res["field"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetField(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["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AggregationOption) GetOdataType()(*string) { + return m.odataType +} +// GetSize gets the size property value. The number of searchBucket resources to be returned. This is not required when the range is provided manually in the search request. Optional. +func (m *AggregationOption) GetSize()(*int32) { + return m.size +} +// Serialize serializes information the current object +func (m *AggregationOption) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("bucketDefinition", m.GetBucketDefinition()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("field", m.GetField()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("size", m.GetSize()) + 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 *AggregationOption) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBucketDefinition sets the bucketDefinition property value. The bucketDefinition property +func (m *AggregationOption) SetBucketDefinition(value BucketAggregationDefinitionable)() { + m.bucketDefinition = value +} +// SetField sets the field property value. Computes aggregation on the field while the field exists in current entity type. Required. +func (m *AggregationOption) SetField(value *string)() { + m.field = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AggregationOption) SetOdataType(value *string)() { + m.odataType = value +} +// SetSize sets the size property value. The number of searchBucket resources to be returned. This is not required when the range is provided manually in the search request. Optional. +func (m *AggregationOption) SetSize(value *int32)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/aggregation_option_collection_response.go b/src/internal/connector/graph/betasdk/models/aggregation_option_collection_response.go new file mode 100644 index 000000000..e9dfd5d9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aggregation_option_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AggregationOptionCollectionResponse +type AggregationOptionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AggregationOptionable +} +// NewAggregationOptionCollectionResponse instantiates a new AggregationOptionCollectionResponse and sets the default values. +func NewAggregationOptionCollectionResponse()(*AggregationOptionCollectionResponse) { + m := &AggregationOptionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAggregationOptionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAggregationOptionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAggregationOptionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AggregationOptionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAggregationOptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AggregationOptionable, len(val)) + for i, v := range val { + res[i] = v.(AggregationOptionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AggregationOptionCollectionResponse) GetValue()([]AggregationOptionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AggregationOptionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AggregationOptionCollectionResponse) SetValue(value []AggregationOptionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aggregation_option_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aggregation_option_collection_responseable.go new file mode 100644 index 000000000..b0a5ee557 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aggregation_option_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AggregationOptionCollectionResponseable +type AggregationOptionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AggregationOptionable) + SetValue(value []AggregationOptionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aggregation_optionable.go b/src/internal/connector/graph/betasdk/models/aggregation_optionable.go new file mode 100644 index 000000000..234aa5ea6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aggregation_optionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AggregationOptionable +type AggregationOptionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBucketDefinition()(BucketAggregationDefinitionable) + GetField()(*string) + GetOdataType()(*string) + GetSize()(*int32) + SetBucketDefinition(value BucketAggregationDefinitionable)() + SetField(value *string)() + SetOdataType(value *string)() + SetSize(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement.go b/src/internal/connector/graph/betasdk/models/agreement.go new file mode 100644 index 000000000..18788964a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement.go @@ -0,0 +1,258 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Agreement provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Agreement struct { + Entity + // Read-only. Information about acceptances of this agreement. + acceptances []AgreementAcceptanceable + // Display name of the agreement. The display name is used for internal tracking of the agreement but is not shown to end users who view the agreement. Supports $filter (eq). + displayName *string + // Default PDF linked to this agreement. + file AgreementFileable + // PDFs linked to this agreement. Note: This property is in the process of being deprecated. Use the file property instead. + files []AgreementFileLocalizationable + // This setting enables you to require end users to accept this agreement on every device that they are accessing it from. The end user will be required to register their device in Azure AD, if they haven't already done so. Supports $filter (eq). + isPerDeviceAcceptanceRequired *bool + // Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq). + isViewingBeforeAcceptanceRequired *bool + // Expiration schedule and frequency of agreement for all users. Supports $filter (eq). + termsExpiration TermsExpirationable + // The duration after which the user must re-accept the terms of use. The value is represented in ISO 8601 format for durations. + userReacceptRequiredFrequency *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewAgreement instantiates a new agreement and sets the default values. +func NewAgreement()(*Agreement) { + m := &Agreement{ + Entity: *NewEntity(), + } + return m +} +// CreateAgreementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreement(), nil +} +// GetAcceptances gets the acceptances property value. Read-only. Information about acceptances of this agreement. +func (m *Agreement) GetAcceptances()([]AgreementAcceptanceable) { + return m.acceptances +} +// GetDisplayName gets the displayName property value. Display name of the agreement. The display name is used for internal tracking of the agreement but is not shown to end users who view the agreement. Supports $filter (eq). +func (m *Agreement) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Agreement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acceptances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementAcceptanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementAcceptanceable, len(val)) + for i, v := range val { + res[i] = v.(AgreementAcceptanceable) + } + m.SetAcceptances(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAgreementFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFile(val.(AgreementFileable)) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFileLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementFileLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(AgreementFileLocalizationable) + } + m.SetFiles(res) + } + return nil + } + res["isPerDeviceAcceptanceRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPerDeviceAcceptanceRequired(val) + } + return nil + } + res["isViewingBeforeAcceptanceRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsViewingBeforeAcceptanceRequired(val) + } + return nil + } + res["termsExpiration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTermsExpirationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTermsExpiration(val.(TermsExpirationable)) + } + return nil + } + res["userReacceptRequiredFrequency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetUserReacceptRequiredFrequency(val) + } + return nil + } + return res +} +// GetFile gets the file property value. Default PDF linked to this agreement. +func (m *Agreement) GetFile()(AgreementFileable) { + return m.file +} +// GetFiles gets the files property value. PDFs linked to this agreement. Note: This property is in the process of being deprecated. Use the file property instead. +func (m *Agreement) GetFiles()([]AgreementFileLocalizationable) { + return m.files +} +// GetIsPerDeviceAcceptanceRequired gets the isPerDeviceAcceptanceRequired property value. This setting enables you to require end users to accept this agreement on every device that they are accessing it from. The end user will be required to register their device in Azure AD, if they haven't already done so. Supports $filter (eq). +func (m *Agreement) GetIsPerDeviceAcceptanceRequired()(*bool) { + return m.isPerDeviceAcceptanceRequired +} +// GetIsViewingBeforeAcceptanceRequired gets the isViewingBeforeAcceptanceRequired property value. Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq). +func (m *Agreement) GetIsViewingBeforeAcceptanceRequired()(*bool) { + return m.isViewingBeforeAcceptanceRequired +} +// GetTermsExpiration gets the termsExpiration property value. Expiration schedule and frequency of agreement for all users. Supports $filter (eq). +func (m *Agreement) GetTermsExpiration()(TermsExpirationable) { + return m.termsExpiration +} +// GetUserReacceptRequiredFrequency gets the userReacceptRequiredFrequency property value. The duration after which the user must re-accept the terms of use. The value is represented in ISO 8601 format for durations. +func (m *Agreement) GetUserReacceptRequiredFrequency()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.userReacceptRequiredFrequency +} +// Serialize serializes information the current object +func (m *Agreement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAcceptances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAcceptances())) + for i, v := range m.GetAcceptances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("acceptances", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("file", m.GetFile()) + if err != nil { + return err + } + } + if m.GetFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFiles())) + for i, v := range m.GetFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("files", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPerDeviceAcceptanceRequired", m.GetIsPerDeviceAcceptanceRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isViewingBeforeAcceptanceRequired", m.GetIsViewingBeforeAcceptanceRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("termsExpiration", m.GetTermsExpiration()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("userReacceptRequiredFrequency", m.GetUserReacceptRequiredFrequency()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptances sets the acceptances property value. Read-only. Information about acceptances of this agreement. +func (m *Agreement) SetAcceptances(value []AgreementAcceptanceable)() { + m.acceptances = value +} +// SetDisplayName sets the displayName property value. Display name of the agreement. The display name is used for internal tracking of the agreement but is not shown to end users who view the agreement. Supports $filter (eq). +func (m *Agreement) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFile sets the file property value. Default PDF linked to this agreement. +func (m *Agreement) SetFile(value AgreementFileable)() { + m.file = value +} +// SetFiles sets the files property value. PDFs linked to this agreement. Note: This property is in the process of being deprecated. Use the file property instead. +func (m *Agreement) SetFiles(value []AgreementFileLocalizationable)() { + m.files = value +} +// SetIsPerDeviceAcceptanceRequired sets the isPerDeviceAcceptanceRequired property value. This setting enables you to require end users to accept this agreement on every device that they are accessing it from. The end user will be required to register their device in Azure AD, if they haven't already done so. Supports $filter (eq). +func (m *Agreement) SetIsPerDeviceAcceptanceRequired(value *bool)() { + m.isPerDeviceAcceptanceRequired = value +} +// SetIsViewingBeforeAcceptanceRequired sets the isViewingBeforeAcceptanceRequired property value. Indicates whether the user has to expand the agreement before accepting. Supports $filter (eq). +func (m *Agreement) SetIsViewingBeforeAcceptanceRequired(value *bool)() { + m.isViewingBeforeAcceptanceRequired = value +} +// SetTermsExpiration sets the termsExpiration property value. Expiration schedule and frequency of agreement for all users. Supports $filter (eq). +func (m *Agreement) SetTermsExpiration(value TermsExpirationable)() { + m.termsExpiration = value +} +// SetUserReacceptRequiredFrequency sets the userReacceptRequiredFrequency property value. The duration after which the user must re-accept the terms of use. The value is represented in ISO 8601 format for durations. +func (m *Agreement) SetUserReacceptRequiredFrequency(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.userReacceptRequiredFrequency = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_acceptance.go b/src/internal/connector/graph/betasdk/models/agreement_acceptance.go new file mode 100644 index 000000000..c49e4dddb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_acceptance.go @@ -0,0 +1,374 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementAcceptance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AgreementAcceptance struct { + Entity + // ID of the agreement file accepted by the user. + agreementFileId *string + // ID of the agreement. + agreementId *string + // The display name of the device used for accepting the agreement. + deviceDisplayName *string + // The unique identifier of the device used for accepting the agreement. Supports $filter (eq) and eq for null values. + deviceId *string + // The operating system used for accepting the agreement. + deviceOSType *string + // The operating system version of the device used for accepting the agreement. + deviceOSVersion *string + // The expiration date time of the acceptance. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ge, le) and eq for null values. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq) and eq for null values. + recordedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Possible values are: accepted, declined. Supports $filter (eq). + state *AgreementAcceptanceState + // Display name of the user when the acceptance was recorded. + userDisplayName *string + // Email of the user when the acceptance was recorded. + userEmail *string + // ID of the user who accepted the agreement. Supports $filter (eq). + userId *string + // UPN of the user when the acceptance was recorded. + userPrincipalName *string +} +// NewAgreementAcceptance instantiates a new agreementAcceptance and sets the default values. +func NewAgreementAcceptance()(*AgreementAcceptance) { + m := &AgreementAcceptance{ + Entity: *NewEntity(), + } + return m +} +// CreateAgreementAcceptanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementAcceptanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementAcceptance(), nil +} +// GetAgreementFileId gets the agreementFileId property value. ID of the agreement file accepted by the user. +func (m *AgreementAcceptance) GetAgreementFileId()(*string) { + return m.agreementFileId +} +// GetAgreementId gets the agreementId property value. ID of the agreement. +func (m *AgreementAcceptance) GetAgreementId()(*string) { + return m.agreementId +} +// GetDeviceDisplayName gets the deviceDisplayName property value. The display name of the device used for accepting the agreement. +func (m *AgreementAcceptance) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceId gets the deviceId property value. The unique identifier of the device used for accepting the agreement. Supports $filter (eq) and eq for null values. +func (m *AgreementAcceptance) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceOSType gets the deviceOSType property value. The operating system used for accepting the agreement. +func (m *AgreementAcceptance) GetDeviceOSType()(*string) { + return m.deviceOSType +} +// GetDeviceOSVersion gets the deviceOSVersion property value. The operating system version of the device used for accepting the agreement. +func (m *AgreementAcceptance) GetDeviceOSVersion()(*string) { + return m.deviceOSVersion +} +// GetExpirationDateTime gets the expirationDateTime property value. The expiration date time of the acceptance. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ge, le) and eq for null values. +func (m *AgreementAcceptance) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementAcceptance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agreementFileId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAgreementFileId(val) + } + return nil + } + res["agreementId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAgreementId(val) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceOSType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOSType(val) + } + return nil + } + res["deviceOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOSVersion(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["recordedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAgreementAcceptanceState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AgreementAcceptanceState)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetRecordedDateTime gets the recordedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq) and eq for null values. +func (m *AgreementAcceptance) GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.recordedDateTime +} +// GetState gets the state property value. Possible values are: accepted, declined. Supports $filter (eq). +func (m *AgreementAcceptance) GetState()(*AgreementAcceptanceState) { + return m.state +} +// GetUserDisplayName gets the userDisplayName property value. Display name of the user when the acceptance was recorded. +func (m *AgreementAcceptance) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserEmail gets the userEmail property value. Email of the user when the acceptance was recorded. +func (m *AgreementAcceptance) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. ID of the user who accepted the agreement. Supports $filter (eq). +func (m *AgreementAcceptance) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. UPN of the user when the acceptance was recorded. +func (m *AgreementAcceptance) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *AgreementAcceptance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("agreementFileId", m.GetAgreementFileId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("agreementId", m.GetAgreementId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceOSType", m.GetDeviceOSType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceOSVersion", m.GetDeviceOSVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("recordedDateTime", m.GetRecordedDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetAgreementFileId sets the agreementFileId property value. ID of the agreement file accepted by the user. +func (m *AgreementAcceptance) SetAgreementFileId(value *string)() { + m.agreementFileId = value +} +// SetAgreementId sets the agreementId property value. ID of the agreement. +func (m *AgreementAcceptance) SetAgreementId(value *string)() { + m.agreementId = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. The display name of the device used for accepting the agreement. +func (m *AgreementAcceptance) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceId sets the deviceId property value. The unique identifier of the device used for accepting the agreement. Supports $filter (eq) and eq for null values. +func (m *AgreementAcceptance) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceOSType sets the deviceOSType property value. The operating system used for accepting the agreement. +func (m *AgreementAcceptance) SetDeviceOSType(value *string)() { + m.deviceOSType = value +} +// SetDeviceOSVersion sets the deviceOSVersion property value. The operating system version of the device used for accepting the agreement. +func (m *AgreementAcceptance) SetDeviceOSVersion(value *string)() { + m.deviceOSVersion = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expiration date time of the acceptance. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ge, le) and eq for null values. +func (m *AgreementAcceptance) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetRecordedDateTime sets the recordedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq) and eq for null values. +func (m *AgreementAcceptance) SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.recordedDateTime = value +} +// SetState sets the state property value. Possible values are: accepted, declined. Supports $filter (eq). +func (m *AgreementAcceptance) SetState(value *AgreementAcceptanceState)() { + m.state = value +} +// SetUserDisplayName sets the userDisplayName property value. Display name of the user when the acceptance was recorded. +func (m *AgreementAcceptance) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserEmail sets the userEmail property value. Email of the user when the acceptance was recorded. +func (m *AgreementAcceptance) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. ID of the user who accepted the agreement. Supports $filter (eq). +func (m *AgreementAcceptance) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UPN of the user when the acceptance was recorded. +func (m *AgreementAcceptance) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_response.go b/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_response.go new file mode 100644 index 000000000..82b783a4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementAcceptanceCollectionResponse +type AgreementAcceptanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AgreementAcceptanceable +} +// NewAgreementAcceptanceCollectionResponse instantiates a new AgreementAcceptanceCollectionResponse and sets the default values. +func NewAgreementAcceptanceCollectionResponse()(*AgreementAcceptanceCollectionResponse) { + m := &AgreementAcceptanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgreementAcceptanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementAcceptanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementAcceptanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementAcceptanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementAcceptanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementAcceptanceable, len(val)) + for i, v := range val { + res[i] = v.(AgreementAcceptanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgreementAcceptanceCollectionResponse) GetValue()([]AgreementAcceptanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgreementAcceptanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgreementAcceptanceCollectionResponse) SetValue(value []AgreementAcceptanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_responseable.go new file mode 100644 index 000000000..6fba627ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_acceptance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementAcceptanceCollectionResponseable +type AgreementAcceptanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AgreementAcceptanceable) + SetValue(value []AgreementAcceptanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_acceptance_state.go b/src/internal/connector/graph/betasdk/models/agreement_acceptance_state.go new file mode 100644 index 000000000..827d39f06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_acceptance_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AgreementAcceptanceState int + +const ( + ACCEPTED_AGREEMENTACCEPTANCESTATE AgreementAcceptanceState = iota + DECLINED_AGREEMENTACCEPTANCESTATE + UNKNOWNFUTUREVALUE_AGREEMENTACCEPTANCESTATE +) + +func (i AgreementAcceptanceState) String() string { + return []string{"accepted", "declined", "unknownFutureValue"}[i] +} +func ParseAgreementAcceptanceState(v string) (interface{}, error) { + result := ACCEPTED_AGREEMENTACCEPTANCESTATE + switch v { + case "accepted": + result = ACCEPTED_AGREEMENTACCEPTANCESTATE + case "declined": + result = DECLINED_AGREEMENTACCEPTANCESTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AGREEMENTACCEPTANCESTATE + default: + return 0, errors.New("Unknown AgreementAcceptanceState value: " + v) + } + return &result, nil +} +func SerializeAgreementAcceptanceState(values []AgreementAcceptanceState) []string { + 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/agreement_acceptanceable.go b/src/internal/connector/graph/betasdk/models/agreement_acceptanceable.go new file mode 100644 index 000000000..41921d34f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_acceptanceable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementAcceptanceable +type AgreementAcceptanceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgreementFileId()(*string) + GetAgreementId()(*string) + GetDeviceDisplayName()(*string) + GetDeviceId()(*string) + GetDeviceOSType()(*string) + GetDeviceOSVersion()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*AgreementAcceptanceState) + GetUserDisplayName()(*string) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + SetAgreementFileId(value *string)() + SetAgreementId(value *string)() + SetDeviceDisplayName(value *string)() + SetDeviceId(value *string)() + SetDeviceOSType(value *string)() + SetDeviceOSVersion(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *AgreementAcceptanceState)() + SetUserDisplayName(value *string)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_collection_response.go b/src/internal/connector/graph/betasdk/models/agreement_collection_response.go new file mode 100644 index 000000000..bcda3426c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementCollectionResponse +type AgreementCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Agreementable +} +// NewAgreementCollectionResponse instantiates a new AgreementCollectionResponse and sets the default values. +func NewAgreementCollectionResponse()(*AgreementCollectionResponse) { + m := &AgreementCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgreementCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Agreementable, len(val)) + for i, v := range val { + res[i] = v.(Agreementable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgreementCollectionResponse) GetValue()([]Agreementable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgreementCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgreementCollectionResponse) SetValue(value []Agreementable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_collection_responseable.go b/src/internal/connector/graph/betasdk/models/agreement_collection_responseable.go new file mode 100644 index 000000000..16fe0bd7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementCollectionResponseable +type AgreementCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Agreementable) + SetValue(value []Agreementable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file.go b/src/internal/connector/graph/betasdk/models/agreement_file.go new file mode 100644 index 000000000..843229f1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFile +type AgreementFile struct { + AgreementFileProperties + // The localized version of the terms of use agreement files attached to the agreement. + localizations []AgreementFileLocalizationable +} +// NewAgreementFile instantiates a new AgreementFile and sets the default values. +func NewAgreementFile()(*AgreementFile) { + m := &AgreementFile{ + AgreementFileProperties: *NewAgreementFileProperties(), + } + return m +} +// CreateAgreementFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AgreementFileProperties.GetFieldDeserializers() + res["localizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFileLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementFileLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(AgreementFileLocalizationable) + } + m.SetLocalizations(res) + } + return nil + } + return res +} +// GetLocalizations gets the localizations property value. The localized version of the terms of use agreement files attached to the agreement. +func (m *AgreementFile) GetLocalizations()([]AgreementFileLocalizationable) { + return m.localizations +} +// Serialize serializes information the current object +func (m *AgreementFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AgreementFileProperties.Serialize(writer) + if err != nil { + return err + } + if m.GetLocalizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizations())) + for i, v := range m.GetLocalizations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("localizations", cast) + if err != nil { + return err + } + } + return nil +} +// SetLocalizations sets the localizations property value. The localized version of the terms of use agreement files attached to the agreement. +func (m *AgreementFile) SetLocalizations(value []AgreementFileLocalizationable)() { + m.localizations = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_data.go b/src/internal/connector/graph/betasdk/models/agreement_file_data.go new file mode 100644 index 000000000..1ca0882ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_data.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileData +type AgreementFileData struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Data that represents the terms of use PDF document. Read-only. Note: You can use the .NET Convert.ToBase64String method to convert your file to binary data for uploading using the Create agreements API. A sample syntax using this method in PowerShell is [convert]::ToBase64String((Get-Content -path 'your_file_path' -Encoding byte)). + data []byte + // The OdataType property + odataType *string +} +// NewAgreementFileData instantiates a new agreementFileData and sets the default values. +func NewAgreementFileData()(*AgreementFileData) { + m := &AgreementFileData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAgreementFileDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFileData(), 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 *AgreementFileData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetData gets the data property value. Data that represents the terms of use PDF document. Read-only. Note: You can use the .NET Convert.ToBase64String method to convert your file to binary data for uploading using the Create agreements API. A sample syntax using this method in PowerShell is [convert]::ToBase64String((Get-Content -path 'your_file_path' -Encoding byte)). +func (m *AgreementFileData) GetData()([]byte) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetData(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AgreementFileData) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AgreementFileData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AgreementFileData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetData sets the data property value. Data that represents the terms of use PDF document. Read-only. Note: You can use the .NET Convert.ToBase64String method to convert your file to binary data for uploading using the Create agreements API. A sample syntax using this method in PowerShell is [convert]::ToBase64String((Get-Content -path 'your_file_path' -Encoding byte)). +func (m *AgreementFileData) SetData(value []byte)() { + m.data = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AgreementFileData) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_dataable.go b/src/internal/connector/graph/betasdk/models/agreement_file_dataable.go new file mode 100644 index 000000000..4ce22c1c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_dataable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileDataable +type AgreementFileDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()([]byte) + GetOdataType()(*string) + SetData(value []byte)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_localization.go b/src/internal/connector/graph/betasdk/models/agreement_file_localization.go new file mode 100644 index 000000000..63f4df792 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_localization.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileLocalization provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AgreementFileLocalization struct { + AgreementFileProperties + // Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. + versions []AgreementFileVersionable +} +// NewAgreementFileLocalization instantiates a new agreementFileLocalization and sets the default values. +func NewAgreementFileLocalization()(*AgreementFileLocalization) { + m := &AgreementFileLocalization{ + AgreementFileProperties: *NewAgreementFileProperties(), + } + return m +} +// CreateAgreementFileLocalizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileLocalizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFileLocalization(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileLocalization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AgreementFileProperties.GetFieldDeserializers() + res["versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFileVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementFileVersionable, len(val)) + for i, v := range val { + res[i] = v.(AgreementFileVersionable) + } + m.SetVersions(res) + } + return nil + } + return res +} +// GetVersions gets the versions property value. Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. +func (m *AgreementFileLocalization) GetVersions()([]AgreementFileVersionable) { + return m.versions +} +// Serialize serializes information the current object +func (m *AgreementFileLocalization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AgreementFileProperties.Serialize(writer) + if err != nil { + return err + } + if m.GetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVersions())) + for i, v := range m.GetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("versions", cast) + if err != nil { + return err + } + } + return nil +} +// SetVersions sets the versions property value. Read-only. Customized versions of the terms of use agreement in the Azure AD tenant. +func (m *AgreementFileLocalization) SetVersions(value []AgreementFileVersionable)() { + m.versions = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_response.go b/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_response.go new file mode 100644 index 000000000..e6f12579d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileLocalizationCollectionResponse +type AgreementFileLocalizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AgreementFileLocalizationable +} +// NewAgreementFileLocalizationCollectionResponse instantiates a new AgreementFileLocalizationCollectionResponse and sets the default values. +func NewAgreementFileLocalizationCollectionResponse()(*AgreementFileLocalizationCollectionResponse) { + m := &AgreementFileLocalizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgreementFileLocalizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileLocalizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFileLocalizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileLocalizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFileLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementFileLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(AgreementFileLocalizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgreementFileLocalizationCollectionResponse) GetValue()([]AgreementFileLocalizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgreementFileLocalizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgreementFileLocalizationCollectionResponse) SetValue(value []AgreementFileLocalizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_responseable.go new file mode 100644 index 000000000..aae0d1ef8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_localization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileLocalizationCollectionResponseable +type AgreementFileLocalizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AgreementFileLocalizationable) + SetValue(value []AgreementFileLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_localizationable.go b/src/internal/connector/graph/betasdk/models/agreement_file_localizationable.go new file mode 100644 index 000000000..195f69aec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_localizationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileLocalizationable +type AgreementFileLocalizationable interface { + AgreementFilePropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetVersions()([]AgreementFileVersionable) + SetVersions(value []AgreementFileVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_properties.go b/src/internal/connector/graph/betasdk/models/agreement_file_properties.go new file mode 100644 index 000000000..e69796e5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_properties.go @@ -0,0 +1,239 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileProperties +type AgreementFileProperties struct { + Entity + // The date time representing when the file was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement. + displayName *string + // Data that represents the terms of use PDF document. Read-only. + fileData AgreementFileDataable + // Name of the agreement file (for example, TOU.pdf). Read-only. + fileName *string + // If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only. + isDefault *bool + // Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement's acceptances on the corresponding language. + isMajorVersion *bool + // The language of the agreement file in the format 'languagecode2-country/regioncode2'. 'languagecode2' is a lowercase two-letter code derived from ISO 639-1, while 'country/regioncode2' is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag. For example, U.S. English is en-US. Read-only. + language *string +} +// NewAgreementFileProperties instantiates a new agreementFileProperties and sets the default values. +func NewAgreementFileProperties()(*AgreementFileProperties) { + m := &AgreementFileProperties{ + Entity: *NewEntity(), + } + return m +} +// CreateAgreementFilePropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFilePropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.agreementFile": + return NewAgreementFile(), nil + case "#microsoft.graph.agreementFileLocalization": + return NewAgreementFileLocalization(), nil + case "#microsoft.graph.agreementFileVersion": + return NewAgreementFileVersion(), nil + } + } + } + } + return NewAgreementFileProperties(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date time representing when the file was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AgreementFileProperties) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement. +func (m *AgreementFileProperties) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileProperties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fileData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAgreementFileDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileData(val.(AgreementFileDataable)) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isMajorVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMajorVersion(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + return res +} +// GetFileData gets the fileData property value. Data that represents the terms of use PDF document. Read-only. +func (m *AgreementFileProperties) GetFileData()(AgreementFileDataable) { + return m.fileData +} +// GetFileName gets the fileName property value. Name of the agreement file (for example, TOU.pdf). Read-only. +func (m *AgreementFileProperties) GetFileName()(*string) { + return m.fileName +} +// GetIsDefault gets the isDefault property value. If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only. +func (m *AgreementFileProperties) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsMajorVersion gets the isMajorVersion property value. Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement's acceptances on the corresponding language. +func (m *AgreementFileProperties) GetIsMajorVersion()(*bool) { + return m.isMajorVersion +} +// GetLanguage gets the language property value. The language of the agreement file in the format 'languagecode2-country/regioncode2'. 'languagecode2' is a lowercase two-letter code derived from ISO 639-1, while 'country/regioncode2' is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag. For example, U.S. English is en-US. Read-only. +func (m *AgreementFileProperties) GetLanguage()(*string) { + return m.language +} +// Serialize serializes information the current object +func (m *AgreementFileProperties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("fileData", m.GetFileData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMajorVersion", m.GetIsMajorVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date time representing when the file was created.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AgreementFileProperties) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Localized display name of the policy file of an agreement. The localized display name is shown to end users who view the agreement. +func (m *AgreementFileProperties) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFileData sets the fileData property value. Data that represents the terms of use PDF document. Read-only. +func (m *AgreementFileProperties) SetFileData(value AgreementFileDataable)() { + m.fileData = value +} +// SetFileName sets the fileName property value. Name of the agreement file (for example, TOU.pdf). Read-only. +func (m *AgreementFileProperties) SetFileName(value *string)() { + m.fileName = value +} +// SetIsDefault sets the isDefault property value. If none of the languages matches the client preference, indicates whether this is the default agreement file . If none of the files are marked as default, the first one is treated as the default. Read-only. +func (m *AgreementFileProperties) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsMajorVersion sets the isMajorVersion property value. Indicates whether the agreement file is a major version update. Major version updates invalidate the agreement's acceptances on the corresponding language. +func (m *AgreementFileProperties) SetIsMajorVersion(value *bool)() { + m.isMajorVersion = value +} +// SetLanguage sets the language property value. The language of the agreement file in the format 'languagecode2-country/regioncode2'. 'languagecode2' is a lowercase two-letter code derived from ISO 639-1, while 'country/regioncode2' is derived from ISO 3166 and usually consists of two uppercase letters, or a BCP-47 language tag. For example, U.S. English is en-US. Read-only. +func (m *AgreementFileProperties) SetLanguage(value *string)() { + m.language = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_propertiesable.go b/src/internal/connector/graph/betasdk/models/agreement_file_propertiesable.go new file mode 100644 index 000000000..4723d8965 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_propertiesable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFilePropertiesable +type AgreementFilePropertiesable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetFileData()(AgreementFileDataable) + GetFileName()(*string) + GetIsDefault()(*bool) + GetIsMajorVersion()(*bool) + GetLanguage()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetFileData(value AgreementFileDataable)() + SetFileName(value *string)() + SetIsDefault(value *bool)() + SetIsMajorVersion(value *bool)() + SetLanguage(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_version.go b/src/internal/connector/graph/betasdk/models/agreement_file_version.go new file mode 100644 index 000000000..8dd439cb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_version.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileVersion provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AgreementFileVersion struct { + AgreementFileProperties +} +// NewAgreementFileVersion instantiates a new agreementFileVersion and sets the default values. +func NewAgreementFileVersion()(*AgreementFileVersion) { + m := &AgreementFileVersion{ + AgreementFileProperties: *NewAgreementFileProperties(), + } + return m +} +// CreateAgreementFileVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFileVersion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AgreementFileProperties.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AgreementFileVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AgreementFileProperties.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_response.go b/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_response.go new file mode 100644 index 000000000..080d4d86a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileVersionCollectionResponse +type AgreementFileVersionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AgreementFileVersionable +} +// NewAgreementFileVersionCollectionResponse instantiates a new AgreementFileVersionCollectionResponse and sets the default values. +func NewAgreementFileVersionCollectionResponse()(*AgreementFileVersionCollectionResponse) { + m := &AgreementFileVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAgreementFileVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAgreementFileVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAgreementFileVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AgreementFileVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgreementFileVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgreementFileVersionable, len(val)) + for i, v := range val { + res[i] = v.(AgreementFileVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AgreementFileVersionCollectionResponse) GetValue()([]AgreementFileVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AgreementFileVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AgreementFileVersionCollectionResponse) SetValue(value []AgreementFileVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_responseable.go new file mode 100644 index 000000000..cd00ce6eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_version_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileVersionCollectionResponseable +type AgreementFileVersionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AgreementFileVersionable) + SetValue(value []AgreementFileVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_file_versionable.go b/src/internal/connector/graph/betasdk/models/agreement_file_versionable.go new file mode 100644 index 000000000..10669a008 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_file_versionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileVersionable +type AgreementFileVersionable interface { + AgreementFilePropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/agreement_fileable.go b/src/internal/connector/graph/betasdk/models/agreement_fileable.go new file mode 100644 index 000000000..22bf9c7cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreement_fileable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AgreementFileable +type AgreementFileable interface { + AgreementFilePropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLocalizations()([]AgreementFileLocalizationable) + SetLocalizations(value []AgreementFileLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/agreementable.go b/src/internal/connector/graph/betasdk/models/agreementable.go new file mode 100644 index 000000000..f75a72033 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/agreementable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Agreementable +type Agreementable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptances()([]AgreementAcceptanceable) + GetDisplayName()(*string) + GetFile()(AgreementFileable) + GetFiles()([]AgreementFileLocalizationable) + GetIsPerDeviceAcceptanceRequired()(*bool) + GetIsViewingBeforeAcceptanceRequired()(*bool) + GetTermsExpiration()(TermsExpirationable) + GetUserReacceptRequiredFrequency()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAcceptances(value []AgreementAcceptanceable)() + SetDisplayName(value *string)() + SetFile(value AgreementFileable)() + SetFiles(value []AgreementFileLocalizationable)() + SetIsPerDeviceAcceptanceRequired(value *bool)() + SetIsViewingBeforeAcceptanceRequired(value *bool)() + SetTermsExpiration(value TermsExpirationable)() + SetUserReacceptRequiredFrequency(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/air_print_destination.go b/src/internal/connector/graph/betasdk/models/air_print_destination.go new file mode 100644 index 000000000..446d6b4fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/air_print_destination.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AirPrintDestination represents an AirPrint destination. +type AirPrintDestination struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If true AirPrint connections are secured by Transport Layer Security (TLS). Default is false. Available in iOS 11.0 and later. + forceTls *bool + // The IP Address of the AirPrint destination. + ipAddress *string + // The OdataType property + odataType *string + // The listening port of the AirPrint destination. If this key is not specified AirPrint will use the default port. Available in iOS 11.0 and later. + port *int32 + // The Resource Path associated with the printer. This corresponds to the rp parameter of the ipps.tcp Bonjour record. For example: printers/Canon_MG5300_series, printers/Xerox_Phaser_7600, ipp/print, Epson_IPP_Printer. + resourcePath *string +} +// NewAirPrintDestination instantiates a new airPrintDestination and sets the default values. +func NewAirPrintDestination()(*AirPrintDestination) { + m := &AirPrintDestination{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAirPrintDestinationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAirPrintDestinationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAirPrintDestination(), 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 *AirPrintDestination) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AirPrintDestination) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["forceTls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetForceTls(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(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["port"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPort(val) + } + return nil + } + res["resourcePath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourcePath(val) + } + return nil + } + return res +} +// GetForceTls gets the forceTls property value. If true AirPrint connections are secured by Transport Layer Security (TLS). Default is false. Available in iOS 11.0 and later. +func (m *AirPrintDestination) GetForceTls()(*bool) { + return m.forceTls +} +// GetIpAddress gets the ipAddress property value. The IP Address of the AirPrint destination. +func (m *AirPrintDestination) GetIpAddress()(*string) { + return m.ipAddress +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AirPrintDestination) GetOdataType()(*string) { + return m.odataType +} +// GetPort gets the port property value. The listening port of the AirPrint destination. If this key is not specified AirPrint will use the default port. Available in iOS 11.0 and later. +func (m *AirPrintDestination) GetPort()(*int32) { + return m.port +} +// GetResourcePath gets the resourcePath property value. The Resource Path associated with the printer. This corresponds to the rp parameter of the ipps.tcp Bonjour record. For example: printers/Canon_MG5300_series, printers/Xerox_Phaser_7600, ipp/print, Epson_IPP_Printer. +func (m *AirPrintDestination) GetResourcePath()(*string) { + return m.resourcePath +} +// Serialize serializes information the current object +func (m *AirPrintDestination) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("forceTls", m.GetForceTls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("port", m.GetPort()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourcePath", m.GetResourcePath()) + 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 *AirPrintDestination) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetForceTls sets the forceTls property value. If true AirPrint connections are secured by Transport Layer Security (TLS). Default is false. Available in iOS 11.0 and later. +func (m *AirPrintDestination) SetForceTls(value *bool)() { + m.forceTls = value +} +// SetIpAddress sets the ipAddress property value. The IP Address of the AirPrint destination. +func (m *AirPrintDestination) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AirPrintDestination) SetOdataType(value *string)() { + m.odataType = value +} +// SetPort sets the port property value. The listening port of the AirPrint destination. If this key is not specified AirPrint will use the default port. Available in iOS 11.0 and later. +func (m *AirPrintDestination) SetPort(value *int32)() { + m.port = value +} +// SetResourcePath sets the resourcePath property value. The Resource Path associated with the printer. This corresponds to the rp parameter of the ipps.tcp Bonjour record. For example: printers/Canon_MG5300_series, printers/Xerox_Phaser_7600, ipp/print, Epson_IPP_Printer. +func (m *AirPrintDestination) SetResourcePath(value *string)() { + m.resourcePath = value +} diff --git a/src/internal/connector/graph/betasdk/models/air_print_destination_collection_response.go b/src/internal/connector/graph/betasdk/models/air_print_destination_collection_response.go new file mode 100644 index 000000000..b18170db0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/air_print_destination_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AirPrintDestinationCollectionResponse +type AirPrintDestinationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AirPrintDestinationable +} +// NewAirPrintDestinationCollectionResponse instantiates a new AirPrintDestinationCollectionResponse and sets the default values. +func NewAirPrintDestinationCollectionResponse()(*AirPrintDestinationCollectionResponse) { + m := &AirPrintDestinationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAirPrintDestinationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAirPrintDestinationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAirPrintDestinationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AirPrintDestinationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAirPrintDestinationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AirPrintDestinationable, len(val)) + for i, v := range val { + res[i] = v.(AirPrintDestinationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AirPrintDestinationCollectionResponse) GetValue()([]AirPrintDestinationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AirPrintDestinationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AirPrintDestinationCollectionResponse) SetValue(value []AirPrintDestinationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/air_print_destination_collection_responseable.go b/src/internal/connector/graph/betasdk/models/air_print_destination_collection_responseable.go new file mode 100644 index 000000000..d100e8a8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/air_print_destination_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AirPrintDestinationCollectionResponseable +type AirPrintDestinationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AirPrintDestinationable) + SetValue(value []AirPrintDestinationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/air_print_destinationable.go b/src/internal/connector/graph/betasdk/models/air_print_destinationable.go new file mode 100644 index 000000000..15f985381 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/air_print_destinationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AirPrintDestinationable +type AirPrintDestinationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetForceTls()(*bool) + GetIpAddress()(*string) + GetOdataType()(*string) + GetPort()(*int32) + GetResourcePath()(*string) + SetForceTls(value *bool)() + SetIpAddress(value *string)() + SetOdataType(value *string)() + SetPort(value *int32)() + SetResourcePath(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/album.go b/src/internal/connector/graph/betasdk/models/album.go new file mode 100644 index 000000000..7683f5a3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/album.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Album +type Album struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Unique identifier of the [driveItem][] that is the cover of the album. + coverImageItemId *string + // The OdataType property + odataType *string +} +// NewAlbum instantiates a new album and sets the default values. +func NewAlbum()(*Album) { + m := &Album{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlbumFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlbumFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlbum(), 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 *Album) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCoverImageItemId gets the coverImageItemId property value. Unique identifier of the [driveItem][] that is the cover of the album. +func (m *Album) GetCoverImageItemId()(*string) { + return m.coverImageItemId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Album) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["coverImageItemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCoverImageItemId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Album) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Album) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("coverImageItemId", m.GetCoverImageItemId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Album) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCoverImageItemId sets the coverImageItemId property value. Unique identifier of the [driveItem][] that is the cover of the album. +func (m *Album) SetCoverImageItemId(value *string)() { + m.coverImageItemId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Album) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/albumable.go b/src/internal/connector/graph/betasdk/models/albumable.go new file mode 100644 index 000000000..17bd06b09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/albumable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Albumable +type Albumable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCoverImageItemId()(*string) + GetOdataType()(*string) + SetCoverImageItemId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert.go b/src/internal/connector/graph/betasdk/models/alert.go new file mode 100644 index 000000000..c9757bb55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert.go @@ -0,0 +1,1204 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Alert provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Alert struct { + Entity + // Name or alias of the activity group (attacker) this alert is attributed to. + activityGroupName *string + // The alertDetections property + alertDetections []AlertDetectionable + // Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update). + assignedTo *string + // Azure subscription ID, present if this alert is related to an Azure resource. + azureSubscriptionId *string + // Azure Active Directory tenant ID. Required. + azureTenantId *string + // Category of the alert (for example, credentialTheft, ransomware, etc.). + category *string + // Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update). + closedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Security-related stateful information generated by the provider about the cloud application/s related to this alert. + cloudAppStates []CloudAppSecurityStateable + // Customer-provided comments on alert (for customer alert management) (supports update). + comments []string + // Confidence of the detection logic (percentage between 1-100). + confidence *int32 + // Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Alert description. + description *string + // Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record). + detectionIds []string + // Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. + eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update) + feedback *AlertFeedback + // Security-related stateful information generated by the provider about the file(s) related to this alert. + fileStates []FileSecurityStateable + // A collection of alertHistoryStates comprising an audit log of all updates made to an alert. + historyStates []AlertHistoryStateable + // Security-related stateful information generated by the provider about the host(s) related to this alert. + hostStates []HostSecurityStateable + // IDs of incidents related to current alert. + incidentIds []string + // The investigationSecurityStates property + investigationSecurityStates []InvestigationSecurityStateable + // The lastEventDateTime property + lastEventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Threat Intelligence pertaining to malware related to this alert. + malwareStates []MalwareStateable + // The messageSecurityStates property + messageSecurityStates []MessageSecurityStateable + // Security-related stateful information generated by the provider about the network connection(s) related to this alert. + networkConnections []NetworkConnectionable + // Security-related stateful information generated by the provider about the process or processes related to this alert. + processes []Processable + // Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). + recommendedActions []string + // Security-related stateful information generated by the provider about the registry keys related to this alert. + registryKeyStates []RegistryKeyStateable + // Resources related to current alert. For example, for some alerts this can have the Azure Resource value. + securityResources []SecurityResourceable + // The severity property + severity *AlertSeverity + // Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc. + sourceMaterials []string + // The status property + status *AlertStatus + // User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update). + tags []string + // Alert title. Required. + title *string + // Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation. + triggers []AlertTriggerable + // The uriClickSecurityStates property + uriClickSecurityStates []UriClickSecurityStateable + // Security-related stateful information generated by the provider about the user accounts related to this alert. + userStates []UserSecurityStateable + // Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required. + vendorInformation SecurityVendorInformationable + // Threat intelligence pertaining to one or more vulnerabilities related to this alert. + vulnerabilityStates []VulnerabilityStateable +} +// NewAlert instantiates a new alert and sets the default values. +func NewAlert()(*Alert) { + m := &Alert{ + Entity: *NewEntity(), + } + return m +} +// CreateAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlert(), nil +} +// GetActivityGroupName gets the activityGroupName property value. Name or alias of the activity group (attacker) this alert is attributed to. +func (m *Alert) GetActivityGroupName()(*string) { + return m.activityGroupName +} +// GetAlertDetections gets the alertDetections property value. The alertDetections property +func (m *Alert) GetAlertDetections()([]AlertDetectionable) { + return m.alertDetections +} +// GetAssignedTo gets the assignedTo property value. Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update). +func (m *Alert) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. Azure subscription ID, present if this alert is related to an Azure resource. +func (m *Alert) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. Azure Active Directory tenant ID. Required. +func (m *Alert) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetCategory gets the category property value. Category of the alert (for example, credentialTheft, ransomware, etc.). +func (m *Alert) GetCategory()(*string) { + return m.category +} +// GetClosedDateTime gets the closedDateTime property value. Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update). +func (m *Alert) GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closedDateTime +} +// GetCloudAppStates gets the cloudAppStates property value. Security-related stateful information generated by the provider about the cloud application/s related to this alert. +func (m *Alert) GetCloudAppStates()([]CloudAppSecurityStateable) { + return m.cloudAppStates +} +// GetComments gets the comments property value. Customer-provided comments on alert (for customer alert management) (supports update). +func (m *Alert) GetComments()([]string) { + return m.comments +} +// GetConfidence gets the confidence property value. Confidence of the detection logic (percentage between 1-100). +func (m *Alert) GetConfidence()(*int32) { + return m.confidence +} +// GetCreatedDateTime gets the createdDateTime property value. Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. +func (m *Alert) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Alert description. +func (m *Alert) GetDescription()(*string) { + return m.description +} +// GetDetectionIds gets the detectionIds property value. Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record). +func (m *Alert) GetDetectionIds()([]string) { + return m.detectionIds +} +// GetEventDateTime gets the eventDateTime property value. Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. +func (m *Alert) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventDateTime +} +// GetFeedback gets the feedback property value. Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update) +func (m *Alert) GetFeedback()(*AlertFeedback) { + return m.feedback +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Alert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activityGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityGroupName(val) + } + return nil + } + res["alertDetections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertDetectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertDetectionable, len(val)) + for i, v := range val { + res[i] = v.(AlertDetectionable) + } + m.SetAlertDetections(res) + } + return nil + } + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["closedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedDateTime(val) + } + return nil + } + res["cloudAppStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudAppSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudAppSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(CloudAppSecurityStateable) + } + m.SetCloudAppStates(res) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetComments(res) + } + return nil + } + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["detectionIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDetectionIds(res) + } + return nil + } + res["eventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventDateTime(val) + } + return nil + } + res["feedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertFeedback) + if err != nil { + return err + } + if val != nil { + m.SetFeedback(val.(*AlertFeedback)) + } + return nil + } + res["fileStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(FileSecurityStateable) + } + m.SetFileStates(res) + } + return nil + } + res["historyStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertHistoryStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertHistoryStateable, len(val)) + for i, v := range val { + res[i] = v.(AlertHistoryStateable) + } + m.SetHistoryStates(res) + } + return nil + } + res["hostStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHostSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HostSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(HostSecurityStateable) + } + m.SetHostStates(res) + } + return nil + } + res["incidentIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncidentIds(res) + } + return nil + } + res["investigationSecurityStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvestigationSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvestigationSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(InvestigationSecurityStateable) + } + m.SetInvestigationSecurityStates(res) + } + return nil + } + res["lastEventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastEventDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["malwareStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMalwareStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MalwareStateable, len(val)) + for i, v := range val { + res[i] = v.(MalwareStateable) + } + m.SetMalwareStates(res) + } + return nil + } + res["messageSecurityStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(MessageSecurityStateable) + } + m.SetMessageSecurityStates(res) + } + return nil + } + res["networkConnections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNetworkConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NetworkConnectionable, len(val)) + for i, v := range val { + res[i] = v.(NetworkConnectionable) + } + m.SetNetworkConnections(res) + } + return nil + } + res["processes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProcessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Processable, len(val)) + for i, v := range val { + res[i] = v.(Processable) + } + m.SetProcesses(res) + } + return nil + } + res["recommendedActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRecommendedActions(res) + } + return nil + } + res["registryKeyStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRegistryKeyStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RegistryKeyStateable, len(val)) + for i, v := range val { + res[i] = v.(RegistryKeyStateable) + } + m.SetRegistryKeyStates(res) + } + return nil + } + res["securityResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityResourceable, len(val)) + for i, v := range val { + res[i] = v.(SecurityResourceable) + } + m.SetSecurityResources(res) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*AlertSeverity)) + } + return nil + } + res["sourceMaterials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSourceMaterials(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AlertStatus)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["triggers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertTriggerable, len(val)) + for i, v := range val { + res[i] = v.(AlertTriggerable) + } + m.SetTriggers(res) + } + return nil + } + res["uriClickSecurityStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUriClickSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UriClickSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(UriClickSecurityStateable) + } + m.SetUriClickSecurityStates(res) + } + return nil + } + res["userStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(UserSecurityStateable) + } + m.SetUserStates(res) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + res["vulnerabilityStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVulnerabilityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VulnerabilityStateable, len(val)) + for i, v := range val { + res[i] = v.(VulnerabilityStateable) + } + m.SetVulnerabilityStates(res) + } + return nil + } + return res +} +// GetFileStates gets the fileStates property value. Security-related stateful information generated by the provider about the file(s) related to this alert. +func (m *Alert) GetFileStates()([]FileSecurityStateable) { + return m.fileStates +} +// GetHistoryStates gets the historyStates property value. A collection of alertHistoryStates comprising an audit log of all updates made to an alert. +func (m *Alert) GetHistoryStates()([]AlertHistoryStateable) { + return m.historyStates +} +// GetHostStates gets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert. +func (m *Alert) GetHostStates()([]HostSecurityStateable) { + return m.hostStates +} +// GetIncidentIds gets the incidentIds property value. IDs of incidents related to current alert. +func (m *Alert) GetIncidentIds()([]string) { + return m.incidentIds +} +// GetInvestigationSecurityStates gets the investigationSecurityStates property value. The investigationSecurityStates property +func (m *Alert) GetInvestigationSecurityStates()([]InvestigationSecurityStateable) { + return m.investigationSecurityStates +} +// GetLastEventDateTime gets the lastEventDateTime property value. The lastEventDateTime property +func (m *Alert) GetLastEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastEventDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Alert) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMalwareStates gets the malwareStates property value. Threat Intelligence pertaining to malware related to this alert. +func (m *Alert) GetMalwareStates()([]MalwareStateable) { + return m.malwareStates +} +// GetMessageSecurityStates gets the messageSecurityStates property value. The messageSecurityStates property +func (m *Alert) GetMessageSecurityStates()([]MessageSecurityStateable) { + return m.messageSecurityStates +} +// GetNetworkConnections gets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert. +func (m *Alert) GetNetworkConnections()([]NetworkConnectionable) { + return m.networkConnections +} +// GetProcesses gets the processes property value. Security-related stateful information generated by the provider about the process or processes related to this alert. +func (m *Alert) GetProcesses()([]Processable) { + return m.processes +} +// GetRecommendedActions gets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). +func (m *Alert) GetRecommendedActions()([]string) { + return m.recommendedActions +} +// GetRegistryKeyStates gets the registryKeyStates property value. Security-related stateful information generated by the provider about the registry keys related to this alert. +func (m *Alert) GetRegistryKeyStates()([]RegistryKeyStateable) { + return m.registryKeyStates +} +// GetSecurityResources gets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value. +func (m *Alert) GetSecurityResources()([]SecurityResourceable) { + return m.securityResources +} +// GetSeverity gets the severity property value. The severity property +func (m *Alert) GetSeverity()(*AlertSeverity) { + return m.severity +} +// GetSourceMaterials gets the sourceMaterials property value. Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc. +func (m *Alert) GetSourceMaterials()([]string) { + return m.sourceMaterials +} +// GetStatus gets the status property value. The status property +func (m *Alert) GetStatus()(*AlertStatus) { + return m.status +} +// GetTags gets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update). +func (m *Alert) GetTags()([]string) { + return m.tags +} +// GetTitle gets the title property value. Alert title. Required. +func (m *Alert) GetTitle()(*string) { + return m.title +} +// GetTriggers gets the triggers property value. Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation. +func (m *Alert) GetTriggers()([]AlertTriggerable) { + return m.triggers +} +// GetUriClickSecurityStates gets the uriClickSecurityStates property value. The uriClickSecurityStates property +func (m *Alert) GetUriClickSecurityStates()([]UriClickSecurityStateable) { + return m.uriClickSecurityStates +} +// GetUserStates gets the userStates property value. Security-related stateful information generated by the provider about the user accounts related to this alert. +func (m *Alert) GetUserStates()([]UserSecurityStateable) { + return m.userStates +} +// GetVendorInformation gets the vendorInformation property value. Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required. +func (m *Alert) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// GetVulnerabilityStates gets the vulnerabilityStates property value. Threat intelligence pertaining to one or more vulnerabilities related to this alert. +func (m *Alert) GetVulnerabilityStates()([]VulnerabilityStateable) { + return m.vulnerabilityStates +} +// Serialize serializes information the current object +func (m *Alert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activityGroupName", m.GetActivityGroupName()) + if err != nil { + return err + } + } + if m.GetAlertDetections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertDetections())) + for i, v := range m.GetAlertDetections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertDetections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("closedDateTime", m.GetClosedDateTime()) + if err != nil { + return err + } + } + if m.GetCloudAppStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudAppStates())) + for i, v := range m.GetCloudAppStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudAppStates", cast) + if err != nil { + return err + } + } + if m.GetComments() != nil { + err = writer.WriteCollectionOfStringValues("comments", m.GetComments()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDetectionIds() != nil { + err = writer.WriteCollectionOfStringValues("detectionIds", m.GetDetectionIds()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime()) + if err != nil { + return err + } + } + if m.GetFeedback() != nil { + cast := (*m.GetFeedback()).String() + err = writer.WriteStringValue("feedback", &cast) + if err != nil { + return err + } + } + if m.GetFileStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFileStates())) + for i, v := range m.GetFileStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fileStates", cast) + if err != nil { + return err + } + } + if m.GetHistoryStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistoryStates())) + for i, v := range m.GetHistoryStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("historyStates", cast) + if err != nil { + return err + } + } + if m.GetHostStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHostStates())) + for i, v := range m.GetHostStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("hostStates", cast) + if err != nil { + return err + } + } + if m.GetIncidentIds() != nil { + err = writer.WriteCollectionOfStringValues("incidentIds", m.GetIncidentIds()) + if err != nil { + return err + } + } + if m.GetInvestigationSecurityStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInvestigationSecurityStates())) + for i, v := range m.GetInvestigationSecurityStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("investigationSecurityStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastEventDateTime", m.GetLastEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetMalwareStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMalwareStates())) + for i, v := range m.GetMalwareStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("malwareStates", cast) + if err != nil { + return err + } + } + if m.GetMessageSecurityStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessageSecurityStates())) + for i, v := range m.GetMessageSecurityStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messageSecurityStates", cast) + if err != nil { + return err + } + } + if m.GetNetworkConnections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNetworkConnections())) + for i, v := range m.GetNetworkConnections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("networkConnections", cast) + if err != nil { + return err + } + } + if m.GetProcesses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProcesses())) + for i, v := range m.GetProcesses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("processes", cast) + if err != nil { + return err + } + } + if m.GetRecommendedActions() != nil { + err = writer.WriteCollectionOfStringValues("recommendedActions", m.GetRecommendedActions()) + if err != nil { + return err + } + } + if m.GetRegistryKeyStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegistryKeyStates())) + for i, v := range m.GetRegistryKeyStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("registryKeyStates", cast) + if err != nil { + return err + } + } + if m.GetSecurityResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecurityResources())) + for i, v := range m.GetSecurityResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("securityResources", cast) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetSourceMaterials() != nil { + err = writer.WriteCollectionOfStringValues("sourceMaterials", m.GetSourceMaterials()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + if m.GetTriggers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTriggers())) + for i, v := range m.GetTriggers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("triggers", cast) + if err != nil { + return err + } + } + if m.GetUriClickSecurityStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUriClickSecurityStates())) + for i, v := range m.GetUriClickSecurityStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("uriClickSecurityStates", cast) + if err != nil { + return err + } + } + if m.GetUserStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStates())) + for i, v := range m.GetUserStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + if m.GetVulnerabilityStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilityStates())) + for i, v := range m.GetVulnerabilityStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("vulnerabilityStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivityGroupName sets the activityGroupName property value. Name or alias of the activity group (attacker) this alert is attributed to. +func (m *Alert) SetActivityGroupName(value *string)() { + m.activityGroupName = value +} +// SetAlertDetections sets the alertDetections property value. The alertDetections property +func (m *Alert) SetAlertDetections(value []AlertDetectionable)() { + m.alertDetections = value +} +// SetAssignedTo sets the assignedTo property value. Name of the analyst the alert is assigned to for triage, investigation, or remediation (supports update). +func (m *Alert) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. Azure subscription ID, present if this alert is related to an Azure resource. +func (m *Alert) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. Azure Active Directory tenant ID. Required. +func (m *Alert) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetCategory sets the category property value. Category of the alert (for example, credentialTheft, ransomware, etc.). +func (m *Alert) SetCategory(value *string)() { + m.category = value +} +// SetClosedDateTime sets the closedDateTime property value. Time at which the alert was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z (supports update). +func (m *Alert) SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closedDateTime = value +} +// SetCloudAppStates sets the cloudAppStates property value. Security-related stateful information generated by the provider about the cloud application/s related to this alert. +func (m *Alert) SetCloudAppStates(value []CloudAppSecurityStateable)() { + m.cloudAppStates = value +} +// SetComments sets the comments property value. Customer-provided comments on alert (for customer alert management) (supports update). +func (m *Alert) SetComments(value []string)() { + m.comments = value +} +// SetConfidence sets the confidence property value. Confidence of the detection logic (percentage between 1-100). +func (m *Alert) SetConfidence(value *int32)() { + m.confidence = value +} +// SetCreatedDateTime sets the createdDateTime property value. Time at which the alert was created by the alert provider. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. +func (m *Alert) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Alert description. +func (m *Alert) SetDescription(value *string)() { + m.description = value +} +// SetDetectionIds sets the detectionIds property value. Set of alerts related to this alert entity (each alert is pushed to the SIEM as a separate record). +func (m *Alert) SetDetectionIds(value []string)() { + m.detectionIds = value +} +// SetEventDateTime sets the eventDateTime property value. Time at which the event(s) that served as the trigger(s) to generate the alert occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Required. +func (m *Alert) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventDateTime = value +} +// SetFeedback sets the feedback property value. Analyst feedback on the alert. Possible values are: unknown, truePositive, falsePositive, benignPositive. (supports update) +func (m *Alert) SetFeedback(value *AlertFeedback)() { + m.feedback = value +} +// SetFileStates sets the fileStates property value. Security-related stateful information generated by the provider about the file(s) related to this alert. +func (m *Alert) SetFileStates(value []FileSecurityStateable)() { + m.fileStates = value +} +// SetHistoryStates sets the historyStates property value. A collection of alertHistoryStates comprising an audit log of all updates made to an alert. +func (m *Alert) SetHistoryStates(value []AlertHistoryStateable)() { + m.historyStates = value +} +// SetHostStates sets the hostStates property value. Security-related stateful information generated by the provider about the host(s) related to this alert. +func (m *Alert) SetHostStates(value []HostSecurityStateable)() { + m.hostStates = value +} +// SetIncidentIds sets the incidentIds property value. IDs of incidents related to current alert. +func (m *Alert) SetIncidentIds(value []string)() { + m.incidentIds = value +} +// SetInvestigationSecurityStates sets the investigationSecurityStates property value. The investigationSecurityStates property +func (m *Alert) SetInvestigationSecurityStates(value []InvestigationSecurityStateable)() { + m.investigationSecurityStates = value +} +// SetLastEventDateTime sets the lastEventDateTime property value. The lastEventDateTime property +func (m *Alert) SetLastEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastEventDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Time at which the alert entity was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Alert) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMalwareStates sets the malwareStates property value. Threat Intelligence pertaining to malware related to this alert. +func (m *Alert) SetMalwareStates(value []MalwareStateable)() { + m.malwareStates = value +} +// SetMessageSecurityStates sets the messageSecurityStates property value. The messageSecurityStates property +func (m *Alert) SetMessageSecurityStates(value []MessageSecurityStateable)() { + m.messageSecurityStates = value +} +// SetNetworkConnections sets the networkConnections property value. Security-related stateful information generated by the provider about the network connection(s) related to this alert. +func (m *Alert) SetNetworkConnections(value []NetworkConnectionable)() { + m.networkConnections = value +} +// SetProcesses sets the processes property value. Security-related stateful information generated by the provider about the process or processes related to this alert. +func (m *Alert) SetProcesses(value []Processable)() { + m.processes = value +} +// SetRecommendedActions sets the recommendedActions property value. Vendor/provider recommended action(s) to take as a result of the alert (for example, isolate machine, enforce2FA, reimage host). +func (m *Alert) SetRecommendedActions(value []string)() { + m.recommendedActions = value +} +// SetRegistryKeyStates sets the registryKeyStates property value. Security-related stateful information generated by the provider about the registry keys related to this alert. +func (m *Alert) SetRegistryKeyStates(value []RegistryKeyStateable)() { + m.registryKeyStates = value +} +// SetSecurityResources sets the securityResources property value. Resources related to current alert. For example, for some alerts this can have the Azure Resource value. +func (m *Alert) SetSecurityResources(value []SecurityResourceable)() { + m.securityResources = value +} +// SetSeverity sets the severity property value. The severity property +func (m *Alert) SetSeverity(value *AlertSeverity)() { + m.severity = value +} +// SetSourceMaterials sets the sourceMaterials property value. Hyperlinks (URIs) to the source material related to the alert, for example, provider's user interface for alerts or log search, etc. +func (m *Alert) SetSourceMaterials(value []string)() { + m.sourceMaterials = value +} +// SetStatus sets the status property value. The status property +func (m *Alert) SetStatus(value *AlertStatus)() { + m.status = value +} +// SetTags sets the tags property value. User-definable labels that can be applied to an alert and can serve as filter conditions (for example 'HVA', 'SAW', etc.) (supports update). +func (m *Alert) SetTags(value []string)() { + m.tags = value +} +// SetTitle sets the title property value. Alert title. Required. +func (m *Alert) SetTitle(value *string)() { + m.title = value +} +// SetTriggers sets the triggers property value. Security-related information about the specific properties that triggered the alert (properties appearing in the alert). Alerts might contain information about multiple users, hosts, files, ip addresses. This field indicates which properties triggered the alert generation. +func (m *Alert) SetTriggers(value []AlertTriggerable)() { + m.triggers = value +} +// SetUriClickSecurityStates sets the uriClickSecurityStates property value. The uriClickSecurityStates property +func (m *Alert) SetUriClickSecurityStates(value []UriClickSecurityStateable)() { + m.uriClickSecurityStates = value +} +// SetUserStates sets the userStates property value. Security-related stateful information generated by the provider about the user accounts related to this alert. +func (m *Alert) SetUserStates(value []UserSecurityStateable)() { + m.userStates = value +} +// SetVendorInformation sets the vendorInformation property value. Complex type containing details about the security product/service vendor, provider, and subprovider (for example, vendor=Microsoft; provider=Windows Defender ATP; subProvider=AppLocker). Required. +func (m *Alert) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} +// SetVulnerabilityStates sets the vulnerabilityStates property value. Threat intelligence pertaining to one or more vulnerabilities related to this alert. +func (m *Alert) SetVulnerabilityStates(value []VulnerabilityStateable)() { + m.vulnerabilityStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_collection_response.go b/src/internal/connector/graph/betasdk/models/alert_collection_response.go new file mode 100644 index 000000000..be80dd516 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertCollectionResponse +type AlertCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Alertable +} +// NewAlertCollectionResponse instantiates a new AlertCollectionResponse and sets the default values. +func NewAlertCollectionResponse()(*AlertCollectionResponse) { + m := &AlertCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Alertable, len(val)) + for i, v := range val { + res[i] = v.(Alertable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertCollectionResponse) GetValue()([]Alertable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertCollectionResponse) SetValue(value []Alertable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_collection_responseable.go b/src/internal/connector/graph/betasdk/models/alert_collection_responseable.go new file mode 100644 index 000000000..f2373a331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertCollectionResponseable +type AlertCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Alertable) + SetValue(value []Alertable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_detection.go b/src/internal/connector/graph/betasdk/models/alert_detection.go new file mode 100644 index 000000000..9daff3bef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_detection.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDetection +type AlertDetection 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 detectionType property + detectionType *string + // The method property + method *string + // The name property + name *string + // The OdataType property + odataType *string +} +// NewAlertDetection instantiates a new alertDetection and sets the default values. +func NewAlertDetection()(*AlertDetection) { + m := &AlertDetection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertDetectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertDetectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertDetection(), 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 *AlertDetection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetectionType gets the detectionType property value. The detectionType property +func (m *AlertDetection) GetDetectionType()(*string) { + return m.detectionType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertDetection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectionType(val) + } + return nil + } + res["method"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMethod(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetMethod gets the method property value. The method property +func (m *AlertDetection) GetMethod()(*string) { + return m.method +} +// GetName gets the name property value. The name property +func (m *AlertDetection) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertDetection) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertDetection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detectionType", m.GetDetectionType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("method", m.GetMethod()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertDetection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetectionType sets the detectionType property value. The detectionType property +func (m *AlertDetection) SetDetectionType(value *string)() { + m.detectionType = value +} +// SetMethod sets the method property value. The method property +func (m *AlertDetection) SetMethod(value *string)() { + m.method = value +} +// SetName sets the name property value. The name property +func (m *AlertDetection) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertDetection) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_detection_collection_response.go b/src/internal/connector/graph/betasdk/models/alert_detection_collection_response.go new file mode 100644 index 000000000..dae20f50e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_detection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDetectionCollectionResponse +type AlertDetectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AlertDetectionable +} +// NewAlertDetectionCollectionResponse instantiates a new AlertDetectionCollectionResponse and sets the default values. +func NewAlertDetectionCollectionResponse()(*AlertDetectionCollectionResponse) { + m := &AlertDetectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertDetectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertDetectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertDetectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertDetectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertDetectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertDetectionable, len(val)) + for i, v := range val { + res[i] = v.(AlertDetectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertDetectionCollectionResponse) GetValue()([]AlertDetectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertDetectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertDetectionCollectionResponse) SetValue(value []AlertDetectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_detection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/alert_detection_collection_responseable.go new file mode 100644 index 000000000..c5a3d0524 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_detection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDetectionCollectionResponseable +type AlertDetectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertDetectionable) + SetValue(value []AlertDetectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_detectionable.go b/src/internal/connector/graph/betasdk/models/alert_detectionable.go new file mode 100644 index 000000000..beaf9f0f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_detectionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDetectionable +type AlertDetectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionType()(*string) + GetMethod()(*string) + GetName()(*string) + GetOdataType()(*string) + SetDetectionType(value *string)() + SetMethod(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_feedback.go b/src/internal/connector/graph/betasdk/models/alert_feedback.go new file mode 100644 index 000000000..6f20cdb1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_feedback.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertFeedback int + +const ( + UNKNOWN_ALERTFEEDBACK AlertFeedback = iota + TRUEPOSITIVE_ALERTFEEDBACK + FALSEPOSITIVE_ALERTFEEDBACK + BENIGNPOSITIVE_ALERTFEEDBACK + UNKNOWNFUTUREVALUE_ALERTFEEDBACK +) + +func (i AlertFeedback) String() string { + return []string{"unknown", "truePositive", "falsePositive", "benignPositive", "unknownFutureValue"}[i] +} +func ParseAlertFeedback(v string) (interface{}, error) { + result := UNKNOWN_ALERTFEEDBACK + switch v { + case "unknown": + result = UNKNOWN_ALERTFEEDBACK + case "truePositive": + result = TRUEPOSITIVE_ALERTFEEDBACK + case "falsePositive": + result = FALSEPOSITIVE_ALERTFEEDBACK + case "benignPositive": + result = BENIGNPOSITIVE_ALERTFEEDBACK + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTFEEDBACK + default: + return 0, errors.New("Unknown AlertFeedback value: " + v) + } + return &result, nil +} +func SerializeAlertFeedback(values []AlertFeedback) []string { + 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/alert_history_state.go b/src/internal/connector/graph/betasdk/models/alert_history_state.go new file mode 100644 index 000000000..affd3b10e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_history_state.go @@ -0,0 +1,260 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertHistoryState +type AlertHistoryState 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 Application ID of the calling application that submitted an update (PATCH) to the alert. The appId should be extracted from the auth token and not entered manually by the calling application. + appId *string + // UPN of user the alert was assigned to (note: alert.assignedTo only stores the last value/UPN). + assignedTo *string + // Comment entered by signed-in user. + comments []string + // Analyst feedback on the alert in this update. Possible values are: unknown, truePositive, falsePositive, benignPositive. + feedback *AlertFeedback + // The OdataType property + odataType *string + // Alert status value (if updated). Possible values are: unknown, newAlert, inProgress, resolved, dismissed. + status *AlertStatus + // Date and time of the alert update. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + updatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // UPN of the signed-in user that updated the alert (taken from the bearer token - if in user/delegated auth mode). + user *string +} +// NewAlertHistoryState instantiates a new alertHistoryState and sets the default values. +func NewAlertHistoryState()(*AlertHistoryState) { + m := &AlertHistoryState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertHistoryStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertHistoryStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertHistoryState(), 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 *AlertHistoryState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The Application ID of the calling application that submitted an update (PATCH) to the alert. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *AlertHistoryState) GetAppId()(*string) { + return m.appId +} +// GetAssignedTo gets the assignedTo property value. UPN of user the alert was assigned to (note: alert.assignedTo only stores the last value/UPN). +func (m *AlertHistoryState) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetComments gets the comments property value. Comment entered by signed-in user. +func (m *AlertHistoryState) GetComments()([]string) { + return m.comments +} +// GetFeedback gets the feedback property value. Analyst feedback on the alert in this update. Possible values are: unknown, truePositive, falsePositive, benignPositive. +func (m *AlertHistoryState) GetFeedback()(*AlertFeedback) { + return m.feedback +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertHistoryState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetComments(res) + } + return nil + } + res["feedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertFeedback) + if err != nil { + return err + } + if val != nil { + m.SetFeedback(val.(*AlertFeedback)) + } + 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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AlertStatus)) + } + return nil + } + res["updatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedDateTime(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUser(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertHistoryState) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Alert status value (if updated). Possible values are: unknown, newAlert, inProgress, resolved, dismissed. +func (m *AlertHistoryState) GetStatus()(*AlertStatus) { + return m.status +} +// GetUpdatedDateTime gets the updatedDateTime property value. Date and time of the alert update. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AlertHistoryState) GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedDateTime +} +// GetUser gets the user property value. UPN of the signed-in user that updated the alert (taken from the bearer token - if in user/delegated auth mode). +func (m *AlertHistoryState) GetUser()(*string) { + return m.user +} +// Serialize serializes information the current object +func (m *AlertHistoryState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetComments() != nil { + err := writer.WriteCollectionOfStringValues("comments", m.GetComments()) + if err != nil { + return err + } + } + if m.GetFeedback() != nil { + cast := (*m.GetFeedback()).String() + err := writer.WriteStringValue("feedback", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updatedDateTime", m.GetUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user", m.GetUser()) + 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 *AlertHistoryState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The Application ID of the calling application that submitted an update (PATCH) to the alert. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *AlertHistoryState) SetAppId(value *string)() { + m.appId = value +} +// SetAssignedTo sets the assignedTo property value. UPN of user the alert was assigned to (note: alert.assignedTo only stores the last value/UPN). +func (m *AlertHistoryState) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetComments sets the comments property value. Comment entered by signed-in user. +func (m *AlertHistoryState) SetComments(value []string)() { + m.comments = value +} +// SetFeedback sets the feedback property value. Analyst feedback on the alert in this update. Possible values are: unknown, truePositive, falsePositive, benignPositive. +func (m *AlertHistoryState) SetFeedback(value *AlertFeedback)() { + m.feedback = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertHistoryState) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Alert status value (if updated). Possible values are: unknown, newAlert, inProgress, resolved, dismissed. +func (m *AlertHistoryState) SetStatus(value *AlertStatus)() { + m.status = value +} +// SetUpdatedDateTime sets the updatedDateTime property value. Date and time of the alert update. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AlertHistoryState) SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedDateTime = value +} +// SetUser sets the user property value. UPN of the signed-in user that updated the alert (taken from the bearer token - if in user/delegated auth mode). +func (m *AlertHistoryState) SetUser(value *string)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_history_state_collection_response.go b/src/internal/connector/graph/betasdk/models/alert_history_state_collection_response.go new file mode 100644 index 000000000..72d8b468f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_history_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertHistoryStateCollectionResponse +type AlertHistoryStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AlertHistoryStateable +} +// NewAlertHistoryStateCollectionResponse instantiates a new AlertHistoryStateCollectionResponse and sets the default values. +func NewAlertHistoryStateCollectionResponse()(*AlertHistoryStateCollectionResponse) { + m := &AlertHistoryStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertHistoryStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertHistoryStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertHistoryStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertHistoryStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertHistoryStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertHistoryStateable, len(val)) + for i, v := range val { + res[i] = v.(AlertHistoryStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertHistoryStateCollectionResponse) GetValue()([]AlertHistoryStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertHistoryStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertHistoryStateCollectionResponse) SetValue(value []AlertHistoryStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_history_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/alert_history_state_collection_responseable.go new file mode 100644 index 000000000..d4db50729 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_history_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertHistoryStateCollectionResponseable +type AlertHistoryStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertHistoryStateable) + SetValue(value []AlertHistoryStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_history_stateable.go b/src/internal/connector/graph/betasdk/models/alert_history_stateable.go new file mode 100644 index 000000000..590543992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_history_stateable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertHistoryStateable +type AlertHistoryStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetAssignedTo()(*string) + GetComments()([]string) + GetFeedback()(*AlertFeedback) + GetOdataType()(*string) + GetStatus()(*AlertStatus) + GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUser()(*string) + SetAppId(value *string)() + SetAssignedTo(value *string)() + SetComments(value []string)() + SetFeedback(value *AlertFeedback)() + SetOdataType(value *string)() + SetStatus(value *AlertStatus)() + SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUser(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_severity.go b/src/internal/connector/graph/betasdk/models/alert_severity.go new file mode 100644 index 000000000..38cba51e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_severity.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertSeverity int + +const ( + UNKNOWN_ALERTSEVERITY AlertSeverity = iota + INFORMATIONAL_ALERTSEVERITY + LOW_ALERTSEVERITY + MEDIUM_ALERTSEVERITY + HIGH_ALERTSEVERITY + UNKNOWNFUTUREVALUE_ALERTSEVERITY +) + +func (i AlertSeverity) String() string { + return []string{"unknown", "informational", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParseAlertSeverity(v string) (interface{}, error) { + result := UNKNOWN_ALERTSEVERITY + switch v { + case "unknown": + result = UNKNOWN_ALERTSEVERITY + case "informational": + result = INFORMATIONAL_ALERTSEVERITY + case "low": + result = LOW_ALERTSEVERITY + case "medium": + result = MEDIUM_ALERTSEVERITY + case "high": + result = HIGH_ALERTSEVERITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSEVERITY + default: + return 0, errors.New("Unknown AlertSeverity value: " + v) + } + return &result, nil +} +func SerializeAlertSeverity(values []AlertSeverity) []string { + 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/alert_status.go b/src/internal/connector/graph/betasdk/models/alert_status.go new file mode 100644 index 000000000..8cf28f90a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertStatus int + +const ( + UNKNOWN_ALERTSTATUS AlertStatus = iota + NEWALERT_ALERTSTATUS + INPROGRESS_ALERTSTATUS + RESOLVED_ALERTSTATUS + DISMISSED_ALERTSTATUS + UNKNOWNFUTUREVALUE_ALERTSTATUS +) + +func (i AlertStatus) String() string { + return []string{"unknown", "newAlert", "inProgress", "resolved", "dismissed", "unknownFutureValue"}[i] +} +func ParseAlertStatus(v string) (interface{}, error) { + result := UNKNOWN_ALERTSTATUS + switch v { + case "unknown": + result = UNKNOWN_ALERTSTATUS + case "newAlert": + result = NEWALERT_ALERTSTATUS + case "inProgress": + result = INPROGRESS_ALERTSTATUS + case "resolved": + result = RESOLVED_ALERTSTATUS + case "dismissed": + result = DISMISSED_ALERTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSTATUS + default: + return 0, errors.New("Unknown AlertStatus value: " + v) + } + return &result, nil +} +func SerializeAlertStatus(values []AlertStatus) []string { + 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/alert_trigger.go b/src/internal/connector/graph/betasdk/models/alert_trigger.go new file mode 100644 index 000000000..c28b0d0f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_trigger.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertTrigger +type AlertTrigger struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the property serving as a detection trigger. + name *string + // The OdataType property + odataType *string + // Type of the property in the key:value pair for interpretation. For example, String, Boolean etc. + type_escaped *string + // Value of the property serving as a detection trigger. + value *string +} +// NewAlertTrigger instantiates a new alertTrigger and sets the default values. +func NewAlertTrigger()(*AlertTrigger) { + m := &AlertTrigger{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertTriggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertTriggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertTrigger(), 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 *AlertTrigger) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertTrigger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(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 +} +// GetName gets the name property value. Name of the property serving as a detection trigger. +func (m *AlertTrigger) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertTrigger) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Type of the property in the key:value pair for interpretation. For example, String, Boolean etc. +func (m *AlertTrigger) GetType()(*string) { + return m.type_escaped +} +// GetValue gets the value property value. Value of the property serving as a detection trigger. +func (m *AlertTrigger) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *AlertTrigger) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name of the property serving as a detection trigger. +func (m *AlertTrigger) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertTrigger) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Type of the property in the key:value pair for interpretation. For example, String, Boolean etc. +func (m *AlertTrigger) SetType(value *string)() { + m.type_escaped = value +} +// SetValue sets the value property value. Value of the property serving as a detection trigger. +func (m *AlertTrigger) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_trigger_collection_response.go b/src/internal/connector/graph/betasdk/models/alert_trigger_collection_response.go new file mode 100644 index 000000000..0b6c74a0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_trigger_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertTriggerCollectionResponse +type AlertTriggerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AlertTriggerable +} +// NewAlertTriggerCollectionResponse instantiates a new AlertTriggerCollectionResponse and sets the default values. +func NewAlertTriggerCollectionResponse()(*AlertTriggerCollectionResponse) { + m := &AlertTriggerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertTriggerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertTriggerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertTriggerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertTriggerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertTriggerable, len(val)) + for i, v := range val { + res[i] = v.(AlertTriggerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertTriggerCollectionResponse) GetValue()([]AlertTriggerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertTriggerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertTriggerCollectionResponse) SetValue(value []AlertTriggerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alert_trigger_collection_responseable.go b/src/internal/connector/graph/betasdk/models/alert_trigger_collection_responseable.go new file mode 100644 index 000000000..381aa2a9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_trigger_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertTriggerCollectionResponseable +type AlertTriggerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertTriggerable) + SetValue(value []AlertTriggerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alert_triggerable.go b/src/internal/connector/graph/betasdk/models/alert_triggerable.go new file mode 100644 index 000000000..cfedd4600 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alert_triggerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertTriggerable +type AlertTriggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetType()(*string) + GetValue()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/alertable.go b/src/internal/connector/graph/betasdk/models/alertable.go new file mode 100644 index 000000000..4c64be9dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alertable.go @@ -0,0 +1,90 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Alertable +type Alertable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityGroupName()(*string) + GetAlertDetections()([]AlertDetectionable) + GetAssignedTo()(*string) + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetCategory()(*string) + GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCloudAppStates()([]CloudAppSecurityStateable) + GetComments()([]string) + GetConfidence()(*int32) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDetectionIds()([]string) + GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFeedback()(*AlertFeedback) + GetFileStates()([]FileSecurityStateable) + GetHistoryStates()([]AlertHistoryStateable) + GetHostStates()([]HostSecurityStateable) + GetIncidentIds()([]string) + GetInvestigationSecurityStates()([]InvestigationSecurityStateable) + GetLastEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMalwareStates()([]MalwareStateable) + GetMessageSecurityStates()([]MessageSecurityStateable) + GetNetworkConnections()([]NetworkConnectionable) + GetProcesses()([]Processable) + GetRecommendedActions()([]string) + GetRegistryKeyStates()([]RegistryKeyStateable) + GetSecurityResources()([]SecurityResourceable) + GetSeverity()(*AlertSeverity) + GetSourceMaterials()([]string) + GetStatus()(*AlertStatus) + GetTags()([]string) + GetTitle()(*string) + GetTriggers()([]AlertTriggerable) + GetUriClickSecurityStates()([]UriClickSecurityStateable) + GetUserStates()([]UserSecurityStateable) + GetVendorInformation()(SecurityVendorInformationable) + GetVulnerabilityStates()([]VulnerabilityStateable) + SetActivityGroupName(value *string)() + SetAlertDetections(value []AlertDetectionable)() + SetAssignedTo(value *string)() + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetCategory(value *string)() + SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCloudAppStates(value []CloudAppSecurityStateable)() + SetComments(value []string)() + SetConfidence(value *int32)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDetectionIds(value []string)() + SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFeedback(value *AlertFeedback)() + SetFileStates(value []FileSecurityStateable)() + SetHistoryStates(value []AlertHistoryStateable)() + SetHostStates(value []HostSecurityStateable)() + SetIncidentIds(value []string)() + SetInvestigationSecurityStates(value []InvestigationSecurityStateable)() + SetLastEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMalwareStates(value []MalwareStateable)() + SetMessageSecurityStates(value []MessageSecurityStateable)() + SetNetworkConnections(value []NetworkConnectionable)() + SetProcesses(value []Processable)() + SetRecommendedActions(value []string)() + SetRegistryKeyStates(value []RegistryKeyStateable)() + SetSecurityResources(value []SecurityResourceable)() + SetSeverity(value *AlertSeverity)() + SetSourceMaterials(value []string)() + SetStatus(value *AlertStatus)() + SetTags(value []string)() + SetTitle(value *string)() + SetTriggers(value []AlertTriggerable)() + SetUriClickSecurityStates(value []UriClickSecurityStateable)() + SetUserStates(value []UserSecurityStateable)() + SetVendorInformation(value SecurityVendorInformationable)() + SetVulnerabilityStates(value []VulnerabilityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alignment.go b/src/internal/connector/graph/betasdk/models/alignment.go new file mode 100644 index 000000000..bb598369b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alignment.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Alignment int + +const ( + LEFT_ALIGNMENT Alignment = iota + RIGHT_ALIGNMENT + CENTER_ALIGNMENT +) + +func (i Alignment) String() string { + return []string{"left", "right", "center"}[i] +} +func ParseAlignment(v string) (interface{}, error) { + result := LEFT_ALIGNMENT + switch v { + case "left": + result = LEFT_ALIGNMENT + case "right": + result = RIGHT_ALIGNMENT + case "center": + result = CENTER_ALIGNMENT + default: + return 0, errors.New("Unknown Alignment value: " + v) + } + return &result, nil +} +func SerializeAlignment(values []Alignment) []string { + 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/all_devices_assignment_target.go b/src/internal/connector/graph/betasdk/models/all_devices_assignment_target.go new file mode 100644 index 000000000..3a3df060b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/all_devices_assignment_target.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllDevicesAssignmentTarget +type AllDevicesAssignmentTarget struct { + DeviceAndAppManagementAssignmentTarget +} +// NewAllDevicesAssignmentTarget instantiates a new AllDevicesAssignmentTarget and sets the default values. +func NewAllDevicesAssignmentTarget()(*AllDevicesAssignmentTarget) { + m := &AllDevicesAssignmentTarget{ + DeviceAndAppManagementAssignmentTarget: *NewDeviceAndAppManagementAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.allDevicesAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAllDevicesAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllDevicesAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllDevicesAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllDevicesAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAndAppManagementAssignmentTarget.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AllDevicesAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAndAppManagementAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/all_devices_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/all_devices_assignment_targetable.go new file mode 100644 index 000000000..51d054f1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/all_devices_assignment_targetable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllDevicesAssignmentTargetable +type AllDevicesAssignmentTargetable interface { + DeviceAndAppManagementAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_target.go b/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_target.go new file mode 100644 index 000000000..311a9f41b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_target.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllLicensedUsersAssignmentTarget +type AllLicensedUsersAssignmentTarget struct { + DeviceAndAppManagementAssignmentTarget +} +// NewAllLicensedUsersAssignmentTarget instantiates a new AllLicensedUsersAssignmentTarget and sets the default values. +func NewAllLicensedUsersAssignmentTarget()(*AllLicensedUsersAssignmentTarget) { + m := &AllLicensedUsersAssignmentTarget{ + DeviceAndAppManagementAssignmentTarget: *NewDeviceAndAppManagementAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.allLicensedUsersAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAllLicensedUsersAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllLicensedUsersAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllLicensedUsersAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllLicensedUsersAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAndAppManagementAssignmentTarget.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AllLicensedUsersAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAndAppManagementAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_targetable.go new file mode 100644 index 000000000..853b6643a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/all_licensed_users_assignment_targetable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllLicensedUsersAssignmentTargetable +type AllLicensedUsersAssignmentTargetable interface { + DeviceAndAppManagementAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/allow_invites_from.go b/src/internal/connector/graph/betasdk/models/allow_invites_from.go new file mode 100644 index 000000000..90b02994d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allow_invites_from.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AllowInvitesFrom int + +const ( + NONE_ALLOWINVITESFROM AllowInvitesFrom = iota + ADMINSANDGUESTINVITERS_ALLOWINVITESFROM + ADMINSGUESTINVITERSANDALLMEMBERS_ALLOWINVITESFROM + EVERYONE_ALLOWINVITESFROM + UNKNOWNFUTUREVALUE_ALLOWINVITESFROM +) + +func (i AllowInvitesFrom) String() string { + return []string{"none", "adminsAndGuestInviters", "adminsGuestInvitersAndAllMembers", "everyone", "unknownFutureValue"}[i] +} +func ParseAllowInvitesFrom(v string) (interface{}, error) { + result := NONE_ALLOWINVITESFROM + switch v { + case "none": + result = NONE_ALLOWINVITESFROM + case "adminsAndGuestInviters": + result = ADMINSANDGUESTINVITERS_ALLOWINVITESFROM + case "adminsGuestInvitersAndAllMembers": + result = ADMINSGUESTINVITERSANDALLMEMBERS_ALLOWINVITESFROM + case "everyone": + result = EVERYONE_ALLOWINVITESFROM + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALLOWINVITESFROM + default: + return 0, errors.New("Unknown AllowInvitesFrom value: " + v) + } + return &result, nil +} +func SerializeAllowInvitesFrom(values []AllowInvitesFrom) []string { + 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/allowed_audiences.go b/src/internal/connector/graph/betasdk/models/allowed_audiences.go new file mode 100644 index 000000000..01a17d08d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_audiences.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AllowedAudiences int + +const ( + ME_ALLOWEDAUDIENCES AllowedAudiences = iota + FAMILY_ALLOWEDAUDIENCES + CONTACTS_ALLOWEDAUDIENCES + GROUPMEMBERS_ALLOWEDAUDIENCES + ORGANIZATION_ALLOWEDAUDIENCES + FEDERATEDORGANIZATIONS_ALLOWEDAUDIENCES + EVERYONE_ALLOWEDAUDIENCES + UNKNOWNFUTUREVALUE_ALLOWEDAUDIENCES +) + +func (i AllowedAudiences) String() string { + return []string{"me", "family", "contacts", "groupMembers", "organization", "federatedOrganizations", "everyone", "unknownFutureValue"}[i] +} +func ParseAllowedAudiences(v string) (interface{}, error) { + result := ME_ALLOWEDAUDIENCES + switch v { + case "me": + result = ME_ALLOWEDAUDIENCES + case "family": + result = FAMILY_ALLOWEDAUDIENCES + case "contacts": + result = CONTACTS_ALLOWEDAUDIENCES + case "groupMembers": + result = GROUPMEMBERS_ALLOWEDAUDIENCES + case "organization": + result = ORGANIZATION_ALLOWEDAUDIENCES + case "federatedOrganizations": + result = FEDERATEDORGANIZATIONS_ALLOWEDAUDIENCES + case "everyone": + result = EVERYONE_ALLOWEDAUDIENCES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALLOWEDAUDIENCES + default: + return 0, errors.New("Unknown AllowedAudiences value: " + v) + } + return &result, nil +} +func SerializeAllowedAudiences(values []AllowedAudiences) []string { + 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/allowed_data_location.go b/src/internal/connector/graph/betasdk/models/allowed_data_location.go new file mode 100644 index 000000000..36447e54c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_data_location.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedDataLocation +type AllowedDataLocation struct { + Entity + // The appId property + appId *string + // The domain property + domain *string + // The isDefault property + isDefault *bool + // The location property + location *string +} +// NewAllowedDataLocation instantiates a new AllowedDataLocation and sets the default values. +func NewAllowedDataLocation()(*AllowedDataLocation) { + m := &AllowedDataLocation{ + Entity: *NewEntity(), + } + return m +} +// CreateAllowedDataLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllowedDataLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllowedDataLocation(), nil +} +// GetAppId gets the appId property value. The appId property +func (m *AllowedDataLocation) GetAppId()(*string) { + return m.appId +} +// GetDomain gets the domain property value. The domain property +func (m *AllowedDataLocation) GetDomain()(*string) { + return m.domain +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllowedDataLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["domain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomain(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. The isDefault property +func (m *AllowedDataLocation) GetIsDefault()(*bool) { + return m.isDefault +} +// GetLocation gets the location property value. The location property +func (m *AllowedDataLocation) GetLocation()(*string) { + return m.location +} +// Serialize serializes information the current object +func (m *AllowedDataLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domain", m.GetDomain()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. The appId property +func (m *AllowedDataLocation) SetAppId(value *string)() { + m.appId = value +} +// SetDomain sets the domain property value. The domain property +func (m *AllowedDataLocation) SetDomain(value *string)() { + m.domain = value +} +// SetIsDefault sets the isDefault property value. The isDefault property +func (m *AllowedDataLocation) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetLocation sets the location property value. The location property +func (m *AllowedDataLocation) SetLocation(value *string)() { + m.location = value +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_response.go b/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_response.go new file mode 100644 index 000000000..6203908c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedDataLocationCollectionResponse +type AllowedDataLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AllowedDataLocationable +} +// NewAllowedDataLocationCollectionResponse instantiates a new AllowedDataLocationCollectionResponse and sets the default values. +func NewAllowedDataLocationCollectionResponse()(*AllowedDataLocationCollectionResponse) { + m := &AllowedDataLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAllowedDataLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllowedDataLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllowedDataLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllowedDataLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAllowedDataLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AllowedDataLocationable, len(val)) + for i, v := range val { + res[i] = v.(AllowedDataLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AllowedDataLocationCollectionResponse) GetValue()([]AllowedDataLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AllowedDataLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AllowedDataLocationCollectionResponse) SetValue(value []AllowedDataLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_responseable.go new file mode 100644 index 000000000..c1b864bd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_data_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedDataLocationCollectionResponseable +type AllowedDataLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AllowedDataLocationable) + SetValue(value []AllowedDataLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_data_locationable.go b/src/internal/connector/graph/betasdk/models/allowed_data_locationable.go new file mode 100644 index 000000000..b2a4ca879 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_data_locationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedDataLocationable +type AllowedDataLocationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetDomain()(*string) + GetIsDefault()(*bool) + GetLocation()(*string) + SetAppId(value *string)() + SetDomain(value *string)() + SetIsDefault(value *bool)() + SetLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_value.go b/src/internal/connector/graph/betasdk/models/allowed_value.go new file mode 100644 index 000000000..56ae2c2cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_value.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedValue provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AllowedValue struct { + Entity + // Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. + isActive *bool +} +// NewAllowedValue instantiates a new allowedValue and sets the default values. +func NewAllowedValue()(*AllowedValue) { + m := &AllowedValue{ + Entity: *NewEntity(), + } + return m +} +// CreateAllowedValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllowedValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllowedValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllowedValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + return res +} +// GetIsActive gets the isActive property value. Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. +func (m *AllowedValue) GetIsActive()(*bool) { + return m.isActive +} +// Serialize serializes information the current object +func (m *AllowedValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + return nil +} +// SetIsActive sets the isActive property value. Indicates whether the predefined value is active or deactivated. If set to false, this predefined value cannot be assigned to any additional supported directory objects. +func (m *AllowedValue) SetIsActive(value *bool)() { + m.isActive = value +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_value_collection_response.go b/src/internal/connector/graph/betasdk/models/allowed_value_collection_response.go new file mode 100644 index 000000000..1f6139b65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedValueCollectionResponse +type AllowedValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AllowedValueable +} +// NewAllowedValueCollectionResponse instantiates a new AllowedValueCollectionResponse and sets the default values. +func NewAllowedValueCollectionResponse()(*AllowedValueCollectionResponse) { + m := &AllowedValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAllowedValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAllowedValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAllowedValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AllowedValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAllowedValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AllowedValueable, len(val)) + for i, v := range val { + res[i] = v.(AllowedValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AllowedValueCollectionResponse) GetValue()([]AllowedValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *AllowedValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AllowedValueCollectionResponse) SetValue(value []AllowedValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/allowed_value_collection_responseable.go new file mode 100644 index 000000000..3132f550b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedValueCollectionResponseable +type AllowedValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AllowedValueable) + SetValue(value []AllowedValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/allowed_valueable.go b/src/internal/connector/graph/betasdk/models/allowed_valueable.go new file mode 100644 index 000000000..cde7ca602 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/allowed_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AllowedValueable +type AllowedValueable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsActive()(*bool) + SetIsActive(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/altered_query_token.go b/src/internal/connector/graph/betasdk/models/altered_query_token.go new file mode 100644 index 000000000..879b4aae1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/altered_query_token.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlteredQueryToken +type AlteredQueryToken struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines the length of a changed segment. + length *int32 + // The OdataType property + odataType *string + // Defines the offset of a changed segment. + offset *int32 + // Represents the corrected segment string. + suggestion *string +} +// NewAlteredQueryToken instantiates a new alteredQueryToken and sets the default values. +func NewAlteredQueryToken()(*AlteredQueryToken) { + m := &AlteredQueryToken{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlteredQueryTokenFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlteredQueryTokenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlteredQueryToken(), 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 *AlteredQueryToken) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlteredQueryToken) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + res["suggestion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSuggestion(val) + } + return nil + } + return res +} +// GetLength gets the length property value. Defines the length of a changed segment. +func (m *AlteredQueryToken) GetLength()(*int32) { + return m.length +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlteredQueryToken) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. Defines the offset of a changed segment. +func (m *AlteredQueryToken) GetOffset()(*int32) { + return m.offset +} +// GetSuggestion gets the suggestion property value. Represents the corrected segment string. +func (m *AlteredQueryToken) GetSuggestion()(*string) { + return m.suggestion +} +// Serialize serializes information the current object +func (m *AlteredQueryToken) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("offset", m.GetOffset()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("suggestion", m.GetSuggestion()) + 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 *AlteredQueryToken) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLength sets the length property value. Defines the length of a changed segment. +func (m *AlteredQueryToken) SetLength(value *int32)() { + m.length = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlteredQueryToken) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. Defines the offset of a changed segment. +func (m *AlteredQueryToken) SetOffset(value *int32)() { + m.offset = value +} +// SetSuggestion sets the suggestion property value. Represents the corrected segment string. +func (m *AlteredQueryToken) SetSuggestion(value *string)() { + m.suggestion = value +} diff --git a/src/internal/connector/graph/betasdk/models/altered_query_token_collection_response.go b/src/internal/connector/graph/betasdk/models/altered_query_token_collection_response.go new file mode 100644 index 000000000..ea9eb37eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/altered_query_token_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlteredQueryTokenCollectionResponse +type AlteredQueryTokenCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AlteredQueryTokenable +} +// NewAlteredQueryTokenCollectionResponse instantiates a new AlteredQueryTokenCollectionResponse and sets the default values. +func NewAlteredQueryTokenCollectionResponse()(*AlteredQueryTokenCollectionResponse) { + m := &AlteredQueryTokenCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlteredQueryTokenCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlteredQueryTokenCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlteredQueryTokenCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlteredQueryTokenCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlteredQueryTokenFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlteredQueryTokenable, len(val)) + for i, v := range val { + res[i] = v.(AlteredQueryTokenable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlteredQueryTokenCollectionResponse) GetValue()([]AlteredQueryTokenable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlteredQueryTokenCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlteredQueryTokenCollectionResponse) SetValue(value []AlteredQueryTokenable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/altered_query_token_collection_responseable.go b/src/internal/connector/graph/betasdk/models/altered_query_token_collection_responseable.go new file mode 100644 index 000000000..68d0d66f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/altered_query_token_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlteredQueryTokenCollectionResponseable +type AlteredQueryTokenCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlteredQueryTokenable) + SetValue(value []AlteredQueryTokenable)() +} diff --git a/src/internal/connector/graph/betasdk/models/altered_query_tokenable.go b/src/internal/connector/graph/betasdk/models/altered_query_tokenable.go new file mode 100644 index 000000000..186af8cc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/altered_query_tokenable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlteredQueryTokenable +type AlteredQueryTokenable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLength()(*int32) + GetOdataType()(*string) + GetOffset()(*int32) + GetSuggestion()(*string) + SetLength(value *int32)() + SetOdataType(value *string)() + SetOffset(value *int32)() + SetSuggestion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_security.go b/src/internal/connector/graph/betasdk/models/alternative_security.go new file mode 100644 index 000000000..4ca59fde7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_security.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurity +type AlternativeSecurity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // For internal use only + identityProvider *string + // For internal use only + key []byte + // The OdataType property + odataType *string + // For internal use only + type_escaped *int32 +} +// NewAlternativeSecurity instantiates a new AlternativeSecurity and sets the default values. +func NewAlternativeSecurity()(*AlternativeSecurity) { + m := &AlternativeSecurity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlternativeSecurityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlternativeSecurityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlternativeSecurity(), 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 *AlternativeSecurity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlternativeSecurity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["identityProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityProvider(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetIdentityProvider gets the identityProvider property value. For internal use only +func (m *AlternativeSecurity) GetIdentityProvider()(*string) { + return m.identityProvider +} +// GetKey gets the key property value. For internal use only +func (m *AlternativeSecurity) GetKey()([]byte) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlternativeSecurity) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. For internal use only +func (m *AlternativeSecurity) GetType()(*int32) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AlternativeSecurity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("identityProvider", m.GetIdentityProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("type", m.GetType()) + 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 *AlternativeSecurity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdentityProvider sets the identityProvider property value. For internal use only +func (m *AlternativeSecurity) SetIdentityProvider(value *string)() { + m.identityProvider = value +} +// SetKey sets the key property value. For internal use only +func (m *AlternativeSecurity) SetKey(value []byte)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlternativeSecurity) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. For internal use only +func (m *AlternativeSecurity) SetType(value *int32)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_security_id.go b/src/internal/connector/graph/betasdk/models/alternative_security_id.go new file mode 100644 index 000000000..38b513dea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_security_id.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurityId +type AlternativeSecurityId struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // For internal use only + identityProvider *string + // For internal use only + key []byte + // The OdataType property + odataType *string + // For internal use only + type_escaped *int32 +} +// NewAlternativeSecurityId instantiates a new alternativeSecurityId and sets the default values. +func NewAlternativeSecurityId()(*AlternativeSecurityId) { + m := &AlternativeSecurityId{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlternativeSecurityIdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlternativeSecurityIdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlternativeSecurityId(), 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 *AlternativeSecurityId) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlternativeSecurityId) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["identityProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityProvider(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetIdentityProvider gets the identityProvider property value. For internal use only +func (m *AlternativeSecurityId) GetIdentityProvider()(*string) { + return m.identityProvider +} +// GetKey gets the key property value. For internal use only +func (m *AlternativeSecurityId) GetKey()([]byte) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlternativeSecurityId) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. For internal use only +func (m *AlternativeSecurityId) GetType()(*int32) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AlternativeSecurityId) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("identityProvider", m.GetIdentityProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("type", m.GetType()) + 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 *AlternativeSecurityId) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdentityProvider sets the identityProvider property value. For internal use only +func (m *AlternativeSecurityId) SetIdentityProvider(value *string)() { + m.identityProvider = value +} +// SetKey sets the key property value. For internal use only +func (m *AlternativeSecurityId) SetKey(value []byte)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlternativeSecurityId) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. For internal use only +func (m *AlternativeSecurityId) SetType(value *int32)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_response.go b/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_response.go new file mode 100644 index 000000000..469e3195d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurityIdCollectionResponse +type AlternativeSecurityIdCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AlternativeSecurityIdable +} +// NewAlternativeSecurityIdCollectionResponse instantiates a new AlternativeSecurityIdCollectionResponse and sets the default values. +func NewAlternativeSecurityIdCollectionResponse()(*AlternativeSecurityIdCollectionResponse) { + m := &AlternativeSecurityIdCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlternativeSecurityIdCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlternativeSecurityIdCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlternativeSecurityIdCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlternativeSecurityIdCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlternativeSecurityIdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlternativeSecurityIdable, len(val)) + for i, v := range val { + res[i] = v.(AlternativeSecurityIdable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlternativeSecurityIdCollectionResponse) GetValue()([]AlternativeSecurityIdable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlternativeSecurityIdCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlternativeSecurityIdCollectionResponse) SetValue(value []AlternativeSecurityIdable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_responseable.go b/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_responseable.go new file mode 100644 index 000000000..454ed0d7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_security_id_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurityIdCollectionResponseable +type AlternativeSecurityIdCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlternativeSecurityIdable) + SetValue(value []AlternativeSecurityIdable)() +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_security_idable.go b/src/internal/connector/graph/betasdk/models/alternative_security_idable.go new file mode 100644 index 000000000..296714ad4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_security_idable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurityIdable +type AlternativeSecurityIdable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityProvider()(*string) + GetKey()([]byte) + GetOdataType()(*string) + GetType()(*int32) + SetIdentityProvider(value *string)() + SetKey(value []byte)() + SetOdataType(value *string)() + SetType(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/alternative_securityable.go b/src/internal/connector/graph/betasdk/models/alternative_securityable.go new file mode 100644 index 000000000..3f4b96b5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/alternative_securityable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlternativeSecurityable +type AlternativeSecurityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityProvider()(*string) + GetKey()([]byte) + GetOdataType()(*string) + GetType()(*int32) + SetIdentityProvider(value *string)() + SetKey(value []byte)() + SetOdataType(value *string)() + SetType(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/analytics_activity_type.go b/src/internal/connector/graph/betasdk/models/analytics_activity_type.go new file mode 100644 index 000000000..6091600f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/analytics_activity_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AnalyticsActivityType int + +const ( + EMAIL_ANALYTICSACTIVITYTYPE AnalyticsActivityType = iota + MEETING_ANALYTICSACTIVITYTYPE + FOCUS_ANALYTICSACTIVITYTYPE + CHAT_ANALYTICSACTIVITYTYPE + CALL_ANALYTICSACTIVITYTYPE +) + +func (i AnalyticsActivityType) String() string { + return []string{"Email", "Meeting", "Focus", "Chat", "Call"}[i] +} +func ParseAnalyticsActivityType(v string) (interface{}, error) { + result := EMAIL_ANALYTICSACTIVITYTYPE + switch v { + case "Email": + result = EMAIL_ANALYTICSACTIVITYTYPE + case "Meeting": + result = MEETING_ANALYTICSACTIVITYTYPE + case "Focus": + result = FOCUS_ANALYTICSACTIVITYTYPE + case "Chat": + result = CHAT_ANALYTICSACTIVITYTYPE + case "Call": + result = CALL_ANALYTICSACTIVITYTYPE + default: + return 0, errors.New("Unknown AnalyticsActivityType value: " + v) + } + return &result, nil +} +func SerializeAnalyticsActivityType(values []AnalyticsActivityType) []string { + 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/android_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base.go new file mode 100644 index 000000000..338942127 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCertificateProfileBase +type AndroidCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + rootCertificate AndroidTrustedRootCertificateable + // Subject Alternative Name Options. + subjectAlternativeNameType *SubjectAlternativeNameType + // Subject Name Format Options. + subjectNameFormat *SubjectNameFormat +} +// NewAndroidCertificateProfileBase instantiates a new AndroidCertificateProfileBase and sets the default values. +func NewAndroidCertificateProfileBase()(*AndroidCertificateProfileBase) { + m := &AndroidCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkImportedPFXCertificateProfile": + return NewAndroidForWorkImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidImportedPFXCertificateProfile": + return NewAndroidImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidPkcsCertificateProfile": + return NewAndroidPkcsCertificateProfile(), nil + case "#microsoft.graph.androidScepCertificateProfile": + return NewAndroidScepCertificateProfile(), nil + } + } + } + } + return NewAndroidCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidCertificateProfileBase) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(AndroidTrustedRootCertificateable)) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidCertificateProfileBase) GetRootCertificate()(AndroidTrustedRootCertificateable) { + return m.rootCertificate +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Subject Alternative Name Options. +func (m *AndroidCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidCertificateProfileBase) GetSubjectNameFormat()(*SubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *AndroidCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidCertificateProfileBase) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidCertificateProfileBase) SetRootCertificate(value AndroidTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Subject Alternative Name Options. +func (m *AndroidCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidCertificateProfileBase) SetSubjectNameFormat(value *SubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..127c08b6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCertificateProfileBaseCollectionResponse +type AndroidCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidCertificateProfileBaseable +} +// NewAndroidCertificateProfileBaseCollectionResponse instantiates a new AndroidCertificateProfileBaseCollectionResponse and sets the default values. +func NewAndroidCertificateProfileBaseCollectionResponse()(*AndroidCertificateProfileBaseCollectionResponse) { + m := &AndroidCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidCertificateProfileBaseCollectionResponse) GetValue()([]AndroidCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidCertificateProfileBaseCollectionResponse) SetValue(value []AndroidCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..fa8087e14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCertificateProfileBaseCollectionResponseable +type AndroidCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidCertificateProfileBaseable) + SetValue(value []AndroidCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_certificate_profile_baseable.go new file mode 100644 index 000000000..5cca44d5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_certificate_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCertificateProfileBaseable +type AndroidCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetRenewalThresholdPercentage()(*int32) + GetRootCertificate()(AndroidTrustedRootCertificateable) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*SubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetRenewalThresholdPercentage(value *int32)() + SetRootCertificate(value AndroidTrustedRootCertificateable)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *SubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_compliance_policy.go b/src/internal/connector/graph/betasdk/models/android_compliance_policy.go new file mode 100644 index 000000000..926eb0c1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_compliance_policy.go @@ -0,0 +1,750 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCompliancePolicy +type AndroidCompliancePolicy struct { + DeviceCompliancePolicy + // Device threat protection levels for the Device Threat Protection API. + advancedThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Condition statement id. + conditionStatementId *string + // Require that devices have enabled device threat protection. + deviceThreatProtectionEnabled *bool + // Device threat protection levels for the Device Threat Protection API. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Minimum Android security patch level. + minAndroidSecurityPatchLevel *string + // Maximum Android version. + osMaximumVersion *string + // Minimum Android version. + osMinimumVersion *string + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum password length. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Number of previous passwords to block. Valid values 1 to 24 + passwordPreviousPasswordBlockCount *int32 + // Require a password to unlock device. + passwordRequired *bool + // Android required password type. + passwordRequiredType *AndroidRequiredPasswordType + // Number of sign-in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. + restrictedApps []AppListItemable + // Block device administrator managed devices. + securityBlockDeviceAdministratorManagedDevices *bool + // Devices must not be jailbroken or rooted. + securityBlockJailbrokenDevices *bool + // Disable USB debugging on Android devices. + securityDisableUsbDebugging *bool + // Require that devices disallow installation of apps from unknown sources. + securityPreventInstallAppsFromUnknownSources *bool + // Require the device to pass the Company Portal client app runtime integrity check. + securityRequireCompanyPortalAppIntegrity *bool + // Require Google Play Services to be installed and enabled on the device. + securityRequireGooglePlayServices *bool + // Require the device to pass the SafetyNet basic integrity check. + securityRequireSafetyNetAttestationBasicIntegrity *bool + // Require the device to pass the SafetyNet certified device check. + securityRequireSafetyNetAttestationCertifiedDevice *bool + // Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. + securityRequireUpToDateSecurityProviders *bool + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Require encryption on Android devices. + storageRequireEncryption *bool +} +// NewAndroidCompliancePolicy instantiates a new AndroidCompliancePolicy and sets the default values. +func NewAndroidCompliancePolicy()(*AndroidCompliancePolicy) { + m := &AndroidCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.androidCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidCompliancePolicy(), nil +} +// GetAdvancedThreatProtectionRequiredSecurityLevel gets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidCompliancePolicy) GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.advancedThreatProtectionRequiredSecurityLevel +} +// GetConditionStatementId gets the conditionStatementId property value. Condition statement id. +func (m *AndroidCompliancePolicy) GetConditionStatementId()(*string) { + return m.conditionStatementId +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["advancedThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["conditionStatementId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConditionStatementId(val) + } + return nil + } + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["minAndroidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinAndroidSecurityPatchLevel(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["restrictedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetRestrictedApps(res) + } + return nil + } + res["securityBlockDeviceAdministratorManagedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockDeviceAdministratorManagedDevices(val) + } + return nil + } + res["securityBlockJailbrokenDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockJailbrokenDevices(val) + } + return nil + } + res["securityDisableUsbDebugging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDisableUsbDebugging(val) + } + return nil + } + res["securityPreventInstallAppsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityPreventInstallAppsFromUnknownSources(val) + } + return nil + } + res["securityRequireCompanyPortalAppIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireCompanyPortalAppIntegrity(val) + } + return nil + } + res["securityRequireGooglePlayServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireGooglePlayServices(val) + } + return nil + } + res["securityRequireSafetyNetAttestationBasicIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationBasicIntegrity(val) + } + return nil + } + res["securityRequireSafetyNetAttestationCertifiedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationCertifiedDevice(val) + } + return nil + } + res["securityRequireUpToDateSecurityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireUpToDateSecurityProviders(val) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + return res +} +// GetMinAndroidSecurityPatchLevel gets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidCompliancePolicy) GetMinAndroidSecurityPatchLevel()(*string) { + return m.minAndroidSecurityPatchLevel +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidCompliancePolicy) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidCompliancePolicy) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android required password type. +func (m *AndroidCompliancePolicy) GetPasswordRequiredType()(*AndroidRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidCompliancePolicy) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidCompliancePolicy) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetRestrictedApps gets the restrictedApps property value. Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. +func (m *AndroidCompliancePolicy) GetRestrictedApps()([]AppListItemable) { + return m.restrictedApps +} +// GetSecurityBlockDeviceAdministratorManagedDevices gets the securityBlockDeviceAdministratorManagedDevices property value. Block device administrator managed devices. +func (m *AndroidCompliancePolicy) GetSecurityBlockDeviceAdministratorManagedDevices()(*bool) { + return m.securityBlockDeviceAdministratorManagedDevices +} +// GetSecurityBlockJailbrokenDevices gets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidCompliancePolicy) GetSecurityBlockJailbrokenDevices()(*bool) { + return m.securityBlockJailbrokenDevices +} +// GetSecurityDisableUsbDebugging gets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidCompliancePolicy) GetSecurityDisableUsbDebugging()(*bool) { + return m.securityDisableUsbDebugging +} +// GetSecurityPreventInstallAppsFromUnknownSources gets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidCompliancePolicy) GetSecurityPreventInstallAppsFromUnknownSources()(*bool) { + return m.securityPreventInstallAppsFromUnknownSources +} +// GetSecurityRequireCompanyPortalAppIntegrity gets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidCompliancePolicy) GetSecurityRequireCompanyPortalAppIntegrity()(*bool) { + return m.securityRequireCompanyPortalAppIntegrity +} +// GetSecurityRequireGooglePlayServices gets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidCompliancePolicy) GetSecurityRequireGooglePlayServices()(*bool) { + return m.securityRequireGooglePlayServices +} +// GetSecurityRequireSafetyNetAttestationBasicIntegrity gets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidCompliancePolicy) GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) { + return m.securityRequireSafetyNetAttestationBasicIntegrity +} +// GetSecurityRequireSafetyNetAttestationCertifiedDevice gets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidCompliancePolicy) GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) { + return m.securityRequireSafetyNetAttestationCertifiedDevice +} +// GetSecurityRequireUpToDateSecurityProviders gets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidCompliancePolicy) GetSecurityRequireUpToDateSecurityProviders()(*bool) { + return m.securityRequireUpToDateSecurityProviders +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidCompliancePolicy) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// Serialize serializes information the current object +func (m *AndroidCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetAdvancedThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("advancedThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conditionStatementId", m.GetConditionStatementId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minAndroidSecurityPatchLevel", m.GetMinAndroidSecurityPatchLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + if m.GetRestrictedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRestrictedApps())) + for i, v := range m.GetRestrictedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("restrictedApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockDeviceAdministratorManagedDevices", m.GetSecurityBlockDeviceAdministratorManagedDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockJailbrokenDevices", m.GetSecurityBlockJailbrokenDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDisableUsbDebugging", m.GetSecurityDisableUsbDebugging()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityPreventInstallAppsFromUnknownSources", m.GetSecurityPreventInstallAppsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireCompanyPortalAppIntegrity", m.GetSecurityRequireCompanyPortalAppIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireGooglePlayServices", m.GetSecurityRequireGooglePlayServices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationBasicIntegrity", m.GetSecurityRequireSafetyNetAttestationBasicIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationCertifiedDevice", m.GetSecurityRequireSafetyNetAttestationCertifiedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireUpToDateSecurityProviders", m.GetSecurityRequireUpToDateSecurityProviders()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionRequiredSecurityLevel sets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidCompliancePolicy) SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.advancedThreatProtectionRequiredSecurityLevel = value +} +// SetConditionStatementId sets the conditionStatementId property value. Condition statement id. +func (m *AndroidCompliancePolicy) SetConditionStatementId(value *string)() { + m.conditionStatementId = value +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetMinAndroidSecurityPatchLevel sets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidCompliancePolicy) SetMinAndroidSecurityPatchLevel(value *string)() { + m.minAndroidSecurityPatchLevel = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidCompliancePolicy) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidCompliancePolicy) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android required password type. +func (m *AndroidCompliancePolicy) SetPasswordRequiredType(value *AndroidRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidCompliancePolicy) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidCompliancePolicy) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetRestrictedApps sets the restrictedApps property value. Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. +func (m *AndroidCompliancePolicy) SetRestrictedApps(value []AppListItemable)() { + m.restrictedApps = value +} +// SetSecurityBlockDeviceAdministratorManagedDevices sets the securityBlockDeviceAdministratorManagedDevices property value. Block device administrator managed devices. +func (m *AndroidCompliancePolicy) SetSecurityBlockDeviceAdministratorManagedDevices(value *bool)() { + m.securityBlockDeviceAdministratorManagedDevices = value +} +// SetSecurityBlockJailbrokenDevices sets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidCompliancePolicy) SetSecurityBlockJailbrokenDevices(value *bool)() { + m.securityBlockJailbrokenDevices = value +} +// SetSecurityDisableUsbDebugging sets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidCompliancePolicy) SetSecurityDisableUsbDebugging(value *bool)() { + m.securityDisableUsbDebugging = value +} +// SetSecurityPreventInstallAppsFromUnknownSources sets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidCompliancePolicy) SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() { + m.securityPreventInstallAppsFromUnknownSources = value +} +// SetSecurityRequireCompanyPortalAppIntegrity sets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidCompliancePolicy) SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() { + m.securityRequireCompanyPortalAppIntegrity = value +} +// SetSecurityRequireGooglePlayServices sets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidCompliancePolicy) SetSecurityRequireGooglePlayServices(value *bool)() { + m.securityRequireGooglePlayServices = value +} +// SetSecurityRequireSafetyNetAttestationBasicIntegrity sets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidCompliancePolicy) SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() { + m.securityRequireSafetyNetAttestationBasicIntegrity = value +} +// SetSecurityRequireSafetyNetAttestationCertifiedDevice sets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidCompliancePolicy) SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() { + m.securityRequireSafetyNetAttestationCertifiedDevice = value +} +// SetSecurityRequireUpToDateSecurityProviders sets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidCompliancePolicy) SetSecurityRequireUpToDateSecurityProviders(value *bool)() { + m.securityRequireUpToDateSecurityProviders = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidCompliancePolicy) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_response.go new file mode 100644 index 000000000..6eb737006 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCompliancePolicyCollectionResponse +type AndroidCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidCompliancePolicyable +} +// NewAndroidCompliancePolicyCollectionResponse instantiates a new AndroidCompliancePolicyCollectionResponse and sets the default values. +func NewAndroidCompliancePolicyCollectionResponse()(*AndroidCompliancePolicyCollectionResponse) { + m := &AndroidCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(AndroidCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidCompliancePolicyCollectionResponse) GetValue()([]AndroidCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidCompliancePolicyCollectionResponse) SetValue(value []AndroidCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..14571af27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCompliancePolicyCollectionResponseable +type AndroidCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidCompliancePolicyable) + SetValue(value []AndroidCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/android_compliance_policyable.go new file mode 100644 index 000000000..8a3e0d8ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_compliance_policyable.go @@ -0,0 +1,65 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCompliancePolicyable +type AndroidCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetConditionStatementId()(*string) + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetMinAndroidSecurityPatchLevel()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetRestrictedApps()([]AppListItemable) + GetSecurityBlockDeviceAdministratorManagedDevices()(*bool) + GetSecurityBlockJailbrokenDevices()(*bool) + GetSecurityDisableUsbDebugging()(*bool) + GetSecurityPreventInstallAppsFromUnknownSources()(*bool) + GetSecurityRequireCompanyPortalAppIntegrity()(*bool) + GetSecurityRequireGooglePlayServices()(*bool) + GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) + GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) + GetSecurityRequireUpToDateSecurityProviders()(*bool) + GetSecurityRequireVerifyApps()(*bool) + GetStorageRequireEncryption()(*bool) + SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetConditionStatementId(value *string)() + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetMinAndroidSecurityPatchLevel(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetRestrictedApps(value []AppListItemable)() + SetSecurityBlockDeviceAdministratorManagedDevices(value *bool)() + SetSecurityBlockJailbrokenDevices(value *bool)() + SetSecurityDisableUsbDebugging(value *bool)() + SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() + SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() + SetSecurityRequireGooglePlayServices(value *bool)() + SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() + SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() + SetSecurityRequireUpToDateSecurityProviders(value *bool)() + SetSecurityRequireVerifyApps(value *bool)() + SetStorageRequireEncryption(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_custom_configuration.go b/src/internal/connector/graph/betasdk/models/android_custom_configuration.go new file mode 100644 index 000000000..13977be19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_custom_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCustomConfiguration +type AndroidCustomConfiguration struct { + DeviceConfiguration + // OMA settings. This collection can contain a maximum of 1000 elements. + omaSettings []OmaSettingable +} +// NewAndroidCustomConfiguration instantiates a new AndroidCustomConfiguration and sets the default values. +func NewAndroidCustomConfiguration()(*AndroidCustomConfiguration) { + m := &AndroidCustomConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidCustomConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidCustomConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCustomConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidCustomConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCustomConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["omaSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOmaSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OmaSettingable, len(val)) + for i, v := range val { + res[i] = v.(OmaSettingable) + } + m.SetOmaSettings(res) + } + return nil + } + return res +} +// GetOmaSettings gets the omaSettings property value. OMA settings. This collection can contain a maximum of 1000 elements. +func (m *AndroidCustomConfiguration) GetOmaSettings()([]OmaSettingable) { + return m.omaSettings +} +// Serialize serializes information the current object +func (m *AndroidCustomConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetOmaSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOmaSettings())) + for i, v := range m.GetOmaSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("omaSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetOmaSettings sets the omaSettings property value. OMA settings. This collection can contain a maximum of 1000 elements. +func (m *AndroidCustomConfiguration) SetOmaSettings(value []OmaSettingable)() { + m.omaSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_response.go new file mode 100644 index 000000000..1a3686cfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCustomConfigurationCollectionResponse +type AndroidCustomConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidCustomConfigurationable +} +// NewAndroidCustomConfigurationCollectionResponse instantiates a new AndroidCustomConfigurationCollectionResponse and sets the default values. +func NewAndroidCustomConfigurationCollectionResponse()(*AndroidCustomConfigurationCollectionResponse) { + m := &AndroidCustomConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidCustomConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidCustomConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidCustomConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidCustomConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidCustomConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidCustomConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidCustomConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidCustomConfigurationCollectionResponse) GetValue()([]AndroidCustomConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidCustomConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidCustomConfigurationCollectionResponse) SetValue(value []AndroidCustomConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_responseable.go new file mode 100644 index 000000000..5e99080b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_custom_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCustomConfigurationCollectionResponseable +type AndroidCustomConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidCustomConfigurationable) + SetValue(value []AndroidCustomConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_custom_configurationable.go b/src/internal/connector/graph/betasdk/models/android_custom_configurationable.go new file mode 100644 index 000000000..19391d5d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_custom_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidCustomConfigurationable +type AndroidCustomConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOmaSettings()([]OmaSettingable) + SetOmaSettings(value []OmaSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_base.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_base.go new file mode 100644 index 000000000..0d49dcb56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_base.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionBase +type AndroidDeviceComplianceLocalActionBase struct { + Entity + // Number of minutes to wait till a local action is enforced. Valid values 0 to 2147483647 + gracePeriodInMinutes *int32 +} +// NewAndroidDeviceComplianceLocalActionBase instantiates a new AndroidDeviceComplianceLocalActionBase and sets the default values. +func NewAndroidDeviceComplianceLocalActionBase()(*AndroidDeviceComplianceLocalActionBase) { + m := &AndroidDeviceComplianceLocalActionBase{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidDeviceComplianceLocalActionBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceComplianceLocalActionBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceComplianceLocalActionLockDevice": + return NewAndroidDeviceComplianceLocalActionLockDevice(), nil + case "#microsoft.graph.androidDeviceComplianceLocalActionLockDeviceWithPasscode": + return NewAndroidDeviceComplianceLocalActionLockDeviceWithPasscode(), nil + } + } + } + } + return NewAndroidDeviceComplianceLocalActionBase(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceComplianceLocalActionBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["gracePeriodInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodInMinutes(val) + } + return nil + } + return res +} +// GetGracePeriodInMinutes gets the gracePeriodInMinutes property value. Number of minutes to wait till a local action is enforced. Valid values 0 to 2147483647 +func (m *AndroidDeviceComplianceLocalActionBase) GetGracePeriodInMinutes()(*int32) { + return m.gracePeriodInMinutes +} +// Serialize serializes information the current object +func (m *AndroidDeviceComplianceLocalActionBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("gracePeriodInMinutes", m.GetGracePeriodInMinutes()) + if err != nil { + return err + } + } + return nil +} +// SetGracePeriodInMinutes sets the gracePeriodInMinutes property value. Number of minutes to wait till a local action is enforced. Valid values 0 to 2147483647 +func (m *AndroidDeviceComplianceLocalActionBase) SetGracePeriodInMinutes(value *int32)() { + m.gracePeriodInMinutes = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_baseable.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_baseable.go new file mode 100644 index 000000000..e1d41e0cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionBaseable +type AndroidDeviceComplianceLocalActionBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGracePeriodInMinutes()(*int32) + SetGracePeriodInMinutes(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device.go new file mode 100644 index 000000000..de634e59b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionLockDevice +type AndroidDeviceComplianceLocalActionLockDevice struct { + AndroidDeviceComplianceLocalActionBase +} +// NewAndroidDeviceComplianceLocalActionLockDevice instantiates a new AndroidDeviceComplianceLocalActionLockDevice and sets the default values. +func NewAndroidDeviceComplianceLocalActionLockDevice()(*AndroidDeviceComplianceLocalActionLockDevice) { + m := &AndroidDeviceComplianceLocalActionLockDevice{ + AndroidDeviceComplianceLocalActionBase: *NewAndroidDeviceComplianceLocalActionBase(), + } + odataTypeValue := "#microsoft.graph.androidDeviceComplianceLocalActionLockDevice"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceComplianceLocalActionLockDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceComplianceLocalActionLockDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceComplianceLocalActionLockDevice(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceComplianceLocalActionLockDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceComplianceLocalActionBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AndroidDeviceComplianceLocalActionLockDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceComplianceLocalActionBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcode.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcode.go new file mode 100644 index 000000000..e3fafce3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcode.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionLockDeviceWithPasscode +type AndroidDeviceComplianceLocalActionLockDeviceWithPasscode struct { + AndroidDeviceComplianceLocalActionBase + // Passcode to reset to Android device. This property is read-only. + passcode *string + // Number of sign in failures before wiping device, the value can be 4-11. Valid values 4 to 11 + passcodeSignInFailureCountBeforeWipe *int32 +} +// NewAndroidDeviceComplianceLocalActionLockDeviceWithPasscode instantiates a new AndroidDeviceComplianceLocalActionLockDeviceWithPasscode and sets the default values. +func NewAndroidDeviceComplianceLocalActionLockDeviceWithPasscode()(*AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) { + m := &AndroidDeviceComplianceLocalActionLockDeviceWithPasscode{ + AndroidDeviceComplianceLocalActionBase: *NewAndroidDeviceComplianceLocalActionBase(), + } + odataTypeValue := "#microsoft.graph.androidDeviceComplianceLocalActionLockDeviceWithPasscode"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceComplianceLocalActionLockDeviceWithPasscodeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceComplianceLocalActionLockDeviceWithPasscodeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceComplianceLocalActionLockDeviceWithPasscode(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceComplianceLocalActionBase.GetFieldDeserializers() + res["passcode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscode(val) + } + return nil + } + res["passcodeSignInFailureCountBeforeWipe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeSignInFailureCountBeforeWipe(val) + } + return nil + } + return res +} +// GetPasscode gets the passcode property value. Passcode to reset to Android device. This property is read-only. +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) GetPasscode()(*string) { + return m.passcode +} +// GetPasscodeSignInFailureCountBeforeWipe gets the passcodeSignInFailureCountBeforeWipe property value. Number of sign in failures before wiping device, the value can be 4-11. Valid values 4 to 11 +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) GetPasscodeSignInFailureCountBeforeWipe()(*int32) { + return m.passcodeSignInFailureCountBeforeWipe +} +// Serialize serializes information the current object +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceComplianceLocalActionBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("passcodeSignInFailureCountBeforeWipe", m.GetPasscodeSignInFailureCountBeforeWipe()) + if err != nil { + return err + } + } + return nil +} +// SetPasscode sets the passcode property value. Passcode to reset to Android device. This property is read-only. +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) SetPasscode(value *string)() { + m.passcode = value +} +// SetPasscodeSignInFailureCountBeforeWipe sets the passcodeSignInFailureCountBeforeWipe property value. Number of sign in failures before wiping device, the value can be 4-11. Valid values 4 to 11 +func (m *AndroidDeviceComplianceLocalActionLockDeviceWithPasscode) SetPasscodeSignInFailureCountBeforeWipe(value *int32)() { + m.passcodeSignInFailureCountBeforeWipe = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcodeable.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcodeable.go new file mode 100644 index 000000000..6da369fb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_device_with_passcodeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionLockDeviceWithPasscodeable +type AndroidDeviceComplianceLocalActionLockDeviceWithPasscodeable interface { + AndroidDeviceComplianceLocalActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPasscode()(*string) + GetPasscodeSignInFailureCountBeforeWipe()(*int32) + SetPasscode(value *string)() + SetPasscodeSignInFailureCountBeforeWipe(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_deviceable.go b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_deviceable.go new file mode 100644 index 000000000..b8ce658cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_compliance_local_action_lock_deviceable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceComplianceLocalActionLockDeviceable +type AndroidDeviceComplianceLocalActionLockDeviceable interface { + AndroidDeviceComplianceLocalActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_app_auto_update_policy_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_app_auto_update_policy_type.go new file mode 100644 index 000000000..486860f54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_app_auto_update_policy_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerAppAutoUpdatePolicyType int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE AndroidDeviceOwnerAppAutoUpdatePolicyType = iota + // The user can control auto-updates. + USERCHOICE_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + // Apps are never auto-updated. + NEVER_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + // Apps are auto-updated over Wi-Fi only. + WIFIONLY_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + // Apps are auto-updated at any time. Data charges may apply. + ALWAYS_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE +) + +func (i AndroidDeviceOwnerAppAutoUpdatePolicyType) String() string { + return []string{"notConfigured", "userChoice", "never", "wiFiOnly", "always"}[i] +} +func ParseAndroidDeviceOwnerAppAutoUpdatePolicyType(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + case "userChoice": + result = USERCHOICE_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + case "never": + result = NEVER_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + case "wiFiOnly": + result = WIFIONLY_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + case "always": + result = ALWAYS_ANDROIDDEVICEOWNERAPPAUTOUPDATEPOLICYTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerAppAutoUpdatePolicyType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerAppAutoUpdatePolicyType(values []AndroidDeviceOwnerAppAutoUpdatePolicyType) []string { + 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/android_device_owner_battery_plugged_mode.go b/src/internal/connector/graph/betasdk/models/android_device_owner_battery_plugged_mode.go new file mode 100644 index 000000000..2abb81de8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_battery_plugged_mode.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerBatteryPluggedMode int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE AndroidDeviceOwnerBatteryPluggedMode = iota + // Power source is an AC charger. + AC_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + // Power source is a USB port. + USB_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + // Power source is wireless. + WIRELESS_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE +) + +func (i AndroidDeviceOwnerBatteryPluggedMode) String() string { + return []string{"notConfigured", "ac", "usb", "wireless"}[i] +} +func ParseAndroidDeviceOwnerBatteryPluggedMode(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + case "ac": + result = AC_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + case "usb": + result = USB_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + case "wireless": + result = WIRELESS_ANDROIDDEVICEOWNERBATTERYPLUGGEDMODE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerBatteryPluggedMode value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerBatteryPluggedMode(values []AndroidDeviceOwnerBatteryPluggedMode) []string { + 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/android_device_owner_certificate_access_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_access_type.go new file mode 100644 index 000000000..5cc10fa9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_access_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerCertificateAccessType int + +const ( + // Require user approval for all apps + USERAPPROVAL_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE AndroidDeviceOwnerCertificateAccessType = iota + // Pre-grant certificate access for specific apps (require user approval for other apps). + SPECIFICAPPS_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE + // Unknown future value for evolvable enum patterns. + UNKNOWNFUTUREVALUE_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE +) + +func (i AndroidDeviceOwnerCertificateAccessType) String() string { + return []string{"userApproval", "specificApps", "unknownFutureValue"}[i] +} +func ParseAndroidDeviceOwnerCertificateAccessType(v string) (interface{}, error) { + result := USERAPPROVAL_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE + switch v { + case "userApproval": + result = USERAPPROVAL_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE + case "specificApps": + result = SPECIFICAPPS_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ANDROIDDEVICEOWNERCERTIFICATEACCESSTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerCertificateAccessType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerCertificateAccessType(values []AndroidDeviceOwnerCertificateAccessType) []string { + 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/android_device_owner_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base.go new file mode 100644 index 000000000..030427939 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base.go @@ -0,0 +1,251 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCertificateProfileBase +type AndroidDeviceOwnerCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + rootCertificate AndroidDeviceOwnerTrustedRootCertificateable + // Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Certificate Subject Name Format. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. + subjectNameFormat *SubjectNameFormat +} +// NewAndroidDeviceOwnerCertificateProfileBase instantiates a new AndroidDeviceOwnerCertificateProfileBase and sets the default values. +func NewAndroidDeviceOwnerCertificateProfileBase()(*AndroidDeviceOwnerCertificateProfileBase) { + m := &AndroidDeviceOwnerCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceOwnerImportedPFXCertificateProfile": + return NewAndroidDeviceOwnerImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerPkcsCertificateProfile": + return NewAndroidDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerScepCertificateProfile": + return NewAndroidDeviceOwnerScepCertificateProfile(), nil + } + } + } + } + return NewAndroidDeviceOwnerCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(AndroidDeviceOwnerTrustedRootCertificateable)) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidDeviceOwnerCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetRootCertificate()(AndroidDeviceOwnerTrustedRootCertificateable) { + return m.rootCertificate +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Certificate Subject Name Format. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. +func (m *AndroidDeviceOwnerCertificateProfileBase) GetSubjectNameFormat()(*SubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidDeviceOwnerCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetRootCertificate(value AndroidDeviceOwnerTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Certificate Subject Name Format. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. +func (m *AndroidDeviceOwnerCertificateProfileBase) SetSubjectNameFormat(value *SubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..9ac676bea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCertificateProfileBaseCollectionResponse +type AndroidDeviceOwnerCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerCertificateProfileBaseable +} +// NewAndroidDeviceOwnerCertificateProfileBaseCollectionResponse instantiates a new AndroidDeviceOwnerCertificateProfileBaseCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerCertificateProfileBaseCollectionResponse()(*AndroidDeviceOwnerCertificateProfileBaseCollectionResponse) { + m := &AndroidDeviceOwnerCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerCertificateProfileBaseCollectionResponse) GetValue()([]AndroidDeviceOwnerCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerCertificateProfileBaseCollectionResponse) SetValue(value []AndroidDeviceOwnerCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..3d92769f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCertificateProfileBaseCollectionResponseable +type AndroidDeviceOwnerCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerCertificateProfileBaseable) + SetValue(value []AndroidDeviceOwnerCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_baseable.go new file mode 100644 index 000000000..5553854f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_certificate_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCertificateProfileBaseable +type AndroidDeviceOwnerCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetRenewalThresholdPercentage()(*int32) + GetRootCertificate()(AndroidDeviceOwnerTrustedRootCertificateable) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*SubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetRenewalThresholdPercentage(value *int32)() + SetRootCertificate(value AndroidDeviceOwnerTrustedRootCertificateable)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *SubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy.go b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy.go new file mode 100644 index 000000000..9c539bb65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy.go @@ -0,0 +1,611 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCompliancePolicy +type AndroidDeviceOwnerCompliancePolicy struct { + DeviceCompliancePolicy + // MDATP Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. + advancedThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Require that devices have enabled device threat protection. + deviceThreatProtectionEnabled *bool + // Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Minimum Android security patch level. + minAndroidSecurityPatchLevel *string + // Maximum Android version. + osMaximumVersion *string + // Minimum Android version. + osMinimumVersion *string + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum password length. Valid values 4 to 16 + passwordMinimumLength *int32 + // Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 + passwordMinimumLetterCharacters *int32 + // Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 + passwordMinimumLowerCaseCharacters *int32 + // Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 + passwordMinimumNonLetterCharacters *int32 + // Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 + passwordMinimumNumericCharacters *int32 + // Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 + passwordMinimumSymbolCharacters *int32 + // Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 + passwordMinimumUpperCaseCharacters *int32 + // Minutes of inactivity before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Number of previous passwords to block. Valid values 1 to 24 + passwordPreviousPasswordCountToBlock *int32 + // Require a password to unlock device. + passwordRequired *bool + // Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. + passwordRequiredType *AndroidDeviceOwnerRequiredPasswordType + // If setting is set to true, checks that the Intune app installed on fully managed, dedicated, or corporate-owned work profile Android Enterprise enrolled devices, is the one provided by Microsoft from the Managed Google Playstore. If the check fails, the device will be reported as non-compliant. + securityRequireIntuneAppIntegrity *bool + // Require the device to pass the SafetyNet basic integrity check. + securityRequireSafetyNetAttestationBasicIntegrity *bool + // Require the device to pass the SafetyNet certified device check. + securityRequireSafetyNetAttestationCertifiedDevice *bool + // Require encryption on Android devices. + storageRequireEncryption *bool +} +// NewAndroidDeviceOwnerCompliancePolicy instantiates a new AndroidDeviceOwnerCompliancePolicy and sets the default values. +func NewAndroidDeviceOwnerCompliancePolicy()(*AndroidDeviceOwnerCompliancePolicy) { + m := &AndroidDeviceOwnerCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerCompliancePolicy(), nil +} +// GetAdvancedThreatProtectionRequiredSecurityLevel gets the advancedThreatProtectionRequiredSecurityLevel property value. MDATP Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. +func (m *AndroidDeviceOwnerCompliancePolicy) GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.advancedThreatProtectionRequiredSecurityLevel +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidDeviceOwnerCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. +func (m *AndroidDeviceOwnerCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["advancedThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["minAndroidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinAndroidSecurityPatchLevel(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinimumLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLetterCharacters(val) + } + return nil + } + res["passwordMinimumLowerCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLowerCaseCharacters(val) + } + return nil + } + res["passwordMinimumNonLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumNonLetterCharacters(val) + } + return nil + } + res["passwordMinimumNumericCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumNumericCharacters(val) + } + return nil + } + res["passwordMinimumSymbolCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumSymbolCharacters(val) + } + return nil + } + res["passwordMinimumUpperCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumUpperCaseCharacters(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordPreviousPasswordCountToBlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordCountToBlock(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidDeviceOwnerRequiredPasswordType)) + } + return nil + } + res["securityRequireIntuneAppIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireIntuneAppIntegrity(val) + } + return nil + } + res["securityRequireSafetyNetAttestationBasicIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationBasicIntegrity(val) + } + return nil + } + res["securityRequireSafetyNetAttestationCertifiedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationCertifiedDevice(val) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + return res +} +// GetMinAndroidSecurityPatchLevel gets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidDeviceOwnerCompliancePolicy) GetMinAndroidSecurityPatchLevel()(*string) { + return m.minAndroidSecurityPatchLevel +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidDeviceOwnerCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidDeviceOwnerCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinimumLetterCharacters gets the passwordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumLetterCharacters()(*int32) { + return m.passwordMinimumLetterCharacters +} +// GetPasswordMinimumLowerCaseCharacters gets the passwordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumLowerCaseCharacters()(*int32) { + return m.passwordMinimumLowerCaseCharacters +} +// GetPasswordMinimumNonLetterCharacters gets the passwordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumNonLetterCharacters()(*int32) { + return m.passwordMinimumNonLetterCharacters +} +// GetPasswordMinimumNumericCharacters gets the passwordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumNumericCharacters()(*int32) { + return m.passwordMinimumNumericCharacters +} +// GetPasswordMinimumSymbolCharacters gets the passwordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumSymbolCharacters()(*int32) { + return m.passwordMinimumSymbolCharacters +} +// GetPasswordMinimumUpperCaseCharacters gets the passwordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinimumUpperCaseCharacters()(*int32) { + return m.passwordMinimumUpperCaseCharacters +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordPreviousPasswordCountToBlock gets the passwordPreviousPasswordCountToBlock property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordPreviousPasswordCountToBlock()(*int32) { + return m.passwordPreviousPasswordCountToBlock +} +// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerCompliancePolicy) GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) { + return m.passwordRequiredType +} +// GetSecurityRequireIntuneAppIntegrity gets the securityRequireIntuneAppIntegrity property value. If setting is set to true, checks that the Intune app installed on fully managed, dedicated, or corporate-owned work profile Android Enterprise enrolled devices, is the one provided by Microsoft from the Managed Google Playstore. If the check fails, the device will be reported as non-compliant. +func (m *AndroidDeviceOwnerCompliancePolicy) GetSecurityRequireIntuneAppIntegrity()(*bool) { + return m.securityRequireIntuneAppIntegrity +} +// GetSecurityRequireSafetyNetAttestationBasicIntegrity gets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidDeviceOwnerCompliancePolicy) GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) { + return m.securityRequireSafetyNetAttestationBasicIntegrity +} +// GetSecurityRequireSafetyNetAttestationCertifiedDevice gets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidDeviceOwnerCompliancePolicy) GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) { + return m.securityRequireSafetyNetAttestationCertifiedDevice +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidDeviceOwnerCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetAdvancedThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("advancedThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minAndroidSecurityPatchLevel", m.GetMinAndroidSecurityPatchLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLetterCharacters", m.GetPasswordMinimumLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLowerCaseCharacters", m.GetPasswordMinimumLowerCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumNonLetterCharacters", m.GetPasswordMinimumNonLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumNumericCharacters", m.GetPasswordMinimumNumericCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumSymbolCharacters", m.GetPasswordMinimumSymbolCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumUpperCaseCharacters", m.GetPasswordMinimumUpperCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordCountToBlock", m.GetPasswordPreviousPasswordCountToBlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireIntuneAppIntegrity", m.GetSecurityRequireIntuneAppIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationBasicIntegrity", m.GetSecurityRequireSafetyNetAttestationBasicIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationCertifiedDevice", m.GetSecurityRequireSafetyNetAttestationCertifiedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionRequiredSecurityLevel sets the advancedThreatProtectionRequiredSecurityLevel property value. MDATP Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. +func (m *AndroidDeviceOwnerCompliancePolicy) SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.advancedThreatProtectionRequiredSecurityLevel = value +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidDeviceOwnerCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Require Mobile Threat Protection minimum risk level to report noncompliance. Possible values are: unavailable, secured, low, medium, high, notSet. +func (m *AndroidDeviceOwnerCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetMinAndroidSecurityPatchLevel sets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidDeviceOwnerCompliancePolicy) SetMinAndroidSecurityPatchLevel(value *string)() { + m.minAndroidSecurityPatchLevel = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidDeviceOwnerCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidDeviceOwnerCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinimumLetterCharacters sets the passwordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumLetterCharacters(value *int32)() { + m.passwordMinimumLetterCharacters = value +} +// SetPasswordMinimumLowerCaseCharacters sets the passwordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumLowerCaseCharacters(value *int32)() { + m.passwordMinimumLowerCaseCharacters = value +} +// SetPasswordMinimumNonLetterCharacters sets the passwordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumNonLetterCharacters(value *int32)() { + m.passwordMinimumNonLetterCharacters = value +} +// SetPasswordMinimumNumericCharacters sets the passwordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumNumericCharacters(value *int32)() { + m.passwordMinimumNumericCharacters = value +} +// SetPasswordMinimumSymbolCharacters sets the passwordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumSymbolCharacters(value *int32)() { + m.passwordMinimumSymbolCharacters = value +} +// SetPasswordMinimumUpperCaseCharacters sets the passwordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinimumUpperCaseCharacters(value *int32)() { + m.passwordMinimumUpperCaseCharacters = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordPreviousPasswordCountToBlock sets the passwordPreviousPasswordCountToBlock property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordPreviousPasswordCountToBlock(value *int32)() { + m.passwordPreviousPasswordCountToBlock = value +} +// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerCompliancePolicy) SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetSecurityRequireIntuneAppIntegrity sets the securityRequireIntuneAppIntegrity property value. If setting is set to true, checks that the Intune app installed on fully managed, dedicated, or corporate-owned work profile Android Enterprise enrolled devices, is the one provided by Microsoft from the Managed Google Playstore. If the check fails, the device will be reported as non-compliant. +func (m *AndroidDeviceOwnerCompliancePolicy) SetSecurityRequireIntuneAppIntegrity(value *bool)() { + m.securityRequireIntuneAppIntegrity = value +} +// SetSecurityRequireSafetyNetAttestationBasicIntegrity sets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidDeviceOwnerCompliancePolicy) SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() { + m.securityRequireSafetyNetAttestationBasicIntegrity = value +} +// SetSecurityRequireSafetyNetAttestationCertifiedDevice sets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidDeviceOwnerCompliancePolicy) SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() { + m.securityRequireSafetyNetAttestationCertifiedDevice = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidDeviceOwnerCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_response.go new file mode 100644 index 000000000..21a9d9d9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCompliancePolicyCollectionResponse +type AndroidDeviceOwnerCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerCompliancePolicyable +} +// NewAndroidDeviceOwnerCompliancePolicyCollectionResponse instantiates a new AndroidDeviceOwnerCompliancePolicyCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerCompliancePolicyCollectionResponse()(*AndroidDeviceOwnerCompliancePolicyCollectionResponse) { + m := &AndroidDeviceOwnerCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerCompliancePolicyCollectionResponse) GetValue()([]AndroidDeviceOwnerCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerCompliancePolicyCollectionResponse) SetValue(value []AndroidDeviceOwnerCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..507db1bb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCompliancePolicyCollectionResponseable +type AndroidDeviceOwnerCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerCompliancePolicyable) + SetValue(value []AndroidDeviceOwnerCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policyable.go new file mode 100644 index 000000000..7507fb5fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_compliance_policyable.go @@ -0,0 +1,55 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerCompliancePolicyable +type AndroidDeviceOwnerCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetMinAndroidSecurityPatchLevel()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinimumLetterCharacters()(*int32) + GetPasswordMinimumLowerCaseCharacters()(*int32) + GetPasswordMinimumNonLetterCharacters()(*int32) + GetPasswordMinimumNumericCharacters()(*int32) + GetPasswordMinimumSymbolCharacters()(*int32) + GetPasswordMinimumUpperCaseCharacters()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordPreviousPasswordCountToBlock()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) + GetSecurityRequireIntuneAppIntegrity()(*bool) + GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) + GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) + GetStorageRequireEncryption()(*bool) + SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetMinAndroidSecurityPatchLevel(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinimumLetterCharacters(value *int32)() + SetPasswordMinimumLowerCaseCharacters(value *int32)() + SetPasswordMinimumNonLetterCharacters(value *int32)() + SetPasswordMinimumNumericCharacters(value *int32)() + SetPasswordMinimumSymbolCharacters(value *int32)() + SetPasswordMinimumUpperCaseCharacters(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordPreviousPasswordCountToBlock(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() + SetSecurityRequireIntuneAppIntegrity(value *bool)() + SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() + SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() + SetStorageRequireEncryption(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_cross_profile_data_sharing.go b/src/internal/connector/graph/betasdk/models/android_device_owner_cross_profile_data_sharing.go new file mode 100644 index 000000000..8f31e7ba1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_cross_profile_data_sharing.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerCrossProfileDataSharing int + +const ( + // Not configured; this value defaults to CROSS_PROFILE_DATA_SHARING_UNSPECIFIED. + NOTCONFIGURED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING AndroidDeviceOwnerCrossProfileDataSharing = iota + // Data cannot be shared from both the personal profile to work profile and the work profile to the personal profile. + CROSSPROFILEDATASHARINGBLOCKED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + // Prevents users from sharing data from the work profile to apps in the personal profile. Personal data can be shared with work apps. + DATASHARINGFROMWORKTOPERSONALBLOCKED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + // Data from either profile can be shared with the other profile. + CROSSPROFILEDATASHARINGALLOWED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + // Unknown future value (reserved, not used right now) + UNKOWNFUTUREVALUE_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING +) + +func (i AndroidDeviceOwnerCrossProfileDataSharing) String() string { + return []string{"notConfigured", "crossProfileDataSharingBlocked", "dataSharingFromWorkToPersonalBlocked", "crossProfileDataSharingAllowed", "unkownFutureValue"}[i] +} +func ParseAndroidDeviceOwnerCrossProfileDataSharing(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + case "crossProfileDataSharingBlocked": + result = CROSSPROFILEDATASHARINGBLOCKED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + case "dataSharingFromWorkToPersonalBlocked": + result = DATASHARINGFROMWORKTOPERSONALBLOCKED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + case "crossProfileDataSharingAllowed": + result = CROSSPROFILEDATASHARINGALLOWED_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + case "unkownFutureValue": + result = UNKOWNFUTUREVALUE_ANDROIDDEVICEOWNERCROSSPROFILEDATASHARING + default: + return 0, errors.New("Unknown AndroidDeviceOwnerCrossProfileDataSharing value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerCrossProfileDataSharing(values []AndroidDeviceOwnerCrossProfileDataSharing) []string { + 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/android_device_owner_default_app_permission_policy_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_default_app_permission_policy_type.go new file mode 100644 index 000000000..372b34d40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_default_app_permission_policy_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerDefaultAppPermissionPolicyType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE AndroidDeviceOwnerDefaultAppPermissionPolicyType = iota + // Prompt. + PROMPT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto grant. + AUTOGRANT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto deny. + AUTODENY_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE +) + +func (i AndroidDeviceOwnerDefaultAppPermissionPolicyType) String() string { + return []string{"deviceDefault", "prompt", "autoGrant", "autoDeny"}[i] +} +func ParseAndroidDeviceOwnerDefaultAppPermissionPolicyType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + case "prompt": + result = PROMPT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoGrant": + result = AUTOGRANT_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoDeny": + result = AUTODENY_ANDROIDDEVICEOWNERDEFAULTAPPPERMISSIONPOLICYTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerDefaultAppPermissionPolicyType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerDefaultAppPermissionPolicyType(values []AndroidDeviceOwnerDefaultAppPermissionPolicyType) []string { + 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/android_device_owner_derived_credential_authentication_configuration.go b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration.go new file mode 100644 index 000000000..b3c319651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration +type AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration struct { + DeviceConfiguration + // Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. + certificateAccessType *AndroidDeviceOwnerCertificateAccessType + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // Certificate access information. This collection can contain a maximum of 50 elements. + silentCertificateAccessDetails []AndroidDeviceOwnerSilentCertificateAccessable +} +// NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration instantiates a new AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration and sets the default values. +func NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration()(*AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) { + m := &AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerDerivedCredentialAuthenticationConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration(), nil +} +// GetCertificateAccessType gets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) { + return m.certificateAccessType +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateAccessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerCertificateAccessType) + if err != nil { + return err + } + if val != nil { + m.SetCertificateAccessType(val.(*AndroidDeviceOwnerCertificateAccessType)) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["silentCertificateAccessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSilentCertificateAccessable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSilentCertificateAccessable) + } + m.SetSilentCertificateAccessDetails(res) + } + return nil + } + return res +} +// GetSilentCertificateAccessDetails gets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) { + return m.silentCertificateAccessDetails +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateAccessType() != nil { + cast := (*m.GetCertificateAccessType()).String() + err = writer.WriteStringValue("certificateAccessType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + if m.GetSilentCertificateAccessDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSilentCertificateAccessDetails())) + for i, v := range m.GetSilentCertificateAccessDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("silentCertificateAccessDetails", cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateAccessType sets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() { + m.certificateAccessType = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetSilentCertificateAccessDetails sets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration) SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() { + m.silentCertificateAccessDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_response.go new file mode 100644 index 000000000..0b3a1eb76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse +type AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable +} +// NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse instantiates a new AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse()(*AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse) { + m := &AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse) GetValue()([]AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponse) SetValue(value []AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_responseable.go new file mode 100644 index 000000000..f095242fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponseable +type AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable) + SetValue(value []AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configurationable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configurationable.go new file mode 100644 index 000000000..ff976c9bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_derived_credential_authentication_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable +type AndroidDeviceOwnerDerivedCredentialAuthenticationConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) + SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_mode.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_mode.go new file mode 100644 index 000000000..805feef06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_mode.go @@ -0,0 +1,45 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerEnrollmentMode int + +const ( + CORPORATEOWNEDDEDICATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE AndroidDeviceOwnerEnrollmentMode = iota + CORPORATEOWNEDFULLYMANAGED_ANDROIDDEVICEOWNERENROLLMENTMODE + CORPORATEOWNEDWORKPROFILE_ANDROIDDEVICEOWNERENROLLMENTMODE + // Corporate owned, userless Android Open Source Project (AOSP) device, without Google Mobile Services. + CORPORATEOWNEDAOSPUSERLESSDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE + // Corporate owned, user-associated Android Open Source Project (AOSP) device, without Google Mobile Services. + CORPORATEOWNEDAOSPUSERASSOCIATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE +) + +func (i AndroidDeviceOwnerEnrollmentMode) String() string { + return []string{"corporateOwnedDedicatedDevice", "corporateOwnedFullyManaged", "corporateOwnedWorkProfile", "corporateOwnedAOSPUserlessDevice", "corporateOwnedAOSPUserAssociatedDevice"}[i] +} +func ParseAndroidDeviceOwnerEnrollmentMode(v string) (interface{}, error) { + result := CORPORATEOWNEDDEDICATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE + switch v { + case "corporateOwnedDedicatedDevice": + result = CORPORATEOWNEDDEDICATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE + case "corporateOwnedFullyManaged": + result = CORPORATEOWNEDFULLYMANAGED_ANDROIDDEVICEOWNERENROLLMENTMODE + case "corporateOwnedWorkProfile": + result = CORPORATEOWNEDWORKPROFILE_ANDROIDDEVICEOWNERENROLLMENTMODE + case "corporateOwnedAOSPUserlessDevice": + result = CORPORATEOWNEDAOSPUSERLESSDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE + case "corporateOwnedAOSPUserAssociatedDevice": + result = CORPORATEOWNEDAOSPUSERASSOCIATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTMODE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerEnrollmentMode value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerEnrollmentMode(values []AndroidDeviceOwnerEnrollmentMode) []string { + 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/android_device_owner_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile.go new file mode 100644 index 000000000..355c7728d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile.go @@ -0,0 +1,588 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnrollmentProfile enrollment Profile used to enroll Android Enterprise devices using Google's Cloud Management. +type AndroidDeviceOwnerEnrollmentProfile struct { + Entity + // Tenant GUID the enrollment profile belongs to. + accountId *string + // Boolean that indicates that the Wi-Fi network should be configured during device provisioning. When set to TRUE, device provisioning will use Wi-Fi related properties to automatically connect to Wi-Fi networks. When set to FALSE or undefined, other Wi-Fi related properties will be ignored. Default value is TRUE. Returned by default. + configureWifi *bool + // Date time the enrollment profile was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description for the enrollment profile. + description *string + // Display name for the enrollment profile. + displayName *string + // Total number of Android devices that have enrolled using this enrollment profile. + enrolledDeviceCount *int32 + // The enrollment mode for an enrollment profile. + enrollmentMode *AndroidDeviceOwnerEnrollmentMode + // The enrollment token type for an enrollment profile. + enrollmentTokenType *AndroidDeviceOwnerEnrollmentTokenType + // Total number of AOSP devices that have enrolled using the current token. + enrollmentTokenUsageCount *int32 + // Boolean indicating if this profile is an Android AOSP for Teams device profile. + isTeamsDeviceProfile *bool + // Date time the enrollment profile was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // String used to generate a QR code for the token. + qrCodeContent *string + // String used to generate a QR code for the token. + qrCodeImage MimeContentable + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Date time the most recently created token was created. + tokenCreationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date time the most recently created token will expire. + tokenExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Value of the most recently created token for this enrollment profile. + tokenValue *string + // Boolean that indicates if hidden wifi networks are enabled + wifiHidden *bool + // String that contains the wi-fi login password + wifiPassword *string + // This enum represents Wi-Fi Security Types for Android Device Owner AOSP Scenarios. + wifiSecurityType *AospWifiSecurityType + // String that contains the wi-fi login ssid + wifiSsid *string +} +// NewAndroidDeviceOwnerEnrollmentProfile instantiates a new androidDeviceOwnerEnrollmentProfile and sets the default values. +func NewAndroidDeviceOwnerEnrollmentProfile()(*AndroidDeviceOwnerEnrollmentProfile) { + m := &AndroidDeviceOwnerEnrollmentProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidDeviceOwnerEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerEnrollmentProfile(), nil +} +// GetAccountId gets the accountId property value. Tenant GUID the enrollment profile belongs to. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetAccountId()(*string) { + return m.accountId +} +// GetConfigureWifi gets the configureWifi property value. Boolean that indicates that the Wi-Fi network should be configured during device provisioning. When set to TRUE, device provisioning will use Wi-Fi related properties to automatically connect to Wi-Fi networks. When set to FALSE or undefined, other Wi-Fi related properties will be ignored. Default value is TRUE. Returned by default. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetConfigureWifi()(*bool) { + return m.configureWifi +} +// GetCreatedDateTime gets the createdDateTime property value. Date time the enrollment profile was created. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description for the enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetEnrolledDeviceCount gets the enrolledDeviceCount property value. Total number of Android devices that have enrolled using this enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetEnrolledDeviceCount()(*int32) { + return m.enrolledDeviceCount +} +// GetEnrollmentMode gets the enrollmentMode property value. The enrollment mode for an enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetEnrollmentMode()(*AndroidDeviceOwnerEnrollmentMode) { + return m.enrollmentMode +} +// GetEnrollmentTokenType gets the enrollmentTokenType property value. The enrollment token type for an enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetEnrollmentTokenType()(*AndroidDeviceOwnerEnrollmentTokenType) { + return m.enrollmentTokenType +} +// GetEnrollmentTokenUsageCount gets the enrollmentTokenUsageCount property value. Total number of AOSP devices that have enrolled using the current token. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetEnrollmentTokenUsageCount()(*int32) { + return m.enrollmentTokenUsageCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["configureWifi"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigureWifi(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enrolledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledDeviceCount(val) + } + return nil + } + res["enrollmentMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerEnrollmentMode) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentMode(val.(*AndroidDeviceOwnerEnrollmentMode)) + } + return nil + } + res["enrollmentTokenType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerEnrollmentTokenType) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentTokenType(val.(*AndroidDeviceOwnerEnrollmentTokenType)) + } + return nil + } + res["enrollmentTokenUsageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentTokenUsageCount(val) + } + return nil + } + res["isTeamsDeviceProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTeamsDeviceProfile(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["qrCodeContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQrCodeContent(val) + } + return nil + } + res["qrCodeImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQrCodeImage(val.(MimeContentable)) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["tokenCreationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenCreationDateTime(val) + } + return nil + } + res["tokenExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpirationDateTime(val) + } + return nil + } + res["tokenValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenValue(val) + } + return nil + } + res["wifiHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiHidden(val) + } + return nil + } + res["wifiPassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiPassword(val) + } + return nil + } + res["wifiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAospWifiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWifiSecurityType(val.(*AospWifiSecurityType)) + } + return nil + } + res["wifiSsid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiSsid(val) + } + return nil + } + return res +} +// GetIsTeamsDeviceProfile gets the isTeamsDeviceProfile property value. Boolean indicating if this profile is an Android AOSP for Teams device profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetIsTeamsDeviceProfile()(*bool) { + return m.isTeamsDeviceProfile +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date time the enrollment profile was last modified. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetQrCodeContent gets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetQrCodeContent()(*string) { + return m.qrCodeContent +} +// GetQrCodeImage gets the qrCodeImage property value. String used to generate a QR code for the token. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetQrCodeImage()(MimeContentable) { + return m.qrCodeImage +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetTokenCreationDateTime gets the tokenCreationDateTime property value. Date time the most recently created token was created. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetTokenCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.tokenCreationDateTime +} +// GetTokenExpirationDateTime gets the tokenExpirationDateTime property value. Date time the most recently created token will expire. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.tokenExpirationDateTime +} +// GetTokenValue gets the tokenValue property value. Value of the most recently created token for this enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetTokenValue()(*string) { + return m.tokenValue +} +// GetWifiHidden gets the wifiHidden property value. Boolean that indicates if hidden wifi networks are enabled +func (m *AndroidDeviceOwnerEnrollmentProfile) GetWifiHidden()(*bool) { + return m.wifiHidden +} +// GetWifiPassword gets the wifiPassword property value. String that contains the wi-fi login password +func (m *AndroidDeviceOwnerEnrollmentProfile) GetWifiPassword()(*string) { + return m.wifiPassword +} +// GetWifiSecurityType gets the wifiSecurityType property value. This enum represents Wi-Fi Security Types for Android Device Owner AOSP Scenarios. +func (m *AndroidDeviceOwnerEnrollmentProfile) GetWifiSecurityType()(*AospWifiSecurityType) { + return m.wifiSecurityType +} +// GetWifiSsid gets the wifiSsid property value. String that contains the wi-fi login ssid +func (m *AndroidDeviceOwnerEnrollmentProfile) GetWifiSsid()(*string) { + return m.wifiSsid +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("configureWifi", m.GetConfigureWifi()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("enrolledDeviceCount", m.GetEnrolledDeviceCount()) + if err != nil { + return err + } + } + if m.GetEnrollmentMode() != nil { + cast := (*m.GetEnrollmentMode()).String() + err = writer.WriteStringValue("enrollmentMode", &cast) + if err != nil { + return err + } + } + if m.GetEnrollmentTokenType() != nil { + cast := (*m.GetEnrollmentTokenType()).String() + err = writer.WriteStringValue("enrollmentTokenType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("enrollmentTokenUsageCount", m.GetEnrollmentTokenUsageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTeamsDeviceProfile", m.GetIsTeamsDeviceProfile()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("qrCodeContent", m.GetQrCodeContent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("qrCodeImage", m.GetQrCodeImage()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("tokenCreationDateTime", m.GetTokenCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("tokenExpirationDateTime", m.GetTokenExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tokenValue", m.GetTokenValue()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wifiHidden", m.GetWifiHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("wifiPassword", m.GetWifiPassword()) + if err != nil { + return err + } + } + if m.GetWifiSecurityType() != nil { + cast := (*m.GetWifiSecurityType()).String() + err = writer.WriteStringValue("wifiSecurityType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("wifiSsid", m.GetWifiSsid()) + if err != nil { + return err + } + } + return nil +} +// SetAccountId sets the accountId property value. Tenant GUID the enrollment profile belongs to. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetAccountId(value *string)() { + m.accountId = value +} +// SetConfigureWifi sets the configureWifi property value. Boolean that indicates that the Wi-Fi network should be configured during device provisioning. When set to TRUE, device provisioning will use Wi-Fi related properties to automatically connect to Wi-Fi networks. When set to FALSE or undefined, other Wi-Fi related properties will be ignored. Default value is TRUE. Returned by default. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetConfigureWifi(value *bool)() { + m.configureWifi = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date time the enrollment profile was created. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description for the enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnrolledDeviceCount sets the enrolledDeviceCount property value. Total number of Android devices that have enrolled using this enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetEnrolledDeviceCount(value *int32)() { + m.enrolledDeviceCount = value +} +// SetEnrollmentMode sets the enrollmentMode property value. The enrollment mode for an enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetEnrollmentMode(value *AndroidDeviceOwnerEnrollmentMode)() { + m.enrollmentMode = value +} +// SetEnrollmentTokenType sets the enrollmentTokenType property value. The enrollment token type for an enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetEnrollmentTokenType(value *AndroidDeviceOwnerEnrollmentTokenType)() { + m.enrollmentTokenType = value +} +// SetEnrollmentTokenUsageCount sets the enrollmentTokenUsageCount property value. Total number of AOSP devices that have enrolled using the current token. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetEnrollmentTokenUsageCount(value *int32)() { + m.enrollmentTokenUsageCount = value +} +// SetIsTeamsDeviceProfile sets the isTeamsDeviceProfile property value. Boolean indicating if this profile is an Android AOSP for Teams device profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetIsTeamsDeviceProfile(value *bool)() { + m.isTeamsDeviceProfile = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date time the enrollment profile was last modified. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetQrCodeContent sets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetQrCodeContent(value *string)() { + m.qrCodeContent = value +} +// SetQrCodeImage sets the qrCodeImage property value. String used to generate a QR code for the token. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetQrCodeImage(value MimeContentable)() { + m.qrCodeImage = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetTokenCreationDateTime sets the tokenCreationDateTime property value. Date time the most recently created token was created. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetTokenCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.tokenCreationDateTime = value +} +// SetTokenExpirationDateTime sets the tokenExpirationDateTime property value. Date time the most recently created token will expire. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.tokenExpirationDateTime = value +} +// SetTokenValue sets the tokenValue property value. Value of the most recently created token for this enrollment profile. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetTokenValue(value *string)() { + m.tokenValue = value +} +// SetWifiHidden sets the wifiHidden property value. Boolean that indicates if hidden wifi networks are enabled +func (m *AndroidDeviceOwnerEnrollmentProfile) SetWifiHidden(value *bool)() { + m.wifiHidden = value +} +// SetWifiPassword sets the wifiPassword property value. String that contains the wi-fi login password +func (m *AndroidDeviceOwnerEnrollmentProfile) SetWifiPassword(value *string)() { + m.wifiPassword = value +} +// SetWifiSecurityType sets the wifiSecurityType property value. This enum represents Wi-Fi Security Types for Android Device Owner AOSP Scenarios. +func (m *AndroidDeviceOwnerEnrollmentProfile) SetWifiSecurityType(value *AospWifiSecurityType)() { + m.wifiSecurityType = value +} +// SetWifiSsid sets the wifiSsid property value. String that contains the wi-fi login ssid +func (m *AndroidDeviceOwnerEnrollmentProfile) SetWifiSsid(value *string)() { + m.wifiSsid = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_response.go new file mode 100644 index 000000000..eb6edbe23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnrollmentProfileCollectionResponse +type AndroidDeviceOwnerEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerEnrollmentProfileable +} +// NewAndroidDeviceOwnerEnrollmentProfileCollectionResponse instantiates a new AndroidDeviceOwnerEnrollmentProfileCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerEnrollmentProfileCollectionResponse()(*AndroidDeviceOwnerEnrollmentProfileCollectionResponse) { + m := &AndroidDeviceOwnerEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerEnrollmentProfileCollectionResponse) GetValue()([]AndroidDeviceOwnerEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerEnrollmentProfileCollectionResponse) SetValue(value []AndroidDeviceOwnerEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..7c6334e44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnrollmentProfileCollectionResponseable +type AndroidDeviceOwnerEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerEnrollmentProfileable) + SetValue(value []AndroidDeviceOwnerEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_type.go new file mode 100644 index 000000000..117bc7642 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profile_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerEnrollmentProfileType int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE AndroidDeviceOwnerEnrollmentProfileType = iota + // Dedicated device. + DEDICATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE + // Fully managed. + FULLYMANAGED_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE +) + +func (i AndroidDeviceOwnerEnrollmentProfileType) String() string { + return []string{"notConfigured", "dedicatedDevice", "fullyManaged"}[i] +} +func ParseAndroidDeviceOwnerEnrollmentProfileType(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE + case "dedicatedDevice": + result = DEDICATEDDEVICE_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE + case "fullyManaged": + result = FULLYMANAGED_ANDROIDDEVICEOWNERENROLLMENTPROFILETYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerEnrollmentProfileType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerEnrollmentProfileType(values []AndroidDeviceOwnerEnrollmentProfileType) []string { + 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/android_device_owner_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profileable.go new file mode 100644 index 000000000..aeee6c869 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_profileable.go @@ -0,0 +1,54 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnrollmentProfileable +type AndroidDeviceOwnerEnrollmentProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountId()(*string) + GetConfigureWifi()(*bool) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetEnrolledDeviceCount()(*int32) + GetEnrollmentMode()(*AndroidDeviceOwnerEnrollmentMode) + GetEnrollmentTokenType()(*AndroidDeviceOwnerEnrollmentTokenType) + GetEnrollmentTokenUsageCount()(*int32) + GetIsTeamsDeviceProfile()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetQrCodeContent()(*string) + GetQrCodeImage()(MimeContentable) + GetRoleScopeTagIds()([]string) + GetTokenCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTokenValue()(*string) + GetWifiHidden()(*bool) + GetWifiPassword()(*string) + GetWifiSecurityType()(*AospWifiSecurityType) + GetWifiSsid()(*string) + SetAccountId(value *string)() + SetConfigureWifi(value *bool)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEnrolledDeviceCount(value *int32)() + SetEnrollmentMode(value *AndroidDeviceOwnerEnrollmentMode)() + SetEnrollmentTokenType(value *AndroidDeviceOwnerEnrollmentTokenType)() + SetEnrollmentTokenUsageCount(value *int32)() + SetIsTeamsDeviceProfile(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetQrCodeContent(value *string)() + SetQrCodeImage(value MimeContentable)() + SetRoleScopeTagIds(value []string)() + SetTokenCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTokenValue(value *string)() + SetWifiHidden(value *bool)() + SetWifiPassword(value *string)() + SetWifiSecurityType(value *AospWifiSecurityType)() + SetWifiSsid(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_token_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_token_type.go new file mode 100644 index 000000000..06c1221c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enrollment_token_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerEnrollmentTokenType int + +const ( + // Default token type. + DEFAULT_ESCAPED_ANDROIDDEVICEOWNERENROLLMENTTOKENTYPE AndroidDeviceOwnerEnrollmentTokenType = iota + // Token type for Azure AD shared dedicated device enrollment. It applies to CorporateOwnedDedicatedDevice enrollment mode only. + CORPORATEOWNEDDEDICATEDDEVICEWITHAZUREADSHAREDMODE_ANDROIDDEVICEOWNERENROLLMENTTOKENTYPE +) + +func (i AndroidDeviceOwnerEnrollmentTokenType) String() string { + return []string{"default", "corporateOwnedDedicatedDeviceWithAzureADSharedMode"}[i] +} +func ParseAndroidDeviceOwnerEnrollmentTokenType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_ANDROIDDEVICEOWNERENROLLMENTTOKENTYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_ANDROIDDEVICEOWNERENROLLMENTTOKENTYPE + case "corporateOwnedDedicatedDeviceWithAzureADSharedMode": + result = CORPORATEOWNEDDEDICATEDDEVICEWITHAZUREADSHAREDMODE_ANDROIDDEVICEOWNERENROLLMENTTOKENTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerEnrollmentTokenType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerEnrollmentTokenType(values []AndroidDeviceOwnerEnrollmentTokenType) []string { + 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/android_device_owner_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..c258fc1b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration.go @@ -0,0 +1,278 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnterpriseWiFiConfiguration +type AndroidDeviceOwnerEnterpriseWiFiConfiguration struct { + AndroidDeviceOwnerWiFiConfiguration + // Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // Extensible Authentication Protocol (EAP) Configuration Types. + eapType *AndroidEapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. + identityCertificateForClientAuthentication AndroidDeviceOwnerCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. + innerAuthenticationProtocolForPeap *NonEapAuthenticationMethodForPeap + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. + outerIdentityPrivacyTemporaryValue *string + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. + rootCertificateForServerValidation AndroidDeviceOwnerTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string +} +// NewAndroidDeviceOwnerEnterpriseWiFiConfiguration instantiates a new AndroidDeviceOwnerEnterpriseWiFiConfiguration and sets the default values. +func NewAndroidDeviceOwnerEnterpriseWiFiConfiguration()(*AndroidDeviceOwnerEnterpriseWiFiConfiguration) { + m := &AndroidDeviceOwnerEnterpriseWiFiConfiguration{ + AndroidDeviceOwnerWiFiConfiguration: *NewAndroidDeviceOwnerWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetEapType()(*AndroidEapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*AndroidEapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(AndroidDeviceOwnerCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["innerAuthenticationProtocolForPeap"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForPeap) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForPeap(val.(*NonEapAuthenticationMethodForPeap)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(AndroidDeviceOwnerTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(AndroidDeviceOwnerCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetInnerAuthenticationProtocolForPeap gets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) { + return m.innerAuthenticationProtocolForPeap +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(AndroidDeviceOwnerTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForPeap() != nil { + cast := (*m.GetInnerAuthenticationProtocolForPeap()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForPeap", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetEapType(value *AndroidEapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value AndroidDeviceOwnerCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetInnerAuthenticationProtocolForPeap sets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() { + m.innerAuthenticationProtocolForPeap = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value AndroidDeviceOwnerTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidDeviceOwnerEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..79adf781e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse +type AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerEnterpriseWiFiConfigurationable +} +// NewAndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse instantiates a new AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse()(*AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) { + m := &AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]AndroidDeviceOwnerEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []AndroidDeviceOwnerEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..fb484e695 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseable +type AndroidDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerEnterpriseWiFiConfigurationable) + SetValue(value []AndroidDeviceOwnerEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..d452a0fc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_enterprise_wi_fi_configurationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerEnterpriseWiFiConfigurationable +type AndroidDeviceOwnerEnterpriseWiFiConfigurationable interface { + AndroidDeviceOwnerWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetEapType()(*AndroidEapType) + GetIdentityCertificateForClientAuthentication()(AndroidDeviceOwnerCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetRootCertificateForServerValidation()(AndroidDeviceOwnerTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetEapType(value *AndroidEapType)() + SetIdentityCertificateForClientAuthentication(value AndroidDeviceOwnerCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetRootCertificateForServerValidation(value AndroidDeviceOwnerTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration.go new file mode 100644 index 000000000..cb0dd6311 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration.go @@ -0,0 +1,3605 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGeneralDeviceConfiguration +type AndroidDeviceOwnerGeneralDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not adding or removing accounts is disabled. + accountsBlockModification *bool + // Indicates whether or not the user is allowed to enable to unknown sources setting. + appsAllowInstallFromUnknownSources *bool + // Indicates the value of the app auto update policy. Possible values are: notConfigured, userChoice, never, wiFiOnly, always. + appsAutoUpdatePolicy *AndroidDeviceOwnerAppAutoUpdatePolicyType + // Indicates the permission policy for requests for runtime permissions if one is not defined for the app specifically. Possible values are: deviceDefault, prompt, autoGrant, autoDeny. + appsDefaultPermissionPolicy *AndroidDeviceOwnerDefaultAppPermissionPolicyType + // Whether or not to recommend all apps skip any first-time-use hints they may have added. + appsRecommendSkippingFirstUseHints *bool + // A list of managed apps that will have their data cleared during a global sign-out in AAD shared device mode. This collection can contain a maximum of 500 elements. + azureAdSharedDeviceDataClearApps []AppListItemable + // Indicates whether or not to block a user from configuring bluetooth. + bluetoothBlockConfiguration *bool + // Indicates whether or not to block a user from sharing contacts via bluetooth. + bluetoothBlockContactSharing *bool + // Indicates whether or not to disable the use of the camera. + cameraBlocked *bool + // Indicates whether or not to block Wi-Fi tethering. + cellularBlockWiFiTethering *bool + // Indicates whether or not to block users from any certificate credential configuration. + certificateCredentialConfigurationDisabled *bool + // Indicates whether or not text copied from one profile (personal or work) can be pasted in the other. + crossProfilePoliciesAllowCopyPaste *bool + // Indicates whether data from one profile (personal or work) can be shared with apps in the other profile. Possible values are: notConfigured, crossProfileDataSharingBlocked, dataSharingFromWorkToPersonalBlocked, crossProfileDataSharingAllowed, unkownFutureValue. + crossProfilePoliciesAllowDataSharing *AndroidDeviceOwnerCrossProfileDataSharing + // Indicates whether or not contacts stored in work profile are shown in personal profile contact searches/incoming calls. + crossProfilePoliciesShowWorkContactsInPersonalProfile *bool + // Indicates whether or not to block a user from data roaming. + dataRoamingBlocked *bool + // Indicates whether or not to block the user from manually changing the date or time on the device + dateTimeConfigurationBlocked *bool + // Represents the customized detailed help text provided to users when they attempt to modify managed settings on their device. + detailedHelpText AndroidDeviceOwnerUserFacingMessageable + // Represents the customized lock screen message provided to users when they attempt to modify managed settings on their device. + deviceOwnerLockScreenMessage AndroidDeviceOwnerUserFacingMessageable + // Android Device Owner Enrollment Profile types. + enrollmentProfile *AndroidDeviceOwnerEnrollmentProfileType + // Indicates whether or not the factory reset option in settings is disabled. + factoryResetBlocked *bool + // List of Google account emails that will be required to authenticate after a device is factory reset before it can be set up. + factoryResetDeviceAdministratorEmails []string + // Proxy is set up directly with host, port and excluded hosts. + globalProxy AndroidDeviceOwnerGlobalProxyable + // Indicates whether or not google accounts will be blocked. + googleAccountsBlocked *bool + // Indicates whether a user can access the device's Settings app while in Kiosk Mode. + kioskCustomizationDeviceSettingsBlocked *bool + // Whether the power menu is shown when a user long presses the Power button of a device in Kiosk Mode. + kioskCustomizationPowerButtonActionsBlocked *bool + // Indicates whether system info and notifications are disabled in Kiosk Mode. Possible values are: notConfigured, notificationsAndSystemInfoEnabled, systemInfoOnly. + kioskCustomizationStatusBar *AndroidDeviceOwnerKioskCustomizationStatusBar + // Indicates whether system error dialogs for crashed or unresponsive apps are shown in Kiosk Mode. + kioskCustomizationSystemErrorWarnings *bool + // Indicates which navigation features are enabled in Kiosk Mode. Possible values are: notConfigured, navigationEnabled, homeButtonOnly. + kioskCustomizationSystemNavigation *AndroidDeviceOwnerKioskCustomizationSystemNavigation + // Whether or not to enable app ordering in Kiosk Mode. + kioskModeAppOrderEnabled *bool + // The ordering of items on Kiosk Mode Managed Home Screen. This collection can contain a maximum of 500 elements. + kioskModeAppPositions []AndroidDeviceOwnerKioskModeAppPositionItemable + // A list of managed apps that will be shown when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. + kioskModeApps []AppListItemable + // Whether or not to alphabetize applications within a folder in Kiosk Mode. + kioskModeAppsInFolderOrderedByName *bool + // Whether or not to allow a user to configure Bluetooth settings in Kiosk Mode. + kioskModeBluetoothConfigurationEnabled *bool + // Whether or not to allow a user to easy access to the debug menu in Kiosk Mode. + kioskModeDebugMenuEasyAccessEnabled *bool + // Exit code to allow a user to escape from Kiosk Mode when the device is in Kiosk Mode. + kioskModeExitCode *string + // Whether or not to allow a user to use the flashlight in Kiosk Mode. + kioskModeFlashlightConfigurationEnabled *bool + // Folder icon configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, darkSquare, darkCircle, lightSquare, lightCircle. + kioskModeFolderIcon *AndroidDeviceOwnerKioskModeFolderIcon + // Number of rows for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 + kioskModeGridHeight *int32 + // Number of columns for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 + kioskModeGridWidth *int32 + // Icon size configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, smallest, small, regular, large, largest. + kioskModeIconSize *AndroidDeviceOwnerKioskModeIconSize + // Whether or not to lock home screen to the end user in Kiosk Mode. + kioskModeLockHomeScreen *bool + // A list of managed folders for a device in Kiosk Mode. This collection can contain a maximum of 500 elements. + kioskModeManagedFolders []AndroidDeviceOwnerKioskModeManagedFolderable + // Whether or not to automatically sign-out of MHS and Shared device mode applications after inactive for Managed Home Screen. + kioskModeManagedHomeScreenAutoSignout *bool + // Number of seconds to give user notice before automatically signing them out for Managed Home Screen. Valid values 0 to 9999999 + kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds *int32 + // Number of seconds device is inactive before automatically signing user out for Managed Home Screen. Valid values 0 to 9999999 + kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds *int32 + // Complexity of PIN for sign-in session for Managed Home Screen. Possible values are: notConfigured, simple, complex. + kioskModeManagedHomeScreenPinComplexity *KioskModeManagedHomeScreenPinComplexity + // Whether or not require user to set a PIN for sign-in session for Managed Home Screen. + kioskModeManagedHomeScreenPinRequired *bool + // Whether or not required user to enter session PIN if screensaver has appeared for Managed Home Screen. + kioskModeManagedHomeScreenPinRequiredToResume *bool + // Custom URL background for sign-in screen for Managed Home Screen. + kioskModeManagedHomeScreenSignInBackground *string + // Custom URL branding logo for sign-in screen and session pin page for Managed Home Screen. + kioskModeManagedHomeScreenSignInBrandingLogo *string + // Whether or not show sign-in screen for Managed Home Screen. + kioskModeManagedHomeScreenSignInEnabled *bool + // Whether or not to display the Managed Settings entry point on the managed home screen in Kiosk Mode. + kioskModeManagedSettingsEntryDisabled *bool + // Whether or not to allow a user to change the media volume in Kiosk Mode. + kioskModeMediaVolumeConfigurationEnabled *bool + // Screen orientation configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, portrait, landscape, autoRotate. + kioskModeScreenOrientation *AndroidDeviceOwnerKioskModeScreenOrientation + // Whether or not to enable screen saver mode or not in Kiosk Mode. + kioskModeScreenSaverConfigurationEnabled *bool + // Whether or not the device screen should show the screen saver if audio/video is playing in Kiosk Mode. + kioskModeScreenSaverDetectMediaDisabled *bool + // The number of seconds that the device will display the screen saver for in Kiosk Mode. Valid values 0 to 9999999 + kioskModeScreenSaverDisplayTimeInSeconds *int32 + // URL for an image that will be the device's screen saver in Kiosk Mode. + kioskModeScreenSaverImageUrl *string + // The number of seconds the device needs to be inactive for before the screen saver is shown in Kiosk Mode. Valid values 1 to 9999999 + kioskModeScreenSaverStartDelayInSeconds *int32 + // Whether or not to display application notification badges in Kiosk Mode. + kioskModeShowAppNotificationBadge *bool + // Whether or not to allow a user to access basic device information. + kioskModeShowDeviceInfo *bool + // Whether or not to use single app kiosk mode or multi-app kiosk mode. Possible values are: notConfigured, singleAppMode, multiAppMode. + kioskModeUseManagedHomeScreenApp *KioskModeType + // Whether or not to display a virtual home button when the device is in Kiosk Mode. + kioskModeVirtualHomeButtonEnabled *bool + // Indicates whether the virtual home button is a swipe up home button or a floating home button. Possible values are: notConfigured, swipeUp, floating. + kioskModeVirtualHomeButtonType *AndroidDeviceOwnerVirtualHomeButtonType + // URL to a publicly accessible image to use for the wallpaper when the device is in Kiosk Mode. + kioskModeWallpaperUrl *string + // The restricted set of WIFI SSIDs available for the user to configure in Kiosk Mode. This collection can contain a maximum of 500 elements. + kioskModeWifiAllowedSsids []string + // Whether or not to allow a user to configure Wi-Fi settings in Kiosk Mode. + kioskModeWiFiConfigurationEnabled *bool + // Indicates whether or not to block unmuting the microphone on the device. + microphoneForceMute *bool + // Indicates whether or not to you want configure Microsoft Launcher. + microsoftLauncherConfigurationEnabled *bool + // Indicates whether or not the user can modify the wallpaper to personalize their device. + microsoftLauncherCustomWallpaperAllowUserModification *bool + // Indicates whether or not to configure the wallpaper on the targeted devices. + microsoftLauncherCustomWallpaperEnabled *bool + // Indicates the URL for the image file to use as the wallpaper on the targeted devices. + microsoftLauncherCustomWallpaperImageUrl *string + // Indicates whether or not the user can modify the device dock configuration on the device. + microsoftLauncherDockPresenceAllowUserModification *bool + // Indicates whether or not you want to configure the device dock. Possible values are: notConfigured, show, hide, disabled. + microsoftLauncherDockPresenceConfiguration *MicrosoftLauncherDockPresence + // Indicates whether or not the user can modify the launcher feed on the device. + microsoftLauncherFeedAllowUserModification *bool + // Indicates whether or not you want to enable the launcher feed on the device. + microsoftLauncherFeedEnabled *bool + // Indicates the search bar placement configuration on the device. Possible values are: notConfigured, top, bottom, hide. + microsoftLauncherSearchBarPlacementConfiguration *MicrosoftLauncherSearchBarPlacement + // Indicates whether or not the device will allow connecting to a temporary network connection at boot time. + networkEscapeHatchAllowed *bool + // Indicates whether or not to block NFC outgoing beam. + nfcBlockOutgoingBeam *bool + // Indicates whether or not the keyguard is disabled. + passwordBlockKeyguard *bool + // List of device keyguard features to block. This collection can contain a maximum of 11 elements. + passwordBlockKeyguardFeatures []AndroidKeyguardFeature + // Indicates the amount of time that a password can be set for before it expires and a new password will be required. Valid values 1 to 365 + passwordExpirationDays *int32 + // Indicates the minimum length of the password required on the device. Valid values 4 to 16 + passwordMinimumLength *int32 + // Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 + passwordMinimumLetterCharacters *int32 + // Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 + passwordMinimumLowerCaseCharacters *int32 + // Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 + passwordMinimumNonLetterCharacters *int32 + // Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 + passwordMinimumNumericCharacters *int32 + // Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 + passwordMinimumSymbolCharacters *int32 + // Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 + passwordMinimumUpperCaseCharacters *int32 + // Minutes of inactivity before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // Indicates the length of password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 + passwordPreviousPasswordCountToBlock *int32 + // Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. + passwordRequiredType *AndroidDeviceOwnerRequiredPasswordType + // Indicates the timeout period after which a device must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. + passwordRequireUnlock *AndroidDeviceOwnerRequiredPasswordUnlock + // Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 + passwordSignInFailureCountBeforeFactoryReset *int32 + // Indicates whether the user can install apps from unknown sources on the personal profile. + personalProfileAppsAllowInstallFromUnknownSources *bool + // Indicates whether to disable the use of the camera on the personal profile. + personalProfileCameraBlocked *bool + // Policy applied to applications in the personal profile. This collection can contain a maximum of 500 elements. + personalProfilePersonalApplications []AppListItemable + // Used together with PersonalProfilePersonalApplications to control how apps in the personal profile are allowed or blocked. Possible values are: notConfigured, blockedApps, allowedApps. + personalProfilePlayStoreMode *PersonalProfilePersonalPlayStoreMode + // Indicates whether to disable the capability to take screenshots on the personal profile. + personalProfileScreenCaptureBlocked *bool + // Indicates the Play Store mode of the device. Possible values are: notConfigured, allowList, blockList. + playStoreMode *AndroidDeviceOwnerPlayStoreMode + // Indicates whether or not to disable the capability to take screenshots. + screenCaptureBlocked *bool + // Represents the security common criteria mode enabled provided to users when they attempt to modify managed settings on their device. + securityCommonCriteriaModeEnabled *bool + // Indicates whether or not the user is allowed to access developer settings like developer options and safe boot on the device. + securityDeveloperSettingsEnabled *bool + // Indicates whether or not verify apps is required. + securityRequireVerifyApps *bool + // Represents the customized short help text provided to users when they attempt to modify managed settings on their device. + shortHelpText AndroidDeviceOwnerUserFacingMessageable + // Indicates whether or the status bar is disabled, including notifications, quick settings and other screen overlays. + statusBarBlocked *bool + // List of modes in which the device's display will stay powered-on. This collection can contain a maximum of 4 elements. + stayOnModes []AndroidDeviceOwnerBatteryPluggedMode + // Indicates whether or not to allow USB mass storage. + storageAllowUsb *bool + // Indicates whether or not to block external media. + storageBlockExternalMedia *bool + // Indicates whether or not to block USB file transfer. + storageBlockUsbFileTransfer *bool + // Indicates the annually repeating time periods during which system updates are postponed. This collection can contain a maximum of 500 elements. + systemUpdateFreezePeriods []AndroidDeviceOwnerSystemUpdateFreezePeriodable + // The type of system update configuration. Possible values are: deviceDefault, postpone, windowed, automatic. + systemUpdateInstallType *AndroidDeviceOwnerSystemUpdateInstallType + // Indicates the number of minutes after midnight that the system update window ends. Valid values 0 to 1440 + systemUpdateWindowEndMinutesAfterMidnight *int32 + // Indicates the number of minutes after midnight that the system update window starts. Valid values 0 to 1440 + systemUpdateWindowStartMinutesAfterMidnight *int32 + // Whether or not to block Android system prompt windows, like toasts, phone activities, and system alerts. + systemWindowsBlocked *bool + // Indicates whether or not adding users and profiles is disabled. + usersBlockAdd *bool + // Indicates whether or not to disable removing other users from the device. + usersBlockRemove *bool + // Indicates whether or not adjusting the master volume is disabled. + volumeBlockAdjustment *bool + // If an always on VPN package name is specified, whether or not to lock network traffic when that VPN is disconnected. + vpnAlwaysOnLockdownMode *bool + // Android app package name for app that will handle an always-on VPN connection. + vpnAlwaysOnPackageIdentifier *string + // Indicates whether or not to block the user from editing the wifi connection settings. + wifiBlockEditConfigurations *bool + // Indicates whether or not to block the user from editing just the networks defined by the policy. + wifiBlockEditPolicyDefinedConfigurations *bool + // Indicates the number of days that a work profile password can be set before it expires and a new password will be required. Valid values 1 to 365 + workProfilePasswordExpirationDays *int32 + // Indicates the minimum length of the work profile password. Valid values 4 to 16 + workProfilePasswordMinimumLength *int32 + // Indicates the minimum number of letter characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumLetterCharacters *int32 + // Indicates the minimum number of lower-case characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumLowerCaseCharacters *int32 + // Indicates the minimum number of non-letter characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumNonLetterCharacters *int32 + // Indicates the minimum number of numeric characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumNumericCharacters *int32 + // Indicates the minimum number of symbol characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumSymbolCharacters *int32 + // Indicates the minimum number of upper-case letter characters required for the work profile password. Valid values 1 to 16 + workProfilePasswordMinimumUpperCaseCharacters *int32 + // Indicates the length of the work profile password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 + workProfilePasswordPreviousPasswordCountToBlock *int32 + // Indicates the minimum password quality required on the work profile password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. + workProfilePasswordRequiredType *AndroidDeviceOwnerRequiredPasswordType + // Indicates the timeout period after which a work profile must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. + workProfilePasswordRequireUnlock *AndroidDeviceOwnerRequiredPasswordUnlock + // Indicates the number of times a user can enter an incorrect work profile password before the device is wiped. Valid values 4 to 11 + workProfilePasswordSignInFailureCountBeforeFactoryReset *int32 +} +// NewAndroidDeviceOwnerGeneralDeviceConfiguration instantiates a new AndroidDeviceOwnerGeneralDeviceConfiguration and sets the default values. +func NewAndroidDeviceOwnerGeneralDeviceConfiguration()(*AndroidDeviceOwnerGeneralDeviceConfiguration) { + m := &AndroidDeviceOwnerGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerGeneralDeviceConfiguration(), nil +} +// GetAccountsBlockModification gets the accountsBlockModification property value. Indicates whether or not adding or removing accounts is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAccountsBlockModification()(*bool) { + return m.accountsBlockModification +} +// GetAppsAllowInstallFromUnknownSources gets the appsAllowInstallFromUnknownSources property value. Indicates whether or not the user is allowed to enable to unknown sources setting. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAppsAllowInstallFromUnknownSources()(*bool) { + return m.appsAllowInstallFromUnknownSources +} +// GetAppsAutoUpdatePolicy gets the appsAutoUpdatePolicy property value. Indicates the value of the app auto update policy. Possible values are: notConfigured, userChoice, never, wiFiOnly, always. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAppsAutoUpdatePolicy()(*AndroidDeviceOwnerAppAutoUpdatePolicyType) { + return m.appsAutoUpdatePolicy +} +// GetAppsDefaultPermissionPolicy gets the appsDefaultPermissionPolicy property value. Indicates the permission policy for requests for runtime permissions if one is not defined for the app specifically. Possible values are: deviceDefault, prompt, autoGrant, autoDeny. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAppsDefaultPermissionPolicy()(*AndroidDeviceOwnerDefaultAppPermissionPolicyType) { + return m.appsDefaultPermissionPolicy +} +// GetAppsRecommendSkippingFirstUseHints gets the appsRecommendSkippingFirstUseHints property value. Whether or not to recommend all apps skip any first-time-use hints they may have added. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAppsRecommendSkippingFirstUseHints()(*bool) { + return m.appsRecommendSkippingFirstUseHints +} +// GetAzureAdSharedDeviceDataClearApps gets the azureAdSharedDeviceDataClearApps property value. A list of managed apps that will have their data cleared during a global sign-out in AAD shared device mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetAzureAdSharedDeviceDataClearApps()([]AppListItemable) { + return m.azureAdSharedDeviceDataClearApps +} +// GetBluetoothBlockConfiguration gets the bluetoothBlockConfiguration property value. Indicates whether or not to block a user from configuring bluetooth. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetBluetoothBlockConfiguration()(*bool) { + return m.bluetoothBlockConfiguration +} +// GetBluetoothBlockContactSharing gets the bluetoothBlockContactSharing property value. Indicates whether or not to block a user from sharing contacts via bluetooth. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetBluetoothBlockContactSharing()(*bool) { + return m.bluetoothBlockContactSharing +} +// GetCameraBlocked gets the cameraBlocked property value. Indicates whether or not to disable the use of the camera. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCameraBlocked()(*bool) { + return m.cameraBlocked +} +// GetCellularBlockWiFiTethering gets the cellularBlockWiFiTethering property value. Indicates whether or not to block Wi-Fi tethering. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCellularBlockWiFiTethering()(*bool) { + return m.cellularBlockWiFiTethering +} +// GetCertificateCredentialConfigurationDisabled gets the certificateCredentialConfigurationDisabled property value. Indicates whether or not to block users from any certificate credential configuration. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCertificateCredentialConfigurationDisabled()(*bool) { + return m.certificateCredentialConfigurationDisabled +} +// GetCrossProfilePoliciesAllowCopyPaste gets the crossProfilePoliciesAllowCopyPaste property value. Indicates whether or not text copied from one profile (personal or work) can be pasted in the other. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCrossProfilePoliciesAllowCopyPaste()(*bool) { + return m.crossProfilePoliciesAllowCopyPaste +} +// GetCrossProfilePoliciesAllowDataSharing gets the crossProfilePoliciesAllowDataSharing property value. Indicates whether data from one profile (personal or work) can be shared with apps in the other profile. Possible values are: notConfigured, crossProfileDataSharingBlocked, dataSharingFromWorkToPersonalBlocked, crossProfileDataSharingAllowed, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCrossProfilePoliciesAllowDataSharing()(*AndroidDeviceOwnerCrossProfileDataSharing) { + return m.crossProfilePoliciesAllowDataSharing +} +// GetCrossProfilePoliciesShowWorkContactsInPersonalProfile gets the crossProfilePoliciesShowWorkContactsInPersonalProfile property value. Indicates whether or not contacts stored in work profile are shown in personal profile contact searches/incoming calls. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetCrossProfilePoliciesShowWorkContactsInPersonalProfile()(*bool) { + return m.crossProfilePoliciesShowWorkContactsInPersonalProfile +} +// GetDataRoamingBlocked gets the dataRoamingBlocked property value. Indicates whether or not to block a user from data roaming. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetDataRoamingBlocked()(*bool) { + return m.dataRoamingBlocked +} +// GetDateTimeConfigurationBlocked gets the dateTimeConfigurationBlocked property value. Indicates whether or not to block the user from manually changing the date or time on the device +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetDateTimeConfigurationBlocked()(*bool) { + return m.dateTimeConfigurationBlocked +} +// GetDetailedHelpText gets the detailedHelpText property value. Represents the customized detailed help text provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetDetailedHelpText()(AndroidDeviceOwnerUserFacingMessageable) { + return m.detailedHelpText +} +// GetDeviceOwnerLockScreenMessage gets the deviceOwnerLockScreenMessage property value. Represents the customized lock screen message provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetDeviceOwnerLockScreenMessage()(AndroidDeviceOwnerUserFacingMessageable) { + return m.deviceOwnerLockScreenMessage +} +// GetEnrollmentProfile gets the enrollmentProfile property value. Android Device Owner Enrollment Profile types. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetEnrollmentProfile()(*AndroidDeviceOwnerEnrollmentProfileType) { + return m.enrollmentProfile +} +// GetFactoryResetBlocked gets the factoryResetBlocked property value. Indicates whether or not the factory reset option in settings is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetFactoryResetBlocked()(*bool) { + return m.factoryResetBlocked +} +// GetFactoryResetDeviceAdministratorEmails gets the factoryResetDeviceAdministratorEmails property value. List of Google account emails that will be required to authenticate after a device is factory reset before it can be set up. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetFactoryResetDeviceAdministratorEmails()([]string) { + return m.factoryResetDeviceAdministratorEmails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["accountsBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountsBlockModification(val) + } + return nil + } + res["appsAllowInstallFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsAllowInstallFromUnknownSources(val) + } + return nil + } + res["appsAutoUpdatePolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerAppAutoUpdatePolicyType) + if err != nil { + return err + } + if val != nil { + m.SetAppsAutoUpdatePolicy(val.(*AndroidDeviceOwnerAppAutoUpdatePolicyType)) + } + return nil + } + res["appsDefaultPermissionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerDefaultAppPermissionPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetAppsDefaultPermissionPolicy(val.(*AndroidDeviceOwnerDefaultAppPermissionPolicyType)) + } + return nil + } + res["appsRecommendSkippingFirstUseHints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsRecommendSkippingFirstUseHints(val) + } + return nil + } + res["azureAdSharedDeviceDataClearApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAzureAdSharedDeviceDataClearApps(res) + } + return nil + } + res["bluetoothBlockConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlockConfiguration(val) + } + return nil + } + res["bluetoothBlockContactSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlockContactSharing(val) + } + return nil + } + res["cameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraBlocked(val) + } + return nil + } + res["cellularBlockWiFiTethering"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockWiFiTethering(val) + } + return nil + } + res["certificateCredentialConfigurationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateCredentialConfigurationDisabled(val) + } + return nil + } + res["crossProfilePoliciesAllowCopyPaste"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCrossProfilePoliciesAllowCopyPaste(val) + } + return nil + } + res["crossProfilePoliciesAllowDataSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerCrossProfileDataSharing) + if err != nil { + return err + } + if val != nil { + m.SetCrossProfilePoliciesAllowDataSharing(val.(*AndroidDeviceOwnerCrossProfileDataSharing)) + } + return nil + } + res["crossProfilePoliciesShowWorkContactsInPersonalProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCrossProfilePoliciesShowWorkContactsInPersonalProfile(val) + } + return nil + } + res["dataRoamingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDataRoamingBlocked(val) + } + return nil + } + res["dateTimeConfigurationBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDateTimeConfigurationBlocked(val) + } + return nil + } + res["detailedHelpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerUserFacingMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetailedHelpText(val.(AndroidDeviceOwnerUserFacingMessageable)) + } + return nil + } + res["deviceOwnerLockScreenMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerUserFacingMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceOwnerLockScreenMessage(val.(AndroidDeviceOwnerUserFacingMessageable)) + } + return nil + } + res["enrollmentProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerEnrollmentProfileType) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentProfile(val.(*AndroidDeviceOwnerEnrollmentProfileType)) + } + return nil + } + res["factoryResetBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFactoryResetBlocked(val) + } + return nil + } + res["factoryResetDeviceAdministratorEmails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetFactoryResetDeviceAdministratorEmails(res) + } + return nil + } + res["globalProxy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerGlobalProxyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGlobalProxy(val.(AndroidDeviceOwnerGlobalProxyable)) + } + return nil + } + res["googleAccountsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGoogleAccountsBlocked(val) + } + return nil + } + res["kioskCustomizationDeviceSettingsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskCustomizationDeviceSettingsBlocked(val) + } + return nil + } + res["kioskCustomizationPowerButtonActionsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskCustomizationPowerButtonActionsBlocked(val) + } + return nil + } + res["kioskCustomizationStatusBar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerKioskCustomizationStatusBar) + if err != nil { + return err + } + if val != nil { + m.SetKioskCustomizationStatusBar(val.(*AndroidDeviceOwnerKioskCustomizationStatusBar)) + } + return nil + } + res["kioskCustomizationSystemErrorWarnings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskCustomizationSystemErrorWarnings(val) + } + return nil + } + res["kioskCustomizationSystemNavigation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerKioskCustomizationSystemNavigation) + if err != nil { + return err + } + if val != nil { + m.SetKioskCustomizationSystemNavigation(val.(*AndroidDeviceOwnerKioskCustomizationSystemNavigation)) + } + return nil + } + res["kioskModeAppOrderEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAppOrderEnabled(val) + } + return nil + } + res["kioskModeAppPositions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeAppPositionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeAppPositionItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeAppPositionItemable) + } + m.SetKioskModeAppPositions(res) + } + return nil + } + res["kioskModeApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetKioskModeApps(res) + } + return nil + } + res["kioskModeAppsInFolderOrderedByName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAppsInFolderOrderedByName(val) + } + return nil + } + res["kioskModeBluetoothConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBluetoothConfigurationEnabled(val) + } + return nil + } + res["kioskModeDebugMenuEasyAccessEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeDebugMenuEasyAccessEnabled(val) + } + return nil + } + res["kioskModeExitCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeExitCode(val) + } + return nil + } + res["kioskModeFlashlightConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeFlashlightConfigurationEnabled(val) + } + return nil + } + res["kioskModeFolderIcon"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerKioskModeFolderIcon) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeFolderIcon(val.(*AndroidDeviceOwnerKioskModeFolderIcon)) + } + return nil + } + res["kioskModeGridHeight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeGridHeight(val) + } + return nil + } + res["kioskModeGridWidth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeGridWidth(val) + } + return nil + } + res["kioskModeIconSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerKioskModeIconSize) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeIconSize(val.(*AndroidDeviceOwnerKioskModeIconSize)) + } + return nil + } + res["kioskModeLockHomeScreen"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeLockHomeScreen(val) + } + return nil + } + res["kioskModeManagedFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeManagedFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeManagedFolderable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeManagedFolderable) + } + m.SetKioskModeManagedFolders(res) + } + return nil + } + res["kioskModeManagedHomeScreenAutoSignout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenAutoSignout(val) + } + return nil + } + res["kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds(val) + } + return nil + } + res["kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds(val) + } + return nil + } + res["kioskModeManagedHomeScreenPinComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKioskModeManagedHomeScreenPinComplexity) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenPinComplexity(val.(*KioskModeManagedHomeScreenPinComplexity)) + } + return nil + } + res["kioskModeManagedHomeScreenPinRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenPinRequired(val) + } + return nil + } + res["kioskModeManagedHomeScreenPinRequiredToResume"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenPinRequiredToResume(val) + } + return nil + } + res["kioskModeManagedHomeScreenSignInBackground"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenSignInBackground(val) + } + return nil + } + res["kioskModeManagedHomeScreenSignInBrandingLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenSignInBrandingLogo(val) + } + return nil + } + res["kioskModeManagedHomeScreenSignInEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedHomeScreenSignInEnabled(val) + } + return nil + } + res["kioskModeManagedSettingsEntryDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedSettingsEntryDisabled(val) + } + return nil + } + res["kioskModeMediaVolumeConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeMediaVolumeConfigurationEnabled(val) + } + return nil + } + res["kioskModeScreenOrientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerKioskModeScreenOrientation) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenOrientation(val.(*AndroidDeviceOwnerKioskModeScreenOrientation)) + } + return nil + } + res["kioskModeScreenSaverConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenSaverConfigurationEnabled(val) + } + return nil + } + res["kioskModeScreenSaverDetectMediaDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenSaverDetectMediaDisabled(val) + } + return nil + } + res["kioskModeScreenSaverDisplayTimeInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenSaverDisplayTimeInSeconds(val) + } + return nil + } + res["kioskModeScreenSaverImageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenSaverImageUrl(val) + } + return nil + } + res["kioskModeScreenSaverStartDelayInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeScreenSaverStartDelayInSeconds(val) + } + return nil + } + res["kioskModeShowAppNotificationBadge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeShowAppNotificationBadge(val) + } + return nil + } + res["kioskModeShowDeviceInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeShowDeviceInfo(val) + } + return nil + } + res["kioskModeUseManagedHomeScreenApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKioskModeType) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeUseManagedHomeScreenApp(val.(*KioskModeType)) + } + return nil + } + res["kioskModeVirtualHomeButtonEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeVirtualHomeButtonEnabled(val) + } + return nil + } + res["kioskModeVirtualHomeButtonType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerVirtualHomeButtonType) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeVirtualHomeButtonType(val.(*AndroidDeviceOwnerVirtualHomeButtonType)) + } + return nil + } + res["kioskModeWallpaperUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeWallpaperUrl(val) + } + return nil + } + res["kioskModeWifiAllowedSsids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKioskModeWifiAllowedSsids(res) + } + return nil + } + res["kioskModeWiFiConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeWiFiConfigurationEnabled(val) + } + return nil + } + res["microphoneForceMute"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrophoneForceMute(val) + } + return nil + } + res["microsoftLauncherConfigurationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherConfigurationEnabled(val) + } + return nil + } + res["microsoftLauncherCustomWallpaperAllowUserModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherCustomWallpaperAllowUserModification(val) + } + return nil + } + res["microsoftLauncherCustomWallpaperEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherCustomWallpaperEnabled(val) + } + return nil + } + res["microsoftLauncherCustomWallpaperImageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherCustomWallpaperImageUrl(val) + } + return nil + } + res["microsoftLauncherDockPresenceAllowUserModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherDockPresenceAllowUserModification(val) + } + return nil + } + res["microsoftLauncherDockPresenceConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftLauncherDockPresence) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherDockPresenceConfiguration(val.(*MicrosoftLauncherDockPresence)) + } + return nil + } + res["microsoftLauncherFeedAllowUserModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherFeedAllowUserModification(val) + } + return nil + } + res["microsoftLauncherFeedEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherFeedEnabled(val) + } + return nil + } + res["microsoftLauncherSearchBarPlacementConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftLauncherSearchBarPlacement) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftLauncherSearchBarPlacementConfiguration(val.(*MicrosoftLauncherSearchBarPlacement)) + } + return nil + } + res["networkEscapeHatchAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkEscapeHatchAllowed(val) + } + return nil + } + res["nfcBlockOutgoingBeam"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNfcBlockOutgoingBeam(val) + } + return nil + } + res["passwordBlockKeyguard"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockKeyguard(val) + } + return nil + } + res["passwordBlockKeyguardFeatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAndroidKeyguardFeature) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidKeyguardFeature, len(val)) + for i, v := range val { + res[i] = *(v.(*AndroidKeyguardFeature)) + } + m.SetPasswordBlockKeyguardFeatures(res) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinimumLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLetterCharacters(val) + } + return nil + } + res["passwordMinimumLowerCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLowerCaseCharacters(val) + } + return nil + } + res["passwordMinimumNonLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumNonLetterCharacters(val) + } + return nil + } + res["passwordMinimumNumericCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumNumericCharacters(val) + } + return nil + } + res["passwordMinimumSymbolCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumSymbolCharacters(val) + } + return nil + } + res["passwordMinimumUpperCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumUpperCaseCharacters(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordPreviousPasswordCountToBlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordCountToBlock(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidDeviceOwnerRequiredPasswordType)) + } + return nil + } + res["passwordRequireUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordUnlock) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequireUnlock(val.(*AndroidDeviceOwnerRequiredPasswordUnlock)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["personalProfileAppsAllowInstallFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalProfileAppsAllowInstallFromUnknownSources(val) + } + return nil + } + res["personalProfileCameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalProfileCameraBlocked(val) + } + return nil + } + res["personalProfilePersonalApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetPersonalProfilePersonalApplications(res) + } + return nil + } + res["personalProfilePlayStoreMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePersonalProfilePersonalPlayStoreMode) + if err != nil { + return err + } + if val != nil { + m.SetPersonalProfilePlayStoreMode(val.(*PersonalProfilePersonalPlayStoreMode)) + } + return nil + } + res["personalProfileScreenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalProfileScreenCaptureBlocked(val) + } + return nil + } + res["playStoreMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerPlayStoreMode) + if err != nil { + return err + } + if val != nil { + m.SetPlayStoreMode(val.(*AndroidDeviceOwnerPlayStoreMode)) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["securityCommonCriteriaModeEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityCommonCriteriaModeEnabled(val) + } + return nil + } + res["securityDeveloperSettingsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDeveloperSettingsEnabled(val) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["shortHelpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerUserFacingMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShortHelpText(val.(AndroidDeviceOwnerUserFacingMessageable)) + } + return nil + } + res["statusBarBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusBarBlocked(val) + } + return nil + } + res["stayOnModes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAndroidDeviceOwnerBatteryPluggedMode) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerBatteryPluggedMode, len(val)) + for i, v := range val { + res[i] = *(v.(*AndroidDeviceOwnerBatteryPluggedMode)) + } + m.SetStayOnModes(res) + } + return nil + } + res["storageAllowUsb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageAllowUsb(val) + } + return nil + } + res["storageBlockExternalMedia"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockExternalMedia(val) + } + return nil + } + res["storageBlockUsbFileTransfer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockUsbFileTransfer(val) + } + return nil + } + res["systemUpdateFreezePeriods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSystemUpdateFreezePeriodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSystemUpdateFreezePeriodable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSystemUpdateFreezePeriodable) + } + m.SetSystemUpdateFreezePeriods(res) + } + return nil + } + res["systemUpdateInstallType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerSystemUpdateInstallType) + if err != nil { + return err + } + if val != nil { + m.SetSystemUpdateInstallType(val.(*AndroidDeviceOwnerSystemUpdateInstallType)) + } + return nil + } + res["systemUpdateWindowEndMinutesAfterMidnight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSystemUpdateWindowEndMinutesAfterMidnight(val) + } + return nil + } + res["systemUpdateWindowStartMinutesAfterMidnight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSystemUpdateWindowStartMinutesAfterMidnight(val) + } + return nil + } + res["systemWindowsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSystemWindowsBlocked(val) + } + return nil + } + res["usersBlockAdd"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUsersBlockAdd(val) + } + return nil + } + res["usersBlockRemove"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUsersBlockRemove(val) + } + return nil + } + res["volumeBlockAdjustment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVolumeBlockAdjustment(val) + } + return nil + } + res["vpnAlwaysOnLockdownMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnAlwaysOnLockdownMode(val) + } + return nil + } + res["vpnAlwaysOnPackageIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnAlwaysOnPackageIdentifier(val) + } + return nil + } + res["wifiBlockEditConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiBlockEditConfigurations(val) + } + return nil + } + res["wifiBlockEditPolicyDefinedConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiBlockEditPolicyDefinedConfigurations(val) + } + return nil + } + res["workProfilePasswordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordExpirationDays(val) + } + return nil + } + res["workProfilePasswordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumLength(val) + } + return nil + } + res["workProfilePasswordMinimumLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinimumLowerCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumLowerCaseCharacters(val) + } + return nil + } + res["workProfilePasswordMinimumNonLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumNonLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinimumNumericCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumNumericCharacters(val) + } + return nil + } + res["workProfilePasswordMinimumSymbolCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumSymbolCharacters(val) + } + return nil + } + res["workProfilePasswordMinimumUpperCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumUpperCaseCharacters(val) + } + return nil + } + res["workProfilePasswordPreviousPasswordCountToBlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordPreviousPasswordCountToBlock(val) + } + return nil + } + res["workProfilePasswordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordRequiredType(val.(*AndroidDeviceOwnerRequiredPasswordType)) + } + return nil + } + res["workProfilePasswordRequireUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordUnlock) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordRequireUnlock(val.(*AndroidDeviceOwnerRequiredPasswordUnlock)) + } + return nil + } + res["workProfilePasswordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + return res +} +// GetGlobalProxy gets the globalProxy property value. Proxy is set up directly with host, port and excluded hosts. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetGlobalProxy()(AndroidDeviceOwnerGlobalProxyable) { + return m.globalProxy +} +// GetGoogleAccountsBlocked gets the googleAccountsBlocked property value. Indicates whether or not google accounts will be blocked. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetGoogleAccountsBlocked()(*bool) { + return m.googleAccountsBlocked +} +// GetKioskCustomizationDeviceSettingsBlocked gets the kioskCustomizationDeviceSettingsBlocked property value. Indicates whether a user can access the device's Settings app while in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskCustomizationDeviceSettingsBlocked()(*bool) { + return m.kioskCustomizationDeviceSettingsBlocked +} +// GetKioskCustomizationPowerButtonActionsBlocked gets the kioskCustomizationPowerButtonActionsBlocked property value. Whether the power menu is shown when a user long presses the Power button of a device in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskCustomizationPowerButtonActionsBlocked()(*bool) { + return m.kioskCustomizationPowerButtonActionsBlocked +} +// GetKioskCustomizationStatusBar gets the kioskCustomizationStatusBar property value. Indicates whether system info and notifications are disabled in Kiosk Mode. Possible values are: notConfigured, notificationsAndSystemInfoEnabled, systemInfoOnly. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskCustomizationStatusBar()(*AndroidDeviceOwnerKioskCustomizationStatusBar) { + return m.kioskCustomizationStatusBar +} +// GetKioskCustomizationSystemErrorWarnings gets the kioskCustomizationSystemErrorWarnings property value. Indicates whether system error dialogs for crashed or unresponsive apps are shown in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskCustomizationSystemErrorWarnings()(*bool) { + return m.kioskCustomizationSystemErrorWarnings +} +// GetKioskCustomizationSystemNavigation gets the kioskCustomizationSystemNavigation property value. Indicates which navigation features are enabled in Kiosk Mode. Possible values are: notConfigured, navigationEnabled, homeButtonOnly. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskCustomizationSystemNavigation()(*AndroidDeviceOwnerKioskCustomizationSystemNavigation) { + return m.kioskCustomizationSystemNavigation +} +// GetKioskModeAppOrderEnabled gets the kioskModeAppOrderEnabled property value. Whether or not to enable app ordering in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeAppOrderEnabled()(*bool) { + return m.kioskModeAppOrderEnabled +} +// GetKioskModeAppPositions gets the kioskModeAppPositions property value. The ordering of items on Kiosk Mode Managed Home Screen. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeAppPositions()([]AndroidDeviceOwnerKioskModeAppPositionItemable) { + return m.kioskModeAppPositions +} +// GetKioskModeApps gets the kioskModeApps property value. A list of managed apps that will be shown when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeApps()([]AppListItemable) { + return m.kioskModeApps +} +// GetKioskModeAppsInFolderOrderedByName gets the kioskModeAppsInFolderOrderedByName property value. Whether or not to alphabetize applications within a folder in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeAppsInFolderOrderedByName()(*bool) { + return m.kioskModeAppsInFolderOrderedByName +} +// GetKioskModeBluetoothConfigurationEnabled gets the kioskModeBluetoothConfigurationEnabled property value. Whether or not to allow a user to configure Bluetooth settings in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeBluetoothConfigurationEnabled()(*bool) { + return m.kioskModeBluetoothConfigurationEnabled +} +// GetKioskModeDebugMenuEasyAccessEnabled gets the kioskModeDebugMenuEasyAccessEnabled property value. Whether or not to allow a user to easy access to the debug menu in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeDebugMenuEasyAccessEnabled()(*bool) { + return m.kioskModeDebugMenuEasyAccessEnabled +} +// GetKioskModeExitCode gets the kioskModeExitCode property value. Exit code to allow a user to escape from Kiosk Mode when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeExitCode()(*string) { + return m.kioskModeExitCode +} +// GetKioskModeFlashlightConfigurationEnabled gets the kioskModeFlashlightConfigurationEnabled property value. Whether or not to allow a user to use the flashlight in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeFlashlightConfigurationEnabled()(*bool) { + return m.kioskModeFlashlightConfigurationEnabled +} +// GetKioskModeFolderIcon gets the kioskModeFolderIcon property value. Folder icon configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, darkSquare, darkCircle, lightSquare, lightCircle. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeFolderIcon()(*AndroidDeviceOwnerKioskModeFolderIcon) { + return m.kioskModeFolderIcon +} +// GetKioskModeGridHeight gets the kioskModeGridHeight property value. Number of rows for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeGridHeight()(*int32) { + return m.kioskModeGridHeight +} +// GetKioskModeGridWidth gets the kioskModeGridWidth property value. Number of columns for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeGridWidth()(*int32) { + return m.kioskModeGridWidth +} +// GetKioskModeIconSize gets the kioskModeIconSize property value. Icon size configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, smallest, small, regular, large, largest. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeIconSize()(*AndroidDeviceOwnerKioskModeIconSize) { + return m.kioskModeIconSize +} +// GetKioskModeLockHomeScreen gets the kioskModeLockHomeScreen property value. Whether or not to lock home screen to the end user in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeLockHomeScreen()(*bool) { + return m.kioskModeLockHomeScreen +} +// GetKioskModeManagedFolders gets the kioskModeManagedFolders property value. A list of managed folders for a device in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedFolders()([]AndroidDeviceOwnerKioskModeManagedFolderable) { + return m.kioskModeManagedFolders +} +// GetKioskModeManagedHomeScreenAutoSignout gets the kioskModeManagedHomeScreenAutoSignout property value. Whether or not to automatically sign-out of MHS and Shared device mode applications after inactive for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenAutoSignout()(*bool) { + return m.kioskModeManagedHomeScreenAutoSignout +} +// GetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds gets the kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds property value. Number of seconds to give user notice before automatically signing them out for Managed Home Screen. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds()(*int32) { + return m.kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds +} +// GetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds gets the kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds property value. Number of seconds device is inactive before automatically signing user out for Managed Home Screen. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds()(*int32) { + return m.kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds +} +// GetKioskModeManagedHomeScreenPinComplexity gets the kioskModeManagedHomeScreenPinComplexity property value. Complexity of PIN for sign-in session for Managed Home Screen. Possible values are: notConfigured, simple, complex. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenPinComplexity()(*KioskModeManagedHomeScreenPinComplexity) { + return m.kioskModeManagedHomeScreenPinComplexity +} +// GetKioskModeManagedHomeScreenPinRequired gets the kioskModeManagedHomeScreenPinRequired property value. Whether or not require user to set a PIN for sign-in session for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenPinRequired()(*bool) { + return m.kioskModeManagedHomeScreenPinRequired +} +// GetKioskModeManagedHomeScreenPinRequiredToResume gets the kioskModeManagedHomeScreenPinRequiredToResume property value. Whether or not required user to enter session PIN if screensaver has appeared for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenPinRequiredToResume()(*bool) { + return m.kioskModeManagedHomeScreenPinRequiredToResume +} +// GetKioskModeManagedHomeScreenSignInBackground gets the kioskModeManagedHomeScreenSignInBackground property value. Custom URL background for sign-in screen for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenSignInBackground()(*string) { + return m.kioskModeManagedHomeScreenSignInBackground +} +// GetKioskModeManagedHomeScreenSignInBrandingLogo gets the kioskModeManagedHomeScreenSignInBrandingLogo property value. Custom URL branding logo for sign-in screen and session pin page for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenSignInBrandingLogo()(*string) { + return m.kioskModeManagedHomeScreenSignInBrandingLogo +} +// GetKioskModeManagedHomeScreenSignInEnabled gets the kioskModeManagedHomeScreenSignInEnabled property value. Whether or not show sign-in screen for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedHomeScreenSignInEnabled()(*bool) { + return m.kioskModeManagedHomeScreenSignInEnabled +} +// GetKioskModeManagedSettingsEntryDisabled gets the kioskModeManagedSettingsEntryDisabled property value. Whether or not to display the Managed Settings entry point on the managed home screen in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeManagedSettingsEntryDisabled()(*bool) { + return m.kioskModeManagedSettingsEntryDisabled +} +// GetKioskModeMediaVolumeConfigurationEnabled gets the kioskModeMediaVolumeConfigurationEnabled property value. Whether or not to allow a user to change the media volume in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeMediaVolumeConfigurationEnabled()(*bool) { + return m.kioskModeMediaVolumeConfigurationEnabled +} +// GetKioskModeScreenOrientation gets the kioskModeScreenOrientation property value. Screen orientation configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, portrait, landscape, autoRotate. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenOrientation()(*AndroidDeviceOwnerKioskModeScreenOrientation) { + return m.kioskModeScreenOrientation +} +// GetKioskModeScreenSaverConfigurationEnabled gets the kioskModeScreenSaverConfigurationEnabled property value. Whether or not to enable screen saver mode or not in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenSaverConfigurationEnabled()(*bool) { + return m.kioskModeScreenSaverConfigurationEnabled +} +// GetKioskModeScreenSaverDetectMediaDisabled gets the kioskModeScreenSaverDetectMediaDisabled property value. Whether or not the device screen should show the screen saver if audio/video is playing in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenSaverDetectMediaDisabled()(*bool) { + return m.kioskModeScreenSaverDetectMediaDisabled +} +// GetKioskModeScreenSaverDisplayTimeInSeconds gets the kioskModeScreenSaverDisplayTimeInSeconds property value. The number of seconds that the device will display the screen saver for in Kiosk Mode. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenSaverDisplayTimeInSeconds()(*int32) { + return m.kioskModeScreenSaverDisplayTimeInSeconds +} +// GetKioskModeScreenSaverImageUrl gets the kioskModeScreenSaverImageUrl property value. URL for an image that will be the device's screen saver in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenSaverImageUrl()(*string) { + return m.kioskModeScreenSaverImageUrl +} +// GetKioskModeScreenSaverStartDelayInSeconds gets the kioskModeScreenSaverStartDelayInSeconds property value. The number of seconds the device needs to be inactive for before the screen saver is shown in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeScreenSaverStartDelayInSeconds()(*int32) { + return m.kioskModeScreenSaverStartDelayInSeconds +} +// GetKioskModeShowAppNotificationBadge gets the kioskModeShowAppNotificationBadge property value. Whether or not to display application notification badges in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeShowAppNotificationBadge()(*bool) { + return m.kioskModeShowAppNotificationBadge +} +// GetKioskModeShowDeviceInfo gets the kioskModeShowDeviceInfo property value. Whether or not to allow a user to access basic device information. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeShowDeviceInfo()(*bool) { + return m.kioskModeShowDeviceInfo +} +// GetKioskModeUseManagedHomeScreenApp gets the kioskModeUseManagedHomeScreenApp property value. Whether or not to use single app kiosk mode or multi-app kiosk mode. Possible values are: notConfigured, singleAppMode, multiAppMode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeUseManagedHomeScreenApp()(*KioskModeType) { + return m.kioskModeUseManagedHomeScreenApp +} +// GetKioskModeVirtualHomeButtonEnabled gets the kioskModeVirtualHomeButtonEnabled property value. Whether or not to display a virtual home button when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeVirtualHomeButtonEnabled()(*bool) { + return m.kioskModeVirtualHomeButtonEnabled +} +// GetKioskModeVirtualHomeButtonType gets the kioskModeVirtualHomeButtonType property value. Indicates whether the virtual home button is a swipe up home button or a floating home button. Possible values are: notConfigured, swipeUp, floating. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeVirtualHomeButtonType()(*AndroidDeviceOwnerVirtualHomeButtonType) { + return m.kioskModeVirtualHomeButtonType +} +// GetKioskModeWallpaperUrl gets the kioskModeWallpaperUrl property value. URL to a publicly accessible image to use for the wallpaper when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeWallpaperUrl()(*string) { + return m.kioskModeWallpaperUrl +} +// GetKioskModeWifiAllowedSsids gets the kioskModeWifiAllowedSsids property value. The restricted set of WIFI SSIDs available for the user to configure in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeWifiAllowedSsids()([]string) { + return m.kioskModeWifiAllowedSsids +} +// GetKioskModeWiFiConfigurationEnabled gets the kioskModeWiFiConfigurationEnabled property value. Whether or not to allow a user to configure Wi-Fi settings in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetKioskModeWiFiConfigurationEnabled()(*bool) { + return m.kioskModeWiFiConfigurationEnabled +} +// GetMicrophoneForceMute gets the microphoneForceMute property value. Indicates whether or not to block unmuting the microphone on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrophoneForceMute()(*bool) { + return m.microphoneForceMute +} +// GetMicrosoftLauncherConfigurationEnabled gets the microsoftLauncherConfigurationEnabled property value. Indicates whether or not to you want configure Microsoft Launcher. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherConfigurationEnabled()(*bool) { + return m.microsoftLauncherConfigurationEnabled +} +// GetMicrosoftLauncherCustomWallpaperAllowUserModification gets the microsoftLauncherCustomWallpaperAllowUserModification property value. Indicates whether or not the user can modify the wallpaper to personalize their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherCustomWallpaperAllowUserModification()(*bool) { + return m.microsoftLauncherCustomWallpaperAllowUserModification +} +// GetMicrosoftLauncherCustomWallpaperEnabled gets the microsoftLauncherCustomWallpaperEnabled property value. Indicates whether or not to configure the wallpaper on the targeted devices. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherCustomWallpaperEnabled()(*bool) { + return m.microsoftLauncherCustomWallpaperEnabled +} +// GetMicrosoftLauncherCustomWallpaperImageUrl gets the microsoftLauncherCustomWallpaperImageUrl property value. Indicates the URL for the image file to use as the wallpaper on the targeted devices. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherCustomWallpaperImageUrl()(*string) { + return m.microsoftLauncherCustomWallpaperImageUrl +} +// GetMicrosoftLauncherDockPresenceAllowUserModification gets the microsoftLauncherDockPresenceAllowUserModification property value. Indicates whether or not the user can modify the device dock configuration on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherDockPresenceAllowUserModification()(*bool) { + return m.microsoftLauncherDockPresenceAllowUserModification +} +// GetMicrosoftLauncherDockPresenceConfiguration gets the microsoftLauncherDockPresenceConfiguration property value. Indicates whether or not you want to configure the device dock. Possible values are: notConfigured, show, hide, disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherDockPresenceConfiguration()(*MicrosoftLauncherDockPresence) { + return m.microsoftLauncherDockPresenceConfiguration +} +// GetMicrosoftLauncherFeedAllowUserModification gets the microsoftLauncherFeedAllowUserModification property value. Indicates whether or not the user can modify the launcher feed on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherFeedAllowUserModification()(*bool) { + return m.microsoftLauncherFeedAllowUserModification +} +// GetMicrosoftLauncherFeedEnabled gets the microsoftLauncherFeedEnabled property value. Indicates whether or not you want to enable the launcher feed on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherFeedEnabled()(*bool) { + return m.microsoftLauncherFeedEnabled +} +// GetMicrosoftLauncherSearchBarPlacementConfiguration gets the microsoftLauncherSearchBarPlacementConfiguration property value. Indicates the search bar placement configuration on the device. Possible values are: notConfigured, top, bottom, hide. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetMicrosoftLauncherSearchBarPlacementConfiguration()(*MicrosoftLauncherSearchBarPlacement) { + return m.microsoftLauncherSearchBarPlacementConfiguration +} +// GetNetworkEscapeHatchAllowed gets the networkEscapeHatchAllowed property value. Indicates whether or not the device will allow connecting to a temporary network connection at boot time. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetNetworkEscapeHatchAllowed()(*bool) { + return m.networkEscapeHatchAllowed +} +// GetNfcBlockOutgoingBeam gets the nfcBlockOutgoingBeam property value. Indicates whether or not to block NFC outgoing beam. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetNfcBlockOutgoingBeam()(*bool) { + return m.nfcBlockOutgoingBeam +} +// GetPasswordBlockKeyguard gets the passwordBlockKeyguard property value. Indicates whether or not the keyguard is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordBlockKeyguard()(*bool) { + return m.passwordBlockKeyguard +} +// GetPasswordBlockKeyguardFeatures gets the passwordBlockKeyguardFeatures property value. List of device keyguard features to block. This collection can contain a maximum of 11 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordBlockKeyguardFeatures()([]AndroidKeyguardFeature) { + return m.passwordBlockKeyguardFeatures +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Indicates the amount of time that a password can be set for before it expires and a new password will be required. Valid values 1 to 365 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Indicates the minimum length of the password required on the device. Valid values 4 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinimumLetterCharacters gets the passwordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumLetterCharacters()(*int32) { + return m.passwordMinimumLetterCharacters +} +// GetPasswordMinimumLowerCaseCharacters gets the passwordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumLowerCaseCharacters()(*int32) { + return m.passwordMinimumLowerCaseCharacters +} +// GetPasswordMinimumNonLetterCharacters gets the passwordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumNonLetterCharacters()(*int32) { + return m.passwordMinimumNonLetterCharacters +} +// GetPasswordMinimumNumericCharacters gets the passwordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumNumericCharacters()(*int32) { + return m.passwordMinimumNumericCharacters +} +// GetPasswordMinimumSymbolCharacters gets the passwordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumSymbolCharacters()(*int32) { + return m.passwordMinimumSymbolCharacters +} +// GetPasswordMinimumUpperCaseCharacters gets the passwordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinimumUpperCaseCharacters()(*int32) { + return m.passwordMinimumUpperCaseCharacters +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordPreviousPasswordCountToBlock gets the passwordPreviousPasswordCountToBlock property value. Indicates the length of password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordPreviousPasswordCountToBlock()(*int32) { + return m.passwordPreviousPasswordCountToBlock +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordRequireUnlock gets the passwordRequireUnlock property value. Indicates the timeout period after which a device must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordRequireUnlock()(*AndroidDeviceOwnerRequiredPasswordUnlock) { + return m.passwordRequireUnlock +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetPersonalProfileAppsAllowInstallFromUnknownSources gets the personalProfileAppsAllowInstallFromUnknownSources property value. Indicates whether the user can install apps from unknown sources on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPersonalProfileAppsAllowInstallFromUnknownSources()(*bool) { + return m.personalProfileAppsAllowInstallFromUnknownSources +} +// GetPersonalProfileCameraBlocked gets the personalProfileCameraBlocked property value. Indicates whether to disable the use of the camera on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPersonalProfileCameraBlocked()(*bool) { + return m.personalProfileCameraBlocked +} +// GetPersonalProfilePersonalApplications gets the personalProfilePersonalApplications property value. Policy applied to applications in the personal profile. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPersonalProfilePersonalApplications()([]AppListItemable) { + return m.personalProfilePersonalApplications +} +// GetPersonalProfilePlayStoreMode gets the personalProfilePlayStoreMode property value. Used together with PersonalProfilePersonalApplications to control how apps in the personal profile are allowed or blocked. Possible values are: notConfigured, blockedApps, allowedApps. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPersonalProfilePlayStoreMode()(*PersonalProfilePersonalPlayStoreMode) { + return m.personalProfilePlayStoreMode +} +// GetPersonalProfileScreenCaptureBlocked gets the personalProfileScreenCaptureBlocked property value. Indicates whether to disable the capability to take screenshots on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPersonalProfileScreenCaptureBlocked()(*bool) { + return m.personalProfileScreenCaptureBlocked +} +// GetPlayStoreMode gets the playStoreMode property value. Indicates the Play Store mode of the device. Possible values are: notConfigured, allowList, blockList. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetPlayStoreMode()(*AndroidDeviceOwnerPlayStoreMode) { + return m.playStoreMode +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether or not to disable the capability to take screenshots. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetSecurityCommonCriteriaModeEnabled gets the securityCommonCriteriaModeEnabled property value. Represents the security common criteria mode enabled provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSecurityCommonCriteriaModeEnabled()(*bool) { + return m.securityCommonCriteriaModeEnabled +} +// GetSecurityDeveloperSettingsEnabled gets the securityDeveloperSettingsEnabled property value. Indicates whether or not the user is allowed to access developer settings like developer options and safe boot on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSecurityDeveloperSettingsEnabled()(*bool) { + return m.securityDeveloperSettingsEnabled +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Indicates whether or not verify apps is required. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetShortHelpText gets the shortHelpText property value. Represents the customized short help text provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetShortHelpText()(AndroidDeviceOwnerUserFacingMessageable) { + return m.shortHelpText +} +// GetStatusBarBlocked gets the statusBarBlocked property value. Indicates whether or the status bar is disabled, including notifications, quick settings and other screen overlays. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetStatusBarBlocked()(*bool) { + return m.statusBarBlocked +} +// GetStayOnModes gets the stayOnModes property value. List of modes in which the device's display will stay powered-on. This collection can contain a maximum of 4 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetStayOnModes()([]AndroidDeviceOwnerBatteryPluggedMode) { + return m.stayOnModes +} +// GetStorageAllowUsb gets the storageAllowUsb property value. Indicates whether or not to allow USB mass storage. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetStorageAllowUsb()(*bool) { + return m.storageAllowUsb +} +// GetStorageBlockExternalMedia gets the storageBlockExternalMedia property value. Indicates whether or not to block external media. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetStorageBlockExternalMedia()(*bool) { + return m.storageBlockExternalMedia +} +// GetStorageBlockUsbFileTransfer gets the storageBlockUsbFileTransfer property value. Indicates whether or not to block USB file transfer. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetStorageBlockUsbFileTransfer()(*bool) { + return m.storageBlockUsbFileTransfer +} +// GetSystemUpdateFreezePeriods gets the systemUpdateFreezePeriods property value. Indicates the annually repeating time periods during which system updates are postponed. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSystemUpdateFreezePeriods()([]AndroidDeviceOwnerSystemUpdateFreezePeriodable) { + return m.systemUpdateFreezePeriods +} +// GetSystemUpdateInstallType gets the systemUpdateInstallType property value. The type of system update configuration. Possible values are: deviceDefault, postpone, windowed, automatic. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSystemUpdateInstallType()(*AndroidDeviceOwnerSystemUpdateInstallType) { + return m.systemUpdateInstallType +} +// GetSystemUpdateWindowEndMinutesAfterMidnight gets the systemUpdateWindowEndMinutesAfterMidnight property value. Indicates the number of minutes after midnight that the system update window ends. Valid values 0 to 1440 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSystemUpdateWindowEndMinutesAfterMidnight()(*int32) { + return m.systemUpdateWindowEndMinutesAfterMidnight +} +// GetSystemUpdateWindowStartMinutesAfterMidnight gets the systemUpdateWindowStartMinutesAfterMidnight property value. Indicates the number of minutes after midnight that the system update window starts. Valid values 0 to 1440 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSystemUpdateWindowStartMinutesAfterMidnight()(*int32) { + return m.systemUpdateWindowStartMinutesAfterMidnight +} +// GetSystemWindowsBlocked gets the systemWindowsBlocked property value. Whether or not to block Android system prompt windows, like toasts, phone activities, and system alerts. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetSystemWindowsBlocked()(*bool) { + return m.systemWindowsBlocked +} +// GetUsersBlockAdd gets the usersBlockAdd property value. Indicates whether or not adding users and profiles is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetUsersBlockAdd()(*bool) { + return m.usersBlockAdd +} +// GetUsersBlockRemove gets the usersBlockRemove property value. Indicates whether or not to disable removing other users from the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetUsersBlockRemove()(*bool) { + return m.usersBlockRemove +} +// GetVolumeBlockAdjustment gets the volumeBlockAdjustment property value. Indicates whether or not adjusting the master volume is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetVolumeBlockAdjustment()(*bool) { + return m.volumeBlockAdjustment +} +// GetVpnAlwaysOnLockdownMode gets the vpnAlwaysOnLockdownMode property value. If an always on VPN package name is specified, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetVpnAlwaysOnLockdownMode()(*bool) { + return m.vpnAlwaysOnLockdownMode +} +// GetVpnAlwaysOnPackageIdentifier gets the vpnAlwaysOnPackageIdentifier property value. Android app package name for app that will handle an always-on VPN connection. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetVpnAlwaysOnPackageIdentifier()(*string) { + return m.vpnAlwaysOnPackageIdentifier +} +// GetWifiBlockEditConfigurations gets the wifiBlockEditConfigurations property value. Indicates whether or not to block the user from editing the wifi connection settings. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWifiBlockEditConfigurations()(*bool) { + return m.wifiBlockEditConfigurations +} +// GetWifiBlockEditPolicyDefinedConfigurations gets the wifiBlockEditPolicyDefinedConfigurations property value. Indicates whether or not to block the user from editing just the networks defined by the policy. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWifiBlockEditPolicyDefinedConfigurations()(*bool) { + return m.wifiBlockEditPolicyDefinedConfigurations +} +// GetWorkProfilePasswordExpirationDays gets the workProfilePasswordExpirationDays property value. Indicates the number of days that a work profile password can be set before it expires and a new password will be required. Valid values 1 to 365 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordExpirationDays()(*int32) { + return m.workProfilePasswordExpirationDays +} +// GetWorkProfilePasswordMinimumLength gets the workProfilePasswordMinimumLength property value. Indicates the minimum length of the work profile password. Valid values 4 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumLength()(*int32) { + return m.workProfilePasswordMinimumLength +} +// GetWorkProfilePasswordMinimumLetterCharacters gets the workProfilePasswordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumLetterCharacters()(*int32) { + return m.workProfilePasswordMinimumLetterCharacters +} +// GetWorkProfilePasswordMinimumLowerCaseCharacters gets the workProfilePasswordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower-case characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumLowerCaseCharacters()(*int32) { + return m.workProfilePasswordMinimumLowerCaseCharacters +} +// GetWorkProfilePasswordMinimumNonLetterCharacters gets the workProfilePasswordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumNonLetterCharacters()(*int32) { + return m.workProfilePasswordMinimumNonLetterCharacters +} +// GetWorkProfilePasswordMinimumNumericCharacters gets the workProfilePasswordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumNumericCharacters()(*int32) { + return m.workProfilePasswordMinimumNumericCharacters +} +// GetWorkProfilePasswordMinimumSymbolCharacters gets the workProfilePasswordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumSymbolCharacters()(*int32) { + return m.workProfilePasswordMinimumSymbolCharacters +} +// GetWorkProfilePasswordMinimumUpperCaseCharacters gets the workProfilePasswordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper-case letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumUpperCaseCharacters()(*int32) { + return m.workProfilePasswordMinimumUpperCaseCharacters +} +// GetWorkProfilePasswordPreviousPasswordCountToBlock gets the workProfilePasswordPreviousPasswordCountToBlock property value. Indicates the length of the work profile password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordPreviousPasswordCountToBlock()(*int32) { + return m.workProfilePasswordPreviousPasswordCountToBlock +} +// GetWorkProfilePasswordRequiredType gets the workProfilePasswordRequiredType property value. Indicates the minimum password quality required on the work profile password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) { + return m.workProfilePasswordRequiredType +} +// GetWorkProfilePasswordRequireUnlock gets the workProfilePasswordRequireUnlock property value. Indicates the timeout period after which a work profile must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordRequireUnlock()(*AndroidDeviceOwnerRequiredPasswordUnlock) { + return m.workProfilePasswordRequireUnlock +} +// GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset gets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect work profile password before the device is wiped. Valid values 4 to 11 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.workProfilePasswordSignInFailureCountBeforeFactoryReset +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountsBlockModification", m.GetAccountsBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appsAllowInstallFromUnknownSources", m.GetAppsAllowInstallFromUnknownSources()) + if err != nil { + return err + } + } + if m.GetAppsAutoUpdatePolicy() != nil { + cast := (*m.GetAppsAutoUpdatePolicy()).String() + err = writer.WriteStringValue("appsAutoUpdatePolicy", &cast) + if err != nil { + return err + } + } + if m.GetAppsDefaultPermissionPolicy() != nil { + cast := (*m.GetAppsDefaultPermissionPolicy()).String() + err = writer.WriteStringValue("appsDefaultPermissionPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appsRecommendSkippingFirstUseHints", m.GetAppsRecommendSkippingFirstUseHints()) + if err != nil { + return err + } + } + if m.GetAzureAdSharedDeviceDataClearApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAzureAdSharedDeviceDataClearApps())) + for i, v := range m.GetAzureAdSharedDeviceDataClearApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("azureAdSharedDeviceDataClearApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlockConfiguration", m.GetBluetoothBlockConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlockContactSharing", m.GetBluetoothBlockContactSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cameraBlocked", m.GetCameraBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockWiFiTethering", m.GetCellularBlockWiFiTethering()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("certificateCredentialConfigurationDisabled", m.GetCertificateCredentialConfigurationDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("crossProfilePoliciesAllowCopyPaste", m.GetCrossProfilePoliciesAllowCopyPaste()) + if err != nil { + return err + } + } + if m.GetCrossProfilePoliciesAllowDataSharing() != nil { + cast := (*m.GetCrossProfilePoliciesAllowDataSharing()).String() + err = writer.WriteStringValue("crossProfilePoliciesAllowDataSharing", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("crossProfilePoliciesShowWorkContactsInPersonalProfile", m.GetCrossProfilePoliciesShowWorkContactsInPersonalProfile()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dataRoamingBlocked", m.GetDataRoamingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dateTimeConfigurationBlocked", m.GetDateTimeConfigurationBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("detailedHelpText", m.GetDetailedHelpText()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceOwnerLockScreenMessage", m.GetDeviceOwnerLockScreenMessage()) + if err != nil { + return err + } + } + if m.GetEnrollmentProfile() != nil { + cast := (*m.GetEnrollmentProfile()).String() + err = writer.WriteStringValue("enrollmentProfile", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("factoryResetBlocked", m.GetFactoryResetBlocked()) + if err != nil { + return err + } + } + if m.GetFactoryResetDeviceAdministratorEmails() != nil { + err = writer.WriteCollectionOfStringValues("factoryResetDeviceAdministratorEmails", m.GetFactoryResetDeviceAdministratorEmails()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("globalProxy", m.GetGlobalProxy()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("googleAccountsBlocked", m.GetGoogleAccountsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskCustomizationDeviceSettingsBlocked", m.GetKioskCustomizationDeviceSettingsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskCustomizationPowerButtonActionsBlocked", m.GetKioskCustomizationPowerButtonActionsBlocked()) + if err != nil { + return err + } + } + if m.GetKioskCustomizationStatusBar() != nil { + cast := (*m.GetKioskCustomizationStatusBar()).String() + err = writer.WriteStringValue("kioskCustomizationStatusBar", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskCustomizationSystemErrorWarnings", m.GetKioskCustomizationSystemErrorWarnings()) + if err != nil { + return err + } + } + if m.GetKioskCustomizationSystemNavigation() != nil { + cast := (*m.GetKioskCustomizationSystemNavigation()).String() + err = writer.WriteStringValue("kioskCustomizationSystemNavigation", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAppOrderEnabled", m.GetKioskModeAppOrderEnabled()) + if err != nil { + return err + } + } + if m.GetKioskModeAppPositions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKioskModeAppPositions())) + for i, v := range m.GetKioskModeAppPositions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("kioskModeAppPositions", cast) + if err != nil { + return err + } + } + if m.GetKioskModeApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKioskModeApps())) + for i, v := range m.GetKioskModeApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("kioskModeApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAppsInFolderOrderedByName", m.GetKioskModeAppsInFolderOrderedByName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBluetoothConfigurationEnabled", m.GetKioskModeBluetoothConfigurationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeDebugMenuEasyAccessEnabled", m.GetKioskModeDebugMenuEasyAccessEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeExitCode", m.GetKioskModeExitCode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeFlashlightConfigurationEnabled", m.GetKioskModeFlashlightConfigurationEnabled()) + if err != nil { + return err + } + } + if m.GetKioskModeFolderIcon() != nil { + cast := (*m.GetKioskModeFolderIcon()).String() + err = writer.WriteStringValue("kioskModeFolderIcon", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeGridHeight", m.GetKioskModeGridHeight()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeGridWidth", m.GetKioskModeGridWidth()) + if err != nil { + return err + } + } + if m.GetKioskModeIconSize() != nil { + cast := (*m.GetKioskModeIconSize()).String() + err = writer.WriteStringValue("kioskModeIconSize", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeLockHomeScreen", m.GetKioskModeLockHomeScreen()) + if err != nil { + return err + } + } + if m.GetKioskModeManagedFolders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKioskModeManagedFolders())) + for i, v := range m.GetKioskModeManagedFolders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("kioskModeManagedFolders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeManagedHomeScreenAutoSignout", m.GetKioskModeManagedHomeScreenAutoSignout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds", m.GetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds", m.GetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds()) + if err != nil { + return err + } + } + if m.GetKioskModeManagedHomeScreenPinComplexity() != nil { + cast := (*m.GetKioskModeManagedHomeScreenPinComplexity()).String() + err = writer.WriteStringValue("kioskModeManagedHomeScreenPinComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeManagedHomeScreenPinRequired", m.GetKioskModeManagedHomeScreenPinRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeManagedHomeScreenPinRequiredToResume", m.GetKioskModeManagedHomeScreenPinRequiredToResume()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeManagedHomeScreenSignInBackground", m.GetKioskModeManagedHomeScreenSignInBackground()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeManagedHomeScreenSignInBrandingLogo", m.GetKioskModeManagedHomeScreenSignInBrandingLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeManagedHomeScreenSignInEnabled", m.GetKioskModeManagedHomeScreenSignInEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeManagedSettingsEntryDisabled", m.GetKioskModeManagedSettingsEntryDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeMediaVolumeConfigurationEnabled", m.GetKioskModeMediaVolumeConfigurationEnabled()) + if err != nil { + return err + } + } + if m.GetKioskModeScreenOrientation() != nil { + cast := (*m.GetKioskModeScreenOrientation()).String() + err = writer.WriteStringValue("kioskModeScreenOrientation", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeScreenSaverConfigurationEnabled", m.GetKioskModeScreenSaverConfigurationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeScreenSaverDetectMediaDisabled", m.GetKioskModeScreenSaverDetectMediaDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeScreenSaverDisplayTimeInSeconds", m.GetKioskModeScreenSaverDisplayTimeInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeScreenSaverImageUrl", m.GetKioskModeScreenSaverImageUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("kioskModeScreenSaverStartDelayInSeconds", m.GetKioskModeScreenSaverStartDelayInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeShowAppNotificationBadge", m.GetKioskModeShowAppNotificationBadge()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeShowDeviceInfo", m.GetKioskModeShowDeviceInfo()) + if err != nil { + return err + } + } + if m.GetKioskModeUseManagedHomeScreenApp() != nil { + cast := (*m.GetKioskModeUseManagedHomeScreenApp()).String() + err = writer.WriteStringValue("kioskModeUseManagedHomeScreenApp", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeVirtualHomeButtonEnabled", m.GetKioskModeVirtualHomeButtonEnabled()) + if err != nil { + return err + } + } + if m.GetKioskModeVirtualHomeButtonType() != nil { + cast := (*m.GetKioskModeVirtualHomeButtonType()).String() + err = writer.WriteStringValue("kioskModeVirtualHomeButtonType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeWallpaperUrl", m.GetKioskModeWallpaperUrl()) + if err != nil { + return err + } + } + if m.GetKioskModeWifiAllowedSsids() != nil { + err = writer.WriteCollectionOfStringValues("kioskModeWifiAllowedSsids", m.GetKioskModeWifiAllowedSsids()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeWiFiConfigurationEnabled", m.GetKioskModeWiFiConfigurationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microphoneForceMute", m.GetMicrophoneForceMute()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherConfigurationEnabled", m.GetMicrosoftLauncherConfigurationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherCustomWallpaperAllowUserModification", m.GetMicrosoftLauncherCustomWallpaperAllowUserModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherCustomWallpaperEnabled", m.GetMicrosoftLauncherCustomWallpaperEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("microsoftLauncherCustomWallpaperImageUrl", m.GetMicrosoftLauncherCustomWallpaperImageUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherDockPresenceAllowUserModification", m.GetMicrosoftLauncherDockPresenceAllowUserModification()) + if err != nil { + return err + } + } + if m.GetMicrosoftLauncherDockPresenceConfiguration() != nil { + cast := (*m.GetMicrosoftLauncherDockPresenceConfiguration()).String() + err = writer.WriteStringValue("microsoftLauncherDockPresenceConfiguration", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherFeedAllowUserModification", m.GetMicrosoftLauncherFeedAllowUserModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftLauncherFeedEnabled", m.GetMicrosoftLauncherFeedEnabled()) + if err != nil { + return err + } + } + if m.GetMicrosoftLauncherSearchBarPlacementConfiguration() != nil { + cast := (*m.GetMicrosoftLauncherSearchBarPlacementConfiguration()).String() + err = writer.WriteStringValue("microsoftLauncherSearchBarPlacementConfiguration", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("networkEscapeHatchAllowed", m.GetNetworkEscapeHatchAllowed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("nfcBlockOutgoingBeam", m.GetNfcBlockOutgoingBeam()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockKeyguard", m.GetPasswordBlockKeyguard()) + if err != nil { + return err + } + } + if m.GetPasswordBlockKeyguardFeatures() != nil { + err = writer.WriteCollectionOfStringValues("passwordBlockKeyguardFeatures", SerializeAndroidKeyguardFeature(m.GetPasswordBlockKeyguardFeatures())) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLetterCharacters", m.GetPasswordMinimumLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLowerCaseCharacters", m.GetPasswordMinimumLowerCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumNonLetterCharacters", m.GetPasswordMinimumNonLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumNumericCharacters", m.GetPasswordMinimumNumericCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumSymbolCharacters", m.GetPasswordMinimumSymbolCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumUpperCaseCharacters", m.GetPasswordMinimumUpperCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordCountToBlock", m.GetPasswordPreviousPasswordCountToBlock()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + if m.GetPasswordRequireUnlock() != nil { + cast := (*m.GetPasswordRequireUnlock()).String() + err = writer.WriteStringValue("passwordRequireUnlock", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("personalProfileAppsAllowInstallFromUnknownSources", m.GetPersonalProfileAppsAllowInstallFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("personalProfileCameraBlocked", m.GetPersonalProfileCameraBlocked()) + if err != nil { + return err + } + } + if m.GetPersonalProfilePersonalApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPersonalProfilePersonalApplications())) + for i, v := range m.GetPersonalProfilePersonalApplications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("personalProfilePersonalApplications", cast) + if err != nil { + return err + } + } + if m.GetPersonalProfilePlayStoreMode() != nil { + cast := (*m.GetPersonalProfilePlayStoreMode()).String() + err = writer.WriteStringValue("personalProfilePlayStoreMode", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("personalProfileScreenCaptureBlocked", m.GetPersonalProfileScreenCaptureBlocked()) + if err != nil { + return err + } + } + if m.GetPlayStoreMode() != nil { + cast := (*m.GetPlayStoreMode()).String() + err = writer.WriteStringValue("playStoreMode", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityCommonCriteriaModeEnabled", m.GetSecurityCommonCriteriaModeEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDeveloperSettingsEnabled", m.GetSecurityDeveloperSettingsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shortHelpText", m.GetShortHelpText()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("statusBarBlocked", m.GetStatusBarBlocked()) + if err != nil { + return err + } + } + if m.GetStayOnModes() != nil { + err = writer.WriteCollectionOfStringValues("stayOnModes", SerializeAndroidDeviceOwnerBatteryPluggedMode(m.GetStayOnModes())) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageAllowUsb", m.GetStorageAllowUsb()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockExternalMedia", m.GetStorageBlockExternalMedia()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockUsbFileTransfer", m.GetStorageBlockUsbFileTransfer()) + if err != nil { + return err + } + } + if m.GetSystemUpdateFreezePeriods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSystemUpdateFreezePeriods())) + for i, v := range m.GetSystemUpdateFreezePeriods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("systemUpdateFreezePeriods", cast) + if err != nil { + return err + } + } + if m.GetSystemUpdateInstallType() != nil { + cast := (*m.GetSystemUpdateInstallType()).String() + err = writer.WriteStringValue("systemUpdateInstallType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("systemUpdateWindowEndMinutesAfterMidnight", m.GetSystemUpdateWindowEndMinutesAfterMidnight()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("systemUpdateWindowStartMinutesAfterMidnight", m.GetSystemUpdateWindowStartMinutesAfterMidnight()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("systemWindowsBlocked", m.GetSystemWindowsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("usersBlockAdd", m.GetUsersBlockAdd()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("usersBlockRemove", m.GetUsersBlockRemove()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("volumeBlockAdjustment", m.GetVolumeBlockAdjustment()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("vpnAlwaysOnLockdownMode", m.GetVpnAlwaysOnLockdownMode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnAlwaysOnPackageIdentifier", m.GetVpnAlwaysOnPackageIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wifiBlockEditConfigurations", m.GetWifiBlockEditConfigurations()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wifiBlockEditPolicyDefinedConfigurations", m.GetWifiBlockEditPolicyDefinedConfigurations()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordExpirationDays", m.GetWorkProfilePasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumLength", m.GetWorkProfilePasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumLetterCharacters", m.GetWorkProfilePasswordMinimumLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumLowerCaseCharacters", m.GetWorkProfilePasswordMinimumLowerCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumNonLetterCharacters", m.GetWorkProfilePasswordMinimumNonLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumNumericCharacters", m.GetWorkProfilePasswordMinimumNumericCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumSymbolCharacters", m.GetWorkProfilePasswordMinimumSymbolCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumUpperCaseCharacters", m.GetWorkProfilePasswordMinimumUpperCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordPreviousPasswordCountToBlock", m.GetWorkProfilePasswordPreviousPasswordCountToBlock()) + if err != nil { + return err + } + } + if m.GetWorkProfilePasswordRequiredType() != nil { + cast := (*m.GetWorkProfilePasswordRequiredType()).String() + err = writer.WriteStringValue("workProfilePasswordRequiredType", &cast) + if err != nil { + return err + } + } + if m.GetWorkProfilePasswordRequireUnlock() != nil { + cast := (*m.GetWorkProfilePasswordRequireUnlock()).String() + err = writer.WriteStringValue("workProfilePasswordRequireUnlock", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordSignInFailureCountBeforeFactoryReset", m.GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + return nil +} +// SetAccountsBlockModification sets the accountsBlockModification property value. Indicates whether or not adding or removing accounts is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAccountsBlockModification(value *bool)() { + m.accountsBlockModification = value +} +// SetAppsAllowInstallFromUnknownSources sets the appsAllowInstallFromUnknownSources property value. Indicates whether or not the user is allowed to enable to unknown sources setting. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAppsAllowInstallFromUnknownSources(value *bool)() { + m.appsAllowInstallFromUnknownSources = value +} +// SetAppsAutoUpdatePolicy sets the appsAutoUpdatePolicy property value. Indicates the value of the app auto update policy. Possible values are: notConfigured, userChoice, never, wiFiOnly, always. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAppsAutoUpdatePolicy(value *AndroidDeviceOwnerAppAutoUpdatePolicyType)() { + m.appsAutoUpdatePolicy = value +} +// SetAppsDefaultPermissionPolicy sets the appsDefaultPermissionPolicy property value. Indicates the permission policy for requests for runtime permissions if one is not defined for the app specifically. Possible values are: deviceDefault, prompt, autoGrant, autoDeny. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAppsDefaultPermissionPolicy(value *AndroidDeviceOwnerDefaultAppPermissionPolicyType)() { + m.appsDefaultPermissionPolicy = value +} +// SetAppsRecommendSkippingFirstUseHints sets the appsRecommendSkippingFirstUseHints property value. Whether or not to recommend all apps skip any first-time-use hints they may have added. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAppsRecommendSkippingFirstUseHints(value *bool)() { + m.appsRecommendSkippingFirstUseHints = value +} +// SetAzureAdSharedDeviceDataClearApps sets the azureAdSharedDeviceDataClearApps property value. A list of managed apps that will have their data cleared during a global sign-out in AAD shared device mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetAzureAdSharedDeviceDataClearApps(value []AppListItemable)() { + m.azureAdSharedDeviceDataClearApps = value +} +// SetBluetoothBlockConfiguration sets the bluetoothBlockConfiguration property value. Indicates whether or not to block a user from configuring bluetooth. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetBluetoothBlockConfiguration(value *bool)() { + m.bluetoothBlockConfiguration = value +} +// SetBluetoothBlockContactSharing sets the bluetoothBlockContactSharing property value. Indicates whether or not to block a user from sharing contacts via bluetooth. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetBluetoothBlockContactSharing(value *bool)() { + m.bluetoothBlockContactSharing = value +} +// SetCameraBlocked sets the cameraBlocked property value. Indicates whether or not to disable the use of the camera. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCameraBlocked(value *bool)() { + m.cameraBlocked = value +} +// SetCellularBlockWiFiTethering sets the cellularBlockWiFiTethering property value. Indicates whether or not to block Wi-Fi tethering. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCellularBlockWiFiTethering(value *bool)() { + m.cellularBlockWiFiTethering = value +} +// SetCertificateCredentialConfigurationDisabled sets the certificateCredentialConfigurationDisabled property value. Indicates whether or not to block users from any certificate credential configuration. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCertificateCredentialConfigurationDisabled(value *bool)() { + m.certificateCredentialConfigurationDisabled = value +} +// SetCrossProfilePoliciesAllowCopyPaste sets the crossProfilePoliciesAllowCopyPaste property value. Indicates whether or not text copied from one profile (personal or work) can be pasted in the other. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCrossProfilePoliciesAllowCopyPaste(value *bool)() { + m.crossProfilePoliciesAllowCopyPaste = value +} +// SetCrossProfilePoliciesAllowDataSharing sets the crossProfilePoliciesAllowDataSharing property value. Indicates whether data from one profile (personal or work) can be shared with apps in the other profile. Possible values are: notConfigured, crossProfileDataSharingBlocked, dataSharingFromWorkToPersonalBlocked, crossProfileDataSharingAllowed, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCrossProfilePoliciesAllowDataSharing(value *AndroidDeviceOwnerCrossProfileDataSharing)() { + m.crossProfilePoliciesAllowDataSharing = value +} +// SetCrossProfilePoliciesShowWorkContactsInPersonalProfile sets the crossProfilePoliciesShowWorkContactsInPersonalProfile property value. Indicates whether or not contacts stored in work profile are shown in personal profile contact searches/incoming calls. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetCrossProfilePoliciesShowWorkContactsInPersonalProfile(value *bool)() { + m.crossProfilePoliciesShowWorkContactsInPersonalProfile = value +} +// SetDataRoamingBlocked sets the dataRoamingBlocked property value. Indicates whether or not to block a user from data roaming. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetDataRoamingBlocked(value *bool)() { + m.dataRoamingBlocked = value +} +// SetDateTimeConfigurationBlocked sets the dateTimeConfigurationBlocked property value. Indicates whether or not to block the user from manually changing the date or time on the device +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetDateTimeConfigurationBlocked(value *bool)() { + m.dateTimeConfigurationBlocked = value +} +// SetDetailedHelpText sets the detailedHelpText property value. Represents the customized detailed help text provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetDetailedHelpText(value AndroidDeviceOwnerUserFacingMessageable)() { + m.detailedHelpText = value +} +// SetDeviceOwnerLockScreenMessage sets the deviceOwnerLockScreenMessage property value. Represents the customized lock screen message provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetDeviceOwnerLockScreenMessage(value AndroidDeviceOwnerUserFacingMessageable)() { + m.deviceOwnerLockScreenMessage = value +} +// SetEnrollmentProfile sets the enrollmentProfile property value. Android Device Owner Enrollment Profile types. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetEnrollmentProfile(value *AndroidDeviceOwnerEnrollmentProfileType)() { + m.enrollmentProfile = value +} +// SetFactoryResetBlocked sets the factoryResetBlocked property value. Indicates whether or not the factory reset option in settings is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetFactoryResetBlocked(value *bool)() { + m.factoryResetBlocked = value +} +// SetFactoryResetDeviceAdministratorEmails sets the factoryResetDeviceAdministratorEmails property value. List of Google account emails that will be required to authenticate after a device is factory reset before it can be set up. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetFactoryResetDeviceAdministratorEmails(value []string)() { + m.factoryResetDeviceAdministratorEmails = value +} +// SetGlobalProxy sets the globalProxy property value. Proxy is set up directly with host, port and excluded hosts. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetGlobalProxy(value AndroidDeviceOwnerGlobalProxyable)() { + m.globalProxy = value +} +// SetGoogleAccountsBlocked sets the googleAccountsBlocked property value. Indicates whether or not google accounts will be blocked. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetGoogleAccountsBlocked(value *bool)() { + m.googleAccountsBlocked = value +} +// SetKioskCustomizationDeviceSettingsBlocked sets the kioskCustomizationDeviceSettingsBlocked property value. Indicates whether a user can access the device's Settings app while in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskCustomizationDeviceSettingsBlocked(value *bool)() { + m.kioskCustomizationDeviceSettingsBlocked = value +} +// SetKioskCustomizationPowerButtonActionsBlocked sets the kioskCustomizationPowerButtonActionsBlocked property value. Whether the power menu is shown when a user long presses the Power button of a device in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskCustomizationPowerButtonActionsBlocked(value *bool)() { + m.kioskCustomizationPowerButtonActionsBlocked = value +} +// SetKioskCustomizationStatusBar sets the kioskCustomizationStatusBar property value. Indicates whether system info and notifications are disabled in Kiosk Mode. Possible values are: notConfigured, notificationsAndSystemInfoEnabled, systemInfoOnly. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskCustomizationStatusBar(value *AndroidDeviceOwnerKioskCustomizationStatusBar)() { + m.kioskCustomizationStatusBar = value +} +// SetKioskCustomizationSystemErrorWarnings sets the kioskCustomizationSystemErrorWarnings property value. Indicates whether system error dialogs for crashed or unresponsive apps are shown in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskCustomizationSystemErrorWarnings(value *bool)() { + m.kioskCustomizationSystemErrorWarnings = value +} +// SetKioskCustomizationSystemNavigation sets the kioskCustomizationSystemNavigation property value. Indicates which navigation features are enabled in Kiosk Mode. Possible values are: notConfigured, navigationEnabled, homeButtonOnly. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskCustomizationSystemNavigation(value *AndroidDeviceOwnerKioskCustomizationSystemNavigation)() { + m.kioskCustomizationSystemNavigation = value +} +// SetKioskModeAppOrderEnabled sets the kioskModeAppOrderEnabled property value. Whether or not to enable app ordering in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeAppOrderEnabled(value *bool)() { + m.kioskModeAppOrderEnabled = value +} +// SetKioskModeAppPositions sets the kioskModeAppPositions property value. The ordering of items on Kiosk Mode Managed Home Screen. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeAppPositions(value []AndroidDeviceOwnerKioskModeAppPositionItemable)() { + m.kioskModeAppPositions = value +} +// SetKioskModeApps sets the kioskModeApps property value. A list of managed apps that will be shown when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeApps(value []AppListItemable)() { + m.kioskModeApps = value +} +// SetKioskModeAppsInFolderOrderedByName sets the kioskModeAppsInFolderOrderedByName property value. Whether or not to alphabetize applications within a folder in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeAppsInFolderOrderedByName(value *bool)() { + m.kioskModeAppsInFolderOrderedByName = value +} +// SetKioskModeBluetoothConfigurationEnabled sets the kioskModeBluetoothConfigurationEnabled property value. Whether or not to allow a user to configure Bluetooth settings in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeBluetoothConfigurationEnabled(value *bool)() { + m.kioskModeBluetoothConfigurationEnabled = value +} +// SetKioskModeDebugMenuEasyAccessEnabled sets the kioskModeDebugMenuEasyAccessEnabled property value. Whether or not to allow a user to easy access to the debug menu in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeDebugMenuEasyAccessEnabled(value *bool)() { + m.kioskModeDebugMenuEasyAccessEnabled = value +} +// SetKioskModeExitCode sets the kioskModeExitCode property value. Exit code to allow a user to escape from Kiosk Mode when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeExitCode(value *string)() { + m.kioskModeExitCode = value +} +// SetKioskModeFlashlightConfigurationEnabled sets the kioskModeFlashlightConfigurationEnabled property value. Whether or not to allow a user to use the flashlight in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeFlashlightConfigurationEnabled(value *bool)() { + m.kioskModeFlashlightConfigurationEnabled = value +} +// SetKioskModeFolderIcon sets the kioskModeFolderIcon property value. Folder icon configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, darkSquare, darkCircle, lightSquare, lightCircle. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeFolderIcon(value *AndroidDeviceOwnerKioskModeFolderIcon)() { + m.kioskModeFolderIcon = value +} +// SetKioskModeGridHeight sets the kioskModeGridHeight property value. Number of rows for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeGridHeight(value *int32)() { + m.kioskModeGridHeight = value +} +// SetKioskModeGridWidth sets the kioskModeGridWidth property value. Number of columns for Managed Home Screen grid with app ordering enabled in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeGridWidth(value *int32)() { + m.kioskModeGridWidth = value +} +// SetKioskModeIconSize sets the kioskModeIconSize property value. Icon size configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, smallest, small, regular, large, largest. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeIconSize(value *AndroidDeviceOwnerKioskModeIconSize)() { + m.kioskModeIconSize = value +} +// SetKioskModeLockHomeScreen sets the kioskModeLockHomeScreen property value. Whether or not to lock home screen to the end user in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeLockHomeScreen(value *bool)() { + m.kioskModeLockHomeScreen = value +} +// SetKioskModeManagedFolders sets the kioskModeManagedFolders property value. A list of managed folders for a device in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedFolders(value []AndroidDeviceOwnerKioskModeManagedFolderable)() { + m.kioskModeManagedFolders = value +} +// SetKioskModeManagedHomeScreenAutoSignout sets the kioskModeManagedHomeScreenAutoSignout property value. Whether or not to automatically sign-out of MHS and Shared device mode applications after inactive for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenAutoSignout(value *bool)() { + m.kioskModeManagedHomeScreenAutoSignout = value +} +// SetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds sets the kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds property value. Number of seconds to give user notice before automatically signing them out for Managed Home Screen. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds(value *int32)() { + m.kioskModeManagedHomeScreenInactiveSignOutDelayInSeconds = value +} +// SetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds sets the kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds property value. Number of seconds device is inactive before automatically signing user out for Managed Home Screen. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds(value *int32)() { + m.kioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds = value +} +// SetKioskModeManagedHomeScreenPinComplexity sets the kioskModeManagedHomeScreenPinComplexity property value. Complexity of PIN for sign-in session for Managed Home Screen. Possible values are: notConfigured, simple, complex. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenPinComplexity(value *KioskModeManagedHomeScreenPinComplexity)() { + m.kioskModeManagedHomeScreenPinComplexity = value +} +// SetKioskModeManagedHomeScreenPinRequired sets the kioskModeManagedHomeScreenPinRequired property value. Whether or not require user to set a PIN for sign-in session for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenPinRequired(value *bool)() { + m.kioskModeManagedHomeScreenPinRequired = value +} +// SetKioskModeManagedHomeScreenPinRequiredToResume sets the kioskModeManagedHomeScreenPinRequiredToResume property value. Whether or not required user to enter session PIN if screensaver has appeared for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenPinRequiredToResume(value *bool)() { + m.kioskModeManagedHomeScreenPinRequiredToResume = value +} +// SetKioskModeManagedHomeScreenSignInBackground sets the kioskModeManagedHomeScreenSignInBackground property value. Custom URL background for sign-in screen for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenSignInBackground(value *string)() { + m.kioskModeManagedHomeScreenSignInBackground = value +} +// SetKioskModeManagedHomeScreenSignInBrandingLogo sets the kioskModeManagedHomeScreenSignInBrandingLogo property value. Custom URL branding logo for sign-in screen and session pin page for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenSignInBrandingLogo(value *string)() { + m.kioskModeManagedHomeScreenSignInBrandingLogo = value +} +// SetKioskModeManagedHomeScreenSignInEnabled sets the kioskModeManagedHomeScreenSignInEnabled property value. Whether or not show sign-in screen for Managed Home Screen. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedHomeScreenSignInEnabled(value *bool)() { + m.kioskModeManagedHomeScreenSignInEnabled = value +} +// SetKioskModeManagedSettingsEntryDisabled sets the kioskModeManagedSettingsEntryDisabled property value. Whether or not to display the Managed Settings entry point on the managed home screen in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeManagedSettingsEntryDisabled(value *bool)() { + m.kioskModeManagedSettingsEntryDisabled = value +} +// SetKioskModeMediaVolumeConfigurationEnabled sets the kioskModeMediaVolumeConfigurationEnabled property value. Whether or not to allow a user to change the media volume in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeMediaVolumeConfigurationEnabled(value *bool)() { + m.kioskModeMediaVolumeConfigurationEnabled = value +} +// SetKioskModeScreenOrientation sets the kioskModeScreenOrientation property value. Screen orientation configuration for managed home screen in Kiosk Mode. Possible values are: notConfigured, portrait, landscape, autoRotate. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenOrientation(value *AndroidDeviceOwnerKioskModeScreenOrientation)() { + m.kioskModeScreenOrientation = value +} +// SetKioskModeScreenSaverConfigurationEnabled sets the kioskModeScreenSaverConfigurationEnabled property value. Whether or not to enable screen saver mode or not in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenSaverConfigurationEnabled(value *bool)() { + m.kioskModeScreenSaverConfigurationEnabled = value +} +// SetKioskModeScreenSaverDetectMediaDisabled sets the kioskModeScreenSaverDetectMediaDisabled property value. Whether or not the device screen should show the screen saver if audio/video is playing in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenSaverDetectMediaDisabled(value *bool)() { + m.kioskModeScreenSaverDetectMediaDisabled = value +} +// SetKioskModeScreenSaverDisplayTimeInSeconds sets the kioskModeScreenSaverDisplayTimeInSeconds property value. The number of seconds that the device will display the screen saver for in Kiosk Mode. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenSaverDisplayTimeInSeconds(value *int32)() { + m.kioskModeScreenSaverDisplayTimeInSeconds = value +} +// SetKioskModeScreenSaverImageUrl sets the kioskModeScreenSaverImageUrl property value. URL for an image that will be the device's screen saver in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenSaverImageUrl(value *string)() { + m.kioskModeScreenSaverImageUrl = value +} +// SetKioskModeScreenSaverStartDelayInSeconds sets the kioskModeScreenSaverStartDelayInSeconds property value. The number of seconds the device needs to be inactive for before the screen saver is shown in Kiosk Mode. Valid values 1 to 9999999 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeScreenSaverStartDelayInSeconds(value *int32)() { + m.kioskModeScreenSaverStartDelayInSeconds = value +} +// SetKioskModeShowAppNotificationBadge sets the kioskModeShowAppNotificationBadge property value. Whether or not to display application notification badges in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeShowAppNotificationBadge(value *bool)() { + m.kioskModeShowAppNotificationBadge = value +} +// SetKioskModeShowDeviceInfo sets the kioskModeShowDeviceInfo property value. Whether or not to allow a user to access basic device information. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeShowDeviceInfo(value *bool)() { + m.kioskModeShowDeviceInfo = value +} +// SetKioskModeUseManagedHomeScreenApp sets the kioskModeUseManagedHomeScreenApp property value. Whether or not to use single app kiosk mode or multi-app kiosk mode. Possible values are: notConfigured, singleAppMode, multiAppMode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeUseManagedHomeScreenApp(value *KioskModeType)() { + m.kioskModeUseManagedHomeScreenApp = value +} +// SetKioskModeVirtualHomeButtonEnabled sets the kioskModeVirtualHomeButtonEnabled property value. Whether or not to display a virtual home button when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeVirtualHomeButtonEnabled(value *bool)() { + m.kioskModeVirtualHomeButtonEnabled = value +} +// SetKioskModeVirtualHomeButtonType sets the kioskModeVirtualHomeButtonType property value. Indicates whether the virtual home button is a swipe up home button or a floating home button. Possible values are: notConfigured, swipeUp, floating. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeVirtualHomeButtonType(value *AndroidDeviceOwnerVirtualHomeButtonType)() { + m.kioskModeVirtualHomeButtonType = value +} +// SetKioskModeWallpaperUrl sets the kioskModeWallpaperUrl property value. URL to a publicly accessible image to use for the wallpaper when the device is in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeWallpaperUrl(value *string)() { + m.kioskModeWallpaperUrl = value +} +// SetKioskModeWifiAllowedSsids sets the kioskModeWifiAllowedSsids property value. The restricted set of WIFI SSIDs available for the user to configure in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeWifiAllowedSsids(value []string)() { + m.kioskModeWifiAllowedSsids = value +} +// SetKioskModeWiFiConfigurationEnabled sets the kioskModeWiFiConfigurationEnabled property value. Whether or not to allow a user to configure Wi-Fi settings in Kiosk Mode. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetKioskModeWiFiConfigurationEnabled(value *bool)() { + m.kioskModeWiFiConfigurationEnabled = value +} +// SetMicrophoneForceMute sets the microphoneForceMute property value. Indicates whether or not to block unmuting the microphone on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrophoneForceMute(value *bool)() { + m.microphoneForceMute = value +} +// SetMicrosoftLauncherConfigurationEnabled sets the microsoftLauncherConfigurationEnabled property value. Indicates whether or not to you want configure Microsoft Launcher. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherConfigurationEnabled(value *bool)() { + m.microsoftLauncherConfigurationEnabled = value +} +// SetMicrosoftLauncherCustomWallpaperAllowUserModification sets the microsoftLauncherCustomWallpaperAllowUserModification property value. Indicates whether or not the user can modify the wallpaper to personalize their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherCustomWallpaperAllowUserModification(value *bool)() { + m.microsoftLauncherCustomWallpaperAllowUserModification = value +} +// SetMicrosoftLauncherCustomWallpaperEnabled sets the microsoftLauncherCustomWallpaperEnabled property value. Indicates whether or not to configure the wallpaper on the targeted devices. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherCustomWallpaperEnabled(value *bool)() { + m.microsoftLauncherCustomWallpaperEnabled = value +} +// SetMicrosoftLauncherCustomWallpaperImageUrl sets the microsoftLauncherCustomWallpaperImageUrl property value. Indicates the URL for the image file to use as the wallpaper on the targeted devices. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherCustomWallpaperImageUrl(value *string)() { + m.microsoftLauncherCustomWallpaperImageUrl = value +} +// SetMicrosoftLauncherDockPresenceAllowUserModification sets the microsoftLauncherDockPresenceAllowUserModification property value. Indicates whether or not the user can modify the device dock configuration on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherDockPresenceAllowUserModification(value *bool)() { + m.microsoftLauncherDockPresenceAllowUserModification = value +} +// SetMicrosoftLauncherDockPresenceConfiguration sets the microsoftLauncherDockPresenceConfiguration property value. Indicates whether or not you want to configure the device dock. Possible values are: notConfigured, show, hide, disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherDockPresenceConfiguration(value *MicrosoftLauncherDockPresence)() { + m.microsoftLauncherDockPresenceConfiguration = value +} +// SetMicrosoftLauncherFeedAllowUserModification sets the microsoftLauncherFeedAllowUserModification property value. Indicates whether or not the user can modify the launcher feed on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherFeedAllowUserModification(value *bool)() { + m.microsoftLauncherFeedAllowUserModification = value +} +// SetMicrosoftLauncherFeedEnabled sets the microsoftLauncherFeedEnabled property value. Indicates whether or not you want to enable the launcher feed on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherFeedEnabled(value *bool)() { + m.microsoftLauncherFeedEnabled = value +} +// SetMicrosoftLauncherSearchBarPlacementConfiguration sets the microsoftLauncherSearchBarPlacementConfiguration property value. Indicates the search bar placement configuration on the device. Possible values are: notConfigured, top, bottom, hide. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetMicrosoftLauncherSearchBarPlacementConfiguration(value *MicrosoftLauncherSearchBarPlacement)() { + m.microsoftLauncherSearchBarPlacementConfiguration = value +} +// SetNetworkEscapeHatchAllowed sets the networkEscapeHatchAllowed property value. Indicates whether or not the device will allow connecting to a temporary network connection at boot time. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetNetworkEscapeHatchAllowed(value *bool)() { + m.networkEscapeHatchAllowed = value +} +// SetNfcBlockOutgoingBeam sets the nfcBlockOutgoingBeam property value. Indicates whether or not to block NFC outgoing beam. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetNfcBlockOutgoingBeam(value *bool)() { + m.nfcBlockOutgoingBeam = value +} +// SetPasswordBlockKeyguard sets the passwordBlockKeyguard property value. Indicates whether or not the keyguard is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordBlockKeyguard(value *bool)() { + m.passwordBlockKeyguard = value +} +// SetPasswordBlockKeyguardFeatures sets the passwordBlockKeyguardFeatures property value. List of device keyguard features to block. This collection can contain a maximum of 11 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordBlockKeyguardFeatures(value []AndroidKeyguardFeature)() { + m.passwordBlockKeyguardFeatures = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Indicates the amount of time that a password can be set for before it expires and a new password will be required. Valid values 1 to 365 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Indicates the minimum length of the password required on the device. Valid values 4 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinimumLetterCharacters sets the passwordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumLetterCharacters(value *int32)() { + m.passwordMinimumLetterCharacters = value +} +// SetPasswordMinimumLowerCaseCharacters sets the passwordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower case characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumLowerCaseCharacters(value *int32)() { + m.passwordMinimumLowerCaseCharacters = value +} +// SetPasswordMinimumNonLetterCharacters sets the passwordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumNonLetterCharacters(value *int32)() { + m.passwordMinimumNonLetterCharacters = value +} +// SetPasswordMinimumNumericCharacters sets the passwordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumNumericCharacters(value *int32)() { + m.passwordMinimumNumericCharacters = value +} +// SetPasswordMinimumSymbolCharacters sets the passwordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumSymbolCharacters(value *int32)() { + m.passwordMinimumSymbolCharacters = value +} +// SetPasswordMinimumUpperCaseCharacters sets the passwordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper case letter characters required for device password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinimumUpperCaseCharacters(value *int32)() { + m.passwordMinimumUpperCaseCharacters = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordPreviousPasswordCountToBlock sets the passwordPreviousPasswordCountToBlock property value. Indicates the length of password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordPreviousPasswordCountToBlock(value *int32)() { + m.passwordPreviousPasswordCountToBlock = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordRequireUnlock sets the passwordRequireUnlock property value. Indicates the timeout period after which a device must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordRequireUnlock(value *AndroidDeviceOwnerRequiredPasswordUnlock)() { + m.passwordRequireUnlock = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetPersonalProfileAppsAllowInstallFromUnknownSources sets the personalProfileAppsAllowInstallFromUnknownSources property value. Indicates whether the user can install apps from unknown sources on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPersonalProfileAppsAllowInstallFromUnknownSources(value *bool)() { + m.personalProfileAppsAllowInstallFromUnknownSources = value +} +// SetPersonalProfileCameraBlocked sets the personalProfileCameraBlocked property value. Indicates whether to disable the use of the camera on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPersonalProfileCameraBlocked(value *bool)() { + m.personalProfileCameraBlocked = value +} +// SetPersonalProfilePersonalApplications sets the personalProfilePersonalApplications property value. Policy applied to applications in the personal profile. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPersonalProfilePersonalApplications(value []AppListItemable)() { + m.personalProfilePersonalApplications = value +} +// SetPersonalProfilePlayStoreMode sets the personalProfilePlayStoreMode property value. Used together with PersonalProfilePersonalApplications to control how apps in the personal profile are allowed or blocked. Possible values are: notConfigured, blockedApps, allowedApps. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPersonalProfilePlayStoreMode(value *PersonalProfilePersonalPlayStoreMode)() { + m.personalProfilePlayStoreMode = value +} +// SetPersonalProfileScreenCaptureBlocked sets the personalProfileScreenCaptureBlocked property value. Indicates whether to disable the capability to take screenshots on the personal profile. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPersonalProfileScreenCaptureBlocked(value *bool)() { + m.personalProfileScreenCaptureBlocked = value +} +// SetPlayStoreMode sets the playStoreMode property value. Indicates the Play Store mode of the device. Possible values are: notConfigured, allowList, blockList. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetPlayStoreMode(value *AndroidDeviceOwnerPlayStoreMode)() { + m.playStoreMode = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether or not to disable the capability to take screenshots. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetSecurityCommonCriteriaModeEnabled sets the securityCommonCriteriaModeEnabled property value. Represents the security common criteria mode enabled provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSecurityCommonCriteriaModeEnabled(value *bool)() { + m.securityCommonCriteriaModeEnabled = value +} +// SetSecurityDeveloperSettingsEnabled sets the securityDeveloperSettingsEnabled property value. Indicates whether or not the user is allowed to access developer settings like developer options and safe boot on the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSecurityDeveloperSettingsEnabled(value *bool)() { + m.securityDeveloperSettingsEnabled = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Indicates whether or not verify apps is required. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetShortHelpText sets the shortHelpText property value. Represents the customized short help text provided to users when they attempt to modify managed settings on their device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetShortHelpText(value AndroidDeviceOwnerUserFacingMessageable)() { + m.shortHelpText = value +} +// SetStatusBarBlocked sets the statusBarBlocked property value. Indicates whether or the status bar is disabled, including notifications, quick settings and other screen overlays. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetStatusBarBlocked(value *bool)() { + m.statusBarBlocked = value +} +// SetStayOnModes sets the stayOnModes property value. List of modes in which the device's display will stay powered-on. This collection can contain a maximum of 4 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetStayOnModes(value []AndroidDeviceOwnerBatteryPluggedMode)() { + m.stayOnModes = value +} +// SetStorageAllowUsb sets the storageAllowUsb property value. Indicates whether or not to allow USB mass storage. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetStorageAllowUsb(value *bool)() { + m.storageAllowUsb = value +} +// SetStorageBlockExternalMedia sets the storageBlockExternalMedia property value. Indicates whether or not to block external media. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetStorageBlockExternalMedia(value *bool)() { + m.storageBlockExternalMedia = value +} +// SetStorageBlockUsbFileTransfer sets the storageBlockUsbFileTransfer property value. Indicates whether or not to block USB file transfer. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetStorageBlockUsbFileTransfer(value *bool)() { + m.storageBlockUsbFileTransfer = value +} +// SetSystemUpdateFreezePeriods sets the systemUpdateFreezePeriods property value. Indicates the annually repeating time periods during which system updates are postponed. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSystemUpdateFreezePeriods(value []AndroidDeviceOwnerSystemUpdateFreezePeriodable)() { + m.systemUpdateFreezePeriods = value +} +// SetSystemUpdateInstallType sets the systemUpdateInstallType property value. The type of system update configuration. Possible values are: deviceDefault, postpone, windowed, automatic. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSystemUpdateInstallType(value *AndroidDeviceOwnerSystemUpdateInstallType)() { + m.systemUpdateInstallType = value +} +// SetSystemUpdateWindowEndMinutesAfterMidnight sets the systemUpdateWindowEndMinutesAfterMidnight property value. Indicates the number of minutes after midnight that the system update window ends. Valid values 0 to 1440 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSystemUpdateWindowEndMinutesAfterMidnight(value *int32)() { + m.systemUpdateWindowEndMinutesAfterMidnight = value +} +// SetSystemUpdateWindowStartMinutesAfterMidnight sets the systemUpdateWindowStartMinutesAfterMidnight property value. Indicates the number of minutes after midnight that the system update window starts. Valid values 0 to 1440 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSystemUpdateWindowStartMinutesAfterMidnight(value *int32)() { + m.systemUpdateWindowStartMinutesAfterMidnight = value +} +// SetSystemWindowsBlocked sets the systemWindowsBlocked property value. Whether or not to block Android system prompt windows, like toasts, phone activities, and system alerts. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetSystemWindowsBlocked(value *bool)() { + m.systemWindowsBlocked = value +} +// SetUsersBlockAdd sets the usersBlockAdd property value. Indicates whether or not adding users and profiles is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetUsersBlockAdd(value *bool)() { + m.usersBlockAdd = value +} +// SetUsersBlockRemove sets the usersBlockRemove property value. Indicates whether or not to disable removing other users from the device. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetUsersBlockRemove(value *bool)() { + m.usersBlockRemove = value +} +// SetVolumeBlockAdjustment sets the volumeBlockAdjustment property value. Indicates whether or not adjusting the master volume is disabled. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetVolumeBlockAdjustment(value *bool)() { + m.volumeBlockAdjustment = value +} +// SetVpnAlwaysOnLockdownMode sets the vpnAlwaysOnLockdownMode property value. If an always on VPN package name is specified, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetVpnAlwaysOnLockdownMode(value *bool)() { + m.vpnAlwaysOnLockdownMode = value +} +// SetVpnAlwaysOnPackageIdentifier sets the vpnAlwaysOnPackageIdentifier property value. Android app package name for app that will handle an always-on VPN connection. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetVpnAlwaysOnPackageIdentifier(value *string)() { + m.vpnAlwaysOnPackageIdentifier = value +} +// SetWifiBlockEditConfigurations sets the wifiBlockEditConfigurations property value. Indicates whether or not to block the user from editing the wifi connection settings. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWifiBlockEditConfigurations(value *bool)() { + m.wifiBlockEditConfigurations = value +} +// SetWifiBlockEditPolicyDefinedConfigurations sets the wifiBlockEditPolicyDefinedConfigurations property value. Indicates whether or not to block the user from editing just the networks defined by the policy. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWifiBlockEditPolicyDefinedConfigurations(value *bool)() { + m.wifiBlockEditPolicyDefinedConfigurations = value +} +// SetWorkProfilePasswordExpirationDays sets the workProfilePasswordExpirationDays property value. Indicates the number of days that a work profile password can be set before it expires and a new password will be required. Valid values 1 to 365 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordExpirationDays(value *int32)() { + m.workProfilePasswordExpirationDays = value +} +// SetWorkProfilePasswordMinimumLength sets the workProfilePasswordMinimumLength property value. Indicates the minimum length of the work profile password. Valid values 4 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumLength(value *int32)() { + m.workProfilePasswordMinimumLength = value +} +// SetWorkProfilePasswordMinimumLetterCharacters sets the workProfilePasswordMinimumLetterCharacters property value. Indicates the minimum number of letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumLetterCharacters(value *int32)() { + m.workProfilePasswordMinimumLetterCharacters = value +} +// SetWorkProfilePasswordMinimumLowerCaseCharacters sets the workProfilePasswordMinimumLowerCaseCharacters property value. Indicates the minimum number of lower-case characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumLowerCaseCharacters(value *int32)() { + m.workProfilePasswordMinimumLowerCaseCharacters = value +} +// SetWorkProfilePasswordMinimumNonLetterCharacters sets the workProfilePasswordMinimumNonLetterCharacters property value. Indicates the minimum number of non-letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumNonLetterCharacters(value *int32)() { + m.workProfilePasswordMinimumNonLetterCharacters = value +} +// SetWorkProfilePasswordMinimumNumericCharacters sets the workProfilePasswordMinimumNumericCharacters property value. Indicates the minimum number of numeric characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumNumericCharacters(value *int32)() { + m.workProfilePasswordMinimumNumericCharacters = value +} +// SetWorkProfilePasswordMinimumSymbolCharacters sets the workProfilePasswordMinimumSymbolCharacters property value. Indicates the minimum number of symbol characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumSymbolCharacters(value *int32)() { + m.workProfilePasswordMinimumSymbolCharacters = value +} +// SetWorkProfilePasswordMinimumUpperCaseCharacters sets the workProfilePasswordMinimumUpperCaseCharacters property value. Indicates the minimum number of upper-case letter characters required for the work profile password. Valid values 1 to 16 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumUpperCaseCharacters(value *int32)() { + m.workProfilePasswordMinimumUpperCaseCharacters = value +} +// SetWorkProfilePasswordPreviousPasswordCountToBlock sets the workProfilePasswordPreviousPasswordCountToBlock property value. Indicates the length of the work profile password history, where the user will not be able to enter a new password that is the same as any password in the history. Valid values 0 to 24 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordPreviousPasswordCountToBlock(value *int32)() { + m.workProfilePasswordPreviousPasswordCountToBlock = value +} +// SetWorkProfilePasswordRequiredType sets the workProfilePasswordRequiredType property value. Indicates the minimum password quality required on the work profile password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() { + m.workProfilePasswordRequiredType = value +} +// SetWorkProfilePasswordRequireUnlock sets the workProfilePasswordRequireUnlock property value. Indicates the timeout period after which a work profile must be unlocked using a form of strong authentication. Possible values are: deviceDefault, daily, unkownFutureValue. +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordRequireUnlock(value *AndroidDeviceOwnerRequiredPasswordUnlock)() { + m.workProfilePasswordRequireUnlock = value +} +// SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset sets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect work profile password before the device is wiped. Valid values 4 to 11 +func (m *AndroidDeviceOwnerGeneralDeviceConfiguration) SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.workProfilePasswordSignInFailureCountBeforeFactoryReset = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_response.go new file mode 100644 index 000000000..13fd6ea4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse +type AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerGeneralDeviceConfigurationable +} +// NewAndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse instantiates a new AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse()(*AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse) { + m := &AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse) GetValue()([]AndroidDeviceOwnerGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponse) SetValue(value []AndroidDeviceOwnerGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..1e591aba4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponseable +type AndroidDeviceOwnerGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerGeneralDeviceConfigurationable) + SetValue(value []AndroidDeviceOwnerGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configurationable.go new file mode 100644 index 000000000..d9e702fb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_general_device_configurationable.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGeneralDeviceConfigurationable +type AndroidDeviceOwnerGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountsBlockModification()(*bool) + GetAppsAllowInstallFromUnknownSources()(*bool) + GetAppsAutoUpdatePolicy()(*AndroidDeviceOwnerAppAutoUpdatePolicyType) + GetAppsDefaultPermissionPolicy()(*AndroidDeviceOwnerDefaultAppPermissionPolicyType) + GetAppsRecommendSkippingFirstUseHints()(*bool) + GetAzureAdSharedDeviceDataClearApps()([]AppListItemable) + GetBluetoothBlockConfiguration()(*bool) + GetBluetoothBlockContactSharing()(*bool) + GetCameraBlocked()(*bool) + GetCellularBlockWiFiTethering()(*bool) + GetCertificateCredentialConfigurationDisabled()(*bool) + GetCrossProfilePoliciesAllowCopyPaste()(*bool) + GetCrossProfilePoliciesAllowDataSharing()(*AndroidDeviceOwnerCrossProfileDataSharing) + GetCrossProfilePoliciesShowWorkContactsInPersonalProfile()(*bool) + GetDataRoamingBlocked()(*bool) + GetDateTimeConfigurationBlocked()(*bool) + GetDetailedHelpText()(AndroidDeviceOwnerUserFacingMessageable) + GetDeviceOwnerLockScreenMessage()(AndroidDeviceOwnerUserFacingMessageable) + GetEnrollmentProfile()(*AndroidDeviceOwnerEnrollmentProfileType) + GetFactoryResetBlocked()(*bool) + GetFactoryResetDeviceAdministratorEmails()([]string) + GetGlobalProxy()(AndroidDeviceOwnerGlobalProxyable) + GetGoogleAccountsBlocked()(*bool) + GetKioskCustomizationDeviceSettingsBlocked()(*bool) + GetKioskCustomizationPowerButtonActionsBlocked()(*bool) + GetKioskCustomizationStatusBar()(*AndroidDeviceOwnerKioskCustomizationStatusBar) + GetKioskCustomizationSystemErrorWarnings()(*bool) + GetKioskCustomizationSystemNavigation()(*AndroidDeviceOwnerKioskCustomizationSystemNavigation) + GetKioskModeAppOrderEnabled()(*bool) + GetKioskModeAppPositions()([]AndroidDeviceOwnerKioskModeAppPositionItemable) + GetKioskModeApps()([]AppListItemable) + GetKioskModeAppsInFolderOrderedByName()(*bool) + GetKioskModeBluetoothConfigurationEnabled()(*bool) + GetKioskModeDebugMenuEasyAccessEnabled()(*bool) + GetKioskModeExitCode()(*string) + GetKioskModeFlashlightConfigurationEnabled()(*bool) + GetKioskModeFolderIcon()(*AndroidDeviceOwnerKioskModeFolderIcon) + GetKioskModeGridHeight()(*int32) + GetKioskModeGridWidth()(*int32) + GetKioskModeIconSize()(*AndroidDeviceOwnerKioskModeIconSize) + GetKioskModeLockHomeScreen()(*bool) + GetKioskModeManagedFolders()([]AndroidDeviceOwnerKioskModeManagedFolderable) + GetKioskModeManagedHomeScreenAutoSignout()(*bool) + GetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds()(*int32) + GetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds()(*int32) + GetKioskModeManagedHomeScreenPinComplexity()(*KioskModeManagedHomeScreenPinComplexity) + GetKioskModeManagedHomeScreenPinRequired()(*bool) + GetKioskModeManagedHomeScreenPinRequiredToResume()(*bool) + GetKioskModeManagedHomeScreenSignInBackground()(*string) + GetKioskModeManagedHomeScreenSignInBrandingLogo()(*string) + GetKioskModeManagedHomeScreenSignInEnabled()(*bool) + GetKioskModeManagedSettingsEntryDisabled()(*bool) + GetKioskModeMediaVolumeConfigurationEnabled()(*bool) + GetKioskModeScreenOrientation()(*AndroidDeviceOwnerKioskModeScreenOrientation) + GetKioskModeScreenSaverConfigurationEnabled()(*bool) + GetKioskModeScreenSaverDetectMediaDisabled()(*bool) + GetKioskModeScreenSaverDisplayTimeInSeconds()(*int32) + GetKioskModeScreenSaverImageUrl()(*string) + GetKioskModeScreenSaverStartDelayInSeconds()(*int32) + GetKioskModeShowAppNotificationBadge()(*bool) + GetKioskModeShowDeviceInfo()(*bool) + GetKioskModeUseManagedHomeScreenApp()(*KioskModeType) + GetKioskModeVirtualHomeButtonEnabled()(*bool) + GetKioskModeVirtualHomeButtonType()(*AndroidDeviceOwnerVirtualHomeButtonType) + GetKioskModeWallpaperUrl()(*string) + GetKioskModeWifiAllowedSsids()([]string) + GetKioskModeWiFiConfigurationEnabled()(*bool) + GetMicrophoneForceMute()(*bool) + GetMicrosoftLauncherConfigurationEnabled()(*bool) + GetMicrosoftLauncherCustomWallpaperAllowUserModification()(*bool) + GetMicrosoftLauncherCustomWallpaperEnabled()(*bool) + GetMicrosoftLauncherCustomWallpaperImageUrl()(*string) + GetMicrosoftLauncherDockPresenceAllowUserModification()(*bool) + GetMicrosoftLauncherDockPresenceConfiguration()(*MicrosoftLauncherDockPresence) + GetMicrosoftLauncherFeedAllowUserModification()(*bool) + GetMicrosoftLauncherFeedEnabled()(*bool) + GetMicrosoftLauncherSearchBarPlacementConfiguration()(*MicrosoftLauncherSearchBarPlacement) + GetNetworkEscapeHatchAllowed()(*bool) + GetNfcBlockOutgoingBeam()(*bool) + GetPasswordBlockKeyguard()(*bool) + GetPasswordBlockKeyguardFeatures()([]AndroidKeyguardFeature) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinimumLetterCharacters()(*int32) + GetPasswordMinimumLowerCaseCharacters()(*int32) + GetPasswordMinimumNonLetterCharacters()(*int32) + GetPasswordMinimumNumericCharacters()(*int32) + GetPasswordMinimumSymbolCharacters()(*int32) + GetPasswordMinimumUpperCaseCharacters()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordPreviousPasswordCountToBlock()(*int32) + GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) + GetPasswordRequireUnlock()(*AndroidDeviceOwnerRequiredPasswordUnlock) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetPersonalProfileAppsAllowInstallFromUnknownSources()(*bool) + GetPersonalProfileCameraBlocked()(*bool) + GetPersonalProfilePersonalApplications()([]AppListItemable) + GetPersonalProfilePlayStoreMode()(*PersonalProfilePersonalPlayStoreMode) + GetPersonalProfileScreenCaptureBlocked()(*bool) + GetPlayStoreMode()(*AndroidDeviceOwnerPlayStoreMode) + GetScreenCaptureBlocked()(*bool) + GetSecurityCommonCriteriaModeEnabled()(*bool) + GetSecurityDeveloperSettingsEnabled()(*bool) + GetSecurityRequireVerifyApps()(*bool) + GetShortHelpText()(AndroidDeviceOwnerUserFacingMessageable) + GetStatusBarBlocked()(*bool) + GetStayOnModes()([]AndroidDeviceOwnerBatteryPluggedMode) + GetStorageAllowUsb()(*bool) + GetStorageBlockExternalMedia()(*bool) + GetStorageBlockUsbFileTransfer()(*bool) + GetSystemUpdateFreezePeriods()([]AndroidDeviceOwnerSystemUpdateFreezePeriodable) + GetSystemUpdateInstallType()(*AndroidDeviceOwnerSystemUpdateInstallType) + GetSystemUpdateWindowEndMinutesAfterMidnight()(*int32) + GetSystemUpdateWindowStartMinutesAfterMidnight()(*int32) + GetSystemWindowsBlocked()(*bool) + GetUsersBlockAdd()(*bool) + GetUsersBlockRemove()(*bool) + GetVolumeBlockAdjustment()(*bool) + GetVpnAlwaysOnLockdownMode()(*bool) + GetVpnAlwaysOnPackageIdentifier()(*string) + GetWifiBlockEditConfigurations()(*bool) + GetWifiBlockEditPolicyDefinedConfigurations()(*bool) + GetWorkProfilePasswordExpirationDays()(*int32) + GetWorkProfilePasswordMinimumLength()(*int32) + GetWorkProfilePasswordMinimumLetterCharacters()(*int32) + GetWorkProfilePasswordMinimumLowerCaseCharacters()(*int32) + GetWorkProfilePasswordMinimumNonLetterCharacters()(*int32) + GetWorkProfilePasswordMinimumNumericCharacters()(*int32) + GetWorkProfilePasswordMinimumSymbolCharacters()(*int32) + GetWorkProfilePasswordMinimumUpperCaseCharacters()(*int32) + GetWorkProfilePasswordPreviousPasswordCountToBlock()(*int32) + GetWorkProfilePasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) + GetWorkProfilePasswordRequireUnlock()(*AndroidDeviceOwnerRequiredPasswordUnlock) + GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) + SetAccountsBlockModification(value *bool)() + SetAppsAllowInstallFromUnknownSources(value *bool)() + SetAppsAutoUpdatePolicy(value *AndroidDeviceOwnerAppAutoUpdatePolicyType)() + SetAppsDefaultPermissionPolicy(value *AndroidDeviceOwnerDefaultAppPermissionPolicyType)() + SetAppsRecommendSkippingFirstUseHints(value *bool)() + SetAzureAdSharedDeviceDataClearApps(value []AppListItemable)() + SetBluetoothBlockConfiguration(value *bool)() + SetBluetoothBlockContactSharing(value *bool)() + SetCameraBlocked(value *bool)() + SetCellularBlockWiFiTethering(value *bool)() + SetCertificateCredentialConfigurationDisabled(value *bool)() + SetCrossProfilePoliciesAllowCopyPaste(value *bool)() + SetCrossProfilePoliciesAllowDataSharing(value *AndroidDeviceOwnerCrossProfileDataSharing)() + SetCrossProfilePoliciesShowWorkContactsInPersonalProfile(value *bool)() + SetDataRoamingBlocked(value *bool)() + SetDateTimeConfigurationBlocked(value *bool)() + SetDetailedHelpText(value AndroidDeviceOwnerUserFacingMessageable)() + SetDeviceOwnerLockScreenMessage(value AndroidDeviceOwnerUserFacingMessageable)() + SetEnrollmentProfile(value *AndroidDeviceOwnerEnrollmentProfileType)() + SetFactoryResetBlocked(value *bool)() + SetFactoryResetDeviceAdministratorEmails(value []string)() + SetGlobalProxy(value AndroidDeviceOwnerGlobalProxyable)() + SetGoogleAccountsBlocked(value *bool)() + SetKioskCustomizationDeviceSettingsBlocked(value *bool)() + SetKioskCustomizationPowerButtonActionsBlocked(value *bool)() + SetKioskCustomizationStatusBar(value *AndroidDeviceOwnerKioskCustomizationStatusBar)() + SetKioskCustomizationSystemErrorWarnings(value *bool)() + SetKioskCustomizationSystemNavigation(value *AndroidDeviceOwnerKioskCustomizationSystemNavigation)() + SetKioskModeAppOrderEnabled(value *bool)() + SetKioskModeAppPositions(value []AndroidDeviceOwnerKioskModeAppPositionItemable)() + SetKioskModeApps(value []AppListItemable)() + SetKioskModeAppsInFolderOrderedByName(value *bool)() + SetKioskModeBluetoothConfigurationEnabled(value *bool)() + SetKioskModeDebugMenuEasyAccessEnabled(value *bool)() + SetKioskModeExitCode(value *string)() + SetKioskModeFlashlightConfigurationEnabled(value *bool)() + SetKioskModeFolderIcon(value *AndroidDeviceOwnerKioskModeFolderIcon)() + SetKioskModeGridHeight(value *int32)() + SetKioskModeGridWidth(value *int32)() + SetKioskModeIconSize(value *AndroidDeviceOwnerKioskModeIconSize)() + SetKioskModeLockHomeScreen(value *bool)() + SetKioskModeManagedFolders(value []AndroidDeviceOwnerKioskModeManagedFolderable)() + SetKioskModeManagedHomeScreenAutoSignout(value *bool)() + SetKioskModeManagedHomeScreenInactiveSignOutDelayInSeconds(value *int32)() + SetKioskModeManagedHomeScreenInactiveSignOutNoticeInSeconds(value *int32)() + SetKioskModeManagedHomeScreenPinComplexity(value *KioskModeManagedHomeScreenPinComplexity)() + SetKioskModeManagedHomeScreenPinRequired(value *bool)() + SetKioskModeManagedHomeScreenPinRequiredToResume(value *bool)() + SetKioskModeManagedHomeScreenSignInBackground(value *string)() + SetKioskModeManagedHomeScreenSignInBrandingLogo(value *string)() + SetKioskModeManagedHomeScreenSignInEnabled(value *bool)() + SetKioskModeManagedSettingsEntryDisabled(value *bool)() + SetKioskModeMediaVolumeConfigurationEnabled(value *bool)() + SetKioskModeScreenOrientation(value *AndroidDeviceOwnerKioskModeScreenOrientation)() + SetKioskModeScreenSaverConfigurationEnabled(value *bool)() + SetKioskModeScreenSaverDetectMediaDisabled(value *bool)() + SetKioskModeScreenSaverDisplayTimeInSeconds(value *int32)() + SetKioskModeScreenSaverImageUrl(value *string)() + SetKioskModeScreenSaverStartDelayInSeconds(value *int32)() + SetKioskModeShowAppNotificationBadge(value *bool)() + SetKioskModeShowDeviceInfo(value *bool)() + SetKioskModeUseManagedHomeScreenApp(value *KioskModeType)() + SetKioskModeVirtualHomeButtonEnabled(value *bool)() + SetKioskModeVirtualHomeButtonType(value *AndroidDeviceOwnerVirtualHomeButtonType)() + SetKioskModeWallpaperUrl(value *string)() + SetKioskModeWifiAllowedSsids(value []string)() + SetKioskModeWiFiConfigurationEnabled(value *bool)() + SetMicrophoneForceMute(value *bool)() + SetMicrosoftLauncherConfigurationEnabled(value *bool)() + SetMicrosoftLauncherCustomWallpaperAllowUserModification(value *bool)() + SetMicrosoftLauncherCustomWallpaperEnabled(value *bool)() + SetMicrosoftLauncherCustomWallpaperImageUrl(value *string)() + SetMicrosoftLauncherDockPresenceAllowUserModification(value *bool)() + SetMicrosoftLauncherDockPresenceConfiguration(value *MicrosoftLauncherDockPresence)() + SetMicrosoftLauncherFeedAllowUserModification(value *bool)() + SetMicrosoftLauncherFeedEnabled(value *bool)() + SetMicrosoftLauncherSearchBarPlacementConfiguration(value *MicrosoftLauncherSearchBarPlacement)() + SetNetworkEscapeHatchAllowed(value *bool)() + SetNfcBlockOutgoingBeam(value *bool)() + SetPasswordBlockKeyguard(value *bool)() + SetPasswordBlockKeyguardFeatures(value []AndroidKeyguardFeature)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinimumLetterCharacters(value *int32)() + SetPasswordMinimumLowerCaseCharacters(value *int32)() + SetPasswordMinimumNonLetterCharacters(value *int32)() + SetPasswordMinimumNumericCharacters(value *int32)() + SetPasswordMinimumSymbolCharacters(value *int32)() + SetPasswordMinimumUpperCaseCharacters(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordPreviousPasswordCountToBlock(value *int32)() + SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() + SetPasswordRequireUnlock(value *AndroidDeviceOwnerRequiredPasswordUnlock)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetPersonalProfileAppsAllowInstallFromUnknownSources(value *bool)() + SetPersonalProfileCameraBlocked(value *bool)() + SetPersonalProfilePersonalApplications(value []AppListItemable)() + SetPersonalProfilePlayStoreMode(value *PersonalProfilePersonalPlayStoreMode)() + SetPersonalProfileScreenCaptureBlocked(value *bool)() + SetPlayStoreMode(value *AndroidDeviceOwnerPlayStoreMode)() + SetScreenCaptureBlocked(value *bool)() + SetSecurityCommonCriteriaModeEnabled(value *bool)() + SetSecurityDeveloperSettingsEnabled(value *bool)() + SetSecurityRequireVerifyApps(value *bool)() + SetShortHelpText(value AndroidDeviceOwnerUserFacingMessageable)() + SetStatusBarBlocked(value *bool)() + SetStayOnModes(value []AndroidDeviceOwnerBatteryPluggedMode)() + SetStorageAllowUsb(value *bool)() + SetStorageBlockExternalMedia(value *bool)() + SetStorageBlockUsbFileTransfer(value *bool)() + SetSystemUpdateFreezePeriods(value []AndroidDeviceOwnerSystemUpdateFreezePeriodable)() + SetSystemUpdateInstallType(value *AndroidDeviceOwnerSystemUpdateInstallType)() + SetSystemUpdateWindowEndMinutesAfterMidnight(value *int32)() + SetSystemUpdateWindowStartMinutesAfterMidnight(value *int32)() + SetSystemWindowsBlocked(value *bool)() + SetUsersBlockAdd(value *bool)() + SetUsersBlockRemove(value *bool)() + SetVolumeBlockAdjustment(value *bool)() + SetVpnAlwaysOnLockdownMode(value *bool)() + SetVpnAlwaysOnPackageIdentifier(value *string)() + SetWifiBlockEditConfigurations(value *bool)() + SetWifiBlockEditPolicyDefinedConfigurations(value *bool)() + SetWorkProfilePasswordExpirationDays(value *int32)() + SetWorkProfilePasswordMinimumLength(value *int32)() + SetWorkProfilePasswordMinimumLetterCharacters(value *int32)() + SetWorkProfilePasswordMinimumLowerCaseCharacters(value *int32)() + SetWorkProfilePasswordMinimumNonLetterCharacters(value *int32)() + SetWorkProfilePasswordMinimumNumericCharacters(value *int32)() + SetWorkProfilePasswordMinimumSymbolCharacters(value *int32)() + SetWorkProfilePasswordMinimumUpperCaseCharacters(value *int32)() + SetWorkProfilePasswordPreviousPasswordCountToBlock(value *int32)() + SetWorkProfilePasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() + SetWorkProfilePasswordRequireUnlock(value *AndroidDeviceOwnerRequiredPasswordUnlock)() + SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy.go new file mode 100644 index 000000000..746e45e22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxy android Device Owner Global Proxy. +type AndroidDeviceOwnerGlobalProxy 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 OdataType property + odataType *string +} +// NewAndroidDeviceOwnerGlobalProxy instantiates a new androidDeviceOwnerGlobalProxy and sets the default values. +func NewAndroidDeviceOwnerGlobalProxy()(*AndroidDeviceOwnerGlobalProxy) { + m := &AndroidDeviceOwnerGlobalProxy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerGlobalProxyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerGlobalProxyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceOwnerGlobalProxyAutoConfig": + return NewAndroidDeviceOwnerGlobalProxyAutoConfig(), nil + case "#microsoft.graph.androidDeviceOwnerGlobalProxyDirect": + return NewAndroidDeviceOwnerGlobalProxyDirect(), nil + } + } + } + } + return NewAndroidDeviceOwnerGlobalProxy(), 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 *AndroidDeviceOwnerGlobalProxy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerGlobalProxy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerGlobalProxy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerGlobalProxy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AndroidDeviceOwnerGlobalProxy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerGlobalProxy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_config.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_config.go new file mode 100644 index 000000000..7ba73e1f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_config.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxyAutoConfig +type AndroidDeviceOwnerGlobalProxyAutoConfig struct { + AndroidDeviceOwnerGlobalProxy + // The proxy auto-config URL + proxyAutoConfigURL *string +} +// NewAndroidDeviceOwnerGlobalProxyAutoConfig instantiates a new AndroidDeviceOwnerGlobalProxyAutoConfig and sets the default values. +func NewAndroidDeviceOwnerGlobalProxyAutoConfig()(*AndroidDeviceOwnerGlobalProxyAutoConfig) { + m := &AndroidDeviceOwnerGlobalProxyAutoConfig{ + AndroidDeviceOwnerGlobalProxy: *NewAndroidDeviceOwnerGlobalProxy(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerGlobalProxyAutoConfig"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerGlobalProxyAutoConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerGlobalProxyAutoConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerGlobalProxyAutoConfig(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerGlobalProxyAutoConfig) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerGlobalProxy.GetFieldDeserializers() + res["proxyAutoConfigURL"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyAutoConfigURL(val) + } + return nil + } + return res +} +// GetProxyAutoConfigURL gets the proxyAutoConfigURL property value. The proxy auto-config URL +func (m *AndroidDeviceOwnerGlobalProxyAutoConfig) GetProxyAutoConfigURL()(*string) { + return m.proxyAutoConfigURL +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerGlobalProxyAutoConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerGlobalProxy.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("proxyAutoConfigURL", m.GetProxyAutoConfigURL()) + if err != nil { + return err + } + } + return nil +} +// SetProxyAutoConfigURL sets the proxyAutoConfigURL property value. The proxy auto-config URL +func (m *AndroidDeviceOwnerGlobalProxyAutoConfig) SetProxyAutoConfigURL(value *string)() { + m.proxyAutoConfigURL = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_configable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_configable.go new file mode 100644 index 000000000..6d89e6040 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_auto_configable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxyAutoConfigable +type AndroidDeviceOwnerGlobalProxyAutoConfigable interface { + AndroidDeviceOwnerGlobalProxyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProxyAutoConfigURL()(*string) + SetProxyAutoConfigURL(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_direct.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_direct.go new file mode 100644 index 000000000..926b8887c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_direct.go @@ -0,0 +1,118 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxyDirect +type AndroidDeviceOwnerGlobalProxyDirect struct { + AndroidDeviceOwnerGlobalProxy + // The excluded hosts + excludedHosts []string + // The host name + host *string + // The port + port *int32 +} +// NewAndroidDeviceOwnerGlobalProxyDirect instantiates a new AndroidDeviceOwnerGlobalProxyDirect and sets the default values. +func NewAndroidDeviceOwnerGlobalProxyDirect()(*AndroidDeviceOwnerGlobalProxyDirect) { + m := &AndroidDeviceOwnerGlobalProxyDirect{ + AndroidDeviceOwnerGlobalProxy: *NewAndroidDeviceOwnerGlobalProxy(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerGlobalProxyDirect"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerGlobalProxyDirectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerGlobalProxyDirectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerGlobalProxyDirect(), nil +} +// GetExcludedHosts gets the excludedHosts property value. The excluded hosts +func (m *AndroidDeviceOwnerGlobalProxyDirect) GetExcludedHosts()([]string) { + return m.excludedHosts +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerGlobalProxyDirect) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerGlobalProxy.GetFieldDeserializers() + res["excludedHosts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludedHosts(res) + } + return nil + } + res["host"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHost(val) + } + return nil + } + res["port"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPort(val) + } + return nil + } + return res +} +// GetHost gets the host property value. The host name +func (m *AndroidDeviceOwnerGlobalProxyDirect) GetHost()(*string) { + return m.host +} +// GetPort gets the port property value. The port +func (m *AndroidDeviceOwnerGlobalProxyDirect) GetPort()(*int32) { + return m.port +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerGlobalProxyDirect) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerGlobalProxy.Serialize(writer) + if err != nil { + return err + } + if m.GetExcludedHosts() != nil { + err = writer.WriteCollectionOfStringValues("excludedHosts", m.GetExcludedHosts()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("host", m.GetHost()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("port", m.GetPort()) + if err != nil { + return err + } + } + return nil +} +// SetExcludedHosts sets the excludedHosts property value. The excluded hosts +func (m *AndroidDeviceOwnerGlobalProxyDirect) SetExcludedHosts(value []string)() { + m.excludedHosts = value +} +// SetHost sets the host property value. The host name +func (m *AndroidDeviceOwnerGlobalProxyDirect) SetHost(value *string)() { + m.host = value +} +// SetPort sets the port property value. The port +func (m *AndroidDeviceOwnerGlobalProxyDirect) SetPort(value *int32)() { + m.port = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_directable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_directable.go new file mode 100644 index 000000000..2fdb26ba4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxy_directable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxyDirectable +type AndroidDeviceOwnerGlobalProxyDirectable interface { + AndroidDeviceOwnerGlobalProxyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludedHosts()([]string) + GetHost()(*string) + GetPort()(*int32) + SetExcludedHosts(value []string)() + SetHost(value *string)() + SetPort(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxyable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxyable.go new file mode 100644 index 000000000..e1d70ae0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_global_proxyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerGlobalProxyable +type AndroidDeviceOwnerGlobalProxyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile.go new file mode 100644 index 000000000..0d3777f5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile.go @@ -0,0 +1,158 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerImportedPFXCertificateProfile +type AndroidDeviceOwnerImportedPFXCertificateProfile struct { + AndroidDeviceOwnerCertificateProfileBase + // Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. + certificateAccessType *AndroidDeviceOwnerCertificateAccessType + // PFX Import Options. + intendedPurpose *IntendedPurpose + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Certificate access information. This collection can contain a maximum of 50 elements. + silentCertificateAccessDetails []AndroidDeviceOwnerSilentCertificateAccessable +} +// NewAndroidDeviceOwnerImportedPFXCertificateProfile instantiates a new AndroidDeviceOwnerImportedPFXCertificateProfile and sets the default values. +func NewAndroidDeviceOwnerImportedPFXCertificateProfile()(*AndroidDeviceOwnerImportedPFXCertificateProfile) { + m := &AndroidDeviceOwnerImportedPFXCertificateProfile{ + AndroidDeviceOwnerCertificateProfileBase: *NewAndroidDeviceOwnerCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerImportedPFXCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerImportedPFXCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerImportedPFXCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerImportedPFXCertificateProfile(), nil +} +// GetCertificateAccessType gets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) { + return m.certificateAccessType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerCertificateProfileBase.GetFieldDeserializers() + res["certificateAccessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerCertificateAccessType) + if err != nil { + return err + } + if val != nil { + m.SetCertificateAccessType(val.(*AndroidDeviceOwnerCertificateAccessType)) + } + return nil + } + res["intendedPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIntendedPurpose) + if err != nil { + return err + } + if val != nil { + m.SetIntendedPurpose(val.(*IntendedPurpose)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["silentCertificateAccessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSilentCertificateAccessable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSilentCertificateAccessable) + } + m.SetSilentCertificateAccessDetails(res) + } + return nil + } + return res +} +// GetIntendedPurpose gets the intendedPurpose property value. PFX Import Options. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) GetIntendedPurpose()(*IntendedPurpose) { + return m.intendedPurpose +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSilentCertificateAccessDetails gets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) { + return m.silentCertificateAccessDetails +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateAccessType() != nil { + cast := (*m.GetCertificateAccessType()).String() + err = writer.WriteStringValue("certificateAccessType", &cast) + if err != nil { + return err + } + } + if m.GetIntendedPurpose() != nil { + cast := (*m.GetIntendedPurpose()).String() + err = writer.WriteStringValue("intendedPurpose", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetSilentCertificateAccessDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSilentCertificateAccessDetails())) + for i, v := range m.GetSilentCertificateAccessDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("silentCertificateAccessDetails", cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateAccessType sets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() { + m.certificateAccessType = value +} +// SetIntendedPurpose sets the intendedPurpose property value. PFX Import Options. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) SetIntendedPurpose(value *IntendedPurpose)() { + m.intendedPurpose = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSilentCertificateAccessDetails sets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerImportedPFXCertificateProfile) SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() { + m.silentCertificateAccessDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_response.go new file mode 100644 index 000000000..8c0edb0db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse +type AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerImportedPFXCertificateProfileable +} +// NewAndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse instantiates a new AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse()(*AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse) { + m := &AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerImportedPFXCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerImportedPFXCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerImportedPFXCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse) GetValue()([]AndroidDeviceOwnerImportedPFXCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponse) SetValue(value []AndroidDeviceOwnerImportedPFXCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..445eed40e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponseable +type AndroidDeviceOwnerImportedPFXCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerImportedPFXCertificateProfileable) + SetValue(value []AndroidDeviceOwnerImportedPFXCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profileable.go new file mode 100644 index 000000000..90fc1868c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_imported_p_f_x_certificate_profileable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerImportedPFXCertificateProfileable +type AndroidDeviceOwnerImportedPFXCertificateProfileable interface { + AndroidDeviceOwnerCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) + GetIntendedPurpose()(*IntendedPurpose) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) + SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() + SetIntendedPurpose(value *IntendedPurpose)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_customization_status_bar.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_customization_status_bar.go new file mode 100644 index 000000000..033c01517 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_customization_status_bar.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerKioskCustomizationStatusBar int + +const ( + // Not configured; this value defaults to STATUS_BAR_UNSPECIFIED. + NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR AndroidDeviceOwnerKioskCustomizationStatusBar = iota + // System info and notifications are shown on the status bar in kiosk mode. + NOTIFICATIONSANDSYSTEMINFOENABLED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR + // Only system info is shown on the status bar in kiosk mode. + SYSTEMINFOONLY_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR +) + +func (i AndroidDeviceOwnerKioskCustomizationStatusBar) String() string { + return []string{"notConfigured", "notificationsAndSystemInfoEnabled", "systemInfoOnly"}[i] +} +func ParseAndroidDeviceOwnerKioskCustomizationStatusBar(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR + case "notificationsAndSystemInfoEnabled": + result = NOTIFICATIONSANDSYSTEMINFOENABLED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR + case "systemInfoOnly": + result = SYSTEMINFOONLY_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSTATUSBAR + default: + return 0, errors.New("Unknown AndroidDeviceOwnerKioskCustomizationStatusBar value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerKioskCustomizationStatusBar(values []AndroidDeviceOwnerKioskCustomizationStatusBar) []string { + 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/android_device_owner_kiosk_customization_system_navigation.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_customization_system_navigation.go new file mode 100644 index 000000000..591861ca1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_customization_system_navigation.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerKioskCustomizationSystemNavigation int + +const ( + // Not configured; this value defaults to NAVIGATION_DISABLED. + NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION AndroidDeviceOwnerKioskCustomizationSystemNavigation = iota + // Home and overview buttons are enabled. + NAVIGATIONENABLED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION + // Only the home button is enabled. + HOMEBUTTONONLY_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION +) + +func (i AndroidDeviceOwnerKioskCustomizationSystemNavigation) String() string { + return []string{"notConfigured", "navigationEnabled", "homeButtonOnly"}[i] +} +func ParseAndroidDeviceOwnerKioskCustomizationSystemNavigation(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION + case "navigationEnabled": + result = NAVIGATIONENABLED_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION + case "homeButtonOnly": + result = HOMEBUTTONONLY_ANDROIDDEVICEOWNERKIOSKCUSTOMIZATIONSYSTEMNAVIGATION + default: + return 0, errors.New("Unknown AndroidDeviceOwnerKioskCustomizationSystemNavigation value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerKioskCustomizationSystemNavigation(values []AndroidDeviceOwnerKioskCustomizationSystemNavigation) []string { + 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/android_device_owner_kiosk_mode_app.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app.go new file mode 100644 index 000000000..48fb28944 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeApp +type AndroidDeviceOwnerKioskModeApp struct { + AndroidDeviceOwnerKioskModeFolderItem + // Class name of application + className *string + // Package name of application + package_escaped *string +} +// NewAndroidDeviceOwnerKioskModeApp instantiates a new AndroidDeviceOwnerKioskModeApp and sets the default values. +func NewAndroidDeviceOwnerKioskModeApp()(*AndroidDeviceOwnerKioskModeApp) { + m := &AndroidDeviceOwnerKioskModeApp{ + AndroidDeviceOwnerKioskModeFolderItem: *NewAndroidDeviceOwnerKioskModeFolderItem(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerKioskModeApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerKioskModeAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeApp(), nil +} +// GetClassName gets the className property value. Class name of application +func (m *AndroidDeviceOwnerKioskModeApp) GetClassName()(*string) { + return m.className +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerKioskModeFolderItem.GetFieldDeserializers() + res["className"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClassName(val) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackage(val) + } + return nil + } + return res +} +// GetPackage gets the package property value. Package name of application +func (m *AndroidDeviceOwnerKioskModeApp) GetPackage()(*string) { + return m.package_escaped +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerKioskModeFolderItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("className", m.GetClassName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("package", m.GetPackage()) + if err != nil { + return err + } + } + return nil +} +// SetClassName sets the className property value. Class name of application +func (m *AndroidDeviceOwnerKioskModeApp) SetClassName(value *string)() { + m.className = value +} +// SetPackage sets the package property value. Package name of application +func (m *AndroidDeviceOwnerKioskModeApp) SetPackage(value *string)() { + m.package_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item.go new file mode 100644 index 000000000..e4bfbb174 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeAppPositionItem an item in the list of app positions that sets the order of items on the Managed Home Screen +type AndroidDeviceOwnerKioskModeAppPositionItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents an item on the Android Device Owner Managed Home Screen (application, weblink or folder + item AndroidDeviceOwnerKioskModeHomeScreenItemable + // The OdataType property + odataType *string + // Position of the item on the grid. Valid values 0 to 9999999 + position *int32 +} +// NewAndroidDeviceOwnerKioskModeAppPositionItem instantiates a new androidDeviceOwnerKioskModeAppPositionItem and sets the default values. +func NewAndroidDeviceOwnerKioskModeAppPositionItem()(*AndroidDeviceOwnerKioskModeAppPositionItem) { + m := &AndroidDeviceOwnerKioskModeAppPositionItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerKioskModeAppPositionItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeAppPositionItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeAppPositionItem(), 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 *AndroidDeviceOwnerKioskModeAppPositionItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerKioskModeHomeScreenItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(AndroidDeviceOwnerKioskModeHomeScreenItemable)) + } + 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["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + return res +} +// GetItem gets the item property value. Represents an item on the Android Device Owner Managed Home Screen (application, weblink or folder +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) GetItem()(AndroidDeviceOwnerKioskModeHomeScreenItemable) { + return m.item +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) GetOdataType()(*string) { + return m.odataType +} +// GetPosition gets the position property value. Position of the item on the grid. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) GetPosition()(*int32) { + return m.position +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + 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 *AndroidDeviceOwnerKioskModeAppPositionItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetItem sets the item property value. Represents an item on the Android Device Owner Managed Home Screen (application, weblink or folder +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) SetItem(value AndroidDeviceOwnerKioskModeHomeScreenItemable)() { + m.item = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetPosition sets the position property value. Position of the item on the grid. Valid values 0 to 9999999 +func (m *AndroidDeviceOwnerKioskModeAppPositionItem) SetPosition(value *int32)() { + m.position = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_response.go new file mode 100644 index 000000000..1af09d90b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse +type AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerKioskModeAppPositionItemable +} +// NewAndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse instantiates a new AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse()(*AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse) { + m := &AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerKioskModeAppPositionItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeAppPositionItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeAppPositionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeAppPositionItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeAppPositionItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse) GetValue()([]AndroidDeviceOwnerKioskModeAppPositionItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponse) SetValue(value []AndroidDeviceOwnerKioskModeAppPositionItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_responseable.go new file mode 100644 index 000000000..ff151f9fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponseable +type AndroidDeviceOwnerKioskModeAppPositionItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerKioskModeAppPositionItemable) + SetValue(value []AndroidDeviceOwnerKioskModeAppPositionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_itemable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_itemable.go new file mode 100644 index 000000000..da33816e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_app_position_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeAppPositionItemable +type AndroidDeviceOwnerKioskModeAppPositionItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItem()(AndroidDeviceOwnerKioskModeHomeScreenItemable) + GetOdataType()(*string) + GetPosition()(*int32) + SetItem(value AndroidDeviceOwnerKioskModeHomeScreenItemable)() + SetOdataType(value *string)() + SetPosition(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_appable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_appable.go new file mode 100644 index 000000000..dea3c8cd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_appable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeAppable +type AndroidDeviceOwnerKioskModeAppable interface { + AndroidDeviceOwnerKioskModeFolderItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassName()(*string) + GetPackage()(*string) + SetClassName(value *string)() + SetPackage(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_icon.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_icon.go new file mode 100644 index 000000000..7b9b3b3da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_icon.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerKioskModeFolderIcon int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON AndroidDeviceOwnerKioskModeFolderIcon = iota + // Folder icon appears as dark square. + DARKSQUARE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + // Folder icon appears as dark circle. + DARKCIRCLE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + // Folder icon appears as light square. + LIGHTSQUARE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + // Folder icon appears as light circle . + LIGHTCIRCLE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON +) + +func (i AndroidDeviceOwnerKioskModeFolderIcon) String() string { + return []string{"notConfigured", "darkSquare", "darkCircle", "lightSquare", "lightCircle"}[i] +} +func ParseAndroidDeviceOwnerKioskModeFolderIcon(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + case "darkSquare": + result = DARKSQUARE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + case "darkCircle": + result = DARKCIRCLE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + case "lightSquare": + result = LIGHTSQUARE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + case "lightCircle": + result = LIGHTCIRCLE_ANDROIDDEVICEOWNERKIOSKMODEFOLDERICON + default: + return 0, errors.New("Unknown AndroidDeviceOwnerKioskModeFolderIcon value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerKioskModeFolderIcon(values []AndroidDeviceOwnerKioskModeFolderIcon) []string { + 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/android_device_owner_kiosk_mode_folder_item.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item.go new file mode 100644 index 000000000..48b1e8192 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item.go @@ -0,0 +1,56 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeFolderItem +type AndroidDeviceOwnerKioskModeFolderItem struct { + AndroidDeviceOwnerKioskModeHomeScreenItem +} +// NewAndroidDeviceOwnerKioskModeFolderItem instantiates a new AndroidDeviceOwnerKioskModeFolderItem and sets the default values. +func NewAndroidDeviceOwnerKioskModeFolderItem()(*AndroidDeviceOwnerKioskModeFolderItem) { + m := &AndroidDeviceOwnerKioskModeFolderItem{ + AndroidDeviceOwnerKioskModeHomeScreenItem: *NewAndroidDeviceOwnerKioskModeHomeScreenItem(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerKioskModeFolderItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerKioskModeFolderItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeFolderItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceOwnerKioskModeApp": + return NewAndroidDeviceOwnerKioskModeApp(), nil + case "#microsoft.graph.androidDeviceOwnerKioskModeWeblink": + return NewAndroidDeviceOwnerKioskModeWeblink(), nil + } + } + } + } + return NewAndroidDeviceOwnerKioskModeFolderItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeFolderItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerKioskModeHomeScreenItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeFolderItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerKioskModeHomeScreenItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_response.go new file mode 100644 index 000000000..0a0bec71f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeFolderItemCollectionResponse +type AndroidDeviceOwnerKioskModeFolderItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerKioskModeFolderItemable +} +// NewAndroidDeviceOwnerKioskModeFolderItemCollectionResponse instantiates a new AndroidDeviceOwnerKioskModeFolderItemCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerKioskModeFolderItemCollectionResponse()(*AndroidDeviceOwnerKioskModeFolderItemCollectionResponse) { + m := &AndroidDeviceOwnerKioskModeFolderItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerKioskModeFolderItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeFolderItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeFolderItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeFolderItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeFolderItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeFolderItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeFolderItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeFolderItemCollectionResponse) GetValue()([]AndroidDeviceOwnerKioskModeFolderItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeFolderItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeFolderItemCollectionResponse) SetValue(value []AndroidDeviceOwnerKioskModeFolderItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_responseable.go new file mode 100644 index 000000000..07f804f79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeFolderItemCollectionResponseable +type AndroidDeviceOwnerKioskModeFolderItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerKioskModeFolderItemable) + SetValue(value []AndroidDeviceOwnerKioskModeFolderItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_itemable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_itemable.go new file mode 100644 index 000000000..500df5d2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_folder_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeFolderItemable +type AndroidDeviceOwnerKioskModeFolderItemable interface { + AndroidDeviceOwnerKioskModeHomeScreenItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_item.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_item.go new file mode 100644 index 000000000..7b1cd81e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_item.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeHomeScreenItem represents an item on the Android Device Owner Managed Home Screen (application, weblink or folder +type AndroidDeviceOwnerKioskModeHomeScreenItem 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 OdataType property + odataType *string +} +// NewAndroidDeviceOwnerKioskModeHomeScreenItem instantiates a new androidDeviceOwnerKioskModeHomeScreenItem and sets the default values. +func NewAndroidDeviceOwnerKioskModeHomeScreenItem()(*AndroidDeviceOwnerKioskModeHomeScreenItem) { + m := &AndroidDeviceOwnerKioskModeHomeScreenItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerKioskModeHomeScreenItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeHomeScreenItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceOwnerKioskModeApp": + return NewAndroidDeviceOwnerKioskModeApp(), nil + case "#microsoft.graph.androidDeviceOwnerKioskModeFolderItem": + return NewAndroidDeviceOwnerKioskModeFolderItem(), nil + case "#microsoft.graph.androidDeviceOwnerKioskModeManagedFolderReference": + return NewAndroidDeviceOwnerKioskModeManagedFolderReference(), nil + case "#microsoft.graph.androidDeviceOwnerKioskModeWeblink": + return NewAndroidDeviceOwnerKioskModeWeblink(), nil + } + } + } + } + return NewAndroidDeviceOwnerKioskModeHomeScreenItem(), 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 *AndroidDeviceOwnerKioskModeHomeScreenItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeHomeScreenItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeHomeScreenItem) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeHomeScreenItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AndroidDeviceOwnerKioskModeHomeScreenItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeHomeScreenItem) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_itemable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_itemable.go new file mode 100644 index 000000000..0dfc996c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_home_screen_itemable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeHomeScreenItemable +type AndroidDeviceOwnerKioskModeHomeScreenItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_icon_size.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_icon_size.go new file mode 100644 index 000000000..67d0a1277 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_icon_size.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerKioskModeIconSize int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE AndroidDeviceOwnerKioskModeIconSize = iota + // Smallest icon size. + SMALLEST_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + // Small icon size. + SMALL_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + // Regular icon size. + REGULAR_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + // Large icon size. + LARGE_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + // Largest icon size. + LARGEST_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE +) + +func (i AndroidDeviceOwnerKioskModeIconSize) String() string { + return []string{"notConfigured", "smallest", "small", "regular", "large", "largest"}[i] +} +func ParseAndroidDeviceOwnerKioskModeIconSize(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + case "smallest": + result = SMALLEST_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + case "small": + result = SMALL_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + case "regular": + result = REGULAR_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + case "large": + result = LARGE_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + case "largest": + result = LARGEST_ANDROIDDEVICEOWNERKIOSKMODEICONSIZE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerKioskModeIconSize value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerKioskModeIconSize(values []AndroidDeviceOwnerKioskModeIconSize) []string { + 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/android_device_owner_kiosk_mode_managed_folder.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder.go new file mode 100644 index 000000000..2716accbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolder a folder containing pages of apps and weblinks on the Managed Home Screen +type AndroidDeviceOwnerKioskModeManagedFolder struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Unique identifier for the folder + folderIdentifier *string + // Display name for the folder + folderName *string + // Items to be added to managed folder. This collection can contain a maximum of 500 elements. + items []AndroidDeviceOwnerKioskModeFolderItemable + // The OdataType property + odataType *string +} +// NewAndroidDeviceOwnerKioskModeManagedFolder instantiates a new androidDeviceOwnerKioskModeManagedFolder and sets the default values. +func NewAndroidDeviceOwnerKioskModeManagedFolder()(*AndroidDeviceOwnerKioskModeManagedFolder) { + m := &AndroidDeviceOwnerKioskModeManagedFolder{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerKioskModeManagedFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeManagedFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeManagedFolder(), 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 *AndroidDeviceOwnerKioskModeManagedFolder) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeManagedFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["folderIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFolderIdentifier(val) + } + return nil + } + res["folderName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFolderName(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeFolderItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeFolderItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeFolderItemable) + } + m.SetItems(res) + } + 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 + } + return res +} +// GetFolderIdentifier gets the folderIdentifier property value. Unique identifier for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolder) GetFolderIdentifier()(*string) { + return m.folderIdentifier +} +// GetFolderName gets the folderName property value. Display name for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolder) GetFolderName()(*string) { + return m.folderName +} +// GetItems gets the items property value. Items to be added to managed folder. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerKioskModeManagedFolder) GetItems()([]AndroidDeviceOwnerKioskModeFolderItemable) { + return m.items +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeManagedFolder) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeManagedFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("folderIdentifier", m.GetFolderIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("folderName", m.GetFolderName()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AndroidDeviceOwnerKioskModeManagedFolder) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFolderIdentifier sets the folderIdentifier property value. Unique identifier for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolder) SetFolderIdentifier(value *string)() { + m.folderIdentifier = value +} +// SetFolderName sets the folderName property value. Display name for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolder) SetFolderName(value *string)() { + m.folderName = value +} +// SetItems sets the items property value. Items to be added to managed folder. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerKioskModeManagedFolder) SetItems(value []AndroidDeviceOwnerKioskModeFolderItemable)() { + m.items = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerKioskModeManagedFolder) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_response.go new file mode 100644 index 000000000..793a5bf35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse +type AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerKioskModeManagedFolderable +} +// NewAndroidDeviceOwnerKioskModeManagedFolderCollectionResponse instantiates a new AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerKioskModeManagedFolderCollectionResponse()(*AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse) { + m := &AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerKioskModeManagedFolderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeManagedFolderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeManagedFolderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerKioskModeManagedFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerKioskModeManagedFolderable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerKioskModeManagedFolderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse) GetValue()([]AndroidDeviceOwnerKioskModeManagedFolderable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerKioskModeManagedFolderCollectionResponse) SetValue(value []AndroidDeviceOwnerKioskModeManagedFolderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_responseable.go new file mode 100644 index 000000000..93e47cec5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolderCollectionResponseable +type AndroidDeviceOwnerKioskModeManagedFolderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerKioskModeManagedFolderable) + SetValue(value []AndroidDeviceOwnerKioskModeManagedFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_reference.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_reference.go new file mode 100644 index 000000000..4b87aa3c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_reference.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolderReference +type AndroidDeviceOwnerKioskModeManagedFolderReference struct { + AndroidDeviceOwnerKioskModeHomeScreenItem + // Unique identifier for the folder + folderIdentifier *string + // Name of the folder + folderName *string +} +// NewAndroidDeviceOwnerKioskModeManagedFolderReference instantiates a new AndroidDeviceOwnerKioskModeManagedFolderReference and sets the default values. +func NewAndroidDeviceOwnerKioskModeManagedFolderReference()(*AndroidDeviceOwnerKioskModeManagedFolderReference) { + m := &AndroidDeviceOwnerKioskModeManagedFolderReference{ + AndroidDeviceOwnerKioskModeHomeScreenItem: *NewAndroidDeviceOwnerKioskModeHomeScreenItem(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerKioskModeManagedFolderReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerKioskModeManagedFolderReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeManagedFolderReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeManagedFolderReference(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerKioskModeHomeScreenItem.GetFieldDeserializers() + res["folderIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFolderIdentifier(val) + } + return nil + } + res["folderName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFolderName(val) + } + return nil + } + return res +} +// GetFolderIdentifier gets the folderIdentifier property value. Unique identifier for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) GetFolderIdentifier()(*string) { + return m.folderIdentifier +} +// GetFolderName gets the folderName property value. Name of the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) GetFolderName()(*string) { + return m.folderName +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerKioskModeHomeScreenItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("folderIdentifier", m.GetFolderIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("folderName", m.GetFolderName()) + if err != nil { + return err + } + } + return nil +} +// SetFolderIdentifier sets the folderIdentifier property value. Unique identifier for the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) SetFolderIdentifier(value *string)() { + m.folderIdentifier = value +} +// SetFolderName sets the folderName property value. Name of the folder +func (m *AndroidDeviceOwnerKioskModeManagedFolderReference) SetFolderName(value *string)() { + m.folderName = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_referenceable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_referenceable.go new file mode 100644 index 000000000..f64e9170a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folder_referenceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolderReferenceable +type AndroidDeviceOwnerKioskModeManagedFolderReferenceable interface { + AndroidDeviceOwnerKioskModeHomeScreenItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFolderIdentifier()(*string) + GetFolderName()(*string) + SetFolderIdentifier(value *string)() + SetFolderName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folderable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folderable.go new file mode 100644 index 000000000..85c51479c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_managed_folderable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeManagedFolderable +type AndroidDeviceOwnerKioskModeManagedFolderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFolderIdentifier()(*string) + GetFolderName()(*string) + GetItems()([]AndroidDeviceOwnerKioskModeFolderItemable) + GetOdataType()(*string) + SetFolderIdentifier(value *string)() + SetFolderName(value *string)() + SetItems(value []AndroidDeviceOwnerKioskModeFolderItemable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_screen_orientation.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_screen_orientation.go new file mode 100644 index 000000000..38f85cdae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_screen_orientation.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerKioskModeScreenOrientation int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION AndroidDeviceOwnerKioskModeScreenOrientation = iota + // Portrait orientation. + PORTRAIT_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + // Landscape orientation. + LANDSCAPE_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + // Auto rotate between portrait and landscape orientations. + AUTOROTATE_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION +) + +func (i AndroidDeviceOwnerKioskModeScreenOrientation) String() string { + return []string{"notConfigured", "portrait", "landscape", "autoRotate"}[i] +} +func ParseAndroidDeviceOwnerKioskModeScreenOrientation(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + case "portrait": + result = PORTRAIT_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + case "landscape": + result = LANDSCAPE_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + case "autoRotate": + result = AUTOROTATE_ANDROIDDEVICEOWNERKIOSKMODESCREENORIENTATION + default: + return 0, errors.New("Unknown AndroidDeviceOwnerKioskModeScreenOrientation value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerKioskModeScreenOrientation(values []AndroidDeviceOwnerKioskModeScreenOrientation) []string { + 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/android_device_owner_kiosk_mode_weblink.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_weblink.go new file mode 100644 index 000000000..37982276f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_weblink.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeWeblink +type AndroidDeviceOwnerKioskModeWeblink struct { + AndroidDeviceOwnerKioskModeFolderItem + // Display name for weblink + label *string + // Link for weblink + link *string +} +// NewAndroidDeviceOwnerKioskModeWeblink instantiates a new AndroidDeviceOwnerKioskModeWeblink and sets the default values. +func NewAndroidDeviceOwnerKioskModeWeblink()(*AndroidDeviceOwnerKioskModeWeblink) { + m := &AndroidDeviceOwnerKioskModeWeblink{ + AndroidDeviceOwnerKioskModeFolderItem: *NewAndroidDeviceOwnerKioskModeFolderItem(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerKioskModeWeblink"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerKioskModeWeblinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerKioskModeWeblinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerKioskModeWeblink(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerKioskModeWeblink) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerKioskModeFolderItem.GetFieldDeserializers() + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLink(val) + } + return nil + } + return res +} +// GetLabel gets the label property value. Display name for weblink +func (m *AndroidDeviceOwnerKioskModeWeblink) GetLabel()(*string) { + return m.label +} +// GetLink gets the link property value. Link for weblink +func (m *AndroidDeviceOwnerKioskModeWeblink) GetLink()(*string) { + return m.link +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerKioskModeWeblink) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerKioskModeFolderItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("link", m.GetLink()) + if err != nil { + return err + } + } + return nil +} +// SetLabel sets the label property value. Display name for weblink +func (m *AndroidDeviceOwnerKioskModeWeblink) SetLabel(value *string)() { + m.label = value +} +// SetLink sets the link property value. Link for weblink +func (m *AndroidDeviceOwnerKioskModeWeblink) SetLink(value *string)() { + m.link = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_weblinkable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_weblinkable.go new file mode 100644 index 000000000..6ac6615bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_kiosk_mode_weblinkable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerKioskModeWeblinkable +type AndroidDeviceOwnerKioskModeWeblinkable interface { + AndroidDeviceOwnerKioskModeFolderItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabel()(*string) + GetLink()(*string) + SetLabel(value *string)() + SetLink(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile.go new file mode 100644 index 000000000..90cc52348 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile.go @@ -0,0 +1,349 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerPkcsCertificateProfile +type AndroidDeviceOwnerPkcsCertificateProfile struct { + AndroidDeviceOwnerCertificateProfileBase + // Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. + certificateAccessType *AndroidDeviceOwnerCertificateAccessType + // CertificateStore types + certificateStore *CertificateStore + // PKCS Certificate Template Name + certificateTemplateName *string + // PKCS Certification Authority + certificationAuthority *string + // PKCS Certification Authority Name + certificationAuthorityName *string + // Device Management Certification Authority Types. + certificationAuthorityType *DeviceManagementCertificationAuthority + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Certificate access information. This collection can contain a maximum of 50 elements. + silentCertificateAccessDetails []AndroidDeviceOwnerSilentCertificateAccessable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidDeviceOwnerPkcsCertificateProfile instantiates a new AndroidDeviceOwnerPkcsCertificateProfile and sets the default values. +func NewAndroidDeviceOwnerPkcsCertificateProfile()(*AndroidDeviceOwnerPkcsCertificateProfile) { + m := &AndroidDeviceOwnerPkcsCertificateProfile{ + AndroidDeviceOwnerCertificateProfileBase: *NewAndroidDeviceOwnerCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerPkcsCertificateProfile(), nil +} +// GetCertificateAccessType gets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) { + return m.certificateAccessType +} +// GetCertificateStore gets the certificateStore property value. CertificateStore types +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetCertificationAuthorityType gets the certificationAuthorityType property value. Device Management Certification Authority Types. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCertificationAuthorityType()(*DeviceManagementCertificationAuthority) { + return m.certificationAuthorityType +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerCertificateProfileBase.GetFieldDeserializers() + res["certificateAccessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerCertificateAccessType) + if err != nil { + return err + } + if val != nil { + m.SetCertificateAccessType(val.(*AndroidDeviceOwnerCertificateAccessType)) + } + return nil + } + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["certificationAuthorityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementCertificationAuthority) + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityType(val.(*DeviceManagementCertificationAuthority)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["silentCertificateAccessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSilentCertificateAccessable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSilentCertificateAccessable) + } + m.SetSilentCertificateAccessDetails(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSilentCertificateAccessDetails gets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) { + return m.silentCertificateAccessDetails +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidDeviceOwnerPkcsCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateAccessType() != nil { + cast := (*m.GetCertificateAccessType()).String() + err = writer.WriteStringValue("certificateAccessType", &cast) + if err != nil { + return err + } + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetCertificationAuthorityType() != nil { + cast := (*m.GetCertificationAuthorityType()).String() + err = writer.WriteStringValue("certificationAuthorityType", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetSilentCertificateAccessDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSilentCertificateAccessDetails())) + for i, v := range m.GetSilentCertificateAccessDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("silentCertificateAccessDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateAccessType sets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() { + m.certificateAccessType = value +} +// SetCertificateStore sets the certificateStore property value. CertificateStore types +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetCertificationAuthorityType sets the certificationAuthorityType property value. Device Management Certification Authority Types. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCertificationAuthorityType(value *DeviceManagementCertificationAuthority)() { + m.certificationAuthorityType = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSilentCertificateAccessDetails sets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() { + m.silentCertificateAccessDetails = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidDeviceOwnerPkcsCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..47b8e6ad7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse +type AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerPkcsCertificateProfileable +} +// NewAndroidDeviceOwnerPkcsCertificateProfileCollectionResponse instantiates a new AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerPkcsCertificateProfileCollectionResponse()(*AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse) { + m := &AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse) GetValue()([]AndroidDeviceOwnerPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerPkcsCertificateProfileCollectionResponse) SetValue(value []AndroidDeviceOwnerPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..ceb5755e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerPkcsCertificateProfileCollectionResponseable +type AndroidDeviceOwnerPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerPkcsCertificateProfileable) + SetValue(value []AndroidDeviceOwnerPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profileable.go new file mode 100644 index 000000000..06dcd5b70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_pkcs_certificate_profileable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerPkcsCertificateProfileable +type AndroidDeviceOwnerPkcsCertificateProfileable interface { + AndroidDeviceOwnerCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) + GetCertificateStore()(*CertificateStore) + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetCertificationAuthorityType()(*DeviceManagementCertificationAuthority) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() + SetCertificateStore(value *CertificateStore)() + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetCertificationAuthorityType(value *DeviceManagementCertificationAuthority)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_play_store_mode.go b/src/internal/connector/graph/betasdk/models/android_device_owner_play_store_mode.go new file mode 100644 index 000000000..72693fe03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_play_store_mode.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerPlayStoreMode int + +const ( + // Not Configured + NOTCONFIGURED_ANDROIDDEVICEOWNERPLAYSTOREMODE AndroidDeviceOwnerPlayStoreMode = iota + // Only apps that are in the policy are available and any app not in the policy will be automatically uninstalled from the device. + ALLOWLIST_ANDROIDDEVICEOWNERPLAYSTOREMODE + // All apps are available and any app that should not be on the device should be explicitly marked as 'BLOCKED' in the applications policy. + BLOCKLIST_ANDROIDDEVICEOWNERPLAYSTOREMODE +) + +func (i AndroidDeviceOwnerPlayStoreMode) String() string { + return []string{"notConfigured", "allowList", "blockList"}[i] +} +func ParseAndroidDeviceOwnerPlayStoreMode(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERPLAYSTOREMODE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERPLAYSTOREMODE + case "allowList": + result = ALLOWLIST_ANDROIDDEVICEOWNERPLAYSTOREMODE + case "blockList": + result = BLOCKLIST_ANDROIDDEVICEOWNERPLAYSTOREMODE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerPlayStoreMode value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerPlayStoreMode(values []AndroidDeviceOwnerPlayStoreMode) []string { + 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/android_device_owner_required_password_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_required_password_type.go new file mode 100644 index 000000000..b0c92a5ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_required_password_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerRequiredPasswordType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE AndroidDeviceOwnerRequiredPasswordType = iota + // There must be a password set, but there are no restrictions on type. + REQUIRED_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // At least numeric. + NUMERIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // At least numeric with no repeating or ordered sequences. + NUMERICCOMPLEX_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // At least alphabetic password. + ALPHABETIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // At least alphanumeric password + ALPHANUMERIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // At least alphanumeric with symbols. + ALPHANUMERICWITHSYMBOLS_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // Low security biometrics based password required. + LOWSECURITYBIOMETRIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + // Custom password set by the admin. + CUSTOMPASSWORD_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE +) + +func (i AndroidDeviceOwnerRequiredPasswordType) String() string { + return []string{"deviceDefault", "required", "numeric", "numericComplex", "alphabetic", "alphanumeric", "alphanumericWithSymbols", "lowSecurityBiometric", "customPassword"}[i] +} +func ParseAndroidDeviceOwnerRequiredPasswordType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "required": + result = REQUIRED_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "numeric": + result = NUMERIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "numericComplex": + result = NUMERICCOMPLEX_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "alphabetic": + result = ALPHABETIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "alphanumeric": + result = ALPHANUMERIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "alphanumericWithSymbols": + result = ALPHANUMERICWITHSYMBOLS_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "lowSecurityBiometric": + result = LOWSECURITYBIOMETRIC_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + case "customPassword": + result = CUSTOMPASSWORD_ANDROIDDEVICEOWNERREQUIREDPASSWORDTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerRequiredPasswordType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerRequiredPasswordType(values []AndroidDeviceOwnerRequiredPasswordType) []string { + 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/android_device_owner_required_password_unlock.go b/src/internal/connector/graph/betasdk/models/android_device_owner_required_password_unlock.go new file mode 100644 index 000000000..32202e3f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_required_password_unlock.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerRequiredPasswordUnlock int + +const ( + // Timeout period before strong authentication is required is set to the device's default. + DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK AndroidDeviceOwnerRequiredPasswordUnlock = iota + // Timeout period before strong authentication is required is set to 24 hours. + DAILY_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK + // Unknown future value (reserved, not used right now) + UNKOWNFUTUREVALUE_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK +) + +func (i AndroidDeviceOwnerRequiredPasswordUnlock) String() string { + return []string{"deviceDefault", "daily", "unkownFutureValue"}[i] +} +func ParseAndroidDeviceOwnerRequiredPasswordUnlock(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK + case "daily": + result = DAILY_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK + case "unkownFutureValue": + result = UNKOWNFUTUREVALUE_ANDROIDDEVICEOWNERREQUIREDPASSWORDUNLOCK + default: + return 0, errors.New("Unknown AndroidDeviceOwnerRequiredPasswordUnlock value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerRequiredPasswordUnlock(values []AndroidDeviceOwnerRequiredPasswordUnlock) []string { + 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/android_device_owner_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile.go new file mode 100644 index 000000000..407e7640a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile.go @@ -0,0 +1,355 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerScepCertificateProfile +type AndroidDeviceOwnerScepCertificateProfile struct { + AndroidDeviceOwnerCertificateProfileBase + // Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. + certificateAccessType *AndroidDeviceOwnerCertificateAccessType + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Hash Algorithm Options. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // SCEP Server Url(s) + scepServerUrls []string + // Certificate access information. This collection can contain a maximum of 50 elements. + silentCertificateAccessDetails []AndroidDeviceOwnerSilentCertificateAccessable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidDeviceOwnerScepCertificateProfile instantiates a new AndroidDeviceOwnerScepCertificateProfile and sets the default values. +func NewAndroidDeviceOwnerScepCertificateProfile()(*AndroidDeviceOwnerScepCertificateProfile) { + m := &AndroidDeviceOwnerScepCertificateProfile{ + AndroidDeviceOwnerCertificateProfileBase: *NewAndroidDeviceOwnerCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerScepCertificateProfile(), nil +} +// GetCertificateAccessType gets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) { + return m.certificateAccessType +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidDeviceOwnerCertificateProfileBase.GetFieldDeserializers() + res["certificateAccessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerCertificateAccessType) + if err != nil { + return err + } + if val != nil { + m.SetCertificateAccessType(val.(*AndroidDeviceOwnerCertificateAccessType)) + } + return nil + } + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["silentCertificateAccessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSilentCertificateAccessable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSilentCertificateAccessable) + } + m.SetSilentCertificateAccessDetails(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidDeviceOwnerScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSilentCertificateAccessDetails gets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) { + return m.silentCertificateAccessDetails +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidDeviceOwnerScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidDeviceOwnerScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidDeviceOwnerCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateAccessType() != nil { + cast := (*m.GetCertificateAccessType()).String() + err = writer.WriteStringValue("certificateAccessType", &cast) + if err != nil { + return err + } + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + if m.GetSilentCertificateAccessDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSilentCertificateAccessDetails())) + for i, v := range m.GetSilentCertificateAccessDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("silentCertificateAccessDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateAccessType sets the certificateAccessType property value. Certificate access type. Possible values are: userApproval, specificApps, unknownFutureValue. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() { + m.certificateAccessType = value +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetHashAlgorithm sets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidDeviceOwnerScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSilentCertificateAccessDetails sets the silentCertificateAccessDetails property value. Certificate access information. This collection can contain a maximum of 50 elements. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() { + m.silentCertificateAccessDetails = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidDeviceOwnerScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidDeviceOwnerScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..49f3917d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerScepCertificateProfileCollectionResponse +type AndroidDeviceOwnerScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerScepCertificateProfileable +} +// NewAndroidDeviceOwnerScepCertificateProfileCollectionResponse instantiates a new AndroidDeviceOwnerScepCertificateProfileCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerScepCertificateProfileCollectionResponse()(*AndroidDeviceOwnerScepCertificateProfileCollectionResponse) { + m := &AndroidDeviceOwnerScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerScepCertificateProfileCollectionResponse) GetValue()([]AndroidDeviceOwnerScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerScepCertificateProfileCollectionResponse) SetValue(value []AndroidDeviceOwnerScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..9f04225ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerScepCertificateProfileCollectionResponseable +type AndroidDeviceOwnerScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerScepCertificateProfileable) + SetValue(value []AndroidDeviceOwnerScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profileable.go new file mode 100644 index 000000000..90ac54895 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_scep_certificate_profileable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerScepCertificateProfileable +type AndroidDeviceOwnerScepCertificateProfileable interface { + AndroidDeviceOwnerCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateAccessType()(*AndroidDeviceOwnerCertificateAccessType) + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetScepServerUrls()([]string) + GetSilentCertificateAccessDetails()([]AndroidDeviceOwnerSilentCertificateAccessable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateAccessType(value *AndroidDeviceOwnerCertificateAccessType)() + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetScepServerUrls(value []string)() + SetSilentCertificateAccessDetails(value []AndroidDeviceOwnerSilentCertificateAccessable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access.go b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access.go new file mode 100644 index 000000000..cb45126a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSilentCertificateAccess contain the package ID that has the pre-granted access to the certificate. +type AndroidDeviceOwnerSilentCertificateAccess 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 OdataType property + odataType *string + // Package ID that has the pre-granted access to the certificate. + packageId *string +} +// NewAndroidDeviceOwnerSilentCertificateAccess instantiates a new androidDeviceOwnerSilentCertificateAccess and sets the default values. +func NewAndroidDeviceOwnerSilentCertificateAccess()(*AndroidDeviceOwnerSilentCertificateAccess) { + m := &AndroidDeviceOwnerSilentCertificateAccess{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerSilentCertificateAccess(), 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 *AndroidDeviceOwnerSilentCertificateAccess) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerSilentCertificateAccess) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerSilentCertificateAccess) GetOdataType()(*string) { + return m.odataType +} +// GetPackageId gets the packageId property value. Package ID that has the pre-granted access to the certificate. +func (m *AndroidDeviceOwnerSilentCertificateAccess) GetPackageId()(*string) { + return m.packageId +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerSilentCertificateAccess) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("packageId", m.GetPackageId()) + 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 *AndroidDeviceOwnerSilentCertificateAccess) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerSilentCertificateAccess) SetOdataType(value *string)() { + m.odataType = value +} +// SetPackageId sets the packageId property value. Package ID that has the pre-granted access to the certificate. +func (m *AndroidDeviceOwnerSilentCertificateAccess) SetPackageId(value *string)() { + m.packageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_response.go new file mode 100644 index 000000000..9c3d73abb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSilentCertificateAccessCollectionResponse +type AndroidDeviceOwnerSilentCertificateAccessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerSilentCertificateAccessable +} +// NewAndroidDeviceOwnerSilentCertificateAccessCollectionResponse instantiates a new AndroidDeviceOwnerSilentCertificateAccessCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerSilentCertificateAccessCollectionResponse()(*AndroidDeviceOwnerSilentCertificateAccessCollectionResponse) { + m := &AndroidDeviceOwnerSilentCertificateAccessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerSilentCertificateAccessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerSilentCertificateAccessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerSilentCertificateAccessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerSilentCertificateAccessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSilentCertificateAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSilentCertificateAccessable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSilentCertificateAccessable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerSilentCertificateAccessCollectionResponse) GetValue()([]AndroidDeviceOwnerSilentCertificateAccessable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerSilentCertificateAccessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerSilentCertificateAccessCollectionResponse) SetValue(value []AndroidDeviceOwnerSilentCertificateAccessable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_responseable.go new file mode 100644 index 000000000..979f85349 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_access_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSilentCertificateAccessCollectionResponseable +type AndroidDeviceOwnerSilentCertificateAccessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerSilentCertificateAccessable) + SetValue(value []AndroidDeviceOwnerSilentCertificateAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_accessable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_accessable.go new file mode 100644 index 000000000..3f8630377 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_silent_certificate_accessable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSilentCertificateAccessable +type AndroidDeviceOwnerSilentCertificateAccessable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPackageId()(*string) + SetOdataType(value *string)() + SetPackageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period.go b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period.go new file mode 100644 index 000000000..d1891659a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSystemUpdateFreezePeriod represents one item in the list of freeze periods for Android Device Owner system updates +type AndroidDeviceOwnerSystemUpdateFreezePeriod 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 day of the end date of the freeze period. Valid values 1 to 31 + endDay *int32 + // The month of the end date of the freeze period. Valid values 1 to 12 + endMonth *int32 + // The OdataType property + odataType *string + // The day of the start date of the freeze period. Valid values 1 to 31 + startDay *int32 + // The month of the start date of the freeze period. Valid values 1 to 12 + startMonth *int32 +} +// NewAndroidDeviceOwnerSystemUpdateFreezePeriod instantiates a new androidDeviceOwnerSystemUpdateFreezePeriod and sets the default values. +func NewAndroidDeviceOwnerSystemUpdateFreezePeriod()(*AndroidDeviceOwnerSystemUpdateFreezePeriod) { + m := &AndroidDeviceOwnerSystemUpdateFreezePeriod{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerSystemUpdateFreezePeriodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerSystemUpdateFreezePeriodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerSystemUpdateFreezePeriod(), 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 *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDay gets the endDay property value. The day of the end date of the freeze period. Valid values 1 to 31 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetEndDay()(*int32) { + return m.endDay +} +// GetEndMonth gets the endMonth property value. The month of the end date of the freeze period. Valid values 1 to 12 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetEndMonth()(*int32) { + return m.endMonth +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndDay(val) + } + return nil + } + res["endMonth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEndMonth(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["startDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartDay(val) + } + return nil + } + res["startMonth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStartMonth(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetOdataType()(*string) { + return m.odataType +} +// GetStartDay gets the startDay property value. The day of the start date of the freeze period. Valid values 1 to 31 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetStartDay()(*int32) { + return m.startDay +} +// GetStartMonth gets the startMonth property value. The month of the start date of the freeze period. Valid values 1 to 12 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) GetStartMonth()(*int32) { + return m.startMonth +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("endDay", m.GetEndDay()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("endMonth", m.GetEndMonth()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("startDay", m.GetStartDay()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("startMonth", m.GetStartMonth()) + 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 *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDay sets the endDay property value. The day of the end date of the freeze period. Valid values 1 to 31 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetEndDay(value *int32)() { + m.endDay = value +} +// SetEndMonth sets the endMonth property value. The month of the end date of the freeze period. Valid values 1 to 12 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetEndMonth(value *int32)() { + m.endMonth = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDay sets the startDay property value. The day of the start date of the freeze period. Valid values 1 to 31 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetStartDay(value *int32)() { + m.startDay = value +} +// SetStartMonth sets the startMonth property value. The month of the start date of the freeze period. Valid values 1 to 12 +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriod) SetStartMonth(value *int32)() { + m.startMonth = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_response.go new file mode 100644 index 000000000..6c2e32ca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse +type AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerSystemUpdateFreezePeriodable +} +// NewAndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse instantiates a new AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse()(*AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse) { + m := &AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerSystemUpdateFreezePeriodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerSystemUpdateFreezePeriodable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerSystemUpdateFreezePeriodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse) GetValue()([]AndroidDeviceOwnerSystemUpdateFreezePeriodable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponse) SetValue(value []AndroidDeviceOwnerSystemUpdateFreezePeriodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_responseable.go new file mode 100644 index 000000000..de2ef5eb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_period_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponseable +type AndroidDeviceOwnerSystemUpdateFreezePeriodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerSystemUpdateFreezePeriodable) + SetValue(value []AndroidDeviceOwnerSystemUpdateFreezePeriodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_periodable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_periodable.go new file mode 100644 index 000000000..7898a19e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_freeze_periodable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerSystemUpdateFreezePeriodable +type AndroidDeviceOwnerSystemUpdateFreezePeriodable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDay()(*int32) + GetEndMonth()(*int32) + GetOdataType()(*string) + GetStartDay()(*int32) + GetStartMonth()(*int32) + SetEndDay(value *int32)() + SetEndMonth(value *int32)() + SetOdataType(value *string)() + SetStartDay(value *int32)() + SetStartMonth(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_install_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_install_type.go new file mode 100644 index 000000000..cc94a5236 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_system_update_install_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerSystemUpdateInstallType int + +const ( + // Device default behavior, which typically prompts the user to accept system updates. + DEVICEDEFAULT_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE AndroidDeviceOwnerSystemUpdateInstallType = iota + // Postpone automatic install of updates up to 30 days. + POSTPONE_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + // Install automatically inside a daily maintenance window. + WINDOWED_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + // Automatically install updates as soon as possible. + AUTOMATIC_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE +) + +func (i AndroidDeviceOwnerSystemUpdateInstallType) String() string { + return []string{"deviceDefault", "postpone", "windowed", "automatic"}[i] +} +func ParseAndroidDeviceOwnerSystemUpdateInstallType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + case "postpone": + result = POSTPONE_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + case "windowed": + result = WINDOWED_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + case "automatic": + result = AUTOMATIC_ANDROIDDEVICEOWNERSYSTEMUPDATEINSTALLTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerSystemUpdateInstallType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerSystemUpdateInstallType(values []AndroidDeviceOwnerSystemUpdateInstallType) []string { + 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/android_device_owner_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate.go new file mode 100644 index 000000000..1cf29da28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerTrustedRootCertificate +type AndroidDeviceOwnerTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate + trustedRootCertificate []byte +} +// NewAndroidDeviceOwnerTrustedRootCertificate instantiates a new androidDeviceOwnerTrustedRootCertificate and sets the default values. +func NewAndroidDeviceOwnerTrustedRootCertificate()(*AndroidDeviceOwnerTrustedRootCertificate) { + m := &AndroidDeviceOwnerTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *AndroidDeviceOwnerTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidDeviceOwnerTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *AndroidDeviceOwnerTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidDeviceOwnerTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..88fc6bf52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerTrustedRootCertificateCollectionResponse +type AndroidDeviceOwnerTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerTrustedRootCertificateable +} +// NewAndroidDeviceOwnerTrustedRootCertificateCollectionResponse instantiates a new AndroidDeviceOwnerTrustedRootCertificateCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerTrustedRootCertificateCollectionResponse()(*AndroidDeviceOwnerTrustedRootCertificateCollectionResponse) { + m := &AndroidDeviceOwnerTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerTrustedRootCertificateCollectionResponse) GetValue()([]AndroidDeviceOwnerTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerTrustedRootCertificateCollectionResponse) SetValue(value []AndroidDeviceOwnerTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..937ca9ea5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerTrustedRootCertificateCollectionResponseable +type AndroidDeviceOwnerTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerTrustedRootCertificateable) + SetValue(value []AndroidDeviceOwnerTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificateable.go new file mode 100644 index 000000000..1750daefb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerTrustedRootCertificateable +type AndroidDeviceOwnerTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_message.go b/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_message.go new file mode 100644 index 000000000..73111671b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_message.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerUserFacingMessage represents a user-facing message with locale information as well as a default message to be used if the user's locale doesn't match with any of the localized messages +type AndroidDeviceOwnerUserFacingMessage 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 default message displayed if the user's locale doesn't match with any of the localized messages + defaultMessage *string + // The list of pairs. This collection can contain a maximum of 500 elements. + localizedMessages []KeyValuePairable + // The OdataType property + odataType *string +} +// NewAndroidDeviceOwnerUserFacingMessage instantiates a new androidDeviceOwnerUserFacingMessage and sets the default values. +func NewAndroidDeviceOwnerUserFacingMessage()(*AndroidDeviceOwnerUserFacingMessage) { + m := &AndroidDeviceOwnerUserFacingMessage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidDeviceOwnerUserFacingMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerUserFacingMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerUserFacingMessage(), 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 *AndroidDeviceOwnerUserFacingMessage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultMessage gets the defaultMessage property value. The default message displayed if the user's locale doesn't match with any of the localized messages +func (m *AndroidDeviceOwnerUserFacingMessage) GetDefaultMessage()(*string) { + return m.defaultMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerUserFacingMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultMessage(val) + } + return nil + } + res["localizedMessages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetLocalizedMessages(res) + } + 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 + } + return res +} +// GetLocalizedMessages gets the localizedMessages property value. The list of pairs. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerUserFacingMessage) GetLocalizedMessages()([]KeyValuePairable) { + return m.localizedMessages +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerUserFacingMessage) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerUserFacingMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultMessage", m.GetDefaultMessage()) + if err != nil { + return err + } + } + if m.GetLocalizedMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizedMessages())) + for i, v := range m.GetLocalizedMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("localizedMessages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AndroidDeviceOwnerUserFacingMessage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultMessage sets the defaultMessage property value. The default message displayed if the user's locale doesn't match with any of the localized messages +func (m *AndroidDeviceOwnerUserFacingMessage) SetDefaultMessage(value *string)() { + m.defaultMessage = value +} +// SetLocalizedMessages sets the localizedMessages property value. The list of pairs. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerUserFacingMessage) SetLocalizedMessages(value []KeyValuePairable)() { + m.localizedMessages = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidDeviceOwnerUserFacingMessage) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_messageable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_messageable.go new file mode 100644 index 000000000..221b211f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_user_facing_messageable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerUserFacingMessageable +type AndroidDeviceOwnerUserFacingMessageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultMessage()(*string) + GetLocalizedMessages()([]KeyValuePairable) + GetOdataType()(*string) + SetDefaultMessage(value *string)() + SetLocalizedMessages(value []KeyValuePairable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_virtual_home_button_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_virtual_home_button_type.go new file mode 100644 index 000000000..652690e94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_virtual_home_button_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerVirtualHomeButtonType int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE AndroidDeviceOwnerVirtualHomeButtonType = iota + // Swipe-up for home button. + SWIPEUP_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE + // Floating home button. + FLOATING_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE +) + +func (i AndroidDeviceOwnerVirtualHomeButtonType) String() string { + return []string{"notConfigured", "swipeUp", "floating"}[i] +} +func ParseAndroidDeviceOwnerVirtualHomeButtonType(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE + case "swipeUp": + result = SWIPEUP_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE + case "floating": + result = FLOATING_ANDROIDDEVICEOWNERVIRTUALHOMEBUTTONTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerVirtualHomeButtonType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerVirtualHomeButtonType(values []AndroidDeviceOwnerVirtualHomeButtonType) []string { + 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/android_device_owner_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration.go new file mode 100644 index 000000000..6dfdc9f05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration.go @@ -0,0 +1,351 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerVpnConfiguration +type AndroidDeviceOwnerVpnConfiguration struct { + VpnConfiguration + // Whether or not to enable always-on VPN connection. + alwaysOn *bool + // If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. + alwaysOnLockdown *bool + // Android VPN connection type. + connectionType *AndroidVpnConnectionType + // Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. + customData []KeyValueable + // Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. + customKeyValueData []KeyValuePairable + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate AndroidDeviceOwnerCertificateProfileBaseable + // Microsoft Tunnel site ID. + microsoftTunnelSiteId *string + // Proxy server. + proxyServer VpnProxyServerable + // Targeted mobile apps. This collection can contain a maximum of 500 elements. + targetedMobileApps []AppListItemable + // Targeted App package IDs. + targetedPackageIds []string +} +// NewAndroidDeviceOwnerVpnConfiguration instantiates a new AndroidDeviceOwnerVpnConfiguration and sets the default values. +func NewAndroidDeviceOwnerVpnConfiguration()(*AndroidDeviceOwnerVpnConfiguration) { + m := &AndroidDeviceOwnerVpnConfiguration{ + VpnConfiguration: *NewVpnConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerVpnConfiguration(), nil +} +// GetAlwaysOn gets the alwaysOn property value. Whether or not to enable always-on VPN connection. +func (m *AndroidDeviceOwnerVpnConfiguration) GetAlwaysOn()(*bool) { + return m.alwaysOn +} +// GetAlwaysOnLockdown gets the alwaysOnLockdown property value. If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidDeviceOwnerVpnConfiguration) GetAlwaysOnLockdown()(*bool) { + return m.alwaysOnLockdown +} +// GetConnectionType gets the connectionType property value. Android VPN connection type. +func (m *AndroidDeviceOwnerVpnConfiguration) GetConnectionType()(*AndroidVpnConnectionType) { + return m.connectionType +} +// GetCustomData gets the customData property value. Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) GetCustomData()([]KeyValueable) { + return m.customData +} +// GetCustomKeyValueData gets the customKeyValueData property value. Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) GetCustomKeyValueData()([]KeyValuePairable) { + return m.customKeyValueData +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerVpnConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.VpnConfiguration.GetFieldDeserializers() + res["alwaysOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAlwaysOn(val) + } + return nil + } + res["alwaysOnLockdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAlwaysOnLockdown(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidVpnConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*AndroidVpnConnectionType)) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetCustomData(res) + } + return nil + } + res["customKeyValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomKeyValueData(res) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidDeviceOwnerCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidDeviceOwnerCertificateProfileBaseable)) + } + return nil + } + res["microsoftTunnelSiteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftTunnelSiteId(val) + } + return nil + } + res["proxyServer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVpnProxyServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProxyServer(val.(VpnProxyServerable)) + } + return nil + } + res["targetedMobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetTargetedMobileApps(res) + } + return nil + } + res["targetedPackageIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetedPackageIds(res) + } + return nil + } + return res +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidDeviceOwnerVpnConfiguration) GetIdentityCertificate()(AndroidDeviceOwnerCertificateProfileBaseable) { + return m.identityCertificate +} +// GetMicrosoftTunnelSiteId gets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *AndroidDeviceOwnerVpnConfiguration) GetMicrosoftTunnelSiteId()(*string) { + return m.microsoftTunnelSiteId +} +// GetProxyServer gets the proxyServer property value. Proxy server. +func (m *AndroidDeviceOwnerVpnConfiguration) GetProxyServer()(VpnProxyServerable) { + return m.proxyServer +} +// GetTargetedMobileApps gets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) GetTargetedMobileApps()([]AppListItemable) { + return m.targetedMobileApps +} +// GetTargetedPackageIds gets the targetedPackageIds property value. Targeted App package IDs. +func (m *AndroidDeviceOwnerVpnConfiguration) GetTargetedPackageIds()([]string) { + return m.targetedPackageIds +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.VpnConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("alwaysOn", m.GetAlwaysOn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("alwaysOnLockdown", m.GetAlwaysOnLockdown()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + if m.GetCustomData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomData())) + for i, v := range m.GetCustomData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customData", cast) + if err != nil { + return err + } + } + if m.GetCustomKeyValueData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomKeyValueData())) + for i, v := range m.GetCustomKeyValueData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customKeyValueData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("microsoftTunnelSiteId", m.GetMicrosoftTunnelSiteId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("proxyServer", m.GetProxyServer()) + if err != nil { + return err + } + } + if m.GetTargetedMobileApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedMobileApps())) + for i, v := range m.GetTargetedMobileApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedMobileApps", cast) + if err != nil { + return err + } + } + if m.GetTargetedPackageIds() != nil { + err = writer.WriteCollectionOfStringValues("targetedPackageIds", m.GetTargetedPackageIds()) + if err != nil { + return err + } + } + return nil +} +// SetAlwaysOn sets the alwaysOn property value. Whether or not to enable always-on VPN connection. +func (m *AndroidDeviceOwnerVpnConfiguration) SetAlwaysOn(value *bool)() { + m.alwaysOn = value +} +// SetAlwaysOnLockdown sets the alwaysOnLockdown property value. If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidDeviceOwnerVpnConfiguration) SetAlwaysOnLockdown(value *bool)() { + m.alwaysOnLockdown = value +} +// SetConnectionType sets the connectionType property value. Android VPN connection type. +func (m *AndroidDeviceOwnerVpnConfiguration) SetConnectionType(value *AndroidVpnConnectionType)() { + m.connectionType = value +} +// SetCustomData sets the customData property value. Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) SetCustomData(value []KeyValueable)() { + m.customData = value +} +// SetCustomKeyValueData sets the customKeyValueData property value. Custom data to define key/value pairs specific to a VPN provider. This collection can contain a maximum of 25 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) SetCustomKeyValueData(value []KeyValuePairable)() { + m.customKeyValueData = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *AndroidDeviceOwnerVpnConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidDeviceOwnerVpnConfiguration) SetIdentityCertificate(value AndroidDeviceOwnerCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetMicrosoftTunnelSiteId sets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *AndroidDeviceOwnerVpnConfiguration) SetMicrosoftTunnelSiteId(value *string)() { + m.microsoftTunnelSiteId = value +} +// SetProxyServer sets the proxyServer property value. Proxy server. +func (m *AndroidDeviceOwnerVpnConfiguration) SetProxyServer(value VpnProxyServerable)() { + m.proxyServer = value +} +// SetTargetedMobileApps sets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *AndroidDeviceOwnerVpnConfiguration) SetTargetedMobileApps(value []AppListItemable)() { + m.targetedMobileApps = value +} +// SetTargetedPackageIds sets the targetedPackageIds property value. Targeted App package IDs. +func (m *AndroidDeviceOwnerVpnConfiguration) SetTargetedPackageIds(value []string)() { + m.targetedPackageIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_response.go new file mode 100644 index 000000000..c3cdaf729 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerVpnConfigurationCollectionResponse +type AndroidDeviceOwnerVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerVpnConfigurationable +} +// NewAndroidDeviceOwnerVpnConfigurationCollectionResponse instantiates a new AndroidDeviceOwnerVpnConfigurationCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerVpnConfigurationCollectionResponse()(*AndroidDeviceOwnerVpnConfigurationCollectionResponse) { + m := &AndroidDeviceOwnerVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerVpnConfigurationCollectionResponse) GetValue()([]AndroidDeviceOwnerVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerVpnConfigurationCollectionResponse) SetValue(value []AndroidDeviceOwnerVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..7df5c1f34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerVpnConfigurationCollectionResponseable +type AndroidDeviceOwnerVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerVpnConfigurationable) + SetValue(value []AndroidDeviceOwnerVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configurationable.go new file mode 100644 index 000000000..d7cb17b21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_vpn_configurationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerVpnConfigurationable +type AndroidDeviceOwnerVpnConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + VpnConfigurationable + GetAlwaysOn()(*bool) + GetAlwaysOnLockdown()(*bool) + GetConnectionType()(*AndroidVpnConnectionType) + GetCustomData()([]KeyValueable) + GetCustomKeyValueData()([]KeyValuePairable) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetIdentityCertificate()(AndroidDeviceOwnerCertificateProfileBaseable) + GetMicrosoftTunnelSiteId()(*string) + GetProxyServer()(VpnProxyServerable) + GetTargetedMobileApps()([]AppListItemable) + GetTargetedPackageIds()([]string) + SetAlwaysOn(value *bool)() + SetAlwaysOnLockdown(value *bool)() + SetConnectionType(value *AndroidVpnConnectionType)() + SetCustomData(value []KeyValueable)() + SetCustomKeyValueData(value []KeyValuePairable)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetIdentityCertificate(value AndroidDeviceOwnerCertificateProfileBaseable)() + SetMicrosoftTunnelSiteId(value *string)() + SetProxyServer(value VpnProxyServerable)() + SetTargetedMobileApps(value []AppListItemable)() + SetTargetedPackageIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration.go new file mode 100644 index 000000000..4d0d6f14b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration.go @@ -0,0 +1,368 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerWiFiConfiguration +type AndroidDeviceOwnerWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKey *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKeyIsSet *bool + // Specify the proxy server configuration script URL. + proxyAutomaticConfigurationUrl *string + // List of hosts to exclude using the proxy on connections for. These hosts can use wildcards such as .example.com. + proxyExclusionList *string + // Specify the proxy server IP address. Android documentation does not specify IPv4 or IPv6. For example: 192.168.1.1. + proxyManualAddress *string + // Specify the proxy server port. + proxyManualPort *int32 + // Wi-Fi Proxy Settings. + proxySettings *WiFiProxySetting + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types for Android Device Owner. + wiFiSecurityType *AndroidDeviceOwnerWiFiSecurityType +} +// NewAndroidDeviceOwnerWiFiConfiguration instantiates a new AndroidDeviceOwnerWiFiConfiguration and sets the default values. +func NewAndroidDeviceOwnerWiFiConfiguration()(*AndroidDeviceOwnerWiFiConfiguration) { + m := &AndroidDeviceOwnerWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidDeviceOwnerWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidDeviceOwnerWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration": + return NewAndroidDeviceOwnerEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewAndroidDeviceOwnerWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["preSharedKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKey(val) + } + return nil + } + res["preSharedKeyIsSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKeyIsSet(val) + } + return nil + } + res["proxyAutomaticConfigurationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyAutomaticConfigurationUrl(val) + } + return nil + } + res["proxyExclusionList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyExclusionList(val) + } + return nil + } + res["proxyManualAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualAddress(val) + } + return nil + } + res["proxyManualPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualPort(val) + } + return nil + } + res["proxySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiProxySetting) + if err != nil { + return err + } + if val != nil { + m.SetProxySettings(val.(*WiFiProxySetting)) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*AndroidDeviceOwnerWiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *AndroidDeviceOwnerWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetPreSharedKey gets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetPreSharedKey()(*string) { + return m.preSharedKey +} +// GetPreSharedKeyIsSet gets the preSharedKeyIsSet property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetPreSharedKeyIsSet()(*bool) { + return m.preSharedKeyIsSet +} +// GetProxyAutomaticConfigurationUrl gets the proxyAutomaticConfigurationUrl property value. Specify the proxy server configuration script URL. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetProxyAutomaticConfigurationUrl()(*string) { + return m.proxyAutomaticConfigurationUrl +} +// GetProxyExclusionList gets the proxyExclusionList property value. List of hosts to exclude using the proxy on connections for. These hosts can use wildcards such as .example.com. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetProxyExclusionList()(*string) { + return m.proxyExclusionList +} +// GetProxyManualAddress gets the proxyManualAddress property value. Specify the proxy server IP address. Android documentation does not specify IPv4 or IPv6. For example: 192.168.1.1. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetProxyManualAddress()(*string) { + return m.proxyManualAddress +} +// GetProxyManualPort gets the proxyManualPort property value. Specify the proxy server port. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetProxyManualPort()(*int32) { + return m.proxyManualPort +} +// GetProxySettings gets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetProxySettings()(*WiFiProxySetting) { + return m.proxySettings +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types for Android Device Owner. +func (m *AndroidDeviceOwnerWiFiConfiguration) GetWiFiSecurityType()(*AndroidDeviceOwnerWiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preSharedKey", m.GetPreSharedKey()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("preSharedKeyIsSet", m.GetPreSharedKeyIsSet()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyAutomaticConfigurationUrl", m.GetProxyAutomaticConfigurationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyExclusionList", m.GetProxyExclusionList()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyManualAddress", m.GetProxyManualAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("proxyManualPort", m.GetProxyManualPort()) + if err != nil { + return err + } + } + if m.GetProxySettings() != nil { + cast := (*m.GetProxySettings()).String() + err = writer.WriteStringValue("proxySettings", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *AndroidDeviceOwnerWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetPreSharedKey sets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetPreSharedKey(value *string)() { + m.preSharedKey = value +} +// SetPreSharedKeyIsSet sets the preSharedKeyIsSet property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetPreSharedKeyIsSet(value *bool)() { + m.preSharedKeyIsSet = value +} +// SetProxyAutomaticConfigurationUrl sets the proxyAutomaticConfigurationUrl property value. Specify the proxy server configuration script URL. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetProxyAutomaticConfigurationUrl(value *string)() { + m.proxyAutomaticConfigurationUrl = value +} +// SetProxyExclusionList sets the proxyExclusionList property value. List of hosts to exclude using the proxy on connections for. These hosts can use wildcards such as .example.com. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetProxyExclusionList(value *string)() { + m.proxyExclusionList = value +} +// SetProxyManualAddress sets the proxyManualAddress property value. Specify the proxy server IP address. Android documentation does not specify IPv4 or IPv6. For example: 192.168.1.1. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetProxyManualAddress(value *string)() { + m.proxyManualAddress = value +} +// SetProxyManualPort sets the proxyManualPort property value. Specify the proxy server port. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetProxyManualPort(value *int32)() { + m.proxyManualPort = value +} +// SetProxySettings sets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetProxySettings(value *WiFiProxySetting)() { + m.proxySettings = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types for Android Device Owner. +func (m *AndroidDeviceOwnerWiFiConfiguration) SetWiFiSecurityType(value *AndroidDeviceOwnerWiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..eecd50d94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerWiFiConfigurationCollectionResponse +type AndroidDeviceOwnerWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidDeviceOwnerWiFiConfigurationable +} +// NewAndroidDeviceOwnerWiFiConfigurationCollectionResponse instantiates a new AndroidDeviceOwnerWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidDeviceOwnerWiFiConfigurationCollectionResponse()(*AndroidDeviceOwnerWiFiConfigurationCollectionResponse) { + m := &AndroidDeviceOwnerWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidDeviceOwnerWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidDeviceOwnerWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidDeviceOwnerWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidDeviceOwnerWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidDeviceOwnerWiFiConfigurationCollectionResponse) GetValue()([]AndroidDeviceOwnerWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidDeviceOwnerWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidDeviceOwnerWiFiConfigurationCollectionResponse) SetValue(value []AndroidDeviceOwnerWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..7076d740b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerWiFiConfigurationCollectionResponseable +type AndroidDeviceOwnerWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidDeviceOwnerWiFiConfigurationable) + SetValue(value []AndroidDeviceOwnerWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configurationable.go new file mode 100644 index 000000000..e21fa169e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_configurationable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidDeviceOwnerWiFiConfigurationable +type AndroidDeviceOwnerWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetPreSharedKey()(*string) + GetPreSharedKeyIsSet()(*bool) + GetProxyAutomaticConfigurationUrl()(*string) + GetProxyExclusionList()(*string) + GetProxyManualAddress()(*string) + GetProxyManualPort()(*int32) + GetProxySettings()(*WiFiProxySetting) + GetSsid()(*string) + GetWiFiSecurityType()(*AndroidDeviceOwnerWiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetPreSharedKey(value *string)() + SetPreSharedKeyIsSet(value *bool)() + SetProxyAutomaticConfigurationUrl(value *string)() + SetProxyExclusionList(value *string)() + SetProxyManualAddress(value *string)() + SetProxyManualPort(value *int32)() + SetProxySettings(value *WiFiProxySetting)() + SetSsid(value *string)() + SetWiFiSecurityType(value *AndroidDeviceOwnerWiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_security_type.go b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_security_type.go new file mode 100644 index 000000000..248f7c34c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_device_owner_wi_fi_security_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidDeviceOwnerWiFiSecurityType int + +const ( + // Open (No Authentication). + OPEN_ANDROIDDEVICEOWNERWIFISECURITYTYPE AndroidDeviceOwnerWiFiSecurityType = iota + // WEP Encryption. + WEP_ANDROIDDEVICEOWNERWIFISECURITYTYPE + // WPA-Personal/WPA2-Personal. + WPAPERSONAL_ANDROIDDEVICEOWNERWIFISECURITYTYPE + // WPA-Enterprise/WPA2-Enterprise. Must use AndroidDeviceOwnerEnterpriseWifiConfiguration type to configure enterprise options. + WPAENTERPRISE_ANDROIDDEVICEOWNERWIFISECURITYTYPE +) + +func (i AndroidDeviceOwnerWiFiSecurityType) String() string { + return []string{"open", "wep", "wpaPersonal", "wpaEnterprise"}[i] +} +func ParseAndroidDeviceOwnerWiFiSecurityType(v string) (interface{}, error) { + result := OPEN_ANDROIDDEVICEOWNERWIFISECURITYTYPE + switch v { + case "open": + result = OPEN_ANDROIDDEVICEOWNERWIFISECURITYTYPE + case "wep": + result = WEP_ANDROIDDEVICEOWNERWIFISECURITYTYPE + case "wpaPersonal": + result = WPAPERSONAL_ANDROIDDEVICEOWNERWIFISECURITYTYPE + case "wpaEnterprise": + result = WPAENTERPRISE_ANDROIDDEVICEOWNERWIFISECURITYTYPE + default: + return 0, errors.New("Unknown AndroidDeviceOwnerWiFiSecurityType value: " + v) + } + return &result, nil +} +func SerializeAndroidDeviceOwnerWiFiSecurityType(values []AndroidDeviceOwnerWiFiSecurityType) []string { + 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/android_eap_type.go b/src/internal/connector/graph/betasdk/models/android_eap_type.go new file mode 100644 index 000000000..705e7a6fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_eap_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidEapType int + +const ( + // Extensible Authentication Protocol-Transport Layer Security (EAP-TLS). + EAPTLS_ANDROIDEAPTYPE AndroidEapType = iota + // Extensible Authentication Protocol-Tunneled Transport Layer Security (EAP-TTLS). + EAPTTLS_ANDROIDEAPTYPE + // Protected Extensible Authentication Protocol (PEAP). + PEAP_ANDROIDEAPTYPE +) + +func (i AndroidEapType) String() string { + return []string{"eapTls", "eapTtls", "peap"}[i] +} +func ParseAndroidEapType(v string) (interface{}, error) { + result := EAPTLS_ANDROIDEAPTYPE + switch v { + case "eapTls": + result = EAPTLS_ANDROIDEAPTYPE + case "eapTtls": + result = EAPTTLS_ANDROIDEAPTYPE + case "peap": + result = PEAP_ANDROIDEAPTYPE + default: + return 0, errors.New("Unknown AndroidEapType value: " + v) + } + return &result, nil +} +func SerializeAndroidEapType(values []AndroidEapType) []string { + 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/android_eas_email_profile_configuration.go b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration.go new file mode 100644 index 000000000..9d1bfb23a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration.go @@ -0,0 +1,484 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEasEmailProfileConfiguration +type AndroidEasEmailProfileConfiguration struct { + DeviceConfiguration + // Exchange ActiveSync account name, displayed to users as name of EAS (this) profile. + accountName *string + // Exchange Active Sync authentication method. + authenticationMethod *EasAuthenticationMethod + // Custom domain name value used while generating an email profile before installing on the device. + customDomainName *string + // Possible values for email sync duration. + durationOfEmailToSync *EmailSyncDuration + // Possible values for username source or email source. + emailAddressSource *UserEmailSource + // Possible values for email sync schedule. + emailSyncSchedule *EmailSyncSchedule + // Exchange location (URL) that the native mail app connects to. + hostName *string + // Identity certificate. + identityCertificate AndroidCertificateProfileBaseable + // Indicates whether or not to use S/MIME certificate. + requireSmime *bool + // Indicates whether or not to use SSL. + requireSsl *bool + // S/MIME signing certificate. + smimeSigningCertificate AndroidCertificateProfileBaseable + // Toggles syncing the calendar. If set to false calendar is turned off on the device. + syncCalendar *bool + // Toggles syncing contacts. If set to false contacts are turned off on the device. + syncContacts *bool + // Toggles syncing notes. If set to false notes are turned off on the device. + syncNotes *bool + // Toggles syncing tasks. If set to false tasks are turned off on the device. + syncTasks *bool + // UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. + userDomainNameSource *DomainNameSource + // Android username source. + usernameSource *AndroidUsernameSource +} +// NewAndroidEasEmailProfileConfiguration instantiates a new AndroidEasEmailProfileConfiguration and sets the default values. +func NewAndroidEasEmailProfileConfiguration()(*AndroidEasEmailProfileConfiguration) { + m := &AndroidEasEmailProfileConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidEasEmailProfileConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidEasEmailProfileConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEasEmailProfileConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEasEmailProfileConfiguration(), nil +} +// GetAccountName gets the accountName property value. Exchange ActiveSync account name, displayed to users as name of EAS (this) profile. +func (m *AndroidEasEmailProfileConfiguration) GetAccountName()(*string) { + return m.accountName +} +// GetAuthenticationMethod gets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidEasEmailProfileConfiguration) GetAuthenticationMethod()(*EasAuthenticationMethod) { + return m.authenticationMethod +} +// GetCustomDomainName gets the customDomainName property value. Custom domain name value used while generating an email profile before installing on the device. +func (m *AndroidEasEmailProfileConfiguration) GetCustomDomainName()(*string) { + return m.customDomainName +} +// GetDurationOfEmailToSync gets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidEasEmailProfileConfiguration) GetDurationOfEmailToSync()(*EmailSyncDuration) { + return m.durationOfEmailToSync +} +// GetEmailAddressSource gets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidEasEmailProfileConfiguration) GetEmailAddressSource()(*UserEmailSource) { + return m.emailAddressSource +} +// GetEmailSyncSchedule gets the emailSyncSchedule property value. Possible values for email sync schedule. +func (m *AndroidEasEmailProfileConfiguration) GetEmailSyncSchedule()(*EmailSyncSchedule) { + return m.emailSyncSchedule +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEasEmailProfileConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEasAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*EasAuthenticationMethod)) + } + return nil + } + res["customDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDomainName(val) + } + return nil + } + res["durationOfEmailToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailSyncDuration) + if err != nil { + return err + } + if val != nil { + m.SetDurationOfEmailToSync(val.(*EmailSyncDuration)) + } + return nil + } + res["emailAddressSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserEmailSource) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddressSource(val.(*UserEmailSource)) + } + return nil + } + res["emailSyncSchedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailSyncSchedule) + if err != nil { + return err + } + if val != nil { + m.SetEmailSyncSchedule(val.(*EmailSyncSchedule)) + } + return nil + } + res["hostName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostName(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidCertificateProfileBaseable)) + } + return nil + } + res["requireSmime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSmime(val) + } + return nil + } + res["requireSsl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSsl(val) + } + return nil + } + res["smimeSigningCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSmimeSigningCertificate(val.(AndroidCertificateProfileBaseable)) + } + return nil + } + res["syncCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncCalendar(val) + } + return nil + } + res["syncContacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncContacts(val) + } + return nil + } + res["syncNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncNotes(val) + } + return nil + } + res["syncTasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncTasks(val) + } + return nil + } + res["userDomainNameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDomainNameSource) + if err != nil { + return err + } + if val != nil { + m.SetUserDomainNameSource(val.(*DomainNameSource)) + } + return nil + } + res["usernameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidUsernameSource) + if err != nil { + return err + } + if val != nil { + m.SetUsernameSource(val.(*AndroidUsernameSource)) + } + return nil + } + return res +} +// GetHostName gets the hostName property value. Exchange location (URL) that the native mail app connects to. +func (m *AndroidEasEmailProfileConfiguration) GetHostName()(*string) { + return m.hostName +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate. +func (m *AndroidEasEmailProfileConfiguration) GetIdentityCertificate()(AndroidCertificateProfileBaseable) { + return m.identityCertificate +} +// GetRequireSmime gets the requireSmime property value. Indicates whether or not to use S/MIME certificate. +func (m *AndroidEasEmailProfileConfiguration) GetRequireSmime()(*bool) { + return m.requireSmime +} +// GetRequireSsl gets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidEasEmailProfileConfiguration) GetRequireSsl()(*bool) { + return m.requireSsl +} +// GetSmimeSigningCertificate gets the smimeSigningCertificate property value. S/MIME signing certificate. +func (m *AndroidEasEmailProfileConfiguration) GetSmimeSigningCertificate()(AndroidCertificateProfileBaseable) { + return m.smimeSigningCertificate +} +// GetSyncCalendar gets the syncCalendar property value. Toggles syncing the calendar. If set to false calendar is turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) GetSyncCalendar()(*bool) { + return m.syncCalendar +} +// GetSyncContacts gets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) GetSyncContacts()(*bool) { + return m.syncContacts +} +// GetSyncNotes gets the syncNotes property value. Toggles syncing notes. If set to false notes are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) GetSyncNotes()(*bool) { + return m.syncNotes +} +// GetSyncTasks gets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) GetSyncTasks()(*bool) { + return m.syncTasks +} +// GetUserDomainNameSource gets the userDomainNameSource property value. UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. +func (m *AndroidEasEmailProfileConfiguration) GetUserDomainNameSource()(*DomainNameSource) { + return m.userDomainNameSource +} +// GetUsernameSource gets the usernameSource property value. Android username source. +func (m *AndroidEasEmailProfileConfiguration) GetUsernameSource()(*AndroidUsernameSource) { + return m.usernameSource +} +// Serialize serializes information the current object +func (m *AndroidEasEmailProfileConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDomainName", m.GetCustomDomainName()) + if err != nil { + return err + } + } + if m.GetDurationOfEmailToSync() != nil { + cast := (*m.GetDurationOfEmailToSync()).String() + err = writer.WriteStringValue("durationOfEmailToSync", &cast) + if err != nil { + return err + } + } + if m.GetEmailAddressSource() != nil { + cast := (*m.GetEmailAddressSource()).String() + err = writer.WriteStringValue("emailAddressSource", &cast) + if err != nil { + return err + } + } + if m.GetEmailSyncSchedule() != nil { + cast := (*m.GetEmailSyncSchedule()).String() + err = writer.WriteStringValue("emailSyncSchedule", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hostName", m.GetHostName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSmime", m.GetRequireSmime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSsl", m.GetRequireSsl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("smimeSigningCertificate", m.GetSmimeSigningCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncCalendar", m.GetSyncCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncContacts", m.GetSyncContacts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncNotes", m.GetSyncNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncTasks", m.GetSyncTasks()) + if err != nil { + return err + } + } + if m.GetUserDomainNameSource() != nil { + cast := (*m.GetUserDomainNameSource()).String() + err = writer.WriteStringValue("userDomainNameSource", &cast) + if err != nil { + return err + } + } + if m.GetUsernameSource() != nil { + cast := (*m.GetUsernameSource()).String() + err = writer.WriteStringValue("usernameSource", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAccountName sets the accountName property value. Exchange ActiveSync account name, displayed to users as name of EAS (this) profile. +func (m *AndroidEasEmailProfileConfiguration) SetAccountName(value *string)() { + m.accountName = value +} +// SetAuthenticationMethod sets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidEasEmailProfileConfiguration) SetAuthenticationMethod(value *EasAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetCustomDomainName sets the customDomainName property value. Custom domain name value used while generating an email profile before installing on the device. +func (m *AndroidEasEmailProfileConfiguration) SetCustomDomainName(value *string)() { + m.customDomainName = value +} +// SetDurationOfEmailToSync sets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidEasEmailProfileConfiguration) SetDurationOfEmailToSync(value *EmailSyncDuration)() { + m.durationOfEmailToSync = value +} +// SetEmailAddressSource sets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidEasEmailProfileConfiguration) SetEmailAddressSource(value *UserEmailSource)() { + m.emailAddressSource = value +} +// SetEmailSyncSchedule sets the emailSyncSchedule property value. Possible values for email sync schedule. +func (m *AndroidEasEmailProfileConfiguration) SetEmailSyncSchedule(value *EmailSyncSchedule)() { + m.emailSyncSchedule = value +} +// SetHostName sets the hostName property value. Exchange location (URL) that the native mail app connects to. +func (m *AndroidEasEmailProfileConfiguration) SetHostName(value *string)() { + m.hostName = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate. +func (m *AndroidEasEmailProfileConfiguration) SetIdentityCertificate(value AndroidCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetRequireSmime sets the requireSmime property value. Indicates whether or not to use S/MIME certificate. +func (m *AndroidEasEmailProfileConfiguration) SetRequireSmime(value *bool)() { + m.requireSmime = value +} +// SetRequireSsl sets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidEasEmailProfileConfiguration) SetRequireSsl(value *bool)() { + m.requireSsl = value +} +// SetSmimeSigningCertificate sets the smimeSigningCertificate property value. S/MIME signing certificate. +func (m *AndroidEasEmailProfileConfiguration) SetSmimeSigningCertificate(value AndroidCertificateProfileBaseable)() { + m.smimeSigningCertificate = value +} +// SetSyncCalendar sets the syncCalendar property value. Toggles syncing the calendar. If set to false calendar is turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) SetSyncCalendar(value *bool)() { + m.syncCalendar = value +} +// SetSyncContacts sets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) SetSyncContacts(value *bool)() { + m.syncContacts = value +} +// SetSyncNotes sets the syncNotes property value. Toggles syncing notes. If set to false notes are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) SetSyncNotes(value *bool)() { + m.syncNotes = value +} +// SetSyncTasks sets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidEasEmailProfileConfiguration) SetSyncTasks(value *bool)() { + m.syncTasks = value +} +// SetUserDomainNameSource sets the userDomainNameSource property value. UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. +func (m *AndroidEasEmailProfileConfiguration) SetUserDomainNameSource(value *DomainNameSource)() { + m.userDomainNameSource = value +} +// SetUsernameSource sets the usernameSource property value. Android username source. +func (m *AndroidEasEmailProfileConfiguration) SetUsernameSource(value *AndroidUsernameSource)() { + m.usernameSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_response.go new file mode 100644 index 000000000..e177f3c47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEasEmailProfileConfigurationCollectionResponse +type AndroidEasEmailProfileConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidEasEmailProfileConfigurationable +} +// NewAndroidEasEmailProfileConfigurationCollectionResponse instantiates a new AndroidEasEmailProfileConfigurationCollectionResponse and sets the default values. +func NewAndroidEasEmailProfileConfigurationCollectionResponse()(*AndroidEasEmailProfileConfigurationCollectionResponse) { + m := &AndroidEasEmailProfileConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidEasEmailProfileConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEasEmailProfileConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEasEmailProfileConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEasEmailProfileConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidEasEmailProfileConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidEasEmailProfileConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidEasEmailProfileConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidEasEmailProfileConfigurationCollectionResponse) GetValue()([]AndroidEasEmailProfileConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidEasEmailProfileConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidEasEmailProfileConfigurationCollectionResponse) SetValue(value []AndroidEasEmailProfileConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_responseable.go new file mode 100644 index 000000000..a8f5943c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEasEmailProfileConfigurationCollectionResponseable +type AndroidEasEmailProfileConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidEasEmailProfileConfigurationable) + SetValue(value []AndroidEasEmailProfileConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configurationable.go b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configurationable.go new file mode 100644 index 000000000..1a5731b7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_eas_email_profile_configurationable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEasEmailProfileConfigurationable +type AndroidEasEmailProfileConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountName()(*string) + GetAuthenticationMethod()(*EasAuthenticationMethod) + GetCustomDomainName()(*string) + GetDurationOfEmailToSync()(*EmailSyncDuration) + GetEmailAddressSource()(*UserEmailSource) + GetEmailSyncSchedule()(*EmailSyncSchedule) + GetHostName()(*string) + GetIdentityCertificate()(AndroidCertificateProfileBaseable) + GetRequireSmime()(*bool) + GetRequireSsl()(*bool) + GetSmimeSigningCertificate()(AndroidCertificateProfileBaseable) + GetSyncCalendar()(*bool) + GetSyncContacts()(*bool) + GetSyncNotes()(*bool) + GetSyncTasks()(*bool) + GetUserDomainNameSource()(*DomainNameSource) + GetUsernameSource()(*AndroidUsernameSource) + SetAccountName(value *string)() + SetAuthenticationMethod(value *EasAuthenticationMethod)() + SetCustomDomainName(value *string)() + SetDurationOfEmailToSync(value *EmailSyncDuration)() + SetEmailAddressSource(value *UserEmailSource)() + SetEmailSyncSchedule(value *EmailSyncSchedule)() + SetHostName(value *string)() + SetIdentityCertificate(value AndroidCertificateProfileBaseable)() + SetRequireSmime(value *bool)() + SetRequireSsl(value *bool)() + SetSmimeSigningCertificate(value AndroidCertificateProfileBaseable)() + SetSyncCalendar(value *bool)() + SetSyncContacts(value *bool)() + SetSyncNotes(value *bool)() + SetSyncTasks(value *bool)() + SetUserDomainNameSource(value *DomainNameSource)() + SetUsernameSource(value *AndroidUsernameSource)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_enrollment_company_code.go b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code.go new file mode 100644 index 000000000..3ce203585 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnrollmentCompanyCode a class to hold specialty enrollment data used for enrolling via Google's Android Management API, such as Token, Url, and QR code content +type AndroidEnrollmentCompanyCode struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enrollment Token used by the User to enroll their device. + enrollmentToken *string + // The OdataType property + odataType *string + // String used to generate a QR code for the token. + qrCodeContent *string + // Generated QR code for the token. + qrCodeImage MimeContentable +} +// NewAndroidEnrollmentCompanyCode instantiates a new androidEnrollmentCompanyCode and sets the default values. +func NewAndroidEnrollmentCompanyCode()(*AndroidEnrollmentCompanyCode) { + m := &AndroidEnrollmentCompanyCode{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidEnrollmentCompanyCodeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEnrollmentCompanyCodeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEnrollmentCompanyCode(), 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 *AndroidEnrollmentCompanyCode) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnrollmentToken gets the enrollmentToken property value. Enrollment Token used by the User to enroll their device. +func (m *AndroidEnrollmentCompanyCode) GetEnrollmentToken()(*string) { + return m.enrollmentToken +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEnrollmentCompanyCode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enrollmentToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentToken(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["qrCodeContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQrCodeContent(val) + } + return nil + } + res["qrCodeImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQrCodeImage(val.(MimeContentable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidEnrollmentCompanyCode) GetOdataType()(*string) { + return m.odataType +} +// GetQrCodeContent gets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidEnrollmentCompanyCode) GetQrCodeContent()(*string) { + return m.qrCodeContent +} +// GetQrCodeImage gets the qrCodeImage property value. Generated QR code for the token. +func (m *AndroidEnrollmentCompanyCode) GetQrCodeImage()(MimeContentable) { + return m.qrCodeImage +} +// Serialize serializes information the current object +func (m *AndroidEnrollmentCompanyCode) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("enrollmentToken", m.GetEnrollmentToken()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("qrCodeContent", m.GetQrCodeContent()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("qrCodeImage", m.GetQrCodeImage()) + 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 *AndroidEnrollmentCompanyCode) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnrollmentToken sets the enrollmentToken property value. Enrollment Token used by the User to enroll their device. +func (m *AndroidEnrollmentCompanyCode) SetEnrollmentToken(value *string)() { + m.enrollmentToken = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidEnrollmentCompanyCode) SetOdataType(value *string)() { + m.odataType = value +} +// SetQrCodeContent sets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidEnrollmentCompanyCode) SetQrCodeContent(value *string)() { + m.qrCodeContent = value +} +// SetQrCodeImage sets the qrCodeImage property value. Generated QR code for the token. +func (m *AndroidEnrollmentCompanyCode) SetQrCodeImage(value MimeContentable)() { + m.qrCodeImage = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_response.go b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_response.go new file mode 100644 index 000000000..228154e51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnrollmentCompanyCodeCollectionResponse +type AndroidEnrollmentCompanyCodeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidEnrollmentCompanyCodeable +} +// NewAndroidEnrollmentCompanyCodeCollectionResponse instantiates a new AndroidEnrollmentCompanyCodeCollectionResponse and sets the default values. +func NewAndroidEnrollmentCompanyCodeCollectionResponse()(*AndroidEnrollmentCompanyCodeCollectionResponse) { + m := &AndroidEnrollmentCompanyCodeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidEnrollmentCompanyCodeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEnrollmentCompanyCodeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEnrollmentCompanyCodeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEnrollmentCompanyCodeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidEnrollmentCompanyCodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidEnrollmentCompanyCodeable, len(val)) + for i, v := range val { + res[i] = v.(AndroidEnrollmentCompanyCodeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidEnrollmentCompanyCodeCollectionResponse) GetValue()([]AndroidEnrollmentCompanyCodeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidEnrollmentCompanyCodeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidEnrollmentCompanyCodeCollectionResponse) SetValue(value []AndroidEnrollmentCompanyCodeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_responseable.go new file mode 100644 index 000000000..e8c6c54a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enrollment_company_code_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnrollmentCompanyCodeCollectionResponseable +type AndroidEnrollmentCompanyCodeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidEnrollmentCompanyCodeable) + SetValue(value []AndroidEnrollmentCompanyCodeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_enrollment_company_codeable.go b/src/internal/connector/graph/betasdk/models/android_enrollment_company_codeable.go new file mode 100644 index 000000000..3d86f09fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enrollment_company_codeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnrollmentCompanyCodeable +type AndroidEnrollmentCompanyCodeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnrollmentToken()(*string) + GetOdataType()(*string) + GetQrCodeContent()(*string) + GetQrCodeImage()(MimeContentable) + SetEnrollmentToken(value *string)() + SetOdataType(value *string)() + SetQrCodeContent(value *string)() + SetQrCodeImage(value MimeContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..21d25b855 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration.go @@ -0,0 +1,330 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnterpriseWiFiConfiguration +type AndroidEnterpriseWiFiConfiguration struct { + AndroidWiFiConfiguration + // Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Extensible Authentication Protocol (EAP) Configuration Types. + eapType *AndroidEapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. + identityCertificateForClientAuthentication AndroidCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. + innerAuthenticationProtocolForPeap *NonEapAuthenticationMethodForPeap + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. + outerIdentityPrivacyTemporaryValue *string + // Password format string used to build the password to connect to wifi + passwordFormatString *string + // PreSharedKey used to build the password to connect to wifi + preSharedKey *string + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. + rootCertificateForServerValidation AndroidTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string + // Username format string used to build the username to connect to wifi + usernameFormatString *string +} +// NewAndroidEnterpriseWiFiConfiguration instantiates a new AndroidEnterpriseWiFiConfiguration and sets the default values. +func NewAndroidEnterpriseWiFiConfiguration()(*AndroidEnterpriseWiFiConfiguration) { + m := &AndroidEnterpriseWiFiConfiguration{ + AndroidWiFiConfiguration: *NewAndroidWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidEnterpriseWiFiConfiguration) GetEapType()(*AndroidEapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*AndroidEapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(AndroidCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["innerAuthenticationProtocolForPeap"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForPeap) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForPeap(val.(*NonEapAuthenticationMethodForPeap)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["passwordFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordFormatString(val) + } + return nil + } + res["preSharedKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKey(val) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(AndroidTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + res["usernameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsernameFormatString(val) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(AndroidCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetInnerAuthenticationProtocolForPeap gets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) { + return m.innerAuthenticationProtocolForPeap +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetPasswordFormatString gets the passwordFormatString property value. Password format string used to build the password to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) GetPasswordFormatString()(*string) { + return m.passwordFormatString +} +// GetPreSharedKey gets the preSharedKey property value. PreSharedKey used to build the password to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) GetPreSharedKey()(*string) { + return m.preSharedKey +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(AndroidTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// GetUsernameFormatString gets the usernameFormatString property value. Username format string used to build the username to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) GetUsernameFormatString()(*string) { + return m.usernameFormatString +} +// Serialize serializes information the current object +func (m *AndroidEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForPeap() != nil { + cast := (*m.GetInnerAuthenticationProtocolForPeap()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForPeap", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordFormatString", m.GetPasswordFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preSharedKey", m.GetPreSharedKey()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("usernameFormatString", m.GetUsernameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidEnterpriseWiFiConfiguration) SetEapType(value *AndroidEapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value AndroidCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetInnerAuthenticationProtocolForPeap sets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() { + m.innerAuthenticationProtocolForPeap = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetPasswordFormatString sets the passwordFormatString property value. Password format string used to build the password to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) SetPasswordFormatString(value *string)() { + m.passwordFormatString = value +} +// SetPreSharedKey sets the preSharedKey property value. PreSharedKey used to build the password to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) SetPreSharedKey(value *string)() { + m.preSharedKey = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value AndroidTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} +// SetUsernameFormatString sets the usernameFormatString property value. Username format string used to build the username to connect to wifi +func (m *AndroidEnterpriseWiFiConfiguration) SetUsernameFormatString(value *string)() { + m.usernameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..876632bea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnterpriseWiFiConfigurationCollectionResponse +type AndroidEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidEnterpriseWiFiConfigurationable +} +// NewAndroidEnterpriseWiFiConfigurationCollectionResponse instantiates a new AndroidEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidEnterpriseWiFiConfigurationCollectionResponse()(*AndroidEnterpriseWiFiConfigurationCollectionResponse) { + m := &AndroidEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]AndroidEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []AndroidEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..bbb2dc326 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnterpriseWiFiConfigurationCollectionResponseable +type AndroidEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidEnterpriseWiFiConfigurationable) + SetValue(value []AndroidEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..a1b898bf1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_enterprise_wi_fi_configurationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidEnterpriseWiFiConfigurationable +type AndroidEnterpriseWiFiConfigurationable interface { + AndroidWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapType()(*AndroidEapType) + GetIdentityCertificateForClientAuthentication()(AndroidCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetPasswordFormatString()(*string) + GetPreSharedKey()(*string) + GetRootCertificateForServerValidation()(AndroidTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + GetUsernameFormatString()(*string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapType(value *AndroidEapType)() + SetIdentityCertificateForClientAuthentication(value AndroidCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetPasswordFormatString(value *string)() + SetPreSharedKey(value *string)() + SetRootCertificateForServerValidation(value AndroidTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() + SetUsernameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app.go b/src/internal/connector/graph/betasdk/models/android_for_work_app.go new file mode 100644 index 000000000..2a8ac74cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkApp +type AndroidForWorkApp struct { + MobileApp + // The Identity Name. + appIdentifier *string + // The Play for Work Store app URL. + appStoreUrl *string + // The package identifier. + packageId *string + // The total number of VPP licenses. + totalLicenseCount *int32 + // The number of VPP licenses in use. + usedLicenseCount *int32 +} +// NewAndroidForWorkApp instantiates a new AndroidForWorkApp and sets the default values. +func NewAndroidForWorkApp()(*AndroidForWorkApp) { + m := &AndroidForWorkApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.androidForWorkApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkApp(), nil +} +// GetAppIdentifier gets the appIdentifier property value. The Identity Name. +func (m *AndroidForWorkApp) GetAppIdentifier()(*string) { + return m.appIdentifier +} +// GetAppStoreUrl gets the appStoreUrl property value. The Play for Work Store app URL. +func (m *AndroidForWorkApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppIdentifier(val) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + return res +} +// GetPackageId gets the packageId property value. The package identifier. +func (m *AndroidForWorkApp) GetPackageId()(*string) { + return m.packageId +} +// GetTotalLicenseCount gets the totalLicenseCount property value. The total number of VPP licenses. +func (m *AndroidForWorkApp) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *AndroidForWorkApp) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// Serialize serializes information the current object +func (m *AndroidForWorkApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appIdentifier", m.GetAppIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + return nil +} +// SetAppIdentifier sets the appIdentifier property value. The Identity Name. +func (m *AndroidForWorkApp) SetAppIdentifier(value *string)() { + m.appIdentifier = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Play for Work Store app URL. +func (m *AndroidForWorkApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetPackageId sets the packageId property value. The package identifier. +func (m *AndroidForWorkApp) SetPackageId(value *string)() { + m.packageId = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. The total number of VPP licenses. +func (m *AndroidForWorkApp) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *AndroidForWorkApp) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_response.go new file mode 100644 index 000000000..585c4392b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppCollectionResponse +type AndroidForWorkAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkAppable +} +// NewAndroidForWorkAppCollectionResponse instantiates a new AndroidForWorkAppCollectionResponse and sets the default values. +func NewAndroidForWorkAppCollectionResponse()(*AndroidForWorkAppCollectionResponse) { + m := &AndroidForWorkAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkAppable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkAppCollectionResponse) GetValue()([]AndroidForWorkAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkAppCollectionResponse) SetValue(value []AndroidForWorkAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_responseable.go new file mode 100644 index 000000000..fd1e235a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppCollectionResponseable +type AndroidForWorkAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkAppable) + SetValue(value []AndroidForWorkAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema.go new file mode 100644 index 000000000..02273a9fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchema schema describing an Android for Work application's custom configurations. +type AndroidForWorkAppConfigurationSchema struct { + Entity + // UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app + exampleJson []byte + // Collection of items each representing a named configuration option in the schema + schemaItems []AndroidForWorkAppConfigurationSchemaItemable +} +// NewAndroidForWorkAppConfigurationSchema instantiates a new androidForWorkAppConfigurationSchema and sets the default values. +func NewAndroidForWorkAppConfigurationSchema()(*AndroidForWorkAppConfigurationSchema) { + m := &AndroidForWorkAppConfigurationSchema{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidForWorkAppConfigurationSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppConfigurationSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkAppConfigurationSchema(), nil +} +// GetExampleJson gets the exampleJson property value. UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app +func (m *AndroidForWorkAppConfigurationSchema) GetExampleJson()([]byte) { + return m.exampleJson +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkAppConfigurationSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exampleJson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetExampleJson(val) + } + return nil + } + res["schemaItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkAppConfigurationSchemaItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkAppConfigurationSchemaItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkAppConfigurationSchemaItemable) + } + m.SetSchemaItems(res) + } + return nil + } + return res +} +// GetSchemaItems gets the schemaItems property value. Collection of items each representing a named configuration option in the schema +func (m *AndroidForWorkAppConfigurationSchema) GetSchemaItems()([]AndroidForWorkAppConfigurationSchemaItemable) { + return m.schemaItems +} +// Serialize serializes information the current object +func (m *AndroidForWorkAppConfigurationSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("exampleJson", m.GetExampleJson()) + if err != nil { + return err + } + } + if m.GetSchemaItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSchemaItems())) + for i, v := range m.GetSchemaItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("schemaItems", cast) + if err != nil { + return err + } + } + return nil +} +// SetExampleJson sets the exampleJson property value. UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app +func (m *AndroidForWorkAppConfigurationSchema) SetExampleJson(value []byte)() { + m.exampleJson = value +} +// SetSchemaItems sets the schemaItems property value. Collection of items each representing a named configuration option in the schema +func (m *AndroidForWorkAppConfigurationSchema) SetSchemaItems(value []AndroidForWorkAppConfigurationSchemaItemable)() { + m.schemaItems = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_response.go new file mode 100644 index 000000000..3a6470570 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaCollectionResponse +type AndroidForWorkAppConfigurationSchemaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkAppConfigurationSchemaable +} +// NewAndroidForWorkAppConfigurationSchemaCollectionResponse instantiates a new AndroidForWorkAppConfigurationSchemaCollectionResponse and sets the default values. +func NewAndroidForWorkAppConfigurationSchemaCollectionResponse()(*AndroidForWorkAppConfigurationSchemaCollectionResponse) { + m := &AndroidForWorkAppConfigurationSchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkAppConfigurationSchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppConfigurationSchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkAppConfigurationSchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkAppConfigurationSchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkAppConfigurationSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkAppConfigurationSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkAppConfigurationSchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkAppConfigurationSchemaCollectionResponse) GetValue()([]AndroidForWorkAppConfigurationSchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkAppConfigurationSchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkAppConfigurationSchemaCollectionResponse) SetValue(value []AndroidForWorkAppConfigurationSchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_responseable.go new file mode 100644 index 000000000..bc85956f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaCollectionResponseable +type AndroidForWorkAppConfigurationSchemaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkAppConfigurationSchemaable) + SetValue(value []AndroidForWorkAppConfigurationSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item.go new file mode 100644 index 000000000..6fbf05d8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item.go @@ -0,0 +1,318 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaItem single configuration item inside an Android for Work application's custom configuration schema. +type AndroidForWorkAppConfigurationSchemaItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Data type for a configuration item inside an Android for Work application's custom configuration schema + dataType *AndroidForWorkAppConfigurationSchemaItemDataType + // Default value for boolean type items, if specified by the app developer + defaultBoolValue *bool + // Default value for integer type items, if specified by the app developer + defaultIntValue *int32 + // Default value for string array type items, if specified by the app developer + defaultStringArrayValue []string + // Default value for string type items, if specified by the app developer + defaultStringValue *string + // Description of what the item controls within the application + description *string + // Human readable name + displayName *string + // The OdataType property + odataType *string + // Unique key the application uses to identify the item + schemaItemKey *string + // List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) + selections []KeyValuePairable +} +// NewAndroidForWorkAppConfigurationSchemaItem instantiates a new androidForWorkAppConfigurationSchemaItem and sets the default values. +func NewAndroidForWorkAppConfigurationSchemaItem()(*AndroidForWorkAppConfigurationSchemaItem) { + m := &AndroidForWorkAppConfigurationSchemaItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidForWorkAppConfigurationSchemaItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppConfigurationSchemaItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkAppConfigurationSchemaItem(), 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 *AndroidForWorkAppConfigurationSchemaItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDataType gets the dataType property value. Data type for a configuration item inside an Android for Work application's custom configuration schema +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDataType()(*AndroidForWorkAppConfigurationSchemaItemDataType) { + return m.dataType +} +// GetDefaultBoolValue gets the defaultBoolValue property value. Default value for boolean type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDefaultBoolValue()(*bool) { + return m.defaultBoolValue +} +// GetDefaultIntValue gets the defaultIntValue property value. Default value for integer type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDefaultIntValue()(*int32) { + return m.defaultIntValue +} +// GetDefaultStringArrayValue gets the defaultStringArrayValue property value. Default value for string array type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDefaultStringArrayValue()([]string) { + return m.defaultStringArrayValue +} +// GetDefaultStringValue gets the defaultStringValue property value. Default value for string type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDefaultStringValue()(*string) { + return m.defaultStringValue +} +// GetDescription gets the description property value. Description of what the item controls within the application +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Human readable name +func (m *AndroidForWorkAppConfigurationSchemaItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkAppConfigurationSchemaItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkAppConfigurationSchemaItemDataType) + if err != nil { + return err + } + if val != nil { + m.SetDataType(val.(*AndroidForWorkAppConfigurationSchemaItemDataType)) + } + return nil + } + res["defaultBoolValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBoolValue(val) + } + return nil + } + res["defaultIntValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultIntValue(val) + } + return nil + } + res["defaultStringArrayValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDefaultStringArrayValue(res) + } + return nil + } + res["defaultStringValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultStringValue(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["schemaItemKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchemaItemKey(val) + } + return nil + } + res["selections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetSelections(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidForWorkAppConfigurationSchemaItem) GetOdataType()(*string) { + return m.odataType +} +// GetSchemaItemKey gets the schemaItemKey property value. Unique key the application uses to identify the item +func (m *AndroidForWorkAppConfigurationSchemaItem) GetSchemaItemKey()(*string) { + return m.schemaItemKey +} +// GetSelections gets the selections property value. List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) +func (m *AndroidForWorkAppConfigurationSchemaItem) GetSelections()([]KeyValuePairable) { + return m.selections +} +// Serialize serializes information the current object +func (m *AndroidForWorkAppConfigurationSchemaItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDataType() != nil { + cast := (*m.GetDataType()).String() + err := writer.WriteStringValue("dataType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("defaultBoolValue", m.GetDefaultBoolValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("defaultIntValue", m.GetDefaultIntValue()) + if err != nil { + return err + } + } + if m.GetDefaultStringArrayValue() != nil { + err := writer.WriteCollectionOfStringValues("defaultStringArrayValue", m.GetDefaultStringArrayValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultStringValue", m.GetDefaultStringValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("schemaItemKey", m.GetSchemaItemKey()) + if err != nil { + return err + } + } + if m.GetSelections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSelections())) + for i, v := range m.GetSelections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("selections", 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 *AndroidForWorkAppConfigurationSchemaItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDataType sets the dataType property value. Data type for a configuration item inside an Android for Work application's custom configuration schema +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDataType(value *AndroidForWorkAppConfigurationSchemaItemDataType)() { + m.dataType = value +} +// SetDefaultBoolValue sets the defaultBoolValue property value. Default value for boolean type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDefaultBoolValue(value *bool)() { + m.defaultBoolValue = value +} +// SetDefaultIntValue sets the defaultIntValue property value. Default value for integer type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDefaultIntValue(value *int32)() { + m.defaultIntValue = value +} +// SetDefaultStringArrayValue sets the defaultStringArrayValue property value. Default value for string array type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDefaultStringArrayValue(value []string)() { + m.defaultStringArrayValue = value +} +// SetDefaultStringValue sets the defaultStringValue property value. Default value for string type items, if specified by the app developer +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDefaultStringValue(value *string)() { + m.defaultStringValue = value +} +// SetDescription sets the description property value. Description of what the item controls within the application +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Human readable name +func (m *AndroidForWorkAppConfigurationSchemaItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidForWorkAppConfigurationSchemaItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetSchemaItemKey sets the schemaItemKey property value. Unique key the application uses to identify the item +func (m *AndroidForWorkAppConfigurationSchemaItem) SetSchemaItemKey(value *string)() { + m.schemaItemKey = value +} +// SetSelections sets the selections property value. List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) +func (m *AndroidForWorkAppConfigurationSchemaItem) SetSelections(value []KeyValuePairable)() { + m.selections = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_response.go new file mode 100644 index 000000000..7015e1822 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaItemCollectionResponse +type AndroidForWorkAppConfigurationSchemaItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkAppConfigurationSchemaItemable +} +// NewAndroidForWorkAppConfigurationSchemaItemCollectionResponse instantiates a new AndroidForWorkAppConfigurationSchemaItemCollectionResponse and sets the default values. +func NewAndroidForWorkAppConfigurationSchemaItemCollectionResponse()(*AndroidForWorkAppConfigurationSchemaItemCollectionResponse) { + m := &AndroidForWorkAppConfigurationSchemaItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkAppConfigurationSchemaItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkAppConfigurationSchemaItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkAppConfigurationSchemaItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkAppConfigurationSchemaItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkAppConfigurationSchemaItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkAppConfigurationSchemaItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkAppConfigurationSchemaItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkAppConfigurationSchemaItemCollectionResponse) GetValue()([]AndroidForWorkAppConfigurationSchemaItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkAppConfigurationSchemaItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkAppConfigurationSchemaItemCollectionResponse) SetValue(value []AndroidForWorkAppConfigurationSchemaItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_responseable.go new file mode 100644 index 000000000..ed237d3d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaItemCollectionResponseable +type AndroidForWorkAppConfigurationSchemaItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkAppConfigurationSchemaItemable) + SetValue(value []AndroidForWorkAppConfigurationSchemaItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_data_type.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_data_type.go new file mode 100644 index 000000000..e717eddaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_item_data_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkAppConfigurationSchemaItemDataType int + +const ( + BOOL_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE AndroidForWorkAppConfigurationSchemaItemDataType = iota + INTEGER_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + STRING_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + CHOICE_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + MULTISELECT_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + BUNDLE_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + BUNDLEARRAY_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + HIDDEN_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE +) + +func (i AndroidForWorkAppConfigurationSchemaItemDataType) String() string { + return []string{"bool", "integer", "string", "choice", "multiselect", "bundle", "bundleArray", "hidden"}[i] +} +func ParseAndroidForWorkAppConfigurationSchemaItemDataType(v string) (interface{}, error) { + result := BOOL_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + switch v { + case "bool": + result = BOOL_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "integer": + result = INTEGER_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "string": + result = STRING_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "choice": + result = CHOICE_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "multiselect": + result = MULTISELECT_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "bundle": + result = BUNDLE_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "bundleArray": + result = BUNDLEARRAY_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "hidden": + result = HIDDEN_ANDROIDFORWORKAPPCONFIGURATIONSCHEMAITEMDATATYPE + default: + return 0, errors.New("Unknown AndroidForWorkAppConfigurationSchemaItemDataType value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkAppConfigurationSchemaItemDataType(values []AndroidForWorkAppConfigurationSchemaItemDataType) []string { + 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/android_for_work_app_configuration_schema_itemable.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_itemable.go new file mode 100644 index 000000000..57ec1a9c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schema_itemable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaItemable +type AndroidForWorkAppConfigurationSchemaItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataType()(*AndroidForWorkAppConfigurationSchemaItemDataType) + GetDefaultBoolValue()(*bool) + GetDefaultIntValue()(*int32) + GetDefaultStringArrayValue()([]string) + GetDefaultStringValue()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + GetSchemaItemKey()(*string) + GetSelections()([]KeyValuePairable) + SetDataType(value *AndroidForWorkAppConfigurationSchemaItemDataType)() + SetDefaultBoolValue(value *bool)() + SetDefaultIntValue(value *int32)() + SetDefaultStringArrayValue(value []string)() + SetDefaultStringValue(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetSchemaItemKey(value *string)() + SetSelections(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schemaable.go b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schemaable.go new file mode 100644 index 000000000..83474630c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_app_configuration_schemaable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppConfigurationSchemaable +type AndroidForWorkAppConfigurationSchemaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExampleJson()([]byte) + GetSchemaItems()([]AndroidForWorkAppConfigurationSchemaItemable) + SetExampleJson(value []byte)() + SetSchemaItems(value []AndroidForWorkAppConfigurationSchemaItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_appable.go b/src/internal/connector/graph/betasdk/models/android_for_work_appable.go new file mode 100644 index 000000000..17cd4866d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_appable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkAppable +type AndroidForWorkAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppIdentifier()(*string) + GetAppStoreUrl()(*string) + GetPackageId()(*string) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + SetAppIdentifier(value *string)() + SetAppStoreUrl(value *string)() + SetPackageId(value *string)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_bind_status.go b/src/internal/connector/graph/betasdk/models/android_for_work_bind_status.go new file mode 100644 index 000000000..cb4fe7b06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_bind_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkBindStatus int + +const ( + NOTBOUND_ANDROIDFORWORKBINDSTATUS AndroidForWorkBindStatus = iota + BOUND_ANDROIDFORWORKBINDSTATUS + BOUNDANDVALIDATED_ANDROIDFORWORKBINDSTATUS + UNBINDING_ANDROIDFORWORKBINDSTATUS +) + +func (i AndroidForWorkBindStatus) String() string { + return []string{"notBound", "bound", "boundAndValidated", "unbinding"}[i] +} +func ParseAndroidForWorkBindStatus(v string) (interface{}, error) { + result := NOTBOUND_ANDROIDFORWORKBINDSTATUS + switch v { + case "notBound": + result = NOTBOUND_ANDROIDFORWORKBINDSTATUS + case "bound": + result = BOUND_ANDROIDFORWORKBINDSTATUS + case "boundAndValidated": + result = BOUNDANDVALIDATED_ANDROIDFORWORKBINDSTATUS + case "unbinding": + result = UNBINDING_ANDROIDFORWORKBINDSTATUS + default: + return 0, errors.New("Unknown AndroidForWorkBindStatus value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkBindStatus(values []AndroidForWorkBindStatus) []string { + 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/android_for_work_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base.go new file mode 100644 index 000000000..ff915872c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base.go @@ -0,0 +1,249 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCertificateProfileBase +type AndroidForWorkCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + rootCertificate AndroidForWorkTrustedRootCertificateable + // Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Subject Name Format Options. + subjectNameFormat *SubjectNameFormat +} +// NewAndroidForWorkCertificateProfileBase instantiates a new AndroidForWorkCertificateProfileBase and sets the default values. +func NewAndroidForWorkCertificateProfileBase()(*AndroidForWorkCertificateProfileBase) { + m := &AndroidForWorkCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkPkcsCertificateProfile": + return NewAndroidForWorkPkcsCertificateProfile(), nil + case "#microsoft.graph.androidForWorkScepCertificateProfile": + return NewAndroidForWorkScepCertificateProfile(), nil + } + } + } + } + return NewAndroidForWorkCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidForWorkCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidForWorkCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkCertificateProfileBase) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(AndroidForWorkTrustedRootCertificateable)) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidForWorkCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidForWorkCertificateProfileBase) GetRootCertificate()(AndroidForWorkTrustedRootCertificateable) { + return m.rootCertificate +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidForWorkCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidForWorkCertificateProfileBase) GetSubjectNameFormat()(*SubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *AndroidForWorkCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidForWorkCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidForWorkCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkCertificateProfileBase) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidForWorkCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidForWorkCertificateProfileBase) SetRootCertificate(value AndroidForWorkTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidForWorkCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidForWorkCertificateProfileBase) SetSubjectNameFormat(value *SubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..46ab74cca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCertificateProfileBaseCollectionResponse +type AndroidForWorkCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkCertificateProfileBaseable +} +// NewAndroidForWorkCertificateProfileBaseCollectionResponse instantiates a new AndroidForWorkCertificateProfileBaseCollectionResponse and sets the default values. +func NewAndroidForWorkCertificateProfileBaseCollectionResponse()(*AndroidForWorkCertificateProfileBaseCollectionResponse) { + m := &AndroidForWorkCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkCertificateProfileBaseCollectionResponse) GetValue()([]AndroidForWorkCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkCertificateProfileBaseCollectionResponse) SetValue(value []AndroidForWorkCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..fdfbca1ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCertificateProfileBaseCollectionResponseable +type AndroidForWorkCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkCertificateProfileBaseable) + SetValue(value []AndroidForWorkCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_baseable.go new file mode 100644 index 000000000..329a2180e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_certificate_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCertificateProfileBaseable +type AndroidForWorkCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetRenewalThresholdPercentage()(*int32) + GetRootCertificate()(AndroidForWorkTrustedRootCertificateable) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*SubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetRenewalThresholdPercentage(value *int32)() + SetRootCertificate(value AndroidForWorkTrustedRootCertificateable)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *SubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy.go b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy.go new file mode 100644 index 000000000..66a3e7e3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy.go @@ -0,0 +1,664 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCompliancePolicy +type AndroidForWorkCompliancePolicy struct { + DeviceCompliancePolicy + // Require that devices have enabled device threat protection. + deviceThreatProtectionEnabled *bool + // Device threat protection levels for the Device Threat Protection API. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Minimum Android security patch level. + minAndroidSecurityPatchLevel *string + // Maximum Android version. + osMaximumVersion *string + // Minimum Android version. + osMinimumVersion *string + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum password length. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Number of previous passwords to block. Valid values 1 to 24 + passwordPreviousPasswordBlockCount *int32 + // Require a password to unlock device. + passwordRequired *bool + // Android required password type. + passwordRequiredType *AndroidRequiredPasswordType + // Number of sign-in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Devices must not be jailbroken or rooted. + securityBlockJailbrokenDevices *bool + // Disable USB debugging on Android devices. + securityDisableUsbDebugging *bool + // Require that devices disallow installation of apps from unknown sources. + securityPreventInstallAppsFromUnknownSources *bool + // Require the device to pass the Company Portal client app runtime integrity check. + securityRequireCompanyPortalAppIntegrity *bool + // An enum representing the Android SafetyNet attestation evaluation types. + securityRequiredAndroidSafetyNetEvaluationType *AndroidSafetyNetEvaluationType + // Require Google Play Services to be installed and enabled on the device. + securityRequireGooglePlayServices *bool + // Require the device to pass the SafetyNet basic integrity check. + securityRequireSafetyNetAttestationBasicIntegrity *bool + // Require the device to pass the SafetyNet certified device check. + securityRequireSafetyNetAttestationCertifiedDevice *bool + // Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. + securityRequireUpToDateSecurityProviders *bool + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Require encryption on Android devices. + storageRequireEncryption *bool +} +// NewAndroidForWorkCompliancePolicy instantiates a new AndroidForWorkCompliancePolicy and sets the default values. +func NewAndroidForWorkCompliancePolicy()(*AndroidForWorkCompliancePolicy) { + m := &AndroidForWorkCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.androidForWorkCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkCompliancePolicy(), nil +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidForWorkCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidForWorkCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["minAndroidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinAndroidSecurityPatchLevel(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["securityBlockJailbrokenDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockJailbrokenDevices(val) + } + return nil + } + res["securityDisableUsbDebugging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDisableUsbDebugging(val) + } + return nil + } + res["securityPreventInstallAppsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityPreventInstallAppsFromUnknownSources(val) + } + return nil + } + res["securityRequireCompanyPortalAppIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireCompanyPortalAppIntegrity(val) + } + return nil + } + res["securityRequiredAndroidSafetyNetEvaluationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidSafetyNetEvaluationType) + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequiredAndroidSafetyNetEvaluationType(val.(*AndroidSafetyNetEvaluationType)) + } + return nil + } + res["securityRequireGooglePlayServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireGooglePlayServices(val) + } + return nil + } + res["securityRequireSafetyNetAttestationBasicIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationBasicIntegrity(val) + } + return nil + } + res["securityRequireSafetyNetAttestationCertifiedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationCertifiedDevice(val) + } + return nil + } + res["securityRequireUpToDateSecurityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireUpToDateSecurityProviders(val) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + return res +} +// GetMinAndroidSecurityPatchLevel gets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidForWorkCompliancePolicy) GetMinAndroidSecurityPatchLevel()(*string) { + return m.minAndroidSecurityPatchLevel +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidForWorkCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidForWorkCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidForWorkCompliancePolicy) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidForWorkCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidForWorkCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidForWorkCompliancePolicy) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidForWorkCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android required password type. +func (m *AndroidForWorkCompliancePolicy) GetPasswordRequiredType()(*AndroidRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidForWorkCompliancePolicy) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkCompliancePolicy) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetSecurityBlockJailbrokenDevices gets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidForWorkCompliancePolicy) GetSecurityBlockJailbrokenDevices()(*bool) { + return m.securityBlockJailbrokenDevices +} +// GetSecurityDisableUsbDebugging gets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidForWorkCompliancePolicy) GetSecurityDisableUsbDebugging()(*bool) { + return m.securityDisableUsbDebugging +} +// GetSecurityPreventInstallAppsFromUnknownSources gets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidForWorkCompliancePolicy) GetSecurityPreventInstallAppsFromUnknownSources()(*bool) { + return m.securityPreventInstallAppsFromUnknownSources +} +// GetSecurityRequireCompanyPortalAppIntegrity gets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireCompanyPortalAppIntegrity()(*bool) { + return m.securityRequireCompanyPortalAppIntegrity +} +// GetSecurityRequiredAndroidSafetyNetEvaluationType gets the securityRequiredAndroidSafetyNetEvaluationType property value. An enum representing the Android SafetyNet attestation evaluation types. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequiredAndroidSafetyNetEvaluationType()(*AndroidSafetyNetEvaluationType) { + return m.securityRequiredAndroidSafetyNetEvaluationType +} +// GetSecurityRequireGooglePlayServices gets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireGooglePlayServices()(*bool) { + return m.securityRequireGooglePlayServices +} +// GetSecurityRequireSafetyNetAttestationBasicIntegrity gets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) { + return m.securityRequireSafetyNetAttestationBasicIntegrity +} +// GetSecurityRequireSafetyNetAttestationCertifiedDevice gets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) { + return m.securityRequireSafetyNetAttestationCertifiedDevice +} +// GetSecurityRequireUpToDateSecurityProviders gets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireUpToDateSecurityProviders()(*bool) { + return m.securityRequireUpToDateSecurityProviders +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidForWorkCompliancePolicy) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidForWorkCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// Serialize serializes information the current object +func (m *AndroidForWorkCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minAndroidSecurityPatchLevel", m.GetMinAndroidSecurityPatchLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockJailbrokenDevices", m.GetSecurityBlockJailbrokenDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDisableUsbDebugging", m.GetSecurityDisableUsbDebugging()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityPreventInstallAppsFromUnknownSources", m.GetSecurityPreventInstallAppsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireCompanyPortalAppIntegrity", m.GetSecurityRequireCompanyPortalAppIntegrity()) + if err != nil { + return err + } + } + if m.GetSecurityRequiredAndroidSafetyNetEvaluationType() != nil { + cast := (*m.GetSecurityRequiredAndroidSafetyNetEvaluationType()).String() + err = writer.WriteStringValue("securityRequiredAndroidSafetyNetEvaluationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireGooglePlayServices", m.GetSecurityRequireGooglePlayServices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationBasicIntegrity", m.GetSecurityRequireSafetyNetAttestationBasicIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationCertifiedDevice", m.GetSecurityRequireSafetyNetAttestationCertifiedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireUpToDateSecurityProviders", m.GetSecurityRequireUpToDateSecurityProviders()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidForWorkCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidForWorkCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetMinAndroidSecurityPatchLevel sets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidForWorkCompliancePolicy) SetMinAndroidSecurityPatchLevel(value *string)() { + m.minAndroidSecurityPatchLevel = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidForWorkCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidForWorkCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidForWorkCompliancePolicy) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidForWorkCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidForWorkCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidForWorkCompliancePolicy) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidForWorkCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android required password type. +func (m *AndroidForWorkCompliancePolicy) SetPasswordRequiredType(value *AndroidRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidForWorkCompliancePolicy) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkCompliancePolicy) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetSecurityBlockJailbrokenDevices sets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidForWorkCompliancePolicy) SetSecurityBlockJailbrokenDevices(value *bool)() { + m.securityBlockJailbrokenDevices = value +} +// SetSecurityDisableUsbDebugging sets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidForWorkCompliancePolicy) SetSecurityDisableUsbDebugging(value *bool)() { + m.securityDisableUsbDebugging = value +} +// SetSecurityPreventInstallAppsFromUnknownSources sets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidForWorkCompliancePolicy) SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() { + m.securityPreventInstallAppsFromUnknownSources = value +} +// SetSecurityRequireCompanyPortalAppIntegrity sets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() { + m.securityRequireCompanyPortalAppIntegrity = value +} +// SetSecurityRequiredAndroidSafetyNetEvaluationType sets the securityRequiredAndroidSafetyNetEvaluationType property value. An enum representing the Android SafetyNet attestation evaluation types. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequiredAndroidSafetyNetEvaluationType(value *AndroidSafetyNetEvaluationType)() { + m.securityRequiredAndroidSafetyNetEvaluationType = value +} +// SetSecurityRequireGooglePlayServices sets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireGooglePlayServices(value *bool)() { + m.securityRequireGooglePlayServices = value +} +// SetSecurityRequireSafetyNetAttestationBasicIntegrity sets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() { + m.securityRequireSafetyNetAttestationBasicIntegrity = value +} +// SetSecurityRequireSafetyNetAttestationCertifiedDevice sets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() { + m.securityRequireSafetyNetAttestationCertifiedDevice = value +} +// SetSecurityRequireUpToDateSecurityProviders sets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireUpToDateSecurityProviders(value *bool)() { + m.securityRequireUpToDateSecurityProviders = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidForWorkCompliancePolicy) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidForWorkCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_response.go new file mode 100644 index 000000000..92039c33c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCompliancePolicyCollectionResponse +type AndroidForWorkCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkCompliancePolicyable +} +// NewAndroidForWorkCompliancePolicyCollectionResponse instantiates a new AndroidForWorkCompliancePolicyCollectionResponse and sets the default values. +func NewAndroidForWorkCompliancePolicyCollectionResponse()(*AndroidForWorkCompliancePolicyCollectionResponse) { + m := &AndroidForWorkCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkCompliancePolicyCollectionResponse) GetValue()([]AndroidForWorkCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkCompliancePolicyCollectionResponse) SetValue(value []AndroidForWorkCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..379ee8e27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCompliancePolicyCollectionResponseable +type AndroidForWorkCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkCompliancePolicyable) + SetValue(value []AndroidForWorkCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policyable.go new file mode 100644 index 000000000..afdf17cbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_compliance_policyable.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCompliancePolicyable +type AndroidForWorkCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetMinAndroidSecurityPatchLevel()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetSecurityBlockJailbrokenDevices()(*bool) + GetSecurityDisableUsbDebugging()(*bool) + GetSecurityPreventInstallAppsFromUnknownSources()(*bool) + GetSecurityRequireCompanyPortalAppIntegrity()(*bool) + GetSecurityRequiredAndroidSafetyNetEvaluationType()(*AndroidSafetyNetEvaluationType) + GetSecurityRequireGooglePlayServices()(*bool) + GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) + GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) + GetSecurityRequireUpToDateSecurityProviders()(*bool) + GetSecurityRequireVerifyApps()(*bool) + GetStorageRequireEncryption()(*bool) + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetMinAndroidSecurityPatchLevel(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetSecurityBlockJailbrokenDevices(value *bool)() + SetSecurityDisableUsbDebugging(value *bool)() + SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() + SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() + SetSecurityRequiredAndroidSafetyNetEvaluationType(value *AndroidSafetyNetEvaluationType)() + SetSecurityRequireGooglePlayServices(value *bool)() + SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() + SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() + SetSecurityRequireUpToDateSecurityProviders(value *bool)() + SetSecurityRequireVerifyApps(value *bool)() + SetStorageRequireEncryption(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_cross_profile_data_sharing_type.go b/src/internal/connector/graph/betasdk/models/android_for_work_cross_profile_data_sharing_type.go new file mode 100644 index 000000000..0f583453d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_cross_profile_data_sharing_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkCrossProfileDataSharingType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE AndroidForWorkCrossProfileDataSharingType = iota + // Prevent any sharing. + PREVENTANY_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + // Allow data sharing request from personal profile to work profile. + ALLOWPERSONALTOWORK_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + // No restrictions on sharing. + NORESTRICTIONS_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE +) + +func (i AndroidForWorkCrossProfileDataSharingType) String() string { + return []string{"deviceDefault", "preventAny", "allowPersonalToWork", "noRestrictions"}[i] +} +func ParseAndroidForWorkCrossProfileDataSharingType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + case "preventAny": + result = PREVENTANY_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + case "allowPersonalToWork": + result = ALLOWPERSONALTOWORK_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + case "noRestrictions": + result = NORESTRICTIONS_ANDROIDFORWORKCROSSPROFILEDATASHARINGTYPE + default: + return 0, errors.New("Unknown AndroidForWorkCrossProfileDataSharingType value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkCrossProfileDataSharingType(values []AndroidForWorkCrossProfileDataSharingType) []string { + 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/android_for_work_custom_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration.go new file mode 100644 index 000000000..12c8224fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCustomConfiguration +type AndroidForWorkCustomConfiguration struct { + DeviceConfiguration + // OMA settings. This collection can contain a maximum of 500 elements. + omaSettings []OmaSettingable +} +// NewAndroidForWorkCustomConfiguration instantiates a new AndroidForWorkCustomConfiguration and sets the default values. +func NewAndroidForWorkCustomConfiguration()(*AndroidForWorkCustomConfiguration) { + m := &AndroidForWorkCustomConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkCustomConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkCustomConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCustomConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkCustomConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCustomConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["omaSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOmaSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OmaSettingable, len(val)) + for i, v := range val { + res[i] = v.(OmaSettingable) + } + m.SetOmaSettings(res) + } + return nil + } + return res +} +// GetOmaSettings gets the omaSettings property value. OMA settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkCustomConfiguration) GetOmaSettings()([]OmaSettingable) { + return m.omaSettings +} +// Serialize serializes information the current object +func (m *AndroidForWorkCustomConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetOmaSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOmaSettings())) + for i, v := range m.GetOmaSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("omaSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetOmaSettings sets the omaSettings property value. OMA settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkCustomConfiguration) SetOmaSettings(value []OmaSettingable)() { + m.omaSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_response.go new file mode 100644 index 000000000..9a8fc2924 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCustomConfigurationCollectionResponse +type AndroidForWorkCustomConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkCustomConfigurationable +} +// NewAndroidForWorkCustomConfigurationCollectionResponse instantiates a new AndroidForWorkCustomConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkCustomConfigurationCollectionResponse()(*AndroidForWorkCustomConfigurationCollectionResponse) { + m := &AndroidForWorkCustomConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkCustomConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkCustomConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkCustomConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkCustomConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkCustomConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkCustomConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkCustomConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkCustomConfigurationCollectionResponse) GetValue()([]AndroidForWorkCustomConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkCustomConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkCustomConfigurationCollectionResponse) SetValue(value []AndroidForWorkCustomConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_responseable.go new file mode 100644 index 000000000..ddf07e9c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCustomConfigurationCollectionResponseable +type AndroidForWorkCustomConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkCustomConfigurationable) + SetValue(value []AndroidForWorkCustomConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_custom_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configurationable.go new file mode 100644 index 000000000..e106394d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_custom_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkCustomConfigurationable +type AndroidForWorkCustomConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOmaSettings()([]OmaSettingable) + SetOmaSettings(value []OmaSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_default_app_permission_policy_type.go b/src/internal/connector/graph/betasdk/models/android_for_work_default_app_permission_policy_type.go new file mode 100644 index 000000000..3fbef136f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_default_app_permission_policy_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkDefaultAppPermissionPolicyType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE AndroidForWorkDefaultAppPermissionPolicyType = iota + // Prompt. + PROMPT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto grant. + AUTOGRANT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto deny. + AUTODENY_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE +) + +func (i AndroidForWorkDefaultAppPermissionPolicyType) String() string { + return []string{"deviceDefault", "prompt", "autoGrant", "autoDeny"}[i] +} +func ParseAndroidForWorkDefaultAppPermissionPolicyType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + case "prompt": + result = PROMPT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoGrant": + result = AUTOGRANT_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoDeny": + result = AUTODENY_ANDROIDFORWORKDEFAULTAPPPERMISSIONPOLICYTYPE + default: + return 0, errors.New("Unknown AndroidForWorkDefaultAppPermissionPolicyType value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkDefaultAppPermissionPolicyType(values []AndroidForWorkDefaultAppPermissionPolicyType) []string { + 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/android_for_work_eas_email_profile_base.go b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base.go new file mode 100644 index 000000000..dce00c31b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEasEmailProfileBase +type AndroidForWorkEasEmailProfileBase struct { + DeviceConfiguration + // Exchange Active Sync authentication method. + authenticationMethod *EasAuthenticationMethod + // Possible values for email sync duration. + durationOfEmailToSync *EmailSyncDuration + // Possible values for username source or email source. + emailAddressSource *UserEmailSource + // Exchange location (URL) that the mail app connects to. + hostName *string + // Identity certificate. + identityCertificate AndroidForWorkCertificateProfileBaseable + // Indicates whether or not to use SSL. + requireSsl *bool + // Android username source. + usernameSource *AndroidUsernameSource +} +// NewAndroidForWorkEasEmailProfileBase instantiates a new AndroidForWorkEasEmailProfileBase and sets the default values. +func NewAndroidForWorkEasEmailProfileBase()(*AndroidForWorkEasEmailProfileBase) { + m := &AndroidForWorkEasEmailProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkEasEmailProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkEasEmailProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEasEmailProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkGmailEasConfiguration": + return NewAndroidForWorkGmailEasConfiguration(), nil + case "#microsoft.graph.androidForWorkNineWorkEasConfiguration": + return NewAndroidForWorkNineWorkEasConfiguration(), nil + } + } + } + } + return NewAndroidForWorkEasEmailProfileBase(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidForWorkEasEmailProfileBase) GetAuthenticationMethod()(*EasAuthenticationMethod) { + return m.authenticationMethod +} +// GetDurationOfEmailToSync gets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidForWorkEasEmailProfileBase) GetDurationOfEmailToSync()(*EmailSyncDuration) { + return m.durationOfEmailToSync +} +// GetEmailAddressSource gets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidForWorkEasEmailProfileBase) GetEmailAddressSource()(*UserEmailSource) { + return m.emailAddressSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEasEmailProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEasAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*EasAuthenticationMethod)) + } + return nil + } + res["durationOfEmailToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailSyncDuration) + if err != nil { + return err + } + if val != nil { + m.SetDurationOfEmailToSync(val.(*EmailSyncDuration)) + } + return nil + } + res["emailAddressSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserEmailSource) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddressSource(val.(*UserEmailSource)) + } + return nil + } + res["hostName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostName(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidForWorkCertificateProfileBaseable)) + } + return nil + } + res["requireSsl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSsl(val) + } + return nil + } + res["usernameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidUsernameSource) + if err != nil { + return err + } + if val != nil { + m.SetUsernameSource(val.(*AndroidUsernameSource)) + } + return nil + } + return res +} +// GetHostName gets the hostName property value. Exchange location (URL) that the mail app connects to. +func (m *AndroidForWorkEasEmailProfileBase) GetHostName()(*string) { + return m.hostName +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate. +func (m *AndroidForWorkEasEmailProfileBase) GetIdentityCertificate()(AndroidForWorkCertificateProfileBaseable) { + return m.identityCertificate +} +// GetRequireSsl gets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidForWorkEasEmailProfileBase) GetRequireSsl()(*bool) { + return m.requireSsl +} +// GetUsernameSource gets the usernameSource property value. Android username source. +func (m *AndroidForWorkEasEmailProfileBase) GetUsernameSource()(*AndroidUsernameSource) { + return m.usernameSource +} +// Serialize serializes information the current object +func (m *AndroidForWorkEasEmailProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetDurationOfEmailToSync() != nil { + cast := (*m.GetDurationOfEmailToSync()).String() + err = writer.WriteStringValue("durationOfEmailToSync", &cast) + if err != nil { + return err + } + } + if m.GetEmailAddressSource() != nil { + cast := (*m.GetEmailAddressSource()).String() + err = writer.WriteStringValue("emailAddressSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hostName", m.GetHostName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSsl", m.GetRequireSsl()) + if err != nil { + return err + } + } + if m.GetUsernameSource() != nil { + cast := (*m.GetUsernameSource()).String() + err = writer.WriteStringValue("usernameSource", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidForWorkEasEmailProfileBase) SetAuthenticationMethod(value *EasAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetDurationOfEmailToSync sets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidForWorkEasEmailProfileBase) SetDurationOfEmailToSync(value *EmailSyncDuration)() { + m.durationOfEmailToSync = value +} +// SetEmailAddressSource sets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidForWorkEasEmailProfileBase) SetEmailAddressSource(value *UserEmailSource)() { + m.emailAddressSource = value +} +// SetHostName sets the hostName property value. Exchange location (URL) that the mail app connects to. +func (m *AndroidForWorkEasEmailProfileBase) SetHostName(value *string)() { + m.hostName = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate. +func (m *AndroidForWorkEasEmailProfileBase) SetIdentityCertificate(value AndroidForWorkCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetRequireSsl sets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidForWorkEasEmailProfileBase) SetRequireSsl(value *bool)() { + m.requireSsl = value +} +// SetUsernameSource sets the usernameSource property value. Android username source. +func (m *AndroidForWorkEasEmailProfileBase) SetUsernameSource(value *AndroidUsernameSource)() { + m.usernameSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_response.go new file mode 100644 index 000000000..639a18c7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEasEmailProfileBaseCollectionResponse +type AndroidForWorkEasEmailProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkEasEmailProfileBaseable +} +// NewAndroidForWorkEasEmailProfileBaseCollectionResponse instantiates a new AndroidForWorkEasEmailProfileBaseCollectionResponse and sets the default values. +func NewAndroidForWorkEasEmailProfileBaseCollectionResponse()(*AndroidForWorkEasEmailProfileBaseCollectionResponse) { + m := &AndroidForWorkEasEmailProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkEasEmailProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEasEmailProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkEasEmailProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEasEmailProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkEasEmailProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkEasEmailProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkEasEmailProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkEasEmailProfileBaseCollectionResponse) GetValue()([]AndroidForWorkEasEmailProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkEasEmailProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkEasEmailProfileBaseCollectionResponse) SetValue(value []AndroidForWorkEasEmailProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_responseable.go new file mode 100644 index 000000000..cd619d7a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEasEmailProfileBaseCollectionResponseable +type AndroidForWorkEasEmailProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkEasEmailProfileBaseable) + SetValue(value []AndroidForWorkEasEmailProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_baseable.go new file mode 100644 index 000000000..5e8ed740c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_eas_email_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEasEmailProfileBaseable +type AndroidForWorkEasEmailProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*EasAuthenticationMethod) + GetDurationOfEmailToSync()(*EmailSyncDuration) + GetEmailAddressSource()(*UserEmailSource) + GetHostName()(*string) + GetIdentityCertificate()(AndroidForWorkCertificateProfileBaseable) + GetRequireSsl()(*bool) + GetUsernameSource()(*AndroidUsernameSource) + SetAuthenticationMethod(value *EasAuthenticationMethod)() + SetDurationOfEmailToSync(value *EmailSyncDuration)() + SetEmailAddressSource(value *UserEmailSource)() + SetHostName(value *string)() + SetIdentityCertificate(value AndroidForWorkCertificateProfileBaseable)() + SetRequireSsl(value *bool)() + SetUsernameSource(value *AndroidUsernameSource)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile.go new file mode 100644 index 000000000..b808b9307 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile.go @@ -0,0 +1,295 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnrollmentProfile enrollment Profile used to enroll COSU devices using Google's Cloud Management. +type AndroidForWorkEnrollmentProfile struct { + Entity + // Tenant GUID the enrollment profile belongs to. + accountId *string + // Date time the enrollment profile was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description for the enrollment profile. + description *string + // Display name for the enrollment profile. + displayName *string + // Total number of Android devices that have enrolled using this enrollment profile. + enrolledDeviceCount *int32 + // Date time the enrollment profile was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // String used to generate a QR code for the token. + qrCodeContent *string + // String used to generate a QR code for the token. + qrCodeImage MimeContentable + // Date time the most recently created token will expire. + tokenExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Value of the most recently created token for this enrollment profile. + tokenValue *string +} +// NewAndroidForWorkEnrollmentProfile instantiates a new androidForWorkEnrollmentProfile and sets the default values. +func NewAndroidForWorkEnrollmentProfile()(*AndroidForWorkEnrollmentProfile) { + m := &AndroidForWorkEnrollmentProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidForWorkEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkEnrollmentProfile(), nil +} +// GetAccountId gets the accountId property value. Tenant GUID the enrollment profile belongs to. +func (m *AndroidForWorkEnrollmentProfile) GetAccountId()(*string) { + return m.accountId +} +// GetCreatedDateTime gets the createdDateTime property value. Date time the enrollment profile was created. +func (m *AndroidForWorkEnrollmentProfile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description for the enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetEnrolledDeviceCount gets the enrolledDeviceCount property value. Total number of Android devices that have enrolled using this enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) GetEnrolledDeviceCount()(*int32) { + return m.enrolledDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enrolledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledDeviceCount(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["qrCodeContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQrCodeContent(val) + } + return nil + } + res["qrCodeImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQrCodeImage(val.(MimeContentable)) + } + return nil + } + res["tokenExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpirationDateTime(val) + } + return nil + } + res["tokenValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenValue(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date time the enrollment profile was last modified. +func (m *AndroidForWorkEnrollmentProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetQrCodeContent gets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidForWorkEnrollmentProfile) GetQrCodeContent()(*string) { + return m.qrCodeContent +} +// GetQrCodeImage gets the qrCodeImage property value. String used to generate a QR code for the token. +func (m *AndroidForWorkEnrollmentProfile) GetQrCodeImage()(MimeContentable) { + return m.qrCodeImage +} +// GetTokenExpirationDateTime gets the tokenExpirationDateTime property value. Date time the most recently created token will expire. +func (m *AndroidForWorkEnrollmentProfile) GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.tokenExpirationDateTime +} +// GetTokenValue gets the tokenValue property value. Value of the most recently created token for this enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) GetTokenValue()(*string) { + return m.tokenValue +} +// Serialize serializes information the current object +func (m *AndroidForWorkEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("enrolledDeviceCount", m.GetEnrolledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("qrCodeContent", m.GetQrCodeContent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("qrCodeImage", m.GetQrCodeImage()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("tokenExpirationDateTime", m.GetTokenExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tokenValue", m.GetTokenValue()) + if err != nil { + return err + } + } + return nil +} +// SetAccountId sets the accountId property value. Tenant GUID the enrollment profile belongs to. +func (m *AndroidForWorkEnrollmentProfile) SetAccountId(value *string)() { + m.accountId = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date time the enrollment profile was created. +func (m *AndroidForWorkEnrollmentProfile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description for the enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnrolledDeviceCount sets the enrolledDeviceCount property value. Total number of Android devices that have enrolled using this enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) SetEnrolledDeviceCount(value *int32)() { + m.enrolledDeviceCount = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date time the enrollment profile was last modified. +func (m *AndroidForWorkEnrollmentProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetQrCodeContent sets the qrCodeContent property value. String used to generate a QR code for the token. +func (m *AndroidForWorkEnrollmentProfile) SetQrCodeContent(value *string)() { + m.qrCodeContent = value +} +// SetQrCodeImage sets the qrCodeImage property value. String used to generate a QR code for the token. +func (m *AndroidForWorkEnrollmentProfile) SetQrCodeImage(value MimeContentable)() { + m.qrCodeImage = value +} +// SetTokenExpirationDateTime sets the tokenExpirationDateTime property value. Date time the most recently created token will expire. +func (m *AndroidForWorkEnrollmentProfile) SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.tokenExpirationDateTime = value +} +// SetTokenValue sets the tokenValue property value. Value of the most recently created token for this enrollment profile. +func (m *AndroidForWorkEnrollmentProfile) SetTokenValue(value *string)() { + m.tokenValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_response.go new file mode 100644 index 000000000..4e0dfa8c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnrollmentProfileCollectionResponse +type AndroidForWorkEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkEnrollmentProfileable +} +// NewAndroidForWorkEnrollmentProfileCollectionResponse instantiates a new AndroidForWorkEnrollmentProfileCollectionResponse and sets the default values. +func NewAndroidForWorkEnrollmentProfileCollectionResponse()(*AndroidForWorkEnrollmentProfileCollectionResponse) { + m := &AndroidForWorkEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkEnrollmentProfileCollectionResponse) GetValue()([]AndroidForWorkEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkEnrollmentProfileCollectionResponse) SetValue(value []AndroidForWorkEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..b602a583e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnrollmentProfileCollectionResponseable +type AndroidForWorkEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkEnrollmentProfileable) + SetValue(value []AndroidForWorkEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profileable.go new file mode 100644 index 000000000..7694f53f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_profileable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnrollmentProfileable +type AndroidForWorkEnrollmentProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetEnrolledDeviceCount()(*int32) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetQrCodeContent()(*string) + GetQrCodeImage()(MimeContentable) + GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTokenValue()(*string) + SetAccountId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEnrolledDeviceCount(value *int32)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetQrCodeContent(value *string)() + SetQrCodeImage(value MimeContentable)() + SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTokenValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_target.go b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_target.go new file mode 100644 index 000000000..335c3a12a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enrollment_target.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkEnrollmentTarget int + +const ( + NONE_ANDROIDFORWORKENROLLMENTTARGET AndroidForWorkEnrollmentTarget = iota + ALL_ANDROIDFORWORKENROLLMENTTARGET + TARGETED_ANDROIDFORWORKENROLLMENTTARGET + TARGETEDASENROLLMENTRESTRICTIONS_ANDROIDFORWORKENROLLMENTTARGET +) + +func (i AndroidForWorkEnrollmentTarget) String() string { + return []string{"none", "all", "targeted", "targetedAsEnrollmentRestrictions"}[i] +} +func ParseAndroidForWorkEnrollmentTarget(v string) (interface{}, error) { + result := NONE_ANDROIDFORWORKENROLLMENTTARGET + switch v { + case "none": + result = NONE_ANDROIDFORWORKENROLLMENTTARGET + case "all": + result = ALL_ANDROIDFORWORKENROLLMENTTARGET + case "targeted": + result = TARGETED_ANDROIDFORWORKENROLLMENTTARGET + case "targetedAsEnrollmentRestrictions": + result = TARGETEDASENROLLMENTRESTRICTIONS_ANDROIDFORWORKENROLLMENTTARGET + default: + return 0, errors.New("Unknown AndroidForWorkEnrollmentTarget value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkEnrollmentTarget(values []AndroidForWorkEnrollmentTarget) []string { + 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/android_for_work_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..b0958ef49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnterpriseWiFiConfiguration +type AndroidForWorkEnterpriseWiFiConfiguration struct { + AndroidForWorkWiFiConfiguration + // Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Extensible Authentication Protocol (EAP) Configuration Types. + eapType *AndroidEapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. + identityCertificateForClientAuthentication AndroidForWorkCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. + innerAuthenticationProtocolForPeap *NonEapAuthenticationMethodForPeap + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. + outerIdentityPrivacyTemporaryValue *string + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. + rootCertificateForServerValidation AndroidForWorkTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string +} +// NewAndroidForWorkEnterpriseWiFiConfiguration instantiates a new AndroidForWorkEnterpriseWiFiConfiguration and sets the default values. +func NewAndroidForWorkEnterpriseWiFiConfiguration()(*AndroidForWorkEnterpriseWiFiConfiguration) { + m := &AndroidForWorkEnterpriseWiFiConfiguration{ + AndroidForWorkWiFiConfiguration: *NewAndroidForWorkWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetEapType()(*AndroidEapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidForWorkWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*AndroidEapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(AndroidForWorkCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["innerAuthenticationProtocolForPeap"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForPeap) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForPeap(val.(*NonEapAuthenticationMethodForPeap)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(AndroidForWorkTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(AndroidForWorkCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetInnerAuthenticationProtocolForPeap gets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) { + return m.innerAuthenticationProtocolForPeap +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(AndroidForWorkTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *AndroidForWorkEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidForWorkWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForPeap() != nil { + cast := (*m.GetInnerAuthenticationProtocolForPeap()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForPeap", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetEapType(value *AndroidEapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value AndroidForWorkCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetInnerAuthenticationProtocolForPeap sets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() { + m.innerAuthenticationProtocolForPeap = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value AndroidForWorkTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidForWorkEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..e0a0bd765 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse +type AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkEnterpriseWiFiConfigurationable +} +// NewAndroidForWorkEnterpriseWiFiConfigurationCollectionResponse instantiates a new AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkEnterpriseWiFiConfigurationCollectionResponse()(*AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse) { + m := &AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]AndroidForWorkEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []AndroidForWorkEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..cc8c96270 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnterpriseWiFiConfigurationCollectionResponseable +type AndroidForWorkEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkEnterpriseWiFiConfigurationable) + SetValue(value []AndroidForWorkEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..325483dd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_enterprise_wi_fi_configurationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkEnterpriseWiFiConfigurationable +type AndroidForWorkEnterpriseWiFiConfigurationable interface { + AndroidForWorkWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapType()(*AndroidEapType) + GetIdentityCertificateForClientAuthentication()(AndroidForWorkCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetRootCertificateForServerValidation()(AndroidForWorkTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapType(value *AndroidEapType)() + SetIdentityCertificateForClientAuthentication(value AndroidForWorkCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetRootCertificateForServerValidation(value AndroidForWorkTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration.go new file mode 100644 index 000000000..fde33efad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration.go @@ -0,0 +1,1186 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGeneralDeviceConfiguration +type AndroidForWorkGeneralDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not to block face unlock. + passwordBlockFaceUnlock *bool + // Indicates whether or not to block fingerprint unlock. + passwordBlockFingerprintUnlock *bool + // Indicates whether or not to block iris unlock. + passwordBlockIrisUnlock *bool + // Indicates whether or not to block Smart Lock and other trust agents. + passwordBlockTrustAgents *bool + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum length of passwords. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous passwords to block. Valid values 0 to 24 + passwordPreviousPasswordBlockCount *int32 + // Android For Work required password type. + passwordRequiredType *AndroidForWorkRequiredPasswordType + // Number of sign in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Enable lockdown mode for always-on VPN. + vpnAlwaysOnPackageIdentifier *string + // Enable lockdown mode for always-on VPN. + vpnEnableAlwaysOnLockdownMode *bool + // Allow widgets from work profile apps. + workProfileAllowWidgets *bool + // Block users from adding/removing accounts in work profile. + workProfileBlockAddingAccounts *bool + // Block work profile camera. + workProfileBlockCamera *bool + // Block display work profile caller ID in personal profile. + workProfileBlockCrossProfileCallerId *bool + // Block work profile contacts availability in personal profile. + workProfileBlockCrossProfileContactsSearch *bool + // Boolean that indicates if the setting disallow cross profile copy/paste is enabled. + workProfileBlockCrossProfileCopyPaste *bool + // Indicates whether or not to block notifications while device locked. + workProfileBlockNotificationsWhileDeviceLocked *bool + // Prevent app installations from unknown sources in the personal profile. + workProfileBlockPersonalAppInstallsFromUnknownSources *bool + // Block screen capture in work profile. + workProfileBlockScreenCapture *bool + // Allow bluetooth devices to access enterprise contacts. + workProfileBluetoothEnableContactSharing *bool + // Android For Work cross profile data sharing type. + workProfileDataSharingType *AndroidForWorkCrossProfileDataSharingType + // Android For Work default app permission policy type. + workProfileDefaultAppPermissionPolicy *AndroidForWorkDefaultAppPermissionPolicyType + // Indicates whether or not to block face unlock for work profile. + workProfilePasswordBlockFaceUnlock *bool + // Indicates whether or not to block fingerprint unlock for work profile. + workProfilePasswordBlockFingerprintUnlock *bool + // Indicates whether or not to block iris unlock for work profile. + workProfilePasswordBlockIrisUnlock *bool + // Indicates whether or not to block Smart Lock and other trust agents for work profile. + workProfilePasswordBlockTrustAgents *bool + // Number of days before the work profile password expires. Valid values 1 to 365 + workProfilePasswordExpirationDays *int32 + // Minimum length of work profile password. Valid values 4 to 16 + workProfilePasswordMinimumLength *int32 + // Minimum # of letter characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinLetterCharacters *int32 + // Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinLowerCaseCharacters *int32 + // Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinNonLetterCharacters *int32 + // Minimum # of numeric characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinNumericCharacters *int32 + // Minimum # of symbols required in work profile password. Valid values 1 to 10 + workProfilePasswordMinSymbolCharacters *int32 + // Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinUpperCaseCharacters *int32 + // Minutes of inactivity before the screen times out. + workProfilePasswordMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous work profile passwords to block. Valid values 0 to 24 + workProfilePasswordPreviousPasswordBlockCount *int32 + // Android For Work required password type. + workProfilePasswordRequiredType *AndroidForWorkRequiredPasswordType + // Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 + workProfilePasswordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + workProfileRequiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Password is required or not for work profile + workProfileRequirePassword *bool +} +// NewAndroidForWorkGeneralDeviceConfiguration instantiates a new AndroidForWorkGeneralDeviceConfiguration and sets the default values. +func NewAndroidForWorkGeneralDeviceConfiguration()(*AndroidForWorkGeneralDeviceConfiguration) { + m := &AndroidForWorkGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkGeneralDeviceConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["passwordBlockFaceUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFaceUnlock(val) + } + return nil + } + res["passwordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFingerprintUnlock(val) + } + return nil + } + res["passwordBlockIrisUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockIrisUnlock(val) + } + return nil + } + res["passwordBlockTrustAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockTrustAgents(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidForWorkRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["vpnAlwaysOnPackageIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnAlwaysOnPackageIdentifier(val) + } + return nil + } + res["vpnEnableAlwaysOnLockdownMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnEnableAlwaysOnLockdownMode(val) + } + return nil + } + res["workProfileAllowWidgets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileAllowWidgets(val) + } + return nil + } + res["workProfileBlockAddingAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockAddingAccounts(val) + } + return nil + } + res["workProfileBlockCamera"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCamera(val) + } + return nil + } + res["workProfileBlockCrossProfileCallerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileCallerId(val) + } + return nil + } + res["workProfileBlockCrossProfileContactsSearch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileContactsSearch(val) + } + return nil + } + res["workProfileBlockCrossProfileCopyPaste"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileCopyPaste(val) + } + return nil + } + res["workProfileBlockNotificationsWhileDeviceLocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockNotificationsWhileDeviceLocked(val) + } + return nil + } + res["workProfileBlockPersonalAppInstallsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(val) + } + return nil + } + res["workProfileBlockScreenCapture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockScreenCapture(val) + } + return nil + } + res["workProfileBluetoothEnableContactSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBluetoothEnableContactSharing(val) + } + return nil + } + res["workProfileDataSharingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkCrossProfileDataSharingType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileDataSharingType(val.(*AndroidForWorkCrossProfileDataSharingType)) + } + return nil + } + res["workProfileDefaultAppPermissionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkDefaultAppPermissionPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileDefaultAppPermissionPolicy(val.(*AndroidForWorkDefaultAppPermissionPolicyType)) + } + return nil + } + res["workProfilePasswordBlockFaceUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockFaceUnlock(val) + } + return nil + } + res["workProfilePasswordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockFingerprintUnlock(val) + } + return nil + } + res["workProfilePasswordBlockIrisUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockIrisUnlock(val) + } + return nil + } + res["workProfilePasswordBlockTrustAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockTrustAgents(val) + } + return nil + } + res["workProfilePasswordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordExpirationDays(val) + } + return nil + } + res["workProfilePasswordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumLength(val) + } + return nil + } + res["workProfilePasswordMinLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinLowerCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinLowerCaseCharacters(val) + } + return nil + } + res["workProfilePasswordMinNonLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinNonLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinNumericCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinNumericCharacters(val) + } + return nil + } + res["workProfilePasswordMinSymbolCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinSymbolCharacters(val) + } + return nil + } + res["workProfilePasswordMinUpperCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinUpperCaseCharacters(val) + } + return nil + } + res["workProfilePasswordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["workProfilePasswordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["workProfilePasswordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordRequiredType(val.(*AndroidForWorkRequiredPasswordType)) + } + return nil + } + res["workProfilePasswordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["workProfileRequiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["workProfileRequirePassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileRequirePassword(val) + } + return nil + } + return res +} +// GetPasswordBlockFaceUnlock gets the passwordBlockFaceUnlock property value. Indicates whether or not to block face unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordBlockFaceUnlock()(*bool) { + return m.passwordBlockFaceUnlock +} +// GetPasswordBlockFingerprintUnlock gets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordBlockFingerprintUnlock()(*bool) { + return m.passwordBlockFingerprintUnlock +} +// GetPasswordBlockIrisUnlock gets the passwordBlockIrisUnlock property value. Indicates whether or not to block iris unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordBlockIrisUnlock()(*bool) { + return m.passwordBlockIrisUnlock +} +// GetPasswordBlockTrustAgents gets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordBlockTrustAgents()(*bool) { + return m.passwordBlockTrustAgents +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android For Work required password type. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordRequiredType()(*AndroidForWorkRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetVpnAlwaysOnPackageIdentifier gets the vpnAlwaysOnPackageIdentifier property value. Enable lockdown mode for always-on VPN. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetVpnAlwaysOnPackageIdentifier()(*string) { + return m.vpnAlwaysOnPackageIdentifier +} +// GetVpnEnableAlwaysOnLockdownMode gets the vpnEnableAlwaysOnLockdownMode property value. Enable lockdown mode for always-on VPN. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetVpnEnableAlwaysOnLockdownMode()(*bool) { + return m.vpnEnableAlwaysOnLockdownMode +} +// GetWorkProfileAllowWidgets gets the workProfileAllowWidgets property value. Allow widgets from work profile apps. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileAllowWidgets()(*bool) { + return m.workProfileAllowWidgets +} +// GetWorkProfileBlockAddingAccounts gets the workProfileBlockAddingAccounts property value. Block users from adding/removing accounts in work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockAddingAccounts()(*bool) { + return m.workProfileBlockAddingAccounts +} +// GetWorkProfileBlockCamera gets the workProfileBlockCamera property value. Block work profile camera. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockCamera()(*bool) { + return m.workProfileBlockCamera +} +// GetWorkProfileBlockCrossProfileCallerId gets the workProfileBlockCrossProfileCallerId property value. Block display work profile caller ID in personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileCallerId()(*bool) { + return m.workProfileBlockCrossProfileCallerId +} +// GetWorkProfileBlockCrossProfileContactsSearch gets the workProfileBlockCrossProfileContactsSearch property value. Block work profile contacts availability in personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileContactsSearch()(*bool) { + return m.workProfileBlockCrossProfileContactsSearch +} +// GetWorkProfileBlockCrossProfileCopyPaste gets the workProfileBlockCrossProfileCopyPaste property value. Boolean that indicates if the setting disallow cross profile copy/paste is enabled. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileCopyPaste()(*bool) { + return m.workProfileBlockCrossProfileCopyPaste +} +// GetWorkProfileBlockNotificationsWhileDeviceLocked gets the workProfileBlockNotificationsWhileDeviceLocked property value. Indicates whether or not to block notifications while device locked. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockNotificationsWhileDeviceLocked()(*bool) { + return m.workProfileBlockNotificationsWhileDeviceLocked +} +// GetWorkProfileBlockPersonalAppInstallsFromUnknownSources gets the workProfileBlockPersonalAppInstallsFromUnknownSources property value. Prevent app installations from unknown sources in the personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()(*bool) { + return m.workProfileBlockPersonalAppInstallsFromUnknownSources +} +// GetWorkProfileBlockScreenCapture gets the workProfileBlockScreenCapture property value. Block screen capture in work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBlockScreenCapture()(*bool) { + return m.workProfileBlockScreenCapture +} +// GetWorkProfileBluetoothEnableContactSharing gets the workProfileBluetoothEnableContactSharing property value. Allow bluetooth devices to access enterprise contacts. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileBluetoothEnableContactSharing()(*bool) { + return m.workProfileBluetoothEnableContactSharing +} +// GetWorkProfileDataSharingType gets the workProfileDataSharingType property value. Android For Work cross profile data sharing type. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileDataSharingType()(*AndroidForWorkCrossProfileDataSharingType) { + return m.workProfileDataSharingType +} +// GetWorkProfileDefaultAppPermissionPolicy gets the workProfileDefaultAppPermissionPolicy property value. Android For Work default app permission policy type. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileDefaultAppPermissionPolicy()(*AndroidForWorkDefaultAppPermissionPolicyType) { + return m.workProfileDefaultAppPermissionPolicy +} +// GetWorkProfilePasswordBlockFaceUnlock gets the workProfilePasswordBlockFaceUnlock property value. Indicates whether or not to block face unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordBlockFaceUnlock()(*bool) { + return m.workProfilePasswordBlockFaceUnlock +} +// GetWorkProfilePasswordBlockFingerprintUnlock gets the workProfilePasswordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordBlockFingerprintUnlock()(*bool) { + return m.workProfilePasswordBlockFingerprintUnlock +} +// GetWorkProfilePasswordBlockIrisUnlock gets the workProfilePasswordBlockIrisUnlock property value. Indicates whether or not to block iris unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordBlockIrisUnlock()(*bool) { + return m.workProfilePasswordBlockIrisUnlock +} +// GetWorkProfilePasswordBlockTrustAgents gets the workProfilePasswordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordBlockTrustAgents()(*bool) { + return m.workProfilePasswordBlockTrustAgents +} +// GetWorkProfilePasswordExpirationDays gets the workProfilePasswordExpirationDays property value. Number of days before the work profile password expires. Valid values 1 to 365 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordExpirationDays()(*int32) { + return m.workProfilePasswordExpirationDays +} +// GetWorkProfilePasswordMinimumLength gets the workProfilePasswordMinimumLength property value. Minimum length of work profile password. Valid values 4 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumLength()(*int32) { + return m.workProfilePasswordMinimumLength +} +// GetWorkProfilePasswordMinLetterCharacters gets the workProfilePasswordMinLetterCharacters property value. Minimum # of letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinLetterCharacters()(*int32) { + return m.workProfilePasswordMinLetterCharacters +} +// GetWorkProfilePasswordMinLowerCaseCharacters gets the workProfilePasswordMinLowerCaseCharacters property value. Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinLowerCaseCharacters()(*int32) { + return m.workProfilePasswordMinLowerCaseCharacters +} +// GetWorkProfilePasswordMinNonLetterCharacters gets the workProfilePasswordMinNonLetterCharacters property value. Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinNonLetterCharacters()(*int32) { + return m.workProfilePasswordMinNonLetterCharacters +} +// GetWorkProfilePasswordMinNumericCharacters gets the workProfilePasswordMinNumericCharacters property value. Minimum # of numeric characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinNumericCharacters()(*int32) { + return m.workProfilePasswordMinNumericCharacters +} +// GetWorkProfilePasswordMinSymbolCharacters gets the workProfilePasswordMinSymbolCharacters property value. Minimum # of symbols required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinSymbolCharacters()(*int32) { + return m.workProfilePasswordMinSymbolCharacters +} +// GetWorkProfilePasswordMinUpperCaseCharacters gets the workProfilePasswordMinUpperCaseCharacters property value. Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinUpperCaseCharacters()(*int32) { + return m.workProfilePasswordMinUpperCaseCharacters +} +// GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout gets the workProfilePasswordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.workProfilePasswordMinutesOfInactivityBeforeScreenTimeout +} +// GetWorkProfilePasswordPreviousPasswordBlockCount gets the workProfilePasswordPreviousPasswordBlockCount property value. Number of previous work profile passwords to block. Valid values 0 to 24 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordPreviousPasswordBlockCount()(*int32) { + return m.workProfilePasswordPreviousPasswordBlockCount +} +// GetWorkProfilePasswordRequiredType gets the workProfilePasswordRequiredType property value. Android For Work required password type. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordRequiredType()(*AndroidForWorkRequiredPasswordType) { + return m.workProfilePasswordRequiredType +} +// GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset gets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.workProfilePasswordSignInFailureCountBeforeFactoryReset +} +// GetWorkProfileRequiredPasswordComplexity gets the workProfileRequiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.workProfileRequiredPasswordComplexity +} +// GetWorkProfileRequirePassword gets the workProfileRequirePassword property value. Password is required or not for work profile +func (m *AndroidForWorkGeneralDeviceConfiguration) GetWorkProfileRequirePassword()(*bool) { + return m.workProfileRequirePassword +} +// Serialize serializes information the current object +func (m *AndroidForWorkGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("passwordBlockFaceUnlock", m.GetPasswordBlockFaceUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockFingerprintUnlock", m.GetPasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockIrisUnlock", m.GetPasswordBlockIrisUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockTrustAgents", m.GetPasswordBlockTrustAgents()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnAlwaysOnPackageIdentifier", m.GetVpnAlwaysOnPackageIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("vpnEnableAlwaysOnLockdownMode", m.GetVpnEnableAlwaysOnLockdownMode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileAllowWidgets", m.GetWorkProfileAllowWidgets()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockAddingAccounts", m.GetWorkProfileBlockAddingAccounts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCamera", m.GetWorkProfileBlockCamera()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileCallerId", m.GetWorkProfileBlockCrossProfileCallerId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileContactsSearch", m.GetWorkProfileBlockCrossProfileContactsSearch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileCopyPaste", m.GetWorkProfileBlockCrossProfileCopyPaste()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockNotificationsWhileDeviceLocked", m.GetWorkProfileBlockNotificationsWhileDeviceLocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockPersonalAppInstallsFromUnknownSources", m.GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockScreenCapture", m.GetWorkProfileBlockScreenCapture()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBluetoothEnableContactSharing", m.GetWorkProfileBluetoothEnableContactSharing()) + if err != nil { + return err + } + } + if m.GetWorkProfileDataSharingType() != nil { + cast := (*m.GetWorkProfileDataSharingType()).String() + err = writer.WriteStringValue("workProfileDataSharingType", &cast) + if err != nil { + return err + } + } + if m.GetWorkProfileDefaultAppPermissionPolicy() != nil { + cast := (*m.GetWorkProfileDefaultAppPermissionPolicy()).String() + err = writer.WriteStringValue("workProfileDefaultAppPermissionPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockFaceUnlock", m.GetWorkProfilePasswordBlockFaceUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockFingerprintUnlock", m.GetWorkProfilePasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockIrisUnlock", m.GetWorkProfilePasswordBlockIrisUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockTrustAgents", m.GetWorkProfilePasswordBlockTrustAgents()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordExpirationDays", m.GetWorkProfilePasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumLength", m.GetWorkProfilePasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinLetterCharacters", m.GetWorkProfilePasswordMinLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinLowerCaseCharacters", m.GetWorkProfilePasswordMinLowerCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinNonLetterCharacters", m.GetWorkProfilePasswordMinNonLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinNumericCharacters", m.GetWorkProfilePasswordMinNumericCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinSymbolCharacters", m.GetWorkProfilePasswordMinSymbolCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinUpperCaseCharacters", m.GetWorkProfilePasswordMinUpperCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinutesOfInactivityBeforeScreenTimeout", m.GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordPreviousPasswordBlockCount", m.GetWorkProfilePasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + if m.GetWorkProfilePasswordRequiredType() != nil { + cast := (*m.GetWorkProfilePasswordRequiredType()).String() + err = writer.WriteStringValue("workProfilePasswordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordSignInFailureCountBeforeFactoryReset", m.GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetWorkProfileRequiredPasswordComplexity() != nil { + cast := (*m.GetWorkProfileRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("workProfileRequiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileRequirePassword", m.GetWorkProfileRequirePassword()) + if err != nil { + return err + } + } + return nil +} +// SetPasswordBlockFaceUnlock sets the passwordBlockFaceUnlock property value. Indicates whether or not to block face unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordBlockFaceUnlock(value *bool)() { + m.passwordBlockFaceUnlock = value +} +// SetPasswordBlockFingerprintUnlock sets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordBlockFingerprintUnlock(value *bool)() { + m.passwordBlockFingerprintUnlock = value +} +// SetPasswordBlockIrisUnlock sets the passwordBlockIrisUnlock property value. Indicates whether or not to block iris unlock. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordBlockIrisUnlock(value *bool)() { + m.passwordBlockIrisUnlock = value +} +// SetPasswordBlockTrustAgents sets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordBlockTrustAgents(value *bool)() { + m.passwordBlockTrustAgents = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android For Work required password type. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordRequiredType(value *AndroidForWorkRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetVpnAlwaysOnPackageIdentifier sets the vpnAlwaysOnPackageIdentifier property value. Enable lockdown mode for always-on VPN. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetVpnAlwaysOnPackageIdentifier(value *string)() { + m.vpnAlwaysOnPackageIdentifier = value +} +// SetVpnEnableAlwaysOnLockdownMode sets the vpnEnableAlwaysOnLockdownMode property value. Enable lockdown mode for always-on VPN. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetVpnEnableAlwaysOnLockdownMode(value *bool)() { + m.vpnEnableAlwaysOnLockdownMode = value +} +// SetWorkProfileAllowWidgets sets the workProfileAllowWidgets property value. Allow widgets from work profile apps. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileAllowWidgets(value *bool)() { + m.workProfileAllowWidgets = value +} +// SetWorkProfileBlockAddingAccounts sets the workProfileBlockAddingAccounts property value. Block users from adding/removing accounts in work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockAddingAccounts(value *bool)() { + m.workProfileBlockAddingAccounts = value +} +// SetWorkProfileBlockCamera sets the workProfileBlockCamera property value. Block work profile camera. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockCamera(value *bool)() { + m.workProfileBlockCamera = value +} +// SetWorkProfileBlockCrossProfileCallerId sets the workProfileBlockCrossProfileCallerId property value. Block display work profile caller ID in personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileCallerId(value *bool)() { + m.workProfileBlockCrossProfileCallerId = value +} +// SetWorkProfileBlockCrossProfileContactsSearch sets the workProfileBlockCrossProfileContactsSearch property value. Block work profile contacts availability in personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileContactsSearch(value *bool)() { + m.workProfileBlockCrossProfileContactsSearch = value +} +// SetWorkProfileBlockCrossProfileCopyPaste sets the workProfileBlockCrossProfileCopyPaste property value. Boolean that indicates if the setting disallow cross profile copy/paste is enabled. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileCopyPaste(value *bool)() { + m.workProfileBlockCrossProfileCopyPaste = value +} +// SetWorkProfileBlockNotificationsWhileDeviceLocked sets the workProfileBlockNotificationsWhileDeviceLocked property value. Indicates whether or not to block notifications while device locked. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockNotificationsWhileDeviceLocked(value *bool)() { + m.workProfileBlockNotificationsWhileDeviceLocked = value +} +// SetWorkProfileBlockPersonalAppInstallsFromUnknownSources sets the workProfileBlockPersonalAppInstallsFromUnknownSources property value. Prevent app installations from unknown sources in the personal profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(value *bool)() { + m.workProfileBlockPersonalAppInstallsFromUnknownSources = value +} +// SetWorkProfileBlockScreenCapture sets the workProfileBlockScreenCapture property value. Block screen capture in work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBlockScreenCapture(value *bool)() { + m.workProfileBlockScreenCapture = value +} +// SetWorkProfileBluetoothEnableContactSharing sets the workProfileBluetoothEnableContactSharing property value. Allow bluetooth devices to access enterprise contacts. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileBluetoothEnableContactSharing(value *bool)() { + m.workProfileBluetoothEnableContactSharing = value +} +// SetWorkProfileDataSharingType sets the workProfileDataSharingType property value. Android For Work cross profile data sharing type. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileDataSharingType(value *AndroidForWorkCrossProfileDataSharingType)() { + m.workProfileDataSharingType = value +} +// SetWorkProfileDefaultAppPermissionPolicy sets the workProfileDefaultAppPermissionPolicy property value. Android For Work default app permission policy type. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileDefaultAppPermissionPolicy(value *AndroidForWorkDefaultAppPermissionPolicyType)() { + m.workProfileDefaultAppPermissionPolicy = value +} +// SetWorkProfilePasswordBlockFaceUnlock sets the workProfilePasswordBlockFaceUnlock property value. Indicates whether or not to block face unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordBlockFaceUnlock(value *bool)() { + m.workProfilePasswordBlockFaceUnlock = value +} +// SetWorkProfilePasswordBlockFingerprintUnlock sets the workProfilePasswordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordBlockFingerprintUnlock(value *bool)() { + m.workProfilePasswordBlockFingerprintUnlock = value +} +// SetWorkProfilePasswordBlockIrisUnlock sets the workProfilePasswordBlockIrisUnlock property value. Indicates whether or not to block iris unlock for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordBlockIrisUnlock(value *bool)() { + m.workProfilePasswordBlockIrisUnlock = value +} +// SetWorkProfilePasswordBlockTrustAgents sets the workProfilePasswordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents for work profile. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordBlockTrustAgents(value *bool)() { + m.workProfilePasswordBlockTrustAgents = value +} +// SetWorkProfilePasswordExpirationDays sets the workProfilePasswordExpirationDays property value. Number of days before the work profile password expires. Valid values 1 to 365 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordExpirationDays(value *int32)() { + m.workProfilePasswordExpirationDays = value +} +// SetWorkProfilePasswordMinimumLength sets the workProfilePasswordMinimumLength property value. Minimum length of work profile password. Valid values 4 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumLength(value *int32)() { + m.workProfilePasswordMinimumLength = value +} +// SetWorkProfilePasswordMinLetterCharacters sets the workProfilePasswordMinLetterCharacters property value. Minimum # of letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinLetterCharacters(value *int32)() { + m.workProfilePasswordMinLetterCharacters = value +} +// SetWorkProfilePasswordMinLowerCaseCharacters sets the workProfilePasswordMinLowerCaseCharacters property value. Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinLowerCaseCharacters(value *int32)() { + m.workProfilePasswordMinLowerCaseCharacters = value +} +// SetWorkProfilePasswordMinNonLetterCharacters sets the workProfilePasswordMinNonLetterCharacters property value. Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinNonLetterCharacters(value *int32)() { + m.workProfilePasswordMinNonLetterCharacters = value +} +// SetWorkProfilePasswordMinNumericCharacters sets the workProfilePasswordMinNumericCharacters property value. Minimum # of numeric characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinNumericCharacters(value *int32)() { + m.workProfilePasswordMinNumericCharacters = value +} +// SetWorkProfilePasswordMinSymbolCharacters sets the workProfilePasswordMinSymbolCharacters property value. Minimum # of symbols required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinSymbolCharacters(value *int32)() { + m.workProfilePasswordMinSymbolCharacters = value +} +// SetWorkProfilePasswordMinUpperCaseCharacters sets the workProfilePasswordMinUpperCaseCharacters property value. Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinUpperCaseCharacters(value *int32)() { + m.workProfilePasswordMinUpperCaseCharacters = value +} +// SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout sets the workProfilePasswordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetWorkProfilePasswordPreviousPasswordBlockCount sets the workProfilePasswordPreviousPasswordBlockCount property value. Number of previous work profile passwords to block. Valid values 0 to 24 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordPreviousPasswordBlockCount(value *int32)() { + m.workProfilePasswordPreviousPasswordBlockCount = value +} +// SetWorkProfilePasswordRequiredType sets the workProfilePasswordRequiredType property value. Android For Work required password type. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordRequiredType(value *AndroidForWorkRequiredPasswordType)() { + m.workProfilePasswordRequiredType = value +} +// SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset sets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.workProfilePasswordSignInFailureCountBeforeFactoryReset = value +} +// SetWorkProfileRequiredPasswordComplexity sets the workProfileRequiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.workProfileRequiredPasswordComplexity = value +} +// SetWorkProfileRequirePassword sets the workProfileRequirePassword property value. Password is required or not for work profile +func (m *AndroidForWorkGeneralDeviceConfiguration) SetWorkProfileRequirePassword(value *bool)() { + m.workProfileRequirePassword = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_response.go new file mode 100644 index 000000000..5a2b23681 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGeneralDeviceConfigurationCollectionResponse +type AndroidForWorkGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkGeneralDeviceConfigurationable +} +// NewAndroidForWorkGeneralDeviceConfigurationCollectionResponse instantiates a new AndroidForWorkGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkGeneralDeviceConfigurationCollectionResponse()(*AndroidForWorkGeneralDeviceConfigurationCollectionResponse) { + m := &AndroidForWorkGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkGeneralDeviceConfigurationCollectionResponse) GetValue()([]AndroidForWorkGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkGeneralDeviceConfigurationCollectionResponse) SetValue(value []AndroidForWorkGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..513f95f0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGeneralDeviceConfigurationCollectionResponseable +type AndroidForWorkGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkGeneralDeviceConfigurationable) + SetValue(value []AndroidForWorkGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configurationable.go new file mode 100644 index 000000000..f95d39382 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_general_device_configurationable.go @@ -0,0 +1,99 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGeneralDeviceConfigurationable +type AndroidForWorkGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPasswordBlockFaceUnlock()(*bool) + GetPasswordBlockFingerprintUnlock()(*bool) + GetPasswordBlockIrisUnlock()(*bool) + GetPasswordBlockTrustAgents()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequiredType()(*AndroidForWorkRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetSecurityRequireVerifyApps()(*bool) + GetVpnAlwaysOnPackageIdentifier()(*string) + GetVpnEnableAlwaysOnLockdownMode()(*bool) + GetWorkProfileAllowWidgets()(*bool) + GetWorkProfileBlockAddingAccounts()(*bool) + GetWorkProfileBlockCamera()(*bool) + GetWorkProfileBlockCrossProfileCallerId()(*bool) + GetWorkProfileBlockCrossProfileContactsSearch()(*bool) + GetWorkProfileBlockCrossProfileCopyPaste()(*bool) + GetWorkProfileBlockNotificationsWhileDeviceLocked()(*bool) + GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()(*bool) + GetWorkProfileBlockScreenCapture()(*bool) + GetWorkProfileBluetoothEnableContactSharing()(*bool) + GetWorkProfileDataSharingType()(*AndroidForWorkCrossProfileDataSharingType) + GetWorkProfileDefaultAppPermissionPolicy()(*AndroidForWorkDefaultAppPermissionPolicyType) + GetWorkProfilePasswordBlockFaceUnlock()(*bool) + GetWorkProfilePasswordBlockFingerprintUnlock()(*bool) + GetWorkProfilePasswordBlockIrisUnlock()(*bool) + GetWorkProfilePasswordBlockTrustAgents()(*bool) + GetWorkProfilePasswordExpirationDays()(*int32) + GetWorkProfilePasswordMinimumLength()(*int32) + GetWorkProfilePasswordMinLetterCharacters()(*int32) + GetWorkProfilePasswordMinLowerCaseCharacters()(*int32) + GetWorkProfilePasswordMinNonLetterCharacters()(*int32) + GetWorkProfilePasswordMinNumericCharacters()(*int32) + GetWorkProfilePasswordMinSymbolCharacters()(*int32) + GetWorkProfilePasswordMinUpperCaseCharacters()(*int32) + GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetWorkProfilePasswordPreviousPasswordBlockCount()(*int32) + GetWorkProfilePasswordRequiredType()(*AndroidForWorkRequiredPasswordType) + GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetWorkProfileRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetWorkProfileRequirePassword()(*bool) + SetPasswordBlockFaceUnlock(value *bool)() + SetPasswordBlockFingerprintUnlock(value *bool)() + SetPasswordBlockIrisUnlock(value *bool)() + SetPasswordBlockTrustAgents(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequiredType(value *AndroidForWorkRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetSecurityRequireVerifyApps(value *bool)() + SetVpnAlwaysOnPackageIdentifier(value *string)() + SetVpnEnableAlwaysOnLockdownMode(value *bool)() + SetWorkProfileAllowWidgets(value *bool)() + SetWorkProfileBlockAddingAccounts(value *bool)() + SetWorkProfileBlockCamera(value *bool)() + SetWorkProfileBlockCrossProfileCallerId(value *bool)() + SetWorkProfileBlockCrossProfileContactsSearch(value *bool)() + SetWorkProfileBlockCrossProfileCopyPaste(value *bool)() + SetWorkProfileBlockNotificationsWhileDeviceLocked(value *bool)() + SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(value *bool)() + SetWorkProfileBlockScreenCapture(value *bool)() + SetWorkProfileBluetoothEnableContactSharing(value *bool)() + SetWorkProfileDataSharingType(value *AndroidForWorkCrossProfileDataSharingType)() + SetWorkProfileDefaultAppPermissionPolicy(value *AndroidForWorkDefaultAppPermissionPolicyType)() + SetWorkProfilePasswordBlockFaceUnlock(value *bool)() + SetWorkProfilePasswordBlockFingerprintUnlock(value *bool)() + SetWorkProfilePasswordBlockIrisUnlock(value *bool)() + SetWorkProfilePasswordBlockTrustAgents(value *bool)() + SetWorkProfilePasswordExpirationDays(value *int32)() + SetWorkProfilePasswordMinimumLength(value *int32)() + SetWorkProfilePasswordMinLetterCharacters(value *int32)() + SetWorkProfilePasswordMinLowerCaseCharacters(value *int32)() + SetWorkProfilePasswordMinNonLetterCharacters(value *int32)() + SetWorkProfilePasswordMinNumericCharacters(value *int32)() + SetWorkProfilePasswordMinSymbolCharacters(value *int32)() + SetWorkProfilePasswordMinUpperCaseCharacters(value *int32)() + SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetWorkProfilePasswordPreviousPasswordBlockCount(value *int32)() + SetWorkProfilePasswordRequiredType(value *AndroidForWorkRequiredPasswordType)() + SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetWorkProfileRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetWorkProfileRequirePassword(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration.go new file mode 100644 index 000000000..f750d3387 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGmailEasConfiguration +type AndroidForWorkGmailEasConfiguration struct { + AndroidForWorkEasEmailProfileBase +} +// NewAndroidForWorkGmailEasConfiguration instantiates a new AndroidForWorkGmailEasConfiguration and sets the default values. +func NewAndroidForWorkGmailEasConfiguration()(*AndroidForWorkGmailEasConfiguration) { + m := &AndroidForWorkGmailEasConfiguration{ + AndroidForWorkEasEmailProfileBase: *NewAndroidForWorkEasEmailProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidForWorkGmailEasConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkGmailEasConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkGmailEasConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkGmailEasConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkGmailEasConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidForWorkEasEmailProfileBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AndroidForWorkGmailEasConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidForWorkEasEmailProfileBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_response.go new file mode 100644 index 000000000..a58bf03c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGmailEasConfigurationCollectionResponse +type AndroidForWorkGmailEasConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkGmailEasConfigurationable +} +// NewAndroidForWorkGmailEasConfigurationCollectionResponse instantiates a new AndroidForWorkGmailEasConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkGmailEasConfigurationCollectionResponse()(*AndroidForWorkGmailEasConfigurationCollectionResponse) { + m := &AndroidForWorkGmailEasConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkGmailEasConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkGmailEasConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkGmailEasConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkGmailEasConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkGmailEasConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkGmailEasConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkGmailEasConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkGmailEasConfigurationCollectionResponse) GetValue()([]AndroidForWorkGmailEasConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkGmailEasConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkGmailEasConfigurationCollectionResponse) SetValue(value []AndroidForWorkGmailEasConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_responseable.go new file mode 100644 index 000000000..ba97a4e4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGmailEasConfigurationCollectionResponseable +type AndroidForWorkGmailEasConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkGmailEasConfigurationable) + SetValue(value []AndroidForWorkGmailEasConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configurationable.go new file mode 100644 index 000000000..11352599a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_gmail_eas_configurationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkGmailEasConfigurationable +type AndroidForWorkGmailEasConfigurationable interface { + AndroidForWorkEasEmailProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile.go new file mode 100644 index 000000000..bfeffb299 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkImportedPFXCertificateProfile +type AndroidForWorkImportedPFXCertificateProfile struct { + AndroidCertificateProfileBase + // PFX Import Options. + intendedPurpose *IntendedPurpose + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable +} +// NewAndroidForWorkImportedPFXCertificateProfile instantiates a new AndroidForWorkImportedPFXCertificateProfile and sets the default values. +func NewAndroidForWorkImportedPFXCertificateProfile()(*AndroidForWorkImportedPFXCertificateProfile) { + m := &AndroidForWorkImportedPFXCertificateProfile{ + AndroidCertificateProfileBase: *NewAndroidCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidForWorkImportedPFXCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkImportedPFXCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkImportedPFXCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkImportedPFXCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkImportedPFXCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidCertificateProfileBase.GetFieldDeserializers() + res["intendedPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIntendedPurpose) + if err != nil { + return err + } + if val != nil { + m.SetIntendedPurpose(val.(*IntendedPurpose)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + return res +} +// GetIntendedPurpose gets the intendedPurpose property value. PFX Import Options. +func (m *AndroidForWorkImportedPFXCertificateProfile) GetIntendedPurpose()(*IntendedPurpose) { + return m.intendedPurpose +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkImportedPFXCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// Serialize serializes information the current object +func (m *AndroidForWorkImportedPFXCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetIntendedPurpose() != nil { + cast := (*m.GetIntendedPurpose()).String() + err = writer.WriteStringValue("intendedPurpose", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetIntendedPurpose sets the intendedPurpose property value. PFX Import Options. +func (m *AndroidForWorkImportedPFXCertificateProfile) SetIntendedPurpose(value *IntendedPurpose)() { + m.intendedPurpose = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkImportedPFXCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_response.go new file mode 100644 index 000000000..362220f73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkImportedPFXCertificateProfileCollectionResponse +type AndroidForWorkImportedPFXCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkImportedPFXCertificateProfileable +} +// NewAndroidForWorkImportedPFXCertificateProfileCollectionResponse instantiates a new AndroidForWorkImportedPFXCertificateProfileCollectionResponse and sets the default values. +func NewAndroidForWorkImportedPFXCertificateProfileCollectionResponse()(*AndroidForWorkImportedPFXCertificateProfileCollectionResponse) { + m := &AndroidForWorkImportedPFXCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkImportedPFXCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkImportedPFXCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkImportedPFXCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkImportedPFXCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkImportedPFXCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkImportedPFXCertificateProfileCollectionResponse) GetValue()([]AndroidForWorkImportedPFXCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkImportedPFXCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkImportedPFXCertificateProfileCollectionResponse) SetValue(value []AndroidForWorkImportedPFXCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..22b5ec701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkImportedPFXCertificateProfileCollectionResponseable +type AndroidForWorkImportedPFXCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkImportedPFXCertificateProfileable) + SetValue(value []AndroidForWorkImportedPFXCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profileable.go new file mode 100644 index 000000000..79477f1bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_imported_p_f_x_certificate_profileable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkImportedPFXCertificateProfileable +type AndroidForWorkImportedPFXCertificateProfileable interface { + AndroidCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntendedPurpose()(*IntendedPurpose) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + SetIntendedPurpose(value *IntendedPurpose)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration.go new file mode 100644 index 000000000..f249ab319 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkMobileAppConfiguration +type AndroidForWorkMobileAppConfiguration struct { + ManagedDeviceMobileAppConfiguration + // Setting to specify whether to allow ConnectedApps experience for this app. + connectedAppsEnabled *bool + // Android For Work app configuration package id. + packageId *string + // Android For Work app configuration JSON payload. + payloadJson *string + // List of Android app permissions and corresponding permission actions. + permissionActions []AndroidPermissionActionable + // Android profile applicability + profileApplicability *AndroidProfileApplicability +} +// NewAndroidForWorkMobileAppConfiguration instantiates a new AndroidForWorkMobileAppConfiguration and sets the default values. +func NewAndroidForWorkMobileAppConfiguration()(*AndroidForWorkMobileAppConfiguration) { + m := &AndroidForWorkMobileAppConfiguration{ + ManagedDeviceMobileAppConfiguration: *NewManagedDeviceMobileAppConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkMobileAppConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkMobileAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkMobileAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkMobileAppConfiguration(), nil +} +// GetConnectedAppsEnabled gets the connectedAppsEnabled property value. Setting to specify whether to allow ConnectedApps experience for this app. +func (m *AndroidForWorkMobileAppConfiguration) GetConnectedAppsEnabled()(*bool) { + return m.connectedAppsEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkMobileAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedDeviceMobileAppConfiguration.GetFieldDeserializers() + res["connectedAppsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectedAppsEnabled(val) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["payloadJson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadJson(val) + } + return nil + } + res["permissionActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidPermissionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidPermissionActionable, len(val)) + for i, v := range val { + res[i] = v.(AndroidPermissionActionable) + } + m.SetPermissionActions(res) + } + return nil + } + res["profileApplicability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidProfileApplicability) + if err != nil { + return err + } + if val != nil { + m.SetProfileApplicability(val.(*AndroidProfileApplicability)) + } + return nil + } + return res +} +// GetPackageId gets the packageId property value. Android For Work app configuration package id. +func (m *AndroidForWorkMobileAppConfiguration) GetPackageId()(*string) { + return m.packageId +} +// GetPayloadJson gets the payloadJson property value. Android For Work app configuration JSON payload. +func (m *AndroidForWorkMobileAppConfiguration) GetPayloadJson()(*string) { + return m.payloadJson +} +// GetPermissionActions gets the permissionActions property value. List of Android app permissions and corresponding permission actions. +func (m *AndroidForWorkMobileAppConfiguration) GetPermissionActions()([]AndroidPermissionActionable) { + return m.permissionActions +} +// GetProfileApplicability gets the profileApplicability property value. Android profile applicability +func (m *AndroidForWorkMobileAppConfiguration) GetProfileApplicability()(*AndroidProfileApplicability) { + return m.profileApplicability +} +// Serialize serializes information the current object +func (m *AndroidForWorkMobileAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedDeviceMobileAppConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectedAppsEnabled", m.GetConnectedAppsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadJson", m.GetPayloadJson()) + if err != nil { + return err + } + } + if m.GetPermissionActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissionActions())) + for i, v := range m.GetPermissionActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissionActions", cast) + if err != nil { + return err + } + } + if m.GetProfileApplicability() != nil { + cast := (*m.GetProfileApplicability()).String() + err = writer.WriteStringValue("profileApplicability", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectedAppsEnabled sets the connectedAppsEnabled property value. Setting to specify whether to allow ConnectedApps experience for this app. +func (m *AndroidForWorkMobileAppConfiguration) SetConnectedAppsEnabled(value *bool)() { + m.connectedAppsEnabled = value +} +// SetPackageId sets the packageId property value. Android For Work app configuration package id. +func (m *AndroidForWorkMobileAppConfiguration) SetPackageId(value *string)() { + m.packageId = value +} +// SetPayloadJson sets the payloadJson property value. Android For Work app configuration JSON payload. +func (m *AndroidForWorkMobileAppConfiguration) SetPayloadJson(value *string)() { + m.payloadJson = value +} +// SetPermissionActions sets the permissionActions property value. List of Android app permissions and corresponding permission actions. +func (m *AndroidForWorkMobileAppConfiguration) SetPermissionActions(value []AndroidPermissionActionable)() { + m.permissionActions = value +} +// SetProfileApplicability sets the profileApplicability property value. Android profile applicability +func (m *AndroidForWorkMobileAppConfiguration) SetProfileApplicability(value *AndroidProfileApplicability)() { + m.profileApplicability = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_response.go new file mode 100644 index 000000000..01ad02683 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkMobileAppConfigurationCollectionResponse +type AndroidForWorkMobileAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkMobileAppConfigurationable +} +// NewAndroidForWorkMobileAppConfigurationCollectionResponse instantiates a new AndroidForWorkMobileAppConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkMobileAppConfigurationCollectionResponse()(*AndroidForWorkMobileAppConfigurationCollectionResponse) { + m := &AndroidForWorkMobileAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkMobileAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkMobileAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkMobileAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkMobileAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkMobileAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkMobileAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkMobileAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkMobileAppConfigurationCollectionResponse) GetValue()([]AndroidForWorkMobileAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkMobileAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkMobileAppConfigurationCollectionResponse) SetValue(value []AndroidForWorkMobileAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_responseable.go new file mode 100644 index 000000000..83f0c7c73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkMobileAppConfigurationCollectionResponseable +type AndroidForWorkMobileAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkMobileAppConfigurationable) + SetValue(value []AndroidForWorkMobileAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configurationable.go new file mode 100644 index 000000000..df1dea0ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_mobile_app_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkMobileAppConfigurationable +type AndroidForWorkMobileAppConfigurationable interface { + ManagedDeviceMobileAppConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectedAppsEnabled()(*bool) + GetPackageId()(*string) + GetPayloadJson()(*string) + GetPermissionActions()([]AndroidPermissionActionable) + GetProfileApplicability()(*AndroidProfileApplicability) + SetConnectedAppsEnabled(value *bool)() + SetPackageId(value *string)() + SetPayloadJson(value *string)() + SetPermissionActions(value []AndroidPermissionActionable)() + SetProfileApplicability(value *AndroidProfileApplicability)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration.go new file mode 100644 index 000000000..a91655abf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkNineWorkEasConfiguration +type AndroidForWorkNineWorkEasConfiguration struct { + AndroidForWorkEasEmailProfileBase + // Toggles syncing the calendar. If set to false the calendar is turned off on the device. + syncCalendar *bool + // Toggles syncing contacts. If set to false contacts are turned off on the device. + syncContacts *bool + // Toggles syncing tasks. If set to false tasks are turned off on the device. + syncTasks *bool +} +// NewAndroidForWorkNineWorkEasConfiguration instantiates a new AndroidForWorkNineWorkEasConfiguration and sets the default values. +func NewAndroidForWorkNineWorkEasConfiguration()(*AndroidForWorkNineWorkEasConfiguration) { + m := &AndroidForWorkNineWorkEasConfiguration{ + AndroidForWorkEasEmailProfileBase: *NewAndroidForWorkEasEmailProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidForWorkNineWorkEasConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkNineWorkEasConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkNineWorkEasConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkNineWorkEasConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkNineWorkEasConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidForWorkEasEmailProfileBase.GetFieldDeserializers() + res["syncCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncCalendar(val) + } + return nil + } + res["syncContacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncContacts(val) + } + return nil + } + res["syncTasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncTasks(val) + } + return nil + } + return res +} +// GetSyncCalendar gets the syncCalendar property value. Toggles syncing the calendar. If set to false the calendar is turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) GetSyncCalendar()(*bool) { + return m.syncCalendar +} +// GetSyncContacts gets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) GetSyncContacts()(*bool) { + return m.syncContacts +} +// GetSyncTasks gets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) GetSyncTasks()(*bool) { + return m.syncTasks +} +// Serialize serializes information the current object +func (m *AndroidForWorkNineWorkEasConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidForWorkEasEmailProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("syncCalendar", m.GetSyncCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncContacts", m.GetSyncContacts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncTasks", m.GetSyncTasks()) + if err != nil { + return err + } + } + return nil +} +// SetSyncCalendar sets the syncCalendar property value. Toggles syncing the calendar. If set to false the calendar is turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) SetSyncCalendar(value *bool)() { + m.syncCalendar = value +} +// SetSyncContacts sets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) SetSyncContacts(value *bool)() { + m.syncContacts = value +} +// SetSyncTasks sets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidForWorkNineWorkEasConfiguration) SetSyncTasks(value *bool)() { + m.syncTasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_response.go new file mode 100644 index 000000000..acc46d132 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkNineWorkEasConfigurationCollectionResponse +type AndroidForWorkNineWorkEasConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkNineWorkEasConfigurationable +} +// NewAndroidForWorkNineWorkEasConfigurationCollectionResponse instantiates a new AndroidForWorkNineWorkEasConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkNineWorkEasConfigurationCollectionResponse()(*AndroidForWorkNineWorkEasConfigurationCollectionResponse) { + m := &AndroidForWorkNineWorkEasConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkNineWorkEasConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkNineWorkEasConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkNineWorkEasConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkNineWorkEasConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkNineWorkEasConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkNineWorkEasConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkNineWorkEasConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkNineWorkEasConfigurationCollectionResponse) GetValue()([]AndroidForWorkNineWorkEasConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkNineWorkEasConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkNineWorkEasConfigurationCollectionResponse) SetValue(value []AndroidForWorkNineWorkEasConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_responseable.go new file mode 100644 index 000000000..80c4d493d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkNineWorkEasConfigurationCollectionResponseable +type AndroidForWorkNineWorkEasConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkNineWorkEasConfigurationable) + SetValue(value []AndroidForWorkNineWorkEasConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configurationable.go new file mode 100644 index 000000000..f060c74ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_nine_work_eas_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkNineWorkEasConfigurationable +type AndroidForWorkNineWorkEasConfigurationable interface { + AndroidForWorkEasEmailProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSyncCalendar()(*bool) + GetSyncContacts()(*bool) + GetSyncTasks()(*bool) + SetSyncCalendar(value *bool)() + SetSyncContacts(value *bool)() + SetSyncTasks(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile.go new file mode 100644 index 000000000..c42dec97b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkPkcsCertificateProfile +type AndroidForWorkPkcsCertificateProfile struct { + AndroidForWorkCertificateProfileBase + // PKCS Certificate Template Name + certificateTemplateName *string + // PKCS Certification Authority + certificationAuthority *string + // PKCS Certification Authority Name + certificationAuthorityName *string + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string +} +// NewAndroidForWorkPkcsCertificateProfile instantiates a new AndroidForWorkPkcsCertificateProfile and sets the default values. +func NewAndroidForWorkPkcsCertificateProfile()(*AndroidForWorkPkcsCertificateProfile) { + m := &AndroidForWorkPkcsCertificateProfile{ + AndroidForWorkCertificateProfileBase: *NewAndroidForWorkCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidForWorkPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkPkcsCertificateProfile(), nil +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidForWorkPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidForWorkPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidForWorkPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidForWorkCertificateProfileBase.GetFieldDeserializers() + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidForWorkPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidForWorkPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidForWorkCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidForWorkPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidForWorkPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidForWorkPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidForWorkPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..aa65172e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkPkcsCertificateProfileCollectionResponse +type AndroidForWorkPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkPkcsCertificateProfileable +} +// NewAndroidForWorkPkcsCertificateProfileCollectionResponse instantiates a new AndroidForWorkPkcsCertificateProfileCollectionResponse and sets the default values. +func NewAndroidForWorkPkcsCertificateProfileCollectionResponse()(*AndroidForWorkPkcsCertificateProfileCollectionResponse) { + m := &AndroidForWorkPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkPkcsCertificateProfileCollectionResponse) GetValue()([]AndroidForWorkPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkPkcsCertificateProfileCollectionResponse) SetValue(value []AndroidForWorkPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..d2ec903fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkPkcsCertificateProfileCollectionResponseable +type AndroidForWorkPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkPkcsCertificateProfileable) + SetValue(value []AndroidForWorkPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profileable.go new file mode 100644 index 000000000..6140bb3b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_pkcs_certificate_profileable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkPkcsCertificateProfileable +type AndroidForWorkPkcsCertificateProfileable interface { + AndroidForWorkCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_required_password_type.go b/src/internal/connector/graph/betasdk/models/android_for_work_required_password_type.go new file mode 100644 index 000000000..599c9502e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_required_password_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkRequiredPasswordType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDFORWORKREQUIREDPASSWORDTYPE AndroidForWorkRequiredPasswordType = iota + // Low security biometrics based password required. + LOWSECURITYBIOMETRIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // Required. + REQUIRED_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // At least numeric password required. + ATLEASTNUMERIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // Numeric complex password required. + NUMERICCOMPLEX_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // At least alphabetic password required. + ATLEASTALPHABETIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // At least alphanumeric password required. + ATLEASTALPHANUMERIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + // At least alphanumeric with symbols password required. + ALPHANUMERICWITHSYMBOLS_ANDROIDFORWORKREQUIREDPASSWORDTYPE +) + +func (i AndroidForWorkRequiredPasswordType) String() string { + return []string{"deviceDefault", "lowSecurityBiometric", "required", "atLeastNumeric", "numericComplex", "atLeastAlphabetic", "atLeastAlphanumeric", "alphanumericWithSymbols"}[i] +} +func ParseAndroidForWorkRequiredPasswordType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDFORWORKREQUIREDPASSWORDTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "lowSecurityBiometric": + result = LOWSECURITYBIOMETRIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "required": + result = REQUIRED_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "atLeastNumeric": + result = ATLEASTNUMERIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "numericComplex": + result = NUMERICCOMPLEX_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "atLeastAlphabetic": + result = ATLEASTALPHABETIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "atLeastAlphanumeric": + result = ATLEASTALPHANUMERIC_ANDROIDFORWORKREQUIREDPASSWORDTYPE + case "alphanumericWithSymbols": + result = ALPHANUMERICWITHSYMBOLS_ANDROIDFORWORKREQUIREDPASSWORDTYPE + default: + return 0, errors.New("Unknown AndroidForWorkRequiredPasswordType value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkRequiredPasswordType(values []AndroidForWorkRequiredPasswordType) []string { + 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/android_for_work_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile.go new file mode 100644 index 000000000..407fb29aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkScepCertificateProfile +type AndroidForWorkScepCertificateProfile struct { + AndroidForWorkCertificateProfileBase + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Hash Algorithm Options. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // SCEP Server Url(s) + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidForWorkScepCertificateProfile instantiates a new AndroidForWorkScepCertificateProfile and sets the default values. +func NewAndroidForWorkScepCertificateProfile()(*AndroidForWorkScepCertificateProfile) { + m := &AndroidForWorkScepCertificateProfile{ + AndroidForWorkCertificateProfileBase: *NewAndroidForWorkCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidForWorkScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkScepCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidForWorkScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidForWorkCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidForWorkScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *AndroidForWorkScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *AndroidForWorkScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidForWorkScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidForWorkScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidForWorkScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidForWorkScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidForWorkCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidForWorkScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetHashAlgorithm sets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidForWorkScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *AndroidForWorkScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *AndroidForWorkScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidForWorkScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidForWorkScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidForWorkScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidForWorkScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..12692d59d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkScepCertificateProfileCollectionResponse +type AndroidForWorkScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkScepCertificateProfileable +} +// NewAndroidForWorkScepCertificateProfileCollectionResponse instantiates a new AndroidForWorkScepCertificateProfileCollectionResponse and sets the default values. +func NewAndroidForWorkScepCertificateProfileCollectionResponse()(*AndroidForWorkScepCertificateProfileCollectionResponse) { + m := &AndroidForWorkScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkScepCertificateProfileCollectionResponse) GetValue()([]AndroidForWorkScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkScepCertificateProfileCollectionResponse) SetValue(value []AndroidForWorkScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..14a1b09d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkScepCertificateProfileCollectionResponseable +type AndroidForWorkScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkScepCertificateProfileable) + SetValue(value []AndroidForWorkScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profileable.go new file mode 100644 index 000000000..f60a470b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_scep_certificate_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkScepCertificateProfileable +type AndroidForWorkScepCertificateProfileable interface { + AndroidForWorkCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_settings.go b/src/internal/connector/graph/betasdk/models/android_for_work_settings.go new file mode 100644 index 000000000..3e7e1001e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_settings.go @@ -0,0 +1,276 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkSettings +type AndroidForWorkSettings struct { + Entity + // Bind status of the tenant with the Google EMM API + bindStatus *AndroidForWorkBindStatus + // Indicates if this account is flighting for Android Device Owner Management with CloudDPC. + deviceOwnerManagementEnabled *bool + // Android for Work device management targeting type for the account + enrollmentTarget *AndroidForWorkEnrollmentTarget + // Last completion time for app sync + lastAppSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Sync status of the tenant with the Google EMM API + lastAppSyncStatus *AndroidForWorkSyncStatus + // Last modification time for Android for Work settings + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Organization name used when onboarding Android for Work + ownerOrganizationName *string + // Owner UPN that created the enterprise + ownerUserPrincipalName *string + // Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' + targetGroupIds []string +} +// NewAndroidForWorkSettings instantiates a new androidForWorkSettings and sets the default values. +func NewAndroidForWorkSettings()(*AndroidForWorkSettings) { + m := &AndroidForWorkSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidForWorkSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkSettings(), nil +} +// GetBindStatus gets the bindStatus property value. Bind status of the tenant with the Google EMM API +func (m *AndroidForWorkSettings) GetBindStatus()(*AndroidForWorkBindStatus) { + return m.bindStatus +} +// GetDeviceOwnerManagementEnabled gets the deviceOwnerManagementEnabled property value. Indicates if this account is flighting for Android Device Owner Management with CloudDPC. +func (m *AndroidForWorkSettings) GetDeviceOwnerManagementEnabled()(*bool) { + return m.deviceOwnerManagementEnabled +} +// GetEnrollmentTarget gets the enrollmentTarget property value. Android for Work device management targeting type for the account +func (m *AndroidForWorkSettings) GetEnrollmentTarget()(*AndroidForWorkEnrollmentTarget) { + return m.enrollmentTarget +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["bindStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkBindStatus) + if err != nil { + return err + } + if val != nil { + m.SetBindStatus(val.(*AndroidForWorkBindStatus)) + } + return nil + } + res["deviceOwnerManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOwnerManagementEnabled(val) + } + return nil + } + res["enrollmentTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkEnrollmentTarget) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentTarget(val.(*AndroidForWorkEnrollmentTarget)) + } + return nil + } + res["lastAppSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastAppSyncDateTime(val) + } + return nil + } + res["lastAppSyncStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkSyncStatus) + if err != nil { + return err + } + if val != nil { + m.SetLastAppSyncStatus(val.(*AndroidForWorkSyncStatus)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["ownerOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerOrganizationName(val) + } + return nil + } + res["ownerUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerUserPrincipalName(val) + } + return nil + } + res["targetGroupIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetGroupIds(res) + } + return nil + } + return res +} +// GetLastAppSyncDateTime gets the lastAppSyncDateTime property value. Last completion time for app sync +func (m *AndroidForWorkSettings) GetLastAppSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastAppSyncDateTime +} +// GetLastAppSyncStatus gets the lastAppSyncStatus property value. Sync status of the tenant with the Google EMM API +func (m *AndroidForWorkSettings) GetLastAppSyncStatus()(*AndroidForWorkSyncStatus) { + return m.lastAppSyncStatus +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modification time for Android for Work settings +func (m *AndroidForWorkSettings) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOwnerOrganizationName gets the ownerOrganizationName property value. Organization name used when onboarding Android for Work +func (m *AndroidForWorkSettings) GetOwnerOrganizationName()(*string) { + return m.ownerOrganizationName +} +// GetOwnerUserPrincipalName gets the ownerUserPrincipalName property value. Owner UPN that created the enterprise +func (m *AndroidForWorkSettings) GetOwnerUserPrincipalName()(*string) { + return m.ownerUserPrincipalName +} +// GetTargetGroupIds gets the targetGroupIds property value. Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' +func (m *AndroidForWorkSettings) GetTargetGroupIds()([]string) { + return m.targetGroupIds +} +// Serialize serializes information the current object +func (m *AndroidForWorkSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBindStatus() != nil { + cast := (*m.GetBindStatus()).String() + err = writer.WriteStringValue("bindStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceOwnerManagementEnabled", m.GetDeviceOwnerManagementEnabled()) + if err != nil { + return err + } + } + if m.GetEnrollmentTarget() != nil { + cast := (*m.GetEnrollmentTarget()).String() + err = writer.WriteStringValue("enrollmentTarget", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastAppSyncDateTime", m.GetLastAppSyncDateTime()) + if err != nil { + return err + } + } + if m.GetLastAppSyncStatus() != nil { + cast := (*m.GetLastAppSyncStatus()).String() + err = writer.WriteStringValue("lastAppSyncStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerOrganizationName", m.GetOwnerOrganizationName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerUserPrincipalName", m.GetOwnerUserPrincipalName()) + if err != nil { + return err + } + } + if m.GetTargetGroupIds() != nil { + err = writer.WriteCollectionOfStringValues("targetGroupIds", m.GetTargetGroupIds()) + if err != nil { + return err + } + } + return nil +} +// SetBindStatus sets the bindStatus property value. Bind status of the tenant with the Google EMM API +func (m *AndroidForWorkSettings) SetBindStatus(value *AndroidForWorkBindStatus)() { + m.bindStatus = value +} +// SetDeviceOwnerManagementEnabled sets the deviceOwnerManagementEnabled property value. Indicates if this account is flighting for Android Device Owner Management with CloudDPC. +func (m *AndroidForWorkSettings) SetDeviceOwnerManagementEnabled(value *bool)() { + m.deviceOwnerManagementEnabled = value +} +// SetEnrollmentTarget sets the enrollmentTarget property value. Android for Work device management targeting type for the account +func (m *AndroidForWorkSettings) SetEnrollmentTarget(value *AndroidForWorkEnrollmentTarget)() { + m.enrollmentTarget = value +} +// SetLastAppSyncDateTime sets the lastAppSyncDateTime property value. Last completion time for app sync +func (m *AndroidForWorkSettings) SetLastAppSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastAppSyncDateTime = value +} +// SetLastAppSyncStatus sets the lastAppSyncStatus property value. Sync status of the tenant with the Google EMM API +func (m *AndroidForWorkSettings) SetLastAppSyncStatus(value *AndroidForWorkSyncStatus)() { + m.lastAppSyncStatus = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modification time for Android for Work settings +func (m *AndroidForWorkSettings) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOwnerOrganizationName sets the ownerOrganizationName property value. Organization name used when onboarding Android for Work +func (m *AndroidForWorkSettings) SetOwnerOrganizationName(value *string)() { + m.ownerOrganizationName = value +} +// SetOwnerUserPrincipalName sets the ownerUserPrincipalName property value. Owner UPN that created the enterprise +func (m *AndroidForWorkSettings) SetOwnerUserPrincipalName(value *string)() { + m.ownerUserPrincipalName = value +} +// SetTargetGroupIds sets the targetGroupIds property value. Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' +func (m *AndroidForWorkSettings) SetTargetGroupIds(value []string)() { + m.targetGroupIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_settingsable.go b/src/internal/connector/graph/betasdk/models/android_for_work_settingsable.go new file mode 100644 index 000000000..b78837697 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_settingsable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkSettingsable +type AndroidForWorkSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBindStatus()(*AndroidForWorkBindStatus) + GetDeviceOwnerManagementEnabled()(*bool) + GetEnrollmentTarget()(*AndroidForWorkEnrollmentTarget) + GetLastAppSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastAppSyncStatus()(*AndroidForWorkSyncStatus) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOwnerOrganizationName()(*string) + GetOwnerUserPrincipalName()(*string) + GetTargetGroupIds()([]string) + SetBindStatus(value *AndroidForWorkBindStatus)() + SetDeviceOwnerManagementEnabled(value *bool)() + SetEnrollmentTarget(value *AndroidForWorkEnrollmentTarget)() + SetLastAppSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastAppSyncStatus(value *AndroidForWorkSyncStatus)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOwnerOrganizationName(value *string)() + SetOwnerUserPrincipalName(value *string)() + SetTargetGroupIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_sync_status.go b/src/internal/connector/graph/betasdk/models/android_for_work_sync_status.go new file mode 100644 index 000000000..477e727dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_sync_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkSyncStatus int + +const ( + SUCCESS_ANDROIDFORWORKSYNCSTATUS AndroidForWorkSyncStatus = iota + CREDENTIALSNOTVALID_ANDROIDFORWORKSYNCSTATUS + ANDROIDFORWORKAPIERROR_ANDROIDFORWORKSYNCSTATUS + MANAGEMENTSERVICEERROR_ANDROIDFORWORKSYNCSTATUS + UNKNOWNERROR_ANDROIDFORWORKSYNCSTATUS + NONE_ANDROIDFORWORKSYNCSTATUS +) + +func (i AndroidForWorkSyncStatus) String() string { + return []string{"success", "credentialsNotValid", "androidForWorkApiError", "managementServiceError", "unknownError", "none"}[i] +} +func ParseAndroidForWorkSyncStatus(v string) (interface{}, error) { + result := SUCCESS_ANDROIDFORWORKSYNCSTATUS + switch v { + case "success": + result = SUCCESS_ANDROIDFORWORKSYNCSTATUS + case "credentialsNotValid": + result = CREDENTIALSNOTVALID_ANDROIDFORWORKSYNCSTATUS + case "androidForWorkApiError": + result = ANDROIDFORWORKAPIERROR_ANDROIDFORWORKSYNCSTATUS + case "managementServiceError": + result = MANAGEMENTSERVICEERROR_ANDROIDFORWORKSYNCSTATUS + case "unknownError": + result = UNKNOWNERROR_ANDROIDFORWORKSYNCSTATUS + case "none": + result = NONE_ANDROIDFORWORKSYNCSTATUS + default: + return 0, errors.New("Unknown AndroidForWorkSyncStatus value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkSyncStatus(values []AndroidForWorkSyncStatus) []string { + 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/android_for_work_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate.go new file mode 100644 index 000000000..0ba4894f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkTrustedRootCertificate +type AndroidForWorkTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate + trustedRootCertificate []byte +} +// NewAndroidForWorkTrustedRootCertificate instantiates a new androidForWorkTrustedRootCertificate and sets the default values. +func NewAndroidForWorkTrustedRootCertificate()(*AndroidForWorkTrustedRootCertificate) { + m := &AndroidForWorkTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *AndroidForWorkTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidForWorkTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *AndroidForWorkTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *AndroidForWorkTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidForWorkTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..fec99cf73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkTrustedRootCertificateCollectionResponse +type AndroidForWorkTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkTrustedRootCertificateable +} +// NewAndroidForWorkTrustedRootCertificateCollectionResponse instantiates a new AndroidForWorkTrustedRootCertificateCollectionResponse and sets the default values. +func NewAndroidForWorkTrustedRootCertificateCollectionResponse()(*AndroidForWorkTrustedRootCertificateCollectionResponse) { + m := &AndroidForWorkTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkTrustedRootCertificateCollectionResponse) GetValue()([]AndroidForWorkTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkTrustedRootCertificateCollectionResponse) SetValue(value []AndroidForWorkTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..a8e567ef8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkTrustedRootCertificateCollectionResponseable +type AndroidForWorkTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkTrustedRootCertificateable) + SetValue(value []AndroidForWorkTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificateable.go new file mode 100644 index 000000000..c334b66f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkTrustedRootCertificateable +type AndroidForWorkTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration.go new file mode 100644 index 000000000..1d99090ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration.go @@ -0,0 +1,322 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkVpnConfiguration +type AndroidForWorkVpnConfiguration struct { + DeviceConfiguration + // VPN Authentication Method. + authenticationMethod *VpnAuthenticationMethod + // Connection name displayed to the user. + connectionName *string + // Android For Work VPN connection type. + connectionType *AndroidForWorkVpnConnectionType + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customData []KeyValueable + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customKeyValueData []KeyValuePairable + // Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. + fingerprint *string + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate AndroidForWorkCertificateProfileBaseable + // Realm when connection type is set to Pulse Secure. + realm *string + // Role when connection type is set to Pulse Secure. + role *string + // List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. + servers []VpnServerable +} +// NewAndroidForWorkVpnConfiguration instantiates a new AndroidForWorkVpnConfiguration and sets the default values. +func NewAndroidForWorkVpnConfiguration()(*AndroidForWorkVpnConfiguration) { + m := &AndroidForWorkVpnConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkVpnConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidForWorkVpnConfiguration) GetAuthenticationMethod()(*VpnAuthenticationMethod) { + return m.authenticationMethod +} +// GetConnectionName gets the connectionName property value. Connection name displayed to the user. +func (m *AndroidForWorkVpnConfiguration) GetConnectionName()(*string) { + return m.connectionName +} +// GetConnectionType gets the connectionType property value. Android For Work VPN connection type. +func (m *AndroidForWorkVpnConfiguration) GetConnectionType()(*AndroidForWorkVpnConnectionType) { + return m.connectionType +} +// GetCustomData gets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidForWorkVpnConfiguration) GetCustomData()([]KeyValueable) { + return m.customData +} +// GetCustomKeyValueData gets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidForWorkVpnConfiguration) GetCustomKeyValueData()([]KeyValuePairable) { + return m.customKeyValueData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*VpnAuthenticationMethod)) + } + return nil + } + res["connectionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionName(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidForWorkVpnConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*AndroidForWorkVpnConnectionType)) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetCustomData(res) + } + return nil + } + res["customKeyValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomKeyValueData(res) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidForWorkCertificateProfileBaseable)) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["servers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVpnServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VpnServerable, len(val)) + for i, v := range val { + res[i] = v.(VpnServerable) + } + m.SetServers(res) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidForWorkVpnConfiguration) GetFingerprint()(*string) { + return m.fingerprint +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidForWorkVpnConfiguration) GetIdentityCertificate()(AndroidForWorkCertificateProfileBaseable) { + return m.identityCertificate +} +// GetRealm gets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidForWorkVpnConfiguration) GetRealm()(*string) { + return m.realm +} +// GetRole gets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidForWorkVpnConfiguration) GetRole()(*string) { + return m.role +} +// GetServers gets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkVpnConfiguration) GetServers()([]VpnServerable) { + return m.servers +} +// Serialize serializes information the current object +func (m *AndroidForWorkVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionName", m.GetConnectionName()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + if m.GetCustomData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomData())) + for i, v := range m.GetCustomData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customData", cast) + if err != nil { + return err + } + } + if m.GetCustomKeyValueData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomKeyValueData())) + for i, v := range m.GetCustomKeyValueData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customKeyValueData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + if m.GetServers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServers())) + for i, v := range m.GetServers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("servers", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidForWorkVpnConfiguration) SetAuthenticationMethod(value *VpnAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetConnectionName sets the connectionName property value. Connection name displayed to the user. +func (m *AndroidForWorkVpnConfiguration) SetConnectionName(value *string)() { + m.connectionName = value +} +// SetConnectionType sets the connectionType property value. Android For Work VPN connection type. +func (m *AndroidForWorkVpnConfiguration) SetConnectionType(value *AndroidForWorkVpnConnectionType)() { + m.connectionType = value +} +// SetCustomData sets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidForWorkVpnConfiguration) SetCustomData(value []KeyValueable)() { + m.customData = value +} +// SetCustomKeyValueData sets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidForWorkVpnConfiguration) SetCustomKeyValueData(value []KeyValuePairable)() { + m.customKeyValueData = value +} +// SetFingerprint sets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidForWorkVpnConfiguration) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidForWorkVpnConfiguration) SetIdentityCertificate(value AndroidForWorkCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetRealm sets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidForWorkVpnConfiguration) SetRealm(value *string)() { + m.realm = value +} +// SetRole sets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidForWorkVpnConfiguration) SetRole(value *string)() { + m.role = value +} +// SetServers sets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidForWorkVpnConfiguration) SetServers(value []VpnServerable)() { + m.servers = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_response.go new file mode 100644 index 000000000..e1d5b1641 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkVpnConfigurationCollectionResponse +type AndroidForWorkVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkVpnConfigurationable +} +// NewAndroidForWorkVpnConfigurationCollectionResponse instantiates a new AndroidForWorkVpnConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkVpnConfigurationCollectionResponse()(*AndroidForWorkVpnConfigurationCollectionResponse) { + m := &AndroidForWorkVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkVpnConfigurationCollectionResponse) GetValue()([]AndroidForWorkVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkVpnConfigurationCollectionResponse) SetValue(value []AndroidForWorkVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..63468a2cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkVpnConfigurationCollectionResponseable +type AndroidForWorkVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkVpnConfigurationable) + SetValue(value []AndroidForWorkVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configurationable.go new file mode 100644 index 000000000..f08a6855f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_configurationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkVpnConfigurationable +type AndroidForWorkVpnConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*VpnAuthenticationMethod) + GetConnectionName()(*string) + GetConnectionType()(*AndroidForWorkVpnConnectionType) + GetCustomData()([]KeyValueable) + GetCustomKeyValueData()([]KeyValuePairable) + GetFingerprint()(*string) + GetIdentityCertificate()(AndroidForWorkCertificateProfileBaseable) + GetRealm()(*string) + GetRole()(*string) + GetServers()([]VpnServerable) + SetAuthenticationMethod(value *VpnAuthenticationMethod)() + SetConnectionName(value *string)() + SetConnectionType(value *AndroidForWorkVpnConnectionType)() + SetCustomData(value []KeyValueable)() + SetCustomKeyValueData(value []KeyValuePairable)() + SetFingerprint(value *string)() + SetIdentityCertificate(value AndroidForWorkCertificateProfileBaseable)() + SetRealm(value *string)() + SetRole(value *string)() + SetServers(value []VpnServerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_vpn_connection_type.go b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_connection_type.go new file mode 100644 index 000000000..4c76d7295 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_vpn_connection_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidForWorkVpnConnectionType int + +const ( + // Cisco AnyConnect. + CISCOANYCONNECT_ANDROIDFORWORKVPNCONNECTIONTYPE AndroidForWorkVpnConnectionType = iota + // Pulse Secure. + PULSESECURE_ANDROIDFORWORKVPNCONNECTIONTYPE + // F5 Edge Client. + F5EDGECLIENT_ANDROIDFORWORKVPNCONNECTIONTYPE + // Dell SonicWALL Mobile Connection. + DELLSONICWALLMOBILECONNECT_ANDROIDFORWORKVPNCONNECTIONTYPE + // Check Point Capsule VPN. + CHECKPOINTCAPSULEVPN_ANDROIDFORWORKVPNCONNECTIONTYPE + // Citrix + CITRIX_ANDROIDFORWORKVPNCONNECTIONTYPE +) + +func (i AndroidForWorkVpnConnectionType) String() string { + return []string{"ciscoAnyConnect", "pulseSecure", "f5EdgeClient", "dellSonicWallMobileConnect", "checkPointCapsuleVpn", "citrix"}[i] +} +func ParseAndroidForWorkVpnConnectionType(v string) (interface{}, error) { + result := CISCOANYCONNECT_ANDROIDFORWORKVPNCONNECTIONTYPE + switch v { + case "ciscoAnyConnect": + result = CISCOANYCONNECT_ANDROIDFORWORKVPNCONNECTIONTYPE + case "pulseSecure": + result = PULSESECURE_ANDROIDFORWORKVPNCONNECTIONTYPE + case "f5EdgeClient": + result = F5EDGECLIENT_ANDROIDFORWORKVPNCONNECTIONTYPE + case "dellSonicWallMobileConnect": + result = DELLSONICWALLMOBILECONNECT_ANDROIDFORWORKVPNCONNECTIONTYPE + case "checkPointCapsuleVpn": + result = CHECKPOINTCAPSULEVPN_ANDROIDFORWORKVPNCONNECTIONTYPE + case "citrix": + result = CITRIX_ANDROIDFORWORKVPNCONNECTIONTYPE + default: + return 0, errors.New("Unknown AndroidForWorkVpnConnectionType value: " + v) + } + return &result, nil +} +func SerializeAndroidForWorkVpnConnectionType(values []AndroidForWorkVpnConnectionType) []string { + 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/android_for_work_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration.go new file mode 100644 index 000000000..c4e7e79f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkWiFiConfiguration +type AndroidForWorkWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types for Android. + wiFiSecurityType *AndroidWiFiSecurityType +} +// NewAndroidForWorkWiFiConfiguration instantiates a new AndroidForWorkWiFiConfiguration and sets the default values. +func NewAndroidForWorkWiFiConfiguration()(*AndroidForWorkWiFiConfiguration) { + m := &AndroidForWorkWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidForWorkWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidForWorkWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkEnterpriseWiFiConfiguration": + return NewAndroidForWorkEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewAndroidForWorkWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidForWorkWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidForWorkWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*AndroidWiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *AndroidForWorkWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidForWorkWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidForWorkWiFiConfiguration) GetWiFiSecurityType()(*AndroidWiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *AndroidForWorkWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidForWorkWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidForWorkWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *AndroidForWorkWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidForWorkWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidForWorkWiFiConfiguration) SetWiFiSecurityType(value *AndroidWiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..11b7aadba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkWiFiConfigurationCollectionResponse +type AndroidForWorkWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidForWorkWiFiConfigurationable +} +// NewAndroidForWorkWiFiConfigurationCollectionResponse instantiates a new AndroidForWorkWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidForWorkWiFiConfigurationCollectionResponse()(*AndroidForWorkWiFiConfigurationCollectionResponse) { + m := &AndroidForWorkWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidForWorkWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidForWorkWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidForWorkWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidForWorkWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidForWorkWiFiConfigurationCollectionResponse) GetValue()([]AndroidForWorkWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidForWorkWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidForWorkWiFiConfigurationCollectionResponse) SetValue(value []AndroidForWorkWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..3072b2b2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkWiFiConfigurationCollectionResponseable +type AndroidForWorkWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidForWorkWiFiConfigurationable) + SetValue(value []AndroidForWorkWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configurationable.go new file mode 100644 index 000000000..35d5350aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_for_work_wi_fi_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidForWorkWiFiConfigurationable +type AndroidForWorkWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetSsid()(*string) + GetWiFiSecurityType()(*AndroidWiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetSsid(value *string)() + SetWiFiSecurityType(value *AndroidWiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment.go new file mode 100644 index 000000000..57ea802ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignment describes deployment security group to assign a deployment to. The backend will expand the security Group ID to extract device serial numbers prior sending a create deployment request to Zebra. +type AndroidFotaDeploymentAssignment 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 display name of the Azure AD security group used for the assignment. + displayName *string + // A unique identifier assigned to each Android FOTA Assignment entity + id *string + // The OdataType property + odataType *string + // The AAD Group we are deploying firmware updates to + target AndroidFotaDeploymentAssignmentTargetable +} +// NewAndroidFotaDeploymentAssignment instantiates a new androidFotaDeploymentAssignment and sets the default values. +func NewAndroidFotaDeploymentAssignment()(*AndroidFotaDeploymentAssignment) { + m := &AndroidFotaDeploymentAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidFotaDeploymentAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidFotaDeploymentAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidFotaDeploymentAssignment(), 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 *AndroidFotaDeploymentAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name of the Azure AD security group used for the assignment. +func (m *AndroidFotaDeploymentAssignment) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidFotaDeploymentAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidFotaDeploymentAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(AndroidFotaDeploymentAssignmentTargetable)) + } + return nil + } + return res +} +// GetId gets the id property value. A unique identifier assigned to each Android FOTA Assignment entity +func (m *AndroidFotaDeploymentAssignment) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidFotaDeploymentAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The AAD Group we are deploying firmware updates to +func (m *AndroidFotaDeploymentAssignment) GetTarget()(AndroidFotaDeploymentAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *AndroidFotaDeploymentAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("target", m.GetTarget()) + 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 *AndroidFotaDeploymentAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name of the Azure AD security group used for the assignment. +func (m *AndroidFotaDeploymentAssignment) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. A unique identifier assigned to each Android FOTA Assignment entity +func (m *AndroidFotaDeploymentAssignment) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidFotaDeploymentAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The AAD Group we are deploying firmware updates to +func (m *AndroidFotaDeploymentAssignment) SetTarget(value AndroidFotaDeploymentAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_response.go new file mode 100644 index 000000000..ce2cf9691 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignmentCollectionResponse +type AndroidFotaDeploymentAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidFotaDeploymentAssignmentable +} +// NewAndroidFotaDeploymentAssignmentCollectionResponse instantiates a new AndroidFotaDeploymentAssignmentCollectionResponse and sets the default values. +func NewAndroidFotaDeploymentAssignmentCollectionResponse()(*AndroidFotaDeploymentAssignmentCollectionResponse) { + m := &AndroidFotaDeploymentAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidFotaDeploymentAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidFotaDeploymentAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidFotaDeploymentAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidFotaDeploymentAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidFotaDeploymentAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidFotaDeploymentAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AndroidFotaDeploymentAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidFotaDeploymentAssignmentCollectionResponse) GetValue()([]AndroidFotaDeploymentAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidFotaDeploymentAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidFotaDeploymentAssignmentCollectionResponse) SetValue(value []AndroidFotaDeploymentAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_responseable.go new file mode 100644 index 000000000..be88e0fc5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignmentCollectionResponseable +type AndroidFotaDeploymentAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidFotaDeploymentAssignmentable) + SetValue(value []AndroidFotaDeploymentAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_target.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_target.go new file mode 100644 index 000000000..760d7fb3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_target.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignmentTarget the AAD Group we are deploying firmware updates to +type AndroidFotaDeploymentAssignmentTarget struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // AAD Group Id. + groupId *string + // The OdataType property + odataType *string +} +// NewAndroidFotaDeploymentAssignmentTarget instantiates a new androidFotaDeploymentAssignmentTarget and sets the default values. +func NewAndroidFotaDeploymentAssignmentTarget()(*AndroidFotaDeploymentAssignmentTarget) { + m := &AndroidFotaDeploymentAssignmentTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidFotaDeploymentAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidFotaDeploymentAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidFotaDeploymentAssignmentTarget(), 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 *AndroidFotaDeploymentAssignmentTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidFotaDeploymentAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(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 + } + return res +} +// GetGroupId gets the groupId property value. AAD Group Id. +func (m *AndroidFotaDeploymentAssignmentTarget) GetGroupId()(*string) { + return m.groupId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidFotaDeploymentAssignmentTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AndroidFotaDeploymentAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AndroidFotaDeploymentAssignmentTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetGroupId sets the groupId property value. AAD Group Id. +func (m *AndroidFotaDeploymentAssignmentTarget) SetGroupId(value *string)() { + m.groupId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidFotaDeploymentAssignmentTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_targetable.go new file mode 100644 index 000000000..e74f63e2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignment_targetable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignmentTargetable +type AndroidFotaDeploymentAssignmentTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + GetOdataType()(*string) + SetGroupId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignmentable.go b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignmentable.go new file mode 100644 index 000000000..b17038c9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_fota_deployment_assignmentable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidFotaDeploymentAssignmentable +type AndroidFotaDeploymentAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + GetTarget()(AndroidFotaDeploymentAssignmentTargetable) + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() + SetTarget(value AndroidFotaDeploymentAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/android_general_device_configuration.go new file mode 100644 index 000000000..a00282c29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_general_device_configuration.go @@ -0,0 +1,1380 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidGeneralDeviceConfiguration +type AndroidGeneralDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not to block clipboard sharing to copy and paste between applications. + appsBlockClipboardSharing *bool + // Indicates whether or not to block copy and paste within applications. + appsBlockCopyPaste *bool + // Indicates whether or not to block the YouTube app. + appsBlockYouTube *bool + // List of apps to be hidden on the KNOX device. This collection can contain a maximum of 500 elements. + appsHideList []AppListItemable + // List of apps which can be installed on the KNOX device. This collection can contain a maximum of 500 elements. + appsInstallAllowList []AppListItemable + // List of apps which are blocked from being launched on the KNOX device. This collection can contain a maximum of 500 elements. + appsLaunchBlockList []AppListItemable + // Indicates whether or not to block Bluetooth. + bluetoothBlocked *bool + // Indicates whether or not to block the use of the camera. + cameraBlocked *bool + // Indicates whether or not to block data roaming. + cellularBlockDataRoaming *bool + // Indicates whether or not to block SMS/MMS messaging. + cellularBlockMessaging *bool + // Indicates whether or not to block voice roaming. + cellularBlockVoiceRoaming *bool + // Indicates whether or not to block syncing Wi-Fi tethering. + cellularBlockWiFiTethering *bool + // Possible values of the compliance app list. + compliantAppListType *AppListType + // List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. + compliantAppsList []AppListItemable + // Indicates whether or not to block changing date and time while in KNOX Mode. + dateAndTimeBlockChanges *bool + // Indicates whether or not to allow device sharing mode. + deviceSharingAllowed *bool + // Indicates whether or not to block diagnostic data submission. + diagnosticDataBlockSubmission *bool + // Indicates whether or not to block user performing a factory reset. + factoryResetBlocked *bool + // Indicates whether or not to block Google account auto sync. + googleAccountBlockAutoSync *bool + // Indicates whether or not to block the Google Play store. + googlePlayStoreBlocked *bool + // A list of apps that will be allowed to run when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. + kioskModeApps []AppListItemable + // Indicates whether or not to block the screen sleep button while in Kiosk Mode. + kioskModeBlockSleepButton *bool + // Indicates whether or not to block the volume buttons while in Kiosk Mode. + kioskModeBlockVolumeButtons *bool + // Indicates whether or not to block location services. + locationServicesBlocked *bool + // Indicates whether or not to block Near-Field Communication. + nfcBlocked *bool + // Indicates whether or not to block fingerprint unlock. + passwordBlockFingerprintUnlock *bool + // Indicates whether or not to block Smart Lock and other trust agents. + passwordBlockTrustAgents *bool + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum length of passwords. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous passwords to block. Valid values 0 to 24 + passwordPreviousPasswordBlockCount *int32 + // Indicates whether or not to require a password. + passwordRequired *bool + // Android required password type. + passwordRequiredType *AndroidRequiredPasswordType + // Number of sign in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // Indicates whether or not to block powering off the device. + powerOffBlocked *bool + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Indicates whether or not to block screenshots. + screenCaptureBlocked *bool + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Indicates whether or not to block Google Backup. + storageBlockGoogleBackup *bool + // Indicates whether or not to block removable storage usage. + storageBlockRemovableStorage *bool + // Indicates whether or not to require device encryption. + storageRequireDeviceEncryption *bool + // Indicates whether or not to require removable storage encryption. + storageRequireRemovableStorageEncryption *bool + // Indicates whether or not to block the use of the Voice Assistant. + voiceAssistantBlocked *bool + // Indicates whether or not to block voice dialing. + voiceDialingBlocked *bool + // Indicates whether or not to block the web browser's auto fill feature. + webBrowserBlockAutofill *bool + // Indicates whether or not to block the web browser. + webBrowserBlocked *bool + // Indicates whether or not to block JavaScript within the web browser. + webBrowserBlockJavaScript *bool + // Indicates whether or not to block popups within the web browser. + webBrowserBlockPopups *bool + // Web Browser Cookie Settings. + webBrowserCookieSettings *WebBrowserCookieSettings + // Indicates whether or not to block syncing Wi-Fi. + wiFiBlocked *bool +} +// NewAndroidGeneralDeviceConfiguration instantiates a new AndroidGeneralDeviceConfiguration and sets the default values. +func NewAndroidGeneralDeviceConfiguration()(*AndroidGeneralDeviceConfiguration) { + m := &AndroidGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidGeneralDeviceConfiguration(), nil +} +// GetAppsBlockClipboardSharing gets the appsBlockClipboardSharing property value. Indicates whether or not to block clipboard sharing to copy and paste between applications. +func (m *AndroidGeneralDeviceConfiguration) GetAppsBlockClipboardSharing()(*bool) { + return m.appsBlockClipboardSharing +} +// GetAppsBlockCopyPaste gets the appsBlockCopyPaste property value. Indicates whether or not to block copy and paste within applications. +func (m *AndroidGeneralDeviceConfiguration) GetAppsBlockCopyPaste()(*bool) { + return m.appsBlockCopyPaste +} +// GetAppsBlockYouTube gets the appsBlockYouTube property value. Indicates whether or not to block the YouTube app. +func (m *AndroidGeneralDeviceConfiguration) GetAppsBlockYouTube()(*bool) { + return m.appsBlockYouTube +} +// GetAppsHideList gets the appsHideList property value. List of apps to be hidden on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) GetAppsHideList()([]AppListItemable) { + return m.appsHideList +} +// GetAppsInstallAllowList gets the appsInstallAllowList property value. List of apps which can be installed on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) GetAppsInstallAllowList()([]AppListItemable) { + return m.appsInstallAllowList +} +// GetAppsLaunchBlockList gets the appsLaunchBlockList property value. List of apps which are blocked from being launched on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) GetAppsLaunchBlockList()([]AppListItemable) { + return m.appsLaunchBlockList +} +// GetBluetoothBlocked gets the bluetoothBlocked property value. Indicates whether or not to block Bluetooth. +func (m *AndroidGeneralDeviceConfiguration) GetBluetoothBlocked()(*bool) { + return m.bluetoothBlocked +} +// GetCameraBlocked gets the cameraBlocked property value. Indicates whether or not to block the use of the camera. +func (m *AndroidGeneralDeviceConfiguration) GetCameraBlocked()(*bool) { + return m.cameraBlocked +} +// GetCellularBlockDataRoaming gets the cellularBlockDataRoaming property value. Indicates whether or not to block data roaming. +func (m *AndroidGeneralDeviceConfiguration) GetCellularBlockDataRoaming()(*bool) { + return m.cellularBlockDataRoaming +} +// GetCellularBlockMessaging gets the cellularBlockMessaging property value. Indicates whether or not to block SMS/MMS messaging. +func (m *AndroidGeneralDeviceConfiguration) GetCellularBlockMessaging()(*bool) { + return m.cellularBlockMessaging +} +// GetCellularBlockVoiceRoaming gets the cellularBlockVoiceRoaming property value. Indicates whether or not to block voice roaming. +func (m *AndroidGeneralDeviceConfiguration) GetCellularBlockVoiceRoaming()(*bool) { + return m.cellularBlockVoiceRoaming +} +// GetCellularBlockWiFiTethering gets the cellularBlockWiFiTethering property value. Indicates whether or not to block syncing Wi-Fi tethering. +func (m *AndroidGeneralDeviceConfiguration) GetCellularBlockWiFiTethering()(*bool) { + return m.cellularBlockWiFiTethering +} +// GetCompliantAppListType gets the compliantAppListType property value. Possible values of the compliance app list. +func (m *AndroidGeneralDeviceConfiguration) GetCompliantAppListType()(*AppListType) { + return m.compliantAppListType +} +// GetCompliantAppsList gets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *AndroidGeneralDeviceConfiguration) GetCompliantAppsList()([]AppListItemable) { + return m.compliantAppsList +} +// GetDateAndTimeBlockChanges gets the dateAndTimeBlockChanges property value. Indicates whether or not to block changing date and time while in KNOX Mode. +func (m *AndroidGeneralDeviceConfiguration) GetDateAndTimeBlockChanges()(*bool) { + return m.dateAndTimeBlockChanges +} +// GetDeviceSharingAllowed gets the deviceSharingAllowed property value. Indicates whether or not to allow device sharing mode. +func (m *AndroidGeneralDeviceConfiguration) GetDeviceSharingAllowed()(*bool) { + return m.deviceSharingAllowed +} +// GetDiagnosticDataBlockSubmission gets the diagnosticDataBlockSubmission property value. Indicates whether or not to block diagnostic data submission. +func (m *AndroidGeneralDeviceConfiguration) GetDiagnosticDataBlockSubmission()(*bool) { + return m.diagnosticDataBlockSubmission +} +// GetFactoryResetBlocked gets the factoryResetBlocked property value. Indicates whether or not to block user performing a factory reset. +func (m *AndroidGeneralDeviceConfiguration) GetFactoryResetBlocked()(*bool) { + return m.factoryResetBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["appsBlockClipboardSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsBlockClipboardSharing(val) + } + return nil + } + res["appsBlockCopyPaste"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsBlockCopyPaste(val) + } + return nil + } + res["appsBlockYouTube"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsBlockYouTube(val) + } + return nil + } + res["appsHideList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAppsHideList(res) + } + return nil + } + res["appsInstallAllowList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAppsInstallAllowList(res) + } + return nil + } + res["appsLaunchBlockList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAppsLaunchBlockList(res) + } + return nil + } + res["bluetoothBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlocked(val) + } + return nil + } + res["cameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraBlocked(val) + } + return nil + } + res["cellularBlockDataRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockDataRoaming(val) + } + return nil + } + res["cellularBlockMessaging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockMessaging(val) + } + return nil + } + res["cellularBlockVoiceRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockVoiceRoaming(val) + } + return nil + } + res["cellularBlockWiFiTethering"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockWiFiTethering(val) + } + return nil + } + res["compliantAppListType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppListType) + if err != nil { + return err + } + if val != nil { + m.SetCompliantAppListType(val.(*AppListType)) + } + return nil + } + res["compliantAppsList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetCompliantAppsList(res) + } + return nil + } + res["dateAndTimeBlockChanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDateAndTimeBlockChanges(val) + } + return nil + } + res["deviceSharingAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceSharingAllowed(val) + } + return nil + } + res["diagnosticDataBlockSubmission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiagnosticDataBlockSubmission(val) + } + return nil + } + res["factoryResetBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFactoryResetBlocked(val) + } + return nil + } + res["googleAccountBlockAutoSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGoogleAccountBlockAutoSync(val) + } + return nil + } + res["googlePlayStoreBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGooglePlayStoreBlocked(val) + } + return nil + } + res["kioskModeApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetKioskModeApps(res) + } + return nil + } + res["kioskModeBlockSleepButton"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockSleepButton(val) + } + return nil + } + res["kioskModeBlockVolumeButtons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockVolumeButtons(val) + } + return nil + } + res["locationServicesBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationServicesBlocked(val) + } + return nil + } + res["nfcBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNfcBlocked(val) + } + return nil + } + res["passwordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFingerprintUnlock(val) + } + return nil + } + res["passwordBlockTrustAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockTrustAgents(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["powerOffBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPowerOffBlocked(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["storageBlockGoogleBackup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockGoogleBackup(val) + } + return nil + } + res["storageBlockRemovableStorage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockRemovableStorage(val) + } + return nil + } + res["storageRequireDeviceEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireDeviceEncryption(val) + } + return nil + } + res["storageRequireRemovableStorageEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireRemovableStorageEncryption(val) + } + return nil + } + res["voiceAssistantBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVoiceAssistantBlocked(val) + } + return nil + } + res["voiceDialingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVoiceDialingBlocked(val) + } + return nil + } + res["webBrowserBlockAutofill"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebBrowserBlockAutofill(val) + } + return nil + } + res["webBrowserBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebBrowserBlocked(val) + } + return nil + } + res["webBrowserBlockJavaScript"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebBrowserBlockJavaScript(val) + } + return nil + } + res["webBrowserBlockPopups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWebBrowserBlockPopups(val) + } + return nil + } + res["webBrowserCookieSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWebBrowserCookieSettings) + if err != nil { + return err + } + if val != nil { + m.SetWebBrowserCookieSettings(val.(*WebBrowserCookieSettings)) + } + return nil + } + res["wiFiBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWiFiBlocked(val) + } + return nil + } + return res +} +// GetGoogleAccountBlockAutoSync gets the googleAccountBlockAutoSync property value. Indicates whether or not to block Google account auto sync. +func (m *AndroidGeneralDeviceConfiguration) GetGoogleAccountBlockAutoSync()(*bool) { + return m.googleAccountBlockAutoSync +} +// GetGooglePlayStoreBlocked gets the googlePlayStoreBlocked property value. Indicates whether or not to block the Google Play store. +func (m *AndroidGeneralDeviceConfiguration) GetGooglePlayStoreBlocked()(*bool) { + return m.googlePlayStoreBlocked +} +// GetKioskModeApps gets the kioskModeApps property value. A list of apps that will be allowed to run when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) GetKioskModeApps()([]AppListItemable) { + return m.kioskModeApps +} +// GetKioskModeBlockSleepButton gets the kioskModeBlockSleepButton property value. Indicates whether or not to block the screen sleep button while in Kiosk Mode. +func (m *AndroidGeneralDeviceConfiguration) GetKioskModeBlockSleepButton()(*bool) { + return m.kioskModeBlockSleepButton +} +// GetKioskModeBlockVolumeButtons gets the kioskModeBlockVolumeButtons property value. Indicates whether or not to block the volume buttons while in Kiosk Mode. +func (m *AndroidGeneralDeviceConfiguration) GetKioskModeBlockVolumeButtons()(*bool) { + return m.kioskModeBlockVolumeButtons +} +// GetLocationServicesBlocked gets the locationServicesBlocked property value. Indicates whether or not to block location services. +func (m *AndroidGeneralDeviceConfiguration) GetLocationServicesBlocked()(*bool) { + return m.locationServicesBlocked +} +// GetNfcBlocked gets the nfcBlocked property value. Indicates whether or not to block Near-Field Communication. +func (m *AndroidGeneralDeviceConfiguration) GetNfcBlocked()(*bool) { + return m.nfcBlocked +} +// GetPasswordBlockFingerprintUnlock gets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidGeneralDeviceConfiguration) GetPasswordBlockFingerprintUnlock()(*bool) { + return m.passwordBlockFingerprintUnlock +} +// GetPasswordBlockTrustAgents gets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidGeneralDeviceConfiguration) GetPasswordBlockTrustAgents()(*bool) { + return m.passwordBlockTrustAgents +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidGeneralDeviceConfiguration) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidGeneralDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidGeneralDeviceConfiguration) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Indicates whether or not to require a password. +func (m *AndroidGeneralDeviceConfiguration) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android required password type. +func (m *AndroidGeneralDeviceConfiguration) GetPasswordRequiredType()(*AndroidRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidGeneralDeviceConfiguration) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetPowerOffBlocked gets the powerOffBlocked property value. Indicates whether or not to block powering off the device. +func (m *AndroidGeneralDeviceConfiguration) GetPowerOffBlocked()(*bool) { + return m.powerOffBlocked +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidGeneralDeviceConfiguration) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether or not to block screenshots. +func (m *AndroidGeneralDeviceConfiguration) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidGeneralDeviceConfiguration) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetStorageBlockGoogleBackup gets the storageBlockGoogleBackup property value. Indicates whether or not to block Google Backup. +func (m *AndroidGeneralDeviceConfiguration) GetStorageBlockGoogleBackup()(*bool) { + return m.storageBlockGoogleBackup +} +// GetStorageBlockRemovableStorage gets the storageBlockRemovableStorage property value. Indicates whether or not to block removable storage usage. +func (m *AndroidGeneralDeviceConfiguration) GetStorageBlockRemovableStorage()(*bool) { + return m.storageBlockRemovableStorage +} +// GetStorageRequireDeviceEncryption gets the storageRequireDeviceEncryption property value. Indicates whether or not to require device encryption. +func (m *AndroidGeneralDeviceConfiguration) GetStorageRequireDeviceEncryption()(*bool) { + return m.storageRequireDeviceEncryption +} +// GetStorageRequireRemovableStorageEncryption gets the storageRequireRemovableStorageEncryption property value. Indicates whether or not to require removable storage encryption. +func (m *AndroidGeneralDeviceConfiguration) GetStorageRequireRemovableStorageEncryption()(*bool) { + return m.storageRequireRemovableStorageEncryption +} +// GetVoiceAssistantBlocked gets the voiceAssistantBlocked property value. Indicates whether or not to block the use of the Voice Assistant. +func (m *AndroidGeneralDeviceConfiguration) GetVoiceAssistantBlocked()(*bool) { + return m.voiceAssistantBlocked +} +// GetVoiceDialingBlocked gets the voiceDialingBlocked property value. Indicates whether or not to block voice dialing. +func (m *AndroidGeneralDeviceConfiguration) GetVoiceDialingBlocked()(*bool) { + return m.voiceDialingBlocked +} +// GetWebBrowserBlockAutofill gets the webBrowserBlockAutofill property value. Indicates whether or not to block the web browser's auto fill feature. +func (m *AndroidGeneralDeviceConfiguration) GetWebBrowserBlockAutofill()(*bool) { + return m.webBrowserBlockAutofill +} +// GetWebBrowserBlocked gets the webBrowserBlocked property value. Indicates whether or not to block the web browser. +func (m *AndroidGeneralDeviceConfiguration) GetWebBrowserBlocked()(*bool) { + return m.webBrowserBlocked +} +// GetWebBrowserBlockJavaScript gets the webBrowserBlockJavaScript property value. Indicates whether or not to block JavaScript within the web browser. +func (m *AndroidGeneralDeviceConfiguration) GetWebBrowserBlockJavaScript()(*bool) { + return m.webBrowserBlockJavaScript +} +// GetWebBrowserBlockPopups gets the webBrowserBlockPopups property value. Indicates whether or not to block popups within the web browser. +func (m *AndroidGeneralDeviceConfiguration) GetWebBrowserBlockPopups()(*bool) { + return m.webBrowserBlockPopups +} +// GetWebBrowserCookieSettings gets the webBrowserCookieSettings property value. Web Browser Cookie Settings. +func (m *AndroidGeneralDeviceConfiguration) GetWebBrowserCookieSettings()(*WebBrowserCookieSettings) { + return m.webBrowserCookieSettings +} +// GetWiFiBlocked gets the wiFiBlocked property value. Indicates whether or not to block syncing Wi-Fi. +func (m *AndroidGeneralDeviceConfiguration) GetWiFiBlocked()(*bool) { + return m.wiFiBlocked +} +// Serialize serializes information the current object +func (m *AndroidGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appsBlockClipboardSharing", m.GetAppsBlockClipboardSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appsBlockCopyPaste", m.GetAppsBlockCopyPaste()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appsBlockYouTube", m.GetAppsBlockYouTube()) + if err != nil { + return err + } + } + if m.GetAppsHideList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppsHideList())) + for i, v := range m.GetAppsHideList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appsHideList", cast) + if err != nil { + return err + } + } + if m.GetAppsInstallAllowList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppsInstallAllowList())) + for i, v := range m.GetAppsInstallAllowList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appsInstallAllowList", cast) + if err != nil { + return err + } + } + if m.GetAppsLaunchBlockList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppsLaunchBlockList())) + for i, v := range m.GetAppsLaunchBlockList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appsLaunchBlockList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlocked", m.GetBluetoothBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cameraBlocked", m.GetCameraBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockDataRoaming", m.GetCellularBlockDataRoaming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockMessaging", m.GetCellularBlockMessaging()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockVoiceRoaming", m.GetCellularBlockVoiceRoaming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockWiFiTethering", m.GetCellularBlockWiFiTethering()) + if err != nil { + return err + } + } + if m.GetCompliantAppListType() != nil { + cast := (*m.GetCompliantAppListType()).String() + err = writer.WriteStringValue("compliantAppListType", &cast) + if err != nil { + return err + } + } + if m.GetCompliantAppsList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompliantAppsList())) + for i, v := range m.GetCompliantAppsList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("compliantAppsList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dateAndTimeBlockChanges", m.GetDateAndTimeBlockChanges()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceSharingAllowed", m.GetDeviceSharingAllowed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("diagnosticDataBlockSubmission", m.GetDiagnosticDataBlockSubmission()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("factoryResetBlocked", m.GetFactoryResetBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("googleAccountBlockAutoSync", m.GetGoogleAccountBlockAutoSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("googlePlayStoreBlocked", m.GetGooglePlayStoreBlocked()) + if err != nil { + return err + } + } + if m.GetKioskModeApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKioskModeApps())) + for i, v := range m.GetKioskModeApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("kioskModeApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockSleepButton", m.GetKioskModeBlockSleepButton()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockVolumeButtons", m.GetKioskModeBlockVolumeButtons()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("locationServicesBlocked", m.GetLocationServicesBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("nfcBlocked", m.GetNfcBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockFingerprintUnlock", m.GetPasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockTrustAgents", m.GetPasswordBlockTrustAgents()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("powerOffBlocked", m.GetPowerOffBlocked()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockGoogleBackup", m.GetStorageBlockGoogleBackup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockRemovableStorage", m.GetStorageBlockRemovableStorage()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireDeviceEncryption", m.GetStorageRequireDeviceEncryption()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireRemovableStorageEncryption", m.GetStorageRequireRemovableStorageEncryption()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("voiceAssistantBlocked", m.GetVoiceAssistantBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("voiceDialingBlocked", m.GetVoiceDialingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("webBrowserBlockAutofill", m.GetWebBrowserBlockAutofill()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("webBrowserBlocked", m.GetWebBrowserBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("webBrowserBlockJavaScript", m.GetWebBrowserBlockJavaScript()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("webBrowserBlockPopups", m.GetWebBrowserBlockPopups()) + if err != nil { + return err + } + } + if m.GetWebBrowserCookieSettings() != nil { + cast := (*m.GetWebBrowserCookieSettings()).String() + err = writer.WriteStringValue("webBrowserCookieSettings", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wiFiBlocked", m.GetWiFiBlocked()) + if err != nil { + return err + } + } + return nil +} +// SetAppsBlockClipboardSharing sets the appsBlockClipboardSharing property value. Indicates whether or not to block clipboard sharing to copy and paste between applications. +func (m *AndroidGeneralDeviceConfiguration) SetAppsBlockClipboardSharing(value *bool)() { + m.appsBlockClipboardSharing = value +} +// SetAppsBlockCopyPaste sets the appsBlockCopyPaste property value. Indicates whether or not to block copy and paste within applications. +func (m *AndroidGeneralDeviceConfiguration) SetAppsBlockCopyPaste(value *bool)() { + m.appsBlockCopyPaste = value +} +// SetAppsBlockYouTube sets the appsBlockYouTube property value. Indicates whether or not to block the YouTube app. +func (m *AndroidGeneralDeviceConfiguration) SetAppsBlockYouTube(value *bool)() { + m.appsBlockYouTube = value +} +// SetAppsHideList sets the appsHideList property value. List of apps to be hidden on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) SetAppsHideList(value []AppListItemable)() { + m.appsHideList = value +} +// SetAppsInstallAllowList sets the appsInstallAllowList property value. List of apps which can be installed on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) SetAppsInstallAllowList(value []AppListItemable)() { + m.appsInstallAllowList = value +} +// SetAppsLaunchBlockList sets the appsLaunchBlockList property value. List of apps which are blocked from being launched on the KNOX device. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) SetAppsLaunchBlockList(value []AppListItemable)() { + m.appsLaunchBlockList = value +} +// SetBluetoothBlocked sets the bluetoothBlocked property value. Indicates whether or not to block Bluetooth. +func (m *AndroidGeneralDeviceConfiguration) SetBluetoothBlocked(value *bool)() { + m.bluetoothBlocked = value +} +// SetCameraBlocked sets the cameraBlocked property value. Indicates whether or not to block the use of the camera. +func (m *AndroidGeneralDeviceConfiguration) SetCameraBlocked(value *bool)() { + m.cameraBlocked = value +} +// SetCellularBlockDataRoaming sets the cellularBlockDataRoaming property value. Indicates whether or not to block data roaming. +func (m *AndroidGeneralDeviceConfiguration) SetCellularBlockDataRoaming(value *bool)() { + m.cellularBlockDataRoaming = value +} +// SetCellularBlockMessaging sets the cellularBlockMessaging property value. Indicates whether or not to block SMS/MMS messaging. +func (m *AndroidGeneralDeviceConfiguration) SetCellularBlockMessaging(value *bool)() { + m.cellularBlockMessaging = value +} +// SetCellularBlockVoiceRoaming sets the cellularBlockVoiceRoaming property value. Indicates whether or not to block voice roaming. +func (m *AndroidGeneralDeviceConfiguration) SetCellularBlockVoiceRoaming(value *bool)() { + m.cellularBlockVoiceRoaming = value +} +// SetCellularBlockWiFiTethering sets the cellularBlockWiFiTethering property value. Indicates whether or not to block syncing Wi-Fi tethering. +func (m *AndroidGeneralDeviceConfiguration) SetCellularBlockWiFiTethering(value *bool)() { + m.cellularBlockWiFiTethering = value +} +// SetCompliantAppListType sets the compliantAppListType property value. Possible values of the compliance app list. +func (m *AndroidGeneralDeviceConfiguration) SetCompliantAppListType(value *AppListType)() { + m.compliantAppListType = value +} +// SetCompliantAppsList sets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *AndroidGeneralDeviceConfiguration) SetCompliantAppsList(value []AppListItemable)() { + m.compliantAppsList = value +} +// SetDateAndTimeBlockChanges sets the dateAndTimeBlockChanges property value. Indicates whether or not to block changing date and time while in KNOX Mode. +func (m *AndroidGeneralDeviceConfiguration) SetDateAndTimeBlockChanges(value *bool)() { + m.dateAndTimeBlockChanges = value +} +// SetDeviceSharingAllowed sets the deviceSharingAllowed property value. Indicates whether or not to allow device sharing mode. +func (m *AndroidGeneralDeviceConfiguration) SetDeviceSharingAllowed(value *bool)() { + m.deviceSharingAllowed = value +} +// SetDiagnosticDataBlockSubmission sets the diagnosticDataBlockSubmission property value. Indicates whether or not to block diagnostic data submission. +func (m *AndroidGeneralDeviceConfiguration) SetDiagnosticDataBlockSubmission(value *bool)() { + m.diagnosticDataBlockSubmission = value +} +// SetFactoryResetBlocked sets the factoryResetBlocked property value. Indicates whether or not to block user performing a factory reset. +func (m *AndroidGeneralDeviceConfiguration) SetFactoryResetBlocked(value *bool)() { + m.factoryResetBlocked = value +} +// SetGoogleAccountBlockAutoSync sets the googleAccountBlockAutoSync property value. Indicates whether or not to block Google account auto sync. +func (m *AndroidGeneralDeviceConfiguration) SetGoogleAccountBlockAutoSync(value *bool)() { + m.googleAccountBlockAutoSync = value +} +// SetGooglePlayStoreBlocked sets the googlePlayStoreBlocked property value. Indicates whether or not to block the Google Play store. +func (m *AndroidGeneralDeviceConfiguration) SetGooglePlayStoreBlocked(value *bool)() { + m.googlePlayStoreBlocked = value +} +// SetKioskModeApps sets the kioskModeApps property value. A list of apps that will be allowed to run when the device is in Kiosk Mode. This collection can contain a maximum of 500 elements. +func (m *AndroidGeneralDeviceConfiguration) SetKioskModeApps(value []AppListItemable)() { + m.kioskModeApps = value +} +// SetKioskModeBlockSleepButton sets the kioskModeBlockSleepButton property value. Indicates whether or not to block the screen sleep button while in Kiosk Mode. +func (m *AndroidGeneralDeviceConfiguration) SetKioskModeBlockSleepButton(value *bool)() { + m.kioskModeBlockSleepButton = value +} +// SetKioskModeBlockVolumeButtons sets the kioskModeBlockVolumeButtons property value. Indicates whether or not to block the volume buttons while in Kiosk Mode. +func (m *AndroidGeneralDeviceConfiguration) SetKioskModeBlockVolumeButtons(value *bool)() { + m.kioskModeBlockVolumeButtons = value +} +// SetLocationServicesBlocked sets the locationServicesBlocked property value. Indicates whether or not to block location services. +func (m *AndroidGeneralDeviceConfiguration) SetLocationServicesBlocked(value *bool)() { + m.locationServicesBlocked = value +} +// SetNfcBlocked sets the nfcBlocked property value. Indicates whether or not to block Near-Field Communication. +func (m *AndroidGeneralDeviceConfiguration) SetNfcBlocked(value *bool)() { + m.nfcBlocked = value +} +// SetPasswordBlockFingerprintUnlock sets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidGeneralDeviceConfiguration) SetPasswordBlockFingerprintUnlock(value *bool)() { + m.passwordBlockFingerprintUnlock = value +} +// SetPasswordBlockTrustAgents sets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidGeneralDeviceConfiguration) SetPasswordBlockTrustAgents(value *bool)() { + m.passwordBlockTrustAgents = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidGeneralDeviceConfiguration) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidGeneralDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidGeneralDeviceConfiguration) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Indicates whether or not to require a password. +func (m *AndroidGeneralDeviceConfiguration) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android required password type. +func (m *AndroidGeneralDeviceConfiguration) SetPasswordRequiredType(value *AndroidRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidGeneralDeviceConfiguration) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetPowerOffBlocked sets the powerOffBlocked property value. Indicates whether or not to block powering off the device. +func (m *AndroidGeneralDeviceConfiguration) SetPowerOffBlocked(value *bool)() { + m.powerOffBlocked = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidGeneralDeviceConfiguration) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether or not to block screenshots. +func (m *AndroidGeneralDeviceConfiguration) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidGeneralDeviceConfiguration) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetStorageBlockGoogleBackup sets the storageBlockGoogleBackup property value. Indicates whether or not to block Google Backup. +func (m *AndroidGeneralDeviceConfiguration) SetStorageBlockGoogleBackup(value *bool)() { + m.storageBlockGoogleBackup = value +} +// SetStorageBlockRemovableStorage sets the storageBlockRemovableStorage property value. Indicates whether or not to block removable storage usage. +func (m *AndroidGeneralDeviceConfiguration) SetStorageBlockRemovableStorage(value *bool)() { + m.storageBlockRemovableStorage = value +} +// SetStorageRequireDeviceEncryption sets the storageRequireDeviceEncryption property value. Indicates whether or not to require device encryption. +func (m *AndroidGeneralDeviceConfiguration) SetStorageRequireDeviceEncryption(value *bool)() { + m.storageRequireDeviceEncryption = value +} +// SetStorageRequireRemovableStorageEncryption sets the storageRequireRemovableStorageEncryption property value. Indicates whether or not to require removable storage encryption. +func (m *AndroidGeneralDeviceConfiguration) SetStorageRequireRemovableStorageEncryption(value *bool)() { + m.storageRequireRemovableStorageEncryption = value +} +// SetVoiceAssistantBlocked sets the voiceAssistantBlocked property value. Indicates whether or not to block the use of the Voice Assistant. +func (m *AndroidGeneralDeviceConfiguration) SetVoiceAssistantBlocked(value *bool)() { + m.voiceAssistantBlocked = value +} +// SetVoiceDialingBlocked sets the voiceDialingBlocked property value. Indicates whether or not to block voice dialing. +func (m *AndroidGeneralDeviceConfiguration) SetVoiceDialingBlocked(value *bool)() { + m.voiceDialingBlocked = value +} +// SetWebBrowserBlockAutofill sets the webBrowserBlockAutofill property value. Indicates whether or not to block the web browser's auto fill feature. +func (m *AndroidGeneralDeviceConfiguration) SetWebBrowserBlockAutofill(value *bool)() { + m.webBrowserBlockAutofill = value +} +// SetWebBrowserBlocked sets the webBrowserBlocked property value. Indicates whether or not to block the web browser. +func (m *AndroidGeneralDeviceConfiguration) SetWebBrowserBlocked(value *bool)() { + m.webBrowserBlocked = value +} +// SetWebBrowserBlockJavaScript sets the webBrowserBlockJavaScript property value. Indicates whether or not to block JavaScript within the web browser. +func (m *AndroidGeneralDeviceConfiguration) SetWebBrowserBlockJavaScript(value *bool)() { + m.webBrowserBlockJavaScript = value +} +// SetWebBrowserBlockPopups sets the webBrowserBlockPopups property value. Indicates whether or not to block popups within the web browser. +func (m *AndroidGeneralDeviceConfiguration) SetWebBrowserBlockPopups(value *bool)() { + m.webBrowserBlockPopups = value +} +// SetWebBrowserCookieSettings sets the webBrowserCookieSettings property value. Web Browser Cookie Settings. +func (m *AndroidGeneralDeviceConfiguration) SetWebBrowserCookieSettings(value *WebBrowserCookieSettings)() { + m.webBrowserCookieSettings = value +} +// SetWiFiBlocked sets the wiFiBlocked property value. Indicates whether or not to block syncing Wi-Fi. +func (m *AndroidGeneralDeviceConfiguration) SetWiFiBlocked(value *bool)() { + m.wiFiBlocked = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_response.go new file mode 100644 index 000000000..3cab97ccc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidGeneralDeviceConfigurationCollectionResponse +type AndroidGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidGeneralDeviceConfigurationable +} +// NewAndroidGeneralDeviceConfigurationCollectionResponse instantiates a new AndroidGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewAndroidGeneralDeviceConfigurationCollectionResponse()(*AndroidGeneralDeviceConfigurationCollectionResponse) { + m := &AndroidGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidGeneralDeviceConfigurationCollectionResponse) GetValue()([]AndroidGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidGeneralDeviceConfigurationCollectionResponse) SetValue(value []AndroidGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..80c920ec7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidGeneralDeviceConfigurationCollectionResponseable +type AndroidGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidGeneralDeviceConfigurationable) + SetValue(value []AndroidGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/android_general_device_configurationable.go new file mode 100644 index 000000000..e9374b148 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_general_device_configurationable.go @@ -0,0 +1,111 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidGeneralDeviceConfigurationable +type AndroidGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsBlockClipboardSharing()(*bool) + GetAppsBlockCopyPaste()(*bool) + GetAppsBlockYouTube()(*bool) + GetAppsHideList()([]AppListItemable) + GetAppsInstallAllowList()([]AppListItemable) + GetAppsLaunchBlockList()([]AppListItemable) + GetBluetoothBlocked()(*bool) + GetCameraBlocked()(*bool) + GetCellularBlockDataRoaming()(*bool) + GetCellularBlockMessaging()(*bool) + GetCellularBlockVoiceRoaming()(*bool) + GetCellularBlockWiFiTethering()(*bool) + GetCompliantAppListType()(*AppListType) + GetCompliantAppsList()([]AppListItemable) + GetDateAndTimeBlockChanges()(*bool) + GetDeviceSharingAllowed()(*bool) + GetDiagnosticDataBlockSubmission()(*bool) + GetFactoryResetBlocked()(*bool) + GetGoogleAccountBlockAutoSync()(*bool) + GetGooglePlayStoreBlocked()(*bool) + GetKioskModeApps()([]AppListItemable) + GetKioskModeBlockSleepButton()(*bool) + GetKioskModeBlockVolumeButtons()(*bool) + GetLocationServicesBlocked()(*bool) + GetNfcBlocked()(*bool) + GetPasswordBlockFingerprintUnlock()(*bool) + GetPasswordBlockTrustAgents()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetPowerOffBlocked()(*bool) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetScreenCaptureBlocked()(*bool) + GetSecurityRequireVerifyApps()(*bool) + GetStorageBlockGoogleBackup()(*bool) + GetStorageBlockRemovableStorage()(*bool) + GetStorageRequireDeviceEncryption()(*bool) + GetStorageRequireRemovableStorageEncryption()(*bool) + GetVoiceAssistantBlocked()(*bool) + GetVoiceDialingBlocked()(*bool) + GetWebBrowserBlockAutofill()(*bool) + GetWebBrowserBlocked()(*bool) + GetWebBrowserBlockJavaScript()(*bool) + GetWebBrowserBlockPopups()(*bool) + GetWebBrowserCookieSettings()(*WebBrowserCookieSettings) + GetWiFiBlocked()(*bool) + SetAppsBlockClipboardSharing(value *bool)() + SetAppsBlockCopyPaste(value *bool)() + SetAppsBlockYouTube(value *bool)() + SetAppsHideList(value []AppListItemable)() + SetAppsInstallAllowList(value []AppListItemable)() + SetAppsLaunchBlockList(value []AppListItemable)() + SetBluetoothBlocked(value *bool)() + SetCameraBlocked(value *bool)() + SetCellularBlockDataRoaming(value *bool)() + SetCellularBlockMessaging(value *bool)() + SetCellularBlockVoiceRoaming(value *bool)() + SetCellularBlockWiFiTethering(value *bool)() + SetCompliantAppListType(value *AppListType)() + SetCompliantAppsList(value []AppListItemable)() + SetDateAndTimeBlockChanges(value *bool)() + SetDeviceSharingAllowed(value *bool)() + SetDiagnosticDataBlockSubmission(value *bool)() + SetFactoryResetBlocked(value *bool)() + SetGoogleAccountBlockAutoSync(value *bool)() + SetGooglePlayStoreBlocked(value *bool)() + SetKioskModeApps(value []AppListItemable)() + SetKioskModeBlockSleepButton(value *bool)() + SetKioskModeBlockVolumeButtons(value *bool)() + SetLocationServicesBlocked(value *bool)() + SetNfcBlocked(value *bool)() + SetPasswordBlockFingerprintUnlock(value *bool)() + SetPasswordBlockTrustAgents(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetPowerOffBlocked(value *bool)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetScreenCaptureBlocked(value *bool)() + SetSecurityRequireVerifyApps(value *bool)() + SetStorageBlockGoogleBackup(value *bool)() + SetStorageBlockRemovableStorage(value *bool)() + SetStorageRequireDeviceEncryption(value *bool)() + SetStorageRequireRemovableStorageEncryption(value *bool)() + SetVoiceAssistantBlocked(value *bool)() + SetVoiceDialingBlocked(value *bool)() + SetWebBrowserBlockAutofill(value *bool)() + SetWebBrowserBlocked(value *bool)() + SetWebBrowserBlockJavaScript(value *bool)() + SetWebBrowserBlockPopups(value *bool)() + SetWebBrowserCookieSettings(value *WebBrowserCookieSettings)() + SetWiFiBlocked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile.go new file mode 100644 index 000000000..8d30b570e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidImportedPFXCertificateProfile +type AndroidImportedPFXCertificateProfile struct { + AndroidCertificateProfileBase + // PFX Import Options. + intendedPurpose *IntendedPurpose + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable +} +// NewAndroidImportedPFXCertificateProfile instantiates a new AndroidImportedPFXCertificateProfile and sets the default values. +func NewAndroidImportedPFXCertificateProfile()(*AndroidImportedPFXCertificateProfile) { + m := &AndroidImportedPFXCertificateProfile{ + AndroidCertificateProfileBase: *NewAndroidCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidImportedPFXCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidImportedPFXCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidImportedPFXCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidImportedPFXCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidImportedPFXCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidCertificateProfileBase.GetFieldDeserializers() + res["intendedPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIntendedPurpose) + if err != nil { + return err + } + if val != nil { + m.SetIntendedPurpose(val.(*IntendedPurpose)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + return res +} +// GetIntendedPurpose gets the intendedPurpose property value. PFX Import Options. +func (m *AndroidImportedPFXCertificateProfile) GetIntendedPurpose()(*IntendedPurpose) { + return m.intendedPurpose +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidImportedPFXCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// Serialize serializes information the current object +func (m *AndroidImportedPFXCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetIntendedPurpose() != nil { + cast := (*m.GetIntendedPurpose()).String() + err = writer.WriteStringValue("intendedPurpose", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetIntendedPurpose sets the intendedPurpose property value. PFX Import Options. +func (m *AndroidImportedPFXCertificateProfile) SetIntendedPurpose(value *IntendedPurpose)() { + m.intendedPurpose = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidImportedPFXCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_response.go new file mode 100644 index 000000000..a2b550bde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidImportedPFXCertificateProfileCollectionResponse +type AndroidImportedPFXCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidImportedPFXCertificateProfileable +} +// NewAndroidImportedPFXCertificateProfileCollectionResponse instantiates a new AndroidImportedPFXCertificateProfileCollectionResponse and sets the default values. +func NewAndroidImportedPFXCertificateProfileCollectionResponse()(*AndroidImportedPFXCertificateProfileCollectionResponse) { + m := &AndroidImportedPFXCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidImportedPFXCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidImportedPFXCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidImportedPFXCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidImportedPFXCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidImportedPFXCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidImportedPFXCertificateProfileCollectionResponse) GetValue()([]AndroidImportedPFXCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidImportedPFXCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidImportedPFXCertificateProfileCollectionResponse) SetValue(value []AndroidImportedPFXCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..d4f7c7d07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidImportedPFXCertificateProfileCollectionResponseable +type AndroidImportedPFXCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidImportedPFXCertificateProfileable) + SetValue(value []AndroidImportedPFXCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profileable.go new file mode 100644 index 000000000..5bb3bcc8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_imported_p_f_x_certificate_profileable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidImportedPFXCertificateProfileable +type AndroidImportedPFXCertificateProfileable interface { + AndroidCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntendedPurpose()(*IntendedPurpose) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + SetIntendedPurpose(value *IntendedPurpose)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_keyguard_feature.go b/src/internal/connector/graph/betasdk/models/android_keyguard_feature.go new file mode 100644 index 000000000..f42df75c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_keyguard_feature.go @@ -0,0 +1,72 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidKeyguardFeature int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_ANDROIDKEYGUARDFEATURE AndroidKeyguardFeature = iota + // Camera usage when on secure keyguard screens. + CAMERA_ANDROIDKEYGUARDFEATURE + // Showing notifications when on secure keyguard screens. + NOTIFICATIONS_ANDROIDKEYGUARDFEATURE + // Showing unredacted notifications when on secure keyguard screens. + UNREDACTEDNOTIFICATIONS_ANDROIDKEYGUARDFEATURE + // Trust agent state when on secure keyguard screens. + TRUSTAGENTS_ANDROIDKEYGUARDFEATURE + // Fingerprint sensor usage when on secure keyguard screens. + FINGERPRINT_ANDROIDKEYGUARDFEATURE + // Notification text entry when on secure keyguard screens. + REMOTEINPUT_ANDROIDKEYGUARDFEATURE + // All keyguard features when on secure keyguard screens. + ALLFEATURES_ANDROIDKEYGUARDFEATURE + // Face authentication on secure keyguard screens. + FACE_ANDROIDKEYGUARDFEATURE + // Iris authentication on secure keyguard screens. + IRIS_ANDROIDKEYGUARDFEATURE + // All biometric authentication on secure keyguard screens. + BIOMETRICS_ANDROIDKEYGUARDFEATURE +) + +func (i AndroidKeyguardFeature) String() string { + return []string{"notConfigured", "camera", "notifications", "unredactedNotifications", "trustAgents", "fingerprint", "remoteInput", "allFeatures", "face", "iris", "biometrics"}[i] +} +func ParseAndroidKeyguardFeature(v string) (interface{}, error) { + result := NOTCONFIGURED_ANDROIDKEYGUARDFEATURE + switch v { + case "notConfigured": + result = NOTCONFIGURED_ANDROIDKEYGUARDFEATURE + case "camera": + result = CAMERA_ANDROIDKEYGUARDFEATURE + case "notifications": + result = NOTIFICATIONS_ANDROIDKEYGUARDFEATURE + case "unredactedNotifications": + result = UNREDACTEDNOTIFICATIONS_ANDROIDKEYGUARDFEATURE + case "trustAgents": + result = TRUSTAGENTS_ANDROIDKEYGUARDFEATURE + case "fingerprint": + result = FINGERPRINT_ANDROIDKEYGUARDFEATURE + case "remoteInput": + result = REMOTEINPUT_ANDROIDKEYGUARDFEATURE + case "allFeatures": + result = ALLFEATURES_ANDROIDKEYGUARDFEATURE + case "face": + result = FACE_ANDROIDKEYGUARDFEATURE + case "iris": + result = IRIS_ANDROIDKEYGUARDFEATURE + case "biometrics": + result = BIOMETRICS_ANDROIDKEYGUARDFEATURE + default: + return 0, errors.New("Unknown AndroidKeyguardFeature value: " + v) + } + return &result, nil +} +func SerializeAndroidKeyguardFeature(values []AndroidKeyguardFeature) []string { + 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/android_lob_app.go b/src/internal/connector/graph/betasdk/models/android_lob_app.go new file mode 100644 index 000000000..f5fd36efb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_lob_app.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidLobApp +type AndroidLobApp struct { + MobileLobApp + // The Identity Name. + identityName *string + // The identity version. + identityVersion *string + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem AndroidMinimumOperatingSystemable + // The package identifier. + packageId *string + // The version code of Android Line of Business (LoB) app. + versionCode *string + // The version name of Android Line of Business (LoB) app. + versionName *string +} +// NewAndroidLobApp instantiates a new AndroidLobApp and sets the default values. +func NewAndroidLobApp()(*AndroidLobApp) { + m := &AndroidLobApp{ + MobileLobApp: *NewMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.androidLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidLobApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileLobApp.GetFieldDeserializers() + res["identityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityName(val) + } + return nil + } + res["identityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityVersion(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(AndroidMinimumOperatingSystemable)) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["versionCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionCode(val) + } + return nil + } + res["versionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionName(val) + } + return nil + } + return res +} +// GetIdentityName gets the identityName property value. The Identity Name. +func (m *AndroidLobApp) GetIdentityName()(*string) { + return m.identityName +} +// GetIdentityVersion gets the identityVersion property value. The identity version. +func (m *AndroidLobApp) GetIdentityVersion()(*string) { + return m.identityVersion +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *AndroidLobApp) GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetPackageId gets the packageId property value. The package identifier. +func (m *AndroidLobApp) GetPackageId()(*string) { + return m.packageId +} +// GetVersionCode gets the versionCode property value. The version code of Android Line of Business (LoB) app. +func (m *AndroidLobApp) GetVersionCode()(*string) { + return m.versionCode +} +// GetVersionName gets the versionName property value. The version name of Android Line of Business (LoB) app. +func (m *AndroidLobApp) GetVersionName()(*string) { + return m.versionName +} +// Serialize serializes information the current object +func (m *AndroidLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("identityName", m.GetIdentityName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identityVersion", m.GetIdentityVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionCode", m.GetVersionCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionName", m.GetVersionName()) + if err != nil { + return err + } + } + return nil +} +// SetIdentityName sets the identityName property value. The Identity Name. +func (m *AndroidLobApp) SetIdentityName(value *string)() { + m.identityName = value +} +// SetIdentityVersion sets the identityVersion property value. The identity version. +func (m *AndroidLobApp) SetIdentityVersion(value *string)() { + m.identityVersion = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *AndroidLobApp) SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetPackageId sets the packageId property value. The package identifier. +func (m *AndroidLobApp) SetPackageId(value *string)() { + m.packageId = value +} +// SetVersionCode sets the versionCode property value. The version code of Android Line of Business (LoB) app. +func (m *AndroidLobApp) SetVersionCode(value *string)() { + m.versionCode = value +} +// SetVersionName sets the versionName property value. The version name of Android Line of Business (LoB) app. +func (m *AndroidLobApp) SetVersionName(value *string)() { + m.versionName = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/android_lob_app_collection_response.go new file mode 100644 index 000000000..92adf87e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidLobAppCollectionResponse +type AndroidLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidLobAppable +} +// NewAndroidLobAppCollectionResponse instantiates a new AndroidLobAppCollectionResponse and sets the default values. +func NewAndroidLobAppCollectionResponse()(*AndroidLobAppCollectionResponse) { + m := &AndroidLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidLobAppable, len(val)) + for i, v := range val { + res[i] = v.(AndroidLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidLobAppCollectionResponse) GetValue()([]AndroidLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidLobAppCollectionResponse) SetValue(value []AndroidLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_lob_app_collection_responseable.go new file mode 100644 index 000000000..e5b115d90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidLobAppCollectionResponseable +type AndroidLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidLobAppable) + SetValue(value []AndroidLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_lob_appable.go b/src/internal/connector/graph/betasdk/models/android_lob_appable.go new file mode 100644 index 000000000..dd2ba0ad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_lob_appable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidLobAppable +type AndroidLobAppable interface { + MobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityName()(*string) + GetIdentityVersion()(*string) + GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) + GetPackageId()(*string) + GetVersionCode()(*string) + GetVersionName()(*string) + SetIdentityName(value *string)() + SetIdentityVersion(value *string)() + SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() + SetPackageId(value *string)() + SetVersionCode(value *string)() + SetVersionName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_protection.go b/src/internal/connector/graph/betasdk/models/android_managed_app_protection.go new file mode 100644 index 000000000..75dfb8605 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_protection.go @@ -0,0 +1,1141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppProtection +type AndroidManagedAppProtection struct { + TargetedManagedAppProtection + // Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. + allowedAndroidDeviceManufacturers *string + // List of device models allowed, as a string, for the managed app to work. + allowedAndroidDeviceModels []string + // An admin initiated action to be applied on a managed app. + appActionIfAndroidDeviceManufacturerNotAllowed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidDeviceModelNotAllowed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidSafetyNetAppsVerificationFailed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidSafetyNetDeviceAttestationFailed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfDeviceLockNotSet *ManagedAppRemediationAction + // If the device does not have a passcode of high complexity or higher, trigger the stored action. + appActionIfDevicePasscodeComplexityLessThanHigh *ManagedAppRemediationAction + // If the device does not have a passcode of low complexity or higher, trigger the stored action. + appActionIfDevicePasscodeComplexityLessThanLow *ManagedAppRemediationAction + // If the device does not have a passcode of medium complexity or higher, trigger the stored action. + appActionIfDevicePasscodeComplexityLessThanMedium *ManagedAppRemediationAction + // If Keyboard Restriction is enabled, only keyboards in this approved list will be allowed. A key should be Android package id for a keyboard and value should be a friendly name + approvedKeyboards []KeyValuePairable + // List of apps to which the policy is deployed. + apps []ManagedMobileAppable + // Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. + biometricAuthenticationBlocked *bool + // Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. + blockAfterCompanyPortalUpdateDeferralInDays *int32 + // Whether the app should connect to the configured VPN on launch. + connectToVpnOnLaunch *bool + // Friendly name of the preferred custom browser to open weblink on Android. + customBrowserDisplayName *string + // Unique identifier of a custom browser to open weblink on Android. + customBrowserPackageId *string + // Friendly name of a custom dialer app to click-to-open a phone number on Android. + customDialerAppDisplayName *string + // PackageId of a custom dialer app to click-to-open a phone number on Android. + customDialerAppPackageId *string + // Count of apps to which the current policy is deployed. + deployedAppCount *int32 + // Navigation property to deployment summary of the configuration. + deploymentSummary ManagedAppPolicyDeploymentSummaryable + // Defines if any kind of lock must be required on android device + deviceLockRequired *bool + // When this setting is enabled, app level encryption is disabled if device level encryption is enabled + disableAppEncryptionIfDeviceEncryptionIsEnabled *bool + // Indicates whether application data for managed apps should be encrypted + encryptAppData *bool + // App packages in this list will be exempt from the policy and will be able to receive data from managed apps. + exemptedAppPackages []KeyValuePairable + // If null, this setting will be ignored. If false both fingerprints and biometrics will not be enabled. If true, both fingerprints and biometrics will be enabled. + fingerprintAndBiometricEnabled *bool + // Indicates if keyboard restriction is enabled. If enabled list of approved keyboards must be provided as well. + keyboardsRestricted *bool + // Minimum version of the Company portal that must be installed on the device or app access will be blocked + minimumRequiredCompanyPortalVersion *string + // Define the oldest required Android security patch level a user can have to gain secure access to the app. + minimumRequiredPatchVersion *string + // Minimum version of the Company portal that must be installed on the device or the user will receive a warning + minimumWarningCompanyPortalVersion *string + // Define the oldest recommended Android security patch level a user can have for secure access to the app. + minimumWarningPatchVersion *string + // Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped + minimumWipeCompanyPortalVersion *string + // Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. + minimumWipePatchVersion *string + // Require user to apply Class 3 Biometrics on their Android device. + requireClass3Biometrics *bool + // An admin enforced Android SafetyNet Device Attestation requirement on a managed app. + requiredAndroidSafetyNetAppsVerificationType *AndroidManagedAppSafetyNetAppsVerificationType + // An admin enforced Android SafetyNet Device Attestation requirement on a managed app. + requiredAndroidSafetyNetDeviceAttestationType *AndroidManagedAppSafetyNetDeviceAttestationType + // An admin enforced Android SafetyNet evaluation type requirement on a managed app. + requiredAndroidSafetyNetEvaluationType *AndroidManagedAppSafetyNetEvaluationType + // A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. + requirePinAfterBiometricChange *bool + // Indicates whether a managed user can take screen captures of managed apps + screenCaptureBlocked *bool + // Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning + warnAfterCompanyPortalUpdateDeferralInDays *int32 + // Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped + wipeAfterCompanyPortalUpdateDeferralInDays *int32 +} +// NewAndroidManagedAppProtection instantiates a new AndroidManagedAppProtection and sets the default values. +func NewAndroidManagedAppProtection()(*AndroidManagedAppProtection) { + m := &AndroidManagedAppProtection{ + TargetedManagedAppProtection: *NewTargetedManagedAppProtection(), + } + odataTypeValue := "#microsoft.graph.androidManagedAppProtection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedAppProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedAppProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedAppProtection(), nil +} +// GetAllowedAndroidDeviceManufacturers gets the allowedAndroidDeviceManufacturers property value. Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. +func (m *AndroidManagedAppProtection) GetAllowedAndroidDeviceManufacturers()(*string) { + return m.allowedAndroidDeviceManufacturers +} +// GetAllowedAndroidDeviceModels gets the allowedAndroidDeviceModels property value. List of device models allowed, as a string, for the managed app to work. +func (m *AndroidManagedAppProtection) GetAllowedAndroidDeviceModels()([]string) { + return m.allowedAndroidDeviceModels +} +// GetAppActionIfAndroidDeviceManufacturerNotAllowed gets the appActionIfAndroidDeviceManufacturerNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) GetAppActionIfAndroidDeviceManufacturerNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidDeviceManufacturerNotAllowed +} +// GetAppActionIfAndroidDeviceModelNotAllowed gets the appActionIfAndroidDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) GetAppActionIfAndroidDeviceModelNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidDeviceModelNotAllowed +} +// GetAppActionIfAndroidSafetyNetAppsVerificationFailed gets the appActionIfAndroidSafetyNetAppsVerificationFailed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) GetAppActionIfAndroidSafetyNetAppsVerificationFailed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidSafetyNetAppsVerificationFailed +} +// GetAppActionIfAndroidSafetyNetDeviceAttestationFailed gets the appActionIfAndroidSafetyNetDeviceAttestationFailed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidSafetyNetDeviceAttestationFailed +} +// GetAppActionIfDeviceLockNotSet gets the appActionIfDeviceLockNotSet property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) GetAppActionIfDeviceLockNotSet()(*ManagedAppRemediationAction) { + return m.appActionIfDeviceLockNotSet +} +// GetAppActionIfDevicePasscodeComplexityLessThanHigh gets the appActionIfDevicePasscodeComplexityLessThanHigh property value. If the device does not have a passcode of high complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanHigh()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanHigh +} +// GetAppActionIfDevicePasscodeComplexityLessThanLow gets the appActionIfDevicePasscodeComplexityLessThanLow property value. If the device does not have a passcode of low complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanLow()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanLow +} +// GetAppActionIfDevicePasscodeComplexityLessThanMedium gets the appActionIfDevicePasscodeComplexityLessThanMedium property value. If the device does not have a passcode of medium complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanMedium()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanMedium +} +// GetApprovedKeyboards gets the approvedKeyboards property value. If Keyboard Restriction is enabled, only keyboards in this approved list will be allowed. A key should be Android package id for a keyboard and value should be a friendly name +func (m *AndroidManagedAppProtection) GetApprovedKeyboards()([]KeyValuePairable) { + return m.approvedKeyboards +} +// GetApps gets the apps property value. List of apps to which the policy is deployed. +func (m *AndroidManagedAppProtection) GetApps()([]ManagedMobileAppable) { + return m.apps +} +// GetBiometricAuthenticationBlocked gets the biometricAuthenticationBlocked property value. Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. +func (m *AndroidManagedAppProtection) GetBiometricAuthenticationBlocked()(*bool) { + return m.biometricAuthenticationBlocked +} +// GetBlockAfterCompanyPortalUpdateDeferralInDays gets the blockAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. +func (m *AndroidManagedAppProtection) GetBlockAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.blockAfterCompanyPortalUpdateDeferralInDays +} +// GetConnectToVpnOnLaunch gets the connectToVpnOnLaunch property value. Whether the app should connect to the configured VPN on launch. +func (m *AndroidManagedAppProtection) GetConnectToVpnOnLaunch()(*bool) { + return m.connectToVpnOnLaunch +} +// GetCustomBrowserDisplayName gets the customBrowserDisplayName property value. Friendly name of the preferred custom browser to open weblink on Android. +func (m *AndroidManagedAppProtection) GetCustomBrowserDisplayName()(*string) { + return m.customBrowserDisplayName +} +// GetCustomBrowserPackageId gets the customBrowserPackageId property value. Unique identifier of a custom browser to open weblink on Android. +func (m *AndroidManagedAppProtection) GetCustomBrowserPackageId()(*string) { + return m.customBrowserPackageId +} +// GetCustomDialerAppDisplayName gets the customDialerAppDisplayName property value. Friendly name of a custom dialer app to click-to-open a phone number on Android. +func (m *AndroidManagedAppProtection) GetCustomDialerAppDisplayName()(*string) { + return m.customDialerAppDisplayName +} +// GetCustomDialerAppPackageId gets the customDialerAppPackageId property value. PackageId of a custom dialer app to click-to-open a phone number on Android. +func (m *AndroidManagedAppProtection) GetCustomDialerAppPackageId()(*string) { + return m.customDialerAppPackageId +} +// GetDeployedAppCount gets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *AndroidManagedAppProtection) GetDeployedAppCount()(*int32) { + return m.deployedAppCount +} +// GetDeploymentSummary gets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *AndroidManagedAppProtection) GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) { + return m.deploymentSummary +} +// GetDeviceLockRequired gets the deviceLockRequired property value. Defines if any kind of lock must be required on android device +func (m *AndroidManagedAppProtection) GetDeviceLockRequired()(*bool) { + return m.deviceLockRequired +} +// GetDisableAppEncryptionIfDeviceEncryptionIsEnabled gets the disableAppEncryptionIfDeviceEncryptionIsEnabled property value. When this setting is enabled, app level encryption is disabled if device level encryption is enabled +func (m *AndroidManagedAppProtection) GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()(*bool) { + return m.disableAppEncryptionIfDeviceEncryptionIsEnabled +} +// GetEncryptAppData gets the encryptAppData property value. Indicates whether application data for managed apps should be encrypted +func (m *AndroidManagedAppProtection) GetEncryptAppData()(*bool) { + return m.encryptAppData +} +// GetExemptedAppPackages gets the exemptedAppPackages property value. App packages in this list will be exempt from the policy and will be able to receive data from managed apps. +func (m *AndroidManagedAppProtection) GetExemptedAppPackages()([]KeyValuePairable) { + return m.exemptedAppPackages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedAppProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TargetedManagedAppProtection.GetFieldDeserializers() + res["allowedAndroidDeviceManufacturers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedAndroidDeviceManufacturers(val) + } + return nil + } + res["allowedAndroidDeviceModels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedAndroidDeviceModels(res) + } + return nil + } + res["appActionIfAndroidDeviceManufacturerNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidDeviceManufacturerNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidDeviceModelNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidDeviceModelNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidSafetyNetAppsVerificationFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidSafetyNetAppsVerificationFailed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidSafetyNetDeviceAttestationFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDeviceLockNotSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDeviceLockNotSet(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanHigh"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanHigh(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanLow"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanLow(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanMedium"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanMedium(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["approvedKeyboards"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetApprovedKeyboards(res) + } + return nil + } + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedMobileAppable) + } + m.SetApps(res) + } + return nil + } + res["biometricAuthenticationBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBiometricAuthenticationBlocked(val) + } + return nil + } + res["blockAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBlockAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + res["connectToVpnOnLaunch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectToVpnOnLaunch(val) + } + return nil + } + res["customBrowserDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserDisplayName(val) + } + return nil + } + res["customBrowserPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserPackageId(val) + } + return nil + } + res["customDialerAppDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppDisplayName(val) + } + return nil + } + res["customDialerAppPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppPackageId(val) + } + return nil + } + res["deployedAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeployedAppCount(val) + } + return nil + } + res["deploymentSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedAppPolicyDeploymentSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentSummary(val.(ManagedAppPolicyDeploymentSummaryable)) + } + return nil + } + res["deviceLockRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceLockRequired(val) + } + return nil + } + res["disableAppEncryptionIfDeviceEncryptionIsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(val) + } + return nil + } + res["encryptAppData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptAppData(val) + } + return nil + } + res["exemptedAppPackages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetExemptedAppPackages(res) + } + return nil + } + res["fingerprintAndBiometricEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprintAndBiometricEnabled(val) + } + return nil + } + res["keyboardsRestricted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardsRestricted(val) + } + return nil + } + res["minimumRequiredCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredCompanyPortalVersion(val) + } + return nil + } + res["minimumRequiredPatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredPatchVersion(val) + } + return nil + } + res["minimumWarningCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningCompanyPortalVersion(val) + } + return nil + } + res["minimumWarningPatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningPatchVersion(val) + } + return nil + } + res["minimumWipeCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeCompanyPortalVersion(val) + } + return nil + } + res["minimumWipePatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipePatchVersion(val) + } + return nil + } + res["requireClass3Biometrics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireClass3Biometrics(val) + } + return nil + } + res["requiredAndroidSafetyNetAppsVerificationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetAppsVerificationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetAppsVerificationType(val.(*AndroidManagedAppSafetyNetAppsVerificationType)) + } + return nil + } + res["requiredAndroidSafetyNetDeviceAttestationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetDeviceAttestationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetDeviceAttestationType(val.(*AndroidManagedAppSafetyNetDeviceAttestationType)) + } + return nil + } + res["requiredAndroidSafetyNetEvaluationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetEvaluationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetEvaluationType(val.(*AndroidManagedAppSafetyNetEvaluationType)) + } + return nil + } + res["requirePinAfterBiometricChange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequirePinAfterBiometricChange(val) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["warnAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWarnAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + res["wipeAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWipeAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + return res +} +// GetFingerprintAndBiometricEnabled gets the fingerprintAndBiometricEnabled property value. If null, this setting will be ignored. If false both fingerprints and biometrics will not be enabled. If true, both fingerprints and biometrics will be enabled. +func (m *AndroidManagedAppProtection) GetFingerprintAndBiometricEnabled()(*bool) { + return m.fingerprintAndBiometricEnabled +} +// GetKeyboardsRestricted gets the keyboardsRestricted property value. Indicates if keyboard restriction is enabled. If enabled list of approved keyboards must be provided as well. +func (m *AndroidManagedAppProtection) GetKeyboardsRestricted()(*bool) { + return m.keyboardsRestricted +} +// GetMinimumRequiredCompanyPortalVersion gets the minimumRequiredCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or app access will be blocked +func (m *AndroidManagedAppProtection) GetMinimumRequiredCompanyPortalVersion()(*string) { + return m.minimumRequiredCompanyPortalVersion +} +// GetMinimumRequiredPatchVersion gets the minimumRequiredPatchVersion property value. Define the oldest required Android security patch level a user can have to gain secure access to the app. +func (m *AndroidManagedAppProtection) GetMinimumRequiredPatchVersion()(*string) { + return m.minimumRequiredPatchVersion +} +// GetMinimumWarningCompanyPortalVersion gets the minimumWarningCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the user will receive a warning +func (m *AndroidManagedAppProtection) GetMinimumWarningCompanyPortalVersion()(*string) { + return m.minimumWarningCompanyPortalVersion +} +// GetMinimumWarningPatchVersion gets the minimumWarningPatchVersion property value. Define the oldest recommended Android security patch level a user can have for secure access to the app. +func (m *AndroidManagedAppProtection) GetMinimumWarningPatchVersion()(*string) { + return m.minimumWarningPatchVersion +} +// GetMinimumWipeCompanyPortalVersion gets the minimumWipeCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped +func (m *AndroidManagedAppProtection) GetMinimumWipeCompanyPortalVersion()(*string) { + return m.minimumWipeCompanyPortalVersion +} +// GetMinimumWipePatchVersion gets the minimumWipePatchVersion property value. Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. +func (m *AndroidManagedAppProtection) GetMinimumWipePatchVersion()(*string) { + return m.minimumWipePatchVersion +} +// GetRequireClass3Biometrics gets the requireClass3Biometrics property value. Require user to apply Class 3 Biometrics on their Android device. +func (m *AndroidManagedAppProtection) GetRequireClass3Biometrics()(*bool) { + return m.requireClass3Biometrics +} +// GetRequiredAndroidSafetyNetAppsVerificationType gets the requiredAndroidSafetyNetAppsVerificationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *AndroidManagedAppProtection) GetRequiredAndroidSafetyNetAppsVerificationType()(*AndroidManagedAppSafetyNetAppsVerificationType) { + return m.requiredAndroidSafetyNetAppsVerificationType +} +// GetRequiredAndroidSafetyNetDeviceAttestationType gets the requiredAndroidSafetyNetDeviceAttestationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *AndroidManagedAppProtection) GetRequiredAndroidSafetyNetDeviceAttestationType()(*AndroidManagedAppSafetyNetDeviceAttestationType) { + return m.requiredAndroidSafetyNetDeviceAttestationType +} +// GetRequiredAndroidSafetyNetEvaluationType gets the requiredAndroidSafetyNetEvaluationType property value. An admin enforced Android SafetyNet evaluation type requirement on a managed app. +func (m *AndroidManagedAppProtection) GetRequiredAndroidSafetyNetEvaluationType()(*AndroidManagedAppSafetyNetEvaluationType) { + return m.requiredAndroidSafetyNetEvaluationType +} +// GetRequirePinAfterBiometricChange gets the requirePinAfterBiometricChange property value. A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. +func (m *AndroidManagedAppProtection) GetRequirePinAfterBiometricChange()(*bool) { + return m.requirePinAfterBiometricChange +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether a managed user can take screen captures of managed apps +func (m *AndroidManagedAppProtection) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetWarnAfterCompanyPortalUpdateDeferralInDays gets the warnAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning +func (m *AndroidManagedAppProtection) GetWarnAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.warnAfterCompanyPortalUpdateDeferralInDays +} +// GetWipeAfterCompanyPortalUpdateDeferralInDays gets the wipeAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped +func (m *AndroidManagedAppProtection) GetWipeAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.wipeAfterCompanyPortalUpdateDeferralInDays +} +// Serialize serializes information the current object +func (m *AndroidManagedAppProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TargetedManagedAppProtection.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("allowedAndroidDeviceManufacturers", m.GetAllowedAndroidDeviceManufacturers()) + if err != nil { + return err + } + } + if m.GetAllowedAndroidDeviceModels() != nil { + err = writer.WriteCollectionOfStringValues("allowedAndroidDeviceModels", m.GetAllowedAndroidDeviceModels()) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidDeviceManufacturerNotAllowed() != nil { + cast := (*m.GetAppActionIfAndroidDeviceManufacturerNotAllowed()).String() + err = writer.WriteStringValue("appActionIfAndroidDeviceManufacturerNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidDeviceModelNotAllowed() != nil { + cast := (*m.GetAppActionIfAndroidDeviceModelNotAllowed()).String() + err = writer.WriteStringValue("appActionIfAndroidDeviceModelNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidSafetyNetAppsVerificationFailed() != nil { + cast := (*m.GetAppActionIfAndroidSafetyNetAppsVerificationFailed()).String() + err = writer.WriteStringValue("appActionIfAndroidSafetyNetAppsVerificationFailed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidSafetyNetDeviceAttestationFailed() != nil { + cast := (*m.GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()).String() + err = writer.WriteStringValue("appActionIfAndroidSafetyNetDeviceAttestationFailed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDeviceLockNotSet() != nil { + cast := (*m.GetAppActionIfDeviceLockNotSet()).String() + err = writer.WriteStringValue("appActionIfDeviceLockNotSet", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanHigh() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanHigh()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanHigh", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanLow() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanLow()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanLow", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanMedium() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanMedium()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanMedium", &cast) + if err != nil { + return err + } + } + if m.GetApprovedKeyboards() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApprovedKeyboards())) + for i, v := range m.GetApprovedKeyboards() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("approvedKeyboards", cast) + if err != nil { + return err + } + } + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("biometricAuthenticationBlocked", m.GetBiometricAuthenticationBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("blockAfterCompanyPortalUpdateDeferralInDays", m.GetBlockAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectToVpnOnLaunch", m.GetConnectToVpnOnLaunch()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserDisplayName", m.GetCustomBrowserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserPackageId", m.GetCustomBrowserPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppDisplayName", m.GetCustomDialerAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppPackageId", m.GetCustomDialerAppPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deployedAppCount", m.GetDeployedAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deploymentSummary", m.GetDeploymentSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceLockRequired", m.GetDeviceLockRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableAppEncryptionIfDeviceEncryptionIsEnabled", m.GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("encryptAppData", m.GetEncryptAppData()) + if err != nil { + return err + } + } + if m.GetExemptedAppPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExemptedAppPackages())) + for i, v := range m.GetExemptedAppPackages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exemptedAppPackages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fingerprintAndBiometricEnabled", m.GetFingerprintAndBiometricEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardsRestricted", m.GetKeyboardsRestricted()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredCompanyPortalVersion", m.GetMinimumRequiredCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredPatchVersion", m.GetMinimumRequiredPatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningCompanyPortalVersion", m.GetMinimumWarningCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningPatchVersion", m.GetMinimumWarningPatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeCompanyPortalVersion", m.GetMinimumWipeCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipePatchVersion", m.GetMinimumWipePatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireClass3Biometrics", m.GetRequireClass3Biometrics()) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetAppsVerificationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetAppsVerificationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetAppsVerificationType", &cast) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetDeviceAttestationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetDeviceAttestationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetDeviceAttestationType", &cast) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetEvaluationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetEvaluationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetEvaluationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requirePinAfterBiometricChange", m.GetRequirePinAfterBiometricChange()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("warnAfterCompanyPortalUpdateDeferralInDays", m.GetWarnAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("wipeAfterCompanyPortalUpdateDeferralInDays", m.GetWipeAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedAndroidDeviceManufacturers sets the allowedAndroidDeviceManufacturers property value. Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. +func (m *AndroidManagedAppProtection) SetAllowedAndroidDeviceManufacturers(value *string)() { + m.allowedAndroidDeviceManufacturers = value +} +// SetAllowedAndroidDeviceModels sets the allowedAndroidDeviceModels property value. List of device models allowed, as a string, for the managed app to work. +func (m *AndroidManagedAppProtection) SetAllowedAndroidDeviceModels(value []string)() { + m.allowedAndroidDeviceModels = value +} +// SetAppActionIfAndroidDeviceManufacturerNotAllowed sets the appActionIfAndroidDeviceManufacturerNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) SetAppActionIfAndroidDeviceManufacturerNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidDeviceManufacturerNotAllowed = value +} +// SetAppActionIfAndroidDeviceModelNotAllowed sets the appActionIfAndroidDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) SetAppActionIfAndroidDeviceModelNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidDeviceModelNotAllowed = value +} +// SetAppActionIfAndroidSafetyNetAppsVerificationFailed sets the appActionIfAndroidSafetyNetAppsVerificationFailed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) SetAppActionIfAndroidSafetyNetAppsVerificationFailed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidSafetyNetAppsVerificationFailed = value +} +// SetAppActionIfAndroidSafetyNetDeviceAttestationFailed sets the appActionIfAndroidSafetyNetDeviceAttestationFailed property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidSafetyNetDeviceAttestationFailed = value +} +// SetAppActionIfDeviceLockNotSet sets the appActionIfDeviceLockNotSet property value. An admin initiated action to be applied on a managed app. +func (m *AndroidManagedAppProtection) SetAppActionIfDeviceLockNotSet(value *ManagedAppRemediationAction)() { + m.appActionIfDeviceLockNotSet = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanHigh sets the appActionIfDevicePasscodeComplexityLessThanHigh property value. If the device does not have a passcode of high complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanHigh(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanHigh = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanLow sets the appActionIfDevicePasscodeComplexityLessThanLow property value. If the device does not have a passcode of low complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanLow(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanLow = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanMedium sets the appActionIfDevicePasscodeComplexityLessThanMedium property value. If the device does not have a passcode of medium complexity or higher, trigger the stored action. +func (m *AndroidManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanMedium(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanMedium = value +} +// SetApprovedKeyboards sets the approvedKeyboards property value. If Keyboard Restriction is enabled, only keyboards in this approved list will be allowed. A key should be Android package id for a keyboard and value should be a friendly name +func (m *AndroidManagedAppProtection) SetApprovedKeyboards(value []KeyValuePairable)() { + m.approvedKeyboards = value +} +// SetApps sets the apps property value. List of apps to which the policy is deployed. +func (m *AndroidManagedAppProtection) SetApps(value []ManagedMobileAppable)() { + m.apps = value +} +// SetBiometricAuthenticationBlocked sets the biometricAuthenticationBlocked property value. Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. +func (m *AndroidManagedAppProtection) SetBiometricAuthenticationBlocked(value *bool)() { + m.biometricAuthenticationBlocked = value +} +// SetBlockAfterCompanyPortalUpdateDeferralInDays sets the blockAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. +func (m *AndroidManagedAppProtection) SetBlockAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.blockAfterCompanyPortalUpdateDeferralInDays = value +} +// SetConnectToVpnOnLaunch sets the connectToVpnOnLaunch property value. Whether the app should connect to the configured VPN on launch. +func (m *AndroidManagedAppProtection) SetConnectToVpnOnLaunch(value *bool)() { + m.connectToVpnOnLaunch = value +} +// SetCustomBrowserDisplayName sets the customBrowserDisplayName property value. Friendly name of the preferred custom browser to open weblink on Android. +func (m *AndroidManagedAppProtection) SetCustomBrowserDisplayName(value *string)() { + m.customBrowserDisplayName = value +} +// SetCustomBrowserPackageId sets the customBrowserPackageId property value. Unique identifier of a custom browser to open weblink on Android. +func (m *AndroidManagedAppProtection) SetCustomBrowserPackageId(value *string)() { + m.customBrowserPackageId = value +} +// SetCustomDialerAppDisplayName sets the customDialerAppDisplayName property value. Friendly name of a custom dialer app to click-to-open a phone number on Android. +func (m *AndroidManagedAppProtection) SetCustomDialerAppDisplayName(value *string)() { + m.customDialerAppDisplayName = value +} +// SetCustomDialerAppPackageId sets the customDialerAppPackageId property value. PackageId of a custom dialer app to click-to-open a phone number on Android. +func (m *AndroidManagedAppProtection) SetCustomDialerAppPackageId(value *string)() { + m.customDialerAppPackageId = value +} +// SetDeployedAppCount sets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *AndroidManagedAppProtection) SetDeployedAppCount(value *int32)() { + m.deployedAppCount = value +} +// SetDeploymentSummary sets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *AndroidManagedAppProtection) SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() { + m.deploymentSummary = value +} +// SetDeviceLockRequired sets the deviceLockRequired property value. Defines if any kind of lock must be required on android device +func (m *AndroidManagedAppProtection) SetDeviceLockRequired(value *bool)() { + m.deviceLockRequired = value +} +// SetDisableAppEncryptionIfDeviceEncryptionIsEnabled sets the disableAppEncryptionIfDeviceEncryptionIsEnabled property value. When this setting is enabled, app level encryption is disabled if device level encryption is enabled +func (m *AndroidManagedAppProtection) SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(value *bool)() { + m.disableAppEncryptionIfDeviceEncryptionIsEnabled = value +} +// SetEncryptAppData sets the encryptAppData property value. Indicates whether application data for managed apps should be encrypted +func (m *AndroidManagedAppProtection) SetEncryptAppData(value *bool)() { + m.encryptAppData = value +} +// SetExemptedAppPackages sets the exemptedAppPackages property value. App packages in this list will be exempt from the policy and will be able to receive data from managed apps. +func (m *AndroidManagedAppProtection) SetExemptedAppPackages(value []KeyValuePairable)() { + m.exemptedAppPackages = value +} +// SetFingerprintAndBiometricEnabled sets the fingerprintAndBiometricEnabled property value. If null, this setting will be ignored. If false both fingerprints and biometrics will not be enabled. If true, both fingerprints and biometrics will be enabled. +func (m *AndroidManagedAppProtection) SetFingerprintAndBiometricEnabled(value *bool)() { + m.fingerprintAndBiometricEnabled = value +} +// SetKeyboardsRestricted sets the keyboardsRestricted property value. Indicates if keyboard restriction is enabled. If enabled list of approved keyboards must be provided as well. +func (m *AndroidManagedAppProtection) SetKeyboardsRestricted(value *bool)() { + m.keyboardsRestricted = value +} +// SetMinimumRequiredCompanyPortalVersion sets the minimumRequiredCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or app access will be blocked +func (m *AndroidManagedAppProtection) SetMinimumRequiredCompanyPortalVersion(value *string)() { + m.minimumRequiredCompanyPortalVersion = value +} +// SetMinimumRequiredPatchVersion sets the minimumRequiredPatchVersion property value. Define the oldest required Android security patch level a user can have to gain secure access to the app. +func (m *AndroidManagedAppProtection) SetMinimumRequiredPatchVersion(value *string)() { + m.minimumRequiredPatchVersion = value +} +// SetMinimumWarningCompanyPortalVersion sets the minimumWarningCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the user will receive a warning +func (m *AndroidManagedAppProtection) SetMinimumWarningCompanyPortalVersion(value *string)() { + m.minimumWarningCompanyPortalVersion = value +} +// SetMinimumWarningPatchVersion sets the minimumWarningPatchVersion property value. Define the oldest recommended Android security patch level a user can have for secure access to the app. +func (m *AndroidManagedAppProtection) SetMinimumWarningPatchVersion(value *string)() { + m.minimumWarningPatchVersion = value +} +// SetMinimumWipeCompanyPortalVersion sets the minimumWipeCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped +func (m *AndroidManagedAppProtection) SetMinimumWipeCompanyPortalVersion(value *string)() { + m.minimumWipeCompanyPortalVersion = value +} +// SetMinimumWipePatchVersion sets the minimumWipePatchVersion property value. Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. +func (m *AndroidManagedAppProtection) SetMinimumWipePatchVersion(value *string)() { + m.minimumWipePatchVersion = value +} +// SetRequireClass3Biometrics sets the requireClass3Biometrics property value. Require user to apply Class 3 Biometrics on their Android device. +func (m *AndroidManagedAppProtection) SetRequireClass3Biometrics(value *bool)() { + m.requireClass3Biometrics = value +} +// SetRequiredAndroidSafetyNetAppsVerificationType sets the requiredAndroidSafetyNetAppsVerificationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *AndroidManagedAppProtection) SetRequiredAndroidSafetyNetAppsVerificationType(value *AndroidManagedAppSafetyNetAppsVerificationType)() { + m.requiredAndroidSafetyNetAppsVerificationType = value +} +// SetRequiredAndroidSafetyNetDeviceAttestationType sets the requiredAndroidSafetyNetDeviceAttestationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *AndroidManagedAppProtection) SetRequiredAndroidSafetyNetDeviceAttestationType(value *AndroidManagedAppSafetyNetDeviceAttestationType)() { + m.requiredAndroidSafetyNetDeviceAttestationType = value +} +// SetRequiredAndroidSafetyNetEvaluationType sets the requiredAndroidSafetyNetEvaluationType property value. An admin enforced Android SafetyNet evaluation type requirement on a managed app. +func (m *AndroidManagedAppProtection) SetRequiredAndroidSafetyNetEvaluationType(value *AndroidManagedAppSafetyNetEvaluationType)() { + m.requiredAndroidSafetyNetEvaluationType = value +} +// SetRequirePinAfterBiometricChange sets the requirePinAfterBiometricChange property value. A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. +func (m *AndroidManagedAppProtection) SetRequirePinAfterBiometricChange(value *bool)() { + m.requirePinAfterBiometricChange = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether a managed user can take screen captures of managed apps +func (m *AndroidManagedAppProtection) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetWarnAfterCompanyPortalUpdateDeferralInDays sets the warnAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning +func (m *AndroidManagedAppProtection) SetWarnAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.warnAfterCompanyPortalUpdateDeferralInDays = value +} +// SetWipeAfterCompanyPortalUpdateDeferralInDays sets the wipeAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped +func (m *AndroidManagedAppProtection) SetWipeAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.wipeAfterCompanyPortalUpdateDeferralInDays = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_response.go new file mode 100644 index 000000000..17f72041e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppProtectionCollectionResponse +type AndroidManagedAppProtectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedAppProtectionable +} +// NewAndroidManagedAppProtectionCollectionResponse instantiates a new AndroidManagedAppProtectionCollectionResponse and sets the default values. +func NewAndroidManagedAppProtectionCollectionResponse()(*AndroidManagedAppProtectionCollectionResponse) { + m := &AndroidManagedAppProtectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedAppProtectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedAppProtectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedAppProtectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedAppProtectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedAppProtectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedAppProtectionCollectionResponse) GetValue()([]AndroidManagedAppProtectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedAppProtectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedAppProtectionCollectionResponse) SetValue(value []AndroidManagedAppProtectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_responseable.go new file mode 100644 index 000000000..39bebcdf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_protection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppProtectionCollectionResponseable +type AndroidManagedAppProtectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedAppProtectionable) + SetValue(value []AndroidManagedAppProtectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_protectionable.go b/src/internal/connector/graph/betasdk/models/android_managed_app_protectionable.go new file mode 100644 index 000000000..b7ae54bde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_protectionable.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppProtectionable +type AndroidManagedAppProtectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TargetedManagedAppProtectionable + GetAllowedAndroidDeviceManufacturers()(*string) + GetAllowedAndroidDeviceModels()([]string) + GetAppActionIfAndroidDeviceManufacturerNotAllowed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidDeviceModelNotAllowed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidSafetyNetAppsVerificationFailed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()(*ManagedAppRemediationAction) + GetAppActionIfDeviceLockNotSet()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanHigh()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanLow()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanMedium()(*ManagedAppRemediationAction) + GetApprovedKeyboards()([]KeyValuePairable) + GetApps()([]ManagedMobileAppable) + GetBiometricAuthenticationBlocked()(*bool) + GetBlockAfterCompanyPortalUpdateDeferralInDays()(*int32) + GetConnectToVpnOnLaunch()(*bool) + GetCustomBrowserDisplayName()(*string) + GetCustomBrowserPackageId()(*string) + GetCustomDialerAppDisplayName()(*string) + GetCustomDialerAppPackageId()(*string) + GetDeployedAppCount()(*int32) + GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) + GetDeviceLockRequired()(*bool) + GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()(*bool) + GetEncryptAppData()(*bool) + GetExemptedAppPackages()([]KeyValuePairable) + GetFingerprintAndBiometricEnabled()(*bool) + GetKeyboardsRestricted()(*bool) + GetMinimumRequiredCompanyPortalVersion()(*string) + GetMinimumRequiredPatchVersion()(*string) + GetMinimumWarningCompanyPortalVersion()(*string) + GetMinimumWarningPatchVersion()(*string) + GetMinimumWipeCompanyPortalVersion()(*string) + GetMinimumWipePatchVersion()(*string) + GetRequireClass3Biometrics()(*bool) + GetRequiredAndroidSafetyNetAppsVerificationType()(*AndroidManagedAppSafetyNetAppsVerificationType) + GetRequiredAndroidSafetyNetDeviceAttestationType()(*AndroidManagedAppSafetyNetDeviceAttestationType) + GetRequiredAndroidSafetyNetEvaluationType()(*AndroidManagedAppSafetyNetEvaluationType) + GetRequirePinAfterBiometricChange()(*bool) + GetScreenCaptureBlocked()(*bool) + GetWarnAfterCompanyPortalUpdateDeferralInDays()(*int32) + GetWipeAfterCompanyPortalUpdateDeferralInDays()(*int32) + SetAllowedAndroidDeviceManufacturers(value *string)() + SetAllowedAndroidDeviceModels(value []string)() + SetAppActionIfAndroidDeviceManufacturerNotAllowed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidDeviceModelNotAllowed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidSafetyNetAppsVerificationFailed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(value *ManagedAppRemediationAction)() + SetAppActionIfDeviceLockNotSet(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanHigh(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanLow(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanMedium(value *ManagedAppRemediationAction)() + SetApprovedKeyboards(value []KeyValuePairable)() + SetApps(value []ManagedMobileAppable)() + SetBiometricAuthenticationBlocked(value *bool)() + SetBlockAfterCompanyPortalUpdateDeferralInDays(value *int32)() + SetConnectToVpnOnLaunch(value *bool)() + SetCustomBrowserDisplayName(value *string)() + SetCustomBrowserPackageId(value *string)() + SetCustomDialerAppDisplayName(value *string)() + SetCustomDialerAppPackageId(value *string)() + SetDeployedAppCount(value *int32)() + SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() + SetDeviceLockRequired(value *bool)() + SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(value *bool)() + SetEncryptAppData(value *bool)() + SetExemptedAppPackages(value []KeyValuePairable)() + SetFingerprintAndBiometricEnabled(value *bool)() + SetKeyboardsRestricted(value *bool)() + SetMinimumRequiredCompanyPortalVersion(value *string)() + SetMinimumRequiredPatchVersion(value *string)() + SetMinimumWarningCompanyPortalVersion(value *string)() + SetMinimumWarningPatchVersion(value *string)() + SetMinimumWipeCompanyPortalVersion(value *string)() + SetMinimumWipePatchVersion(value *string)() + SetRequireClass3Biometrics(value *bool)() + SetRequiredAndroidSafetyNetAppsVerificationType(value *AndroidManagedAppSafetyNetAppsVerificationType)() + SetRequiredAndroidSafetyNetDeviceAttestationType(value *AndroidManagedAppSafetyNetDeviceAttestationType)() + SetRequiredAndroidSafetyNetEvaluationType(value *AndroidManagedAppSafetyNetEvaluationType)() + SetRequirePinAfterBiometricChange(value *bool)() + SetScreenCaptureBlocked(value *bool)() + SetWarnAfterCompanyPortalUpdateDeferralInDays(value *int32)() + SetWipeAfterCompanyPortalUpdateDeferralInDays(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_registration.go b/src/internal/connector/graph/betasdk/models/android_managed_app_registration.go new file mode 100644 index 000000000..e34a7b81a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_registration.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppRegistration +type AndroidManagedAppRegistration struct { + ManagedAppRegistration + // The patch version for the current android app registration + patchVersion *string +} +// NewAndroidManagedAppRegistration instantiates a new AndroidManagedAppRegistration and sets the default values. +func NewAndroidManagedAppRegistration()(*AndroidManagedAppRegistration) { + m := &AndroidManagedAppRegistration{ + ManagedAppRegistration: *NewManagedAppRegistration(), + } + odataTypeValue := "#microsoft.graph.androidManagedAppRegistration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedAppRegistrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedAppRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedAppRegistration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedAppRegistration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppRegistration.GetFieldDeserializers() + res["patchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPatchVersion(val) + } + return nil + } + return res +} +// GetPatchVersion gets the patchVersion property value. The patch version for the current android app registration +func (m *AndroidManagedAppRegistration) GetPatchVersion()(*string) { + return m.patchVersion +} +// Serialize serializes information the current object +func (m *AndroidManagedAppRegistration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppRegistration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("patchVersion", m.GetPatchVersion()) + if err != nil { + return err + } + } + return nil +} +// SetPatchVersion sets the patchVersion property value. The patch version for the current android app registration +func (m *AndroidManagedAppRegistration) SetPatchVersion(value *string)() { + m.patchVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_response.go new file mode 100644 index 000000000..efff11c8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppRegistrationCollectionResponse +type AndroidManagedAppRegistrationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedAppRegistrationable +} +// NewAndroidManagedAppRegistrationCollectionResponse instantiates a new AndroidManagedAppRegistrationCollectionResponse and sets the default values. +func NewAndroidManagedAppRegistrationCollectionResponse()(*AndroidManagedAppRegistrationCollectionResponse) { + m := &AndroidManagedAppRegistrationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedAppRegistrationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedAppRegistrationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedAppRegistrationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedAppRegistrationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedAppRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedAppRegistrationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedAppRegistrationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedAppRegistrationCollectionResponse) GetValue()([]AndroidManagedAppRegistrationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedAppRegistrationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedAppRegistrationCollectionResponse) SetValue(value []AndroidManagedAppRegistrationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_responseable.go new file mode 100644 index 000000000..2120c4e96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_registration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppRegistrationCollectionResponseable +type AndroidManagedAppRegistrationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedAppRegistrationable) + SetValue(value []AndroidManagedAppRegistrationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_registrationable.go b/src/internal/connector/graph/betasdk/models/android_managed_app_registrationable.go new file mode 100644 index 000000000..a9a66f90c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_registrationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedAppRegistrationable +type AndroidManagedAppRegistrationable interface { + ManagedAppRegistrationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPatchVersion()(*string) + SetPatchVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_apps_verification_type.go b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_apps_verification_type.go new file mode 100644 index 000000000..3c9dbfff6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_apps_verification_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedAppSafetyNetAppsVerificationType int + +const ( + // no requirement set + NONE_ANDROIDMANAGEDAPPSAFETYNETAPPSVERIFICATIONTYPE AndroidManagedAppSafetyNetAppsVerificationType = iota + // require that Android device has SafetyNet Apps Verification enabled + ENABLED_ANDROIDMANAGEDAPPSAFETYNETAPPSVERIFICATIONTYPE +) + +func (i AndroidManagedAppSafetyNetAppsVerificationType) String() string { + return []string{"none", "enabled"}[i] +} +func ParseAndroidManagedAppSafetyNetAppsVerificationType(v string) (interface{}, error) { + result := NONE_ANDROIDMANAGEDAPPSAFETYNETAPPSVERIFICATIONTYPE + switch v { + case "none": + result = NONE_ANDROIDMANAGEDAPPSAFETYNETAPPSVERIFICATIONTYPE + case "enabled": + result = ENABLED_ANDROIDMANAGEDAPPSAFETYNETAPPSVERIFICATIONTYPE + default: + return 0, errors.New("Unknown AndroidManagedAppSafetyNetAppsVerificationType value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedAppSafetyNetAppsVerificationType(values []AndroidManagedAppSafetyNetAppsVerificationType) []string { + 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/android_managed_app_safety_net_device_attestation_type.go b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_device_attestation_type.go new file mode 100644 index 000000000..81ba22d9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_device_attestation_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedAppSafetyNetDeviceAttestationType int + +const ( + // no requirement set + NONE_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE AndroidManagedAppSafetyNetDeviceAttestationType = iota + // require that Android device passes SafetyNet Basic Integrity validation + BASICINTEGRITY_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE + // require that Android device passes SafetyNet Basic Integrity and Device Certification validations + BASICINTEGRITYANDDEVICECERTIFICATION_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE +) + +func (i AndroidManagedAppSafetyNetDeviceAttestationType) String() string { + return []string{"none", "basicIntegrity", "basicIntegrityAndDeviceCertification"}[i] +} +func ParseAndroidManagedAppSafetyNetDeviceAttestationType(v string) (interface{}, error) { + result := NONE_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE + switch v { + case "none": + result = NONE_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE + case "basicIntegrity": + result = BASICINTEGRITY_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE + case "basicIntegrityAndDeviceCertification": + result = BASICINTEGRITYANDDEVICECERTIFICATION_ANDROIDMANAGEDAPPSAFETYNETDEVICEATTESTATIONTYPE + default: + return 0, errors.New("Unknown AndroidManagedAppSafetyNetDeviceAttestationType value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedAppSafetyNetDeviceAttestationType(values []AndroidManagedAppSafetyNetDeviceAttestationType) []string { + 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/android_managed_app_safety_net_evaluation_type.go b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_evaluation_type.go new file mode 100644 index 000000000..26d3ff82d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_app_safety_net_evaluation_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedAppSafetyNetEvaluationType int + +const ( + // Require basic evaluation + BASIC_ANDROIDMANAGEDAPPSAFETYNETEVALUATIONTYPE AndroidManagedAppSafetyNetEvaluationType = iota + // Require hardware backed evaluation + HARDWAREBACKED_ANDROIDMANAGEDAPPSAFETYNETEVALUATIONTYPE +) + +func (i AndroidManagedAppSafetyNetEvaluationType) String() string { + return []string{"basic", "hardwareBacked"}[i] +} +func ParseAndroidManagedAppSafetyNetEvaluationType(v string) (interface{}, error) { + result := BASIC_ANDROIDMANAGEDAPPSAFETYNETEVALUATIONTYPE + switch v { + case "basic": + result = BASIC_ANDROIDMANAGEDAPPSAFETYNETEVALUATIONTYPE + case "hardwareBacked": + result = HARDWAREBACKED_ANDROIDMANAGEDAPPSAFETYNETEVALUATIONTYPE + default: + return 0, errors.New("Unknown AndroidManagedAppSafetyNetEvaluationType value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedAppSafetyNetEvaluationType(values []AndroidManagedAppSafetyNetEvaluationType) []string { + 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/android_managed_store_account_app_sync_status.go b/src/internal/connector/graph/betasdk/models/android_managed_store_account_app_sync_status.go new file mode 100644 index 000000000..aafdafdd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_account_app_sync_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedStoreAccountAppSyncStatus int + +const ( + SUCCESS_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS AndroidManagedStoreAccountAppSyncStatus = iota + CREDENTIALSNOTVALID_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + ANDROIDFORWORKAPIERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + MANAGEMENTSERVICEERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + UNKNOWNERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + NONE_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS +) + +func (i AndroidManagedStoreAccountAppSyncStatus) String() string { + return []string{"success", "credentialsNotValid", "androidForWorkApiError", "managementServiceError", "unknownError", "none"}[i] +} +func ParseAndroidManagedStoreAccountAppSyncStatus(v string) (interface{}, error) { + result := SUCCESS_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + switch v { + case "success": + result = SUCCESS_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + case "credentialsNotValid": + result = CREDENTIALSNOTVALID_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + case "androidForWorkApiError": + result = ANDROIDFORWORKAPIERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + case "managementServiceError": + result = MANAGEMENTSERVICEERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + case "unknownError": + result = UNKNOWNERROR_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + case "none": + result = NONE_ANDROIDMANAGEDSTOREACCOUNTAPPSYNCSTATUS + default: + return 0, errors.New("Unknown AndroidManagedStoreAccountAppSyncStatus value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedStoreAccountAppSyncStatus(values []AndroidManagedStoreAccountAppSyncStatus) []string { + 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/android_managed_store_account_bind_status.go b/src/internal/connector/graph/betasdk/models/android_managed_store_account_bind_status.go new file mode 100644 index 000000000..256f74c0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_account_bind_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedStoreAccountBindStatus int + +const ( + NOTBOUND_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS AndroidManagedStoreAccountBindStatus = iota + BOUND_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + BOUNDANDVALIDATED_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + UNBINDING_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS +) + +func (i AndroidManagedStoreAccountBindStatus) String() string { + return []string{"notBound", "bound", "boundAndValidated", "unbinding"}[i] +} +func ParseAndroidManagedStoreAccountBindStatus(v string) (interface{}, error) { + result := NOTBOUND_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + switch v { + case "notBound": + result = NOTBOUND_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + case "bound": + result = BOUND_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + case "boundAndValidated": + result = BOUNDANDVALIDATED_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + case "unbinding": + result = UNBINDING_ANDROIDMANAGEDSTOREACCOUNTBINDSTATUS + default: + return 0, errors.New("Unknown AndroidManagedStoreAccountBindStatus value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedStoreAccountBindStatus(values []AndroidManagedStoreAccountBindStatus) []string { + 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/android_managed_store_account_enrollment_target.go b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enrollment_target.go new file mode 100644 index 000000000..1035f0d97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enrollment_target.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedStoreAccountEnrollmentTarget int + +const ( + NONE_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET AndroidManagedStoreAccountEnrollmentTarget = iota + ALL_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + TARGETED_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + TARGETEDASENROLLMENTRESTRICTIONS_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET +) + +func (i AndroidManagedStoreAccountEnrollmentTarget) String() string { + return []string{"none", "all", "targeted", "targetedAsEnrollmentRestrictions"}[i] +} +func ParseAndroidManagedStoreAccountEnrollmentTarget(v string) (interface{}, error) { + result := NONE_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + switch v { + case "none": + result = NONE_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + case "all": + result = ALL_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + case "targeted": + result = TARGETED_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + case "targetedAsEnrollmentRestrictions": + result = TARGETEDASENROLLMENTRESTRICTIONS_ANDROIDMANAGEDSTOREACCOUNTENROLLMENTTARGET + default: + return 0, errors.New("Unknown AndroidManagedStoreAccountEnrollmentTarget value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedStoreAccountEnrollmentTarget(values []AndroidManagedStoreAccountEnrollmentTarget) []string { + 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/android_managed_store_account_enterprise_settings.go b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enterprise_settings.go new file mode 100644 index 000000000..3abc7893f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enterprise_settings.go @@ -0,0 +1,366 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAccountEnterpriseSettings +type AndroidManagedStoreAccountEnterpriseSettings struct { + Entity + // Company codes for AndroidManagedStoreAccountEnterpriseSettings + androidDeviceOwnerFullyManagedEnrollmentEnabled *bool + // Bind status of the tenant with the Google EMM API + bindStatus *AndroidManagedStoreAccountBindStatus + // Company codes for AndroidManagedStoreAccountEnterpriseSettings + companyCodes []AndroidEnrollmentCompanyCodeable + // Indicates if this account is flighting for Android Device Owner Management with CloudDPC. + deviceOwnerManagementEnabled *bool + // Android for Work device management targeting type for the account + enrollmentTarget *AndroidManagedStoreAccountEnrollmentTarget + // Last completion time for app sync + lastAppSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Sync status of the tenant with the Google EMM API + lastAppSyncStatus *AndroidManagedStoreAccountAppSyncStatus + // Last modification time for Android enterprise settings + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Initial scope tags for MGP apps + managedGooglePlayInitialScopeTagIds []string + // Organization name used when onboarding Android Enterprise + ownerOrganizationName *string + // Owner UPN that created the enterprise + ownerUserPrincipalName *string + // Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' + targetGroupIds []string +} +// NewAndroidManagedStoreAccountEnterpriseSettings instantiates a new androidManagedStoreAccountEnterpriseSettings and sets the default values. +func NewAndroidManagedStoreAccountEnterpriseSettings()(*AndroidManagedStoreAccountEnterpriseSettings) { + m := &AndroidManagedStoreAccountEnterpriseSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidManagedStoreAccountEnterpriseSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAccountEnterpriseSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAccountEnterpriseSettings(), nil +} +// GetAndroidDeviceOwnerFullyManagedEnrollmentEnabled gets the androidDeviceOwnerFullyManagedEnrollmentEnabled property value. Company codes for AndroidManagedStoreAccountEnterpriseSettings +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetAndroidDeviceOwnerFullyManagedEnrollmentEnabled()(*bool) { + return m.androidDeviceOwnerFullyManagedEnrollmentEnabled +} +// GetBindStatus gets the bindStatus property value. Bind status of the tenant with the Google EMM API +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetBindStatus()(*AndroidManagedStoreAccountBindStatus) { + return m.bindStatus +} +// GetCompanyCodes gets the companyCodes property value. Company codes for AndroidManagedStoreAccountEnterpriseSettings +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetCompanyCodes()([]AndroidEnrollmentCompanyCodeable) { + return m.companyCodes +} +// GetDeviceOwnerManagementEnabled gets the deviceOwnerManagementEnabled property value. Indicates if this account is flighting for Android Device Owner Management with CloudDPC. +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetDeviceOwnerManagementEnabled()(*bool) { + return m.deviceOwnerManagementEnabled +} +// GetEnrollmentTarget gets the enrollmentTarget property value. Android for Work device management targeting type for the account +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetEnrollmentTarget()(*AndroidManagedStoreAccountEnrollmentTarget) { + return m.enrollmentTarget +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["androidDeviceOwnerFullyManagedEnrollmentEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidDeviceOwnerFullyManagedEnrollmentEnabled(val) + } + return nil + } + res["bindStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedStoreAccountBindStatus) + if err != nil { + return err + } + if val != nil { + m.SetBindStatus(val.(*AndroidManagedStoreAccountBindStatus)) + } + return nil + } + res["companyCodes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidEnrollmentCompanyCodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidEnrollmentCompanyCodeable, len(val)) + for i, v := range val { + res[i] = v.(AndroidEnrollmentCompanyCodeable) + } + m.SetCompanyCodes(res) + } + return nil + } + res["deviceOwnerManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOwnerManagementEnabled(val) + } + return nil + } + res["enrollmentTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedStoreAccountEnrollmentTarget) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentTarget(val.(*AndroidManagedStoreAccountEnrollmentTarget)) + } + return nil + } + res["lastAppSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastAppSyncDateTime(val) + } + return nil + } + res["lastAppSyncStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedStoreAccountAppSyncStatus) + if err != nil { + return err + } + if val != nil { + m.SetLastAppSyncStatus(val.(*AndroidManagedStoreAccountAppSyncStatus)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["managedGooglePlayInitialScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetManagedGooglePlayInitialScopeTagIds(res) + } + return nil + } + res["ownerOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerOrganizationName(val) + } + return nil + } + res["ownerUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerUserPrincipalName(val) + } + return nil + } + res["targetGroupIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetGroupIds(res) + } + return nil + } + return res +} +// GetLastAppSyncDateTime gets the lastAppSyncDateTime property value. Last completion time for app sync +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetLastAppSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastAppSyncDateTime +} +// GetLastAppSyncStatus gets the lastAppSyncStatus property value. Sync status of the tenant with the Google EMM API +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetLastAppSyncStatus()(*AndroidManagedStoreAccountAppSyncStatus) { + return m.lastAppSyncStatus +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modification time for Android enterprise settings +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetManagedGooglePlayInitialScopeTagIds gets the managedGooglePlayInitialScopeTagIds property value. Initial scope tags for MGP apps +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetManagedGooglePlayInitialScopeTagIds()([]string) { + return m.managedGooglePlayInitialScopeTagIds +} +// GetOwnerOrganizationName gets the ownerOrganizationName property value. Organization name used when onboarding Android Enterprise +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetOwnerOrganizationName()(*string) { + return m.ownerOrganizationName +} +// GetOwnerUserPrincipalName gets the ownerUserPrincipalName property value. Owner UPN that created the enterprise +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetOwnerUserPrincipalName()(*string) { + return m.ownerUserPrincipalName +} +// GetTargetGroupIds gets the targetGroupIds property value. Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' +func (m *AndroidManagedStoreAccountEnterpriseSettings) GetTargetGroupIds()([]string) { + return m.targetGroupIds +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAccountEnterpriseSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("androidDeviceOwnerFullyManagedEnrollmentEnabled", m.GetAndroidDeviceOwnerFullyManagedEnrollmentEnabled()) + if err != nil { + return err + } + } + if m.GetBindStatus() != nil { + cast := (*m.GetBindStatus()).String() + err = writer.WriteStringValue("bindStatus", &cast) + if err != nil { + return err + } + } + if m.GetCompanyCodes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompanyCodes())) + for i, v := range m.GetCompanyCodes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("companyCodes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceOwnerManagementEnabled", m.GetDeviceOwnerManagementEnabled()) + if err != nil { + return err + } + } + if m.GetEnrollmentTarget() != nil { + cast := (*m.GetEnrollmentTarget()).String() + err = writer.WriteStringValue("enrollmentTarget", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastAppSyncDateTime", m.GetLastAppSyncDateTime()) + if err != nil { + return err + } + } + if m.GetLastAppSyncStatus() != nil { + cast := (*m.GetLastAppSyncStatus()).String() + err = writer.WriteStringValue("lastAppSyncStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetManagedGooglePlayInitialScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("managedGooglePlayInitialScopeTagIds", m.GetManagedGooglePlayInitialScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerOrganizationName", m.GetOwnerOrganizationName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerUserPrincipalName", m.GetOwnerUserPrincipalName()) + if err != nil { + return err + } + } + if m.GetTargetGroupIds() != nil { + err = writer.WriteCollectionOfStringValues("targetGroupIds", m.GetTargetGroupIds()) + if err != nil { + return err + } + } + return nil +} +// SetAndroidDeviceOwnerFullyManagedEnrollmentEnabled sets the androidDeviceOwnerFullyManagedEnrollmentEnabled property value. Company codes for AndroidManagedStoreAccountEnterpriseSettings +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetAndroidDeviceOwnerFullyManagedEnrollmentEnabled(value *bool)() { + m.androidDeviceOwnerFullyManagedEnrollmentEnabled = value +} +// SetBindStatus sets the bindStatus property value. Bind status of the tenant with the Google EMM API +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetBindStatus(value *AndroidManagedStoreAccountBindStatus)() { + m.bindStatus = value +} +// SetCompanyCodes sets the companyCodes property value. Company codes for AndroidManagedStoreAccountEnterpriseSettings +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetCompanyCodes(value []AndroidEnrollmentCompanyCodeable)() { + m.companyCodes = value +} +// SetDeviceOwnerManagementEnabled sets the deviceOwnerManagementEnabled property value. Indicates if this account is flighting for Android Device Owner Management with CloudDPC. +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetDeviceOwnerManagementEnabled(value *bool)() { + m.deviceOwnerManagementEnabled = value +} +// SetEnrollmentTarget sets the enrollmentTarget property value. Android for Work device management targeting type for the account +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetEnrollmentTarget(value *AndroidManagedStoreAccountEnrollmentTarget)() { + m.enrollmentTarget = value +} +// SetLastAppSyncDateTime sets the lastAppSyncDateTime property value. Last completion time for app sync +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetLastAppSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastAppSyncDateTime = value +} +// SetLastAppSyncStatus sets the lastAppSyncStatus property value. Sync status of the tenant with the Google EMM API +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetLastAppSyncStatus(value *AndroidManagedStoreAccountAppSyncStatus)() { + m.lastAppSyncStatus = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modification time for Android enterprise settings +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetManagedGooglePlayInitialScopeTagIds sets the managedGooglePlayInitialScopeTagIds property value. Initial scope tags for MGP apps +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetManagedGooglePlayInitialScopeTagIds(value []string)() { + m.managedGooglePlayInitialScopeTagIds = value +} +// SetOwnerOrganizationName sets the ownerOrganizationName property value. Organization name used when onboarding Android Enterprise +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetOwnerOrganizationName(value *string)() { + m.ownerOrganizationName = value +} +// SetOwnerUserPrincipalName sets the ownerUserPrincipalName property value. Owner UPN that created the enterprise +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetOwnerUserPrincipalName(value *string)() { + m.ownerUserPrincipalName = value +} +// SetTargetGroupIds sets the targetGroupIds property value. Specifies which AAD groups can enroll devices in Android for Work device management if enrollmentTarget is set to 'Targeted' +func (m *AndroidManagedStoreAccountEnterpriseSettings) SetTargetGroupIds(value []string)() { + m.targetGroupIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_account_enterprise_settingsable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enterprise_settingsable.go new file mode 100644 index 000000000..f806ee838 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_account_enterprise_settingsable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAccountEnterpriseSettingsable +type AndroidManagedStoreAccountEnterpriseSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidDeviceOwnerFullyManagedEnrollmentEnabled()(*bool) + GetBindStatus()(*AndroidManagedStoreAccountBindStatus) + GetCompanyCodes()([]AndroidEnrollmentCompanyCodeable) + GetDeviceOwnerManagementEnabled()(*bool) + GetEnrollmentTarget()(*AndroidManagedStoreAccountEnrollmentTarget) + GetLastAppSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastAppSyncStatus()(*AndroidManagedStoreAccountAppSyncStatus) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedGooglePlayInitialScopeTagIds()([]string) + GetOwnerOrganizationName()(*string) + GetOwnerUserPrincipalName()(*string) + GetTargetGroupIds()([]string) + SetAndroidDeviceOwnerFullyManagedEnrollmentEnabled(value *bool)() + SetBindStatus(value *AndroidManagedStoreAccountBindStatus)() + SetCompanyCodes(value []AndroidEnrollmentCompanyCodeable)() + SetDeviceOwnerManagementEnabled(value *bool)() + SetEnrollmentTarget(value *AndroidManagedStoreAccountEnrollmentTarget)() + SetLastAppSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastAppSyncStatus(value *AndroidManagedStoreAccountAppSyncStatus)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedGooglePlayInitialScopeTagIds(value []string)() + SetOwnerOrganizationName(value *string)() + SetOwnerUserPrincipalName(value *string)() + SetTargetGroupIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app.go new file mode 100644 index 000000000..87e715514 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app.go @@ -0,0 +1,296 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreApp +type AndroidManagedStoreApp struct { + MobileApp + // The Identity Name. + appIdentifier *string + // The Play for Work Store app URL. + appStoreUrl *string + // The tracks that are visible to this enterprise. + appTracks []AndroidManagedStoreAppTrackable + // Indicates whether the app is only available to a given enterprise's users. + isPrivate *bool + // Indicates whether the app is a preinstalled system app. + isSystemApp *bool + // The package identifier. + packageId *string + // Whether this app supports OEMConfig policy. + supportsOemConfig *bool + // The total number of VPP licenses. + totalLicenseCount *int32 + // The number of VPP licenses in use. + usedLicenseCount *int32 +} +// NewAndroidManagedStoreApp instantiates a new AndroidManagedStoreApp and sets the default values. +func NewAndroidManagedStoreApp()(*AndroidManagedStoreApp) { + m := &AndroidManagedStoreApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.androidManagedStoreApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedStoreAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidManagedStoreWebApp": + return NewAndroidManagedStoreWebApp(), nil + } + } + } + } + return NewAndroidManagedStoreApp(), nil +} +// GetAppIdentifier gets the appIdentifier property value. The Identity Name. +func (m *AndroidManagedStoreApp) GetAppIdentifier()(*string) { + return m.appIdentifier +} +// GetAppStoreUrl gets the appStoreUrl property value. The Play for Work Store app URL. +func (m *AndroidManagedStoreApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetAppTracks gets the appTracks property value. The tracks that are visible to this enterprise. +func (m *AndroidManagedStoreApp) GetAppTracks()([]AndroidManagedStoreAppTrackable) { + return m.appTracks +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppIdentifier(val) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["appTracks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppTrackFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppTrackable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppTrackable) + } + m.SetAppTracks(res) + } + return nil + } + res["isPrivate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPrivate(val) + } + return nil + } + res["isSystemApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSystemApp(val) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["supportsOemConfig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportsOemConfig(val) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + return res +} +// GetIsPrivate gets the isPrivate property value. Indicates whether the app is only available to a given enterprise's users. +func (m *AndroidManagedStoreApp) GetIsPrivate()(*bool) { + return m.isPrivate +} +// GetIsSystemApp gets the isSystemApp property value. Indicates whether the app is a preinstalled system app. +func (m *AndroidManagedStoreApp) GetIsSystemApp()(*bool) { + return m.isSystemApp +} +// GetPackageId gets the packageId property value. The package identifier. +func (m *AndroidManagedStoreApp) GetPackageId()(*string) { + return m.packageId +} +// GetSupportsOemConfig gets the supportsOemConfig property value. Whether this app supports OEMConfig policy. +func (m *AndroidManagedStoreApp) GetSupportsOemConfig()(*bool) { + return m.supportsOemConfig +} +// GetTotalLicenseCount gets the totalLicenseCount property value. The total number of VPP licenses. +func (m *AndroidManagedStoreApp) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *AndroidManagedStoreApp) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appIdentifier", m.GetAppIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + if m.GetAppTracks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppTracks())) + for i, v := range m.GetAppTracks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appTracks", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPrivate", m.GetIsPrivate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSystemApp", m.GetIsSystemApp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("supportsOemConfig", m.GetSupportsOemConfig()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + return nil +} +// SetAppIdentifier sets the appIdentifier property value. The Identity Name. +func (m *AndroidManagedStoreApp) SetAppIdentifier(value *string)() { + m.appIdentifier = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Play for Work Store app URL. +func (m *AndroidManagedStoreApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetAppTracks sets the appTracks property value. The tracks that are visible to this enterprise. +func (m *AndroidManagedStoreApp) SetAppTracks(value []AndroidManagedStoreAppTrackable)() { + m.appTracks = value +} +// SetIsPrivate sets the isPrivate property value. Indicates whether the app is only available to a given enterprise's users. +func (m *AndroidManagedStoreApp) SetIsPrivate(value *bool)() { + m.isPrivate = value +} +// SetIsSystemApp sets the isSystemApp property value. Indicates whether the app is a preinstalled system app. +func (m *AndroidManagedStoreApp) SetIsSystemApp(value *bool)() { + m.isSystemApp = value +} +// SetPackageId sets the packageId property value. The package identifier. +func (m *AndroidManagedStoreApp) SetPackageId(value *string)() { + m.packageId = value +} +// SetSupportsOemConfig sets the supportsOemConfig property value. Whether this app supports OEMConfig policy. +func (m *AndroidManagedStoreApp) SetSupportsOemConfig(value *bool)() { + m.supportsOemConfig = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. The total number of VPP licenses. +func (m *AndroidManagedStoreApp) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *AndroidManagedStoreApp) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settings.go new file mode 100644 index 000000000..61f96d10a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settings.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppAssignmentSettings +type AndroidManagedStoreAppAssignmentSettings struct { + MobileAppAssignmentSettings + // The track IDs to enable for this app assignment. + androidManagedStoreAppTrackIds []string + // Prioritization for automatic updates of Android Managed Store apps set on assignment. + autoUpdateMode *AndroidManagedStoreAutoUpdateMode +} +// NewAndroidManagedStoreAppAssignmentSettings instantiates a new AndroidManagedStoreAppAssignmentSettings and sets the default values. +func NewAndroidManagedStoreAppAssignmentSettings()(*AndroidManagedStoreAppAssignmentSettings) { + m := &AndroidManagedStoreAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.androidManagedStoreAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedStoreAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppAssignmentSettings(), nil +} +// GetAndroidManagedStoreAppTrackIds gets the androidManagedStoreAppTrackIds property value. The track IDs to enable for this app assignment. +func (m *AndroidManagedStoreAppAssignmentSettings) GetAndroidManagedStoreAppTrackIds()([]string) { + return m.androidManagedStoreAppTrackIds +} +// GetAutoUpdateMode gets the autoUpdateMode property value. Prioritization for automatic updates of Android Managed Store apps set on assignment. +func (m *AndroidManagedStoreAppAssignmentSettings) GetAutoUpdateMode()(*AndroidManagedStoreAutoUpdateMode) { + return m.autoUpdateMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["androidManagedStoreAppTrackIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAndroidManagedStoreAppTrackIds(res) + } + return nil + } + res["autoUpdateMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedStoreAutoUpdateMode) + if err != nil { + return err + } + if val != nil { + m.SetAutoUpdateMode(val.(*AndroidManagedStoreAutoUpdateMode)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + if m.GetAndroidManagedStoreAppTrackIds() != nil { + err = writer.WriteCollectionOfStringValues("androidManagedStoreAppTrackIds", m.GetAndroidManagedStoreAppTrackIds()) + if err != nil { + return err + } + } + if m.GetAutoUpdateMode() != nil { + cast := (*m.GetAutoUpdateMode()).String() + err = writer.WriteStringValue("autoUpdateMode", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAndroidManagedStoreAppTrackIds sets the androidManagedStoreAppTrackIds property value. The track IDs to enable for this app assignment. +func (m *AndroidManagedStoreAppAssignmentSettings) SetAndroidManagedStoreAppTrackIds(value []string)() { + m.androidManagedStoreAppTrackIds = value +} +// SetAutoUpdateMode sets the autoUpdateMode property value. Prioritization for automatic updates of Android Managed Store apps set on assignment. +func (m *AndroidManagedStoreAppAssignmentSettings) SetAutoUpdateMode(value *AndroidManagedStoreAutoUpdateMode)() { + m.autoUpdateMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settingsable.go new file mode 100644 index 000000000..848a325f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_assignment_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppAssignmentSettingsable +type AndroidManagedStoreAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidManagedStoreAppTrackIds()([]string) + GetAutoUpdateMode()(*AndroidManagedStoreAutoUpdateMode) + SetAndroidManagedStoreAppTrackIds(value []string)() + SetAutoUpdateMode(value *AndroidManagedStoreAutoUpdateMode)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_response.go new file mode 100644 index 000000000..19d6a1345 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppCollectionResponse +type AndroidManagedStoreAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreAppable +} +// NewAndroidManagedStoreAppCollectionResponse instantiates a new AndroidManagedStoreAppCollectionResponse and sets the default values. +func NewAndroidManagedStoreAppCollectionResponse()(*AndroidManagedStoreAppCollectionResponse) { + m := &AndroidManagedStoreAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreAppCollectionResponse) GetValue()([]AndroidManagedStoreAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAppCollectionResponse) SetValue(value []AndroidManagedStoreAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_responseable.go new file mode 100644 index 000000000..f111c416f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppCollectionResponseable +type AndroidManagedStoreAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreAppable) + SetValue(value []AndroidManagedStoreAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration.go new file mode 100644 index 000000000..4a7ddb3e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfiguration +type AndroidManagedStoreAppConfiguration struct { + ManagedDeviceMobileAppConfiguration + // Whether or not this AppConfig is an OEMConfig policy. + appSupportsOemConfig *bool + // Setting to specify whether to allow ConnectedApps experience for this app. + connectedAppsEnabled *bool + // Android Enterprise app configuration package id. + packageId *string + // Android Enterprise app configuration JSON payload. + payloadJson *string + // List of Android app permissions and corresponding permission actions. + permissionActions []AndroidPermissionActionable + // Android profile applicability + profileApplicability *AndroidProfileApplicability +} +// NewAndroidManagedStoreAppConfiguration instantiates a new AndroidManagedStoreAppConfiguration and sets the default values. +func NewAndroidManagedStoreAppConfiguration()(*AndroidManagedStoreAppConfiguration) { + m := &AndroidManagedStoreAppConfiguration{ + ManagedDeviceMobileAppConfiguration: *NewManagedDeviceMobileAppConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidManagedStoreAppConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedStoreAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfiguration(), nil +} +// GetAppSupportsOemConfig gets the appSupportsOemConfig property value. Whether or not this AppConfig is an OEMConfig policy. +func (m *AndroidManagedStoreAppConfiguration) GetAppSupportsOemConfig()(*bool) { + return m.appSupportsOemConfig +} +// GetConnectedAppsEnabled gets the connectedAppsEnabled property value. Setting to specify whether to allow ConnectedApps experience for this app. +func (m *AndroidManagedStoreAppConfiguration) GetConnectedAppsEnabled()(*bool) { + return m.connectedAppsEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedDeviceMobileAppConfiguration.GetFieldDeserializers() + res["appSupportsOemConfig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppSupportsOemConfig(val) + } + return nil + } + res["connectedAppsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectedAppsEnabled(val) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["payloadJson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadJson(val) + } + return nil + } + res["permissionActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidPermissionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidPermissionActionable, len(val)) + for i, v := range val { + res[i] = v.(AndroidPermissionActionable) + } + m.SetPermissionActions(res) + } + return nil + } + res["profileApplicability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidProfileApplicability) + if err != nil { + return err + } + if val != nil { + m.SetProfileApplicability(val.(*AndroidProfileApplicability)) + } + return nil + } + return res +} +// GetPackageId gets the packageId property value. Android Enterprise app configuration package id. +func (m *AndroidManagedStoreAppConfiguration) GetPackageId()(*string) { + return m.packageId +} +// GetPayloadJson gets the payloadJson property value. Android Enterprise app configuration JSON payload. +func (m *AndroidManagedStoreAppConfiguration) GetPayloadJson()(*string) { + return m.payloadJson +} +// GetPermissionActions gets the permissionActions property value. List of Android app permissions and corresponding permission actions. +func (m *AndroidManagedStoreAppConfiguration) GetPermissionActions()([]AndroidPermissionActionable) { + return m.permissionActions +} +// GetProfileApplicability gets the profileApplicability property value. Android profile applicability +func (m *AndroidManagedStoreAppConfiguration) GetProfileApplicability()(*AndroidProfileApplicability) { + return m.profileApplicability +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedDeviceMobileAppConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appSupportsOemConfig", m.GetAppSupportsOemConfig()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectedAppsEnabled", m.GetConnectedAppsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadJson", m.GetPayloadJson()) + if err != nil { + return err + } + } + if m.GetPermissionActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissionActions())) + for i, v := range m.GetPermissionActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissionActions", cast) + if err != nil { + return err + } + } + if m.GetProfileApplicability() != nil { + cast := (*m.GetProfileApplicability()).String() + err = writer.WriteStringValue("profileApplicability", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAppSupportsOemConfig sets the appSupportsOemConfig property value. Whether or not this AppConfig is an OEMConfig policy. +func (m *AndroidManagedStoreAppConfiguration) SetAppSupportsOemConfig(value *bool)() { + m.appSupportsOemConfig = value +} +// SetConnectedAppsEnabled sets the connectedAppsEnabled property value. Setting to specify whether to allow ConnectedApps experience for this app. +func (m *AndroidManagedStoreAppConfiguration) SetConnectedAppsEnabled(value *bool)() { + m.connectedAppsEnabled = value +} +// SetPackageId sets the packageId property value. Android Enterprise app configuration package id. +func (m *AndroidManagedStoreAppConfiguration) SetPackageId(value *string)() { + m.packageId = value +} +// SetPayloadJson sets the payloadJson property value. Android Enterprise app configuration JSON payload. +func (m *AndroidManagedStoreAppConfiguration) SetPayloadJson(value *string)() { + m.payloadJson = value +} +// SetPermissionActions sets the permissionActions property value. List of Android app permissions and corresponding permission actions. +func (m *AndroidManagedStoreAppConfiguration) SetPermissionActions(value []AndroidPermissionActionable)() { + m.permissionActions = value +} +// SetProfileApplicability sets the profileApplicability property value. Android profile applicability +func (m *AndroidManagedStoreAppConfiguration) SetProfileApplicability(value *AndroidProfileApplicability)() { + m.profileApplicability = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_response.go new file mode 100644 index 000000000..c1202fa04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationCollectionResponse +type AndroidManagedStoreAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreAppConfigurationable +} +// NewAndroidManagedStoreAppConfigurationCollectionResponse instantiates a new AndroidManagedStoreAppConfigurationCollectionResponse and sets the default values. +func NewAndroidManagedStoreAppConfigurationCollectionResponse()(*AndroidManagedStoreAppConfigurationCollectionResponse) { + m := &AndroidManagedStoreAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationCollectionResponse) GetValue()([]AndroidManagedStoreAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationCollectionResponse) SetValue(value []AndroidManagedStoreAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_responseable.go new file mode 100644 index 000000000..f760b432d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationCollectionResponseable +type AndroidManagedStoreAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreAppConfigurationable) + SetValue(value []AndroidManagedStoreAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema.go new file mode 100644 index 000000000..8b27267a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchema schema describing an Android application's custom configurations. +type AndroidManagedStoreAppConfigurationSchema struct { + Entity + // UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app + exampleJson []byte + // Collection of items each representing a named configuration option in the schema. It contains a flat list of all configuration. + nestedSchemaItems []AndroidManagedStoreAppConfigurationSchemaItemable + // Collection of items each representing a named configuration option in the schema. It only contains the root-level configuration. + schemaItems []AndroidManagedStoreAppConfigurationSchemaItemable +} +// NewAndroidManagedStoreAppConfigurationSchema instantiates a new androidManagedStoreAppConfigurationSchema and sets the default values. +func NewAndroidManagedStoreAppConfigurationSchema()(*AndroidManagedStoreAppConfigurationSchema) { + m := &AndroidManagedStoreAppConfigurationSchema{ + Entity: *NewEntity(), + } + return m +} +// CreateAndroidManagedStoreAppConfigurationSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfigurationSchema(), nil +} +// GetExampleJson gets the exampleJson property value. UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app +func (m *AndroidManagedStoreAppConfigurationSchema) GetExampleJson()([]byte) { + return m.exampleJson +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfigurationSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exampleJson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetExampleJson(val) + } + return nil + } + res["nestedSchemaItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationSchemaItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationSchemaItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationSchemaItemable) + } + m.SetNestedSchemaItems(res) + } + return nil + } + res["schemaItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationSchemaItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationSchemaItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationSchemaItemable) + } + m.SetSchemaItems(res) + } + return nil + } + return res +} +// GetNestedSchemaItems gets the nestedSchemaItems property value. Collection of items each representing a named configuration option in the schema. It contains a flat list of all configuration. +func (m *AndroidManagedStoreAppConfigurationSchema) GetNestedSchemaItems()([]AndroidManagedStoreAppConfigurationSchemaItemable) { + return m.nestedSchemaItems +} +// GetSchemaItems gets the schemaItems property value. Collection of items each representing a named configuration option in the schema. It only contains the root-level configuration. +func (m *AndroidManagedStoreAppConfigurationSchema) GetSchemaItems()([]AndroidManagedStoreAppConfigurationSchemaItemable) { + return m.schemaItems +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfigurationSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("exampleJson", m.GetExampleJson()) + if err != nil { + return err + } + } + if m.GetNestedSchemaItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNestedSchemaItems())) + for i, v := range m.GetNestedSchemaItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("nestedSchemaItems", cast) + if err != nil { + return err + } + } + if m.GetSchemaItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSchemaItems())) + for i, v := range m.GetSchemaItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("schemaItems", cast) + if err != nil { + return err + } + } + return nil +} +// SetExampleJson sets the exampleJson property value. UTF8 encoded byte array containing example JSON string conforming to this schema that demonstrates how to set the configuration for this app +func (m *AndroidManagedStoreAppConfigurationSchema) SetExampleJson(value []byte)() { + m.exampleJson = value +} +// SetNestedSchemaItems sets the nestedSchemaItems property value. Collection of items each representing a named configuration option in the schema. It contains a flat list of all configuration. +func (m *AndroidManagedStoreAppConfigurationSchema) SetNestedSchemaItems(value []AndroidManagedStoreAppConfigurationSchemaItemable)() { + m.nestedSchemaItems = value +} +// SetSchemaItems sets the schemaItems property value. Collection of items each representing a named configuration option in the schema. It only contains the root-level configuration. +func (m *AndroidManagedStoreAppConfigurationSchema) SetSchemaItems(value []AndroidManagedStoreAppConfigurationSchemaItemable)() { + m.schemaItems = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_response.go new file mode 100644 index 000000000..e39e45d16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaCollectionResponse +type AndroidManagedStoreAppConfigurationSchemaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreAppConfigurationSchemaable +} +// NewAndroidManagedStoreAppConfigurationSchemaCollectionResponse instantiates a new AndroidManagedStoreAppConfigurationSchemaCollectionResponse and sets the default values. +func NewAndroidManagedStoreAppConfigurationSchemaCollectionResponse()(*AndroidManagedStoreAppConfigurationSchemaCollectionResponse) { + m := &AndroidManagedStoreAppConfigurationSchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreAppConfigurationSchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationSchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfigurationSchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfigurationSchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationSchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationSchemaCollectionResponse) GetValue()([]AndroidManagedStoreAppConfigurationSchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfigurationSchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationSchemaCollectionResponse) SetValue(value []AndroidManagedStoreAppConfigurationSchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_responseable.go new file mode 100644 index 000000000..a15df8c7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaCollectionResponseable +type AndroidManagedStoreAppConfigurationSchemaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreAppConfigurationSchemaable) + SetValue(value []AndroidManagedStoreAppConfigurationSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item.go new file mode 100644 index 000000000..696f47870 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item.go @@ -0,0 +1,370 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaItem single configuration item inside an Android application's custom configuration schema. +type AndroidManagedStoreAppConfigurationSchemaItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Data type for a configuration item inside an Android application's custom configuration schema + dataType *AndroidManagedStoreAppConfigurationSchemaItemDataType + // Default value for boolean type items, if specified by the app developer + defaultBoolValue *bool + // Default value for integer type items, if specified by the app developer + defaultIntValue *int32 + // Default value for string array type items, if specified by the app developer + defaultStringArrayValue []string + // Default value for string type items, if specified by the app developer + defaultStringValue *string + // Description of what the item controls within the application + description *string + // Human readable name + displayName *string + // Unique index the application uses to maintain nested schema items + index *int32 + // The OdataType property + odataType *string + // Index of parent schema item to track nested schema items + parentIndex *int32 + // Unique key the application uses to identify the item + schemaItemKey *string + // List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) + selections []KeyValuePairable +} +// NewAndroidManagedStoreAppConfigurationSchemaItem instantiates a new androidManagedStoreAppConfigurationSchemaItem and sets the default values. +func NewAndroidManagedStoreAppConfigurationSchemaItem()(*AndroidManagedStoreAppConfigurationSchemaItem) { + m := &AndroidManagedStoreAppConfigurationSchemaItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidManagedStoreAppConfigurationSchemaItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationSchemaItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfigurationSchemaItem(), 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 *AndroidManagedStoreAppConfigurationSchemaItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDataType gets the dataType property value. Data type for a configuration item inside an Android application's custom configuration schema +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDataType()(*AndroidManagedStoreAppConfigurationSchemaItemDataType) { + return m.dataType +} +// GetDefaultBoolValue gets the defaultBoolValue property value. Default value for boolean type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDefaultBoolValue()(*bool) { + return m.defaultBoolValue +} +// GetDefaultIntValue gets the defaultIntValue property value. Default value for integer type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDefaultIntValue()(*int32) { + return m.defaultIntValue +} +// GetDefaultStringArrayValue gets the defaultStringArrayValue property value. Default value for string array type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDefaultStringArrayValue()([]string) { + return m.defaultStringArrayValue +} +// GetDefaultStringValue gets the defaultStringValue property value. Default value for string type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDefaultStringValue()(*string) { + return m.defaultStringValue +} +// GetDescription gets the description property value. Description of what the item controls within the application +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Human readable name +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedStoreAppConfigurationSchemaItemDataType) + if err != nil { + return err + } + if val != nil { + m.SetDataType(val.(*AndroidManagedStoreAppConfigurationSchemaItemDataType)) + } + return nil + } + res["defaultBoolValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultBoolValue(val) + } + return nil + } + res["defaultIntValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultIntValue(val) + } + return nil + } + res["defaultStringArrayValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDefaultStringArrayValue(res) + } + return nil + } + res["defaultStringValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultStringValue(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["index"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIndex(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["parentIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParentIndex(val) + } + return nil + } + res["schemaItemKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchemaItemKey(val) + } + return nil + } + res["selections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetSelections(res) + } + return nil + } + return res +} +// GetIndex gets the index property value. Unique index the application uses to maintain nested schema items +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetIndex()(*int32) { + return m.index +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetOdataType()(*string) { + return m.odataType +} +// GetParentIndex gets the parentIndex property value. Index of parent schema item to track nested schema items +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetParentIndex()(*int32) { + return m.parentIndex +} +// GetSchemaItemKey gets the schemaItemKey property value. Unique key the application uses to identify the item +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetSchemaItemKey()(*string) { + return m.schemaItemKey +} +// GetSelections gets the selections property value. List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) +func (m *AndroidManagedStoreAppConfigurationSchemaItem) GetSelections()([]KeyValuePairable) { + return m.selections +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfigurationSchemaItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDataType() != nil { + cast := (*m.GetDataType()).String() + err := writer.WriteStringValue("dataType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("defaultBoolValue", m.GetDefaultBoolValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("defaultIntValue", m.GetDefaultIntValue()) + if err != nil { + return err + } + } + if m.GetDefaultStringArrayValue() != nil { + err := writer.WriteCollectionOfStringValues("defaultStringArrayValue", m.GetDefaultStringArrayValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultStringValue", m.GetDefaultStringValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("index", m.GetIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parentIndex", m.GetParentIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("schemaItemKey", m.GetSchemaItemKey()) + if err != nil { + return err + } + } + if m.GetSelections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSelections())) + for i, v := range m.GetSelections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("selections", 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 *AndroidManagedStoreAppConfigurationSchemaItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDataType sets the dataType property value. Data type for a configuration item inside an Android application's custom configuration schema +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDataType(value *AndroidManagedStoreAppConfigurationSchemaItemDataType)() { + m.dataType = value +} +// SetDefaultBoolValue sets the defaultBoolValue property value. Default value for boolean type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDefaultBoolValue(value *bool)() { + m.defaultBoolValue = value +} +// SetDefaultIntValue sets the defaultIntValue property value. Default value for integer type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDefaultIntValue(value *int32)() { + m.defaultIntValue = value +} +// SetDefaultStringArrayValue sets the defaultStringArrayValue property value. Default value for string array type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDefaultStringArrayValue(value []string)() { + m.defaultStringArrayValue = value +} +// SetDefaultStringValue sets the defaultStringValue property value. Default value for string type items, if specified by the app developer +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDefaultStringValue(value *string)() { + m.defaultStringValue = value +} +// SetDescription sets the description property value. Description of what the item controls within the application +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Human readable name +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIndex sets the index property value. Unique index the application uses to maintain nested schema items +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetIndex(value *int32)() { + m.index = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetParentIndex sets the parentIndex property value. Index of parent schema item to track nested schema items +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetParentIndex(value *int32)() { + m.parentIndex = value +} +// SetSchemaItemKey sets the schemaItemKey property value. Unique key the application uses to identify the item +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetSchemaItemKey(value *string)() { + m.schemaItemKey = value +} +// SetSelections sets the selections property value. List of human readable name/value pairs for the valid values that can be set for this item (Choice and Multiselect items only) +func (m *AndroidManagedStoreAppConfigurationSchemaItem) SetSelections(value []KeyValuePairable)() { + m.selections = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_response.go new file mode 100644 index 000000000..7a9280cc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse +type AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreAppConfigurationSchemaItemable +} +// NewAndroidManagedStoreAppConfigurationSchemaItemCollectionResponse instantiates a new AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse and sets the default values. +func NewAndroidManagedStoreAppConfigurationSchemaItemCollectionResponse()(*AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse) { + m := &AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreAppConfigurationSchemaItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppConfigurationSchemaItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppConfigurationSchemaItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationSchemaItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationSchemaItemable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationSchemaItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse) GetValue()([]AndroidManagedStoreAppConfigurationSchemaItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAppConfigurationSchemaItemCollectionResponse) SetValue(value []AndroidManagedStoreAppConfigurationSchemaItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_responseable.go new file mode 100644 index 000000000..768b530e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaItemCollectionResponseable +type AndroidManagedStoreAppConfigurationSchemaItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreAppConfigurationSchemaItemable) + SetValue(value []AndroidManagedStoreAppConfigurationSchemaItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_data_type.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_data_type.go new file mode 100644 index 000000000..18964a4ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_item_data_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedStoreAppConfigurationSchemaItemDataType int + +const ( + BOOL_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE AndroidManagedStoreAppConfigurationSchemaItemDataType = iota + INTEGER_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + STRING_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + CHOICE_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + MULTISELECT_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + BUNDLE_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + BUNDLEARRAY_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + HIDDEN_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE +) + +func (i AndroidManagedStoreAppConfigurationSchemaItemDataType) String() string { + return []string{"bool", "integer", "string", "choice", "multiselect", "bundle", "bundleArray", "hidden"}[i] +} +func ParseAndroidManagedStoreAppConfigurationSchemaItemDataType(v string) (interface{}, error) { + result := BOOL_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + switch v { + case "bool": + result = BOOL_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "integer": + result = INTEGER_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "string": + result = STRING_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "choice": + result = CHOICE_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "multiselect": + result = MULTISELECT_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "bundle": + result = BUNDLE_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "bundleArray": + result = BUNDLEARRAY_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + case "hidden": + result = HIDDEN_ANDROIDMANAGEDSTOREAPPCONFIGURATIONSCHEMAITEMDATATYPE + default: + return 0, errors.New("Unknown AndroidManagedStoreAppConfigurationSchemaItemDataType value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedStoreAppConfigurationSchemaItemDataType(values []AndroidManagedStoreAppConfigurationSchemaItemDataType) []string { + 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/android_managed_store_app_configuration_schema_itemable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_itemable.go new file mode 100644 index 000000000..674e50235 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schema_itemable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaItemable +type AndroidManagedStoreAppConfigurationSchemaItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataType()(*AndroidManagedStoreAppConfigurationSchemaItemDataType) + GetDefaultBoolValue()(*bool) + GetDefaultIntValue()(*int32) + GetDefaultStringArrayValue()([]string) + GetDefaultStringValue()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetIndex()(*int32) + GetOdataType()(*string) + GetParentIndex()(*int32) + GetSchemaItemKey()(*string) + GetSelections()([]KeyValuePairable) + SetDataType(value *AndroidManagedStoreAppConfigurationSchemaItemDataType)() + SetDefaultBoolValue(value *bool)() + SetDefaultIntValue(value *int32)() + SetDefaultStringArrayValue(value []string)() + SetDefaultStringValue(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIndex(value *int32)() + SetOdataType(value *string)() + SetParentIndex(value *int32)() + SetSchemaItemKey(value *string)() + SetSelections(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schemaable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schemaable.go new file mode 100644 index 000000000..4ae398b78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configuration_schemaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationSchemaable +type AndroidManagedStoreAppConfigurationSchemaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExampleJson()([]byte) + GetNestedSchemaItems()([]AndroidManagedStoreAppConfigurationSchemaItemable) + GetSchemaItems()([]AndroidManagedStoreAppConfigurationSchemaItemable) + SetExampleJson(value []byte)() + SetNestedSchemaItems(value []AndroidManagedStoreAppConfigurationSchemaItemable)() + SetSchemaItems(value []AndroidManagedStoreAppConfigurationSchemaItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_configurationable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configurationable.go new file mode 100644 index 000000000..476d10218 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_configurationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppConfigurationable +type AndroidManagedStoreAppConfigurationable interface { + ManagedDeviceMobileAppConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppSupportsOemConfig()(*bool) + GetConnectedAppsEnabled()(*bool) + GetPackageId()(*string) + GetPayloadJson()(*string) + GetPermissionActions()([]AndroidPermissionActionable) + GetProfileApplicability()(*AndroidProfileApplicability) + SetAppSupportsOemConfig(value *bool)() + SetConnectedAppsEnabled(value *bool)() + SetPackageId(value *string)() + SetPayloadJson(value *string)() + SetPermissionActions(value []AndroidPermissionActionable)() + SetProfileApplicability(value *AndroidProfileApplicability)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_track.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track.go new file mode 100644 index 000000000..1a93b6a53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppTrack contains track information for Android Managed Store apps. +type AndroidManagedStoreAppTrack 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 OdataType property + odataType *string + // Friendly name for track. + trackAlias *string + // Unique track identifier. + trackId *string +} +// NewAndroidManagedStoreAppTrack instantiates a new androidManagedStoreAppTrack and sets the default values. +func NewAndroidManagedStoreAppTrack()(*AndroidManagedStoreAppTrack) { + m := &AndroidManagedStoreAppTrack{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidManagedStoreAppTrackFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppTrackFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppTrack(), 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 *AndroidManagedStoreAppTrack) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppTrack) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["trackAlias"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTrackAlias(val) + } + return nil + } + res["trackId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTrackId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidManagedStoreAppTrack) GetOdataType()(*string) { + return m.odataType +} +// GetTrackAlias gets the trackAlias property value. Friendly name for track. +func (m *AndroidManagedStoreAppTrack) GetTrackAlias()(*string) { + return m.trackAlias +} +// GetTrackId gets the trackId property value. Unique track identifier. +func (m *AndroidManagedStoreAppTrack) GetTrackId()(*string) { + return m.trackId +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppTrack) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trackAlias", m.GetTrackAlias()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trackId", m.GetTrackId()) + 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 *AndroidManagedStoreAppTrack) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidManagedStoreAppTrack) SetOdataType(value *string)() { + m.odataType = value +} +// SetTrackAlias sets the trackAlias property value. Friendly name for track. +func (m *AndroidManagedStoreAppTrack) SetTrackAlias(value *string)() { + m.trackAlias = value +} +// SetTrackId sets the trackId property value. Unique track identifier. +func (m *AndroidManagedStoreAppTrack) SetTrackId(value *string)() { + m.trackId = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_response.go new file mode 100644 index 000000000..6eea2ba6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppTrackCollectionResponse +type AndroidManagedStoreAppTrackCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreAppTrackable +} +// NewAndroidManagedStoreAppTrackCollectionResponse instantiates a new AndroidManagedStoreAppTrackCollectionResponse and sets the default values. +func NewAndroidManagedStoreAppTrackCollectionResponse()(*AndroidManagedStoreAppTrackCollectionResponse) { + m := &AndroidManagedStoreAppTrackCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreAppTrackCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreAppTrackCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreAppTrackCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreAppTrackCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppTrackFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppTrackable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppTrackable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreAppTrackCollectionResponse) GetValue()([]AndroidManagedStoreAppTrackable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreAppTrackCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreAppTrackCollectionResponse) SetValue(value []AndroidManagedStoreAppTrackable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_responseable.go new file mode 100644 index 000000000..dc9dc8857 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_track_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppTrackCollectionResponseable +type AndroidManagedStoreAppTrackCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreAppTrackable) + SetValue(value []AndroidManagedStoreAppTrackable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_app_trackable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_app_trackable.go new file mode 100644 index 000000000..74888f651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_app_trackable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppTrackable +type AndroidManagedStoreAppTrackable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTrackAlias()(*string) + GetTrackId()(*string) + SetOdataType(value *string)() + SetTrackAlias(value *string)() + SetTrackId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_appable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_appable.go new file mode 100644 index 000000000..b41b00af3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_appable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreAppable +type AndroidManagedStoreAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppIdentifier()(*string) + GetAppStoreUrl()(*string) + GetAppTracks()([]AndroidManagedStoreAppTrackable) + GetIsPrivate()(*bool) + GetIsSystemApp()(*bool) + GetPackageId()(*string) + GetSupportsOemConfig()(*bool) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + SetAppIdentifier(value *string)() + SetAppStoreUrl(value *string)() + SetAppTracks(value []AndroidManagedStoreAppTrackable)() + SetIsPrivate(value *bool)() + SetIsSystemApp(value *bool)() + SetPackageId(value *string)() + SetSupportsOemConfig(value *bool)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_auto_update_mode.go b/src/internal/connector/graph/betasdk/models/android_managed_store_auto_update_mode.go new file mode 100644 index 000000000..018be3102 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_auto_update_mode.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidManagedStoreAutoUpdateMode int + +const ( + // Default update behavior (device must be connected to Wifi, charging and not actively used). + DEFAULT_ESCAPED_ANDROIDMANAGEDSTOREAUTOUPDATEMODE AndroidManagedStoreAutoUpdateMode = iota + // Updates are postponed for a maximum of 90 days after the app becomes out of date. + POSTPONED_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + // The app is updated as soon as possible by the developer. If device is online, it will be updated within minutes. + PRIORITY_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + // Unknown future mode (reserved, not used right now). + UNKNOWNFUTUREVALUE_ANDROIDMANAGEDSTOREAUTOUPDATEMODE +) + +func (i AndroidManagedStoreAutoUpdateMode) String() string { + return []string{"default", "postponed", "priority", "unknownFutureValue"}[i] +} +func ParseAndroidManagedStoreAutoUpdateMode(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + switch v { + case "default": + result = DEFAULT_ESCAPED_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + case "postponed": + result = POSTPONED_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + case "priority": + result = PRIORITY_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ANDROIDMANAGEDSTOREAUTOUPDATEMODE + default: + return 0, errors.New("Unknown AndroidManagedStoreAutoUpdateMode value: " + v) + } + return &result, nil +} +func SerializeAndroidManagedStoreAutoUpdateMode(values []AndroidManagedStoreAutoUpdateMode) []string { + 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/android_managed_store_web_app.go b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app.go new file mode 100644 index 000000000..9ab6edf3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreWebApp +type AndroidManagedStoreWebApp struct { + AndroidManagedStoreApp +} +// NewAndroidManagedStoreWebApp instantiates a new AndroidManagedStoreWebApp and sets the default values. +func NewAndroidManagedStoreWebApp()(*AndroidManagedStoreWebApp) { + m := &AndroidManagedStoreWebApp{ + AndroidManagedStoreApp: *NewAndroidManagedStoreApp(), + } + odataTypeValue := "#microsoft.graph.androidManagedStoreWebApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidManagedStoreWebAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreWebAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreWebApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreWebApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidManagedStoreApp.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreWebApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidManagedStoreApp.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_response.go b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_response.go new file mode 100644 index 000000000..222820e7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreWebAppCollectionResponse +type AndroidManagedStoreWebAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidManagedStoreWebAppable +} +// NewAndroidManagedStoreWebAppCollectionResponse instantiates a new AndroidManagedStoreWebAppCollectionResponse and sets the default values. +func NewAndroidManagedStoreWebAppCollectionResponse()(*AndroidManagedStoreWebAppCollectionResponse) { + m := &AndroidManagedStoreWebAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidManagedStoreWebAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidManagedStoreWebAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidManagedStoreWebAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidManagedStoreWebAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreWebAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreWebAppable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreWebAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidManagedStoreWebAppCollectionResponse) GetValue()([]AndroidManagedStoreWebAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidManagedStoreWebAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidManagedStoreWebAppCollectionResponse) SetValue(value []AndroidManagedStoreWebAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_responseable.go new file mode 100644 index 000000000..1f35731d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_web_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreWebAppCollectionResponseable +type AndroidManagedStoreWebAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidManagedStoreWebAppable) + SetValue(value []AndroidManagedStoreWebAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_managed_store_web_appable.go b/src/internal/connector/graph/betasdk/models/android_managed_store_web_appable.go new file mode 100644 index 000000000..5aac94085 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_managed_store_web_appable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidManagedStoreWebAppable +type AndroidManagedStoreWebAppable interface { + AndroidManagedStoreAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/android_minimum_operating_system.go b/src/internal/connector/graph/betasdk/models/android_minimum_operating_system.go new file mode 100644 index 000000000..278f39276 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_minimum_operating_system.go @@ -0,0 +1,487 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidMinimumOperatingSystem contains properties for the minimum operating system required for an Android mobile app. +type AndroidMinimumOperatingSystem 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 OdataType property + odataType *string + // When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v10_0 *bool + // When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v11_0 *bool + // When TRUE, only Version 4.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_0 *bool + // When TRUE, only Version 4.0.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_0_3 *bool + // When TRUE, only Version 4.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_1 *bool + // When TRUE, only Version 4.2 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_2 *bool + // When TRUE, only Version 4.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_3 *bool + // When TRUE, only Version 4.4 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v4_4 *bool + // When TRUE, only Version 5.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v5_0 *bool + // When TRUE, only Version 5.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v5_1 *bool + // When TRUE, only Version 6.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v6_0 *bool + // When TRUE, only Version 7.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v7_0 *bool + // When TRUE, only Version 7.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v7_1 *bool + // When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v8_0 *bool + // When TRUE, only Version 8.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v8_1 *bool + // When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v9_0 *bool +} +// NewAndroidMinimumOperatingSystem instantiates a new androidMinimumOperatingSystem and sets the default values. +func NewAndroidMinimumOperatingSystem()(*AndroidMinimumOperatingSystem) { + m := &AndroidMinimumOperatingSystem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidMinimumOperatingSystemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidMinimumOperatingSystemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidMinimumOperatingSystem(), 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 *AndroidMinimumOperatingSystem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidMinimumOperatingSystem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["v10_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_0(val) + } + return nil + } + res["v11_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV11_0(val) + } + return nil + } + res["v4_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_0(val) + } + return nil + } + res["v4_0_3"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_0_3(val) + } + return nil + } + res["v4_1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_1(val) + } + return nil + } + res["v4_2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_2(val) + } + return nil + } + res["v4_3"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_3(val) + } + return nil + } + res["v4_4"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV4_4(val) + } + return nil + } + res["v5_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV5_0(val) + } + return nil + } + res["v5_1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV5_1(val) + } + return nil + } + res["v6_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV6_0(val) + } + return nil + } + res["v7_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV7_0(val) + } + return nil + } + res["v7_1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV7_1(val) + } + return nil + } + res["v8_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV8_0(val) + } + return nil + } + res["v8_1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV8_1(val) + } + return nil + } + res["v9_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV9_0(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidMinimumOperatingSystem) GetOdataType()(*string) { + return m.odataType +} +// GetV10_0 gets the v10_0 property value. When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV10_0()(*bool) { + return m.v10_0 +} +// GetV11_0 gets the v11_0 property value. When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV11_0()(*bool) { + return m.v11_0 +} +// GetV4_0 gets the v4_0 property value. When TRUE, only Version 4.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_0()(*bool) { + return m.v4_0 +} +// GetV4_0_3 gets the v4_0_3 property value. When TRUE, only Version 4.0.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_0_3()(*bool) { + return m.v4_0_3 +} +// GetV4_1 gets the v4_1 property value. When TRUE, only Version 4.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_1()(*bool) { + return m.v4_1 +} +// GetV4_2 gets the v4_2 property value. When TRUE, only Version 4.2 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_2()(*bool) { + return m.v4_2 +} +// GetV4_3 gets the v4_3 property value. When TRUE, only Version 4.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_3()(*bool) { + return m.v4_3 +} +// GetV4_4 gets the v4_4 property value. When TRUE, only Version 4.4 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV4_4()(*bool) { + return m.v4_4 +} +// GetV5_0 gets the v5_0 property value. When TRUE, only Version 5.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV5_0()(*bool) { + return m.v5_0 +} +// GetV5_1 gets the v5_1 property value. When TRUE, only Version 5.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV5_1()(*bool) { + return m.v5_1 +} +// GetV6_0 gets the v6_0 property value. When TRUE, only Version 6.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV6_0()(*bool) { + return m.v6_0 +} +// GetV7_0 gets the v7_0 property value. When TRUE, only Version 7.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV7_0()(*bool) { + return m.v7_0 +} +// GetV7_1 gets the v7_1 property value. When TRUE, only Version 7.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV7_1()(*bool) { + return m.v7_1 +} +// GetV8_0 gets the v8_0 property value. When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV8_0()(*bool) { + return m.v8_0 +} +// GetV8_1 gets the v8_1 property value. When TRUE, only Version 8.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV8_1()(*bool) { + return m.v8_1 +} +// GetV9_0 gets the v9_0 property value. When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) GetV9_0()(*bool) { + return m.v9_0 +} +// Serialize serializes information the current object +func (m *AndroidMinimumOperatingSystem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_0", m.GetV10_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v11_0", m.GetV11_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_0", m.GetV4_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_0_3", m.GetV4_0_3()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_1", m.GetV4_1()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_2", m.GetV4_2()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_3", m.GetV4_3()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v4_4", m.GetV4_4()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v5_0", m.GetV5_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v5_1", m.GetV5_1()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v6_0", m.GetV6_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v7_0", m.GetV7_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v7_1", m.GetV7_1()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v8_0", m.GetV8_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v8_1", m.GetV8_1()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v9_0", m.GetV9_0()) + 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 *AndroidMinimumOperatingSystem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidMinimumOperatingSystem) SetOdataType(value *string)() { + m.odataType = value +} +// SetV10_0 sets the v10_0 property value. When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV10_0(value *bool)() { + m.v10_0 = value +} +// SetV11_0 sets the v11_0 property value. When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV11_0(value *bool)() { + m.v11_0 = value +} +// SetV4_0 sets the v4_0 property value. When TRUE, only Version 4.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_0(value *bool)() { + m.v4_0 = value +} +// SetV4_0_3 sets the v4_0_3 property value. When TRUE, only Version 4.0.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_0_3(value *bool)() { + m.v4_0_3 = value +} +// SetV4_1 sets the v4_1 property value. When TRUE, only Version 4.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_1(value *bool)() { + m.v4_1 = value +} +// SetV4_2 sets the v4_2 property value. When TRUE, only Version 4.2 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_2(value *bool)() { + m.v4_2 = value +} +// SetV4_3 sets the v4_3 property value. When TRUE, only Version 4.3 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_3(value *bool)() { + m.v4_3 = value +} +// SetV4_4 sets the v4_4 property value. When TRUE, only Version 4.4 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV4_4(value *bool)() { + m.v4_4 = value +} +// SetV5_0 sets the v5_0 property value. When TRUE, only Version 5.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV5_0(value *bool)() { + m.v5_0 = value +} +// SetV5_1 sets the v5_1 property value. When TRUE, only Version 5.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV5_1(value *bool)() { + m.v5_1 = value +} +// SetV6_0 sets the v6_0 property value. When TRUE, only Version 6.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV6_0(value *bool)() { + m.v6_0 = value +} +// SetV7_0 sets the v7_0 property value. When TRUE, only Version 7.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV7_0(value *bool)() { + m.v7_0 = value +} +// SetV7_1 sets the v7_1 property value. When TRUE, only Version 7.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV7_1(value *bool)() { + m.v7_1 = value +} +// SetV8_0 sets the v8_0 property value. When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV8_0(value *bool)() { + m.v8_0 = value +} +// SetV8_1 sets the v8_1 property value. When TRUE, only Version 8.1 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV8_1(value *bool)() { + m.v8_1 = value +} +// SetV9_0 sets the v9_0 property value. When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *AndroidMinimumOperatingSystem) SetV9_0(value *bool)() { + m.v9_0 = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_minimum_operating_systemable.go b/src/internal/connector/graph/betasdk/models/android_minimum_operating_systemable.go new file mode 100644 index 000000000..985a89297 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_minimum_operating_systemable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidMinimumOperatingSystemable +type AndroidMinimumOperatingSystemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetV10_0()(*bool) + GetV11_0()(*bool) + GetV4_0()(*bool) + GetV4_0_3()(*bool) + GetV4_1()(*bool) + GetV4_2()(*bool) + GetV4_3()(*bool) + GetV4_4()(*bool) + GetV5_0()(*bool) + GetV5_1()(*bool) + GetV6_0()(*bool) + GetV7_0()(*bool) + GetV7_1()(*bool) + GetV8_0()(*bool) + GetV8_1()(*bool) + GetV9_0()(*bool) + SetOdataType(value *string)() + SetV10_0(value *bool)() + SetV11_0(value *bool)() + SetV4_0(value *bool)() + SetV4_0_3(value *bool)() + SetV4_1(value *bool)() + SetV4_2(value *bool)() + SetV4_3(value *bool)() + SetV4_4(value *bool)() + SetV5_0(value *bool)() + SetV5_1(value *bool)() + SetV6_0(value *bool)() + SetV7_0(value *bool)() + SetV7_1(value *bool)() + SetV8_0(value *bool)() + SetV8_1(value *bool)() + SetV9_0(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_mobile_app_identifier.go b/src/internal/connector/graph/betasdk/models/android_mobile_app_identifier.go new file mode 100644 index 000000000..0c34e1855 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_mobile_app_identifier.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidMobileAppIdentifier +type AndroidMobileAppIdentifier struct { + MobileAppIdentifier + // The identifier for an app, as specified in the play store. + packageId *string +} +// NewAndroidMobileAppIdentifier instantiates a new AndroidMobileAppIdentifier and sets the default values. +func NewAndroidMobileAppIdentifier()(*AndroidMobileAppIdentifier) { + m := &AndroidMobileAppIdentifier{ + MobileAppIdentifier: *NewMobileAppIdentifier(), + } + odataTypeValue := "#microsoft.graph.androidMobileAppIdentifier"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidMobileAppIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidMobileAppIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidMobileAppIdentifier(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidMobileAppIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppIdentifier.GetFieldDeserializers() + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + return res +} +// GetPackageId gets the packageId property value. The identifier for an app, as specified in the play store. +func (m *AndroidMobileAppIdentifier) GetPackageId()(*string) { + return m.packageId +} +// Serialize serializes information the current object +func (m *AndroidMobileAppIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppIdentifier.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + return nil +} +// SetPackageId sets the packageId property value. The identifier for an app, as specified in the play store. +func (m *AndroidMobileAppIdentifier) SetPackageId(value *string)() { + m.packageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_mobile_app_identifierable.go b/src/internal/connector/graph/betasdk/models/android_mobile_app_identifierable.go new file mode 100644 index 000000000..a3c1ba97d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_mobile_app_identifierable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidMobileAppIdentifierable +type AndroidMobileAppIdentifierable interface { + MobileAppIdentifierable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPackageId()(*string) + SetPackageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration.go b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration.go new file mode 100644 index 000000000..7bb986805 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidOmaCpConfiguration +type AndroidOmaCpConfiguration struct { + DeviceConfiguration + // Configuration XML that will be applied to the device. When it is read, it only provides a placeholder string since the original data is encrypted and stored. + configurationXml []byte +} +// NewAndroidOmaCpConfiguration instantiates a new AndroidOmaCpConfiguration and sets the default values. +func NewAndroidOmaCpConfiguration()(*AndroidOmaCpConfiguration) { + m := &AndroidOmaCpConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidOmaCpConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidOmaCpConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidOmaCpConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidOmaCpConfiguration(), nil +} +// GetConfigurationXml gets the configurationXml property value. Configuration XML that will be applied to the device. When it is read, it only provides a placeholder string since the original data is encrypted and stored. +func (m *AndroidOmaCpConfiguration) GetConfigurationXml()([]byte) { + return m.configurationXml +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidOmaCpConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["configurationXml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationXml(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AndroidOmaCpConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("configurationXml", m.GetConfigurationXml()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationXml sets the configurationXml property value. Configuration XML that will be applied to the device. When it is read, it only provides a placeholder string since the original data is encrypted and stored. +func (m *AndroidOmaCpConfiguration) SetConfigurationXml(value []byte)() { + m.configurationXml = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_response.go new file mode 100644 index 000000000..6ff688442 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidOmaCpConfigurationCollectionResponse +type AndroidOmaCpConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidOmaCpConfigurationable +} +// NewAndroidOmaCpConfigurationCollectionResponse instantiates a new AndroidOmaCpConfigurationCollectionResponse and sets the default values. +func NewAndroidOmaCpConfigurationCollectionResponse()(*AndroidOmaCpConfigurationCollectionResponse) { + m := &AndroidOmaCpConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidOmaCpConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidOmaCpConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidOmaCpConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidOmaCpConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidOmaCpConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidOmaCpConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidOmaCpConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidOmaCpConfigurationCollectionResponse) GetValue()([]AndroidOmaCpConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidOmaCpConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidOmaCpConfigurationCollectionResponse) SetValue(value []AndroidOmaCpConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_responseable.go new file mode 100644 index 000000000..e10b034d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_oma_cp_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidOmaCpConfigurationCollectionResponseable +type AndroidOmaCpConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidOmaCpConfigurationable) + SetValue(value []AndroidOmaCpConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_oma_cp_configurationable.go b/src/internal/connector/graph/betasdk/models/android_oma_cp_configurationable.go new file mode 100644 index 000000000..88f88580a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_oma_cp_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidOmaCpConfigurationable +type AndroidOmaCpConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationXml()([]byte) + SetConfigurationXml(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_permission_action.go b/src/internal/connector/graph/betasdk/models/android_permission_action.go new file mode 100644 index 000000000..ec37837d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_permission_action.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPermissionAction mapping between an Android app permission and the action Android should take when that permission is requested. +type AndroidPermissionAction struct { + // Android action taken when an app requests a dangerous permission. + action *AndroidPermissionActionType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string + // Android permission string, defined in the official Android documentation. Example 'android.permission.READ_CONTACTS'. + permission *string +} +// NewAndroidPermissionAction instantiates a new androidPermissionAction and sets the default values. +func NewAndroidPermissionAction()(*AndroidPermissionAction) { + m := &AndroidPermissionAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAndroidPermissionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidPermissionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidPermissionAction(), nil +} +// GetAction gets the action property value. Android action taken when an app requests a dangerous permission. +func (m *AndroidPermissionAction) GetAction()(*AndroidPermissionActionType) { + return m.action +} +// 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 *AndroidPermissionAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidPermissionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidPermissionActionType) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*AndroidPermissionActionType)) + } + 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["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AndroidPermissionAction) GetOdataType()(*string) { + return m.odataType +} +// GetPermission gets the permission property value. Android permission string, defined in the official Android documentation. Example 'android.permission.READ_CONTACTS'. +func (m *AndroidPermissionAction) GetPermission()(*string) { + return m.permission +} +// Serialize serializes information the current object +func (m *AndroidPermissionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. Android action taken when an app requests a dangerous permission. +func (m *AndroidPermissionAction) SetAction(value *AndroidPermissionActionType)() { + m.action = value +} +// 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 *AndroidPermissionAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AndroidPermissionAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetPermission sets the permission property value. Android permission string, defined in the official Android documentation. Example 'android.permission.READ_CONTACTS'. +func (m *AndroidPermissionAction) SetPermission(value *string)() { + m.permission = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_permission_action_collection_response.go b/src/internal/connector/graph/betasdk/models/android_permission_action_collection_response.go new file mode 100644 index 000000000..e170e3bff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_permission_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPermissionActionCollectionResponse +type AndroidPermissionActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidPermissionActionable +} +// NewAndroidPermissionActionCollectionResponse instantiates a new AndroidPermissionActionCollectionResponse and sets the default values. +func NewAndroidPermissionActionCollectionResponse()(*AndroidPermissionActionCollectionResponse) { + m := &AndroidPermissionActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidPermissionActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidPermissionActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidPermissionActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidPermissionActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidPermissionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidPermissionActionable, len(val)) + for i, v := range val { + res[i] = v.(AndroidPermissionActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidPermissionActionCollectionResponse) GetValue()([]AndroidPermissionActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidPermissionActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidPermissionActionCollectionResponse) SetValue(value []AndroidPermissionActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_permission_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_permission_action_collection_responseable.go new file mode 100644 index 000000000..34d19cf96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_permission_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPermissionActionCollectionResponseable +type AndroidPermissionActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidPermissionActionable) + SetValue(value []AndroidPermissionActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_permission_action_type.go b/src/internal/connector/graph/betasdk/models/android_permission_action_type.go new file mode 100644 index 000000000..89ffc5204 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_permission_action_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidPermissionActionType int + +const ( + PROMPT_ANDROIDPERMISSIONACTIONTYPE AndroidPermissionActionType = iota + AUTOGRANT_ANDROIDPERMISSIONACTIONTYPE + AUTODENY_ANDROIDPERMISSIONACTIONTYPE +) + +func (i AndroidPermissionActionType) String() string { + return []string{"prompt", "autoGrant", "autoDeny"}[i] +} +func ParseAndroidPermissionActionType(v string) (interface{}, error) { + result := PROMPT_ANDROIDPERMISSIONACTIONTYPE + switch v { + case "prompt": + result = PROMPT_ANDROIDPERMISSIONACTIONTYPE + case "autoGrant": + result = AUTOGRANT_ANDROIDPERMISSIONACTIONTYPE + case "autoDeny": + result = AUTODENY_ANDROIDPERMISSIONACTIONTYPE + default: + return 0, errors.New("Unknown AndroidPermissionActionType value: " + v) + } + return &result, nil +} +func SerializeAndroidPermissionActionType(values []AndroidPermissionActionType) []string { + 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/android_permission_actionable.go b/src/internal/connector/graph/betasdk/models/android_permission_actionable.go new file mode 100644 index 000000000..82c0b3a12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_permission_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPermissionActionable +type AndroidPermissionActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*AndroidPermissionActionType) + GetOdataType()(*string) + GetPermission()(*string) + SetAction(value *AndroidPermissionActionType)() + SetOdataType(value *string)() + SetPermission(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile.go new file mode 100644 index 000000000..cc8da8e95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPkcsCertificateProfile +type AndroidPkcsCertificateProfile struct { + AndroidCertificateProfileBase + // PKCS Certificate Template Name + certificateTemplateName *string + // PKCS Certification Authority + certificationAuthority *string + // PKCS Certification Authority Name + certificationAuthorityName *string + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string +} +// NewAndroidPkcsCertificateProfile instantiates a new AndroidPkcsCertificateProfile and sets the default values. +func NewAndroidPkcsCertificateProfile()(*AndroidPkcsCertificateProfile) { + m := &AndroidPkcsCertificateProfile{ + AndroidCertificateProfileBase: *NewAndroidCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidPkcsCertificateProfile(), nil +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidCertificateProfileBase.GetFieldDeserializers() + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..55dc1a09f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPkcsCertificateProfileCollectionResponse +type AndroidPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidPkcsCertificateProfileable +} +// NewAndroidPkcsCertificateProfileCollectionResponse instantiates a new AndroidPkcsCertificateProfileCollectionResponse and sets the default values. +func NewAndroidPkcsCertificateProfileCollectionResponse()(*AndroidPkcsCertificateProfileCollectionResponse) { + m := &AndroidPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidPkcsCertificateProfileCollectionResponse) GetValue()([]AndroidPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidPkcsCertificateProfileCollectionResponse) SetValue(value []AndroidPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..b075ca63d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPkcsCertificateProfileCollectionResponseable +type AndroidPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidPkcsCertificateProfileable) + SetValue(value []AndroidPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profileable.go new file mode 100644 index 000000000..33a00c9dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_pkcs_certificate_profileable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidPkcsCertificateProfileable +type AndroidPkcsCertificateProfileable interface { + AndroidCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_profile_applicability.go b/src/internal/connector/graph/betasdk/models/android_profile_applicability.go new file mode 100644 index 000000000..6575da6b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_profile_applicability.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidProfileApplicability int + +const ( + DEFAULT_ESCAPED_ANDROIDPROFILEAPPLICABILITY AndroidProfileApplicability = iota + ANDROIDWORKPROFILE_ANDROIDPROFILEAPPLICABILITY + ANDROIDDEVICEOWNER_ANDROIDPROFILEAPPLICABILITY +) + +func (i AndroidProfileApplicability) String() string { + return []string{"default", "androidWorkProfile", "androidDeviceOwner"}[i] +} +func ParseAndroidProfileApplicability(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_ANDROIDPROFILEAPPLICABILITY + switch v { + case "default": + result = DEFAULT_ESCAPED_ANDROIDPROFILEAPPLICABILITY + case "androidWorkProfile": + result = ANDROIDWORKPROFILE_ANDROIDPROFILEAPPLICABILITY + case "androidDeviceOwner": + result = ANDROIDDEVICEOWNER_ANDROIDPROFILEAPPLICABILITY + default: + return 0, errors.New("Unknown AndroidProfileApplicability value: " + v) + } + return &result, nil +} +func SerializeAndroidProfileApplicability(values []AndroidProfileApplicability) []string { + 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/android_required_password_complexity.go b/src/internal/connector/graph/betasdk/models/android_required_password_complexity.go new file mode 100644 index 000000000..9d484c8c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_required_password_complexity.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidRequiredPasswordComplexity int + +const ( + // Device default value, no password. + NONE_ANDROIDREQUIREDPASSWORDCOMPLEXITY AndroidRequiredPasswordComplexity = iota + // The required password complexity on the device is of type low as defined by the Android documentation. + LOW_ANDROIDREQUIREDPASSWORDCOMPLEXITY + // The required password complexity on the device is of type medium as defined by the Android documentation. + MEDIUM_ANDROIDREQUIREDPASSWORDCOMPLEXITY + // The required password complexity on the device is of type high as defined by the Android documentation. + HIGH_ANDROIDREQUIREDPASSWORDCOMPLEXITY +) + +func (i AndroidRequiredPasswordComplexity) String() string { + return []string{"none", "low", "medium", "high"}[i] +} +func ParseAndroidRequiredPasswordComplexity(v string) (interface{}, error) { + result := NONE_ANDROIDREQUIREDPASSWORDCOMPLEXITY + switch v { + case "none": + result = NONE_ANDROIDREQUIREDPASSWORDCOMPLEXITY + case "low": + result = LOW_ANDROIDREQUIREDPASSWORDCOMPLEXITY + case "medium": + result = MEDIUM_ANDROIDREQUIREDPASSWORDCOMPLEXITY + case "high": + result = HIGH_ANDROIDREQUIREDPASSWORDCOMPLEXITY + default: + return 0, errors.New("Unknown AndroidRequiredPasswordComplexity value: " + v) + } + return &result, nil +} +func SerializeAndroidRequiredPasswordComplexity(values []AndroidRequiredPasswordComplexity) []string { + 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/android_required_password_type.go b/src/internal/connector/graph/betasdk/models/android_required_password_type.go new file mode 100644 index 000000000..e9a566bc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_required_password_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidRequiredPasswordType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDREQUIREDPASSWORDTYPE AndroidRequiredPasswordType = iota + // Alphabetic password required. + ALPHABETIC_ANDROIDREQUIREDPASSWORDTYPE + // Alphanumeric password required. + ALPHANUMERIC_ANDROIDREQUIREDPASSWORDTYPE + // Alphanumeric with symbols password required. + ALPHANUMERICWITHSYMBOLS_ANDROIDREQUIREDPASSWORDTYPE + // Low security biometrics based password required. + LOWSECURITYBIOMETRIC_ANDROIDREQUIREDPASSWORDTYPE + // Numeric password required. + NUMERIC_ANDROIDREQUIREDPASSWORDTYPE + // Numeric complex password required. + NUMERICCOMPLEX_ANDROIDREQUIREDPASSWORDTYPE + // A password or pattern is required, and any is acceptable. + ANY_ANDROIDREQUIREDPASSWORDTYPE +) + +func (i AndroidRequiredPasswordType) String() string { + return []string{"deviceDefault", "alphabetic", "alphanumeric", "alphanumericWithSymbols", "lowSecurityBiometric", "numeric", "numericComplex", "any"}[i] +} +func ParseAndroidRequiredPasswordType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDREQUIREDPASSWORDTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDREQUIREDPASSWORDTYPE + case "alphabetic": + result = ALPHABETIC_ANDROIDREQUIREDPASSWORDTYPE + case "alphanumeric": + result = ALPHANUMERIC_ANDROIDREQUIREDPASSWORDTYPE + case "alphanumericWithSymbols": + result = ALPHANUMERICWITHSYMBOLS_ANDROIDREQUIREDPASSWORDTYPE + case "lowSecurityBiometric": + result = LOWSECURITYBIOMETRIC_ANDROIDREQUIREDPASSWORDTYPE + case "numeric": + result = NUMERIC_ANDROIDREQUIREDPASSWORDTYPE + case "numericComplex": + result = NUMERICCOMPLEX_ANDROIDREQUIREDPASSWORDTYPE + case "any": + result = ANY_ANDROIDREQUIREDPASSWORDTYPE + default: + return 0, errors.New("Unknown AndroidRequiredPasswordType value: " + v) + } + return &result, nil +} +func SerializeAndroidRequiredPasswordType(values []AndroidRequiredPasswordType) []string { + 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/android_safety_net_evaluation_type.go b/src/internal/connector/graph/betasdk/models/android_safety_net_evaluation_type.go new file mode 100644 index 000000000..ee6b3dcdd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_safety_net_evaluation_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidSafetyNetEvaluationType int + +const ( + // Default value. Typical measurements and reference data were used. + BASIC_ANDROIDSAFETYNETEVALUATIONTYPE AndroidSafetyNetEvaluationType = iota + // Hardware-backed security features (such as Key Attestation) were used. + HARDWAREBACKED_ANDROIDSAFETYNETEVALUATIONTYPE +) + +func (i AndroidSafetyNetEvaluationType) String() string { + return []string{"basic", "hardwareBacked"}[i] +} +func ParseAndroidSafetyNetEvaluationType(v string) (interface{}, error) { + result := BASIC_ANDROIDSAFETYNETEVALUATIONTYPE + switch v { + case "basic": + result = BASIC_ANDROIDSAFETYNETEVALUATIONTYPE + case "hardwareBacked": + result = HARDWAREBACKED_ANDROIDSAFETYNETEVALUATIONTYPE + default: + return 0, errors.New("Unknown AndroidSafetyNetEvaluationType value: " + v) + } + return &result, nil +} +func SerializeAndroidSafetyNetEvaluationType(values []AndroidSafetyNetEvaluationType) []string { + 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/android_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile.go new file mode 100644 index 000000000..386be8d32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile.go @@ -0,0 +1,233 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidScepCertificateProfile +type AndroidScepCertificateProfile struct { + AndroidCertificateProfileBase + // Hash Algorithm Options. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // SCEP Server Url(s) + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidScepCertificateProfile instantiates a new AndroidScepCertificateProfile and sets the default values. +func NewAndroidScepCertificateProfile()(*AndroidScepCertificateProfile) { + m := &AndroidScepCertificateProfile{ + AndroidCertificateProfileBase: *NewAndroidCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidScepCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidCertificateProfileBase.GetFieldDeserializers() + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *AndroidScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *AndroidScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetHashAlgorithm sets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *AndroidScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *AndroidScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..c850c6d00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidScepCertificateProfileCollectionResponse +type AndroidScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidScepCertificateProfileable +} +// NewAndroidScepCertificateProfileCollectionResponse instantiates a new AndroidScepCertificateProfileCollectionResponse and sets the default values. +func NewAndroidScepCertificateProfileCollectionResponse()(*AndroidScepCertificateProfileCollectionResponse) { + m := &AndroidScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidScepCertificateProfileCollectionResponse) GetValue()([]AndroidScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidScepCertificateProfileCollectionResponse) SetValue(value []AndroidScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..a63cc52b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidScepCertificateProfileCollectionResponseable +type AndroidScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidScepCertificateProfileable) + SetValue(value []AndroidScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profileable.go new file mode 100644 index 000000000..931f73711 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_scep_certificate_profileable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidScepCertificateProfileable +type AndroidScepCertificateProfileable interface { + AndroidCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_store_app.go b/src/internal/connector/graph/betasdk/models/android_store_app.go new file mode 100644 index 000000000..da2daa7f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_store_app.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidStoreApp +type AndroidStoreApp struct { + MobileApp + // The Identity Name. + appIdentifier *string + // The Android app store URL. + appStoreUrl *string + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem AndroidMinimumOperatingSystemable + // The package identifier. + packageId *string +} +// NewAndroidStoreApp instantiates a new AndroidStoreApp and sets the default values. +func NewAndroidStoreApp()(*AndroidStoreApp) { + m := &AndroidStoreApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.androidStoreApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidStoreAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidStoreAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidStoreApp(), nil +} +// GetAppIdentifier gets the appIdentifier property value. The Identity Name. +func (m *AndroidStoreApp) GetAppIdentifier()(*string) { + return m.appIdentifier +} +// GetAppStoreUrl gets the appStoreUrl property value. The Android app store URL. +func (m *AndroidStoreApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidStoreApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppIdentifier(val) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(AndroidMinimumOperatingSystemable)) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + return res +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *AndroidStoreApp) GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetPackageId gets the packageId property value. The package identifier. +func (m *AndroidStoreApp) GetPackageId()(*string) { + return m.packageId +} +// Serialize serializes information the current object +func (m *AndroidStoreApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appIdentifier", m.GetAppIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + return nil +} +// SetAppIdentifier sets the appIdentifier property value. The Identity Name. +func (m *AndroidStoreApp) SetAppIdentifier(value *string)() { + m.appIdentifier = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Android app store URL. +func (m *AndroidStoreApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *AndroidStoreApp) SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetPackageId sets the packageId property value. The package identifier. +func (m *AndroidStoreApp) SetPackageId(value *string)() { + m.packageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_store_app_collection_response.go b/src/internal/connector/graph/betasdk/models/android_store_app_collection_response.go new file mode 100644 index 000000000..846b27595 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_store_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidStoreAppCollectionResponse +type AndroidStoreAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidStoreAppable +} +// NewAndroidStoreAppCollectionResponse instantiates a new AndroidStoreAppCollectionResponse and sets the default values. +func NewAndroidStoreAppCollectionResponse()(*AndroidStoreAppCollectionResponse) { + m := &AndroidStoreAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidStoreAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidStoreAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidStoreAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidStoreAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidStoreAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidStoreAppable, len(val)) + for i, v := range val { + res[i] = v.(AndroidStoreAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidStoreAppCollectionResponse) GetValue()([]AndroidStoreAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidStoreAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidStoreAppCollectionResponse) SetValue(value []AndroidStoreAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_store_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_store_app_collection_responseable.go new file mode 100644 index 000000000..d9b8595a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_store_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidStoreAppCollectionResponseable +type AndroidStoreAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidStoreAppable) + SetValue(value []AndroidStoreAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_store_appable.go b/src/internal/connector/graph/betasdk/models/android_store_appable.go new file mode 100644 index 000000000..9a6adbe5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_store_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidStoreAppable +type AndroidStoreAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppIdentifier()(*string) + GetAppStoreUrl()(*string) + GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) + GetPackageId()(*string) + SetAppIdentifier(value *string)() + SetAppStoreUrl(value *string)() + SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() + SetPackageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate.go new file mode 100644 index 000000000..cdd13a07e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidTrustedRootCertificate +type AndroidTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate + trustedRootCertificate []byte +} +// NewAndroidTrustedRootCertificate instantiates a new androidTrustedRootCertificate and sets the default values. +func NewAndroidTrustedRootCertificate()(*AndroidTrustedRootCertificate) { + m := &AndroidTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *AndroidTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *AndroidTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *AndroidTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..08d7f7a12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidTrustedRootCertificateCollectionResponse +type AndroidTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidTrustedRootCertificateable +} +// NewAndroidTrustedRootCertificateCollectionResponse instantiates a new AndroidTrustedRootCertificateCollectionResponse and sets the default values. +func NewAndroidTrustedRootCertificateCollectionResponse()(*AndroidTrustedRootCertificateCollectionResponse) { + m := &AndroidTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(AndroidTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidTrustedRootCertificateCollectionResponse) GetValue()([]AndroidTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidTrustedRootCertificateCollectionResponse) SetValue(value []AndroidTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..d36785f2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidTrustedRootCertificateCollectionResponseable +type AndroidTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidTrustedRootCertificateable) + SetValue(value []AndroidTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificateable.go new file mode 100644 index 000000000..d977e024c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidTrustedRootCertificateable +type AndroidTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_username_source.go b/src/internal/connector/graph/betasdk/models/android_username_source.go new file mode 100644 index 000000000..8bee1d15a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_username_source.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidUsernameSource int + +const ( + // The username. + USERNAME_ANDROIDUSERNAMESOURCE AndroidUsernameSource = iota + // The user principal name. + USERPRINCIPALNAME_ANDROIDUSERNAMESOURCE + // The user sam account name. + SAMACCOUNTNAME_ANDROIDUSERNAMESOURCE + // Primary SMTP address. + PRIMARYSMTPADDRESS_ANDROIDUSERNAMESOURCE +) + +func (i AndroidUsernameSource) String() string { + return []string{"username", "userPrincipalName", "samAccountName", "primarySmtpAddress"}[i] +} +func ParseAndroidUsernameSource(v string) (interface{}, error) { + result := USERNAME_ANDROIDUSERNAMESOURCE + switch v { + case "username": + result = USERNAME_ANDROIDUSERNAMESOURCE + case "userPrincipalName": + result = USERPRINCIPALNAME_ANDROIDUSERNAMESOURCE + case "samAccountName": + result = SAMACCOUNTNAME_ANDROIDUSERNAMESOURCE + case "primarySmtpAddress": + result = PRIMARYSMTPADDRESS_ANDROIDUSERNAMESOURCE + default: + return 0, errors.New("Unknown AndroidUsernameSource value: " + v) + } + return &result, nil +} +func SerializeAndroidUsernameSource(values []AndroidUsernameSource) []string { + 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/android_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/android_vpn_configuration.go new file mode 100644 index 000000000..942462941 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_vpn_configuration.go @@ -0,0 +1,322 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidVpnConfiguration +type AndroidVpnConfiguration struct { + DeviceConfiguration + // VPN Authentication Method. + authenticationMethod *VpnAuthenticationMethod + // Connection name displayed to the user. + connectionName *string + // Android VPN connection type. + connectionType *AndroidVpnConnectionType + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customData []KeyValueable + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customKeyValueData []KeyValuePairable + // Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. + fingerprint *string + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate AndroidCertificateProfileBaseable + // Realm when connection type is set to Pulse Secure. + realm *string + // Role when connection type is set to Pulse Secure. + role *string + // List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. + servers []VpnServerable +} +// NewAndroidVpnConfiguration instantiates a new AndroidVpnConfiguration and sets the default values. +func NewAndroidVpnConfiguration()(*AndroidVpnConfiguration) { + m := &AndroidVpnConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidVpnConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidVpnConfiguration) GetAuthenticationMethod()(*VpnAuthenticationMethod) { + return m.authenticationMethod +} +// GetConnectionName gets the connectionName property value. Connection name displayed to the user. +func (m *AndroidVpnConfiguration) GetConnectionName()(*string) { + return m.connectionName +} +// GetConnectionType gets the connectionType property value. Android VPN connection type. +func (m *AndroidVpnConfiguration) GetConnectionType()(*AndroidVpnConnectionType) { + return m.connectionType +} +// GetCustomData gets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidVpnConfiguration) GetCustomData()([]KeyValueable) { + return m.customData +} +// GetCustomKeyValueData gets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidVpnConfiguration) GetCustomKeyValueData()([]KeyValuePairable) { + return m.customKeyValueData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*VpnAuthenticationMethod)) + } + return nil + } + res["connectionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionName(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidVpnConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*AndroidVpnConnectionType)) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetCustomData(res) + } + return nil + } + res["customKeyValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomKeyValueData(res) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidCertificateProfileBaseable)) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["servers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVpnServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VpnServerable, len(val)) + for i, v := range val { + res[i] = v.(VpnServerable) + } + m.SetServers(res) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidVpnConfiguration) GetFingerprint()(*string) { + return m.fingerprint +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidVpnConfiguration) GetIdentityCertificate()(AndroidCertificateProfileBaseable) { + return m.identityCertificate +} +// GetRealm gets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidVpnConfiguration) GetRealm()(*string) { + return m.realm +} +// GetRole gets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidVpnConfiguration) GetRole()(*string) { + return m.role +} +// GetServers gets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidVpnConfiguration) GetServers()([]VpnServerable) { + return m.servers +} +// Serialize serializes information the current object +func (m *AndroidVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionName", m.GetConnectionName()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + if m.GetCustomData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomData())) + for i, v := range m.GetCustomData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customData", cast) + if err != nil { + return err + } + } + if m.GetCustomKeyValueData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomKeyValueData())) + for i, v := range m.GetCustomKeyValueData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customKeyValueData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + if m.GetServers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServers())) + for i, v := range m.GetServers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("servers", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidVpnConfiguration) SetAuthenticationMethod(value *VpnAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetConnectionName sets the connectionName property value. Connection name displayed to the user. +func (m *AndroidVpnConfiguration) SetConnectionName(value *string)() { + m.connectionName = value +} +// SetConnectionType sets the connectionType property value. Android VPN connection type. +func (m *AndroidVpnConfiguration) SetConnectionType(value *AndroidVpnConnectionType)() { + m.connectionType = value +} +// SetCustomData sets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidVpnConfiguration) SetCustomData(value []KeyValueable)() { + m.customData = value +} +// SetCustomKeyValueData sets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidVpnConfiguration) SetCustomKeyValueData(value []KeyValuePairable)() { + m.customKeyValueData = value +} +// SetFingerprint sets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidVpnConfiguration) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidVpnConfiguration) SetIdentityCertificate(value AndroidCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetRealm sets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidVpnConfiguration) SetRealm(value *string)() { + m.realm = value +} +// SetRole sets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidVpnConfiguration) SetRole(value *string)() { + m.role = value +} +// SetServers sets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidVpnConfiguration) SetServers(value []VpnServerable)() { + m.servers = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_response.go new file mode 100644 index 000000000..a41d3d41e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidVpnConfigurationCollectionResponse +type AndroidVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidVpnConfigurationable +} +// NewAndroidVpnConfigurationCollectionResponse instantiates a new AndroidVpnConfigurationCollectionResponse and sets the default values. +func NewAndroidVpnConfigurationCollectionResponse()(*AndroidVpnConfigurationCollectionResponse) { + m := &AndroidVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidVpnConfigurationCollectionResponse) GetValue()([]AndroidVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidVpnConfigurationCollectionResponse) SetValue(value []AndroidVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..f108c931b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidVpnConfigurationCollectionResponseable +type AndroidVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidVpnConfigurationable) + SetValue(value []AndroidVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/android_vpn_configurationable.go new file mode 100644 index 000000000..1ab598d60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_vpn_configurationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidVpnConfigurationable +type AndroidVpnConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*VpnAuthenticationMethod) + GetConnectionName()(*string) + GetConnectionType()(*AndroidVpnConnectionType) + GetCustomData()([]KeyValueable) + GetCustomKeyValueData()([]KeyValuePairable) + GetFingerprint()(*string) + GetIdentityCertificate()(AndroidCertificateProfileBaseable) + GetRealm()(*string) + GetRole()(*string) + GetServers()([]VpnServerable) + SetAuthenticationMethod(value *VpnAuthenticationMethod)() + SetConnectionName(value *string)() + SetConnectionType(value *AndroidVpnConnectionType)() + SetCustomData(value []KeyValueable)() + SetCustomKeyValueData(value []KeyValuePairable)() + SetFingerprint(value *string)() + SetIdentityCertificate(value AndroidCertificateProfileBaseable)() + SetRealm(value *string)() + SetRole(value *string)() + SetServers(value []VpnServerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_vpn_connection_type.go b/src/internal/connector/graph/betasdk/models/android_vpn_connection_type.go new file mode 100644 index 000000000..2fd5e6088 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_vpn_connection_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidVpnConnectionType int + +const ( + // Cisco AnyConnect. + CISCOANYCONNECT_ANDROIDVPNCONNECTIONTYPE AndroidVpnConnectionType = iota + // Pulse Secure. + PULSESECURE_ANDROIDVPNCONNECTIONTYPE + // F5 Edge Client. + F5EDGECLIENT_ANDROIDVPNCONNECTIONTYPE + // Dell SonicWALL Mobile Connection. + DELLSONICWALLMOBILECONNECT_ANDROIDVPNCONNECTIONTYPE + // Check Point Capsule VPN. + CHECKPOINTCAPSULEVPN_ANDROIDVPNCONNECTIONTYPE + // Citrix + CITRIX_ANDROIDVPNCONNECTIONTYPE + // Microsoft Tunnel. + MICROSOFTTUNNEL_ANDROIDVPNCONNECTIONTYPE + // NetMotion Mobility. + NETMOTIONMOBILITY_ANDROIDVPNCONNECTIONTYPE + // Microsoft Protect. + MICROSOFTPROTECT_ANDROIDVPNCONNECTIONTYPE +) + +func (i AndroidVpnConnectionType) String() string { + return []string{"ciscoAnyConnect", "pulseSecure", "f5EdgeClient", "dellSonicWallMobileConnect", "checkPointCapsuleVpn", "citrix", "microsoftTunnel", "netMotionMobility", "microsoftProtect"}[i] +} +func ParseAndroidVpnConnectionType(v string) (interface{}, error) { + result := CISCOANYCONNECT_ANDROIDVPNCONNECTIONTYPE + switch v { + case "ciscoAnyConnect": + result = CISCOANYCONNECT_ANDROIDVPNCONNECTIONTYPE + case "pulseSecure": + result = PULSESECURE_ANDROIDVPNCONNECTIONTYPE + case "f5EdgeClient": + result = F5EDGECLIENT_ANDROIDVPNCONNECTIONTYPE + case "dellSonicWallMobileConnect": + result = DELLSONICWALLMOBILECONNECT_ANDROIDVPNCONNECTIONTYPE + case "checkPointCapsuleVpn": + result = CHECKPOINTCAPSULEVPN_ANDROIDVPNCONNECTIONTYPE + case "citrix": + result = CITRIX_ANDROIDVPNCONNECTIONTYPE + case "microsoftTunnel": + result = MICROSOFTTUNNEL_ANDROIDVPNCONNECTIONTYPE + case "netMotionMobility": + result = NETMOTIONMOBILITY_ANDROIDVPNCONNECTIONTYPE + case "microsoftProtect": + result = MICROSOFTPROTECT_ANDROIDVPNCONNECTIONTYPE + default: + return 0, errors.New("Unknown AndroidVpnConnectionType value: " + v) + } + return &result, nil +} +func SerializeAndroidVpnConnectionType(values []AndroidVpnConnectionType) []string { + 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/android_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration.go new file mode 100644 index 000000000..080753851 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWiFiConfiguration +type AndroidWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types for Android. + wiFiSecurityType *AndroidWiFiSecurityType +} +// NewAndroidWiFiConfiguration instantiates a new AndroidWiFiConfiguration and sets the default values. +func NewAndroidWiFiConfiguration()(*AndroidWiFiConfiguration) { + m := &AndroidWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidEnterpriseWiFiConfiguration": + return NewAndroidEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewAndroidWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*AndroidWiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *AndroidWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidWiFiConfiguration) GetWiFiSecurityType()(*AndroidWiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *AndroidWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *AndroidWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidWiFiConfiguration) SetWiFiSecurityType(value *AndroidWiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..7ad5fc3c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWiFiConfigurationCollectionResponse +type AndroidWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWiFiConfigurationable +} +// NewAndroidWiFiConfigurationCollectionResponse instantiates a new AndroidWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidWiFiConfigurationCollectionResponse()(*AndroidWiFiConfigurationCollectionResponse) { + m := &AndroidWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWiFiConfigurationCollectionResponse) GetValue()([]AndroidWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWiFiConfigurationCollectionResponse) SetValue(value []AndroidWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..cdf5b3980 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWiFiConfigurationCollectionResponseable +type AndroidWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWiFiConfigurationable) + SetValue(value []AndroidWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_wi_fi_configurationable.go new file mode 100644 index 000000000..0de4280b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_wi_fi_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWiFiConfigurationable +type AndroidWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetSsid()(*string) + GetWiFiSecurityType()(*AndroidWiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetSsid(value *string)() + SetWiFiSecurityType(value *AndroidWiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_wi_fi_security_type.go b/src/internal/connector/graph/betasdk/models/android_wi_fi_security_type.go new file mode 100644 index 000000000..dedaa07fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_wi_fi_security_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidWiFiSecurityType int + +const ( + // Open (No Authentication). + OPEN_ANDROIDWIFISECURITYTYPE AndroidWiFiSecurityType = iota + // WPA-Enterprise. Must use AndroidEnterpriseWifiConfiguration type to configure enterprise options. + WPAENTERPRISE_ANDROIDWIFISECURITYTYPE + // WPA2-Enterprise. Must use AndroidEnterpriseWifiConfiguration type to configure enterprise options. + WPA2ENTERPRISE_ANDROIDWIFISECURITYTYPE +) + +func (i AndroidWiFiSecurityType) String() string { + return []string{"open", "wpaEnterprise", "wpa2Enterprise"}[i] +} +func ParseAndroidWiFiSecurityType(v string) (interface{}, error) { + result := OPEN_ANDROIDWIFISECURITYTYPE + switch v { + case "open": + result = OPEN_ANDROIDWIFISECURITYTYPE + case "wpaEnterprise": + result = WPAENTERPRISE_ANDROIDWIFISECURITYTYPE + case "wpa2Enterprise": + result = WPA2ENTERPRISE_ANDROIDWIFISECURITYTYPE + default: + return 0, errors.New("Unknown AndroidWiFiSecurityType value: " + v) + } + return &result, nil +} +func SerializeAndroidWiFiSecurityType(values []AndroidWiFiSecurityType) []string { + 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/android_work_profile_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base.go new file mode 100644 index 000000000..cca88ae87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base.go @@ -0,0 +1,249 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCertificateProfileBase +type AndroidWorkProfileCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + rootCertificate AndroidWorkProfileTrustedRootCertificateable + // Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Subject Name Format Options. + subjectNameFormat *SubjectNameFormat +} +// NewAndroidWorkProfileCertificateProfileBase instantiates a new AndroidWorkProfileCertificateProfileBase and sets the default values. +func NewAndroidWorkProfileCertificateProfileBase()(*AndroidWorkProfileCertificateProfileBase) { + m := &AndroidWorkProfileCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidWorkProfilePkcsCertificateProfile": + return NewAndroidWorkProfilePkcsCertificateProfile(), nil + case "#microsoft.graph.androidWorkProfileScepCertificateProfile": + return NewAndroidWorkProfileScepCertificateProfile(), nil + } + } + } + } + return NewAndroidWorkProfileCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidWorkProfileCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidWorkProfileCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileCertificateProfileBase) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidWorkProfileTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(AndroidWorkProfileTrustedRootCertificateable)) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidWorkProfileCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidWorkProfileCertificateProfileBase) GetRootCertificate()(AndroidWorkProfileTrustedRootCertificateable) { + return m.rootCertificate +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidWorkProfileCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidWorkProfileCertificateProfileBase) GetSubjectNameFormat()(*SubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AndroidWorkProfileCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AndroidWorkProfileCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileCertificateProfileBase) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AndroidWorkProfileCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *AndroidWorkProfileCertificateProfileBase) SetRootCertificate(value AndroidWorkProfileTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AndroidWorkProfileCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Subject Name Format Options. +func (m *AndroidWorkProfileCertificateProfileBase) SetSubjectNameFormat(value *SubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..1d54be46b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCertificateProfileBaseCollectionResponse +type AndroidWorkProfileCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileCertificateProfileBaseable +} +// NewAndroidWorkProfileCertificateProfileBaseCollectionResponse instantiates a new AndroidWorkProfileCertificateProfileBaseCollectionResponse and sets the default values. +func NewAndroidWorkProfileCertificateProfileBaseCollectionResponse()(*AndroidWorkProfileCertificateProfileBaseCollectionResponse) { + m := &AndroidWorkProfileCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileCertificateProfileBaseCollectionResponse) GetValue()([]AndroidWorkProfileCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileCertificateProfileBaseCollectionResponse) SetValue(value []AndroidWorkProfileCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..7600fb32e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCertificateProfileBaseCollectionResponseable +type AndroidWorkProfileCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileCertificateProfileBaseable) + SetValue(value []AndroidWorkProfileCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_baseable.go new file mode 100644 index 000000000..91ad93564 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_certificate_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCertificateProfileBaseable +type AndroidWorkProfileCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetRenewalThresholdPercentage()(*int32) + GetRootCertificate()(AndroidWorkProfileTrustedRootCertificateable) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*SubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetRenewalThresholdPercentage(value *int32)() + SetRootCertificate(value AndroidWorkProfileTrustedRootCertificateable)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *SubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy.go b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy.go new file mode 100644 index 000000000..d907ae9d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy.go @@ -0,0 +1,691 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCompliancePolicy +type AndroidWorkProfileCompliancePolicy struct { + DeviceCompliancePolicy + // Device threat protection levels for the Device Threat Protection API. + advancedThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Require that devices have enabled device threat protection. + deviceThreatProtectionEnabled *bool + // Device threat protection levels for the Device Threat Protection API. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Minimum Android security patch level. + minAndroidSecurityPatchLevel *string + // Maximum Android version. + osMaximumVersion *string + // Minimum Android version. + osMinimumVersion *string + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum password length. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Number of previous passwords to block. Valid values 1 to 24 + passwordPreviousPasswordBlockCount *int32 + // Require a password to unlock device. + passwordRequired *bool + // Android required password type. + passwordRequiredType *AndroidRequiredPasswordType + // Number of sign-in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Devices must not be jailbroken or rooted. + securityBlockJailbrokenDevices *bool + // Disable USB debugging on Android devices. + securityDisableUsbDebugging *bool + // Require that devices disallow installation of apps from unknown sources. + securityPreventInstallAppsFromUnknownSources *bool + // Require the device to pass the Company Portal client app runtime integrity check. + securityRequireCompanyPortalAppIntegrity *bool + // An enum representing the Android SafetyNet attestation evaluation types. + securityRequiredAndroidSafetyNetEvaluationType *AndroidSafetyNetEvaluationType + // Require Google Play Services to be installed and enabled on the device. + securityRequireGooglePlayServices *bool + // Require the device to pass the SafetyNet basic integrity check. + securityRequireSafetyNetAttestationBasicIntegrity *bool + // Require the device to pass the SafetyNet certified device check. + securityRequireSafetyNetAttestationCertifiedDevice *bool + // Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. + securityRequireUpToDateSecurityProviders *bool + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Require encryption on Android devices. + storageRequireEncryption *bool +} +// NewAndroidWorkProfileCompliancePolicy instantiates a new AndroidWorkProfileCompliancePolicy and sets the default values. +func NewAndroidWorkProfileCompliancePolicy()(*AndroidWorkProfileCompliancePolicy) { + m := &AndroidWorkProfileCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileCompliancePolicy(), nil +} +// GetAdvancedThreatProtectionRequiredSecurityLevel gets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidWorkProfileCompliancePolicy) GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.advancedThreatProtectionRequiredSecurityLevel +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidWorkProfileCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidWorkProfileCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["advancedThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["minAndroidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinAndroidSecurityPatchLevel(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["securityBlockJailbrokenDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockJailbrokenDevices(val) + } + return nil + } + res["securityDisableUsbDebugging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDisableUsbDebugging(val) + } + return nil + } + res["securityPreventInstallAppsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityPreventInstallAppsFromUnknownSources(val) + } + return nil + } + res["securityRequireCompanyPortalAppIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireCompanyPortalAppIntegrity(val) + } + return nil + } + res["securityRequiredAndroidSafetyNetEvaluationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidSafetyNetEvaluationType) + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequiredAndroidSafetyNetEvaluationType(val.(*AndroidSafetyNetEvaluationType)) + } + return nil + } + res["securityRequireGooglePlayServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireGooglePlayServices(val) + } + return nil + } + res["securityRequireSafetyNetAttestationBasicIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationBasicIntegrity(val) + } + return nil + } + res["securityRequireSafetyNetAttestationCertifiedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireSafetyNetAttestationCertifiedDevice(val) + } + return nil + } + res["securityRequireUpToDateSecurityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireUpToDateSecurityProviders(val) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + return res +} +// GetMinAndroidSecurityPatchLevel gets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidWorkProfileCompliancePolicy) GetMinAndroidSecurityPatchLevel()(*string) { + return m.minAndroidSecurityPatchLevel +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidWorkProfileCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidWorkProfileCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android required password type. +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordRequiredType()(*AndroidRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidWorkProfileCompliancePolicy) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileCompliancePolicy) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetSecurityBlockJailbrokenDevices gets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityBlockJailbrokenDevices()(*bool) { + return m.securityBlockJailbrokenDevices +} +// GetSecurityDisableUsbDebugging gets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityDisableUsbDebugging()(*bool) { + return m.securityDisableUsbDebugging +} +// GetSecurityPreventInstallAppsFromUnknownSources gets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityPreventInstallAppsFromUnknownSources()(*bool) { + return m.securityPreventInstallAppsFromUnknownSources +} +// GetSecurityRequireCompanyPortalAppIntegrity gets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireCompanyPortalAppIntegrity()(*bool) { + return m.securityRequireCompanyPortalAppIntegrity +} +// GetSecurityRequiredAndroidSafetyNetEvaluationType gets the securityRequiredAndroidSafetyNetEvaluationType property value. An enum representing the Android SafetyNet attestation evaluation types. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequiredAndroidSafetyNetEvaluationType()(*AndroidSafetyNetEvaluationType) { + return m.securityRequiredAndroidSafetyNetEvaluationType +} +// GetSecurityRequireGooglePlayServices gets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireGooglePlayServices()(*bool) { + return m.securityRequireGooglePlayServices +} +// GetSecurityRequireSafetyNetAttestationBasicIntegrity gets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) { + return m.securityRequireSafetyNetAttestationBasicIntegrity +} +// GetSecurityRequireSafetyNetAttestationCertifiedDevice gets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) { + return m.securityRequireSafetyNetAttestationCertifiedDevice +} +// GetSecurityRequireUpToDateSecurityProviders gets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireUpToDateSecurityProviders()(*bool) { + return m.securityRequireUpToDateSecurityProviders +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidWorkProfileCompliancePolicy) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidWorkProfileCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetAdvancedThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("advancedThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minAndroidSecurityPatchLevel", m.GetMinAndroidSecurityPatchLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockJailbrokenDevices", m.GetSecurityBlockJailbrokenDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDisableUsbDebugging", m.GetSecurityDisableUsbDebugging()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityPreventInstallAppsFromUnknownSources", m.GetSecurityPreventInstallAppsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireCompanyPortalAppIntegrity", m.GetSecurityRequireCompanyPortalAppIntegrity()) + if err != nil { + return err + } + } + if m.GetSecurityRequiredAndroidSafetyNetEvaluationType() != nil { + cast := (*m.GetSecurityRequiredAndroidSafetyNetEvaluationType()).String() + err = writer.WriteStringValue("securityRequiredAndroidSafetyNetEvaluationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireGooglePlayServices", m.GetSecurityRequireGooglePlayServices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationBasicIntegrity", m.GetSecurityRequireSafetyNetAttestationBasicIntegrity()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireSafetyNetAttestationCertifiedDevice", m.GetSecurityRequireSafetyNetAttestationCertifiedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireUpToDateSecurityProviders", m.GetSecurityRequireUpToDateSecurityProviders()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionRequiredSecurityLevel sets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidWorkProfileCompliancePolicy) SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.advancedThreatProtectionRequiredSecurityLevel = value +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *AndroidWorkProfileCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *AndroidWorkProfileCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetMinAndroidSecurityPatchLevel sets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AndroidWorkProfileCompliancePolicy) SetMinAndroidSecurityPatchLevel(value *string)() { + m.minAndroidSecurityPatchLevel = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Android version. +func (m *AndroidWorkProfileCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Android version. +func (m *AndroidWorkProfileCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock device. +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android required password type. +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordRequiredType(value *AndroidRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign-in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidWorkProfileCompliancePolicy) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileCompliancePolicy) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetSecurityBlockJailbrokenDevices sets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityBlockJailbrokenDevices(value *bool)() { + m.securityBlockJailbrokenDevices = value +} +// SetSecurityDisableUsbDebugging sets the securityDisableUsbDebugging property value. Disable USB debugging on Android devices. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityDisableUsbDebugging(value *bool)() { + m.securityDisableUsbDebugging = value +} +// SetSecurityPreventInstallAppsFromUnknownSources sets the securityPreventInstallAppsFromUnknownSources property value. Require that devices disallow installation of apps from unknown sources. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() { + m.securityPreventInstallAppsFromUnknownSources = value +} +// SetSecurityRequireCompanyPortalAppIntegrity sets the securityRequireCompanyPortalAppIntegrity property value. Require the device to pass the Company Portal client app runtime integrity check. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() { + m.securityRequireCompanyPortalAppIntegrity = value +} +// SetSecurityRequiredAndroidSafetyNetEvaluationType sets the securityRequiredAndroidSafetyNetEvaluationType property value. An enum representing the Android SafetyNet attestation evaluation types. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequiredAndroidSafetyNetEvaluationType(value *AndroidSafetyNetEvaluationType)() { + m.securityRequiredAndroidSafetyNetEvaluationType = value +} +// SetSecurityRequireGooglePlayServices sets the securityRequireGooglePlayServices property value. Require Google Play Services to be installed and enabled on the device. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireGooglePlayServices(value *bool)() { + m.securityRequireGooglePlayServices = value +} +// SetSecurityRequireSafetyNetAttestationBasicIntegrity sets the securityRequireSafetyNetAttestationBasicIntegrity property value. Require the device to pass the SafetyNet basic integrity check. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() { + m.securityRequireSafetyNetAttestationBasicIntegrity = value +} +// SetSecurityRequireSafetyNetAttestationCertifiedDevice sets the securityRequireSafetyNetAttestationCertifiedDevice property value. Require the device to pass the SafetyNet certified device check. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() { + m.securityRequireSafetyNetAttestationCertifiedDevice = value +} +// SetSecurityRequireUpToDateSecurityProviders sets the securityRequireUpToDateSecurityProviders property value. Require the device to have up to date security providers. The device will require Google Play Services to be enabled and up to date. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireUpToDateSecurityProviders(value *bool)() { + m.securityRequireUpToDateSecurityProviders = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidWorkProfileCompliancePolicy) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AndroidWorkProfileCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_response.go new file mode 100644 index 000000000..344cc92d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCompliancePolicyCollectionResponse +type AndroidWorkProfileCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileCompliancePolicyable +} +// NewAndroidWorkProfileCompliancePolicyCollectionResponse instantiates a new AndroidWorkProfileCompliancePolicyCollectionResponse and sets the default values. +func NewAndroidWorkProfileCompliancePolicyCollectionResponse()(*AndroidWorkProfileCompliancePolicyCollectionResponse) { + m := &AndroidWorkProfileCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileCompliancePolicyCollectionResponse) GetValue()([]AndroidWorkProfileCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileCompliancePolicyCollectionResponse) SetValue(value []AndroidWorkProfileCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..22cf90602 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCompliancePolicyCollectionResponseable +type AndroidWorkProfileCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileCompliancePolicyable) + SetValue(value []AndroidWorkProfileCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policyable.go new file mode 100644 index 000000000..53db066d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_compliance_policyable.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCompliancePolicyable +type AndroidWorkProfileCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetMinAndroidSecurityPatchLevel()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetSecurityBlockJailbrokenDevices()(*bool) + GetSecurityDisableUsbDebugging()(*bool) + GetSecurityPreventInstallAppsFromUnknownSources()(*bool) + GetSecurityRequireCompanyPortalAppIntegrity()(*bool) + GetSecurityRequiredAndroidSafetyNetEvaluationType()(*AndroidSafetyNetEvaluationType) + GetSecurityRequireGooglePlayServices()(*bool) + GetSecurityRequireSafetyNetAttestationBasicIntegrity()(*bool) + GetSecurityRequireSafetyNetAttestationCertifiedDevice()(*bool) + GetSecurityRequireUpToDateSecurityProviders()(*bool) + GetSecurityRequireVerifyApps()(*bool) + GetStorageRequireEncryption()(*bool) + SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetMinAndroidSecurityPatchLevel(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetSecurityBlockJailbrokenDevices(value *bool)() + SetSecurityDisableUsbDebugging(value *bool)() + SetSecurityPreventInstallAppsFromUnknownSources(value *bool)() + SetSecurityRequireCompanyPortalAppIntegrity(value *bool)() + SetSecurityRequiredAndroidSafetyNetEvaluationType(value *AndroidSafetyNetEvaluationType)() + SetSecurityRequireGooglePlayServices(value *bool)() + SetSecurityRequireSafetyNetAttestationBasicIntegrity(value *bool)() + SetSecurityRequireSafetyNetAttestationCertifiedDevice(value *bool)() + SetSecurityRequireUpToDateSecurityProviders(value *bool)() + SetSecurityRequireVerifyApps(value *bool)() + SetStorageRequireEncryption(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_cross_profile_data_sharing_type.go b/src/internal/connector/graph/betasdk/models/android_work_profile_cross_profile_data_sharing_type.go new file mode 100644 index 000000000..119219446 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_cross_profile_data_sharing_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidWorkProfileCrossProfileDataSharingType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE AndroidWorkProfileCrossProfileDataSharingType = iota + // Prevent any sharing. + PREVENTANY_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + // Allow data sharing request from personal profile to work profile. + ALLOWPERSONALTOWORK_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + // No restrictions on sharing. + NORESTRICTIONS_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE +) + +func (i AndroidWorkProfileCrossProfileDataSharingType) String() string { + return []string{"deviceDefault", "preventAny", "allowPersonalToWork", "noRestrictions"}[i] +} +func ParseAndroidWorkProfileCrossProfileDataSharingType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + case "preventAny": + result = PREVENTANY_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + case "allowPersonalToWork": + result = ALLOWPERSONALTOWORK_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + case "noRestrictions": + result = NORESTRICTIONS_ANDROIDWORKPROFILECROSSPROFILEDATASHARINGTYPE + default: + return 0, errors.New("Unknown AndroidWorkProfileCrossProfileDataSharingType value: " + v) + } + return &result, nil +} +func SerializeAndroidWorkProfileCrossProfileDataSharingType(values []AndroidWorkProfileCrossProfileDataSharingType) []string { + 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/android_work_profile_custom_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration.go new file mode 100644 index 000000000..fa6a18dc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCustomConfiguration +type AndroidWorkProfileCustomConfiguration struct { + DeviceConfiguration + // OMA settings. This collection can contain a maximum of 500 elements. + omaSettings []OmaSettingable +} +// NewAndroidWorkProfileCustomConfiguration instantiates a new AndroidWorkProfileCustomConfiguration and sets the default values. +func NewAndroidWorkProfileCustomConfiguration()(*AndroidWorkProfileCustomConfiguration) { + m := &AndroidWorkProfileCustomConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileCustomConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileCustomConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCustomConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileCustomConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCustomConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["omaSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOmaSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OmaSettingable, len(val)) + for i, v := range val { + res[i] = v.(OmaSettingable) + } + m.SetOmaSettings(res) + } + return nil + } + return res +} +// GetOmaSettings gets the omaSettings property value. OMA settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileCustomConfiguration) GetOmaSettings()([]OmaSettingable) { + return m.omaSettings +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCustomConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetOmaSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOmaSettings())) + for i, v := range m.GetOmaSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("omaSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetOmaSettings sets the omaSettings property value. OMA settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileCustomConfiguration) SetOmaSettings(value []OmaSettingable)() { + m.omaSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_response.go new file mode 100644 index 000000000..473a0b3fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCustomConfigurationCollectionResponse +type AndroidWorkProfileCustomConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileCustomConfigurationable +} +// NewAndroidWorkProfileCustomConfigurationCollectionResponse instantiates a new AndroidWorkProfileCustomConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileCustomConfigurationCollectionResponse()(*AndroidWorkProfileCustomConfigurationCollectionResponse) { + m := &AndroidWorkProfileCustomConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileCustomConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileCustomConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileCustomConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileCustomConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileCustomConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileCustomConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileCustomConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileCustomConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileCustomConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileCustomConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileCustomConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileCustomConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_responseable.go new file mode 100644 index 000000000..b6cf3e56f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCustomConfigurationCollectionResponseable +type AndroidWorkProfileCustomConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileCustomConfigurationable) + SetValue(value []AndroidWorkProfileCustomConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configurationable.go new file mode 100644 index 000000000..6d9787968 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_custom_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileCustomConfigurationable +type AndroidWorkProfileCustomConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOmaSettings()([]OmaSettingable) + SetOmaSettings(value []OmaSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_default_app_permission_policy_type.go b/src/internal/connector/graph/betasdk/models/android_work_profile_default_app_permission_policy_type.go new file mode 100644 index 000000000..7e6244b4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_default_app_permission_policy_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidWorkProfileDefaultAppPermissionPolicyType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE AndroidWorkProfileDefaultAppPermissionPolicyType = iota + // Prompt. + PROMPT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto grant. + AUTOGRANT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + // Auto deny. + AUTODENY_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE +) + +func (i AndroidWorkProfileDefaultAppPermissionPolicyType) String() string { + return []string{"deviceDefault", "prompt", "autoGrant", "autoDeny"}[i] +} +func ParseAndroidWorkProfileDefaultAppPermissionPolicyType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + case "prompt": + result = PROMPT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoGrant": + result = AUTOGRANT_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + case "autoDeny": + result = AUTODENY_ANDROIDWORKPROFILEDEFAULTAPPPERMISSIONPOLICYTYPE + default: + return 0, errors.New("Unknown AndroidWorkProfileDefaultAppPermissionPolicyType value: " + v) + } + return &result, nil +} +func SerializeAndroidWorkProfileDefaultAppPermissionPolicyType(values []AndroidWorkProfileDefaultAppPermissionPolicyType) []string { + 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/android_work_profile_eas_email_profile_base.go b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base.go new file mode 100644 index 000000000..ea5c2bb82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEasEmailProfileBase +type AndroidWorkProfileEasEmailProfileBase struct { + DeviceConfiguration + // Exchange Active Sync authentication method. + authenticationMethod *EasAuthenticationMethod + // Possible values for email sync duration. + durationOfEmailToSync *EmailSyncDuration + // Possible values for username source or email source. + emailAddressSource *UserEmailSource + // Exchange location (URL) that the mail app connects to. + hostName *string + // Identity certificate. + identityCertificate AndroidWorkProfileCertificateProfileBaseable + // Indicates whether or not to use SSL. + requireSsl *bool + // Android username source. + usernameSource *AndroidUsernameSource +} +// NewAndroidWorkProfileEasEmailProfileBase instantiates a new AndroidWorkProfileEasEmailProfileBase and sets the default values. +func NewAndroidWorkProfileEasEmailProfileBase()(*AndroidWorkProfileEasEmailProfileBase) { + m := &AndroidWorkProfileEasEmailProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileEasEmailProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileEasEmailProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileEasEmailProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidWorkProfileGmailEasConfiguration": + return NewAndroidWorkProfileGmailEasConfiguration(), nil + case "#microsoft.graph.androidWorkProfileNineWorkEasConfiguration": + return NewAndroidWorkProfileNineWorkEasConfiguration(), nil + } + } + } + } + return NewAndroidWorkProfileEasEmailProfileBase(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidWorkProfileEasEmailProfileBase) GetAuthenticationMethod()(*EasAuthenticationMethod) { + return m.authenticationMethod +} +// GetDurationOfEmailToSync gets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidWorkProfileEasEmailProfileBase) GetDurationOfEmailToSync()(*EmailSyncDuration) { + return m.durationOfEmailToSync +} +// GetEmailAddressSource gets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidWorkProfileEasEmailProfileBase) GetEmailAddressSource()(*UserEmailSource) { + return m.emailAddressSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileEasEmailProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEasAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*EasAuthenticationMethod)) + } + return nil + } + res["durationOfEmailToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailSyncDuration) + if err != nil { + return err + } + if val != nil { + m.SetDurationOfEmailToSync(val.(*EmailSyncDuration)) + } + return nil + } + res["emailAddressSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserEmailSource) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddressSource(val.(*UserEmailSource)) + } + return nil + } + res["hostName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostName(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidWorkProfileCertificateProfileBaseable)) + } + return nil + } + res["requireSsl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSsl(val) + } + return nil + } + res["usernameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidUsernameSource) + if err != nil { + return err + } + if val != nil { + m.SetUsernameSource(val.(*AndroidUsernameSource)) + } + return nil + } + return res +} +// GetHostName gets the hostName property value. Exchange location (URL) that the mail app connects to. +func (m *AndroidWorkProfileEasEmailProfileBase) GetHostName()(*string) { + return m.hostName +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate. +func (m *AndroidWorkProfileEasEmailProfileBase) GetIdentityCertificate()(AndroidWorkProfileCertificateProfileBaseable) { + return m.identityCertificate +} +// GetRequireSsl gets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidWorkProfileEasEmailProfileBase) GetRequireSsl()(*bool) { + return m.requireSsl +} +// GetUsernameSource gets the usernameSource property value. Android username source. +func (m *AndroidWorkProfileEasEmailProfileBase) GetUsernameSource()(*AndroidUsernameSource) { + return m.usernameSource +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileEasEmailProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetDurationOfEmailToSync() != nil { + cast := (*m.GetDurationOfEmailToSync()).String() + err = writer.WriteStringValue("durationOfEmailToSync", &cast) + if err != nil { + return err + } + } + if m.GetEmailAddressSource() != nil { + cast := (*m.GetEmailAddressSource()).String() + err = writer.WriteStringValue("emailAddressSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hostName", m.GetHostName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSsl", m.GetRequireSsl()) + if err != nil { + return err + } + } + if m.GetUsernameSource() != nil { + cast := (*m.GetUsernameSource()).String() + err = writer.WriteStringValue("usernameSource", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Exchange Active Sync authentication method. +func (m *AndroidWorkProfileEasEmailProfileBase) SetAuthenticationMethod(value *EasAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetDurationOfEmailToSync sets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *AndroidWorkProfileEasEmailProfileBase) SetDurationOfEmailToSync(value *EmailSyncDuration)() { + m.durationOfEmailToSync = value +} +// SetEmailAddressSource sets the emailAddressSource property value. Possible values for username source or email source. +func (m *AndroidWorkProfileEasEmailProfileBase) SetEmailAddressSource(value *UserEmailSource)() { + m.emailAddressSource = value +} +// SetHostName sets the hostName property value. Exchange location (URL) that the mail app connects to. +func (m *AndroidWorkProfileEasEmailProfileBase) SetHostName(value *string)() { + m.hostName = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate. +func (m *AndroidWorkProfileEasEmailProfileBase) SetIdentityCertificate(value AndroidWorkProfileCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetRequireSsl sets the requireSsl property value. Indicates whether or not to use SSL. +func (m *AndroidWorkProfileEasEmailProfileBase) SetRequireSsl(value *bool)() { + m.requireSsl = value +} +// SetUsernameSource sets the usernameSource property value. Android username source. +func (m *AndroidWorkProfileEasEmailProfileBase) SetUsernameSource(value *AndroidUsernameSource)() { + m.usernameSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_response.go new file mode 100644 index 000000000..aa6f7381b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEasEmailProfileBaseCollectionResponse +type AndroidWorkProfileEasEmailProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileEasEmailProfileBaseable +} +// NewAndroidWorkProfileEasEmailProfileBaseCollectionResponse instantiates a new AndroidWorkProfileEasEmailProfileBaseCollectionResponse and sets the default values. +func NewAndroidWorkProfileEasEmailProfileBaseCollectionResponse()(*AndroidWorkProfileEasEmailProfileBaseCollectionResponse) { + m := &AndroidWorkProfileEasEmailProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileEasEmailProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileEasEmailProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileEasEmailProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileEasEmailProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileEasEmailProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileEasEmailProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileEasEmailProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileEasEmailProfileBaseCollectionResponse) GetValue()([]AndroidWorkProfileEasEmailProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileEasEmailProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileEasEmailProfileBaseCollectionResponse) SetValue(value []AndroidWorkProfileEasEmailProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_responseable.go new file mode 100644 index 000000000..c87c9ad66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEasEmailProfileBaseCollectionResponseable +type AndroidWorkProfileEasEmailProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileEasEmailProfileBaseable) + SetValue(value []AndroidWorkProfileEasEmailProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_baseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_baseable.go new file mode 100644 index 000000000..b42bac6eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_eas_email_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEasEmailProfileBaseable +type AndroidWorkProfileEasEmailProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*EasAuthenticationMethod) + GetDurationOfEmailToSync()(*EmailSyncDuration) + GetEmailAddressSource()(*UserEmailSource) + GetHostName()(*string) + GetIdentityCertificate()(AndroidWorkProfileCertificateProfileBaseable) + GetRequireSsl()(*bool) + GetUsernameSource()(*AndroidUsernameSource) + SetAuthenticationMethod(value *EasAuthenticationMethod)() + SetDurationOfEmailToSync(value *EmailSyncDuration)() + SetEmailAddressSource(value *UserEmailSource)() + SetHostName(value *string)() + SetIdentityCertificate(value AndroidWorkProfileCertificateProfileBaseable)() + SetRequireSsl(value *bool)() + SetUsernameSource(value *AndroidUsernameSource)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..42313e527 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration.go @@ -0,0 +1,305 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEnterpriseWiFiConfiguration +type AndroidWorkProfileEnterpriseWiFiConfiguration struct { + AndroidWorkProfileWiFiConfiguration + // Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Extensible Authentication Protocol (EAP) Configuration Types. + eapType *AndroidEapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. + identityCertificateForClientAuthentication AndroidWorkProfileCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. + innerAuthenticationProtocolForPeap *NonEapAuthenticationMethodForPeap + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. + outerIdentityPrivacyTemporaryValue *string + // URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. + proxyAutomaticConfigurationUrl *string + // Wi-Fi Proxy Settings. + proxySettings *WiFiProxySetting + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. + rootCertificateForServerValidation AndroidWorkProfileTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string +} +// NewAndroidWorkProfileEnterpriseWiFiConfiguration instantiates a new AndroidWorkProfileEnterpriseWiFiConfiguration and sets the default values. +func NewAndroidWorkProfileEnterpriseWiFiConfiguration()(*AndroidWorkProfileEnterpriseWiFiConfiguration) { + m := &AndroidWorkProfileEnterpriseWiFiConfiguration{ + AndroidWorkProfileWiFiConfiguration: *NewAndroidWorkProfileWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetEapType()(*AndroidEapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWorkProfileWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*AndroidEapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(AndroidWorkProfileCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["innerAuthenticationProtocolForPeap"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForPeap) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForPeap(val.(*NonEapAuthenticationMethodForPeap)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["proxyAutomaticConfigurationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyAutomaticConfigurationUrl(val) + } + return nil + } + res["proxySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiProxySetting) + if err != nil { + return err + } + if val != nil { + m.SetProxySettings(val.(*WiFiProxySetting)) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidWorkProfileTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(AndroidWorkProfileTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(AndroidWorkProfileCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetInnerAuthenticationProtocolForPeap gets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) { + return m.innerAuthenticationProtocolForPeap +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetProxyAutomaticConfigurationUrl gets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetProxyAutomaticConfigurationUrl()(*string) { + return m.proxyAutomaticConfigurationUrl +} +// GetProxySettings gets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetProxySettings()(*WiFiProxySetting) { + return m.proxySettings +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(AndroidWorkProfileTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWorkProfileWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForPeap() != nil { + cast := (*m.GetInnerAuthenticationProtocolForPeap()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForPeap", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyAutomaticConfigurationUrl", m.GetProxyAutomaticConfigurationUrl()) + if err != nil { + return err + } + } + if m.GetProxySettings() != nil { + cast := (*m.GetProxySettings()).String() + err = writer.WriteStringValue("proxySettings", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetEapType(value *AndroidEapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value AndroidWorkProfileCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetInnerAuthenticationProtocolForPeap sets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. Possible values are: none, microsoftChapVersionTwo. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() { + m.innerAuthenticationProtocolForPeap = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetProxyAutomaticConfigurationUrl sets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetProxyAutomaticConfigurationUrl(value *string)() { + m.proxyAutomaticConfigurationUrl = value +} +// SetProxySettings sets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetProxySettings(value *WiFiProxySetting)() { + m.proxySettings = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value AndroidWorkProfileTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AndroidWorkProfileEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..5b2a00fee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse +type AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileEnterpriseWiFiConfigurationable +} +// NewAndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse instantiates a new AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse()(*AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse) { + m := &AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..e8eba0cd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponseable +type AndroidWorkProfileEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileEnterpriseWiFiConfigurationable) + SetValue(value []AndroidWorkProfileEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..98722c342 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_enterprise_wi_fi_configurationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileEnterpriseWiFiConfigurationable +type AndroidWorkProfileEnterpriseWiFiConfigurationable interface { + AndroidWorkProfileWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapType()(*AndroidEapType) + GetIdentityCertificateForClientAuthentication()(AndroidWorkProfileCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetProxyAutomaticConfigurationUrl()(*string) + GetProxySettings()(*WiFiProxySetting) + GetRootCertificateForServerValidation()(AndroidWorkProfileTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapType(value *AndroidEapType)() + SetIdentityCertificateForClientAuthentication(value AndroidWorkProfileCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetProxyAutomaticConfigurationUrl(value *string)() + SetProxySettings(value *WiFiProxySetting)() + SetRootCertificateForServerValidation(value AndroidWorkProfileTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration.go new file mode 100644 index 000000000..8ff83eb2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration.go @@ -0,0 +1,1212 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGeneralDeviceConfiguration +type AndroidWorkProfileGeneralDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not to block face unlock. + passwordBlockFaceUnlock *bool + // Indicates whether or not to block fingerprint unlock. + passwordBlockFingerprintUnlock *bool + // Indicates whether or not to block iris unlock. + passwordBlockIrisUnlock *bool + // Indicates whether or not to block Smart Lock and other trust agents. + passwordBlockTrustAgents *bool + // Number of days before the password expires. Valid values 1 to 365 + passwordExpirationDays *int32 + // Minimum length of passwords. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous passwords to block. Valid values 0 to 24 + passwordPreviousPasswordBlockCount *int32 + // Android Work Profile required password type. + passwordRequiredType *AndroidWorkProfileRequiredPasswordType + // Number of sign in failures allowed before factory reset. Valid values 1 to 16 + passwordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + requiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Require the Android Verify apps feature is turned on. + securityRequireVerifyApps *bool + // Enable lockdown mode for always-on VPN. + vpnAlwaysOnPackageIdentifier *string + // Enable lockdown mode for always-on VPN. + vpnEnableAlwaysOnLockdownMode *bool + // Indicates whether to allow installation of apps from unknown sources. + workProfileAllowAppInstallsFromUnknownSources *bool + // Allow widgets from work profile apps. + workProfileAllowWidgets *bool + // Block users from adding/removing accounts in work profile. + workProfileBlockAddingAccounts *bool + // Block work profile camera. + workProfileBlockCamera *bool + // Block display work profile caller ID in personal profile. + workProfileBlockCrossProfileCallerId *bool + // Block work profile contacts availability in personal profile. + workProfileBlockCrossProfileContactsSearch *bool + // Boolean that indicates if the setting disallow cross profile copy/paste is enabled. + workProfileBlockCrossProfileCopyPaste *bool + // Indicates whether or not to block notifications while device locked. + workProfileBlockNotificationsWhileDeviceLocked *bool + // Prevent app installations from unknown sources in the personal profile. + workProfileBlockPersonalAppInstallsFromUnknownSources *bool + // Block screen capture in work profile. + workProfileBlockScreenCapture *bool + // Allow bluetooth devices to access enterprise contacts. + workProfileBluetoothEnableContactSharing *bool + // Android Work Profile cross profile data sharing type. + workProfileDataSharingType *AndroidWorkProfileCrossProfileDataSharingType + // Android Work Profile default app permission policy type. + workProfileDefaultAppPermissionPolicy *AndroidWorkProfileDefaultAppPermissionPolicyType + // Indicates whether or not to block face unlock for work profile. + workProfilePasswordBlockFaceUnlock *bool + // Indicates whether or not to block fingerprint unlock for work profile. + workProfilePasswordBlockFingerprintUnlock *bool + // Indicates whether or not to block iris unlock for work profile. + workProfilePasswordBlockIrisUnlock *bool + // Indicates whether or not to block Smart Lock and other trust agents for work profile. + workProfilePasswordBlockTrustAgents *bool + // Number of days before the work profile password expires. Valid values 1 to 365 + workProfilePasswordExpirationDays *int32 + // Minimum length of work profile password. Valid values 4 to 16 + workProfilePasswordMinimumLength *int32 + // Minimum # of letter characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinLetterCharacters *int32 + // Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinLowerCaseCharacters *int32 + // Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinNonLetterCharacters *int32 + // Minimum # of numeric characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinNumericCharacters *int32 + // Minimum # of symbols required in work profile password. Valid values 1 to 10 + workProfilePasswordMinSymbolCharacters *int32 + // Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 + workProfilePasswordMinUpperCaseCharacters *int32 + // Minutes of inactivity before the screen times out. + workProfilePasswordMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous work profile passwords to block. Valid values 0 to 24 + workProfilePasswordPreviousPasswordBlockCount *int32 + // Android Work Profile required password type. + workProfilePasswordRequiredType *AndroidWorkProfileRequiredPasswordType + // Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 + workProfilePasswordSignInFailureCountBeforeFactoryReset *int32 + // The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. + workProfileRequiredPasswordComplexity *AndroidRequiredPasswordComplexity + // Password is required or not for work profile + workProfileRequirePassword *bool +} +// NewAndroidWorkProfileGeneralDeviceConfiguration instantiates a new AndroidWorkProfileGeneralDeviceConfiguration and sets the default values. +func NewAndroidWorkProfileGeneralDeviceConfiguration()(*AndroidWorkProfileGeneralDeviceConfiguration) { + m := &AndroidWorkProfileGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileGeneralDeviceConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["passwordBlockFaceUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFaceUnlock(val) + } + return nil + } + res["passwordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFingerprintUnlock(val) + } + return nil + } + res["passwordBlockIrisUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockIrisUnlock(val) + } + return nil + } + res["passwordBlockTrustAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockTrustAgents(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWorkProfileRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidWorkProfileRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["requiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["securityRequireVerifyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityRequireVerifyApps(val) + } + return nil + } + res["vpnAlwaysOnPackageIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnAlwaysOnPackageIdentifier(val) + } + return nil + } + res["vpnEnableAlwaysOnLockdownMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnEnableAlwaysOnLockdownMode(val) + } + return nil + } + res["workProfileAllowAppInstallsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileAllowAppInstallsFromUnknownSources(val) + } + return nil + } + res["workProfileAllowWidgets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileAllowWidgets(val) + } + return nil + } + res["workProfileBlockAddingAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockAddingAccounts(val) + } + return nil + } + res["workProfileBlockCamera"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCamera(val) + } + return nil + } + res["workProfileBlockCrossProfileCallerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileCallerId(val) + } + return nil + } + res["workProfileBlockCrossProfileContactsSearch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileContactsSearch(val) + } + return nil + } + res["workProfileBlockCrossProfileCopyPaste"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockCrossProfileCopyPaste(val) + } + return nil + } + res["workProfileBlockNotificationsWhileDeviceLocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockNotificationsWhileDeviceLocked(val) + } + return nil + } + res["workProfileBlockPersonalAppInstallsFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(val) + } + return nil + } + res["workProfileBlockScreenCapture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBlockScreenCapture(val) + } + return nil + } + res["workProfileBluetoothEnableContactSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileBluetoothEnableContactSharing(val) + } + return nil + } + res["workProfileDataSharingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWorkProfileCrossProfileDataSharingType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileDataSharingType(val.(*AndroidWorkProfileCrossProfileDataSharingType)) + } + return nil + } + res["workProfileDefaultAppPermissionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWorkProfileDefaultAppPermissionPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileDefaultAppPermissionPolicy(val.(*AndroidWorkProfileDefaultAppPermissionPolicyType)) + } + return nil + } + res["workProfilePasswordBlockFaceUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockFaceUnlock(val) + } + return nil + } + res["workProfilePasswordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockFingerprintUnlock(val) + } + return nil + } + res["workProfilePasswordBlockIrisUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockIrisUnlock(val) + } + return nil + } + res["workProfilePasswordBlockTrustAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordBlockTrustAgents(val) + } + return nil + } + res["workProfilePasswordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordExpirationDays(val) + } + return nil + } + res["workProfilePasswordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinimumLength(val) + } + return nil + } + res["workProfilePasswordMinLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinLowerCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinLowerCaseCharacters(val) + } + return nil + } + res["workProfilePasswordMinNonLetterCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinNonLetterCharacters(val) + } + return nil + } + res["workProfilePasswordMinNumericCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinNumericCharacters(val) + } + return nil + } + res["workProfilePasswordMinSymbolCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinSymbolCharacters(val) + } + return nil + } + res["workProfilePasswordMinUpperCaseCharacters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinUpperCaseCharacters(val) + } + return nil + } + res["workProfilePasswordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["workProfilePasswordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["workProfilePasswordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWorkProfileRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordRequiredType(val.(*AndroidWorkProfileRequiredPasswordType)) + } + return nil + } + res["workProfilePasswordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["workProfileRequiredPasswordComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidRequiredPasswordComplexity) + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileRequiredPasswordComplexity(val.(*AndroidRequiredPasswordComplexity)) + } + return nil + } + res["workProfileRequirePassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWorkProfileRequirePassword(val) + } + return nil + } + return res +} +// GetPasswordBlockFaceUnlock gets the passwordBlockFaceUnlock property value. Indicates whether or not to block face unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordBlockFaceUnlock()(*bool) { + return m.passwordBlockFaceUnlock +} +// GetPasswordBlockFingerprintUnlock gets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordBlockFingerprintUnlock()(*bool) { + return m.passwordBlockFingerprintUnlock +} +// GetPasswordBlockIrisUnlock gets the passwordBlockIrisUnlock property value. Indicates whether or not to block iris unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordBlockIrisUnlock()(*bool) { + return m.passwordBlockIrisUnlock +} +// GetPasswordBlockTrustAgents gets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordBlockTrustAgents()(*bool) { + return m.passwordBlockTrustAgents +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Android Work Profile required password type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordRequiredType()(*AndroidWorkProfileRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetRequiredPasswordComplexity gets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.requiredPasswordComplexity +} +// GetSecurityRequireVerifyApps gets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetSecurityRequireVerifyApps()(*bool) { + return m.securityRequireVerifyApps +} +// GetVpnAlwaysOnPackageIdentifier gets the vpnAlwaysOnPackageIdentifier property value. Enable lockdown mode for always-on VPN. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetVpnAlwaysOnPackageIdentifier()(*string) { + return m.vpnAlwaysOnPackageIdentifier +} +// GetVpnEnableAlwaysOnLockdownMode gets the vpnEnableAlwaysOnLockdownMode property value. Enable lockdown mode for always-on VPN. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetVpnEnableAlwaysOnLockdownMode()(*bool) { + return m.vpnEnableAlwaysOnLockdownMode +} +// GetWorkProfileAllowAppInstallsFromUnknownSources gets the workProfileAllowAppInstallsFromUnknownSources property value. Indicates whether to allow installation of apps from unknown sources. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileAllowAppInstallsFromUnknownSources()(*bool) { + return m.workProfileAllowAppInstallsFromUnknownSources +} +// GetWorkProfileAllowWidgets gets the workProfileAllowWidgets property value. Allow widgets from work profile apps. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileAllowWidgets()(*bool) { + return m.workProfileAllowWidgets +} +// GetWorkProfileBlockAddingAccounts gets the workProfileBlockAddingAccounts property value. Block users from adding/removing accounts in work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockAddingAccounts()(*bool) { + return m.workProfileBlockAddingAccounts +} +// GetWorkProfileBlockCamera gets the workProfileBlockCamera property value. Block work profile camera. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockCamera()(*bool) { + return m.workProfileBlockCamera +} +// GetWorkProfileBlockCrossProfileCallerId gets the workProfileBlockCrossProfileCallerId property value. Block display work profile caller ID in personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileCallerId()(*bool) { + return m.workProfileBlockCrossProfileCallerId +} +// GetWorkProfileBlockCrossProfileContactsSearch gets the workProfileBlockCrossProfileContactsSearch property value. Block work profile contacts availability in personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileContactsSearch()(*bool) { + return m.workProfileBlockCrossProfileContactsSearch +} +// GetWorkProfileBlockCrossProfileCopyPaste gets the workProfileBlockCrossProfileCopyPaste property value. Boolean that indicates if the setting disallow cross profile copy/paste is enabled. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockCrossProfileCopyPaste()(*bool) { + return m.workProfileBlockCrossProfileCopyPaste +} +// GetWorkProfileBlockNotificationsWhileDeviceLocked gets the workProfileBlockNotificationsWhileDeviceLocked property value. Indicates whether or not to block notifications while device locked. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockNotificationsWhileDeviceLocked()(*bool) { + return m.workProfileBlockNotificationsWhileDeviceLocked +} +// GetWorkProfileBlockPersonalAppInstallsFromUnknownSources gets the workProfileBlockPersonalAppInstallsFromUnknownSources property value. Prevent app installations from unknown sources in the personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()(*bool) { + return m.workProfileBlockPersonalAppInstallsFromUnknownSources +} +// GetWorkProfileBlockScreenCapture gets the workProfileBlockScreenCapture property value. Block screen capture in work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBlockScreenCapture()(*bool) { + return m.workProfileBlockScreenCapture +} +// GetWorkProfileBluetoothEnableContactSharing gets the workProfileBluetoothEnableContactSharing property value. Allow bluetooth devices to access enterprise contacts. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileBluetoothEnableContactSharing()(*bool) { + return m.workProfileBluetoothEnableContactSharing +} +// GetWorkProfileDataSharingType gets the workProfileDataSharingType property value. Android Work Profile cross profile data sharing type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileDataSharingType()(*AndroidWorkProfileCrossProfileDataSharingType) { + return m.workProfileDataSharingType +} +// GetWorkProfileDefaultAppPermissionPolicy gets the workProfileDefaultAppPermissionPolicy property value. Android Work Profile default app permission policy type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileDefaultAppPermissionPolicy()(*AndroidWorkProfileDefaultAppPermissionPolicyType) { + return m.workProfileDefaultAppPermissionPolicy +} +// GetWorkProfilePasswordBlockFaceUnlock gets the workProfilePasswordBlockFaceUnlock property value. Indicates whether or not to block face unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordBlockFaceUnlock()(*bool) { + return m.workProfilePasswordBlockFaceUnlock +} +// GetWorkProfilePasswordBlockFingerprintUnlock gets the workProfilePasswordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordBlockFingerprintUnlock()(*bool) { + return m.workProfilePasswordBlockFingerprintUnlock +} +// GetWorkProfilePasswordBlockIrisUnlock gets the workProfilePasswordBlockIrisUnlock property value. Indicates whether or not to block iris unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordBlockIrisUnlock()(*bool) { + return m.workProfilePasswordBlockIrisUnlock +} +// GetWorkProfilePasswordBlockTrustAgents gets the workProfilePasswordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordBlockTrustAgents()(*bool) { + return m.workProfilePasswordBlockTrustAgents +} +// GetWorkProfilePasswordExpirationDays gets the workProfilePasswordExpirationDays property value. Number of days before the work profile password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordExpirationDays()(*int32) { + return m.workProfilePasswordExpirationDays +} +// GetWorkProfilePasswordMinimumLength gets the workProfilePasswordMinimumLength property value. Minimum length of work profile password. Valid values 4 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinimumLength()(*int32) { + return m.workProfilePasswordMinimumLength +} +// GetWorkProfilePasswordMinLetterCharacters gets the workProfilePasswordMinLetterCharacters property value. Minimum # of letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinLetterCharacters()(*int32) { + return m.workProfilePasswordMinLetterCharacters +} +// GetWorkProfilePasswordMinLowerCaseCharacters gets the workProfilePasswordMinLowerCaseCharacters property value. Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinLowerCaseCharacters()(*int32) { + return m.workProfilePasswordMinLowerCaseCharacters +} +// GetWorkProfilePasswordMinNonLetterCharacters gets the workProfilePasswordMinNonLetterCharacters property value. Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinNonLetterCharacters()(*int32) { + return m.workProfilePasswordMinNonLetterCharacters +} +// GetWorkProfilePasswordMinNumericCharacters gets the workProfilePasswordMinNumericCharacters property value. Minimum # of numeric characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinNumericCharacters()(*int32) { + return m.workProfilePasswordMinNumericCharacters +} +// GetWorkProfilePasswordMinSymbolCharacters gets the workProfilePasswordMinSymbolCharacters property value. Minimum # of symbols required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinSymbolCharacters()(*int32) { + return m.workProfilePasswordMinSymbolCharacters +} +// GetWorkProfilePasswordMinUpperCaseCharacters gets the workProfilePasswordMinUpperCaseCharacters property value. Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinUpperCaseCharacters()(*int32) { + return m.workProfilePasswordMinUpperCaseCharacters +} +// GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout gets the workProfilePasswordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.workProfilePasswordMinutesOfInactivityBeforeScreenTimeout +} +// GetWorkProfilePasswordPreviousPasswordBlockCount gets the workProfilePasswordPreviousPasswordBlockCount property value. Number of previous work profile passwords to block. Valid values 0 to 24 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordPreviousPasswordBlockCount()(*int32) { + return m.workProfilePasswordPreviousPasswordBlockCount +} +// GetWorkProfilePasswordRequiredType gets the workProfilePasswordRequiredType property value. Android Work Profile required password type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordRequiredType()(*AndroidWorkProfileRequiredPasswordType) { + return m.workProfilePasswordRequiredType +} +// GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset gets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.workProfilePasswordSignInFailureCountBeforeFactoryReset +} +// GetWorkProfileRequiredPasswordComplexity gets the workProfileRequiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) { + return m.workProfileRequiredPasswordComplexity +} +// GetWorkProfileRequirePassword gets the workProfileRequirePassword property value. Password is required or not for work profile +func (m *AndroidWorkProfileGeneralDeviceConfiguration) GetWorkProfileRequirePassword()(*bool) { + return m.workProfileRequirePassword +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("passwordBlockFaceUnlock", m.GetPasswordBlockFaceUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockFingerprintUnlock", m.GetPasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockIrisUnlock", m.GetPasswordBlockIrisUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockTrustAgents", m.GetPasswordBlockTrustAgents()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetRequiredPasswordComplexity() != nil { + cast := (*m.GetRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("requiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityRequireVerifyApps", m.GetSecurityRequireVerifyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnAlwaysOnPackageIdentifier", m.GetVpnAlwaysOnPackageIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("vpnEnableAlwaysOnLockdownMode", m.GetVpnEnableAlwaysOnLockdownMode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileAllowAppInstallsFromUnknownSources", m.GetWorkProfileAllowAppInstallsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileAllowWidgets", m.GetWorkProfileAllowWidgets()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockAddingAccounts", m.GetWorkProfileBlockAddingAccounts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCamera", m.GetWorkProfileBlockCamera()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileCallerId", m.GetWorkProfileBlockCrossProfileCallerId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileContactsSearch", m.GetWorkProfileBlockCrossProfileContactsSearch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockCrossProfileCopyPaste", m.GetWorkProfileBlockCrossProfileCopyPaste()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockNotificationsWhileDeviceLocked", m.GetWorkProfileBlockNotificationsWhileDeviceLocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockPersonalAppInstallsFromUnknownSources", m.GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBlockScreenCapture", m.GetWorkProfileBlockScreenCapture()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileBluetoothEnableContactSharing", m.GetWorkProfileBluetoothEnableContactSharing()) + if err != nil { + return err + } + } + if m.GetWorkProfileDataSharingType() != nil { + cast := (*m.GetWorkProfileDataSharingType()).String() + err = writer.WriteStringValue("workProfileDataSharingType", &cast) + if err != nil { + return err + } + } + if m.GetWorkProfileDefaultAppPermissionPolicy() != nil { + cast := (*m.GetWorkProfileDefaultAppPermissionPolicy()).String() + err = writer.WriteStringValue("workProfileDefaultAppPermissionPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockFaceUnlock", m.GetWorkProfilePasswordBlockFaceUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockFingerprintUnlock", m.GetWorkProfilePasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockIrisUnlock", m.GetWorkProfilePasswordBlockIrisUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfilePasswordBlockTrustAgents", m.GetWorkProfilePasswordBlockTrustAgents()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordExpirationDays", m.GetWorkProfilePasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinimumLength", m.GetWorkProfilePasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinLetterCharacters", m.GetWorkProfilePasswordMinLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinLowerCaseCharacters", m.GetWorkProfilePasswordMinLowerCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinNonLetterCharacters", m.GetWorkProfilePasswordMinNonLetterCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinNumericCharacters", m.GetWorkProfilePasswordMinNumericCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinSymbolCharacters", m.GetWorkProfilePasswordMinSymbolCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinUpperCaseCharacters", m.GetWorkProfilePasswordMinUpperCaseCharacters()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordMinutesOfInactivityBeforeScreenTimeout", m.GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordPreviousPasswordBlockCount", m.GetWorkProfilePasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + if m.GetWorkProfilePasswordRequiredType() != nil { + cast := (*m.GetWorkProfilePasswordRequiredType()).String() + err = writer.WriteStringValue("workProfilePasswordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workProfilePasswordSignInFailureCountBeforeFactoryReset", m.GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + if m.GetWorkProfileRequiredPasswordComplexity() != nil { + cast := (*m.GetWorkProfileRequiredPasswordComplexity()).String() + err = writer.WriteStringValue("workProfileRequiredPasswordComplexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("workProfileRequirePassword", m.GetWorkProfileRequirePassword()) + if err != nil { + return err + } + } + return nil +} +// SetPasswordBlockFaceUnlock sets the passwordBlockFaceUnlock property value. Indicates whether or not to block face unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordBlockFaceUnlock(value *bool)() { + m.passwordBlockFaceUnlock = value +} +// SetPasswordBlockFingerprintUnlock sets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordBlockFingerprintUnlock(value *bool)() { + m.passwordBlockFingerprintUnlock = value +} +// SetPasswordBlockIrisUnlock sets the passwordBlockIrisUnlock property value. Indicates whether or not to block iris unlock. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordBlockIrisUnlock(value *bool)() { + m.passwordBlockIrisUnlock = value +} +// SetPasswordBlockTrustAgents sets the passwordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordBlockTrustAgents(value *bool)() { + m.passwordBlockTrustAgents = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum length of passwords. Valid values 4 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 0 to 24 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Android Work Profile required password type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordRequiredType(value *AndroidWorkProfileRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before factory reset. Valid values 1 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetRequiredPasswordComplexity sets the requiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.requiredPasswordComplexity = value +} +// SetSecurityRequireVerifyApps sets the securityRequireVerifyApps property value. Require the Android Verify apps feature is turned on. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetSecurityRequireVerifyApps(value *bool)() { + m.securityRequireVerifyApps = value +} +// SetVpnAlwaysOnPackageIdentifier sets the vpnAlwaysOnPackageIdentifier property value. Enable lockdown mode for always-on VPN. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetVpnAlwaysOnPackageIdentifier(value *string)() { + m.vpnAlwaysOnPackageIdentifier = value +} +// SetVpnEnableAlwaysOnLockdownMode sets the vpnEnableAlwaysOnLockdownMode property value. Enable lockdown mode for always-on VPN. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetVpnEnableAlwaysOnLockdownMode(value *bool)() { + m.vpnEnableAlwaysOnLockdownMode = value +} +// SetWorkProfileAllowAppInstallsFromUnknownSources sets the workProfileAllowAppInstallsFromUnknownSources property value. Indicates whether to allow installation of apps from unknown sources. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileAllowAppInstallsFromUnknownSources(value *bool)() { + m.workProfileAllowAppInstallsFromUnknownSources = value +} +// SetWorkProfileAllowWidgets sets the workProfileAllowWidgets property value. Allow widgets from work profile apps. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileAllowWidgets(value *bool)() { + m.workProfileAllowWidgets = value +} +// SetWorkProfileBlockAddingAccounts sets the workProfileBlockAddingAccounts property value. Block users from adding/removing accounts in work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockAddingAccounts(value *bool)() { + m.workProfileBlockAddingAccounts = value +} +// SetWorkProfileBlockCamera sets the workProfileBlockCamera property value. Block work profile camera. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockCamera(value *bool)() { + m.workProfileBlockCamera = value +} +// SetWorkProfileBlockCrossProfileCallerId sets the workProfileBlockCrossProfileCallerId property value. Block display work profile caller ID in personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileCallerId(value *bool)() { + m.workProfileBlockCrossProfileCallerId = value +} +// SetWorkProfileBlockCrossProfileContactsSearch sets the workProfileBlockCrossProfileContactsSearch property value. Block work profile contacts availability in personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileContactsSearch(value *bool)() { + m.workProfileBlockCrossProfileContactsSearch = value +} +// SetWorkProfileBlockCrossProfileCopyPaste sets the workProfileBlockCrossProfileCopyPaste property value. Boolean that indicates if the setting disallow cross profile copy/paste is enabled. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockCrossProfileCopyPaste(value *bool)() { + m.workProfileBlockCrossProfileCopyPaste = value +} +// SetWorkProfileBlockNotificationsWhileDeviceLocked sets the workProfileBlockNotificationsWhileDeviceLocked property value. Indicates whether or not to block notifications while device locked. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockNotificationsWhileDeviceLocked(value *bool)() { + m.workProfileBlockNotificationsWhileDeviceLocked = value +} +// SetWorkProfileBlockPersonalAppInstallsFromUnknownSources sets the workProfileBlockPersonalAppInstallsFromUnknownSources property value. Prevent app installations from unknown sources in the personal profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(value *bool)() { + m.workProfileBlockPersonalAppInstallsFromUnknownSources = value +} +// SetWorkProfileBlockScreenCapture sets the workProfileBlockScreenCapture property value. Block screen capture in work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBlockScreenCapture(value *bool)() { + m.workProfileBlockScreenCapture = value +} +// SetWorkProfileBluetoothEnableContactSharing sets the workProfileBluetoothEnableContactSharing property value. Allow bluetooth devices to access enterprise contacts. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileBluetoothEnableContactSharing(value *bool)() { + m.workProfileBluetoothEnableContactSharing = value +} +// SetWorkProfileDataSharingType sets the workProfileDataSharingType property value. Android Work Profile cross profile data sharing type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileDataSharingType(value *AndroidWorkProfileCrossProfileDataSharingType)() { + m.workProfileDataSharingType = value +} +// SetWorkProfileDefaultAppPermissionPolicy sets the workProfileDefaultAppPermissionPolicy property value. Android Work Profile default app permission policy type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileDefaultAppPermissionPolicy(value *AndroidWorkProfileDefaultAppPermissionPolicyType)() { + m.workProfileDefaultAppPermissionPolicy = value +} +// SetWorkProfilePasswordBlockFaceUnlock sets the workProfilePasswordBlockFaceUnlock property value. Indicates whether or not to block face unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordBlockFaceUnlock(value *bool)() { + m.workProfilePasswordBlockFaceUnlock = value +} +// SetWorkProfilePasswordBlockFingerprintUnlock sets the workProfilePasswordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordBlockFingerprintUnlock(value *bool)() { + m.workProfilePasswordBlockFingerprintUnlock = value +} +// SetWorkProfilePasswordBlockIrisUnlock sets the workProfilePasswordBlockIrisUnlock property value. Indicates whether or not to block iris unlock for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordBlockIrisUnlock(value *bool)() { + m.workProfilePasswordBlockIrisUnlock = value +} +// SetWorkProfilePasswordBlockTrustAgents sets the workProfilePasswordBlockTrustAgents property value. Indicates whether or not to block Smart Lock and other trust agents for work profile. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordBlockTrustAgents(value *bool)() { + m.workProfilePasswordBlockTrustAgents = value +} +// SetWorkProfilePasswordExpirationDays sets the workProfilePasswordExpirationDays property value. Number of days before the work profile password expires. Valid values 1 to 365 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordExpirationDays(value *int32)() { + m.workProfilePasswordExpirationDays = value +} +// SetWorkProfilePasswordMinimumLength sets the workProfilePasswordMinimumLength property value. Minimum length of work profile password. Valid values 4 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinimumLength(value *int32)() { + m.workProfilePasswordMinimumLength = value +} +// SetWorkProfilePasswordMinLetterCharacters sets the workProfilePasswordMinLetterCharacters property value. Minimum # of letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinLetterCharacters(value *int32)() { + m.workProfilePasswordMinLetterCharacters = value +} +// SetWorkProfilePasswordMinLowerCaseCharacters sets the workProfilePasswordMinLowerCaseCharacters property value. Minimum # of lower-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinLowerCaseCharacters(value *int32)() { + m.workProfilePasswordMinLowerCaseCharacters = value +} +// SetWorkProfilePasswordMinNonLetterCharacters sets the workProfilePasswordMinNonLetterCharacters property value. Minimum # of non-letter characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinNonLetterCharacters(value *int32)() { + m.workProfilePasswordMinNonLetterCharacters = value +} +// SetWorkProfilePasswordMinNumericCharacters sets the workProfilePasswordMinNumericCharacters property value. Minimum # of numeric characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinNumericCharacters(value *int32)() { + m.workProfilePasswordMinNumericCharacters = value +} +// SetWorkProfilePasswordMinSymbolCharacters sets the workProfilePasswordMinSymbolCharacters property value. Minimum # of symbols required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinSymbolCharacters(value *int32)() { + m.workProfilePasswordMinSymbolCharacters = value +} +// SetWorkProfilePasswordMinUpperCaseCharacters sets the workProfilePasswordMinUpperCaseCharacters property value. Minimum # of upper-case characters required in work profile password. Valid values 1 to 10 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinUpperCaseCharacters(value *int32)() { + m.workProfilePasswordMinUpperCaseCharacters = value +} +// SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout sets the workProfilePasswordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.workProfilePasswordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetWorkProfilePasswordPreviousPasswordBlockCount sets the workProfilePasswordPreviousPasswordBlockCount property value. Number of previous work profile passwords to block. Valid values 0 to 24 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordPreviousPasswordBlockCount(value *int32)() { + m.workProfilePasswordPreviousPasswordBlockCount = value +} +// SetWorkProfilePasswordRequiredType sets the workProfilePasswordRequiredType property value. Android Work Profile required password type. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordRequiredType(value *AndroidWorkProfileRequiredPasswordType)() { + m.workProfilePasswordRequiredType = value +} +// SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset sets the workProfilePasswordSignInFailureCountBeforeFactoryReset property value. Number of sign in failures allowed before work profile is removed and all corporate data deleted. Valid values 1 to 16 +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.workProfilePasswordSignInFailureCountBeforeFactoryReset = value +} +// SetWorkProfileRequiredPasswordComplexity sets the workProfileRequiredPasswordComplexity property value. The password complexity types that can be set on Android. One of: NONE, LOW, MEDIUM, HIGH. This is an API targeted to Android 11+. +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() { + m.workProfileRequiredPasswordComplexity = value +} +// SetWorkProfileRequirePassword sets the workProfileRequirePassword property value. Password is required or not for work profile +func (m *AndroidWorkProfileGeneralDeviceConfiguration) SetWorkProfileRequirePassword(value *bool)() { + m.workProfileRequirePassword = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_response.go new file mode 100644 index 000000000..1ff3b1285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse +type AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileGeneralDeviceConfigurationable +} +// NewAndroidWorkProfileGeneralDeviceConfigurationCollectionResponse instantiates a new AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileGeneralDeviceConfigurationCollectionResponse()(*AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse) { + m := &AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileGeneralDeviceConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..e0d21f332 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGeneralDeviceConfigurationCollectionResponseable +type AndroidWorkProfileGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileGeneralDeviceConfigurationable) + SetValue(value []AndroidWorkProfileGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configurationable.go new file mode 100644 index 000000000..d5f86b799 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_general_device_configurationable.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGeneralDeviceConfigurationable +type AndroidWorkProfileGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPasswordBlockFaceUnlock()(*bool) + GetPasswordBlockFingerprintUnlock()(*bool) + GetPasswordBlockIrisUnlock()(*bool) + GetPasswordBlockTrustAgents()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequiredType()(*AndroidWorkProfileRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetSecurityRequireVerifyApps()(*bool) + GetVpnAlwaysOnPackageIdentifier()(*string) + GetVpnEnableAlwaysOnLockdownMode()(*bool) + GetWorkProfileAllowAppInstallsFromUnknownSources()(*bool) + GetWorkProfileAllowWidgets()(*bool) + GetWorkProfileBlockAddingAccounts()(*bool) + GetWorkProfileBlockCamera()(*bool) + GetWorkProfileBlockCrossProfileCallerId()(*bool) + GetWorkProfileBlockCrossProfileContactsSearch()(*bool) + GetWorkProfileBlockCrossProfileCopyPaste()(*bool) + GetWorkProfileBlockNotificationsWhileDeviceLocked()(*bool) + GetWorkProfileBlockPersonalAppInstallsFromUnknownSources()(*bool) + GetWorkProfileBlockScreenCapture()(*bool) + GetWorkProfileBluetoothEnableContactSharing()(*bool) + GetWorkProfileDataSharingType()(*AndroidWorkProfileCrossProfileDataSharingType) + GetWorkProfileDefaultAppPermissionPolicy()(*AndroidWorkProfileDefaultAppPermissionPolicyType) + GetWorkProfilePasswordBlockFaceUnlock()(*bool) + GetWorkProfilePasswordBlockFingerprintUnlock()(*bool) + GetWorkProfilePasswordBlockIrisUnlock()(*bool) + GetWorkProfilePasswordBlockTrustAgents()(*bool) + GetWorkProfilePasswordExpirationDays()(*int32) + GetWorkProfilePasswordMinimumLength()(*int32) + GetWorkProfilePasswordMinLetterCharacters()(*int32) + GetWorkProfilePasswordMinLowerCaseCharacters()(*int32) + GetWorkProfilePasswordMinNonLetterCharacters()(*int32) + GetWorkProfilePasswordMinNumericCharacters()(*int32) + GetWorkProfilePasswordMinSymbolCharacters()(*int32) + GetWorkProfilePasswordMinUpperCaseCharacters()(*int32) + GetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetWorkProfilePasswordPreviousPasswordBlockCount()(*int32) + GetWorkProfilePasswordRequiredType()(*AndroidWorkProfileRequiredPasswordType) + GetWorkProfilePasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetWorkProfileRequiredPasswordComplexity()(*AndroidRequiredPasswordComplexity) + GetWorkProfileRequirePassword()(*bool) + SetPasswordBlockFaceUnlock(value *bool)() + SetPasswordBlockFingerprintUnlock(value *bool)() + SetPasswordBlockIrisUnlock(value *bool)() + SetPasswordBlockTrustAgents(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequiredType(value *AndroidWorkProfileRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetSecurityRequireVerifyApps(value *bool)() + SetVpnAlwaysOnPackageIdentifier(value *string)() + SetVpnEnableAlwaysOnLockdownMode(value *bool)() + SetWorkProfileAllowAppInstallsFromUnknownSources(value *bool)() + SetWorkProfileAllowWidgets(value *bool)() + SetWorkProfileBlockAddingAccounts(value *bool)() + SetWorkProfileBlockCamera(value *bool)() + SetWorkProfileBlockCrossProfileCallerId(value *bool)() + SetWorkProfileBlockCrossProfileContactsSearch(value *bool)() + SetWorkProfileBlockCrossProfileCopyPaste(value *bool)() + SetWorkProfileBlockNotificationsWhileDeviceLocked(value *bool)() + SetWorkProfileBlockPersonalAppInstallsFromUnknownSources(value *bool)() + SetWorkProfileBlockScreenCapture(value *bool)() + SetWorkProfileBluetoothEnableContactSharing(value *bool)() + SetWorkProfileDataSharingType(value *AndroidWorkProfileCrossProfileDataSharingType)() + SetWorkProfileDefaultAppPermissionPolicy(value *AndroidWorkProfileDefaultAppPermissionPolicyType)() + SetWorkProfilePasswordBlockFaceUnlock(value *bool)() + SetWorkProfilePasswordBlockFingerprintUnlock(value *bool)() + SetWorkProfilePasswordBlockIrisUnlock(value *bool)() + SetWorkProfilePasswordBlockTrustAgents(value *bool)() + SetWorkProfilePasswordExpirationDays(value *int32)() + SetWorkProfilePasswordMinimumLength(value *int32)() + SetWorkProfilePasswordMinLetterCharacters(value *int32)() + SetWorkProfilePasswordMinLowerCaseCharacters(value *int32)() + SetWorkProfilePasswordMinNonLetterCharacters(value *int32)() + SetWorkProfilePasswordMinNumericCharacters(value *int32)() + SetWorkProfilePasswordMinSymbolCharacters(value *int32)() + SetWorkProfilePasswordMinUpperCaseCharacters(value *int32)() + SetWorkProfilePasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetWorkProfilePasswordPreviousPasswordBlockCount(value *int32)() + SetWorkProfilePasswordRequiredType(value *AndroidWorkProfileRequiredPasswordType)() + SetWorkProfilePasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetWorkProfileRequiredPasswordComplexity(value *AndroidRequiredPasswordComplexity)() + SetWorkProfileRequirePassword(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration.go new file mode 100644 index 000000000..8cb601a9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGmailEasConfiguration +type AndroidWorkProfileGmailEasConfiguration struct { + AndroidWorkProfileEasEmailProfileBase +} +// NewAndroidWorkProfileGmailEasConfiguration instantiates a new AndroidWorkProfileGmailEasConfiguration and sets the default values. +func NewAndroidWorkProfileGmailEasConfiguration()(*AndroidWorkProfileGmailEasConfiguration) { + m := &AndroidWorkProfileGmailEasConfiguration{ + AndroidWorkProfileEasEmailProfileBase: *NewAndroidWorkProfileEasEmailProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileGmailEasConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileGmailEasConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileGmailEasConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileGmailEasConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileGmailEasConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWorkProfileEasEmailProfileBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileGmailEasConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWorkProfileEasEmailProfileBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_response.go new file mode 100644 index 000000000..d9b1f7982 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGmailEasConfigurationCollectionResponse +type AndroidWorkProfileGmailEasConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileGmailEasConfigurationable +} +// NewAndroidWorkProfileGmailEasConfigurationCollectionResponse instantiates a new AndroidWorkProfileGmailEasConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileGmailEasConfigurationCollectionResponse()(*AndroidWorkProfileGmailEasConfigurationCollectionResponse) { + m := &AndroidWorkProfileGmailEasConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileGmailEasConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileGmailEasConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileGmailEasConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileGmailEasConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileGmailEasConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileGmailEasConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileGmailEasConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileGmailEasConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileGmailEasConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileGmailEasConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileGmailEasConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileGmailEasConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_responseable.go new file mode 100644 index 000000000..f80b9881e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGmailEasConfigurationCollectionResponseable +type AndroidWorkProfileGmailEasConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileGmailEasConfigurationable) + SetValue(value []AndroidWorkProfileGmailEasConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configurationable.go new file mode 100644 index 000000000..d1aa20301 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_gmail_eas_configurationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileGmailEasConfigurationable +type AndroidWorkProfileGmailEasConfigurationable interface { + AndroidWorkProfileEasEmailProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration.go new file mode 100644 index 000000000..c53671e00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileNineWorkEasConfiguration +type AndroidWorkProfileNineWorkEasConfiguration struct { + AndroidWorkProfileEasEmailProfileBase + // Toggles syncing the calendar. If set to false the calendar is turned off on the device. + syncCalendar *bool + // Toggles syncing contacts. If set to false contacts are turned off on the device. + syncContacts *bool + // Toggles syncing tasks. If set to false tasks are turned off on the device. + syncTasks *bool +} +// NewAndroidWorkProfileNineWorkEasConfiguration instantiates a new AndroidWorkProfileNineWorkEasConfiguration and sets the default values. +func NewAndroidWorkProfileNineWorkEasConfiguration()(*AndroidWorkProfileNineWorkEasConfiguration) { + m := &AndroidWorkProfileNineWorkEasConfiguration{ + AndroidWorkProfileEasEmailProfileBase: *NewAndroidWorkProfileEasEmailProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileNineWorkEasConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileNineWorkEasConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileNineWorkEasConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileNineWorkEasConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileNineWorkEasConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWorkProfileEasEmailProfileBase.GetFieldDeserializers() + res["syncCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncCalendar(val) + } + return nil + } + res["syncContacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncContacts(val) + } + return nil + } + res["syncTasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSyncTasks(val) + } + return nil + } + return res +} +// GetSyncCalendar gets the syncCalendar property value. Toggles syncing the calendar. If set to false the calendar is turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) GetSyncCalendar()(*bool) { + return m.syncCalendar +} +// GetSyncContacts gets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) GetSyncContacts()(*bool) { + return m.syncContacts +} +// GetSyncTasks gets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) GetSyncTasks()(*bool) { + return m.syncTasks +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileNineWorkEasConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWorkProfileEasEmailProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("syncCalendar", m.GetSyncCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncContacts", m.GetSyncContacts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("syncTasks", m.GetSyncTasks()) + if err != nil { + return err + } + } + return nil +} +// SetSyncCalendar sets the syncCalendar property value. Toggles syncing the calendar. If set to false the calendar is turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) SetSyncCalendar(value *bool)() { + m.syncCalendar = value +} +// SetSyncContacts sets the syncContacts property value. Toggles syncing contacts. If set to false contacts are turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) SetSyncContacts(value *bool)() { + m.syncContacts = value +} +// SetSyncTasks sets the syncTasks property value. Toggles syncing tasks. If set to false tasks are turned off on the device. +func (m *AndroidWorkProfileNineWorkEasConfiguration) SetSyncTasks(value *bool)() { + m.syncTasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_response.go new file mode 100644 index 000000000..37f97a86d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileNineWorkEasConfigurationCollectionResponse +type AndroidWorkProfileNineWorkEasConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileNineWorkEasConfigurationable +} +// NewAndroidWorkProfileNineWorkEasConfigurationCollectionResponse instantiates a new AndroidWorkProfileNineWorkEasConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileNineWorkEasConfigurationCollectionResponse()(*AndroidWorkProfileNineWorkEasConfigurationCollectionResponse) { + m := &AndroidWorkProfileNineWorkEasConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileNineWorkEasConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileNineWorkEasConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileNineWorkEasConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileNineWorkEasConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileNineWorkEasConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileNineWorkEasConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileNineWorkEasConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileNineWorkEasConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileNineWorkEasConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileNineWorkEasConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileNineWorkEasConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileNineWorkEasConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_responseable.go new file mode 100644 index 000000000..1a9e8a810 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileNineWorkEasConfigurationCollectionResponseable +type AndroidWorkProfileNineWorkEasConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileNineWorkEasConfigurationable) + SetValue(value []AndroidWorkProfileNineWorkEasConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configurationable.go new file mode 100644 index 000000000..7722dd260 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_nine_work_eas_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileNineWorkEasConfigurationable +type AndroidWorkProfileNineWorkEasConfigurationable interface { + AndroidWorkProfileEasEmailProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSyncCalendar()(*bool) + GetSyncContacts()(*bool) + GetSyncTasks()(*bool) + SetSyncCalendar(value *bool)() + SetSyncContacts(value *bool)() + SetSyncTasks(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile.go new file mode 100644 index 000000000..e308f837b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfilePkcsCertificateProfile +type AndroidWorkProfilePkcsCertificateProfile struct { + AndroidWorkProfileCertificateProfileBase + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // PKCS Certificate Template Name + certificateTemplateName *string + // PKCS Certification Authority + certificationAuthority *string + // PKCS Certification Authority Name + certificationAuthorityName *string + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidWorkProfilePkcsCertificateProfile instantiates a new AndroidWorkProfilePkcsCertificateProfile and sets the default values. +func NewAndroidWorkProfilePkcsCertificateProfile()(*AndroidWorkProfilePkcsCertificateProfile) { + m := &AndroidWorkProfilePkcsCertificateProfile{ + AndroidWorkProfileCertificateProfileBase: *NewAndroidWorkProfileCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfilePkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfilePkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfilePkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfilePkcsCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidWorkProfilePkcsCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidWorkProfilePkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidWorkProfilePkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidWorkProfilePkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfilePkcsCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfilePkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWorkProfileCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidWorkProfilePkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidWorkProfilePkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidWorkProfilePkcsCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidWorkProfilePkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWorkProfileCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidWorkProfilePkcsCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AndroidWorkProfilePkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority +func (m *AndroidWorkProfilePkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AndroidWorkProfilePkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfilePkcsCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidWorkProfilePkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidWorkProfilePkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidWorkProfilePkcsCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..f6a2f22de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfilePkcsCertificateProfileCollectionResponse +type AndroidWorkProfilePkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfilePkcsCertificateProfileable +} +// NewAndroidWorkProfilePkcsCertificateProfileCollectionResponse instantiates a new AndroidWorkProfilePkcsCertificateProfileCollectionResponse and sets the default values. +func NewAndroidWorkProfilePkcsCertificateProfileCollectionResponse()(*AndroidWorkProfilePkcsCertificateProfileCollectionResponse) { + m := &AndroidWorkProfilePkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfilePkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfilePkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfilePkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfilePkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfilePkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfilePkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfilePkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfilePkcsCertificateProfileCollectionResponse) GetValue()([]AndroidWorkProfilePkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfilePkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfilePkcsCertificateProfileCollectionResponse) SetValue(value []AndroidWorkProfilePkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..8dc2edc02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfilePkcsCertificateProfileCollectionResponseable +type AndroidWorkProfilePkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfilePkcsCertificateProfileable) + SetValue(value []AndroidWorkProfilePkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profileable.go new file mode 100644 index 000000000..842ba1d0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_pkcs_certificate_profileable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfilePkcsCertificateProfileable +type AndroidWorkProfilePkcsCertificateProfileable interface { + AndroidWorkProfileCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_required_password_type.go b/src/internal/connector/graph/betasdk/models/android_work_profile_required_password_type.go new file mode 100644 index 000000000..899823898 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_required_password_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidWorkProfileRequiredPasswordType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE AndroidWorkProfileRequiredPasswordType = iota + // Low security biometrics based password required. + LOWSECURITYBIOMETRIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // Required. + REQUIRED_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // At least numeric password required. + ATLEASTNUMERIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // Numeric complex password required. + NUMERICCOMPLEX_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // At least alphabetic password required. + ATLEASTALPHABETIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // At least alphanumeric password required. + ATLEASTALPHANUMERIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + // At least alphanumeric with symbols password required. + ALPHANUMERICWITHSYMBOLS_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE +) + +func (i AndroidWorkProfileRequiredPasswordType) String() string { + return []string{"deviceDefault", "lowSecurityBiometric", "required", "atLeastNumeric", "numericComplex", "atLeastAlphabetic", "atLeastAlphanumeric", "alphanumericWithSymbols"}[i] +} +func ParseAndroidWorkProfileRequiredPasswordType(v string) (interface{}, error) { + result := DEVICEDEFAULT_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "lowSecurityBiometric": + result = LOWSECURITYBIOMETRIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "required": + result = REQUIRED_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "atLeastNumeric": + result = ATLEASTNUMERIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "numericComplex": + result = NUMERICCOMPLEX_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "atLeastAlphabetic": + result = ATLEASTALPHABETIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "atLeastAlphanumeric": + result = ATLEASTALPHANUMERIC_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + case "alphanumericWithSymbols": + result = ALPHANUMERICWITHSYMBOLS_ANDROIDWORKPROFILEREQUIREDPASSWORDTYPE + default: + return 0, errors.New("Unknown AndroidWorkProfileRequiredPasswordType value: " + v) + } + return &result, nil +} +func SerializeAndroidWorkProfileRequiredPasswordType(values []AndroidWorkProfileRequiredPasswordType) []string { + 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/android_work_profile_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile.go new file mode 100644 index 000000000..ad46a89a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileScepCertificateProfile +type AndroidWorkProfileScepCertificateProfile struct { + AndroidWorkProfileCertificateProfileBase + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Hash Algorithm Options. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // SCEP Server Url(s) + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAndroidWorkProfileScepCertificateProfile instantiates a new AndroidWorkProfileScepCertificateProfile and sets the default values. +func NewAndroidWorkProfileScepCertificateProfile()(*AndroidWorkProfileScepCertificateProfile) { + m := &AndroidWorkProfileScepCertificateProfile{ + AndroidWorkProfileCertificateProfileBase: *NewAndroidWorkProfileCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileScepCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidWorkProfileScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AndroidWorkProfileCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidWorkProfileScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *AndroidWorkProfileScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *AndroidWorkProfileScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidWorkProfileScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidWorkProfileScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidWorkProfileScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidWorkProfileScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AndroidWorkProfileCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *AndroidWorkProfileScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetHashAlgorithm sets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AndroidWorkProfileScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *AndroidWorkProfileScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *AndroidWorkProfileScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AndroidWorkProfileScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s) +func (m *AndroidWorkProfileScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AndroidWorkProfileScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AndroidWorkProfileScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..6f660c98d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileScepCertificateProfileCollectionResponse +type AndroidWorkProfileScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileScepCertificateProfileable +} +// NewAndroidWorkProfileScepCertificateProfileCollectionResponse instantiates a new AndroidWorkProfileScepCertificateProfileCollectionResponse and sets the default values. +func NewAndroidWorkProfileScepCertificateProfileCollectionResponse()(*AndroidWorkProfileScepCertificateProfileCollectionResponse) { + m := &AndroidWorkProfileScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileScepCertificateProfileCollectionResponse) GetValue()([]AndroidWorkProfileScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileScepCertificateProfileCollectionResponse) SetValue(value []AndroidWorkProfileScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..7725f12f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileScepCertificateProfileCollectionResponseable +type AndroidWorkProfileScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileScepCertificateProfileable) + SetValue(value []AndroidWorkProfileScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profileable.go new file mode 100644 index 000000000..04a0ec5a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_scep_certificate_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileScepCertificateProfileable +type AndroidWorkProfileScepCertificateProfileable interface { + AndroidWorkProfileCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate.go new file mode 100644 index 000000000..8359c55e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileTrustedRootCertificate +type AndroidWorkProfileTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate + trustedRootCertificate []byte +} +// NewAndroidWorkProfileTrustedRootCertificate instantiates a new androidWorkProfileTrustedRootCertificate and sets the default values. +func NewAndroidWorkProfileTrustedRootCertificate()(*AndroidWorkProfileTrustedRootCertificate) { + m := &AndroidWorkProfileTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *AndroidWorkProfileTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidWorkProfileTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *AndroidWorkProfileTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AndroidWorkProfileTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..635ebaad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileTrustedRootCertificateCollectionResponse +type AndroidWorkProfileTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileTrustedRootCertificateable +} +// NewAndroidWorkProfileTrustedRootCertificateCollectionResponse instantiates a new AndroidWorkProfileTrustedRootCertificateCollectionResponse and sets the default values. +func NewAndroidWorkProfileTrustedRootCertificateCollectionResponse()(*AndroidWorkProfileTrustedRootCertificateCollectionResponse) { + m := &AndroidWorkProfileTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileTrustedRootCertificateCollectionResponse) GetValue()([]AndroidWorkProfileTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileTrustedRootCertificateCollectionResponse) SetValue(value []AndroidWorkProfileTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..22ff26fdd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileTrustedRootCertificateCollectionResponseable +type AndroidWorkProfileTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileTrustedRootCertificateable) + SetValue(value []AndroidWorkProfileTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificateable.go new file mode 100644 index 000000000..b35ea8f54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileTrustedRootCertificateable +type AndroidWorkProfileTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration.go new file mode 100644 index 000000000..0a4651fc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration.go @@ -0,0 +1,490 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileVpnConfiguration +type AndroidWorkProfileVpnConfiguration struct { + DeviceConfiguration + // Whether or not to enable always-on VPN connection. + alwaysOn *bool + // If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. + alwaysOnLockdown *bool + // VPN Authentication Method. + authenticationMethod *VpnAuthenticationMethod + // Connection name displayed to the user. + connectionName *string + // Android Work Profile VPN connection type. + connectionType *AndroidWorkProfileVpnConnectionType + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customData []KeyValueable + // Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. + customKeyValueData []KeyValuePairable + // Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. + fingerprint *string + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate AndroidWorkProfileCertificateProfileBaseable + // Microsoft Tunnel site ID. + microsoftTunnelSiteId *string + // Proxy server. + proxyServer VpnProxyServerable + // Realm when connection type is set to Pulse Secure. + realm *string + // Role when connection type is set to Pulse Secure. + role *string + // List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. + servers []VpnServerable + // Targeted mobile apps. This collection can contain a maximum of 500 elements. + targetedMobileApps []AppListItemable + // Targeted App package IDs. + targetedPackageIds []string +} +// NewAndroidWorkProfileVpnConfiguration instantiates a new AndroidWorkProfileVpnConfiguration and sets the default values. +func NewAndroidWorkProfileVpnConfiguration()(*AndroidWorkProfileVpnConfiguration) { + m := &AndroidWorkProfileVpnConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileVpnConfiguration(), nil +} +// GetAlwaysOn gets the alwaysOn property value. Whether or not to enable always-on VPN connection. +func (m *AndroidWorkProfileVpnConfiguration) GetAlwaysOn()(*bool) { + return m.alwaysOn +} +// GetAlwaysOnLockdown gets the alwaysOnLockdown property value. If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidWorkProfileVpnConfiguration) GetAlwaysOnLockdown()(*bool) { + return m.alwaysOnLockdown +} +// GetAuthenticationMethod gets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidWorkProfileVpnConfiguration) GetAuthenticationMethod()(*VpnAuthenticationMethod) { + return m.authenticationMethod +} +// GetConnectionName gets the connectionName property value. Connection name displayed to the user. +func (m *AndroidWorkProfileVpnConfiguration) GetConnectionName()(*string) { + return m.connectionName +} +// GetConnectionType gets the connectionType property value. Android Work Profile VPN connection type. +func (m *AndroidWorkProfileVpnConfiguration) GetConnectionType()(*AndroidWorkProfileVpnConnectionType) { + return m.connectionType +} +// GetCustomData gets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidWorkProfileVpnConfiguration) GetCustomData()([]KeyValueable) { + return m.customData +} +// GetCustomKeyValueData gets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidWorkProfileVpnConfiguration) GetCustomKeyValueData()([]KeyValuePairable) { + return m.customKeyValueData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["alwaysOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAlwaysOn(val) + } + return nil + } + res["alwaysOnLockdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAlwaysOnLockdown(val) + } + return nil + } + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*VpnAuthenticationMethod)) + } + return nil + } + res["connectionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionName(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWorkProfileVpnConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*AndroidWorkProfileVpnConnectionType)) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetCustomData(res) + } + return nil + } + res["customKeyValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomKeyValueData(res) + } + return nil + } + res["fingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprint(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidWorkProfileCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(AndroidWorkProfileCertificateProfileBaseable)) + } + return nil + } + res["microsoftTunnelSiteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftTunnelSiteId(val) + } + return nil + } + res["proxyServer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVpnProxyServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProxyServer(val.(VpnProxyServerable)) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["servers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVpnServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VpnServerable, len(val)) + for i, v := range val { + res[i] = v.(VpnServerable) + } + m.SetServers(res) + } + return nil + } + res["targetedMobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetTargetedMobileApps(res) + } + return nil + } + res["targetedPackageIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetedPackageIds(res) + } + return nil + } + return res +} +// GetFingerprint gets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidWorkProfileVpnConfiguration) GetFingerprint()(*string) { + return m.fingerprint +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidWorkProfileVpnConfiguration) GetIdentityCertificate()(AndroidWorkProfileCertificateProfileBaseable) { + return m.identityCertificate +} +// GetMicrosoftTunnelSiteId gets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *AndroidWorkProfileVpnConfiguration) GetMicrosoftTunnelSiteId()(*string) { + return m.microsoftTunnelSiteId +} +// GetProxyServer gets the proxyServer property value. Proxy server. +func (m *AndroidWorkProfileVpnConfiguration) GetProxyServer()(VpnProxyServerable) { + return m.proxyServer +} +// GetRealm gets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidWorkProfileVpnConfiguration) GetRealm()(*string) { + return m.realm +} +// GetRole gets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidWorkProfileVpnConfiguration) GetRole()(*string) { + return m.role +} +// GetServers gets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileVpnConfiguration) GetServers()([]VpnServerable) { + return m.servers +} +// GetTargetedMobileApps gets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileVpnConfiguration) GetTargetedMobileApps()([]AppListItemable) { + return m.targetedMobileApps +} +// GetTargetedPackageIds gets the targetedPackageIds property value. Targeted App package IDs. +func (m *AndroidWorkProfileVpnConfiguration) GetTargetedPackageIds()([]string) { + return m.targetedPackageIds +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("alwaysOn", m.GetAlwaysOn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("alwaysOnLockdown", m.GetAlwaysOnLockdown()) + if err != nil { + return err + } + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionName", m.GetConnectionName()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + if m.GetCustomData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomData())) + for i, v := range m.GetCustomData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customData", cast) + if err != nil { + return err + } + } + if m.GetCustomKeyValueData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomKeyValueData())) + for i, v := range m.GetCustomKeyValueData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customKeyValueData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fingerprint", m.GetFingerprint()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("microsoftTunnelSiteId", m.GetMicrosoftTunnelSiteId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("proxyServer", m.GetProxyServer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + if m.GetServers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServers())) + for i, v := range m.GetServers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("servers", cast) + if err != nil { + return err + } + } + if m.GetTargetedMobileApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedMobileApps())) + for i, v := range m.GetTargetedMobileApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedMobileApps", cast) + if err != nil { + return err + } + } + if m.GetTargetedPackageIds() != nil { + err = writer.WriteCollectionOfStringValues("targetedPackageIds", m.GetTargetedPackageIds()) + if err != nil { + return err + } + } + return nil +} +// SetAlwaysOn sets the alwaysOn property value. Whether or not to enable always-on VPN connection. +func (m *AndroidWorkProfileVpnConfiguration) SetAlwaysOn(value *bool)() { + m.alwaysOn = value +} +// SetAlwaysOnLockdown sets the alwaysOnLockdown property value. If always-on VPN connection is enabled, whether or not to lock network traffic when that VPN is disconnected. +func (m *AndroidWorkProfileVpnConfiguration) SetAlwaysOnLockdown(value *bool)() { + m.alwaysOnLockdown = value +} +// SetAuthenticationMethod sets the authenticationMethod property value. VPN Authentication Method. +func (m *AndroidWorkProfileVpnConfiguration) SetAuthenticationMethod(value *VpnAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetConnectionName sets the connectionName property value. Connection name displayed to the user. +func (m *AndroidWorkProfileVpnConfiguration) SetConnectionName(value *string)() { + m.connectionName = value +} +// SetConnectionType sets the connectionType property value. Android Work Profile VPN connection type. +func (m *AndroidWorkProfileVpnConfiguration) SetConnectionType(value *AndroidWorkProfileVpnConnectionType)() { + m.connectionType = value +} +// SetCustomData sets the customData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidWorkProfileVpnConfiguration) SetCustomData(value []KeyValueable)() { + m.customData = value +} +// SetCustomKeyValueData sets the customKeyValueData property value. Custom data when connection type is set to Citrix. This collection can contain a maximum of 25 elements. +func (m *AndroidWorkProfileVpnConfiguration) SetCustomKeyValueData(value []KeyValuePairable)() { + m.customKeyValueData = value +} +// SetFingerprint sets the fingerprint property value. Fingerprint is a string that will be used to verify the VPN server can be trusted, which is only applicable when connection type is Check Point Capsule VPN. +func (m *AndroidWorkProfileVpnConfiguration) SetFingerprint(value *string)() { + m.fingerprint = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *AndroidWorkProfileVpnConfiguration) SetIdentityCertificate(value AndroidWorkProfileCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetMicrosoftTunnelSiteId sets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *AndroidWorkProfileVpnConfiguration) SetMicrosoftTunnelSiteId(value *string)() { + m.microsoftTunnelSiteId = value +} +// SetProxyServer sets the proxyServer property value. Proxy server. +func (m *AndroidWorkProfileVpnConfiguration) SetProxyServer(value VpnProxyServerable)() { + m.proxyServer = value +} +// SetRealm sets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AndroidWorkProfileVpnConfiguration) SetRealm(value *string)() { + m.realm = value +} +// SetRole sets the role property value. Role when connection type is set to Pulse Secure. +func (m *AndroidWorkProfileVpnConfiguration) SetRole(value *string)() { + m.role = value +} +// SetServers sets the servers property value. List of VPN Servers on the network. Make sure end users can access these network locations. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileVpnConfiguration) SetServers(value []VpnServerable)() { + m.servers = value +} +// SetTargetedMobileApps sets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *AndroidWorkProfileVpnConfiguration) SetTargetedMobileApps(value []AppListItemable)() { + m.targetedMobileApps = value +} +// SetTargetedPackageIds sets the targetedPackageIds property value. Targeted App package IDs. +func (m *AndroidWorkProfileVpnConfiguration) SetTargetedPackageIds(value []string)() { + m.targetedPackageIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_response.go new file mode 100644 index 000000000..4d29b4ac4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileVpnConfigurationCollectionResponse +type AndroidWorkProfileVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileVpnConfigurationable +} +// NewAndroidWorkProfileVpnConfigurationCollectionResponse instantiates a new AndroidWorkProfileVpnConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileVpnConfigurationCollectionResponse()(*AndroidWorkProfileVpnConfigurationCollectionResponse) { + m := &AndroidWorkProfileVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileVpnConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileVpnConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..4bf5eb7ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileVpnConfigurationCollectionResponseable +type AndroidWorkProfileVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileVpnConfigurationable) + SetValue(value []AndroidWorkProfileVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configurationable.go new file mode 100644 index 000000000..af410d248 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_configurationable.go @@ -0,0 +1,43 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileVpnConfigurationable +type AndroidWorkProfileVpnConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlwaysOn()(*bool) + GetAlwaysOnLockdown()(*bool) + GetAuthenticationMethod()(*VpnAuthenticationMethod) + GetConnectionName()(*string) + GetConnectionType()(*AndroidWorkProfileVpnConnectionType) + GetCustomData()([]KeyValueable) + GetCustomKeyValueData()([]KeyValuePairable) + GetFingerprint()(*string) + GetIdentityCertificate()(AndroidWorkProfileCertificateProfileBaseable) + GetMicrosoftTunnelSiteId()(*string) + GetProxyServer()(VpnProxyServerable) + GetRealm()(*string) + GetRole()(*string) + GetServers()([]VpnServerable) + GetTargetedMobileApps()([]AppListItemable) + GetTargetedPackageIds()([]string) + SetAlwaysOn(value *bool)() + SetAlwaysOnLockdown(value *bool)() + SetAuthenticationMethod(value *VpnAuthenticationMethod)() + SetConnectionName(value *string)() + SetConnectionType(value *AndroidWorkProfileVpnConnectionType)() + SetCustomData(value []KeyValueable)() + SetCustomKeyValueData(value []KeyValuePairable)() + SetFingerprint(value *string)() + SetIdentityCertificate(value AndroidWorkProfileCertificateProfileBaseable)() + SetMicrosoftTunnelSiteId(value *string)() + SetProxyServer(value VpnProxyServerable)() + SetRealm(value *string)() + SetRole(value *string)() + SetServers(value []VpnServerable)() + SetTargetedMobileApps(value []AppListItemable)() + SetTargetedPackageIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_connection_type.go b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_connection_type.go new file mode 100644 index 000000000..0fac47e65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_vpn_connection_type.go @@ -0,0 +1,68 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AndroidWorkProfileVpnConnectionType int + +const ( + // Cisco AnyConnect. + CISCOANYCONNECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE AndroidWorkProfileVpnConnectionType = iota + // Pulse Secure. + PULSESECURE_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // F5 Edge Client. + F5EDGECLIENT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Dell SonicWALL Mobile Connection. + DELLSONICWALLMOBILECONNECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Check Point Capsule VPN. + CHECKPOINTCAPSULEVPN_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Citrix + CITRIX_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Palo Alto Networks GlobalProtect. + PALOALTOGLOBALPROTECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Microsoft Tunnel. + MICROSOFTTUNNEL_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // NetMotion Mobility. + NETMOTIONMOBILITY_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + // Microsoft Protect. + MICROSOFTPROTECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE +) + +func (i AndroidWorkProfileVpnConnectionType) String() string { + return []string{"ciscoAnyConnect", "pulseSecure", "f5EdgeClient", "dellSonicWallMobileConnect", "checkPointCapsuleVpn", "citrix", "paloAltoGlobalProtect", "microsoftTunnel", "netMotionMobility", "microsoftProtect"}[i] +} +func ParseAndroidWorkProfileVpnConnectionType(v string) (interface{}, error) { + result := CISCOANYCONNECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + switch v { + case "ciscoAnyConnect": + result = CISCOANYCONNECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "pulseSecure": + result = PULSESECURE_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "f5EdgeClient": + result = F5EDGECLIENT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "dellSonicWallMobileConnect": + result = DELLSONICWALLMOBILECONNECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "checkPointCapsuleVpn": + result = CHECKPOINTCAPSULEVPN_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "citrix": + result = CITRIX_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "paloAltoGlobalProtect": + result = PALOALTOGLOBALPROTECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "microsoftTunnel": + result = MICROSOFTTUNNEL_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "netMotionMobility": + result = NETMOTIONMOBILITY_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + case "microsoftProtect": + result = MICROSOFTPROTECT_ANDROIDWORKPROFILEVPNCONNECTIONTYPE + default: + return 0, errors.New("Unknown AndroidWorkProfileVpnConnectionType value: " + v) + } + return &result, nil +} +func SerializeAndroidWorkProfileVpnConnectionType(values []AndroidWorkProfileVpnConnectionType) []string { + 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/android_work_profile_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration.go new file mode 100644 index 000000000..3e66cfbc5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileWiFiConfiguration +type AndroidWorkProfileWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types for Android. + wiFiSecurityType *AndroidWiFiSecurityType +} +// NewAndroidWorkProfileWiFiConfiguration instantiates a new AndroidWorkProfileWiFiConfiguration and sets the default values. +func NewAndroidWorkProfileWiFiConfiguration()(*AndroidWorkProfileWiFiConfiguration) { + m := &AndroidWorkProfileWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.androidWorkProfileWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAndroidWorkProfileWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration": + return NewAndroidWorkProfileEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewAndroidWorkProfileWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidWorkProfileWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidWorkProfileWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*AndroidWiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *AndroidWorkProfileWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidWorkProfileWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidWorkProfileWiFiConfiguration) GetWiFiSecurityType()(*AndroidWiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AndroidWorkProfileWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AndroidWorkProfileWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *AndroidWorkProfileWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AndroidWorkProfileWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types for Android. +func (m *AndroidWorkProfileWiFiConfiguration) SetWiFiSecurityType(value *AndroidWiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..96627aab2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileWiFiConfigurationCollectionResponse +type AndroidWorkProfileWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AndroidWorkProfileWiFiConfigurationable +} +// NewAndroidWorkProfileWiFiConfigurationCollectionResponse instantiates a new AndroidWorkProfileWiFiConfigurationCollectionResponse and sets the default values. +func NewAndroidWorkProfileWiFiConfigurationCollectionResponse()(*AndroidWorkProfileWiFiConfigurationCollectionResponse) { + m := &AndroidWorkProfileWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAndroidWorkProfileWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAndroidWorkProfileWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAndroidWorkProfileWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AndroidWorkProfileWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidWorkProfileWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidWorkProfileWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AndroidWorkProfileWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AndroidWorkProfileWiFiConfigurationCollectionResponse) GetValue()([]AndroidWorkProfileWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AndroidWorkProfileWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AndroidWorkProfileWiFiConfigurationCollectionResponse) SetValue(value []AndroidWorkProfileWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..ab1c8c4dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileWiFiConfigurationCollectionResponseable +type AndroidWorkProfileWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AndroidWorkProfileWiFiConfigurationable) + SetValue(value []AndroidWorkProfileWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configurationable.go new file mode 100644 index 000000000..b73693654 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/android_work_profile_wi_fi_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AndroidWorkProfileWiFiConfigurationable +type AndroidWorkProfileWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetSsid()(*string) + GetWiFiSecurityType()(*AndroidWiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetSsid(value *string)() + SetWiFiSecurityType(value *AndroidWiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member.go b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member.go new file mode 100644 index 000000000..35556111c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnonymousGuestConversationMember +type AnonymousGuestConversationMember struct { + ConversationMember + // Unique ID that represents the user. Note: This ID can change if the user leaves and rejoins the meeting, or joins from a different device. + anonymousGuestId *string +} +// NewAnonymousGuestConversationMember instantiates a new AnonymousGuestConversationMember and sets the default values. +func NewAnonymousGuestConversationMember()(*AnonymousGuestConversationMember) { + m := &AnonymousGuestConversationMember{ + ConversationMember: *NewConversationMember(), + } + odataTypeValue := "#microsoft.graph.anonymousGuestConversationMember"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAnonymousGuestConversationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnonymousGuestConversationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnonymousGuestConversationMember(), nil +} +// GetAnonymousGuestId gets the anonymousGuestId property value. Unique ID that represents the user. Note: This ID can change if the user leaves and rejoins the meeting, or joins from a different device. +func (m *AnonymousGuestConversationMember) GetAnonymousGuestId()(*string) { + return m.anonymousGuestId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnonymousGuestConversationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConversationMember.GetFieldDeserializers() + res["anonymousGuestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnonymousGuestId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AnonymousGuestConversationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConversationMember.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("anonymousGuestId", m.GetAnonymousGuestId()) + if err != nil { + return err + } + } + return nil +} +// SetAnonymousGuestId sets the anonymousGuestId property value. Unique ID that represents the user. Note: This ID can change if the user leaves and rejoins the meeting, or joins from a different device. +func (m *AnonymousGuestConversationMember) SetAnonymousGuestId(value *string)() { + m.anonymousGuestId = value +} diff --git a/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_response.go b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_response.go new file mode 100644 index 000000000..866c09302 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnonymousGuestConversationMemberCollectionResponse +type AnonymousGuestConversationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AnonymousGuestConversationMemberable +} +// NewAnonymousGuestConversationMemberCollectionResponse instantiates a new AnonymousGuestConversationMemberCollectionResponse and sets the default values. +func NewAnonymousGuestConversationMemberCollectionResponse()(*AnonymousGuestConversationMemberCollectionResponse) { + m := &AnonymousGuestConversationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAnonymousGuestConversationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnonymousGuestConversationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnonymousGuestConversationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnonymousGuestConversationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAnonymousGuestConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AnonymousGuestConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(AnonymousGuestConversationMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AnonymousGuestConversationMemberCollectionResponse) GetValue()([]AnonymousGuestConversationMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *AnonymousGuestConversationMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AnonymousGuestConversationMemberCollectionResponse) SetValue(value []AnonymousGuestConversationMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_responseable.go new file mode 100644 index 000000000..83dae0004 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnonymousGuestConversationMemberCollectionResponseable +type AnonymousGuestConversationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AnonymousGuestConversationMemberable) + SetValue(value []AnonymousGuestConversationMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_memberable.go b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_memberable.go new file mode 100644 index 000000000..6f3065dec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/anonymous_guest_conversation_memberable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnonymousGuestConversationMemberable +type AnonymousGuestConversationMemberable interface { + ConversationMemberable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnonymousGuestId()(*string) + SetAnonymousGuestId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/answer_input_type.go b/src/internal/connector/graph/betasdk/models/answer_input_type.go new file mode 100644 index 000000000..e19b9e648 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/answer_input_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AnswerInputType int + +const ( + TEXT_ANSWERINPUTTYPE AnswerInputType = iota + RADIOBUTTON_ANSWERINPUTTYPE + UNKNOWNFUTUREVALUE_ANSWERINPUTTYPE +) + +func (i AnswerInputType) String() string { + return []string{"text", "radioButton", "unknownFutureValue"}[i] +} +func ParseAnswerInputType(v string) (interface{}, error) { + result := TEXT_ANSWERINPUTTYPE + switch v { + case "text": + result = TEXT_ANSWERINPUTTYPE + case "radioButton": + result = RADIOBUTTON_ANSWERINPUTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ANSWERINPUTTYPE + default: + return 0, errors.New("Unknown AnswerInputType value: " + v) + } + return &result, nil +} +func SerializeAnswerInputType(values []AnswerInputType) []string { + 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/aosp_device_owner_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base.go new file mode 100644 index 000000000..d4b0447ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base.go @@ -0,0 +1,249 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCertificateProfileBase +type AospDeviceOwnerCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + rootCertificate AospDeviceOwnerTrustedRootCertificateable + // Certificate Subject Alternative Name Type. This collection can contain a maximum of 500 elements. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Certificate Subject Name Format. This collection can contain a maximum of 500 elements. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. + subjectNameFormat *SubjectNameFormat +} +// NewAospDeviceOwnerCertificateProfileBase instantiates a new AospDeviceOwnerCertificateProfileBase and sets the default values. +func NewAospDeviceOwnerCertificateProfileBase()(*AospDeviceOwnerCertificateProfileBase) { + m := &AospDeviceOwnerCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.aospDeviceOwnerPkcsCertificateProfile": + return NewAospDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.aospDeviceOwnerScepCertificateProfile": + return NewAospDeviceOwnerScepCertificateProfile(), nil + } + } + } + } + return NewAospDeviceOwnerCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AospDeviceOwnerCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AospDeviceOwnerCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerCertificateProfileBase) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAospDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(AospDeviceOwnerTrustedRootCertificateable)) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AospDeviceOwnerCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *AospDeviceOwnerCertificateProfileBase) GetRootCertificate()(AospDeviceOwnerTrustedRootCertificateable) { + return m.rootCertificate +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. This collection can contain a maximum of 500 elements. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AospDeviceOwnerCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Certificate Subject Name Format. This collection can contain a maximum of 500 elements. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. +func (m *AospDeviceOwnerCertificateProfileBase) GetSubjectNameFormat()(*SubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *AospDeviceOwnerCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *AospDeviceOwnerCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerCertificateProfileBase) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *AospDeviceOwnerCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *AospDeviceOwnerCertificateProfileBase) SetRootCertificate(value AospDeviceOwnerTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. This collection can contain a maximum of 500 elements. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *AospDeviceOwnerCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Certificate Subject Name Format. This collection can contain a maximum of 500 elements. Possible values are: commonName, commonNameIncludingEmail, commonNameAsEmail, custom, commonNameAsIMEI, commonNameAsSerialNumber, commonNameAsAadDeviceId, commonNameAsIntuneDeviceId, commonNameAsDurableDeviceId. +func (m *AospDeviceOwnerCertificateProfileBase) SetSubjectNameFormat(value *SubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..afb5dc711 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCertificateProfileBaseCollectionResponse +type AospDeviceOwnerCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerCertificateProfileBaseable +} +// NewAospDeviceOwnerCertificateProfileBaseCollectionResponse instantiates a new AospDeviceOwnerCertificateProfileBaseCollectionResponse and sets the default values. +func NewAospDeviceOwnerCertificateProfileBaseCollectionResponse()(*AospDeviceOwnerCertificateProfileBaseCollectionResponse) { + m := &AospDeviceOwnerCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerCertificateProfileBaseCollectionResponse) GetValue()([]AospDeviceOwnerCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerCertificateProfileBaseCollectionResponse) SetValue(value []AospDeviceOwnerCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..5be59e7d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCertificateProfileBaseCollectionResponseable +type AospDeviceOwnerCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerCertificateProfileBaseable) + SetValue(value []AospDeviceOwnerCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_baseable.go new file mode 100644 index 000000000..0b56858da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_certificate_profile_baseable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCertificateProfileBaseable +type AospDeviceOwnerCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetRenewalThresholdPercentage()(*int32) + GetRootCertificate()(AospDeviceOwnerTrustedRootCertificateable) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*SubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetRenewalThresholdPercentage(value *int32)() + SetRootCertificate(value AospDeviceOwnerTrustedRootCertificateable)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *SubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy.go new file mode 100644 index 000000000..769817e26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy.go @@ -0,0 +1,271 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCompliancePolicy +type AospDeviceOwnerCompliancePolicy struct { + DeviceCompliancePolicy + // Minimum Android security patch level. + minAndroidSecurityPatchLevel *string + // Maximum Android version. + osMaximumVersion *string + // Minimum Android version. + osMinimumVersion *string + // Minimum password length. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before a password is required. Valid values 1 to 8640 + passwordMinutesOfInactivityBeforeLock *int32 + // Require a password to unlock device. + passwordRequired *bool + // Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. + passwordRequiredType *AndroidDeviceOwnerRequiredPasswordType + // Devices must not be jailbroken or rooted. + securityBlockJailbrokenDevices *bool + // Require encryption on Android devices. + storageRequireEncryption *bool +} +// NewAospDeviceOwnerCompliancePolicy instantiates a new AospDeviceOwnerCompliancePolicy and sets the default values. +func NewAospDeviceOwnerCompliancePolicy()(*AospDeviceOwnerCompliancePolicy) { + m := &AospDeviceOwnerCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerCompliancePolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["minAndroidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinAndroidSecurityPatchLevel(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidDeviceOwnerRequiredPasswordType)) + } + return nil + } + res["securityBlockJailbrokenDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockJailbrokenDevices(val) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + return res +} +// GetMinAndroidSecurityPatchLevel gets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AospDeviceOwnerCompliancePolicy) GetMinAndroidSecurityPatchLevel()(*string) { + return m.minAndroidSecurityPatchLevel +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum Android version. +func (m *AospDeviceOwnerCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum Android version. +func (m *AospDeviceOwnerCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AospDeviceOwnerCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. Valid values 1 to 8640 +func (m *AospDeviceOwnerCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordRequired gets the passwordRequired property value. Require a password to unlock device. +func (m *AospDeviceOwnerCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AospDeviceOwnerCompliancePolicy) GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) { + return m.passwordRequiredType +} +// GetSecurityBlockJailbrokenDevices gets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AospDeviceOwnerCompliancePolicy) GetSecurityBlockJailbrokenDevices()(*bool) { + return m.securityBlockJailbrokenDevices +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AospDeviceOwnerCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("minAndroidSecurityPatchLevel", m.GetMinAndroidSecurityPatchLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockJailbrokenDevices", m.GetSecurityBlockJailbrokenDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + return nil +} +// SetMinAndroidSecurityPatchLevel sets the minAndroidSecurityPatchLevel property value. Minimum Android security patch level. +func (m *AospDeviceOwnerCompliancePolicy) SetMinAndroidSecurityPatchLevel(value *string)() { + m.minAndroidSecurityPatchLevel = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum Android version. +func (m *AospDeviceOwnerCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum Android version. +func (m *AospDeviceOwnerCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum password length. Valid values 4 to 16 +func (m *AospDeviceOwnerCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. Valid values 1 to 8640 +func (m *AospDeviceOwnerCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordRequired sets the passwordRequired property value. Require a password to unlock device. +func (m *AospDeviceOwnerCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Type of characters in password. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AospDeviceOwnerCompliancePolicy) SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetSecurityBlockJailbrokenDevices sets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *AospDeviceOwnerCompliancePolicy) SetSecurityBlockJailbrokenDevices(value *bool)() { + m.securityBlockJailbrokenDevices = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Android devices. +func (m *AospDeviceOwnerCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_response.go new file mode 100644 index 000000000..bc00c5cfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCompliancePolicyCollectionResponse +type AospDeviceOwnerCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerCompliancePolicyable +} +// NewAospDeviceOwnerCompliancePolicyCollectionResponse instantiates a new AospDeviceOwnerCompliancePolicyCollectionResponse and sets the default values. +func NewAospDeviceOwnerCompliancePolicyCollectionResponse()(*AospDeviceOwnerCompliancePolicyCollectionResponse) { + m := &AospDeviceOwnerCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerCompliancePolicyCollectionResponse) GetValue()([]AospDeviceOwnerCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerCompliancePolicyCollectionResponse) SetValue(value []AospDeviceOwnerCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..98decf4ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCompliancePolicyCollectionResponseable +type AospDeviceOwnerCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerCompliancePolicyable) + SetValue(value []AospDeviceOwnerCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policyable.go new file mode 100644 index 000000000..195663c73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_compliance_policyable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerCompliancePolicyable +type AospDeviceOwnerCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMinAndroidSecurityPatchLevel()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) + GetSecurityBlockJailbrokenDevices()(*bool) + GetStorageRequireEncryption()(*bool) + SetMinAndroidSecurityPatchLevel(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() + SetSecurityBlockJailbrokenDevices(value *bool)() + SetStorageRequireEncryption(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration.go new file mode 100644 index 000000000..244e654c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration.go @@ -0,0 +1,401 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerDeviceConfiguration +type AospDeviceOwnerDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not the user is allowed to enable unknown sources setting. When set to true, user is not allowed to enable unknown sources settings. + appsBlockInstallFromUnknownSources *bool + // Indicates whether or not to block a user from configuring bluetooth. + bluetoothBlockConfiguration *bool + // Indicates whether or not to disable the use of bluetooth. When set to true, bluetooth cannot be enabled on the device. + bluetoothBlocked *bool + // Indicates whether or not to disable the use of the camera. + cameraBlocked *bool + // Indicates whether or not the factory reset option in settings is disabled. + factoryResetBlocked *bool + // Indicates the minimum length of the password required on the device. Valid values 4 to 16 + passwordMinimumLength *int32 + // Minutes of inactivity before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. + passwordRequiredType *AndroidDeviceOwnerRequiredPasswordType + // Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 + passwordSignInFailureCountBeforeFactoryReset *int32 + // Indicates whether or not to disable the capability to take screenshots. + screenCaptureBlocked *bool + // Indicates whether or not to block the user from enabling debugging features on the device. + securityAllowDebuggingFeatures *bool + // Indicates whether or not to block external media. + storageBlockExternalMedia *bool + // Indicates whether or not to block USB file transfer. + storageBlockUsbFileTransfer *bool + // Indicates whether or not to block the user from editing the wifi connection settings. + wifiBlockEditConfigurations *bool +} +// NewAospDeviceOwnerDeviceConfiguration instantiates a new AospDeviceOwnerDeviceConfiguration and sets the default values. +func NewAospDeviceOwnerDeviceConfiguration()(*AospDeviceOwnerDeviceConfiguration) { + m := &AospDeviceOwnerDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerDeviceConfiguration(), nil +} +// GetAppsBlockInstallFromUnknownSources gets the appsBlockInstallFromUnknownSources property value. Indicates whether or not the user is allowed to enable unknown sources setting. When set to true, user is not allowed to enable unknown sources settings. +func (m *AospDeviceOwnerDeviceConfiguration) GetAppsBlockInstallFromUnknownSources()(*bool) { + return m.appsBlockInstallFromUnknownSources +} +// GetBluetoothBlockConfiguration gets the bluetoothBlockConfiguration property value. Indicates whether or not to block a user from configuring bluetooth. +func (m *AospDeviceOwnerDeviceConfiguration) GetBluetoothBlockConfiguration()(*bool) { + return m.bluetoothBlockConfiguration +} +// GetBluetoothBlocked gets the bluetoothBlocked property value. Indicates whether or not to disable the use of bluetooth. When set to true, bluetooth cannot be enabled on the device. +func (m *AospDeviceOwnerDeviceConfiguration) GetBluetoothBlocked()(*bool) { + return m.bluetoothBlocked +} +// GetCameraBlocked gets the cameraBlocked property value. Indicates whether or not to disable the use of the camera. +func (m *AospDeviceOwnerDeviceConfiguration) GetCameraBlocked()(*bool) { + return m.cameraBlocked +} +// GetFactoryResetBlocked gets the factoryResetBlocked property value. Indicates whether or not the factory reset option in settings is disabled. +func (m *AospDeviceOwnerDeviceConfiguration) GetFactoryResetBlocked()(*bool) { + return m.factoryResetBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["appsBlockInstallFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppsBlockInstallFromUnknownSources(val) + } + return nil + } + res["bluetoothBlockConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlockConfiguration(val) + } + return nil + } + res["bluetoothBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlocked(val) + } + return nil + } + res["cameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraBlocked(val) + } + return nil + } + res["factoryResetBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFactoryResetBlocked(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidDeviceOwnerRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*AndroidDeviceOwnerRequiredPasswordType)) + } + return nil + } + res["passwordSignInFailureCountBeforeFactoryReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSignInFailureCountBeforeFactoryReset(val) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["securityAllowDebuggingFeatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityAllowDebuggingFeatures(val) + } + return nil + } + res["storageBlockExternalMedia"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockExternalMedia(val) + } + return nil + } + res["storageBlockUsbFileTransfer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageBlockUsbFileTransfer(val) + } + return nil + } + res["wifiBlockEditConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiBlockEditConfigurations(val) + } + return nil + } + return res +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Indicates the minimum length of the password required on the device. Valid values 4 to 16 +func (m *AospDeviceOwnerDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AospDeviceOwnerDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AospDeviceOwnerDeviceConfiguration) GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) { + return m.passwordRequiredType +} +// GetPasswordSignInFailureCountBeforeFactoryReset gets the passwordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 +func (m *AospDeviceOwnerDeviceConfiguration) GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) { + return m.passwordSignInFailureCountBeforeFactoryReset +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether or not to disable the capability to take screenshots. +func (m *AospDeviceOwnerDeviceConfiguration) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetSecurityAllowDebuggingFeatures gets the securityAllowDebuggingFeatures property value. Indicates whether or not to block the user from enabling debugging features on the device. +func (m *AospDeviceOwnerDeviceConfiguration) GetSecurityAllowDebuggingFeatures()(*bool) { + return m.securityAllowDebuggingFeatures +} +// GetStorageBlockExternalMedia gets the storageBlockExternalMedia property value. Indicates whether or not to block external media. +func (m *AospDeviceOwnerDeviceConfiguration) GetStorageBlockExternalMedia()(*bool) { + return m.storageBlockExternalMedia +} +// GetStorageBlockUsbFileTransfer gets the storageBlockUsbFileTransfer property value. Indicates whether or not to block USB file transfer. +func (m *AospDeviceOwnerDeviceConfiguration) GetStorageBlockUsbFileTransfer()(*bool) { + return m.storageBlockUsbFileTransfer +} +// GetWifiBlockEditConfigurations gets the wifiBlockEditConfigurations property value. Indicates whether or not to block the user from editing the wifi connection settings. +func (m *AospDeviceOwnerDeviceConfiguration) GetWifiBlockEditConfigurations()(*bool) { + return m.wifiBlockEditConfigurations +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appsBlockInstallFromUnknownSources", m.GetAppsBlockInstallFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlockConfiguration", m.GetBluetoothBlockConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlocked", m.GetBluetoothBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cameraBlocked", m.GetCameraBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("factoryResetBlocked", m.GetFactoryResetBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordSignInFailureCountBeforeFactoryReset", m.GetPasswordSignInFailureCountBeforeFactoryReset()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityAllowDebuggingFeatures", m.GetSecurityAllowDebuggingFeatures()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockExternalMedia", m.GetStorageBlockExternalMedia()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageBlockUsbFileTransfer", m.GetStorageBlockUsbFileTransfer()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wifiBlockEditConfigurations", m.GetWifiBlockEditConfigurations()) + if err != nil { + return err + } + } + return nil +} +// SetAppsBlockInstallFromUnknownSources sets the appsBlockInstallFromUnknownSources property value. Indicates whether or not the user is allowed to enable unknown sources setting. When set to true, user is not allowed to enable unknown sources settings. +func (m *AospDeviceOwnerDeviceConfiguration) SetAppsBlockInstallFromUnknownSources(value *bool)() { + m.appsBlockInstallFromUnknownSources = value +} +// SetBluetoothBlockConfiguration sets the bluetoothBlockConfiguration property value. Indicates whether or not to block a user from configuring bluetooth. +func (m *AospDeviceOwnerDeviceConfiguration) SetBluetoothBlockConfiguration(value *bool)() { + m.bluetoothBlockConfiguration = value +} +// SetBluetoothBlocked sets the bluetoothBlocked property value. Indicates whether or not to disable the use of bluetooth. When set to true, bluetooth cannot be enabled on the device. +func (m *AospDeviceOwnerDeviceConfiguration) SetBluetoothBlocked(value *bool)() { + m.bluetoothBlocked = value +} +// SetCameraBlocked sets the cameraBlocked property value. Indicates whether or not to disable the use of the camera. +func (m *AospDeviceOwnerDeviceConfiguration) SetCameraBlocked(value *bool)() { + m.cameraBlocked = value +} +// SetFactoryResetBlocked sets the factoryResetBlocked property value. Indicates whether or not the factory reset option in settings is disabled. +func (m *AospDeviceOwnerDeviceConfiguration) SetFactoryResetBlocked(value *bool)() { + m.factoryResetBlocked = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Indicates the minimum length of the password required on the device. Valid values 4 to 16 +func (m *AospDeviceOwnerDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *AospDeviceOwnerDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Indicates the minimum password quality required on the device. Possible values are: deviceDefault, required, numeric, numericComplex, alphabetic, alphanumeric, alphanumericWithSymbols, lowSecurityBiometric, customPassword. +func (m *AospDeviceOwnerDeviceConfiguration) SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPasswordSignInFailureCountBeforeFactoryReset sets the passwordSignInFailureCountBeforeFactoryReset property value. Indicates the number of times a user can enter an incorrect password before the device is wiped. Valid values 4 to 11 +func (m *AospDeviceOwnerDeviceConfiguration) SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() { + m.passwordSignInFailureCountBeforeFactoryReset = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether or not to disable the capability to take screenshots. +func (m *AospDeviceOwnerDeviceConfiguration) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetSecurityAllowDebuggingFeatures sets the securityAllowDebuggingFeatures property value. Indicates whether or not to block the user from enabling debugging features on the device. +func (m *AospDeviceOwnerDeviceConfiguration) SetSecurityAllowDebuggingFeatures(value *bool)() { + m.securityAllowDebuggingFeatures = value +} +// SetStorageBlockExternalMedia sets the storageBlockExternalMedia property value. Indicates whether or not to block external media. +func (m *AospDeviceOwnerDeviceConfiguration) SetStorageBlockExternalMedia(value *bool)() { + m.storageBlockExternalMedia = value +} +// SetStorageBlockUsbFileTransfer sets the storageBlockUsbFileTransfer property value. Indicates whether or not to block USB file transfer. +func (m *AospDeviceOwnerDeviceConfiguration) SetStorageBlockUsbFileTransfer(value *bool)() { + m.storageBlockUsbFileTransfer = value +} +// SetWifiBlockEditConfigurations sets the wifiBlockEditConfigurations property value. Indicates whether or not to block the user from editing the wifi connection settings. +func (m *AospDeviceOwnerDeviceConfiguration) SetWifiBlockEditConfigurations(value *bool)() { + m.wifiBlockEditConfigurations = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_response.go new file mode 100644 index 000000000..b0ba6fc74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerDeviceConfigurationCollectionResponse +type AospDeviceOwnerDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerDeviceConfigurationable +} +// NewAospDeviceOwnerDeviceConfigurationCollectionResponse instantiates a new AospDeviceOwnerDeviceConfigurationCollectionResponse and sets the default values. +func NewAospDeviceOwnerDeviceConfigurationCollectionResponse()(*AospDeviceOwnerDeviceConfigurationCollectionResponse) { + m := &AospDeviceOwnerDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerDeviceConfigurationCollectionResponse) GetValue()([]AospDeviceOwnerDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerDeviceConfigurationCollectionResponse) SetValue(value []AospDeviceOwnerDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_responseable.go new file mode 100644 index 000000000..6f4d1b01b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerDeviceConfigurationCollectionResponseable +type AospDeviceOwnerDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerDeviceConfigurationable) + SetValue(value []AospDeviceOwnerDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configurationable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configurationable.go new file mode 100644 index 000000000..37dff50b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_device_configurationable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerDeviceConfigurationable +type AospDeviceOwnerDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppsBlockInstallFromUnknownSources()(*bool) + GetBluetoothBlockConfiguration()(*bool) + GetBluetoothBlocked()(*bool) + GetCameraBlocked()(*bool) + GetFactoryResetBlocked()(*bool) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordRequiredType()(*AndroidDeviceOwnerRequiredPasswordType) + GetPasswordSignInFailureCountBeforeFactoryReset()(*int32) + GetScreenCaptureBlocked()(*bool) + GetSecurityAllowDebuggingFeatures()(*bool) + GetStorageBlockExternalMedia()(*bool) + GetStorageBlockUsbFileTransfer()(*bool) + GetWifiBlockEditConfigurations()(*bool) + SetAppsBlockInstallFromUnknownSources(value *bool)() + SetBluetoothBlockConfiguration(value *bool)() + SetBluetoothBlocked(value *bool)() + SetCameraBlocked(value *bool)() + SetFactoryResetBlocked(value *bool)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordRequiredType(value *AndroidDeviceOwnerRequiredPasswordType)() + SetPasswordSignInFailureCountBeforeFactoryReset(value *int32)() + SetScreenCaptureBlocked(value *bool)() + SetSecurityAllowDebuggingFeatures(value *bool)() + SetStorageBlockExternalMedia(value *bool)() + SetStorageBlockUsbFileTransfer(value *bool)() + SetWifiBlockEditConfigurations(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..0d687a11d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerEnterpriseWiFiConfiguration +type AospDeviceOwnerEnterpriseWiFiConfiguration struct { + AospDeviceOwnerWiFiConfiguration + // Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Extensible Authentication Protocol (EAP) Configuration Types. + eapType *AndroidEapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. + identityCertificateForClientAuthentication AospDeviceOwnerCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. This collection can contain a maximum of 500 elements. Possible values are: none, microsoftChapVersionTwo. + innerAuthenticationProtocolForPeap *NonEapAuthenticationMethodForPeap + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. + outerIdentityPrivacyTemporaryValue *string + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. + rootCertificateForServerValidation AospDeviceOwnerTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string +} +// NewAospDeviceOwnerEnterpriseWiFiConfiguration instantiates a new AospDeviceOwnerEnterpriseWiFiConfiguration and sets the default values. +func NewAospDeviceOwnerEnterpriseWiFiConfiguration()(*AospDeviceOwnerEnterpriseWiFiConfiguration) { + m := &AospDeviceOwnerEnterpriseWiFiConfiguration{ + AospDeviceOwnerWiFiConfiguration: *NewAospDeviceOwnerWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetEapType()(*AndroidEapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AospDeviceOwnerWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*AndroidEapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAospDeviceOwnerCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(AospDeviceOwnerCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["innerAuthenticationProtocolForPeap"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForPeap) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForPeap(val.(*NonEapAuthenticationMethodForPeap)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAospDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(AospDeviceOwnerTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(AospDeviceOwnerCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetInnerAuthenticationProtocolForPeap gets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. This collection can contain a maximum of 500 elements. Possible values are: none, microsoftChapVersionTwo. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) { + return m.innerAuthenticationProtocolForPeap +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(AospDeviceOwnerTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AospDeviceOwnerWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForPeap() != nil { + cast := (*m.GetInnerAuthenticationProtocolForPeap()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForPeap", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Indicates the Authentication Method the client (device) needs to use when the EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) Configuration Types. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetEapType(value *AndroidEapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). This is the certificate presented by client to the Wi-Fi endpoint. The authentication server sitting behind the Wi-Fi endpoint must accept this certificate to successfully establish a Wi-Fi connection. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value AospDeviceOwnerCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetInnerAuthenticationProtocolForPeap sets the innerAuthenticationProtocolForPeap property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is PEAP and Authenticationmethod is Username and Password. This collection can contain a maximum of 500 elements. Possible values are: none, microsoftChapVersionTwo. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() { + m.innerAuthenticationProtocolForPeap = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS or PEAP. The String provided here is used to mask the username of individual users when they attempt to connect to Wi-Fi network. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS, EAP-TTLS or PEAP. This is the certificate presented by the Wi-Fi endpoint when the device attempts to connect to Wi-Fi endpoint. The device (or user) must accept this certificate to continue the connection attempt. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value AospDeviceOwnerTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *AospDeviceOwnerEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..3a56fa390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse +type AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerEnterpriseWiFiConfigurationable +} +// NewAospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse instantiates a new AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewAospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse()(*AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) { + m := &AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]AospDeviceOwnerEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []AospDeviceOwnerEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..66cda937a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseable +type AospDeviceOwnerEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerEnterpriseWiFiConfigurationable) + SetValue(value []AospDeviceOwnerEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..1ccee529b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_enterprise_wi_fi_configurationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerEnterpriseWiFiConfigurationable +type AospDeviceOwnerEnterpriseWiFiConfigurationable interface { + AospDeviceOwnerWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapType()(*AndroidEapType) + GetIdentityCertificateForClientAuthentication()(AospDeviceOwnerCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetInnerAuthenticationProtocolForPeap()(*NonEapAuthenticationMethodForPeap) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetRootCertificateForServerValidation()(AospDeviceOwnerTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapType(value *AndroidEapType)() + SetIdentityCertificateForClientAuthentication(value AospDeviceOwnerCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetInnerAuthenticationProtocolForPeap(value *NonEapAuthenticationMethodForPeap)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetRootCertificateForServerValidation(value AospDeviceOwnerTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile.go new file mode 100644 index 000000000..5401811f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile.go @@ -0,0 +1,288 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerPkcsCertificateProfile +type AospDeviceOwnerPkcsCertificateProfile struct { + AospDeviceOwnerCertificateProfileBase + // CertificateStore types + certificateStore *CertificateStore + // PKCS Certificate Template Name + certificateTemplateName *string + // PKCS Certification Authority + certificationAuthority *string + // PKCS Certification Authority Name + certificationAuthorityName *string + // Device Management Certification Authority Types. + certificationAuthorityType *DeviceManagementCertificationAuthority + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAospDeviceOwnerPkcsCertificateProfile instantiates a new AospDeviceOwnerPkcsCertificateProfile and sets the default values. +func NewAospDeviceOwnerPkcsCertificateProfile()(*AospDeviceOwnerPkcsCertificateProfile) { + m := &AospDeviceOwnerPkcsCertificateProfile{ + AospDeviceOwnerCertificateProfileBase: *NewAospDeviceOwnerCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerPkcsCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. CertificateStore types +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetCertificationAuthorityType gets the certificationAuthorityType property value. Device Management Certification Authority Types. +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCertificationAuthorityType()(*DeviceManagementCertificationAuthority) { + return m.certificationAuthorityType +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerPkcsCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AospDeviceOwnerCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["certificationAuthorityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementCertificationAuthority) + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityType(val.(*DeviceManagementCertificationAuthority)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AospDeviceOwnerPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AospDeviceOwnerPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AospDeviceOwnerPkcsCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AospDeviceOwnerCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetCertificationAuthorityType() != nil { + cast := (*m.GetCertificationAuthorityType()).String() + err = writer.WriteStringValue("certificationAuthorityType", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. CertificateStore types +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetCertificationAuthorityType sets the certificationAuthorityType property value. Device Management Certification Authority Types. +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCertificationAuthorityType(value *DeviceManagementCertificationAuthority)() { + m.certificationAuthorityType = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerPkcsCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AospDeviceOwnerPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AospDeviceOwnerPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AospDeviceOwnerPkcsCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..58dd33586 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerPkcsCertificateProfileCollectionResponse +type AospDeviceOwnerPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerPkcsCertificateProfileable +} +// NewAospDeviceOwnerPkcsCertificateProfileCollectionResponse instantiates a new AospDeviceOwnerPkcsCertificateProfileCollectionResponse and sets the default values. +func NewAospDeviceOwnerPkcsCertificateProfileCollectionResponse()(*AospDeviceOwnerPkcsCertificateProfileCollectionResponse) { + m := &AospDeviceOwnerPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerPkcsCertificateProfileCollectionResponse) GetValue()([]AospDeviceOwnerPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerPkcsCertificateProfileCollectionResponse) SetValue(value []AospDeviceOwnerPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..fa6aaebbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerPkcsCertificateProfileCollectionResponseable +type AospDeviceOwnerPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerPkcsCertificateProfileable) + SetValue(value []AospDeviceOwnerPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profileable.go new file mode 100644 index 000000000..ef46a7ad4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_pkcs_certificate_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerPkcsCertificateProfileable +type AospDeviceOwnerPkcsCertificateProfileable interface { + AospDeviceOwnerCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetCertificationAuthorityType()(*DeviceManagementCertificationAuthority) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetCertificationAuthorityType(value *DeviceManagementCertificationAuthority)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile.go new file mode 100644 index 000000000..c9a0c6868 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerScepCertificateProfile +type AospDeviceOwnerScepCertificateProfile struct { + AospDeviceOwnerCertificateProfileBase + // Target store certificate. This collection can contain a maximum of 500 elements. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Hash Algorithm Options. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // SCEP Server Url(s) + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewAospDeviceOwnerScepCertificateProfile instantiates a new AospDeviceOwnerScepCertificateProfile and sets the default values. +func NewAospDeviceOwnerScepCertificateProfile()(*AospDeviceOwnerScepCertificateProfile) { + m := &AospDeviceOwnerScepCertificateProfile{ + AospDeviceOwnerCertificateProfileBase: *NewAospDeviceOwnerCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerScepCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. This collection can contain a maximum of 500 elements. Possible values are: user, machine. +func (m *AospDeviceOwnerScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AospDeviceOwnerCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AospDeviceOwnerScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *AospDeviceOwnerScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *AospDeviceOwnerScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AospDeviceOwnerScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s) +func (m *AospDeviceOwnerScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AospDeviceOwnerScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AospDeviceOwnerScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AospDeviceOwnerCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. This collection can contain a maximum of 500 elements. Possible values are: user, machine. +func (m *AospDeviceOwnerScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *AospDeviceOwnerScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetHashAlgorithm sets the hashAlgorithm property value. Hash Algorithm Options. +func (m *AospDeviceOwnerScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *AospDeviceOwnerScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *AospDeviceOwnerScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *AospDeviceOwnerScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s) +func (m *AospDeviceOwnerScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *AospDeviceOwnerScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *AospDeviceOwnerScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..83704301a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerScepCertificateProfileCollectionResponse +type AospDeviceOwnerScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerScepCertificateProfileable +} +// NewAospDeviceOwnerScepCertificateProfileCollectionResponse instantiates a new AospDeviceOwnerScepCertificateProfileCollectionResponse and sets the default values. +func NewAospDeviceOwnerScepCertificateProfileCollectionResponse()(*AospDeviceOwnerScepCertificateProfileCollectionResponse) { + m := &AospDeviceOwnerScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerScepCertificateProfileCollectionResponse) GetValue()([]AospDeviceOwnerScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerScepCertificateProfileCollectionResponse) SetValue(value []AospDeviceOwnerScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..a6b3f3417 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerScepCertificateProfileCollectionResponseable +type AospDeviceOwnerScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerScepCertificateProfileable) + SetValue(value []AospDeviceOwnerScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profileable.go new file mode 100644 index 000000000..b8ea063ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_scep_certificate_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerScepCertificateProfileable +type AospDeviceOwnerScepCertificateProfileable interface { + AospDeviceOwnerCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate.go new file mode 100644 index 000000000..37e8fc4ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerTrustedRootCertificate +type AospDeviceOwnerTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate + trustedRootCertificate []byte +} +// NewAospDeviceOwnerTrustedRootCertificate instantiates a new aospDeviceOwnerTrustedRootCertificate and sets the default values. +func NewAospDeviceOwnerTrustedRootCertificate()(*AospDeviceOwnerTrustedRootCertificate) { + m := &AospDeviceOwnerTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *AospDeviceOwnerTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AospDeviceOwnerTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *AospDeviceOwnerTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate +func (m *AospDeviceOwnerTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..5cb406973 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerTrustedRootCertificateCollectionResponse +type AospDeviceOwnerTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerTrustedRootCertificateable +} +// NewAospDeviceOwnerTrustedRootCertificateCollectionResponse instantiates a new AospDeviceOwnerTrustedRootCertificateCollectionResponse and sets the default values. +func NewAospDeviceOwnerTrustedRootCertificateCollectionResponse()(*AospDeviceOwnerTrustedRootCertificateCollectionResponse) { + m := &AospDeviceOwnerTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerTrustedRootCertificateCollectionResponse) GetValue()([]AospDeviceOwnerTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerTrustedRootCertificateCollectionResponse) SetValue(value []AospDeviceOwnerTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..6a0f089eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerTrustedRootCertificateCollectionResponseable +type AospDeviceOwnerTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerTrustedRootCertificateable) + SetValue(value []AospDeviceOwnerTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificateable.go new file mode 100644 index 000000000..00c0fcfc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerTrustedRootCertificateable +type AospDeviceOwnerTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration.go new file mode 100644 index 000000000..b2e0c981c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration.go @@ -0,0 +1,237 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerWiFiConfiguration +type AospDeviceOwnerWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKey *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKeyIsSet *bool + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types for AOSP Device Owner. + wiFiSecurityType *AospDeviceOwnerWiFiSecurityType +} +// NewAospDeviceOwnerWiFiConfiguration instantiates a new AospDeviceOwnerWiFiConfiguration and sets the default values. +func NewAospDeviceOwnerWiFiConfiguration()(*AospDeviceOwnerWiFiConfiguration) { + m := &AospDeviceOwnerWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.aospDeviceOwnerWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAospDeviceOwnerWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.aospDeviceOwnerEnterpriseWiFiConfiguration": + return NewAospDeviceOwnerEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewAospDeviceOwnerWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AospDeviceOwnerWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["preSharedKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKey(val) + } + return nil + } + res["preSharedKeyIsSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKeyIsSet(val) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAospDeviceOwnerWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*AospDeviceOwnerWiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *AospDeviceOwnerWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetPreSharedKey gets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) GetPreSharedKey()(*string) { + return m.preSharedKey +} +// GetPreSharedKeyIsSet gets the preSharedKeyIsSet property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) GetPreSharedKeyIsSet()(*bool) { + return m.preSharedKeyIsSet +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AospDeviceOwnerWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types for AOSP Device Owner. +func (m *AospDeviceOwnerWiFiConfiguration) GetWiFiSecurityType()(*AospDeviceOwnerWiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preSharedKey", m.GetPreSharedKey()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("preSharedKeyIsSet", m.GetPreSharedKeyIsSet()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *AospDeviceOwnerWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *AospDeviceOwnerWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetPreSharedKey sets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) SetPreSharedKey(value *string)() { + m.preSharedKey = value +} +// SetPreSharedKeyIsSet sets the preSharedKeyIsSet property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *AospDeviceOwnerWiFiConfiguration) SetPreSharedKeyIsSet(value *bool)() { + m.preSharedKeyIsSet = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *AospDeviceOwnerWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types for AOSP Device Owner. +func (m *AospDeviceOwnerWiFiConfiguration) SetWiFiSecurityType(value *AospDeviceOwnerWiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..3851e1017 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerWiFiConfigurationCollectionResponse +type AospDeviceOwnerWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AospDeviceOwnerWiFiConfigurationable +} +// NewAospDeviceOwnerWiFiConfigurationCollectionResponse instantiates a new AospDeviceOwnerWiFiConfigurationCollectionResponse and sets the default values. +func NewAospDeviceOwnerWiFiConfigurationCollectionResponse()(*AospDeviceOwnerWiFiConfigurationCollectionResponse) { + m := &AospDeviceOwnerWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAospDeviceOwnerWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAospDeviceOwnerWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAospDeviceOwnerWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AospDeviceOwnerWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAospDeviceOwnerWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AospDeviceOwnerWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AospDeviceOwnerWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AospDeviceOwnerWiFiConfigurationCollectionResponse) GetValue()([]AospDeviceOwnerWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AospDeviceOwnerWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AospDeviceOwnerWiFiConfigurationCollectionResponse) SetValue(value []AospDeviceOwnerWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..ef9d36dd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerWiFiConfigurationCollectionResponseable +type AospDeviceOwnerWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AospDeviceOwnerWiFiConfigurationable) + SetValue(value []AospDeviceOwnerWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configurationable.go new file mode 100644 index 000000000..0a2f6a0ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_configurationable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AospDeviceOwnerWiFiConfigurationable +type AospDeviceOwnerWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetPreSharedKey()(*string) + GetPreSharedKeyIsSet()(*bool) + GetSsid()(*string) + GetWiFiSecurityType()(*AospDeviceOwnerWiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetPreSharedKey(value *string)() + SetPreSharedKeyIsSet(value *bool)() + SetSsid(value *string)() + SetWiFiSecurityType(value *AospDeviceOwnerWiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_security_type.go b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_security_type.go new file mode 100644 index 000000000..9fdfbe5d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_device_owner_wi_fi_security_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AospDeviceOwnerWiFiSecurityType int + +const ( + // Open (No Authentication). + OPEN_AOSPDEVICEOWNERWIFISECURITYTYPE AospDeviceOwnerWiFiSecurityType = iota + // WEP Encryption. + WEP_AOSPDEVICEOWNERWIFISECURITYTYPE + // WPA-Personal/WPA2-Personal. + WPAPERSONAL_AOSPDEVICEOWNERWIFISECURITYTYPE + // WPA-Enterprise/WPA2-Enterprise. Must use AOSPDeviceOwnerEnterpriseWifiConfiguration type to configure enterprise options. + WPAENTERPRISE_AOSPDEVICEOWNERWIFISECURITYTYPE +) + +func (i AospDeviceOwnerWiFiSecurityType) String() string { + return []string{"open", "wep", "wpaPersonal", "wpaEnterprise"}[i] +} +func ParseAospDeviceOwnerWiFiSecurityType(v string) (interface{}, error) { + result := OPEN_AOSPDEVICEOWNERWIFISECURITYTYPE + switch v { + case "open": + result = OPEN_AOSPDEVICEOWNERWIFISECURITYTYPE + case "wep": + result = WEP_AOSPDEVICEOWNERWIFISECURITYTYPE + case "wpaPersonal": + result = WPAPERSONAL_AOSPDEVICEOWNERWIFISECURITYTYPE + case "wpaEnterprise": + result = WPAENTERPRISE_AOSPDEVICEOWNERWIFISECURITYTYPE + default: + return 0, errors.New("Unknown AospDeviceOwnerWiFiSecurityType value: " + v) + } + return &result, nil +} +func SerializeAospDeviceOwnerWiFiSecurityType(values []AospDeviceOwnerWiFiSecurityType) []string { + 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/aosp_wifi_security_type.go b/src/internal/connector/graph/betasdk/models/aosp_wifi_security_type.go new file mode 100644 index 000000000..ef238404c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/aosp_wifi_security_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AospWifiSecurityType int + +const ( + // No security type. + NONE_AOSPWIFISECURITYTYPE AospWifiSecurityType = iota + // WPA-Pre-shared-key + WPA_AOSPWIFISECURITYTYPE + // WEP-Pre-shared-key + WEP_AOSPWIFISECURITYTYPE +) + +func (i AospWifiSecurityType) String() string { + return []string{"none", "wpa", "wep"}[i] +} +func ParseAospWifiSecurityType(v string) (interface{}, error) { + result := NONE_AOSPWIFISECURITYTYPE + switch v { + case "none": + result = NONE_AOSPWIFISECURITYTYPE + case "wpa": + result = WPA_AOSPWIFISECURITYTYPE + case "wep": + result = WEP_AOSPWIFISECURITYTYPE + default: + return 0, errors.New("Unknown AospWifiSecurityType value: " + v) + } + return &result, nil +} +func SerializeAospWifiSecurityType(values []AospWifiSecurityType) []string { + 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/api_application.go b/src/internal/connector/graph/betasdk/models/api_application.go new file mode 100644 index 000000000..b41213d28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/api_application.go @@ -0,0 +1,222 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiApplication +type ApiApplication struct { + // When true, allows an application to use claims mapping without specifying a custom signing key. + acceptMappedClaims *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. + knownClientApplications []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes. + oauth2PermissionScopes []PermissionScopeable + // The OdataType property + odataType *string + // Lists the client applications that are pre-authorized with the specified delegated permissions to access this application's APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. + preAuthorizedApplications []PreAuthorizedApplicationable + // Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount, the value for this property must be 2 + requestedAccessTokenVersion *int32 +} +// NewApiApplication instantiates a new apiApplication and sets the default values. +func NewApiApplication()(*ApiApplication) { + m := &ApiApplication{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateApiApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApiApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApiApplication(), nil +} +// GetAcceptMappedClaims gets the acceptMappedClaims property value. When true, allows an application to use claims mapping without specifying a custom signing key. +func (m *ApiApplication) GetAcceptMappedClaims()(*bool) { + return m.acceptMappedClaims +} +// 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 *ApiApplication) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApiApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["acceptMappedClaims"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAcceptMappedClaims(val) + } + return nil + } + res["knownClientApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetKnownClientApplications(res) + } + return nil + } + res["oauth2PermissionScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionScopeable, len(val)) + for i, v := range val { + res[i] = v.(PermissionScopeable) + } + m.SetOauth2PermissionScopes(res) + } + 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["preAuthorizedApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePreAuthorizedApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PreAuthorizedApplicationable, len(val)) + for i, v := range val { + res[i] = v.(PreAuthorizedApplicationable) + } + m.SetPreAuthorizedApplications(res) + } + return nil + } + res["requestedAccessTokenVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRequestedAccessTokenVersion(val) + } + return nil + } + return res +} +// GetKnownClientApplications gets the knownClientApplications property value. Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. +func (m *ApiApplication) GetKnownClientApplications()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.knownClientApplications +} +// GetOauth2PermissionScopes gets the oauth2PermissionScopes property value. The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes. +func (m *ApiApplication) GetOauth2PermissionScopes()([]PermissionScopeable) { + return m.oauth2PermissionScopes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ApiApplication) GetOdataType()(*string) { + return m.odataType +} +// GetPreAuthorizedApplications gets the preAuthorizedApplications property value. Lists the client applications that are pre-authorized with the specified delegated permissions to access this application's APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. +func (m *ApiApplication) GetPreAuthorizedApplications()([]PreAuthorizedApplicationable) { + return m.preAuthorizedApplications +} +// GetRequestedAccessTokenVersion gets the requestedAccessTokenVersion property value. Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount, the value for this property must be 2 +func (m *ApiApplication) GetRequestedAccessTokenVersion()(*int32) { + return m.requestedAccessTokenVersion +} +// Serialize serializes information the current object +func (m *ApiApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("acceptMappedClaims", m.GetAcceptMappedClaims()) + if err != nil { + return err + } + } + if m.GetKnownClientApplications() != nil { + err := writer.WriteCollectionOfUUIDValues("knownClientApplications", m.GetKnownClientApplications()) + if err != nil { + return err + } + } + if m.GetOauth2PermissionScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOauth2PermissionScopes())) + for i, v := range m.GetOauth2PermissionScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("oauth2PermissionScopes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPreAuthorizedApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPreAuthorizedApplications())) + for i, v := range m.GetPreAuthorizedApplications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("preAuthorizedApplications", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("requestedAccessTokenVersion", m.GetRequestedAccessTokenVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptMappedClaims sets the acceptMappedClaims property value. When true, allows an application to use claims mapping without specifying a custom signing key. +func (m *ApiApplication) SetAcceptMappedClaims(value *bool)() { + m.acceptMappedClaims = value +} +// 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 *ApiApplication) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKnownClientApplications sets the knownClientApplications property value. Used for bundling consent if you have a solution that contains two parts: a client app and a custom web API app. If you set the appID of the client app to this value, the user only consents once to the client app. Azure AD knows that consenting to the client means implicitly consenting to the web API and automatically provisions service principals for both APIs at the same time. Both the client and the web API app must be registered in the same tenant. +func (m *ApiApplication) SetKnownClientApplications(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.knownClientApplications = value +} +// SetOauth2PermissionScopes sets the oauth2PermissionScopes property value. The definition of the delegated permissions exposed by the web API represented by this application registration. These delegated permissions may be requested by a client application, and may be granted by users or administrators during consent. Delegated permissions are sometimes referred to as OAuth 2.0 scopes. +func (m *ApiApplication) SetOauth2PermissionScopes(value []PermissionScopeable)() { + m.oauth2PermissionScopes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ApiApplication) SetOdataType(value *string)() { + m.odataType = value +} +// SetPreAuthorizedApplications sets the preAuthorizedApplications property value. Lists the client applications that are pre-authorized with the specified delegated permissions to access this application's APIs. Users are not required to consent to any pre-authorized application (for the permissions specified). However, any additional permissions not listed in preAuthorizedApplications (requested through incremental consent for example) will require user consent. +func (m *ApiApplication) SetPreAuthorizedApplications(value []PreAuthorizedApplicationable)() { + m.preAuthorizedApplications = value +} +// SetRequestedAccessTokenVersion sets the requestedAccessTokenVersion property value. Specifies the access token version expected by this resource. This changes the version and format of the JWT produced independent of the endpoint or client used to request the access token. The endpoint used, v1.0 or v2.0, is chosen by the client and only impacts the version of id_tokens. Resources need to explicitly configure requestedAccessTokenVersion to indicate the supported access token format. Possible values for requestedAccessTokenVersion are 1, 2, or null. If the value is null, this defaults to 1, which corresponds to the v1.0 endpoint. If signInAudience on the application is configured as AzureADandPersonalMicrosoftAccount, the value for this property must be 2 +func (m *ApiApplication) SetRequestedAccessTokenVersion(value *int32)() { + m.requestedAccessTokenVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/api_applicationable.go b/src/internal/connector/graph/betasdk/models/api_applicationable.go new file mode 100644 index 000000000..155c6726c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/api_applicationable.go @@ -0,0 +1,24 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiApplicationable +type ApiApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptMappedClaims()(*bool) + GetKnownClientApplications()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOauth2PermissionScopes()([]PermissionScopeable) + GetOdataType()(*string) + GetPreAuthorizedApplications()([]PreAuthorizedApplicationable) + GetRequestedAccessTokenVersion()(*int32) + SetAcceptMappedClaims(value *bool)() + SetKnownClientApplications(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOauth2PermissionScopes(value []PermissionScopeable)() + SetOdataType(value *string)() + SetPreAuthorizedApplications(value []PreAuthorizedApplicationable)() + SetRequestedAccessTokenVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/api_authentication_configuration_base.go b/src/internal/connector/graph/betasdk/models/api_authentication_configuration_base.go new file mode 100644 index 000000000..774289f51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/api_authentication_configuration_base.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiAuthenticationConfigurationBase +type ApiAuthenticationConfigurationBase 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 OdataType property + odataType *string +} +// NewApiAuthenticationConfigurationBase instantiates a new apiAuthenticationConfigurationBase and sets the default values. +func NewApiAuthenticationConfigurationBase()(*ApiAuthenticationConfigurationBase) { + m := &ApiAuthenticationConfigurationBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateApiAuthenticationConfigurationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApiAuthenticationConfigurationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.basicAuthentication": + return NewBasicAuthentication(), nil + case "#microsoft.graph.clientCertificateAuthentication": + return NewClientCertificateAuthentication(), nil + case "#microsoft.graph.pkcs12Certificate": + return NewPkcs12Certificate(), nil + } + } + } + } + return NewApiAuthenticationConfigurationBase(), 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 *ApiAuthenticationConfigurationBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApiAuthenticationConfigurationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ApiAuthenticationConfigurationBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ApiAuthenticationConfigurationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ApiAuthenticationConfigurationBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ApiAuthenticationConfigurationBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/api_authentication_configuration_baseable.go b/src/internal/connector/graph/betasdk/models/api_authentication_configuration_baseable.go new file mode 100644 index 000000000..c72884776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/api_authentication_configuration_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApiAuthenticationConfigurationBaseable +type ApiAuthenticationConfigurationBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_configuration_setting_item.go b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item.go new file mode 100644 index 000000000..fdd2a4f83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConfigurationSettingItem contains properties for App configuration setting item. +type AppConfigurationSettingItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // app configuration key. + appConfigKey *string + // App configuration key types. + appConfigKeyType *MdmAppConfigKeyType + // app configuration key value. + appConfigKeyValue *string + // The OdataType property + odataType *string +} +// NewAppConfigurationSettingItem instantiates a new appConfigurationSettingItem and sets the default values. +func NewAppConfigurationSettingItem()(*AppConfigurationSettingItem) { + m := &AppConfigurationSettingItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppConfigurationSettingItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConfigurationSettingItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConfigurationSettingItem(), 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 *AppConfigurationSettingItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppConfigKey gets the appConfigKey property value. app configuration key. +func (m *AppConfigurationSettingItem) GetAppConfigKey()(*string) { + return m.appConfigKey +} +// GetAppConfigKeyType gets the appConfigKeyType property value. App configuration key types. +func (m *AppConfigurationSettingItem) GetAppConfigKeyType()(*MdmAppConfigKeyType) { + return m.appConfigKeyType +} +// GetAppConfigKeyValue gets the appConfigKeyValue property value. app configuration key value. +func (m *AppConfigurationSettingItem) GetAppConfigKeyValue()(*string) { + return m.appConfigKeyValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConfigurationSettingItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appConfigKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppConfigKey(val) + } + return nil + } + res["appConfigKeyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMdmAppConfigKeyType) + if err != nil { + return err + } + if val != nil { + m.SetAppConfigKeyType(val.(*MdmAppConfigKeyType)) + } + return nil + } + res["appConfigKeyValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppConfigKeyValue(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppConfigurationSettingItem) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AppConfigurationSettingItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appConfigKey", m.GetAppConfigKey()) + if err != nil { + return err + } + } + if m.GetAppConfigKeyType() != nil { + cast := (*m.GetAppConfigKeyType()).String() + err := writer.WriteStringValue("appConfigKeyType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("appConfigKeyValue", m.GetAppConfigKeyValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AppConfigurationSettingItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppConfigKey sets the appConfigKey property value. app configuration key. +func (m *AppConfigurationSettingItem) SetAppConfigKey(value *string)() { + m.appConfigKey = value +} +// SetAppConfigKeyType sets the appConfigKeyType property value. App configuration key types. +func (m *AppConfigurationSettingItem) SetAppConfigKeyType(value *MdmAppConfigKeyType)() { + m.appConfigKeyType = value +} +// SetAppConfigKeyValue sets the appConfigKeyValue property value. app configuration key value. +func (m *AppConfigurationSettingItem) SetAppConfigKeyValue(value *string)() { + m.appConfigKeyValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppConfigurationSettingItem) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_response.go b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_response.go new file mode 100644 index 000000000..673433c78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConfigurationSettingItemCollectionResponse +type AppConfigurationSettingItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppConfigurationSettingItemable +} +// NewAppConfigurationSettingItemCollectionResponse instantiates a new AppConfigurationSettingItemCollectionResponse and sets the default values. +func NewAppConfigurationSettingItemCollectionResponse()(*AppConfigurationSettingItemCollectionResponse) { + m := &AppConfigurationSettingItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppConfigurationSettingItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConfigurationSettingItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConfigurationSettingItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConfigurationSettingItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConfigurationSettingItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConfigurationSettingItemable, len(val)) + for i, v := range val { + res[i] = v.(AppConfigurationSettingItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppConfigurationSettingItemCollectionResponse) GetValue()([]AppConfigurationSettingItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppConfigurationSettingItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppConfigurationSettingItemCollectionResponse) SetValue(value []AppConfigurationSettingItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_responseable.go new file mode 100644 index 000000000..4aebda506 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_configuration_setting_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConfigurationSettingItemCollectionResponseable +type AppConfigurationSettingItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppConfigurationSettingItemable) + SetValue(value []AppConfigurationSettingItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_configuration_setting_itemable.go b/src/internal/connector/graph/betasdk/models/app_configuration_setting_itemable.go new file mode 100644 index 000000000..6b142e322 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_configuration_setting_itemable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConfigurationSettingItemable +type AppConfigurationSettingItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppConfigKey()(*string) + GetAppConfigKeyType()(*MdmAppConfigKeyType) + GetAppConfigKeyValue()(*string) + GetOdataType()(*string) + SetAppConfigKey(value *string)() + SetAppConfigKeyType(value *MdmAppConfigKeyType)() + SetAppConfigKeyValue(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_approval_route.go b/src/internal/connector/graph/betasdk/models/app_consent_approval_route.go new file mode 100644 index 000000000..2b751248b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_approval_route.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentApprovalRoute +type AppConsentApprovalRoute struct { + Entity + // A collection of userConsentRequest objects for a specific application. + appConsentRequests []AppConsentRequestable +} +// NewAppConsentApprovalRoute instantiates a new AppConsentApprovalRoute and sets the default values. +func NewAppConsentApprovalRoute()(*AppConsentApprovalRoute) { + m := &AppConsentApprovalRoute{ + Entity: *NewEntity(), + } + return m +} +// CreateAppConsentApprovalRouteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConsentApprovalRouteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConsentApprovalRoute(), nil +} +// GetAppConsentRequests gets the appConsentRequests property value. A collection of userConsentRequest objects for a specific application. +func (m *AppConsentApprovalRoute) GetAppConsentRequests()([]AppConsentRequestable) { + return m.appConsentRequests +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConsentApprovalRoute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appConsentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConsentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConsentRequestable, len(val)) + for i, v := range val { + res[i] = v.(AppConsentRequestable) + } + m.SetAppConsentRequests(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AppConsentApprovalRoute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAppConsentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppConsentRequests())) + for i, v := range m.GetAppConsentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appConsentRequests", cast) + if err != nil { + return err + } + } + return nil +} +// SetAppConsentRequests sets the appConsentRequests property value. A collection of userConsentRequest objects for a specific application. +func (m *AppConsentApprovalRoute) SetAppConsentRequests(value []AppConsentRequestable)() { + m.appConsentRequests = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_approval_routeable.go b/src/internal/connector/graph/betasdk/models/app_consent_approval_routeable.go new file mode 100644 index 000000000..e2252e7ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_approval_routeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentApprovalRouteable +type AppConsentApprovalRouteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppConsentRequests()([]AppConsentRequestable) + SetAppConsentRequests(value []AppConsentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request.go b/src/internal/connector/graph/betasdk/models/app_consent_request.go new file mode 100644 index 000000000..71383c751 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request.go @@ -0,0 +1,180 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequest provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppConsentRequest struct { + Entity + // The display name of the app for which consent is requested. Required. Supports $filter (eq only) and $orderby. + appDisplayName *string + // The identifier of the application. Required. Supports $filter (eq only) and $orderby. + appId *string + // The consent type of the request. Possible values are: Static and Dynamic. These represent static and dynamic permissions, respectively, requested in the consent workflow. Supports $filter (eq only) and $orderby. Required. + consentType *string + // A list of pending scopes waiting for approval. This is empty if the consentType is Static. Required. + pendingScopes []AppConsentRequestScopeable + // A list of pending user consent requests. Supports $filter (eq). + userConsentRequests []UserConsentRequestable +} +// NewAppConsentRequest instantiates a new appConsentRequest and sets the default values. +func NewAppConsentRequest()(*AppConsentRequest) { + m := &AppConsentRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateAppConsentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConsentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConsentRequest(), nil +} +// GetAppDisplayName gets the appDisplayName property value. The display name of the app for which consent is requested. Required. Supports $filter (eq only) and $orderby. +func (m *AppConsentRequest) GetAppDisplayName()(*string) { + return m.appDisplayName +} +// GetAppId gets the appId property value. The identifier of the application. Required. Supports $filter (eq only) and $orderby. +func (m *AppConsentRequest) GetAppId()(*string) { + return m.appId +} +// GetConsentType gets the consentType property value. The consent type of the request. Possible values are: Static and Dynamic. These represent static and dynamic permissions, respectively, requested in the consent workflow. Supports $filter (eq only) and $orderby. Required. +func (m *AppConsentRequest) GetConsentType()(*string) { + return m.consentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConsentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDisplayName(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["consentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConsentType(val) + } + return nil + } + res["pendingScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConsentRequestScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConsentRequestScopeable, len(val)) + for i, v := range val { + res[i] = v.(AppConsentRequestScopeable) + } + m.SetPendingScopes(res) + } + return nil + } + res["userConsentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserConsentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserConsentRequestable, len(val)) + for i, v := range val { + res[i] = v.(UserConsentRequestable) + } + m.SetUserConsentRequests(res) + } + return nil + } + return res +} +// GetPendingScopes gets the pendingScopes property value. A list of pending scopes waiting for approval. This is empty if the consentType is Static. Required. +func (m *AppConsentRequest) GetPendingScopes()([]AppConsentRequestScopeable) { + return m.pendingScopes +} +// GetUserConsentRequests gets the userConsentRequests property value. A list of pending user consent requests. Supports $filter (eq). +func (m *AppConsentRequest) GetUserConsentRequests()([]UserConsentRequestable) { + return m.userConsentRequests +} +// Serialize serializes information the current object +func (m *AppConsentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appDisplayName", m.GetAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("consentType", m.GetConsentType()) + if err != nil { + return err + } + } + if m.GetPendingScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPendingScopes())) + for i, v := range m.GetPendingScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("pendingScopes", cast) + if err != nil { + return err + } + } + if m.GetUserConsentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserConsentRequests())) + for i, v := range m.GetUserConsentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userConsentRequests", cast) + if err != nil { + return err + } + } + return nil +} +// SetAppDisplayName sets the appDisplayName property value. The display name of the app for which consent is requested. Required. Supports $filter (eq only) and $orderby. +func (m *AppConsentRequest) SetAppDisplayName(value *string)() { + m.appDisplayName = value +} +// SetAppId sets the appId property value. The identifier of the application. Required. Supports $filter (eq only) and $orderby. +func (m *AppConsentRequest) SetAppId(value *string)() { + m.appId = value +} +// SetConsentType sets the consentType property value. The consent type of the request. Possible values are: Static and Dynamic. These represent static and dynamic permissions, respectively, requested in the consent workflow. Supports $filter (eq only) and $orderby. Required. +func (m *AppConsentRequest) SetConsentType(value *string)() { + m.consentType = value +} +// SetPendingScopes sets the pendingScopes property value. A list of pending scopes waiting for approval. This is empty if the consentType is Static. Required. +func (m *AppConsentRequest) SetPendingScopes(value []AppConsentRequestScopeable)() { + m.pendingScopes = value +} +// SetUserConsentRequests sets the userConsentRequests property value. A list of pending user consent requests. Supports $filter (eq). +func (m *AppConsentRequest) SetUserConsentRequests(value []UserConsentRequestable)() { + m.userConsentRequests = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_collection_response.go b/src/internal/connector/graph/betasdk/models/app_consent_request_collection_response.go new file mode 100644 index 000000000..5e92f69d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestCollectionResponse +type AppConsentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppConsentRequestable +} +// NewAppConsentRequestCollectionResponse instantiates a new AppConsentRequestCollectionResponse and sets the default values. +func NewAppConsentRequestCollectionResponse()(*AppConsentRequestCollectionResponse) { + m := &AppConsentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppConsentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConsentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConsentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConsentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConsentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConsentRequestable, len(val)) + for i, v := range val { + res[i] = v.(AppConsentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppConsentRequestCollectionResponse) GetValue()([]AppConsentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppConsentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppConsentRequestCollectionResponse) SetValue(value []AppConsentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_consent_request_collection_responseable.go new file mode 100644 index 000000000..076c5e33b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestCollectionResponseable +type AppConsentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppConsentRequestable) + SetValue(value []AppConsentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_scope.go b/src/internal/connector/graph/betasdk/models/app_consent_request_scope.go new file mode 100644 index 000000000..3064a02c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_scope.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestScope +type AppConsentRequestScope 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 name of the scope. + displayName *string + // The OdataType property + odataType *string +} +// NewAppConsentRequestScope instantiates a new appConsentRequestScope and sets the default values. +func NewAppConsentRequestScope()(*AppConsentRequestScope) { + m := &AppConsentRequestScope{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppConsentRequestScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConsentRequestScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConsentRequestScope(), 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 *AppConsentRequestScope) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the scope. +func (m *AppConsentRequestScope) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConsentRequestScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppConsentRequestScope) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AppConsentRequestScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AppConsentRequestScope) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the scope. +func (m *AppConsentRequestScope) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppConsentRequestScope) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_response.go new file mode 100644 index 000000000..e3df0f792 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestScopeCollectionResponse +type AppConsentRequestScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppConsentRequestScopeable +} +// NewAppConsentRequestScopeCollectionResponse instantiates a new AppConsentRequestScopeCollectionResponse and sets the default values. +func NewAppConsentRequestScopeCollectionResponse()(*AppConsentRequestScopeCollectionResponse) { + m := &AppConsentRequestScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppConsentRequestScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppConsentRequestScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppConsentRequestScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppConsentRequestScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConsentRequestScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConsentRequestScopeable, len(val)) + for i, v := range val { + res[i] = v.(AppConsentRequestScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppConsentRequestScopeCollectionResponse) GetValue()([]AppConsentRequestScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppConsentRequestScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppConsentRequestScopeCollectionResponse) SetValue(value []AppConsentRequestScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_responseable.go new file mode 100644 index 000000000..737d0dfdd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestScopeCollectionResponseable +type AppConsentRequestScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppConsentRequestScopeable) + SetValue(value []AppConsentRequestScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_request_scopeable.go b/src/internal/connector/graph/betasdk/models/app_consent_request_scopeable.go new file mode 100644 index 000000000..8a9086da9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_request_scopeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestScopeable +type AppConsentRequestScopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_consent_requestable.go b/src/internal/connector/graph/betasdk/models/app_consent_requestable.go new file mode 100644 index 000000000..8938f29a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_consent_requestable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppConsentRequestable +type AppConsentRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppDisplayName()(*string) + GetAppId()(*string) + GetConsentType()(*string) + GetPendingScopes()([]AppConsentRequestScopeable) + GetUserConsentRequests()([]UserConsentRequestable) + SetAppDisplayName(value *string)() + SetAppId(value *string)() + SetConsentType(value *string)() + SetPendingScopes(value []AppConsentRequestScopeable)() + SetUserConsentRequests(value []UserConsentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_credential_restriction_type.go b/src/internal/connector/graph/betasdk/models/app_credential_restriction_type.go new file mode 100644 index 000000000..1ce0c098f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_credential_restriction_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppCredentialRestrictionType int + +const ( + PASSWORDADDITION_APPCREDENTIALRESTRICTIONTYPE AppCredentialRestrictionType = iota + PASSWORDLIFETIME_APPCREDENTIALRESTRICTIONTYPE + SYMMETRICKEYADDITION_APPCREDENTIALRESTRICTIONTYPE + SYMMETRICKEYLIFETIME_APPCREDENTIALRESTRICTIONTYPE + CUSTOMPASSWORDADDITION_APPCREDENTIALRESTRICTIONTYPE + UNKNOWNFUTUREVALUE_APPCREDENTIALRESTRICTIONTYPE +) + +func (i AppCredentialRestrictionType) String() string { + return []string{"passwordAddition", "passwordLifetime", "symmetricKeyAddition", "symmetricKeyLifetime", "customPasswordAddition", "unknownFutureValue"}[i] +} +func ParseAppCredentialRestrictionType(v string) (interface{}, error) { + result := PASSWORDADDITION_APPCREDENTIALRESTRICTIONTYPE + switch v { + case "passwordAddition": + result = PASSWORDADDITION_APPCREDENTIALRESTRICTIONTYPE + case "passwordLifetime": + result = PASSWORDLIFETIME_APPCREDENTIALRESTRICTIONTYPE + case "symmetricKeyAddition": + result = SYMMETRICKEYADDITION_APPCREDENTIALRESTRICTIONTYPE + case "symmetricKeyLifetime": + result = SYMMETRICKEYLIFETIME_APPCREDENTIALRESTRICTIONTYPE + case "customPasswordAddition": + result = CUSTOMPASSWORDADDITION_APPCREDENTIALRESTRICTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPCREDENTIALRESTRICTIONTYPE + default: + return 0, errors.New("Unknown AppCredentialRestrictionType value: " + v) + } + return &result, nil +} +func SerializeAppCredentialRestrictionType(values []AppCredentialRestrictionType) []string { + 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/app_hosted_media_config.go b/src/internal/connector/graph/betasdk/models/app_hosted_media_config.go new file mode 100644 index 000000000..4fe697fa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_hosted_media_config.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppHostedMediaConfig +type AppHostedMediaConfig struct { + MediaConfig + // The media configuration blob generated by smart media agent. + blob *string +} +// NewAppHostedMediaConfig instantiates a new AppHostedMediaConfig and sets the default values. +func NewAppHostedMediaConfig()(*AppHostedMediaConfig) { + m := &AppHostedMediaConfig{ + MediaConfig: *NewMediaConfig(), + } + odataTypeValue := "#microsoft.graph.appHostedMediaConfig"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppHostedMediaConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppHostedMediaConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppHostedMediaConfig(), nil +} +// GetBlob gets the blob property value. The media configuration blob generated by smart media agent. +func (m *AppHostedMediaConfig) GetBlob()(*string) { + return m.blob +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppHostedMediaConfig) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MediaConfig.GetFieldDeserializers() + res["blob"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlob(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AppHostedMediaConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MediaConfig.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("blob", m.GetBlob()) + if err != nil { + return err + } + } + return nil +} +// SetBlob sets the blob property value. The media configuration blob generated by smart media agent. +func (m *AppHostedMediaConfig) SetBlob(value *string)() { + m.blob = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_hosted_media_configable.go b/src/internal/connector/graph/betasdk/models/app_hosted_media_configable.go new file mode 100644 index 000000000..3141dd2c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_hosted_media_configable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppHostedMediaConfigable +type AppHostedMediaConfigable interface { + MediaConfigable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlob()(*string) + SetBlob(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_identity.go b/src/internal/connector/graph/betasdk/models/app_identity.go new file mode 100644 index 000000000..bffa1a3e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_identity.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppIdentity +type AppIdentity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Refers to the unique identifier representing Application Id in the Azure Active Directory. + appId *string + // Refers to the Application Name displayed in the Azure Portal. + displayName *string + // The OdataType property + odataType *string + // Refers to the unique identifier indicating Service Principal Id in Azure Active Directory for the corresponding App. + servicePrincipalId *string + // Refers to the Service Principal Name is the Application name in the tenant. + servicePrincipalName *string +} +// NewAppIdentity instantiates a new appIdentity and sets the default values. +func NewAppIdentity()(*AppIdentity) { + m := &AppIdentity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppIdentity(), 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 *AppIdentity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. Refers to the unique identifier representing Application Id in the Azure Active Directory. +func (m *AppIdentity) GetAppId()(*string) { + return m.appId +} +// GetDisplayName gets the displayName property value. Refers to the Application Name displayed in the Azure Portal. +func (m *AppIdentity) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["servicePrincipalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalId(val) + } + return nil + } + res["servicePrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppIdentity) GetOdataType()(*string) { + return m.odataType +} +// GetServicePrincipalId gets the servicePrincipalId property value. Refers to the unique identifier indicating Service Principal Id in Azure Active Directory for the corresponding App. +func (m *AppIdentity) GetServicePrincipalId()(*string) { + return m.servicePrincipalId +} +// GetServicePrincipalName gets the servicePrincipalName property value. Refers to the Service Principal Name is the Application name in the tenant. +func (m *AppIdentity) GetServicePrincipalName()(*string) { + return m.servicePrincipalName +} +// Serialize serializes information the current object +func (m *AppIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePrincipalId", m.GetServicePrincipalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePrincipalName", m.GetServicePrincipalName()) + 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 *AppIdentity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. Refers to the unique identifier representing Application Id in the Azure Active Directory. +func (m *AppIdentity) SetAppId(value *string)() { + m.appId = value +} +// SetDisplayName sets the displayName property value. Refers to the Application Name displayed in the Azure Portal. +func (m *AppIdentity) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppIdentity) SetOdataType(value *string)() { + m.odataType = value +} +// SetServicePrincipalId sets the servicePrincipalId property value. Refers to the unique identifier indicating Service Principal Id in Azure Active Directory for the corresponding App. +func (m *AppIdentity) SetServicePrincipalId(value *string)() { + m.servicePrincipalId = value +} +// SetServicePrincipalName sets the servicePrincipalName property value. Refers to the Service Principal Name is the Application name in the tenant. +func (m *AppIdentity) SetServicePrincipalName(value *string)() { + m.servicePrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_identityable.go b/src/internal/connector/graph/betasdk/models/app_identityable.go new file mode 100644 index 000000000..addfa0cc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_identityable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppIdentityable +type AppIdentityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + GetServicePrincipalId()(*string) + GetServicePrincipalName()(*string) + SetAppId(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetServicePrincipalId(value *string)() + SetServicePrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_install_control_type.go b/src/internal/connector/graph/betasdk/models/app_install_control_type.go new file mode 100644 index 000000000..e782c84e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_install_control_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppInstallControlType int + +const ( + // Not configured + NOTCONFIGURED_APPINSTALLCONTROLTYPE AppInstallControlType = iota + // Turn off app recommendations + ANYWHERE_APPINSTALLCONTROLTYPE + // Allow apps from Store only + STOREONLY_APPINSTALLCONTROLTYPE + // Show me app recommendations + RECOMMENDATIONS_APPINSTALLCONTROLTYPE + // Warn me before installing apps from outside the Store + PREFERSTORE_APPINSTALLCONTROLTYPE +) + +func (i AppInstallControlType) String() string { + return []string{"notConfigured", "anywhere", "storeOnly", "recommendations", "preferStore"}[i] +} +func ParseAppInstallControlType(v string) (interface{}, error) { + result := NOTCONFIGURED_APPINSTALLCONTROLTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_APPINSTALLCONTROLTYPE + case "anywhere": + result = ANYWHERE_APPINSTALLCONTROLTYPE + case "storeOnly": + result = STOREONLY_APPINSTALLCONTROLTYPE + case "recommendations": + result = RECOMMENDATIONS_APPINSTALLCONTROLTYPE + case "preferStore": + result = PREFERSTORE_APPINSTALLCONTROLTYPE + default: + return 0, errors.New("Unknown AppInstallControlType value: " + v) + } + return &result, nil +} +func SerializeAppInstallControlType(values []AppInstallControlType) []string { + 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/app_key_credential_restriction_type.go b/src/internal/connector/graph/betasdk/models/app_key_credential_restriction_type.go new file mode 100644 index 000000000..dbdb8bada --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_key_credential_restriction_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppKeyCredentialRestrictionType int + +const ( + ASYMMETRICKEYLIFETIME_APPKEYCREDENTIALRESTRICTIONTYPE AppKeyCredentialRestrictionType = iota + UNKNOWNFUTUREVALUE_APPKEYCREDENTIALRESTRICTIONTYPE +) + +func (i AppKeyCredentialRestrictionType) String() string { + return []string{"asymmetricKeyLifetime", "unknownFutureValue"}[i] +} +func ParseAppKeyCredentialRestrictionType(v string) (interface{}, error) { + result := ASYMMETRICKEYLIFETIME_APPKEYCREDENTIALRESTRICTIONTYPE + switch v { + case "asymmetricKeyLifetime": + result = ASYMMETRICKEYLIFETIME_APPKEYCREDENTIALRESTRICTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPKEYCREDENTIALRESTRICTIONTYPE + default: + return 0, errors.New("Unknown AppKeyCredentialRestrictionType value: " + v) + } + return &result, nil +} +func SerializeAppKeyCredentialRestrictionType(values []AppKeyCredentialRestrictionType) []string { + 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/app_list_item.go b/src/internal/connector/graph/betasdk/models/app_list_item.go new file mode 100644 index 000000000..4931de3a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_list_item.go @@ -0,0 +1,193 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppListItem represents an app in the list of managed applications +type AppListItem 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 application or bundle identifier of the application + appId *string + // The Store URL of the application + appStoreUrl *string + // The application name + name *string + // The OdataType property + odataType *string + // The publisher of the application + publisher *string +} +// NewAppListItem instantiates a new appListItem and sets the default values. +func NewAppListItem()(*AppListItem) { + m := &AppListItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppListItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppListItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.appleAppListItem": + return NewAppleAppListItem(), nil + } + } + } + } + return NewAppListItem(), 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 *AppListItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The application or bundle identifier of the application +func (m *AppListItem) GetAppId()(*string) { + return m.appId +} +// GetAppStoreUrl gets the appStoreUrl property value. The Store URL of the application +func (m *AppListItem) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppListItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + return res +} +// GetName gets the name property value. The application name +func (m *AppListItem) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppListItem) GetOdataType()(*string) { + return m.odataType +} +// GetPublisher gets the publisher property value. The publisher of the application +func (m *AppListItem) GetPublisher()(*string) { + return m.publisher +} +// Serialize serializes information the current object +func (m *AppListItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publisher", m.GetPublisher()) + 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 *AppListItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The application or bundle identifier of the application +func (m *AppListItem) SetAppId(value *string)() { + m.appId = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Store URL of the application +func (m *AppListItem) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetName sets the name property value. The application name +func (m *AppListItem) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppListItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublisher sets the publisher property value. The publisher of the application +func (m *AppListItem) SetPublisher(value *string)() { + m.publisher = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_list_item_collection_response.go b/src/internal/connector/graph/betasdk/models/app_list_item_collection_response.go new file mode 100644 index 000000000..8b0b02673 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_list_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppListItemCollectionResponse +type AppListItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppListItemable +} +// NewAppListItemCollectionResponse instantiates a new AppListItemCollectionResponse and sets the default values. +func NewAppListItemCollectionResponse()(*AppListItemCollectionResponse) { + m := &AppListItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppListItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppListItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppListItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppListItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppListItemCollectionResponse) GetValue()([]AppListItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppListItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppListItemCollectionResponse) SetValue(value []AppListItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_list_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_list_item_collection_responseable.go new file mode 100644 index 000000000..94f6285a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_list_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppListItemCollectionResponseable +type AppListItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppListItemable) + SetValue(value []AppListItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_list_itemable.go b/src/internal/connector/graph/betasdk/models/app_list_itemable.go new file mode 100644 index 000000000..382ac50f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_list_itemable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppListItemable +type AppListItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetAppStoreUrl()(*string) + GetName()(*string) + GetOdataType()(*string) + GetPublisher()(*string) + SetAppId(value *string)() + SetAppStoreUrl(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetPublisher(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_list_type.go b/src/internal/connector/graph/betasdk/models/app_list_type.go new file mode 100644 index 000000000..67dccf31d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_list_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppListType int + +const ( + // Default value, no intent. + NONE_APPLISTTYPE AppListType = iota + // The list represents the apps that will be considered compliant (only apps on the list are compliant). + APPSINLISTCOMPLIANT_APPLISTTYPE + // The list represents the apps that will be considered non compliant (all apps are compliant except apps on the list). + APPSNOTINLISTCOMPLIANT_APPLISTTYPE +) + +func (i AppListType) String() string { + return []string{"none", "appsInListCompliant", "appsNotInListCompliant"}[i] +} +func ParseAppListType(v string) (interface{}, error) { + result := NONE_APPLISTTYPE + switch v { + case "none": + result = NONE_APPLISTTYPE + case "appsInListCompliant": + result = APPSINLISTCOMPLIANT_APPLISTTYPE + case "appsNotInListCompliant": + result = APPSNOTINLISTCOMPLIANT_APPLISTTYPE + default: + return 0, errors.New("Unknown AppListType value: " + v) + } + return &result, nil +} +func SerializeAppListType(values []AppListType) []string { + 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/app_locker_application_control_type.go b/src/internal/connector/graph/betasdk/models/app_locker_application_control_type.go new file mode 100644 index 000000000..4af9d1f29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_locker_application_control_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppLockerApplicationControlType int + +const ( + // Device default value, no Application Control type selected. + NOTCONFIGURED_APPLOCKERAPPLICATIONCONTROLTYPE AppLockerApplicationControlType = iota + // Enforce Windows component and store apps. + ENFORCECOMPONENTSANDSTOREAPPS_APPLOCKERAPPLICATIONCONTROLTYPE + // Audit Windows component and store apps. + AUDITCOMPONENTSANDSTOREAPPS_APPLOCKERAPPLICATIONCONTROLTYPE + // Enforce Windows components, store apps and smart locker. + ENFORCECOMPONENTSSTOREAPPSANDSMARTLOCKER_APPLOCKERAPPLICATIONCONTROLTYPE + // Audit Windows components, store apps and smart locker​. + AUDITCOMPONENTSSTOREAPPSANDSMARTLOCKER_APPLOCKERAPPLICATIONCONTROLTYPE +) + +func (i AppLockerApplicationControlType) String() string { + return []string{"notConfigured", "enforceComponentsAndStoreApps", "auditComponentsAndStoreApps", "enforceComponentsStoreAppsAndSmartlocker", "auditComponentsStoreAppsAndSmartlocker"}[i] +} +func ParseAppLockerApplicationControlType(v string) (interface{}, error) { + result := NOTCONFIGURED_APPLOCKERAPPLICATIONCONTROLTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_APPLOCKERAPPLICATIONCONTROLTYPE + case "enforceComponentsAndStoreApps": + result = ENFORCECOMPONENTSANDSTOREAPPS_APPLOCKERAPPLICATIONCONTROLTYPE + case "auditComponentsAndStoreApps": + result = AUDITCOMPONENTSANDSTOREAPPS_APPLOCKERAPPLICATIONCONTROLTYPE + case "enforceComponentsStoreAppsAndSmartlocker": + result = ENFORCECOMPONENTSSTOREAPPSANDSMARTLOCKER_APPLOCKERAPPLICATIONCONTROLTYPE + case "auditComponentsStoreAppsAndSmartlocker": + result = AUDITCOMPONENTSSTOREAPPSANDSMARTLOCKER_APPLOCKERAPPLICATIONCONTROLTYPE + default: + return 0, errors.New("Unknown AppLockerApplicationControlType value: " + v) + } + return &result, nil +} +func SerializeAppLockerApplicationControlType(values []AppLockerApplicationControlType) []string { + 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/app_log_collection_request.go b/src/internal/connector/graph/betasdk/models/app_log_collection_request.go new file mode 100644 index 000000000..f1bba8d81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_log_collection_request.go @@ -0,0 +1,144 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppLogCollectionRequest appLogCollectionRequest Entity. +type AppLogCollectionRequest struct { + Entity + // Time at which the upload log request reached a terminal state + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of log folders. + customLogFolders []string + // Error message if any during the upload process + errorMessage *string + // AppLogUploadStatus + status *AppLogUploadState +} +// NewAppLogCollectionRequest instantiates a new appLogCollectionRequest and sets the default values. +func NewAppLogCollectionRequest()(*AppLogCollectionRequest) { + m := &AppLogCollectionRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateAppLogCollectionRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppLogCollectionRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppLogCollectionRequest(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. Time at which the upload log request reached a terminal state +func (m *AppLogCollectionRequest) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCustomLogFolders gets the customLogFolders property value. List of log folders. +func (m *AppLogCollectionRequest) GetCustomLogFolders()([]string) { + return m.customLogFolders +} +// GetErrorMessage gets the errorMessage property value. Error message if any during the upload process +func (m *AppLogCollectionRequest) GetErrorMessage()(*string) { + return m.errorMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppLogCollectionRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["customLogFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCustomLogFolders(res) + } + return nil + } + res["errorMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppLogUploadState) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AppLogUploadState)) + } + return nil + } + return res +} +// GetStatus gets the status property value. AppLogUploadStatus +func (m *AppLogCollectionRequest) GetStatus()(*AppLogUploadState) { + return m.status +} +// Serialize serializes information the current object +func (m *AppLogCollectionRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + if m.GetCustomLogFolders() != nil { + err = writer.WriteCollectionOfStringValues("customLogFolders", m.GetCustomLogFolders()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorMessage", m.GetErrorMessage()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. Time at which the upload log request reached a terminal state +func (m *AppLogCollectionRequest) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCustomLogFolders sets the customLogFolders property value. List of log folders. +func (m *AppLogCollectionRequest) SetCustomLogFolders(value []string)() { + m.customLogFolders = value +} +// SetErrorMessage sets the errorMessage property value. Error message if any during the upload process +func (m *AppLogCollectionRequest) SetErrorMessage(value *string)() { + m.errorMessage = value +} +// SetStatus sets the status property value. AppLogUploadStatus +func (m *AppLogCollectionRequest) SetStatus(value *AppLogUploadState)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_response.go b/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_response.go new file mode 100644 index 000000000..e04d17865 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppLogCollectionRequestCollectionResponse +type AppLogCollectionRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppLogCollectionRequestable +} +// NewAppLogCollectionRequestCollectionResponse instantiates a new AppLogCollectionRequestCollectionResponse and sets the default values. +func NewAppLogCollectionRequestCollectionResponse()(*AppLogCollectionRequestCollectionResponse) { + m := &AppLogCollectionRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppLogCollectionRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppLogCollectionRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppLogCollectionRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppLogCollectionRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppLogCollectionRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppLogCollectionRequestable, len(val)) + for i, v := range val { + res[i] = v.(AppLogCollectionRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppLogCollectionRequestCollectionResponse) GetValue()([]AppLogCollectionRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppLogCollectionRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppLogCollectionRequestCollectionResponse) SetValue(value []AppLogCollectionRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_responseable.go new file mode 100644 index 000000000..1e51c0848 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_log_collection_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppLogCollectionRequestCollectionResponseable +type AppLogCollectionRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppLogCollectionRequestable) + SetValue(value []AppLogCollectionRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_log_collection_requestable.go b/src/internal/connector/graph/betasdk/models/app_log_collection_requestable.go new file mode 100644 index 000000000..624abb578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_log_collection_requestable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppLogCollectionRequestable +type AppLogCollectionRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomLogFolders()([]string) + GetErrorMessage()(*string) + GetStatus()(*AppLogUploadState) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomLogFolders(value []string)() + SetErrorMessage(value *string)() + SetStatus(value *AppLogUploadState)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_log_upload_state.go b/src/internal/connector/graph/betasdk/models/app_log_upload_state.go new file mode 100644 index 000000000..238aca44e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_log_upload_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppLogUploadState int + +const ( + // Request is waiting to be processed or under processing + PENDING_APPLOGUPLOADSTATE AppLogUploadState = iota + // Request is completed with file uploaded to Azure blob for download. + COMPLETED_APPLOGUPLOADSTATE + // Request finished processing and in error state. + FAILED_APPLOGUPLOADSTATE +) + +func (i AppLogUploadState) String() string { + return []string{"pending", "completed", "failed"}[i] +} +func ParseAppLogUploadState(v string) (interface{}, error) { + result := PENDING_APPLOGUPLOADSTATE + switch v { + case "pending": + result = PENDING_APPLOGUPLOADSTATE + case "completed": + result = COMPLETED_APPLOGUPLOADSTATE + case "failed": + result = FAILED_APPLOGUPLOADSTATE + default: + return 0, errors.New("Unknown AppLogUploadState value: " + v) + } + return &result, nil +} +func SerializeAppLogUploadState(values []AppLogUploadState) []string { + 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/app_management_configuration.go b/src/internal/connector/graph/betasdk/models/app_management_configuration.go new file mode 100644 index 000000000..32d4997a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_configuration.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementConfiguration +type AppManagementConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Collection of keyCredential restrictions settings to be applied to an application or service principal. + keyCredentials []KeyCredentialConfigurationable + // The OdataType property + odataType *string + // Collection of password restrictions settings to be applied to an application or service principal. + passwordCredentials []PasswordCredentialConfigurationable +} +// NewAppManagementConfiguration instantiates a new appManagementConfiguration and sets the default values. +func NewAppManagementConfiguration()(*AppManagementConfiguration) { + m := &AppManagementConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppManagementConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppManagementConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppManagementConfiguration(), 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 *AppManagementConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppManagementConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keyCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyCredentialConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyCredentialConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(KeyCredentialConfigurationable) + } + m.SetKeyCredentials(res) + } + 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["passwordCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordCredentialConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordCredentialConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(PasswordCredentialConfigurationable) + } + m.SetPasswordCredentials(res) + } + return nil + } + return res +} +// GetKeyCredentials gets the keyCredentials property value. Collection of keyCredential restrictions settings to be applied to an application or service principal. +func (m *AppManagementConfiguration) GetKeyCredentials()([]KeyCredentialConfigurationable) { + return m.keyCredentials +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppManagementConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetPasswordCredentials gets the passwordCredentials property value. Collection of password restrictions settings to be applied to an application or service principal. +func (m *AppManagementConfiguration) GetPasswordCredentials()([]PasswordCredentialConfigurationable) { + return m.passwordCredentials +} +// Serialize serializes information the current object +func (m *AppManagementConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetKeyCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKeyCredentials())) + for i, v := range m.GetKeyCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("keyCredentials", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPasswordCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPasswordCredentials())) + for i, v := range m.GetPasswordCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("passwordCredentials", 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 *AppManagementConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKeyCredentials sets the keyCredentials property value. Collection of keyCredential restrictions settings to be applied to an application or service principal. +func (m *AppManagementConfiguration) SetKeyCredentials(value []KeyCredentialConfigurationable)() { + m.keyCredentials = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppManagementConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetPasswordCredentials sets the passwordCredentials property value. Collection of password restrictions settings to be applied to an application or service principal. +func (m *AppManagementConfiguration) SetPasswordCredentials(value []PasswordCredentialConfigurationable)() { + m.passwordCredentials = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_management_configurationable.go b/src/internal/connector/graph/betasdk/models/app_management_configurationable.go new file mode 100644 index 000000000..388802bcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementConfigurationable +type AppManagementConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeyCredentials()([]KeyCredentialConfigurationable) + GetOdataType()(*string) + GetPasswordCredentials()([]PasswordCredentialConfigurationable) + SetKeyCredentials(value []KeyCredentialConfigurationable)() + SetOdataType(value *string)() + SetPasswordCredentials(value []PasswordCredentialConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_management_level.go b/src/internal/connector/graph/betasdk/models/app_management_level.go new file mode 100644 index 000000000..17211b73d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_level.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppManagementLevel int + +const ( + // Unspecified + UNSPECIFIED_APPMANAGEMENTLEVEL AppManagementLevel = iota + // Unmanaged + UNMANAGED_APPMANAGEMENTLEVEL + // MDM + MDM_APPMANAGEMENTLEVEL + // Android Enterprise + ANDROIDENTERPRISE_APPMANAGEMENTLEVEL + // Android Enterprise dedicated devices with Azure AD Shared mode + ANDROIDENTERPRISEDEDICATEDDEVICESWITHAZUREADSHAREDMODE_APPMANAGEMENTLEVEL + // Android Open Source Project (AOSP) devices + ANDROIDOPENSOURCEPROJECTUSERASSOCIATED_APPMANAGEMENTLEVEL + // Android Open Source Project (AOSP) userless devices + ANDROIDOPENSOURCEPROJECTUSERLESS_APPMANAGEMENTLEVEL + // Place holder for evolvable enum + UNKNOWNFUTUREVALUE_APPMANAGEMENTLEVEL +) + +func (i AppManagementLevel) String() string { + return []string{"unspecified", "unmanaged", "mdm", "androidEnterprise", "androidEnterpriseDedicatedDevicesWithAzureAdSharedMode", "androidOpenSourceProjectUserAssociated", "androidOpenSourceProjectUserless", "unknownFutureValue"}[i] +} +func ParseAppManagementLevel(v string) (interface{}, error) { + result := UNSPECIFIED_APPMANAGEMENTLEVEL + switch v { + case "unspecified": + result = UNSPECIFIED_APPMANAGEMENTLEVEL + case "unmanaged": + result = UNMANAGED_APPMANAGEMENTLEVEL + case "mdm": + result = MDM_APPMANAGEMENTLEVEL + case "androidEnterprise": + result = ANDROIDENTERPRISE_APPMANAGEMENTLEVEL + case "androidEnterpriseDedicatedDevicesWithAzureAdSharedMode": + result = ANDROIDENTERPRISEDEDICATEDDEVICESWITHAZUREADSHAREDMODE_APPMANAGEMENTLEVEL + case "androidOpenSourceProjectUserAssociated": + result = ANDROIDOPENSOURCEPROJECTUSERASSOCIATED_APPMANAGEMENTLEVEL + case "androidOpenSourceProjectUserless": + result = ANDROIDOPENSOURCEPROJECTUSERLESS_APPMANAGEMENTLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPMANAGEMENTLEVEL + default: + return 0, errors.New("Unknown AppManagementLevel value: " + v) + } + return &result, nil +} +func SerializeAppManagementLevel(values []AppManagementLevel) []string { + 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/app_management_policy.go b/src/internal/connector/graph/betasdk/models/app_management_policy.go new file mode 100644 index 000000000..a33931674 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_policy.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementPolicy +type AppManagementPolicy struct { + PolicyBase + // The appliesTo property + appliesTo []DirectoryObjectable + // The isEnabled property + isEnabled *bool + // The restrictions property + restrictions AppManagementConfigurationable +} +// NewAppManagementPolicy instantiates a new AppManagementPolicy and sets the default values. +func NewAppManagementPolicy()(*AppManagementPolicy) { + m := &AppManagementPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.appManagementPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppManagementPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppManagementPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppManagementPolicy(), nil +} +// GetAppliesTo gets the appliesTo property value. The appliesTo property +func (m *AppManagementPolicy) GetAppliesTo()([]DirectoryObjectable) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppManagementPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetAppliesTo(res) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["restrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppManagementConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestrictions(val.(AppManagementConfigurationable)) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. The isEnabled property +func (m *AppManagementPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetRestrictions gets the restrictions property value. The restrictions property +func (m *AppManagementPolicy) GetRestrictions()(AppManagementConfigurationable) { + return m.restrictions +} +// Serialize serializes information the current object +func (m *AppManagementPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + if m.GetAppliesTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppliesTo())) + for i, v := range m.GetAppliesTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appliesTo", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("restrictions", m.GetRestrictions()) + if err != nil { + return err + } + } + return nil +} +// SetAppliesTo sets the appliesTo property value. The appliesTo property +func (m *AppManagementPolicy) SetAppliesTo(value []DirectoryObjectable)() { + m.appliesTo = value +} +// SetIsEnabled sets the isEnabled property value. The isEnabled property +func (m *AppManagementPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetRestrictions sets the restrictions property value. The restrictions property +func (m *AppManagementPolicy) SetRestrictions(value AppManagementConfigurationable)() { + m.restrictions = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_management_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/app_management_policy_collection_response.go new file mode 100644 index 000000000..d1aaf6f96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementPolicyCollectionResponse +type AppManagementPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppManagementPolicyable +} +// NewAppManagementPolicyCollectionResponse instantiates a new AppManagementPolicyCollectionResponse and sets the default values. +func NewAppManagementPolicyCollectionResponse()(*AppManagementPolicyCollectionResponse) { + m := &AppManagementPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppManagementPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppManagementPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppManagementPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppManagementPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppManagementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppManagementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AppManagementPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppManagementPolicyCollectionResponse) GetValue()([]AppManagementPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppManagementPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppManagementPolicyCollectionResponse) SetValue(value []AppManagementPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_management_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_management_policy_collection_responseable.go new file mode 100644 index 000000000..414d9fc4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementPolicyCollectionResponseable +type AppManagementPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppManagementPolicyable) + SetValue(value []AppManagementPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_management_policyable.go b/src/internal/connector/graph/betasdk/models/app_management_policyable.go new file mode 100644 index 000000000..d2f421dc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_management_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppManagementPolicyable +type AppManagementPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetAppliesTo()([]DirectoryObjectable) + GetIsEnabled()(*bool) + GetRestrictions()(AppManagementConfigurationable) + SetAppliesTo(value []DirectoryObjectable)() + SetIsEnabled(value *bool)() + SetRestrictions(value AppManagementConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_metadata_entry.go b/src/internal/connector/graph/betasdk/models/app_metadata_entry.go new file mode 100644 index 000000000..109b0d9eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_metadata_entry.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppMetadataEntry +type AppMetadataEntry 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 key property + key *string + // The OdataType property + odataType *string + // The value property + value []byte +} +// NewAppMetadataEntry instantiates a new appMetadataEntry and sets the default values. +func NewAppMetadataEntry()(*AppMetadataEntry) { + m := &AppMetadataEntry{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppMetadataEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppMetadataEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppMetadataEntry(), 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 *AppMetadataEntry) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppMetadataEntry) 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.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetKey gets the key property value. The key property +func (m *AppMetadataEntry) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppMetadataEntry) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The value property +func (m *AppMetadataEntry) GetValue()([]byte) { + return m.value +} +// Serialize serializes information the current object +func (m *AppMetadataEntry) 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.WriteByteArrayValue("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 *AppMetadataEntry) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKey sets the key property value. The key property +func (m *AppMetadataEntry) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppMetadataEntry) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The value property +func (m *AppMetadataEntry) SetValue(value []byte)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_response.go b/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_response.go new file mode 100644 index 000000000..7219cf24f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppMetadataEntryCollectionResponse +type AppMetadataEntryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppMetadataEntryable +} +// NewAppMetadataEntryCollectionResponse instantiates a new AppMetadataEntryCollectionResponse and sets the default values. +func NewAppMetadataEntryCollectionResponse()(*AppMetadataEntryCollectionResponse) { + m := &AppMetadataEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppMetadataEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppMetadataEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppMetadataEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppMetadataEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppMetadataEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppMetadataEntryable, len(val)) + for i, v := range val { + res[i] = v.(AppMetadataEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppMetadataEntryCollectionResponse) GetValue()([]AppMetadataEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppMetadataEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppMetadataEntryCollectionResponse) SetValue(value []AppMetadataEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_responseable.go new file mode 100644 index 000000000..29f866e04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_metadata_entry_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppMetadataEntryCollectionResponseable +type AppMetadataEntryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppMetadataEntryable) + SetValue(value []AppMetadataEntryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_metadata_entryable.go b/src/internal/connector/graph/betasdk/models/app_metadata_entryable.go new file mode 100644 index 000000000..2063a5278 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_metadata_entryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppMetadataEntryable +type AppMetadataEntryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetOdataType()(*string) + GetValue()([]byte) + SetKey(value *string)() + SetOdataType(value *string)() + SetValue(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_role.go b/src/internal/connector/graph/betasdk/models/app_role.go new file mode 100644 index 000000000..be388fcc9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role.go @@ -0,0 +1,258 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRole +type AppRole struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities. + allowedMemberTypes []string + // The description for the app role. This is displayed when the app role is being assigned and, if the app role functions as an application permission, during consent experiences. + description *string + // Display name for the permission that appears in the app role assignment and consent experiences. + displayName *string + // Unique role identifier inside the appRoles collection. When creating a new app role, a new GUID identifier must be provided. + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // When creating or updating an app role, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed. + isEnabled *bool + // The OdataType property + odataType *string + // Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only. + origin *string + // Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. + value *string +} +// NewAppRole instantiates a new appRole and sets the default values. +func NewAppRole()(*AppRole) { + m := &AppRole{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppRole(), 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 *AppRole) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedMemberTypes gets the allowedMemberTypes property value. Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities. +func (m *AppRole) GetAllowedMemberTypes()([]string) { + return m.allowedMemberTypes +} +// GetDescription gets the description property value. The description for the app role. This is displayed when the app role is being assigned and, if the app role functions as an application permission, during consent experiences. +func (m *AppRole) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the permission that appears in the app role assignment and consent experiences. +func (m *AppRole) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedMemberTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedMemberTypes(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["origin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrigin(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 +} +// GetId gets the id property value. Unique role identifier inside the appRoles collection. When creating a new app role, a new GUID identifier must be provided. +func (m *AppRole) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetIsEnabled gets the isEnabled property value. When creating or updating an app role, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed. +func (m *AppRole) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppRole) GetOdataType()(*string) { + return m.odataType +} +// GetOrigin gets the origin property value. Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only. +func (m *AppRole) GetOrigin()(*string) { + return m.origin +} +// GetValue gets the value property value. Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. +func (m *AppRole) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *AppRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedMemberTypes() != nil { + err := writer.WriteCollectionOfStringValues("allowedMemberTypes", m.GetAllowedMemberTypes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("origin", m.GetOrigin()) + 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 *AppRole) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedMemberTypes sets the allowedMemberTypes property value. Specifies whether this app role can be assigned to users and groups (by setting to ['User']), to other application's (by setting to ['Application'], or both (by setting to ['User', 'Application']). App roles supporting assignment to other applications' service principals are also known as application permissions. The 'Application' value is only supported for app roles defined on application entities. +func (m *AppRole) SetAllowedMemberTypes(value []string)() { + m.allowedMemberTypes = value +} +// SetDescription sets the description property value. The description for the app role. This is displayed when the app role is being assigned and, if the app role functions as an application permission, during consent experiences. +func (m *AppRole) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the permission that appears in the app role assignment and consent experiences. +func (m *AppRole) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. Unique role identifier inside the appRoles collection. When creating a new app role, a new GUID identifier must be provided. +func (m *AppRole) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetIsEnabled sets the isEnabled property value. When creating or updating an app role, this must be set to true (which is the default). To delete a role, this must first be set to false. At that point, in a subsequent call, this role may be removed. +func (m *AppRole) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppRole) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrigin sets the origin property value. Specifies if the app role is defined on the application object or on the servicePrincipal entity. Must not be included in any POST or PATCH requests. Read-only. +func (m *AppRole) SetOrigin(value *string)() { + m.origin = value +} +// SetValue sets the value property value. Specifies the value to include in the roles claim in ID tokens and access tokens authenticating an assigned user or service principal. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. +func (m *AppRole) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_assignment.go b/src/internal/connector/graph/betasdk/models/app_role_assignment.go new file mode 100644 index 000000000..e13635034 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_assignment.go @@ -0,0 +1,218 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppRoleAssignment struct { + Entity + // The identifier (id) for the app role which is assigned to the principal. This app role must be exposed in the appRoles property on the resource application's service principal (resourceId). If the resource application has not declared any app roles, a default app role ID of 00000000-0000-0000-0000-000000000000 can be specified to signal that the principal is assigned to the resource app without any specific app roles. Required on create. + appRoleId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + creationTimestamp *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the user, group, or service principal that was granted the app role assignment. Read-only. Supports $filter (eq and startswith). + principalDisplayName *string + // The unique identifier (id) for the user, security group, or service principal being granted the app role. Security groups with dynamic memberships are supported. Required on create. + principalId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The type of the assigned principal. This can either be User, Group, or ServicePrincipal. Read-only. + principalType *string + // The display name of the resource app's service principal to which the assignment is made. + resourceDisplayName *string + // The unique identifier (id) for the resource service principal for which the assignment is made. Required on create. Supports $filter (eq only). + resourceId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewAppRoleAssignment instantiates a new appRoleAssignment and sets the default values. +func NewAppRoleAssignment()(*AppRoleAssignment) { + m := &AppRoleAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateAppRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppRoleAssignment(), nil +} +// GetAppRoleId gets the appRoleId property value. The identifier (id) for the app role which is assigned to the principal. This app role must be exposed in the appRoles property on the resource application's service principal (resourceId). If the resource application has not declared any app roles, a default app role ID of 00000000-0000-0000-0000-000000000000 can be specified to signal that the principal is assigned to the resource app without any specific app roles. Required on create. +func (m *AppRoleAssignment) GetAppRoleId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.appRoleId +} +// GetCreationTimestamp gets the creationTimestamp property value. The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AppRoleAssignment) GetCreationTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationTimestamp +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appRoleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAppRoleId(val) + } + return nil + } + res["creationTimestamp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationTimestamp(val) + } + return nil + } + res["principalDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalDisplayName(val) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + res["principalType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalType(val) + } + return nil + } + res["resourceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceDisplayName(val) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + return res +} +// GetPrincipalDisplayName gets the principalDisplayName property value. The display name of the user, group, or service principal that was granted the app role assignment. Read-only. Supports $filter (eq and startswith). +func (m *AppRoleAssignment) GetPrincipalDisplayName()(*string) { + return m.principalDisplayName +} +// GetPrincipalId gets the principalId property value. The unique identifier (id) for the user, security group, or service principal being granted the app role. Security groups with dynamic memberships are supported. Required on create. +func (m *AppRoleAssignment) GetPrincipalId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.principalId +} +// GetPrincipalType gets the principalType property value. The type of the assigned principal. This can either be User, Group, or ServicePrincipal. Read-only. +func (m *AppRoleAssignment) GetPrincipalType()(*string) { + return m.principalType +} +// GetResourceDisplayName gets the resourceDisplayName property value. The display name of the resource app's service principal to which the assignment is made. +func (m *AppRoleAssignment) GetResourceDisplayName()(*string) { + return m.resourceDisplayName +} +// GetResourceId gets the resourceId property value. The unique identifier (id) for the resource service principal for which the assignment is made. Required on create. Supports $filter (eq only). +func (m *AppRoleAssignment) GetResourceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.resourceId +} +// Serialize serializes information the current object +func (m *AppRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteUUIDValue("appRoleId", m.GetAppRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationTimestamp", m.GetCreationTimestamp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalDisplayName", m.GetPrincipalDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalType", m.GetPrincipalType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceDisplayName", m.GetResourceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetAppRoleId sets the appRoleId property value. The identifier (id) for the app role which is assigned to the principal. This app role must be exposed in the appRoles property on the resource application's service principal (resourceId). If the resource application has not declared any app roles, a default app role ID of 00000000-0000-0000-0000-000000000000 can be specified to signal that the principal is assigned to the resource app without any specific app roles. Required on create. +func (m *AppRoleAssignment) SetAppRoleId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.appRoleId = value +} +// SetCreationTimestamp sets the creationTimestamp property value. The time when the app role assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *AppRoleAssignment) SetCreationTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationTimestamp = value +} +// SetPrincipalDisplayName sets the principalDisplayName property value. The display name of the user, group, or service principal that was granted the app role assignment. Read-only. Supports $filter (eq and startswith). +func (m *AppRoleAssignment) SetPrincipalDisplayName(value *string)() { + m.principalDisplayName = value +} +// SetPrincipalId sets the principalId property value. The unique identifier (id) for the user, security group, or service principal being granted the app role. Security groups with dynamic memberships are supported. Required on create. +func (m *AppRoleAssignment) SetPrincipalId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.principalId = value +} +// SetPrincipalType sets the principalType property value. The type of the assigned principal. This can either be User, Group, or ServicePrincipal. Read-only. +func (m *AppRoleAssignment) SetPrincipalType(value *string)() { + m.principalType = value +} +// SetResourceDisplayName sets the resourceDisplayName property value. The display name of the resource app's service principal to which the assignment is made. +func (m *AppRoleAssignment) SetResourceDisplayName(value *string)() { + m.resourceDisplayName = value +} +// SetResourceId sets the resourceId property value. The unique identifier (id) for the resource service principal for which the assignment is made. Required on create. Supports $filter (eq only). +func (m *AppRoleAssignment) SetResourceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.resourceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_response.go new file mode 100644 index 000000000..800886b38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleAssignmentCollectionResponse +type AppRoleAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppRoleAssignmentable +} +// NewAppRoleAssignmentCollectionResponse instantiates a new AppRoleAssignmentCollectionResponse and sets the default values. +func NewAppRoleAssignmentCollectionResponse()(*AppRoleAssignmentCollectionResponse) { + m := &AppRoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppRoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppRoleAssignmentCollectionResponse) GetValue()([]AppRoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppRoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppRoleAssignmentCollectionResponse) SetValue(value []AppRoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_responseable.go new file mode 100644 index 000000000..0020258df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleAssignmentCollectionResponseable +type AppRoleAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppRoleAssignmentable) + SetValue(value []AppRoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_assignmentable.go b/src/internal/connector/graph/betasdk/models/app_role_assignmentable.go new file mode 100644 index 000000000..befb3ae6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_assignmentable.go @@ -0,0 +1,27 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleAssignmentable +type AppRoleAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppRoleId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCreationTimestamp()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPrincipalDisplayName()(*string) + GetPrincipalId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPrincipalType()(*string) + GetResourceDisplayName()(*string) + GetResourceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetAppRoleId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCreationTimestamp(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPrincipalDisplayName(value *string)() + SetPrincipalId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPrincipalType(value *string)() + SetResourceDisplayName(value *string)() + SetResourceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_collection_response.go b/src/internal/connector/graph/betasdk/models/app_role_collection_response.go new file mode 100644 index 000000000..8acd4dd52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleCollectionResponse +type AppRoleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppRoleable +} +// NewAppRoleCollectionResponse instantiates a new AppRoleCollectionResponse and sets the default values. +func NewAppRoleCollectionResponse()(*AppRoleCollectionResponse) { + m := &AppRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppRoleCollectionResponse) GetValue()([]AppRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppRoleCollectionResponse) SetValue(value []AppRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_role_collection_responseable.go new file mode 100644 index 000000000..47454dd4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_role_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleCollectionResponseable +type AppRoleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppRoleable) + SetValue(value []AppRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_roleable.go b/src/internal/connector/graph/betasdk/models/app_roleable.go new file mode 100644 index 000000000..77761ea13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_roleable.go @@ -0,0 +1,28 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppRoleable +type AppRoleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedMemberTypes()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetOrigin()(*string) + GetValue()(*string) + SetAllowedMemberTypes(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetOrigin(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_scope.go b/src/internal/connector/graph/betasdk/models/app_scope.go new file mode 100644 index 000000000..32ae0d7f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_scope.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppScope +type AppScope struct { + Entity + // Provides the display name of the app-specific resource represented by the app scope. Provided for display purposes since appScopeId is often an immutable, non-human-readable id. This property is read only. + displayName *string + // Describes the type of app-specific resource represented by the app scope. Provided for display purposes, so a user interface can convey to the user the kind of app specific resource represented by the app scope. This property is read only. + type_escaped *string +} +// NewAppScope instantiates a new appScope and sets the default values. +func NewAppScope()(*AppScope) { + m := &AppScope{ + Entity: *NewEntity(), + } + return m +} +// CreateAppScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppScope(), nil +} +// GetDisplayName gets the displayName property value. Provides the display name of the app-specific resource represented by the app scope. Provided for display purposes since appScopeId is often an immutable, non-human-readable id. This property is read only. +func (m *AppScope) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetType gets the type property value. Describes the type of app-specific resource represented by the app scope. Provided for display purposes, so a user interface can convey to the user the kind of app specific resource represented by the app scope. This property is read only. +func (m *AppScope) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AppScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Provides the display name of the app-specific resource represented by the app scope. Provided for display purposes since appScopeId is often an immutable, non-human-readable id. This property is read only. +func (m *AppScope) SetDisplayName(value *string)() { + m.displayName = value +} +// SetType sets the type property value. Describes the type of app-specific resource represented by the app scope. Provided for display purposes, so a user interface can convey to the user the kind of app specific resource represented by the app scope. This property is read only. +func (m *AppScope) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/app_scope_collection_response.go new file mode 100644 index 000000000..b4eb705d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppScopeCollectionResponse +type AppScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppScopeable +} +// NewAppScopeCollectionResponse instantiates a new AppScopeCollectionResponse and sets the default values. +func NewAppScopeCollectionResponse()(*AppScopeCollectionResponse) { + m := &AppScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppScopeable, len(val)) + for i, v := range val { + res[i] = v.(AppScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppScopeCollectionResponse) GetValue()([]AppScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppScopeCollectionResponse) SetValue(value []AppScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_scope_collection_responseable.go new file mode 100644 index 000000000..0dd87fb0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppScopeCollectionResponseable +type AppScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppScopeable) + SetValue(value []AppScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_scopeable.go b/src/internal/connector/graph/betasdk/models/app_scopeable.go new file mode 100644 index 000000000..926aa373a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_scopeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppScopeable +type AppScopeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetType()(*string) + SetDisplayName(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device.go new file mode 100644 index 000000000..86ee644ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityManagedDevice an app vulnerability managed device. +type AppVulnerabilityManagedDevice struct { + Entity + // The device name. + displayName *string + // The created date. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Intune managed device ID. + managedDeviceId *string +} +// NewAppVulnerabilityManagedDevice instantiates a new appVulnerabilityManagedDevice and sets the default values. +func NewAppVulnerabilityManagedDevice()(*AppVulnerabilityManagedDevice) { + m := &AppVulnerabilityManagedDevice{ + Entity: *NewEntity(), + } + return m +} +// CreateAppVulnerabilityManagedDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityManagedDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityManagedDevice(), nil +} +// GetDisplayName gets the displayName property value. The device name. +func (m *AppVulnerabilityManagedDevice) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityManagedDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + return res +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The created date. +func (m *AppVulnerabilityManagedDevice) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. The Intune managed device ID. +func (m *AppVulnerabilityManagedDevice) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// Serialize serializes information the current object +func (m *AppVulnerabilityManagedDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The device name. +func (m *AppVulnerabilityManagedDevice) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The created date. +func (m *AppVulnerabilityManagedDevice) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The Intune managed device ID. +func (m *AppVulnerabilityManagedDevice) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_response.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_response.go new file mode 100644 index 000000000..f009307c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityManagedDeviceCollectionResponse +type AppVulnerabilityManagedDeviceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppVulnerabilityManagedDeviceable +} +// NewAppVulnerabilityManagedDeviceCollectionResponse instantiates a new AppVulnerabilityManagedDeviceCollectionResponse and sets the default values. +func NewAppVulnerabilityManagedDeviceCollectionResponse()(*AppVulnerabilityManagedDeviceCollectionResponse) { + m := &AppVulnerabilityManagedDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppVulnerabilityManagedDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityManagedDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityManagedDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityManagedDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppVulnerabilityManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppVulnerabilityManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(AppVulnerabilityManagedDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppVulnerabilityManagedDeviceCollectionResponse) GetValue()([]AppVulnerabilityManagedDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppVulnerabilityManagedDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppVulnerabilityManagedDeviceCollectionResponse) SetValue(value []AppVulnerabilityManagedDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_responseable.go new file mode 100644 index 000000000..bbfa79fb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_device_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityManagedDeviceCollectionResponseable +type AppVulnerabilityManagedDeviceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppVulnerabilityManagedDeviceable) + SetValue(value []AppVulnerabilityManagedDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_deviceable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_deviceable.go new file mode 100644 index 000000000..bc8179ce5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_managed_deviceable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityManagedDeviceable +type AppVulnerabilityManagedDeviceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + SetDisplayName(value *string)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app.go new file mode 100644 index 000000000..ce83a1a7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityMobileApp an app vulnerability mobile app. +type AppVulnerabilityMobileApp struct { + Entity + // The created date. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The device name. + displayName *string + // The last modified date. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Intune mobile app ID. + mobileAppId *string + // The app type. + mobileAppType *string + // The app version. + version *string +} +// NewAppVulnerabilityMobileApp instantiates a new appVulnerabilityMobileApp and sets the default values. +func NewAppVulnerabilityMobileApp()(*AppVulnerabilityMobileApp) { + m := &AppVulnerabilityMobileApp{ + Entity: *NewEntity(), + } + return m +} +// CreateAppVulnerabilityMobileAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityMobileAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityMobileApp(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The created date. +func (m *AppVulnerabilityMobileApp) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The device name. +func (m *AppVulnerabilityMobileApp) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityMobileApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["mobileAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMobileAppId(val) + } + return nil + } + res["mobileAppType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMobileAppType(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last modified date. +func (m *AppVulnerabilityMobileApp) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMobileAppId gets the mobileAppId property value. The Intune mobile app ID. +func (m *AppVulnerabilityMobileApp) GetMobileAppId()(*string) { + return m.mobileAppId +} +// GetMobileAppType gets the mobileAppType property value. The app type. +func (m *AppVulnerabilityMobileApp) GetMobileAppType()(*string) { + return m.mobileAppType +} +// GetVersion gets the version property value. The app version. +func (m *AppVulnerabilityMobileApp) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *AppVulnerabilityMobileApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mobileAppId", m.GetMobileAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mobileAppType", m.GetMobileAppType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The created date. +func (m *AppVulnerabilityMobileApp) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The device name. +func (m *AppVulnerabilityMobileApp) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last modified date. +func (m *AppVulnerabilityMobileApp) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMobileAppId sets the mobileAppId property value. The Intune mobile app ID. +func (m *AppVulnerabilityMobileApp) SetMobileAppId(value *string)() { + m.mobileAppId = value +} +// SetMobileAppType sets the mobileAppType property value. The app type. +func (m *AppVulnerabilityMobileApp) SetMobileAppType(value *string)() { + m.mobileAppType = value +} +// SetVersion sets the version property value. The app version. +func (m *AppVulnerabilityMobileApp) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_response.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_response.go new file mode 100644 index 000000000..2e4522513 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityMobileAppCollectionResponse +type AppVulnerabilityMobileAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppVulnerabilityMobileAppable +} +// NewAppVulnerabilityMobileAppCollectionResponse instantiates a new AppVulnerabilityMobileAppCollectionResponse and sets the default values. +func NewAppVulnerabilityMobileAppCollectionResponse()(*AppVulnerabilityMobileAppCollectionResponse) { + m := &AppVulnerabilityMobileAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppVulnerabilityMobileAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityMobileAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityMobileAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityMobileAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppVulnerabilityMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppVulnerabilityMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(AppVulnerabilityMobileAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppVulnerabilityMobileAppCollectionResponse) GetValue()([]AppVulnerabilityMobileAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppVulnerabilityMobileAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppVulnerabilityMobileAppCollectionResponse) SetValue(value []AppVulnerabilityMobileAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_responseable.go new file mode 100644 index 000000000..68867aac7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityMobileAppCollectionResponseable +type AppVulnerabilityMobileAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppVulnerabilityMobileAppable) + SetValue(value []AppVulnerabilityMobileAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_appable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_appable.go new file mode 100644 index 000000000..25658a822 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_mobile_appable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityMobileAppable +type AppVulnerabilityMobileAppable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMobileAppId()(*string) + GetMobileAppType()(*string) + GetVersion()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMobileAppId(value *string)() + SetMobileAppType(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_task.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_task.go new file mode 100644 index 000000000..4a583ae0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_task.go @@ -0,0 +1,313 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityTask +type AppVulnerabilityTask struct { + DeviceAppManagementTask + // The app name. + appName *string + // The app publisher. + appPublisher *string + // The app version. + appVersion *string + // Information about the mitigation. + insights *string + // The number of vulnerable devices. + managedDeviceCount *int32 + // The vulnerable managed devices. + managedDevices []AppVulnerabilityManagedDeviceable + // Device app management task mitigation type. + mitigationType *AppVulnerabilityTaskMitigationType + // The number of vulnerable mobile apps. + mobileAppCount *int32 + // The vulnerable mobile apps. + mobileApps []AppVulnerabilityMobileAppable + // The remediation steps. + remediation *string +} +// NewAppVulnerabilityTask instantiates a new AppVulnerabilityTask and sets the default values. +func NewAppVulnerabilityTask()(*AppVulnerabilityTask) { + m := &AppVulnerabilityTask{ + DeviceAppManagementTask: *NewDeviceAppManagementTask(), + } + odataTypeValue := "#microsoft.graph.appVulnerabilityTask"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppVulnerabilityTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityTask(), nil +} +// GetAppName gets the appName property value. The app name. +func (m *AppVulnerabilityTask) GetAppName()(*string) { + return m.appName +} +// GetAppPublisher gets the appPublisher property value. The app publisher. +func (m *AppVulnerabilityTask) GetAppPublisher()(*string) { + return m.appPublisher +} +// GetAppVersion gets the appVersion property value. The app version. +func (m *AppVulnerabilityTask) GetAppVersion()(*string) { + return m.appVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAppManagementTask.GetFieldDeserializers() + res["appName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppName(val) + } + return nil + } + res["appPublisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppPublisher(val) + } + return nil + } + res["appVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppVersion(val) + } + return nil + } + res["insights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInsights(val) + } + return nil + } + res["managedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceCount(val) + } + return nil + } + res["managedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppVulnerabilityManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppVulnerabilityManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(AppVulnerabilityManagedDeviceable) + } + m.SetManagedDevices(res) + } + return nil + } + res["mitigationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppVulnerabilityTaskMitigationType) + if err != nil { + return err + } + if val != nil { + m.SetMitigationType(val.(*AppVulnerabilityTaskMitigationType)) + } + return nil + } + res["mobileAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMobileAppCount(val) + } + return nil + } + res["mobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppVulnerabilityMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppVulnerabilityMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(AppVulnerabilityMobileAppable) + } + m.SetMobileApps(res) + } + return nil + } + res["remediation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediation(val) + } + return nil + } + return res +} +// GetInsights gets the insights property value. Information about the mitigation. +func (m *AppVulnerabilityTask) GetInsights()(*string) { + return m.insights +} +// GetManagedDeviceCount gets the managedDeviceCount property value. The number of vulnerable devices. +func (m *AppVulnerabilityTask) GetManagedDeviceCount()(*int32) { + return m.managedDeviceCount +} +// GetManagedDevices gets the managedDevices property value. The vulnerable managed devices. +func (m *AppVulnerabilityTask) GetManagedDevices()([]AppVulnerabilityManagedDeviceable) { + return m.managedDevices +} +// GetMitigationType gets the mitigationType property value. Device app management task mitigation type. +func (m *AppVulnerabilityTask) GetMitigationType()(*AppVulnerabilityTaskMitigationType) { + return m.mitigationType +} +// GetMobileAppCount gets the mobileAppCount property value. The number of vulnerable mobile apps. +func (m *AppVulnerabilityTask) GetMobileAppCount()(*int32) { + return m.mobileAppCount +} +// GetMobileApps gets the mobileApps property value. The vulnerable mobile apps. +func (m *AppVulnerabilityTask) GetMobileApps()([]AppVulnerabilityMobileAppable) { + return m.mobileApps +} +// GetRemediation gets the remediation property value. The remediation steps. +func (m *AppVulnerabilityTask) GetRemediation()(*string) { + return m.remediation +} +// Serialize serializes information the current object +func (m *AppVulnerabilityTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAppManagementTask.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appName", m.GetAppName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appPublisher", m.GetAppPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appVersion", m.GetAppVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("insights", m.GetInsights()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("managedDeviceCount", m.GetManagedDeviceCount()) + if err != nil { + return err + } + } + if m.GetManagedDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDevices())) + for i, v := range m.GetManagedDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDevices", cast) + if err != nil { + return err + } + } + if m.GetMitigationType() != nil { + cast := (*m.GetMitigationType()).String() + err = writer.WriteStringValue("mitigationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mobileAppCount", m.GetMobileAppCount()) + if err != nil { + return err + } + } + if m.GetMobileApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileApps())) + for i, v := range m.GetMobileApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remediation", m.GetRemediation()) + if err != nil { + return err + } + } + return nil +} +// SetAppName sets the appName property value. The app name. +func (m *AppVulnerabilityTask) SetAppName(value *string)() { + m.appName = value +} +// SetAppPublisher sets the appPublisher property value. The app publisher. +func (m *AppVulnerabilityTask) SetAppPublisher(value *string)() { + m.appPublisher = value +} +// SetAppVersion sets the appVersion property value. The app version. +func (m *AppVulnerabilityTask) SetAppVersion(value *string)() { + m.appVersion = value +} +// SetInsights sets the insights property value. Information about the mitigation. +func (m *AppVulnerabilityTask) SetInsights(value *string)() { + m.insights = value +} +// SetManagedDeviceCount sets the managedDeviceCount property value. The number of vulnerable devices. +func (m *AppVulnerabilityTask) SetManagedDeviceCount(value *int32)() { + m.managedDeviceCount = value +} +// SetManagedDevices sets the managedDevices property value. The vulnerable managed devices. +func (m *AppVulnerabilityTask) SetManagedDevices(value []AppVulnerabilityManagedDeviceable)() { + m.managedDevices = value +} +// SetMitigationType sets the mitigationType property value. Device app management task mitigation type. +func (m *AppVulnerabilityTask) SetMitigationType(value *AppVulnerabilityTaskMitigationType)() { + m.mitigationType = value +} +// SetMobileAppCount sets the mobileAppCount property value. The number of vulnerable mobile apps. +func (m *AppVulnerabilityTask) SetMobileAppCount(value *int32)() { + m.mobileAppCount = value +} +// SetMobileApps sets the mobileApps property value. The vulnerable mobile apps. +func (m *AppVulnerabilityTask) SetMobileApps(value []AppVulnerabilityMobileAppable)() { + m.mobileApps = value +} +// SetRemediation sets the remediation property value. The remediation steps. +func (m *AppVulnerabilityTask) SetRemediation(value *string)() { + m.remediation = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_response.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_response.go new file mode 100644 index 000000000..89c2888d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityTaskCollectionResponse +type AppVulnerabilityTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppVulnerabilityTaskable +} +// NewAppVulnerabilityTaskCollectionResponse instantiates a new AppVulnerabilityTaskCollectionResponse and sets the default values. +func NewAppVulnerabilityTaskCollectionResponse()(*AppVulnerabilityTaskCollectionResponse) { + m := &AppVulnerabilityTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppVulnerabilityTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppVulnerabilityTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppVulnerabilityTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppVulnerabilityTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppVulnerabilityTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppVulnerabilityTaskable, len(val)) + for i, v := range val { + res[i] = v.(AppVulnerabilityTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppVulnerabilityTaskCollectionResponse) GetValue()([]AppVulnerabilityTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppVulnerabilityTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppVulnerabilityTaskCollectionResponse) SetValue(value []AppVulnerabilityTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_responseable.go new file mode 100644 index 000000000..1d5cd8f8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityTaskCollectionResponseable +type AppVulnerabilityTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppVulnerabilityTaskable) + SetValue(value []AppVulnerabilityTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/app_vulnerability_task_mitigation_type.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_mitigation_type.go new file mode 100644 index 000000000..ac697e238 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_task_mitigation_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppVulnerabilityTaskMitigationType int + +const ( + // Mitigation steps are unknown. + UNKNOWN_APPVULNERABILITYTASKMITIGATIONTYPE AppVulnerabilityTaskMitigationType = iota + // The app needs to be updated. + UPDATE_APPVULNERABILITYTASKMITIGATIONTYPE + // The app needs to be uninstalled. + UNINSTALL_APPVULNERABILITYTASKMITIGATIONTYPE + // The security configuration needs to be changed. + SECURITYCONFIGURATION_APPVULNERABILITYTASKMITIGATIONTYPE +) + +func (i AppVulnerabilityTaskMitigationType) String() string { + return []string{"unknown", "update", "uninstall", "securityConfiguration"}[i] +} +func ParseAppVulnerabilityTaskMitigationType(v string) (interface{}, error) { + result := UNKNOWN_APPVULNERABILITYTASKMITIGATIONTYPE + switch v { + case "unknown": + result = UNKNOWN_APPVULNERABILITYTASKMITIGATIONTYPE + case "update": + result = UPDATE_APPVULNERABILITYTASKMITIGATIONTYPE + case "uninstall": + result = UNINSTALL_APPVULNERABILITYTASKMITIGATIONTYPE + case "securityConfiguration": + result = SECURITYCONFIGURATION_APPVULNERABILITYTASKMITIGATIONTYPE + default: + return 0, errors.New("Unknown AppVulnerabilityTaskMitigationType value: " + v) + } + return &result, nil +} +func SerializeAppVulnerabilityTaskMitigationType(values []AppVulnerabilityTaskMitigationType) []string { + 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/app_vulnerability_taskable.go b/src/internal/connector/graph/betasdk/models/app_vulnerability_taskable.go new file mode 100644 index 000000000..6731b65db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/app_vulnerability_taskable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppVulnerabilityTaskable +type AppVulnerabilityTaskable interface { + DeviceAppManagementTaskable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppName()(*string) + GetAppPublisher()(*string) + GetAppVersion()(*string) + GetInsights()(*string) + GetManagedDeviceCount()(*int32) + GetManagedDevices()([]AppVulnerabilityManagedDeviceable) + GetMitigationType()(*AppVulnerabilityTaskMitigationType) + GetMobileAppCount()(*int32) + GetMobileApps()([]AppVulnerabilityMobileAppable) + GetRemediation()(*string) + SetAppName(value *string)() + SetAppPublisher(value *string)() + SetAppVersion(value *string)() + SetInsights(value *string)() + SetManagedDeviceCount(value *int32)() + SetManagedDevices(value []AppVulnerabilityManagedDeviceable)() + SetMitigationType(value *AppVulnerabilityTaskMitigationType)() + SetMobileAppCount(value *int32)() + SetMobileApps(value []AppVulnerabilityMobileAppable)() + SetRemediation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_app_list_item.go b/src/internal/connector/graph/betasdk/models/apple_app_list_item.go new file mode 100644 index 000000000..b7e37130a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_app_list_item.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleAppListItem +type AppleAppListItem struct { + AppListItem +} +// NewAppleAppListItem instantiates a new AppleAppListItem and sets the default values. +func NewAppleAppListItem()(*AppleAppListItem) { + m := &AppleAppListItem{ + AppListItem: *NewAppListItem(), + } + return m +} +// CreateAppleAppListItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleAppListItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleAppListItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleAppListItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppListItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AppleAppListItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppListItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/apple_app_list_itemable.go b/src/internal/connector/graph/betasdk/models/apple_app_list_itemable.go new file mode 100644 index 000000000..7784986b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_app_list_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleAppListItemable +type AppleAppListItemable interface { + AppListItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/apple_deployment_channel.go b/src/internal/connector/graph/betasdk/models/apple_deployment_channel.go new file mode 100644 index 000000000..1f1244496 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_deployment_channel.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppleDeploymentChannel int + +const ( + // Send payload down over Device Channel. + DEVICECHANNEL_APPLEDEPLOYMENTCHANNEL AppleDeploymentChannel = iota + // Send payload down over User Channel. + USERCHANNEL_APPLEDEPLOYMENTCHANNEL +) + +func (i AppleDeploymentChannel) String() string { + return []string{"deviceChannel", "userChannel"}[i] +} +func ParseAppleDeploymentChannel(v string) (interface{}, error) { + result := DEVICECHANNEL_APPLEDEPLOYMENTCHANNEL + switch v { + case "deviceChannel": + result = DEVICECHANNEL_APPLEDEPLOYMENTCHANNEL + case "userChannel": + result = USERCHANNEL_APPLEDEPLOYMENTCHANNEL + default: + return 0, errors.New("Unknown AppleDeploymentChannel value: " + v) + } + return &result, nil +} +func SerializeAppleDeploymentChannel(values []AppleDeploymentChannel) []string { + 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/apple_device_features_configuration_base.go b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base.go new file mode 100644 index 000000000..43ca162bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleDeviceFeaturesConfigurationBase +type AppleDeviceFeaturesConfigurationBase struct { + DeviceConfiguration + // An array of AirPrint printers that should always be shown. This collection can contain a maximum of 500 elements. + airPrintDestinations []AirPrintDestinationable +} +// NewAppleDeviceFeaturesConfigurationBase instantiates a new AppleDeviceFeaturesConfigurationBase and sets the default values. +func NewAppleDeviceFeaturesConfigurationBase()(*AppleDeviceFeaturesConfigurationBase) { + m := &AppleDeviceFeaturesConfigurationBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.appleDeviceFeaturesConfigurationBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppleDeviceFeaturesConfigurationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleDeviceFeaturesConfigurationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosDeviceFeaturesConfiguration": + return NewIosDeviceFeaturesConfiguration(), nil + case "#microsoft.graph.macOSDeviceFeaturesConfiguration": + return NewMacOSDeviceFeaturesConfiguration(), nil + } + } + } + } + return NewAppleDeviceFeaturesConfigurationBase(), nil +} +// GetAirPrintDestinations gets the airPrintDestinations property value. An array of AirPrint printers that should always be shown. This collection can contain a maximum of 500 elements. +func (m *AppleDeviceFeaturesConfigurationBase) GetAirPrintDestinations()([]AirPrintDestinationable) { + return m.airPrintDestinations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleDeviceFeaturesConfigurationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["airPrintDestinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAirPrintDestinationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AirPrintDestinationable, len(val)) + for i, v := range val { + res[i] = v.(AirPrintDestinationable) + } + m.SetAirPrintDestinations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AppleDeviceFeaturesConfigurationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAirPrintDestinations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAirPrintDestinations())) + for i, v := range m.GetAirPrintDestinations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("airPrintDestinations", cast) + if err != nil { + return err + } + } + return nil +} +// SetAirPrintDestinations sets the airPrintDestinations property value. An array of AirPrint printers that should always be shown. This collection can contain a maximum of 500 elements. +func (m *AppleDeviceFeaturesConfigurationBase) SetAirPrintDestinations(value []AirPrintDestinationable)() { + m.airPrintDestinations = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_response.go new file mode 100644 index 000000000..93532357c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleDeviceFeaturesConfigurationBaseCollectionResponse +type AppleDeviceFeaturesConfigurationBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleDeviceFeaturesConfigurationBaseable +} +// NewAppleDeviceFeaturesConfigurationBaseCollectionResponse instantiates a new AppleDeviceFeaturesConfigurationBaseCollectionResponse and sets the default values. +func NewAppleDeviceFeaturesConfigurationBaseCollectionResponse()(*AppleDeviceFeaturesConfigurationBaseCollectionResponse) { + m := &AppleDeviceFeaturesConfigurationBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleDeviceFeaturesConfigurationBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleDeviceFeaturesConfigurationBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleDeviceFeaturesConfigurationBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleDeviceFeaturesConfigurationBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleDeviceFeaturesConfigurationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleDeviceFeaturesConfigurationBaseable, len(val)) + for i, v := range val { + res[i] = v.(AppleDeviceFeaturesConfigurationBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleDeviceFeaturesConfigurationBaseCollectionResponse) GetValue()([]AppleDeviceFeaturesConfigurationBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleDeviceFeaturesConfigurationBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleDeviceFeaturesConfigurationBaseCollectionResponse) SetValue(value []AppleDeviceFeaturesConfigurationBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_responseable.go new file mode 100644 index 000000000..90289e888 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleDeviceFeaturesConfigurationBaseCollectionResponseable +type AppleDeviceFeaturesConfigurationBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleDeviceFeaturesConfigurationBaseable) + SetValue(value []AppleDeviceFeaturesConfigurationBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_baseable.go b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_baseable.go new file mode 100644 index 000000000..3c332ec82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_device_features_configuration_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleDeviceFeaturesConfigurationBaseable +type AppleDeviceFeaturesConfigurationBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAirPrintDestinations()([]AirPrintDestinationable) + SetAirPrintDestinations(value []AirPrintDestinationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment.go b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment.go new file mode 100644 index 000000000..4e10dc04b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleEnrollmentProfileAssignment an assignment of an Apple profile. +type AppleEnrollmentProfileAssignment struct { + Entity + // The assignment target for the Apple user initiated deployment profile. + target DeviceAndAppManagementAssignmentTargetable +} +// NewAppleEnrollmentProfileAssignment instantiates a new appleEnrollmentProfileAssignment and sets the default values. +func NewAppleEnrollmentProfileAssignment()(*AppleEnrollmentProfileAssignment) { + m := &AppleEnrollmentProfileAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateAppleEnrollmentProfileAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleEnrollmentProfileAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleEnrollmentProfileAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleEnrollmentProfileAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The assignment target for the Apple user initiated deployment profile. +func (m *AppleEnrollmentProfileAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *AppleEnrollmentProfileAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The assignment target for the Apple user initiated deployment profile. +func (m *AppleEnrollmentProfileAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_response.go new file mode 100644 index 000000000..6636e679d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleEnrollmentProfileAssignmentCollectionResponse +type AppleEnrollmentProfileAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleEnrollmentProfileAssignmentable +} +// NewAppleEnrollmentProfileAssignmentCollectionResponse instantiates a new AppleEnrollmentProfileAssignmentCollectionResponse and sets the default values. +func NewAppleEnrollmentProfileAssignmentCollectionResponse()(*AppleEnrollmentProfileAssignmentCollectionResponse) { + m := &AppleEnrollmentProfileAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleEnrollmentProfileAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleEnrollmentProfileAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleEnrollmentProfileAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleEnrollmentProfileAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleEnrollmentProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleEnrollmentProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppleEnrollmentProfileAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleEnrollmentProfileAssignmentCollectionResponse) GetValue()([]AppleEnrollmentProfileAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleEnrollmentProfileAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleEnrollmentProfileAssignmentCollectionResponse) SetValue(value []AppleEnrollmentProfileAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_responseable.go new file mode 100644 index 000000000..af126ce19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleEnrollmentProfileAssignmentCollectionResponseable +type AppleEnrollmentProfileAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleEnrollmentProfileAssignmentable) + SetValue(value []AppleEnrollmentProfileAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignmentable.go b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignmentable.go new file mode 100644 index 000000000..b7c10b32d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_enrollment_profile_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleEnrollmentProfileAssignmentable +type AppleEnrollmentProfileAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base.go b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base.go new file mode 100644 index 000000000..f877da119 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleExpeditedCheckinConfigurationBase +type AppleExpeditedCheckinConfigurationBase struct { + DeviceConfiguration + // Gets or sets whether to enable expedited device check-ins. + enableExpeditedCheckin *bool +} +// NewAppleExpeditedCheckinConfigurationBase instantiates a new AppleExpeditedCheckinConfigurationBase and sets the default values. +func NewAppleExpeditedCheckinConfigurationBase()(*AppleExpeditedCheckinConfigurationBase) { + m := &AppleExpeditedCheckinConfigurationBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.appleExpeditedCheckinConfigurationBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppleExpeditedCheckinConfigurationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleExpeditedCheckinConfigurationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosExpeditedCheckinConfiguration": + return NewIosExpeditedCheckinConfiguration(), nil + } + } + } + } + return NewAppleExpeditedCheckinConfigurationBase(), nil +} +// GetEnableExpeditedCheckin gets the enableExpeditedCheckin property value. Gets or sets whether to enable expedited device check-ins. +func (m *AppleExpeditedCheckinConfigurationBase) GetEnableExpeditedCheckin()(*bool) { + return m.enableExpeditedCheckin +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleExpeditedCheckinConfigurationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["enableExpeditedCheckin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableExpeditedCheckin(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AppleExpeditedCheckinConfigurationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("enableExpeditedCheckin", m.GetEnableExpeditedCheckin()) + if err != nil { + return err + } + } + return nil +} +// SetEnableExpeditedCheckin sets the enableExpeditedCheckin property value. Gets or sets whether to enable expedited device check-ins. +func (m *AppleExpeditedCheckinConfigurationBase) SetEnableExpeditedCheckin(value *bool)() { + m.enableExpeditedCheckin = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_response.go new file mode 100644 index 000000000..aa320545f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleExpeditedCheckinConfigurationBaseCollectionResponse +type AppleExpeditedCheckinConfigurationBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleExpeditedCheckinConfigurationBaseable +} +// NewAppleExpeditedCheckinConfigurationBaseCollectionResponse instantiates a new AppleExpeditedCheckinConfigurationBaseCollectionResponse and sets the default values. +func NewAppleExpeditedCheckinConfigurationBaseCollectionResponse()(*AppleExpeditedCheckinConfigurationBaseCollectionResponse) { + m := &AppleExpeditedCheckinConfigurationBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleExpeditedCheckinConfigurationBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleExpeditedCheckinConfigurationBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleExpeditedCheckinConfigurationBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleExpeditedCheckinConfigurationBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleExpeditedCheckinConfigurationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleExpeditedCheckinConfigurationBaseable, len(val)) + for i, v := range val { + res[i] = v.(AppleExpeditedCheckinConfigurationBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleExpeditedCheckinConfigurationBaseCollectionResponse) GetValue()([]AppleExpeditedCheckinConfigurationBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleExpeditedCheckinConfigurationBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleExpeditedCheckinConfigurationBaseCollectionResponse) SetValue(value []AppleExpeditedCheckinConfigurationBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_responseable.go new file mode 100644 index 000000000..5102e9f00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleExpeditedCheckinConfigurationBaseCollectionResponseable +type AppleExpeditedCheckinConfigurationBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleExpeditedCheckinConfigurationBaseable) + SetValue(value []AppleExpeditedCheckinConfigurationBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_baseable.go b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_baseable.go new file mode 100644 index 000000000..6ac085767 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_expedited_checkin_configuration_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleExpeditedCheckinConfigurationBaseable +type AppleExpeditedCheckinConfigurationBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableExpeditedCheckin()(*bool) + SetEnableExpeditedCheckin(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider.go b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider.go new file mode 100644 index 000000000..ec4538414 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleManagedIdentityProvider +type AppleManagedIdentityProvider struct { + IdentityProviderBase + // The certificate data which is a long string of text from the certificate, can be null. + certificateData *string + // The Apple developer identifier. Required. + developerId *string + // The Apple key identifier. Required. + keyId *string + // The Apple service identifier. Required. + serviceId *string +} +// NewAppleManagedIdentityProvider instantiates a new AppleManagedIdentityProvider and sets the default values. +func NewAppleManagedIdentityProvider()(*AppleManagedIdentityProvider) { + m := &AppleManagedIdentityProvider{ + IdentityProviderBase: *NewIdentityProviderBase(), + } + odataTypeValue := "#microsoft.graph.appleManagedIdentityProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppleManagedIdentityProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleManagedIdentityProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleManagedIdentityProvider(), nil +} +// GetCertificateData gets the certificateData property value. The certificate data which is a long string of text from the certificate, can be null. +func (m *AppleManagedIdentityProvider) GetCertificateData()(*string) { + return m.certificateData +} +// GetDeveloperId gets the developerId property value. The Apple developer identifier. Required. +func (m *AppleManagedIdentityProvider) GetDeveloperId()(*string) { + return m.developerId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleManagedIdentityProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityProviderBase.GetFieldDeserializers() + res["certificateData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateData(val) + } + return nil + } + res["developerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeveloperId(val) + } + return nil + } + res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(val) + } + return nil + } + res["serviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceId(val) + } + return nil + } + return res +} +// GetKeyId gets the keyId property value. The Apple key identifier. Required. +func (m *AppleManagedIdentityProvider) GetKeyId()(*string) { + return m.keyId +} +// GetServiceId gets the serviceId property value. The Apple service identifier. Required. +func (m *AppleManagedIdentityProvider) GetServiceId()(*string) { + return m.serviceId +} +// Serialize serializes information the current object +func (m *AppleManagedIdentityProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityProviderBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificateData", m.GetCertificateData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("developerId", m.GetDeveloperId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("keyId", m.GetKeyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceId", m.GetServiceId()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateData sets the certificateData property value. The certificate data which is a long string of text from the certificate, can be null. +func (m *AppleManagedIdentityProvider) SetCertificateData(value *string)() { + m.certificateData = value +} +// SetDeveloperId sets the developerId property value. The Apple developer identifier. Required. +func (m *AppleManagedIdentityProvider) SetDeveloperId(value *string)() { + m.developerId = value +} +// SetKeyId sets the keyId property value. The Apple key identifier. Required. +func (m *AppleManagedIdentityProvider) SetKeyId(value *string)() { + m.keyId = value +} +// SetServiceId sets the serviceId property value. The Apple service identifier. Required. +func (m *AppleManagedIdentityProvider) SetServiceId(value *string)() { + m.serviceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_response.go new file mode 100644 index 000000000..8992e66bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleManagedIdentityProviderCollectionResponse +type AppleManagedIdentityProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleManagedIdentityProviderable +} +// NewAppleManagedIdentityProviderCollectionResponse instantiates a new AppleManagedIdentityProviderCollectionResponse and sets the default values. +func NewAppleManagedIdentityProviderCollectionResponse()(*AppleManagedIdentityProviderCollectionResponse) { + m := &AppleManagedIdentityProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleManagedIdentityProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleManagedIdentityProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleManagedIdentityProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleManagedIdentityProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleManagedIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleManagedIdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(AppleManagedIdentityProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleManagedIdentityProviderCollectionResponse) GetValue()([]AppleManagedIdentityProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleManagedIdentityProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleManagedIdentityProviderCollectionResponse) SetValue(value []AppleManagedIdentityProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_responseable.go new file mode 100644 index 000000000..53c5b1e3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_managed_identity_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleManagedIdentityProviderCollectionResponseable +type AppleManagedIdentityProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleManagedIdentityProviderable) + SetValue(value []AppleManagedIdentityProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_managed_identity_providerable.go b/src/internal/connector/graph/betasdk/models/apple_managed_identity_providerable.go new file mode 100644 index 000000000..b1eff9a9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_managed_identity_providerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleManagedIdentityProviderable +type AppleManagedIdentityProviderable interface { + IdentityProviderBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateData()(*string) + GetDeveloperId()(*string) + GetKeyId()(*string) + GetServiceId()(*string) + SetCertificateData(value *string)() + SetDeveloperId(value *string)() + SetKeyId(value *string)() + SetServiceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type.go b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type.go new file mode 100644 index 000000000..cfb421d5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleOwnerTypeEnrollmentType +type AppleOwnerTypeEnrollmentType 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 enrollmentType property + enrollmentType *AppleUserInitiatedEnrollmentType + // The OdataType property + odataType *string + // Owner type of device. + ownerType *ManagedDeviceOwnerType +} +// NewAppleOwnerTypeEnrollmentType instantiates a new appleOwnerTypeEnrollmentType and sets the default values. +func NewAppleOwnerTypeEnrollmentType()(*AppleOwnerTypeEnrollmentType) { + m := &AppleOwnerTypeEnrollmentType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppleOwnerTypeEnrollmentTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleOwnerTypeEnrollmentTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleOwnerTypeEnrollmentType(), 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 *AppleOwnerTypeEnrollmentType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnrollmentType gets the enrollmentType property value. The enrollmentType property +func (m *AppleOwnerTypeEnrollmentType) GetEnrollmentType()(*AppleUserInitiatedEnrollmentType) { + return m.enrollmentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleOwnerTypeEnrollmentType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleUserInitiatedEnrollmentType) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentType(val.(*AppleUserInitiatedEnrollmentType)) + } + 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["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedDeviceOwnerType) + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val.(*ManagedDeviceOwnerType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppleOwnerTypeEnrollmentType) GetOdataType()(*string) { + return m.odataType +} +// GetOwnerType gets the ownerType property value. Owner type of device. +func (m *AppleOwnerTypeEnrollmentType) GetOwnerType()(*ManagedDeviceOwnerType) { + return m.ownerType +} +// Serialize serializes information the current object +func (m *AppleOwnerTypeEnrollmentType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnrollmentType() != nil { + cast := (*m.GetEnrollmentType()).String() + err := writer.WriteStringValue("enrollmentType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOwnerType() != nil { + cast := (*m.GetOwnerType()).String() + err := writer.WriteStringValue("ownerType", &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 *AppleOwnerTypeEnrollmentType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnrollmentType sets the enrollmentType property value. The enrollmentType property +func (m *AppleOwnerTypeEnrollmentType) SetEnrollmentType(value *AppleUserInitiatedEnrollmentType)() { + m.enrollmentType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppleOwnerTypeEnrollmentType) SetOdataType(value *string)() { + m.odataType = value +} +// SetOwnerType sets the ownerType property value. Owner type of device. +func (m *AppleOwnerTypeEnrollmentType) SetOwnerType(value *ManagedDeviceOwnerType)() { + m.ownerType = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_response.go new file mode 100644 index 000000000..40b640fa7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleOwnerTypeEnrollmentTypeCollectionResponse +type AppleOwnerTypeEnrollmentTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleOwnerTypeEnrollmentTypeable +} +// NewAppleOwnerTypeEnrollmentTypeCollectionResponse instantiates a new AppleOwnerTypeEnrollmentTypeCollectionResponse and sets the default values. +func NewAppleOwnerTypeEnrollmentTypeCollectionResponse()(*AppleOwnerTypeEnrollmentTypeCollectionResponse) { + m := &AppleOwnerTypeEnrollmentTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleOwnerTypeEnrollmentTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleOwnerTypeEnrollmentTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleOwnerTypeEnrollmentTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleOwnerTypeEnrollmentTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleOwnerTypeEnrollmentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleOwnerTypeEnrollmentTypeable, len(val)) + for i, v := range val { + res[i] = v.(AppleOwnerTypeEnrollmentTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleOwnerTypeEnrollmentTypeCollectionResponse) GetValue()([]AppleOwnerTypeEnrollmentTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleOwnerTypeEnrollmentTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleOwnerTypeEnrollmentTypeCollectionResponse) SetValue(value []AppleOwnerTypeEnrollmentTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_responseable.go new file mode 100644 index 000000000..86bca0a58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleOwnerTypeEnrollmentTypeCollectionResponseable +type AppleOwnerTypeEnrollmentTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleOwnerTypeEnrollmentTypeable) + SetValue(value []AppleOwnerTypeEnrollmentTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_typeable.go b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_typeable.go new file mode 100644 index 000000000..f2bfa6b4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_owner_type_enrollment_typeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleOwnerTypeEnrollmentTypeable +type AppleOwnerTypeEnrollmentTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnrollmentType()(*AppleUserInitiatedEnrollmentType) + GetOdataType()(*string) + GetOwnerType()(*ManagedDeviceOwnerType) + SetEnrollmentType(value *AppleUserInitiatedEnrollmentType)() + SetOdataType(value *string)() + SetOwnerType(value *ManagedDeviceOwnerType)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_push_notification_certificate.go b/src/internal/connector/graph/betasdk/models/apple_push_notification_certificate.go new file mode 100644 index 000000000..a73a6dbdc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_push_notification_certificate.go @@ -0,0 +1,237 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplePushNotificationCertificate +type ApplePushNotificationCertificate struct { + Entity + // Apple Id of the account used to create the MDM push certificate. + appleIdentifier *string + // Not yet documented + certificate *string + // Certificate serial number. This property is read-only. + certificateSerialNumber *string + // The reason the certificate upload failed. + certificateUploadFailureReason *string + // The certificate upload status. + certificateUploadStatus *string + // The expiration date and time for Apple push notification certificate. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Last modified date and time for Apple push notification certificate. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Topic Id. + topicIdentifier *string +} +// NewApplePushNotificationCertificate instantiates a new applePushNotificationCertificate and sets the default values. +func NewApplePushNotificationCertificate()(*ApplePushNotificationCertificate) { + m := &ApplePushNotificationCertificate{ + Entity: *NewEntity(), + } + return m +} +// CreateApplePushNotificationCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplePushNotificationCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplePushNotificationCertificate(), nil +} +// GetAppleIdentifier gets the appleIdentifier property value. Apple Id of the account used to create the MDM push certificate. +func (m *ApplePushNotificationCertificate) GetAppleIdentifier()(*string) { + return m.appleIdentifier +} +// GetCertificate gets the certificate property value. Not yet documented +func (m *ApplePushNotificationCertificate) GetCertificate()(*string) { + return m.certificate +} +// GetCertificateSerialNumber gets the certificateSerialNumber property value. Certificate serial number. This property is read-only. +func (m *ApplePushNotificationCertificate) GetCertificateSerialNumber()(*string) { + return m.certificateSerialNumber +} +// GetCertificateUploadFailureReason gets the certificateUploadFailureReason property value. The reason the certificate upload failed. +func (m *ApplePushNotificationCertificate) GetCertificateUploadFailureReason()(*string) { + return m.certificateUploadFailureReason +} +// GetCertificateUploadStatus gets the certificateUploadStatus property value. The certificate upload status. +func (m *ApplePushNotificationCertificate) GetCertificateUploadStatus()(*string) { + return m.certificateUploadStatus +} +// GetExpirationDateTime gets the expirationDateTime property value. The expiration date and time for Apple push notification certificate. +func (m *ApplePushNotificationCertificate) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplePushNotificationCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appleIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleIdentifier(val) + } + return nil + } + res["certificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificate(val) + } + return nil + } + res["certificateSerialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSerialNumber(val) + } + return nil + } + res["certificateUploadFailureReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateUploadFailureReason(val) + } + return nil + } + res["certificateUploadStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateUploadStatus(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["topicIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTopicIdentifier(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified date and time for Apple push notification certificate. +func (m *ApplePushNotificationCertificate) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetTopicIdentifier gets the topicIdentifier property value. Topic Id. +func (m *ApplePushNotificationCertificate) GetTopicIdentifier()(*string) { + return m.topicIdentifier +} +// Serialize serializes information the current object +func (m *ApplePushNotificationCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appleIdentifier", m.GetAppleIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificate", m.GetCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateUploadFailureReason", m.GetCertificateUploadFailureReason()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateUploadStatus", m.GetCertificateUploadStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("topicIdentifier", m.GetTopicIdentifier()) + if err != nil { + return err + } + } + return nil +} +// SetAppleIdentifier sets the appleIdentifier property value. Apple Id of the account used to create the MDM push certificate. +func (m *ApplePushNotificationCertificate) SetAppleIdentifier(value *string)() { + m.appleIdentifier = value +} +// SetCertificate sets the certificate property value. Not yet documented +func (m *ApplePushNotificationCertificate) SetCertificate(value *string)() { + m.certificate = value +} +// SetCertificateSerialNumber sets the certificateSerialNumber property value. Certificate serial number. This property is read-only. +func (m *ApplePushNotificationCertificate) SetCertificateSerialNumber(value *string)() { + m.certificateSerialNumber = value +} +// SetCertificateUploadFailureReason sets the certificateUploadFailureReason property value. The reason the certificate upload failed. +func (m *ApplePushNotificationCertificate) SetCertificateUploadFailureReason(value *string)() { + m.certificateUploadFailureReason = value +} +// SetCertificateUploadStatus sets the certificateUploadStatus property value. The certificate upload status. +func (m *ApplePushNotificationCertificate) SetCertificateUploadStatus(value *string)() { + m.certificateUploadStatus = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expiration date and time for Apple push notification certificate. +func (m *ApplePushNotificationCertificate) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified date and time for Apple push notification certificate. +func (m *ApplePushNotificationCertificate) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetTopicIdentifier sets the topicIdentifier property value. Topic Id. +func (m *ApplePushNotificationCertificate) SetTopicIdentifier(value *string)() { + m.topicIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_push_notification_certificateable.go b/src/internal/connector/graph/betasdk/models/apple_push_notification_certificateable.go new file mode 100644 index 000000000..45e6c9983 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_push_notification_certificateable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplePushNotificationCertificateable +type ApplePushNotificationCertificateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleIdentifier()(*string) + GetCertificate()(*string) + GetCertificateSerialNumber()(*string) + GetCertificateUploadFailureReason()(*string) + GetCertificateUploadStatus()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTopicIdentifier()(*string) + SetAppleIdentifier(value *string)() + SetCertificate(value *string)() + SetCertificateSerialNumber(value *string)() + SetCertificateUploadFailureReason(value *string)() + SetCertificateUploadStatus(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTopicIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_subject_name_format.go b/src/internal/connector/graph/betasdk/models/apple_subject_name_format.go new file mode 100644 index 000000000..320958450 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_subject_name_format.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppleSubjectNameFormat int + +const ( + // Common name. + COMMONNAME_APPLESUBJECTNAMEFORMAT AppleSubjectNameFormat = iota + // Common name as email. + COMMONNAMEASEMAIL_APPLESUBJECTNAMEFORMAT + // Custom subject name format. + CUSTOM_APPLESUBJECTNAMEFORMAT + // Common Name Including Email. + COMMONNAMEINCLUDINGEMAIL_APPLESUBJECTNAMEFORMAT + // Common Name As IMEI. + COMMONNAMEASIMEI_APPLESUBJECTNAMEFORMAT + // Common Name As Serial Number. + COMMONNAMEASSERIALNUMBER_APPLESUBJECTNAMEFORMAT +) + +func (i AppleSubjectNameFormat) String() string { + return []string{"commonName", "commonNameAsEmail", "custom", "commonNameIncludingEmail", "commonNameAsIMEI", "commonNameAsSerialNumber"}[i] +} +func ParseAppleSubjectNameFormat(v string) (interface{}, error) { + result := COMMONNAME_APPLESUBJECTNAMEFORMAT + switch v { + case "commonName": + result = COMMONNAME_APPLESUBJECTNAMEFORMAT + case "commonNameAsEmail": + result = COMMONNAMEASEMAIL_APPLESUBJECTNAMEFORMAT + case "custom": + result = CUSTOM_APPLESUBJECTNAMEFORMAT + case "commonNameIncludingEmail": + result = COMMONNAMEINCLUDINGEMAIL_APPLESUBJECTNAMEFORMAT + case "commonNameAsIMEI": + result = COMMONNAMEASIMEI_APPLESUBJECTNAMEFORMAT + case "commonNameAsSerialNumber": + result = COMMONNAMEASSERIALNUMBER_APPLESUBJECTNAMEFORMAT + default: + return 0, errors.New("Unknown AppleSubjectNameFormat value: " + v) + } + return &result, nil +} +func SerializeAppleSubjectNameFormat(values []AppleSubjectNameFormat) []string { + 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/apple_user_initiated_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile.go new file mode 100644 index 000000000..e0f93cca7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile.go @@ -0,0 +1,287 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleUserInitiatedEnrollmentProfile the enrollmentProfile resource represents a collection of configurations which must be provided pre-enrollment to enable enrolling certain devices whose identities have been pre-staged. Pre-staged device identities are assigned to this type of profile to apply the profile's configurations at enrollment of the corresponding device. +type AppleUserInitiatedEnrollmentProfile struct { + Entity + // The list of assignments for this profile. + assignments []AppleEnrollmentProfileAssignmentable + // List of available enrollment type options + availableEnrollmentTypeOptions []AppleOwnerTypeEnrollmentTypeable + // Profile creation time + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The defaultEnrollmentType property + defaultEnrollmentType *AppleUserInitiatedEnrollmentType + // Description of the profile + description *string + // Name of the profile + displayName *string + // Profile last modified time + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Supported platform types. + platform *DevicePlatformType + // Priority, 0 is highest + priority *int32 +} +// NewAppleUserInitiatedEnrollmentProfile instantiates a new appleUserInitiatedEnrollmentProfile and sets the default values. +func NewAppleUserInitiatedEnrollmentProfile()(*AppleUserInitiatedEnrollmentProfile) { + m := &AppleUserInitiatedEnrollmentProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateAppleUserInitiatedEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleUserInitiatedEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleUserInitiatedEnrollmentProfile(), nil +} +// GetAssignments gets the assignments property value. The list of assignments for this profile. +func (m *AppleUserInitiatedEnrollmentProfile) GetAssignments()([]AppleEnrollmentProfileAssignmentable) { + return m.assignments +} +// GetAvailableEnrollmentTypeOptions gets the availableEnrollmentTypeOptions property value. List of available enrollment type options +func (m *AppleUserInitiatedEnrollmentProfile) GetAvailableEnrollmentTypeOptions()([]AppleOwnerTypeEnrollmentTypeable) { + return m.availableEnrollmentTypeOptions +} +// GetCreatedDateTime gets the createdDateTime property value. Profile creation time +func (m *AppleUserInitiatedEnrollmentProfile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefaultEnrollmentType gets the defaultEnrollmentType property value. The defaultEnrollmentType property +func (m *AppleUserInitiatedEnrollmentProfile) GetDefaultEnrollmentType()(*AppleUserInitiatedEnrollmentType) { + return m.defaultEnrollmentType +} +// GetDescription gets the description property value. Description of the profile +func (m *AppleUserInitiatedEnrollmentProfile) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the profile +func (m *AppleUserInitiatedEnrollmentProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleUserInitiatedEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleEnrollmentProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleEnrollmentProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppleEnrollmentProfileAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["availableEnrollmentTypeOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleOwnerTypeEnrollmentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleOwnerTypeEnrollmentTypeable, len(val)) + for i, v := range val { + res[i] = v.(AppleOwnerTypeEnrollmentTypeable) + } + m.SetAvailableEnrollmentTypeOptions(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["defaultEnrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleUserInitiatedEnrollmentType) + if err != nil { + return err + } + if val != nil { + m.SetDefaultEnrollmentType(val.(*AppleUserInitiatedEnrollmentType)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*DevicePlatformType)) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Profile last modified time +func (m *AppleUserInitiatedEnrollmentProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPlatform gets the platform property value. Supported platform types. +func (m *AppleUserInitiatedEnrollmentProfile) GetPlatform()(*DevicePlatformType) { + return m.platform +} +// GetPriority gets the priority property value. Priority, 0 is highest +func (m *AppleUserInitiatedEnrollmentProfile) GetPriority()(*int32) { + return m.priority +} +// Serialize serializes information the current object +func (m *AppleUserInitiatedEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetAvailableEnrollmentTypeOptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAvailableEnrollmentTypeOptions())) + for i, v := range m.GetAvailableEnrollmentTypeOptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("availableEnrollmentTypeOptions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDefaultEnrollmentType() != nil { + cast := (*m.GetDefaultEnrollmentType()).String() + err = writer.WriteStringValue("defaultEnrollmentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of assignments for this profile. +func (m *AppleUserInitiatedEnrollmentProfile) SetAssignments(value []AppleEnrollmentProfileAssignmentable)() { + m.assignments = value +} +// SetAvailableEnrollmentTypeOptions sets the availableEnrollmentTypeOptions property value. List of available enrollment type options +func (m *AppleUserInitiatedEnrollmentProfile) SetAvailableEnrollmentTypeOptions(value []AppleOwnerTypeEnrollmentTypeable)() { + m.availableEnrollmentTypeOptions = value +} +// SetCreatedDateTime sets the createdDateTime property value. Profile creation time +func (m *AppleUserInitiatedEnrollmentProfile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefaultEnrollmentType sets the defaultEnrollmentType property value. The defaultEnrollmentType property +func (m *AppleUserInitiatedEnrollmentProfile) SetDefaultEnrollmentType(value *AppleUserInitiatedEnrollmentType)() { + m.defaultEnrollmentType = value +} +// SetDescription sets the description property value. Description of the profile +func (m *AppleUserInitiatedEnrollmentProfile) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the profile +func (m *AppleUserInitiatedEnrollmentProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Profile last modified time +func (m *AppleUserInitiatedEnrollmentProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPlatform sets the platform property value. Supported platform types. +func (m *AppleUserInitiatedEnrollmentProfile) SetPlatform(value *DevicePlatformType)() { + m.platform = value +} +// SetPriority sets the priority property value. Priority, 0 is highest +func (m *AppleUserInitiatedEnrollmentProfile) SetPriority(value *int32)() { + m.priority = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_response.go new file mode 100644 index 000000000..eba8b0f5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleUserInitiatedEnrollmentProfileCollectionResponse +type AppleUserInitiatedEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleUserInitiatedEnrollmentProfileable +} +// NewAppleUserInitiatedEnrollmentProfileCollectionResponse instantiates a new AppleUserInitiatedEnrollmentProfileCollectionResponse and sets the default values. +func NewAppleUserInitiatedEnrollmentProfileCollectionResponse()(*AppleUserInitiatedEnrollmentProfileCollectionResponse) { + m := &AppleUserInitiatedEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleUserInitiatedEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleUserInitiatedEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleUserInitiatedEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleUserInitiatedEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleUserInitiatedEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleUserInitiatedEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AppleUserInitiatedEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleUserInitiatedEnrollmentProfileCollectionResponse) GetValue()([]AppleUserInitiatedEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleUserInitiatedEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleUserInitiatedEnrollmentProfileCollectionResponse) SetValue(value []AppleUserInitiatedEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..477e66de8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleUserInitiatedEnrollmentProfileCollectionResponseable +type AppleUserInitiatedEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleUserInitiatedEnrollmentProfileable) + SetValue(value []AppleUserInitiatedEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profileable.go new file mode 100644 index 000000000..7a94dd5b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_profileable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleUserInitiatedEnrollmentProfileable +type AppleUserInitiatedEnrollmentProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]AppleEnrollmentProfileAssignmentable) + GetAvailableEnrollmentTypeOptions()([]AppleOwnerTypeEnrollmentTypeable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultEnrollmentType()(*AppleUserInitiatedEnrollmentType) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*DevicePlatformType) + GetPriority()(*int32) + SetAssignments(value []AppleEnrollmentProfileAssignmentable)() + SetAvailableEnrollmentTypeOptions(value []AppleOwnerTypeEnrollmentTypeable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultEnrollmentType(value *AppleUserInitiatedEnrollmentType)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *DevicePlatformType)() + SetPriority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_type.go b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_type.go new file mode 100644 index 000000000..401773b45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_user_initiated_enrollment_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppleUserInitiatedEnrollmentType int + +const ( + // Unknown enrollment type + UNKNOWN_APPLEUSERINITIATEDENROLLMENTTYPE AppleUserInitiatedEnrollmentType = iota + // Device enrollment type + DEVICE_APPLEUSERINITIATEDENROLLMENTTYPE + // User enrollment type + USER_APPLEUSERINITIATEDENROLLMENTTYPE +) + +func (i AppleUserInitiatedEnrollmentType) String() string { + return []string{"unknown", "device", "user"}[i] +} +func ParseAppleUserInitiatedEnrollmentType(v string) (interface{}, error) { + result := UNKNOWN_APPLEUSERINITIATEDENROLLMENTTYPE + switch v { + case "unknown": + result = UNKNOWN_APPLEUSERINITIATEDENROLLMENTTYPE + case "device": + result = DEVICE_APPLEUSERINITIATEDENROLLMENTTYPE + case "user": + result = USER_APPLEUSERINITIATEDENROLLMENTTYPE + default: + return 0, errors.New("Unknown AppleUserInitiatedEnrollmentType value: " + v) + } + return &result, nil +} +func SerializeAppleUserInitiatedEnrollmentType(values []AppleUserInitiatedEnrollmentType) []string { + 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/apple_vpn_always_on_configuration.go b/src/internal/connector/graph/betasdk/models/apple_vpn_always_on_configuration.go new file mode 100644 index 000000000..f25017df6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_always_on_configuration.go @@ -0,0 +1,335 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnAlwaysOnConfiguration always On VPN configuration for MacOS and iOS IKEv2 +type AppleVpnAlwaysOnConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Determine whether AirPrint service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. + airPrintExceptionAction *VpnServiceExceptionAction + // Specifies whether traffic from all captive network plugins should be allowed outside the vpn + allowAllCaptiveNetworkPlugins *bool + // Determines whether traffic from the Websheet app is allowed outside of the VPN + allowCaptiveWebSheet *bool + // Determines whether all, some, or no non-native captive networking apps are allowed + allowedCaptiveNetworkPlugins SpecifiedCaptiveNetworkPluginsable + // Determine whether Cellular service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. + cellularExceptionAction *VpnServiceExceptionAction + // Specifies how often in seconds to send a network address translation keepalive package through the VPN + natKeepAliveIntervalInSeconds *int32 + // Enable hardware offloading of NAT keepalive signals when the device is asleep + natKeepAliveOffloadEnable *bool + // The OdataType property + odataType *string + // The type of tunnels that will be present to the VPN client for configuration + tunnelConfiguration *VpnTunnelConfigurationType + // Allow the user to toggle the VPN configuration using the UI + userToggleEnabled *bool + // Determine whether voicemail service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. + voicemailExceptionAction *VpnServiceExceptionAction +} +// NewAppleVpnAlwaysOnConfiguration instantiates a new appleVpnAlwaysOnConfiguration and sets the default values. +func NewAppleVpnAlwaysOnConfiguration()(*AppleVpnAlwaysOnConfiguration) { + m := &AppleVpnAlwaysOnConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppleVpnAlwaysOnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleVpnAlwaysOnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleVpnAlwaysOnConfiguration(), 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 *AppleVpnAlwaysOnConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAirPrintExceptionAction gets the airPrintExceptionAction property value. Determine whether AirPrint service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) GetAirPrintExceptionAction()(*VpnServiceExceptionAction) { + return m.airPrintExceptionAction +} +// GetAllowAllCaptiveNetworkPlugins gets the allowAllCaptiveNetworkPlugins property value. Specifies whether traffic from all captive network plugins should be allowed outside the vpn +func (m *AppleVpnAlwaysOnConfiguration) GetAllowAllCaptiveNetworkPlugins()(*bool) { + return m.allowAllCaptiveNetworkPlugins +} +// GetAllowCaptiveWebSheet gets the allowCaptiveWebSheet property value. Determines whether traffic from the Websheet app is allowed outside of the VPN +func (m *AppleVpnAlwaysOnConfiguration) GetAllowCaptiveWebSheet()(*bool) { + return m.allowCaptiveWebSheet +} +// GetAllowedCaptiveNetworkPlugins gets the allowedCaptiveNetworkPlugins property value. Determines whether all, some, or no non-native captive networking apps are allowed +func (m *AppleVpnAlwaysOnConfiguration) GetAllowedCaptiveNetworkPlugins()(SpecifiedCaptiveNetworkPluginsable) { + return m.allowedCaptiveNetworkPlugins +} +// GetCellularExceptionAction gets the cellularExceptionAction property value. Determine whether Cellular service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) GetCellularExceptionAction()(*VpnServiceExceptionAction) { + return m.cellularExceptionAction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleVpnAlwaysOnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["airPrintExceptionAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnServiceExceptionAction) + if err != nil { + return err + } + if val != nil { + m.SetAirPrintExceptionAction(val.(*VpnServiceExceptionAction)) + } + return nil + } + res["allowAllCaptiveNetworkPlugins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAllCaptiveNetworkPlugins(val) + } + return nil + } + res["allowCaptiveWebSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowCaptiveWebSheet(val) + } + return nil + } + res["allowedCaptiveNetworkPlugins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSpecifiedCaptiveNetworkPluginsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllowedCaptiveNetworkPlugins(val.(SpecifiedCaptiveNetworkPluginsable)) + } + return nil + } + res["cellularExceptionAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnServiceExceptionAction) + if err != nil { + return err + } + if val != nil { + m.SetCellularExceptionAction(val.(*VpnServiceExceptionAction)) + } + return nil + } + res["natKeepAliveIntervalInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNatKeepAliveIntervalInSeconds(val) + } + return nil + } + res["natKeepAliveOffloadEnable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNatKeepAliveOffloadEnable(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["tunnelConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnTunnelConfigurationType) + if err != nil { + return err + } + if val != nil { + m.SetTunnelConfiguration(val.(*VpnTunnelConfigurationType)) + } + return nil + } + res["userToggleEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserToggleEnabled(val) + } + return nil + } + res["voicemailExceptionAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnServiceExceptionAction) + if err != nil { + return err + } + if val != nil { + m.SetVoicemailExceptionAction(val.(*VpnServiceExceptionAction)) + } + return nil + } + return res +} +// GetNatKeepAliveIntervalInSeconds gets the natKeepAliveIntervalInSeconds property value. Specifies how often in seconds to send a network address translation keepalive package through the VPN +func (m *AppleVpnAlwaysOnConfiguration) GetNatKeepAliveIntervalInSeconds()(*int32) { + return m.natKeepAliveIntervalInSeconds +} +// GetNatKeepAliveOffloadEnable gets the natKeepAliveOffloadEnable property value. Enable hardware offloading of NAT keepalive signals when the device is asleep +func (m *AppleVpnAlwaysOnConfiguration) GetNatKeepAliveOffloadEnable()(*bool) { + return m.natKeepAliveOffloadEnable +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppleVpnAlwaysOnConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetTunnelConfiguration gets the tunnelConfiguration property value. The type of tunnels that will be present to the VPN client for configuration +func (m *AppleVpnAlwaysOnConfiguration) GetTunnelConfiguration()(*VpnTunnelConfigurationType) { + return m.tunnelConfiguration +} +// GetUserToggleEnabled gets the userToggleEnabled property value. Allow the user to toggle the VPN configuration using the UI +func (m *AppleVpnAlwaysOnConfiguration) GetUserToggleEnabled()(*bool) { + return m.userToggleEnabled +} +// GetVoicemailExceptionAction gets the voicemailExceptionAction property value. Determine whether voicemail service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) GetVoicemailExceptionAction()(*VpnServiceExceptionAction) { + return m.voicemailExceptionAction +} +// Serialize serializes information the current object +func (m *AppleVpnAlwaysOnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAirPrintExceptionAction() != nil { + cast := (*m.GetAirPrintExceptionAction()).String() + err := writer.WriteStringValue("airPrintExceptionAction", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowAllCaptiveNetworkPlugins", m.GetAllowAllCaptiveNetworkPlugins()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowCaptiveWebSheet", m.GetAllowCaptiveWebSheet()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("allowedCaptiveNetworkPlugins", m.GetAllowedCaptiveNetworkPlugins()) + if err != nil { + return err + } + } + if m.GetCellularExceptionAction() != nil { + cast := (*m.GetCellularExceptionAction()).String() + err := writer.WriteStringValue("cellularExceptionAction", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("natKeepAliveIntervalInSeconds", m.GetNatKeepAliveIntervalInSeconds()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("natKeepAliveOffloadEnable", m.GetNatKeepAliveOffloadEnable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTunnelConfiguration() != nil { + cast := (*m.GetTunnelConfiguration()).String() + err := writer.WriteStringValue("tunnelConfiguration", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("userToggleEnabled", m.GetUserToggleEnabled()) + if err != nil { + return err + } + } + if m.GetVoicemailExceptionAction() != nil { + cast := (*m.GetVoicemailExceptionAction()).String() + err := writer.WriteStringValue("voicemailExceptionAction", &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 *AppleVpnAlwaysOnConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAirPrintExceptionAction sets the airPrintExceptionAction property value. Determine whether AirPrint service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) SetAirPrintExceptionAction(value *VpnServiceExceptionAction)() { + m.airPrintExceptionAction = value +} +// SetAllowAllCaptiveNetworkPlugins sets the allowAllCaptiveNetworkPlugins property value. Specifies whether traffic from all captive network plugins should be allowed outside the vpn +func (m *AppleVpnAlwaysOnConfiguration) SetAllowAllCaptiveNetworkPlugins(value *bool)() { + m.allowAllCaptiveNetworkPlugins = value +} +// SetAllowCaptiveWebSheet sets the allowCaptiveWebSheet property value. Determines whether traffic from the Websheet app is allowed outside of the VPN +func (m *AppleVpnAlwaysOnConfiguration) SetAllowCaptiveWebSheet(value *bool)() { + m.allowCaptiveWebSheet = value +} +// SetAllowedCaptiveNetworkPlugins sets the allowedCaptiveNetworkPlugins property value. Determines whether all, some, or no non-native captive networking apps are allowed +func (m *AppleVpnAlwaysOnConfiguration) SetAllowedCaptiveNetworkPlugins(value SpecifiedCaptiveNetworkPluginsable)() { + m.allowedCaptiveNetworkPlugins = value +} +// SetCellularExceptionAction sets the cellularExceptionAction property value. Determine whether Cellular service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) SetCellularExceptionAction(value *VpnServiceExceptionAction)() { + m.cellularExceptionAction = value +} +// SetNatKeepAliveIntervalInSeconds sets the natKeepAliveIntervalInSeconds property value. Specifies how often in seconds to send a network address translation keepalive package through the VPN +func (m *AppleVpnAlwaysOnConfiguration) SetNatKeepAliveIntervalInSeconds(value *int32)() { + m.natKeepAliveIntervalInSeconds = value +} +// SetNatKeepAliveOffloadEnable sets the natKeepAliveOffloadEnable property value. Enable hardware offloading of NAT keepalive signals when the device is asleep +func (m *AppleVpnAlwaysOnConfiguration) SetNatKeepAliveOffloadEnable(value *bool)() { + m.natKeepAliveOffloadEnable = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppleVpnAlwaysOnConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetTunnelConfiguration sets the tunnelConfiguration property value. The type of tunnels that will be present to the VPN client for configuration +func (m *AppleVpnAlwaysOnConfiguration) SetTunnelConfiguration(value *VpnTunnelConfigurationType)() { + m.tunnelConfiguration = value +} +// SetUserToggleEnabled sets the userToggleEnabled property value. Allow the user to toggle the VPN configuration using the UI +func (m *AppleVpnAlwaysOnConfiguration) SetUserToggleEnabled(value *bool)() { + m.userToggleEnabled = value +} +// SetVoicemailExceptionAction sets the voicemailExceptionAction property value. Determine whether voicemail service will be exempt from the always-on VPN connection. Possible values are: forceTrafficViaVPN, allowTrafficOutside, dropTraffic. +func (m *AppleVpnAlwaysOnConfiguration) SetVoicemailExceptionAction(value *VpnServiceExceptionAction)() { + m.voicemailExceptionAction = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_always_on_configurationable.go b/src/internal/connector/graph/betasdk/models/apple_vpn_always_on_configurationable.go new file mode 100644 index 000000000..ee7d8fc32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_always_on_configurationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnAlwaysOnConfigurationable +type AppleVpnAlwaysOnConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAirPrintExceptionAction()(*VpnServiceExceptionAction) + GetAllowAllCaptiveNetworkPlugins()(*bool) + GetAllowCaptiveWebSheet()(*bool) + GetAllowedCaptiveNetworkPlugins()(SpecifiedCaptiveNetworkPluginsable) + GetCellularExceptionAction()(*VpnServiceExceptionAction) + GetNatKeepAliveIntervalInSeconds()(*int32) + GetNatKeepAliveOffloadEnable()(*bool) + GetOdataType()(*string) + GetTunnelConfiguration()(*VpnTunnelConfigurationType) + GetUserToggleEnabled()(*bool) + GetVoicemailExceptionAction()(*VpnServiceExceptionAction) + SetAirPrintExceptionAction(value *VpnServiceExceptionAction)() + SetAllowAllCaptiveNetworkPlugins(value *bool)() + SetAllowCaptiveWebSheet(value *bool)() + SetAllowedCaptiveNetworkPlugins(value SpecifiedCaptiveNetworkPluginsable)() + SetCellularExceptionAction(value *VpnServiceExceptionAction)() + SetNatKeepAliveIntervalInSeconds(value *int32)() + SetNatKeepAliveOffloadEnable(value *bool)() + SetOdataType(value *string)() + SetTunnelConfiguration(value *VpnTunnelConfigurationType)() + SetUserToggleEnabled(value *bool)() + SetVoicemailExceptionAction(value *VpnServiceExceptionAction)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration.go new file mode 100644 index 000000000..5888b8adc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration.go @@ -0,0 +1,669 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnConfiguration +type AppleVpnConfiguration struct { + DeviceConfiguration + // Associated Domains + associatedDomains []string + // VPN Authentication Method. + authenticationMethod *VpnAuthenticationMethod + // Connection name displayed to the user. + connectionName *string + // Apple VPN connection type. + connectionType *AppleVpnConnectionType + // Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. + customData []KeyValueable + // Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. + customKeyValueData []KeyValuePairable + // Toggle to prevent user from disabling automatic VPN in the Settings app + disableOnDemandUserOverride *bool + // Whether to disconnect after on-demand connection idles + disconnectOnIdle *bool + // The length of time in seconds to wait before disconnecting an on-demand connection. Valid values 0 to 65535 + disconnectOnIdleTimerInSeconds *int32 + // Setting this to true creates Per-App VPN payload which can later be associated with Apps that can trigger this VPN conneciton on the end user's iOS device. + enablePerApp *bool + // Send all network traffic through VPN. + enableSplitTunneling *bool + // Domains that are accessed through the public internet instead of through VPN, even when per-app VPN is activated + excludedDomains []string + // Identifier provided by VPN vendor when connection type is set to Custom VPN. For example: Cisco AnyConnect uses an identifier of the form com.cisco.anyconnect.applevpn.plugin + identifier *string + // Login group or domain when connection type is set to Dell SonicWALL Mobile Connection. + loginGroupOrDomain *string + // On-Demand Rules. This collection can contain a maximum of 500 elements. + onDemandRules []VpnOnDemandRuleable + // Opt-In to sharing the device's Id to third-party vpn clients for use during network access control validation. + optInToDeviceIdSharing *bool + // Provider type for per-app VPN. Possible values are: notConfigured, appProxy, packetTunnel. + providerType *VpnProviderType + // Proxy Server. + proxyServer VpnProxyServerable + // Realm when connection type is set to Pulse Secure. + realm *string + // Role when connection type is set to Pulse Secure. + role *string + // Safari domains when this VPN per App setting is enabled. In addition to the apps associated with this VPN, Safari domains specified here will also be able to trigger this VPN connection. + safariDomains []string + // VPN Server definition. + server VpnServerable +} +// NewAppleVpnConfiguration instantiates a new AppleVpnConfiguration and sets the default values. +func NewAppleVpnConfiguration()(*AppleVpnConfiguration) { + m := &AppleVpnConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.appleVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAppleVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosikEv2VpnConfiguration": + return NewIosikEv2VpnConfiguration(), nil + case "#microsoft.graph.iosVpnConfiguration": + return NewIosVpnConfiguration(), nil + case "#microsoft.graph.macOSVpnConfiguration": + return NewMacOSVpnConfiguration(), nil + } + } + } + } + return NewAppleVpnConfiguration(), nil +} +// GetAssociatedDomains gets the associatedDomains property value. Associated Domains +func (m *AppleVpnConfiguration) GetAssociatedDomains()([]string) { + return m.associatedDomains +} +// GetAuthenticationMethod gets the authenticationMethod property value. VPN Authentication Method. +func (m *AppleVpnConfiguration) GetAuthenticationMethod()(*VpnAuthenticationMethod) { + return m.authenticationMethod +} +// GetConnectionName gets the connectionName property value. Connection name displayed to the user. +func (m *AppleVpnConfiguration) GetConnectionName()(*string) { + return m.connectionName +} +// GetConnectionType gets the connectionType property value. Apple VPN connection type. +func (m *AppleVpnConfiguration) GetConnectionType()(*AppleVpnConnectionType) { + return m.connectionType +} +// GetCustomData gets the customData property value. Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. +func (m *AppleVpnConfiguration) GetCustomData()([]KeyValueable) { + return m.customData +} +// GetCustomKeyValueData gets the customKeyValueData property value. Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. +func (m *AppleVpnConfiguration) GetCustomKeyValueData()([]KeyValuePairable) { + return m.customKeyValueData +} +// GetDisableOnDemandUserOverride gets the disableOnDemandUserOverride property value. Toggle to prevent user from disabling automatic VPN in the Settings app +func (m *AppleVpnConfiguration) GetDisableOnDemandUserOverride()(*bool) { + return m.disableOnDemandUserOverride +} +// GetDisconnectOnIdle gets the disconnectOnIdle property value. Whether to disconnect after on-demand connection idles +func (m *AppleVpnConfiguration) GetDisconnectOnIdle()(*bool) { + return m.disconnectOnIdle +} +// GetDisconnectOnIdleTimerInSeconds gets the disconnectOnIdleTimerInSeconds property value. The length of time in seconds to wait before disconnecting an on-demand connection. Valid values 0 to 65535 +func (m *AppleVpnConfiguration) GetDisconnectOnIdleTimerInSeconds()(*int32) { + return m.disconnectOnIdleTimerInSeconds +} +// GetEnablePerApp gets the enablePerApp property value. Setting this to true creates Per-App VPN payload which can later be associated with Apps that can trigger this VPN conneciton on the end user's iOS device. +func (m *AppleVpnConfiguration) GetEnablePerApp()(*bool) { + return m.enablePerApp +} +// GetEnableSplitTunneling gets the enableSplitTunneling property value. Send all network traffic through VPN. +func (m *AppleVpnConfiguration) GetEnableSplitTunneling()(*bool) { + return m.enableSplitTunneling +} +// GetExcludedDomains gets the excludedDomains property value. Domains that are accessed through the public internet instead of through VPN, even when per-app VPN is activated +func (m *AppleVpnConfiguration) GetExcludedDomains()([]string) { + return m.excludedDomains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["associatedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAssociatedDomains(res) + } + return nil + } + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*VpnAuthenticationMethod)) + } + return nil + } + res["connectionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionName(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleVpnConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*AppleVpnConnectionType)) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetCustomData(res) + } + return nil + } + res["customKeyValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomKeyValueData(res) + } + return nil + } + res["disableOnDemandUserOverride"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableOnDemandUserOverride(val) + } + return nil + } + res["disconnectOnIdle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisconnectOnIdle(val) + } + return nil + } + res["disconnectOnIdleTimerInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDisconnectOnIdleTimerInSeconds(val) + } + return nil + } + res["enablePerApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnablePerApp(val) + } + return nil + } + res["enableSplitTunneling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSplitTunneling(val) + } + return nil + } + res["excludedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludedDomains(res) + } + return nil + } + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + res["loginGroupOrDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoginGroupOrDomain(val) + } + return nil + } + res["onDemandRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVpnOnDemandRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VpnOnDemandRuleable, len(val)) + for i, v := range val { + res[i] = v.(VpnOnDemandRuleable) + } + m.SetOnDemandRules(res) + } + return nil + } + res["optInToDeviceIdSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOptInToDeviceIdSharing(val) + } + return nil + } + res["providerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnProviderType) + if err != nil { + return err + } + if val != nil { + m.SetProviderType(val.(*VpnProviderType)) + } + return nil + } + res["proxyServer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVpnProxyServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProxyServer(val.(VpnProxyServerable)) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["safariDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSafariDomains(res) + } + return nil + } + res["server"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVpnServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetServer(val.(VpnServerable)) + } + return nil + } + return res +} +// GetIdentifier gets the identifier property value. Identifier provided by VPN vendor when connection type is set to Custom VPN. For example: Cisco AnyConnect uses an identifier of the form com.cisco.anyconnect.applevpn.plugin +func (m *AppleVpnConfiguration) GetIdentifier()(*string) { + return m.identifier +} +// GetLoginGroupOrDomain gets the loginGroupOrDomain property value. Login group or domain when connection type is set to Dell SonicWALL Mobile Connection. +func (m *AppleVpnConfiguration) GetLoginGroupOrDomain()(*string) { + return m.loginGroupOrDomain +} +// GetOnDemandRules gets the onDemandRules property value. On-Demand Rules. This collection can contain a maximum of 500 elements. +func (m *AppleVpnConfiguration) GetOnDemandRules()([]VpnOnDemandRuleable) { + return m.onDemandRules +} +// GetOptInToDeviceIdSharing gets the optInToDeviceIdSharing property value. Opt-In to sharing the device's Id to third-party vpn clients for use during network access control validation. +func (m *AppleVpnConfiguration) GetOptInToDeviceIdSharing()(*bool) { + return m.optInToDeviceIdSharing +} +// GetProviderType gets the providerType property value. Provider type for per-app VPN. Possible values are: notConfigured, appProxy, packetTunnel. +func (m *AppleVpnConfiguration) GetProviderType()(*VpnProviderType) { + return m.providerType +} +// GetProxyServer gets the proxyServer property value. Proxy Server. +func (m *AppleVpnConfiguration) GetProxyServer()(VpnProxyServerable) { + return m.proxyServer +} +// GetRealm gets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AppleVpnConfiguration) GetRealm()(*string) { + return m.realm +} +// GetRole gets the role property value. Role when connection type is set to Pulse Secure. +func (m *AppleVpnConfiguration) GetRole()(*string) { + return m.role +} +// GetSafariDomains gets the safariDomains property value. Safari domains when this VPN per App setting is enabled. In addition to the apps associated with this VPN, Safari domains specified here will also be able to trigger this VPN connection. +func (m *AppleVpnConfiguration) GetSafariDomains()([]string) { + return m.safariDomains +} +// GetServer gets the server property value. VPN Server definition. +func (m *AppleVpnConfiguration) GetServer()(VpnServerable) { + return m.server +} +// Serialize serializes information the current object +func (m *AppleVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAssociatedDomains() != nil { + err = writer.WriteCollectionOfStringValues("associatedDomains", m.GetAssociatedDomains()) + if err != nil { + return err + } + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionName", m.GetConnectionName()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err = writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + if m.GetCustomData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomData())) + for i, v := range m.GetCustomData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customData", cast) + if err != nil { + return err + } + } + if m.GetCustomKeyValueData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomKeyValueData())) + for i, v := range m.GetCustomKeyValueData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customKeyValueData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableOnDemandUserOverride", m.GetDisableOnDemandUserOverride()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disconnectOnIdle", m.GetDisconnectOnIdle()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("disconnectOnIdleTimerInSeconds", m.GetDisconnectOnIdleTimerInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enablePerApp", m.GetEnablePerApp()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSplitTunneling", m.GetEnableSplitTunneling()) + if err != nil { + return err + } + } + if m.GetExcludedDomains() != nil { + err = writer.WriteCollectionOfStringValues("excludedDomains", m.GetExcludedDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identifier", m.GetIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("loginGroupOrDomain", m.GetLoginGroupOrDomain()) + if err != nil { + return err + } + } + if m.GetOnDemandRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnDemandRules())) + for i, v := range m.GetOnDemandRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onDemandRules", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("optInToDeviceIdSharing", m.GetOptInToDeviceIdSharing()) + if err != nil { + return err + } + } + if m.GetProviderType() != nil { + cast := (*m.GetProviderType()).String() + err = writer.WriteStringValue("providerType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("proxyServer", m.GetProxyServer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + if m.GetSafariDomains() != nil { + err = writer.WriteCollectionOfStringValues("safariDomains", m.GetSafariDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("server", m.GetServer()) + if err != nil { + return err + } + } + return nil +} +// SetAssociatedDomains sets the associatedDomains property value. Associated Domains +func (m *AppleVpnConfiguration) SetAssociatedDomains(value []string)() { + m.associatedDomains = value +} +// SetAuthenticationMethod sets the authenticationMethod property value. VPN Authentication Method. +func (m *AppleVpnConfiguration) SetAuthenticationMethod(value *VpnAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetConnectionName sets the connectionName property value. Connection name displayed to the user. +func (m *AppleVpnConfiguration) SetConnectionName(value *string)() { + m.connectionName = value +} +// SetConnectionType sets the connectionType property value. Apple VPN connection type. +func (m *AppleVpnConfiguration) SetConnectionType(value *AppleVpnConnectionType)() { + m.connectionType = value +} +// SetCustomData sets the customData property value. Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. +func (m *AppleVpnConfiguration) SetCustomData(value []KeyValueable)() { + m.customData = value +} +// SetCustomKeyValueData sets the customKeyValueData property value. Custom data when connection type is set to Custom VPN. Use this field to enable functionality not supported by Intune, but available in your VPN solution. Contact your VPN vendor to learn how to add these key/value pairs. This collection can contain a maximum of 25 elements. +func (m *AppleVpnConfiguration) SetCustomKeyValueData(value []KeyValuePairable)() { + m.customKeyValueData = value +} +// SetDisableOnDemandUserOverride sets the disableOnDemandUserOverride property value. Toggle to prevent user from disabling automatic VPN in the Settings app +func (m *AppleVpnConfiguration) SetDisableOnDemandUserOverride(value *bool)() { + m.disableOnDemandUserOverride = value +} +// SetDisconnectOnIdle sets the disconnectOnIdle property value. Whether to disconnect after on-demand connection idles +func (m *AppleVpnConfiguration) SetDisconnectOnIdle(value *bool)() { + m.disconnectOnIdle = value +} +// SetDisconnectOnIdleTimerInSeconds sets the disconnectOnIdleTimerInSeconds property value. The length of time in seconds to wait before disconnecting an on-demand connection. Valid values 0 to 65535 +func (m *AppleVpnConfiguration) SetDisconnectOnIdleTimerInSeconds(value *int32)() { + m.disconnectOnIdleTimerInSeconds = value +} +// SetEnablePerApp sets the enablePerApp property value. Setting this to true creates Per-App VPN payload which can later be associated with Apps that can trigger this VPN conneciton on the end user's iOS device. +func (m *AppleVpnConfiguration) SetEnablePerApp(value *bool)() { + m.enablePerApp = value +} +// SetEnableSplitTunneling sets the enableSplitTunneling property value. Send all network traffic through VPN. +func (m *AppleVpnConfiguration) SetEnableSplitTunneling(value *bool)() { + m.enableSplitTunneling = value +} +// SetExcludedDomains sets the excludedDomains property value. Domains that are accessed through the public internet instead of through VPN, even when per-app VPN is activated +func (m *AppleVpnConfiguration) SetExcludedDomains(value []string)() { + m.excludedDomains = value +} +// SetIdentifier sets the identifier property value. Identifier provided by VPN vendor when connection type is set to Custom VPN. For example: Cisco AnyConnect uses an identifier of the form com.cisco.anyconnect.applevpn.plugin +func (m *AppleVpnConfiguration) SetIdentifier(value *string)() { + m.identifier = value +} +// SetLoginGroupOrDomain sets the loginGroupOrDomain property value. Login group or domain when connection type is set to Dell SonicWALL Mobile Connection. +func (m *AppleVpnConfiguration) SetLoginGroupOrDomain(value *string)() { + m.loginGroupOrDomain = value +} +// SetOnDemandRules sets the onDemandRules property value. On-Demand Rules. This collection can contain a maximum of 500 elements. +func (m *AppleVpnConfiguration) SetOnDemandRules(value []VpnOnDemandRuleable)() { + m.onDemandRules = value +} +// SetOptInToDeviceIdSharing sets the optInToDeviceIdSharing property value. Opt-In to sharing the device's Id to third-party vpn clients for use during network access control validation. +func (m *AppleVpnConfiguration) SetOptInToDeviceIdSharing(value *bool)() { + m.optInToDeviceIdSharing = value +} +// SetProviderType sets the providerType property value. Provider type for per-app VPN. Possible values are: notConfigured, appProxy, packetTunnel. +func (m *AppleVpnConfiguration) SetProviderType(value *VpnProviderType)() { + m.providerType = value +} +// SetProxyServer sets the proxyServer property value. Proxy Server. +func (m *AppleVpnConfiguration) SetProxyServer(value VpnProxyServerable)() { + m.proxyServer = value +} +// SetRealm sets the realm property value. Realm when connection type is set to Pulse Secure. +func (m *AppleVpnConfiguration) SetRealm(value *string)() { + m.realm = value +} +// SetRole sets the role property value. Role when connection type is set to Pulse Secure. +func (m *AppleVpnConfiguration) SetRole(value *string)() { + m.role = value +} +// SetSafariDomains sets the safariDomains property value. Safari domains when this VPN per App setting is enabled. In addition to the apps associated with this VPN, Safari domains specified here will also be able to trigger this VPN connection. +func (m *AppleVpnConfiguration) SetSafariDomains(value []string)() { + m.safariDomains = value +} +// SetServer sets the server property value. VPN Server definition. +func (m *AppleVpnConfiguration) SetServer(value VpnServerable)() { + m.server = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_response.go new file mode 100644 index 000000000..6cc719d1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnConfigurationCollectionResponse +type AppleVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleVpnConfigurationable +} +// NewAppleVpnConfigurationCollectionResponse instantiates a new AppleVpnConfigurationCollectionResponse and sets the default values. +func NewAppleVpnConfigurationCollectionResponse()(*AppleVpnConfigurationCollectionResponse) { + m := &AppleVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AppleVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleVpnConfigurationCollectionResponse) GetValue()([]AppleVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleVpnConfigurationCollectionResponse) SetValue(value []AppleVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..42d529c18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnConfigurationCollectionResponseable +type AppleVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleVpnConfigurationable) + SetValue(value []AppleVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/apple_vpn_configurationable.go new file mode 100644 index 000000000..b2c9cd1c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_configurationable.go @@ -0,0 +1,55 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVpnConfigurationable +type AppleVpnConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssociatedDomains()([]string) + GetAuthenticationMethod()(*VpnAuthenticationMethod) + GetConnectionName()(*string) + GetConnectionType()(*AppleVpnConnectionType) + GetCustomData()([]KeyValueable) + GetCustomKeyValueData()([]KeyValuePairable) + GetDisableOnDemandUserOverride()(*bool) + GetDisconnectOnIdle()(*bool) + GetDisconnectOnIdleTimerInSeconds()(*int32) + GetEnablePerApp()(*bool) + GetEnableSplitTunneling()(*bool) + GetExcludedDomains()([]string) + GetIdentifier()(*string) + GetLoginGroupOrDomain()(*string) + GetOnDemandRules()([]VpnOnDemandRuleable) + GetOptInToDeviceIdSharing()(*bool) + GetProviderType()(*VpnProviderType) + GetProxyServer()(VpnProxyServerable) + GetRealm()(*string) + GetRole()(*string) + GetSafariDomains()([]string) + GetServer()(VpnServerable) + SetAssociatedDomains(value []string)() + SetAuthenticationMethod(value *VpnAuthenticationMethod)() + SetConnectionName(value *string)() + SetConnectionType(value *AppleVpnConnectionType)() + SetCustomData(value []KeyValueable)() + SetCustomKeyValueData(value []KeyValuePairable)() + SetDisableOnDemandUserOverride(value *bool)() + SetDisconnectOnIdle(value *bool)() + SetDisconnectOnIdleTimerInSeconds(value *int32)() + SetEnablePerApp(value *bool)() + SetEnableSplitTunneling(value *bool)() + SetExcludedDomains(value []string)() + SetIdentifier(value *string)() + SetLoginGroupOrDomain(value *string)() + SetOnDemandRules(value []VpnOnDemandRuleable)() + SetOptInToDeviceIdSharing(value *bool)() + SetProviderType(value *VpnProviderType)() + SetProxyServer(value VpnProxyServerable)() + SetRealm(value *string)() + SetRole(value *string)() + SetSafariDomains(value []string)() + SetServer(value VpnServerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpn_connection_type.go b/src/internal/connector/graph/betasdk/models/apple_vpn_connection_type.go new file mode 100644 index 000000000..50b413e75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpn_connection_type.go @@ -0,0 +1,104 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppleVpnConnectionType int + +const ( + // Cisco AnyConnect. + CISCOANYCONNECT_APPLEVPNCONNECTIONTYPE AppleVpnConnectionType = iota + // Pulse Secure. + PULSESECURE_APPLEVPNCONNECTIONTYPE + // F5 Edge Client. + F5EDGECLIENT_APPLEVPNCONNECTIONTYPE + // Dell SonicWALL Mobile Connection. + DELLSONICWALLMOBILECONNECT_APPLEVPNCONNECTIONTYPE + // Check Point Capsule VPN. + CHECKPOINTCAPSULEVPN_APPLEVPNCONNECTIONTYPE + // Custom VPN. + CUSTOMVPN_APPLEVPNCONNECTIONTYPE + // Cisco (IPSec). + CISCOIPSEC_APPLEVPNCONNECTIONTYPE + // Citrix. + CITRIX_APPLEVPNCONNECTIONTYPE + // Cisco AnyConnect V2. + CISCOANYCONNECTV2_APPLEVPNCONNECTIONTYPE + // Palo Alto Networks GlobalProtect. + PALOALTOGLOBALPROTECT_APPLEVPNCONNECTIONTYPE + // Zscaler Private Access. + ZSCALERPRIVATEACCESS_APPLEVPNCONNECTIONTYPE + // F5 Access 2018. + F5ACCESS2018_APPLEVPNCONNECTIONTYPE + // Citrix Sso. + CITRIXSSO_APPLEVPNCONNECTIONTYPE + // Palo Alto Networks GlobalProtect V2. + PALOALTOGLOBALPROTECTV2_APPLEVPNCONNECTIONTYPE + // IKEv2. + IKEV2_APPLEVPNCONNECTIONTYPE + // AlwaysOn. + ALWAYSON_APPLEVPNCONNECTIONTYPE + // Microsoft Tunnel. + MICROSOFTTUNNEL_APPLEVPNCONNECTIONTYPE + // NetMotion Mobility. + NETMOTIONMOBILITY_APPLEVPNCONNECTIONTYPE + // Microsoft Protect. + MICROSOFTPROTECT_APPLEVPNCONNECTIONTYPE +) + +func (i AppleVpnConnectionType) String() string { + return []string{"ciscoAnyConnect", "pulseSecure", "f5EdgeClient", "dellSonicWallMobileConnect", "checkPointCapsuleVpn", "customVpn", "ciscoIPSec", "citrix", "ciscoAnyConnectV2", "paloAltoGlobalProtect", "zscalerPrivateAccess", "f5Access2018", "citrixSso", "paloAltoGlobalProtectV2", "ikEv2", "alwaysOn", "microsoftTunnel", "netMotionMobility", "microsoftProtect"}[i] +} +func ParseAppleVpnConnectionType(v string) (interface{}, error) { + result := CISCOANYCONNECT_APPLEVPNCONNECTIONTYPE + switch v { + case "ciscoAnyConnect": + result = CISCOANYCONNECT_APPLEVPNCONNECTIONTYPE + case "pulseSecure": + result = PULSESECURE_APPLEVPNCONNECTIONTYPE + case "f5EdgeClient": + result = F5EDGECLIENT_APPLEVPNCONNECTIONTYPE + case "dellSonicWallMobileConnect": + result = DELLSONICWALLMOBILECONNECT_APPLEVPNCONNECTIONTYPE + case "checkPointCapsuleVpn": + result = CHECKPOINTCAPSULEVPN_APPLEVPNCONNECTIONTYPE + case "customVpn": + result = CUSTOMVPN_APPLEVPNCONNECTIONTYPE + case "ciscoIPSec": + result = CISCOIPSEC_APPLEVPNCONNECTIONTYPE + case "citrix": + result = CITRIX_APPLEVPNCONNECTIONTYPE + case "ciscoAnyConnectV2": + result = CISCOANYCONNECTV2_APPLEVPNCONNECTIONTYPE + case "paloAltoGlobalProtect": + result = PALOALTOGLOBALPROTECT_APPLEVPNCONNECTIONTYPE + case "zscalerPrivateAccess": + result = ZSCALERPRIVATEACCESS_APPLEVPNCONNECTIONTYPE + case "f5Access2018": + result = F5ACCESS2018_APPLEVPNCONNECTIONTYPE + case "citrixSso": + result = CITRIXSSO_APPLEVPNCONNECTIONTYPE + case "paloAltoGlobalProtectV2": + result = PALOALTOGLOBALPROTECTV2_APPLEVPNCONNECTIONTYPE + case "ikEv2": + result = IKEV2_APPLEVPNCONNECTIONTYPE + case "alwaysOn": + result = ALWAYSON_APPLEVPNCONNECTIONTYPE + case "microsoftTunnel": + result = MICROSOFTTUNNEL_APPLEVPNCONNECTIONTYPE + case "netMotionMobility": + result = NETMOTIONMOBILITY_APPLEVPNCONNECTIONTYPE + case "microsoftProtect": + result = MICROSOFTPROTECT_APPLEVPNCONNECTIONTYPE + default: + return 0, errors.New("Unknown AppleVpnConnectionType value: " + v) + } + return &result, nil +} +func SerializeAppleVpnConnectionType(values []AppleVpnConnectionType) []string { + 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/apple_vpp_token_troubleshooting_event.go b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event.go new file mode 100644 index 000000000..a786a0992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVppTokenTroubleshootingEvent +type AppleVppTokenTroubleshootingEvent struct { + DeviceManagementTroubleshootingEvent + // Apple Volume Purchase Program Token Identifier. + tokenId *string +} +// NewAppleVppTokenTroubleshootingEvent instantiates a new AppleVppTokenTroubleshootingEvent and sets the default values. +func NewAppleVppTokenTroubleshootingEvent()(*AppleVppTokenTroubleshootingEvent) { + m := &AppleVppTokenTroubleshootingEvent{ + DeviceManagementTroubleshootingEvent: *NewDeviceManagementTroubleshootingEvent(), + } + return m +} +// CreateAppleVppTokenTroubleshootingEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleVppTokenTroubleshootingEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleVppTokenTroubleshootingEvent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleVppTokenTroubleshootingEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementTroubleshootingEvent.GetFieldDeserializers() + res["tokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenId(val) + } + return nil + } + return res +} +// GetTokenId gets the tokenId property value. Apple Volume Purchase Program Token Identifier. +func (m *AppleVppTokenTroubleshootingEvent) GetTokenId()(*string) { + return m.tokenId +} +// Serialize serializes information the current object +func (m *AppleVppTokenTroubleshootingEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementTroubleshootingEvent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("tokenId", m.GetTokenId()) + if err != nil { + return err + } + } + return nil +} +// SetTokenId sets the tokenId property value. Apple Volume Purchase Program Token Identifier. +func (m *AppleVppTokenTroubleshootingEvent) SetTokenId(value *string)() { + m.tokenId = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_response.go b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_response.go new file mode 100644 index 000000000..a34d000e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVppTokenTroubleshootingEventCollectionResponse +type AppleVppTokenTroubleshootingEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppleVppTokenTroubleshootingEventable +} +// NewAppleVppTokenTroubleshootingEventCollectionResponse instantiates a new AppleVppTokenTroubleshootingEventCollectionResponse and sets the default values. +func NewAppleVppTokenTroubleshootingEventCollectionResponse()(*AppleVppTokenTroubleshootingEventCollectionResponse) { + m := &AppleVppTokenTroubleshootingEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppleVppTokenTroubleshootingEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppleVppTokenTroubleshootingEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppleVppTokenTroubleshootingEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppleVppTokenTroubleshootingEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleVppTokenTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleVppTokenTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(AppleVppTokenTroubleshootingEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppleVppTokenTroubleshootingEventCollectionResponse) GetValue()([]AppleVppTokenTroubleshootingEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppleVppTokenTroubleshootingEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppleVppTokenTroubleshootingEventCollectionResponse) SetValue(value []AppleVppTokenTroubleshootingEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_responseable.go new file mode 100644 index 000000000..dac56760f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVppTokenTroubleshootingEventCollectionResponseable +type AppleVppTokenTroubleshootingEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppleVppTokenTroubleshootingEventable) + SetValue(value []AppleVppTokenTroubleshootingEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_eventable.go b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_eventable.go new file mode 100644 index 000000000..31ae5292f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apple_vpp_token_troubleshooting_eventable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppleVppTokenTroubleshootingEventable +type AppleVppTokenTroubleshootingEventable interface { + DeviceManagementTroubleshootingEventable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTokenId()(*string) + SetTokenId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/application.go b/src/internal/connector/graph/betasdk/models/application.go new file mode 100644 index 000000000..8408ea9cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application.go @@ -0,0 +1,1330 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Application +type Application struct { + DirectoryObject + // Specifies settings for an application that implements a web API. + api ApiApplicationable + // The unique identifier for the application that is assigned by Azure AD. Not nullable. Read-only. Supports $filter (eq). + appId *string + // The appManagementPolicy applied to this application. + appManagementPolicies []AppManagementPolicyable + // The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. + appRoles []AppRoleable + // Specifies the certification status of the application. + certification Certificationable + // The connectorGroup the application is using with Azure AD Application Proxy. Nullable. + connectorGroup ConnectorGroupable + // The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderBy. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Supports $filter (/$count eq 0, /$count ne 0). Read-only. + createdOnBehalfOf DirectoryObjectable + // The default redirect URI. If specified and there is no explicit redirect URI in the sign-in request for SAML and OIDC flows, Azure AD sends the token to this redirect URI. Azure AD also sends the token to this default URI in SAML IdP-initiated single sign-on. The value must match one of the configured redirect URIs for the application. + defaultRedirectUri *string + // Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. + description *string + // Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). + disabledByMicrosoftStatus *string + // The display name for the application. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. + displayName *string + // Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). + extensionProperties []ExtensionPropertyable + // Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). + federatedIdentityCredentials []FederatedIdentityCredentialable + // Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of). + groupMembershipClaims *string + // The homeRealmDiscoveryPolicies property + homeRealmDiscoveryPolicies []HomeRealmDiscoveryPolicyable + // Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). + identifierUris []string + // Basic profile information of the application, such as it's marketing, support, terms of service, and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more information, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). + info InformationalUrlable + // Specifies whether this application supports device authentication without a user. The default is false. + isDeviceOnlyAuthSupported *bool + // Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where the application is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. + isFallbackPublicClient *bool + // The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). + keyCredentials []KeyCredentialable + // The main logo for the application. Not nullable. + logo []byte + // Notes relevant for the management of the application. + notes *string + // Represents the set of properties required for configuring Application Proxy for this application. Configuring these properties allows you to publish your on-premises application for secure remote access. + onPremisesPublishing OnPremisesPublishingable + // Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. + optionalClaims OptionalClaimsable + // Directory objects that are owners of the application. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + owners []DirectoryObjectable + // Specifies parental control settings for an application. + parentalControlSettings ParentalControlSettingsable + // The collection of password credentials associated with the application. Not nullable. + passwordCredentials []PasswordCredentialable + // Specifies settings for installed clients such as desktop or mobile devices. + publicClient PublicClientApplicationable + // The verified publisher domain for the application. Read-only. Supports $filter (eq, ne, ge, le, startsWith). + publisherDomain *string + // Specifies whether this application requires Azure AD to verify the signed authentication requests. + requestSignatureVerification RequestSignatureVerificationable + // Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning mid-October 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). + requiredResourceAccess []RequiredResourceAccessable + // The URL where the service exposes SAML metadata for federation. This property is valid only for single-tenant applications. Nullable. + samlMetadataUrl *string + // References application or service contact information from a Service or Asset Management database. Nullable. + serviceManagementReference *string + // Specifies whether sensitive properties of a multi-tenant application should be locked for editing after the application is provisioned in a tenant. Nullable. null by default. + servicePrincipalLockConfiguration ServicePrincipalLockConfigurationable + // Specifies the Microsoft accounts that are supported for the current application. The possible values are: AzureADMyOrg, AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount (default), and PersonalMicrosoftAccount. See more in the table. The value of this object also limits the number of permissions an app can request. For more information, see Limits on requested permissions per app. The value for this property has implications on other app object properties. As a result, if you change this property, you may need to change other properties first. For more information, see Validation differences for signInAudience.Supports $filter (eq, ne, not). + signInAudience *string + // Specifies settings for a single-page application, including sign out URLs and redirect URIs for authorization codes and access tokens. + spa SpaApplicationable + // The synchronization property + synchronization Synchronizationable + // Custom strings that can be used to categorize and identify the application. Not nullable.Supports $filter (eq, not, ge, le, startsWith). + tags []string + // Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + tokenEncryptionKeyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The tokenIssuancePolicies property + tokenIssuancePolicies []TokenIssuancePolicyable + // The tokenLifetimePolicies assigned to this application. Supports $expand. + tokenLifetimePolicies []TokenLifetimePolicyable + // The unique identifier that can be assigned to an application as an alternative identifier. Immutable. Read-only. + uniqueName *string + // Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification. + verifiedPublisher VerifiedPublisherable + // Specifies settings for a web application. + web WebApplicationable + // Specifies settings for apps running Microsoft Windows and published in the Microsoft Store or Xbox games store. + windows WindowsApplicationable +} +// NewApplication instantiates a new Application and sets the default values. +func NewApplication()(*Application) { + m := &Application{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.application"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplication(), nil +} +// GetApi gets the api property value. Specifies settings for an application that implements a web API. +func (m *Application) GetApi()(ApiApplicationable) { + return m.api +} +// GetAppId gets the appId property value. The unique identifier for the application that is assigned by Azure AD. Not nullable. Read-only. Supports $filter (eq). +func (m *Application) GetAppId()(*string) { + return m.appId +} +// GetAppManagementPolicies gets the appManagementPolicies property value. The appManagementPolicy applied to this application. +func (m *Application) GetAppManagementPolicies()([]AppManagementPolicyable) { + return m.appManagementPolicies +} +// GetAppRoles gets the appRoles property value. The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. +func (m *Application) GetAppRoles()([]AppRoleable) { + return m.appRoles +} +// GetCertification gets the certification property value. Specifies the certification status of the application. +func (m *Application) GetCertification()(Certificationable) { + return m.certification +} +// GetConnectorGroup gets the connectorGroup property value. The connectorGroup the application is using with Azure AD Application Proxy. Nullable. +func (m *Application) GetConnectorGroup()(ConnectorGroupable) { + return m.connectorGroup +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderBy. +func (m *Application) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreatedOnBehalfOf gets the createdOnBehalfOf property value. Supports $filter (/$count eq 0, /$count ne 0). Read-only. +func (m *Application) GetCreatedOnBehalfOf()(DirectoryObjectable) { + return m.createdOnBehalfOf +} +// GetDefaultRedirectUri gets the defaultRedirectUri property value. The default redirect URI. If specified and there is no explicit redirect URI in the sign-in request for SAML and OIDC flows, Azure AD sends the token to this redirect URI. Azure AD also sends the token to this default URI in SAML IdP-initiated single sign-on. The value must match one of the configured redirect URIs for the application. +func (m *Application) GetDefaultRedirectUri()(*string) { + return m.defaultRedirectUri +} +// GetDescription gets the description property value. Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *Application) GetDescription()(*string) { + return m.description +} +// GetDisabledByMicrosoftStatus gets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). +func (m *Application) GetDisabledByMicrosoftStatus()(*string) { + return m.disabledByMicrosoftStatus +} +// GetDisplayName gets the displayName property value. The display name for the application. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Application) GetDisplayName()(*string) { + return m.displayName +} +// GetExtensionProperties gets the extensionProperties property value. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). +func (m *Application) GetExtensionProperties()([]ExtensionPropertyable) { + return m.extensionProperties +} +// GetFederatedIdentityCredentials gets the federatedIdentityCredentials property value. Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). +func (m *Application) GetFederatedIdentityCredentials()([]FederatedIdentityCredentialable) { + return m.federatedIdentityCredentials +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Application) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["api"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApiApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApi(val.(ApiApplicationable)) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["appManagementPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppManagementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppManagementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AppManagementPolicyable) + } + m.SetAppManagementPolicies(res) + } + return nil + } + res["appRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleable) + } + m.SetAppRoles(res) + } + return nil + } + res["certification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCertificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCertification(val.(Certificationable)) + } + return nil + } + res["connectorGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConnectorGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConnectorGroup(val.(ConnectorGroupable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["createdOnBehalfOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedOnBehalfOf(val.(DirectoryObjectable)) + } + return nil + } + res["defaultRedirectUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultRedirectUri(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabledByMicrosoftStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabledByMicrosoftStatus(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["extensionProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtensionPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ExtensionPropertyable) + } + m.SetExtensionProperties(res) + } + return nil + } + res["federatedIdentityCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFederatedIdentityCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FederatedIdentityCredentialable, len(val)) + for i, v := range val { + res[i] = v.(FederatedIdentityCredentialable) + } + m.SetFederatedIdentityCredentials(res) + } + return nil + } + res["groupMembershipClaims"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupMembershipClaims(val) + } + return nil + } + res["homeRealmDiscoveryPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHomeRealmDiscoveryPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HomeRealmDiscoveryPolicyable, len(val)) + for i, v := range val { + res[i] = v.(HomeRealmDiscoveryPolicyable) + } + m.SetHomeRealmDiscoveryPolicies(res) + } + return nil + } + res["identifierUris"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIdentifierUris(res) + } + return nil + } + res["info"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationalUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInfo(val.(InformationalUrlable)) + } + return nil + } + res["isDeviceOnlyAuthSupported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeviceOnlyAuthSupported(val) + } + return nil + } + res["isFallbackPublicClient"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFallbackPublicClient(val) + } + return nil + } + res["keyCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyCredentialable, len(val)) + for i, v := range val { + res[i] = v.(KeyCredentialable) + } + m.SetKeyCredentials(res) + } + return nil + } + res["logo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetLogo(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["onPremisesPublishing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesPublishingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesPublishing(val.(OnPremisesPublishingable)) + } + return nil + } + res["optionalClaims"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOptionalClaimsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOptionalClaims(val.(OptionalClaimsable)) + } + return nil + } + res["owners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetOwners(res) + } + return nil + } + res["parentalControlSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParentalControlSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentalControlSettings(val.(ParentalControlSettingsable)) + } + return nil + } + res["passwordCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordCredentialable, len(val)) + for i, v := range val { + res[i] = v.(PasswordCredentialable) + } + m.SetPasswordCredentials(res) + } + return nil + } + res["publicClient"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicClientApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublicClient(val.(PublicClientApplicationable)) + } + return nil + } + res["publisherDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisherDomain(val) + } + return nil + } + res["requestSignatureVerification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestSignatureVerificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequestSignatureVerification(val.(RequestSignatureVerificationable)) + } + return nil + } + res["requiredResourceAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRequiredResourceAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RequiredResourceAccessable, len(val)) + for i, v := range val { + res[i] = v.(RequiredResourceAccessable) + } + m.SetRequiredResourceAccess(res) + } + return nil + } + res["samlMetadataUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSamlMetadataUrl(val) + } + return nil + } + res["serviceManagementReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceManagementReference(val) + } + return nil + } + res["servicePrincipalLockConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServicePrincipalLockConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalLockConfiguration(val.(ServicePrincipalLockConfigurationable)) + } + return nil + } + res["signInAudience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInAudience(val) + } + return nil + } + res["spa"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSpaApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSpa(val.(SpaApplicationable)) + } + return nil + } + res["synchronization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSynchronizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSynchronization(val.(Synchronizationable)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["tokenEncryptionKeyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenEncryptionKeyId(val) + } + return nil + } + res["tokenIssuancePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTokenIssuancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TokenIssuancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(TokenIssuancePolicyable) + } + m.SetTokenIssuancePolicies(res) + } + return nil + } + res["tokenLifetimePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTokenLifetimePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TokenLifetimePolicyable, len(val)) + for i, v := range val { + res[i] = v.(TokenLifetimePolicyable) + } + m.SetTokenLifetimePolicies(res) + } + return nil + } + res["uniqueName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUniqueName(val) + } + return nil + } + res["verifiedPublisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerifiedPublisherFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerifiedPublisher(val.(VerifiedPublisherable)) + } + return nil + } + res["web"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWebApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWeb(val.(WebApplicationable)) + } + return nil + } + res["windows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindows(val.(WindowsApplicationable)) + } + return nil + } + return res +} +// GetGroupMembershipClaims gets the groupMembershipClaims property value. Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of). +func (m *Application) GetGroupMembershipClaims()(*string) { + return m.groupMembershipClaims +} +// GetHomeRealmDiscoveryPolicies gets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies property +func (m *Application) GetHomeRealmDiscoveryPolicies()([]HomeRealmDiscoveryPolicyable) { + return m.homeRealmDiscoveryPolicies +} +// GetIdentifierUris gets the identifierUris property value. Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). +func (m *Application) GetIdentifierUris()([]string) { + return m.identifierUris +} +// GetInfo gets the info property value. Basic profile information of the application, such as it's marketing, support, terms of service, and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more information, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). +func (m *Application) GetInfo()(InformationalUrlable) { + return m.info +} +// GetIsDeviceOnlyAuthSupported gets the isDeviceOnlyAuthSupported property value. Specifies whether this application supports device authentication without a user. The default is false. +func (m *Application) GetIsDeviceOnlyAuthSupported()(*bool) { + return m.isDeviceOnlyAuthSupported +} +// GetIsFallbackPublicClient gets the isFallbackPublicClient property value. Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where the application is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. +func (m *Application) GetIsFallbackPublicClient()(*bool) { + return m.isFallbackPublicClient +} +// GetKeyCredentials gets the keyCredentials property value. The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Application) GetKeyCredentials()([]KeyCredentialable) { + return m.keyCredentials +} +// GetLogo gets the logo property value. The main logo for the application. Not nullable. +func (m *Application) GetLogo()([]byte) { + return m.logo +} +// GetNotes gets the notes property value. Notes relevant for the management of the application. +func (m *Application) GetNotes()(*string) { + return m.notes +} +// GetOnPremisesPublishing gets the onPremisesPublishing property value. Represents the set of properties required for configuring Application Proxy for this application. Configuring these properties allows you to publish your on-premises application for secure remote access. +func (m *Application) GetOnPremisesPublishing()(OnPremisesPublishingable) { + return m.onPremisesPublishing +} +// GetOptionalClaims gets the optionalClaims property value. Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. +func (m *Application) GetOptionalClaims()(OptionalClaimsable) { + return m.optionalClaims +} +// GetOwners gets the owners property value. Directory objects that are owners of the application. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *Application) GetOwners()([]DirectoryObjectable) { + return m.owners +} +// GetParentalControlSettings gets the parentalControlSettings property value. Specifies parental control settings for an application. +func (m *Application) GetParentalControlSettings()(ParentalControlSettingsable) { + return m.parentalControlSettings +} +// GetPasswordCredentials gets the passwordCredentials property value. The collection of password credentials associated with the application. Not nullable. +func (m *Application) GetPasswordCredentials()([]PasswordCredentialable) { + return m.passwordCredentials +} +// GetPublicClient gets the publicClient property value. Specifies settings for installed clients such as desktop or mobile devices. +func (m *Application) GetPublicClient()(PublicClientApplicationable) { + return m.publicClient +} +// GetPublisherDomain gets the publisherDomain property value. The verified publisher domain for the application. Read-only. Supports $filter (eq, ne, ge, le, startsWith). +func (m *Application) GetPublisherDomain()(*string) { + return m.publisherDomain +} +// GetRequestSignatureVerification gets the requestSignatureVerification property value. Specifies whether this application requires Azure AD to verify the signed authentication requests. +func (m *Application) GetRequestSignatureVerification()(RequestSignatureVerificationable) { + return m.requestSignatureVerification +} +// GetRequiredResourceAccess gets the requiredResourceAccess property value. Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning mid-October 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Application) GetRequiredResourceAccess()([]RequiredResourceAccessable) { + return m.requiredResourceAccess +} +// GetSamlMetadataUrl gets the samlMetadataUrl property value. The URL where the service exposes SAML metadata for federation. This property is valid only for single-tenant applications. Nullable. +func (m *Application) GetSamlMetadataUrl()(*string) { + return m.samlMetadataUrl +} +// GetServiceManagementReference gets the serviceManagementReference property value. References application or service contact information from a Service or Asset Management database. Nullable. +func (m *Application) GetServiceManagementReference()(*string) { + return m.serviceManagementReference +} +// GetServicePrincipalLockConfiguration gets the servicePrincipalLockConfiguration property value. Specifies whether sensitive properties of a multi-tenant application should be locked for editing after the application is provisioned in a tenant. Nullable. null by default. +func (m *Application) GetServicePrincipalLockConfiguration()(ServicePrincipalLockConfigurationable) { + return m.servicePrincipalLockConfiguration +} +// GetSignInAudience gets the signInAudience property value. Specifies the Microsoft accounts that are supported for the current application. The possible values are: AzureADMyOrg, AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount (default), and PersonalMicrosoftAccount. See more in the table. The value of this object also limits the number of permissions an app can request. For more information, see Limits on requested permissions per app. The value for this property has implications on other app object properties. As a result, if you change this property, you may need to change other properties first. For more information, see Validation differences for signInAudience.Supports $filter (eq, ne, not). +func (m *Application) GetSignInAudience()(*string) { + return m.signInAudience +} +// GetSpa gets the spa property value. Specifies settings for a single-page application, including sign out URLs and redirect URIs for authorization codes and access tokens. +func (m *Application) GetSpa()(SpaApplicationable) { + return m.spa +} +// GetSynchronization gets the synchronization property value. The synchronization property +func (m *Application) GetSynchronization()(Synchronizationable) { + return m.synchronization +} +// GetTags gets the tags property value. Custom strings that can be used to categorize and identify the application. Not nullable.Supports $filter (eq, not, ge, le, startsWith). +func (m *Application) GetTags()([]string) { + return m.tags +} +// GetTokenEncryptionKeyId gets the tokenEncryptionKeyId property value. Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. +func (m *Application) GetTokenEncryptionKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.tokenEncryptionKeyId +} +// GetTokenIssuancePolicies gets the tokenIssuancePolicies property value. The tokenIssuancePolicies property +func (m *Application) GetTokenIssuancePolicies()([]TokenIssuancePolicyable) { + return m.tokenIssuancePolicies +} +// GetTokenLifetimePolicies gets the tokenLifetimePolicies property value. The tokenLifetimePolicies assigned to this application. Supports $expand. +func (m *Application) GetTokenLifetimePolicies()([]TokenLifetimePolicyable) { + return m.tokenLifetimePolicies +} +// GetUniqueName gets the uniqueName property value. The unique identifier that can be assigned to an application as an alternative identifier. Immutable. Read-only. +func (m *Application) GetUniqueName()(*string) { + return m.uniqueName +} +// GetVerifiedPublisher gets the verifiedPublisher property value. Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification. +func (m *Application) GetVerifiedPublisher()(VerifiedPublisherable) { + return m.verifiedPublisher +} +// GetWeb gets the web property value. Specifies settings for a web application. +func (m *Application) GetWeb()(WebApplicationable) { + return m.web +} +// GetWindows gets the windows property value. Specifies settings for apps running Microsoft Windows and published in the Microsoft Store or Xbox games store. +func (m *Application) GetWindows()(WindowsApplicationable) { + return m.windows +} +// Serialize serializes information the current object +func (m *Application) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("api", m.GetApi()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + if m.GetAppManagementPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppManagementPolicies())) + for i, v := range m.GetAppManagementPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appManagementPolicies", cast) + if err != nil { + return err + } + } + if m.GetAppRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppRoles())) + for i, v := range m.GetAppRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appRoles", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("certification", m.GetCertification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("connectorGroup", m.GetConnectorGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdOnBehalfOf", m.GetCreatedOnBehalfOf()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultRedirectUri", m.GetDefaultRedirectUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("disabledByMicrosoftStatus", m.GetDisabledByMicrosoftStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExtensionProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensionProperties())) + for i, v := range m.GetExtensionProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensionProperties", cast) + if err != nil { + return err + } + } + if m.GetFederatedIdentityCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFederatedIdentityCredentials())) + for i, v := range m.GetFederatedIdentityCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupMembershipClaims", m.GetGroupMembershipClaims()) + if err != nil { + return err + } + } + if m.GetHomeRealmDiscoveryPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHomeRealmDiscoveryPolicies())) + for i, v := range m.GetHomeRealmDiscoveryPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", cast) + if err != nil { + return err + } + } + if m.GetIdentifierUris() != nil { + err = writer.WriteCollectionOfStringValues("identifierUris", m.GetIdentifierUris()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("info", m.GetInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeviceOnlyAuthSupported", m.GetIsDeviceOnlyAuthSupported()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFallbackPublicClient", m.GetIsFallbackPublicClient()) + if err != nil { + return err + } + } + if m.GetKeyCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKeyCredentials())) + for i, v := range m.GetKeyCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("keyCredentials", cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("logo", m.GetLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onPremisesPublishing", m.GetOnPremisesPublishing()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("optionalClaims", m.GetOptionalClaims()) + if err != nil { + return err + } + } + if m.GetOwners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOwners())) + for i, v := range m.GetOwners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("owners", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentalControlSettings", m.GetParentalControlSettings()) + if err != nil { + return err + } + } + if m.GetPasswordCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPasswordCredentials())) + for i, v := range m.GetPasswordCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("passwordCredentials", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publicClient", m.GetPublicClient()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisherDomain", m.GetPublisherDomain()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requestSignatureVerification", m.GetRequestSignatureVerification()) + if err != nil { + return err + } + } + if m.GetRequiredResourceAccess() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequiredResourceAccess())) + for i, v := range m.GetRequiredResourceAccess() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("requiredResourceAccess", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("samlMetadataUrl", m.GetSamlMetadataUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceManagementReference", m.GetServiceManagementReference()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("servicePrincipalLockConfiguration", m.GetServicePrincipalLockConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signInAudience", m.GetSignInAudience()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("spa", m.GetSpa()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("synchronization", m.GetSynchronization()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("tokenEncryptionKeyId", m.GetTokenEncryptionKeyId()) + if err != nil { + return err + } + } + if m.GetTokenIssuancePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTokenIssuancePolicies())) + for i, v := range m.GetTokenIssuancePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", cast) + if err != nil { + return err + } + } + if m.GetTokenLifetimePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTokenLifetimePolicies())) + for i, v := range m.GetTokenLifetimePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uniqueName", m.GetUniqueName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("verifiedPublisher", m.GetVerifiedPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("web", m.GetWeb()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windows", m.GetWindows()) + if err != nil { + return err + } + } + return nil +} +// SetApi sets the api property value. Specifies settings for an application that implements a web API. +func (m *Application) SetApi(value ApiApplicationable)() { + m.api = value +} +// SetAppId sets the appId property value. The unique identifier for the application that is assigned by Azure AD. Not nullable. Read-only. Supports $filter (eq). +func (m *Application) SetAppId(value *string)() { + m.appId = value +} +// SetAppManagementPolicies sets the appManagementPolicies property value. The appManagementPolicy applied to this application. +func (m *Application) SetAppManagementPolicies(value []AppManagementPolicyable)() { + m.appManagementPolicies = value +} +// SetAppRoles sets the appRoles property value. The collection of roles defined for the application. With app role assignments, these roles can be assigned to users, groups, or service principals associated with other applications. Not nullable. +func (m *Application) SetAppRoles(value []AppRoleable)() { + m.appRoles = value +} +// SetCertification sets the certification property value. Specifies the certification status of the application. +func (m *Application) SetCertification(value Certificationable)() { + m.certification = value +} +// SetConnectorGroup sets the connectorGroup property value. The connectorGroup the application is using with Azure AD Application Proxy. Nullable. +func (m *Application) SetConnectorGroup(value ConnectorGroupable)() { + m.connectorGroup = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the application was registered. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, in, and eq on null values) and $orderBy. +func (m *Application) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreatedOnBehalfOf sets the createdOnBehalfOf property value. Supports $filter (/$count eq 0, /$count ne 0). Read-only. +func (m *Application) SetCreatedOnBehalfOf(value DirectoryObjectable)() { + m.createdOnBehalfOf = value +} +// SetDefaultRedirectUri sets the defaultRedirectUri property value. The default redirect URI. If specified and there is no explicit redirect URI in the sign-in request for SAML and OIDC flows, Azure AD sends the token to this redirect URI. Azure AD also sends the token to this default URI in SAML IdP-initiated single sign-on. The value must match one of the configured redirect URIs for the application. +func (m *Application) SetDefaultRedirectUri(value *string)() { + m.defaultRedirectUri = value +} +// SetDescription sets the description property value. Free text field to provide a description of the application object to end users. The maximum allowed size is 1024 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *Application) SetDescription(value *string)() { + m.description = value +} +// SetDisabledByMicrosoftStatus sets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). +func (m *Application) SetDisabledByMicrosoftStatus(value *string)() { + m.disabledByMicrosoftStatus = value +} +// SetDisplayName sets the displayName property value. The display name for the application. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Application) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExtensionProperties sets the extensionProperties property value. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0). +func (m *Application) SetExtensionProperties(value []ExtensionPropertyable)() { + m.extensionProperties = value +} +// SetFederatedIdentityCredentials sets the federatedIdentityCredentials property value. Federated identities for applications. Supports $expand and $filter (startsWith, /$count eq 0, /$count ne 0). +func (m *Application) SetFederatedIdentityCredentials(value []FederatedIdentityCredentialable)() { + m.federatedIdentityCredentials = value +} +// SetGroupMembershipClaims sets the groupMembershipClaims property value. Configures the groups claim issued in a user or OAuth 2.0 access token that the application expects. To set this attribute, use one of the following string values: None, SecurityGroup (for security groups and Azure AD roles), All (this gets all security groups, distribution groups, and Azure AD directory roles that the signed-in user is a member of). +func (m *Application) SetGroupMembershipClaims(value *string)() { + m.groupMembershipClaims = value +} +// SetHomeRealmDiscoveryPolicies sets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies property +func (m *Application) SetHomeRealmDiscoveryPolicies(value []HomeRealmDiscoveryPolicyable)() { + m.homeRealmDiscoveryPolicies = value +} +// SetIdentifierUris sets the identifierUris property value. Also known as App ID URI, this value is set when an application is used as a resource app. The identifierUris acts as the prefix for the scopes you'll reference in your API's code, and it must be globally unique. You can use the default value provided, which is in the form api://, or specify a more readable URI like https://contoso.com/api. For more information on valid identifierUris patterns and best practices, see Azure AD application registration security best practices. Not nullable. Supports $filter (eq, ne, ge, le, startsWith). +func (m *Application) SetIdentifierUris(value []string)() { + m.identifierUris = value +} +// SetInfo sets the info property value. Basic profile information of the application, such as it's marketing, support, terms of service, and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more information, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). +func (m *Application) SetInfo(value InformationalUrlable)() { + m.info = value +} +// SetIsDeviceOnlyAuthSupported sets the isDeviceOnlyAuthSupported property value. Specifies whether this application supports device authentication without a user. The default is false. +func (m *Application) SetIsDeviceOnlyAuthSupported(value *bool)() { + m.isDeviceOnlyAuthSupported = value +} +// SetIsFallbackPublicClient sets the isFallbackPublicClient property value. Specifies the fallback application type as public client, such as an installed application running on a mobile device. The default value is false which means the fallback application type is confidential client such as a web app. There are certain scenarios where Azure AD cannot determine the client application type. For example, the ROPC flow where the application is configured without specifying a redirect URI. In those cases Azure AD interprets the application type based on the value of this property. +func (m *Application) SetIsFallbackPublicClient(value *bool)() { + m.isFallbackPublicClient = value +} +// SetKeyCredentials sets the keyCredentials property value. The collection of key credentials associated with the application. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Application) SetKeyCredentials(value []KeyCredentialable)() { + m.keyCredentials = value +} +// SetLogo sets the logo property value. The main logo for the application. Not nullable. +func (m *Application) SetLogo(value []byte)() { + m.logo = value +} +// SetNotes sets the notes property value. Notes relevant for the management of the application. +func (m *Application) SetNotes(value *string)() { + m.notes = value +} +// SetOnPremisesPublishing sets the onPremisesPublishing property value. Represents the set of properties required for configuring Application Proxy for this application. Configuring these properties allows you to publish your on-premises application for secure remote access. +func (m *Application) SetOnPremisesPublishing(value OnPremisesPublishingable)() { + m.onPremisesPublishing = value +} +// SetOptionalClaims sets the optionalClaims property value. Application developers can configure optional claims in their Azure AD applications to specify the claims that are sent to their application by the Microsoft security token service. For more information, see How to: Provide optional claims to your app. +func (m *Application) SetOptionalClaims(value OptionalClaimsable)() { + m.optionalClaims = value +} +// SetOwners sets the owners property value. Directory objects that are owners of the application. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *Application) SetOwners(value []DirectoryObjectable)() { + m.owners = value +} +// SetParentalControlSettings sets the parentalControlSettings property value. Specifies parental control settings for an application. +func (m *Application) SetParentalControlSettings(value ParentalControlSettingsable)() { + m.parentalControlSettings = value +} +// SetPasswordCredentials sets the passwordCredentials property value. The collection of password credentials associated with the application. Not nullable. +func (m *Application) SetPasswordCredentials(value []PasswordCredentialable)() { + m.passwordCredentials = value +} +// SetPublicClient sets the publicClient property value. Specifies settings for installed clients such as desktop or mobile devices. +func (m *Application) SetPublicClient(value PublicClientApplicationable)() { + m.publicClient = value +} +// SetPublisherDomain sets the publisherDomain property value. The verified publisher domain for the application. Read-only. Supports $filter (eq, ne, ge, le, startsWith). +func (m *Application) SetPublisherDomain(value *string)() { + m.publisherDomain = value +} +// SetRequestSignatureVerification sets the requestSignatureVerification property value. Specifies whether this application requires Azure AD to verify the signed authentication requests. +func (m *Application) SetRequestSignatureVerification(value RequestSignatureVerificationable)() { + m.requestSignatureVerification = value +} +// SetRequiredResourceAccess sets the requiredResourceAccess property value. Specifies the resources that the application needs to access. This property also specifies the set of delegated permissions and application roles that it needs for each of those resources. This configuration of access to the required resources drives the consent experience. No more than 50 resource services (APIs) can be configured. Beginning mid-October 2021, the total number of required permissions must not exceed 400. For more information, see Limits on requested permissions per app. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Application) SetRequiredResourceAccess(value []RequiredResourceAccessable)() { + m.requiredResourceAccess = value +} +// SetSamlMetadataUrl sets the samlMetadataUrl property value. The URL where the service exposes SAML metadata for federation. This property is valid only for single-tenant applications. Nullable. +func (m *Application) SetSamlMetadataUrl(value *string)() { + m.samlMetadataUrl = value +} +// SetServiceManagementReference sets the serviceManagementReference property value. References application or service contact information from a Service or Asset Management database. Nullable. +func (m *Application) SetServiceManagementReference(value *string)() { + m.serviceManagementReference = value +} +// SetServicePrincipalLockConfiguration sets the servicePrincipalLockConfiguration property value. Specifies whether sensitive properties of a multi-tenant application should be locked for editing after the application is provisioned in a tenant. Nullable. null by default. +func (m *Application) SetServicePrincipalLockConfiguration(value ServicePrincipalLockConfigurationable)() { + m.servicePrincipalLockConfiguration = value +} +// SetSignInAudience sets the signInAudience property value. Specifies the Microsoft accounts that are supported for the current application. The possible values are: AzureADMyOrg, AzureADMultipleOrgs, AzureADandPersonalMicrosoftAccount (default), and PersonalMicrosoftAccount. See more in the table. The value of this object also limits the number of permissions an app can request. For more information, see Limits on requested permissions per app. The value for this property has implications on other app object properties. As a result, if you change this property, you may need to change other properties first. For more information, see Validation differences for signInAudience.Supports $filter (eq, ne, not). +func (m *Application) SetSignInAudience(value *string)() { + m.signInAudience = value +} +// SetSpa sets the spa property value. Specifies settings for a single-page application, including sign out URLs and redirect URIs for authorization codes and access tokens. +func (m *Application) SetSpa(value SpaApplicationable)() { + m.spa = value +} +// SetSynchronization sets the synchronization property value. The synchronization property +func (m *Application) SetSynchronization(value Synchronizationable)() { + m.synchronization = value +} +// SetTags sets the tags property value. Custom strings that can be used to categorize and identify the application. Not nullable.Supports $filter (eq, not, ge, le, startsWith). +func (m *Application) SetTags(value []string)() { + m.tags = value +} +// SetTokenEncryptionKeyId sets the tokenEncryptionKeyId property value. Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD encrypts all the tokens it emits by using the key this property points to. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. +func (m *Application) SetTokenEncryptionKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.tokenEncryptionKeyId = value +} +// SetTokenIssuancePolicies sets the tokenIssuancePolicies property value. The tokenIssuancePolicies property +func (m *Application) SetTokenIssuancePolicies(value []TokenIssuancePolicyable)() { + m.tokenIssuancePolicies = value +} +// SetTokenLifetimePolicies sets the tokenLifetimePolicies property value. The tokenLifetimePolicies assigned to this application. Supports $expand. +func (m *Application) SetTokenLifetimePolicies(value []TokenLifetimePolicyable)() { + m.tokenLifetimePolicies = value +} +// SetUniqueName sets the uniqueName property value. The unique identifier that can be assigned to an application as an alternative identifier. Immutable. Read-only. +func (m *Application) SetUniqueName(value *string)() { + m.uniqueName = value +} +// SetVerifiedPublisher sets the verifiedPublisher property value. Specifies the verified publisher of the application. For more information about how publisher verification helps support application security, trustworthiness, and compliance, see Publisher verification. +func (m *Application) SetVerifiedPublisher(value VerifiedPublisherable)() { + m.verifiedPublisher = value +} +// SetWeb sets the web property value. Specifies settings for a web application. +func (m *Application) SetWeb(value WebApplicationable)() { + m.web = value +} +// SetWindows sets the windows property value. Specifies settings for apps running Microsoft Windows and published in the Microsoft Store or Xbox games store. +func (m *Application) SetWindows(value WindowsApplicationable)() { + m.windows = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_collection_response.go b/src/internal/connector/graph/betasdk/models/application_collection_response.go new file mode 100644 index 000000000..a853ca327 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationCollectionResponse +type ApplicationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Applicationable +} +// NewApplicationCollectionResponse instantiates a new ApplicationCollectionResponse and sets the default values. +func NewApplicationCollectionResponse()(*ApplicationCollectionResponse) { + m := &ApplicationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApplicationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Applicationable, len(val)) + for i, v := range val { + res[i] = v.(Applicationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApplicationCollectionResponse) GetValue()([]Applicationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApplicationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApplicationCollectionResponse) SetValue(value []Applicationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_collection_responseable.go b/src/internal/connector/graph/betasdk/models/application_collection_responseable.go new file mode 100644 index 000000000..11b799c5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationCollectionResponseable +type ApplicationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Applicationable) + SetValue(value []Applicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_control.go b/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_control.go new file mode 100644 index 000000000..16f5c785c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_control.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationEnforcedRestrictionsSessionControl +type ApplicationEnforcedRestrictionsSessionControl struct { + ConditionalAccessSessionControl +} +// NewApplicationEnforcedRestrictionsSessionControl instantiates a new ApplicationEnforcedRestrictionsSessionControl and sets the default values. +func NewApplicationEnforcedRestrictionsSessionControl()(*ApplicationEnforcedRestrictionsSessionControl) { + m := &ApplicationEnforcedRestrictionsSessionControl{ + ConditionalAccessSessionControl: *NewConditionalAccessSessionControl(), + } + odataTypeValue := "#microsoft.graph.applicationEnforcedRestrictionsSessionControl"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateApplicationEnforcedRestrictionsSessionControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationEnforcedRestrictionsSessionControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationEnforcedRestrictionsSessionControl(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationEnforcedRestrictionsSessionControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConditionalAccessSessionControl.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ApplicationEnforcedRestrictionsSessionControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConditionalAccessSessionControl.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_controlable.go b/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_controlable.go new file mode 100644 index 000000000..1a5c243b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_enforced_restrictions_session_controlable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationEnforcedRestrictionsSessionControlable +type ApplicationEnforcedRestrictionsSessionControlable interface { + ConditionalAccessSessionControlable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/application_guard_block_clipboard_sharing_type.go b/src/internal/connector/graph/betasdk/models/application_guard_block_clipboard_sharing_type.go new file mode 100644 index 000000000..a6c7739ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_guard_block_clipboard_sharing_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationGuardBlockClipboardSharingType int + +const ( + // Not Configured + NOTCONFIGURED_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE ApplicationGuardBlockClipboardSharingType = iota + // Block clipboard to share data both from Host to Container and from Container to Host + BLOCKBOTH_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + // Block clipboard to share data from Host to Container + BLOCKHOSTTOCONTAINER_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + // Block clipboard to share data from Container to Host + BLOCKCONTAINERTOHOST_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + // Block clipboard to share data neither from Host to Container nor from Container to Host + BLOCKNONE_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE +) + +func (i ApplicationGuardBlockClipboardSharingType) String() string { + return []string{"notConfigured", "blockBoth", "blockHostToContainer", "blockContainerToHost", "blockNone"}[i] +} +func ParseApplicationGuardBlockClipboardSharingType(v string) (interface{}, error) { + result := NOTCONFIGURED_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + case "blockBoth": + result = BLOCKBOTH_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + case "blockHostToContainer": + result = BLOCKHOSTTOCONTAINER_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + case "blockContainerToHost": + result = BLOCKCONTAINERTOHOST_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + case "blockNone": + result = BLOCKNONE_APPLICATIONGUARDBLOCKCLIPBOARDSHARINGTYPE + default: + return 0, errors.New("Unknown ApplicationGuardBlockClipboardSharingType value: " + v) + } + return &result, nil +} +func SerializeApplicationGuardBlockClipboardSharingType(values []ApplicationGuardBlockClipboardSharingType) []string { + 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/application_guard_block_file_transfer_type.go b/src/internal/connector/graph/betasdk/models/application_guard_block_file_transfer_type.go new file mode 100644 index 000000000..e71a78299 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_guard_block_file_transfer_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationGuardBlockFileTransferType int + +const ( + // Not Configured + NOTCONFIGURED_APPLICATIONGUARDBLOCKFILETRANSFERTYPE ApplicationGuardBlockFileTransferType = iota + // Block clipboard to transfer Image and Text file + BLOCKIMAGEANDTEXTFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + // Block clipboard to transfer Image file + BLOCKIMAGEFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + // Neither of text file or image file is blocked from transferring + BLOCKNONE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + // Block clipboard to transfer Text file + BLOCKTEXTFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE +) + +func (i ApplicationGuardBlockFileTransferType) String() string { + return []string{"notConfigured", "blockImageAndTextFile", "blockImageFile", "blockNone", "blockTextFile"}[i] +} +func ParseApplicationGuardBlockFileTransferType(v string) (interface{}, error) { + result := NOTCONFIGURED_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + case "blockImageAndTextFile": + result = BLOCKIMAGEANDTEXTFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + case "blockImageFile": + result = BLOCKIMAGEFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + case "blockNone": + result = BLOCKNONE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + case "blockTextFile": + result = BLOCKTEXTFILE_APPLICATIONGUARDBLOCKFILETRANSFERTYPE + default: + return 0, errors.New("Unknown ApplicationGuardBlockFileTransferType value: " + v) + } + return &result, nil +} +func SerializeApplicationGuardBlockFileTransferType(values []ApplicationGuardBlockFileTransferType) []string { + 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/application_guard_enabled_options.go b/src/internal/connector/graph/betasdk/models/application_guard_enabled_options.go new file mode 100644 index 000000000..fdb0dee90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_guard_enabled_options.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationGuardEnabledOptions int + +const ( + // Not Configured + NOTCONFIGURED_APPLICATIONGUARDENABLEDOPTIONS ApplicationGuardEnabledOptions = iota + // Enabled For Edge + ENABLEDFOREDGE_APPLICATIONGUARDENABLEDOPTIONS + // Enabled For Office + ENABLEDFOROFFICE_APPLICATIONGUARDENABLEDOPTIONS + // Enabled For Edge And Office + ENABLEDFOREDGEANDOFFICE_APPLICATIONGUARDENABLEDOPTIONS +) + +func (i ApplicationGuardEnabledOptions) String() string { + return []string{"notConfigured", "enabledForEdge", "enabledForOffice", "enabledForEdgeAndOffice"}[i] +} +func ParseApplicationGuardEnabledOptions(v string) (interface{}, error) { + result := NOTCONFIGURED_APPLICATIONGUARDENABLEDOPTIONS + switch v { + case "notConfigured": + result = NOTCONFIGURED_APPLICATIONGUARDENABLEDOPTIONS + case "enabledForEdge": + result = ENABLEDFOREDGE_APPLICATIONGUARDENABLEDOPTIONS + case "enabledForOffice": + result = ENABLEDFOROFFICE_APPLICATIONGUARDENABLEDOPTIONS + case "enabledForEdgeAndOffice": + result = ENABLEDFOREDGEANDOFFICE_APPLICATIONGUARDENABLEDOPTIONS + default: + return 0, errors.New("Unknown ApplicationGuardEnabledOptions value: " + v) + } + return &result, nil +} +func SerializeApplicationGuardEnabledOptions(values []ApplicationGuardEnabledOptions) []string { + 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/application_mode.go b/src/internal/connector/graph/betasdk/models/application_mode.go new file mode 100644 index 000000000..3f3768ee2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationMode int + +const ( + MANUAL_APPLICATIONMODE ApplicationMode = iota + AUTOMATIC_APPLICATIONMODE + RECOMMENDED_APPLICATIONMODE +) + +func (i ApplicationMode) String() string { + return []string{"manual", "automatic", "recommended"}[i] +} +func ParseApplicationMode(v string) (interface{}, error) { + result := MANUAL_APPLICATIONMODE + switch v { + case "manual": + result = MANUAL_APPLICATIONMODE + case "automatic": + result = AUTOMATIC_APPLICATIONMODE + case "recommended": + result = RECOMMENDED_APPLICATIONMODE + default: + return 0, errors.New("Unknown ApplicationMode value: " + v) + } + return &result, nil +} +func SerializeApplicationMode(values []ApplicationMode) []string { + 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/application_permissions_required.go b/src/internal/connector/graph/betasdk/models/application_permissions_required.go new file mode 100644 index 000000000..9864a3c7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_permissions_required.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationPermissionsRequired int + +const ( + UNKNOWN_APPLICATIONPERMISSIONSREQUIRED ApplicationPermissionsRequired = iota + ANONYMOUS_APPLICATIONPERMISSIONSREQUIRED + GUEST_APPLICATIONPERMISSIONSREQUIRED + USER_APPLICATIONPERMISSIONSREQUIRED + ADMINISTRATOR_APPLICATIONPERMISSIONSREQUIRED + SYSTEM_APPLICATIONPERMISSIONSREQUIRED + UNKNOWNFUTUREVALUE_APPLICATIONPERMISSIONSREQUIRED +) + +func (i ApplicationPermissionsRequired) String() string { + return []string{"unknown", "anonymous", "guest", "user", "administrator", "system", "unknownFutureValue"}[i] +} +func ParseApplicationPermissionsRequired(v string) (interface{}, error) { + result := UNKNOWN_APPLICATIONPERMISSIONSREQUIRED + switch v { + case "unknown": + result = UNKNOWN_APPLICATIONPERMISSIONSREQUIRED + case "anonymous": + result = ANONYMOUS_APPLICATIONPERMISSIONSREQUIRED + case "guest": + result = GUEST_APPLICATIONPERMISSIONSREQUIRED + case "user": + result = USER_APPLICATIONPERMISSIONSREQUIRED + case "administrator": + result = ADMINISTRATOR_APPLICATIONPERMISSIONSREQUIRED + case "system": + result = SYSTEM_APPLICATIONPERMISSIONSREQUIRED + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPLICATIONPERMISSIONSREQUIRED + default: + return 0, errors.New("Unknown ApplicationPermissionsRequired value: " + v) + } + return &result, nil +} +func SerializeApplicationPermissionsRequired(values []ApplicationPermissionsRequired) []string { + 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/application_segment.go b/src/internal/connector/graph/betasdk/models/application_segment.go new file mode 100644 index 000000000..2388bf5b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_segment.go @@ -0,0 +1,54 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSegment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationSegment struct { + Entity +} +// NewApplicationSegment instantiates a new applicationSegment and sets the default values. +func NewApplicationSegment()(*ApplicationSegment) { + m := &ApplicationSegment{ + Entity: *NewEntity(), + } + return m +} +// CreateApplicationSegmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationSegmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.ipApplicationSegment": + return NewIpApplicationSegment(), nil + case "#microsoft.graph.webApplicationSegment": + return NewWebApplicationSegment(), nil + } + } + } + } + return NewApplicationSegment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationSegment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ApplicationSegment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/application_segmentable.go b/src/internal/connector/graph/betasdk/models/application_segmentable.go new file mode 100644 index 000000000..b7da04d9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_segmentable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSegmentable +type ApplicationSegmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary.go b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary.go new file mode 100644 index 000000000..24ea8ff7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInDetailedSummary +type ApplicationSignInDetailedSummary struct { + Entity + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + aggregatedEventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the application that the user signed in to. + appDisplayName *string + // ID of the application that the user signed in to. + appId *string + // Count of sign-ins made by the application. + signInCount *int64 + // Details of the sign-in status. + status SignInStatusable +} +// NewApplicationSignInDetailedSummary instantiates a new ApplicationSignInDetailedSummary and sets the default values. +func NewApplicationSignInDetailedSummary()(*ApplicationSignInDetailedSummary) { + m := &ApplicationSignInDetailedSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateApplicationSignInDetailedSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationSignInDetailedSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationSignInDetailedSummary(), nil +} +// GetAggregatedEventDateTime gets the aggregatedEventDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ApplicationSignInDetailedSummary) GetAggregatedEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.aggregatedEventDateTime +} +// GetAppDisplayName gets the appDisplayName property value. Name of the application that the user signed in to. +func (m *ApplicationSignInDetailedSummary) GetAppDisplayName()(*string) { + return m.appDisplayName +} +// GetAppId gets the appId property value. ID of the application that the user signed in to. +func (m *ApplicationSignInDetailedSummary) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationSignInDetailedSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["aggregatedEventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAggregatedEventDateTime(val) + } + return nil + } + res["appDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDisplayName(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["signInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSignInCount(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSignInStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(SignInStatusable)) + } + return nil + } + return res +} +// GetSignInCount gets the signInCount property value. Count of sign-ins made by the application. +func (m *ApplicationSignInDetailedSummary) GetSignInCount()(*int64) { + return m.signInCount +} +// GetStatus gets the status property value. Details of the sign-in status. +func (m *ApplicationSignInDetailedSummary) GetStatus()(SignInStatusable) { + return m.status +} +// Serialize serializes information the current object +func (m *ApplicationSignInDetailedSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("aggregatedEventDateTime", m.GetAggregatedEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appDisplayName", m.GetAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("signInCount", m.GetSignInCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetAggregatedEventDateTime sets the aggregatedEventDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ApplicationSignInDetailedSummary) SetAggregatedEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.aggregatedEventDateTime = value +} +// SetAppDisplayName sets the appDisplayName property value. Name of the application that the user signed in to. +func (m *ApplicationSignInDetailedSummary) SetAppDisplayName(value *string)() { + m.appDisplayName = value +} +// SetAppId sets the appId property value. ID of the application that the user signed in to. +func (m *ApplicationSignInDetailedSummary) SetAppId(value *string)() { + m.appId = value +} +// SetSignInCount sets the signInCount property value. Count of sign-ins made by the application. +func (m *ApplicationSignInDetailedSummary) SetSignInCount(value *int64)() { + m.signInCount = value +} +// SetStatus sets the status property value. Details of the sign-in status. +func (m *ApplicationSignInDetailedSummary) SetStatus(value SignInStatusable)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_response.go new file mode 100644 index 000000000..cdec1e493 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInDetailedSummaryCollectionResponse +type ApplicationSignInDetailedSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ApplicationSignInDetailedSummaryable +} +// NewApplicationSignInDetailedSummaryCollectionResponse instantiates a new ApplicationSignInDetailedSummaryCollectionResponse and sets the default values. +func NewApplicationSignInDetailedSummaryCollectionResponse()(*ApplicationSignInDetailedSummaryCollectionResponse) { + m := &ApplicationSignInDetailedSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApplicationSignInDetailedSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationSignInDetailedSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationSignInDetailedSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationSignInDetailedSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApplicationSignInDetailedSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApplicationSignInDetailedSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ApplicationSignInDetailedSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApplicationSignInDetailedSummaryCollectionResponse) GetValue()([]ApplicationSignInDetailedSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApplicationSignInDetailedSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApplicationSignInDetailedSummaryCollectionResponse) SetValue(value []ApplicationSignInDetailedSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_responseable.go new file mode 100644 index 000000000..6ac4e2e79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInDetailedSummaryCollectionResponseable +type ApplicationSignInDetailedSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ApplicationSignInDetailedSummaryable) + SetValue(value []ApplicationSignInDetailedSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summaryable.go b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summaryable.go new file mode 100644 index 000000000..13777141f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_detailed_summaryable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInDetailedSummaryable +type ApplicationSignInDetailedSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregatedEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAppDisplayName()(*string) + GetAppId()(*string) + GetSignInCount()(*int64) + GetStatus()(SignInStatusable) + SetAggregatedEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAppDisplayName(value *string)() + SetAppId(value *string)() + SetSignInCount(value *int64)() + SetStatus(value SignInStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_summary.go b/src/internal/connector/graph/betasdk/models/application_sign_in_summary.go new file mode 100644 index 000000000..75849dbaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInSummary +type ApplicationSignInSummary struct { + Entity + // Name of the application that the user signed into. + appDisplayName *string + // Count of failed sign-ins made by the application. + failedSignInCount *int64 + // Count of successful sign-ins made by the application. + successfulSignInCount *int64 + // Percentage of successful sign-ins made by the application. + successPercentage *float64 +} +// NewApplicationSignInSummary instantiates a new ApplicationSignInSummary and sets the default values. +func NewApplicationSignInSummary()(*ApplicationSignInSummary) { + m := &ApplicationSignInSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateApplicationSignInSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationSignInSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationSignInSummary(), nil +} +// GetAppDisplayName gets the appDisplayName property value. Name of the application that the user signed into. +func (m *ApplicationSignInSummary) GetAppDisplayName()(*string) { + return m.appDisplayName +} +// GetFailedSignInCount gets the failedSignInCount property value. Count of failed sign-ins made by the application. +func (m *ApplicationSignInSummary) GetFailedSignInCount()(*int64) { + return m.failedSignInCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationSignInSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDisplayName(val) + } + return nil + } + res["failedSignInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedSignInCount(val) + } + return nil + } + res["successfulSignInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulSignInCount(val) + } + return nil + } + res["successPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessPercentage(val) + } + return nil + } + return res +} +// GetSuccessfulSignInCount gets the successfulSignInCount property value. Count of successful sign-ins made by the application. +func (m *ApplicationSignInSummary) GetSuccessfulSignInCount()(*int64) { + return m.successfulSignInCount +} +// GetSuccessPercentage gets the successPercentage property value. Percentage of successful sign-ins made by the application. +func (m *ApplicationSignInSummary) GetSuccessPercentage()(*float64) { + return m.successPercentage +} +// Serialize serializes information the current object +func (m *ApplicationSignInSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appDisplayName", m.GetAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("failedSignInCount", m.GetFailedSignInCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("successfulSignInCount", m.GetSuccessfulSignInCount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("successPercentage", m.GetSuccessPercentage()) + if err != nil { + return err + } + } + return nil +} +// SetAppDisplayName sets the appDisplayName property value. Name of the application that the user signed into. +func (m *ApplicationSignInSummary) SetAppDisplayName(value *string)() { + m.appDisplayName = value +} +// SetFailedSignInCount sets the failedSignInCount property value. Count of failed sign-ins made by the application. +func (m *ApplicationSignInSummary) SetFailedSignInCount(value *int64)() { + m.failedSignInCount = value +} +// SetSuccessfulSignInCount sets the successfulSignInCount property value. Count of successful sign-ins made by the application. +func (m *ApplicationSignInSummary) SetSuccessfulSignInCount(value *int64)() { + m.successfulSignInCount = value +} +// SetSuccessPercentage sets the successPercentage property value. Percentage of successful sign-ins made by the application. +func (m *ApplicationSignInSummary) SetSuccessPercentage(value *float64)() { + m.successPercentage = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_sign_in_summaryable.go b/src/internal/connector/graph/betasdk/models/application_sign_in_summaryable.go new file mode 100644 index 000000000..27e6d83cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_sign_in_summaryable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationSignInSummaryable +type ApplicationSignInSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppDisplayName()(*string) + GetFailedSignInCount()(*int64) + GetSuccessfulSignInCount()(*int64) + GetSuccessPercentage()(*float64) + SetAppDisplayName(value *string)() + SetFailedSignInCount(value *int64)() + SetSuccessfulSignInCount(value *int64)() + SetSuccessPercentage(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_template.go b/src/internal/connector/graph/betasdk/models/application_template.go new file mode 100644 index 000000000..3359ea842 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_template.go @@ -0,0 +1,306 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationTemplate +type ApplicationTemplate struct { + Entity + // The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting. + categories []string + // A description of the application. + description *string + // The name of the application. + displayName *string + // The home page URL of the application. + homePageUrl *string + // The informationalUrls property + informationalUrls InformationalUrlsable + // The URL to get the logo for this application. + logoUrl *string + // The name of the publisher for this application. + publisher *string + // The supportedClaimConfiguration property + supportedClaimConfiguration SupportedClaimConfigurationable + // The list of provisioning modes supported by this application. The only valid value is sync. + supportedProvisioningTypes []string + // The list of single sign-on modes supported by this application. The supported values are oidc, password, saml, and notSupported. + supportedSingleSignOnModes []string +} +// NewApplicationTemplate instantiates a new ApplicationTemplate and sets the default values. +func NewApplicationTemplate()(*ApplicationTemplate) { + m := &ApplicationTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateApplicationTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationTemplate(), nil +} +// GetCategories gets the categories property value. The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting. +func (m *ApplicationTemplate) GetCategories()([]string) { + return m.categories +} +// GetDescription gets the description property value. A description of the application. +func (m *ApplicationTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of the application. +func (m *ApplicationTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["homePageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomePageUrl(val) + } + return nil + } + res["informationalUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationalUrlsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInformationalUrls(val.(InformationalUrlsable)) + } + return nil + } + res["logoUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogoUrl(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["supportedClaimConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSupportedClaimConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSupportedClaimConfiguration(val.(SupportedClaimConfigurationable)) + } + return nil + } + res["supportedProvisioningTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedProvisioningTypes(res) + } + return nil + } + res["supportedSingleSignOnModes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedSingleSignOnModes(res) + } + return nil + } + return res +} +// GetHomePageUrl gets the homePageUrl property value. The home page URL of the application. +func (m *ApplicationTemplate) GetHomePageUrl()(*string) { + return m.homePageUrl +} +// GetInformationalUrls gets the informationalUrls property value. The informationalUrls property +func (m *ApplicationTemplate) GetInformationalUrls()(InformationalUrlsable) { + return m.informationalUrls +} +// GetLogoUrl gets the logoUrl property value. The URL to get the logo for this application. +func (m *ApplicationTemplate) GetLogoUrl()(*string) { + return m.logoUrl +} +// GetPublisher gets the publisher property value. The name of the publisher for this application. +func (m *ApplicationTemplate) GetPublisher()(*string) { + return m.publisher +} +// GetSupportedClaimConfiguration gets the supportedClaimConfiguration property value. The supportedClaimConfiguration property +func (m *ApplicationTemplate) GetSupportedClaimConfiguration()(SupportedClaimConfigurationable) { + return m.supportedClaimConfiguration +} +// GetSupportedProvisioningTypes gets the supportedProvisioningTypes property value. The list of provisioning modes supported by this application. The only valid value is sync. +func (m *ApplicationTemplate) GetSupportedProvisioningTypes()([]string) { + return m.supportedProvisioningTypes +} +// GetSupportedSingleSignOnModes gets the supportedSingleSignOnModes property value. The list of single sign-on modes supported by this application. The supported values are oidc, password, saml, and notSupported. +func (m *ApplicationTemplate) GetSupportedSingleSignOnModes()([]string) { + return m.supportedSingleSignOnModes +} +// Serialize serializes information the current object +func (m *ApplicationTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("homePageUrl", m.GetHomePageUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("informationalUrls", m.GetInformationalUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("logoUrl", m.GetLogoUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("supportedClaimConfiguration", m.GetSupportedClaimConfiguration()) + if err != nil { + return err + } + } + if m.GetSupportedProvisioningTypes() != nil { + err = writer.WriteCollectionOfStringValues("supportedProvisioningTypes", m.GetSupportedProvisioningTypes()) + if err != nil { + return err + } + } + if m.GetSupportedSingleSignOnModes() != nil { + err = writer.WriteCollectionOfStringValues("supportedSingleSignOnModes", m.GetSupportedSingleSignOnModes()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. The list of categories for the application. Supported values can be: Collaboration, Business Management, Consumer, Content management, CRM, Data services, Developer services, E-commerce, Education, ERP, Finance, Health, Human resources, IT infrastructure, Mail, Management, Marketing, Media, Productivity, Project management, Telecommunications, Tools, Travel, and Web design & hosting. +func (m *ApplicationTemplate) SetCategories(value []string)() { + m.categories = value +} +// SetDescription sets the description property value. A description of the application. +func (m *ApplicationTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of the application. +func (m *ApplicationTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHomePageUrl sets the homePageUrl property value. The home page URL of the application. +func (m *ApplicationTemplate) SetHomePageUrl(value *string)() { + m.homePageUrl = value +} +// SetInformationalUrls sets the informationalUrls property value. The informationalUrls property +func (m *ApplicationTemplate) SetInformationalUrls(value InformationalUrlsable)() { + m.informationalUrls = value +} +// SetLogoUrl sets the logoUrl property value. The URL to get the logo for this application. +func (m *ApplicationTemplate) SetLogoUrl(value *string)() { + m.logoUrl = value +} +// SetPublisher sets the publisher property value. The name of the publisher for this application. +func (m *ApplicationTemplate) SetPublisher(value *string)() { + m.publisher = value +} +// SetSupportedClaimConfiguration sets the supportedClaimConfiguration property value. The supportedClaimConfiguration property +func (m *ApplicationTemplate) SetSupportedClaimConfiguration(value SupportedClaimConfigurationable)() { + m.supportedClaimConfiguration = value +} +// SetSupportedProvisioningTypes sets the supportedProvisioningTypes property value. The list of provisioning modes supported by this application. The only valid value is sync. +func (m *ApplicationTemplate) SetSupportedProvisioningTypes(value []string)() { + m.supportedProvisioningTypes = value +} +// SetSupportedSingleSignOnModes sets the supportedSingleSignOnModes property value. The list of single sign-on modes supported by this application. The supported values are oidc, password, saml, and notSupported. +func (m *ApplicationTemplate) SetSupportedSingleSignOnModes(value []string)() { + m.supportedSingleSignOnModes = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_template_collection_response.go b/src/internal/connector/graph/betasdk/models/application_template_collection_response.go new file mode 100644 index 000000000..5d2d1f0c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationTemplateCollectionResponse +type ApplicationTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ApplicationTemplateable +} +// NewApplicationTemplateCollectionResponse instantiates a new ApplicationTemplateCollectionResponse and sets the default values. +func NewApplicationTemplateCollectionResponse()(*ApplicationTemplateCollectionResponse) { + m := &ApplicationTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApplicationTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplicationTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplicationTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplicationTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApplicationTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApplicationTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ApplicationTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApplicationTemplateCollectionResponse) GetValue()([]ApplicationTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApplicationTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApplicationTemplateCollectionResponse) SetValue(value []ApplicationTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/application_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/application_template_collection_responseable.go new file mode 100644 index 000000000..da381f7b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationTemplateCollectionResponseable +type ApplicationTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ApplicationTemplateable) + SetValue(value []ApplicationTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_templateable.go b/src/internal/connector/graph/betasdk/models/application_templateable.go new file mode 100644 index 000000000..e94419123 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_templateable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplicationTemplateable +type ApplicationTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetHomePageUrl()(*string) + GetInformationalUrls()(InformationalUrlsable) + GetLogoUrl()(*string) + GetPublisher()(*string) + GetSupportedClaimConfiguration()(SupportedClaimConfigurationable) + GetSupportedProvisioningTypes()([]string) + GetSupportedSingleSignOnModes()([]string) + SetCategories(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetHomePageUrl(value *string)() + SetInformationalUrls(value InformationalUrlsable)() + SetLogoUrl(value *string)() + SetPublisher(value *string)() + SetSupportedClaimConfiguration(value SupportedClaimConfigurationable)() + SetSupportedProvisioningTypes(value []string)() + SetSupportedSingleSignOnModes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/application_type.go b/src/internal/connector/graph/betasdk/models/application_type.go new file mode 100644 index 000000000..123e97c62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/application_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApplicationType int + +const ( + // The windows universal application + UNIVERSAL_APPLICATIONTYPE ApplicationType = iota + // The windows desktop application + DESKTOP_APPLICATIONTYPE +) + +func (i ApplicationType) String() string { + return []string{"universal", "desktop"}[i] +} +func ParseApplicationType(v string) (interface{}, error) { + result := UNIVERSAL_APPLICATIONTYPE + switch v { + case "universal": + result = UNIVERSAL_APPLICATIONTYPE + case "desktop": + result = DESKTOP_APPLICATIONTYPE + default: + return 0, errors.New("Unknown ApplicationType value: " + v) + } + return &result, nil +} +func SerializeApplicationType(values []ApplicationType) []string { + 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/applicationable.go b/src/internal/connector/graph/betasdk/models/applicationable.go new file mode 100644 index 000000000..1a983441d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applicationable.go @@ -0,0 +1,105 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Applicationable +type Applicationable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApi()(ApiApplicationable) + GetAppId()(*string) + GetAppManagementPolicies()([]AppManagementPolicyable) + GetAppRoles()([]AppRoleable) + GetCertification()(Certificationable) + GetConnectorGroup()(ConnectorGroupable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedOnBehalfOf()(DirectoryObjectable) + GetDefaultRedirectUri()(*string) + GetDescription()(*string) + GetDisabledByMicrosoftStatus()(*string) + GetDisplayName()(*string) + GetExtensionProperties()([]ExtensionPropertyable) + GetFederatedIdentityCredentials()([]FederatedIdentityCredentialable) + GetGroupMembershipClaims()(*string) + GetHomeRealmDiscoveryPolicies()([]HomeRealmDiscoveryPolicyable) + GetIdentifierUris()([]string) + GetInfo()(InformationalUrlable) + GetIsDeviceOnlyAuthSupported()(*bool) + GetIsFallbackPublicClient()(*bool) + GetKeyCredentials()([]KeyCredentialable) + GetLogo()([]byte) + GetNotes()(*string) + GetOnPremisesPublishing()(OnPremisesPublishingable) + GetOptionalClaims()(OptionalClaimsable) + GetOwners()([]DirectoryObjectable) + GetParentalControlSettings()(ParentalControlSettingsable) + GetPasswordCredentials()([]PasswordCredentialable) + GetPublicClient()(PublicClientApplicationable) + GetPublisherDomain()(*string) + GetRequestSignatureVerification()(RequestSignatureVerificationable) + GetRequiredResourceAccess()([]RequiredResourceAccessable) + GetSamlMetadataUrl()(*string) + GetServiceManagementReference()(*string) + GetServicePrincipalLockConfiguration()(ServicePrincipalLockConfigurationable) + GetSignInAudience()(*string) + GetSpa()(SpaApplicationable) + GetSynchronization()(Synchronizationable) + GetTags()([]string) + GetTokenEncryptionKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetTokenIssuancePolicies()([]TokenIssuancePolicyable) + GetTokenLifetimePolicies()([]TokenLifetimePolicyable) + GetUniqueName()(*string) + GetVerifiedPublisher()(VerifiedPublisherable) + GetWeb()(WebApplicationable) + GetWindows()(WindowsApplicationable) + SetApi(value ApiApplicationable)() + SetAppId(value *string)() + SetAppManagementPolicies(value []AppManagementPolicyable)() + SetAppRoles(value []AppRoleable)() + SetCertification(value Certificationable)() + SetConnectorGroup(value ConnectorGroupable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedOnBehalfOf(value DirectoryObjectable)() + SetDefaultRedirectUri(value *string)() + SetDescription(value *string)() + SetDisabledByMicrosoftStatus(value *string)() + SetDisplayName(value *string)() + SetExtensionProperties(value []ExtensionPropertyable)() + SetFederatedIdentityCredentials(value []FederatedIdentityCredentialable)() + SetGroupMembershipClaims(value *string)() + SetHomeRealmDiscoveryPolicies(value []HomeRealmDiscoveryPolicyable)() + SetIdentifierUris(value []string)() + SetInfo(value InformationalUrlable)() + SetIsDeviceOnlyAuthSupported(value *bool)() + SetIsFallbackPublicClient(value *bool)() + SetKeyCredentials(value []KeyCredentialable)() + SetLogo(value []byte)() + SetNotes(value *string)() + SetOnPremisesPublishing(value OnPremisesPublishingable)() + SetOptionalClaims(value OptionalClaimsable)() + SetOwners(value []DirectoryObjectable)() + SetParentalControlSettings(value ParentalControlSettingsable)() + SetPasswordCredentials(value []PasswordCredentialable)() + SetPublicClient(value PublicClientApplicationable)() + SetPublisherDomain(value *string)() + SetRequestSignatureVerification(value RequestSignatureVerificationable)() + SetRequiredResourceAccess(value []RequiredResourceAccessable)() + SetSamlMetadataUrl(value *string)() + SetServiceManagementReference(value *string)() + SetServicePrincipalLockConfiguration(value ServicePrincipalLockConfigurationable)() + SetSignInAudience(value *string)() + SetSpa(value SpaApplicationable)() + SetSynchronization(value Synchronizationable)() + SetTags(value []string)() + SetTokenEncryptionKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetTokenIssuancePolicies(value []TokenIssuancePolicyable)() + SetTokenLifetimePolicies(value []TokenLifetimePolicyable)() + SetUniqueName(value *string)() + SetVerifiedPublisher(value VerifiedPublisherable)() + SetWeb(value WebApplicationable)() + SetWindows(value WindowsApplicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener.go b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener.go new file mode 100644 index 000000000..3762a4588 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedAuthenticationEventListener +type AppliedAuthenticationEventListener 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 eventType property + eventType *AuthenticationEventType + // The executedListenerId property + executedListenerId *string + // The handlerResult property + handlerResult AuthenticationEventHandlerResultable + // The OdataType property + odataType *string +} +// NewAppliedAuthenticationEventListener instantiates a new appliedAuthenticationEventListener and sets the default values. +func NewAppliedAuthenticationEventListener()(*AppliedAuthenticationEventListener) { + m := &AppliedAuthenticationEventListener{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppliedAuthenticationEventListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppliedAuthenticationEventListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppliedAuthenticationEventListener(), 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 *AppliedAuthenticationEventListener) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEventType gets the eventType property value. The eventType property +func (m *AppliedAuthenticationEventListener) GetEventType()(*AuthenticationEventType) { + return m.eventType +} +// GetExecutedListenerId gets the executedListenerId property value. The executedListenerId property +func (m *AppliedAuthenticationEventListener) GetExecutedListenerId()(*string) { + return m.executedListenerId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppliedAuthenticationEventListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["eventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationEventType) + if err != nil { + return err + } + if val != nil { + m.SetEventType(val.(*AuthenticationEventType)) + } + return nil + } + res["executedListenerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExecutedListenerId(val) + } + return nil + } + res["handlerResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationEventHandlerResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHandlerResult(val.(AuthenticationEventHandlerResultable)) + } + 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 + } + return res +} +// GetHandlerResult gets the handlerResult property value. The handlerResult property +func (m *AppliedAuthenticationEventListener) GetHandlerResult()(AuthenticationEventHandlerResultable) { + return m.handlerResult +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppliedAuthenticationEventListener) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AppliedAuthenticationEventListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEventType() != nil { + cast := (*m.GetEventType()).String() + err := writer.WriteStringValue("eventType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("executedListenerId", m.GetExecutedListenerId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("handlerResult", m.GetHandlerResult()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AppliedAuthenticationEventListener) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEventType sets the eventType property value. The eventType property +func (m *AppliedAuthenticationEventListener) SetEventType(value *AuthenticationEventType)() { + m.eventType = value +} +// SetExecutedListenerId sets the executedListenerId property value. The executedListenerId property +func (m *AppliedAuthenticationEventListener) SetExecutedListenerId(value *string)() { + m.executedListenerId = value +} +// SetHandlerResult sets the handlerResult property value. The handlerResult property +func (m *AppliedAuthenticationEventListener) SetHandlerResult(value AuthenticationEventHandlerResultable)() { + m.handlerResult = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppliedAuthenticationEventListener) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_response.go b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_response.go new file mode 100644 index 000000000..14b8fbb1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedAuthenticationEventListenerCollectionResponse +type AppliedAuthenticationEventListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppliedAuthenticationEventListenerable +} +// NewAppliedAuthenticationEventListenerCollectionResponse instantiates a new AppliedAuthenticationEventListenerCollectionResponse and sets the default values. +func NewAppliedAuthenticationEventListenerCollectionResponse()(*AppliedAuthenticationEventListenerCollectionResponse) { + m := &AppliedAuthenticationEventListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppliedAuthenticationEventListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppliedAuthenticationEventListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppliedAuthenticationEventListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppliedAuthenticationEventListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppliedAuthenticationEventListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppliedAuthenticationEventListenerable, len(val)) + for i, v := range val { + res[i] = v.(AppliedAuthenticationEventListenerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppliedAuthenticationEventListenerCollectionResponse) GetValue()([]AppliedAuthenticationEventListenerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppliedAuthenticationEventListenerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppliedAuthenticationEventListenerCollectionResponse) SetValue(value []AppliedAuthenticationEventListenerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_responseable.go b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_responseable.go new file mode 100644 index 000000000..f3091f6f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listener_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedAuthenticationEventListenerCollectionResponseable +type AppliedAuthenticationEventListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppliedAuthenticationEventListenerable) + SetValue(value []AppliedAuthenticationEventListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/applied_authentication_event_listenerable.go b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listenerable.go new file mode 100644 index 000000000..88dbaff3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_authentication_event_listenerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedAuthenticationEventListenerable +type AppliedAuthenticationEventListenerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEventType()(*AuthenticationEventType) + GetExecutedListenerId()(*string) + GetHandlerResult()(AuthenticationEventHandlerResultable) + GetOdataType()(*string) + SetEventType(value *AuthenticationEventType)() + SetExecutedListenerId(value *string)() + SetHandlerResult(value AuthenticationEventHandlerResultable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy.go b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy.go new file mode 100644 index 000000000..7e341e05e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy.go @@ -0,0 +1,388 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedConditionalAccessPolicy +type AppliedConditionalAccessPolicy 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 custom authentication strength enforced in a Conditional Access policy. + authenticationStrength AuthenticationStrengthable + // Refers to the conditional access policy conditions that are not satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. + conditionsNotSatisfied *ConditionalAccessConditions + // Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. + conditionsSatisfied *ConditionalAccessConditions + // Name of the conditional access policy. + displayName *string + // Refers to the grant controls enforced by the conditional access policy (example: 'Require multi-factor authentication'). + enforcedGrantControls []string + // Refers to the session controls enforced by the conditional access policy (example: 'Require app enforced controls'). + enforcedSessionControls []string + // List of key-value pairs containing each matched exclude condition in the conditional access policy. Example: [{'devicePlatform' : 'DevicePlatform'}] means the policy didn’t apply, because the DevicePlatform condition was a match. + excludeRulesSatisfied []ConditionalAccessRuleSatisfiedable + // Identifier of the conditional access policy. + id *string + // List of key-value pairs containing each matched include condition in the conditional access policy. Example: [{ 'application' : 'AllApps'}, {'users': 'Group'}], meaning Application condition was a match because AllApps are included and Users condition was a match because the user was part of the included Group rule. + includeRulesSatisfied []ConditionalAccessRuleSatisfiedable + // The OdataType property + odataType *string + // Indicates the result of the CA policy that was triggered. Possible values are: success, failure, notApplied (Policy isn't applied because policy conditions were not met),notEnabled (This is due to the policy in disabled state), unknown, unknownFutureValue, reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. + result *AppliedConditionalAccessPolicyResult + // Refers to the session controls that a sign-in activity did not satisfy. (Example: Application enforced Restrictions). + sessionControlsNotSatisfied []string +} +// NewAppliedConditionalAccessPolicy instantiates a new appliedConditionalAccessPolicy and sets the default values. +func NewAppliedConditionalAccessPolicy()(*AppliedConditionalAccessPolicy) { + m := &AppliedConditionalAccessPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAppliedConditionalAccessPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppliedConditionalAccessPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppliedConditionalAccessPolicy(), 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 *AppliedConditionalAccessPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationStrength gets the authenticationStrength property value. The custom authentication strength enforced in a Conditional Access policy. +func (m *AppliedConditionalAccessPolicy) GetAuthenticationStrength()(AuthenticationStrengthable) { + return m.authenticationStrength +} +// GetConditionsNotSatisfied gets the conditionsNotSatisfied property value. Refers to the conditional access policy conditions that are not satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. +func (m *AppliedConditionalAccessPolicy) GetConditionsNotSatisfied()(*ConditionalAccessConditions) { + return m.conditionsNotSatisfied +} +// GetConditionsSatisfied gets the conditionsSatisfied property value. Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. +func (m *AppliedConditionalAccessPolicy) GetConditionsSatisfied()(*ConditionalAccessConditions) { + return m.conditionsSatisfied +} +// GetDisplayName gets the displayName property value. Name of the conditional access policy. +func (m *AppliedConditionalAccessPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetEnforcedGrantControls gets the enforcedGrantControls property value. Refers to the grant controls enforced by the conditional access policy (example: 'Require multi-factor authentication'). +func (m *AppliedConditionalAccessPolicy) GetEnforcedGrantControls()([]string) { + return m.enforcedGrantControls +} +// GetEnforcedSessionControls gets the enforcedSessionControls property value. Refers to the session controls enforced by the conditional access policy (example: 'Require app enforced controls'). +func (m *AppliedConditionalAccessPolicy) GetEnforcedSessionControls()([]string) { + return m.enforcedSessionControls +} +// GetExcludeRulesSatisfied gets the excludeRulesSatisfied property value. List of key-value pairs containing each matched exclude condition in the conditional access policy. Example: [{'devicePlatform' : 'DevicePlatform'}] means the policy didn’t apply, because the DevicePlatform condition was a match. +func (m *AppliedConditionalAccessPolicy) GetExcludeRulesSatisfied()([]ConditionalAccessRuleSatisfiedable) { + return m.excludeRulesSatisfied +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppliedConditionalAccessPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationStrength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationStrengthFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStrength(val.(AuthenticationStrengthable)) + } + return nil + } + res["conditionsNotSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessConditions) + if err != nil { + return err + } + if val != nil { + m.SetConditionsNotSatisfied(val.(*ConditionalAccessConditions)) + } + return nil + } + res["conditionsSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessConditions) + if err != nil { + return err + } + if val != nil { + m.SetConditionsSatisfied(val.(*ConditionalAccessConditions)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enforcedGrantControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnforcedGrantControls(res) + } + return nil + } + res["enforcedSessionControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnforcedSessionControls(res) + } + return nil + } + res["excludeRulesSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessRuleSatisfiedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessRuleSatisfiedable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessRuleSatisfiedable) + } + m.SetExcludeRulesSatisfied(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["includeRulesSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessRuleSatisfiedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessRuleSatisfiedable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessRuleSatisfiedable) + } + m.SetIncludeRulesSatisfied(res) + } + 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["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppliedConditionalAccessPolicyResult) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*AppliedConditionalAccessPolicyResult)) + } + return nil + } + res["sessionControlsNotSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSessionControlsNotSatisfied(res) + } + return nil + } + return res +} +// GetId gets the id property value. Identifier of the conditional access policy. +func (m *AppliedConditionalAccessPolicy) GetId()(*string) { + return m.id +} +// GetIncludeRulesSatisfied gets the includeRulesSatisfied property value. List of key-value pairs containing each matched include condition in the conditional access policy. Example: [{ 'application' : 'AllApps'}, {'users': 'Group'}], meaning Application condition was a match because AllApps are included and Users condition was a match because the user was part of the included Group rule. +func (m *AppliedConditionalAccessPolicy) GetIncludeRulesSatisfied()([]ConditionalAccessRuleSatisfiedable) { + return m.includeRulesSatisfied +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AppliedConditionalAccessPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetResult gets the result property value. Indicates the result of the CA policy that was triggered. Possible values are: success, failure, notApplied (Policy isn't applied because policy conditions were not met),notEnabled (This is due to the policy in disabled state), unknown, unknownFutureValue, reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. +func (m *AppliedConditionalAccessPolicy) GetResult()(*AppliedConditionalAccessPolicyResult) { + return m.result +} +// GetSessionControlsNotSatisfied gets the sessionControlsNotSatisfied property value. Refers to the session controls that a sign-in activity did not satisfy. (Example: Application enforced Restrictions). +func (m *AppliedConditionalAccessPolicy) GetSessionControlsNotSatisfied()([]string) { + return m.sessionControlsNotSatisfied +} +// Serialize serializes information the current object +func (m *AppliedConditionalAccessPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("authenticationStrength", m.GetAuthenticationStrength()) + if err != nil { + return err + } + } + if m.GetConditionsNotSatisfied() != nil { + cast := (*m.GetConditionsNotSatisfied()).String() + err := writer.WriteStringValue("conditionsNotSatisfied", &cast) + if err != nil { + return err + } + } + if m.GetConditionsSatisfied() != nil { + cast := (*m.GetConditionsSatisfied()).String() + err := writer.WriteStringValue("conditionsSatisfied", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEnforcedGrantControls() != nil { + err := writer.WriteCollectionOfStringValues("enforcedGrantControls", m.GetEnforcedGrantControls()) + if err != nil { + return err + } + } + if m.GetEnforcedSessionControls() != nil { + err := writer.WriteCollectionOfStringValues("enforcedSessionControls", m.GetEnforcedSessionControls()) + if err != nil { + return err + } + } + if m.GetExcludeRulesSatisfied() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExcludeRulesSatisfied())) + for i, v := range m.GetExcludeRulesSatisfied() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("excludeRulesSatisfied", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetIncludeRulesSatisfied() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeRulesSatisfied())) + for i, v := range m.GetIncludeRulesSatisfied() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("includeRulesSatisfied", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err := writer.WriteStringValue("result", &cast) + if err != nil { + return err + } + } + if m.GetSessionControlsNotSatisfied() != nil { + err := writer.WriteCollectionOfStringValues("sessionControlsNotSatisfied", m.GetSessionControlsNotSatisfied()) + 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 *AppliedConditionalAccessPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationStrength sets the authenticationStrength property value. The custom authentication strength enforced in a Conditional Access policy. +func (m *AppliedConditionalAccessPolicy) SetAuthenticationStrength(value AuthenticationStrengthable)() { + m.authenticationStrength = value +} +// SetConditionsNotSatisfied sets the conditionsNotSatisfied property value. Refers to the conditional access policy conditions that are not satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. +func (m *AppliedConditionalAccessPolicy) SetConditionsNotSatisfied(value *ConditionalAccessConditions)() { + m.conditionsNotSatisfied = value +} +// SetConditionsSatisfied sets the conditionsSatisfied property value. Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client,ipAddressSeenByAzureAD,ipAddressSeenByResourceProvider,unknownFutureValue,servicePrincipals,servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals,servicePrincipalRisk. +func (m *AppliedConditionalAccessPolicy) SetConditionsSatisfied(value *ConditionalAccessConditions)() { + m.conditionsSatisfied = value +} +// SetDisplayName sets the displayName property value. Name of the conditional access policy. +func (m *AppliedConditionalAccessPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnforcedGrantControls sets the enforcedGrantControls property value. Refers to the grant controls enforced by the conditional access policy (example: 'Require multi-factor authentication'). +func (m *AppliedConditionalAccessPolicy) SetEnforcedGrantControls(value []string)() { + m.enforcedGrantControls = value +} +// SetEnforcedSessionControls sets the enforcedSessionControls property value. Refers to the session controls enforced by the conditional access policy (example: 'Require app enforced controls'). +func (m *AppliedConditionalAccessPolicy) SetEnforcedSessionControls(value []string)() { + m.enforcedSessionControls = value +} +// SetExcludeRulesSatisfied sets the excludeRulesSatisfied property value. List of key-value pairs containing each matched exclude condition in the conditional access policy. Example: [{'devicePlatform' : 'DevicePlatform'}] means the policy didn’t apply, because the DevicePlatform condition was a match. +func (m *AppliedConditionalAccessPolicy) SetExcludeRulesSatisfied(value []ConditionalAccessRuleSatisfiedable)() { + m.excludeRulesSatisfied = value +} +// SetId sets the id property value. Identifier of the conditional access policy. +func (m *AppliedConditionalAccessPolicy) SetId(value *string)() { + m.id = value +} +// SetIncludeRulesSatisfied sets the includeRulesSatisfied property value. List of key-value pairs containing each matched include condition in the conditional access policy. Example: [{ 'application' : 'AllApps'}, {'users': 'Group'}], meaning Application condition was a match because AllApps are included and Users condition was a match because the user was part of the included Group rule. +func (m *AppliedConditionalAccessPolicy) SetIncludeRulesSatisfied(value []ConditionalAccessRuleSatisfiedable)() { + m.includeRulesSatisfied = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AppliedConditionalAccessPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetResult sets the result property value. Indicates the result of the CA policy that was triggered. Possible values are: success, failure, notApplied (Policy isn't applied because policy conditions were not met),notEnabled (This is due to the policy in disabled state), unknown, unknownFutureValue, reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: reportOnlySuccess, reportOnlyFailure, reportOnlyNotApplied, reportOnlyInterrupted. +func (m *AppliedConditionalAccessPolicy) SetResult(value *AppliedConditionalAccessPolicyResult)() { + m.result = value +} +// SetSessionControlsNotSatisfied sets the sessionControlsNotSatisfied property value. Refers to the session controls that a sign-in activity did not satisfy. (Example: Application enforced Restrictions). +func (m *AppliedConditionalAccessPolicy) SetSessionControlsNotSatisfied(value []string)() { + m.sessionControlsNotSatisfied = value +} diff --git a/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_response.go new file mode 100644 index 000000000..35471c4c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedConditionalAccessPolicyCollectionResponse +type AppliedConditionalAccessPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AppliedConditionalAccessPolicyable +} +// NewAppliedConditionalAccessPolicyCollectionResponse instantiates a new AppliedConditionalAccessPolicyCollectionResponse and sets the default values. +func NewAppliedConditionalAccessPolicyCollectionResponse()(*AppliedConditionalAccessPolicyCollectionResponse) { + m := &AppliedConditionalAccessPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAppliedConditionalAccessPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAppliedConditionalAccessPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAppliedConditionalAccessPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AppliedConditionalAccessPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppliedConditionalAccessPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppliedConditionalAccessPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AppliedConditionalAccessPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AppliedConditionalAccessPolicyCollectionResponse) GetValue()([]AppliedConditionalAccessPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AppliedConditionalAccessPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AppliedConditionalAccessPolicyCollectionResponse) SetValue(value []AppliedConditionalAccessPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_responseable.go new file mode 100644 index 000000000..d9293985f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedConditionalAccessPolicyCollectionResponseable +type AppliedConditionalAccessPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AppliedConditionalAccessPolicyable) + SetValue(value []AppliedConditionalAccessPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_result.go b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_result.go new file mode 100644 index 000000000..31393e3b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policy_result.go @@ -0,0 +1,58 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AppliedConditionalAccessPolicyResult int + +const ( + SUCCESS_APPLIEDCONDITIONALACCESSPOLICYRESULT AppliedConditionalAccessPolicyResult = iota + FAILURE_APPLIEDCONDITIONALACCESSPOLICYRESULT + NOTAPPLIED_APPLIEDCONDITIONALACCESSPOLICYRESULT + NOTENABLED_APPLIEDCONDITIONALACCESSPOLICYRESULT + UNKNOWN_APPLIEDCONDITIONALACCESSPOLICYRESULT + UNKNOWNFUTUREVALUE_APPLIEDCONDITIONALACCESSPOLICYRESULT + REPORTONLYSUCCESS_APPLIEDCONDITIONALACCESSPOLICYRESULT + REPORTONLYFAILURE_APPLIEDCONDITIONALACCESSPOLICYRESULT + REPORTONLYNOTAPPLIED_APPLIEDCONDITIONALACCESSPOLICYRESULT + REPORTONLYINTERRUPTED_APPLIEDCONDITIONALACCESSPOLICYRESULT +) + +func (i AppliedConditionalAccessPolicyResult) String() string { + return []string{"success", "failure", "notApplied", "notEnabled", "unknown", "unknownFutureValue", "reportOnlySuccess", "reportOnlyFailure", "reportOnlyNotApplied", "reportOnlyInterrupted"}[i] +} +func ParseAppliedConditionalAccessPolicyResult(v string) (interface{}, error) { + result := SUCCESS_APPLIEDCONDITIONALACCESSPOLICYRESULT + switch v { + case "success": + result = SUCCESS_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "failure": + result = FAILURE_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "notApplied": + result = NOTAPPLIED_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "notEnabled": + result = NOTENABLED_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "unknown": + result = UNKNOWN_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "reportOnlySuccess": + result = REPORTONLYSUCCESS_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "reportOnlyFailure": + result = REPORTONLYFAILURE_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "reportOnlyNotApplied": + result = REPORTONLYNOTAPPLIED_APPLIEDCONDITIONALACCESSPOLICYRESULT + case "reportOnlyInterrupted": + result = REPORTONLYINTERRUPTED_APPLIEDCONDITIONALACCESSPOLICYRESULT + default: + return 0, errors.New("Unknown AppliedConditionalAccessPolicyResult value: " + v) + } + return &result, nil +} +func SerializeAppliedConditionalAccessPolicyResult(values []AppliedConditionalAccessPolicyResult) []string { + 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/applied_conditional_access_policyable.go b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policyable.go new file mode 100644 index 000000000..e8305f806 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/applied_conditional_access_policyable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AppliedConditionalAccessPolicyable +type AppliedConditionalAccessPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationStrength()(AuthenticationStrengthable) + GetConditionsNotSatisfied()(*ConditionalAccessConditions) + GetConditionsSatisfied()(*ConditionalAccessConditions) + GetDisplayName()(*string) + GetEnforcedGrantControls()([]string) + GetEnforcedSessionControls()([]string) + GetExcludeRulesSatisfied()([]ConditionalAccessRuleSatisfiedable) + GetId()(*string) + GetIncludeRulesSatisfied()([]ConditionalAccessRuleSatisfiedable) + GetOdataType()(*string) + GetResult()(*AppliedConditionalAccessPolicyResult) + GetSessionControlsNotSatisfied()([]string) + SetAuthenticationStrength(value AuthenticationStrengthable)() + SetConditionsNotSatisfied(value *ConditionalAccessConditions)() + SetConditionsSatisfied(value *ConditionalAccessConditions)() + SetDisplayName(value *string)() + SetEnforcedGrantControls(value []string)() + SetEnforcedSessionControls(value []string)() + SetExcludeRulesSatisfied(value []ConditionalAccessRuleSatisfiedable)() + SetId(value *string)() + SetIncludeRulesSatisfied(value []ConditionalAccessRuleSatisfiedable)() + SetOdataType(value *string)() + SetResult(value *AppliedConditionalAccessPolicyResult)() + SetSessionControlsNotSatisfied(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/apply_label_action.go b/src/internal/connector/graph/betasdk/models/apply_label_action.go new file mode 100644 index 000000000..18968f277 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apply_label_action.go @@ -0,0 +1,154 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplyLabelAction +type ApplyLabelAction struct { + InformationProtectionAction + // The collection of specific actions that should be taken by the consuming application to label the document. See informationProtectionAction for the full list. + actions []InformationProtectionActionable + // The actionSource property + actionSource *ActionSource + // Object that describes the details of the label to apply. + label LabelDetailsable + // If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. + responsibleSensitiveTypeIds []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewApplyLabelAction instantiates a new ApplyLabelAction and sets the default values. +func NewApplyLabelAction()(*ApplyLabelAction) { + m := &ApplyLabelAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.applyLabelAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateApplyLabelActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplyLabelActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplyLabelAction(), nil +} +// GetActions gets the actions property value. The collection of specific actions that should be taken by the consuming application to label the document. See informationProtectionAction for the full list. +func (m *ApplyLabelAction) GetActions()([]InformationProtectionActionable) { + return m.actions +} +// GetActionSource gets the actionSource property value. The actionSource property +func (m *ApplyLabelAction) GetActionSource()(*ActionSource) { + return m.actionSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplyLabelAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetActions(res) + } + return nil + } + res["actionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionSource) + if err != nil { + return err + } + if val != nil { + m.SetActionSource(val.(*ActionSource)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLabelDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(LabelDetailsable)) + } + return nil + } + res["responsibleSensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetResponsibleSensitiveTypeIds(res) + } + return nil + } + return res +} +// GetLabel gets the label property value. Object that describes the details of the label to apply. +func (m *ApplyLabelAction) GetLabel()(LabelDetailsable) { + return m.label +} +// GetResponsibleSensitiveTypeIds gets the responsibleSensitiveTypeIds property value. If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. +func (m *ApplyLabelAction) GetResponsibleSensitiveTypeIds()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.responsibleSensitiveTypeIds +} +// Serialize serializes information the current object +func (m *ApplyLabelAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActions())) + for i, v := range m.GetActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("actions", cast) + if err != nil { + return err + } + } + if m.GetActionSource() != nil { + cast := (*m.GetActionSource()).String() + err = writer.WriteStringValue("actionSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + if m.GetResponsibleSensitiveTypeIds() != nil { + err = writer.WriteCollectionOfUUIDValues("responsibleSensitiveTypeIds", m.GetResponsibleSensitiveTypeIds()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The collection of specific actions that should be taken by the consuming application to label the document. See informationProtectionAction for the full list. +func (m *ApplyLabelAction) SetActions(value []InformationProtectionActionable)() { + m.actions = value +} +// SetActionSource sets the actionSource property value. The actionSource property +func (m *ApplyLabelAction) SetActionSource(value *ActionSource)() { + m.actionSource = value +} +// SetLabel sets the label property value. Object that describes the details of the label to apply. +func (m *ApplyLabelAction) SetLabel(value LabelDetailsable)() { + m.label = value +} +// SetResponsibleSensitiveTypeIds sets the responsibleSensitiveTypeIds property value. If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. +func (m *ApplyLabelAction) SetResponsibleSensitiveTypeIds(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.responsibleSensitiveTypeIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/apply_label_actionable.go b/src/internal/connector/graph/betasdk/models/apply_label_actionable.go new file mode 100644 index 000000000..19de3d934 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/apply_label_actionable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplyLabelActionable +type ApplyLabelActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]InformationProtectionActionable) + GetActionSource()(*ActionSource) + GetLabel()(LabelDetailsable) + GetResponsibleSensitiveTypeIds()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetActions(value []InformationProtectionActionable)() + SetActionSource(value *ActionSource)() + SetLabel(value LabelDetailsable)() + SetResponsibleSensitiveTypeIds(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval.go b/src/internal/connector/graph/betasdk/models/approval.go new file mode 100644 index 000000000..cb77df32f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Approval +type Approval struct { + Entity + // The steps property + steps []ApprovalStepable +} +// NewApproval instantiates a new approval and sets the default values. +func NewApproval()(*Approval) { + m := &Approval{ + Entity: *NewEntity(), + } + return m +} +// CreateApprovalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApproval(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Approval) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["steps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApprovalStepable, len(val)) + for i, v := range val { + res[i] = v.(ApprovalStepable) + } + m.SetSteps(res) + } + return nil + } + return res +} +// GetSteps gets the steps property value. The steps property +func (m *Approval) GetSteps()([]ApprovalStepable) { + return m.steps +} +// Serialize serializes information the current object +func (m *Approval) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSteps())) + for i, v := range m.GetSteps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("steps", cast) + if err != nil { + return err + } + } + return nil +} +// SetSteps sets the steps property value. The steps property +func (m *Approval) SetSteps(value []ApprovalStepable)() { + m.steps = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_collection_response.go b/src/internal/connector/graph/betasdk/models/approval_collection_response.go new file mode 100644 index 000000000..270cd03c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalCollectionResponse +type ApprovalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Approvalable +} +// NewApprovalCollectionResponse instantiates a new ApprovalCollectionResponse and sets the default values. +func NewApprovalCollectionResponse()(*ApprovalCollectionResponse) { + m := &ApprovalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApprovalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Approvalable, len(val)) + for i, v := range val { + res[i] = v.(Approvalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApprovalCollectionResponse) GetValue()([]Approvalable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApprovalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApprovalCollectionResponse) SetValue(value []Approvalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_collection_responseable.go b/src/internal/connector/graph/betasdk/models/approval_collection_responseable.go new file mode 100644 index 000000000..04298bb88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalCollectionResponseable +type ApprovalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Approvalable) + SetValue(value []Approvalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_settings.go b/src/internal/connector/graph/betasdk/models/approval_settings.go new file mode 100644 index 000000000..67f330c3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_settings.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalSettings +type ApprovalSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // One of SingleStage, Serial, Parallel, NoApproval (default). NoApproval is used when isApprovalRequired is false. + approvalMode *string + // If approval is required, the one or two elements of this collection define each of the stages of approval. An empty array if no approval is required. + approvalStages []ApprovalStageable + // Indicates whether approval is required for requests in this policy. + isApprovalRequired *bool + // Indicates whether approval is required for a user to extend their assignment. + isApprovalRequiredForExtension *bool + // Indicates whether the requestor is required to supply a justification in their request. + isRequestorJustificationRequired *bool + // The OdataType property + odataType *string +} +// NewApprovalSettings instantiates a new approvalSettings and sets the default values. +func NewApprovalSettings()(*ApprovalSettings) { + m := &ApprovalSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateApprovalSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalSettings(), 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 *ApprovalSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApprovalMode gets the approvalMode property value. One of SingleStage, Serial, Parallel, NoApproval (default). NoApproval is used when isApprovalRequired is false. +func (m *ApprovalSettings) GetApprovalMode()(*string) { + return m.approvalMode +} +// GetApprovalStages gets the approvalStages property value. If approval is required, the one or two elements of this collection define each of the stages of approval. An empty array if no approval is required. +func (m *ApprovalSettings) GetApprovalStages()([]ApprovalStageable) { + return m.approvalStages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["approvalMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalMode(val) + } + return nil + } + res["approvalStages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApprovalStageable, len(val)) + for i, v := range val { + res[i] = v.(ApprovalStageable) + } + m.SetApprovalStages(res) + } + return nil + } + res["isApprovalRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApprovalRequired(val) + } + return nil + } + res["isApprovalRequiredForExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApprovalRequiredForExtension(val) + } + return nil + } + res["isRequestorJustificationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequestorJustificationRequired(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 + } + return res +} +// GetIsApprovalRequired gets the isApprovalRequired property value. Indicates whether approval is required for requests in this policy. +func (m *ApprovalSettings) GetIsApprovalRequired()(*bool) { + return m.isApprovalRequired +} +// GetIsApprovalRequiredForExtension gets the isApprovalRequiredForExtension property value. Indicates whether approval is required for a user to extend their assignment. +func (m *ApprovalSettings) GetIsApprovalRequiredForExtension()(*bool) { + return m.isApprovalRequiredForExtension +} +// GetIsRequestorJustificationRequired gets the isRequestorJustificationRequired property value. Indicates whether the requestor is required to supply a justification in their request. +func (m *ApprovalSettings) GetIsRequestorJustificationRequired()(*bool) { + return m.isRequestorJustificationRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ApprovalSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ApprovalSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("approvalMode", m.GetApprovalMode()) + if err != nil { + return err + } + } + if m.GetApprovalStages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApprovalStages())) + for i, v := range m.GetApprovalStages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("approvalStages", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isApprovalRequired", m.GetIsApprovalRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isApprovalRequiredForExtension", m.GetIsApprovalRequiredForExtension()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRequestorJustificationRequired", m.GetIsRequestorJustificationRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ApprovalSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApprovalMode sets the approvalMode property value. One of SingleStage, Serial, Parallel, NoApproval (default). NoApproval is used when isApprovalRequired is false. +func (m *ApprovalSettings) SetApprovalMode(value *string)() { + m.approvalMode = value +} +// SetApprovalStages sets the approvalStages property value. If approval is required, the one or two elements of this collection define each of the stages of approval. An empty array if no approval is required. +func (m *ApprovalSettings) SetApprovalStages(value []ApprovalStageable)() { + m.approvalStages = value +} +// SetIsApprovalRequired sets the isApprovalRequired property value. Indicates whether approval is required for requests in this policy. +func (m *ApprovalSettings) SetIsApprovalRequired(value *bool)() { + m.isApprovalRequired = value +} +// SetIsApprovalRequiredForExtension sets the isApprovalRequiredForExtension property value. Indicates whether approval is required for a user to extend their assignment. +func (m *ApprovalSettings) SetIsApprovalRequiredForExtension(value *bool)() { + m.isApprovalRequiredForExtension = value +} +// SetIsRequestorJustificationRequired sets the isRequestorJustificationRequired property value. Indicates whether the requestor is required to supply a justification in their request. +func (m *ApprovalSettings) SetIsRequestorJustificationRequired(value *bool)() { + m.isRequestorJustificationRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ApprovalSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_settingsable.go b/src/internal/connector/graph/betasdk/models/approval_settingsable.go new file mode 100644 index 000000000..8dc7a4c63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_settingsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalSettingsable +type ApprovalSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalMode()(*string) + GetApprovalStages()([]ApprovalStageable) + GetIsApprovalRequired()(*bool) + GetIsApprovalRequiredForExtension()(*bool) + GetIsRequestorJustificationRequired()(*bool) + GetOdataType()(*string) + SetApprovalMode(value *string)() + SetApprovalStages(value []ApprovalStageable)() + SetIsApprovalRequired(value *bool)() + SetIsApprovalRequiredForExtension(value *bool)() + SetIsRequestorJustificationRequired(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_stage.go b/src/internal/connector/graph/betasdk/models/approval_stage.go new file mode 100644 index 000000000..94a932d58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_stage.go @@ -0,0 +1,243 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStage +type ApprovalStage 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 number of days that a request can be pending a response before it is automatically denied. + approvalStageTimeOutInDays *int32 + // If escalation is enabled and the primary approvers do not respond before the escalation time, the escalationApprovers are the users who will be asked to approve requests. This can be a collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, if there are no escalation approvers, or escalation approvers are not required for the stage, the value of this property should be an empty collection. + escalationApprovers []UserSetable + // If escalation is required, the time a request can be pending a response from a primary approver. + escalationTimeInMinutes *int32 + // Indicates whether the approver is required to provide a justification for approving a request. + isApproverJustificationRequired *bool + // If true, then one or more escalation approvers are configured in this approval stage. + isEscalationEnabled *bool + // The OdataType property + odataType *string + // The users who will be asked to approve requests. A collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, include at least one userSet in this collection. + primaryApprovers []UserSetable +} +// NewApprovalStage instantiates a new approvalStage and sets the default values. +func NewApprovalStage()(*ApprovalStage) { + m := &ApprovalStage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateApprovalStageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalStageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalStage(), 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 *ApprovalStage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApprovalStageTimeOutInDays gets the approvalStageTimeOutInDays property value. The number of days that a request can be pending a response before it is automatically denied. +func (m *ApprovalStage) GetApprovalStageTimeOutInDays()(*int32) { + return m.approvalStageTimeOutInDays +} +// GetEscalationApprovers gets the escalationApprovers property value. If escalation is enabled and the primary approvers do not respond before the escalation time, the escalationApprovers are the users who will be asked to approve requests. This can be a collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, if there are no escalation approvers, or escalation approvers are not required for the stage, the value of this property should be an empty collection. +func (m *ApprovalStage) GetEscalationApprovers()([]UserSetable) { + return m.escalationApprovers +} +// GetEscalationTimeInMinutes gets the escalationTimeInMinutes property value. If escalation is required, the time a request can be pending a response from a primary approver. +func (m *ApprovalStage) GetEscalationTimeInMinutes()(*int32) { + return m.escalationTimeInMinutes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalStage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["approvalStageTimeOutInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetApprovalStageTimeOutInDays(val) + } + return nil + } + res["escalationApprovers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSetable, len(val)) + for i, v := range val { + res[i] = v.(UserSetable) + } + m.SetEscalationApprovers(res) + } + return nil + } + res["escalationTimeInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEscalationTimeInMinutes(val) + } + return nil + } + res["isApproverJustificationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApproverJustificationRequired(val) + } + return nil + } + res["isEscalationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEscalationEnabled(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["primaryApprovers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSetable, len(val)) + for i, v := range val { + res[i] = v.(UserSetable) + } + m.SetPrimaryApprovers(res) + } + return nil + } + return res +} +// GetIsApproverJustificationRequired gets the isApproverJustificationRequired property value. Indicates whether the approver is required to provide a justification for approving a request. +func (m *ApprovalStage) GetIsApproverJustificationRequired()(*bool) { + return m.isApproverJustificationRequired +} +// GetIsEscalationEnabled gets the isEscalationEnabled property value. If true, then one or more escalation approvers are configured in this approval stage. +func (m *ApprovalStage) GetIsEscalationEnabled()(*bool) { + return m.isEscalationEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ApprovalStage) GetOdataType()(*string) { + return m.odataType +} +// GetPrimaryApprovers gets the primaryApprovers property value. The users who will be asked to approve requests. A collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, include at least one userSet in this collection. +func (m *ApprovalStage) GetPrimaryApprovers()([]UserSetable) { + return m.primaryApprovers +} +// Serialize serializes information the current object +func (m *ApprovalStage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("approvalStageTimeOutInDays", m.GetApprovalStageTimeOutInDays()) + if err != nil { + return err + } + } + if m.GetEscalationApprovers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEscalationApprovers())) + for i, v := range m.GetEscalationApprovers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("escalationApprovers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("escalationTimeInMinutes", m.GetEscalationTimeInMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isApproverJustificationRequired", m.GetIsApproverJustificationRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEscalationEnabled", m.GetIsEscalationEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPrimaryApprovers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPrimaryApprovers())) + for i, v := range m.GetPrimaryApprovers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("primaryApprovers", 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 *ApprovalStage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApprovalStageTimeOutInDays sets the approvalStageTimeOutInDays property value. The number of days that a request can be pending a response before it is automatically denied. +func (m *ApprovalStage) SetApprovalStageTimeOutInDays(value *int32)() { + m.approvalStageTimeOutInDays = value +} +// SetEscalationApprovers sets the escalationApprovers property value. If escalation is enabled and the primary approvers do not respond before the escalation time, the escalationApprovers are the users who will be asked to approve requests. This can be a collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, if there are no escalation approvers, or escalation approvers are not required for the stage, the value of this property should be an empty collection. +func (m *ApprovalStage) SetEscalationApprovers(value []UserSetable)() { + m.escalationApprovers = value +} +// SetEscalationTimeInMinutes sets the escalationTimeInMinutes property value. If escalation is required, the time a request can be pending a response from a primary approver. +func (m *ApprovalStage) SetEscalationTimeInMinutes(value *int32)() { + m.escalationTimeInMinutes = value +} +// SetIsApproverJustificationRequired sets the isApproverJustificationRequired property value. Indicates whether the approver is required to provide a justification for approving a request. +func (m *ApprovalStage) SetIsApproverJustificationRequired(value *bool)() { + m.isApproverJustificationRequired = value +} +// SetIsEscalationEnabled sets the isEscalationEnabled property value. If true, then one or more escalation approvers are configured in this approval stage. +func (m *ApprovalStage) SetIsEscalationEnabled(value *bool)() { + m.isEscalationEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ApprovalStage) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrimaryApprovers sets the primaryApprovers property value. The users who will be asked to approve requests. A collection of singleUser, groupMembers, requestorManager, internalSponsors and externalSponsors. When creating or updating a policy, include at least one userSet in this collection. +func (m *ApprovalStage) SetPrimaryApprovers(value []UserSetable)() { + m.primaryApprovers = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_stage_collection_response.go b/src/internal/connector/graph/betasdk/models/approval_stage_collection_response.go new file mode 100644 index 000000000..5f8ca827c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_stage_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStageCollectionResponse +type ApprovalStageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ApprovalStageable +} +// NewApprovalStageCollectionResponse instantiates a new ApprovalStageCollectionResponse and sets the default values. +func NewApprovalStageCollectionResponse()(*ApprovalStageCollectionResponse) { + m := &ApprovalStageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApprovalStageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalStageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalStageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalStageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApprovalStageable, len(val)) + for i, v := range val { + res[i] = v.(ApprovalStageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApprovalStageCollectionResponse) GetValue()([]ApprovalStageable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApprovalStageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApprovalStageCollectionResponse) SetValue(value []ApprovalStageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_stage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/approval_stage_collection_responseable.go new file mode 100644 index 000000000..bd8ac1759 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_stage_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStageCollectionResponseable +type ApprovalStageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ApprovalStageable) + SetValue(value []ApprovalStageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_stageable.go b/src/internal/connector/graph/betasdk/models/approval_stageable.go new file mode 100644 index 000000000..f56e75841 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_stageable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStageable +type ApprovalStageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalStageTimeOutInDays()(*int32) + GetEscalationApprovers()([]UserSetable) + GetEscalationTimeInMinutes()(*int32) + GetIsApproverJustificationRequired()(*bool) + GetIsEscalationEnabled()(*bool) + GetOdataType()(*string) + GetPrimaryApprovers()([]UserSetable) + SetApprovalStageTimeOutInDays(value *int32)() + SetEscalationApprovers(value []UserSetable)() + SetEscalationTimeInMinutes(value *int32)() + SetIsApproverJustificationRequired(value *bool)() + SetIsEscalationEnabled(value *bool)() + SetOdataType(value *string)() + SetPrimaryApprovers(value []UserSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_state.go b/src/internal/connector/graph/betasdk/models/approval_state.go new file mode 100644 index 000000000..546444f79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApprovalState int + +const ( + PENDING_APPROVALSTATE ApprovalState = iota + APPROVED_APPROVALSTATE + DENIED_APPROVALSTATE + ABORTED_APPROVALSTATE + CANCELED_APPROVALSTATE +) + +func (i ApprovalState) String() string { + return []string{"pending", "approved", "denied", "aborted", "canceled"}[i] +} +func ParseApprovalState(v string) (interface{}, error) { + result := PENDING_APPROVALSTATE + switch v { + case "pending": + result = PENDING_APPROVALSTATE + case "approved": + result = APPROVED_APPROVALSTATE + case "denied": + result = DENIED_APPROVALSTATE + case "aborted": + result = ABORTED_APPROVALSTATE + case "canceled": + result = CANCELED_APPROVALSTATE + default: + return 0, errors.New("Unknown ApprovalState value: " + v) + } + return &result, nil +} +func SerializeApprovalState(values []ApprovalState) []string { + 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/approval_step.go b/src/internal/connector/graph/betasdk/models/approval_step.go new file mode 100644 index 000000000..e0c99e2d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_step.go @@ -0,0 +1,217 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStep provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ApprovalStep struct { + Entity + // Indicates whether the step is assigned to the calling user to review. Read-only. + assignedToMe *bool + // The label provided by the policy creator to identify an approval step. Read-only. + displayName *string + // The justification associated with the approval step decision. + justification *string + // The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Read-only. + reviewedBy Identityable + // The date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + reviewedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The result of this approval record. Possible values include: NotReviewed, Approved, Denied. + reviewResult *string + // The step status. Possible values: InProgress, Initializing, Completed, Expired. Read-only. + status *string +} +// NewApprovalStep instantiates a new approvalStep and sets the default values. +func NewApprovalStep()(*ApprovalStep) { + m := &ApprovalStep{ + Entity: *NewEntity(), + } + return m +} +// CreateApprovalStepFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalStepFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalStep(), nil +} +// GetAssignedToMe gets the assignedToMe property value. Indicates whether the step is assigned to the calling user to review. Read-only. +func (m *ApprovalStep) GetAssignedToMe()(*bool) { + return m.assignedToMe +} +// GetDisplayName gets the displayName property value. The label provided by the policy creator to identify an approval step. Read-only. +func (m *ApprovalStep) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalStep) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignedToMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedToMe(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["reviewedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewedBy(val.(Identityable)) + } + return nil + } + res["reviewedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewedDateTime(val) + } + return nil + } + res["reviewResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewResult(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetJustification gets the justification property value. The justification associated with the approval step decision. +func (m *ApprovalStep) GetJustification()(*string) { + return m.justification +} +// GetReviewedBy gets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Read-only. +func (m *ApprovalStep) GetReviewedBy()(Identityable) { + return m.reviewedBy +} +// GetReviewedDateTime gets the reviewedDateTime property value. The date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ApprovalStep) GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewedDateTime +} +// GetReviewResult gets the reviewResult property value. The result of this approval record. Possible values include: NotReviewed, Approved, Denied. +func (m *ApprovalStep) GetReviewResult()(*string) { + return m.reviewResult +} +// GetStatus gets the status property value. The step status. Possible values: InProgress, Initializing, Completed, Expired. Read-only. +func (m *ApprovalStep) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ApprovalStep) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("assignedToMe", m.GetAssignedToMe()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewedBy", m.GetReviewedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("reviewedDateTime", m.GetReviewedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reviewResult", m.GetReviewResult()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedToMe sets the assignedToMe property value. Indicates whether the step is assigned to the calling user to review. Read-only. +func (m *ApprovalStep) SetAssignedToMe(value *bool)() { + m.assignedToMe = value +} +// SetDisplayName sets the displayName property value. The label provided by the policy creator to identify an approval step. Read-only. +func (m *ApprovalStep) SetDisplayName(value *string)() { + m.displayName = value +} +// SetJustification sets the justification property value. The justification associated with the approval step decision. +func (m *ApprovalStep) SetJustification(value *string)() { + m.justification = value +} +// SetReviewedBy sets the reviewedBy property value. The identifier of the reviewer. 00000000-0000-0000-0000-000000000000 if the assigned reviewer hasn't reviewed. Read-only. +func (m *ApprovalStep) SetReviewedBy(value Identityable)() { + m.reviewedBy = value +} +// SetReviewedDateTime sets the reviewedDateTime property value. The date and time when a decision was recorded. The date and time information uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ApprovalStep) SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewedDateTime = value +} +// SetReviewResult sets the reviewResult property value. The result of this approval record. Possible values include: NotReviewed, Approved, Denied. +func (m *ApprovalStep) SetReviewResult(value *string)() { + m.reviewResult = value +} +// SetStatus sets the status property value. The step status. Possible values: InProgress, Initializing, Completed, Expired. Read-only. +func (m *ApprovalStep) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_step_collection_response.go b/src/internal/connector/graph/betasdk/models/approval_step_collection_response.go new file mode 100644 index 000000000..08af4bebc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_step_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStepCollectionResponse +type ApprovalStepCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ApprovalStepable +} +// NewApprovalStepCollectionResponse instantiates a new ApprovalStepCollectionResponse and sets the default values. +func NewApprovalStepCollectionResponse()(*ApprovalStepCollectionResponse) { + m := &ApprovalStepCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApprovalStepCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalStepCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalStepCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalStepCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApprovalStepable, len(val)) + for i, v := range val { + res[i] = v.(ApprovalStepable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApprovalStepCollectionResponse) GetValue()([]ApprovalStepable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApprovalStepCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApprovalStepCollectionResponse) SetValue(value []ApprovalStepable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_step_collection_responseable.go b/src/internal/connector/graph/betasdk/models/approval_step_collection_responseable.go new file mode 100644 index 000000000..5d6c5c5c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_step_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStepCollectionResponseable +type ApprovalStepCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ApprovalStepable) + SetValue(value []ApprovalStepable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_stepable.go b/src/internal/connector/graph/betasdk/models/approval_stepable.go new file mode 100644 index 000000000..d91aa51a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_stepable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalStepable +type ApprovalStepable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedToMe()(*bool) + GetDisplayName()(*string) + GetJustification()(*string) + GetReviewedBy()(Identityable) + GetReviewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewResult()(*string) + GetStatus()(*string) + SetAssignedToMe(value *bool)() + SetDisplayName(value *string)() + SetJustification(value *string)() + SetReviewedBy(value Identityable)() + SetReviewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewResult(value *string)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_workflow_provider.go b/src/internal/connector/graph/betasdk/models/approval_workflow_provider.go new file mode 100644 index 000000000..acc5cb8bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_workflow_provider.go @@ -0,0 +1,162 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalWorkflowProvider +type ApprovalWorkflowProvider struct { + Entity + // The businessFlows property + businessFlows []BusinessFlowable + // The businessFlowsWithRequestsAwaitingMyDecision property + businessFlowsWithRequestsAwaitingMyDecision []BusinessFlowable + // The displayName property + displayName *string + // The policyTemplates property + policyTemplates []GovernancePolicyTemplateable +} +// NewApprovalWorkflowProvider instantiates a new ApprovalWorkflowProvider and sets the default values. +func NewApprovalWorkflowProvider()(*ApprovalWorkflowProvider) { + m := &ApprovalWorkflowProvider{ + Entity: *NewEntity(), + } + return m +} +// CreateApprovalWorkflowProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalWorkflowProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalWorkflowProvider(), nil +} +// GetBusinessFlows gets the businessFlows property value. The businessFlows property +func (m *ApprovalWorkflowProvider) GetBusinessFlows()([]BusinessFlowable) { + return m.businessFlows +} +// GetBusinessFlowsWithRequestsAwaitingMyDecision gets the businessFlowsWithRequestsAwaitingMyDecision property value. The businessFlowsWithRequestsAwaitingMyDecision property +func (m *ApprovalWorkflowProvider) GetBusinessFlowsWithRequestsAwaitingMyDecision()([]BusinessFlowable) { + return m.businessFlowsWithRequestsAwaitingMyDecision +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ApprovalWorkflowProvider) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalWorkflowProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["businessFlows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessFlowable, len(val)) + for i, v := range val { + res[i] = v.(BusinessFlowable) + } + m.SetBusinessFlows(res) + } + return nil + } + res["businessFlowsWithRequestsAwaitingMyDecision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessFlowable, len(val)) + for i, v := range val { + res[i] = v.(BusinessFlowable) + } + m.SetBusinessFlowsWithRequestsAwaitingMyDecision(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["policyTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernancePolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernancePolicyTemplateable, len(val)) + for i, v := range val { + res[i] = v.(GovernancePolicyTemplateable) + } + m.SetPolicyTemplates(res) + } + return nil + } + return res +} +// GetPolicyTemplates gets the policyTemplates property value. The policyTemplates property +func (m *ApprovalWorkflowProvider) GetPolicyTemplates()([]GovernancePolicyTemplateable) { + return m.policyTemplates +} +// Serialize serializes information the current object +func (m *ApprovalWorkflowProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBusinessFlows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBusinessFlows())) + for i, v := range m.GetBusinessFlows() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("businessFlows", cast) + if err != nil { + return err + } + } + if m.GetBusinessFlowsWithRequestsAwaitingMyDecision() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBusinessFlowsWithRequestsAwaitingMyDecision())) + for i, v := range m.GetBusinessFlowsWithRequestsAwaitingMyDecision() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("businessFlowsWithRequestsAwaitingMyDecision", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetPolicyTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicyTemplates())) + for i, v := range m.GetPolicyTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policyTemplates", cast) + if err != nil { + return err + } + } + return nil +} +// SetBusinessFlows sets the businessFlows property value. The businessFlows property +func (m *ApprovalWorkflowProvider) SetBusinessFlows(value []BusinessFlowable)() { + m.businessFlows = value +} +// SetBusinessFlowsWithRequestsAwaitingMyDecision sets the businessFlowsWithRequestsAwaitingMyDecision property value. The businessFlowsWithRequestsAwaitingMyDecision property +func (m *ApprovalWorkflowProvider) SetBusinessFlowsWithRequestsAwaitingMyDecision(value []BusinessFlowable)() { + m.businessFlowsWithRequestsAwaitingMyDecision = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ApprovalWorkflowProvider) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPolicyTemplates sets the policyTemplates property value. The policyTemplates property +func (m *ApprovalWorkflowProvider) SetPolicyTemplates(value []GovernancePolicyTemplateable)() { + m.policyTemplates = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_response.go new file mode 100644 index 000000000..b0dea4d50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalWorkflowProviderCollectionResponse +type ApprovalWorkflowProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ApprovalWorkflowProviderable +} +// NewApprovalWorkflowProviderCollectionResponse instantiates a new ApprovalWorkflowProviderCollectionResponse and sets the default values. +func NewApprovalWorkflowProviderCollectionResponse()(*ApprovalWorkflowProviderCollectionResponse) { + m := &ApprovalWorkflowProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateApprovalWorkflowProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApprovalWorkflowProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApprovalWorkflowProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApprovalWorkflowProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalWorkflowProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApprovalWorkflowProviderable, len(val)) + for i, v := range val { + res[i] = v.(ApprovalWorkflowProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ApprovalWorkflowProviderCollectionResponse) GetValue()([]ApprovalWorkflowProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *ApprovalWorkflowProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ApprovalWorkflowProviderCollectionResponse) SetValue(value []ApprovalWorkflowProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_responseable.go new file mode 100644 index 000000000..3217e0b37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_workflow_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalWorkflowProviderCollectionResponseable +type ApprovalWorkflowProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ApprovalWorkflowProviderable) + SetValue(value []ApprovalWorkflowProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approval_workflow_providerable.go b/src/internal/connector/graph/betasdk/models/approval_workflow_providerable.go new file mode 100644 index 000000000..98667704d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approval_workflow_providerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApprovalWorkflowProviderable +type ApprovalWorkflowProviderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBusinessFlows()([]BusinessFlowable) + GetBusinessFlowsWithRequestsAwaitingMyDecision()([]BusinessFlowable) + GetDisplayName()(*string) + GetPolicyTemplates()([]GovernancePolicyTemplateable) + SetBusinessFlows(value []BusinessFlowable)() + SetBusinessFlowsWithRequestsAwaitingMyDecision(value []BusinessFlowable)() + SetDisplayName(value *string)() + SetPolicyTemplates(value []GovernancePolicyTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/approvalable.go b/src/internal/connector/graph/betasdk/models/approvalable.go new file mode 100644 index 000000000..40886d15f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/approvalable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Approvalable +type Approvalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSteps()([]ApprovalStepable) + SetSteps(value []ApprovalStepable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_label.go b/src/internal/connector/graph/betasdk/models/assigned_label.go new file mode 100644 index 000000000..453e856da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_label.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLabel +type AssignedLabel 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 display name of the label. Read-only. + displayName *string + // The unique identifier of the label. + labelId *string + // The OdataType property + odataType *string +} +// NewAssignedLabel instantiates a new assignedLabel and sets the default values. +func NewAssignedLabel()(*AssignedLabel) { + m := &AssignedLabel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignedLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedLabel(), 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 *AssignedLabel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name of the label. Read-only. +func (m *AssignedLabel) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["labelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelId(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 + } + return res +} +// GetLabelId gets the labelId property value. The unique identifier of the label. +func (m *AssignedLabel) GetLabelId()(*string) { + return m.labelId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignedLabel) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AssignedLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labelId", m.GetLabelId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AssignedLabel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name of the label. Read-only. +func (m *AssignedLabel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLabelId sets the labelId property value. The unique identifier of the label. +func (m *AssignedLabel) SetLabelId(value *string)() { + m.labelId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignedLabel) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_label_collection_response.go b/src/internal/connector/graph/betasdk/models/assigned_label_collection_response.go new file mode 100644 index 000000000..f09b6923b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_label_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLabelCollectionResponse +type AssignedLabelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignedLabelable +} +// NewAssignedLabelCollectionResponse instantiates a new AssignedLabelCollectionResponse and sets the default values. +func NewAssignedLabelCollectionResponse()(*AssignedLabelCollectionResponse) { + m := &AssignedLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignedLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedLabelable, len(val)) + for i, v := range val { + res[i] = v.(AssignedLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignedLabelCollectionResponse) GetValue()([]AssignedLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignedLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignedLabelCollectionResponse) SetValue(value []AssignedLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_label_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assigned_label_collection_responseable.go new file mode 100644 index 000000000..341c8d014 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_label_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLabelCollectionResponseable +type AssignedLabelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignedLabelable) + SetValue(value []AssignedLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_labelable.go b/src/internal/connector/graph/betasdk/models/assigned_labelable.go new file mode 100644 index 000000000..fb41b194e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_labelable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLabelable +type AssignedLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLabelId()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetLabelId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_license.go b/src/internal/connector/graph/betasdk/models/assigned_license.go new file mode 100644 index 000000000..4b0bd6e8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_license.go @@ -0,0 +1,128 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLicense +type AssignedLicense struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A collection of the unique identifiers for plans that have been disabled. + disabledPlans []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // The unique identifier for the SKU. + skuId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewAssignedLicense instantiates a new assignedLicense and sets the default values. +func NewAssignedLicense()(*AssignedLicense) { + m := &AssignedLicense{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignedLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedLicense(), 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 *AssignedLicense) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisabledPlans gets the disabledPlans property value. A collection of the unique identifiers for plans that have been disabled. +func (m *AssignedLicense) GetDisabledPlans()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.disabledPlans +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedLicense) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["disabledPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetDisabledPlans(res) + } + 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["skuId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignedLicense) GetOdataType()(*string) { + return m.odataType +} +// GetSkuId gets the skuId property value. The unique identifier for the SKU. +func (m *AssignedLicense) GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.skuId +} +// Serialize serializes information the current object +func (m *AssignedLicense) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDisabledPlans() != nil { + err := writer.WriteCollectionOfUUIDValues("disabledPlans", m.GetDisabledPlans()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("skuId", m.GetSkuId()) + 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 *AssignedLicense) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisabledPlans sets the disabledPlans property value. A collection of the unique identifiers for plans that have been disabled. +func (m *AssignedLicense) SetDisabledPlans(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.disabledPlans = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignedLicense) SetOdataType(value *string)() { + m.odataType = value +} +// SetSkuId sets the skuId property value. The unique identifier for the SKU. +func (m *AssignedLicense) SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.skuId = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_license_collection_response.go b/src/internal/connector/graph/betasdk/models/assigned_license_collection_response.go new file mode 100644 index 000000000..a9d24660c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_license_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLicenseCollectionResponse +type AssignedLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignedLicenseable +} +// NewAssignedLicenseCollectionResponse instantiates a new AssignedLicenseCollectionResponse and sets the default values. +func NewAssignedLicenseCollectionResponse()(*AssignedLicenseCollectionResponse) { + m := &AssignedLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignedLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(AssignedLicenseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignedLicenseCollectionResponse) GetValue()([]AssignedLicenseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignedLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignedLicenseCollectionResponse) SetValue(value []AssignedLicenseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_license_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assigned_license_collection_responseable.go new file mode 100644 index 000000000..cd893a0fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_license_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLicenseCollectionResponseable +type AssignedLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignedLicenseable) + SetValue(value []AssignedLicenseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_licenseable.go b/src/internal/connector/graph/betasdk/models/assigned_licenseable.go new file mode 100644 index 000000000..b3a18faa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_licenseable.go @@ -0,0 +1,18 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedLicenseable +type AssignedLicenseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisabledPlans()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetDisabledPlans(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_plan.go b/src/internal/connector/graph/betasdk/models/assigned_plan.go new file mode 100644 index 000000000..066232709 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_plan.go @@ -0,0 +1,177 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedPlan +type AssignedPlan 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 date and time at which the plan was assigned; for example: 2013-01-02T19:32:30Z. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + assignedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Condition of the capability assignment. The possible values are Enabled, Warning, Suspended, Deleted, LockedOut. + capabilityStatus *string + // The OdataType property + odataType *string + // The name of the service; for example, exchange. + service *string + // A GUID that identifies the service plan. For a complete list of GUIDs and their equivalent friendly service names, see Product names and service plan identifiers for licensing. + servicePlanId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewAssignedPlan instantiates a new assignedPlan and sets the default values. +func NewAssignedPlan()(*AssignedPlan) { + m := &AssignedPlan{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignedPlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedPlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedPlan(), 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 *AssignedPlan) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignedDateTime gets the assignedDateTime property value. The date and time at which the plan was assigned; for example: 2013-01-02T19:32:30Z. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AssignedPlan) GetAssignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.assignedDateTime +} +// GetCapabilityStatus gets the capabilityStatus property value. Condition of the capability assignment. The possible values are Enabled, Warning, Suspended, Deleted, LockedOut. +func (m *AssignedPlan) GetCapabilityStatus()(*string) { + return m.capabilityStatus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedDateTime(val) + } + return nil + } + res["capabilityStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCapabilityStatus(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["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["servicePlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignedPlan) GetOdataType()(*string) { + return m.odataType +} +// GetService gets the service property value. The name of the service; for example, exchange. +func (m *AssignedPlan) GetService()(*string) { + return m.service +} +// GetServicePlanId gets the servicePlanId property value. A GUID that identifies the service plan. For a complete list of GUIDs and their equivalent friendly service names, see Product names and service plan identifiers for licensing. +func (m *AssignedPlan) GetServicePlanId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.servicePlanId +} +// Serialize serializes information the current object +func (m *AssignedPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("assignedDateTime", m.GetAssignedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("capabilityStatus", m.GetCapabilityStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("servicePlanId", m.GetServicePlanId()) + 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 *AssignedPlan) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignedDateTime sets the assignedDateTime property value. The date and time at which the plan was assigned; for example: 2013-01-02T19:32:30Z. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *AssignedPlan) SetAssignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.assignedDateTime = value +} +// SetCapabilityStatus sets the capabilityStatus property value. Condition of the capability assignment. The possible values are Enabled, Warning, Suspended, Deleted, LockedOut. +func (m *AssignedPlan) SetCapabilityStatus(value *string)() { + m.capabilityStatus = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignedPlan) SetOdataType(value *string)() { + m.odataType = value +} +// SetService sets the service property value. The name of the service; for example, exchange. +func (m *AssignedPlan) SetService(value *string)() { + m.service = value +} +// SetServicePlanId sets the servicePlanId property value. A GUID that identifies the service plan. For a complete list of GUIDs and their equivalent friendly service names, see Product names and service plan identifiers for licensing. +func (m *AssignedPlan) SetServicePlanId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.servicePlanId = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_plan_collection_response.go b/src/internal/connector/graph/betasdk/models/assigned_plan_collection_response.go new file mode 100644 index 000000000..185867e8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_plan_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedPlanCollectionResponse +type AssignedPlanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignedPlanable +} +// NewAssignedPlanCollectionResponse instantiates a new AssignedPlanCollectionResponse and sets the default values. +func NewAssignedPlanCollectionResponse()(*AssignedPlanCollectionResponse) { + m := &AssignedPlanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignedPlanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedPlanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedPlanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedPlanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedPlanable, len(val)) + for i, v := range val { + res[i] = v.(AssignedPlanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignedPlanCollectionResponse) GetValue()([]AssignedPlanable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignedPlanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignedPlanCollectionResponse) SetValue(value []AssignedPlanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_plan_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assigned_plan_collection_responseable.go new file mode 100644 index 000000000..0ef04071c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_plan_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedPlanCollectionResponseable +type AssignedPlanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignedPlanable) + SetValue(value []AssignedPlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_planable.go b/src/internal/connector/graph/betasdk/models/assigned_planable.go new file mode 100644 index 000000000..107dd267e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_planable.go @@ -0,0 +1,23 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedPlanable +type AssignedPlanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCapabilityStatus()(*string) + GetOdataType()(*string) + GetService()(*string) + GetServicePlanId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetAssignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCapabilityStatus(value *string)() + SetOdataType(value *string)() + SetService(value *string)() + SetServicePlanId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_training_info.go b/src/internal/connector/graph/betasdk/models/assigned_training_info.go new file mode 100644 index 000000000..1e79724b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_training_info.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedTrainingInfo +type AssignedTrainingInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Number of users who were assigned the training in an attack simulation and training campaign. + assignedUserCount *int32 + // Number of users who completed the training in an attack simulation and training campaign. + completedUserCount *int32 + // Display name of the training in an attack simulation and training campaign. + displayName *string + // The OdataType property + odataType *string +} +// NewAssignedTrainingInfo instantiates a new assignedTrainingInfo and sets the default values. +func NewAssignedTrainingInfo()(*AssignedTrainingInfo) { + m := &AssignedTrainingInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignedTrainingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedTrainingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedTrainingInfo(), 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 *AssignedTrainingInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignedUserCount gets the assignedUserCount property value. Number of users who were assigned the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) GetAssignedUserCount()(*int32) { + return m.assignedUserCount +} +// GetCompletedUserCount gets the completedUserCount property value. Number of users who completed the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) GetCompletedUserCount()(*int32) { + return m.completedUserCount +} +// GetDisplayName gets the displayName property value. Display name of the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedTrainingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAssignedUserCount(val) + } + return nil + } + res["completedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompletedUserCount(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignedTrainingInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AssignedTrainingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("assignedUserCount", m.GetAssignedUserCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("completedUserCount", m.GetCompletedUserCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AssignedTrainingInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignedUserCount sets the assignedUserCount property value. Number of users who were assigned the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) SetAssignedUserCount(value *int32)() { + m.assignedUserCount = value +} +// SetCompletedUserCount sets the completedUserCount property value. Number of users who completed the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) SetCompletedUserCount(value *int32)() { + m.completedUserCount = value +} +// SetDisplayName sets the displayName property value. Display name of the training in an attack simulation and training campaign. +func (m *AssignedTrainingInfo) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignedTrainingInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_response.go b/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_response.go new file mode 100644 index 000000000..25152bea2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedTrainingInfoCollectionResponse +type AssignedTrainingInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignedTrainingInfoable +} +// NewAssignedTrainingInfoCollectionResponse instantiates a new AssignedTrainingInfoCollectionResponse and sets the default values. +func NewAssignedTrainingInfoCollectionResponse()(*AssignedTrainingInfoCollectionResponse) { + m := &AssignedTrainingInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignedTrainingInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignedTrainingInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignedTrainingInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignedTrainingInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedTrainingInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedTrainingInfoable, len(val)) + for i, v := range val { + res[i] = v.(AssignedTrainingInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignedTrainingInfoCollectionResponse) GetValue()([]AssignedTrainingInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignedTrainingInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignedTrainingInfoCollectionResponse) SetValue(value []AssignedTrainingInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_responseable.go new file mode 100644 index 000000000..22cfe2901 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_training_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedTrainingInfoCollectionResponseable +type AssignedTrainingInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignedTrainingInfoable) + SetValue(value []AssignedTrainingInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assigned_training_infoable.go b/src/internal/connector/graph/betasdk/models/assigned_training_infoable.go new file mode 100644 index 000000000..b21da3e99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assigned_training_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignedTrainingInfoable +type AssignedTrainingInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedUserCount()(*int32) + GetCompletedUserCount()(*int32) + GetDisplayName()(*string) + GetOdataType()(*string) + SetAssignedUserCount(value *int32)() + SetCompletedUserCount(value *int32)() + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_result.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_result.go new file mode 100644 index 000000000..f2860b80b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_result.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type AssignmentFilterEvaluationResult int + +const ( + // Unknown. + UNKNOWN_ASSIGNMENTFILTEREVALUATIONRESULT AssignmentFilterEvaluationResult = iota + // Match. + MATCH_ASSIGNMENTFILTEREVALUATIONRESULT + // NotMatch. + NOTMATCH_ASSIGNMENTFILTEREVALUATIONRESULT + // Inconclusive. + INCONCLUSIVE_ASSIGNMENTFILTEREVALUATIONRESULT + // Failure. + FAILURE_ASSIGNMENTFILTEREVALUATIONRESULT + // NotEvaluated. + NOTEVALUATED_ASSIGNMENTFILTEREVALUATIONRESULT +) + +func (i AssignmentFilterEvaluationResult) String() string { + return []string{"unknown", "match", "notMatch", "inconclusive", "failure", "notEvaluated"}[i] +} +func ParseAssignmentFilterEvaluationResult(v string) (interface{}, error) { + result := UNKNOWN_ASSIGNMENTFILTEREVALUATIONRESULT + switch v { + case "unknown": + result = UNKNOWN_ASSIGNMENTFILTEREVALUATIONRESULT + case "match": + result = MATCH_ASSIGNMENTFILTEREVALUATIONRESULT + case "notMatch": + result = NOTMATCH_ASSIGNMENTFILTEREVALUATIONRESULT + case "inconclusive": + result = INCONCLUSIVE_ASSIGNMENTFILTEREVALUATIONRESULT + case "failure": + result = FAILURE_ASSIGNMENTFILTEREVALUATIONRESULT + case "notEvaluated": + result = NOTEVALUATED_ASSIGNMENTFILTEREVALUATIONRESULT + default: + return 0, errors.New("Unknown AssignmentFilterEvaluationResult value: " + v) + } + return &result, nil +} +func SerializeAssignmentFilterEvaluationResult(values []AssignmentFilterEvaluationResult) []string { + 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/assignment_filter_evaluation_status_details.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details.go new file mode 100644 index 000000000..8b782b37f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationStatusDetails a class containing information about the payloads on which filter has been applied. +type AssignmentFilterEvaluationStatusDetails struct { + Entity + // PayloadId on which filter has been applied. + payloadId *string +} +// NewAssignmentFilterEvaluationStatusDetails instantiates a new assignmentFilterEvaluationStatusDetails and sets the default values. +func NewAssignmentFilterEvaluationStatusDetails()(*AssignmentFilterEvaluationStatusDetails) { + m := &AssignmentFilterEvaluationStatusDetails{ + Entity: *NewEntity(), + } + return m +} +// CreateAssignmentFilterEvaluationStatusDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterEvaluationStatusDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterEvaluationStatusDetails(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterEvaluationStatusDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["payloadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadId(val) + } + return nil + } + return res +} +// GetPayloadId gets the payloadId property value. PayloadId on which filter has been applied. +func (m *AssignmentFilterEvaluationStatusDetails) GetPayloadId()(*string) { + return m.payloadId +} +// Serialize serializes information the current object +func (m *AssignmentFilterEvaluationStatusDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("payloadId", m.GetPayloadId()) + if err != nil { + return err + } + } + return nil +} +// SetPayloadId sets the payloadId property value. PayloadId on which filter has been applied. +func (m *AssignmentFilterEvaluationStatusDetails) SetPayloadId(value *string)() { + m.payloadId = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_response.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_response.go new file mode 100644 index 000000000..36708a27d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationStatusDetailsCollectionResponse +type AssignmentFilterEvaluationStatusDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignmentFilterEvaluationStatusDetailsable +} +// NewAssignmentFilterEvaluationStatusDetailsCollectionResponse instantiates a new AssignmentFilterEvaluationStatusDetailsCollectionResponse and sets the default values. +func NewAssignmentFilterEvaluationStatusDetailsCollectionResponse()(*AssignmentFilterEvaluationStatusDetailsCollectionResponse) { + m := &AssignmentFilterEvaluationStatusDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignmentFilterEvaluationStatusDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterEvaluationStatusDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterEvaluationStatusDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterEvaluationStatusDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignmentFilterEvaluationStatusDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignmentFilterEvaluationStatusDetailsable, len(val)) + for i, v := range val { + res[i] = v.(AssignmentFilterEvaluationStatusDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignmentFilterEvaluationStatusDetailsCollectionResponse) GetValue()([]AssignmentFilterEvaluationStatusDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignmentFilterEvaluationStatusDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignmentFilterEvaluationStatusDetailsCollectionResponse) SetValue(value []AssignmentFilterEvaluationStatusDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_responseable.go new file mode 100644 index 000000000..b8d1f2efe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationStatusDetailsCollectionResponseable +type AssignmentFilterEvaluationStatusDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignmentFilterEvaluationStatusDetailsable) + SetValue(value []AssignmentFilterEvaluationStatusDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_detailsable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_detailsable.go new file mode 100644 index 000000000..fb1a799a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_status_detailsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationStatusDetailsable +type AssignmentFilterEvaluationStatusDetailsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayloadId()(*string) + SetPayloadId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary.go new file mode 100644 index 000000000..71e0f6fba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary.go @@ -0,0 +1,291 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationSummary represent result summary for assignment filter evaluation +type AssignmentFilterEvaluationSummary 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 admin defined name for assignment filter. + assignmentFilterDisplayName *string + // Unique identifier for the assignment filter object + assignmentFilterId *string + // The time the assignment filter was last modified. + assignmentFilterLastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Supported platform types. + assignmentFilterPlatform *DevicePlatformType + // Represents type of the assignment filter. + assignmentFilterType *DeviceAndAppManagementAssignmentFilterType + // A collection of filter types and their corresponding evaluation results. + assignmentFilterTypeAndEvaluationResults []AssignmentFilterTypeAndEvaluationResultable + // The time assignment filter was evaluated. + evaluationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Supported evaluation results for filter. + evaluationResult *AssignmentFilterEvaluationResult + // The OdataType property + odataType *string +} +// NewAssignmentFilterEvaluationSummary instantiates a new assignmentFilterEvaluationSummary and sets the default values. +func NewAssignmentFilterEvaluationSummary()(*AssignmentFilterEvaluationSummary) { + m := &AssignmentFilterEvaluationSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignmentFilterEvaluationSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterEvaluationSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterEvaluationSummary(), 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 *AssignmentFilterEvaluationSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentFilterDisplayName gets the assignmentFilterDisplayName property value. The admin defined name for assignment filter. +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterDisplayName()(*string) { + return m.assignmentFilterDisplayName +} +// GetAssignmentFilterId gets the assignmentFilterId property value. Unique identifier for the assignment filter object +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterId()(*string) { + return m.assignmentFilterId +} +// GetAssignmentFilterLastModifiedDateTime gets the assignmentFilterLastModifiedDateTime property value. The time the assignment filter was last modified. +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.assignmentFilterLastModifiedDateTime +} +// GetAssignmentFilterPlatform gets the assignmentFilterPlatform property value. Supported platform types. +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterPlatform()(*DevicePlatformType) { + return m.assignmentFilterPlatform +} +// GetAssignmentFilterType gets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) { + return m.assignmentFilterType +} +// GetAssignmentFilterTypeAndEvaluationResults gets the assignmentFilterTypeAndEvaluationResults property value. A collection of filter types and their corresponding evaluation results. +func (m *AssignmentFilterEvaluationSummary) GetAssignmentFilterTypeAndEvaluationResults()([]AssignmentFilterTypeAndEvaluationResultable) { + return m.assignmentFilterTypeAndEvaluationResults +} +// GetEvaluationDateTime gets the evaluationDateTime property value. The time assignment filter was evaluated. +func (m *AssignmentFilterEvaluationSummary) GetEvaluationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.evaluationDateTime +} +// GetEvaluationResult gets the evaluationResult property value. Supported evaluation results for filter. +func (m *AssignmentFilterEvaluationSummary) GetEvaluationResult()(*AssignmentFilterEvaluationResult) { + return m.evaluationResult +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterEvaluationSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentFilterDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterDisplayName(val) + } + return nil + } + res["assignmentFilterId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterId(val) + } + return nil + } + res["assignmentFilterLastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterLastModifiedDateTime(val) + } + return nil + } + res["assignmentFilterPlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterPlatform(val.(*DevicePlatformType)) + } + return nil + } + res["assignmentFilterType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentFilterType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterType(val.(*DeviceAndAppManagementAssignmentFilterType)) + } + return nil + } + res["assignmentFilterTypeAndEvaluationResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignmentFilterTypeAndEvaluationResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignmentFilterTypeAndEvaluationResultable, len(val)) + for i, v := range val { + res[i] = v.(AssignmentFilterTypeAndEvaluationResultable) + } + m.SetAssignmentFilterTypeAndEvaluationResults(res) + } + return nil + } + res["evaluationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEvaluationDateTime(val) + } + return nil + } + res["evaluationResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssignmentFilterEvaluationResult) + if err != nil { + return err + } + if val != nil { + m.SetEvaluationResult(val.(*AssignmentFilterEvaluationResult)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignmentFilterEvaluationSummary) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AssignmentFilterEvaluationSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignmentFilterDisplayName", m.GetAssignmentFilterDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("assignmentFilterId", m.GetAssignmentFilterId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("assignmentFilterLastModifiedDateTime", m.GetAssignmentFilterLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetAssignmentFilterPlatform() != nil { + cast := (*m.GetAssignmentFilterPlatform()).String() + err := writer.WriteStringValue("assignmentFilterPlatform", &cast) + if err != nil { + return err + } + } + if m.GetAssignmentFilterType() != nil { + cast := (*m.GetAssignmentFilterType()).String() + err := writer.WriteStringValue("assignmentFilterType", &cast) + if err != nil { + return err + } + } + if m.GetAssignmentFilterTypeAndEvaluationResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentFilterTypeAndEvaluationResults())) + for i, v := range m.GetAssignmentFilterTypeAndEvaluationResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("assignmentFilterTypeAndEvaluationResults", cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("evaluationDateTime", m.GetEvaluationDateTime()) + if err != nil { + return err + } + } + if m.GetEvaluationResult() != nil { + cast := (*m.GetEvaluationResult()).String() + err := writer.WriteStringValue("evaluationResult", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AssignmentFilterEvaluationSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentFilterDisplayName sets the assignmentFilterDisplayName property value. The admin defined name for assignment filter. +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterDisplayName(value *string)() { + m.assignmentFilterDisplayName = value +} +// SetAssignmentFilterId sets the assignmentFilterId property value. Unique identifier for the assignment filter object +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterId(value *string)() { + m.assignmentFilterId = value +} +// SetAssignmentFilterLastModifiedDateTime sets the assignmentFilterLastModifiedDateTime property value. The time the assignment filter was last modified. +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.assignmentFilterLastModifiedDateTime = value +} +// SetAssignmentFilterPlatform sets the assignmentFilterPlatform property value. Supported platform types. +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterPlatform(value *DevicePlatformType)() { + m.assignmentFilterPlatform = value +} +// SetAssignmentFilterType sets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() { + m.assignmentFilterType = value +} +// SetAssignmentFilterTypeAndEvaluationResults sets the assignmentFilterTypeAndEvaluationResults property value. A collection of filter types and their corresponding evaluation results. +func (m *AssignmentFilterEvaluationSummary) SetAssignmentFilterTypeAndEvaluationResults(value []AssignmentFilterTypeAndEvaluationResultable)() { + m.assignmentFilterTypeAndEvaluationResults = value +} +// SetEvaluationDateTime sets the evaluationDateTime property value. The time assignment filter was evaluated. +func (m *AssignmentFilterEvaluationSummary) SetEvaluationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.evaluationDateTime = value +} +// SetEvaluationResult sets the evaluationResult property value. Supported evaluation results for filter. +func (m *AssignmentFilterEvaluationSummary) SetEvaluationResult(value *AssignmentFilterEvaluationResult)() { + m.evaluationResult = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignmentFilterEvaluationSummary) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_response.go new file mode 100644 index 000000000..2856bded6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationSummaryCollectionResponse +type AssignmentFilterEvaluationSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignmentFilterEvaluationSummaryable +} +// NewAssignmentFilterEvaluationSummaryCollectionResponse instantiates a new AssignmentFilterEvaluationSummaryCollectionResponse and sets the default values. +func NewAssignmentFilterEvaluationSummaryCollectionResponse()(*AssignmentFilterEvaluationSummaryCollectionResponse) { + m := &AssignmentFilterEvaluationSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignmentFilterEvaluationSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterEvaluationSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterEvaluationSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterEvaluationSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignmentFilterEvaluationSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignmentFilterEvaluationSummaryable, len(val)) + for i, v := range val { + res[i] = v.(AssignmentFilterEvaluationSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignmentFilterEvaluationSummaryCollectionResponse) GetValue()([]AssignmentFilterEvaluationSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignmentFilterEvaluationSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignmentFilterEvaluationSummaryCollectionResponse) SetValue(value []AssignmentFilterEvaluationSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_responseable.go new file mode 100644 index 000000000..e715821c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationSummaryCollectionResponseable +type AssignmentFilterEvaluationSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignmentFilterEvaluationSummaryable) + SetValue(value []AssignmentFilterEvaluationSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summaryable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summaryable.go new file mode 100644 index 000000000..1e5d58ef9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_evaluation_summaryable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterEvaluationSummaryable +type AssignmentFilterEvaluationSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentFilterDisplayName()(*string) + GetAssignmentFilterId()(*string) + GetAssignmentFilterLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAssignmentFilterPlatform()(*DevicePlatformType) + GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) + GetAssignmentFilterTypeAndEvaluationResults()([]AssignmentFilterTypeAndEvaluationResultable) + GetEvaluationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEvaluationResult()(*AssignmentFilterEvaluationResult) + GetOdataType()(*string) + SetAssignmentFilterDisplayName(value *string)() + SetAssignmentFilterId(value *string)() + SetAssignmentFilterLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAssignmentFilterPlatform(value *DevicePlatformType)() + SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() + SetAssignmentFilterTypeAndEvaluationResults(value []AssignmentFilterTypeAndEvaluationResultable)() + SetEvaluationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEvaluationResult(value *AssignmentFilterEvaluationResult)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_payload_type.go b/src/internal/connector/graph/betasdk/models/assignment_filter_payload_type.go new file mode 100644 index 000000000..296fcf131 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_payload_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AssignmentFilterPayloadType int + +const ( + // NotSet + NOTSET_ASSIGNMENTFILTERPAYLOADTYPE AssignmentFilterPayloadType = iota + // EnrollmentRestrictions + ENROLLMENTRESTRICTIONS_ASSIGNMENTFILTERPAYLOADTYPE +) + +func (i AssignmentFilterPayloadType) String() string { + return []string{"notSet", "enrollmentRestrictions"}[i] +} +func ParseAssignmentFilterPayloadType(v string) (interface{}, error) { + result := NOTSET_ASSIGNMENTFILTERPAYLOADTYPE + switch v { + case "notSet": + result = NOTSET_ASSIGNMENTFILTERPAYLOADTYPE + case "enrollmentRestrictions": + result = ENROLLMENTRESTRICTIONS_ASSIGNMENTFILTERPAYLOADTYPE + default: + return 0, errors.New("Unknown AssignmentFilterPayloadType value: " + v) + } + return &result, nil +} +func SerializeAssignmentFilterPayloadType(values []AssignmentFilterPayloadType) []string { + 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/assignment_filter_type_and_evaluation_result.go b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result.go new file mode 100644 index 000000000..b0f9d7ad3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterTypeAndEvaluationResult represents the filter type and evalaution result of the filter. +type AssignmentFilterTypeAndEvaluationResult struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents type of the assignment filter. + assignmentFilterType *DeviceAndAppManagementAssignmentFilterType + // Supported evaluation results for filter. + evaluationResult *AssignmentFilterEvaluationResult + // The OdataType property + odataType *string +} +// NewAssignmentFilterTypeAndEvaluationResult instantiates a new assignmentFilterTypeAndEvaluationResult and sets the default values. +func NewAssignmentFilterTypeAndEvaluationResult()(*AssignmentFilterTypeAndEvaluationResult) { + m := &AssignmentFilterTypeAndEvaluationResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignmentFilterTypeAndEvaluationResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterTypeAndEvaluationResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterTypeAndEvaluationResult(), 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 *AssignmentFilterTypeAndEvaluationResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentFilterType gets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *AssignmentFilterTypeAndEvaluationResult) GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) { + return m.assignmentFilterType +} +// GetEvaluationResult gets the evaluationResult property value. Supported evaluation results for filter. +func (m *AssignmentFilterTypeAndEvaluationResult) GetEvaluationResult()(*AssignmentFilterEvaluationResult) { + return m.evaluationResult +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterTypeAndEvaluationResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentFilterType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentFilterType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterType(val.(*DeviceAndAppManagementAssignmentFilterType)) + } + return nil + } + res["evaluationResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssignmentFilterEvaluationResult) + if err != nil { + return err + } + if val != nil { + m.SetEvaluationResult(val.(*AssignmentFilterEvaluationResult)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignmentFilterTypeAndEvaluationResult) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AssignmentFilterTypeAndEvaluationResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentFilterType() != nil { + cast := (*m.GetAssignmentFilterType()).String() + err := writer.WriteStringValue("assignmentFilterType", &cast) + if err != nil { + return err + } + } + if m.GetEvaluationResult() != nil { + cast := (*m.GetEvaluationResult()).String() + err := writer.WriteStringValue("evaluationResult", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AssignmentFilterTypeAndEvaluationResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentFilterType sets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *AssignmentFilterTypeAndEvaluationResult) SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() { + m.assignmentFilterType = value +} +// SetEvaluationResult sets the evaluationResult property value. Supported evaluation results for filter. +func (m *AssignmentFilterTypeAndEvaluationResult) SetEvaluationResult(value *AssignmentFilterEvaluationResult)() { + m.evaluationResult = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignmentFilterTypeAndEvaluationResult) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_response.go b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_response.go new file mode 100644 index 000000000..5985a7046 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterTypeAndEvaluationResultCollectionResponse +type AssignmentFilterTypeAndEvaluationResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssignmentFilterTypeAndEvaluationResultable +} +// NewAssignmentFilterTypeAndEvaluationResultCollectionResponse instantiates a new AssignmentFilterTypeAndEvaluationResultCollectionResponse and sets the default values. +func NewAssignmentFilterTypeAndEvaluationResultCollectionResponse()(*AssignmentFilterTypeAndEvaluationResultCollectionResponse) { + m := &AssignmentFilterTypeAndEvaluationResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssignmentFilterTypeAndEvaluationResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentFilterTypeAndEvaluationResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentFilterTypeAndEvaluationResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentFilterTypeAndEvaluationResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignmentFilterTypeAndEvaluationResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignmentFilterTypeAndEvaluationResultable, len(val)) + for i, v := range val { + res[i] = v.(AssignmentFilterTypeAndEvaluationResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssignmentFilterTypeAndEvaluationResultCollectionResponse) GetValue()([]AssignmentFilterTypeAndEvaluationResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssignmentFilterTypeAndEvaluationResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssignmentFilterTypeAndEvaluationResultCollectionResponse) SetValue(value []AssignmentFilterTypeAndEvaluationResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_responseable.go new file mode 100644 index 000000000..1993b332f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterTypeAndEvaluationResultCollectionResponseable +type AssignmentFilterTypeAndEvaluationResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssignmentFilterTypeAndEvaluationResultable) + SetValue(value []AssignmentFilterTypeAndEvaluationResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_resultable.go b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_resultable.go new file mode 100644 index 000000000..5341130b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_filter_type_and_evaluation_resultable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentFilterTypeAndEvaluationResultable +type AssignmentFilterTypeAndEvaluationResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) + GetEvaluationResult()(*AssignmentFilterEvaluationResult) + GetOdataType()(*string) + SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() + SetEvaluationResult(value *AssignmentFilterEvaluationResult)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_method.go b/src/internal/connector/graph/betasdk/models/assignment_method.go new file mode 100644 index 000000000..3f3af7b41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_method.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to call the evaluateApplication method. +type AssignmentMethod int + +const ( + STANDARD_ASSIGNMENTMETHOD AssignmentMethod = iota + PRIVILEGED_ASSIGNMENTMETHOD + AUTO_ASSIGNMENTMETHOD +) + +func (i AssignmentMethod) String() string { + return []string{"standard", "privileged", "auto"}[i] +} +func ParseAssignmentMethod(v string) (interface{}, error) { + result := STANDARD_ASSIGNMENTMETHOD + switch v { + case "standard": + result = STANDARD_ASSIGNMENTMETHOD + case "privileged": + result = PRIVILEGED_ASSIGNMENTMETHOD + case "auto": + result = AUTO_ASSIGNMENTMETHOD + default: + return 0, errors.New("Unknown AssignmentMethod value: " + v) + } + return &result, nil +} +func SerializeAssignmentMethod(values []AssignmentMethod) []string { + 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/assignment_review_settings.go b/src/internal/connector/graph/betasdk/models/assignment_review_settings.go new file mode 100644 index 000000000..0cebc3c7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_review_settings.go @@ -0,0 +1,315 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentReviewSettings +type AssignmentReviewSettings struct { + // The default decision to apply if the request is not reviewed within the period specified in durationInDays. The possible values are: acceptAccessRecommendation, keepAccess, removeAccess, and unknownFutureValue. + accessReviewTimeoutBehavior *AccessReviewTimeoutBehavior + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The number of days within which reviewers should provide input. + durationInDays *int32 + // Specifies whether to display recommendations to the reviewer. The default value is true + isAccessRecommendationEnabled *bool + // Specifies whether the reviewer must provide justification for the approval. The default value is true. + isApprovalJustificationRequired *bool + // If true, access reviews are required for assignments from this policy. + isEnabled *bool + // The OdataType property + odataType *string + // The interval for recurrence, such as monthly or quarterly. + recurrenceType *string + // If the reviewerType is Reviewers, this collection specifies the users who will be reviewers, either by ID or as members of a group, using a collection of singleUser and groupMembers. + reviewers []UserSetable + // Who should be asked to do the review, either Self or Reviewers. + reviewerType *string + // When the first review should start. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAssignmentReviewSettings instantiates a new assignmentReviewSettings and sets the default values. +func NewAssignmentReviewSettings()(*AssignmentReviewSettings) { + m := &AssignmentReviewSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAssignmentReviewSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssignmentReviewSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssignmentReviewSettings(), nil +} +// GetAccessReviewTimeoutBehavior gets the accessReviewTimeoutBehavior property value. The default decision to apply if the request is not reviewed within the period specified in durationInDays. The possible values are: acceptAccessRecommendation, keepAccess, removeAccess, and unknownFutureValue. +func (m *AssignmentReviewSettings) GetAccessReviewTimeoutBehavior()(*AccessReviewTimeoutBehavior) { + return m.accessReviewTimeoutBehavior +} +// 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 *AssignmentReviewSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDurationInDays gets the durationInDays property value. The number of days within which reviewers should provide input. +func (m *AssignmentReviewSettings) GetDurationInDays()(*int32) { + return m.durationInDays +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssignmentReviewSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessReviewTimeoutBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessReviewTimeoutBehavior) + if err != nil { + return err + } + if val != nil { + m.SetAccessReviewTimeoutBehavior(val.(*AccessReviewTimeoutBehavior)) + } + return nil + } + res["durationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInDays(val) + } + return nil + } + res["isAccessRecommendationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAccessRecommendationEnabled(val) + } + return nil + } + res["isApprovalJustificationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApprovalJustificationRequired(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["recurrenceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceType(val) + } + return nil + } + res["reviewers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSetable, len(val)) + for i, v := range val { + res[i] = v.(UserSetable) + } + m.SetReviewers(res) + } + return nil + } + res["reviewerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewerType(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetIsAccessRecommendationEnabled gets the isAccessRecommendationEnabled property value. Specifies whether to display recommendations to the reviewer. The default value is true +func (m *AssignmentReviewSettings) GetIsAccessRecommendationEnabled()(*bool) { + return m.isAccessRecommendationEnabled +} +// GetIsApprovalJustificationRequired gets the isApprovalJustificationRequired property value. Specifies whether the reviewer must provide justification for the approval. The default value is true. +func (m *AssignmentReviewSettings) GetIsApprovalJustificationRequired()(*bool) { + return m.isApprovalJustificationRequired +} +// GetIsEnabled gets the isEnabled property value. If true, access reviews are required for assignments from this policy. +func (m *AssignmentReviewSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AssignmentReviewSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrenceType gets the recurrenceType property value. The interval for recurrence, such as monthly or quarterly. +func (m *AssignmentReviewSettings) GetRecurrenceType()(*string) { + return m.recurrenceType +} +// GetReviewers gets the reviewers property value. If the reviewerType is Reviewers, this collection specifies the users who will be reviewers, either by ID or as members of a group, using a collection of singleUser and groupMembers. +func (m *AssignmentReviewSettings) GetReviewers()([]UserSetable) { + return m.reviewers +} +// GetReviewerType gets the reviewerType property value. Who should be asked to do the review, either Self or Reviewers. +func (m *AssignmentReviewSettings) GetReviewerType()(*string) { + return m.reviewerType +} +// GetStartDateTime gets the startDateTime property value. When the first review should start. +func (m *AssignmentReviewSettings) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *AssignmentReviewSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessReviewTimeoutBehavior() != nil { + cast := (*m.GetAccessReviewTimeoutBehavior()).String() + err := writer.WriteStringValue("accessReviewTimeoutBehavior", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("durationInDays", m.GetDurationInDays()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAccessRecommendationEnabled", m.GetIsAccessRecommendationEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isApprovalJustificationRequired", m.GetIsApprovalJustificationRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recurrenceType", m.GetRecurrenceType()) + if err != nil { + return err + } + } + if m.GetReviewers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewers())) + for i, v := range m.GetReviewers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("reviewers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reviewerType", m.GetReviewerType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessReviewTimeoutBehavior sets the accessReviewTimeoutBehavior property value. The default decision to apply if the request is not reviewed within the period specified in durationInDays. The possible values are: acceptAccessRecommendation, keepAccess, removeAccess, and unknownFutureValue. +func (m *AssignmentReviewSettings) SetAccessReviewTimeoutBehavior(value *AccessReviewTimeoutBehavior)() { + m.accessReviewTimeoutBehavior = value +} +// 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 *AssignmentReviewSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDurationInDays sets the durationInDays property value. The number of days within which reviewers should provide input. +func (m *AssignmentReviewSettings) SetDurationInDays(value *int32)() { + m.durationInDays = value +} +// SetIsAccessRecommendationEnabled sets the isAccessRecommendationEnabled property value. Specifies whether to display recommendations to the reviewer. The default value is true +func (m *AssignmentReviewSettings) SetIsAccessRecommendationEnabled(value *bool)() { + m.isAccessRecommendationEnabled = value +} +// SetIsApprovalJustificationRequired sets the isApprovalJustificationRequired property value. Specifies whether the reviewer must provide justification for the approval. The default value is true. +func (m *AssignmentReviewSettings) SetIsApprovalJustificationRequired(value *bool)() { + m.isApprovalJustificationRequired = value +} +// SetIsEnabled sets the isEnabled property value. If true, access reviews are required for assignments from this policy. +func (m *AssignmentReviewSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AssignmentReviewSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrenceType sets the recurrenceType property value. The interval for recurrence, such as monthly or quarterly. +func (m *AssignmentReviewSettings) SetRecurrenceType(value *string)() { + m.recurrenceType = value +} +// SetReviewers sets the reviewers property value. If the reviewerType is Reviewers, this collection specifies the users who will be reviewers, either by ID or as members of a group, using a collection of singleUser and groupMembers. +func (m *AssignmentReviewSettings) SetReviewers(value []UserSetable)() { + m.reviewers = value +} +// SetReviewerType sets the reviewerType property value. Who should be asked to do the review, either Self or Reviewers. +func (m *AssignmentReviewSettings) SetReviewerType(value *string)() { + m.reviewerType = value +} +// SetStartDateTime sets the startDateTime property value. When the first review should start. +func (m *AssignmentReviewSettings) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/assignment_review_settingsable.go b/src/internal/connector/graph/betasdk/models/assignment_review_settingsable.go new file mode 100644 index 000000000..998a19e70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/assignment_review_settingsable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssignmentReviewSettingsable +type AssignmentReviewSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessReviewTimeoutBehavior()(*AccessReviewTimeoutBehavior) + GetDurationInDays()(*int32) + GetIsAccessRecommendationEnabled()(*bool) + GetIsApprovalJustificationRequired()(*bool) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetRecurrenceType()(*string) + GetReviewers()([]UserSetable) + GetReviewerType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccessReviewTimeoutBehavior(value *AccessReviewTimeoutBehavior)() + SetDurationInDays(value *int32)() + SetIsAccessRecommendationEnabled(value *bool)() + SetIsApprovalJustificationRequired(value *bool)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetRecurrenceType(value *string)() + SetReviewers(value []UserSetable)() + SetReviewerType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/associated_assignment_payload_type.go b/src/internal/connector/graph/betasdk/models/associated_assignment_payload_type.go new file mode 100644 index 000000000..45d325495 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/associated_assignment_payload_type.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AssociatedAssignmentPayloadType int + +const ( + // Invalid payload type + UNKNOWN_ASSOCIATEDASSIGNMENTPAYLOADTYPE AssociatedAssignmentPayloadType = iota + // Indicates that this filter is associated with a configuration or compliance policy payload type + DEVICECONFIGURATIONANDCOMPLIANCE_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this assignment filter is associated with an application payload type + APPLICATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with a Android Enterprise application payload type + ANDROIDENTERPRISEAPP_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with an enrollment restriction or enrollment status page policy payload type + ENROLLMENTCONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with an Administrative Template policy payload type + GROUPPOLICYCONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this assignment filter is associated with Zero touch deployment Device Configuration Profile payload type + ZEROTOUCHDEPLOYMENTDEVICECONFIGPROFILE_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with an Android Enterprise Configuration policy payload type + ANDROIDENTERPRISECONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this assignment filter is associated with Device Firmware Configuration Interface(DCFI) payload type + DEVICEFIRMWARECONFIGURATIONINTERFACEPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with a resource access policy (Wifi, VPN, Certificate) payload type + RESOURCEACCESSPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with a Win32 app payload type + WIN32APP_ASSOCIATEDASSIGNMENTPAYLOADTYPE + // Indicates that this filter is associated with a configuration or compliance policy on Device Configuration v2 Infrastructure payload type + DEVICEMANAGMENTCONFIGURATIONANDCOMPLIANCEPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE +) + +func (i AssociatedAssignmentPayloadType) String() string { + return []string{"unknown", "deviceConfigurationAndCompliance", "application", "androidEnterpriseApp", "enrollmentConfiguration", "groupPolicyConfiguration", "zeroTouchDeploymentDeviceConfigProfile", "androidEnterpriseConfiguration", "deviceFirmwareConfigurationInterfacePolicy", "resourceAccessPolicy", "win32app", "deviceManagmentConfigurationAndCompliancePolicy"}[i] +} +func ParseAssociatedAssignmentPayloadType(v string) (interface{}, error) { + result := UNKNOWN_ASSOCIATEDASSIGNMENTPAYLOADTYPE + switch v { + case "unknown": + result = UNKNOWN_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "deviceConfigurationAndCompliance": + result = DEVICECONFIGURATIONANDCOMPLIANCE_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "application": + result = APPLICATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "androidEnterpriseApp": + result = ANDROIDENTERPRISEAPP_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "enrollmentConfiguration": + result = ENROLLMENTCONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "groupPolicyConfiguration": + result = GROUPPOLICYCONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "zeroTouchDeploymentDeviceConfigProfile": + result = ZEROTOUCHDEPLOYMENTDEVICECONFIGPROFILE_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "androidEnterpriseConfiguration": + result = ANDROIDENTERPRISECONFIGURATION_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "deviceFirmwareConfigurationInterfacePolicy": + result = DEVICEFIRMWARECONFIGURATIONINTERFACEPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "resourceAccessPolicy": + result = RESOURCEACCESSPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "win32app": + result = WIN32APP_ASSOCIATEDASSIGNMENTPAYLOADTYPE + case "deviceManagmentConfigurationAndCompliancePolicy": + result = DEVICEMANAGMENTCONFIGURATIONANDCOMPLIANCEPOLICY_ASSOCIATEDASSIGNMENTPAYLOADTYPE + default: + return 0, errors.New("Unknown AssociatedAssignmentPayloadType value: " + v) + } + return &result, nil +} +func SerializeAssociatedAssignmentPayloadType(values []AssociatedAssignmentPayloadType) []string { + 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/associated_team_info.go b/src/internal/connector/graph/betasdk/models/associated_team_info.go new file mode 100644 index 000000000..b7eac3935 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/associated_team_info.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssociatedTeamInfo +type AssociatedTeamInfo struct { + TeamInfo +} +// NewAssociatedTeamInfo instantiates a new AssociatedTeamInfo and sets the default values. +func NewAssociatedTeamInfo()(*AssociatedTeamInfo) { + m := &AssociatedTeamInfo{ + TeamInfo: *NewTeamInfo(), + } + return m +} +// CreateAssociatedTeamInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssociatedTeamInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssociatedTeamInfo(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssociatedTeamInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TeamInfo.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AssociatedTeamInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TeamInfo.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/associated_team_info_collection_response.go b/src/internal/connector/graph/betasdk/models/associated_team_info_collection_response.go new file mode 100644 index 000000000..b1ce5c8d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/associated_team_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssociatedTeamInfoCollectionResponse +type AssociatedTeamInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AssociatedTeamInfoable +} +// NewAssociatedTeamInfoCollectionResponse instantiates a new AssociatedTeamInfoCollectionResponse and sets the default values. +func NewAssociatedTeamInfoCollectionResponse()(*AssociatedTeamInfoCollectionResponse) { + m := &AssociatedTeamInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAssociatedTeamInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAssociatedTeamInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAssociatedTeamInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AssociatedTeamInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssociatedTeamInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssociatedTeamInfoable, len(val)) + for i, v := range val { + res[i] = v.(AssociatedTeamInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AssociatedTeamInfoCollectionResponse) GetValue()([]AssociatedTeamInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *AssociatedTeamInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AssociatedTeamInfoCollectionResponse) SetValue(value []AssociatedTeamInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/associated_team_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/associated_team_info_collection_responseable.go new file mode 100644 index 000000000..d99a6f3b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/associated_team_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssociatedTeamInfoCollectionResponseable +type AssociatedTeamInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AssociatedTeamInfoable) + SetValue(value []AssociatedTeamInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/associated_team_infoable.go b/src/internal/connector/graph/betasdk/models/associated_team_infoable.go new file mode 100644 index 000000000..bcb75da7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/associated_team_infoable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AssociatedTeamInfoable +type AssociatedTeamInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TeamInfoable +} diff --git a/src/internal/connector/graph/betasdk/models/attachment.go b/src/internal/connector/graph/betasdk/models/attachment.go new file mode 100644 index 000000000..aec9d7ae5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment.go @@ -0,0 +1,187 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Attachment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Attachment struct { + Entity + // The MIME type. + contentType *string + // true if the attachment is an inline attachment; otherwise, false. + isInline *bool + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the attachment. This does not need to be the actual file name. + name *string + // The length of the attachment in bytes. + size *int32 +} +// NewAttachment instantiates a new attachment and sets the default values. +func NewAttachment()(*Attachment) { + m := &Attachment{ + Entity: *NewEntity(), + } + return m +} +// CreateAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.fileAttachment": + return NewFileAttachment(), nil + case "#microsoft.graph.itemAttachment": + return NewItemAttachment(), nil + case "#microsoft.graph.referenceAttachment": + return NewReferenceAttachment(), nil + } + } + } + } + return NewAttachment(), nil +} +// GetContentType gets the contentType property value. The MIME type. +func (m *Attachment) GetContentType()(*string) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Attachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["isInline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInline(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetIsInline gets the isInline property value. true if the attachment is an inline attachment; otherwise, false. +func (m *Attachment) GetIsInline()(*bool) { + return m.isInline +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Attachment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. The display name of the attachment. This does not need to be the actual file name. +func (m *Attachment) GetName()(*string) { + return m.name +} +// GetSize gets the size property value. The length of the attachment in bytes. +func (m *Attachment) GetSize()(*int32) { + return m.size +} +// Serialize serializes information the current object +func (m *Attachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isInline", m.GetIsInline()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetContentType sets the contentType property value. The MIME type. +func (m *Attachment) SetContentType(value *string)() { + m.contentType = value +} +// SetIsInline sets the isInline property value. true if the attachment is an inline attachment; otherwise, false. +func (m *Attachment) SetIsInline(value *bool)() { + m.isInline = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Attachment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. The display name of the attachment. This does not need to be the actual file name. +func (m *Attachment) SetName(value *string)() { + m.name = value +} +// SetSize sets the size property value. The length of the attachment in bytes. +func (m *Attachment) SetSize(value *int32)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_base.go b/src/internal/connector/graph/betasdk/models/attachment_base.go new file mode 100644 index 000000000..84fd3adc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_base.go @@ -0,0 +1,157 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttachmentBase struct { + Entity + // The MIME type. + contentType *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the attachment. This does not need to be the actual file name. + name *string + // The length of the attachment in bytes. + size *int32 +} +// NewAttachmentBase instantiates a new attachmentBase and sets the default values. +func NewAttachmentBase()(*AttachmentBase) { + m := &AttachmentBase{ + Entity: *NewEntity(), + } + return m +} +// CreateAttachmentBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.taskFileAttachment": + return NewTaskFileAttachment(), nil + } + } + } + } + return NewAttachmentBase(), nil +} +// GetContentType gets the contentType property value. The MIME type. +func (m *AttachmentBase) GetContentType()(*string) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AttachmentBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. The display name of the attachment. This does not need to be the actual file name. +func (m *AttachmentBase) GetName()(*string) { + return m.name +} +// GetSize gets the size property value. The length of the attachment in bytes. +func (m *AttachmentBase) GetSize()(*int32) { + return m.size +} +// Serialize serializes information the current object +func (m *AttachmentBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetContentType sets the contentType property value. The MIME type. +func (m *AttachmentBase) SetContentType(value *string)() { + m.contentType = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AttachmentBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. The display name of the attachment. This does not need to be the actual file name. +func (m *AttachmentBase) SetName(value *string)() { + m.name = value +} +// SetSize sets the size property value. The length of the attachment in bytes. +func (m *AttachmentBase) SetSize(value *int32)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_base_collection_response.go b/src/internal/connector/graph/betasdk/models/attachment_base_collection_response.go new file mode 100644 index 000000000..8089da452 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentBaseCollectionResponse +type AttachmentBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttachmentBaseable +} +// NewAttachmentBaseCollectionResponse instantiates a new AttachmentBaseCollectionResponse and sets the default values. +func NewAttachmentBaseCollectionResponse()(*AttachmentBaseCollectionResponse) { + m := &AttachmentBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttachmentBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttachmentBaseable, len(val)) + for i, v := range val { + res[i] = v.(AttachmentBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttachmentBaseCollectionResponse) GetValue()([]AttachmentBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttachmentBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttachmentBaseCollectionResponse) SetValue(value []AttachmentBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attachment_base_collection_responseable.go new file mode 100644 index 000000000..8d22c5e34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentBaseCollectionResponseable +type AttachmentBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttachmentBaseable) + SetValue(value []AttachmentBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_baseable.go b/src/internal/connector/graph/betasdk/models/attachment_baseable.go new file mode 100644 index 000000000..a6879c3b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_baseable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentBaseable +type AttachmentBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSize()(*int32) + SetContentType(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSize(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/attachment_collection_response.go new file mode 100644 index 000000000..4583604b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentCollectionResponse +type AttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Attachmentable +} +// NewAttachmentCollectionResponse instantiates a new AttachmentCollectionResponse and sets the default values. +func NewAttachmentCollectionResponse()(*AttachmentCollectionResponse) { + m := &AttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttachmentCollectionResponse) GetValue()([]Attachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttachmentCollectionResponse) SetValue(value []Attachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attachment_collection_responseable.go new file mode 100644 index 000000000..611789bd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentCollectionResponseable +type AttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Attachmentable) + SetValue(value []Attachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_content_properties.go b/src/internal/connector/graph/betasdk/models/attachment_content_properties.go new file mode 100644 index 000000000..2777bd8db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_content_properties.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentContentProperties +type AttachmentContentProperties struct { + ContentProperties + // The currentLabel property + currentLabel CurrentLabelable +} +// NewAttachmentContentProperties instantiates a new AttachmentContentProperties and sets the default values. +func NewAttachmentContentProperties()(*AttachmentContentProperties) { + m := &AttachmentContentProperties{ + ContentProperties: *NewContentProperties(), + } + odataTypeValue := "#microsoft.graph.attachmentContentProperties"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAttachmentContentPropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentContentPropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentContentProperties(), nil +} +// GetCurrentLabel gets the currentLabel property value. The currentLabel property +func (m *AttachmentContentProperties) GetCurrentLabel()(CurrentLabelable) { + return m.currentLabel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentContentProperties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ContentProperties.GetFieldDeserializers() + res["currentLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrentLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentLabel(val.(CurrentLabelable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AttachmentContentProperties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ContentProperties.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("currentLabel", m.GetCurrentLabel()) + if err != nil { + return err + } + } + return nil +} +// SetCurrentLabel sets the currentLabel property value. The currentLabel property +func (m *AttachmentContentProperties) SetCurrentLabel(value CurrentLabelable)() { + m.currentLabel = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_content_propertiesable.go b/src/internal/connector/graph/betasdk/models/attachment_content_propertiesable.go new file mode 100644 index 000000000..e504dc8de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_content_propertiesable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentContentPropertiesable +type AttachmentContentPropertiesable interface { + ContentPropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentLabel()(CurrentLabelable) + SetCurrentLabel(value CurrentLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_session.go b/src/internal/connector/graph/betasdk/models/attachment_session.go new file mode 100644 index 000000000..b0d5a6313 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_session.go @@ -0,0 +1,117 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentSession provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttachmentSession struct { + Entity + // The content streams that are uploaded. + content []byte + // The date and time in UTC when the upload session will expire. The complete file must be uploaded before this expiration time is reached. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates a single value {start} that represents the location in the file where the next upload should begin. + nextExpectedRanges []string +} +// NewAttachmentSession instantiates a new attachmentSession and sets the default values. +func NewAttachmentSession()(*AttachmentSession) { + m := &AttachmentSession{ + Entity: *NewEntity(), + } + return m +} +// CreateAttachmentSessionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentSessionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentSession(), nil +} +// GetContent gets the content property value. The content streams that are uploaded. +func (m *AttachmentSession) GetContent()([]byte) { + return m.content +} +// GetExpirationDateTime gets the expirationDateTime property value. The date and time in UTC when the upload session will expire. The complete file must be uploaded before this expiration time is reached. +func (m *AttachmentSession) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentSession) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["nextExpectedRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNextExpectedRanges(res) + } + return nil + } + return res +} +// GetNextExpectedRanges gets the nextExpectedRanges property value. Indicates a single value {start} that represents the location in the file where the next upload should begin. +func (m *AttachmentSession) GetNextExpectedRanges()([]string) { + return m.nextExpectedRanges +} +// Serialize serializes information the current object +func (m *AttachmentSession) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + if m.GetNextExpectedRanges() != nil { + err = writer.WriteCollectionOfStringValues("nextExpectedRanges", m.GetNextExpectedRanges()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content streams that are uploaded. +func (m *AttachmentSession) SetContent(value []byte)() { + m.content = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The date and time in UTC when the upload session will expire. The complete file must be uploaded before this expiration time is reached. +func (m *AttachmentSession) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetNextExpectedRanges sets the nextExpectedRanges property value. Indicates a single value {start} that represents the location in the file where the next upload should begin. +func (m *AttachmentSession) SetNextExpectedRanges(value []string)() { + m.nextExpectedRanges = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_session_collection_response.go b/src/internal/connector/graph/betasdk/models/attachment_session_collection_response.go new file mode 100644 index 000000000..7f2d1268b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_session_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentSessionCollectionResponse +type AttachmentSessionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttachmentSessionable +} +// NewAttachmentSessionCollectionResponse instantiates a new AttachmentSessionCollectionResponse and sets the default values. +func NewAttachmentSessionCollectionResponse()(*AttachmentSessionCollectionResponse) { + m := &AttachmentSessionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttachmentSessionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttachmentSessionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttachmentSessionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttachmentSessionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttachmentSessionable, len(val)) + for i, v := range val { + res[i] = v.(AttachmentSessionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttachmentSessionCollectionResponse) GetValue()([]AttachmentSessionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttachmentSessionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttachmentSessionCollectionResponse) SetValue(value []AttachmentSessionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_session_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attachment_session_collection_responseable.go new file mode 100644 index 000000000..3b7bed761 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_session_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentSessionCollectionResponseable +type AttachmentSessionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttachmentSessionable) + SetValue(value []AttachmentSessionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachment_sessionable.go b/src/internal/connector/graph/betasdk/models/attachment_sessionable.go new file mode 100644 index 000000000..25e59aaab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachment_sessionable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttachmentSessionable +type AttachmentSessionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNextExpectedRanges()([]string) + SetContent(value []byte)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNextExpectedRanges(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/attachmentable.go b/src/internal/connector/graph/betasdk/models/attachmentable.go new file mode 100644 index 000000000..68a5cf96d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attachmentable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Attachmentable +type Attachmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(*string) + GetIsInline()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSize()(*int32) + SetContentType(value *string)() + SetIsInline(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSize(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_operation.go b/src/internal/connector/graph/betasdk/models/attack_simulation_operation.go new file mode 100644 index 000000000..91554f7b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_operation.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationOperation +type AttackSimulationOperation struct { + LongRunningOperation + // Percentage of completion of the respective operation. + percentageCompleted *int32 + // Tenant identifier. + tenantId *string + // The attack simulation operation type. Possible values are: createSimulation, updateSimulation, unknownFutureValue. + type_escaped *AttackSimulationOperationType +} +// NewAttackSimulationOperation instantiates a new AttackSimulationOperation and sets the default values. +func NewAttackSimulationOperation()(*AttackSimulationOperation) { + m := &AttackSimulationOperation{ + LongRunningOperation: *NewLongRunningOperation(), + } + return m +} +// CreateAttackSimulationOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttackSimulationOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttackSimulationOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttackSimulationOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LongRunningOperation.GetFieldDeserializers() + res["percentageCompleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentageCompleted(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttackSimulationOperationType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AttackSimulationOperationType)) + } + return nil + } + return res +} +// GetPercentageCompleted gets the percentageCompleted property value. Percentage of completion of the respective operation. +func (m *AttackSimulationOperation) GetPercentageCompleted()(*int32) { + return m.percentageCompleted +} +// GetTenantId gets the tenantId property value. Tenant identifier. +func (m *AttackSimulationOperation) GetTenantId()(*string) { + return m.tenantId +} +// GetType gets the type property value. The attack simulation operation type. Possible values are: createSimulation, updateSimulation, unknownFutureValue. +func (m *AttackSimulationOperation) GetType()(*AttackSimulationOperationType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AttackSimulationOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LongRunningOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("percentageCompleted", m.GetPercentageCompleted()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetPercentageCompleted sets the percentageCompleted property value. Percentage of completion of the respective operation. +func (m *AttackSimulationOperation) SetPercentageCompleted(value *int32)() { + m.percentageCompleted = value +} +// SetTenantId sets the tenantId property value. Tenant identifier. +func (m *AttackSimulationOperation) SetTenantId(value *string)() { + m.tenantId = value +} +// SetType sets the type property value. The attack simulation operation type. Possible values are: createSimulation, updateSimulation, unknownFutureValue. +func (m *AttackSimulationOperation) SetType(value *AttackSimulationOperationType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_response.go new file mode 100644 index 000000000..2b88b5bb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationOperationCollectionResponse +type AttackSimulationOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttackSimulationOperationable +} +// NewAttackSimulationOperationCollectionResponse instantiates a new AttackSimulationOperationCollectionResponse and sets the default values. +func NewAttackSimulationOperationCollectionResponse()(*AttackSimulationOperationCollectionResponse) { + m := &AttackSimulationOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttackSimulationOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttackSimulationOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttackSimulationOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttackSimulationOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttackSimulationOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttackSimulationOperationable, len(val)) + for i, v := range val { + res[i] = v.(AttackSimulationOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttackSimulationOperationCollectionResponse) GetValue()([]AttackSimulationOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttackSimulationOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttackSimulationOperationCollectionResponse) SetValue(value []AttackSimulationOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_responseable.go new file mode 100644 index 000000000..3acdc92d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationOperationCollectionResponseable +type AttackSimulationOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttackSimulationOperationable) + SetValue(value []AttackSimulationOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_operation_type.go b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_type.go new file mode 100644 index 000000000..8acbec43d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_operation_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttackSimulationOperationType int + +const ( + CREATESIMUALATION_ATTACKSIMULATIONOPERATIONTYPE AttackSimulationOperationType = iota + UPDATESIMULATION_ATTACKSIMULATIONOPERATIONTYPE + UNKNOWNFUTUREVALUE_ATTACKSIMULATIONOPERATIONTYPE +) + +func (i AttackSimulationOperationType) String() string { + return []string{"createSimualation", "updateSimulation", "unknownFutureValue"}[i] +} +func ParseAttackSimulationOperationType(v string) (interface{}, error) { + result := CREATESIMUALATION_ATTACKSIMULATIONOPERATIONTYPE + switch v { + case "createSimualation": + result = CREATESIMUALATION_ATTACKSIMULATIONOPERATIONTYPE + case "updateSimulation": + result = UPDATESIMULATION_ATTACKSIMULATIONOPERATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ATTACKSIMULATIONOPERATIONTYPE + default: + return 0, errors.New("Unknown AttackSimulationOperationType value: " + v) + } + return &result, nil +} +func SerializeAttackSimulationOperationType(values []AttackSimulationOperationType) []string { + 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/attack_simulation_operationable.go b/src/internal/connector/graph/betasdk/models/attack_simulation_operationable.go new file mode 100644 index 000000000..cbea48ac1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_operationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationOperationable +type AttackSimulationOperationable interface { + LongRunningOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPercentageCompleted()(*int32) + GetTenantId()(*string) + GetType()(*AttackSimulationOperationType) + SetPercentageCompleted(value *int32)() + SetTenantId(value *string)() + SetType(value *AttackSimulationOperationType)() +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_root.go b/src/internal/connector/graph/betasdk/models/attack_simulation_root.go new file mode 100644 index 000000000..57da592b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_root.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationRoot +type AttackSimulationRoot struct { + Entity + // Represents an attack simulation training operation. + operations []AttackSimulationOperationable + // Represents an attack simulation training campaign payload in a tenant. + payloads []Payloadable + // Represents simulation automation created to run on a tenant. + simulationAutomations []SimulationAutomationable + // Represents an attack simulation training campaign in a tenant. + simulations []Simulationable +} +// NewAttackSimulationRoot instantiates a new attackSimulationRoot and sets the default values. +func NewAttackSimulationRoot()(*AttackSimulationRoot) { + m := &AttackSimulationRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateAttackSimulationRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttackSimulationRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttackSimulationRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttackSimulationRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttackSimulationOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttackSimulationOperationable, len(val)) + for i, v := range val { + res[i] = v.(AttackSimulationOperationable) + } + m.SetOperations(res) + } + return nil + } + res["payloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Payloadable, len(val)) + for i, v := range val { + res[i] = v.(Payloadable) + } + m.SetPayloads(res) + } + return nil + } + res["simulationAutomations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimulationAutomationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SimulationAutomationable, len(val)) + for i, v := range val { + res[i] = v.(SimulationAutomationable) + } + m.SetSimulationAutomations(res) + } + return nil + } + res["simulations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSimulationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Simulationable, len(val)) + for i, v := range val { + res[i] = v.(Simulationable) + } + m.SetSimulations(res) + } + return nil + } + return res +} +// GetOperations gets the operations property value. Represents an attack simulation training operation. +func (m *AttackSimulationRoot) GetOperations()([]AttackSimulationOperationable) { + return m.operations +} +// GetPayloads gets the payloads property value. Represents an attack simulation training campaign payload in a tenant. +func (m *AttackSimulationRoot) GetPayloads()([]Payloadable) { + return m.payloads +} +// GetSimulationAutomations gets the simulationAutomations property value. Represents simulation automation created to run on a tenant. +func (m *AttackSimulationRoot) GetSimulationAutomations()([]SimulationAutomationable) { + return m.simulationAutomations +} +// GetSimulations gets the simulations property value. Represents an attack simulation training campaign in a tenant. +func (m *AttackSimulationRoot) GetSimulations()([]Simulationable) { + return m.simulations +} +// Serialize serializes information the current object +func (m *AttackSimulationRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetPayloads() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPayloads())) + for i, v := range m.GetPayloads() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("payloads", cast) + if err != nil { + return err + } + } + if m.GetSimulationAutomations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSimulationAutomations())) + for i, v := range m.GetSimulationAutomations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("simulationAutomations", cast) + if err != nil { + return err + } + } + if m.GetSimulations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSimulations())) + for i, v := range m.GetSimulations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("simulations", cast) + if err != nil { + return err + } + } + return nil +} +// SetOperations sets the operations property value. Represents an attack simulation training operation. +func (m *AttackSimulationRoot) SetOperations(value []AttackSimulationOperationable)() { + m.operations = value +} +// SetPayloads sets the payloads property value. Represents an attack simulation training campaign payload in a tenant. +func (m *AttackSimulationRoot) SetPayloads(value []Payloadable)() { + m.payloads = value +} +// SetSimulationAutomations sets the simulationAutomations property value. Represents simulation automation created to run on a tenant. +func (m *AttackSimulationRoot) SetSimulationAutomations(value []SimulationAutomationable)() { + m.simulationAutomations = value +} +// SetSimulations sets the simulations property value. Represents an attack simulation training campaign in a tenant. +func (m *AttackSimulationRoot) SetSimulations(value []Simulationable)() { + m.simulations = value +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_rootable.go b/src/internal/connector/graph/betasdk/models/attack_simulation_rootable.go new file mode 100644 index 000000000..0e42db4d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_rootable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationRootable +type AttackSimulationRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOperations()([]AttackSimulationOperationable) + GetPayloads()([]Payloadable) + GetSimulationAutomations()([]SimulationAutomationable) + GetSimulations()([]Simulationable) + SetOperations(value []AttackSimulationOperationable)() + SetPayloads(value []Payloadable)() + SetSimulationAutomations(value []SimulationAutomationable)() + SetSimulations(value []Simulationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_user.go b/src/internal/connector/graph/betasdk/models/attack_simulation_user.go new file mode 100644 index 000000000..c58d92220 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_user.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationUser +type AttackSimulationUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name of the user. + displayName *string + // Email address of the user. + email *string + // The OdataType property + odataType *string + // This is the id property value of the user resource that represents the user in the Azure Active Directory tenant. + userId *string +} +// NewAttackSimulationUser instantiates a new attackSimulationUser and sets the default values. +func NewAttackSimulationUser()(*AttackSimulationUser) { + m := &AttackSimulationUser{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttackSimulationUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttackSimulationUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttackSimulationUser(), 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 *AttackSimulationUser) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name of the user. +func (m *AttackSimulationUser) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. Email address of the user. +func (m *AttackSimulationUser) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttackSimulationUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(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["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttackSimulationUser) GetOdataType()(*string) { + return m.odataType +} +// GetUserId gets the userId property value. This is the id property value of the user resource that represents the user in the Azure Active Directory tenant. +func (m *AttackSimulationUser) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *AttackSimulationUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + 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 *AttackSimulationUser) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name of the user. +func (m *AttackSimulationUser) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. Email address of the user. +func (m *AttackSimulationUser) SetEmail(value *string)() { + m.email = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttackSimulationUser) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserId sets the userId property value. This is the id property value of the user resource that represents the user in the Azure Active Directory tenant. +func (m *AttackSimulationUser) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/attack_simulation_userable.go b/src/internal/connector/graph/betasdk/models/attack_simulation_userable.go new file mode 100644 index 000000000..ff37bf308 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attack_simulation_userable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationUserable +type AttackSimulationUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetEmail()(*string) + GetOdataType()(*string) + GetUserId()(*string) + SetDisplayName(value *string)() + SetEmail(value *string)() + SetOdataType(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_interval.go b/src/internal/connector/graph/betasdk/models/attendance_interval.go new file mode 100644 index 000000000..23553067d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_interval.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceInterval +type AttendanceInterval struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Duration of the meeting interval in seconds; that is, the difference between joinDateTime and leaveDateTime. + durationInSeconds *int32 + // The time the attendee joined in UTC. + joinDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time the attendee left in UTC. + leaveDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewAttendanceInterval instantiates a new attendanceInterval and sets the default values. +func NewAttendanceInterval()(*AttendanceInterval) { + m := &AttendanceInterval{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttendanceIntervalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendanceIntervalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendanceInterval(), 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 *AttendanceInterval) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDurationInSeconds gets the durationInSeconds property value. Duration of the meeting interval in seconds; that is, the difference between joinDateTime and leaveDateTime. +func (m *AttendanceInterval) GetDurationInSeconds()(*int32) { + return m.durationInSeconds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendanceInterval) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["durationInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInSeconds(val) + } + return nil + } + res["joinDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinDateTime(val) + } + return nil + } + res["leaveDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLeaveDateTime(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 + } + return res +} +// GetJoinDateTime gets the joinDateTime property value. The time the attendee joined in UTC. +func (m *AttendanceInterval) GetJoinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.joinDateTime +} +// GetLeaveDateTime gets the leaveDateTime property value. The time the attendee left in UTC. +func (m *AttendanceInterval) GetLeaveDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.leaveDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttendanceInterval) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AttendanceInterval) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("durationInSeconds", m.GetDurationInSeconds()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("joinDateTime", m.GetJoinDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("leaveDateTime", m.GetLeaveDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AttendanceInterval) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDurationInSeconds sets the durationInSeconds property value. Duration of the meeting interval in seconds; that is, the difference between joinDateTime and leaveDateTime. +func (m *AttendanceInterval) SetDurationInSeconds(value *int32)() { + m.durationInSeconds = value +} +// SetJoinDateTime sets the joinDateTime property value. The time the attendee joined in UTC. +func (m *AttendanceInterval) SetJoinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.joinDateTime = value +} +// SetLeaveDateTime sets the leaveDateTime property value. The time the attendee left in UTC. +func (m *AttendanceInterval) SetLeaveDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.leaveDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttendanceInterval) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_interval_collection_response.go b/src/internal/connector/graph/betasdk/models/attendance_interval_collection_response.go new file mode 100644 index 000000000..793719848 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_interval_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceIntervalCollectionResponse +type AttendanceIntervalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttendanceIntervalable +} +// NewAttendanceIntervalCollectionResponse instantiates a new AttendanceIntervalCollectionResponse and sets the default values. +func NewAttendanceIntervalCollectionResponse()(*AttendanceIntervalCollectionResponse) { + m := &AttendanceIntervalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttendanceIntervalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendanceIntervalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendanceIntervalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendanceIntervalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendanceIntervalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendanceIntervalable, len(val)) + for i, v := range val { + res[i] = v.(AttendanceIntervalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttendanceIntervalCollectionResponse) GetValue()([]AttendanceIntervalable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttendanceIntervalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttendanceIntervalCollectionResponse) SetValue(value []AttendanceIntervalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_interval_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attendance_interval_collection_responseable.go new file mode 100644 index 000000000..e6bbbdb8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_interval_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceIntervalCollectionResponseable +type AttendanceIntervalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttendanceIntervalable) + SetValue(value []AttendanceIntervalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_intervalable.go b/src/internal/connector/graph/betasdk/models/attendance_intervalable.go new file mode 100644 index 000000000..5dfdbe6ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_intervalable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceIntervalable +type AttendanceIntervalable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationInSeconds()(*int32) + GetJoinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLeaveDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetDurationInSeconds(value *int32)() + SetJoinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLeaveDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_record.go b/src/internal/connector/graph/betasdk/models/attendance_record.go new file mode 100644 index 000000000..1a175d921 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_record.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceRecord provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttendanceRecord struct { + Entity + // List of time periods between joining and leaving a meeting. + attendanceIntervals []AttendanceIntervalable + // Email address of the user associated with this atttendance record. + emailAddress *string + // Identity of the user associated with this atttendance record. The specific type will be one of the following derived types of identity, depending on the type of the user: communicationsUserIdentity, azureCommunicationServicesUserIdentity. + identity Identityable + // Unique identifier of a meetingRegistrant. Presents when the participant has registered for the meeting. + registrantId *string + // Role of the attendee. Possible values are: None, Attendee, Presenter, and Organizer. + role *string + // Total duration of the attendances in seconds. + totalAttendanceInSeconds *int32 +} +// NewAttendanceRecord instantiates a new attendanceRecord and sets the default values. +func NewAttendanceRecord()(*AttendanceRecord) { + m := &AttendanceRecord{ + Entity: *NewEntity(), + } + return m +} +// CreateAttendanceRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendanceRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendanceRecord(), nil +} +// GetAttendanceIntervals gets the attendanceIntervals property value. List of time periods between joining and leaving a meeting. +func (m *AttendanceRecord) GetAttendanceIntervals()([]AttendanceIntervalable) { + return m.attendanceIntervals +} +// GetEmailAddress gets the emailAddress property value. Email address of the user associated with this atttendance record. +func (m *AttendanceRecord) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendanceRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["attendanceIntervals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendanceIntervalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendanceIntervalable, len(val)) + for i, v := range val { + res[i] = v.(AttendanceIntervalable) + } + m.SetAttendanceIntervals(res) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentity(val.(Identityable)) + } + return nil + } + res["registrantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistrantId(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["totalAttendanceInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAttendanceInSeconds(val) + } + return nil + } + return res +} +// GetIdentity gets the identity property value. Identity of the user associated with this atttendance record. The specific type will be one of the following derived types of identity, depending on the type of the user: communicationsUserIdentity, azureCommunicationServicesUserIdentity. +func (m *AttendanceRecord) GetIdentity()(Identityable) { + return m.identity +} +// GetRegistrantId gets the registrantId property value. Unique identifier of a meetingRegistrant. Presents when the participant has registered for the meeting. +func (m *AttendanceRecord) GetRegistrantId()(*string) { + return m.registrantId +} +// GetRole gets the role property value. Role of the attendee. Possible values are: None, Attendee, Presenter, and Organizer. +func (m *AttendanceRecord) GetRole()(*string) { + return m.role +} +// GetTotalAttendanceInSeconds gets the totalAttendanceInSeconds property value. Total duration of the attendances in seconds. +func (m *AttendanceRecord) GetTotalAttendanceInSeconds()(*int32) { + return m.totalAttendanceInSeconds +} +// Serialize serializes information the current object +func (m *AttendanceRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAttendanceIntervals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendanceIntervals())) + for i, v := range m.GetAttendanceIntervals() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attendanceIntervals", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registrantId", m.GetRegistrantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalAttendanceInSeconds", m.GetTotalAttendanceInSeconds()) + if err != nil { + return err + } + } + return nil +} +// SetAttendanceIntervals sets the attendanceIntervals property value. List of time periods between joining and leaving a meeting. +func (m *AttendanceRecord) SetAttendanceIntervals(value []AttendanceIntervalable)() { + m.attendanceIntervals = value +} +// SetEmailAddress sets the emailAddress property value. Email address of the user associated with this atttendance record. +func (m *AttendanceRecord) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetIdentity sets the identity property value. Identity of the user associated with this atttendance record. The specific type will be one of the following derived types of identity, depending on the type of the user: communicationsUserIdentity, azureCommunicationServicesUserIdentity. +func (m *AttendanceRecord) SetIdentity(value Identityable)() { + m.identity = value +} +// SetRegistrantId sets the registrantId property value. Unique identifier of a meetingRegistrant. Presents when the participant has registered for the meeting. +func (m *AttendanceRecord) SetRegistrantId(value *string)() { + m.registrantId = value +} +// SetRole sets the role property value. Role of the attendee. Possible values are: None, Attendee, Presenter, and Organizer. +func (m *AttendanceRecord) SetRole(value *string)() { + m.role = value +} +// SetTotalAttendanceInSeconds sets the totalAttendanceInSeconds property value. Total duration of the attendances in seconds. +func (m *AttendanceRecord) SetTotalAttendanceInSeconds(value *int32)() { + m.totalAttendanceInSeconds = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_record_collection_response.go b/src/internal/connector/graph/betasdk/models/attendance_record_collection_response.go new file mode 100644 index 000000000..8bed89627 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceRecordCollectionResponse +type AttendanceRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttendanceRecordable +} +// NewAttendanceRecordCollectionResponse instantiates a new AttendanceRecordCollectionResponse and sets the default values. +func NewAttendanceRecordCollectionResponse()(*AttendanceRecordCollectionResponse) { + m := &AttendanceRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttendanceRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendanceRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendanceRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendanceRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendanceRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendanceRecordable, len(val)) + for i, v := range val { + res[i] = v.(AttendanceRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttendanceRecordCollectionResponse) GetValue()([]AttendanceRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttendanceRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttendanceRecordCollectionResponse) SetValue(value []AttendanceRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attendance_record_collection_responseable.go new file mode 100644 index 000000000..92b731cf2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceRecordCollectionResponseable +type AttendanceRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttendanceRecordable) + SetValue(value []AttendanceRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendance_recordable.go b/src/internal/connector/graph/betasdk/models/attendance_recordable.go new file mode 100644 index 000000000..cb201cdd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendance_recordable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendanceRecordable +type AttendanceRecordable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendanceIntervals()([]AttendanceIntervalable) + GetEmailAddress()(*string) + GetIdentity()(Identityable) + GetRegistrantId()(*string) + GetRole()(*string) + GetTotalAttendanceInSeconds()(*int32) + SetAttendanceIntervals(value []AttendanceIntervalable)() + SetEmailAddress(value *string)() + SetIdentity(value Identityable)() + SetRegistrantId(value *string)() + SetRole(value *string)() + SetTotalAttendanceInSeconds(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendee.go b/src/internal/connector/graph/betasdk/models/attendee.go new file mode 100644 index 000000000..137e5f194 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Attendee +type Attendee struct { + AttendeeBase + // An alternate date/time proposed by the attendee for a meeting request to start and end. If the attendee hasn't proposed another time, then this property is not included in a response of a GET event. + proposedNewTime TimeSlotable + // The attendee's response (none, accepted, declined, etc.) for the event and date-time that the response was sent. + status ResponseStatusable +} +// NewAttendee instantiates a new Attendee and sets the default values. +func NewAttendee()(*Attendee) { + m := &Attendee{ + AttendeeBase: *NewAttendeeBase(), + } + odataTypeValue := "#microsoft.graph.attendee"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAttendeeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendee(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Attendee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AttendeeBase.GetFieldDeserializers() + res["proposedNewTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimeSlotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProposedNewTime(val.(TimeSlotable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResponseStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(ResponseStatusable)) + } + return nil + } + return res +} +// GetProposedNewTime gets the proposedNewTime property value. An alternate date/time proposed by the attendee for a meeting request to start and end. If the attendee hasn't proposed another time, then this property is not included in a response of a GET event. +func (m *Attendee) GetProposedNewTime()(TimeSlotable) { + return m.proposedNewTime +} +// GetStatus gets the status property value. The attendee's response (none, accepted, declined, etc.) for the event and date-time that the response was sent. +func (m *Attendee) GetStatus()(ResponseStatusable) { + return m.status +} +// Serialize serializes information the current object +func (m *Attendee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AttendeeBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("proposedNewTime", m.GetProposedNewTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetProposedNewTime sets the proposedNewTime property value. An alternate date/time proposed by the attendee for a meeting request to start and end. If the attendee hasn't proposed another time, then this property is not included in a response of a GET event. +func (m *Attendee) SetProposedNewTime(value TimeSlotable)() { + m.proposedNewTime = value +} +// SetStatus sets the status property value. The attendee's response (none, accepted, declined, etc.) for the event and date-time that the response was sent. +func (m *Attendee) SetStatus(value ResponseStatusable)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_availability.go b/src/internal/connector/graph/betasdk/models/attendee_availability.go new file mode 100644 index 000000000..8dc757a40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_availability.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeAvailability +type AttendeeAvailability 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 email address and type of attendee - whether it's a person or a resource, and whether required or optional if it's a person. + attendee AttendeeBaseable + // The availability status of the attendee. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. + availability *FreeBusyStatus + // The OdataType property + odataType *string +} +// NewAttendeeAvailability instantiates a new attendeeAvailability and sets the default values. +func NewAttendeeAvailability()(*AttendeeAvailability) { + m := &AttendeeAvailability{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttendeeAvailabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeAvailabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendeeAvailability(), 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 *AttendeeAvailability) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttendee gets the attendee property value. The email address and type of attendee - whether it's a person or a resource, and whether required or optional if it's a person. +func (m *AttendeeAvailability) GetAttendee()(AttendeeBaseable) { + return m.attendee +} +// GetAvailability gets the availability property value. The availability status of the attendee. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *AttendeeAvailability) GetAvailability()(*FreeBusyStatus) { + return m.availability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendeeAvailability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attendee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAttendeeBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttendee(val.(AttendeeBaseable)) + } + return nil + } + res["availability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFreeBusyStatus) + if err != nil { + return err + } + if val != nil { + m.SetAvailability(val.(*FreeBusyStatus)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttendeeAvailability) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AttendeeAvailability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("attendee", m.GetAttendee()) + if err != nil { + return err + } + } + if m.GetAvailability() != nil { + cast := (*m.GetAvailability()).String() + err := writer.WriteStringValue("availability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AttendeeAvailability) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttendee sets the attendee property value. The email address and type of attendee - whether it's a person or a resource, and whether required or optional if it's a person. +func (m *AttendeeAvailability) SetAttendee(value AttendeeBaseable)() { + m.attendee = value +} +// SetAvailability sets the availability property value. The availability status of the attendee. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *AttendeeAvailability) SetAvailability(value *FreeBusyStatus)() { + m.availability = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttendeeAvailability) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_availability_collection_response.go b/src/internal/connector/graph/betasdk/models/attendee_availability_collection_response.go new file mode 100644 index 000000000..7054a0fab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_availability_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeAvailabilityCollectionResponse +type AttendeeAvailabilityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttendeeAvailabilityable +} +// NewAttendeeAvailabilityCollectionResponse instantiates a new AttendeeAvailabilityCollectionResponse and sets the default values. +func NewAttendeeAvailabilityCollectionResponse()(*AttendeeAvailabilityCollectionResponse) { + m := &AttendeeAvailabilityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttendeeAvailabilityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeAvailabilityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendeeAvailabilityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendeeAvailabilityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendeeAvailabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendeeAvailabilityable, len(val)) + for i, v := range val { + res[i] = v.(AttendeeAvailabilityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttendeeAvailabilityCollectionResponse) GetValue()([]AttendeeAvailabilityable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttendeeAvailabilityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttendeeAvailabilityCollectionResponse) SetValue(value []AttendeeAvailabilityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_availability_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attendee_availability_collection_responseable.go new file mode 100644 index 000000000..0c160ab58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_availability_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeAvailabilityCollectionResponseable +type AttendeeAvailabilityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttendeeAvailabilityable) + SetValue(value []AttendeeAvailabilityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_availabilityable.go b/src/internal/connector/graph/betasdk/models/attendee_availabilityable.go new file mode 100644 index 000000000..f8c44d7bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_availabilityable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeAvailabilityable +type AttendeeAvailabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendee()(AttendeeBaseable) + GetAvailability()(*FreeBusyStatus) + GetOdataType()(*string) + SetAttendee(value AttendeeBaseable)() + SetAvailability(value *FreeBusyStatus)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_base.go b/src/internal/connector/graph/betasdk/models/attendee_base.go new file mode 100644 index 000000000..5ef1899d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_base.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeBase +type AttendeeBase struct { + Recipient + // The type of attendee. Possible values are: required, optional, resource. Currently if the attendee is a person, findMeetingTimes always considers the person is of the Required type. + type_escaped *AttendeeType +} +// NewAttendeeBase instantiates a new AttendeeBase and sets the default values. +func NewAttendeeBase()(*AttendeeBase) { + m := &AttendeeBase{ + Recipient: *NewRecipient(), + } + odataTypeValue := "#microsoft.graph.attendeeBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAttendeeBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.attendee": + return NewAttendee(), nil + } + } + } + } + return NewAttendeeBase(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendeeBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Recipient.GetFieldDeserializers() + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttendeeType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AttendeeType)) + } + return nil + } + return res +} +// GetType gets the type property value. The type of attendee. Possible values are: required, optional, resource. Currently if the attendee is a person, findMeetingTimes always considers the person is of the Required type. +func (m *AttendeeBase) GetType()(*AttendeeType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AttendeeBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Recipient.Serialize(writer) + if err != nil { + return err + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetType sets the type property value. The type of attendee. Possible values are: required, optional, resource. Currently if the attendee is a person, findMeetingTimes always considers the person is of the Required type. +func (m *AttendeeBase) SetType(value *AttendeeType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_baseable.go b/src/internal/connector/graph/betasdk/models/attendee_baseable.go new file mode 100644 index 000000000..a9dfc46db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeBaseable +type AttendeeBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Recipientable + GetType()(*AttendeeType) + SetType(value *AttendeeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_collection_response.go b/src/internal/connector/graph/betasdk/models/attendee_collection_response.go new file mode 100644 index 000000000..2477be578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeCollectionResponse +type AttendeeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Attendeeable +} +// NewAttendeeCollectionResponse instantiates a new AttendeeCollectionResponse and sets the default values. +func NewAttendeeCollectionResponse()(*AttendeeCollectionResponse) { + m := &AttendeeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttendeeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttendeeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttendeeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttendeeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendeeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attendeeable, len(val)) + for i, v := range val { + res[i] = v.(Attendeeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttendeeCollectionResponse) GetValue()([]Attendeeable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttendeeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttendeeCollectionResponse) SetValue(value []Attendeeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attendee_collection_responseable.go new file mode 100644 index 000000000..ab266d651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttendeeCollectionResponseable +type AttendeeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Attendeeable) + SetValue(value []Attendeeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attendee_type.go b/src/internal/connector/graph/betasdk/models/attendee_type.go new file mode 100644 index 000000000..8206efbd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendee_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttendeeType int + +const ( + REQUIRED_ATTENDEETYPE AttendeeType = iota + OPTIONAL_ATTENDEETYPE + RESOURCE_ATTENDEETYPE +) + +func (i AttendeeType) String() string { + return []string{"required", "optional", "resource"}[i] +} +func ParseAttendeeType(v string) (interface{}, error) { + result := REQUIRED_ATTENDEETYPE + switch v { + case "required": + result = REQUIRED_ATTENDEETYPE + case "optional": + result = OPTIONAL_ATTENDEETYPE + case "resource": + result = RESOURCE_ATTENDEETYPE + default: + return 0, errors.New("Unknown AttendeeType value: " + v) + } + return &result, nil +} +func SerializeAttendeeType(values []AttendeeType) []string { + 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/attendeeable.go b/src/internal/connector/graph/betasdk/models/attendeeable.go new file mode 100644 index 000000000..7f567d99b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attendeeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Attendeeable +type Attendeeable interface { + AttendeeBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProposedNewTime()(TimeSlotable) + GetStatus()(ResponseStatusable) + SetProposedNewTime(value TimeSlotable)() + SetStatus(value ResponseStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attestation_level.go b/src/internal/connector/graph/betasdk/models/attestation_level.go new file mode 100644 index 000000000..3931cb9af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attestation_level.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttestationLevel int + +const ( + ATTESTED_ATTESTATIONLEVEL AttestationLevel = iota + NOTATTESTED_ATTESTATIONLEVEL + UNKNOWNFUTUREVALUE_ATTESTATIONLEVEL +) + +func (i AttestationLevel) String() string { + return []string{"attested", "notAttested", "unknownFutureValue"}[i] +} +func ParseAttestationLevel(v string) (interface{}, error) { + result := ATTESTED_ATTESTATIONLEVEL + switch v { + case "attested": + result = ATTESTED_ATTESTATIONLEVEL + case "notAttested": + result = NOTATTESTED_ATTESTATIONLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ATTESTATIONLEVEL + default: + return 0, errors.New("Unknown AttestationLevel value: " + v) + } + return &result, nil +} +func SerializeAttestationLevel(values []AttestationLevel) []string { + 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/attribute_definition.go b/src/internal/connector/graph/betasdk/models/attribute_definition.go new file mode 100644 index 000000000..5409b26d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_definition.go @@ -0,0 +1,409 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeDefinition +type AttributeDefinition struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object's attributes must be designated as the anchor to support synchronization. + anchor *bool + // The apiExpressions property + apiExpressions []StringKeyStringValuePairable + // true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute. + caseExact *bool + // The defaultValue property + defaultValue *string + // 'true' to allow null values for attributes. + flowNullValues *bool + // Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. + metadata []MetadataEntryable + // true if an attribute can have multiple values. Default is false. + multivalued *bool + // The mutability property + mutability *Mutability + // Name of the attribute. Must be unique within the object definition. Not nullable. + name *string + // The OdataType property + odataType *string + // For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object). + referencedObjects []ReferencedObjectable + // true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error. + required *bool + // The type property + type_escaped *AttributeType +} +// NewAttributeDefinition instantiates a new attributeDefinition and sets the default values. +func NewAttributeDefinition()(*AttributeDefinition) { + m := &AttributeDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttributeDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeDefinition(), 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 *AttributeDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAnchor gets the anchor property value. true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object's attributes must be designated as the anchor to support synchronization. +func (m *AttributeDefinition) GetAnchor()(*bool) { + return m.anchor +} +// GetApiExpressions gets the apiExpressions property value. The apiExpressions property +func (m *AttributeDefinition) GetApiExpressions()([]StringKeyStringValuePairable) { + return m.apiExpressions +} +// GetCaseExact gets the caseExact property value. true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute. +func (m *AttributeDefinition) GetCaseExact()(*bool) { + return m.caseExact +} +// GetDefaultValue gets the defaultValue property value. The defaultValue property +func (m *AttributeDefinition) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["anchor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAnchor(val) + } + return nil + } + res["apiExpressions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStringKeyStringValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StringKeyStringValuePairable, len(val)) + for i, v := range val { + res[i] = v.(StringKeyStringValuePairable) + } + m.SetApiExpressions(res) + } + return nil + } + res["caseExact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCaseExact(val) + } + return nil + } + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["flowNullValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFlowNullValues(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetadataEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetadataEntryable, len(val)) + for i, v := range val { + res[i] = v.(MetadataEntryable) + } + m.SetMetadata(res) + } + return nil + } + res["multivalued"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMultivalued(val) + } + return nil + } + res["mutability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMutability) + if err != nil { + return err + } + if val != nil { + m.SetMutability(val.(*Mutability)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["referencedObjects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReferencedObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReferencedObjectable, len(val)) + for i, v := range val { + res[i] = v.(ReferencedObjectable) + } + m.SetReferencedObjects(res) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttributeType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AttributeType)) + } + return nil + } + return res +} +// GetFlowNullValues gets the flowNullValues property value. 'true' to allow null values for attributes. +func (m *AttributeDefinition) GetFlowNullValues()(*bool) { + return m.flowNullValues +} +// GetMetadata gets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +func (m *AttributeDefinition) GetMetadata()([]MetadataEntryable) { + return m.metadata +} +// GetMultivalued gets the multivalued property value. true if an attribute can have multiple values. Default is false. +func (m *AttributeDefinition) GetMultivalued()(*bool) { + return m.multivalued +} +// GetMutability gets the mutability property value. The mutability property +func (m *AttributeDefinition) GetMutability()(*Mutability) { + return m.mutability +} +// GetName gets the name property value. Name of the attribute. Must be unique within the object definition. Not nullable. +func (m *AttributeDefinition) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttributeDefinition) GetOdataType()(*string) { + return m.odataType +} +// GetReferencedObjects gets the referencedObjects property value. For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object). +func (m *AttributeDefinition) GetReferencedObjects()([]ReferencedObjectable) { + return m.referencedObjects +} +// GetRequired gets the required property value. true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error. +func (m *AttributeDefinition) GetRequired()(*bool) { + return m.required +} +// GetType gets the type property value. The type property +func (m *AttributeDefinition) GetType()(*AttributeType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AttributeDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("anchor", m.GetAnchor()) + if err != nil { + return err + } + } + if m.GetApiExpressions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApiExpressions())) + for i, v := range m.GetApiExpressions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("apiExpressions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("caseExact", m.GetCaseExact()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("flowNullValues", m.GetFlowNullValues()) + if err != nil { + return err + } + } + if m.GetMetadata() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadata())) + for i, v := range m.GetMetadata() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("metadata", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("multivalued", m.GetMultivalued()) + if err != nil { + return err + } + } + if m.GetMutability() != nil { + cast := (*m.GetMutability()).String() + err := writer.WriteStringValue("mutability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetReferencedObjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReferencedObjects())) + for i, v := range m.GetReferencedObjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("referencedObjects", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *AttributeDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAnchor sets the anchor property value. true if the attribute should be used as the anchor for the object. Anchor attributes must have a unique value identifying an object, and must be immutable. Default is false. One, and only one, of the object's attributes must be designated as the anchor to support synchronization. +func (m *AttributeDefinition) SetAnchor(value *bool)() { + m.anchor = value +} +// SetApiExpressions sets the apiExpressions property value. The apiExpressions property +func (m *AttributeDefinition) SetApiExpressions(value []StringKeyStringValuePairable)() { + m.apiExpressions = value +} +// SetCaseExact sets the caseExact property value. true if value of this attribute should be treated as case-sensitive. This setting affects how the synchronization engine detects changes for the attribute. +func (m *AttributeDefinition) SetCaseExact(value *bool)() { + m.caseExact = value +} +// SetDefaultValue sets the defaultValue property value. The defaultValue property +func (m *AttributeDefinition) SetDefaultValue(value *string)() { + m.defaultValue = value +} +// SetFlowNullValues sets the flowNullValues property value. 'true' to allow null values for attributes. +func (m *AttributeDefinition) SetFlowNullValues(value *bool)() { + m.flowNullValues = value +} +// SetMetadata sets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +func (m *AttributeDefinition) SetMetadata(value []MetadataEntryable)() { + m.metadata = value +} +// SetMultivalued sets the multivalued property value. true if an attribute can have multiple values. Default is false. +func (m *AttributeDefinition) SetMultivalued(value *bool)() { + m.multivalued = value +} +// SetMutability sets the mutability property value. The mutability property +func (m *AttributeDefinition) SetMutability(value *Mutability)() { + m.mutability = value +} +// SetName sets the name property value. Name of the attribute. Must be unique within the object definition. Not nullable. +func (m *AttributeDefinition) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttributeDefinition) SetOdataType(value *string)() { + m.odataType = value +} +// SetReferencedObjects sets the referencedObjects property value. For attributes with reference type, lists referenced objects (for example, the manager attribute would list User as the referenced object). +func (m *AttributeDefinition) SetReferencedObjects(value []ReferencedObjectable)() { + m.referencedObjects = value +} +// SetRequired sets the required property value. true if attribute is required. Object can not be created if any of the required attributes are missing. If during synchronization, the required attribute has no value, the default value will be used. If default the value was not set, synchronization will record an error. +func (m *AttributeDefinition) SetRequired(value *bool)() { + m.required = value +} +// SetType sets the type property value. The type property +func (m *AttributeDefinition) SetType(value *AttributeType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/attribute_definition_collection_response.go new file mode 100644 index 000000000..5b333af21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeDefinitionCollectionResponse +type AttributeDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttributeDefinitionable +} +// NewAttributeDefinitionCollectionResponse instantiates a new AttributeDefinitionCollectionResponse and sets the default values. +func NewAttributeDefinitionCollectionResponse()(*AttributeDefinitionCollectionResponse) { + m := &AttributeDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttributeDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AttributeDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttributeDefinitionCollectionResponse) GetValue()([]AttributeDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttributeDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttributeDefinitionCollectionResponse) SetValue(value []AttributeDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attribute_definition_collection_responseable.go new file mode 100644 index 000000000..9588ab0e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeDefinitionCollectionResponseable +type AttributeDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttributeDefinitionable) + SetValue(value []AttributeDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_definitionable.go b/src/internal/connector/graph/betasdk/models/attribute_definitionable.go new file mode 100644 index 000000000..932efa25a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_definitionable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeDefinitionable +type AttributeDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnchor()(*bool) + GetApiExpressions()([]StringKeyStringValuePairable) + GetCaseExact()(*bool) + GetDefaultValue()(*string) + GetFlowNullValues()(*bool) + GetMetadata()([]MetadataEntryable) + GetMultivalued()(*bool) + GetMutability()(*Mutability) + GetName()(*string) + GetOdataType()(*string) + GetReferencedObjects()([]ReferencedObjectable) + GetRequired()(*bool) + GetType()(*AttributeType) + SetAnchor(value *bool)() + SetApiExpressions(value []StringKeyStringValuePairable)() + SetCaseExact(value *bool)() + SetDefaultValue(value *string)() + SetFlowNullValues(value *bool)() + SetMetadata(value []MetadataEntryable)() + SetMultivalued(value *bool)() + SetMutability(value *Mutability)() + SetName(value *string)() + SetOdataType(value *string)() + SetReferencedObjects(value []ReferencedObjectable)() + SetRequired(value *bool)() + SetType(value *AttributeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_flow_behavior.go b/src/internal/connector/graph/betasdk/models/attribute_flow_behavior.go new file mode 100644 index 000000000..6f78b5000 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_flow_behavior.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttributeFlowBehavior int + +const ( + FLOWWHENCHANGED_ATTRIBUTEFLOWBEHAVIOR AttributeFlowBehavior = iota + FLOWALWAYS_ATTRIBUTEFLOWBEHAVIOR +) + +func (i AttributeFlowBehavior) String() string { + return []string{"FlowWhenChanged", "FlowAlways"}[i] +} +func ParseAttributeFlowBehavior(v string) (interface{}, error) { + result := FLOWWHENCHANGED_ATTRIBUTEFLOWBEHAVIOR + switch v { + case "FlowWhenChanged": + result = FLOWWHENCHANGED_ATTRIBUTEFLOWBEHAVIOR + case "FlowAlways": + result = FLOWALWAYS_ATTRIBUTEFLOWBEHAVIOR + default: + return 0, errors.New("Unknown AttributeFlowBehavior value: " + v) + } + return &result, nil +} +func SerializeAttributeFlowBehavior(values []AttributeFlowBehavior) []string { + 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/attribute_flow_type.go b/src/internal/connector/graph/betasdk/models/attribute_flow_type.go new file mode 100644 index 000000000..2bde05a40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_flow_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttributeFlowType int + +const ( + ALWAYS_ATTRIBUTEFLOWTYPE AttributeFlowType = iota + OBJECTADDONLY_ATTRIBUTEFLOWTYPE + MULTIVALUEADDONLY_ATTRIBUTEFLOWTYPE + VALUEADDONLY_ATTRIBUTEFLOWTYPE + ATTRIBUTEADDONLY_ATTRIBUTEFLOWTYPE +) + +func (i AttributeFlowType) String() string { + return []string{"Always", "ObjectAddOnly", "MultiValueAddOnly", "ValueAddOnly", "AttributeAddOnly"}[i] +} +func ParseAttributeFlowType(v string) (interface{}, error) { + result := ALWAYS_ATTRIBUTEFLOWTYPE + switch v { + case "Always": + result = ALWAYS_ATTRIBUTEFLOWTYPE + case "ObjectAddOnly": + result = OBJECTADDONLY_ATTRIBUTEFLOWTYPE + case "MultiValueAddOnly": + result = MULTIVALUEADDONLY_ATTRIBUTEFLOWTYPE + case "ValueAddOnly": + result = VALUEADDONLY_ATTRIBUTEFLOWTYPE + case "AttributeAddOnly": + result = ATTRIBUTEADDONLY_ATTRIBUTEFLOWTYPE + default: + return 0, errors.New("Unknown AttributeFlowType value: " + v) + } + return &result, nil +} +func SerializeAttributeFlowType(values []AttributeFlowType) []string { + 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/attribute_mapping.go b/src/internal/connector/graph/betasdk/models/attribute_mapping.go new file mode 100644 index 000000000..a7b755222 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping.go @@ -0,0 +1,255 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMapping +type AttributeMapping struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Default value to be used in case the source property was evaluated to null. Optional. + defaultValue *string + // For internal use only. + exportMissingReferences *bool + // The flowBehavior property + flowBehavior *AttributeFlowBehavior + // The flowType property + flowType *AttributeFlowType + // If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes. + matchingPriority *int32 + // The OdataType property + odataType *string + // Defines how a value should be extracted (or transformed) from the source object. + source AttributeMappingSourceable + // Name of the attribute on the target object. + targetAttributeName *string +} +// NewAttributeMapping instantiates a new attributeMapping and sets the default values. +func NewAttributeMapping()(*AttributeMapping) { + m := &AttributeMapping{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttributeMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMapping(), 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 *AttributeMapping) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultValue gets the defaultValue property value. Default value to be used in case the source property was evaluated to null. Optional. +func (m *AttributeMapping) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetExportMissingReferences gets the exportMissingReferences property value. For internal use only. +func (m *AttributeMapping) GetExportMissingReferences()(*bool) { + return m.exportMissingReferences +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["exportMissingReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExportMissingReferences(val) + } + return nil + } + res["flowBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttributeFlowBehavior) + if err != nil { + return err + } + if val != nil { + m.SetFlowBehavior(val.(*AttributeFlowBehavior)) + } + return nil + } + res["flowType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttributeFlowType) + if err != nil { + return err + } + if val != nil { + m.SetFlowType(val.(*AttributeFlowType)) + } + return nil + } + res["matchingPriority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMatchingPriority(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["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAttributeMappingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(AttributeMappingSourceable)) + } + return nil + } + res["targetAttributeName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetAttributeName(val) + } + return nil + } + return res +} +// GetFlowBehavior gets the flowBehavior property value. The flowBehavior property +func (m *AttributeMapping) GetFlowBehavior()(*AttributeFlowBehavior) { + return m.flowBehavior +} +// GetFlowType gets the flowType property value. The flowType property +func (m *AttributeMapping) GetFlowType()(*AttributeFlowType) { + return m.flowType +} +// GetMatchingPriority gets the matchingPriority property value. If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes. +func (m *AttributeMapping) GetMatchingPriority()(*int32) { + return m.matchingPriority +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttributeMapping) GetOdataType()(*string) { + return m.odataType +} +// GetSource gets the source property value. Defines how a value should be extracted (or transformed) from the source object. +func (m *AttributeMapping) GetSource()(AttributeMappingSourceable) { + return m.source +} +// GetTargetAttributeName gets the targetAttributeName property value. Name of the attribute on the target object. +func (m *AttributeMapping) GetTargetAttributeName()(*string) { + return m.targetAttributeName +} +// Serialize serializes information the current object +func (m *AttributeMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("exportMissingReferences", m.GetExportMissingReferences()) + if err != nil { + return err + } + } + if m.GetFlowBehavior() != nil { + cast := (*m.GetFlowBehavior()).String() + err := writer.WriteStringValue("flowBehavior", &cast) + if err != nil { + return err + } + } + if m.GetFlowType() != nil { + cast := (*m.GetFlowType()).String() + err := writer.WriteStringValue("flowType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("matchingPriority", m.GetMatchingPriority()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("targetAttributeName", m.GetTargetAttributeName()) + 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 *AttributeMapping) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultValue sets the defaultValue property value. Default value to be used in case the source property was evaluated to null. Optional. +func (m *AttributeMapping) SetDefaultValue(value *string)() { + m.defaultValue = value +} +// SetExportMissingReferences sets the exportMissingReferences property value. For internal use only. +func (m *AttributeMapping) SetExportMissingReferences(value *bool)() { + m.exportMissingReferences = value +} +// SetFlowBehavior sets the flowBehavior property value. The flowBehavior property +func (m *AttributeMapping) SetFlowBehavior(value *AttributeFlowBehavior)() { + m.flowBehavior = value +} +// SetFlowType sets the flowType property value. The flowType property +func (m *AttributeMapping) SetFlowType(value *AttributeFlowType)() { + m.flowType = value +} +// SetMatchingPriority sets the matchingPriority property value. If higher than 0, this attribute will be used to perform an initial match of the objects between source and target directories. The synchronization engine will try to find the matching object using attribute with lowest value of matching priority first. If not found, the attribute with the next matching priority will be used, and so on a until match is found or no more matching attributes are left. Only attributes that are expected to have unique values, such as email, should be used as matching attributes. +func (m *AttributeMapping) SetMatchingPriority(value *int32)() { + m.matchingPriority = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttributeMapping) SetOdataType(value *string)() { + m.odataType = value +} +// SetSource sets the source property value. Defines how a value should be extracted (or transformed) from the source object. +func (m *AttributeMapping) SetSource(value AttributeMappingSourceable)() { + m.source = value +} +// SetTargetAttributeName sets the targetAttributeName property value. Name of the attribute on the target object. +func (m *AttributeMapping) SetTargetAttributeName(value *string)() { + m.targetAttributeName = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_response.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_response.go new file mode 100644 index 000000000..702e58e7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingCollectionResponse +type AttributeMappingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttributeMappingable +} +// NewAttributeMappingCollectionResponse instantiates a new AttributeMappingCollectionResponse and sets the default values. +func NewAttributeMappingCollectionResponse()(*AttributeMappingCollectionResponse) { + m := &AttributeMappingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttributeMappingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeMappingable, len(val)) + for i, v := range val { + res[i] = v.(AttributeMappingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttributeMappingCollectionResponse) GetValue()([]AttributeMappingable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttributeMappingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttributeMappingCollectionResponse) SetValue(value []AttributeMappingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_responseable.go new file mode 100644 index 000000000..92c7aacbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingCollectionResponseable +type AttributeMappingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttributeMappingable) + SetValue(value []AttributeMappingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema.go new file mode 100644 index 000000000..adc20dd75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingFunctionSchema +type AttributeMappingFunctionSchema struct { + Entity + // Collection of function parameters. + parameters []AttributeMappingParameterSchemaable +} +// NewAttributeMappingFunctionSchema instantiates a new AttributeMappingFunctionSchema and sets the default values. +func NewAttributeMappingFunctionSchema()(*AttributeMappingFunctionSchema) { + m := &AttributeMappingFunctionSchema{ + Entity: *NewEntity(), + } + return m +} +// CreateAttributeMappingFunctionSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingFunctionSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingFunctionSchema(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingFunctionSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeMappingParameterSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeMappingParameterSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AttributeMappingParameterSchemaable) + } + m.SetParameters(res) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. Collection of function parameters. +func (m *AttributeMappingFunctionSchema) GetParameters()([]AttributeMappingParameterSchemaable) { + return m.parameters +} +// Serialize serializes information the current object +func (m *AttributeMappingFunctionSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParameters())) + for i, v := range m.GetParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("parameters", cast) + if err != nil { + return err + } + } + return nil +} +// SetParameters sets the parameters property value. Collection of function parameters. +func (m *AttributeMappingFunctionSchema) SetParameters(value []AttributeMappingParameterSchemaable)() { + m.parameters = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_response.go new file mode 100644 index 000000000..339d52888 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingFunctionSchemaCollectionResponse +type AttributeMappingFunctionSchemaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttributeMappingFunctionSchemaable +} +// NewAttributeMappingFunctionSchemaCollectionResponse instantiates a new AttributeMappingFunctionSchemaCollectionResponse and sets the default values. +func NewAttributeMappingFunctionSchemaCollectionResponse()(*AttributeMappingFunctionSchemaCollectionResponse) { + m := &AttributeMappingFunctionSchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttributeMappingFunctionSchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingFunctionSchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingFunctionSchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingFunctionSchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeMappingFunctionSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeMappingFunctionSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AttributeMappingFunctionSchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttributeMappingFunctionSchemaCollectionResponse) GetValue()([]AttributeMappingFunctionSchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttributeMappingFunctionSchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttributeMappingFunctionSchemaCollectionResponse) SetValue(value []AttributeMappingFunctionSchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_responseable.go new file mode 100644 index 000000000..bb1757942 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schema_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingFunctionSchemaCollectionResponseable +type AttributeMappingFunctionSchemaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttributeMappingFunctionSchemaable) + SetValue(value []AttributeMappingFunctionSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schemaable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schemaable.go new file mode 100644 index 000000000..b60ff1b9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_function_schemaable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingFunctionSchemaable +type AttributeMappingFunctionSchemaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParameters()([]AttributeMappingParameterSchemaable) + SetParameters(value []AttributeMappingParameterSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema.go new file mode 100644 index 000000000..d44a6e41e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingParameterSchema +type AttributeMappingParameterSchema 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 given parameter can be provided multiple times (for example, multiple input strings in the Concatenate(string,string,...) function). + allowMultipleOccurrences *bool + // Parameter name. + name *string + // The OdataType property + odataType *string + // true if the parameter is required; otherwise false. + required *bool + // The type property + type_escaped *AttributeType +} +// NewAttributeMappingParameterSchema instantiates a new attributeMappingParameterSchema and sets the default values. +func NewAttributeMappingParameterSchema()(*AttributeMappingParameterSchema) { + m := &AttributeMappingParameterSchema{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttributeMappingParameterSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingParameterSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingParameterSchema(), 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 *AttributeMappingParameterSchema) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowMultipleOccurrences gets the allowMultipleOccurrences property value. The given parameter can be provided multiple times (for example, multiple input strings in the Concatenate(string,string,...) function). +func (m *AttributeMappingParameterSchema) GetAllowMultipleOccurrences()(*bool) { + return m.allowMultipleOccurrences +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingParameterSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowMultipleOccurrences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMultipleOccurrences(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttributeType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AttributeType)) + } + return nil + } + return res +} +// GetName gets the name property value. Parameter name. +func (m *AttributeMappingParameterSchema) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttributeMappingParameterSchema) GetOdataType()(*string) { + return m.odataType +} +// GetRequired gets the required property value. true if the parameter is required; otherwise false. +func (m *AttributeMappingParameterSchema) GetRequired()(*bool) { + return m.required +} +// GetType gets the type property value. The type property +func (m *AttributeMappingParameterSchema) GetType()(*AttributeType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AttributeMappingParameterSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowMultipleOccurrences", m.GetAllowMultipleOccurrences()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *AttributeMappingParameterSchema) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowMultipleOccurrences sets the allowMultipleOccurrences property value. The given parameter can be provided multiple times (for example, multiple input strings in the Concatenate(string,string,...) function). +func (m *AttributeMappingParameterSchema) SetAllowMultipleOccurrences(value *bool)() { + m.allowMultipleOccurrences = value +} +// SetName sets the name property value. Parameter name. +func (m *AttributeMappingParameterSchema) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttributeMappingParameterSchema) SetOdataType(value *string)() { + m.odataType = value +} +// SetRequired sets the required property value. true if the parameter is required; otherwise false. +func (m *AttributeMappingParameterSchema) SetRequired(value *bool)() { + m.required = value +} +// SetType sets the type property value. The type property +func (m *AttributeMappingParameterSchema) SetType(value *AttributeType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_response.go new file mode 100644 index 000000000..221b1cab0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingParameterSchemaCollectionResponse +type AttributeMappingParameterSchemaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttributeMappingParameterSchemaable +} +// NewAttributeMappingParameterSchemaCollectionResponse instantiates a new AttributeMappingParameterSchemaCollectionResponse and sets the default values. +func NewAttributeMappingParameterSchemaCollectionResponse()(*AttributeMappingParameterSchemaCollectionResponse) { + m := &AttributeMappingParameterSchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttributeMappingParameterSchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingParameterSchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingParameterSchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingParameterSchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeMappingParameterSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeMappingParameterSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AttributeMappingParameterSchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttributeMappingParameterSchemaCollectionResponse) GetValue()([]AttributeMappingParameterSchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttributeMappingParameterSchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttributeMappingParameterSchemaCollectionResponse) SetValue(value []AttributeMappingParameterSchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_responseable.go new file mode 100644 index 000000000..820432c1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schema_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingParameterSchemaCollectionResponseable +type AttributeMappingParameterSchemaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttributeMappingParameterSchemaable) + SetValue(value []AttributeMappingParameterSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schemaable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schemaable.go new file mode 100644 index 000000000..18e5aa593 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_parameter_schemaable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingParameterSchemaable +type AttributeMappingParameterSchemaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowMultipleOccurrences()(*bool) + GetName()(*string) + GetOdataType()(*string) + GetRequired()(*bool) + GetType()(*AttributeType) + SetAllowMultipleOccurrences(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() + SetRequired(value *bool)() + SetType(value *AttributeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_source.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_source.go new file mode 100644 index 000000000..2d1dad261 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_source.go @@ -0,0 +1,184 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingSource +type AttributeMappingSource 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 expression property + expression *string + // The name property + name *string + // The OdataType property + odataType *string + // The parameters property + parameters []StringKeyAttributeMappingSourceValuePairable + // The type property + type_escaped *AttributeMappingSourceType +} +// NewAttributeMappingSource instantiates a new attributeMappingSource and sets the default values. +func NewAttributeMappingSource()(*AttributeMappingSource) { + m := &AttributeMappingSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttributeMappingSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeMappingSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeMappingSource(), 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 *AttributeMappingSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExpression gets the expression property value. The expression property +func (m *AttributeMappingSource) GetExpression()(*string) { + return m.expression +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeMappingSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expression"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExpression(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateStringKeyAttributeMappingSourceValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]StringKeyAttributeMappingSourceValuePairable, len(val)) + for i, v := range val { + res[i] = v.(StringKeyAttributeMappingSourceValuePairable) + } + m.SetParameters(res) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttributeMappingSourceType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AttributeMappingSourceType)) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *AttributeMappingSource) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttributeMappingSource) GetOdataType()(*string) { + return m.odataType +} +// GetParameters gets the parameters property value. The parameters property +func (m *AttributeMappingSource) GetParameters()([]StringKeyAttributeMappingSourceValuePairable) { + return m.parameters +} +// GetType gets the type property value. The type property +func (m *AttributeMappingSource) GetType()(*AttributeMappingSourceType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AttributeMappingSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("expression", m.GetExpression()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParameters())) + for i, v := range m.GetParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("parameters", cast) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *AttributeMappingSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExpression sets the expression property value. The expression property +func (m *AttributeMappingSource) SetExpression(value *string)() { + m.expression = value +} +// SetName sets the name property value. The name property +func (m *AttributeMappingSource) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttributeMappingSource) SetOdataType(value *string)() { + m.odataType = value +} +// SetParameters sets the parameters property value. The parameters property +func (m *AttributeMappingSource) SetParameters(value []StringKeyAttributeMappingSourceValuePairable)() { + m.parameters = value +} +// SetType sets the type property value. The type property +func (m *AttributeMappingSource) SetType(value *AttributeMappingSourceType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mapping_source_type.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_source_type.go new file mode 100644 index 000000000..21477d961 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_source_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttributeMappingSourceType int + +const ( + ATTRIBUTE_ATTRIBUTEMAPPINGSOURCETYPE AttributeMappingSourceType = iota + CONSTANT_ATTRIBUTEMAPPINGSOURCETYPE + FUNCTION_ATTRIBUTEMAPPINGSOURCETYPE +) + +func (i AttributeMappingSourceType) String() string { + return []string{"Attribute", "Constant", "Function"}[i] +} +func ParseAttributeMappingSourceType(v string) (interface{}, error) { + result := ATTRIBUTE_ATTRIBUTEMAPPINGSOURCETYPE + switch v { + case "Attribute": + result = ATTRIBUTE_ATTRIBUTEMAPPINGSOURCETYPE + case "Constant": + result = CONSTANT_ATTRIBUTEMAPPINGSOURCETYPE + case "Function": + result = FUNCTION_ATTRIBUTEMAPPINGSOURCETYPE + default: + return 0, errors.New("Unknown AttributeMappingSourceType value: " + v) + } + return &result, nil +} +func SerializeAttributeMappingSourceType(values []AttributeMappingSourceType) []string { + 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/attribute_mapping_sourceable.go b/src/internal/connector/graph/betasdk/models/attribute_mapping_sourceable.go new file mode 100644 index 000000000..060016865 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mapping_sourceable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingSourceable +type AttributeMappingSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpression()(*string) + GetName()(*string) + GetOdataType()(*string) + GetParameters()([]StringKeyAttributeMappingSourceValuePairable) + GetType()(*AttributeMappingSourceType) + SetExpression(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetParameters(value []StringKeyAttributeMappingSourceValuePairable)() + SetType(value *AttributeMappingSourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_mappingable.go b/src/internal/connector/graph/betasdk/models/attribute_mappingable.go new file mode 100644 index 000000000..313548ad7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_mappingable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeMappingable +type AttributeMappingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*string) + GetExportMissingReferences()(*bool) + GetFlowBehavior()(*AttributeFlowBehavior) + GetFlowType()(*AttributeFlowType) + GetMatchingPriority()(*int32) + GetOdataType()(*string) + GetSource()(AttributeMappingSourceable) + GetTargetAttributeName()(*string) + SetDefaultValue(value *string)() + SetExportMissingReferences(value *bool)() + SetFlowBehavior(value *AttributeFlowBehavior)() + SetFlowType(value *AttributeFlowType)() + SetMatchingPriority(value *int32)() + SetOdataType(value *string)() + SetSource(value AttributeMappingSourceable)() + SetTargetAttributeName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_set.go b/src/internal/connector/graph/betasdk/models/attribute_set.go new file mode 100644 index 000000000..d758f1a53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_set.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeSet provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttributeSet struct { + Entity + // Description of the attribute set. Can be up to 128 characters long and include Unicode characters. Can be changed later. + description *string + // Maximum number of custom security attributes that can be defined in this attribute set. Default value is null. If not specified, the administrator can add up to the maximum of 500 active attributes per tenant. Can be changed later. + maxAttributesPerSet *int32 +} +// NewAttributeSet instantiates a new attributeSet and sets the default values. +func NewAttributeSet()(*AttributeSet) { + m := &AttributeSet{ + Entity: *NewEntity(), + } + return m +} +// CreateAttributeSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeSet(), nil +} +// GetDescription gets the description property value. Description of the attribute set. Can be up to 128 characters long and include Unicode characters. Can be changed later. +func (m *AttributeSet) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["maxAttributesPerSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxAttributesPerSet(val) + } + return nil + } + return res +} +// GetMaxAttributesPerSet gets the maxAttributesPerSet property value. Maximum number of custom security attributes that can be defined in this attribute set. Default value is null. If not specified, the administrator can add up to the maximum of 500 active attributes per tenant. Can be changed later. +func (m *AttributeSet) GetMaxAttributesPerSet()(*int32) { + return m.maxAttributesPerSet +} +// Serialize serializes information the current object +func (m *AttributeSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maxAttributesPerSet", m.GetMaxAttributesPerSet()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the attribute set. Can be up to 128 characters long and include Unicode characters. Can be changed later. +func (m *AttributeSet) SetDescription(value *string)() { + m.description = value +} +// SetMaxAttributesPerSet sets the maxAttributesPerSet property value. Maximum number of custom security attributes that can be defined in this attribute set. Default value is null. If not specified, the administrator can add up to the maximum of 500 active attributes per tenant. Can be changed later. +func (m *AttributeSet) SetMaxAttributesPerSet(value *int32)() { + m.maxAttributesPerSet = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_set_collection_response.go b/src/internal/connector/graph/betasdk/models/attribute_set_collection_response.go new file mode 100644 index 000000000..5715cf4cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeSetCollectionResponse +type AttributeSetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AttributeSetable +} +// NewAttributeSetCollectionResponse instantiates a new AttributeSetCollectionResponse and sets the default values. +func NewAttributeSetCollectionResponse()(*AttributeSetCollectionResponse) { + m := &AttributeSetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAttributeSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttributeSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttributeSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttributeSetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeSetable, len(val)) + for i, v := range val { + res[i] = v.(AttributeSetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AttributeSetCollectionResponse) GetValue()([]AttributeSetable) { + return m.value +} +// Serialize serializes information the current object +func (m *AttributeSetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AttributeSetCollectionResponse) SetValue(value []AttributeSetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/attribute_set_collection_responseable.go new file mode 100644 index 000000000..33db6bc03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeSetCollectionResponseable +type AttributeSetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AttributeSetable) + SetValue(value []AttributeSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_setable.go b/src/internal/connector/graph/betasdk/models/attribute_setable.go new file mode 100644 index 000000000..dc883da05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_setable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttributeSetable +type AttributeSetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetMaxAttributesPerSet()(*int32) + SetDescription(value *string)() + SetMaxAttributesPerSet(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/attribute_type.go b/src/internal/connector/graph/betasdk/models/attribute_type.go new file mode 100644 index 000000000..1cf3de7fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/attribute_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AttributeType int + +const ( + STRING_ATTRIBUTETYPE AttributeType = iota + INTEGER_ATTRIBUTETYPE + REFERENCE_ATTRIBUTETYPE + BINARY_ATTRIBUTETYPE + BOOLEAN_ATTRIBUTETYPE + DATETIME_ATTRIBUTETYPE +) + +func (i AttributeType) String() string { + return []string{"String", "Integer", "Reference", "Binary", "Boolean", "DateTime"}[i] +} +func ParseAttributeType(v string) (interface{}, error) { + result := STRING_ATTRIBUTETYPE + switch v { + case "String": + result = STRING_ATTRIBUTETYPE + case "Integer": + result = INTEGER_ATTRIBUTETYPE + case "Reference": + result = REFERENCE_ATTRIBUTETYPE + case "Binary": + result = BINARY_ATTRIBUTETYPE + case "Boolean": + result = BOOLEAN_ATTRIBUTETYPE + case "DateTime": + result = DATETIME_ATTRIBUTETYPE + default: + return 0, errors.New("Unknown AttributeType value: " + v) + } + return &result, nil +} +func SerializeAttributeType(values []AttributeType) []string { + 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/audio.go b/src/internal/connector/graph/betasdk/models/audio.go new file mode 100644 index 000000000..86a62d4aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio.go @@ -0,0 +1,487 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Audio +type Audio 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 title of the album for this audio file. + album *string + // The artist named on the album for the audio file. + albumArtist *string + // The performing artist for the audio file. + artist *string + // Bitrate expressed in kbps. + bitrate *int64 + // The name of the composer of the audio file. + composers *string + // Copyright information for the audio file. + copyright *string + // The number of the disc this audio file came from. + disc *int32 + // The total number of discs in this album. + discCount *int32 + // Duration of the audio file, expressed in milliseconds + duration *int64 + // The genre of this audio file. + genre *string + // Indicates if the file is protected with digital rights management. + hasDrm *bool + // Indicates if the file is encoded with a variable bitrate. + isVariableBitrate *bool + // The OdataType property + odataType *string + // The title of the audio file. + title *string + // The number of the track on the original disc for this audio file. + track *int32 + // The total number of tracks on the original disc for this audio file. + trackCount *int32 + // The year the audio file was recorded. + year *int32 +} +// NewAudio instantiates a new audio and sets the default values. +func NewAudio()(*Audio) { + m := &Audio{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAudioFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAudioFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAudio(), 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 *Audio) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlbum gets the album property value. The title of the album for this audio file. +func (m *Audio) GetAlbum()(*string) { + return m.album +} +// GetAlbumArtist gets the albumArtist property value. The artist named on the album for the audio file. +func (m *Audio) GetAlbumArtist()(*string) { + return m.albumArtist +} +// GetArtist gets the artist property value. The performing artist for the audio file. +func (m *Audio) GetArtist()(*string) { + return m.artist +} +// GetBitrate gets the bitrate property value. Bitrate expressed in kbps. +func (m *Audio) GetBitrate()(*int64) { + return m.bitrate +} +// GetComposers gets the composers property value. The name of the composer of the audio file. +func (m *Audio) GetComposers()(*string) { + return m.composers +} +// GetCopyright gets the copyright property value. Copyright information for the audio file. +func (m *Audio) GetCopyright()(*string) { + return m.copyright +} +// GetDisc gets the disc property value. The number of the disc this audio file came from. +func (m *Audio) GetDisc()(*int32) { + return m.disc +} +// GetDiscCount gets the discCount property value. The total number of discs in this album. +func (m *Audio) GetDiscCount()(*int32) { + return m.discCount +} +// GetDuration gets the duration property value. Duration of the audio file, expressed in milliseconds +func (m *Audio) GetDuration()(*int64) { + return m.duration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Audio) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["album"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlbum(val) + } + return nil + } + res["albumArtist"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlbumArtist(val) + } + return nil + } + res["artist"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArtist(val) + } + return nil + } + res["bitrate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetBitrate(val) + } + return nil + } + res["composers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComposers(val) + } + return nil + } + res["copyright"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCopyright(val) + } + return nil + } + res["disc"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDisc(val) + } + return nil + } + res["discCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscCount(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["genre"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGenre(val) + } + return nil + } + res["hasDrm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDrm(val) + } + return nil + } + res["isVariableBitrate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVariableBitrate(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["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["track"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTrack(val) + } + return nil + } + res["trackCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTrackCount(val) + } + return nil + } + res["year"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetYear(val) + } + return nil + } + return res +} +// GetGenre gets the genre property value. The genre of this audio file. +func (m *Audio) GetGenre()(*string) { + return m.genre +} +// GetHasDrm gets the hasDrm property value. Indicates if the file is protected with digital rights management. +func (m *Audio) GetHasDrm()(*bool) { + return m.hasDrm +} +// GetIsVariableBitrate gets the isVariableBitrate property value. Indicates if the file is encoded with a variable bitrate. +func (m *Audio) GetIsVariableBitrate()(*bool) { + return m.isVariableBitrate +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Audio) GetOdataType()(*string) { + return m.odataType +} +// GetTitle gets the title property value. The title of the audio file. +func (m *Audio) GetTitle()(*string) { + return m.title +} +// GetTrack gets the track property value. The number of the track on the original disc for this audio file. +func (m *Audio) GetTrack()(*int32) { + return m.track +} +// GetTrackCount gets the trackCount property value. The total number of tracks on the original disc for this audio file. +func (m *Audio) GetTrackCount()(*int32) { + return m.trackCount +} +// GetYear gets the year property value. The year the audio file was recorded. +func (m *Audio) GetYear()(*int32) { + return m.year +} +// Serialize serializes information the current object +func (m *Audio) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("album", m.GetAlbum()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("albumArtist", m.GetAlbumArtist()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("artist", m.GetArtist()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("bitrate", m.GetBitrate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("composers", m.GetComposers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("copyright", m.GetCopyright()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("disc", m.GetDisc()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("discCount", m.GetDiscCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("genre", m.GetGenre()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasDrm", m.GetHasDrm()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isVariableBitrate", m.GetIsVariableBitrate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("track", m.GetTrack()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("trackCount", m.GetTrackCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("year", m.GetYear()) + 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 *Audio) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlbum sets the album property value. The title of the album for this audio file. +func (m *Audio) SetAlbum(value *string)() { + m.album = value +} +// SetAlbumArtist sets the albumArtist property value. The artist named on the album for the audio file. +func (m *Audio) SetAlbumArtist(value *string)() { + m.albumArtist = value +} +// SetArtist sets the artist property value. The performing artist for the audio file. +func (m *Audio) SetArtist(value *string)() { + m.artist = value +} +// SetBitrate sets the bitrate property value. Bitrate expressed in kbps. +func (m *Audio) SetBitrate(value *int64)() { + m.bitrate = value +} +// SetComposers sets the composers property value. The name of the composer of the audio file. +func (m *Audio) SetComposers(value *string)() { + m.composers = value +} +// SetCopyright sets the copyright property value. Copyright information for the audio file. +func (m *Audio) SetCopyright(value *string)() { + m.copyright = value +} +// SetDisc sets the disc property value. The number of the disc this audio file came from. +func (m *Audio) SetDisc(value *int32)() { + m.disc = value +} +// SetDiscCount sets the discCount property value. The total number of discs in this album. +func (m *Audio) SetDiscCount(value *int32)() { + m.discCount = value +} +// SetDuration sets the duration property value. Duration of the audio file, expressed in milliseconds +func (m *Audio) SetDuration(value *int64)() { + m.duration = value +} +// SetGenre sets the genre property value. The genre of this audio file. +func (m *Audio) SetGenre(value *string)() { + m.genre = value +} +// SetHasDrm sets the hasDrm property value. Indicates if the file is protected with digital rights management. +func (m *Audio) SetHasDrm(value *bool)() { + m.hasDrm = value +} +// SetIsVariableBitrate sets the isVariableBitrate property value. Indicates if the file is encoded with a variable bitrate. +func (m *Audio) SetIsVariableBitrate(value *bool)() { + m.isVariableBitrate = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Audio) SetOdataType(value *string)() { + m.odataType = value +} +// SetTitle sets the title property value. The title of the audio file. +func (m *Audio) SetTitle(value *string)() { + m.title = value +} +// SetTrack sets the track property value. The number of the track on the original disc for this audio file. +func (m *Audio) SetTrack(value *int32)() { + m.track = value +} +// SetTrackCount sets the trackCount property value. The total number of tracks on the original disc for this audio file. +func (m *Audio) SetTrackCount(value *int32)() { + m.trackCount = value +} +// SetYear sets the year property value. The year the audio file was recorded. +func (m *Audio) SetYear(value *int32)() { + m.year = value +} diff --git a/src/internal/connector/graph/betasdk/models/audio_conferencing.go b/src/internal/connector/graph/betasdk/models/audio_conferencing.go new file mode 100644 index 000000000..97f5684fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_conferencing.go @@ -0,0 +1,235 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioConferencing +type AudioConferencing 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 conference id of the online meeting. + conferenceId *string + // A URL to the externally-accessible web page that contains dial-in information. + dialinUrl *string + // The OdataType property + odataType *string + // The tollFreeNumber property + tollFreeNumber *string + // List of toll-free numbers that are displayed in the meeting invite. + tollFreeNumbers []string + // The tollNumber property + tollNumber *string + // List of toll numbers that are displayed in the meeting invite. + tollNumbers []string +} +// NewAudioConferencing instantiates a new audioConferencing and sets the default values. +func NewAudioConferencing()(*AudioConferencing) { + m := &AudioConferencing{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAudioConferencingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAudioConferencingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAudioConferencing(), 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 *AudioConferencing) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConferenceId gets the conferenceId property value. The conference id of the online meeting. +func (m *AudioConferencing) GetConferenceId()(*string) { + return m.conferenceId +} +// GetDialinUrl gets the dialinUrl property value. A URL to the externally-accessible web page that contains dial-in information. +func (m *AudioConferencing) GetDialinUrl()(*string) { + return m.dialinUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AudioConferencing) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["conferenceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConferenceId(val) + } + return nil + } + res["dialinUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDialinUrl(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["tollFreeNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTollFreeNumber(val) + } + return nil + } + res["tollFreeNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTollFreeNumbers(res) + } + return nil + } + res["tollNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTollNumber(val) + } + return nil + } + res["tollNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTollNumbers(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AudioConferencing) GetOdataType()(*string) { + return m.odataType +} +// GetTollFreeNumber gets the tollFreeNumber property value. The tollFreeNumber property +func (m *AudioConferencing) GetTollFreeNumber()(*string) { + return m.tollFreeNumber +} +// GetTollFreeNumbers gets the tollFreeNumbers property value. List of toll-free numbers that are displayed in the meeting invite. +func (m *AudioConferencing) GetTollFreeNumbers()([]string) { + return m.tollFreeNumbers +} +// GetTollNumber gets the tollNumber property value. The tollNumber property +func (m *AudioConferencing) GetTollNumber()(*string) { + return m.tollNumber +} +// GetTollNumbers gets the tollNumbers property value. List of toll numbers that are displayed in the meeting invite. +func (m *AudioConferencing) GetTollNumbers()([]string) { + return m.tollNumbers +} +// Serialize serializes information the current object +func (m *AudioConferencing) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("conferenceId", m.GetConferenceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dialinUrl", m.GetDialinUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tollFreeNumber", m.GetTollFreeNumber()) + if err != nil { + return err + } + } + if m.GetTollFreeNumbers() != nil { + err := writer.WriteCollectionOfStringValues("tollFreeNumbers", m.GetTollFreeNumbers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tollNumber", m.GetTollNumber()) + if err != nil { + return err + } + } + if m.GetTollNumbers() != nil { + err := writer.WriteCollectionOfStringValues("tollNumbers", m.GetTollNumbers()) + 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 *AudioConferencing) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConferenceId sets the conferenceId property value. The conference id of the online meeting. +func (m *AudioConferencing) SetConferenceId(value *string)() { + m.conferenceId = value +} +// SetDialinUrl sets the dialinUrl property value. A URL to the externally-accessible web page that contains dial-in information. +func (m *AudioConferencing) SetDialinUrl(value *string)() { + m.dialinUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AudioConferencing) SetOdataType(value *string)() { + m.odataType = value +} +// SetTollFreeNumber sets the tollFreeNumber property value. The tollFreeNumber property +func (m *AudioConferencing) SetTollFreeNumber(value *string)() { + m.tollFreeNumber = value +} +// SetTollFreeNumbers sets the tollFreeNumbers property value. List of toll-free numbers that are displayed in the meeting invite. +func (m *AudioConferencing) SetTollFreeNumbers(value []string)() { + m.tollFreeNumbers = value +} +// SetTollNumber sets the tollNumber property value. The tollNumber property +func (m *AudioConferencing) SetTollNumber(value *string)() { + m.tollNumber = value +} +// SetTollNumbers sets the tollNumbers property value. List of toll numbers that are displayed in the meeting invite. +func (m *AudioConferencing) SetTollNumbers(value []string)() { + m.tollNumbers = value +} diff --git a/src/internal/connector/graph/betasdk/models/audio_conferencingable.go b/src/internal/connector/graph/betasdk/models/audio_conferencingable.go new file mode 100644 index 000000000..fc7f004cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_conferencingable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioConferencingable +type AudioConferencingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConferenceId()(*string) + GetDialinUrl()(*string) + GetOdataType()(*string) + GetTollFreeNumber()(*string) + GetTollFreeNumbers()([]string) + GetTollNumber()(*string) + GetTollNumbers()([]string) + SetConferenceId(value *string)() + SetDialinUrl(value *string)() + SetOdataType(value *string)() + SetTollFreeNumber(value *string)() + SetTollFreeNumbers(value []string)() + SetTollNumber(value *string)() + SetTollNumbers(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/audio_routing_group.go b/src/internal/connector/graph/betasdk/models/audio_routing_group.go new file mode 100644 index 000000000..32b6f22d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_routing_group.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioRoutingGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AudioRoutingGroup struct { + Entity + // List of receiving participant ids. + receivers []string + // The routingMode property + routingMode *RoutingMode + // List of source participant ids. + sources []string +} +// NewAudioRoutingGroup instantiates a new audioRoutingGroup and sets the default values. +func NewAudioRoutingGroup()(*AudioRoutingGroup) { + m := &AudioRoutingGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateAudioRoutingGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAudioRoutingGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAudioRoutingGroup(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AudioRoutingGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["receivers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReceivers(res) + } + return nil + } + res["routingMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRoutingMode) + if err != nil { + return err + } + if val != nil { + m.SetRoutingMode(val.(*RoutingMode)) + } + return nil + } + res["sources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSources(res) + } + return nil + } + return res +} +// GetReceivers gets the receivers property value. List of receiving participant ids. +func (m *AudioRoutingGroup) GetReceivers()([]string) { + return m.receivers +} +// GetRoutingMode gets the routingMode property value. The routingMode property +func (m *AudioRoutingGroup) GetRoutingMode()(*RoutingMode) { + return m.routingMode +} +// GetSources gets the sources property value. List of source participant ids. +func (m *AudioRoutingGroup) GetSources()([]string) { + return m.sources +} +// Serialize serializes information the current object +func (m *AudioRoutingGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetReceivers() != nil { + err = writer.WriteCollectionOfStringValues("receivers", m.GetReceivers()) + if err != nil { + return err + } + } + if m.GetRoutingMode() != nil { + cast := (*m.GetRoutingMode()).String() + err = writer.WriteStringValue("routingMode", &cast) + if err != nil { + return err + } + } + if m.GetSources() != nil { + err = writer.WriteCollectionOfStringValues("sources", m.GetSources()) + if err != nil { + return err + } + } + return nil +} +// SetReceivers sets the receivers property value. List of receiving participant ids. +func (m *AudioRoutingGroup) SetReceivers(value []string)() { + m.receivers = value +} +// SetRoutingMode sets the routingMode property value. The routingMode property +func (m *AudioRoutingGroup) SetRoutingMode(value *RoutingMode)() { + m.routingMode = value +} +// SetSources sets the sources property value. List of source participant ids. +func (m *AudioRoutingGroup) SetSources(value []string)() { + m.sources = value +} diff --git a/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_response.go b/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_response.go new file mode 100644 index 000000000..b48e5827f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioRoutingGroupCollectionResponse +type AudioRoutingGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AudioRoutingGroupable +} +// NewAudioRoutingGroupCollectionResponse instantiates a new AudioRoutingGroupCollectionResponse and sets the default values. +func NewAudioRoutingGroupCollectionResponse()(*AudioRoutingGroupCollectionResponse) { + m := &AudioRoutingGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAudioRoutingGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAudioRoutingGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAudioRoutingGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AudioRoutingGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAudioRoutingGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AudioRoutingGroupable, len(val)) + for i, v := range val { + res[i] = v.(AudioRoutingGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AudioRoutingGroupCollectionResponse) GetValue()([]AudioRoutingGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *AudioRoutingGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AudioRoutingGroupCollectionResponse) SetValue(value []AudioRoutingGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_responseable.go new file mode 100644 index 000000000..e88170adf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_routing_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioRoutingGroupCollectionResponseable +type AudioRoutingGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AudioRoutingGroupable) + SetValue(value []AudioRoutingGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audio_routing_groupable.go b/src/internal/connector/graph/betasdk/models/audio_routing_groupable.go new file mode 100644 index 000000000..8d9b84e11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audio_routing_groupable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AudioRoutingGroupable +type AudioRoutingGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReceivers()([]string) + GetRoutingMode()(*RoutingMode) + GetSources()([]string) + SetReceivers(value []string)() + SetRoutingMode(value *RoutingMode)() + SetSources(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/audioable.go b/src/internal/connector/graph/betasdk/models/audioable.go new file mode 100644 index 000000000..ccbf47727 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audioable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Audioable +type Audioable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlbum()(*string) + GetAlbumArtist()(*string) + GetArtist()(*string) + GetBitrate()(*int64) + GetComposers()(*string) + GetCopyright()(*string) + GetDisc()(*int32) + GetDiscCount()(*int32) + GetDuration()(*int64) + GetGenre()(*string) + GetHasDrm()(*bool) + GetIsVariableBitrate()(*bool) + GetOdataType()(*string) + GetTitle()(*string) + GetTrack()(*int32) + GetTrackCount()(*int32) + GetYear()(*int32) + SetAlbum(value *string)() + SetAlbumArtist(value *string)() + SetArtist(value *string)() + SetBitrate(value *int64)() + SetComposers(value *string)() + SetCopyright(value *string)() + SetDisc(value *int32)() + SetDiscCount(value *int32)() + SetDuration(value *int64)() + SetGenre(value *string)() + SetHasDrm(value *bool)() + SetIsVariableBitrate(value *bool)() + SetOdataType(value *string)() + SetTitle(value *string)() + SetTrack(value *int32)() + SetTrackCount(value *int32)() + SetYear(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_activity_initiator.go b/src/internal/connector/graph/betasdk/models/audit_activity_initiator.go new file mode 100644 index 000000000..8085fae4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_activity_initiator.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditActivityInitiator +type AuditActivityInitiator struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If the actor initiating the activity is an app, this property indicates all its identification information including appId, displayName, servicePrincipalId, and servicePrincipalName. + app AppIdentityable + // The OdataType property + odataType *string + // If the actor initiating the activity is a user, this property indicates their identification information including their id, displayName, and userPrincipalName. + user AuditUserIdentityable +} +// NewAuditActivityInitiator instantiates a new auditActivityInitiator and sets the default values. +func NewAuditActivityInitiator()(*AuditActivityInitiator) { + m := &AuditActivityInitiator{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuditActivityInitiatorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditActivityInitiatorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditActivityInitiator(), 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 *AuditActivityInitiator) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApp gets the app property value. If the actor initiating the activity is an app, this property indicates all its identification information including appId, displayName, servicePrincipalId, and servicePrincipalName. +func (m *AuditActivityInitiator) GetApp()(AppIdentityable) { + return m.app +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditActivityInitiator) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(AppIdentityable)) + } + 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["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuditUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(AuditUserIdentityable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuditActivityInitiator) GetOdataType()(*string) { + return m.odataType +} +// GetUser gets the user property value. If the actor initiating the activity is a user, this property indicates their identification information including their id, displayName, and userPrincipalName. +func (m *AuditActivityInitiator) GetUser()(AuditUserIdentityable) { + return m.user +} +// Serialize serializes information the current object +func (m *AuditActivityInitiator) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *AuditActivityInitiator) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApp sets the app property value. If the actor initiating the activity is an app, this property indicates all its identification information including appId, displayName, servicePrincipalId, and servicePrincipalName. +func (m *AuditActivityInitiator) SetApp(value AppIdentityable)() { + m.app = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuditActivityInitiator) SetOdataType(value *string)() { + m.odataType = value +} +// SetUser sets the user property value. If the actor initiating the activity is a user, this property indicates their identification information including their id, displayName, and userPrincipalName. +func (m *AuditActivityInitiator) SetUser(value AuditUserIdentityable)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_activity_initiatorable.go b/src/internal/connector/graph/betasdk/models/audit_activity_initiatorable.go new file mode 100644 index 000000000..79d79c9b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_activity_initiatorable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditActivityInitiatorable +type AuditActivityInitiatorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApp()(AppIdentityable) + GetOdataType()(*string) + GetUser()(AuditUserIdentityable) + SetApp(value AppIdentityable)() + SetOdataType(value *string)() + SetUser(value AuditUserIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_actor.go b/src/internal/connector/graph/betasdk/models/audit_actor.go new file mode 100644 index 000000000..ee9df80b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_actor.go @@ -0,0 +1,395 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditActor a class containing the properties for Audit Actor. +type AuditActor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the Application. + applicationDisplayName *string + // AAD Application Id. + applicationId *string + // Actor Type. + auditActorType *string + // IPAddress. + ipAddress *string + // The OdataType property + odataType *string + // Remote Tenant Id + remoteTenantId *string + // Remote User Id + remoteUserId *string + // Service Principal Name (SPN). + servicePrincipalName *string + // Actor Type. + type_escaped *string + // User Id. + userId *string + // List of user permissions when the audit was performed. + userPermissions []string + // User Principal Name (UPN). + userPrincipalName *string + // List of user scope tags when the audit was performed. + userRoleScopeTags []RoleScopeTagInfoable +} +// NewAuditActor instantiates a new auditActor and sets the default values. +func NewAuditActor()(*AuditActor) { + m := &AuditActor{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuditActorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditActorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditActor(), 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 *AuditActor) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationDisplayName gets the applicationDisplayName property value. Name of the Application. +func (m *AuditActor) GetApplicationDisplayName()(*string) { + return m.applicationDisplayName +} +// GetApplicationId gets the applicationId property value. AAD Application Id. +func (m *AuditActor) GetApplicationId()(*string) { + return m.applicationId +} +// GetAuditActorType gets the auditActorType property value. Actor Type. +func (m *AuditActor) GetAuditActorType()(*string) { + return m.auditActorType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditActor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationDisplayName(val) + } + return nil + } + res["applicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationId(val) + } + return nil + } + res["auditActorType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuditActorType(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(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["remoteTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteTenantId(val) + } + return nil + } + res["remoteUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteUserId(val) + } + return nil + } + res["servicePrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUserPermissions(res) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["userRoleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagInfoable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagInfoable) + } + m.SetUserRoleScopeTags(res) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. IPAddress. +func (m *AuditActor) GetIpAddress()(*string) { + return m.ipAddress +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuditActor) GetOdataType()(*string) { + return m.odataType +} +// GetRemoteTenantId gets the remoteTenantId property value. Remote Tenant Id +func (m *AuditActor) GetRemoteTenantId()(*string) { + return m.remoteTenantId +} +// GetRemoteUserId gets the remoteUserId property value. Remote User Id +func (m *AuditActor) GetRemoteUserId()(*string) { + return m.remoteUserId +} +// GetServicePrincipalName gets the servicePrincipalName property value. Service Principal Name (SPN). +func (m *AuditActor) GetServicePrincipalName()(*string) { + return m.servicePrincipalName +} +// GetType gets the type property value. Actor Type. +func (m *AuditActor) GetType()(*string) { + return m.type_escaped +} +// GetUserId gets the userId property value. User Id. +func (m *AuditActor) GetUserId()(*string) { + return m.userId +} +// GetUserPermissions gets the userPermissions property value. List of user permissions when the audit was performed. +func (m *AuditActor) GetUserPermissions()([]string) { + return m.userPermissions +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name (UPN). +func (m *AuditActor) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUserRoleScopeTags gets the userRoleScopeTags property value. List of user scope tags when the audit was performed. +func (m *AuditActor) GetUserRoleScopeTags()([]RoleScopeTagInfoable) { + return m.userRoleScopeTags +} +// Serialize serializes information the current object +func (m *AuditActor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationDisplayName", m.GetApplicationDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("applicationId", m.GetApplicationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("auditActorType", m.GetAuditActorType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remoteTenantId", m.GetRemoteTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remoteUserId", m.GetRemoteUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePrincipalName", m.GetServicePrincipalName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + if m.GetUserPermissions() != nil { + err := writer.WriteCollectionOfStringValues("userPermissions", m.GetUserPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + if m.GetUserRoleScopeTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRoleScopeTags())) + for i, v := range m.GetUserRoleScopeTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("userRoleScopeTags", 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 *AuditActor) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationDisplayName sets the applicationDisplayName property value. Name of the Application. +func (m *AuditActor) SetApplicationDisplayName(value *string)() { + m.applicationDisplayName = value +} +// SetApplicationId sets the applicationId property value. AAD Application Id. +func (m *AuditActor) SetApplicationId(value *string)() { + m.applicationId = value +} +// SetAuditActorType sets the auditActorType property value. Actor Type. +func (m *AuditActor) SetAuditActorType(value *string)() { + m.auditActorType = value +} +// SetIpAddress sets the ipAddress property value. IPAddress. +func (m *AuditActor) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuditActor) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemoteTenantId sets the remoteTenantId property value. Remote Tenant Id +func (m *AuditActor) SetRemoteTenantId(value *string)() { + m.remoteTenantId = value +} +// SetRemoteUserId sets the remoteUserId property value. Remote User Id +func (m *AuditActor) SetRemoteUserId(value *string)() { + m.remoteUserId = value +} +// SetServicePrincipalName sets the servicePrincipalName property value. Service Principal Name (SPN). +func (m *AuditActor) SetServicePrincipalName(value *string)() { + m.servicePrincipalName = value +} +// SetType sets the type property value. Actor Type. +func (m *AuditActor) SetType(value *string)() { + m.type_escaped = value +} +// SetUserId sets the userId property value. User Id. +func (m *AuditActor) SetUserId(value *string)() { + m.userId = value +} +// SetUserPermissions sets the userPermissions property value. List of user permissions when the audit was performed. +func (m *AuditActor) SetUserPermissions(value []string)() { + m.userPermissions = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name (UPN). +func (m *AuditActor) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUserRoleScopeTags sets the userRoleScopeTags property value. List of user scope tags when the audit was performed. +func (m *AuditActor) SetUserRoleScopeTags(value []RoleScopeTagInfoable)() { + m.userRoleScopeTags = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_actorable.go b/src/internal/connector/graph/betasdk/models/audit_actorable.go new file mode 100644 index 000000000..5c884e958 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_actorable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditActorable +type AuditActorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationDisplayName()(*string) + GetApplicationId()(*string) + GetAuditActorType()(*string) + GetIpAddress()(*string) + GetOdataType()(*string) + GetRemoteTenantId()(*string) + GetRemoteUserId()(*string) + GetServicePrincipalName()(*string) + GetType()(*string) + GetUserId()(*string) + GetUserPermissions()([]string) + GetUserPrincipalName()(*string) + GetUserRoleScopeTags()([]RoleScopeTagInfoable) + SetApplicationDisplayName(value *string)() + SetApplicationId(value *string)() + SetAuditActorType(value *string)() + SetIpAddress(value *string)() + SetOdataType(value *string)() + SetRemoteTenantId(value *string)() + SetRemoteUserId(value *string)() + SetServicePrincipalName(value *string)() + SetType(value *string)() + SetUserId(value *string)() + SetUserPermissions(value []string)() + SetUserPrincipalName(value *string)() + SetUserRoleScopeTags(value []RoleScopeTagInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_event.go b/src/internal/connector/graph/betasdk/models/audit_event.go new file mode 100644 index 000000000..19a967187 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_event.go @@ -0,0 +1,330 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditEvent a class containing the properties for Audit Event. +type AuditEvent struct { + Entity + // Friendly name of the activity. + activity *string + // The date time in UTC when the activity was performed. + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The HTTP operation type of the activity. + activityOperationType *string + // The result of the activity. + activityResult *string + // The type of activity that was being performed. + activityType *string + // AAD user and application that are associated with the audit event. + actor AuditActorable + // Audit category. + category *string + // Component name. + componentName *string + // The client request Id that is used to correlate activity within the system. + correlationId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Event display name. + displayName *string + // Resources being modified. + resources []AuditResourceable +} +// NewAuditEvent instantiates a new auditEvent and sets the default values. +func NewAuditEvent()(*AuditEvent) { + m := &AuditEvent{ + Entity: *NewEntity(), + } + return m +} +// CreateAuditEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditEvent(), nil +} +// GetActivity gets the activity property value. Friendly name of the activity. +func (m *AuditEvent) GetActivity()(*string) { + return m.activity +} +// GetActivityDateTime gets the activityDateTime property value. The date time in UTC when the activity was performed. +func (m *AuditEvent) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetActivityOperationType gets the activityOperationType property value. The HTTP operation type of the activity. +func (m *AuditEvent) GetActivityOperationType()(*string) { + return m.activityOperationType +} +// GetActivityResult gets the activityResult property value. The result of the activity. +func (m *AuditEvent) GetActivityResult()(*string) { + return m.activityResult +} +// GetActivityType gets the activityType property value. The type of activity that was being performed. +func (m *AuditEvent) GetActivityType()(*string) { + return m.activityType +} +// GetActor gets the actor property value. AAD user and application that are associated with the audit event. +func (m *AuditEvent) GetActor()(AuditActorable) { + return m.actor +} +// GetCategory gets the category property value. Audit category. +func (m *AuditEvent) GetCategory()(*string) { + return m.category +} +// GetComponentName gets the componentName property value. Component name. +func (m *AuditEvent) GetComponentName()(*string) { + return m.componentName +} +// GetCorrelationId gets the correlationId property value. The client request Id that is used to correlate activity within the system. +func (m *AuditEvent) GetCorrelationId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.correlationId +} +// GetDisplayName gets the displayName property value. Event display name. +func (m *AuditEvent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivity(val) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["activityOperationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityOperationType(val) + } + return nil + } + res["activityResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityResult(val) + } + return nil + } + res["activityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityType(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuditActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(AuditActorable)) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["componentName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComponentName(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditResourceable, len(val)) + for i, v := range val { + res[i] = v.(AuditResourceable) + } + m.SetResources(res) + } + return nil + } + return res +} +// GetResources gets the resources property value. Resources being modified. +func (m *AuditEvent) GetResources()([]AuditResourceable) { + return m.resources +} +// Serialize serializes information the current object +func (m *AuditEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityOperationType", m.GetActivityOperationType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityResult", m.GetActivityResult()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityType", m.GetActivityType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("componentName", m.GetComponentName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. Friendly name of the activity. +func (m *AuditEvent) SetActivity(value *string)() { + m.activity = value +} +// SetActivityDateTime sets the activityDateTime property value. The date time in UTC when the activity was performed. +func (m *AuditEvent) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetActivityOperationType sets the activityOperationType property value. The HTTP operation type of the activity. +func (m *AuditEvent) SetActivityOperationType(value *string)() { + m.activityOperationType = value +} +// SetActivityResult sets the activityResult property value. The result of the activity. +func (m *AuditEvent) SetActivityResult(value *string)() { + m.activityResult = value +} +// SetActivityType sets the activityType property value. The type of activity that was being performed. +func (m *AuditEvent) SetActivityType(value *string)() { + m.activityType = value +} +// SetActor sets the actor property value. AAD user and application that are associated with the audit event. +func (m *AuditEvent) SetActor(value AuditActorable)() { + m.actor = value +} +// SetCategory sets the category property value. Audit category. +func (m *AuditEvent) SetCategory(value *string)() { + m.category = value +} +// SetComponentName sets the componentName property value. Component name. +func (m *AuditEvent) SetComponentName(value *string)() { + m.componentName = value +} +// SetCorrelationId sets the correlationId property value. The client request Id that is used to correlate activity within the system. +func (m *AuditEvent) SetCorrelationId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.correlationId = value +} +// SetDisplayName sets the displayName property value. Event display name. +func (m *AuditEvent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetResources sets the resources property value. Resources being modified. +func (m *AuditEvent) SetResources(value []AuditResourceable)() { + m.resources = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_event_collection_response.go b/src/internal/connector/graph/betasdk/models/audit_event_collection_response.go new file mode 100644 index 000000000..d9272beae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditEventCollectionResponse +type AuditEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuditEventable +} +// NewAuditEventCollectionResponse instantiates a new AuditEventCollectionResponse and sets the default values. +func NewAuditEventCollectionResponse()(*AuditEventCollectionResponse) { + m := &AuditEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuditEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditEventable, len(val)) + for i, v := range val { + res[i] = v.(AuditEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuditEventCollectionResponse) GetValue()([]AuditEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuditEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuditEventCollectionResponse) SetValue(value []AuditEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/audit_event_collection_responseable.go new file mode 100644 index 000000000..335b3a55c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditEventCollectionResponseable +type AuditEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuditEventable) + SetValue(value []AuditEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_eventable.go b/src/internal/connector/graph/betasdk/models/audit_eventable.go new file mode 100644 index 000000000..37a580af4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_eventable.go @@ -0,0 +1,35 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditEventable +type AuditEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*string) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetActivityOperationType()(*string) + GetActivityResult()(*string) + GetActivityType()(*string) + GetActor()(AuditActorable) + GetCategory()(*string) + GetComponentName()(*string) + GetCorrelationId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetDisplayName()(*string) + GetResources()([]AuditResourceable) + SetActivity(value *string)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetActivityOperationType(value *string)() + SetActivityResult(value *string)() + SetActivityType(value *string)() + SetActor(value AuditActorable)() + SetCategory(value *string)() + SetComponentName(value *string)() + SetCorrelationId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetDisplayName(value *string)() + SetResources(value []AuditResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_property.go b/src/internal/connector/graph/betasdk/models/audit_property.go new file mode 100644 index 000000000..22af34e12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_property.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditProperty a class containing the properties for Audit Property. +type AuditProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name. + displayName *string + // New value. + newValue *string + // The OdataType property + odataType *string + // Old value. + oldValue *string +} +// NewAuditProperty instantiates a new auditProperty and sets the default values. +func NewAuditProperty()(*AuditProperty) { + m := &AuditProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuditPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditProperty(), 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 *AuditProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name. +func (m *AuditProperty) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["newValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewValue(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["oldValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldValue(val) + } + return nil + } + return res +} +// GetNewValue gets the newValue property value. New value. +func (m *AuditProperty) GetNewValue()(*string) { + return m.newValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuditProperty) GetOdataType()(*string) { + return m.odataType +} +// GetOldValue gets the oldValue property value. Old value. +func (m *AuditProperty) GetOldValue()(*string) { + return m.oldValue +} +// Serialize serializes information the current object +func (m *AuditProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("newValue", m.GetNewValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldValue", m.GetOldValue()) + 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 *AuditProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name. +func (m *AuditProperty) SetDisplayName(value *string)() { + m.displayName = value +} +// SetNewValue sets the newValue property value. New value. +func (m *AuditProperty) SetNewValue(value *string)() { + m.newValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuditProperty) SetOdataType(value *string)() { + m.odataType = value +} +// SetOldValue sets the oldValue property value. Old value. +func (m *AuditProperty) SetOldValue(value *string)() { + m.oldValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_property_collection_response.go b/src/internal/connector/graph/betasdk/models/audit_property_collection_response.go new file mode 100644 index 000000000..7e15633d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditPropertyCollectionResponse +type AuditPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuditPropertyable +} +// NewAuditPropertyCollectionResponse instantiates a new AuditPropertyCollectionResponse and sets the default values. +func NewAuditPropertyCollectionResponse()(*AuditPropertyCollectionResponse) { + m := &AuditPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuditPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditPropertyable, len(val)) + for i, v := range val { + res[i] = v.(AuditPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuditPropertyCollectionResponse) GetValue()([]AuditPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuditPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuditPropertyCollectionResponse) SetValue(value []AuditPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/audit_property_collection_responseable.go new file mode 100644 index 000000000..71ee01bf5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditPropertyCollectionResponseable +type AuditPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuditPropertyable) + SetValue(value []AuditPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_propertyable.go b/src/internal/connector/graph/betasdk/models/audit_propertyable.go new file mode 100644 index 000000000..d563d3a1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_propertyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditPropertyable +type AuditPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetNewValue()(*string) + GetOdataType()(*string) + GetOldValue()(*string) + SetDisplayName(value *string)() + SetNewValue(value *string)() + SetOdataType(value *string)() + SetOldValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_resource.go b/src/internal/connector/graph/betasdk/models/audit_resource.go new file mode 100644 index 000000000..b9b820d96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_resource.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditResource a class containing the properties for Audit Resource. +type AuditResource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Audit resource's type. + auditResourceType *string + // Display name. + displayName *string + // List of modified properties. + modifiedProperties []AuditPropertyable + // The OdataType property + odataType *string + // Audit resource's Id. + resourceId *string + // Audit resource's type. + type_escaped *string +} +// NewAuditResource instantiates a new auditResource and sets the default values. +func NewAuditResource()(*AuditResource) { + m := &AuditResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuditResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditResource(), 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 *AuditResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuditResourceType gets the auditResourceType property value. Audit resource's type. +func (m *AuditResource) GetAuditResourceType()(*string) { + return m.auditResourceType +} +// GetDisplayName gets the displayName property value. Display name. +func (m *AuditResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auditResourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuditResourceType(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["modifiedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditPropertyable, len(val)) + for i, v := range val { + res[i] = v.(AuditPropertyable) + } + m.SetModifiedProperties(res) + } + 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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetModifiedProperties gets the modifiedProperties property value. List of modified properties. +func (m *AuditResource) GetModifiedProperties()([]AuditPropertyable) { + return m.modifiedProperties +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuditResource) GetOdataType()(*string) { + return m.odataType +} +// GetResourceId gets the resourceId property value. Audit resource's Id. +func (m *AuditResource) GetResourceId()(*string) { + return m.resourceId +} +// GetType gets the type property value. Audit resource's type. +func (m *AuditResource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *AuditResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("auditResourceType", m.GetAuditResourceType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetModifiedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModifiedProperties())) + for i, v := range m.GetModifiedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("modifiedProperties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *AuditResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuditResourceType sets the auditResourceType property value. Audit resource's type. +func (m *AuditResource) SetAuditResourceType(value *string)() { + m.auditResourceType = value +} +// SetDisplayName sets the displayName property value. Display name. +func (m *AuditResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModifiedProperties sets the modifiedProperties property value. List of modified properties. +func (m *AuditResource) SetModifiedProperties(value []AuditPropertyable)() { + m.modifiedProperties = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuditResource) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceId sets the resourceId property value. Audit resource's Id. +func (m *AuditResource) SetResourceId(value *string)() { + m.resourceId = value +} +// SetType sets the type property value. Audit resource's type. +func (m *AuditResource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/audit_resource_collection_response.go new file mode 100644 index 000000000..1022ce548 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditResourceCollectionResponse +type AuditResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuditResourceable +} +// NewAuditResourceCollectionResponse instantiates a new AuditResourceCollectionResponse and sets the default values. +func NewAuditResourceCollectionResponse()(*AuditResourceCollectionResponse) { + m := &AuditResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuditResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditResourceable, len(val)) + for i, v := range val { + res[i] = v.(AuditResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuditResourceCollectionResponse) GetValue()([]AuditResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuditResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuditResourceCollectionResponse) SetValue(value []AuditResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/audit_resource_collection_responseable.go new file mode 100644 index 000000000..1bc967bc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditResourceCollectionResponseable +type AuditResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuditResourceable) + SetValue(value []AuditResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_resourceable.go b/src/internal/connector/graph/betasdk/models/audit_resourceable.go new file mode 100644 index 000000000..a9f965a40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_resourceable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditResourceable +type AuditResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuditResourceType()(*string) + GetDisplayName()(*string) + GetModifiedProperties()([]AuditPropertyable) + GetOdataType()(*string) + GetResourceId()(*string) + GetType()(*string) + SetAuditResourceType(value *string)() + SetDisplayName(value *string)() + SetModifiedProperties(value []AuditPropertyable)() + SetOdataType(value *string)() + SetResourceId(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/audit_user_identity.go b/src/internal/connector/graph/betasdk/models/audit_user_identity.go new file mode 100644 index 000000000..19a01332c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_user_identity.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditUserIdentity +type AuditUserIdentity struct { + UserIdentity + // For user sign ins, the identifier of the tenant that the user is a member of. + homeTenantId *string + // For user sign ins, the name of the tenant that the user is a member of. Only populated in cases where the home tenant has provided affirmative consent to Azure AD to show the tenant content. + homeTenantName *string +} +// NewAuditUserIdentity instantiates a new AuditUserIdentity and sets the default values. +func NewAuditUserIdentity()(*AuditUserIdentity) { + m := &AuditUserIdentity{ + UserIdentity: *NewUserIdentity(), + } + odataTypeValue := "#microsoft.graph.auditUserIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAuditUserIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditUserIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditUserIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditUserIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserIdentity.GetFieldDeserializers() + res["homeTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomeTenantId(val) + } + return nil + } + res["homeTenantName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomeTenantName(val) + } + return nil + } + return res +} +// GetHomeTenantId gets the homeTenantId property value. For user sign ins, the identifier of the tenant that the user is a member of. +func (m *AuditUserIdentity) GetHomeTenantId()(*string) { + return m.homeTenantId +} +// GetHomeTenantName gets the homeTenantName property value. For user sign ins, the name of the tenant that the user is a member of. Only populated in cases where the home tenant has provided affirmative consent to Azure AD to show the tenant content. +func (m *AuditUserIdentity) GetHomeTenantName()(*string) { + return m.homeTenantName +} +// Serialize serializes information the current object +func (m *AuditUserIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserIdentity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("homeTenantId", m.GetHomeTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("homeTenantName", m.GetHomeTenantName()) + if err != nil { + return err + } + } + return nil +} +// SetHomeTenantId sets the homeTenantId property value. For user sign ins, the identifier of the tenant that the user is a member of. +func (m *AuditUserIdentity) SetHomeTenantId(value *string)() { + m.homeTenantId = value +} +// SetHomeTenantName sets the homeTenantName property value. For user sign ins, the name of the tenant that the user is a member of. Only populated in cases where the home tenant has provided affirmative consent to Azure AD to show the tenant content. +func (m *AuditUserIdentity) SetHomeTenantName(value *string)() { + m.homeTenantName = value +} diff --git a/src/internal/connector/graph/betasdk/models/audit_user_identityable.go b/src/internal/connector/graph/betasdk/models/audit_user_identityable.go new file mode 100644 index 000000000..625dcacde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/audit_user_identityable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuditUserIdentityable +type AuditUserIdentityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserIdentityable + GetHomeTenantId()(*string) + GetHomeTenantName()(*string) + SetHomeTenantId(value *string)() + SetHomeTenantName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication.go b/src/internal/connector/graph/betasdk/models/authentication.go new file mode 100644 index 000000000..eccacdb58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication.go @@ -0,0 +1,408 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Authentication +type Authentication struct { + Entity + // Represents the email addresses registered to a user for authentication. + emailMethods []EmailAuthenticationMethodable + // Represents the FIDO2 security keys registered to a user for authentication. + fido2Methods []Fido2AuthenticationMethodable + // Represents all authentication methods registered to a user. + methods []AuthenticationMethodable + // The details of the Microsoft Authenticator app registered to a user for authentication. + microsoftAuthenticatorMethods []MicrosoftAuthenticatorAuthenticationMethodable + // The operations property + operations []LongRunningOperationable + // Represents the Microsoft Authenticator Passwordless Phone Sign-in methods registered to a user for authentication. + passwordlessMicrosoftAuthenticatorMethods []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable + // Represents the details of the password authentication method registered to a user for authentication. + passwordMethods []PasswordAuthenticationMethodable + // Represents the phone registered to a user for authentication. + phoneMethods []PhoneAuthenticationMethodable + // The softwareOathMethods property + softwareOathMethods []SoftwareOathAuthenticationMethodable + // Represents a Temporary Access Pass registered to a user for authentication through time-limited passcodes. + temporaryAccessPassMethods []TemporaryAccessPassAuthenticationMethodable + // Represents the Windows Hello for Business authentication method registered to a user for authentication. + windowsHelloForBusinessMethods []WindowsHelloForBusinessAuthenticationMethodable +} +// NewAuthentication instantiates a new authentication and sets the default values. +func NewAuthentication()(*Authentication) { + m := &Authentication{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthentication(), nil +} +// GetEmailMethods gets the emailMethods property value. Represents the email addresses registered to a user for authentication. +func (m *Authentication) GetEmailMethods()([]EmailAuthenticationMethodable) { + return m.emailMethods +} +// GetFido2Methods gets the fido2Methods property value. Represents the FIDO2 security keys registered to a user for authentication. +func (m *Authentication) GetFido2Methods()([]Fido2AuthenticationMethodable) { + return m.fido2Methods +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Authentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["emailMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(EmailAuthenticationMethodable) + } + m.SetEmailMethods(res) + } + return nil + } + res["fido2Methods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFido2AuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Fido2AuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(Fido2AuthenticationMethodable) + } + m.SetFido2Methods(res) + } + return nil + } + res["methods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodable) + } + m.SetMethods(res) + } + return nil + } + res["microsoftAuthenticatorMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAuthenticatorAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAuthenticatorAuthenticationMethodable) + } + m.SetMicrosoftAuthenticatorMethods(res) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLongRunningOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LongRunningOperationable, len(val)) + for i, v := range val { + res[i] = v.(LongRunningOperationable) + } + m.SetOperations(res) + } + return nil + } + res["passwordlessMicrosoftAuthenticatorMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) + } + m.SetPasswordlessMicrosoftAuthenticatorMethods(res) + } + return nil + } + res["passwordMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PasswordAuthenticationMethodable) + } + m.SetPasswordMethods(res) + } + return nil + } + res["phoneMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhoneAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PhoneAuthenticationMethodable) + } + m.SetPhoneMethods(res) + } + return nil + } + res["softwareOathMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSoftwareOathAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SoftwareOathAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(SoftwareOathAuthenticationMethodable) + } + m.SetSoftwareOathMethods(res) + } + return nil + } + res["temporaryAccessPassMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTemporaryAccessPassAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TemporaryAccessPassAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(TemporaryAccessPassAuthenticationMethodable) + } + m.SetTemporaryAccessPassMethods(res) + } + return nil + } + res["windowsHelloForBusinessMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsHelloForBusinessAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsHelloForBusinessAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(WindowsHelloForBusinessAuthenticationMethodable) + } + m.SetWindowsHelloForBusinessMethods(res) + } + return nil + } + return res +} +// GetMethods gets the methods property value. Represents all authentication methods registered to a user. +func (m *Authentication) GetMethods()([]AuthenticationMethodable) { + return m.methods +} +// GetMicrosoftAuthenticatorMethods gets the microsoftAuthenticatorMethods property value. The details of the Microsoft Authenticator app registered to a user for authentication. +func (m *Authentication) GetMicrosoftAuthenticatorMethods()([]MicrosoftAuthenticatorAuthenticationMethodable) { + return m.microsoftAuthenticatorMethods +} +// GetOperations gets the operations property value. The operations property +func (m *Authentication) GetOperations()([]LongRunningOperationable) { + return m.operations +} +// GetPasswordlessMicrosoftAuthenticatorMethods gets the passwordlessMicrosoftAuthenticatorMethods property value. Represents the Microsoft Authenticator Passwordless Phone Sign-in methods registered to a user for authentication. +func (m *Authentication) GetPasswordlessMicrosoftAuthenticatorMethods()([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) { + return m.passwordlessMicrosoftAuthenticatorMethods +} +// GetPasswordMethods gets the passwordMethods property value. Represents the details of the password authentication method registered to a user for authentication. +func (m *Authentication) GetPasswordMethods()([]PasswordAuthenticationMethodable) { + return m.passwordMethods +} +// GetPhoneMethods gets the phoneMethods property value. Represents the phone registered to a user for authentication. +func (m *Authentication) GetPhoneMethods()([]PhoneAuthenticationMethodable) { + return m.phoneMethods +} +// GetSoftwareOathMethods gets the softwareOathMethods property value. The softwareOathMethods property +func (m *Authentication) GetSoftwareOathMethods()([]SoftwareOathAuthenticationMethodable) { + return m.softwareOathMethods +} +// GetTemporaryAccessPassMethods gets the temporaryAccessPassMethods property value. Represents a Temporary Access Pass registered to a user for authentication through time-limited passcodes. +func (m *Authentication) GetTemporaryAccessPassMethods()([]TemporaryAccessPassAuthenticationMethodable) { + return m.temporaryAccessPassMethods +} +// GetWindowsHelloForBusinessMethods gets the windowsHelloForBusinessMethods property value. Represents the Windows Hello for Business authentication method registered to a user for authentication. +func (m *Authentication) GetWindowsHelloForBusinessMethods()([]WindowsHelloForBusinessAuthenticationMethodable) { + return m.windowsHelloForBusinessMethods +} +// Serialize serializes information the current object +func (m *Authentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetEmailMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailMethods())) + for i, v := range m.GetEmailMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailMethods", cast) + if err != nil { + return err + } + } + if m.GetFido2Methods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFido2Methods())) + for i, v := range m.GetFido2Methods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fido2Methods", cast) + if err != nil { + return err + } + } + if m.GetMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMethods())) + for i, v := range m.GetMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("methods", cast) + if err != nil { + return err + } + } + if m.GetMicrosoftAuthenticatorMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftAuthenticatorMethods())) + for i, v := range m.GetMicrosoftAuthenticatorMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftAuthenticatorMethods", cast) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetPasswordlessMicrosoftAuthenticatorMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPasswordlessMicrosoftAuthenticatorMethods())) + for i, v := range m.GetPasswordlessMicrosoftAuthenticatorMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("passwordlessMicrosoftAuthenticatorMethods", cast) + if err != nil { + return err + } + } + if m.GetPasswordMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPasswordMethods())) + for i, v := range m.GetPasswordMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("passwordMethods", cast) + if err != nil { + return err + } + } + if m.GetPhoneMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhoneMethods())) + for i, v := range m.GetPhoneMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phoneMethods", cast) + if err != nil { + return err + } + } + if m.GetSoftwareOathMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSoftwareOathMethods())) + for i, v := range m.GetSoftwareOathMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("softwareOathMethods", cast) + if err != nil { + return err + } + } + if m.GetTemporaryAccessPassMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTemporaryAccessPassMethods())) + for i, v := range m.GetTemporaryAccessPassMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("temporaryAccessPassMethods", cast) + if err != nil { + return err + } + } + if m.GetWindowsHelloForBusinessMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsHelloForBusinessMethods())) + for i, v := range m.GetWindowsHelloForBusinessMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsHelloForBusinessMethods", cast) + if err != nil { + return err + } + } + return nil +} +// SetEmailMethods sets the emailMethods property value. Represents the email addresses registered to a user for authentication. +func (m *Authentication) SetEmailMethods(value []EmailAuthenticationMethodable)() { + m.emailMethods = value +} +// SetFido2Methods sets the fido2Methods property value. Represents the FIDO2 security keys registered to a user for authentication. +func (m *Authentication) SetFido2Methods(value []Fido2AuthenticationMethodable)() { + m.fido2Methods = value +} +// SetMethods sets the methods property value. Represents all authentication methods registered to a user. +func (m *Authentication) SetMethods(value []AuthenticationMethodable)() { + m.methods = value +} +// SetMicrosoftAuthenticatorMethods sets the microsoftAuthenticatorMethods property value. The details of the Microsoft Authenticator app registered to a user for authentication. +func (m *Authentication) SetMicrosoftAuthenticatorMethods(value []MicrosoftAuthenticatorAuthenticationMethodable)() { + m.microsoftAuthenticatorMethods = value +} +// SetOperations sets the operations property value. The operations property +func (m *Authentication) SetOperations(value []LongRunningOperationable)() { + m.operations = value +} +// SetPasswordlessMicrosoftAuthenticatorMethods sets the passwordlessMicrosoftAuthenticatorMethods property value. Represents the Microsoft Authenticator Passwordless Phone Sign-in methods registered to a user for authentication. +func (m *Authentication) SetPasswordlessMicrosoftAuthenticatorMethods(value []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable)() { + m.passwordlessMicrosoftAuthenticatorMethods = value +} +// SetPasswordMethods sets the passwordMethods property value. Represents the details of the password authentication method registered to a user for authentication. +func (m *Authentication) SetPasswordMethods(value []PasswordAuthenticationMethodable)() { + m.passwordMethods = value +} +// SetPhoneMethods sets the phoneMethods property value. Represents the phone registered to a user for authentication. +func (m *Authentication) SetPhoneMethods(value []PhoneAuthenticationMethodable)() { + m.phoneMethods = value +} +// SetSoftwareOathMethods sets the softwareOathMethods property value. The softwareOathMethods property +func (m *Authentication) SetSoftwareOathMethods(value []SoftwareOathAuthenticationMethodable)() { + m.softwareOathMethods = value +} +// SetTemporaryAccessPassMethods sets the temporaryAccessPassMethods property value. Represents a Temporary Access Pass registered to a user for authentication through time-limited passcodes. +func (m *Authentication) SetTemporaryAccessPassMethods(value []TemporaryAccessPassAuthenticationMethodable)() { + m.temporaryAccessPassMethods = value +} +// SetWindowsHelloForBusinessMethods sets the windowsHelloForBusinessMethods property value. Represents the Windows Hello for Business authentication method registered to a user for authentication. +func (m *Authentication) SetWindowsHelloForBusinessMethods(value []WindowsHelloForBusinessAuthenticationMethodable)() { + m.windowsHelloForBusinessMethods = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_admin_configuration.go b/src/internal/connector/graph/betasdk/models/authentication_app_admin_configuration.go new file mode 100644 index 000000000..9ca01c16f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_admin_configuration.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationAppAdminConfiguration int + +const ( + NOTAPPLICABLE_AUTHENTICATIONAPPADMINCONFIGURATION AuthenticationAppAdminConfiguration = iota + ENABLED_AUTHENTICATIONAPPADMINCONFIGURATION + DISABLED_AUTHENTICATIONAPPADMINCONFIGURATION + UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPADMINCONFIGURATION +) + +func (i AuthenticationAppAdminConfiguration) String() string { + return []string{"notApplicable", "enabled", "disabled", "unknownFutureValue"}[i] +} +func ParseAuthenticationAppAdminConfiguration(v string) (interface{}, error) { + result := NOTAPPLICABLE_AUTHENTICATIONAPPADMINCONFIGURATION + switch v { + case "notApplicable": + result = NOTAPPLICABLE_AUTHENTICATIONAPPADMINCONFIGURATION + case "enabled": + result = ENABLED_AUTHENTICATIONAPPADMINCONFIGURATION + case "disabled": + result = DISABLED_AUTHENTICATIONAPPADMINCONFIGURATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPADMINCONFIGURATION + default: + return 0, errors.New("Unknown AuthenticationAppAdminConfiguration value: " + v) + } + return &result, nil +} +func SerializeAuthenticationAppAdminConfiguration(values []AuthenticationAppAdminConfiguration) []string { + 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/authentication_app_device_details.go b/src/internal/connector/graph/betasdk/models/authentication_app_device_details.go new file mode 100644 index 000000000..19886e892 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_device_details.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppDeviceDetails +type AuthenticationAppDeviceDetails 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 version of the client authentication app used during the authentication step. + appVersion *string + // The name of the client authentication app used during the authentication step. + clientApp *string + // ID of the device used during the authentication step. + deviceId *string + // The OdataType property + odataType *string + // The operating system running on the device used for the authentication step. + operatingSystem *string +} +// NewAuthenticationAppDeviceDetails instantiates a new authenticationAppDeviceDetails and sets the default values. +func NewAuthenticationAppDeviceDetails()(*AuthenticationAppDeviceDetails) { + m := &AuthenticationAppDeviceDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationAppDeviceDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationAppDeviceDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationAppDeviceDetails(), 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 *AuthenticationAppDeviceDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppVersion gets the appVersion property value. The version of the client authentication app used during the authentication step. +func (m *AuthenticationAppDeviceDetails) GetAppVersion()(*string) { + return m.appVersion +} +// GetClientApp gets the clientApp property value. The name of the client authentication app used during the authentication step. +func (m *AuthenticationAppDeviceDetails) GetClientApp()(*string) { + return m.clientApp +} +// GetDeviceId gets the deviceId property value. ID of the device used during the authentication step. +func (m *AuthenticationAppDeviceDetails) GetDeviceId()(*string) { + return m.deviceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationAppDeviceDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppVersion(val) + } + return nil + } + res["clientApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientApp(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(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["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationAppDeviceDetails) GetOdataType()(*string) { + return m.odataType +} +// GetOperatingSystem gets the operatingSystem property value. The operating system running on the device used for the authentication step. +func (m *AuthenticationAppDeviceDetails) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// Serialize serializes information the current object +func (m *AuthenticationAppDeviceDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appVersion", m.GetAppVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clientApp", m.GetClientApp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + 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 *AuthenticationAppDeviceDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppVersion sets the appVersion property value. The version of the client authentication app used during the authentication step. +func (m *AuthenticationAppDeviceDetails) SetAppVersion(value *string)() { + m.appVersion = value +} +// SetClientApp sets the clientApp property value. The name of the client authentication app used during the authentication step. +func (m *AuthenticationAppDeviceDetails) SetClientApp(value *string)() { + m.clientApp = value +} +// SetDeviceId sets the deviceId property value. ID of the device used during the authentication step. +func (m *AuthenticationAppDeviceDetails) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationAppDeviceDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperatingSystem sets the operatingSystem property value. The operating system running on the device used for the authentication step. +func (m *AuthenticationAppDeviceDetails) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_device_detailsable.go b/src/internal/connector/graph/betasdk/models/authentication_app_device_detailsable.go new file mode 100644 index 000000000..ea94a70b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_device_detailsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppDeviceDetailsable +type AuthenticationAppDeviceDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppVersion()(*string) + GetClientApp()(*string) + GetDeviceId()(*string) + GetOdataType()(*string) + GetOperatingSystem()(*string) + SetAppVersion(value *string)() + SetClientApp(value *string)() + SetDeviceId(value *string)() + SetOdataType(value *string)() + SetOperatingSystem(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_evaluation.go b/src/internal/connector/graph/betasdk/models/authentication_app_evaluation.go new file mode 100644 index 000000000..6287672e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_evaluation.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationAppEvaluation int + +const ( + SUCCESS_AUTHENTICATIONAPPEVALUATION AuthenticationAppEvaluation = iota + FAILURE_AUTHENTICATIONAPPEVALUATION + UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPEVALUATION +) + +func (i AuthenticationAppEvaluation) String() string { + return []string{"success", "failure", "unknownFutureValue"}[i] +} +func ParseAuthenticationAppEvaluation(v string) (interface{}, error) { + result := SUCCESS_AUTHENTICATIONAPPEVALUATION + switch v { + case "success": + result = SUCCESS_AUTHENTICATIONAPPEVALUATION + case "failure": + result = FAILURE_AUTHENTICATIONAPPEVALUATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPEVALUATION + default: + return 0, errors.New("Unknown AuthenticationAppEvaluation value: " + v) + } + return &result, nil +} +func SerializeAuthenticationAppEvaluation(values []AuthenticationAppEvaluation) []string { + 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/authentication_app_policy_details.go b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details.go new file mode 100644 index 000000000..4274a2e6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details.go @@ -0,0 +1,178 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppPolicyDetails +type AuthenticationAppPolicyDetails 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 admin configuration of the policy on the user's authentication app. For a policy that does not impact the success/failure of the authentication, the evaluation defaults to notApplicable. The possible values are: notApplicable, enabled, disabled, unknownFutureValue. + adminConfiguration *AuthenticationAppAdminConfiguration + // Evaluates the success/failure of the authentication based on the admin configuration of the policy on the user's client authentication app. The possible values are: success, failure, unknownFutureValue. + authenticationEvaluation *AuthenticationAppEvaluation + // The OdataType property + odataType *string + // The name of the policy enforced on the user's authentication app. + policyName *string + // Refers to whether the policy executed as expected on the user's client authentication app. The possible values are: unknown, appLockOutOfDate, appLockEnabled, appLockDisabled, appContextOutOfDate, appContextShown, appContextNotShown, locationContextOutOfDate, locationContextShown, locationContextNotShown, numberMatchOutOfDate, numberMatchCorrectNumberEntered, numberMatchIncorrectNumberEntered, numberMatchDeny, tamperResistantHardwareOutOfDate, tamperResistantHardwareUsed, tamperResistantHardwareNotUsed, unknownFutureValue. + status *AuthenticationAppPolicyStatus +} +// NewAuthenticationAppPolicyDetails instantiates a new authenticationAppPolicyDetails and sets the default values. +func NewAuthenticationAppPolicyDetails()(*AuthenticationAppPolicyDetails) { + m := &AuthenticationAppPolicyDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationAppPolicyDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationAppPolicyDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationAppPolicyDetails(), 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 *AuthenticationAppPolicyDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdminConfiguration gets the adminConfiguration property value. The admin configuration of the policy on the user's authentication app. For a policy that does not impact the success/failure of the authentication, the evaluation defaults to notApplicable. The possible values are: notApplicable, enabled, disabled, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) GetAdminConfiguration()(*AuthenticationAppAdminConfiguration) { + return m.adminConfiguration +} +// GetAuthenticationEvaluation gets the authenticationEvaluation property value. Evaluates the success/failure of the authentication based on the admin configuration of the policy on the user's client authentication app. The possible values are: success, failure, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) GetAuthenticationEvaluation()(*AuthenticationAppEvaluation) { + return m.authenticationEvaluation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationAppPolicyDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["adminConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationAppAdminConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetAdminConfiguration(val.(*AuthenticationAppAdminConfiguration)) + } + return nil + } + res["authenticationEvaluation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationAppEvaluation) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationEvaluation(val.(*AuthenticationAppEvaluation)) + } + 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["policyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationAppPolicyStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AuthenticationAppPolicyStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationAppPolicyDetails) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyName gets the policyName property value. The name of the policy enforced on the user's authentication app. +func (m *AuthenticationAppPolicyDetails) GetPolicyName()(*string) { + return m.policyName +} +// GetStatus gets the status property value. Refers to whether the policy executed as expected on the user's client authentication app. The possible values are: unknown, appLockOutOfDate, appLockEnabled, appLockDisabled, appContextOutOfDate, appContextShown, appContextNotShown, locationContextOutOfDate, locationContextShown, locationContextNotShown, numberMatchOutOfDate, numberMatchCorrectNumberEntered, numberMatchIncorrectNumberEntered, numberMatchDeny, tamperResistantHardwareOutOfDate, tamperResistantHardwareUsed, tamperResistantHardwareNotUsed, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) GetStatus()(*AuthenticationAppPolicyStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *AuthenticationAppPolicyDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAdminConfiguration() != nil { + cast := (*m.GetAdminConfiguration()).String() + err := writer.WriteStringValue("adminConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetAuthenticationEvaluation() != nil { + cast := (*m.GetAuthenticationEvaluation()).String() + err := writer.WriteStringValue("authenticationEvaluation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyName", m.GetPolicyName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *AuthenticationAppPolicyDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdminConfiguration sets the adminConfiguration property value. The admin configuration of the policy on the user's authentication app. For a policy that does not impact the success/failure of the authentication, the evaluation defaults to notApplicable. The possible values are: notApplicable, enabled, disabled, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) SetAdminConfiguration(value *AuthenticationAppAdminConfiguration)() { + m.adminConfiguration = value +} +// SetAuthenticationEvaluation sets the authenticationEvaluation property value. Evaluates the success/failure of the authentication based on the admin configuration of the policy on the user's client authentication app. The possible values are: success, failure, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) SetAuthenticationEvaluation(value *AuthenticationAppEvaluation)() { + m.authenticationEvaluation = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationAppPolicyDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyName sets the policyName property value. The name of the policy enforced on the user's authentication app. +func (m *AuthenticationAppPolicyDetails) SetPolicyName(value *string)() { + m.policyName = value +} +// SetStatus sets the status property value. Refers to whether the policy executed as expected on the user's client authentication app. The possible values are: unknown, appLockOutOfDate, appLockEnabled, appLockDisabled, appContextOutOfDate, appContextShown, appContextNotShown, locationContextOutOfDate, locationContextShown, locationContextNotShown, numberMatchOutOfDate, numberMatchCorrectNumberEntered, numberMatchIncorrectNumberEntered, numberMatchDeny, tamperResistantHardwareOutOfDate, tamperResistantHardwareUsed, tamperResistantHardwareNotUsed, unknownFutureValue. +func (m *AuthenticationAppPolicyDetails) SetStatus(value *AuthenticationAppPolicyStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_response.go new file mode 100644 index 000000000..16cb0100e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppPolicyDetailsCollectionResponse +type AuthenticationAppPolicyDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationAppPolicyDetailsable +} +// NewAuthenticationAppPolicyDetailsCollectionResponse instantiates a new AuthenticationAppPolicyDetailsCollectionResponse and sets the default values. +func NewAuthenticationAppPolicyDetailsCollectionResponse()(*AuthenticationAppPolicyDetailsCollectionResponse) { + m := &AuthenticationAppPolicyDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationAppPolicyDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationAppPolicyDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationAppPolicyDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationAppPolicyDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationAppPolicyDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationAppPolicyDetailsable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationAppPolicyDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationAppPolicyDetailsCollectionResponse) GetValue()([]AuthenticationAppPolicyDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationAppPolicyDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationAppPolicyDetailsCollectionResponse) SetValue(value []AuthenticationAppPolicyDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_responseable.go new file mode 100644 index 000000000..444074302 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_policy_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppPolicyDetailsCollectionResponseable +type AuthenticationAppPolicyDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationAppPolicyDetailsable) + SetValue(value []AuthenticationAppPolicyDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_policy_detailsable.go b/src/internal/connector/graph/betasdk/models/authentication_app_policy_detailsable.go new file mode 100644 index 000000000..c8737fdc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_policy_detailsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationAppPolicyDetailsable +type AuthenticationAppPolicyDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminConfiguration()(*AuthenticationAppAdminConfiguration) + GetAuthenticationEvaluation()(*AuthenticationAppEvaluation) + GetOdataType()(*string) + GetPolicyName()(*string) + GetStatus()(*AuthenticationAppPolicyStatus) + SetAdminConfiguration(value *AuthenticationAppAdminConfiguration)() + SetAuthenticationEvaluation(value *AuthenticationAppEvaluation)() + SetOdataType(value *string)() + SetPolicyName(value *string)() + SetStatus(value *AuthenticationAppPolicyStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_app_policy_status.go b/src/internal/connector/graph/betasdk/models/authentication_app_policy_status.go new file mode 100644 index 000000000..c85deca3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_app_policy_status.go @@ -0,0 +1,82 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationAppPolicyStatus int + +const ( + UNKNOWN_AUTHENTICATIONAPPPOLICYSTATUS AuthenticationAppPolicyStatus = iota + APPLOCKOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + APPLOCKENABLED_AUTHENTICATIONAPPPOLICYSTATUS + APPLOCKDISABLED_AUTHENTICATIONAPPPOLICYSTATUS + APPCONTEXTOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + APPCONTEXTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + APPCONTEXTNOTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + LOCATIONCONTEXTOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + LOCATIONCONTEXTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + LOCATIONCONTEXTNOTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + NUMBERMATCHOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + NUMBERMATCHCORRECTNUMBERENTERED_AUTHENTICATIONAPPPOLICYSTATUS + NUMBERMATCHINCORRECTNUMBERENTERED_AUTHENTICATIONAPPPOLICYSTATUS + NUMBERMATCHDENY_AUTHENTICATIONAPPPOLICYSTATUS + TAMPERRESISTANTHARDWAREOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + TAMPERRESISTANTHARDWAREUSED_AUTHENTICATIONAPPPOLICYSTATUS + TAMPERRESISTANTHARDWARENOTUSED_AUTHENTICATIONAPPPOLICYSTATUS + UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPPOLICYSTATUS +) + +func (i AuthenticationAppPolicyStatus) String() string { + return []string{"unknown", "appLockOutOfDate", "appLockEnabled", "appLockDisabled", "appContextOutOfDate", "appContextShown", "appContextNotShown", "locationContextOutOfDate", "locationContextShown", "locationContextNotShown", "numberMatchOutOfDate", "numberMatchCorrectNumberEntered", "numberMatchIncorrectNumberEntered", "numberMatchDeny", "tamperResistantHardwareOutOfDate", "tamperResistantHardwareUsed", "tamperResistantHardwareNotUsed", "unknownFutureValue"}[i] +} +func ParseAuthenticationAppPolicyStatus(v string) (interface{}, error) { + result := UNKNOWN_AUTHENTICATIONAPPPOLICYSTATUS + switch v { + case "unknown": + result = UNKNOWN_AUTHENTICATIONAPPPOLICYSTATUS + case "appLockOutOfDate": + result = APPLOCKOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + case "appLockEnabled": + result = APPLOCKENABLED_AUTHENTICATIONAPPPOLICYSTATUS + case "appLockDisabled": + result = APPLOCKDISABLED_AUTHENTICATIONAPPPOLICYSTATUS + case "appContextOutOfDate": + result = APPCONTEXTOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + case "appContextShown": + result = APPCONTEXTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + case "appContextNotShown": + result = APPCONTEXTNOTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + case "locationContextOutOfDate": + result = LOCATIONCONTEXTOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + case "locationContextShown": + result = LOCATIONCONTEXTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + case "locationContextNotShown": + result = LOCATIONCONTEXTNOTSHOWN_AUTHENTICATIONAPPPOLICYSTATUS + case "numberMatchOutOfDate": + result = NUMBERMATCHOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + case "numberMatchCorrectNumberEntered": + result = NUMBERMATCHCORRECTNUMBERENTERED_AUTHENTICATIONAPPPOLICYSTATUS + case "numberMatchIncorrectNumberEntered": + result = NUMBERMATCHINCORRECTNUMBERENTERED_AUTHENTICATIONAPPPOLICYSTATUS + case "numberMatchDeny": + result = NUMBERMATCHDENY_AUTHENTICATIONAPPPOLICYSTATUS + case "tamperResistantHardwareOutOfDate": + result = TAMPERRESISTANTHARDWAREOUTOFDATE_AUTHENTICATIONAPPPOLICYSTATUS + case "tamperResistantHardwareUsed": + result = TAMPERRESISTANTHARDWAREUSED_AUTHENTICATIONAPPPOLICYSTATUS + case "tamperResistantHardwareNotUsed": + result = TAMPERRESISTANTHARDWARENOTUSED_AUTHENTICATIONAPPPOLICYSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONAPPPOLICYSTATUS + default: + return 0, errors.New("Unknown AuthenticationAppPolicyStatus value: " + v) + } + return &result, nil +} +func SerializeAuthenticationAppPolicyStatus(values []AuthenticationAppPolicyStatus) []string { + 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/authentication_combination_configuration.go b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration.go new file mode 100644 index 000000000..b478bbcd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationCombinationConfiguration +type AuthenticationCombinationConfiguration struct { + Entity + // Which authentication method combinations this configuration applies to. Must be an allowedCombinations object that's defined for the authenticationStrengthPolicy. The only possible value for fido2combinationConfigurations is 'fido2'. + appliesToCombinations []AuthenticationMethodModes +} +// NewAuthenticationCombinationConfiguration instantiates a new AuthenticationCombinationConfiguration and sets the default values. +func NewAuthenticationCombinationConfiguration()(*AuthenticationCombinationConfiguration) { + m := &AuthenticationCombinationConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationCombinationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationCombinationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.fido2CombinationConfiguration": + return NewFido2CombinationConfiguration(), nil + } + } + } + } + return NewAuthenticationCombinationConfiguration(), nil +} +// GetAppliesToCombinations gets the appliesToCombinations property value. Which authentication method combinations this configuration applies to. Must be an allowedCombinations object that's defined for the authenticationStrengthPolicy. The only possible value for fido2combinationConfigurations is 'fido2'. +func (m *AuthenticationCombinationConfiguration) GetAppliesToCombinations()([]AuthenticationMethodModes) { + return m.appliesToCombinations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationCombinationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appliesToCombinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAuthenticationMethodModes) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodModes, len(val)) + for i, v := range val { + res[i] = *(v.(*AuthenticationMethodModes)) + } + m.SetAppliesToCombinations(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AuthenticationCombinationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAppliesToCombinations() != nil { + err = writer.WriteCollectionOfStringValues("appliesToCombinations", SerializeAuthenticationMethodModes(m.GetAppliesToCombinations())) + if err != nil { + return err + } + } + return nil +} +// SetAppliesToCombinations sets the appliesToCombinations property value. Which authentication method combinations this configuration applies to. Must be an allowedCombinations object that's defined for the authenticationStrengthPolicy. The only possible value for fido2combinationConfigurations is 'fido2'. +func (m *AuthenticationCombinationConfiguration) SetAppliesToCombinations(value []AuthenticationMethodModes)() { + m.appliesToCombinations = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_response.go new file mode 100644 index 000000000..05d84a58d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationCombinationConfigurationCollectionResponse +type AuthenticationCombinationConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationCombinationConfigurationable +} +// NewAuthenticationCombinationConfigurationCollectionResponse instantiates a new AuthenticationCombinationConfigurationCollectionResponse and sets the default values. +func NewAuthenticationCombinationConfigurationCollectionResponse()(*AuthenticationCombinationConfigurationCollectionResponse) { + m := &AuthenticationCombinationConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationCombinationConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationCombinationConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationCombinationConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationCombinationConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationCombinationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationCombinationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationCombinationConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationCombinationConfigurationCollectionResponse) GetValue()([]AuthenticationCombinationConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationCombinationConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationCombinationConfigurationCollectionResponse) SetValue(value []AuthenticationCombinationConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_responseable.go new file mode 100644 index 000000000..31b4f12ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_combination_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationCombinationConfigurationCollectionResponseable +type AuthenticationCombinationConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationCombinationConfigurationable) + SetValue(value []AuthenticationCombinationConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_combination_configurationable.go b/src/internal/connector/graph/betasdk/models/authentication_combination_configurationable.go new file mode 100644 index 000000000..12a79ab1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_combination_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationCombinationConfigurationable +type AuthenticationCombinationConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesToCombinations()([]AuthenticationMethodModes) + SetAppliesToCombinations(value []AuthenticationMethodModes)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_condition_application.go b/src/internal/connector/graph/betasdk/models/authentication_condition_application.go new file mode 100644 index 000000000..04e5256b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_condition_application.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionApplication +type AuthenticationConditionApplication 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 appId property + appId *string + // The OdataType property + odataType *string +} +// NewAuthenticationConditionApplication instantiates a new authenticationConditionApplication and sets the default values. +func NewAuthenticationConditionApplication()(*AuthenticationConditionApplication) { + m := &AuthenticationConditionApplication{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationConditionApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationConditionApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditionApplication(), 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 *AuthenticationConditionApplication) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The appId property +func (m *AuthenticationConditionApplication) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationConditionApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionApplication) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationConditionApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationConditionApplication) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The appId property +func (m *AuthenticationConditionApplication) SetAppId(value *string)() { + m.appId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionApplication) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_response.go new file mode 100644 index 000000000..b9f14f512 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionApplicationCollectionResponse +type AuthenticationConditionApplicationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationConditionApplicationable +} +// NewAuthenticationConditionApplicationCollectionResponse instantiates a new AuthenticationConditionApplicationCollectionResponse and sets the default values. +func NewAuthenticationConditionApplicationCollectionResponse()(*AuthenticationConditionApplicationCollectionResponse) { + m := &AuthenticationConditionApplicationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationConditionApplicationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationConditionApplicationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditionApplicationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationConditionApplicationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationConditionApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationConditionApplicationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationConditionApplicationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationConditionApplicationCollectionResponse) GetValue()([]AuthenticationConditionApplicationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationConditionApplicationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationConditionApplicationCollectionResponse) SetValue(value []AuthenticationConditionApplicationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_responseable.go new file mode 100644 index 000000000..8bf6c512b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_condition_application_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionApplicationCollectionResponseable +type AuthenticationConditionApplicationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationConditionApplicationable) + SetValue(value []AuthenticationConditionApplicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_condition_applicationable.go b/src/internal/connector/graph/betasdk/models/authentication_condition_applicationable.go new file mode 100644 index 000000000..db65d73a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_condition_applicationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionApplicationable +type AuthenticationConditionApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetOdataType()(*string) + SetAppId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_conditions.go b/src/internal/connector/graph/betasdk/models/authentication_conditions.go new file mode 100644 index 000000000..fd3984abb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_conditions.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditions +type AuthenticationConditions 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 applications property + applications AuthenticationConditionsApplicationsable + // The OdataType property + odataType *string +} +// NewAuthenticationConditions instantiates a new authenticationConditions and sets the default values. +func NewAuthenticationConditions()(*AuthenticationConditions) { + m := &AuthenticationConditions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditions(), 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 *AuthenticationConditions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplications gets the applications property value. The applications property +func (m *AuthenticationConditions) GetApplications()(AuthenticationConditionsApplicationsable) { + return m.applications +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationConditionsApplicationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplications(val.(AuthenticationConditionsApplicationsable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationConditions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applications", m.GetApplications()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationConditions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplications sets the applications property value. The applications property +func (m *AuthenticationConditions) SetApplications(value AuthenticationConditionsApplicationsable)() { + m.applications = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_conditions_applications.go b/src/internal/connector/graph/betasdk/models/authentication_conditions_applications.go new file mode 100644 index 000000000..f7639d5ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_conditions_applications.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionsApplications +type AuthenticationConditionsApplications 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 includeAllApplications property + includeAllApplications *bool + // The includeApplications property + includeApplications []AuthenticationConditionApplicationable + // The OdataType property + odataType *string +} +// NewAuthenticationConditionsApplications instantiates a new authenticationConditionsApplications and sets the default values. +func NewAuthenticationConditionsApplications()(*AuthenticationConditionsApplications) { + m := &AuthenticationConditionsApplications{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationConditionsApplicationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationConditionsApplicationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationConditionsApplications(), 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 *AuthenticationConditionsApplications) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationConditionsApplications) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["includeAllApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeAllApplications(val) + } + return nil + } + res["includeApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationConditionApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationConditionApplicationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationConditionApplicationable) + } + m.SetIncludeApplications(res) + } + 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 + } + return res +} +// GetIncludeAllApplications gets the includeAllApplications property value. The includeAllApplications property +func (m *AuthenticationConditionsApplications) GetIncludeAllApplications()(*bool) { + return m.includeAllApplications +} +// GetIncludeApplications gets the includeApplications property value. The includeApplications property +func (m *AuthenticationConditionsApplications) GetIncludeApplications()([]AuthenticationConditionApplicationable) { + return m.includeApplications +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionsApplications) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationConditionsApplications) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("includeAllApplications", m.GetIncludeAllApplications()) + if err != nil { + return err + } + } + if m.GetIncludeApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeApplications())) + for i, v := range m.GetIncludeApplications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("includeApplications", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationConditionsApplications) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIncludeAllApplications sets the includeAllApplications property value. The includeAllApplications property +func (m *AuthenticationConditionsApplications) SetIncludeAllApplications(value *bool)() { + m.includeAllApplications = value +} +// SetIncludeApplications sets the includeApplications property value. The includeApplications property +func (m *AuthenticationConditionsApplications) SetIncludeApplications(value []AuthenticationConditionApplicationable)() { + m.includeApplications = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationConditionsApplications) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_conditions_applicationsable.go b/src/internal/connector/graph/betasdk/models/authentication_conditions_applicationsable.go new file mode 100644 index 000000000..34ee2f23f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_conditions_applicationsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionsApplicationsable +type AuthenticationConditionsApplicationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeAllApplications()(*bool) + GetIncludeApplications()([]AuthenticationConditionApplicationable) + GetOdataType()(*string) + SetIncludeAllApplications(value *bool)() + SetIncludeApplications(value []AuthenticationConditionApplicationable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_conditionsable.go b/src/internal/connector/graph/betasdk/models/authentication_conditionsable.go new file mode 100644 index 000000000..700cf624d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_conditionsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationConditionsable +type AuthenticationConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplications()(AuthenticationConditionsApplicationsable) + GetOdataType()(*string) + SetApplications(value AuthenticationConditionsApplicationsable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context.go b/src/internal/connector/graph/betasdk/models/authentication_context.go new file mode 100644 index 000000000..9cd99b96b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContext +type AuthenticationContext struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Describes how the conditional access authentication context was triggered. A value of previouslySatisfied means the auth context was because the user already satisfied the requirements for that authentication context in some previous authentication event. A value of required means the user had to meet the authentication context requirement as part of the sign-in flow. The possible values are: required, previouslySatisfied, notApplicable, unknownFutureValue. + detail *AuthenticationContextDetail + // The identifier of a authentication context in your tenant. + id *string + // The OdataType property + odataType *string +} +// NewAuthenticationContext instantiates a new authenticationContext and sets the default values. +func NewAuthenticationContext()(*AuthenticationContext) { + m := &AuthenticationContext{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationContextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationContextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationContext(), 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 *AuthenticationContext) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetail gets the detail property value. Describes how the conditional access authentication context was triggered. A value of previouslySatisfied means the auth context was because the user already satisfied the requirements for that authentication context in some previous authentication event. A value of required means the user had to meet the authentication context requirement as part of the sign-in flow. The possible values are: required, previouslySatisfied, notApplicable, unknownFutureValue. +func (m *AuthenticationContext) GetDetail()(*AuthenticationContextDetail) { + return m.detail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationContext) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationContextDetail) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(*AuthenticationContextDetail)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The identifier of a authentication context in your tenant. +func (m *AuthenticationContext) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationContext) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationContext) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDetail() != nil { + cast := (*m.GetDetail()).String() + err := writer.WriteStringValue("detail", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationContext) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetail sets the detail property value. Describes how the conditional access authentication context was triggered. A value of previouslySatisfied means the auth context was because the user already satisfied the requirements for that authentication context in some previous authentication event. A value of required means the user had to meet the authentication context requirement as part of the sign-in flow. The possible values are: required, previouslySatisfied, notApplicable, unknownFutureValue. +func (m *AuthenticationContext) SetDetail(value *AuthenticationContextDetail)() { + m.detail = value +} +// SetId sets the id property value. The identifier of a authentication context in your tenant. +func (m *AuthenticationContext) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationContext) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_class_reference.go b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference.go new file mode 100644 index 000000000..782bffec8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextClassReference provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationContextClassReference struct { + Entity + // A short explanation of the policies that are enforced by authenticationContextClassReference. This value should be used to provide secondary text to describe the authentication context class reference when building user facing admin experiences. For example, selection UX. + description *string + // A friendly name that identifies the authenticationContextClassReference object when building user-facing admin experiences. For example, a selection UX. + displayName *string + // Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false, it should not be shown in selection UX used to tag resources with authentication context class values. It will still be shown in the Conditionall Access policy authoring experience. Supports $filter (eq). + isAvailable *bool +} +// NewAuthenticationContextClassReference instantiates a new authenticationContextClassReference and sets the default values. +func NewAuthenticationContextClassReference()(*AuthenticationContextClassReference) { + m := &AuthenticationContextClassReference{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationContextClassReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationContextClassReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationContextClassReference(), nil +} +// GetDescription gets the description property value. A short explanation of the policies that are enforced by authenticationContextClassReference. This value should be used to provide secondary text to describe the authentication context class reference when building user facing admin experiences. For example, selection UX. +func (m *AuthenticationContextClassReference) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. A friendly name that identifies the authenticationContextClassReference object when building user-facing admin experiences. For example, a selection UX. +func (m *AuthenticationContextClassReference) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationContextClassReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isAvailable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAvailable(val) + } + return nil + } + return res +} +// GetIsAvailable gets the isAvailable property value. Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false, it should not be shown in selection UX used to tag resources with authentication context class values. It will still be shown in the Conditionall Access policy authoring experience. Supports $filter (eq). +func (m *AuthenticationContextClassReference) GetIsAvailable()(*bool) { + return m.isAvailable +} +// Serialize serializes information the current object +func (m *AuthenticationContextClassReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAvailable", m.GetIsAvailable()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. A short explanation of the policies that are enforced by authenticationContextClassReference. This value should be used to provide secondary text to describe the authentication context class reference when building user facing admin experiences. For example, selection UX. +func (m *AuthenticationContextClassReference) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. A friendly name that identifies the authenticationContextClassReference object when building user-facing admin experiences. For example, a selection UX. +func (m *AuthenticationContextClassReference) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsAvailable sets the isAvailable property value. Indicates whether the authenticationContextClassReference has been published by the security admin and is ready for use by apps. When it is set to false, it should not be shown in selection UX used to tag resources with authentication context class values. It will still be shown in the Conditionall Access policy authoring experience. Supports $filter (eq). +func (m *AuthenticationContextClassReference) SetIsAvailable(value *bool)() { + m.isAvailable = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_response.go new file mode 100644 index 000000000..f7a572abf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextClassReferenceCollectionResponse +type AuthenticationContextClassReferenceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationContextClassReferenceable +} +// NewAuthenticationContextClassReferenceCollectionResponse instantiates a new AuthenticationContextClassReferenceCollectionResponse and sets the default values. +func NewAuthenticationContextClassReferenceCollectionResponse()(*AuthenticationContextClassReferenceCollectionResponse) { + m := &AuthenticationContextClassReferenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationContextClassReferenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationContextClassReferenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationContextClassReferenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationContextClassReferenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationContextClassReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationContextClassReferenceable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationContextClassReferenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationContextClassReferenceCollectionResponse) GetValue()([]AuthenticationContextClassReferenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationContextClassReferenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationContextClassReferenceCollectionResponse) SetValue(value []AuthenticationContextClassReferenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_responseable.go new file mode 100644 index 000000000..fb9e5dad6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_class_reference_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextClassReferenceCollectionResponseable +type AuthenticationContextClassReferenceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationContextClassReferenceable) + SetValue(value []AuthenticationContextClassReferenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_class_referenceable.go b/src/internal/connector/graph/betasdk/models/authentication_context_class_referenceable.go new file mode 100644 index 000000000..d87e18ad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_class_referenceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextClassReferenceable +type AuthenticationContextClassReferenceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIsAvailable()(*bool) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsAvailable(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_context_collection_response.go new file mode 100644 index 000000000..3de3d2c2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextCollectionResponse +type AuthenticationContextCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationContextable +} +// NewAuthenticationContextCollectionResponse instantiates a new AuthenticationContextCollectionResponse and sets the default values. +func NewAuthenticationContextCollectionResponse()(*AuthenticationContextCollectionResponse) { + m := &AuthenticationContextCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationContextCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationContextCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationContextCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationContextCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationContextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationContextable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationContextable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationContextCollectionResponse) GetValue()([]AuthenticationContextable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationContextCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationContextCollectionResponse) SetValue(value []AuthenticationContextable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_context_collection_responseable.go new file mode 100644 index 000000000..f17bcb9a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextCollectionResponseable +type AuthenticationContextCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationContextable) + SetValue(value []AuthenticationContextable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_context_detail.go b/src/internal/connector/graph/betasdk/models/authentication_context_detail.go new file mode 100644 index 000000000..6ced22e72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_context_detail.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationContextDetail int + +const ( + REQUIRED_AUTHENTICATIONCONTEXTDETAIL AuthenticationContextDetail = iota + PREVIOUSLYSATISFIED_AUTHENTICATIONCONTEXTDETAIL + NOTAPPLICABLE_AUTHENTICATIONCONTEXTDETAIL + UNKNOWNFUTUREVALUE_AUTHENTICATIONCONTEXTDETAIL +) + +func (i AuthenticationContextDetail) String() string { + return []string{"required", "previouslySatisfied", "notApplicable", "unknownFutureValue"}[i] +} +func ParseAuthenticationContextDetail(v string) (interface{}, error) { + result := REQUIRED_AUTHENTICATIONCONTEXTDETAIL + switch v { + case "required": + result = REQUIRED_AUTHENTICATIONCONTEXTDETAIL + case "previouslySatisfied": + result = PREVIOUSLYSATISFIED_AUTHENTICATIONCONTEXTDETAIL + case "notApplicable": + result = NOTAPPLICABLE_AUTHENTICATIONCONTEXTDETAIL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONCONTEXTDETAIL + default: + return 0, errors.New("Unknown AuthenticationContextDetail value: " + v) + } + return &result, nil +} +func SerializeAuthenticationContextDetail(values []AuthenticationContextDetail) []string { + 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/authentication_contextable.go b/src/internal/connector/graph/betasdk/models/authentication_contextable.go new file mode 100644 index 000000000..18d63793a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_contextable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationContextable +type AuthenticationContextable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*AuthenticationContextDetail) + GetId()(*string) + GetOdataType()(*string) + SetDetail(value *AuthenticationContextDetail)() + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_detail.go b/src/internal/connector/graph/betasdk/models/authentication_detail.go new file mode 100644 index 000000000..7d4a403d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_detail.go @@ -0,0 +1,228 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationDetail +type AuthenticationDetail 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 type of authentication method used to perform this step of authentication. Possible values: Password, SMS, Voice, Authenticator App, Software OATH token, Satisfied by token, Previously satisfied. + authenticationMethod *string + // Details about the authentication method used to perform this authentication step. For example, phone number (for SMS and voice), device name (for Authenticator app), and password source (e.g. cloud, AD FS, PTA, PHS). + authenticationMethodDetail *string + // Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + authenticationStepDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The step of authentication that this satisfied. For example, primary authentication, or multi-factor authentication. + authenticationStepRequirement *string + // Details about why the step succeeded or failed. For examples, user is blocked, fraud code entered, no phone input - timed out, phone unreachable, or claim in token. + authenticationStepResultDetail *string + // The OdataType property + odataType *string + // Indicates the status of the authentication step. Possible values: succeeded, failed. + succeeded *bool +} +// NewAuthenticationDetail instantiates a new authenticationDetail and sets the default values. +func NewAuthenticationDetail()(*AuthenticationDetail) { + m := &AuthenticationDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationDetail(), 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 *AuthenticationDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationMethod gets the authenticationMethod property value. The type of authentication method used to perform this step of authentication. Possible values: Password, SMS, Voice, Authenticator App, Software OATH token, Satisfied by token, Previously satisfied. +func (m *AuthenticationDetail) GetAuthenticationMethod()(*string) { + return m.authenticationMethod +} +// GetAuthenticationMethodDetail gets the authenticationMethodDetail property value. Details about the authentication method used to perform this authentication step. For example, phone number (for SMS and voice), device name (for Authenticator app), and password source (e.g. cloud, AD FS, PTA, PHS). +func (m *AuthenticationDetail) GetAuthenticationMethodDetail()(*string) { + return m.authenticationMethodDetail +} +// GetAuthenticationStepDateTime gets the authenticationStepDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AuthenticationDetail) GetAuthenticationStepDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.authenticationStepDateTime +} +// GetAuthenticationStepRequirement gets the authenticationStepRequirement property value. The step of authentication that this satisfied. For example, primary authentication, or multi-factor authentication. +func (m *AuthenticationDetail) GetAuthenticationStepRequirement()(*string) { + return m.authenticationStepRequirement +} +// GetAuthenticationStepResultDetail gets the authenticationStepResultDetail property value. Details about why the step succeeded or failed. For examples, user is blocked, fraud code entered, no phone input - timed out, phone unreachable, or claim in token. +func (m *AuthenticationDetail) GetAuthenticationStepResultDetail()(*string) { + return m.authenticationStepResultDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val) + } + return nil + } + res["authenticationMethodDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethodDetail(val) + } + return nil + } + res["authenticationStepDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStepDateTime(val) + } + return nil + } + res["authenticationStepRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStepRequirement(val) + } + return nil + } + res["authenticationStepResultDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStepResultDetail(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["succeeded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSucceeded(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationDetail) GetOdataType()(*string) { + return m.odataType +} +// GetSucceeded gets the succeeded property value. Indicates the status of the authentication step. Possible values: succeeded, failed. +func (m *AuthenticationDetail) GetSucceeded()(*bool) { + return m.succeeded +} +// Serialize serializes information the current object +func (m *AuthenticationDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("authenticationMethod", m.GetAuthenticationMethod()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authenticationMethodDetail", m.GetAuthenticationMethodDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("authenticationStepDateTime", m.GetAuthenticationStepDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authenticationStepRequirement", m.GetAuthenticationStepRequirement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authenticationStepResultDetail", m.GetAuthenticationStepResultDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("succeeded", m.GetSucceeded()) + 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 *AuthenticationDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationMethod sets the authenticationMethod property value. The type of authentication method used to perform this step of authentication. Possible values: Password, SMS, Voice, Authenticator App, Software OATH token, Satisfied by token, Previously satisfied. +func (m *AuthenticationDetail) SetAuthenticationMethod(value *string)() { + m.authenticationMethod = value +} +// SetAuthenticationMethodDetail sets the authenticationMethodDetail property value. Details about the authentication method used to perform this authentication step. For example, phone number (for SMS and voice), device name (for Authenticator app), and password source (e.g. cloud, AD FS, PTA, PHS). +func (m *AuthenticationDetail) SetAuthenticationMethodDetail(value *string)() { + m.authenticationMethodDetail = value +} +// SetAuthenticationStepDateTime sets the authenticationStepDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AuthenticationDetail) SetAuthenticationStepDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.authenticationStepDateTime = value +} +// SetAuthenticationStepRequirement sets the authenticationStepRequirement property value. The step of authentication that this satisfied. For example, primary authentication, or multi-factor authentication. +func (m *AuthenticationDetail) SetAuthenticationStepRequirement(value *string)() { + m.authenticationStepRequirement = value +} +// SetAuthenticationStepResultDetail sets the authenticationStepResultDetail property value. Details about why the step succeeded or failed. For examples, user is blocked, fraud code entered, no phone input - timed out, phone unreachable, or claim in token. +func (m *AuthenticationDetail) SetAuthenticationStepResultDetail(value *string)() { + m.authenticationStepResultDetail = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetSucceeded sets the succeeded property value. Indicates the status of the authentication step. Possible values: succeeded, failed. +func (m *AuthenticationDetail) SetSucceeded(value *bool)() { + m.succeeded = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_detail_collection_response.go new file mode 100644 index 000000000..107dea1ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationDetailCollectionResponse +type AuthenticationDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationDetailable +} +// NewAuthenticationDetailCollectionResponse instantiates a new AuthenticationDetailCollectionResponse and sets the default values. +func NewAuthenticationDetailCollectionResponse()(*AuthenticationDetailCollectionResponse) { + m := &AuthenticationDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationDetailable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationDetailCollectionResponse) GetValue()([]AuthenticationDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationDetailCollectionResponse) SetValue(value []AuthenticationDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_detail_collection_responseable.go new file mode 100644 index 000000000..688956eba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationDetailCollectionResponseable +type AuthenticationDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationDetailable) + SetValue(value []AuthenticationDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_detailable.go b/src/internal/connector/graph/betasdk/models/authentication_detailable.go new file mode 100644 index 000000000..2ed09d911 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_detailable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationDetailable +type AuthenticationDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*string) + GetAuthenticationMethodDetail()(*string) + GetAuthenticationStepDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAuthenticationStepRequirement()(*string) + GetAuthenticationStepResultDetail()(*string) + GetOdataType()(*string) + GetSucceeded()(*bool) + SetAuthenticationMethod(value *string)() + SetAuthenticationMethodDetail(value *string)() + SetAuthenticationStepDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAuthenticationStepRequirement(value *string)() + SetAuthenticationStepResultDetail(value *string)() + SetOdataType(value *string)() + SetSucceeded(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_handler_result.go b/src/internal/connector/graph/betasdk/models/authentication_event_handler_result.go new file mode 100644 index 000000000..c2e257b58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_handler_result.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventHandlerResult +type AuthenticationEventHandlerResult 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 OdataType property + odataType *string +} +// NewAuthenticationEventHandlerResult instantiates a new authenticationEventHandlerResult and sets the default values. +func NewAuthenticationEventHandlerResult()(*AuthenticationEventHandlerResult) { + m := &AuthenticationEventHandlerResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationEventHandlerResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationEventHandlerResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.customExtensionCalloutResult": + return NewCustomExtensionCalloutResult(), nil + } + } + } + } + return NewAuthenticationEventHandlerResult(), 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 *AuthenticationEventHandlerResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationEventHandlerResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationEventHandlerResult) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationEventHandlerResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationEventHandlerResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationEventHandlerResult) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_handler_resultable.go b/src/internal/connector/graph/betasdk/models/authentication_event_handler_resultable.go new file mode 100644 index 000000000..51f2f4be1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_handler_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventHandlerResultable +type AuthenticationEventHandlerResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_listener.go b/src/internal/connector/graph/betasdk/models/authentication_event_listener.go new file mode 100644 index 000000000..5b5c37a93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_listener.go @@ -0,0 +1,130 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventListener +type AuthenticationEventListener struct { + Entity + // The authenticationEventsFlowId property + authenticationEventsFlowId *string + // The conditions property + conditions AuthenticationConditionsable + // The priority property + priority *int32 +} +// NewAuthenticationEventListener instantiates a new AuthenticationEventListener and sets the default values. +func NewAuthenticationEventListener()(*AuthenticationEventListener) { + m := &AuthenticationEventListener{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationEventListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationEventListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.onTokenIssuanceStartListener": + return NewOnTokenIssuanceStartListener(), nil + } + } + } + } + return NewAuthenticationEventListener(), nil +} +// GetAuthenticationEventsFlowId gets the authenticationEventsFlowId property value. The authenticationEventsFlowId property +func (m *AuthenticationEventListener) GetAuthenticationEventsFlowId()(*string) { + return m.authenticationEventsFlowId +} +// GetConditions gets the conditions property value. The conditions property +func (m *AuthenticationEventListener) GetConditions()(AuthenticationConditionsable) { + return m.conditions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationEventListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationEventsFlowId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationEventsFlowId(val) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(AuthenticationConditionsable)) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetPriority gets the priority property value. The priority property +func (m *AuthenticationEventListener) GetPriority()(*int32) { + return m.priority +} +// Serialize serializes information the current object +func (m *AuthenticationEventListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("authenticationEventsFlowId", m.GetAuthenticationEventsFlowId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationEventsFlowId sets the authenticationEventsFlowId property value. The authenticationEventsFlowId property +func (m *AuthenticationEventListener) SetAuthenticationEventsFlowId(value *string)() { + m.authenticationEventsFlowId = value +} +// SetConditions sets the conditions property value. The conditions property +func (m *AuthenticationEventListener) SetConditions(value AuthenticationConditionsable)() { + m.conditions = value +} +// SetPriority sets the priority property value. The priority property +func (m *AuthenticationEventListener) SetPriority(value *int32)() { + m.priority = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_response.go new file mode 100644 index 000000000..8e48fd1b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventListenerCollectionResponse +type AuthenticationEventListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationEventListenerable +} +// NewAuthenticationEventListenerCollectionResponse instantiates a new AuthenticationEventListenerCollectionResponse and sets the default values. +func NewAuthenticationEventListenerCollectionResponse()(*AuthenticationEventListenerCollectionResponse) { + m := &AuthenticationEventListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationEventListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationEventListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationEventListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationEventListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationEventListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationEventListenerable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationEventListenerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationEventListenerCollectionResponse) GetValue()([]AuthenticationEventListenerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationEventListenerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationEventListenerCollectionResponse) SetValue(value []AuthenticationEventListenerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_responseable.go new file mode 100644 index 000000000..00a31c047 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_listener_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventListenerCollectionResponseable +type AuthenticationEventListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationEventListenerable) + SetValue(value []AuthenticationEventListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_listenerable.go b/src/internal/connector/graph/betasdk/models/authentication_event_listenerable.go new file mode 100644 index 000000000..e438c83f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_listenerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventListenerable +type AuthenticationEventListenerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationEventsFlowId()(*string) + GetConditions()(AuthenticationConditionsable) + GetPriority()(*int32) + SetAuthenticationEventsFlowId(value *string)() + SetConditions(value AuthenticationConditionsable)() + SetPriority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_event_type.go b/src/internal/connector/graph/betasdk/models/authentication_event_type.go new file mode 100644 index 000000000..8ae984f40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_event_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationEventType int + +const ( + TOKENISSUANCESTART_AUTHENTICATIONEVENTTYPE AuthenticationEventType = iota + PAGERENDERSTART_AUTHENTICATIONEVENTTYPE + UNKNOWNFUTUREVALUE_AUTHENTICATIONEVENTTYPE +) + +func (i AuthenticationEventType) String() string { + return []string{"tokenIssuanceStart", "pageRenderStart", "unknownFutureValue"}[i] +} +func ParseAuthenticationEventType(v string) (interface{}, error) { + result := TOKENISSUANCESTART_AUTHENTICATIONEVENTTYPE + switch v { + case "tokenIssuanceStart": + result = TOKENISSUANCESTART_AUTHENTICATIONEVENTTYPE + case "pageRenderStart": + result = PAGERENDERSTART_AUTHENTICATIONEVENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONEVENTTYPE + default: + return 0, errors.New("Unknown AuthenticationEventType value: " + v) + } + return &result, nil +} +func SerializeAuthenticationEventType(values []AuthenticationEventType) []string { + 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/authentication_events_policy.go b/src/internal/connector/graph/betasdk/models/authentication_events_policy.go new file mode 100644 index 000000000..a2dc3c5c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_events_policy.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventsPolicy +type AuthenticationEventsPolicy struct { + Entity + // A list of applicable actions to be taken on sign-up. + onSignupStart []AuthenticationListenerable +} +// NewAuthenticationEventsPolicy instantiates a new AuthenticationEventsPolicy and sets the default values. +func NewAuthenticationEventsPolicy()(*AuthenticationEventsPolicy) { + m := &AuthenticationEventsPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationEventsPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationEventsPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationEventsPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationEventsPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["onSignupStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationListenerable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationListenerable) + } + m.SetOnSignupStart(res) + } + return nil + } + return res +} +// GetOnSignupStart gets the onSignupStart property value. A list of applicable actions to be taken on sign-up. +func (m *AuthenticationEventsPolicy) GetOnSignupStart()([]AuthenticationListenerable) { + return m.onSignupStart +} +// Serialize serializes information the current object +func (m *AuthenticationEventsPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetOnSignupStart() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnSignupStart())) + for i, v := range m.GetOnSignupStart() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onSignupStart", cast) + if err != nil { + return err + } + } + return nil +} +// SetOnSignupStart sets the onSignupStart property value. A list of applicable actions to be taken on sign-up. +func (m *AuthenticationEventsPolicy) SetOnSignupStart(value []AuthenticationListenerable)() { + m.onSignupStart = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_events_policyable.go b/src/internal/connector/graph/betasdk/models/authentication_events_policyable.go new file mode 100644 index 000000000..50e073f49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_events_policyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationEventsPolicyable +type AuthenticationEventsPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOnSignupStart()([]AuthenticationListenerable) + SetOnSignupStart(value []AuthenticationListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_flows_policy.go b/src/internal/connector/graph/betasdk/models/authentication_flows_policy.go new file mode 100644 index 000000000..52b067023 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_flows_policy.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationFlowsPolicy +type AuthenticationFlowsPolicy struct { + Entity + // Inherited property. A description of the policy. This property is not a key. Optional. Read-only. + description *string + // Inherited property. The human-readable name of the policy. This property is not a key. Optional. Read-only. + displayName *string + // Contains selfServiceSignUpAuthenticationFlowConfiguration settings that convey whether self-service sign-up is enabled or disabled. This property is not a key. Optional. Read-only. + selfServiceSignUp SelfServiceSignUpAuthenticationFlowConfigurationable +} +// NewAuthenticationFlowsPolicy instantiates a new AuthenticationFlowsPolicy and sets the default values. +func NewAuthenticationFlowsPolicy()(*AuthenticationFlowsPolicy) { + m := &AuthenticationFlowsPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationFlowsPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationFlowsPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationFlowsPolicy(), nil +} +// GetDescription gets the description property value. Inherited property. A description of the policy. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Inherited property. The human-readable name of the policy. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationFlowsPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["selfServiceSignUp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSelfServiceSignUpAuthenticationFlowConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSelfServiceSignUp(val.(SelfServiceSignUpAuthenticationFlowConfigurationable)) + } + return nil + } + return res +} +// GetSelfServiceSignUp gets the selfServiceSignUp property value. Contains selfServiceSignUpAuthenticationFlowConfiguration settings that convey whether self-service sign-up is enabled or disabled. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) GetSelfServiceSignUp()(SelfServiceSignUpAuthenticationFlowConfigurationable) { + return m.selfServiceSignUp +} +// Serialize serializes information the current object +func (m *AuthenticationFlowsPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("selfServiceSignUp", m.GetSelfServiceSignUp()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Inherited property. A description of the policy. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Inherited property. The human-readable name of the policy. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetSelfServiceSignUp sets the selfServiceSignUp property value. Contains selfServiceSignUpAuthenticationFlowConfiguration settings that convey whether self-service sign-up is enabled or disabled. This property is not a key. Optional. Read-only. +func (m *AuthenticationFlowsPolicy) SetSelfServiceSignUp(value SelfServiceSignUpAuthenticationFlowConfigurationable)() { + m.selfServiceSignUp = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_flows_policyable.go b/src/internal/connector/graph/betasdk/models/authentication_flows_policyable.go new file mode 100644 index 000000000..15fce0e37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_flows_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationFlowsPolicyable +type AuthenticationFlowsPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetSelfServiceSignUp()(SelfServiceSignUpAuthenticationFlowConfigurationable) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetSelfServiceSignUp(value SelfServiceSignUpAuthenticationFlowConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_listener.go b/src/internal/connector/graph/betasdk/models/authentication_listener.go new file mode 100644 index 000000000..86ec28946 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_listener.go @@ -0,0 +1,104 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationListener provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationListener struct { + Entity + // The priority of the listener. Determines the order of evaluation when an event has multiple listeners. The priority is evaluated from low to high. + priority *int32 + // Filter based on the source of the authentication that is used to determine whether the listener is evaluated. This is currently limited to evaluations based on application the user is authenticating to. + sourceFilter AuthenticationSourceFilterable +} +// NewAuthenticationListener instantiates a new authenticationListener and sets the default values. +func NewAuthenticationListener()(*AuthenticationListener) { + m := &AuthenticationListener{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.invokeUserFlowListener": + return NewInvokeUserFlowListener(), nil + } + } + } + } + return NewAuthenticationListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["sourceFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationSourceFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceFilter(val.(AuthenticationSourceFilterable)) + } + return nil + } + return res +} +// GetPriority gets the priority property value. The priority of the listener. Determines the order of evaluation when an event has multiple listeners. The priority is evaluated from low to high. +func (m *AuthenticationListener) GetPriority()(*int32) { + return m.priority +} +// GetSourceFilter gets the sourceFilter property value. Filter based on the source of the authentication that is used to determine whether the listener is evaluated. This is currently limited to evaluations based on application the user is authenticating to. +func (m *AuthenticationListener) GetSourceFilter()(AuthenticationSourceFilterable) { + return m.sourceFilter +} +// Serialize serializes information the current object +func (m *AuthenticationListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceFilter", m.GetSourceFilter()) + if err != nil { + return err + } + } + return nil +} +// SetPriority sets the priority property value. The priority of the listener. Determines the order of evaluation when an event has multiple listeners. The priority is evaluated from low to high. +func (m *AuthenticationListener) SetPriority(value *int32)() { + m.priority = value +} +// SetSourceFilter sets the sourceFilter property value. Filter based on the source of the authentication that is used to determine whether the listener is evaluated. This is currently limited to evaluations based on application the user is authenticating to. +func (m *AuthenticationListener) SetSourceFilter(value AuthenticationSourceFilterable)() { + m.sourceFilter = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_listener_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_listener_collection_response.go new file mode 100644 index 000000000..5fdd9b0c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_listener_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationListenerCollectionResponse +type AuthenticationListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationListenerable +} +// NewAuthenticationListenerCollectionResponse instantiates a new AuthenticationListenerCollectionResponse and sets the default values. +func NewAuthenticationListenerCollectionResponse()(*AuthenticationListenerCollectionResponse) { + m := &AuthenticationListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationListenerable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationListenerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationListenerCollectionResponse) GetValue()([]AuthenticationListenerable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationListenerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationListenerCollectionResponse) SetValue(value []AuthenticationListenerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_listener_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_listener_collection_responseable.go new file mode 100644 index 000000000..e83eed6bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_listener_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationListenerCollectionResponseable +type AuthenticationListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationListenerable) + SetValue(value []AuthenticationListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_listenerable.go b/src/internal/connector/graph/betasdk/models/authentication_listenerable.go new file mode 100644 index 000000000..62a9c54ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_listenerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationListenerable +type AuthenticationListenerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPriority()(*int32) + GetSourceFilter()(AuthenticationSourceFilterable) + SetPriority(value *int32)() + SetSourceFilter(value AuthenticationSourceFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method.go b/src/internal/connector/graph/betasdk/models/authentication_method.go new file mode 100644 index 000000000..1fe551e58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethod provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethod struct { + Entity +} +// NewAuthenticationMethod instantiates a new authenticationMethod and sets the default values. +func NewAuthenticationMethod()(*AuthenticationMethod) { + m := &AuthenticationMethod{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.emailAuthenticationMethod": + return NewEmailAuthenticationMethod(), nil + case "#microsoft.graph.fido2AuthenticationMethod": + return NewFido2AuthenticationMethod(), nil + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod": + return NewMicrosoftAuthenticatorAuthenticationMethod(), nil + case "#microsoft.graph.passwordAuthenticationMethod": + return NewPasswordAuthenticationMethod(), nil + case "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod": + return NewPasswordlessMicrosoftAuthenticatorAuthenticationMethod(), nil + case "#microsoft.graph.phoneAuthenticationMethod": + return NewPhoneAuthenticationMethod(), nil + case "#microsoft.graph.softwareOathAuthenticationMethod": + return NewSoftwareOathAuthenticationMethod(), nil + case "#microsoft.graph.temporaryAccessPassAuthenticationMethod": + return NewTemporaryAccessPassAuthenticationMethod(), nil + case "#microsoft.graph.windowsHelloForBusinessAuthenticationMethod": + return NewWindowsHelloForBusinessAuthenticationMethod(), nil + } + } + } + } + return NewAuthenticationMethod(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_method_collection_response.go new file mode 100644 index 000000000..1d6517aea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodCollectionResponse +type AuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationMethodable +} +// NewAuthenticationMethodCollectionResponse instantiates a new AuthenticationMethodCollectionResponse and sets the default values. +func NewAuthenticationMethodCollectionResponse()(*AuthenticationMethodCollectionResponse) { + m := &AuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationMethodCollectionResponse) GetValue()([]AuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationMethodCollectionResponse) SetValue(value []AuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_method_collection_responseable.go new file mode 100644 index 000000000..5a55dea64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodCollectionResponseable +type AuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationMethodable) + SetValue(value []AuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_configuration.go b/src/internal/connector/graph/betasdk/models/authentication_method_configuration.go new file mode 100644 index 000000000..249f94a89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_configuration.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodConfiguration +type AuthenticationMethodConfiguration struct { + Entity + // Groups of users that are excluded from a policy. + excludeTargets []ExcludeTargetable + // The state of the policy. Possible values are: enabled, disabled. + state *AuthenticationMethodState +} +// NewAuthenticationMethodConfiguration instantiates a new AuthenticationMethodConfiguration and sets the default values. +func NewAuthenticationMethodConfiguration()(*AuthenticationMethodConfiguration) { + m := &AuthenticationMethodConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.emailAuthenticationMethodConfiguration": + return NewEmailAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.fido2AuthenticationMethodConfiguration": + return NewFido2AuthenticationMethodConfiguration(), nil + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration": + return NewMicrosoftAuthenticatorAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.smsAuthenticationMethodConfiguration": + return NewSmsAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.softwareOathAuthenticationMethodConfiguration": + return NewSoftwareOathAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.temporaryAccessPassAuthenticationMethodConfiguration": + return NewTemporaryAccessPassAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.voiceAuthenticationMethodConfiguration": + return NewVoiceAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.x509CertificateAuthenticationMethodConfiguration": + return NewX509CertificateAuthenticationMethodConfiguration(), nil + } + } + } + } + return NewAuthenticationMethodConfiguration(), nil +} +// GetExcludeTargets gets the excludeTargets property value. Groups of users that are excluded from a policy. +func (m *AuthenticationMethodConfiguration) GetExcludeTargets()([]ExcludeTargetable) { + return m.excludeTargets +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["excludeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExcludeTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExcludeTargetable, len(val)) + for i, v := range val { + res[i] = v.(ExcludeTargetable) + } + m.SetExcludeTargets(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AuthenticationMethodState)) + } + return nil + } + return res +} +// GetState gets the state property value. The state of the policy. Possible values are: enabled, disabled. +func (m *AuthenticationMethodConfiguration) GetState()(*AuthenticationMethodState) { + return m.state +} +// Serialize serializes information the current object +func (m *AuthenticationMethodConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetExcludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExcludeTargets())) + for i, v := range m.GetExcludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("excludeTargets", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetExcludeTargets sets the excludeTargets property value. Groups of users that are excluded from a policy. +func (m *AuthenticationMethodConfiguration) SetExcludeTargets(value []ExcludeTargetable)() { + m.excludeTargets = value +} +// SetState sets the state property value. The state of the policy. Possible values are: enabled, disabled. +func (m *AuthenticationMethodConfiguration) SetState(value *AuthenticationMethodState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_response.go new file mode 100644 index 000000000..8ea2c796f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodConfigurationCollectionResponse +type AuthenticationMethodConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationMethodConfigurationable +} +// NewAuthenticationMethodConfigurationCollectionResponse instantiates a new AuthenticationMethodConfigurationCollectionResponse and sets the default values. +func NewAuthenticationMethodConfigurationCollectionResponse()(*AuthenticationMethodConfigurationCollectionResponse) { + m := &AuthenticationMethodConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationMethodConfigurationCollectionResponse) GetValue()([]AuthenticationMethodConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationMethodConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationMethodConfigurationCollectionResponse) SetValue(value []AuthenticationMethodConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_responseable.go new file mode 100644 index 000000000..9c460a41c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodConfigurationCollectionResponseable +type AuthenticationMethodConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationMethodConfigurationable) + SetValue(value []AuthenticationMethodConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_configurationable.go b/src/internal/connector/graph/betasdk/models/authentication_method_configurationable.go new file mode 100644 index 000000000..6e7dd87c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodConfigurationable +type AuthenticationMethodConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeTargets()([]ExcludeTargetable) + GetState()(*AuthenticationMethodState) + SetExcludeTargets(value []ExcludeTargetable)() + SetState(value *AuthenticationMethodState)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_feature.go b/src/internal/connector/graph/betasdk/models/authentication_method_feature.go new file mode 100644 index 000000000..3c755359c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_feature.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type AuthenticationMethodFeature int + +const ( + SSPRREGISTERED_AUTHENTICATIONMETHODFEATURE AuthenticationMethodFeature = iota + SSPRENABLED_AUTHENTICATIONMETHODFEATURE + SSPRCAPABLE_AUTHENTICATIONMETHODFEATURE + PASSWORDLESSCAPABLE_AUTHENTICATIONMETHODFEATURE + MFACAPABLE_AUTHENTICATIONMETHODFEATURE +) + +func (i AuthenticationMethodFeature) String() string { + return []string{"ssprRegistered", "ssprEnabled", "ssprCapable", "passwordlessCapable", "mfaCapable"}[i] +} +func ParseAuthenticationMethodFeature(v string) (interface{}, error) { + result := SSPRREGISTERED_AUTHENTICATIONMETHODFEATURE + switch v { + case "ssprRegistered": + result = SSPRREGISTERED_AUTHENTICATIONMETHODFEATURE + case "ssprEnabled": + result = SSPRENABLED_AUTHENTICATIONMETHODFEATURE + case "ssprCapable": + result = SSPRCAPABLE_AUTHENTICATIONMETHODFEATURE + case "passwordlessCapable": + result = PASSWORDLESSCAPABLE_AUTHENTICATIONMETHODFEATURE + case "mfaCapable": + result = MFACAPABLE_AUTHENTICATIONMETHODFEATURE + default: + return 0, errors.New("Unknown AuthenticationMethodFeature value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodFeature(values []AuthenticationMethodFeature) []string { + 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/authentication_method_feature_configuration.go b/src/internal/connector/graph/betasdk/models/authentication_method_feature_configuration.go new file mode 100644 index 000000000..b8182fb2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_feature_configuration.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodFeatureConfiguration +type AuthenticationMethodFeatureConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A single entity that's excluded from using this feature. + excludeTarget FeatureTargetable + // A single entity that's allowed to use this feature. + includeTarget FeatureTargetable + // The OdataType property + odataType *string + // Enable or disable the feature. Possible values are: default, enabled, disabled, unknownFutureValue. The default value is used when the configuration hasn't been explicitly set and uses the default behavior of Azure AD for the setting. The default value is disabled. + state *AdvancedConfigState +} +// NewAuthenticationMethodFeatureConfiguration instantiates a new authenticationMethodFeatureConfiguration and sets the default values. +func NewAuthenticationMethodFeatureConfiguration()(*AuthenticationMethodFeatureConfiguration) { + m := &AuthenticationMethodFeatureConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationMethodFeatureConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodFeatureConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodFeatureConfiguration(), 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 *AuthenticationMethodFeatureConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeTarget gets the excludeTarget property value. A single entity that's excluded from using this feature. +func (m *AuthenticationMethodFeatureConfiguration) GetExcludeTarget()(FeatureTargetable) { + return m.excludeTarget +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodFeatureConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFeatureTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExcludeTarget(val.(FeatureTargetable)) + } + return nil + } + res["includeTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFeatureTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIncludeTarget(val.(FeatureTargetable)) + } + 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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdvancedConfigState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AdvancedConfigState)) + } + return nil + } + return res +} +// GetIncludeTarget gets the includeTarget property value. A single entity that's allowed to use this feature. +func (m *AuthenticationMethodFeatureConfiguration) GetIncludeTarget()(FeatureTargetable) { + return m.includeTarget +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodFeatureConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. Enable or disable the feature. Possible values are: default, enabled, disabled, unknownFutureValue. The default value is used when the configuration hasn't been explicitly set and uses the default behavior of Azure AD for the setting. The default value is disabled. +func (m *AuthenticationMethodFeatureConfiguration) GetState()(*AdvancedConfigState) { + return m.state +} +// Serialize serializes information the current object +func (m *AuthenticationMethodFeatureConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("excludeTarget", m.GetExcludeTarget()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("includeTarget", m.GetIncludeTarget()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *AuthenticationMethodFeatureConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeTarget sets the excludeTarget property value. A single entity that's excluded from using this feature. +func (m *AuthenticationMethodFeatureConfiguration) SetExcludeTarget(value FeatureTargetable)() { + m.excludeTarget = value +} +// SetIncludeTarget sets the includeTarget property value. A single entity that's allowed to use this feature. +func (m *AuthenticationMethodFeatureConfiguration) SetIncludeTarget(value FeatureTargetable)() { + m.includeTarget = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodFeatureConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. Enable or disable the feature. Possible values are: default, enabled, disabled, unknownFutureValue. The default value is used when the configuration hasn't been explicitly set and uses the default behavior of Azure AD for the setting. The default value is disabled. +func (m *AuthenticationMethodFeatureConfiguration) SetState(value *AdvancedConfigState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_feature_configurationable.go b/src/internal/connector/graph/betasdk/models/authentication_method_feature_configurationable.go new file mode 100644 index 000000000..d47e2da2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_feature_configurationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodFeatureConfigurationable +type AuthenticationMethodFeatureConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeTarget()(FeatureTargetable) + GetIncludeTarget()(FeatureTargetable) + GetOdataType()(*string) + GetState()(*AdvancedConfigState) + SetExcludeTarget(value FeatureTargetable)() + SetIncludeTarget(value FeatureTargetable)() + SetOdataType(value *string)() + SetState(value *AdvancedConfigState)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_key_strength.go b/src/internal/connector/graph/betasdk/models/authentication_method_key_strength.go new file mode 100644 index 000000000..a03e0007b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_key_strength.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodKeyStrength int + +const ( + NORMAL_AUTHENTICATIONMETHODKEYSTRENGTH AuthenticationMethodKeyStrength = iota + WEAK_AUTHENTICATIONMETHODKEYSTRENGTH + UNKNOWN_AUTHENTICATIONMETHODKEYSTRENGTH +) + +func (i AuthenticationMethodKeyStrength) String() string { + return []string{"normal", "weak", "unknown"}[i] +} +func ParseAuthenticationMethodKeyStrength(v string) (interface{}, error) { + result := NORMAL_AUTHENTICATIONMETHODKEYSTRENGTH + switch v { + case "normal": + result = NORMAL_AUTHENTICATIONMETHODKEYSTRENGTH + case "weak": + result = WEAK_AUTHENTICATIONMETHODKEYSTRENGTH + case "unknown": + result = UNKNOWN_AUTHENTICATIONMETHODKEYSTRENGTH + default: + return 0, errors.New("Unknown AuthenticationMethodKeyStrength value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodKeyStrength(values []AuthenticationMethodKeyStrength) []string { + 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/authentication_method_mode_detail.go b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail.go new file mode 100644 index 000000000..6cbb38031 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodModeDetail +type AuthenticationMethodModeDetail struct { + Entity + // The authenticationMethod property + authenticationMethod *BaseAuthenticationMethod + // The display name of this mode + displayName *string +} +// NewAuthenticationMethodModeDetail instantiates a new AuthenticationMethodModeDetail and sets the default values. +func NewAuthenticationMethodModeDetail()(*AuthenticationMethodModeDetail) { + m := &AuthenticationMethodModeDetail{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodModeDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodModeDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodModeDetail(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. The authenticationMethod property +func (m *AuthenticationMethodModeDetail) GetAuthenticationMethod()(*BaseAuthenticationMethod) { + return m.authenticationMethod +} +// GetDisplayName gets the displayName property value. The display name of this mode +func (m *AuthenticationMethodModeDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodModeDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBaseAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*BaseAuthenticationMethod)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AuthenticationMethodModeDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. The authenticationMethod property +func (m *AuthenticationMethodModeDetail) SetAuthenticationMethod(value *BaseAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetDisplayName sets the displayName property value. The display name of this mode +func (m *AuthenticationMethodModeDetail) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_response.go new file mode 100644 index 000000000..72a06e79e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodModeDetailCollectionResponse +type AuthenticationMethodModeDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationMethodModeDetailable +} +// NewAuthenticationMethodModeDetailCollectionResponse instantiates a new AuthenticationMethodModeDetailCollectionResponse and sets the default values. +func NewAuthenticationMethodModeDetailCollectionResponse()(*AuthenticationMethodModeDetailCollectionResponse) { + m := &AuthenticationMethodModeDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationMethodModeDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodModeDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodModeDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodModeDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodModeDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodModeDetailable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodModeDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationMethodModeDetailCollectionResponse) GetValue()([]AuthenticationMethodModeDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationMethodModeDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationMethodModeDetailCollectionResponse) SetValue(value []AuthenticationMethodModeDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_responseable.go new file mode 100644 index 000000000..39365101b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodModeDetailCollectionResponseable +type AuthenticationMethodModeDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationMethodModeDetailable) + SetValue(value []AuthenticationMethodModeDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_mode_detailable.go b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detailable.go new file mode 100644 index 000000000..f9afd118b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_mode_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodModeDetailable +type AuthenticationMethodModeDetailable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*BaseAuthenticationMethod) + GetDisplayName()(*string) + SetAuthenticationMethod(value *BaseAuthenticationMethod)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_modes.go b/src/internal/connector/graph/betasdk/models/authentication_method_modes.go new file mode 100644 index 000000000..3f40fa879 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_modes.go @@ -0,0 +1,79 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodModes int + +const ( + PASSWORD_AUTHENTICATIONMETHODMODES AuthenticationMethodModes = iota + VOICE_AUTHENTICATIONMETHODMODES + HARDWAREOATH_AUTHENTICATIONMETHODMODES + SOFTWAREOATH_AUTHENTICATIONMETHODMODES + SMS_AUTHENTICATIONMETHODMODES + FIDO2_AUTHENTICATIONMETHODMODES + WINDOWSHELLOFORBUSINESS_AUTHENTICATIONMETHODMODES + MICROSOFTAUTHENTICATORPUSH_AUTHENTICATIONMETHODMODES + DEVICEBASEDPUSH_AUTHENTICATIONMETHODMODES + TEMPORARYACCESSPASSONETIME_AUTHENTICATIONMETHODMODES + TEMPORARYACCESSPASSMULTIUSE_AUTHENTICATIONMETHODMODES + EMAIL_AUTHENTICATIONMETHODMODES + X509CERTIFICATESINGLEFACTOR_AUTHENTICATIONMETHODMODES + X509CERTIFICATEMULTIFACTOR_AUTHENTICATIONMETHODMODES + FEDERATEDSINGLEFACTOR_AUTHENTICATIONMETHODMODES + FEDERATEDMULTIFACTOR_AUTHENTICATIONMETHODMODES + UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODMODES +) + +func (i AuthenticationMethodModes) String() string { + return []string{"password", "voice", "hardwareOath", "softwareOath", "sms", "fido2", "windowsHelloForBusiness", "microsoftAuthenticatorPush", "deviceBasedPush", "temporaryAccessPassOneTime", "temporaryAccessPassMultiUse", "email", "x509CertificateSingleFactor", "x509CertificateMultiFactor", "federatedSingleFactor", "federatedMultiFactor", "unknownFutureValue"}[i] +} +func ParseAuthenticationMethodModes(v string) (interface{}, error) { + result := PASSWORD_AUTHENTICATIONMETHODMODES + switch v { + case "password": + result = PASSWORD_AUTHENTICATIONMETHODMODES + case "voice": + result = VOICE_AUTHENTICATIONMETHODMODES + case "hardwareOath": + result = HARDWAREOATH_AUTHENTICATIONMETHODMODES + case "softwareOath": + result = SOFTWAREOATH_AUTHENTICATIONMETHODMODES + case "sms": + result = SMS_AUTHENTICATIONMETHODMODES + case "fido2": + result = FIDO2_AUTHENTICATIONMETHODMODES + case "windowsHelloForBusiness": + result = WINDOWSHELLOFORBUSINESS_AUTHENTICATIONMETHODMODES + case "microsoftAuthenticatorPush": + result = MICROSOFTAUTHENTICATORPUSH_AUTHENTICATIONMETHODMODES + case "deviceBasedPush": + result = DEVICEBASEDPUSH_AUTHENTICATIONMETHODMODES + case "temporaryAccessPassOneTime": + result = TEMPORARYACCESSPASSONETIME_AUTHENTICATIONMETHODMODES + case "temporaryAccessPassMultiUse": + result = TEMPORARYACCESSPASSMULTIUSE_AUTHENTICATIONMETHODMODES + case "email": + result = EMAIL_AUTHENTICATIONMETHODMODES + case "x509CertificateSingleFactor": + result = X509CERTIFICATESINGLEFACTOR_AUTHENTICATIONMETHODMODES + case "x509CertificateMultiFactor": + result = X509CERTIFICATEMULTIFACTOR_AUTHENTICATIONMETHODMODES + case "federatedSingleFactor": + result = FEDERATEDSINGLEFACTOR_AUTHENTICATIONMETHODMODES + case "federatedMultiFactor": + result = FEDERATEDMULTIFACTOR_AUTHENTICATIONMETHODMODES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODMODES + default: + return 0, errors.New("Unknown AuthenticationMethodModes value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodModes(values []AuthenticationMethodModes) []string { + 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/authentication_method_sign_in_state.go b/src/internal/connector/graph/betasdk/models/authentication_method_sign_in_state.go new file mode 100644 index 000000000..127eeba49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_sign_in_state.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodSignInState int + +const ( + NOTSUPPORTED_AUTHENTICATIONMETHODSIGNINSTATE AuthenticationMethodSignInState = iota + NOTALLOWEDBYPOLICY_AUTHENTICATIONMETHODSIGNINSTATE + NOTENABLED_AUTHENTICATIONMETHODSIGNINSTATE + PHONENUMBERNOTUNIQUE_AUTHENTICATIONMETHODSIGNINSTATE + READY_AUTHENTICATIONMETHODSIGNINSTATE + NOTCONFIGURED_AUTHENTICATIONMETHODSIGNINSTATE + UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODSIGNINSTATE +) + +func (i AuthenticationMethodSignInState) String() string { + return []string{"notSupported", "notAllowedByPolicy", "notEnabled", "phoneNumberNotUnique", "ready", "notConfigured", "unknownFutureValue"}[i] +} +func ParseAuthenticationMethodSignInState(v string) (interface{}, error) { + result := NOTSUPPORTED_AUTHENTICATIONMETHODSIGNINSTATE + switch v { + case "notSupported": + result = NOTSUPPORTED_AUTHENTICATIONMETHODSIGNINSTATE + case "notAllowedByPolicy": + result = NOTALLOWEDBYPOLICY_AUTHENTICATIONMETHODSIGNINSTATE + case "notEnabled": + result = NOTENABLED_AUTHENTICATIONMETHODSIGNINSTATE + case "phoneNumberNotUnique": + result = PHONENUMBERNOTUNIQUE_AUTHENTICATIONMETHODSIGNINSTATE + case "ready": + result = READY_AUTHENTICATIONMETHODSIGNINSTATE + case "notConfigured": + result = NOTCONFIGURED_AUTHENTICATIONMETHODSIGNINSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODSIGNINSTATE + default: + return 0, errors.New("Unknown AuthenticationMethodSignInState value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodSignInState(values []AuthenticationMethodSignInState) []string { + 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/authentication_method_state.go b/src/internal/connector/graph/betasdk/models/authentication_method_state.go new file mode 100644 index 000000000..c4cdb9264 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_state.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodState int + +const ( + ENABLED_AUTHENTICATIONMETHODSTATE AuthenticationMethodState = iota + DISABLED_AUTHENTICATIONMETHODSTATE +) + +func (i AuthenticationMethodState) String() string { + return []string{"enabled", "disabled"}[i] +} +func ParseAuthenticationMethodState(v string) (interface{}, error) { + result := ENABLED_AUTHENTICATIONMETHODSTATE + switch v { + case "enabled": + result = ENABLED_AUTHENTICATIONMETHODSTATE + case "disabled": + result = DISABLED_AUTHENTICATIONMETHODSTATE + default: + return 0, errors.New("Unknown AuthenticationMethodState value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodState(values []AuthenticationMethodState) []string { + 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/authentication_method_target.go b/src/internal/connector/graph/betasdk/models/authentication_method_target.go new file mode 100644 index 000000000..6cc2366e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_target.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodTarget provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodTarget struct { + Entity + // Determines if the user is enforced to register the authentication method. + isRegistrationRequired *bool + // The targetType property + targetType *AuthenticationMethodTargetType +} +// NewAuthenticationMethodTarget instantiates a new authenticationMethodTarget and sets the default values. +func NewAuthenticationMethodTarget()(*AuthenticationMethodTarget) { + m := &AuthenticationMethodTarget{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodTarget": + return NewMicrosoftAuthenticatorAuthenticationMethodTarget(), nil + case "#microsoft.graph.smsAuthenticationMethodTarget": + return NewSmsAuthenticationMethodTarget(), nil + case "#microsoft.graph.voiceAuthenticationMethodTarget": + return NewVoiceAuthenticationMethodTarget(), nil + } + } + } + } + return NewAuthenticationMethodTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isRegistrationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRegistrationRequired(val) + } + return nil + } + res["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodTargetType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*AuthenticationMethodTargetType)) + } + return nil + } + return res +} +// GetIsRegistrationRequired gets the isRegistrationRequired property value. Determines if the user is enforced to register the authentication method. +func (m *AuthenticationMethodTarget) GetIsRegistrationRequired()(*bool) { + return m.isRegistrationRequired +} +// GetTargetType gets the targetType property value. The targetType property +func (m *AuthenticationMethodTarget) GetTargetType()(*AuthenticationMethodTargetType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *AuthenticationMethodTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isRegistrationRequired", m.GetIsRegistrationRequired()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err = writer.WriteStringValue("targetType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIsRegistrationRequired sets the isRegistrationRequired property value. Determines if the user is enforced to register the authentication method. +func (m *AuthenticationMethodTarget) SetIsRegistrationRequired(value *bool)() { + m.isRegistrationRequired = value +} +// SetTargetType sets the targetType property value. The targetType property +func (m *AuthenticationMethodTarget) SetTargetType(value *AuthenticationMethodTargetType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_response.go new file mode 100644 index 000000000..3573b8297 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodTargetCollectionResponse +type AuthenticationMethodTargetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationMethodTargetable +} +// NewAuthenticationMethodTargetCollectionResponse instantiates a new AuthenticationMethodTargetCollectionResponse and sets the default values. +func NewAuthenticationMethodTargetCollectionResponse()(*AuthenticationMethodTargetCollectionResponse) { + m := &AuthenticationMethodTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationMethodTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodTargetable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationMethodTargetCollectionResponse) GetValue()([]AuthenticationMethodTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationMethodTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationMethodTargetCollectionResponse) SetValue(value []AuthenticationMethodTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_responseable.go new file mode 100644 index 000000000..2ac552060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_target_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodTargetCollectionResponseable +type AuthenticationMethodTargetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationMethodTargetable) + SetValue(value []AuthenticationMethodTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_method_target_type.go b/src/internal/connector/graph/betasdk/models/authentication_method_target_type.go new file mode 100644 index 000000000..bb3feff55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_target_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodTargetType int + +const ( + USER_AUTHENTICATIONMETHODTARGETTYPE AuthenticationMethodTargetType = iota + GROUP_AUTHENTICATIONMETHODTARGETTYPE + UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODTARGETTYPE +) + +func (i AuthenticationMethodTargetType) String() string { + return []string{"user", "group", "unknownFutureValue"}[i] +} +func ParseAuthenticationMethodTargetType(v string) (interface{}, error) { + result := USER_AUTHENTICATIONMETHODTARGETTYPE + switch v { + case "user": + result = USER_AUTHENTICATIONMETHODTARGETTYPE + case "group": + result = GROUP_AUTHENTICATIONMETHODTARGETTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODTARGETTYPE + default: + return 0, errors.New("Unknown AuthenticationMethodTargetType value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodTargetType(values []AuthenticationMethodTargetType) []string { + 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/authentication_method_targetable.go b/src/internal/connector/graph/betasdk/models/authentication_method_targetable.go new file mode 100644 index 000000000..0b8651051 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_method_targetable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodTargetable +type AuthenticationMethodTargetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRegistrationRequired()(*bool) + GetTargetType()(*AuthenticationMethodTargetType) + SetIsRegistrationRequired(value *bool)() + SetTargetType(value *AuthenticationMethodTargetType)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methodable.go b/src/internal/connector/graph/betasdk/models/authentication_methodable.go new file mode 100644 index 000000000..1e21059c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methodable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodable +type AuthenticationMethodable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_policy.go b/src/internal/connector/graph/betasdk/models/authentication_methods_policy.go new file mode 100644 index 000000000..8b6cff287 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_policy.go @@ -0,0 +1,252 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsPolicy +type AuthenticationMethodsPolicy struct { + Entity + // Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. + authenticationMethodConfigurations []AuthenticationMethodConfigurationable + // A description of the policy. + description *string + // The name of the policy. + displayName *string + // The date and time of the last update to the policy. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authenication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. + policyMigrationState *AuthenticationMethodsPolicyMigrationState + // The version of the policy in use. + policyVersion *string + // Days before the user will be asked to reconfirm their method. + reconfirmationInDays *int32 + // Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods. + registrationEnforcement RegistrationEnforcementable +} +// NewAuthenticationMethodsPolicy instantiates a new AuthenticationMethodsPolicy and sets the default values. +func NewAuthenticationMethodsPolicy()(*AuthenticationMethodsPolicy) { + m := &AuthenticationMethodsPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodsPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodsPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodsPolicy(), nil +} +// GetAuthenticationMethodConfigurations gets the authenticationMethodConfigurations property value. Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. +func (m *AuthenticationMethodsPolicy) GetAuthenticationMethodConfigurations()([]AuthenticationMethodConfigurationable) { + return m.authenticationMethodConfigurations +} +// GetDescription gets the description property value. A description of the policy. +func (m *AuthenticationMethodsPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of the policy. +func (m *AuthenticationMethodsPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodsPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationMethodConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodConfigurationable) + } + m.SetAuthenticationMethodConfigurations(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["policyMigrationState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodsPolicyMigrationState) + if err != nil { + return err + } + if val != nil { + m.SetPolicyMigrationState(val.(*AuthenticationMethodsPolicyMigrationState)) + } + return nil + } + res["policyVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyVersion(val) + } + return nil + } + res["reconfirmationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReconfirmationInDays(val) + } + return nil + } + res["registrationEnforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRegistrationEnforcementFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRegistrationEnforcement(val.(RegistrationEnforcementable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time of the last update to the policy. +func (m *AuthenticationMethodsPolicy) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPolicyMigrationState gets the policyMigrationState property value. The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authenication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. +func (m *AuthenticationMethodsPolicy) GetPolicyMigrationState()(*AuthenticationMethodsPolicyMigrationState) { + return m.policyMigrationState +} +// GetPolicyVersion gets the policyVersion property value. The version of the policy in use. +func (m *AuthenticationMethodsPolicy) GetPolicyVersion()(*string) { + return m.policyVersion +} +// GetReconfirmationInDays gets the reconfirmationInDays property value. Days before the user will be asked to reconfirm their method. +func (m *AuthenticationMethodsPolicy) GetReconfirmationInDays()(*int32) { + return m.reconfirmationInDays +} +// GetRegistrationEnforcement gets the registrationEnforcement property value. Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods. +func (m *AuthenticationMethodsPolicy) GetRegistrationEnforcement()(RegistrationEnforcementable) { + return m.registrationEnforcement +} +// Serialize serializes information the current object +func (m *AuthenticationMethodsPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethodConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuthenticationMethodConfigurations())) + for i, v := range m.GetAuthenticationMethodConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("authenticationMethodConfigurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPolicyMigrationState() != nil { + cast := (*m.GetPolicyMigrationState()).String() + err = writer.WriteStringValue("policyMigrationState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("policyVersion", m.GetPolicyVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("reconfirmationInDays", m.GetReconfirmationInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("registrationEnforcement", m.GetRegistrationEnforcement()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethodConfigurations sets the authenticationMethodConfigurations property value. Represents the settings for each authentication method. Automatically expanded on GET /policies/authenticationMethodsPolicy. +func (m *AuthenticationMethodsPolicy) SetAuthenticationMethodConfigurations(value []AuthenticationMethodConfigurationable)() { + m.authenticationMethodConfigurations = value +} +// SetDescription sets the description property value. A description of the policy. +func (m *AuthenticationMethodsPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of the policy. +func (m *AuthenticationMethodsPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time of the last update to the policy. +func (m *AuthenticationMethodsPolicy) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPolicyMigrationState sets the policyMigrationState property value. The state of migration of the authentication methods policy from the legacy multifactor authentication and self-service password reset (SSPR) policies. The possible values are: premigration - means the authentication methods policy is used for authentication only, legacy policies are respected. migrationInProgress - means the authentication methods policy is used for both authenication and SSPR, legacy policies are respected. migrationComplete - means the authentication methods policy is used for authentication and SSPR, legacy policies are ignored. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. +func (m *AuthenticationMethodsPolicy) SetPolicyMigrationState(value *AuthenticationMethodsPolicyMigrationState)() { + m.policyMigrationState = value +} +// SetPolicyVersion sets the policyVersion property value. The version of the policy in use. +func (m *AuthenticationMethodsPolicy) SetPolicyVersion(value *string)() { + m.policyVersion = value +} +// SetReconfirmationInDays sets the reconfirmationInDays property value. Days before the user will be asked to reconfirm their method. +func (m *AuthenticationMethodsPolicy) SetReconfirmationInDays(value *int32)() { + m.reconfirmationInDays = value +} +// SetRegistrationEnforcement sets the registrationEnforcement property value. Enforce registration at sign-in time. This property can be used to remind users to set up targeted authentication methods. +func (m *AuthenticationMethodsPolicy) SetRegistrationEnforcement(value RegistrationEnforcementable)() { + m.registrationEnforcement = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_policy_migration_state.go b/src/internal/connector/graph/betasdk/models/authentication_methods_policy_migration_state.go new file mode 100644 index 000000000..d00c8ad16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_policy_migration_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationMethodsPolicyMigrationState int + +const ( + PREMIGRATION_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE AuthenticationMethodsPolicyMigrationState = iota + MIGRATIONINPROGRESS_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + MIGRATIONCOMPLETE_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE +) + +func (i AuthenticationMethodsPolicyMigrationState) String() string { + return []string{"preMigration", "migrationInProgress", "migrationComplete", "unknownFutureValue"}[i] +} +func ParseAuthenticationMethodsPolicyMigrationState(v string) (interface{}, error) { + result := PREMIGRATION_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + switch v { + case "preMigration": + result = PREMIGRATION_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + case "migrationInProgress": + result = MIGRATIONINPROGRESS_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + case "migrationComplete": + result = MIGRATIONCOMPLETE_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONMETHODSPOLICYMIGRATIONSTATE + default: + return 0, errors.New("Unknown AuthenticationMethodsPolicyMigrationState value: " + v) + } + return &result, nil +} +func SerializeAuthenticationMethodsPolicyMigrationState(values []AuthenticationMethodsPolicyMigrationState) []string { + 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/authentication_methods_policyable.go b/src/internal/connector/graph/betasdk/models/authentication_methods_policyable.go new file mode 100644 index 000000000..0c157f8b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_policyable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsPolicyable +type AuthenticationMethodsPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethodConfigurations()([]AuthenticationMethodConfigurationable) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPolicyMigrationState()(*AuthenticationMethodsPolicyMigrationState) + GetPolicyVersion()(*string) + GetReconfirmationInDays()(*int32) + GetRegistrationEnforcement()(RegistrationEnforcementable) + SetAuthenticationMethodConfigurations(value []AuthenticationMethodConfigurationable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPolicyMigrationState(value *AuthenticationMethodsPolicyMigrationState)() + SetPolicyVersion(value *string)() + SetReconfirmationInDays(value *int32)() + SetRegistrationEnforcement(value RegistrationEnforcementable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign.go new file mode 100644 index 000000000..b875c87de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaign +type AuthenticationMethodsRegistrationCampaign struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Users and groups of users that are excluded from being prompted to set up the authentication method. + excludeTargets []ExcludeTargetable + // Users and groups of users that are prompted to set up the authentication method. + includeTargets []AuthenticationMethodsRegistrationCampaignIncludeTargetable + // The OdataType property + odataType *string + // Specifies the number of days that the user sees a prompt again if they select 'Not now' and snoozes the prompt. Minimum 0 days. Maximum: 14 days. If the value is '0' – The user is prompted during every MFA attempt. + snoozeDurationInDays *int32 + // The state property + state *AdvancedConfigState +} +// NewAuthenticationMethodsRegistrationCampaign instantiates a new authenticationMethodsRegistrationCampaign and sets the default values. +func NewAuthenticationMethodsRegistrationCampaign()(*AuthenticationMethodsRegistrationCampaign) { + m := &AuthenticationMethodsRegistrationCampaign{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationMethodsRegistrationCampaignFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodsRegistrationCampaignFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodsRegistrationCampaign(), 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 *AuthenticationMethodsRegistrationCampaign) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeTargets gets the excludeTargets property value. Users and groups of users that are excluded from being prompted to set up the authentication method. +func (m *AuthenticationMethodsRegistrationCampaign) GetExcludeTargets()([]ExcludeTargetable) { + return m.excludeTargets +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodsRegistrationCampaign) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExcludeTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExcludeTargetable, len(val)) + for i, v := range val { + res[i] = v.(ExcludeTargetable) + } + m.SetExcludeTargets(res) + } + return nil + } + res["includeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodsRegistrationCampaignIncludeTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodsRegistrationCampaignIncludeTargetable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodsRegistrationCampaignIncludeTargetable) + } + m.SetIncludeTargets(res) + } + 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["snoozeDurationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSnoozeDurationInDays(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdvancedConfigState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AdvancedConfigState)) + } + return nil + } + return res +} +// GetIncludeTargets gets the includeTargets property value. Users and groups of users that are prompted to set up the authentication method. +func (m *AuthenticationMethodsRegistrationCampaign) GetIncludeTargets()([]AuthenticationMethodsRegistrationCampaignIncludeTargetable) { + return m.includeTargets +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodsRegistrationCampaign) GetOdataType()(*string) { + return m.odataType +} +// GetSnoozeDurationInDays gets the snoozeDurationInDays property value. Specifies the number of days that the user sees a prompt again if they select 'Not now' and snoozes the prompt. Minimum 0 days. Maximum: 14 days. If the value is '0' – The user is prompted during every MFA attempt. +func (m *AuthenticationMethodsRegistrationCampaign) GetSnoozeDurationInDays()(*int32) { + return m.snoozeDurationInDays +} +// GetState gets the state property value. The state property +func (m *AuthenticationMethodsRegistrationCampaign) GetState()(*AdvancedConfigState) { + return m.state +} +// Serialize serializes information the current object +func (m *AuthenticationMethodsRegistrationCampaign) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExcludeTargets())) + for i, v := range m.GetExcludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("excludeTargets", cast) + if err != nil { + return err + } + } + if m.GetIncludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeTargets())) + for i, v := range m.GetIncludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("includeTargets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("snoozeDurationInDays", m.GetSnoozeDurationInDays()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *AuthenticationMethodsRegistrationCampaign) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeTargets sets the excludeTargets property value. Users and groups of users that are excluded from being prompted to set up the authentication method. +func (m *AuthenticationMethodsRegistrationCampaign) SetExcludeTargets(value []ExcludeTargetable)() { + m.excludeTargets = value +} +// SetIncludeTargets sets the includeTargets property value. Users and groups of users that are prompted to set up the authentication method. +func (m *AuthenticationMethodsRegistrationCampaign) SetIncludeTargets(value []AuthenticationMethodsRegistrationCampaignIncludeTargetable)() { + m.includeTargets = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodsRegistrationCampaign) SetOdataType(value *string)() { + m.odataType = value +} +// SetSnoozeDurationInDays sets the snoozeDurationInDays property value. Specifies the number of days that the user sees a prompt again if they select 'Not now' and snoozes the prompt. Minimum 0 days. Maximum: 14 days. If the value is '0' – The user is prompted during every MFA attempt. +func (m *AuthenticationMethodsRegistrationCampaign) SetSnoozeDurationInDays(value *int32)() { + m.snoozeDurationInDays = value +} +// SetState sets the state property value. The state property +func (m *AuthenticationMethodsRegistrationCampaign) SetState(value *AdvancedConfigState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target.go new file mode 100644 index 000000000..b69e45a4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaignIncludeTarget +type AuthenticationMethodsRegistrationCampaignIncludeTarget 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 object identifier of an Azure AD user or group. + id *string + // The OdataType property + odataType *string + // The authentication method that the user is prompted to register. The value must be microsoftAuthenticator. + targetedAuthenticationMethod *string + // The targetType property + targetType *AuthenticationMethodTargetType +} +// NewAuthenticationMethodsRegistrationCampaignIncludeTarget instantiates a new authenticationMethodsRegistrationCampaignIncludeTarget and sets the default values. +func NewAuthenticationMethodsRegistrationCampaignIncludeTarget()(*AuthenticationMethodsRegistrationCampaignIncludeTarget) { + m := &AuthenticationMethodsRegistrationCampaignIncludeTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationMethodsRegistrationCampaignIncludeTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodsRegistrationCampaignIncludeTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodsRegistrationCampaignIncludeTarget(), 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 *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["targetedAuthenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetedAuthenticationMethod(val) + } + return nil + } + res["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodTargetType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*AuthenticationMethodTargetType)) + } + return nil + } + return res +} +// GetId gets the id property value. The object identifier of an Azure AD user or group. +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetOdataType()(*string) { + return m.odataType +} +// GetTargetedAuthenticationMethod gets the targetedAuthenticationMethod property value. The authentication method that the user is prompted to register. The value must be microsoftAuthenticator. +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetTargetedAuthenticationMethod()(*string) { + return m.targetedAuthenticationMethod +} +// GetTargetType gets the targetType property value. The targetType property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) GetTargetType()(*AuthenticationMethodTargetType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("targetedAuthenticationMethod", m.GetTargetedAuthenticationMethod()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err := writer.WriteStringValue("targetType", &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 *AuthenticationMethodsRegistrationCampaignIncludeTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The object identifier of an Azure AD user or group. +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) SetOdataType(value *string)() { + m.odataType = value +} +// SetTargetedAuthenticationMethod sets the targetedAuthenticationMethod property value. The authentication method that the user is prompted to register. The value must be microsoftAuthenticator. +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) SetTargetedAuthenticationMethod(value *string)() { + m.targetedAuthenticationMethod = value +} +// SetTargetType sets the targetType property value. The targetType property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTarget) SetTargetType(value *AuthenticationMethodTargetType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_response.go new file mode 100644 index 000000000..0f948a063 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse +type AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationMethodsRegistrationCampaignIncludeTargetable +} +// NewAuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse instantiates a new AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse and sets the default values. +func NewAuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse()(*AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse) { + m := &AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodsRegistrationCampaignIncludeTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodsRegistrationCampaignIncludeTargetable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodsRegistrationCampaignIncludeTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse) GetValue()([]AuthenticationMethodsRegistrationCampaignIncludeTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponse) SetValue(value []AuthenticationMethodsRegistrationCampaignIncludeTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_responseable.go new file mode 100644 index 000000000..7431d2d44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_target_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponseable +type AuthenticationMethodsRegistrationCampaignIncludeTargetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationMethodsRegistrationCampaignIncludeTargetable) + SetValue(value []AuthenticationMethodsRegistrationCampaignIncludeTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_targetable.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_targetable.go new file mode 100644 index 000000000..122810154 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaign_include_targetable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaignIncludeTargetable +type AuthenticationMethodsRegistrationCampaignIncludeTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetOdataType()(*string) + GetTargetedAuthenticationMethod()(*string) + GetTargetType()(*AuthenticationMethodTargetType) + SetId(value *string)() + SetOdataType(value *string)() + SetTargetedAuthenticationMethod(value *string)() + SetTargetType(value *AuthenticationMethodTargetType)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaignable.go b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaignable.go new file mode 100644 index 000000000..67c141ac1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_registration_campaignable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRegistrationCampaignable +type AuthenticationMethodsRegistrationCampaignable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeTargets()([]ExcludeTargetable) + GetIncludeTargets()([]AuthenticationMethodsRegistrationCampaignIncludeTargetable) + GetOdataType()(*string) + GetSnoozeDurationInDays()(*int32) + GetState()(*AdvancedConfigState) + SetExcludeTargets(value []ExcludeTargetable)() + SetIncludeTargets(value []AuthenticationMethodsRegistrationCampaignIncludeTargetable)() + SetOdataType(value *string)() + SetSnoozeDurationInDays(value *int32)() + SetState(value *AdvancedConfigState)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_root.go b/src/internal/connector/graph/betasdk/models/authentication_methods_root.go new file mode 100644 index 000000000..b4d03edab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_root.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRoot +type AuthenticationMethodsRoot struct { + Entity + // Represents the state of a user's authentication methods, including which methods are registered and which features the user is registered and capable of (such as multi-factor authentication, self-service password reset, and passwordless authentication). + userRegistrationDetails []UserRegistrationDetailsable +} +// NewAuthenticationMethodsRoot instantiates a new AuthenticationMethodsRoot and sets the default values. +func NewAuthenticationMethodsRoot()(*AuthenticationMethodsRoot) { + m := &AuthenticationMethodsRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationMethodsRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationMethodsRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationMethodsRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationMethodsRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["userRegistrationDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserRegistrationDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserRegistrationDetailsable, len(val)) + for i, v := range val { + res[i] = v.(UserRegistrationDetailsable) + } + m.SetUserRegistrationDetails(res) + } + return nil + } + return res +} +// GetUserRegistrationDetails gets the userRegistrationDetails property value. Represents the state of a user's authentication methods, including which methods are registered and which features the user is registered and capable of (such as multi-factor authentication, self-service password reset, and passwordless authentication). +func (m *AuthenticationMethodsRoot) GetUserRegistrationDetails()([]UserRegistrationDetailsable) { + return m.userRegistrationDetails +} +// Serialize serializes information the current object +func (m *AuthenticationMethodsRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetUserRegistrationDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRegistrationDetails())) + for i, v := range m.GetUserRegistrationDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userRegistrationDetails", cast) + if err != nil { + return err + } + } + return nil +} +// SetUserRegistrationDetails sets the userRegistrationDetails property value. Represents the state of a user's authentication methods, including which methods are registered and which features the user is registered and capable of (such as multi-factor authentication, self-service password reset, and passwordless authentication). +func (m *AuthenticationMethodsRoot) SetUserRegistrationDetails(value []UserRegistrationDetailsable)() { + m.userRegistrationDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_methods_rootable.go b/src/internal/connector/graph/betasdk/models/authentication_methods_rootable.go new file mode 100644 index 000000000..09653f821 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_methods_rootable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationMethodsRootable +type AuthenticationMethodsRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserRegistrationDetails()([]UserRegistrationDetailsable) + SetUserRegistrationDetails(value []UserRegistrationDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_phone_type.go b/src/internal/connector/graph/betasdk/models/authentication_phone_type.go new file mode 100644 index 000000000..fa69ebfcb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_phone_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationPhoneType int + +const ( + MOBILE_AUTHENTICATIONPHONETYPE AuthenticationPhoneType = iota + ALTERNATEMOBILE_AUTHENTICATIONPHONETYPE + OFFICE_AUTHENTICATIONPHONETYPE + UNKNOWNFUTUREVALUE_AUTHENTICATIONPHONETYPE +) + +func (i AuthenticationPhoneType) String() string { + return []string{"mobile", "alternateMobile", "office", "unknownFutureValue"}[i] +} +func ParseAuthenticationPhoneType(v string) (interface{}, error) { + result := MOBILE_AUTHENTICATIONPHONETYPE + switch v { + case "mobile": + result = MOBILE_AUTHENTICATIONPHONETYPE + case "alternateMobile": + result = ALTERNATEMOBILE_AUTHENTICATIONPHONETYPE + case "office": + result = OFFICE_AUTHENTICATIONPHONETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONPHONETYPE + default: + return 0, errors.New("Unknown AuthenticationPhoneType value: " + v) + } + return &result, nil +} +func SerializeAuthenticationPhoneType(values []AuthenticationPhoneType) []string { + 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/authentication_protocol.go b/src/internal/connector/graph/betasdk/models/authentication_protocol.go new file mode 100644 index 000000000..46792af07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_protocol.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationProtocol int + +const ( + WSFED_AUTHENTICATIONPROTOCOL AuthenticationProtocol = iota + SAML_AUTHENTICATIONPROTOCOL + UNKNOWNFUTUREVALUE_AUTHENTICATIONPROTOCOL +) + +func (i AuthenticationProtocol) String() string { + return []string{"wsFed", "saml", "unknownFutureValue"}[i] +} +func ParseAuthenticationProtocol(v string) (interface{}, error) { + result := WSFED_AUTHENTICATIONPROTOCOL + switch v { + case "wsFed": + result = WSFED_AUTHENTICATIONPROTOCOL + case "saml": + result = SAML_AUTHENTICATIONPROTOCOL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONPROTOCOL + default: + return 0, errors.New("Unknown AuthenticationProtocol value: " + v) + } + return &result, nil +} +func SerializeAuthenticationProtocol(values []AuthenticationProtocol) []string { + 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/authentication_requirement_policy.go b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy.go new file mode 100644 index 000000000..98428d15a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationRequirementPolicy +type AuthenticationRequirementPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Provides additional detail on the feature identified in requirementProvider. + detail *string + // The OdataType property + odataType *string + // Identifies what Azure AD feature requires MFA in this policy. Possible values are: user, request, servicePrincipal, v1ConditionalAccess, multiConditionalAccess, tenantSessionRiskPolicy, accountCompromisePolicies, v1ConditionalAccessDependency, v1ConditionalAccessPolicyIdRequested, mfaRegistrationRequiredByIdentityProtectionPolicy, baselineProtection, mfaRegistrationRequiredByBaselineProtection, mfaRegistrationRequiredByMultiConditionalAccess, enforcedForCspAdmins, securityDefaults, mfaRegistrationRequiredBySecurityDefaults, proofUpCodeRequest, crossTenantOutboundRule, gpsLocationCondition, riskBasedPolicy, unknownFutureValue. + requirementProvider *RequirementProvider +} +// NewAuthenticationRequirementPolicy instantiates a new authenticationRequirementPolicy and sets the default values. +func NewAuthenticationRequirementPolicy()(*AuthenticationRequirementPolicy) { + m := &AuthenticationRequirementPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationRequirementPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationRequirementPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationRequirementPolicy(), 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 *AuthenticationRequirementPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetail gets the detail property value. Provides additional detail on the feature identified in requirementProvider. +func (m *AuthenticationRequirementPolicy) GetDetail()(*string) { + return m.detail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationRequirementPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(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["requirementProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequirementProvider) + if err != nil { + return err + } + if val != nil { + m.SetRequirementProvider(val.(*RequirementProvider)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationRequirementPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetRequirementProvider gets the requirementProvider property value. Identifies what Azure AD feature requires MFA in this policy. Possible values are: user, request, servicePrincipal, v1ConditionalAccess, multiConditionalAccess, tenantSessionRiskPolicy, accountCompromisePolicies, v1ConditionalAccessDependency, v1ConditionalAccessPolicyIdRequested, mfaRegistrationRequiredByIdentityProtectionPolicy, baselineProtection, mfaRegistrationRequiredByBaselineProtection, mfaRegistrationRequiredByMultiConditionalAccess, enforcedForCspAdmins, securityDefaults, mfaRegistrationRequiredBySecurityDefaults, proofUpCodeRequest, crossTenantOutboundRule, gpsLocationCondition, riskBasedPolicy, unknownFutureValue. +func (m *AuthenticationRequirementPolicy) GetRequirementProvider()(*RequirementProvider) { + return m.requirementProvider +} +// Serialize serializes information the current object +func (m *AuthenticationRequirementPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRequirementProvider() != nil { + cast := (*m.GetRequirementProvider()).String() + err := writer.WriteStringValue("requirementProvider", &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 *AuthenticationRequirementPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetail sets the detail property value. Provides additional detail on the feature identified in requirementProvider. +func (m *AuthenticationRequirementPolicy) SetDetail(value *string)() { + m.detail = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationRequirementPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRequirementProvider sets the requirementProvider property value. Identifies what Azure AD feature requires MFA in this policy. Possible values are: user, request, servicePrincipal, v1ConditionalAccess, multiConditionalAccess, tenantSessionRiskPolicy, accountCompromisePolicies, v1ConditionalAccessDependency, v1ConditionalAccessPolicyIdRequested, mfaRegistrationRequiredByIdentityProtectionPolicy, baselineProtection, mfaRegistrationRequiredByBaselineProtection, mfaRegistrationRequiredByMultiConditionalAccess, enforcedForCspAdmins, securityDefaults, mfaRegistrationRequiredBySecurityDefaults, proofUpCodeRequest, crossTenantOutboundRule, gpsLocationCondition, riskBasedPolicy, unknownFutureValue. +func (m *AuthenticationRequirementPolicy) SetRequirementProvider(value *RequirementProvider)() { + m.requirementProvider = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_response.go new file mode 100644 index 000000000..ff3d5a310 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationRequirementPolicyCollectionResponse +type AuthenticationRequirementPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationRequirementPolicyable +} +// NewAuthenticationRequirementPolicyCollectionResponse instantiates a new AuthenticationRequirementPolicyCollectionResponse and sets the default values. +func NewAuthenticationRequirementPolicyCollectionResponse()(*AuthenticationRequirementPolicyCollectionResponse) { + m := &AuthenticationRequirementPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationRequirementPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationRequirementPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationRequirementPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationRequirementPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationRequirementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationRequirementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationRequirementPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationRequirementPolicyCollectionResponse) GetValue()([]AuthenticationRequirementPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationRequirementPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationRequirementPolicyCollectionResponse) SetValue(value []AuthenticationRequirementPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_responseable.go new file mode 100644 index 000000000..8e90ff64c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_requirement_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationRequirementPolicyCollectionResponseable +type AuthenticationRequirementPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationRequirementPolicyable) + SetValue(value []AuthenticationRequirementPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_requirement_policyable.go b/src/internal/connector/graph/betasdk/models/authentication_requirement_policyable.go new file mode 100644 index 000000000..2f07b996d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_requirement_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationRequirementPolicyable +type AuthenticationRequirementPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*string) + GetOdataType()(*string) + GetRequirementProvider()(*RequirementProvider) + SetDetail(value *string)() + SetOdataType(value *string)() + SetRequirementProvider(value *RequirementProvider)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_source_filter.go b/src/internal/connector/graph/betasdk/models/authentication_source_filter.go new file mode 100644 index 000000000..767211e46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_source_filter.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationSourceFilter +type AuthenticationSourceFilter struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Applications to include for evaluation of the authenticationListener. These applications trigger the associated action when used as the client application in the authentication flow. The application identifer is the application's client id. + includeApplications []string + // The OdataType property + odataType *string +} +// NewAuthenticationSourceFilter instantiates a new authenticationSourceFilter and sets the default values. +func NewAuthenticationSourceFilter()(*AuthenticationSourceFilter) { + m := &AuthenticationSourceFilter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationSourceFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationSourceFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationSourceFilter(), 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 *AuthenticationSourceFilter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationSourceFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["includeApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeApplications(res) + } + 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 + } + return res +} +// GetIncludeApplications gets the includeApplications property value. Applications to include for evaluation of the authenticationListener. These applications trigger the associated action when used as the client application in the authentication flow. The application identifer is the application's client id. +func (m *AuthenticationSourceFilter) GetIncludeApplications()([]string) { + return m.includeApplications +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationSourceFilter) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationSourceFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIncludeApplications() != nil { + err := writer.WriteCollectionOfStringValues("includeApplications", m.GetIncludeApplications()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationSourceFilter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIncludeApplications sets the includeApplications property value. Applications to include for evaluation of the authenticationListener. These applications trigger the associated action when used as the client application in the authentication flow. The application identifer is the application's client id. +func (m *AuthenticationSourceFilter) SetIncludeApplications(value []string)() { + m.includeApplications = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationSourceFilter) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_source_filterable.go b/src/internal/connector/graph/betasdk/models/authentication_source_filterable.go new file mode 100644 index 000000000..9c095b8d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_source_filterable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationSourceFilterable +type AuthenticationSourceFilterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeApplications()([]string) + GetOdataType()(*string) + SetIncludeApplications(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength.go b/src/internal/connector/graph/betasdk/models/authentication_strength.go new file mode 100644 index 000000000..3e0be36b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrength +type AuthenticationStrength struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifier of the authentication strength. + authenticationStrengthId *string + // The name of the authentication strength. + displayName *string + // The OdataType property + odataType *string +} +// NewAuthenticationStrength instantiates a new authenticationStrength and sets the default values. +func NewAuthenticationStrength()(*AuthenticationStrength) { + m := &AuthenticationStrength{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthenticationStrengthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationStrengthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationStrength(), 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 *AuthenticationStrength) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationStrengthId gets the authenticationStrengthId property value. Identifier of the authentication strength. +func (m *AuthenticationStrength) GetAuthenticationStrengthId()(*string) { + return m.authenticationStrengthId +} +// GetDisplayName gets the displayName property value. The name of the authentication strength. +func (m *AuthenticationStrength) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationStrength) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationStrengthId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStrengthId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthenticationStrength) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthenticationStrength) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("authenticationStrengthId", m.GetAuthenticationStrengthId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthenticationStrength) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationStrengthId sets the authenticationStrengthId property value. Identifier of the authentication strength. +func (m *AuthenticationStrength) SetAuthenticationStrengthId(value *string)() { + m.authenticationStrengthId = value +} +// SetDisplayName sets the displayName property value. The name of the authentication strength. +func (m *AuthenticationStrength) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthenticationStrength) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_policy.go b/src/internal/connector/graph/betasdk/models/authentication_strength_policy.go new file mode 100644 index 000000000..ec94d8d2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_policy.go @@ -0,0 +1,257 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthPolicy +type AuthenticationStrengthPolicy struct { + Entity + // A collection of authentication method modes that are required be used to satify this authentication strength. + allowedCombinations []AuthenticationMethodModes + // Settings that may be used to require specific types or instances of an authentication method to be used when authenticating with a specified combination of authentication methods. + combinationConfigurations []AuthenticationCombinationConfigurationable + // The datetime when this policy was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The human-readable description of this policy. + description *string + // The human-readable display name of this policy. Supports $filter (eq, ne, not , and in). + displayName *string + // The datetime when this policy was last modified. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The policyType property + policyType *AuthenticationStrengthPolicyType + // The requirementsSatisfied property + requirementsSatisfied *AuthenticationStrengthRequirements +} +// NewAuthenticationStrengthPolicy instantiates a new AuthenticationStrengthPolicy and sets the default values. +func NewAuthenticationStrengthPolicy()(*AuthenticationStrengthPolicy) { + m := &AuthenticationStrengthPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationStrengthPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationStrengthPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationStrengthPolicy(), nil +} +// GetAllowedCombinations gets the allowedCombinations property value. A collection of authentication method modes that are required be used to satify this authentication strength. +func (m *AuthenticationStrengthPolicy) GetAllowedCombinations()([]AuthenticationMethodModes) { + return m.allowedCombinations +} +// GetCombinationConfigurations gets the combinationConfigurations property value. Settings that may be used to require specific types or instances of an authentication method to be used when authenticating with a specified combination of authentication methods. +func (m *AuthenticationStrengthPolicy) GetCombinationConfigurations()([]AuthenticationCombinationConfigurationable) { + return m.combinationConfigurations +} +// GetCreatedDateTime gets the createdDateTime property value. The datetime when this policy was created. +func (m *AuthenticationStrengthPolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The human-readable description of this policy. +func (m *AuthenticationStrengthPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The human-readable display name of this policy. Supports $filter (eq, ne, not , and in). +func (m *AuthenticationStrengthPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationStrengthPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedCombinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAuthenticationMethodModes) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodModes, len(val)) + for i, v := range val { + res[i] = *(v.(*AuthenticationMethodModes)) + } + m.SetAllowedCombinations(res) + } + return nil + } + res["combinationConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationCombinationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationCombinationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationCombinationConfigurationable) + } + m.SetCombinationConfigurations(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["policyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationStrengthPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyType(val.(*AuthenticationStrengthPolicyType)) + } + return nil + } + res["requirementsSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationStrengthRequirements) + if err != nil { + return err + } + if val != nil { + m.SetRequirementsSatisfied(val.(*AuthenticationStrengthRequirements)) + } + return nil + } + return res +} +// GetModifiedDateTime gets the modifiedDateTime property value. The datetime when this policy was last modified. +func (m *AuthenticationStrengthPolicy) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetPolicyType gets the policyType property value. The policyType property +func (m *AuthenticationStrengthPolicy) GetPolicyType()(*AuthenticationStrengthPolicyType) { + return m.policyType +} +// GetRequirementsSatisfied gets the requirementsSatisfied property value. The requirementsSatisfied property +func (m *AuthenticationStrengthPolicy) GetRequirementsSatisfied()(*AuthenticationStrengthRequirements) { + return m.requirementsSatisfied +} +// Serialize serializes information the current object +func (m *AuthenticationStrengthPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedCombinations() != nil { + err = writer.WriteCollectionOfStringValues("allowedCombinations", SerializeAuthenticationMethodModes(m.GetAllowedCombinations())) + if err != nil { + return err + } + } + if m.GetCombinationConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCombinationConfigurations())) + for i, v := range m.GetCombinationConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("combinationConfigurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPolicyType() != nil { + cast := (*m.GetPolicyType()).String() + err = writer.WriteStringValue("policyType", &cast) + if err != nil { + return err + } + } + if m.GetRequirementsSatisfied() != nil { + cast := (*m.GetRequirementsSatisfied()).String() + err = writer.WriteStringValue("requirementsSatisfied", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowedCombinations sets the allowedCombinations property value. A collection of authentication method modes that are required be used to satify this authentication strength. +func (m *AuthenticationStrengthPolicy) SetAllowedCombinations(value []AuthenticationMethodModes)() { + m.allowedCombinations = value +} +// SetCombinationConfigurations sets the combinationConfigurations property value. Settings that may be used to require specific types or instances of an authentication method to be used when authenticating with a specified combination of authentication methods. +func (m *AuthenticationStrengthPolicy) SetCombinationConfigurations(value []AuthenticationCombinationConfigurationable)() { + m.combinationConfigurations = value +} +// SetCreatedDateTime sets the createdDateTime property value. The datetime when this policy was created. +func (m *AuthenticationStrengthPolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The human-readable description of this policy. +func (m *AuthenticationStrengthPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The human-readable display name of this policy. Supports $filter (eq, ne, not , and in). +func (m *AuthenticationStrengthPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The datetime when this policy was last modified. +func (m *AuthenticationStrengthPolicy) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetPolicyType sets the policyType property value. The policyType property +func (m *AuthenticationStrengthPolicy) SetPolicyType(value *AuthenticationStrengthPolicyType)() { + m.policyType = value +} +// SetRequirementsSatisfied sets the requirementsSatisfied property value. The requirementsSatisfied property +func (m *AuthenticationStrengthPolicy) SetRequirementsSatisfied(value *AuthenticationStrengthRequirements)() { + m.requirementsSatisfied = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_response.go new file mode 100644 index 000000000..5d97e2b52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthPolicyCollectionResponse +type AuthenticationStrengthPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthenticationStrengthPolicyable +} +// NewAuthenticationStrengthPolicyCollectionResponse instantiates a new AuthenticationStrengthPolicyCollectionResponse and sets the default values. +func NewAuthenticationStrengthPolicyCollectionResponse()(*AuthenticationStrengthPolicyCollectionResponse) { + m := &AuthenticationStrengthPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthenticationStrengthPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationStrengthPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationStrengthPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationStrengthPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationStrengthPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationStrengthPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationStrengthPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthenticationStrengthPolicyCollectionResponse) GetValue()([]AuthenticationStrengthPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthenticationStrengthPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthenticationStrengthPolicyCollectionResponse) SetValue(value []AuthenticationStrengthPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_responseable.go new file mode 100644 index 000000000..3b9cf18a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthPolicyCollectionResponseable +type AuthenticationStrengthPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthenticationStrengthPolicyable) + SetValue(value []AuthenticationStrengthPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_policy_type.go b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_type.go new file mode 100644 index 000000000..d4a208244 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_policy_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationStrengthPolicyType int + +const ( + BUILTIN_AUTHENTICATIONSTRENGTHPOLICYTYPE AuthenticationStrengthPolicyType = iota + CUSTOM_AUTHENTICATIONSTRENGTHPOLICYTYPE + UNKNOWNFUTUREVALUE_AUTHENTICATIONSTRENGTHPOLICYTYPE +) + +func (i AuthenticationStrengthPolicyType) String() string { + return []string{"builtIn", "custom", "unknownFutureValue"}[i] +} +func ParseAuthenticationStrengthPolicyType(v string) (interface{}, error) { + result := BUILTIN_AUTHENTICATIONSTRENGTHPOLICYTYPE + switch v { + case "builtIn": + result = BUILTIN_AUTHENTICATIONSTRENGTHPOLICYTYPE + case "custom": + result = CUSTOM_AUTHENTICATIONSTRENGTHPOLICYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONSTRENGTHPOLICYTYPE + default: + return 0, errors.New("Unknown AuthenticationStrengthPolicyType value: " + v) + } + return &result, nil +} +func SerializeAuthenticationStrengthPolicyType(values []AuthenticationStrengthPolicyType) []string { + 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/authentication_strength_policyable.go b/src/internal/connector/graph/betasdk/models/authentication_strength_policyable.go new file mode 100644 index 000000000..14252a706 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_policyable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthPolicyable +type AuthenticationStrengthPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedCombinations()([]AuthenticationMethodModes) + GetCombinationConfigurations()([]AuthenticationCombinationConfigurationable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPolicyType()(*AuthenticationStrengthPolicyType) + GetRequirementsSatisfied()(*AuthenticationStrengthRequirements) + SetAllowedCombinations(value []AuthenticationMethodModes)() + SetCombinationConfigurations(value []AuthenticationCombinationConfigurationable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPolicyType(value *AuthenticationStrengthPolicyType)() + SetRequirementsSatisfied(value *AuthenticationStrengthRequirements)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_requirements.go b/src/internal/connector/graph/betasdk/models/authentication_strength_requirements.go new file mode 100644 index 000000000..0f1529d6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_requirements.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationStrengthRequirements int + +const ( + NONE_AUTHENTICATIONSTRENGTHREQUIREMENTS AuthenticationStrengthRequirements = iota + MFA_AUTHENTICATIONSTRENGTHREQUIREMENTS + UNKNOWNFUTUREVALUE_AUTHENTICATIONSTRENGTHREQUIREMENTS +) + +func (i AuthenticationStrengthRequirements) String() string { + return []string{"none", "mfa", "unknownFutureValue"}[i] +} +func ParseAuthenticationStrengthRequirements(v string) (interface{}, error) { + result := NONE_AUTHENTICATIONSTRENGTHREQUIREMENTS + switch v { + case "none": + result = NONE_AUTHENTICATIONSTRENGTHREQUIREMENTS + case "mfa": + result = MFA_AUTHENTICATIONSTRENGTHREQUIREMENTS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTHENTICATIONSTRENGTHREQUIREMENTS + default: + return 0, errors.New("Unknown AuthenticationStrengthRequirements value: " + v) + } + return &result, nil +} +func SerializeAuthenticationStrengthRequirements(values []AuthenticationStrengthRequirements) []string { + 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/authentication_strength_root.go b/src/internal/connector/graph/betasdk/models/authentication_strength_root.go new file mode 100644 index 000000000..2888b4239 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_root.go @@ -0,0 +1,132 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthRoot +type AuthenticationStrengthRoot struct { + Entity + // A collection of all valid authentication method combinations in the system. + authenticationCombinations []AuthenticationMethodModes + // Names and descriptions of all valid authentication method modes in the system. + authenticationMethodModes []AuthenticationMethodModeDetailable + // A collection of authentication strength policies that exist for this tenant, including both built-in and custom policies. + policies []AuthenticationStrengthPolicyable +} +// NewAuthenticationStrengthRoot instantiates a new AuthenticationStrengthRoot and sets the default values. +func NewAuthenticationStrengthRoot()(*AuthenticationStrengthRoot) { + m := &AuthenticationStrengthRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthenticationStrengthRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthenticationStrengthRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthenticationStrengthRoot(), nil +} +// GetAuthenticationCombinations gets the authenticationCombinations property value. A collection of all valid authentication method combinations in the system. +func (m *AuthenticationStrengthRoot) GetAuthenticationCombinations()([]AuthenticationMethodModes) { + return m.authenticationCombinations +} +// GetAuthenticationMethodModes gets the authenticationMethodModes property value. Names and descriptions of all valid authentication method modes in the system. +func (m *AuthenticationStrengthRoot) GetAuthenticationMethodModes()([]AuthenticationMethodModeDetailable) { + return m.authenticationMethodModes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthenticationStrengthRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationCombinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAuthenticationMethodModes) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodModes, len(val)) + for i, v := range val { + res[i] = *(v.(*AuthenticationMethodModes)) + } + m.SetAuthenticationCombinations(res) + } + return nil + } + res["authenticationMethodModes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodModeDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodModeDetailable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodModeDetailable) + } + m.SetAuthenticationMethodModes(res) + } + return nil + } + res["policies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationStrengthPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationStrengthPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationStrengthPolicyable) + } + m.SetPolicies(res) + } + return nil + } + return res +} +// GetPolicies gets the policies property value. A collection of authentication strength policies that exist for this tenant, including both built-in and custom policies. +func (m *AuthenticationStrengthRoot) GetPolicies()([]AuthenticationStrengthPolicyable) { + return m.policies +} +// Serialize serializes information the current object +func (m *AuthenticationStrengthRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationCombinations() != nil { + err = writer.WriteCollectionOfStringValues("authenticationCombinations", SerializeAuthenticationMethodModes(m.GetAuthenticationCombinations())) + if err != nil { + return err + } + } + if m.GetAuthenticationMethodModes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuthenticationMethodModes())) + for i, v := range m.GetAuthenticationMethodModes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("authenticationMethodModes", cast) + if err != nil { + return err + } + } + if m.GetPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicies())) + for i, v := range m.GetPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policies", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationCombinations sets the authenticationCombinations property value. A collection of all valid authentication method combinations in the system. +func (m *AuthenticationStrengthRoot) SetAuthenticationCombinations(value []AuthenticationMethodModes)() { + m.authenticationCombinations = value +} +// SetAuthenticationMethodModes sets the authenticationMethodModes property value. Names and descriptions of all valid authentication method modes in the system. +func (m *AuthenticationStrengthRoot) SetAuthenticationMethodModes(value []AuthenticationMethodModeDetailable)() { + m.authenticationMethodModes = value +} +// SetPolicies sets the policies property value. A collection of authentication strength policies that exist for this tenant, including both built-in and custom policies. +func (m *AuthenticationStrengthRoot) SetPolicies(value []AuthenticationStrengthPolicyable)() { + m.policies = value +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strength_rootable.go b/src/internal/connector/graph/betasdk/models/authentication_strength_rootable.go new file mode 100644 index 000000000..bd646fb6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strength_rootable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthRootable +type AuthenticationStrengthRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationCombinations()([]AuthenticationMethodModes) + GetAuthenticationMethodModes()([]AuthenticationMethodModeDetailable) + GetPolicies()([]AuthenticationStrengthPolicyable) + SetAuthenticationCombinations(value []AuthenticationMethodModes)() + SetAuthenticationMethodModes(value []AuthenticationMethodModeDetailable)() + SetPolicies(value []AuthenticationStrengthPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_strengthable.go b/src/internal/connector/graph/betasdk/models/authentication_strengthable.go new file mode 100644 index 000000000..4b6e4b54b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_strengthable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthenticationStrengthable +type AuthenticationStrengthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationStrengthId()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + SetAuthenticationStrengthId(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authentication_transform_constant.go b/src/internal/connector/graph/betasdk/models/authentication_transform_constant.go new file mode 100644 index 000000000..4ff0ef3b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authentication_transform_constant.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuthenticationTransformConstant int + +const ( + // MD596 + MD5_96_AUTHENTICATIONTRANSFORMCONSTANT AuthenticationTransformConstant = iota + // SHA196 + SHA1_96_AUTHENTICATIONTRANSFORMCONSTANT + // SHA256128 + SHA_256_128_AUTHENTICATIONTRANSFORMCONSTANT + // GCMAES128 + AES128GCM_AUTHENTICATIONTRANSFORMCONSTANT + // GCMAES192 + AES192GCM_AUTHENTICATIONTRANSFORMCONSTANT + // GCMAES256 + AES256GCM_AUTHENTICATIONTRANSFORMCONSTANT +) + +func (i AuthenticationTransformConstant) String() string { + return []string{"md5_96", "sha1_96", "sha_256_128", "aes128Gcm", "aes192Gcm", "aes256Gcm"}[i] +} +func ParseAuthenticationTransformConstant(v string) (interface{}, error) { + result := MD5_96_AUTHENTICATIONTRANSFORMCONSTANT + switch v { + case "md5_96": + result = MD5_96_AUTHENTICATIONTRANSFORMCONSTANT + case "sha1_96": + result = SHA1_96_AUTHENTICATIONTRANSFORMCONSTANT + case "sha_256_128": + result = SHA_256_128_AUTHENTICATIONTRANSFORMCONSTANT + case "aes128Gcm": + result = AES128GCM_AUTHENTICATIONTRANSFORMCONSTANT + case "aes192Gcm": + result = AES192GCM_AUTHENTICATIONTRANSFORMCONSTANT + case "aes256Gcm": + result = AES256GCM_AUTHENTICATIONTRANSFORMCONSTANT + default: + return 0, errors.New("Unknown AuthenticationTransformConstant value: " + v) + } + return &result, nil +} +func SerializeAuthenticationTransformConstant(values []AuthenticationTransformConstant) []string { + 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/authenticationable.go b/src/internal/connector/graph/betasdk/models/authenticationable.go new file mode 100644 index 000000000..a61d242cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authenticationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Authenticationable +type Authenticationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailMethods()([]EmailAuthenticationMethodable) + GetFido2Methods()([]Fido2AuthenticationMethodable) + GetMethods()([]AuthenticationMethodable) + GetMicrosoftAuthenticatorMethods()([]MicrosoftAuthenticatorAuthenticationMethodable) + GetOperations()([]LongRunningOperationable) + GetPasswordlessMicrosoftAuthenticatorMethods()([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) + GetPasswordMethods()([]PasswordAuthenticationMethodable) + GetPhoneMethods()([]PhoneAuthenticationMethodable) + GetSoftwareOathMethods()([]SoftwareOathAuthenticationMethodable) + GetTemporaryAccessPassMethods()([]TemporaryAccessPassAuthenticationMethodable) + GetWindowsHelloForBusinessMethods()([]WindowsHelloForBusinessAuthenticationMethodable) + SetEmailMethods(value []EmailAuthenticationMethodable)() + SetFido2Methods(value []Fido2AuthenticationMethodable)() + SetMethods(value []AuthenticationMethodable)() + SetMicrosoftAuthenticatorMethods(value []MicrosoftAuthenticatorAuthenticationMethodable)() + SetOperations(value []LongRunningOperationable)() + SetPasswordlessMicrosoftAuthenticatorMethods(value []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable)() + SetPasswordMethods(value []PasswordAuthenticationMethodable)() + SetPhoneMethods(value []PhoneAuthenticationMethodable)() + SetSoftwareOathMethods(value []SoftwareOathAuthenticationMethodable)() + SetTemporaryAccessPassMethods(value []TemporaryAccessPassAuthenticationMethodable)() + SetWindowsHelloForBusinessMethods(value []WindowsHelloForBusinessAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authored_note.go b/src/internal/connector/graph/betasdk/models/authored_note.go new file mode 100644 index 000000000..972a68184 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authored_note.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthoredNote +type AuthoredNote struct { + Entity + // Identity information about the note's author. + author Identityable + // The content of the note. + content ItemBodyable + // The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewAuthoredNote instantiates a new AuthoredNote and sets the default values. +func NewAuthoredNote()(*AuthoredNote) { + m := &AuthoredNote{ + Entity: *NewEntity(), + } + return m +} +// CreateAuthoredNoteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthoredNoteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthoredNote(), nil +} +// GetAuthor gets the author property value. Identity information about the note's author. +func (m *AuthoredNote) GetAuthor()(Identityable) { + return m.author +} +// GetContent gets the content property value. The content of the note. +func (m *AuthoredNote) GetContent()(ItemBodyable) { + return m.content +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AuthoredNote) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthoredNote) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthor(val.(Identityable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(ItemBodyable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AuthoredNote) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAuthor sets the author property value. Identity information about the note's author. +func (m *AuthoredNote) SetAuthor(value Identityable)() { + m.author = value +} +// SetContent sets the content property value. The content of the note. +func (m *AuthoredNote) SetContent(value ItemBodyable)() { + m.content = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AuthoredNote) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/authored_note_collection_response.go b/src/internal/connector/graph/betasdk/models/authored_note_collection_response.go new file mode 100644 index 000000000..9c09a4060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authored_note_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthoredNoteCollectionResponse +type AuthoredNoteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthoredNoteable +} +// NewAuthoredNoteCollectionResponse instantiates a new AuthoredNoteCollectionResponse and sets the default values. +func NewAuthoredNoteCollectionResponse()(*AuthoredNoteCollectionResponse) { + m := &AuthoredNoteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthoredNoteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthoredNoteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthoredNoteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthoredNoteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthoredNoteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthoredNoteable, len(val)) + for i, v := range val { + res[i] = v.(AuthoredNoteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthoredNoteCollectionResponse) GetValue()([]AuthoredNoteable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthoredNoteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthoredNoteCollectionResponse) SetValue(value []AuthoredNoteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authored_note_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authored_note_collection_responseable.go new file mode 100644 index 000000000..a7df90562 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authored_note_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthoredNoteCollectionResponseable +type AuthoredNoteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthoredNoteable) + SetValue(value []AuthoredNoteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authored_noteable.go b/src/internal/connector/graph/betasdk/models/authored_noteable.go new file mode 100644 index 000000000..b6f4d64de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authored_noteable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthoredNoteable +type AuthoredNoteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(Identityable) + GetContent()(ItemBodyable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAuthor(value Identityable)() + SetContent(value ItemBodyable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_info.go b/src/internal/connector/graph/betasdk/models/authorization_info.go new file mode 100644 index 000000000..a9a77153a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_info.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationInfo +type AuthorizationInfo 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 collection of unique identifiers that can be associated with a user and can be used to bind the Azure AD user to a certificate for authentication and authorization into non-Azure AD environments. The identifiers must be unique in the tenant. + certificateUserIds []string + // The OdataType property + odataType *string +} +// NewAuthorizationInfo instantiates a new authorizationInfo and sets the default values. +func NewAuthorizationInfo()(*AuthorizationInfo) { + m := &AuthorizationInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAuthorizationInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthorizationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthorizationInfo(), 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 *AuthorizationInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertificateUserIds gets the certificateUserIds property value. The collection of unique identifiers that can be associated with a user and can be used to bind the Azure AD user to a certificate for authentication and authorization into non-Azure AD environments. The identifiers must be unique in the tenant. +func (m *AuthorizationInfo) GetCertificateUserIds()([]string) { + return m.certificateUserIds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthorizationInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificateUserIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCertificateUserIds(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AuthorizationInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AuthorizationInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCertificateUserIds() != nil { + err := writer.WriteCollectionOfStringValues("certificateUserIds", m.GetCertificateUserIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AuthorizationInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertificateUserIds sets the certificateUserIds property value. The collection of unique identifiers that can be associated with a user and can be used to bind the Azure AD user to a certificate for authentication and authorization into non-Azure AD environments. The identifiers must be unique in the tenant. +func (m *AuthorizationInfo) SetCertificateUserIds(value []string)() { + m.certificateUserIds = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AuthorizationInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_infoable.go b/src/internal/connector/graph/betasdk/models/authorization_infoable.go new file mode 100644 index 000000000..2eaed56ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationInfoable +type AuthorizationInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateUserIds()([]string) + GetOdataType()(*string) + SetCertificateUserIds(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_policy.go b/src/internal/connector/graph/betasdk/models/authorization_policy.go new file mode 100644 index 000000000..efd7c9902 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_policy.go @@ -0,0 +1,340 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationPolicy +type AuthorizationPolicy struct { + PolicyBase + // Indicates whether users can sign up for email based subscriptions. + allowedToSignUpEmailBasedSubscriptions *bool + // Indicates whether the Self-Serve Password Reset feature can be used by users on the tenant. + allowedToUseSSPR *bool + // Indicates whether a user can join the tenant by email validation. + allowEmailVerifiedUsersToJoinOrganization *bool + // Indicates who can invite external users to the organization. Possible values are: none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers, everyone. everyone is the default setting for all cloud environments except US Government. See more in the table below. + allowInvitesFrom *AllowInvitesFrom + // Indicates whether user consent for risky apps is allowed. We recommend to keep this as false. + allowUserConsentForRiskyApps *bool + // To disable the use of the MSOnline PowerShell module set this property to true. This will also disable user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This does not affect Azure AD Connect or Microsoft Graph. + blockMsolPowerShell *bool + // The defaultUserRoleOverrides property + defaultUserRoleOverrides []DefaultUserRoleOverrideable + // The defaultUserRolePermissions property + defaultUserRolePermissions DefaultUserRolePermissionsable + // List of features enabled for private preview on the tenant. + enabledPreviewFeatures []string + // Represents role templateId for the role that should be granted to guest user. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). + guestUserRoleId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Indicates if user consent to apps is allowed, and if it is, which app consent policy (permissionGrantPolicy) governs the permission for users to grant consent. Values should be in the format managePermissionGrantsForSelf.{id}, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. + permissionGrantPolicyIdsAssignedToDefaultUserRole []string +} +// NewAuthorizationPolicy instantiates a new AuthorizationPolicy and sets the default values. +func NewAuthorizationPolicy()(*AuthorizationPolicy) { + m := &AuthorizationPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.authorizationPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAuthorizationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthorizationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthorizationPolicy(), nil +} +// GetAllowedToSignUpEmailBasedSubscriptions gets the allowedToSignUpEmailBasedSubscriptions property value. Indicates whether users can sign up for email based subscriptions. +func (m *AuthorizationPolicy) GetAllowedToSignUpEmailBasedSubscriptions()(*bool) { + return m.allowedToSignUpEmailBasedSubscriptions +} +// GetAllowedToUseSSPR gets the allowedToUseSSPR property value. Indicates whether the Self-Serve Password Reset feature can be used by users on the tenant. +func (m *AuthorizationPolicy) GetAllowedToUseSSPR()(*bool) { + return m.allowedToUseSSPR +} +// GetAllowEmailVerifiedUsersToJoinOrganization gets the allowEmailVerifiedUsersToJoinOrganization property value. Indicates whether a user can join the tenant by email validation. +func (m *AuthorizationPolicy) GetAllowEmailVerifiedUsersToJoinOrganization()(*bool) { + return m.allowEmailVerifiedUsersToJoinOrganization +} +// GetAllowInvitesFrom gets the allowInvitesFrom property value. Indicates who can invite external users to the organization. Possible values are: none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers, everyone. everyone is the default setting for all cloud environments except US Government. See more in the table below. +func (m *AuthorizationPolicy) GetAllowInvitesFrom()(*AllowInvitesFrom) { + return m.allowInvitesFrom +} +// GetAllowUserConsentForRiskyApps gets the allowUserConsentForRiskyApps property value. Indicates whether user consent for risky apps is allowed. We recommend to keep this as false. +func (m *AuthorizationPolicy) GetAllowUserConsentForRiskyApps()(*bool) { + return m.allowUserConsentForRiskyApps +} +// GetBlockMsolPowerShell gets the blockMsolPowerShell property value. To disable the use of the MSOnline PowerShell module set this property to true. This will also disable user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This does not affect Azure AD Connect or Microsoft Graph. +func (m *AuthorizationPolicy) GetBlockMsolPowerShell()(*bool) { + return m.blockMsolPowerShell +} +// GetDefaultUserRoleOverrides gets the defaultUserRoleOverrides property value. The defaultUserRoleOverrides property +func (m *AuthorizationPolicy) GetDefaultUserRoleOverrides()([]DefaultUserRoleOverrideable) { + return m.defaultUserRoleOverrides +} +// GetDefaultUserRolePermissions gets the defaultUserRolePermissions property value. The defaultUserRolePermissions property +func (m *AuthorizationPolicy) GetDefaultUserRolePermissions()(DefaultUserRolePermissionsable) { + return m.defaultUserRolePermissions +} +// GetEnabledPreviewFeatures gets the enabledPreviewFeatures property value. List of features enabled for private preview on the tenant. +func (m *AuthorizationPolicy) GetEnabledPreviewFeatures()([]string) { + return m.enabledPreviewFeatures +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthorizationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["allowedToSignUpEmailBasedSubscriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToSignUpEmailBasedSubscriptions(val) + } + return nil + } + res["allowedToUseSSPR"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToUseSSPR(val) + } + return nil + } + res["allowEmailVerifiedUsersToJoinOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowEmailVerifiedUsersToJoinOrganization(val) + } + return nil + } + res["allowInvitesFrom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAllowInvitesFrom) + if err != nil { + return err + } + if val != nil { + m.SetAllowInvitesFrom(val.(*AllowInvitesFrom)) + } + return nil + } + res["allowUserConsentForRiskyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUserConsentForRiskyApps(val) + } + return nil + } + res["blockMsolPowerShell"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockMsolPowerShell(val) + } + return nil + } + res["defaultUserRoleOverrides"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDefaultUserRoleOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DefaultUserRoleOverrideable, len(val)) + for i, v := range val { + res[i] = v.(DefaultUserRoleOverrideable) + } + m.SetDefaultUserRoleOverrides(res) + } + return nil + } + res["defaultUserRolePermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDefaultUserRolePermissionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultUserRolePermissions(val.(DefaultUserRolePermissionsable)) + } + return nil + } + res["enabledPreviewFeatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnabledPreviewFeatures(res) + } + return nil + } + res["guestUserRoleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetGuestUserRoleId(val) + } + return nil + } + res["permissionGrantPolicyIdsAssignedToDefaultUserRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPermissionGrantPolicyIdsAssignedToDefaultUserRole(res) + } + return nil + } + return res +} +// GetGuestUserRoleId gets the guestUserRoleId property value. Represents role templateId for the role that should be granted to guest user. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +func (m *AuthorizationPolicy) GetGuestUserRoleId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.guestUserRoleId +} +// GetPermissionGrantPolicyIdsAssignedToDefaultUserRole gets the permissionGrantPolicyIdsAssignedToDefaultUserRole property value. Indicates if user consent to apps is allowed, and if it is, which app consent policy (permissionGrantPolicy) governs the permission for users to grant consent. Values should be in the format managePermissionGrantsForSelf.{id}, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. +func (m *AuthorizationPolicy) GetPermissionGrantPolicyIdsAssignedToDefaultUserRole()([]string) { + return m.permissionGrantPolicyIdsAssignedToDefaultUserRole +} +// Serialize serializes information the current object +func (m *AuthorizationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowedToSignUpEmailBasedSubscriptions", m.GetAllowedToSignUpEmailBasedSubscriptions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowedToUseSSPR", m.GetAllowedToUseSSPR()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowEmailVerifiedUsersToJoinOrganization", m.GetAllowEmailVerifiedUsersToJoinOrganization()) + if err != nil { + return err + } + } + if m.GetAllowInvitesFrom() != nil { + cast := (*m.GetAllowInvitesFrom()).String() + err = writer.WriteStringValue("allowInvitesFrom", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowUserConsentForRiskyApps", m.GetAllowUserConsentForRiskyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockMsolPowerShell", m.GetBlockMsolPowerShell()) + if err != nil { + return err + } + } + if m.GetDefaultUserRoleOverrides() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefaultUserRoleOverrides())) + for i, v := range m.GetDefaultUserRoleOverrides() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("defaultUserRoleOverrides", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultUserRolePermissions", m.GetDefaultUserRolePermissions()) + if err != nil { + return err + } + } + if m.GetEnabledPreviewFeatures() != nil { + err = writer.WriteCollectionOfStringValues("enabledPreviewFeatures", m.GetEnabledPreviewFeatures()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("guestUserRoleId", m.GetGuestUserRoleId()) + if err != nil { + return err + } + } + if m.GetPermissionGrantPolicyIdsAssignedToDefaultUserRole() != nil { + err = writer.WriteCollectionOfStringValues("permissionGrantPolicyIdsAssignedToDefaultUserRole", m.GetPermissionGrantPolicyIdsAssignedToDefaultUserRole()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedToSignUpEmailBasedSubscriptions sets the allowedToSignUpEmailBasedSubscriptions property value. Indicates whether users can sign up for email based subscriptions. +func (m *AuthorizationPolicy) SetAllowedToSignUpEmailBasedSubscriptions(value *bool)() { + m.allowedToSignUpEmailBasedSubscriptions = value +} +// SetAllowedToUseSSPR sets the allowedToUseSSPR property value. Indicates whether the Self-Serve Password Reset feature can be used by users on the tenant. +func (m *AuthorizationPolicy) SetAllowedToUseSSPR(value *bool)() { + m.allowedToUseSSPR = value +} +// SetAllowEmailVerifiedUsersToJoinOrganization sets the allowEmailVerifiedUsersToJoinOrganization property value. Indicates whether a user can join the tenant by email validation. +func (m *AuthorizationPolicy) SetAllowEmailVerifiedUsersToJoinOrganization(value *bool)() { + m.allowEmailVerifiedUsersToJoinOrganization = value +} +// SetAllowInvitesFrom sets the allowInvitesFrom property value. Indicates who can invite external users to the organization. Possible values are: none, adminsAndGuestInviters, adminsGuestInvitersAndAllMembers, everyone. everyone is the default setting for all cloud environments except US Government. See more in the table below. +func (m *AuthorizationPolicy) SetAllowInvitesFrom(value *AllowInvitesFrom)() { + m.allowInvitesFrom = value +} +// SetAllowUserConsentForRiskyApps sets the allowUserConsentForRiskyApps property value. Indicates whether user consent for risky apps is allowed. We recommend to keep this as false. +func (m *AuthorizationPolicy) SetAllowUserConsentForRiskyApps(value *bool)() { + m.allowUserConsentForRiskyApps = value +} +// SetBlockMsolPowerShell sets the blockMsolPowerShell property value. To disable the use of the MSOnline PowerShell module set this property to true. This will also disable user-based access to the legacy service endpoint used by the MSOnline PowerShell module. This does not affect Azure AD Connect or Microsoft Graph. +func (m *AuthorizationPolicy) SetBlockMsolPowerShell(value *bool)() { + m.blockMsolPowerShell = value +} +// SetDefaultUserRoleOverrides sets the defaultUserRoleOverrides property value. The defaultUserRoleOverrides property +func (m *AuthorizationPolicy) SetDefaultUserRoleOverrides(value []DefaultUserRoleOverrideable)() { + m.defaultUserRoleOverrides = value +} +// SetDefaultUserRolePermissions sets the defaultUserRolePermissions property value. The defaultUserRolePermissions property +func (m *AuthorizationPolicy) SetDefaultUserRolePermissions(value DefaultUserRolePermissionsable)() { + m.defaultUserRolePermissions = value +} +// SetEnabledPreviewFeatures sets the enabledPreviewFeatures property value. List of features enabled for private preview on the tenant. +func (m *AuthorizationPolicy) SetEnabledPreviewFeatures(value []string)() { + m.enabledPreviewFeatures = value +} +// SetGuestUserRoleId sets the guestUserRoleId property value. Represents role templateId for the role that should be granted to guest user. Refer to List unifiedRoleDefinitions to find the list of available role templates. Currently following roles are supported: User (a0b1b346-4d3e-4e8b-98f8-753987be4970), Guest User (10dae51f-b6af-4016-8d66-8c2a99b929b3), and Restricted Guest User (2af84b1e-32c8-42b7-82bc-daa82404023b). +func (m *AuthorizationPolicy) SetGuestUserRoleId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.guestUserRoleId = value +} +// SetPermissionGrantPolicyIdsAssignedToDefaultUserRole sets the permissionGrantPolicyIdsAssignedToDefaultUserRole property value. Indicates if user consent to apps is allowed, and if it is, which app consent policy (permissionGrantPolicy) governs the permission for users to grant consent. Values should be in the format managePermissionGrantsForSelf.{id}, where {id} is the id of a built-in or custom app consent policy. An empty list indicates user consent to apps is disabled. +func (m *AuthorizationPolicy) SetPermissionGrantPolicyIdsAssignedToDefaultUserRole(value []string)() { + m.permissionGrantPolicyIdsAssignedToDefaultUserRole = value +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/authorization_policy_collection_response.go new file mode 100644 index 000000000..04e563a9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationPolicyCollectionResponse +type AuthorizationPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AuthorizationPolicyable +} +// NewAuthorizationPolicyCollectionResponse instantiates a new AuthorizationPolicyCollectionResponse and sets the default values. +func NewAuthorizationPolicyCollectionResponse()(*AuthorizationPolicyCollectionResponse) { + m := &AuthorizationPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuthorizationPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuthorizationPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuthorizationPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuthorizationPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthorizationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthorizationPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AuthorizationPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuthorizationPolicyCollectionResponse) GetValue()([]AuthorizationPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuthorizationPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuthorizationPolicyCollectionResponse) SetValue(value []AuthorizationPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/authorization_policy_collection_responseable.go new file mode 100644 index 000000000..f96cca7f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationPolicyCollectionResponseable +type AuthorizationPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuthorizationPolicyable) + SetValue(value []AuthorizationPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/authorization_policyable.go b/src/internal/connector/graph/betasdk/models/authorization_policyable.go new file mode 100644 index 000000000..055988269 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/authorization_policyable.go @@ -0,0 +1,34 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AuthorizationPolicyable +type AuthorizationPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetAllowedToSignUpEmailBasedSubscriptions()(*bool) + GetAllowedToUseSSPR()(*bool) + GetAllowEmailVerifiedUsersToJoinOrganization()(*bool) + GetAllowInvitesFrom()(*AllowInvitesFrom) + GetAllowUserConsentForRiskyApps()(*bool) + GetBlockMsolPowerShell()(*bool) + GetDefaultUserRoleOverrides()([]DefaultUserRoleOverrideable) + GetDefaultUserRolePermissions()(DefaultUserRolePermissionsable) + GetEnabledPreviewFeatures()([]string) + GetGuestUserRoleId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPermissionGrantPolicyIdsAssignedToDefaultUserRole()([]string) + SetAllowedToSignUpEmailBasedSubscriptions(value *bool)() + SetAllowedToUseSSPR(value *bool)() + SetAllowEmailVerifiedUsersToJoinOrganization(value *bool)() + SetAllowInvitesFrom(value *AllowInvitesFrom)() + SetAllowUserConsentForRiskyApps(value *bool)() + SetBlockMsolPowerShell(value *bool)() + SetDefaultUserRoleOverrides(value []DefaultUserRoleOverrideable)() + SetDefaultUserRolePermissions(value DefaultUserRolePermissionsable)() + SetEnabledPreviewFeatures(value []string)() + SetGuestUserRoleId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPermissionGrantPolicyIdsAssignedToDefaultUserRole(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/auto_admitted_users_type.go b/src/internal/connector/graph/betasdk/models/auto_admitted_users_type.go new file mode 100644 index 000000000..94047d3d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_admitted_users_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AutoAdmittedUsersType int + +const ( + EVERYONEINCOMPANY_AUTOADMITTEDUSERSTYPE AutoAdmittedUsersType = iota + EVERYONE_AUTOADMITTEDUSERSTYPE +) + +func (i AutoAdmittedUsersType) String() string { + return []string{"everyoneInCompany", "everyone"}[i] +} +func ParseAutoAdmittedUsersType(v string) (interface{}, error) { + result := EVERYONEINCOMPANY_AUTOADMITTEDUSERSTYPE + switch v { + case "everyoneInCompany": + result = EVERYONEINCOMPANY_AUTOADMITTEDUSERSTYPE + case "everyone": + result = EVERYONE_AUTOADMITTEDUSERSTYPE + default: + return 0, errors.New("Unknown AutoAdmittedUsersType value: " + v) + } + return &result, nil +} +func SerializeAutoAdmittedUsersType(values []AutoAdmittedUsersType) []string { + 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/auto_labeling.go b/src/internal/connector/graph/betasdk/models/auto_labeling.go new file mode 100644 index 000000000..402b0593d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_labeling.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutoLabeling +type AutoLabeling 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 message property + message *string + // The OdataType property + odataType *string + // The sensitiveTypeIds property + sensitiveTypeIds []string +} +// NewAutoLabeling instantiates a new autoLabeling and sets the default values. +func NewAutoLabeling()(*AutoLabeling) { + m := &AutoLabeling{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAutoLabelingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAutoLabelingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAutoLabeling(), 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 *AutoLabeling) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AutoLabeling) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["sensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSensitiveTypeIds(res) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +func (m *AutoLabeling) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AutoLabeling) GetOdataType()(*string) { + return m.odataType +} +// GetSensitiveTypeIds gets the sensitiveTypeIds property value. The sensitiveTypeIds property +func (m *AutoLabeling) GetSensitiveTypeIds()([]string) { + return m.sensitiveTypeIds +} +// Serialize serializes information the current object +func (m *AutoLabeling) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSensitiveTypeIds() != nil { + err := writer.WriteCollectionOfStringValues("sensitiveTypeIds", m.GetSensitiveTypeIds()) + 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 *AutoLabeling) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMessage sets the message property value. The message property +func (m *AutoLabeling) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AutoLabeling) SetOdataType(value *string)() { + m.odataType = value +} +// SetSensitiveTypeIds sets the sensitiveTypeIds property value. The sensitiveTypeIds property +func (m *AutoLabeling) SetSensitiveTypeIds(value []string)() { + m.sensitiveTypeIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/auto_labelingable.go b/src/internal/connector/graph/betasdk/models/auto_labelingable.go new file mode 100644 index 000000000..c46edd4e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_labelingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutoLabelingable +type AutoLabelingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetOdataType()(*string) + GetSensitiveTypeIds()([]string) + SetMessage(value *string)() + SetOdataType(value *string)() + SetSensitiveTypeIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/auto_restart_notification_dismissal_method.go b/src/internal/connector/graph/betasdk/models/auto_restart_notification_dismissal_method.go new file mode 100644 index 000000000..10f99bb80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_restart_notification_dismissal_method.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AutoRestartNotificationDismissalMethod int + +const ( + // Not configured + NOTCONFIGURED_AUTORESTARTNOTIFICATIONDISMISSALMETHOD AutoRestartNotificationDismissalMethod = iota + // Auto dismissal Indicates that the notification is automatically dismissed without user intervention + AUTOMATIC_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + // User dismissal. Allows the user to dismiss the notification + USER_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + // Evolvable enum member + UNKNOWNFUTUREVALUE_AUTORESTARTNOTIFICATIONDISMISSALMETHOD +) + +func (i AutoRestartNotificationDismissalMethod) String() string { + return []string{"notConfigured", "automatic", "user", "unknownFutureValue"}[i] +} +func ParseAutoRestartNotificationDismissalMethod(v string) (interface{}, error) { + result := NOTCONFIGURED_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + switch v { + case "notConfigured": + result = NOTCONFIGURED_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + case "automatic": + result = AUTOMATIC_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + case "user": + result = USER_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUTORESTARTNOTIFICATIONDISMISSALMETHOD + default: + return 0, errors.New("Unknown AutoRestartNotificationDismissalMethod value: " + v) + } + return &result, nil +} +func SerializeAutoRestartNotificationDismissalMethod(values []AutoRestartNotificationDismissalMethod) []string { + 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/auto_review_settings.go b/src/internal/connector/graph/betasdk/models/auto_review_settings.go new file mode 100644 index 000000000..5c0fe188c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_review_settings.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutoReviewSettings +type AutoReviewSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Possible values: Approve, Deny, or Recommendation. If Recommendation, then accessRecommendationsEnabled in the accessReviewSettings resource should also be set to true. If you want to have the system provide a decision even if the reviewer does not make a choice, set the autoReviewEnabled property in the accessReviewSettings resource to true and include an autoReviewSettings object with the notReviewedResult property. Then, when a review completes, based on the notReviewedResult property, the decision is recorded as either Approve or Deny. + notReviewedResult *string + // The OdataType property + odataType *string +} +// NewAutoReviewSettings instantiates a new autoReviewSettings and sets the default values. +func NewAutoReviewSettings()(*AutoReviewSettings) { + m := &AutoReviewSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAutoReviewSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAutoReviewSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAutoReviewSettings(), 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 *AutoReviewSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AutoReviewSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["notReviewedResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotReviewedResult(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 + } + return res +} +// GetNotReviewedResult gets the notReviewedResult property value. Possible values: Approve, Deny, or Recommendation. If Recommendation, then accessRecommendationsEnabled in the accessReviewSettings resource should also be set to true. If you want to have the system provide a decision even if the reviewer does not make a choice, set the autoReviewEnabled property in the accessReviewSettings resource to true and include an autoReviewSettings object with the notReviewedResult property. Then, when a review completes, based on the notReviewedResult property, the decision is recorded as either Approve or Deny. +func (m *AutoReviewSettings) GetNotReviewedResult()(*string) { + return m.notReviewedResult +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AutoReviewSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AutoReviewSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("notReviewedResult", m.GetNotReviewedResult()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AutoReviewSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNotReviewedResult sets the notReviewedResult property value. Possible values: Approve, Deny, or Recommendation. If Recommendation, then accessRecommendationsEnabled in the accessReviewSettings resource should also be set to true. If you want to have the system provide a decision even if the reviewer does not make a choice, set the autoReviewEnabled property in the accessReviewSettings resource to true and include an autoReviewSettings object with the notReviewedResult property. Then, when a review completes, based on the notReviewedResult property, the decision is recorded as either Approve or Deny. +func (m *AutoReviewSettings) SetNotReviewedResult(value *string)() { + m.notReviewedResult = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AutoReviewSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/auto_review_settingsable.go b/src/internal/connector/graph/betasdk/models/auto_review_settingsable.go new file mode 100644 index 000000000..129129263 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/auto_review_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutoReviewSettingsable +type AutoReviewSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNotReviewedResult()(*string) + GetOdataType()(*string) + SetNotReviewedResult(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/automatic_replies_setting.go b/src/internal/connector/graph/betasdk/models/automatic_replies_setting.go new file mode 100644 index 000000000..61257ff06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/automatic_replies_setting.go @@ -0,0 +1,229 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutomaticRepliesSetting +type AutomaticRepliesSetting 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 set of audience external to the signed-in user's organization who will receive the ExternalReplyMessage, if Status is AlwaysEnabled or Scheduled. Possible values are: none, contactsOnly, all. + externalAudience *ExternalAudienceScope + // The automatic reply to send to the specified external audience, if Status is AlwaysEnabled or Scheduled. + externalReplyMessage *string + // The automatic reply to send to the audience internal to the signed-in user's organization, if Status is AlwaysEnabled or Scheduled. + internalReplyMessage *string + // The OdataType property + odataType *string + // The date and time that automatic replies are set to end, if Status is set to Scheduled. + scheduledEndDateTime DateTimeTimeZoneable + // The date and time that automatic replies are set to begin, if Status is set to Scheduled. + scheduledStartDateTime DateTimeTimeZoneable + // Configurations status for automatic replies. Possible values are: disabled, alwaysEnabled, scheduled. + status *AutomaticRepliesStatus +} +// NewAutomaticRepliesSetting instantiates a new automaticRepliesSetting and sets the default values. +func NewAutomaticRepliesSetting()(*AutomaticRepliesSetting) { + m := &AutomaticRepliesSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAutomaticRepliesSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAutomaticRepliesSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAutomaticRepliesSetting(), 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 *AutomaticRepliesSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalAudience gets the externalAudience property value. The set of audience external to the signed-in user's organization who will receive the ExternalReplyMessage, if Status is AlwaysEnabled or Scheduled. Possible values are: none, contactsOnly, all. +func (m *AutomaticRepliesSetting) GetExternalAudience()(*ExternalAudienceScope) { + return m.externalAudience +} +// GetExternalReplyMessage gets the externalReplyMessage property value. The automatic reply to send to the specified external audience, if Status is AlwaysEnabled or Scheduled. +func (m *AutomaticRepliesSetting) GetExternalReplyMessage()(*string) { + return m.externalReplyMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AutomaticRepliesSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalAudience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalAudienceScope) + if err != nil { + return err + } + if val != nil { + m.SetExternalAudience(val.(*ExternalAudienceScope)) + } + return nil + } + res["externalReplyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalReplyMessage(val) + } + return nil + } + res["internalReplyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternalReplyMessage(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["scheduledEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScheduledEndDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["scheduledStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScheduledStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAutomaticRepliesStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AutomaticRepliesStatus)) + } + return nil + } + return res +} +// GetInternalReplyMessage gets the internalReplyMessage property value. The automatic reply to send to the audience internal to the signed-in user's organization, if Status is AlwaysEnabled or Scheduled. +func (m *AutomaticRepliesSetting) GetInternalReplyMessage()(*string) { + return m.internalReplyMessage +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AutomaticRepliesSetting) GetOdataType()(*string) { + return m.odataType +} +// GetScheduledEndDateTime gets the scheduledEndDateTime property value. The date and time that automatic replies are set to end, if Status is set to Scheduled. +func (m *AutomaticRepliesSetting) GetScheduledEndDateTime()(DateTimeTimeZoneable) { + return m.scheduledEndDateTime +} +// GetScheduledStartDateTime gets the scheduledStartDateTime property value. The date and time that automatic replies are set to begin, if Status is set to Scheduled. +func (m *AutomaticRepliesSetting) GetScheduledStartDateTime()(DateTimeTimeZoneable) { + return m.scheduledStartDateTime +} +// GetStatus gets the status property value. Configurations status for automatic replies. Possible values are: disabled, alwaysEnabled, scheduled. +func (m *AutomaticRepliesSetting) GetStatus()(*AutomaticRepliesStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *AutomaticRepliesSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExternalAudience() != nil { + cast := (*m.GetExternalAudience()).String() + err := writer.WriteStringValue("externalAudience", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalReplyMessage", m.GetExternalReplyMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("internalReplyMessage", m.GetInternalReplyMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("scheduledEndDateTime", m.GetScheduledEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("scheduledStartDateTime", m.GetScheduledStartDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *AutomaticRepliesSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalAudience sets the externalAudience property value. The set of audience external to the signed-in user's organization who will receive the ExternalReplyMessage, if Status is AlwaysEnabled or Scheduled. Possible values are: none, contactsOnly, all. +func (m *AutomaticRepliesSetting) SetExternalAudience(value *ExternalAudienceScope)() { + m.externalAudience = value +} +// SetExternalReplyMessage sets the externalReplyMessage property value. The automatic reply to send to the specified external audience, if Status is AlwaysEnabled or Scheduled. +func (m *AutomaticRepliesSetting) SetExternalReplyMessage(value *string)() { + m.externalReplyMessage = value +} +// SetInternalReplyMessage sets the internalReplyMessage property value. The automatic reply to send to the audience internal to the signed-in user's organization, if Status is AlwaysEnabled or Scheduled. +func (m *AutomaticRepliesSetting) SetInternalReplyMessage(value *string)() { + m.internalReplyMessage = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AutomaticRepliesSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetScheduledEndDateTime sets the scheduledEndDateTime property value. The date and time that automatic replies are set to end, if Status is set to Scheduled. +func (m *AutomaticRepliesSetting) SetScheduledEndDateTime(value DateTimeTimeZoneable)() { + m.scheduledEndDateTime = value +} +// SetScheduledStartDateTime sets the scheduledStartDateTime property value. The date and time that automatic replies are set to begin, if Status is set to Scheduled. +func (m *AutomaticRepliesSetting) SetScheduledStartDateTime(value DateTimeTimeZoneable)() { + m.scheduledStartDateTime = value +} +// SetStatus sets the status property value. Configurations status for automatic replies. Possible values are: disabled, alwaysEnabled, scheduled. +func (m *AutomaticRepliesSetting) SetStatus(value *AutomaticRepliesStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/automatic_replies_settingable.go b/src/internal/connector/graph/betasdk/models/automatic_replies_settingable.go new file mode 100644 index 000000000..f00912088 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/automatic_replies_settingable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AutomaticRepliesSettingable +type AutomaticRepliesSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalAudience()(*ExternalAudienceScope) + GetExternalReplyMessage()(*string) + GetInternalReplyMessage()(*string) + GetOdataType()(*string) + GetScheduledEndDateTime()(DateTimeTimeZoneable) + GetScheduledStartDateTime()(DateTimeTimeZoneable) + GetStatus()(*AutomaticRepliesStatus) + SetExternalAudience(value *ExternalAudienceScope)() + SetExternalReplyMessage(value *string)() + SetInternalReplyMessage(value *string)() + SetOdataType(value *string)() + SetScheduledEndDateTime(value DateTimeTimeZoneable)() + SetScheduledStartDateTime(value DateTimeTimeZoneable)() + SetStatus(value *AutomaticRepliesStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/automatic_replies_status.go b/src/internal/connector/graph/betasdk/models/automatic_replies_status.go new file mode 100644 index 000000000..03b90b771 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/automatic_replies_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AutomaticRepliesStatus int + +const ( + DISABLED_AUTOMATICREPLIESSTATUS AutomaticRepliesStatus = iota + ALWAYSENABLED_AUTOMATICREPLIESSTATUS + SCHEDULED_AUTOMATICREPLIESSTATUS +) + +func (i AutomaticRepliesStatus) String() string { + return []string{"disabled", "alwaysEnabled", "scheduled"}[i] +} +func ParseAutomaticRepliesStatus(v string) (interface{}, error) { + result := DISABLED_AUTOMATICREPLIESSTATUS + switch v { + case "disabled": + result = DISABLED_AUTOMATICREPLIESSTATUS + case "alwaysEnabled": + result = ALWAYSENABLED_AUTOMATICREPLIESSTATUS + case "scheduled": + result = SCHEDULED_AUTOMATICREPLIESSTATUS + default: + return 0, errors.New("Unknown AutomaticRepliesStatus value: " + v) + } + return &result, nil +} +func SerializeAutomaticRepliesStatus(values []AutomaticRepliesStatus) []string { + 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/automatic_update_mode.go b/src/internal/connector/graph/betasdk/models/automatic_update_mode.go new file mode 100644 index 000000000..47ab8e1bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/automatic_update_mode.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AutomaticUpdateMode int + +const ( + // User Defined, default value, no intent. + USERDEFINED_AUTOMATICUPDATEMODE AutomaticUpdateMode = iota + // Notify on download. + NOTIFYDOWNLOAD_AUTOMATICUPDATEMODE + // Auto-install at maintenance time. + AUTOINSTALLATMAINTENANCETIME_AUTOMATICUPDATEMODE + // Auto-install and reboot at maintenance time. + AUTOINSTALLANDREBOOTATMAINTENANCETIME_AUTOMATICUPDATEMODE + // Auto-install and reboot at scheduled time. + AUTOINSTALLANDREBOOTATSCHEDULEDTIME_AUTOMATICUPDATEMODE + // Auto-install and restart without end-user control + AUTOINSTALLANDREBOOTWITHOUTENDUSERCONTROL_AUTOMATICUPDATEMODE + // Reset to Windows default value. + WINDOWSDEFAULT_AUTOMATICUPDATEMODE +) + +func (i AutomaticUpdateMode) String() string { + return []string{"userDefined", "notifyDownload", "autoInstallAtMaintenanceTime", "autoInstallAndRebootAtMaintenanceTime", "autoInstallAndRebootAtScheduledTime", "autoInstallAndRebootWithoutEndUserControl", "windowsDefault"}[i] +} +func ParseAutomaticUpdateMode(v string) (interface{}, error) { + result := USERDEFINED_AUTOMATICUPDATEMODE + switch v { + case "userDefined": + result = USERDEFINED_AUTOMATICUPDATEMODE + case "notifyDownload": + result = NOTIFYDOWNLOAD_AUTOMATICUPDATEMODE + case "autoInstallAtMaintenanceTime": + result = AUTOINSTALLATMAINTENANCETIME_AUTOMATICUPDATEMODE + case "autoInstallAndRebootAtMaintenanceTime": + result = AUTOINSTALLANDREBOOTATMAINTENANCETIME_AUTOMATICUPDATEMODE + case "autoInstallAndRebootAtScheduledTime": + result = AUTOINSTALLANDREBOOTATSCHEDULEDTIME_AUTOMATICUPDATEMODE + case "autoInstallAndRebootWithoutEndUserControl": + result = AUTOINSTALLANDREBOOTWITHOUTENDUSERCONTROL_AUTOMATICUPDATEMODE + case "windowsDefault": + result = WINDOWSDEFAULT_AUTOMATICUPDATEMODE + default: + return 0, errors.New("Unknown AutomaticUpdateMode value: " + v) + } + return &result, nil +} +func SerializeAutomaticUpdateMode(values []AutomaticUpdateMode) []string { + 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/availability_item.go b/src/internal/connector/graph/betasdk/models/availability_item.go new file mode 100644 index 000000000..5ea2496cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/availability_item.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AvailabilityItem +type AvailabilityItem 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 endDateTime property + endDateTime DateTimeTimeZoneable + // The OdataType property + odataType *string + // Indicates the service ID in case of 1:n appointments. If the appointment is of type 1:n, this field will be present, otherwise, null. + serviceId *string + // The startDateTime property + startDateTime DateTimeTimeZoneable + // The status of the staff member. Possible values are: available, busy, slotsAvailable, outOfOffice, unknownFutureValue. + status *BookingsAvailabilityStatus +} +// NewAvailabilityItem instantiates a new availabilityItem and sets the default values. +func NewAvailabilityItem()(*AvailabilityItem) { + m := &AvailabilityItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAvailabilityItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAvailabilityItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAvailabilityItem(), 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 *AvailabilityItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *AvailabilityItem) GetEndDateTime()(DateTimeTimeZoneable) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AvailabilityItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val.(DateTimeTimeZoneable)) + } + 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["serviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceId(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingsAvailabilityStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*BookingsAvailabilityStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AvailabilityItem) GetOdataType()(*string) { + return m.odataType +} +// GetServiceId gets the serviceId property value. Indicates the service ID in case of 1:n appointments. If the appointment is of type 1:n, this field will be present, otherwise, null. +func (m *AvailabilityItem) GetServiceId()(*string) { + return m.serviceId +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *AvailabilityItem) GetStartDateTime()(DateTimeTimeZoneable) { + return m.startDateTime +} +// GetStatus gets the status property value. The status of the staff member. Possible values are: available, busy, slotsAvailable, outOfOffice, unknownFutureValue. +func (m *AvailabilityItem) GetStatus()(*BookingsAvailabilityStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *AvailabilityItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("serviceId", m.GetServiceId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *AvailabilityItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *AvailabilityItem) SetEndDateTime(value DateTimeTimeZoneable)() { + m.endDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AvailabilityItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetServiceId sets the serviceId property value. Indicates the service ID in case of 1:n appointments. If the appointment is of type 1:n, this field will be present, otherwise, null. +func (m *AvailabilityItem) SetServiceId(value *string)() { + m.serviceId = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *AvailabilityItem) SetStartDateTime(value DateTimeTimeZoneable)() { + m.startDateTime = value +} +// SetStatus sets the status property value. The status of the staff member. Possible values are: available, busy, slotsAvailable, outOfOffice, unknownFutureValue. +func (m *AvailabilityItem) SetStatus(value *BookingsAvailabilityStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/availability_item_collection_response.go b/src/internal/connector/graph/betasdk/models/availability_item_collection_response.go new file mode 100644 index 000000000..245b2be6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/availability_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AvailabilityItemCollectionResponse +type AvailabilityItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AvailabilityItemable +} +// NewAvailabilityItemCollectionResponse instantiates a new AvailabilityItemCollectionResponse and sets the default values. +func NewAvailabilityItemCollectionResponse()(*AvailabilityItemCollectionResponse) { + m := &AvailabilityItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAvailabilityItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAvailabilityItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAvailabilityItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AvailabilityItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAvailabilityItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AvailabilityItemable, len(val)) + for i, v := range val { + res[i] = v.(AvailabilityItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AvailabilityItemCollectionResponse) GetValue()([]AvailabilityItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *AvailabilityItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AvailabilityItemCollectionResponse) SetValue(value []AvailabilityItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/availability_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/availability_item_collection_responseable.go new file mode 100644 index 000000000..ae9e90b1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/availability_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AvailabilityItemCollectionResponseable +type AvailabilityItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AvailabilityItemable) + SetValue(value []AvailabilityItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/availability_itemable.go b/src/internal/connector/graph/betasdk/models/availability_itemable.go new file mode 100644 index 000000000..9eb3a2bf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/availability_itemable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AvailabilityItemable +type AvailabilityItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(DateTimeTimeZoneable) + GetOdataType()(*string) + GetServiceId()(*string) + GetStartDateTime()(DateTimeTimeZoneable) + GetStatus()(*BookingsAvailabilityStatus) + SetEndDateTime(value DateTimeTimeZoneable)() + SetOdataType(value *string)() + SetServiceId(value *string)() + SetStartDateTime(value DateTimeTimeZoneable)() + SetStatus(value *BookingsAvailabilityStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/average_comparative_score.go b/src/internal/connector/graph/betasdk/models/average_comparative_score.go new file mode 100644 index 000000000..5b7850ada --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/average_comparative_score.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AverageComparativeScore +type AverageComparativeScore 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 averageScore property + averageScore *float64 + // The basis property + basis *string + // The OdataType property + odataType *string +} +// NewAverageComparativeScore instantiates a new averageComparativeScore and sets the default values. +func NewAverageComparativeScore()(*AverageComparativeScore) { + m := &AverageComparativeScore{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAverageComparativeScoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAverageComparativeScoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAverageComparativeScore(), 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 *AverageComparativeScore) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAverageScore gets the averageScore property value. The averageScore property +func (m *AverageComparativeScore) GetAverageScore()(*float64) { + return m.averageScore +} +// GetBasis gets the basis property value. The basis property +func (m *AverageComparativeScore) GetBasis()(*string) { + return m.basis +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AverageComparativeScore) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["averageScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageScore(val) + } + return nil + } + res["basis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBasis(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AverageComparativeScore) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AverageComparativeScore) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("averageScore", m.GetAverageScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("basis", m.GetBasis()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AverageComparativeScore) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAverageScore sets the averageScore property value. The averageScore property +func (m *AverageComparativeScore) SetAverageScore(value *float64)() { + m.averageScore = value +} +// SetBasis sets the basis property value. The basis property +func (m *AverageComparativeScore) SetBasis(value *string)() { + m.basis = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AverageComparativeScore) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_response.go b/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_response.go new file mode 100644 index 000000000..815a9a92c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AverageComparativeScoreCollectionResponse +type AverageComparativeScoreCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AverageComparativeScoreable +} +// NewAverageComparativeScoreCollectionResponse instantiates a new AverageComparativeScoreCollectionResponse and sets the default values. +func NewAverageComparativeScoreCollectionResponse()(*AverageComparativeScoreCollectionResponse) { + m := &AverageComparativeScoreCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAverageComparativeScoreCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAverageComparativeScoreCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAverageComparativeScoreCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AverageComparativeScoreCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAverageComparativeScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AverageComparativeScoreable, len(val)) + for i, v := range val { + res[i] = v.(AverageComparativeScoreable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AverageComparativeScoreCollectionResponse) GetValue()([]AverageComparativeScoreable) { + return m.value +} +// Serialize serializes information the current object +func (m *AverageComparativeScoreCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AverageComparativeScoreCollectionResponse) SetValue(value []AverageComparativeScoreable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_responseable.go b/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_responseable.go new file mode 100644 index 000000000..b5a842594 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/average_comparative_score_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AverageComparativeScoreCollectionResponseable +type AverageComparativeScoreCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AverageComparativeScoreable) + SetValue(value []AverageComparativeScoreable)() +} diff --git a/src/internal/connector/graph/betasdk/models/average_comparative_scoreable.go b/src/internal/connector/graph/betasdk/models/average_comparative_scoreable.go new file mode 100644 index 000000000..118f63a25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/average_comparative_scoreable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AverageComparativeScoreable +type AverageComparativeScoreable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAverageScore()(*float64) + GetBasis()(*string) + GetOdataType()(*string) + SetAverageScore(value *float64)() + SetBasis(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policy.go b/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policy.go new file mode 100644 index 000000000..35e396802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policy.go @@ -0,0 +1,184 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADRegistrationPolicy +type AzureADRegistrationPolicy 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 identifiers of the groups that are in the scope of the policy. Either this property or allowedUsers is required when the appliesTo property is set to selected. + allowedGroups []string + // The identifiers of users that are in the scope of the policy. Either this property or allowedGroups is required when the appliesTo property is set to selected. + allowedUsers []string + // Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. + appliesTo *PolicyScope + // Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). + isAdminConfigurable *bool + // The OdataType property + odataType *string +} +// NewAzureADRegistrationPolicy instantiates a new azureADRegistrationPolicy and sets the default values. +func NewAzureADRegistrationPolicy()(*AzureADRegistrationPolicy) { + m := &AzureADRegistrationPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAzureADRegistrationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADRegistrationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADRegistrationPolicy(), 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 *AzureADRegistrationPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedGroups gets the allowedGroups property value. The identifiers of the groups that are in the scope of the policy. Either this property or allowedUsers is required when the appliesTo property is set to selected. +func (m *AzureADRegistrationPolicy) GetAllowedGroups()([]string) { + return m.allowedGroups +} +// GetAllowedUsers gets the allowedUsers property value. The identifiers of users that are in the scope of the policy. Either this property or allowedGroups is required when the appliesTo property is set to selected. +func (m *AzureADRegistrationPolicy) GetAllowedUsers()([]string) { + return m.allowedUsers +} +// GetAppliesTo gets the appliesTo property value. Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. +func (m *AzureADRegistrationPolicy) GetAppliesTo()(*PolicyScope) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADRegistrationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedGroups(res) + } + return nil + } + res["allowedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedUsers(res) + } + return nil + } + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyScope) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*PolicyScope)) + } + return nil + } + res["isAdminConfigurable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAdminConfigurable(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 + } + return res +} +// GetIsAdminConfigurable gets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +func (m *AzureADRegistrationPolicy) GetIsAdminConfigurable()(*bool) { + return m.isAdminConfigurable +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AzureADRegistrationPolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AzureADRegistrationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedGroups() != nil { + err := writer.WriteCollectionOfStringValues("allowedGroups", m.GetAllowedGroups()) + if err != nil { + return err + } + } + if m.GetAllowedUsers() != nil { + err := writer.WriteCollectionOfStringValues("allowedUsers", m.GetAllowedUsers()) + if err != nil { + return err + } + } + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err := writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAdminConfigurable", m.GetIsAdminConfigurable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AzureADRegistrationPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedGroups sets the allowedGroups property value. The identifiers of the groups that are in the scope of the policy. Either this property or allowedUsers is required when the appliesTo property is set to selected. +func (m *AzureADRegistrationPolicy) SetAllowedGroups(value []string)() { + m.allowedGroups = value +} +// SetAllowedUsers sets the allowedUsers property value. The identifiers of users that are in the scope of the policy. Either this property or allowedGroups is required when the appliesTo property is set to selected. +func (m *AzureADRegistrationPolicy) SetAllowedUsers(value []string)() { + m.allowedUsers = value +} +// SetAppliesTo sets the appliesTo property value. Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. +func (m *AzureADRegistrationPolicy) SetAppliesTo(value *PolicyScope)() { + m.appliesTo = value +} +// SetIsAdminConfigurable sets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +func (m *AzureADRegistrationPolicy) SetIsAdminConfigurable(value *bool)() { + m.isAdminConfigurable = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AzureADRegistrationPolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policyable.go b/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policyable.go new file mode 100644 index 000000000..5f6e09cbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_registration_policyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADRegistrationPolicyable +type AzureADRegistrationPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedGroups()([]string) + GetAllowedUsers()([]string) + GetAppliesTo()(*PolicyScope) + GetIsAdminConfigurable()(*bool) + GetOdataType()(*string) + SetAllowedGroups(value []string)() + SetAllowedUsers(value []string)() + SetAppliesTo(value *PolicyScope)() + SetIsAdminConfigurable(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile.go b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile.go new file mode 100644 index 000000000..a72778c46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADWindowsAutopilotDeploymentProfile +type AzureADWindowsAutopilotDeploymentProfile struct { + WindowsAutopilotDeploymentProfile +} +// NewAzureADWindowsAutopilotDeploymentProfile instantiates a new AzureADWindowsAutopilotDeploymentProfile and sets the default values. +func NewAzureADWindowsAutopilotDeploymentProfile()(*AzureADWindowsAutopilotDeploymentProfile) { + m := &AzureADWindowsAutopilotDeploymentProfile{ + WindowsAutopilotDeploymentProfile: *NewWindowsAutopilotDeploymentProfile(), + } + odataTypeValue := "#microsoft.graph.azureADWindowsAutopilotDeploymentProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureADWindowsAutopilotDeploymentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADWindowsAutopilotDeploymentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADWindowsAutopilotDeploymentProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADWindowsAutopilotDeploymentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WindowsAutopilotDeploymentProfile.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *AzureADWindowsAutopilotDeploymentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WindowsAutopilotDeploymentProfile.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_response.go new file mode 100644 index 000000000..416b0b9cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADWindowsAutopilotDeploymentProfileCollectionResponse +type AzureADWindowsAutopilotDeploymentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AzureADWindowsAutopilotDeploymentProfileable +} +// NewAzureADWindowsAutopilotDeploymentProfileCollectionResponse instantiates a new AzureADWindowsAutopilotDeploymentProfileCollectionResponse and sets the default values. +func NewAzureADWindowsAutopilotDeploymentProfileCollectionResponse()(*AzureADWindowsAutopilotDeploymentProfileCollectionResponse) { + m := &AzureADWindowsAutopilotDeploymentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAzureADWindowsAutopilotDeploymentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureADWindowsAutopilotDeploymentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureADWindowsAutopilotDeploymentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureADWindowsAutopilotDeploymentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAzureADWindowsAutopilotDeploymentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AzureADWindowsAutopilotDeploymentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AzureADWindowsAutopilotDeploymentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AzureADWindowsAutopilotDeploymentProfileCollectionResponse) GetValue()([]AzureADWindowsAutopilotDeploymentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *AzureADWindowsAutopilotDeploymentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AzureADWindowsAutopilotDeploymentProfileCollectionResponse) SetValue(value []AzureADWindowsAutopilotDeploymentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_responseable.go new file mode 100644 index 000000000..295e96f1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADWindowsAutopilotDeploymentProfileCollectionResponseable +type AzureADWindowsAutopilotDeploymentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AzureADWindowsAutopilotDeploymentProfileable) + SetValue(value []AzureADWindowsAutopilotDeploymentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profileable.go b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profileable.go new file mode 100644 index 000000000..498e63280 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_a_d_windows_autopilot_deployment_profileable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureADWindowsAutopilotDeploymentProfileable +type AzureADWindowsAutopilotDeploymentProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WindowsAutopilotDeploymentProfileable +} diff --git a/src/internal/connector/graph/betasdk/models/azure_active_directory_tenant.go b/src/internal/connector/graph/betasdk/models/azure_active_directory_tenant.go new file mode 100644 index 000000000..39fe8237d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_active_directory_tenant.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureActiveDirectoryTenant +type AzureActiveDirectoryTenant struct { + IdentitySource + // The name of the Azure Active Directory tenant. Read only. + displayName *string + // The ID of the Azure Active Directory tenant. Read only. + tenantId *string +} +// NewAzureActiveDirectoryTenant instantiates a new AzureActiveDirectoryTenant and sets the default values. +func NewAzureActiveDirectoryTenant()(*AzureActiveDirectoryTenant) { + m := &AzureActiveDirectoryTenant{ + IdentitySource: *NewIdentitySource(), + } + odataTypeValue := "#microsoft.graph.azureActiveDirectoryTenant"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureActiveDirectoryTenantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureActiveDirectoryTenantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureActiveDirectoryTenant(), nil +} +// GetDisplayName gets the displayName property value. The name of the Azure Active Directory tenant. Read only. +func (m *AzureActiveDirectoryTenant) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureActiveDirectoryTenant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySource.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. The ID of the Azure Active Directory tenant. Read only. +func (m *AzureActiveDirectoryTenant) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *AzureActiveDirectoryTenant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the Azure Active Directory tenant. Read only. +func (m *AzureActiveDirectoryTenant) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTenantId sets the tenantId property value. The ID of the Azure Active Directory tenant. Read only. +func (m *AzureActiveDirectoryTenant) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_active_directory_tenantable.go b/src/internal/connector/graph/betasdk/models/azure_active_directory_tenantable.go new file mode 100644 index 000000000..14ecd5b36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_active_directory_tenantable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureActiveDirectoryTenantable +type AzureActiveDirectoryTenantable interface { + IdentitySourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetTenantId()(*string) + SetDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_ad_join_policy.go b/src/internal/connector/graph/betasdk/models/azure_ad_join_policy.go new file mode 100644 index 000000000..3d056a2df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_ad_join_policy.go @@ -0,0 +1,184 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureAdJoinPolicy +type AzureAdJoinPolicy 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 identifiers of the groups that are in the scope of the policy. Required when the appliesTo property is set to selected. + allowedGroups []string + // The identifiers of users that are in the scope of the policy. Required when the appliesTo property is set to selected. + allowedUsers []string + // Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. + appliesTo *PolicyScope + // Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). + isAdminConfigurable *bool + // The OdataType property + odataType *string +} +// NewAzureAdJoinPolicy instantiates a new azureAdJoinPolicy and sets the default values. +func NewAzureAdJoinPolicy()(*AzureAdJoinPolicy) { + m := &AzureAdJoinPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAzureAdJoinPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureAdJoinPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureAdJoinPolicy(), 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 *AzureAdJoinPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedGroups gets the allowedGroups property value. The identifiers of the groups that are in the scope of the policy. Required when the appliesTo property is set to selected. +func (m *AzureAdJoinPolicy) GetAllowedGroups()([]string) { + return m.allowedGroups +} +// GetAllowedUsers gets the allowedUsers property value. The identifiers of users that are in the scope of the policy. Required when the appliesTo property is set to selected. +func (m *AzureAdJoinPolicy) GetAllowedUsers()([]string) { + return m.allowedUsers +} +// GetAppliesTo gets the appliesTo property value. Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. +func (m *AzureAdJoinPolicy) GetAppliesTo()(*PolicyScope) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureAdJoinPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedGroups(res) + } + return nil + } + res["allowedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedUsers(res) + } + return nil + } + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyScope) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*PolicyScope)) + } + return nil + } + res["isAdminConfigurable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAdminConfigurable(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 + } + return res +} +// GetIsAdminConfigurable gets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +func (m *AzureAdJoinPolicy) GetIsAdminConfigurable()(*bool) { + return m.isAdminConfigurable +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AzureAdJoinPolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AzureAdJoinPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedGroups() != nil { + err := writer.WriteCollectionOfStringValues("allowedGroups", m.GetAllowedGroups()) + if err != nil { + return err + } + } + if m.GetAllowedUsers() != nil { + err := writer.WriteCollectionOfStringValues("allowedUsers", m.GetAllowedUsers()) + if err != nil { + return err + } + } + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err := writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAdminConfigurable", m.GetIsAdminConfigurable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AzureAdJoinPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedGroups sets the allowedGroups property value. The identifiers of the groups that are in the scope of the policy. Required when the appliesTo property is set to selected. +func (m *AzureAdJoinPolicy) SetAllowedGroups(value []string)() { + m.allowedGroups = value +} +// SetAllowedUsers sets the allowedUsers property value. The identifiers of users that are in the scope of the policy. Required when the appliesTo property is set to selected. +func (m *AzureAdJoinPolicy) SetAllowedUsers(value []string)() { + m.allowedUsers = value +} +// SetAppliesTo sets the appliesTo property value. Specifies whether to block or allow fine-grained control of the policy scope. The possible values are: 0 (meaning none), 1 (meaning all), 2 (meaning selected), 3 (meaning unknownFutureValue). The default value is 1. When set to 2, at least one user or group identifier must be specified in either allowedUsers or allowedGroups. Setting this property to 0 or 1 removes all identifiers in both allowedUsers and allowedGroups. +func (m *AzureAdJoinPolicy) SetAppliesTo(value *PolicyScope)() { + m.appliesTo = value +} +// SetIsAdminConfigurable sets the isAdminConfigurable property value. Specifies whether this policy scope is configurable by the admin. The default value is false. When an admin has enabled Intune (MEM) to manage devices, this property is set to false and appliesTo defaults to 1 (meaning all). +func (m *AzureAdJoinPolicy) SetIsAdminConfigurable(value *bool)() { + m.isAdminConfigurable = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AzureAdJoinPolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_ad_join_policyable.go b/src/internal/connector/graph/betasdk/models/azure_ad_join_policyable.go new file mode 100644 index 000000000..393f02787 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_ad_join_policyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureAdJoinPolicyable +type AzureAdJoinPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedGroups()([]string) + GetAllowedUsers()([]string) + GetAppliesTo()(*PolicyScope) + GetIsAdminConfigurable()(*bool) + GetOdataType()(*string) + SetAllowedGroups(value []string)() + SetAllowedUsers(value []string)() + SetAppliesTo(value *PolicyScope)() + SetIsAdminConfigurable(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_ad_token_authentication.go b/src/internal/connector/graph/betasdk/models/azure_ad_token_authentication.go new file mode 100644 index 000000000..1d0a3044a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_ad_token_authentication.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureAdTokenAuthentication +type AzureAdTokenAuthentication struct { + CustomExtensionAuthenticationConfiguration + // The appID of the Azure AD application to use to authenticate a logic app with a custom access package workflow extension. + resourceId *string +} +// NewAzureAdTokenAuthentication instantiates a new AzureAdTokenAuthentication and sets the default values. +func NewAzureAdTokenAuthentication()(*AzureAdTokenAuthentication) { + m := &AzureAdTokenAuthentication{ + CustomExtensionAuthenticationConfiguration: *NewCustomExtensionAuthenticationConfiguration(), + } + odataTypeValue := "#microsoft.graph.azureAdTokenAuthentication"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureAdTokenAuthenticationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureAdTokenAuthenticationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureAdTokenAuthentication(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureAdTokenAuthentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionAuthenticationConfiguration.GetFieldDeserializers() + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + return res +} +// GetResourceId gets the resourceId property value. The appID of the Azure AD application to use to authenticate a logic app with a custom access package workflow extension. +func (m *AzureAdTokenAuthentication) GetResourceId()(*string) { + return m.resourceId +} +// Serialize serializes information the current object +func (m *AzureAdTokenAuthentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionAuthenticationConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetResourceId sets the resourceId property value. The appID of the Azure AD application to use to authenticate a logic app with a custom access package workflow extension. +func (m *AzureAdTokenAuthentication) SetResourceId(value *string)() { + m.resourceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_ad_token_authenticationable.go b/src/internal/connector/graph/betasdk/models/azure_ad_token_authenticationable.go new file mode 100644 index 000000000..6d3ff5fee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_ad_token_authenticationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureAdTokenAuthenticationable +type AzureAdTokenAuthenticationable interface { + CustomExtensionAuthenticationConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResourceId()(*string) + SetResourceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member.go new file mode 100644 index 000000000..eb3670cce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserConversationMember +type AzureCommunicationServicesUserConversationMember struct { + ConversationMember + // The azureCommunicationServicesId property + azureCommunicationServicesId *string +} +// NewAzureCommunicationServicesUserConversationMember instantiates a new AzureCommunicationServicesUserConversationMember and sets the default values. +func NewAzureCommunicationServicesUserConversationMember()(*AzureCommunicationServicesUserConversationMember) { + m := &AzureCommunicationServicesUserConversationMember{ + ConversationMember: *NewConversationMember(), + } + odataTypeValue := "#microsoft.graph.azureCommunicationServicesUserConversationMember"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureCommunicationServicesUserConversationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureCommunicationServicesUserConversationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureCommunicationServicesUserConversationMember(), nil +} +// GetAzureCommunicationServicesId gets the azureCommunicationServicesId property value. The azureCommunicationServicesId property +func (m *AzureCommunicationServicesUserConversationMember) GetAzureCommunicationServicesId()(*string) { + return m.azureCommunicationServicesId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureCommunicationServicesUserConversationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConversationMember.GetFieldDeserializers() + res["azureCommunicationServicesId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureCommunicationServicesId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AzureCommunicationServicesUserConversationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConversationMember.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureCommunicationServicesId", m.GetAzureCommunicationServicesId()) + if err != nil { + return err + } + } + return nil +} +// SetAzureCommunicationServicesId sets the azureCommunicationServicesId property value. The azureCommunicationServicesId property +func (m *AzureCommunicationServicesUserConversationMember) SetAzureCommunicationServicesId(value *string)() { + m.azureCommunicationServicesId = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_response.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_response.go new file mode 100644 index 000000000..28e2adb18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserConversationMemberCollectionResponse +type AzureCommunicationServicesUserConversationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []AzureCommunicationServicesUserConversationMemberable +} +// NewAzureCommunicationServicesUserConversationMemberCollectionResponse instantiates a new AzureCommunicationServicesUserConversationMemberCollectionResponse and sets the default values. +func NewAzureCommunicationServicesUserConversationMemberCollectionResponse()(*AzureCommunicationServicesUserConversationMemberCollectionResponse) { + m := &AzureCommunicationServicesUserConversationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAzureCommunicationServicesUserConversationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureCommunicationServicesUserConversationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureCommunicationServicesUserConversationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureCommunicationServicesUserConversationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAzureCommunicationServicesUserConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AzureCommunicationServicesUserConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(AzureCommunicationServicesUserConversationMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AzureCommunicationServicesUserConversationMemberCollectionResponse) GetValue()([]AzureCommunicationServicesUserConversationMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *AzureCommunicationServicesUserConversationMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AzureCommunicationServicesUserConversationMemberCollectionResponse) SetValue(value []AzureCommunicationServicesUserConversationMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_responseable.go new file mode 100644 index 000000000..9a245b7d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserConversationMemberCollectionResponseable +type AzureCommunicationServicesUserConversationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AzureCommunicationServicesUserConversationMemberable) + SetValue(value []AzureCommunicationServicesUserConversationMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_memberable.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_memberable.go new file mode 100644 index 000000000..a7f9036b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_conversation_memberable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserConversationMemberable +type AzureCommunicationServicesUserConversationMemberable interface { + ConversationMemberable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureCommunicationServicesId()(*string) + SetAzureCommunicationServicesId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identity.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identity.go new file mode 100644 index 000000000..f64a0e4ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identity.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserIdentity +type AzureCommunicationServicesUserIdentity struct { + Identity + // The Azure Communication Services resource ID associated with the user. + azureCommunicationServicesResourceId *string +} +// NewAzureCommunicationServicesUserIdentity instantiates a new AzureCommunicationServicesUserIdentity and sets the default values. +func NewAzureCommunicationServicesUserIdentity()(*AzureCommunicationServicesUserIdentity) { + m := &AzureCommunicationServicesUserIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.azureCommunicationServicesUserIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAzureCommunicationServicesUserIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAzureCommunicationServicesUserIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAzureCommunicationServicesUserIdentity(), nil +} +// GetAzureCommunicationServicesResourceId gets the azureCommunicationServicesResourceId property value. The Azure Communication Services resource ID associated with the user. +func (m *AzureCommunicationServicesUserIdentity) GetAzureCommunicationServicesResourceId()(*string) { + return m.azureCommunicationServicesResourceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AzureCommunicationServicesUserIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["azureCommunicationServicesResourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureCommunicationServicesResourceId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *AzureCommunicationServicesUserIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureCommunicationServicesResourceId", m.GetAzureCommunicationServicesResourceId()) + if err != nil { + return err + } + } + return nil +} +// SetAzureCommunicationServicesResourceId sets the azureCommunicationServicesResourceId property value. The Azure Communication Services resource ID associated with the user. +func (m *AzureCommunicationServicesUserIdentity) SetAzureCommunicationServicesResourceId(value *string)() { + m.azureCommunicationServicesResourceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identityable.go b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identityable.go new file mode 100644 index 000000000..65e2a84e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/azure_communication_services_user_identityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AzureCommunicationServicesUserIdentityable +type AzureCommunicationServicesUserIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureCommunicationServicesResourceId()(*string) + SetAzureCommunicationServicesResourceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policy.go b/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policy.go new file mode 100644 index 000000000..a5463d8e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policy.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cAuthenticationMethodsPolicy +type B2cAuthenticationMethodsPolicy struct { + Entity + // The tenant admin can configure local accounts using email if the email and password authentication method is enabled. + isEmailPasswordAuthenticationEnabled *bool + // The tenant admin can configure local accounts using phone number if the phone number and one-time password authentication method is enabled. + isPhoneOneTimePasswordAuthenticationEnabled *bool + // The tenant admin can configure local accounts using username if the username and password authentication method is enabled. + isUserNameAuthenticationEnabled *bool +} +// NewB2cAuthenticationMethodsPolicy instantiates a new B2cAuthenticationMethodsPolicy and sets the default values. +func NewB2cAuthenticationMethodsPolicy()(*B2cAuthenticationMethodsPolicy) { + m := &B2cAuthenticationMethodsPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateB2cAuthenticationMethodsPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateB2cAuthenticationMethodsPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewB2cAuthenticationMethodsPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *B2cAuthenticationMethodsPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isEmailPasswordAuthenticationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEmailPasswordAuthenticationEnabled(val) + } + return nil + } + res["isPhoneOneTimePasswordAuthenticationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPhoneOneTimePasswordAuthenticationEnabled(val) + } + return nil + } + res["isUserNameAuthenticationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsUserNameAuthenticationEnabled(val) + } + return nil + } + return res +} +// GetIsEmailPasswordAuthenticationEnabled gets the isEmailPasswordAuthenticationEnabled property value. The tenant admin can configure local accounts using email if the email and password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) GetIsEmailPasswordAuthenticationEnabled()(*bool) { + return m.isEmailPasswordAuthenticationEnabled +} +// GetIsPhoneOneTimePasswordAuthenticationEnabled gets the isPhoneOneTimePasswordAuthenticationEnabled property value. The tenant admin can configure local accounts using phone number if the phone number and one-time password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) GetIsPhoneOneTimePasswordAuthenticationEnabled()(*bool) { + return m.isPhoneOneTimePasswordAuthenticationEnabled +} +// GetIsUserNameAuthenticationEnabled gets the isUserNameAuthenticationEnabled property value. The tenant admin can configure local accounts using username if the username and password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) GetIsUserNameAuthenticationEnabled()(*bool) { + return m.isUserNameAuthenticationEnabled +} +// Serialize serializes information the current object +func (m *B2cAuthenticationMethodsPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isEmailPasswordAuthenticationEnabled", m.GetIsEmailPasswordAuthenticationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPhoneOneTimePasswordAuthenticationEnabled", m.GetIsPhoneOneTimePasswordAuthenticationEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isUserNameAuthenticationEnabled", m.GetIsUserNameAuthenticationEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetIsEmailPasswordAuthenticationEnabled sets the isEmailPasswordAuthenticationEnabled property value. The tenant admin can configure local accounts using email if the email and password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) SetIsEmailPasswordAuthenticationEnabled(value *bool)() { + m.isEmailPasswordAuthenticationEnabled = value +} +// SetIsPhoneOneTimePasswordAuthenticationEnabled sets the isPhoneOneTimePasswordAuthenticationEnabled property value. The tenant admin can configure local accounts using phone number if the phone number and one-time password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) SetIsPhoneOneTimePasswordAuthenticationEnabled(value *bool)() { + m.isPhoneOneTimePasswordAuthenticationEnabled = value +} +// SetIsUserNameAuthenticationEnabled sets the isUserNameAuthenticationEnabled property value. The tenant admin can configure local accounts using username if the username and password authentication method is enabled. +func (m *B2cAuthenticationMethodsPolicy) SetIsUserNameAuthenticationEnabled(value *bool)() { + m.isUserNameAuthenticationEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policyable.go b/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policyable.go new file mode 100644 index 000000000..704255348 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_authentication_methods_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cAuthenticationMethodsPolicyable +type B2cAuthenticationMethodsPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEmailPasswordAuthenticationEnabled()(*bool) + GetIsPhoneOneTimePasswordAuthenticationEnabled()(*bool) + GetIsUserNameAuthenticationEnabled()(*bool) + SetIsEmailPasswordAuthenticationEnabled(value *bool)() + SetIsPhoneOneTimePasswordAuthenticationEnabled(value *bool)() + SetIsUserNameAuthenticationEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow.go b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow.go new file mode 100644 index 000000000..0699bec21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow.go @@ -0,0 +1,248 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cIdentityUserFlow +type B2cIdentityUserFlow struct { + IdentityUserFlow + // Configuration for enabling an API connector for use as part of the user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. + apiConnectorConfiguration UserFlowApiConnectorConfigurationable + // Indicates the default language of the b2cIdentityUserFlow that is used when no ui_locale tag is specified in the request. This field is RFC 5646 compliant. + defaultLanguageTag *string + // The identityProviders property + identityProviders []IdentityProviderable + // The property that determines whether language customization is enabled within the B2C user flow. Language customization is not enabled by default for B2C user flows. + isLanguageCustomizationEnabled *bool + // The languages supported for customization within the user flow. Language customization is not enabled by default in B2C user flows. + languages []UserFlowLanguageConfigurationable + // The user attribute assignments included in the user flow. + userAttributeAssignments []IdentityUserFlowAttributeAssignmentable + // The userFlowIdentityProviders property + userFlowIdentityProviders []IdentityProviderBaseable +} +// NewB2cIdentityUserFlow instantiates a new B2cIdentityUserFlow and sets the default values. +func NewB2cIdentityUserFlow()(*B2cIdentityUserFlow) { + m := &B2cIdentityUserFlow{ + IdentityUserFlow: *NewIdentityUserFlow(), + } + return m +} +// CreateB2cIdentityUserFlowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateB2cIdentityUserFlowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewB2cIdentityUserFlow(), nil +} +// GetApiConnectorConfiguration gets the apiConnectorConfiguration property value. Configuration for enabling an API connector for use as part of the user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. +func (m *B2cIdentityUserFlow) GetApiConnectorConfiguration()(UserFlowApiConnectorConfigurationable) { + return m.apiConnectorConfiguration +} +// GetDefaultLanguageTag gets the defaultLanguageTag property value. Indicates the default language of the b2cIdentityUserFlow that is used when no ui_locale tag is specified in the request. This field is RFC 5646 compliant. +func (m *B2cIdentityUserFlow) GetDefaultLanguageTag()(*string) { + return m.defaultLanguageTag +} +// GetFieldDeserializers the deserialization information for the current model +func (m *B2cIdentityUserFlow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityUserFlow.GetFieldDeserializers() + res["apiConnectorConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFlowApiConnectorConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApiConnectorConfiguration(val.(UserFlowApiConnectorConfigurationable)) + } + return nil + } + res["defaultLanguageTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLanguageTag(val) + } + return nil + } + res["identityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderable) + } + m.SetIdentityProviders(res) + } + return nil + } + res["isLanguageCustomizationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLanguageCustomizationEnabled(val) + } + return nil + } + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserFlowLanguageConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserFlowLanguageConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(UserFlowLanguageConfigurationable) + } + m.SetLanguages(res) + } + return nil + } + res["userAttributeAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityUserFlowAttributeAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityUserFlowAttributeAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IdentityUserFlowAttributeAssignmentable) + } + m.SetUserAttributeAssignments(res) + } + return nil + } + res["userFlowIdentityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderBaseable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderBaseable) + } + m.SetUserFlowIdentityProviders(res) + } + return nil + } + return res +} +// GetIdentityProviders gets the identityProviders property value. The identityProviders property +func (m *B2cIdentityUserFlow) GetIdentityProviders()([]IdentityProviderable) { + return m.identityProviders +} +// GetIsLanguageCustomizationEnabled gets the isLanguageCustomizationEnabled property value. The property that determines whether language customization is enabled within the B2C user flow. Language customization is not enabled by default for B2C user flows. +func (m *B2cIdentityUserFlow) GetIsLanguageCustomizationEnabled()(*bool) { + return m.isLanguageCustomizationEnabled +} +// GetLanguages gets the languages property value. The languages supported for customization within the user flow. Language customization is not enabled by default in B2C user flows. +func (m *B2cIdentityUserFlow) GetLanguages()([]UserFlowLanguageConfigurationable) { + return m.languages +} +// GetUserAttributeAssignments gets the userAttributeAssignments property value. The user attribute assignments included in the user flow. +func (m *B2cIdentityUserFlow) GetUserAttributeAssignments()([]IdentityUserFlowAttributeAssignmentable) { + return m.userAttributeAssignments +} +// GetUserFlowIdentityProviders gets the userFlowIdentityProviders property value. The userFlowIdentityProviders property +func (m *B2cIdentityUserFlow) GetUserFlowIdentityProviders()([]IdentityProviderBaseable) { + return m.userFlowIdentityProviders +} +// Serialize serializes information the current object +func (m *B2cIdentityUserFlow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityUserFlow.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("apiConnectorConfiguration", m.GetApiConnectorConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultLanguageTag", m.GetDefaultLanguageTag()) + if err != nil { + return err + } + } + if m.GetIdentityProviders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIdentityProviders())) + for i, v := range m.GetIdentityProviders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("identityProviders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLanguageCustomizationEnabled", m.GetIsLanguageCustomizationEnabled()) + if err != nil { + return err + } + } + if m.GetLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLanguages())) + for i, v := range m.GetLanguages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("languages", cast) + if err != nil { + return err + } + } + if m.GetUserAttributeAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserAttributeAssignments())) + for i, v := range m.GetUserAttributeAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userAttributeAssignments", cast) + if err != nil { + return err + } + } + if m.GetUserFlowIdentityProviders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserFlowIdentityProviders())) + for i, v := range m.GetUserFlowIdentityProviders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userFlowIdentityProviders", cast) + if err != nil { + return err + } + } + return nil +} +// SetApiConnectorConfiguration sets the apiConnectorConfiguration property value. Configuration for enabling an API connector for use as part of the user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. +func (m *B2cIdentityUserFlow) SetApiConnectorConfiguration(value UserFlowApiConnectorConfigurationable)() { + m.apiConnectorConfiguration = value +} +// SetDefaultLanguageTag sets the defaultLanguageTag property value. Indicates the default language of the b2cIdentityUserFlow that is used when no ui_locale tag is specified in the request. This field is RFC 5646 compliant. +func (m *B2cIdentityUserFlow) SetDefaultLanguageTag(value *string)() { + m.defaultLanguageTag = value +} +// SetIdentityProviders sets the identityProviders property value. The identityProviders property +func (m *B2cIdentityUserFlow) SetIdentityProviders(value []IdentityProviderable)() { + m.identityProviders = value +} +// SetIsLanguageCustomizationEnabled sets the isLanguageCustomizationEnabled property value. The property that determines whether language customization is enabled within the B2C user flow. Language customization is not enabled by default for B2C user flows. +func (m *B2cIdentityUserFlow) SetIsLanguageCustomizationEnabled(value *bool)() { + m.isLanguageCustomizationEnabled = value +} +// SetLanguages sets the languages property value. The languages supported for customization within the user flow. Language customization is not enabled by default in B2C user flows. +func (m *B2cIdentityUserFlow) SetLanguages(value []UserFlowLanguageConfigurationable)() { + m.languages = value +} +// SetUserAttributeAssignments sets the userAttributeAssignments property value. The user attribute assignments included in the user flow. +func (m *B2cIdentityUserFlow) SetUserAttributeAssignments(value []IdentityUserFlowAttributeAssignmentable)() { + m.userAttributeAssignments = value +} +// SetUserFlowIdentityProviders sets the userFlowIdentityProviders property value. The userFlowIdentityProviders property +func (m *B2cIdentityUserFlow) SetUserFlowIdentityProviders(value []IdentityProviderBaseable)() { + m.userFlowIdentityProviders = value +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_response.go b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_response.go new file mode 100644 index 000000000..be3d56cde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cIdentityUserFlowCollectionResponse +type B2cIdentityUserFlowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []B2cIdentityUserFlowable +} +// NewB2cIdentityUserFlowCollectionResponse instantiates a new B2cIdentityUserFlowCollectionResponse and sets the default values. +func NewB2cIdentityUserFlowCollectionResponse()(*B2cIdentityUserFlowCollectionResponse) { + m := &B2cIdentityUserFlowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateB2cIdentityUserFlowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateB2cIdentityUserFlowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewB2cIdentityUserFlowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *B2cIdentityUserFlowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateB2cIdentityUserFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]B2cIdentityUserFlowable, len(val)) + for i, v := range val { + res[i] = v.(B2cIdentityUserFlowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *B2cIdentityUserFlowCollectionResponse) GetValue()([]B2cIdentityUserFlowable) { + return m.value +} +// Serialize serializes information the current object +func (m *B2cIdentityUserFlowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *B2cIdentityUserFlowCollectionResponse) SetValue(value []B2cIdentityUserFlowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_responseable.go b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_responseable.go new file mode 100644 index 000000000..c6a3c723e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flow_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cIdentityUserFlowCollectionResponseable +type B2cIdentityUserFlowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]B2cIdentityUserFlowable) + SetValue(value []B2cIdentityUserFlowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/b2c_identity_user_flowable.go b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flowable.go new file mode 100644 index 000000000..af48bc7d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2c_identity_user_flowable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2cIdentityUserFlowable +type B2cIdentityUserFlowable interface { + IdentityUserFlowable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApiConnectorConfiguration()(UserFlowApiConnectorConfigurationable) + GetDefaultLanguageTag()(*string) + GetIdentityProviders()([]IdentityProviderable) + GetIsLanguageCustomizationEnabled()(*bool) + GetLanguages()([]UserFlowLanguageConfigurationable) + GetUserAttributeAssignments()([]IdentityUserFlowAttributeAssignmentable) + GetUserFlowIdentityProviders()([]IdentityProviderBaseable) + SetApiConnectorConfiguration(value UserFlowApiConnectorConfigurationable)() + SetDefaultLanguageTag(value *string)() + SetIdentityProviders(value []IdentityProviderable)() + SetIsLanguageCustomizationEnabled(value *bool)() + SetLanguages(value []UserFlowLanguageConfigurationable)() + SetUserAttributeAssignments(value []IdentityUserFlowAttributeAssignmentable)() + SetUserFlowIdentityProviders(value []IdentityProviderBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow.go b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow.go new file mode 100644 index 000000000..ff7559379 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2xIdentityUserFlow +type B2xIdentityUserFlow struct { + IdentityUserFlow + // Configuration for enabling an API connector for use as part of the self-service sign up user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. + apiConnectorConfiguration UserFlowApiConnectorConfigurationable + // The identityProviders property + identityProviders []IdentityProviderable + // The languages supported for customization within the user flow. Language customization is enabled by default in self-service sign up user flow. You cannot create custom languages in self-service sign up user flows. + languages []UserFlowLanguageConfigurationable + // The user attribute assignments included in the user flow. + userAttributeAssignments []IdentityUserFlowAttributeAssignmentable + // The userFlowIdentityProviders property + userFlowIdentityProviders []IdentityProviderBaseable +} +// NewB2xIdentityUserFlow instantiates a new B2xIdentityUserFlow and sets the default values. +func NewB2xIdentityUserFlow()(*B2xIdentityUserFlow) { + m := &B2xIdentityUserFlow{ + IdentityUserFlow: *NewIdentityUserFlow(), + } + return m +} +// CreateB2xIdentityUserFlowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateB2xIdentityUserFlowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewB2xIdentityUserFlow(), nil +} +// GetApiConnectorConfiguration gets the apiConnectorConfiguration property value. Configuration for enabling an API connector for use as part of the self-service sign up user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. +func (m *B2xIdentityUserFlow) GetApiConnectorConfiguration()(UserFlowApiConnectorConfigurationable) { + return m.apiConnectorConfiguration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *B2xIdentityUserFlow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityUserFlow.GetFieldDeserializers() + res["apiConnectorConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFlowApiConnectorConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApiConnectorConfiguration(val.(UserFlowApiConnectorConfigurationable)) + } + return nil + } + res["identityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderable) + } + m.SetIdentityProviders(res) + } + return nil + } + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserFlowLanguageConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserFlowLanguageConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(UserFlowLanguageConfigurationable) + } + m.SetLanguages(res) + } + return nil + } + res["userAttributeAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityUserFlowAttributeAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityUserFlowAttributeAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IdentityUserFlowAttributeAssignmentable) + } + m.SetUserAttributeAssignments(res) + } + return nil + } + res["userFlowIdentityProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderBaseable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderBaseable) + } + m.SetUserFlowIdentityProviders(res) + } + return nil + } + return res +} +// GetIdentityProviders gets the identityProviders property value. The identityProviders property +func (m *B2xIdentityUserFlow) GetIdentityProviders()([]IdentityProviderable) { + return m.identityProviders +} +// GetLanguages gets the languages property value. The languages supported for customization within the user flow. Language customization is enabled by default in self-service sign up user flow. You cannot create custom languages in self-service sign up user flows. +func (m *B2xIdentityUserFlow) GetLanguages()([]UserFlowLanguageConfigurationable) { + return m.languages +} +// GetUserAttributeAssignments gets the userAttributeAssignments property value. The user attribute assignments included in the user flow. +func (m *B2xIdentityUserFlow) GetUserAttributeAssignments()([]IdentityUserFlowAttributeAssignmentable) { + return m.userAttributeAssignments +} +// GetUserFlowIdentityProviders gets the userFlowIdentityProviders property value. The userFlowIdentityProviders property +func (m *B2xIdentityUserFlow) GetUserFlowIdentityProviders()([]IdentityProviderBaseable) { + return m.userFlowIdentityProviders +} +// Serialize serializes information the current object +func (m *B2xIdentityUserFlow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityUserFlow.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("apiConnectorConfiguration", m.GetApiConnectorConfiguration()) + if err != nil { + return err + } + } + if m.GetIdentityProviders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIdentityProviders())) + for i, v := range m.GetIdentityProviders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("identityProviders", cast) + if err != nil { + return err + } + } + if m.GetLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLanguages())) + for i, v := range m.GetLanguages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("languages", cast) + if err != nil { + return err + } + } + if m.GetUserAttributeAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserAttributeAssignments())) + for i, v := range m.GetUserAttributeAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userAttributeAssignments", cast) + if err != nil { + return err + } + } + if m.GetUserFlowIdentityProviders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserFlowIdentityProviders())) + for i, v := range m.GetUserFlowIdentityProviders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userFlowIdentityProviders", cast) + if err != nil { + return err + } + } + return nil +} +// SetApiConnectorConfiguration sets the apiConnectorConfiguration property value. Configuration for enabling an API connector for use as part of the self-service sign up user flow. You can only obtain the value of this object using Get userFlowApiConnectorConfiguration. +func (m *B2xIdentityUserFlow) SetApiConnectorConfiguration(value UserFlowApiConnectorConfigurationable)() { + m.apiConnectorConfiguration = value +} +// SetIdentityProviders sets the identityProviders property value. The identityProviders property +func (m *B2xIdentityUserFlow) SetIdentityProviders(value []IdentityProviderable)() { + m.identityProviders = value +} +// SetLanguages sets the languages property value. The languages supported for customization within the user flow. Language customization is enabled by default in self-service sign up user flow. You cannot create custom languages in self-service sign up user flows. +func (m *B2xIdentityUserFlow) SetLanguages(value []UserFlowLanguageConfigurationable)() { + m.languages = value +} +// SetUserAttributeAssignments sets the userAttributeAssignments property value. The user attribute assignments included in the user flow. +func (m *B2xIdentityUserFlow) SetUserAttributeAssignments(value []IdentityUserFlowAttributeAssignmentable)() { + m.userAttributeAssignments = value +} +// SetUserFlowIdentityProviders sets the userFlowIdentityProviders property value. The userFlowIdentityProviders property +func (m *B2xIdentityUserFlow) SetUserFlowIdentityProviders(value []IdentityProviderBaseable)() { + m.userFlowIdentityProviders = value +} diff --git a/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_response.go b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_response.go new file mode 100644 index 000000000..de457080f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2xIdentityUserFlowCollectionResponse +type B2xIdentityUserFlowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []B2xIdentityUserFlowable +} +// NewB2xIdentityUserFlowCollectionResponse instantiates a new B2xIdentityUserFlowCollectionResponse and sets the default values. +func NewB2xIdentityUserFlowCollectionResponse()(*B2xIdentityUserFlowCollectionResponse) { + m := &B2xIdentityUserFlowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateB2xIdentityUserFlowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateB2xIdentityUserFlowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewB2xIdentityUserFlowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *B2xIdentityUserFlowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateB2xIdentityUserFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]B2xIdentityUserFlowable, len(val)) + for i, v := range val { + res[i] = v.(B2xIdentityUserFlowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *B2xIdentityUserFlowCollectionResponse) GetValue()([]B2xIdentityUserFlowable) { + return m.value +} +// Serialize serializes information the current object +func (m *B2xIdentityUserFlowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *B2xIdentityUserFlowCollectionResponse) SetValue(value []B2xIdentityUserFlowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_responseable.go b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_responseable.go new file mode 100644 index 000000000..4f50965a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flow_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2xIdentityUserFlowCollectionResponseable +type B2xIdentityUserFlowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]B2xIdentityUserFlowable) + SetValue(value []B2xIdentityUserFlowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/b2x_identity_user_flowable.go b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flowable.go new file mode 100644 index 000000000..b860a1c62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/b2x_identity_user_flowable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// B2xIdentityUserFlowable +type B2xIdentityUserFlowable interface { + IdentityUserFlowable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApiConnectorConfiguration()(UserFlowApiConnectorConfigurationable) + GetIdentityProviders()([]IdentityProviderable) + GetLanguages()([]UserFlowLanguageConfigurationable) + GetUserAttributeAssignments()([]IdentityUserFlowAttributeAssignmentable) + GetUserFlowIdentityProviders()([]IdentityProviderBaseable) + SetApiConnectorConfiguration(value UserFlowApiConnectorConfigurationable)() + SetIdentityProviders(value []IdentityProviderable)() + SetLanguages(value []UserFlowLanguageConfigurationable)() + SetUserAttributeAssignments(value []IdentityUserFlowAttributeAssignmentable)() + SetUserFlowIdentityProviders(value []IdentityProviderBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/base_authentication_method.go b/src/internal/connector/graph/betasdk/models/base_authentication_method.go new file mode 100644 index 000000000..5c6dbea1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_authentication_method.go @@ -0,0 +1,67 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BaseAuthenticationMethod int + +const ( + PASSWORD_BASEAUTHENTICATIONMETHOD BaseAuthenticationMethod = iota + VOICE_BASEAUTHENTICATIONMETHOD + HARDWAREOATH_BASEAUTHENTICATIONMETHOD + SOFTWAREOATH_BASEAUTHENTICATIONMETHOD + SMS_BASEAUTHENTICATIONMETHOD + FIDO2_BASEAUTHENTICATIONMETHOD + WINDOWSHELLOFORBUSINESS_BASEAUTHENTICATIONMETHOD + MICROSOFTAUTHENTICATOR_BASEAUTHENTICATIONMETHOD + TEMPORARYACCESSPASS_BASEAUTHENTICATIONMETHOD + EMAIL_BASEAUTHENTICATIONMETHOD + X509CERTIFICATE_BASEAUTHENTICATIONMETHOD + FEDERATION_BASEAUTHENTICATIONMETHOD + UNKNOWNFUTUREVALUE_BASEAUTHENTICATIONMETHOD +) + +func (i BaseAuthenticationMethod) String() string { + return []string{"password", "voice", "hardwareOath", "softwareOath", "sms", "fido2", "windowsHelloForBusiness", "microsoftAuthenticator", "temporaryAccessPass", "email", "x509Certificate", "federation", "unknownFutureValue"}[i] +} +func ParseBaseAuthenticationMethod(v string) (interface{}, error) { + result := PASSWORD_BASEAUTHENTICATIONMETHOD + switch v { + case "password": + result = PASSWORD_BASEAUTHENTICATIONMETHOD + case "voice": + result = VOICE_BASEAUTHENTICATIONMETHOD + case "hardwareOath": + result = HARDWAREOATH_BASEAUTHENTICATIONMETHOD + case "softwareOath": + result = SOFTWAREOATH_BASEAUTHENTICATIONMETHOD + case "sms": + result = SMS_BASEAUTHENTICATIONMETHOD + case "fido2": + result = FIDO2_BASEAUTHENTICATIONMETHOD + case "windowsHelloForBusiness": + result = WINDOWSHELLOFORBUSINESS_BASEAUTHENTICATIONMETHOD + case "microsoftAuthenticator": + result = MICROSOFTAUTHENTICATOR_BASEAUTHENTICATIONMETHOD + case "temporaryAccessPass": + result = TEMPORARYACCESSPASS_BASEAUTHENTICATIONMETHOD + case "email": + result = EMAIL_BASEAUTHENTICATIONMETHOD + case "x509Certificate": + result = X509CERTIFICATE_BASEAUTHENTICATIONMETHOD + case "federation": + result = FEDERATION_BASEAUTHENTICATIONMETHOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BASEAUTHENTICATIONMETHOD + default: + return 0, errors.New("Unknown BaseAuthenticationMethod value: " + v) + } + return &result, nil +} +func SerializeBaseAuthenticationMethod(values []BaseAuthenticationMethod) []string { + 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/base_collection_pagination_count_response.go b/src/internal/connector/graph/betasdk/models/base_collection_pagination_count_response.go new file mode 100644 index 000000000..abdee3c9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_collection_pagination_count_response.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseCollectionPaginationCountResponse +type BaseCollectionPaginationCountResponse 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 OdataCount property + odataCount *int64 + // The OdataNextLink property + odataNextLink *string +} +// NewBaseCollectionPaginationCountResponse instantiates a new BaseCollectionPaginationCountResponse and sets the default values. +func NewBaseCollectionPaginationCountResponse()(*BaseCollectionPaginationCountResponse) { + m := &BaseCollectionPaginationCountResponse{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBaseCollectionPaginationCountResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBaseCollectionPaginationCountResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBaseCollectionPaginationCountResponse(), 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 *BaseCollectionPaginationCountResponse) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BaseCollectionPaginationCountResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOdataCount(val) + } + return nil + } + res["@odata.nextLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataNextLink(val) + } + return nil + } + return res +} +// GetOdataCount gets the @odata.count property value. The OdataCount property +func (m *BaseCollectionPaginationCountResponse) GetOdataCount()(*int64) { + return m.odataCount +} +// GetOdataNextLink gets the @odata.nextLink property value. The OdataNextLink property +func (m *BaseCollectionPaginationCountResponse) GetOdataNextLink()(*string) { + return m.odataNextLink +} +// Serialize serializes information the current object +func (m *BaseCollectionPaginationCountResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("@odata.count", m.GetOdataCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.nextLink", m.GetOdataNextLink()) + 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 *BaseCollectionPaginationCountResponse) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataCount sets the @odata.count property value. The OdataCount property +func (m *BaseCollectionPaginationCountResponse) SetOdataCount(value *int64)() { + m.odataCount = value +} +// SetOdataNextLink sets the @odata.nextLink property value. The OdataNextLink property +func (m *BaseCollectionPaginationCountResponse) SetOdataNextLink(value *string)() { + m.odataNextLink = value +} diff --git a/src/internal/connector/graph/betasdk/models/base_collection_pagination_count_responseable.go b/src/internal/connector/graph/betasdk/models/base_collection_pagination_count_responseable.go new file mode 100644 index 000000000..f6481c37b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_collection_pagination_count_responseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseCollectionPaginationCountResponseable +type BaseCollectionPaginationCountResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataCount()(*int64) + GetOdataNextLink()(*string) + SetOdataCount(value *int64)() + SetOdataNextLink(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/base_delta_function_response.go b/src/internal/connector/graph/betasdk/models/base_delta_function_response.go new file mode 100644 index 000000000..245e0d380 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_delta_function_response.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseDeltaFunctionResponse +type BaseDeltaFunctionResponse 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 OdataDeltaLink property + odataDeltaLink *string + // The OdataNextLink property + odataNextLink *string +} +// NewBaseDeltaFunctionResponse instantiates a new BaseDeltaFunctionResponse and sets the default values. +func NewBaseDeltaFunctionResponse()(*BaseDeltaFunctionResponse) { + m := &BaseDeltaFunctionResponse{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBaseDeltaFunctionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBaseDeltaFunctionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBaseDeltaFunctionResponse(), 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 *BaseDeltaFunctionResponse) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BaseDeltaFunctionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["@odata.deltaLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataDeltaLink(val) + } + return nil + } + res["@odata.nextLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOdataNextLink(val) + } + return nil + } + return res +} +// GetOdataDeltaLink gets the @odata.deltaLink property value. The OdataDeltaLink property +func (m *BaseDeltaFunctionResponse) GetOdataDeltaLink()(*string) { + return m.odataDeltaLink +} +// GetOdataNextLink gets the @odata.nextLink property value. The OdataNextLink property +func (m *BaseDeltaFunctionResponse) GetOdataNextLink()(*string) { + return m.odataNextLink +} +// Serialize serializes information the current object +func (m *BaseDeltaFunctionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.deltaLink", m.GetOdataDeltaLink()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.nextLink", m.GetOdataNextLink()) + 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 *BaseDeltaFunctionResponse) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataDeltaLink sets the @odata.deltaLink property value. The OdataDeltaLink property +func (m *BaseDeltaFunctionResponse) SetOdataDeltaLink(value *string)() { + m.odataDeltaLink = value +} +// SetOdataNextLink sets the @odata.nextLink property value. The OdataNextLink property +func (m *BaseDeltaFunctionResponse) SetOdataNextLink(value *string)() { + m.odataNextLink = value +} diff --git a/src/internal/connector/graph/betasdk/models/base_delta_function_responseable.go b/src/internal/connector/graph/betasdk/models/base_delta_function_responseable.go new file mode 100644 index 000000000..89825cd93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_delta_function_responseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseDeltaFunctionResponseable +type BaseDeltaFunctionResponseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataDeltaLink()(*string) + GetOdataNextLink()(*string) + SetOdataDeltaLink(value *string)() + SetOdataNextLink(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/base_item.go b/src/internal/connector/graph/betasdk/models/base_item.go new file mode 100644 index 000000000..035eb3203 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_item.go @@ -0,0 +1,351 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItem +type BaseItem struct { + Entity + // Identity of the user, device, or application which created the item. Read-only. + createdBy IdentitySetable + // The createdByUser property + createdByUser Userable + // Date and time of item creation. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // ETag for the item. Read-only. + eTag *string + // Identity of the user, device, and application which last modified the item. Read-only. + lastModifiedBy IdentitySetable + // The lastModifiedByUser property + lastModifiedByUser Userable + // Date and time the item was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the item. Read-write. + name *string + // Parent information, if the item has a parent. Read-write. + parentReference ItemReferenceable + // URL that displays the resource in the browser. Read-only. + webUrl *string +} +// NewBaseItem instantiates a new baseItem and sets the default values. +func NewBaseItem()(*BaseItem) { + m := &BaseItem{ + Entity: *NewEntity(), + } + return m +} +// CreateBaseItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBaseItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.drive": + return NewDrive(), nil + case "#microsoft.graph.driveItem": + return NewDriveItem(), nil + case "#microsoft.graph.list": + return NewList(), nil + case "#microsoft.graph.listItem": + return NewListItem(), nil + case "#microsoft.graph.sharedDriveItem": + return NewSharedDriveItem(), nil + case "#microsoft.graph.site": + return NewSite(), nil + case "#microsoft.graph.sitePage": + return NewSitePage(), nil + } + } + } + } + return NewBaseItem(), nil +} +// GetCreatedBy gets the createdBy property value. Identity of the user, device, or application which created the item. Read-only. +func (m *BaseItem) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedByUser gets the createdByUser property value. The createdByUser property +func (m *BaseItem) GetCreatedByUser()(Userable) { + return m.createdByUser +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of item creation. Read-only. +func (m *BaseItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *BaseItem) GetDescription()(*string) { + return m.description +} +// GetETag gets the eTag property value. ETag for the item. Read-only. +func (m *BaseItem) GetETag()(*string) { + return m.eTag +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BaseItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUser(val.(Userable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["eTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetETag(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedByUser(val.(Userable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parentReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentReference(val.(ItemReferenceable)) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only. +func (m *BaseItem) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedByUser gets the lastModifiedByUser property value. The lastModifiedByUser property +func (m *BaseItem) GetLastModifiedByUser()(Userable) { + return m.lastModifiedByUser +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only. +func (m *BaseItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. The name of the item. Read-write. +func (m *BaseItem) GetName()(*string) { + return m.name +} +// GetParentReference gets the parentReference property value. Parent information, if the item has a parent. Read-write. +func (m *BaseItem) GetParentReference()(ItemReferenceable) { + return m.parentReference +} +// GetWebUrl gets the webUrl property value. URL that displays the resource in the browser. Read-only. +func (m *BaseItem) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *BaseItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdByUser", m.GetCreatedByUser()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("eTag", m.GetETag()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedByUser", m.GetLastModifiedByUser()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentReference", m.GetParentReference()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. Identity of the user, device, or application which created the item. Read-only. +func (m *BaseItem) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedByUser sets the createdByUser property value. The createdByUser property +func (m *BaseItem) SetCreatedByUser(value Userable)() { + m.createdByUser = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of item creation. Read-only. +func (m *BaseItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *BaseItem) SetDescription(value *string)() { + m.description = value +} +// SetETag sets the eTag property value. ETag for the item. Read-only. +func (m *BaseItem) SetETag(value *string)() { + m.eTag = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only. +func (m *BaseItem) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedByUser sets the lastModifiedByUser property value. The lastModifiedByUser property +func (m *BaseItem) SetLastModifiedByUser(value Userable)() { + m.lastModifiedByUser = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only. +func (m *BaseItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. The name of the item. Read-write. +func (m *BaseItem) SetName(value *string)() { + m.name = value +} +// SetParentReference sets the parentReference property value. Parent information, if the item has a parent. Read-write. +func (m *BaseItem) SetParentReference(value ItemReferenceable)() { + m.parentReference = value +} +// SetWebUrl sets the webUrl property value. URL that displays the resource in the browser. Read-only. +func (m *BaseItem) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/base_item_collection_response.go b/src/internal/connector/graph/betasdk/models/base_item_collection_response.go new file mode 100644 index 000000000..0d551e141 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItemCollectionResponse +type BaseItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BaseItemable +} +// NewBaseItemCollectionResponse instantiates a new BaseItemCollectionResponse and sets the default values. +func NewBaseItemCollectionResponse()(*BaseItemCollectionResponse) { + m := &BaseItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBaseItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBaseItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBaseItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BaseItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBaseItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BaseItemable, len(val)) + for i, v := range val { + res[i] = v.(BaseItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BaseItemCollectionResponse) GetValue()([]BaseItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *BaseItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BaseItemCollectionResponse) SetValue(value []BaseItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/base_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/base_item_collection_responseable.go new file mode 100644 index 000000000..e581bd0c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItemCollectionResponseable +type BaseItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BaseItemable) + SetValue(value []BaseItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/base_item_version.go b/src/internal/connector/graph/betasdk/models/base_item_version.go new file mode 100644 index 000000000..78a5e5a42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_item_version.go @@ -0,0 +1,135 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItemVersion provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BaseItemVersion struct { + Entity + // Identity of the user which last modified the version. Read-only. + lastModifiedBy IdentitySetable + // Date and time the version was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates the publication status of this particular version. Read-only. + publication PublicationFacetable +} +// NewBaseItemVersion instantiates a new baseItemVersion and sets the default values. +func NewBaseItemVersion()(*BaseItemVersion) { + m := &BaseItemVersion{ + Entity: *NewEntity(), + } + return m +} +// CreateBaseItemVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBaseItemVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.documentSetVersion": + return NewDocumentSetVersion(), nil + case "#microsoft.graph.driveItemVersion": + return NewDriveItemVersion(), nil + case "#microsoft.graph.listItemVersion": + return NewListItemVersion(), nil + } + } + } + } + return NewBaseItemVersion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BaseItemVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["publication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicationFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublication(val.(PublicationFacetable)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user which last modified the version. Read-only. +func (m *BaseItemVersion) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time the version was last modified. Read-only. +func (m *BaseItemVersion) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPublication gets the publication property value. Indicates the publication status of this particular version. Read-only. +func (m *BaseItemVersion) GetPublication()(PublicationFacetable) { + return m.publication +} +// Serialize serializes information the current object +func (m *BaseItemVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publication", m.GetPublication()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user which last modified the version. Read-only. +func (m *BaseItemVersion) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time the version was last modified. Read-only. +func (m *BaseItemVersion) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPublication sets the publication property value. Indicates the publication status of this particular version. Read-only. +func (m *BaseItemVersion) SetPublication(value PublicationFacetable)() { + m.publication = value +} diff --git a/src/internal/connector/graph/betasdk/models/base_item_versionable.go b/src/internal/connector/graph/betasdk/models/base_item_versionable.go new file mode 100644 index 000000000..ee0b585f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_item_versionable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItemVersionable +type BaseItemVersionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublication()(PublicationFacetable) + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublication(value PublicationFacetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/base_itemable.go b/src/internal/connector/graph/betasdk/models/base_itemable.go new file mode 100644 index 000000000..42b826cd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/base_itemable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BaseItemable +type BaseItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedByUser()(Userable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetETag()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedByUser()(Userable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetParentReference()(ItemReferenceable) + GetWebUrl()(*string) + SetCreatedBy(value IdentitySetable)() + SetCreatedByUser(value Userable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetETag(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedByUser(value Userable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetParentReference(value ItemReferenceable)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/basic_authentication.go b/src/internal/connector/graph/betasdk/models/basic_authentication.go new file mode 100644 index 000000000..ade712dea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/basic_authentication.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BasicAuthentication +type BasicAuthentication struct { + ApiAuthenticationConfigurationBase + // The password. It is not returned in the responses. + password *string + // The username. + username *string +} +// NewBasicAuthentication instantiates a new BasicAuthentication and sets the default values. +func NewBasicAuthentication()(*BasicAuthentication) { + m := &BasicAuthentication{ + ApiAuthenticationConfigurationBase: *NewApiAuthenticationConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.basicAuthentication"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBasicAuthenticationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBasicAuthenticationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBasicAuthentication(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BasicAuthentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ApiAuthenticationConfigurationBase.GetFieldDeserializers() + res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassword(val) + } + return nil + } + res["username"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsername(val) + } + return nil + } + return res +} +// GetPassword gets the password property value. The password. It is not returned in the responses. +func (m *BasicAuthentication) GetPassword()(*string) { + return m.password +} +// GetUsername gets the username property value. The username. +func (m *BasicAuthentication) GetUsername()(*string) { + return m.username +} +// Serialize serializes information the current object +func (m *BasicAuthentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ApiAuthenticationConfigurationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("password", m.GetPassword()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("username", m.GetUsername()) + if err != nil { + return err + } + } + return nil +} +// SetPassword sets the password property value. The password. It is not returned in the responses. +func (m *BasicAuthentication) SetPassword(value *string)() { + m.password = value +} +// SetUsername sets the username property value. The username. +func (m *BasicAuthentication) SetUsername(value *string)() { + m.username = value +} diff --git a/src/internal/connector/graph/betasdk/models/basic_authenticationable.go b/src/internal/connector/graph/betasdk/models/basic_authenticationable.go new file mode 100644 index 000000000..de865cefa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/basic_authenticationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BasicAuthenticationable +type BasicAuthenticationable interface { + ApiAuthenticationConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPassword()(*string) + GetUsername()(*string) + SetPassword(value *string)() + SetUsername(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/binary_operator.go b/src/internal/connector/graph/betasdk/models/binary_operator.go new file mode 100644 index 000000000..cc3a15f06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/binary_operator.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BinaryOperator int + +const ( + OR_BINARYOPERATOR BinaryOperator = iota + AND_BINARYOPERATOR +) + +func (i BinaryOperator) String() string { + return []string{"or", "and"}[i] +} +func ParseBinaryOperator(v string) (interface{}, error) { + result := OR_BINARYOPERATOR + switch v { + case "or": + result = OR_BINARYOPERATOR + case "and": + result = AND_BINARYOPERATOR + default: + return 0, errors.New("Unknown BinaryOperator value: " + v) + } + return &result, nil +} +func SerializeBinaryOperator(values []BinaryOperator) []string { + 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/bit_locker_encryption_method.go b/src/internal/connector/graph/betasdk/models/bit_locker_encryption_method.go new file mode 100644 index 000000000..8dfa48cb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_encryption_method.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BitLockerEncryptionMethod int + +const ( + // AES-CBC 128-bit. + AESCBC128_BITLOCKERENCRYPTIONMETHOD BitLockerEncryptionMethod = iota + // AES-CBC 256-bit. + AESCBC256_BITLOCKERENCRYPTIONMETHOD + // XTS-AES 128-bit. + XTSAES128_BITLOCKERENCRYPTIONMETHOD + // XTS-AES 256-bit. + XTSAES256_BITLOCKERENCRYPTIONMETHOD +) + +func (i BitLockerEncryptionMethod) String() string { + return []string{"aesCbc128", "aesCbc256", "xtsAes128", "xtsAes256"}[i] +} +func ParseBitLockerEncryptionMethod(v string) (interface{}, error) { + result := AESCBC128_BITLOCKERENCRYPTIONMETHOD + switch v { + case "aesCbc128": + result = AESCBC128_BITLOCKERENCRYPTIONMETHOD + case "aesCbc256": + result = AESCBC256_BITLOCKERENCRYPTIONMETHOD + case "xtsAes128": + result = XTSAES128_BITLOCKERENCRYPTIONMETHOD + case "xtsAes256": + result = XTSAES256_BITLOCKERENCRYPTIONMETHOD + default: + return 0, errors.New("Unknown BitLockerEncryptionMethod value: " + v) + } + return &result, nil +} +func SerializeBitLockerEncryptionMethod(values []BitLockerEncryptionMethod) []string { + 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/bit_locker_fixed_drive_policy.go b/src/internal/connector/graph/betasdk/models/bit_locker_fixed_drive_policy.go new file mode 100644 index 000000000..c6789a423 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_fixed_drive_policy.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerFixedDrivePolicy bitLocker Fixed Drive Policies. +type BitLockerFixedDrivePolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Select the encryption method for fixed drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. + encryptionMethod *BitLockerEncryptionMethod + // The OdataType property + odataType *string + // This policy setting allows you to control how BitLocker-protected fixed data drives are recovered in the absence of the required credentials. This policy setting is applied when you turn on BitLocker. + recoveryOptions BitLockerRecoveryOptionsable + // This policy setting determines whether BitLocker protection is required for fixed data drives to be writable on a computer. + requireEncryptionForWriteAccess *bool +} +// NewBitLockerFixedDrivePolicy instantiates a new bitLockerFixedDrivePolicy and sets the default values. +func NewBitLockerFixedDrivePolicy()(*BitLockerFixedDrivePolicy) { + m := &BitLockerFixedDrivePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBitLockerFixedDrivePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitLockerFixedDrivePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitLockerFixedDrivePolicy(), 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 *BitLockerFixedDrivePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEncryptionMethod gets the encryptionMethod property value. Select the encryption method for fixed drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerFixedDrivePolicy) GetEncryptionMethod()(*BitLockerEncryptionMethod) { + return m.encryptionMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitLockerFixedDrivePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encryptionMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBitLockerEncryptionMethod) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionMethod(val.(*BitLockerEncryptionMethod)) + } + 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["recoveryOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBitLockerRecoveryOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecoveryOptions(val.(BitLockerRecoveryOptionsable)) + } + return nil + } + res["requireEncryptionForWriteAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireEncryptionForWriteAccess(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BitLockerFixedDrivePolicy) GetOdataType()(*string) { + return m.odataType +} +// GetRecoveryOptions gets the recoveryOptions property value. This policy setting allows you to control how BitLocker-protected fixed data drives are recovered in the absence of the required credentials. This policy setting is applied when you turn on BitLocker. +func (m *BitLockerFixedDrivePolicy) GetRecoveryOptions()(BitLockerRecoveryOptionsable) { + return m.recoveryOptions +} +// GetRequireEncryptionForWriteAccess gets the requireEncryptionForWriteAccess property value. This policy setting determines whether BitLocker protection is required for fixed data drives to be writable on a computer. +func (m *BitLockerFixedDrivePolicy) GetRequireEncryptionForWriteAccess()(*bool) { + return m.requireEncryptionForWriteAccess +} +// Serialize serializes information the current object +func (m *BitLockerFixedDrivePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEncryptionMethod() != nil { + cast := (*m.GetEncryptionMethod()).String() + err := writer.WriteStringValue("encryptionMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recoveryOptions", m.GetRecoveryOptions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("requireEncryptionForWriteAccess", m.GetRequireEncryptionForWriteAccess()) + 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 *BitLockerFixedDrivePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEncryptionMethod sets the encryptionMethod property value. Select the encryption method for fixed drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerFixedDrivePolicy) SetEncryptionMethod(value *BitLockerEncryptionMethod)() { + m.encryptionMethod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BitLockerFixedDrivePolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecoveryOptions sets the recoveryOptions property value. This policy setting allows you to control how BitLocker-protected fixed data drives are recovered in the absence of the required credentials. This policy setting is applied when you turn on BitLocker. +func (m *BitLockerFixedDrivePolicy) SetRecoveryOptions(value BitLockerRecoveryOptionsable)() { + m.recoveryOptions = value +} +// SetRequireEncryptionForWriteAccess sets the requireEncryptionForWriteAccess property value. This policy setting determines whether BitLocker protection is required for fixed data drives to be writable on a computer. +func (m *BitLockerFixedDrivePolicy) SetRequireEncryptionForWriteAccess(value *bool)() { + m.requireEncryptionForWriteAccess = value +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_fixed_drive_policyable.go b/src/internal/connector/graph/betasdk/models/bit_locker_fixed_drive_policyable.go new file mode 100644 index 000000000..2165d1925 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_fixed_drive_policyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerFixedDrivePolicyable +type BitLockerFixedDrivePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptionMethod()(*BitLockerEncryptionMethod) + GetOdataType()(*string) + GetRecoveryOptions()(BitLockerRecoveryOptionsable) + GetRequireEncryptionForWriteAccess()(*bool) + SetEncryptionMethod(value *BitLockerEncryptionMethod)() + SetOdataType(value *string)() + SetRecoveryOptions(value BitLockerRecoveryOptionsable)() + SetRequireEncryptionForWriteAccess(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_recovery_information_type.go b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_information_type.go new file mode 100644 index 000000000..f7fb618a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_information_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BitLockerRecoveryInformationType int + +const ( + // Store recovery passwords and key packages. + PASSWORDANDKEY_BITLOCKERRECOVERYINFORMATIONTYPE BitLockerRecoveryInformationType = iota + // Store recovery passwords only. + PASSWORDONLY_BITLOCKERRECOVERYINFORMATIONTYPE +) + +func (i BitLockerRecoveryInformationType) String() string { + return []string{"passwordAndKey", "passwordOnly"}[i] +} +func ParseBitLockerRecoveryInformationType(v string) (interface{}, error) { + result := PASSWORDANDKEY_BITLOCKERRECOVERYINFORMATIONTYPE + switch v { + case "passwordAndKey": + result = PASSWORDANDKEY_BITLOCKERRECOVERYINFORMATIONTYPE + case "passwordOnly": + result = PASSWORDONLY_BITLOCKERRECOVERYINFORMATIONTYPE + default: + return 0, errors.New("Unknown BitLockerRecoveryInformationType value: " + v) + } + return &result, nil +} +func SerializeBitLockerRecoveryInformationType(values []BitLockerRecoveryInformationType) []string { + 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/bit_locker_recovery_options.go b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_options.go new file mode 100644 index 000000000..29decce41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_options.go @@ -0,0 +1,256 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerRecoveryOptions bitLocker Recovery Options. +type BitLockerRecoveryOptions 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 whether to block certificate-based data recovery agent. + blockDataRecoveryAgent *bool + // Indicates whether or not to enable BitLocker until recovery information is stored in AD DS. + enableBitLockerAfterRecoveryInformationToStore *bool + // Indicates whether or not to allow BitLocker recovery information to store in AD DS. + enableRecoveryInformationSaveToStore *bool + // Indicates whether or not to allow showing recovery options in BitLocker Setup Wizard for fixed or system disk. + hideRecoveryOptions *bool + // The OdataType property + odataType *string + // BitLockerRecoveryInformationType types + recoveryInformationToStore *BitLockerRecoveryInformationType + // Possible values of the ConfigurationUsage list. + recoveryKeyUsage *ConfigurationUsage + // Possible values of the ConfigurationUsage list. + recoveryPasswordUsage *ConfigurationUsage +} +// NewBitLockerRecoveryOptions instantiates a new bitLockerRecoveryOptions and sets the default values. +func NewBitLockerRecoveryOptions()(*BitLockerRecoveryOptions) { + m := &BitLockerRecoveryOptions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBitLockerRecoveryOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitLockerRecoveryOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitLockerRecoveryOptions(), 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 *BitLockerRecoveryOptions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBlockDataRecoveryAgent gets the blockDataRecoveryAgent property value. Indicates whether to block certificate-based data recovery agent. +func (m *BitLockerRecoveryOptions) GetBlockDataRecoveryAgent()(*bool) { + return m.blockDataRecoveryAgent +} +// GetEnableBitLockerAfterRecoveryInformationToStore gets the enableBitLockerAfterRecoveryInformationToStore property value. Indicates whether or not to enable BitLocker until recovery information is stored in AD DS. +func (m *BitLockerRecoveryOptions) GetEnableBitLockerAfterRecoveryInformationToStore()(*bool) { + return m.enableBitLockerAfterRecoveryInformationToStore +} +// GetEnableRecoveryInformationSaveToStore gets the enableRecoveryInformationSaveToStore property value. Indicates whether or not to allow BitLocker recovery information to store in AD DS. +func (m *BitLockerRecoveryOptions) GetEnableRecoveryInformationSaveToStore()(*bool) { + return m.enableRecoveryInformationSaveToStore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitLockerRecoveryOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blockDataRecoveryAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockDataRecoveryAgent(val) + } + return nil + } + res["enableBitLockerAfterRecoveryInformationToStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableBitLockerAfterRecoveryInformationToStore(val) + } + return nil + } + res["enableRecoveryInformationSaveToStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableRecoveryInformationSaveToStore(val) + } + return nil + } + res["hideRecoveryOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideRecoveryOptions(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["recoveryInformationToStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBitLockerRecoveryInformationType) + if err != nil { + return err + } + if val != nil { + m.SetRecoveryInformationToStore(val.(*BitLockerRecoveryInformationType)) + } + return nil + } + res["recoveryKeyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetRecoveryKeyUsage(val.(*ConfigurationUsage)) + } + return nil + } + res["recoveryPasswordUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetRecoveryPasswordUsage(val.(*ConfigurationUsage)) + } + return nil + } + return res +} +// GetHideRecoveryOptions gets the hideRecoveryOptions property value. Indicates whether or not to allow showing recovery options in BitLocker Setup Wizard for fixed or system disk. +func (m *BitLockerRecoveryOptions) GetHideRecoveryOptions()(*bool) { + return m.hideRecoveryOptions +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BitLockerRecoveryOptions) GetOdataType()(*string) { + return m.odataType +} +// GetRecoveryInformationToStore gets the recoveryInformationToStore property value. BitLockerRecoveryInformationType types +func (m *BitLockerRecoveryOptions) GetRecoveryInformationToStore()(*BitLockerRecoveryInformationType) { + return m.recoveryInformationToStore +} +// GetRecoveryKeyUsage gets the recoveryKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerRecoveryOptions) GetRecoveryKeyUsage()(*ConfigurationUsage) { + return m.recoveryKeyUsage +} +// GetRecoveryPasswordUsage gets the recoveryPasswordUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerRecoveryOptions) GetRecoveryPasswordUsage()(*ConfigurationUsage) { + return m.recoveryPasswordUsage +} +// Serialize serializes information the current object +func (m *BitLockerRecoveryOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("blockDataRecoveryAgent", m.GetBlockDataRecoveryAgent()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableBitLockerAfterRecoveryInformationToStore", m.GetEnableBitLockerAfterRecoveryInformationToStore()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableRecoveryInformationSaveToStore", m.GetEnableRecoveryInformationSaveToStore()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideRecoveryOptions", m.GetHideRecoveryOptions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecoveryInformationToStore() != nil { + cast := (*m.GetRecoveryInformationToStore()).String() + err := writer.WriteStringValue("recoveryInformationToStore", &cast) + if err != nil { + return err + } + } + if m.GetRecoveryKeyUsage() != nil { + cast := (*m.GetRecoveryKeyUsage()).String() + err := writer.WriteStringValue("recoveryKeyUsage", &cast) + if err != nil { + return err + } + } + if m.GetRecoveryPasswordUsage() != nil { + cast := (*m.GetRecoveryPasswordUsage()).String() + err := writer.WriteStringValue("recoveryPasswordUsage", &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 *BitLockerRecoveryOptions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBlockDataRecoveryAgent sets the blockDataRecoveryAgent property value. Indicates whether to block certificate-based data recovery agent. +func (m *BitLockerRecoveryOptions) SetBlockDataRecoveryAgent(value *bool)() { + m.blockDataRecoveryAgent = value +} +// SetEnableBitLockerAfterRecoveryInformationToStore sets the enableBitLockerAfterRecoveryInformationToStore property value. Indicates whether or not to enable BitLocker until recovery information is stored in AD DS. +func (m *BitLockerRecoveryOptions) SetEnableBitLockerAfterRecoveryInformationToStore(value *bool)() { + m.enableBitLockerAfterRecoveryInformationToStore = value +} +// SetEnableRecoveryInformationSaveToStore sets the enableRecoveryInformationSaveToStore property value. Indicates whether or not to allow BitLocker recovery information to store in AD DS. +func (m *BitLockerRecoveryOptions) SetEnableRecoveryInformationSaveToStore(value *bool)() { + m.enableRecoveryInformationSaveToStore = value +} +// SetHideRecoveryOptions sets the hideRecoveryOptions property value. Indicates whether or not to allow showing recovery options in BitLocker Setup Wizard for fixed or system disk. +func (m *BitLockerRecoveryOptions) SetHideRecoveryOptions(value *bool)() { + m.hideRecoveryOptions = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BitLockerRecoveryOptions) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecoveryInformationToStore sets the recoveryInformationToStore property value. BitLockerRecoveryInformationType types +func (m *BitLockerRecoveryOptions) SetRecoveryInformationToStore(value *BitLockerRecoveryInformationType)() { + m.recoveryInformationToStore = value +} +// SetRecoveryKeyUsage sets the recoveryKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerRecoveryOptions) SetRecoveryKeyUsage(value *ConfigurationUsage)() { + m.recoveryKeyUsage = value +} +// SetRecoveryPasswordUsage sets the recoveryPasswordUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerRecoveryOptions) SetRecoveryPasswordUsage(value *ConfigurationUsage)() { + m.recoveryPasswordUsage = value +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_recovery_optionsable.go b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_optionsable.go new file mode 100644 index 000000000..fdf501a5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_optionsable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerRecoveryOptionsable +type BitLockerRecoveryOptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlockDataRecoveryAgent()(*bool) + GetEnableBitLockerAfterRecoveryInformationToStore()(*bool) + GetEnableRecoveryInformationSaveToStore()(*bool) + GetHideRecoveryOptions()(*bool) + GetOdataType()(*string) + GetRecoveryInformationToStore()(*BitLockerRecoveryInformationType) + GetRecoveryKeyUsage()(*ConfigurationUsage) + GetRecoveryPasswordUsage()(*ConfigurationUsage) + SetBlockDataRecoveryAgent(value *bool)() + SetEnableBitLockerAfterRecoveryInformationToStore(value *bool)() + SetEnableRecoveryInformationSaveToStore(value *bool)() + SetHideRecoveryOptions(value *bool)() + SetOdataType(value *string)() + SetRecoveryInformationToStore(value *BitLockerRecoveryInformationType)() + SetRecoveryKeyUsage(value *ConfigurationUsage)() + SetRecoveryPasswordUsage(value *ConfigurationUsage)() +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_recovery_password_rotation_type.go b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_password_rotation_type.go new file mode 100644 index 000000000..f3c29bb28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_recovery_password_rotation_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BitLockerRecoveryPasswordRotationType int + +const ( + // Not configured + NOTCONFIGURED_BITLOCKERRECOVERYPASSWORDROTATIONTYPE BitLockerRecoveryPasswordRotationType = iota + // Recovery password rotation off + DISABLED_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + // Recovery password rotation on for Azure AD joined devices + ENABLEDFORAZUREAD_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + // Recovery password rotation on for both Azure AD joined and hybrid joined devices + ENABLEDFORAZUREADANDHYBRID_BITLOCKERRECOVERYPASSWORDROTATIONTYPE +) + +func (i BitLockerRecoveryPasswordRotationType) String() string { + return []string{"notConfigured", "disabled", "enabledForAzureAd", "enabledForAzureAdAndHybrid"}[i] +} +func ParseBitLockerRecoveryPasswordRotationType(v string) (interface{}, error) { + result := NOTCONFIGURED_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + case "disabled": + result = DISABLED_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + case "enabledForAzureAd": + result = ENABLEDFORAZUREAD_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + case "enabledForAzureAdAndHybrid": + result = ENABLEDFORAZUREADANDHYBRID_BITLOCKERRECOVERYPASSWORDROTATIONTYPE + default: + return 0, errors.New("Unknown BitLockerRecoveryPasswordRotationType value: " + v) + } + return &result, nil +} +func SerializeBitLockerRecoveryPasswordRotationType(values []BitLockerRecoveryPasswordRotationType) []string { + 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/bit_locker_removable_drive_policy.go b/src/internal/connector/graph/betasdk/models/bit_locker_removable_drive_policy.go new file mode 100644 index 000000000..b2b0e0c0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_removable_drive_policy.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerRemovableDrivePolicy bitLocker Removable Drive Policies. +type BitLockerRemovableDrivePolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // This policy setting determines whether BitLocker protection is required for removable data drives to be writable on a computer. + blockCrossOrganizationWriteAccess *bool + // Select the encryption method for removable drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. + encryptionMethod *BitLockerEncryptionMethod + // The OdataType property + odataType *string + // Indicates whether to block write access to devices configured in another organization. If requireEncryptionForWriteAccess is false, this value does not affect. + requireEncryptionForWriteAccess *bool +} +// NewBitLockerRemovableDrivePolicy instantiates a new bitLockerRemovableDrivePolicy and sets the default values. +func NewBitLockerRemovableDrivePolicy()(*BitLockerRemovableDrivePolicy) { + m := &BitLockerRemovableDrivePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBitLockerRemovableDrivePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitLockerRemovableDrivePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitLockerRemovableDrivePolicy(), 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 *BitLockerRemovableDrivePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBlockCrossOrganizationWriteAccess gets the blockCrossOrganizationWriteAccess property value. This policy setting determines whether BitLocker protection is required for removable data drives to be writable on a computer. +func (m *BitLockerRemovableDrivePolicy) GetBlockCrossOrganizationWriteAccess()(*bool) { + return m.blockCrossOrganizationWriteAccess +} +// GetEncryptionMethod gets the encryptionMethod property value. Select the encryption method for removable drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerRemovableDrivePolicy) GetEncryptionMethod()(*BitLockerEncryptionMethod) { + return m.encryptionMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitLockerRemovableDrivePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blockCrossOrganizationWriteAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockCrossOrganizationWriteAccess(val) + } + return nil + } + res["encryptionMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBitLockerEncryptionMethod) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionMethod(val.(*BitLockerEncryptionMethod)) + } + 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["requireEncryptionForWriteAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireEncryptionForWriteAccess(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BitLockerRemovableDrivePolicy) GetOdataType()(*string) { + return m.odataType +} +// GetRequireEncryptionForWriteAccess gets the requireEncryptionForWriteAccess property value. Indicates whether to block write access to devices configured in another organization. If requireEncryptionForWriteAccess is false, this value does not affect. +func (m *BitLockerRemovableDrivePolicy) GetRequireEncryptionForWriteAccess()(*bool) { + return m.requireEncryptionForWriteAccess +} +// Serialize serializes information the current object +func (m *BitLockerRemovableDrivePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("blockCrossOrganizationWriteAccess", m.GetBlockCrossOrganizationWriteAccess()) + if err != nil { + return err + } + } + if m.GetEncryptionMethod() != nil { + cast := (*m.GetEncryptionMethod()).String() + err := writer.WriteStringValue("encryptionMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("requireEncryptionForWriteAccess", m.GetRequireEncryptionForWriteAccess()) + 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 *BitLockerRemovableDrivePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBlockCrossOrganizationWriteAccess sets the blockCrossOrganizationWriteAccess property value. This policy setting determines whether BitLocker protection is required for removable data drives to be writable on a computer. +func (m *BitLockerRemovableDrivePolicy) SetBlockCrossOrganizationWriteAccess(value *bool)() { + m.blockCrossOrganizationWriteAccess = value +} +// SetEncryptionMethod sets the encryptionMethod property value. Select the encryption method for removable drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerRemovableDrivePolicy) SetEncryptionMethod(value *BitLockerEncryptionMethod)() { + m.encryptionMethod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BitLockerRemovableDrivePolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRequireEncryptionForWriteAccess sets the requireEncryptionForWriteAccess property value. Indicates whether to block write access to devices configured in another organization. If requireEncryptionForWriteAccess is false, this value does not affect. +func (m *BitLockerRemovableDrivePolicy) SetRequireEncryptionForWriteAccess(value *bool)() { + m.requireEncryptionForWriteAccess = value +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_removable_drive_policyable.go b/src/internal/connector/graph/betasdk/models/bit_locker_removable_drive_policyable.go new file mode 100644 index 000000000..f0bd12b7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_removable_drive_policyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerRemovableDrivePolicyable +type BitLockerRemovableDrivePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlockCrossOrganizationWriteAccess()(*bool) + GetEncryptionMethod()(*BitLockerEncryptionMethod) + GetOdataType()(*string) + GetRequireEncryptionForWriteAccess()(*bool) + SetBlockCrossOrganizationWriteAccess(value *bool)() + SetEncryptionMethod(value *BitLockerEncryptionMethod)() + SetOdataType(value *string)() + SetRequireEncryptionForWriteAccess(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policy.go b/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policy.go new file mode 100644 index 000000000..d6bdad99f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policy.go @@ -0,0 +1,388 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerSystemDrivePolicy bitLocker Encryption Base Policies. +type BitLockerSystemDrivePolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Select the encryption method for operating system drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. + encryptionMethod *BitLockerEncryptionMethod + // Indicates the minimum length of startup pin. Valid values 4 to 20 + minimumPinLength *int32 + // The OdataType property + odataType *string + // Enable pre-boot recovery message and Url. If requireStartupAuthentication is false, this value does not affect. + prebootRecoveryEnableMessageAndUrl *bool + // Defines a custom recovery message. + prebootRecoveryMessage *string + // Defines a custom recovery URL. + prebootRecoveryUrl *string + // Allows to recover BitLocker encrypted operating system drives in the absence of the required startup key information. This policy setting is applied when you turn on BitLocker. + recoveryOptions BitLockerRecoveryOptionsable + // Indicates whether to allow BitLocker without a compatible TPM (requires a password or a startup key on a USB flash drive). + startupAuthenticationBlockWithoutTpmChip *bool + // Require additional authentication at startup. + startupAuthenticationRequired *bool + // Possible values of the ConfigurationUsage list. + startupAuthenticationTpmKeyUsage *ConfigurationUsage + // Possible values of the ConfigurationUsage list. + startupAuthenticationTpmPinAndKeyUsage *ConfigurationUsage + // Possible values of the ConfigurationUsage list. + startupAuthenticationTpmPinUsage *ConfigurationUsage + // Possible values of the ConfigurationUsage list. + startupAuthenticationTpmUsage *ConfigurationUsage +} +// NewBitLockerSystemDrivePolicy instantiates a new bitLockerSystemDrivePolicy and sets the default values. +func NewBitLockerSystemDrivePolicy()(*BitLockerSystemDrivePolicy) { + m := &BitLockerSystemDrivePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBitLockerSystemDrivePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitLockerSystemDrivePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitLockerSystemDrivePolicy(), 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 *BitLockerSystemDrivePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEncryptionMethod gets the encryptionMethod property value. Select the encryption method for operating system drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerSystemDrivePolicy) GetEncryptionMethod()(*BitLockerEncryptionMethod) { + return m.encryptionMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitLockerSystemDrivePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encryptionMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBitLockerEncryptionMethod) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionMethod(val.(*BitLockerEncryptionMethod)) + } + return nil + } + res["minimumPinLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumPinLength(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["prebootRecoveryEnableMessageAndUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrebootRecoveryEnableMessageAndUrl(val) + } + return nil + } + res["prebootRecoveryMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrebootRecoveryMessage(val) + } + return nil + } + res["prebootRecoveryUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrebootRecoveryUrl(val) + } + return nil + } + res["recoveryOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBitLockerRecoveryOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecoveryOptions(val.(BitLockerRecoveryOptionsable)) + } + return nil + } + res["startupAuthenticationBlockWithoutTpmChip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationBlockWithoutTpmChip(val) + } + return nil + } + res["startupAuthenticationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationRequired(val) + } + return nil + } + res["startupAuthenticationTpmKeyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationTpmKeyUsage(val.(*ConfigurationUsage)) + } + return nil + } + res["startupAuthenticationTpmPinAndKeyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationTpmPinAndKeyUsage(val.(*ConfigurationUsage)) + } + return nil + } + res["startupAuthenticationTpmPinUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationTpmPinUsage(val.(*ConfigurationUsage)) + } + return nil + } + res["startupAuthenticationTpmUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationUsage) + if err != nil { + return err + } + if val != nil { + m.SetStartupAuthenticationTpmUsage(val.(*ConfigurationUsage)) + } + return nil + } + return res +} +// GetMinimumPinLength gets the minimumPinLength property value. Indicates the minimum length of startup pin. Valid values 4 to 20 +func (m *BitLockerSystemDrivePolicy) GetMinimumPinLength()(*int32) { + return m.minimumPinLength +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BitLockerSystemDrivePolicy) GetOdataType()(*string) { + return m.odataType +} +// GetPrebootRecoveryEnableMessageAndUrl gets the prebootRecoveryEnableMessageAndUrl property value. Enable pre-boot recovery message and Url. If requireStartupAuthentication is false, this value does not affect. +func (m *BitLockerSystemDrivePolicy) GetPrebootRecoveryEnableMessageAndUrl()(*bool) { + return m.prebootRecoveryEnableMessageAndUrl +} +// GetPrebootRecoveryMessage gets the prebootRecoveryMessage property value. Defines a custom recovery message. +func (m *BitLockerSystemDrivePolicy) GetPrebootRecoveryMessage()(*string) { + return m.prebootRecoveryMessage +} +// GetPrebootRecoveryUrl gets the prebootRecoveryUrl property value. Defines a custom recovery URL. +func (m *BitLockerSystemDrivePolicy) GetPrebootRecoveryUrl()(*string) { + return m.prebootRecoveryUrl +} +// GetRecoveryOptions gets the recoveryOptions property value. Allows to recover BitLocker encrypted operating system drives in the absence of the required startup key information. This policy setting is applied when you turn on BitLocker. +func (m *BitLockerSystemDrivePolicy) GetRecoveryOptions()(BitLockerRecoveryOptionsable) { + return m.recoveryOptions +} +// GetStartupAuthenticationBlockWithoutTpmChip gets the startupAuthenticationBlockWithoutTpmChip property value. Indicates whether to allow BitLocker without a compatible TPM (requires a password or a startup key on a USB flash drive). +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationBlockWithoutTpmChip()(*bool) { + return m.startupAuthenticationBlockWithoutTpmChip +} +// GetStartupAuthenticationRequired gets the startupAuthenticationRequired property value. Require additional authentication at startup. +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationRequired()(*bool) { + return m.startupAuthenticationRequired +} +// GetStartupAuthenticationTpmKeyUsage gets the startupAuthenticationTpmKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationTpmKeyUsage()(*ConfigurationUsage) { + return m.startupAuthenticationTpmKeyUsage +} +// GetStartupAuthenticationTpmPinAndKeyUsage gets the startupAuthenticationTpmPinAndKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationTpmPinAndKeyUsage()(*ConfigurationUsage) { + return m.startupAuthenticationTpmPinAndKeyUsage +} +// GetStartupAuthenticationTpmPinUsage gets the startupAuthenticationTpmPinUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationTpmPinUsage()(*ConfigurationUsage) { + return m.startupAuthenticationTpmPinUsage +} +// GetStartupAuthenticationTpmUsage gets the startupAuthenticationTpmUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) GetStartupAuthenticationTpmUsage()(*ConfigurationUsage) { + return m.startupAuthenticationTpmUsage +} +// Serialize serializes information the current object +func (m *BitLockerSystemDrivePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEncryptionMethod() != nil { + cast := (*m.GetEncryptionMethod()).String() + err := writer.WriteStringValue("encryptionMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minimumPinLength", m.GetMinimumPinLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("prebootRecoveryEnableMessageAndUrl", m.GetPrebootRecoveryEnableMessageAndUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("prebootRecoveryMessage", m.GetPrebootRecoveryMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("prebootRecoveryUrl", m.GetPrebootRecoveryUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recoveryOptions", m.GetRecoveryOptions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("startupAuthenticationBlockWithoutTpmChip", m.GetStartupAuthenticationBlockWithoutTpmChip()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("startupAuthenticationRequired", m.GetStartupAuthenticationRequired()) + if err != nil { + return err + } + } + if m.GetStartupAuthenticationTpmKeyUsage() != nil { + cast := (*m.GetStartupAuthenticationTpmKeyUsage()).String() + err := writer.WriteStringValue("startupAuthenticationTpmKeyUsage", &cast) + if err != nil { + return err + } + } + if m.GetStartupAuthenticationTpmPinAndKeyUsage() != nil { + cast := (*m.GetStartupAuthenticationTpmPinAndKeyUsage()).String() + err := writer.WriteStringValue("startupAuthenticationTpmPinAndKeyUsage", &cast) + if err != nil { + return err + } + } + if m.GetStartupAuthenticationTpmPinUsage() != nil { + cast := (*m.GetStartupAuthenticationTpmPinUsage()).String() + err := writer.WriteStringValue("startupAuthenticationTpmPinUsage", &cast) + if err != nil { + return err + } + } + if m.GetStartupAuthenticationTpmUsage() != nil { + cast := (*m.GetStartupAuthenticationTpmUsage()).String() + err := writer.WriteStringValue("startupAuthenticationTpmUsage", &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 *BitLockerSystemDrivePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEncryptionMethod sets the encryptionMethod property value. Select the encryption method for operating system drives. Possible values are: aesCbc128, aesCbc256, xtsAes128, xtsAes256. +func (m *BitLockerSystemDrivePolicy) SetEncryptionMethod(value *BitLockerEncryptionMethod)() { + m.encryptionMethod = value +} +// SetMinimumPinLength sets the minimumPinLength property value. Indicates the minimum length of startup pin. Valid values 4 to 20 +func (m *BitLockerSystemDrivePolicy) SetMinimumPinLength(value *int32)() { + m.minimumPinLength = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BitLockerSystemDrivePolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrebootRecoveryEnableMessageAndUrl sets the prebootRecoveryEnableMessageAndUrl property value. Enable pre-boot recovery message and Url. If requireStartupAuthentication is false, this value does not affect. +func (m *BitLockerSystemDrivePolicy) SetPrebootRecoveryEnableMessageAndUrl(value *bool)() { + m.prebootRecoveryEnableMessageAndUrl = value +} +// SetPrebootRecoveryMessage sets the prebootRecoveryMessage property value. Defines a custom recovery message. +func (m *BitLockerSystemDrivePolicy) SetPrebootRecoveryMessage(value *string)() { + m.prebootRecoveryMessage = value +} +// SetPrebootRecoveryUrl sets the prebootRecoveryUrl property value. Defines a custom recovery URL. +func (m *BitLockerSystemDrivePolicy) SetPrebootRecoveryUrl(value *string)() { + m.prebootRecoveryUrl = value +} +// SetRecoveryOptions sets the recoveryOptions property value. Allows to recover BitLocker encrypted operating system drives in the absence of the required startup key information. This policy setting is applied when you turn on BitLocker. +func (m *BitLockerSystemDrivePolicy) SetRecoveryOptions(value BitLockerRecoveryOptionsable)() { + m.recoveryOptions = value +} +// SetStartupAuthenticationBlockWithoutTpmChip sets the startupAuthenticationBlockWithoutTpmChip property value. Indicates whether to allow BitLocker without a compatible TPM (requires a password or a startup key on a USB flash drive). +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationBlockWithoutTpmChip(value *bool)() { + m.startupAuthenticationBlockWithoutTpmChip = value +} +// SetStartupAuthenticationRequired sets the startupAuthenticationRequired property value. Require additional authentication at startup. +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationRequired(value *bool)() { + m.startupAuthenticationRequired = value +} +// SetStartupAuthenticationTpmKeyUsage sets the startupAuthenticationTpmKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationTpmKeyUsage(value *ConfigurationUsage)() { + m.startupAuthenticationTpmKeyUsage = value +} +// SetStartupAuthenticationTpmPinAndKeyUsage sets the startupAuthenticationTpmPinAndKeyUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationTpmPinAndKeyUsage(value *ConfigurationUsage)() { + m.startupAuthenticationTpmPinAndKeyUsage = value +} +// SetStartupAuthenticationTpmPinUsage sets the startupAuthenticationTpmPinUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationTpmPinUsage(value *ConfigurationUsage)() { + m.startupAuthenticationTpmPinUsage = value +} +// SetStartupAuthenticationTpmUsage sets the startupAuthenticationTpmUsage property value. Possible values of the ConfigurationUsage list. +func (m *BitLockerSystemDrivePolicy) SetStartupAuthenticationTpmUsage(value *ConfigurationUsage)() { + m.startupAuthenticationTpmUsage = value +} diff --git a/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policyable.go b/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policyable.go new file mode 100644 index 000000000..60e837800 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bit_locker_system_drive_policyable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitLockerSystemDrivePolicyable +type BitLockerSystemDrivePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptionMethod()(*BitLockerEncryptionMethod) + GetMinimumPinLength()(*int32) + GetOdataType()(*string) + GetPrebootRecoveryEnableMessageAndUrl()(*bool) + GetPrebootRecoveryMessage()(*string) + GetPrebootRecoveryUrl()(*string) + GetRecoveryOptions()(BitLockerRecoveryOptionsable) + GetStartupAuthenticationBlockWithoutTpmChip()(*bool) + GetStartupAuthenticationRequired()(*bool) + GetStartupAuthenticationTpmKeyUsage()(*ConfigurationUsage) + GetStartupAuthenticationTpmPinAndKeyUsage()(*ConfigurationUsage) + GetStartupAuthenticationTpmPinUsage()(*ConfigurationUsage) + GetStartupAuthenticationTpmUsage()(*ConfigurationUsage) + SetEncryptionMethod(value *BitLockerEncryptionMethod)() + SetMinimumPinLength(value *int32)() + SetOdataType(value *string)() + SetPrebootRecoveryEnableMessageAndUrl(value *bool)() + SetPrebootRecoveryMessage(value *string)() + SetPrebootRecoveryUrl(value *string)() + SetRecoveryOptions(value BitLockerRecoveryOptionsable)() + SetStartupAuthenticationBlockWithoutTpmChip(value *bool)() + SetStartupAuthenticationRequired(value *bool)() + SetStartupAuthenticationTpmKeyUsage(value *ConfigurationUsage)() + SetStartupAuthenticationTpmPinAndKeyUsage(value *ConfigurationUsage)() + SetStartupAuthenticationTpmPinUsage(value *ConfigurationUsage)() + SetStartupAuthenticationTpmUsage(value *ConfigurationUsage)() +} diff --git a/src/internal/connector/graph/betasdk/models/bitlocker.go b/src/internal/connector/graph/betasdk/models/bitlocker.go new file mode 100644 index 000000000..87c379d92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlocker.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Bitlocker +type Bitlocker struct { + Entity + // The recovery keys associated with the bitlocker entity. + recoveryKeys []BitlockerRecoveryKeyable +} +// NewBitlocker instantiates a new bitlocker and sets the default values. +func NewBitlocker()(*Bitlocker) { + m := &Bitlocker{ + Entity: *NewEntity(), + } + return m +} +// CreateBitlockerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitlockerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitlocker(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Bitlocker) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["recoveryKeys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBitlockerRecoveryKeyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BitlockerRecoveryKeyable, len(val)) + for i, v := range val { + res[i] = v.(BitlockerRecoveryKeyable) + } + m.SetRecoveryKeys(res) + } + return nil + } + return res +} +// GetRecoveryKeys gets the recoveryKeys property value. The recovery keys associated with the bitlocker entity. +func (m *Bitlocker) GetRecoveryKeys()([]BitlockerRecoveryKeyable) { + return m.recoveryKeys +} +// Serialize serializes information the current object +func (m *Bitlocker) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetRecoveryKeys() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecoveryKeys())) + for i, v := range m.GetRecoveryKeys() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("recoveryKeys", cast) + if err != nil { + return err + } + } + return nil +} +// SetRecoveryKeys sets the recoveryKeys property value. The recovery keys associated with the bitlocker entity. +func (m *Bitlocker) SetRecoveryKeys(value []BitlockerRecoveryKeyable)() { + m.recoveryKeys = value +} diff --git a/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key.go b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key.go new file mode 100644 index 000000000..81b89b252 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitlockerRecoveryKey provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BitlockerRecoveryKey struct { + Entity + // The date and time when the key was originally backed up to Azure Active Directory. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // ID of the device the BitLocker key is originally backed up from. + deviceId *string + // The BitLocker recovery key. + key *string + // Indicates the type of volume the BitLocker key is associated with. Possible values are: operatingSystemVolume, fixedDataVolume, removableDataVolume, unknownFutureValue. + volumeType *VolumeType +} +// NewBitlockerRecoveryKey instantiates a new bitlockerRecoveryKey and sets the default values. +func NewBitlockerRecoveryKey()(*BitlockerRecoveryKey) { + m := &BitlockerRecoveryKey{ + Entity: *NewEntity(), + } + return m +} +// CreateBitlockerRecoveryKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitlockerRecoveryKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitlockerRecoveryKey(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the key was originally backed up to Azure Active Directory. +func (m *BitlockerRecoveryKey) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeviceId gets the deviceId property value. ID of the device the BitLocker key is originally backed up from. +func (m *BitlockerRecoveryKey) GetDeviceId()(*string) { + return m.deviceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitlockerRecoveryKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + 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["volumeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVolumeType) + if err != nil { + return err + } + if val != nil { + m.SetVolumeType(val.(*VolumeType)) + } + return nil + } + return res +} +// GetKey gets the key property value. The BitLocker recovery key. +func (m *BitlockerRecoveryKey) GetKey()(*string) { + return m.key +} +// GetVolumeType gets the volumeType property value. Indicates the type of volume the BitLocker key is associated with. Possible values are: operatingSystemVolume, fixedDataVolume, removableDataVolume, unknownFutureValue. +func (m *BitlockerRecoveryKey) GetVolumeType()(*VolumeType) { + return m.volumeType +} +// Serialize serializes information the current object +func (m *BitlockerRecoveryKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("key", m.GetKey()) + if err != nil { + return err + } + } + if m.GetVolumeType() != nil { + cast := (*m.GetVolumeType()).String() + err = writer.WriteStringValue("volumeType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the key was originally backed up to Azure Active Directory. +func (m *BitlockerRecoveryKey) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeviceId sets the deviceId property value. ID of the device the BitLocker key is originally backed up from. +func (m *BitlockerRecoveryKey) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetKey sets the key property value. The BitLocker recovery key. +func (m *BitlockerRecoveryKey) SetKey(value *string)() { + m.key = value +} +// SetVolumeType sets the volumeType property value. Indicates the type of volume the BitLocker key is associated with. Possible values are: operatingSystemVolume, fixedDataVolume, removableDataVolume, unknownFutureValue. +func (m *BitlockerRecoveryKey) SetVolumeType(value *VolumeType)() { + m.volumeType = value +} diff --git a/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_response.go b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_response.go new file mode 100644 index 000000000..e704b0772 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitlockerRecoveryKeyCollectionResponse +type BitlockerRecoveryKeyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BitlockerRecoveryKeyable +} +// NewBitlockerRecoveryKeyCollectionResponse instantiates a new BitlockerRecoveryKeyCollectionResponse and sets the default values. +func NewBitlockerRecoveryKeyCollectionResponse()(*BitlockerRecoveryKeyCollectionResponse) { + m := &BitlockerRecoveryKeyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBitlockerRecoveryKeyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBitlockerRecoveryKeyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBitlockerRecoveryKeyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BitlockerRecoveryKeyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBitlockerRecoveryKeyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BitlockerRecoveryKeyable, len(val)) + for i, v := range val { + res[i] = v.(BitlockerRecoveryKeyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BitlockerRecoveryKeyCollectionResponse) GetValue()([]BitlockerRecoveryKeyable) { + return m.value +} +// Serialize serializes information the current object +func (m *BitlockerRecoveryKeyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BitlockerRecoveryKeyCollectionResponse) SetValue(value []BitlockerRecoveryKeyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_responseable.go b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_responseable.go new file mode 100644 index 000000000..e875a9d8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_key_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitlockerRecoveryKeyCollectionResponseable +type BitlockerRecoveryKeyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BitlockerRecoveryKeyable) + SetValue(value []BitlockerRecoveryKeyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/bitlocker_recovery_keyable.go b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_keyable.go new file mode 100644 index 000000000..132033922 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlocker_recovery_keyable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BitlockerRecoveryKeyable +type BitlockerRecoveryKeyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceId()(*string) + GetKey()(*string) + GetVolumeType()(*VolumeType) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceId(value *string)() + SetKey(value *string)() + SetVolumeType(value *VolumeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/bitlockerable.go b/src/internal/connector/graph/betasdk/models/bitlockerable.go new file mode 100644 index 000000000..3b30a5774 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bitlockerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Bitlockerable +type Bitlockerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRecoveryKeys()([]BitlockerRecoveryKeyable) + SetRecoveryKeys(value []BitlockerRecoveryKeyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/block_access_action.go b/src/internal/connector/graph/betasdk/models/block_access_action.go new file mode 100644 index 000000000..2c85fc50a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/block_access_action.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BlockAccessAction +type BlockAccessAction struct { + DlpActionInfo +} +// NewBlockAccessAction instantiates a new BlockAccessAction and sets the default values. +func NewBlockAccessAction()(*BlockAccessAction) { + m := &BlockAccessAction{ + DlpActionInfo: *NewDlpActionInfo(), + } + return m +} +// CreateBlockAccessActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBlockAccessActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBlockAccessAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BlockAccessAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DlpActionInfo.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *BlockAccessAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DlpActionInfo.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/block_access_actionable.go b/src/internal/connector/graph/betasdk/models/block_access_actionable.go new file mode 100644 index 000000000..78eaa6262 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/block_access_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BlockAccessActionable +type BlockAccessActionable interface { + DlpActionInfoable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/body_type.go b/src/internal/connector/graph/betasdk/models/body_type.go new file mode 100644 index 000000000..d7e6c1a79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/body_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BodyType int + +const ( + TEXT_BODYTYPE BodyType = iota + HTML_BODYTYPE +) + +func (i BodyType) String() string { + return []string{"text", "html"}[i] +} +func ParseBodyType(v string) (interface{}, error) { + result := TEXT_BODYTYPE + switch v { + case "text": + result = TEXT_BODYTYPE + case "html": + result = HTML_BODYTYPE + default: + return 0, errors.New("Unknown BodyType value: " + v) + } + return &result, nil +} +func SerializeBodyType(values []BodyType) []string { + 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/booking_appointment.go b/src/internal/connector/graph/betasdk/models/booking_appointment.go new file mode 100644 index 000000000..192e2afae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_appointment.go @@ -0,0 +1,980 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingAppointment +type BookingAppointment struct { + Entity + // Additional information that is sent to the customer when an appointment is confirmed. + additionalInformation *string + // The URL of the meeting to join anonymously. + anonymousJoinWebUrl *string + // The SMTP address of the bookingCustomer who is booking the appointment. + customerEmailAddress *string + // The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. + customerId *string + // Represents location information for the bookingCustomer who is booking the appointment. + customerLocation Locationable + // The customer's name. + customerName *string + // Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by customerId. + customerNotes *string + // The customer's phone number. + customerPhone *string + // A collection of the customer properties for an appointment. An appointment will contain a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. + customers []BookingCustomerInformationBaseable + // The time zone of the customer. For a list of possible values, see dateTimeTimeZone. + customerTimeZone *string + // The length of the appointment, denoted in ISO8601 format. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The end property + end DateTimeTimeZoneable + // The current number of customers in the appointment. + filledAttendeesCount *int32 + // The billed amount on the invoice. + invoiceAmount *float64 + // The date, time, and time zone of the invoice for this appointment. + invoiceDate DateTimeTimeZoneable + // The ID of the invoice. + invoiceId *string + // The invoiceStatus property + invoiceStatus *BookingInvoiceStatus + // The URL of the invoice in Microsoft Bookings. + invoiceUrl *string + // True indicates that the appointment will be held online. Default value is false. + isLocationOnline *bool + // The URL of the online meeting for the appointment. + joinWebUrl *string + // The maximum number of customers allowed in an appointment. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. + maximumAttendeesCount *int32 + // The onlineMeetingUrl property + onlineMeetingUrl *string + // True indicates that the bookingCustomer for this appointment does not wish to receive a confirmation for this appointment. + optOutOfCustomerEmail *bool + // The amount of time to reserve after the appointment ends, for cleaning up, as an example. The value is expressed in ISO8601 format. + postBuffer *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The amount of time to reserve before the appointment begins, for preparation, as an example. The value is expressed in ISO8601 format. + preBuffer *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The regular price for an appointment for the specified bookingService. + price *float64 + // Represents the type of pricing of a booking service. + priceType *BookingPriceType + // The collection of customer reminders sent for this appointment. The value of this property is available only when reading this bookingAppointment by its ID. + reminders []BookingReminderable + // An additional tracking ID for the appointment, if the appointment has been created directly by the customer on the scheduling page, as opposed to by a staff member on the behalf of the customer. + selfServiceAppointmentId *string + // The ID of the bookingService associated with this appointment. + serviceId *string + // The location where the service is delivered. + serviceLocation Locationable + // The name of the bookingService associated with this appointment.This property is optional when creating a new appointment. If not specified, it is computed from the service associated with the appointment by the serviceId property. + serviceName *string + // Notes from a bookingStaffMember. The value of this property is available only when reading this bookingAppointment by its ID. + serviceNotes *string + // True indicates SMS notifications will be sent to the customers for the appointment. Default value is false. + smsNotificationsEnabled *bool + // The ID of each bookingStaffMember who is scheduled in this appointment. + staffMemberIds []string + // The start property + start DateTimeTimeZoneable +} +// NewBookingAppointment instantiates a new BookingAppointment and sets the default values. +func NewBookingAppointment()(*BookingAppointment) { + m := &BookingAppointment{ + Entity: *NewEntity(), + } + return m +} +// CreateBookingAppointmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingAppointmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingAppointment(), nil +} +// GetAdditionalInformation gets the additionalInformation property value. Additional information that is sent to the customer when an appointment is confirmed. +func (m *BookingAppointment) GetAdditionalInformation()(*string) { + return m.additionalInformation +} +// GetAnonymousJoinWebUrl gets the anonymousJoinWebUrl property value. The URL of the meeting to join anonymously. +func (m *BookingAppointment) GetAnonymousJoinWebUrl()(*string) { + return m.anonymousJoinWebUrl +} +// GetCustomerEmailAddress gets the customerEmailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. +func (m *BookingAppointment) GetCustomerEmailAddress()(*string) { + return m.customerEmailAddress +} +// GetCustomerId gets the customerId property value. The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. +func (m *BookingAppointment) GetCustomerId()(*string) { + return m.customerId +} +// GetCustomerLocation gets the customerLocation property value. Represents location information for the bookingCustomer who is booking the appointment. +func (m *BookingAppointment) GetCustomerLocation()(Locationable) { + return m.customerLocation +} +// GetCustomerName gets the customerName property value. The customer's name. +func (m *BookingAppointment) GetCustomerName()(*string) { + return m.customerName +} +// GetCustomerNotes gets the customerNotes property value. Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by customerId. +func (m *BookingAppointment) GetCustomerNotes()(*string) { + return m.customerNotes +} +// GetCustomerPhone gets the customerPhone property value. The customer's phone number. +func (m *BookingAppointment) GetCustomerPhone()(*string) { + return m.customerPhone +} +// GetCustomers gets the customers property value. A collection of the customer properties for an appointment. An appointment will contain a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. +func (m *BookingAppointment) GetCustomers()([]BookingCustomerInformationBaseable) { + return m.customers +} +// GetCustomerTimeZone gets the customerTimeZone property value. The time zone of the customer. For a list of possible values, see dateTimeTimeZone. +func (m *BookingAppointment) GetCustomerTimeZone()(*string) { + return m.customerTimeZone +} +// GetDuration gets the duration property value. The length of the appointment, denoted in ISO8601 format. +func (m *BookingAppointment) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetEnd gets the end property value. The end property +func (m *BookingAppointment) GetEnd()(DateTimeTimeZoneable) { + return m.end +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingAppointment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInformation(val) + } + return nil + } + res["anonymousJoinWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnonymousJoinWebUrl(val) + } + return nil + } + res["customerEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerEmailAddress(val) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomerLocation(val.(Locationable)) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNotes(val) + } + return nil + } + res["customerPhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerPhone(val) + } + return nil + } + res["customers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerInformationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomerInformationBaseable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomerInformationBaseable) + } + m.SetCustomers(res) + } + return nil + } + res["customerTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerTimeZone(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["end"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnd(val.(DateTimeTimeZoneable)) + } + return nil + } + res["filledAttendeesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFilledAttendeesCount(val) + } + return nil + } + res["invoiceAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceAmount(val) + } + return nil + } + res["invoiceDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDate(val.(DateTimeTimeZoneable)) + } + return nil + } + res["invoiceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceId(val) + } + return nil + } + res["invoiceStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingInvoiceStatus) + if err != nil { + return err + } + if val != nil { + m.SetInvoiceStatus(val.(*BookingInvoiceStatus)) + } + return nil + } + res["invoiceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceUrl(val) + } + return nil + } + res["isLocationOnline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLocationOnline(val) + } + return nil + } + res["joinWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinWebUrl(val) + } + return nil + } + res["maximumAttendeesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumAttendeesCount(val) + } + return nil + } + res["onlineMeetingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineMeetingUrl(val) + } + return nil + } + res["optOutOfCustomerEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOptOutOfCustomerEmail(val) + } + return nil + } + res["postBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPostBuffer(val) + } + return nil + } + res["preBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPreBuffer(val) + } + return nil + } + res["price"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPrice(val) + } + return nil + } + res["priceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingPriceType) + if err != nil { + return err + } + if val != nil { + m.SetPriceType(val.(*BookingPriceType)) + } + return nil + } + res["reminders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingReminderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingReminderable, len(val)) + for i, v := range val { + res[i] = v.(BookingReminderable) + } + m.SetReminders(res) + } + return nil + } + res["selfServiceAppointmentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelfServiceAppointmentId(val) + } + return nil + } + res["serviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceId(val) + } + return nil + } + res["serviceLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetServiceLocation(val.(Locationable)) + } + return nil + } + res["serviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceName(val) + } + return nil + } + res["serviceNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceNotes(val) + } + return nil + } + res["smsNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmsNotificationsEnabled(val) + } + return nil + } + res["staffMemberIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetStaffMemberIds(res) + } + return nil + } + res["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStart(val.(DateTimeTimeZoneable)) + } + return nil + } + return res +} +// GetFilledAttendeesCount gets the filledAttendeesCount property value. The current number of customers in the appointment. +func (m *BookingAppointment) GetFilledAttendeesCount()(*int32) { + return m.filledAttendeesCount +} +// GetInvoiceAmount gets the invoiceAmount property value. The billed amount on the invoice. +func (m *BookingAppointment) GetInvoiceAmount()(*float64) { + return m.invoiceAmount +} +// GetInvoiceDate gets the invoiceDate property value. The date, time, and time zone of the invoice for this appointment. +func (m *BookingAppointment) GetInvoiceDate()(DateTimeTimeZoneable) { + return m.invoiceDate +} +// GetInvoiceId gets the invoiceId property value. The ID of the invoice. +func (m *BookingAppointment) GetInvoiceId()(*string) { + return m.invoiceId +} +// GetInvoiceStatus gets the invoiceStatus property value. The invoiceStatus property +func (m *BookingAppointment) GetInvoiceStatus()(*BookingInvoiceStatus) { + return m.invoiceStatus +} +// GetInvoiceUrl gets the invoiceUrl property value. The URL of the invoice in Microsoft Bookings. +func (m *BookingAppointment) GetInvoiceUrl()(*string) { + return m.invoiceUrl +} +// GetIsLocationOnline gets the isLocationOnline property value. True indicates that the appointment will be held online. Default value is false. +func (m *BookingAppointment) GetIsLocationOnline()(*bool) { + return m.isLocationOnline +} +// GetJoinWebUrl gets the joinWebUrl property value. The URL of the online meeting for the appointment. +func (m *BookingAppointment) GetJoinWebUrl()(*string) { + return m.joinWebUrl +} +// GetMaximumAttendeesCount gets the maximumAttendeesCount property value. The maximum number of customers allowed in an appointment. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. +func (m *BookingAppointment) GetMaximumAttendeesCount()(*int32) { + return m.maximumAttendeesCount +} +// GetOnlineMeetingUrl gets the onlineMeetingUrl property value. The onlineMeetingUrl property +func (m *BookingAppointment) GetOnlineMeetingUrl()(*string) { + return m.onlineMeetingUrl +} +// GetOptOutOfCustomerEmail gets the optOutOfCustomerEmail property value. True indicates that the bookingCustomer for this appointment does not wish to receive a confirmation for this appointment. +func (m *BookingAppointment) GetOptOutOfCustomerEmail()(*bool) { + return m.optOutOfCustomerEmail +} +// GetPostBuffer gets the postBuffer property value. The amount of time to reserve after the appointment ends, for cleaning up, as an example. The value is expressed in ISO8601 format. +func (m *BookingAppointment) GetPostBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.postBuffer +} +// GetPreBuffer gets the preBuffer property value. The amount of time to reserve before the appointment begins, for preparation, as an example. The value is expressed in ISO8601 format. +func (m *BookingAppointment) GetPreBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.preBuffer +} +// GetPrice gets the price property value. The regular price for an appointment for the specified bookingService. +func (m *BookingAppointment) GetPrice()(*float64) { + return m.price +} +// GetPriceType gets the priceType property value. Represents the type of pricing of a booking service. +func (m *BookingAppointment) GetPriceType()(*BookingPriceType) { + return m.priceType +} +// GetReminders gets the reminders property value. The collection of customer reminders sent for this appointment. The value of this property is available only when reading this bookingAppointment by its ID. +func (m *BookingAppointment) GetReminders()([]BookingReminderable) { + return m.reminders +} +// GetSelfServiceAppointmentId gets the selfServiceAppointmentId property value. An additional tracking ID for the appointment, if the appointment has been created directly by the customer on the scheduling page, as opposed to by a staff member on the behalf of the customer. +func (m *BookingAppointment) GetSelfServiceAppointmentId()(*string) { + return m.selfServiceAppointmentId +} +// GetServiceId gets the serviceId property value. The ID of the bookingService associated with this appointment. +func (m *BookingAppointment) GetServiceId()(*string) { + return m.serviceId +} +// GetServiceLocation gets the serviceLocation property value. The location where the service is delivered. +func (m *BookingAppointment) GetServiceLocation()(Locationable) { + return m.serviceLocation +} +// GetServiceName gets the serviceName property value. The name of the bookingService associated with this appointment.This property is optional when creating a new appointment. If not specified, it is computed from the service associated with the appointment by the serviceId property. +func (m *BookingAppointment) GetServiceName()(*string) { + return m.serviceName +} +// GetServiceNotes gets the serviceNotes property value. Notes from a bookingStaffMember. The value of this property is available only when reading this bookingAppointment by its ID. +func (m *BookingAppointment) GetServiceNotes()(*string) { + return m.serviceNotes +} +// GetSmsNotificationsEnabled gets the smsNotificationsEnabled property value. True indicates SMS notifications will be sent to the customers for the appointment. Default value is false. +func (m *BookingAppointment) GetSmsNotificationsEnabled()(*bool) { + return m.smsNotificationsEnabled +} +// GetStaffMemberIds gets the staffMemberIds property value. The ID of each bookingStaffMember who is scheduled in this appointment. +func (m *BookingAppointment) GetStaffMemberIds()([]string) { + return m.staffMemberIds +} +// GetStart gets the start property value. The start property +func (m *BookingAppointment) GetStart()(DateTimeTimeZoneable) { + return m.start +} +// Serialize serializes information the current object +func (m *BookingAppointment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("additionalInformation", m.GetAdditionalInformation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("anonymousJoinWebUrl", m.GetAnonymousJoinWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerEmailAddress", m.GetCustomerEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customerLocation", m.GetCustomerLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNotes", m.GetCustomerNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerPhone", m.GetCustomerPhone()) + if err != nil { + return err + } + } + if m.GetCustomers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomers())) + for i, v := range m.GetCustomers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerTimeZone", m.GetCustomerTimeZone()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("end", m.GetEnd()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceAmount", m.GetInvoiceAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("invoiceDate", m.GetInvoiceDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invoiceId", m.GetInvoiceId()) + if err != nil { + return err + } + } + if m.GetInvoiceStatus() != nil { + cast := (*m.GetInvoiceStatus()).String() + err = writer.WriteStringValue("invoiceStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invoiceUrl", m.GetInvoiceUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLocationOnline", m.GetIsLocationOnline()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("joinWebUrl", m.GetJoinWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maximumAttendeesCount", m.GetMaximumAttendeesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onlineMeetingUrl", m.GetOnlineMeetingUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("optOutOfCustomerEmail", m.GetOptOutOfCustomerEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("postBuffer", m.GetPostBuffer()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("preBuffer", m.GetPreBuffer()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("price", m.GetPrice()) + if err != nil { + return err + } + } + if m.GetPriceType() != nil { + cast := (*m.GetPriceType()).String() + err = writer.WriteStringValue("priceType", &cast) + if err != nil { + return err + } + } + if m.GetReminders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReminders())) + for i, v := range m.GetReminders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reminders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("selfServiceAppointmentId", m.GetSelfServiceAppointmentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceId", m.GetServiceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("serviceLocation", m.GetServiceLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceName", m.GetServiceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceNotes", m.GetServiceNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smsNotificationsEnabled", m.GetSmsNotificationsEnabled()) + if err != nil { + return err + } + } + if m.GetStaffMemberIds() != nil { + err = writer.WriteCollectionOfStringValues("staffMemberIds", m.GetStaffMemberIds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("start", m.GetStart()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalInformation sets the additionalInformation property value. Additional information that is sent to the customer when an appointment is confirmed. +func (m *BookingAppointment) SetAdditionalInformation(value *string)() { + m.additionalInformation = value +} +// SetAnonymousJoinWebUrl sets the anonymousJoinWebUrl property value. The URL of the meeting to join anonymously. +func (m *BookingAppointment) SetAnonymousJoinWebUrl(value *string)() { + m.anonymousJoinWebUrl = value +} +// SetCustomerEmailAddress sets the customerEmailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. +func (m *BookingAppointment) SetCustomerEmailAddress(value *string)() { + m.customerEmailAddress = value +} +// SetCustomerId sets the customerId property value. The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. +func (m *BookingAppointment) SetCustomerId(value *string)() { + m.customerId = value +} +// SetCustomerLocation sets the customerLocation property value. Represents location information for the bookingCustomer who is booking the appointment. +func (m *BookingAppointment) SetCustomerLocation(value Locationable)() { + m.customerLocation = value +} +// SetCustomerName sets the customerName property value. The customer's name. +func (m *BookingAppointment) SetCustomerName(value *string)() { + m.customerName = value +} +// SetCustomerNotes sets the customerNotes property value. Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by customerId. +func (m *BookingAppointment) SetCustomerNotes(value *string)() { + m.customerNotes = value +} +// SetCustomerPhone sets the customerPhone property value. The customer's phone number. +func (m *BookingAppointment) SetCustomerPhone(value *string)() { + m.customerPhone = value +} +// SetCustomers sets the customers property value. A collection of the customer properties for an appointment. An appointment will contain a list of customer information and each unit will indicate the properties of a customer who is part of that appointment. Optional. +func (m *BookingAppointment) SetCustomers(value []BookingCustomerInformationBaseable)() { + m.customers = value +} +// SetCustomerTimeZone sets the customerTimeZone property value. The time zone of the customer. For a list of possible values, see dateTimeTimeZone. +func (m *BookingAppointment) SetCustomerTimeZone(value *string)() { + m.customerTimeZone = value +} +// SetDuration sets the duration property value. The length of the appointment, denoted in ISO8601 format. +func (m *BookingAppointment) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetEnd sets the end property value. The end property +func (m *BookingAppointment) SetEnd(value DateTimeTimeZoneable)() { + m.end = value +} +// SetFilledAttendeesCount sets the filledAttendeesCount property value. The current number of customers in the appointment. +func (m *BookingAppointment) SetFilledAttendeesCount(value *int32)() { + m.filledAttendeesCount = value +} +// SetInvoiceAmount sets the invoiceAmount property value. The billed amount on the invoice. +func (m *BookingAppointment) SetInvoiceAmount(value *float64)() { + m.invoiceAmount = value +} +// SetInvoiceDate sets the invoiceDate property value. The date, time, and time zone of the invoice for this appointment. +func (m *BookingAppointment) SetInvoiceDate(value DateTimeTimeZoneable)() { + m.invoiceDate = value +} +// SetInvoiceId sets the invoiceId property value. The ID of the invoice. +func (m *BookingAppointment) SetInvoiceId(value *string)() { + m.invoiceId = value +} +// SetInvoiceStatus sets the invoiceStatus property value. The invoiceStatus property +func (m *BookingAppointment) SetInvoiceStatus(value *BookingInvoiceStatus)() { + m.invoiceStatus = value +} +// SetInvoiceUrl sets the invoiceUrl property value. The URL of the invoice in Microsoft Bookings. +func (m *BookingAppointment) SetInvoiceUrl(value *string)() { + m.invoiceUrl = value +} +// SetIsLocationOnline sets the isLocationOnline property value. True indicates that the appointment will be held online. Default value is false. +func (m *BookingAppointment) SetIsLocationOnline(value *bool)() { + m.isLocationOnline = value +} +// SetJoinWebUrl sets the joinWebUrl property value. The URL of the online meeting for the appointment. +func (m *BookingAppointment) SetJoinWebUrl(value *string)() { + m.joinWebUrl = value +} +// SetMaximumAttendeesCount sets the maximumAttendeesCount property value. The maximum number of customers allowed in an appointment. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. +func (m *BookingAppointment) SetMaximumAttendeesCount(value *int32)() { + m.maximumAttendeesCount = value +} +// SetOnlineMeetingUrl sets the onlineMeetingUrl property value. The onlineMeetingUrl property +func (m *BookingAppointment) SetOnlineMeetingUrl(value *string)() { + m.onlineMeetingUrl = value +} +// SetOptOutOfCustomerEmail sets the optOutOfCustomerEmail property value. True indicates that the bookingCustomer for this appointment does not wish to receive a confirmation for this appointment. +func (m *BookingAppointment) SetOptOutOfCustomerEmail(value *bool)() { + m.optOutOfCustomerEmail = value +} +// SetPostBuffer sets the postBuffer property value. The amount of time to reserve after the appointment ends, for cleaning up, as an example. The value is expressed in ISO8601 format. +func (m *BookingAppointment) SetPostBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.postBuffer = value +} +// SetPreBuffer sets the preBuffer property value. The amount of time to reserve before the appointment begins, for preparation, as an example. The value is expressed in ISO8601 format. +func (m *BookingAppointment) SetPreBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.preBuffer = value +} +// SetPrice sets the price property value. The regular price for an appointment for the specified bookingService. +func (m *BookingAppointment) SetPrice(value *float64)() { + m.price = value +} +// SetPriceType sets the priceType property value. Represents the type of pricing of a booking service. +func (m *BookingAppointment) SetPriceType(value *BookingPriceType)() { + m.priceType = value +} +// SetReminders sets the reminders property value. The collection of customer reminders sent for this appointment. The value of this property is available only when reading this bookingAppointment by its ID. +func (m *BookingAppointment) SetReminders(value []BookingReminderable)() { + m.reminders = value +} +// SetSelfServiceAppointmentId sets the selfServiceAppointmentId property value. An additional tracking ID for the appointment, if the appointment has been created directly by the customer on the scheduling page, as opposed to by a staff member on the behalf of the customer. +func (m *BookingAppointment) SetSelfServiceAppointmentId(value *string)() { + m.selfServiceAppointmentId = value +} +// SetServiceId sets the serviceId property value. The ID of the bookingService associated with this appointment. +func (m *BookingAppointment) SetServiceId(value *string)() { + m.serviceId = value +} +// SetServiceLocation sets the serviceLocation property value. The location where the service is delivered. +func (m *BookingAppointment) SetServiceLocation(value Locationable)() { + m.serviceLocation = value +} +// SetServiceName sets the serviceName property value. The name of the bookingService associated with this appointment.This property is optional when creating a new appointment. If not specified, it is computed from the service associated with the appointment by the serviceId property. +func (m *BookingAppointment) SetServiceName(value *string)() { + m.serviceName = value +} +// SetServiceNotes sets the serviceNotes property value. Notes from a bookingStaffMember. The value of this property is available only when reading this bookingAppointment by its ID. +func (m *BookingAppointment) SetServiceNotes(value *string)() { + m.serviceNotes = value +} +// SetSmsNotificationsEnabled sets the smsNotificationsEnabled property value. True indicates SMS notifications will be sent to the customers for the appointment. Default value is false. +func (m *BookingAppointment) SetSmsNotificationsEnabled(value *bool)() { + m.smsNotificationsEnabled = value +} +// SetStaffMemberIds sets the staffMemberIds property value. The ID of each bookingStaffMember who is scheduled in this appointment. +func (m *BookingAppointment) SetStaffMemberIds(value []string)() { + m.staffMemberIds = value +} +// SetStart sets the start property value. The start property +func (m *BookingAppointment) SetStart(value DateTimeTimeZoneable)() { + m.start = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_appointment_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_appointment_collection_response.go new file mode 100644 index 000000000..9989d9734 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_appointment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingAppointmentCollectionResponse +type BookingAppointmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingAppointmentable +} +// NewBookingAppointmentCollectionResponse instantiates a new BookingAppointmentCollectionResponse and sets the default values. +func NewBookingAppointmentCollectionResponse()(*BookingAppointmentCollectionResponse) { + m := &BookingAppointmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingAppointmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingAppointmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingAppointmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingAppointmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingAppointmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingAppointmentable, len(val)) + for i, v := range val { + res[i] = v.(BookingAppointmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingAppointmentCollectionResponse) GetValue()([]BookingAppointmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingAppointmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingAppointmentCollectionResponse) SetValue(value []BookingAppointmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_appointment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_appointment_collection_responseable.go new file mode 100644 index 000000000..9c876126f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_appointment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingAppointmentCollectionResponseable +type BookingAppointmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingAppointmentable) + SetValue(value []BookingAppointmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_appointmentable.go b/src/internal/connector/graph/betasdk/models/booking_appointmentable.go new file mode 100644 index 000000000..651c32179 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_appointmentable.go @@ -0,0 +1,83 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingAppointmentable +type BookingAppointmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformation()(*string) + GetAnonymousJoinWebUrl()(*string) + GetCustomerEmailAddress()(*string) + GetCustomerId()(*string) + GetCustomerLocation()(Locationable) + GetCustomerName()(*string) + GetCustomerNotes()(*string) + GetCustomerPhone()(*string) + GetCustomers()([]BookingCustomerInformationBaseable) + GetCustomerTimeZone()(*string) + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetEnd()(DateTimeTimeZoneable) + GetFilledAttendeesCount()(*int32) + GetInvoiceAmount()(*float64) + GetInvoiceDate()(DateTimeTimeZoneable) + GetInvoiceId()(*string) + GetInvoiceStatus()(*BookingInvoiceStatus) + GetInvoiceUrl()(*string) + GetIsLocationOnline()(*bool) + GetJoinWebUrl()(*string) + GetMaximumAttendeesCount()(*int32) + GetOnlineMeetingUrl()(*string) + GetOptOutOfCustomerEmail()(*bool) + GetPostBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPreBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPrice()(*float64) + GetPriceType()(*BookingPriceType) + GetReminders()([]BookingReminderable) + GetSelfServiceAppointmentId()(*string) + GetServiceId()(*string) + GetServiceLocation()(Locationable) + GetServiceName()(*string) + GetServiceNotes()(*string) + GetSmsNotificationsEnabled()(*bool) + GetStaffMemberIds()([]string) + GetStart()(DateTimeTimeZoneable) + SetAdditionalInformation(value *string)() + SetAnonymousJoinWebUrl(value *string)() + SetCustomerEmailAddress(value *string)() + SetCustomerId(value *string)() + SetCustomerLocation(value Locationable)() + SetCustomerName(value *string)() + SetCustomerNotes(value *string)() + SetCustomerPhone(value *string)() + SetCustomers(value []BookingCustomerInformationBaseable)() + SetCustomerTimeZone(value *string)() + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetEnd(value DateTimeTimeZoneable)() + SetFilledAttendeesCount(value *int32)() + SetInvoiceAmount(value *float64)() + SetInvoiceDate(value DateTimeTimeZoneable)() + SetInvoiceId(value *string)() + SetInvoiceStatus(value *BookingInvoiceStatus)() + SetInvoiceUrl(value *string)() + SetIsLocationOnline(value *bool)() + SetJoinWebUrl(value *string)() + SetMaximumAttendeesCount(value *int32)() + SetOnlineMeetingUrl(value *string)() + SetOptOutOfCustomerEmail(value *bool)() + SetPostBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPreBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPrice(value *float64)() + SetPriceType(value *BookingPriceType)() + SetReminders(value []BookingReminderable)() + SetSelfServiceAppointmentId(value *string)() + SetServiceId(value *string)() + SetServiceLocation(value Locationable)() + SetServiceName(value *string)() + SetServiceNotes(value *string)() + SetSmsNotificationsEnabled(value *bool)() + SetStaffMemberIds(value []string)() + SetStart(value DateTimeTimeZoneable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_business.go b/src/internal/connector/graph/betasdk/models/booking_business.go new file mode 100644 index 000000000..18c622759 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_business.go @@ -0,0 +1,522 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingBusiness +type BookingBusiness struct { + BookingNamedEntity + // The street address of the business. The address property, together with phone and webSiteUrl, appear in the footer of a business scheduling page. + address PhysicalAddressable + // All the appointments of this business. Read-only. Nullable. + appointments []BookingAppointmentable + // The hours of operation for the business. + businessHours []BookingWorkHoursable + // The type of business. + businessType *string + // The set of appointments of this business in a specified date range. Read-only. Nullable. + calendarView []BookingAppointmentable + // All the customers of this business. Read-only. Nullable. + customers []BookingCustomerable + // All the custom questions of this business. Read-only. Nullable. + customQuestions []BookingCustomQuestionable + // The code for the currency that the business operates in on Microsoft Bookings. + defaultCurrencyIso *string + // The email address for the business. + email *string + // The scheduling page has been made available to external customers. Use the publish and unpublish actions to set this property. Read-only. + isPublished *bool + // The language of the self service booking page + languageTag *string + // The telephone number for the business. The phone property, together with address and webSiteUrl, appear in the footer of a business scheduling page. + phone *string + // The URL for the scheduling page, which is set after you publish or unpublish the page. Read-only. + publicUrl *string + // Specifies how bookings can be created for this business. + schedulingPolicy BookingSchedulingPolicyable + // All the services offered by this business. Read-only. Nullable. + services []BookingServiceable + // All the staff members that provide services in this business. Read-only. Nullable. + staffMembers []BookingStaffMemberable + // The URL of the business web site. The webSiteUrl property, together with address, phone, appear in the footer of a business scheduling page. + webSiteUrl *string +} +// NewBookingBusiness instantiates a new BookingBusiness and sets the default values. +func NewBookingBusiness()(*BookingBusiness) { + m := &BookingBusiness{ + BookingNamedEntity: *NewBookingNamedEntity(), + } + odataTypeValue := "#microsoft.graph.bookingBusiness"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBookingBusinessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusiness(), nil +} +// GetAddress gets the address property value. The street address of the business. The address property, together with phone and webSiteUrl, appear in the footer of a business scheduling page. +func (m *BookingBusiness) GetAddress()(PhysicalAddressable) { + return m.address +} +// GetAppointments gets the appointments property value. All the appointments of this business. Read-only. Nullable. +func (m *BookingBusiness) GetAppointments()([]BookingAppointmentable) { + return m.appointments +} +// GetBusinessHours gets the businessHours property value. The hours of operation for the business. +func (m *BookingBusiness) GetBusinessHours()([]BookingWorkHoursable) { + return m.businessHours +} +// GetBusinessType gets the businessType property value. The type of business. +func (m *BookingBusiness) GetBusinessType()(*string) { + return m.businessType +} +// GetCalendarView gets the calendarView property value. The set of appointments of this business in a specified date range. Read-only. Nullable. +func (m *BookingBusiness) GetCalendarView()([]BookingAppointmentable) { + return m.calendarView +} +// GetCustomers gets the customers property value. All the customers of this business. Read-only. Nullable. +func (m *BookingBusiness) GetCustomers()([]BookingCustomerable) { + return m.customers +} +// GetCustomQuestions gets the customQuestions property value. All the custom questions of this business. Read-only. Nullable. +func (m *BookingBusiness) GetCustomQuestions()([]BookingCustomQuestionable) { + return m.customQuestions +} +// GetDefaultCurrencyIso gets the defaultCurrencyIso property value. The code for the currency that the business operates in on Microsoft Bookings. +func (m *BookingBusiness) GetDefaultCurrencyIso()(*string) { + return m.defaultCurrencyIso +} +// GetEmail gets the email property value. The email address for the business. +func (m *BookingBusiness) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusiness) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingNamedEntity.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PhysicalAddressable)) + } + return nil + } + res["appointments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingAppointmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingAppointmentable, len(val)) + for i, v := range val { + res[i] = v.(BookingAppointmentable) + } + m.SetAppointments(res) + } + return nil + } + res["businessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingWorkHoursFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingWorkHoursable, len(val)) + for i, v := range val { + res[i] = v.(BookingWorkHoursable) + } + m.SetBusinessHours(res) + } + return nil + } + res["businessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBusinessType(val) + } + return nil + } + res["calendarView"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingAppointmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingAppointmentable, len(val)) + for i, v := range val { + res[i] = v.(BookingAppointmentable) + } + m.SetCalendarView(res) + } + return nil + } + res["customers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomerable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomerable) + } + m.SetCustomers(res) + } + return nil + } + res["customQuestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomQuestionable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomQuestionable) + } + m.SetCustomQuestions(res) + } + return nil + } + res["defaultCurrencyIso"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultCurrencyIso(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["isPublished"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPublished(val) + } + return nil + } + 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["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhone(val) + } + return nil + } + res["publicUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicUrl(val) + } + return nil + } + res["schedulingPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBookingSchedulingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedulingPolicy(val.(BookingSchedulingPolicyable)) + } + return nil + } + res["services"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingServiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingServiceable, len(val)) + for i, v := range val { + res[i] = v.(BookingServiceable) + } + m.SetServices(res) + } + return nil + } + res["staffMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingStaffMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingStaffMemberable, len(val)) + for i, v := range val { + res[i] = v.(BookingStaffMemberable) + } + m.SetStaffMembers(res) + } + return nil + } + res["webSiteUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebSiteUrl(val) + } + return nil + } + return res +} +// GetIsPublished gets the isPublished property value. The scheduling page has been made available to external customers. Use the publish and unpublish actions to set this property. Read-only. +func (m *BookingBusiness) GetIsPublished()(*bool) { + return m.isPublished +} +// GetLanguageTag gets the languageTag property value. The language of the self service booking page +func (m *BookingBusiness) GetLanguageTag()(*string) { + return m.languageTag +} +// GetPhone gets the phone property value. The telephone number for the business. The phone property, together with address and webSiteUrl, appear in the footer of a business scheduling page. +func (m *BookingBusiness) GetPhone()(*string) { + return m.phone +} +// GetPublicUrl gets the publicUrl property value. The URL for the scheduling page, which is set after you publish or unpublish the page. Read-only. +func (m *BookingBusiness) GetPublicUrl()(*string) { + return m.publicUrl +} +// GetSchedulingPolicy gets the schedulingPolicy property value. Specifies how bookings can be created for this business. +func (m *BookingBusiness) GetSchedulingPolicy()(BookingSchedulingPolicyable) { + return m.schedulingPolicy +} +// GetServices gets the services property value. All the services offered by this business. Read-only. Nullable. +func (m *BookingBusiness) GetServices()([]BookingServiceable) { + return m.services +} +// GetStaffMembers gets the staffMembers property value. All the staff members that provide services in this business. Read-only. Nullable. +func (m *BookingBusiness) GetStaffMembers()([]BookingStaffMemberable) { + return m.staffMembers +} +// GetWebSiteUrl gets the webSiteUrl property value. The URL of the business web site. The webSiteUrl property, together with address, phone, appear in the footer of a business scheduling page. +func (m *BookingBusiness) GetWebSiteUrl()(*string) { + return m.webSiteUrl +} +// Serialize serializes information the current object +func (m *BookingBusiness) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingNamedEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + if m.GetAppointments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppointments())) + for i, v := range m.GetAppointments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appointments", cast) + if err != nil { + return err + } + } + if m.GetBusinessHours() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBusinessHours())) + for i, v := range m.GetBusinessHours() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("businessHours", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("businessType", m.GetBusinessType()) + if err != nil { + return err + } + } + if m.GetCalendarView() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalendarView())) + for i, v := range m.GetCalendarView() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calendarView", cast) + if err != nil { + return err + } + } + if m.GetCustomers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomers())) + for i, v := range m.GetCustomers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customers", cast) + if err != nil { + return err + } + } + if m.GetCustomQuestions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestions())) + for i, v := range m.GetCustomQuestions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customQuestions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultCurrencyIso", m.GetDefaultCurrencyIso()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedulingPolicy", m.GetSchedulingPolicy()) + if err != nil { + return err + } + } + if m.GetServices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServices())) + for i, v := range m.GetServices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("services", cast) + if err != nil { + return err + } + } + if m.GetStaffMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStaffMembers())) + for i, v := range m.GetStaffMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("staffMembers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webSiteUrl", m.GetWebSiteUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The street address of the business. The address property, together with phone and webSiteUrl, appear in the footer of a business scheduling page. +func (m *BookingBusiness) SetAddress(value PhysicalAddressable)() { + m.address = value +} +// SetAppointments sets the appointments property value. All the appointments of this business. Read-only. Nullable. +func (m *BookingBusiness) SetAppointments(value []BookingAppointmentable)() { + m.appointments = value +} +// SetBusinessHours sets the businessHours property value. The hours of operation for the business. +func (m *BookingBusiness) SetBusinessHours(value []BookingWorkHoursable)() { + m.businessHours = value +} +// SetBusinessType sets the businessType property value. The type of business. +func (m *BookingBusiness) SetBusinessType(value *string)() { + m.businessType = value +} +// SetCalendarView sets the calendarView property value. The set of appointments of this business in a specified date range. Read-only. Nullable. +func (m *BookingBusiness) SetCalendarView(value []BookingAppointmentable)() { + m.calendarView = value +} +// SetCustomers sets the customers property value. All the customers of this business. Read-only. Nullable. +func (m *BookingBusiness) SetCustomers(value []BookingCustomerable)() { + m.customers = value +} +// SetCustomQuestions sets the customQuestions property value. All the custom questions of this business. Read-only. Nullable. +func (m *BookingBusiness) SetCustomQuestions(value []BookingCustomQuestionable)() { + m.customQuestions = value +} +// SetDefaultCurrencyIso sets the defaultCurrencyIso property value. The code for the currency that the business operates in on Microsoft Bookings. +func (m *BookingBusiness) SetDefaultCurrencyIso(value *string)() { + m.defaultCurrencyIso = value +} +// SetEmail sets the email property value. The email address for the business. +func (m *BookingBusiness) SetEmail(value *string)() { + m.email = value +} +// SetIsPublished sets the isPublished property value. The scheduling page has been made available to external customers. Use the publish and unpublish actions to set this property. Read-only. +func (m *BookingBusiness) SetIsPublished(value *bool)() { + m.isPublished = value +} +// SetLanguageTag sets the languageTag property value. The language of the self service booking page +func (m *BookingBusiness) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetPhone sets the phone property value. The telephone number for the business. The phone property, together with address and webSiteUrl, appear in the footer of a business scheduling page. +func (m *BookingBusiness) SetPhone(value *string)() { + m.phone = value +} +// SetPublicUrl sets the publicUrl property value. The URL for the scheduling page, which is set after you publish or unpublish the page. Read-only. +func (m *BookingBusiness) SetPublicUrl(value *string)() { + m.publicUrl = value +} +// SetSchedulingPolicy sets the schedulingPolicy property value. Specifies how bookings can be created for this business. +func (m *BookingBusiness) SetSchedulingPolicy(value BookingSchedulingPolicyable)() { + m.schedulingPolicy = value +} +// SetServices sets the services property value. All the services offered by this business. Read-only. Nullable. +func (m *BookingBusiness) SetServices(value []BookingServiceable)() { + m.services = value +} +// SetStaffMembers sets the staffMembers property value. All the staff members that provide services in this business. Read-only. Nullable. +func (m *BookingBusiness) SetStaffMembers(value []BookingStaffMemberable)() { + m.staffMembers = value +} +// SetWebSiteUrl sets the webSiteUrl property value. The URL of the business web site. The webSiteUrl property, together with address, phone, appear in the footer of a business scheduling page. +func (m *BookingBusiness) SetWebSiteUrl(value *string)() { + m.webSiteUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_business_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_business_collection_response.go new file mode 100644 index 000000000..63620a7d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_business_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingBusinessCollectionResponse +type BookingBusinessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingBusinessable +} +// NewBookingBusinessCollectionResponse instantiates a new BookingBusinessCollectionResponse and sets the default values. +func NewBookingBusinessCollectionResponse()(*BookingBusinessCollectionResponse) { + m := &BookingBusinessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingBusinessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingBusinessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingBusinessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingBusinessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingBusinessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingBusinessable, len(val)) + for i, v := range val { + res[i] = v.(BookingBusinessable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingBusinessCollectionResponse) GetValue()([]BookingBusinessable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingBusinessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingBusinessCollectionResponse) SetValue(value []BookingBusinessable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_business_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_business_collection_responseable.go new file mode 100644 index 000000000..8250397ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_business_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingBusinessCollectionResponseable +type BookingBusinessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingBusinessable) + SetValue(value []BookingBusinessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_businessable.go b/src/internal/connector/graph/betasdk/models/booking_businessable.go new file mode 100644 index 000000000..19c6bde2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_businessable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingBusinessable +type BookingBusinessable interface { + BookingNamedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PhysicalAddressable) + GetAppointments()([]BookingAppointmentable) + GetBusinessHours()([]BookingWorkHoursable) + GetBusinessType()(*string) + GetCalendarView()([]BookingAppointmentable) + GetCustomers()([]BookingCustomerable) + GetCustomQuestions()([]BookingCustomQuestionable) + GetDefaultCurrencyIso()(*string) + GetEmail()(*string) + GetIsPublished()(*bool) + GetLanguageTag()(*string) + GetPhone()(*string) + GetPublicUrl()(*string) + GetSchedulingPolicy()(BookingSchedulingPolicyable) + GetServices()([]BookingServiceable) + GetStaffMembers()([]BookingStaffMemberable) + GetWebSiteUrl()(*string) + SetAddress(value PhysicalAddressable)() + SetAppointments(value []BookingAppointmentable)() + SetBusinessHours(value []BookingWorkHoursable)() + SetBusinessType(value *string)() + SetCalendarView(value []BookingAppointmentable)() + SetCustomers(value []BookingCustomerable)() + SetCustomQuestions(value []BookingCustomQuestionable)() + SetDefaultCurrencyIso(value *string)() + SetEmail(value *string)() + SetIsPublished(value *bool)() + SetLanguageTag(value *string)() + SetPhone(value *string)() + SetPublicUrl(value *string)() + SetSchedulingPolicy(value BookingSchedulingPolicyable)() + SetServices(value []BookingServiceable)() + SetStaffMembers(value []BookingStaffMemberable)() + SetWebSiteUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_currency.go b/src/internal/connector/graph/betasdk/models/booking_currency.go new file mode 100644 index 000000000..8cd6a18c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_currency.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCurrency +type BookingCurrency struct { + Entity + // The currency symbol. For example, the currency symbol for the US dollar and for the Australian dollar is $. + symbol *string +} +// NewBookingCurrency instantiates a new BookingCurrency and sets the default values. +func NewBookingCurrency()(*BookingCurrency) { + m := &BookingCurrency{ + Entity: *NewEntity(), + } + return m +} +// CreateBookingCurrencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCurrencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCurrency(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCurrency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["symbol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSymbol(val) + } + return nil + } + return res +} +// GetSymbol gets the symbol property value. The currency symbol. For example, the currency symbol for the US dollar and for the Australian dollar is $. +func (m *BookingCurrency) GetSymbol()(*string) { + return m.symbol +} +// Serialize serializes information the current object +func (m *BookingCurrency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("symbol", m.GetSymbol()) + if err != nil { + return err + } + } + return nil +} +// SetSymbol sets the symbol property value. The currency symbol. For example, the currency symbol for the US dollar and for the Australian dollar is $. +func (m *BookingCurrency) SetSymbol(value *string)() { + m.symbol = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_currency_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_currency_collection_response.go new file mode 100644 index 000000000..ad7da08e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_currency_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCurrencyCollectionResponse +type BookingCurrencyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingCurrencyable +} +// NewBookingCurrencyCollectionResponse instantiates a new BookingCurrencyCollectionResponse and sets the default values. +func NewBookingCurrencyCollectionResponse()(*BookingCurrencyCollectionResponse) { + m := &BookingCurrencyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingCurrencyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCurrencyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCurrencyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCurrencyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCurrencyable, len(val)) + for i, v := range val { + res[i] = v.(BookingCurrencyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingCurrencyCollectionResponse) GetValue()([]BookingCurrencyable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingCurrencyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingCurrencyCollectionResponse) SetValue(value []BookingCurrencyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_currency_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_currency_collection_responseable.go new file mode 100644 index 000000000..cd6f201eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_currency_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCurrencyCollectionResponseable +type BookingCurrencyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingCurrencyable) + SetValue(value []BookingCurrencyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_currencyable.go b/src/internal/connector/graph/betasdk/models/booking_currencyable.go new file mode 100644 index 000000000..9fadafd17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_currencyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCurrencyable +type BookingCurrencyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSymbol()(*string) + SetSymbol(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_custom_question.go b/src/internal/connector/graph/betasdk/models/booking_custom_question.go new file mode 100644 index 000000000..b2353f27b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_custom_question.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomQuestion represents a custom question of the business. +type BookingCustomQuestion struct { + Entity + // The expected answer type. The possible values are: text, radioButton, unknownFutureValue. + answerInputType *AnswerInputType + // List of possible answer values. + answerOptions []string + // Display name of this entity. + displayName *string +} +// NewBookingCustomQuestion instantiates a new bookingCustomQuestion and sets the default values. +func NewBookingCustomQuestion()(*BookingCustomQuestion) { + m := &BookingCustomQuestion{ + Entity: *NewEntity(), + } + return m +} +// CreateBookingCustomQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomQuestion(), nil +} +// GetAnswerInputType gets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue. +func (m *BookingCustomQuestion) GetAnswerInputType()(*AnswerInputType) { + return m.answerInputType +} +// GetAnswerOptions gets the answerOptions property value. List of possible answer values. +func (m *BookingCustomQuestion) GetAnswerOptions()([]string) { + return m.answerOptions +} +// GetDisplayName gets the displayName property value. Display name of this entity. +func (m *BookingCustomQuestion) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["answerInputType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerInputType) + if err != nil { + return err + } + if val != nil { + m.SetAnswerInputType(val.(*AnswerInputType)) + } + return nil + } + res["answerOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAnswerOptions(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BookingCustomQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAnswerInputType() != nil { + cast := (*m.GetAnswerInputType()).String() + err = writer.WriteStringValue("answerInputType", &cast) + if err != nil { + return err + } + } + if m.GetAnswerOptions() != nil { + err = writer.WriteCollectionOfStringValues("answerOptions", m.GetAnswerOptions()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetAnswerInputType sets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue. +func (m *BookingCustomQuestion) SetAnswerInputType(value *AnswerInputType)() { + m.answerInputType = value +} +// SetAnswerOptions sets the answerOptions property value. List of possible answer values. +func (m *BookingCustomQuestion) SetAnswerOptions(value []string)() { + m.answerOptions = value +} +// SetDisplayName sets the displayName property value. Display name of this entity. +func (m *BookingCustomQuestion) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_response.go new file mode 100644 index 000000000..aa65b1c5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomQuestionCollectionResponse +type BookingCustomQuestionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingCustomQuestionable +} +// NewBookingCustomQuestionCollectionResponse instantiates a new BookingCustomQuestionCollectionResponse and sets the default values. +func NewBookingCustomQuestionCollectionResponse()(*BookingCustomQuestionCollectionResponse) { + m := &BookingCustomQuestionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingCustomQuestionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomQuestionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomQuestionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomQuestionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomQuestionable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomQuestionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingCustomQuestionCollectionResponse) GetValue()([]BookingCustomQuestionable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingCustomQuestionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingCustomQuestionCollectionResponse) SetValue(value []BookingCustomQuestionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_responseable.go new file mode 100644 index 000000000..4c240371a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_custom_question_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomQuestionCollectionResponseable +type BookingCustomQuestionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingCustomQuestionable) + SetValue(value []BookingCustomQuestionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_custom_questionable.go b/src/internal/connector/graph/betasdk/models/booking_custom_questionable.go new file mode 100644 index 000000000..32fb0ca31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_custom_questionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomQuestionable +type BookingCustomQuestionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnswerInputType()(*AnswerInputType) + GetAnswerOptions()([]string) + GetDisplayName()(*string) + SetAnswerInputType(value *AnswerInputType)() + SetAnswerOptions(value []string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer.go b/src/internal/connector/graph/betasdk/models/booking_customer.go new file mode 100644 index 000000000..24572ff4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer.go @@ -0,0 +1,102 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomer +type BookingCustomer struct { + BookingPerson + // Addresses associated with the customer, including home, business and other addresses. + addresses []PhysicalAddressable + // Phone numbers associated with the customer, including home, business and mobile numbers. + phones []Phoneable +} +// NewBookingCustomer instantiates a new BookingCustomer and sets the default values. +func NewBookingCustomer()(*BookingCustomer) { + m := &BookingCustomer{ + BookingPerson: *NewBookingPerson(), + } + return m +} +// CreateBookingCustomerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomer(), nil +} +// GetAddresses gets the addresses property value. Addresses associated with the customer, including home, business and other addresses. +func (m *BookingCustomer) GetAddresses()([]PhysicalAddressable) { + return m.addresses +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingPerson.GetFieldDeserializers() + res["addresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhysicalAddressable, len(val)) + for i, v := range val { + res[i] = v.(PhysicalAddressable) + } + m.SetAddresses(res) + } + return nil + } + res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetPhones(res) + } + return nil + } + return res +} +// GetPhones gets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers. +func (m *BookingCustomer) GetPhones()([]Phoneable) { + return m.phones +} +// Serialize serializes information the current object +func (m *BookingCustomer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingPerson.Serialize(writer) + if err != nil { + return err + } + if m.GetAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAddresses())) + for i, v := range m.GetAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("addresses", cast) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + return nil +} +// SetAddresses sets the addresses property value. Addresses associated with the customer, including home, business and other addresses. +func (m *BookingCustomer) SetAddresses(value []PhysicalAddressable)() { + m.addresses = value +} +// SetPhones sets the phones property value. Phone numbers associated with the customer, including home, business and mobile numbers. +func (m *BookingCustomer) SetPhones(value []Phoneable)() { + m.phones = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_customer_collection_response.go new file mode 100644 index 000000000..eb6b89139 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerCollectionResponse +type BookingCustomerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingCustomerable +} +// NewBookingCustomerCollectionResponse instantiates a new BookingCustomerCollectionResponse and sets the default values. +func NewBookingCustomerCollectionResponse()(*BookingCustomerCollectionResponse) { + m := &BookingCustomerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingCustomerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomerable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingCustomerCollectionResponse) GetValue()([]BookingCustomerable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingCustomerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingCustomerCollectionResponse) SetValue(value []BookingCustomerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_customer_collection_responseable.go new file mode 100644 index 000000000..92f817fbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerCollectionResponseable +type BookingCustomerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingCustomerable) + SetValue(value []BookingCustomerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_information.go b/src/internal/connector/graph/betasdk/models/booking_customer_information.go new file mode 100644 index 000000000..8616e90a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_information.go @@ -0,0 +1,278 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformation +type BookingCustomerInformation struct { + BookingCustomerInformationBase + // The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. + customerId *string + // It consists of the list of custom questions and answers given by the customer as part of the appointment. + customQuestionAnswers []BookingQuestionAnswerable + // The SMTP address of the bookingCustomer who is booking the appointment. + emailAddress *string + // Represents location information for the bookingCustomer who is booking the appointment. + location Locationable + // The customer's name. + name *string + // Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by the customerId. + notes *string + // The customer's phone number. + phone *string + // Indicates if the SMS notifications will be sent to the customer for the appointment + smsNotificationsEnabled *bool + // The time zone of the customer. For a list of possible values, see dateTimeTimeZone. + timeZone *string +} +// NewBookingCustomerInformation instantiates a new BookingCustomerInformation and sets the default values. +func NewBookingCustomerInformation()(*BookingCustomerInformation) { + m := &BookingCustomerInformation{ + BookingCustomerInformationBase: *NewBookingCustomerInformationBase(), + } + odataTypeValue := "#microsoft.graph.bookingCustomerInformation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBookingCustomerInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomerInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomerInformation(), nil +} +// GetCustomerId gets the customerId property value. The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. +func (m *BookingCustomerInformation) GetCustomerId()(*string) { + return m.customerId +} +// GetCustomQuestionAnswers gets the customQuestionAnswers property value. It consists of the list of custom questions and answers given by the customer as part of the appointment. +func (m *BookingCustomerInformation) GetCustomQuestionAnswers()([]BookingQuestionAnswerable) { + return m.customQuestionAnswers +} +// GetEmailAddress gets the emailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. +func (m *BookingCustomerInformation) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomerInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingCustomerInformationBase.GetFieldDeserializers() + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customQuestionAnswers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingQuestionAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingQuestionAnswerable, len(val)) + for i, v := range val { + res[i] = v.(BookingQuestionAnswerable) + } + m.SetCustomQuestionAnswers(res) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(Locationable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhone(val) + } + return nil + } + res["smsNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmsNotificationsEnabled(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 +} +// GetLocation gets the location property value. Represents location information for the bookingCustomer who is booking the appointment. +func (m *BookingCustomerInformation) GetLocation()(Locationable) { + return m.location +} +// GetName gets the name property value. The customer's name. +func (m *BookingCustomerInformation) GetName()(*string) { + return m.name +} +// GetNotes gets the notes property value. Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by the customerId. +func (m *BookingCustomerInformation) GetNotes()(*string) { + return m.notes +} +// GetPhone gets the phone property value. The customer's phone number. +func (m *BookingCustomerInformation) GetPhone()(*string) { + return m.phone +} +// GetSmsNotificationsEnabled gets the smsNotificationsEnabled property value. Indicates if the SMS notifications will be sent to the customer for the appointment +func (m *BookingCustomerInformation) GetSmsNotificationsEnabled()(*bool) { + return m.smsNotificationsEnabled +} +// GetTimeZone gets the timeZone property value. The time zone of the customer. For a list of possible values, see dateTimeTimeZone. +func (m *BookingCustomerInformation) GetTimeZone()(*string) { + return m.timeZone +} +// Serialize serializes information the current object +func (m *BookingCustomerInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingCustomerInformationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + if m.GetCustomQuestionAnswers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestionAnswers())) + for i, v := range m.GetCustomQuestionAnswers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customQuestionAnswers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smsNotificationsEnabled", m.GetSmsNotificationsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("timeZone", m.GetTimeZone()) + if err != nil { + return err + } + } + return nil +} +// SetCustomerId sets the customerId property value. The ID of the bookingCustomer for this appointment. If no ID is specified when an appointment is created, then a new bookingCustomer object is created. Once set, you should consider the customerId immutable. +func (m *BookingCustomerInformation) SetCustomerId(value *string)() { + m.customerId = value +} +// SetCustomQuestionAnswers sets the customQuestionAnswers property value. It consists of the list of custom questions and answers given by the customer as part of the appointment. +func (m *BookingCustomerInformation) SetCustomQuestionAnswers(value []BookingQuestionAnswerable)() { + m.customQuestionAnswers = value +} +// SetEmailAddress sets the emailAddress property value. The SMTP address of the bookingCustomer who is booking the appointment. +func (m *BookingCustomerInformation) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetLocation sets the location property value. Represents location information for the bookingCustomer who is booking the appointment. +func (m *BookingCustomerInformation) SetLocation(value Locationable)() { + m.location = value +} +// SetName sets the name property value. The customer's name. +func (m *BookingCustomerInformation) SetName(value *string)() { + m.name = value +} +// SetNotes sets the notes property value. Notes from the customer associated with this appointment. You can get the value only when reading this bookingAppointment by its ID. You can set this property only when initially creating an appointment with a new customer. After that point, the value is computed from the customer represented by the customerId. +func (m *BookingCustomerInformation) SetNotes(value *string)() { + m.notes = value +} +// SetPhone sets the phone property value. The customer's phone number. +func (m *BookingCustomerInformation) SetPhone(value *string)() { + m.phone = value +} +// SetSmsNotificationsEnabled sets the smsNotificationsEnabled property value. Indicates if the SMS notifications will be sent to the customer for the appointment +func (m *BookingCustomerInformation) SetSmsNotificationsEnabled(value *bool)() { + m.smsNotificationsEnabled = value +} +// SetTimeZone sets the timeZone property value. The time zone of the customer. For a list of possible values, see dateTimeTimeZone. +func (m *BookingCustomerInformation) SetTimeZone(value *string)() { + m.timeZone = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_information_base.go b/src/internal/connector/graph/betasdk/models/booking_customer_information_base.go new file mode 100644 index 000000000..9133ecdfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_information_base.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformationBase +type BookingCustomerInformationBase 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 OdataType property + odataType *string +} +// NewBookingCustomerInformationBase instantiates a new bookingCustomerInformationBase and sets the default values. +func NewBookingCustomerInformationBase()(*BookingCustomerInformationBase) { + m := &BookingCustomerInformationBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingCustomerInformationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomerInformationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.bookingCustomerInformation": + return NewBookingCustomerInformation(), nil + } + } + } + } + return NewBookingCustomerInformationBase(), 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 *BookingCustomerInformationBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomerInformationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingCustomerInformationBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *BookingCustomerInformationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *BookingCustomerInformationBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingCustomerInformationBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_response.go new file mode 100644 index 000000000..7362de166 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformationBaseCollectionResponse +type BookingCustomerInformationBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingCustomerInformationBaseable +} +// NewBookingCustomerInformationBaseCollectionResponse instantiates a new BookingCustomerInformationBaseCollectionResponse and sets the default values. +func NewBookingCustomerInformationBaseCollectionResponse()(*BookingCustomerInformationBaseCollectionResponse) { + m := &BookingCustomerInformationBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingCustomerInformationBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingCustomerInformationBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingCustomerInformationBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingCustomerInformationBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingCustomerInformationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingCustomerInformationBaseable, len(val)) + for i, v := range val { + res[i] = v.(BookingCustomerInformationBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingCustomerInformationBaseCollectionResponse) GetValue()([]BookingCustomerInformationBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingCustomerInformationBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingCustomerInformationBaseCollectionResponse) SetValue(value []BookingCustomerInformationBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_responseable.go new file mode 100644 index 000000000..668c278e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_information_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformationBaseCollectionResponseable +type BookingCustomerInformationBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingCustomerInformationBaseable) + SetValue(value []BookingCustomerInformationBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_information_baseable.go b/src/internal/connector/graph/betasdk/models/booking_customer_information_baseable.go new file mode 100644 index 000000000..db5211ad4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_information_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformationBaseable +type BookingCustomerInformationBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customer_informationable.go b/src/internal/connector/graph/betasdk/models/booking_customer_informationable.go new file mode 100644 index 000000000..564f60571 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customer_informationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerInformationable +type BookingCustomerInformationable interface { + BookingCustomerInformationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomerId()(*string) + GetCustomQuestionAnswers()([]BookingQuestionAnswerable) + GetEmailAddress()(*string) + GetLocation()(Locationable) + GetName()(*string) + GetNotes()(*string) + GetPhone()(*string) + GetSmsNotificationsEnabled()(*bool) + GetTimeZone()(*string) + SetCustomerId(value *string)() + SetCustomQuestionAnswers(value []BookingQuestionAnswerable)() + SetEmailAddress(value *string)() + SetLocation(value Locationable)() + SetName(value *string)() + SetNotes(value *string)() + SetPhone(value *string)() + SetSmsNotificationsEnabled(value *bool)() + SetTimeZone(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_customerable.go b/src/internal/connector/graph/betasdk/models/booking_customerable.go new file mode 100644 index 000000000..e28c335b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_customerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingCustomerable +type BookingCustomerable interface { + BookingPersonable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddresses()([]PhysicalAddressable) + GetPhones()([]Phoneable) + SetAddresses(value []PhysicalAddressable)() + SetPhones(value []Phoneable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_invoice_status.go b/src/internal/connector/graph/betasdk/models/booking_invoice_status.go new file mode 100644 index 000000000..00247f369 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_invoice_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingInvoiceStatus int + +const ( + DRAFT_BOOKINGINVOICESTATUS BookingInvoiceStatus = iota + REVIEWING_BOOKINGINVOICESTATUS + OPEN_BOOKINGINVOICESTATUS + CANCELED_BOOKINGINVOICESTATUS + PAID_BOOKINGINVOICESTATUS + CORRECTIVE_BOOKINGINVOICESTATUS +) + +func (i BookingInvoiceStatus) String() string { + return []string{"draft", "reviewing", "open", "canceled", "paid", "corrective"}[i] +} +func ParseBookingInvoiceStatus(v string) (interface{}, error) { + result := DRAFT_BOOKINGINVOICESTATUS + switch v { + case "draft": + result = DRAFT_BOOKINGINVOICESTATUS + case "reviewing": + result = REVIEWING_BOOKINGINVOICESTATUS + case "open": + result = OPEN_BOOKINGINVOICESTATUS + case "canceled": + result = CANCELED_BOOKINGINVOICESTATUS + case "paid": + result = PAID_BOOKINGINVOICESTATUS + case "corrective": + result = CORRECTIVE_BOOKINGINVOICESTATUS + default: + return 0, errors.New("Unknown BookingInvoiceStatus value: " + v) + } + return &result, nil +} +func SerializeBookingInvoiceStatus(values []BookingInvoiceStatus) []string { + 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/booking_named_entity.go b/src/internal/connector/graph/betasdk/models/booking_named_entity.go new file mode 100644 index 000000000..00087e1f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_named_entity.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingNamedEntity +type BookingNamedEntity struct { + Entity + // A name for the derived entity, which interfaces with customers. + displayName *string +} +// NewBookingNamedEntity instantiates a new BookingNamedEntity and sets the default values. +func NewBookingNamedEntity()(*BookingNamedEntity) { + m := &BookingNamedEntity{ + Entity: *NewEntity(), + } + return m +} +// CreateBookingNamedEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingNamedEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.bookingBusiness": + return NewBookingBusiness(), nil + case "#microsoft.graph.bookingCustomer": + return NewBookingCustomer(), nil + case "#microsoft.graph.bookingPerson": + return NewBookingPerson(), nil + case "#microsoft.graph.bookingService": + return NewBookingService(), nil + case "#microsoft.graph.bookingStaffMember": + return NewBookingStaffMember(), nil + } + } + } + } + return NewBookingNamedEntity(), nil +} +// GetDisplayName gets the displayName property value. A name for the derived entity, which interfaces with customers. +func (m *BookingNamedEntity) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingNamedEntity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BookingNamedEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. A name for the derived entity, which interfaces with customers. +func (m *BookingNamedEntity) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_named_entityable.go b/src/internal/connector/graph/betasdk/models/booking_named_entityable.go new file mode 100644 index 000000000..8243cfc67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_named_entityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingNamedEntityable +type BookingNamedEntityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_person.go b/src/internal/connector/graph/betasdk/models/booking_person.go new file mode 100644 index 000000000..c57034be8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_person.go @@ -0,0 +1,82 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingPerson represents a booking customer or staff member. +type BookingPerson struct { + BookingNamedEntity + // The email address of the person. + emailAddress *string +} +// NewBookingPerson instantiates a new bookingPerson and sets the default values. +func NewBookingPerson()(*BookingPerson) { + m := &BookingPerson{ + BookingNamedEntity: *NewBookingNamedEntity(), + } + odataTypeValue := "#microsoft.graph.bookingPerson"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBookingPersonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingPersonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.bookingCustomer": + return NewBookingCustomer(), nil + case "#microsoft.graph.bookingStaffMember": + return NewBookingStaffMember(), nil + } + } + } + } + return NewBookingPerson(), nil +} +// GetEmailAddress gets the emailAddress property value. The email address of the person. +func (m *BookingPerson) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingPerson) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingNamedEntity.GetFieldDeserializers() + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BookingPerson) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingNamedEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + return nil +} +// SetEmailAddress sets the emailAddress property value. The email address of the person. +func (m *BookingPerson) SetEmailAddress(value *string)() { + m.emailAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_personable.go b/src/internal/connector/graph/betasdk/models/booking_personable.go new file mode 100644 index 000000000..8b48c1d46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_personable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingPersonable +type BookingPersonable interface { + BookingNamedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailAddress()(*string) + SetEmailAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_price_type.go b/src/internal/connector/graph/betasdk/models/booking_price_type.go new file mode 100644 index 000000000..be23b4ba9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_price_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingPriceType int + +const ( + // The price of the service is not defined. + UNDEFINED_BOOKINGPRICETYPE BookingPriceType = iota + // The price of the service is fixed. + FIXEDPRICE_BOOKINGPRICETYPE + // The price of the service starts with a particular value, but can be higher based on the final services performed. + STARTINGAT_BOOKINGPRICETYPE + // The price of the service depends on the number of hours a staff member works on the service. + HOURLY_BOOKINGPRICETYPE + // The service is free. + FREE_BOOKINGPRICETYPE + // The price of the service varies. + PRICEVARIES_BOOKINGPRICETYPE + // The price of the service is not listed. + CALLUS_BOOKINGPRICETYPE + // The price of the service is not set. + NOTSET_BOOKINGPRICETYPE +) + +func (i BookingPriceType) String() string { + return []string{"undefined", "fixedPrice", "startingAt", "hourly", "free", "priceVaries", "callUs", "notSet"}[i] +} +func ParseBookingPriceType(v string) (interface{}, error) { + result := UNDEFINED_BOOKINGPRICETYPE + switch v { + case "undefined": + result = UNDEFINED_BOOKINGPRICETYPE + case "fixedPrice": + result = FIXEDPRICE_BOOKINGPRICETYPE + case "startingAt": + result = STARTINGAT_BOOKINGPRICETYPE + case "hourly": + result = HOURLY_BOOKINGPRICETYPE + case "free": + result = FREE_BOOKINGPRICETYPE + case "priceVaries": + result = PRICEVARIES_BOOKINGPRICETYPE + case "callUs": + result = CALLUS_BOOKINGPRICETYPE + case "notSet": + result = NOTSET_BOOKINGPRICETYPE + default: + return 0, errors.New("Unknown BookingPriceType value: " + v) + } + return &result, nil +} +func SerializeBookingPriceType(values []BookingPriceType) []string { + 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/booking_question_answer.go b/src/internal/connector/graph/betasdk/models/booking_question_answer.go new file mode 100644 index 000000000..8bcb84e65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_answer.go @@ -0,0 +1,262 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAnswer +type BookingQuestionAnswer 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 answer given by the user in case the answerInputType is text. + answer *string + // The expected answer type. The possible values are: text, radioButton, unknownFutureValue. + answerInputType *AnswerInputType + // In case the answerInputType is radioButton, this will consists of a list of possible answer values. + answerOptions []string + // Indicates whether it is mandatory to answer the custom question. + isRequired *bool + // The OdataType property + odataType *string + // The question. + question *string + // The ID of the custom question. + questionId *string + // The answers selected by the user. + selectedOptions []string +} +// NewBookingQuestionAnswer instantiates a new bookingQuestionAnswer and sets the default values. +func NewBookingQuestionAnswer()(*BookingQuestionAnswer) { + m := &BookingQuestionAnswer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingQuestionAnswerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingQuestionAnswerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingQuestionAnswer(), 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 *BookingQuestionAnswer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAnswer gets the answer property value. The answer given by the user in case the answerInputType is text. +func (m *BookingQuestionAnswer) GetAnswer()(*string) { + return m.answer +} +// GetAnswerInputType gets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue. +func (m *BookingQuestionAnswer) GetAnswerInputType()(*AnswerInputType) { + return m.answerInputType +} +// GetAnswerOptions gets the answerOptions property value. In case the answerInputType is radioButton, this will consists of a list of possible answer values. +func (m *BookingQuestionAnswer) GetAnswerOptions()([]string) { + return m.answerOptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingQuestionAnswer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["answer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAnswer(val) + } + return nil + } + res["answerInputType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerInputType) + if err != nil { + return err + } + if val != nil { + m.SetAnswerInputType(val.(*AnswerInputType)) + } + return nil + } + res["answerOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAnswerOptions(res) + } + return nil + } + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(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["question"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuestion(val) + } + return nil + } + res["questionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuestionId(val) + } + return nil + } + res["selectedOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSelectedOptions(res) + } + return nil + } + return res +} +// GetIsRequired gets the isRequired property value. Indicates whether it is mandatory to answer the custom question. +func (m *BookingQuestionAnswer) GetIsRequired()(*bool) { + return m.isRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingQuestionAnswer) GetOdataType()(*string) { + return m.odataType +} +// GetQuestion gets the question property value. The question. +func (m *BookingQuestionAnswer) GetQuestion()(*string) { + return m.question +} +// GetQuestionId gets the questionId property value. The ID of the custom question. +func (m *BookingQuestionAnswer) GetQuestionId()(*string) { + return m.questionId +} +// GetSelectedOptions gets the selectedOptions property value. The answers selected by the user. +func (m *BookingQuestionAnswer) GetSelectedOptions()([]string) { + return m.selectedOptions +} +// Serialize serializes information the current object +func (m *BookingQuestionAnswer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("answer", m.GetAnswer()) + if err != nil { + return err + } + } + if m.GetAnswerInputType() != nil { + cast := (*m.GetAnswerInputType()).String() + err := writer.WriteStringValue("answerInputType", &cast) + if err != nil { + return err + } + } + if m.GetAnswerOptions() != nil { + err := writer.WriteCollectionOfStringValues("answerOptions", m.GetAnswerOptions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("question", m.GetQuestion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("questionId", m.GetQuestionId()) + if err != nil { + return err + } + } + if m.GetSelectedOptions() != nil { + err := writer.WriteCollectionOfStringValues("selectedOptions", m.GetSelectedOptions()) + 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 *BookingQuestionAnswer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAnswer sets the answer property value. The answer given by the user in case the answerInputType is text. +func (m *BookingQuestionAnswer) SetAnswer(value *string)() { + m.answer = value +} +// SetAnswerInputType sets the answerInputType property value. The expected answer type. The possible values are: text, radioButton, unknownFutureValue. +func (m *BookingQuestionAnswer) SetAnswerInputType(value *AnswerInputType)() { + m.answerInputType = value +} +// SetAnswerOptions sets the answerOptions property value. In case the answerInputType is radioButton, this will consists of a list of possible answer values. +func (m *BookingQuestionAnswer) SetAnswerOptions(value []string)() { + m.answerOptions = value +} +// SetIsRequired sets the isRequired property value. Indicates whether it is mandatory to answer the custom question. +func (m *BookingQuestionAnswer) SetIsRequired(value *bool)() { + m.isRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingQuestionAnswer) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuestion sets the question property value. The question. +func (m *BookingQuestionAnswer) SetQuestion(value *string)() { + m.question = value +} +// SetQuestionId sets the questionId property value. The ID of the custom question. +func (m *BookingQuestionAnswer) SetQuestionId(value *string)() { + m.questionId = value +} +// SetSelectedOptions sets the selectedOptions property value. The answers selected by the user. +func (m *BookingQuestionAnswer) SetSelectedOptions(value []string)() { + m.selectedOptions = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_response.go new file mode 100644 index 000000000..88245b2ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAnswerCollectionResponse +type BookingQuestionAnswerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingQuestionAnswerable +} +// NewBookingQuestionAnswerCollectionResponse instantiates a new BookingQuestionAnswerCollectionResponse and sets the default values. +func NewBookingQuestionAnswerCollectionResponse()(*BookingQuestionAnswerCollectionResponse) { + m := &BookingQuestionAnswerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingQuestionAnswerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingQuestionAnswerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingQuestionAnswerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingQuestionAnswerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingQuestionAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingQuestionAnswerable, len(val)) + for i, v := range val { + res[i] = v.(BookingQuestionAnswerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingQuestionAnswerCollectionResponse) GetValue()([]BookingQuestionAnswerable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingQuestionAnswerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingQuestionAnswerCollectionResponse) SetValue(value []BookingQuestionAnswerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_responseable.go new file mode 100644 index 000000000..0185845dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_answer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAnswerCollectionResponseable +type BookingQuestionAnswerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingQuestionAnswerable) + SetValue(value []BookingQuestionAnswerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_answerable.go b/src/internal/connector/graph/betasdk/models/booking_question_answerable.go new file mode 100644 index 000000000..11c5a20eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_answerable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAnswerable +type BookingQuestionAnswerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnswer()(*string) + GetAnswerInputType()(*AnswerInputType) + GetAnswerOptions()([]string) + GetIsRequired()(*bool) + GetOdataType()(*string) + GetQuestion()(*string) + GetQuestionId()(*string) + GetSelectedOptions()([]string) + SetAnswer(value *string)() + SetAnswerInputType(value *AnswerInputType)() + SetAnswerOptions(value []string)() + SetIsRequired(value *bool)() + SetOdataType(value *string)() + SetQuestion(value *string)() + SetQuestionId(value *string)() + SetSelectedOptions(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_assignment.go b/src/internal/connector/graph/betasdk/models/booking_question_assignment.go new file mode 100644 index 000000000..9e4ad8da5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_assignment.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAssignment +type BookingQuestionAssignment 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 whether it is mandatory to answer the custom question. + isRequired *bool + // The OdataType property + odataType *string + // If it is mandatory to answer the custom question. + questionId *string +} +// NewBookingQuestionAssignment instantiates a new bookingQuestionAssignment and sets the default values. +func NewBookingQuestionAssignment()(*BookingQuestionAssignment) { + m := &BookingQuestionAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingQuestionAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingQuestionAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingQuestionAssignment(), 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 *BookingQuestionAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingQuestionAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(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["questionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuestionId(val) + } + return nil + } + return res +} +// GetIsRequired gets the isRequired property value. Indicates whether it is mandatory to answer the custom question. +func (m *BookingQuestionAssignment) GetIsRequired()(*bool) { + return m.isRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingQuestionAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetQuestionId gets the questionId property value. If it is mandatory to answer the custom question. +func (m *BookingQuestionAssignment) GetQuestionId()(*string) { + return m.questionId +} +// Serialize serializes information the current object +func (m *BookingQuestionAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("questionId", m.GetQuestionId()) + 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 *BookingQuestionAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsRequired sets the isRequired property value. Indicates whether it is mandatory to answer the custom question. +func (m *BookingQuestionAssignment) SetIsRequired(value *bool)() { + m.isRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingQuestionAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuestionId sets the questionId property value. If it is mandatory to answer the custom question. +func (m *BookingQuestionAssignment) SetQuestionId(value *string)() { + m.questionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_response.go new file mode 100644 index 000000000..3694f28b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAssignmentCollectionResponse +type BookingQuestionAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingQuestionAssignmentable +} +// NewBookingQuestionAssignmentCollectionResponse instantiates a new BookingQuestionAssignmentCollectionResponse and sets the default values. +func NewBookingQuestionAssignmentCollectionResponse()(*BookingQuestionAssignmentCollectionResponse) { + m := &BookingQuestionAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingQuestionAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingQuestionAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingQuestionAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingQuestionAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingQuestionAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingQuestionAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(BookingQuestionAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingQuestionAssignmentCollectionResponse) GetValue()([]BookingQuestionAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingQuestionAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingQuestionAssignmentCollectionResponse) SetValue(value []BookingQuestionAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_responseable.go new file mode 100644 index 000000000..0fb8b95e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAssignmentCollectionResponseable +type BookingQuestionAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingQuestionAssignmentable) + SetValue(value []BookingQuestionAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_question_assignmentable.go b/src/internal/connector/graph/betasdk/models/booking_question_assignmentable.go new file mode 100644 index 000000000..334dd1b42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_question_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingQuestionAssignmentable +type BookingQuestionAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRequired()(*bool) + GetOdataType()(*string) + GetQuestionId()(*string) + SetIsRequired(value *bool)() + SetOdataType(value *string)() + SetQuestionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_reminder.go b/src/internal/connector/graph/betasdk/models/booking_reminder.go new file mode 100644 index 000000000..d8eee77d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_reminder.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingReminder this type represents when and to whom to send an e-mail reminder. +type BookingReminder 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 message in the reminder. + message *string + // The OdataType property + odataType *string + // The amount of time before the start of an appointment that the reminder should be sent. It's denoted in ISO 8601 format. + offset *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The recipients property + recipients *BookingReminderRecipients +} +// NewBookingReminder instantiates a new bookingReminder and sets the default values. +func NewBookingReminder()(*BookingReminder) { + m := &BookingReminder{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingReminderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingReminderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingReminder(), 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 *BookingReminder) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingReminder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + res["recipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingReminderRecipients) + if err != nil { + return err + } + if val != nil { + m.SetRecipients(val.(*BookingReminderRecipients)) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message in the reminder. +func (m *BookingReminder) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingReminder) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. The amount of time before the start of an appointment that the reminder should be sent. It's denoted in ISO 8601 format. +func (m *BookingReminder) GetOffset()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.offset +} +// GetRecipients gets the recipients property value. The recipients property +func (m *BookingReminder) GetRecipients()(*BookingReminderRecipients) { + return m.recipients +} +// Serialize serializes information the current object +func (m *BookingReminder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("offset", m.GetOffset()) + if err != nil { + return err + } + } + if m.GetRecipients() != nil { + cast := (*m.GetRecipients()).String() + err := writer.WriteStringValue("recipients", &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 *BookingReminder) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMessage sets the message property value. The message in the reminder. +func (m *BookingReminder) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingReminder) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. The amount of time before the start of an appointment that the reminder should be sent. It's denoted in ISO 8601 format. +func (m *BookingReminder) SetOffset(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.offset = value +} +// SetRecipients sets the recipients property value. The recipients property +func (m *BookingReminder) SetRecipients(value *BookingReminderRecipients)() { + m.recipients = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_reminder_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_reminder_collection_response.go new file mode 100644 index 000000000..d8bc569df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_reminder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingReminderCollectionResponse +type BookingReminderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingReminderable +} +// NewBookingReminderCollectionResponse instantiates a new BookingReminderCollectionResponse and sets the default values. +func NewBookingReminderCollectionResponse()(*BookingReminderCollectionResponse) { + m := &BookingReminderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingReminderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingReminderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingReminderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingReminderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingReminderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingReminderable, len(val)) + for i, v := range val { + res[i] = v.(BookingReminderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingReminderCollectionResponse) GetValue()([]BookingReminderable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingReminderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingReminderCollectionResponse) SetValue(value []BookingReminderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_reminder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_reminder_collection_responseable.go new file mode 100644 index 000000000..0ddb23dc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_reminder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingReminderCollectionResponseable +type BookingReminderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingReminderable) + SetValue(value []BookingReminderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_reminder_recipients.go b/src/internal/connector/graph/betasdk/models/booking_reminder_recipients.go new file mode 100644 index 000000000..865c2c9bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_reminder_recipients.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingReminderRecipients int + +const ( + ALLATTENDEES_BOOKINGREMINDERRECIPIENTS BookingReminderRecipients = iota + STAFF_BOOKINGREMINDERRECIPIENTS + CUSTOMER_BOOKINGREMINDERRECIPIENTS +) + +func (i BookingReminderRecipients) String() string { + return []string{"allAttendees", "staff", "customer"}[i] +} +func ParseBookingReminderRecipients(v string) (interface{}, error) { + result := ALLATTENDEES_BOOKINGREMINDERRECIPIENTS + switch v { + case "allAttendees": + result = ALLATTENDEES_BOOKINGREMINDERRECIPIENTS + case "staff": + result = STAFF_BOOKINGREMINDERRECIPIENTS + case "customer": + result = CUSTOMER_BOOKINGREMINDERRECIPIENTS + default: + return 0, errors.New("Unknown BookingReminderRecipients value: " + v) + } + return &result, nil +} +func SerializeBookingReminderRecipients(values []BookingReminderRecipients) []string { + 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/booking_reminderable.go b/src/internal/connector/graph/betasdk/models/booking_reminderable.go new file mode 100644 index 000000000..30268bc34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_reminderable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingReminderable +type BookingReminderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetOdataType()(*string) + GetOffset()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetRecipients()(*BookingReminderRecipients) + SetMessage(value *string)() + SetOdataType(value *string)() + SetOffset(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetRecipients(value *BookingReminderRecipients)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_scheduling_policy.go b/src/internal/connector/graph/betasdk/models/booking_scheduling_policy.go new file mode 100644 index 000000000..d531a1225 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_scheduling_policy.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingSchedulingPolicy this type represents the set of policies that dictate how bookings can be created in a Booking Calendar. +type BookingSchedulingPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // True if to allow customers to choose a specific person for the booking. + allowStaffSelection *bool + // Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format. + maximumAdvance *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The minimum amount of time before which bookings and cancellations must be made. It follows the ISO 8601 format. + minimumLeadTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The OdataType property + odataType *string + // True to notify the business via email when a booking is created or changed. Use the email address specified in the email property of the bookingBusiness entity for the business. + sendConfirmationsToOwner *bool + // Duration of each time slot, denoted in ISO 8601 format. + timeSlotInterval *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewBookingSchedulingPolicy instantiates a new bookingSchedulingPolicy and sets the default values. +func NewBookingSchedulingPolicy()(*BookingSchedulingPolicy) { + m := &BookingSchedulingPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingSchedulingPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingSchedulingPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingSchedulingPolicy(), 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 *BookingSchedulingPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowStaffSelection gets the allowStaffSelection property value. True if to allow customers to choose a specific person for the booking. +func (m *BookingSchedulingPolicy) GetAllowStaffSelection()(*bool) { + return m.allowStaffSelection +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingSchedulingPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowStaffSelection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowStaffSelection(val) + } + return nil + } + res["maximumAdvance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumAdvance(val) + } + return nil + } + res["minimumLeadTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumLeadTime(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["sendConfirmationsToOwner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSendConfirmationsToOwner(val) + } + return nil + } + res["timeSlotInterval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeSlotInterval(val) + } + return nil + } + return res +} +// GetMaximumAdvance gets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format. +func (m *BookingSchedulingPolicy) GetMaximumAdvance()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maximumAdvance +} +// GetMinimumLeadTime gets the minimumLeadTime property value. The minimum amount of time before which bookings and cancellations must be made. It follows the ISO 8601 format. +func (m *BookingSchedulingPolicy) GetMinimumLeadTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.minimumLeadTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingSchedulingPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetSendConfirmationsToOwner gets the sendConfirmationsToOwner property value. True to notify the business via email when a booking is created or changed. Use the email address specified in the email property of the bookingBusiness entity for the business. +func (m *BookingSchedulingPolicy) GetSendConfirmationsToOwner()(*bool) { + return m.sendConfirmationsToOwner +} +// GetTimeSlotInterval gets the timeSlotInterval property value. Duration of each time slot, denoted in ISO 8601 format. +func (m *BookingSchedulingPolicy) GetTimeSlotInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.timeSlotInterval +} +// Serialize serializes information the current object +func (m *BookingSchedulingPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowStaffSelection", m.GetAllowStaffSelection()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("maximumAdvance", m.GetMaximumAdvance()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("minimumLeadTime", m.GetMinimumLeadTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sendConfirmationsToOwner", m.GetSendConfirmationsToOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("timeSlotInterval", m.GetTimeSlotInterval()) + 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 *BookingSchedulingPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowStaffSelection sets the allowStaffSelection property value. True if to allow customers to choose a specific person for the booking. +func (m *BookingSchedulingPolicy) SetAllowStaffSelection(value *bool)() { + m.allowStaffSelection = value +} +// SetMaximumAdvance sets the maximumAdvance property value. Maximum number of days in advance that a booking can be made. It follows the ISO 8601 format. +func (m *BookingSchedulingPolicy) SetMaximumAdvance(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maximumAdvance = value +} +// SetMinimumLeadTime sets the minimumLeadTime property value. The minimum amount of time before which bookings and cancellations must be made. It follows the ISO 8601 format. +func (m *BookingSchedulingPolicy) SetMinimumLeadTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.minimumLeadTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingSchedulingPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetSendConfirmationsToOwner sets the sendConfirmationsToOwner property value. True to notify the business via email when a booking is created or changed. Use the email address specified in the email property of the bookingBusiness entity for the business. +func (m *BookingSchedulingPolicy) SetSendConfirmationsToOwner(value *bool)() { + m.sendConfirmationsToOwner = value +} +// SetTimeSlotInterval sets the timeSlotInterval property value. Duration of each time slot, denoted in ISO 8601 format. +func (m *BookingSchedulingPolicy) SetTimeSlotInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.timeSlotInterval = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_scheduling_policyable.go b/src/internal/connector/graph/betasdk/models/booking_scheduling_policyable.go new file mode 100644 index 000000000..7602cedaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_scheduling_policyable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingSchedulingPolicyable +type BookingSchedulingPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowStaffSelection()(*bool) + GetMaximumAdvance()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetMinimumLeadTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOdataType()(*string) + GetSendConfirmationsToOwner()(*bool) + GetTimeSlotInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAllowStaffSelection(value *bool)() + SetMaximumAdvance(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetMinimumLeadTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOdataType(value *string)() + SetSendConfirmationsToOwner(value *bool)() + SetTimeSlotInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_service.go b/src/internal/connector/graph/betasdk/models/booking_service.go new file mode 100644 index 000000000..e2004a06a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_service.go @@ -0,0 +1,571 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingService represents a particular service offered by a booking business. +type BookingService struct { + BookingNamedEntity + // Additional information that is sent to the customer when an appointment is confirmed. + additionalInformation *string + // Contains the set of custom questions associated with a particular service. + customQuestions []BookingQuestionAssignmentable + // The default length of the service, represented in numbers of days, hours, minutes, and seconds. For example, P11D23H59M59.999999999999S. + defaultDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The default physical location for the service. + defaultLocation Locationable + // The default monetary price for the service. + defaultPrice *float64 + // Represents the type of pricing of a booking service. + defaultPriceType *BookingPriceType + // The default set of reminders for an appointment of this service. The value of this property is available only when reading this bookingService by its ID. + defaultReminders []BookingReminderable + // A text description for the service. + description *string + // True if an anonymousJoinWebUrl(webrtcUrl) will be generated for the appointment booked for this service. + isAnonymousJoinEnabled *bool + // True means this service is not available to customers for booking. + isHiddenFromCustomers *bool + // True indicates that the appointments for the service will be held online. Default value is false. + isLocationOnline *bool + // The language of the self service booking page. + languageTag *string + // The maximum number of customers allowed in a service. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. + maximumAttendeesCount *int32 + // Additional information about this service. + notes *string + // The time to buffer after an appointment for this service ends, and before the next customer appointment can be booked. + postBuffer *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The time to buffer before an appointment for this service can start. + preBuffer *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The set of policies that determine how appointments for this type of service should be created and managed. + schedulingPolicy BookingSchedulingPolicyable + // True indicates SMS notifications can be sent to the customers for the appointment of the service. Default value is false. + smsNotificationsEnabled *bool + // Represents those staff members who provide this service. + staffMemberIds []string + // The URL a customer uses to access the service. + webUrl *string +} +// NewBookingService instantiates a new bookingService and sets the default values. +func NewBookingService()(*BookingService) { + m := &BookingService{ + BookingNamedEntity: *NewBookingNamedEntity(), + } + odataTypeValue := "#microsoft.graph.bookingService"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBookingServiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingServiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingService(), nil +} +// GetAdditionalInformation gets the additionalInformation property value. Additional information that is sent to the customer when an appointment is confirmed. +func (m *BookingService) GetAdditionalInformation()(*string) { + return m.additionalInformation +} +// GetCustomQuestions gets the customQuestions property value. Contains the set of custom questions associated with a particular service. +func (m *BookingService) GetCustomQuestions()([]BookingQuestionAssignmentable) { + return m.customQuestions +} +// GetDefaultDuration gets the defaultDuration property value. The default length of the service, represented in numbers of days, hours, minutes, and seconds. For example, P11D23H59M59.999999999999S. +func (m *BookingService) GetDefaultDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.defaultDuration +} +// GetDefaultLocation gets the defaultLocation property value. The default physical location for the service. +func (m *BookingService) GetDefaultLocation()(Locationable) { + return m.defaultLocation +} +// GetDefaultPrice gets the defaultPrice property value. The default monetary price for the service. +func (m *BookingService) GetDefaultPrice()(*float64) { + return m.defaultPrice +} +// GetDefaultPriceType gets the defaultPriceType property value. Represents the type of pricing of a booking service. +func (m *BookingService) GetDefaultPriceType()(*BookingPriceType) { + return m.defaultPriceType +} +// GetDefaultReminders gets the defaultReminders property value. The default set of reminders for an appointment of this service. The value of this property is available only when reading this bookingService by its ID. +func (m *BookingService) GetDefaultReminders()([]BookingReminderable) { + return m.defaultReminders +} +// GetDescription gets the description property value. A text description for the service. +func (m *BookingService) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingService) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingNamedEntity.GetFieldDeserializers() + res["additionalInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInformation(val) + } + return nil + } + res["customQuestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingQuestionAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingQuestionAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(BookingQuestionAssignmentable) + } + m.SetCustomQuestions(res) + } + return nil + } + res["defaultDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDuration(val) + } + return nil + } + res["defaultLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultLocation(val.(Locationable)) + } + return nil + } + res["defaultPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultPrice(val) + } + return nil + } + res["defaultPriceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingPriceType) + if err != nil { + return err + } + if val != nil { + m.SetDefaultPriceType(val.(*BookingPriceType)) + } + return nil + } + res["defaultReminders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingReminderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingReminderable, len(val)) + for i, v := range val { + res[i] = v.(BookingReminderable) + } + m.SetDefaultReminders(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isAnonymousJoinEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAnonymousJoinEnabled(val) + } + return nil + } + res["isHiddenFromCustomers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHiddenFromCustomers(val) + } + return nil + } + res["isLocationOnline"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLocationOnline(val) + } + return nil + } + 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["maximumAttendeesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumAttendeesCount(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["postBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPostBuffer(val) + } + return nil + } + res["preBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPreBuffer(val) + } + return nil + } + res["schedulingPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBookingSchedulingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedulingPolicy(val.(BookingSchedulingPolicyable)) + } + return nil + } + res["smsNotificationsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmsNotificationsEnabled(val) + } + return nil + } + res["staffMemberIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetStaffMemberIds(res) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetIsAnonymousJoinEnabled gets the isAnonymousJoinEnabled property value. True if an anonymousJoinWebUrl(webrtcUrl) will be generated for the appointment booked for this service. +func (m *BookingService) GetIsAnonymousJoinEnabled()(*bool) { + return m.isAnonymousJoinEnabled +} +// GetIsHiddenFromCustomers gets the isHiddenFromCustomers property value. True means this service is not available to customers for booking. +func (m *BookingService) GetIsHiddenFromCustomers()(*bool) { + return m.isHiddenFromCustomers +} +// GetIsLocationOnline gets the isLocationOnline property value. True indicates that the appointments for the service will be held online. Default value is false. +func (m *BookingService) GetIsLocationOnline()(*bool) { + return m.isLocationOnline +} +// GetLanguageTag gets the languageTag property value. The language of the self service booking page. +func (m *BookingService) GetLanguageTag()(*string) { + return m.languageTag +} +// GetMaximumAttendeesCount gets the maximumAttendeesCount property value. The maximum number of customers allowed in a service. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. +func (m *BookingService) GetMaximumAttendeesCount()(*int32) { + return m.maximumAttendeesCount +} +// GetNotes gets the notes property value. Additional information about this service. +func (m *BookingService) GetNotes()(*string) { + return m.notes +} +// GetPostBuffer gets the postBuffer property value. The time to buffer after an appointment for this service ends, and before the next customer appointment can be booked. +func (m *BookingService) GetPostBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.postBuffer +} +// GetPreBuffer gets the preBuffer property value. The time to buffer before an appointment for this service can start. +func (m *BookingService) GetPreBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.preBuffer +} +// GetSchedulingPolicy gets the schedulingPolicy property value. The set of policies that determine how appointments for this type of service should be created and managed. +func (m *BookingService) GetSchedulingPolicy()(BookingSchedulingPolicyable) { + return m.schedulingPolicy +} +// GetSmsNotificationsEnabled gets the smsNotificationsEnabled property value. True indicates SMS notifications can be sent to the customers for the appointment of the service. Default value is false. +func (m *BookingService) GetSmsNotificationsEnabled()(*bool) { + return m.smsNotificationsEnabled +} +// GetStaffMemberIds gets the staffMemberIds property value. Represents those staff members who provide this service. +func (m *BookingService) GetStaffMemberIds()([]string) { + return m.staffMemberIds +} +// GetWebUrl gets the webUrl property value. The URL a customer uses to access the service. +func (m *BookingService) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *BookingService) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingNamedEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("additionalInformation", m.GetAdditionalInformation()) + if err != nil { + return err + } + } + if m.GetCustomQuestions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestions())) + for i, v := range m.GetCustomQuestions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customQuestions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("defaultDuration", m.GetDefaultDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultLocation", m.GetDefaultLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("defaultPrice", m.GetDefaultPrice()) + if err != nil { + return err + } + } + if m.GetDefaultPriceType() != nil { + cast := (*m.GetDefaultPriceType()).String() + err = writer.WriteStringValue("defaultPriceType", &cast) + if err != nil { + return err + } + } + if m.GetDefaultReminders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefaultReminders())) + for i, v := range m.GetDefaultReminders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("defaultReminders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAnonymousJoinEnabled", m.GetIsAnonymousJoinEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isHiddenFromCustomers", m.GetIsHiddenFromCustomers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLocationOnline", m.GetIsLocationOnline()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maximumAttendeesCount", m.GetMaximumAttendeesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("postBuffer", m.GetPostBuffer()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("preBuffer", m.GetPreBuffer()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedulingPolicy", m.GetSchedulingPolicy()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smsNotificationsEnabled", m.GetSmsNotificationsEnabled()) + if err != nil { + return err + } + } + if m.GetStaffMemberIds() != nil { + err = writer.WriteCollectionOfStringValues("staffMemberIds", m.GetStaffMemberIds()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalInformation sets the additionalInformation property value. Additional information that is sent to the customer when an appointment is confirmed. +func (m *BookingService) SetAdditionalInformation(value *string)() { + m.additionalInformation = value +} +// SetCustomQuestions sets the customQuestions property value. Contains the set of custom questions associated with a particular service. +func (m *BookingService) SetCustomQuestions(value []BookingQuestionAssignmentable)() { + m.customQuestions = value +} +// SetDefaultDuration sets the defaultDuration property value. The default length of the service, represented in numbers of days, hours, minutes, and seconds. For example, P11D23H59M59.999999999999S. +func (m *BookingService) SetDefaultDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.defaultDuration = value +} +// SetDefaultLocation sets the defaultLocation property value. The default physical location for the service. +func (m *BookingService) SetDefaultLocation(value Locationable)() { + m.defaultLocation = value +} +// SetDefaultPrice sets the defaultPrice property value. The default monetary price for the service. +func (m *BookingService) SetDefaultPrice(value *float64)() { + m.defaultPrice = value +} +// SetDefaultPriceType sets the defaultPriceType property value. Represents the type of pricing of a booking service. +func (m *BookingService) SetDefaultPriceType(value *BookingPriceType)() { + m.defaultPriceType = value +} +// SetDefaultReminders sets the defaultReminders property value. The default set of reminders for an appointment of this service. The value of this property is available only when reading this bookingService by its ID. +func (m *BookingService) SetDefaultReminders(value []BookingReminderable)() { + m.defaultReminders = value +} +// SetDescription sets the description property value. A text description for the service. +func (m *BookingService) SetDescription(value *string)() { + m.description = value +} +// SetIsAnonymousJoinEnabled sets the isAnonymousJoinEnabled property value. True if an anonymousJoinWebUrl(webrtcUrl) will be generated for the appointment booked for this service. +func (m *BookingService) SetIsAnonymousJoinEnabled(value *bool)() { + m.isAnonymousJoinEnabled = value +} +// SetIsHiddenFromCustomers sets the isHiddenFromCustomers property value. True means this service is not available to customers for booking. +func (m *BookingService) SetIsHiddenFromCustomers(value *bool)() { + m.isHiddenFromCustomers = value +} +// SetIsLocationOnline sets the isLocationOnline property value. True indicates that the appointments for the service will be held online. Default value is false. +func (m *BookingService) SetIsLocationOnline(value *bool)() { + m.isLocationOnline = value +} +// SetLanguageTag sets the languageTag property value. The language of the self service booking page. +func (m *BookingService) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetMaximumAttendeesCount sets the maximumAttendeesCount property value. The maximum number of customers allowed in a service. If maximumAttendeesCount of the service is greater than 1, pass valid customer IDs while creating or updating an appointment. To create a customer, use the Create bookingCustomer operation. +func (m *BookingService) SetMaximumAttendeesCount(value *int32)() { + m.maximumAttendeesCount = value +} +// SetNotes sets the notes property value. Additional information about this service. +func (m *BookingService) SetNotes(value *string)() { + m.notes = value +} +// SetPostBuffer sets the postBuffer property value. The time to buffer after an appointment for this service ends, and before the next customer appointment can be booked. +func (m *BookingService) SetPostBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.postBuffer = value +} +// SetPreBuffer sets the preBuffer property value. The time to buffer before an appointment for this service can start. +func (m *BookingService) SetPreBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.preBuffer = value +} +// SetSchedulingPolicy sets the schedulingPolicy property value. The set of policies that determine how appointments for this type of service should be created and managed. +func (m *BookingService) SetSchedulingPolicy(value BookingSchedulingPolicyable)() { + m.schedulingPolicy = value +} +// SetSmsNotificationsEnabled sets the smsNotificationsEnabled property value. True indicates SMS notifications can be sent to the customers for the appointment of the service. Default value is false. +func (m *BookingService) SetSmsNotificationsEnabled(value *bool)() { + m.smsNotificationsEnabled = value +} +// SetStaffMemberIds sets the staffMemberIds property value. Represents those staff members who provide this service. +func (m *BookingService) SetStaffMemberIds(value []string)() { + m.staffMemberIds = value +} +// SetWebUrl sets the webUrl property value. The URL a customer uses to access the service. +func (m *BookingService) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_service_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_service_collection_response.go new file mode 100644 index 000000000..a3274f709 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_service_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingServiceCollectionResponse +type BookingServiceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingServiceable +} +// NewBookingServiceCollectionResponse instantiates a new BookingServiceCollectionResponse and sets the default values. +func NewBookingServiceCollectionResponse()(*BookingServiceCollectionResponse) { + m := &BookingServiceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingServiceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingServiceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingServiceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingServiceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingServiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingServiceable, len(val)) + for i, v := range val { + res[i] = v.(BookingServiceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingServiceCollectionResponse) GetValue()([]BookingServiceable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingServiceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingServiceCollectionResponse) SetValue(value []BookingServiceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_service_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_service_collection_responseable.go new file mode 100644 index 000000000..b247d7779 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_service_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingServiceCollectionResponseable +type BookingServiceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingServiceable) + SetValue(value []BookingServiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_serviceable.go b/src/internal/connector/graph/betasdk/models/booking_serviceable.go new file mode 100644 index 000000000..7be526950 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_serviceable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingServiceable +type BookingServiceable interface { + BookingNamedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformation()(*string) + GetCustomQuestions()([]BookingQuestionAssignmentable) + GetDefaultDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetDefaultLocation()(Locationable) + GetDefaultPrice()(*float64) + GetDefaultPriceType()(*BookingPriceType) + GetDefaultReminders()([]BookingReminderable) + GetDescription()(*string) + GetIsAnonymousJoinEnabled()(*bool) + GetIsHiddenFromCustomers()(*bool) + GetIsLocationOnline()(*bool) + GetLanguageTag()(*string) + GetMaximumAttendeesCount()(*int32) + GetNotes()(*string) + GetPostBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPreBuffer()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetSchedulingPolicy()(BookingSchedulingPolicyable) + GetSmsNotificationsEnabled()(*bool) + GetStaffMemberIds()([]string) + GetWebUrl()(*string) + SetAdditionalInformation(value *string)() + SetCustomQuestions(value []BookingQuestionAssignmentable)() + SetDefaultDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetDefaultLocation(value Locationable)() + SetDefaultPrice(value *float64)() + SetDefaultPriceType(value *BookingPriceType)() + SetDefaultReminders(value []BookingReminderable)() + SetDescription(value *string)() + SetIsAnonymousJoinEnabled(value *bool)() + SetIsHiddenFromCustomers(value *bool)() + SetIsLocationOnline(value *bool)() + SetLanguageTag(value *string)() + SetMaximumAttendeesCount(value *int32)() + SetNotes(value *string)() + SetPostBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPreBuffer(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetSchedulingPolicy(value BookingSchedulingPolicyable)() + SetSmsNotificationsEnabled(value *bool)() + SetStaffMemberIds(value []string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_staff_member.go b/src/internal/connector/graph/betasdk/models/booking_staff_member.go new file mode 100644 index 000000000..a21473eb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_member.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingStaffMember +type BookingStaffMember struct { + BookingPerson + // True means that if the staff member is a Microsoft 365 user, the Bookings API would verify the staff member's availability in their personal calendar in Microsoft 365, before making a booking. + availabilityIsAffectedByPersonalCalendar *bool + // Identifies a color to represent the staff member. The color corresponds to the color palette in the Staff details page in the Bookings app. + colorIndex *int32 + // True indicates that a staff member will be notified via email when a booking assigned to them is created or changed. + isEmailNotificationEnabled *bool + // The membershipStatus property + membershipStatus *BookingStaffMembershipStatus + // The role property + role *BookingStaffRole + // The time zone of the staff member. For a list of possible values, see dateTimeTimeZone. + timeZone *string + // True means the staff member's availability is as specified in the businessHours property of the business. False means the availability is determined by the staff member's workingHours property setting. + useBusinessHours *bool + // The range of hours each day of the week that the staff member is available for booking. By default, they are initialized to be the same as the businessHours property of the business. + workingHours []BookingWorkHoursable +} +// NewBookingStaffMember instantiates a new BookingStaffMember and sets the default values. +func NewBookingStaffMember()(*BookingStaffMember) { + m := &BookingStaffMember{ + BookingPerson: *NewBookingPerson(), + } + return m +} +// CreateBookingStaffMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingStaffMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingStaffMember(), nil +} +// GetAvailabilityIsAffectedByPersonalCalendar gets the availabilityIsAffectedByPersonalCalendar property value. True means that if the staff member is a Microsoft 365 user, the Bookings API would verify the staff member's availability in their personal calendar in Microsoft 365, before making a booking. +func (m *BookingStaffMember) GetAvailabilityIsAffectedByPersonalCalendar()(*bool) { + return m.availabilityIsAffectedByPersonalCalendar +} +// GetColorIndex gets the colorIndex property value. Identifies a color to represent the staff member. The color corresponds to the color palette in the Staff details page in the Bookings app. +func (m *BookingStaffMember) GetColorIndex()(*int32) { + return m.colorIndex +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingStaffMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BookingPerson.GetFieldDeserializers() + res["availabilityIsAffectedByPersonalCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityIsAffectedByPersonalCalendar(val) + } + return nil + } + res["colorIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetColorIndex(val) + } + return nil + } + res["isEmailNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEmailNotificationEnabled(val) + } + return nil + } + res["membershipStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingStaffMembershipStatus) + if err != nil { + return err + } + if val != nil { + m.SetMembershipStatus(val.(*BookingStaffMembershipStatus)) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingStaffRole) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*BookingStaffRole)) + } + 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 + } + res["useBusinessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseBusinessHours(val) + } + return nil + } + res["workingHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingWorkHoursFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingWorkHoursable, len(val)) + for i, v := range val { + res[i] = v.(BookingWorkHoursable) + } + m.SetWorkingHours(res) + } + return nil + } + return res +} +// GetIsEmailNotificationEnabled gets the isEmailNotificationEnabled property value. True indicates that a staff member will be notified via email when a booking assigned to them is created or changed. +func (m *BookingStaffMember) GetIsEmailNotificationEnabled()(*bool) { + return m.isEmailNotificationEnabled +} +// GetMembershipStatus gets the membershipStatus property value. The membershipStatus property +func (m *BookingStaffMember) GetMembershipStatus()(*BookingStaffMembershipStatus) { + return m.membershipStatus +} +// GetRole gets the role property value. The role property +func (m *BookingStaffMember) GetRole()(*BookingStaffRole) { + return m.role +} +// GetTimeZone gets the timeZone property value. The time zone of the staff member. For a list of possible values, see dateTimeTimeZone. +func (m *BookingStaffMember) GetTimeZone()(*string) { + return m.timeZone +} +// GetUseBusinessHours gets the useBusinessHours property value. True means the staff member's availability is as specified in the businessHours property of the business. False means the availability is determined by the staff member's workingHours property setting. +func (m *BookingStaffMember) GetUseBusinessHours()(*bool) { + return m.useBusinessHours +} +// GetWorkingHours gets the workingHours property value. The range of hours each day of the week that the staff member is available for booking. By default, they are initialized to be the same as the businessHours property of the business. +func (m *BookingStaffMember) GetWorkingHours()([]BookingWorkHoursable) { + return m.workingHours +} +// Serialize serializes information the current object +func (m *BookingStaffMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BookingPerson.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("availabilityIsAffectedByPersonalCalendar", m.GetAvailabilityIsAffectedByPersonalCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("colorIndex", m.GetColorIndex()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEmailNotificationEnabled", m.GetIsEmailNotificationEnabled()) + if err != nil { + return err + } + } + if m.GetMembershipStatus() != nil { + cast := (*m.GetMembershipStatus()).String() + err = writer.WriteStringValue("membershipStatus", &cast) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("timeZone", m.GetTimeZone()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useBusinessHours", m.GetUseBusinessHours()) + if err != nil { + return err + } + } + if m.GetWorkingHours() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkingHours())) + for i, v := range m.GetWorkingHours() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workingHours", cast) + if err != nil { + return err + } + } + return nil +} +// SetAvailabilityIsAffectedByPersonalCalendar sets the availabilityIsAffectedByPersonalCalendar property value. True means that if the staff member is a Microsoft 365 user, the Bookings API would verify the staff member's availability in their personal calendar in Microsoft 365, before making a booking. +func (m *BookingStaffMember) SetAvailabilityIsAffectedByPersonalCalendar(value *bool)() { + m.availabilityIsAffectedByPersonalCalendar = value +} +// SetColorIndex sets the colorIndex property value. Identifies a color to represent the staff member. The color corresponds to the color palette in the Staff details page in the Bookings app. +func (m *BookingStaffMember) SetColorIndex(value *int32)() { + m.colorIndex = value +} +// SetIsEmailNotificationEnabled sets the isEmailNotificationEnabled property value. True indicates that a staff member will be notified via email when a booking assigned to them is created or changed. +func (m *BookingStaffMember) SetIsEmailNotificationEnabled(value *bool)() { + m.isEmailNotificationEnabled = value +} +// SetMembershipStatus sets the membershipStatus property value. The membershipStatus property +func (m *BookingStaffMember) SetMembershipStatus(value *BookingStaffMembershipStatus)() { + m.membershipStatus = value +} +// SetRole sets the role property value. The role property +func (m *BookingStaffMember) SetRole(value *BookingStaffRole)() { + m.role = value +} +// SetTimeZone sets the timeZone property value. The time zone of the staff member. For a list of possible values, see dateTimeTimeZone. +func (m *BookingStaffMember) SetTimeZone(value *string)() { + m.timeZone = value +} +// SetUseBusinessHours sets the useBusinessHours property value. True means the staff member's availability is as specified in the businessHours property of the business. False means the availability is determined by the staff member's workingHours property setting. +func (m *BookingStaffMember) SetUseBusinessHours(value *bool)() { + m.useBusinessHours = value +} +// SetWorkingHours sets the workingHours property value. The range of hours each day of the week that the staff member is available for booking. By default, they are initialized to be the same as the businessHours property of the business. +func (m *BookingStaffMember) SetWorkingHours(value []BookingWorkHoursable)() { + m.workingHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_response.go new file mode 100644 index 000000000..643a52a34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingStaffMemberCollectionResponse +type BookingStaffMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingStaffMemberable +} +// NewBookingStaffMemberCollectionResponse instantiates a new BookingStaffMemberCollectionResponse and sets the default values. +func NewBookingStaffMemberCollectionResponse()(*BookingStaffMemberCollectionResponse) { + m := &BookingStaffMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingStaffMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingStaffMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingStaffMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingStaffMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingStaffMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingStaffMemberable, len(val)) + for i, v := range val { + res[i] = v.(BookingStaffMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingStaffMemberCollectionResponse) GetValue()([]BookingStaffMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingStaffMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingStaffMemberCollectionResponse) SetValue(value []BookingStaffMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_responseable.go new file mode 100644 index 000000000..7e8de2305 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingStaffMemberCollectionResponseable +type BookingStaffMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingStaffMemberable) + SetValue(value []BookingStaffMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_staff_memberable.go b/src/internal/connector/graph/betasdk/models/booking_staff_memberable.go new file mode 100644 index 000000000..e81329698 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_memberable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingStaffMemberable +type BookingStaffMemberable interface { + BookingPersonable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvailabilityIsAffectedByPersonalCalendar()(*bool) + GetColorIndex()(*int32) + GetIsEmailNotificationEnabled()(*bool) + GetMembershipStatus()(*BookingStaffMembershipStatus) + GetRole()(*BookingStaffRole) + GetTimeZone()(*string) + GetUseBusinessHours()(*bool) + GetWorkingHours()([]BookingWorkHoursable) + SetAvailabilityIsAffectedByPersonalCalendar(value *bool)() + SetColorIndex(value *int32)() + SetIsEmailNotificationEnabled(value *bool)() + SetMembershipStatus(value *BookingStaffMembershipStatus)() + SetRole(value *BookingStaffRole)() + SetTimeZone(value *string)() + SetUseBusinessHours(value *bool)() + SetWorkingHours(value []BookingWorkHoursable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_staff_membership_status.go b/src/internal/connector/graph/betasdk/models/booking_staff_membership_status.go new file mode 100644 index 000000000..db86ac744 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_membership_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingStaffMembershipStatus int + +const ( + ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS BookingStaffMembershipStatus = iota + PENDINGACCEPTANCE_BOOKINGSTAFFMEMBERSHIPSTATUS + REJECTEDBYSTAFF_BOOKINGSTAFFMEMBERSHIPSTATUS + UNKNOWNFUTUREVALUE_BOOKINGSTAFFMEMBERSHIPSTATUS +) + +func (i BookingStaffMembershipStatus) String() string { + return []string{"active", "pendingAcceptance", "rejectedByStaff", "unknownFutureValue"}[i] +} +func ParseBookingStaffMembershipStatus(v string) (interface{}, error) { + result := ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS + switch v { + case "active": + result = ACTIVE_BOOKINGSTAFFMEMBERSHIPSTATUS + case "pendingAcceptance": + result = PENDINGACCEPTANCE_BOOKINGSTAFFMEMBERSHIPSTATUS + case "rejectedByStaff": + result = REJECTEDBYSTAFF_BOOKINGSTAFFMEMBERSHIPSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BOOKINGSTAFFMEMBERSHIPSTATUS + default: + return 0, errors.New("Unknown BookingStaffMembershipStatus value: " + v) + } + return &result, nil +} +func SerializeBookingStaffMembershipStatus(values []BookingStaffMembershipStatus) []string { + 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/booking_staff_role.go b/src/internal/connector/graph/betasdk/models/booking_staff_role.go new file mode 100644 index 000000000..14bb4f221 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_staff_role.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingStaffRole int + +const ( + GUEST_BOOKINGSTAFFROLE BookingStaffRole = iota + ADMINISTRATOR_BOOKINGSTAFFROLE + VIEWER_BOOKINGSTAFFROLE + EXTERNALGUEST_BOOKINGSTAFFROLE + UNKNOWNFUTUREVALUE_BOOKINGSTAFFROLE + SCHEDULER_BOOKINGSTAFFROLE + TEAMMEMBER_BOOKINGSTAFFROLE +) + +func (i BookingStaffRole) String() string { + return []string{"guest", "administrator", "viewer", "externalGuest", "unknownFutureValue", "scheduler", "teamMember"}[i] +} +func ParseBookingStaffRole(v string) (interface{}, error) { + result := GUEST_BOOKINGSTAFFROLE + switch v { + case "guest": + result = GUEST_BOOKINGSTAFFROLE + case "administrator": + result = ADMINISTRATOR_BOOKINGSTAFFROLE + case "viewer": + result = VIEWER_BOOKINGSTAFFROLE + case "externalGuest": + result = EXTERNALGUEST_BOOKINGSTAFFROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BOOKINGSTAFFROLE + case "scheduler": + result = SCHEDULER_BOOKINGSTAFFROLE + case "teamMember": + result = TEAMMEMBER_BOOKINGSTAFFROLE + default: + return 0, errors.New("Unknown BookingStaffRole value: " + v) + } + return &result, nil +} +func SerializeBookingStaffRole(values []BookingStaffRole) []string { + 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/booking_type.go b/src/internal/connector/graph/betasdk/models/booking_type.go new file mode 100644 index 000000000..bf9459876 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BookingType int + +const ( + UNKNOWN_BOOKINGTYPE BookingType = iota + STANDARD_BOOKINGTYPE + RESERVED_BOOKINGTYPE +) + +func (i BookingType) String() string { + return []string{"unknown", "standard", "reserved"}[i] +} +func ParseBookingType(v string) (interface{}, error) { + result := UNKNOWN_BOOKINGTYPE + switch v { + case "unknown": + result = UNKNOWN_BOOKINGTYPE + case "standard": + result = STANDARD_BOOKINGTYPE + case "reserved": + result = RESERVED_BOOKINGTYPE + default: + return 0, errors.New("Unknown BookingType value: " + v) + } + return &result, nil +} +func SerializeBookingType(values []BookingType) []string { + 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/booking_work_hours.go b/src/internal/connector/graph/betasdk/models/booking_work_hours.go new file mode 100644 index 000000000..de15de02e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_hours.go @@ -0,0 +1,132 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkHours this type represents the set of working hours in a single day of the week. +type BookingWorkHours 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 day property + day *DayOfWeek + // The OdataType property + odataType *string + // A list of start/end times during a day. + timeSlots []BookingWorkTimeSlotable +} +// NewBookingWorkHours instantiates a new bookingWorkHours and sets the default values. +func NewBookingWorkHours()(*BookingWorkHours) { + m := &BookingWorkHours{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingWorkHoursFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingWorkHoursFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingWorkHours(), 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 *BookingWorkHours) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDay gets the day property value. The day property +func (m *BookingWorkHours) GetDay()(*DayOfWeek) { + return m.day +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingWorkHours) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["day"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + m.SetDay(val.(*DayOfWeek)) + } + 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["timeSlots"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingWorkTimeSlotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingWorkTimeSlotable, len(val)) + for i, v := range val { + res[i] = v.(BookingWorkTimeSlotable) + } + m.SetTimeSlots(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingWorkHours) GetOdataType()(*string) { + return m.odataType +} +// GetTimeSlots gets the timeSlots property value. A list of start/end times during a day. +func (m *BookingWorkHours) GetTimeSlots()([]BookingWorkTimeSlotable) { + return m.timeSlots +} +// Serialize serializes information the current object +func (m *BookingWorkHours) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDay() != nil { + cast := (*m.GetDay()).String() + err := writer.WriteStringValue("day", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTimeSlots() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTimeSlots())) + for i, v := range m.GetTimeSlots() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("timeSlots", 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 *BookingWorkHours) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDay sets the day property value. The day property +func (m *BookingWorkHours) SetDay(value *DayOfWeek)() { + m.day = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingWorkHours) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeSlots sets the timeSlots property value. A list of start/end times during a day. +func (m *BookingWorkHours) SetTimeSlots(value []BookingWorkTimeSlotable)() { + m.timeSlots = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_response.go new file mode 100644 index 000000000..0008dbf02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkHoursCollectionResponse +type BookingWorkHoursCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingWorkHoursable +} +// NewBookingWorkHoursCollectionResponse instantiates a new BookingWorkHoursCollectionResponse and sets the default values. +func NewBookingWorkHoursCollectionResponse()(*BookingWorkHoursCollectionResponse) { + m := &BookingWorkHoursCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingWorkHoursCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingWorkHoursCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingWorkHoursCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingWorkHoursCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingWorkHoursFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingWorkHoursable, len(val)) + for i, v := range val { + res[i] = v.(BookingWorkHoursable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingWorkHoursCollectionResponse) GetValue()([]BookingWorkHoursable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingWorkHoursCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingWorkHoursCollectionResponse) SetValue(value []BookingWorkHoursable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_responseable.go new file mode 100644 index 000000000..b8a31a841 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_hours_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkHoursCollectionResponseable +type BookingWorkHoursCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingWorkHoursable) + SetValue(value []BookingWorkHoursable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_hoursable.go b/src/internal/connector/graph/betasdk/models/booking_work_hoursable.go new file mode 100644 index 000000000..ac6cb261b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_hoursable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkHoursable +type BookingWorkHoursable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDay()(*DayOfWeek) + GetOdataType()(*string) + GetTimeSlots()([]BookingWorkTimeSlotable) + SetDay(value *DayOfWeek)() + SetOdataType(value *string)() + SetTimeSlots(value []BookingWorkTimeSlotable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_time_slot.go b/src/internal/connector/graph/betasdk/models/booking_work_time_slot.go new file mode 100644 index 000000000..b4b33e1d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_time_slot.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkTimeSlot +type BookingWorkTimeSlot 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 time of the day when work stops. For example, 17:00:00.0000000. + end *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // The OdataType property + odataType *string + // The time of the day when work starts. For example, 08:00:00.0000000. + start *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly +} +// NewBookingWorkTimeSlot instantiates a new bookingWorkTimeSlot and sets the default values. +func NewBookingWorkTimeSlot()(*BookingWorkTimeSlot) { + m := &BookingWorkTimeSlot{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBookingWorkTimeSlotFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingWorkTimeSlotFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingWorkTimeSlot(), 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 *BookingWorkTimeSlot) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnd gets the end property value. The time of the day when work stops. For example, 17:00:00.0000000. +func (m *BookingWorkTimeSlot) GetEnd()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.end +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingWorkTimeSlot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["end"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEnd(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["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStart(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BookingWorkTimeSlot) GetOdataType()(*string) { + return m.odataType +} +// GetStart gets the start property value. The time of the day when work starts. For example, 08:00:00.0000000. +func (m *BookingWorkTimeSlot) GetStart()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.start +} +// Serialize serializes information the current object +func (m *BookingWorkTimeSlot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeOnlyValue("end", m.GetEnd()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeOnlyValue("start", m.GetStart()) + 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 *BookingWorkTimeSlot) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnd sets the end property value. The time of the day when work stops. For example, 17:00:00.0000000. +func (m *BookingWorkTimeSlot) SetEnd(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.end = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BookingWorkTimeSlot) SetOdataType(value *string)() { + m.odataType = value +} +// SetStart sets the start property value. The time of the day when work starts. For example, 08:00:00.0000000. +func (m *BookingWorkTimeSlot) SetStart(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.start = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_response.go b/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_response.go new file mode 100644 index 000000000..da56fdec2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkTimeSlotCollectionResponse +type BookingWorkTimeSlotCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BookingWorkTimeSlotable +} +// NewBookingWorkTimeSlotCollectionResponse instantiates a new BookingWorkTimeSlotCollectionResponse and sets the default values. +func NewBookingWorkTimeSlotCollectionResponse()(*BookingWorkTimeSlotCollectionResponse) { + m := &BookingWorkTimeSlotCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookingWorkTimeSlotCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookingWorkTimeSlotCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookingWorkTimeSlotCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookingWorkTimeSlotCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookingWorkTimeSlotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BookingWorkTimeSlotable, len(val)) + for i, v := range val { + res[i] = v.(BookingWorkTimeSlotable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookingWorkTimeSlotCollectionResponse) GetValue()([]BookingWorkTimeSlotable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookingWorkTimeSlotCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookingWorkTimeSlotCollectionResponse) SetValue(value []BookingWorkTimeSlotable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_responseable.go b/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_responseable.go new file mode 100644 index 000000000..2d6854618 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_time_slot_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkTimeSlotCollectionResponseable +type BookingWorkTimeSlotCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BookingWorkTimeSlotable) + SetValue(value []BookingWorkTimeSlotable)() +} diff --git a/src/internal/connector/graph/betasdk/models/booking_work_time_slotable.go b/src/internal/connector/graph/betasdk/models/booking_work_time_slotable.go new file mode 100644 index 000000000..b5172bc2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/booking_work_time_slotable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BookingWorkTimeSlotable +type BookingWorkTimeSlotable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnd()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetOdataType()(*string) + GetStart()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + SetEnd(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetOdataType(value *string)() + SetStart(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/bookings_availability_status.go b/src/internal/connector/graph/betasdk/models/bookings_availability_status.go new file mode 100644 index 000000000..70b82a648 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bookings_availability_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type BookingsAvailabilityStatus int + +const ( + AVAILABLE_BOOKINGSAVAILABILITYSTATUS BookingsAvailabilityStatus = iota + BUSY_BOOKINGSAVAILABILITYSTATUS + SLOTSAVAILABLE_BOOKINGSAVAILABILITYSTATUS + OUTOFOFFICE_BOOKINGSAVAILABILITYSTATUS + UNKNOWNFUTUREVALUE_BOOKINGSAVAILABILITYSTATUS +) + +func (i BookingsAvailabilityStatus) String() string { + return []string{"available", "busy", "slotsAvailable", "outOfOffice", "unknownFutureValue"}[i] +} +func ParseBookingsAvailabilityStatus(v string) (interface{}, error) { + result := AVAILABLE_BOOKINGSAVAILABILITYSTATUS + switch v { + case "available": + result = AVAILABLE_BOOKINGSAVAILABILITYSTATUS + case "busy": + result = BUSY_BOOKINGSAVAILABILITYSTATUS + case "slotsAvailable": + result = SLOTSAVAILABLE_BOOKINGSAVAILABILITYSTATUS + case "outOfOffice": + result = OUTOFOFFICE_BOOKINGSAVAILABILITYSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BOOKINGSAVAILABILITYSTATUS + default: + return 0, errors.New("Unknown BookingsAvailabilityStatus value: " + v) + } + return &result, nil +} +func SerializeBookingsAvailabilityStatus(values []BookingsAvailabilityStatus) []string { + 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/boolean_column.go b/src/internal/connector/graph/betasdk/models/boolean_column.go new file mode 100644 index 000000000..6e69c84bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/boolean_column.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BooleanColumn +type BooleanColumn 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 OdataType property + odataType *string +} +// NewBooleanColumn instantiates a new booleanColumn and sets the default values. +func NewBooleanColumn()(*BooleanColumn) { + m := &BooleanColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBooleanColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBooleanColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBooleanColumn(), 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 *BooleanColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BooleanColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BooleanColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *BooleanColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *BooleanColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BooleanColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/boolean_columnable.go b/src/internal/connector/graph/betasdk/models/boolean_columnable.go new file mode 100644 index 000000000..b0efbb70d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/boolean_columnable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BooleanColumnable +type BooleanColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/broadcast_meeting_audience.go b/src/internal/connector/graph/betasdk/models/broadcast_meeting_audience.go new file mode 100644 index 000000000..ed57583fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/broadcast_meeting_audience.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BroadcastMeetingAudience int + +const ( + ROLEISATTENDEE_BROADCASTMEETINGAUDIENCE BroadcastMeetingAudience = iota + ORGANIZATION_BROADCASTMEETINGAUDIENCE + EVERYONE_BROADCASTMEETINGAUDIENCE + UNKNOWNFUTUREVALUE_BROADCASTMEETINGAUDIENCE +) + +func (i BroadcastMeetingAudience) String() string { + return []string{"roleIsAttendee", "organization", "everyone", "unknownFutureValue"}[i] +} +func ParseBroadcastMeetingAudience(v string) (interface{}, error) { + result := ROLEISATTENDEE_BROADCASTMEETINGAUDIENCE + switch v { + case "roleIsAttendee": + result = ROLEISATTENDEE_BROADCASTMEETINGAUDIENCE + case "organization": + result = ORGANIZATION_BROADCASTMEETINGAUDIENCE + case "everyone": + result = EVERYONE_BROADCASTMEETINGAUDIENCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROADCASTMEETINGAUDIENCE + default: + return 0, errors.New("Unknown BroadcastMeetingAudience value: " + v) + } + return &result, nil +} +func SerializeBroadcastMeetingAudience(values []BroadcastMeetingAudience) []string { + 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/broadcast_meeting_caption_settings.go b/src/internal/connector/graph/betasdk/models/broadcast_meeting_caption_settings.go new file mode 100644 index 000000000..3037ce47f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/broadcast_meeting_caption_settings.go @@ -0,0 +1,153 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BroadcastMeetingCaptionSettings +type BroadcastMeetingCaptionSettings 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 whether captions are enabled for this Teams live event. + isCaptionEnabled *bool + // The OdataType property + odataType *string + // The spoken language. + spokenLanguage *string + // The translation languages (choose up to 6). + translationLanguages []string +} +// NewBroadcastMeetingCaptionSettings instantiates a new broadcastMeetingCaptionSettings and sets the default values. +func NewBroadcastMeetingCaptionSettings()(*BroadcastMeetingCaptionSettings) { + m := &BroadcastMeetingCaptionSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBroadcastMeetingCaptionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBroadcastMeetingCaptionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBroadcastMeetingCaptionSettings(), 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 *BroadcastMeetingCaptionSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BroadcastMeetingCaptionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isCaptionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCaptionEnabled(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["spokenLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpokenLanguage(val) + } + return nil + } + res["translationLanguages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTranslationLanguages(res) + } + return nil + } + return res +} +// GetIsCaptionEnabled gets the isCaptionEnabled property value. Indicates whether captions are enabled for this Teams live event. +func (m *BroadcastMeetingCaptionSettings) GetIsCaptionEnabled()(*bool) { + return m.isCaptionEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BroadcastMeetingCaptionSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSpokenLanguage gets the spokenLanguage property value. The spoken language. +func (m *BroadcastMeetingCaptionSettings) GetSpokenLanguage()(*string) { + return m.spokenLanguage +} +// GetTranslationLanguages gets the translationLanguages property value. The translation languages (choose up to 6). +func (m *BroadcastMeetingCaptionSettings) GetTranslationLanguages()([]string) { + return m.translationLanguages +} +// Serialize serializes information the current object +func (m *BroadcastMeetingCaptionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isCaptionEnabled", m.GetIsCaptionEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("spokenLanguage", m.GetSpokenLanguage()) + if err != nil { + return err + } + } + if m.GetTranslationLanguages() != nil { + err := writer.WriteCollectionOfStringValues("translationLanguages", m.GetTranslationLanguages()) + 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 *BroadcastMeetingCaptionSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsCaptionEnabled sets the isCaptionEnabled property value. Indicates whether captions are enabled for this Teams live event. +func (m *BroadcastMeetingCaptionSettings) SetIsCaptionEnabled(value *bool)() { + m.isCaptionEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BroadcastMeetingCaptionSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSpokenLanguage sets the spokenLanguage property value. The spoken language. +func (m *BroadcastMeetingCaptionSettings) SetSpokenLanguage(value *string)() { + m.spokenLanguage = value +} +// SetTranslationLanguages sets the translationLanguages property value. The translation languages (choose up to 6). +func (m *BroadcastMeetingCaptionSettings) SetTranslationLanguages(value []string)() { + m.translationLanguages = value +} diff --git a/src/internal/connector/graph/betasdk/models/broadcast_meeting_caption_settingsable.go b/src/internal/connector/graph/betasdk/models/broadcast_meeting_caption_settingsable.go new file mode 100644 index 000000000..8d2cce18e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/broadcast_meeting_caption_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BroadcastMeetingCaptionSettingsable +type BroadcastMeetingCaptionSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsCaptionEnabled()(*bool) + GetOdataType()(*string) + GetSpokenLanguage()(*string) + GetTranslationLanguages()([]string) + SetIsCaptionEnabled(value *bool)() + SetOdataType(value *string)() + SetSpokenLanguage(value *string)() + SetTranslationLanguages(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/broadcast_meeting_settings.go b/src/internal/connector/graph/betasdk/models/broadcast_meeting_settings.go new file mode 100644 index 000000000..28617792e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/broadcast_meeting_settings.go @@ -0,0 +1,228 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BroadcastMeetingSettings +type BroadcastMeetingSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines who can join the Teams live event. Possible values are listed in the following table. + allowedAudience *BroadcastMeetingAudience + // Caption settings of a Teams live event. + captions BroadcastMeetingCaptionSettingsable + // Indicates whether attendee report is enabled for this Teams live event. Default value is false. + isAttendeeReportEnabled *bool + // Indicates whether Q&A is enabled for this Teams live event. Default value is false. + isQuestionAndAnswerEnabled *bool + // Indicates whether recording is enabled for this Teams live event. Default value is false. + isRecordingEnabled *bool + // Indicates whether video on demand is enabled for this Teams live event. Default value is false. + isVideoOnDemandEnabled *bool + // The OdataType property + odataType *string +} +// NewBroadcastMeetingSettings instantiates a new broadcastMeetingSettings and sets the default values. +func NewBroadcastMeetingSettings()(*BroadcastMeetingSettings) { + m := &BroadcastMeetingSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBroadcastMeetingSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBroadcastMeetingSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBroadcastMeetingSettings(), 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 *BroadcastMeetingSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedAudience gets the allowedAudience property value. Defines who can join the Teams live event. Possible values are listed in the following table. +func (m *BroadcastMeetingSettings) GetAllowedAudience()(*BroadcastMeetingAudience) { + return m.allowedAudience +} +// GetCaptions gets the captions property value. Caption settings of a Teams live event. +func (m *BroadcastMeetingSettings) GetCaptions()(BroadcastMeetingCaptionSettingsable) { + return m.captions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BroadcastMeetingSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedAudience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBroadcastMeetingAudience) + if err != nil { + return err + } + if val != nil { + m.SetAllowedAudience(val.(*BroadcastMeetingAudience)) + } + return nil + } + res["captions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBroadcastMeetingCaptionSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCaptions(val.(BroadcastMeetingCaptionSettingsable)) + } + return nil + } + res["isAttendeeReportEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAttendeeReportEnabled(val) + } + return nil + } + res["isQuestionAndAnswerEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsQuestionAndAnswerEnabled(val) + } + return nil + } + res["isRecordingEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRecordingEnabled(val) + } + return nil + } + res["isVideoOnDemandEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVideoOnDemandEnabled(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 + } + return res +} +// GetIsAttendeeReportEnabled gets the isAttendeeReportEnabled property value. Indicates whether attendee report is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) GetIsAttendeeReportEnabled()(*bool) { + return m.isAttendeeReportEnabled +} +// GetIsQuestionAndAnswerEnabled gets the isQuestionAndAnswerEnabled property value. Indicates whether Q&A is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) GetIsQuestionAndAnswerEnabled()(*bool) { + return m.isQuestionAndAnswerEnabled +} +// GetIsRecordingEnabled gets the isRecordingEnabled property value. Indicates whether recording is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) GetIsRecordingEnabled()(*bool) { + return m.isRecordingEnabled +} +// GetIsVideoOnDemandEnabled gets the isVideoOnDemandEnabled property value. Indicates whether video on demand is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) GetIsVideoOnDemandEnabled()(*bool) { + return m.isVideoOnDemandEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BroadcastMeetingSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *BroadcastMeetingSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedAudience() != nil { + cast := (*m.GetAllowedAudience()).String() + err := writer.WriteStringValue("allowedAudience", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("captions", m.GetCaptions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAttendeeReportEnabled", m.GetIsAttendeeReportEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isQuestionAndAnswerEnabled", m.GetIsQuestionAndAnswerEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRecordingEnabled", m.GetIsRecordingEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isVideoOnDemandEnabled", m.GetIsVideoOnDemandEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *BroadcastMeetingSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedAudience sets the allowedAudience property value. Defines who can join the Teams live event. Possible values are listed in the following table. +func (m *BroadcastMeetingSettings) SetAllowedAudience(value *BroadcastMeetingAudience)() { + m.allowedAudience = value +} +// SetCaptions sets the captions property value. Caption settings of a Teams live event. +func (m *BroadcastMeetingSettings) SetCaptions(value BroadcastMeetingCaptionSettingsable)() { + m.captions = value +} +// SetIsAttendeeReportEnabled sets the isAttendeeReportEnabled property value. Indicates whether attendee report is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) SetIsAttendeeReportEnabled(value *bool)() { + m.isAttendeeReportEnabled = value +} +// SetIsQuestionAndAnswerEnabled sets the isQuestionAndAnswerEnabled property value. Indicates whether Q&A is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) SetIsQuestionAndAnswerEnabled(value *bool)() { + m.isQuestionAndAnswerEnabled = value +} +// SetIsRecordingEnabled sets the isRecordingEnabled property value. Indicates whether recording is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) SetIsRecordingEnabled(value *bool)() { + m.isRecordingEnabled = value +} +// SetIsVideoOnDemandEnabled sets the isVideoOnDemandEnabled property value. Indicates whether video on demand is enabled for this Teams live event. Default value is false. +func (m *BroadcastMeetingSettings) SetIsVideoOnDemandEnabled(value *bool)() { + m.isVideoOnDemandEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BroadcastMeetingSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/broadcast_meeting_settingsable.go b/src/internal/connector/graph/betasdk/models/broadcast_meeting_settingsable.go new file mode 100644 index 000000000..dd833a337 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/broadcast_meeting_settingsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BroadcastMeetingSettingsable +type BroadcastMeetingSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAudience()(*BroadcastMeetingAudience) + GetCaptions()(BroadcastMeetingCaptionSettingsable) + GetIsAttendeeReportEnabled()(*bool) + GetIsQuestionAndAnswerEnabled()(*bool) + GetIsRecordingEnabled()(*bool) + GetIsVideoOnDemandEnabled()(*bool) + GetOdataType()(*string) + SetAllowedAudience(value *BroadcastMeetingAudience)() + SetCaptions(value BroadcastMeetingCaptionSettingsable)() + SetIsAttendeeReportEnabled(value *bool)() + SetIsQuestionAndAnswerEnabled(value *bool)() + SetIsRecordingEnabled(value *bool)() + SetIsVideoOnDemandEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie.go new file mode 100644 index 000000000..27aef8c0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie.go @@ -0,0 +1,357 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookie provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSharedCookie struct { + Entity + // The comment for the shared cookie. + comment *string + // The date and time when the shared cookie was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the shared cookie was deleted. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the cookie. + displayName *string + // The history of modifications applied to the cookie. + history []BrowserSharedCookieHistoryable + // Controls whether a cookie is a host-only or domain cookie. + hostOnly *bool + // The URL of the cookie. + hostOrDomain *string + // The user who last modified the cookie. + lastModifiedBy IdentitySetable + // The date and time when the cookie was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The path of the cookie. + path *string + // The sourceEnvironment property + sourceEnvironment *BrowserSharedCookieSourceEnvironment + // The status property + status *BrowserSharedCookieStatus +} +// NewBrowserSharedCookie instantiates a new browserSharedCookie and sets the default values. +func NewBrowserSharedCookie()(*BrowserSharedCookie) { + m := &BrowserSharedCookie{ + Entity: *NewEntity(), + } + return m +} +// CreateBrowserSharedCookieFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSharedCookieFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSharedCookie(), nil +} +// GetComment gets the comment property value. The comment for the shared cookie. +func (m *BrowserSharedCookie) GetComment()(*string) { + return m.comment +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the shared cookie was created. +func (m *BrowserSharedCookie) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeletedDateTime gets the deletedDateTime property value. The date and time when the shared cookie was deleted. +func (m *BrowserSharedCookie) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetDisplayName gets the displayName property value. The name of the cookie. +func (m *BrowserSharedCookie) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSharedCookie) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSharedCookieHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSharedCookieHistoryable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSharedCookieHistoryable) + } + m.SetHistory(res) + } + return nil + } + res["hostOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHostOnly(val) + } + return nil + } + res["hostOrDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostOrDomain(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["sourceEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSharedCookieSourceEnvironment) + if err != nil { + return err + } + if val != nil { + m.SetSourceEnvironment(val.(*BrowserSharedCookieSourceEnvironment)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSharedCookieStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*BrowserSharedCookieStatus)) + } + return nil + } + return res +} +// GetHistory gets the history property value. The history of modifications applied to the cookie. +func (m *BrowserSharedCookie) GetHistory()([]BrowserSharedCookieHistoryable) { + return m.history +} +// GetHostOnly gets the hostOnly property value. Controls whether a cookie is a host-only or domain cookie. +func (m *BrowserSharedCookie) GetHostOnly()(*bool) { + return m.hostOnly +} +// GetHostOrDomain gets the hostOrDomain property value. The URL of the cookie. +func (m *BrowserSharedCookie) GetHostOrDomain()(*string) { + return m.hostOrDomain +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the cookie. +func (m *BrowserSharedCookie) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the cookie was last modified. +func (m *BrowserSharedCookie) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPath gets the path property value. The path of the cookie. +func (m *BrowserSharedCookie) GetPath()(*string) { + return m.path +} +// GetSourceEnvironment gets the sourceEnvironment property value. The sourceEnvironment property +func (m *BrowserSharedCookie) GetSourceEnvironment()(*BrowserSharedCookieSourceEnvironment) { + return m.sourceEnvironment +} +// GetStatus gets the status property value. The status property +func (m *BrowserSharedCookie) GetStatus()(*BrowserSharedCookieStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *BrowserSharedCookie) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hostOnly", m.GetHostOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hostOrDomain", m.GetHostOrDomain()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + if m.GetSourceEnvironment() != nil { + cast := (*m.GetSourceEnvironment()).String() + err = writer.WriteStringValue("sourceEnvironment", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetComment sets the comment property value. The comment for the shared cookie. +func (m *BrowserSharedCookie) SetComment(value *string)() { + m.comment = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the shared cookie was created. +func (m *BrowserSharedCookie) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeletedDateTime sets the deletedDateTime property value. The date and time when the shared cookie was deleted. +func (m *BrowserSharedCookie) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} +// SetDisplayName sets the displayName property value. The name of the cookie. +func (m *BrowserSharedCookie) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHistory sets the history property value. The history of modifications applied to the cookie. +func (m *BrowserSharedCookie) SetHistory(value []BrowserSharedCookieHistoryable)() { + m.history = value +} +// SetHostOnly sets the hostOnly property value. Controls whether a cookie is a host-only or domain cookie. +func (m *BrowserSharedCookie) SetHostOnly(value *bool)() { + m.hostOnly = value +} +// SetHostOrDomain sets the hostOrDomain property value. The URL of the cookie. +func (m *BrowserSharedCookie) SetHostOrDomain(value *string)() { + m.hostOrDomain = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the cookie. +func (m *BrowserSharedCookie) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the cookie was last modified. +func (m *BrowserSharedCookie) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPath sets the path property value. The path of the cookie. +func (m *BrowserSharedCookie) SetPath(value *string)() { + m.path = value +} +// SetSourceEnvironment sets the sourceEnvironment property value. The sourceEnvironment property +func (m *BrowserSharedCookie) SetSourceEnvironment(value *BrowserSharedCookieSourceEnvironment)() { + m.sourceEnvironment = value +} +// SetStatus sets the status property value. The status property +func (m *BrowserSharedCookie) SetStatus(value *BrowserSharedCookieStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_response.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_response.go new file mode 100644 index 000000000..cd5f78cfa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieCollectionResponse +type BrowserSharedCookieCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BrowserSharedCookieable +} +// NewBrowserSharedCookieCollectionResponse instantiates a new BrowserSharedCookieCollectionResponse and sets the default values. +func NewBrowserSharedCookieCollectionResponse()(*BrowserSharedCookieCollectionResponse) { + m := &BrowserSharedCookieCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBrowserSharedCookieCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSharedCookieCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSharedCookieCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSharedCookieCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSharedCookieFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSharedCookieable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSharedCookieable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BrowserSharedCookieCollectionResponse) GetValue()([]BrowserSharedCookieable) { + return m.value +} +// Serialize serializes information the current object +func (m *BrowserSharedCookieCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BrowserSharedCookieCollectionResponse) SetValue(value []BrowserSharedCookieable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_responseable.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_responseable.go new file mode 100644 index 000000000..9824f5c33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieCollectionResponseable +type BrowserSharedCookieCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BrowserSharedCookieable) + SetValue(value []BrowserSharedCookieable)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history.go new file mode 100644 index 000000000..dd7e26c04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history.go @@ -0,0 +1,281 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieHistory +type BrowserSharedCookieHistory 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 comment for the shared cookie. + comment *string + // The name of the cookie. + displayName *string + // Controls whether a cookie is a host-only or domain cookie. + hostOnly *bool + // The URL of the cookie. + hostOrDomain *string + // The lastModifiedBy property + lastModifiedBy IdentitySetable + // The OdataType property + odataType *string + // The path of the cookie. + path *string + // The date and time when the cookie was last published. + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies how the cookies are shared between Microsoft Edge and Internet Explorer. The possible values are: microsoftEdge, internetExplorer11, both, unknownFutureValue. + sourceEnvironment *BrowserSharedCookieSourceEnvironment +} +// NewBrowserSharedCookieHistory instantiates a new browserSharedCookieHistory and sets the default values. +func NewBrowserSharedCookieHistory()(*BrowserSharedCookieHistory) { + m := &BrowserSharedCookieHistory{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBrowserSharedCookieHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSharedCookieHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSharedCookieHistory(), 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 *BrowserSharedCookieHistory) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetComment gets the comment property value. The comment for the shared cookie. +func (m *BrowserSharedCookieHistory) GetComment()(*string) { + return m.comment +} +// GetDisplayName gets the displayName property value. The name of the cookie. +func (m *BrowserSharedCookieHistory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSharedCookieHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["hostOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHostOnly(val) + } + return nil + } + res["hostOrDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostOrDomain(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + 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["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + res["sourceEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSharedCookieSourceEnvironment) + if err != nil { + return err + } + if val != nil { + m.SetSourceEnvironment(val.(*BrowserSharedCookieSourceEnvironment)) + } + return nil + } + return res +} +// GetHostOnly gets the hostOnly property value. Controls whether a cookie is a host-only or domain cookie. +func (m *BrowserSharedCookieHistory) GetHostOnly()(*bool) { + return m.hostOnly +} +// GetHostOrDomain gets the hostOrDomain property value. The URL of the cookie. +func (m *BrowserSharedCookieHistory) GetHostOrDomain()(*string) { + return m.hostOrDomain +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *BrowserSharedCookieHistory) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BrowserSharedCookieHistory) GetOdataType()(*string) { + return m.odataType +} +// GetPath gets the path property value. The path of the cookie. +func (m *BrowserSharedCookieHistory) GetPath()(*string) { + return m.path +} +// GetPublishedDateTime gets the publishedDateTime property value. The date and time when the cookie was last published. +func (m *BrowserSharedCookieHistory) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// GetSourceEnvironment gets the sourceEnvironment property value. Specifies how the cookies are shared between Microsoft Edge and Internet Explorer. The possible values are: microsoftEdge, internetExplorer11, both, unknownFutureValue. +func (m *BrowserSharedCookieHistory) GetSourceEnvironment()(*BrowserSharedCookieSourceEnvironment) { + return m.sourceEnvironment +} +// Serialize serializes information the current object +func (m *BrowserSharedCookieHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hostOnly", m.GetHostOnly()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hostOrDomain", m.GetHostOrDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + if err != nil { + return err + } + } + if m.GetSourceEnvironment() != nil { + cast := (*m.GetSourceEnvironment()).String() + err := writer.WriteStringValue("sourceEnvironment", &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 *BrowserSharedCookieHistory) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetComment sets the comment property value. The comment for the shared cookie. +func (m *BrowserSharedCookieHistory) SetComment(value *string)() { + m.comment = value +} +// SetDisplayName sets the displayName property value. The name of the cookie. +func (m *BrowserSharedCookieHistory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHostOnly sets the hostOnly property value. Controls whether a cookie is a host-only or domain cookie. +func (m *BrowserSharedCookieHistory) SetHostOnly(value *bool)() { + m.hostOnly = value +} +// SetHostOrDomain sets the hostOrDomain property value. The URL of the cookie. +func (m *BrowserSharedCookieHistory) SetHostOrDomain(value *string)() { + m.hostOrDomain = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *BrowserSharedCookieHistory) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BrowserSharedCookieHistory) SetOdataType(value *string)() { + m.odataType = value +} +// SetPath sets the path property value. The path of the cookie. +func (m *BrowserSharedCookieHistory) SetPath(value *string)() { + m.path = value +} +// SetPublishedDateTime sets the publishedDateTime property value. The date and time when the cookie was last published. +func (m *BrowserSharedCookieHistory) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} +// SetSourceEnvironment sets the sourceEnvironment property value. Specifies how the cookies are shared between Microsoft Edge and Internet Explorer. The possible values are: microsoftEdge, internetExplorer11, both, unknownFutureValue. +func (m *BrowserSharedCookieHistory) SetSourceEnvironment(value *BrowserSharedCookieSourceEnvironment)() { + m.sourceEnvironment = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_response.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_response.go new file mode 100644 index 000000000..f2f1527cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieHistoryCollectionResponse +type BrowserSharedCookieHistoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BrowserSharedCookieHistoryable +} +// NewBrowserSharedCookieHistoryCollectionResponse instantiates a new BrowserSharedCookieHistoryCollectionResponse and sets the default values. +func NewBrowserSharedCookieHistoryCollectionResponse()(*BrowserSharedCookieHistoryCollectionResponse) { + m := &BrowserSharedCookieHistoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBrowserSharedCookieHistoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSharedCookieHistoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSharedCookieHistoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSharedCookieHistoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSharedCookieHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSharedCookieHistoryable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSharedCookieHistoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BrowserSharedCookieHistoryCollectionResponse) GetValue()([]BrowserSharedCookieHistoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *BrowserSharedCookieHistoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BrowserSharedCookieHistoryCollectionResponse) SetValue(value []BrowserSharedCookieHistoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_responseable.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_responseable.go new file mode 100644 index 000000000..6d6efee3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_history_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieHistoryCollectionResponseable +type BrowserSharedCookieHistoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BrowserSharedCookieHistoryable) + SetValue(value []BrowserSharedCookieHistoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_historyable.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_historyable.go new file mode 100644 index 000000000..15331808e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_historyable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieHistoryable +type BrowserSharedCookieHistoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetDisplayName()(*string) + GetHostOnly()(*bool) + GetHostOrDomain()(*string) + GetLastModifiedBy()(IdentitySetable) + GetOdataType()(*string) + GetPath()(*string) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSourceEnvironment()(*BrowserSharedCookieSourceEnvironment) + SetComment(value *string)() + SetDisplayName(value *string)() + SetHostOnly(value *bool)() + SetHostOrDomain(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetOdataType(value *string)() + SetPath(value *string)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSourceEnvironment(value *BrowserSharedCookieSourceEnvironment)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_shared_cookie_source_environment.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_source_environment.go new file mode 100644 index 000000000..9e40c8f03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_source_environment.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSharedCookieSourceEnvironment int + +const ( + // Share session cookies from Microsoft Edge to Internet Explorer. + MICROSOFTEDGE_BROWSERSHAREDCOOKIESOURCEENVIRONMENT BrowserSharedCookieSourceEnvironment = iota + // Share session cookies from Internet Explorer to Microsoft Edge. + INTERNETEXPLORER11_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + // Share session cookies to and from Microsoft Edge and Internet Explorer. + BOTH_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSHAREDCOOKIESOURCEENVIRONMENT +) + +func (i BrowserSharedCookieSourceEnvironment) String() string { + return []string{"microsoftEdge", "internetExplorer11", "both", "unknownFutureValue"}[i] +} +func ParseBrowserSharedCookieSourceEnvironment(v string) (interface{}, error) { + result := MICROSOFTEDGE_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + switch v { + case "microsoftEdge": + result = MICROSOFTEDGE_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + case "internetExplorer11": + result = INTERNETEXPLORER11_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + case "both": + result = BOTH_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSHAREDCOOKIESOURCEENVIRONMENT + default: + return 0, errors.New("Unknown BrowserSharedCookieSourceEnvironment value: " + v) + } + return &result, nil +} +func SerializeBrowserSharedCookieSourceEnvironment(values []BrowserSharedCookieSourceEnvironment) []string { + 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/browser_shared_cookie_status.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_status.go new file mode 100644 index 000000000..c1c3418e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookie_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSharedCookieStatus int + +const ( + // A sharedcookie that has been published + PUBLISHED_BROWSERSHAREDCOOKIESTATUS BrowserSharedCookieStatus = iota + // A sharedcookie that has been added pending publish + PENDINGADD_BROWSERSHAREDCOOKIESTATUS + // A sharedcookie that has been edited pending publish + PENDINGEDIT_BROWSERSHAREDCOOKIESTATUS + // A sharedcookie that has been deleted pending publish + PENDINGDELETE_BROWSERSHAREDCOOKIESTATUS + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSHAREDCOOKIESTATUS +) + +func (i BrowserSharedCookieStatus) String() string { + return []string{"published", "pendingAdd", "pendingEdit", "pendingDelete", "unknownFutureValue"}[i] +} +func ParseBrowserSharedCookieStatus(v string) (interface{}, error) { + result := PUBLISHED_BROWSERSHAREDCOOKIESTATUS + switch v { + case "published": + result = PUBLISHED_BROWSERSHAREDCOOKIESTATUS + case "pendingAdd": + result = PENDINGADD_BROWSERSHAREDCOOKIESTATUS + case "pendingEdit": + result = PENDINGEDIT_BROWSERSHAREDCOOKIESTATUS + case "pendingDelete": + result = PENDINGDELETE_BROWSERSHAREDCOOKIESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSHAREDCOOKIESTATUS + default: + return 0, errors.New("Unknown BrowserSharedCookieStatus value: " + v) + } + return &result, nil +} +func SerializeBrowserSharedCookieStatus(values []BrowserSharedCookieStatus) []string { + 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/browser_shared_cookieable.go b/src/internal/connector/graph/betasdk/models/browser_shared_cookieable.go new file mode 100644 index 000000000..87f05393b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_shared_cookieable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSharedCookieable +type BrowserSharedCookieable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHistory()([]BrowserSharedCookieHistoryable) + GetHostOnly()(*bool) + GetHostOrDomain()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPath()(*string) + GetSourceEnvironment()(*BrowserSharedCookieSourceEnvironment) + GetStatus()(*BrowserSharedCookieStatus) + SetComment(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHistory(value []BrowserSharedCookieHistoryable)() + SetHostOnly(value *bool)() + SetHostOrDomain(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPath(value *string)() + SetSourceEnvironment(value *BrowserSharedCookieSourceEnvironment)() + SetStatus(value *BrowserSharedCookieStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site.go b/src/internal/connector/graph/betasdk/models/browser_site.go new file mode 100644 index 000000000..6cd484368 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site.go @@ -0,0 +1,359 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSite singleton entity which is used to specify IE mode site metadata +type BrowserSite struct { + Entity + // Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. + allowRedirect *bool + // The comment for the site. + comment *string + // The compatibilityMode property + compatibilityMode *BrowserSiteCompatibilityMode + // The date and time when the site was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the site was deleted. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The history of modifications applied to the site. + history []BrowserSiteHistoryable + // The user who last modified the site. + lastModifiedBy IdentitySetable + // The date and time when the site was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The mergeType property + mergeType *BrowserSiteMergeType + // The status property + status *BrowserSiteStatus + // The targetEnvironment property + targetEnvironment *BrowserSiteTargetEnvironment + // The URL of the site. + webUrl *string +} +// NewBrowserSite instantiates a new browserSite and sets the default values. +func NewBrowserSite()(*BrowserSite) { + m := &BrowserSite{ + Entity: *NewEntity(), + } + return m +} +// CreateBrowserSiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSite(), nil +} +// GetAllowRedirect gets the allowRedirect property value. Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. +func (m *BrowserSite) GetAllowRedirect()(*bool) { + return m.allowRedirect +} +// GetComment gets the comment property value. The comment for the site. +func (m *BrowserSite) GetComment()(*string) { + return m.comment +} +// GetCompatibilityMode gets the compatibilityMode property value. The compatibilityMode property +func (m *BrowserSite) GetCompatibilityMode()(*BrowserSiteCompatibilityMode) { + return m.compatibilityMode +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the site was created. +func (m *BrowserSite) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeletedDateTime gets the deletedDateTime property value. The date and time when the site was deleted. +func (m *BrowserSite) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowRedirect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowRedirect(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["compatibilityMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteCompatibilityMode) + if err != nil { + return err + } + if val != nil { + m.SetCompatibilityMode(val.(*BrowserSiteCompatibilityMode)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteHistoryable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteHistoryable) + } + m.SetHistory(res) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["mergeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteMergeType) + if err != nil { + return err + } + if val != nil { + m.SetMergeType(val.(*BrowserSiteMergeType)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*BrowserSiteStatus)) + } + return nil + } + res["targetEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteTargetEnvironment) + if err != nil { + return err + } + if val != nil { + m.SetTargetEnvironment(val.(*BrowserSiteTargetEnvironment)) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetHistory gets the history property value. The history of modifications applied to the site. +func (m *BrowserSite) GetHistory()([]BrowserSiteHistoryable) { + return m.history +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the site. +func (m *BrowserSite) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the site was last modified. +func (m *BrowserSite) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMergeType gets the mergeType property value. The mergeType property +func (m *BrowserSite) GetMergeType()(*BrowserSiteMergeType) { + return m.mergeType +} +// GetStatus gets the status property value. The status property +func (m *BrowserSite) GetStatus()(*BrowserSiteStatus) { + return m.status +} +// GetTargetEnvironment gets the targetEnvironment property value. The targetEnvironment property +func (m *BrowserSite) GetTargetEnvironment()(*BrowserSiteTargetEnvironment) { + return m.targetEnvironment +} +// GetWebUrl gets the webUrl property value. The URL of the site. +func (m *BrowserSite) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *BrowserSite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowRedirect", m.GetAllowRedirect()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + if m.GetCompatibilityMode() != nil { + cast := (*m.GetCompatibilityMode()).String() + err = writer.WriteStringValue("compatibilityMode", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetMergeType() != nil { + cast := (*m.GetMergeType()).String() + err = writer.WriteStringValue("mergeType", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetTargetEnvironment() != nil { + cast := (*m.GetTargetEnvironment()).String() + err = writer.WriteStringValue("targetEnvironment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAllowRedirect sets the allowRedirect property value. Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. +func (m *BrowserSite) SetAllowRedirect(value *bool)() { + m.allowRedirect = value +} +// SetComment sets the comment property value. The comment for the site. +func (m *BrowserSite) SetComment(value *string)() { + m.comment = value +} +// SetCompatibilityMode sets the compatibilityMode property value. The compatibilityMode property +func (m *BrowserSite) SetCompatibilityMode(value *BrowserSiteCompatibilityMode)() { + m.compatibilityMode = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the site was created. +func (m *BrowserSite) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeletedDateTime sets the deletedDateTime property value. The date and time when the site was deleted. +func (m *BrowserSite) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} +// SetHistory sets the history property value. The history of modifications applied to the site. +func (m *BrowserSite) SetHistory(value []BrowserSiteHistoryable)() { + m.history = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the site. +func (m *BrowserSite) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the site was last modified. +func (m *BrowserSite) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMergeType sets the mergeType property value. The mergeType property +func (m *BrowserSite) SetMergeType(value *BrowserSiteMergeType)() { + m.mergeType = value +} +// SetStatus sets the status property value. The status property +func (m *BrowserSite) SetStatus(value *BrowserSiteStatus)() { + m.status = value +} +// SetTargetEnvironment sets the targetEnvironment property value. The targetEnvironment property +func (m *BrowserSite) SetTargetEnvironment(value *BrowserSiteTargetEnvironment)() { + m.targetEnvironment = value +} +// SetWebUrl sets the webUrl property value. The URL of the site. +func (m *BrowserSite) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_collection_response.go b/src/internal/connector/graph/betasdk/models/browser_site_collection_response.go new file mode 100644 index 000000000..f92a92f6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteCollectionResponse +type BrowserSiteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BrowserSiteable +} +// NewBrowserSiteCollectionResponse instantiates a new BrowserSiteCollectionResponse and sets the default values. +func NewBrowserSiteCollectionResponse()(*BrowserSiteCollectionResponse) { + m := &BrowserSiteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBrowserSiteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSiteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSiteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BrowserSiteCollectionResponse) GetValue()([]BrowserSiteable) { + return m.value +} +// Serialize serializes information the current object +func (m *BrowserSiteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BrowserSiteCollectionResponse) SetValue(value []BrowserSiteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_collection_responseable.go b/src/internal/connector/graph/betasdk/models/browser_site_collection_responseable.go new file mode 100644 index 000000000..484cc9e0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteCollectionResponseable +type BrowserSiteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BrowserSiteable) + SetValue(value []BrowserSiteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_compatibility_mode.go b/src/internal/connector/graph/betasdk/models/browser_site_compatibility_mode.go new file mode 100644 index 000000000..0b77e6070 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_compatibility_mode.go @@ -0,0 +1,68 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSiteCompatibilityMode int + +const ( + // Loads the site using default compatibility mode. + DEFAULT_ESCAPED_BROWSERSITECOMPATIBILITYMODE BrowserSiteCompatibilityMode = iota + // Loads the site in internetExplorer8 Enterprise Mode + INTERNETEXPLORER8ENTERPRISE_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer7 Enterprise Mode + INTERNETEXPLORER7ENTERPRISE_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer11 + INTERNETEXPLORER11_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer10 + INTERNETEXPLORER10_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer9 + INTERNETEXPLORER9_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer8 + INTERNETEXPLORER8_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer7 + INTERNETEXPLORER7_BROWSERSITECOMPATIBILITYMODE + // Loads the site in internetExplorer5 + INTERNETEXPLORER5_BROWSERSITECOMPATIBILITYMODE + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSITECOMPATIBILITYMODE +) + +func (i BrowserSiteCompatibilityMode) String() string { + return []string{"default", "internetExplorer8Enterprise", "internetExplorer7Enterprise", "internetExplorer11", "internetExplorer10", "internetExplorer9", "internetExplorer8", "internetExplorer7", "internetExplorer5", "unknownFutureValue"}[i] +} +func ParseBrowserSiteCompatibilityMode(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_BROWSERSITECOMPATIBILITYMODE + switch v { + case "default": + result = DEFAULT_ESCAPED_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer8Enterprise": + result = INTERNETEXPLORER8ENTERPRISE_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer7Enterprise": + result = INTERNETEXPLORER7ENTERPRISE_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer11": + result = INTERNETEXPLORER11_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer10": + result = INTERNETEXPLORER10_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer9": + result = INTERNETEXPLORER9_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer8": + result = INTERNETEXPLORER8_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer7": + result = INTERNETEXPLORER7_BROWSERSITECOMPATIBILITYMODE + case "internetExplorer5": + result = INTERNETEXPLORER5_BROWSERSITECOMPATIBILITYMODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSITECOMPATIBILITYMODE + default: + return 0, errors.New("Unknown BrowserSiteCompatibilityMode value: " + v) + } + return &result, nil +} +func SerializeBrowserSiteCompatibilityMode(values []BrowserSiteCompatibilityMode) []string { + 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/browser_site_history.go b/src/internal/connector/graph/betasdk/models/browser_site_history.go new file mode 100644 index 000000000..63e289e10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_history.go @@ -0,0 +1,257 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteHistory the history for the site modifications +type BrowserSiteHistory struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. + allowRedirect *bool + // The comment for the site. + comment *string + // Controls what compatibility setting is used for specific sites or domains. The possible values are: default, internetExplorer8Enterprise, internetExplorer7Enterprise, internetExplorer11, internetExplorer10, internetExplorer9, internetExplorer8, internetExplorer7, internetExplorer5, unknownFutureValue. + compatibilityMode *BrowserSiteCompatibilityMode + // The user who last modified the site. + lastModifiedBy IdentitySetable + // The merge type of the site. The possible values are: noMerge, default, unknownFutureValue. + mergeType *BrowserSiteMergeType + // The OdataType property + odataType *string + // The date and time when the site was last published. + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The target environment that the site should open in. The possible values are: internetExplorerMode, internetExplorer11, microsoftEdge, configurable, none, unknownFutureValue.Prior to June 15, 2022, the internetExplorer11 option would allow opening a site in the Internet Explorer 11 (IE11) desktop application. Following the retirement of IE11 on June 15, 2022, the internetExplorer11 option will no longer open an IE11 window and will instead behave the same as the internetExplorerMode option. + targetEnvironment *BrowserSiteTargetEnvironment +} +// NewBrowserSiteHistory instantiates a new browserSiteHistory and sets the default values. +func NewBrowserSiteHistory()(*BrowserSiteHistory) { + m := &BrowserSiteHistory{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBrowserSiteHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSiteHistory(), 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 *BrowserSiteHistory) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowRedirect gets the allowRedirect property value. Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. +func (m *BrowserSiteHistory) GetAllowRedirect()(*bool) { + return m.allowRedirect +} +// GetComment gets the comment property value. The comment for the site. +func (m *BrowserSiteHistory) GetComment()(*string) { + return m.comment +} +// GetCompatibilityMode gets the compatibilityMode property value. Controls what compatibility setting is used for specific sites or domains. The possible values are: default, internetExplorer8Enterprise, internetExplorer7Enterprise, internetExplorer11, internetExplorer10, internetExplorer9, internetExplorer8, internetExplorer7, internetExplorer5, unknownFutureValue. +func (m *BrowserSiteHistory) GetCompatibilityMode()(*BrowserSiteCompatibilityMode) { + return m.compatibilityMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSiteHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowRedirect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowRedirect(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["compatibilityMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteCompatibilityMode) + if err != nil { + return err + } + if val != nil { + m.SetCompatibilityMode(val.(*BrowserSiteCompatibilityMode)) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["mergeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteMergeType) + if err != nil { + return err + } + if val != nil { + m.SetMergeType(val.(*BrowserSiteMergeType)) + } + 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["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + res["targetEnvironment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteTargetEnvironment) + if err != nil { + return err + } + if val != nil { + m.SetTargetEnvironment(val.(*BrowserSiteTargetEnvironment)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the site. +func (m *BrowserSiteHistory) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetMergeType gets the mergeType property value. The merge type of the site. The possible values are: noMerge, default, unknownFutureValue. +func (m *BrowserSiteHistory) GetMergeType()(*BrowserSiteMergeType) { + return m.mergeType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BrowserSiteHistory) GetOdataType()(*string) { + return m.odataType +} +// GetPublishedDateTime gets the publishedDateTime property value. The date and time when the site was last published. +func (m *BrowserSiteHistory) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// GetTargetEnvironment gets the targetEnvironment property value. The target environment that the site should open in. The possible values are: internetExplorerMode, internetExplorer11, microsoftEdge, configurable, none, unknownFutureValue.Prior to June 15, 2022, the internetExplorer11 option would allow opening a site in the Internet Explorer 11 (IE11) desktop application. Following the retirement of IE11 on June 15, 2022, the internetExplorer11 option will no longer open an IE11 window and will instead behave the same as the internetExplorerMode option. +func (m *BrowserSiteHistory) GetTargetEnvironment()(*BrowserSiteTargetEnvironment) { + return m.targetEnvironment +} +// Serialize serializes information the current object +func (m *BrowserSiteHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowRedirect", m.GetAllowRedirect()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + if m.GetCompatibilityMode() != nil { + cast := (*m.GetCompatibilityMode()).String() + err := writer.WriteStringValue("compatibilityMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + if m.GetMergeType() != nil { + cast := (*m.GetMergeType()).String() + err := writer.WriteStringValue("mergeType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + if err != nil { + return err + } + } + if m.GetTargetEnvironment() != nil { + cast := (*m.GetTargetEnvironment()).String() + err := writer.WriteStringValue("targetEnvironment", &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 *BrowserSiteHistory) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowRedirect sets the allowRedirect property value. Controls the behavior of redirected sites. If true, indicates that the site will open in Internet Explorer 11 or Microsoft Edge even if the site is navigated to as part of a HTTP or meta refresh redirection chain. +func (m *BrowserSiteHistory) SetAllowRedirect(value *bool)() { + m.allowRedirect = value +} +// SetComment sets the comment property value. The comment for the site. +func (m *BrowserSiteHistory) SetComment(value *string)() { + m.comment = value +} +// SetCompatibilityMode sets the compatibilityMode property value. Controls what compatibility setting is used for specific sites or domains. The possible values are: default, internetExplorer8Enterprise, internetExplorer7Enterprise, internetExplorer11, internetExplorer10, internetExplorer9, internetExplorer8, internetExplorer7, internetExplorer5, unknownFutureValue. +func (m *BrowserSiteHistory) SetCompatibilityMode(value *BrowserSiteCompatibilityMode)() { + m.compatibilityMode = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the site. +func (m *BrowserSiteHistory) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetMergeType sets the mergeType property value. The merge type of the site. The possible values are: noMerge, default, unknownFutureValue. +func (m *BrowserSiteHistory) SetMergeType(value *BrowserSiteMergeType)() { + m.mergeType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BrowserSiteHistory) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublishedDateTime sets the publishedDateTime property value. The date and time when the site was last published. +func (m *BrowserSiteHistory) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} +// SetTargetEnvironment sets the targetEnvironment property value. The target environment that the site should open in. The possible values are: internetExplorerMode, internetExplorer11, microsoftEdge, configurable, none, unknownFutureValue.Prior to June 15, 2022, the internetExplorer11 option would allow opening a site in the Internet Explorer 11 (IE11) desktop application. Following the retirement of IE11 on June 15, 2022, the internetExplorer11 option will no longer open an IE11 window and will instead behave the same as the internetExplorerMode option. +func (m *BrowserSiteHistory) SetTargetEnvironment(value *BrowserSiteTargetEnvironment)() { + m.targetEnvironment = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_history_collection_response.go b/src/internal/connector/graph/betasdk/models/browser_site_history_collection_response.go new file mode 100644 index 000000000..bf018feaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_history_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteHistoryCollectionResponse +type BrowserSiteHistoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BrowserSiteHistoryable +} +// NewBrowserSiteHistoryCollectionResponse instantiates a new BrowserSiteHistoryCollectionResponse and sets the default values. +func NewBrowserSiteHistoryCollectionResponse()(*BrowserSiteHistoryCollectionResponse) { + m := &BrowserSiteHistoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBrowserSiteHistoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteHistoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSiteHistoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSiteHistoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteHistoryable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteHistoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BrowserSiteHistoryCollectionResponse) GetValue()([]BrowserSiteHistoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *BrowserSiteHistoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BrowserSiteHistoryCollectionResponse) SetValue(value []BrowserSiteHistoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_history_collection_responseable.go b/src/internal/connector/graph/betasdk/models/browser_site_history_collection_responseable.go new file mode 100644 index 000000000..ee58fc802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_history_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteHistoryCollectionResponseable +type BrowserSiteHistoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BrowserSiteHistoryable) + SetValue(value []BrowserSiteHistoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_historyable.go b/src/internal/connector/graph/betasdk/models/browser_site_historyable.go new file mode 100644 index 000000000..f39fca83e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_historyable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteHistoryable +type BrowserSiteHistoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowRedirect()(*bool) + GetComment()(*string) + GetCompatibilityMode()(*BrowserSiteCompatibilityMode) + GetLastModifiedBy()(IdentitySetable) + GetMergeType()(*BrowserSiteMergeType) + GetOdataType()(*string) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTargetEnvironment()(*BrowserSiteTargetEnvironment) + SetAllowRedirect(value *bool)() + SetComment(value *string)() + SetCompatibilityMode(value *BrowserSiteCompatibilityMode)() + SetLastModifiedBy(value IdentitySetable)() + SetMergeType(value *BrowserSiteMergeType)() + SetOdataType(value *string)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTargetEnvironment(value *BrowserSiteTargetEnvironment)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_list.go b/src/internal/connector/graph/betasdk/models/browser_site_list.go new file mode 100644 index 000000000..7a3aa54e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_list.go @@ -0,0 +1,312 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteList a singleton entity which is used to specify IE mode site list metadata +type BrowserSiteList struct { + Entity + // The description of the site list. + description *string + // The name of the site list. + displayName *string + // The user who last modified the site list. + lastModifiedBy IdentitySetable + // The date and time when the site list was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user who published the site list. + publishedBy IdentitySetable + // The date and time when the site list was published. + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The current revision of the site list. + revision *string + // A collection of shared cookies defined for the site list. + sharedCookies []BrowserSharedCookieable + // A collection of sites defined for the site list. + sites []BrowserSiteable + // The status property + status *BrowserSiteListStatus +} +// NewBrowserSiteList instantiates a new browserSiteList and sets the default values. +func NewBrowserSiteList()(*BrowserSiteList) { + m := &BrowserSiteList{ + Entity: *NewEntity(), + } + return m +} +// CreateBrowserSiteListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSiteList(), nil +} +// GetDescription gets the description property value. The description of the site list. +func (m *BrowserSiteList) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of the site list. +func (m *BrowserSiteList) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSiteList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["publishedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublishedBy(val.(IdentitySetable)) + } + return nil + } + res["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + res["revision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRevision(val) + } + return nil + } + res["sharedCookies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSharedCookieFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSharedCookieable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSharedCookieable) + } + m.SetSharedCookies(res) + } + return nil + } + res["sites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteable) + } + m.SetSites(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBrowserSiteListStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*BrowserSiteListStatus)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the site list. +func (m *BrowserSiteList) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the site list was last modified. +func (m *BrowserSiteList) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPublishedBy gets the publishedBy property value. The user who published the site list. +func (m *BrowserSiteList) GetPublishedBy()(IdentitySetable) { + return m.publishedBy +} +// GetPublishedDateTime gets the publishedDateTime property value. The date and time when the site list was published. +func (m *BrowserSiteList) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// GetRevision gets the revision property value. The current revision of the site list. +func (m *BrowserSiteList) GetRevision()(*string) { + return m.revision +} +// GetSharedCookies gets the sharedCookies property value. A collection of shared cookies defined for the site list. +func (m *BrowserSiteList) GetSharedCookies()([]BrowserSharedCookieable) { + return m.sharedCookies +} +// GetSites gets the sites property value. A collection of sites defined for the site list. +func (m *BrowserSiteList) GetSites()([]BrowserSiteable) { + return m.sites +} +// GetStatus gets the status property value. The status property +func (m *BrowserSiteList) GetStatus()(*BrowserSiteListStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *BrowserSiteList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publishedBy", m.GetPublishedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("revision", m.GetRevision()) + if err != nil { + return err + } + } + if m.GetSharedCookies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedCookies())) + for i, v := range m.GetSharedCookies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharedCookies", cast) + if err != nil { + return err + } + } + if m.GetSites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSites())) + for i, v := range m.GetSites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sites", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description of the site list. +func (m *BrowserSiteList) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of the site list. +func (m *BrowserSiteList) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the site list. +func (m *BrowserSiteList) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the site list was last modified. +func (m *BrowserSiteList) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPublishedBy sets the publishedBy property value. The user who published the site list. +func (m *BrowserSiteList) SetPublishedBy(value IdentitySetable)() { + m.publishedBy = value +} +// SetPublishedDateTime sets the publishedDateTime property value. The date and time when the site list was published. +func (m *BrowserSiteList) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} +// SetRevision sets the revision property value. The current revision of the site list. +func (m *BrowserSiteList) SetRevision(value *string)() { + m.revision = value +} +// SetSharedCookies sets the sharedCookies property value. A collection of shared cookies defined for the site list. +func (m *BrowserSiteList) SetSharedCookies(value []BrowserSharedCookieable)() { + m.sharedCookies = value +} +// SetSites sets the sites property value. A collection of sites defined for the site list. +func (m *BrowserSiteList) SetSites(value []BrowserSiteable)() { + m.sites = value +} +// SetStatus sets the status property value. The status property +func (m *BrowserSiteList) SetStatus(value *BrowserSiteListStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_list_collection_response.go b/src/internal/connector/graph/betasdk/models/browser_site_list_collection_response.go new file mode 100644 index 000000000..3a18462dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_list_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteListCollectionResponse +type BrowserSiteListCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BrowserSiteListable +} +// NewBrowserSiteListCollectionResponse instantiates a new BrowserSiteListCollectionResponse and sets the default values. +func NewBrowserSiteListCollectionResponse()(*BrowserSiteListCollectionResponse) { + m := &BrowserSiteListCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBrowserSiteListCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBrowserSiteListCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBrowserSiteListCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BrowserSiteListCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteListable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteListable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BrowserSiteListCollectionResponse) GetValue()([]BrowserSiteListable) { + return m.value +} +// Serialize serializes information the current object +func (m *BrowserSiteListCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BrowserSiteListCollectionResponse) SetValue(value []BrowserSiteListable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_list_collection_responseable.go b/src/internal/connector/graph/betasdk/models/browser_site_list_collection_responseable.go new file mode 100644 index 000000000..361917cc0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_list_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteListCollectionResponseable +type BrowserSiteListCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BrowserSiteListable) + SetValue(value []BrowserSiteListable)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_list_status.go b/src/internal/connector/graph/betasdk/models/browser_site_list_status.go new file mode 100644 index 000000000..4fc02b049 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_list_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSiteListStatus int + +const ( + // A site list that has not yet been published + DRAFT_BROWSERSITELISTSTATUS BrowserSiteListStatus = iota + // A site list that has been published with no pending changes. + PUBLISHED_BROWSERSITELISTSTATUS + // A site that has pending changes + PENDING_BROWSERSITELISTSTATUS + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shoudn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSITELISTSTATUS +) + +func (i BrowserSiteListStatus) String() string { + return []string{"draft", "published", "pending", "unknownFutureValue"}[i] +} +func ParseBrowserSiteListStatus(v string) (interface{}, error) { + result := DRAFT_BROWSERSITELISTSTATUS + switch v { + case "draft": + result = DRAFT_BROWSERSITELISTSTATUS + case "published": + result = PUBLISHED_BROWSERSITELISTSTATUS + case "pending": + result = PENDING_BROWSERSITELISTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSITELISTSTATUS + default: + return 0, errors.New("Unknown BrowserSiteListStatus value: " + v) + } + return &result, nil +} +func SerializeBrowserSiteListStatus(values []BrowserSiteListStatus) []string { + 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/browser_site_listable.go b/src/internal/connector/graph/betasdk/models/browser_site_listable.go new file mode 100644 index 000000000..97aa88b22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_listable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteListable +type BrowserSiteListable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublishedBy()(IdentitySetable) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRevision()(*string) + GetSharedCookies()([]BrowserSharedCookieable) + GetSites()([]BrowserSiteable) + GetStatus()(*BrowserSiteListStatus) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublishedBy(value IdentitySetable)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRevision(value *string)() + SetSharedCookies(value []BrowserSharedCookieable)() + SetSites(value []BrowserSiteable)() + SetStatus(value *BrowserSiteListStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_site_merge_type.go b/src/internal/connector/graph/betasdk/models/browser_site_merge_type.go new file mode 100644 index 000000000..2aed8bc12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_merge_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSiteMergeType int + +const ( + // No merge type + NOMERGE_BROWSERSITEMERGETYPE BrowserSiteMergeType = iota + // Default merge type + DEFAULT_ESCAPED_BROWSERSITEMERGETYPE + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSITEMERGETYPE +) + +func (i BrowserSiteMergeType) String() string { + return []string{"noMerge", "default", "unknownFutureValue"}[i] +} +func ParseBrowserSiteMergeType(v string) (interface{}, error) { + result := NOMERGE_BROWSERSITEMERGETYPE + switch v { + case "noMerge": + result = NOMERGE_BROWSERSITEMERGETYPE + case "default": + result = DEFAULT_ESCAPED_BROWSERSITEMERGETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSITEMERGETYPE + default: + return 0, errors.New("Unknown BrowserSiteMergeType value: " + v) + } + return &result, nil +} +func SerializeBrowserSiteMergeType(values []BrowserSiteMergeType) []string { + 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/browser_site_status.go b/src/internal/connector/graph/betasdk/models/browser_site_status.go new file mode 100644 index 000000000..821bba692 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSiteStatus int + +const ( + // A site that has been published + PUBLISHED_BROWSERSITESTATUS BrowserSiteStatus = iota + // A site that has been added pending publish + PENDINGADD_BROWSERSITESTATUS + // A site that has been edited pending publish + PENDINGEDIT_BROWSERSITESTATUS + // A site that has been deleted pending publish + PENDINGDELETE_BROWSERSITESTATUS + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSITESTATUS +) + +func (i BrowserSiteStatus) String() string { + return []string{"published", "pendingAdd", "pendingEdit", "pendingDelete", "unknownFutureValue"}[i] +} +func ParseBrowserSiteStatus(v string) (interface{}, error) { + result := PUBLISHED_BROWSERSITESTATUS + switch v { + case "published": + result = PUBLISHED_BROWSERSITESTATUS + case "pendingAdd": + result = PENDINGADD_BROWSERSITESTATUS + case "pendingEdit": + result = PENDINGEDIT_BROWSERSITESTATUS + case "pendingDelete": + result = PENDINGDELETE_BROWSERSITESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSITESTATUS + default: + return 0, errors.New("Unknown BrowserSiteStatus value: " + v) + } + return &result, nil +} +func SerializeBrowserSiteStatus(values []BrowserSiteStatus) []string { + 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/browser_site_target_environment.go b/src/internal/connector/graph/betasdk/models/browser_site_target_environment.go new file mode 100644 index 000000000..e6d1d92ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_site_target_environment.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSiteTargetEnvironment int + +const ( + // Open in Internet Explorer Mode + INTERNETEXPLORERMODE_BROWSERSITETARGETENVIRONMENT BrowserSiteTargetEnvironment = iota + // Open in standalone Internet Explorer 11 + INTERNETEXPLORER11_BROWSERSITETARGETENVIRONMENT + // Open in Microsoft Edge + MICROSOFTEDGE_BROWSERSITETARGETENVIRONMENT + // Configurable type + CONFIGURABLE_BROWSERSITETARGETENVIRONMENT + // Open in the browser the employee chooses. + NONE_BROWSERSITETARGETENVIRONMENT + // Placeholder for evolvable enum, but this enum is never returned to the caller, so it shouldn't be necessary. + UNKNOWNFUTUREVALUE_BROWSERSITETARGETENVIRONMENT +) + +func (i BrowserSiteTargetEnvironment) String() string { + return []string{"internetExplorerMode", "internetExplorer11", "microsoftEdge", "configurable", "none", "unknownFutureValue"}[i] +} +func ParseBrowserSiteTargetEnvironment(v string) (interface{}, error) { + result := INTERNETEXPLORERMODE_BROWSERSITETARGETENVIRONMENT + switch v { + case "internetExplorerMode": + result = INTERNETEXPLORERMODE_BROWSERSITETARGETENVIRONMENT + case "internetExplorer11": + result = INTERNETEXPLORER11_BROWSERSITETARGETENVIRONMENT + case "microsoftEdge": + result = MICROSOFTEDGE_BROWSERSITETARGETENVIRONMENT + case "configurable": + result = CONFIGURABLE_BROWSERSITETARGETENVIRONMENT + case "none": + result = NONE_BROWSERSITETARGETENVIRONMENT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BROWSERSITETARGETENVIRONMENT + default: + return 0, errors.New("Unknown BrowserSiteTargetEnvironment value: " + v) + } + return &result, nil +} +func SerializeBrowserSiteTargetEnvironment(values []BrowserSiteTargetEnvironment) []string { + 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/browser_siteable.go b/src/internal/connector/graph/betasdk/models/browser_siteable.go new file mode 100644 index 000000000..def5d826a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_siteable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BrowserSiteable +type BrowserSiteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowRedirect()(*bool) + GetComment()(*string) + GetCompatibilityMode()(*BrowserSiteCompatibilityMode) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHistory()([]BrowserSiteHistoryable) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMergeType()(*BrowserSiteMergeType) + GetStatus()(*BrowserSiteStatus) + GetTargetEnvironment()(*BrowserSiteTargetEnvironment) + GetWebUrl()(*string) + SetAllowRedirect(value *bool)() + SetComment(value *string)() + SetCompatibilityMode(value *BrowserSiteCompatibilityMode)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHistory(value []BrowserSiteHistoryable)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMergeType(value *BrowserSiteMergeType)() + SetStatus(value *BrowserSiteStatus)() + SetTargetEnvironment(value *BrowserSiteTargetEnvironment)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/browser_sync_setting.go b/src/internal/connector/graph/betasdk/models/browser_sync_setting.go new file mode 100644 index 000000000..e023b052d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/browser_sync_setting.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BrowserSyncSetting int + +const ( + // Default – Allow syncing of browser settings across devices. + NOTCONFIGURED_BROWSERSYNCSETTING BrowserSyncSetting = iota + // Prevent syncing of browser settings across user devices, allow user override of setting. + BLOCKEDWITHUSEROVERRIDE_BROWSERSYNCSETTING + // Absolutely prevent syncing of browser settings across user devices. + BLOCKED_BROWSERSYNCSETTING +) + +func (i BrowserSyncSetting) String() string { + return []string{"notConfigured", "blockedWithUserOverride", "blocked"}[i] +} +func ParseBrowserSyncSetting(v string) (interface{}, error) { + result := NOTCONFIGURED_BROWSERSYNCSETTING + switch v { + case "notConfigured": + result = NOTCONFIGURED_BROWSERSYNCSETTING + case "blockedWithUserOverride": + result = BLOCKEDWITHUSEROVERRIDE_BROWSERSYNCSETTING + case "blocked": + result = BLOCKED_BROWSERSYNCSETTING + default: + return 0, errors.New("Unknown BrowserSyncSetting value: " + v) + } + return &result, nil +} +func SerializeBrowserSyncSetting(values []BrowserSyncSetting) []string { + 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/bucket_aggregation_definition.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_definition.go new file mode 100644 index 000000000..39f22ed51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_definition.go @@ -0,0 +1,210 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationDefinition +type BucketAggregationDefinition struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // True to specify the sort order as descending. The default is false, with the sort order as ascending. Optional. + isDescending *bool + // The minimum number of items that should be present in the aggregation to be returned in a bucket. Optional. + minimumCount *int32 + // The OdataType property + odataType *string + // A filter to define a matching criteria. The key should start with the specified prefix to be returned in the response. Optional. + prefixFilter *string + // Specifies the manual ranges to compute the aggregations. This is only valid for non-string refiners of date or numeric type. Optional. + ranges []BucketAggregationRangeable + // The sortBy property + sortBy *BucketAggregationSortProperty +} +// NewBucketAggregationDefinition instantiates a new bucketAggregationDefinition and sets the default values. +func NewBucketAggregationDefinition()(*BucketAggregationDefinition) { + m := &BucketAggregationDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBucketAggregationDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBucketAggregationDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBucketAggregationDefinition(), 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 *BucketAggregationDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BucketAggregationDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isDescending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDescending(val) + } + return nil + } + res["minimumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumCount(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["prefixFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrefixFilter(val) + } + return nil + } + res["ranges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBucketAggregationRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BucketAggregationRangeable, len(val)) + for i, v := range val { + res[i] = v.(BucketAggregationRangeable) + } + m.SetRanges(res) + } + return nil + } + res["sortBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBucketAggregationSortProperty) + if err != nil { + return err + } + if val != nil { + m.SetSortBy(val.(*BucketAggregationSortProperty)) + } + return nil + } + return res +} +// GetIsDescending gets the isDescending property value. True to specify the sort order as descending. The default is false, with the sort order as ascending. Optional. +func (m *BucketAggregationDefinition) GetIsDescending()(*bool) { + return m.isDescending +} +// GetMinimumCount gets the minimumCount property value. The minimum number of items that should be present in the aggregation to be returned in a bucket. Optional. +func (m *BucketAggregationDefinition) GetMinimumCount()(*int32) { + return m.minimumCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BucketAggregationDefinition) GetOdataType()(*string) { + return m.odataType +} +// GetPrefixFilter gets the prefixFilter property value. A filter to define a matching criteria. The key should start with the specified prefix to be returned in the response. Optional. +func (m *BucketAggregationDefinition) GetPrefixFilter()(*string) { + return m.prefixFilter +} +// GetRanges gets the ranges property value. Specifies the manual ranges to compute the aggregations. This is only valid for non-string refiners of date or numeric type. Optional. +func (m *BucketAggregationDefinition) GetRanges()([]BucketAggregationRangeable) { + return m.ranges +} +// GetSortBy gets the sortBy property value. The sortBy property +func (m *BucketAggregationDefinition) GetSortBy()(*BucketAggregationSortProperty) { + return m.sortBy +} +// Serialize serializes information the current object +func (m *BucketAggregationDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isDescending", m.GetIsDescending()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minimumCount", m.GetMinimumCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("prefixFilter", m.GetPrefixFilter()) + if err != nil { + return err + } + } + if m.GetRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRanges())) + for i, v := range m.GetRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("ranges", cast) + if err != nil { + return err + } + } + if m.GetSortBy() != nil { + cast := (*m.GetSortBy()).String() + err := writer.WriteStringValue("sortBy", &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 *BucketAggregationDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsDescending sets the isDescending property value. True to specify the sort order as descending. The default is false, with the sort order as ascending. Optional. +func (m *BucketAggregationDefinition) SetIsDescending(value *bool)() { + m.isDescending = value +} +// SetMinimumCount sets the minimumCount property value. The minimum number of items that should be present in the aggregation to be returned in a bucket. Optional. +func (m *BucketAggregationDefinition) SetMinimumCount(value *int32)() { + m.minimumCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BucketAggregationDefinition) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrefixFilter sets the prefixFilter property value. A filter to define a matching criteria. The key should start with the specified prefix to be returned in the response. Optional. +func (m *BucketAggregationDefinition) SetPrefixFilter(value *string)() { + m.prefixFilter = value +} +// SetRanges sets the ranges property value. Specifies the manual ranges to compute the aggregations. This is only valid for non-string refiners of date or numeric type. Optional. +func (m *BucketAggregationDefinition) SetRanges(value []BucketAggregationRangeable)() { + m.ranges = value +} +// SetSortBy sets the sortBy property value. The sortBy property +func (m *BucketAggregationDefinition) SetSortBy(value *BucketAggregationSortProperty)() { + m.sortBy = value +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_definitionable.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_definitionable.go new file mode 100644 index 000000000..1dbfce4bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_definitionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationDefinitionable +type BucketAggregationDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDescending()(*bool) + GetMinimumCount()(*int32) + GetOdataType()(*string) + GetPrefixFilter()(*string) + GetRanges()([]BucketAggregationRangeable) + GetSortBy()(*BucketAggregationSortProperty) + SetIsDescending(value *bool)() + SetMinimumCount(value *int32)() + SetOdataType(value *string)() + SetPrefixFilter(value *string)() + SetRanges(value []BucketAggregationRangeable)() + SetSortBy(value *BucketAggregationSortProperty)() +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_range.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range.go new file mode 100644 index 000000000..cad70d2b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationRange +type BucketAggregationRange struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines the lower bound from which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. + from *string + // The OdataType property + odataType *string + // Defines the upper bound up to which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. + to *string +} +// NewBucketAggregationRange instantiates a new bucketAggregationRange and sets the default values. +func NewBucketAggregationRange()(*BucketAggregationRange) { + m := &BucketAggregationRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBucketAggregationRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBucketAggregationRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBucketAggregationRange(), 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 *BucketAggregationRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BucketAggregationRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFrom(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["to"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTo(val) + } + return nil + } + return res +} +// GetFrom gets the from property value. Defines the lower bound from which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. +func (m *BucketAggregationRange) GetFrom()(*string) { + return m.from +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BucketAggregationRange) GetOdataType()(*string) { + return m.odataType +} +// GetTo gets the to property value. Defines the upper bound up to which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. +func (m *BucketAggregationRange) GetTo()(*string) { + return m.to +} +// Serialize serializes information the current object +func (m *BucketAggregationRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("to", m.GetTo()) + 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 *BucketAggregationRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFrom sets the from property value. Defines the lower bound from which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. +func (m *BucketAggregationRange) SetFrom(value *string)() { + m.from = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BucketAggregationRange) SetOdataType(value *string)() { + m.odataType = value +} +// SetTo sets the to property value. Defines the upper bound up to which to compute the aggregation. This can be a numeric value or a string representation of a date using the YYYY-MM-DDTHH:mm:ss.sssZ format. Required. +func (m *BucketAggregationRange) SetTo(value *string)() { + m.to = value +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_response.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_response.go new file mode 100644 index 000000000..403f42367 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationRangeCollectionResponse +type BucketAggregationRangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BucketAggregationRangeable +} +// NewBucketAggregationRangeCollectionResponse instantiates a new BucketAggregationRangeCollectionResponse and sets the default values. +func NewBucketAggregationRangeCollectionResponse()(*BucketAggregationRangeCollectionResponse) { + m := &BucketAggregationRangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBucketAggregationRangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBucketAggregationRangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBucketAggregationRangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BucketAggregationRangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBucketAggregationRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BucketAggregationRangeable, len(val)) + for i, v := range val { + res[i] = v.(BucketAggregationRangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BucketAggregationRangeCollectionResponse) GetValue()([]BucketAggregationRangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *BucketAggregationRangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BucketAggregationRangeCollectionResponse) SetValue(value []BucketAggregationRangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_responseable.go new file mode 100644 index 000000000..39b067204 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationRangeCollectionResponseable +type BucketAggregationRangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BucketAggregationRangeable) + SetValue(value []BucketAggregationRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_rangeable.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_rangeable.go new file mode 100644 index 000000000..c227f0f94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_rangeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BucketAggregationRangeable +type BucketAggregationRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFrom()(*string) + GetOdataType()(*string) + GetTo()(*string) + SetFrom(value *string)() + SetOdataType(value *string)() + SetTo(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/bucket_aggregation_sort_property.go b/src/internal/connector/graph/betasdk/models/bucket_aggregation_sort_property.go new file mode 100644 index 000000000..7d095126d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bucket_aggregation_sort_property.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type BucketAggregationSortProperty int + +const ( + COUNT_BUCKETAGGREGATIONSORTPROPERTY BucketAggregationSortProperty = iota + KEYASSTRING_BUCKETAGGREGATIONSORTPROPERTY + KEYASNUMBER_BUCKETAGGREGATIONSORTPROPERTY + UNKNOWNFUTUREVALUE_BUCKETAGGREGATIONSORTPROPERTY +) + +func (i BucketAggregationSortProperty) String() string { + return []string{"count", "keyAsString", "keyAsNumber", "unknownFutureValue"}[i] +} +func ParseBucketAggregationSortProperty(v string) (interface{}, error) { + result := COUNT_BUCKETAGGREGATIONSORTPROPERTY + switch v { + case "count": + result = COUNT_BUCKETAGGREGATIONSORTPROPERTY + case "keyAsString": + result = KEYASSTRING_BUCKETAGGREGATIONSORTPROPERTY + case "keyAsNumber": + result = KEYASNUMBER_BUCKETAGGREGATIONSORTPROPERTY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BUCKETAGGREGATIONSORTPROPERTY + default: + return 0, errors.New("Unknown BucketAggregationSortProperty value: " + v) + } + return &result, nil +} +func SerializeBucketAggregationSortProperty(values []BucketAggregationSortProperty) []string { + 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/buffer_decryption_result.go b/src/internal/connector/graph/betasdk/models/buffer_decryption_result.go new file mode 100644 index 000000000..caffc1ed7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/buffer_decryption_result.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BufferDecryptionResult +type BufferDecryptionResult 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 decryptedBuffer property + decryptedBuffer []byte + // The OdataType property + odataType *string +} +// NewBufferDecryptionResult instantiates a new bufferDecryptionResult and sets the default values. +func NewBufferDecryptionResult()(*BufferDecryptionResult) { + m := &BufferDecryptionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBufferDecryptionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBufferDecryptionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBufferDecryptionResult(), 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 *BufferDecryptionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDecryptedBuffer gets the decryptedBuffer property value. The decryptedBuffer property +func (m *BufferDecryptionResult) GetDecryptedBuffer()([]byte) { + return m.decryptedBuffer +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BufferDecryptionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["decryptedBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetDecryptedBuffer(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BufferDecryptionResult) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *BufferDecryptionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("decryptedBuffer", m.GetDecryptedBuffer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *BufferDecryptionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDecryptedBuffer sets the decryptedBuffer property value. The decryptedBuffer property +func (m *BufferDecryptionResult) SetDecryptedBuffer(value []byte)() { + m.decryptedBuffer = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BufferDecryptionResult) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/buffer_decryption_resultable.go b/src/internal/connector/graph/betasdk/models/buffer_decryption_resultable.go new file mode 100644 index 000000000..1b77b89a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/buffer_decryption_resultable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BufferDecryptionResultable +type BufferDecryptionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecryptedBuffer()([]byte) + GetOdataType()(*string) + SetDecryptedBuffer(value []byte)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/buffer_encryption_result.go b/src/internal/connector/graph/betasdk/models/buffer_encryption_result.go new file mode 100644 index 000000000..b437a9baa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/buffer_encryption_result.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BufferEncryptionResult +type BufferEncryptionResult 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 encryptedBuffer property + encryptedBuffer []byte + // The OdataType property + odataType *string + // The publishingLicense property + publishingLicense []byte +} +// NewBufferEncryptionResult instantiates a new bufferEncryptionResult and sets the default values. +func NewBufferEncryptionResult()(*BufferEncryptionResult) { + m := &BufferEncryptionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBufferEncryptionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBufferEncryptionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBufferEncryptionResult(), 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 *BufferEncryptionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEncryptedBuffer gets the encryptedBuffer property value. The encryptedBuffer property +func (m *BufferEncryptionResult) GetEncryptedBuffer()([]byte) { + return m.encryptedBuffer +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BufferEncryptionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["encryptedBuffer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptedBuffer(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["publishingLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishingLicense(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BufferEncryptionResult) GetOdataType()(*string) { + return m.odataType +} +// GetPublishingLicense gets the publishingLicense property value. The publishingLicense property +func (m *BufferEncryptionResult) GetPublishingLicense()([]byte) { + return m.publishingLicense +} +// Serialize serializes information the current object +func (m *BufferEncryptionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("encryptedBuffer", m.GetEncryptedBuffer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("publishingLicense", m.GetPublishingLicense()) + 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 *BufferEncryptionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEncryptedBuffer sets the encryptedBuffer property value. The encryptedBuffer property +func (m *BufferEncryptionResult) SetEncryptedBuffer(value []byte)() { + m.encryptedBuffer = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BufferEncryptionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublishingLicense sets the publishingLicense property value. The publishingLicense property +func (m *BufferEncryptionResult) SetPublishingLicense(value []byte)() { + m.publishingLicense = value +} diff --git a/src/internal/connector/graph/betasdk/models/buffer_encryption_resultable.go b/src/internal/connector/graph/betasdk/models/buffer_encryption_resultable.go new file mode 100644 index 000000000..9249b51c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/buffer_encryption_resultable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BufferEncryptionResultable +type BufferEncryptionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptedBuffer()([]byte) + GetOdataType()(*string) + GetPublishingLicense()([]byte) + SetEncryptedBuffer(value []byte)() + SetOdataType(value *string)() + SetPublishingLicense(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/built_in_identity_provider.go b/src/internal/connector/graph/betasdk/models/built_in_identity_provider.go new file mode 100644 index 000000000..9a02a575d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/built_in_identity_provider.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BuiltInIdentityProvider +type BuiltInIdentityProvider struct { + IdentityProviderBase + // The identity provider type. For a B2B scenario, possible values: AADSignup, MicrosoftAccount, EmailOTP. Required. + identityProviderType *string + // The state property + state *IdentityProviderState +} +// NewBuiltInIdentityProvider instantiates a new BuiltInIdentityProvider and sets the default values. +func NewBuiltInIdentityProvider()(*BuiltInIdentityProvider) { + m := &BuiltInIdentityProvider{ + IdentityProviderBase: *NewIdentityProviderBase(), + } + odataTypeValue := "#microsoft.graph.builtInIdentityProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBuiltInIdentityProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBuiltInIdentityProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBuiltInIdentityProvider(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BuiltInIdentityProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityProviderBase.GetFieldDeserializers() + res["identityProviderType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityProviderType(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentityProviderState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*IdentityProviderState)) + } + return nil + } + return res +} +// GetIdentityProviderType gets the identityProviderType property value. The identity provider type. For a B2B scenario, possible values: AADSignup, MicrosoftAccount, EmailOTP. Required. +func (m *BuiltInIdentityProvider) GetIdentityProviderType()(*string) { + return m.identityProviderType +} +// GetState gets the state property value. The state property +func (m *BuiltInIdentityProvider) GetState()(*IdentityProviderState) { + return m.state +} +// Serialize serializes information the current object +func (m *BuiltInIdentityProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityProviderBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("identityProviderType", m.GetIdentityProviderType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIdentityProviderType sets the identityProviderType property value. The identity provider type. For a B2B scenario, possible values: AADSignup, MicrosoftAccount, EmailOTP. Required. +func (m *BuiltInIdentityProvider) SetIdentityProviderType(value *string)() { + m.identityProviderType = value +} +// SetState sets the state property value. The state property +func (m *BuiltInIdentityProvider) SetState(value *IdentityProviderState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_response.go new file mode 100644 index 000000000..a5414420c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BuiltInIdentityProviderCollectionResponse +type BuiltInIdentityProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BuiltInIdentityProviderable +} +// NewBuiltInIdentityProviderCollectionResponse instantiates a new BuiltInIdentityProviderCollectionResponse and sets the default values. +func NewBuiltInIdentityProviderCollectionResponse()(*BuiltInIdentityProviderCollectionResponse) { + m := &BuiltInIdentityProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBuiltInIdentityProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBuiltInIdentityProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBuiltInIdentityProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BuiltInIdentityProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBuiltInIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BuiltInIdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(BuiltInIdentityProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BuiltInIdentityProviderCollectionResponse) GetValue()([]BuiltInIdentityProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *BuiltInIdentityProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BuiltInIdentityProviderCollectionResponse) SetValue(value []BuiltInIdentityProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_responseable.go new file mode 100644 index 000000000..210d761bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/built_in_identity_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BuiltInIdentityProviderCollectionResponseable +type BuiltInIdentityProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BuiltInIdentityProviderable) + SetValue(value []BuiltInIdentityProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/built_in_identity_providerable.go b/src/internal/connector/graph/betasdk/models/built_in_identity_providerable.go new file mode 100644 index 000000000..acc335841 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/built_in_identity_providerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BuiltInIdentityProviderable +type BuiltInIdentityProviderable interface { + IdentityProviderBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityProviderType()(*string) + GetState()(*IdentityProviderState) + SetIdentityProviderType(value *string)() + SetState(value *IdentityProviderState)() +} diff --git a/src/internal/connector/graph/betasdk/models/bundle.go b/src/internal/connector/graph/betasdk/models/bundle.go new file mode 100644 index 000000000..af294b94e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bundle.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Bundle +type Bundle struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If the bundle is an [album][], then the album property is included + album Albumable + // Number of children contained immediately within this container. + childCount *int32 + // The OdataType property + odataType *string +} +// NewBundle instantiates a new bundle and sets the default values. +func NewBundle()(*Bundle) { + m := &Bundle{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBundleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBundleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBundle(), 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 *Bundle) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlbum gets the album property value. If the bundle is an [album][], then the album property is included +func (m *Bundle) GetAlbum()(Albumable) { + return m.album +} +// GetChildCount gets the childCount property value. Number of children contained immediately within this container. +func (m *Bundle) GetChildCount()(*int32) { + return m.childCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Bundle) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["album"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlbumFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlbum(val.(Albumable)) + } + return nil + } + res["childCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChildCount(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Bundle) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Bundle) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("album", m.GetAlbum()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("childCount", m.GetChildCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Bundle) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlbum sets the album property value. If the bundle is an [album][], then the album property is included +func (m *Bundle) SetAlbum(value Albumable)() { + m.album = value +} +// SetChildCount sets the childCount property value. Number of children contained immediately within this container. +func (m *Bundle) SetChildCount(value *int32)() { + m.childCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Bundle) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/bundleable.go b/src/internal/connector/graph/betasdk/models/bundleable.go new file mode 100644 index 000000000..26b5559af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/bundleable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Bundleable +type Bundleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlbum()(Albumable) + GetChildCount()(*int32) + GetOdataType()(*string) + SetAlbum(value Albumable)() + SetChildCount(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow.go b/src/internal/connector/graph/betasdk/models/business_flow.go new file mode 100644 index 000000000..b925b5cfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlow provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BusinessFlow struct { + Entity + // The customData property + customData *string + // The deDuplicationId property + deDuplicationId *string + // The description property + description *string + // The displayName property + displayName *string + // The policy property + policy GovernancePolicyable + // The policyTemplateId property + policyTemplateId *string + // The recordVersion property + recordVersion *string + // The schemaId property + schemaId *string + // The settings property + settings BusinessFlowSettingsable +} +// NewBusinessFlow instantiates a new businessFlow and sets the default values. +func NewBusinessFlow()(*BusinessFlow) { + m := &BusinessFlow{ + Entity: *NewEntity(), + } + return m +} +// CreateBusinessFlowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessFlowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessFlow(), nil +} +// GetCustomData gets the customData property value. The customData property +func (m *BusinessFlow) GetCustomData()(*string) { + return m.customData +} +// GetDeDuplicationId gets the deDuplicationId property value. The deDuplicationId property +func (m *BusinessFlow) GetDeDuplicationId()(*string) { + return m.deDuplicationId +} +// GetDescription gets the description property value. The description property +func (m *BusinessFlow) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *BusinessFlow) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessFlow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomData(val) + } + return nil + } + res["deDuplicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeDuplicationId(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicy(val.(GovernancePolicyable)) + } + return nil + } + res["policyTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyTemplateId(val) + } + return nil + } + res["recordVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordVersion(val) + } + return nil + } + res["schemaId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchemaId(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBusinessFlowSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(BusinessFlowSettingsable)) + } + return nil + } + return res +} +// GetPolicy gets the policy property value. The policy property +func (m *BusinessFlow) GetPolicy()(GovernancePolicyable) { + return m.policy +} +// GetPolicyTemplateId gets the policyTemplateId property value. The policyTemplateId property +func (m *BusinessFlow) GetPolicyTemplateId()(*string) { + return m.policyTemplateId +} +// GetRecordVersion gets the recordVersion property value. The recordVersion property +func (m *BusinessFlow) GetRecordVersion()(*string) { + return m.recordVersion +} +// GetSchemaId gets the schemaId property value. The schemaId property +func (m *BusinessFlow) GetSchemaId()(*string) { + return m.schemaId +} +// GetSettings gets the settings property value. The settings property +func (m *BusinessFlow) GetSettings()(BusinessFlowSettingsable) { + return m.settings +} +// Serialize serializes information the current object +func (m *BusinessFlow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("customData", m.GetCustomData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deDuplicationId", m.GetDeDuplicationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("policy", m.GetPolicy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("policyTemplateId", m.GetPolicyTemplateId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recordVersion", m.GetRecordVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("schemaId", m.GetSchemaId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + return nil +} +// SetCustomData sets the customData property value. The customData property +func (m *BusinessFlow) SetCustomData(value *string)() { + m.customData = value +} +// SetDeDuplicationId sets the deDuplicationId property value. The deDuplicationId property +func (m *BusinessFlow) SetDeDuplicationId(value *string)() { + m.deDuplicationId = value +} +// SetDescription sets the description property value. The description property +func (m *BusinessFlow) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *BusinessFlow) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPolicy sets the policy property value. The policy property +func (m *BusinessFlow) SetPolicy(value GovernancePolicyable)() { + m.policy = value +} +// SetPolicyTemplateId sets the policyTemplateId property value. The policyTemplateId property +func (m *BusinessFlow) SetPolicyTemplateId(value *string)() { + m.policyTemplateId = value +} +// SetRecordVersion sets the recordVersion property value. The recordVersion property +func (m *BusinessFlow) SetRecordVersion(value *string)() { + m.recordVersion = value +} +// SetSchemaId sets the schemaId property value. The schemaId property +func (m *BusinessFlow) SetSchemaId(value *string)() { + m.schemaId = value +} +// SetSettings sets the settings property value. The settings property +func (m *BusinessFlow) SetSettings(value BusinessFlowSettingsable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_collection_response.go b/src/internal/connector/graph/betasdk/models/business_flow_collection_response.go new file mode 100644 index 000000000..7e034dcfa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowCollectionResponse +type BusinessFlowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BusinessFlowable +} +// NewBusinessFlowCollectionResponse instantiates a new BusinessFlowCollectionResponse and sets the default values. +func NewBusinessFlowCollectionResponse()(*BusinessFlowCollectionResponse) { + m := &BusinessFlowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBusinessFlowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessFlowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessFlowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessFlowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessFlowable, len(val)) + for i, v := range val { + res[i] = v.(BusinessFlowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BusinessFlowCollectionResponse) GetValue()([]BusinessFlowable) { + return m.value +} +// Serialize serializes information the current object +func (m *BusinessFlowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BusinessFlowCollectionResponse) SetValue(value []BusinessFlowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_collection_responseable.go b/src/internal/connector/graph/betasdk/models/business_flow_collection_responseable.go new file mode 100644 index 000000000..dc3209463 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowCollectionResponseable +type BusinessFlowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BusinessFlowable) + SetValue(value []BusinessFlowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_settings.go b/src/internal/connector/graph/betasdk/models/business_flow_settings.go new file mode 100644 index 000000000..014657194 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_settings.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowSettings +type BusinessFlowSettings struct { + AccessReviewSettings + // The durationInDays property + durationInDays *int32 +} +// NewBusinessFlowSettings instantiates a new BusinessFlowSettings and sets the default values. +func NewBusinessFlowSettings()(*BusinessFlowSettings) { + m := &BusinessFlowSettings{ + AccessReviewSettings: *NewAccessReviewSettings(), + } + odataTypeValue := "#microsoft.graph.businessFlowSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBusinessFlowSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessFlowSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessFlowSettings(), nil +} +// GetDurationInDays gets the durationInDays property value. The durationInDays property +func (m *BusinessFlowSettings) GetDurationInDays()(*int32) { + return m.durationInDays +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessFlowSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewSettings.GetFieldDeserializers() + res["durationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInDays(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BusinessFlowSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("durationInDays", m.GetDurationInDays()) + if err != nil { + return err + } + } + return nil +} +// SetDurationInDays sets the durationInDays property value. The durationInDays property +func (m *BusinessFlowSettings) SetDurationInDays(value *int32)() { + m.durationInDays = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_settingsable.go b/src/internal/connector/graph/betasdk/models/business_flow_settingsable.go new file mode 100644 index 000000000..872d74a1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowSettingsable +type BusinessFlowSettingsable interface { + AccessReviewSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDurationInDays()(*int32) + SetDurationInDays(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_template.go b/src/internal/connector/graph/betasdk/models/business_flow_template.go new file mode 100644 index 000000000..62ce5dbfd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_template.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowTemplate +type BusinessFlowTemplate struct { + Entity + // The name of the business flow template + displayName *string +} +// NewBusinessFlowTemplate instantiates a new BusinessFlowTemplate and sets the default values. +func NewBusinessFlowTemplate()(*BusinessFlowTemplate) { + m := &BusinessFlowTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateBusinessFlowTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessFlowTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessFlowTemplate(), nil +} +// GetDisplayName gets the displayName property value. The name of the business flow template +func (m *BusinessFlowTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessFlowTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *BusinessFlowTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the business flow template +func (m *BusinessFlowTemplate) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_template_collection_response.go b/src/internal/connector/graph/betasdk/models/business_flow_template_collection_response.go new file mode 100644 index 000000000..1843892fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowTemplateCollectionResponse +type BusinessFlowTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BusinessFlowTemplateable +} +// NewBusinessFlowTemplateCollectionResponse instantiates a new BusinessFlowTemplateCollectionResponse and sets the default values. +func NewBusinessFlowTemplateCollectionResponse()(*BusinessFlowTemplateCollectionResponse) { + m := &BusinessFlowTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBusinessFlowTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessFlowTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessFlowTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessFlowTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessFlowTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessFlowTemplateable, len(val)) + for i, v := range val { + res[i] = v.(BusinessFlowTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BusinessFlowTemplateCollectionResponse) GetValue()([]BusinessFlowTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *BusinessFlowTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BusinessFlowTemplateCollectionResponse) SetValue(value []BusinessFlowTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/business_flow_template_collection_responseable.go new file mode 100644 index 000000000..b4e7c15ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowTemplateCollectionResponseable +type BusinessFlowTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BusinessFlowTemplateable) + SetValue(value []BusinessFlowTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_flow_templateable.go b/src/internal/connector/graph/betasdk/models/business_flow_templateable.go new file mode 100644 index 000000000..170f8ced1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flow_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowTemplateable +type BusinessFlowTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_flowable.go b/src/internal/connector/graph/betasdk/models/business_flowable.go new file mode 100644 index 000000000..6ea0a2bfd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_flowable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessFlowable +type BusinessFlowable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomData()(*string) + GetDeDuplicationId()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetPolicy()(GovernancePolicyable) + GetPolicyTemplateId()(*string) + GetRecordVersion()(*string) + GetSchemaId()(*string) + GetSettings()(BusinessFlowSettingsable) + SetCustomData(value *string)() + SetDeDuplicationId(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetPolicy(value GovernancePolicyable)() + SetPolicyTemplateId(value *string)() + SetRecordVersion(value *string)() + SetSchemaId(value *string)() + SetSettings(value BusinessFlowSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario.go b/src/internal/connector/graph/betasdk/models/business_scenario.go new file mode 100644 index 000000000..5cb04b4ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario.go @@ -0,0 +1,247 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenario +type BusinessScenario struct { + Entity + // The identity of the user who created the scenario. + createdBy IdentitySetable + // The date and time when the scenario was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Display name of the scenario. + displayName *string + // The identity of the user who last modified the scenario. + lastModifiedBy IdentitySetable + // The date and time when the scenario was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Identifiers of applications that are authorized to work with this scenario. + ownerAppIds []string + // Planner content related to the scenario. + planner BusinessScenarioPlannerable + // Unique name of the scenario. To avoid conflicts, the recommended value for the unique name is a reverse domain name format, owned by the author of the scenario. For example, a scenario authored by Contoso.com would have a unique name that starts with com.contoso. + uniqueName *string +} +// NewBusinessScenario instantiates a new BusinessScenario and sets the default values. +func NewBusinessScenario()(*BusinessScenario) { + m := &BusinessScenario{ + Entity: *NewEntity(), + } + return m +} +// CreateBusinessScenarioFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenario(), nil +} +// GetCreatedBy gets the createdBy property value. The identity of the user who created the scenario. +func (m *BusinessScenario) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the scenario was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *BusinessScenario) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Display name of the scenario. +func (m *BusinessScenario) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenario) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["ownerAppIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOwnerAppIds(res) + } + return nil + } + res["planner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBusinessScenarioPlannerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlanner(val.(BusinessScenarioPlannerable)) + } + return nil + } + res["uniqueName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUniqueName(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The identity of the user who last modified the scenario. +func (m *BusinessScenario) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the scenario was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *BusinessScenario) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOwnerAppIds gets the ownerAppIds property value. Identifiers of applications that are authorized to work with this scenario. +func (m *BusinessScenario) GetOwnerAppIds()([]string) { + return m.ownerAppIds +} +// GetPlanner gets the planner property value. Planner content related to the scenario. +func (m *BusinessScenario) GetPlanner()(BusinessScenarioPlannerable) { + return m.planner +} +// GetUniqueName gets the uniqueName property value. Unique name of the scenario. To avoid conflicts, the recommended value for the unique name is a reverse domain name format, owned by the author of the scenario. For example, a scenario authored by Contoso.com would have a unique name that starts with com.contoso. +func (m *BusinessScenario) GetUniqueName()(*string) { + return m.uniqueName +} +// Serialize serializes information the current object +func (m *BusinessScenario) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetOwnerAppIds() != nil { + err = writer.WriteCollectionOfStringValues("ownerAppIds", m.GetOwnerAppIds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("planner", m.GetPlanner()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uniqueName", m.GetUniqueName()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The identity of the user who created the scenario. +func (m *BusinessScenario) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the scenario was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *BusinessScenario) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Display name of the scenario. +func (m *BusinessScenario) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The identity of the user who last modified the scenario. +func (m *BusinessScenario) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the scenario was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *BusinessScenario) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOwnerAppIds sets the ownerAppIds property value. Identifiers of applications that are authorized to work with this scenario. +func (m *BusinessScenario) SetOwnerAppIds(value []string)() { + m.ownerAppIds = value +} +// SetPlanner sets the planner property value. Planner content related to the scenario. +func (m *BusinessScenario) SetPlanner(value BusinessScenarioPlannerable)() { + m.planner = value +} +// SetUniqueName sets the uniqueName property value. Unique name of the scenario. To avoid conflicts, the recommended value for the unique name is a reverse domain name format, owned by the author of the scenario. For example, a scenario authored by Contoso.com would have a unique name that starts with com.contoso. +func (m *BusinessScenario) SetUniqueName(value *string)() { + m.uniqueName = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_collection_response.go b/src/internal/connector/graph/betasdk/models/business_scenario_collection_response.go new file mode 100644 index 000000000..89fd51c6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioCollectionResponse +type BusinessScenarioCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BusinessScenarioable +} +// NewBusinessScenarioCollectionResponse instantiates a new BusinessScenarioCollectionResponse and sets the default values. +func NewBusinessScenarioCollectionResponse()(*BusinessScenarioCollectionResponse) { + m := &BusinessScenarioCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBusinessScenarioCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessScenarioFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessScenarioable, len(val)) + for i, v := range val { + res[i] = v.(BusinessScenarioable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BusinessScenarioCollectionResponse) GetValue()([]BusinessScenarioable) { + return m.value +} +// Serialize serializes information the current object +func (m *BusinessScenarioCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BusinessScenarioCollectionResponse) SetValue(value []BusinessScenarioable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_collection_responseable.go b/src/internal/connector/graph/betasdk/models/business_scenario_collection_responseable.go new file mode 100644 index 000000000..7ea8e71d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioCollectionResponseable +type BusinessScenarioCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BusinessScenarioable) + SetValue(value []BusinessScenarioable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_group_target.go b/src/internal/connector/graph/betasdk/models/business_scenario_group_target.go new file mode 100644 index 000000000..a17efeb6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_group_target.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioGroupTarget +type BusinessScenarioGroupTarget struct { + BusinessScenarioTaskTargetBase + // The unique identifier for the group. + groupId *string +} +// NewBusinessScenarioGroupTarget instantiates a new BusinessScenarioGroupTarget and sets the default values. +func NewBusinessScenarioGroupTarget()(*BusinessScenarioGroupTarget) { + m := &BusinessScenarioGroupTarget{ + BusinessScenarioTaskTargetBase: *NewBusinessScenarioTaskTargetBase(), + } + odataTypeValue := "#microsoft.graph.businessScenarioGroupTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateBusinessScenarioGroupTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioGroupTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioGroupTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioGroupTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BusinessScenarioTaskTargetBase.GetFieldDeserializers() + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The unique identifier for the group. +func (m *BusinessScenarioGroupTarget) GetGroupId()(*string) { + return m.groupId +} +// Serialize serializes information the current object +func (m *BusinessScenarioGroupTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BusinessScenarioTaskTargetBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetGroupId sets the groupId property value. The unique identifier for the group. +func (m *BusinessScenarioGroupTarget) SetGroupId(value *string)() { + m.groupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_group_targetable.go b/src/internal/connector/graph/betasdk/models/business_scenario_group_targetable.go new file mode 100644 index 000000000..2922e0b4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_group_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioGroupTargetable +type BusinessScenarioGroupTargetable interface { + BusinessScenarioTaskTargetBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + SetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_plan_reference.go b/src/internal/connector/graph/betasdk/models/business_scenario_plan_reference.go new file mode 100644 index 000000000..4dfa568a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_plan_reference.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioPlanReference +type BusinessScenarioPlanReference struct { + Entity + // The title property of the plannerPlan. + title *string +} +// NewBusinessScenarioPlanReference instantiates a new BusinessScenarioPlanReference and sets the default values. +func NewBusinessScenarioPlanReference()(*BusinessScenarioPlanReference) { + m := &BusinessScenarioPlanReference{ + Entity: *NewEntity(), + } + return m +} +// CreateBusinessScenarioPlanReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioPlanReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioPlanReference(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioPlanReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetTitle gets the title property value. The title property of the plannerPlan. +func (m *BusinessScenarioPlanReference) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *BusinessScenarioPlanReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetTitle sets the title property value. The title property of the plannerPlan. +func (m *BusinessScenarioPlanReference) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_plan_referenceable.go b/src/internal/connector/graph/betasdk/models/business_scenario_plan_referenceable.go new file mode 100644 index 000000000..46dacd03d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_plan_referenceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioPlanReferenceable +type BusinessScenarioPlanReferenceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTitle()(*string) + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_planner.go b/src/internal/connector/graph/betasdk/models/business_scenario_planner.go new file mode 100644 index 000000000..f4ddabdd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_planner.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioPlanner +type BusinessScenarioPlanner struct { + Entity + // The configuration of Planner plans that will be created for the scenario. + planConfiguration PlannerPlanConfigurationable + // The configuration of Planner tasks that will be created for the scenario. + taskConfiguration PlannerTaskConfigurationable + // The Planner tasks for the scenario. + tasks []BusinessScenarioTaskable +} +// NewBusinessScenarioPlanner instantiates a new businessScenarioPlanner and sets the default values. +func NewBusinessScenarioPlanner()(*BusinessScenarioPlanner) { + m := &BusinessScenarioPlanner{ + Entity: *NewEntity(), + } + return m +} +// CreateBusinessScenarioPlannerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioPlannerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioPlanner(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioPlanner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["planConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlanConfiguration(val.(PlannerPlanConfigurationable)) + } + return nil + } + res["taskConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTaskConfiguration(val.(PlannerTaskConfigurationable)) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessScenarioTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessScenarioTaskable, len(val)) + for i, v := range val { + res[i] = v.(BusinessScenarioTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetPlanConfiguration gets the planConfiguration property value. The configuration of Planner plans that will be created for the scenario. +func (m *BusinessScenarioPlanner) GetPlanConfiguration()(PlannerPlanConfigurationable) { + return m.planConfiguration +} +// GetTaskConfiguration gets the taskConfiguration property value. The configuration of Planner tasks that will be created for the scenario. +func (m *BusinessScenarioPlanner) GetTaskConfiguration()(PlannerTaskConfigurationable) { + return m.taskConfiguration +} +// GetTasks gets the tasks property value. The Planner tasks for the scenario. +func (m *BusinessScenarioPlanner) GetTasks()([]BusinessScenarioTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *BusinessScenarioPlanner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("planConfiguration", m.GetPlanConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("taskConfiguration", m.GetTaskConfiguration()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetPlanConfiguration sets the planConfiguration property value. The configuration of Planner plans that will be created for the scenario. +func (m *BusinessScenarioPlanner) SetPlanConfiguration(value PlannerPlanConfigurationable)() { + m.planConfiguration = value +} +// SetTaskConfiguration sets the taskConfiguration property value. The configuration of Planner tasks that will be created for the scenario. +func (m *BusinessScenarioPlanner) SetTaskConfiguration(value PlannerTaskConfigurationable)() { + m.taskConfiguration = value +} +// SetTasks sets the tasks property value. The Planner tasks for the scenario. +func (m *BusinessScenarioPlanner) SetTasks(value []BusinessScenarioTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_plannerable.go b/src/internal/connector/graph/betasdk/models/business_scenario_plannerable.go new file mode 100644 index 000000000..6a0fa3aaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_plannerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioPlannerable +type BusinessScenarioPlannerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlanConfiguration()(PlannerPlanConfigurationable) + GetTaskConfiguration()(PlannerTaskConfigurationable) + GetTasks()([]BusinessScenarioTaskable) + SetPlanConfiguration(value PlannerPlanConfigurationable)() + SetTaskConfiguration(value PlannerTaskConfigurationable)() + SetTasks(value []BusinessScenarioTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_properties.go b/src/internal/connector/graph/betasdk/models/business_scenario_properties.go new file mode 100644 index 000000000..7f921ab08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_properties.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioProperties +type BusinessScenarioProperties 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 identifier for the bucketDefinition configured in the plannerPlanConfiguration for the scenario. The task will be placed in the corresponding plannerBucket in the target plan. Required. + externalBucketId *string + // The identifier for the context of the task. Context is an application controlled value, and tasks can be queried by their externalContextId. Optional. + externalContextId *string + // Application-specific identifier for the task. Every task for the same scenario must have a unique identifier specified for this property. Required. + externalObjectId *string + // Application-specific version of the task. Optional. + externalObjectVersion *string + // The OdataType property + odataType *string + // The URL to the application-specific experience for this task. Optional. + webUrl *string +} +// NewBusinessScenarioProperties instantiates a new businessScenarioProperties and sets the default values. +func NewBusinessScenarioProperties()(*BusinessScenarioProperties) { + m := &BusinessScenarioProperties{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBusinessScenarioPropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioPropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioProperties(), 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 *BusinessScenarioProperties) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalBucketId gets the externalBucketId property value. The identifier for the bucketDefinition configured in the plannerPlanConfiguration for the scenario. The task will be placed in the corresponding plannerBucket in the target plan. Required. +func (m *BusinessScenarioProperties) GetExternalBucketId()(*string) { + return m.externalBucketId +} +// GetExternalContextId gets the externalContextId property value. The identifier for the context of the task. Context is an application controlled value, and tasks can be queried by their externalContextId. Optional. +func (m *BusinessScenarioProperties) GetExternalContextId()(*string) { + return m.externalContextId +} +// GetExternalObjectId gets the externalObjectId property value. Application-specific identifier for the task. Every task for the same scenario must have a unique identifier specified for this property. Required. +func (m *BusinessScenarioProperties) GetExternalObjectId()(*string) { + return m.externalObjectId +} +// GetExternalObjectVersion gets the externalObjectVersion property value. Application-specific version of the task. Optional. +func (m *BusinessScenarioProperties) GetExternalObjectVersion()(*string) { + return m.externalObjectVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioProperties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalBucketId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalBucketId(val) + } + return nil + } + res["externalContextId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalContextId(val) + } + return nil + } + res["externalObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectId(val) + } + return nil + } + res["externalObjectVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectVersion(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["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BusinessScenarioProperties) GetOdataType()(*string) { + return m.odataType +} +// GetWebUrl gets the webUrl property value. The URL to the application-specific experience for this task. Optional. +func (m *BusinessScenarioProperties) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *BusinessScenarioProperties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("externalBucketId", m.GetExternalBucketId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalContextId", m.GetExternalContextId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalObjectId", m.GetExternalObjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalObjectVersion", m.GetExternalObjectVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *BusinessScenarioProperties) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalBucketId sets the externalBucketId property value. The identifier for the bucketDefinition configured in the plannerPlanConfiguration for the scenario. The task will be placed in the corresponding plannerBucket in the target plan. Required. +func (m *BusinessScenarioProperties) SetExternalBucketId(value *string)() { + m.externalBucketId = value +} +// SetExternalContextId sets the externalContextId property value. The identifier for the context of the task. Context is an application controlled value, and tasks can be queried by their externalContextId. Optional. +func (m *BusinessScenarioProperties) SetExternalContextId(value *string)() { + m.externalContextId = value +} +// SetExternalObjectId sets the externalObjectId property value. Application-specific identifier for the task. Every task for the same scenario must have a unique identifier specified for this property. Required. +func (m *BusinessScenarioProperties) SetExternalObjectId(value *string)() { + m.externalObjectId = value +} +// SetExternalObjectVersion sets the externalObjectVersion property value. Application-specific version of the task. Optional. +func (m *BusinessScenarioProperties) SetExternalObjectVersion(value *string)() { + m.externalObjectVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BusinessScenarioProperties) SetOdataType(value *string)() { + m.odataType = value +} +// SetWebUrl sets the webUrl property value. The URL to the application-specific experience for this task. Optional. +func (m *BusinessScenarioProperties) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_propertiesable.go b/src/internal/connector/graph/betasdk/models/business_scenario_propertiesable.go new file mode 100644 index 000000000..aa57c404c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_propertiesable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioPropertiesable +type BusinessScenarioPropertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalBucketId()(*string) + GetExternalContextId()(*string) + GetExternalObjectId()(*string) + GetExternalObjectVersion()(*string) + GetOdataType()(*string) + GetWebUrl()(*string) + SetExternalBucketId(value *string)() + SetExternalContextId(value *string)() + SetExternalObjectId(value *string)() + SetExternalObjectVersion(value *string)() + SetOdataType(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_task.go b/src/internal/connector/graph/betasdk/models/business_scenario_task.go new file mode 100644 index 000000000..be0424a33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_task.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTask +type BusinessScenarioTask struct { + PlannerTask + // Scenario-specific properties of the task. externalObjectId and externalBucketId properties must be specified when creating a task. + businessScenarioProperties BusinessScenarioPropertiesable + // Target of the task that specifies where the task should be placed. Must be specified when creating a task. + target BusinessScenarioTaskTargetBaseable +} +// NewBusinessScenarioTask instantiates a new BusinessScenarioTask and sets the default values. +func NewBusinessScenarioTask()(*BusinessScenarioTask) { + m := &BusinessScenarioTask{ + PlannerTask: *NewPlannerTask(), + } + return m +} +// CreateBusinessScenarioTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioTask(), nil +} +// GetBusinessScenarioProperties gets the businessScenarioProperties property value. Scenario-specific properties of the task. externalObjectId and externalBucketId properties must be specified when creating a task. +func (m *BusinessScenarioTask) GetBusinessScenarioProperties()(BusinessScenarioPropertiesable) { + return m.businessScenarioProperties +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerTask.GetFieldDeserializers() + res["businessScenarioProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBusinessScenarioPropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBusinessScenarioProperties(val.(BusinessScenarioPropertiesable)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBusinessScenarioTaskTargetBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(BusinessScenarioTaskTargetBaseable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. Target of the task that specifies where the task should be placed. Must be specified when creating a task. +func (m *BusinessScenarioTask) GetTarget()(BusinessScenarioTaskTargetBaseable) { + return m.target +} +// Serialize serializes information the current object +func (m *BusinessScenarioTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerTask.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("businessScenarioProperties", m.GetBusinessScenarioProperties()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetBusinessScenarioProperties sets the businessScenarioProperties property value. Scenario-specific properties of the task. externalObjectId and externalBucketId properties must be specified when creating a task. +func (m *BusinessScenarioTask) SetBusinessScenarioProperties(value BusinessScenarioPropertiesable)() { + m.businessScenarioProperties = value +} +// SetTarget sets the target property value. Target of the task that specifies where the task should be placed. Must be specified when creating a task. +func (m *BusinessScenarioTask) SetTarget(value BusinessScenarioTaskTargetBaseable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_response.go b/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_response.go new file mode 100644 index 000000000..4ab27d290 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTaskCollectionResponse +type BusinessScenarioTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []BusinessScenarioTaskable +} +// NewBusinessScenarioTaskCollectionResponse instantiates a new BusinessScenarioTaskCollectionResponse and sets the default values. +func NewBusinessScenarioTaskCollectionResponse()(*BusinessScenarioTaskCollectionResponse) { + m := &BusinessScenarioTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBusinessScenarioTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBusinessScenarioTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBusinessScenarioTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BusinessScenarioTaskable, len(val)) + for i, v := range val { + res[i] = v.(BusinessScenarioTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BusinessScenarioTaskCollectionResponse) GetValue()([]BusinessScenarioTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *BusinessScenarioTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BusinessScenarioTaskCollectionResponse) SetValue(value []BusinessScenarioTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_responseable.go new file mode 100644 index 000000000..87bb95d91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTaskCollectionResponseable +type BusinessScenarioTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]BusinessScenarioTaskable) + SetValue(value []BusinessScenarioTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_task_target_base.go b/src/internal/connector/graph/betasdk/models/business_scenario_task_target_base.go new file mode 100644 index 000000000..fd0ba4cdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_task_target_base.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTaskTargetBase +type BusinessScenarioTaskTargetBase 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 OdataType property + odataType *string + // The taskTargetKind property + taskTargetKind *PlannerTaskTargetKind +} +// NewBusinessScenarioTaskTargetBase instantiates a new businessScenarioTaskTargetBase and sets the default values. +func NewBusinessScenarioTaskTargetBase()(*BusinessScenarioTaskTargetBase) { + m := &BusinessScenarioTaskTargetBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateBusinessScenarioTaskTargetBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBusinessScenarioTaskTargetBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.businessScenarioGroupTarget": + return NewBusinessScenarioGroupTarget(), nil + } + } + } + } + return NewBusinessScenarioTaskTargetBase(), 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 *BusinessScenarioTaskTargetBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BusinessScenarioTaskTargetBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["taskTargetKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerTaskTargetKind) + if err != nil { + return err + } + if val != nil { + m.SetTaskTargetKind(val.(*PlannerTaskTargetKind)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *BusinessScenarioTaskTargetBase) GetOdataType()(*string) { + return m.odataType +} +// GetTaskTargetKind gets the taskTargetKind property value. The taskTargetKind property +func (m *BusinessScenarioTaskTargetBase) GetTaskTargetKind()(*PlannerTaskTargetKind) { + return m.taskTargetKind +} +// Serialize serializes information the current object +func (m *BusinessScenarioTaskTargetBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTaskTargetKind() != nil { + cast := (*m.GetTaskTargetKind()).String() + err := writer.WriteStringValue("taskTargetKind", &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 *BusinessScenarioTaskTargetBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *BusinessScenarioTaskTargetBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetTaskTargetKind sets the taskTargetKind property value. The taskTargetKind property +func (m *BusinessScenarioTaskTargetBase) SetTaskTargetKind(value *PlannerTaskTargetKind)() { + m.taskTargetKind = value +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_task_target_baseable.go b/src/internal/connector/graph/betasdk/models/business_scenario_task_target_baseable.go new file mode 100644 index 000000000..234c23b68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_task_target_baseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTaskTargetBaseable +type BusinessScenarioTaskTargetBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTaskTargetKind()(*PlannerTaskTargetKind) + SetOdataType(value *string)() + SetTaskTargetKind(value *PlannerTaskTargetKind)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenario_taskable.go b/src/internal/connector/graph/betasdk/models/business_scenario_taskable.go new file mode 100644 index 000000000..d7c66ad38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenario_taskable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioTaskable +type BusinessScenarioTaskable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerTaskable + GetBusinessScenarioProperties()(BusinessScenarioPropertiesable) + GetTarget()(BusinessScenarioTaskTargetBaseable) + SetBusinessScenarioProperties(value BusinessScenarioPropertiesable)() + SetTarget(value BusinessScenarioTaskTargetBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/business_scenarioable.go b/src/internal/connector/graph/betasdk/models/business_scenarioable.go new file mode 100644 index 000000000..8e563cdda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/business_scenarioable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// BusinessScenarioable +type BusinessScenarioable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOwnerAppIds()([]string) + GetPlanner()(BusinessScenarioPlannerable) + GetUniqueName()(*string) + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOwnerAppIds(value []string)() + SetPlanner(value BusinessScenarioPlannerable)() + SetUniqueName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/calculated_column.go b/src/internal/connector/graph/betasdk/models/calculated_column.go new file mode 100644 index 000000000..ea39a9340 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calculated_column.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalculatedColumn +type CalculatedColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // For dateTime output types, the format of the value. Must be one of dateOnly or dateTime. + format *string + // The formula used to compute the value for this column. + formula *string + // The OdataType property + odataType *string + // The output type used to format values in this column. Must be one of boolean, currency, dateTime, number, or text. + outputType *string +} +// NewCalculatedColumn instantiates a new calculatedColumn and sets the default values. +func NewCalculatedColumn()(*CalculatedColumn) { + m := &CalculatedColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCalculatedColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalculatedColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalculatedColumn(), 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 *CalculatedColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalculatedColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormat(val) + } + return nil + } + res["formula"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormula(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["outputType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputType(val) + } + return nil + } + return res +} +// GetFormat gets the format property value. For dateTime output types, the format of the value. Must be one of dateOnly or dateTime. +func (m *CalculatedColumn) GetFormat()(*string) { + return m.format +} +// GetFormula gets the formula property value. The formula used to compute the value for this column. +func (m *CalculatedColumn) GetFormula()(*string) { + return m.formula +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CalculatedColumn) GetOdataType()(*string) { + return m.odataType +} +// GetOutputType gets the outputType property value. The output type used to format values in this column. Must be one of boolean, currency, dateTime, number, or text. +func (m *CalculatedColumn) GetOutputType()(*string) { + return m.outputType +} +// Serialize serializes information the current object +func (m *CalculatedColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("format", m.GetFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formula", m.GetFormula()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("outputType", m.GetOutputType()) + 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 *CalculatedColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFormat sets the format property value. For dateTime output types, the format of the value. Must be one of dateOnly or dateTime. +func (m *CalculatedColumn) SetFormat(value *string)() { + m.format = value +} +// SetFormula sets the formula property value. The formula used to compute the value for this column. +func (m *CalculatedColumn) SetFormula(value *string)() { + m.formula = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CalculatedColumn) SetOdataType(value *string)() { + m.odataType = value +} +// SetOutputType sets the outputType property value. The output type used to format values in this column. Must be one of boolean, currency, dateTime, number, or text. +func (m *CalculatedColumn) SetOutputType(value *string)() { + m.outputType = value +} diff --git a/src/internal/connector/graph/betasdk/models/calculated_columnable.go b/src/internal/connector/graph/betasdk/models/calculated_columnable.go new file mode 100644 index 000000000..3dab8b513 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calculated_columnable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalculatedColumnable +type CalculatedColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFormat()(*string) + GetFormula()(*string) + GetOdataType()(*string) + GetOutputType()(*string) + SetFormat(value *string)() + SetFormula(value *string)() + SetOdataType(value *string)() + SetOutputType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar.go b/src/internal/connector/graph/betasdk/models/calendar.go new file mode 100644 index 000000000..ecc32434d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar.go @@ -0,0 +1,626 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Calendar +type Calendar struct { + Entity + // Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. + allowedOnlineMeetingProviders []OnlineMeetingProviderType + // The calendarGroup in which to create the calendar. If the user has never explicitly set a group for the calendar, this property is null. + calendarGroupId *string + // The permissions of the users with whom the calendar is shared. + calendarPermissions []CalendarPermissionable + // The calendar view for the calendar. Navigation property. Read-only. + calendarView []Eventable + // true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access, through an Outlook client or the corresponding calendarPermission resource. Read-only. + canEdit *bool + // true if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it. Read-only. + canShare *bool + // true if the user can read calendar items that have been marked private, false otherwise. This property is set through an Outlook client or the corresponding calendarPermission resource. Read-only. + canViewPrivateItems *bool + // Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. + changeKey *string + // Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor. + color *CalendarColor + // The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. + defaultOnlineMeetingProvider *OnlineMeetingProviderType + // The events in the calendar. Navigation property. Read-only. + events []Eventable + // The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. + hexColor *string + // true if this is the default calendar where new events are created by default, false otherwise. + isDefaultCalendar *bool + // Indicates whether this user calendar can be deleted from the user mailbox. + isRemovable *bool + // true if the user has shared the calendar with other users, false otherwise. Since only the user who created the calendar can share it, isShared and isSharedWithMe cannot be true for the same user. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. + isShared *bool + // true if the user has been shared this calendar, false otherwise. This property is always false for a calendar owner. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. + isSharedWithMe *bool + // Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. + isTallyingResponses *bool + // The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The calendar name. + name *string + // If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user. Read-only. + owner EmailAddressable + // The collection of single-value extended properties defined for the calendar. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable +} +// NewCalendar instantiates a new calendar and sets the default values. +func NewCalendar()(*Calendar) { + m := &Calendar{ + Entity: *NewEntity(), + } + return m +} +// CreateCalendarFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendar(), nil +} +// GetAllowedOnlineMeetingProviders gets the allowedOnlineMeetingProviders property value. Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. +func (m *Calendar) GetAllowedOnlineMeetingProviders()([]OnlineMeetingProviderType) { + return m.allowedOnlineMeetingProviders +} +// GetCalendarGroupId gets the calendarGroupId property value. The calendarGroup in which to create the calendar. If the user has never explicitly set a group for the calendar, this property is null. +func (m *Calendar) GetCalendarGroupId()(*string) { + return m.calendarGroupId +} +// GetCalendarPermissions gets the calendarPermissions property value. The permissions of the users with whom the calendar is shared. +func (m *Calendar) GetCalendarPermissions()([]CalendarPermissionable) { + return m.calendarPermissions +} +// GetCalendarView gets the calendarView property value. The calendar view for the calendar. Navigation property. Read-only. +func (m *Calendar) GetCalendarView()([]Eventable) { + return m.calendarView +} +// GetCanEdit gets the canEdit property value. true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access, through an Outlook client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) GetCanEdit()(*bool) { + return m.canEdit +} +// GetCanShare gets the canShare property value. true if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it. Read-only. +func (m *Calendar) GetCanShare()(*bool) { + return m.canShare +} +// GetCanViewPrivateItems gets the canViewPrivateItems property value. true if the user can read calendar items that have been marked private, false otherwise. This property is set through an Outlook client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) GetCanViewPrivateItems()(*bool) { + return m.canViewPrivateItems +} +// GetChangeKey gets the changeKey property value. Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. +func (m *Calendar) GetChangeKey()(*string) { + return m.changeKey +} +// GetColor gets the color property value. Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor. +func (m *Calendar) GetColor()(*CalendarColor) { + return m.color +} +// GetDefaultOnlineMeetingProvider gets the defaultOnlineMeetingProvider property value. The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. +func (m *Calendar) GetDefaultOnlineMeetingProvider()(*OnlineMeetingProviderType) { + return m.defaultOnlineMeetingProvider +} +// GetEvents gets the events property value. The events in the calendar. Navigation property. Read-only. +func (m *Calendar) GetEvents()([]Eventable) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Calendar) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedOnlineMeetingProviders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseOnlineMeetingProviderType) + if err != nil { + return err + } + if val != nil { + res := make([]OnlineMeetingProviderType, len(val)) + for i, v := range val { + res[i] = *(v.(*OnlineMeetingProviderType)) + } + m.SetAllowedOnlineMeetingProviders(res) + } + return nil + } + res["calendarGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCalendarGroupId(val) + } + return nil + } + res["calendarPermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarPermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarPermissionable, len(val)) + for i, v := range val { + res[i] = v.(CalendarPermissionable) + } + m.SetCalendarPermissions(res) + } + return nil + } + res["calendarView"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetCalendarView(res) + } + return nil + } + res["canEdit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanEdit(val) + } + return nil + } + res["canShare"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanShare(val) + } + return nil + } + res["canViewPrivateItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanViewPrivateItems(val) + } + return nil + } + res["changeKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeKey(val) + } + return nil + } + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCalendarColor) + if err != nil { + return err + } + if val != nil { + m.SetColor(val.(*CalendarColor)) + } + return nil + } + res["defaultOnlineMeetingProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingProviderType) + if err != nil { + return err + } + if val != nil { + m.SetDefaultOnlineMeetingProvider(val.(*OnlineMeetingProviderType)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetEvents(res) + } + return nil + } + res["hexColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHexColor(val) + } + return nil + } + res["isDefaultCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultCalendar(val) + } + return nil + } + res["isRemovable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemovable(val) + } + return nil + } + res["isShared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsShared(val) + } + return nil + } + res["isSharedWithMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSharedWithMe(val) + } + return nil + } + res["isTallyingResponses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTallyingResponses(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(EmailAddressable)) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + return res +} +// GetHexColor gets the hexColor property value. The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. +func (m *Calendar) GetHexColor()(*string) { + return m.hexColor +} +// GetIsDefaultCalendar gets the isDefaultCalendar property value. true if this is the default calendar where new events are created by default, false otherwise. +func (m *Calendar) GetIsDefaultCalendar()(*bool) { + return m.isDefaultCalendar +} +// GetIsRemovable gets the isRemovable property value. Indicates whether this user calendar can be deleted from the user mailbox. +func (m *Calendar) GetIsRemovable()(*bool) { + return m.isRemovable +} +// GetIsShared gets the isShared property value. true if the user has shared the calendar with other users, false otherwise. Since only the user who created the calendar can share it, isShared and isSharedWithMe cannot be true for the same user. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) GetIsShared()(*bool) { + return m.isShared +} +// GetIsSharedWithMe gets the isSharedWithMe property value. true if the user has been shared this calendar, false otherwise. This property is always false for a calendar owner. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) GetIsSharedWithMe()(*bool) { + return m.isSharedWithMe +} +// GetIsTallyingResponses gets the isTallyingResponses property value. Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. +func (m *Calendar) GetIsTallyingResponses()(*bool) { + return m.isTallyingResponses +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. +func (m *Calendar) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetName gets the name property value. The calendar name. +func (m *Calendar) GetName()(*string) { + return m.name +} +// GetOwner gets the owner property value. If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user. Read-only. +func (m *Calendar) GetOwner()(EmailAddressable) { + return m.owner +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the calendar. Read-only. Nullable. +func (m *Calendar) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// Serialize serializes information the current object +func (m *Calendar) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedOnlineMeetingProviders() != nil { + err = writer.WriteCollectionOfStringValues("allowedOnlineMeetingProviders", SerializeOnlineMeetingProviderType(m.GetAllowedOnlineMeetingProviders())) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("calendarGroupId", m.GetCalendarGroupId()) + if err != nil { + return err + } + } + if m.GetCalendarPermissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalendarPermissions())) + for i, v := range m.GetCalendarPermissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calendarPermissions", cast) + if err != nil { + return err + } + } + if m.GetCalendarView() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalendarView())) + for i, v := range m.GetCalendarView() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calendarView", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("canEdit", m.GetCanEdit()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("canShare", m.GetCanShare()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("canViewPrivateItems", m.GetCanViewPrivateItems()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("changeKey", m.GetChangeKey()) + if err != nil { + return err + } + } + if m.GetColor() != nil { + cast := (*m.GetColor()).String() + err = writer.WriteStringValue("color", &cast) + if err != nil { + return err + } + } + if m.GetDefaultOnlineMeetingProvider() != nil { + cast := (*m.GetDefaultOnlineMeetingProvider()).String() + err = writer.WriteStringValue("defaultOnlineMeetingProvider", &cast) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvents())) + for i, v := range m.GetEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("events", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hexColor", m.GetHexColor()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultCalendar", m.GetIsDefaultCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRemovable", m.GetIsRemovable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isShared", m.GetIsShared()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSharedWithMe", m.GetIsSharedWithMe()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTallyingResponses", m.GetIsTallyingResponses()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowedOnlineMeetingProviders sets the allowedOnlineMeetingProviders property value. Represent the online meeting service providers that can be used to create online meetings in this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. +func (m *Calendar) SetAllowedOnlineMeetingProviders(value []OnlineMeetingProviderType)() { + m.allowedOnlineMeetingProviders = value +} +// SetCalendarGroupId sets the calendarGroupId property value. The calendarGroup in which to create the calendar. If the user has never explicitly set a group for the calendar, this property is null. +func (m *Calendar) SetCalendarGroupId(value *string)() { + m.calendarGroupId = value +} +// SetCalendarPermissions sets the calendarPermissions property value. The permissions of the users with whom the calendar is shared. +func (m *Calendar) SetCalendarPermissions(value []CalendarPermissionable)() { + m.calendarPermissions = value +} +// SetCalendarView sets the calendarView property value. The calendar view for the calendar. Navigation property. Read-only. +func (m *Calendar) SetCalendarView(value []Eventable)() { + m.calendarView = value +} +// SetCanEdit sets the canEdit property value. true if the user can write to the calendar, false otherwise. This property is true for the user who created the calendar. This property is also true for a user who has been shared a calendar and granted write access, through an Outlook client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) SetCanEdit(value *bool)() { + m.canEdit = value +} +// SetCanShare sets the canShare property value. true if the user has the permission to share the calendar, false otherwise. Only the user who created the calendar can share it. Read-only. +func (m *Calendar) SetCanShare(value *bool)() { + m.canShare = value +} +// SetCanViewPrivateItems sets the canViewPrivateItems property value. true if the user can read calendar items that have been marked private, false otherwise. This property is set through an Outlook client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) SetCanViewPrivateItems(value *bool)() { + m.canViewPrivateItems = value +} +// SetChangeKey sets the changeKey property value. Identifies the version of the calendar object. Every time the calendar is changed, changeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. +func (m *Calendar) SetChangeKey(value *string)() { + m.changeKey = value +} +// SetColor sets the color property value. Specifies the color theme to distinguish the calendar from other calendars in a UI. The property values are: auto, lightBlue, lightGreen, lightOrange, lightGray, lightYellow, lightTeal, lightPink, lightBrown, lightRed, maxColor. +func (m *Calendar) SetColor(value *CalendarColor)() { + m.color = value +} +// SetDefaultOnlineMeetingProvider sets the defaultOnlineMeetingProvider property value. The default online meeting provider for meetings sent from this calendar. Possible values are: unknown, skypeForBusiness, skypeForConsumer, teamsForBusiness. +func (m *Calendar) SetDefaultOnlineMeetingProvider(value *OnlineMeetingProviderType)() { + m.defaultOnlineMeetingProvider = value +} +// SetEvents sets the events property value. The events in the calendar. Navigation property. Read-only. +func (m *Calendar) SetEvents(value []Eventable)() { + m.events = value +} +// SetHexColor sets the hexColor property value. The calendar color, expressed in a hex color code of three hexadecimal values, each ranging from 00 to FF and representing the red, green, or blue components of the color in the RGB color space. If the user has never explicitly set a color for the calendar, this property is empty. +func (m *Calendar) SetHexColor(value *string)() { + m.hexColor = value +} +// SetIsDefaultCalendar sets the isDefaultCalendar property value. true if this is the default calendar where new events are created by default, false otherwise. +func (m *Calendar) SetIsDefaultCalendar(value *bool)() { + m.isDefaultCalendar = value +} +// SetIsRemovable sets the isRemovable property value. Indicates whether this user calendar can be deleted from the user mailbox. +func (m *Calendar) SetIsRemovable(value *bool)() { + m.isRemovable = value +} +// SetIsShared sets the isShared property value. true if the user has shared the calendar with other users, false otherwise. Since only the user who created the calendar can share it, isShared and isSharedWithMe cannot be true for the same user. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) SetIsShared(value *bool)() { + m.isShared = value +} +// SetIsSharedWithMe sets the isSharedWithMe property value. true if the user has been shared this calendar, false otherwise. This property is always false for a calendar owner. This property is set when sharing is initiated in an Outlook client, and can be reset when the sharing is cancelled through the client or the corresponding calendarPermission resource. Read-only. +func (m *Calendar) SetIsSharedWithMe(value *bool)() { + m.isSharedWithMe = value +} +// SetIsTallyingResponses sets the isTallyingResponses property value. Indicates whether this user calendar supports tracking of meeting responses. Only meeting invites sent from users' primary calendars support tracking of meeting responses. +func (m *Calendar) SetIsTallyingResponses(value *bool)() { + m.isTallyingResponses = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the calendar. Read-only. Nullable. +func (m *Calendar) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetName sets the name property value. The calendar name. +func (m *Calendar) SetName(value *string)() { + m.name = value +} +// SetOwner sets the owner property value. If set, this represents the user who created or added the calendar. For a calendar that the user created or added, the owner property is set to the user. For a calendar shared with the user, the owner property is set to the person who shared that calendar with the user. Read-only. +func (m *Calendar) SetOwner(value EmailAddressable)() { + m.owner = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the calendar. Read-only. Nullable. +func (m *Calendar) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_collection_response.go b/src/internal/connector/graph/betasdk/models/calendar_collection_response.go new file mode 100644 index 000000000..dabfccd94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarCollectionResponse +type CalendarCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Calendarable +} +// NewCalendarCollectionResponse instantiates a new CalendarCollectionResponse and sets the default values. +func NewCalendarCollectionResponse()(*CalendarCollectionResponse) { + m := &CalendarCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCalendarCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Calendarable, len(val)) + for i, v := range val { + res[i] = v.(Calendarable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CalendarCollectionResponse) GetValue()([]Calendarable) { + return m.value +} +// Serialize serializes information the current object +func (m *CalendarCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CalendarCollectionResponse) SetValue(value []Calendarable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_collection_responseable.go b/src/internal/connector/graph/betasdk/models/calendar_collection_responseable.go new file mode 100644 index 000000000..6164120ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarCollectionResponseable +type CalendarCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Calendarable) + SetValue(value []Calendarable)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_color.go b/src/internal/connector/graph/betasdk/models/calendar_color.go new file mode 100644 index 000000000..3936e878a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_color.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarColor int + +const ( + AUTO_CALENDARCOLOR CalendarColor = iota + LIGHTBLUE_CALENDARCOLOR + LIGHTGREEN_CALENDARCOLOR + LIGHTORANGE_CALENDARCOLOR + LIGHTGRAY_CALENDARCOLOR + LIGHTYELLOW_CALENDARCOLOR + LIGHTTEAL_CALENDARCOLOR + LIGHTPINK_CALENDARCOLOR + LIGHTBROWN_CALENDARCOLOR + LIGHTRED_CALENDARCOLOR + MAXCOLOR_CALENDARCOLOR +) + +func (i CalendarColor) String() string { + return []string{"auto", "lightBlue", "lightGreen", "lightOrange", "lightGray", "lightYellow", "lightTeal", "lightPink", "lightBrown", "lightRed", "maxColor"}[i] +} +func ParseCalendarColor(v string) (interface{}, error) { + result := AUTO_CALENDARCOLOR + switch v { + case "auto": + result = AUTO_CALENDARCOLOR + case "lightBlue": + result = LIGHTBLUE_CALENDARCOLOR + case "lightGreen": + result = LIGHTGREEN_CALENDARCOLOR + case "lightOrange": + result = LIGHTORANGE_CALENDARCOLOR + case "lightGray": + result = LIGHTGRAY_CALENDARCOLOR + case "lightYellow": + result = LIGHTYELLOW_CALENDARCOLOR + case "lightTeal": + result = LIGHTTEAL_CALENDARCOLOR + case "lightPink": + result = LIGHTPINK_CALENDARCOLOR + case "lightBrown": + result = LIGHTBROWN_CALENDARCOLOR + case "lightRed": + result = LIGHTRED_CALENDARCOLOR + case "maxColor": + result = MAXCOLOR_CALENDARCOLOR + default: + return 0, errors.New("Unknown CalendarColor value: " + v) + } + return &result, nil +} +func SerializeCalendarColor(values []CalendarColor) []string { + 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/calendar_group.go b/src/internal/connector/graph/betasdk/models/calendar_group.go new file mode 100644 index 000000000..1aaac925a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_group.go @@ -0,0 +1,147 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarGroup struct { + Entity + // The calendars in the calendar group. Navigation property. Read-only. Nullable. + calendars []Calendarable + // Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. + changeKey *string + // The class identifier. Read-only. + classId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The group name. + name *string +} +// NewCalendarGroup instantiates a new calendarGroup and sets the default values. +func NewCalendarGroup()(*CalendarGroup) { + m := &CalendarGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateCalendarGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarGroup(), nil +} +// GetCalendars gets the calendars property value. The calendars in the calendar group. Navigation property. Read-only. Nullable. +func (m *CalendarGroup) GetCalendars()([]Calendarable) { + return m.calendars +} +// GetChangeKey gets the changeKey property value. Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. +func (m *CalendarGroup) GetChangeKey()(*string) { + return m.changeKey +} +// GetClassId gets the classId property value. The class identifier. Read-only. +func (m *CalendarGroup) GetClassId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.classId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["calendars"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Calendarable, len(val)) + for i, v := range val { + res[i] = v.(Calendarable) + } + m.SetCalendars(res) + } + return nil + } + res["changeKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeKey(val) + } + return nil + } + res["classId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetClassId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The group name. +func (m *CalendarGroup) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *CalendarGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCalendars() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalendars())) + for i, v := range m.GetCalendars() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calendars", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("changeKey", m.GetChangeKey()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("classId", m.GetClassId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetCalendars sets the calendars property value. The calendars in the calendar group. Navigation property. Read-only. Nullable. +func (m *CalendarGroup) SetCalendars(value []Calendarable)() { + m.calendars = value +} +// SetChangeKey sets the changeKey property value. Identifies the version of the calendar group. Every time the calendar group is changed, ChangeKey changes as well. This allows Exchange to apply changes to the correct version of the object. Read-only. +func (m *CalendarGroup) SetChangeKey(value *string)() { + m.changeKey = value +} +// SetClassId sets the classId property value. The class identifier. Read-only. +func (m *CalendarGroup) SetClassId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.classId = value +} +// SetName sets the name property value. The group name. +func (m *CalendarGroup) SetName(value *string)() { + m.name = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_group_collection_response.go b/src/internal/connector/graph/betasdk/models/calendar_group_collection_response.go new file mode 100644 index 000000000..c97779dbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarGroupCollectionResponse +type CalendarGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CalendarGroupable +} +// NewCalendarGroupCollectionResponse instantiates a new CalendarGroupCollectionResponse and sets the default values. +func NewCalendarGroupCollectionResponse()(*CalendarGroupCollectionResponse) { + m := &CalendarGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCalendarGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarGroupable, len(val)) + for i, v := range val { + res[i] = v.(CalendarGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CalendarGroupCollectionResponse) GetValue()([]CalendarGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *CalendarGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CalendarGroupCollectionResponse) SetValue(value []CalendarGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/calendar_group_collection_responseable.go new file mode 100644 index 000000000..3cc8fd027 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarGroupCollectionResponseable +type CalendarGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CalendarGroupable) + SetValue(value []CalendarGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_groupable.go b/src/internal/connector/graph/betasdk/models/calendar_groupable.go new file mode 100644 index 000000000..e6f270315 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_groupable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarGroupable +type CalendarGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalendars()([]Calendarable) + GetChangeKey()(*string) + GetClassId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetName()(*string) + SetCalendars(value []Calendarable)() + SetChangeKey(value *string)() + SetClassId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_permission.go b/src/internal/connector/graph/betasdk/models/calendar_permission.go new file mode 100644 index 000000000..a8fd505a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_permission.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarPermission provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarPermission struct { + Entity + // List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom. + allowedRoles []CalendarRoleType + // Represents a sharee or delegate who has access to the calendar. For the 'My Organization' sharee, the address property is null. Read-only. + emailAddress EmailAddressable + // True if the user in context (sharee or delegate) is inside the same organization as the calendar owner. + isInsideOrganization *bool + // True if the user can be removed from the list of sharees or delegates for the specified calendar, false otherwise. The 'My organization' user determines the permissions other people within your organization have to the given calendar. You cannot remove 'My organization' as a sharee to a calendar. + isRemovable *bool + // Current permission level of the calendar sharee or delegate. + role *CalendarRoleType +} +// NewCalendarPermission instantiates a new calendarPermission and sets the default values. +func NewCalendarPermission()(*CalendarPermission) { + m := &CalendarPermission{ + Entity: *NewEntity(), + } + return m +} +// CreateCalendarPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarPermission(), nil +} +// GetAllowedRoles gets the allowedRoles property value. List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom. +func (m *CalendarPermission) GetAllowedRoles()([]CalendarRoleType) { + return m.allowedRoles +} +// GetEmailAddress gets the emailAddress property value. Represents a sharee or delegate who has access to the calendar. For the 'My Organization' sharee, the address property is null. Read-only. +func (m *CalendarPermission) GetEmailAddress()(EmailAddressable) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseCalendarRoleType) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarRoleType, len(val)) + for i, v := range val { + res[i] = *(v.(*CalendarRoleType)) + } + m.SetAllowedRoles(res) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val.(EmailAddressable)) + } + return nil + } + res["isInsideOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInsideOrganization(val) + } + return nil + } + res["isRemovable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemovable(val) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCalendarRoleType) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*CalendarRoleType)) + } + return nil + } + return res +} +// GetIsInsideOrganization gets the isInsideOrganization property value. True if the user in context (sharee or delegate) is inside the same organization as the calendar owner. +func (m *CalendarPermission) GetIsInsideOrganization()(*bool) { + return m.isInsideOrganization +} +// GetIsRemovable gets the isRemovable property value. True if the user can be removed from the list of sharees or delegates for the specified calendar, false otherwise. The 'My organization' user determines the permissions other people within your organization have to the given calendar. You cannot remove 'My organization' as a sharee to a calendar. +func (m *CalendarPermission) GetIsRemovable()(*bool) { + return m.isRemovable +} +// GetRole gets the role property value. Current permission level of the calendar sharee or delegate. +func (m *CalendarPermission) GetRole()(*CalendarRoleType) { + return m.role +} +// Serialize serializes information the current object +func (m *CalendarPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedRoles() != nil { + err = writer.WriteCollectionOfStringValues("allowedRoles", SerializeCalendarRoleType(m.GetAllowedRoles())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isInsideOrganization", m.GetIsInsideOrganization()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRemovable", m.GetIsRemovable()) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowedRoles sets the allowedRoles property value. List of allowed sharing or delegating permission levels for the calendar. Possible values are: none, freeBusyRead, limitedRead, read, write, delegateWithoutPrivateEventAccess, delegateWithPrivateEventAccess, custom. +func (m *CalendarPermission) SetAllowedRoles(value []CalendarRoleType)() { + m.allowedRoles = value +} +// SetEmailAddress sets the emailAddress property value. Represents a sharee or delegate who has access to the calendar. For the 'My Organization' sharee, the address property is null. Read-only. +func (m *CalendarPermission) SetEmailAddress(value EmailAddressable)() { + m.emailAddress = value +} +// SetIsInsideOrganization sets the isInsideOrganization property value. True if the user in context (sharee or delegate) is inside the same organization as the calendar owner. +func (m *CalendarPermission) SetIsInsideOrganization(value *bool)() { + m.isInsideOrganization = value +} +// SetIsRemovable sets the isRemovable property value. True if the user can be removed from the list of sharees or delegates for the specified calendar, false otherwise. The 'My organization' user determines the permissions other people within your organization have to the given calendar. You cannot remove 'My organization' as a sharee to a calendar. +func (m *CalendarPermission) SetIsRemovable(value *bool)() { + m.isRemovable = value +} +// SetRole sets the role property value. Current permission level of the calendar sharee or delegate. +func (m *CalendarPermission) SetRole(value *CalendarRoleType)() { + m.role = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_permission_collection_response.go b/src/internal/connector/graph/betasdk/models/calendar_permission_collection_response.go new file mode 100644 index 000000000..e8fa4261c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_permission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarPermissionCollectionResponse +type CalendarPermissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CalendarPermissionable +} +// NewCalendarPermissionCollectionResponse instantiates a new CalendarPermissionCollectionResponse and sets the default values. +func NewCalendarPermissionCollectionResponse()(*CalendarPermissionCollectionResponse) { + m := &CalendarPermissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCalendarPermissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarPermissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarPermissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarPermissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarPermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarPermissionable, len(val)) + for i, v := range val { + res[i] = v.(CalendarPermissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CalendarPermissionCollectionResponse) GetValue()([]CalendarPermissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CalendarPermissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CalendarPermissionCollectionResponse) SetValue(value []CalendarPermissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_permission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/calendar_permission_collection_responseable.go new file mode 100644 index 000000000..7e1de9578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_permission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarPermissionCollectionResponseable +type CalendarPermissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CalendarPermissionable) + SetValue(value []CalendarPermissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_permissionable.go b/src/internal/connector/graph/betasdk/models/calendar_permissionable.go new file mode 100644 index 000000000..b3e74d8ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_permissionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarPermissionable +type CalendarPermissionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedRoles()([]CalendarRoleType) + GetEmailAddress()(EmailAddressable) + GetIsInsideOrganization()(*bool) + GetIsRemovable()(*bool) + GetRole()(*CalendarRoleType) + SetAllowedRoles(value []CalendarRoleType)() + SetEmailAddress(value EmailAddressable)() + SetIsInsideOrganization(value *bool)() + SetIsRemovable(value *bool)() + SetRole(value *CalendarRoleType)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_role_type.go b/src/internal/connector/graph/betasdk/models/calendar_role_type.go new file mode 100644 index 000000000..6d9ca5b68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_role_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarRoleType int + +const ( + NONE_CALENDARROLETYPE CalendarRoleType = iota + FREEBUSYREAD_CALENDARROLETYPE + LIMITEDREAD_CALENDARROLETYPE + READ_CALENDARROLETYPE + WRITE_CALENDARROLETYPE + DELEGATEWITHOUTPRIVATEEVENTACCESS_CALENDARROLETYPE + DELEGATEWITHPRIVATEEVENTACCESS_CALENDARROLETYPE + CUSTOM_CALENDARROLETYPE +) + +func (i CalendarRoleType) String() string { + return []string{"none", "freeBusyRead", "limitedRead", "read", "write", "delegateWithoutPrivateEventAccess", "delegateWithPrivateEventAccess", "custom"}[i] +} +func ParseCalendarRoleType(v string) (interface{}, error) { + result := NONE_CALENDARROLETYPE + switch v { + case "none": + result = NONE_CALENDARROLETYPE + case "freeBusyRead": + result = FREEBUSYREAD_CALENDARROLETYPE + case "limitedRead": + result = LIMITEDREAD_CALENDARROLETYPE + case "read": + result = READ_CALENDARROLETYPE + case "write": + result = WRITE_CALENDARROLETYPE + case "delegateWithoutPrivateEventAccess": + result = DELEGATEWITHOUTPRIVATEEVENTACCESS_CALENDARROLETYPE + case "delegateWithPrivateEventAccess": + result = DELEGATEWITHPRIVATEEVENTACCESS_CALENDARROLETYPE + case "custom": + result = CUSTOM_CALENDARROLETYPE + default: + return 0, errors.New("Unknown CalendarRoleType value: " + v) + } + return &result, nil +} +func SerializeCalendarRoleType(values []CalendarRoleType) []string { + 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/calendar_sharing_action.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_action.go new file mode 100644 index 000000000..afe78ef3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarSharingAction int + +const ( + ACCEPT_CALENDARSHARINGACTION CalendarSharingAction = iota + ACCEPTANDVIEWCALENDAR_CALENDARSHARINGACTION + VIEWCALENDAR_CALENDARSHARINGACTION + ADDTHISCALENDAR_CALENDARSHARINGACTION +) + +func (i CalendarSharingAction) String() string { + return []string{"accept", "acceptAndViewCalendar", "viewCalendar", "addThisCalendar"}[i] +} +func ParseCalendarSharingAction(v string) (interface{}, error) { + result := ACCEPT_CALENDARSHARINGACTION + switch v { + case "accept": + result = ACCEPT_CALENDARSHARINGACTION + case "acceptAndViewCalendar": + result = ACCEPTANDVIEWCALENDAR_CALENDARSHARINGACTION + case "viewCalendar": + result = VIEWCALENDAR_CALENDARSHARINGACTION + case "addThisCalendar": + result = ADDTHISCALENDAR_CALENDARSHARINGACTION + default: + return 0, errors.New("Unknown CalendarSharingAction value: " + v) + } + return &result, nil +} +func SerializeCalendarSharingAction(values []CalendarSharingAction) []string { + 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/calendar_sharing_action_importance.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_action_importance.go new file mode 100644 index 000000000..6dc745e0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_action_importance.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarSharingActionImportance int + +const ( + PRIMARY_CALENDARSHARINGACTIONIMPORTANCE CalendarSharingActionImportance = iota + SECONDARY_CALENDARSHARINGACTIONIMPORTANCE +) + +func (i CalendarSharingActionImportance) String() string { + return []string{"primary", "secondary"}[i] +} +func ParseCalendarSharingActionImportance(v string) (interface{}, error) { + result := PRIMARY_CALENDARSHARINGACTIONIMPORTANCE + switch v { + case "primary": + result = PRIMARY_CALENDARSHARINGACTIONIMPORTANCE + case "secondary": + result = SECONDARY_CALENDARSHARINGACTIONIMPORTANCE + default: + return 0, errors.New("Unknown CalendarSharingActionImportance value: " + v) + } + return &result, nil +} +func SerializeCalendarSharingActionImportance(values []CalendarSharingActionImportance) []string { + 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/calendar_sharing_action_type.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_action_type.go new file mode 100644 index 000000000..b332feabc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_action_type.go @@ -0,0 +1,31 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CalendarSharingActionType int + +const ( + ACCEPT_CALENDARSHARINGACTIONTYPE CalendarSharingActionType = iota +) + +func (i CalendarSharingActionType) String() string { + return []string{"accept"}[i] +} +func ParseCalendarSharingActionType(v string) (interface{}, error) { + result := ACCEPT_CALENDARSHARINGACTIONTYPE + switch v { + case "accept": + result = ACCEPT_CALENDARSHARINGACTIONTYPE + default: + return 0, errors.New("Unknown CalendarSharingActionType value: " + v) + } + return &result, nil +} +func SerializeCalendarSharingActionType(values []CalendarSharingActionType) []string { + 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/calendar_sharing_message.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message.go new file mode 100644 index 000000000..79fcc2895 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message.go @@ -0,0 +1,148 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessage +type CalendarSharingMessage struct { + Message + // The canAccept property + canAccept *bool + // The sharingMessageAction property + sharingMessageAction CalendarSharingMessageActionable + // The sharingMessageActions property + sharingMessageActions []CalendarSharingMessageActionable + // The suggestedCalendarName property + suggestedCalendarName *string +} +// NewCalendarSharingMessage instantiates a new CalendarSharingMessage and sets the default values. +func NewCalendarSharingMessage()(*CalendarSharingMessage) { + m := &CalendarSharingMessage{ + Message: *NewMessage(), + } + odataTypeValue := "#microsoft.graph.calendarSharingMessage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCalendarSharingMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarSharingMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarSharingMessage(), nil +} +// GetCanAccept gets the canAccept property value. The canAccept property +func (m *CalendarSharingMessage) GetCanAccept()(*bool) { + return m.canAccept +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarSharingMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Message.GetFieldDeserializers() + res["canAccept"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCanAccept(val) + } + return nil + } + res["sharingMessageAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCalendarSharingMessageActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharingMessageAction(val.(CalendarSharingMessageActionable)) + } + return nil + } + res["sharingMessageActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarSharingMessageActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarSharingMessageActionable, len(val)) + for i, v := range val { + res[i] = v.(CalendarSharingMessageActionable) + } + m.SetSharingMessageActions(res) + } + return nil + } + res["suggestedCalendarName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSuggestedCalendarName(val) + } + return nil + } + return res +} +// GetSharingMessageAction gets the sharingMessageAction property value. The sharingMessageAction property +func (m *CalendarSharingMessage) GetSharingMessageAction()(CalendarSharingMessageActionable) { + return m.sharingMessageAction +} +// GetSharingMessageActions gets the sharingMessageActions property value. The sharingMessageActions property +func (m *CalendarSharingMessage) GetSharingMessageActions()([]CalendarSharingMessageActionable) { + return m.sharingMessageActions +} +// GetSuggestedCalendarName gets the suggestedCalendarName property value. The suggestedCalendarName property +func (m *CalendarSharingMessage) GetSuggestedCalendarName()(*string) { + return m.suggestedCalendarName +} +// Serialize serializes information the current object +func (m *CalendarSharingMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Message.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("canAccept", m.GetCanAccept()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharingMessageAction", m.GetSharingMessageAction()) + if err != nil { + return err + } + } + if m.GetSharingMessageActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharingMessageActions())) + for i, v := range m.GetSharingMessageActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharingMessageActions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("suggestedCalendarName", m.GetSuggestedCalendarName()) + if err != nil { + return err + } + } + return nil +} +// SetCanAccept sets the canAccept property value. The canAccept property +func (m *CalendarSharingMessage) SetCanAccept(value *bool)() { + m.canAccept = value +} +// SetSharingMessageAction sets the sharingMessageAction property value. The sharingMessageAction property +func (m *CalendarSharingMessage) SetSharingMessageAction(value CalendarSharingMessageActionable)() { + m.sharingMessageAction = value +} +// SetSharingMessageActions sets the sharingMessageActions property value. The sharingMessageActions property +func (m *CalendarSharingMessage) SetSharingMessageActions(value []CalendarSharingMessageActionable)() { + m.sharingMessageActions = value +} +// SetSuggestedCalendarName sets the suggestedCalendarName property value. The suggestedCalendarName property +func (m *CalendarSharingMessage) SetSuggestedCalendarName(value *string)() { + m.suggestedCalendarName = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action.go new file mode 100644 index 000000000..bad63cdcb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageAction +type CalendarSharingMessageAction struct { + // The action property + action *CalendarSharingAction + // The actionType property + actionType *CalendarSharingActionType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The importance property + importance *CalendarSharingActionImportance + // The OdataType property + odataType *string +} +// NewCalendarSharingMessageAction instantiates a new calendarSharingMessageAction and sets the default values. +func NewCalendarSharingMessageAction()(*CalendarSharingMessageAction) { + m := &CalendarSharingMessageAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCalendarSharingMessageActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarSharingMessageActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarSharingMessageAction(), nil +} +// GetAction gets the action property value. The action property +func (m *CalendarSharingMessageAction) GetAction()(*CalendarSharingAction) { + return m.action +} +// GetActionType gets the actionType property value. The actionType property +func (m *CalendarSharingMessageAction) GetActionType()(*CalendarSharingActionType) { + return m.actionType +} +// 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 *CalendarSharingMessageAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarSharingMessageAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCalendarSharingAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*CalendarSharingAction)) + } + return nil + } + res["actionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCalendarSharingActionType) + if err != nil { + return err + } + if val != nil { + m.SetActionType(val.(*CalendarSharingActionType)) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCalendarSharingActionImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*CalendarSharingActionImportance)) + } + 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 + } + return res +} +// GetImportance gets the importance property value. The importance property +func (m *CalendarSharingMessageAction) GetImportance()(*CalendarSharingActionImportance) { + return m.importance +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CalendarSharingMessageAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CalendarSharingMessageAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + if m.GetActionType() != nil { + cast := (*m.GetActionType()).String() + err := writer.WriteStringValue("actionType", &cast) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err := writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *CalendarSharingMessageAction) SetAction(value *CalendarSharingAction)() { + m.action = value +} +// SetActionType sets the actionType property value. The actionType property +func (m *CalendarSharingMessageAction) SetActionType(value *CalendarSharingActionType)() { + m.actionType = value +} +// 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 *CalendarSharingMessageAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetImportance sets the importance property value. The importance property +func (m *CalendarSharingMessageAction) SetImportance(value *CalendarSharingActionImportance)() { + m.importance = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CalendarSharingMessageAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_response.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_response.go new file mode 100644 index 000000000..7c6258b55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageActionCollectionResponse +type CalendarSharingMessageActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CalendarSharingMessageActionable +} +// NewCalendarSharingMessageActionCollectionResponse instantiates a new CalendarSharingMessageActionCollectionResponse and sets the default values. +func NewCalendarSharingMessageActionCollectionResponse()(*CalendarSharingMessageActionCollectionResponse) { + m := &CalendarSharingMessageActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCalendarSharingMessageActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarSharingMessageActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarSharingMessageActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarSharingMessageActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarSharingMessageActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarSharingMessageActionable, len(val)) + for i, v := range val { + res[i] = v.(CalendarSharingMessageActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CalendarSharingMessageActionCollectionResponse) GetValue()([]CalendarSharingMessageActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CalendarSharingMessageActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CalendarSharingMessageActionCollectionResponse) SetValue(value []CalendarSharingMessageActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_responseable.go new file mode 100644 index 000000000..0682a97f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageActionCollectionResponseable +type CalendarSharingMessageActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CalendarSharingMessageActionable) + SetValue(value []CalendarSharingMessageActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_actionable.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_actionable.go new file mode 100644 index 000000000..95a4e4a55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_actionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageActionable +type CalendarSharingMessageActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*CalendarSharingAction) + GetActionType()(*CalendarSharingActionType) + GetImportance()(*CalendarSharingActionImportance) + GetOdataType()(*string) + SetAction(value *CalendarSharingAction)() + SetActionType(value *CalendarSharingActionType)() + SetImportance(value *CalendarSharingActionImportance)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_response.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_response.go new file mode 100644 index 000000000..442b2bad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageCollectionResponse +type CalendarSharingMessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CalendarSharingMessageable +} +// NewCalendarSharingMessageCollectionResponse instantiates a new CalendarSharingMessageCollectionResponse and sets the default values. +func NewCalendarSharingMessageCollectionResponse()(*CalendarSharingMessageCollectionResponse) { + m := &CalendarSharingMessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCalendarSharingMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCalendarSharingMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCalendarSharingMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CalendarSharingMessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCalendarSharingMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CalendarSharingMessageable, len(val)) + for i, v := range val { + res[i] = v.(CalendarSharingMessageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CalendarSharingMessageCollectionResponse) GetValue()([]CalendarSharingMessageable) { + return m.value +} +// Serialize serializes information the current object +func (m *CalendarSharingMessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CalendarSharingMessageCollectionResponse) SetValue(value []CalendarSharingMessageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_responseable.go new file mode 100644 index 000000000..948188066 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageCollectionResponseable +type CalendarSharingMessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CalendarSharingMessageable) + SetValue(value []CalendarSharingMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendar_sharing_messageable.go b/src/internal/connector/graph/betasdk/models/calendar_sharing_messageable.go new file mode 100644 index 000000000..7c3baae63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendar_sharing_messageable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CalendarSharingMessageable +type CalendarSharingMessageable interface { + Messageable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanAccept()(*bool) + GetSharingMessageAction()(CalendarSharingMessageActionable) + GetSharingMessageActions()([]CalendarSharingMessageActionable) + GetSuggestedCalendarName()(*string) + SetCanAccept(value *bool)() + SetSharingMessageAction(value CalendarSharingMessageActionable)() + SetSharingMessageActions(value []CalendarSharingMessageActionable)() + SetSuggestedCalendarName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/calendarable.go b/src/internal/connector/graph/betasdk/models/calendarable.go new file mode 100644 index 000000000..afc0e553a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/calendarable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Calendarable +type Calendarable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedOnlineMeetingProviders()([]OnlineMeetingProviderType) + GetCalendarGroupId()(*string) + GetCalendarPermissions()([]CalendarPermissionable) + GetCalendarView()([]Eventable) + GetCanEdit()(*bool) + GetCanShare()(*bool) + GetCanViewPrivateItems()(*bool) + GetChangeKey()(*string) + GetColor()(*CalendarColor) + GetDefaultOnlineMeetingProvider()(*OnlineMeetingProviderType) + GetEvents()([]Eventable) + GetHexColor()(*string) + GetIsDefaultCalendar()(*bool) + GetIsRemovable()(*bool) + GetIsShared()(*bool) + GetIsSharedWithMe()(*bool) + GetIsTallyingResponses()(*bool) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetName()(*string) + GetOwner()(EmailAddressable) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + SetAllowedOnlineMeetingProviders(value []OnlineMeetingProviderType)() + SetCalendarGroupId(value *string)() + SetCalendarPermissions(value []CalendarPermissionable)() + SetCalendarView(value []Eventable)() + SetCanEdit(value *bool)() + SetCanShare(value *bool)() + SetCanViewPrivateItems(value *bool)() + SetChangeKey(value *string)() + SetColor(value *CalendarColor)() + SetDefaultOnlineMeetingProvider(value *OnlineMeetingProviderType)() + SetEvents(value []Eventable)() + SetHexColor(value *string)() + SetIsDefaultCalendar(value *bool)() + SetIsRemovable(value *bool)() + SetIsShared(value *bool)() + SetIsSharedWithMe(value *bool)() + SetIsTallyingResponses(value *bool)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetName(value *string)() + SetOwner(value EmailAddressable)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call.go b/src/internal/connector/graph/betasdk/models/call.go new file mode 100644 index 000000000..071a67f98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call.go @@ -0,0 +1,876 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Call provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Call struct { + Entity + // The list of active modalities. Possible values are: unknown, audio, video, videoBasedScreenSharing, data. Read-only. + activeModalities []Modality + // The participant that answered the call. Read-only. + answeredBy ParticipantInfoable + // The audioRoutingGroups property + audioRoutingGroups []AudioRoutingGroupable + // The callback URL on which callbacks will be delivered. Must be https. + callbackUri *string + // A unique identifier for all the participant calls in a conference or a unique identifier for two participant calls in a P2P call. This needs to be copied over from Microsoft.Graph.Call.CallChainId. + callChainId *string + // Contains the optional features for the call. + callOptions CallOptionsable + // The routing information on how the call was retargeted. Read-only. + callRoutes []CallRouteable + // The chat information. Required information for meeting scenarios. + chatInfo ChatInfoable + // The contentSharingSessions property + contentSharingSessions []ContentSharingSessionable + // The direction of the call. The possible value are incoming or outgoing. Read-only. + direction *CallDirection + // The context associated with an incoming call. Read-only. Server generated. + incomingContext IncomingContextable + // The media configuration. Required information for creating peer to peer calls or joining meetings. + mediaConfig MediaConfigable + // Read-only. The call media state. + mediaState CallMediaStateable + // Contains the capabilities of a meeting. Read-only. + meetingCapability MeetingCapabilityable + // The meeting information. Required information for meeting scenarios. + meetingInfo MeetingInfoable + // The myParticipantId property + myParticipantId *string + // The operations property + operations []CommsOperationable + // The participants property + participants []Participantable + // The requestedModalities property + requestedModalities []Modality + // The resultInfo property + resultInfo ResultInfoable + // The ringingTimeoutInSeconds property + ringingTimeoutInSeconds *int32 + // The routingPolicies property + routingPolicies []RoutingPolicy + // The source property + source ParticipantInfoable + // The state property + state *CallState + // The subject property + subject *string + // The targets property + targets []InvitationParticipantInfoable + // The tenantId property + tenantId *string + // The terminationReason property + terminationReason *string + // The toneInfo property + toneInfo ToneInfoable + // The transcription information for the call. Read-only. + transcription CallTranscriptionInfoable +} +// NewCall instantiates a new call and sets the default values. +func NewCall()(*Call) { + m := &Call{ + Entity: *NewEntity(), + } + return m +} +// CreateCallFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCall(), nil +} +// GetActiveModalities gets the activeModalities property value. The list of active modalities. Possible values are: unknown, audio, video, videoBasedScreenSharing, data. Read-only. +func (m *Call) GetActiveModalities()([]Modality) { + return m.activeModalities +} +// GetAnsweredBy gets the answeredBy property value. The participant that answered the call. Read-only. +func (m *Call) GetAnsweredBy()(ParticipantInfoable) { + return m.answeredBy +} +// GetAudioRoutingGroups gets the audioRoutingGroups property value. The audioRoutingGroups property +func (m *Call) GetAudioRoutingGroups()([]AudioRoutingGroupable) { + return m.audioRoutingGroups +} +// GetCallbackUri gets the callbackUri property value. The callback URL on which callbacks will be delivered. Must be https. +func (m *Call) GetCallbackUri()(*string) { + return m.callbackUri +} +// GetCallChainId gets the callChainId property value. A unique identifier for all the participant calls in a conference or a unique identifier for two participant calls in a P2P call. This needs to be copied over from Microsoft.Graph.Call.CallChainId. +func (m *Call) GetCallChainId()(*string) { + return m.callChainId +} +// GetCallOptions gets the callOptions property value. Contains the optional features for the call. +func (m *Call) GetCallOptions()(CallOptionsable) { + return m.callOptions +} +// GetCallRoutes gets the callRoutes property value. The routing information on how the call was retargeted. Read-only. +func (m *Call) GetCallRoutes()([]CallRouteable) { + return m.callRoutes +} +// GetChatInfo gets the chatInfo property value. The chat information. Required information for meeting scenarios. +func (m *Call) GetChatInfo()(ChatInfoable) { + return m.chatInfo +} +// GetContentSharingSessions gets the contentSharingSessions property value. The contentSharingSessions property +func (m *Call) GetContentSharingSessions()([]ContentSharingSessionable) { + return m.contentSharingSessions +} +// GetDirection gets the direction property value. The direction of the call. The possible value are incoming or outgoing. Read-only. +func (m *Call) GetDirection()(*CallDirection) { + return m.direction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Call) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activeModalities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseModality) + if err != nil { + return err + } + if val != nil { + res := make([]Modality, len(val)) + for i, v := range val { + res[i] = *(v.(*Modality)) + } + m.SetActiveModalities(res) + } + return nil + } + res["answeredBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAnsweredBy(val.(ParticipantInfoable)) + } + return nil + } + res["audioRoutingGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAudioRoutingGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AudioRoutingGroupable, len(val)) + for i, v := range val { + res[i] = v.(AudioRoutingGroupable) + } + m.SetAudioRoutingGroups(res) + } + return nil + } + res["callbackUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallbackUri(val) + } + return nil + } + res["callChainId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallChainId(val) + } + return nil + } + res["callOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCallOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallOptions(val.(CallOptionsable)) + } + return nil + } + res["callRoutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallRouteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallRouteable, len(val)) + for i, v := range val { + res[i] = v.(CallRouteable) + } + m.SetCallRoutes(res) + } + return nil + } + res["chatInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChatInfo(val.(ChatInfoable)) + } + return nil + } + res["contentSharingSessions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentSharingSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentSharingSessionable, len(val)) + for i, v := range val { + res[i] = v.(ContentSharingSessionable) + } + m.SetContentSharingSessions(res) + } + return nil + } + res["direction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCallDirection) + if err != nil { + return err + } + if val != nil { + m.SetDirection(val.(*CallDirection)) + } + return nil + } + res["incomingContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIncomingContextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIncomingContext(val.(IncomingContextable)) + } + return nil + } + res["mediaConfig"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaConfigFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaConfig(val.(MediaConfigable)) + } + return nil + } + res["mediaState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCallMediaStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaState(val.(CallMediaStateable)) + } + return nil + } + res["meetingCapability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingCapabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingCapability(val.(MeetingCapabilityable)) + } + return nil + } + res["meetingInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingInfo(val.(MeetingInfoable)) + } + return nil + } + res["myParticipantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMyParticipantId(val) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CommsOperationable, len(val)) + for i, v := range val { + res[i] = v.(CommsOperationable) + } + m.SetOperations(res) + } + return nil + } + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateParticipantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Participantable, len(val)) + for i, v := range val { + res[i] = v.(Participantable) + } + m.SetParticipants(res) + } + return nil + } + res["requestedModalities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseModality) + if err != nil { + return err + } + if val != nil { + res := make([]Modality, len(val)) + for i, v := range val { + res[i] = *(v.(*Modality)) + } + m.SetRequestedModalities(res) + } + return nil + } + res["resultInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResultInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultInfo(val.(ResultInfoable)) + } + return nil + } + res["ringingTimeoutInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRingingTimeoutInSeconds(val) + } + return nil + } + res["routingPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRoutingPolicy) + if err != nil { + return err + } + if val != nil { + res := make([]RoutingPolicy, len(val)) + for i, v := range val { + res[i] = *(v.(*RoutingPolicy)) + } + m.SetRoutingPolicies(res) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(ParticipantInfoable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCallState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CallState)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["targets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvitationParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvitationParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(InvitationParticipantInfoable) + } + m.SetTargets(res) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["terminationReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTerminationReason(val) + } + return nil + } + res["toneInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateToneInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetToneInfo(val.(ToneInfoable)) + } + return nil + } + res["transcription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCallTranscriptionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTranscription(val.(CallTranscriptionInfoable)) + } + return nil + } + return res +} +// GetIncomingContext gets the incomingContext property value. The context associated with an incoming call. Read-only. Server generated. +func (m *Call) GetIncomingContext()(IncomingContextable) { + return m.incomingContext +} +// GetMediaConfig gets the mediaConfig property value. The media configuration. Required information for creating peer to peer calls or joining meetings. +func (m *Call) GetMediaConfig()(MediaConfigable) { + return m.mediaConfig +} +// GetMediaState gets the mediaState property value. Read-only. The call media state. +func (m *Call) GetMediaState()(CallMediaStateable) { + return m.mediaState +} +// GetMeetingCapability gets the meetingCapability property value. Contains the capabilities of a meeting. Read-only. +func (m *Call) GetMeetingCapability()(MeetingCapabilityable) { + return m.meetingCapability +} +// GetMeetingInfo gets the meetingInfo property value. The meeting information. Required information for meeting scenarios. +func (m *Call) GetMeetingInfo()(MeetingInfoable) { + return m.meetingInfo +} +// GetMyParticipantId gets the myParticipantId property value. The myParticipantId property +func (m *Call) GetMyParticipantId()(*string) { + return m.myParticipantId +} +// GetOperations gets the operations property value. The operations property +func (m *Call) GetOperations()([]CommsOperationable) { + return m.operations +} +// GetParticipants gets the participants property value. The participants property +func (m *Call) GetParticipants()([]Participantable) { + return m.participants +} +// GetRequestedModalities gets the requestedModalities property value. The requestedModalities property +func (m *Call) GetRequestedModalities()([]Modality) { + return m.requestedModalities +} +// GetResultInfo gets the resultInfo property value. The resultInfo property +func (m *Call) GetResultInfo()(ResultInfoable) { + return m.resultInfo +} +// GetRingingTimeoutInSeconds gets the ringingTimeoutInSeconds property value. The ringingTimeoutInSeconds property +func (m *Call) GetRingingTimeoutInSeconds()(*int32) { + return m.ringingTimeoutInSeconds +} +// GetRoutingPolicies gets the routingPolicies property value. The routingPolicies property +func (m *Call) GetRoutingPolicies()([]RoutingPolicy) { + return m.routingPolicies +} +// GetSource gets the source property value. The source property +func (m *Call) GetSource()(ParticipantInfoable) { + return m.source +} +// GetState gets the state property value. The state property +func (m *Call) GetState()(*CallState) { + return m.state +} +// GetSubject gets the subject property value. The subject property +func (m *Call) GetSubject()(*string) { + return m.subject +} +// GetTargets gets the targets property value. The targets property +func (m *Call) GetTargets()([]InvitationParticipantInfoable) { + return m.targets +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *Call) GetTenantId()(*string) { + return m.tenantId +} +// GetTerminationReason gets the terminationReason property value. The terminationReason property +func (m *Call) GetTerminationReason()(*string) { + return m.terminationReason +} +// GetToneInfo gets the toneInfo property value. The toneInfo property +func (m *Call) GetToneInfo()(ToneInfoable) { + return m.toneInfo +} +// GetTranscription gets the transcription property value. The transcription information for the call. Read-only. +func (m *Call) GetTranscription()(CallTranscriptionInfoable) { + return m.transcription +} +// Serialize serializes information the current object +func (m *Call) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActiveModalities() != nil { + err = writer.WriteCollectionOfStringValues("activeModalities", SerializeModality(m.GetActiveModalities())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("answeredBy", m.GetAnsweredBy()) + if err != nil { + return err + } + } + if m.GetAudioRoutingGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAudioRoutingGroups())) + for i, v := range m.GetAudioRoutingGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("audioRoutingGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callbackUri", m.GetCallbackUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callChainId", m.GetCallChainId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("callOptions", m.GetCallOptions()) + if err != nil { + return err + } + } + if m.GetCallRoutes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCallRoutes())) + for i, v := range m.GetCallRoutes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("callRoutes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("chatInfo", m.GetChatInfo()) + if err != nil { + return err + } + } + if m.GetContentSharingSessions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentSharingSessions())) + for i, v := range m.GetContentSharingSessions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentSharingSessions", cast) + if err != nil { + return err + } + } + if m.GetDirection() != nil { + cast := (*m.GetDirection()).String() + err = writer.WriteStringValue("direction", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("incomingContext", m.GetIncomingContext()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaConfig", m.GetMediaConfig()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaState", m.GetMediaState()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meetingCapability", m.GetMeetingCapability()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meetingInfo", m.GetMeetingInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("myParticipantId", m.GetMyParticipantId()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParticipants())) + for i, v := range m.GetParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("participants", cast) + if err != nil { + return err + } + } + if m.GetRequestedModalities() != nil { + err = writer.WriteCollectionOfStringValues("requestedModalities", SerializeModality(m.GetRequestedModalities())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resultInfo", m.GetResultInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ringingTimeoutInSeconds", m.GetRingingTimeoutInSeconds()) + if err != nil { + return err + } + } + if m.GetRoutingPolicies() != nil { + err = writer.WriteCollectionOfStringValues("routingPolicies", SerializeRoutingPolicy(m.GetRoutingPolicies())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + if m.GetTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargets())) + for i, v := range m.GetTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("terminationReason", m.GetTerminationReason()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("toneInfo", m.GetToneInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("transcription", m.GetTranscription()) + if err != nil { + return err + } + } + return nil +} +// SetActiveModalities sets the activeModalities property value. The list of active modalities. Possible values are: unknown, audio, video, videoBasedScreenSharing, data. Read-only. +func (m *Call) SetActiveModalities(value []Modality)() { + m.activeModalities = value +} +// SetAnsweredBy sets the answeredBy property value. The participant that answered the call. Read-only. +func (m *Call) SetAnsweredBy(value ParticipantInfoable)() { + m.answeredBy = value +} +// SetAudioRoutingGroups sets the audioRoutingGroups property value. The audioRoutingGroups property +func (m *Call) SetAudioRoutingGroups(value []AudioRoutingGroupable)() { + m.audioRoutingGroups = value +} +// SetCallbackUri sets the callbackUri property value. The callback URL on which callbacks will be delivered. Must be https. +func (m *Call) SetCallbackUri(value *string)() { + m.callbackUri = value +} +// SetCallChainId sets the callChainId property value. A unique identifier for all the participant calls in a conference or a unique identifier for two participant calls in a P2P call. This needs to be copied over from Microsoft.Graph.Call.CallChainId. +func (m *Call) SetCallChainId(value *string)() { + m.callChainId = value +} +// SetCallOptions sets the callOptions property value. Contains the optional features for the call. +func (m *Call) SetCallOptions(value CallOptionsable)() { + m.callOptions = value +} +// SetCallRoutes sets the callRoutes property value. The routing information on how the call was retargeted. Read-only. +func (m *Call) SetCallRoutes(value []CallRouteable)() { + m.callRoutes = value +} +// SetChatInfo sets the chatInfo property value. The chat information. Required information for meeting scenarios. +func (m *Call) SetChatInfo(value ChatInfoable)() { + m.chatInfo = value +} +// SetContentSharingSessions sets the contentSharingSessions property value. The contentSharingSessions property +func (m *Call) SetContentSharingSessions(value []ContentSharingSessionable)() { + m.contentSharingSessions = value +} +// SetDirection sets the direction property value. The direction of the call. The possible value are incoming or outgoing. Read-only. +func (m *Call) SetDirection(value *CallDirection)() { + m.direction = value +} +// SetIncomingContext sets the incomingContext property value. The context associated with an incoming call. Read-only. Server generated. +func (m *Call) SetIncomingContext(value IncomingContextable)() { + m.incomingContext = value +} +// SetMediaConfig sets the mediaConfig property value. The media configuration. Required information for creating peer to peer calls or joining meetings. +func (m *Call) SetMediaConfig(value MediaConfigable)() { + m.mediaConfig = value +} +// SetMediaState sets the mediaState property value. Read-only. The call media state. +func (m *Call) SetMediaState(value CallMediaStateable)() { + m.mediaState = value +} +// SetMeetingCapability sets the meetingCapability property value. Contains the capabilities of a meeting. Read-only. +func (m *Call) SetMeetingCapability(value MeetingCapabilityable)() { + m.meetingCapability = value +} +// SetMeetingInfo sets the meetingInfo property value. The meeting information. Required information for meeting scenarios. +func (m *Call) SetMeetingInfo(value MeetingInfoable)() { + m.meetingInfo = value +} +// SetMyParticipantId sets the myParticipantId property value. The myParticipantId property +func (m *Call) SetMyParticipantId(value *string)() { + m.myParticipantId = value +} +// SetOperations sets the operations property value. The operations property +func (m *Call) SetOperations(value []CommsOperationable)() { + m.operations = value +} +// SetParticipants sets the participants property value. The participants property +func (m *Call) SetParticipants(value []Participantable)() { + m.participants = value +} +// SetRequestedModalities sets the requestedModalities property value. The requestedModalities property +func (m *Call) SetRequestedModalities(value []Modality)() { + m.requestedModalities = value +} +// SetResultInfo sets the resultInfo property value. The resultInfo property +func (m *Call) SetResultInfo(value ResultInfoable)() { + m.resultInfo = value +} +// SetRingingTimeoutInSeconds sets the ringingTimeoutInSeconds property value. The ringingTimeoutInSeconds property +func (m *Call) SetRingingTimeoutInSeconds(value *int32)() { + m.ringingTimeoutInSeconds = value +} +// SetRoutingPolicies sets the routingPolicies property value. The routingPolicies property +func (m *Call) SetRoutingPolicies(value []RoutingPolicy)() { + m.routingPolicies = value +} +// SetSource sets the source property value. The source property +func (m *Call) SetSource(value ParticipantInfoable)() { + m.source = value +} +// SetState sets the state property value. The state property +func (m *Call) SetState(value *CallState)() { + m.state = value +} +// SetSubject sets the subject property value. The subject property +func (m *Call) SetSubject(value *string)() { + m.subject = value +} +// SetTargets sets the targets property value. The targets property +func (m *Call) SetTargets(value []InvitationParticipantInfoable)() { + m.targets = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *Call) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTerminationReason sets the terminationReason property value. The terminationReason property +func (m *Call) SetTerminationReason(value *string)() { + m.terminationReason = value +} +// SetToneInfo sets the toneInfo property value. The toneInfo property +func (m *Call) SetToneInfo(value ToneInfoable)() { + m.toneInfo = value +} +// SetTranscription sets the transcription property value. The transcription information for the call. Read-only. +func (m *Call) SetTranscription(value CallTranscriptionInfoable)() { + m.transcription = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_activity_statistics.go b/src/internal/connector/graph/betasdk/models/call_activity_statistics.go new file mode 100644 index 000000000..da01dd091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_activity_statistics.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallActivityStatistics +type CallActivityStatistics struct { + ActivityStatistics + // Time spent on calls outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. + afterHours *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewCallActivityStatistics instantiates a new CallActivityStatistics and sets the default values. +func NewCallActivityStatistics()(*CallActivityStatistics) { + m := &CallActivityStatistics{ + ActivityStatistics: *NewActivityStatistics(), + } + odataTypeValue := "#microsoft.graph.callActivityStatistics"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCallActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallActivityStatistics(), nil +} +// GetAfterHours gets the afterHours property value. Time spent on calls outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *CallActivityStatistics) GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.afterHours +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ActivityStatistics.GetFieldDeserializers() + res["afterHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterHours(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CallActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ActivityStatistics.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("afterHours", m.GetAfterHours()) + if err != nil { + return err + } + } + return nil +} +// SetAfterHours sets the afterHours property value. Time spent on calls outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *CallActivityStatistics) SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.afterHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_response.go new file mode 100644 index 000000000..6898595a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallActivityStatisticsCollectionResponse +type CallActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CallActivityStatisticsable +} +// NewCallActivityStatisticsCollectionResponse instantiates a new CallActivityStatisticsCollectionResponse and sets the default values. +func NewCallActivityStatisticsCollectionResponse()(*CallActivityStatisticsCollectionResponse) { + m := &CallActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(CallActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallActivityStatisticsCollectionResponse) GetValue()([]CallActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallActivityStatisticsCollectionResponse) SetValue(value []CallActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_responseable.go new file mode 100644 index 000000000..7eb50cb9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallActivityStatisticsCollectionResponseable +type CallActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CallActivityStatisticsable) + SetValue(value []CallActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/call_activity_statisticsable.go new file mode 100644 index 000000000..029c8496e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_activity_statisticsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallActivityStatisticsable +type CallActivityStatisticsable interface { + ActivityStatisticsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_collection_response.go b/src/internal/connector/graph/betasdk/models/call_collection_response.go new file mode 100644 index 000000000..d32117438 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallCollectionResponse +type CallCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Callable +} +// NewCallCollectionResponse instantiates a new CallCollectionResponse and sets the default values. +func NewCallCollectionResponse()(*CallCollectionResponse) { + m := &CallCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Callable, len(val)) + for i, v := range val { + res[i] = v.(Callable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallCollectionResponse) GetValue()([]Callable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallCollectionResponse) SetValue(value []Callable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_collection_responseable.go b/src/internal/connector/graph/betasdk/models/call_collection_responseable.go new file mode 100644 index 000000000..a9ef79cf4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallCollectionResponseable +type CallCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Callable) + SetValue(value []Callable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_direction.go b/src/internal/connector/graph/betasdk/models/call_direction.go new file mode 100644 index 000000000..9b0865306 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_direction.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallDirection int + +const ( + INCOMING_CALLDIRECTION CallDirection = iota + OUTGOING_CALLDIRECTION +) + +func (i CallDirection) String() string { + return []string{"incoming", "outgoing"}[i] +} +func ParseCallDirection(v string) (interface{}, error) { + result := INCOMING_CALLDIRECTION + switch v { + case "incoming": + result = INCOMING_CALLDIRECTION + case "outgoing": + result = OUTGOING_CALLDIRECTION + default: + return 0, errors.New("Unknown CallDirection value: " + v) + } + return &result, nil +} +func SerializeCallDirection(values []CallDirection) []string { + 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/call_ended_event_message_detail.go b/src/internal/connector/graph/betasdk/models/call_ended_event_message_detail.go new file mode 100644 index 000000000..fbdfef801 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_ended_event_message_detail.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallEndedEventMessageDetail +type CallEndedEventMessageDetail struct { + EventMessageDetail + // Duration of the call. + callDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. + callEventType *TeamworkCallEventType + // Unique identifier of the call. + callId *string + // List of call participants. + callParticipants []CallParticipantInfoable + // Initiator of the event. + initiator IdentitySetable +} +// NewCallEndedEventMessageDetail instantiates a new CallEndedEventMessageDetail and sets the default values. +func NewCallEndedEventMessageDetail()(*CallEndedEventMessageDetail) { + m := &CallEndedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.callEndedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCallEndedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallEndedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallEndedEventMessageDetail(), nil +} +// GetCallDuration gets the callDuration property value. Duration of the call. +func (m *CallEndedEventMessageDetail) GetCallDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.callDuration +} +// GetCallEventType gets the callEventType property value. Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. +func (m *CallEndedEventMessageDetail) GetCallEventType()(*TeamworkCallEventType) { + return m.callEventType +} +// GetCallId gets the callId property value. Unique identifier of the call. +func (m *CallEndedEventMessageDetail) GetCallId()(*string) { + return m.callId +} +// GetCallParticipants gets the callParticipants property value. List of call participants. +func (m *CallEndedEventMessageDetail) GetCallParticipants()([]CallParticipantInfoable) { + return m.callParticipants +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallEndedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["callDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetCallDuration(val) + } + return nil + } + res["callEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamworkCallEventType) + if err != nil { + return err + } + if val != nil { + m.SetCallEventType(val.(*TeamworkCallEventType)) + } + return nil + } + res["callId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallId(val) + } + return nil + } + res["callParticipants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(CallParticipantInfoable) + } + m.SetCallParticipants(res) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *CallEndedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *CallEndedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("callDuration", m.GetCallDuration()) + if err != nil { + return err + } + } + if m.GetCallEventType() != nil { + cast := (*m.GetCallEventType()).String() + err = writer.WriteStringValue("callEventType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callId", m.GetCallId()) + if err != nil { + return err + } + } + if m.GetCallParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCallParticipants())) + for i, v := range m.GetCallParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("callParticipants", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetCallDuration sets the callDuration property value. Duration of the call. +func (m *CallEndedEventMessageDetail) SetCallDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.callDuration = value +} +// SetCallEventType sets the callEventType property value. Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. +func (m *CallEndedEventMessageDetail) SetCallEventType(value *TeamworkCallEventType)() { + m.callEventType = value +} +// SetCallId sets the callId property value. Unique identifier of the call. +func (m *CallEndedEventMessageDetail) SetCallId(value *string)() { + m.callId = value +} +// SetCallParticipants sets the callParticipants property value. List of call participants. +func (m *CallEndedEventMessageDetail) SetCallParticipants(value []CallParticipantInfoable)() { + m.callParticipants = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *CallEndedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_ended_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/call_ended_event_message_detailable.go new file mode 100644 index 000000000..d9f2ca539 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_ended_event_message_detailable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallEndedEventMessageDetailable +type CallEndedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetCallEventType()(*TeamworkCallEventType) + GetCallId()(*string) + GetCallParticipants()([]CallParticipantInfoable) + GetInitiator()(IdentitySetable) + SetCallDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetCallEventType(value *TeamworkCallEventType)() + SetCallId(value *string)() + SetCallParticipants(value []CallParticipantInfoable)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_media_state.go b/src/internal/connector/graph/betasdk/models/call_media_state.go new file mode 100644 index 000000000..120ef3b12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_media_state.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallMediaState +type CallMediaState 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 audio media state. Possible values are: active, inactive, unknownFutureValue. + audio *MediaState + // The OdataType property + odataType *string +} +// NewCallMediaState instantiates a new callMediaState and sets the default values. +func NewCallMediaState()(*CallMediaState) { + m := &CallMediaState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCallMediaStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallMediaStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallMediaState(), 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 *CallMediaState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAudio gets the audio property value. The audio media state. Possible values are: active, inactive, unknownFutureValue. +func (m *CallMediaState) GetAudio()(*MediaState) { + return m.audio +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallMediaState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["audio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMediaState) + if err != nil { + return err + } + if val != nil { + m.SetAudio(val.(*MediaState)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CallMediaState) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CallMediaState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAudio() != nil { + cast := (*m.GetAudio()).String() + err := writer.WriteStringValue("audio", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CallMediaState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAudio sets the audio property value. The audio media state. Possible values are: active, inactive, unknownFutureValue. +func (m *CallMediaState) SetAudio(value *MediaState)() { + m.audio = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CallMediaState) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_media_stateable.go b/src/internal/connector/graph/betasdk/models/call_media_stateable.go new file mode 100644 index 000000000..beb89a07a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_media_stateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallMediaStateable +type CallMediaStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAudio()(*MediaState) + GetOdataType()(*string) + SetAudio(value *MediaState)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_options.go b/src/internal/connector/graph/betasdk/models/call_options.go new file mode 100644 index 000000000..25ce9d6c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_options.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallOptions +type CallOptions 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 whether to hide the app after the call is escalated. + hideBotAfterEscalation *bool + // Indicates whether content sharing notifications should be enabled for the call. + isContentSharingNotificationEnabled *bool + // The OdataType property + odataType *string +} +// NewCallOptions instantiates a new callOptions and sets the default values. +func NewCallOptions()(*CallOptions) { + m := &CallOptions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCallOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.incomingCallOptions": + return NewIncomingCallOptions(), nil + case "#microsoft.graph.outgoingCallOptions": + return NewOutgoingCallOptions(), nil + } + } + } + } + return NewCallOptions(), 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 *CallOptions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hideBotAfterEscalation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideBotAfterEscalation(val) + } + return nil + } + res["isContentSharingNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsContentSharingNotificationEnabled(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 + } + return res +} +// GetHideBotAfterEscalation gets the hideBotAfterEscalation property value. Indicates whether to hide the app after the call is escalated. +func (m *CallOptions) GetHideBotAfterEscalation()(*bool) { + return m.hideBotAfterEscalation +} +// GetIsContentSharingNotificationEnabled gets the isContentSharingNotificationEnabled property value. Indicates whether content sharing notifications should be enabled for the call. +func (m *CallOptions) GetIsContentSharingNotificationEnabled()(*bool) { + return m.isContentSharingNotificationEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CallOptions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CallOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("hideBotAfterEscalation", m.GetHideBotAfterEscalation()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isContentSharingNotificationEnabled", m.GetIsContentSharingNotificationEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CallOptions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHideBotAfterEscalation sets the hideBotAfterEscalation property value. Indicates whether to hide the app after the call is escalated. +func (m *CallOptions) SetHideBotAfterEscalation(value *bool)() { + m.hideBotAfterEscalation = value +} +// SetIsContentSharingNotificationEnabled sets the isContentSharingNotificationEnabled property value. Indicates whether content sharing notifications should be enabled for the call. +func (m *CallOptions) SetIsContentSharingNotificationEnabled(value *bool)() { + m.isContentSharingNotificationEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CallOptions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_optionsable.go b/src/internal/connector/graph/betasdk/models/call_optionsable.go new file mode 100644 index 000000000..88a3b54fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_optionsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallOptionsable +type CallOptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHideBotAfterEscalation()(*bool) + GetIsContentSharingNotificationEnabled()(*bool) + GetOdataType()(*string) + SetHideBotAfterEscalation(value *bool)() + SetIsContentSharingNotificationEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_participant_info.go b/src/internal/connector/graph/betasdk/models/call_participant_info.go new file mode 100644 index 000000000..f34e949fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_participant_info.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallParticipantInfo +type CallParticipantInfo 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 OdataType property + odataType *string + // Identity of the call participant. + participant IdentitySetable +} +// NewCallParticipantInfo instantiates a new callParticipantInfo and sets the default values. +func NewCallParticipantInfo()(*CallParticipantInfo) { + m := &CallParticipantInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCallParticipantInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallParticipantInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallParticipantInfo(), 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 *CallParticipantInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallParticipantInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["participant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParticipant(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CallParticipantInfo) GetOdataType()(*string) { + return m.odataType +} +// GetParticipant gets the participant property value. Identity of the call participant. +func (m *CallParticipantInfo) GetParticipant()(IdentitySetable) { + return m.participant +} +// Serialize serializes information the current object +func (m *CallParticipantInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("participant", m.GetParticipant()) + 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 *CallParticipantInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CallParticipantInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetParticipant sets the participant property value. Identity of the call participant. +func (m *CallParticipantInfo) SetParticipant(value IdentitySetable)() { + m.participant = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_participant_info_collection_response.go b/src/internal/connector/graph/betasdk/models/call_participant_info_collection_response.go new file mode 100644 index 000000000..3b8c19c5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_participant_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallParticipantInfoCollectionResponse +type CallParticipantInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CallParticipantInfoable +} +// NewCallParticipantInfoCollectionResponse instantiates a new CallParticipantInfoCollectionResponse and sets the default values. +func NewCallParticipantInfoCollectionResponse()(*CallParticipantInfoCollectionResponse) { + m := &CallParticipantInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallParticipantInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallParticipantInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallParticipantInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallParticipantInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(CallParticipantInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallParticipantInfoCollectionResponse) GetValue()([]CallParticipantInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallParticipantInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallParticipantInfoCollectionResponse) SetValue(value []CallParticipantInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_participant_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/call_participant_info_collection_responseable.go new file mode 100644 index 000000000..87f1b6720 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_participant_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallParticipantInfoCollectionResponseable +type CallParticipantInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CallParticipantInfoable) + SetValue(value []CallParticipantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_participant_infoable.go b/src/internal/connector/graph/betasdk/models/call_participant_infoable.go new file mode 100644 index 000000000..376914036 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_participant_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallParticipantInfoable +type CallParticipantInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetParticipant()(IdentitySetable) + SetOdataType(value *string)() + SetParticipant(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_recording_event_message_detail.go b/src/internal/connector/graph/betasdk/models/call_recording_event_message_detail.go new file mode 100644 index 000000000..6883815d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_recording_event_message_detail.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRecordingEventMessageDetail +type CallRecordingEventMessageDetail struct { + EventMessageDetail + // Unique identifier of the call. + callId *string + // Display name for the call recording. + callRecordingDisplayName *string + // Duration of the call recording. + callRecordingDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Status of the call recording. Possible values are: success, failure, initial, chunkFinished, unknownFutureValue. + callRecordingStatus *CallRecordingStatus + // Call recording URL. + callRecordingUrl *string + // Initiator of the event. + initiator IdentitySetable + // Organizer of the meeting. + meetingOrganizer IdentitySetable +} +// NewCallRecordingEventMessageDetail instantiates a new CallRecordingEventMessageDetail and sets the default values. +func NewCallRecordingEventMessageDetail()(*CallRecordingEventMessageDetail) { + m := &CallRecordingEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.callRecordingEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCallRecordingEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallRecordingEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallRecordingEventMessageDetail(), nil +} +// GetCallId gets the callId property value. Unique identifier of the call. +func (m *CallRecordingEventMessageDetail) GetCallId()(*string) { + return m.callId +} +// GetCallRecordingDisplayName gets the callRecordingDisplayName property value. Display name for the call recording. +func (m *CallRecordingEventMessageDetail) GetCallRecordingDisplayName()(*string) { + return m.callRecordingDisplayName +} +// GetCallRecordingDuration gets the callRecordingDuration property value. Duration of the call recording. +func (m *CallRecordingEventMessageDetail) GetCallRecordingDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.callRecordingDuration +} +// GetCallRecordingStatus gets the callRecordingStatus property value. Status of the call recording. Possible values are: success, failure, initial, chunkFinished, unknownFutureValue. +func (m *CallRecordingEventMessageDetail) GetCallRecordingStatus()(*CallRecordingStatus) { + return m.callRecordingStatus +} +// GetCallRecordingUrl gets the callRecordingUrl property value. Call recording URL. +func (m *CallRecordingEventMessageDetail) GetCallRecordingUrl()(*string) { + return m.callRecordingUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallRecordingEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["callId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallId(val) + } + return nil + } + res["callRecordingDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallRecordingDisplayName(val) + } + return nil + } + res["callRecordingDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetCallRecordingDuration(val) + } + return nil + } + res["callRecordingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCallRecordingStatus) + if err != nil { + return err + } + if val != nil { + m.SetCallRecordingStatus(val.(*CallRecordingStatus)) + } + return nil + } + res["callRecordingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallRecordingUrl(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["meetingOrganizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingOrganizer(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *CallRecordingEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMeetingOrganizer gets the meetingOrganizer property value. Organizer of the meeting. +func (m *CallRecordingEventMessageDetail) GetMeetingOrganizer()(IdentitySetable) { + return m.meetingOrganizer +} +// Serialize serializes information the current object +func (m *CallRecordingEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("callId", m.GetCallId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callRecordingDisplayName", m.GetCallRecordingDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("callRecordingDuration", m.GetCallRecordingDuration()) + if err != nil { + return err + } + } + if m.GetCallRecordingStatus() != nil { + cast := (*m.GetCallRecordingStatus()).String() + err = writer.WriteStringValue("callRecordingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callRecordingUrl", m.GetCallRecordingUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meetingOrganizer", m.GetMeetingOrganizer()) + if err != nil { + return err + } + } + return nil +} +// SetCallId sets the callId property value. Unique identifier of the call. +func (m *CallRecordingEventMessageDetail) SetCallId(value *string)() { + m.callId = value +} +// SetCallRecordingDisplayName sets the callRecordingDisplayName property value. Display name for the call recording. +func (m *CallRecordingEventMessageDetail) SetCallRecordingDisplayName(value *string)() { + m.callRecordingDisplayName = value +} +// SetCallRecordingDuration sets the callRecordingDuration property value. Duration of the call recording. +func (m *CallRecordingEventMessageDetail) SetCallRecordingDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.callRecordingDuration = value +} +// SetCallRecordingStatus sets the callRecordingStatus property value. Status of the call recording. Possible values are: success, failure, initial, chunkFinished, unknownFutureValue. +func (m *CallRecordingEventMessageDetail) SetCallRecordingStatus(value *CallRecordingStatus)() { + m.callRecordingStatus = value +} +// SetCallRecordingUrl sets the callRecordingUrl property value. Call recording URL. +func (m *CallRecordingEventMessageDetail) SetCallRecordingUrl(value *string)() { + m.callRecordingUrl = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *CallRecordingEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMeetingOrganizer sets the meetingOrganizer property value. Organizer of the meeting. +func (m *CallRecordingEventMessageDetail) SetMeetingOrganizer(value IdentitySetable)() { + m.meetingOrganizer = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_recording_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/call_recording_event_message_detailable.go new file mode 100644 index 000000000..beec594a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_recording_event_message_detailable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRecordingEventMessageDetailable +type CallRecordingEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallId()(*string) + GetCallRecordingDisplayName()(*string) + GetCallRecordingDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetCallRecordingStatus()(*CallRecordingStatus) + GetCallRecordingUrl()(*string) + GetInitiator()(IdentitySetable) + GetMeetingOrganizer()(IdentitySetable) + SetCallId(value *string)() + SetCallRecordingDisplayName(value *string)() + SetCallRecordingDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetCallRecordingStatus(value *CallRecordingStatus)() + SetCallRecordingUrl(value *string)() + SetInitiator(value IdentitySetable)() + SetMeetingOrganizer(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_recording_status.go b/src/internal/connector/graph/betasdk/models/call_recording_status.go new file mode 100644 index 000000000..da03e2eef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_recording_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallRecordingStatus int + +const ( + SUCCESS_CALLRECORDINGSTATUS CallRecordingStatus = iota + FAILURE_CALLRECORDINGSTATUS + INITIAL_CALLRECORDINGSTATUS + CHUNKFINISHED_CALLRECORDINGSTATUS + UNKNOWNFUTUREVALUE_CALLRECORDINGSTATUS +) + +func (i CallRecordingStatus) String() string { + return []string{"success", "failure", "initial", "chunkFinished", "unknownFutureValue"}[i] +} +func ParseCallRecordingStatus(v string) (interface{}, error) { + result := SUCCESS_CALLRECORDINGSTATUS + switch v { + case "success": + result = SUCCESS_CALLRECORDINGSTATUS + case "failure": + result = FAILURE_CALLRECORDINGSTATUS + case "initial": + result = INITIAL_CALLRECORDINGSTATUS + case "chunkFinished": + result = CHUNKFINISHED_CALLRECORDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CALLRECORDINGSTATUS + default: + return 0, errors.New("Unknown CallRecordingStatus value: " + v) + } + return &result, nil +} +func SerializeCallRecordingStatus(values []CallRecordingStatus) []string { + 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/call_route.go b/src/internal/connector/graph/betasdk/models/call_route.go new file mode 100644 index 000000000..1b2ed616c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_route.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRoute +type CallRoute 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 final property + final IdentitySetable + // The OdataType property + odataType *string + // The original property + original IdentitySetable + // The routingType property + routingType *RoutingType +} +// NewCallRoute instantiates a new callRoute and sets the default values. +func NewCallRoute()(*CallRoute) { + m := &CallRoute{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCallRouteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallRouteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallRoute(), 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 *CallRoute) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallRoute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["final"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFinal(val.(IdentitySetable)) + } + 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["original"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOriginal(val.(IdentitySetable)) + } + return nil + } + res["routingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRoutingType) + if err != nil { + return err + } + if val != nil { + m.SetRoutingType(val.(*RoutingType)) + } + return nil + } + return res +} +// GetFinal gets the final property value. The final property +func (m *CallRoute) GetFinal()(IdentitySetable) { + return m.final +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CallRoute) GetOdataType()(*string) { + return m.odataType +} +// GetOriginal gets the original property value. The original property +func (m *CallRoute) GetOriginal()(IdentitySetable) { + return m.original +} +// GetRoutingType gets the routingType property value. The routingType property +func (m *CallRoute) GetRoutingType()(*RoutingType) { + return m.routingType +} +// Serialize serializes information the current object +func (m *CallRoute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("final", m.GetFinal()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("original", m.GetOriginal()) + if err != nil { + return err + } + } + if m.GetRoutingType() != nil { + cast := (*m.GetRoutingType()).String() + err := writer.WriteStringValue("routingType", &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 *CallRoute) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFinal sets the final property value. The final property +func (m *CallRoute) SetFinal(value IdentitySetable)() { + m.final = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CallRoute) SetOdataType(value *string)() { + m.odataType = value +} +// SetOriginal sets the original property value. The original property +func (m *CallRoute) SetOriginal(value IdentitySetable)() { + m.original = value +} +// SetRoutingType sets the routingType property value. The routingType property +func (m *CallRoute) SetRoutingType(value *RoutingType)() { + m.routingType = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_route_collection_response.go b/src/internal/connector/graph/betasdk/models/call_route_collection_response.go new file mode 100644 index 000000000..7c49161e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_route_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRouteCollectionResponse +type CallRouteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CallRouteable +} +// NewCallRouteCollectionResponse instantiates a new CallRouteCollectionResponse and sets the default values. +func NewCallRouteCollectionResponse()(*CallRouteCollectionResponse) { + m := &CallRouteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallRouteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallRouteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallRouteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallRouteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallRouteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallRouteable, len(val)) + for i, v := range val { + res[i] = v.(CallRouteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallRouteCollectionResponse) GetValue()([]CallRouteable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallRouteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallRouteCollectionResponse) SetValue(value []CallRouteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_route_collection_responseable.go b/src/internal/connector/graph/betasdk/models/call_route_collection_responseable.go new file mode 100644 index 000000000..e8bbb2694 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_route_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRouteCollectionResponseable +type CallRouteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CallRouteable) + SetValue(value []CallRouteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_routeable.go b/src/internal/connector/graph/betasdk/models/call_routeable.go new file mode 100644 index 000000000..836e1ca6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_routeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallRouteable +type CallRouteable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFinal()(IdentitySetable) + GetOdataType()(*string) + GetOriginal()(IdentitySetable) + GetRoutingType()(*RoutingType) + SetFinal(value IdentitySetable)() + SetOdataType(value *string)() + SetOriginal(value IdentitySetable)() + SetRoutingType(value *RoutingType)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_started_event_message_detail.go b/src/internal/connector/graph/betasdk/models/call_started_event_message_detail.go new file mode 100644 index 000000000..b8de4bb1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_started_event_message_detail.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallStartedEventMessageDetail +type CallStartedEventMessageDetail struct { + EventMessageDetail + // Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. + callEventType *TeamworkCallEventType + // Unique identifier of the call. + callId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewCallStartedEventMessageDetail instantiates a new CallStartedEventMessageDetail and sets the default values. +func NewCallStartedEventMessageDetail()(*CallStartedEventMessageDetail) { + m := &CallStartedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.callStartedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCallStartedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallStartedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallStartedEventMessageDetail(), nil +} +// GetCallEventType gets the callEventType property value. Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. +func (m *CallStartedEventMessageDetail) GetCallEventType()(*TeamworkCallEventType) { + return m.callEventType +} +// GetCallId gets the callId property value. Unique identifier of the call. +func (m *CallStartedEventMessageDetail) GetCallId()(*string) { + return m.callId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallStartedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["callEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTeamworkCallEventType) + if err != nil { + return err + } + if val != nil { + m.SetCallEventType(val.(*TeamworkCallEventType)) + } + return nil + } + res["callId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *CallStartedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *CallStartedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + if m.GetCallEventType() != nil { + cast := (*m.GetCallEventType()).String() + err = writer.WriteStringValue("callEventType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callId", m.GetCallId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetCallEventType sets the callEventType property value. Represents the call event type. Possible values are: call, meeting, screenShare, unknownFutureValue. +func (m *CallStartedEventMessageDetail) SetCallEventType(value *TeamworkCallEventType)() { + m.callEventType = value +} +// SetCallId sets the callId property value. Unique identifier of the call. +func (m *CallStartedEventMessageDetail) SetCallId(value *string)() { + m.callId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *CallStartedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_started_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/call_started_event_message_detailable.go new file mode 100644 index 000000000..b947a2812 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_started_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallStartedEventMessageDetailable +type CallStartedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallEventType()(*TeamworkCallEventType) + GetCallId()(*string) + GetInitiator()(IdentitySetable) + SetCallEventType(value *TeamworkCallEventType)() + SetCallId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_state.go b/src/internal/connector/graph/betasdk/models/call_state.go new file mode 100644 index 000000000..e88282ef0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_state.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallState int + +const ( + INCOMING_CALLSTATE CallState = iota + ESTABLISHING_CALLSTATE + RINGING_CALLSTATE + ESTABLISHED_CALLSTATE + HOLD_CALLSTATE + TRANSFERRING_CALLSTATE + TRANSFERACCEPTED_CALLSTATE + REDIRECTING_CALLSTATE + TERMINATING_CALLSTATE + TERMINATED_CALLSTATE + UNKNOWNFUTUREVALUE_CALLSTATE +) + +func (i CallState) String() string { + return []string{"incoming", "establishing", "ringing", "established", "hold", "transferring", "transferAccepted", "redirecting", "terminating", "terminated", "unknownFutureValue"}[i] +} +func ParseCallState(v string) (interface{}, error) { + result := INCOMING_CALLSTATE + switch v { + case "incoming": + result = INCOMING_CALLSTATE + case "establishing": + result = ESTABLISHING_CALLSTATE + case "ringing": + result = RINGING_CALLSTATE + case "established": + result = ESTABLISHED_CALLSTATE + case "hold": + result = HOLD_CALLSTATE + case "transferring": + result = TRANSFERRING_CALLSTATE + case "transferAccepted": + result = TRANSFERACCEPTED_CALLSTATE + case "redirecting": + result = REDIRECTING_CALLSTATE + case "terminating": + result = TERMINATING_CALLSTATE + case "terminated": + result = TERMINATED_CALLSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CALLSTATE + default: + return 0, errors.New("Unknown CallState value: " + v) + } + return &result, nil +} +func SerializeCallState(values []CallState) []string { + 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/call_transcript.go b/src/internal/connector/graph/betasdk/models/call_transcript.go new file mode 100644 index 000000000..4cd937c97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcript.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscript provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallTranscript struct { + Entity + // A field representing the content of the transcript. Read-only. + content []byte + // Date and time at which the transcript was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCallTranscript instantiates a new callTranscript and sets the default values. +func NewCallTranscript()(*CallTranscript) { + m := &CallTranscript{ + Entity: *NewEntity(), + } + return m +} +// CreateCallTranscriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallTranscriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallTranscript(), nil +} +// GetContent gets the content property value. A field representing the content of the transcript. Read-only. +func (m *CallTranscript) GetContent()([]byte) { + return m.content +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time at which the transcript was created. Read-only. +func (m *CallTranscript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallTranscript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CallTranscript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. A field representing the content of the transcript. Read-only. +func (m *CallTranscript) SetContent(value []byte)() { + m.content = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time at which the transcript was created. Read-only. +func (m *CallTranscript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcript_collection_response.go b/src/internal/connector/graph/betasdk/models/call_transcript_collection_response.go new file mode 100644 index 000000000..626a8c3ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcript_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptCollectionResponse +type CallTranscriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CallTranscriptable +} +// NewCallTranscriptCollectionResponse instantiates a new CallTranscriptCollectionResponse and sets the default values. +func NewCallTranscriptCollectionResponse()(*CallTranscriptCollectionResponse) { + m := &CallTranscriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallTranscriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallTranscriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallTranscriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallTranscriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallTranscriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallTranscriptable, len(val)) + for i, v := range val { + res[i] = v.(CallTranscriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallTranscriptCollectionResponse) GetValue()([]CallTranscriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallTranscriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallTranscriptCollectionResponse) SetValue(value []CallTranscriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcript_collection_responseable.go b/src/internal/connector/graph/betasdk/models/call_transcript_collection_responseable.go new file mode 100644 index 000000000..8bc415f8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcript_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptCollectionResponseable +type CallTranscriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CallTranscriptable) + SetValue(value []CallTranscriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detail.go b/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detail.go new file mode 100644 index 000000000..8037adbd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptEventMessageDetail +type CallTranscriptEventMessageDetail struct { + EventMessageDetail + // Unique identifier of the call. + callId *string + // Unique identifier for a call transcript. + callTranscriptICalUid *string + // The organizer of the meeting. + meetingOrganizer IdentitySetable +} +// NewCallTranscriptEventMessageDetail instantiates a new CallTranscriptEventMessageDetail and sets the default values. +func NewCallTranscriptEventMessageDetail()(*CallTranscriptEventMessageDetail) { + m := &CallTranscriptEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.callTranscriptEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCallTranscriptEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallTranscriptEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallTranscriptEventMessageDetail(), nil +} +// GetCallId gets the callId property value. Unique identifier of the call. +func (m *CallTranscriptEventMessageDetail) GetCallId()(*string) { + return m.callId +} +// GetCallTranscriptICalUid gets the callTranscriptICalUid property value. Unique identifier for a call transcript. +func (m *CallTranscriptEventMessageDetail) GetCallTranscriptICalUid()(*string) { + return m.callTranscriptICalUid +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallTranscriptEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["callId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallId(val) + } + return nil + } + res["callTranscriptICalUid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCallTranscriptICalUid(val) + } + return nil + } + res["meetingOrganizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingOrganizer(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetMeetingOrganizer gets the meetingOrganizer property value. The organizer of the meeting. +func (m *CallTranscriptEventMessageDetail) GetMeetingOrganizer()(IdentitySetable) { + return m.meetingOrganizer +} +// Serialize serializes information the current object +func (m *CallTranscriptEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("callId", m.GetCallId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("callTranscriptICalUid", m.GetCallTranscriptICalUid()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meetingOrganizer", m.GetMeetingOrganizer()) + if err != nil { + return err + } + } + return nil +} +// SetCallId sets the callId property value. Unique identifier of the call. +func (m *CallTranscriptEventMessageDetail) SetCallId(value *string)() { + m.callId = value +} +// SetCallTranscriptICalUid sets the callTranscriptICalUid property value. Unique identifier for a call transcript. +func (m *CallTranscriptEventMessageDetail) SetCallTranscriptICalUid(value *string)() { + m.callTranscriptICalUid = value +} +// SetMeetingOrganizer sets the meetingOrganizer property value. The organizer of the meeting. +func (m *CallTranscriptEventMessageDetail) SetMeetingOrganizer(value IdentitySetable)() { + m.meetingOrganizer = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detailable.go new file mode 100644 index 000000000..68a8d8c0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcript_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptEventMessageDetailable +type CallTranscriptEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallId()(*string) + GetCallTranscriptICalUid()(*string) + GetMeetingOrganizer()(IdentitySetable) + SetCallId(value *string)() + SetCallTranscriptICalUid(value *string)() + SetMeetingOrganizer(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcriptable.go b/src/internal/connector/graph/betasdk/models/call_transcriptable.go new file mode 100644 index 000000000..8d2e210a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcriptable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptable +type CallTranscriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetContent(value []byte)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcription_info.go b/src/internal/connector/graph/betasdk/models/call_transcription_info.go new file mode 100644 index 000000000..6b5f65da8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcription_info.go @@ -0,0 +1,125 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptionInfo +type CallTranscriptionInfo 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 modified time in UTC. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The state property + state *CallTranscriptionState +} +// NewCallTranscriptionInfo instantiates a new callTranscriptionInfo and sets the default values. +func NewCallTranscriptionInfo()(*CallTranscriptionInfo) { + m := &CallTranscriptionInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCallTranscriptionInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallTranscriptionInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallTranscriptionInfo(), 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 *CallTranscriptionInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallTranscriptionInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCallTranscriptionState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*CallTranscriptionState)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The state modified time in UTC. +func (m *CallTranscriptionInfo) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CallTranscriptionInfo) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *CallTranscriptionInfo) GetState()(*CallTranscriptionState) { + return m.state +} +// Serialize serializes information the current object +func (m *CallTranscriptionInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *CallTranscriptionInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The state modified time in UTC. +func (m *CallTranscriptionInfo) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CallTranscriptionInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *CallTranscriptionInfo) SetState(value *CallTranscriptionState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcription_infoable.go b/src/internal/connector/graph/betasdk/models/call_transcription_infoable.go new file mode 100644 index 000000000..fba1eacfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcription_infoable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CallTranscriptionInfoable +type CallTranscriptionInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetState()(*CallTranscriptionState) + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetState(value *CallTranscriptionState)() +} diff --git a/src/internal/connector/graph/betasdk/models/call_transcription_state.go b/src/internal/connector/graph/betasdk/models/call_transcription_state.go new file mode 100644 index 000000000..c3a34fb6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/call_transcription_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallTranscriptionState int + +const ( + NOTSTARTED_CALLTRANSCRIPTIONSTATE CallTranscriptionState = iota + ACTIVE_CALLTRANSCRIPTIONSTATE + INACTIVE_CALLTRANSCRIPTIONSTATE + UNKNOWNFUTUREVALUE_CALLTRANSCRIPTIONSTATE +) + +func (i CallTranscriptionState) String() string { + return []string{"notStarted", "active", "inactive", "unknownFutureValue"}[i] +} +func ParseCallTranscriptionState(v string) (interface{}, error) { + result := NOTSTARTED_CALLTRANSCRIPTIONSTATE + switch v { + case "notStarted": + result = NOTSTARTED_CALLTRANSCRIPTIONSTATE + case "active": + result = ACTIVE_CALLTRANSCRIPTIONSTATE + case "inactive": + result = INACTIVE_CALLTRANSCRIPTIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CALLTRANSCRIPTIONSTATE + default: + return 0, errors.New("Unknown CallTranscriptionState value: " + v) + } + return &result, nil +} +func SerializeCallTranscriptionState(values []CallTranscriptionState) []string { + 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/callable.go b/src/internal/connector/graph/betasdk/models/callable.go new file mode 100644 index 000000000..4fe1253fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callable.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Callable +type Callable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveModalities()([]Modality) + GetAnsweredBy()(ParticipantInfoable) + GetAudioRoutingGroups()([]AudioRoutingGroupable) + GetCallbackUri()(*string) + GetCallChainId()(*string) + GetCallOptions()(CallOptionsable) + GetCallRoutes()([]CallRouteable) + GetChatInfo()(ChatInfoable) + GetContentSharingSessions()([]ContentSharingSessionable) + GetDirection()(*CallDirection) + GetIncomingContext()(IncomingContextable) + GetMediaConfig()(MediaConfigable) + GetMediaState()(CallMediaStateable) + GetMeetingCapability()(MeetingCapabilityable) + GetMeetingInfo()(MeetingInfoable) + GetMyParticipantId()(*string) + GetOperations()([]CommsOperationable) + GetParticipants()([]Participantable) + GetRequestedModalities()([]Modality) + GetResultInfo()(ResultInfoable) + GetRingingTimeoutInSeconds()(*int32) + GetRoutingPolicies()([]RoutingPolicy) + GetSource()(ParticipantInfoable) + GetState()(*CallState) + GetSubject()(*string) + GetTargets()([]InvitationParticipantInfoable) + GetTenantId()(*string) + GetTerminationReason()(*string) + GetToneInfo()(ToneInfoable) + GetTranscription()(CallTranscriptionInfoable) + SetActiveModalities(value []Modality)() + SetAnsweredBy(value ParticipantInfoable)() + SetAudioRoutingGroups(value []AudioRoutingGroupable)() + SetCallbackUri(value *string)() + SetCallChainId(value *string)() + SetCallOptions(value CallOptionsable)() + SetCallRoutes(value []CallRouteable)() + SetChatInfo(value ChatInfoable)() + SetContentSharingSessions(value []ContentSharingSessionable)() + SetDirection(value *CallDirection)() + SetIncomingContext(value IncomingContextable)() + SetMediaConfig(value MediaConfigable)() + SetMediaState(value CallMediaStateable)() + SetMeetingCapability(value MeetingCapabilityable)() + SetMeetingInfo(value MeetingInfoable)() + SetMyParticipantId(value *string)() + SetOperations(value []CommsOperationable)() + SetParticipants(value []Participantable)() + SetRequestedModalities(value []Modality)() + SetResultInfo(value ResultInfoable)() + SetRingingTimeoutInSeconds(value *int32)() + SetRoutingPolicies(value []RoutingPolicy)() + SetSource(value ParticipantInfoable)() + SetState(value *CallState)() + SetSubject(value *string)() + SetTargets(value []InvitationParticipantInfoable)() + SetTenantId(value *string)() + SetTerminationReason(value *string)() + SetToneInfo(value ToneInfoable)() + SetTranscription(value CallTranscriptionInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/audio_codec.go b/src/internal/connector/graph/betasdk/models/callrecords/audio_codec.go new file mode 100644 index 000000000..aeb9a84c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/audio_codec.go @@ -0,0 +1,97 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AudioCodec int + +const ( + UNKNOWN_AUDIOCODEC AudioCodec = iota + INVALID_AUDIOCODEC + CN_AUDIOCODEC + PCMA_AUDIOCODEC + PCMU_AUDIOCODEC + AMRWIDE_AUDIOCODEC + G722_AUDIOCODEC + G7221_AUDIOCODEC + G7221C_AUDIOCODEC + G729_AUDIOCODEC + MULTICHANNELAUDIO_AUDIOCODEC + MUCHV2_AUDIOCODEC + OPUS_AUDIOCODEC + SATIN_AUDIOCODEC + SATINFULLBAND_AUDIOCODEC + RTAUDIO8_AUDIOCODEC + RTAUDIO16_AUDIOCODEC + SILK_AUDIOCODEC + SILKNARROW_AUDIOCODEC + SILKWIDE_AUDIOCODEC + SIREN_AUDIOCODEC + XMSRTA_AUDIOCODEC + UNKNOWNFUTUREVALUE_AUDIOCODEC +) + +func (i AudioCodec) String() string { + return []string{"unknown", "invalid", "cn", "pcma", "pcmu", "amrWide", "g722", "g7221", "g7221c", "g729", "multiChannelAudio", "muchv2", "opus", "satin", "satinFullband", "rtAudio8", "rtAudio16", "silk", "silkNarrow", "silkWide", "siren", "xmsRta", "unknownFutureValue"}[i] +} +func ParseAudioCodec(v string) (interface{}, error) { + result := UNKNOWN_AUDIOCODEC + switch v { + case "unknown": + result = UNKNOWN_AUDIOCODEC + case "invalid": + result = INVALID_AUDIOCODEC + case "cn": + result = CN_AUDIOCODEC + case "pcma": + result = PCMA_AUDIOCODEC + case "pcmu": + result = PCMU_AUDIOCODEC + case "amrWide": + result = AMRWIDE_AUDIOCODEC + case "g722": + result = G722_AUDIOCODEC + case "g7221": + result = G7221_AUDIOCODEC + case "g7221c": + result = G7221C_AUDIOCODEC + case "g729": + result = G729_AUDIOCODEC + case "multiChannelAudio": + result = MULTICHANNELAUDIO_AUDIOCODEC + case "muchv2": + result = MUCHV2_AUDIOCODEC + case "opus": + result = OPUS_AUDIOCODEC + case "satin": + result = SATIN_AUDIOCODEC + case "satinFullband": + result = SATINFULLBAND_AUDIOCODEC + case "rtAudio8": + result = RTAUDIO8_AUDIOCODEC + case "rtAudio16": + result = RTAUDIO16_AUDIOCODEC + case "silk": + result = SILK_AUDIOCODEC + case "silkNarrow": + result = SILKNARROW_AUDIOCODEC + case "silkWide": + result = SILKWIDE_AUDIOCODEC + case "siren": + result = SIREN_AUDIOCODEC + case "xmsRta": + result = XMSRTA_AUDIOCODEC + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AUDIOCODEC + default: + return 0, errors.New("Unknown AudioCodec value: " + v) + } + return &result, nil +} +func SerializeAudioCodec(values []AudioCodec) []string { + 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/callrecords/call_record.go b/src/internal/connector/graph/betasdk/models/callrecords/call_record.go new file mode 100644 index 000000000..df8c2f2a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/call_record.go @@ -0,0 +1,317 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CallRecord provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallRecord struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // UTC time when the last user left the call. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Meeting URL associated to the call. May not be available for a peerToPeer call record type. + joinWebUrl *string + // UTC time when the call record was created. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of all the modalities used in the call. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. + modalities []Modality + // The organizing party's identity. + organizer ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // List of distinct identities involved in the call. + participants []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // List of sessions involved in the call. Peer-to-peer calls typically only have one session, whereas group calls typically have at least one session per participant. Read-only. Nullable. + sessions []Sessionable + // UTC time when the first user joined the call. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type property + type_escaped *CallType + // Monotonically increasing version of the call record. Higher version call records with the same ID includes additional data compared to the lower version. + version *int64 +} +// NewCallRecord instantiates a new callRecord and sets the default values. +func NewCallRecord()(*CallRecord) { + m := &CallRecord{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCallRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallRecord(), nil +} +// GetEndDateTime gets the endDateTime property value. UTC time when the last user left the call. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["joinWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinWebUrl(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["modalities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseModality) + if err != nil { + return err + } + if val != nil { + res := make([]Modality, len(val)) + for i, v := range val { + res[i] = *(v.(*Modality)) + } + m.SetModalities(res) + } + return nil + } + res["organizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganizer(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + } + m.SetParticipants(res) + } + return nil + } + res["sessions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Sessionable, len(val)) + for i, v := range val { + res[i] = v.(Sessionable) + } + m.SetSessions(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCallType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CallType)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetJoinWebUrl gets the joinWebUrl property value. Meeting URL associated to the call. May not be available for a peerToPeer call record type. +func (m *CallRecord) GetJoinWebUrl()(*string) { + return m.joinWebUrl +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. UTC time when the call record was created. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetModalities gets the modalities property value. List of all the modalities used in the call. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. +func (m *CallRecord) GetModalities()([]Modality) { + return m.modalities +} +// GetOrganizer gets the organizer property value. The organizing party's identity. +func (m *CallRecord) GetOrganizer()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.organizer +} +// GetParticipants gets the participants property value. List of distinct identities involved in the call. +func (m *CallRecord) GetParticipants()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.participants +} +// GetSessions gets the sessions property value. List of sessions involved in the call. Peer-to-peer calls typically only have one session, whereas group calls typically have at least one session per participant. Read-only. Nullable. +func (m *CallRecord) GetSessions()([]Sessionable) { + return m.sessions +} +// GetStartDateTime gets the startDateTime property value. UTC time when the first user joined the call. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetType gets the type property value. The type property +func (m *CallRecord) GetType()(*CallType) { + return m.type_escaped +} +// GetVersion gets the version property value. Monotonically increasing version of the call record. Higher version call records with the same ID includes additional data compared to the lower version. +func (m *CallRecord) GetVersion()(*int64) { + return m.version +} +// Serialize serializes information the current object +func (m *CallRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("joinWebUrl", m.GetJoinWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetModalities() != nil { + err = writer.WriteCollectionOfStringValues("modalities", SerializeModality(m.GetModalities())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("organizer", m.GetOrganizer()) + if err != nil { + return err + } + } + if m.GetParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParticipants())) + for i, v := range m.GetParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("participants", cast) + if err != nil { + return err + } + } + if m.GetSessions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSessions())) + for i, v := range m.GetSessions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sessions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetEndDateTime sets the endDateTime property value. UTC time when the last user left the call. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetJoinWebUrl sets the joinWebUrl property value. Meeting URL associated to the call. May not be available for a peerToPeer call record type. +func (m *CallRecord) SetJoinWebUrl(value *string)() { + m.joinWebUrl = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. UTC time when the call record was created. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetModalities sets the modalities property value. List of all the modalities used in the call. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. +func (m *CallRecord) SetModalities(value []Modality)() { + m.modalities = value +} +// SetOrganizer sets the organizer property value. The organizing party's identity. +func (m *CallRecord) SetOrganizer(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.organizer = value +} +// SetParticipants sets the participants property value. List of distinct identities involved in the call. +func (m *CallRecord) SetParticipants(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.participants = value +} +// SetSessions sets the sessions property value. List of sessions involved in the call. Peer-to-peer calls typically only have one session, whereas group calls typically have at least one session per participant. Read-only. Nullable. +func (m *CallRecord) SetSessions(value []Sessionable)() { + m.sessions = value +} +// SetStartDateTime sets the startDateTime property value. UTC time when the first user joined the call. The DatetimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *CallRecord) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetType sets the type property value. The type property +func (m *CallRecord) SetType(value *CallType)() { + m.type_escaped = value +} +// SetVersion sets the version property value. Monotonically increasing version of the call record. Higher version call records with the same ID includes additional data compared to the lower version. +func (m *CallRecord) SetVersion(value *int64)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_response.go new file mode 100644 index 000000000..9981ef72f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CallRecordCollectionResponse +type CallRecordCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CallRecordable +} +// NewCallRecordCollectionResponse instantiates a new CallRecordCollectionResponse and sets the default values. +func NewCallRecordCollectionResponse()(*CallRecordCollectionResponse) { + m := &CallRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCallRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCallRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCallRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CallRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallRecordable, len(val)) + for i, v := range val { + res[i] = v.(CallRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CallRecordCollectionResponse) GetValue()([]CallRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *CallRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CallRecordCollectionResponse) SetValue(value []CallRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_responseable.go new file mode 100644 index 000000000..4c3e47d4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/call_record_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CallRecordCollectionResponseable +type CallRecordCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CallRecordable) + SetValue(value []CallRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/call_recordable.go b/src/internal/connector/graph/betasdk/models/callrecords/call_recordable.go new file mode 100644 index 000000000..835b7ebd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/call_recordable.go @@ -0,0 +1,33 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CallRecordable +type CallRecordable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetJoinWebUrl()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetModalities()([]Modality) + GetOrganizer()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetParticipants()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetSessions()([]Sessionable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetType()(*CallType) + GetVersion()(*int64) + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetJoinWebUrl(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetModalities(value []Modality)() + SetOrganizer(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetParticipants(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetSessions(value []Sessionable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetType(value *CallType)() + SetVersion(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/call_type.go b/src/internal/connector/graph/betasdk/models/callrecords/call_type.go new file mode 100644 index 000000000..b11032826 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/call_type.go @@ -0,0 +1,40 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CallType int + +const ( + UNKNOWN_CALLTYPE CallType = iota + GROUPCALL_CALLTYPE + PEERTOPEER_CALLTYPE + UNKNOWNFUTUREVALUE_CALLTYPE +) + +func (i CallType) String() string { + return []string{"unknown", "groupCall", "peerToPeer", "unknownFutureValue"}[i] +} +func ParseCallType(v string) (interface{}, error) { + result := UNKNOWN_CALLTYPE + switch v { + case "unknown": + result = UNKNOWN_CALLTYPE + case "groupCall": + result = GROUPCALL_CALLTYPE + case "peerToPeer": + result = PEERTOPEER_CALLTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CALLTYPE + default: + return 0, errors.New("Unknown CallType value: " + v) + } + return &result, nil +} +func SerializeCallType(values []CallType) []string { + 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/callrecords/client_platform.go b/src/internal/connector/graph/betasdk/models/callrecords/client_platform.go new file mode 100644 index 000000000..0d8b7170e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/client_platform.go @@ -0,0 +1,61 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ClientPlatform int + +const ( + UNKNOWN_CLIENTPLATFORM ClientPlatform = iota + WINDOWS_CLIENTPLATFORM + MACOS_CLIENTPLATFORM + IOS_CLIENTPLATFORM + ANDROID_CLIENTPLATFORM + WEB_CLIENTPLATFORM + IPPHONE_CLIENTPLATFORM + ROOMSYSTEM_CLIENTPLATFORM + SURFACEHUB_CLIENTPLATFORM + HOLOLENS_CLIENTPLATFORM + UNKNOWNFUTUREVALUE_CLIENTPLATFORM +) + +func (i ClientPlatform) String() string { + return []string{"unknown", "windows", "macOS", "iOS", "android", "web", "ipPhone", "roomSystem", "surfaceHub", "holoLens", "unknownFutureValue"}[i] +} +func ParseClientPlatform(v string) (interface{}, error) { + result := UNKNOWN_CLIENTPLATFORM + switch v { + case "unknown": + result = UNKNOWN_CLIENTPLATFORM + case "windows": + result = WINDOWS_CLIENTPLATFORM + case "macOS": + result = MACOS_CLIENTPLATFORM + case "iOS": + result = IOS_CLIENTPLATFORM + case "android": + result = ANDROID_CLIENTPLATFORM + case "web": + result = WEB_CLIENTPLATFORM + case "ipPhone": + result = IPPHONE_CLIENTPLATFORM + case "roomSystem": + result = ROOMSYSTEM_CLIENTPLATFORM + case "surfaceHub": + result = SURFACEHUB_CLIENTPLATFORM + case "holoLens": + result = HOLOLENS_CLIENTPLATFORM + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLIENTPLATFORM + default: + return 0, errors.New("Unknown ClientPlatform value: " + v) + } + return &result, nil +} +func SerializeClientPlatform(values []ClientPlatform) []string { + 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/callrecords/client_user_agent.go b/src/internal/connector/graph/betasdk/models/callrecords/client_user_agent.go new file mode 100644 index 000000000..2705b6439 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/client_user_agent.go @@ -0,0 +1,142 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClientUserAgent +type ClientUserAgent struct { + UserAgent + // The unique identifier of the Azure AD application used by this endpoint. + azureADAppId *string + // Immutable resource identifier of the Azure Communication Service associated with this endpoint based on Communication Services APIs. + communicationServiceId *string + // The platform property + platform *ClientPlatform + // The productFamily property + productFamily *ProductFamily +} +// NewClientUserAgent instantiates a new ClientUserAgent and sets the default values. +func NewClientUserAgent()(*ClientUserAgent) { + m := &ClientUserAgent{ + UserAgent: *NewUserAgent(), + } + odataTypeValue := "#microsoft.graph.callRecords.clientUserAgent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateClientUserAgentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClientUserAgentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClientUserAgent(), nil +} +// GetAzureADAppId gets the azureADAppId property value. The unique identifier of the Azure AD application used by this endpoint. +func (m *ClientUserAgent) GetAzureADAppId()(*string) { + return m.azureADAppId +} +// GetCommunicationServiceId gets the communicationServiceId property value. Immutable resource identifier of the Azure Communication Service associated with this endpoint based on Communication Services APIs. +func (m *ClientUserAgent) GetCommunicationServiceId()(*string) { + return m.communicationServiceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClientUserAgent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserAgent.GetFieldDeserializers() + res["azureADAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureADAppId(val) + } + return nil + } + res["communicationServiceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommunicationServiceId(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseClientPlatform) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*ClientPlatform)) + } + return nil + } + res["productFamily"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProductFamily) + if err != nil { + return err + } + if val != nil { + m.SetProductFamily(val.(*ProductFamily)) + } + return nil + } + return res +} +// GetPlatform gets the platform property value. The platform property +func (m *ClientUserAgent) GetPlatform()(*ClientPlatform) { + return m.platform +} +// GetProductFamily gets the productFamily property value. The productFamily property +func (m *ClientUserAgent) GetProductFamily()(*ProductFamily) { + return m.productFamily +} +// Serialize serializes information the current object +func (m *ClientUserAgent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserAgent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureADAppId", m.GetAzureADAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("communicationServiceId", m.GetCommunicationServiceId()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + if m.GetProductFamily() != nil { + cast := (*m.GetProductFamily()).String() + err = writer.WriteStringValue("productFamily", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAzureADAppId sets the azureADAppId property value. The unique identifier of the Azure AD application used by this endpoint. +func (m *ClientUserAgent) SetAzureADAppId(value *string)() { + m.azureADAppId = value +} +// SetCommunicationServiceId sets the communicationServiceId property value. Immutable resource identifier of the Azure Communication Service associated with this endpoint based on Communication Services APIs. +func (m *ClientUserAgent) SetCommunicationServiceId(value *string)() { + m.communicationServiceId = value +} +// SetPlatform sets the platform property value. The platform property +func (m *ClientUserAgent) SetPlatform(value *ClientPlatform)() { + m.platform = value +} +// SetProductFamily sets the productFamily property value. The productFamily property +func (m *ClientUserAgent) SetProductFamily(value *ProductFamily)() { + m.productFamily = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/client_user_agentable.go b/src/internal/connector/graph/betasdk/models/callrecords/client_user_agentable.go new file mode 100644 index 000000000..796c7516d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/client_user_agentable.go @@ -0,0 +1,19 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClientUserAgentable +type ClientUserAgentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserAgentable + GetAzureADAppId()(*string) + GetCommunicationServiceId()(*string) + GetPlatform()(*ClientPlatform) + GetProductFamily()(*ProductFamily) + SetAzureADAppId(value *string)() + SetCommunicationServiceId(value *string)() + SetPlatform(value *ClientPlatform)() + SetProductFamily(value *ProductFamily)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/device_info.go b/src/internal/connector/graph/betasdk/models/callrecords/device_info.go new file mode 100644 index 000000000..9de848f0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/device_info.go @@ -0,0 +1,617 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInfo +type DeviceInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the capture device driver used by the media endpoint. + captureDeviceDriver *string + // Name of the capture device used by the media endpoint. + captureDeviceName *string + // Fraction of the call that the media endpoint detected the capture device was not working properly. + captureNotFunctioningEventRatio *float32 + // Fraction of the call that the media endpoint detected the CPU resources available were insufficient and caused poor quality of the audio sent and received. + cpuInsufficentEventRatio *float32 + // Fraction of the call that the media endpoint detected clipping in the captured audio that caused poor quality of the audio being sent. + deviceClippingEventRatio *float32 + // Fraction of the call that the media endpoint detected glitches or gaps in the audio played or captured that caused poor quality of the audio being sent or received. + deviceGlitchEventRatio *float32 + // Number of times during the call that the media endpoint detected howling or screeching audio. + howlingEventCount *int32 + // The root mean square (RMS) of the incoming signal of up to the first 30 seconds of the call. + initialSignalLevelRootMeanSquare *float32 + // Fraction of the call that the media endpoint detected low speech level that caused poor quality of the audio being sent. + lowSpeechLevelEventRatio *float32 + // Fraction of the call that the media endpoint detected low speech to noise level that caused poor quality of the audio being sent. + lowSpeechToNoiseEventRatio *float32 + // Glitches per 5 minute interval for the media endpoint's microphone. + micGlitchRate *float32 + // The OdataType property + odataType *string + // Average energy level of received audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. + receivedNoiseLevel *int32 + // Average energy level of received audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. + receivedSignalLevel *int32 + // Name of the render device driver used by the media endpoint. + renderDeviceDriver *string + // Name of the render device used by the media endpoint. + renderDeviceName *string + // Fraction of the call that media endpoint detected device render is muted. + renderMuteEventRatio *float32 + // Fraction of the call that the media endpoint detected the render device was not working properly. + renderNotFunctioningEventRatio *float32 + // Fraction of the call that media endpoint detected device render volume is set to 0. + renderZeroVolumeEventRatio *float32 + // Average energy level of sent audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. + sentNoiseLevel *int32 + // Average energy level of sent audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. + sentSignalLevel *int32 + // Glitches per 5 minute internal for the media endpoint's loudspeaker. + speakerGlitchRate *float32 +} +// NewDeviceInfo instantiates a new deviceInfo and sets the default values. +func NewDeviceInfo()(*DeviceInfo) { + m := &DeviceInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceInfo(), 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 *DeviceInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCaptureDeviceDriver gets the captureDeviceDriver property value. Name of the capture device driver used by the media endpoint. +func (m *DeviceInfo) GetCaptureDeviceDriver()(*string) { + return m.captureDeviceDriver +} +// GetCaptureDeviceName gets the captureDeviceName property value. Name of the capture device used by the media endpoint. +func (m *DeviceInfo) GetCaptureDeviceName()(*string) { + return m.captureDeviceName +} +// GetCaptureNotFunctioningEventRatio gets the captureNotFunctioningEventRatio property value. Fraction of the call that the media endpoint detected the capture device was not working properly. +func (m *DeviceInfo) GetCaptureNotFunctioningEventRatio()(*float32) { + return m.captureNotFunctioningEventRatio +} +// GetCpuInsufficentEventRatio gets the cpuInsufficentEventRatio property value. Fraction of the call that the media endpoint detected the CPU resources available were insufficient and caused poor quality of the audio sent and received. +func (m *DeviceInfo) GetCpuInsufficentEventRatio()(*float32) { + return m.cpuInsufficentEventRatio +} +// GetDeviceClippingEventRatio gets the deviceClippingEventRatio property value. Fraction of the call that the media endpoint detected clipping in the captured audio that caused poor quality of the audio being sent. +func (m *DeviceInfo) GetDeviceClippingEventRatio()(*float32) { + return m.deviceClippingEventRatio +} +// GetDeviceGlitchEventRatio gets the deviceGlitchEventRatio property value. Fraction of the call that the media endpoint detected glitches or gaps in the audio played or captured that caused poor quality of the audio being sent or received. +func (m *DeviceInfo) GetDeviceGlitchEventRatio()(*float32) { + return m.deviceGlitchEventRatio +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["captureDeviceDriver"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCaptureDeviceDriver(val) + } + return nil + } + res["captureDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCaptureDeviceName(val) + } + return nil + } + res["captureNotFunctioningEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetCaptureNotFunctioningEventRatio(val) + } + return nil + } + res["cpuInsufficentEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetCpuInsufficentEventRatio(val) + } + return nil + } + res["deviceClippingEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceClippingEventRatio(val) + } + return nil + } + res["deviceGlitchEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceGlitchEventRatio(val) + } + return nil + } + res["howlingEventCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHowlingEventCount(val) + } + return nil + } + res["initialSignalLevelRootMeanSquare"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetInitialSignalLevelRootMeanSquare(val) + } + return nil + } + res["lowSpeechLevelEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetLowSpeechLevelEventRatio(val) + } + return nil + } + res["lowSpeechToNoiseEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetLowSpeechToNoiseEventRatio(val) + } + return nil + } + res["micGlitchRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetMicGlitchRate(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["receivedNoiseLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReceivedNoiseLevel(val) + } + return nil + } + res["receivedSignalLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReceivedSignalLevel(val) + } + return nil + } + res["renderDeviceDriver"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRenderDeviceDriver(val) + } + return nil + } + res["renderDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRenderDeviceName(val) + } + return nil + } + res["renderMuteEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenderMuteEventRatio(val) + } + return nil + } + res["renderNotFunctioningEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenderNotFunctioningEventRatio(val) + } + return nil + } + res["renderZeroVolumeEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenderZeroVolumeEventRatio(val) + } + return nil + } + res["sentNoiseLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSentNoiseLevel(val) + } + return nil + } + res["sentSignalLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSentSignalLevel(val) + } + return nil + } + res["speakerGlitchRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetSpeakerGlitchRate(val) + } + return nil + } + return res +} +// GetHowlingEventCount gets the howlingEventCount property value. Number of times during the call that the media endpoint detected howling or screeching audio. +func (m *DeviceInfo) GetHowlingEventCount()(*int32) { + return m.howlingEventCount +} +// GetInitialSignalLevelRootMeanSquare gets the initialSignalLevelRootMeanSquare property value. The root mean square (RMS) of the incoming signal of up to the first 30 seconds of the call. +func (m *DeviceInfo) GetInitialSignalLevelRootMeanSquare()(*float32) { + return m.initialSignalLevelRootMeanSquare +} +// GetLowSpeechLevelEventRatio gets the lowSpeechLevelEventRatio property value. Fraction of the call that the media endpoint detected low speech level that caused poor quality of the audio being sent. +func (m *DeviceInfo) GetLowSpeechLevelEventRatio()(*float32) { + return m.lowSpeechLevelEventRatio +} +// GetLowSpeechToNoiseEventRatio gets the lowSpeechToNoiseEventRatio property value. Fraction of the call that the media endpoint detected low speech to noise level that caused poor quality of the audio being sent. +func (m *DeviceInfo) GetLowSpeechToNoiseEventRatio()(*float32) { + return m.lowSpeechToNoiseEventRatio +} +// GetMicGlitchRate gets the micGlitchRate property value. Glitches per 5 minute interval for the media endpoint's microphone. +func (m *DeviceInfo) GetMicGlitchRate()(*float32) { + return m.micGlitchRate +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceInfo) GetOdataType()(*string) { + return m.odataType +} +// GetReceivedNoiseLevel gets the receivedNoiseLevel property value. Average energy level of received audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. +func (m *DeviceInfo) GetReceivedNoiseLevel()(*int32) { + return m.receivedNoiseLevel +} +// GetReceivedSignalLevel gets the receivedSignalLevel property value. Average energy level of received audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. +func (m *DeviceInfo) GetReceivedSignalLevel()(*int32) { + return m.receivedSignalLevel +} +// GetRenderDeviceDriver gets the renderDeviceDriver property value. Name of the render device driver used by the media endpoint. +func (m *DeviceInfo) GetRenderDeviceDriver()(*string) { + return m.renderDeviceDriver +} +// GetRenderDeviceName gets the renderDeviceName property value. Name of the render device used by the media endpoint. +func (m *DeviceInfo) GetRenderDeviceName()(*string) { + return m.renderDeviceName +} +// GetRenderMuteEventRatio gets the renderMuteEventRatio property value. Fraction of the call that media endpoint detected device render is muted. +func (m *DeviceInfo) GetRenderMuteEventRatio()(*float32) { + return m.renderMuteEventRatio +} +// GetRenderNotFunctioningEventRatio gets the renderNotFunctioningEventRatio property value. Fraction of the call that the media endpoint detected the render device was not working properly. +func (m *DeviceInfo) GetRenderNotFunctioningEventRatio()(*float32) { + return m.renderNotFunctioningEventRatio +} +// GetRenderZeroVolumeEventRatio gets the renderZeroVolumeEventRatio property value. Fraction of the call that media endpoint detected device render volume is set to 0. +func (m *DeviceInfo) GetRenderZeroVolumeEventRatio()(*float32) { + return m.renderZeroVolumeEventRatio +} +// GetSentNoiseLevel gets the sentNoiseLevel property value. Average energy level of sent audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. +func (m *DeviceInfo) GetSentNoiseLevel()(*int32) { + return m.sentNoiseLevel +} +// GetSentSignalLevel gets the sentSignalLevel property value. Average energy level of sent audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. +func (m *DeviceInfo) GetSentSignalLevel()(*int32) { + return m.sentSignalLevel +} +// GetSpeakerGlitchRate gets the speakerGlitchRate property value. Glitches per 5 minute internal for the media endpoint's loudspeaker. +func (m *DeviceInfo) GetSpeakerGlitchRate()(*float32) { + return m.speakerGlitchRate +} +// Serialize serializes information the current object +func (m *DeviceInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("captureDeviceDriver", m.GetCaptureDeviceDriver()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("captureDeviceName", m.GetCaptureDeviceName()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("captureNotFunctioningEventRatio", m.GetCaptureNotFunctioningEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("cpuInsufficentEventRatio", m.GetCpuInsufficentEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("deviceClippingEventRatio", m.GetDeviceClippingEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("deviceGlitchEventRatio", m.GetDeviceGlitchEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("howlingEventCount", m.GetHowlingEventCount()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("initialSignalLevelRootMeanSquare", m.GetInitialSignalLevelRootMeanSquare()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("lowSpeechLevelEventRatio", m.GetLowSpeechLevelEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("lowSpeechToNoiseEventRatio", m.GetLowSpeechToNoiseEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("micGlitchRate", m.GetMicGlitchRate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("receivedNoiseLevel", m.GetReceivedNoiseLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("receivedSignalLevel", m.GetReceivedSignalLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("renderDeviceDriver", m.GetRenderDeviceDriver()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("renderDeviceName", m.GetRenderDeviceName()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("renderMuteEventRatio", m.GetRenderMuteEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("renderNotFunctioningEventRatio", m.GetRenderNotFunctioningEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("renderZeroVolumeEventRatio", m.GetRenderZeroVolumeEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sentNoiseLevel", m.GetSentNoiseLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sentSignalLevel", m.GetSentSignalLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("speakerGlitchRate", m.GetSpeakerGlitchRate()) + 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 *DeviceInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCaptureDeviceDriver sets the captureDeviceDriver property value. Name of the capture device driver used by the media endpoint. +func (m *DeviceInfo) SetCaptureDeviceDriver(value *string)() { + m.captureDeviceDriver = value +} +// SetCaptureDeviceName sets the captureDeviceName property value. Name of the capture device used by the media endpoint. +func (m *DeviceInfo) SetCaptureDeviceName(value *string)() { + m.captureDeviceName = value +} +// SetCaptureNotFunctioningEventRatio sets the captureNotFunctioningEventRatio property value. Fraction of the call that the media endpoint detected the capture device was not working properly. +func (m *DeviceInfo) SetCaptureNotFunctioningEventRatio(value *float32)() { + m.captureNotFunctioningEventRatio = value +} +// SetCpuInsufficentEventRatio sets the cpuInsufficentEventRatio property value. Fraction of the call that the media endpoint detected the CPU resources available were insufficient and caused poor quality of the audio sent and received. +func (m *DeviceInfo) SetCpuInsufficentEventRatio(value *float32)() { + m.cpuInsufficentEventRatio = value +} +// SetDeviceClippingEventRatio sets the deviceClippingEventRatio property value. Fraction of the call that the media endpoint detected clipping in the captured audio that caused poor quality of the audio being sent. +func (m *DeviceInfo) SetDeviceClippingEventRatio(value *float32)() { + m.deviceClippingEventRatio = value +} +// SetDeviceGlitchEventRatio sets the deviceGlitchEventRatio property value. Fraction of the call that the media endpoint detected glitches or gaps in the audio played or captured that caused poor quality of the audio being sent or received. +func (m *DeviceInfo) SetDeviceGlitchEventRatio(value *float32)() { + m.deviceGlitchEventRatio = value +} +// SetHowlingEventCount sets the howlingEventCount property value. Number of times during the call that the media endpoint detected howling or screeching audio. +func (m *DeviceInfo) SetHowlingEventCount(value *int32)() { + m.howlingEventCount = value +} +// SetInitialSignalLevelRootMeanSquare sets the initialSignalLevelRootMeanSquare property value. The root mean square (RMS) of the incoming signal of up to the first 30 seconds of the call. +func (m *DeviceInfo) SetInitialSignalLevelRootMeanSquare(value *float32)() { + m.initialSignalLevelRootMeanSquare = value +} +// SetLowSpeechLevelEventRatio sets the lowSpeechLevelEventRatio property value. Fraction of the call that the media endpoint detected low speech level that caused poor quality of the audio being sent. +func (m *DeviceInfo) SetLowSpeechLevelEventRatio(value *float32)() { + m.lowSpeechLevelEventRatio = value +} +// SetLowSpeechToNoiseEventRatio sets the lowSpeechToNoiseEventRatio property value. Fraction of the call that the media endpoint detected low speech to noise level that caused poor quality of the audio being sent. +func (m *DeviceInfo) SetLowSpeechToNoiseEventRatio(value *float32)() { + m.lowSpeechToNoiseEventRatio = value +} +// SetMicGlitchRate sets the micGlitchRate property value. Glitches per 5 minute interval for the media endpoint's microphone. +func (m *DeviceInfo) SetMicGlitchRate(value *float32)() { + m.micGlitchRate = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetReceivedNoiseLevel sets the receivedNoiseLevel property value. Average energy level of received audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. +func (m *DeviceInfo) SetReceivedNoiseLevel(value *int32)() { + m.receivedNoiseLevel = value +} +// SetReceivedSignalLevel sets the receivedSignalLevel property value. Average energy level of received audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. +func (m *DeviceInfo) SetReceivedSignalLevel(value *int32)() { + m.receivedSignalLevel = value +} +// SetRenderDeviceDriver sets the renderDeviceDriver property value. Name of the render device driver used by the media endpoint. +func (m *DeviceInfo) SetRenderDeviceDriver(value *string)() { + m.renderDeviceDriver = value +} +// SetRenderDeviceName sets the renderDeviceName property value. Name of the render device used by the media endpoint. +func (m *DeviceInfo) SetRenderDeviceName(value *string)() { + m.renderDeviceName = value +} +// SetRenderMuteEventRatio sets the renderMuteEventRatio property value. Fraction of the call that media endpoint detected device render is muted. +func (m *DeviceInfo) SetRenderMuteEventRatio(value *float32)() { + m.renderMuteEventRatio = value +} +// SetRenderNotFunctioningEventRatio sets the renderNotFunctioningEventRatio property value. Fraction of the call that the media endpoint detected the render device was not working properly. +func (m *DeviceInfo) SetRenderNotFunctioningEventRatio(value *float32)() { + m.renderNotFunctioningEventRatio = value +} +// SetRenderZeroVolumeEventRatio sets the renderZeroVolumeEventRatio property value. Fraction of the call that media endpoint detected device render volume is set to 0. +func (m *DeviceInfo) SetRenderZeroVolumeEventRatio(value *float32)() { + m.renderZeroVolumeEventRatio = value +} +// SetSentNoiseLevel sets the sentNoiseLevel property value. Average energy level of sent audio for audio classified as mono noise or left channel of stereo noise by the media endpoint. +func (m *DeviceInfo) SetSentNoiseLevel(value *int32)() { + m.sentNoiseLevel = value +} +// SetSentSignalLevel sets the sentSignalLevel property value. Average energy level of sent audio for audio classified as mono speech, or left channel of stereo speech by the media endpoint. +func (m *DeviceInfo) SetSentSignalLevel(value *int32)() { + m.sentSignalLevel = value +} +// SetSpeakerGlitchRate sets the speakerGlitchRate property value. Glitches per 5 minute internal for the media endpoint's loudspeaker. +func (m *DeviceInfo) SetSpeakerGlitchRate(value *float32)() { + m.speakerGlitchRate = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/device_infoable.go b/src/internal/connector/graph/betasdk/models/callrecords/device_infoable.go new file mode 100644 index 000000000..fb03cb85a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/device_infoable.go @@ -0,0 +1,55 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInfoable +type DeviceInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCaptureDeviceDriver()(*string) + GetCaptureDeviceName()(*string) + GetCaptureNotFunctioningEventRatio()(*float32) + GetCpuInsufficentEventRatio()(*float32) + GetDeviceClippingEventRatio()(*float32) + GetDeviceGlitchEventRatio()(*float32) + GetHowlingEventCount()(*int32) + GetInitialSignalLevelRootMeanSquare()(*float32) + GetLowSpeechLevelEventRatio()(*float32) + GetLowSpeechToNoiseEventRatio()(*float32) + GetMicGlitchRate()(*float32) + GetOdataType()(*string) + GetReceivedNoiseLevel()(*int32) + GetReceivedSignalLevel()(*int32) + GetRenderDeviceDriver()(*string) + GetRenderDeviceName()(*string) + GetRenderMuteEventRatio()(*float32) + GetRenderNotFunctioningEventRatio()(*float32) + GetRenderZeroVolumeEventRatio()(*float32) + GetSentNoiseLevel()(*int32) + GetSentSignalLevel()(*int32) + GetSpeakerGlitchRate()(*float32) + SetCaptureDeviceDriver(value *string)() + SetCaptureDeviceName(value *string)() + SetCaptureNotFunctioningEventRatio(value *float32)() + SetCpuInsufficentEventRatio(value *float32)() + SetDeviceClippingEventRatio(value *float32)() + SetDeviceGlitchEventRatio(value *float32)() + SetHowlingEventCount(value *int32)() + SetInitialSignalLevelRootMeanSquare(value *float32)() + SetLowSpeechLevelEventRatio(value *float32)() + SetLowSpeechToNoiseEventRatio(value *float32)() + SetMicGlitchRate(value *float32)() + SetOdataType(value *string)() + SetReceivedNoiseLevel(value *int32)() + SetReceivedSignalLevel(value *int32)() + SetRenderDeviceDriver(value *string)() + SetRenderDeviceName(value *string)() + SetRenderMuteEventRatio(value *float32)() + SetRenderNotFunctioningEventRatio(value *float32)() + SetRenderZeroVolumeEventRatio(value *float32)() + SetSentNoiseLevel(value *int32)() + SetSentSignalLevel(value *int32)() + SetSpeakerGlitchRate(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/endpoint.go b/src/internal/connector/graph/betasdk/models/callrecords/endpoint.go new file mode 100644 index 000000000..650a1157b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/endpoint.go @@ -0,0 +1,117 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Endpoint +type Endpoint 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 OdataType property + odataType *string + // User-agent reported by this endpoint. + userAgent UserAgentable +} +// NewEndpoint instantiates a new endpoint and sets the default values. +func NewEndpoint()(*Endpoint) { + m := &Endpoint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.callRecords.participantEndpoint": + return NewParticipantEndpoint(), nil + case "#microsoft.graph.callRecords.serviceEndpoint": + return NewServiceEndpoint(), nil + } + } + } + } + return NewEndpoint(), 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 *Endpoint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Endpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["userAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserAgent(val.(UserAgentable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Endpoint) GetOdataType()(*string) { + return m.odataType +} +// GetUserAgent gets the userAgent property value. User-agent reported by this endpoint. +func (m *Endpoint) GetUserAgent()(UserAgentable) { + return m.userAgent +} +// Serialize serializes information the current object +func (m *Endpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("userAgent", m.GetUserAgent()) + 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 *Endpoint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Endpoint) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserAgent sets the userAgent property value. User-agent reported by this endpoint. +func (m *Endpoint) SetUserAgent(value UserAgentable)() { + m.userAgent = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/endpointable.go b/src/internal/connector/graph/betasdk/models/callrecords/endpointable.go new file mode 100644 index 000000000..122e6a427 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/endpointable.go @@ -0,0 +1,15 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Endpointable +type Endpointable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetUserAgent()(UserAgentable) + SetOdataType(value *string)() + SetUserAgent(value UserAgentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/failure_info.go b/src/internal/connector/graph/betasdk/models/callrecords/failure_info.go new file mode 100644 index 000000000..3cb6c69e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/failure_info.go @@ -0,0 +1,124 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FailureInfo +type FailureInfo 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 OdataType property + odataType *string + // Classification of why a call or portion of a call failed. + reason *string + // The stage property + stage *FailureStage +} +// NewFailureInfo instantiates a new failureInfo and sets the default values. +func NewFailureInfo()(*FailureInfo) { + m := &FailureInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFailureInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFailureInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFailureInfo(), 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 *FailureInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FailureInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["stage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFailureStage) + if err != nil { + return err + } + if val != nil { + m.SetStage(val.(*FailureStage)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FailureInfo) GetOdataType()(*string) { + return m.odataType +} +// GetReason gets the reason property value. Classification of why a call or portion of a call failed. +func (m *FailureInfo) GetReason()(*string) { + return m.reason +} +// GetStage gets the stage property value. The stage property +func (m *FailureInfo) GetStage()(*FailureStage) { + return m.stage +} +// Serialize serializes information the current object +func (m *FailureInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + if m.GetStage() != nil { + cast := (*m.GetStage()).String() + err := writer.WriteStringValue("stage", &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 *FailureInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FailureInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetReason sets the reason property value. Classification of why a call or portion of a call failed. +func (m *FailureInfo) SetReason(value *string)() { + m.reason = value +} +// SetStage sets the stage property value. The stage property +func (m *FailureInfo) SetStage(value *FailureStage)() { + m.stage = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/failure_infoable.go b/src/internal/connector/graph/betasdk/models/callrecords/failure_infoable.go new file mode 100644 index 000000000..24bfd070f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/failure_infoable.go @@ -0,0 +1,17 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FailureInfoable +type FailureInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetReason()(*string) + GetStage()(*FailureStage) + SetOdataType(value *string)() + SetReason(value *string)() + SetStage(value *FailureStage)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/failure_stage.go b/src/internal/connector/graph/betasdk/models/callrecords/failure_stage.go new file mode 100644 index 000000000..6e9e32d60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/failure_stage.go @@ -0,0 +1,40 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FailureStage int + +const ( + UNKNOWN_FAILURESTAGE FailureStage = iota + CALLSETUP_FAILURESTAGE + MIDCALL_FAILURESTAGE + UNKNOWNFUTUREVALUE_FAILURESTAGE +) + +func (i FailureStage) String() string { + return []string{"unknown", "callSetup", "midcall", "unknownFutureValue"}[i] +} +func ParseFailureStage(v string) (interface{}, error) { + result := UNKNOWN_FAILURESTAGE + switch v { + case "unknown": + result = UNKNOWN_FAILURESTAGE + case "callSetup": + result = CALLSETUP_FAILURESTAGE + case "midcall": + result = MIDCALL_FAILURESTAGE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FAILURESTAGE + default: + return 0, errors.New("Unknown FailureStage value: " + v) + } + return &result, nil +} +func SerializeFailureStage(values []FailureStage) []string { + 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/callrecords/feedback_token_set.go b/src/internal/connector/graph/betasdk/models/callrecords/feedback_token_set.go new file mode 100644 index 000000000..419705edd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/feedback_token_set.go @@ -0,0 +1,71 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeedbackTokenSet +type FeedbackTokenSet 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 OdataType property + odataType *string +} +// NewFeedbackTokenSet instantiates a new feedbackTokenSet and sets the default values. +func NewFeedbackTokenSet()(*FeedbackTokenSet) { + m := &FeedbackTokenSet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFeedbackTokenSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeedbackTokenSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeedbackTokenSet(), 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 *FeedbackTokenSet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeedbackTokenSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FeedbackTokenSet) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *FeedbackTokenSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *FeedbackTokenSet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FeedbackTokenSet) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/feedback_token_setable.go b/src/internal/connector/graph/betasdk/models/callrecords/feedback_token_setable.go new file mode 100644 index 000000000..293e7faaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/feedback_token_setable.go @@ -0,0 +1,13 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeedbackTokenSetable +type FeedbackTokenSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media.go b/src/internal/connector/graph/betasdk/models/callrecords/media.go new file mode 100644 index 000000000..26c5900e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media.go @@ -0,0 +1,235 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Media +type Media struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Device information associated with the callee endpoint of this media. + calleeDevice DeviceInfoable + // Network information associated with the callee endpoint of this media. + calleeNetwork NetworkInfoable + // Device information associated with the caller endpoint of this media. + callerDevice DeviceInfoable + // Network information associated with the caller endpoint of this media. + callerNetwork NetworkInfoable + // How the media was identified during media negotiation stage. + label *string + // The OdataType property + odataType *string + // Network streams associated with this media. + streams []MediaStreamable +} +// NewMedia instantiates a new media and sets the default values. +func NewMedia()(*Media) { + m := &Media{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMedia(), 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 *Media) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCalleeDevice gets the calleeDevice property value. Device information associated with the callee endpoint of this media. +func (m *Media) GetCalleeDevice()(DeviceInfoable) { + return m.calleeDevice +} +// GetCalleeNetwork gets the calleeNetwork property value. Network information associated with the callee endpoint of this media. +func (m *Media) GetCalleeNetwork()(NetworkInfoable) { + return m.calleeNetwork +} +// GetCallerDevice gets the callerDevice property value. Device information associated with the caller endpoint of this media. +func (m *Media) GetCallerDevice()(DeviceInfoable) { + return m.callerDevice +} +// GetCallerNetwork gets the callerNetwork property value. Network information associated with the caller endpoint of this media. +func (m *Media) GetCallerNetwork()(NetworkInfoable) { + return m.callerNetwork +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Media) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["calleeDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCalleeDevice(val.(DeviceInfoable)) + } + return nil + } + res["calleeNetwork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNetworkInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCalleeNetwork(val.(NetworkInfoable)) + } + return nil + } + res["callerDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallerDevice(val.(DeviceInfoable)) + } + return nil + } + res["callerNetwork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNetworkInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallerNetwork(val.(NetworkInfoable)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(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["streams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaStreamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaStreamable, len(val)) + for i, v := range val { + res[i] = v.(MediaStreamable) + } + m.SetStreams(res) + } + return nil + } + return res +} +// GetLabel gets the label property value. How the media was identified during media negotiation stage. +func (m *Media) GetLabel()(*string) { + return m.label +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Media) GetOdataType()(*string) { + return m.odataType +} +// GetStreams gets the streams property value. Network streams associated with this media. +func (m *Media) GetStreams()([]MediaStreamable) { + return m.streams +} +// Serialize serializes information the current object +func (m *Media) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("calleeDevice", m.GetCalleeDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("calleeNetwork", m.GetCalleeNetwork()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("callerDevice", m.GetCallerDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("callerNetwork", m.GetCallerNetwork()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStreams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStreams())) + for i, v := range m.GetStreams() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("streams", 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 *Media) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCalleeDevice sets the calleeDevice property value. Device information associated with the callee endpoint of this media. +func (m *Media) SetCalleeDevice(value DeviceInfoable)() { + m.calleeDevice = value +} +// SetCalleeNetwork sets the calleeNetwork property value. Network information associated with the callee endpoint of this media. +func (m *Media) SetCalleeNetwork(value NetworkInfoable)() { + m.calleeNetwork = value +} +// SetCallerDevice sets the callerDevice property value. Device information associated with the caller endpoint of this media. +func (m *Media) SetCallerDevice(value DeviceInfoable)() { + m.callerDevice = value +} +// SetCallerNetwork sets the callerNetwork property value. Network information associated with the caller endpoint of this media. +func (m *Media) SetCallerNetwork(value NetworkInfoable)() { + m.callerNetwork = value +} +// SetLabel sets the label property value. How the media was identified during media negotiation stage. +func (m *Media) SetLabel(value *string)() { + m.label = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Media) SetOdataType(value *string)() { + m.odataType = value +} +// SetStreams sets the streams property value. Network streams associated with this media. +func (m *Media) SetStreams(value []MediaStreamable)() { + m.streams = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/media_collection_response.go new file mode 100644 index 000000000..39b21ab80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MediaCollectionResponse +type MediaCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Mediaable +} +// NewMediaCollectionResponse instantiates a new MediaCollectionResponse and sets the default values. +func NewMediaCollectionResponse()(*MediaCollectionResponse) { + m := &MediaCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMediaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Mediaable, len(val)) + for i, v := range val { + res[i] = v.(Mediaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MediaCollectionResponse) GetValue()([]Mediaable) { + return m.value +} +// Serialize serializes information the current object +func (m *MediaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MediaCollectionResponse) SetValue(value []Mediaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/media_collection_responseable.go new file mode 100644 index 000000000..f8a681305 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MediaCollectionResponseable +type MediaCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Mediaable) + SetValue(value []Mediaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_stream.go b/src/internal/connector/graph/betasdk/models/callrecords/media_stream.go new file mode 100644 index 000000000..fff649941 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_stream.go @@ -0,0 +1,777 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStream +type MediaStream struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Codec name used to encode audio for transmission on the network. Possible values are: unknown, invalid, cn, pcma, pcmu, amrWide, g722, g7221, g7221c, g729, multiChannelAudio, muchv2, opus, satin, satinFullband, rtAudio8, rtAudio16, silk, silkNarrow, silkWide, siren, xmsRTA, unknownFutureValue. + audioCodec *AudioCodec + // Average Network Mean Opinion Score degradation for stream. Represents how much the network loss and jitter has impacted the quality of received audio. + averageAudioDegradation *float32 + // Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + averageAudioNetworkJitter *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Average estimated bandwidth available between two endpoints in bits per second. + averageBandwidthEstimate *int64 + // Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + averageJitter *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Average packet loss rate for stream. + averagePacketLossRate *float32 + // Ratio of the number of audio frames with samples generated by packet loss concealment to the total number of audio frames. + averageRatioOfConcealedSamples *float32 + // Average frames per second received for all video streams computed over the duration of the session. + averageReceivedFrameRate *float32 + // Average network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + averageRoundTripTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Average percentage of video frames lost as displayed to the user. + averageVideoFrameLossPercentage *float32 + // Average frames per second received for a video stream, computed over the duration of the session. + averageVideoFrameRate *float32 + // Average fraction of packets lost, as specified in [RFC 3550][], computed over the duration of the session. + averageVideoPacketLossRate *float32 + // UTC time when the stream ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Fraction of the call where frame rate is less than 7.5 frames per second. + lowFrameRateRatio *float32 + // Fraction of the call that the client is running less than 70% expected video processing capability. + lowVideoProcessingCapabilityRatio *float32 + // Maximum of audio network jitter computed over each of the 20 second windows during the session, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + maxAudioNetworkJitter *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Maximum jitter for the stream computed as specified in RFC 3550, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + maxJitter *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Maximum packet loss rate for the stream. + maxPacketLossRate *float32 + // Maximum ratio of packets concealed by the healer. + maxRatioOfConcealedSamples *float32 + // Maximum network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. + maxRoundTripTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The OdataType property + odataType *string + // Packet count for the stream. + packetUtilization *int64 + // Packet loss rate after FEC has been applied aggregated across all video streams and codecs. + postForwardErrorCorrectionPacketLossRate *float32 + // UTC time when the stream started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The streamDirection property + streamDirection *MediaStreamDirection + // Unique identifier for the stream. + streamId *string + // Codec name used to encode video for transmission on the network. Possible values are: unknown, invalid, av1, h263, h264, h264s, h264uc, h265, rtvc1, rtVideo, xrtvc1, unknownFutureValue. + videoCodec *VideoCodec + // True if the media stream bypassed the Mediation Server and went straight between client and PSTN Gateway/PBX, false otherwise. + wasMediaBypassed *bool +} +// NewMediaStream instantiates a new mediaStream and sets the default values. +func NewMediaStream()(*MediaStream) { + m := &MediaStream{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaStreamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaStreamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaStream(), 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 *MediaStream) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAudioCodec gets the audioCodec property value. Codec name used to encode audio for transmission on the network. Possible values are: unknown, invalid, cn, pcma, pcmu, amrWide, g722, g7221, g7221c, g729, multiChannelAudio, muchv2, opus, satin, satinFullband, rtAudio8, rtAudio16, silk, silkNarrow, silkWide, siren, xmsRTA, unknownFutureValue. +func (m *MediaStream) GetAudioCodec()(*AudioCodec) { + return m.audioCodec +} +// GetAverageAudioDegradation gets the averageAudioDegradation property value. Average Network Mean Opinion Score degradation for stream. Represents how much the network loss and jitter has impacted the quality of received audio. +func (m *MediaStream) GetAverageAudioDegradation()(*float32) { + return m.averageAudioDegradation +} +// GetAverageAudioNetworkJitter gets the averageAudioNetworkJitter property value. Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetAverageAudioNetworkJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.averageAudioNetworkJitter +} +// GetAverageBandwidthEstimate gets the averageBandwidthEstimate property value. Average estimated bandwidth available between two endpoints in bits per second. +func (m *MediaStream) GetAverageBandwidthEstimate()(*int64) { + return m.averageBandwidthEstimate +} +// GetAverageJitter gets the averageJitter property value. Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetAverageJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.averageJitter +} +// GetAveragePacketLossRate gets the averagePacketLossRate property value. Average packet loss rate for stream. +func (m *MediaStream) GetAveragePacketLossRate()(*float32) { + return m.averagePacketLossRate +} +// GetAverageRatioOfConcealedSamples gets the averageRatioOfConcealedSamples property value. Ratio of the number of audio frames with samples generated by packet loss concealment to the total number of audio frames. +func (m *MediaStream) GetAverageRatioOfConcealedSamples()(*float32) { + return m.averageRatioOfConcealedSamples +} +// GetAverageReceivedFrameRate gets the averageReceivedFrameRate property value. Average frames per second received for all video streams computed over the duration of the session. +func (m *MediaStream) GetAverageReceivedFrameRate()(*float32) { + return m.averageReceivedFrameRate +} +// GetAverageRoundTripTime gets the averageRoundTripTime property value. Average network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetAverageRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.averageRoundTripTime +} +// GetAverageVideoFrameLossPercentage gets the averageVideoFrameLossPercentage property value. Average percentage of video frames lost as displayed to the user. +func (m *MediaStream) GetAverageVideoFrameLossPercentage()(*float32) { + return m.averageVideoFrameLossPercentage +} +// GetAverageVideoFrameRate gets the averageVideoFrameRate property value. Average frames per second received for a video stream, computed over the duration of the session. +func (m *MediaStream) GetAverageVideoFrameRate()(*float32) { + return m.averageVideoFrameRate +} +// GetAverageVideoPacketLossRate gets the averageVideoPacketLossRate property value. Average fraction of packets lost, as specified in [RFC 3550][], computed over the duration of the session. +func (m *MediaStream) GetAverageVideoPacketLossRate()(*float32) { + return m.averageVideoPacketLossRate +} +// GetEndDateTime gets the endDateTime property value. UTC time when the stream ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *MediaStream) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaStream) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["audioCodec"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAudioCodec) + if err != nil { + return err + } + if val != nil { + m.SetAudioCodec(val.(*AudioCodec)) + } + return nil + } + res["averageAudioDegradation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageAudioDegradation(val) + } + return nil + } + res["averageAudioNetworkJitter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAverageAudioNetworkJitter(val) + } + return nil + } + res["averageBandwidthEstimate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageBandwidthEstimate(val) + } + return nil + } + res["averageJitter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAverageJitter(val) + } + return nil + } + res["averagePacketLossRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAveragePacketLossRate(val) + } + return nil + } + res["averageRatioOfConcealedSamples"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageRatioOfConcealedSamples(val) + } + return nil + } + res["averageReceivedFrameRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageReceivedFrameRate(val) + } + return nil + } + res["averageRoundTripTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAverageRoundTripTime(val) + } + return nil + } + res["averageVideoFrameLossPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageVideoFrameLossPercentage(val) + } + return nil + } + res["averageVideoFrameRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageVideoFrameRate(val) + } + return nil + } + res["averageVideoPacketLossRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetAverageVideoPacketLossRate(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["lowFrameRateRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetLowFrameRateRatio(val) + } + return nil + } + res["lowVideoProcessingCapabilityRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetLowVideoProcessingCapabilityRatio(val) + } + return nil + } + res["maxAudioNetworkJitter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxAudioNetworkJitter(val) + } + return nil + } + res["maxJitter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxJitter(val) + } + return nil + } + res["maxPacketLossRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxPacketLossRate(val) + } + return nil + } + res["maxRatioOfConcealedSamples"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxRatioOfConcealedSamples(val) + } + return nil + } + res["maxRoundTripTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxRoundTripTime(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["packetUtilization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPacketUtilization(val) + } + return nil + } + res["postForwardErrorCorrectionPacketLossRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetPostForwardErrorCorrectionPacketLossRate(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["streamDirection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMediaStreamDirection) + if err != nil { + return err + } + if val != nil { + m.SetStreamDirection(val.(*MediaStreamDirection)) + } + return nil + } + res["streamId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreamId(val) + } + return nil + } + res["videoCodec"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVideoCodec) + if err != nil { + return err + } + if val != nil { + m.SetVideoCodec(val.(*VideoCodec)) + } + return nil + } + res["wasMediaBypassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWasMediaBypassed(val) + } + return nil + } + return res +} +// GetLowFrameRateRatio gets the lowFrameRateRatio property value. Fraction of the call where frame rate is less than 7.5 frames per second. +func (m *MediaStream) GetLowFrameRateRatio()(*float32) { + return m.lowFrameRateRatio +} +// GetLowVideoProcessingCapabilityRatio gets the lowVideoProcessingCapabilityRatio property value. Fraction of the call that the client is running less than 70% expected video processing capability. +func (m *MediaStream) GetLowVideoProcessingCapabilityRatio()(*float32) { + return m.lowVideoProcessingCapabilityRatio +} +// GetMaxAudioNetworkJitter gets the maxAudioNetworkJitter property value. Maximum of audio network jitter computed over each of the 20 second windows during the session, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetMaxAudioNetworkJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxAudioNetworkJitter +} +// GetMaxJitter gets the maxJitter property value. Maximum jitter for the stream computed as specified in RFC 3550, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetMaxJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxJitter +} +// GetMaxPacketLossRate gets the maxPacketLossRate property value. Maximum packet loss rate for the stream. +func (m *MediaStream) GetMaxPacketLossRate()(*float32) { + return m.maxPacketLossRate +} +// GetMaxRatioOfConcealedSamples gets the maxRatioOfConcealedSamples property value. Maximum ratio of packets concealed by the healer. +func (m *MediaStream) GetMaxRatioOfConcealedSamples()(*float32) { + return m.maxRatioOfConcealedSamples +} +// GetMaxRoundTripTime gets the maxRoundTripTime property value. Maximum network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) GetMaxRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxRoundTripTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaStream) GetOdataType()(*string) { + return m.odataType +} +// GetPacketUtilization gets the packetUtilization property value. Packet count for the stream. +func (m *MediaStream) GetPacketUtilization()(*int64) { + return m.packetUtilization +} +// GetPostForwardErrorCorrectionPacketLossRate gets the postForwardErrorCorrectionPacketLossRate property value. Packet loss rate after FEC has been applied aggregated across all video streams and codecs. +func (m *MediaStream) GetPostForwardErrorCorrectionPacketLossRate()(*float32) { + return m.postForwardErrorCorrectionPacketLossRate +} +// GetStartDateTime gets the startDateTime property value. UTC time when the stream started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *MediaStream) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStreamDirection gets the streamDirection property value. The streamDirection property +func (m *MediaStream) GetStreamDirection()(*MediaStreamDirection) { + return m.streamDirection +} +// GetStreamId gets the streamId property value. Unique identifier for the stream. +func (m *MediaStream) GetStreamId()(*string) { + return m.streamId +} +// GetVideoCodec gets the videoCodec property value. Codec name used to encode video for transmission on the network. Possible values are: unknown, invalid, av1, h263, h264, h264s, h264uc, h265, rtvc1, rtVideo, xrtvc1, unknownFutureValue. +func (m *MediaStream) GetVideoCodec()(*VideoCodec) { + return m.videoCodec +} +// GetWasMediaBypassed gets the wasMediaBypassed property value. True if the media stream bypassed the Mediation Server and went straight between client and PSTN Gateway/PBX, false otherwise. +func (m *MediaStream) GetWasMediaBypassed()(*bool) { + return m.wasMediaBypassed +} +// Serialize serializes information the current object +func (m *MediaStream) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAudioCodec() != nil { + cast := (*m.GetAudioCodec()).String() + err := writer.WriteStringValue("audioCodec", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageAudioDegradation", m.GetAverageAudioDegradation()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("averageAudioNetworkJitter", m.GetAverageAudioNetworkJitter()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("averageBandwidthEstimate", m.GetAverageBandwidthEstimate()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("averageJitter", m.GetAverageJitter()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averagePacketLossRate", m.GetAveragePacketLossRate()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageRatioOfConcealedSamples", m.GetAverageRatioOfConcealedSamples()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageReceivedFrameRate", m.GetAverageReceivedFrameRate()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("averageRoundTripTime", m.GetAverageRoundTripTime()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageVideoFrameLossPercentage", m.GetAverageVideoFrameLossPercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageVideoFrameRate", m.GetAverageVideoFrameRate()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("averageVideoPacketLossRate", m.GetAverageVideoPacketLossRate()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("lowFrameRateRatio", m.GetLowFrameRateRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("lowVideoProcessingCapabilityRatio", m.GetLowVideoProcessingCapabilityRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("maxAudioNetworkJitter", m.GetMaxAudioNetworkJitter()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("maxJitter", m.GetMaxJitter()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("maxPacketLossRate", m.GetMaxPacketLossRate()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("maxRatioOfConcealedSamples", m.GetMaxRatioOfConcealedSamples()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("maxRoundTripTime", m.GetMaxRoundTripTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("packetUtilization", m.GetPacketUtilization()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("postForwardErrorCorrectionPacketLossRate", m.GetPostForwardErrorCorrectionPacketLossRate()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetStreamDirection() != nil { + cast := (*m.GetStreamDirection()).String() + err := writer.WriteStringValue("streamDirection", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("streamId", m.GetStreamId()) + if err != nil { + return err + } + } + if m.GetVideoCodec() != nil { + cast := (*m.GetVideoCodec()).String() + err := writer.WriteStringValue("videoCodec", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("wasMediaBypassed", m.GetWasMediaBypassed()) + 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 *MediaStream) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAudioCodec sets the audioCodec property value. Codec name used to encode audio for transmission on the network. Possible values are: unknown, invalid, cn, pcma, pcmu, amrWide, g722, g7221, g7221c, g729, multiChannelAudio, muchv2, opus, satin, satinFullband, rtAudio8, rtAudio16, silk, silkNarrow, silkWide, siren, xmsRTA, unknownFutureValue. +func (m *MediaStream) SetAudioCodec(value *AudioCodec)() { + m.audioCodec = value +} +// SetAverageAudioDegradation sets the averageAudioDegradation property value. Average Network Mean Opinion Score degradation for stream. Represents how much the network loss and jitter has impacted the quality of received audio. +func (m *MediaStream) SetAverageAudioDegradation(value *float32)() { + m.averageAudioDegradation = value +} +// SetAverageAudioNetworkJitter sets the averageAudioNetworkJitter property value. Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetAverageAudioNetworkJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.averageAudioNetworkJitter = value +} +// SetAverageBandwidthEstimate sets the averageBandwidthEstimate property value. Average estimated bandwidth available between two endpoints in bits per second. +func (m *MediaStream) SetAverageBandwidthEstimate(value *int64)() { + m.averageBandwidthEstimate = value +} +// SetAverageJitter sets the averageJitter property value. Average jitter for the stream computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetAverageJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.averageJitter = value +} +// SetAveragePacketLossRate sets the averagePacketLossRate property value. Average packet loss rate for stream. +func (m *MediaStream) SetAveragePacketLossRate(value *float32)() { + m.averagePacketLossRate = value +} +// SetAverageRatioOfConcealedSamples sets the averageRatioOfConcealedSamples property value. Ratio of the number of audio frames with samples generated by packet loss concealment to the total number of audio frames. +func (m *MediaStream) SetAverageRatioOfConcealedSamples(value *float32)() { + m.averageRatioOfConcealedSamples = value +} +// SetAverageReceivedFrameRate sets the averageReceivedFrameRate property value. Average frames per second received for all video streams computed over the duration of the session. +func (m *MediaStream) SetAverageReceivedFrameRate(value *float32)() { + m.averageReceivedFrameRate = value +} +// SetAverageRoundTripTime sets the averageRoundTripTime property value. Average network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetAverageRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.averageRoundTripTime = value +} +// SetAverageVideoFrameLossPercentage sets the averageVideoFrameLossPercentage property value. Average percentage of video frames lost as displayed to the user. +func (m *MediaStream) SetAverageVideoFrameLossPercentage(value *float32)() { + m.averageVideoFrameLossPercentage = value +} +// SetAverageVideoFrameRate sets the averageVideoFrameRate property value. Average frames per second received for a video stream, computed over the duration of the session. +func (m *MediaStream) SetAverageVideoFrameRate(value *float32)() { + m.averageVideoFrameRate = value +} +// SetAverageVideoPacketLossRate sets the averageVideoPacketLossRate property value. Average fraction of packets lost, as specified in [RFC 3550][], computed over the duration of the session. +func (m *MediaStream) SetAverageVideoPacketLossRate(value *float32)() { + m.averageVideoPacketLossRate = value +} +// SetEndDateTime sets the endDateTime property value. UTC time when the stream ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *MediaStream) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetLowFrameRateRatio sets the lowFrameRateRatio property value. Fraction of the call where frame rate is less than 7.5 frames per second. +func (m *MediaStream) SetLowFrameRateRatio(value *float32)() { + m.lowFrameRateRatio = value +} +// SetLowVideoProcessingCapabilityRatio sets the lowVideoProcessingCapabilityRatio property value. Fraction of the call that the client is running less than 70% expected video processing capability. +func (m *MediaStream) SetLowVideoProcessingCapabilityRatio(value *float32)() { + m.lowVideoProcessingCapabilityRatio = value +} +// SetMaxAudioNetworkJitter sets the maxAudioNetworkJitter property value. Maximum of audio network jitter computed over each of the 20 second windows during the session, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetMaxAudioNetworkJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxAudioNetworkJitter = value +} +// SetMaxJitter sets the maxJitter property value. Maximum jitter for the stream computed as specified in RFC 3550, denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetMaxJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxJitter = value +} +// SetMaxPacketLossRate sets the maxPacketLossRate property value. Maximum packet loss rate for the stream. +func (m *MediaStream) SetMaxPacketLossRate(value *float32)() { + m.maxPacketLossRate = value +} +// SetMaxRatioOfConcealedSamples sets the maxRatioOfConcealedSamples property value. Maximum ratio of packets concealed by the healer. +func (m *MediaStream) SetMaxRatioOfConcealedSamples(value *float32)() { + m.maxRatioOfConcealedSamples = value +} +// SetMaxRoundTripTime sets the maxRoundTripTime property value. Maximum network propagation round-trip time computed as specified in [RFC 3550][], denoted in [ISO 8601][] format. For example, 1 second is denoted as 'PT1S', where 'P' is the duration designator, 'T' is the time designator, and 'S' is the second designator. +func (m *MediaStream) SetMaxRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxRoundTripTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaStream) SetOdataType(value *string)() { + m.odataType = value +} +// SetPacketUtilization sets the packetUtilization property value. Packet count for the stream. +func (m *MediaStream) SetPacketUtilization(value *int64)() { + m.packetUtilization = value +} +// SetPostForwardErrorCorrectionPacketLossRate sets the postForwardErrorCorrectionPacketLossRate property value. Packet loss rate after FEC has been applied aggregated across all video streams and codecs. +func (m *MediaStream) SetPostForwardErrorCorrectionPacketLossRate(value *float32)() { + m.postForwardErrorCorrectionPacketLossRate = value +} +// SetStartDateTime sets the startDateTime property value. UTC time when the stream started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *MediaStream) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStreamDirection sets the streamDirection property value. The streamDirection property +func (m *MediaStream) SetStreamDirection(value *MediaStreamDirection)() { + m.streamDirection = value +} +// SetStreamId sets the streamId property value. Unique identifier for the stream. +func (m *MediaStream) SetStreamId(value *string)() { + m.streamId = value +} +// SetVideoCodec sets the videoCodec property value. Codec name used to encode video for transmission on the network. Possible values are: unknown, invalid, av1, h263, h264, h264s, h264uc, h265, rtvc1, rtVideo, xrtvc1, unknownFutureValue. +func (m *MediaStream) SetVideoCodec(value *VideoCodec)() { + m.videoCodec = value +} +// SetWasMediaBypassed sets the wasMediaBypassed property value. True if the media stream bypassed the Mediation Server and went straight between client and PSTN Gateway/PBX, false otherwise. +func (m *MediaStream) SetWasMediaBypassed(value *bool)() { + m.wasMediaBypassed = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_response.go new file mode 100644 index 000000000..b0cfa06f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MediaStreamCollectionResponse +type MediaStreamCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []MediaStreamable +} +// NewMediaStreamCollectionResponse instantiates a new MediaStreamCollectionResponse and sets the default values. +func NewMediaStreamCollectionResponse()(*MediaStreamCollectionResponse) { + m := &MediaStreamCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMediaStreamCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaStreamCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaStreamCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaStreamCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaStreamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaStreamable, len(val)) + for i, v := range val { + res[i] = v.(MediaStreamable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MediaStreamCollectionResponse) GetValue()([]MediaStreamable) { + return m.value +} +// Serialize serializes information the current object +func (m *MediaStreamCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MediaStreamCollectionResponse) SetValue(value []MediaStreamable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_responseable.go new file mode 100644 index 000000000..c31bb6847 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MediaStreamCollectionResponseable +type MediaStreamCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MediaStreamable) + SetValue(value []MediaStreamable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/media_stream_direction.go b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_direction.go new file mode 100644 index 000000000..9e73559a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_stream_direction.go @@ -0,0 +1,34 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MediaStreamDirection int + +const ( + CALLERTOCALLEE_MEDIASTREAMDIRECTION MediaStreamDirection = iota + CALLEETOCALLER_MEDIASTREAMDIRECTION +) + +func (i MediaStreamDirection) String() string { + return []string{"callerToCallee", "calleeToCaller"}[i] +} +func ParseMediaStreamDirection(v string) (interface{}, error) { + result := CALLERTOCALLEE_MEDIASTREAMDIRECTION + switch v { + case "callerToCallee": + result = CALLERTOCALLEE_MEDIASTREAMDIRECTION + case "calleeToCaller": + result = CALLEETOCALLER_MEDIASTREAMDIRECTION + default: + return 0, errors.New("Unknown MediaStreamDirection value: " + v) + } + return &result, nil +} +func SerializeMediaStreamDirection(values []MediaStreamDirection) []string { + 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/callrecords/media_streamable.go b/src/internal/connector/graph/betasdk/models/callrecords/media_streamable.go new file mode 100644 index 000000000..485a62284 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/media_streamable.go @@ -0,0 +1,68 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStreamable +type MediaStreamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAudioCodec()(*AudioCodec) + GetAverageAudioDegradation()(*float32) + GetAverageAudioNetworkJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetAverageBandwidthEstimate()(*int64) + GetAverageJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetAveragePacketLossRate()(*float32) + GetAverageRatioOfConcealedSamples()(*float32) + GetAverageReceivedFrameRate()(*float32) + GetAverageRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetAverageVideoFrameLossPercentage()(*float32) + GetAverageVideoFrameRate()(*float32) + GetAverageVideoPacketLossRate()(*float32) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLowFrameRateRatio()(*float32) + GetLowVideoProcessingCapabilityRatio()(*float32) + GetMaxAudioNetworkJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetMaxJitter()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetMaxPacketLossRate()(*float32) + GetMaxRatioOfConcealedSamples()(*float32) + GetMaxRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOdataType()(*string) + GetPacketUtilization()(*int64) + GetPostForwardErrorCorrectionPacketLossRate()(*float32) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStreamDirection()(*MediaStreamDirection) + GetStreamId()(*string) + GetVideoCodec()(*VideoCodec) + GetWasMediaBypassed()(*bool) + SetAudioCodec(value *AudioCodec)() + SetAverageAudioDegradation(value *float32)() + SetAverageAudioNetworkJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetAverageBandwidthEstimate(value *int64)() + SetAverageJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetAveragePacketLossRate(value *float32)() + SetAverageRatioOfConcealedSamples(value *float32)() + SetAverageReceivedFrameRate(value *float32)() + SetAverageRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetAverageVideoFrameLossPercentage(value *float32)() + SetAverageVideoFrameRate(value *float32)() + SetAverageVideoPacketLossRate(value *float32)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLowFrameRateRatio(value *float32)() + SetLowVideoProcessingCapabilityRatio(value *float32)() + SetMaxAudioNetworkJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetMaxJitter(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetMaxPacketLossRate(value *float32)() + SetMaxRatioOfConcealedSamples(value *float32)() + SetMaxRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOdataType(value *string)() + SetPacketUtilization(value *int64)() + SetPostForwardErrorCorrectionPacketLossRate(value *float32)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStreamDirection(value *MediaStreamDirection)() + SetStreamId(value *string)() + SetVideoCodec(value *VideoCodec)() + SetWasMediaBypassed(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/mediaable.go b/src/internal/connector/graph/betasdk/models/callrecords/mediaable.go new file mode 100644 index 000000000..4a022a057 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/mediaable.go @@ -0,0 +1,25 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Mediaable +type Mediaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalleeDevice()(DeviceInfoable) + GetCalleeNetwork()(NetworkInfoable) + GetCallerDevice()(DeviceInfoable) + GetCallerNetwork()(NetworkInfoable) + GetLabel()(*string) + GetOdataType()(*string) + GetStreams()([]MediaStreamable) + SetCalleeDevice(value DeviceInfoable)() + SetCalleeNetwork(value NetworkInfoable)() + SetCallerDevice(value DeviceInfoable)() + SetCallerNetwork(value NetworkInfoable)() + SetLabel(value *string)() + SetOdataType(value *string)() + SetStreams(value []MediaStreamable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/modality.go b/src/internal/connector/graph/betasdk/models/callrecords/modality.go new file mode 100644 index 000000000..5af5dc936 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/modality.go @@ -0,0 +1,46 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Modality int + +const ( + AUDIO_MODALITY Modality = iota + VIDEO_MODALITY + VIDEOBASEDSCREENSHARING_MODALITY + DATA_MODALITY + SCREENSHARING_MODALITY + UNKNOWNFUTUREVALUE_MODALITY +) + +func (i Modality) String() string { + return []string{"audio", "video", "videoBasedScreenSharing", "data", "screenSharing", "unknownFutureValue"}[i] +} +func ParseModality(v string) (interface{}, error) { + result := AUDIO_MODALITY + switch v { + case "audio": + result = AUDIO_MODALITY + case "video": + result = VIDEO_MODALITY + case "videoBasedScreenSharing": + result = VIDEOBASEDSCREENSHARING_MODALITY + case "data": + result = DATA_MODALITY + case "screenSharing": + result = SCREENSHARING_MODALITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MODALITY + default: + return 0, errors.New("Unknown Modality value: " + v) + } + return &result, nil +} +func SerializeModality(values []Modality) []string { + 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/callrecords/network_connection_type.go b/src/internal/connector/graph/betasdk/models/callrecords/network_connection_type.go new file mode 100644 index 000000000..c9360705f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/network_connection_type.go @@ -0,0 +1,46 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NetworkConnectionType int + +const ( + UNKNOWN_NETWORKCONNECTIONTYPE NetworkConnectionType = iota + WIRED_NETWORKCONNECTIONTYPE + WIFI_NETWORKCONNECTIONTYPE + MOBILE_NETWORKCONNECTIONTYPE + TUNNEL_NETWORKCONNECTIONTYPE + UNKNOWNFUTUREVALUE_NETWORKCONNECTIONTYPE +) + +func (i NetworkConnectionType) String() string { + return []string{"unknown", "wired", "wifi", "mobile", "tunnel", "unknownFutureValue"}[i] +} +func ParseNetworkConnectionType(v string) (interface{}, error) { + result := UNKNOWN_NETWORKCONNECTIONTYPE + switch v { + case "unknown": + result = UNKNOWN_NETWORKCONNECTIONTYPE + case "wired": + result = WIRED_NETWORKCONNECTIONTYPE + case "wifi": + result = WIFI_NETWORKCONNECTIONTYPE + case "mobile": + result = MOBILE_NETWORKCONNECTIONTYPE + case "tunnel": + result = TUNNEL_NETWORKCONNECTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_NETWORKCONNECTIONTYPE + default: + return 0, errors.New("Unknown NetworkConnectionType value: " + v) + } + return &result, nil +} +func SerializeNetworkConnectionType(values []NetworkConnectionType) []string { + 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/callrecords/network_info.go b/src/internal/connector/graph/betasdk/models/callrecords/network_info.go new file mode 100644 index 000000000..b899c9fcf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/network_info.go @@ -0,0 +1,759 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInfo +type NetworkInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Fraction of the call that the media endpoint detected the available bandwidth or bandwidth policy was low enough to cause poor quality of the audio sent. + bandwidthLowEventRatio *float32 + // The wireless LAN basic service set identifier of the media endpoint used to connect to the network. + basicServiceSetIdentifier *string + // The connectionType property + connectionType *NetworkConnectionType + // Fraction of the call that the media endpoint detected the network delay was significant enough to impact the ability to have real-time two-way communication. + delayEventRatio *float32 + // DNS suffix associated with the network adapter of the media endpoint. + dnsSuffix *string + // IP address of the media endpoint. + ipAddress *string + // Link speed in bits per second reported by the network adapter used by the media endpoint. + linkSpeed *int64 + // The media access control (MAC) address of the media endpoint's network device. + macAddress *string + // The networkTransportProtocol property + networkTransportProtocol *NetworkTransportProtocol + // The OdataType property + odataType *string + // Network port number used by media endpoint. + port *int32 + // Fraction of the call that the media endpoint detected the network was causing poor quality of the audio received. + receivedQualityEventRatio *float32 + // IP address of the media endpoint as seen by the media relay server. This is typically the public internet IP address associated to the endpoint. + reflexiveIPAddress *string + // IP address of the media relay server allocated by the media endpoint. + relayIPAddress *string + // Network port number allocated on the media relay server by the media endpoint. + relayPort *int32 + // Fraction of the call that the media endpoint detected the network was causing poor quality of the audio sent. + sentQualityEventRatio *float32 + // Subnet used for media stream by the media endpoint. + subnet *string + // List of network trace route hops collected for this media stream.* + traceRouteHops []TraceRouteHopable + // The wifiBand property + wifiBand *WifiBand + // Estimated remaining battery charge in percentage reported by the media endpoint. + wifiBatteryCharge *int32 + // WiFi channel used by the media endpoint. + wifiChannel *int32 + // Name of the Microsoft WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. + wifiMicrosoftDriver *string + // Version of the Microsoft WiFi driver used by the media endpoint. + wifiMicrosoftDriverVersion *string + // The wifiRadioType property + wifiRadioType *WifiRadioType + // WiFi signal strength in percentage reported by the media endpoint. + wifiSignalStrength *int32 + // Name of the WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. + wifiVendorDriver *string + // Version of the WiFi driver used by the media endpoint. + wifiVendorDriverVersion *string +} +// NewNetworkInfo instantiates a new networkInfo and sets the default values. +func NewNetworkInfo()(*NetworkInfo) { + m := &NetworkInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNetworkInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkInfo(), 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 *NetworkInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBandwidthLowEventRatio gets the bandwidthLowEventRatio property value. Fraction of the call that the media endpoint detected the available bandwidth or bandwidth policy was low enough to cause poor quality of the audio sent. +func (m *NetworkInfo) GetBandwidthLowEventRatio()(*float32) { + return m.bandwidthLowEventRatio +} +// GetBasicServiceSetIdentifier gets the basicServiceSetIdentifier property value. The wireless LAN basic service set identifier of the media endpoint used to connect to the network. +func (m *NetworkInfo) GetBasicServiceSetIdentifier()(*string) { + return m.basicServiceSetIdentifier +} +// GetConnectionType gets the connectionType property value. The connectionType property +func (m *NetworkInfo) GetConnectionType()(*NetworkConnectionType) { + return m.connectionType +} +// GetDelayEventRatio gets the delayEventRatio property value. Fraction of the call that the media endpoint detected the network delay was significant enough to impact the ability to have real-time two-way communication. +func (m *NetworkInfo) GetDelayEventRatio()(*float32) { + return m.delayEventRatio +} +// GetDnsSuffix gets the dnsSuffix property value. DNS suffix associated with the network adapter of the media endpoint. +func (m *NetworkInfo) GetDnsSuffix()(*string) { + return m.dnsSuffix +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bandwidthLowEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetBandwidthLowEventRatio(val) + } + return nil + } + res["basicServiceSetIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBasicServiceSetIdentifier(val) + } + return nil + } + res["connectionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNetworkConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetConnectionType(val.(*NetworkConnectionType)) + } + return nil + } + res["delayEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetDelayEventRatio(val) + } + return nil + } + res["dnsSuffix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDnsSuffix(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(val) + } + return nil + } + res["linkSpeed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetLinkSpeed(val) + } + return nil + } + res["macAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMacAddress(val) + } + return nil + } + res["networkTransportProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNetworkTransportProtocol) + if err != nil { + return err + } + if val != nil { + m.SetNetworkTransportProtocol(val.(*NetworkTransportProtocol)) + } + 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["port"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPort(val) + } + return nil + } + res["receivedQualityEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetReceivedQualityEventRatio(val) + } + return nil + } + res["reflexiveIPAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReflexiveIPAddress(val) + } + return nil + } + res["relayIPAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelayIPAddress(val) + } + return nil + } + res["relayPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRelayPort(val) + } + return nil + } + res["sentQualityEventRatio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetSentQualityEventRatio(val) + } + return nil + } + res["subnet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubnet(val) + } + return nil + } + res["traceRouteHops"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTraceRouteHopFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TraceRouteHopable, len(val)) + for i, v := range val { + res[i] = v.(TraceRouteHopable) + } + m.SetTraceRouteHops(res) + } + return nil + } + res["wifiBand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWifiBand) + if err != nil { + return err + } + if val != nil { + m.SetWifiBand(val.(*WifiBand)) + } + return nil + } + res["wifiBatteryCharge"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWifiBatteryCharge(val) + } + return nil + } + res["wifiChannel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWifiChannel(val) + } + return nil + } + res["wifiMicrosoftDriver"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiMicrosoftDriver(val) + } + return nil + } + res["wifiMicrosoftDriverVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiMicrosoftDriverVersion(val) + } + return nil + } + res["wifiRadioType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWifiRadioType) + if err != nil { + return err + } + if val != nil { + m.SetWifiRadioType(val.(*WifiRadioType)) + } + return nil + } + res["wifiSignalStrength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWifiSignalStrength(val) + } + return nil + } + res["wifiVendorDriver"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiVendorDriver(val) + } + return nil + } + res["wifiVendorDriverVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiVendorDriverVersion(val) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. IP address of the media endpoint. +func (m *NetworkInfo) GetIpAddress()(*string) { + return m.ipAddress +} +// GetLinkSpeed gets the linkSpeed property value. Link speed in bits per second reported by the network adapter used by the media endpoint. +func (m *NetworkInfo) GetLinkSpeed()(*int64) { + return m.linkSpeed +} +// GetMacAddress gets the macAddress property value. The media access control (MAC) address of the media endpoint's network device. +func (m *NetworkInfo) GetMacAddress()(*string) { + return m.macAddress +} +// GetNetworkTransportProtocol gets the networkTransportProtocol property value. The networkTransportProtocol property +func (m *NetworkInfo) GetNetworkTransportProtocol()(*NetworkTransportProtocol) { + return m.networkTransportProtocol +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NetworkInfo) GetOdataType()(*string) { + return m.odataType +} +// GetPort gets the port property value. Network port number used by media endpoint. +func (m *NetworkInfo) GetPort()(*int32) { + return m.port +} +// GetReceivedQualityEventRatio gets the receivedQualityEventRatio property value. Fraction of the call that the media endpoint detected the network was causing poor quality of the audio received. +func (m *NetworkInfo) GetReceivedQualityEventRatio()(*float32) { + return m.receivedQualityEventRatio +} +// GetReflexiveIPAddress gets the reflexiveIPAddress property value. IP address of the media endpoint as seen by the media relay server. This is typically the public internet IP address associated to the endpoint. +func (m *NetworkInfo) GetReflexiveIPAddress()(*string) { + return m.reflexiveIPAddress +} +// GetRelayIPAddress gets the relayIPAddress property value. IP address of the media relay server allocated by the media endpoint. +func (m *NetworkInfo) GetRelayIPAddress()(*string) { + return m.relayIPAddress +} +// GetRelayPort gets the relayPort property value. Network port number allocated on the media relay server by the media endpoint. +func (m *NetworkInfo) GetRelayPort()(*int32) { + return m.relayPort +} +// GetSentQualityEventRatio gets the sentQualityEventRatio property value. Fraction of the call that the media endpoint detected the network was causing poor quality of the audio sent. +func (m *NetworkInfo) GetSentQualityEventRatio()(*float32) { + return m.sentQualityEventRatio +} +// GetSubnet gets the subnet property value. Subnet used for media stream by the media endpoint. +func (m *NetworkInfo) GetSubnet()(*string) { + return m.subnet +} +// GetTraceRouteHops gets the traceRouteHops property value. List of network trace route hops collected for this media stream.* +func (m *NetworkInfo) GetTraceRouteHops()([]TraceRouteHopable) { + return m.traceRouteHops +} +// GetWifiBand gets the wifiBand property value. The wifiBand property +func (m *NetworkInfo) GetWifiBand()(*WifiBand) { + return m.wifiBand +} +// GetWifiBatteryCharge gets the wifiBatteryCharge property value. Estimated remaining battery charge in percentage reported by the media endpoint. +func (m *NetworkInfo) GetWifiBatteryCharge()(*int32) { + return m.wifiBatteryCharge +} +// GetWifiChannel gets the wifiChannel property value. WiFi channel used by the media endpoint. +func (m *NetworkInfo) GetWifiChannel()(*int32) { + return m.wifiChannel +} +// GetWifiMicrosoftDriver gets the wifiMicrosoftDriver property value. Name of the Microsoft WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. +func (m *NetworkInfo) GetWifiMicrosoftDriver()(*string) { + return m.wifiMicrosoftDriver +} +// GetWifiMicrosoftDriverVersion gets the wifiMicrosoftDriverVersion property value. Version of the Microsoft WiFi driver used by the media endpoint. +func (m *NetworkInfo) GetWifiMicrosoftDriverVersion()(*string) { + return m.wifiMicrosoftDriverVersion +} +// GetWifiRadioType gets the wifiRadioType property value. The wifiRadioType property +func (m *NetworkInfo) GetWifiRadioType()(*WifiRadioType) { + return m.wifiRadioType +} +// GetWifiSignalStrength gets the wifiSignalStrength property value. WiFi signal strength in percentage reported by the media endpoint. +func (m *NetworkInfo) GetWifiSignalStrength()(*int32) { + return m.wifiSignalStrength +} +// GetWifiVendorDriver gets the wifiVendorDriver property value. Name of the WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. +func (m *NetworkInfo) GetWifiVendorDriver()(*string) { + return m.wifiVendorDriver +} +// GetWifiVendorDriverVersion gets the wifiVendorDriverVersion property value. Version of the WiFi driver used by the media endpoint. +func (m *NetworkInfo) GetWifiVendorDriverVersion()(*string) { + return m.wifiVendorDriverVersion +} +// Serialize serializes information the current object +func (m *NetworkInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat32Value("bandwidthLowEventRatio", m.GetBandwidthLowEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("basicServiceSetIdentifier", m.GetBasicServiceSetIdentifier()) + if err != nil { + return err + } + } + if m.GetConnectionType() != nil { + cast := (*m.GetConnectionType()).String() + err := writer.WriteStringValue("connectionType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("delayEventRatio", m.GetDelayEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dnsSuffix", m.GetDnsSuffix()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("linkSpeed", m.GetLinkSpeed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("macAddress", m.GetMacAddress()) + if err != nil { + return err + } + } + if m.GetNetworkTransportProtocol() != nil { + cast := (*m.GetNetworkTransportProtocol()).String() + err := writer.WriteStringValue("networkTransportProtocol", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("port", m.GetPort()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("receivedQualityEventRatio", m.GetReceivedQualityEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reflexiveIPAddress", m.GetReflexiveIPAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relayIPAddress", m.GetRelayIPAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("relayPort", m.GetRelayPort()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("sentQualityEventRatio", m.GetSentQualityEventRatio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subnet", m.GetSubnet()) + if err != nil { + return err + } + } + if m.GetTraceRouteHops() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTraceRouteHops())) + for i, v := range m.GetTraceRouteHops() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("traceRouteHops", cast) + if err != nil { + return err + } + } + if m.GetWifiBand() != nil { + cast := (*m.GetWifiBand()).String() + err := writer.WriteStringValue("wifiBand", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wifiBatteryCharge", m.GetWifiBatteryCharge()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wifiChannel", m.GetWifiChannel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("wifiMicrosoftDriver", m.GetWifiMicrosoftDriver()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("wifiMicrosoftDriverVersion", m.GetWifiMicrosoftDriverVersion()) + if err != nil { + return err + } + } + if m.GetWifiRadioType() != nil { + cast := (*m.GetWifiRadioType()).String() + err := writer.WriteStringValue("wifiRadioType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("wifiSignalStrength", m.GetWifiSignalStrength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("wifiVendorDriver", m.GetWifiVendorDriver()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("wifiVendorDriverVersion", m.GetWifiVendorDriverVersion()) + 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 *NetworkInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBandwidthLowEventRatio sets the bandwidthLowEventRatio property value. Fraction of the call that the media endpoint detected the available bandwidth or bandwidth policy was low enough to cause poor quality of the audio sent. +func (m *NetworkInfo) SetBandwidthLowEventRatio(value *float32)() { + m.bandwidthLowEventRatio = value +} +// SetBasicServiceSetIdentifier sets the basicServiceSetIdentifier property value. The wireless LAN basic service set identifier of the media endpoint used to connect to the network. +func (m *NetworkInfo) SetBasicServiceSetIdentifier(value *string)() { + m.basicServiceSetIdentifier = value +} +// SetConnectionType sets the connectionType property value. The connectionType property +func (m *NetworkInfo) SetConnectionType(value *NetworkConnectionType)() { + m.connectionType = value +} +// SetDelayEventRatio sets the delayEventRatio property value. Fraction of the call that the media endpoint detected the network delay was significant enough to impact the ability to have real-time two-way communication. +func (m *NetworkInfo) SetDelayEventRatio(value *float32)() { + m.delayEventRatio = value +} +// SetDnsSuffix sets the dnsSuffix property value. DNS suffix associated with the network adapter of the media endpoint. +func (m *NetworkInfo) SetDnsSuffix(value *string)() { + m.dnsSuffix = value +} +// SetIpAddress sets the ipAddress property value. IP address of the media endpoint. +func (m *NetworkInfo) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetLinkSpeed sets the linkSpeed property value. Link speed in bits per second reported by the network adapter used by the media endpoint. +func (m *NetworkInfo) SetLinkSpeed(value *int64)() { + m.linkSpeed = value +} +// SetMacAddress sets the macAddress property value. The media access control (MAC) address of the media endpoint's network device. +func (m *NetworkInfo) SetMacAddress(value *string)() { + m.macAddress = value +} +// SetNetworkTransportProtocol sets the networkTransportProtocol property value. The networkTransportProtocol property +func (m *NetworkInfo) SetNetworkTransportProtocol(value *NetworkTransportProtocol)() { + m.networkTransportProtocol = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NetworkInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetPort sets the port property value. Network port number used by media endpoint. +func (m *NetworkInfo) SetPort(value *int32)() { + m.port = value +} +// SetReceivedQualityEventRatio sets the receivedQualityEventRatio property value. Fraction of the call that the media endpoint detected the network was causing poor quality of the audio received. +func (m *NetworkInfo) SetReceivedQualityEventRatio(value *float32)() { + m.receivedQualityEventRatio = value +} +// SetReflexiveIPAddress sets the reflexiveIPAddress property value. IP address of the media endpoint as seen by the media relay server. This is typically the public internet IP address associated to the endpoint. +func (m *NetworkInfo) SetReflexiveIPAddress(value *string)() { + m.reflexiveIPAddress = value +} +// SetRelayIPAddress sets the relayIPAddress property value. IP address of the media relay server allocated by the media endpoint. +func (m *NetworkInfo) SetRelayIPAddress(value *string)() { + m.relayIPAddress = value +} +// SetRelayPort sets the relayPort property value. Network port number allocated on the media relay server by the media endpoint. +func (m *NetworkInfo) SetRelayPort(value *int32)() { + m.relayPort = value +} +// SetSentQualityEventRatio sets the sentQualityEventRatio property value. Fraction of the call that the media endpoint detected the network was causing poor quality of the audio sent. +func (m *NetworkInfo) SetSentQualityEventRatio(value *float32)() { + m.sentQualityEventRatio = value +} +// SetSubnet sets the subnet property value. Subnet used for media stream by the media endpoint. +func (m *NetworkInfo) SetSubnet(value *string)() { + m.subnet = value +} +// SetTraceRouteHops sets the traceRouteHops property value. List of network trace route hops collected for this media stream.* +func (m *NetworkInfo) SetTraceRouteHops(value []TraceRouteHopable)() { + m.traceRouteHops = value +} +// SetWifiBand sets the wifiBand property value. The wifiBand property +func (m *NetworkInfo) SetWifiBand(value *WifiBand)() { + m.wifiBand = value +} +// SetWifiBatteryCharge sets the wifiBatteryCharge property value. Estimated remaining battery charge in percentage reported by the media endpoint. +func (m *NetworkInfo) SetWifiBatteryCharge(value *int32)() { + m.wifiBatteryCharge = value +} +// SetWifiChannel sets the wifiChannel property value. WiFi channel used by the media endpoint. +func (m *NetworkInfo) SetWifiChannel(value *int32)() { + m.wifiChannel = value +} +// SetWifiMicrosoftDriver sets the wifiMicrosoftDriver property value. Name of the Microsoft WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. +func (m *NetworkInfo) SetWifiMicrosoftDriver(value *string)() { + m.wifiMicrosoftDriver = value +} +// SetWifiMicrosoftDriverVersion sets the wifiMicrosoftDriverVersion property value. Version of the Microsoft WiFi driver used by the media endpoint. +func (m *NetworkInfo) SetWifiMicrosoftDriverVersion(value *string)() { + m.wifiMicrosoftDriverVersion = value +} +// SetWifiRadioType sets the wifiRadioType property value. The wifiRadioType property +func (m *NetworkInfo) SetWifiRadioType(value *WifiRadioType)() { + m.wifiRadioType = value +} +// SetWifiSignalStrength sets the wifiSignalStrength property value. WiFi signal strength in percentage reported by the media endpoint. +func (m *NetworkInfo) SetWifiSignalStrength(value *int32)() { + m.wifiSignalStrength = value +} +// SetWifiVendorDriver sets the wifiVendorDriver property value. Name of the WiFi driver used by the media endpoint. Value may be localized based on the language used by endpoint. +func (m *NetworkInfo) SetWifiVendorDriver(value *string)() { + m.wifiVendorDriver = value +} +// SetWifiVendorDriverVersion sets the wifiVendorDriverVersion property value. Version of the WiFi driver used by the media endpoint. +func (m *NetworkInfo) SetWifiVendorDriverVersion(value *string)() { + m.wifiVendorDriverVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/network_infoable.go b/src/internal/connector/graph/betasdk/models/callrecords/network_infoable.go new file mode 100644 index 000000000..a3f8c68b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/network_infoable.go @@ -0,0 +1,65 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInfoable +type NetworkInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBandwidthLowEventRatio()(*float32) + GetBasicServiceSetIdentifier()(*string) + GetConnectionType()(*NetworkConnectionType) + GetDelayEventRatio()(*float32) + GetDnsSuffix()(*string) + GetIpAddress()(*string) + GetLinkSpeed()(*int64) + GetMacAddress()(*string) + GetNetworkTransportProtocol()(*NetworkTransportProtocol) + GetOdataType()(*string) + GetPort()(*int32) + GetReceivedQualityEventRatio()(*float32) + GetReflexiveIPAddress()(*string) + GetRelayIPAddress()(*string) + GetRelayPort()(*int32) + GetSentQualityEventRatio()(*float32) + GetSubnet()(*string) + GetTraceRouteHops()([]TraceRouteHopable) + GetWifiBand()(*WifiBand) + GetWifiBatteryCharge()(*int32) + GetWifiChannel()(*int32) + GetWifiMicrosoftDriver()(*string) + GetWifiMicrosoftDriverVersion()(*string) + GetWifiRadioType()(*WifiRadioType) + GetWifiSignalStrength()(*int32) + GetWifiVendorDriver()(*string) + GetWifiVendorDriverVersion()(*string) + SetBandwidthLowEventRatio(value *float32)() + SetBasicServiceSetIdentifier(value *string)() + SetConnectionType(value *NetworkConnectionType)() + SetDelayEventRatio(value *float32)() + SetDnsSuffix(value *string)() + SetIpAddress(value *string)() + SetLinkSpeed(value *int64)() + SetMacAddress(value *string)() + SetNetworkTransportProtocol(value *NetworkTransportProtocol)() + SetOdataType(value *string)() + SetPort(value *int32)() + SetReceivedQualityEventRatio(value *float32)() + SetReflexiveIPAddress(value *string)() + SetRelayIPAddress(value *string)() + SetRelayPort(value *int32)() + SetSentQualityEventRatio(value *float32)() + SetSubnet(value *string)() + SetTraceRouteHops(value []TraceRouteHopable)() + SetWifiBand(value *WifiBand)() + SetWifiBatteryCharge(value *int32)() + SetWifiChannel(value *int32)() + SetWifiMicrosoftDriver(value *string)() + SetWifiMicrosoftDriverVersion(value *string)() + SetWifiRadioType(value *WifiRadioType)() + SetWifiSignalStrength(value *int32)() + SetWifiVendorDriver(value *string)() + SetWifiVendorDriverVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/network_transport_protocol.go b/src/internal/connector/graph/betasdk/models/callrecords/network_transport_protocol.go new file mode 100644 index 000000000..99cff613e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/network_transport_protocol.go @@ -0,0 +1,40 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NetworkTransportProtocol int + +const ( + UNKNOWN_NETWORKTRANSPORTPROTOCOL NetworkTransportProtocol = iota + UDP_NETWORKTRANSPORTPROTOCOL + TCP_NETWORKTRANSPORTPROTOCOL + UNKNOWNFUTUREVALUE_NETWORKTRANSPORTPROTOCOL +) + +func (i NetworkTransportProtocol) String() string { + return []string{"unknown", "udp", "tcp", "unknownFutureValue"}[i] +} +func ParseNetworkTransportProtocol(v string) (interface{}, error) { + result := UNKNOWN_NETWORKTRANSPORTPROTOCOL + switch v { + case "unknown": + result = UNKNOWN_NETWORKTRANSPORTPROTOCOL + case "udp": + result = UDP_NETWORKTRANSPORTPROTOCOL + case "tcp": + result = TCP_NETWORKTRANSPORTPROTOCOL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_NETWORKTRANSPORTPROTOCOL + default: + return 0, errors.New("Unknown NetworkTransportProtocol value: " + v) + } + return &result, nil +} +func SerializeNetworkTransportProtocol(values []NetworkTransportProtocol) []string { + 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/callrecords/participant_endpoint.go b/src/internal/connector/graph/betasdk/models/callrecords/participant_endpoint.go new file mode 100644 index 000000000..9cab1d906 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/participant_endpoint.go @@ -0,0 +1,89 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ParticipantEndpoint +type ParticipantEndpoint struct { + Endpoint + // The feedback provided by the user of this endpoint about the quality of the session. + feedback UserFeedbackable + // Identity associated with the endpoint. + identity ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable +} +// NewParticipantEndpoint instantiates a new ParticipantEndpoint and sets the default values. +func NewParticipantEndpoint()(*ParticipantEndpoint) { + m := &ParticipantEndpoint{ + Endpoint: *NewEndpoint(), + } + odataTypeValue := "#microsoft.graph.callRecords.participantEndpoint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateParticipantEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipantEndpoint(), nil +} +// GetFeedback gets the feedback property value. The feedback provided by the user of this endpoint about the quality of the session. +func (m *ParticipantEndpoint) GetFeedback()(UserFeedbackable) { + return m.feedback +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParticipantEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Endpoint.GetFieldDeserializers() + res["feedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFeedbackFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeedback(val.(UserFeedbackable)) + } + return nil + } + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentity(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + return res +} +// GetIdentity gets the identity property value. Identity associated with the endpoint. +func (m *ParticipantEndpoint) GetIdentity()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.identity +} +// Serialize serializes information the current object +func (m *ParticipantEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Endpoint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("feedback", m.GetFeedback()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + return nil +} +// SetFeedback sets the feedback property value. The feedback provided by the user of this endpoint about the quality of the session. +func (m *ParticipantEndpoint) SetFeedback(value UserFeedbackable)() { + m.feedback = value +} +// SetIdentity sets the identity property value. Identity associated with the endpoint. +func (m *ParticipantEndpoint) SetIdentity(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.identity = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/participant_endpointable.go b/src/internal/connector/graph/betasdk/models/callrecords/participant_endpointable.go new file mode 100644 index 000000000..8ecd9deb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/participant_endpointable.go @@ -0,0 +1,16 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ParticipantEndpointable +type ParticipantEndpointable interface { + Endpointable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeedback()(UserFeedbackable) + GetIdentity()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + SetFeedback(value UserFeedbackable)() + SetIdentity(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/product_family.go b/src/internal/connector/graph/betasdk/models/callrecords/product_family.go new file mode 100644 index 000000000..d827f5561 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/product_family.go @@ -0,0 +1,46 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProductFamily int + +const ( + UNKNOWN_PRODUCTFAMILY ProductFamily = iota + TEAMS_PRODUCTFAMILY + SKYPEFORBUSINESS_PRODUCTFAMILY + LYNC_PRODUCTFAMILY + UNKNOWNFUTUREVALUE_PRODUCTFAMILY + AZURECOMMUNICATIONSERVICES_PRODUCTFAMILY +) + +func (i ProductFamily) String() string { + return []string{"unknown", "teams", "skypeForBusiness", "lync", "unknownFutureValue", "azureCommunicationServices"}[i] +} +func ParseProductFamily(v string) (interface{}, error) { + result := UNKNOWN_PRODUCTFAMILY + switch v { + case "unknown": + result = UNKNOWN_PRODUCTFAMILY + case "teams": + result = TEAMS_PRODUCTFAMILY + case "skypeForBusiness": + result = SKYPEFORBUSINESS_PRODUCTFAMILY + case "lync": + result = LYNC_PRODUCTFAMILY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRODUCTFAMILY + case "azureCommunicationServices": + result = AZURECOMMUNICATIONSERVICES_PRODUCTFAMILY + default: + return 0, errors.New("Unknown ProductFamily value: " + v) + } + return &result, nil +} +func SerializeProductFamily(values []ProductFamily) []string { + 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/callrecords/segment.go b/src/internal/connector/graph/betasdk/models/callrecords/segment.go new file mode 100644 index 000000000..a5d69eb52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/segment.go @@ -0,0 +1,200 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Segment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Segment struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Endpoint that answered this segment. + callee Endpointable + // Endpoint that initiated this segment. + caller Endpointable + // UTC time when the segment ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Failure information associated with the segment if it failed. + failureInfo FailureInfoable + // Media associated with this segment. + media []Mediaable + // UTC time when the segment started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewSegment instantiates a new segment and sets the default values. +func NewSegment()(*Segment) { + m := &Segment{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSegmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSegmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSegment(), nil +} +// GetCallee gets the callee property value. Endpoint that answered this segment. +func (m *Segment) GetCallee()(Endpointable) { + return m.callee +} +// GetCaller gets the caller property value. Endpoint that initiated this segment. +func (m *Segment) GetCaller()(Endpointable) { + return m.caller +} +// GetEndDateTime gets the endDateTime property value. UTC time when the segment ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Segment) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFailureInfo gets the failureInfo property value. Failure information associated with the segment if it failed. +func (m *Segment) GetFailureInfo()(FailureInfoable) { + return m.failureInfo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Segment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["callee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallee(val.(Endpointable)) + } + return nil + } + res["caller"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCaller(val.(Endpointable)) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["failureInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFailureInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFailureInfo(val.(FailureInfoable)) + } + return nil + } + res["media"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Mediaable, len(val)) + for i, v := range val { + res[i] = v.(Mediaable) + } + m.SetMedia(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetMedia gets the media property value. Media associated with this segment. +func (m *Segment) GetMedia()([]Mediaable) { + return m.media +} +// GetStartDateTime gets the startDateTime property value. UTC time when the segment started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Segment) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *Segment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("callee", m.GetCallee()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("caller", m.GetCaller()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("failureInfo", m.GetFailureInfo()) + if err != nil { + return err + } + } + if m.GetMedia() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMedia())) + for i, v := range m.GetMedia() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("media", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCallee sets the callee property value. Endpoint that answered this segment. +func (m *Segment) SetCallee(value Endpointable)() { + m.callee = value +} +// SetCaller sets the caller property value. Endpoint that initiated this segment. +func (m *Segment) SetCaller(value Endpointable)() { + m.caller = value +} +// SetEndDateTime sets the endDateTime property value. UTC time when the segment ended. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Segment) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetFailureInfo sets the failureInfo property value. Failure information associated with the segment if it failed. +func (m *Segment) SetFailureInfo(value FailureInfoable)() { + m.failureInfo = value +} +// SetMedia sets the media property value. Media associated with this segment. +func (m *Segment) SetMedia(value []Mediaable)() { + m.media = value +} +// SetStartDateTime sets the startDateTime property value. UTC time when the segment started. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Segment) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_response.go new file mode 100644 index 000000000..c939c6c7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SegmentCollectionResponse +type SegmentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Segmentable +} +// NewSegmentCollectionResponse instantiates a new SegmentCollectionResponse and sets the default values. +func NewSegmentCollectionResponse()(*SegmentCollectionResponse) { + m := &SegmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSegmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSegmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSegmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SegmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Segmentable, len(val)) + for i, v := range val { + res[i] = v.(Segmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SegmentCollectionResponse) GetValue()([]Segmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *SegmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SegmentCollectionResponse) SetValue(value []Segmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_responseable.go new file mode 100644 index 000000000..086ffcadd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/segment_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SegmentCollectionResponseable +type SegmentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Segmentable) + SetValue(value []Segmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/segmentable.go b/src/internal/connector/graph/betasdk/models/callrecords/segmentable.go new file mode 100644 index 000000000..918a65a80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/segmentable.go @@ -0,0 +1,25 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Segmentable +type Segmentable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallee()(Endpointable) + GetCaller()(Endpointable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailureInfo()(FailureInfoable) + GetMedia()([]Mediaable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCallee(value Endpointable)() + SetCaller(value Endpointable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailureInfo(value FailureInfoable)() + SetMedia(value []Mediaable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/service_endpoint.go b/src/internal/connector/graph/betasdk/models/callrecords/service_endpoint.go new file mode 100644 index 000000000..bfef20cfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/service_endpoint.go @@ -0,0 +1,36 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceEndpoint +type ServiceEndpoint struct { + Endpoint +} +// NewServiceEndpoint instantiates a new ServiceEndpoint and sets the default values. +func NewServiceEndpoint()(*ServiceEndpoint) { + m := &ServiceEndpoint{ + Endpoint: *NewEndpoint(), + } + odataTypeValue := "#microsoft.graph.callRecords.serviceEndpoint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServiceEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceEndpoint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Endpoint.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ServiceEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Endpoint.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/service_endpointable.go b/src/internal/connector/graph/betasdk/models/callrecords/service_endpointable.go new file mode 100644 index 000000000..522d7a111 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/service_endpointable.go @@ -0,0 +1,11 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceEndpointable +type ServiceEndpointable interface { + Endpointable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/service_role.go b/src/internal/connector/graph/betasdk/models/callrecords/service_role.go new file mode 100644 index 000000000..bf322ca35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/service_role.go @@ -0,0 +1,94 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceRole int + +const ( + UNKNOWN_SERVICEROLE ServiceRole = iota + CUSTOMBOT_SERVICEROLE + SKYPEFORBUSINESSMICROSOFTTEAMSGATEWAY_SERVICEROLE + SKYPEFORBUSINESSAUDIOVIDEOMCU_SERVICEROLE + SKYPEFORBUSINESSAPPLICATIONSHARINGMCU_SERVICEROLE + SKYPEFORBUSINESSCALLQUEUES_SERVICEROLE + SKYPEFORBUSINESSAUTOATTENDANT_SERVICEROLE + MEDIATIONSERVER_SERVICEROLE + MEDIATIONSERVERCLOUDCONNECTOREDITION_SERVICEROLE + EXCHANGEUNIFIEDMESSAGINGSERVICE_SERVICEROLE + MEDIACONTROLLER_SERVICEROLE + CONFERENCINGANNOUNCEMENTSERVICE_SERVICEROLE + CONFERENCINGATTENDANT_SERVICEROLE + AUDIOTELECONFERENCERCONTROLLER_SERVICEROLE + SKYPEFORBUSINESSUNIFIEDCOMMUNICATIONAPPLICATIONPLATFORM_SERVICEROLE + RESPONSEGROUPSERVICEANNOUNCEMENTSERVICE_SERVICEROLE + GATEWAY_SERVICEROLE + SKYPETRANSLATOR_SERVICEROLE + SKYPEFORBUSINESSATTENDANT_SERVICEROLE + RESPONSEGROUPSERVICE_SERVICEROLE + VOICEMAIL_SERVICEROLE + UNKNOWNFUTUREVALUE_SERVICEROLE +) + +func (i ServiceRole) String() string { + return []string{"unknown", "customBot", "skypeForBusinessMicrosoftTeamsGateway", "skypeForBusinessAudioVideoMcu", "skypeForBusinessApplicationSharingMcu", "skypeForBusinessCallQueues", "skypeForBusinessAutoAttendant", "mediationServer", "mediationServerCloudConnectorEdition", "exchangeUnifiedMessagingService", "mediaController", "conferencingAnnouncementService", "conferencingAttendant", "audioTeleconferencerController", "skypeForBusinessUnifiedCommunicationApplicationPlatform", "responseGroupServiceAnnouncementService", "gateway", "skypeTranslator", "skypeForBusinessAttendant", "responseGroupService", "voicemail", "unknownFutureValue"}[i] +} +func ParseServiceRole(v string) (interface{}, error) { + result := UNKNOWN_SERVICEROLE + switch v { + case "unknown": + result = UNKNOWN_SERVICEROLE + case "customBot": + result = CUSTOMBOT_SERVICEROLE + case "skypeForBusinessMicrosoftTeamsGateway": + result = SKYPEFORBUSINESSMICROSOFTTEAMSGATEWAY_SERVICEROLE + case "skypeForBusinessAudioVideoMcu": + result = SKYPEFORBUSINESSAUDIOVIDEOMCU_SERVICEROLE + case "skypeForBusinessApplicationSharingMcu": + result = SKYPEFORBUSINESSAPPLICATIONSHARINGMCU_SERVICEROLE + case "skypeForBusinessCallQueues": + result = SKYPEFORBUSINESSCALLQUEUES_SERVICEROLE + case "skypeForBusinessAutoAttendant": + result = SKYPEFORBUSINESSAUTOATTENDANT_SERVICEROLE + case "mediationServer": + result = MEDIATIONSERVER_SERVICEROLE + case "mediationServerCloudConnectorEdition": + result = MEDIATIONSERVERCLOUDCONNECTOREDITION_SERVICEROLE + case "exchangeUnifiedMessagingService": + result = EXCHANGEUNIFIEDMESSAGINGSERVICE_SERVICEROLE + case "mediaController": + result = MEDIACONTROLLER_SERVICEROLE + case "conferencingAnnouncementService": + result = CONFERENCINGANNOUNCEMENTSERVICE_SERVICEROLE + case "conferencingAttendant": + result = CONFERENCINGATTENDANT_SERVICEROLE + case "audioTeleconferencerController": + result = AUDIOTELECONFERENCERCONTROLLER_SERVICEROLE + case "skypeForBusinessUnifiedCommunicationApplicationPlatform": + result = SKYPEFORBUSINESSUNIFIEDCOMMUNICATIONAPPLICATIONPLATFORM_SERVICEROLE + case "responseGroupServiceAnnouncementService": + result = RESPONSEGROUPSERVICEANNOUNCEMENTSERVICE_SERVICEROLE + case "gateway": + result = GATEWAY_SERVICEROLE + case "skypeTranslator": + result = SKYPETRANSLATOR_SERVICEROLE + case "skypeForBusinessAttendant": + result = SKYPEFORBUSINESSATTENDANT_SERVICEROLE + case "responseGroupService": + result = RESPONSEGROUPSERVICE_SERVICEROLE + case "voicemail": + result = VOICEMAIL_SERVICEROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEROLE + default: + return 0, errors.New("Unknown ServiceRole value: " + v) + } + return &result, nil +} +func SerializeServiceRole(values []ServiceRole) []string { + 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/callrecords/service_user_agent.go b/src/internal/connector/graph/betasdk/models/callrecords/service_user_agent.go new file mode 100644 index 000000000..820a2d5fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/service_user_agent.go @@ -0,0 +1,63 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUserAgent +type ServiceUserAgent struct { + UserAgent + // The role property + role *ServiceRole +} +// NewServiceUserAgent instantiates a new ServiceUserAgent and sets the default values. +func NewServiceUserAgent()(*ServiceUserAgent) { + m := &ServiceUserAgent{ + UserAgent: *NewUserAgent(), + } + odataTypeValue := "#microsoft.graph.callRecords.serviceUserAgent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServiceUserAgentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceUserAgentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceUserAgent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceUserAgent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserAgent.GetFieldDeserializers() + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceRole) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*ServiceRole)) + } + return nil + } + return res +} +// GetRole gets the role property value. The role property +func (m *ServiceUserAgent) GetRole()(*ServiceRole) { + return m.role +} +// Serialize serializes information the current object +func (m *ServiceUserAgent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserAgent.Serialize(writer) + if err != nil { + return err + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + return nil +} +// SetRole sets the role property value. The role property +func (m *ServiceUserAgent) SetRole(value *ServiceRole)() { + m.role = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/service_user_agentable.go b/src/internal/connector/graph/betasdk/models/callrecords/service_user_agentable.go new file mode 100644 index 000000000..59affb386 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/service_user_agentable.go @@ -0,0 +1,13 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUserAgentable +type ServiceUserAgentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserAgentable + GetRole()(*ServiceRole) + SetRole(value *ServiceRole)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/session.go b/src/internal/connector/graph/betasdk/models/callrecords/session.go new file mode 100644 index 000000000..b5e3b86f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/session.go @@ -0,0 +1,230 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Session provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Session struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Endpoint that answered the session. + callee Endpointable + // Endpoint that initiated the session. + caller Endpointable + // UTC time when the last user left the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Failure information associated with the session if the session failed. + failureInfo FailureInfoable + // List of modalities present in the session. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. + modalities []Modality + // The list of segments involved in the session. Read-only. Nullable. + segments []Segmentable + // UTC fime when the first user joined the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewSession instantiates a new session and sets the default values. +func NewSession()(*Session) { + m := &Session{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSessionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSessionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSession(), nil +} +// GetCallee gets the callee property value. Endpoint that answered the session. +func (m *Session) GetCallee()(Endpointable) { + return m.callee +} +// GetCaller gets the caller property value. Endpoint that initiated the session. +func (m *Session) GetCaller()(Endpointable) { + return m.caller +} +// GetEndDateTime gets the endDateTime property value. UTC time when the last user left the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Session) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFailureInfo gets the failureInfo property value. Failure information associated with the session if the session failed. +func (m *Session) GetFailureInfo()(FailureInfoable) { + return m.failureInfo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Session) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["callee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallee(val.(Endpointable)) + } + return nil + } + res["caller"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCaller(val.(Endpointable)) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["failureInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFailureInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFailureInfo(val.(FailureInfoable)) + } + return nil + } + res["modalities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseModality) + if err != nil { + return err + } + if val != nil { + res := make([]Modality, len(val)) + for i, v := range val { + res[i] = *(v.(*Modality)) + } + m.SetModalities(res) + } + return nil + } + res["segments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Segmentable, len(val)) + for i, v := range val { + res[i] = v.(Segmentable) + } + m.SetSegments(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetModalities gets the modalities property value. List of modalities present in the session. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. +func (m *Session) GetModalities()([]Modality) { + return m.modalities +} +// GetSegments gets the segments property value. The list of segments involved in the session. Read-only. Nullable. +func (m *Session) GetSegments()([]Segmentable) { + return m.segments +} +// GetStartDateTime gets the startDateTime property value. UTC fime when the first user joined the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Session) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *Session) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("callee", m.GetCallee()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("caller", m.GetCaller()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("failureInfo", m.GetFailureInfo()) + if err != nil { + return err + } + } + if m.GetModalities() != nil { + err = writer.WriteCollectionOfStringValues("modalities", SerializeModality(m.GetModalities())) + if err != nil { + return err + } + } + if m.GetSegments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSegments())) + for i, v := range m.GetSegments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("segments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCallee sets the callee property value. Endpoint that answered the session. +func (m *Session) SetCallee(value Endpointable)() { + m.callee = value +} +// SetCaller sets the caller property value. Endpoint that initiated the session. +func (m *Session) SetCaller(value Endpointable)() { + m.caller = value +} +// SetEndDateTime sets the endDateTime property value. UTC time when the last user left the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Session) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetFailureInfo sets the failureInfo property value. Failure information associated with the session if the session failed. +func (m *Session) SetFailureInfo(value FailureInfoable)() { + m.failureInfo = value +} +// SetModalities sets the modalities property value. List of modalities present in the session. Possible values are: unknown, audio, video, videoBasedScreenSharing, data, screenSharing, unknownFutureValue. +func (m *Session) SetModalities(value []Modality)() { + m.modalities = value +} +// SetSegments sets the segments property value. The list of segments involved in the session. Read-only. Nullable. +func (m *Session) SetSegments(value []Segmentable)() { + m.segments = value +} +// SetStartDateTime sets the startDateTime property value. UTC fime when the first user joined the session. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Session) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/session_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/session_collection_response.go new file mode 100644 index 000000000..79cefc661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/session_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SessionCollectionResponse +type SessionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Sessionable +} +// NewSessionCollectionResponse instantiates a new SessionCollectionResponse and sets the default values. +func NewSessionCollectionResponse()(*SessionCollectionResponse) { + m := &SessionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSessionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSessionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSessionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SessionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Sessionable, len(val)) + for i, v := range val { + res[i] = v.(Sessionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SessionCollectionResponse) GetValue()([]Sessionable) { + return m.value +} +// Serialize serializes information the current object +func (m *SessionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SessionCollectionResponse) SetValue(value []Sessionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/session_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/session_collection_responseable.go new file mode 100644 index 000000000..169e55f18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/session_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SessionCollectionResponseable +type SessionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Sessionable) + SetValue(value []Sessionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/sessionable.go b/src/internal/connector/graph/betasdk/models/callrecords/sessionable.go new file mode 100644 index 000000000..05128e6b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/sessionable.go @@ -0,0 +1,27 @@ +package callrecords + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Sessionable +type Sessionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallee()(Endpointable) + GetCaller()(Endpointable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailureInfo()(FailureInfoable) + GetModalities()([]Modality) + GetSegments()([]Segmentable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCallee(value Endpointable)() + SetCaller(value Endpointable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailureInfo(value FailureInfoable)() + SetModalities(value []Modality)() + SetSegments(value []Segmentable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop.go b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop.go new file mode 100644 index 000000000..93df32e93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop.go @@ -0,0 +1,149 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TraceRouteHop +type TraceRouteHop 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 network path count of this hop that was used to compute the round-trip time. + hopCount *int32 + // IP address used for this hop in the network trace. + ipAddress *string + // The OdataType property + odataType *string + // The time from when the trace route packet was sent from the client to this hop and back to the client, denoted in [ISO 8601][] format. For example, 1 second is denoted as PT1S, where P is the duration designator, T is the time designator, and S is the second designator. + roundTripTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewTraceRouteHop instantiates a new traceRouteHop and sets the default values. +func NewTraceRouteHop()(*TraceRouteHop) { + m := &TraceRouteHop{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTraceRouteHopFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTraceRouteHopFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTraceRouteHop(), 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 *TraceRouteHop) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TraceRouteHop) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hopCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHopCount(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(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["roundTripTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetRoundTripTime(val) + } + return nil + } + return res +} +// GetHopCount gets the hopCount property value. The network path count of this hop that was used to compute the round-trip time. +func (m *TraceRouteHop) GetHopCount()(*int32) { + return m.hopCount +} +// GetIpAddress gets the ipAddress property value. IP address used for this hop in the network trace. +func (m *TraceRouteHop) GetIpAddress()(*string) { + return m.ipAddress +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TraceRouteHop) GetOdataType()(*string) { + return m.odataType +} +// GetRoundTripTime gets the roundTripTime property value. The time from when the trace route packet was sent from the client to this hop and back to the client, denoted in [ISO 8601][] format. For example, 1 second is denoted as PT1S, where P is the duration designator, T is the time designator, and S is the second designator. +func (m *TraceRouteHop) GetRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.roundTripTime +} +// Serialize serializes information the current object +func (m *TraceRouteHop) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("hopCount", m.GetHopCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("roundTripTime", m.GetRoundTripTime()) + 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 *TraceRouteHop) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHopCount sets the hopCount property value. The network path count of this hop that was used to compute the round-trip time. +func (m *TraceRouteHop) SetHopCount(value *int32)() { + m.hopCount = value +} +// SetIpAddress sets the ipAddress property value. IP address used for this hop in the network trace. +func (m *TraceRouteHop) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TraceRouteHop) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoundTripTime sets the roundTripTime property value. The time from when the trace route packet was sent from the client to this hop and back to the client, denoted in [ISO 8601][] format. For example, 1 second is denoted as PT1S, where P is the duration designator, T is the time designator, and S is the second designator. +func (m *TraceRouteHop) SetRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.roundTripTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_response.go b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_response.go new file mode 100644 index 000000000..415da9386 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_response.go @@ -0,0 +1,69 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TraceRouteHopCollectionResponse +type TraceRouteHopCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TraceRouteHopable +} +// NewTraceRouteHopCollectionResponse instantiates a new TraceRouteHopCollectionResponse and sets the default values. +func NewTraceRouteHopCollectionResponse()(*TraceRouteHopCollectionResponse) { + m := &TraceRouteHopCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTraceRouteHopCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTraceRouteHopCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTraceRouteHopCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TraceRouteHopCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTraceRouteHopFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TraceRouteHopable, len(val)) + for i, v := range val { + res[i] = v.(TraceRouteHopable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TraceRouteHopCollectionResponse) GetValue()([]TraceRouteHopable) { + return m.value +} +// Serialize serializes information the current object +func (m *TraceRouteHopCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TraceRouteHopCollectionResponse) SetValue(value []TraceRouteHopable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_responseable.go b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_responseable.go new file mode 100644 index 000000000..7ed19d1dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hop_collection_responseable.go @@ -0,0 +1,14 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TraceRouteHopCollectionResponseable +type TraceRouteHopCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TraceRouteHopable) + SetValue(value []TraceRouteHopable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hopable.go b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hopable.go new file mode 100644 index 000000000..508e000ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/trace_route_hopable.go @@ -0,0 +1,19 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TraceRouteHopable +type TraceRouteHopable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHopCount()(*int32) + GetIpAddress()(*string) + GetOdataType()(*string) + GetRoundTripTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetHopCount(value *int32)() + SetIpAddress(value *string)() + SetOdataType(value *string)() + SetRoundTripTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/user_agent.go b/src/internal/connector/graph/betasdk/models/callrecords/user_agent.go new file mode 100644 index 000000000..aafc07a58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/user_agent.go @@ -0,0 +1,143 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserAgent +type UserAgent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifies the version of application software used by this endpoint. + applicationVersion *string + // User-agent header value reported by this endpoint. + headerValue *string + // The OdataType property + odataType *string +} +// NewUserAgent instantiates a new userAgent and sets the default values. +func NewUserAgent()(*UserAgent) { + m := &UserAgent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUserAgentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserAgentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.callRecords.clientUserAgent": + return NewClientUserAgent(), nil + case "#microsoft.graph.callRecords.serviceUserAgent": + return NewServiceUserAgent(), nil + } + } + } + } + return NewUserAgent(), 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 *UserAgent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationVersion gets the applicationVersion property value. Identifies the version of application software used by this endpoint. +func (m *UserAgent) GetApplicationVersion()(*string) { + return m.applicationVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserAgent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationVersion(val) + } + return nil + } + res["headerValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderValue(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 + } + return res +} +// GetHeaderValue gets the headerValue property value. User-agent header value reported by this endpoint. +func (m *UserAgent) GetHeaderValue()(*string) { + return m.headerValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UserAgent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *UserAgent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationVersion", m.GetApplicationVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("headerValue", m.GetHeaderValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *UserAgent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationVersion sets the applicationVersion property value. Identifies the version of application software used by this endpoint. +func (m *UserAgent) SetApplicationVersion(value *string)() { + m.applicationVersion = value +} +// SetHeaderValue sets the headerValue property value. User-agent header value reported by this endpoint. +func (m *UserAgent) SetHeaderValue(value *string)() { + m.headerValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UserAgent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/user_agentable.go b/src/internal/connector/graph/betasdk/models/callrecords/user_agentable.go new file mode 100644 index 000000000..e28c3390c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/user_agentable.go @@ -0,0 +1,17 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserAgentable +type UserAgentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationVersion()(*string) + GetHeaderValue()(*string) + GetOdataType()(*string) + SetApplicationVersion(value *string)() + SetHeaderValue(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/user_feedback.go b/src/internal/connector/graph/betasdk/models/callrecords/user_feedback.go new file mode 100644 index 000000000..0517ca841 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/user_feedback.go @@ -0,0 +1,150 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserFeedback +type UserFeedback 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 OdataType property + odataType *string + // The rating property + rating *UserFeedbackRating + // The feedback text provided by the user of this endpoint for the session. + text *string + // The set of feedback tokens provided by the user of this endpoint for the session. This is a set of Boolean properties. The property names should not be relied upon since they may change depending on what tokens are offered to the user. + tokens FeedbackTokenSetable +} +// NewUserFeedback instantiates a new userFeedback and sets the default values. +func NewUserFeedback()(*UserFeedback) { + m := &UserFeedback{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUserFeedbackFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserFeedbackFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserFeedback(), 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 *UserFeedback) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserFeedback) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["rating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserFeedbackRating) + if err != nil { + return err + } + if val != nil { + m.SetRating(val.(*UserFeedbackRating)) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["tokens"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFeedbackTokenSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTokens(val.(FeedbackTokenSetable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UserFeedback) GetOdataType()(*string) { + return m.odataType +} +// GetRating gets the rating property value. The rating property +func (m *UserFeedback) GetRating()(*UserFeedbackRating) { + return m.rating +} +// GetText gets the text property value. The feedback text provided by the user of this endpoint for the session. +func (m *UserFeedback) GetText()(*string) { + return m.text +} +// GetTokens gets the tokens property value. The set of feedback tokens provided by the user of this endpoint for the session. This is a set of Boolean properties. The property names should not be relied upon since they may change depending on what tokens are offered to the user. +func (m *UserFeedback) GetTokens()(FeedbackTokenSetable) { + return m.tokens +} +// Serialize serializes information the current object +func (m *UserFeedback) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRating() != nil { + cast := (*m.GetRating()).String() + err := writer.WriteStringValue("rating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tokens", m.GetTokens()) + 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 *UserFeedback) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UserFeedback) SetOdataType(value *string)() { + m.odataType = value +} +// SetRating sets the rating property value. The rating property +func (m *UserFeedback) SetRating(value *UserFeedbackRating)() { + m.rating = value +} +// SetText sets the text property value. The feedback text provided by the user of this endpoint for the session. +func (m *UserFeedback) SetText(value *string)() { + m.text = value +} +// SetTokens sets the tokens property value. The set of feedback tokens provided by the user of this endpoint for the session. This is a set of Boolean properties. The property names should not be relied upon since they may change depending on what tokens are offered to the user. +func (m *UserFeedback) SetTokens(value FeedbackTokenSetable)() { + m.tokens = value +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/user_feedback_rating.go b/src/internal/connector/graph/betasdk/models/callrecords/user_feedback_rating.go new file mode 100644 index 000000000..0e76a626a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/user_feedback_rating.go @@ -0,0 +1,49 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type UserFeedbackRating int + +const ( + NOTRATED_USERFEEDBACKRATING UserFeedbackRating = iota + BAD_USERFEEDBACKRATING + POOR_USERFEEDBACKRATING + FAIR_USERFEEDBACKRATING + GOOD_USERFEEDBACKRATING + EXCELLENT_USERFEEDBACKRATING + UNKNOWNFUTUREVALUE_USERFEEDBACKRATING +) + +func (i UserFeedbackRating) String() string { + return []string{"notRated", "bad", "poor", "fair", "good", "excellent", "unknownFutureValue"}[i] +} +func ParseUserFeedbackRating(v string) (interface{}, error) { + result := NOTRATED_USERFEEDBACKRATING + switch v { + case "notRated": + result = NOTRATED_USERFEEDBACKRATING + case "bad": + result = BAD_USERFEEDBACKRATING + case "poor": + result = POOR_USERFEEDBACKRATING + case "fair": + result = FAIR_USERFEEDBACKRATING + case "good": + result = GOOD_USERFEEDBACKRATING + case "excellent": + result = EXCELLENT_USERFEEDBACKRATING + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_USERFEEDBACKRATING + default: + return 0, errors.New("Unknown UserFeedbackRating value: " + v) + } + return &result, nil +} +func SerializeUserFeedbackRating(values []UserFeedbackRating) []string { + 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/callrecords/user_feedbackable.go b/src/internal/connector/graph/betasdk/models/callrecords/user_feedbackable.go new file mode 100644 index 000000000..84a132d22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/user_feedbackable.go @@ -0,0 +1,19 @@ +package callrecords + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserFeedbackable +type UserFeedbackable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRating()(*UserFeedbackRating) + GetText()(*string) + GetTokens()(FeedbackTokenSetable) + SetOdataType(value *string)() + SetRating(value *UserFeedbackRating)() + SetText(value *string)() + SetTokens(value FeedbackTokenSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/callrecords/video_codec.go b/src/internal/connector/graph/betasdk/models/callrecords/video_codec.go new file mode 100644 index 000000000..1b3d1b301 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/video_codec.go @@ -0,0 +1,64 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type VideoCodec int + +const ( + UNKNOWN_VIDEOCODEC VideoCodec = iota + INVALID_VIDEOCODEC + AV1_VIDEOCODEC + H263_VIDEOCODEC + H264_VIDEOCODEC + H264S_VIDEOCODEC + H264UC_VIDEOCODEC + H265_VIDEOCODEC + RTVC1_VIDEOCODEC + RTVIDEO_VIDEOCODEC + XRTVC1_VIDEOCODEC + UNKNOWNFUTUREVALUE_VIDEOCODEC +) + +func (i VideoCodec) String() string { + return []string{"unknown", "invalid", "av1", "h263", "h264", "h264s", "h264uc", "h265", "rtvc1", "rtVideo", "xrtvc1", "unknownFutureValue"}[i] +} +func ParseVideoCodec(v string) (interface{}, error) { + result := UNKNOWN_VIDEOCODEC + switch v { + case "unknown": + result = UNKNOWN_VIDEOCODEC + case "invalid": + result = INVALID_VIDEOCODEC + case "av1": + result = AV1_VIDEOCODEC + case "h263": + result = H263_VIDEOCODEC + case "h264": + result = H264_VIDEOCODEC + case "h264s": + result = H264S_VIDEOCODEC + case "h264uc": + result = H264UC_VIDEOCODEC + case "h265": + result = H265_VIDEOCODEC + case "rtvc1": + result = RTVC1_VIDEOCODEC + case "rtVideo": + result = RTVIDEO_VIDEOCODEC + case "xrtvc1": + result = XRTVC1_VIDEOCODEC + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_VIDEOCODEC + default: + return 0, errors.New("Unknown VideoCodec value: " + v) + } + return &result, nil +} +func SerializeVideoCodec(values []VideoCodec) []string { + 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/callrecords/wifi_band.go b/src/internal/connector/graph/betasdk/models/callrecords/wifi_band.go new file mode 100644 index 000000000..36c2e8154 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/wifi_band.go @@ -0,0 +1,43 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WifiBand int + +const ( + UNKNOWN_WIFIBAND WifiBand = iota + FREQUENCY24GHZ_WIFIBAND + FREQUENCY50GHZ_WIFIBAND + FREQUENCY60GHZ_WIFIBAND + UNKNOWNFUTUREVALUE_WIFIBAND +) + +func (i WifiBand) String() string { + return []string{"unknown", "frequency24GHz", "frequency50GHz", "frequency60GHz", "unknownFutureValue"}[i] +} +func ParseWifiBand(v string) (interface{}, error) { + result := UNKNOWN_WIFIBAND + switch v { + case "unknown": + result = UNKNOWN_WIFIBAND + case "frequency24GHz": + result = FREQUENCY24GHZ_WIFIBAND + case "frequency50GHz": + result = FREQUENCY50GHZ_WIFIBAND + case "frequency60GHz": + result = FREQUENCY60GHZ_WIFIBAND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WIFIBAND + default: + return 0, errors.New("Unknown WifiBand value: " + v) + } + return &result, nil +} +func SerializeWifiBand(values []WifiBand) []string { + 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/callrecords/wifi_radio_type.go b/src/internal/connector/graph/betasdk/models/callrecords/wifi_radio_type.go new file mode 100644 index 000000000..9b6fe0042 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/callrecords/wifi_radio_type.go @@ -0,0 +1,52 @@ +package callrecords +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WifiRadioType int + +const ( + UNKNOWN_WIFIRADIOTYPE WifiRadioType = iota + WIFI80211A_WIFIRADIOTYPE + WIFI80211B_WIFIRADIOTYPE + WIFI80211G_WIFIRADIOTYPE + WIFI80211N_WIFIRADIOTYPE + WIFI80211AC_WIFIRADIOTYPE + WIFI80211AX_WIFIRADIOTYPE + UNKNOWNFUTUREVALUE_WIFIRADIOTYPE +) + +func (i WifiRadioType) String() string { + return []string{"unknown", "wifi80211a", "wifi80211b", "wifi80211g", "wifi80211n", "wifi80211ac", "wifi80211ax", "unknownFutureValue"}[i] +} +func ParseWifiRadioType(v string) (interface{}, error) { + result := UNKNOWN_WIFIRADIOTYPE + switch v { + case "unknown": + result = UNKNOWN_WIFIRADIOTYPE + case "wifi80211a": + result = WIFI80211A_WIFIRADIOTYPE + case "wifi80211b": + result = WIFI80211B_WIFIRADIOTYPE + case "wifi80211g": + result = WIFI80211G_WIFIRADIOTYPE + case "wifi80211n": + result = WIFI80211N_WIFIRADIOTYPE + case "wifi80211ac": + result = WIFI80211AC_WIFIRADIOTYPE + case "wifi80211ax": + result = WIFI80211AX_WIFIRADIOTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WIFIRADIOTYPE + default: + return 0, errors.New("Unknown WifiRadioType value: " + v) + } + return &result, nil +} +func SerializeWifiRadioType(values []WifiRadioType) []string { + 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/cancel_media_processing_operation.go b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation.go new file mode 100644 index 000000000..6f2072919 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CancelMediaProcessingOperation +type CancelMediaProcessingOperation struct { + CommsOperation +} +// NewCancelMediaProcessingOperation instantiates a new CancelMediaProcessingOperation and sets the default values. +func NewCancelMediaProcessingOperation()(*CancelMediaProcessingOperation) { + m := &CancelMediaProcessingOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateCancelMediaProcessingOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCancelMediaProcessingOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCancelMediaProcessingOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CancelMediaProcessingOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CancelMediaProcessingOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_response.go new file mode 100644 index 000000000..ab0c7420d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CancelMediaProcessingOperationCollectionResponse +type CancelMediaProcessingOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CancelMediaProcessingOperationable +} +// NewCancelMediaProcessingOperationCollectionResponse instantiates a new CancelMediaProcessingOperationCollectionResponse and sets the default values. +func NewCancelMediaProcessingOperationCollectionResponse()(*CancelMediaProcessingOperationCollectionResponse) { + m := &CancelMediaProcessingOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCancelMediaProcessingOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCancelMediaProcessingOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCancelMediaProcessingOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CancelMediaProcessingOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCancelMediaProcessingOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CancelMediaProcessingOperationable, len(val)) + for i, v := range val { + res[i] = v.(CancelMediaProcessingOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CancelMediaProcessingOperationCollectionResponse) GetValue()([]CancelMediaProcessingOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CancelMediaProcessingOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CancelMediaProcessingOperationCollectionResponse) SetValue(value []CancelMediaProcessingOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_responseable.go new file mode 100644 index 000000000..b47f0096d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CancelMediaProcessingOperationCollectionResponseable +type CancelMediaProcessingOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CancelMediaProcessingOperationable) + SetValue(value []CancelMediaProcessingOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cancel_media_processing_operationable.go b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operationable.go new file mode 100644 index 000000000..b5be2fe38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cancel_media_processing_operationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CancelMediaProcessingOperationable +type CancelMediaProcessingOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/canvas_layout.go b/src/internal/connector/graph/betasdk/models/canvas_layout.go new file mode 100644 index 000000000..2375171dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/canvas_layout.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CanvasLayout +type CanvasLayout struct { + Entity + // Collection of horizontal sections on the SharePoint page. + horizontalSections []HorizontalSectionable + // Vertical section on the SharePoint page. + verticalSection VerticalSectionable +} +// NewCanvasLayout instantiates a new canvasLayout and sets the default values. +func NewCanvasLayout()(*CanvasLayout) { + m := &CanvasLayout{ + Entity: *NewEntity(), + } + return m +} +// CreateCanvasLayoutFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCanvasLayoutFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCanvasLayout(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CanvasLayout) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["horizontalSections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HorizontalSectionable, len(val)) + for i, v := range val { + res[i] = v.(HorizontalSectionable) + } + m.SetHorizontalSections(res) + } + return nil + } + res["verticalSection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerticalSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerticalSection(val.(VerticalSectionable)) + } + return nil + } + return res +} +// GetHorizontalSections gets the horizontalSections property value. Collection of horizontal sections on the SharePoint page. +func (m *CanvasLayout) GetHorizontalSections()([]HorizontalSectionable) { + return m.horizontalSections +} +// GetVerticalSection gets the verticalSection property value. Vertical section on the SharePoint page. +func (m *CanvasLayout) GetVerticalSection()(VerticalSectionable) { + return m.verticalSection +} +// Serialize serializes information the current object +func (m *CanvasLayout) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetHorizontalSections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHorizontalSections())) + for i, v := range m.GetHorizontalSections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("horizontalSections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("verticalSection", m.GetVerticalSection()) + if err != nil { + return err + } + } + return nil +} +// SetHorizontalSections sets the horizontalSections property value. Collection of horizontal sections on the SharePoint page. +func (m *CanvasLayout) SetHorizontalSections(value []HorizontalSectionable)() { + m.horizontalSections = value +} +// SetVerticalSection sets the verticalSection property value. Vertical section on the SharePoint page. +func (m *CanvasLayout) SetVerticalSection(value VerticalSectionable)() { + m.verticalSection = value +} diff --git a/src/internal/connector/graph/betasdk/models/canvas_layoutable.go b/src/internal/connector/graph/betasdk/models/canvas_layoutable.go new file mode 100644 index 000000000..f1bd73e99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/canvas_layoutable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CanvasLayoutable +type CanvasLayoutable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHorizontalSections()([]HorizontalSectionable) + GetVerticalSection()(VerticalSectionable) + SetHorizontalSections(value []HorizontalSectionable)() + SetVerticalSection(value VerticalSectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cart_to_class_association.go b/src/internal/connector/graph/betasdk/models/cart_to_class_association.go new file mode 100644 index 000000000..7c21284e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cart_to_class_association.go @@ -0,0 +1,225 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CartToClassAssociation cartToClassAssociation for associating device carts with classrooms. +type CartToClassAssociation struct { + Entity + // Identifiers of classrooms to be associated with device carts. + classroomIds []string + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the CartToClassAssociation. + description *string + // Identifiers of device carts to be associated with classes. + deviceCartIds []string + // Admin provided name of the device configuration. + displayName *string + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Version of the CartToClassAssociation. + version *int32 +} +// NewCartToClassAssociation instantiates a new cartToClassAssociation and sets the default values. +func NewCartToClassAssociation()(*CartToClassAssociation) { + m := &CartToClassAssociation{ + Entity: *NewEntity(), + } + return m +} +// CreateCartToClassAssociationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCartToClassAssociationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCartToClassAssociation(), nil +} +// GetClassroomIds gets the classroomIds property value. Identifiers of classrooms to be associated with device carts. +func (m *CartToClassAssociation) GetClassroomIds()([]string) { + return m.classroomIds +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *CartToClassAssociation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the CartToClassAssociation. +func (m *CartToClassAssociation) GetDescription()(*string) { + return m.description +} +// GetDeviceCartIds gets the deviceCartIds property value. Identifiers of device carts to be associated with classes. +func (m *CartToClassAssociation) GetDeviceCartIds()([]string) { + return m.deviceCartIds +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *CartToClassAssociation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CartToClassAssociation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["classroomIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetClassroomIds(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceCartIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDeviceCartIds(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *CartToClassAssociation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetVersion gets the version property value. Version of the CartToClassAssociation. +func (m *CartToClassAssociation) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *CartToClassAssociation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClassroomIds() != nil { + err = writer.WriteCollectionOfStringValues("classroomIds", m.GetClassroomIds()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceCartIds() != nil { + err = writer.WriteCollectionOfStringValues("deviceCartIds", m.GetDeviceCartIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetClassroomIds sets the classroomIds property value. Identifiers of classrooms to be associated with device carts. +func (m *CartToClassAssociation) SetClassroomIds(value []string)() { + m.classroomIds = value +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *CartToClassAssociation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the CartToClassAssociation. +func (m *CartToClassAssociation) SetDescription(value *string)() { + m.description = value +} +// SetDeviceCartIds sets the deviceCartIds property value. Identifiers of device carts to be associated with classes. +func (m *CartToClassAssociation) SetDeviceCartIds(value []string)() { + m.deviceCartIds = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *CartToClassAssociation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *CartToClassAssociation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetVersion sets the version property value. Version of the CartToClassAssociation. +func (m *CartToClassAssociation) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_response.go b/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_response.go new file mode 100644 index 000000000..b65b5b5e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CartToClassAssociationCollectionResponse +type CartToClassAssociationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CartToClassAssociationable +} +// NewCartToClassAssociationCollectionResponse instantiates a new CartToClassAssociationCollectionResponse and sets the default values. +func NewCartToClassAssociationCollectionResponse()(*CartToClassAssociationCollectionResponse) { + m := &CartToClassAssociationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCartToClassAssociationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCartToClassAssociationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCartToClassAssociationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CartToClassAssociationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCartToClassAssociationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CartToClassAssociationable, len(val)) + for i, v := range val { + res[i] = v.(CartToClassAssociationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CartToClassAssociationCollectionResponse) GetValue()([]CartToClassAssociationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CartToClassAssociationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CartToClassAssociationCollectionResponse) SetValue(value []CartToClassAssociationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_responseable.go new file mode 100644 index 000000000..478e292a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cart_to_class_association_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CartToClassAssociationCollectionResponseable +type CartToClassAssociationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CartToClassAssociationable) + SetValue(value []CartToClassAssociationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cart_to_class_associationable.go b/src/internal/connector/graph/betasdk/models/cart_to_class_associationable.go new file mode 100644 index 000000000..1c1c7381c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cart_to_class_associationable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CartToClassAssociationable +type CartToClassAssociationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassroomIds()([]string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceCartIds()([]string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVersion()(*int32) + SetClassroomIds(value []string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceCartIds(value []string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/category_color.go b/src/internal/connector/graph/betasdk/models/category_color.go new file mode 100644 index 000000000..a675d5733 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/category_color.go @@ -0,0 +1,106 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CategoryColor int + +const ( + NONE_CATEGORYCOLOR CategoryColor = iota + PRESET0_CATEGORYCOLOR + PRESET1_CATEGORYCOLOR + PRESET2_CATEGORYCOLOR + PRESET3_CATEGORYCOLOR + PRESET4_CATEGORYCOLOR + PRESET5_CATEGORYCOLOR + PRESET6_CATEGORYCOLOR + PRESET7_CATEGORYCOLOR + PRESET8_CATEGORYCOLOR + PRESET9_CATEGORYCOLOR + PRESET10_CATEGORYCOLOR + PRESET11_CATEGORYCOLOR + PRESET12_CATEGORYCOLOR + PRESET13_CATEGORYCOLOR + PRESET14_CATEGORYCOLOR + PRESET15_CATEGORYCOLOR + PRESET16_CATEGORYCOLOR + PRESET17_CATEGORYCOLOR + PRESET18_CATEGORYCOLOR + PRESET19_CATEGORYCOLOR + PRESET20_CATEGORYCOLOR + PRESET21_CATEGORYCOLOR + PRESET22_CATEGORYCOLOR + PRESET23_CATEGORYCOLOR + PRESET24_CATEGORYCOLOR +) + +func (i CategoryColor) String() string { + return []string{"none", "preset0", "preset1", "preset2", "preset3", "preset4", "preset5", "preset6", "preset7", "preset8", "preset9", "preset10", "preset11", "preset12", "preset13", "preset14", "preset15", "preset16", "preset17", "preset18", "preset19", "preset20", "preset21", "preset22", "preset23", "preset24"}[i] +} +func ParseCategoryColor(v string) (interface{}, error) { + result := NONE_CATEGORYCOLOR + switch v { + case "none": + result = NONE_CATEGORYCOLOR + case "preset0": + result = PRESET0_CATEGORYCOLOR + case "preset1": + result = PRESET1_CATEGORYCOLOR + case "preset2": + result = PRESET2_CATEGORYCOLOR + case "preset3": + result = PRESET3_CATEGORYCOLOR + case "preset4": + result = PRESET4_CATEGORYCOLOR + case "preset5": + result = PRESET5_CATEGORYCOLOR + case "preset6": + result = PRESET6_CATEGORYCOLOR + case "preset7": + result = PRESET7_CATEGORYCOLOR + case "preset8": + result = PRESET8_CATEGORYCOLOR + case "preset9": + result = PRESET9_CATEGORYCOLOR + case "preset10": + result = PRESET10_CATEGORYCOLOR + case "preset11": + result = PRESET11_CATEGORYCOLOR + case "preset12": + result = PRESET12_CATEGORYCOLOR + case "preset13": + result = PRESET13_CATEGORYCOLOR + case "preset14": + result = PRESET14_CATEGORYCOLOR + case "preset15": + result = PRESET15_CATEGORYCOLOR + case "preset16": + result = PRESET16_CATEGORYCOLOR + case "preset17": + result = PRESET17_CATEGORYCOLOR + case "preset18": + result = PRESET18_CATEGORYCOLOR + case "preset19": + result = PRESET19_CATEGORYCOLOR + case "preset20": + result = PRESET20_CATEGORYCOLOR + case "preset21": + result = PRESET21_CATEGORYCOLOR + case "preset22": + result = PRESET22_CATEGORYCOLOR + case "preset23": + result = PRESET23_CATEGORYCOLOR + case "preset24": + result = PRESET24_CATEGORYCOLOR + default: + return 0, errors.New("Unknown CategoryColor value: " + v) + } + return &result, nil +} +func SerializeCategoryColor(values []CategoryColor) []string { + 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/certificate_authority.go b/src/internal/connector/graph/betasdk/models/certificate_authority.go new file mode 100644 index 000000000..655e3e598 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_authority.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateAuthority +type CertificateAuthority struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Required. The base64 encoded string representing the public certificate. + certificate []byte + // The URL of the certificate revocation list. + certificateRevocationListUrl *string + // The URL contains the list of all revoked certificates since the last time a full certificate revocaton list was created. + deltaCertificateRevocationListUrl *string + // Required. true if the trusted certificate is a root authority, false if the trusted certificate is an intermediate authority. + isRootAuthority *bool + // The issuer of the certificate, calculated from the certificate value. Read-only. + issuer *string + // The subject key identifier of the certificate, calculated from the certificate value. Read-only. + issuerSki *string + // The OdataType property + odataType *string +} +// NewCertificateAuthority instantiates a new certificateAuthority and sets the default values. +func NewCertificateAuthority()(*CertificateAuthority) { + m := &CertificateAuthority{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCertificateAuthorityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateAuthorityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateAuthority(), 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 *CertificateAuthority) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertificate gets the certificate property value. Required. The base64 encoded string representing the public certificate. +func (m *CertificateAuthority) GetCertificate()([]byte) { + return m.certificate +} +// GetCertificateRevocationListUrl gets the certificateRevocationListUrl property value. The URL of the certificate revocation list. +func (m *CertificateAuthority) GetCertificateRevocationListUrl()(*string) { + return m.certificateRevocationListUrl +} +// GetDeltaCertificateRevocationListUrl gets the deltaCertificateRevocationListUrl property value. The URL contains the list of all revoked certificates since the last time a full certificate revocaton list was created. +func (m *CertificateAuthority) GetDeltaCertificateRevocationListUrl()(*string) { + return m.deltaCertificateRevocationListUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateAuthority) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificate(val) + } + return nil + } + res["certificateRevocationListUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateRevocationListUrl(val) + } + return nil + } + res["deltaCertificateRevocationListUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeltaCertificateRevocationListUrl(val) + } + return nil + } + res["isRootAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRootAuthority(val) + } + return nil + } + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuer(val) + } + return nil + } + res["issuerSki"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuerSki(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 + } + return res +} +// GetIsRootAuthority gets the isRootAuthority property value. Required. true if the trusted certificate is a root authority, false if the trusted certificate is an intermediate authority. +func (m *CertificateAuthority) GetIsRootAuthority()(*bool) { + return m.isRootAuthority +} +// GetIssuer gets the issuer property value. The issuer of the certificate, calculated from the certificate value. Read-only. +func (m *CertificateAuthority) GetIssuer()(*string) { + return m.issuer +} +// GetIssuerSki gets the issuerSki property value. The subject key identifier of the certificate, calculated from the certificate value. Read-only. +func (m *CertificateAuthority) GetIssuerSki()(*string) { + return m.issuerSki +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CertificateAuthority) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CertificateAuthority) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("certificate", m.GetCertificate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("certificateRevocationListUrl", m.GetCertificateRevocationListUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deltaCertificateRevocationListUrl", m.GetDeltaCertificateRevocationListUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRootAuthority", m.GetIsRootAuthority()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issuer", m.GetIssuer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issuerSki", m.GetIssuerSki()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CertificateAuthority) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertificate sets the certificate property value. Required. The base64 encoded string representing the public certificate. +func (m *CertificateAuthority) SetCertificate(value []byte)() { + m.certificate = value +} +// SetCertificateRevocationListUrl sets the certificateRevocationListUrl property value. The URL of the certificate revocation list. +func (m *CertificateAuthority) SetCertificateRevocationListUrl(value *string)() { + m.certificateRevocationListUrl = value +} +// SetDeltaCertificateRevocationListUrl sets the deltaCertificateRevocationListUrl property value. The URL contains the list of all revoked certificates since the last time a full certificate revocaton list was created. +func (m *CertificateAuthority) SetDeltaCertificateRevocationListUrl(value *string)() { + m.deltaCertificateRevocationListUrl = value +} +// SetIsRootAuthority sets the isRootAuthority property value. Required. true if the trusted certificate is a root authority, false if the trusted certificate is an intermediate authority. +func (m *CertificateAuthority) SetIsRootAuthority(value *bool)() { + m.isRootAuthority = value +} +// SetIssuer sets the issuer property value. The issuer of the certificate, calculated from the certificate value. Read-only. +func (m *CertificateAuthority) SetIssuer(value *string)() { + m.issuer = value +} +// SetIssuerSki sets the issuerSki property value. The subject key identifier of the certificate, calculated from the certificate value. Read-only. +func (m *CertificateAuthority) SetIssuerSki(value *string)() { + m.issuerSki = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CertificateAuthority) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_authority_collection_response.go b/src/internal/connector/graph/betasdk/models/certificate_authority_collection_response.go new file mode 100644 index 000000000..83c99ecd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_authority_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateAuthorityCollectionResponse +type CertificateAuthorityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CertificateAuthorityable +} +// NewCertificateAuthorityCollectionResponse instantiates a new CertificateAuthorityCollectionResponse and sets the default values. +func NewCertificateAuthorityCollectionResponse()(*CertificateAuthorityCollectionResponse) { + m := &CertificateAuthorityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCertificateAuthorityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateAuthorityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateAuthorityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateAuthorityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateAuthorityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateAuthorityable, len(val)) + for i, v := range val { + res[i] = v.(CertificateAuthorityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CertificateAuthorityCollectionResponse) GetValue()([]CertificateAuthorityable) { + return m.value +} +// Serialize serializes information the current object +func (m *CertificateAuthorityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CertificateAuthorityCollectionResponse) SetValue(value []CertificateAuthorityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_authority_collection_responseable.go b/src/internal/connector/graph/betasdk/models/certificate_authority_collection_responseable.go new file mode 100644 index 000000000..84cdfc6f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_authority_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateAuthorityCollectionResponseable +type CertificateAuthorityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CertificateAuthorityable) + SetValue(value []CertificateAuthorityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_authorityable.go b/src/internal/connector/graph/betasdk/models/certificate_authorityable.go new file mode 100644 index 000000000..1c00e3c65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_authorityable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateAuthorityable +type CertificateAuthorityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificate()([]byte) + GetCertificateRevocationListUrl()(*string) + GetDeltaCertificateRevocationListUrl()(*string) + GetIsRootAuthority()(*bool) + GetIssuer()(*string) + GetIssuerSki()(*string) + GetOdataType()(*string) + SetCertificate(value []byte)() + SetCertificateRevocationListUrl(value *string)() + SetDeltaCertificateRevocationListUrl(value *string)() + SetIsRootAuthority(value *bool)() + SetIssuer(value *string)() + SetIssuerSki(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration.go b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration.go new file mode 100644 index 000000000..16391b7a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateBasedAuthConfiguration provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateBasedAuthConfiguration struct { + Entity + // Collection of certificate authorities which creates a trusted certificate chain. + certificateAuthorities []CertificateAuthorityable +} +// NewCertificateBasedAuthConfiguration instantiates a new certificateBasedAuthConfiguration and sets the default values. +func NewCertificateBasedAuthConfiguration()(*CertificateBasedAuthConfiguration) { + m := &CertificateBasedAuthConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateCertificateBasedAuthConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateBasedAuthConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateBasedAuthConfiguration(), nil +} +// GetCertificateAuthorities gets the certificateAuthorities property value. Collection of certificate authorities which creates a trusted certificate chain. +func (m *CertificateBasedAuthConfiguration) GetCertificateAuthorities()([]CertificateAuthorityable) { + return m.certificateAuthorities +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateBasedAuthConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["certificateAuthorities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateAuthorityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateAuthorityable, len(val)) + for i, v := range val { + res[i] = v.(CertificateAuthorityable) + } + m.SetCertificateAuthorities(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CertificateBasedAuthConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateAuthorities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificateAuthorities())) + for i, v := range m.GetCertificateAuthorities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("certificateAuthorities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateAuthorities sets the certificateAuthorities property value. Collection of certificate authorities which creates a trusted certificate chain. +func (m *CertificateBasedAuthConfiguration) SetCertificateAuthorities(value []CertificateAuthorityable)() { + m.certificateAuthorities = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_response.go new file mode 100644 index 000000000..f80706853 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateBasedAuthConfigurationCollectionResponse +type CertificateBasedAuthConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CertificateBasedAuthConfigurationable +} +// NewCertificateBasedAuthConfigurationCollectionResponse instantiates a new CertificateBasedAuthConfigurationCollectionResponse and sets the default values. +func NewCertificateBasedAuthConfigurationCollectionResponse()(*CertificateBasedAuthConfigurationCollectionResponse) { + m := &CertificateBasedAuthConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCertificateBasedAuthConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateBasedAuthConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateBasedAuthConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateBasedAuthConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateBasedAuthConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateBasedAuthConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(CertificateBasedAuthConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CertificateBasedAuthConfigurationCollectionResponse) GetValue()([]CertificateBasedAuthConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CertificateBasedAuthConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CertificateBasedAuthConfigurationCollectionResponse) SetValue(value []CertificateBasedAuthConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_responseable.go new file mode 100644 index 000000000..27e94f43a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateBasedAuthConfigurationCollectionResponseable +type CertificateBasedAuthConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CertificateBasedAuthConfigurationable) + SetValue(value []CertificateBasedAuthConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_based_auth_configurationable.go b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configurationable.go new file mode 100644 index 000000000..43b899dc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_based_auth_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateBasedAuthConfigurationable +type CertificateBasedAuthConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateAuthorities()([]CertificateAuthorityable) + SetCertificateAuthorities(value []CertificateAuthorityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_details.go b/src/internal/connector/graph/betasdk/models/certificate_connector_details.go new file mode 100644 index 000000000..dfa28d699 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_details.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorDetails entity used to retrieve information about Intune Certificate Connectors. +type CertificateConnectorDetails struct { + Entity + // Connector name (set during enrollment). + connectorName *string + // Version of the connector installed. + connectorVersion *string + // Date/time when this connector was enrolled. + enrollmentDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date/time when this connector last connected to the service. + lastCheckinDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the machine hosting this connector service. + machineName *string +} +// NewCertificateConnectorDetails instantiates a new certificateConnectorDetails and sets the default values. +func NewCertificateConnectorDetails()(*CertificateConnectorDetails) { + m := &CertificateConnectorDetails{ + Entity: *NewEntity(), + } + return m +} +// CreateCertificateConnectorDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateConnectorDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateConnectorDetails(), nil +} +// GetConnectorName gets the connectorName property value. Connector name (set during enrollment). +func (m *CertificateConnectorDetails) GetConnectorName()(*string) { + return m.connectorName +} +// GetConnectorVersion gets the connectorVersion property value. Version of the connector installed. +func (m *CertificateConnectorDetails) GetConnectorVersion()(*string) { + return m.connectorVersion +} +// GetEnrollmentDateTime gets the enrollmentDateTime property value. Date/time when this connector was enrolled. +func (m *CertificateConnectorDetails) GetEnrollmentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.enrollmentDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateConnectorDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["connectorName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorName(val) + } + return nil + } + res["connectorVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorVersion(val) + } + return nil + } + res["enrollmentDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentDateTime(val) + } + return nil + } + res["lastCheckinDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCheckinDateTime(val) + } + return nil + } + res["machineName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachineName(val) + } + return nil + } + return res +} +// GetLastCheckinDateTime gets the lastCheckinDateTime property value. Date/time when this connector last connected to the service. +func (m *CertificateConnectorDetails) GetLastCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCheckinDateTime +} +// GetMachineName gets the machineName property value. Name of the machine hosting this connector service. +func (m *CertificateConnectorDetails) GetMachineName()(*string) { + return m.machineName +} +// Serialize serializes information the current object +func (m *CertificateConnectorDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("connectorName", m.GetConnectorName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectorVersion", m.GetConnectorVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("enrollmentDateTime", m.GetEnrollmentDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastCheckinDateTime", m.GetLastCheckinDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("machineName", m.GetMachineName()) + if err != nil { + return err + } + } + return nil +} +// SetConnectorName sets the connectorName property value. Connector name (set during enrollment). +func (m *CertificateConnectorDetails) SetConnectorName(value *string)() { + m.connectorName = value +} +// SetConnectorVersion sets the connectorVersion property value. Version of the connector installed. +func (m *CertificateConnectorDetails) SetConnectorVersion(value *string)() { + m.connectorVersion = value +} +// SetEnrollmentDateTime sets the enrollmentDateTime property value. Date/time when this connector was enrolled. +func (m *CertificateConnectorDetails) SetEnrollmentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.enrollmentDateTime = value +} +// SetLastCheckinDateTime sets the lastCheckinDateTime property value. Date/time when this connector last connected to the service. +func (m *CertificateConnectorDetails) SetLastCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCheckinDateTime = value +} +// SetMachineName sets the machineName property value. Name of the machine hosting this connector service. +func (m *CertificateConnectorDetails) SetMachineName(value *string)() { + m.machineName = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_response.go b/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_response.go new file mode 100644 index 000000000..1a8ffd09d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorDetailsCollectionResponse +type CertificateConnectorDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CertificateConnectorDetailsable +} +// NewCertificateConnectorDetailsCollectionResponse instantiates a new CertificateConnectorDetailsCollectionResponse and sets the default values. +func NewCertificateConnectorDetailsCollectionResponse()(*CertificateConnectorDetailsCollectionResponse) { + m := &CertificateConnectorDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCertificateConnectorDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateConnectorDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateConnectorDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateConnectorDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateConnectorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateConnectorDetailsable, len(val)) + for i, v := range val { + res[i] = v.(CertificateConnectorDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CertificateConnectorDetailsCollectionResponse) GetValue()([]CertificateConnectorDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *CertificateConnectorDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CertificateConnectorDetailsCollectionResponse) SetValue(value []CertificateConnectorDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_responseable.go new file mode 100644 index 000000000..21468b6bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorDetailsCollectionResponseable +type CertificateConnectorDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CertificateConnectorDetailsable) + SetValue(value []CertificateConnectorDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_detailsable.go b/src/internal/connector/graph/betasdk/models/certificate_connector_detailsable.go new file mode 100644 index 000000000..4f9bc996c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_detailsable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorDetailsable +type CertificateConnectorDetailsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectorName()(*string) + GetConnectorVersion()(*string) + GetEnrollmentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMachineName()(*string) + SetConnectorName(value *string)() + SetConnectorVersion(value *string)() + SetEnrollmentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMachineName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_setting.go b/src/internal/connector/graph/betasdk/models/certificate_connector_setting.go new file mode 100644 index 000000000..56b70ab30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_setting.go @@ -0,0 +1,228 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorSetting certificate connector settings. +type CertificateConnectorSetting struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Certificate expire time + certExpiryTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Version of certificate connector + connectorVersion *string + // Certificate connector enrollment error + enrollmentError *string + // Last time certificate connector connected + lastConnectorConnectionTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Version of last uploaded certificate connector + lastUploadVersion *int64 + // The OdataType property + odataType *string + // Certificate connector status + status *int32 +} +// NewCertificateConnectorSetting instantiates a new certificateConnectorSetting and sets the default values. +func NewCertificateConnectorSetting()(*CertificateConnectorSetting) { + m := &CertificateConnectorSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCertificateConnectorSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificateConnectorSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificateConnectorSetting(), 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 *CertificateConnectorSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertExpiryTime gets the certExpiryTime property value. Certificate expire time +func (m *CertificateConnectorSetting) GetCertExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certExpiryTime +} +// GetConnectorVersion gets the connectorVersion property value. Version of certificate connector +func (m *CertificateConnectorSetting) GetConnectorVersion()(*string) { + return m.connectorVersion +} +// GetEnrollmentError gets the enrollmentError property value. Certificate connector enrollment error +func (m *CertificateConnectorSetting) GetEnrollmentError()(*string) { + return m.enrollmentError +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificateConnectorSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certExpiryTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertExpiryTime(val) + } + return nil + } + res["connectorVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorVersion(val) + } + return nil + } + res["enrollmentError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentError(val) + } + return nil + } + res["lastConnectorConnectionTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastConnectorConnectionTime(val) + } + return nil + } + res["lastUploadVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetLastUploadVersion(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetLastConnectorConnectionTime gets the lastConnectorConnectionTime property value. Last time certificate connector connected +func (m *CertificateConnectorSetting) GetLastConnectorConnectionTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastConnectorConnectionTime +} +// GetLastUploadVersion gets the lastUploadVersion property value. Version of last uploaded certificate connector +func (m *CertificateConnectorSetting) GetLastUploadVersion()(*int64) { + return m.lastUploadVersion +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CertificateConnectorSetting) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Certificate connector status +func (m *CertificateConnectorSetting) GetStatus()(*int32) { + return m.status +} +// Serialize serializes information the current object +func (m *CertificateConnectorSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("certExpiryTime", m.GetCertExpiryTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("connectorVersion", m.GetConnectorVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("enrollmentError", m.GetEnrollmentError()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastConnectorConnectionTime", m.GetLastConnectorConnectionTime()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("lastUploadVersion", m.GetLastUploadVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("status", m.GetStatus()) + 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 *CertificateConnectorSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertExpiryTime sets the certExpiryTime property value. Certificate expire time +func (m *CertificateConnectorSetting) SetCertExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certExpiryTime = value +} +// SetConnectorVersion sets the connectorVersion property value. Version of certificate connector +func (m *CertificateConnectorSetting) SetConnectorVersion(value *string)() { + m.connectorVersion = value +} +// SetEnrollmentError sets the enrollmentError property value. Certificate connector enrollment error +func (m *CertificateConnectorSetting) SetEnrollmentError(value *string)() { + m.enrollmentError = value +} +// SetLastConnectorConnectionTime sets the lastConnectorConnectionTime property value. Last time certificate connector connected +func (m *CertificateConnectorSetting) SetLastConnectorConnectionTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastConnectorConnectionTime = value +} +// SetLastUploadVersion sets the lastUploadVersion property value. Version of last uploaded certificate connector +func (m *CertificateConnectorSetting) SetLastUploadVersion(value *int64)() { + m.lastUploadVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CertificateConnectorSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Certificate connector status +func (m *CertificateConnectorSetting) SetStatus(value *int32)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_connector_settingable.go b/src/internal/connector/graph/betasdk/models/certificate_connector_settingable.go new file mode 100644 index 000000000..2fa8f83c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_connector_settingable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificateConnectorSettingable +type CertificateConnectorSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConnectorVersion()(*string) + GetEnrollmentError()(*string) + GetLastConnectorConnectionTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastUploadVersion()(*int64) + GetOdataType()(*string) + GetStatus()(*int32) + SetCertExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConnectorVersion(value *string)() + SetEnrollmentError(value *string)() + SetLastConnectorConnectionTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastUploadVersion(value *int64)() + SetOdataType(value *string)() + SetStatus(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificate_destination_store.go b/src/internal/connector/graph/betasdk/models/certificate_destination_store.go new file mode 100644 index 000000000..c0a1beff7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_destination_store.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateDestinationStore int + +const ( + // Computer Certificate Store - Root. + COMPUTERCERTSTOREROOT_CERTIFICATEDESTINATIONSTORE CertificateDestinationStore = iota + // Computer Certificate Store - Intermediate. + COMPUTERCERTSTOREINTERMEDIATE_CERTIFICATEDESTINATIONSTORE + // User Certificate Store - Intermediate. + USERCERTSTOREINTERMEDIATE_CERTIFICATEDESTINATIONSTORE +) + +func (i CertificateDestinationStore) String() string { + return []string{"computerCertStoreRoot", "computerCertStoreIntermediate", "userCertStoreIntermediate"}[i] +} +func ParseCertificateDestinationStore(v string) (interface{}, error) { + result := COMPUTERCERTSTOREROOT_CERTIFICATEDESTINATIONSTORE + switch v { + case "computerCertStoreRoot": + result = COMPUTERCERTSTOREROOT_CERTIFICATEDESTINATIONSTORE + case "computerCertStoreIntermediate": + result = COMPUTERCERTSTOREINTERMEDIATE_CERTIFICATEDESTINATIONSTORE + case "userCertStoreIntermediate": + result = USERCERTSTOREINTERMEDIATE_CERTIFICATEDESTINATIONSTORE + default: + return 0, errors.New("Unknown CertificateDestinationStore value: " + v) + } + return &result, nil +} +func SerializeCertificateDestinationStore(values []CertificateDestinationStore) []string { + 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/certificate_issuance_states.go b/src/internal/connector/graph/betasdk/models/certificate_issuance_states.go new file mode 100644 index 000000000..da9615a41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_issuance_states.go @@ -0,0 +1,97 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateIssuanceStates int + +const ( + UNKNOWN_CERTIFICATEISSUANCESTATES CertificateIssuanceStates = iota + CHALLENGEISSUED_CERTIFICATEISSUANCESTATES + CHALLENGEISSUEFAILED_CERTIFICATEISSUANCESTATES + REQUESTCREATIONFAILED_CERTIFICATEISSUANCESTATES + REQUESTSUBMITFAILED_CERTIFICATEISSUANCESTATES + CHALLENGEVALIDATIONSUCCEEDED_CERTIFICATEISSUANCESTATES + CHALLENGEVALIDATIONFAILED_CERTIFICATEISSUANCESTATES + ISSUEFAILED_CERTIFICATEISSUANCESTATES + ISSUEPENDING_CERTIFICATEISSUANCESTATES + ISSUED_CERTIFICATEISSUANCESTATES + RESPONSEPROCESSINGFAILED_CERTIFICATEISSUANCESTATES + RESPONSEPENDING_CERTIFICATEISSUANCESTATES + ENROLLMENTSUCCEEDED_CERTIFICATEISSUANCESTATES + ENROLLMENTNOTNEEDED_CERTIFICATEISSUANCESTATES + REVOKED_CERTIFICATEISSUANCESTATES + REMOVEDFROMCOLLECTION_CERTIFICATEISSUANCESTATES + RENEWVERIFIED_CERTIFICATEISSUANCESTATES + INSTALLFAILED_CERTIFICATEISSUANCESTATES + INSTALLED_CERTIFICATEISSUANCESTATES + DELETEFAILED_CERTIFICATEISSUANCESTATES + DELETED_CERTIFICATEISSUANCESTATES + RENEWALREQUESTED_CERTIFICATEISSUANCESTATES + REQUESTED_CERTIFICATEISSUANCESTATES +) + +func (i CertificateIssuanceStates) String() string { + return []string{"unknown", "challengeIssued", "challengeIssueFailed", "requestCreationFailed", "requestSubmitFailed", "challengeValidationSucceeded", "challengeValidationFailed", "issueFailed", "issuePending", "issued", "responseProcessingFailed", "responsePending", "enrollmentSucceeded", "enrollmentNotNeeded", "revoked", "removedFromCollection", "renewVerified", "installFailed", "installed", "deleteFailed", "deleted", "renewalRequested", "requested"}[i] +} +func ParseCertificateIssuanceStates(v string) (interface{}, error) { + result := UNKNOWN_CERTIFICATEISSUANCESTATES + switch v { + case "unknown": + result = UNKNOWN_CERTIFICATEISSUANCESTATES + case "challengeIssued": + result = CHALLENGEISSUED_CERTIFICATEISSUANCESTATES + case "challengeIssueFailed": + result = CHALLENGEISSUEFAILED_CERTIFICATEISSUANCESTATES + case "requestCreationFailed": + result = REQUESTCREATIONFAILED_CERTIFICATEISSUANCESTATES + case "requestSubmitFailed": + result = REQUESTSUBMITFAILED_CERTIFICATEISSUANCESTATES + case "challengeValidationSucceeded": + result = CHALLENGEVALIDATIONSUCCEEDED_CERTIFICATEISSUANCESTATES + case "challengeValidationFailed": + result = CHALLENGEVALIDATIONFAILED_CERTIFICATEISSUANCESTATES + case "issueFailed": + result = ISSUEFAILED_CERTIFICATEISSUANCESTATES + case "issuePending": + result = ISSUEPENDING_CERTIFICATEISSUANCESTATES + case "issued": + result = ISSUED_CERTIFICATEISSUANCESTATES + case "responseProcessingFailed": + result = RESPONSEPROCESSINGFAILED_CERTIFICATEISSUANCESTATES + case "responsePending": + result = RESPONSEPENDING_CERTIFICATEISSUANCESTATES + case "enrollmentSucceeded": + result = ENROLLMENTSUCCEEDED_CERTIFICATEISSUANCESTATES + case "enrollmentNotNeeded": + result = ENROLLMENTNOTNEEDED_CERTIFICATEISSUANCESTATES + case "revoked": + result = REVOKED_CERTIFICATEISSUANCESTATES + case "removedFromCollection": + result = REMOVEDFROMCOLLECTION_CERTIFICATEISSUANCESTATES + case "renewVerified": + result = RENEWVERIFIED_CERTIFICATEISSUANCESTATES + case "installFailed": + result = INSTALLFAILED_CERTIFICATEISSUANCESTATES + case "installed": + result = INSTALLED_CERTIFICATEISSUANCESTATES + case "deleteFailed": + result = DELETEFAILED_CERTIFICATEISSUANCESTATES + case "deleted": + result = DELETED_CERTIFICATEISSUANCESTATES + case "renewalRequested": + result = RENEWALREQUESTED_CERTIFICATEISSUANCESTATES + case "requested": + result = REQUESTED_CERTIFICATEISSUANCESTATES + default: + return 0, errors.New("Unknown CertificateIssuanceStates value: " + v) + } + return &result, nil +} +func SerializeCertificateIssuanceStates(values []CertificateIssuanceStates) []string { + 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/certificate_revocation_status.go b/src/internal/connector/graph/betasdk/models/certificate_revocation_status.go new file mode 100644 index 000000000..5004daed7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_revocation_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateRevocationStatus int + +const ( + // Not revoked. + NONE_CERTIFICATEREVOCATIONSTATUS CertificateRevocationStatus = iota + // Revocation pending. + PENDING_CERTIFICATEREVOCATIONSTATUS + // Revocation command issued. + ISSUED_CERTIFICATEREVOCATIONSTATUS + // Revocation failed. + FAILED_CERTIFICATEREVOCATIONSTATUS + // Revoked. + REVOKED_CERTIFICATEREVOCATIONSTATUS +) + +func (i CertificateRevocationStatus) String() string { + return []string{"none", "pending", "issued", "failed", "revoked"}[i] +} +func ParseCertificateRevocationStatus(v string) (interface{}, error) { + result := NONE_CERTIFICATEREVOCATIONSTATUS + switch v { + case "none": + result = NONE_CERTIFICATEREVOCATIONSTATUS + case "pending": + result = PENDING_CERTIFICATEREVOCATIONSTATUS + case "issued": + result = ISSUED_CERTIFICATEREVOCATIONSTATUS + case "failed": + result = FAILED_CERTIFICATEREVOCATIONSTATUS + case "revoked": + result = REVOKED_CERTIFICATEREVOCATIONSTATUS + default: + return 0, errors.New("Unknown CertificateRevocationStatus value: " + v) + } + return &result, nil +} +func SerializeCertificateRevocationStatus(values []CertificateRevocationStatus) []string { + 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/certificate_status.go b/src/internal/connector/graph/betasdk/models/certificate_status.go new file mode 100644 index 000000000..2fed430b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_status.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateStatus int + +const ( + NOTPROVISIONED_CERTIFICATESTATUS CertificateStatus = iota + PROVISIONED_CERTIFICATESTATUS +) + +func (i CertificateStatus) String() string { + return []string{"notProvisioned", "provisioned"}[i] +} +func ParseCertificateStatus(v string) (interface{}, error) { + result := NOTPROVISIONED_CERTIFICATESTATUS + switch v { + case "notProvisioned": + result = NOTPROVISIONED_CERTIFICATESTATUS + case "provisioned": + result = PROVISIONED_CERTIFICATESTATUS + default: + return 0, errors.New("Unknown CertificateStatus value: " + v) + } + return &result, nil +} +func SerializeCertificateStatus(values []CertificateStatus) []string { + 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/certificate_store.go b/src/internal/connector/graph/betasdk/models/certificate_store.go new file mode 100644 index 000000000..790cb8dd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_store.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateStore int + +const ( + USER_CERTIFICATESTORE CertificateStore = iota + MACHINE_CERTIFICATESTORE +) + +func (i CertificateStore) String() string { + return []string{"user", "machine"}[i] +} +func ParseCertificateStore(v string) (interface{}, error) { + result := USER_CERTIFICATESTORE + switch v { + case "user": + result = USER_CERTIFICATESTORE + case "machine": + result = MACHINE_CERTIFICATESTORE + default: + return 0, errors.New("Unknown CertificateStore value: " + v) + } + return &result, nil +} +func SerializeCertificateStore(values []CertificateStore) []string { + 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/certificate_validity_period_scale.go b/src/internal/connector/graph/betasdk/models/certificate_validity_period_scale.go new file mode 100644 index 000000000..86c4cbfb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificate_validity_period_scale.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CertificateValidityPeriodScale int + +const ( + // Days. + DAYS_CERTIFICATEVALIDITYPERIODSCALE CertificateValidityPeriodScale = iota + // Months. + MONTHS_CERTIFICATEVALIDITYPERIODSCALE + // Years. + YEARS_CERTIFICATEVALIDITYPERIODSCALE +) + +func (i CertificateValidityPeriodScale) String() string { + return []string{"days", "months", "years"}[i] +} +func ParseCertificateValidityPeriodScale(v string) (interface{}, error) { + result := DAYS_CERTIFICATEVALIDITYPERIODSCALE + switch v { + case "days": + result = DAYS_CERTIFICATEVALIDITYPERIODSCALE + case "months": + result = MONTHS_CERTIFICATEVALIDITYPERIODSCALE + case "years": + result = YEARS_CERTIFICATEVALIDITYPERIODSCALE + default: + return 0, errors.New("Unknown CertificateValidityPeriodScale value: " + v) + } + return &result, nil +} +func SerializeCertificateValidityPeriodScale(values []CertificateValidityPeriodScale) []string { + 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/certification.go b/src/internal/connector/graph/betasdk/models/certification.go new file mode 100644 index 000000000..2a4e3408a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certification.go @@ -0,0 +1,190 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Certification +type Certification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // URL that shows certification details for the application. + certificationDetailsUrl *string + // The timestamp when the current certification for the application will expire. + certificationExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates whether the application is certified by Microsoft. + isCertifiedByMicrosoft *bool + // Indicates whether the application has been self-attested by the application developer or the publisher. + isPublisherAttested *bool + // The timestamp when the certification for the application was most recently added or updated. + lastCertificationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewCertification instantiates a new certification and sets the default values. +func NewCertification()(*Certification) { + m := &Certification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCertificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertification(), 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 *Certification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertificationDetailsUrl gets the certificationDetailsUrl property value. URL that shows certification details for the application. +func (m *Certification) GetCertificationDetailsUrl()(*string) { + return m.certificationDetailsUrl +} +// GetCertificationExpirationDateTime gets the certificationExpirationDateTime property value. The timestamp when the current certification for the application will expire. +func (m *Certification) GetCertificationExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificationExpirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Certification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificationDetailsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationDetailsUrl(val) + } + return nil + } + res["certificationExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationExpirationDateTime(val) + } + return nil + } + res["isCertifiedByMicrosoft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCertifiedByMicrosoft(val) + } + return nil + } + res["isPublisherAttested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPublisherAttested(val) + } + return nil + } + res["lastCertificationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCertificationDateTime(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 + } + return res +} +// GetIsCertifiedByMicrosoft gets the isCertifiedByMicrosoft property value. Indicates whether the application is certified by Microsoft. +func (m *Certification) GetIsCertifiedByMicrosoft()(*bool) { + return m.isCertifiedByMicrosoft +} +// GetIsPublisherAttested gets the isPublisherAttested property value. Indicates whether the application has been self-attested by the application developer or the publisher. +func (m *Certification) GetIsPublisherAttested()(*bool) { + return m.isPublisherAttested +} +// GetLastCertificationDateTime gets the lastCertificationDateTime property value. The timestamp when the certification for the application was most recently added or updated. +func (m *Certification) GetLastCertificationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCertificationDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Certification) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Certification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("certificationExpirationDateTime", m.GetCertificationExpirationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPublisherAttested", m.GetIsPublisherAttested()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastCertificationDateTime", m.GetLastCertificationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Certification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertificationDetailsUrl sets the certificationDetailsUrl property value. URL that shows certification details for the application. +func (m *Certification) SetCertificationDetailsUrl(value *string)() { + m.certificationDetailsUrl = value +} +// SetCertificationExpirationDateTime sets the certificationExpirationDateTime property value. The timestamp when the current certification for the application will expire. +func (m *Certification) SetCertificationExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificationExpirationDateTime = value +} +// SetIsCertifiedByMicrosoft sets the isCertifiedByMicrosoft property value. Indicates whether the application is certified by Microsoft. +func (m *Certification) SetIsCertifiedByMicrosoft(value *bool)() { + m.isCertifiedByMicrosoft = value +} +// SetIsPublisherAttested sets the isPublisherAttested property value. Indicates whether the application has been self-attested by the application developer or the publisher. +func (m *Certification) SetIsPublisherAttested(value *bool)() { + m.isPublisherAttested = value +} +// SetLastCertificationDateTime sets the lastCertificationDateTime property value. The timestamp when the certification for the application was most recently added or updated. +func (m *Certification) SetLastCertificationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCertificationDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Certification) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/certification_control.go b/src/internal/connector/graph/betasdk/models/certification_control.go new file mode 100644 index 000000000..ecba2634b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certification_control.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificationControl +type CertificationControl 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 name property + name *string + // The OdataType property + odataType *string + // The url property + url *string +} +// NewCertificationControl instantiates a new certificationControl and sets the default values. +func NewCertificationControl()(*CertificationControl) { + m := &CertificationControl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCertificationControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificationControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificationControl(), 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 *CertificationControl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificationControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *CertificationControl) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CertificationControl) GetOdataType()(*string) { + return m.odataType +} +// GetUrl gets the url property value. The url property +func (m *CertificationControl) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *CertificationControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *CertificationControl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *CertificationControl) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CertificationControl) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrl sets the url property value. The url property +func (m *CertificationControl) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/certification_control_collection_response.go b/src/internal/connector/graph/betasdk/models/certification_control_collection_response.go new file mode 100644 index 000000000..347c7ffe8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certification_control_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificationControlCollectionResponse +type CertificationControlCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CertificationControlable +} +// NewCertificationControlCollectionResponse instantiates a new CertificationControlCollectionResponse and sets the default values. +func NewCertificationControlCollectionResponse()(*CertificationControlCollectionResponse) { + m := &CertificationControlCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCertificationControlCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCertificationControlCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCertificationControlCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CertificationControlCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificationControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificationControlable, len(val)) + for i, v := range val { + res[i] = v.(CertificationControlable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CertificationControlCollectionResponse) GetValue()([]CertificationControlable) { + return m.value +} +// Serialize serializes information the current object +func (m *CertificationControlCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CertificationControlCollectionResponse) SetValue(value []CertificationControlable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/certification_control_collection_responseable.go b/src/internal/connector/graph/betasdk/models/certification_control_collection_responseable.go new file mode 100644 index 000000000..cf6693285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certification_control_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificationControlCollectionResponseable +type CertificationControlCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CertificationControlable) + SetValue(value []CertificationControlable)() +} diff --git a/src/internal/connector/graph/betasdk/models/certification_controlable.go b/src/internal/connector/graph/betasdk/models/certification_controlable.go new file mode 100644 index 000000000..ba34dfcbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certification_controlable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CertificationControlable +type CertificationControlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetUrl()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/certificationable.go b/src/internal/connector/graph/betasdk/models/certificationable.go new file mode 100644 index 000000000..84562f977 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/certificationable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Certificationable +type Certificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificationDetailsUrl()(*string) + GetCertificationExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsCertifiedByMicrosoft()(*bool) + GetIsPublisherAttested()(*bool) + GetLastCertificationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetCertificationDetailsUrl(value *string)() + SetCertificationExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsCertifiedByMicrosoft(value *bool)() + SetIsPublisherAttested(value *bool)() + SetLastCertificationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/change_notification.go b/src/internal/connector/graph/betasdk/models/change_notification.go new file mode 100644 index 000000000..f9d00e904 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notification.go @@ -0,0 +1,335 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotification +type ChangeNotification 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 changeType property + changeType *ChangeType + // Value of the clientState property sent specified in the subscription request (if any). The maximum length is 255 characters. The client can check whether the change notification came from the service by comparing the values of the clientState property. The value of the clientState property sent with the subscription is compared with the value of the clientState property received with each change notification. Optional. + clientState *string + // (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and includeResourceData were defined during the subscription request and if the resource supports it. Optional. + encryptedContent ChangeNotificationEncryptedContentable + // Unique ID for the notification. Optional. + id *string + // The type of lifecycle notification if the current notification is a lifecycle notification. Optional. Supported values are missed, subscriptionRemoved, reauthorizationRequired. Optional. + lifecycleEvent *LifecycleEventType + // The OdataType property + odataType *string + // The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required. + resource *string + // The content of this property depends on the type of resource being subscribed to. Optional. + resourceData ResourceDataable + // The expiration time for the subscription. Required. + subscriptionExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of the subscription that generated the notification. Required. + subscriptionId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unique identifier of the tenant from which the change notification originated. Required. + tenantId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewChangeNotification instantiates a new changeNotification and sets the default values. +func NewChangeNotification()(*ChangeNotification) { + m := &ChangeNotification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChangeNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChangeNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChangeNotification(), 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 *ChangeNotification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChangeType gets the changeType property value. The changeType property +func (m *ChangeNotification) GetChangeType()(*ChangeType) { + return m.changeType +} +// GetClientState gets the clientState property value. Value of the clientState property sent specified in the subscription request (if any). The maximum length is 255 characters. The client can check whether the change notification came from the service by comparing the values of the clientState property. The value of the clientState property sent with the subscription is compared with the value of the clientState property received with each change notification. Optional. +func (m *ChangeNotification) GetClientState()(*string) { + return m.clientState +} +// GetEncryptedContent gets the encryptedContent property value. (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and includeResourceData were defined during the subscription request and if the resource supports it. Optional. +func (m *ChangeNotification) GetEncryptedContent()(ChangeNotificationEncryptedContentable) { + return m.encryptedContent +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChangeNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["changeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChangeType) + if err != nil { + return err + } + if val != nil { + m.SetChangeType(val.(*ChangeType)) + } + return nil + } + res["clientState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientState(val) + } + return nil + } + res["encryptedContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChangeNotificationEncryptedContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEncryptedContent(val.(ChangeNotificationEncryptedContentable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["lifecycleEvent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleEventType) + if err != nil { + return err + } + if val != nil { + m.SetLifecycleEvent(val.(*LifecycleEventType)) + } + 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["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + res["resourceData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResourceDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResourceData(val.(ResourceDataable)) + } + return nil + } + res["subscriptionExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionExpirationDateTime(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique ID for the notification. Optional. +func (m *ChangeNotification) GetId()(*string) { + return m.id +} +// GetLifecycleEvent gets the lifecycleEvent property value. The type of lifecycle notification if the current notification is a lifecycle notification. Optional. Supported values are missed, subscriptionRemoved, reauthorizationRequired. Optional. +func (m *ChangeNotification) GetLifecycleEvent()(*LifecycleEventType) { + return m.lifecycleEvent +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChangeNotification) GetOdataType()(*string) { + return m.odataType +} +// GetResource gets the resource property value. The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required. +func (m *ChangeNotification) GetResource()(*string) { + return m.resource +} +// GetResourceData gets the resourceData property value. The content of this property depends on the type of resource being subscribed to. Optional. +func (m *ChangeNotification) GetResourceData()(ResourceDataable) { + return m.resourceData +} +// GetSubscriptionExpirationDateTime gets the subscriptionExpirationDateTime property value. The expiration time for the subscription. Required. +func (m *ChangeNotification) GetSubscriptionExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.subscriptionExpirationDateTime +} +// GetSubscriptionId gets the subscriptionId property value. The unique identifier of the subscription that generated the notification. Required. +func (m *ChangeNotification) GetSubscriptionId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.subscriptionId +} +// GetTenantId gets the tenantId property value. The unique identifier of the tenant from which the change notification originated. Required. +func (m *ChangeNotification) GetTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ChangeNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChangeType() != nil { + cast := (*m.GetChangeType()).String() + err := writer.WriteStringValue("changeType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clientState", m.GetClientState()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("encryptedContent", m.GetEncryptedContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + if m.GetLifecycleEvent() != nil { + cast := (*m.GetLifecycleEvent()).String() + err := writer.WriteStringValue("lifecycleEvent", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("resourceData", m.GetResourceData()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("subscriptionExpirationDateTime", m.GetSubscriptionExpirationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("tenantId", m.GetTenantId()) + 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 *ChangeNotification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChangeType sets the changeType property value. The changeType property +func (m *ChangeNotification) SetChangeType(value *ChangeType)() { + m.changeType = value +} +// SetClientState sets the clientState property value. Value of the clientState property sent specified in the subscription request (if any). The maximum length is 255 characters. The client can check whether the change notification came from the service by comparing the values of the clientState property. The value of the clientState property sent with the subscription is compared with the value of the clientState property received with each change notification. Optional. +func (m *ChangeNotification) SetClientState(value *string)() { + m.clientState = value +} +// SetEncryptedContent sets the encryptedContent property value. (Preview) Encrypted content attached with the change notification. Only provided if encryptionCertificate and includeResourceData were defined during the subscription request and if the resource supports it. Optional. +func (m *ChangeNotification) SetEncryptedContent(value ChangeNotificationEncryptedContentable)() { + m.encryptedContent = value +} +// SetId sets the id property value. Unique ID for the notification. Optional. +func (m *ChangeNotification) SetId(value *string)() { + m.id = value +} +// SetLifecycleEvent sets the lifecycleEvent property value. The type of lifecycle notification if the current notification is a lifecycle notification. Optional. Supported values are missed, subscriptionRemoved, reauthorizationRequired. Optional. +func (m *ChangeNotification) SetLifecycleEvent(value *LifecycleEventType)() { + m.lifecycleEvent = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChangeNotification) SetOdataType(value *string)() { + m.odataType = value +} +// SetResource sets the resource property value. The URI of the resource that emitted the change notification relative to https://graph.microsoft.com. Required. +func (m *ChangeNotification) SetResource(value *string)() { + m.resource = value +} +// SetResourceData sets the resourceData property value. The content of this property depends on the type of resource being subscribed to. Optional. +func (m *ChangeNotification) SetResourceData(value ResourceDataable)() { + m.resourceData = value +} +// SetSubscriptionExpirationDateTime sets the subscriptionExpirationDateTime property value. The expiration time for the subscription. Required. +func (m *ChangeNotification) SetSubscriptionExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.subscriptionExpirationDateTime = value +} +// SetSubscriptionId sets the subscriptionId property value. The unique identifier of the subscription that generated the notification. Required. +func (m *ChangeNotification) SetSubscriptionId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.subscriptionId = value +} +// SetTenantId sets the tenantId property value. The unique identifier of the tenant from which the change notification originated. Required. +func (m *ChangeNotification) SetTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/change_notification_collection_response.go b/src/internal/connector/graph/betasdk/models/change_notification_collection_response.go new file mode 100644 index 000000000..e2801be7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotificationCollectionResponse +type ChangeNotificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChangeNotificationable +} +// NewChangeNotificationCollectionResponse instantiates a new ChangeNotificationCollectionResponse and sets the default values. +func NewChangeNotificationCollectionResponse()(*ChangeNotificationCollectionResponse) { + m := &ChangeNotificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChangeNotificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChangeNotificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChangeNotificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChangeNotificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChangeNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChangeNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ChangeNotificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChangeNotificationCollectionResponse) GetValue()([]ChangeNotificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChangeNotificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChangeNotificationCollectionResponse) SetValue(value []ChangeNotificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/change_notification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/change_notification_collection_responseable.go new file mode 100644 index 000000000..812eb85ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotificationCollectionResponseable +type ChangeNotificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChangeNotificationable) + SetValue(value []ChangeNotificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/change_notification_encrypted_content.go b/src/internal/connector/graph/betasdk/models/change_notification_encrypted_content.go new file mode 100644 index 000000000..15c7b7ed0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notification_encrypted_content.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotificationEncryptedContent +type ChangeNotificationEncryptedContent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Base64-encoded encrypted data that produces a full resource respresented as JSON. The data has been encrypted with the provided dataKey using an AES/CBC/PKCS5PADDING cipher suite. + data *string + // Base64-encoded symmetric key generated by Microsoft Graph to encrypt the data value and to generate the data signature. This key is encrypted with the certificate public key that was provided during the subscription. It must be decrypted with the certificate private key before it can be used to decrypt the data or verify the signature. This key has been encrypted with the following cipher suite: RSA/ECB/OAEPWithSHA1AndMGF1Padding. + dataKey *string + // Base64-encoded HMAC-SHA256 hash of the data for validation purposes. + dataSignature *string + // ID of the certificate used to encrypt the dataKey. + encryptionCertificateId *string + // Hexadecimal representation of the thumbprint of the certificate used to encrypt the dataKey. + encryptionCertificateThumbprint *string + // The OdataType property + odataType *string +} +// NewChangeNotificationEncryptedContent instantiates a new changeNotificationEncryptedContent and sets the default values. +func NewChangeNotificationEncryptedContent()(*ChangeNotificationEncryptedContent) { + m := &ChangeNotificationEncryptedContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChangeNotificationEncryptedContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChangeNotificationEncryptedContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChangeNotificationEncryptedContent(), 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 *ChangeNotificationEncryptedContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetData gets the data property value. Base64-encoded encrypted data that produces a full resource respresented as JSON. The data has been encrypted with the provided dataKey using an AES/CBC/PKCS5PADDING cipher suite. +func (m *ChangeNotificationEncryptedContent) GetData()(*string) { + return m.data +} +// GetDataKey gets the dataKey property value. Base64-encoded symmetric key generated by Microsoft Graph to encrypt the data value and to generate the data signature. This key is encrypted with the certificate public key that was provided during the subscription. It must be decrypted with the certificate private key before it can be used to decrypt the data or verify the signature. This key has been encrypted with the following cipher suite: RSA/ECB/OAEPWithSHA1AndMGF1Padding. +func (m *ChangeNotificationEncryptedContent) GetDataKey()(*string) { + return m.dataKey +} +// GetDataSignature gets the dataSignature property value. Base64-encoded HMAC-SHA256 hash of the data for validation purposes. +func (m *ChangeNotificationEncryptedContent) GetDataSignature()(*string) { + return m.dataSignature +} +// GetEncryptionCertificateId gets the encryptionCertificateId property value. ID of the certificate used to encrypt the dataKey. +func (m *ChangeNotificationEncryptedContent) GetEncryptionCertificateId()(*string) { + return m.encryptionCertificateId +} +// GetEncryptionCertificateThumbprint gets the encryptionCertificateThumbprint property value. Hexadecimal representation of the thumbprint of the certificate used to encrypt the dataKey. +func (m *ChangeNotificationEncryptedContent) GetEncryptionCertificateThumbprint()(*string) { + return m.encryptionCertificateThumbprint +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChangeNotificationEncryptedContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetData(val) + } + return nil + } + res["dataKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataKey(val) + } + return nil + } + res["dataSignature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataSignature(val) + } + return nil + } + res["encryptionCertificateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptionCertificateId(val) + } + return nil + } + res["encryptionCertificateThumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptionCertificateThumbprint(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChangeNotificationEncryptedContent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ChangeNotificationEncryptedContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dataKey", m.GetDataKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dataSignature", m.GetDataSignature()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encryptionCertificateId", m.GetEncryptionCertificateId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("encryptionCertificateThumbprint", m.GetEncryptionCertificateThumbprint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ChangeNotificationEncryptedContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetData sets the data property value. Base64-encoded encrypted data that produces a full resource respresented as JSON. The data has been encrypted with the provided dataKey using an AES/CBC/PKCS5PADDING cipher suite. +func (m *ChangeNotificationEncryptedContent) SetData(value *string)() { + m.data = value +} +// SetDataKey sets the dataKey property value. Base64-encoded symmetric key generated by Microsoft Graph to encrypt the data value and to generate the data signature. This key is encrypted with the certificate public key that was provided during the subscription. It must be decrypted with the certificate private key before it can be used to decrypt the data or verify the signature. This key has been encrypted with the following cipher suite: RSA/ECB/OAEPWithSHA1AndMGF1Padding. +func (m *ChangeNotificationEncryptedContent) SetDataKey(value *string)() { + m.dataKey = value +} +// SetDataSignature sets the dataSignature property value. Base64-encoded HMAC-SHA256 hash of the data for validation purposes. +func (m *ChangeNotificationEncryptedContent) SetDataSignature(value *string)() { + m.dataSignature = value +} +// SetEncryptionCertificateId sets the encryptionCertificateId property value. ID of the certificate used to encrypt the dataKey. +func (m *ChangeNotificationEncryptedContent) SetEncryptionCertificateId(value *string)() { + m.encryptionCertificateId = value +} +// SetEncryptionCertificateThumbprint sets the encryptionCertificateThumbprint property value. Hexadecimal representation of the thumbprint of the certificate used to encrypt the dataKey. +func (m *ChangeNotificationEncryptedContent) SetEncryptionCertificateThumbprint(value *string)() { + m.encryptionCertificateThumbprint = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChangeNotificationEncryptedContent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/change_notification_encrypted_contentable.go b/src/internal/connector/graph/betasdk/models/change_notification_encrypted_contentable.go new file mode 100644 index 000000000..ab90c9ebf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notification_encrypted_contentable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotificationEncryptedContentable +type ChangeNotificationEncryptedContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetData()(*string) + GetDataKey()(*string) + GetDataSignature()(*string) + GetEncryptionCertificateId()(*string) + GetEncryptionCertificateThumbprint()(*string) + GetOdataType()(*string) + SetData(value *string)() + SetDataKey(value *string)() + SetDataSignature(value *string)() + SetEncryptionCertificateId(value *string)() + SetEncryptionCertificateThumbprint(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/change_notificationable.go b/src/internal/connector/graph/betasdk/models/change_notificationable.go new file mode 100644 index 000000000..68ed7cce8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_notificationable.go @@ -0,0 +1,35 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeNotificationable +type ChangeNotificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeType()(*ChangeType) + GetClientState()(*string) + GetEncryptedContent()(ChangeNotificationEncryptedContentable) + GetId()(*string) + GetLifecycleEvent()(*LifecycleEventType) + GetOdataType()(*string) + GetResource()(*string) + GetResourceData()(ResourceDataable) + GetSubscriptionExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubscriptionId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetChangeType(value *ChangeType)() + SetClientState(value *string)() + SetEncryptedContent(value ChangeNotificationEncryptedContentable)() + SetId(value *string)() + SetLifecycleEvent(value *LifecycleEventType)() + SetOdataType(value *string)() + SetResource(value *string)() + SetResourceData(value ResourceDataable)() + SetSubscriptionExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubscriptionId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/change_tracked_entity.go b/src/internal/connector/graph/betasdk/models/change_tracked_entity.go new file mode 100644 index 000000000..7a28850f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_tracked_entity.go @@ -0,0 +1,163 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeTrackedEntity provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChangeTrackedEntity struct { + Entity + // The createdBy property + createdBy IdentitySetable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Identity of the person who last modified the entity. + lastModifiedBy IdentitySetable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewChangeTrackedEntity instantiates a new changeTrackedEntity and sets the default values. +func NewChangeTrackedEntity()(*ChangeTrackedEntity) { + m := &ChangeTrackedEntity{ + Entity: *NewEntity(), + } + return m +} +// CreateChangeTrackedEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChangeTrackedEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.offerShiftRequest": + return NewOfferShiftRequest(), nil + case "#microsoft.graph.openShift": + return NewOpenShift(), nil + case "#microsoft.graph.openShiftChangeRequest": + return NewOpenShiftChangeRequest(), nil + case "#microsoft.graph.scheduleChangeRequest": + return NewScheduleChangeRequest(), nil + case "#microsoft.graph.schedulingGroup": + return NewSchedulingGroup(), nil + case "#microsoft.graph.shift": + return NewShift(), nil + case "#microsoft.graph.shiftPreferences": + return NewShiftPreferences(), nil + case "#microsoft.graph.swapShiftsChangeRequest": + return NewSwapShiftsChangeRequest(), nil + case "#microsoft.graph.timeCard": + return NewTimeCard(), nil + case "#microsoft.graph.timeOff": + return NewTimeOff(), nil + case "#microsoft.graph.timeOffReason": + return NewTimeOffReason(), nil + case "#microsoft.graph.timeOffRequest": + return NewTimeOffRequest(), nil + case "#microsoft.graph.workforceIntegration": + return NewWorkforceIntegration(), nil + } + } + } + } + return NewChangeTrackedEntity(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *ChangeTrackedEntity) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChangeTrackedEntity) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChangeTrackedEntity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the person who last modified the entity. +func (m *ChangeTrackedEntity) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChangeTrackedEntity) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *ChangeTrackedEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *ChangeTrackedEntity) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChangeTrackedEntity) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the person who last modified the entity. +func (m *ChangeTrackedEntity) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChangeTrackedEntity) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/change_tracked_entityable.go b/src/internal/connector/graph/betasdk/models/change_tracked_entityable.go new file mode 100644 index 000000000..3ccf230c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_tracked_entityable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChangeTrackedEntityable +type ChangeTrackedEntityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/change_type.go b/src/internal/connector/graph/betasdk/models/change_type.go new file mode 100644 index 000000000..a1b35af15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type ChangeType int + +const ( + CREATED_CHANGETYPE ChangeType = iota + UPDATED_CHANGETYPE + DELETED_CHANGETYPE +) + +func (i ChangeType) String() string { + return []string{"created", "updated", "deleted"}[i] +} +func ParseChangeType(v string) (interface{}, error) { + result := CREATED_CHANGETYPE + switch v { + case "created": + result = CREATED_CHANGETYPE + case "updated": + result = UPDATED_CHANGETYPE + case "deleted": + result = DELETED_CHANGETYPE + default: + return 0, errors.New("Unknown ChangeType value: " + v) + } + return &result, nil +} +func SerializeChangeType(values []ChangeType) []string { + 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/change_uefi_settings_permission.go b/src/internal/connector/graph/betasdk/models/change_uefi_settings_permission.go new file mode 100644 index 000000000..533451454 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/change_uefi_settings_permission.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChangeUefiSettingsPermission int + +const ( + // Device default value, no intent. + NOTCONFIGUREDONLY_CHANGEUEFISETTINGSPERMISSION ChangeUefiSettingsPermission = iota + // Prevent change of UEFI setting permission + NONE_CHANGEUEFISETTINGSPERMISSION +) + +func (i ChangeUefiSettingsPermission) String() string { + return []string{"notConfiguredOnly", "none"}[i] +} +func ParseChangeUefiSettingsPermission(v string) (interface{}, error) { + result := NOTCONFIGUREDONLY_CHANGEUEFISETTINGSPERMISSION + switch v { + case "notConfiguredOnly": + result = NOTCONFIGUREDONLY_CHANGEUEFISETTINGSPERMISSION + case "none": + result = NONE_CHANGEUEFISETTINGSPERMISSION + default: + return 0, errors.New("Unknown ChangeUefiSettingsPermission value: " + v) + } + return &result, nil +} +func SerializeChangeUefiSettingsPermission(values []ChangeUefiSettingsPermission) []string { + 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/channel.go b/src/internal/connector/graph/betasdk/models/channel.go new file mode 100644 index 000000000..1482e4211 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel.go @@ -0,0 +1,458 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Channel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Channel struct { + Entity + // Read only. Timestamp at which the channel was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional textual description for the channel. + description *string + // Channel name as it will appear to the user in Microsoft Teams. The maximum length is 50 characters. + displayName *string + // The email address for sending messages to the channel. Read-only. + email *string + // Metadata for the location where the channel's files are stored. + filesFolder DriveItemable + // Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. + isFavoriteByDefault *bool + // A collection of membership records associated with the channel. + members []ConversationMemberable + // The type of the channel. Can be set during creation and can't be changed. The possible values are: standard, private, unknownFutureValue, shared. The default value is standard. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: shared. + membershipType *ChannelMembershipType + // A collection of all the messages in the channel. A navigation property. Nullable. + messages []ChatMessageable + // Settings to configure channel moderation to control who can start new posts and reply to posts in that channel. + moderationSettings ChannelModerationSettingsable + // A collection of teams with which a channel is shared. + sharedWithTeams []SharedWithChannelTeamInfoable + // The summary property + summary ChannelSummaryable + // A collection of all the tabs in the channel. A navigation property. + tabs []TeamsTabable + // The ID of the Azure Active Directory tenant. + tenantId *string + // A hyperlink that will go to the channel in Microsoft Teams. This is the URL that you get when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only. + webUrl *string +} +// NewChannel instantiates a new channel and sets the default values. +func NewChannel()(*Channel) { + m := &Channel{ + Entity: *NewEntity(), + } + return m +} +// CreateChannelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannel(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Read only. Timestamp at which the channel was created. +func (m *Channel) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Optional textual description for the channel. +func (m *Channel) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Channel name as it will appear to the user in Microsoft Teams. The maximum length is 50 characters. +func (m *Channel) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email address for sending messages to the channel. Read-only. +func (m *Channel) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Channel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["filesFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFilesFolder(val.(DriveItemable)) + } + return nil + } + res["isFavoriteByDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFavoriteByDefault(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(ConversationMemberable) + } + m.SetMembers(res) + } + return nil + } + res["membershipType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChannelMembershipType) + if err != nil { + return err + } + if val != nil { + m.SetMembershipType(val.(*ChannelMembershipType)) + } + return nil + } + res["messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageable) + } + m.SetMessages(res) + } + return nil + } + res["moderationSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChannelModerationSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetModerationSettings(val.(ChannelModerationSettingsable)) + } + return nil + } + res["sharedWithTeams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedWithChannelTeamInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedWithChannelTeamInfoable, len(val)) + for i, v := range val { + res[i] = v.(SharedWithChannelTeamInfoable) + } + m.SetSharedWithTeams(res) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChannelSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSummary(val.(ChannelSummaryable)) + } + return nil + } + res["tabs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsTabFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsTabable, len(val)) + for i, v := range val { + res[i] = v.(TeamsTabable) + } + m.SetTabs(res) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetFilesFolder gets the filesFolder property value. Metadata for the location where the channel's files are stored. +func (m *Channel) GetFilesFolder()(DriveItemable) { + return m.filesFolder +} +// GetIsFavoriteByDefault gets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. +func (m *Channel) GetIsFavoriteByDefault()(*bool) { + return m.isFavoriteByDefault +} +// GetMembers gets the members property value. A collection of membership records associated with the channel. +func (m *Channel) GetMembers()([]ConversationMemberable) { + return m.members +} +// GetMembershipType gets the membershipType property value. The type of the channel. Can be set during creation and can't be changed. The possible values are: standard, private, unknownFutureValue, shared. The default value is standard. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: shared. +func (m *Channel) GetMembershipType()(*ChannelMembershipType) { + return m.membershipType +} +// GetMessages gets the messages property value. A collection of all the messages in the channel. A navigation property. Nullable. +func (m *Channel) GetMessages()([]ChatMessageable) { + return m.messages +} +// GetModerationSettings gets the moderationSettings property value. Settings to configure channel moderation to control who can start new posts and reply to posts in that channel. +func (m *Channel) GetModerationSettings()(ChannelModerationSettingsable) { + return m.moderationSettings +} +// GetSharedWithTeams gets the sharedWithTeams property value. A collection of teams with which a channel is shared. +func (m *Channel) GetSharedWithTeams()([]SharedWithChannelTeamInfoable) { + return m.sharedWithTeams +} +// GetSummary gets the summary property value. The summary property +func (m *Channel) GetSummary()(ChannelSummaryable) { + return m.summary +} +// GetTabs gets the tabs property value. A collection of all the tabs in the channel. A navigation property. +func (m *Channel) GetTabs()([]TeamsTabable) { + return m.tabs +} +// GetTenantId gets the tenantId property value. The ID of the Azure Active Directory tenant. +func (m *Channel) GetTenantId()(*string) { + return m.tenantId +} +// GetWebUrl gets the webUrl property value. A hyperlink that will go to the channel in Microsoft Teams. This is the URL that you get when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only. +func (m *Channel) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *Channel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("filesFolder", m.GetFilesFolder()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFavoriteByDefault", m.GetIsFavoriteByDefault()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetMembershipType() != nil { + cast := (*m.GetMembershipType()).String() + err = writer.WriteStringValue("membershipType", &cast) + if err != nil { + return err + } + } + if m.GetMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessages())) + for i, v := range m.GetMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("moderationSettings", m.GetModerationSettings()) + if err != nil { + return err + } + } + if m.GetSharedWithTeams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedWithTeams())) + for i, v := range m.GetSharedWithTeams() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharedWithTeams", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + if m.GetTabs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTabs())) + for i, v := range m.GetTabs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tabs", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Read only. Timestamp at which the channel was created. +func (m *Channel) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Optional textual description for the channel. +func (m *Channel) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Channel name as it will appear to the user in Microsoft Teams. The maximum length is 50 characters. +func (m *Channel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email address for sending messages to the channel. Read-only. +func (m *Channel) SetEmail(value *string)() { + m.email = value +} +// SetFilesFolder sets the filesFolder property value. Metadata for the location where the channel's files are stored. +func (m *Channel) SetFilesFolder(value DriveItemable)() { + m.filesFolder = value +} +// SetIsFavoriteByDefault sets the isFavoriteByDefault property value. Indicates whether the channel should automatically be marked 'favorite' for all members of the team. Can only be set programmatically with Create team. Default: false. +func (m *Channel) SetIsFavoriteByDefault(value *bool)() { + m.isFavoriteByDefault = value +} +// SetMembers sets the members property value. A collection of membership records associated with the channel. +func (m *Channel) SetMembers(value []ConversationMemberable)() { + m.members = value +} +// SetMembershipType sets the membershipType property value. The type of the channel. Can be set during creation and can't be changed. The possible values are: standard, private, unknownFutureValue, shared. The default value is standard. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: shared. +func (m *Channel) SetMembershipType(value *ChannelMembershipType)() { + m.membershipType = value +} +// SetMessages sets the messages property value. A collection of all the messages in the channel. A navigation property. Nullable. +func (m *Channel) SetMessages(value []ChatMessageable)() { + m.messages = value +} +// SetModerationSettings sets the moderationSettings property value. Settings to configure channel moderation to control who can start new posts and reply to posts in that channel. +func (m *Channel) SetModerationSettings(value ChannelModerationSettingsable)() { + m.moderationSettings = value +} +// SetSharedWithTeams sets the sharedWithTeams property value. A collection of teams with which a channel is shared. +func (m *Channel) SetSharedWithTeams(value []SharedWithChannelTeamInfoable)() { + m.sharedWithTeams = value +} +// SetSummary sets the summary property value. The summary property +func (m *Channel) SetSummary(value ChannelSummaryable)() { + m.summary = value +} +// SetTabs sets the tabs property value. A collection of all the tabs in the channel. A navigation property. +func (m *Channel) SetTabs(value []TeamsTabable)() { + m.tabs = value +} +// SetTenantId sets the tenantId property value. The ID of the Azure Active Directory tenant. +func (m *Channel) SetTenantId(value *string)() { + m.tenantId = value +} +// SetWebUrl sets the webUrl property value. A hyperlink that will go to the channel in Microsoft Teams. This is the URL that you get when you right-click a channel in Microsoft Teams and select Get link to channel. This URL should be treated as an opaque blob, and not parsed. Read-only. +func (m *Channel) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_added_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_added_event_message_detail.go new file mode 100644 index 000000000..8bea1d3cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_added_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelAddedEventMessageDetail +type ChannelAddedEventMessageDetail struct { + EventMessageDetail + // Display name of the channel. + channelDisplayName *string + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelAddedEventMessageDetail instantiates a new ChannelAddedEventMessageDetail and sets the default values. +func NewChannelAddedEventMessageDetail()(*ChannelAddedEventMessageDetail) { + m := &ChannelAddedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelAddedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelAddedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelAddedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelAddedEventMessageDetail(), nil +} +// GetChannelDisplayName gets the channelDisplayName property value. Display name of the channel. +func (m *ChannelAddedEventMessageDetail) GetChannelDisplayName()(*string) { + return m.channelDisplayName +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelAddedEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelAddedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelDisplayName(val) + } + return nil + } + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelAddedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelAddedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelDisplayName", m.GetChannelDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelDisplayName sets the channelDisplayName property value. Display name of the channel. +func (m *ChannelAddedEventMessageDetail) SetChannelDisplayName(value *string)() { + m.channelDisplayName = value +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelAddedEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelAddedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_added_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_added_event_message_detailable.go new file mode 100644 index 000000000..5fb49a21e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_added_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelAddedEventMessageDetailable +type ChannelAddedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelDisplayName()(*string) + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelDisplayName(value *string)() + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_collection_response.go b/src/internal/connector/graph/betasdk/models/channel_collection_response.go new file mode 100644 index 000000000..fa75e05a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelCollectionResponse +type ChannelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Channelable +} +// NewChannelCollectionResponse instantiates a new ChannelCollectionResponse and sets the default values. +func NewChannelCollectionResponse()(*ChannelCollectionResponse) { + m := &ChannelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChannelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChannelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Channelable, len(val)) + for i, v := range val { + res[i] = v.(Channelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChannelCollectionResponse) GetValue()([]Channelable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChannelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChannelCollectionResponse) SetValue(value []Channelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_collection_responseable.go b/src/internal/connector/graph/betasdk/models/channel_collection_responseable.go new file mode 100644 index 000000000..1767e461a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelCollectionResponseable +type ChannelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Channelable) + SetValue(value []Channelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detail.go new file mode 100644 index 000000000..43e8a66ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelDeletedEventMessageDetail +type ChannelDeletedEventMessageDetail struct { + EventMessageDetail + // Display name of the channel. + channelDisplayName *string + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelDeletedEventMessageDetail instantiates a new ChannelDeletedEventMessageDetail and sets the default values. +func NewChannelDeletedEventMessageDetail()(*ChannelDeletedEventMessageDetail) { + m := &ChannelDeletedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelDeletedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelDeletedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelDeletedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelDeletedEventMessageDetail(), nil +} +// GetChannelDisplayName gets the channelDisplayName property value. Display name of the channel. +func (m *ChannelDeletedEventMessageDetail) GetChannelDisplayName()(*string) { + return m.channelDisplayName +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelDeletedEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelDeletedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelDisplayName(val) + } + return nil + } + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelDeletedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelDeletedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelDisplayName", m.GetChannelDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelDisplayName sets the channelDisplayName property value. Display name of the channel. +func (m *ChannelDeletedEventMessageDetail) SetChannelDisplayName(value *string)() { + m.channelDisplayName = value +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelDeletedEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelDeletedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detailable.go new file mode 100644 index 000000000..17e981692 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_deleted_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelDeletedEventMessageDetailable +type ChannelDeletedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelDisplayName()(*string) + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelDisplayName(value *string)() + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detail.go new file mode 100644 index 000000000..9558b5c7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelDescriptionUpdatedEventMessageDetail +type ChannelDescriptionUpdatedEventMessageDetail struct { + EventMessageDetail + // The updated description of the channel. + channelDescription *string + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelDescriptionUpdatedEventMessageDetail instantiates a new ChannelDescriptionUpdatedEventMessageDetail and sets the default values. +func NewChannelDescriptionUpdatedEventMessageDetail()(*ChannelDescriptionUpdatedEventMessageDetail) { + m := &ChannelDescriptionUpdatedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelDescriptionUpdatedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelDescriptionUpdatedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelDescriptionUpdatedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelDescriptionUpdatedEventMessageDetail(), nil +} +// GetChannelDescription gets the channelDescription property value. The updated description of the channel. +func (m *ChannelDescriptionUpdatedEventMessageDetail) GetChannelDescription()(*string) { + return m.channelDescription +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelDescriptionUpdatedEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelDescriptionUpdatedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelDescription(val) + } + return nil + } + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelDescriptionUpdatedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelDescriptionUpdatedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelDescription", m.GetChannelDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelDescription sets the channelDescription property value. The updated description of the channel. +func (m *ChannelDescriptionUpdatedEventMessageDetail) SetChannelDescription(value *string)() { + m.channelDescription = value +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelDescriptionUpdatedEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelDescriptionUpdatedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detailable.go new file mode 100644 index 000000000..46fded24f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_description_updated_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelDescriptionUpdatedEventMessageDetailable +type ChannelDescriptionUpdatedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelDescription()(*string) + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelDescription(value *string)() + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_identity.go b/src/internal/connector/graph/betasdk/models/channel_identity.go new file mode 100644 index 000000000..575b27bc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_identity.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelIdentity +type ChannelIdentity 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 identity of the channel in which the message was posted. + channelId *string + // The OdataType property + odataType *string + // The identity of the team in which the message was posted. + teamId *string +} +// NewChannelIdentity instantiates a new channelIdentity and sets the default values. +func NewChannelIdentity()(*ChannelIdentity) { + m := &ChannelIdentity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChannelIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelIdentity(), 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 *ChannelIdentity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChannelId gets the channelId property value. The identity of the channel in which the message was posted. +func (m *ChannelIdentity) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(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["teamId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChannelIdentity) GetOdataType()(*string) { + return m.odataType +} +// GetTeamId gets the teamId property value. The identity of the team in which the message was posted. +func (m *ChannelIdentity) GetTeamId()(*string) { + return m.teamId +} +// Serialize serializes information the current object +func (m *ChannelIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teamId", m.GetTeamId()) + 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 *ChannelIdentity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChannelId sets the channelId property value. The identity of the channel in which the message was posted. +func (m *ChannelIdentity) SetChannelId(value *string)() { + m.channelId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChannelIdentity) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamId sets the teamId property value. The identity of the team in which the message was posted. +func (m *ChannelIdentity) SetTeamId(value *string)() { + m.teamId = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_identityable.go b/src/internal/connector/graph/betasdk/models/channel_identityable.go new file mode 100644 index 000000000..fde757acd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_identityable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelIdentityable +type ChannelIdentityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelId()(*string) + GetOdataType()(*string) + GetTeamId()(*string) + SetChannelId(value *string)() + SetOdataType(value *string)() + SetTeamId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_membership_type.go b/src/internal/connector/graph/betasdk/models/channel_membership_type.go new file mode 100644 index 000000000..67fa01061 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_membership_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChannelMembershipType int + +const ( + STANDARD_CHANNELMEMBERSHIPTYPE ChannelMembershipType = iota + PRIVATE_CHANNELMEMBERSHIPTYPE + UNKNOWNFUTUREVALUE_CHANNELMEMBERSHIPTYPE + SHARED_CHANNELMEMBERSHIPTYPE +) + +func (i ChannelMembershipType) String() string { + return []string{"standard", "private", "unknownFutureValue", "shared"}[i] +} +func ParseChannelMembershipType(v string) (interface{}, error) { + result := STANDARD_CHANNELMEMBERSHIPTYPE + switch v { + case "standard": + result = STANDARD_CHANNELMEMBERSHIPTYPE + case "private": + result = PRIVATE_CHANNELMEMBERSHIPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CHANNELMEMBERSHIPTYPE + case "shared": + result = SHARED_CHANNELMEMBERSHIPTYPE + default: + return 0, errors.New("Unknown ChannelMembershipType value: " + v) + } + return &result, nil +} +func SerializeChannelMembershipType(values []ChannelMembershipType) []string { + 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/channel_moderation_settings.go b/src/internal/connector/graph/betasdk/models/channel_moderation_settings.go new file mode 100644 index 000000000..ea41a4304 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_moderation_settings.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelModerationSettings +type ChannelModerationSettings 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 whether bots are allowed to post messages. + allowNewMessageFromBots *bool + // Indicates whether connectors are allowed to post messages. + allowNewMessageFromConnectors *bool + // The OdataType property + odataType *string + // Indicates who is allowed to reply to the teams channel. Possible values are: everyone, authorAndModerators, unknownFutureValue. + replyRestriction *ReplyRestriction + // Indicates who is allowed to post messages to teams channel. Possible values are: everyone, everyoneExceptGuests, moderators, unknownFutureValue. + userNewMessageRestriction *UserNewMessageRestriction +} +// NewChannelModerationSettings instantiates a new channelModerationSettings and sets the default values. +func NewChannelModerationSettings()(*ChannelModerationSettings) { + m := &ChannelModerationSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChannelModerationSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelModerationSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelModerationSettings(), 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 *ChannelModerationSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowNewMessageFromBots gets the allowNewMessageFromBots property value. Indicates whether bots are allowed to post messages. +func (m *ChannelModerationSettings) GetAllowNewMessageFromBots()(*bool) { + return m.allowNewMessageFromBots +} +// GetAllowNewMessageFromConnectors gets the allowNewMessageFromConnectors property value. Indicates whether connectors are allowed to post messages. +func (m *ChannelModerationSettings) GetAllowNewMessageFromConnectors()(*bool) { + return m.allowNewMessageFromConnectors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelModerationSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowNewMessageFromBots"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowNewMessageFromBots(val) + } + return nil + } + res["allowNewMessageFromConnectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowNewMessageFromConnectors(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["replyRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReplyRestriction) + if err != nil { + return err + } + if val != nil { + m.SetReplyRestriction(val.(*ReplyRestriction)) + } + return nil + } + res["userNewMessageRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserNewMessageRestriction) + if err != nil { + return err + } + if val != nil { + m.SetUserNewMessageRestriction(val.(*UserNewMessageRestriction)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChannelModerationSettings) GetOdataType()(*string) { + return m.odataType +} +// GetReplyRestriction gets the replyRestriction property value. Indicates who is allowed to reply to the teams channel. Possible values are: everyone, authorAndModerators, unknownFutureValue. +func (m *ChannelModerationSettings) GetReplyRestriction()(*ReplyRestriction) { + return m.replyRestriction +} +// GetUserNewMessageRestriction gets the userNewMessageRestriction property value. Indicates who is allowed to post messages to teams channel. Possible values are: everyone, everyoneExceptGuests, moderators, unknownFutureValue. +func (m *ChannelModerationSettings) GetUserNewMessageRestriction()(*UserNewMessageRestriction) { + return m.userNewMessageRestriction +} +// Serialize serializes information the current object +func (m *ChannelModerationSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowNewMessageFromBots", m.GetAllowNewMessageFromBots()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowNewMessageFromConnectors", m.GetAllowNewMessageFromConnectors()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetReplyRestriction() != nil { + cast := (*m.GetReplyRestriction()).String() + err := writer.WriteStringValue("replyRestriction", &cast) + if err != nil { + return err + } + } + if m.GetUserNewMessageRestriction() != nil { + cast := (*m.GetUserNewMessageRestriction()).String() + err := writer.WriteStringValue("userNewMessageRestriction", &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 *ChannelModerationSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowNewMessageFromBots sets the allowNewMessageFromBots property value. Indicates whether bots are allowed to post messages. +func (m *ChannelModerationSettings) SetAllowNewMessageFromBots(value *bool)() { + m.allowNewMessageFromBots = value +} +// SetAllowNewMessageFromConnectors sets the allowNewMessageFromConnectors property value. Indicates whether connectors are allowed to post messages. +func (m *ChannelModerationSettings) SetAllowNewMessageFromConnectors(value *bool)() { + m.allowNewMessageFromConnectors = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChannelModerationSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetReplyRestriction sets the replyRestriction property value. Indicates who is allowed to reply to the teams channel. Possible values are: everyone, authorAndModerators, unknownFutureValue. +func (m *ChannelModerationSettings) SetReplyRestriction(value *ReplyRestriction)() { + m.replyRestriction = value +} +// SetUserNewMessageRestriction sets the userNewMessageRestriction property value. Indicates who is allowed to post messages to teams channel. Possible values are: everyone, everyoneExceptGuests, moderators, unknownFutureValue. +func (m *ChannelModerationSettings) SetUserNewMessageRestriction(value *UserNewMessageRestriction)() { + m.userNewMessageRestriction = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_moderation_settingsable.go b/src/internal/connector/graph/betasdk/models/channel_moderation_settingsable.go new file mode 100644 index 000000000..6643e7310 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_moderation_settingsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelModerationSettingsable +type ChannelModerationSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowNewMessageFromBots()(*bool) + GetAllowNewMessageFromConnectors()(*bool) + GetOdataType()(*string) + GetReplyRestriction()(*ReplyRestriction) + GetUserNewMessageRestriction()(*UserNewMessageRestriction) + SetAllowNewMessageFromBots(value *bool)() + SetAllowNewMessageFromConnectors(value *bool)() + SetOdataType(value *string)() + SetReplyRestriction(value *ReplyRestriction)() + SetUserNewMessageRestriction(value *UserNewMessageRestriction)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detail.go new file mode 100644 index 000000000..7597dad39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelRenamedEventMessageDetail +type ChannelRenamedEventMessageDetail struct { + EventMessageDetail + // The updated name of the channel. + channelDisplayName *string + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelRenamedEventMessageDetail instantiates a new ChannelRenamedEventMessageDetail and sets the default values. +func NewChannelRenamedEventMessageDetail()(*ChannelRenamedEventMessageDetail) { + m := &ChannelRenamedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelRenamedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelRenamedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelRenamedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelRenamedEventMessageDetail(), nil +} +// GetChannelDisplayName gets the channelDisplayName property value. The updated name of the channel. +func (m *ChannelRenamedEventMessageDetail) GetChannelDisplayName()(*string) { + return m.channelDisplayName +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelRenamedEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelRenamedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelDisplayName(val) + } + return nil + } + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelRenamedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelRenamedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelDisplayName", m.GetChannelDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelDisplayName sets the channelDisplayName property value. The updated name of the channel. +func (m *ChannelRenamedEventMessageDetail) SetChannelDisplayName(value *string)() { + m.channelDisplayName = value +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelRenamedEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelRenamedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detailable.go new file mode 100644 index 000000000..dc276ee21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_renamed_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelRenamedEventMessageDetailable +type ChannelRenamedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelDisplayName()(*string) + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelDisplayName(value *string)() + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detail.go new file mode 100644 index 000000000..28dabf4dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detail.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelSetAsFavoriteByDefaultEventMessageDetail +type ChannelSetAsFavoriteByDefaultEventMessageDetail struct { + EventMessageDetail + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelSetAsFavoriteByDefaultEventMessageDetail instantiates a new ChannelSetAsFavoriteByDefaultEventMessageDetail and sets the default values. +func NewChannelSetAsFavoriteByDefaultEventMessageDetail()(*ChannelSetAsFavoriteByDefaultEventMessageDetail) { + m := &ChannelSetAsFavoriteByDefaultEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelSetAsFavoriteByDefaultEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelSetAsFavoriteByDefaultEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelSetAsFavoriteByDefaultEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelSetAsFavoriteByDefaultEventMessageDetail(), nil +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelSetAsFavoriteByDefaultEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detailable.go new file mode 100644 index 000000000..837691bdd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_set_as_favorite_by_default_event_message_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelSetAsFavoriteByDefaultEventMessageDetailable +type ChannelSetAsFavoriteByDefaultEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_summary.go b/src/internal/connector/graph/betasdk/models/channel_summary.go new file mode 100644 index 000000000..11c122a92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_summary.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelSummary +type ChannelSummary 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 guestsCount property + guestsCount *int32 + // The hasMembersFromOtherTenants property + hasMembersFromOtherTenants *bool + // The membersCount property + membersCount *int32 + // The OdataType property + odataType *string + // The ownersCount property + ownersCount *int32 +} +// NewChannelSummary instantiates a new channelSummary and sets the default values. +func NewChannelSummary()(*ChannelSummary) { + m := &ChannelSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChannelSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelSummary(), 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 *ChannelSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["guestsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGuestsCount(val) + } + return nil + } + res["hasMembersFromOtherTenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMembersFromOtherTenants(val) + } + return nil + } + res["membersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMembersCount(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["ownersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOwnersCount(val) + } + return nil + } + return res +} +// GetGuestsCount gets the guestsCount property value. The guestsCount property +func (m *ChannelSummary) GetGuestsCount()(*int32) { + return m.guestsCount +} +// GetHasMembersFromOtherTenants gets the hasMembersFromOtherTenants property value. The hasMembersFromOtherTenants property +func (m *ChannelSummary) GetHasMembersFromOtherTenants()(*bool) { + return m.hasMembersFromOtherTenants +} +// GetMembersCount gets the membersCount property value. The membersCount property +func (m *ChannelSummary) GetMembersCount()(*int32) { + return m.membersCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChannelSummary) GetOdataType()(*string) { + return m.odataType +} +// GetOwnersCount gets the ownersCount property value. The ownersCount property +func (m *ChannelSummary) GetOwnersCount()(*int32) { + return m.ownersCount +} +// Serialize serializes information the current object +func (m *ChannelSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("guestsCount", m.GetGuestsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasMembersFromOtherTenants", m.GetHasMembersFromOtherTenants()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("membersCount", m.GetMembersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("ownersCount", m.GetOwnersCount()) + 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 *ChannelSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetGuestsCount sets the guestsCount property value. The guestsCount property +func (m *ChannelSummary) SetGuestsCount(value *int32)() { + m.guestsCount = value +} +// SetHasMembersFromOtherTenants sets the hasMembersFromOtherTenants property value. The hasMembersFromOtherTenants property +func (m *ChannelSummary) SetHasMembersFromOtherTenants(value *bool)() { + m.hasMembersFromOtherTenants = value +} +// SetMembersCount sets the membersCount property value. The membersCount property +func (m *ChannelSummary) SetMembersCount(value *int32)() { + m.membersCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChannelSummary) SetOdataType(value *string)() { + m.odataType = value +} +// SetOwnersCount sets the ownersCount property value. The ownersCount property +func (m *ChannelSummary) SetOwnersCount(value *int32)() { + m.ownersCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_summaryable.go b/src/internal/connector/graph/betasdk/models/channel_summaryable.go new file mode 100644 index 000000000..1f1a681fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_summaryable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelSummaryable +type ChannelSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGuestsCount()(*int32) + GetHasMembersFromOtherTenants()(*bool) + GetMembersCount()(*int32) + GetOdataType()(*string) + GetOwnersCount()(*int32) + SetGuestsCount(value *int32)() + SetHasMembersFromOtherTenants(value *bool)() + SetMembersCount(value *int32)() + SetOdataType(value *string)() + SetOwnersCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detail.go b/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detail.go new file mode 100644 index 000000000..83b357c66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detail.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelUnsetAsFavoriteByDefaultEventMessageDetail +type ChannelUnsetAsFavoriteByDefaultEventMessageDetail struct { + EventMessageDetail + // Unique identifier of the channel. + channelId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChannelUnsetAsFavoriteByDefaultEventMessageDetail instantiates a new ChannelUnsetAsFavoriteByDefaultEventMessageDetail and sets the default values. +func NewChannelUnsetAsFavoriteByDefaultEventMessageDetail()(*ChannelUnsetAsFavoriteByDefaultEventMessageDetail) { + m := &ChannelUnsetAsFavoriteByDefaultEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.channelUnsetAsFavoriteByDefaultEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChannelUnsetAsFavoriteByDefaultEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChannelUnsetAsFavoriteByDefaultEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChannelUnsetAsFavoriteByDefaultEventMessageDetail(), nil +} +// GetChannelId gets the channelId property value. Unique identifier of the channel. +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) GetChannelId()(*string) { + return m.channelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["channelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChannelId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("channelId", m.GetChannelId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChannelId sets the channelId property value. Unique identifier of the channel. +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) SetChannelId(value *string)() { + m.channelId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChannelUnsetAsFavoriteByDefaultEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detailable.go new file mode 100644 index 000000000..1fc2e5d79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channel_unset_as_favorite_by_default_event_message_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChannelUnsetAsFavoriteByDefaultEventMessageDetailable +type ChannelUnsetAsFavoriteByDefaultEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannelId()(*string) + GetInitiator()(IdentitySetable) + SetChannelId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/channelable.go b/src/internal/connector/graph/betasdk/models/channelable.go new file mode 100644 index 000000000..13417cc54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/channelable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Channelable +type Channelable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetEmail()(*string) + GetFilesFolder()(DriveItemable) + GetIsFavoriteByDefault()(*bool) + GetMembers()([]ConversationMemberable) + GetMembershipType()(*ChannelMembershipType) + GetMessages()([]ChatMessageable) + GetModerationSettings()(ChannelModerationSettingsable) + GetSharedWithTeams()([]SharedWithChannelTeamInfoable) + GetSummary()(ChannelSummaryable) + GetTabs()([]TeamsTabable) + GetTenantId()(*string) + GetWebUrl()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetFilesFolder(value DriveItemable)() + SetIsFavoriteByDefault(value *bool)() + SetMembers(value []ConversationMemberable)() + SetMembershipType(value *ChannelMembershipType)() + SetMessages(value []ChatMessageable)() + SetModerationSettings(value ChannelModerationSettingsable)() + SetSharedWithTeams(value []SharedWithChannelTeamInfoable)() + SetSummary(value ChannelSummaryable)() + SetTabs(value []TeamsTabable)() + SetTenantId(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chassis_type.go b/src/internal/connector/graph/betasdk/models/chassis_type.go new file mode 100644 index 000000000..365c35fda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chassis_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChassisType int + +const ( + // Unknown. + UNKNOWN_CHASSISTYPE ChassisType = iota + // Desktop. + DESKTOP_CHASSISTYPE + // Laptop. + LAPTOP_CHASSISTYPE + // Workstation. + WORKSWORKSTATION_CHASSISTYPE + // Enterprise server. + ENTERPRISESERVER_CHASSISTYPE + // Phone. + PHONE_CHASSISTYPE + // Mobile tablet. + TABLET_CHASSISTYPE + // Other mobile. + MOBILEOTHER_CHASSISTYPE + // Unknown mobile. + MOBILEUNKNOWN_CHASSISTYPE +) + +func (i ChassisType) String() string { + return []string{"unknown", "desktop", "laptop", "worksWorkstation", "enterpriseServer", "phone", "tablet", "mobileOther", "mobileUnknown"}[i] +} +func ParseChassisType(v string) (interface{}, error) { + result := UNKNOWN_CHASSISTYPE + switch v { + case "unknown": + result = UNKNOWN_CHASSISTYPE + case "desktop": + result = DESKTOP_CHASSISTYPE + case "laptop": + result = LAPTOP_CHASSISTYPE + case "worksWorkstation": + result = WORKSWORKSTATION_CHASSISTYPE + case "enterpriseServer": + result = ENTERPRISESERVER_CHASSISTYPE + case "phone": + result = PHONE_CHASSISTYPE + case "tablet": + result = TABLET_CHASSISTYPE + case "mobileOther": + result = MOBILEOTHER_CHASSISTYPE + case "mobileUnknown": + result = MOBILEUNKNOWN_CHASSISTYPE + default: + return 0, errors.New("Unknown ChassisType value: " + v) + } + return &result, nil +} +func SerializeChassisType(values []ChassisType) []string { + 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/chat.go b/src/internal/connector/graph/betasdk/models/chat.go new file mode 100644 index 000000000..8367dfb74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat.go @@ -0,0 +1,508 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Chat +type Chat struct { + Entity + // The chatType property + chatType *ChatType + // Date and time at which the chat was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A collection of all the apps in the chat. Nullable. + installedApps []TeamsAppInstallationable + // Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. + lastMessagePreview ChatMessageInfoable + // Date and time at which the chat was renamed or list of members were last changed. Read-only. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A collection of all the members in the chat. Nullable. + members []ConversationMemberable + // A collection of all the messages in the chat. Nullable. + messages []ChatMessageable + // Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only. + onlineMeetingInfo TeamworkOnlineMeetingInfoable + // A collection of all the Teams async operations that ran or are running on the chat. Nullable. + operations []TeamsAsyncOperationable + // A collection of permissions granted to apps for the chat. + permissionGrants []ResourceSpecificPermissionGrantable + // A collection of all the pinned messages in the chat. Nullable. + pinnedMessages []PinnedChatMessageInfoable + // A collection of all the tabs in the chat. Nullable. + tabs []TeamsTabable + // The identifier of the tenant in which the chat was created. Read-only. + tenantId *string + // (Optional) Subject or topic for the chat. Only available for group chats. + topic *string + // Represents caller-specific information about the chat, such as last message read date and time. This property is populated only when the request is made in a delegated context. + viewpoint ChatViewpointable + // The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only. + webUrl *string +} +// NewChat instantiates a new chat and sets the default values. +func NewChat()(*Chat) { + m := &Chat{ + Entity: *NewEntity(), + } + return m +} +// CreateChatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChat(), nil +} +// GetChatType gets the chatType property value. The chatType property +func (m *Chat) GetChatType()(*ChatType) { + return m.chatType +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time at which the chat was created. Read-only. +func (m *Chat) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Chat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["chatType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatType) + if err != nil { + return err + } + if val != nil { + m.SetChatType(val.(*ChatType)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["installedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsAppInstallationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsAppInstallationable, len(val)) + for i, v := range val { + res[i] = v.(TeamsAppInstallationable) + } + m.SetInstalledApps(res) + } + return nil + } + res["lastMessagePreview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastMessagePreview(val.(ChatMessageInfoable)) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(ConversationMemberable) + } + m.SetMembers(res) + } + return nil + } + res["messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageable) + } + m.SetMessages(res) + } + return nil + } + res["onlineMeetingInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamworkOnlineMeetingInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnlineMeetingInfo(val.(TeamworkOnlineMeetingInfoable)) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsAsyncOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsAsyncOperationable, len(val)) + for i, v := range val { + res[i] = v.(TeamsAsyncOperationable) + } + m.SetOperations(res) + } + return nil + } + res["permissionGrants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceSpecificPermissionGrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceSpecificPermissionGrantable, len(val)) + for i, v := range val { + res[i] = v.(ResourceSpecificPermissionGrantable) + } + m.SetPermissionGrants(res) + } + return nil + } + res["pinnedMessages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePinnedChatMessageInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PinnedChatMessageInfoable, len(val)) + for i, v := range val { + res[i] = v.(PinnedChatMessageInfoable) + } + m.SetPinnedMessages(res) + } + return nil + } + res["tabs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamsTabFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamsTabable, len(val)) + for i, v := range val { + res[i] = v.(TeamsTabable) + } + m.SetTabs(res) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["topic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTopic(val) + } + return nil + } + res["viewpoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatViewpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetViewpoint(val.(ChatViewpointable)) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetInstalledApps gets the installedApps property value. A collection of all the apps in the chat. Nullable. +func (m *Chat) GetInstalledApps()([]TeamsAppInstallationable) { + return m.installedApps +} +// GetLastMessagePreview gets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. +func (m *Chat) GetLastMessagePreview()(ChatMessageInfoable) { + return m.lastMessagePreview +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or list of members were last changed. Read-only. +func (m *Chat) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetMembers gets the members property value. A collection of all the members in the chat. Nullable. +func (m *Chat) GetMembers()([]ConversationMemberable) { + return m.members +} +// GetMessages gets the messages property value. A collection of all the messages in the chat. Nullable. +func (m *Chat) GetMessages()([]ChatMessageable) { + return m.messages +} +// GetOnlineMeetingInfo gets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only. +func (m *Chat) GetOnlineMeetingInfo()(TeamworkOnlineMeetingInfoable) { + return m.onlineMeetingInfo +} +// GetOperations gets the operations property value. A collection of all the Teams async operations that ran or are running on the chat. Nullable. +func (m *Chat) GetOperations()([]TeamsAsyncOperationable) { + return m.operations +} +// GetPermissionGrants gets the permissionGrants property value. A collection of permissions granted to apps for the chat. +func (m *Chat) GetPermissionGrants()([]ResourceSpecificPermissionGrantable) { + return m.permissionGrants +} +// GetPinnedMessages gets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable. +func (m *Chat) GetPinnedMessages()([]PinnedChatMessageInfoable) { + return m.pinnedMessages +} +// GetTabs gets the tabs property value. A collection of all the tabs in the chat. Nullable. +func (m *Chat) GetTabs()([]TeamsTabable) { + return m.tabs +} +// GetTenantId gets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only. +func (m *Chat) GetTenantId()(*string) { + return m.tenantId +} +// GetTopic gets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats. +func (m *Chat) GetTopic()(*string) { + return m.topic +} +// GetViewpoint gets the viewpoint property value. Represents caller-specific information about the chat, such as last message read date and time. This property is populated only when the request is made in a delegated context. +func (m *Chat) GetViewpoint()(ChatViewpointable) { + return m.viewpoint +} +// GetWebUrl gets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only. +func (m *Chat) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *Chat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetChatType() != nil { + cast := (*m.GetChatType()).String() + err = writer.WriteStringValue("chatType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetInstalledApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstalledApps())) + for i, v := range m.GetInstalledApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("installedApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastMessagePreview", m.GetLastMessagePreview()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessages())) + for i, v := range m.GetMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onlineMeetingInfo", m.GetOnlineMeetingInfo()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetPermissionGrants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissionGrants())) + for i, v := range m.GetPermissionGrants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissionGrants", cast) + if err != nil { + return err + } + } + if m.GetPinnedMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPinnedMessages())) + for i, v := range m.GetPinnedMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("pinnedMessages", cast) + if err != nil { + return err + } + } + if m.GetTabs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTabs())) + for i, v := range m.GetTabs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tabs", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("topic", m.GetTopic()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("viewpoint", m.GetViewpoint()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetChatType sets the chatType property value. The chatType property +func (m *Chat) SetChatType(value *ChatType)() { + m.chatType = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time at which the chat was created. Read-only. +func (m *Chat) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetInstalledApps sets the installedApps property value. A collection of all the apps in the chat. Nullable. +func (m *Chat) SetInstalledApps(value []TeamsAppInstallationable)() { + m.installedApps = value +} +// SetLastMessagePreview sets the lastMessagePreview property value. Preview of the last message sent in the chat. Null if no messages have been sent in the chat. Currently, only the list chats operation supports this property. +func (m *Chat) SetLastMessagePreview(value ChatMessageInfoable)() { + m.lastMessagePreview = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Date and time at which the chat was renamed or list of members were last changed. Read-only. +func (m *Chat) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetMembers sets the members property value. A collection of all the members in the chat. Nullable. +func (m *Chat) SetMembers(value []ConversationMemberable)() { + m.members = value +} +// SetMessages sets the messages property value. A collection of all the messages in the chat. Nullable. +func (m *Chat) SetMessages(value []ChatMessageable)() { + m.messages = value +} +// SetOnlineMeetingInfo sets the onlineMeetingInfo property value. Represents details about an online meeting. If the chat isn't associated with an online meeting, the property is empty. Read-only. +func (m *Chat) SetOnlineMeetingInfo(value TeamworkOnlineMeetingInfoable)() { + m.onlineMeetingInfo = value +} +// SetOperations sets the operations property value. A collection of all the Teams async operations that ran or are running on the chat. Nullable. +func (m *Chat) SetOperations(value []TeamsAsyncOperationable)() { + m.operations = value +} +// SetPermissionGrants sets the permissionGrants property value. A collection of permissions granted to apps for the chat. +func (m *Chat) SetPermissionGrants(value []ResourceSpecificPermissionGrantable)() { + m.permissionGrants = value +} +// SetPinnedMessages sets the pinnedMessages property value. A collection of all the pinned messages in the chat. Nullable. +func (m *Chat) SetPinnedMessages(value []PinnedChatMessageInfoable)() { + m.pinnedMessages = value +} +// SetTabs sets the tabs property value. A collection of all the tabs in the chat. Nullable. +func (m *Chat) SetTabs(value []TeamsTabable)() { + m.tabs = value +} +// SetTenantId sets the tenantId property value. The identifier of the tenant in which the chat was created. Read-only. +func (m *Chat) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTopic sets the topic property value. (Optional) Subject or topic for the chat. Only available for group chats. +func (m *Chat) SetTopic(value *string)() { + m.topic = value +} +// SetViewpoint sets the viewpoint property value. Represents caller-specific information about the chat, such as last message read date and time. This property is populated only when the request is made in a delegated context. +func (m *Chat) SetViewpoint(value ChatViewpointable)() { + m.viewpoint = value +} +// SetWebUrl sets the webUrl property value. The URL for the chat in Microsoft Teams. The URL should be treated as an opaque blob, and not parsed. Read-only. +func (m *Chat) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_activity_statistics.go b/src/internal/connector/graph/betasdk/models/chat_activity_statistics.go new file mode 100644 index 000000000..de93cbd97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_activity_statistics.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatActivityStatistics +type ChatActivityStatistics struct { + ActivityStatistics + // Time spent on chats outside of working hours, which is based on the user's Microsoft Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. + afterHours *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewChatActivityStatistics instantiates a new ChatActivityStatistics and sets the default values. +func NewChatActivityStatistics()(*ChatActivityStatistics) { + m := &ChatActivityStatistics{ + ActivityStatistics: *NewActivityStatistics(), + } + odataTypeValue := "#microsoft.graph.chatActivityStatistics"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatActivityStatistics(), nil +} +// GetAfterHours gets the afterHours property value. Time spent on chats outside of working hours, which is based on the user's Microsoft Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *ChatActivityStatistics) GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.afterHours +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ActivityStatistics.GetFieldDeserializers() + res["afterHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterHours(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ChatActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ActivityStatistics.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("afterHours", m.GetAfterHours()) + if err != nil { + return err + } + } + return nil +} +// SetAfterHours sets the afterHours property value. Time spent on chats outside of working hours, which is based on the user's Microsoft Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *ChatActivityStatistics) SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.afterHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_response.go new file mode 100644 index 000000000..08a5e0fa8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatActivityStatisticsCollectionResponse +type ChatActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatActivityStatisticsable +} +// NewChatActivityStatisticsCollectionResponse instantiates a new ChatActivityStatisticsCollectionResponse and sets the default values. +func NewChatActivityStatisticsCollectionResponse()(*ChatActivityStatisticsCollectionResponse) { + m := &ChatActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(ChatActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatActivityStatisticsCollectionResponse) GetValue()([]ChatActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatActivityStatisticsCollectionResponse) SetValue(value []ChatActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_responseable.go new file mode 100644 index 000000000..8a2dca7b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatActivityStatisticsCollectionResponseable +type ChatActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatActivityStatisticsable) + SetValue(value []ChatActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/chat_activity_statisticsable.go new file mode 100644 index 000000000..777c9bbdd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_activity_statisticsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatActivityStatisticsable +type ChatActivityStatisticsable interface { + ActivityStatisticsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_collection_response.go new file mode 100644 index 000000000..305c302fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatCollectionResponse +type ChatCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Chatable +} +// NewChatCollectionResponse instantiates a new ChatCollectionResponse and sets the default values. +func NewChatCollectionResponse()(*ChatCollectionResponse) { + m := &ChatCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Chatable, len(val)) + for i, v := range val { + res[i] = v.(Chatable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatCollectionResponse) GetValue()([]Chatable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatCollectionResponse) SetValue(value []Chatable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_collection_responseable.go new file mode 100644 index 000000000..554eb803b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatCollectionResponseable +type ChatCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Chatable) + SetValue(value []Chatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_info.go b/src/internal/connector/graph/betasdk/models/chat_info.go new file mode 100644 index 000000000..4771c5a21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_info.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatInfo +type ChatInfo 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 unique identifier for a message in a Microsoft Teams channel. + messageId *string + // The OdataType property + odataType *string + // The ID of the reply message. + replyChainMessageId *string + // The unique identifier for a thread in Microsoft Teams. + threadId *string +} +// NewChatInfo instantiates a new chatInfo and sets the default values. +func NewChatInfo()(*ChatInfo) { + m := &ChatInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatInfo(), 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 *ChatInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["messageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageId(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["replyChainMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReplyChainMessageId(val) + } + return nil + } + res["threadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThreadId(val) + } + return nil + } + return res +} +// GetMessageId gets the messageId property value. The unique identifier for a message in a Microsoft Teams channel. +func (m *ChatInfo) GetMessageId()(*string) { + return m.messageId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatInfo) GetOdataType()(*string) { + return m.odataType +} +// GetReplyChainMessageId gets the replyChainMessageId property value. The ID of the reply message. +func (m *ChatInfo) GetReplyChainMessageId()(*string) { + return m.replyChainMessageId +} +// GetThreadId gets the threadId property value. The unique identifier for a thread in Microsoft Teams. +func (m *ChatInfo) GetThreadId()(*string) { + return m.threadId +} +// Serialize serializes information the current object +func (m *ChatInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("messageId", m.GetMessageId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("replyChainMessageId", m.GetReplyChainMessageId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("threadId", m.GetThreadId()) + 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 *ChatInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMessageId sets the messageId property value. The unique identifier for a message in a Microsoft Teams channel. +func (m *ChatInfo) SetMessageId(value *string)() { + m.messageId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetReplyChainMessageId sets the replyChainMessageId property value. The ID of the reply message. +func (m *ChatInfo) SetReplyChainMessageId(value *string)() { + m.replyChainMessageId = value +} +// SetThreadId sets the threadId property value. The unique identifier for a thread in Microsoft Teams. +func (m *ChatInfo) SetThreadId(value *string)() { + m.threadId = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_infoable.go b/src/internal/connector/graph/betasdk/models/chat_infoable.go new file mode 100644 index 000000000..13b1972b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatInfoable +type ChatInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessageId()(*string) + GetOdataType()(*string) + GetReplyChainMessageId()(*string) + GetThreadId()(*string) + SetMessageId(value *string)() + SetOdataType(value *string)() + SetReplyChainMessageId(value *string)() + SetThreadId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message.go b/src/internal/connector/graph/betasdk/models/chat_message.go new file mode 100644 index 000000000..b10d0009d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message.go @@ -0,0 +1,735 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessage struct { + Entity + // References to attached objects like files, tabs, meetings etc. + attachments []ChatMessageAttachmentable + // The body property + body ItemBodyable + // If the message was sent in a channel, represents identity of the channel. + channelIdentity ChannelIdentityable + // If the message was sent in a chat, represents the identity of the chat. + chatId *string + // Timestamp of when the chat message was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read only. Timestamp at which the chat message was deleted, or null if not deleted. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. Version number of the chat message. + etag *string + // Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage. + eventDetail EventMessageDetailable + // Details of the sender of the chat message. Can only be set during migration. + from ChatMessageFromIdentitySetable + // Content in a message hosted by Microsoft Teams - for example, images or code snippets. + hostedContents []ChatMessageHostedContentable + // The importance property + importance *ChatMessageImportance + // Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null. + lastEditedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Locale of the chat message set by the client. Always set to en-us. + locale *string + // List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, and tag. + mentions []ChatMessageMentionable + // List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message. + messageHistory []ChatMessageHistoryItemable + // The messageType property + messageType *ChatMessageType + // User attribution of the message when bot sends a message on behalf of a user. + onBehalfOf ChatMessageFromIdentitySetable + // Defines the properties of a policy violation set by a data loss prevention (DLP) application. + policyViolation ChatMessagePolicyViolationable + // Reactions for this chat message (for example, Like). + reactions []ChatMessageReactionable + // Replies for a specified message. Supports $expand for channel messages. + replies []ChatMessageable + // Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.) + replyToId *string + // The subject of the chat message, in plaintext. + subject *string + // Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat. + summary *string + // Read-only. Link to the message in Microsoft Teams. + webUrl *string +} +// NewChatMessage instantiates a new chatMessage and sets the default values. +func NewChatMessage()(*ChatMessage) { + m := &ChatMessage{ + Entity: *NewEntity(), + } + return m +} +// CreateChatMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessage(), nil +} +// GetAttachments gets the attachments property value. References to attached objects like files, tabs, meetings etc. +func (m *ChatMessage) GetAttachments()([]ChatMessageAttachmentable) { + return m.attachments +} +// GetBody gets the body property value. The body property +func (m *ChatMessage) GetBody()(ItemBodyable) { + return m.body +} +// GetChannelIdentity gets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel. +func (m *ChatMessage) GetChannelIdentity()(ChannelIdentityable) { + return m.channelIdentity +} +// GetChatId gets the chatId property value. If the message was sent in a chat, represents the identity of the chat. +func (m *ChatMessage) GetChatId()(*string) { + return m.chatId +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp of when the chat message was created. +func (m *ChatMessage) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeletedDateTime gets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted. +func (m *ChatMessage) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetEtag gets the etag property value. Read-only. Version number of the chat message. +func (m *ChatMessage) GetEtag()(*string) { + return m.etag +} +// GetEventDetail gets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage. +func (m *ChatMessage) GetEventDetail()(EventMessageDetailable) { + return m.eventDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageAttachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["channelIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChannelIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChannelIdentity(val.(ChannelIdentityable)) + } + return nil + } + res["chatId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChatId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + res["etag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEtag(val) + } + return nil + } + res["eventDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEventMessageDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEventDetail(val.(EventMessageDetailable)) + } + return nil + } + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageFromIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFrom(val.(ChatMessageFromIdentitySetable)) + } + return nil + } + res["hostedContents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageHostedContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageHostedContentable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageHostedContentable) + } + m.SetHostedContents(res) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessageImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*ChatMessageImportance)) + } + return nil + } + res["lastEditedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastEditedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(val) + } + return nil + } + res["mentions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageMentionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageMentionable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageMentionable) + } + m.SetMentions(res) + } + return nil + } + res["messageHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageHistoryItemable) + } + m.SetMessageHistory(res) + } + return nil + } + res["messageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessageType) + if err != nil { + return err + } + if val != nil { + m.SetMessageType(val.(*ChatMessageType)) + } + return nil + } + res["onBehalfOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageFromIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnBehalfOf(val.(ChatMessageFromIdentitySetable)) + } + return nil + } + res["policyViolation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessagePolicyViolationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicyViolation(val.(ChatMessagePolicyViolationable)) + } + return nil + } + res["reactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageReactionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageReactionable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageReactionable) + } + m.SetReactions(res) + } + return nil + } + res["replies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageable) + } + m.SetReplies(res) + } + return nil + } + res["replyToId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReplyToId(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetFrom gets the from property value. Details of the sender of the chat message. Can only be set during migration. +func (m *ChatMessage) GetFrom()(ChatMessageFromIdentitySetable) { + return m.from +} +// GetHostedContents gets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets. +func (m *ChatMessage) GetHostedContents()([]ChatMessageHostedContentable) { + return m.hostedContents +} +// GetImportance gets the importance property value. The importance property +func (m *ChatMessage) GetImportance()(*ChatMessageImportance) { + return m.importance +} +// GetLastEditedDateTime gets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null. +func (m *ChatMessage) GetLastEditedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastEditedDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. +func (m *ChatMessage) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLocale gets the locale property value. Locale of the chat message set by the client. Always set to en-us. +func (m *ChatMessage) GetLocale()(*string) { + return m.locale +} +// GetMentions gets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, and tag. +func (m *ChatMessage) GetMentions()([]ChatMessageMentionable) { + return m.mentions +} +// GetMessageHistory gets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message. +func (m *ChatMessage) GetMessageHistory()([]ChatMessageHistoryItemable) { + return m.messageHistory +} +// GetMessageType gets the messageType property value. The messageType property +func (m *ChatMessage) GetMessageType()(*ChatMessageType) { + return m.messageType +} +// GetOnBehalfOf gets the onBehalfOf property value. User attribution of the message when bot sends a message on behalf of a user. +func (m *ChatMessage) GetOnBehalfOf()(ChatMessageFromIdentitySetable) { + return m.onBehalfOf +} +// GetPolicyViolation gets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application. +func (m *ChatMessage) GetPolicyViolation()(ChatMessagePolicyViolationable) { + return m.policyViolation +} +// GetReactions gets the reactions property value. Reactions for this chat message (for example, Like). +func (m *ChatMessage) GetReactions()([]ChatMessageReactionable) { + return m.reactions +} +// GetReplies gets the replies property value. Replies for a specified message. Supports $expand for channel messages. +func (m *ChatMessage) GetReplies()([]ChatMessageable) { + return m.replies +} +// GetReplyToId gets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.) +func (m *ChatMessage) GetReplyToId()(*string) { + return m.replyToId +} +// GetSubject gets the subject property value. The subject of the chat message, in plaintext. +func (m *ChatMessage) GetSubject()(*string) { + return m.subject +} +// GetSummary gets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat. +func (m *ChatMessage) GetSummary()(*string) { + return m.summary +} +// GetWebUrl gets the webUrl property value. Read-only. Link to the message in Microsoft Teams. +func (m *ChatMessage) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *ChatMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("channelIdentity", m.GetChannelIdentity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("chatId", m.GetChatId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("etag", m.GetEtag()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("eventDetail", m.GetEventDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("from", m.GetFrom()) + if err != nil { + return err + } + } + if m.GetHostedContents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHostedContents())) + for i, v := range m.GetHostedContents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("hostedContents", cast) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err = writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastEditedDateTime", m.GetLastEditedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + if m.GetMentions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMentions())) + for i, v := range m.GetMentions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mentions", cast) + if err != nil { + return err + } + } + if m.GetMessageHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessageHistory())) + for i, v := range m.GetMessageHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messageHistory", cast) + if err != nil { + return err + } + } + if m.GetMessageType() != nil { + cast := (*m.GetMessageType()).String() + err = writer.WriteStringValue("messageType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onBehalfOf", m.GetOnBehalfOf()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("policyViolation", m.GetPolicyViolation()) + if err != nil { + return err + } + } + if m.GetReactions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReactions())) + for i, v := range m.GetReactions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reactions", cast) + if err != nil { + return err + } + } + if m.GetReplies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReplies())) + for i, v := range m.GetReplies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("replies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("replyToId", m.GetReplyToId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAttachments sets the attachments property value. References to attached objects like files, tabs, meetings etc. +func (m *ChatMessage) SetAttachments(value []ChatMessageAttachmentable)() { + m.attachments = value +} +// SetBody sets the body property value. The body property +func (m *ChatMessage) SetBody(value ItemBodyable)() { + m.body = value +} +// SetChannelIdentity sets the channelIdentity property value. If the message was sent in a channel, represents identity of the channel. +func (m *ChatMessage) SetChannelIdentity(value ChannelIdentityable)() { + m.channelIdentity = value +} +// SetChatId sets the chatId property value. If the message was sent in a chat, represents the identity of the chat. +func (m *ChatMessage) SetChatId(value *string)() { + m.chatId = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp of when the chat message was created. +func (m *ChatMessage) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeletedDateTime sets the deletedDateTime property value. Read only. Timestamp at which the chat message was deleted, or null if not deleted. +func (m *ChatMessage) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} +// SetEtag sets the etag property value. Read-only. Version number of the chat message. +func (m *ChatMessage) SetEtag(value *string)() { + m.etag = value +} +// SetEventDetail sets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, adding new members. For event messages, the messageType property will be set to systemEventMessage. +func (m *ChatMessage) SetEventDetail(value EventMessageDetailable)() { + m.eventDetail = value +} +// SetFrom sets the from property value. Details of the sender of the chat message. Can only be set during migration. +func (m *ChatMessage) SetFrom(value ChatMessageFromIdentitySetable)() { + m.from = value +} +// SetHostedContents sets the hostedContents property value. Content in a message hosted by Microsoft Teams - for example, images or code snippets. +func (m *ChatMessage) SetHostedContents(value []ChatMessageHostedContentable)() { + m.hostedContents = value +} +// SetImportance sets the importance property value. The importance property +func (m *ChatMessage) SetImportance(value *ChatMessageImportance)() { + m.importance = value +} +// SetLastEditedDateTime sets the lastEditedDateTime property value. Read only. Timestamp when edits to the chat message were made. Triggers an 'Edited' flag in the Teams UI. If no edits are made the value is null. +func (m *ChatMessage) SetLastEditedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastEditedDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Read only. Timestamp when the chat message is created (initial setting) or modified, including when a reaction is added or removed. +func (m *ChatMessage) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLocale sets the locale property value. Locale of the chat message set by the client. Always set to en-us. +func (m *ChatMessage) SetLocale(value *string)() { + m.locale = value +} +// SetMentions sets the mentions property value. List of entities mentioned in the chat message. Supported entities are: user, bot, team, channel, and tag. +func (m *ChatMessage) SetMentions(value []ChatMessageMentionable)() { + m.mentions = value +} +// SetMessageHistory sets the messageHistory property value. List of activity history of a message item, including modification time and actions, such as reactionAdded, reactionRemoved, or reaction changes, on the message. +func (m *ChatMessage) SetMessageHistory(value []ChatMessageHistoryItemable)() { + m.messageHistory = value +} +// SetMessageType sets the messageType property value. The messageType property +func (m *ChatMessage) SetMessageType(value *ChatMessageType)() { + m.messageType = value +} +// SetOnBehalfOf sets the onBehalfOf property value. User attribution of the message when bot sends a message on behalf of a user. +func (m *ChatMessage) SetOnBehalfOf(value ChatMessageFromIdentitySetable)() { + m.onBehalfOf = value +} +// SetPolicyViolation sets the policyViolation property value. Defines the properties of a policy violation set by a data loss prevention (DLP) application. +func (m *ChatMessage) SetPolicyViolation(value ChatMessagePolicyViolationable)() { + m.policyViolation = value +} +// SetReactions sets the reactions property value. Reactions for this chat message (for example, Like). +func (m *ChatMessage) SetReactions(value []ChatMessageReactionable)() { + m.reactions = value +} +// SetReplies sets the replies property value. Replies for a specified message. Supports $expand for channel messages. +func (m *ChatMessage) SetReplies(value []ChatMessageable)() { + m.replies = value +} +// SetReplyToId sets the replyToId property value. Read-only. ID of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels, not chats.) +func (m *ChatMessage) SetReplyToId(value *string)() { + m.replyToId = value +} +// SetSubject sets the subject property value. The subject of the chat message, in plaintext. +func (m *ChatMessage) SetSubject(value *string)() { + m.subject = value +} +// SetSummary sets the summary property value. Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat. +func (m *ChatMessage) SetSummary(value *string)() { + m.summary = value +} +// SetWebUrl sets the webUrl property value. Read-only. Link to the message in Microsoft Teams. +func (m *ChatMessage) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_actions.go b/src/internal/connector/graph/betasdk/models/chat_message_actions.go new file mode 100644 index 000000000..268daaedc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_actions.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessageActions int + +const ( + REACTIONADDED_CHATMESSAGEACTIONS ChatMessageActions = iota + REACTIONREMOVED_CHATMESSAGEACTIONS + ACTIONUNDEFINED_CHATMESSAGEACTIONS + UNKNOWNFUTUREVALUE_CHATMESSAGEACTIONS +) + +func (i ChatMessageActions) String() string { + return []string{"reactionAdded", "reactionRemoved", "actionUndefined", "unknownFutureValue"}[i] +} +func ParseChatMessageActions(v string) (interface{}, error) { + result := REACTIONADDED_CHATMESSAGEACTIONS + switch v { + case "reactionAdded": + result = REACTIONADDED_CHATMESSAGEACTIONS + case "reactionRemoved": + result = REACTIONREMOVED_CHATMESSAGEACTIONS + case "actionUndefined": + result = ACTIONUNDEFINED_CHATMESSAGEACTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CHATMESSAGEACTIONS + default: + return 0, errors.New("Unknown ChatMessageActions value: " + v) + } + return &result, nil +} +func SerializeChatMessageActions(values []ChatMessageActions) []string { + 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/chat_message_attachment.go b/src/internal/connector/graph/betasdk/models/chat_message_attachment.go new file mode 100644 index 000000000..54b8a5df3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_attachment.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageAttachment +type ChatMessageAttachment 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 content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive. + content *string + // The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.Any contentTypes supported by the Bot Framework's Attachment objectapplication/vnd.microsoft.card.codesnippet: A code snippet. application/vnd.microsoft.card.announcement: An announcement header. + contentType *string + // URL for the content of the attachment. Supported protocols: http, https, file and data. + contentUrl *string + // Read-only. Unique id of the attachment. + id *string + // Name of the attachment. + name *string + // The OdataType property + odataType *string + // The ID of the Teams app that is associated with the attachment. The property is specifically used to attribute a Teams message card to the specified app. + teamsAppId *string + // URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document. + thumbnailUrl *string +} +// NewChatMessageAttachment instantiates a new chatMessageAttachment and sets the default values. +func NewChatMessageAttachment()(*ChatMessageAttachment) { + m := &ChatMessageAttachment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessageAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageAttachment(), 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 *ChatMessageAttachment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContent gets the content property value. The content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive. +func (m *ChatMessageAttachment) GetContent()(*string) { + return m.content +} +// GetContentType gets the contentType property value. The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.Any contentTypes supported by the Bot Framework's Attachment objectapplication/vnd.microsoft.card.codesnippet: A code snippet. application/vnd.microsoft.card.announcement: An announcement header. +func (m *ChatMessageAttachment) GetContentType()(*string) { + return m.contentType +} +// GetContentUrl gets the contentUrl property value. URL for the content of the attachment. Supported protocols: http, https, file and data. +func (m *ChatMessageAttachment) GetContentUrl()(*string) { + return m.contentUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["contentUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentUrl(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["teamsAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsAppId(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. Read-only. Unique id of the attachment. +func (m *ChatMessageAttachment) GetId()(*string) { + return m.id +} +// GetName gets the name property value. Name of the attachment. +func (m *ChatMessageAttachment) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessageAttachment) GetOdataType()(*string) { + return m.odataType +} +// GetTeamsAppId gets the teamsAppId property value. The ID of the Teams app that is associated with the attachment. The property is specifically used to attribute a Teams message card to the specified app. +func (m *ChatMessageAttachment) GetTeamsAppId()(*string) { + return m.teamsAppId +} +// GetThumbnailUrl gets the thumbnailUrl property value. URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document. +func (m *ChatMessageAttachment) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// Serialize serializes information the current object +func (m *ChatMessageAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contentUrl", m.GetContentUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teamsAppId", m.GetTeamsAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + 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 *ChatMessageAttachment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContent sets the content property value. The content of the attachment. If the attachment is a rich card, set the property to the rich card object. This property and contentUrl are mutually exclusive. +func (m *ChatMessageAttachment) SetContent(value *string)() { + m.content = value +} +// SetContentType sets the contentType property value. The media type of the content attachment. It can have the following values: reference: Attachment is a link to another file. Populate the contentURL with the link to the object.Any contentTypes supported by the Bot Framework's Attachment objectapplication/vnd.microsoft.card.codesnippet: A code snippet. application/vnd.microsoft.card.announcement: An announcement header. +func (m *ChatMessageAttachment) SetContentType(value *string)() { + m.contentType = value +} +// SetContentUrl sets the contentUrl property value. URL for the content of the attachment. Supported protocols: http, https, file and data. +func (m *ChatMessageAttachment) SetContentUrl(value *string)() { + m.contentUrl = value +} +// SetId sets the id property value. Read-only. Unique id of the attachment. +func (m *ChatMessageAttachment) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. Name of the attachment. +func (m *ChatMessageAttachment) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessageAttachment) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamsAppId sets the teamsAppId property value. The ID of the Teams app that is associated with the attachment. The property is specifically used to attribute a Teams message card to the specified app. +func (m *ChatMessageAttachment) SetTeamsAppId(value *string)() { + m.teamsAppId = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. URL to a thumbnail image that the channel can use if it supports using an alternative, smaller form of content or contentUrl. For example, if you set contentType to application/word and set contentUrl to the location of the Word document, you might include a thumbnail image that represents the document. The channel could display the thumbnail image instead of the document. When the user clicks the image, the channel would open the document. +func (m *ChatMessageAttachment) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_response.go new file mode 100644 index 000000000..383ebc0dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageAttachmentCollectionResponse +type ChatMessageAttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageAttachmentable +} +// NewChatMessageAttachmentCollectionResponse instantiates a new ChatMessageAttachmentCollectionResponse and sets the default values. +func NewChatMessageAttachmentCollectionResponse()(*ChatMessageAttachmentCollectionResponse) { + m := &ChatMessageAttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageAttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageAttachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageAttachmentCollectionResponse) GetValue()([]ChatMessageAttachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageAttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageAttachmentCollectionResponse) SetValue(value []ChatMessageAttachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_responseable.go new file mode 100644 index 000000000..d9800a89f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageAttachmentCollectionResponseable +type ChatMessageAttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageAttachmentable) + SetValue(value []ChatMessageAttachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_attachmentable.go b/src/internal/connector/graph/betasdk/models/chat_message_attachmentable.go new file mode 100644 index 000000000..e3e4c56aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_attachmentable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageAttachmentable +type ChatMessageAttachmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetContentType()(*string) + GetContentUrl()(*string) + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + GetTeamsAppId()(*string) + GetThumbnailUrl()(*string) + SetContent(value *string)() + SetContentType(value *string)() + SetContentUrl(value *string)() + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetTeamsAppId(value *string)() + SetThumbnailUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_collection_response.go new file mode 100644 index 000000000..bdb139d94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageCollectionResponse +type ChatMessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageable +} +// NewChatMessageCollectionResponse instantiates a new ChatMessageCollectionResponse and sets the default values. +func NewChatMessageCollectionResponse()(*ChatMessageCollectionResponse) { + m := &ChatMessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageCollectionResponse) GetValue()([]ChatMessageable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageCollectionResponse) SetValue(value []ChatMessageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_collection_responseable.go new file mode 100644 index 000000000..dc32cf381 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageCollectionResponseable +type ChatMessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageable) + SetValue(value []ChatMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_from_identity_set.go b/src/internal/connector/graph/betasdk/models/chat_message_from_identity_set.go new file mode 100644 index 000000000..2abec5643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_from_identity_set.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageFromIdentitySet +type ChatMessageFromIdentitySet struct { + IdentitySet +} +// NewChatMessageFromIdentitySet instantiates a new ChatMessageFromIdentitySet and sets the default values. +func NewChatMessageFromIdentitySet()(*ChatMessageFromIdentitySet) { + m := &ChatMessageFromIdentitySet{ + IdentitySet: *NewIdentitySet(), + } + odataTypeValue := "#microsoft.graph.chatMessageFromIdentitySet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatMessageFromIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageFromIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageFromIdentitySet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageFromIdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySet.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ChatMessageFromIdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySet.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_from_identity_setable.go b/src/internal/connector/graph/betasdk/models/chat_message_from_identity_setable.go new file mode 100644 index 000000000..2b85fc537 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_from_identity_setable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageFromIdentitySetable +type ChatMessageFromIdentitySetable interface { + IdentitySetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_history_item.go b/src/internal/connector/graph/betasdk/models/chat_message_history_item.go new file mode 100644 index 000000000..cbceb7060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_history_item.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHistoryItem +type ChatMessageHistoryItem struct { + // The actions property + actions *ChatMessageActions + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The date and time when the message was modified. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The reaction in the modified message. + reaction ChatMessageReactionable +} +// NewChatMessageHistoryItem instantiates a new chatMessageHistoryItem and sets the default values. +func NewChatMessageHistoryItem()(*ChatMessageHistoryItem) { + m := &ChatMessageHistoryItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessageHistoryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageHistoryItem(), nil +} +// GetActions gets the actions property value. The actions property +func (m *ChatMessageHistoryItem) GetActions()(*ChatMessageActions) { + return m.actions +} +// 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 *ChatMessageHistoryItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessageActions) + if err != nil { + return err + } + if val != nil { + m.SetActions(val.(*ChatMessageActions)) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(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["reaction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageReactionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReaction(val.(ChatMessageReactionable)) + } + return nil + } + return res +} +// GetModifiedDateTime gets the modifiedDateTime property value. The date and time when the message was modified. +func (m *ChatMessageHistoryItem) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessageHistoryItem) GetOdataType()(*string) { + return m.odataType +} +// GetReaction gets the reaction property value. The reaction in the modified message. +func (m *ChatMessageHistoryItem) GetReaction()(ChatMessageReactionable) { + return m.reaction +} +// Serialize serializes information the current object +func (m *ChatMessageHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + cast := (*m.GetActions()).String() + err := writer.WriteStringValue("actions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("reaction", m.GetReaction()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The actions property +func (m *ChatMessageHistoryItem) SetActions(value *ChatMessageActions)() { + m.actions = value +} +// 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 *ChatMessageHistoryItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The date and time when the message was modified. +func (m *ChatMessageHistoryItem) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessageHistoryItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetReaction sets the reaction property value. The reaction in the modified message. +func (m *ChatMessageHistoryItem) SetReaction(value ChatMessageReactionable)() { + m.reaction = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_response.go new file mode 100644 index 000000000..c08fd14b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHistoryItemCollectionResponse +type ChatMessageHistoryItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageHistoryItemable +} +// NewChatMessageHistoryItemCollectionResponse instantiates a new ChatMessageHistoryItemCollectionResponse and sets the default values. +func NewChatMessageHistoryItemCollectionResponse()(*ChatMessageHistoryItemCollectionResponse) { + m := &ChatMessageHistoryItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageHistoryItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageHistoryItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageHistoryItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageHistoryItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageHistoryItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageHistoryItemCollectionResponse) GetValue()([]ChatMessageHistoryItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageHistoryItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageHistoryItemCollectionResponse) SetValue(value []ChatMessageHistoryItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_responseable.go new file mode 100644 index 000000000..a7e06cb51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_history_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHistoryItemCollectionResponseable +type ChatMessageHistoryItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageHistoryItemable) + SetValue(value []ChatMessageHistoryItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_history_itemable.go b/src/internal/connector/graph/betasdk/models/chat_message_history_itemable.go new file mode 100644 index 000000000..2fa5c9f13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_history_itemable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHistoryItemable +type ChatMessageHistoryItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()(*ChatMessageActions) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetReaction()(ChatMessageReactionable) + SetActions(value *ChatMessageActions)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetReaction(value ChatMessageReactionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_hosted_content.go b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content.go new file mode 100644 index 000000000..24e64e569 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHostedContent +type ChatMessageHostedContent struct { + TeamworkHostedContent +} +// NewChatMessageHostedContent instantiates a new ChatMessageHostedContent and sets the default values. +func NewChatMessageHostedContent()(*ChatMessageHostedContent) { + m := &ChatMessageHostedContent{ + TeamworkHostedContent: *NewTeamworkHostedContent(), + } + odataTypeValue := "#microsoft.graph.chatMessageHostedContent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatMessageHostedContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageHostedContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageHostedContent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageHostedContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TeamworkHostedContent.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ChatMessageHostedContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TeamworkHostedContent.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_response.go new file mode 100644 index 000000000..a1d84918d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHostedContentCollectionResponse +type ChatMessageHostedContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageHostedContentable +} +// NewChatMessageHostedContentCollectionResponse instantiates a new ChatMessageHostedContentCollectionResponse and sets the default values. +func NewChatMessageHostedContentCollectionResponse()(*ChatMessageHostedContentCollectionResponse) { + m := &ChatMessageHostedContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageHostedContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageHostedContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageHostedContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageHostedContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageHostedContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageHostedContentable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageHostedContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageHostedContentCollectionResponse) GetValue()([]ChatMessageHostedContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageHostedContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageHostedContentCollectionResponse) SetValue(value []ChatMessageHostedContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_responseable.go new file mode 100644 index 000000000..1b095d614 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_hosted_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHostedContentCollectionResponseable +type ChatMessageHostedContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageHostedContentable) + SetValue(value []ChatMessageHostedContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_hosted_contentable.go b/src/internal/connector/graph/betasdk/models/chat_message_hosted_contentable.go new file mode 100644 index 000000000..768e1c190 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_hosted_contentable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageHostedContentable +type ChatMessageHostedContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TeamworkHostedContentable +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_importance.go b/src/internal/connector/graph/betasdk/models/chat_message_importance.go new file mode 100644 index 000000000..db2df4a63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_importance.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessageImportance int + +const ( + NORMAL_CHATMESSAGEIMPORTANCE ChatMessageImportance = iota + HIGH_CHATMESSAGEIMPORTANCE + URGENT_CHATMESSAGEIMPORTANCE +) + +func (i ChatMessageImportance) String() string { + return []string{"normal", "high", "urgent"}[i] +} +func ParseChatMessageImportance(v string) (interface{}, error) { + result := NORMAL_CHATMESSAGEIMPORTANCE + switch v { + case "normal": + result = NORMAL_CHATMESSAGEIMPORTANCE + case "high": + result = HIGH_CHATMESSAGEIMPORTANCE + case "urgent": + result = URGENT_CHATMESSAGEIMPORTANCE + default: + return 0, errors.New("Unknown ChatMessageImportance value: " + v) + } + return &result, nil +} +func SerializeChatMessageImportance(values []ChatMessageImportance) []string { + 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/chat_message_info.go b/src/internal/connector/graph/betasdk/models/chat_message_info.go new file mode 100644 index 000000000..d87863842 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_info.go @@ -0,0 +1,192 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageInfo +type ChatMessageInfo struct { + Entity + // Body of the chatMessage. This will still contain markers for @mentions and attachments even though the object does not return @mentions and attachments. + body ItemBodyable + // Date time object representing the time at which message was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage. + eventDetail EventMessageDetailable + // Information about the sender of the message. + from ChatMessageFromIdentitySetable + // If set to true, the original message has been deleted. + isDeleted *bool + // The messageType property + messageType *ChatMessageType +} +// NewChatMessageInfo instantiates a new chatMessageInfo and sets the default values. +func NewChatMessageInfo()(*ChatMessageInfo) { + m := &ChatMessageInfo{ + Entity: *NewEntity(), + } + return m +} +// CreateChatMessageInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageInfo(), nil +} +// GetBody gets the body property value. Body of the chatMessage. This will still contain markers for @mentions and attachments even though the object does not return @mentions and attachments. +func (m *ChatMessageInfo) GetBody()(ItemBodyable) { + return m.body +} +// GetCreatedDateTime gets the createdDateTime property value. Date time object representing the time at which message was created. +func (m *ChatMessageInfo) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetEventDetail gets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage. +func (m *ChatMessageInfo) GetEventDetail()(EventMessageDetailable) { + return m.eventDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["eventDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEventMessageDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEventDetail(val.(EventMessageDetailable)) + } + return nil + } + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageFromIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFrom(val.(ChatMessageFromIdentitySetable)) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["messageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessageType) + if err != nil { + return err + } + if val != nil { + m.SetMessageType(val.(*ChatMessageType)) + } + return nil + } + return res +} +// GetFrom gets the from property value. Information about the sender of the message. +func (m *ChatMessageInfo) GetFrom()(ChatMessageFromIdentitySetable) { + return m.from +} +// GetIsDeleted gets the isDeleted property value. If set to true, the original message has been deleted. +func (m *ChatMessageInfo) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetMessageType gets the messageType property value. The messageType property +func (m *ChatMessageInfo) GetMessageType()(*ChatMessageType) { + return m.messageType +} +// Serialize serializes information the current object +func (m *ChatMessageInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("eventDetail", m.GetEventDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + if m.GetMessageType() != nil { + cast := (*m.GetMessageType()).String() + err = writer.WriteStringValue("messageType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetBody sets the body property value. Body of the chatMessage. This will still contain markers for @mentions and attachments even though the object does not return @mentions and attachments. +func (m *ChatMessageInfo) SetBody(value ItemBodyable)() { + m.body = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date time object representing the time at which message was created. +func (m *ChatMessageInfo) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetEventDetail sets the eventDetail property value. Read-only. If present, represents details of an event that happened in a chat, a channel, or a team, for example, members were added, and so on. For event messages, the messageType property will be set to systemEventMessage. +func (m *ChatMessageInfo) SetEventDetail(value EventMessageDetailable)() { + m.eventDetail = value +} +// SetFrom sets the from property value. Information about the sender of the message. +func (m *ChatMessageInfo) SetFrom(value ChatMessageFromIdentitySetable)() { + m.from = value +} +// SetIsDeleted sets the isDeleted property value. If set to true, the original message has been deleted. +func (m *ChatMessageInfo) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetMessageType sets the messageType property value. The messageType property +func (m *ChatMessageInfo) SetMessageType(value *ChatMessageType)() { + m.messageType = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_infoable.go b/src/internal/connector/graph/betasdk/models/chat_message_infoable.go new file mode 100644 index 000000000..64cc14ca2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_infoable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageInfoable +type ChatMessageInfoable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBody()(ItemBodyable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEventDetail()(EventMessageDetailable) + GetFrom()(ChatMessageFromIdentitySetable) + GetIsDeleted()(*bool) + GetMessageType()(*ChatMessageType) + SetBody(value ItemBodyable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEventDetail(value EventMessageDetailable)() + SetFrom(value ChatMessageFromIdentitySetable)() + SetIsDeleted(value *bool)() + SetMessageType(value *ChatMessageType)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mention.go b/src/internal/connector/graph/betasdk/models/chat_message_mention.go new file mode 100644 index 000000000..ac6e4dba9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mention.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMention +type ChatMessageMention struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Index of an entity being mentioned in the specified chatMessage. Matches the {index} value in the corresponding tag in the message body. + id *int32 + // The entity (user, application, team, or channel) that was @mentioned. + mentioned ChatMessageMentionedIdentitySetable + // String used to represent the mention. For example, a user's display name, a team name. + mentionText *string + // The OdataType property + odataType *string +} +// NewChatMessageMention instantiates a new chatMessageMention and sets the default values. +func NewChatMessageMention()(*ChatMessageMention) { + m := &ChatMessageMention{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessageMentionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageMentionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageMention(), 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 *ChatMessageMention) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageMention) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["mentioned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageMentionedIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMentioned(val.(ChatMessageMentionedIdentitySetable)) + } + return nil + } + res["mentionText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMentionText(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 + } + return res +} +// GetId gets the id property value. Index of an entity being mentioned in the specified chatMessage. Matches the {index} value in the corresponding tag in the message body. +func (m *ChatMessageMention) GetId()(*int32) { + return m.id +} +// GetMentioned gets the mentioned property value. The entity (user, application, team, or channel) that was @mentioned. +func (m *ChatMessageMention) GetMentioned()(ChatMessageMentionedIdentitySetable) { + return m.mentioned +} +// GetMentionText gets the mentionText property value. String used to represent the mention. For example, a user's display name, a team name. +func (m *ChatMessageMention) GetMentionText()(*string) { + return m.mentionText +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessageMention) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ChatMessageMention) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("mentioned", m.GetMentioned()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mentionText", m.GetMentionText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ChatMessageMention) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. Index of an entity being mentioned in the specified chatMessage. Matches the {index} value in the corresponding tag in the message body. +func (m *ChatMessageMention) SetId(value *int32)() { + m.id = value +} +// SetMentioned sets the mentioned property value. The entity (user, application, team, or channel) that was @mentioned. +func (m *ChatMessageMention) SetMentioned(value ChatMessageMentionedIdentitySetable)() { + m.mentioned = value +} +// SetMentionText sets the mentionText property value. String used to represent the mention. For example, a user's display name, a team name. +func (m *ChatMessageMention) SetMentionText(value *string)() { + m.mentionText = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessageMention) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_response.go new file mode 100644 index 000000000..4df8055f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMentionCollectionResponse +type ChatMessageMentionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageMentionable +} +// NewChatMessageMentionCollectionResponse instantiates a new ChatMessageMentionCollectionResponse and sets the default values. +func NewChatMessageMentionCollectionResponse()(*ChatMessageMentionCollectionResponse) { + m := &ChatMessageMentionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageMentionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageMentionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageMentionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageMentionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageMentionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageMentionable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageMentionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageMentionCollectionResponse) GetValue()([]ChatMessageMentionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageMentionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageMentionCollectionResponse) SetValue(value []ChatMessageMentionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_responseable.go new file mode 100644 index 000000000..de131c359 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mention_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMentionCollectionResponseable +type ChatMessageMentionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageMentionable) + SetValue(value []ChatMessageMentionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mentionable.go b/src/internal/connector/graph/betasdk/models/chat_message_mentionable.go new file mode 100644 index 000000000..3c043281e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mentionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMentionable +type ChatMessageMentionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*int32) + GetMentioned()(ChatMessageMentionedIdentitySetable) + GetMentionText()(*string) + GetOdataType()(*string) + SetId(value *int32)() + SetMentioned(value ChatMessageMentionedIdentitySetable)() + SetMentionText(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_set.go b/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_set.go new file mode 100644 index 000000000..2dca8cebf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_set.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMentionedIdentitySet +type ChatMessageMentionedIdentitySet struct { + IdentitySet + // If present, represents a conversation (for example, team or channel) @mentioned in a message. + conversation TeamworkConversationIdentityable + // If present, represents a tag @mentioned in a team message. + tag TeamworkTagIdentityable +} +// NewChatMessageMentionedIdentitySet instantiates a new ChatMessageMentionedIdentitySet and sets the default values. +func NewChatMessageMentionedIdentitySet()(*ChatMessageMentionedIdentitySet) { + m := &ChatMessageMentionedIdentitySet{ + IdentitySet: *NewIdentitySet(), + } + odataTypeValue := "#microsoft.graph.chatMessageMentionedIdentitySet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatMessageMentionedIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageMentionedIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageMentionedIdentitySet(), nil +} +// GetConversation gets the conversation property value. If present, represents a conversation (for example, team or channel) @mentioned in a message. +func (m *ChatMessageMentionedIdentitySet) GetConversation()(TeamworkConversationIdentityable) { + return m.conversation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageMentionedIdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySet.GetFieldDeserializers() + res["conversation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamworkConversationIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConversation(val.(TeamworkConversationIdentityable)) + } + return nil + } + res["tag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamworkTagIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTag(val.(TeamworkTagIdentityable)) + } + return nil + } + return res +} +// GetTag gets the tag property value. If present, represents a tag @mentioned in a team message. +func (m *ChatMessageMentionedIdentitySet) GetTag()(TeamworkTagIdentityable) { + return m.tag +} +// Serialize serializes information the current object +func (m *ChatMessageMentionedIdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("conversation", m.GetConversation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("tag", m.GetTag()) + if err != nil { + return err + } + } + return nil +} +// SetConversation sets the conversation property value. If present, represents a conversation (for example, team or channel) @mentioned in a message. +func (m *ChatMessageMentionedIdentitySet) SetConversation(value TeamworkConversationIdentityable)() { + m.conversation = value +} +// SetTag sets the tag property value. If present, represents a tag @mentioned in a team message. +func (m *ChatMessageMentionedIdentitySet) SetTag(value TeamworkTagIdentityable)() { + m.tag = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_setable.go b/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_setable.go new file mode 100644 index 000000000..171c8b01d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_mentioned_identity_setable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageMentionedIdentitySetable +type ChatMessageMentionedIdentitySetable interface { + IdentitySetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConversation()(TeamworkConversationIdentityable) + GetTag()(TeamworkTagIdentityable) + SetConversation(value TeamworkConversationIdentityable)() + SetTag(value TeamworkTagIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_policy_violation.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation.go new file mode 100644 index 000000000..ea3980124 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation.go @@ -0,0 +1,204 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessagePolicyViolation +type ChatMessagePolicyViolation 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 action taken by the DLP provider on the message with sensitive content. Supported values are: NoneNotifySender -- Inform the sender of the violation but allow readers to read the message.BlockAccess -- Block readers from reading the message.BlockAccessExternal -- Block users outside the organization from reading the message, while allowing users within the organization to read the message. + dlpAction *ChatMessagePolicyViolationDlpActionTypes + // Justification text provided by the sender of the message when overriding a policy violation. + justificationText *string + // The OdataType property + odataType *string + // Information to display to the message sender about why the message was flagged as a violation. + policyTip ChatMessagePolicyViolationPolicyTipable + // Indicates the action taken by the user on a message blocked by the DLP provider. Supported values are: NoneOverrideReportFalsePositiveWhen the DLP provider is updating the message for blocking sensitive content, userAction is not required. + userAction *ChatMessagePolicyViolationUserActionTypes + // Indicates what actions the sender may take in response to the policy violation. Supported values are: NoneAllowFalsePositiveOverride -- Allows the sender to declare the policyViolation to be an error in the DLP app and its rules, and allow readers to see the message again if the dlpAction had hidden it.AllowOverrideWithoutJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, without needing to provide an explanation for doing so. AllowOverrideWithJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, after providing an explanation for doing so.AllowOverrideWithoutJustification and AllowOverrideWithJustification are mutually exclusive. + verdictDetails *ChatMessagePolicyViolationVerdictDetailsTypes +} +// NewChatMessagePolicyViolation instantiates a new chatMessagePolicyViolation and sets the default values. +func NewChatMessagePolicyViolation()(*ChatMessagePolicyViolation) { + m := &ChatMessagePolicyViolation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessagePolicyViolationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessagePolicyViolationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessagePolicyViolation(), 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 *ChatMessagePolicyViolation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDlpAction gets the dlpAction property value. The action taken by the DLP provider on the message with sensitive content. Supported values are: NoneNotifySender -- Inform the sender of the violation but allow readers to read the message.BlockAccess -- Block readers from reading the message.BlockAccessExternal -- Block users outside the organization from reading the message, while allowing users within the organization to read the message. +func (m *ChatMessagePolicyViolation) GetDlpAction()(*ChatMessagePolicyViolationDlpActionTypes) { + return m.dlpAction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessagePolicyViolation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dlpAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessagePolicyViolationDlpActionTypes) + if err != nil { + return err + } + if val != nil { + m.SetDlpAction(val.(*ChatMessagePolicyViolationDlpActionTypes)) + } + return nil + } + res["justificationText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustificationText(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["policyTip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessagePolicyViolationPolicyTipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicyTip(val.(ChatMessagePolicyViolationPolicyTipable)) + } + return nil + } + res["userAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessagePolicyViolationUserActionTypes) + if err != nil { + return err + } + if val != nil { + m.SetUserAction(val.(*ChatMessagePolicyViolationUserActionTypes)) + } + return nil + } + res["verdictDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChatMessagePolicyViolationVerdictDetailsTypes) + if err != nil { + return err + } + if val != nil { + m.SetVerdictDetails(val.(*ChatMessagePolicyViolationVerdictDetailsTypes)) + } + return nil + } + return res +} +// GetJustificationText gets the justificationText property value. Justification text provided by the sender of the message when overriding a policy violation. +func (m *ChatMessagePolicyViolation) GetJustificationText()(*string) { + return m.justificationText +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessagePolicyViolation) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyTip gets the policyTip property value. Information to display to the message sender about why the message was flagged as a violation. +func (m *ChatMessagePolicyViolation) GetPolicyTip()(ChatMessagePolicyViolationPolicyTipable) { + return m.policyTip +} +// GetUserAction gets the userAction property value. Indicates the action taken by the user on a message blocked by the DLP provider. Supported values are: NoneOverrideReportFalsePositiveWhen the DLP provider is updating the message for blocking sensitive content, userAction is not required. +func (m *ChatMessagePolicyViolation) GetUserAction()(*ChatMessagePolicyViolationUserActionTypes) { + return m.userAction +} +// GetVerdictDetails gets the verdictDetails property value. Indicates what actions the sender may take in response to the policy violation. Supported values are: NoneAllowFalsePositiveOverride -- Allows the sender to declare the policyViolation to be an error in the DLP app and its rules, and allow readers to see the message again if the dlpAction had hidden it.AllowOverrideWithoutJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, without needing to provide an explanation for doing so. AllowOverrideWithJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, after providing an explanation for doing so.AllowOverrideWithoutJustification and AllowOverrideWithJustification are mutually exclusive. +func (m *ChatMessagePolicyViolation) GetVerdictDetails()(*ChatMessagePolicyViolationVerdictDetailsTypes) { + return m.verdictDetails +} +// Serialize serializes information the current object +func (m *ChatMessagePolicyViolation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDlpAction() != nil { + cast := (*m.GetDlpAction()).String() + err := writer.WriteStringValue("dlpAction", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("justificationText", m.GetJustificationText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("policyTip", m.GetPolicyTip()) + if err != nil { + return err + } + } + if m.GetUserAction() != nil { + cast := (*m.GetUserAction()).String() + err := writer.WriteStringValue("userAction", &cast) + if err != nil { + return err + } + } + if m.GetVerdictDetails() != nil { + cast := (*m.GetVerdictDetails()).String() + err := writer.WriteStringValue("verdictDetails", &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 *ChatMessagePolicyViolation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDlpAction sets the dlpAction property value. The action taken by the DLP provider on the message with sensitive content. Supported values are: NoneNotifySender -- Inform the sender of the violation but allow readers to read the message.BlockAccess -- Block readers from reading the message.BlockAccessExternal -- Block users outside the organization from reading the message, while allowing users within the organization to read the message. +func (m *ChatMessagePolicyViolation) SetDlpAction(value *ChatMessagePolicyViolationDlpActionTypes)() { + m.dlpAction = value +} +// SetJustificationText sets the justificationText property value. Justification text provided by the sender of the message when overriding a policy violation. +func (m *ChatMessagePolicyViolation) SetJustificationText(value *string)() { + m.justificationText = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessagePolicyViolation) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyTip sets the policyTip property value. Information to display to the message sender about why the message was flagged as a violation. +func (m *ChatMessagePolicyViolation) SetPolicyTip(value ChatMessagePolicyViolationPolicyTipable)() { + m.policyTip = value +} +// SetUserAction sets the userAction property value. Indicates the action taken by the user on a message blocked by the DLP provider. Supported values are: NoneOverrideReportFalsePositiveWhen the DLP provider is updating the message for blocking sensitive content, userAction is not required. +func (m *ChatMessagePolicyViolation) SetUserAction(value *ChatMessagePolicyViolationUserActionTypes)() { + m.userAction = value +} +// SetVerdictDetails sets the verdictDetails property value. Indicates what actions the sender may take in response to the policy violation. Supported values are: NoneAllowFalsePositiveOverride -- Allows the sender to declare the policyViolation to be an error in the DLP app and its rules, and allow readers to see the message again if the dlpAction had hidden it.AllowOverrideWithoutJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, without needing to provide an explanation for doing so. AllowOverrideWithJustification -- Allows the sender to overriide the DLP violation and allow readers to see the message again if the dlpAction had hidden it, after providing an explanation for doing so.AllowOverrideWithoutJustification and AllowOverrideWithJustification are mutually exclusive. +func (m *ChatMessagePolicyViolation) SetVerdictDetails(value *ChatMessagePolicyViolationVerdictDetailsTypes)() { + m.verdictDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_dlp_action_types.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_dlp_action_types.go new file mode 100644 index 000000000..6e8387f48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_dlp_action_types.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessagePolicyViolationDlpActionTypes int + +const ( + NONE_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES ChatMessagePolicyViolationDlpActionTypes = iota + NOTIFYSENDER_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + BLOCKACCESS_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + BLOCKACCESSEXTERNAL_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES +) + +func (i ChatMessagePolicyViolationDlpActionTypes) String() string { + return []string{"none", "notifySender", "blockAccess", "blockAccessExternal"}[i] +} +func ParseChatMessagePolicyViolationDlpActionTypes(v string) (interface{}, error) { + result := NONE_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + switch v { + case "none": + result = NONE_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + case "notifySender": + result = NOTIFYSENDER_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + case "blockAccess": + result = BLOCKACCESS_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + case "blockAccessExternal": + result = BLOCKACCESSEXTERNAL_CHATMESSAGEPOLICYVIOLATIONDLPACTIONTYPES + default: + return 0, errors.New("Unknown ChatMessagePolicyViolationDlpActionTypes value: " + v) + } + return &result, nil +} +func SerializeChatMessagePolicyViolationDlpActionTypes(values []ChatMessagePolicyViolationDlpActionTypes) []string { + 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/chat_message_policy_violation_policy_tip.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_policy_tip.go new file mode 100644 index 000000000..287940fce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_policy_tip.go @@ -0,0 +1,153 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessagePolicyViolationPolicyTip +type ChatMessagePolicyViolationPolicyTip 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 URL a user can visit to read about the data loss prevention policies for the organization. (ie, policies about what users shouldn't say in chats) + complianceUrl *string + // Explanatory text shown to the sender of the message. + generalText *string + // The list of improper data in the message that was detected by the data loss prevention app. Each DLP app defines its own conditions, examples include 'Credit Card Number' and 'Social Security Number'. + matchedConditionDescriptions []string + // The OdataType property + odataType *string +} +// NewChatMessagePolicyViolationPolicyTip instantiates a new chatMessagePolicyViolationPolicyTip and sets the default values. +func NewChatMessagePolicyViolationPolicyTip()(*ChatMessagePolicyViolationPolicyTip) { + m := &ChatMessagePolicyViolationPolicyTip{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessagePolicyViolationPolicyTipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessagePolicyViolationPolicyTipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessagePolicyViolationPolicyTip(), 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 *ChatMessagePolicyViolationPolicyTip) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetComplianceUrl gets the complianceUrl property value. The URL a user can visit to read about the data loss prevention policies for the organization. (ie, policies about what users shouldn't say in chats) +func (m *ChatMessagePolicyViolationPolicyTip) GetComplianceUrl()(*string) { + return m.complianceUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessagePolicyViolationPolicyTip) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["complianceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceUrl(val) + } + return nil + } + res["generalText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGeneralText(val) + } + return nil + } + res["matchedConditionDescriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMatchedConditionDescriptions(res) + } + 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 + } + return res +} +// GetGeneralText gets the generalText property value. Explanatory text shown to the sender of the message. +func (m *ChatMessagePolicyViolationPolicyTip) GetGeneralText()(*string) { + return m.generalText +} +// GetMatchedConditionDescriptions gets the matchedConditionDescriptions property value. The list of improper data in the message that was detected by the data loss prevention app. Each DLP app defines its own conditions, examples include 'Credit Card Number' and 'Social Security Number'. +func (m *ChatMessagePolicyViolationPolicyTip) GetMatchedConditionDescriptions()([]string) { + return m.matchedConditionDescriptions +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessagePolicyViolationPolicyTip) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ChatMessagePolicyViolationPolicyTip) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("complianceUrl", m.GetComplianceUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("generalText", m.GetGeneralText()) + if err != nil { + return err + } + } + if m.GetMatchedConditionDescriptions() != nil { + err := writer.WriteCollectionOfStringValues("matchedConditionDescriptions", m.GetMatchedConditionDescriptions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ChatMessagePolicyViolationPolicyTip) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetComplianceUrl sets the complianceUrl property value. The URL a user can visit to read about the data loss prevention policies for the organization. (ie, policies about what users shouldn't say in chats) +func (m *ChatMessagePolicyViolationPolicyTip) SetComplianceUrl(value *string)() { + m.complianceUrl = value +} +// SetGeneralText sets the generalText property value. Explanatory text shown to the sender of the message. +func (m *ChatMessagePolicyViolationPolicyTip) SetGeneralText(value *string)() { + m.generalText = value +} +// SetMatchedConditionDescriptions sets the matchedConditionDescriptions property value. The list of improper data in the message that was detected by the data loss prevention app. Each DLP app defines its own conditions, examples include 'Credit Card Number' and 'Social Security Number'. +func (m *ChatMessagePolicyViolationPolicyTip) SetMatchedConditionDescriptions(value []string)() { + m.matchedConditionDescriptions = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessagePolicyViolationPolicyTip) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_policy_tipable.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_policy_tipable.go new file mode 100644 index 000000000..448fb4489 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_policy_tipable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessagePolicyViolationPolicyTipable +type ChatMessagePolicyViolationPolicyTipable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceUrl()(*string) + GetGeneralText()(*string) + GetMatchedConditionDescriptions()([]string) + GetOdataType()(*string) + SetComplianceUrl(value *string)() + SetGeneralText(value *string)() + SetMatchedConditionDescriptions(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_user_action_types.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_user_action_types.go new file mode 100644 index 000000000..cb6a62cbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_user_action_types.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessagePolicyViolationUserActionTypes int + +const ( + NONE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES ChatMessagePolicyViolationUserActionTypes = iota + OVERRIDE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES + REPORTFALSEPOSITIVE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES +) + +func (i ChatMessagePolicyViolationUserActionTypes) String() string { + return []string{"none", "override", "reportFalsePositive"}[i] +} +func ParseChatMessagePolicyViolationUserActionTypes(v string) (interface{}, error) { + result := NONE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES + switch v { + case "none": + result = NONE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES + case "override": + result = OVERRIDE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES + case "reportFalsePositive": + result = REPORTFALSEPOSITIVE_CHATMESSAGEPOLICYVIOLATIONUSERACTIONTYPES + default: + return 0, errors.New("Unknown ChatMessagePolicyViolationUserActionTypes value: " + v) + } + return &result, nil +} +func SerializeChatMessagePolicyViolationUserActionTypes(values []ChatMessagePolicyViolationUserActionTypes) []string { + 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/chat_message_policy_violation_verdict_details_types.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_verdict_details_types.go new file mode 100644 index 000000000..3fdc420e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violation_verdict_details_types.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessagePolicyViolationVerdictDetailsTypes int + +const ( + NONE_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES ChatMessagePolicyViolationVerdictDetailsTypes = iota + ALLOWFALSEPOSITIVEOVERRIDE_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + ALLOWOVERRIDEWITHOUTJUSTIFICATION_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + ALLOWOVERRIDEWITHJUSTIFICATION_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES +) + +func (i ChatMessagePolicyViolationVerdictDetailsTypes) String() string { + return []string{"none", "allowFalsePositiveOverride", "allowOverrideWithoutJustification", "allowOverrideWithJustification"}[i] +} +func ParseChatMessagePolicyViolationVerdictDetailsTypes(v string) (interface{}, error) { + result := NONE_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + switch v { + case "none": + result = NONE_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + case "allowFalsePositiveOverride": + result = ALLOWFALSEPOSITIVEOVERRIDE_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + case "allowOverrideWithoutJustification": + result = ALLOWOVERRIDEWITHOUTJUSTIFICATION_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + case "allowOverrideWithJustification": + result = ALLOWOVERRIDEWITHJUSTIFICATION_CHATMESSAGEPOLICYVIOLATIONVERDICTDETAILSTYPES + default: + return 0, errors.New("Unknown ChatMessagePolicyViolationVerdictDetailsTypes value: " + v) + } + return &result, nil +} +func SerializeChatMessagePolicyViolationVerdictDetailsTypes(values []ChatMessagePolicyViolationVerdictDetailsTypes) []string { + 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/chat_message_policy_violationable.go b/src/internal/connector/graph/betasdk/models/chat_message_policy_violationable.go new file mode 100644 index 000000000..ab2fcb32b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_policy_violationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessagePolicyViolationable +type ChatMessagePolicyViolationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDlpAction()(*ChatMessagePolicyViolationDlpActionTypes) + GetJustificationText()(*string) + GetOdataType()(*string) + GetPolicyTip()(ChatMessagePolicyViolationPolicyTipable) + GetUserAction()(*ChatMessagePolicyViolationUserActionTypes) + GetVerdictDetails()(*ChatMessagePolicyViolationVerdictDetailsTypes) + SetDlpAction(value *ChatMessagePolicyViolationDlpActionTypes)() + SetJustificationText(value *string)() + SetOdataType(value *string)() + SetPolicyTip(value ChatMessagePolicyViolationPolicyTipable)() + SetUserAction(value *ChatMessagePolicyViolationUserActionTypes)() + SetVerdictDetails(value *ChatMessagePolicyViolationVerdictDetailsTypes)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reaction.go b/src/internal/connector/graph/betasdk/models/chat_message_reaction.go new file mode 100644 index 000000000..72be1ffac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reaction.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReaction +type ChatMessageReaction 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 Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Supported values are like, angry, sad, laugh, heart, surprised. + reactionType *string + // The user property + user ChatMessageReactionIdentitySetable +} +// NewChatMessageReaction instantiates a new chatMessageReaction and sets the default values. +func NewChatMessageReaction()(*ChatMessageReaction) { + m := &ChatMessageReaction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatMessageReactionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageReactionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageReaction(), 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 *ChatMessageReaction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChatMessageReaction) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageReaction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(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["reactionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReactionType(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageReactionIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(ChatMessageReactionIdentitySetable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatMessageReaction) GetOdataType()(*string) { + return m.odataType +} +// GetReactionType gets the reactionType property value. Supported values are like, angry, sad, laugh, heart, surprised. +func (m *ChatMessageReaction) GetReactionType()(*string) { + return m.reactionType +} +// GetUser gets the user property value. The user property +func (m *ChatMessageReaction) GetUser()(ChatMessageReactionIdentitySetable) { + return m.user +} +// Serialize serializes information the current object +func (m *ChatMessageReaction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reactionType", m.GetReactionType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *ChatMessageReaction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ChatMessageReaction) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatMessageReaction) SetOdataType(value *string)() { + m.odataType = value +} +// SetReactionType sets the reactionType property value. Supported values are like, angry, sad, laugh, heart, surprised. +func (m *ChatMessageReaction) SetReactionType(value *string)() { + m.reactionType = value +} +// SetUser sets the user property value. The user property +func (m *ChatMessageReaction) SetUser(value ChatMessageReactionIdentitySetable)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_response.go b/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_response.go new file mode 100644 index 000000000..9c683c9a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReactionCollectionResponse +type ChatMessageReactionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChatMessageReactionable +} +// NewChatMessageReactionCollectionResponse instantiates a new ChatMessageReactionCollectionResponse and sets the default values. +func NewChatMessageReactionCollectionResponse()(*ChatMessageReactionCollectionResponse) { + m := &ChatMessageReactionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChatMessageReactionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageReactionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageReactionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageReactionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChatMessageReactionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChatMessageReactionable, len(val)) + for i, v := range val { + res[i] = v.(ChatMessageReactionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChatMessageReactionCollectionResponse) GetValue()([]ChatMessageReactionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChatMessageReactionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChatMessageReactionCollectionResponse) SetValue(value []ChatMessageReactionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_responseable.go new file mode 100644 index 000000000..e8dfd7285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reaction_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReactionCollectionResponseable +type ChatMessageReactionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChatMessageReactionable) + SetValue(value []ChatMessageReactionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_set.go b/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_set.go new file mode 100644 index 000000000..5afb5a9f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_set.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReactionIdentitySet +type ChatMessageReactionIdentitySet struct { + IdentitySet +} +// NewChatMessageReactionIdentitySet instantiates a new ChatMessageReactionIdentitySet and sets the default values. +func NewChatMessageReactionIdentitySet()(*ChatMessageReactionIdentitySet) { + m := &ChatMessageReactionIdentitySet{ + IdentitySet: *NewIdentitySet(), + } + odataTypeValue := "#microsoft.graph.chatMessageReactionIdentitySet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatMessageReactionIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatMessageReactionIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatMessageReactionIdentitySet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatMessageReactionIdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySet.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ChatMessageReactionIdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySet.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_setable.go b/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_setable.go new file mode 100644 index 000000000..eb60ed1a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reaction_identity_setable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReactionIdentitySetable +type ChatMessageReactionIdentitySetable interface { + IdentitySetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_reactionable.go b/src/internal/connector/graph/betasdk/models/chat_message_reactionable.go new file mode 100644 index 000000000..f76066133 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_reactionable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageReactionable +type ChatMessageReactionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetReactionType()(*string) + GetUser()(ChatMessageReactionIdentitySetable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetReactionType(value *string)() + SetUser(value ChatMessageReactionIdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_message_type.go b/src/internal/connector/graph/betasdk/models/chat_message_type.go new file mode 100644 index 000000000..e58e75292 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_message_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatMessageType int + +const ( + MESSAGE_CHATMESSAGETYPE ChatMessageType = iota + CHATEVENT_CHATMESSAGETYPE + TYPING_CHATMESSAGETYPE + UNKNOWNFUTUREVALUE_CHATMESSAGETYPE + SYSTEMEVENTMESSAGE_CHATMESSAGETYPE +) + +func (i ChatMessageType) String() string { + return []string{"message", "chatEvent", "typing", "unknownFutureValue", "systemEventMessage"}[i] +} +func ParseChatMessageType(v string) (interface{}, error) { + result := MESSAGE_CHATMESSAGETYPE + switch v { + case "message": + result = MESSAGE_CHATMESSAGETYPE + case "chatEvent": + result = CHATEVENT_CHATMESSAGETYPE + case "typing": + result = TYPING_CHATMESSAGETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CHATMESSAGETYPE + case "systemEventMessage": + result = SYSTEMEVENTMESSAGE_CHATMESSAGETYPE + default: + return 0, errors.New("Unknown ChatMessageType value: " + v) + } + return &result, nil +} +func SerializeChatMessageType(values []ChatMessageType) []string { + 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/chat_messageable.go b/src/internal/connector/graph/betasdk/models/chat_messageable.go new file mode 100644 index 000000000..516489f50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_messageable.go @@ -0,0 +1,62 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatMessageable +type ChatMessageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttachments()([]ChatMessageAttachmentable) + GetBody()(ItemBodyable) + GetChannelIdentity()(ChannelIdentityable) + GetChatId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEtag()(*string) + GetEventDetail()(EventMessageDetailable) + GetFrom()(ChatMessageFromIdentitySetable) + GetHostedContents()([]ChatMessageHostedContentable) + GetImportance()(*ChatMessageImportance) + GetLastEditedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocale()(*string) + GetMentions()([]ChatMessageMentionable) + GetMessageHistory()([]ChatMessageHistoryItemable) + GetMessageType()(*ChatMessageType) + GetOnBehalfOf()(ChatMessageFromIdentitySetable) + GetPolicyViolation()(ChatMessagePolicyViolationable) + GetReactions()([]ChatMessageReactionable) + GetReplies()([]ChatMessageable) + GetReplyToId()(*string) + GetSubject()(*string) + GetSummary()(*string) + GetWebUrl()(*string) + SetAttachments(value []ChatMessageAttachmentable)() + SetBody(value ItemBodyable)() + SetChannelIdentity(value ChannelIdentityable)() + SetChatId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEtag(value *string)() + SetEventDetail(value EventMessageDetailable)() + SetFrom(value ChatMessageFromIdentitySetable)() + SetHostedContents(value []ChatMessageHostedContentable)() + SetImportance(value *ChatMessageImportance)() + SetLastEditedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocale(value *string)() + SetMentions(value []ChatMessageMentionable)() + SetMessageHistory(value []ChatMessageHistoryItemable)() + SetMessageType(value *ChatMessageType)() + SetOnBehalfOf(value ChatMessageFromIdentitySetable)() + SetPolicyViolation(value ChatMessagePolicyViolationable)() + SetReactions(value []ChatMessageReactionable)() + SetReplies(value []ChatMessageable)() + SetReplyToId(value *string)() + SetSubject(value *string)() + SetSummary(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detail.go b/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detail.go new file mode 100644 index 000000000..b92411c47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatRenamedEventMessageDetail +type ChatRenamedEventMessageDetail struct { + EventMessageDetail + // The updated name of the chat. + chatDisplayName *string + // Unique identifier of the chat. + chatId *string + // Initiator of the event. + initiator IdentitySetable +} +// NewChatRenamedEventMessageDetail instantiates a new ChatRenamedEventMessageDetail and sets the default values. +func NewChatRenamedEventMessageDetail()(*ChatRenamedEventMessageDetail) { + m := &ChatRenamedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.chatRenamedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateChatRenamedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatRenamedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatRenamedEventMessageDetail(), nil +} +// GetChatDisplayName gets the chatDisplayName property value. The updated name of the chat. +func (m *ChatRenamedEventMessageDetail) GetChatDisplayName()(*string) { + return m.chatDisplayName +} +// GetChatId gets the chatId property value. Unique identifier of the chat. +func (m *ChatRenamedEventMessageDetail) GetChatId()(*string) { + return m.chatId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatRenamedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["chatDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChatDisplayName(val) + } + return nil + } + res["chatId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChatId(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ChatRenamedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ChatRenamedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("chatDisplayName", m.GetChatDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("chatId", m.GetChatId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetChatDisplayName sets the chatDisplayName property value. The updated name of the chat. +func (m *ChatRenamedEventMessageDetail) SetChatDisplayName(value *string)() { + m.chatDisplayName = value +} +// SetChatId sets the chatId property value. Unique identifier of the chat. +func (m *ChatRenamedEventMessageDetail) SetChatId(value *string)() { + m.chatId = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ChatRenamedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detailable.go new file mode 100644 index 000000000..7bd93a134 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_renamed_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatRenamedEventMessageDetailable +type ChatRenamedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChatDisplayName()(*string) + GetChatId()(*string) + GetInitiator()(IdentitySetable) + SetChatDisplayName(value *string)() + SetChatId(value *string)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chat_type.go b/src/internal/connector/graph/betasdk/models/chat_type.go new file mode 100644 index 000000000..08f5c687a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChatType int + +const ( + ONEONONE_CHATTYPE ChatType = iota + GROUP_CHATTYPE + MEETING_CHATTYPE + UNKNOWNFUTUREVALUE_CHATTYPE +) + +func (i ChatType) String() string { + return []string{"oneOnOne", "group", "meeting", "unknownFutureValue"}[i] +} +func ParseChatType(v string) (interface{}, error) { + result := ONEONONE_CHATTYPE + switch v { + case "oneOnOne": + result = ONEONONE_CHATTYPE + case "group": + result = GROUP_CHATTYPE + case "meeting": + result = MEETING_CHATTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CHATTYPE + default: + return 0, errors.New("Unknown ChatType value: " + v) + } + return &result, nil +} +func SerializeChatType(values []ChatType) []string { + 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/chat_viewpoint.go b/src/internal/connector/graph/betasdk/models/chat_viewpoint.go new file mode 100644 index 000000000..d0a529f47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_viewpoint.go @@ -0,0 +1,124 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatViewpoint +type ChatViewpoint 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 whether the chat is hidden for the current user. + isHidden *bool + // Represents the dateTime up until which the current user has read chatMessages in a specific chat. + lastMessageReadDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewChatViewpoint instantiates a new chatViewpoint and sets the default values. +func NewChatViewpoint()(*ChatViewpoint) { + m := &ChatViewpoint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChatViewpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChatViewpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChatViewpoint(), 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 *ChatViewpoint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChatViewpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHidden(val) + } + return nil + } + res["lastMessageReadDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastMessageReadDateTime(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 + } + return res +} +// GetIsHidden gets the isHidden property value. Indicates whether the chat is hidden for the current user. +func (m *ChatViewpoint) GetIsHidden()(*bool) { + return m.isHidden +} +// GetLastMessageReadDateTime gets the lastMessageReadDateTime property value. Represents the dateTime up until which the current user has read chatMessages in a specific chat. +func (m *ChatViewpoint) GetLastMessageReadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastMessageReadDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChatViewpoint) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ChatViewpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isHidden", m.GetIsHidden()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastMessageReadDateTime", m.GetLastMessageReadDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ChatViewpoint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsHidden sets the isHidden property value. Indicates whether the chat is hidden for the current user. +func (m *ChatViewpoint) SetIsHidden(value *bool)() { + m.isHidden = value +} +// SetLastMessageReadDateTime sets the lastMessageReadDateTime property value. Represents the dateTime up until which the current user has read chatMessages in a specific chat. +func (m *ChatViewpoint) SetLastMessageReadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastMessageReadDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChatViewpoint) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/chat_viewpointable.go b/src/internal/connector/graph/betasdk/models/chat_viewpointable.go new file mode 100644 index 000000000..a46036946 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chat_viewpointable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChatViewpointable +type ChatViewpointable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsHidden()(*bool) + GetLastMessageReadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetIsHidden(value *bool)() + SetLastMessageReadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chatable.go b/src/internal/connector/graph/betasdk/models/chatable.go new file mode 100644 index 000000000..49f7733c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chatable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Chatable +type Chatable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChatType()(*ChatType) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInstalledApps()([]TeamsAppInstallationable) + GetLastMessagePreview()(ChatMessageInfoable) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMembers()([]ConversationMemberable) + GetMessages()([]ChatMessageable) + GetOnlineMeetingInfo()(TeamworkOnlineMeetingInfoable) + GetOperations()([]TeamsAsyncOperationable) + GetPermissionGrants()([]ResourceSpecificPermissionGrantable) + GetPinnedMessages()([]PinnedChatMessageInfoable) + GetTabs()([]TeamsTabable) + GetTenantId()(*string) + GetTopic()(*string) + GetViewpoint()(ChatViewpointable) + GetWebUrl()(*string) + SetChatType(value *ChatType)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInstalledApps(value []TeamsAppInstallationable)() + SetLastMessagePreview(value ChatMessageInfoable)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMembers(value []ConversationMemberable)() + SetMessages(value []ChatMessageable)() + SetOnlineMeetingInfo(value TeamworkOnlineMeetingInfoable)() + SetOperations(value []TeamsAsyncOperationable)() + SetPermissionGrants(value []ResourceSpecificPermissionGrantable)() + SetPinnedMessages(value []PinnedChatMessageInfoable)() + SetTabs(value []TeamsTabable)() + SetTenantId(value *string)() + SetTopic(value *string)() + SetViewpoint(value ChatViewpointable)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/checklist_item.go b/src/internal/connector/graph/betasdk/models/checklist_item.go new file mode 100644 index 000000000..da4ccfe1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/checklist_item.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChecklistItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChecklistItem struct { + Entity + // The date and time when the checklistItem was finished. + checkedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the checklistItem was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Field indicating the title of checklistItem. + displayName *string + // State indicating whether the item is checked off or not. + isChecked *bool +} +// NewChecklistItem instantiates a new checklistItem and sets the default values. +func NewChecklistItem()(*ChecklistItem) { + m := &ChecklistItem{ + Entity: *NewEntity(), + } + return m +} +// CreateChecklistItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChecklistItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChecklistItem(), nil +} +// GetCheckedDateTime gets the checkedDateTime property value. The date and time when the checklistItem was finished. +func (m *ChecklistItem) GetCheckedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.checkedDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the checklistItem was created. +func (m *ChecklistItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Field indicating the title of checklistItem. +func (m *ChecklistItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChecklistItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["checkedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckedDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isChecked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsChecked(val) + } + return nil + } + return res +} +// GetIsChecked gets the isChecked property value. State indicating whether the item is checked off or not. +func (m *ChecklistItem) GetIsChecked()(*bool) { + return m.isChecked +} +// Serialize serializes information the current object +func (m *ChecklistItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("checkedDateTime", m.GetCheckedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isChecked", m.GetIsChecked()) + if err != nil { + return err + } + } + return nil +} +// SetCheckedDateTime sets the checkedDateTime property value. The date and time when the checklistItem was finished. +func (m *ChecklistItem) SetCheckedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.checkedDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the checklistItem was created. +func (m *ChecklistItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Field indicating the title of checklistItem. +func (m *ChecklistItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsChecked sets the isChecked property value. State indicating whether the item is checked off or not. +func (m *ChecklistItem) SetIsChecked(value *bool)() { + m.isChecked = value +} diff --git a/src/internal/connector/graph/betasdk/models/checklist_item_collection_response.go b/src/internal/connector/graph/betasdk/models/checklist_item_collection_response.go new file mode 100644 index 000000000..4ff1dde3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/checklist_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChecklistItemCollectionResponse +type ChecklistItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChecklistItemable +} +// NewChecklistItemCollectionResponse instantiates a new ChecklistItemCollectionResponse and sets the default values. +func NewChecklistItemCollectionResponse()(*ChecklistItemCollectionResponse) { + m := &ChecklistItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChecklistItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChecklistItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChecklistItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChecklistItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChecklistItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChecklistItemable, len(val)) + for i, v := range val { + res[i] = v.(ChecklistItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChecklistItemCollectionResponse) GetValue()([]ChecklistItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChecklistItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChecklistItemCollectionResponse) SetValue(value []ChecklistItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/checklist_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/checklist_item_collection_responseable.go new file mode 100644 index 000000000..7860fdd33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/checklist_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChecklistItemCollectionResponseable +type ChecklistItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChecklistItemable) + SetValue(value []ChecklistItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/checklist_itemable.go b/src/internal/connector/graph/betasdk/models/checklist_itemable.go new file mode 100644 index 000000000..1e5865410 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/checklist_itemable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChecklistItemable +type ChecklistItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCheckedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetIsChecked()(*bool) + SetCheckedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetIsChecked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/choice_column.go b/src/internal/connector/graph/betasdk/models/choice_column.go new file mode 100644 index 000000000..9a3e4ab33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/choice_column.go @@ -0,0 +1,153 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChoiceColumn +type ChoiceColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If true, allows custom values that aren't in the configured choices. + allowTextEntry *bool + // The list of values available for this column. + choices []string + // How the choices are to be presented in the UX. Must be one of checkBoxes, dropDownMenu, or radioButtons + displayAs *string + // The OdataType property + odataType *string +} +// NewChoiceColumn instantiates a new choiceColumn and sets the default values. +func NewChoiceColumn()(*ChoiceColumn) { + m := &ChoiceColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChoiceColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChoiceColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChoiceColumn(), 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 *ChoiceColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowTextEntry gets the allowTextEntry property value. If true, allows custom values that aren't in the configured choices. +func (m *ChoiceColumn) GetAllowTextEntry()(*bool) { + return m.allowTextEntry +} +// GetChoices gets the choices property value. The list of values available for this column. +func (m *ChoiceColumn) GetChoices()([]string) { + return m.choices +} +// GetDisplayAs gets the displayAs property value. How the choices are to be presented in the UX. Must be one of checkBoxes, dropDownMenu, or radioButtons +func (m *ChoiceColumn) GetDisplayAs()(*string) { + return m.displayAs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChoiceColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowTextEntry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowTextEntry(val) + } + return nil + } + res["choices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetChoices(res) + } + return nil + } + res["displayAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayAs(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChoiceColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ChoiceColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowTextEntry", m.GetAllowTextEntry()) + if err != nil { + return err + } + } + if m.GetChoices() != nil { + err := writer.WriteCollectionOfStringValues("choices", m.GetChoices()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayAs", m.GetDisplayAs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ChoiceColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowTextEntry sets the allowTextEntry property value. If true, allows custom values that aren't in the configured choices. +func (m *ChoiceColumn) SetAllowTextEntry(value *bool)() { + m.allowTextEntry = value +} +// SetChoices sets the choices property value. The list of values available for this column. +func (m *ChoiceColumn) SetChoices(value []string)() { + m.choices = value +} +// SetDisplayAs sets the displayAs property value. How the choices are to be presented in the UX. Must be one of checkBoxes, dropDownMenu, or radioButtons +func (m *ChoiceColumn) SetDisplayAs(value *string)() { + m.displayAs = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChoiceColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/choice_columnable.go b/src/internal/connector/graph/betasdk/models/choice_columnable.go new file mode 100644 index 000000000..71a2c5339 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/choice_columnable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChoiceColumnable +type ChoiceColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowTextEntry()(*bool) + GetChoices()([]string) + GetDisplayAs()(*string) + GetOdataType()(*string) + SetAllowTextEntry(value *bool)() + SetChoices(value []string)() + SetDisplayAs(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property.go new file mode 100644 index 000000000..232e14ebd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSDeviceProperty represents a property of the ChromeOS device. +type ChromeOSDeviceProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the property + name *string + // The OdataType property + odataType *string + // Whether this property is updatable + updatable *bool + // Value of the property + value *string + // Type of the value + valueType *string +} +// NewChromeOSDeviceProperty instantiates a new chromeOSDeviceProperty and sets the default values. +func NewChromeOSDeviceProperty()(*ChromeOSDeviceProperty) { + m := &ChromeOSDeviceProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateChromeOSDevicePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChromeOSDevicePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChromeOSDeviceProperty(), 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 *ChromeOSDeviceProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChromeOSDeviceProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["updatable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatable(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 + } + res["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValueType(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the property +func (m *ChromeOSDeviceProperty) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ChromeOSDeviceProperty) GetOdataType()(*string) { + return m.odataType +} +// GetUpdatable gets the updatable property value. Whether this property is updatable +func (m *ChromeOSDeviceProperty) GetUpdatable()(*bool) { + return m.updatable +} +// GetValue gets the value property value. Value of the property +func (m *ChromeOSDeviceProperty) GetValue()(*string) { + return m.value +} +// GetValueType gets the valueType property value. Type of the value +func (m *ChromeOSDeviceProperty) GetValueType()(*string) { + return m.valueType +} +// Serialize serializes information the current object +func (m *ChromeOSDeviceProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("updatable", m.GetUpdatable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("valueType", m.GetValueType()) + 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 *ChromeOSDeviceProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name of the property +func (m *ChromeOSDeviceProperty) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ChromeOSDeviceProperty) SetOdataType(value *string)() { + m.odataType = value +} +// SetUpdatable sets the updatable property value. Whether this property is updatable +func (m *ChromeOSDeviceProperty) SetUpdatable(value *bool)() { + m.updatable = value +} +// SetValue sets the value property value. Value of the property +func (m *ChromeOSDeviceProperty) SetValue(value *string)() { + m.value = value +} +// SetValueType sets the valueType property value. Type of the value +func (m *ChromeOSDeviceProperty) SetValueType(value *string)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_response.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_response.go new file mode 100644 index 000000000..fa6ca42ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSDevicePropertyCollectionResponse +type ChromeOSDevicePropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChromeOSDevicePropertyable +} +// NewChromeOSDevicePropertyCollectionResponse instantiates a new ChromeOSDevicePropertyCollectionResponse and sets the default values. +func NewChromeOSDevicePropertyCollectionResponse()(*ChromeOSDevicePropertyCollectionResponse) { + m := &ChromeOSDevicePropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChromeOSDevicePropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChromeOSDevicePropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChromeOSDevicePropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChromeOSDevicePropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChromeOSDevicePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChromeOSDevicePropertyable, len(val)) + for i, v := range val { + res[i] = v.(ChromeOSDevicePropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChromeOSDevicePropertyCollectionResponse) GetValue()([]ChromeOSDevicePropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChromeOSDevicePropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChromeOSDevicePropertyCollectionResponse) SetValue(value []ChromeOSDevicePropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_responseable.go new file mode 100644 index 000000000..2587d8cdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSDevicePropertyCollectionResponseable +type ChromeOSDevicePropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChromeOSDevicePropertyable) + SetValue(value []ChromeOSDevicePropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_device_propertyable.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_propertyable.go new file mode 100644 index 000000000..f58719d99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_device_propertyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSDevicePropertyable +type ChromeOSDevicePropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetUpdatable()(*bool) + GetValue()(*string) + GetValueType()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetUpdatable(value *bool)() + SetValue(value *string)() + SetValueType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings.go new file mode 100644 index 000000000..bfb6aba8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSOnboardingSettings entity that represents a Chromebook tenant settings +type ChromeOSOnboardingSettings struct { + Entity + // The ChromebookTenant's LastDirectorySyncDateTime + lastDirectorySyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ChromebookTenant's LastModifiedDateTime + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The onboarding status of the tenant. + onboardingStatus *OnboardingStatus + // The ChromebookTenant's OwnerUserPrincipalName + ownerUserPrincipalName *string +} +// NewChromeOSOnboardingSettings instantiates a new chromeOSOnboardingSettings and sets the default values. +func NewChromeOSOnboardingSettings()(*ChromeOSOnboardingSettings) { + m := &ChromeOSOnboardingSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateChromeOSOnboardingSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChromeOSOnboardingSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChromeOSOnboardingSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChromeOSOnboardingSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastDirectorySyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastDirectorySyncDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["onboardingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnboardingStatus) + if err != nil { + return err + } + if val != nil { + m.SetOnboardingStatus(val.(*OnboardingStatus)) + } + return nil + } + res["ownerUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastDirectorySyncDateTime gets the lastDirectorySyncDateTime property value. The ChromebookTenant's LastDirectorySyncDateTime +func (m *ChromeOSOnboardingSettings) GetLastDirectorySyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastDirectorySyncDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The ChromebookTenant's LastModifiedDateTime +func (m *ChromeOSOnboardingSettings) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOnboardingStatus gets the onboardingStatus property value. The onboarding status of the tenant. +func (m *ChromeOSOnboardingSettings) GetOnboardingStatus()(*OnboardingStatus) { + return m.onboardingStatus +} +// GetOwnerUserPrincipalName gets the ownerUserPrincipalName property value. The ChromebookTenant's OwnerUserPrincipalName +func (m *ChromeOSOnboardingSettings) GetOwnerUserPrincipalName()(*string) { + return m.ownerUserPrincipalName +} +// Serialize serializes information the current object +func (m *ChromeOSOnboardingSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastDirectorySyncDateTime", m.GetLastDirectorySyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetOnboardingStatus() != nil { + cast := (*m.GetOnboardingStatus()).String() + err = writer.WriteStringValue("onboardingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerUserPrincipalName", m.GetOwnerUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetLastDirectorySyncDateTime sets the lastDirectorySyncDateTime property value. The ChromebookTenant's LastDirectorySyncDateTime +func (m *ChromeOSOnboardingSettings) SetLastDirectorySyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastDirectorySyncDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The ChromebookTenant's LastModifiedDateTime +func (m *ChromeOSOnboardingSettings) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOnboardingStatus sets the onboardingStatus property value. The onboarding status of the tenant. +func (m *ChromeOSOnboardingSettings) SetOnboardingStatus(value *OnboardingStatus)() { + m.onboardingStatus = value +} +// SetOwnerUserPrincipalName sets the ownerUserPrincipalName property value. The ChromebookTenant's OwnerUserPrincipalName +func (m *ChromeOSOnboardingSettings) SetOwnerUserPrincipalName(value *string)() { + m.ownerUserPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_response.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_response.go new file mode 100644 index 000000000..6456f1e8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSOnboardingSettingsCollectionResponse +type ChromeOSOnboardingSettingsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ChromeOSOnboardingSettingsable +} +// NewChromeOSOnboardingSettingsCollectionResponse instantiates a new ChromeOSOnboardingSettingsCollectionResponse and sets the default values. +func NewChromeOSOnboardingSettingsCollectionResponse()(*ChromeOSOnboardingSettingsCollectionResponse) { + m := &ChromeOSOnboardingSettingsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateChromeOSOnboardingSettingsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateChromeOSOnboardingSettingsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewChromeOSOnboardingSettingsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ChromeOSOnboardingSettingsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChromeOSOnboardingSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChromeOSOnboardingSettingsable, len(val)) + for i, v := range val { + res[i] = v.(ChromeOSOnboardingSettingsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ChromeOSOnboardingSettingsCollectionResponse) GetValue()([]ChromeOSOnboardingSettingsable) { + return m.value +} +// Serialize serializes information the current object +func (m *ChromeOSOnboardingSettingsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ChromeOSOnboardingSettingsCollectionResponse) SetValue(value []ChromeOSOnboardingSettingsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_responseable.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_responseable.go new file mode 100644 index 000000000..deec1c6b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settings_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSOnboardingSettingsCollectionResponseable +type ChromeOSOnboardingSettingsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ChromeOSOnboardingSettingsable) + SetValue(value []ChromeOSOnboardingSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settingsable.go b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settingsable.go new file mode 100644 index 000000000..3fc01b125 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/chrome_o_s_onboarding_settingsable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ChromeOSOnboardingSettingsable +type ChromeOSOnboardingSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastDirectorySyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardingStatus()(*OnboardingStatus) + GetOwnerUserPrincipalName()(*string) + SetLastDirectorySyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardingStatus(value *OnboardingStatus)() + SetOwnerUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mapping.go b/src/internal/connector/graph/betasdk/models/claims_mapping.go new file mode 100644 index 000000000..6c01fd8bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mapping.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMapping +type ClaimsMapping 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 claim that provides the display name or full name for the user. It is a required propoerty. + displayName *string + // The claim that provides the email address of the user. + email *string + // The claim that provides the first name of the user. + givenName *string + // The OdataType property + odataType *string + // The claim that provides the last name of the user. + surname *string + // The claim that provides the unique identifier for the signed-in user. It is a required propoerty. + userId *string +} +// NewClaimsMapping instantiates a new claimsMapping and sets the default values. +func NewClaimsMapping()(*ClaimsMapping) { + m := &ClaimsMapping{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateClaimsMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClaimsMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClaimsMapping(), 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 *ClaimsMapping) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The claim that provides the display name or full name for the user. It is a required propoerty. +func (m *ClaimsMapping) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The claim that provides the email address of the user. +func (m *ClaimsMapping) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClaimsMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(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["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. The claim that provides the first name of the user. +func (m *ClaimsMapping) GetGivenName()(*string) { + return m.givenName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ClaimsMapping) GetOdataType()(*string) { + return m.odataType +} +// GetSurname gets the surname property value. The claim that provides the last name of the user. +func (m *ClaimsMapping) GetSurname()(*string) { + return m.surname +} +// GetUserId gets the userId property value. The claim that provides the unique identifier for the signed-in user. It is a required propoerty. +func (m *ClaimsMapping) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *ClaimsMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + 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 *ClaimsMapping) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The claim that provides the display name or full name for the user. It is a required propoerty. +func (m *ClaimsMapping) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The claim that provides the email address of the user. +func (m *ClaimsMapping) SetEmail(value *string)() { + m.email = value +} +// SetGivenName sets the givenName property value. The claim that provides the first name of the user. +func (m *ClaimsMapping) SetGivenName(value *string)() { + m.givenName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ClaimsMapping) SetOdataType(value *string)() { + m.odataType = value +} +// SetSurname sets the surname property value. The claim that provides the last name of the user. +func (m *ClaimsMapping) SetSurname(value *string)() { + m.surname = value +} +// SetUserId sets the userId property value. The claim that provides the unique identifier for the signed-in user. It is a required propoerty. +func (m *ClaimsMapping) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mapping_policy.go b/src/internal/connector/graph/betasdk/models/claims_mapping_policy.go new file mode 100644 index 000000000..5ca0636ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mapping_policy.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMappingPolicy +type ClaimsMappingPolicy struct { + StsPolicy +} +// NewClaimsMappingPolicy instantiates a new ClaimsMappingPolicy and sets the default values. +func NewClaimsMappingPolicy()(*ClaimsMappingPolicy) { + m := &ClaimsMappingPolicy{ + StsPolicy: *NewStsPolicy(), + } + odataTypeValue := "#microsoft.graph.claimsMappingPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateClaimsMappingPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClaimsMappingPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClaimsMappingPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClaimsMappingPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StsPolicy.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ClaimsMappingPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StsPolicy.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_response.go new file mode 100644 index 000000000..e7e6c8e04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMappingPolicyCollectionResponse +type ClaimsMappingPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ClaimsMappingPolicyable +} +// NewClaimsMappingPolicyCollectionResponse instantiates a new ClaimsMappingPolicyCollectionResponse and sets the default values. +func NewClaimsMappingPolicyCollectionResponse()(*ClaimsMappingPolicyCollectionResponse) { + m := &ClaimsMappingPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateClaimsMappingPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClaimsMappingPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClaimsMappingPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClaimsMappingPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClaimsMappingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClaimsMappingPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ClaimsMappingPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ClaimsMappingPolicyCollectionResponse) GetValue()([]ClaimsMappingPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ClaimsMappingPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ClaimsMappingPolicyCollectionResponse) SetValue(value []ClaimsMappingPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_responseable.go new file mode 100644 index 000000000..52c4a296b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mapping_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMappingPolicyCollectionResponseable +type ClaimsMappingPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ClaimsMappingPolicyable) + SetValue(value []ClaimsMappingPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mapping_policyable.go b/src/internal/connector/graph/betasdk/models/claims_mapping_policyable.go new file mode 100644 index 000000000..a053d04d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mapping_policyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMappingPolicyable +type ClaimsMappingPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + StsPolicyable +} diff --git a/src/internal/connector/graph/betasdk/models/claims_mappingable.go b/src/internal/connector/graph/betasdk/models/claims_mappingable.go new file mode 100644 index 000000000..a4e7f0b66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/claims_mappingable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClaimsMappingable +type ClaimsMappingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetEmail()(*string) + GetGivenName()(*string) + GetOdataType()(*string) + GetSurname()(*string) + GetUserId()(*string) + SetDisplayName(value *string)() + SetEmail(value *string)() + SetGivenName(value *string)() + SetOdataType(value *string)() + SetSurname(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/classifcation_error_base.go b/src/internal/connector/graph/betasdk/models/classifcation_error_base.go new file mode 100644 index 000000000..0523754ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classifcation_error_base.go @@ -0,0 +1,193 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassifcationErrorBase +type ClassifcationErrorBase 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 code property + code *string + // The innerError property + innerError ClassificationInnerErrorable + // The message property + message *string + // The OdataType property + odataType *string + // The target property + target *string +} +// NewClassifcationErrorBase instantiates a new classifcationErrorBase and sets the default values. +func NewClassifcationErrorBase()(*ClassifcationErrorBase) { + m := &ClassifcationErrorBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateClassifcationErrorBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassifcationErrorBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.classificationError": + return NewClassificationError(), nil + } + } + } + } + return NewClassifcationErrorBase(), 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 *ClassifcationErrorBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The code property +func (m *ClassifcationErrorBase) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassifcationErrorBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["innerError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClassificationInnerErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInnerError(val.(ClassificationInnerErrorable)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetInnerError gets the innerError property value. The innerError property +func (m *ClassifcationErrorBase) GetInnerError()(ClassificationInnerErrorable) { + return m.innerError +} +// GetMessage gets the message property value. The message property +func (m *ClassifcationErrorBase) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ClassifcationErrorBase) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The target property +func (m *ClassifcationErrorBase) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *ClassifcationErrorBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("innerError", m.GetInnerError()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *ClassifcationErrorBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ClassifcationErrorBase) SetCode(value *string)() { + m.code = value +} +// SetInnerError sets the innerError property value. The innerError property +func (m *ClassifcationErrorBase) SetInnerError(value ClassificationInnerErrorable)() { + m.innerError = value +} +// SetMessage sets the message property value. The message property +func (m *ClassifcationErrorBase) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ClassifcationErrorBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The target property +func (m *ClassifcationErrorBase) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_response.go b/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_response.go new file mode 100644 index 000000000..6710cbebc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassifcationErrorBaseCollectionResponse +type ClassifcationErrorBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ClassifcationErrorBaseable +} +// NewClassifcationErrorBaseCollectionResponse instantiates a new ClassifcationErrorBaseCollectionResponse and sets the default values. +func NewClassifcationErrorBaseCollectionResponse()(*ClassifcationErrorBaseCollectionResponse) { + m := &ClassifcationErrorBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateClassifcationErrorBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassifcationErrorBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassifcationErrorBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassifcationErrorBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassifcationErrorBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassifcationErrorBaseable, len(val)) + for i, v := range val { + res[i] = v.(ClassifcationErrorBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ClassifcationErrorBaseCollectionResponse) GetValue()([]ClassifcationErrorBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *ClassifcationErrorBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ClassifcationErrorBaseCollectionResponse) SetValue(value []ClassifcationErrorBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_responseable.go new file mode 100644 index 000000000..4b22ef6a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classifcation_error_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassifcationErrorBaseCollectionResponseable +type ClassifcationErrorBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ClassifcationErrorBaseable) + SetValue(value []ClassifcationErrorBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classifcation_error_baseable.go b/src/internal/connector/graph/betasdk/models/classifcation_error_baseable.go new file mode 100644 index 000000000..7e4056855 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classifcation_error_baseable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassifcationErrorBaseable +type ClassifcationErrorBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetInnerError()(ClassificationInnerErrorable) + GetMessage()(*string) + GetOdataType()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetInnerError(value ClassificationInnerErrorable)() + SetMessage(value *string)() + SetOdataType(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_attribute.go b/src/internal/connector/graph/betasdk/models/classification_attribute.go new file mode 100644 index 000000000..bad8d02e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_attribute.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationAttribute +type ClassificationAttribute 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 confidence property + confidence *int32 + // The count property + count *int32 + // The OdataType property + odataType *string +} +// NewClassificationAttribute instantiates a new classificationAttribute and sets the default values. +func NewClassificationAttribute()(*ClassificationAttribute) { + m := &ClassificationAttribute{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateClassificationAttributeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationAttributeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationAttribute(), 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 *ClassificationAttribute) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidence gets the confidence property value. The confidence property +func (m *ClassificationAttribute) GetConfidence()(*int32) { + return m.confidence +} +// GetCount gets the count property value. The count property +func (m *ClassificationAttribute) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationAttribute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ClassificationAttribute) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ClassificationAttribute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ClassificationAttribute) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidence sets the confidence property value. The confidence property +func (m *ClassificationAttribute) SetConfidence(value *int32)() { + m.confidence = value +} +// SetCount sets the count property value. The count property +func (m *ClassificationAttribute) SetCount(value *int32)() { + m.count = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ClassificationAttribute) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_attribute_collection_response.go b/src/internal/connector/graph/betasdk/models/classification_attribute_collection_response.go new file mode 100644 index 000000000..c90204aad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_attribute_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationAttributeCollectionResponse +type ClassificationAttributeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ClassificationAttributeable +} +// NewClassificationAttributeCollectionResponse instantiates a new ClassificationAttributeCollectionResponse and sets the default values. +func NewClassificationAttributeCollectionResponse()(*ClassificationAttributeCollectionResponse) { + m := &ClassificationAttributeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateClassificationAttributeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationAttributeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationAttributeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationAttributeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassificationAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassificationAttributeable, len(val)) + for i, v := range val { + res[i] = v.(ClassificationAttributeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ClassificationAttributeCollectionResponse) GetValue()([]ClassificationAttributeable) { + return m.value +} +// Serialize serializes information the current object +func (m *ClassificationAttributeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ClassificationAttributeCollectionResponse) SetValue(value []ClassificationAttributeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_attribute_collection_responseable.go b/src/internal/connector/graph/betasdk/models/classification_attribute_collection_responseable.go new file mode 100644 index 000000000..93aa08513 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_attribute_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationAttributeCollectionResponseable +type ClassificationAttributeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ClassificationAttributeable) + SetValue(value []ClassificationAttributeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_attributeable.go b/src/internal/connector/graph/betasdk/models/classification_attributeable.go new file mode 100644 index 000000000..99246e85b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_attributeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationAttributeable +type ClassificationAttributeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidence()(*int32) + GetCount()(*int32) + GetOdataType()(*string) + SetConfidence(value *int32)() + SetCount(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_error.go b/src/internal/connector/graph/betasdk/models/classification_error.go new file mode 100644 index 000000000..650d77686 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_error.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationError +type ClassificationError struct { + ClassifcationErrorBase + // The details property + details []ClassifcationErrorBaseable +} +// NewClassificationError instantiates a new ClassificationError and sets the default values. +func NewClassificationError()(*ClassificationError) { + m := &ClassificationError{ + ClassifcationErrorBase: *NewClassifcationErrorBase(), + } + return m +} +// CreateClassificationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationError(), nil +} +// GetDetails gets the details property value. The details property +func (m *ClassificationError) GetDetails()([]ClassifcationErrorBaseable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ClassifcationErrorBase.GetFieldDeserializers() + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassifcationErrorBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassifcationErrorBaseable, len(val)) + for i, v := range val { + res[i] = v.(ClassifcationErrorBaseable) + } + m.SetDetails(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ClassificationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ClassifcationErrorBase.Serialize(writer) + if err != nil { + return err + } + if m.GetDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetails())) + for i, v := range m.GetDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("details", cast) + if err != nil { + return err + } + } + return nil +} +// SetDetails sets the details property value. The details property +func (m *ClassificationError) SetDetails(value []ClassifcationErrorBaseable)() { + m.details = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_error_collection_response.go b/src/internal/connector/graph/betasdk/models/classification_error_collection_response.go new file mode 100644 index 000000000..473cda6eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationErrorCollectionResponse +type ClassificationErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ClassificationErrorable +} +// NewClassificationErrorCollectionResponse instantiates a new ClassificationErrorCollectionResponse and sets the default values. +func NewClassificationErrorCollectionResponse()(*ClassificationErrorCollectionResponse) { + m := &ClassificationErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateClassificationErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassificationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassificationErrorable, len(val)) + for i, v := range val { + res[i] = v.(ClassificationErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ClassificationErrorCollectionResponse) GetValue()([]ClassificationErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *ClassificationErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ClassificationErrorCollectionResponse) SetValue(value []ClassificationErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/classification_error_collection_responseable.go new file mode 100644 index 000000000..e5fe2d949 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationErrorCollectionResponseable +type ClassificationErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ClassificationErrorable) + SetValue(value []ClassificationErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_errorable.go b/src/internal/connector/graph/betasdk/models/classification_errorable.go new file mode 100644 index 000000000..d3a4cafb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_errorable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationErrorable +type ClassificationErrorable interface { + ClassifcationErrorBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()([]ClassifcationErrorBaseable) + SetDetails(value []ClassifcationErrorBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_inner_error.go b/src/internal/connector/graph/betasdk/models/classification_inner_error.go new file mode 100644 index 000000000..7318a46da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_inner_error.go @@ -0,0 +1,176 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationInnerError +type ClassificationInnerError struct { + // The activityId property + activityId *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 clientRequestId property + clientRequestId *string + // The code property + code *string + // The errorDateTime property + errorDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewClassificationInnerError instantiates a new classificationInnerError and sets the default values. +func NewClassificationInnerError()(*ClassificationInnerError) { + m := &ClassificationInnerError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateClassificationInnerErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationInnerErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationInnerError(), nil +} +// GetActivityId gets the activityId property value. The activityId property +func (m *ClassificationInnerError) GetActivityId()(*string) { + return m.activityId +} +// 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 *ClassificationInnerError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClientRequestId gets the clientRequestId property value. The clientRequestId property +func (m *ClassificationInnerError) GetClientRequestId()(*string) { + return m.clientRequestId +} +// GetCode gets the code property value. The code property +func (m *ClassificationInnerError) GetCode()(*string) { + return m.code +} +// GetErrorDateTime gets the errorDateTime property value. The errorDateTime property +func (m *ClassificationInnerError) GetErrorDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.errorDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationInnerError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["activityId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityId(val) + } + return nil + } + res["clientRequestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientRequestId(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["errorDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDateTime(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ClassificationInnerError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ClassificationInnerError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("activityId", m.GetActivityId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clientRequestId", m.GetClientRequestId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("errorDateTime", m.GetErrorDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActivityId sets the activityId property value. The activityId property +func (m *ClassificationInnerError) SetActivityId(value *string)() { + m.activityId = value +} +// 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 *ClassificationInnerError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClientRequestId sets the clientRequestId property value. The clientRequestId property +func (m *ClassificationInnerError) SetClientRequestId(value *string)() { + m.clientRequestId = value +} +// SetCode sets the code property value. The code property +func (m *ClassificationInnerError) SetCode(value *string)() { + m.code = value +} +// SetErrorDateTime sets the errorDateTime property value. The errorDateTime property +func (m *ClassificationInnerError) SetErrorDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.errorDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ClassificationInnerError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_inner_errorable.go b/src/internal/connector/graph/betasdk/models/classification_inner_errorable.go new file mode 100644 index 000000000..2acb4afb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_inner_errorable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationInnerErrorable +type ClassificationInnerErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityId()(*string) + GetClientRequestId()(*string) + GetCode()(*string) + GetErrorDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetActivityId(value *string)() + SetClientRequestId(value *string)() + SetCode(value *string)() + SetErrorDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_job_response.go b/src/internal/connector/graph/betasdk/models/classification_job_response.go new file mode 100644 index 000000000..d8b90c6dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_job_response.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationJobResponse +type ClassificationJobResponse struct { + JobResponseBase + // The result property + result DetectedSensitiveContentWrapperable +} +// NewClassificationJobResponse instantiates a new ClassificationJobResponse and sets the default values. +func NewClassificationJobResponse()(*ClassificationJobResponse) { + m := &ClassificationJobResponse{ + JobResponseBase: *NewJobResponseBase(), + } + return m +} +// CreateClassificationJobResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationJobResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationJobResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationJobResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.JobResponseBase.GetFieldDeserializers() + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDetectedSensitiveContentWrapperFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(DetectedSensitiveContentWrapperable)) + } + return nil + } + return res +} +// GetResult gets the result property value. The result property +func (m *ClassificationJobResponse) GetResult()(DetectedSensitiveContentWrapperable) { + return m.result +} +// Serialize serializes information the current object +func (m *ClassificationJobResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.JobResponseBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("result", m.GetResult()) + if err != nil { + return err + } + } + return nil +} +// SetResult sets the result property value. The result property +func (m *ClassificationJobResponse) SetResult(value DetectedSensitiveContentWrapperable)() { + m.result = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_job_response_collection_response.go b/src/internal/connector/graph/betasdk/models/classification_job_response_collection_response.go new file mode 100644 index 000000000..c34af0ad2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_job_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationJobResponseCollectionResponse +type ClassificationJobResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ClassificationJobResponseable +} +// NewClassificationJobResponseCollectionResponse instantiates a new ClassificationJobResponseCollectionResponse and sets the default values. +func NewClassificationJobResponseCollectionResponse()(*ClassificationJobResponseCollectionResponse) { + m := &ClassificationJobResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateClassificationJobResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationJobResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationJobResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationJobResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassificationJobResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassificationJobResponseable, len(val)) + for i, v := range val { + res[i] = v.(ClassificationJobResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ClassificationJobResponseCollectionResponse) GetValue()([]ClassificationJobResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *ClassificationJobResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ClassificationJobResponseCollectionResponse) SetValue(value []ClassificationJobResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_job_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/classification_job_response_collection_responseable.go new file mode 100644 index 000000000..521d0bc28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_job_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationJobResponseCollectionResponseable +type ClassificationJobResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ClassificationJobResponseable) + SetValue(value []ClassificationJobResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_job_responseable.go b/src/internal/connector/graph/betasdk/models/classification_job_responseable.go new file mode 100644 index 000000000..6168767c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_job_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationJobResponseable +type ClassificationJobResponseable interface { + JobResponseBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResult()(DetectedSensitiveContentWrapperable) + SetResult(value DetectedSensitiveContentWrapperable)() +} diff --git a/src/internal/connector/graph/betasdk/models/classification_method.go b/src/internal/connector/graph/betasdk/models/classification_method.go new file mode 100644 index 000000000..43c8b9003 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_method.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ClassificationMethod int + +const ( + PATTERNMATCH_CLASSIFICATIONMETHOD ClassificationMethod = iota + EXACTDATAMATCH_CLASSIFICATIONMETHOD + FINGERPRINT_CLASSIFICATIONMETHOD + MACHINELEARNING_CLASSIFICATIONMETHOD +) + +func (i ClassificationMethod) String() string { + return []string{"patternMatch", "exactDataMatch", "fingerprint", "machineLearning"}[i] +} +func ParseClassificationMethod(v string) (interface{}, error) { + result := PATTERNMATCH_CLASSIFICATIONMETHOD + switch v { + case "patternMatch": + result = PATTERNMATCH_CLASSIFICATIONMETHOD + case "exactDataMatch": + result = EXACTDATAMATCH_CLASSIFICATIONMETHOD + case "fingerprint": + result = FINGERPRINT_CLASSIFICATIONMETHOD + case "machineLearning": + result = MACHINELEARNING_CLASSIFICATIONMETHOD + default: + return 0, errors.New("Unknown ClassificationMethod value: " + v) + } + return &result, nil +} +func SerializeClassificationMethod(values []ClassificationMethod) []string { + 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/classification_result.go b/src/internal/connector/graph/betasdk/models/classification_result.go new file mode 100644 index 000000000..7dca58b53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_result.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationResult +type ClassificationResult 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 confidence level, 0 to 100, of the result. + confidenceLevel *int32 + // The number of instances of the specific information type in the input. + count *int32 + // The OdataType property + odataType *string + // The GUID of the discovered sensitive information type. + sensitiveTypeId *string +} +// NewClassificationResult instantiates a new classificationResult and sets the default values. +func NewClassificationResult()(*ClassificationResult) { + m := &ClassificationResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateClassificationResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClassificationResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClassificationResult(), 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 *ClassificationResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidenceLevel gets the confidenceLevel property value. The confidence level, 0 to 100, of the result. +func (m *ClassificationResult) GetConfidenceLevel()(*int32) { + return m.confidenceLevel +} +// GetCount gets the count property value. The number of instances of the specific information type in the input. +func (m *ClassificationResult) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClassificationResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidenceLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidenceLevel(val) + } + return nil + } + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(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["sensitiveTypeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSensitiveTypeId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ClassificationResult) GetOdataType()(*string) { + return m.odataType +} +// GetSensitiveTypeId gets the sensitiveTypeId property value. The GUID of the discovered sensitive information type. +func (m *ClassificationResult) GetSensitiveTypeId()(*string) { + return m.sensitiveTypeId +} +// Serialize serializes information the current object +func (m *ClassificationResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confidenceLevel", m.GetConfidenceLevel()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sensitiveTypeId", m.GetSensitiveTypeId()) + 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 *ClassificationResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidenceLevel sets the confidenceLevel property value. The confidence level, 0 to 100, of the result. +func (m *ClassificationResult) SetConfidenceLevel(value *int32)() { + m.confidenceLevel = value +} +// SetCount sets the count property value. The number of instances of the specific information type in the input. +func (m *ClassificationResult) SetCount(value *int32)() { + m.count = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ClassificationResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetSensitiveTypeId sets the sensitiveTypeId property value. The GUID of the discovered sensitive information type. +func (m *ClassificationResult) SetSensitiveTypeId(value *string)() { + m.sensitiveTypeId = value +} diff --git a/src/internal/connector/graph/betasdk/models/classification_resultable.go b/src/internal/connector/graph/betasdk/models/classification_resultable.go new file mode 100644 index 000000000..4f18126af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/classification_resultable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClassificationResultable +type ClassificationResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidenceLevel()(*int32) + GetCount()(*int32) + GetOdataType()(*string) + GetSensitiveTypeId()(*string) + SetConfidenceLevel(value *int32)() + SetCount(value *int32)() + SetOdataType(value *string)() + SetSensitiveTypeId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/client_certificate_authentication.go b/src/internal/connector/graph/betasdk/models/client_certificate_authentication.go new file mode 100644 index 000000000..9d8a9ad19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/client_certificate_authentication.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClientCertificateAuthentication +type ClientCertificateAuthentication struct { + ApiAuthenticationConfigurationBase + // The list of certificates uploaded for this API connector. + certificateList []Pkcs12CertificateInformationable +} +// NewClientCertificateAuthentication instantiates a new ClientCertificateAuthentication and sets the default values. +func NewClientCertificateAuthentication()(*ClientCertificateAuthentication) { + m := &ClientCertificateAuthentication{ + ApiAuthenticationConfigurationBase: *NewApiAuthenticationConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.clientCertificateAuthentication"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateClientCertificateAuthenticationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateClientCertificateAuthenticationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewClientCertificateAuthentication(), nil +} +// GetCertificateList gets the certificateList property value. The list of certificates uploaded for this API connector. +func (m *ClientCertificateAuthentication) GetCertificateList()([]Pkcs12CertificateInformationable) { + return m.certificateList +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ClientCertificateAuthentication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ApiAuthenticationConfigurationBase.GetFieldDeserializers() + res["certificateList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePkcs12CertificateInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pkcs12CertificateInformationable, len(val)) + for i, v := range val { + res[i] = v.(Pkcs12CertificateInformationable) + } + m.SetCertificateList(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ClientCertificateAuthentication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ApiAuthenticationConfigurationBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificateList())) + for i, v := range m.GetCertificateList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("certificateList", cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateList sets the certificateList property value. The list of certificates uploaded for this API connector. +func (m *ClientCertificateAuthentication) SetCertificateList(value []Pkcs12CertificateInformationable)() { + m.certificateList = value +} diff --git a/src/internal/connector/graph/betasdk/models/client_certificate_authenticationable.go b/src/internal/connector/graph/betasdk/models/client_certificate_authenticationable.go new file mode 100644 index 000000000..59b14c9dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/client_certificate_authenticationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ClientCertificateAuthenticationable +type ClientCertificateAuthenticationable interface { + ApiAuthenticationConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateList()([]Pkcs12CertificateInformationable) + SetCertificateList(value []Pkcs12CertificateInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/client_credential_type.go b/src/internal/connector/graph/betasdk/models/client_credential_type.go new file mode 100644 index 000000000..36a4e06d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/client_credential_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ClientCredentialType int + +const ( + NONE_CLIENTCREDENTIALTYPE ClientCredentialType = iota + CLIENTSECRET_CLIENTCREDENTIALTYPE + CLIENTASSERTION_CLIENTCREDENTIALTYPE + FEDERATEDIDENTITYCREDENTIAL_CLIENTCREDENTIALTYPE + MANAGEDIDENTITY_CLIENTCREDENTIALTYPE + CERTIFICATE_CLIENTCREDENTIALTYPE + UNKNOWNFUTUREVALUE_CLIENTCREDENTIALTYPE +) + +func (i ClientCredentialType) String() string { + return []string{"none", "clientSecret", "clientAssertion", "federatedIdentityCredential", "managedIdentity", "certificate", "unknownFutureValue"}[i] +} +func ParseClientCredentialType(v string) (interface{}, error) { + result := NONE_CLIENTCREDENTIALTYPE + switch v { + case "none": + result = NONE_CLIENTCREDENTIALTYPE + case "clientSecret": + result = CLIENTSECRET_CLIENTCREDENTIALTYPE + case "clientAssertion": + result = CLIENTASSERTION_CLIENTCREDENTIALTYPE + case "federatedIdentityCredential": + result = FEDERATEDIDENTITYCREDENTIAL_CLIENTCREDENTIALTYPE + case "managedIdentity": + result = MANAGEDIDENTITY_CLIENTCREDENTIALTYPE + case "certificate": + result = CERTIFICATE_CLIENTCREDENTIALTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLIENTCREDENTIALTYPE + default: + return 0, errors.New("Unknown ClientCredentialType value: " + v) + } + return &result, nil +} +func SerializeClientCredentialType(values []ClientCredentialType) []string { + 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/cloud_app_security_profile.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile.go new file mode 100644 index 000000000..10c739323 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile.go @@ -0,0 +1,482 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudAppSecurityProfile struct { + Entity + // The azureSubscriptionId property + azureSubscriptionId *string + // The azureTenantId property + azureTenantId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deploymentPackageUrl property + deploymentPackageUrl *string + // The destinationServiceName property + destinationServiceName *string + // The isSigned property + isSigned *bool + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The manifest property + manifest *string + // The name property + name *string + // The permissionsRequired property + permissionsRequired *ApplicationPermissionsRequired + // The platform property + platform *string + // The policyName property + policyName *string + // The publisher property + publisher *string + // The riskScore property + riskScore *string + // The tags property + tags []string + // The type property + type_escaped *string + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewCloudAppSecurityProfile instantiates a new cloudAppSecurityProfile and sets the default values. +func NewCloudAppSecurityProfile()(*CloudAppSecurityProfile) { + m := &CloudAppSecurityProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudAppSecurityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudAppSecurityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudAppSecurityProfile(), nil +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *CloudAppSecurityProfile) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *CloudAppSecurityProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *CloudAppSecurityProfile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeploymentPackageUrl gets the deploymentPackageUrl property value. The deploymentPackageUrl property +func (m *CloudAppSecurityProfile) GetDeploymentPackageUrl()(*string) { + return m.deploymentPackageUrl +} +// GetDestinationServiceName gets the destinationServiceName property value. The destinationServiceName property +func (m *CloudAppSecurityProfile) GetDestinationServiceName()(*string) { + return m.destinationServiceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudAppSecurityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deploymentPackageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentPackageUrl(val) + } + return nil + } + res["destinationServiceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationServiceName(val) + } + return nil + } + res["isSigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSigned(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["manifest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManifest(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["permissionsRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseApplicationPermissionsRequired) + if err != nil { + return err + } + if val != nil { + m.SetPermissionsRequired(val.(*ApplicationPermissionsRequired)) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["policyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetIsSigned gets the isSigned property value. The isSigned property +func (m *CloudAppSecurityProfile) GetIsSigned()(*bool) { + return m.isSigned +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CloudAppSecurityProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetManifest gets the manifest property value. The manifest property +func (m *CloudAppSecurityProfile) GetManifest()(*string) { + return m.manifest +} +// GetName gets the name property value. The name property +func (m *CloudAppSecurityProfile) GetName()(*string) { + return m.name +} +// GetPermissionsRequired gets the permissionsRequired property value. The permissionsRequired property +func (m *CloudAppSecurityProfile) GetPermissionsRequired()(*ApplicationPermissionsRequired) { + return m.permissionsRequired +} +// GetPlatform gets the platform property value. The platform property +func (m *CloudAppSecurityProfile) GetPlatform()(*string) { + return m.platform +} +// GetPolicyName gets the policyName property value. The policyName property +func (m *CloudAppSecurityProfile) GetPolicyName()(*string) { + return m.policyName +} +// GetPublisher gets the publisher property value. The publisher property +func (m *CloudAppSecurityProfile) GetPublisher()(*string) { + return m.publisher +} +// GetRiskScore gets the riskScore property value. The riskScore property +func (m *CloudAppSecurityProfile) GetRiskScore()(*string) { + return m.riskScore +} +// GetTags gets the tags property value. The tags property +func (m *CloudAppSecurityProfile) GetTags()([]string) { + return m.tags +} +// GetType gets the type property value. The type property +func (m *CloudAppSecurityProfile) GetType()(*string) { + return m.type_escaped +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *CloudAppSecurityProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *CloudAppSecurityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deploymentPackageUrl", m.GetDeploymentPackageUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("destinationServiceName", m.GetDestinationServiceName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSigned", m.GetIsSigned()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manifest", m.GetManifest()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPermissionsRequired() != nil { + cast := (*m.GetPermissionsRequired()).String() + err = writer.WriteStringValue("permissionsRequired", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("platform", m.GetPlatform()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("policyName", m.GetPolicyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *CloudAppSecurityProfile) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *CloudAppSecurityProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *CloudAppSecurityProfile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeploymentPackageUrl sets the deploymentPackageUrl property value. The deploymentPackageUrl property +func (m *CloudAppSecurityProfile) SetDeploymentPackageUrl(value *string)() { + m.deploymentPackageUrl = value +} +// SetDestinationServiceName sets the destinationServiceName property value. The destinationServiceName property +func (m *CloudAppSecurityProfile) SetDestinationServiceName(value *string)() { + m.destinationServiceName = value +} +// SetIsSigned sets the isSigned property value. The isSigned property +func (m *CloudAppSecurityProfile) SetIsSigned(value *bool)() { + m.isSigned = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CloudAppSecurityProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetManifest sets the manifest property value. The manifest property +func (m *CloudAppSecurityProfile) SetManifest(value *string)() { + m.manifest = value +} +// SetName sets the name property value. The name property +func (m *CloudAppSecurityProfile) SetName(value *string)() { + m.name = value +} +// SetPermissionsRequired sets the permissionsRequired property value. The permissionsRequired property +func (m *CloudAppSecurityProfile) SetPermissionsRequired(value *ApplicationPermissionsRequired)() { + m.permissionsRequired = value +} +// SetPlatform sets the platform property value. The platform property +func (m *CloudAppSecurityProfile) SetPlatform(value *string)() { + m.platform = value +} +// SetPolicyName sets the policyName property value. The policyName property +func (m *CloudAppSecurityProfile) SetPolicyName(value *string)() { + m.policyName = value +} +// SetPublisher sets the publisher property value. The publisher property +func (m *CloudAppSecurityProfile) SetPublisher(value *string)() { + m.publisher = value +} +// SetRiskScore sets the riskScore property value. The riskScore property +func (m *CloudAppSecurityProfile) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetTags sets the tags property value. The tags property +func (m *CloudAppSecurityProfile) SetTags(value []string)() { + m.tags = value +} +// SetType sets the type property value. The type property +func (m *CloudAppSecurityProfile) SetType(value *string)() { + m.type_escaped = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *CloudAppSecurityProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_response.go new file mode 100644 index 000000000..96fd43143 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityProfileCollectionResponse +type CloudAppSecurityProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudAppSecurityProfileable +} +// NewCloudAppSecurityProfileCollectionResponse instantiates a new CloudAppSecurityProfileCollectionResponse and sets the default values. +func NewCloudAppSecurityProfileCollectionResponse()(*CloudAppSecurityProfileCollectionResponse) { + m := &CloudAppSecurityProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudAppSecurityProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudAppSecurityProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudAppSecurityProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudAppSecurityProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudAppSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudAppSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(CloudAppSecurityProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudAppSecurityProfileCollectionResponse) GetValue()([]CloudAppSecurityProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudAppSecurityProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudAppSecurityProfileCollectionResponse) SetValue(value []CloudAppSecurityProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_responseable.go new file mode 100644 index 000000000..e7727aa20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityProfileCollectionResponseable +type CloudAppSecurityProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudAppSecurityProfileable) + SetValue(value []CloudAppSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_profileable.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_profileable.go new file mode 100644 index 000000000..8beadc575 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_profileable.go @@ -0,0 +1,46 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityProfileable +type CloudAppSecurityProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeploymentPackageUrl()(*string) + GetDestinationServiceName()(*string) + GetIsSigned()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManifest()(*string) + GetName()(*string) + GetPermissionsRequired()(*ApplicationPermissionsRequired) + GetPlatform()(*string) + GetPolicyName()(*string) + GetPublisher()(*string) + GetRiskScore()(*string) + GetTags()([]string) + GetType()(*string) + GetVendorInformation()(SecurityVendorInformationable) + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeploymentPackageUrl(value *string)() + SetDestinationServiceName(value *string)() + SetIsSigned(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManifest(value *string)() + SetName(value *string)() + SetPermissionsRequired(value *ApplicationPermissionsRequired)() + SetPlatform(value *string)() + SetPolicyName(value *string)() + SetPublisher(value *string)() + SetRiskScore(value *string)() + SetTags(value []string)() + SetType(value *string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control.go new file mode 100644 index 000000000..ca7d71184 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecuritySessionControl +type CloudAppSecuritySessionControl struct { + ConditionalAccessSessionControl + // Possible values are: mcasConfigured, monitorOnly, blockDownloads. To learn more about these values, Deploy Conditional Access App Control for featured apps. + cloudAppSecurityType *CloudAppSecuritySessionControlType +} +// NewCloudAppSecuritySessionControl instantiates a new CloudAppSecuritySessionControl and sets the default values. +func NewCloudAppSecuritySessionControl()(*CloudAppSecuritySessionControl) { + m := &CloudAppSecuritySessionControl{ + ConditionalAccessSessionControl: *NewConditionalAccessSessionControl(), + } + odataTypeValue := "#microsoft.graph.cloudAppSecuritySessionControl"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCloudAppSecuritySessionControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudAppSecuritySessionControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudAppSecuritySessionControl(), nil +} +// GetCloudAppSecurityType gets the cloudAppSecurityType property value. Possible values are: mcasConfigured, monitorOnly, blockDownloads. To learn more about these values, Deploy Conditional Access App Control for featured apps. +func (m *CloudAppSecuritySessionControl) GetCloudAppSecurityType()(*CloudAppSecuritySessionControlType) { + return m.cloudAppSecurityType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudAppSecuritySessionControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConditionalAccessSessionControl.GetFieldDeserializers() + res["cloudAppSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudAppSecuritySessionControlType) + if err != nil { + return err + } + if val != nil { + m.SetCloudAppSecurityType(val.(*CloudAppSecuritySessionControlType)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CloudAppSecuritySessionControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConditionalAccessSessionControl.Serialize(writer) + if err != nil { + return err + } + if m.GetCloudAppSecurityType() != nil { + cast := (*m.GetCloudAppSecurityType()).String() + err = writer.WriteStringValue("cloudAppSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCloudAppSecurityType sets the cloudAppSecurityType property value. Possible values are: mcasConfigured, monitorOnly, blockDownloads. To learn more about these values, Deploy Conditional Access App Control for featured apps. +func (m *CloudAppSecuritySessionControl) SetCloudAppSecurityType(value *CloudAppSecuritySessionControlType)() { + m.cloudAppSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control_type.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control_type.go new file mode 100644 index 000000000..7a0b49555 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_control_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudAppSecuritySessionControlType int + +const ( + MCASCONFIGURED_CLOUDAPPSECURITYSESSIONCONTROLTYPE CloudAppSecuritySessionControlType = iota + MONITORONLY_CLOUDAPPSECURITYSESSIONCONTROLTYPE + BLOCKDOWNLOADS_CLOUDAPPSECURITYSESSIONCONTROLTYPE + UNKNOWNFUTUREVALUE_CLOUDAPPSECURITYSESSIONCONTROLTYPE +) + +func (i CloudAppSecuritySessionControlType) String() string { + return []string{"mcasConfigured", "monitorOnly", "blockDownloads", "unknownFutureValue"}[i] +} +func ParseCloudAppSecuritySessionControlType(v string) (interface{}, error) { + result := MCASCONFIGURED_CLOUDAPPSECURITYSESSIONCONTROLTYPE + switch v { + case "mcasConfigured": + result = MCASCONFIGURED_CLOUDAPPSECURITYSESSIONCONTROLTYPE + case "monitorOnly": + result = MONITORONLY_CLOUDAPPSECURITYSESSIONCONTROLTYPE + case "blockDownloads": + result = BLOCKDOWNLOADS_CLOUDAPPSECURITYSESSIONCONTROLTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDAPPSECURITYSESSIONCONTROLTYPE + default: + return 0, errors.New("Unknown CloudAppSecuritySessionControlType value: " + v) + } + return &result, nil +} +func SerializeCloudAppSecuritySessionControlType(values []CloudAppSecuritySessionControlType) []string { + 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/cloud_app_security_session_controlable.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_controlable.go new file mode 100644 index 000000000..4980a0737 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_session_controlable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecuritySessionControlable +type CloudAppSecuritySessionControlable interface { + ConditionalAccessSessionControlable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudAppSecurityType()(*CloudAppSecuritySessionControlType) + SetCloudAppSecurityType(value *CloudAppSecuritySessionControlType)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_state.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_state.go new file mode 100644 index 000000000..197ebf03a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_state.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityState +type CloudAppSecurityState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Destination IP Address of the connection to the cloud application/service. + destinationServiceIp *string + // Cloud application/service name (for example 'Salesforce', 'DropBox', etc.). + destinationServiceName *string + // The OdataType property + odataType *string + // Provider-generated/calculated risk score of the Cloud Application/Service. Recommended value range of 0-1, which equates to a percentage. + riskScore *string +} +// NewCloudAppSecurityState instantiates a new cloudAppSecurityState and sets the default values. +func NewCloudAppSecurityState()(*CloudAppSecurityState) { + m := &CloudAppSecurityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudAppSecurityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudAppSecurityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudAppSecurityState(), 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 *CloudAppSecurityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDestinationServiceIp gets the destinationServiceIp property value. Destination IP Address of the connection to the cloud application/service. +func (m *CloudAppSecurityState) GetDestinationServiceIp()(*string) { + return m.destinationServiceIp +} +// GetDestinationServiceName gets the destinationServiceName property value. Cloud application/service name (for example 'Salesforce', 'DropBox', etc.). +func (m *CloudAppSecurityState) GetDestinationServiceName()(*string) { + return m.destinationServiceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudAppSecurityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["destinationServiceIp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationServiceIp(val) + } + return nil + } + res["destinationServiceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationServiceName(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["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudAppSecurityState) GetOdataType()(*string) { + return m.odataType +} +// GetRiskScore gets the riskScore property value. Provider-generated/calculated risk score of the Cloud Application/Service. Recommended value range of 0-1, which equates to a percentage. +func (m *CloudAppSecurityState) GetRiskScore()(*string) { + return m.riskScore +} +// Serialize serializes information the current object +func (m *CloudAppSecurityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("destinationServiceIp", m.GetDestinationServiceIp()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationServiceName", m.GetDestinationServiceName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("riskScore", m.GetRiskScore()) + 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 *CloudAppSecurityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDestinationServiceIp sets the destinationServiceIp property value. Destination IP Address of the connection to the cloud application/service. +func (m *CloudAppSecurityState) SetDestinationServiceIp(value *string)() { + m.destinationServiceIp = value +} +// SetDestinationServiceName sets the destinationServiceName property value. Cloud application/service name (for example 'Salesforce', 'DropBox', etc.). +func (m *CloudAppSecurityState) SetDestinationServiceName(value *string)() { + m.destinationServiceName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudAppSecurityState) SetOdataType(value *string)() { + m.odataType = value +} +// SetRiskScore sets the riskScore property value. Provider-generated/calculated risk score of the Cloud Application/Service. Recommended value range of 0-1, which equates to a percentage. +func (m *CloudAppSecurityState) SetRiskScore(value *string)() { + m.riskScore = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_response.go new file mode 100644 index 000000000..f0e0a30b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityStateCollectionResponse +type CloudAppSecurityStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudAppSecurityStateable +} +// NewCloudAppSecurityStateCollectionResponse instantiates a new CloudAppSecurityStateCollectionResponse and sets the default values. +func NewCloudAppSecurityStateCollectionResponse()(*CloudAppSecurityStateCollectionResponse) { + m := &CloudAppSecurityStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudAppSecurityStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudAppSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudAppSecurityStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudAppSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudAppSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudAppSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(CloudAppSecurityStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudAppSecurityStateCollectionResponse) GetValue()([]CloudAppSecurityStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudAppSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudAppSecurityStateCollectionResponse) SetValue(value []CloudAppSecurityStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_responseable.go new file mode 100644 index 000000000..93804fd57 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityStateCollectionResponseable +type CloudAppSecurityStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudAppSecurityStateable) + SetValue(value []CloudAppSecurityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_app_security_stateable.go b/src/internal/connector/graph/betasdk/models/cloud_app_security_stateable.go new file mode 100644 index 000000000..93a2a55b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_app_security_stateable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudAppSecurityStateable +type CloudAppSecurityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDestinationServiceIp()(*string) + GetDestinationServiceName()(*string) + GetOdataType()(*string) + GetRiskScore()(*string) + SetDestinationServiceIp(value *string)() + SetDestinationServiceName(value *string)() + SetOdataType(value *string)() + SetRiskScore(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_communications.go b/src/internal/connector/graph/betasdk/models/cloud_communications.go new file mode 100644 index 000000000..1e51e8f63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_communications.go @@ -0,0 +1,136 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudCommunications +type CloudCommunications struct { + Entity + // The calls property + calls []Callable + // The onlineMeetings property + onlineMeetings []OnlineMeetingable + // The presences property + presences []Presenceable +} +// NewCloudCommunications instantiates a new CloudCommunications and sets the default values. +func NewCloudCommunications()(*CloudCommunications) { + m := &CloudCommunications{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudCommunicationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudCommunicationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudCommunications(), nil +} +// GetCalls gets the calls property value. The calls property +func (m *CloudCommunications) GetCalls()([]Callable) { + return m.calls +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudCommunications) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["calls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Callable, len(val)) + for i, v := range val { + res[i] = v.(Callable) + } + m.SetCalls(res) + } + return nil + } + res["onlineMeetings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnlineMeetingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnlineMeetingable, len(val)) + for i, v := range val { + res[i] = v.(OnlineMeetingable) + } + m.SetOnlineMeetings(res) + } + return nil + } + res["presences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePresenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Presenceable, len(val)) + for i, v := range val { + res[i] = v.(Presenceable) + } + m.SetPresences(res) + } + return nil + } + return res +} +// GetOnlineMeetings gets the onlineMeetings property value. The onlineMeetings property +func (m *CloudCommunications) GetOnlineMeetings()([]OnlineMeetingable) { + return m.onlineMeetings +} +// GetPresences gets the presences property value. The presences property +func (m *CloudCommunications) GetPresences()([]Presenceable) { + return m.presences +} +// Serialize serializes information the current object +func (m *CloudCommunications) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCalls() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalls())) + for i, v := range m.GetCalls() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calls", cast) + if err != nil { + return err + } + } + if m.GetOnlineMeetings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnlineMeetings())) + for i, v := range m.GetOnlineMeetings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onlineMeetings", cast) + if err != nil { + return err + } + } + if m.GetPresences() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPresences())) + for i, v := range m.GetPresences() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("presences", cast) + if err != nil { + return err + } + } + return nil +} +// SetCalls sets the calls property value. The calls property +func (m *CloudCommunications) SetCalls(value []Callable)() { + m.calls = value +} +// SetOnlineMeetings sets the onlineMeetings property value. The onlineMeetings property +func (m *CloudCommunications) SetOnlineMeetings(value []OnlineMeetingable)() { + m.onlineMeetings = value +} +// SetPresences sets the presences property value. The presences property +func (m *CloudCommunications) SetPresences(value []Presenceable)() { + m.presences = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_communicationsable.go b/src/internal/connector/graph/betasdk/models/cloud_communicationsable.go new file mode 100644 index 000000000..af050d041 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_communicationsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudCommunicationsable +type CloudCommunicationsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalls()([]Callable) + GetOnlineMeetings()([]OnlineMeetingable) + GetPresences()([]Presenceable) + SetCalls(value []Callable)() + SetOnlineMeetings(value []OnlineMeetingable)() + SetPresences(value []Presenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c.go b/src/internal/connector/graph/betasdk/models/cloud_p_c.go new file mode 100644 index 000000000..d9620f07b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c.go @@ -0,0 +1,673 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPC provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPC struct { + Entity + // The Azure Active Directory (Azure AD) device ID of the Cloud PC. + aadDeviceId *string + // The connectivity health check result of a Cloud PC, including the updated timestamp and whether the Cloud PC is able to be connected or not. + connectivityResult CloudPcConnectivityResultable + // The diskEncryptionState property + diskEncryptionState *CloudPcDiskEncryptionState + // The display name of the Cloud PC. + displayName *string + // The date and time when the grace period ends and reprovisioning/deprovisioning happens. Required only if the status is inGracePeriod. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + gracePeriodEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the OS image that's on the Cloud PC. + imageDisplayName *string + // The last login result of the Cloud PC. For example, { 'time': '2014-01-01T00:00:00Z'}. + lastLoginResult CloudPcLoginResultable + // The last modified date and time of the Cloud PC. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last remote action result of the enterprise Cloud PCs. The supported remote actions are: Reboot, Rename, Reprovision, Restore, and Troubleshoot. + lastRemoteActionResult CloudPcRemoteActionResultable + // The Intune device ID of the Cloud PC. + managedDeviceId *string + // The Intune device name of the Cloud PC. + managedDeviceName *string + // The Azure network connection that is applied during the provisioning of Cloud PCs. + onPremisesConnectionName *string + // The version of the operating system (OS) to provision on Cloud PCs. Possible values are: windows10, windows11, and unknownFutureValue. + osVersion *CloudPcOperatingSystem + // The results of every partner agent's installation status on Cloud PC. + partnerAgentInstallResults []CloudPcPartnerAgentInstallResultable + // The provisioning policy ID of the Cloud PC. + provisioningPolicyId *string + // The provisioning policy that is applied during the provisioning of Cloud PCs. + provisioningPolicyName *string + // The provisioningType property + provisioningType *CloudPcProvisioningType + // The service plan ID of the Cloud PC. + servicePlanId *string + // The service plan name of the Cloud PC. + servicePlanName *string + // The service plan type of the Cloud PC. + servicePlanType *CloudPcServicePlanType + // The status property + status *CloudPcStatus + // The details of the Cloud PC status. + statusDetails CloudPcStatusDetailsable + // The account type of the user on provisioned Cloud PCs. Possible values are: standardUser, administrator, and unknownFutureValue. + userAccountType *CloudPcUserAccountType + // The user principal name (UPN) of the user assigned to the Cloud PC. + userPrincipalName *string +} +// NewCloudPC instantiates a new cloudPC and sets the default values. +func NewCloudPC()(*CloudPC) { + m := &CloudPC{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPCFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPCFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPC(), nil +} +// GetAadDeviceId gets the aadDeviceId property value. The Azure Active Directory (Azure AD) device ID of the Cloud PC. +func (m *CloudPC) GetAadDeviceId()(*string) { + return m.aadDeviceId +} +// GetConnectivityResult gets the connectivityResult property value. The connectivity health check result of a Cloud PC, including the updated timestamp and whether the Cloud PC is able to be connected or not. +func (m *CloudPC) GetConnectivityResult()(CloudPcConnectivityResultable) { + return m.connectivityResult +} +// GetDiskEncryptionState gets the diskEncryptionState property value. The diskEncryptionState property +func (m *CloudPC) GetDiskEncryptionState()(*CloudPcDiskEncryptionState) { + return m.diskEncryptionState +} +// GetDisplayName gets the displayName property value. The display name of the Cloud PC. +func (m *CloudPC) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPC) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["aadDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAadDeviceId(val) + } + return nil + } + res["connectivityResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcConnectivityResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConnectivityResult(val.(CloudPcConnectivityResultable)) + } + return nil + } + res["diskEncryptionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDiskEncryptionState) + if err != nil { + return err + } + if val != nil { + m.SetDiskEncryptionState(val.(*CloudPcDiskEncryptionState)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["gracePeriodEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodEndDateTime(val) + } + return nil + } + res["imageDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImageDisplayName(val) + } + return nil + } + res["lastLoginResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcLoginResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastLoginResult(val.(CloudPcLoginResultable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lastRemoteActionResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcRemoteActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastRemoteActionResult(val.(CloudPcRemoteActionResultable)) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["onPremisesConnectionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesConnectionName(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOperatingSystem) + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val.(*CloudPcOperatingSystem)) + } + return nil + } + res["partnerAgentInstallResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcPartnerAgentInstallResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcPartnerAgentInstallResultable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcPartnerAgentInstallResultable) + } + m.SetPartnerAgentInstallResults(res) + } + return nil + } + res["provisioningPolicyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningPolicyId(val) + } + return nil + } + res["provisioningPolicyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningPolicyName(val) + } + return nil + } + res["provisioningType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcProvisioningType) + if err != nil { + return err + } + if val != nil { + m.SetProvisioningType(val.(*CloudPcProvisioningType)) + } + return nil + } + res["servicePlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanId(val) + } + return nil + } + res["servicePlanName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanName(val) + } + return nil + } + res["servicePlanType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcServicePlanType) + if err != nil { + return err + } + if val != nil { + m.SetServicePlanType(val.(*CloudPcServicePlanType)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcStatus)) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcStatusDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusDetails(val.(CloudPcStatusDetailsable)) + } + return nil + } + res["userAccountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcUserAccountType) + if err != nil { + return err + } + if val != nil { + m.SetUserAccountType(val.(*CloudPcUserAccountType)) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetGracePeriodEndDateTime gets the gracePeriodEndDateTime property value. The date and time when the grace period ends and reprovisioning/deprovisioning happens. Required only if the status is inGracePeriod. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPC) GetGracePeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.gracePeriodEndDateTime +} +// GetImageDisplayName gets the imageDisplayName property value. Name of the OS image that's on the Cloud PC. +func (m *CloudPC) GetImageDisplayName()(*string) { + return m.imageDisplayName +} +// GetLastLoginResult gets the lastLoginResult property value. The last login result of the Cloud PC. For example, { 'time': '2014-01-01T00:00:00Z'}. +func (m *CloudPC) GetLastLoginResult()(CloudPcLoginResultable) { + return m.lastLoginResult +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last modified date and time of the Cloud PC. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPC) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLastRemoteActionResult gets the lastRemoteActionResult property value. The last remote action result of the enterprise Cloud PCs. The supported remote actions are: Reboot, Rename, Reprovision, Restore, and Troubleshoot. +func (m *CloudPC) GetLastRemoteActionResult()(CloudPcRemoteActionResultable) { + return m.lastRemoteActionResult +} +// GetManagedDeviceId gets the managedDeviceId property value. The Intune device ID of the Cloud PC. +func (m *CloudPC) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagedDeviceName gets the managedDeviceName property value. The Intune device name of the Cloud PC. +func (m *CloudPC) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetOnPremisesConnectionName gets the onPremisesConnectionName property value. The Azure network connection that is applied during the provisioning of Cloud PCs. +func (m *CloudPC) GetOnPremisesConnectionName()(*string) { + return m.onPremisesConnectionName +} +// GetOsVersion gets the osVersion property value. The version of the operating system (OS) to provision on Cloud PCs. Possible values are: windows10, windows11, and unknownFutureValue. +func (m *CloudPC) GetOsVersion()(*CloudPcOperatingSystem) { + return m.osVersion +} +// GetPartnerAgentInstallResults gets the partnerAgentInstallResults property value. The results of every partner agent's installation status on Cloud PC. +func (m *CloudPC) GetPartnerAgentInstallResults()([]CloudPcPartnerAgentInstallResultable) { + return m.partnerAgentInstallResults +} +// GetProvisioningPolicyId gets the provisioningPolicyId property value. The provisioning policy ID of the Cloud PC. +func (m *CloudPC) GetProvisioningPolicyId()(*string) { + return m.provisioningPolicyId +} +// GetProvisioningPolicyName gets the provisioningPolicyName property value. The provisioning policy that is applied during the provisioning of Cloud PCs. +func (m *CloudPC) GetProvisioningPolicyName()(*string) { + return m.provisioningPolicyName +} +// GetProvisioningType gets the provisioningType property value. The provisioningType property +func (m *CloudPC) GetProvisioningType()(*CloudPcProvisioningType) { + return m.provisioningType +} +// GetServicePlanId gets the servicePlanId property value. The service plan ID of the Cloud PC. +func (m *CloudPC) GetServicePlanId()(*string) { + return m.servicePlanId +} +// GetServicePlanName gets the servicePlanName property value. The service plan name of the Cloud PC. +func (m *CloudPC) GetServicePlanName()(*string) { + return m.servicePlanName +} +// GetServicePlanType gets the servicePlanType property value. The service plan type of the Cloud PC. +func (m *CloudPC) GetServicePlanType()(*CloudPcServicePlanType) { + return m.servicePlanType +} +// GetStatus gets the status property value. The status property +func (m *CloudPC) GetStatus()(*CloudPcStatus) { + return m.status +} +// GetStatusDetails gets the statusDetails property value. The details of the Cloud PC status. +func (m *CloudPC) GetStatusDetails()(CloudPcStatusDetailsable) { + return m.statusDetails +} +// GetUserAccountType gets the userAccountType property value. The account type of the user on provisioned Cloud PCs. Possible values are: standardUser, administrator, and unknownFutureValue. +func (m *CloudPC) GetUserAccountType()(*CloudPcUserAccountType) { + return m.userAccountType +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user assigned to the Cloud PC. +func (m *CloudPC) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *CloudPC) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("aadDeviceId", m.GetAadDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("connectivityResult", m.GetConnectivityResult()) + if err != nil { + return err + } + } + if m.GetDiskEncryptionState() != nil { + cast := (*m.GetDiskEncryptionState()).String() + err = writer.WriteStringValue("diskEncryptionState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("gracePeriodEndDateTime", m.GetGracePeriodEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("imageDisplayName", m.GetImageDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastLoginResult", m.GetLastLoginResult()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastRemoteActionResult", m.GetLastRemoteActionResult()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesConnectionName", m.GetOnPremisesConnectionName()) + if err != nil { + return err + } + } + if m.GetOsVersion() != nil { + cast := (*m.GetOsVersion()).String() + err = writer.WriteStringValue("osVersion", &cast) + if err != nil { + return err + } + } + if m.GetPartnerAgentInstallResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPartnerAgentInstallResults())) + for i, v := range m.GetPartnerAgentInstallResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("partnerAgentInstallResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("provisioningPolicyId", m.GetProvisioningPolicyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("provisioningPolicyName", m.GetProvisioningPolicyName()) + if err != nil { + return err + } + } + if m.GetProvisioningType() != nil { + cast := (*m.GetProvisioningType()).String() + err = writer.WriteStringValue("provisioningType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePlanId", m.GetServicePlanId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePlanName", m.GetServicePlanName()) + if err != nil { + return err + } + } + if m.GetServicePlanType() != nil { + cast := (*m.GetServicePlanType()).String() + err = writer.WriteStringValue("servicePlanType", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("statusDetails", m.GetStatusDetails()) + if err != nil { + return err + } + } + if m.GetUserAccountType() != nil { + cast := (*m.GetUserAccountType()).String() + err = writer.WriteStringValue("userAccountType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetAadDeviceId sets the aadDeviceId property value. The Azure Active Directory (Azure AD) device ID of the Cloud PC. +func (m *CloudPC) SetAadDeviceId(value *string)() { + m.aadDeviceId = value +} +// SetConnectivityResult sets the connectivityResult property value. The connectivity health check result of a Cloud PC, including the updated timestamp and whether the Cloud PC is able to be connected or not. +func (m *CloudPC) SetConnectivityResult(value CloudPcConnectivityResultable)() { + m.connectivityResult = value +} +// SetDiskEncryptionState sets the diskEncryptionState property value. The diskEncryptionState property +func (m *CloudPC) SetDiskEncryptionState(value *CloudPcDiskEncryptionState)() { + m.diskEncryptionState = value +} +// SetDisplayName sets the displayName property value. The display name of the Cloud PC. +func (m *CloudPC) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGracePeriodEndDateTime sets the gracePeriodEndDateTime property value. The date and time when the grace period ends and reprovisioning/deprovisioning happens. Required only if the status is inGracePeriod. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPC) SetGracePeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.gracePeriodEndDateTime = value +} +// SetImageDisplayName sets the imageDisplayName property value. Name of the OS image that's on the Cloud PC. +func (m *CloudPC) SetImageDisplayName(value *string)() { + m.imageDisplayName = value +} +// SetLastLoginResult sets the lastLoginResult property value. The last login result of the Cloud PC. For example, { 'time': '2014-01-01T00:00:00Z'}. +func (m *CloudPC) SetLastLoginResult(value CloudPcLoginResultable)() { + m.lastLoginResult = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last modified date and time of the Cloud PC. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPC) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLastRemoteActionResult sets the lastRemoteActionResult property value. The last remote action result of the enterprise Cloud PCs. The supported remote actions are: Reboot, Rename, Reprovision, Restore, and Troubleshoot. +func (m *CloudPC) SetLastRemoteActionResult(value CloudPcRemoteActionResultable)() { + m.lastRemoteActionResult = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The Intune device ID of the Cloud PC. +func (m *CloudPC) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagedDeviceName sets the managedDeviceName property value. The Intune device name of the Cloud PC. +func (m *CloudPC) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetOnPremisesConnectionName sets the onPremisesConnectionName property value. The Azure network connection that is applied during the provisioning of Cloud PCs. +func (m *CloudPC) SetOnPremisesConnectionName(value *string)() { + m.onPremisesConnectionName = value +} +// SetOsVersion sets the osVersion property value. The version of the operating system (OS) to provision on Cloud PCs. Possible values are: windows10, windows11, and unknownFutureValue. +func (m *CloudPC) SetOsVersion(value *CloudPcOperatingSystem)() { + m.osVersion = value +} +// SetPartnerAgentInstallResults sets the partnerAgentInstallResults property value. The results of every partner agent's installation status on Cloud PC. +func (m *CloudPC) SetPartnerAgentInstallResults(value []CloudPcPartnerAgentInstallResultable)() { + m.partnerAgentInstallResults = value +} +// SetProvisioningPolicyId sets the provisioningPolicyId property value. The provisioning policy ID of the Cloud PC. +func (m *CloudPC) SetProvisioningPolicyId(value *string)() { + m.provisioningPolicyId = value +} +// SetProvisioningPolicyName sets the provisioningPolicyName property value. The provisioning policy that is applied during the provisioning of Cloud PCs. +func (m *CloudPC) SetProvisioningPolicyName(value *string)() { + m.provisioningPolicyName = value +} +// SetProvisioningType sets the provisioningType property value. The provisioningType property +func (m *CloudPC) SetProvisioningType(value *CloudPcProvisioningType)() { + m.provisioningType = value +} +// SetServicePlanId sets the servicePlanId property value. The service plan ID of the Cloud PC. +func (m *CloudPC) SetServicePlanId(value *string)() { + m.servicePlanId = value +} +// SetServicePlanName sets the servicePlanName property value. The service plan name of the Cloud PC. +func (m *CloudPC) SetServicePlanName(value *string)() { + m.servicePlanName = value +} +// SetServicePlanType sets the servicePlanType property value. The service plan type of the Cloud PC. +func (m *CloudPC) SetServicePlanType(value *CloudPcServicePlanType)() { + m.servicePlanType = value +} +// SetStatus sets the status property value. The status property +func (m *CloudPC) SetStatus(value *CloudPcStatus)() { + m.status = value +} +// SetStatusDetails sets the statusDetails property value. The details of the Cloud PC status. +func (m *CloudPC) SetStatusDetails(value CloudPcStatusDetailsable)() { + m.statusDetails = value +} +// SetUserAccountType sets the userAccountType property value. The account type of the user on provisioned Cloud PCs. Possible values are: standardUser, administrator, and unknownFutureValue. +func (m *CloudPC) SetUserAccountType(value *CloudPcUserAccountType)() { + m.userAccountType = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the user assigned to the Cloud PC. +func (m *CloudPC) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_response.go new file mode 100644 index 000000000..ac9615f2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCCollectionResponse +type CloudPCCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPCable +} +// NewCloudPCCollectionResponse instantiates a new CloudPCCollectionResponse and sets the default values. +func NewCloudPCCollectionResponse()(*CloudPCCollectionResponse) { + m := &CloudPCCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPCCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPCCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPCCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPCCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPCFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPCable, len(val)) + for i, v := range val { + res[i] = v.(CloudPCable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPCCollectionResponse) GetValue()([]CloudPCable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPCCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPCCollectionResponse) SetValue(value []CloudPCable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_responseable.go new file mode 100644 index 000000000..a56599d05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCCollectionResponseable +type CloudPCCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPCable) + SetValue(value []CloudPCable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue.go new file mode 100644 index 000000000..64acd1d3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCConnectivityIssue the user experience analyte connectivity issue entity. +type CloudPCConnectivityIssue struct { + Entity + // The Intune DeviceId of the device the connection is associated with. + deviceId *string + // The error code of the connectivity issue. + errorCode *string + // The time that the connection initiated. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. + errorDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The detailed description of what went wrong. + errorDescription *string + // The recommended action to fix the corresponding error. + recommendedAction *string + // The unique id of user who initialize the connection. + userId *string +} +// NewCloudPCConnectivityIssue instantiates a new cloudPCConnectivityIssue and sets the default values. +func NewCloudPCConnectivityIssue()(*CloudPCConnectivityIssue) { + m := &CloudPCConnectivityIssue{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPCConnectivityIssueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPCConnectivityIssueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPCConnectivityIssue(), nil +} +// GetDeviceId gets the deviceId property value. The Intune DeviceId of the device the connection is associated with. +func (m *CloudPCConnectivityIssue) GetDeviceId()(*string) { + return m.deviceId +} +// GetErrorCode gets the errorCode property value. The error code of the connectivity issue. +func (m *CloudPCConnectivityIssue) GetErrorCode()(*string) { + return m.errorCode +} +// GetErrorDateTime gets the errorDateTime property value. The time that the connection initiated. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. +func (m *CloudPCConnectivityIssue) GetErrorDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.errorDateTime +} +// GetErrorDescription gets the errorDescription property value. The detailed description of what went wrong. +func (m *CloudPCConnectivityIssue) GetErrorDescription()(*string) { + return m.errorDescription +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPCConnectivityIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDateTime(val) + } + return nil + } + res["errorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDescription(val) + } + return nil + } + res["recommendedAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedAction(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetRecommendedAction gets the recommendedAction property value. The recommended action to fix the corresponding error. +func (m *CloudPCConnectivityIssue) GetRecommendedAction()(*string) { + return m.recommendedAction +} +// GetUserId gets the userId property value. The unique id of user who initialize the connection. +func (m *CloudPCConnectivityIssue) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *CloudPCConnectivityIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("errorDateTime", m.GetErrorDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorDescription", m.GetErrorDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recommendedAction", m.GetRecommendedAction()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceId sets the deviceId property value. The Intune DeviceId of the device the connection is associated with. +func (m *CloudPCConnectivityIssue) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetErrorCode sets the errorCode property value. The error code of the connectivity issue. +func (m *CloudPCConnectivityIssue) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetErrorDateTime sets the errorDateTime property value. The time that the connection initiated. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. +func (m *CloudPCConnectivityIssue) SetErrorDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.errorDateTime = value +} +// SetErrorDescription sets the errorDescription property value. The detailed description of what went wrong. +func (m *CloudPCConnectivityIssue) SetErrorDescription(value *string)() { + m.errorDescription = value +} +// SetRecommendedAction sets the recommendedAction property value. The recommended action to fix the corresponding error. +func (m *CloudPCConnectivityIssue) SetRecommendedAction(value *string)() { + m.recommendedAction = value +} +// SetUserId sets the userId property value. The unique id of user who initialize the connection. +func (m *CloudPCConnectivityIssue) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_response.go new file mode 100644 index 000000000..ccf573cc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCConnectivityIssueCollectionResponse +type CloudPCConnectivityIssueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPCConnectivityIssueable +} +// NewCloudPCConnectivityIssueCollectionResponse instantiates a new CloudPCConnectivityIssueCollectionResponse and sets the default values. +func NewCloudPCConnectivityIssueCollectionResponse()(*CloudPCConnectivityIssueCollectionResponse) { + m := &CloudPCConnectivityIssueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPCConnectivityIssueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPCConnectivityIssueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPCConnectivityIssueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPCConnectivityIssueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPCConnectivityIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPCConnectivityIssueable, len(val)) + for i, v := range val { + res[i] = v.(CloudPCConnectivityIssueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPCConnectivityIssueCollectionResponse) GetValue()([]CloudPCConnectivityIssueable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPCConnectivityIssueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPCConnectivityIssueCollectionResponse) SetValue(value []CloudPCConnectivityIssueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_responseable.go new file mode 100644 index 000000000..bd2703761 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issue_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCConnectivityIssueCollectionResponseable +type CloudPCConnectivityIssueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPCConnectivityIssueable) + SetValue(value []CloudPCConnectivityIssueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issueable.go b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issueable.go new file mode 100644 index 000000000..19adeb764 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_c_connectivity_issueable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCConnectivityIssueable +type CloudPCConnectivityIssueable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceId()(*string) + GetErrorCode()(*string) + GetErrorDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetErrorDescription()(*string) + GetRecommendedAction()(*string) + GetUserId()(*string) + SetDeviceId(value *string)() + SetErrorCode(value *string)() + SetErrorDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetErrorDescription(value *string)() + SetRecommendedAction(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_p_cable.go b/src/internal/connector/graph/betasdk/models/cloud_p_cable.go new file mode 100644 index 000000000..13c939d56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_p_cable.go @@ -0,0 +1,60 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPCable +type CloudPCable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAadDeviceId()(*string) + GetConnectivityResult()(CloudPcConnectivityResultable) + GetDiskEncryptionState()(*CloudPcDiskEncryptionState) + GetDisplayName()(*string) + GetGracePeriodEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetImageDisplayName()(*string) + GetLastLoginResult()(CloudPcLoginResultable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastRemoteActionResult()(CloudPcRemoteActionResultable) + GetManagedDeviceId()(*string) + GetManagedDeviceName()(*string) + GetOnPremisesConnectionName()(*string) + GetOsVersion()(*CloudPcOperatingSystem) + GetPartnerAgentInstallResults()([]CloudPcPartnerAgentInstallResultable) + GetProvisioningPolicyId()(*string) + GetProvisioningPolicyName()(*string) + GetProvisioningType()(*CloudPcProvisioningType) + GetServicePlanId()(*string) + GetServicePlanName()(*string) + GetServicePlanType()(*CloudPcServicePlanType) + GetStatus()(*CloudPcStatus) + GetStatusDetails()(CloudPcStatusDetailsable) + GetUserAccountType()(*CloudPcUserAccountType) + GetUserPrincipalName()(*string) + SetAadDeviceId(value *string)() + SetConnectivityResult(value CloudPcConnectivityResultable)() + SetDiskEncryptionState(value *CloudPcDiskEncryptionState)() + SetDisplayName(value *string)() + SetGracePeriodEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetImageDisplayName(value *string)() + SetLastLoginResult(value CloudPcLoginResultable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastRemoteActionResult(value CloudPcRemoteActionResultable)() + SetManagedDeviceId(value *string)() + SetManagedDeviceName(value *string)() + SetOnPremisesConnectionName(value *string)() + SetOsVersion(value *CloudPcOperatingSystem)() + SetPartnerAgentInstallResults(value []CloudPcPartnerAgentInstallResultable)() + SetProvisioningPolicyId(value *string)() + SetProvisioningPolicyName(value *string)() + SetProvisioningType(value *CloudPcProvisioningType)() + SetServicePlanId(value *string)() + SetServicePlanName(value *string)() + SetServicePlanType(value *CloudPcServicePlanType)() + SetStatus(value *CloudPcStatus)() + SetStatusDetails(value CloudPcStatusDetailsable)() + SetUserAccountType(value *CloudPcUserAccountType)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_activity_operation_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_activity_operation_type.go new file mode 100644 index 000000000..582813080 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_activity_operation_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcAuditActivityOperationType int + +const ( + CREATE_CLOUDPCAUDITACTIVITYOPERATIONTYPE CloudPcAuditActivityOperationType = iota + DELETE_CLOUDPCAUDITACTIVITYOPERATIONTYPE + PATCH_CLOUDPCAUDITACTIVITYOPERATIONTYPE + OTHER_CLOUDPCAUDITACTIVITYOPERATIONTYPE +) + +func (i CloudPcAuditActivityOperationType) String() string { + return []string{"create", "delete", "patch", "other"}[i] +} +func ParseCloudPcAuditActivityOperationType(v string) (interface{}, error) { + result := CREATE_CLOUDPCAUDITACTIVITYOPERATIONTYPE + switch v { + case "create": + result = CREATE_CLOUDPCAUDITACTIVITYOPERATIONTYPE + case "delete": + result = DELETE_CLOUDPCAUDITACTIVITYOPERATIONTYPE + case "patch": + result = PATCH_CLOUDPCAUDITACTIVITYOPERATIONTYPE + case "other": + result = OTHER_CLOUDPCAUDITACTIVITYOPERATIONTYPE + default: + return 0, errors.New("Unknown CloudPcAuditActivityOperationType value: " + v) + } + return &result, nil +} +func SerializeCloudPcAuditActivityOperationType(values []CloudPcAuditActivityOperationType) []string { + 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/cloud_pc_audit_activity_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_activity_result.go new file mode 100644 index 000000000..ecb0912d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_activity_result.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcAuditActivityResult int + +const ( + SUCCESS_CLOUDPCAUDITACTIVITYRESULT CloudPcAuditActivityResult = iota + CLIENTERROR_CLOUDPCAUDITACTIVITYRESULT + FAILURE_CLOUDPCAUDITACTIVITYRESULT + TIMEOUT_CLOUDPCAUDITACTIVITYRESULT + OTHER_CLOUDPCAUDITACTIVITYRESULT +) + +func (i CloudPcAuditActivityResult) String() string { + return []string{"success", "clientError", "failure", "timeout", "other"}[i] +} +func ParseCloudPcAuditActivityResult(v string) (interface{}, error) { + result := SUCCESS_CLOUDPCAUDITACTIVITYRESULT + switch v { + case "success": + result = SUCCESS_CLOUDPCAUDITACTIVITYRESULT + case "clientError": + result = CLIENTERROR_CLOUDPCAUDITACTIVITYRESULT + case "failure": + result = FAILURE_CLOUDPCAUDITACTIVITYRESULT + case "timeout": + result = TIMEOUT_CLOUDPCAUDITACTIVITYRESULT + case "other": + result = OTHER_CLOUDPCAUDITACTIVITYRESULT + default: + return 0, errors.New("Unknown CloudPcAuditActivityResult value: " + v) + } + return &result, nil +} +func SerializeCloudPcAuditActivityResult(values []CloudPcAuditActivityResult) []string { + 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/cloud_pc_audit_actor.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actor.go new file mode 100644 index 000000000..3366bf0b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actor.go @@ -0,0 +1,370 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditActor +type CloudPcAuditActor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the application. + applicationDisplayName *string + // Azure AD application ID. + applicationId *string + // IP address. + ipAddress *string + // The OdataType property + odataType *string + // The delegated partner tenant ID. + remoteTenantId *string + // The delegated partner user ID. + remoteUserId *string + // Service Principal Name (SPN). + servicePrincipalName *string + // The type property + type_escaped *CloudPcAuditActorType + // Azure AD user ID. + userId *string + // List of user permissions and application permissions when the audit event was performed. + userPermissions []string + // User Principal Name (UPN). + userPrincipalName *string + // List of role scope tags. + userRoleScopeTags []CloudPcUserRoleScopeTagInfoable +} +// NewCloudPcAuditActor instantiates a new cloudPcAuditActor and sets the default values. +func NewCloudPcAuditActor()(*CloudPcAuditActor) { + m := &CloudPcAuditActor{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcAuditActorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditActorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditActor(), 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 *CloudPcAuditActor) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationDisplayName gets the applicationDisplayName property value. Name of the application. +func (m *CloudPcAuditActor) GetApplicationDisplayName()(*string) { + return m.applicationDisplayName +} +// GetApplicationId gets the applicationId property value. Azure AD application ID. +func (m *CloudPcAuditActor) GetApplicationId()(*string) { + return m.applicationId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditActor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationDisplayName(val) + } + return nil + } + res["applicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationId(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(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["remoteTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteTenantId(val) + } + return nil + } + res["remoteUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteUserId(val) + } + return nil + } + res["servicePrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcAuditActorType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CloudPcAuditActorType)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUserPermissions(res) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["userRoleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcUserRoleScopeTagInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcUserRoleScopeTagInfoable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcUserRoleScopeTagInfoable) + } + m.SetUserRoleScopeTags(res) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. IP address. +func (m *CloudPcAuditActor) GetIpAddress()(*string) { + return m.ipAddress +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcAuditActor) GetOdataType()(*string) { + return m.odataType +} +// GetRemoteTenantId gets the remoteTenantId property value. The delegated partner tenant ID. +func (m *CloudPcAuditActor) GetRemoteTenantId()(*string) { + return m.remoteTenantId +} +// GetRemoteUserId gets the remoteUserId property value. The delegated partner user ID. +func (m *CloudPcAuditActor) GetRemoteUserId()(*string) { + return m.remoteUserId +} +// GetServicePrincipalName gets the servicePrincipalName property value. Service Principal Name (SPN). +func (m *CloudPcAuditActor) GetServicePrincipalName()(*string) { + return m.servicePrincipalName +} +// GetType gets the type property value. The type property +func (m *CloudPcAuditActor) GetType()(*CloudPcAuditActorType) { + return m.type_escaped +} +// GetUserId gets the userId property value. Azure AD user ID. +func (m *CloudPcAuditActor) GetUserId()(*string) { + return m.userId +} +// GetUserPermissions gets the userPermissions property value. List of user permissions and application permissions when the audit event was performed. +func (m *CloudPcAuditActor) GetUserPermissions()([]string) { + return m.userPermissions +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name (UPN). +func (m *CloudPcAuditActor) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUserRoleScopeTags gets the userRoleScopeTags property value. List of role scope tags. +func (m *CloudPcAuditActor) GetUserRoleScopeTags()([]CloudPcUserRoleScopeTagInfoable) { + return m.userRoleScopeTags +} +// Serialize serializes information the current object +func (m *CloudPcAuditActor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationDisplayName", m.GetApplicationDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("applicationId", m.GetApplicationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remoteTenantId", m.GetRemoteTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remoteUserId", m.GetRemoteUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePrincipalName", m.GetServicePrincipalName()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + if m.GetUserPermissions() != nil { + err := writer.WriteCollectionOfStringValues("userPermissions", m.GetUserPermissions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + if m.GetUserRoleScopeTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRoleScopeTags())) + for i, v := range m.GetUserRoleScopeTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("userRoleScopeTags", 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 *CloudPcAuditActor) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationDisplayName sets the applicationDisplayName property value. Name of the application. +func (m *CloudPcAuditActor) SetApplicationDisplayName(value *string)() { + m.applicationDisplayName = value +} +// SetApplicationId sets the applicationId property value. Azure AD application ID. +func (m *CloudPcAuditActor) SetApplicationId(value *string)() { + m.applicationId = value +} +// SetIpAddress sets the ipAddress property value. IP address. +func (m *CloudPcAuditActor) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcAuditActor) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemoteTenantId sets the remoteTenantId property value. The delegated partner tenant ID. +func (m *CloudPcAuditActor) SetRemoteTenantId(value *string)() { + m.remoteTenantId = value +} +// SetRemoteUserId sets the remoteUserId property value. The delegated partner user ID. +func (m *CloudPcAuditActor) SetRemoteUserId(value *string)() { + m.remoteUserId = value +} +// SetServicePrincipalName sets the servicePrincipalName property value. Service Principal Name (SPN). +func (m *CloudPcAuditActor) SetServicePrincipalName(value *string)() { + m.servicePrincipalName = value +} +// SetType sets the type property value. The type property +func (m *CloudPcAuditActor) SetType(value *CloudPcAuditActorType)() { + m.type_escaped = value +} +// SetUserId sets the userId property value. Azure AD user ID. +func (m *CloudPcAuditActor) SetUserId(value *string)() { + m.userId = value +} +// SetUserPermissions sets the userPermissions property value. List of user permissions and application permissions when the audit event was performed. +func (m *CloudPcAuditActor) SetUserPermissions(value []string)() { + m.userPermissions = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name (UPN). +func (m *CloudPcAuditActor) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUserRoleScopeTags sets the userRoleScopeTags property value. List of role scope tags. +func (m *CloudPcAuditActor) SetUserRoleScopeTags(value []CloudPcUserRoleScopeTagInfoable)() { + m.userRoleScopeTags = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actor_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actor_type.go new file mode 100644 index 000000000..579866d35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actor_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcAuditActorType int + +const ( + ITPRO_CLOUDPCAUDITACTORTYPE CloudPcAuditActorType = iota + APPLICATION_CLOUDPCAUDITACTORTYPE + PARTNER_CLOUDPCAUDITACTORTYPE + UNKNOWN_CLOUDPCAUDITACTORTYPE +) + +func (i CloudPcAuditActorType) String() string { + return []string{"itPro", "application", "partner", "unknown"}[i] +} +func ParseCloudPcAuditActorType(v string) (interface{}, error) { + result := ITPRO_CLOUDPCAUDITACTORTYPE + switch v { + case "itPro": + result = ITPRO_CLOUDPCAUDITACTORTYPE + case "application": + result = APPLICATION_CLOUDPCAUDITACTORTYPE + case "partner": + result = PARTNER_CLOUDPCAUDITACTORTYPE + case "unknown": + result = UNKNOWN_CLOUDPCAUDITACTORTYPE + default: + return 0, errors.New("Unknown CloudPcAuditActorType value: " + v) + } + return &result, nil +} +func SerializeCloudPcAuditActorType(values []CloudPcAuditActorType) []string { + 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/cloud_pc_audit_actorable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actorable.go new file mode 100644 index 000000000..3df5f4a59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_actorable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditActorable +type CloudPcAuditActorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationDisplayName()(*string) + GetApplicationId()(*string) + GetIpAddress()(*string) + GetOdataType()(*string) + GetRemoteTenantId()(*string) + GetRemoteUserId()(*string) + GetServicePrincipalName()(*string) + GetType()(*CloudPcAuditActorType) + GetUserId()(*string) + GetUserPermissions()([]string) + GetUserPrincipalName()(*string) + GetUserRoleScopeTags()([]CloudPcUserRoleScopeTagInfoable) + SetApplicationDisplayName(value *string)() + SetApplicationId(value *string)() + SetIpAddress(value *string)() + SetOdataType(value *string)() + SetRemoteTenantId(value *string)() + SetRemoteUserId(value *string)() + SetServicePrincipalName(value *string)() + SetType(value *CloudPcAuditActorType)() + SetUserId(value *string)() + SetUserPermissions(value []string)() + SetUserPrincipalName(value *string)() + SetUserRoleScopeTags(value []CloudPcUserRoleScopeTagInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_category.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_category.go new file mode 100644 index 000000000..7bc7670ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_category.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcAuditCategory int + +const ( + CLOUDPC_CLOUDPCAUDITCATEGORY CloudPcAuditCategory = iota + OTHER_CLOUDPCAUDITCATEGORY +) + +func (i CloudPcAuditCategory) String() string { + return []string{"cloudPC", "other"}[i] +} +func ParseCloudPcAuditCategory(v string) (interface{}, error) { + result := CLOUDPC_CLOUDPCAUDITCATEGORY + switch v { + case "cloudPC": + result = CLOUDPC_CLOUDPCAUDITCATEGORY + case "other": + result = OTHER_CLOUDPCAUDITCATEGORY + default: + return 0, errors.New("Unknown CloudPcAuditCategory value: " + v) + } + return &result, nil +} +func SerializeCloudPcAuditCategory(values []CloudPcAuditCategory) []string { + 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/cloud_pc_audit_event.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event.go new file mode 100644 index 000000000..8cb77869e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event.go @@ -0,0 +1,332 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditEvent +type CloudPcAuditEvent struct { + Entity + // Friendly name of the activity. Optional. + activity *string + // The date time in UTC when the activity was performed. Read-only. + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The activityOperationType property + activityOperationType *CloudPcAuditActivityOperationType + // The activityResult property + activityResult *CloudPcAuditActivityResult + // The type of activity that was performed. Read-only. + activityType *string + // The actor property + actor CloudPcAuditActorable + // The category property + category *CloudPcAuditCategory + // Component name. Read-only. + componentName *string + // The client request identifier, used to correlate activity within the system. Read-only. + correlationId *string + // Event display name. Read-only. + displayName *string + // List of cloudPcAuditResource objects. Read-only. + resources []CloudPcAuditResourceable +} +// NewCloudPcAuditEvent instantiates a new CloudPcAuditEvent and sets the default values. +func NewCloudPcAuditEvent()(*CloudPcAuditEvent) { + m := &CloudPcAuditEvent{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcAuditEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditEvent(), nil +} +// GetActivity gets the activity property value. Friendly name of the activity. Optional. +func (m *CloudPcAuditEvent) GetActivity()(*string) { + return m.activity +} +// GetActivityDateTime gets the activityDateTime property value. The date time in UTC when the activity was performed. Read-only. +func (m *CloudPcAuditEvent) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetActivityOperationType gets the activityOperationType property value. The activityOperationType property +func (m *CloudPcAuditEvent) GetActivityOperationType()(*CloudPcAuditActivityOperationType) { + return m.activityOperationType +} +// GetActivityResult gets the activityResult property value. The activityResult property +func (m *CloudPcAuditEvent) GetActivityResult()(*CloudPcAuditActivityResult) { + return m.activityResult +} +// GetActivityType gets the activityType property value. The type of activity that was performed. Read-only. +func (m *CloudPcAuditEvent) GetActivityType()(*string) { + return m.activityType +} +// GetActor gets the actor property value. The actor property +func (m *CloudPcAuditEvent) GetActor()(CloudPcAuditActorable) { + return m.actor +} +// GetCategory gets the category property value. The category property +func (m *CloudPcAuditEvent) GetCategory()(*CloudPcAuditCategory) { + return m.category +} +// GetComponentName gets the componentName property value. Component name. Read-only. +func (m *CloudPcAuditEvent) GetComponentName()(*string) { + return m.componentName +} +// GetCorrelationId gets the correlationId property value. The client request identifier, used to correlate activity within the system. Read-only. +func (m *CloudPcAuditEvent) GetCorrelationId()(*string) { + return m.correlationId +} +// GetDisplayName gets the displayName property value. Event display name. Read-only. +func (m *CloudPcAuditEvent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivity(val) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["activityOperationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcAuditActivityOperationType) + if err != nil { + return err + } + if val != nil { + m.SetActivityOperationType(val.(*CloudPcAuditActivityOperationType)) + } + return nil + } + res["activityResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcAuditActivityResult) + if err != nil { + return err + } + if val != nil { + m.SetActivityResult(val.(*CloudPcAuditActivityResult)) + } + return nil + } + res["activityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityType(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcAuditActorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(CloudPcAuditActorable)) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcAuditCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*CloudPcAuditCategory)) + } + return nil + } + res["componentName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComponentName(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcAuditResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcAuditResourceable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcAuditResourceable) + } + m.SetResources(res) + } + return nil + } + return res +} +// GetResources gets the resources property value. List of cloudPcAuditResource objects. Read-only. +func (m *CloudPcAuditEvent) GetResources()([]CloudPcAuditResourceable) { + return m.resources +} +// Serialize serializes information the current object +func (m *CloudPcAuditEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + if m.GetActivityOperationType() != nil { + cast := (*m.GetActivityOperationType()).String() + err = writer.WriteStringValue("activityOperationType", &cast) + if err != nil { + return err + } + } + if m.GetActivityResult() != nil { + cast := (*m.GetActivityResult()).String() + err = writer.WriteStringValue("activityResult", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityType", m.GetActivityType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("componentName", m.GetComponentName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. Friendly name of the activity. Optional. +func (m *CloudPcAuditEvent) SetActivity(value *string)() { + m.activity = value +} +// SetActivityDateTime sets the activityDateTime property value. The date time in UTC when the activity was performed. Read-only. +func (m *CloudPcAuditEvent) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetActivityOperationType sets the activityOperationType property value. The activityOperationType property +func (m *CloudPcAuditEvent) SetActivityOperationType(value *CloudPcAuditActivityOperationType)() { + m.activityOperationType = value +} +// SetActivityResult sets the activityResult property value. The activityResult property +func (m *CloudPcAuditEvent) SetActivityResult(value *CloudPcAuditActivityResult)() { + m.activityResult = value +} +// SetActivityType sets the activityType property value. The type of activity that was performed. Read-only. +func (m *CloudPcAuditEvent) SetActivityType(value *string)() { + m.activityType = value +} +// SetActor sets the actor property value. The actor property +func (m *CloudPcAuditEvent) SetActor(value CloudPcAuditActorable)() { + m.actor = value +} +// SetCategory sets the category property value. The category property +func (m *CloudPcAuditEvent) SetCategory(value *CloudPcAuditCategory)() { + m.category = value +} +// SetComponentName sets the componentName property value. Component name. Read-only. +func (m *CloudPcAuditEvent) SetComponentName(value *string)() { + m.componentName = value +} +// SetCorrelationId sets the correlationId property value. The client request identifier, used to correlate activity within the system. Read-only. +func (m *CloudPcAuditEvent) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetDisplayName sets the displayName property value. Event display name. Read-only. +func (m *CloudPcAuditEvent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetResources sets the resources property value. List of cloudPcAuditResource objects. Read-only. +func (m *CloudPcAuditEvent) SetResources(value []CloudPcAuditResourceable)() { + m.resources = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_response.go new file mode 100644 index 000000000..636aba022 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditEventCollectionResponse +type CloudPcAuditEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcAuditEventable +} +// NewCloudPcAuditEventCollectionResponse instantiates a new CloudPcAuditEventCollectionResponse and sets the default values. +func NewCloudPcAuditEventCollectionResponse()(*CloudPcAuditEventCollectionResponse) { + m := &CloudPcAuditEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcAuditEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcAuditEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcAuditEventable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcAuditEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcAuditEventCollectionResponse) GetValue()([]CloudPcAuditEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcAuditEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcAuditEventCollectionResponse) SetValue(value []CloudPcAuditEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_responseable.go new file mode 100644 index 000000000..3a543a96b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditEventCollectionResponseable +type CloudPcAuditEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcAuditEventable) + SetValue(value []CloudPcAuditEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_eventable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_eventable.go new file mode 100644 index 000000000..607d86157 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_eventable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditEventable +type CloudPcAuditEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*string) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetActivityOperationType()(*CloudPcAuditActivityOperationType) + GetActivityResult()(*CloudPcAuditActivityResult) + GetActivityType()(*string) + GetActor()(CloudPcAuditActorable) + GetCategory()(*CloudPcAuditCategory) + GetComponentName()(*string) + GetCorrelationId()(*string) + GetDisplayName()(*string) + GetResources()([]CloudPcAuditResourceable) + SetActivity(value *string)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetActivityOperationType(value *CloudPcAuditActivityOperationType)() + SetActivityResult(value *CloudPcAuditActivityResult)() + SetActivityType(value *string)() + SetActor(value CloudPcAuditActorable)() + SetCategory(value *CloudPcAuditCategory)() + SetComponentName(value *string)() + SetCorrelationId(value *string)() + SetDisplayName(value *string)() + SetResources(value []CloudPcAuditResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property.go new file mode 100644 index 000000000..04fab13a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditProperty +type CloudPcAuditProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name. + displayName *string + // New value. + newValue *string + // The OdataType property + odataType *string + // Old value. + oldValue *string +} +// NewCloudPcAuditProperty instantiates a new cloudPcAuditProperty and sets the default values. +func NewCloudPcAuditProperty()(*CloudPcAuditProperty) { + m := &CloudPcAuditProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcAuditPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditProperty(), 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 *CloudPcAuditProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name. +func (m *CloudPcAuditProperty) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["newValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewValue(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["oldValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldValue(val) + } + return nil + } + return res +} +// GetNewValue gets the newValue property value. New value. +func (m *CloudPcAuditProperty) GetNewValue()(*string) { + return m.newValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcAuditProperty) GetOdataType()(*string) { + return m.odataType +} +// GetOldValue gets the oldValue property value. Old value. +func (m *CloudPcAuditProperty) GetOldValue()(*string) { + return m.oldValue +} +// Serialize serializes information the current object +func (m *CloudPcAuditProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("newValue", m.GetNewValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldValue", m.GetOldValue()) + 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 *CloudPcAuditProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name. +func (m *CloudPcAuditProperty) SetDisplayName(value *string)() { + m.displayName = value +} +// SetNewValue sets the newValue property value. New value. +func (m *CloudPcAuditProperty) SetNewValue(value *string)() { + m.newValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcAuditProperty) SetOdataType(value *string)() { + m.odataType = value +} +// SetOldValue sets the oldValue property value. Old value. +func (m *CloudPcAuditProperty) SetOldValue(value *string)() { + m.oldValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_response.go new file mode 100644 index 000000000..b458e436e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditPropertyCollectionResponse +type CloudPcAuditPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcAuditPropertyable +} +// NewCloudPcAuditPropertyCollectionResponse instantiates a new CloudPcAuditPropertyCollectionResponse and sets the default values. +func NewCloudPcAuditPropertyCollectionResponse()(*CloudPcAuditPropertyCollectionResponse) { + m := &CloudPcAuditPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcAuditPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcAuditPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcAuditPropertyable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcAuditPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcAuditPropertyCollectionResponse) GetValue()([]CloudPcAuditPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcAuditPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcAuditPropertyCollectionResponse) SetValue(value []CloudPcAuditPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_responseable.go new file mode 100644 index 000000000..fb378990c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditPropertyCollectionResponseable +type CloudPcAuditPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcAuditPropertyable) + SetValue(value []CloudPcAuditPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_propertyable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_propertyable.go new file mode 100644 index 000000000..bec63d35c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_propertyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditPropertyable +type CloudPcAuditPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetNewValue()(*string) + GetOdataType()(*string) + GetOldValue()(*string) + SetDisplayName(value *string)() + SetNewValue(value *string)() + SetOdataType(value *string)() + SetOldValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource.go new file mode 100644 index 000000000..f8b4d11a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource.go @@ -0,0 +1,183 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditResource +type CloudPcAuditResource 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 resource entity display name. + displayName *string + // A list of modified properties. + modifiedProperties []CloudPcAuditPropertyable + // The OdataType property + odataType *string + // The ID of the audit resource. + resourceId *string + // The type of the audit resource. + type_escaped *string +} +// NewCloudPcAuditResource instantiates a new cloudPcAuditResource and sets the default values. +func NewCloudPcAuditResource()(*CloudPcAuditResource) { + m := &CloudPcAuditResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcAuditResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditResource(), 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 *CloudPcAuditResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The resource entity display name. +func (m *CloudPcAuditResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["modifiedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcAuditPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcAuditPropertyable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcAuditPropertyable) + } + m.SetModifiedProperties(res) + } + 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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetModifiedProperties gets the modifiedProperties property value. A list of modified properties. +func (m *CloudPcAuditResource) GetModifiedProperties()([]CloudPcAuditPropertyable) { + return m.modifiedProperties +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcAuditResource) GetOdataType()(*string) { + return m.odataType +} +// GetResourceId gets the resourceId property value. The ID of the audit resource. +func (m *CloudPcAuditResource) GetResourceId()(*string) { + return m.resourceId +} +// GetType gets the type property value. The type of the audit resource. +func (m *CloudPcAuditResource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *CloudPcAuditResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetModifiedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModifiedProperties())) + for i, v := range m.GetModifiedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("modifiedProperties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *CloudPcAuditResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The resource entity display name. +func (m *CloudPcAuditResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModifiedProperties sets the modifiedProperties property value. A list of modified properties. +func (m *CloudPcAuditResource) SetModifiedProperties(value []CloudPcAuditPropertyable)() { + m.modifiedProperties = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcAuditResource) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceId sets the resourceId property value. The ID of the audit resource. +func (m *CloudPcAuditResource) SetResourceId(value *string)() { + m.resourceId = value +} +// SetType sets the type property value. The type of the audit resource. +func (m *CloudPcAuditResource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_response.go new file mode 100644 index 000000000..5e216d9e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditResourceCollectionResponse +type CloudPcAuditResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcAuditResourceable +} +// NewCloudPcAuditResourceCollectionResponse instantiates a new CloudPcAuditResourceCollectionResponse and sets the default values. +func NewCloudPcAuditResourceCollectionResponse()(*CloudPcAuditResourceCollectionResponse) { + m := &CloudPcAuditResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcAuditResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcAuditResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcAuditResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcAuditResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcAuditResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcAuditResourceable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcAuditResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcAuditResourceCollectionResponse) GetValue()([]CloudPcAuditResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcAuditResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcAuditResourceCollectionResponse) SetValue(value []CloudPcAuditResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_responseable.go new file mode 100644 index 000000000..fd7c52da1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditResourceCollectionResponseable +type CloudPcAuditResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcAuditResourceable) + SetValue(value []CloudPcAuditResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resourceable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resourceable.go new file mode 100644 index 000000000..2cc182caa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_audit_resourceable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcAuditResourceable +type CloudPcAuditResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetModifiedProperties()([]CloudPcAuditPropertyable) + GetOdataType()(*string) + GetResourceId()(*string) + GetType()(*string) + SetDisplayName(value *string)() + SetModifiedProperties(value []CloudPcAuditPropertyable)() + SetOdataType(value *string)() + SetResourceId(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_event_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_event_result.go new file mode 100644 index 000000000..b3492e17f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_event_result.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcConnectivityEventResult int + +const ( + UNKNOWN_CLOUDPCCONNECTIVITYEVENTRESULT CloudPcConnectivityEventResult = iota + SUCCESS_CLOUDPCCONNECTIVITYEVENTRESULT + FAILURE_CLOUDPCCONNECTIVITYEVENTRESULT + UNKNOWNFUTUREVALUE_CLOUDPCCONNECTIVITYEVENTRESULT +) + +func (i CloudPcConnectivityEventResult) String() string { + return []string{"unknown", "success", "failure", "unknownFutureValue"}[i] +} +func ParseCloudPcConnectivityEventResult(v string) (interface{}, error) { + result := UNKNOWN_CLOUDPCCONNECTIVITYEVENTRESULT + switch v { + case "unknown": + result = UNKNOWN_CLOUDPCCONNECTIVITYEVENTRESULT + case "success": + result = SUCCESS_CLOUDPCCONNECTIVITYEVENTRESULT + case "failure": + result = FAILURE_CLOUDPCCONNECTIVITYEVENTRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCCONNECTIVITYEVENTRESULT + default: + return 0, errors.New("Unknown CloudPcConnectivityEventResult value: " + v) + } + return &result, nil +} +func SerializeCloudPcConnectivityEventResult(values []CloudPcConnectivityEventResult) []string { + 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/cloud_pc_connectivity_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_result.go new file mode 100644 index 000000000..5ff584ae0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_result.go @@ -0,0 +1,159 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcConnectivityResult +type CloudPcConnectivityResult struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A list of failed health check items. If the status property is available, this property will be empty. + failedHealthCheckItems []CloudPcHealthCheckItemable + // The OdataType property + odataType *string + // The status property + status *CloudPcConnectivityStatus + // Datetime when the status was updated. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. + updatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCloudPcConnectivityResult instantiates a new cloudPcConnectivityResult and sets the default values. +func NewCloudPcConnectivityResult()(*CloudPcConnectivityResult) { + m := &CloudPcConnectivityResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcConnectivityResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcConnectivityResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcConnectivityResult(), 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 *CloudPcConnectivityResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFailedHealthCheckItems gets the failedHealthCheckItems property value. A list of failed health check items. If the status property is available, this property will be empty. +func (m *CloudPcConnectivityResult) GetFailedHealthCheckItems()([]CloudPcHealthCheckItemable) { + return m.failedHealthCheckItems +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcConnectivityResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["failedHealthCheckItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcHealthCheckItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcHealthCheckItemable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcHealthCheckItemable) + } + m.SetFailedHealthCheckItems(res) + } + 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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcConnectivityStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcConnectivityStatus)) + } + return nil + } + res["updatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedDateTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcConnectivityResult) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status property +func (m *CloudPcConnectivityResult) GetStatus()(*CloudPcConnectivityStatus) { + return m.status +} +// GetUpdatedDateTime gets the updatedDateTime property value. Datetime when the status was updated. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. +func (m *CloudPcConnectivityResult) GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedDateTime +} +// Serialize serializes information the current object +func (m *CloudPcConnectivityResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFailedHealthCheckItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFailedHealthCheckItems())) + for i, v := range m.GetFailedHealthCheckItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("failedHealthCheckItems", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updatedDateTime", m.GetUpdatedDateTime()) + 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 *CloudPcConnectivityResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFailedHealthCheckItems sets the failedHealthCheckItems property value. A list of failed health check items. If the status property is available, this property will be empty. +func (m *CloudPcConnectivityResult) SetFailedHealthCheckItems(value []CloudPcHealthCheckItemable)() { + m.failedHealthCheckItems = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcConnectivityResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status property +func (m *CloudPcConnectivityResult) SetStatus(value *CloudPcConnectivityStatus)() { + m.status = value +} +// SetUpdatedDateTime sets the updatedDateTime property value. Datetime when the status was updated. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. +func (m *CloudPcConnectivityResult) SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_resultable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_resultable.go new file mode 100644 index 000000000..89fd5afb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_resultable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcConnectivityResultable +type CloudPcConnectivityResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedHealthCheckItems()([]CloudPcHealthCheckItemable) + GetOdataType()(*string) + GetStatus()(*CloudPcConnectivityStatus) + GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetFailedHealthCheckItems(value []CloudPcHealthCheckItemable)() + SetOdataType(value *string)() + SetStatus(value *CloudPcConnectivityStatus)() + SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_status.go new file mode 100644 index 000000000..3d3f3b6f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_connectivity_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcConnectivityStatus int + +const ( + UNKNOWN_CLOUDPCCONNECTIVITYSTATUS CloudPcConnectivityStatus = iota + AVAILABLE_CLOUDPCCONNECTIVITYSTATUS + AVAILABLEWITHWARNING_CLOUDPCCONNECTIVITYSTATUS + UNAVAILABLE_CLOUDPCCONNECTIVITYSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCCONNECTIVITYSTATUS +) + +func (i CloudPcConnectivityStatus) String() string { + return []string{"unknown", "available", "availableWithWarning", "unavailable", "unknownFutureValue"}[i] +} +func ParseCloudPcConnectivityStatus(v string) (interface{}, error) { + result := UNKNOWN_CLOUDPCCONNECTIVITYSTATUS + switch v { + case "unknown": + result = UNKNOWN_CLOUDPCCONNECTIVITYSTATUS + case "available": + result = AVAILABLE_CLOUDPCCONNECTIVITYSTATUS + case "availableWithWarning": + result = AVAILABLEWITHWARNING_CLOUDPCCONNECTIVITYSTATUS + case "unavailable": + result = UNAVAILABLE_CLOUDPCCONNECTIVITYSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCCONNECTIVITYSTATUS + default: + return 0, errors.New("Unknown CloudPcConnectivityStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcConnectivityStatus(values []CloudPcConnectivityStatus) []string { + 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/cloud_pc_cross_cloud_government_organization_mapping.go b/src/internal/connector/graph/betasdk/models/cloud_pc_cross_cloud_government_organization_mapping.go new file mode 100644 index 000000000..4c04693b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_cross_cloud_government_organization_mapping.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcCrossCloudGovernmentOrganizationMapping +type CloudPcCrossCloudGovernmentOrganizationMapping struct { + Entity + // The tenant ID in the Azure Government cloud corresponding to the GCC tenant in the public cloud. Currently, 1:1 mappings are supported, so this collection can only contain one tenant ID. + organizationIdsInUSGovCloud []string +} +// NewCloudPcCrossCloudGovernmentOrganizationMapping instantiates a new CloudPcCrossCloudGovernmentOrganizationMapping and sets the default values. +func NewCloudPcCrossCloudGovernmentOrganizationMapping()(*CloudPcCrossCloudGovernmentOrganizationMapping) { + m := &CloudPcCrossCloudGovernmentOrganizationMapping{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcCrossCloudGovernmentOrganizationMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcCrossCloudGovernmentOrganizationMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcCrossCloudGovernmentOrganizationMapping(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcCrossCloudGovernmentOrganizationMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["organizationIdsInUSGovCloud"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOrganizationIdsInUSGovCloud(res) + } + return nil + } + return res +} +// GetOrganizationIdsInUSGovCloud gets the organizationIdsInUSGovCloud property value. The tenant ID in the Azure Government cloud corresponding to the GCC tenant in the public cloud. Currently, 1:1 mappings are supported, so this collection can only contain one tenant ID. +func (m *CloudPcCrossCloudGovernmentOrganizationMapping) GetOrganizationIdsInUSGovCloud()([]string) { + return m.organizationIdsInUSGovCloud +} +// Serialize serializes information the current object +func (m *CloudPcCrossCloudGovernmentOrganizationMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetOrganizationIdsInUSGovCloud() != nil { + err = writer.WriteCollectionOfStringValues("organizationIdsInUSGovCloud", m.GetOrganizationIdsInUSGovCloud()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizationIdsInUSGovCloud sets the organizationIdsInUSGovCloud property value. The tenant ID in the Azure Government cloud corresponding to the GCC tenant in the public cloud. Currently, 1:1 mappings are supported, so this collection can only contain one tenant ID. +func (m *CloudPcCrossCloudGovernmentOrganizationMapping) SetOrganizationIdsInUSGovCloud(value []string)() { + m.organizationIdsInUSGovCloud = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_cross_cloud_government_organization_mappingable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_cross_cloud_government_organization_mappingable.go new file mode 100644 index 000000000..2b035dca1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_cross_cloud_government_organization_mappingable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcCrossCloudGovernmentOrganizationMappingable +type CloudPcCrossCloudGovernmentOrganizationMappingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizationIdsInUSGovCloud()([]string) + SetOrganizationIdsInUSGovCloud(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_device_image.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image.go new file mode 100644 index 000000000..ecc912ead --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image.go @@ -0,0 +1,298 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDeviceImage +type CloudPcDeviceImage struct { + Entity + // The image's display name. + displayName *string + // The date the image became unavailable. + expirationDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The data and time that the image was last modified. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The image's operating system. For example: Windows 10 Enterprise. + operatingSystem *string + // The image's OS build version. For example: 1909. + osBuildNumber *string + // The OS status of this image. Possible values are: supported, supportedWithWarning, unknownFutureValue. + osStatus *CloudPcDeviceImageOsStatus + // The ID of the source image resource on Azure. Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'. + sourceImageResourceId *string + // The status of the image on Cloud PC. Possible values are: pending, ready, failed. + status *CloudPcDeviceImageStatus + // The details of the image's status, which indicates why the upload failed, if applicable. Possible values are: internalServerError, sourceImageNotFound, osVersionNotSupported, sourceImageInvalid, and sourceImageNotGeneralized. + statusDetails *CloudPcDeviceImageStatusDetails + // The image version. For example: 0.0.1, 1.5.13. + version *string +} +// NewCloudPcDeviceImage instantiates a new CloudPcDeviceImage and sets the default values. +func NewCloudPcDeviceImage()(*CloudPcDeviceImage) { + m := &CloudPcDeviceImage{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcDeviceImageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDeviceImageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDeviceImage(), nil +} +// GetDisplayName gets the displayName property value. The image's display name. +func (m *CloudPcDeviceImage) GetDisplayName()(*string) { + return m.displayName +} +// GetExpirationDate gets the expirationDate property value. The date the image became unavailable. +func (m *CloudPcDeviceImage) GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.expirationDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDeviceImage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["expirationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDate(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["osBuildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsBuildNumber(val) + } + return nil + } + res["osStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDeviceImageOsStatus) + if err != nil { + return err + } + if val != nil { + m.SetOsStatus(val.(*CloudPcDeviceImageOsStatus)) + } + return nil + } + res["sourceImageResourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceImageResourceId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDeviceImageStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcDeviceImageStatus)) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDeviceImageStatusDetails) + if err != nil { + return err + } + if val != nil { + m.SetStatusDetails(val.(*CloudPcDeviceImageStatusDetails)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The data and time that the image was last modified. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcDeviceImage) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOperatingSystem gets the operatingSystem property value. The image's operating system. For example: Windows 10 Enterprise. +func (m *CloudPcDeviceImage) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetOsBuildNumber gets the osBuildNumber property value. The image's OS build version. For example: 1909. +func (m *CloudPcDeviceImage) GetOsBuildNumber()(*string) { + return m.osBuildNumber +} +// GetOsStatus gets the osStatus property value. The OS status of this image. Possible values are: supported, supportedWithWarning, unknownFutureValue. +func (m *CloudPcDeviceImage) GetOsStatus()(*CloudPcDeviceImageOsStatus) { + return m.osStatus +} +// GetSourceImageResourceId gets the sourceImageResourceId property value. The ID of the source image resource on Azure. Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'. +func (m *CloudPcDeviceImage) GetSourceImageResourceId()(*string) { + return m.sourceImageResourceId +} +// GetStatus gets the status property value. The status of the image on Cloud PC. Possible values are: pending, ready, failed. +func (m *CloudPcDeviceImage) GetStatus()(*CloudPcDeviceImageStatus) { + return m.status +} +// GetStatusDetails gets the statusDetails property value. The details of the image's status, which indicates why the upload failed, if applicable. Possible values are: internalServerError, sourceImageNotFound, osVersionNotSupported, sourceImageInvalid, and sourceImageNotGeneralized. +func (m *CloudPcDeviceImage) GetStatusDetails()(*CloudPcDeviceImageStatusDetails) { + return m.statusDetails +} +// GetVersion gets the version property value. The image version. For example: 0.0.1, 1.5.13. +func (m *CloudPcDeviceImage) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *CloudPcDeviceImage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("expirationDate", m.GetExpirationDate()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osBuildNumber", m.GetOsBuildNumber()) + if err != nil { + return err + } + } + if m.GetOsStatus() != nil { + cast := (*m.GetOsStatus()).String() + err = writer.WriteStringValue("osStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceImageResourceId", m.GetSourceImageResourceId()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetStatusDetails() != nil { + cast := (*m.GetStatusDetails()).String() + err = writer.WriteStringValue("statusDetails", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The image's display name. +func (m *CloudPcDeviceImage) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExpirationDate sets the expirationDate property value. The date the image became unavailable. +func (m *CloudPcDeviceImage) SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.expirationDate = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The data and time that the image was last modified. The time is shown in ISO 8601 format and Coordinated Universal Time (UTC) time. For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcDeviceImage) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOperatingSystem sets the operatingSystem property value. The image's operating system. For example: Windows 10 Enterprise. +func (m *CloudPcDeviceImage) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetOsBuildNumber sets the osBuildNumber property value. The image's OS build version. For example: 1909. +func (m *CloudPcDeviceImage) SetOsBuildNumber(value *string)() { + m.osBuildNumber = value +} +// SetOsStatus sets the osStatus property value. The OS status of this image. Possible values are: supported, supportedWithWarning, unknownFutureValue. +func (m *CloudPcDeviceImage) SetOsStatus(value *CloudPcDeviceImageOsStatus)() { + m.osStatus = value +} +// SetSourceImageResourceId sets the sourceImageResourceId property value. The ID of the source image resource on Azure. Required format: '/subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Compute/images/{imageName}'. +func (m *CloudPcDeviceImage) SetSourceImageResourceId(value *string)() { + m.sourceImageResourceId = value +} +// SetStatus sets the status property value. The status of the image on Cloud PC. Possible values are: pending, ready, failed. +func (m *CloudPcDeviceImage) SetStatus(value *CloudPcDeviceImageStatus)() { + m.status = value +} +// SetStatusDetails sets the statusDetails property value. The details of the image's status, which indicates why the upload failed, if applicable. Possible values are: internalServerError, sourceImageNotFound, osVersionNotSupported, sourceImageInvalid, and sourceImageNotGeneralized. +func (m *CloudPcDeviceImage) SetStatusDetails(value *CloudPcDeviceImageStatusDetails)() { + m.statusDetails = value +} +// SetVersion sets the version property value. The image version. For example: 0.0.1, 1.5.13. +func (m *CloudPcDeviceImage) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_response.go new file mode 100644 index 000000000..2d4aab4c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDeviceImageCollectionResponse +type CloudPcDeviceImageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcDeviceImageable +} +// NewCloudPcDeviceImageCollectionResponse instantiates a new CloudPcDeviceImageCollectionResponse and sets the default values. +func NewCloudPcDeviceImageCollectionResponse()(*CloudPcDeviceImageCollectionResponse) { + m := &CloudPcDeviceImageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcDeviceImageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDeviceImageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDeviceImageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDeviceImageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcDeviceImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcDeviceImageable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcDeviceImageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcDeviceImageCollectionResponse) GetValue()([]CloudPcDeviceImageable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcDeviceImageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcDeviceImageCollectionResponse) SetValue(value []CloudPcDeviceImageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_responseable.go new file mode 100644 index 000000000..267633290 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDeviceImageCollectionResponseable +type CloudPcDeviceImageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcDeviceImageable) + SetValue(value []CloudPcDeviceImageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_os_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_os_status.go new file mode 100644 index 000000000..9dc00d508 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_os_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDeviceImageOsStatus int + +const ( + SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS CloudPcDeviceImageOsStatus = iota + SUPPORTEDWITHWARNING_CLOUDPCDEVICEIMAGEOSSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEOSSTATUS +) + +func (i CloudPcDeviceImageOsStatus) String() string { + return []string{"supported", "supportedWithWarning", "unknownFutureValue"}[i] +} +func ParseCloudPcDeviceImageOsStatus(v string) (interface{}, error) { + result := SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS + switch v { + case "supported": + result = SUPPORTED_CLOUDPCDEVICEIMAGEOSSTATUS + case "supportedWithWarning": + result = SUPPORTEDWITHWARNING_CLOUDPCDEVICEIMAGEOSSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGEOSSTATUS + default: + return 0, errors.New("Unknown CloudPcDeviceImageOsStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcDeviceImageOsStatus(values []CloudPcDeviceImageOsStatus) []string { + 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/cloud_pc_device_image_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_status.go new file mode 100644 index 000000000..b21e1d219 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDeviceImageStatus int + +const ( + PENDING_CLOUDPCDEVICEIMAGESTATUS CloudPcDeviceImageStatus = iota + READY_CLOUDPCDEVICEIMAGESTATUS + FAILED_CLOUDPCDEVICEIMAGESTATUS +) + +func (i CloudPcDeviceImageStatus) String() string { + return []string{"pending", "ready", "failed"}[i] +} +func ParseCloudPcDeviceImageStatus(v string) (interface{}, error) { + result := PENDING_CLOUDPCDEVICEIMAGESTATUS + switch v { + case "pending": + result = PENDING_CLOUDPCDEVICEIMAGESTATUS + case "ready": + result = READY_CLOUDPCDEVICEIMAGESTATUS + case "failed": + result = FAILED_CLOUDPCDEVICEIMAGESTATUS + default: + return 0, errors.New("Unknown CloudPcDeviceImageStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcDeviceImageStatus(values []CloudPcDeviceImageStatus) []string { + 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/cloud_pc_device_image_status_details.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_status_details.go new file mode 100644 index 000000000..e32cbfa2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_image_status_details.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDeviceImageStatusDetails int + +const ( + INTERNALSERVERERROR_CLOUDPCDEVICEIMAGESTATUSDETAILS CloudPcDeviceImageStatusDetails = iota + SOURCEIMAGENOTFOUND_CLOUDPCDEVICEIMAGESTATUSDETAILS + OSVERSIONNOTSUPPORTED_CLOUDPCDEVICEIMAGESTATUSDETAILS + SOURCEIMAGEINVALID_CLOUDPCDEVICEIMAGESTATUSDETAILS + SOURCEIMAGENOTGENERALIZED_CLOUDPCDEVICEIMAGESTATUSDETAILS + UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGESTATUSDETAILS +) + +func (i CloudPcDeviceImageStatusDetails) String() string { + return []string{"internalServerError", "sourceImageNotFound", "osVersionNotSupported", "sourceImageInvalid", "sourceImageNotGeneralized", "unknownFutureValue"}[i] +} +func ParseCloudPcDeviceImageStatusDetails(v string) (interface{}, error) { + result := INTERNALSERVERERROR_CLOUDPCDEVICEIMAGESTATUSDETAILS + switch v { + case "internalServerError": + result = INTERNALSERVERERROR_CLOUDPCDEVICEIMAGESTATUSDETAILS + case "sourceImageNotFound": + result = SOURCEIMAGENOTFOUND_CLOUDPCDEVICEIMAGESTATUSDETAILS + case "osVersionNotSupported": + result = OSVERSIONNOTSUPPORTED_CLOUDPCDEVICEIMAGESTATUSDETAILS + case "sourceImageInvalid": + result = SOURCEIMAGEINVALID_CLOUDPCDEVICEIMAGESTATUSDETAILS + case "sourceImageNotGeneralized": + result = SOURCEIMAGENOTGENERALIZED_CLOUDPCDEVICEIMAGESTATUSDETAILS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDEVICEIMAGESTATUSDETAILS + default: + return 0, errors.New("Unknown CloudPcDeviceImageStatusDetails value: " + v) + } + return &result, nil +} +func SerializeCloudPcDeviceImageStatusDetails(values []CloudPcDeviceImageStatusDetails) []string { + 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/cloud_pc_device_imageable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_device_imageable.go new file mode 100644 index 000000000..c64c53d12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_device_imageable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDeviceImageable +type CloudPcDeviceImageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOperatingSystem()(*string) + GetOsBuildNumber()(*string) + GetOsStatus()(*CloudPcDeviceImageOsStatus) + GetSourceImageResourceId()(*string) + GetStatus()(*CloudPcDeviceImageStatus) + GetStatusDetails()(*CloudPcDeviceImageStatusDetails) + GetVersion()(*string) + SetDisplayName(value *string)() + SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOperatingSystem(value *string)() + SetOsBuildNumber(value *string)() + SetOsStatus(value *CloudPcDeviceImageOsStatus)() + SetSourceImageResourceId(value *string)() + SetStatus(value *CloudPcDeviceImageStatus)() + SetStatusDetails(value *CloudPcDeviceImageStatusDetails)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_disk_encryption_state.go b/src/internal/connector/graph/betasdk/models/cloud_pc_disk_encryption_state.go new file mode 100644 index 000000000..1446f06c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_disk_encryption_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDiskEncryptionState int + +const ( + NOTAVAILABLE_CLOUDPCDISKENCRYPTIONSTATE CloudPcDiskEncryptionState = iota + NOTENCRYPTED_CLOUDPCDISKENCRYPTIONSTATE + ENCRYPTEDUSINGPLATFORMMANAGEDKEY_CLOUDPCDISKENCRYPTIONSTATE + ENCRYPTEDUSINGCUSTOMERMANAGEDKEY_CLOUDPCDISKENCRYPTIONSTATE + UNKNOWNFUTUREVALUE_CLOUDPCDISKENCRYPTIONSTATE +) + +func (i CloudPcDiskEncryptionState) String() string { + return []string{"notAvailable", "notEncrypted", "encryptedUsingPlatformManagedKey", "encryptedUsingCustomerManagedKey", "unknownFutureValue"}[i] +} +func ParseCloudPcDiskEncryptionState(v string) (interface{}, error) { + result := NOTAVAILABLE_CLOUDPCDISKENCRYPTIONSTATE + switch v { + case "notAvailable": + result = NOTAVAILABLE_CLOUDPCDISKENCRYPTIONSTATE + case "notEncrypted": + result = NOTENCRYPTED_CLOUDPCDISKENCRYPTIONSTATE + case "encryptedUsingPlatformManagedKey": + result = ENCRYPTEDUSINGPLATFORMMANAGEDKEY_CLOUDPCDISKENCRYPTIONSTATE + case "encryptedUsingCustomerManagedKey": + result = ENCRYPTEDUSINGCUSTOMERMANAGEDKEY_CLOUDPCDISKENCRYPTIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDISKENCRYPTIONSTATE + default: + return 0, errors.New("Unknown CloudPcDiskEncryptionState value: " + v) + } + return &result, nil +} +func SerializeCloudPcDiskEncryptionState(values []CloudPcDiskEncryptionState) []string { + 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/cloud_pc_domain_join_configuration.go b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_configuration.go new file mode 100644 index 000000000..5bf3101fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_configuration.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDomainJoinConfiguration +type CloudPcDomainJoinConfiguration 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 OdataType property + odataType *string + // The Azure network connection ID that matches the virtual network IT admins want the provisioning policy to use when they create Cloud PCs. You can use this property in both domain join types: Azure AD joined or Hybrid Azure AD joined. If you enter an onPremisesConnectionId, leave regionName as empty. + onPremisesConnectionId *string + // The regionGroup property + regionGroup *CloudPcRegionGroup + // The supported Azure region where the IT admin wants the provisioning policy to create Cloud PCs. The underlying virtual network will be created and managed by the Windows 365 service. This can only be entered if the IT admin chooses Azure AD joined as the domain join type. If you enter a regionName, leave onPremisesConnectionId as empty. + regionName *string + // Specifies how the provisioned Cloud PC will be joined to Azure AD. If you choose the hybridAzureADJoin type, only provide a value for the onPremisesConnectionId property and leave regionName as empty. If you choose the azureADJoin type, provide a value for either onPremisesConnectionId or regionName. The possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. + type_escaped *CloudPcDomainJoinType +} +// NewCloudPcDomainJoinConfiguration instantiates a new cloudPcDomainJoinConfiguration and sets the default values. +func NewCloudPcDomainJoinConfiguration()(*CloudPcDomainJoinConfiguration) { + m := &CloudPcDomainJoinConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcDomainJoinConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDomainJoinConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDomainJoinConfiguration(), 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 *CloudPcDomainJoinConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDomainJoinConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["onPremisesConnectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesConnectionId(val) + } + return nil + } + res["regionGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcRegionGroup) + if err != nil { + return err + } + if val != nil { + m.SetRegionGroup(val.(*CloudPcRegionGroup)) + } + return nil + } + res["regionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegionName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcDomainJoinType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CloudPcDomainJoinType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcDomainJoinConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetOnPremisesConnectionId gets the onPremisesConnectionId property value. The Azure network connection ID that matches the virtual network IT admins want the provisioning policy to use when they create Cloud PCs. You can use this property in both domain join types: Azure AD joined or Hybrid Azure AD joined. If you enter an onPremisesConnectionId, leave regionName as empty. +func (m *CloudPcDomainJoinConfiguration) GetOnPremisesConnectionId()(*string) { + return m.onPremisesConnectionId +} +// GetRegionGroup gets the regionGroup property value. The regionGroup property +func (m *CloudPcDomainJoinConfiguration) GetRegionGroup()(*CloudPcRegionGroup) { + return m.regionGroup +} +// GetRegionName gets the regionName property value. The supported Azure region where the IT admin wants the provisioning policy to create Cloud PCs. The underlying virtual network will be created and managed by the Windows 365 service. This can only be entered if the IT admin chooses Azure AD joined as the domain join type. If you enter a regionName, leave onPremisesConnectionId as empty. +func (m *CloudPcDomainJoinConfiguration) GetRegionName()(*string) { + return m.regionName +} +// GetType gets the type property value. Specifies how the provisioned Cloud PC will be joined to Azure AD. If you choose the hybridAzureADJoin type, only provide a value for the onPremisesConnectionId property and leave regionName as empty. If you choose the azureADJoin type, provide a value for either onPremisesConnectionId or regionName. The possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. +func (m *CloudPcDomainJoinConfiguration) GetType()(*CloudPcDomainJoinType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *CloudPcDomainJoinConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("onPremisesConnectionId", m.GetOnPremisesConnectionId()) + if err != nil { + return err + } + } + if m.GetRegionGroup() != nil { + cast := (*m.GetRegionGroup()).String() + err := writer.WriteStringValue("regionGroup", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("regionName", m.GetRegionName()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *CloudPcDomainJoinConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcDomainJoinConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetOnPremisesConnectionId sets the onPremisesConnectionId property value. The Azure network connection ID that matches the virtual network IT admins want the provisioning policy to use when they create Cloud PCs. You can use this property in both domain join types: Azure AD joined or Hybrid Azure AD joined. If you enter an onPremisesConnectionId, leave regionName as empty. +func (m *CloudPcDomainJoinConfiguration) SetOnPremisesConnectionId(value *string)() { + m.onPremisesConnectionId = value +} +// SetRegionGroup sets the regionGroup property value. The regionGroup property +func (m *CloudPcDomainJoinConfiguration) SetRegionGroup(value *CloudPcRegionGroup)() { + m.regionGroup = value +} +// SetRegionName sets the regionName property value. The supported Azure region where the IT admin wants the provisioning policy to create Cloud PCs. The underlying virtual network will be created and managed by the Windows 365 service. This can only be entered if the IT admin chooses Azure AD joined as the domain join type. If you enter a regionName, leave onPremisesConnectionId as empty. +func (m *CloudPcDomainJoinConfiguration) SetRegionName(value *string)() { + m.regionName = value +} +// SetType sets the type property value. Specifies how the provisioned Cloud PC will be joined to Azure AD. If you choose the hybridAzureADJoin type, only provide a value for the onPremisesConnectionId property and leave regionName as empty. If you choose the azureADJoin type, provide a value for either onPremisesConnectionId or regionName. The possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. +func (m *CloudPcDomainJoinConfiguration) SetType(value *CloudPcDomainJoinType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_configurationable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_configurationable.go new file mode 100644 index 000000000..9ac4d8894 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcDomainJoinConfigurationable +type CloudPcDomainJoinConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOnPremisesConnectionId()(*string) + GetRegionGroup()(*CloudPcRegionGroup) + GetRegionName()(*string) + GetType()(*CloudPcDomainJoinType) + SetOdataType(value *string)() + SetOnPremisesConnectionId(value *string)() + SetRegionGroup(value *CloudPcRegionGroup)() + SetRegionName(value *string)() + SetType(value *CloudPcDomainJoinType)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_type.go new file mode 100644 index 000000000..b2e4cb53b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_domain_join_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDomainJoinType int + +const ( + AZUREADJOIN_CLOUDPCDOMAINJOINTYPE CloudPcDomainJoinType = iota + HYBRIDAZUREADJOIN_CLOUDPCDOMAINJOINTYPE + UNKNOWNFUTUREVALUE_CLOUDPCDOMAINJOINTYPE +) + +func (i CloudPcDomainJoinType) String() string { + return []string{"azureADJoin", "hybridAzureADJoin", "unknownFutureValue"}[i] +} +func ParseCloudPcDomainJoinType(v string) (interface{}, error) { + result := AZUREADJOIN_CLOUDPCDOMAINJOINTYPE + switch v { + case "azureADJoin": + result = AZUREADJOIN_CLOUDPCDOMAINJOINTYPE + case "hybridAzureADJoin": + result = HYBRIDAZUREADJOIN_CLOUDPCDOMAINJOINTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCDOMAINJOINTYPE + default: + return 0, errors.New("Unknown CloudPcDomainJoinType value: " + v) + } + return &result, nil +} +func SerializeCloudPcDomainJoinType(values []CloudPcDomainJoinType) []string { + 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/cloud_pc_export_job.go b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job.go new file mode 100644 index 000000000..22861f048 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job.go @@ -0,0 +1,249 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExportJob +type CloudPcExportJob struct { + Entity + // The date and time when the export job expires. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status of the export job. The possible values are: notStarted, inProgress, completed, unknownFutureValue. Read-only. + exportJobStatus *CloudPcExportJobStatus + // The storage account URL of the exported report. It can be used to download the file. + exportUrl *string + // The filter applied on the report. + filter *string + // The format of the exported report. + format *string + // The report name. The possible values are: remoteConnectionHistoricalReports, dailyAggregatedRemoteConnectionReports, totalAggregatedRemoteConnectionReports, unknownFutureValue. + reportName *CloudPcReportName + // The date and time when the export job was requested. + requestDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The selected columns of the report. + select_escaped []string +} +// NewCloudPcExportJob instantiates a new CloudPcExportJob and sets the default values. +func NewCloudPcExportJob()(*CloudPcExportJob) { + m := &CloudPcExportJob{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcExportJobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcExportJobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcExportJob(), nil +} +// GetExpirationDateTime gets the expirationDateTime property value. The date and time when the export job expires. +func (m *CloudPcExportJob) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetExportJobStatus gets the exportJobStatus property value. The status of the export job. The possible values are: notStarted, inProgress, completed, unknownFutureValue. Read-only. +func (m *CloudPcExportJob) GetExportJobStatus()(*CloudPcExportJobStatus) { + return m.exportJobStatus +} +// GetExportUrl gets the exportUrl property value. The storage account URL of the exported report. It can be used to download the file. +func (m *CloudPcExportJob) GetExportUrl()(*string) { + return m.exportUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcExportJob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["exportJobStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcExportJobStatus) + if err != nil { + return err + } + if val != nil { + m.SetExportJobStatus(val.(*CloudPcExportJobStatus)) + } + return nil + } + res["exportUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExportUrl(val) + } + return nil + } + res["filter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilter(val) + } + return nil + } + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormat(val) + } + return nil + } + res["reportName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcReportName) + if err != nil { + return err + } + if val != nil { + m.SetReportName(val.(*CloudPcReportName)) + } + return nil + } + res["requestDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestDateTime(val) + } + return nil + } + res["select"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSelect(res) + } + return nil + } + return res +} +// GetFilter gets the filter property value. The filter applied on the report. +func (m *CloudPcExportJob) GetFilter()(*string) { + return m.filter +} +// GetFormat gets the format property value. The format of the exported report. +func (m *CloudPcExportJob) GetFormat()(*string) { + return m.format +} +// GetReportName gets the reportName property value. The report name. The possible values are: remoteConnectionHistoricalReports, dailyAggregatedRemoteConnectionReports, totalAggregatedRemoteConnectionReports, unknownFutureValue. +func (m *CloudPcExportJob) GetReportName()(*CloudPcReportName) { + return m.reportName +} +// GetRequestDateTime gets the requestDateTime property value. The date and time when the export job was requested. +func (m *CloudPcExportJob) GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestDateTime +} +// GetSelect gets the select property value. The selected columns of the report. +func (m *CloudPcExportJob) GetSelect()([]string) { + return m.select_escaped +} +// Serialize serializes information the current object +func (m *CloudPcExportJob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + if m.GetExportJobStatus() != nil { + cast := (*m.GetExportJobStatus()).String() + err = writer.WriteStringValue("exportJobStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("exportUrl", m.GetExportUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("filter", m.GetFilter()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("format", m.GetFormat()) + if err != nil { + return err + } + } + if m.GetReportName() != nil { + cast := (*m.GetReportName()).String() + err = writer.WriteStringValue("reportName", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestDateTime", m.GetRequestDateTime()) + if err != nil { + return err + } + } + if m.GetSelect() != nil { + err = writer.WriteCollectionOfStringValues("select", m.GetSelect()) + if err != nil { + return err + } + } + return nil +} +// SetExpirationDateTime sets the expirationDateTime property value. The date and time when the export job expires. +func (m *CloudPcExportJob) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetExportJobStatus sets the exportJobStatus property value. The status of the export job. The possible values are: notStarted, inProgress, completed, unknownFutureValue. Read-only. +func (m *CloudPcExportJob) SetExportJobStatus(value *CloudPcExportJobStatus)() { + m.exportJobStatus = value +} +// SetExportUrl sets the exportUrl property value. The storage account URL of the exported report. It can be used to download the file. +func (m *CloudPcExportJob) SetExportUrl(value *string)() { + m.exportUrl = value +} +// SetFilter sets the filter property value. The filter applied on the report. +func (m *CloudPcExportJob) SetFilter(value *string)() { + m.filter = value +} +// SetFormat sets the format property value. The format of the exported report. +func (m *CloudPcExportJob) SetFormat(value *string)() { + m.format = value +} +// SetReportName sets the reportName property value. The report name. The possible values are: remoteConnectionHistoricalReports, dailyAggregatedRemoteConnectionReports, totalAggregatedRemoteConnectionReports, unknownFutureValue. +func (m *CloudPcExportJob) SetReportName(value *CloudPcReportName)() { + m.reportName = value +} +// SetRequestDateTime sets the requestDateTime property value. The date and time when the export job was requested. +func (m *CloudPcExportJob) SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestDateTime = value +} +// SetSelect sets the select property value. The selected columns of the report. +func (m *CloudPcExportJob) SetSelect(value []string)() { + m.select_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_response.go new file mode 100644 index 000000000..7ed63a9e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExportJobCollectionResponse +type CloudPcExportJobCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcExportJobable +} +// NewCloudPcExportJobCollectionResponse instantiates a new CloudPcExportJobCollectionResponse and sets the default values. +func NewCloudPcExportJobCollectionResponse()(*CloudPcExportJobCollectionResponse) { + m := &CloudPcExportJobCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcExportJobCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcExportJobCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcExportJobCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcExportJobCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcExportJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcExportJobable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcExportJobable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcExportJobCollectionResponse) GetValue()([]CloudPcExportJobable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcExportJobCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcExportJobCollectionResponse) SetValue(value []CloudPcExportJobable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_responseable.go new file mode 100644 index 000000000..714fc3df3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExportJobCollectionResponseable +type CloudPcExportJobCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcExportJobable) + SetValue(value []CloudPcExportJobable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_status.go new file mode 100644 index 000000000..5ef300c4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_export_job_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcExportJobStatus int + +const ( + NOTSTARTED_CLOUDPCEXPORTJOBSTATUS CloudPcExportJobStatus = iota + INPROGRESS_CLOUDPCEXPORTJOBSTATUS + COMPLETED_CLOUDPCEXPORTJOBSTATUS + FAILED_CLOUDPCEXPORTJOBSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCEXPORTJOBSTATUS +) + +func (i CloudPcExportJobStatus) String() string { + return []string{"notStarted", "inProgress", "completed", "failed", "unknownFutureValue"}[i] +} +func ParseCloudPcExportJobStatus(v string) (interface{}, error) { + result := NOTSTARTED_CLOUDPCEXPORTJOBSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_CLOUDPCEXPORTJOBSTATUS + case "inProgress": + result = INPROGRESS_CLOUDPCEXPORTJOBSTATUS + case "completed": + result = COMPLETED_CLOUDPCEXPORTJOBSTATUS + case "failed": + result = FAILED_CLOUDPCEXPORTJOBSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCEXPORTJOBSTATUS + default: + return 0, errors.New("Unknown CloudPcExportJobStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcExportJobStatus(values []CloudPcExportJobStatus) []string { + 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/cloud_pc_export_jobable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_export_jobable.go new file mode 100644 index 000000000..e6a37e151 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_export_jobable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExportJobable +type CloudPcExportJobable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExportJobStatus()(*CloudPcExportJobStatus) + GetExportUrl()(*string) + GetFilter()(*string) + GetFormat()(*string) + GetReportName()(*CloudPcReportName) + GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSelect()([]string) + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExportJobStatus(value *CloudPcExportJobStatus)() + SetExportUrl(value *string)() + SetFilter(value *string)() + SetFormat(value *string)() + SetReportName(value *CloudPcReportName)() + SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSelect(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting.go b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting.go new file mode 100644 index 000000000..f76dc037b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExternalPartnerSetting +type CloudPcExternalPartnerSetting struct { + Entity + // Enable or disable the connection to an external partner. If true, an external partner API will accept incoming calls from external partners. Required. Supports $filter (eq). + enableConnection *bool + // Last data sync time for this external partner. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The external partner ID. + partnerId *string + // The status property + status *CloudPcExternalPartnerStatus + // Status details message. + statusDetails *string +} +// NewCloudPcExternalPartnerSetting instantiates a new CloudPcExternalPartnerSetting and sets the default values. +func NewCloudPcExternalPartnerSetting()(*CloudPcExternalPartnerSetting) { + m := &CloudPcExternalPartnerSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcExternalPartnerSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcExternalPartnerSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcExternalPartnerSetting(), nil +} +// GetEnableConnection gets the enableConnection property value. Enable or disable the connection to an external partner. If true, an external partner API will accept incoming calls from external partners. Required. Supports $filter (eq). +func (m *CloudPcExternalPartnerSetting) GetEnableConnection()(*bool) { + return m.enableConnection +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcExternalPartnerSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["enableConnection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableConnection(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["partnerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPartnerId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcExternalPartnerStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcExternalPartnerStatus)) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusDetails(val) + } + return nil + } + return res +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Last data sync time for this external partner. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcExternalPartnerSetting) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetPartnerId gets the partnerId property value. The external partner ID. +func (m *CloudPcExternalPartnerSetting) GetPartnerId()(*string) { + return m.partnerId +} +// GetStatus gets the status property value. The status property +func (m *CloudPcExternalPartnerSetting) GetStatus()(*CloudPcExternalPartnerStatus) { + return m.status +} +// GetStatusDetails gets the statusDetails property value. Status details message. +func (m *CloudPcExternalPartnerSetting) GetStatusDetails()(*string) { + return m.statusDetails +} +// Serialize serializes information the current object +func (m *CloudPcExternalPartnerSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("enableConnection", m.GetEnableConnection()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("partnerId", m.GetPartnerId()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("statusDetails", m.GetStatusDetails()) + if err != nil { + return err + } + } + return nil +} +// SetEnableConnection sets the enableConnection property value. Enable or disable the connection to an external partner. If true, an external partner API will accept incoming calls from external partners. Required. Supports $filter (eq). +func (m *CloudPcExternalPartnerSetting) SetEnableConnection(value *bool)() { + m.enableConnection = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Last data sync time for this external partner. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcExternalPartnerSetting) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetPartnerId sets the partnerId property value. The external partner ID. +func (m *CloudPcExternalPartnerSetting) SetPartnerId(value *string)() { + m.partnerId = value +} +// SetStatus sets the status property value. The status property +func (m *CloudPcExternalPartnerSetting) SetStatus(value *CloudPcExternalPartnerStatus)() { + m.status = value +} +// SetStatusDetails sets the statusDetails property value. Status details message. +func (m *CloudPcExternalPartnerSetting) SetStatusDetails(value *string)() { + m.statusDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_response.go new file mode 100644 index 000000000..4616cbd45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExternalPartnerSettingCollectionResponse +type CloudPcExternalPartnerSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcExternalPartnerSettingable +} +// NewCloudPcExternalPartnerSettingCollectionResponse instantiates a new CloudPcExternalPartnerSettingCollectionResponse and sets the default values. +func NewCloudPcExternalPartnerSettingCollectionResponse()(*CloudPcExternalPartnerSettingCollectionResponse) { + m := &CloudPcExternalPartnerSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcExternalPartnerSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcExternalPartnerSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcExternalPartnerSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcExternalPartnerSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcExternalPartnerSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcExternalPartnerSettingable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcExternalPartnerSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcExternalPartnerSettingCollectionResponse) GetValue()([]CloudPcExternalPartnerSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcExternalPartnerSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcExternalPartnerSettingCollectionResponse) SetValue(value []CloudPcExternalPartnerSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_responseable.go new file mode 100644 index 000000000..1a96f7b34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExternalPartnerSettingCollectionResponseable +type CloudPcExternalPartnerSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcExternalPartnerSettingable) + SetValue(value []CloudPcExternalPartnerSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_settingable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_settingable.go new file mode 100644 index 000000000..5094e90b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_settingable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcExternalPartnerSettingable +type CloudPcExternalPartnerSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableConnection()(*bool) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPartnerId()(*string) + GetStatus()(*CloudPcExternalPartnerStatus) + GetStatusDetails()(*string) + SetEnableConnection(value *bool)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPartnerId(value *string)() + SetStatus(value *CloudPcExternalPartnerStatus)() + SetStatusDetails(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_status.go new file mode 100644 index 000000000..b1cd22fa4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_external_partner_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcExternalPartnerStatus int + +const ( + NOTAVAILABLE_CLOUDPCEXTERNALPARTNERSTATUS CloudPcExternalPartnerStatus = iota + AVAILABLE_CLOUDPCEXTERNALPARTNERSTATUS + HEALTHY_CLOUDPCEXTERNALPARTNERSTATUS + UNHEALTHY_CLOUDPCEXTERNALPARTNERSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCEXTERNALPARTNERSTATUS +) + +func (i CloudPcExternalPartnerStatus) String() string { + return []string{"notAvailable", "available", "healthy", "unhealthy", "unknownFutureValue"}[i] +} +func ParseCloudPcExternalPartnerStatus(v string) (interface{}, error) { + result := NOTAVAILABLE_CLOUDPCEXTERNALPARTNERSTATUS + switch v { + case "notAvailable": + result = NOTAVAILABLE_CLOUDPCEXTERNALPARTNERSTATUS + case "available": + result = AVAILABLE_CLOUDPCEXTERNALPARTNERSTATUS + case "healthy": + result = HEALTHY_CLOUDPCEXTERNALPARTNERSTATUS + case "unhealthy": + result = UNHEALTHY_CLOUDPCEXTERNALPARTNERSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCEXTERNALPARTNERSTATUS + default: + return 0, errors.New("Unknown CloudPcExternalPartnerStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcExternalPartnerStatus(values []CloudPcExternalPartnerStatus) []string { + 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/cloud_pc_gallery_image.go b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image.go new file mode 100644 index 000000000..34f9eee3e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image.go @@ -0,0 +1,347 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcGalleryImage +type CloudPcGalleryImage struct { + Entity + // The official display name of the gallery image. Read-only. + displayName *string + // The date in which this image is no longer within long-term support. The Cloud PC will continue to provide short-term support. Read-only. + endDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The date when the image is no longer available. Read-only. + expirationDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The offer name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. + offer *string + // The official display offer name of the gallery image. For example, Windows 10 Enterprise + OS Optimizations. Read-only. + offerDisplayName *string + // The publisher name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. + publisher *string + // Recommended Cloud PC SKU for this gallery image. Read-only. + recommendedSku *string + // The size of this image in gigabytes. Read-only. + sizeInGB *int32 + // The SKU name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. + sku *string + // The official display stock keeping unit (SKU) name of this gallery image. For example, 2004. Read-only. + skuDisplayName *string + // The date when the image becomes available. Read-only. + startDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The status of the gallery image on the Cloud PC. Possible values are: supported, supportedWithWarning, notSupported, unknownFutureValue. Read-only. + status *CloudPcGalleryImageStatus +} +// NewCloudPcGalleryImage instantiates a new CloudPcGalleryImage and sets the default values. +func NewCloudPcGalleryImage()(*CloudPcGalleryImage) { + m := &CloudPcGalleryImage{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcGalleryImageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcGalleryImageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcGalleryImage(), nil +} +// GetDisplayName gets the displayName property value. The official display name of the gallery image. Read-only. +func (m *CloudPcGalleryImage) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDate gets the endDate property value. The date in which this image is no longer within long-term support. The Cloud PC will continue to provide short-term support. Read-only. +func (m *CloudPcGalleryImage) GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endDate +} +// GetExpirationDate gets the expirationDate property value. The date when the image is no longer available. Read-only. +func (m *CloudPcGalleryImage) GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.expirationDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcGalleryImage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDate(val) + } + return nil + } + res["expirationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDate(val) + } + return nil + } + res["offer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOffer(val) + } + return nil + } + res["offerDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfferDisplayName(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["recommendedSku"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedSku(val) + } + return nil + } + res["sizeInGB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeInGB(val) + } + return nil + } + res["sku"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSku(val) + } + return nil + } + res["skuDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuDisplayName(val) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcGalleryImageStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcGalleryImageStatus)) + } + return nil + } + return res +} +// GetOffer gets the offer property value. The offer name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) GetOffer()(*string) { + return m.offer +} +// GetOfferDisplayName gets the offerDisplayName property value. The official display offer name of the gallery image. For example, Windows 10 Enterprise + OS Optimizations. Read-only. +func (m *CloudPcGalleryImage) GetOfferDisplayName()(*string) { + return m.offerDisplayName +} +// GetPublisher gets the publisher property value. The publisher name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) GetPublisher()(*string) { + return m.publisher +} +// GetRecommendedSku gets the recommendedSku property value. Recommended Cloud PC SKU for this gallery image. Read-only. +func (m *CloudPcGalleryImage) GetRecommendedSku()(*string) { + return m.recommendedSku +} +// GetSizeInGB gets the sizeInGB property value. The size of this image in gigabytes. Read-only. +func (m *CloudPcGalleryImage) GetSizeInGB()(*int32) { + return m.sizeInGB +} +// GetSku gets the sku property value. The SKU name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) GetSku()(*string) { + return m.sku +} +// GetSkuDisplayName gets the skuDisplayName property value. The official display stock keeping unit (SKU) name of this gallery image. For example, 2004. Read-only. +func (m *CloudPcGalleryImage) GetSkuDisplayName()(*string) { + return m.skuDisplayName +} +// GetStartDate gets the startDate property value. The date when the image becomes available. Read-only. +func (m *CloudPcGalleryImage) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startDate +} +// GetStatus gets the status property value. The status of the gallery image on the Cloud PC. Possible values are: supported, supportedWithWarning, notSupported, unknownFutureValue. Read-only. +func (m *CloudPcGalleryImage) GetStatus()(*CloudPcGalleryImageStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CloudPcGalleryImage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("endDate", m.GetEndDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("expirationDate", m.GetExpirationDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("offer", m.GetOffer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("offerDisplayName", m.GetOfferDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recommendedSku", m.GetRecommendedSku()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sizeInGB", m.GetSizeInGB()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sku", m.GetSku()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("skuDisplayName", m.GetSkuDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The official display name of the gallery image. Read-only. +func (m *CloudPcGalleryImage) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDate sets the endDate property value. The date in which this image is no longer within long-term support. The Cloud PC will continue to provide short-term support. Read-only. +func (m *CloudPcGalleryImage) SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endDate = value +} +// SetExpirationDate sets the expirationDate property value. The date when the image is no longer available. Read-only. +func (m *CloudPcGalleryImage) SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.expirationDate = value +} +// SetOffer sets the offer property value. The offer name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) SetOffer(value *string)() { + m.offer = value +} +// SetOfferDisplayName sets the offerDisplayName property value. The official display offer name of the gallery image. For example, Windows 10 Enterprise + OS Optimizations. Read-only. +func (m *CloudPcGalleryImage) SetOfferDisplayName(value *string)() { + m.offerDisplayName = value +} +// SetPublisher sets the publisher property value. The publisher name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) SetPublisher(value *string)() { + m.publisher = value +} +// SetRecommendedSku sets the recommendedSku property value. Recommended Cloud PC SKU for this gallery image. Read-only. +func (m *CloudPcGalleryImage) SetRecommendedSku(value *string)() { + m.recommendedSku = value +} +// SetSizeInGB sets the sizeInGB property value. The size of this image in gigabytes. Read-only. +func (m *CloudPcGalleryImage) SetSizeInGB(value *int32)() { + m.sizeInGB = value +} +// SetSku sets the sku property value. The SKU name of the gallery image. This value will be passed to Azure to get the image resource. Read-only. +func (m *CloudPcGalleryImage) SetSku(value *string)() { + m.sku = value +} +// SetSkuDisplayName sets the skuDisplayName property value. The official display stock keeping unit (SKU) name of this gallery image. For example, 2004. Read-only. +func (m *CloudPcGalleryImage) SetSkuDisplayName(value *string)() { + m.skuDisplayName = value +} +// SetStartDate sets the startDate property value. The date when the image becomes available. Read-only. +func (m *CloudPcGalleryImage) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startDate = value +} +// SetStatus sets the status property value. The status of the gallery image on the Cloud PC. Possible values are: supported, supportedWithWarning, notSupported, unknownFutureValue. Read-only. +func (m *CloudPcGalleryImage) SetStatus(value *CloudPcGalleryImageStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_response.go new file mode 100644 index 000000000..09b641adb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcGalleryImageCollectionResponse +type CloudPcGalleryImageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcGalleryImageable +} +// NewCloudPcGalleryImageCollectionResponse instantiates a new CloudPcGalleryImageCollectionResponse and sets the default values. +func NewCloudPcGalleryImageCollectionResponse()(*CloudPcGalleryImageCollectionResponse) { + m := &CloudPcGalleryImageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcGalleryImageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcGalleryImageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcGalleryImageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcGalleryImageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcGalleryImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcGalleryImageable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcGalleryImageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcGalleryImageCollectionResponse) GetValue()([]CloudPcGalleryImageable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcGalleryImageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcGalleryImageCollectionResponse) SetValue(value []CloudPcGalleryImageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_responseable.go new file mode 100644 index 000000000..3784ac83a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcGalleryImageCollectionResponseable +type CloudPcGalleryImageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcGalleryImageable) + SetValue(value []CloudPcGalleryImageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_status.go new file mode 100644 index 000000000..dac985560 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_image_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcGalleryImageStatus int + +const ( + SUPPORTED_CLOUDPCGALLERYIMAGESTATUS CloudPcGalleryImageStatus = iota + SUPPORTEDWITHWARNING_CLOUDPCGALLERYIMAGESTATUS + NOTSUPPORTED_CLOUDPCGALLERYIMAGESTATUS + UNKNOWNFUTUREVALUE_CLOUDPCGALLERYIMAGESTATUS +) + +func (i CloudPcGalleryImageStatus) String() string { + return []string{"supported", "supportedWithWarning", "notSupported", "unknownFutureValue"}[i] +} +func ParseCloudPcGalleryImageStatus(v string) (interface{}, error) { + result := SUPPORTED_CLOUDPCGALLERYIMAGESTATUS + switch v { + case "supported": + result = SUPPORTED_CLOUDPCGALLERYIMAGESTATUS + case "supportedWithWarning": + result = SUPPORTEDWITHWARNING_CLOUDPCGALLERYIMAGESTATUS + case "notSupported": + result = NOTSUPPORTED_CLOUDPCGALLERYIMAGESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCGALLERYIMAGESTATUS + default: + return 0, errors.New("Unknown CloudPcGalleryImageStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcGalleryImageStatus(values []CloudPcGalleryImageStatus) []string { + 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/cloud_pc_gallery_imageable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_imageable.go new file mode 100644 index 000000000..e0df46479 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_gallery_imageable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcGalleryImageable +type CloudPcGalleryImageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetOffer()(*string) + GetOfferDisplayName()(*string) + GetPublisher()(*string) + GetRecommendedSku()(*string) + GetSizeInGB()(*int32) + GetSku()(*string) + GetSkuDisplayName()(*string) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetStatus()(*CloudPcGalleryImageStatus) + SetDisplayName(value *string)() + SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetOffer(value *string)() + SetOfferDisplayName(value *string)() + SetPublisher(value *string)() + SetRecommendedSku(value *string)() + SetSizeInGB(value *int32)() + SetSku(value *string)() + SetSkuDisplayName(value *string)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetStatus(value *CloudPcGalleryImageStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item.go b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item.go new file mode 100644 index 000000000..4403a4d10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item.go @@ -0,0 +1,177 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcHealthCheckItem +type CloudPcHealthCheckItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Additional message for this health check. + additionalDetails *string + // The connectivity health check item name. + displayName *string + // Timestamp when the last check occurs. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. + lastHealthCheckDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The result property + result *CloudPcConnectivityEventResult +} +// NewCloudPcHealthCheckItem instantiates a new cloudPcHealthCheckItem and sets the default values. +func NewCloudPcHealthCheckItem()(*CloudPcHealthCheckItem) { + m := &CloudPcHealthCheckItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcHealthCheckItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcHealthCheckItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcHealthCheckItem(), 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 *CloudPcHealthCheckItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdditionalDetails gets the additionalDetails property value. Additional message for this health check. +func (m *CloudPcHealthCheckItem) GetAdditionalDetails()(*string) { + return m.additionalDetails +} +// GetDisplayName gets the displayName property value. The connectivity health check item name. +func (m *CloudPcHealthCheckItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcHealthCheckItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalDetails(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastHealthCheckDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastHealthCheckDateTime(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["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcConnectivityEventResult) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*CloudPcConnectivityEventResult)) + } + return nil + } + return res +} +// GetLastHealthCheckDateTime gets the lastHealthCheckDateTime property value. Timestamp when the last check occurs. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. +func (m *CloudPcHealthCheckItem) GetLastHealthCheckDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastHealthCheckDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcHealthCheckItem) GetOdataType()(*string) { + return m.odataType +} +// GetResult gets the result property value. The result property +func (m *CloudPcHealthCheckItem) GetResult()(*CloudPcConnectivityEventResult) { + return m.result +} +// Serialize serializes information the current object +func (m *CloudPcHealthCheckItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("additionalDetails", m.GetAdditionalDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastHealthCheckDateTime", m.GetLastHealthCheckDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err := writer.WriteStringValue("result", &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 *CloudPcHealthCheckItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdditionalDetails sets the additionalDetails property value. Additional message for this health check. +func (m *CloudPcHealthCheckItem) SetAdditionalDetails(value *string)() { + m.additionalDetails = value +} +// SetDisplayName sets the displayName property value. The connectivity health check item name. +func (m *CloudPcHealthCheckItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastHealthCheckDateTime sets the lastHealthCheckDateTime property value. Timestamp when the last check occurs. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as 2014-01-01T00:00:00Z. +func (m *CloudPcHealthCheckItem) SetLastHealthCheckDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastHealthCheckDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcHealthCheckItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetResult sets the result property value. The result property +func (m *CloudPcHealthCheckItem) SetResult(value *CloudPcConnectivityEventResult)() { + m.result = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_response.go new file mode 100644 index 000000000..8e7b238de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcHealthCheckItemCollectionResponse +type CloudPcHealthCheckItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcHealthCheckItemable +} +// NewCloudPcHealthCheckItemCollectionResponse instantiates a new CloudPcHealthCheckItemCollectionResponse and sets the default values. +func NewCloudPcHealthCheckItemCollectionResponse()(*CloudPcHealthCheckItemCollectionResponse) { + m := &CloudPcHealthCheckItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcHealthCheckItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcHealthCheckItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcHealthCheckItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcHealthCheckItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcHealthCheckItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcHealthCheckItemable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcHealthCheckItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcHealthCheckItemCollectionResponse) GetValue()([]CloudPcHealthCheckItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcHealthCheckItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcHealthCheckItemCollectionResponse) SetValue(value []CloudPcHealthCheckItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_responseable.go new file mode 100644 index 000000000..0e92923ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcHealthCheckItemCollectionResponseable +type CloudPcHealthCheckItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcHealthCheckItemable) + SetValue(value []CloudPcHealthCheckItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_itemable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_itemable.go new file mode 100644 index 000000000..3cf068e5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_health_check_itemable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcHealthCheckItemable +type CloudPcHealthCheckItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalDetails()(*string) + GetDisplayName()(*string) + GetLastHealthCheckDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetResult()(*CloudPcConnectivityEventResult) + SetAdditionalDetails(value *string)() + SetDisplayName(value *string)() + SetLastHealthCheckDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetResult(value *CloudPcConnectivityEventResult)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_login_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_login_result.go new file mode 100644 index 000000000..07ff85d64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_login_result.go @@ -0,0 +1,98 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcLoginResult +type CloudPcLoginResult 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 OdataType property + odataType *string + // The time of the Cloud PC sign in action. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. Read-only. + time *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCloudPcLoginResult instantiates a new cloudPcLoginResult and sets the default values. +func NewCloudPcLoginResult()(*CloudPcLoginResult) { + m := &CloudPcLoginResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcLoginResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcLoginResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcLoginResult(), 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 *CloudPcLoginResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcLoginResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["time"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcLoginResult) GetOdataType()(*string) { + return m.odataType +} +// GetTime gets the time property value. The time of the Cloud PC sign in action. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. Read-only. +func (m *CloudPcLoginResult) GetTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.time +} +// Serialize serializes information the current object +func (m *CloudPcLoginResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("time", m.GetTime()) + 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 *CloudPcLoginResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcLoginResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetTime sets the time property value. The time of the Cloud PC sign in action. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. Read-only. +func (m *CloudPcLoginResult) SetTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.time = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_login_resultable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_login_resultable.go new file mode 100644 index 000000000..6f91a0920 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_login_resultable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcLoginResultable +type CloudPcLoginResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetOdataType(value *string)() + SetTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_target.go b/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_target.go new file mode 100644 index 000000000..33bde81e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_target.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcManagementAssignmentTarget +type CloudPcManagementAssignmentTarget 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 OdataType property + odataType *string +} +// NewCloudPcManagementAssignmentTarget instantiates a new cloudPcManagementAssignmentTarget and sets the default values. +func NewCloudPcManagementAssignmentTarget()(*CloudPcManagementAssignmentTarget) { + m := &CloudPcManagementAssignmentTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcManagementAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcManagementAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.cloudPcManagementGroupAssignmentTarget": + return NewCloudPcManagementGroupAssignmentTarget(), nil + } + } + } + } + return NewCloudPcManagementAssignmentTarget(), 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 *CloudPcManagementAssignmentTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcManagementAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcManagementAssignmentTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CloudPcManagementAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CloudPcManagementAssignmentTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcManagementAssignmentTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_targetable.go new file mode 100644 index 000000000..83e0e229b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_management_assignment_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcManagementAssignmentTargetable +type CloudPcManagementAssignmentTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_target.go b/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_target.go new file mode 100644 index 000000000..a1ff4545b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_target.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcManagementGroupAssignmentTarget +type CloudPcManagementGroupAssignmentTarget struct { + CloudPcManagementAssignmentTarget + // The id of the assignment's target group + groupId *string + // The servicePlanId property + servicePlanId *string +} +// NewCloudPcManagementGroupAssignmentTarget instantiates a new CloudPcManagementGroupAssignmentTarget and sets the default values. +func NewCloudPcManagementGroupAssignmentTarget()(*CloudPcManagementGroupAssignmentTarget) { + m := &CloudPcManagementGroupAssignmentTarget{ + CloudPcManagementAssignmentTarget: *NewCloudPcManagementAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.cloudPcManagementGroupAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCloudPcManagementGroupAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcManagementGroupAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcManagementGroupAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcManagementGroupAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CloudPcManagementAssignmentTarget.GetFieldDeserializers() + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["servicePlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanId(val) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The id of the assignment's target group +func (m *CloudPcManagementGroupAssignmentTarget) GetGroupId()(*string) { + return m.groupId +} +// GetServicePlanId gets the servicePlanId property value. The servicePlanId property +func (m *CloudPcManagementGroupAssignmentTarget) GetServicePlanId()(*string) { + return m.servicePlanId +} +// Serialize serializes information the current object +func (m *CloudPcManagementGroupAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CloudPcManagementAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePlanId", m.GetServicePlanId()) + if err != nil { + return err + } + } + return nil +} +// SetGroupId sets the groupId property value. The id of the assignment's target group +func (m *CloudPcManagementGroupAssignmentTarget) SetGroupId(value *string)() { + m.groupId = value +} +// SetServicePlanId sets the servicePlanId property value. The servicePlanId property +func (m *CloudPcManagementGroupAssignmentTarget) SetServicePlanId(value *string)() { + m.servicePlanId = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_targetable.go new file mode 100644 index 000000000..9af6a9168 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_management_group_assignment_targetable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcManagementGroupAssignmentTargetable +type CloudPcManagementGroupAssignmentTargetable interface { + CloudPcManagementAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + GetServicePlanId()(*string) + SetGroupId(value *string)() + SetServicePlanId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_management_service.go b/src/internal/connector/graph/betasdk/models/cloud_pc_management_service.go new file mode 100644 index 000000000..90c0e4819 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_management_service.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcManagementService int + +const ( + WINDOWS365_CLOUDPCMANAGEMENTSERVICE CloudPcManagementService = iota + DEVBOX_CLOUDPCMANAGEMENTSERVICE + UNKNOWNFUTUREVALUE_CLOUDPCMANAGEMENTSERVICE + RPABOX_CLOUDPCMANAGEMENTSERVICE +) + +func (i CloudPcManagementService) String() string { + return []string{"windows365", "devBox", "unknownFutureValue", "rpaBox"}[i] +} +func ParseCloudPcManagementService(v string) (interface{}, error) { + result := WINDOWS365_CLOUDPCMANAGEMENTSERVICE + switch v { + case "windows365": + result = WINDOWS365_CLOUDPCMANAGEMENTSERVICE + case "devBox": + result = DEVBOX_CLOUDPCMANAGEMENTSERVICE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCMANAGEMENTSERVICE + case "rpaBox": + result = RPABOX_CLOUDPCMANAGEMENTSERVICE + default: + return 0, errors.New("Unknown CloudPcManagementService value: " + v) + } + return &result, nil +} +func SerializeCloudPcManagementService(values []CloudPcManagementService) []string { + 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/cloud_pc_on_premises_connection.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection.go new file mode 100644 index 000000000..ca6a40f99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection.go @@ -0,0 +1,479 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnection +type CloudPcOnPremisesConnection struct { + Entity + // The fully qualified domain name (FQDN) of the Active Directory domain you want to join. Optional. + adDomainName *string + // The password associated with adDomainUsername. + adDomainPassword *string + // The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. Required format: admin@contoso.com. Optional. + adDomainUsername *string + // The interface URL of the partner service's resource that links to this Azure network connection. Returned only on $select. + alternateResourceUrl *string + // The display name for the Azure network connection. + displayName *string + // The healthCheckStatus property + healthCheckStatus *CloudPcOnPremisesConnectionStatus + // The details of the connection's health checks and the corresponding results. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. + healthCheckStatusDetails CloudPcOnPremisesConnectionStatusDetailsable + // When true, the Azure network connection is in use. When false, the connection is not in use. You cannot delete a connection that’s in use. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. + inUse *bool + // The managedBy property + managedBy *CloudPcManagementService + // The organizational unit (OU) in which the computer account is created. If left null, the OU that’s configured as the default (a well-known computer object container) in your Active Directory domain (OU) is used. Optional. + organizationalUnit *string + // The ID of the target resource group. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}. + resourceGroupId *string + // The ID of the target subnet. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}. + subnetId *string + // The ID of the target Azure subscription that’s associated with your tenant. + subscriptionId *string + // The name of the target Azure subscription. Read-only. + subscriptionName *string + // Specifies how the provisioned Cloud PC will be joined to Azure Active Directory. Default value is hybridAzureADJoin. Possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. + type_escaped *CloudPcOnPremisesConnectionType + // The ID of the target virtual network. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}. + virtualNetworkId *string + // Indicates resource location of the virtual target network. Read-only, computed value. + virtualNetworkLocation *string +} +// NewCloudPcOnPremisesConnection instantiates a new CloudPcOnPremisesConnection and sets the default values. +func NewCloudPcOnPremisesConnection()(*CloudPcOnPremisesConnection) { + m := &CloudPcOnPremisesConnection{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcOnPremisesConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnection(), nil +} +// GetAdDomainName gets the adDomainName property value. The fully qualified domain name (FQDN) of the Active Directory domain you want to join. Optional. +func (m *CloudPcOnPremisesConnection) GetAdDomainName()(*string) { + return m.adDomainName +} +// GetAdDomainPassword gets the adDomainPassword property value. The password associated with adDomainUsername. +func (m *CloudPcOnPremisesConnection) GetAdDomainPassword()(*string) { + return m.adDomainPassword +} +// GetAdDomainUsername gets the adDomainUsername property value. The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. Required format: admin@contoso.com. Optional. +func (m *CloudPcOnPremisesConnection) GetAdDomainUsername()(*string) { + return m.adDomainUsername +} +// GetAlternateResourceUrl gets the alternateResourceUrl property value. The interface URL of the partner service's resource that links to this Azure network connection. Returned only on $select. +func (m *CloudPcOnPremisesConnection) GetAlternateResourceUrl()(*string) { + return m.alternateResourceUrl +} +// GetDisplayName gets the displayName property value. The display name for the Azure network connection. +func (m *CloudPcOnPremisesConnection) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["adDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdDomainName(val) + } + return nil + } + res["adDomainPassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdDomainPassword(val) + } + return nil + } + res["adDomainUsername"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdDomainUsername(val) + } + return nil + } + res["alternateResourceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateResourceUrl(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["healthCheckStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOnPremisesConnectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetHealthCheckStatus(val.(*CloudPcOnPremisesConnectionStatus)) + } + return nil + } + res["healthCheckStatusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcOnPremisesConnectionStatusDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHealthCheckStatusDetails(val.(CloudPcOnPremisesConnectionStatusDetailsable)) + } + return nil + } + res["inUse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInUse(val) + } + return nil + } + res["managedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcManagementService) + if err != nil { + return err + } + if val != nil { + m.SetManagedBy(val.(*CloudPcManagementService)) + } + return nil + } + res["organizationalUnit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationalUnit(val) + } + return nil + } + res["resourceGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceGroupId(val) + } + return nil + } + res["subnetId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubnetId(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + res["subscriptionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOnPremisesConnectionType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CloudPcOnPremisesConnectionType)) + } + return nil + } + res["virtualNetworkId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVirtualNetworkId(val) + } + return nil + } + res["virtualNetworkLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVirtualNetworkLocation(val) + } + return nil + } + return res +} +// GetHealthCheckStatus gets the healthCheckStatus property value. The healthCheckStatus property +func (m *CloudPcOnPremisesConnection) GetHealthCheckStatus()(*CloudPcOnPremisesConnectionStatus) { + return m.healthCheckStatus +} +// GetHealthCheckStatusDetails gets the healthCheckStatusDetails property value. The details of the connection's health checks and the corresponding results. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. +func (m *CloudPcOnPremisesConnection) GetHealthCheckStatusDetails()(CloudPcOnPremisesConnectionStatusDetailsable) { + return m.healthCheckStatusDetails +} +// GetInUse gets the inUse property value. When true, the Azure network connection is in use. When false, the connection is not in use. You cannot delete a connection that’s in use. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. +func (m *CloudPcOnPremisesConnection) GetInUse()(*bool) { + return m.inUse +} +// GetManagedBy gets the managedBy property value. The managedBy property +func (m *CloudPcOnPremisesConnection) GetManagedBy()(*CloudPcManagementService) { + return m.managedBy +} +// GetOrganizationalUnit gets the organizationalUnit property value. The organizational unit (OU) in which the computer account is created. If left null, the OU that’s configured as the default (a well-known computer object container) in your Active Directory domain (OU) is used. Optional. +func (m *CloudPcOnPremisesConnection) GetOrganizationalUnit()(*string) { + return m.organizationalUnit +} +// GetResourceGroupId gets the resourceGroupId property value. The ID of the target resource group. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}. +func (m *CloudPcOnPremisesConnection) GetResourceGroupId()(*string) { + return m.resourceGroupId +} +// GetSubnetId gets the subnetId property value. The ID of the target subnet. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}. +func (m *CloudPcOnPremisesConnection) GetSubnetId()(*string) { + return m.subnetId +} +// GetSubscriptionId gets the subscriptionId property value. The ID of the target Azure subscription that’s associated with your tenant. +func (m *CloudPcOnPremisesConnection) GetSubscriptionId()(*string) { + return m.subscriptionId +} +// GetSubscriptionName gets the subscriptionName property value. The name of the target Azure subscription. Read-only. +func (m *CloudPcOnPremisesConnection) GetSubscriptionName()(*string) { + return m.subscriptionName +} +// GetType gets the type property value. Specifies how the provisioned Cloud PC will be joined to Azure Active Directory. Default value is hybridAzureADJoin. Possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. +func (m *CloudPcOnPremisesConnection) GetType()(*CloudPcOnPremisesConnectionType) { + return m.type_escaped +} +// GetVirtualNetworkId gets the virtualNetworkId property value. The ID of the target virtual network. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}. +func (m *CloudPcOnPremisesConnection) GetVirtualNetworkId()(*string) { + return m.virtualNetworkId +} +// GetVirtualNetworkLocation gets the virtualNetworkLocation property value. Indicates resource location of the virtual target network. Read-only, computed value. +func (m *CloudPcOnPremisesConnection) GetVirtualNetworkLocation()(*string) { + return m.virtualNetworkLocation +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("adDomainName", m.GetAdDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("adDomainPassword", m.GetAdDomainPassword()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("adDomainUsername", m.GetAdDomainUsername()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("alternateResourceUrl", m.GetAlternateResourceUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHealthCheckStatus() != nil { + cast := (*m.GetHealthCheckStatus()).String() + err = writer.WriteStringValue("healthCheckStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("healthCheckStatusDetails", m.GetHealthCheckStatusDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("inUse", m.GetInUse()) + if err != nil { + return err + } + } + if m.GetManagedBy() != nil { + cast := (*m.GetManagedBy()).String() + err = writer.WriteStringValue("managedBy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("organizationalUnit", m.GetOrganizationalUnit()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceGroupId", m.GetResourceGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subnetId", m.GetSubnetId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subscriptionName", m.GetSubscriptionName()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("virtualNetworkId", m.GetVirtualNetworkId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("virtualNetworkLocation", m.GetVirtualNetworkLocation()) + if err != nil { + return err + } + } + return nil +} +// SetAdDomainName sets the adDomainName property value. The fully qualified domain name (FQDN) of the Active Directory domain you want to join. Optional. +func (m *CloudPcOnPremisesConnection) SetAdDomainName(value *string)() { + m.adDomainName = value +} +// SetAdDomainPassword sets the adDomainPassword property value. The password associated with adDomainUsername. +func (m *CloudPcOnPremisesConnection) SetAdDomainPassword(value *string)() { + m.adDomainPassword = value +} +// SetAdDomainUsername sets the adDomainUsername property value. The username of an Active Directory account (user or service account) that has permissions to create computer objects in Active Directory. Required format: admin@contoso.com. Optional. +func (m *CloudPcOnPremisesConnection) SetAdDomainUsername(value *string)() { + m.adDomainUsername = value +} +// SetAlternateResourceUrl sets the alternateResourceUrl property value. The interface URL of the partner service's resource that links to this Azure network connection. Returned only on $select. +func (m *CloudPcOnPremisesConnection) SetAlternateResourceUrl(value *string)() { + m.alternateResourceUrl = value +} +// SetDisplayName sets the displayName property value. The display name for the Azure network connection. +func (m *CloudPcOnPremisesConnection) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHealthCheckStatus sets the healthCheckStatus property value. The healthCheckStatus property +func (m *CloudPcOnPremisesConnection) SetHealthCheckStatus(value *CloudPcOnPremisesConnectionStatus)() { + m.healthCheckStatus = value +} +// SetHealthCheckStatusDetails sets the healthCheckStatusDetails property value. The details of the connection's health checks and the corresponding results. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. +func (m *CloudPcOnPremisesConnection) SetHealthCheckStatusDetails(value CloudPcOnPremisesConnectionStatusDetailsable)() { + m.healthCheckStatusDetails = value +} +// SetInUse sets the inUse property value. When true, the Azure network connection is in use. When false, the connection is not in use. You cannot delete a connection that’s in use. Returned only on $select. For an example that shows how to get the inUse property, see Example 2: Get the selected properties of an Azure network connection, including healthCheckStatusDetails. Read-only. +func (m *CloudPcOnPremisesConnection) SetInUse(value *bool)() { + m.inUse = value +} +// SetManagedBy sets the managedBy property value. The managedBy property +func (m *CloudPcOnPremisesConnection) SetManagedBy(value *CloudPcManagementService)() { + m.managedBy = value +} +// SetOrganizationalUnit sets the organizationalUnit property value. The organizational unit (OU) in which the computer account is created. If left null, the OU that’s configured as the default (a well-known computer object container) in your Active Directory domain (OU) is used. Optional. +func (m *CloudPcOnPremisesConnection) SetOrganizationalUnit(value *string)() { + m.organizationalUnit = value +} +// SetResourceGroupId sets the resourceGroupId property value. The ID of the target resource group. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}. +func (m *CloudPcOnPremisesConnection) SetResourceGroupId(value *string)() { + m.resourceGroupId = value +} +// SetSubnetId sets the subnetId property value. The ID of the target subnet. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkId}/subnets/{subnetName}. +func (m *CloudPcOnPremisesConnection) SetSubnetId(value *string)() { + m.subnetId = value +} +// SetSubscriptionId sets the subscriptionId property value. The ID of the target Azure subscription that’s associated with your tenant. +func (m *CloudPcOnPremisesConnection) SetSubscriptionId(value *string)() { + m.subscriptionId = value +} +// SetSubscriptionName sets the subscriptionName property value. The name of the target Azure subscription. Read-only. +func (m *CloudPcOnPremisesConnection) SetSubscriptionName(value *string)() { + m.subscriptionName = value +} +// SetType sets the type property value. Specifies how the provisioned Cloud PC will be joined to Azure Active Directory. Default value is hybridAzureADJoin. Possible values are: azureADJoin, hybridAzureADJoin, unknownFutureValue. +func (m *CloudPcOnPremisesConnection) SetType(value *CloudPcOnPremisesConnectionType)() { + m.type_escaped = value +} +// SetVirtualNetworkId sets the virtualNetworkId property value. The ID of the target virtual network. Required format: /subscriptions/{subscription-id}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/virtualNetworks/{virtualNetworkName}. +func (m *CloudPcOnPremisesConnection) SetVirtualNetworkId(value *string)() { + m.virtualNetworkId = value +} +// SetVirtualNetworkLocation sets the virtualNetworkLocation property value. Indicates resource location of the virtual target network. Read-only, computed value. +func (m *CloudPcOnPremisesConnection) SetVirtualNetworkLocation(value *string)() { + m.virtualNetworkLocation = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_response.go new file mode 100644 index 000000000..fcff11444 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionCollectionResponse +type CloudPcOnPremisesConnectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcOnPremisesConnectionable +} +// NewCloudPcOnPremisesConnectionCollectionResponse instantiates a new CloudPcOnPremisesConnectionCollectionResponse and sets the default values. +func NewCloudPcOnPremisesConnectionCollectionResponse()(*CloudPcOnPremisesConnectionCollectionResponse) { + m := &CloudPcOnPremisesConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcOnPremisesConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOnPremisesConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOnPremisesConnectionable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcOnPremisesConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcOnPremisesConnectionCollectionResponse) GetValue()([]CloudPcOnPremisesConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcOnPremisesConnectionCollectionResponse) SetValue(value []CloudPcOnPremisesConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_responseable.go new file mode 100644 index 000000000..be47f0439 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionCollectionResponseable +type CloudPcOnPremisesConnectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcOnPremisesConnectionable) + SetValue(value []CloudPcOnPremisesConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check.go new file mode 100644 index 000000000..d6d48a6f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check.go @@ -0,0 +1,256 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionHealthCheck +type CloudPcOnPremisesConnectionHealthCheck struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Additional details about the health check or the recommended action. + additionalDetails *string + // The display name for this health check item. + displayName *string + // The end time of the health check item. Read-only. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of error that occurred during this health check. + errorType *CloudPcOnPremisesConnectionHealthCheckErrorType + // The OdataType property + odataType *string + // The recommended action to fix the corresponding error. + recommendedAction *string + // The start time of the health check item. Read-only. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *CloudPcOnPremisesConnectionStatus +} +// NewCloudPcOnPremisesConnectionHealthCheck instantiates a new cloudPcOnPremisesConnectionHealthCheck and sets the default values. +func NewCloudPcOnPremisesConnectionHealthCheck()(*CloudPcOnPremisesConnectionHealthCheck) { + m := &CloudPcOnPremisesConnectionHealthCheck{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcOnPremisesConnectionHealthCheckFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionHealthCheckFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnectionHealthCheck(), 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 *CloudPcOnPremisesConnectionHealthCheck) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdditionalDetails gets the additionalDetails property value. Additional details about the health check or the recommended action. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetAdditionalDetails()(*string) { + return m.additionalDetails +} +// GetDisplayName gets the displayName property value. The display name for this health check item. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDateTime gets the endDateTime property value. The end time of the health check item. Read-only. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetErrorType gets the errorType property value. The type of error that occurred during this health check. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetErrorType()(*CloudPcOnPremisesConnectionHealthCheckErrorType) { + return m.errorType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnectionHealthCheck) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalDetails(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["errorType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOnPremisesConnectionHealthCheckErrorType) + if err != nil { + return err + } + if val != nil { + m.SetErrorType(val.(*CloudPcOnPremisesConnectionHealthCheckErrorType)) + } + 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["recommendedAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedAction(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOnPremisesConnectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcOnPremisesConnectionStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionHealthCheck) GetOdataType()(*string) { + return m.odataType +} +// GetRecommendedAction gets the recommendedAction property value. The recommended action to fix the corresponding error. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetRecommendedAction()(*string) { + return m.recommendedAction +} +// GetStartDateTime gets the startDateTime property value. The start time of the health check item. Read-only. +func (m *CloudPcOnPremisesConnectionHealthCheck) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. The status property +func (m *CloudPcOnPremisesConnectionHealthCheck) GetStatus()(*CloudPcOnPremisesConnectionStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnectionHealthCheck) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("additionalDetails", m.GetAdditionalDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetErrorType() != nil { + cast := (*m.GetErrorType()).String() + err := writer.WriteStringValue("errorType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recommendedAction", m.GetRecommendedAction()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *CloudPcOnPremisesConnectionHealthCheck) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdditionalDetails sets the additionalDetails property value. Additional details about the health check or the recommended action. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetAdditionalDetails(value *string)() { + m.additionalDetails = value +} +// SetDisplayName sets the displayName property value. The display name for this health check item. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDateTime sets the endDateTime property value. The end time of the health check item. Read-only. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetErrorType sets the errorType property value. The type of error that occurred during this health check. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetErrorType(value *CloudPcOnPremisesConnectionHealthCheckErrorType)() { + m.errorType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionHealthCheck) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommendedAction sets the recommendedAction property value. The recommended action to fix the corresponding error. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetRecommendedAction(value *string)() { + m.recommendedAction = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the health check item. Read-only. +func (m *CloudPcOnPremisesConnectionHealthCheck) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *CloudPcOnPremisesConnectionHealthCheck) SetStatus(value *CloudPcOnPremisesConnectionStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_response.go new file mode 100644 index 000000000..0d4b05d4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionHealthCheckCollectionResponse +type CloudPcOnPremisesConnectionHealthCheckCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcOnPremisesConnectionHealthCheckable +} +// NewCloudPcOnPremisesConnectionHealthCheckCollectionResponse instantiates a new CloudPcOnPremisesConnectionHealthCheckCollectionResponse and sets the default values. +func NewCloudPcOnPremisesConnectionHealthCheckCollectionResponse()(*CloudPcOnPremisesConnectionHealthCheckCollectionResponse) { + m := &CloudPcOnPremisesConnectionHealthCheckCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcOnPremisesConnectionHealthCheckCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionHealthCheckCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnectionHealthCheckCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnectionHealthCheckCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOnPremisesConnectionHealthCheckFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOnPremisesConnectionHealthCheckable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcOnPremisesConnectionHealthCheckable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcOnPremisesConnectionHealthCheckCollectionResponse) GetValue()([]CloudPcOnPremisesConnectionHealthCheckable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnectionHealthCheckCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcOnPremisesConnectionHealthCheckCollectionResponse) SetValue(value []CloudPcOnPremisesConnectionHealthCheckable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_responseable.go new file mode 100644 index 000000000..c93b58d63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionHealthCheckCollectionResponseable +type CloudPcOnPremisesConnectionHealthCheckCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcOnPremisesConnectionHealthCheckable) + SetValue(value []CloudPcOnPremisesConnectionHealthCheckable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_error_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_error_type.go new file mode 100644 index 000000000..caeef0f84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_check_error_type.go @@ -0,0 +1,211 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcOnPremisesConnectionHealthCheckErrorType int + +const ( + DNSCHECKFQDNNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE CloudPcOnPremisesConnectionHealthCheckErrorType = iota + DNSCHECKNAMEWITHINVALIDCHARACTER_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + DNSCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKFQDNNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKINCORRECTCREDENTIALS_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKORGANIZATIONALUNITNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKORGANIZATIONALUNITINCORRECTFORMAT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKCOMPUTEROBJECTALREADYEXISTS_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKACCESSDENIED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKCREDENTIALSEXPIRED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKACCOUNTLOCKEDORDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKACCOUNTQUOTAEXCEEDED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ADJOINCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKCLOUDPCURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKWVDURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKINTUNEURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKAZUREADURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKLOCALEURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + ENDPOINTCONNECTIVITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKDEVICENOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKLONGSYNCCIRCLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKCONNECTDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKDURATIONEXCEEDED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKSCPNOTCONFIGURED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + AZUREADDEVICESYNCCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKNOSUBNETIP_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBSCRIPTIONDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKAZUREPOLICYVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBSCRIPTIONNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBSCRIPTIONTRANSFERRED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKGENERALSUBSCRIPTIONERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKUNSUPPORTEDVNETREGION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKRESOURCEGROUPINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKVNETINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBNETINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKRESOURCEGROUPBEINGDELETED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKVNETBEINGMOVED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBNETDELEGATIONFAILED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKSUBNETWITHEXTERNALRESOURCES_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKRESOURCEGROUPLOCKEDFORREADONLY_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKRESOURCEGROUPLOCKEDFORDELETE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKNOINTUNEREADERROLEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKINTUNEDEFAULTWINDOWSRESTRICTIONVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKINTUNECUSTOMWINDOWSRESTRICTIONVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + RESOURCEAVAILABILITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKNOSUBSCRIPTIONREADERROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKNORESOURCEGROUPOWNERROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKNOVNETCONTRIBUTORROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKNORESOURCEGROUPNETWORKCONTRIBUTORROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + PERMISSIONCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + UDPCONNECTIVITYCHECKSTUNURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + UDPCONNECTIVITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + INTERNALSERVERERRORDEPLOYMENTCANCELED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + INTERNALSERVERERRORALLOCATERESOURCEFAILED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + INTERNALSERVERERRORVMDEPLOYMENTTIMEOUT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + INTERNALSERVERERRORUNABLETORUNDSCSCRIPT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + INTERNALSERVERUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE +) + +func (i CloudPcOnPremisesConnectionHealthCheckErrorType) String() string { + return []string{"dnsCheckFqdnNotFound", "dnsCheckNameWithInvalidCharacter", "dnsCheckUnknownError", "adJoinCheckFqdnNotFound", "adJoinCheckIncorrectCredentials", "adJoinCheckOrganizationalUnitNotFound", "adJoinCheckOrganizationalUnitIncorrectFormat", "adJoinCheckComputerObjectAlreadyExists", "adJoinCheckAccessDenied", "adJoinCheckCredentialsExpired", "adJoinCheckAccountLockedOrDisabled", "adJoinCheckAccountQuotaExceeded", "adJoinCheckUnknownError", "endpointConnectivityCheckCloudPcUrlNotAllowListed", "endpointConnectivityCheckWVDUrlNotAllowListed", "endpointConnectivityCheckIntuneUrlNotAllowListed", "endpointConnectivityCheckAzureADUrlNotAllowListed", "endpointConnectivityCheckLocaleUrlNotAllowListed", "endpointConnectivityCheckUnknownError", "azureAdDeviceSyncCheckDeviceNotFound", "azureAdDeviceSyncCheckLongSyncCircle", "azureAdDeviceSyncCheckConnectDisabled", "azureAdDeviceSyncCheckDurationExceeded", "azureAdDeviceSyncCheckScpNotConfigured", "azureAdDeviceSyncCheckTransientServiceError", "azureAdDeviceSyncCheckUnknownError", "resourceAvailabilityCheckNoSubnetIP", "resourceAvailabilityCheckSubscriptionDisabled", "resourceAvailabilityCheckAzurePolicyViolation", "resourceAvailabilityCheckSubscriptionNotFound", "resourceAvailabilityCheckSubscriptionTransferred", "resourceAvailabilityCheckGeneralSubscriptionError", "resourceAvailabilityCheckUnsupportedVNetRegion", "resourceAvailabilityCheckResourceGroupInvalid", "resourceAvailabilityCheckVNetInvalid", "resourceAvailabilityCheckSubnetInvalid", "resourceAvailabilityCheckResourceGroupBeingDeleted", "resourceAvailabilityCheckVNetBeingMoved", "resourceAvailabilityCheckSubnetDelegationFailed", "resourceAvailabilityCheckSubnetWithExternalResources", "resourceAvailabilityCheckResourceGroupLockedForReadonly", "resourceAvailabilityCheckResourceGroupLockedForDelete", "resourceAvailabilityCheckNoIntuneReaderRoleError", "resourceAvailabilityCheckIntuneDefaultWindowsRestrictionViolation", "resourceAvailabilityCheckIntuneCustomWindowsRestrictionViolation", "resourceAvailabilityCheckTransientServiceError", "resourceAvailabilityCheckUnknownError", "permissionCheckNoSubscriptionReaderRole", "permissionCheckNoResourceGroupOwnerRole", "permissionCheckNoVNetContributorRole", "permissionCheckNoResourceGroupNetworkContributorRole", "permissionCheckTransientServiceError", "permissionCheckUnknownError", "udpConnectivityCheckStunUrlNotAllowListed", "udpConnectivityCheckUnknownError", "internalServerErrorDeploymentCanceled", "internalServerErrorAllocateResourceFailed", "internalServerErrorVMDeploymentTimeout", "internalServerErrorUnableToRunDscScript", "internalServerUnknownError", "unknownFutureValue"}[i] +} +func ParseCloudPcOnPremisesConnectionHealthCheckErrorType(v string) (interface{}, error) { + result := DNSCHECKFQDNNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + switch v { + case "dnsCheckFqdnNotFound": + result = DNSCHECKFQDNNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "dnsCheckNameWithInvalidCharacter": + result = DNSCHECKNAMEWITHINVALIDCHARACTER_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "dnsCheckUnknownError": + result = DNSCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckFqdnNotFound": + result = ADJOINCHECKFQDNNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckIncorrectCredentials": + result = ADJOINCHECKINCORRECTCREDENTIALS_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckOrganizationalUnitNotFound": + result = ADJOINCHECKORGANIZATIONALUNITNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckOrganizationalUnitIncorrectFormat": + result = ADJOINCHECKORGANIZATIONALUNITINCORRECTFORMAT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckComputerObjectAlreadyExists": + result = ADJOINCHECKCOMPUTEROBJECTALREADYEXISTS_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckAccessDenied": + result = ADJOINCHECKACCESSDENIED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckCredentialsExpired": + result = ADJOINCHECKCREDENTIALSEXPIRED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckAccountLockedOrDisabled": + result = ADJOINCHECKACCOUNTLOCKEDORDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckAccountQuotaExceeded": + result = ADJOINCHECKACCOUNTQUOTAEXCEEDED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "adJoinCheckUnknownError": + result = ADJOINCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckCloudPcUrlNotAllowListed": + result = ENDPOINTCONNECTIVITYCHECKCLOUDPCURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckWVDUrlNotAllowListed": + result = ENDPOINTCONNECTIVITYCHECKWVDURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckIntuneUrlNotAllowListed": + result = ENDPOINTCONNECTIVITYCHECKINTUNEURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckAzureADUrlNotAllowListed": + result = ENDPOINTCONNECTIVITYCHECKAZUREADURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckLocaleUrlNotAllowListed": + result = ENDPOINTCONNECTIVITYCHECKLOCALEURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "endpointConnectivityCheckUnknownError": + result = ENDPOINTCONNECTIVITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckDeviceNotFound": + result = AZUREADDEVICESYNCCHECKDEVICENOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckLongSyncCircle": + result = AZUREADDEVICESYNCCHECKLONGSYNCCIRCLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckConnectDisabled": + result = AZUREADDEVICESYNCCHECKCONNECTDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckDurationExceeded": + result = AZUREADDEVICESYNCCHECKDURATIONEXCEEDED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckScpNotConfigured": + result = AZUREADDEVICESYNCCHECKSCPNOTCONFIGURED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckTransientServiceError": + result = AZUREADDEVICESYNCCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "azureAdDeviceSyncCheckUnknownError": + result = AZUREADDEVICESYNCCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckNoSubnetIP": + result = RESOURCEAVAILABILITYCHECKNOSUBNETIP_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubscriptionDisabled": + result = RESOURCEAVAILABILITYCHECKSUBSCRIPTIONDISABLED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckAzurePolicyViolation": + result = RESOURCEAVAILABILITYCHECKAZUREPOLICYVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubscriptionNotFound": + result = RESOURCEAVAILABILITYCHECKSUBSCRIPTIONNOTFOUND_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubscriptionTransferred": + result = RESOURCEAVAILABILITYCHECKSUBSCRIPTIONTRANSFERRED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckGeneralSubscriptionError": + result = RESOURCEAVAILABILITYCHECKGENERALSUBSCRIPTIONERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckUnsupportedVNetRegion": + result = RESOURCEAVAILABILITYCHECKUNSUPPORTEDVNETREGION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckResourceGroupInvalid": + result = RESOURCEAVAILABILITYCHECKRESOURCEGROUPINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckVNetInvalid": + result = RESOURCEAVAILABILITYCHECKVNETINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubnetInvalid": + result = RESOURCEAVAILABILITYCHECKSUBNETINVALID_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckResourceGroupBeingDeleted": + result = RESOURCEAVAILABILITYCHECKRESOURCEGROUPBEINGDELETED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckVNetBeingMoved": + result = RESOURCEAVAILABILITYCHECKVNETBEINGMOVED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubnetDelegationFailed": + result = RESOURCEAVAILABILITYCHECKSUBNETDELEGATIONFAILED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckSubnetWithExternalResources": + result = RESOURCEAVAILABILITYCHECKSUBNETWITHEXTERNALRESOURCES_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckResourceGroupLockedForReadonly": + result = RESOURCEAVAILABILITYCHECKRESOURCEGROUPLOCKEDFORREADONLY_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckResourceGroupLockedForDelete": + result = RESOURCEAVAILABILITYCHECKRESOURCEGROUPLOCKEDFORDELETE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckNoIntuneReaderRoleError": + result = RESOURCEAVAILABILITYCHECKNOINTUNEREADERROLEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckIntuneDefaultWindowsRestrictionViolation": + result = RESOURCEAVAILABILITYCHECKINTUNEDEFAULTWINDOWSRESTRICTIONVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckIntuneCustomWindowsRestrictionViolation": + result = RESOURCEAVAILABILITYCHECKINTUNECUSTOMWINDOWSRESTRICTIONVIOLATION_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckTransientServiceError": + result = RESOURCEAVAILABILITYCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "resourceAvailabilityCheckUnknownError": + result = RESOURCEAVAILABILITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckNoSubscriptionReaderRole": + result = PERMISSIONCHECKNOSUBSCRIPTIONREADERROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckNoResourceGroupOwnerRole": + result = PERMISSIONCHECKNORESOURCEGROUPOWNERROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckNoVNetContributorRole": + result = PERMISSIONCHECKNOVNETCONTRIBUTORROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckNoResourceGroupNetworkContributorRole": + result = PERMISSIONCHECKNORESOURCEGROUPNETWORKCONTRIBUTORROLE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckTransientServiceError": + result = PERMISSIONCHECKTRANSIENTSERVICEERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "permissionCheckUnknownError": + result = PERMISSIONCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "udpConnectivityCheckStunUrlNotAllowListed": + result = UDPCONNECTIVITYCHECKSTUNURLNOTALLOWLISTED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "udpConnectivityCheckUnknownError": + result = UDPCONNECTIVITYCHECKUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "internalServerErrorDeploymentCanceled": + result = INTERNALSERVERERRORDEPLOYMENTCANCELED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "internalServerErrorAllocateResourceFailed": + result = INTERNALSERVERERRORALLOCATERESOURCEFAILED_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "internalServerErrorVMDeploymentTimeout": + result = INTERNALSERVERERRORVMDEPLOYMENTTIMEOUT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "internalServerErrorUnableToRunDscScript": + result = INTERNALSERVERERRORUNABLETORUNDSCSCRIPT_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "internalServerUnknownError": + result = INTERNALSERVERUNKNOWNERROR_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONHEALTHCHECKERRORTYPE + default: + return 0, errors.New("Unknown CloudPcOnPremisesConnectionHealthCheckErrorType value: " + v) + } + return &result, nil +} +func SerializeCloudPcOnPremisesConnectionHealthCheckErrorType(values []CloudPcOnPremisesConnectionHealthCheckErrorType) []string { + 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/cloud_pc_on_premises_connection_health_checkable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_checkable.go new file mode 100644 index 000000000..fb4533e85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_health_checkable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionHealthCheckable +type CloudPcOnPremisesConnectionHealthCheckable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalDetails()(*string) + GetDisplayName()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetErrorType()(*CloudPcOnPremisesConnectionHealthCheckErrorType) + GetOdataType()(*string) + GetRecommendedAction()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*CloudPcOnPremisesConnectionStatus) + SetAdditionalDetails(value *string)() + SetDisplayName(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetErrorType(value *CloudPcOnPremisesConnectionHealthCheckErrorType)() + SetOdataType(value *string)() + SetRecommendedAction(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *CloudPcOnPremisesConnectionStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status.go new file mode 100644 index 000000000..ca442dc10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcOnPremisesConnectionStatus int + +const ( + PENDING_CLOUDPCONPREMISESCONNECTIONSTATUS CloudPcOnPremisesConnectionStatus = iota + RUNNING_CLOUDPCONPREMISESCONNECTIONSTATUS + PASSED_CLOUDPCONPREMISESCONNECTIONSTATUS + FAILED_CLOUDPCONPREMISESCONNECTIONSTATUS + WARNING_CLOUDPCONPREMISESCONNECTIONSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONSTATUS +) + +func (i CloudPcOnPremisesConnectionStatus) String() string { + return []string{"pending", "running", "passed", "failed", "warning", "unknownFutureValue"}[i] +} +func ParseCloudPcOnPremisesConnectionStatus(v string) (interface{}, error) { + result := PENDING_CLOUDPCONPREMISESCONNECTIONSTATUS + switch v { + case "pending": + result = PENDING_CLOUDPCONPREMISESCONNECTIONSTATUS + case "running": + result = RUNNING_CLOUDPCONPREMISESCONNECTIONSTATUS + case "passed": + result = PASSED_CLOUDPCONPREMISESCONNECTIONSTATUS + case "failed": + result = FAILED_CLOUDPCONPREMISESCONNECTIONSTATUS + case "warning": + result = WARNING_CLOUDPCONPREMISESCONNECTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONSTATUS + default: + return 0, errors.New("Unknown CloudPcOnPremisesConnectionStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcOnPremisesConnectionStatus(values []CloudPcOnPremisesConnectionStatus) []string { + 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/cloud_pc_on_premises_connection_status_details.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status_details.go new file mode 100644 index 000000000..bdf44baee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status_details.go @@ -0,0 +1,158 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionStatusDetails +type CloudPcOnPremisesConnectionStatusDetails 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 end time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // All checks that are done on the connection. + healthChecks []CloudPcOnPremisesConnectionHealthCheckable + // The OdataType property + odataType *string + // The start time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCloudPcOnPremisesConnectionStatusDetails instantiates a new cloudPcOnPremisesConnectionStatusDetails and sets the default values. +func NewCloudPcOnPremisesConnectionStatusDetails()(*CloudPcOnPremisesConnectionStatusDetails) { + m := &CloudPcOnPremisesConnectionStatusDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcOnPremisesConnectionStatusDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOnPremisesConnectionStatusDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOnPremisesConnectionStatusDetails(), 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 *CloudPcOnPremisesConnectionStatusDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDateTime gets the endDateTime property value. The end time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcOnPremisesConnectionStatusDetails) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOnPremisesConnectionStatusDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["healthChecks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOnPremisesConnectionHealthCheckFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOnPremisesConnectionHealthCheckable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcOnPremisesConnectionHealthCheckable) + } + m.SetHealthChecks(res) + } + 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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetHealthChecks gets the healthChecks property value. All checks that are done on the connection. +func (m *CloudPcOnPremisesConnectionStatusDetails) GetHealthChecks()([]CloudPcOnPremisesConnectionHealthCheckable) { + return m.healthChecks +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionStatusDetails) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The start time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcOnPremisesConnectionStatusDetails) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *CloudPcOnPremisesConnectionStatusDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + if m.GetHealthChecks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHealthChecks())) + for i, v := range m.GetHealthChecks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("healthChecks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + 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 *CloudPcOnPremisesConnectionStatusDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDateTime sets the endDateTime property value. The end time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcOnPremisesConnectionStatusDetails) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetHealthChecks sets the healthChecks property value. All checks that are done on the connection. +func (m *CloudPcOnPremisesConnectionStatusDetails) SetHealthChecks(value []CloudPcOnPremisesConnectionHealthCheckable)() { + m.healthChecks = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcOnPremisesConnectionStatusDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the connection health check. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcOnPremisesConnectionStatusDetails) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status_detailsable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status_detailsable.go new file mode 100644 index 000000000..f41a4a1f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_status_detailsable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionStatusDetailsable +type CloudPcOnPremisesConnectionStatusDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHealthChecks()([]CloudPcOnPremisesConnectionHealthCheckable) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHealthChecks(value []CloudPcOnPremisesConnectionHealthCheckable)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_type.go new file mode 100644 index 000000000..20858f6c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connection_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcOnPremisesConnectionType int + +const ( + HYBRIDAZUREADJOIN_CLOUDPCONPREMISESCONNECTIONTYPE CloudPcOnPremisesConnectionType = iota + AZUREADJOIN_CLOUDPCONPREMISESCONNECTIONTYPE + UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONTYPE +) + +func (i CloudPcOnPremisesConnectionType) String() string { + return []string{"hybridAzureADJoin", "azureADJoin", "unknownFutureValue"}[i] +} +func ParseCloudPcOnPremisesConnectionType(v string) (interface{}, error) { + result := HYBRIDAZUREADJOIN_CLOUDPCONPREMISESCONNECTIONTYPE + switch v { + case "hybridAzureADJoin": + result = HYBRIDAZUREADJOIN_CLOUDPCONPREMISESCONNECTIONTYPE + case "azureADJoin": + result = AZUREADJOIN_CLOUDPCONPREMISESCONNECTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCONPREMISESCONNECTIONTYPE + default: + return 0, errors.New("Unknown CloudPcOnPremisesConnectionType value: " + v) + } + return &result, nil +} +func SerializeCloudPcOnPremisesConnectionType(values []CloudPcOnPremisesConnectionType) []string { + 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/cloud_pc_on_premises_connectionable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connectionable.go new file mode 100644 index 000000000..45bd8fbcf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_on_premises_connectionable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOnPremisesConnectionable +type CloudPcOnPremisesConnectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdDomainName()(*string) + GetAdDomainPassword()(*string) + GetAdDomainUsername()(*string) + GetAlternateResourceUrl()(*string) + GetDisplayName()(*string) + GetHealthCheckStatus()(*CloudPcOnPremisesConnectionStatus) + GetHealthCheckStatusDetails()(CloudPcOnPremisesConnectionStatusDetailsable) + GetInUse()(*bool) + GetManagedBy()(*CloudPcManagementService) + GetOrganizationalUnit()(*string) + GetResourceGroupId()(*string) + GetSubnetId()(*string) + GetSubscriptionId()(*string) + GetSubscriptionName()(*string) + GetType()(*CloudPcOnPremisesConnectionType) + GetVirtualNetworkId()(*string) + GetVirtualNetworkLocation()(*string) + SetAdDomainName(value *string)() + SetAdDomainPassword(value *string)() + SetAdDomainUsername(value *string)() + SetAlternateResourceUrl(value *string)() + SetDisplayName(value *string)() + SetHealthCheckStatus(value *CloudPcOnPremisesConnectionStatus)() + SetHealthCheckStatusDetails(value CloudPcOnPremisesConnectionStatusDetailsable)() + SetInUse(value *bool)() + SetManagedBy(value *CloudPcManagementService)() + SetOrganizationalUnit(value *string)() + SetResourceGroupId(value *string)() + SetSubnetId(value *string)() + SetSubscriptionId(value *string)() + SetSubscriptionName(value *string)() + SetType(value *CloudPcOnPremisesConnectionType)() + SetVirtualNetworkId(value *string)() + SetVirtualNetworkLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_operating_system.go b/src/internal/connector/graph/betasdk/models/cloud_pc_operating_system.go new file mode 100644 index 000000000..9099e0a3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_operating_system.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcOperatingSystem int + +const ( + WINDOWS10_CLOUDPCOPERATINGSYSTEM CloudPcOperatingSystem = iota + WINDOWS11_CLOUDPCOPERATINGSYSTEM + UNKNOWNFUTUREVALUE_CLOUDPCOPERATINGSYSTEM +) + +func (i CloudPcOperatingSystem) String() string { + return []string{"windows10", "windows11", "unknownFutureValue"}[i] +} +func ParseCloudPcOperatingSystem(v string) (interface{}, error) { + result := WINDOWS10_CLOUDPCOPERATINGSYSTEM + switch v { + case "windows10": + result = WINDOWS10_CLOUDPCOPERATINGSYSTEM + case "windows11": + result = WINDOWS11_CLOUDPCOPERATINGSYSTEM + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCOPERATINGSYSTEM + default: + return 0, errors.New("Unknown CloudPcOperatingSystem value: " + v) + } + return &result, nil +} +func SerializeCloudPcOperatingSystem(values []CloudPcOperatingSystem) []string { + 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/cloud_pc_organization_settings.go b/src/internal/connector/graph/betasdk/models/cloud_pc_organization_settings.go new file mode 100644 index 000000000..5c35682ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_organization_settings.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOrganizationSettings +type CloudPcOrganizationSettings struct { + Entity + // Specifies whether new Cloud PCs will be automatically enrolled in Microsoft Endpoint Manager(MEM). The default value is false. + enableMEMAutoEnroll *bool + // The enableSingleSignOn property + enableSingleSignOn *bool + // The version of the operating system (OS) to provision on Cloud PCs. The possible values are: windows10, windows11, unknownFutureValue. + osVersion *CloudPcOperatingSystem + // The account type of the user on provisioned Cloud PCs. The possible values are: standardUser, administrator, unknownFutureValue. + userAccountType *CloudPcUserAccountType + // Represents the Cloud PC organization settings for a tenant. A tenant has only one cloudPcOrganizationSettings object. The default language value en-US. + windowsSettings CloudPcWindowsSettingsable +} +// NewCloudPcOrganizationSettings instantiates a new CloudPcOrganizationSettings and sets the default values. +func NewCloudPcOrganizationSettings()(*CloudPcOrganizationSettings) { + m := &CloudPcOrganizationSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcOrganizationSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOrganizationSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOrganizationSettings(), nil +} +// GetEnableMEMAutoEnroll gets the enableMEMAutoEnroll property value. Specifies whether new Cloud PCs will be automatically enrolled in Microsoft Endpoint Manager(MEM). The default value is false. +func (m *CloudPcOrganizationSettings) GetEnableMEMAutoEnroll()(*bool) { + return m.enableMEMAutoEnroll +} +// GetEnableSingleSignOn gets the enableSingleSignOn property value. The enableSingleSignOn property +func (m *CloudPcOrganizationSettings) GetEnableSingleSignOn()(*bool) { + return m.enableSingleSignOn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOrganizationSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["enableMEMAutoEnroll"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableMEMAutoEnroll(val) + } + return nil + } + res["enableSingleSignOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSingleSignOn(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcOperatingSystem) + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val.(*CloudPcOperatingSystem)) + } + return nil + } + res["userAccountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcUserAccountType) + if err != nil { + return err + } + if val != nil { + m.SetUserAccountType(val.(*CloudPcUserAccountType)) + } + return nil + } + res["windowsSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcWindowsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsSettings(val.(CloudPcWindowsSettingsable)) + } + return nil + } + return res +} +// GetOsVersion gets the osVersion property value. The version of the operating system (OS) to provision on Cloud PCs. The possible values are: windows10, windows11, unknownFutureValue. +func (m *CloudPcOrganizationSettings) GetOsVersion()(*CloudPcOperatingSystem) { + return m.osVersion +} +// GetUserAccountType gets the userAccountType property value. The account type of the user on provisioned Cloud PCs. The possible values are: standardUser, administrator, unknownFutureValue. +func (m *CloudPcOrganizationSettings) GetUserAccountType()(*CloudPcUserAccountType) { + return m.userAccountType +} +// GetWindowsSettings gets the windowsSettings property value. Represents the Cloud PC organization settings for a tenant. A tenant has only one cloudPcOrganizationSettings object. The default language value en-US. +func (m *CloudPcOrganizationSettings) GetWindowsSettings()(CloudPcWindowsSettingsable) { + return m.windowsSettings +} +// Serialize serializes information the current object +func (m *CloudPcOrganizationSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("enableMEMAutoEnroll", m.GetEnableMEMAutoEnroll()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSingleSignOn", m.GetEnableSingleSignOn()) + if err != nil { + return err + } + } + if m.GetOsVersion() != nil { + cast := (*m.GetOsVersion()).String() + err = writer.WriteStringValue("osVersion", &cast) + if err != nil { + return err + } + } + if m.GetUserAccountType() != nil { + cast := (*m.GetUserAccountType()).String() + err = writer.WriteStringValue("userAccountType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsSettings", m.GetWindowsSettings()) + if err != nil { + return err + } + } + return nil +} +// SetEnableMEMAutoEnroll sets the enableMEMAutoEnroll property value. Specifies whether new Cloud PCs will be automatically enrolled in Microsoft Endpoint Manager(MEM). The default value is false. +func (m *CloudPcOrganizationSettings) SetEnableMEMAutoEnroll(value *bool)() { + m.enableMEMAutoEnroll = value +} +// SetEnableSingleSignOn sets the enableSingleSignOn property value. The enableSingleSignOn property +func (m *CloudPcOrganizationSettings) SetEnableSingleSignOn(value *bool)() { + m.enableSingleSignOn = value +} +// SetOsVersion sets the osVersion property value. The version of the operating system (OS) to provision on Cloud PCs. The possible values are: windows10, windows11, unknownFutureValue. +func (m *CloudPcOrganizationSettings) SetOsVersion(value *CloudPcOperatingSystem)() { + m.osVersion = value +} +// SetUserAccountType sets the userAccountType property value. The account type of the user on provisioned Cloud PCs. The possible values are: standardUser, administrator, unknownFutureValue. +func (m *CloudPcOrganizationSettings) SetUserAccountType(value *CloudPcUserAccountType)() { + m.userAccountType = value +} +// SetWindowsSettings sets the windowsSettings property value. Represents the Cloud PC organization settings for a tenant. A tenant has only one cloudPcOrganizationSettings object. The default language value en-US. +func (m *CloudPcOrganizationSettings) SetWindowsSettings(value CloudPcWindowsSettingsable)() { + m.windowsSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_organization_settingsable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_organization_settingsable.go new file mode 100644 index 000000000..b48a4033c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_organization_settingsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcOrganizationSettingsable +type CloudPcOrganizationSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableMEMAutoEnroll()(*bool) + GetEnableSingleSignOn()(*bool) + GetOsVersion()(*CloudPcOperatingSystem) + GetUserAccountType()(*CloudPcUserAccountType) + GetWindowsSettings()(CloudPcWindowsSettingsable) + SetEnableMEMAutoEnroll(value *bool)() + SetEnableSingleSignOn(value *bool)() + SetOsVersion(value *CloudPcOperatingSystem)() + SetUserAccountType(value *CloudPcUserAccountType)() + SetWindowsSettings(value CloudPcWindowsSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result.go new file mode 100644 index 000000000..369fda514 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcPartnerAgentInstallResult +type CloudPcPartnerAgentInstallResult 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 status of a partner agent installation. Possible values are: installed, installFailed, installing, uninstalling, uninstallFailed and licensed. Read-Only. + installStatus *CloudPcPartnerAgentInstallStatus + // Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. + isThirdPartyPartner *bool + // The OdataType property + odataType *string + // Indicates the name of a partner agent and includes first-party and third-party. Currently, Citrix is the only third-party value. Read-Only. + partnerAgentName *CloudPcPartnerAgentName + // Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. + retriable *bool +} +// NewCloudPcPartnerAgentInstallResult instantiates a new cloudPcPartnerAgentInstallResult and sets the default values. +func NewCloudPcPartnerAgentInstallResult()(*CloudPcPartnerAgentInstallResult) { + m := &CloudPcPartnerAgentInstallResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcPartnerAgentInstallResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcPartnerAgentInstallResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcPartnerAgentInstallResult(), 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 *CloudPcPartnerAgentInstallResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcPartnerAgentInstallResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["installStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcPartnerAgentInstallStatus) + if err != nil { + return err + } + if val != nil { + m.SetInstallStatus(val.(*CloudPcPartnerAgentInstallStatus)) + } + return nil + } + res["isThirdPartyPartner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsThirdPartyPartner(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["partnerAgentName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcPartnerAgentName) + if err != nil { + return err + } + if val != nil { + m.SetPartnerAgentName(val.(*CloudPcPartnerAgentName)) + } + return nil + } + res["retriable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRetriable(val) + } + return nil + } + return res +} +// GetInstallStatus gets the installStatus property value. The status of a partner agent installation. Possible values are: installed, installFailed, installing, uninstalling, uninstallFailed and licensed. Read-Only. +func (m *CloudPcPartnerAgentInstallResult) GetInstallStatus()(*CloudPcPartnerAgentInstallStatus) { + return m.installStatus +} +// GetIsThirdPartyPartner gets the isThirdPartyPartner property value. Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. +func (m *CloudPcPartnerAgentInstallResult) GetIsThirdPartyPartner()(*bool) { + return m.isThirdPartyPartner +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcPartnerAgentInstallResult) GetOdataType()(*string) { + return m.odataType +} +// GetPartnerAgentName gets the partnerAgentName property value. Indicates the name of a partner agent and includes first-party and third-party. Currently, Citrix is the only third-party value. Read-Only. +func (m *CloudPcPartnerAgentInstallResult) GetPartnerAgentName()(*CloudPcPartnerAgentName) { + return m.partnerAgentName +} +// GetRetriable gets the retriable property value. Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. +func (m *CloudPcPartnerAgentInstallResult) GetRetriable()(*bool) { + return m.retriable +} +// Serialize serializes information the current object +func (m *CloudPcPartnerAgentInstallResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetInstallStatus() != nil { + cast := (*m.GetInstallStatus()).String() + err := writer.WriteStringValue("installStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isThirdPartyPartner", m.GetIsThirdPartyPartner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPartnerAgentName() != nil { + cast := (*m.GetPartnerAgentName()).String() + err := writer.WriteStringValue("partnerAgentName", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("retriable", m.GetRetriable()) + 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 *CloudPcPartnerAgentInstallResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetInstallStatus sets the installStatus property value. The status of a partner agent installation. Possible values are: installed, installFailed, installing, uninstalling, uninstallFailed and licensed. Read-Only. +func (m *CloudPcPartnerAgentInstallResult) SetInstallStatus(value *CloudPcPartnerAgentInstallStatus)() { + m.installStatus = value +} +// SetIsThirdPartyPartner sets the isThirdPartyPartner property value. Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. +func (m *CloudPcPartnerAgentInstallResult) SetIsThirdPartyPartner(value *bool)() { + m.isThirdPartyPartner = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcPartnerAgentInstallResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetPartnerAgentName sets the partnerAgentName property value. Indicates the name of a partner agent and includes first-party and third-party. Currently, Citrix is the only third-party value. Read-Only. +func (m *CloudPcPartnerAgentInstallResult) SetPartnerAgentName(value *CloudPcPartnerAgentName)() { + m.partnerAgentName = value +} +// SetRetriable sets the retriable property value. Indicates if the partner agent is a third party. When 'TRUE', the agent is a third-party (non-Microsoft) agent. When 'FALSE', the agent is a Microsoft agent or is not known. The default value is 'FALSE'. +func (m *CloudPcPartnerAgentInstallResult) SetRetriable(value *bool)() { + m.retriable = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_response.go new file mode 100644 index 000000000..bb81f259c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcPartnerAgentInstallResultCollectionResponse +type CloudPcPartnerAgentInstallResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcPartnerAgentInstallResultable +} +// NewCloudPcPartnerAgentInstallResultCollectionResponse instantiates a new CloudPcPartnerAgentInstallResultCollectionResponse and sets the default values. +func NewCloudPcPartnerAgentInstallResultCollectionResponse()(*CloudPcPartnerAgentInstallResultCollectionResponse) { + m := &CloudPcPartnerAgentInstallResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcPartnerAgentInstallResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcPartnerAgentInstallResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcPartnerAgentInstallResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcPartnerAgentInstallResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcPartnerAgentInstallResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcPartnerAgentInstallResultable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcPartnerAgentInstallResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcPartnerAgentInstallResultCollectionResponse) GetValue()([]CloudPcPartnerAgentInstallResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcPartnerAgentInstallResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcPartnerAgentInstallResultCollectionResponse) SetValue(value []CloudPcPartnerAgentInstallResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_responseable.go new file mode 100644 index 000000000..65b619f98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcPartnerAgentInstallResultCollectionResponseable +type CloudPcPartnerAgentInstallResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcPartnerAgentInstallResultable) + SetValue(value []CloudPcPartnerAgentInstallResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_resultable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_resultable.go new file mode 100644 index 000000000..fa51fd5c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_resultable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcPartnerAgentInstallResultable +type CloudPcPartnerAgentInstallResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInstallStatus()(*CloudPcPartnerAgentInstallStatus) + GetIsThirdPartyPartner()(*bool) + GetOdataType()(*string) + GetPartnerAgentName()(*CloudPcPartnerAgentName) + GetRetriable()(*bool) + SetInstallStatus(value *CloudPcPartnerAgentInstallStatus)() + SetIsThirdPartyPartner(value *bool)() + SetOdataType(value *string)() + SetPartnerAgentName(value *CloudPcPartnerAgentName)() + SetRetriable(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_status.go new file mode 100644 index 000000000..fc71fd200 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_install_status.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcPartnerAgentInstallStatus int + +const ( + INSTALLED_CLOUDPCPARTNERAGENTINSTALLSTATUS CloudPcPartnerAgentInstallStatus = iota + INSTALLFAILED_CLOUDPCPARTNERAGENTINSTALLSTATUS + INSTALLING_CLOUDPCPARTNERAGENTINSTALLSTATUS + UNINSTALLING_CLOUDPCPARTNERAGENTINSTALLSTATUS + UNINSTALLFAILED_CLOUDPCPARTNERAGENTINSTALLSTATUS + LICENSED_CLOUDPCPARTNERAGENTINSTALLSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCPARTNERAGENTINSTALLSTATUS +) + +func (i CloudPcPartnerAgentInstallStatus) String() string { + return []string{"installed", "installFailed", "installing", "uninstalling", "uninstallFailed", "licensed", "unknownFutureValue"}[i] +} +func ParseCloudPcPartnerAgentInstallStatus(v string) (interface{}, error) { + result := INSTALLED_CLOUDPCPARTNERAGENTINSTALLSTATUS + switch v { + case "installed": + result = INSTALLED_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "installFailed": + result = INSTALLFAILED_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "installing": + result = INSTALLING_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "uninstalling": + result = UNINSTALLING_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "uninstallFailed": + result = UNINSTALLFAILED_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "licensed": + result = LICENSED_CLOUDPCPARTNERAGENTINSTALLSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCPARTNERAGENTINSTALLSTATUS + default: + return 0, errors.New("Unknown CloudPcPartnerAgentInstallStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcPartnerAgentInstallStatus(values []CloudPcPartnerAgentInstallStatus) []string { + 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/cloud_pc_partner_agent_name.go b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_name.go new file mode 100644 index 000000000..d8d85b3f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_partner_agent_name.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcPartnerAgentName int + +const ( + CITRIX_CLOUDPCPARTNERAGENTNAME CloudPcPartnerAgentName = iota + UNKNOWNFUTUREVALUE_CLOUDPCPARTNERAGENTNAME +) + +func (i CloudPcPartnerAgentName) String() string { + return []string{"citrix", "unknownFutureValue"}[i] +} +func ParseCloudPcPartnerAgentName(v string) (interface{}, error) { + result := CITRIX_CLOUDPCPARTNERAGENTNAME + switch v { + case "citrix": + result = CITRIX_CLOUDPCPARTNERAGENTNAME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCPARTNERAGENTNAME + default: + return 0, errors.New("Unknown CloudPcPartnerAgentName value: " + v) + } + return &result, nil +} +func SerializeCloudPcPartnerAgentName(values []CloudPcPartnerAgentName) []string { + 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/cloud_pc_provisioning_policy.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy.go new file mode 100644 index 000000000..f55b90876 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy.go @@ -0,0 +1,487 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicy +type CloudPcProvisioningPolicy struct { + Entity + // The URL of the alternate resource that links to this provisioning policy. Read-only. + alternateResourceUrl *string + // A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Azure AD that have provisioning policy assigned. Returned only on $expand. See an example of getting the assignments relationship. + assignments []CloudPcProvisioningPolicyAssignmentable + // The display name of the Cloud PC group that the Cloud PCs reside in. Read-only. + cloudPcGroupDisplayName *string + // The provisioning policy description. + description *string + // The display name for the provisioning policy. + displayName *string + // Specifies how Cloud PCs will join Azure Active Directory. + domainJoinConfiguration CloudPcDomainJoinConfigurationable + // The enableSingleSignOn property + enableSingleSignOn *bool + // The number of hours to wait before reprovisioning/deprovisioning happens. Read-only. + gracePeriodInHours *int32 + // The display name for the OS image you’re provisioning. + imageDisplayName *string + // The ID of the OS image you want to provision on Cloud PCs. The format for a gallery type image is: {publisher_offer_sku}. Supported values for each of the parameters are as follows:publisher: Microsoftwindowsdesktop. offer: windows-ent-cpc. sku: 21h1-ent-cpc-m365, 21h1-ent-cpc-os, 20h2-ent-cpc-m365, 20h2-ent-cpc-os, 20h1-ent-cpc-m365, 20h1-ent-cpc-os, 19h2-ent-cpc-m365 and 19h2-ent-cpc-os. + imageId *string + // The imageType property + imageType *CloudPcProvisioningPolicyImageType + // Indicates whether the local admin option is enabled. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. Read-only. + localAdminEnabled *bool + // The managedBy property + managedBy *CloudPcManagementService + // The specific settings for the Microsoft Managed Desktop, which enables customers to get a managed device experience for the Cloud PC. Before you can enable Microsoft Managed Desktop, an admin must configure it. + microsoftManagedDesktop MicrosoftManagedDesktopable + // The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service. + onPremisesConnectionId *string + // The provisioningType property + provisioningType *CloudPcProvisioningType + // Specific Windows settings to configure while creating Cloud PCs for this provisioning policy. + windowsSettings CloudPcWindowsSettingsable +} +// NewCloudPcProvisioningPolicy instantiates a new CloudPcProvisioningPolicy and sets the default values. +func NewCloudPcProvisioningPolicy()(*CloudPcProvisioningPolicy) { + m := &CloudPcProvisioningPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcProvisioningPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcProvisioningPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcProvisioningPolicy(), nil +} +// GetAlternateResourceUrl gets the alternateResourceUrl property value. The URL of the alternate resource that links to this provisioning policy. Read-only. +func (m *CloudPcProvisioningPolicy) GetAlternateResourceUrl()(*string) { + return m.alternateResourceUrl +} +// GetAssignments gets the assignments property value. A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Azure AD that have provisioning policy assigned. Returned only on $expand. See an example of getting the assignments relationship. +func (m *CloudPcProvisioningPolicy) GetAssignments()([]CloudPcProvisioningPolicyAssignmentable) { + return m.assignments +} +// GetCloudPcGroupDisplayName gets the cloudPcGroupDisplayName property value. The display name of the Cloud PC group that the Cloud PCs reside in. Read-only. +func (m *CloudPcProvisioningPolicy) GetCloudPcGroupDisplayName()(*string) { + return m.cloudPcGroupDisplayName +} +// GetDescription gets the description property value. The provisioning policy description. +func (m *CloudPcProvisioningPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the provisioning policy. +func (m *CloudPcProvisioningPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetDomainJoinConfiguration gets the domainJoinConfiguration property value. Specifies how Cloud PCs will join Azure Active Directory. +func (m *CloudPcProvisioningPolicy) GetDomainJoinConfiguration()(CloudPcDomainJoinConfigurationable) { + return m.domainJoinConfiguration +} +// GetEnableSingleSignOn gets the enableSingleSignOn property value. The enableSingleSignOn property +func (m *CloudPcProvisioningPolicy) GetEnableSingleSignOn()(*bool) { + return m.enableSingleSignOn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcProvisioningPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alternateResourceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateResourceUrl(val) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcProvisioningPolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcProvisioningPolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcProvisioningPolicyAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["cloudPcGroupDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudPcGroupDisplayName(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["domainJoinConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcDomainJoinConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDomainJoinConfiguration(val.(CloudPcDomainJoinConfigurationable)) + } + return nil + } + res["enableSingleSignOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSingleSignOn(val) + } + return nil + } + res["gracePeriodInHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodInHours(val) + } + return nil + } + res["imageDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImageDisplayName(val) + } + return nil + } + res["imageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImageId(val) + } + return nil + } + res["imageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcProvisioningPolicyImageType) + if err != nil { + return err + } + if val != nil { + m.SetImageType(val.(*CloudPcProvisioningPolicyImageType)) + } + return nil + } + res["localAdminEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocalAdminEnabled(val) + } + return nil + } + res["managedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcManagementService) + if err != nil { + return err + } + if val != nil { + m.SetManagedBy(val.(*CloudPcManagementService)) + } + return nil + } + res["microsoftManagedDesktop"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMicrosoftManagedDesktopFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftManagedDesktop(val.(MicrosoftManagedDesktopable)) + } + return nil + } + res["onPremisesConnectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesConnectionId(val) + } + return nil + } + res["provisioningType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcProvisioningType) + if err != nil { + return err + } + if val != nil { + m.SetProvisioningType(val.(*CloudPcProvisioningType)) + } + return nil + } + res["windowsSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcWindowsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsSettings(val.(CloudPcWindowsSettingsable)) + } + return nil + } + return res +} +// GetGracePeriodInHours gets the gracePeriodInHours property value. The number of hours to wait before reprovisioning/deprovisioning happens. Read-only. +func (m *CloudPcProvisioningPolicy) GetGracePeriodInHours()(*int32) { + return m.gracePeriodInHours +} +// GetImageDisplayName gets the imageDisplayName property value. The display name for the OS image you’re provisioning. +func (m *CloudPcProvisioningPolicy) GetImageDisplayName()(*string) { + return m.imageDisplayName +} +// GetImageId gets the imageId property value. The ID of the OS image you want to provision on Cloud PCs. The format for a gallery type image is: {publisher_offer_sku}. Supported values for each of the parameters are as follows:publisher: Microsoftwindowsdesktop. offer: windows-ent-cpc. sku: 21h1-ent-cpc-m365, 21h1-ent-cpc-os, 20h2-ent-cpc-m365, 20h2-ent-cpc-os, 20h1-ent-cpc-m365, 20h1-ent-cpc-os, 19h2-ent-cpc-m365 and 19h2-ent-cpc-os. +func (m *CloudPcProvisioningPolicy) GetImageId()(*string) { + return m.imageId +} +// GetImageType gets the imageType property value. The imageType property +func (m *CloudPcProvisioningPolicy) GetImageType()(*CloudPcProvisioningPolicyImageType) { + return m.imageType +} +// GetLocalAdminEnabled gets the localAdminEnabled property value. Indicates whether the local admin option is enabled. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. Read-only. +func (m *CloudPcProvisioningPolicy) GetLocalAdminEnabled()(*bool) { + return m.localAdminEnabled +} +// GetManagedBy gets the managedBy property value. The managedBy property +func (m *CloudPcProvisioningPolicy) GetManagedBy()(*CloudPcManagementService) { + return m.managedBy +} +// GetMicrosoftManagedDesktop gets the microsoftManagedDesktop property value. The specific settings for the Microsoft Managed Desktop, which enables customers to get a managed device experience for the Cloud PC. Before you can enable Microsoft Managed Desktop, an admin must configure it. +func (m *CloudPcProvisioningPolicy) GetMicrosoftManagedDesktop()(MicrosoftManagedDesktopable) { + return m.microsoftManagedDesktop +} +// GetOnPremisesConnectionId gets the onPremisesConnectionId property value. The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service. +func (m *CloudPcProvisioningPolicy) GetOnPremisesConnectionId()(*string) { + return m.onPremisesConnectionId +} +// GetProvisioningType gets the provisioningType property value. The provisioningType property +func (m *CloudPcProvisioningPolicy) GetProvisioningType()(*CloudPcProvisioningType) { + return m.provisioningType +} +// GetWindowsSettings gets the windowsSettings property value. Specific Windows settings to configure while creating Cloud PCs for this provisioning policy. +func (m *CloudPcProvisioningPolicy) GetWindowsSettings()(CloudPcWindowsSettingsable) { + return m.windowsSettings +} +// Serialize serializes information the current object +func (m *CloudPcProvisioningPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("alternateResourceUrl", m.GetAlternateResourceUrl()) + if err != nil { + return err + } + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cloudPcGroupDisplayName", m.GetCloudPcGroupDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("domainJoinConfiguration", m.GetDomainJoinConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSingleSignOn", m.GetEnableSingleSignOn()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("gracePeriodInHours", m.GetGracePeriodInHours()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("imageDisplayName", m.GetImageDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("imageId", m.GetImageId()) + if err != nil { + return err + } + } + if m.GetImageType() != nil { + cast := (*m.GetImageType()).String() + err = writer.WriteStringValue("imageType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("localAdminEnabled", m.GetLocalAdminEnabled()) + if err != nil { + return err + } + } + if m.GetManagedBy() != nil { + cast := (*m.GetManagedBy()).String() + err = writer.WriteStringValue("managedBy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("microsoftManagedDesktop", m.GetMicrosoftManagedDesktop()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesConnectionId", m.GetOnPremisesConnectionId()) + if err != nil { + return err + } + } + if m.GetProvisioningType() != nil { + cast := (*m.GetProvisioningType()).String() + err = writer.WriteStringValue("provisioningType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsSettings", m.GetWindowsSettings()) + if err != nil { + return err + } + } + return nil +} +// SetAlternateResourceUrl sets the alternateResourceUrl property value. The URL of the alternate resource that links to this provisioning policy. Read-only. +func (m *CloudPcProvisioningPolicy) SetAlternateResourceUrl(value *string)() { + m.alternateResourceUrl = value +} +// SetAssignments sets the assignments property value. A defined collection of provisioning policy assignments. Represents the set of Microsoft 365 groups and security groups in Azure AD that have provisioning policy assigned. Returned only on $expand. See an example of getting the assignments relationship. +func (m *CloudPcProvisioningPolicy) SetAssignments(value []CloudPcProvisioningPolicyAssignmentable)() { + m.assignments = value +} +// SetCloudPcGroupDisplayName sets the cloudPcGroupDisplayName property value. The display name of the Cloud PC group that the Cloud PCs reside in. Read-only. +func (m *CloudPcProvisioningPolicy) SetCloudPcGroupDisplayName(value *string)() { + m.cloudPcGroupDisplayName = value +} +// SetDescription sets the description property value. The provisioning policy description. +func (m *CloudPcProvisioningPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the provisioning policy. +func (m *CloudPcProvisioningPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDomainJoinConfiguration sets the domainJoinConfiguration property value. Specifies how Cloud PCs will join Azure Active Directory. +func (m *CloudPcProvisioningPolicy) SetDomainJoinConfiguration(value CloudPcDomainJoinConfigurationable)() { + m.domainJoinConfiguration = value +} +// SetEnableSingleSignOn sets the enableSingleSignOn property value. The enableSingleSignOn property +func (m *CloudPcProvisioningPolicy) SetEnableSingleSignOn(value *bool)() { + m.enableSingleSignOn = value +} +// SetGracePeriodInHours sets the gracePeriodInHours property value. The number of hours to wait before reprovisioning/deprovisioning happens. Read-only. +func (m *CloudPcProvisioningPolicy) SetGracePeriodInHours(value *int32)() { + m.gracePeriodInHours = value +} +// SetImageDisplayName sets the imageDisplayName property value. The display name for the OS image you’re provisioning. +func (m *CloudPcProvisioningPolicy) SetImageDisplayName(value *string)() { + m.imageDisplayName = value +} +// SetImageId sets the imageId property value. The ID of the OS image you want to provision on Cloud PCs. The format for a gallery type image is: {publisher_offer_sku}. Supported values for each of the parameters are as follows:publisher: Microsoftwindowsdesktop. offer: windows-ent-cpc. sku: 21h1-ent-cpc-m365, 21h1-ent-cpc-os, 20h2-ent-cpc-m365, 20h2-ent-cpc-os, 20h1-ent-cpc-m365, 20h1-ent-cpc-os, 19h2-ent-cpc-m365 and 19h2-ent-cpc-os. +func (m *CloudPcProvisioningPolicy) SetImageId(value *string)() { + m.imageId = value +} +// SetImageType sets the imageType property value. The imageType property +func (m *CloudPcProvisioningPolicy) SetImageType(value *CloudPcProvisioningPolicyImageType)() { + m.imageType = value +} +// SetLocalAdminEnabled sets the localAdminEnabled property value. Indicates whether the local admin option is enabled. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. Read-only. +func (m *CloudPcProvisioningPolicy) SetLocalAdminEnabled(value *bool)() { + m.localAdminEnabled = value +} +// SetManagedBy sets the managedBy property value. The managedBy property +func (m *CloudPcProvisioningPolicy) SetManagedBy(value *CloudPcManagementService)() { + m.managedBy = value +} +// SetMicrosoftManagedDesktop sets the microsoftManagedDesktop property value. The specific settings for the Microsoft Managed Desktop, which enables customers to get a managed device experience for the Cloud PC. Before you can enable Microsoft Managed Desktop, an admin must configure it. +func (m *CloudPcProvisioningPolicy) SetMicrosoftManagedDesktop(value MicrosoftManagedDesktopable)() { + m.microsoftManagedDesktop = value +} +// SetOnPremisesConnectionId sets the onPremisesConnectionId property value. The ID of the cloudPcOnPremisesConnection. To ensure that Cloud PCs have network connectivity and that they domain join, choose a connection with a virtual network that’s validated by the Cloud PC service. +func (m *CloudPcProvisioningPolicy) SetOnPremisesConnectionId(value *string)() { + m.onPremisesConnectionId = value +} +// SetProvisioningType sets the provisioningType property value. The provisioningType property +func (m *CloudPcProvisioningPolicy) SetProvisioningType(value *CloudPcProvisioningType)() { + m.provisioningType = value +} +// SetWindowsSettings sets the windowsSettings property value. Specific Windows settings to configure while creating Cloud PCs for this provisioning policy. +func (m *CloudPcProvisioningPolicy) SetWindowsSettings(value CloudPcWindowsSettingsable)() { + m.windowsSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment.go new file mode 100644 index 000000000..6f38963f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcProvisioningPolicyAssignment struct { + Entity + // The assignment target for the provisioning policy. Currently, the only target supported for this policy is a user group. For details, see cloudPcManagementGroupAssignmentTarget. + target CloudPcManagementAssignmentTargetable +} +// NewCloudPcProvisioningPolicyAssignment instantiates a new cloudPcProvisioningPolicyAssignment and sets the default values. +func NewCloudPcProvisioningPolicyAssignment()(*CloudPcProvisioningPolicyAssignment) { + m := &CloudPcProvisioningPolicyAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcProvisioningPolicyAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcProvisioningPolicyAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcProvisioningPolicyAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcProvisioningPolicyAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(CloudPcManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The assignment target for the provisioning policy. Currently, the only target supported for this policy is a user group. For details, see cloudPcManagementGroupAssignmentTarget. +func (m *CloudPcProvisioningPolicyAssignment) GetTarget()(CloudPcManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *CloudPcProvisioningPolicyAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The assignment target for the provisioning policy. Currently, the only target supported for this policy is a user group. For details, see cloudPcManagementGroupAssignmentTarget. +func (m *CloudPcProvisioningPolicyAssignment) SetTarget(value CloudPcManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_response.go new file mode 100644 index 000000000..ce8638f96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyAssignmentCollectionResponse +type CloudPcProvisioningPolicyAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcProvisioningPolicyAssignmentable +} +// NewCloudPcProvisioningPolicyAssignmentCollectionResponse instantiates a new CloudPcProvisioningPolicyAssignmentCollectionResponse and sets the default values. +func NewCloudPcProvisioningPolicyAssignmentCollectionResponse()(*CloudPcProvisioningPolicyAssignmentCollectionResponse) { + m := &CloudPcProvisioningPolicyAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcProvisioningPolicyAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcProvisioningPolicyAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcProvisioningPolicyAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcProvisioningPolicyAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcProvisioningPolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcProvisioningPolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcProvisioningPolicyAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcProvisioningPolicyAssignmentCollectionResponse) GetValue()([]CloudPcProvisioningPolicyAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcProvisioningPolicyAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcProvisioningPolicyAssignmentCollectionResponse) SetValue(value []CloudPcProvisioningPolicyAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_responseable.go new file mode 100644 index 000000000..8a6b36acd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyAssignmentCollectionResponseable +type CloudPcProvisioningPolicyAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcProvisioningPolicyAssignmentable) + SetValue(value []CloudPcProvisioningPolicyAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignmentable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignmentable.go new file mode 100644 index 000000000..cfd608539 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyAssignmentable +type CloudPcProvisioningPolicyAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(CloudPcManagementAssignmentTargetable) + SetTarget(value CloudPcManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_response.go new file mode 100644 index 000000000..cf0f1ce8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyCollectionResponse +type CloudPcProvisioningPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcProvisioningPolicyable +} +// NewCloudPcProvisioningPolicyCollectionResponse instantiates a new CloudPcProvisioningPolicyCollectionResponse and sets the default values. +func NewCloudPcProvisioningPolicyCollectionResponse()(*CloudPcProvisioningPolicyCollectionResponse) { + m := &CloudPcProvisioningPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcProvisioningPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcProvisioningPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcProvisioningPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcProvisioningPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcProvisioningPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcProvisioningPolicyable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcProvisioningPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcProvisioningPolicyCollectionResponse) GetValue()([]CloudPcProvisioningPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcProvisioningPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcProvisioningPolicyCollectionResponse) SetValue(value []CloudPcProvisioningPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_responseable.go new file mode 100644 index 000000000..ed2948225 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyCollectionResponseable +type CloudPcProvisioningPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcProvisioningPolicyable) + SetValue(value []CloudPcProvisioningPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_image_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_image_type.go new file mode 100644 index 000000000..d9db403df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policy_image_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcProvisioningPolicyImageType int + +const ( + GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE CloudPcProvisioningPolicyImageType = iota + CUSTOM_CLOUDPCPROVISIONINGPOLICYIMAGETYPE +) + +func (i CloudPcProvisioningPolicyImageType) String() string { + return []string{"gallery", "custom"}[i] +} +func ParseCloudPcProvisioningPolicyImageType(v string) (interface{}, error) { + result := GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE + switch v { + case "gallery": + result = GALLERY_CLOUDPCPROVISIONINGPOLICYIMAGETYPE + case "custom": + result = CUSTOM_CLOUDPCPROVISIONINGPOLICYIMAGETYPE + default: + return 0, errors.New("Unknown CloudPcProvisioningPolicyImageType value: " + v) + } + return &result, nil +} +func SerializeCloudPcProvisioningPolicyImageType(values []CloudPcProvisioningPolicyImageType) []string { + 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/cloud_pc_provisioning_policyable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policyable.go new file mode 100644 index 000000000..ba81d7df3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_policyable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcProvisioningPolicyable +type CloudPcProvisioningPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlternateResourceUrl()(*string) + GetAssignments()([]CloudPcProvisioningPolicyAssignmentable) + GetCloudPcGroupDisplayName()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetDomainJoinConfiguration()(CloudPcDomainJoinConfigurationable) + GetEnableSingleSignOn()(*bool) + GetGracePeriodInHours()(*int32) + GetImageDisplayName()(*string) + GetImageId()(*string) + GetImageType()(*CloudPcProvisioningPolicyImageType) + GetLocalAdminEnabled()(*bool) + GetManagedBy()(*CloudPcManagementService) + GetMicrosoftManagedDesktop()(MicrosoftManagedDesktopable) + GetOnPremisesConnectionId()(*string) + GetProvisioningType()(*CloudPcProvisioningType) + GetWindowsSettings()(CloudPcWindowsSettingsable) + SetAlternateResourceUrl(value *string)() + SetAssignments(value []CloudPcProvisioningPolicyAssignmentable)() + SetCloudPcGroupDisplayName(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDomainJoinConfiguration(value CloudPcDomainJoinConfigurationable)() + SetEnableSingleSignOn(value *bool)() + SetGracePeriodInHours(value *int32)() + SetImageDisplayName(value *string)() + SetImageId(value *string)() + SetImageType(value *CloudPcProvisioningPolicyImageType)() + SetLocalAdminEnabled(value *bool)() + SetManagedBy(value *CloudPcManagementService)() + SetMicrosoftManagedDesktop(value MicrosoftManagedDesktopable)() + SetOnPremisesConnectionId(value *string)() + SetProvisioningType(value *CloudPcProvisioningType)() + SetWindowsSettings(value CloudPcWindowsSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_type.go new file mode 100644 index 000000000..df70ab498 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_provisioning_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcProvisioningType int + +const ( + DEDICATED_CLOUDPCPROVISIONINGTYPE CloudPcProvisioningType = iota + SHARED_CLOUDPCPROVISIONINGTYPE + UNKNOWNFUTUREVALUE_CLOUDPCPROVISIONINGTYPE +) + +func (i CloudPcProvisioningType) String() string { + return []string{"dedicated", "shared", "unknownFutureValue"}[i] +} +func ParseCloudPcProvisioningType(v string) (interface{}, error) { + result := DEDICATED_CLOUDPCPROVISIONINGTYPE + switch v { + case "dedicated": + result = DEDICATED_CLOUDPCPROVISIONINGTYPE + case "shared": + result = SHARED_CLOUDPCPROVISIONINGTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCPROVISIONINGTYPE + default: + return 0, errors.New("Unknown CloudPcProvisioningType value: " + v) + } + return &result, nil +} +func SerializeCloudPcProvisioningType(values []CloudPcProvisioningType) []string { + 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/cloud_pc_region_group.go b/src/internal/connector/graph/betasdk/models/cloud_pc_region_group.go new file mode 100644 index 000000000..241aa0105 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_region_group.go @@ -0,0 +1,91 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcRegionGroup int + +const ( + DEFAULT_ESCAPED_CLOUDPCREGIONGROUP CloudPcRegionGroup = iota + AUSTRALIA_CLOUDPCREGIONGROUP + CANADA_CLOUDPCREGIONGROUP + USCENTRAL_CLOUDPCREGIONGROUP + USEAST_CLOUDPCREGIONGROUP + USWEST_CLOUDPCREGIONGROUP + FRANCE_CLOUDPCREGIONGROUP + GERMANY_CLOUDPCREGIONGROUP + EUROPEUNION_CLOUDPCREGIONGROUP + UNITEDKINGDOM_CLOUDPCREGIONGROUP + JAPAN_CLOUDPCREGIONGROUP + ASIA_CLOUDPCREGIONGROUP + INDIA_CLOUDPCREGIONGROUP + SOUTHAMERICA_CLOUDPCREGIONGROUP + EUAP_CLOUDPCREGIONGROUP + USGOVERNMENT_CLOUDPCREGIONGROUP + USGOVERNMENTDOD_CLOUDPCREGIONGROUP + UNKNOWNFUTUREVALUE_CLOUDPCREGIONGROUP + NORWAY_CLOUDPCREGIONGROUP + SWITZERLAND_CLOUDPCREGIONGROUP + SOUTHKOREA_CLOUDPCREGIONGROUP +) + +func (i CloudPcRegionGroup) String() string { + return []string{"default", "australia", "canada", "usCentral", "usEast", "usWest", "france", "germany", "europeUnion", "unitedKingdom", "japan", "asia", "india", "southAmerica", "euap", "usGovernment", "usGovernmentDOD", "unknownFutureValue", "norway", "switzerland", "southKorea"}[i] +} +func ParseCloudPcRegionGroup(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_CLOUDPCREGIONGROUP + switch v { + case "default": + result = DEFAULT_ESCAPED_CLOUDPCREGIONGROUP + case "australia": + result = AUSTRALIA_CLOUDPCREGIONGROUP + case "canada": + result = CANADA_CLOUDPCREGIONGROUP + case "usCentral": + result = USCENTRAL_CLOUDPCREGIONGROUP + case "usEast": + result = USEAST_CLOUDPCREGIONGROUP + case "usWest": + result = USWEST_CLOUDPCREGIONGROUP + case "france": + result = FRANCE_CLOUDPCREGIONGROUP + case "germany": + result = GERMANY_CLOUDPCREGIONGROUP + case "europeUnion": + result = EUROPEUNION_CLOUDPCREGIONGROUP + case "unitedKingdom": + result = UNITEDKINGDOM_CLOUDPCREGIONGROUP + case "japan": + result = JAPAN_CLOUDPCREGIONGROUP + case "asia": + result = ASIA_CLOUDPCREGIONGROUP + case "india": + result = INDIA_CLOUDPCREGIONGROUP + case "southAmerica": + result = SOUTHAMERICA_CLOUDPCREGIONGROUP + case "euap": + result = EUAP_CLOUDPCREGIONGROUP + case "usGovernment": + result = USGOVERNMENT_CLOUDPCREGIONGROUP + case "usGovernmentDOD": + result = USGOVERNMENTDOD_CLOUDPCREGIONGROUP + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCREGIONGROUP + case "norway": + result = NORWAY_CLOUDPCREGIONGROUP + case "switzerland": + result = SWITZERLAND_CLOUDPCREGIONGROUP + case "southKorea": + result = SOUTHKOREA_CLOUDPCREGIONGROUP + default: + return 0, errors.New("Unknown CloudPcRegionGroup value: " + v) + } + return &result, nil +} +func SerializeCloudPcRegionGroup(values []CloudPcRegionGroup) []string { + 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/cloud_pc_remote_action_result.go b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result.go new file mode 100644 index 000000000..2b8762ace --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result.go @@ -0,0 +1,255 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRemoteActionResult +type CloudPcRemoteActionResult struct { + // The specified action. Supported values in the Microsoft Endpoint Manager portal are: Reprovision, Resize, Restore. Supported values in enterprise Cloud PC devices are: Reboot, Rename, Reprovision, Troubleshoot. + actionName *string + // State of the action. Possible values are: None, pending, canceled, active, done, failed, notSupported. Read-only. + actionState *ActionState + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The ID of the Cloud PC device on which the remote action is performed. Read-only. + cloudPcId *string + // Last update time for action. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ID of the Intune managed device on which the remote action is performed. Read-only. + managedDeviceId *string + // The OdataType property + odataType *string + // Time the action was initiated. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The details of the Cloud PC status. + statusDetails CloudPcStatusDetailsable +} +// NewCloudPcRemoteActionResult instantiates a new cloudPcRemoteActionResult and sets the default values. +func NewCloudPcRemoteActionResult()(*CloudPcRemoteActionResult) { + m := &CloudPcRemoteActionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcRemoteActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcRemoteActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcRemoteActionResult(), nil +} +// GetActionName gets the actionName property value. The specified action. Supported values in the Microsoft Endpoint Manager portal are: Reprovision, Resize, Restore. Supported values in enterprise Cloud PC devices are: Reboot, Rename, Reprovision, Troubleshoot. +func (m *CloudPcRemoteActionResult) GetActionName()(*string) { + return m.actionName +} +// GetActionState gets the actionState property value. State of the action. Possible values are: None, pending, canceled, active, done, failed, notSupported. Read-only. +func (m *CloudPcRemoteActionResult) GetActionState()(*ActionState) { + return m.actionState +} +// 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 *CloudPcRemoteActionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCloudPcId gets the cloudPcId property value. The ID of the Cloud PC device on which the remote action is performed. Read-only. +func (m *CloudPcRemoteActionResult) GetCloudPcId()(*string) { + return m.cloudPcId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcRemoteActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionName(val) + } + return nil + } + res["actionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionState) + if err != nil { + return err + } + if val != nil { + m.SetActionState(val.(*ActionState)) + } + return nil + } + res["cloudPcId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudPcId(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcStatusDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusDetails(val.(CloudPcStatusDetailsable)) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Last update time for action. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcRemoteActionResult) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. The ID of the Intune managed device on which the remote action is performed. Read-only. +func (m *CloudPcRemoteActionResult) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcRemoteActionResult) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. Time the action was initiated. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcRemoteActionResult) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatusDetails gets the statusDetails property value. The details of the Cloud PC status. +func (m *CloudPcRemoteActionResult) GetStatusDetails()(CloudPcStatusDetailsable) { + return m.statusDetails +} +// Serialize serializes information the current object +func (m *CloudPcRemoteActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actionName", m.GetActionName()) + if err != nil { + return err + } + } + if m.GetActionState() != nil { + cast := (*m.GetActionState()).String() + err := writer.WriteStringValue("actionState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cloudPcId", m.GetCloudPcId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("statusDetails", m.GetStatusDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionName sets the actionName property value. The specified action. Supported values in the Microsoft Endpoint Manager portal are: Reprovision, Resize, Restore. Supported values in enterprise Cloud PC devices are: Reboot, Rename, Reprovision, Troubleshoot. +func (m *CloudPcRemoteActionResult) SetActionName(value *string)() { + m.actionName = value +} +// SetActionState sets the actionState property value. State of the action. Possible values are: None, pending, canceled, active, done, failed, notSupported. Read-only. +func (m *CloudPcRemoteActionResult) SetActionState(value *ActionState)() { + m.actionState = value +} +// 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 *CloudPcRemoteActionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCloudPcId sets the cloudPcId property value. The ID of the Cloud PC device on which the remote action is performed. Read-only. +func (m *CloudPcRemoteActionResult) SetCloudPcId(value *string)() { + m.cloudPcId = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Last update time for action. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcRemoteActionResult) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The ID of the Intune managed device on which the remote action is performed. Read-only. +func (m *CloudPcRemoteActionResult) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcRemoteActionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. Time the action was initiated. The Timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 appears as '2014-01-01T00:00:00Z'. +func (m *CloudPcRemoteActionResult) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatusDetails sets the statusDetails property value. The details of the Cloud PC status. +func (m *CloudPcRemoteActionResult) SetStatusDetails(value CloudPcStatusDetailsable)() { + m.statusDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_response.go new file mode 100644 index 000000000..945d2f0c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRemoteActionResultCollectionResponse +type CloudPcRemoteActionResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcRemoteActionResultable +} +// NewCloudPcRemoteActionResultCollectionResponse instantiates a new CloudPcRemoteActionResultCollectionResponse and sets the default values. +func NewCloudPcRemoteActionResultCollectionResponse()(*CloudPcRemoteActionResultCollectionResponse) { + m := &CloudPcRemoteActionResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcRemoteActionResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcRemoteActionResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcRemoteActionResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcRemoteActionResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcRemoteActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcRemoteActionResultable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcRemoteActionResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcRemoteActionResultCollectionResponse) GetValue()([]CloudPcRemoteActionResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcRemoteActionResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcRemoteActionResultCollectionResponse) SetValue(value []CloudPcRemoteActionResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_responseable.go new file mode 100644 index 000000000..500804eb6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRemoteActionResultCollectionResponseable +type CloudPcRemoteActionResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcRemoteActionResultable) + SetValue(value []CloudPcRemoteActionResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_resultable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_resultable.go new file mode 100644 index 000000000..a42a41a8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_remote_action_resultable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRemoteActionResultable +type CloudPcRemoteActionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionName()(*string) + GetActionState()(*ActionState) + GetCloudPcId()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatusDetails()(CloudPcStatusDetailsable) + SetActionName(value *string)() + SetActionState(value *ActionState)() + SetCloudPcId(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatusDetails(value CloudPcStatusDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_report_name.go b/src/internal/connector/graph/betasdk/models/cloud_pc_report_name.go new file mode 100644 index 000000000..5830d245b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_report_name.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcReportName int + +const ( + REMOTECONNECTIONHISTORICALREPORTS_CLOUDPCREPORTNAME CloudPcReportName = iota + DAILYAGGREGATEDREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME + TOTALAGGREGATEDREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME + SHAREDUSELICENSEUSAGEREPORT_CLOUDPCREPORTNAME + SHAREDUSELICENSEUSAGEREALTIMEREPORT_CLOUDPCREPORTNAME + UNKNOWNFUTUREVALUE_CLOUDPCREPORTNAME +) + +func (i CloudPcReportName) String() string { + return []string{"remoteConnectionHistoricalReports", "dailyAggregatedRemoteConnectionReports", "totalAggregatedRemoteConnectionReports", "sharedUseLicenseUsageReport", "sharedUseLicenseUsageRealTimeReport", "unknownFutureValue"}[i] +} +func ParseCloudPcReportName(v string) (interface{}, error) { + result := REMOTECONNECTIONHISTORICALREPORTS_CLOUDPCREPORTNAME + switch v { + case "remoteConnectionHistoricalReports": + result = REMOTECONNECTIONHISTORICALREPORTS_CLOUDPCREPORTNAME + case "dailyAggregatedRemoteConnectionReports": + result = DAILYAGGREGATEDREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME + case "totalAggregatedRemoteConnectionReports": + result = TOTALAGGREGATEDREMOTECONNECTIONREPORTS_CLOUDPCREPORTNAME + case "sharedUseLicenseUsageReport": + result = SHAREDUSELICENSEUSAGEREPORT_CLOUDPCREPORTNAME + case "sharedUseLicenseUsageRealTimeReport": + result = SHAREDUSELICENSEUSAGEREALTIMEREPORT_CLOUDPCREPORTNAME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCREPORTNAME + default: + return 0, errors.New("Unknown CloudPcReportName value: " + v) + } + return &result, nil +} +func SerializeCloudPcReportName(values []CloudPcReportName) []string { + 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/cloud_pc_reports.go b/src/internal/connector/graph/betasdk/models/cloud_pc_reports.go new file mode 100644 index 000000000..57a476dba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_reports.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcReports +type CloudPcReports struct { + Entity + // The export jobs created for downloading reports. + exportJobs []CloudPcExportJobable +} +// NewCloudPcReports instantiates a new CloudPcReports and sets the default values. +func NewCloudPcReports()(*CloudPcReports) { + m := &CloudPcReports{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcReportsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcReportsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcReports(), nil +} +// GetExportJobs gets the exportJobs property value. The export jobs created for downloading reports. +func (m *CloudPcReports) GetExportJobs()([]CloudPcExportJobable) { + return m.exportJobs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcReports) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exportJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcExportJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcExportJobable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcExportJobable) + } + m.SetExportJobs(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CloudPcReports) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetExportJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExportJobs())) + for i, v := range m.GetExportJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exportJobs", cast) + if err != nil { + return err + } + } + return nil +} +// SetExportJobs sets the exportJobs property value. The export jobs created for downloading reports. +func (m *CloudPcReports) SetExportJobs(value []CloudPcExportJobable)() { + m.exportJobs = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_reportsable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_reportsable.go new file mode 100644 index 000000000..c92b0ccac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_reportsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcReportsable +type CloudPcReportsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExportJobs()([]CloudPcExportJobable) + SetExportJobs(value []CloudPcExportJobable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_setting.go b/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_setting.go new file mode 100644 index 000000000..0ac32dd13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_setting.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRestorePointSetting +type CloudPcRestorePointSetting 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 time interval in hours to take snapshots (restore points) of a Cloud PC automatically. Possible values are 4, 6, 12, 16, and 24. The default frequency is 12 hours. + frequencyInHours *int32 + // The OdataType property + odataType *string + // If true, the user has the ability to use snapshots to restore Cloud PCs. If false, non-admin users cannot use snapshots to restore the Cloud PC. + userRestoreEnabled *bool +} +// NewCloudPcRestorePointSetting instantiates a new cloudPcRestorePointSetting and sets the default values. +func NewCloudPcRestorePointSetting()(*CloudPcRestorePointSetting) { + m := &CloudPcRestorePointSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcRestorePointSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcRestorePointSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcRestorePointSetting(), 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 *CloudPcRestorePointSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcRestorePointSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["frequencyInHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFrequencyInHours(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["userRestoreEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserRestoreEnabled(val) + } + return nil + } + return res +} +// GetFrequencyInHours gets the frequencyInHours property value. The time interval in hours to take snapshots (restore points) of a Cloud PC automatically. Possible values are 4, 6, 12, 16, and 24. The default frequency is 12 hours. +func (m *CloudPcRestorePointSetting) GetFrequencyInHours()(*int32) { + return m.frequencyInHours +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcRestorePointSetting) GetOdataType()(*string) { + return m.odataType +} +// GetUserRestoreEnabled gets the userRestoreEnabled property value. If true, the user has the ability to use snapshots to restore Cloud PCs. If false, non-admin users cannot use snapshots to restore the Cloud PC. +func (m *CloudPcRestorePointSetting) GetUserRestoreEnabled()(*bool) { + return m.userRestoreEnabled +} +// Serialize serializes information the current object +func (m *CloudPcRestorePointSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("frequencyInHours", m.GetFrequencyInHours()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("userRestoreEnabled", m.GetUserRestoreEnabled()) + 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 *CloudPcRestorePointSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFrequencyInHours sets the frequencyInHours property value. The time interval in hours to take snapshots (restore points) of a Cloud PC automatically. Possible values are 4, 6, 12, 16, and 24. The default frequency is 12 hours. +func (m *CloudPcRestorePointSetting) SetFrequencyInHours(value *int32)() { + m.frequencyInHours = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcRestorePointSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserRestoreEnabled sets the userRestoreEnabled property value. If true, the user has the ability to use snapshots to restore Cloud PCs. If false, non-admin users cannot use snapshots to restore the Cloud PC. +func (m *CloudPcRestorePointSetting) SetUserRestoreEnabled(value *bool)() { + m.userRestoreEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_settingable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_settingable.go new file mode 100644 index 000000000..49840dca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_restore_point_settingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcRestorePointSettingable +type CloudPcRestorePointSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFrequencyInHours()(*int32) + GetOdataType()(*string) + GetUserRestoreEnabled()(*bool) + SetFrequencyInHours(value *int32)() + SetOdataType(value *string)() + SetUserRestoreEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan.go b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan.go new file mode 100644 index 000000000..4920c9f37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan.go @@ -0,0 +1,191 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcServicePlan +type CloudPcServicePlan struct { + Entity + // The name for the service plan. Read-only. + displayName *string + // The size of the RAM in GB. Read-only. + ramInGB *int32 + // The size of the OS Disk in GB. Read-only. + storageInGB *int32 + // The type of the service plan. Possible values are: enterprise, business, unknownFutureValue. Read-only. + type_escaped *CloudPcServicePlanType + // The size of the user profile disk in GB. Read-only. + userProfileInGB *int32 + // The number of vCPUs. Read-only. + vCpuCount *int32 +} +// NewCloudPcServicePlan instantiates a new CloudPcServicePlan and sets the default values. +func NewCloudPcServicePlan()(*CloudPcServicePlan) { + m := &CloudPcServicePlan{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcServicePlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcServicePlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcServicePlan(), nil +} +// GetDisplayName gets the displayName property value. The name for the service plan. Read-only. +func (m *CloudPcServicePlan) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcServicePlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["ramInGB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRamInGB(val) + } + return nil + } + res["storageInGB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStorageInGB(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcServicePlanType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CloudPcServicePlanType)) + } + return nil + } + res["userProfileInGB"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserProfileInGB(val) + } + return nil + } + res["vCpuCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVCpuCount(val) + } + return nil + } + return res +} +// GetRamInGB gets the ramInGB property value. The size of the RAM in GB. Read-only. +func (m *CloudPcServicePlan) GetRamInGB()(*int32) { + return m.ramInGB +} +// GetStorageInGB gets the storageInGB property value. The size of the OS Disk in GB. Read-only. +func (m *CloudPcServicePlan) GetStorageInGB()(*int32) { + return m.storageInGB +} +// GetType gets the type property value. The type of the service plan. Possible values are: enterprise, business, unknownFutureValue. Read-only. +func (m *CloudPcServicePlan) GetType()(*CloudPcServicePlanType) { + return m.type_escaped +} +// GetUserProfileInGB gets the userProfileInGB property value. The size of the user profile disk in GB. Read-only. +func (m *CloudPcServicePlan) GetUserProfileInGB()(*int32) { + return m.userProfileInGB +} +// GetVCpuCount gets the vCpuCount property value. The number of vCPUs. Read-only. +func (m *CloudPcServicePlan) GetVCpuCount()(*int32) { + return m.vCpuCount +} +// Serialize serializes information the current object +func (m *CloudPcServicePlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ramInGB", m.GetRamInGB()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("storageInGB", m.GetStorageInGB()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("userProfileInGB", m.GetUserProfileInGB()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("vCpuCount", m.GetVCpuCount()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name for the service plan. Read-only. +func (m *CloudPcServicePlan) SetDisplayName(value *string)() { + m.displayName = value +} +// SetRamInGB sets the ramInGB property value. The size of the RAM in GB. Read-only. +func (m *CloudPcServicePlan) SetRamInGB(value *int32)() { + m.ramInGB = value +} +// SetStorageInGB sets the storageInGB property value. The size of the OS Disk in GB. Read-only. +func (m *CloudPcServicePlan) SetStorageInGB(value *int32)() { + m.storageInGB = value +} +// SetType sets the type property value. The type of the service plan. Possible values are: enterprise, business, unknownFutureValue. Read-only. +func (m *CloudPcServicePlan) SetType(value *CloudPcServicePlanType)() { + m.type_escaped = value +} +// SetUserProfileInGB sets the userProfileInGB property value. The size of the user profile disk in GB. Read-only. +func (m *CloudPcServicePlan) SetUserProfileInGB(value *int32)() { + m.userProfileInGB = value +} +// SetVCpuCount sets the vCpuCount property value. The number of vCPUs. Read-only. +func (m *CloudPcServicePlan) SetVCpuCount(value *int32)() { + m.vCpuCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_response.go new file mode 100644 index 000000000..ef8f6d127 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcServicePlanCollectionResponse +type CloudPcServicePlanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcServicePlanable +} +// NewCloudPcServicePlanCollectionResponse instantiates a new CloudPcServicePlanCollectionResponse and sets the default values. +func NewCloudPcServicePlanCollectionResponse()(*CloudPcServicePlanCollectionResponse) { + m := &CloudPcServicePlanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcServicePlanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcServicePlanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcServicePlanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcServicePlanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcServicePlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcServicePlanable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcServicePlanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcServicePlanCollectionResponse) GetValue()([]CloudPcServicePlanable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcServicePlanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcServicePlanCollectionResponse) SetValue(value []CloudPcServicePlanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_responseable.go new file mode 100644 index 000000000..68bd4f477 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcServicePlanCollectionResponseable +type CloudPcServicePlanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcServicePlanable) + SetValue(value []CloudPcServicePlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_type.go new file mode 100644 index 000000000..4bd5d85be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_service_plan_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcServicePlanType int + +const ( + ENTERPRISE_CLOUDPCSERVICEPLANTYPE CloudPcServicePlanType = iota + BUSINESS_CLOUDPCSERVICEPLANTYPE + UNKNOWNFUTUREVALUE_CLOUDPCSERVICEPLANTYPE +) + +func (i CloudPcServicePlanType) String() string { + return []string{"enterprise", "business", "unknownFutureValue"}[i] +} +func ParseCloudPcServicePlanType(v string) (interface{}, error) { + result := ENTERPRISE_CLOUDPCSERVICEPLANTYPE + switch v { + case "enterprise": + result = ENTERPRISE_CLOUDPCSERVICEPLANTYPE + case "business": + result = BUSINESS_CLOUDPCSERVICEPLANTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCSERVICEPLANTYPE + default: + return 0, errors.New("Unknown CloudPcServicePlanType value: " + v) + } + return &result, nil +} +func SerializeCloudPcServicePlanType(values []CloudPcServicePlanType) []string { + 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/cloud_pc_service_planable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_service_planable.go new file mode 100644 index 000000000..1ec6cf0a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_service_planable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcServicePlanable +type CloudPcServicePlanable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetRamInGB()(*int32) + GetStorageInGB()(*int32) + GetType()(*CloudPcServicePlanType) + GetUserProfileInGB()(*int32) + GetVCpuCount()(*int32) + SetDisplayName(value *string)() + SetRamInGB(value *int32)() + SetStorageInGB(value *int32)() + SetType(value *CloudPcServicePlanType)() + SetUserProfileInGB(value *int32)() + SetVCpuCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan.go b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan.go new file mode 100644 index 000000000..f22a6d4fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSharedUseServicePlan +type CloudPcSharedUseServicePlan struct { + Entity + // The displayName property + displayName *string + // The totalCount property + totalCount *int32 + // The usedCount property + usedCount *int32 +} +// NewCloudPcSharedUseServicePlan instantiates a new CloudPcSharedUseServicePlan and sets the default values. +func NewCloudPcSharedUseServicePlan()(*CloudPcSharedUseServicePlan) { + m := &CloudPcSharedUseServicePlan{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcSharedUseServicePlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSharedUseServicePlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSharedUseServicePlan(), nil +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *CloudPcSharedUseServicePlan) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSharedUseServicePlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["totalCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCount(val) + } + return nil + } + res["usedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedCount(val) + } + return nil + } + return res +} +// GetTotalCount gets the totalCount property value. The totalCount property +func (m *CloudPcSharedUseServicePlan) GetTotalCount()(*int32) { + return m.totalCount +} +// GetUsedCount gets the usedCount property value. The usedCount property +func (m *CloudPcSharedUseServicePlan) GetUsedCount()(*int32) { + return m.usedCount +} +// Serialize serializes information the current object +func (m *CloudPcSharedUseServicePlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalCount", m.GetTotalCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedCount", m.GetUsedCount()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *CloudPcSharedUseServicePlan) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTotalCount sets the totalCount property value. The totalCount property +func (m *CloudPcSharedUseServicePlan) SetTotalCount(value *int32)() { + m.totalCount = value +} +// SetUsedCount sets the usedCount property value. The usedCount property +func (m *CloudPcSharedUseServicePlan) SetUsedCount(value *int32)() { + m.usedCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_response.go new file mode 100644 index 000000000..afe3d749e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSharedUseServicePlanCollectionResponse +type CloudPcSharedUseServicePlanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcSharedUseServicePlanable +} +// NewCloudPcSharedUseServicePlanCollectionResponse instantiates a new CloudPcSharedUseServicePlanCollectionResponse and sets the default values. +func NewCloudPcSharedUseServicePlanCollectionResponse()(*CloudPcSharedUseServicePlanCollectionResponse) { + m := &CloudPcSharedUseServicePlanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcSharedUseServicePlanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSharedUseServicePlanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSharedUseServicePlanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSharedUseServicePlanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcSharedUseServicePlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcSharedUseServicePlanable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcSharedUseServicePlanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcSharedUseServicePlanCollectionResponse) GetValue()([]CloudPcSharedUseServicePlanable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcSharedUseServicePlanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcSharedUseServicePlanCollectionResponse) SetValue(value []CloudPcSharedUseServicePlanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_responseable.go new file mode 100644 index 000000000..3a9aee113 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_plan_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSharedUseServicePlanCollectionResponseable +type CloudPcSharedUseServicePlanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcSharedUseServicePlanable) + SetValue(value []CloudPcSharedUseServicePlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_planable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_planable.go new file mode 100644 index 000000000..700fa0861 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_shared_use_service_planable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSharedUseServicePlanable +type CloudPcSharedUseServicePlanable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetTotalCount()(*int32) + GetUsedCount()(*int32) + SetDisplayName(value *string)() + SetTotalCount(value *int32)() + SetUsedCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot.go b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot.go new file mode 100644 index 000000000..5ac0c7bd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSnapshot +type CloudPcSnapshot struct { + Entity + // The unique identifier for the Cloud PC. + cloudPcId *string + // The date and time at which the snapshot was taken. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time at which the snapshot was last used to restore the Cloud PC device. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastRestoredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status of the Cloud PC snapshot. The possible values are: ready, unknownFutureValue. + status *CloudPcSnapshotStatus +} +// NewCloudPcSnapshot instantiates a new CloudPcSnapshot and sets the default values. +func NewCloudPcSnapshot()(*CloudPcSnapshot) { + m := &CloudPcSnapshot{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcSnapshotFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSnapshotFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSnapshot(), nil +} +// GetCloudPcId gets the cloudPcId property value. The unique identifier for the Cloud PC. +func (m *CloudPcSnapshot) GetCloudPcId()(*string) { + return m.cloudPcId +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time at which the snapshot was taken. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcSnapshot) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSnapshot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["cloudPcId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudPcId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastRestoredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRestoredDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcSnapshotStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CloudPcSnapshotStatus)) + } + return nil + } + return res +} +// GetLastRestoredDateTime gets the lastRestoredDateTime property value. The date and time at which the snapshot was last used to restore the Cloud PC device. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcSnapshot) GetLastRestoredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRestoredDateTime +} +// GetStatus gets the status property value. The status of the Cloud PC snapshot. The possible values are: ready, unknownFutureValue. +func (m *CloudPcSnapshot) GetStatus()(*CloudPcSnapshotStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CloudPcSnapshot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cloudPcId", m.GetCloudPcId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRestoredDateTime", m.GetLastRestoredDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCloudPcId sets the cloudPcId property value. The unique identifier for the Cloud PC. +func (m *CloudPcSnapshot) SetCloudPcId(value *string)() { + m.cloudPcId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time at which the snapshot was taken. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcSnapshot) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastRestoredDateTime sets the lastRestoredDateTime property value. The date and time at which the snapshot was last used to restore the Cloud PC device. The timestamp is shown in ISO 8601 format and Coordinated Universal Time (UTC). For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *CloudPcSnapshot) SetLastRestoredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRestoredDateTime = value +} +// SetStatus sets the status property value. The status of the Cloud PC snapshot. The possible values are: ready, unknownFutureValue. +func (m *CloudPcSnapshot) SetStatus(value *CloudPcSnapshotStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_response.go new file mode 100644 index 000000000..a429c17fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSnapshotCollectionResponse +type CloudPcSnapshotCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcSnapshotable +} +// NewCloudPcSnapshotCollectionResponse instantiates a new CloudPcSnapshotCollectionResponse and sets the default values. +func NewCloudPcSnapshotCollectionResponse()(*CloudPcSnapshotCollectionResponse) { + m := &CloudPcSnapshotCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcSnapshotCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSnapshotCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSnapshotCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSnapshotCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcSnapshotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcSnapshotable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcSnapshotable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcSnapshotCollectionResponse) GetValue()([]CloudPcSnapshotable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcSnapshotCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcSnapshotCollectionResponse) SetValue(value []CloudPcSnapshotable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_responseable.go new file mode 100644 index 000000000..cc6782a38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSnapshotCollectionResponseable +type CloudPcSnapshotCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcSnapshotable) + SetValue(value []CloudPcSnapshotable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_status.go new file mode 100644 index 000000000..d9aad73f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshot_status.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcSnapshotStatus int + +const ( + READY_CLOUDPCSNAPSHOTSTATUS CloudPcSnapshotStatus = iota + UNKNOWNFUTUREVALUE_CLOUDPCSNAPSHOTSTATUS +) + +func (i CloudPcSnapshotStatus) String() string { + return []string{"ready", "unknownFutureValue"}[i] +} +func ParseCloudPcSnapshotStatus(v string) (interface{}, error) { + result := READY_CLOUDPCSNAPSHOTSTATUS + switch v { + case "ready": + result = READY_CLOUDPCSNAPSHOTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCSNAPSHOTSTATUS + default: + return 0, errors.New("Unknown CloudPcSnapshotStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcSnapshotStatus(values []CloudPcSnapshotStatus) []string { + 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/cloud_pc_snapshotable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshotable.go new file mode 100644 index 000000000..704f8b6b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_snapshotable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSnapshotable +type CloudPcSnapshotable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudPcId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastRestoredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*CloudPcSnapshotStatus) + SetCloudPcId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastRestoredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *CloudPcSnapshotStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_status.go new file mode 100644 index 000000000..5e084fd84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_status.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcStatus int + +const ( + NOTPROVISIONED_CLOUDPCSTATUS CloudPcStatus = iota + PROVISIONING_CLOUDPCSTATUS + PROVISIONED_CLOUDPCSTATUS + INGRACEPERIOD_CLOUDPCSTATUS + DEPROVISIONING_CLOUDPCSTATUS + FAILED_CLOUDPCSTATUS + PROVISIONEDWITHWARNINGS_CLOUDPCSTATUS + RESIZING_CLOUDPCSTATUS + RESTORING_CLOUDPCSTATUS + PENDINGPROVISION_CLOUDPCSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCSTATUS +) + +func (i CloudPcStatus) String() string { + return []string{"notProvisioned", "provisioning", "provisioned", "inGracePeriod", "deprovisioning", "failed", "provisionedWithWarnings", "resizing", "restoring", "pendingProvision", "unknownFutureValue"}[i] +} +func ParseCloudPcStatus(v string) (interface{}, error) { + result := NOTPROVISIONED_CLOUDPCSTATUS + switch v { + case "notProvisioned": + result = NOTPROVISIONED_CLOUDPCSTATUS + case "provisioning": + result = PROVISIONING_CLOUDPCSTATUS + case "provisioned": + result = PROVISIONED_CLOUDPCSTATUS + case "inGracePeriod": + result = INGRACEPERIOD_CLOUDPCSTATUS + case "deprovisioning": + result = DEPROVISIONING_CLOUDPCSTATUS + case "failed": + result = FAILED_CLOUDPCSTATUS + case "provisionedWithWarnings": + result = PROVISIONEDWITHWARNINGS_CLOUDPCSTATUS + case "resizing": + result = RESIZING_CLOUDPCSTATUS + case "restoring": + result = RESTORING_CLOUDPCSTATUS + case "pendingProvision": + result = PENDINGPROVISION_CLOUDPCSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCSTATUS + default: + return 0, errors.New("Unknown CloudPcStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcStatus(values []CloudPcStatus) []string { + 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/cloud_pc_status_details.go b/src/internal/connector/graph/betasdk/models/cloud_pc_status_details.go new file mode 100644 index 000000000..e0c37f9ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_status_details.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcStatusDetails +type CloudPcStatusDetails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Any additional information about the Cloud PC status. + additionalInformation []KeyValuePairable + // The code associated with the Cloud PC status. + code *string + // The status message. + message *string + // The OdataType property + odataType *string +} +// NewCloudPcStatusDetails instantiates a new cloudPcStatusDetails and sets the default values. +func NewCloudPcStatusDetails()(*CloudPcStatusDetails) { + m := &CloudPcStatusDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcStatusDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcStatusDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcStatusDetails(), 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 *CloudPcStatusDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdditionalInformation gets the additionalInformation property value. Any additional information about the Cloud PC status. +func (m *CloudPcStatusDetails) GetAdditionalInformation()([]KeyValuePairable) { + return m.additionalInformation +} +// GetCode gets the code property value. The code associated with the Cloud PC status. +func (m *CloudPcStatusDetails) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcStatusDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetAdditionalInformation(res) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. The status message. +func (m *CloudPcStatusDetails) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcStatusDetails) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CloudPcStatusDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAdditionalInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalInformation())) + for i, v := range m.GetAdditionalInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("additionalInformation", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CloudPcStatusDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdditionalInformation sets the additionalInformation property value. Any additional information about the Cloud PC status. +func (m *CloudPcStatusDetails) SetAdditionalInformation(value []KeyValuePairable)() { + m.additionalInformation = value +} +// SetCode sets the code property value. The code associated with the Cloud PC status. +func (m *CloudPcStatusDetails) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The status message. +func (m *CloudPcStatusDetails) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcStatusDetails) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_status_detailsable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_status_detailsable.go new file mode 100644 index 000000000..de9c54cb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_status_detailsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcStatusDetailsable +type CloudPcStatusDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformation()([]KeyValuePairable) + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + SetAdditionalInformation(value []KeyValuePairable)() + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region.go b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region.go new file mode 100644 index 000000000..6bbbf99ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSupportedRegion +type CloudPcSupportedRegion struct { + Entity + // The name for the supported region. Read-only. + displayName *string + // The regionGroup property + regionGroup *CloudPcRegionGroup + // The status of the supported region. Possible values are: available, restricted, unavailable, unknownFutureValue. Read-only. + regionStatus *CloudPcSupportedRegionStatus + // The supportedSolution property + supportedSolution *CloudPcManagementService +} +// NewCloudPcSupportedRegion instantiates a new CloudPcSupportedRegion and sets the default values. +func NewCloudPcSupportedRegion()(*CloudPcSupportedRegion) { + m := &CloudPcSupportedRegion{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcSupportedRegionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSupportedRegionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSupportedRegion(), nil +} +// GetDisplayName gets the displayName property value. The name for the supported region. Read-only. +func (m *CloudPcSupportedRegion) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSupportedRegion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["regionGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcRegionGroup) + if err != nil { + return err + } + if val != nil { + m.SetRegionGroup(val.(*CloudPcRegionGroup)) + } + return nil + } + res["regionStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcSupportedRegionStatus) + if err != nil { + return err + } + if val != nil { + m.SetRegionStatus(val.(*CloudPcSupportedRegionStatus)) + } + return nil + } + res["supportedSolution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCloudPcManagementService) + if err != nil { + return err + } + if val != nil { + m.SetSupportedSolution(val.(*CloudPcManagementService)) + } + return nil + } + return res +} +// GetRegionGroup gets the regionGroup property value. The regionGroup property +func (m *CloudPcSupportedRegion) GetRegionGroup()(*CloudPcRegionGroup) { + return m.regionGroup +} +// GetRegionStatus gets the regionStatus property value. The status of the supported region. Possible values are: available, restricted, unavailable, unknownFutureValue. Read-only. +func (m *CloudPcSupportedRegion) GetRegionStatus()(*CloudPcSupportedRegionStatus) { + return m.regionStatus +} +// GetSupportedSolution gets the supportedSolution property value. The supportedSolution property +func (m *CloudPcSupportedRegion) GetSupportedSolution()(*CloudPcManagementService) { + return m.supportedSolution +} +// Serialize serializes information the current object +func (m *CloudPcSupportedRegion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetRegionGroup() != nil { + cast := (*m.GetRegionGroup()).String() + err = writer.WriteStringValue("regionGroup", &cast) + if err != nil { + return err + } + } + if m.GetRegionStatus() != nil { + cast := (*m.GetRegionStatus()).String() + err = writer.WriteStringValue("regionStatus", &cast) + if err != nil { + return err + } + } + if m.GetSupportedSolution() != nil { + cast := (*m.GetSupportedSolution()).String() + err = writer.WriteStringValue("supportedSolution", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name for the supported region. Read-only. +func (m *CloudPcSupportedRegion) SetDisplayName(value *string)() { + m.displayName = value +} +// SetRegionGroup sets the regionGroup property value. The regionGroup property +func (m *CloudPcSupportedRegion) SetRegionGroup(value *CloudPcRegionGroup)() { + m.regionGroup = value +} +// SetRegionStatus sets the regionStatus property value. The status of the supported region. Possible values are: available, restricted, unavailable, unknownFutureValue. Read-only. +func (m *CloudPcSupportedRegion) SetRegionStatus(value *CloudPcSupportedRegionStatus)() { + m.regionStatus = value +} +// SetSupportedSolution sets the supportedSolution property value. The supportedSolution property +func (m *CloudPcSupportedRegion) SetSupportedSolution(value *CloudPcManagementService)() { + m.supportedSolution = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_response.go new file mode 100644 index 000000000..289bc8d6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSupportedRegionCollectionResponse +type CloudPcSupportedRegionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcSupportedRegionable +} +// NewCloudPcSupportedRegionCollectionResponse instantiates a new CloudPcSupportedRegionCollectionResponse and sets the default values. +func NewCloudPcSupportedRegionCollectionResponse()(*CloudPcSupportedRegionCollectionResponse) { + m := &CloudPcSupportedRegionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcSupportedRegionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcSupportedRegionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcSupportedRegionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcSupportedRegionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcSupportedRegionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcSupportedRegionable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcSupportedRegionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcSupportedRegionCollectionResponse) GetValue()([]CloudPcSupportedRegionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcSupportedRegionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcSupportedRegionCollectionResponse) SetValue(value []CloudPcSupportedRegionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_responseable.go new file mode 100644 index 000000000..200a09a16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSupportedRegionCollectionResponseable +type CloudPcSupportedRegionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcSupportedRegionable) + SetValue(value []CloudPcSupportedRegionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_status.go b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_status.go new file mode 100644 index 000000000..a7f8199be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_region_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcSupportedRegionStatus int + +const ( + AVAILABLE_CLOUDPCSUPPORTEDREGIONSTATUS CloudPcSupportedRegionStatus = iota + RESTRICTED_CLOUDPCSUPPORTEDREGIONSTATUS + UNAVAILABLE_CLOUDPCSUPPORTEDREGIONSTATUS + UNKNOWNFUTUREVALUE_CLOUDPCSUPPORTEDREGIONSTATUS +) + +func (i CloudPcSupportedRegionStatus) String() string { + return []string{"available", "restricted", "unavailable", "unknownFutureValue"}[i] +} +func ParseCloudPcSupportedRegionStatus(v string) (interface{}, error) { + result := AVAILABLE_CLOUDPCSUPPORTEDREGIONSTATUS + switch v { + case "available": + result = AVAILABLE_CLOUDPCSUPPORTEDREGIONSTATUS + case "restricted": + result = RESTRICTED_CLOUDPCSUPPORTEDREGIONSTATUS + case "unavailable": + result = UNAVAILABLE_CLOUDPCSUPPORTEDREGIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCSUPPORTEDREGIONSTATUS + default: + return 0, errors.New("Unknown CloudPcSupportedRegionStatus value: " + v) + } + return &result, nil +} +func SerializeCloudPcSupportedRegionStatus(values []CloudPcSupportedRegionStatus) []string { + 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/cloud_pc_supported_regionable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_regionable.go new file mode 100644 index 000000000..36ffa28f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_supported_regionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcSupportedRegionable +type CloudPcSupportedRegionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetRegionGroup()(*CloudPcRegionGroup) + GetRegionStatus()(*CloudPcSupportedRegionStatus) + GetSupportedSolution()(*CloudPcManagementService) + SetDisplayName(value *string)() + SetRegionGroup(value *CloudPcRegionGroup)() + SetRegionStatus(value *CloudPcSupportedRegionStatus)() + SetSupportedSolution(value *CloudPcManagementService)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_account_type.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_account_type.go new file mode 100644 index 000000000..151e8a376 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_account_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcUserAccountType int + +const ( + STANDARDUSER_CLOUDPCUSERACCOUNTTYPE CloudPcUserAccountType = iota + ADMINISTRATOR_CLOUDPCUSERACCOUNTTYPE + UNKNOWNFUTUREVALUE_CLOUDPCUSERACCOUNTTYPE +) + +func (i CloudPcUserAccountType) String() string { + return []string{"standardUser", "administrator", "unknownFutureValue"}[i] +} +func ParseCloudPcUserAccountType(v string) (interface{}, error) { + result := STANDARDUSER_CLOUDPCUSERACCOUNTTYPE + switch v { + case "standardUser": + result = STANDARDUSER_CLOUDPCUSERACCOUNTTYPE + case "administrator": + result = ADMINISTRATOR_CLOUDPCUSERACCOUNTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CLOUDPCUSERACCOUNTTYPE + default: + return 0, errors.New("Unknown CloudPcUserAccountType value: " + v) + } + return &result, nil +} +func SerializeCloudPcUserAccountType(values []CloudPcUserAccountType) []string { + 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/cloud_pc_user_role_scope_tag_info.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info.go new file mode 100644 index 000000000..7dfc98880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserRoleScopeTagInfo +type CloudPcUserRoleScopeTagInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Scope tag display name. + displayName *string + // The OdataType property + odataType *string + // Scope tag ID. + roleScopeTagId *string +} +// NewCloudPcUserRoleScopeTagInfo instantiates a new cloudPcUserRoleScopeTagInfo and sets the default values. +func NewCloudPcUserRoleScopeTagInfo()(*CloudPcUserRoleScopeTagInfo) { + m := &CloudPcUserRoleScopeTagInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcUserRoleScopeTagInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserRoleScopeTagInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserRoleScopeTagInfo(), 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 *CloudPcUserRoleScopeTagInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Scope tag display name. +func (m *CloudPcUserRoleScopeTagInfo) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserRoleScopeTagInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["roleScopeTagId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleScopeTagId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcUserRoleScopeTagInfo) GetOdataType()(*string) { + return m.odataType +} +// GetRoleScopeTagId gets the roleScopeTagId property value. Scope tag ID. +func (m *CloudPcUserRoleScopeTagInfo) GetRoleScopeTagId()(*string) { + return m.roleScopeTagId +} +// Serialize serializes information the current object +func (m *CloudPcUserRoleScopeTagInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("roleScopeTagId", m.GetRoleScopeTagId()) + 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 *CloudPcUserRoleScopeTagInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Scope tag display name. +func (m *CloudPcUserRoleScopeTagInfo) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcUserRoleScopeTagInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoleScopeTagId sets the roleScopeTagId property value. Scope tag ID. +func (m *CloudPcUserRoleScopeTagInfo) SetRoleScopeTagId(value *string)() { + m.roleScopeTagId = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_response.go new file mode 100644 index 000000000..bda8bdc0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserRoleScopeTagInfoCollectionResponse +type CloudPcUserRoleScopeTagInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcUserRoleScopeTagInfoable +} +// NewCloudPcUserRoleScopeTagInfoCollectionResponse instantiates a new CloudPcUserRoleScopeTagInfoCollectionResponse and sets the default values. +func NewCloudPcUserRoleScopeTagInfoCollectionResponse()(*CloudPcUserRoleScopeTagInfoCollectionResponse) { + m := &CloudPcUserRoleScopeTagInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcUserRoleScopeTagInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserRoleScopeTagInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserRoleScopeTagInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserRoleScopeTagInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcUserRoleScopeTagInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcUserRoleScopeTagInfoable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcUserRoleScopeTagInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcUserRoleScopeTagInfoCollectionResponse) GetValue()([]CloudPcUserRoleScopeTagInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcUserRoleScopeTagInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcUserRoleScopeTagInfoCollectionResponse) SetValue(value []CloudPcUserRoleScopeTagInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_responseable.go new file mode 100644 index 000000000..ffcca82ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserRoleScopeTagInfoCollectionResponseable +type CloudPcUserRoleScopeTagInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcUserRoleScopeTagInfoable) + SetValue(value []CloudPcUserRoleScopeTagInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_infoable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_infoable.go new file mode 100644 index 000000000..bf88cc9b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_role_scope_tag_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserRoleScopeTagInfoable +type CloudPcUserRoleScopeTagInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetRoleScopeTagId()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetRoleScopeTagId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting.go new file mode 100644 index 000000000..76c9dabf3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting.go @@ -0,0 +1,225 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSetting +type CloudPcUserSetting struct { + Entity + // Represents the set of Microsoft 365 groups and security groups in Azure Active Directory that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSettingample. + assignments []CloudPcUserSettingAssignmentable + // The date and time the setting was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The setting name displayed in the user interface. + displayName *string + // The last date and time the setting was modified. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates whether the local admin option is enabled. Default value is false. To enable the local admin option, change the setting to true. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. + localAdminEnabled *bool + // Defines how frequently a restore point is created that is, a snapshot is taken) for users' provisioned Cloud PCs (default is 12 hours), and whether the user is allowed to restore their own Cloud PCs to a backup made at a specific point in time. + restorePointSetting CloudPcRestorePointSettingable + // Indicates whether the self-service option is enabled. Default value is false. To enable the self-service option, change the setting to true. If the self-service option is enabled, the end user is allowed to perform some self-service operations, such as upgrading the Cloud PC through the end user portal. + selfServiceEnabled *bool +} +// NewCloudPcUserSetting instantiates a new CloudPcUserSetting and sets the default values. +func NewCloudPcUserSetting()(*CloudPcUserSetting) { + m := &CloudPcUserSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcUserSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserSetting(), nil +} +// GetAssignments gets the assignments property value. Represents the set of Microsoft 365 groups and security groups in Azure Active Directory that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSettingample. +func (m *CloudPcUserSetting) GetAssignments()([]CloudPcUserSettingAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the setting was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSetting) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The setting name displayed in the user interface. +func (m *CloudPcUserSetting) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcUserSettingAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcUserSettingAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcUserSettingAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["localAdminEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocalAdminEnabled(val) + } + return nil + } + res["restorePointSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcRestorePointSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestorePointSetting(val.(CloudPcRestorePointSettingable)) + } + return nil + } + res["selfServiceEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSelfServiceEnabled(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last date and time the setting was modified. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSetting) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLocalAdminEnabled gets the localAdminEnabled property value. Indicates whether the local admin option is enabled. Default value is false. To enable the local admin option, change the setting to true. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. +func (m *CloudPcUserSetting) GetLocalAdminEnabled()(*bool) { + return m.localAdminEnabled +} +// GetRestorePointSetting gets the restorePointSetting property value. Defines how frequently a restore point is created that is, a snapshot is taken) for users' provisioned Cloud PCs (default is 12 hours), and whether the user is allowed to restore their own Cloud PCs to a backup made at a specific point in time. +func (m *CloudPcUserSetting) GetRestorePointSetting()(CloudPcRestorePointSettingable) { + return m.restorePointSetting +} +// GetSelfServiceEnabled gets the selfServiceEnabled property value. Indicates whether the self-service option is enabled. Default value is false. To enable the self-service option, change the setting to true. If the self-service option is enabled, the end user is allowed to perform some self-service operations, such as upgrading the Cloud PC through the end user portal. +func (m *CloudPcUserSetting) GetSelfServiceEnabled()(*bool) { + return m.selfServiceEnabled +} +// Serialize serializes information the current object +func (m *CloudPcUserSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("localAdminEnabled", m.GetLocalAdminEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("restorePointSetting", m.GetRestorePointSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("selfServiceEnabled", m.GetSelfServiceEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. Represents the set of Microsoft 365 groups and security groups in Azure Active Directory that have cloudPCUserSetting assigned. Returned only on $expand. For an example, see Get cloudPcUserSettingample. +func (m *CloudPcUserSetting) SetAssignments(value []CloudPcUserSettingAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the setting was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSetting) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The setting name displayed in the user interface. +func (m *CloudPcUserSetting) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last date and time the setting was modified. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSetting) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLocalAdminEnabled sets the localAdminEnabled property value. Indicates whether the local admin option is enabled. Default value is false. To enable the local admin option, change the setting to true. If the local admin option is enabled, the end user can be an admin of the Cloud PC device. +func (m *CloudPcUserSetting) SetLocalAdminEnabled(value *bool)() { + m.localAdminEnabled = value +} +// SetRestorePointSetting sets the restorePointSetting property value. Defines how frequently a restore point is created that is, a snapshot is taken) for users' provisioned Cloud PCs (default is 12 hours), and whether the user is allowed to restore their own Cloud PCs to a backup made at a specific point in time. +func (m *CloudPcUserSetting) SetRestorePointSetting(value CloudPcRestorePointSettingable)() { + m.restorePointSetting = value +} +// SetSelfServiceEnabled sets the selfServiceEnabled property value. Indicates whether the self-service option is enabled. Default value is false. To enable the self-service option, change the setting to true. If the self-service option is enabled, the end user is allowed to perform some self-service operations, such as upgrading the Cloud PC through the end user portal. +func (m *CloudPcUserSetting) SetSelfServiceEnabled(value *bool)() { + m.selfServiceEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment.go new file mode 100644 index 000000000..63eb826cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcUserSettingAssignment struct { + Entity + // The date and time this assignment was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The assignment target for the user setting. Currently, the only target supported for this user setting is a user group. For details, see cloudPcManagementGroupAssignmentTarget. + target CloudPcManagementAssignmentTargetable +} +// NewCloudPcUserSettingAssignment instantiates a new cloudPcUserSettingAssignment and sets the default values. +func NewCloudPcUserSettingAssignment()(*CloudPcUserSettingAssignment) { + m := &CloudPcUserSettingAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateCloudPcUserSettingAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserSettingAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserSettingAssignment(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time this assignment was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSettingAssignment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserSettingAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudPcManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(CloudPcManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The assignment target for the user setting. Currently, the only target supported for this user setting is a user group. For details, see cloudPcManagementGroupAssignmentTarget. +func (m *CloudPcUserSettingAssignment) GetTarget()(CloudPcManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *CloudPcUserSettingAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time this assignment was created. The Timestamp type represents the date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 looks like this: '2014-01-01T00:00:00Z'. +func (m *CloudPcUserSettingAssignment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetTarget sets the target property value. The assignment target for the user setting. Currently, the only target supported for this user setting is a user group. For details, see cloudPcManagementGroupAssignmentTarget. +func (m *CloudPcUserSettingAssignment) SetTarget(value CloudPcManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_response.go new file mode 100644 index 000000000..de1aff410 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingAssignmentCollectionResponse +type CloudPcUserSettingAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcUserSettingAssignmentable +} +// NewCloudPcUserSettingAssignmentCollectionResponse instantiates a new CloudPcUserSettingAssignmentCollectionResponse and sets the default values. +func NewCloudPcUserSettingAssignmentCollectionResponse()(*CloudPcUserSettingAssignmentCollectionResponse) { + m := &CloudPcUserSettingAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcUserSettingAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserSettingAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserSettingAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserSettingAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcUserSettingAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcUserSettingAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcUserSettingAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcUserSettingAssignmentCollectionResponse) GetValue()([]CloudPcUserSettingAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcUserSettingAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcUserSettingAssignmentCollectionResponse) SetValue(value []CloudPcUserSettingAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_responseable.go new file mode 100644 index 000000000..bfe2b8d42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingAssignmentCollectionResponseable +type CloudPcUserSettingAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcUserSettingAssignmentable) + SetValue(value []CloudPcUserSettingAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignmentable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignmentable.go new file mode 100644 index 000000000..f759300a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_assignmentable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingAssignmentable +type CloudPcUserSettingAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTarget()(CloudPcManagementAssignmentTargetable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTarget(value CloudPcManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_response.go new file mode 100644 index 000000000..27278a95b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingCollectionResponse +type CloudPcUserSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CloudPcUserSettingable +} +// NewCloudPcUserSettingCollectionResponse instantiates a new CloudPcUserSettingCollectionResponse and sets the default values. +func NewCloudPcUserSettingCollectionResponse()(*CloudPcUserSettingCollectionResponse) { + m := &CloudPcUserSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcUserSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcUserSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcUserSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcUserSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcUserSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcUserSettingable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcUserSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcUserSettingCollectionResponse) GetValue()([]CloudPcUserSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcUserSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcUserSettingCollectionResponse) SetValue(value []CloudPcUserSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_responseable.go new file mode 100644 index 000000000..b5b007ac5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingCollectionResponseable +type CloudPcUserSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcUserSettingable) + SetValue(value []CloudPcUserSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_user_settingable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_user_settingable.go new file mode 100644 index 000000000..f05e7cbff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_user_settingable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcUserSettingable +type CloudPcUserSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]CloudPcUserSettingAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocalAdminEnabled()(*bool) + GetRestorePointSetting()(CloudPcRestorePointSettingable) + GetSelfServiceEnabled()(*bool) + SetAssignments(value []CloudPcUserSettingAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocalAdminEnabled(value *bool)() + SetRestorePointSetting(value CloudPcRestorePointSettingable)() + SetSelfServiceEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settings.go b/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settings.go new file mode 100644 index 000000000..0a708cd40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settings.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcWindowsSettings +type CloudPcWindowsSettings 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 Windows language/region tag to use for language pack configuration and localization of the Cloud PC. The default value is en-US, which corresponds to English (United States). + language *string + // The OdataType property + odataType *string +} +// NewCloudPcWindowsSettings instantiates a new cloudPcWindowsSettings and sets the default values. +func NewCloudPcWindowsSettings()(*CloudPcWindowsSettings) { + m := &CloudPcWindowsSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCloudPcWindowsSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcWindowsSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcWindowsSettings(), 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 *CloudPcWindowsSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcWindowsSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(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 + } + return res +} +// GetLanguage gets the language property value. The Windows language/region tag to use for language pack configuration and localization of the Cloud PC. The default value is en-US, which corresponds to English (United States). +func (m *CloudPcWindowsSettings) GetLanguage()(*string) { + return m.language +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CloudPcWindowsSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CloudPcWindowsSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CloudPcWindowsSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLanguage sets the language property value. The Windows language/region tag to use for language pack configuration and localization of the Cloud PC. The default value is en-US, which corresponds to English (United States). +func (m *CloudPcWindowsSettings) SetLanguage(value *string)() { + m.language = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CloudPcWindowsSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settingsable.go b/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settingsable.go new file mode 100644 index 000000000..875dff95b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cloud_pc_windows_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudPcWindowsSettingsable +type CloudPcWindowsSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLanguage()(*string) + GetOdataType()(*string) + SetLanguage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/coachmark_location.go b/src/internal/connector/graph/betasdk/models/coachmark_location.go new file mode 100644 index 000000000..dbce0afb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/coachmark_location.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CoachmarkLocation +type CoachmarkLocation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Length of coachmark. + length *int32 + // The OdataType property + odataType *string + // Offset of coachmark. + offset *int32 + // Type of coachmark location. The possible values are: unknown, fromEmail, subject, externalTag, displayName, messageBody, unknownFutureValue. + type_escaped *CoachmarkLocationType +} +// NewCoachmarkLocation instantiates a new coachmarkLocation and sets the default values. +func NewCoachmarkLocation()(*CoachmarkLocation) { + m := &CoachmarkLocation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCoachmarkLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCoachmarkLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCoachmarkLocation(), 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 *CoachmarkLocation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CoachmarkLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCoachmarkLocationType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*CoachmarkLocationType)) + } + return nil + } + return res +} +// GetLength gets the length property value. Length of coachmark. +func (m *CoachmarkLocation) GetLength()(*int32) { + return m.length +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CoachmarkLocation) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. Offset of coachmark. +func (m *CoachmarkLocation) GetOffset()(*int32) { + return m.offset +} +// GetType gets the type property value. Type of coachmark location. The possible values are: unknown, fromEmail, subject, externalTag, displayName, messageBody, unknownFutureValue. +func (m *CoachmarkLocation) GetType()(*CoachmarkLocationType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *CoachmarkLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("offset", m.GetOffset()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *CoachmarkLocation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLength sets the length property value. Length of coachmark. +func (m *CoachmarkLocation) SetLength(value *int32)() { + m.length = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CoachmarkLocation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. Offset of coachmark. +func (m *CoachmarkLocation) SetOffset(value *int32)() { + m.offset = value +} +// SetType sets the type property value. Type of coachmark location. The possible values are: unknown, fromEmail, subject, externalTag, displayName, messageBody, unknownFutureValue. +func (m *CoachmarkLocation) SetType(value *CoachmarkLocationType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/coachmark_location_type.go b/src/internal/connector/graph/betasdk/models/coachmark_location_type.go new file mode 100644 index 000000000..d5a30b086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/coachmark_location_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CoachmarkLocationType int + +const ( + UNKNOWN_COACHMARKLOCATIONTYPE CoachmarkLocationType = iota + FROMEMAIL_COACHMARKLOCATIONTYPE + SUBJECT_COACHMARKLOCATIONTYPE + EXTERNALTAG_COACHMARKLOCATIONTYPE + DISPLAYNAME_COACHMARKLOCATIONTYPE + MESSAGEBODY_COACHMARKLOCATIONTYPE + UNKNOWNFUTUREVALUE_COACHMARKLOCATIONTYPE +) + +func (i CoachmarkLocationType) String() string { + return []string{"unknown", "fromEmail", "subject", "externalTag", "displayName", "messageBody", "unknownFutureValue"}[i] +} +func ParseCoachmarkLocationType(v string) (interface{}, error) { + result := UNKNOWN_COACHMARKLOCATIONTYPE + switch v { + case "unknown": + result = UNKNOWN_COACHMARKLOCATIONTYPE + case "fromEmail": + result = FROMEMAIL_COACHMARKLOCATIONTYPE + case "subject": + result = SUBJECT_COACHMARKLOCATIONTYPE + case "externalTag": + result = EXTERNALTAG_COACHMARKLOCATIONTYPE + case "displayName": + result = DISPLAYNAME_COACHMARKLOCATIONTYPE + case "messageBody": + result = MESSAGEBODY_COACHMARKLOCATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_COACHMARKLOCATIONTYPE + default: + return 0, errors.New("Unknown CoachmarkLocationType value: " + v) + } + return &result, nil +} +func SerializeCoachmarkLocationType(values []CoachmarkLocationType) []string { + 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/coachmark_locationable.go b/src/internal/connector/graph/betasdk/models/coachmark_locationable.go new file mode 100644 index 000000000..f45ff632e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/coachmark_locationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CoachmarkLocationable +type CoachmarkLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLength()(*int32) + GetOdataType()(*string) + GetOffset()(*int32) + GetType()(*CoachmarkLocationType) + SetLength(value *int32)() + SetOdataType(value *string)() + SetOffset(value *int32)() + SetType(value *CoachmarkLocationType)() +} diff --git a/src/internal/connector/graph/betasdk/models/code.go b/src/internal/connector/graph/betasdk/models/code.go new file mode 100644 index 000000000..7d722106b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/code.go @@ -0,0 +1,156 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type Code int + +const ( + // None error. + NONE_CODE Code = iota + // Json file invalid error. + JSONFILEINVALID_CODE + // Json file missing error. + JSONFILEMISSING_CODE + // Json file too large error. + JSONFILETOOLARGE_CODE + // Rules missing error. + RULESMISSING_CODE + // Duplicate rules error. + DUPLICATERULES_CODE + // Too many rules specified error. + TOOMANYRULESSPECIFIED_CODE + // Operator missing error. + OPERATORMISSING_CODE + // Operator not supported error. + OPERATORNOTSUPPORTED_CODE + // Data type missing error. + DATATYPEMISSING_CODE + // Data type not supported error. + DATATYPENOTSUPPORTED_CODE + // Operator data type combination not supported error. + OPERATORDATATYPECOMBINATIONNOTSUPPORTED_CODE + // More info urlmissing error. + MOREINFOURIMISSING_CODE + // More info url invalid error. + MOREINFOURIINVALID_CODE + // More info ur ltoo large error. + MOREINFOURITOOLARGE_CODE + // Description missing error. + DESCRIPTIONMISSING_CODE + // Description invalid error. + DESCRIPTIONINVALID_CODE + // Description too large error. + DESCRIPTIONTOOLARGE_CODE + // Title missing error. + TITLEMISSING_CODE + // Title invalid error. + TITLEINVALID_CODE + // Title too large error. + TITLETOOLARGE_CODE + // Operand missing error. + OPERANDMISSING_CODE + // Operand invalid error. + OPERANDINVALID_CODE + // Operand too large error. + OPERANDTOOLARGE_CODE + // Setting name missing error. + SETTINGNAMEMISSING_CODE + // Setting name invalid error. + SETTINGNAMEINVALID_CODE + // Setting name too large error. + SETTINGNAMETOOLARGE_CODE + // English locale missing error. + ENGLISHLOCALEMISSING_CODE + // Duplicate locales error. + DUPLICATELOCALES_CODE + // Unrecognized locale error. + UNRECOGNIZEDLOCALE_CODE + // Unknown error. + UNKNOWN_CODE + // Remediation strings missing error. + REMEDIATIONSTRINGSMISSING_CODE +) + +func (i Code) String() string { + return []string{"none", "jsonFileInvalid", "jsonFileMissing", "jsonFileTooLarge", "rulesMissing", "duplicateRules", "tooManyRulesSpecified", "operatorMissing", "operatorNotSupported", "datatypeMissing", "datatypeNotSupported", "operatorDataTypeCombinationNotSupported", "moreInfoUriMissing", "moreInfoUriInvalid", "moreInfoUriTooLarge", "descriptionMissing", "descriptionInvalid", "descriptionTooLarge", "titleMissing", "titleInvalid", "titleTooLarge", "operandMissing", "operandInvalid", "operandTooLarge", "settingNameMissing", "settingNameInvalid", "settingNameTooLarge", "englishLocaleMissing", "duplicateLocales", "unrecognizedLocale", "unknown", "remediationStringsMissing"}[i] +} +func ParseCode(v string) (interface{}, error) { + result := NONE_CODE + switch v { + case "none": + result = NONE_CODE + case "jsonFileInvalid": + result = JSONFILEINVALID_CODE + case "jsonFileMissing": + result = JSONFILEMISSING_CODE + case "jsonFileTooLarge": + result = JSONFILETOOLARGE_CODE + case "rulesMissing": + result = RULESMISSING_CODE + case "duplicateRules": + result = DUPLICATERULES_CODE + case "tooManyRulesSpecified": + result = TOOMANYRULESSPECIFIED_CODE + case "operatorMissing": + result = OPERATORMISSING_CODE + case "operatorNotSupported": + result = OPERATORNOTSUPPORTED_CODE + case "datatypeMissing": + result = DATATYPEMISSING_CODE + case "datatypeNotSupported": + result = DATATYPENOTSUPPORTED_CODE + case "operatorDataTypeCombinationNotSupported": + result = OPERATORDATATYPECOMBINATIONNOTSUPPORTED_CODE + case "moreInfoUriMissing": + result = MOREINFOURIMISSING_CODE + case "moreInfoUriInvalid": + result = MOREINFOURIINVALID_CODE + case "moreInfoUriTooLarge": + result = MOREINFOURITOOLARGE_CODE + case "descriptionMissing": + result = DESCRIPTIONMISSING_CODE + case "descriptionInvalid": + result = DESCRIPTIONINVALID_CODE + case "descriptionTooLarge": + result = DESCRIPTIONTOOLARGE_CODE + case "titleMissing": + result = TITLEMISSING_CODE + case "titleInvalid": + result = TITLEINVALID_CODE + case "titleTooLarge": + result = TITLETOOLARGE_CODE + case "operandMissing": + result = OPERANDMISSING_CODE + case "operandInvalid": + result = OPERANDINVALID_CODE + case "operandTooLarge": + result = OPERANDTOOLARGE_CODE + case "settingNameMissing": + result = SETTINGNAMEMISSING_CODE + case "settingNameInvalid": + result = SETTINGNAMEINVALID_CODE + case "settingNameTooLarge": + result = SETTINGNAMETOOLARGE_CODE + case "englishLocaleMissing": + result = ENGLISHLOCALEMISSING_CODE + case "duplicateLocales": + result = DUPLICATELOCALES_CODE + case "unrecognizedLocale": + result = UNRECOGNIZEDLOCALE_CODE + case "unknown": + result = UNKNOWN_CODE + case "remediationStringsMissing": + result = REMEDIATIONSTRINGSMISSING_CODE + default: + return 0, errors.New("Unknown Code value: " + v) + } + return &result, nil +} +func SerializeCode(values []Code) []string { + 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/collapse_property.go b/src/internal/connector/graph/betasdk/models/collapse_property.go new file mode 100644 index 000000000..a82216e62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/collapse_property.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CollapseProperty +type CollapseProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines the collapse group to trim results. The properties in this collection must be sortable/refinable properties. Required. + fields []string + // Defines a maximum limit count for this field. This numeric value must be a positive integer. Required. + limit *int32 + // The OdataType property + odataType *string +} +// NewCollapseProperty instantiates a new collapseProperty and sets the default values. +func NewCollapseProperty()(*CollapseProperty) { + m := &CollapseProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCollapsePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCollapsePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCollapseProperty(), 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 *CollapseProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CollapseProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetFields(res) + } + return nil + } + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLimit(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 + } + return res +} +// GetFields gets the fields property value. Defines the collapse group to trim results. The properties in this collection must be sortable/refinable properties. Required. +func (m *CollapseProperty) GetFields()([]string) { + return m.fields +} +// GetLimit gets the limit property value. Defines a maximum limit count for this field. This numeric value must be a positive integer. Required. +func (m *CollapseProperty) GetLimit()(*int32) { + return m.limit +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CollapseProperty) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CollapseProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFields() != nil { + err := writer.WriteCollectionOfStringValues("fields", m.GetFields()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("limit", m.GetLimit()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CollapseProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFields sets the fields property value. Defines the collapse group to trim results. The properties in this collection must be sortable/refinable properties. Required. +func (m *CollapseProperty) SetFields(value []string)() { + m.fields = value +} +// SetLimit sets the limit property value. Defines a maximum limit count for this field. This numeric value must be a positive integer. Required. +func (m *CollapseProperty) SetLimit(value *int32)() { + m.limit = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CollapseProperty) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/collapse_property_collection_response.go b/src/internal/connector/graph/betasdk/models/collapse_property_collection_response.go new file mode 100644 index 000000000..70a8acc53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/collapse_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CollapsePropertyCollectionResponse +type CollapsePropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CollapsePropertyable +} +// NewCollapsePropertyCollectionResponse instantiates a new CollapsePropertyCollectionResponse and sets the default values. +func NewCollapsePropertyCollectionResponse()(*CollapsePropertyCollectionResponse) { + m := &CollapsePropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCollapsePropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCollapsePropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCollapsePropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CollapsePropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCollapsePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CollapsePropertyable, len(val)) + for i, v := range val { + res[i] = v.(CollapsePropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CollapsePropertyCollectionResponse) GetValue()([]CollapsePropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CollapsePropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CollapsePropertyCollectionResponse) SetValue(value []CollapsePropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/collapse_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/collapse_property_collection_responseable.go new file mode 100644 index 000000000..093638883 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/collapse_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CollapsePropertyCollectionResponseable +type CollapsePropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CollapsePropertyable) + SetValue(value []CollapsePropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/collapse_propertyable.go b/src/internal/connector/graph/betasdk/models/collapse_propertyable.go new file mode 100644 index 000000000..aec91de4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/collapse_propertyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CollapsePropertyable +type CollapsePropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFields()([]string) + GetLimit()(*int32) + GetOdataType()(*string) + SetFields(value []string)() + SetLimit(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/column_definition.go b/src/internal/connector/graph/betasdk/models/column_definition.go new file mode 100644 index 000000000..326be4926 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_definition.go @@ -0,0 +1,867 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ColumnDefinition struct { + Entity + // This column stores boolean values. + boolean BooleanColumnable + // This column's data is calculated based on other columns. + calculated CalculatedColumnable + // This column stores data from a list of choices. + choice ChoiceColumnable + // For site columns, the name of the group this column belongs to. Helps organize related columns. + columnGroup *string + // This column stores content approval status. + contentApprovalStatus ContentApprovalStatusColumnable + // This column stores currency values. + currency CurrencyColumnable + // This column stores DateTime values. + dateTime DateTimeColumnable + // The default value for this column. + defaultValue DefaultColumnValueable + // The user-facing description of the column. + description *string + // The user-facing name of the column. + displayName *string + // If true, no two list items may have the same value for this column. + enforceUniqueValues *bool + // This column stores a geolocation. + geolocation GeolocationColumnable + // Specifies whether the column is displayed in the user interface. + hidden *bool + // This column stores hyperlink or picture values. + hyperlinkOrPicture HyperlinkOrPictureColumnable + // Specifies whether the column values can used for sorting and searching. + indexed *bool + // Indicates whether this column can be deleted. + isDeletable *bool + // Indicates whether values in the column can be reordered. Read-only. + isReorderable *bool + // Specifies whether the column can be changed. + isSealed *bool + // This column's data is looked up from another source in the site. + lookup LookupColumnable + // The API-facing name of the column as it appears in the [fields][] on a [listItem][]. For the user-facing name, see displayName. + name *string + // This column stores number values. + number NumberColumnable + // This column stores Person or Group values. + personOrGroup PersonOrGroupColumnable + // If true, changes to this column will be propagated to lists that implement the column. + propagateChanges *bool + // Specifies whether the column values can be modified. + readOnly *bool + // Specifies whether the column value isn't optional. + required *bool + // The source column for content type column. + sourceColumn ColumnDefinitionable + // ContentType from which this column is inherited from. Used only to fetch contentTypes columns. + sourceContentType ContentTypeInfoable + // This column stores taxonomy terms. + term TermColumnable + // This column stores text values. + text TextColumnable + // This column stores thumbnail values. + thumbnail ThumbnailColumnable + // For site columns, the type of column. Read-only. + type_escaped *ColumnTypes + // This column stores validation formula and message for the column. + validation ColumnValidationable +} +// NewColumnDefinition instantiates a new columnDefinition and sets the default values. +func NewColumnDefinition()(*ColumnDefinition) { + m := &ColumnDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateColumnDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateColumnDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnDefinition(), nil +} +// GetBoolean gets the boolean property value. This column stores boolean values. +func (m *ColumnDefinition) GetBoolean()(BooleanColumnable) { + return m.boolean +} +// GetCalculated gets the calculated property value. This column's data is calculated based on other columns. +func (m *ColumnDefinition) GetCalculated()(CalculatedColumnable) { + return m.calculated +} +// GetChoice gets the choice property value. This column stores data from a list of choices. +func (m *ColumnDefinition) GetChoice()(ChoiceColumnable) { + return m.choice +} +// GetColumnGroup gets the columnGroup property value. For site columns, the name of the group this column belongs to. Helps organize related columns. +func (m *ColumnDefinition) GetColumnGroup()(*string) { + return m.columnGroup +} +// GetContentApprovalStatus gets the contentApprovalStatus property value. This column stores content approval status. +func (m *ColumnDefinition) GetContentApprovalStatus()(ContentApprovalStatusColumnable) { + return m.contentApprovalStatus +} +// GetCurrency gets the currency property value. This column stores currency values. +func (m *ColumnDefinition) GetCurrency()(CurrencyColumnable) { + return m.currency +} +// GetDateTime gets the dateTime property value. This column stores DateTime values. +func (m *ColumnDefinition) GetDateTime()(DateTimeColumnable) { + return m.dateTime +} +// GetDefaultValue gets the defaultValue property value. The default value for this column. +func (m *ColumnDefinition) GetDefaultValue()(DefaultColumnValueable) { + return m.defaultValue +} +// GetDescription gets the description property value. The user-facing description of the column. +func (m *ColumnDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The user-facing name of the column. +func (m *ColumnDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetEnforceUniqueValues gets the enforceUniqueValues property value. If true, no two list items may have the same value for this column. +func (m *ColumnDefinition) GetEnforceUniqueValues()(*bool) { + return m.enforceUniqueValues +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ColumnDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["boolean"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBooleanColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBoolean(val.(BooleanColumnable)) + } + return nil + } + res["calculated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCalculatedColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCalculated(val.(CalculatedColumnable)) + } + return nil + } + res["choice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChoiceColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChoice(val.(ChoiceColumnable)) + } + return nil + } + res["columnGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnGroup(val) + } + return nil + } + res["contentApprovalStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentApprovalStatusColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContentApprovalStatus(val.(ContentApprovalStatusColumnable)) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(CurrencyColumnable)) + } + return nil + } + res["dateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDateTime(val.(DateTimeColumnable)) + } + return nil + } + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDefaultColumnValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(DefaultColumnValueable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enforceUniqueValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceUniqueValues(val) + } + return nil + } + res["geolocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGeolocationColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGeolocation(val.(GeolocationColumnable)) + } + return nil + } + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(val) + } + return nil + } + res["hyperlinkOrPicture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHyperlinkOrPictureColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHyperlinkOrPicture(val.(HyperlinkOrPictureColumnable)) + } + return nil + } + res["indexed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIndexed(val) + } + return nil + } + res["isDeletable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeletable(val) + } + return nil + } + res["isReorderable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReorderable(val) + } + return nil + } + res["isSealed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSealed(val) + } + return nil + } + res["lookup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLookupColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLookup(val.(LookupColumnable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNumberColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNumber(val.(NumberColumnable)) + } + return nil + } + res["personOrGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePersonOrGroupColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPersonOrGroup(val.(PersonOrGroupColumnable)) + } + return nil + } + res["propagateChanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPropagateChanges(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["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["sourceColumn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceColumn(val.(ColumnDefinitionable)) + } + return nil + } + res["sourceContentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentTypeInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceContentType(val.(ContentTypeInfoable)) + } + return nil + } + res["term"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTermColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTerm(val.(TermColumnable)) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTextColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetText(val.(TextColumnable)) + } + return nil + } + res["thumbnail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateThumbnailColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThumbnail(val.(ThumbnailColumnable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseColumnTypes) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*ColumnTypes)) + } + return nil + } + res["validation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateColumnValidationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValidation(val.(ColumnValidationable)) + } + return nil + } + return res +} +// GetGeolocation gets the geolocation property value. This column stores a geolocation. +func (m *ColumnDefinition) GetGeolocation()(GeolocationColumnable) { + return m.geolocation +} +// GetHidden gets the hidden property value. Specifies whether the column is displayed in the user interface. +func (m *ColumnDefinition) GetHidden()(*bool) { + return m.hidden +} +// GetHyperlinkOrPicture gets the hyperlinkOrPicture property value. This column stores hyperlink or picture values. +func (m *ColumnDefinition) GetHyperlinkOrPicture()(HyperlinkOrPictureColumnable) { + return m.hyperlinkOrPicture +} +// GetIndexed gets the indexed property value. Specifies whether the column values can used for sorting and searching. +func (m *ColumnDefinition) GetIndexed()(*bool) { + return m.indexed +} +// GetIsDeletable gets the isDeletable property value. Indicates whether this column can be deleted. +func (m *ColumnDefinition) GetIsDeletable()(*bool) { + return m.isDeletable +} +// GetIsReorderable gets the isReorderable property value. Indicates whether values in the column can be reordered. Read-only. +func (m *ColumnDefinition) GetIsReorderable()(*bool) { + return m.isReorderable +} +// GetIsSealed gets the isSealed property value. Specifies whether the column can be changed. +func (m *ColumnDefinition) GetIsSealed()(*bool) { + return m.isSealed +} +// GetLookup gets the lookup property value. This column's data is looked up from another source in the site. +func (m *ColumnDefinition) GetLookup()(LookupColumnable) { + return m.lookup +} +// GetName gets the name property value. The API-facing name of the column as it appears in the [fields][] on a [listItem][]. For the user-facing name, see displayName. +func (m *ColumnDefinition) GetName()(*string) { + return m.name +} +// GetNumber gets the number property value. This column stores number values. +func (m *ColumnDefinition) GetNumber()(NumberColumnable) { + return m.number +} +// GetPersonOrGroup gets the personOrGroup property value. This column stores Person or Group values. +func (m *ColumnDefinition) GetPersonOrGroup()(PersonOrGroupColumnable) { + return m.personOrGroup +} +// GetPropagateChanges gets the propagateChanges property value. If true, changes to this column will be propagated to lists that implement the column. +func (m *ColumnDefinition) GetPropagateChanges()(*bool) { + return m.propagateChanges +} +// GetReadOnly gets the readOnly property value. Specifies whether the column values can be modified. +func (m *ColumnDefinition) GetReadOnly()(*bool) { + return m.readOnly +} +// GetRequired gets the required property value. Specifies whether the column value isn't optional. +func (m *ColumnDefinition) GetRequired()(*bool) { + return m.required +} +// GetSourceColumn gets the sourceColumn property value. The source column for content type column. +func (m *ColumnDefinition) GetSourceColumn()(ColumnDefinitionable) { + return m.sourceColumn +} +// GetSourceContentType gets the sourceContentType property value. ContentType from which this column is inherited from. Used only to fetch contentTypes columns. +func (m *ColumnDefinition) GetSourceContentType()(ContentTypeInfoable) { + return m.sourceContentType +} +// GetTerm gets the term property value. This column stores taxonomy terms. +func (m *ColumnDefinition) GetTerm()(TermColumnable) { + return m.term +} +// GetText gets the text property value. This column stores text values. +func (m *ColumnDefinition) GetText()(TextColumnable) { + return m.text +} +// GetThumbnail gets the thumbnail property value. This column stores thumbnail values. +func (m *ColumnDefinition) GetThumbnail()(ThumbnailColumnable) { + return m.thumbnail +} +// GetType gets the type property value. For site columns, the type of column. Read-only. +func (m *ColumnDefinition) GetType()(*ColumnTypes) { + return m.type_escaped +} +// GetValidation gets the validation property value. This column stores validation formula and message for the column. +func (m *ColumnDefinition) GetValidation()(ColumnValidationable) { + return m.validation +} +// Serialize serializes information the current object +func (m *ColumnDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("boolean", m.GetBoolean()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("calculated", m.GetCalculated()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("choice", m.GetChoice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("columnGroup", m.GetColumnGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contentApprovalStatus", m.GetContentApprovalStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("dateTime", m.GetDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enforceUniqueValues", m.GetEnforceUniqueValues()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("geolocation", m.GetGeolocation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("hyperlinkOrPicture", m.GetHyperlinkOrPicture()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("indexed", m.GetIndexed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeletable", m.GetIsDeletable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReorderable", m.GetIsReorderable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSealed", m.GetIsSealed()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lookup", m.GetLookup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("personOrGroup", m.GetPersonOrGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("propagateChanges", m.GetPropagateChanges()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("readOnly", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceColumn", m.GetSourceColumn()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceContentType", m.GetSourceContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("term", m.GetTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("thumbnail", m.GetThumbnail()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("validation", m.GetValidation()) + if err != nil { + return err + } + } + return nil +} +// SetBoolean sets the boolean property value. This column stores boolean values. +func (m *ColumnDefinition) SetBoolean(value BooleanColumnable)() { + m.boolean = value +} +// SetCalculated sets the calculated property value. This column's data is calculated based on other columns. +func (m *ColumnDefinition) SetCalculated(value CalculatedColumnable)() { + m.calculated = value +} +// SetChoice sets the choice property value. This column stores data from a list of choices. +func (m *ColumnDefinition) SetChoice(value ChoiceColumnable)() { + m.choice = value +} +// SetColumnGroup sets the columnGroup property value. For site columns, the name of the group this column belongs to. Helps organize related columns. +func (m *ColumnDefinition) SetColumnGroup(value *string)() { + m.columnGroup = value +} +// SetContentApprovalStatus sets the contentApprovalStatus property value. This column stores content approval status. +func (m *ColumnDefinition) SetContentApprovalStatus(value ContentApprovalStatusColumnable)() { + m.contentApprovalStatus = value +} +// SetCurrency sets the currency property value. This column stores currency values. +func (m *ColumnDefinition) SetCurrency(value CurrencyColumnable)() { + m.currency = value +} +// SetDateTime sets the dateTime property value. This column stores DateTime values. +func (m *ColumnDefinition) SetDateTime(value DateTimeColumnable)() { + m.dateTime = value +} +// SetDefaultValue sets the defaultValue property value. The default value for this column. +func (m *ColumnDefinition) SetDefaultValue(value DefaultColumnValueable)() { + m.defaultValue = value +} +// SetDescription sets the description property value. The user-facing description of the column. +func (m *ColumnDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The user-facing name of the column. +func (m *ColumnDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnforceUniqueValues sets the enforceUniqueValues property value. If true, no two list items may have the same value for this column. +func (m *ColumnDefinition) SetEnforceUniqueValues(value *bool)() { + m.enforceUniqueValues = value +} +// SetGeolocation sets the geolocation property value. This column stores a geolocation. +func (m *ColumnDefinition) SetGeolocation(value GeolocationColumnable)() { + m.geolocation = value +} +// SetHidden sets the hidden property value. Specifies whether the column is displayed in the user interface. +func (m *ColumnDefinition) SetHidden(value *bool)() { + m.hidden = value +} +// SetHyperlinkOrPicture sets the hyperlinkOrPicture property value. This column stores hyperlink or picture values. +func (m *ColumnDefinition) SetHyperlinkOrPicture(value HyperlinkOrPictureColumnable)() { + m.hyperlinkOrPicture = value +} +// SetIndexed sets the indexed property value. Specifies whether the column values can used for sorting and searching. +func (m *ColumnDefinition) SetIndexed(value *bool)() { + m.indexed = value +} +// SetIsDeletable sets the isDeletable property value. Indicates whether this column can be deleted. +func (m *ColumnDefinition) SetIsDeletable(value *bool)() { + m.isDeletable = value +} +// SetIsReorderable sets the isReorderable property value. Indicates whether values in the column can be reordered. Read-only. +func (m *ColumnDefinition) SetIsReorderable(value *bool)() { + m.isReorderable = value +} +// SetIsSealed sets the isSealed property value. Specifies whether the column can be changed. +func (m *ColumnDefinition) SetIsSealed(value *bool)() { + m.isSealed = value +} +// SetLookup sets the lookup property value. This column's data is looked up from another source in the site. +func (m *ColumnDefinition) SetLookup(value LookupColumnable)() { + m.lookup = value +} +// SetName sets the name property value. The API-facing name of the column as it appears in the [fields][] on a [listItem][]. For the user-facing name, see displayName. +func (m *ColumnDefinition) SetName(value *string)() { + m.name = value +} +// SetNumber sets the number property value. This column stores number values. +func (m *ColumnDefinition) SetNumber(value NumberColumnable)() { + m.number = value +} +// SetPersonOrGroup sets the personOrGroup property value. This column stores Person or Group values. +func (m *ColumnDefinition) SetPersonOrGroup(value PersonOrGroupColumnable)() { + m.personOrGroup = value +} +// SetPropagateChanges sets the propagateChanges property value. If true, changes to this column will be propagated to lists that implement the column. +func (m *ColumnDefinition) SetPropagateChanges(value *bool)() { + m.propagateChanges = value +} +// SetReadOnly sets the readOnly property value. Specifies whether the column values can be modified. +func (m *ColumnDefinition) SetReadOnly(value *bool)() { + m.readOnly = value +} +// SetRequired sets the required property value. Specifies whether the column value isn't optional. +func (m *ColumnDefinition) SetRequired(value *bool)() { + m.required = value +} +// SetSourceColumn sets the sourceColumn property value. The source column for content type column. +func (m *ColumnDefinition) SetSourceColumn(value ColumnDefinitionable)() { + m.sourceColumn = value +} +// SetSourceContentType sets the sourceContentType property value. ContentType from which this column is inherited from. Used only to fetch contentTypes columns. +func (m *ColumnDefinition) SetSourceContentType(value ContentTypeInfoable)() { + m.sourceContentType = value +} +// SetTerm sets the term property value. This column stores taxonomy terms. +func (m *ColumnDefinition) SetTerm(value TermColumnable)() { + m.term = value +} +// SetText sets the text property value. This column stores text values. +func (m *ColumnDefinition) SetText(value TextColumnable)() { + m.text = value +} +// SetThumbnail sets the thumbnail property value. This column stores thumbnail values. +func (m *ColumnDefinition) SetThumbnail(value ThumbnailColumnable)() { + m.thumbnail = value +} +// SetType sets the type property value. For site columns, the type of column. Read-only. +func (m *ColumnDefinition) SetType(value *ColumnTypes)() { + m.type_escaped = value +} +// SetValidation sets the validation property value. This column stores validation formula and message for the column. +func (m *ColumnDefinition) SetValidation(value ColumnValidationable)() { + m.validation = value +} diff --git a/src/internal/connector/graph/betasdk/models/column_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/column_definition_collection_response.go new file mode 100644 index 000000000..9c17e6221 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnDefinitionCollectionResponse +type ColumnDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ColumnDefinitionable +} +// NewColumnDefinitionCollectionResponse instantiates a new ColumnDefinitionCollectionResponse and sets the default values. +func NewColumnDefinitionCollectionResponse()(*ColumnDefinitionCollectionResponse) { + m := &ColumnDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateColumnDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateColumnDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ColumnDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ColumnDefinitionCollectionResponse) GetValue()([]ColumnDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ColumnDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ColumnDefinitionCollectionResponse) SetValue(value []ColumnDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/column_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/column_definition_collection_responseable.go new file mode 100644 index 000000000..5dd4d299e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnDefinitionCollectionResponseable +type ColumnDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ColumnDefinitionable) + SetValue(value []ColumnDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/column_definitionable.go b/src/internal/connector/graph/betasdk/models/column_definitionable.go new file mode 100644 index 000000000..1c6e5a0be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_definitionable.go @@ -0,0 +1,75 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnDefinitionable +type ColumnDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBoolean()(BooleanColumnable) + GetCalculated()(CalculatedColumnable) + GetChoice()(ChoiceColumnable) + GetColumnGroup()(*string) + GetContentApprovalStatus()(ContentApprovalStatusColumnable) + GetCurrency()(CurrencyColumnable) + GetDateTime()(DateTimeColumnable) + GetDefaultValue()(DefaultColumnValueable) + GetDescription()(*string) + GetDisplayName()(*string) + GetEnforceUniqueValues()(*bool) + GetGeolocation()(GeolocationColumnable) + GetHidden()(*bool) + GetHyperlinkOrPicture()(HyperlinkOrPictureColumnable) + GetIndexed()(*bool) + GetIsDeletable()(*bool) + GetIsReorderable()(*bool) + GetIsSealed()(*bool) + GetLookup()(LookupColumnable) + GetName()(*string) + GetNumber()(NumberColumnable) + GetPersonOrGroup()(PersonOrGroupColumnable) + GetPropagateChanges()(*bool) + GetReadOnly()(*bool) + GetRequired()(*bool) + GetSourceColumn()(ColumnDefinitionable) + GetSourceContentType()(ContentTypeInfoable) + GetTerm()(TermColumnable) + GetText()(TextColumnable) + GetThumbnail()(ThumbnailColumnable) + GetType()(*ColumnTypes) + GetValidation()(ColumnValidationable) + SetBoolean(value BooleanColumnable)() + SetCalculated(value CalculatedColumnable)() + SetChoice(value ChoiceColumnable)() + SetColumnGroup(value *string)() + SetContentApprovalStatus(value ContentApprovalStatusColumnable)() + SetCurrency(value CurrencyColumnable)() + SetDateTime(value DateTimeColumnable)() + SetDefaultValue(value DefaultColumnValueable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEnforceUniqueValues(value *bool)() + SetGeolocation(value GeolocationColumnable)() + SetHidden(value *bool)() + SetHyperlinkOrPicture(value HyperlinkOrPictureColumnable)() + SetIndexed(value *bool)() + SetIsDeletable(value *bool)() + SetIsReorderable(value *bool)() + SetIsSealed(value *bool)() + SetLookup(value LookupColumnable)() + SetName(value *string)() + SetNumber(value NumberColumnable)() + SetPersonOrGroup(value PersonOrGroupColumnable)() + SetPropagateChanges(value *bool)() + SetReadOnly(value *bool)() + SetRequired(value *bool)() + SetSourceColumn(value ColumnDefinitionable)() + SetSourceContentType(value ContentTypeInfoable)() + SetTerm(value TermColumnable)() + SetText(value TextColumnable)() + SetThumbnail(value ThumbnailColumnable)() + SetType(value *ColumnTypes)() + SetValidation(value ColumnValidationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/column_link.go b/src/internal/connector/graph/betasdk/models/column_link.go new file mode 100644 index 000000000..cf0b16c1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_link.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnLink provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ColumnLink struct { + Entity + // The name of the column in this content type. + name *string +} +// NewColumnLink instantiates a new columnLink and sets the default values. +func NewColumnLink()(*ColumnLink) { + m := &ColumnLink{ + Entity: *NewEntity(), + } + return m +} +// CreateColumnLinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateColumnLinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnLink(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ColumnLink) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the column in this content type. +func (m *ColumnLink) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *ColumnLink) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. The name of the column in this content type. +func (m *ColumnLink) SetName(value *string)() { + m.name = value +} diff --git a/src/internal/connector/graph/betasdk/models/column_link_collection_response.go b/src/internal/connector/graph/betasdk/models/column_link_collection_response.go new file mode 100644 index 000000000..be29700e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_link_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnLinkCollectionResponse +type ColumnLinkCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ColumnLinkable +} +// NewColumnLinkCollectionResponse instantiates a new ColumnLinkCollectionResponse and sets the default values. +func NewColumnLinkCollectionResponse()(*ColumnLinkCollectionResponse) { + m := &ColumnLinkCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateColumnLinkCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateColumnLinkCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnLinkCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ColumnLinkCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnLinkable, len(val)) + for i, v := range val { + res[i] = v.(ColumnLinkable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ColumnLinkCollectionResponse) GetValue()([]ColumnLinkable) { + return m.value +} +// Serialize serializes information the current object +func (m *ColumnLinkCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ColumnLinkCollectionResponse) SetValue(value []ColumnLinkable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/column_link_collection_responseable.go b/src/internal/connector/graph/betasdk/models/column_link_collection_responseable.go new file mode 100644 index 000000000..2e21ea75d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_link_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnLinkCollectionResponseable +type ColumnLinkCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ColumnLinkable) + SetValue(value []ColumnLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/column_linkable.go b/src/internal/connector/graph/betasdk/models/column_linkable.go new file mode 100644 index 000000000..ecb1c8e2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_linkable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnLinkable +type ColumnLinkable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/column_types.go b/src/internal/connector/graph/betasdk/models/column_types.go new file mode 100644 index 000000000..090ae1338 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_types.go @@ -0,0 +1,85 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ColumnTypes int + +const ( + NOTE_COLUMNTYPES ColumnTypes = iota + TEXT_COLUMNTYPES + CHOICE_COLUMNTYPES + MULTICHOICE_COLUMNTYPES + NUMBER_COLUMNTYPES + CURRENCY_COLUMNTYPES + DATETIME_COLUMNTYPES + LOOKUP_COLUMNTYPES + BOOLEAN_COLUMNTYPES + USER_COLUMNTYPES + URL_COLUMNTYPES + CALCULATED_COLUMNTYPES + LOCATION_COLUMNTYPES + GEOLOCATION_COLUMNTYPES + TERM_COLUMNTYPES + MULTITERM_COLUMNTYPES + THUMBNAIL_COLUMNTYPES + APPROVALSTATUS_COLUMNTYPES + UNKNOWNFUTUREVALUE_COLUMNTYPES +) + +func (i ColumnTypes) String() string { + return []string{"note", "text", "choice", "multichoice", "number", "currency", "dateTime", "lookup", "boolean", "user", "url", "calculated", "location", "geolocation", "term", "multiterm", "thumbnail", "approvalStatus", "unknownFutureValue"}[i] +} +func ParseColumnTypes(v string) (interface{}, error) { + result := NOTE_COLUMNTYPES + switch v { + case "note": + result = NOTE_COLUMNTYPES + case "text": + result = TEXT_COLUMNTYPES + case "choice": + result = CHOICE_COLUMNTYPES + case "multichoice": + result = MULTICHOICE_COLUMNTYPES + case "number": + result = NUMBER_COLUMNTYPES + case "currency": + result = CURRENCY_COLUMNTYPES + case "dateTime": + result = DATETIME_COLUMNTYPES + case "lookup": + result = LOOKUP_COLUMNTYPES + case "boolean": + result = BOOLEAN_COLUMNTYPES + case "user": + result = USER_COLUMNTYPES + case "url": + result = URL_COLUMNTYPES + case "calculated": + result = CALCULATED_COLUMNTYPES + case "location": + result = LOCATION_COLUMNTYPES + case "geolocation": + result = GEOLOCATION_COLUMNTYPES + case "term": + result = TERM_COLUMNTYPES + case "multiterm": + result = MULTITERM_COLUMNTYPES + case "thumbnail": + result = THUMBNAIL_COLUMNTYPES + case "approvalStatus": + result = APPROVALSTATUS_COLUMNTYPES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_COLUMNTYPES + default: + return 0, errors.New("Unknown ColumnTypes value: " + v) + } + return &result, nil +} +func SerializeColumnTypes(values []ColumnTypes) []string { + 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/column_validation.go b/src/internal/connector/graph/betasdk/models/column_validation.go new file mode 100644 index 000000000..f62f4f01d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_validation.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnValidation +type ColumnValidation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Default BCP 47 language tag for the description. + defaultLanguage *string + // Localized messages that explain what is needed for this column's value to be considered valid. User will be prompted with this message if validation fails. + descriptions []DisplayNameLocalizationable + // The formula to validate column value. For examples, see Examples of common formulas in lists + formula *string + // The OdataType property + odataType *string +} +// NewColumnValidation instantiates a new columnValidation and sets the default values. +func NewColumnValidation()(*ColumnValidation) { + m := &ColumnValidation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateColumnValidationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateColumnValidationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewColumnValidation(), 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 *ColumnValidation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultLanguage gets the defaultLanguage property value. Default BCP 47 language tag for the description. +func (m *ColumnValidation) GetDefaultLanguage()(*string) { + return m.defaultLanguage +} +// GetDescriptions gets the descriptions property value. Localized messages that explain what is needed for this column's value to be considered valid. User will be prompted with this message if validation fails. +func (m *ColumnValidation) GetDescriptions()([]DisplayNameLocalizationable) { + return m.descriptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ColumnValidation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLanguage(val) + } + return nil + } + res["descriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayNameLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayNameLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(DisplayNameLocalizationable) + } + m.SetDescriptions(res) + } + return nil + } + res["formula"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormula(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 + } + return res +} +// GetFormula gets the formula property value. The formula to validate column value. For examples, see Examples of common formulas in lists +func (m *ColumnValidation) GetFormula()(*string) { + return m.formula +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ColumnValidation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ColumnValidation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultLanguage", m.GetDefaultLanguage()) + if err != nil { + return err + } + } + if m.GetDescriptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDescriptions())) + for i, v := range m.GetDescriptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("descriptions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("formula", m.GetFormula()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ColumnValidation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultLanguage sets the defaultLanguage property value. Default BCP 47 language tag for the description. +func (m *ColumnValidation) SetDefaultLanguage(value *string)() { + m.defaultLanguage = value +} +// SetDescriptions sets the descriptions property value. Localized messages that explain what is needed for this column's value to be considered valid. User will be prompted with this message if validation fails. +func (m *ColumnValidation) SetDescriptions(value []DisplayNameLocalizationable)() { + m.descriptions = value +} +// SetFormula sets the formula property value. The formula to validate column value. For examples, see Examples of common formulas in lists +func (m *ColumnValidation) SetFormula(value *string)() { + m.formula = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ColumnValidation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/column_validationable.go b/src/internal/connector/graph/betasdk/models/column_validationable.go new file mode 100644 index 000000000..d23a342fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/column_validationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ColumnValidationable +type ColumnValidationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultLanguage()(*string) + GetDescriptions()([]DisplayNameLocalizationable) + GetFormula()(*string) + GetOdataType()(*string) + SetDefaultLanguage(value *string)() + SetDescriptions(value []DisplayNameLocalizationable)() + SetFormula(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/comanagement_eligible_device.go b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device.go new file mode 100644 index 000000000..6b915b77a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device.go @@ -0,0 +1,534 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComanagementEligibleDevice device Co-Management eligibility state +type ComanagementEligibleDevice struct { + Entity + // Device registration status. + clientRegistrationStatus *DeviceRegistrationState + // DeviceName + deviceName *string + // Device type. + deviceType *DeviceType + // EntitySource + entitySource *int32 + // Management agent type. + managementAgents *ManagementAgentType + // Management state of device in Microsoft Intune. + managementState *ManagementState + // Manufacturer + manufacturer *string + // MDMStatus + mdmStatus *string + // Model + model *string + // OSDescription + osDescription *string + // OSVersion + osVersion *string + // Owner type of device. + ownerType *OwnerType + // ReferenceId + referenceId *string + // SerialNumber + serialNumber *string + // The status property + status *ComanagementEligibleType + // UPN + upn *string + // UserEmail + userEmail *string + // UserId + userId *string + // UserName + userName *string +} +// NewComanagementEligibleDevice instantiates a new comanagementEligibleDevice and sets the default values. +func NewComanagementEligibleDevice()(*ComanagementEligibleDevice) { + m := &ComanagementEligibleDevice{ + Entity: *NewEntity(), + } + return m +} +// CreateComanagementEligibleDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComanagementEligibleDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComanagementEligibleDevice(), nil +} +// GetClientRegistrationStatus gets the clientRegistrationStatus property value. Device registration status. +func (m *ComanagementEligibleDevice) GetClientRegistrationStatus()(*DeviceRegistrationState) { + return m.clientRegistrationStatus +} +// GetDeviceName gets the deviceName property value. DeviceName +func (m *ComanagementEligibleDevice) GetDeviceName()(*string) { + return m.deviceName +} +// GetDeviceType gets the deviceType property value. Device type. +func (m *ComanagementEligibleDevice) GetDeviceType()(*DeviceType) { + return m.deviceType +} +// GetEntitySource gets the entitySource property value. EntitySource +func (m *ComanagementEligibleDevice) GetEntitySource()(*int32) { + return m.entitySource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComanagementEligibleDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["clientRegistrationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceRegistrationState) + if err != nil { + return err + } + if val != nil { + m.SetClientRegistrationStatus(val.(*DeviceRegistrationState)) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["deviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceType(val.(*DeviceType)) + } + return nil + } + res["entitySource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEntitySource(val) + } + return nil + } + res["managementAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementAgentType) + if err != nil { + return err + } + if val != nil { + m.SetManagementAgents(val.(*ManagementAgentType)) + } + return nil + } + res["managementState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementState) + if err != nil { + return err + } + if val != nil { + m.SetManagementState(val.(*ManagementState)) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["mdmStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdmStatus(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + res["osDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsDescription(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOwnerType) + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val.(*OwnerType)) + } + return nil + } + res["referenceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceId(val) + } + return nil + } + res["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComanagementEligibleType) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComanagementEligibleType)) + } + return nil + } + res["upn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpn(val) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetManagementAgents gets the managementAgents property value. Management agent type. +func (m *ComanagementEligibleDevice) GetManagementAgents()(*ManagementAgentType) { + return m.managementAgents +} +// GetManagementState gets the managementState property value. Management state of device in Microsoft Intune. +func (m *ComanagementEligibleDevice) GetManagementState()(*ManagementState) { + return m.managementState +} +// GetManufacturer gets the manufacturer property value. Manufacturer +func (m *ComanagementEligibleDevice) GetManufacturer()(*string) { + return m.manufacturer +} +// GetMdmStatus gets the mdmStatus property value. MDMStatus +func (m *ComanagementEligibleDevice) GetMdmStatus()(*string) { + return m.mdmStatus +} +// GetModel gets the model property value. Model +func (m *ComanagementEligibleDevice) GetModel()(*string) { + return m.model +} +// GetOsDescription gets the osDescription property value. OSDescription +func (m *ComanagementEligibleDevice) GetOsDescription()(*string) { + return m.osDescription +} +// GetOsVersion gets the osVersion property value. OSVersion +func (m *ComanagementEligibleDevice) GetOsVersion()(*string) { + return m.osVersion +} +// GetOwnerType gets the ownerType property value. Owner type of device. +func (m *ComanagementEligibleDevice) GetOwnerType()(*OwnerType) { + return m.ownerType +} +// GetReferenceId gets the referenceId property value. ReferenceId +func (m *ComanagementEligibleDevice) GetReferenceId()(*string) { + return m.referenceId +} +// GetSerialNumber gets the serialNumber property value. SerialNumber +func (m *ComanagementEligibleDevice) GetSerialNumber()(*string) { + return m.serialNumber +} +// GetStatus gets the status property value. The status property +func (m *ComanagementEligibleDevice) GetStatus()(*ComanagementEligibleType) { + return m.status +} +// GetUpn gets the upn property value. UPN +func (m *ComanagementEligibleDevice) GetUpn()(*string) { + return m.upn +} +// GetUserEmail gets the userEmail property value. UserEmail +func (m *ComanagementEligibleDevice) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. UserId +func (m *ComanagementEligibleDevice) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. UserName +func (m *ComanagementEligibleDevice) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *ComanagementEligibleDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClientRegistrationStatus() != nil { + cast := (*m.GetClientRegistrationStatus()).String() + err = writer.WriteStringValue("clientRegistrationStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + if m.GetDeviceType() != nil { + cast := (*m.GetDeviceType()).String() + err = writer.WriteStringValue("deviceType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("entitySource", m.GetEntitySource()) + if err != nil { + return err + } + } + if m.GetManagementAgents() != nil { + cast := (*m.GetManagementAgents()).String() + err = writer.WriteStringValue("managementAgents", &cast) + if err != nil { + return err + } + } + if m.GetManagementState() != nil { + cast := (*m.GetManagementState()).String() + err = writer.WriteStringValue("managementState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdmStatus", m.GetMdmStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osDescription", m.GetOsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + if m.GetOwnerType() != nil { + cast := (*m.GetOwnerType()).String() + err = writer.WriteStringValue("ownerType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("referenceId", m.GetReferenceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serialNumber", m.GetSerialNumber()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("upn", m.GetUpn()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetClientRegistrationStatus sets the clientRegistrationStatus property value. Device registration status. +func (m *ComanagementEligibleDevice) SetClientRegistrationStatus(value *DeviceRegistrationState)() { + m.clientRegistrationStatus = value +} +// SetDeviceName sets the deviceName property value. DeviceName +func (m *ComanagementEligibleDevice) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDeviceType sets the deviceType property value. Device type. +func (m *ComanagementEligibleDevice) SetDeviceType(value *DeviceType)() { + m.deviceType = value +} +// SetEntitySource sets the entitySource property value. EntitySource +func (m *ComanagementEligibleDevice) SetEntitySource(value *int32)() { + m.entitySource = value +} +// SetManagementAgents sets the managementAgents property value. Management agent type. +func (m *ComanagementEligibleDevice) SetManagementAgents(value *ManagementAgentType)() { + m.managementAgents = value +} +// SetManagementState sets the managementState property value. Management state of device in Microsoft Intune. +func (m *ComanagementEligibleDevice) SetManagementState(value *ManagementState)() { + m.managementState = value +} +// SetManufacturer sets the manufacturer property value. Manufacturer +func (m *ComanagementEligibleDevice) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetMdmStatus sets the mdmStatus property value. MDMStatus +func (m *ComanagementEligibleDevice) SetMdmStatus(value *string)() { + m.mdmStatus = value +} +// SetModel sets the model property value. Model +func (m *ComanagementEligibleDevice) SetModel(value *string)() { + m.model = value +} +// SetOsDescription sets the osDescription property value. OSDescription +func (m *ComanagementEligibleDevice) SetOsDescription(value *string)() { + m.osDescription = value +} +// SetOsVersion sets the osVersion property value. OSVersion +func (m *ComanagementEligibleDevice) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetOwnerType sets the ownerType property value. Owner type of device. +func (m *ComanagementEligibleDevice) SetOwnerType(value *OwnerType)() { + m.ownerType = value +} +// SetReferenceId sets the referenceId property value. ReferenceId +func (m *ComanagementEligibleDevice) SetReferenceId(value *string)() { + m.referenceId = value +} +// SetSerialNumber sets the serialNumber property value. SerialNumber +func (m *ComanagementEligibleDevice) SetSerialNumber(value *string)() { + m.serialNumber = value +} +// SetStatus sets the status property value. The status property +func (m *ComanagementEligibleDevice) SetStatus(value *ComanagementEligibleType)() { + m.status = value +} +// SetUpn sets the upn property value. UPN +func (m *ComanagementEligibleDevice) SetUpn(value *string)() { + m.upn = value +} +// SetUserEmail sets the userEmail property value. UserEmail +func (m *ComanagementEligibleDevice) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. UserId +func (m *ComanagementEligibleDevice) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. UserName +func (m *ComanagementEligibleDevice) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_response.go b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_response.go new file mode 100644 index 000000000..4b1691808 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComanagementEligibleDeviceCollectionResponse +type ComanagementEligibleDeviceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ComanagementEligibleDeviceable +} +// NewComanagementEligibleDeviceCollectionResponse instantiates a new ComanagementEligibleDeviceCollectionResponse and sets the default values. +func NewComanagementEligibleDeviceCollectionResponse()(*ComanagementEligibleDeviceCollectionResponse) { + m := &ComanagementEligibleDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateComanagementEligibleDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComanagementEligibleDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComanagementEligibleDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComanagementEligibleDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComanagementEligibleDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComanagementEligibleDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ComanagementEligibleDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ComanagementEligibleDeviceCollectionResponse) GetValue()([]ComanagementEligibleDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *ComanagementEligibleDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ComanagementEligibleDeviceCollectionResponse) SetValue(value []ComanagementEligibleDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_responseable.go new file mode 100644 index 000000000..4e130616b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comanagement_eligible_device_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComanagementEligibleDeviceCollectionResponseable +type ComanagementEligibleDeviceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ComanagementEligibleDeviceable) + SetValue(value []ComanagementEligibleDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/comanagement_eligible_deviceable.go b/src/internal/connector/graph/betasdk/models/comanagement_eligible_deviceable.go new file mode 100644 index 000000000..57f8cf56f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comanagement_eligible_deviceable.go @@ -0,0 +1,49 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComanagementEligibleDeviceable +type ComanagementEligibleDeviceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientRegistrationStatus()(*DeviceRegistrationState) + GetDeviceName()(*string) + GetDeviceType()(*DeviceType) + GetEntitySource()(*int32) + GetManagementAgents()(*ManagementAgentType) + GetManagementState()(*ManagementState) + GetManufacturer()(*string) + GetMdmStatus()(*string) + GetModel()(*string) + GetOsDescription()(*string) + GetOsVersion()(*string) + GetOwnerType()(*OwnerType) + GetReferenceId()(*string) + GetSerialNumber()(*string) + GetStatus()(*ComanagementEligibleType) + GetUpn()(*string) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + SetClientRegistrationStatus(value *DeviceRegistrationState)() + SetDeviceName(value *string)() + SetDeviceType(value *DeviceType)() + SetEntitySource(value *int32)() + SetManagementAgents(value *ManagementAgentType)() + SetManagementState(value *ManagementState)() + SetManufacturer(value *string)() + SetMdmStatus(value *string)() + SetModel(value *string)() + SetOsDescription(value *string)() + SetOsVersion(value *string)() + SetOwnerType(value *OwnerType)() + SetReferenceId(value *string)() + SetSerialNumber(value *string)() + SetStatus(value *ComanagementEligibleType)() + SetUpn(value *string)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/comanagement_eligible_type.go b/src/internal/connector/graph/betasdk/models/comanagement_eligible_type.go new file mode 100644 index 000000000..8a1e7ba67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comanagement_eligible_type.go @@ -0,0 +1,51 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ComanagementEligibleType int + +const ( + COMANAGED_COMANAGEMENTELIGIBLETYPE ComanagementEligibleType = iota + ELIGIBLE_COMANAGEMENTELIGIBLETYPE + ELIGIBLEBUTNOTAZUREADJOINED_COMANAGEMENTELIGIBLETYPE + NEEDSOSUPDATE_COMANAGEMENTELIGIBLETYPE + INELIGIBLE_COMANAGEMENTELIGIBLETYPE + // Devices scheduled for Co-Management enrollment + SCHEDULEDFORENROLLMENT_COMANAGEMENTELIGIBLETYPE + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_COMANAGEMENTELIGIBLETYPE +) + +func (i ComanagementEligibleType) String() string { + return []string{"comanaged", "eligible", "eligibleButNotAzureAdJoined", "needsOsUpdate", "ineligible", "scheduledForEnrollment", "unknownFutureValue"}[i] +} +func ParseComanagementEligibleType(v string) (interface{}, error) { + result := COMANAGED_COMANAGEMENTELIGIBLETYPE + switch v { + case "comanaged": + result = COMANAGED_COMANAGEMENTELIGIBLETYPE + case "eligible": + result = ELIGIBLE_COMANAGEMENTELIGIBLETYPE + case "eligibleButNotAzureAdJoined": + result = ELIGIBLEBUTNOTAZUREADJOINED_COMANAGEMENTELIGIBLETYPE + case "needsOsUpdate": + result = NEEDSOSUPDATE_COMANAGEMENTELIGIBLETYPE + case "ineligible": + result = INELIGIBLE_COMANAGEMENTELIGIBLETYPE + case "scheduledForEnrollment": + result = SCHEDULEDFORENROLLMENT_COMANAGEMENTELIGIBLETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_COMANAGEMENTELIGIBLETYPE + default: + return 0, errors.New("Unknown ComanagementEligibleType value: " + v) + } + return &result, nil +} +func SerializeComanagementEligibleType(values []ComanagementEligibleType) []string { + 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/command.go b/src/internal/connector/graph/betasdk/models/command.go new file mode 100644 index 000000000..b82746c91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/command.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Command provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Command struct { + Entity + // The appServiceName property + appServiceName *string + // The error property + error *string + // The packageFamilyName property + packageFamilyName *string + // The payload property + payload PayloadRequestable + // The permissionTicket property + permissionTicket *string + // The postBackUri property + postBackUri *string + // The responsepayload property + responsepayload PayloadResponseable + // The status property + status *string + // The type property + type_escaped *string +} +// NewCommand instantiates a new command and sets the default values. +func NewCommand()(*Command) { + m := &Command{ + Entity: *NewEntity(), + } + return m +} +// CreateCommandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommand(), nil +} +// GetAppServiceName gets the appServiceName property value. The appServiceName property +func (m *Command) GetAppServiceName()(*string) { + return m.appServiceName +} +// GetError gets the error property value. The error property +func (m *Command) GetError()(*string) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Command) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appServiceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppServiceName(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetError(val) + } + return nil + } + res["packageFamilyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageFamilyName(val) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePayloadRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPayload(val.(PayloadRequestable)) + } + return nil + } + res["permissionTicket"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermissionTicket(val) + } + return nil + } + res["postBackUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostBackUri(val) + } + return nil + } + res["responsepayload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePayloadResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResponsepayload(val.(PayloadResponseable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetPackageFamilyName gets the packageFamilyName property value. The packageFamilyName property +func (m *Command) GetPackageFamilyName()(*string) { + return m.packageFamilyName +} +// GetPayload gets the payload property value. The payload property +func (m *Command) GetPayload()(PayloadRequestable) { + return m.payload +} +// GetPermissionTicket gets the permissionTicket property value. The permissionTicket property +func (m *Command) GetPermissionTicket()(*string) { + return m.permissionTicket +} +// GetPostBackUri gets the postBackUri property value. The postBackUri property +func (m *Command) GetPostBackUri()(*string) { + return m.postBackUri +} +// GetResponsepayload gets the responsepayload property value. The responsepayload property +func (m *Command) GetResponsepayload()(PayloadResponseable) { + return m.responsepayload +} +// GetStatus gets the status property value. The status property +func (m *Command) GetStatus()(*string) { + return m.status +} +// GetType gets the type property value. The type property +func (m *Command) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Command) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appServiceName", m.GetAppServiceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageFamilyName", m.GetPackageFamilyName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permissionTicket", m.GetPermissionTicket()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("postBackUri", m.GetPostBackUri()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("responsepayload", m.GetResponsepayload()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetAppServiceName sets the appServiceName property value. The appServiceName property +func (m *Command) SetAppServiceName(value *string)() { + m.appServiceName = value +} +// SetError sets the error property value. The error property +func (m *Command) SetError(value *string)() { + m.error = value +} +// SetPackageFamilyName sets the packageFamilyName property value. The packageFamilyName property +func (m *Command) SetPackageFamilyName(value *string)() { + m.packageFamilyName = value +} +// SetPayload sets the payload property value. The payload property +func (m *Command) SetPayload(value PayloadRequestable)() { + m.payload = value +} +// SetPermissionTicket sets the permissionTicket property value. The permissionTicket property +func (m *Command) SetPermissionTicket(value *string)() { + m.permissionTicket = value +} +// SetPostBackUri sets the postBackUri property value. The postBackUri property +func (m *Command) SetPostBackUri(value *string)() { + m.postBackUri = value +} +// SetResponsepayload sets the responsepayload property value. The responsepayload property +func (m *Command) SetResponsepayload(value PayloadResponseable)() { + m.responsepayload = value +} +// SetStatus sets the status property value. The status property +func (m *Command) SetStatus(value *string)() { + m.status = value +} +// SetType sets the type property value. The type property +func (m *Command) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/command_collection_response.go b/src/internal/connector/graph/betasdk/models/command_collection_response.go new file mode 100644 index 000000000..6bf3cb18f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/command_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommandCollectionResponse +type CommandCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Commandable +} +// NewCommandCollectionResponse instantiates a new CommandCollectionResponse and sets the default values. +func NewCommandCollectionResponse()(*CommandCollectionResponse) { + m := &CommandCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCommandCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommandCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommandCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommandCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commandable, len(val)) + for i, v := range val { + res[i] = v.(Commandable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CommandCollectionResponse) GetValue()([]Commandable) { + return m.value +} +// Serialize serializes information the current object +func (m *CommandCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CommandCollectionResponse) SetValue(value []Commandable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/command_collection_responseable.go b/src/internal/connector/graph/betasdk/models/command_collection_responseable.go new file mode 100644 index 000000000..c303dbcad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/command_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommandCollectionResponseable +type CommandCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Commandable) + SetValue(value []Commandable)() +} diff --git a/src/internal/connector/graph/betasdk/models/commandable.go b/src/internal/connector/graph/betasdk/models/commandable.go new file mode 100644 index 000000000..b92a9a02d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/commandable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Commandable +type Commandable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppServiceName()(*string) + GetError()(*string) + GetPackageFamilyName()(*string) + GetPayload()(PayloadRequestable) + GetPermissionTicket()(*string) + GetPostBackUri()(*string) + GetResponsepayload()(PayloadResponseable) + GetStatus()(*string) + GetType()(*string) + SetAppServiceName(value *string)() + SetError(value *string)() + SetPackageFamilyName(value *string)() + SetPayload(value PayloadRequestable)() + SetPermissionTicket(value *string)() + SetPostBackUri(value *string)() + SetResponsepayload(value PayloadResponseable)() + SetStatus(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/comment_action.go b/src/internal/connector/graph/betasdk/models/comment_action.go new file mode 100644 index 000000000..ef7f0337d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comment_action.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommentAction +type CommentAction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If true, this activity was a reply to an existing comment thread. + isReply *bool + // The OdataType property + odataType *string + // The identity of the user who started the comment thread. + parentAuthor IdentitySetable + // The identities of the users participating in this comment thread. + participants []IdentitySetable +} +// NewCommentAction instantiates a new commentAction and sets the default values. +func NewCommentAction()(*CommentAction) { + m := &CommentAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCommentActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommentActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommentAction(), 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 *CommentAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommentAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isReply"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReply(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["parentAuthor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentAuthor(val.(IdentitySetable)) + } + return nil + } + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySetable) + } + m.SetParticipants(res) + } + return nil + } + return res +} +// GetIsReply gets the isReply property value. If true, this activity was a reply to an existing comment thread. +func (m *CommentAction) GetIsReply()(*bool) { + return m.isReply +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CommentAction) GetOdataType()(*string) { + return m.odataType +} +// GetParentAuthor gets the parentAuthor property value. The identity of the user who started the comment thread. +func (m *CommentAction) GetParentAuthor()(IdentitySetable) { + return m.parentAuthor +} +// GetParticipants gets the participants property value. The identities of the users participating in this comment thread. +func (m *CommentAction) GetParticipants()([]IdentitySetable) { + return m.participants +} +// Serialize serializes information the current object +func (m *CommentAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isReply", m.GetIsReply()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parentAuthor", m.GetParentAuthor()) + if err != nil { + return err + } + } + if m.GetParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParticipants())) + for i, v := range m.GetParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("participants", 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 *CommentAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsReply sets the isReply property value. If true, this activity was a reply to an existing comment thread. +func (m *CommentAction) SetIsReply(value *bool)() { + m.isReply = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CommentAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetParentAuthor sets the parentAuthor property value. The identity of the user who started the comment thread. +func (m *CommentAction) SetParentAuthor(value IdentitySetable)() { + m.parentAuthor = value +} +// SetParticipants sets the participants property value. The identities of the users participating in this comment thread. +func (m *CommentAction) SetParticipants(value []IdentitySetable)() { + m.participants = value +} diff --git a/src/internal/connector/graph/betasdk/models/comment_actionable.go b/src/internal/connector/graph/betasdk/models/comment_actionable.go new file mode 100644 index 000000000..decc96b99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comment_actionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommentActionable +type CommentActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsReply()(*bool) + GetOdataType()(*string) + GetParentAuthor()(IdentitySetable) + GetParticipants()([]IdentitySetable) + SetIsReply(value *bool)() + SetOdataType(value *string)() + SetParentAuthor(value IdentitySetable)() + SetParticipants(value []IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/comms_notification.go b/src/internal/connector/graph/betasdk/models/comms_notification.go new file mode 100644 index 000000000..f3112f078 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_notification.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsNotification +type CommsNotification 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 changeType property + changeType *ChangeType + // The OdataType property + odataType *string + // URI of the resource that was changed. + resourceUrl *string +} +// NewCommsNotification instantiates a new commsNotification and sets the default values. +func NewCommsNotification()(*CommsNotification) { + m := &CommsNotification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCommsNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommsNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommsNotification(), 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 *CommsNotification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChangeType gets the changeType property value. The changeType property +func (m *CommsNotification) GetChangeType()(*ChangeType) { + return m.changeType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommsNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["changeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChangeType) + if err != nil { + return err + } + if val != nil { + m.SetChangeType(val.(*ChangeType)) + } + 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["resourceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CommsNotification) GetOdataType()(*string) { + return m.odataType +} +// GetResourceUrl gets the resourceUrl property value. URI of the resource that was changed. +func (m *CommsNotification) GetResourceUrl()(*string) { + return m.resourceUrl +} +// Serialize serializes information the current object +func (m *CommsNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChangeType() != nil { + cast := (*m.GetChangeType()).String() + err := writer.WriteStringValue("changeType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceUrl", m.GetResourceUrl()) + 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 *CommsNotification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChangeType sets the changeType property value. The changeType property +func (m *CommsNotification) SetChangeType(value *ChangeType)() { + m.changeType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CommsNotification) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceUrl sets the resourceUrl property value. URI of the resource that was changed. +func (m *CommsNotification) SetResourceUrl(value *string)() { + m.resourceUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/comms_notification_collection_response.go b/src/internal/connector/graph/betasdk/models/comms_notification_collection_response.go new file mode 100644 index 000000000..3360f1473 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_notification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsNotificationCollectionResponse +type CommsNotificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CommsNotificationable +} +// NewCommsNotificationCollectionResponse instantiates a new CommsNotificationCollectionResponse and sets the default values. +func NewCommsNotificationCollectionResponse()(*CommsNotificationCollectionResponse) { + m := &CommsNotificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCommsNotificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommsNotificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommsNotificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommsNotificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommsNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CommsNotificationable, len(val)) + for i, v := range val { + res[i] = v.(CommsNotificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CommsNotificationCollectionResponse) GetValue()([]CommsNotificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CommsNotificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CommsNotificationCollectionResponse) SetValue(value []CommsNotificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/comms_notification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/comms_notification_collection_responseable.go new file mode 100644 index 000000000..4d7281294 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_notification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsNotificationCollectionResponseable +type CommsNotificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CommsNotificationable) + SetValue(value []CommsNotificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/comms_notificationable.go b/src/internal/connector/graph/betasdk/models/comms_notificationable.go new file mode 100644 index 000000000..d714826d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_notificationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsNotificationable +type CommsNotificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeType()(*ChangeType) + GetOdataType()(*string) + GetResourceUrl()(*string) + SetChangeType(value *ChangeType)() + SetOdataType(value *string)() + SetResourceUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/comms_operation.go b/src/internal/connector/graph/betasdk/models/comms_operation.go new file mode 100644 index 000000000..d3f3552c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_operation.go @@ -0,0 +1,153 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsOperation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CommsOperation struct { + Entity + // Unique Client Context string. Max limit is 256 chars. + clientContext *string + // The result information. Read-only. + resultInfo ResultInfoable + // The status property + status *OperationStatus +} +// NewCommsOperation instantiates a new commsOperation and sets the default values. +func NewCommsOperation()(*CommsOperation) { + m := &CommsOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateCommsOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommsOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.addLargeGalleryViewOperation": + return NewAddLargeGalleryViewOperation(), nil + case "#microsoft.graph.cancelMediaProcessingOperation": + return NewCancelMediaProcessingOperation(), nil + case "#microsoft.graph.inviteParticipantsOperation": + return NewInviteParticipantsOperation(), nil + case "#microsoft.graph.muteParticipantOperation": + return NewMuteParticipantOperation(), nil + case "#microsoft.graph.muteParticipantsOperation": + return NewMuteParticipantsOperation(), nil + case "#microsoft.graph.playPromptOperation": + return NewPlayPromptOperation(), nil + case "#microsoft.graph.recordOperation": + return NewRecordOperation(), nil + case "#microsoft.graph.startHoldMusicOperation": + return NewStartHoldMusicOperation(), nil + case "#microsoft.graph.stopHoldMusicOperation": + return NewStopHoldMusicOperation(), nil + case "#microsoft.graph.subscribeToToneOperation": + return NewSubscribeToToneOperation(), nil + case "#microsoft.graph.unmuteParticipantOperation": + return NewUnmuteParticipantOperation(), nil + case "#microsoft.graph.updateRecordingStatusOperation": + return NewUpdateRecordingStatusOperation(), nil + } + } + } + } + return NewCommsOperation(), nil +} +// GetClientContext gets the clientContext property value. Unique Client Context string. Max limit is 256 chars. +func (m *CommsOperation) GetClientContext()(*string) { + return m.clientContext +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommsOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["clientContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientContext(val) + } + return nil + } + res["resultInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResultInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultInfo(val.(ResultInfoable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*OperationStatus)) + } + return nil + } + return res +} +// GetResultInfo gets the resultInfo property value. The result information. Read-only. +func (m *CommsOperation) GetResultInfo()(ResultInfoable) { + return m.resultInfo +} +// GetStatus gets the status property value. The status property +func (m *CommsOperation) GetStatus()(*OperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CommsOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("clientContext", m.GetClientContext()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resultInfo", m.GetResultInfo()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetClientContext sets the clientContext property value. Unique Client Context string. Max limit is 256 chars. +func (m *CommsOperation) SetClientContext(value *string)() { + m.clientContext = value +} +// SetResultInfo sets the resultInfo property value. The result information. Read-only. +func (m *CommsOperation) SetResultInfo(value ResultInfoable)() { + m.resultInfo = value +} +// SetStatus sets the status property value. The status property +func (m *CommsOperation) SetStatus(value *OperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/comms_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/comms_operation_collection_response.go new file mode 100644 index 000000000..c8026af53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsOperationCollectionResponse +type CommsOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CommsOperationable +} +// NewCommsOperationCollectionResponse instantiates a new CommsOperationCollectionResponse and sets the default values. +func NewCommsOperationCollectionResponse()(*CommsOperationCollectionResponse) { + m := &CommsOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCommsOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommsOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommsOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommsOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CommsOperationable, len(val)) + for i, v := range val { + res[i] = v.(CommsOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CommsOperationCollectionResponse) GetValue()([]CommsOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CommsOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CommsOperationCollectionResponse) SetValue(value []CommsOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/comms_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/comms_operation_collection_responseable.go new file mode 100644 index 000000000..8879b6d0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsOperationCollectionResponseable +type CommsOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CommsOperationable) + SetValue(value []CommsOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/comms_operationable.go b/src/internal/connector/graph/betasdk/models/comms_operationable.go new file mode 100644 index 000000000..d363c2cf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/comms_operationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommsOperationable +type CommsOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientContext()(*string) + GetResultInfo()(ResultInfoable) + GetStatus()(*OperationStatus) + SetClientContext(value *string)() + SetResultInfo(value ResultInfoable)() + SetStatus(value *OperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/communications_application_identity.go b/src/internal/connector/graph/betasdk/models/communications_application_identity.go new file mode 100644 index 000000000..2378f9631 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_application_identity.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsApplicationIdentity +type CommunicationsApplicationIdentity struct { + Identity + // First party Microsoft application presenting this identity. + applicationType *string + // True if the participant would not like to be shown in other participants' rosters. + hidden *bool +} +// NewCommunicationsApplicationIdentity instantiates a new CommunicationsApplicationIdentity and sets the default values. +func NewCommunicationsApplicationIdentity()(*CommunicationsApplicationIdentity) { + m := &CommunicationsApplicationIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsApplicationIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsApplicationIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsApplicationIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsApplicationIdentity(), nil +} +// GetApplicationType gets the applicationType property value. First party Microsoft application presenting this identity. +func (m *CommunicationsApplicationIdentity) GetApplicationType()(*string) { + return m.applicationType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsApplicationIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["applicationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationType(val) + } + return nil + } + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(val) + } + return nil + } + return res +} +// GetHidden gets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +func (m *CommunicationsApplicationIdentity) GetHidden()(*bool) { + return m.hidden +} +// Serialize serializes information the current object +func (m *CommunicationsApplicationIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("applicationType", m.GetApplicationType()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + return nil +} +// SetApplicationType sets the applicationType property value. First party Microsoft application presenting this identity. +func (m *CommunicationsApplicationIdentity) SetApplicationType(value *string)() { + m.applicationType = value +} +// SetHidden sets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +func (m *CommunicationsApplicationIdentity) SetHidden(value *bool)() { + m.hidden = value +} diff --git a/src/internal/connector/graph/betasdk/models/communications_application_identityable.go b/src/internal/connector/graph/betasdk/models/communications_application_identityable.go new file mode 100644 index 000000000..7bc153a24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_application_identityable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsApplicationIdentityable +type CommunicationsApplicationIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationType()(*string) + GetHidden()(*bool) + SetApplicationType(value *string)() + SetHidden(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/communications_application_instance_identity.go b/src/internal/connector/graph/betasdk/models/communications_application_instance_identity.go new file mode 100644 index 000000000..7432b4458 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_application_instance_identity.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsApplicationInstanceIdentity +type CommunicationsApplicationInstanceIdentity struct { + Identity + // True if the participant would not like to be shown in other participants' rosters. + hidden *bool + // The application's tenant ID. + tenantId *string +} +// NewCommunicationsApplicationInstanceIdentity instantiates a new CommunicationsApplicationInstanceIdentity and sets the default values. +func NewCommunicationsApplicationInstanceIdentity()(*CommunicationsApplicationInstanceIdentity) { + m := &CommunicationsApplicationInstanceIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsApplicationInstanceIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsApplicationInstanceIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsApplicationInstanceIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsApplicationInstanceIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsApplicationInstanceIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetHidden gets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +func (m *CommunicationsApplicationInstanceIdentity) GetHidden()(*bool) { + return m.hidden +} +// GetTenantId gets the tenantId property value. The application's tenant ID. +func (m *CommunicationsApplicationInstanceIdentity) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *CommunicationsApplicationInstanceIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetHidden sets the hidden property value. True if the participant would not like to be shown in other participants' rosters. +func (m *CommunicationsApplicationInstanceIdentity) SetHidden(value *bool)() { + m.hidden = value +} +// SetTenantId sets the tenantId property value. The application's tenant ID. +func (m *CommunicationsApplicationInstanceIdentity) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/communications_application_instance_identityable.go b/src/internal/connector/graph/betasdk/models/communications_application_instance_identityable.go new file mode 100644 index 000000000..a97ea6408 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_application_instance_identityable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsApplicationInstanceIdentityable +type CommunicationsApplicationInstanceIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHidden()(*bool) + GetTenantId()(*string) + SetHidden(value *bool)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/communications_encrypted_identity.go b/src/internal/connector/graph/betasdk/models/communications_encrypted_identity.go new file mode 100644 index 000000000..4d1184571 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_encrypted_identity.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsEncryptedIdentity +type CommunicationsEncryptedIdentity struct { + Identity +} +// NewCommunicationsEncryptedIdentity instantiates a new CommunicationsEncryptedIdentity and sets the default values. +func NewCommunicationsEncryptedIdentity()(*CommunicationsEncryptedIdentity) { + m := &CommunicationsEncryptedIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsEncryptedIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsEncryptedIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsEncryptedIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsEncryptedIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsEncryptedIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CommunicationsEncryptedIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/communications_encrypted_identityable.go b/src/internal/connector/graph/betasdk/models/communications_encrypted_identityable.go new file mode 100644 index 000000000..9c29d818a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_encrypted_identityable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsEncryptedIdentityable +type CommunicationsEncryptedIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/communications_guest_identity.go b/src/internal/connector/graph/betasdk/models/communications_guest_identity.go new file mode 100644 index 000000000..b46f65967 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_guest_identity.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsGuestIdentity +type CommunicationsGuestIdentity struct { + Identity +} +// NewCommunicationsGuestIdentity instantiates a new CommunicationsGuestIdentity and sets the default values. +func NewCommunicationsGuestIdentity()(*CommunicationsGuestIdentity) { + m := &CommunicationsGuestIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsGuestIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsGuestIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsGuestIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsGuestIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsGuestIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CommunicationsGuestIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/communications_guest_identityable.go b/src/internal/connector/graph/betasdk/models/communications_guest_identityable.go new file mode 100644 index 000000000..72103a0ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_guest_identityable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsGuestIdentityable +type CommunicationsGuestIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/communications_identity_set.go b/src/internal/connector/graph/betasdk/models/communications_identity_set.go new file mode 100644 index 000000000..70a5bb3a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_identity_set.go @@ -0,0 +1,245 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsIdentitySet +type CommunicationsIdentitySet struct { + IdentitySet + // The application instance associated with this action. + applicationInstance Identityable + // An identity the participant would like to present itself as to the other participants in the call. + assertedIdentity Identityable + // The Azure Communication Services user associated with this action. + azureCommunicationServicesUser Identityable + // The encrypted user associated with this action. + encrypted Identityable + // Type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. + endpointType *EndpointType + // The guest user associated with this action. + guest Identityable + // The Skype for Business On-Premises user associated with this action. + onPremises Identityable + // Inherited from identitySet. The phone user associated with this action. + phone Identityable +} +// NewCommunicationsIdentitySet instantiates a new CommunicationsIdentitySet and sets the default values. +func NewCommunicationsIdentitySet()(*CommunicationsIdentitySet) { + m := &CommunicationsIdentitySet{ + IdentitySet: *NewIdentitySet(), + } + odataTypeValue := "#microsoft.graph.communicationsIdentitySet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsIdentitySet(), nil +} +// GetApplicationInstance gets the applicationInstance property value. The application instance associated with this action. +func (m *CommunicationsIdentitySet) GetApplicationInstance()(Identityable) { + return m.applicationInstance +} +// GetAssertedIdentity gets the assertedIdentity property value. An identity the participant would like to present itself as to the other participants in the call. +func (m *CommunicationsIdentitySet) GetAssertedIdentity()(Identityable) { + return m.assertedIdentity +} +// GetAzureCommunicationServicesUser gets the azureCommunicationServicesUser property value. The Azure Communication Services user associated with this action. +func (m *CommunicationsIdentitySet) GetAzureCommunicationServicesUser()(Identityable) { + return m.azureCommunicationServicesUser +} +// GetEncrypted gets the encrypted property value. The encrypted user associated with this action. +func (m *CommunicationsIdentitySet) GetEncrypted()(Identityable) { + return m.encrypted +} +// GetEndpointType gets the endpointType property value. Type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. +func (m *CommunicationsIdentitySet) GetEndpointType()(*EndpointType) { + return m.endpointType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsIdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySet.GetFieldDeserializers() + res["applicationInstance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicationInstance(val.(Identityable)) + } + return nil + } + res["assertedIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssertedIdentity(val.(Identityable)) + } + return nil + } + res["azureCommunicationServicesUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAzureCommunicationServicesUser(val.(Identityable)) + } + return nil + } + res["encrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEncrypted(val.(Identityable)) + } + return nil + } + res["endpointType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointType) + if err != nil { + return err + } + if val != nil { + m.SetEndpointType(val.(*EndpointType)) + } + return nil + } + res["guest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGuest(val.(Identityable)) + } + return nil + } + res["onPremises"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnPremises(val.(Identityable)) + } + return nil + } + res["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPhone(val.(Identityable)) + } + return nil + } + return res +} +// GetGuest gets the guest property value. The guest user associated with this action. +func (m *CommunicationsIdentitySet) GetGuest()(Identityable) { + return m.guest +} +// GetOnPremises gets the onPremises property value. The Skype for Business On-Premises user associated with this action. +func (m *CommunicationsIdentitySet) GetOnPremises()(Identityable) { + return m.onPremises +} +// GetPhone gets the phone property value. Inherited from identitySet. The phone user associated with this action. +func (m *CommunicationsIdentitySet) GetPhone()(Identityable) { + return m.phone +} +// Serialize serializes information the current object +func (m *CommunicationsIdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicationInstance", m.GetApplicationInstance()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assertedIdentity", m.GetAssertedIdentity()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("azureCommunicationServicesUser", m.GetAzureCommunicationServicesUser()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("encrypted", m.GetEncrypted()) + if err != nil { + return err + } + } + if m.GetEndpointType() != nil { + cast := (*m.GetEndpointType()).String() + err = writer.WriteStringValue("endpointType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("guest", m.GetGuest()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onPremises", m.GetOnPremises()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + return nil +} +// SetApplicationInstance sets the applicationInstance property value. The application instance associated with this action. +func (m *CommunicationsIdentitySet) SetApplicationInstance(value Identityable)() { + m.applicationInstance = value +} +// SetAssertedIdentity sets the assertedIdentity property value. An identity the participant would like to present itself as to the other participants in the call. +func (m *CommunicationsIdentitySet) SetAssertedIdentity(value Identityable)() { + m.assertedIdentity = value +} +// SetAzureCommunicationServicesUser sets the azureCommunicationServicesUser property value. The Azure Communication Services user associated with this action. +func (m *CommunicationsIdentitySet) SetAzureCommunicationServicesUser(value Identityable)() { + m.azureCommunicationServicesUser = value +} +// SetEncrypted sets the encrypted property value. The encrypted user associated with this action. +func (m *CommunicationsIdentitySet) SetEncrypted(value Identityable)() { + m.encrypted = value +} +// SetEndpointType sets the endpointType property value. Type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. +func (m *CommunicationsIdentitySet) SetEndpointType(value *EndpointType)() { + m.endpointType = value +} +// SetGuest sets the guest property value. The guest user associated with this action. +func (m *CommunicationsIdentitySet) SetGuest(value Identityable)() { + m.guest = value +} +// SetOnPremises sets the onPremises property value. The Skype for Business On-Premises user associated with this action. +func (m *CommunicationsIdentitySet) SetOnPremises(value Identityable)() { + m.onPremises = value +} +// SetPhone sets the phone property value. Inherited from identitySet. The phone user associated with this action. +func (m *CommunicationsIdentitySet) SetPhone(value Identityable)() { + m.phone = value +} diff --git a/src/internal/connector/graph/betasdk/models/communications_identity_setable.go b/src/internal/connector/graph/betasdk/models/communications_identity_setable.go new file mode 100644 index 000000000..c7f3ccc67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_identity_setable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsIdentitySetable +type CommunicationsIdentitySetable interface { + IdentitySetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationInstance()(Identityable) + GetAssertedIdentity()(Identityable) + GetAzureCommunicationServicesUser()(Identityable) + GetEncrypted()(Identityable) + GetEndpointType()(*EndpointType) + GetGuest()(Identityable) + GetOnPremises()(Identityable) + GetPhone()(Identityable) + SetApplicationInstance(value Identityable)() + SetAssertedIdentity(value Identityable)() + SetAzureCommunicationServicesUser(value Identityable)() + SetEncrypted(value Identityable)() + SetEndpointType(value *EndpointType)() + SetGuest(value Identityable)() + SetOnPremises(value Identityable)() + SetPhone(value Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/communications_phone_identity.go b/src/internal/connector/graph/betasdk/models/communications_phone_identity.go new file mode 100644 index 000000000..8340e55ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_phone_identity.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsPhoneIdentity +type CommunicationsPhoneIdentity struct { + Identity +} +// NewCommunicationsPhoneIdentity instantiates a new CommunicationsPhoneIdentity and sets the default values. +func NewCommunicationsPhoneIdentity()(*CommunicationsPhoneIdentity) { + m := &CommunicationsPhoneIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsPhoneIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsPhoneIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsPhoneIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsPhoneIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsPhoneIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CommunicationsPhoneIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/communications_phone_identityable.go b/src/internal/connector/graph/betasdk/models/communications_phone_identityable.go new file mode 100644 index 000000000..e6c23f93a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_phone_identityable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsPhoneIdentityable +type CommunicationsPhoneIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/communications_user_identity.go b/src/internal/connector/graph/betasdk/models/communications_user_identity.go new file mode 100644 index 000000000..a1a62faa1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_user_identity.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsUserIdentity +type CommunicationsUserIdentity struct { + Identity + // The user's tenant ID. + tenantId *string +} +// NewCommunicationsUserIdentity instantiates a new CommunicationsUserIdentity and sets the default values. +func NewCommunicationsUserIdentity()(*CommunicationsUserIdentity) { + m := &CommunicationsUserIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.communicationsUserIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCommunicationsUserIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCommunicationsUserIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCommunicationsUserIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CommunicationsUserIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. The user's tenant ID. +func (m *CommunicationsUserIdentity) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *CommunicationsUserIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetTenantId sets the tenantId property value. The user's tenant ID. +func (m *CommunicationsUserIdentity) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/communications_user_identityable.go b/src/internal/connector/graph/betasdk/models/communications_user_identityable.go new file mode 100644 index 000000000..2d8d2323f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/communications_user_identityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CommunicationsUserIdentityable +type CommunicationsUserIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTenantId()(*string) + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/company.go b/src/internal/connector/graph/betasdk/models/company.go new file mode 100644 index 000000000..888edc04a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company.go @@ -0,0 +1,1328 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Company +type Company struct { + Entity + // The accounts property + accounts []Accountable + // The agedAccountsPayable property + agedAccountsPayable []AgedAccountsPayableable + // The agedAccountsReceivable property + agedAccountsReceivable []AgedAccountsReceivableable + // The businessProfileId property + businessProfileId *string + // The companyInformation property + companyInformation []CompanyInformationable + // The countriesRegions property + countriesRegions []CountryRegionable + // The currencies property + currencies []Currencyable + // The customerPaymentJournals property + customerPaymentJournals []CustomerPaymentJournalable + // The customerPayments property + customerPayments []CustomerPaymentable + // The customers property + customers []Customerable + // The dimensions property + dimensions []Dimensionable + // The dimensionValues property + dimensionValues []DimensionValueable + // The displayName property + displayName *string + // The employees property + employees []Employeeable + // The generalLedgerEntries property + generalLedgerEntries []GeneralLedgerEntryable + // The itemCategories property + itemCategories []ItemCategoryable + // The items property + items []Itemable + // The journalLines property + journalLines []JournalLineable + // The journals property + journals []Journalable + // The name property + name *string + // The paymentMethods property + paymentMethods []PaymentMethodable + // The paymentTerms property + paymentTerms []PaymentTermable + // The picture property + picture []Pictureable + // The purchaseInvoiceLines property + purchaseInvoiceLines []PurchaseInvoiceLineable + // The purchaseInvoices property + purchaseInvoices []PurchaseInvoiceable + // The salesCreditMemoLines property + salesCreditMemoLines []SalesCreditMemoLineable + // The salesCreditMemos property + salesCreditMemos []SalesCreditMemoable + // The salesInvoiceLines property + salesInvoiceLines []SalesInvoiceLineable + // The salesInvoices property + salesInvoices []SalesInvoiceable + // The salesOrderLines property + salesOrderLines []SalesOrderLineable + // The salesOrders property + salesOrders []SalesOrderable + // The salesQuoteLines property + salesQuoteLines []SalesQuoteLineable + // The salesQuotes property + salesQuotes []SalesQuoteable + // The shipmentMethods property + shipmentMethods []ShipmentMethodable + // The systemVersion property + systemVersion *string + // The taxAreas property + taxAreas []TaxAreaable + // The taxGroups property + taxGroups []TaxGroupable + // The unitsOfMeasure property + unitsOfMeasure []UnitOfMeasureable + // The vendors property + vendors []Vendor_escapedable +} +// NewCompany instantiates a new Company and sets the default values. +func NewCompany()(*Company) { + m := &Company{ + Entity: *NewEntity(), + } + return m +} +// CreateCompanyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompany(), nil +} +// GetAccounts gets the accounts property value. The accounts property +func (m *Company) GetAccounts()([]Accountable) { + return m.accounts +} +// GetAgedAccountsPayable gets the agedAccountsPayable property value. The agedAccountsPayable property +func (m *Company) GetAgedAccountsPayable()([]AgedAccountsPayableable) { + return m.agedAccountsPayable +} +// GetAgedAccountsReceivable gets the agedAccountsReceivable property value. The agedAccountsReceivable property +func (m *Company) GetAgedAccountsReceivable()([]AgedAccountsReceivableable) { + return m.agedAccountsReceivable +} +// GetBusinessProfileId gets the businessProfileId property value. The businessProfileId property +func (m *Company) GetBusinessProfileId()(*string) { + return m.businessProfileId +} +// GetCompanyInformation gets the companyInformation property value. The companyInformation property +func (m *Company) GetCompanyInformation()([]CompanyInformationable) { + return m.companyInformation +} +// GetCountriesRegions gets the countriesRegions property value. The countriesRegions property +func (m *Company) GetCountriesRegions()([]CountryRegionable) { + return m.countriesRegions +} +// GetCurrencies gets the currencies property value. The currencies property +func (m *Company) GetCurrencies()([]Currencyable) { + return m.currencies +} +// GetCustomerPaymentJournals gets the customerPaymentJournals property value. The customerPaymentJournals property +func (m *Company) GetCustomerPaymentJournals()([]CustomerPaymentJournalable) { + return m.customerPaymentJournals +} +// GetCustomerPayments gets the customerPayments property value. The customerPayments property +func (m *Company) GetCustomerPayments()([]CustomerPaymentable) { + return m.customerPayments +} +// GetCustomers gets the customers property value. The customers property +func (m *Company) GetCustomers()([]Customerable) { + return m.customers +} +// GetDimensions gets the dimensions property value. The dimensions property +func (m *Company) GetDimensions()([]Dimensionable) { + return m.dimensions +} +// GetDimensionValues gets the dimensionValues property value. The dimensionValues property +func (m *Company) GetDimensionValues()([]DimensionValueable) { + return m.dimensionValues +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Company) GetDisplayName()(*string) { + return m.displayName +} +// GetEmployees gets the employees property value. The employees property +func (m *Company) GetEmployees()([]Employeeable) { + return m.employees +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Company) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Accountable, len(val)) + for i, v := range val { + res[i] = v.(Accountable) + } + m.SetAccounts(res) + } + return nil + } + res["agedAccountsPayable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgedAccountsPayableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgedAccountsPayableable, len(val)) + for i, v := range val { + res[i] = v.(AgedAccountsPayableable) + } + m.SetAgedAccountsPayable(res) + } + return nil + } + res["agedAccountsReceivable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAgedAccountsReceivableFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AgedAccountsReceivableable, len(val)) + for i, v := range val { + res[i] = v.(AgedAccountsReceivableable) + } + m.SetAgedAccountsReceivable(res) + } + return nil + } + res["businessProfileId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBusinessProfileId(val) + } + return nil + } + res["companyInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanyInformationable, len(val)) + for i, v := range val { + res[i] = v.(CompanyInformationable) + } + m.SetCompanyInformation(res) + } + return nil + } + res["countriesRegions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCountryRegionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CountryRegionable, len(val)) + for i, v := range val { + res[i] = v.(CountryRegionable) + } + m.SetCountriesRegions(res) + } + return nil + } + res["currencies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Currencyable, len(val)) + for i, v := range val { + res[i] = v.(Currencyable) + } + m.SetCurrencies(res) + } + return nil + } + res["customerPaymentJournals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerPaymentJournalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomerPaymentJournalable, len(val)) + for i, v := range val { + res[i] = v.(CustomerPaymentJournalable) + } + m.SetCustomerPaymentJournals(res) + } + return nil + } + res["customerPayments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerPaymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomerPaymentable, len(val)) + for i, v := range val { + res[i] = v.(CustomerPaymentable) + } + m.SetCustomerPayments(res) + } + return nil + } + res["customers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Customerable, len(val)) + for i, v := range val { + res[i] = v.(Customerable) + } + m.SetCustomers(res) + } + return nil + } + res["dimensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDimensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Dimensionable, len(val)) + for i, v := range val { + res[i] = v.(Dimensionable) + } + m.SetDimensions(res) + } + return nil + } + res["dimensionValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDimensionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DimensionValueable, len(val)) + for i, v := range val { + res[i] = v.(DimensionValueable) + } + m.SetDimensionValues(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["employees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmployeeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Employeeable, len(val)) + for i, v := range val { + res[i] = v.(Employeeable) + } + m.SetEmployees(res) + } + return nil + } + res["generalLedgerEntries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGeneralLedgerEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GeneralLedgerEntryable, len(val)) + for i, v := range val { + res[i] = v.(GeneralLedgerEntryable) + } + m.SetGeneralLedgerEntries(res) + } + return nil + } + res["itemCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ItemCategoryable) + } + m.SetItemCategories(res) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Itemable, len(val)) + for i, v := range val { + res[i] = v.(Itemable) + } + m.SetItems(res) + } + return nil + } + res["journalLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJournalLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JournalLineable, len(val)) + for i, v := range val { + res[i] = v.(JournalLineable) + } + m.SetJournalLines(res) + } + return nil + } + res["journals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJournalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Journalable, len(val)) + for i, v := range val { + res[i] = v.(Journalable) + } + m.SetJournals(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["paymentMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePaymentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PaymentMethodable, len(val)) + for i, v := range val { + res[i] = v.(PaymentMethodable) + } + m.SetPaymentMethods(res) + } + return nil + } + res["paymentTerms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PaymentTermable, len(val)) + for i, v := range val { + res[i] = v.(PaymentTermable) + } + m.SetPaymentTerms(res) + } + return nil + } + res["picture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePictureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pictureable, len(val)) + for i, v := range val { + res[i] = v.(Pictureable) + } + m.SetPicture(res) + } + return nil + } + res["purchaseInvoiceLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurchaseInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurchaseInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(PurchaseInvoiceLineable) + } + m.SetPurchaseInvoiceLines(res) + } + return nil + } + res["purchaseInvoices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurchaseInvoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurchaseInvoiceable, len(val)) + for i, v := range val { + res[i] = v.(PurchaseInvoiceable) + } + m.SetPurchaseInvoices(res) + } + return nil + } + res["salesCreditMemoLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesCreditMemoLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesCreditMemoLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesCreditMemoLineable) + } + m.SetSalesCreditMemoLines(res) + } + return nil + } + res["salesCreditMemos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesCreditMemoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesCreditMemoable, len(val)) + for i, v := range val { + res[i] = v.(SalesCreditMemoable) + } + m.SetSalesCreditMemos(res) + } + return nil + } + res["salesInvoiceLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesInvoiceLineable) + } + m.SetSalesInvoiceLines(res) + } + return nil + } + res["salesInvoices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesInvoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesInvoiceable, len(val)) + for i, v := range val { + res[i] = v.(SalesInvoiceable) + } + m.SetSalesInvoices(res) + } + return nil + } + res["salesOrderLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesOrderLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesOrderLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesOrderLineable) + } + m.SetSalesOrderLines(res) + } + return nil + } + res["salesOrders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesOrderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesOrderable, len(val)) + for i, v := range val { + res[i] = v.(SalesOrderable) + } + m.SetSalesOrders(res) + } + return nil + } + res["salesQuoteLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesQuoteLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesQuoteLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesQuoteLineable) + } + m.SetSalesQuoteLines(res) + } + return nil + } + res["salesQuotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesQuoteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesQuoteable, len(val)) + for i, v := range val { + res[i] = v.(SalesQuoteable) + } + m.SetSalesQuotes(res) + } + return nil + } + res["shipmentMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateShipmentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ShipmentMethodable, len(val)) + for i, v := range val { + res[i] = v.(ShipmentMethodable) + } + m.SetShipmentMethods(res) + } + return nil + } + res["systemVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSystemVersion(val) + } + return nil + } + res["taxAreas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaxAreaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaxAreaable, len(val)) + for i, v := range val { + res[i] = v.(TaxAreaable) + } + m.SetTaxAreas(res) + } + return nil + } + res["taxGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaxGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaxGroupable, len(val)) + for i, v := range val { + res[i] = v.(TaxGroupable) + } + m.SetTaxGroups(res) + } + return nil + } + res["unitsOfMeasure"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnitOfMeasureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnitOfMeasureable, len(val)) + for i, v := range val { + res[i] = v.(UnitOfMeasureable) + } + m.SetUnitsOfMeasure(res) + } + return nil + } + res["vendors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVendor_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Vendor_escapedable, len(val)) + for i, v := range val { + res[i] = v.(Vendor_escapedable) + } + m.SetVendors(res) + } + return nil + } + return res +} +// GetGeneralLedgerEntries gets the generalLedgerEntries property value. The generalLedgerEntries property +func (m *Company) GetGeneralLedgerEntries()([]GeneralLedgerEntryable) { + return m.generalLedgerEntries +} +// GetItemCategories gets the itemCategories property value. The itemCategories property +func (m *Company) GetItemCategories()([]ItemCategoryable) { + return m.itemCategories +} +// GetItems gets the items property value. The items property +func (m *Company) GetItems()([]Itemable) { + return m.items +} +// GetJournalLines gets the journalLines property value. The journalLines property +func (m *Company) GetJournalLines()([]JournalLineable) { + return m.journalLines +} +// GetJournals gets the journals property value. The journals property +func (m *Company) GetJournals()([]Journalable) { + return m.journals +} +// GetName gets the name property value. The name property +func (m *Company) GetName()(*string) { + return m.name +} +// GetPaymentMethods gets the paymentMethods property value. The paymentMethods property +func (m *Company) GetPaymentMethods()([]PaymentMethodable) { + return m.paymentMethods +} +// GetPaymentTerms gets the paymentTerms property value. The paymentTerms property +func (m *Company) GetPaymentTerms()([]PaymentTermable) { + return m.paymentTerms +} +// GetPicture gets the picture property value. The picture property +func (m *Company) GetPicture()([]Pictureable) { + return m.picture +} +// GetPurchaseInvoiceLines gets the purchaseInvoiceLines property value. The purchaseInvoiceLines property +func (m *Company) GetPurchaseInvoiceLines()([]PurchaseInvoiceLineable) { + return m.purchaseInvoiceLines +} +// GetPurchaseInvoices gets the purchaseInvoices property value. The purchaseInvoices property +func (m *Company) GetPurchaseInvoices()([]PurchaseInvoiceable) { + return m.purchaseInvoices +} +// GetSalesCreditMemoLines gets the salesCreditMemoLines property value. The salesCreditMemoLines property +func (m *Company) GetSalesCreditMemoLines()([]SalesCreditMemoLineable) { + return m.salesCreditMemoLines +} +// GetSalesCreditMemos gets the salesCreditMemos property value. The salesCreditMemos property +func (m *Company) GetSalesCreditMemos()([]SalesCreditMemoable) { + return m.salesCreditMemos +} +// GetSalesInvoiceLines gets the salesInvoiceLines property value. The salesInvoiceLines property +func (m *Company) GetSalesInvoiceLines()([]SalesInvoiceLineable) { + return m.salesInvoiceLines +} +// GetSalesInvoices gets the salesInvoices property value. The salesInvoices property +func (m *Company) GetSalesInvoices()([]SalesInvoiceable) { + return m.salesInvoices +} +// GetSalesOrderLines gets the salesOrderLines property value. The salesOrderLines property +func (m *Company) GetSalesOrderLines()([]SalesOrderLineable) { + return m.salesOrderLines +} +// GetSalesOrders gets the salesOrders property value. The salesOrders property +func (m *Company) GetSalesOrders()([]SalesOrderable) { + return m.salesOrders +} +// GetSalesQuoteLines gets the salesQuoteLines property value. The salesQuoteLines property +func (m *Company) GetSalesQuoteLines()([]SalesQuoteLineable) { + return m.salesQuoteLines +} +// GetSalesQuotes gets the salesQuotes property value. The salesQuotes property +func (m *Company) GetSalesQuotes()([]SalesQuoteable) { + return m.salesQuotes +} +// GetShipmentMethods gets the shipmentMethods property value. The shipmentMethods property +func (m *Company) GetShipmentMethods()([]ShipmentMethodable) { + return m.shipmentMethods +} +// GetSystemVersion gets the systemVersion property value. The systemVersion property +func (m *Company) GetSystemVersion()(*string) { + return m.systemVersion +} +// GetTaxAreas gets the taxAreas property value. The taxAreas property +func (m *Company) GetTaxAreas()([]TaxAreaable) { + return m.taxAreas +} +// GetTaxGroups gets the taxGroups property value. The taxGroups property +func (m *Company) GetTaxGroups()([]TaxGroupable) { + return m.taxGroups +} +// GetUnitsOfMeasure gets the unitsOfMeasure property value. The unitsOfMeasure property +func (m *Company) GetUnitsOfMeasure()([]UnitOfMeasureable) { + return m.unitsOfMeasure +} +// GetVendors gets the vendors property value. The vendors property +func (m *Company) GetVendors()([]Vendor_escapedable) { + return m.vendors +} +// Serialize serializes information the current object +func (m *Company) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccounts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccounts())) + for i, v := range m.GetAccounts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accounts", cast) + if err != nil { + return err + } + } + if m.GetAgedAccountsPayable() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgedAccountsPayable())) + for i, v := range m.GetAgedAccountsPayable() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agedAccountsPayable", cast) + if err != nil { + return err + } + } + if m.GetAgedAccountsReceivable() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgedAccountsReceivable())) + for i, v := range m.GetAgedAccountsReceivable() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agedAccountsReceivable", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("businessProfileId", m.GetBusinessProfileId()) + if err != nil { + return err + } + } + if m.GetCompanyInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompanyInformation())) + for i, v := range m.GetCompanyInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("companyInformation", cast) + if err != nil { + return err + } + } + if m.GetCountriesRegions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCountriesRegions())) + for i, v := range m.GetCountriesRegions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("countriesRegions", cast) + if err != nil { + return err + } + } + if m.GetCurrencies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCurrencies())) + for i, v := range m.GetCurrencies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("currencies", cast) + if err != nil { + return err + } + } + if m.GetCustomerPaymentJournals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomerPaymentJournals())) + for i, v := range m.GetCustomerPaymentJournals() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customerPaymentJournals", cast) + if err != nil { + return err + } + } + if m.GetCustomerPayments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomerPayments())) + for i, v := range m.GetCustomerPayments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customerPayments", cast) + if err != nil { + return err + } + } + if m.GetCustomers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomers())) + for i, v := range m.GetCustomers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customers", cast) + if err != nil { + return err + } + } + if m.GetDimensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDimensions())) + for i, v := range m.GetDimensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dimensions", cast) + if err != nil { + return err + } + } + if m.GetDimensionValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDimensionValues())) + for i, v := range m.GetDimensionValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dimensionValues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmployees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmployees())) + for i, v := range m.GetEmployees() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("employees", cast) + if err != nil { + return err + } + } + if m.GetGeneralLedgerEntries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGeneralLedgerEntries())) + for i, v := range m.GetGeneralLedgerEntries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("generalLedgerEntries", cast) + if err != nil { + return err + } + } + if m.GetItemCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemCategories())) + for i, v := range m.GetItemCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("itemCategories", cast) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + if m.GetJournalLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJournalLines())) + for i, v := range m.GetJournalLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("journalLines", cast) + if err != nil { + return err + } + } + if m.GetJournals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJournals())) + for i, v := range m.GetJournals() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("journals", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPaymentMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPaymentMethods())) + for i, v := range m.GetPaymentMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("paymentMethods", cast) + if err != nil { + return err + } + } + if m.GetPaymentTerms() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPaymentTerms())) + for i, v := range m.GetPaymentTerms() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("paymentTerms", cast) + if err != nil { + return err + } + } + if m.GetPicture() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPicture())) + for i, v := range m.GetPicture() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("picture", cast) + if err != nil { + return err + } + } + if m.GetPurchaseInvoiceLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPurchaseInvoiceLines())) + for i, v := range m.GetPurchaseInvoiceLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("purchaseInvoiceLines", cast) + if err != nil { + return err + } + } + if m.GetPurchaseInvoices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPurchaseInvoices())) + for i, v := range m.GetPurchaseInvoices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("purchaseInvoices", cast) + if err != nil { + return err + } + } + if m.GetSalesCreditMemoLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesCreditMemoLines())) + for i, v := range m.GetSalesCreditMemoLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesCreditMemoLines", cast) + if err != nil { + return err + } + } + if m.GetSalesCreditMemos() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesCreditMemos())) + for i, v := range m.GetSalesCreditMemos() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesCreditMemos", cast) + if err != nil { + return err + } + } + if m.GetSalesInvoiceLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesInvoiceLines())) + for i, v := range m.GetSalesInvoiceLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesInvoiceLines", cast) + if err != nil { + return err + } + } + if m.GetSalesInvoices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesInvoices())) + for i, v := range m.GetSalesInvoices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesInvoices", cast) + if err != nil { + return err + } + } + if m.GetSalesOrderLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesOrderLines())) + for i, v := range m.GetSalesOrderLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesOrderLines", cast) + if err != nil { + return err + } + } + if m.GetSalesOrders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesOrders())) + for i, v := range m.GetSalesOrders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesOrders", cast) + if err != nil { + return err + } + } + if m.GetSalesQuoteLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesQuoteLines())) + for i, v := range m.GetSalesQuoteLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesQuoteLines", cast) + if err != nil { + return err + } + } + if m.GetSalesQuotes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesQuotes())) + for i, v := range m.GetSalesQuotes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesQuotes", cast) + if err != nil { + return err + } + } + if m.GetShipmentMethods() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetShipmentMethods())) + for i, v := range m.GetShipmentMethods() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("shipmentMethods", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("systemVersion", m.GetSystemVersion()) + if err != nil { + return err + } + } + if m.GetTaxAreas() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaxAreas())) + for i, v := range m.GetTaxAreas() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taxAreas", cast) + if err != nil { + return err + } + } + if m.GetTaxGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaxGroups())) + for i, v := range m.GetTaxGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taxGroups", cast) + if err != nil { + return err + } + } + if m.GetUnitsOfMeasure() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnitsOfMeasure())) + for i, v := range m.GetUnitsOfMeasure() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("unitsOfMeasure", cast) + if err != nil { + return err + } + } + if m.GetVendors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVendors())) + for i, v := range m.GetVendors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("vendors", cast) + if err != nil { + return err + } + } + return nil +} +// SetAccounts sets the accounts property value. The accounts property +func (m *Company) SetAccounts(value []Accountable)() { + m.accounts = value +} +// SetAgedAccountsPayable sets the agedAccountsPayable property value. The agedAccountsPayable property +func (m *Company) SetAgedAccountsPayable(value []AgedAccountsPayableable)() { + m.agedAccountsPayable = value +} +// SetAgedAccountsReceivable sets the agedAccountsReceivable property value. The agedAccountsReceivable property +func (m *Company) SetAgedAccountsReceivable(value []AgedAccountsReceivableable)() { + m.agedAccountsReceivable = value +} +// SetBusinessProfileId sets the businessProfileId property value. The businessProfileId property +func (m *Company) SetBusinessProfileId(value *string)() { + m.businessProfileId = value +} +// SetCompanyInformation sets the companyInformation property value. The companyInformation property +func (m *Company) SetCompanyInformation(value []CompanyInformationable)() { + m.companyInformation = value +} +// SetCountriesRegions sets the countriesRegions property value. The countriesRegions property +func (m *Company) SetCountriesRegions(value []CountryRegionable)() { + m.countriesRegions = value +} +// SetCurrencies sets the currencies property value. The currencies property +func (m *Company) SetCurrencies(value []Currencyable)() { + m.currencies = value +} +// SetCustomerPaymentJournals sets the customerPaymentJournals property value. The customerPaymentJournals property +func (m *Company) SetCustomerPaymentJournals(value []CustomerPaymentJournalable)() { + m.customerPaymentJournals = value +} +// SetCustomerPayments sets the customerPayments property value. The customerPayments property +func (m *Company) SetCustomerPayments(value []CustomerPaymentable)() { + m.customerPayments = value +} +// SetCustomers sets the customers property value. The customers property +func (m *Company) SetCustomers(value []Customerable)() { + m.customers = value +} +// SetDimensions sets the dimensions property value. The dimensions property +func (m *Company) SetDimensions(value []Dimensionable)() { + m.dimensions = value +} +// SetDimensionValues sets the dimensionValues property value. The dimensionValues property +func (m *Company) SetDimensionValues(value []DimensionValueable)() { + m.dimensionValues = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Company) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmployees sets the employees property value. The employees property +func (m *Company) SetEmployees(value []Employeeable)() { + m.employees = value +} +// SetGeneralLedgerEntries sets the generalLedgerEntries property value. The generalLedgerEntries property +func (m *Company) SetGeneralLedgerEntries(value []GeneralLedgerEntryable)() { + m.generalLedgerEntries = value +} +// SetItemCategories sets the itemCategories property value. The itemCategories property +func (m *Company) SetItemCategories(value []ItemCategoryable)() { + m.itemCategories = value +} +// SetItems sets the items property value. The items property +func (m *Company) SetItems(value []Itemable)() { + m.items = value +} +// SetJournalLines sets the journalLines property value. The journalLines property +func (m *Company) SetJournalLines(value []JournalLineable)() { + m.journalLines = value +} +// SetJournals sets the journals property value. The journals property +func (m *Company) SetJournals(value []Journalable)() { + m.journals = value +} +// SetName sets the name property value. The name property +func (m *Company) SetName(value *string)() { + m.name = value +} +// SetPaymentMethods sets the paymentMethods property value. The paymentMethods property +func (m *Company) SetPaymentMethods(value []PaymentMethodable)() { + m.paymentMethods = value +} +// SetPaymentTerms sets the paymentTerms property value. The paymentTerms property +func (m *Company) SetPaymentTerms(value []PaymentTermable)() { + m.paymentTerms = value +} +// SetPicture sets the picture property value. The picture property +func (m *Company) SetPicture(value []Pictureable)() { + m.picture = value +} +// SetPurchaseInvoiceLines sets the purchaseInvoiceLines property value. The purchaseInvoiceLines property +func (m *Company) SetPurchaseInvoiceLines(value []PurchaseInvoiceLineable)() { + m.purchaseInvoiceLines = value +} +// SetPurchaseInvoices sets the purchaseInvoices property value. The purchaseInvoices property +func (m *Company) SetPurchaseInvoices(value []PurchaseInvoiceable)() { + m.purchaseInvoices = value +} +// SetSalesCreditMemoLines sets the salesCreditMemoLines property value. The salesCreditMemoLines property +func (m *Company) SetSalesCreditMemoLines(value []SalesCreditMemoLineable)() { + m.salesCreditMemoLines = value +} +// SetSalesCreditMemos sets the salesCreditMemos property value. The salesCreditMemos property +func (m *Company) SetSalesCreditMemos(value []SalesCreditMemoable)() { + m.salesCreditMemos = value +} +// SetSalesInvoiceLines sets the salesInvoiceLines property value. The salesInvoiceLines property +func (m *Company) SetSalesInvoiceLines(value []SalesInvoiceLineable)() { + m.salesInvoiceLines = value +} +// SetSalesInvoices sets the salesInvoices property value. The salesInvoices property +func (m *Company) SetSalesInvoices(value []SalesInvoiceable)() { + m.salesInvoices = value +} +// SetSalesOrderLines sets the salesOrderLines property value. The salesOrderLines property +func (m *Company) SetSalesOrderLines(value []SalesOrderLineable)() { + m.salesOrderLines = value +} +// SetSalesOrders sets the salesOrders property value. The salesOrders property +func (m *Company) SetSalesOrders(value []SalesOrderable)() { + m.salesOrders = value +} +// SetSalesQuoteLines sets the salesQuoteLines property value. The salesQuoteLines property +func (m *Company) SetSalesQuoteLines(value []SalesQuoteLineable)() { + m.salesQuoteLines = value +} +// SetSalesQuotes sets the salesQuotes property value. The salesQuotes property +func (m *Company) SetSalesQuotes(value []SalesQuoteable)() { + m.salesQuotes = value +} +// SetShipmentMethods sets the shipmentMethods property value. The shipmentMethods property +func (m *Company) SetShipmentMethods(value []ShipmentMethodable)() { + m.shipmentMethods = value +} +// SetSystemVersion sets the systemVersion property value. The systemVersion property +func (m *Company) SetSystemVersion(value *string)() { + m.systemVersion = value +} +// SetTaxAreas sets the taxAreas property value. The taxAreas property +func (m *Company) SetTaxAreas(value []TaxAreaable)() { + m.taxAreas = value +} +// SetTaxGroups sets the taxGroups property value. The taxGroups property +func (m *Company) SetTaxGroups(value []TaxGroupable)() { + m.taxGroups = value +} +// SetUnitsOfMeasure sets the unitsOfMeasure property value. The unitsOfMeasure property +func (m *Company) SetUnitsOfMeasure(value []UnitOfMeasureable)() { + m.unitsOfMeasure = value +} +// SetVendors sets the vendors property value. The vendors property +func (m *Company) SetVendors(value []Vendor_escapedable)() { + m.vendors = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_collection_response.go b/src/internal/connector/graph/betasdk/models/company_collection_response.go new file mode 100644 index 000000000..e4cc44e9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyCollectionResponse +type CompanyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Companyable +} +// NewCompanyCollectionResponse instantiates a new CompanyCollectionResponse and sets the default values. +func NewCompanyCollectionResponse()(*CompanyCollectionResponse) { + m := &CompanyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCompanyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Companyable, len(val)) + for i, v := range val { + res[i] = v.(Companyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CompanyCollectionResponse) GetValue()([]Companyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CompanyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CompanyCollectionResponse) SetValue(value []Companyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_collection_responseable.go b/src/internal/connector/graph/betasdk/models/company_collection_responseable.go new file mode 100644 index 000000000..bcf845040 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyCollectionResponseable +type CompanyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Companyable) + SetValue(value []Companyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/company_detail.go b/src/internal/connector/graph/betasdk/models/company_detail.go new file mode 100644 index 000000000..a46564e0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_detail.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyDetail +type CompanyDetail struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Address of the company. + address PhysicalAddressable + // Department Name within a company. + department *string + // Company name. + displayName *string + // The OdataType property + odataType *string + // Office Location of the person referred to. + officeLocation *string + // Pronunciation guide for the company name. + pronunciation *string + // Link to the company home page. + webUrl *string +} +// NewCompanyDetail instantiates a new companyDetail and sets the default values. +func NewCompanyDetail()(*CompanyDetail) { + m := &CompanyDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCompanyDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyDetail(), 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 *CompanyDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddress gets the address property value. Address of the company. +func (m *CompanyDetail) GetAddress()(PhysicalAddressable) { + return m.address +} +// GetDepartment gets the department property value. Department Name within a company. +func (m *CompanyDetail) GetDepartment()(*string) { + return m.department +} +// GetDisplayName gets the displayName property value. Company name. +func (m *CompanyDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PhysicalAddressable)) + } + return nil + } + res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDepartment(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeLocation(val) + } + return nil + } + res["pronunciation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPronunciation(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CompanyDetail) GetOdataType()(*string) { + return m.odataType +} +// GetOfficeLocation gets the officeLocation property value. Office Location of the person referred to. +func (m *CompanyDetail) GetOfficeLocation()(*string) { + return m.officeLocation +} +// GetPronunciation gets the pronunciation property value. Pronunciation guide for the company name. +func (m *CompanyDetail) GetPronunciation()(*string) { + return m.pronunciation +} +// GetWebUrl gets the webUrl property value. Link to the company home page. +func (m *CompanyDetail) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *CompanyDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("department", m.GetDepartment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("officeLocation", m.GetOfficeLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pronunciation", m.GetPronunciation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *CompanyDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddress sets the address property value. Address of the company. +func (m *CompanyDetail) SetAddress(value PhysicalAddressable)() { + m.address = value +} +// SetDepartment sets the department property value. Department Name within a company. +func (m *CompanyDetail) SetDepartment(value *string)() { + m.department = value +} +// SetDisplayName sets the displayName property value. Company name. +func (m *CompanyDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CompanyDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetOfficeLocation sets the officeLocation property value. Office Location of the person referred to. +func (m *CompanyDetail) SetOfficeLocation(value *string)() { + m.officeLocation = value +} +// SetPronunciation sets the pronunciation property value. Pronunciation guide for the company name. +func (m *CompanyDetail) SetPronunciation(value *string)() { + m.pronunciation = value +} +// SetWebUrl sets the webUrl property value. Link to the company home page. +func (m *CompanyDetail) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_detailable.go b/src/internal/connector/graph/betasdk/models/company_detailable.go new file mode 100644 index 000000000..4de23f7ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_detailable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyDetailable +type CompanyDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PhysicalAddressable) + GetDepartment()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + GetOfficeLocation()(*string) + GetPronunciation()(*string) + GetWebUrl()(*string) + SetAddress(value PhysicalAddressable)() + SetDepartment(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetOfficeLocation(value *string)() + SetPronunciation(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/company_information.go b/src/internal/connector/graph/betasdk/models/company_information.go new file mode 100644 index 000000000..d2da0844a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_information.go @@ -0,0 +1,347 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyInformation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CompanyInformation struct { + Entity + // The address property + address PostalAddressTypeable + // The currencyCode property + currencyCode *string + // The currentFiscalYearStartDate property + currentFiscalYearStartDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The displayName property + displayName *string + // The email property + email *string + // The faxNumber property + faxNumber *string + // The industry property + industry *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The phoneNumber property + phoneNumber *string + // The picture property + picture []byte + // The taxRegistrationNumber property + taxRegistrationNumber *string + // The website property + website *string +} +// NewCompanyInformation instantiates a new companyInformation and sets the default values. +func NewCompanyInformation()(*CompanyInformation) { + m := &CompanyInformation{ + Entity: *NewEntity(), + } + return m +} +// CreateCompanyInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyInformation(), nil +} +// GetAddress gets the address property value. The address property +func (m *CompanyInformation) GetAddress()(PostalAddressTypeable) { + return m.address +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *CompanyInformation) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrentFiscalYearStartDate gets the currentFiscalYearStartDate property value. The currentFiscalYearStartDate property +func (m *CompanyInformation) GetCurrentFiscalYearStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.currentFiscalYearStartDate +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *CompanyInformation) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email property +func (m *CompanyInformation) GetEmail()(*string) { + return m.email +} +// GetFaxNumber gets the faxNumber property value. The faxNumber property +func (m *CompanyInformation) GetFaxNumber()(*string) { + return m.faxNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currentFiscalYearStartDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentFiscalYearStartDate(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["faxNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFaxNumber(val) + } + return nil + } + res["industry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIndustry(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["picture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPicture(val) + } + return nil + } + res["taxRegistrationNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxRegistrationNumber(val) + } + return nil + } + res["website"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebsite(val) + } + return nil + } + return res +} +// GetIndustry gets the industry property value. The industry property +func (m *CompanyInformation) GetIndustry()(*string) { + return m.industry +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CompanyInformation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *CompanyInformation) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPicture gets the picture property value. The picture property +func (m *CompanyInformation) GetPicture()([]byte) { + return m.picture +} +// GetTaxRegistrationNumber gets the taxRegistrationNumber property value. The taxRegistrationNumber property +func (m *CompanyInformation) GetTaxRegistrationNumber()(*string) { + return m.taxRegistrationNumber +} +// GetWebsite gets the website property value. The website property +func (m *CompanyInformation) GetWebsite()(*string) { + return m.website +} +// Serialize serializes information the current object +func (m *CompanyInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("currentFiscalYearStartDate", m.GetCurrentFiscalYearStartDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("faxNumber", m.GetFaxNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("industry", m.GetIndustry()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("picture", m.GetPicture()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxRegistrationNumber", m.GetTaxRegistrationNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("website", m.GetWebsite()) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The address property +func (m *CompanyInformation) SetAddress(value PostalAddressTypeable)() { + m.address = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *CompanyInformation) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrentFiscalYearStartDate sets the currentFiscalYearStartDate property value. The currentFiscalYearStartDate property +func (m *CompanyInformation) SetCurrentFiscalYearStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.currentFiscalYearStartDate = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *CompanyInformation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email property +func (m *CompanyInformation) SetEmail(value *string)() { + m.email = value +} +// SetFaxNumber sets the faxNumber property value. The faxNumber property +func (m *CompanyInformation) SetFaxNumber(value *string)() { + m.faxNumber = value +} +// SetIndustry sets the industry property value. The industry property +func (m *CompanyInformation) SetIndustry(value *string)() { + m.industry = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CompanyInformation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *CompanyInformation) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPicture sets the picture property value. The picture property +func (m *CompanyInformation) SetPicture(value []byte)() { + m.picture = value +} +// SetTaxRegistrationNumber sets the taxRegistrationNumber property value. The taxRegistrationNumber property +func (m *CompanyInformation) SetTaxRegistrationNumber(value *string)() { + m.taxRegistrationNumber = value +} +// SetWebsite sets the website property value. The website property +func (m *CompanyInformation) SetWebsite(value *string)() { + m.website = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_information_collection_response.go b/src/internal/connector/graph/betasdk/models/company_information_collection_response.go new file mode 100644 index 000000000..cae2d696f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_information_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyInformationCollectionResponse +type CompanyInformationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CompanyInformationable +} +// NewCompanyInformationCollectionResponse instantiates a new CompanyInformationCollectionResponse and sets the default values. +func NewCompanyInformationCollectionResponse()(*CompanyInformationCollectionResponse) { + m := &CompanyInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCompanyInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanyInformationable, len(val)) + for i, v := range val { + res[i] = v.(CompanyInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CompanyInformationCollectionResponse) GetValue()([]CompanyInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CompanyInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CompanyInformationCollectionResponse) SetValue(value []CompanyInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/company_information_collection_responseable.go new file mode 100644 index 000000000..03ad02bba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_information_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyInformationCollectionResponseable +type CompanyInformationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CompanyInformationable) + SetValue(value []CompanyInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/company_informationable.go b/src/internal/connector/graph/betasdk/models/company_informationable.go new file mode 100644 index 000000000..0a798f732 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_informationable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyInformationable +type CompanyInformationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PostalAddressTypeable) + GetCurrencyCode()(*string) + GetCurrentFiscalYearStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetDisplayName()(*string) + GetEmail()(*string) + GetFaxNumber()(*string) + GetIndustry()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPhoneNumber()(*string) + GetPicture()([]byte) + GetTaxRegistrationNumber()(*string) + GetWebsite()(*string) + SetAddress(value PostalAddressTypeable)() + SetCurrencyCode(value *string)() + SetCurrentFiscalYearStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetFaxNumber(value *string)() + SetIndustry(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPhoneNumber(value *string)() + SetPicture(value []byte)() + SetTaxRegistrationNumber(value *string)() + SetWebsite(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/company_portal_action.go b/src/internal/connector/graph/betasdk/models/company_portal_action.go new file mode 100644 index 000000000..eae8a04bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_portal_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CompanyPortalAction int + +const ( + // Unknown device action + UNKNOWN_COMPANYPORTALACTION CompanyPortalAction = iota + // Remove device from Company Portal + REMOVE_COMPANYPORTALACTION + // Reset device enrolled in Company Portal + RESET_COMPANYPORTALACTION +) + +func (i CompanyPortalAction) String() string { + return []string{"unknown", "remove", "reset"}[i] +} +func ParseCompanyPortalAction(v string) (interface{}, error) { + result := UNKNOWN_COMPANYPORTALACTION + switch v { + case "unknown": + result = UNKNOWN_COMPANYPORTALACTION + case "remove": + result = REMOVE_COMPANYPORTALACTION + case "reset": + result = RESET_COMPANYPORTALACTION + default: + return 0, errors.New("Unknown CompanyPortalAction value: " + v) + } + return &result, nil +} +func SerializeCompanyPortalAction(values []CompanyPortalAction) []string { + 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/company_portal_blocked_action.go b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action.go new file mode 100644 index 000000000..27d0a67b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyPortalBlockedAction blocked actions on the company portal as per platform and device ownership types +type CompanyPortalBlockedAction struct { + // Action on a device that can be executed in the Company Portal + action *CompanyPortalAction + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string + // Owner type of device. + ownerType *OwnerType + // Supported platform types. + platform *DevicePlatformType +} +// NewCompanyPortalBlockedAction instantiates a new companyPortalBlockedAction and sets the default values. +func NewCompanyPortalBlockedAction()(*CompanyPortalBlockedAction) { + m := &CompanyPortalBlockedAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCompanyPortalBlockedActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyPortalBlockedActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyPortalBlockedAction(), nil +} +// GetAction gets the action property value. Action on a device that can be executed in the Company Portal +func (m *CompanyPortalBlockedAction) GetAction()(*CompanyPortalAction) { + return m.action +} +// 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 *CompanyPortalBlockedAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyPortalBlockedAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCompanyPortalAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*CompanyPortalAction)) + } + 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["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOwnerType) + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val.(*OwnerType)) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*DevicePlatformType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CompanyPortalBlockedAction) GetOdataType()(*string) { + return m.odataType +} +// GetOwnerType gets the ownerType property value. Owner type of device. +func (m *CompanyPortalBlockedAction) GetOwnerType()(*OwnerType) { + return m.ownerType +} +// GetPlatform gets the platform property value. Supported platform types. +func (m *CompanyPortalBlockedAction) GetPlatform()(*DevicePlatformType) { + return m.platform +} +// Serialize serializes information the current object +func (m *CompanyPortalBlockedAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOwnerType() != nil { + cast := (*m.GetOwnerType()).String() + err := writer.WriteStringValue("ownerType", &cast) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err := writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. Action on a device that can be executed in the Company Portal +func (m *CompanyPortalBlockedAction) SetAction(value *CompanyPortalAction)() { + m.action = value +} +// 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 *CompanyPortalBlockedAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CompanyPortalBlockedAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetOwnerType sets the ownerType property value. Owner type of device. +func (m *CompanyPortalBlockedAction) SetOwnerType(value *OwnerType)() { + m.ownerType = value +} +// SetPlatform sets the platform property value. Supported platform types. +func (m *CompanyPortalBlockedAction) SetPlatform(value *DevicePlatformType)() { + m.platform = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_response.go b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_response.go new file mode 100644 index 000000000..e3b56ab6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyPortalBlockedActionCollectionResponse +type CompanyPortalBlockedActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CompanyPortalBlockedActionable +} +// NewCompanyPortalBlockedActionCollectionResponse instantiates a new CompanyPortalBlockedActionCollectionResponse and sets the default values. +func NewCompanyPortalBlockedActionCollectionResponse()(*CompanyPortalBlockedActionCollectionResponse) { + m := &CompanyPortalBlockedActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCompanyPortalBlockedActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCompanyPortalBlockedActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCompanyPortalBlockedActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CompanyPortalBlockedActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyPortalBlockedActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanyPortalBlockedActionable, len(val)) + for i, v := range val { + res[i] = v.(CompanyPortalBlockedActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CompanyPortalBlockedActionCollectionResponse) GetValue()([]CompanyPortalBlockedActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CompanyPortalBlockedActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CompanyPortalBlockedActionCollectionResponse) SetValue(value []CompanyPortalBlockedActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_responseable.go new file mode 100644 index 000000000..3607d6bdb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_portal_blocked_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyPortalBlockedActionCollectionResponseable +type CompanyPortalBlockedActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CompanyPortalBlockedActionable) + SetValue(value []CompanyPortalBlockedActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/company_portal_blocked_actionable.go b/src/internal/connector/graph/betasdk/models/company_portal_blocked_actionable.go new file mode 100644 index 000000000..62dd9d784 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/company_portal_blocked_actionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CompanyPortalBlockedActionable +type CompanyPortalBlockedActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*CompanyPortalAction) + GetOdataType()(*string) + GetOwnerType()(*OwnerType) + GetPlatform()(*DevicePlatformType) + SetAction(value *CompanyPortalAction)() + SetOdataType(value *string)() + SetOwnerType(value *OwnerType)() + SetPlatform(value *DevicePlatformType)() +} diff --git a/src/internal/connector/graph/betasdk/models/companyable.go b/src/internal/connector/graph/betasdk/models/companyable.go new file mode 100644 index 000000000..7d5454ede --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/companyable.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Companyable +type Companyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccounts()([]Accountable) + GetAgedAccountsPayable()([]AgedAccountsPayableable) + GetAgedAccountsReceivable()([]AgedAccountsReceivableable) + GetBusinessProfileId()(*string) + GetCompanyInformation()([]CompanyInformationable) + GetCountriesRegions()([]CountryRegionable) + GetCurrencies()([]Currencyable) + GetCustomerPaymentJournals()([]CustomerPaymentJournalable) + GetCustomerPayments()([]CustomerPaymentable) + GetCustomers()([]Customerable) + GetDimensions()([]Dimensionable) + GetDimensionValues()([]DimensionValueable) + GetDisplayName()(*string) + GetEmployees()([]Employeeable) + GetGeneralLedgerEntries()([]GeneralLedgerEntryable) + GetItemCategories()([]ItemCategoryable) + GetItems()([]Itemable) + GetJournalLines()([]JournalLineable) + GetJournals()([]Journalable) + GetName()(*string) + GetPaymentMethods()([]PaymentMethodable) + GetPaymentTerms()([]PaymentTermable) + GetPicture()([]Pictureable) + GetPurchaseInvoiceLines()([]PurchaseInvoiceLineable) + GetPurchaseInvoices()([]PurchaseInvoiceable) + GetSalesCreditMemoLines()([]SalesCreditMemoLineable) + GetSalesCreditMemos()([]SalesCreditMemoable) + GetSalesInvoiceLines()([]SalesInvoiceLineable) + GetSalesInvoices()([]SalesInvoiceable) + GetSalesOrderLines()([]SalesOrderLineable) + GetSalesOrders()([]SalesOrderable) + GetSalesQuoteLines()([]SalesQuoteLineable) + GetSalesQuotes()([]SalesQuoteable) + GetShipmentMethods()([]ShipmentMethodable) + GetSystemVersion()(*string) + GetTaxAreas()([]TaxAreaable) + GetTaxGroups()([]TaxGroupable) + GetUnitsOfMeasure()([]UnitOfMeasureable) + GetVendors()([]Vendor_escapedable) + SetAccounts(value []Accountable)() + SetAgedAccountsPayable(value []AgedAccountsPayableable)() + SetAgedAccountsReceivable(value []AgedAccountsReceivableable)() + SetBusinessProfileId(value *string)() + SetCompanyInformation(value []CompanyInformationable)() + SetCountriesRegions(value []CountryRegionable)() + SetCurrencies(value []Currencyable)() + SetCustomerPaymentJournals(value []CustomerPaymentJournalable)() + SetCustomerPayments(value []CustomerPaymentable)() + SetCustomers(value []Customerable)() + SetDimensions(value []Dimensionable)() + SetDimensionValues(value []DimensionValueable)() + SetDisplayName(value *string)() + SetEmployees(value []Employeeable)() + SetGeneralLedgerEntries(value []GeneralLedgerEntryable)() + SetItemCategories(value []ItemCategoryable)() + SetItems(value []Itemable)() + SetJournalLines(value []JournalLineable)() + SetJournals(value []Journalable)() + SetName(value *string)() + SetPaymentMethods(value []PaymentMethodable)() + SetPaymentTerms(value []PaymentTermable)() + SetPicture(value []Pictureable)() + SetPurchaseInvoiceLines(value []PurchaseInvoiceLineable)() + SetPurchaseInvoices(value []PurchaseInvoiceable)() + SetSalesCreditMemoLines(value []SalesCreditMemoLineable)() + SetSalesCreditMemos(value []SalesCreditMemoable)() + SetSalesInvoiceLines(value []SalesInvoiceLineable)() + SetSalesInvoices(value []SalesInvoiceable)() + SetSalesOrderLines(value []SalesOrderLineable)() + SetSalesOrders(value []SalesOrderable)() + SetSalesQuoteLines(value []SalesQuoteLineable)() + SetSalesQuotes(value []SalesQuoteable)() + SetShipmentMethods(value []ShipmentMethodable)() + SetSystemVersion(value *string)() + SetTaxAreas(value []TaxAreaable)() + SetTaxGroups(value []TaxGroupable)() + SetUnitsOfMeasure(value []UnitOfMeasureable)() + SetVendors(value []Vendor_escapedable)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_information.go b/src/internal/connector/graph/betasdk/models/compliance_information.go new file mode 100644 index 000000000..a762770d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_information.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceInformation +type ComplianceInformation 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 certificationControls property + certificationControls []CertificationControlable + // The certificationName property + certificationName *string + // The OdataType property + odataType *string +} +// NewComplianceInformation instantiates a new complianceInformation and sets the default values. +func NewComplianceInformation()(*ComplianceInformation) { + m := &ComplianceInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateComplianceInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceInformation(), 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 *ComplianceInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertificationControls gets the certificationControls property value. The certificationControls property +func (m *ComplianceInformation) GetCertificationControls()([]CertificationControlable) { + return m.certificationControls +} +// GetCertificationName gets the certificationName property value. The certificationName property +func (m *ComplianceInformation) GetCertificationName()(*string) { + return m.certificationName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificationControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificationControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificationControlable, len(val)) + for i, v := range val { + res[i] = v.(CertificationControlable) + } + m.SetCertificationControls(res) + } + return nil + } + res["certificationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ComplianceInformation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ComplianceInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCertificationControls() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificationControls())) + for i, v := range m.GetCertificationControls() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("certificationControls", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("certificationName", m.GetCertificationName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ComplianceInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertificationControls sets the certificationControls property value. The certificationControls property +func (m *ComplianceInformation) SetCertificationControls(value []CertificationControlable)() { + m.certificationControls = value +} +// SetCertificationName sets the certificationName property value. The certificationName property +func (m *ComplianceInformation) SetCertificationName(value *string)() { + m.certificationName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ComplianceInformation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_information_collection_response.go b/src/internal/connector/graph/betasdk/models/compliance_information_collection_response.go new file mode 100644 index 000000000..fa75f53f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_information_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceInformationCollectionResponse +type ComplianceInformationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ComplianceInformationable +} +// NewComplianceInformationCollectionResponse instantiates a new ComplianceInformationCollectionResponse and sets the default values. +func NewComplianceInformationCollectionResponse()(*ComplianceInformationCollectionResponse) { + m := &ComplianceInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateComplianceInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceInformationable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ComplianceInformationCollectionResponse) GetValue()([]ComplianceInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ComplianceInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ComplianceInformationCollectionResponse) SetValue(value []ComplianceInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/compliance_information_collection_responseable.go new file mode 100644 index 000000000..7a81e446d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_information_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceInformationCollectionResponseable +type ComplianceInformationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ComplianceInformationable) + SetValue(value []ComplianceInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_informationable.go b/src/internal/connector/graph/betasdk/models/compliance_informationable.go new file mode 100644 index 000000000..d07815145 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_informationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceInformationable +type ComplianceInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificationControls()([]CertificationControlable) + GetCertificationName()(*string) + GetOdataType()(*string) + SetCertificationControls(value []CertificationControlable)() + SetCertificationName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner.go new file mode 100644 index 000000000..2afb21ce5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner.go @@ -0,0 +1,354 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartner compliance management partner for all platforms +type ComplianceManagementPartner struct { + Entity + // User groups which enroll Android devices through partner. + androidEnrollmentAssignments []ComplianceManagementPartnerAssignmentable + // Partner onboarded for Android devices. + androidOnboarded *bool + // Partner display name + displayName *string + // User groups which enroll ios devices through partner. + iosEnrollmentAssignments []ComplianceManagementPartnerAssignmentable + // Partner onboarded for ios devices. + iosOnboarded *bool + // Timestamp of last heartbeat after admin onboarded to the compliance management partner + lastHeartbeatDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // User groups which enroll Mac devices through partner. + macOsEnrollmentAssignments []ComplianceManagementPartnerAssignmentable + // Partner onboarded for Mac devices. + macOsOnboarded *bool + // Partner state of this tenant. + partnerState *DeviceManagementPartnerTenantState + // User groups which enroll Windows devices through partner. + windowsEnrollmentAssignments []ComplianceManagementPartnerAssignmentable + // Partner onboarded for Windows devices. + windowsOnboarded *bool +} +// NewComplianceManagementPartner instantiates a new complianceManagementPartner and sets the default values. +func NewComplianceManagementPartner()(*ComplianceManagementPartner) { + m := &ComplianceManagementPartner{ + Entity: *NewEntity(), + } + return m +} +// CreateComplianceManagementPartnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceManagementPartnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceManagementPartner(), nil +} +// GetAndroidEnrollmentAssignments gets the androidEnrollmentAssignments property value. User groups which enroll Android devices through partner. +func (m *ComplianceManagementPartner) GetAndroidEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) { + return m.androidEnrollmentAssignments +} +// GetAndroidOnboarded gets the androidOnboarded property value. Partner onboarded for Android devices. +func (m *ComplianceManagementPartner) GetAndroidOnboarded()(*bool) { + return m.androidOnboarded +} +// GetDisplayName gets the displayName property value. Partner display name +func (m *ComplianceManagementPartner) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceManagementPartner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["androidEnrollmentAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerAssignmentable) + } + m.SetAndroidEnrollmentAssignments(res) + } + return nil + } + res["androidOnboarded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidOnboarded(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["iosEnrollmentAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerAssignmentable) + } + m.SetIosEnrollmentAssignments(res) + } + return nil + } + res["iosOnboarded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIosOnboarded(val) + } + return nil + } + res["lastHeartbeatDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastHeartbeatDateTime(val) + } + return nil + } + res["macOsEnrollmentAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerAssignmentable) + } + m.SetMacOsEnrollmentAssignments(res) + } + return nil + } + res["macOsOnboarded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMacOsOnboarded(val) + } + return nil + } + res["partnerState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementPartnerTenantState) + if err != nil { + return err + } + if val != nil { + m.SetPartnerState(val.(*DeviceManagementPartnerTenantState)) + } + return nil + } + res["windowsEnrollmentAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerAssignmentable) + } + m.SetWindowsEnrollmentAssignments(res) + } + return nil + } + res["windowsOnboarded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsOnboarded(val) + } + return nil + } + return res +} +// GetIosEnrollmentAssignments gets the iosEnrollmentAssignments property value. User groups which enroll ios devices through partner. +func (m *ComplianceManagementPartner) GetIosEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) { + return m.iosEnrollmentAssignments +} +// GetIosOnboarded gets the iosOnboarded property value. Partner onboarded for ios devices. +func (m *ComplianceManagementPartner) GetIosOnboarded()(*bool) { + return m.iosOnboarded +} +// GetLastHeartbeatDateTime gets the lastHeartbeatDateTime property value. Timestamp of last heartbeat after admin onboarded to the compliance management partner +func (m *ComplianceManagementPartner) GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastHeartbeatDateTime +} +// GetMacOsEnrollmentAssignments gets the macOsEnrollmentAssignments property value. User groups which enroll Mac devices through partner. +func (m *ComplianceManagementPartner) GetMacOsEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) { + return m.macOsEnrollmentAssignments +} +// GetMacOsOnboarded gets the macOsOnboarded property value. Partner onboarded for Mac devices. +func (m *ComplianceManagementPartner) GetMacOsOnboarded()(*bool) { + return m.macOsOnboarded +} +// GetPartnerState gets the partnerState property value. Partner state of this tenant. +func (m *ComplianceManagementPartner) GetPartnerState()(*DeviceManagementPartnerTenantState) { + return m.partnerState +} +// GetWindowsEnrollmentAssignments gets the windowsEnrollmentAssignments property value. User groups which enroll Windows devices through partner. +func (m *ComplianceManagementPartner) GetWindowsEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) { + return m.windowsEnrollmentAssignments +} +// GetWindowsOnboarded gets the windowsOnboarded property value. Partner onboarded for Windows devices. +func (m *ComplianceManagementPartner) GetWindowsOnboarded()(*bool) { + return m.windowsOnboarded +} +// Serialize serializes information the current object +func (m *ComplianceManagementPartner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAndroidEnrollmentAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidEnrollmentAssignments())) + for i, v := range m.GetAndroidEnrollmentAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidEnrollmentAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("androidOnboarded", m.GetAndroidOnboarded()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIosEnrollmentAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIosEnrollmentAssignments())) + for i, v := range m.GetIosEnrollmentAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("iosEnrollmentAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iosOnboarded", m.GetIosOnboarded()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastHeartbeatDateTime", m.GetLastHeartbeatDateTime()) + if err != nil { + return err + } + } + if m.GetMacOsEnrollmentAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMacOsEnrollmentAssignments())) + for i, v := range m.GetMacOsEnrollmentAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("macOsEnrollmentAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("macOsOnboarded", m.GetMacOsOnboarded()) + if err != nil { + return err + } + } + if m.GetPartnerState() != nil { + cast := (*m.GetPartnerState()).String() + err = writer.WriteStringValue("partnerState", &cast) + if err != nil { + return err + } + } + if m.GetWindowsEnrollmentAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsEnrollmentAssignments())) + for i, v := range m.GetWindowsEnrollmentAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsEnrollmentAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("windowsOnboarded", m.GetWindowsOnboarded()) + if err != nil { + return err + } + } + return nil +} +// SetAndroidEnrollmentAssignments sets the androidEnrollmentAssignments property value. User groups which enroll Android devices through partner. +func (m *ComplianceManagementPartner) SetAndroidEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() { + m.androidEnrollmentAssignments = value +} +// SetAndroidOnboarded sets the androidOnboarded property value. Partner onboarded for Android devices. +func (m *ComplianceManagementPartner) SetAndroidOnboarded(value *bool)() { + m.androidOnboarded = value +} +// SetDisplayName sets the displayName property value. Partner display name +func (m *ComplianceManagementPartner) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIosEnrollmentAssignments sets the iosEnrollmentAssignments property value. User groups which enroll ios devices through partner. +func (m *ComplianceManagementPartner) SetIosEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() { + m.iosEnrollmentAssignments = value +} +// SetIosOnboarded sets the iosOnboarded property value. Partner onboarded for ios devices. +func (m *ComplianceManagementPartner) SetIosOnboarded(value *bool)() { + m.iosOnboarded = value +} +// SetLastHeartbeatDateTime sets the lastHeartbeatDateTime property value. Timestamp of last heartbeat after admin onboarded to the compliance management partner +func (m *ComplianceManagementPartner) SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastHeartbeatDateTime = value +} +// SetMacOsEnrollmentAssignments sets the macOsEnrollmentAssignments property value. User groups which enroll Mac devices through partner. +func (m *ComplianceManagementPartner) SetMacOsEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() { + m.macOsEnrollmentAssignments = value +} +// SetMacOsOnboarded sets the macOsOnboarded property value. Partner onboarded for Mac devices. +func (m *ComplianceManagementPartner) SetMacOsOnboarded(value *bool)() { + m.macOsOnboarded = value +} +// SetPartnerState sets the partnerState property value. Partner state of this tenant. +func (m *ComplianceManagementPartner) SetPartnerState(value *DeviceManagementPartnerTenantState)() { + m.partnerState = value +} +// SetWindowsEnrollmentAssignments sets the windowsEnrollmentAssignments property value. User groups which enroll Windows devices through partner. +func (m *ComplianceManagementPartner) SetWindowsEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() { + m.windowsEnrollmentAssignments = value +} +// SetWindowsOnboarded sets the windowsOnboarded property value. Partner onboarded for Windows devices. +func (m *ComplianceManagementPartner) SetWindowsOnboarded(value *bool)() { + m.windowsOnboarded = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment.go new file mode 100644 index 000000000..1ad87171b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerAssignment user group targeting for Compliance Management Partner +type ComplianceManagementPartnerAssignment 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 OdataType property + odataType *string + // Group assignment target. + target DeviceAndAppManagementAssignmentTargetable +} +// NewComplianceManagementPartnerAssignment instantiates a new complianceManagementPartnerAssignment and sets the default values. +func NewComplianceManagementPartnerAssignment()(*ComplianceManagementPartnerAssignment) { + m := &ComplianceManagementPartnerAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceManagementPartnerAssignment(), 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 *ComplianceManagementPartnerAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceManagementPartnerAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ComplianceManagementPartnerAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. Group assignment target. +func (m *ComplianceManagementPartnerAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *ComplianceManagementPartnerAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("target", m.GetTarget()) + 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 *ComplianceManagementPartnerAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ComplianceManagementPartnerAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. Group assignment target. +func (m *ComplianceManagementPartnerAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_response.go new file mode 100644 index 000000000..ab221a736 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerAssignmentCollectionResponse +type ComplianceManagementPartnerAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ComplianceManagementPartnerAssignmentable +} +// NewComplianceManagementPartnerAssignmentCollectionResponse instantiates a new ComplianceManagementPartnerAssignmentCollectionResponse and sets the default values. +func NewComplianceManagementPartnerAssignmentCollectionResponse()(*ComplianceManagementPartnerAssignmentCollectionResponse) { + m := &ComplianceManagementPartnerAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateComplianceManagementPartnerAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceManagementPartnerAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceManagementPartnerAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceManagementPartnerAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ComplianceManagementPartnerAssignmentCollectionResponse) GetValue()([]ComplianceManagementPartnerAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ComplianceManagementPartnerAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ComplianceManagementPartnerAssignmentCollectionResponse) SetValue(value []ComplianceManagementPartnerAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_responseable.go new file mode 100644 index 000000000..52fb8ae77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerAssignmentCollectionResponseable +type ComplianceManagementPartnerAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ComplianceManagementPartnerAssignmentable) + SetValue(value []ComplianceManagementPartnerAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignmentable.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignmentable.go new file mode 100644 index 000000000..34a16cdaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_assignmentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerAssignmentable +type ComplianceManagementPartnerAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetOdataType(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_response.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_response.go new file mode 100644 index 000000000..258e4ff54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerCollectionResponse +type ComplianceManagementPartnerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ComplianceManagementPartnerable +} +// NewComplianceManagementPartnerCollectionResponse instantiates a new ComplianceManagementPartnerCollectionResponse and sets the default values. +func NewComplianceManagementPartnerCollectionResponse()(*ComplianceManagementPartnerCollectionResponse) { + m := &ComplianceManagementPartnerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateComplianceManagementPartnerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceManagementPartnerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceManagementPartnerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceManagementPartnerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ComplianceManagementPartnerCollectionResponse) GetValue()([]ComplianceManagementPartnerable) { + return m.value +} +// Serialize serializes information the current object +func (m *ComplianceManagementPartnerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ComplianceManagementPartnerCollectionResponse) SetValue(value []ComplianceManagementPartnerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_responseable.go b/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_responseable.go new file mode 100644 index 000000000..7e8f7149f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partner_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerCollectionResponseable +type ComplianceManagementPartnerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ComplianceManagementPartnerable) + SetValue(value []ComplianceManagementPartnerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_management_partnerable.go b/src/internal/connector/graph/betasdk/models/compliance_management_partnerable.go new file mode 100644 index 000000000..c258c3e6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_management_partnerable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceManagementPartnerable +type ComplianceManagementPartnerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) + GetAndroidOnboarded()(*bool) + GetDisplayName()(*string) + GetIosEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) + GetIosOnboarded()(*bool) + GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMacOsEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) + GetMacOsOnboarded()(*bool) + GetPartnerState()(*DeviceManagementPartnerTenantState) + GetWindowsEnrollmentAssignments()([]ComplianceManagementPartnerAssignmentable) + GetWindowsOnboarded()(*bool) + SetAndroidEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() + SetAndroidOnboarded(value *bool)() + SetDisplayName(value *string)() + SetIosEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() + SetIosOnboarded(value *bool)() + SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMacOsEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() + SetMacOsOnboarded(value *bool)() + SetPartnerState(value *DeviceManagementPartnerTenantState)() + SetWindowsEnrollmentAssignments(value []ComplianceManagementPartnerAssignmentable)() + SetWindowsOnboarded(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/compliance_state.go b/src/internal/connector/graph/betasdk/models/compliance_state.go new file mode 100644 index 000000000..d0f8190b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_state.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ComplianceState int + +const ( + // Unknown. + UNKNOWN_COMPLIANCESTATE ComplianceState = iota + // Compliant. + COMPLIANT_COMPLIANCESTATE + // Device is non-compliant and is blocked from corporate resources. + NONCOMPLIANT_COMPLIANCESTATE + // Conflict with other rules. + CONFLICT_COMPLIANCESTATE + // Error. + ERROR_COMPLIANCESTATE + // Device is non-compliant but still has access to corporate resources + INGRACEPERIOD_COMPLIANCESTATE + // Managed by Config Manager + CONFIGMANAGER_COMPLIANCESTATE +) + +func (i ComplianceState) String() string { + return []string{"unknown", "compliant", "noncompliant", "conflict", "error", "inGracePeriod", "configManager"}[i] +} +func ParseComplianceState(v string) (interface{}, error) { + result := UNKNOWN_COMPLIANCESTATE + switch v { + case "unknown": + result = UNKNOWN_COMPLIANCESTATE + case "compliant": + result = COMPLIANT_COMPLIANCESTATE + case "noncompliant": + result = NONCOMPLIANT_COMPLIANCESTATE + case "conflict": + result = CONFLICT_COMPLIANCESTATE + case "error": + result = ERROR_COMPLIANCESTATE + case "inGracePeriod": + result = INGRACEPERIOD_COMPLIANCESTATE + case "configManager": + result = CONFIGMANAGER_COMPLIANCESTATE + default: + return 0, errors.New("Unknown ComplianceState value: " + v) + } + return &result, nil +} +func SerializeComplianceState(values []ComplianceState) []string { + 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/compliance_status.go b/src/internal/connector/graph/betasdk/models/compliance_status.go new file mode 100644 index 000000000..4fa9555c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/compliance_status.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ComplianceStatus int + +const ( + UNKNOWN_COMPLIANCESTATUS ComplianceStatus = iota + NOTAPPLICABLE_COMPLIANCESTATUS + COMPLIANT_COMPLIANCESTATUS + REMEDIATED_COMPLIANCESTATUS + NONCOMPLIANT_COMPLIANCESTATUS + ERROR_COMPLIANCESTATUS + CONFLICT_COMPLIANCESTATUS + NOTASSIGNED_COMPLIANCESTATUS +) + +func (i ComplianceStatus) String() string { + return []string{"unknown", "notApplicable", "compliant", "remediated", "nonCompliant", "error", "conflict", "notAssigned"}[i] +} +func ParseComplianceStatus(v string) (interface{}, error) { + result := UNKNOWN_COMPLIANCESTATUS + switch v { + case "unknown": + result = UNKNOWN_COMPLIANCESTATUS + case "notApplicable": + result = NOTAPPLICABLE_COMPLIANCESTATUS + case "compliant": + result = COMPLIANT_COMPLIANCESTATUS + case "remediated": + result = REMEDIATED_COMPLIANCESTATUS + case "nonCompliant": + result = NONCOMPLIANT_COMPLIANCESTATUS + case "error": + result = ERROR_COMPLIANCESTATUS + case "conflict": + result = CONFLICT_COMPLIANCESTATUS + case "notAssigned": + result = NOTASSIGNED_COMPLIANCESTATUS + default: + return 0, errors.New("Unknown ComplianceStatus value: " + v) + } + return &result, nil +} +func SerializeComplianceStatus(values []ComplianceStatus) []string { + 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/conditional_access_all_external_tenants.go b/src/internal/connector/graph/betasdk/models/conditional_access_all_external_tenants.go new file mode 100644 index 000000000..61e2387f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_all_external_tenants.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessAllExternalTenants +type ConditionalAccessAllExternalTenants struct { + ConditionalAccessExternalTenants +} +// NewConditionalAccessAllExternalTenants instantiates a new ConditionalAccessAllExternalTenants and sets the default values. +func NewConditionalAccessAllExternalTenants()(*ConditionalAccessAllExternalTenants) { + m := &ConditionalAccessAllExternalTenants{ + ConditionalAccessExternalTenants: *NewConditionalAccessExternalTenants(), + } + odataTypeValue := "#microsoft.graph.conditionalAccessAllExternalTenants"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateConditionalAccessAllExternalTenantsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessAllExternalTenantsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessAllExternalTenants(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessAllExternalTenants) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConditionalAccessExternalTenants.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ConditionalAccessAllExternalTenants) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConditionalAccessExternalTenants.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_all_external_tenantsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_all_external_tenantsable.go new file mode 100644 index 000000000..9a8f4e9c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_all_external_tenantsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessAllExternalTenantsable +type ConditionalAccessAllExternalTenantsable interface { + ConditionalAccessExternalTenantsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_applications.go b/src/internal/connector/graph/betasdk/models/conditional_access_applications.go new file mode 100644 index 000000000..9497281b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_applications.go @@ -0,0 +1,217 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessApplications +type ConditionalAccessApplications struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Filter that defines the dynamic-application-syntax rule to include/exclude cloud applications. A filter can use custom security attributes to include/exclude applications. + applicationFilter ConditionalAccessFilterable + // Can be one of the following: The list of client IDs (appId) explicitly excluded from the policy. Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 + excludeApplications []string + // Can be one of the following: The list of client IDs (appId) the policy applies to, unless explicitly excluded (in excludeApplications) All Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 + includeApplications []string + // Authentication context class references include. Supported values are c1 through c25. + includeAuthenticationContextClassReferences []string + // User actions to include. Supported values are urn:user:registersecurityinfo and urn:user:registerdevice + includeUserActions []string + // The OdataType property + odataType *string +} +// NewConditionalAccessApplications instantiates a new conditionalAccessApplications and sets the default values. +func NewConditionalAccessApplications()(*ConditionalAccessApplications) { + m := &ConditionalAccessApplications{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessApplicationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessApplicationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessApplications(), 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 *ConditionalAccessApplications) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationFilter gets the applicationFilter property value. Filter that defines the dynamic-application-syntax rule to include/exclude cloud applications. A filter can use custom security attributes to include/exclude applications. +func (m *ConditionalAccessApplications) GetApplicationFilter()(ConditionalAccessFilterable) { + return m.applicationFilter +} +// GetExcludeApplications gets the excludeApplications property value. Can be one of the following: The list of client IDs (appId) explicitly excluded from the policy. Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 +func (m *ConditionalAccessApplications) GetExcludeApplications()([]string) { + return m.excludeApplications +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessApplications) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicationFilter(val.(ConditionalAccessFilterable)) + } + return nil + } + res["excludeApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeApplications(res) + } + return nil + } + res["includeApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeApplications(res) + } + return nil + } + res["includeAuthenticationContextClassReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeAuthenticationContextClassReferences(res) + } + return nil + } + res["includeUserActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeUserActions(res) + } + 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 + } + return res +} +// GetIncludeApplications gets the includeApplications property value. Can be one of the following: The list of client IDs (appId) the policy applies to, unless explicitly excluded (in excludeApplications) All Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 +func (m *ConditionalAccessApplications) GetIncludeApplications()([]string) { + return m.includeApplications +} +// GetIncludeAuthenticationContextClassReferences gets the includeAuthenticationContextClassReferences property value. Authentication context class references include. Supported values are c1 through c25. +func (m *ConditionalAccessApplications) GetIncludeAuthenticationContextClassReferences()([]string) { + return m.includeAuthenticationContextClassReferences +} +// GetIncludeUserActions gets the includeUserActions property value. User actions to include. Supported values are urn:user:registersecurityinfo and urn:user:registerdevice +func (m *ConditionalAccessApplications) GetIncludeUserActions()([]string) { + return m.includeUserActions +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessApplications) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessApplications) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applicationFilter", m.GetApplicationFilter()) + if err != nil { + return err + } + } + if m.GetExcludeApplications() != nil { + err := writer.WriteCollectionOfStringValues("excludeApplications", m.GetExcludeApplications()) + if err != nil { + return err + } + } + if m.GetIncludeApplications() != nil { + err := writer.WriteCollectionOfStringValues("includeApplications", m.GetIncludeApplications()) + if err != nil { + return err + } + } + if m.GetIncludeAuthenticationContextClassReferences() != nil { + err := writer.WriteCollectionOfStringValues("includeAuthenticationContextClassReferences", m.GetIncludeAuthenticationContextClassReferences()) + if err != nil { + return err + } + } + if m.GetIncludeUserActions() != nil { + err := writer.WriteCollectionOfStringValues("includeUserActions", m.GetIncludeUserActions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessApplications) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationFilter sets the applicationFilter property value. Filter that defines the dynamic-application-syntax rule to include/exclude cloud applications. A filter can use custom security attributes to include/exclude applications. +func (m *ConditionalAccessApplications) SetApplicationFilter(value ConditionalAccessFilterable)() { + m.applicationFilter = value +} +// SetExcludeApplications sets the excludeApplications property value. Can be one of the following: The list of client IDs (appId) explicitly excluded from the policy. Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 +func (m *ConditionalAccessApplications) SetExcludeApplications(value []string)() { + m.excludeApplications = value +} +// SetIncludeApplications sets the includeApplications property value. Can be one of the following: The list of client IDs (appId) the policy applies to, unless explicitly excluded (in excludeApplications) All Office365 - For the list of apps included in Office365, see Conditional Access target apps: Office 365 +func (m *ConditionalAccessApplications) SetIncludeApplications(value []string)() { + m.includeApplications = value +} +// SetIncludeAuthenticationContextClassReferences sets the includeAuthenticationContextClassReferences property value. Authentication context class references include. Supported values are c1 through c25. +func (m *ConditionalAccessApplications) SetIncludeAuthenticationContextClassReferences(value []string)() { + m.includeAuthenticationContextClassReferences = value +} +// SetIncludeUserActions sets the includeUserActions property value. User actions to include. Supported values are urn:user:registersecurityinfo and urn:user:registerdevice +func (m *ConditionalAccessApplications) SetIncludeUserActions(value []string)() { + m.includeUserActions = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessApplications) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_applicationsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_applicationsable.go new file mode 100644 index 000000000..0d0327dc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_applicationsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessApplicationsable +type ConditionalAccessApplicationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationFilter()(ConditionalAccessFilterable) + GetExcludeApplications()([]string) + GetIncludeApplications()([]string) + GetIncludeAuthenticationContextClassReferences()([]string) + GetIncludeUserActions()([]string) + GetOdataType()(*string) + SetApplicationFilter(value ConditionalAccessFilterable)() + SetExcludeApplications(value []string)() + SetIncludeApplications(value []string)() + SetIncludeAuthenticationContextClassReferences(value []string)() + SetIncludeUserActions(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_client_app.go b/src/internal/connector/graph/betasdk/models/conditional_access_client_app.go new file mode 100644 index 000000000..bafa47149 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_client_app.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessClientApp int + +const ( + ALL_CONDITIONALACCESSCLIENTAPP ConditionalAccessClientApp = iota + BROWSER_CONDITIONALACCESSCLIENTAPP + MOBILEAPPSANDDESKTOPCLIENTS_CONDITIONALACCESSCLIENTAPP + EXCHANGEACTIVESYNC_CONDITIONALACCESSCLIENTAPP + EASSUPPORTED_CONDITIONALACCESSCLIENTAPP + OTHER_CONDITIONALACCESSCLIENTAPP + UNKNOWNFUTUREVALUE_CONDITIONALACCESSCLIENTAPP +) + +func (i ConditionalAccessClientApp) String() string { + return []string{"all", "browser", "mobileAppsAndDesktopClients", "exchangeActiveSync", "easSupported", "other", "unknownFutureValue"}[i] +} +func ParseConditionalAccessClientApp(v string) (interface{}, error) { + result := ALL_CONDITIONALACCESSCLIENTAPP + switch v { + case "all": + result = ALL_CONDITIONALACCESSCLIENTAPP + case "browser": + result = BROWSER_CONDITIONALACCESSCLIENTAPP + case "mobileAppsAndDesktopClients": + result = MOBILEAPPSANDDESKTOPCLIENTS_CONDITIONALACCESSCLIENTAPP + case "exchangeActiveSync": + result = EXCHANGEACTIVESYNC_CONDITIONALACCESSCLIENTAPP + case "easSupported": + result = EASSUPPORTED_CONDITIONALACCESSCLIENTAPP + case "other": + result = OTHER_CONDITIONALACCESSCLIENTAPP + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSCLIENTAPP + default: + return 0, errors.New("Unknown ConditionalAccessClientApp value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessClientApp(values []ConditionalAccessClientApp) []string { + 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/conditional_access_client_applications.go b/src/internal/connector/graph/betasdk/models/conditional_access_client_applications.go new file mode 100644 index 000000000..e3b658a9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_client_applications.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessClientApplications +type ConditionalAccessClientApplications struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Service principal IDs excluded from the policy scope. + excludeServicePrincipals []string + // Service principal IDs included in the policy scope, or ServicePrincipalsInMyTenant. + includeServicePrincipals []string + // The OdataType property + odataType *string + // Filter that defines the dynamic-servicePrincipal-syntax rule to include/exclude service principals. A filter can use custom security attributes to include/exclude service principals. + servicePrincipalFilter ConditionalAccessFilterable +} +// NewConditionalAccessClientApplications instantiates a new conditionalAccessClientApplications and sets the default values. +func NewConditionalAccessClientApplications()(*ConditionalAccessClientApplications) { + m := &ConditionalAccessClientApplications{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessClientApplicationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessClientApplicationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessClientApplications(), 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 *ConditionalAccessClientApplications) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeServicePrincipals gets the excludeServicePrincipals property value. Service principal IDs excluded from the policy scope. +func (m *ConditionalAccessClientApplications) GetExcludeServicePrincipals()([]string) { + return m.excludeServicePrincipals +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessClientApplications) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeServicePrincipals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeServicePrincipals(res) + } + return nil + } + res["includeServicePrincipals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeServicePrincipals(res) + } + 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["servicePrincipalFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalFilter(val.(ConditionalAccessFilterable)) + } + return nil + } + return res +} +// GetIncludeServicePrincipals gets the includeServicePrincipals property value. Service principal IDs included in the policy scope, or ServicePrincipalsInMyTenant. +func (m *ConditionalAccessClientApplications) GetIncludeServicePrincipals()([]string) { + return m.includeServicePrincipals +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessClientApplications) GetOdataType()(*string) { + return m.odataType +} +// GetServicePrincipalFilter gets the servicePrincipalFilter property value. Filter that defines the dynamic-servicePrincipal-syntax rule to include/exclude service principals. A filter can use custom security attributes to include/exclude service principals. +func (m *ConditionalAccessClientApplications) GetServicePrincipalFilter()(ConditionalAccessFilterable) { + return m.servicePrincipalFilter +} +// Serialize serializes information the current object +func (m *ConditionalAccessClientApplications) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludeServicePrincipals() != nil { + err := writer.WriteCollectionOfStringValues("excludeServicePrincipals", m.GetExcludeServicePrincipals()) + if err != nil { + return err + } + } + if m.GetIncludeServicePrincipals() != nil { + err := writer.WriteCollectionOfStringValues("includeServicePrincipals", m.GetIncludeServicePrincipals()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("servicePrincipalFilter", m.GetServicePrincipalFilter()) + 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 *ConditionalAccessClientApplications) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeServicePrincipals sets the excludeServicePrincipals property value. Service principal IDs excluded from the policy scope. +func (m *ConditionalAccessClientApplications) SetExcludeServicePrincipals(value []string)() { + m.excludeServicePrincipals = value +} +// SetIncludeServicePrincipals sets the includeServicePrincipals property value. Service principal IDs included in the policy scope, or ServicePrincipalsInMyTenant. +func (m *ConditionalAccessClientApplications) SetIncludeServicePrincipals(value []string)() { + m.includeServicePrincipals = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessClientApplications) SetOdataType(value *string)() { + m.odataType = value +} +// SetServicePrincipalFilter sets the servicePrincipalFilter property value. Filter that defines the dynamic-servicePrincipal-syntax rule to include/exclude service principals. A filter can use custom security attributes to include/exclude service principals. +func (m *ConditionalAccessClientApplications) SetServicePrincipalFilter(value ConditionalAccessFilterable)() { + m.servicePrincipalFilter = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_client_applicationsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_client_applicationsable.go new file mode 100644 index 000000000..e44cbef89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_client_applicationsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessClientApplicationsable +type ConditionalAccessClientApplicationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeServicePrincipals()([]string) + GetIncludeServicePrincipals()([]string) + GetOdataType()(*string) + GetServicePrincipalFilter()(ConditionalAccessFilterable) + SetExcludeServicePrincipals(value []string)() + SetIncludeServicePrincipals(value []string)() + SetOdataType(value *string)() + SetServicePrincipalFilter(value ConditionalAccessFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_condition_set.go b/src/internal/connector/graph/betasdk/models/conditional_access_condition_set.go new file mode 100644 index 000000000..1c7e41c35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_condition_set.go @@ -0,0 +1,373 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessConditionSet +type ConditionalAccessConditionSet struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Applications and user actions included in and excluded from the policy. Required. + applications ConditionalAccessApplicationsable + // Client applications (service principals and workload identities) included in and excluded from the policy. Either users or clientApplications is required. + clientApplications ConditionalAccessClientApplicationsable + // Client application types included in the policy. Possible values are: all, browser, mobileAppsAndDesktopClients, exchangeActiveSync, easSupported, other. Required. + clientAppTypes []ConditionalAccessClientApp + // Devices in the policy. + devices ConditionalAccessDevicesable + // Device states in the policy. + deviceStates ConditionalAccessDeviceStatesable + // Locations included in and excluded from the policy. + locations ConditionalAccessLocationsable + // The OdataType property + odataType *string + // Platforms included in and excluded from the policy. + platforms ConditionalAccessPlatformsable + // Service principal risk levels included in the policy. Possible values are: low, medium, high, none, unknownFutureValue. + servicePrincipalRiskLevels []RiskLevel + // Sign-in risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. + signInRiskLevels []RiskLevel + // User risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. + userRiskLevels []RiskLevel + // Users, groups, and roles included in and excluded from the policy. Either users or clientApplications is required. + users ConditionalAccessUsersable +} +// NewConditionalAccessConditionSet instantiates a new conditionalAccessConditionSet and sets the default values. +func NewConditionalAccessConditionSet()(*ConditionalAccessConditionSet) { + m := &ConditionalAccessConditionSet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessConditionSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessConditionSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessConditionSet(), 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 *ConditionalAccessConditionSet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplications gets the applications property value. Applications and user actions included in and excluded from the policy. Required. +func (m *ConditionalAccessConditionSet) GetApplications()(ConditionalAccessApplicationsable) { + return m.applications +} +// GetClientApplications gets the clientApplications property value. Client applications (service principals and workload identities) included in and excluded from the policy. Either users or clientApplications is required. +func (m *ConditionalAccessConditionSet) GetClientApplications()(ConditionalAccessClientApplicationsable) { + return m.clientApplications +} +// GetClientAppTypes gets the clientAppTypes property value. Client application types included in the policy. Possible values are: all, browser, mobileAppsAndDesktopClients, exchangeActiveSync, easSupported, other. Required. +func (m *ConditionalAccessConditionSet) GetClientAppTypes()([]ConditionalAccessClientApp) { + return m.clientAppTypes +} +// GetDevices gets the devices property value. Devices in the policy. +func (m *ConditionalAccessConditionSet) GetDevices()(ConditionalAccessDevicesable) { + return m.devices +} +// GetDeviceStates gets the deviceStates property value. Device states in the policy. +func (m *ConditionalAccessConditionSet) GetDeviceStates()(ConditionalAccessDeviceStatesable) { + return m.deviceStates +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessConditionSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessApplicationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplications(val.(ConditionalAccessApplicationsable)) + } + return nil + } + res["clientApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessClientApplicationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClientApplications(val.(ConditionalAccessClientApplicationsable)) + } + return nil + } + res["clientAppTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseConditionalAccessClientApp) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessClientApp, len(val)) + for i, v := range val { + res[i] = *(v.(*ConditionalAccessClientApp)) + } + m.SetClientAppTypes(res) + } + return nil + } + res["devices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessDevicesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevices(val.(ConditionalAccessDevicesable)) + } + return nil + } + res["deviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessDeviceStatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStates(val.(ConditionalAccessDeviceStatesable)) + } + return nil + } + res["locations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessLocationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocations(val.(ConditionalAccessLocationsable)) + } + 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["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessPlatformsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlatforms(val.(ConditionalAccessPlatformsable)) + } + return nil + } + res["servicePrincipalRiskLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + res := make([]RiskLevel, len(val)) + for i, v := range val { + res[i] = *(v.(*RiskLevel)) + } + m.SetServicePrincipalRiskLevels(res) + } + return nil + } + res["signInRiskLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + res := make([]RiskLevel, len(val)) + for i, v := range val { + res[i] = *(v.(*RiskLevel)) + } + m.SetSignInRiskLevels(res) + } + return nil + } + res["userRiskLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + res := make([]RiskLevel, len(val)) + for i, v := range val { + res[i] = *(v.(*RiskLevel)) + } + m.SetUserRiskLevels(res) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUsers(val.(ConditionalAccessUsersable)) + } + return nil + } + return res +} +// GetLocations gets the locations property value. Locations included in and excluded from the policy. +func (m *ConditionalAccessConditionSet) GetLocations()(ConditionalAccessLocationsable) { + return m.locations +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessConditionSet) GetOdataType()(*string) { + return m.odataType +} +// GetPlatforms gets the platforms property value. Platforms included in and excluded from the policy. +func (m *ConditionalAccessConditionSet) GetPlatforms()(ConditionalAccessPlatformsable) { + return m.platforms +} +// GetServicePrincipalRiskLevels gets the servicePrincipalRiskLevels property value. Service principal risk levels included in the policy. Possible values are: low, medium, high, none, unknownFutureValue. +func (m *ConditionalAccessConditionSet) GetServicePrincipalRiskLevels()([]RiskLevel) { + return m.servicePrincipalRiskLevels +} +// GetSignInRiskLevels gets the signInRiskLevels property value. Sign-in risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. +func (m *ConditionalAccessConditionSet) GetSignInRiskLevels()([]RiskLevel) { + return m.signInRiskLevels +} +// GetUserRiskLevels gets the userRiskLevels property value. User risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. +func (m *ConditionalAccessConditionSet) GetUserRiskLevels()([]RiskLevel) { + return m.userRiskLevels +} +// GetUsers gets the users property value. Users, groups, and roles included in and excluded from the policy. Either users or clientApplications is required. +func (m *ConditionalAccessConditionSet) GetUsers()(ConditionalAccessUsersable) { + return m.users +} +// Serialize serializes information the current object +func (m *ConditionalAccessConditionSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applications", m.GetApplications()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("clientApplications", m.GetClientApplications()) + if err != nil { + return err + } + } + if m.GetClientAppTypes() != nil { + err := writer.WriteCollectionOfStringValues("clientAppTypes", SerializeConditionalAccessClientApp(m.GetClientAppTypes())) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("devices", m.GetDevices()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("deviceStates", m.GetDeviceStates()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("locations", m.GetLocations()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("platforms", m.GetPlatforms()) + if err != nil { + return err + } + } + if m.GetServicePrincipalRiskLevels() != nil { + err := writer.WriteCollectionOfStringValues("servicePrincipalRiskLevels", SerializeRiskLevel(m.GetServicePrincipalRiskLevels())) + if err != nil { + return err + } + } + if m.GetSignInRiskLevels() != nil { + err := writer.WriteCollectionOfStringValues("signInRiskLevels", SerializeRiskLevel(m.GetSignInRiskLevels())) + if err != nil { + return err + } + } + if m.GetUserRiskLevels() != nil { + err := writer.WriteCollectionOfStringValues("userRiskLevels", SerializeRiskLevel(m.GetUserRiskLevels())) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("users", m.GetUsers()) + 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 *ConditionalAccessConditionSet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplications sets the applications property value. Applications and user actions included in and excluded from the policy. Required. +func (m *ConditionalAccessConditionSet) SetApplications(value ConditionalAccessApplicationsable)() { + m.applications = value +} +// SetClientApplications sets the clientApplications property value. Client applications (service principals and workload identities) included in and excluded from the policy. Either users or clientApplications is required. +func (m *ConditionalAccessConditionSet) SetClientApplications(value ConditionalAccessClientApplicationsable)() { + m.clientApplications = value +} +// SetClientAppTypes sets the clientAppTypes property value. Client application types included in the policy. Possible values are: all, browser, mobileAppsAndDesktopClients, exchangeActiveSync, easSupported, other. Required. +func (m *ConditionalAccessConditionSet) SetClientAppTypes(value []ConditionalAccessClientApp)() { + m.clientAppTypes = value +} +// SetDevices sets the devices property value. Devices in the policy. +func (m *ConditionalAccessConditionSet) SetDevices(value ConditionalAccessDevicesable)() { + m.devices = value +} +// SetDeviceStates sets the deviceStates property value. Device states in the policy. +func (m *ConditionalAccessConditionSet) SetDeviceStates(value ConditionalAccessDeviceStatesable)() { + m.deviceStates = value +} +// SetLocations sets the locations property value. Locations included in and excluded from the policy. +func (m *ConditionalAccessConditionSet) SetLocations(value ConditionalAccessLocationsable)() { + m.locations = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessConditionSet) SetOdataType(value *string)() { + m.odataType = value +} +// SetPlatforms sets the platforms property value. Platforms included in and excluded from the policy. +func (m *ConditionalAccessConditionSet) SetPlatforms(value ConditionalAccessPlatformsable)() { + m.platforms = value +} +// SetServicePrincipalRiskLevels sets the servicePrincipalRiskLevels property value. Service principal risk levels included in the policy. Possible values are: low, medium, high, none, unknownFutureValue. +func (m *ConditionalAccessConditionSet) SetServicePrincipalRiskLevels(value []RiskLevel)() { + m.servicePrincipalRiskLevels = value +} +// SetSignInRiskLevels sets the signInRiskLevels property value. Sign-in risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. +func (m *ConditionalAccessConditionSet) SetSignInRiskLevels(value []RiskLevel)() { + m.signInRiskLevels = value +} +// SetUserRiskLevels sets the userRiskLevels property value. User risk levels included in the policy. Possible values are: low, medium, high, hidden, none, unknownFutureValue. Required. +func (m *ConditionalAccessConditionSet) SetUserRiskLevels(value []RiskLevel)() { + m.userRiskLevels = value +} +// SetUsers sets the users property value. Users, groups, and roles included in and excluded from the policy. Either users or clientApplications is required. +func (m *ConditionalAccessConditionSet) SetUsers(value ConditionalAccessUsersable)() { + m.users = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_condition_setable.go b/src/internal/connector/graph/betasdk/models/conditional_access_condition_setable.go new file mode 100644 index 000000000..1c8bf8b27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_condition_setable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessConditionSetable +type ConditionalAccessConditionSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplications()(ConditionalAccessApplicationsable) + GetClientApplications()(ConditionalAccessClientApplicationsable) + GetClientAppTypes()([]ConditionalAccessClientApp) + GetDevices()(ConditionalAccessDevicesable) + GetDeviceStates()(ConditionalAccessDeviceStatesable) + GetLocations()(ConditionalAccessLocationsable) + GetOdataType()(*string) + GetPlatforms()(ConditionalAccessPlatformsable) + GetServicePrincipalRiskLevels()([]RiskLevel) + GetSignInRiskLevels()([]RiskLevel) + GetUserRiskLevels()([]RiskLevel) + GetUsers()(ConditionalAccessUsersable) + SetApplications(value ConditionalAccessApplicationsable)() + SetClientApplications(value ConditionalAccessClientApplicationsable)() + SetClientAppTypes(value []ConditionalAccessClientApp)() + SetDevices(value ConditionalAccessDevicesable)() + SetDeviceStates(value ConditionalAccessDeviceStatesable)() + SetLocations(value ConditionalAccessLocationsable)() + SetOdataType(value *string)() + SetPlatforms(value ConditionalAccessPlatformsable)() + SetServicePrincipalRiskLevels(value []RiskLevel)() + SetSignInRiskLevels(value []RiskLevel)() + SetUserRiskLevels(value []RiskLevel)() + SetUsers(value ConditionalAccessUsersable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_conditions.go b/src/internal/connector/graph/betasdk/models/conditional_access_conditions.go new file mode 100644 index 000000000..7817b9d92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_conditions.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessConditions int + +const ( + NONE_CONDITIONALACCESSCONDITIONS ConditionalAccessConditions = iota + APPLICATION_CONDITIONALACCESSCONDITIONS + USERS_CONDITIONALACCESSCONDITIONS + DEVICEPLATFORM_CONDITIONALACCESSCONDITIONS + LOCATION_CONDITIONALACCESSCONDITIONS + CLIENTTYPE_CONDITIONALACCESSCONDITIONS + SIGNINRISK_CONDITIONALACCESSCONDITIONS + USERRISK_CONDITIONALACCESSCONDITIONS + TIME_CONDITIONALACCESSCONDITIONS + DEVICESTATE_CONDITIONALACCESSCONDITIONS + CLIENT_CONDITIONALACCESSCONDITIONS + IPADDRESSSEENBYAZUREAD_CONDITIONALACCESSCONDITIONS + IPADDRESSSEENBYRESOURCEPROVIDER_CONDITIONALACCESSCONDITIONS + UNKNOWNFUTUREVALUE_CONDITIONALACCESSCONDITIONS + SERVICEPRINCIPALS_CONDITIONALACCESSCONDITIONS + SERVICEPRINCIPALRISK_CONDITIONALACCESSCONDITIONS +) + +func (i ConditionalAccessConditions) String() string { + return []string{"none", "application", "users", "devicePlatform", "location", "clientType", "signInRisk", "userRisk", "time", "deviceState", "client", "ipAddressSeenByAzureAD", "ipAddressSeenByResourceProvider", "unknownFutureValue", "servicePrincipals", "servicePrincipalRisk"}[i] +} +func ParseConditionalAccessConditions(v string) (interface{}, error) { + result := NONE_CONDITIONALACCESSCONDITIONS + switch v { + case "none": + result = NONE_CONDITIONALACCESSCONDITIONS + case "application": + result = APPLICATION_CONDITIONALACCESSCONDITIONS + case "users": + result = USERS_CONDITIONALACCESSCONDITIONS + case "devicePlatform": + result = DEVICEPLATFORM_CONDITIONALACCESSCONDITIONS + case "location": + result = LOCATION_CONDITIONALACCESSCONDITIONS + case "clientType": + result = CLIENTTYPE_CONDITIONALACCESSCONDITIONS + case "signInRisk": + result = SIGNINRISK_CONDITIONALACCESSCONDITIONS + case "userRisk": + result = USERRISK_CONDITIONALACCESSCONDITIONS + case "time": + result = TIME_CONDITIONALACCESSCONDITIONS + case "deviceState": + result = DEVICESTATE_CONDITIONALACCESSCONDITIONS + case "client": + result = CLIENT_CONDITIONALACCESSCONDITIONS + case "ipAddressSeenByAzureAD": + result = IPADDRESSSEENBYAZUREAD_CONDITIONALACCESSCONDITIONS + case "ipAddressSeenByResourceProvider": + result = IPADDRESSSEENBYRESOURCEPROVIDER_CONDITIONALACCESSCONDITIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSCONDITIONS + case "servicePrincipals": + result = SERVICEPRINCIPALS_CONDITIONALACCESSCONDITIONS + case "servicePrincipalRisk": + result = SERVICEPRINCIPALRISK_CONDITIONALACCESSCONDITIONS + default: + return 0, errors.New("Unknown ConditionalAccessConditions value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessConditions(values []ConditionalAccessConditions) []string { + 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/conditional_access_device_platform.go b/src/internal/connector/graph/betasdk/models/conditional_access_device_platform.go new file mode 100644 index 000000000..f26789ec0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_device_platform.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessDevicePlatform int + +const ( + ANDROID_CONDITIONALACCESSDEVICEPLATFORM ConditionalAccessDevicePlatform = iota + IOS_CONDITIONALACCESSDEVICEPLATFORM + WINDOWS_CONDITIONALACCESSDEVICEPLATFORM + WINDOWSPHONE_CONDITIONALACCESSDEVICEPLATFORM + MACOS_CONDITIONALACCESSDEVICEPLATFORM + ALL_CONDITIONALACCESSDEVICEPLATFORM + UNKNOWNFUTUREVALUE_CONDITIONALACCESSDEVICEPLATFORM + LINUX_CONDITIONALACCESSDEVICEPLATFORM +) + +func (i ConditionalAccessDevicePlatform) String() string { + return []string{"android", "iOS", "windows", "windowsPhone", "macOS", "all", "unknownFutureValue", "linux"}[i] +} +func ParseConditionalAccessDevicePlatform(v string) (interface{}, error) { + result := ANDROID_CONDITIONALACCESSDEVICEPLATFORM + switch v { + case "android": + result = ANDROID_CONDITIONALACCESSDEVICEPLATFORM + case "iOS": + result = IOS_CONDITIONALACCESSDEVICEPLATFORM + case "windows": + result = WINDOWS_CONDITIONALACCESSDEVICEPLATFORM + case "windowsPhone": + result = WINDOWSPHONE_CONDITIONALACCESSDEVICEPLATFORM + case "macOS": + result = MACOS_CONDITIONALACCESSDEVICEPLATFORM + case "all": + result = ALL_CONDITIONALACCESSDEVICEPLATFORM + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSDEVICEPLATFORM + case "linux": + result = LINUX_CONDITIONALACCESSDEVICEPLATFORM + default: + return 0, errors.New("Unknown ConditionalAccessDevicePlatform value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessDevicePlatform(values []ConditionalAccessDevicePlatform) []string { + 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/conditional_access_device_states.go b/src/internal/connector/graph/betasdk/models/conditional_access_device_states.go new file mode 100644 index 000000000..8510c3405 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_device_states.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessDeviceStates +type ConditionalAccessDeviceStates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. + excludeStates []string + // States in the scope of the policy. All is the only allowed value. + includeStates []string + // The OdataType property + odataType *string +} +// NewConditionalAccessDeviceStates instantiates a new conditionalAccessDeviceStates and sets the default values. +func NewConditionalAccessDeviceStates()(*ConditionalAccessDeviceStates) { + m := &ConditionalAccessDeviceStates{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessDeviceStatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessDeviceStatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessDeviceStates(), 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 *ConditionalAccessDeviceStates) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeStates gets the excludeStates property value. States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. +func (m *ConditionalAccessDeviceStates) GetExcludeStates()([]string) { + return m.excludeStates +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessDeviceStates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeStates(res) + } + return nil + } + res["includeStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeStates(res) + } + 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 + } + return res +} +// GetIncludeStates gets the includeStates property value. States in the scope of the policy. All is the only allowed value. +func (m *ConditionalAccessDeviceStates) GetIncludeStates()([]string) { + return m.includeStates +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessDeviceStates) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessDeviceStates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludeStates() != nil { + err := writer.WriteCollectionOfStringValues("excludeStates", m.GetExcludeStates()) + if err != nil { + return err + } + } + if m.GetIncludeStates() != nil { + err := writer.WriteCollectionOfStringValues("includeStates", m.GetIncludeStates()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessDeviceStates) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeStates sets the excludeStates property value. States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. +func (m *ConditionalAccessDeviceStates) SetExcludeStates(value []string)() { + m.excludeStates = value +} +// SetIncludeStates sets the includeStates property value. States in the scope of the policy. All is the only allowed value. +func (m *ConditionalAccessDeviceStates) SetIncludeStates(value []string)() { + m.includeStates = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessDeviceStates) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_device_statesable.go b/src/internal/connector/graph/betasdk/models/conditional_access_device_statesable.go new file mode 100644 index 000000000..913dd5976 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_device_statesable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessDeviceStatesable +type ConditionalAccessDeviceStatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeStates()([]string) + GetIncludeStates()([]string) + GetOdataType()(*string) + SetExcludeStates(value []string)() + SetIncludeStates(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_devices.go b/src/internal/connector/graph/betasdk/models/conditional_access_devices.go new file mode 100644 index 000000000..acccbfcaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_devices.go @@ -0,0 +1,217 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessDevices +type ConditionalAccessDevices struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Filter that defines the dynamic-device-syntax rule to include/exclude devices. A filter can use device properties (such as extension attributes) to include/exclude them. Cannot be set if includeDevices or excludeDevices is set. + deviceFilter ConditionalAccessFilterable + // States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. Cannot be set if deviceFIlter is set. + excludeDevices []string + // The excludeDeviceStates property + excludeDeviceStates []string + // States in the scope of the policy. All is the only allowed value. Cannot be set if deviceFIlter is set. + includeDevices []string + // The includeDeviceStates property + includeDeviceStates []string + // The OdataType property + odataType *string +} +// NewConditionalAccessDevices instantiates a new conditionalAccessDevices and sets the default values. +func NewConditionalAccessDevices()(*ConditionalAccessDevices) { + m := &ConditionalAccessDevices{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessDevicesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessDevicesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessDevices(), 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 *ConditionalAccessDevices) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceFilter gets the deviceFilter property value. Filter that defines the dynamic-device-syntax rule to include/exclude devices. A filter can use device properties (such as extension attributes) to include/exclude them. Cannot be set if includeDevices or excludeDevices is set. +func (m *ConditionalAccessDevices) GetDeviceFilter()(ConditionalAccessFilterable) { + return m.deviceFilter +} +// GetExcludeDevices gets the excludeDevices property value. States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. Cannot be set if deviceFIlter is set. +func (m *ConditionalAccessDevices) GetExcludeDevices()([]string) { + return m.excludeDevices +} +// GetExcludeDeviceStates gets the excludeDeviceStates property value. The excludeDeviceStates property +func (m *ConditionalAccessDevices) GetExcludeDeviceStates()([]string) { + return m.excludeDeviceStates +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessDevices) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceFilter(val.(ConditionalAccessFilterable)) + } + return nil + } + res["excludeDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeDevices(res) + } + return nil + } + res["excludeDeviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeDeviceStates(res) + } + return nil + } + res["includeDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeDevices(res) + } + return nil + } + res["includeDeviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeDeviceStates(res) + } + 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 + } + return res +} +// GetIncludeDevices gets the includeDevices property value. States in the scope of the policy. All is the only allowed value. Cannot be set if deviceFIlter is set. +func (m *ConditionalAccessDevices) GetIncludeDevices()([]string) { + return m.includeDevices +} +// GetIncludeDeviceStates gets the includeDeviceStates property value. The includeDeviceStates property +func (m *ConditionalAccessDevices) GetIncludeDeviceStates()([]string) { + return m.includeDeviceStates +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessDevices) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessDevices) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("deviceFilter", m.GetDeviceFilter()) + if err != nil { + return err + } + } + if m.GetExcludeDevices() != nil { + err := writer.WriteCollectionOfStringValues("excludeDevices", m.GetExcludeDevices()) + if err != nil { + return err + } + } + if m.GetExcludeDeviceStates() != nil { + err := writer.WriteCollectionOfStringValues("excludeDeviceStates", m.GetExcludeDeviceStates()) + if err != nil { + return err + } + } + if m.GetIncludeDevices() != nil { + err := writer.WriteCollectionOfStringValues("includeDevices", m.GetIncludeDevices()) + if err != nil { + return err + } + } + if m.GetIncludeDeviceStates() != nil { + err := writer.WriteCollectionOfStringValues("includeDeviceStates", m.GetIncludeDeviceStates()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessDevices) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceFilter sets the deviceFilter property value. Filter that defines the dynamic-device-syntax rule to include/exclude devices. A filter can use device properties (such as extension attributes) to include/exclude them. Cannot be set if includeDevices or excludeDevices is set. +func (m *ConditionalAccessDevices) SetDeviceFilter(value ConditionalAccessFilterable)() { + m.deviceFilter = value +} +// SetExcludeDevices sets the excludeDevices property value. States excluded from the scope of the policy. Possible values: Compliant, DomainJoined. Cannot be set if deviceFIlter is set. +func (m *ConditionalAccessDevices) SetExcludeDevices(value []string)() { + m.excludeDevices = value +} +// SetExcludeDeviceStates sets the excludeDeviceStates property value. The excludeDeviceStates property +func (m *ConditionalAccessDevices) SetExcludeDeviceStates(value []string)() { + m.excludeDeviceStates = value +} +// SetIncludeDevices sets the includeDevices property value. States in the scope of the policy. All is the only allowed value. Cannot be set if deviceFIlter is set. +func (m *ConditionalAccessDevices) SetIncludeDevices(value []string)() { + m.includeDevices = value +} +// SetIncludeDeviceStates sets the includeDeviceStates property value. The includeDeviceStates property +func (m *ConditionalAccessDevices) SetIncludeDeviceStates(value []string)() { + m.includeDeviceStates = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessDevices) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_devicesable.go b/src/internal/connector/graph/betasdk/models/conditional_access_devicesable.go new file mode 100644 index 000000000..89458cc91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_devicesable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessDevicesable +type ConditionalAccessDevicesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceFilter()(ConditionalAccessFilterable) + GetExcludeDevices()([]string) + GetExcludeDeviceStates()([]string) + GetIncludeDevices()([]string) + GetIncludeDeviceStates()([]string) + GetOdataType()(*string) + SetDeviceFilter(value ConditionalAccessFilterable)() + SetExcludeDevices(value []string)() + SetExcludeDeviceStates(value []string)() + SetIncludeDevices(value []string)() + SetIncludeDeviceStates(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenants.go b/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenants.go new file mode 100644 index 000000000..ba2c234ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenants.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessEnumeratedExternalTenants +type ConditionalAccessEnumeratedExternalTenants struct { + ConditionalAccessExternalTenants + // Represents a collection of tenant ids in the scope of Conditional Access for guests and external users policy targeting. + members []string +} +// NewConditionalAccessEnumeratedExternalTenants instantiates a new ConditionalAccessEnumeratedExternalTenants and sets the default values. +func NewConditionalAccessEnumeratedExternalTenants()(*ConditionalAccessEnumeratedExternalTenants) { + m := &ConditionalAccessEnumeratedExternalTenants{ + ConditionalAccessExternalTenants: *NewConditionalAccessExternalTenants(), + } + odataTypeValue := "#microsoft.graph.conditionalAccessEnumeratedExternalTenants"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateConditionalAccessEnumeratedExternalTenantsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessEnumeratedExternalTenantsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessEnumeratedExternalTenants(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessEnumeratedExternalTenants) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConditionalAccessExternalTenants.GetFieldDeserializers() + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. Represents a collection of tenant ids in the scope of Conditional Access for guests and external users policy targeting. +func (m *ConditionalAccessEnumeratedExternalTenants) GetMembers()([]string) { + return m.members +} +// Serialize serializes information the current object +func (m *ConditionalAccessEnumeratedExternalTenants) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConditionalAccessExternalTenants.Serialize(writer) + if err != nil { + return err + } + if m.GetMembers() != nil { + err = writer.WriteCollectionOfStringValues("members", m.GetMembers()) + if err != nil { + return err + } + } + return nil +} +// SetMembers sets the members property value. Represents a collection of tenant ids in the scope of Conditional Access for guests and external users policy targeting. +func (m *ConditionalAccessEnumeratedExternalTenants) SetMembers(value []string)() { + m.members = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenantsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenantsable.go new file mode 100644 index 000000000..5450d8026 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_enumerated_external_tenantsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessEnumeratedExternalTenantsable +type ConditionalAccessEnumeratedExternalTenantsable interface { + ConditionalAccessExternalTenantsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMembers()([]string) + SetMembers(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants.go b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants.go new file mode 100644 index 000000000..c66700550 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants.go @@ -0,0 +1,118 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessExternalTenants +type ConditionalAccessExternalTenants struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents the membership kind. The possible values are: all, enumerated, unknownFutureValue. enumerated references an object of conditionalAccessEnumeratedExternalTenants derived type. + membershipKind *ConditionalAccessExternalTenantsMembershipKind + // The OdataType property + odataType *string +} +// NewConditionalAccessExternalTenants instantiates a new conditionalAccessExternalTenants and sets the default values. +func NewConditionalAccessExternalTenants()(*ConditionalAccessExternalTenants) { + m := &ConditionalAccessExternalTenants{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessExternalTenantsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessExternalTenantsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.conditionalAccessAllExternalTenants": + return NewConditionalAccessAllExternalTenants(), nil + case "#microsoft.graph.conditionalAccessEnumeratedExternalTenants": + return NewConditionalAccessEnumeratedExternalTenants(), nil + } + } + } + } + return NewConditionalAccessExternalTenants(), 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 *ConditionalAccessExternalTenants) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessExternalTenants) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["membershipKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessExternalTenantsMembershipKind) + if err != nil { + return err + } + if val != nil { + m.SetMembershipKind(val.(*ConditionalAccessExternalTenantsMembershipKind)) + } + 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 + } + return res +} +// GetMembershipKind gets the membershipKind property value. Represents the membership kind. The possible values are: all, enumerated, unknownFutureValue. enumerated references an object of conditionalAccessEnumeratedExternalTenants derived type. +func (m *ConditionalAccessExternalTenants) GetMembershipKind()(*ConditionalAccessExternalTenantsMembershipKind) { + return m.membershipKind +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessExternalTenants) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessExternalTenants) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMembershipKind() != nil { + cast := (*m.GetMembershipKind()).String() + err := writer.WriteStringValue("membershipKind", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessExternalTenants) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMembershipKind sets the membershipKind property value. Represents the membership kind. The possible values are: all, enumerated, unknownFutureValue. enumerated references an object of conditionalAccessEnumeratedExternalTenants derived type. +func (m *ConditionalAccessExternalTenants) SetMembershipKind(value *ConditionalAccessExternalTenantsMembershipKind)() { + m.membershipKind = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessExternalTenants) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants_membership_kind.go b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants_membership_kind.go new file mode 100644 index 000000000..5222b0b20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenants_membership_kind.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessExternalTenantsMembershipKind int + +const ( + ALL_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND ConditionalAccessExternalTenantsMembershipKind = iota + ENUMERATED_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND + UNKNOWNFUTUREVALUE_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND +) + +func (i ConditionalAccessExternalTenantsMembershipKind) String() string { + return []string{"all", "enumerated", "unknownFutureValue"}[i] +} +func ParseConditionalAccessExternalTenantsMembershipKind(v string) (interface{}, error) { + result := ALL_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND + switch v { + case "all": + result = ALL_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND + case "enumerated": + result = ENUMERATED_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSEXTERNALTENANTSMEMBERSHIPKIND + default: + return 0, errors.New("Unknown ConditionalAccessExternalTenantsMembershipKind value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessExternalTenantsMembershipKind(values []ConditionalAccessExternalTenantsMembershipKind) []string { + 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/conditional_access_external_tenantsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenantsable.go new file mode 100644 index 000000000..515c043c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_external_tenantsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessExternalTenantsable +type ConditionalAccessExternalTenantsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMembershipKind()(*ConditionalAccessExternalTenantsMembershipKind) + GetOdataType()(*string) + SetMembershipKind(value *ConditionalAccessExternalTenantsMembershipKind)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_filter.go b/src/internal/connector/graph/betasdk/models/conditional_access_filter.go new file mode 100644 index 000000000..154d07ee7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_filter.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessFilter +type ConditionalAccessFilter 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 mode property + mode *FilterMode + // The OdataType property + odataType *string + // Rule syntax is similar to that used for membership rules for groups in Azure Active Directory. For details, see rules with multiple expressions + rule *string +} +// NewConditionalAccessFilter instantiates a new conditionalAccessFilter and sets the default values. +func NewConditionalAccessFilter()(*ConditionalAccessFilter) { + m := &ConditionalAccessFilter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessFilter(), 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 *ConditionalAccessFilter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFilterMode) + if err != nil { + return err + } + if val != nil { + m.SetMode(val.(*FilterMode)) + } + 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["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRule(val) + } + return nil + } + return res +} +// GetMode gets the mode property value. The mode property +func (m *ConditionalAccessFilter) GetMode()(*FilterMode) { + return m.mode +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessFilter) GetOdataType()(*string) { + return m.odataType +} +// GetRule gets the rule property value. Rule syntax is similar to that used for membership rules for groups in Azure Active Directory. For details, see rules with multiple expressions +func (m *ConditionalAccessFilter) GetRule()(*string) { + return m.rule +} +// Serialize serializes information the current object +func (m *ConditionalAccessFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMode() != nil { + cast := (*m.GetMode()).String() + err := writer.WriteStringValue("mode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rule", m.GetRule()) + 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 *ConditionalAccessFilter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMode sets the mode property value. The mode property +func (m *ConditionalAccessFilter) SetMode(value *FilterMode)() { + m.mode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessFilter) SetOdataType(value *string)() { + m.odataType = value +} +// SetRule sets the rule property value. Rule syntax is similar to that used for membership rules for groups in Azure Active Directory. For details, see rules with multiple expressions +func (m *ConditionalAccessFilter) SetRule(value *string)() { + m.rule = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_filterable.go b/src/internal/connector/graph/betasdk/models/conditional_access_filterable.go new file mode 100644 index 000000000..007b02db3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_filterable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessFilterable +type ConditionalAccessFilterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMode()(*FilterMode) + GetOdataType()(*string) + GetRule()(*string) + SetMode(value *FilterMode)() + SetOdataType(value *string)() + SetRule(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_grant_control.go b/src/internal/connector/graph/betasdk/models/conditional_access_grant_control.go new file mode 100644 index 000000000..e2e41c99f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_grant_control.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessGrantControl int + +const ( + BLOCK_CONDITIONALACCESSGRANTCONTROL ConditionalAccessGrantControl = iota + MFA_CONDITIONALACCESSGRANTCONTROL + COMPLIANTDEVICE_CONDITIONALACCESSGRANTCONTROL + DOMAINJOINEDDEVICE_CONDITIONALACCESSGRANTCONTROL + APPROVEDAPPLICATION_CONDITIONALACCESSGRANTCONTROL + COMPLIANTAPPLICATION_CONDITIONALACCESSGRANTCONTROL + PASSWORDCHANGE_CONDITIONALACCESSGRANTCONTROL + UNKNOWNFUTUREVALUE_CONDITIONALACCESSGRANTCONTROL +) + +func (i ConditionalAccessGrantControl) String() string { + return []string{"block", "mfa", "compliantDevice", "domainJoinedDevice", "approvedApplication", "compliantApplication", "passwordChange", "unknownFutureValue"}[i] +} +func ParseConditionalAccessGrantControl(v string) (interface{}, error) { + result := BLOCK_CONDITIONALACCESSGRANTCONTROL + switch v { + case "block": + result = BLOCK_CONDITIONALACCESSGRANTCONTROL + case "mfa": + result = MFA_CONDITIONALACCESSGRANTCONTROL + case "compliantDevice": + result = COMPLIANTDEVICE_CONDITIONALACCESSGRANTCONTROL + case "domainJoinedDevice": + result = DOMAINJOINEDDEVICE_CONDITIONALACCESSGRANTCONTROL + case "approvedApplication": + result = APPROVEDAPPLICATION_CONDITIONALACCESSGRANTCONTROL + case "compliantApplication": + result = COMPLIANTAPPLICATION_CONDITIONALACCESSGRANTCONTROL + case "passwordChange": + result = PASSWORDCHANGE_CONDITIONALACCESSGRANTCONTROL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSGRANTCONTROL + default: + return 0, errors.New("Unknown ConditionalAccessGrantControl value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessGrantControl(values []ConditionalAccessGrantControl) []string { + 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/conditional_access_grant_controls.go b/src/internal/connector/graph/betasdk/models/conditional_access_grant_controls.go new file mode 100644 index 000000000..5d1047797 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_grant_controls.go @@ -0,0 +1,213 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessGrantControls +type ConditionalAccessGrantControls 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 authenticationStrength property + authenticationStrength AuthenticationStrengthPolicyable + // List of values of built-in controls required by the policy. Possible values: block, mfa, compliantDevice, domainJoinedDevice, approvedApplication, compliantApplication, passwordChange, unknownFutureValue. + builtInControls []ConditionalAccessGrantControl + // List of custom controls IDs required by the policy. To learn more about custom control, see Custom controls (preview). + customAuthenticationFactors []string + // The OdataType property + odataType *string + // Defines the relationship of the grant controls. Possible values: AND, OR. + operator *string + // List of terms of use IDs required by the policy. + termsOfUse []string +} +// NewConditionalAccessGrantControls instantiates a new conditionalAccessGrantControls and sets the default values. +func NewConditionalAccessGrantControls()(*ConditionalAccessGrantControls) { + m := &ConditionalAccessGrantControls{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessGrantControlsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessGrantControlsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessGrantControls(), 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 *ConditionalAccessGrantControls) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationStrength gets the authenticationStrength property value. The authenticationStrength property +func (m *ConditionalAccessGrantControls) GetAuthenticationStrength()(AuthenticationStrengthPolicyable) { + return m.authenticationStrength +} +// GetBuiltInControls gets the builtInControls property value. List of values of built-in controls required by the policy. Possible values: block, mfa, compliantDevice, domainJoinedDevice, approvedApplication, compliantApplication, passwordChange, unknownFutureValue. +func (m *ConditionalAccessGrantControls) GetBuiltInControls()([]ConditionalAccessGrantControl) { + return m.builtInControls +} +// GetCustomAuthenticationFactors gets the customAuthenticationFactors property value. List of custom controls IDs required by the policy. To learn more about custom control, see Custom controls (preview). +func (m *ConditionalAccessGrantControls) GetCustomAuthenticationFactors()([]string) { + return m.customAuthenticationFactors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessGrantControls) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationStrength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationStrengthPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStrength(val.(AuthenticationStrengthPolicyable)) + } + return nil + } + res["builtInControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseConditionalAccessGrantControl) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessGrantControl, len(val)) + for i, v := range val { + res[i] = *(v.(*ConditionalAccessGrantControl)) + } + m.SetBuiltInControls(res) + } + return nil + } + res["customAuthenticationFactors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCustomAuthenticationFactors(res) + } + 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["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperator(val) + } + return nil + } + res["termsOfUse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTermsOfUse(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessGrantControls) GetOdataType()(*string) { + return m.odataType +} +// GetOperator gets the operator property value. Defines the relationship of the grant controls. Possible values: AND, OR. +func (m *ConditionalAccessGrantControls) GetOperator()(*string) { + return m.operator +} +// GetTermsOfUse gets the termsOfUse property value. List of terms of use IDs required by the policy. +func (m *ConditionalAccessGrantControls) GetTermsOfUse()([]string) { + return m.termsOfUse +} +// Serialize serializes information the current object +func (m *ConditionalAccessGrantControls) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("authenticationStrength", m.GetAuthenticationStrength()) + if err != nil { + return err + } + } + if m.GetBuiltInControls() != nil { + err := writer.WriteCollectionOfStringValues("builtInControls", SerializeConditionalAccessGrantControl(m.GetBuiltInControls())) + if err != nil { + return err + } + } + if m.GetCustomAuthenticationFactors() != nil { + err := writer.WriteCollectionOfStringValues("customAuthenticationFactors", m.GetCustomAuthenticationFactors()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operator", m.GetOperator()) + if err != nil { + return err + } + } + if m.GetTermsOfUse() != nil { + err := writer.WriteCollectionOfStringValues("termsOfUse", m.GetTermsOfUse()) + 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 *ConditionalAccessGrantControls) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationStrength sets the authenticationStrength property value. The authenticationStrength property +func (m *ConditionalAccessGrantControls) SetAuthenticationStrength(value AuthenticationStrengthPolicyable)() { + m.authenticationStrength = value +} +// SetBuiltInControls sets the builtInControls property value. List of values of built-in controls required by the policy. Possible values: block, mfa, compliantDevice, domainJoinedDevice, approvedApplication, compliantApplication, passwordChange, unknownFutureValue. +func (m *ConditionalAccessGrantControls) SetBuiltInControls(value []ConditionalAccessGrantControl)() { + m.builtInControls = value +} +// SetCustomAuthenticationFactors sets the customAuthenticationFactors property value. List of custom controls IDs required by the policy. To learn more about custom control, see Custom controls (preview). +func (m *ConditionalAccessGrantControls) SetCustomAuthenticationFactors(value []string)() { + m.customAuthenticationFactors = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessGrantControls) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperator sets the operator property value. Defines the relationship of the grant controls. Possible values: AND, OR. +func (m *ConditionalAccessGrantControls) SetOperator(value *string)() { + m.operator = value +} +// SetTermsOfUse sets the termsOfUse property value. List of terms of use IDs required by the policy. +func (m *ConditionalAccessGrantControls) SetTermsOfUse(value []string)() { + m.termsOfUse = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_grant_controlsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_grant_controlsable.go new file mode 100644 index 000000000..e547aecd2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_grant_controlsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessGrantControlsable +type ConditionalAccessGrantControlsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationStrength()(AuthenticationStrengthPolicyable) + GetBuiltInControls()([]ConditionalAccessGrantControl) + GetCustomAuthenticationFactors()([]string) + GetOdataType()(*string) + GetOperator()(*string) + GetTermsOfUse()([]string) + SetAuthenticationStrength(value AuthenticationStrengthPolicyable)() + SetBuiltInControls(value []ConditionalAccessGrantControl)() + SetCustomAuthenticationFactors(value []string)() + SetOdataType(value *string)() + SetOperator(value *string)() + SetTermsOfUse(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_guest_or_external_user_types.go b/src/internal/connector/graph/betasdk/models/conditional_access_guest_or_external_user_types.go new file mode 100644 index 000000000..82d25040f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_guest_or_external_user_types.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessGuestOrExternalUserTypes int + +const ( + NONE_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES ConditionalAccessGuestOrExternalUserTypes = iota + INTERNALGUEST_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + B2BCOLLABORATIONGUEST_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + B2BCOLLABORATIONMEMBER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + B2BDIRECTCONNECTUSER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + OTHEREXTERNALUSER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + SERVICEPROVIDER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + UNKNOWNFUTUREVALUE_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES +) + +func (i ConditionalAccessGuestOrExternalUserTypes) String() string { + return []string{"none", "internalGuest", "b2bCollaborationGuest", "b2bCollaborationMember", "b2bDirectConnectUser", "otherExternalUser", "serviceProvider", "unknownFutureValue"}[i] +} +func ParseConditionalAccessGuestOrExternalUserTypes(v string) (interface{}, error) { + result := NONE_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + switch v { + case "none": + result = NONE_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "internalGuest": + result = INTERNALGUEST_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "b2bCollaborationGuest": + result = B2BCOLLABORATIONGUEST_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "b2bCollaborationMember": + result = B2BCOLLABORATIONMEMBER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "b2bDirectConnectUser": + result = B2BDIRECTCONNECTUSER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "otherExternalUser": + result = OTHEREXTERNALUSER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "serviceProvider": + result = SERVICEPROVIDER_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSGUESTOREXTERNALUSERTYPES + default: + return 0, errors.New("Unknown ConditionalAccessGuestOrExternalUserTypes value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessGuestOrExternalUserTypes(values []ConditionalAccessGuestOrExternalUserTypes) []string { + 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/conditional_access_guests_or_external_users.go b/src/internal/connector/graph/betasdk/models/conditional_access_guests_or_external_users.go new file mode 100644 index 000000000..0d1dec314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_guests_or_external_users.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessGuestsOrExternalUsers +type ConditionalAccessGuestsOrExternalUsers 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 tenant ids of the selected types of external users. It could be either all b2b tenant, or a collection of tenant ids. External tenants can be specified only when guestOrExternalUserTypes is not null or an empty string. + externalTenants ConditionalAccessExternalTenantsable + // The guestOrExternalUserTypes property + guestOrExternalUserTypes *ConditionalAccessGuestOrExternalUserTypes + // The OdataType property + odataType *string +} +// NewConditionalAccessGuestsOrExternalUsers instantiates a new conditionalAccessGuestsOrExternalUsers and sets the default values. +func NewConditionalAccessGuestsOrExternalUsers()(*ConditionalAccessGuestsOrExternalUsers) { + m := &ConditionalAccessGuestsOrExternalUsers{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessGuestsOrExternalUsersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessGuestsOrExternalUsersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessGuestsOrExternalUsers(), 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 *ConditionalAccessGuestsOrExternalUsers) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalTenants gets the externalTenants property value. The tenant ids of the selected types of external users. It could be either all b2b tenant, or a collection of tenant ids. External tenants can be specified only when guestOrExternalUserTypes is not null or an empty string. +func (m *ConditionalAccessGuestsOrExternalUsers) GetExternalTenants()(ConditionalAccessExternalTenantsable) { + return m.externalTenants +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessGuestsOrExternalUsers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalTenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessExternalTenantsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExternalTenants(val.(ConditionalAccessExternalTenantsable)) + } + return nil + } + res["guestOrExternalUserTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessGuestOrExternalUserTypes) + if err != nil { + return err + } + if val != nil { + m.SetGuestOrExternalUserTypes(val.(*ConditionalAccessGuestOrExternalUserTypes)) + } + 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 + } + return res +} +// GetGuestOrExternalUserTypes gets the guestOrExternalUserTypes property value. The guestOrExternalUserTypes property +func (m *ConditionalAccessGuestsOrExternalUsers) GetGuestOrExternalUserTypes()(*ConditionalAccessGuestOrExternalUserTypes) { + return m.guestOrExternalUserTypes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessGuestsOrExternalUsers) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessGuestsOrExternalUsers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("externalTenants", m.GetExternalTenants()) + if err != nil { + return err + } + } + if m.GetGuestOrExternalUserTypes() != nil { + cast := (*m.GetGuestOrExternalUserTypes()).String() + err := writer.WriteStringValue("guestOrExternalUserTypes", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessGuestsOrExternalUsers) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalTenants sets the externalTenants property value. The tenant ids of the selected types of external users. It could be either all b2b tenant, or a collection of tenant ids. External tenants can be specified only when guestOrExternalUserTypes is not null or an empty string. +func (m *ConditionalAccessGuestsOrExternalUsers) SetExternalTenants(value ConditionalAccessExternalTenantsable)() { + m.externalTenants = value +} +// SetGuestOrExternalUserTypes sets the guestOrExternalUserTypes property value. The guestOrExternalUserTypes property +func (m *ConditionalAccessGuestsOrExternalUsers) SetGuestOrExternalUserTypes(value *ConditionalAccessGuestOrExternalUserTypes)() { + m.guestOrExternalUserTypes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessGuestsOrExternalUsers) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_guests_or_external_usersable.go b/src/internal/connector/graph/betasdk/models/conditional_access_guests_or_external_usersable.go new file mode 100644 index 000000000..dae07267e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_guests_or_external_usersable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessGuestsOrExternalUsersable +type ConditionalAccessGuestsOrExternalUsersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalTenants()(ConditionalAccessExternalTenantsable) + GetGuestOrExternalUserTypes()(*ConditionalAccessGuestOrExternalUserTypes) + GetOdataType()(*string) + SetExternalTenants(value ConditionalAccessExternalTenantsable)() + SetGuestOrExternalUserTypes(value *ConditionalAccessGuestOrExternalUserTypes)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_locations.go b/src/internal/connector/graph/betasdk/models/conditional_access_locations.go new file mode 100644 index 000000000..8c827977b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_locations.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessLocations +type ConditionalAccessLocations struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Location IDs excluded from scope of policy. + excludeLocations []string + // Location IDs in scope of policy unless explicitly excluded, All, or AllTrusted. + includeLocations []string + // The OdataType property + odataType *string +} +// NewConditionalAccessLocations instantiates a new conditionalAccessLocations and sets the default values. +func NewConditionalAccessLocations()(*ConditionalAccessLocations) { + m := &ConditionalAccessLocations{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessLocationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessLocationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessLocations(), 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 *ConditionalAccessLocations) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeLocations gets the excludeLocations property value. Location IDs excluded from scope of policy. +func (m *ConditionalAccessLocations) GetExcludeLocations()([]string) { + return m.excludeLocations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessLocations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeLocations(res) + } + return nil + } + res["includeLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeLocations(res) + } + 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 + } + return res +} +// GetIncludeLocations gets the includeLocations property value. Location IDs in scope of policy unless explicitly excluded, All, or AllTrusted. +func (m *ConditionalAccessLocations) GetIncludeLocations()([]string) { + return m.includeLocations +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessLocations) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessLocations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludeLocations() != nil { + err := writer.WriteCollectionOfStringValues("excludeLocations", m.GetExcludeLocations()) + if err != nil { + return err + } + } + if m.GetIncludeLocations() != nil { + err := writer.WriteCollectionOfStringValues("includeLocations", m.GetIncludeLocations()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessLocations) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeLocations sets the excludeLocations property value. Location IDs excluded from scope of policy. +func (m *ConditionalAccessLocations) SetExcludeLocations(value []string)() { + m.excludeLocations = value +} +// SetIncludeLocations sets the includeLocations property value. Location IDs in scope of policy unless explicitly excluded, All, or AllTrusted. +func (m *ConditionalAccessLocations) SetIncludeLocations(value []string)() { + m.includeLocations = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessLocations) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_locationsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_locationsable.go new file mode 100644 index 000000000..d6fc9272d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_locationsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessLocationsable +type ConditionalAccessLocationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeLocations()([]string) + GetIncludeLocations()([]string) + GetOdataType()(*string) + SetExcludeLocations(value []string)() + SetIncludeLocations(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_platforms.go b/src/internal/connector/graph/betasdk/models/conditional_access_platforms.go new file mode 100644 index 000000000..aaff738e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_platforms.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPlatforms +type ConditionalAccessPlatforms struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue, linux. + excludePlatforms []ConditionalAccessDevicePlatform + // Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue,linux``. + includePlatforms []ConditionalAccessDevicePlatform + // The OdataType property + odataType *string +} +// NewConditionalAccessPlatforms instantiates a new conditionalAccessPlatforms and sets the default values. +func NewConditionalAccessPlatforms()(*ConditionalAccessPlatforms) { + m := &ConditionalAccessPlatforms{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessPlatformsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPlatformsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPlatforms(), 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 *ConditionalAccessPlatforms) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludePlatforms gets the excludePlatforms property value. Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue, linux. +func (m *ConditionalAccessPlatforms) GetExcludePlatforms()([]ConditionalAccessDevicePlatform) { + return m.excludePlatforms +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPlatforms) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludePlatforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseConditionalAccessDevicePlatform) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessDevicePlatform, len(val)) + for i, v := range val { + res[i] = *(v.(*ConditionalAccessDevicePlatform)) + } + m.SetExcludePlatforms(res) + } + return nil + } + res["includePlatforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseConditionalAccessDevicePlatform) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessDevicePlatform, len(val)) + for i, v := range val { + res[i] = *(v.(*ConditionalAccessDevicePlatform)) + } + m.SetIncludePlatforms(res) + } + 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 + } + return res +} +// GetIncludePlatforms gets the includePlatforms property value. Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue,linux``. +func (m *ConditionalAccessPlatforms) GetIncludePlatforms()([]ConditionalAccessDevicePlatform) { + return m.includePlatforms +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessPlatforms) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessPlatforms) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludePlatforms() != nil { + err := writer.WriteCollectionOfStringValues("excludePlatforms", SerializeConditionalAccessDevicePlatform(m.GetExcludePlatforms())) + if err != nil { + return err + } + } + if m.GetIncludePlatforms() != nil { + err := writer.WriteCollectionOfStringValues("includePlatforms", SerializeConditionalAccessDevicePlatform(m.GetIncludePlatforms())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessPlatforms) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludePlatforms sets the excludePlatforms property value. Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue, linux. +func (m *ConditionalAccessPlatforms) SetExcludePlatforms(value []ConditionalAccessDevicePlatform)() { + m.excludePlatforms = value +} +// SetIncludePlatforms sets the includePlatforms property value. Possible values are: android, iOS, windows, windowsPhone, macOS, all, unknownFutureValue,linux``. +func (m *ConditionalAccessPlatforms) SetIncludePlatforms(value []ConditionalAccessDevicePlatform)() { + m.includePlatforms = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessPlatforms) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_platformsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_platformsable.go new file mode 100644 index 000000000..eba4908be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_platformsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPlatformsable +type ConditionalAccessPlatformsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludePlatforms()([]ConditionalAccessDevicePlatform) + GetIncludePlatforms()([]ConditionalAccessDevicePlatform) + GetOdataType()(*string) + SetExcludePlatforms(value []ConditionalAccessDevicePlatform)() + SetIncludePlatforms(value []ConditionalAccessDevicePlatform)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy.go new file mode 100644 index 000000000..a1d4efa68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessPolicy struct { + Entity + // The conditions property + conditions ConditionalAccessConditionSetable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Not used. + description *string + // Specifies a display name for the conditionalAccessPolicy object. + displayName *string + // Specifies the grant controls that must be fulfilled to pass the policy. + grantControls ConditionalAccessGrantControlsable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the session controls that are enforced after sign-in. + sessionControls ConditionalAccessSessionControlsable + // The state property + state *ConditionalAccessPolicyState +} +// NewConditionalAccessPolicy instantiates a new conditionalAccessPolicy and sets the default values. +func NewConditionalAccessPolicy()(*ConditionalAccessPolicy) { + m := &ConditionalAccessPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateConditionalAccessPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPolicy(), nil +} +// GetConditions gets the conditions property value. The conditions property +func (m *ConditionalAccessPolicy) GetConditions()(ConditionalAccessConditionSetable) { + return m.conditions +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. +func (m *ConditionalAccessPolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Not used. +func (m *ConditionalAccessPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Specifies a display name for the conditionalAccessPolicy object. +func (m *ConditionalAccessPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(ConditionalAccessConditionSetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["grantControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessGrantControlsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrantControls(val.(ConditionalAccessGrantControlsable)) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["sessionControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessSessionControlsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSessionControls(val.(ConditionalAccessSessionControlsable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessPolicyState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ConditionalAccessPolicyState)) + } + return nil + } + return res +} +// GetGrantControls gets the grantControls property value. Specifies the grant controls that must be fulfilled to pass the policy. +func (m *ConditionalAccessPolicy) GetGrantControls()(ConditionalAccessGrantControlsable) { + return m.grantControls +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. +func (m *ConditionalAccessPolicy) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetSessionControls gets the sessionControls property value. Specifies the session controls that are enforced after sign-in. +func (m *ConditionalAccessPolicy) GetSessionControls()(ConditionalAccessSessionControlsable) { + return m.sessionControls +} +// GetState gets the state property value. The state property +func (m *ConditionalAccessPolicy) GetState()(*ConditionalAccessPolicyState) { + return m.state +} +// Serialize serializes information the current object +func (m *ConditionalAccessPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("grantControls", m.GetGrantControls()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sessionControls", m.GetSessionControls()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConditions sets the conditions property value. The conditions property +func (m *ConditionalAccessPolicy) SetConditions(value ConditionalAccessConditionSetable)() { + m.conditions = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. +func (m *ConditionalAccessPolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Not used. +func (m *ConditionalAccessPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Specifies a display name for the conditionalAccessPolicy object. +func (m *ConditionalAccessPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGrantControls sets the grantControls property value. Specifies the grant controls that must be fulfilled to pass the policy. +func (m *ConditionalAccessPolicy) SetGrantControls(value ConditionalAccessGrantControlsable)() { + m.grantControls = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Readonly. +func (m *ConditionalAccessPolicy) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetSessionControls sets the sessionControls property value. Specifies the session controls that are enforced after sign-in. +func (m *ConditionalAccessPolicy) SetSessionControls(value ConditionalAccessSessionControlsable)() { + m.sessionControls = value +} +// SetState sets the state property value. The state property +func (m *ConditionalAccessPolicy) SetState(value *ConditionalAccessPolicyState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_response.go new file mode 100644 index 000000000..243228069 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicyCollectionResponse +type ConditionalAccessPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConditionalAccessPolicyable +} +// NewConditionalAccessPolicyCollectionResponse instantiates a new ConditionalAccessPolicyCollectionResponse and sets the default values. +func NewConditionalAccessPolicyCollectionResponse()(*ConditionalAccessPolicyCollectionResponse) { + m := &ConditionalAccessPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConditionalAccessPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConditionalAccessPolicyCollectionResponse) GetValue()([]ConditionalAccessPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConditionalAccessPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConditionalAccessPolicyCollectionResponse) SetValue(value []ConditionalAccessPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_responseable.go new file mode 100644 index 000000000..4fe88e246 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicyCollectionResponseable +type ConditionalAccessPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConditionalAccessPolicyable) + SetValue(value []ConditionalAccessPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy_detail.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy_detail.go new file mode 100644 index 000000000..f9c0067f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy_detail.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicyDetail +type ConditionalAccessPolicyDetail 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 conditions property + conditions ConditionalAccessConditionSetable + // Represents grant controls that must be fulfilled for the policy. + grantControls ConditionalAccessGrantControlsable + // The OdataType property + odataType *string + // Represents a complex type of session controls that is enforced after sign-in. + sessionControls ConditionalAccessSessionControlsable +} +// NewConditionalAccessPolicyDetail instantiates a new conditionalAccessPolicyDetail and sets the default values. +func NewConditionalAccessPolicyDetail()(*ConditionalAccessPolicyDetail) { + m := &ConditionalAccessPolicyDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessPolicyDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPolicyDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPolicyDetail(), 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 *ConditionalAccessPolicyDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConditions gets the conditions property value. The conditions property +func (m *ConditionalAccessPolicyDetail) GetConditions()(ConditionalAccessConditionSetable) { + return m.conditions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPolicyDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(ConditionalAccessConditionSetable)) + } + return nil + } + res["grantControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessGrantControlsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrantControls(val.(ConditionalAccessGrantControlsable)) + } + 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["sessionControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessSessionControlsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSessionControls(val.(ConditionalAccessSessionControlsable)) + } + return nil + } + return res +} +// GetGrantControls gets the grantControls property value. Represents grant controls that must be fulfilled for the policy. +func (m *ConditionalAccessPolicyDetail) GetGrantControls()(ConditionalAccessGrantControlsable) { + return m.grantControls +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessPolicyDetail) GetOdataType()(*string) { + return m.odataType +} +// GetSessionControls gets the sessionControls property value. Represents a complex type of session controls that is enforced after sign-in. +func (m *ConditionalAccessPolicyDetail) GetSessionControls()(ConditionalAccessSessionControlsable) { + return m.sessionControls +} +// Serialize serializes information the current object +func (m *ConditionalAccessPolicyDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("grantControls", m.GetGrantControls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sessionControls", m.GetSessionControls()) + 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 *ConditionalAccessPolicyDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConditions sets the conditions property value. The conditions property +func (m *ConditionalAccessPolicyDetail) SetConditions(value ConditionalAccessConditionSetable)() { + m.conditions = value +} +// SetGrantControls sets the grantControls property value. Represents grant controls that must be fulfilled for the policy. +func (m *ConditionalAccessPolicyDetail) SetGrantControls(value ConditionalAccessGrantControlsable)() { + m.grantControls = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessPolicyDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetSessionControls sets the sessionControls property value. Represents a complex type of session controls that is enforced after sign-in. +func (m *ConditionalAccessPolicyDetail) SetSessionControls(value ConditionalAccessSessionControlsable)() { + m.sessionControls = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy_detailable.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy_detailable.go new file mode 100644 index 000000000..8293b03df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy_detailable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicyDetailable +type ConditionalAccessPolicyDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConditions()(ConditionalAccessConditionSetable) + GetGrantControls()(ConditionalAccessGrantControlsable) + GetOdataType()(*string) + GetSessionControls()(ConditionalAccessSessionControlsable) + SetConditions(value ConditionalAccessConditionSetable)() + SetGrantControls(value ConditionalAccessGrantControlsable)() + SetOdataType(value *string)() + SetSessionControls(value ConditionalAccessSessionControlsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_policy_state.go b/src/internal/connector/graph/betasdk/models/conditional_access_policy_state.go new file mode 100644 index 000000000..dcf7ab8fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policy_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessPolicyState int + +const ( + ENABLED_CONDITIONALACCESSPOLICYSTATE ConditionalAccessPolicyState = iota + DISABLED_CONDITIONALACCESSPOLICYSTATE + ENABLEDFORREPORTINGBUTNOTENFORCED_CONDITIONALACCESSPOLICYSTATE +) + +func (i ConditionalAccessPolicyState) String() string { + return []string{"enabled", "disabled", "enabledForReportingButNotEnforced"}[i] +} +func ParseConditionalAccessPolicyState(v string) (interface{}, error) { + result := ENABLED_CONDITIONALACCESSPOLICYSTATE + switch v { + case "enabled": + result = ENABLED_CONDITIONALACCESSPOLICYSTATE + case "disabled": + result = DISABLED_CONDITIONALACCESSPOLICYSTATE + case "enabledForReportingButNotEnforced": + result = ENABLEDFORREPORTINGBUTNOTENFORCED_CONDITIONALACCESSPOLICYSTATE + default: + return 0, errors.New("Unknown ConditionalAccessPolicyState value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessPolicyState(values []ConditionalAccessPolicyState) []string { + 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/conditional_access_policyable.go b/src/internal/connector/graph/betasdk/models/conditional_access_policyable.go new file mode 100644 index 000000000..e2771d569 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_policyable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessPolicyable +type ConditionalAccessPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConditions()(ConditionalAccessConditionSetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetGrantControls()(ConditionalAccessGrantControlsable) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSessionControls()(ConditionalAccessSessionControlsable) + GetState()(*ConditionalAccessPolicyState) + SetConditions(value ConditionalAccessConditionSetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetGrantControls(value ConditionalAccessGrantControlsable)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSessionControls(value ConditionalAccessSessionControlsable)() + SetState(value *ConditionalAccessPolicyState)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_root.go b/src/internal/connector/graph/betasdk/models/conditional_access_root.go new file mode 100644 index 000000000..05f4f620e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_root.go @@ -0,0 +1,196 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRoot +type ConditionalAccessRoot struct { + Entity + // Read-only. Nullable. Returns a collection of the specified authentication context class references. + authenticationContextClassReferences []AuthenticationContextClassReferenceable + // Defines the authentication strength policies, valid authentication method combinations, and authentication method mode details that can be required by a conditional access policy . + authenticationStrengths AuthenticationStrengthRootable + // Read-only. Nullable. Returns a collection of the specified named locations. + namedLocations []NamedLocationable + // Read-only. Nullable. Returns a collection of the specified Conditional Access policies. + policies []ConditionalAccessPolicyable + // Read-only. Nullable. Returns a collection of the specified Conditional Access templates. + templates []ConditionalAccessTemplateable +} +// NewConditionalAccessRoot instantiates a new ConditionalAccessRoot and sets the default values. +func NewConditionalAccessRoot()(*ConditionalAccessRoot) { + m := &ConditionalAccessRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateConditionalAccessRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessRoot(), nil +} +// GetAuthenticationContextClassReferences gets the authenticationContextClassReferences property value. Read-only. Nullable. Returns a collection of the specified authentication context class references. +func (m *ConditionalAccessRoot) GetAuthenticationContextClassReferences()([]AuthenticationContextClassReferenceable) { + return m.authenticationContextClassReferences +} +// GetAuthenticationStrengths gets the authenticationStrengths property value. Defines the authentication strength policies, valid authentication method combinations, and authentication method mode details that can be required by a conditional access policy . +func (m *ConditionalAccessRoot) GetAuthenticationStrengths()(AuthenticationStrengthRootable) { + return m.authenticationStrengths +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationContextClassReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationContextClassReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationContextClassReferenceable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationContextClassReferenceable) + } + m.SetAuthenticationContextClassReferences(res) + } + return nil + } + res["authenticationStrengths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationStrengthRootFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationStrengths(val.(AuthenticationStrengthRootable)) + } + return nil + } + res["namedLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNamedLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NamedLocationable, len(val)) + for i, v := range val { + res[i] = v.(NamedLocationable) + } + m.SetNamedLocations(res) + } + return nil + } + res["policies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessPolicyable) + } + m.SetPolicies(res) + } + return nil + } + res["templates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessTemplateable) + } + m.SetTemplates(res) + } + return nil + } + return res +} +// GetNamedLocations gets the namedLocations property value. Read-only. Nullable. Returns a collection of the specified named locations. +func (m *ConditionalAccessRoot) GetNamedLocations()([]NamedLocationable) { + return m.namedLocations +} +// GetPolicies gets the policies property value. Read-only. Nullable. Returns a collection of the specified Conditional Access policies. +func (m *ConditionalAccessRoot) GetPolicies()([]ConditionalAccessPolicyable) { + return m.policies +} +// GetTemplates gets the templates property value. Read-only. Nullable. Returns a collection of the specified Conditional Access templates. +func (m *ConditionalAccessRoot) GetTemplates()([]ConditionalAccessTemplateable) { + return m.templates +} +// Serialize serializes information the current object +func (m *ConditionalAccessRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationContextClassReferences() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuthenticationContextClassReferences())) + for i, v := range m.GetAuthenticationContextClassReferences() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("authenticationContextClassReferences", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("authenticationStrengths", m.GetAuthenticationStrengths()) + if err != nil { + return err + } + } + if m.GetNamedLocations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNamedLocations())) + for i, v := range m.GetNamedLocations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("namedLocations", cast) + if err != nil { + return err + } + } + if m.GetPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicies())) + for i, v := range m.GetPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policies", cast) + if err != nil { + return err + } + } + if m.GetTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTemplates())) + for i, v := range m.GetTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("templates", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationContextClassReferences sets the authenticationContextClassReferences property value. Read-only. Nullable. Returns a collection of the specified authentication context class references. +func (m *ConditionalAccessRoot) SetAuthenticationContextClassReferences(value []AuthenticationContextClassReferenceable)() { + m.authenticationContextClassReferences = value +} +// SetAuthenticationStrengths sets the authenticationStrengths property value. Defines the authentication strength policies, valid authentication method combinations, and authentication method mode details that can be required by a conditional access policy . +func (m *ConditionalAccessRoot) SetAuthenticationStrengths(value AuthenticationStrengthRootable)() { + m.authenticationStrengths = value +} +// SetNamedLocations sets the namedLocations property value. Read-only. Nullable. Returns a collection of the specified named locations. +func (m *ConditionalAccessRoot) SetNamedLocations(value []NamedLocationable)() { + m.namedLocations = value +} +// SetPolicies sets the policies property value. Read-only. Nullable. Returns a collection of the specified Conditional Access policies. +func (m *ConditionalAccessRoot) SetPolicies(value []ConditionalAccessPolicyable)() { + m.policies = value +} +// SetTemplates sets the templates property value. Read-only. Nullable. Returns a collection of the specified Conditional Access templates. +func (m *ConditionalAccessRoot) SetTemplates(value []ConditionalAccessTemplateable)() { + m.templates = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_rootable.go b/src/internal/connector/graph/betasdk/models/conditional_access_rootable.go new file mode 100644 index 000000000..2402dff14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rootable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRootable +type ConditionalAccessRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationContextClassReferences()([]AuthenticationContextClassReferenceable) + GetAuthenticationStrengths()(AuthenticationStrengthRootable) + GetNamedLocations()([]NamedLocationable) + GetPolicies()([]ConditionalAccessPolicyable) + GetTemplates()([]ConditionalAccessTemplateable) + SetAuthenticationContextClassReferences(value []AuthenticationContextClassReferenceable)() + SetAuthenticationStrengths(value AuthenticationStrengthRootable)() + SetNamedLocations(value []NamedLocationable)() + SetPolicies(value []ConditionalAccessPolicyable)() + SetTemplates(value []ConditionalAccessTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_rule.go b/src/internal/connector/graph/betasdk/models/conditional_access_rule.go new file mode 100644 index 000000000..fa42f1a98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rule.go @@ -0,0 +1,97 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessRule int + +const ( + ALLAPPS_CONDITIONALACCESSRULE ConditionalAccessRule = iota + FIRSTPARTYAPPS_CONDITIONALACCESSRULE + OFFICE365_CONDITIONALACCESSRULE + APPID_CONDITIONALACCESSRULE + ACR_CONDITIONALACCESSRULE + APPFILTER_CONDITIONALACCESSRULE + ALLUSERS_CONDITIONALACCESSRULE + GUEST_CONDITIONALACCESSRULE + GROUPID_CONDITIONALACCESSRULE + ROLEID_CONDITIONALACCESSRULE + USERID_CONDITIONALACCESSRULE + ALLDEVICEPLATFORMS_CONDITIONALACCESSRULE + DEVICEPLATFORM_CONDITIONALACCESSRULE + ALLLOCATIONS_CONDITIONALACCESSRULE + INSIDECORPNET_CONDITIONALACCESSRULE + ALLTRUSTEDLOCATIONS_CONDITIONALACCESSRULE + LOCATIONID_CONDITIONALACCESSRULE + ALLDEVICES_CONDITIONALACCESSRULE + DEVICEFILTER_CONDITIONALACCESSRULE + DEVICESTATE_CONDITIONALACCESSRULE + UNKNOWNFUTUREVALUE_CONDITIONALACCESSRULE + DEVICEFILTERINCLUDERULENOTMATCHED_CONDITIONALACCESSRULE + ALLDEVICESTATES_CONDITIONALACCESSRULE +) + +func (i ConditionalAccessRule) String() string { + return []string{"allApps", "firstPartyApps", "office365", "appId", "acr", "appFilter", "allUsers", "guest", "groupId", "roleId", "userId", "allDevicePlatforms", "devicePlatform", "allLocations", "insideCorpnet", "allTrustedLocations", "locationId", "allDevices", "deviceFilter", "deviceState", "unknownFutureValue", "deviceFilterIncludeRuleNotMatched", "allDeviceStates"}[i] +} +func ParseConditionalAccessRule(v string) (interface{}, error) { + result := ALLAPPS_CONDITIONALACCESSRULE + switch v { + case "allApps": + result = ALLAPPS_CONDITIONALACCESSRULE + case "firstPartyApps": + result = FIRSTPARTYAPPS_CONDITIONALACCESSRULE + case "office365": + result = OFFICE365_CONDITIONALACCESSRULE + case "appId": + result = APPID_CONDITIONALACCESSRULE + case "acr": + result = ACR_CONDITIONALACCESSRULE + case "appFilter": + result = APPFILTER_CONDITIONALACCESSRULE + case "allUsers": + result = ALLUSERS_CONDITIONALACCESSRULE + case "guest": + result = GUEST_CONDITIONALACCESSRULE + case "groupId": + result = GROUPID_CONDITIONALACCESSRULE + case "roleId": + result = ROLEID_CONDITIONALACCESSRULE + case "userId": + result = USERID_CONDITIONALACCESSRULE + case "allDevicePlatforms": + result = ALLDEVICEPLATFORMS_CONDITIONALACCESSRULE + case "devicePlatform": + result = DEVICEPLATFORM_CONDITIONALACCESSRULE + case "allLocations": + result = ALLLOCATIONS_CONDITIONALACCESSRULE + case "insideCorpnet": + result = INSIDECORPNET_CONDITIONALACCESSRULE + case "allTrustedLocations": + result = ALLTRUSTEDLOCATIONS_CONDITIONALACCESSRULE + case "locationId": + result = LOCATIONID_CONDITIONALACCESSRULE + case "allDevices": + result = ALLDEVICES_CONDITIONALACCESSRULE + case "deviceFilter": + result = DEVICEFILTER_CONDITIONALACCESSRULE + case "deviceState": + result = DEVICESTATE_CONDITIONALACCESSRULE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSRULE + case "deviceFilterIncludeRuleNotMatched": + result = DEVICEFILTERINCLUDERULENOTMATCHED_CONDITIONALACCESSRULE + case "allDeviceStates": + result = ALLDEVICESTATES_CONDITIONALACCESSRULE + default: + return 0, errors.New("Unknown ConditionalAccessRule value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessRule(values []ConditionalAccessRule) []string { + 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/conditional_access_rule_satisfied.go b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied.go new file mode 100644 index 000000000..4f4508e2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRuleSatisfied +type ConditionalAccessRuleSatisfied struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client, ipAddressSeenByAzureAD, ipAddressSeenByResourceProvider, unknownFutureValue, servicePrincipals, servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals, servicePrincipalRisk. + conditionalAccessCondition *ConditionalAccessConditions + // The OdataType property + odataType *string + // Refers to the conditional access policy conditions that were satisfied. The possible values are: allApps, firstPartyApps, office365, appId, acr, appFilter, allUsers, guest, groupId, roleId, userId, allDevicePlatforms, devicePlatform, allLocations, insideCorpnet, allTrustedLocations, locationId, allDevices, deviceFilter, deviceState, unknownFutureValue, deviceFilterIncludeRuleNotMatched, allDeviceStates, anonymizedIPAddress, unfamiliarFeatures, nationStateIPAddress, realTimeThreatIntelligence, internalGuest, b2bCollaborationGuest, b2bCollaborationMember, b2bDirectConnectUser, otherExternalUser, serviceProvider. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: deviceFilterIncludeRuleNotMatched, allDeviceStates. + ruleSatisfied *ConditionalAccessRule +} +// NewConditionalAccessRuleSatisfied instantiates a new conditionalAccessRuleSatisfied and sets the default values. +func NewConditionalAccessRuleSatisfied()(*ConditionalAccessRuleSatisfied) { + m := &ConditionalAccessRuleSatisfied{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessRuleSatisfiedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessRuleSatisfiedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessRuleSatisfied(), 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 *ConditionalAccessRuleSatisfied) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConditionalAccessCondition gets the conditionalAccessCondition property value. Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client, ipAddressSeenByAzureAD, ipAddressSeenByResourceProvider, unknownFutureValue, servicePrincipals, servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals, servicePrincipalRisk. +func (m *ConditionalAccessRuleSatisfied) GetConditionalAccessCondition()(*ConditionalAccessConditions) { + return m.conditionalAccessCondition +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessRuleSatisfied) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["conditionalAccessCondition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessConditions) + if err != nil { + return err + } + if val != nil { + m.SetConditionalAccessCondition(val.(*ConditionalAccessConditions)) + } + 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["ruleSatisfied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConditionalAccessRule) + if err != nil { + return err + } + if val != nil { + m.SetRuleSatisfied(val.(*ConditionalAccessRule)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessRuleSatisfied) GetOdataType()(*string) { + return m.odataType +} +// GetRuleSatisfied gets the ruleSatisfied property value. Refers to the conditional access policy conditions that were satisfied. The possible values are: allApps, firstPartyApps, office365, appId, acr, appFilter, allUsers, guest, groupId, roleId, userId, allDevicePlatforms, devicePlatform, allLocations, insideCorpnet, allTrustedLocations, locationId, allDevices, deviceFilter, deviceState, unknownFutureValue, deviceFilterIncludeRuleNotMatched, allDeviceStates, anonymizedIPAddress, unfamiliarFeatures, nationStateIPAddress, realTimeThreatIntelligence, internalGuest, b2bCollaborationGuest, b2bCollaborationMember, b2bDirectConnectUser, otherExternalUser, serviceProvider. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: deviceFilterIncludeRuleNotMatched, allDeviceStates. +func (m *ConditionalAccessRuleSatisfied) GetRuleSatisfied()(*ConditionalAccessRule) { + return m.ruleSatisfied +} +// Serialize serializes information the current object +func (m *ConditionalAccessRuleSatisfied) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConditionalAccessCondition() != nil { + cast := (*m.GetConditionalAccessCondition()).String() + err := writer.WriteStringValue("conditionalAccessCondition", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRuleSatisfied() != nil { + cast := (*m.GetRuleSatisfied()).String() + err := writer.WriteStringValue("ruleSatisfied", &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 *ConditionalAccessRuleSatisfied) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConditionalAccessCondition sets the conditionalAccessCondition property value. Refers to the conditional access policy conditions that are satisfied. The possible values are: none, application, users, devicePlatform, location, clientType, signInRisk, userRisk, time, deviceState, client, ipAddressSeenByAzureAD, ipAddressSeenByResourceProvider, unknownFutureValue, servicePrincipals, servicePrincipalRisk. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: servicePrincipals, servicePrincipalRisk. +func (m *ConditionalAccessRuleSatisfied) SetConditionalAccessCondition(value *ConditionalAccessConditions)() { + m.conditionalAccessCondition = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessRuleSatisfied) SetOdataType(value *string)() { + m.odataType = value +} +// SetRuleSatisfied sets the ruleSatisfied property value. Refers to the conditional access policy conditions that were satisfied. The possible values are: allApps, firstPartyApps, office365, appId, acr, appFilter, allUsers, guest, groupId, roleId, userId, allDevicePlatforms, devicePlatform, allLocations, insideCorpnet, allTrustedLocations, locationId, allDevices, deviceFilter, deviceState, unknownFutureValue, deviceFilterIncludeRuleNotMatched, allDeviceStates, anonymizedIPAddress, unfamiliarFeatures, nationStateIPAddress, realTimeThreatIntelligence, internalGuest, b2bCollaborationGuest, b2bCollaborationMember, b2bDirectConnectUser, otherExternalUser, serviceProvider. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: deviceFilterIncludeRuleNotMatched, allDeviceStates. +func (m *ConditionalAccessRuleSatisfied) SetRuleSatisfied(value *ConditionalAccessRule)() { + m.ruleSatisfied = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_response.go b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_response.go new file mode 100644 index 000000000..c4ff275ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRuleSatisfiedCollectionResponse +type ConditionalAccessRuleSatisfiedCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConditionalAccessRuleSatisfiedable +} +// NewConditionalAccessRuleSatisfiedCollectionResponse instantiates a new ConditionalAccessRuleSatisfiedCollectionResponse and sets the default values. +func NewConditionalAccessRuleSatisfiedCollectionResponse()(*ConditionalAccessRuleSatisfiedCollectionResponse) { + m := &ConditionalAccessRuleSatisfiedCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConditionalAccessRuleSatisfiedCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessRuleSatisfiedCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessRuleSatisfiedCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessRuleSatisfiedCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessRuleSatisfiedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessRuleSatisfiedable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessRuleSatisfiedable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConditionalAccessRuleSatisfiedCollectionResponse) GetValue()([]ConditionalAccessRuleSatisfiedable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConditionalAccessRuleSatisfiedCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConditionalAccessRuleSatisfiedCollectionResponse) SetValue(value []ConditionalAccessRuleSatisfiedable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_responseable.go new file mode 100644 index 000000000..3e4a4769c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfied_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRuleSatisfiedCollectionResponseable +type ConditionalAccessRuleSatisfiedCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConditionalAccessRuleSatisfiedable) + SetValue(value []ConditionalAccessRuleSatisfiedable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfiedable.go b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfiedable.go new file mode 100644 index 000000000..4607b38b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_rule_satisfiedable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessRuleSatisfiedable +type ConditionalAccessRuleSatisfiedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConditionalAccessCondition()(*ConditionalAccessConditions) + GetOdataType()(*string) + GetRuleSatisfied()(*ConditionalAccessRule) + SetConditionalAccessCondition(value *ConditionalAccessConditions)() + SetOdataType(value *string)() + SetRuleSatisfied(value *ConditionalAccessRule)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_session_control.go b/src/internal/connector/graph/betasdk/models/conditional_access_session_control.go new file mode 100644 index 000000000..b665d32a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_session_control.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessSessionControl +type ConditionalAccessSessionControl struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether the session control is enabled. + isEnabled *bool + // The OdataType property + odataType *string +} +// NewConditionalAccessSessionControl instantiates a new conditionalAccessSessionControl and sets the default values. +func NewConditionalAccessSessionControl()(*ConditionalAccessSessionControl) { + m := &ConditionalAccessSessionControl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessSessionControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessSessionControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.applicationEnforcedRestrictionsSessionControl": + return NewApplicationEnforcedRestrictionsSessionControl(), nil + case "#microsoft.graph.cloudAppSecuritySessionControl": + return NewCloudAppSecuritySessionControl(), nil + case "#microsoft.graph.persistentBrowserSessionControl": + return NewPersistentBrowserSessionControl(), nil + case "#microsoft.graph.signInFrequencySessionControl": + return NewSignInFrequencySessionControl(), nil + } + } + } + } + return NewConditionalAccessSessionControl(), 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 *ConditionalAccessSessionControl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessSessionControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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 + } + return res +} +// GetIsEnabled gets the isEnabled property value. Specifies whether the session control is enabled. +func (m *ConditionalAccessSessionControl) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessSessionControl) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessSessionControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessSessionControl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Specifies whether the session control is enabled. +func (m *ConditionalAccessSessionControl) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessSessionControl) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_session_controlable.go b/src/internal/connector/graph/betasdk/models/conditional_access_session_controlable.go new file mode 100644 index 000000000..623cfb5cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_session_controlable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessSessionControlable +type ConditionalAccessSessionControlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetOdataType()(*string) + SetIsEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_session_controls.go b/src/internal/connector/graph/betasdk/models/conditional_access_session_controls.go new file mode 100644 index 000000000..37f4eea02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_session_controls.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessSessionControls +type ConditionalAccessSessionControls struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Session control to enforce application restrictions. Only Exchange Online and Sharepoint Online support this session control. + applicationEnforcedRestrictions ApplicationEnforcedRestrictionsSessionControlable + // Session control to apply cloud app security. + cloudAppSecurity CloudAppSecuritySessionControlable + // Session control for continuous access evaluation settings. + continuousAccessEvaluation ContinuousAccessEvaluationSessionControlable + // Session control that determines whether it is acceptable for Azure AD to extend existing sessions based on information collected prior to an outage or not. + disableResilienceDefaults *bool + // The OdataType property + odataType *string + // Session control to define whether to persist cookies or not. All apps should be selected for this session control to work correctly. + persistentBrowser PersistentBrowserSessionControlable + // Session control to enforce signin frequency. + signInFrequency SignInFrequencySessionControlable +} +// NewConditionalAccessSessionControls instantiates a new conditionalAccessSessionControls and sets the default values. +func NewConditionalAccessSessionControls()(*ConditionalAccessSessionControls) { + m := &ConditionalAccessSessionControls{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessSessionControlsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessSessionControlsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessSessionControls(), 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 *ConditionalAccessSessionControls) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationEnforcedRestrictions gets the applicationEnforcedRestrictions property value. Session control to enforce application restrictions. Only Exchange Online and Sharepoint Online support this session control. +func (m *ConditionalAccessSessionControls) GetApplicationEnforcedRestrictions()(ApplicationEnforcedRestrictionsSessionControlable) { + return m.applicationEnforcedRestrictions +} +// GetCloudAppSecurity gets the cloudAppSecurity property value. Session control to apply cloud app security. +func (m *ConditionalAccessSessionControls) GetCloudAppSecurity()(CloudAppSecuritySessionControlable) { + return m.cloudAppSecurity +} +// GetContinuousAccessEvaluation gets the continuousAccessEvaluation property value. Session control for continuous access evaluation settings. +func (m *ConditionalAccessSessionControls) GetContinuousAccessEvaluation()(ContinuousAccessEvaluationSessionControlable) { + return m.continuousAccessEvaluation +} +// GetDisableResilienceDefaults gets the disableResilienceDefaults property value. Session control that determines whether it is acceptable for Azure AD to extend existing sessions based on information collected prior to an outage or not. +func (m *ConditionalAccessSessionControls) GetDisableResilienceDefaults()(*bool) { + return m.disableResilienceDefaults +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessSessionControls) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationEnforcedRestrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApplicationEnforcedRestrictionsSessionControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicationEnforcedRestrictions(val.(ApplicationEnforcedRestrictionsSessionControlable)) + } + return nil + } + res["cloudAppSecurity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCloudAppSecuritySessionControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCloudAppSecurity(val.(CloudAppSecuritySessionControlable)) + } + return nil + } + res["continuousAccessEvaluation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContinuousAccessEvaluationSessionControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContinuousAccessEvaluation(val.(ContinuousAccessEvaluationSessionControlable)) + } + return nil + } + res["disableResilienceDefaults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableResilienceDefaults(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["persistentBrowser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePersistentBrowserSessionControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPersistentBrowser(val.(PersistentBrowserSessionControlable)) + } + return nil + } + res["signInFrequency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSignInFrequencySessionControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSignInFrequency(val.(SignInFrequencySessionControlable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessSessionControls) GetOdataType()(*string) { + return m.odataType +} +// GetPersistentBrowser gets the persistentBrowser property value. Session control to define whether to persist cookies or not. All apps should be selected for this session control to work correctly. +func (m *ConditionalAccessSessionControls) GetPersistentBrowser()(PersistentBrowserSessionControlable) { + return m.persistentBrowser +} +// GetSignInFrequency gets the signInFrequency property value. Session control to enforce signin frequency. +func (m *ConditionalAccessSessionControls) GetSignInFrequency()(SignInFrequencySessionControlable) { + return m.signInFrequency +} +// Serialize serializes information the current object +func (m *ConditionalAccessSessionControls) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applicationEnforcedRestrictions", m.GetApplicationEnforcedRestrictions()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("cloudAppSecurity", m.GetCloudAppSecurity()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("continuousAccessEvaluation", m.GetContinuousAccessEvaluation()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disableResilienceDefaults", m.GetDisableResilienceDefaults()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("persistentBrowser", m.GetPersistentBrowser()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("signInFrequency", m.GetSignInFrequency()) + 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 *ConditionalAccessSessionControls) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationEnforcedRestrictions sets the applicationEnforcedRestrictions property value. Session control to enforce application restrictions. Only Exchange Online and Sharepoint Online support this session control. +func (m *ConditionalAccessSessionControls) SetApplicationEnforcedRestrictions(value ApplicationEnforcedRestrictionsSessionControlable)() { + m.applicationEnforcedRestrictions = value +} +// SetCloudAppSecurity sets the cloudAppSecurity property value. Session control to apply cloud app security. +func (m *ConditionalAccessSessionControls) SetCloudAppSecurity(value CloudAppSecuritySessionControlable)() { + m.cloudAppSecurity = value +} +// SetContinuousAccessEvaluation sets the continuousAccessEvaluation property value. Session control for continuous access evaluation settings. +func (m *ConditionalAccessSessionControls) SetContinuousAccessEvaluation(value ContinuousAccessEvaluationSessionControlable)() { + m.continuousAccessEvaluation = value +} +// SetDisableResilienceDefaults sets the disableResilienceDefaults property value. Session control that determines whether it is acceptable for Azure AD to extend existing sessions based on information collected prior to an outage or not. +func (m *ConditionalAccessSessionControls) SetDisableResilienceDefaults(value *bool)() { + m.disableResilienceDefaults = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessSessionControls) SetOdataType(value *string)() { + m.odataType = value +} +// SetPersistentBrowser sets the persistentBrowser property value. Session control to define whether to persist cookies or not. All apps should be selected for this session control to work correctly. +func (m *ConditionalAccessSessionControls) SetPersistentBrowser(value PersistentBrowserSessionControlable)() { + m.persistentBrowser = value +} +// SetSignInFrequency sets the signInFrequency property value. Session control to enforce signin frequency. +func (m *ConditionalAccessSessionControls) SetSignInFrequency(value SignInFrequencySessionControlable)() { + m.signInFrequency = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_session_controlsable.go b/src/internal/connector/graph/betasdk/models/conditional_access_session_controlsable.go new file mode 100644 index 000000000..cb3dfeff6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_session_controlsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessSessionControlsable +type ConditionalAccessSessionControlsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationEnforcedRestrictions()(ApplicationEnforcedRestrictionsSessionControlable) + GetCloudAppSecurity()(CloudAppSecuritySessionControlable) + GetContinuousAccessEvaluation()(ContinuousAccessEvaluationSessionControlable) + GetDisableResilienceDefaults()(*bool) + GetOdataType()(*string) + GetPersistentBrowser()(PersistentBrowserSessionControlable) + GetSignInFrequency()(SignInFrequencySessionControlable) + SetApplicationEnforcedRestrictions(value ApplicationEnforcedRestrictionsSessionControlable)() + SetCloudAppSecurity(value CloudAppSecuritySessionControlable)() + SetContinuousAccessEvaluation(value ContinuousAccessEvaluationSessionControlable)() + SetDisableResilienceDefaults(value *bool)() + SetOdataType(value *string)() + SetPersistentBrowser(value PersistentBrowserSessionControlable)() + SetSignInFrequency(value SignInFrequencySessionControlable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_status.go b/src/internal/connector/graph/betasdk/models/conditional_access_status.go new file mode 100644 index 000000000..22478350f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessStatus int + +const ( + SUCCESS_CONDITIONALACCESSSTATUS ConditionalAccessStatus = iota + FAILURE_CONDITIONALACCESSSTATUS + NOTAPPLIED_CONDITIONALACCESSSTATUS + UNKNOWNFUTUREVALUE_CONDITIONALACCESSSTATUS +) + +func (i ConditionalAccessStatus) String() string { + return []string{"success", "failure", "notApplied", "unknownFutureValue"}[i] +} +func ParseConditionalAccessStatus(v string) (interface{}, error) { + result := SUCCESS_CONDITIONALACCESSSTATUS + switch v { + case "success": + result = SUCCESS_CONDITIONALACCESSSTATUS + case "failure": + result = FAILURE_CONDITIONALACCESSSTATUS + case "notApplied": + result = NOTAPPLIED_CONDITIONALACCESSSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONDITIONALACCESSSTATUS + default: + return 0, errors.New("Unknown ConditionalAccessStatus value: " + v) + } + return &result, nil +} +func SerializeConditionalAccessStatus(values []ConditionalAccessStatus) []string { + 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/conditional_access_template.go b/src/internal/connector/graph/betasdk/models/conditional_access_template.go new file mode 100644 index 000000000..1cb52a2e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_template.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessTemplate provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessTemplate struct { + Entity + // The user-friendly name of the template. + description *string + // The details property + details ConditionalAccessPolicyDetailable + // The user-friendly name of the template. + name *string + // The scenarios property + scenarios *TemplateScenarios +} +// NewConditionalAccessTemplate instantiates a new conditionalAccessTemplate and sets the default values. +func NewConditionalAccessTemplate()(*ConditionalAccessTemplate) { + m := &ConditionalAccessTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateConditionalAccessTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessTemplate(), nil +} +// GetDescription gets the description property value. The user-friendly name of the template. +func (m *ConditionalAccessTemplate) GetDescription()(*string) { + return m.description +} +// GetDetails gets the details property value. The details property +func (m *ConditionalAccessTemplate) GetDetails()(ConditionalAccessPolicyDetailable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessPolicyDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(ConditionalAccessPolicyDetailable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["scenarios"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTemplateScenarios) + if err != nil { + return err + } + if val != nil { + m.SetScenarios(val.(*TemplateScenarios)) + } + return nil + } + return res +} +// GetName gets the name property value. The user-friendly name of the template. +func (m *ConditionalAccessTemplate) GetName()(*string) { + return m.name +} +// GetScenarios gets the scenarios property value. The scenarios property +func (m *ConditionalAccessTemplate) GetScenarios()(*TemplateScenarios) { + return m.scenarios +} +// Serialize serializes information the current object +func (m *ConditionalAccessTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetScenarios() != nil { + cast := (*m.GetScenarios()).String() + err = writer.WriteStringValue("scenarios", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The user-friendly name of the template. +func (m *ConditionalAccessTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDetails sets the details property value. The details property +func (m *ConditionalAccessTemplate) SetDetails(value ConditionalAccessPolicyDetailable)() { + m.details = value +} +// SetName sets the name property value. The user-friendly name of the template. +func (m *ConditionalAccessTemplate) SetName(value *string)() { + m.name = value +} +// SetScenarios sets the scenarios property value. The scenarios property +func (m *ConditionalAccessTemplate) SetScenarios(value *TemplateScenarios)() { + m.scenarios = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_response.go b/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_response.go new file mode 100644 index 000000000..fa99478dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessTemplateCollectionResponse +type ConditionalAccessTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConditionalAccessTemplateable +} +// NewConditionalAccessTemplateCollectionResponse instantiates a new ConditionalAccessTemplateCollectionResponse and sets the default values. +func NewConditionalAccessTemplateCollectionResponse()(*ConditionalAccessTemplateCollectionResponse) { + m := &ConditionalAccessTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConditionalAccessTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConditionalAccessTemplateCollectionResponse) GetValue()([]ConditionalAccessTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConditionalAccessTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConditionalAccessTemplateCollectionResponse) SetValue(value []ConditionalAccessTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_responseable.go new file mode 100644 index 000000000..b42b3f29b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessTemplateCollectionResponseable +type ConditionalAccessTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConditionalAccessTemplateable) + SetValue(value []ConditionalAccessTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_templateable.go b/src/internal/connector/graph/betasdk/models/conditional_access_templateable.go new file mode 100644 index 000000000..8a26ff4af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_templateable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessTemplateable +type ConditionalAccessTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDetails()(ConditionalAccessPolicyDetailable) + GetName()(*string) + GetScenarios()(*TemplateScenarios) + SetDescription(value *string)() + SetDetails(value ConditionalAccessPolicyDetailable)() + SetName(value *string)() + SetScenarios(value *TemplateScenarios)() +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_users.go b/src/internal/connector/graph/betasdk/models/conditional_access_users.go new file mode 100644 index 000000000..a9f96b9d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_users.go @@ -0,0 +1,303 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessUsers +type ConditionalAccessUsers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Group IDs excluded from scope of policy. + excludeGroups []string + // Internal guests or external users excluded in the policy scope. Optionally populated. + excludeGuestsOrExternalUsers ConditionalAccessGuestsOrExternalUsersable + // Role IDs excluded from scope of policy. + excludeRoles []string + // User IDs excluded from scope of policy and/or GuestsOrExternalUsers. + excludeUsers []string + // Group IDs in scope of policy unless explicitly excluded, or All. + includeGroups []string + // Internal guests or external users included in the policy scope. Optionally populated. + includeGuestsOrExternalUsers ConditionalAccessGuestsOrExternalUsersable + // Role IDs in scope of policy unless explicitly excluded, or All. + includeRoles []string + // User IDs in scope of policy unless explicitly excluded, or None or All or GuestsOrExternalUsers. + includeUsers []string + // The OdataType property + odataType *string +} +// NewConditionalAccessUsers instantiates a new conditionalAccessUsers and sets the default values. +func NewConditionalAccessUsers()(*ConditionalAccessUsers) { + m := &ConditionalAccessUsers{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConditionalAccessUsersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessUsersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessUsers(), 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 *ConditionalAccessUsers) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExcludeGroups gets the excludeGroups property value. Group IDs excluded from scope of policy. +func (m *ConditionalAccessUsers) GetExcludeGroups()([]string) { + return m.excludeGroups +} +// GetExcludeGuestsOrExternalUsers gets the excludeGuestsOrExternalUsers property value. Internal guests or external users excluded in the policy scope. Optionally populated. +func (m *ConditionalAccessUsers) GetExcludeGuestsOrExternalUsers()(ConditionalAccessGuestsOrExternalUsersable) { + return m.excludeGuestsOrExternalUsers +} +// GetExcludeRoles gets the excludeRoles property value. Role IDs excluded from scope of policy. +func (m *ConditionalAccessUsers) GetExcludeRoles()([]string) { + return m.excludeRoles +} +// GetExcludeUsers gets the excludeUsers property value. User IDs excluded from scope of policy and/or GuestsOrExternalUsers. +func (m *ConditionalAccessUsers) GetExcludeUsers()([]string) { + return m.excludeUsers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessUsers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["excludeGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeGroups(res) + } + return nil + } + res["excludeGuestsOrExternalUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessGuestsOrExternalUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExcludeGuestsOrExternalUsers(val.(ConditionalAccessGuestsOrExternalUsersable)) + } + return nil + } + res["excludeRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeRoles(res) + } + return nil + } + res["excludeUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeUsers(res) + } + return nil + } + res["includeGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeGroups(res) + } + return nil + } + res["includeGuestsOrExternalUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConditionalAccessGuestsOrExternalUsersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIncludeGuestsOrExternalUsers(val.(ConditionalAccessGuestsOrExternalUsersable)) + } + return nil + } + res["includeRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeRoles(res) + } + return nil + } + res["includeUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeUsers(res) + } + 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 + } + return res +} +// GetIncludeGroups gets the includeGroups property value. Group IDs in scope of policy unless explicitly excluded, or All. +func (m *ConditionalAccessUsers) GetIncludeGroups()([]string) { + return m.includeGroups +} +// GetIncludeGuestsOrExternalUsers gets the includeGuestsOrExternalUsers property value. Internal guests or external users included in the policy scope. Optionally populated. +func (m *ConditionalAccessUsers) GetIncludeGuestsOrExternalUsers()(ConditionalAccessGuestsOrExternalUsersable) { + return m.includeGuestsOrExternalUsers +} +// GetIncludeRoles gets the includeRoles property value. Role IDs in scope of policy unless explicitly excluded, or All. +func (m *ConditionalAccessUsers) GetIncludeRoles()([]string) { + return m.includeRoles +} +// GetIncludeUsers gets the includeUsers property value. User IDs in scope of policy unless explicitly excluded, or None or All or GuestsOrExternalUsers. +func (m *ConditionalAccessUsers) GetIncludeUsers()([]string) { + return m.includeUsers +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConditionalAccessUsers) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConditionalAccessUsers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExcludeGroups() != nil { + err := writer.WriteCollectionOfStringValues("excludeGroups", m.GetExcludeGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("excludeGuestsOrExternalUsers", m.GetExcludeGuestsOrExternalUsers()) + if err != nil { + return err + } + } + if m.GetExcludeRoles() != nil { + err := writer.WriteCollectionOfStringValues("excludeRoles", m.GetExcludeRoles()) + if err != nil { + return err + } + } + if m.GetExcludeUsers() != nil { + err := writer.WriteCollectionOfStringValues("excludeUsers", m.GetExcludeUsers()) + if err != nil { + return err + } + } + if m.GetIncludeGroups() != nil { + err := writer.WriteCollectionOfStringValues("includeGroups", m.GetIncludeGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("includeGuestsOrExternalUsers", m.GetIncludeGuestsOrExternalUsers()) + if err != nil { + return err + } + } + if m.GetIncludeRoles() != nil { + err := writer.WriteCollectionOfStringValues("includeRoles", m.GetIncludeRoles()) + if err != nil { + return err + } + } + if m.GetIncludeUsers() != nil { + err := writer.WriteCollectionOfStringValues("includeUsers", m.GetIncludeUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConditionalAccessUsers) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExcludeGroups sets the excludeGroups property value. Group IDs excluded from scope of policy. +func (m *ConditionalAccessUsers) SetExcludeGroups(value []string)() { + m.excludeGroups = value +} +// SetExcludeGuestsOrExternalUsers sets the excludeGuestsOrExternalUsers property value. Internal guests or external users excluded in the policy scope. Optionally populated. +func (m *ConditionalAccessUsers) SetExcludeGuestsOrExternalUsers(value ConditionalAccessGuestsOrExternalUsersable)() { + m.excludeGuestsOrExternalUsers = value +} +// SetExcludeRoles sets the excludeRoles property value. Role IDs excluded from scope of policy. +func (m *ConditionalAccessUsers) SetExcludeRoles(value []string)() { + m.excludeRoles = value +} +// SetExcludeUsers sets the excludeUsers property value. User IDs excluded from scope of policy and/or GuestsOrExternalUsers. +func (m *ConditionalAccessUsers) SetExcludeUsers(value []string)() { + m.excludeUsers = value +} +// SetIncludeGroups sets the includeGroups property value. Group IDs in scope of policy unless explicitly excluded, or All. +func (m *ConditionalAccessUsers) SetIncludeGroups(value []string)() { + m.includeGroups = value +} +// SetIncludeGuestsOrExternalUsers sets the includeGuestsOrExternalUsers property value. Internal guests or external users included in the policy scope. Optionally populated. +func (m *ConditionalAccessUsers) SetIncludeGuestsOrExternalUsers(value ConditionalAccessGuestsOrExternalUsersable)() { + m.includeGuestsOrExternalUsers = value +} +// SetIncludeRoles sets the includeRoles property value. Role IDs in scope of policy unless explicitly excluded, or All. +func (m *ConditionalAccessUsers) SetIncludeRoles(value []string)() { + m.includeRoles = value +} +// SetIncludeUsers sets the includeUsers property value. User IDs in scope of policy unless explicitly excluded, or None or All or GuestsOrExternalUsers. +func (m *ConditionalAccessUsers) SetIncludeUsers(value []string)() { + m.includeUsers = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConditionalAccessUsers) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/conditional_access_usersable.go b/src/internal/connector/graph/betasdk/models/conditional_access_usersable.go new file mode 100644 index 000000000..db9b93ce9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conditional_access_usersable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConditionalAccessUsersable +type ConditionalAccessUsersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExcludeGroups()([]string) + GetExcludeGuestsOrExternalUsers()(ConditionalAccessGuestsOrExternalUsersable) + GetExcludeRoles()([]string) + GetExcludeUsers()([]string) + GetIncludeGroups()([]string) + GetIncludeGuestsOrExternalUsers()(ConditionalAccessGuestsOrExternalUsersable) + GetIncludeRoles()([]string) + GetIncludeUsers()([]string) + GetOdataType()(*string) + SetExcludeGroups(value []string)() + SetExcludeGuestsOrExternalUsers(value ConditionalAccessGuestsOrExternalUsersable)() + SetExcludeRoles(value []string)() + SetExcludeUsers(value []string)() + SetIncludeGroups(value []string)() + SetIncludeGuestsOrExternalUsers(value ConditionalAccessGuestsOrExternalUsersable)() + SetIncludeRoles(value []string)() + SetIncludeUsers(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/config_manager_collection.go b/src/internal/connector/graph/betasdk/models/config_manager_collection.go new file mode 100644 index 000000000..cd69062c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/config_manager_collection.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigManagerCollection a ConfigManager defined collection of devices or users. +type ConfigManagerCollection struct { + Entity + // The collection identifier in SCCM. + collectionIdentifier *string + // The created date. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The DisplayName. + displayName *string + // The Hierarchy Identifier. + hierarchyIdentifier *string + // The HierarchyName. + hierarchyName *string + // The last modified date. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewConfigManagerCollection instantiates a new configManagerCollection and sets the default values. +func NewConfigManagerCollection()(*ConfigManagerCollection) { + m := &ConfigManagerCollection{ + Entity: *NewEntity(), + } + return m +} +// CreateConfigManagerCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigManagerCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigManagerCollection(), nil +} +// GetCollectionIdentifier gets the collectionIdentifier property value. The collection identifier in SCCM. +func (m *ConfigManagerCollection) GetCollectionIdentifier()(*string) { + return m.collectionIdentifier +} +// GetCreatedDateTime gets the createdDateTime property value. The created date. +func (m *ConfigManagerCollection) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The DisplayName. +func (m *ConfigManagerCollection) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigManagerCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["collectionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollectionIdentifier(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["hierarchyIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHierarchyIdentifier(val) + } + return nil + } + res["hierarchyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHierarchyName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetHierarchyIdentifier gets the hierarchyIdentifier property value. The Hierarchy Identifier. +func (m *ConfigManagerCollection) GetHierarchyIdentifier()(*string) { + return m.hierarchyIdentifier +} +// GetHierarchyName gets the hierarchyName property value. The HierarchyName. +func (m *ConfigManagerCollection) GetHierarchyName()(*string) { + return m.hierarchyName +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last modified date. +func (m *ConfigManagerCollection) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *ConfigManagerCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("collectionIdentifier", m.GetCollectionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hierarchyIdentifier", m.GetHierarchyIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hierarchyName", m.GetHierarchyName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCollectionIdentifier sets the collectionIdentifier property value. The collection identifier in SCCM. +func (m *ConfigManagerCollection) SetCollectionIdentifier(value *string)() { + m.collectionIdentifier = value +} +// SetCreatedDateTime sets the createdDateTime property value. The created date. +func (m *ConfigManagerCollection) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The DisplayName. +func (m *ConfigManagerCollection) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHierarchyIdentifier sets the hierarchyIdentifier property value. The Hierarchy Identifier. +func (m *ConfigManagerCollection) SetHierarchyIdentifier(value *string)() { + m.hierarchyIdentifier = value +} +// SetHierarchyName sets the hierarchyName property value. The HierarchyName. +func (m *ConfigManagerCollection) SetHierarchyName(value *string)() { + m.hierarchyName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last modified date. +func (m *ConfigManagerCollection) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_response.go b/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_response.go new file mode 100644 index 000000000..1108048d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigManagerCollectionCollectionResponse +type ConfigManagerCollectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConfigManagerCollectionable +} +// NewConfigManagerCollectionCollectionResponse instantiates a new ConfigManagerCollectionCollectionResponse and sets the default values. +func NewConfigManagerCollectionCollectionResponse()(*ConfigManagerCollectionCollectionResponse) { + m := &ConfigManagerCollectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConfigManagerCollectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigManagerCollectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigManagerCollectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigManagerCollectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConfigManagerCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConfigManagerCollectionable, len(val)) + for i, v := range val { + res[i] = v.(ConfigManagerCollectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConfigManagerCollectionCollectionResponse) GetValue()([]ConfigManagerCollectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConfigManagerCollectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConfigManagerCollectionCollectionResponse) SetValue(value []ConfigManagerCollectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_responseable.go new file mode 100644 index 000000000..645472f75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/config_manager_collection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigManagerCollectionCollectionResponseable +type ConfigManagerCollectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConfigManagerCollectionable) + SetValue(value []ConfigManagerCollectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/config_manager_collectionable.go b/src/internal/connector/graph/betasdk/models/config_manager_collectionable.go new file mode 100644 index 000000000..4b9fbfb4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/config_manager_collectionable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigManagerCollectionable +type ConfigManagerCollectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollectionIdentifier()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHierarchyIdentifier()(*string) + GetHierarchyName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCollectionIdentifier(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHierarchyIdentifier(value *string)() + SetHierarchyName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration.go b/src/internal/connector/graph/betasdk/models/configuration.go new file mode 100644 index 000000000..f0d5a5454 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Configuration +type Configuration 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 authorizedAppIds property + authorizedAppIds []string + // The authorizedApps property + authorizedApps []string + // The OdataType property + odataType *string +} +// NewConfiguration instantiates a new configuration and sets the default values. +func NewConfiguration()(*Configuration) { + m := &Configuration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfiguration(), 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 *Configuration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthorizedAppIds gets the authorizedAppIds property value. The authorizedAppIds property +func (m *Configuration) GetAuthorizedAppIds()([]string) { + return m.authorizedAppIds +} +// GetAuthorizedApps gets the authorizedApps property value. The authorizedApps property +func (m *Configuration) GetAuthorizedApps()([]string) { + return m.authorizedApps +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Configuration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authorizedAppIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAuthorizedAppIds(res) + } + return nil + } + res["authorizedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAuthorizedApps(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Configuration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Configuration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorizedAppIds() != nil { + err := writer.WriteCollectionOfStringValues("authorizedAppIds", m.GetAuthorizedAppIds()) + if err != nil { + return err + } + } + if m.GetAuthorizedApps() != nil { + err := writer.WriteCollectionOfStringValues("authorizedApps", m.GetAuthorizedApps()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Configuration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthorizedAppIds sets the authorizedAppIds property value. The authorizedAppIds property +func (m *Configuration) SetAuthorizedAppIds(value []string)() { + m.authorizedAppIds = value +} +// SetAuthorizedApps sets the authorizedApps property value. The authorizedApps property +func (m *Configuration) SetAuthorizedApps(value []string)() { + m.authorizedApps = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Configuration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_action_delivery_status.go b/src/internal/connector/graph/betasdk/models/configuration_manager_action_delivery_status.go new file mode 100644 index 000000000..233ba9c5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_action_delivery_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConfigurationManagerActionDeliveryStatus int + +const ( + // Pending to deliver the action to ConfigurationManager + UNKNOWN_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS ConfigurationManagerActionDeliveryStatus = iota + // Pending to deliver the action to ConfigurationManager + PENDINGDELIVERY_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + // Action is sent to ConfigurationManager Connector service (cloud) + DELIVEREDTOCONNECTORSERVICE_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + // Failed to send the action to ConfigurationManager Connector service (cloud) + FAILEDTODELIVERTOCONNECTORSERVICE_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + // Action is delivered to ConfigurationManager on-prem server + DELIVEREDTOONPREMISESSERVER_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS +) + +func (i ConfigurationManagerActionDeliveryStatus) String() string { + return []string{"unknown", "pendingDelivery", "deliveredToConnectorService", "failedToDeliverToConnectorService", "deliveredToOnPremisesServer"}[i] +} +func ParseConfigurationManagerActionDeliveryStatus(v string) (interface{}, error) { + result := UNKNOWN_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + switch v { + case "unknown": + result = UNKNOWN_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + case "pendingDelivery": + result = PENDINGDELIVERY_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + case "deliveredToConnectorService": + result = DELIVEREDTOCONNECTORSERVICE_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + case "failedToDeliverToConnectorService": + result = FAILEDTODELIVERTOCONNECTORSERVICE_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + case "deliveredToOnPremisesServer": + result = DELIVEREDTOONPREMISESSERVER_CONFIGURATIONMANAGERACTIONDELIVERYSTATUS + default: + return 0, errors.New("Unknown ConfigurationManagerActionDeliveryStatus value: " + v) + } + return &result, nil +} +func SerializeConfigurationManagerActionDeliveryStatus(values []ConfigurationManagerActionDeliveryStatus) []string { + 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/configuration_manager_action_result.go b/src/internal/connector/graph/betasdk/models/configuration_manager_action_result.go new file mode 100644 index 000000000..048161922 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_action_result.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerActionResult +type ConfigurationManagerActionResult struct { + DeviceActionResult + // Delivery state of Configuration Manager device action + actionDeliveryStatus *ConfigurationManagerActionDeliveryStatus + // Error code of Configuration Manager action from client + errorCode *int32 +} +// NewConfigurationManagerActionResult instantiates a new ConfigurationManagerActionResult and sets the default values. +func NewConfigurationManagerActionResult()(*ConfigurationManagerActionResult) { + m := &ConfigurationManagerActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateConfigurationManagerActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationManagerActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigurationManagerActionResult(), nil +} +// GetActionDeliveryStatus gets the actionDeliveryStatus property value. Delivery state of Configuration Manager device action +func (m *ConfigurationManagerActionResult) GetActionDeliveryStatus()(*ConfigurationManagerActionDeliveryStatus) { + return m.actionDeliveryStatus +} +// GetErrorCode gets the errorCode property value. Error code of Configuration Manager action from client +func (m *ConfigurationManagerActionResult) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigurationManagerActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["actionDeliveryStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationManagerActionDeliveryStatus) + if err != nil { + return err + } + if val != nil { + m.SetActionDeliveryStatus(val.(*ConfigurationManagerActionDeliveryStatus)) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ConfigurationManagerActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + if m.GetActionDeliveryStatus() != nil { + cast := (*m.GetActionDeliveryStatus()).String() + err = writer.WriteStringValue("actionDeliveryStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + return nil +} +// SetActionDeliveryStatus sets the actionDeliveryStatus property value. Delivery state of Configuration Manager device action +func (m *ConfigurationManagerActionResult) SetActionDeliveryStatus(value *ConfigurationManagerActionDeliveryStatus)() { + m.actionDeliveryStatus = value +} +// SetErrorCode sets the errorCode property value. Error code of Configuration Manager action from client +func (m *ConfigurationManagerActionResult) SetErrorCode(value *int32)() { + m.errorCode = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_action_resultable.go b/src/internal/connector/graph/betasdk/models/configuration_manager_action_resultable.go new file mode 100644 index 000000000..b9618dd1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_action_resultable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerActionResultable +type ConfigurationManagerActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionDeliveryStatus()(*ConfigurationManagerActionDeliveryStatus) + GetErrorCode()(*int32) + SetActionDeliveryStatus(value *ConfigurationManagerActionDeliveryStatus)() + SetErrorCode(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_features.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_features.go new file mode 100644 index 000000000..17026d5a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_features.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientEnabledFeatures configuration Manager client enabled features +type ConfigurationManagerClientEnabledFeatures struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether compliance policy is managed by Intune + compliancePolicy *bool + // Whether device configuration is managed by Intune + deviceConfiguration *bool + // Whether Endpoint Protection is managed by Intune + endpointProtection *bool + // Whether inventory is managed by Intune + inventory *bool + // Whether modern application is managed by Intune + modernApps *bool + // The OdataType property + odataType *string + // Whether Office application is managed by Intune + officeApps *bool + // Whether resource access is managed by Intune + resourceAccess *bool + // Whether Windows Update for Business is managed by Intune + windowsUpdateForBusiness *bool +} +// NewConfigurationManagerClientEnabledFeatures instantiates a new configurationManagerClientEnabledFeatures and sets the default values. +func NewConfigurationManagerClientEnabledFeatures()(*ConfigurationManagerClientEnabledFeatures) { + m := &ConfigurationManagerClientEnabledFeatures{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConfigurationManagerClientEnabledFeaturesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationManagerClientEnabledFeaturesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigurationManagerClientEnabledFeatures(), 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 *ConfigurationManagerClientEnabledFeatures) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCompliancePolicy gets the compliancePolicy property value. Whether compliance policy is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetCompliancePolicy()(*bool) { + return m.compliancePolicy +} +// GetDeviceConfiguration gets the deviceConfiguration property value. Whether device configuration is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetDeviceConfiguration()(*bool) { + return m.deviceConfiguration +} +// GetEndpointProtection gets the endpointProtection property value. Whether Endpoint Protection is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetEndpointProtection()(*bool) { + return m.endpointProtection +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigurationManagerClientEnabledFeatures) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["compliancePolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCompliancePolicy(val) + } + return nil + } + res["deviceConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfiguration(val) + } + return nil + } + res["endpointProtection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEndpointProtection(val) + } + return nil + } + res["inventory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInventory(val) + } + return nil + } + res["modernApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetModernApps(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["officeApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeApps(val) + } + return nil + } + res["resourceAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceAccess(val) + } + return nil + } + res["windowsUpdateForBusiness"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsUpdateForBusiness(val) + } + return nil + } + return res +} +// GetInventory gets the inventory property value. Whether inventory is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetInventory()(*bool) { + return m.inventory +} +// GetModernApps gets the modernApps property value. Whether modern application is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetModernApps()(*bool) { + return m.modernApps +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientEnabledFeatures) GetOdataType()(*string) { + return m.odataType +} +// GetOfficeApps gets the officeApps property value. Whether Office application is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetOfficeApps()(*bool) { + return m.officeApps +} +// GetResourceAccess gets the resourceAccess property value. Whether resource access is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetResourceAccess()(*bool) { + return m.resourceAccess +} +// GetWindowsUpdateForBusiness gets the windowsUpdateForBusiness property value. Whether Windows Update for Business is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) GetWindowsUpdateForBusiness()(*bool) { + return m.windowsUpdateForBusiness +} +// Serialize serializes information the current object +func (m *ConfigurationManagerClientEnabledFeatures) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("compliancePolicy", m.GetCompliancePolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("deviceConfiguration", m.GetDeviceConfiguration()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("endpointProtection", m.GetEndpointProtection()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("inventory", m.GetInventory()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("modernApps", m.GetModernApps()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("officeApps", m.GetOfficeApps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("resourceAccess", m.GetResourceAccess()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("windowsUpdateForBusiness", m.GetWindowsUpdateForBusiness()) + 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 *ConfigurationManagerClientEnabledFeatures) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCompliancePolicy sets the compliancePolicy property value. Whether compliance policy is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetCompliancePolicy(value *bool)() { + m.compliancePolicy = value +} +// SetDeviceConfiguration sets the deviceConfiguration property value. Whether device configuration is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetDeviceConfiguration(value *bool)() { + m.deviceConfiguration = value +} +// SetEndpointProtection sets the endpointProtection property value. Whether Endpoint Protection is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetEndpointProtection(value *bool)() { + m.endpointProtection = value +} +// SetInventory sets the inventory property value. Whether inventory is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetInventory(value *bool)() { + m.inventory = value +} +// SetModernApps sets the modernApps property value. Whether modern application is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetModernApps(value *bool)() { + m.modernApps = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientEnabledFeatures) SetOdataType(value *string)() { + m.odataType = value +} +// SetOfficeApps sets the officeApps property value. Whether Office application is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetOfficeApps(value *bool)() { + m.officeApps = value +} +// SetResourceAccess sets the resourceAccess property value. Whether resource access is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetResourceAccess(value *bool)() { + m.resourceAccess = value +} +// SetWindowsUpdateForBusiness sets the windowsUpdateForBusiness property value. Whether Windows Update for Business is managed by Intune +func (m *ConfigurationManagerClientEnabledFeatures) SetWindowsUpdateForBusiness(value *bool)() { + m.windowsUpdateForBusiness = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_featuresable.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_featuresable.go new file mode 100644 index 000000000..96137b4e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_enabled_featuresable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientEnabledFeaturesable +type ConfigurationManagerClientEnabledFeaturesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliancePolicy()(*bool) + GetDeviceConfiguration()(*bool) + GetEndpointProtection()(*bool) + GetInventory()(*bool) + GetModernApps()(*bool) + GetOdataType()(*string) + GetOfficeApps()(*bool) + GetResourceAccess()(*bool) + GetWindowsUpdateForBusiness()(*bool) + SetCompliancePolicy(value *bool)() + SetDeviceConfiguration(value *bool)() + SetEndpointProtection(value *bool)() + SetInventory(value *bool)() + SetModernApps(value *bool)() + SetOdataType(value *string)() + SetOfficeApps(value *bool)() + SetResourceAccess(value *bool)() + SetWindowsUpdateForBusiness(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_state.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_state.go new file mode 100644 index 000000000..015800e0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_state.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientHealthState configuration manager client health state +type ConfigurationManagerClientHealthState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Error code for failed state. + errorCode *int32 + // Datetime for last sync with configuration manager management point. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Configuration manager client state + state *ConfigurationManagerClientState +} +// NewConfigurationManagerClientHealthState instantiates a new configurationManagerClientHealthState and sets the default values. +func NewConfigurationManagerClientHealthState()(*ConfigurationManagerClientHealthState) { + m := &ConfigurationManagerClientHealthState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConfigurationManagerClientHealthStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationManagerClientHealthStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigurationManagerClientHealthState(), 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 *ConfigurationManagerClientHealthState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetErrorCode gets the errorCode property value. Error code for failed state. +func (m *ConfigurationManagerClientHealthState) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigurationManagerClientHealthState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConfigurationManagerClientState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ConfigurationManagerClientState)) + } + return nil + } + return res +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Datetime for last sync with configuration manager management point. +func (m *ConfigurationManagerClientHealthState) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientHealthState) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. Configuration manager client state +func (m *ConfigurationManagerClientHealthState) GetState()(*ConfigurationManagerClientState) { + return m.state +} +// Serialize serializes information the current object +func (m *ConfigurationManagerClientHealthState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *ConfigurationManagerClientHealthState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetErrorCode sets the errorCode property value. Error code for failed state. +func (m *ConfigurationManagerClientHealthState) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Datetime for last sync with configuration manager management point. +func (m *ConfigurationManagerClientHealthState) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientHealthState) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. Configuration manager client state +func (m *ConfigurationManagerClientHealthState) SetState(value *ConfigurationManagerClientState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_stateable.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_stateable.go new file mode 100644 index 000000000..16971bd13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_health_stateable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientHealthStateable +type ConfigurationManagerClientHealthStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*int32) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetState()(*ConfigurationManagerClientState) + SetErrorCode(value *int32)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetState(value *ConfigurationManagerClientState)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_information.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_information.go new file mode 100644 index 000000000..581c2122c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_information.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientInformation configuration Manager client information synced from SCCM +type ConfigurationManagerClientInformation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Configuration Manager Client Id from SCCM + clientIdentifier *string + // Configuration Manager Client version from SCCM + clientVersion *string + // Configuration Manager Client blocked status from SCCM + isBlocked *bool + // The OdataType property + odataType *string +} +// NewConfigurationManagerClientInformation instantiates a new configurationManagerClientInformation and sets the default values. +func NewConfigurationManagerClientInformation()(*ConfigurationManagerClientInformation) { + m := &ConfigurationManagerClientInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConfigurationManagerClientInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationManagerClientInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigurationManagerClientInformation(), 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 *ConfigurationManagerClientInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClientIdentifier gets the clientIdentifier property value. Configuration Manager Client Id from SCCM +func (m *ConfigurationManagerClientInformation) GetClientIdentifier()(*string) { + return m.clientIdentifier +} +// GetClientVersion gets the clientVersion property value. Configuration Manager Client version from SCCM +func (m *ConfigurationManagerClientInformation) GetClientVersion()(*string) { + return m.clientVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigurationManagerClientInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["clientIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientIdentifier(val) + } + return nil + } + res["clientVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientVersion(val) + } + return nil + } + res["isBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBlocked(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 + } + return res +} +// GetIsBlocked gets the isBlocked property value. Configuration Manager Client blocked status from SCCM +func (m *ConfigurationManagerClientInformation) GetIsBlocked()(*bool) { + return m.isBlocked +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientInformation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ConfigurationManagerClientInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("clientIdentifier", m.GetClientIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clientVersion", m.GetClientVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isBlocked", m.GetIsBlocked()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ConfigurationManagerClientInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClientIdentifier sets the clientIdentifier property value. Configuration Manager Client Id from SCCM +func (m *ConfigurationManagerClientInformation) SetClientIdentifier(value *string)() { + m.clientIdentifier = value +} +// SetClientVersion sets the clientVersion property value. Configuration Manager Client version from SCCM +func (m *ConfigurationManagerClientInformation) SetClientVersion(value *string)() { + m.clientVersion = value +} +// SetIsBlocked sets the isBlocked property value. Configuration Manager Client blocked status from SCCM +func (m *ConfigurationManagerClientInformation) SetIsBlocked(value *bool)() { + m.isBlocked = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConfigurationManagerClientInformation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_informationable.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_informationable.go new file mode 100644 index 000000000..d8343d966 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_informationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerClientInformationable +type ConfigurationManagerClientInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientIdentifier()(*string) + GetClientVersion()(*string) + GetIsBlocked()(*bool) + GetOdataType()(*string) + SetClientIdentifier(value *string)() + SetClientVersion(value *string)() + SetIsBlocked(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_client_state.go b/src/internal/connector/graph/betasdk/models/configuration_manager_client_state.go new file mode 100644 index 000000000..ac055387c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_client_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConfigurationManagerClientState int + +const ( + // Configuration manager agent is older than 1806 or not installed or this device has not checked into Intune for over 30 days. + UNKNOWN_CONFIGURATIONMANAGERCLIENTSTATE ConfigurationManagerClientState = iota + // The configuration manager agent is installed but may not be showing up in the configuration manager console yet. Wait a few hours for it to refresh. + INSTALLED_CONFIGURATIONMANAGERCLIENTSTATE + // This device was able to check in with the configuration manager service successfully. + HEALTHY_CONFIGURATIONMANAGERCLIENTSTATE + // The configuration manager agent failed to install. + INSTALLFAILED_CONFIGURATIONMANAGERCLIENTSTATE + // The update from version x to version y of the configuration manager agent failed. + UPDATEFAILED_CONFIGURATIONMANAGERCLIENTSTATE + // The configuration manager agent was able to reach the configuration manager service in the past but is now no longer able to. + COMMUNICATIONERROR_CONFIGURATIONMANAGERCLIENTSTATE +) + +func (i ConfigurationManagerClientState) String() string { + return []string{"unknown", "installed", "healthy", "installFailed", "updateFailed", "communicationError"}[i] +} +func ParseConfigurationManagerClientState(v string) (interface{}, error) { + result := UNKNOWN_CONFIGURATIONMANAGERCLIENTSTATE + switch v { + case "unknown": + result = UNKNOWN_CONFIGURATIONMANAGERCLIENTSTATE + case "installed": + result = INSTALLED_CONFIGURATIONMANAGERCLIENTSTATE + case "healthy": + result = HEALTHY_CONFIGURATIONMANAGERCLIENTSTATE + case "installFailed": + result = INSTALLFAILED_CONFIGURATIONMANAGERCLIENTSTATE + case "updateFailed": + result = UPDATEFAILED_CONFIGURATIONMANAGERCLIENTSTATE + case "communicationError": + result = COMMUNICATIONERROR_CONFIGURATIONMANAGERCLIENTSTATE + default: + return 0, errors.New("Unknown ConfigurationManagerClientState value: " + v) + } + return &result, nil +} +func SerializeConfigurationManagerClientState(values []ConfigurationManagerClientState) []string { + 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/configuration_manager_collection_assignment_target.go b/src/internal/connector/graph/betasdk/models/configuration_manager_collection_assignment_target.go new file mode 100644 index 000000000..3800fa1d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_collection_assignment_target.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerCollectionAssignmentTarget +type ConfigurationManagerCollectionAssignmentTarget struct { + DeviceAndAppManagementAssignmentTarget + // The collection Id that is the target of the assignment. + collectionId *string +} +// NewConfigurationManagerCollectionAssignmentTarget instantiates a new ConfigurationManagerCollectionAssignmentTarget and sets the default values. +func NewConfigurationManagerCollectionAssignmentTarget()(*ConfigurationManagerCollectionAssignmentTarget) { + m := &ConfigurationManagerCollectionAssignmentTarget{ + DeviceAndAppManagementAssignmentTarget: *NewDeviceAndAppManagementAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.configurationManagerCollectionAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateConfigurationManagerCollectionAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationManagerCollectionAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfigurationManagerCollectionAssignmentTarget(), nil +} +// GetCollectionId gets the collectionId property value. The collection Id that is the target of the assignment. +func (m *ConfigurationManagerCollectionAssignmentTarget) GetCollectionId()(*string) { + return m.collectionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConfigurationManagerCollectionAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAndAppManagementAssignmentTarget.GetFieldDeserializers() + res["collectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCollectionId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ConfigurationManagerCollectionAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAndAppManagementAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("collectionId", m.GetCollectionId()) + if err != nil { + return err + } + } + return nil +} +// SetCollectionId sets the collectionId property value. The collection Id that is the target of the assignment. +func (m *ConfigurationManagerCollectionAssignmentTarget) SetCollectionId(value *string)() { + m.collectionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_manager_collection_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/configuration_manager_collection_assignment_targetable.go new file mode 100644 index 000000000..32cbfb3dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_manager_collection_assignment_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConfigurationManagerCollectionAssignmentTargetable +type ConfigurationManagerCollectionAssignmentTargetable interface { + DeviceAndAppManagementAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollectionId()(*string) + SetCollectionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/configuration_usage.go b/src/internal/connector/graph/betasdk/models/configuration_usage.go new file mode 100644 index 000000000..b84fc027f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configuration_usage.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConfigurationUsage int + +const ( + // Disallowed. + BLOCKED_CONFIGURATIONUSAGE ConfigurationUsage = iota + // Required. + REQUIRED_CONFIGURATIONUSAGE + // Optional. + ALLOWED_CONFIGURATIONUSAGE + // Not Configured. + NOTCONFIGURED_CONFIGURATIONUSAGE +) + +func (i ConfigurationUsage) String() string { + return []string{"blocked", "required", "allowed", "notConfigured"}[i] +} +func ParseConfigurationUsage(v string) (interface{}, error) { + result := BLOCKED_CONFIGURATIONUSAGE + switch v { + case "blocked": + result = BLOCKED_CONFIGURATIONUSAGE + case "required": + result = REQUIRED_CONFIGURATIONUSAGE + case "allowed": + result = ALLOWED_CONFIGURATIONUSAGE + case "notConfigured": + result = NOTCONFIGURED_CONFIGURATIONUSAGE + default: + return 0, errors.New("Unknown ConfigurationUsage value: " + v) + } + return &result, nil +} +func SerializeConfigurationUsage(values []ConfigurationUsage) []string { + 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/configurationable.go b/src/internal/connector/graph/betasdk/models/configurationable.go new file mode 100644 index 000000000..d7ec05086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Configurationable +type Configurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorizedAppIds()([]string) + GetAuthorizedApps()([]string) + GetOdataType()(*string) + SetAuthorizedAppIds(value []string)() + SetAuthorizedApps(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/confirmed_by.go b/src/internal/connector/graph/betasdk/models/confirmed_by.go new file mode 100644 index 000000000..930da598d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/confirmed_by.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConfirmedBy int + +const ( + NONE_CONFIRMEDBY ConfirmedBy = iota + USER_CONFIRMEDBY + MANAGER_CONFIRMEDBY + UNKNOWNFUTUREVALUE_CONFIRMEDBY +) + +func (i ConfirmedBy) String() string { + return []string{"none", "user", "manager", "unknownFutureValue"}[i] +} +func ParseConfirmedBy(v string) (interface{}, error) { + result := NONE_CONFIRMEDBY + switch v { + case "none": + result = NONE_CONFIRMEDBY + case "user": + result = USER_CONFIRMEDBY + case "manager": + result = MANAGER_CONFIRMEDBY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONFIRMEDBY + default: + return 0, errors.New("Unknown ConfirmedBy value: " + v) + } + return &result, nil +} +func SerializeConfirmedBy(values []ConfirmedBy) []string { + 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/connected_organization.go b/src/internal/connector/graph/betasdk/models/connected_organization.go new file mode 100644 index 000000000..30b6b5995 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization.go @@ -0,0 +1,320 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganization +type ConnectedOrganization struct { + Entity + // UPN of the user who created this resource. Read-only. + createdBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of the connected organization. + description *string + // The display name of the connected organization. Supports $filter (eq). + displayName *string + // The externalSponsors property + externalSponsors []DirectoryObjectable + // The identity sources in this connected organization, one of azureActiveDirectoryTenant, crossCloudAzureActiveDirectoryTenant, domainIdentitySource or externalDomainFederation. Read-only. Nullable. Supports $select and $filter(eq). To filter by the derived types, you must declare the resource using its full OData cast, for example, $filter=identitySources/any(is:is/microsoft.graph.azureActiveDirectoryTenant/tenantId eq 'bcfdfff4-cbc3-43f2-9000-ba7b7515054f'). + identitySources []IdentitySourceable + // The internalSponsors property + internalSponsors []DirectoryObjectable + // UPN of the user who last modified this resource. Read-only. + modifiedBy *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state of a connected organization defines whether assignment policies with requestor scope type AllConfiguredConnectedOrganizationSubjects are applicable or not. Possible values are: configured, proposed. + state *ConnectedOrganizationState +} +// NewConnectedOrganization instantiates a new connectedOrganization and sets the default values. +func NewConnectedOrganization()(*ConnectedOrganization) { + m := &ConnectedOrganization{ + Entity: *NewEntity(), + } + return m +} +// CreateConnectedOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectedOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectedOrganization(), nil +} +// GetCreatedBy gets the createdBy property value. UPN of the user who created this resource. Read-only. +func (m *ConnectedOrganization) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ConnectedOrganization) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of the connected organization. +func (m *ConnectedOrganization) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the connected organization. Supports $filter (eq). +func (m *ConnectedOrganization) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalSponsors gets the externalSponsors property value. The externalSponsors property +func (m *ConnectedOrganization) GetExternalSponsors()([]DirectoryObjectable) { + return m.externalSponsors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectedOrganization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalSponsors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetExternalSponsors(res) + } + return nil + } + res["identitySources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySourceable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySourceable) + } + m.SetIdentitySources(res) + } + return nil + } + res["internalSponsors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetInternalSponsors(res) + } + return nil + } + res["modifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedBy(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectedOrganizationState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ConnectedOrganizationState)) + } + return nil + } + return res +} +// GetIdentitySources gets the identitySources property value. The identity sources in this connected organization, one of azureActiveDirectoryTenant, crossCloudAzureActiveDirectoryTenant, domainIdentitySource or externalDomainFederation. Read-only. Nullable. Supports $select and $filter(eq). To filter by the derived types, you must declare the resource using its full OData cast, for example, $filter=identitySources/any(is:is/microsoft.graph.azureActiveDirectoryTenant/tenantId eq 'bcfdfff4-cbc3-43f2-9000-ba7b7515054f'). +func (m *ConnectedOrganization) GetIdentitySources()([]IdentitySourceable) { + return m.identitySources +} +// GetInternalSponsors gets the internalSponsors property value. The internalSponsors property +func (m *ConnectedOrganization) GetInternalSponsors()([]DirectoryObjectable) { + return m.internalSponsors +} +// GetModifiedBy gets the modifiedBy property value. UPN of the user who last modified this resource. Read-only. +func (m *ConnectedOrganization) GetModifiedBy()(*string) { + return m.modifiedBy +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ConnectedOrganization) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetState gets the state property value. The state of a connected organization defines whether assignment policies with requestor scope type AllConfiguredConnectedOrganizationSubjects are applicable or not. Possible values are: configured, proposed. +func (m *ConnectedOrganization) GetState()(*ConnectedOrganizationState) { + return m.state +} +// Serialize serializes information the current object +func (m *ConnectedOrganization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExternalSponsors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExternalSponsors())) + for i, v := range m.GetExternalSponsors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("externalSponsors", cast) + if err != nil { + return err + } + } + if m.GetIdentitySources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIdentitySources())) + for i, v := range m.GetIdentitySources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("identitySources", cast) + if err != nil { + return err + } + } + if m.GetInternalSponsors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInternalSponsors())) + for i, v := range m.GetInternalSponsors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("internalSponsors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modifiedBy", m.GetModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. UPN of the user who created this resource. Read-only. +func (m *ConnectedOrganization) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ConnectedOrganization) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of the connected organization. +func (m *ConnectedOrganization) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the connected organization. Supports $filter (eq). +func (m *ConnectedOrganization) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalSponsors sets the externalSponsors property value. The externalSponsors property +func (m *ConnectedOrganization) SetExternalSponsors(value []DirectoryObjectable)() { + m.externalSponsors = value +} +// SetIdentitySources sets the identitySources property value. The identity sources in this connected organization, one of azureActiveDirectoryTenant, crossCloudAzureActiveDirectoryTenant, domainIdentitySource or externalDomainFederation. Read-only. Nullable. Supports $select and $filter(eq). To filter by the derived types, you must declare the resource using its full OData cast, for example, $filter=identitySources/any(is:is/microsoft.graph.azureActiveDirectoryTenant/tenantId eq 'bcfdfff4-cbc3-43f2-9000-ba7b7515054f'). +func (m *ConnectedOrganization) SetIdentitySources(value []IdentitySourceable)() { + m.identitySources = value +} +// SetInternalSponsors sets the internalSponsors property value. The internalSponsors property +func (m *ConnectedOrganization) SetInternalSponsors(value []DirectoryObjectable)() { + m.internalSponsors = value +} +// SetModifiedBy sets the modifiedBy property value. UPN of the user who last modified this resource. Read-only. +func (m *ConnectedOrganization) SetModifiedBy(value *string)() { + m.modifiedBy = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ConnectedOrganization) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetState sets the state property value. The state of a connected organization defines whether assignment policies with requestor scope type AllConfiguredConnectedOrganizationSubjects are applicable or not. Possible values are: configured, proposed. +func (m *ConnectedOrganization) SetState(value *ConnectedOrganizationState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/connected_organization_collection_response.go b/src/internal/connector/graph/betasdk/models/connected_organization_collection_response.go new file mode 100644 index 000000000..a6c7911ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganizationCollectionResponse +type ConnectedOrganizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConnectedOrganizationable +} +// NewConnectedOrganizationCollectionResponse instantiates a new ConnectedOrganizationCollectionResponse and sets the default values. +func NewConnectedOrganizationCollectionResponse()(*ConnectedOrganizationCollectionResponse) { + m := &ConnectedOrganizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConnectedOrganizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectedOrganizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectedOrganizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectedOrganizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectedOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectedOrganizationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectedOrganizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConnectedOrganizationCollectionResponse) GetValue()([]ConnectedOrganizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConnectedOrganizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConnectedOrganizationCollectionResponse) SetValue(value []ConnectedOrganizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/connected_organization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/connected_organization_collection_responseable.go new file mode 100644 index 000000000..496a44b12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganizationCollectionResponseable +type ConnectedOrganizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConnectedOrganizationable) + SetValue(value []ConnectedOrganizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/connected_organization_members.go b/src/internal/connector/graph/betasdk/models/connected_organization_members.go new file mode 100644 index 000000000..6e33a22ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization_members.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganizationMembers +type ConnectedOrganizationMembers struct { + UserSet + // The name of the connected organization. Read only. + description *string + // The ID of the connected organization in entitlement management. + id *string +} +// NewConnectedOrganizationMembers instantiates a new ConnectedOrganizationMembers and sets the default values. +func NewConnectedOrganizationMembers()(*ConnectedOrganizationMembers) { + m := &ConnectedOrganizationMembers{ + UserSet: *NewUserSet(), + } + odataTypeValue := "#microsoft.graph.connectedOrganizationMembers"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateConnectedOrganizationMembersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectedOrganizationMembersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectedOrganizationMembers(), nil +} +// GetDescription gets the description property value. The name of the connected organization. Read only. +func (m *ConnectedOrganizationMembers) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectedOrganizationMembers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserSet.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the connected organization in entitlement management. +func (m *ConnectedOrganizationMembers) GetId()(*string) { + return m.id +} +// Serialize serializes information the current object +func (m *ConnectedOrganizationMembers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserSet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The name of the connected organization. Read only. +func (m *ConnectedOrganizationMembers) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The ID of the connected organization in entitlement management. +func (m *ConnectedOrganizationMembers) SetId(value *string)() { + m.id = value +} diff --git a/src/internal/connector/graph/betasdk/models/connected_organization_membersable.go b/src/internal/connector/graph/betasdk/models/connected_organization_membersable.go new file mode 100644 index 000000000..258132774 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization_membersable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganizationMembersable +type ConnectedOrganizationMembersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserSetable + GetDescription()(*string) + GetId()(*string) + SetDescription(value *string)() + SetId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/connected_organization_state.go b/src/internal/connector/graph/betasdk/models/connected_organization_state.go new file mode 100644 index 000000000..efed403da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organization_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectedOrganizationState int + +const ( + CONFIGURED_CONNECTEDORGANIZATIONSTATE ConnectedOrganizationState = iota + PROPOSED_CONNECTEDORGANIZATIONSTATE + UNKNOWNFUTUREVALUE_CONNECTEDORGANIZATIONSTATE +) + +func (i ConnectedOrganizationState) String() string { + return []string{"configured", "proposed", "unknownFutureValue"}[i] +} +func ParseConnectedOrganizationState(v string) (interface{}, error) { + result := CONFIGURED_CONNECTEDORGANIZATIONSTATE + switch v { + case "configured": + result = CONFIGURED_CONNECTEDORGANIZATIONSTATE + case "proposed": + result = PROPOSED_CONNECTEDORGANIZATIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTEDORGANIZATIONSTATE + default: + return 0, errors.New("Unknown ConnectedOrganizationState value: " + v) + } + return &result, nil +} +func SerializeConnectedOrganizationState(values []ConnectedOrganizationState) []string { + 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/connected_organizationable.go b/src/internal/connector/graph/betasdk/models/connected_organizationable.go new file mode 100644 index 000000000..33fe6186f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connected_organizationable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectedOrganizationable +type ConnectedOrganizationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalSponsors()([]DirectoryObjectable) + GetIdentitySources()([]IdentitySourceable) + GetInternalSponsors()([]DirectoryObjectable) + GetModifiedBy()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*ConnectedOrganizationState) + SetCreatedBy(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalSponsors(value []DirectoryObjectable)() + SetIdentitySources(value []IdentitySourceable)() + SetInternalSponsors(value []DirectoryObjectable)() + SetModifiedBy(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *ConnectedOrganizationState)() +} diff --git a/src/internal/connector/graph/betasdk/models/connection_direction.go b/src/internal/connector/graph/betasdk/models/connection_direction.go new file mode 100644 index 000000000..7bf3372eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_direction.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionDirection int + +const ( + UNKNOWN_CONNECTIONDIRECTION ConnectionDirection = iota + INBOUND_CONNECTIONDIRECTION + OUTBOUND_CONNECTIONDIRECTION + UNKNOWNFUTUREVALUE_CONNECTIONDIRECTION +) + +func (i ConnectionDirection) String() string { + return []string{"unknown", "inbound", "outbound", "unknownFutureValue"}[i] +} +func ParseConnectionDirection(v string) (interface{}, error) { + result := UNKNOWN_CONNECTIONDIRECTION + switch v { + case "unknown": + result = UNKNOWN_CONNECTIONDIRECTION + case "inbound": + result = INBOUND_CONNECTIONDIRECTION + case "outbound": + result = OUTBOUND_CONNECTIONDIRECTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTIONDIRECTION + default: + return 0, errors.New("Unknown ConnectionDirection value: " + v) + } + return &result, nil +} +func SerializeConnectionDirection(values []ConnectionDirection) []string { + 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/connection_info.go b/src/internal/connector/graph/betasdk/models/connection_info.go new file mode 100644 index 000000000..c961bdcff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_info.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionInfo +type ConnectionInfo 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 OdataType property + odataType *string + // The endpoint that is used by Entitlement Management to communicate with the access package resource. + url *string +} +// NewConnectionInfo instantiates a new connectionInfo and sets the default values. +func NewConnectionInfo()(*ConnectionInfo) { + m := &ConnectionInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConnectionInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionInfo(), 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 *ConnectionInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ConnectionInfo) GetOdataType()(*string) { + return m.odataType +} +// GetUrl gets the url property value. The endpoint that is used by Entitlement Management to communicate with the access package resource. +func (m *ConnectionInfo) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *ConnectionInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *ConnectionInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ConnectionInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrl sets the url property value. The endpoint that is used by Entitlement Management to communicate with the access package resource. +func (m *ConnectionInfo) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/connection_infoable.go b/src/internal/connector/graph/betasdk/models/connection_infoable.go new file mode 100644 index 000000000..65da73d7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionInfoable +type ConnectionInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetUrl()(*string) + SetOdataType(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/connection_operation.go b/src/internal/connector/graph/betasdk/models/connection_operation.go new file mode 100644 index 000000000..2f30d50a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_operation.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionOperation +type ConnectionOperation struct { + Entity + // The error property + error PublicErrorable + // The status property + status *ConnectionOperationStatus +} +// NewConnectionOperation instantiates a new ConnectionOperation and sets the default values. +func NewConnectionOperation()(*ConnectionOperation) { + m := &ConnectionOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateConnectionOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionOperation(), nil +} +// GetError gets the error property value. The error property +func (m *ConnectionOperation) GetError()(PublicErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(PublicErrorable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ConnectionOperationStatus)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +func (m *ConnectionOperation) GetStatus()(*ConnectionOperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *ConnectionOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetError sets the error property value. The error property +func (m *ConnectionOperation) SetError(value PublicErrorable)() { + m.error = value +} +// SetStatus sets the status property value. The status property +func (m *ConnectionOperation) SetStatus(value *ConnectionOperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/connection_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/connection_operation_collection_response.go new file mode 100644 index 000000000..79d0c1748 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionOperationCollectionResponse +type ConnectionOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConnectionOperationable +} +// NewConnectionOperationCollectionResponse instantiates a new ConnectionOperationCollectionResponse and sets the default values. +func NewConnectionOperationCollectionResponse()(*ConnectionOperationCollectionResponse) { + m := &ConnectionOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConnectionOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectionOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectionOperationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectionOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConnectionOperationCollectionResponse) GetValue()([]ConnectionOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConnectionOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConnectionOperationCollectionResponse) SetValue(value []ConnectionOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/connection_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/connection_operation_collection_responseable.go new file mode 100644 index 000000000..fe76b4800 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionOperationCollectionResponseable +type ConnectionOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConnectionOperationable) + SetValue(value []ConnectionOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/connection_operation_status.go b/src/internal/connector/graph/betasdk/models/connection_operation_status.go new file mode 100644 index 000000000..299b09907 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_operation_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionOperationStatus int + +const ( + UNSPECIFIED_CONNECTIONOPERATIONSTATUS ConnectionOperationStatus = iota + INPROGRESS_CONNECTIONOPERATIONSTATUS + COMPLETED_CONNECTIONOPERATIONSTATUS + FAILED_CONNECTIONOPERATIONSTATUS +) + +func (i ConnectionOperationStatus) String() string { + return []string{"unspecified", "inprogress", "completed", "failed"}[i] +} +func ParseConnectionOperationStatus(v string) (interface{}, error) { + result := UNSPECIFIED_CONNECTIONOPERATIONSTATUS + switch v { + case "unspecified": + result = UNSPECIFIED_CONNECTIONOPERATIONSTATUS + case "inprogress": + result = INPROGRESS_CONNECTIONOPERATIONSTATUS + case "completed": + result = COMPLETED_CONNECTIONOPERATIONSTATUS + case "failed": + result = FAILED_CONNECTIONOPERATIONSTATUS + default: + return 0, errors.New("Unknown ConnectionOperationStatus value: " + v) + } + return &result, nil +} +func SerializeConnectionOperationStatus(values []ConnectionOperationStatus) []string { + 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/connection_operationable.go b/src/internal/connector/graph/betasdk/models/connection_operationable.go new file mode 100644 index 000000000..6a15fbc21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_operationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectionOperationable +type ConnectionOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(PublicErrorable) + GetStatus()(*ConnectionOperationStatus) + SetError(value PublicErrorable)() + SetStatus(value *ConnectionOperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/connection_state.go b/src/internal/connector/graph/betasdk/models/connection_state.go new file mode 100644 index 000000000..3e943f945 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionState int + +const ( + DRAFT_CONNECTIONSTATE ConnectionState = iota + READY_CONNECTIONSTATE + OBSOLETE_CONNECTIONSTATE + LIMITEXCEEDED_CONNECTIONSTATE + UNKNOWNFUTUREVALUE_CONNECTIONSTATE +) + +func (i ConnectionState) String() string { + return []string{"draft", "ready", "obsolete", "limitExceeded", "unknownFutureValue"}[i] +} +func ParseConnectionState(v string) (interface{}, error) { + result := DRAFT_CONNECTIONSTATE + switch v { + case "draft": + result = DRAFT_CONNECTIONSTATE + case "ready": + result = READY_CONNECTIONSTATE + case "obsolete": + result = OBSOLETE_CONNECTIONSTATE + case "limitExceeded": + result = LIMITEXCEEDED_CONNECTIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTIONSTATE + default: + return 0, errors.New("Unknown ConnectionState value: " + v) + } + return &result, nil +} +func SerializeConnectionState(values []ConnectionState) []string { + 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/connection_status.go b/src/internal/connector/graph/betasdk/models/connection_status.go new file mode 100644 index 000000000..fbdac388f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connection_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionStatus int + +const ( + UNKNOWN_CONNECTIONSTATUS ConnectionStatus = iota + ATTEMPTED_CONNECTIONSTATUS + SUCCEEDED_CONNECTIONSTATUS + BLOCKED_CONNECTIONSTATUS + FAILED_CONNECTIONSTATUS + UNKNOWNFUTUREVALUE_CONNECTIONSTATUS +) + +func (i ConnectionStatus) String() string { + return []string{"unknown", "attempted", "succeeded", "blocked", "failed", "unknownFutureValue"}[i] +} +func ParseConnectionStatus(v string) (interface{}, error) { + result := UNKNOWN_CONNECTIONSTATUS + switch v { + case "unknown": + result = UNKNOWN_CONNECTIONSTATUS + case "attempted": + result = ATTEMPTED_CONNECTIONSTATUS + case "succeeded": + result = SUCCEEDED_CONNECTIONSTATUS + case "blocked": + result = BLOCKED_CONNECTIONSTATUS + case "failed": + result = FAILED_CONNECTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTIONSTATUS + default: + return 0, errors.New("Unknown ConnectionStatus value: " + v) + } + return &result, nil +} +func SerializeConnectionStatus(values []ConnectionStatus) []string { + 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/connector.go b/src/internal/connector/graph/betasdk/models/connector.go new file mode 100644 index 000000000..84cdb4547 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector.go @@ -0,0 +1,147 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Connector provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Connector struct { + Entity + // The external IP address as detected by the the connector server. Read-only. + externalIp *string + // The machine name the connector is installed and running on. + machineName *string + // The connectorGroup that the connector is a member of. Read-only. + memberOf []ConnectorGroupable + // The status property + status *ConnectorStatus +} +// NewConnector instantiates a new connector and sets the default values. +func NewConnector()(*Connector) { + m := &Connector{ + Entity: *NewEntity(), + } + return m +} +// CreateConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnector(), nil +} +// GetExternalIp gets the externalIp property value. The external IP address as detected by the the connector server. Read-only. +func (m *Connector) GetExternalIp()(*string) { + return m.externalIp +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Connector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["externalIp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalIp(val) + } + return nil + } + res["machineName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachineName(val) + } + return nil + } + res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectorGroupable, len(val)) + for i, v := range val { + res[i] = v.(ConnectorGroupable) + } + m.SetMemberOf(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectorStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ConnectorStatus)) + } + return nil + } + return res +} +// GetMachineName gets the machineName property value. The machine name the connector is installed and running on. +func (m *Connector) GetMachineName()(*string) { + return m.machineName +} +// GetMemberOf gets the memberOf property value. The connectorGroup that the connector is a member of. Read-only. +func (m *Connector) GetMemberOf()([]ConnectorGroupable) { + return m.memberOf +} +// GetStatus gets the status property value. The status property +func (m *Connector) GetStatus()(*ConnectorStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *Connector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("externalIp", m.GetExternalIp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("machineName", m.GetMachineName()) + if err != nil { + return err + } + } + if m.GetMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf())) + for i, v := range m.GetMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("memberOf", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetExternalIp sets the externalIp property value. The external IP address as detected by the the connector server. Read-only. +func (m *Connector) SetExternalIp(value *string)() { + m.externalIp = value +} +// SetMachineName sets the machineName property value. The machine name the connector is installed and running on. +func (m *Connector) SetMachineName(value *string)() { + m.machineName = value +} +// SetMemberOf sets the memberOf property value. The connectorGroup that the connector is a member of. Read-only. +func (m *Connector) SetMemberOf(value []ConnectorGroupable)() { + m.memberOf = value +} +// SetStatus sets the status property value. The status property +func (m *Connector) SetStatus(value *ConnectorStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/connector_collection_response.go b/src/internal/connector/graph/betasdk/models/connector_collection_response.go new file mode 100644 index 000000000..a0d4a2bb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorCollectionResponse +type ConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Connectorable +} +// NewConnectorCollectionResponse instantiates a new ConnectorCollectionResponse and sets the default values. +func NewConnectorCollectionResponse()(*ConnectorCollectionResponse) { + m := &ConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Connectorable, len(val)) + for i, v := range val { + res[i] = v.(Connectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConnectorCollectionResponse) GetValue()([]Connectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConnectorCollectionResponse) SetValue(value []Connectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/connector_collection_responseable.go new file mode 100644 index 000000000..f0f241920 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorCollectionResponseable +type ConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Connectorable) + SetValue(value []Connectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/connector_group.go b/src/internal/connector/graph/betasdk/models/connector_group.go new file mode 100644 index 000000000..cee882050 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_group.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorGroup +type ConnectorGroup struct { + Entity + // The applications property + applications []Applicationable + // The connectorGroupType property + connectorGroupType *ConnectorGroupType + // Indicates if the connectorGroup is the default connectorGroup. Only a single connector group can be the default connectorGroup and this is pre-set by the system. Read-only. + isDefault *bool + // The members property + members []Connectorable + // The name associated with the connectorGroup. + name *string + // The region the connectorGroup is assigned to and will optimize traffic for. This region can only be set if no connectors or applications are assigned to the connectorGroup. The possible values are: nam (for North America), eur (for Europe), aus (for Australia), asia (for Asia), ind (for India), and unknownFutureValue. + region *ConnectorGroupRegion +} +// NewConnectorGroup instantiates a new connectorGroup and sets the default values. +func NewConnectorGroup()(*ConnectorGroup) { + m := &ConnectorGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateConnectorGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectorGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectorGroup(), nil +} +// GetApplications gets the applications property value. The applications property +func (m *ConnectorGroup) GetApplications()([]Applicationable) { + return m.applications +} +// GetConnectorGroupType gets the connectorGroupType property value. The connectorGroupType property +func (m *ConnectorGroup) GetConnectorGroupType()(*ConnectorGroupType) { + return m.connectorGroupType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectorGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Applicationable, len(val)) + for i, v := range val { + res[i] = v.(Applicationable) + } + m.SetApplications(res) + } + return nil + } + res["connectorGroupType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectorGroupType) + if err != nil { + return err + } + if val != nil { + m.SetConnectorGroupType(val.(*ConnectorGroupType)) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Connectorable, len(val)) + for i, v := range val { + res[i] = v.(Connectorable) + } + m.SetMembers(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectorGroupRegion) + if err != nil { + return err + } + if val != nil { + m.SetRegion(val.(*ConnectorGroupRegion)) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates if the connectorGroup is the default connectorGroup. Only a single connector group can be the default connectorGroup and this is pre-set by the system. Read-only. +func (m *ConnectorGroup) GetIsDefault()(*bool) { + return m.isDefault +} +// GetMembers gets the members property value. The members property +func (m *ConnectorGroup) GetMembers()([]Connectorable) { + return m.members +} +// GetName gets the name property value. The name associated with the connectorGroup. +func (m *ConnectorGroup) GetName()(*string) { + return m.name +} +// GetRegion gets the region property value. The region the connectorGroup is assigned to and will optimize traffic for. This region can only be set if no connectors or applications are assigned to the connectorGroup. The possible values are: nam (for North America), eur (for Europe), aus (for Australia), asia (for Asia), ind (for India), and unknownFutureValue. +func (m *ConnectorGroup) GetRegion()(*ConnectorGroupRegion) { + return m.region +} +// Serialize serializes information the current object +func (m *ConnectorGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApplications())) + for i, v := range m.GetApplications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("applications", cast) + if err != nil { + return err + } + } + if m.GetConnectorGroupType() != nil { + cast := (*m.GetConnectorGroupType()).String() + err = writer.WriteStringValue("connectorGroupType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetRegion() != nil { + cast := (*m.GetRegion()).String() + err = writer.WriteStringValue("region", &cast) + if err != nil { + return err + } + } + return nil +} +// SetApplications sets the applications property value. The applications property +func (m *ConnectorGroup) SetApplications(value []Applicationable)() { + m.applications = value +} +// SetConnectorGroupType sets the connectorGroupType property value. The connectorGroupType property +func (m *ConnectorGroup) SetConnectorGroupType(value *ConnectorGroupType)() { + m.connectorGroupType = value +} +// SetIsDefault sets the isDefault property value. Indicates if the connectorGroup is the default connectorGroup. Only a single connector group can be the default connectorGroup and this is pre-set by the system. Read-only. +func (m *ConnectorGroup) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetMembers sets the members property value. The members property +func (m *ConnectorGroup) SetMembers(value []Connectorable)() { + m.members = value +} +// SetName sets the name property value. The name associated with the connectorGroup. +func (m *ConnectorGroup) SetName(value *string)() { + m.name = value +} +// SetRegion sets the region property value. The region the connectorGroup is assigned to and will optimize traffic for. This region can only be set if no connectors or applications are assigned to the connectorGroup. The possible values are: nam (for North America), eur (for Europe), aus (for Australia), asia (for Asia), ind (for India), and unknownFutureValue. +func (m *ConnectorGroup) SetRegion(value *ConnectorGroupRegion)() { + m.region = value +} diff --git a/src/internal/connector/graph/betasdk/models/connector_group_collection_response.go b/src/internal/connector/graph/betasdk/models/connector_group_collection_response.go new file mode 100644 index 000000000..dae6c17d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorGroupCollectionResponse +type ConnectorGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConnectorGroupable +} +// NewConnectorGroupCollectionResponse instantiates a new ConnectorGroupCollectionResponse and sets the default values. +func NewConnectorGroupCollectionResponse()(*ConnectorGroupCollectionResponse) { + m := &ConnectorGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConnectorGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectorGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectorGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectorGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectorGroupable, len(val)) + for i, v := range val { + res[i] = v.(ConnectorGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConnectorGroupCollectionResponse) GetValue()([]ConnectorGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConnectorGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConnectorGroupCollectionResponse) SetValue(value []ConnectorGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/connector_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/connector_group_collection_responseable.go new file mode 100644 index 000000000..a5f74fe4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorGroupCollectionResponseable +type ConnectorGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConnectorGroupable) + SetValue(value []ConnectorGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/connector_group_region.go b/src/internal/connector/graph/betasdk/models/connector_group_region.go new file mode 100644 index 000000000..6de6fe5a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_group_region.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectorGroupRegion int + +const ( + NAM_CONNECTORGROUPREGION ConnectorGroupRegion = iota + EUR_CONNECTORGROUPREGION + AUS_CONNECTORGROUPREGION + ASIA_CONNECTORGROUPREGION + IND_CONNECTORGROUPREGION + UNKNOWNFUTUREVALUE_CONNECTORGROUPREGION +) + +func (i ConnectorGroupRegion) String() string { + return []string{"nam", "eur", "aus", "asia", "ind", "unknownFutureValue"}[i] +} +func ParseConnectorGroupRegion(v string) (interface{}, error) { + result := NAM_CONNECTORGROUPREGION + switch v { + case "nam": + result = NAM_CONNECTORGROUPREGION + case "eur": + result = EUR_CONNECTORGROUPREGION + case "aus": + result = AUS_CONNECTORGROUPREGION + case "asia": + result = ASIA_CONNECTORGROUPREGION + case "ind": + result = IND_CONNECTORGROUPREGION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTORGROUPREGION + default: + return 0, errors.New("Unknown ConnectorGroupRegion value: " + v) + } + return &result, nil +} +func SerializeConnectorGroupRegion(values []ConnectorGroupRegion) []string { + 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/connector_group_type.go b/src/internal/connector/graph/betasdk/models/connector_group_type.go new file mode 100644 index 000000000..4a0633906 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_group_type.go @@ -0,0 +1,31 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectorGroupType int + +const ( + APPLICATIONPROXY_CONNECTORGROUPTYPE ConnectorGroupType = iota +) + +func (i ConnectorGroupType) String() string { + return []string{"applicationProxy"}[i] +} +func ParseConnectorGroupType(v string) (interface{}, error) { + result := APPLICATIONPROXY_CONNECTORGROUPTYPE + switch v { + case "applicationProxy": + result = APPLICATIONPROXY_CONNECTORGROUPTYPE + default: + return 0, errors.New("Unknown ConnectorGroupType value: " + v) + } + return &result, nil +} +func SerializeConnectorGroupType(values []ConnectorGroupType) []string { + 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/connector_groupable.go b/src/internal/connector/graph/betasdk/models/connector_groupable.go new file mode 100644 index 000000000..86cc6e532 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_groupable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConnectorGroupable +type ConnectorGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplications()([]Applicationable) + GetConnectorGroupType()(*ConnectorGroupType) + GetIsDefault()(*bool) + GetMembers()([]Connectorable) + GetName()(*string) + GetRegion()(*ConnectorGroupRegion) + SetApplications(value []Applicationable)() + SetConnectorGroupType(value *ConnectorGroupType)() + SetIsDefault(value *bool)() + SetMembers(value []Connectorable)() + SetName(value *string)() + SetRegion(value *ConnectorGroupRegion)() +} diff --git a/src/internal/connector/graph/betasdk/models/connector_status.go b/src/internal/connector/graph/betasdk/models/connector_status.go new file mode 100644 index 000000000..71353a0be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connector_status.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectorStatus int + +const ( + ACTIVE_CONNECTORSTATUS ConnectorStatus = iota + INACTIVE_CONNECTORSTATUS +) + +func (i ConnectorStatus) String() string { + return []string{"active", "inactive"}[i] +} +func ParseConnectorStatus(v string) (interface{}, error) { + result := ACTIVE_CONNECTORSTATUS + switch v { + case "active": + result = ACTIVE_CONNECTORSTATUS + case "inactive": + result = INACTIVE_CONNECTORSTATUS + default: + return 0, errors.New("Unknown ConnectorStatus value: " + v) + } + return &result, nil +} +func SerializeConnectorStatus(values []ConnectorStatus) []string { + 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/connectorable.go b/src/internal/connector/graph/betasdk/models/connectorable.go new file mode 100644 index 000000000..99e69f593 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/connectorable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Connectorable +type Connectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalIp()(*string) + GetMachineName()(*string) + GetMemberOf()([]ConnectorGroupable) + GetStatus()(*ConnectorStatus) + SetExternalIp(value *string)() + SetMachineName(value *string)() + SetMemberOf(value []ConnectorGroupable)() + SetStatus(value *ConnectorStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/contact.go b/src/internal/connector/graph/betasdk/models/contact.go new file mode 100644 index 000000000..99848aa18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact.go @@ -0,0 +1,1063 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Contact +type Contact struct { + OutlookItem + // The name of the contact's assistant. + assistantName *string + // The contact's birthday. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + birthday *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The names of the contact's children. + children []string + // The name of the contact's company. + companyName *string + // The contact's department. + department *string + // The contact's display name. You can specify the display name in a create or update operation. Note that later updates to other properties may cause an automatically generated value to overwrite the displayName value you have specified. To preserve a pre-existing value, always include it as displayName in an update operation. + displayName *string + // The contact's email addresses. + emailAddresses []TypedEmailAddressable + // The collection of open extensions defined for the contact. Nullable. + extensions []Extensionable + // The name the contact is filed under. + fileAs *string + // The flag value that indicates the status, start date, due date, or completion date for the contact. + flag FollowupFlagable + // The contact's gender. + gender *string + // The contact's generation. + generation *string + // The contact's given name. + givenName *string + // The imAddresses property + imAddresses []string + // The initials property + initials *string + // The isFavorite property + isFavorite *bool + // The jobTitle property + jobTitle *string + // The manager property + manager *string + // The middleName property + middleName *string + // The collection of multi-value extended properties defined for the contact. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The nickName property + nickName *string + // The officeLocation property + officeLocation *string + // The parentFolderId property + parentFolderId *string + // The personalNotes property + personalNotes *string + // The phones property + phones []Phoneable + // Optional contact picture. You can get or set a photo for a contact. + photo ProfilePhotoable + // The postalAddresses property + postalAddresses []PhysicalAddressable + // The profession property + profession *string + // The collection of single-value extended properties defined for the contact. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The spouseName property + spouseName *string + // The surname property + surname *string + // The title property + title *string + // The websites property + websites []Websiteable + // The weddingAnniversary property + weddingAnniversary *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The yomiCompanyName property + yomiCompanyName *string + // The yomiGivenName property + yomiGivenName *string + // The yomiSurname property + yomiSurname *string +} +// NewContact instantiates a new Contact and sets the default values. +func NewContact()(*Contact) { + m := &Contact{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.contact"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateContactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContact(), nil +} +// GetAssistantName gets the assistantName property value. The name of the contact's assistant. +func (m *Contact) GetAssistantName()(*string) { + return m.assistantName +} +// GetBirthday gets the birthday property value. The contact's birthday. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Contact) GetBirthday()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.birthday +} +// GetChildren gets the children property value. The names of the contact's children. +func (m *Contact) GetChildren()([]string) { + return m.children +} +// GetCompanyName gets the companyName property value. The name of the contact's company. +func (m *Contact) GetCompanyName()(*string) { + return m.companyName +} +// GetDepartment gets the department property value. The contact's department. +func (m *Contact) GetDepartment()(*string) { + return m.department +} +// GetDisplayName gets the displayName property value. The contact's display name. You can specify the display name in a create or update operation. Note that later updates to other properties may cause an automatically generated value to overwrite the displayName value you have specified. To preserve a pre-existing value, always include it as displayName in an update operation. +func (m *Contact) GetDisplayName()(*string) { + return m.displayName +} +// GetEmailAddresses gets the emailAddresses property value. The contact's email addresses. +func (m *Contact) GetEmailAddresses()([]TypedEmailAddressable) { + return m.emailAddresses +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the contact. Nullable. +func (m *Contact) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Contact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["assistantName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssistantName(val) + } + return nil + } + res["birthday"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetBirthday(val) + } + return nil + } + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetChildren(res) + } + return nil + } + res["companyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompanyName(val) + } + return nil + } + res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDepartment(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTypedEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TypedEmailAddressable, len(val)) + for i, v := range val { + res[i] = v.(TypedEmailAddressable) + } + m.SetEmailAddresses(res) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["fileAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileAs(val) + } + return nil + } + res["flag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFollowupFlagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFlag(val.(FollowupFlagable)) + } + return nil + } + res["gender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGender(val) + } + return nil + } + res["generation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGeneration(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["imAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetImAddresses(res) + } + return nil + } + res["initials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitials(val) + } + return nil + } + res["isFavorite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFavorite(val) + } + return nil + } + res["jobTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobTitle(val) + } + return nil + } + res["manager"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManager(val) + } + return nil + } + res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddleName(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["nickName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNickName(val) + } + return nil + } + res["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeLocation(val) + } + return nil + } + res["parentFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentFolderId(val) + } + return nil + } + res["personalNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalNotes(val) + } + return nil + } + res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetPhones(res) + } + return nil + } + res["photo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProfilePhotoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPhoto(val.(ProfilePhotoable)) + } + return nil + } + res["postalAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhysicalAddressable, len(val)) + for i, v := range val { + res[i] = v.(PhysicalAddressable) + } + m.SetPostalAddresses(res) + } + return nil + } + res["profession"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfession(val) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["spouseName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpouseName(val) + } + return nil + } + res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["websites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWebsiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Websiteable, len(val)) + for i, v := range val { + res[i] = v.(Websiteable) + } + m.SetWebsites(res) + } + return nil + } + res["weddingAnniversary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetWeddingAnniversary(val) + } + return nil + } + res["yomiCompanyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetYomiCompanyName(val) + } + return nil + } + res["yomiGivenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetYomiGivenName(val) + } + return nil + } + res["yomiSurname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetYomiSurname(val) + } + return nil + } + return res +} +// GetFileAs gets the fileAs property value. The name the contact is filed under. +func (m *Contact) GetFileAs()(*string) { + return m.fileAs +} +// GetFlag gets the flag property value. The flag value that indicates the status, start date, due date, or completion date for the contact. +func (m *Contact) GetFlag()(FollowupFlagable) { + return m.flag +} +// GetGender gets the gender property value. The contact's gender. +func (m *Contact) GetGender()(*string) { + return m.gender +} +// GetGeneration gets the generation property value. The contact's generation. +func (m *Contact) GetGeneration()(*string) { + return m.generation +} +// GetGivenName gets the givenName property value. The contact's given name. +func (m *Contact) GetGivenName()(*string) { + return m.givenName +} +// GetImAddresses gets the imAddresses property value. The imAddresses property +func (m *Contact) GetImAddresses()([]string) { + return m.imAddresses +} +// GetInitials gets the initials property value. The initials property +func (m *Contact) GetInitials()(*string) { + return m.initials +} +// GetIsFavorite gets the isFavorite property value. The isFavorite property +func (m *Contact) GetIsFavorite()(*bool) { + return m.isFavorite +} +// GetJobTitle gets the jobTitle property value. The jobTitle property +func (m *Contact) GetJobTitle()(*string) { + return m.jobTitle +} +// GetManager gets the manager property value. The manager property +func (m *Contact) GetManager()(*string) { + return m.manager +} +// GetMiddleName gets the middleName property value. The middleName property +func (m *Contact) GetMiddleName()(*string) { + return m.middleName +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the contact. Read-only. Nullable. +func (m *Contact) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetNickName gets the nickName property value. The nickName property +func (m *Contact) GetNickName()(*string) { + return m.nickName +} +// GetOfficeLocation gets the officeLocation property value. The officeLocation property +func (m *Contact) GetOfficeLocation()(*string) { + return m.officeLocation +} +// GetParentFolderId gets the parentFolderId property value. The parentFolderId property +func (m *Contact) GetParentFolderId()(*string) { + return m.parentFolderId +} +// GetPersonalNotes gets the personalNotes property value. The personalNotes property +func (m *Contact) GetPersonalNotes()(*string) { + return m.personalNotes +} +// GetPhones gets the phones property value. The phones property +func (m *Contact) GetPhones()([]Phoneable) { + return m.phones +} +// GetPhoto gets the photo property value. Optional contact picture. You can get or set a photo for a contact. +func (m *Contact) GetPhoto()(ProfilePhotoable) { + return m.photo +} +// GetPostalAddresses gets the postalAddresses property value. The postalAddresses property +func (m *Contact) GetPostalAddresses()([]PhysicalAddressable) { + return m.postalAddresses +} +// GetProfession gets the profession property value. The profession property +func (m *Contact) GetProfession()(*string) { + return m.profession +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the contact. Read-only. Nullable. +func (m *Contact) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetSpouseName gets the spouseName property value. The spouseName property +func (m *Contact) GetSpouseName()(*string) { + return m.spouseName +} +// GetSurname gets the surname property value. The surname property +func (m *Contact) GetSurname()(*string) { + return m.surname +} +// GetTitle gets the title property value. The title property +func (m *Contact) GetTitle()(*string) { + return m.title +} +// GetWebsites gets the websites property value. The websites property +func (m *Contact) GetWebsites()([]Websiteable) { + return m.websites +} +// GetWeddingAnniversary gets the weddingAnniversary property value. The weddingAnniversary property +func (m *Contact) GetWeddingAnniversary()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.weddingAnniversary +} +// GetYomiCompanyName gets the yomiCompanyName property value. The yomiCompanyName property +func (m *Contact) GetYomiCompanyName()(*string) { + return m.yomiCompanyName +} +// GetYomiGivenName gets the yomiGivenName property value. The yomiGivenName property +func (m *Contact) GetYomiGivenName()(*string) { + return m.yomiGivenName +} +// GetYomiSurname gets the yomiSurname property value. The yomiSurname property +func (m *Contact) GetYomiSurname()(*string) { + return m.yomiSurname +} +// Serialize serializes information the current object +func (m *Contact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assistantName", m.GetAssistantName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("birthday", m.GetBirthday()) + if err != nil { + return err + } + } + if m.GetChildren() != nil { + err = writer.WriteCollectionOfStringValues("children", m.GetChildren()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("companyName", m.GetCompanyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("department", m.GetDepartment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmailAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailAddresses())) + for i, v := range m.GetEmailAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailAddresses", cast) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileAs", m.GetFileAs()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("flag", m.GetFlag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("gender", m.GetGender()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("generation", m.GetGeneration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + if m.GetImAddresses() != nil { + err = writer.WriteCollectionOfStringValues("imAddresses", m.GetImAddresses()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initials", m.GetInitials()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFavorite", m.GetIsFavorite()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("jobTitle", m.GetJobTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manager", m.GetManager()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("middleName", m.GetMiddleName()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("nickName", m.GetNickName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("officeLocation", m.GetOfficeLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentFolderId", m.GetParentFolderId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("personalNotes", m.GetPersonalNotes()) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("photo", m.GetPhoto()) + if err != nil { + return err + } + } + if m.GetPostalAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPostalAddresses())) + for i, v := range m.GetPostalAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("postalAddresses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("profession", m.GetProfession()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("spouseName", m.GetSpouseName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + if m.GetWebsites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebsites())) + for i, v := range m.GetWebsites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("websites", cast) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("weddingAnniversary", m.GetWeddingAnniversary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("yomiCompanyName", m.GetYomiCompanyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("yomiGivenName", m.GetYomiGivenName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("yomiSurname", m.GetYomiSurname()) + if err != nil { + return err + } + } + return nil +} +// SetAssistantName sets the assistantName property value. The name of the contact's assistant. +func (m *Contact) SetAssistantName(value *string)() { + m.assistantName = value +} +// SetBirthday sets the birthday property value. The contact's birthday. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Contact) SetBirthday(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.birthday = value +} +// SetChildren sets the children property value. The names of the contact's children. +func (m *Contact) SetChildren(value []string)() { + m.children = value +} +// SetCompanyName sets the companyName property value. The name of the contact's company. +func (m *Contact) SetCompanyName(value *string)() { + m.companyName = value +} +// SetDepartment sets the department property value. The contact's department. +func (m *Contact) SetDepartment(value *string)() { + m.department = value +} +// SetDisplayName sets the displayName property value. The contact's display name. You can specify the display name in a create or update operation. Note that later updates to other properties may cause an automatically generated value to overwrite the displayName value you have specified. To preserve a pre-existing value, always include it as displayName in an update operation. +func (m *Contact) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmailAddresses sets the emailAddresses property value. The contact's email addresses. +func (m *Contact) SetEmailAddresses(value []TypedEmailAddressable)() { + m.emailAddresses = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the contact. Nullable. +func (m *Contact) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetFileAs sets the fileAs property value. The name the contact is filed under. +func (m *Contact) SetFileAs(value *string)() { + m.fileAs = value +} +// SetFlag sets the flag property value. The flag value that indicates the status, start date, due date, or completion date for the contact. +func (m *Contact) SetFlag(value FollowupFlagable)() { + m.flag = value +} +// SetGender sets the gender property value. The contact's gender. +func (m *Contact) SetGender(value *string)() { + m.gender = value +} +// SetGeneration sets the generation property value. The contact's generation. +func (m *Contact) SetGeneration(value *string)() { + m.generation = value +} +// SetGivenName sets the givenName property value. The contact's given name. +func (m *Contact) SetGivenName(value *string)() { + m.givenName = value +} +// SetImAddresses sets the imAddresses property value. The imAddresses property +func (m *Contact) SetImAddresses(value []string)() { + m.imAddresses = value +} +// SetInitials sets the initials property value. The initials property +func (m *Contact) SetInitials(value *string)() { + m.initials = value +} +// SetIsFavorite sets the isFavorite property value. The isFavorite property +func (m *Contact) SetIsFavorite(value *bool)() { + m.isFavorite = value +} +// SetJobTitle sets the jobTitle property value. The jobTitle property +func (m *Contact) SetJobTitle(value *string)() { + m.jobTitle = value +} +// SetManager sets the manager property value. The manager property +func (m *Contact) SetManager(value *string)() { + m.manager = value +} +// SetMiddleName sets the middleName property value. The middleName property +func (m *Contact) SetMiddleName(value *string)() { + m.middleName = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the contact. Read-only. Nullable. +func (m *Contact) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetNickName sets the nickName property value. The nickName property +func (m *Contact) SetNickName(value *string)() { + m.nickName = value +} +// SetOfficeLocation sets the officeLocation property value. The officeLocation property +func (m *Contact) SetOfficeLocation(value *string)() { + m.officeLocation = value +} +// SetParentFolderId sets the parentFolderId property value. The parentFolderId property +func (m *Contact) SetParentFolderId(value *string)() { + m.parentFolderId = value +} +// SetPersonalNotes sets the personalNotes property value. The personalNotes property +func (m *Contact) SetPersonalNotes(value *string)() { + m.personalNotes = value +} +// SetPhones sets the phones property value. The phones property +func (m *Contact) SetPhones(value []Phoneable)() { + m.phones = value +} +// SetPhoto sets the photo property value. Optional contact picture. You can get or set a photo for a contact. +func (m *Contact) SetPhoto(value ProfilePhotoable)() { + m.photo = value +} +// SetPostalAddresses sets the postalAddresses property value. The postalAddresses property +func (m *Contact) SetPostalAddresses(value []PhysicalAddressable)() { + m.postalAddresses = value +} +// SetProfession sets the profession property value. The profession property +func (m *Contact) SetProfession(value *string)() { + m.profession = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the contact. Read-only. Nullable. +func (m *Contact) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetSpouseName sets the spouseName property value. The spouseName property +func (m *Contact) SetSpouseName(value *string)() { + m.spouseName = value +} +// SetSurname sets the surname property value. The surname property +func (m *Contact) SetSurname(value *string)() { + m.surname = value +} +// SetTitle sets the title property value. The title property +func (m *Contact) SetTitle(value *string)() { + m.title = value +} +// SetWebsites sets the websites property value. The websites property +func (m *Contact) SetWebsites(value []Websiteable)() { + m.websites = value +} +// SetWeddingAnniversary sets the weddingAnniversary property value. The weddingAnniversary property +func (m *Contact) SetWeddingAnniversary(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.weddingAnniversary = value +} +// SetYomiCompanyName sets the yomiCompanyName property value. The yomiCompanyName property +func (m *Contact) SetYomiCompanyName(value *string)() { + m.yomiCompanyName = value +} +// SetYomiGivenName sets the yomiGivenName property value. The yomiGivenName property +func (m *Contact) SetYomiGivenName(value *string)() { + m.yomiGivenName = value +} +// SetYomiSurname sets the yomiSurname property value. The yomiSurname property +func (m *Contact) SetYomiSurname(value *string)() { + m.yomiSurname = value +} diff --git a/src/internal/connector/graph/betasdk/models/contact_collection_response.go b/src/internal/connector/graph/betasdk/models/contact_collection_response.go new file mode 100644 index 000000000..67d4e4f9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactCollectionResponse +type ContactCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Contactable +} +// NewContactCollectionResponse instantiates a new ContactCollectionResponse and sets the default values. +func NewContactCollectionResponse()(*ContactCollectionResponse) { + m := &ContactCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContactCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContactCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContactCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContactCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Contactable, len(val)) + for i, v := range val { + res[i] = v.(Contactable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContactCollectionResponse) GetValue()([]Contactable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContactCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContactCollectionResponse) SetValue(value []Contactable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/contact_collection_responseable.go b/src/internal/connector/graph/betasdk/models/contact_collection_responseable.go new file mode 100644 index 000000000..fa20fde6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactCollectionResponseable +type ContactCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Contactable) + SetValue(value []Contactable)() +} diff --git a/src/internal/connector/graph/betasdk/models/contact_folder.go b/src/internal/connector/graph/betasdk/models/contact_folder.go new file mode 100644 index 000000000..85e2c10c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_folder.go @@ -0,0 +1,248 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactFolder provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContactFolder struct { + Entity + // The collection of child folders in the folder. Navigation property. Read-only. Nullable. + childFolders []ContactFolderable + // The contacts in the folder. Navigation property. Read-only. Nullable. + contacts []Contactable + // The folder's display name. + displayName *string + // The collection of multi-value extended properties defined for the contactFolder. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The ID of the folder's parent folder. + parentFolderId *string + // The collection of single-value extended properties defined for the contactFolder. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The name of the folder if the folder is a recognized folder. Currently contacts is the only recognized contacts folder. + wellKnownName *string +} +// NewContactFolder instantiates a new contactFolder and sets the default values. +func NewContactFolder()(*ContactFolder) { + m := &ContactFolder{ + Entity: *NewEntity(), + } + return m +} +// CreateContactFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContactFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContactFolder(), nil +} +// GetChildFolders gets the childFolders property value. The collection of child folders in the folder. Navigation property. Read-only. Nullable. +func (m *ContactFolder) GetChildFolders()([]ContactFolderable) { + return m.childFolders +} +// GetContacts gets the contacts property value. The contacts in the folder. Navigation property. Read-only. Nullable. +func (m *ContactFolder) GetContacts()([]Contactable) { + return m.contacts +} +// GetDisplayName gets the displayName property value. The folder's display name. +func (m *ContactFolder) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContactFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["childFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContactFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContactFolderable, len(val)) + for i, v := range val { + res[i] = v.(ContactFolderable) + } + m.SetChildFolders(res) + } + return nil + } + res["contacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Contactable, len(val)) + for i, v := range val { + res[i] = v.(Contactable) + } + m.SetContacts(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["parentFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentFolderId(val) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["wellKnownName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWellKnownName(val) + } + return nil + } + return res +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the contactFolder. Read-only. Nullable. +func (m *ContactFolder) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetParentFolderId gets the parentFolderId property value. The ID of the folder's parent folder. +func (m *ContactFolder) GetParentFolderId()(*string) { + return m.parentFolderId +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the contactFolder. Read-only. Nullable. +func (m *ContactFolder) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetWellKnownName gets the wellKnownName property value. The name of the folder if the folder is a recognized folder. Currently contacts is the only recognized contacts folder. +func (m *ContactFolder) GetWellKnownName()(*string) { + return m.wellKnownName +} +// Serialize serializes information the current object +func (m *ContactFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetChildFolders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildFolders())) + for i, v := range m.GetChildFolders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("childFolders", cast) + if err != nil { + return err + } + } + if m.GetContacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContacts())) + for i, v := range m.GetContacts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contacts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentFolderId", m.GetParentFolderId()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("wellKnownName", m.GetWellKnownName()) + if err != nil { + return err + } + } + return nil +} +// SetChildFolders sets the childFolders property value. The collection of child folders in the folder. Navigation property. Read-only. Nullable. +func (m *ContactFolder) SetChildFolders(value []ContactFolderable)() { + m.childFolders = value +} +// SetContacts sets the contacts property value. The contacts in the folder. Navigation property. Read-only. Nullable. +func (m *ContactFolder) SetContacts(value []Contactable)() { + m.contacts = value +} +// SetDisplayName sets the displayName property value. The folder's display name. +func (m *ContactFolder) SetDisplayName(value *string)() { + m.displayName = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the contactFolder. Read-only. Nullable. +func (m *ContactFolder) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetParentFolderId sets the parentFolderId property value. The ID of the folder's parent folder. +func (m *ContactFolder) SetParentFolderId(value *string)() { + m.parentFolderId = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the contactFolder. Read-only. Nullable. +func (m *ContactFolder) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetWellKnownName sets the wellKnownName property value. The name of the folder if the folder is a recognized folder. Currently contacts is the only recognized contacts folder. +func (m *ContactFolder) SetWellKnownName(value *string)() { + m.wellKnownName = value +} diff --git a/src/internal/connector/graph/betasdk/models/contact_folder_collection_response.go b/src/internal/connector/graph/betasdk/models/contact_folder_collection_response.go new file mode 100644 index 000000000..3f4fe41cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_folder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactFolderCollectionResponse +type ContactFolderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ContactFolderable +} +// NewContactFolderCollectionResponse instantiates a new ContactFolderCollectionResponse and sets the default values. +func NewContactFolderCollectionResponse()(*ContactFolderCollectionResponse) { + m := &ContactFolderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContactFolderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContactFolderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContactFolderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContactFolderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContactFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContactFolderable, len(val)) + for i, v := range val { + res[i] = v.(ContactFolderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContactFolderCollectionResponse) GetValue()([]ContactFolderable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContactFolderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContactFolderCollectionResponse) SetValue(value []ContactFolderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/contact_folder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/contact_folder_collection_responseable.go new file mode 100644 index 000000000..2f471bd0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_folder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactFolderCollectionResponseable +type ContactFolderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ContactFolderable) + SetValue(value []ContactFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/contact_folderable.go b/src/internal/connector/graph/betasdk/models/contact_folderable.go new file mode 100644 index 000000000..acd786195 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_folderable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactFolderable +type ContactFolderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildFolders()([]ContactFolderable) + GetContacts()([]Contactable) + GetDisplayName()(*string) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetParentFolderId()(*string) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetWellKnownName()(*string) + SetChildFolders(value []ContactFolderable)() + SetContacts(value []Contactable)() + SetDisplayName(value *string)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetParentFolderId(value *string)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetWellKnownName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/contact_merge_suggestions.go b/src/internal/connector/graph/betasdk/models/contact_merge_suggestions.go new file mode 100644 index 000000000..c613c6acc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_merge_suggestions.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactMergeSuggestions +type ContactMergeSuggestions struct { + Entity + // true if the duplicate contact merge suggestions feature is enabled for the user; false if the feature is disabled. Default value is true. + isEnabled *bool +} +// NewContactMergeSuggestions instantiates a new contactMergeSuggestions and sets the default values. +func NewContactMergeSuggestions()(*ContactMergeSuggestions) { + m := &ContactMergeSuggestions{ + Entity: *NewEntity(), + } + return m +} +// CreateContactMergeSuggestionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContactMergeSuggestionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContactMergeSuggestions(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContactMergeSuggestions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. true if the duplicate contact merge suggestions feature is enabled for the user; false if the feature is disabled. Default value is true. +func (m *ContactMergeSuggestions) GetIsEnabled()(*bool) { + return m.isEnabled +} +// Serialize serializes information the current object +func (m *ContactMergeSuggestions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetIsEnabled sets the isEnabled property value. true if the duplicate contact merge suggestions feature is enabled for the user; false if the feature is disabled. Default value is true. +func (m *ContactMergeSuggestions) SetIsEnabled(value *bool)() { + m.isEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/contact_merge_suggestionsable.go b/src/internal/connector/graph/betasdk/models/contact_merge_suggestionsable.go new file mode 100644 index 000000000..57632be1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_merge_suggestionsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContactMergeSuggestionsable +type ContactMergeSuggestionsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + SetIsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/contact_relationship.go b/src/internal/connector/graph/betasdk/models/contact_relationship.go new file mode 100644 index 000000000..aed592dc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contact_relationship.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContactRelationship int + +const ( + PARENT_CONTACTRELATIONSHIP ContactRelationship = iota + RELATIVE_CONTACTRELATIONSHIP + AIDE_CONTACTRELATIONSHIP + DOCTOR_CONTACTRELATIONSHIP + GUARDIAN_CONTACTRELATIONSHIP + CHILD_CONTACTRELATIONSHIP + OTHER_CONTACTRELATIONSHIP + UNKNOWNFUTUREVALUE_CONTACTRELATIONSHIP +) + +func (i ContactRelationship) String() string { + return []string{"parent", "relative", "aide", "doctor", "guardian", "child", "other", "unknownFutureValue"}[i] +} +func ParseContactRelationship(v string) (interface{}, error) { + result := PARENT_CONTACTRELATIONSHIP + switch v { + case "parent": + result = PARENT_CONTACTRELATIONSHIP + case "relative": + result = RELATIVE_CONTACTRELATIONSHIP + case "aide": + result = AIDE_CONTACTRELATIONSHIP + case "doctor": + result = DOCTOR_CONTACTRELATIONSHIP + case "guardian": + result = GUARDIAN_CONTACTRELATIONSHIP + case "child": + result = CHILD_CONTACTRELATIONSHIP + case "other": + result = OTHER_CONTACTRELATIONSHIP + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONTACTRELATIONSHIP + default: + return 0, errors.New("Unknown ContactRelationship value: " + v) + } + return &result, nil +} +func SerializeContactRelationship(values []ContactRelationship) []string { + 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/contactable.go b/src/internal/connector/graph/betasdk/models/contactable.go new file mode 100644 index 000000000..494d3d186 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contactable.go @@ -0,0 +1,86 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Contactable +type Contactable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssistantName()(*string) + GetBirthday()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetChildren()([]string) + GetCompanyName()(*string) + GetDepartment()(*string) + GetDisplayName()(*string) + GetEmailAddresses()([]TypedEmailAddressable) + GetExtensions()([]Extensionable) + GetFileAs()(*string) + GetFlag()(FollowupFlagable) + GetGender()(*string) + GetGeneration()(*string) + GetGivenName()(*string) + GetImAddresses()([]string) + GetInitials()(*string) + GetIsFavorite()(*bool) + GetJobTitle()(*string) + GetManager()(*string) + GetMiddleName()(*string) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetNickName()(*string) + GetOfficeLocation()(*string) + GetParentFolderId()(*string) + GetPersonalNotes()(*string) + GetPhones()([]Phoneable) + GetPhoto()(ProfilePhotoable) + GetPostalAddresses()([]PhysicalAddressable) + GetProfession()(*string) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetSpouseName()(*string) + GetSurname()(*string) + GetTitle()(*string) + GetWebsites()([]Websiteable) + GetWeddingAnniversary()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetYomiCompanyName()(*string) + GetYomiGivenName()(*string) + GetYomiSurname()(*string) + SetAssistantName(value *string)() + SetBirthday(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetChildren(value []string)() + SetCompanyName(value *string)() + SetDepartment(value *string)() + SetDisplayName(value *string)() + SetEmailAddresses(value []TypedEmailAddressable)() + SetExtensions(value []Extensionable)() + SetFileAs(value *string)() + SetFlag(value FollowupFlagable)() + SetGender(value *string)() + SetGeneration(value *string)() + SetGivenName(value *string)() + SetImAddresses(value []string)() + SetInitials(value *string)() + SetIsFavorite(value *bool)() + SetJobTitle(value *string)() + SetManager(value *string)() + SetMiddleName(value *string)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetNickName(value *string)() + SetOfficeLocation(value *string)() + SetParentFolderId(value *string)() + SetPersonalNotes(value *string)() + SetPhones(value []Phoneable)() + SetPhoto(value ProfilePhotoable)() + SetPostalAddresses(value []PhysicalAddressable)() + SetProfession(value *string)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetSpouseName(value *string)() + SetSurname(value *string)() + SetTitle(value *string)() + SetWebsites(value []Websiteable)() + SetWeddingAnniversary(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetYomiCompanyName(value *string)() + SetYomiGivenName(value *string)() + SetYomiSurname(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_alignment.go b/src/internal/connector/graph/betasdk/models/content_alignment.go new file mode 100644 index 000000000..e8f388281 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_alignment.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type ContentAlignment int + +const ( + LEFT_CONTENTALIGNMENT ContentAlignment = iota + RIGHT_CONTENTALIGNMENT + CENTER_CONTENTALIGNMENT +) + +func (i ContentAlignment) String() string { + return []string{"left", "right", "center"}[i] +} +func ParseContentAlignment(v string) (interface{}, error) { + result := LEFT_CONTENTALIGNMENT + switch v { + case "left": + result = LEFT_CONTENTALIGNMENT + case "right": + result = RIGHT_CONTENTALIGNMENT + case "center": + result = CENTER_CONTENTALIGNMENT + default: + return 0, errors.New("Unknown ContentAlignment value: " + v) + } + return &result, nil +} +func SerializeContentAlignment(values []ContentAlignment) []string { + 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/content_approval_status_column.go b/src/internal/connector/graph/betasdk/models/content_approval_status_column.go new file mode 100644 index 000000000..d54833b03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_approval_status_column.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentApprovalStatusColumn +type ContentApprovalStatusColumn 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 OdataType property + odataType *string +} +// NewContentApprovalStatusColumn instantiates a new contentApprovalStatusColumn and sets the default values. +func NewContentApprovalStatusColumn()(*ContentApprovalStatusColumn) { + m := &ContentApprovalStatusColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentApprovalStatusColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentApprovalStatusColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentApprovalStatusColumn(), 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 *ContentApprovalStatusColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentApprovalStatusColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentApprovalStatusColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ContentApprovalStatusColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ContentApprovalStatusColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentApprovalStatusColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_approval_status_columnable.go b/src/internal/connector/graph/betasdk/models/content_approval_status_columnable.go new file mode 100644 index 000000000..44e7d30fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_approval_status_columnable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentApprovalStatusColumnable +type ContentApprovalStatusColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_classification.go b/src/internal/connector/graph/betasdk/models/content_classification.go new file mode 100644 index 000000000..f07c2879c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_classification.go @@ -0,0 +1,183 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentClassification +type ContentClassification 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 confidence property + confidence *int32 + // The matches property + matches []MatchLocationable + // The OdataType property + odataType *string + // The sensitiveTypeId property + sensitiveTypeId *string + // The uniqueCount property + uniqueCount *int32 +} +// NewContentClassification instantiates a new contentClassification and sets the default values. +func NewContentClassification()(*ContentClassification) { + m := &ContentClassification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentClassificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentClassificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentClassification(), 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 *ContentClassification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidence gets the confidence property value. The confidence property +func (m *ContentClassification) GetConfidence()(*int32) { + return m.confidence +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentClassification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMatchLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MatchLocationable, len(val)) + for i, v := range val { + res[i] = v.(MatchLocationable) + } + m.SetMatches(res) + } + 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["sensitiveTypeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSensitiveTypeId(val) + } + return nil + } + res["uniqueCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniqueCount(val) + } + return nil + } + return res +} +// GetMatches gets the matches property value. The matches property +func (m *ContentClassification) GetMatches()([]MatchLocationable) { + return m.matches +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentClassification) GetOdataType()(*string) { + return m.odataType +} +// GetSensitiveTypeId gets the sensitiveTypeId property value. The sensitiveTypeId property +func (m *ContentClassification) GetSensitiveTypeId()(*string) { + return m.sensitiveTypeId +} +// GetUniqueCount gets the uniqueCount property value. The uniqueCount property +func (m *ContentClassification) GetUniqueCount()(*int32) { + return m.uniqueCount +} +// Serialize serializes information the current object +func (m *ContentClassification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sensitiveTypeId", m.GetSensitiveTypeId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniqueCount", m.GetUniqueCount()) + 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 *ContentClassification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidence sets the confidence property value. The confidence property +func (m *ContentClassification) SetConfidence(value *int32)() { + m.confidence = value +} +// SetMatches sets the matches property value. The matches property +func (m *ContentClassification) SetMatches(value []MatchLocationable)() { + m.matches = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentClassification) SetOdataType(value *string)() { + m.odataType = value +} +// SetSensitiveTypeId sets the sensitiveTypeId property value. The sensitiveTypeId property +func (m *ContentClassification) SetSensitiveTypeId(value *string)() { + m.sensitiveTypeId = value +} +// SetUniqueCount sets the uniqueCount property value. The uniqueCount property +func (m *ContentClassification) SetUniqueCount(value *int32)() { + m.uniqueCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_classification_collection_response.go b/src/internal/connector/graph/betasdk/models/content_classification_collection_response.go new file mode 100644 index 000000000..70d5f2d8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_classification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentClassificationCollectionResponse +type ContentClassificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ContentClassificationable +} +// NewContentClassificationCollectionResponse instantiates a new ContentClassificationCollectionResponse and sets the default values. +func NewContentClassificationCollectionResponse()(*ContentClassificationCollectionResponse) { + m := &ContentClassificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContentClassificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentClassificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentClassificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentClassificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentClassificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentClassificationable, len(val)) + for i, v := range val { + res[i] = v.(ContentClassificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContentClassificationCollectionResponse) GetValue()([]ContentClassificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContentClassificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContentClassificationCollectionResponse) SetValue(value []ContentClassificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_classification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/content_classification_collection_responseable.go new file mode 100644 index 000000000..6d98b7c9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_classification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentClassificationCollectionResponseable +type ContentClassificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ContentClassificationable) + SetValue(value []ContentClassificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_classificationable.go b/src/internal/connector/graph/betasdk/models/content_classificationable.go new file mode 100644 index 000000000..0b81ec5d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_classificationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentClassificationable +type ContentClassificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidence()(*int32) + GetMatches()([]MatchLocationable) + GetOdataType()(*string) + GetSensitiveTypeId()(*string) + GetUniqueCount()(*int32) + SetConfidence(value *int32)() + SetMatches(value []MatchLocationable)() + SetOdataType(value *string)() + SetSensitiveTypeId(value *string)() + SetUniqueCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_format.go b/src/internal/connector/graph/betasdk/models/content_format.go new file mode 100644 index 000000000..2f1385314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_format.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to call the evaluateApplication method. +type ContentFormat int + +const ( + DEFAULT_ESCAPED_CONTENTFORMAT ContentFormat = iota + EMAIL_CONTENTFORMAT +) + +func (i ContentFormat) String() string { + return []string{"default", "email"}[i] +} +func ParseContentFormat(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_CONTENTFORMAT + switch v { + case "default": + result = DEFAULT_ESCAPED_CONTENTFORMAT + case "email": + result = EMAIL_CONTENTFORMAT + default: + return 0, errors.New("Unknown ContentFormat value: " + v) + } + return &result, nil +} +func SerializeContentFormat(values []ContentFormat) []string { + 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/content_info.go b/src/internal/connector/graph/betasdk/models/content_info.go new file mode 100644 index 000000000..e2f2b99ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_info.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentInfo +type ContentInfo 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 format property + format *ContentFormat + // Identifier used for Azure Information Protection Analytics. + identifier *string + // Existing Microsoft Purview Information Protection metadata is passed as key/value pairs, where the key is the MSIP_Label_GUID_PropName. + metadata []KeyValuePairable + // The OdataType property + odataType *string + // The state property + state *ContentState +} +// NewContentInfo instantiates a new contentInfo and sets the default values. +func NewContentInfo()(*ContentInfo) { + m := &ContentInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentInfo(), 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 *ContentInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentFormat) + if err != nil { + return err + } + if val != nil { + m.SetFormat(val.(*ContentFormat)) + } + return nil + } + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetMetadata(res) + } + 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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ContentState)) + } + return nil + } + return res +} +// GetFormat gets the format property value. The format property +func (m *ContentInfo) GetFormat()(*ContentFormat) { + return m.format +} +// GetIdentifier gets the identifier property value. Identifier used for Azure Information Protection Analytics. +func (m *ContentInfo) GetIdentifier()(*string) { + return m.identifier +} +// GetMetadata gets the metadata property value. Existing Microsoft Purview Information Protection metadata is passed as key/value pairs, where the key is the MSIP_Label_GUID_PropName. +func (m *ContentInfo) GetMetadata()([]KeyValuePairable) { + return m.metadata +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentInfo) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *ContentInfo) GetState()(*ContentState) { + return m.state +} +// Serialize serializes information the current object +func (m *ContentInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFormat() != nil { + cast := (*m.GetFormat()).String() + err := writer.WriteStringValue("format", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("identifier", m.GetIdentifier()) + if err != nil { + return err + } + } + if m.GetMetadata() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadata())) + for i, v := range m.GetMetadata() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("metadata", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *ContentInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFormat sets the format property value. The format property +func (m *ContentInfo) SetFormat(value *ContentFormat)() { + m.format = value +} +// SetIdentifier sets the identifier property value. Identifier used for Azure Information Protection Analytics. +func (m *ContentInfo) SetIdentifier(value *string)() { + m.identifier = value +} +// SetMetadata sets the metadata property value. Existing Microsoft Purview Information Protection metadata is passed as key/value pairs, where the key is the MSIP_Label_GUID_PropName. +func (m *ContentInfo) SetMetadata(value []KeyValuePairable)() { + m.metadata = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *ContentInfo) SetState(value *ContentState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_infoable.go b/src/internal/connector/graph/betasdk/models/content_infoable.go new file mode 100644 index 000000000..861a08e84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_infoable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentInfoable +type ContentInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFormat()(*ContentFormat) + GetIdentifier()(*string) + GetMetadata()([]KeyValuePairable) + GetOdataType()(*string) + GetState()(*ContentState) + SetFormat(value *ContentFormat)() + SetIdentifier(value *string)() + SetMetadata(value []KeyValuePairable)() + SetOdataType(value *string)() + SetState(value *ContentState)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_metadata.go b/src/internal/connector/graph/betasdk/models/content_metadata.go new file mode 100644 index 000000000..2536fa837 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_metadata.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentMetadata +type ContentMetadata 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 OdataType property + odataType *string +} +// NewContentMetadata instantiates a new contentMetadata and sets the default values. +func NewContentMetadata()(*ContentMetadata) { + m := &ContentMetadata{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentMetadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentMetadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentMetadata(), 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 *ContentMetadata) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentMetadata) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ContentMetadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ContentMetadata) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentMetadata) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_metadataable.go b/src/internal/connector/graph/betasdk/models/content_metadataable.go new file mode 100644 index 000000000..3fee4512c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_metadataable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentMetadataable +type ContentMetadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_properties.go b/src/internal/connector/graph/betasdk/models/content_properties.go new file mode 100644 index 000000000..098ee83ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_properties.go @@ -0,0 +1,198 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentProperties +type ContentProperties 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 extensions property + extensions []string + // The lastModifiedBy property + lastModifiedBy *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The metadata property + metadata ContentMetadataable + // The OdataType property + odataType *string +} +// NewContentProperties instantiates a new contentProperties and sets the default values. +func NewContentProperties()(*ContentProperties) { + m := &ContentProperties{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentPropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentPropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.attachmentContentProperties": + return NewAttachmentContentProperties(), nil + } + } + } + } + return NewContentProperties(), 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 *ContentProperties) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExtensions gets the extensions property value. The extensions property +func (m *ContentProperties) GetExtensions()([]string) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentProperties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExtensions(res) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentMetadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val.(ContentMetadataable)) + } + 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 + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *ContentProperties) GetLastModifiedBy()(*string) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ContentProperties) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMetadata gets the metadata property value. The metadata property +func (m *ContentProperties) GetMetadata()(ContentMetadataable) { + return m.metadata +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentProperties) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ContentProperties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetExtensions() != nil { + err := writer.WriteCollectionOfStringValues("extensions", m.GetExtensions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ContentProperties) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExtensions sets the extensions property value. The extensions property +func (m *ContentProperties) SetExtensions(value []string)() { + m.extensions = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *ContentProperties) SetLastModifiedBy(value *string)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ContentProperties) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *ContentProperties) SetMetadata(value ContentMetadataable)() { + m.metadata = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentProperties) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_propertiesable.go b/src/internal/connector/graph/betasdk/models/content_propertiesable.go new file mode 100644 index 000000000..bcb292b23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_propertiesable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentPropertiesable +type ContentPropertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExtensions()([]string) + GetLastModifiedBy()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMetadata()(ContentMetadataable) + GetOdataType()(*string) + SetExtensions(value []string)() + SetLastModifiedBy(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMetadata(value ContentMetadataable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_sharing_session.go b/src/internal/connector/graph/betasdk/models/content_sharing_session.go new file mode 100644 index 000000000..ad3f93618 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_sharing_session.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSharingSession provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContentSharingSession struct { + Entity +} +// NewContentSharingSession instantiates a new contentSharingSession and sets the default values. +func NewContentSharingSession()(*ContentSharingSession) { + m := &ContentSharingSession{ + Entity: *NewEntity(), + } + return m +} +// CreateContentSharingSessionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentSharingSessionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSharingSession(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentSharingSession) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ContentSharingSession) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_response.go b/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_response.go new file mode 100644 index 000000000..3961a3882 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSharingSessionCollectionResponse +type ContentSharingSessionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ContentSharingSessionable +} +// NewContentSharingSessionCollectionResponse instantiates a new ContentSharingSessionCollectionResponse and sets the default values. +func NewContentSharingSessionCollectionResponse()(*ContentSharingSessionCollectionResponse) { + m := &ContentSharingSessionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContentSharingSessionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentSharingSessionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentSharingSessionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentSharingSessionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentSharingSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentSharingSessionable, len(val)) + for i, v := range val { + res[i] = v.(ContentSharingSessionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContentSharingSessionCollectionResponse) GetValue()([]ContentSharingSessionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContentSharingSessionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContentSharingSessionCollectionResponse) SetValue(value []ContentSharingSessionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_responseable.go b/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_responseable.go new file mode 100644 index 000000000..c34df688c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_sharing_session_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSharingSessionCollectionResponseable +type ContentSharingSessionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ContentSharingSessionable) + SetValue(value []ContentSharingSessionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_sharing_sessionable.go b/src/internal/connector/graph/betasdk/models/content_sharing_sessionable.go new file mode 100644 index 000000000..42e3dd771 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_sharing_sessionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentSharingSessionable +type ContentSharingSessionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/content_state.go b/src/internal/connector/graph/betasdk/models/content_state.go new file mode 100644 index 000000000..d061400e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to call the evaluateApplication method. +type ContentState int + +const ( + REST_CONTENTSTATE ContentState = iota + MOTION_CONTENTSTATE + USE_CONTENTSTATE +) + +func (i ContentState) String() string { + return []string{"rest", "motion", "use"}[i] +} +func ParseContentState(v string) (interface{}, error) { + result := REST_CONTENTSTATE + switch v { + case "rest": + result = REST_CONTENTSTATE + case "motion": + result = MOTION_CONTENTSTATE + case "use": + result = USE_CONTENTSTATE + default: + return 0, errors.New("Unknown ContentState value: " + v) + } + return &result, nil +} +func SerializeContentState(values []ContentState) []string { + 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/content_type.go b/src/internal/connector/graph/betasdk/models/content_type.go new file mode 100644 index 000000000..52bc76bb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type.go @@ -0,0 +1,564 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentType provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContentType struct { + Entity + // List of canonical URLs for hub sites with which this content type is associated to. This will contain all hubsites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type will be applied to the lists in the enforced sites. + associatedHubsUrls []string + // Parent contentType from which this content type is derived. + base ContentTypeable + // The collection of content types that are ancestors of this content type. + baseTypes []ContentTypeable + // The collection of columns that are required by this content type + columnLinks []ColumnLinkable + // Column order information in a content type. + columnPositions []ColumnDefinitionable + // The collection of column definitions for this contentType. + columns []ColumnDefinitionable + // The descriptive text for the item. + description *string + // Document Set metadata. + documentSet DocumentSetable + // Document template metadata. To make sure that documents have consistent content across a site and its subsites, you can associate a Word, Excel, or PowerPoint template with a site content type. + documentTemplate DocumentSetContentable + // The name of the group this content type belongs to. Helps organize related content types. + group *string + // Indicates whether the content type is hidden in the list's 'New' menu. + hidden *bool + // If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined. + inheritedFrom ItemReferenceable + // Specifies if a content type is a built-in content type. + isBuiltIn *bool + // The name of the content type. + name *string + // Specifies the order in which the content type appears in the selection UI. + order ContentTypeOrderable + // The unique identifier of the content type. + parentId *string + // If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type. + propagateChanges *bool + // If true, the content type cannot be modified unless this value is first set to false. + readOnly *bool + // If true, the content type cannot be modified by users or through push-down operations. Only site collection administrators can seal or unseal content types. + sealed *bool +} +// NewContentType instantiates a new contentType and sets the default values. +func NewContentType()(*ContentType) { + m := &ContentType{ + Entity: *NewEntity(), + } + return m +} +// CreateContentTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentType(), nil +} +// GetAssociatedHubsUrls gets the associatedHubsUrls property value. List of canonical URLs for hub sites with which this content type is associated to. This will contain all hubsites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type will be applied to the lists in the enforced sites. +func (m *ContentType) GetAssociatedHubsUrls()([]string) { + return m.associatedHubsUrls +} +// GetBase gets the base property value. Parent contentType from which this content type is derived. +func (m *ContentType) GetBase()(ContentTypeable) { + return m.base +} +// GetBaseTypes gets the baseTypes property value. The collection of content types that are ancestors of this content type. +func (m *ContentType) GetBaseTypes()([]ContentTypeable) { + return m.baseTypes +} +// GetColumnLinks gets the columnLinks property value. The collection of columns that are required by this content type +func (m *ContentType) GetColumnLinks()([]ColumnLinkable) { + return m.columnLinks +} +// GetColumnPositions gets the columnPositions property value. Column order information in a content type. +func (m *ContentType) GetColumnPositions()([]ColumnDefinitionable) { + return m.columnPositions +} +// GetColumns gets the columns property value. The collection of column definitions for this contentType. +func (m *ContentType) GetColumns()([]ColumnDefinitionable) { + return m.columns +} +// GetDescription gets the description property value. The descriptive text for the item. +func (m *ContentType) GetDescription()(*string) { + return m.description +} +// GetDocumentSet gets the documentSet property value. Document Set metadata. +func (m *ContentType) GetDocumentSet()(DocumentSetable) { + return m.documentSet +} +// GetDocumentTemplate gets the documentTemplate property value. Document template metadata. To make sure that documents have consistent content across a site and its subsites, you can associate a Word, Excel, or PowerPoint template with a site content type. +func (m *ContentType) GetDocumentTemplate()(DocumentSetContentable) { + return m.documentTemplate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["associatedHubsUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAssociatedHubsUrls(res) + } + return nil + } + res["base"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBase(val.(ContentTypeable)) + } + return nil + } + res["baseTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentTypeable, len(val)) + for i, v := range val { + res[i] = v.(ContentTypeable) + } + m.SetBaseTypes(res) + } + return nil + } + res["columnLinks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnLinkable, len(val)) + for i, v := range val { + res[i] = v.(ColumnLinkable) + } + m.SetColumnLinks(res) + } + return nil + } + res["columnPositions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetColumnPositions(res) + } + return nil + } + res["columns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetColumns(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["documentSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDocumentSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDocumentSet(val.(DocumentSetable)) + } + return nil + } + res["documentTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDocumentSetContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDocumentTemplate(val.(DocumentSetContentable)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroup(val) + } + return nil + } + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(val) + } + return nil + } + res["inheritedFrom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInheritedFrom(val.(ItemReferenceable)) + } + return nil + } + res["isBuiltIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBuiltIn(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentTypeOrderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrder(val.(ContentTypeOrderable)) + } + return nil + } + res["parentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentId(val) + } + return nil + } + res["propagateChanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPropagateChanges(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["sealed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSealed(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The name of the group this content type belongs to. Helps organize related content types. +func (m *ContentType) GetGroup()(*string) { + return m.group +} +// GetHidden gets the hidden property value. Indicates whether the content type is hidden in the list's 'New' menu. +func (m *ContentType) GetHidden()(*bool) { + return m.hidden +} +// GetInheritedFrom gets the inheritedFrom property value. If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined. +func (m *ContentType) GetInheritedFrom()(ItemReferenceable) { + return m.inheritedFrom +} +// GetIsBuiltIn gets the isBuiltIn property value. Specifies if a content type is a built-in content type. +func (m *ContentType) GetIsBuiltIn()(*bool) { + return m.isBuiltIn +} +// GetName gets the name property value. The name of the content type. +func (m *ContentType) GetName()(*string) { + return m.name +} +// GetOrder gets the order property value. Specifies the order in which the content type appears in the selection UI. +func (m *ContentType) GetOrder()(ContentTypeOrderable) { + return m.order +} +// GetParentId gets the parentId property value. The unique identifier of the content type. +func (m *ContentType) GetParentId()(*string) { + return m.parentId +} +// GetPropagateChanges gets the propagateChanges property value. If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type. +func (m *ContentType) GetPropagateChanges()(*bool) { + return m.propagateChanges +} +// GetReadOnly gets the readOnly property value. If true, the content type cannot be modified unless this value is first set to false. +func (m *ContentType) GetReadOnly()(*bool) { + return m.readOnly +} +// GetSealed gets the sealed property value. If true, the content type cannot be modified by users or through push-down operations. Only site collection administrators can seal or unseal content types. +func (m *ContentType) GetSealed()(*bool) { + return m.sealed +} +// Serialize serializes information the current object +func (m *ContentType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssociatedHubsUrls() != nil { + err = writer.WriteCollectionOfStringValues("associatedHubsUrls", m.GetAssociatedHubsUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("base", m.GetBase()) + if err != nil { + return err + } + } + if m.GetBaseTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBaseTypes())) + for i, v := range m.GetBaseTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("baseTypes", cast) + if err != nil { + return err + } + } + if m.GetColumnLinks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumnLinks())) + for i, v := range m.GetColumnLinks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columnLinks", cast) + if err != nil { + return err + } + } + if m.GetColumnPositions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumnPositions())) + for i, v := range m.GetColumnPositions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columnPositions", cast) + if err != nil { + return err + } + } + if m.GetColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumns())) + for i, v := range m.GetColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columns", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("documentSet", m.GetDocumentSet()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("documentTemplate", m.GetDocumentTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inheritedFrom", m.GetInheritedFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isBuiltIn", m.GetIsBuiltIn()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("order", m.GetOrder()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentId", m.GetParentId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("propagateChanges", m.GetPropagateChanges()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("readOnly", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("sealed", m.GetSealed()) + if err != nil { + return err + } + } + return nil +} +// SetAssociatedHubsUrls sets the associatedHubsUrls property value. List of canonical URLs for hub sites with which this content type is associated to. This will contain all hubsites where this content type is queued to be enforced or is already enforced. Enforcing a content type means that the content type will be applied to the lists in the enforced sites. +func (m *ContentType) SetAssociatedHubsUrls(value []string)() { + m.associatedHubsUrls = value +} +// SetBase sets the base property value. Parent contentType from which this content type is derived. +func (m *ContentType) SetBase(value ContentTypeable)() { + m.base = value +} +// SetBaseTypes sets the baseTypes property value. The collection of content types that are ancestors of this content type. +func (m *ContentType) SetBaseTypes(value []ContentTypeable)() { + m.baseTypes = value +} +// SetColumnLinks sets the columnLinks property value. The collection of columns that are required by this content type +func (m *ContentType) SetColumnLinks(value []ColumnLinkable)() { + m.columnLinks = value +} +// SetColumnPositions sets the columnPositions property value. Column order information in a content type. +func (m *ContentType) SetColumnPositions(value []ColumnDefinitionable)() { + m.columnPositions = value +} +// SetColumns sets the columns property value. The collection of column definitions for this contentType. +func (m *ContentType) SetColumns(value []ColumnDefinitionable)() { + m.columns = value +} +// SetDescription sets the description property value. The descriptive text for the item. +func (m *ContentType) SetDescription(value *string)() { + m.description = value +} +// SetDocumentSet sets the documentSet property value. Document Set metadata. +func (m *ContentType) SetDocumentSet(value DocumentSetable)() { + m.documentSet = value +} +// SetDocumentTemplate sets the documentTemplate property value. Document template metadata. To make sure that documents have consistent content across a site and its subsites, you can associate a Word, Excel, or PowerPoint template with a site content type. +func (m *ContentType) SetDocumentTemplate(value DocumentSetContentable)() { + m.documentTemplate = value +} +// SetGroup sets the group property value. The name of the group this content type belongs to. Helps organize related content types. +func (m *ContentType) SetGroup(value *string)() { + m.group = value +} +// SetHidden sets the hidden property value. Indicates whether the content type is hidden in the list's 'New' menu. +func (m *ContentType) SetHidden(value *bool)() { + m.hidden = value +} +// SetInheritedFrom sets the inheritedFrom property value. If this content type is inherited from another scope (like a site), provides a reference to the item where the content type is defined. +func (m *ContentType) SetInheritedFrom(value ItemReferenceable)() { + m.inheritedFrom = value +} +// SetIsBuiltIn sets the isBuiltIn property value. Specifies if a content type is a built-in content type. +func (m *ContentType) SetIsBuiltIn(value *bool)() { + m.isBuiltIn = value +} +// SetName sets the name property value. The name of the content type. +func (m *ContentType) SetName(value *string)() { + m.name = value +} +// SetOrder sets the order property value. Specifies the order in which the content type appears in the selection UI. +func (m *ContentType) SetOrder(value ContentTypeOrderable)() { + m.order = value +} +// SetParentId sets the parentId property value. The unique identifier of the content type. +func (m *ContentType) SetParentId(value *string)() { + m.parentId = value +} +// SetPropagateChanges sets the propagateChanges property value. If true, any changes made to the content type will be pushed to inherited content types and lists that implement the content type. +func (m *ContentType) SetPropagateChanges(value *bool)() { + m.propagateChanges = value +} +// SetReadOnly sets the readOnly property value. If true, the content type cannot be modified unless this value is first set to false. +func (m *ContentType) SetReadOnly(value *bool)() { + m.readOnly = value +} +// SetSealed sets the sealed property value. If true, the content type cannot be modified by users or through push-down operations. Only site collection administrators can seal or unseal content types. +func (m *ContentType) SetSealed(value *bool)() { + m.sealed = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_collection_response.go b/src/internal/connector/graph/betasdk/models/content_type_collection_response.go new file mode 100644 index 000000000..2ca9121e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeCollectionResponse +type ContentTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ContentTypeable +} +// NewContentTypeCollectionResponse instantiates a new ContentTypeCollectionResponse and sets the default values. +func NewContentTypeCollectionResponse()(*ContentTypeCollectionResponse) { + m := &ContentTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContentTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentTypeable, len(val)) + for i, v := range val { + res[i] = v.(ContentTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContentTypeCollectionResponse) GetValue()([]ContentTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContentTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContentTypeCollectionResponse) SetValue(value []ContentTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/content_type_collection_responseable.go new file mode 100644 index 000000000..ebb4eab07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeCollectionResponseable +type ContentTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ContentTypeable) + SetValue(value []ContentTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_info.go b/src/internal/connector/graph/betasdk/models/content_type_info.go new file mode 100644 index 000000000..4bdff54f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_info.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeInfo +type ContentTypeInfo 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 id of the content type. + id *string + // The name of the content type. + name *string + // The OdataType property + odataType *string +} +// NewContentTypeInfo instantiates a new contentTypeInfo and sets the default values. +func NewContentTypeInfo()(*ContentTypeInfo) { + m := &ContentTypeInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentTypeInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentTypeInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentTypeInfo(), 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 *ContentTypeInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentTypeInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetId gets the id property value. The id of the content type. +func (m *ContentTypeInfo) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the content type. +func (m *ContentTypeInfo) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentTypeInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ContentTypeInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ContentTypeInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The id of the content type. +func (m *ContentTypeInfo) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the content type. +func (m *ContentTypeInfo) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentTypeInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_info_collection_response.go b/src/internal/connector/graph/betasdk/models/content_type_info_collection_response.go new file mode 100644 index 000000000..3b5b07346 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeInfoCollectionResponse +type ContentTypeInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ContentTypeInfoable +} +// NewContentTypeInfoCollectionResponse instantiates a new ContentTypeInfoCollectionResponse and sets the default values. +func NewContentTypeInfoCollectionResponse()(*ContentTypeInfoCollectionResponse) { + m := &ContentTypeInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContentTypeInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentTypeInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentTypeInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentTypeInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentTypeInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentTypeInfoable, len(val)) + for i, v := range val { + res[i] = v.(ContentTypeInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContentTypeInfoCollectionResponse) GetValue()([]ContentTypeInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContentTypeInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContentTypeInfoCollectionResponse) SetValue(value []ContentTypeInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/content_type_info_collection_responseable.go new file mode 100644 index 000000000..9f221c4b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeInfoCollectionResponseable +type ContentTypeInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ContentTypeInfoable) + SetValue(value []ContentTypeInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_infoable.go b/src/internal/connector/graph/betasdk/models/content_type_infoable.go new file mode 100644 index 000000000..7a0238052 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeInfoable +type ContentTypeInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_order.go b/src/internal/connector/graph/betasdk/models/content_type_order.go new file mode 100644 index 000000000..b1183a58c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_order.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeOrder +type ContentTypeOrder struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether this is the default Content Type + default_escaped *bool + // The OdataType property + odataType *string + // Specifies the position in which the Content Type appears in the selection UI. + position *int32 +} +// NewContentTypeOrder instantiates a new contentTypeOrder and sets the default values. +func NewContentTypeOrder()(*ContentTypeOrder) { + m := &ContentTypeOrder{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContentTypeOrderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContentTypeOrderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContentTypeOrder(), 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 *ContentTypeOrder) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefault gets the default property value. Whether this is the default Content Type +func (m *ContentTypeOrder) GetDefault()(*bool) { + return m.default_escaped +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContentTypeOrder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefault(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["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPosition(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContentTypeOrder) GetOdataType()(*string) { + return m.odataType +} +// GetPosition gets the position property value. Specifies the position in which the Content Type appears in the selection UI. +func (m *ContentTypeOrder) GetPosition()(*int32) { + return m.position +} +// Serialize serializes information the current object +func (m *ContentTypeOrder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("default", m.GetDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("position", m.GetPosition()) + 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 *ContentTypeOrder) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefault sets the default property value. Whether this is the default Content Type +func (m *ContentTypeOrder) SetDefault(value *bool)() { + m.default_escaped = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContentTypeOrder) SetOdataType(value *string)() { + m.odataType = value +} +// SetPosition sets the position property value. Specifies the position in which the Content Type appears in the selection UI. +func (m *ContentTypeOrder) SetPosition(value *int32)() { + m.position = value +} diff --git a/src/internal/connector/graph/betasdk/models/content_type_orderable.go b/src/internal/connector/graph/betasdk/models/content_type_orderable.go new file mode 100644 index 000000000..ac5278eee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_type_orderable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeOrderable +type ContentTypeOrderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefault()(*bool) + GetOdataType()(*string) + GetPosition()(*int32) + SetDefault(value *bool)() + SetOdataType(value *string)() + SetPosition(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/content_typeable.go b/src/internal/connector/graph/betasdk/models/content_typeable.go new file mode 100644 index 000000000..cb86a9cc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/content_typeable.go @@ -0,0 +1,49 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContentTypeable +type ContentTypeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssociatedHubsUrls()([]string) + GetBase()(ContentTypeable) + GetBaseTypes()([]ContentTypeable) + GetColumnLinks()([]ColumnLinkable) + GetColumnPositions()([]ColumnDefinitionable) + GetColumns()([]ColumnDefinitionable) + GetDescription()(*string) + GetDocumentSet()(DocumentSetable) + GetDocumentTemplate()(DocumentSetContentable) + GetGroup()(*string) + GetHidden()(*bool) + GetInheritedFrom()(ItemReferenceable) + GetIsBuiltIn()(*bool) + GetName()(*string) + GetOrder()(ContentTypeOrderable) + GetParentId()(*string) + GetPropagateChanges()(*bool) + GetReadOnly()(*bool) + GetSealed()(*bool) + SetAssociatedHubsUrls(value []string)() + SetBase(value ContentTypeable)() + SetBaseTypes(value []ContentTypeable)() + SetColumnLinks(value []ColumnLinkable)() + SetColumnPositions(value []ColumnDefinitionable)() + SetColumns(value []ColumnDefinitionable)() + SetDescription(value *string)() + SetDocumentSet(value DocumentSetable)() + SetDocumentTemplate(value DocumentSetContentable)() + SetGroup(value *string)() + SetHidden(value *bool)() + SetInheritedFrom(value ItemReferenceable)() + SetIsBuiltIn(value *bool)() + SetName(value *string)() + SetOrder(value ContentTypeOrderable)() + SetParentId(value *string)() + SetPropagateChanges(value *bool)() + SetReadOnly(value *bool)() + SetSealed(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_mode.go b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_mode.go new file mode 100644 index 000000000..fe8b0429b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContinuousAccessEvaluationMode int + +const ( + STRICTENFORCEMENT_CONTINUOUSACCESSEVALUATIONMODE ContinuousAccessEvaluationMode = iota + DISABLED_CONTINUOUSACCESSEVALUATIONMODE + UNKNOWNFUTUREVALUE_CONTINUOUSACCESSEVALUATIONMODE +) + +func (i ContinuousAccessEvaluationMode) String() string { + return []string{"strictEnforcement", "disabled", "unknownFutureValue"}[i] +} +func ParseContinuousAccessEvaluationMode(v string) (interface{}, error) { + result := STRICTENFORCEMENT_CONTINUOUSACCESSEVALUATIONMODE + switch v { + case "strictEnforcement": + result = STRICTENFORCEMENT_CONTINUOUSACCESSEVALUATIONMODE + case "disabled": + result = DISABLED_CONTINUOUSACCESSEVALUATIONMODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONTINUOUSACCESSEVALUATIONMODE + default: + return 0, errors.New("Unknown ContinuousAccessEvaluationMode value: " + v) + } + return &result, nil +} +func SerializeContinuousAccessEvaluationMode(values []ContinuousAccessEvaluationMode) []string { + 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/continuous_access_evaluation_policy.go b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_policy.go new file mode 100644 index 000000000..74ddc48ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_policy.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContinuousAccessEvaluationPolicy +type ContinuousAccessEvaluationPolicy struct { + Entity + // Continuous access evaluation automatically blocks access to resources and applications in near real time when a user's access is removed or a client IP address changes. Read-only. + description *string + // The value is always Continuous Access Evaluation. Read-only. + displayName *string + // The collection of group identifiers in scope for evaluation. All groups are in scope when the collection is empty. Read-only. + groups []string + // true to indicate whether continuous access evaluation should be performed; otherwise false. Read-only. + isEnabled *bool + // true to indicate that the continuous access evaluation policy settings should be or has been migrated to the conditional access policy. + migrate *bool + // The collection of user identifiers in scope for evaluation. All users are in scope when the collection is empty. Read-only. + users []string +} +// NewContinuousAccessEvaluationPolicy instantiates a new ContinuousAccessEvaluationPolicy and sets the default values. +func NewContinuousAccessEvaluationPolicy()(*ContinuousAccessEvaluationPolicy) { + m := &ContinuousAccessEvaluationPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateContinuousAccessEvaluationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContinuousAccessEvaluationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContinuousAccessEvaluationPolicy(), nil +} +// GetDescription gets the description property value. Continuous access evaluation automatically blocks access to resources and applications in near real time when a user's access is removed or a client IP address changes. Read-only. +func (m *ContinuousAccessEvaluationPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The value is always Continuous Access Evaluation. Read-only. +func (m *ContinuousAccessEvaluationPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContinuousAccessEvaluationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGroups(res) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["migrate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMigrate(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The collection of group identifiers in scope for evaluation. All groups are in scope when the collection is empty. Read-only. +func (m *ContinuousAccessEvaluationPolicy) GetGroups()([]string) { + return m.groups +} +// GetIsEnabled gets the isEnabled property value. true to indicate whether continuous access evaluation should be performed; otherwise false. Read-only. +func (m *ContinuousAccessEvaluationPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetMigrate gets the migrate property value. true to indicate that the continuous access evaluation policy settings should be or has been migrated to the conditional access policy. +func (m *ContinuousAccessEvaluationPolicy) GetMigrate()(*bool) { + return m.migrate +} +// GetUsers gets the users property value. The collection of user identifiers in scope for evaluation. All users are in scope when the collection is empty. Read-only. +func (m *ContinuousAccessEvaluationPolicy) GetUsers()([]string) { + return m.users +} +// Serialize serializes information the current object +func (m *ContinuousAccessEvaluationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + err = writer.WriteCollectionOfStringValues("groups", m.GetGroups()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("migrate", m.GetMigrate()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + err = writer.WriteCollectionOfStringValues("users", m.GetUsers()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Continuous access evaluation automatically blocks access to resources and applications in near real time when a user's access is removed or a client IP address changes. Read-only. +func (m *ContinuousAccessEvaluationPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The value is always Continuous Access Evaluation. Read-only. +func (m *ContinuousAccessEvaluationPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGroups sets the groups property value. The collection of group identifiers in scope for evaluation. All groups are in scope when the collection is empty. Read-only. +func (m *ContinuousAccessEvaluationPolicy) SetGroups(value []string)() { + m.groups = value +} +// SetIsEnabled sets the isEnabled property value. true to indicate whether continuous access evaluation should be performed; otherwise false. Read-only. +func (m *ContinuousAccessEvaluationPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetMigrate sets the migrate property value. true to indicate that the continuous access evaluation policy settings should be or has been migrated to the conditional access policy. +func (m *ContinuousAccessEvaluationPolicy) SetMigrate(value *bool)() { + m.migrate = value +} +// SetUsers sets the users property value. The collection of user identifiers in scope for evaluation. All users are in scope when the collection is empty. Read-only. +func (m *ContinuousAccessEvaluationPolicy) SetUsers(value []string)() { + m.users = value +} diff --git a/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_policyable.go b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_policyable.go new file mode 100644 index 000000000..f988d15de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_policyable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContinuousAccessEvaluationPolicyable +type ContinuousAccessEvaluationPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetGroups()([]string) + GetIsEnabled()(*bool) + GetMigrate()(*bool) + GetUsers()([]string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetGroups(value []string)() + SetIsEnabled(value *bool)() + SetMigrate(value *bool)() + SetUsers(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_control.go b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_control.go new file mode 100644 index 000000000..52a491b97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_control.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContinuousAccessEvaluationSessionControl +type ContinuousAccessEvaluationSessionControl struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies continuous access evaluation settings. The possible values are: strictEnforcement, disabled, unknownFutureValue. + mode *ContinuousAccessEvaluationMode + // The OdataType property + odataType *string +} +// NewContinuousAccessEvaluationSessionControl instantiates a new continuousAccessEvaluationSessionControl and sets the default values. +func NewContinuousAccessEvaluationSessionControl()(*ContinuousAccessEvaluationSessionControl) { + m := &ContinuousAccessEvaluationSessionControl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateContinuousAccessEvaluationSessionControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContinuousAccessEvaluationSessionControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContinuousAccessEvaluationSessionControl(), 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 *ContinuousAccessEvaluationSessionControl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContinuousAccessEvaluationSessionControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContinuousAccessEvaluationMode) + if err != nil { + return err + } + if val != nil { + m.SetMode(val.(*ContinuousAccessEvaluationMode)) + } + 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 + } + return res +} +// GetMode gets the mode property value. Specifies continuous access evaluation settings. The possible values are: strictEnforcement, disabled, unknownFutureValue. +func (m *ContinuousAccessEvaluationSessionControl) GetMode()(*ContinuousAccessEvaluationMode) { + return m.mode +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ContinuousAccessEvaluationSessionControl) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ContinuousAccessEvaluationSessionControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMode() != nil { + cast := (*m.GetMode()).String() + err := writer.WriteStringValue("mode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ContinuousAccessEvaluationSessionControl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMode sets the mode property value. Specifies continuous access evaluation settings. The possible values are: strictEnforcement, disabled, unknownFutureValue. +func (m *ContinuousAccessEvaluationSessionControl) SetMode(value *ContinuousAccessEvaluationMode)() { + m.mode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ContinuousAccessEvaluationSessionControl) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_controlable.go b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_controlable.go new file mode 100644 index 000000000..63647efb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/continuous_access_evaluation_session_controlable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContinuousAccessEvaluationSessionControlable +type ContinuousAccessEvaluationSessionControlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMode()(*ContinuousAccessEvaluationMode) + GetOdataType()(*string) + SetMode(value *ContinuousAccessEvaluationMode)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/contract.go b/src/internal/connector/graph/betasdk/models/contract.go new file mode 100644 index 000000000..3d286cec3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contract.go @@ -0,0 +1,141 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Contract +type Contract struct { + DirectoryObject + // The contractType property + contractType *string + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The defaultDomainName property + defaultDomainName *string + // The displayName property + displayName *string +} +// NewContract instantiates a new Contract and sets the default values. +func NewContract()(*Contract) { + m := &Contract{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.contract"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateContractFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContractFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContract(), nil +} +// GetContractType gets the contractType property value. The contractType property +func (m *Contract) GetContractType()(*string) { + return m.contractType +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *Contract) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetDefaultDomainName gets the defaultDomainName property value. The defaultDomainName property +func (m *Contract) GetDefaultDomainName()(*string) { + return m.defaultDomainName +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Contract) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Contract) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["contractType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContractType(val) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["defaultDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDomainName(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Contract) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contractType", m.GetContractType()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultDomainName", m.GetDefaultDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetContractType sets the contractType property value. The contractType property +func (m *Contract) SetContractType(value *string)() { + m.contractType = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *Contract) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetDefaultDomainName sets the defaultDomainName property value. The defaultDomainName property +func (m *Contract) SetDefaultDomainName(value *string)() { + m.defaultDomainName = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Contract) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/contract_collection_response.go b/src/internal/connector/graph/betasdk/models/contract_collection_response.go new file mode 100644 index 000000000..4584bf53c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contract_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContractCollectionResponse +type ContractCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Contractable +} +// NewContractCollectionResponse instantiates a new ContractCollectionResponse and sets the default values. +func NewContractCollectionResponse()(*ContractCollectionResponse) { + m := &ContractCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateContractCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateContractCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewContractCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ContractCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContractFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Contractable, len(val)) + for i, v := range val { + res[i] = v.(Contractable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ContractCollectionResponse) GetValue()([]Contractable) { + return m.value +} +// Serialize serializes information the current object +func (m *ContractCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ContractCollectionResponse) SetValue(value []Contractable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/contract_collection_responseable.go b/src/internal/connector/graph/betasdk/models/contract_collection_responseable.go new file mode 100644 index 000000000..326ca42a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contract_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ContractCollectionResponseable +type ContractCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Contractable) + SetValue(value []Contractable)() +} diff --git a/src/internal/connector/graph/betasdk/models/contractable.go b/src/internal/connector/graph/betasdk/models/contractable.go new file mode 100644 index 000000000..fdc4be9de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/contractable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Contractable +type Contractable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContractType()(*string) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetDefaultDomainName()(*string) + GetDisplayName()(*string) + SetContractType(value *string)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetDefaultDomainName(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/control_score.go b/src/internal/connector/graph/betasdk/models/control_score.go new file mode 100644 index 000000000..ac1cb7270 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/control_score.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ControlScore +type ControlScore 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 controlCategory property + controlCategory *string + // The controlName property + controlName *string + // The description property + description *string + // The OdataType property + odataType *string + // The score property + score *float64 +} +// NewControlScore instantiates a new controlScore and sets the default values. +func NewControlScore()(*ControlScore) { + m := &ControlScore{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateControlScoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateControlScoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewControlScore(), 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 *ControlScore) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetControlCategory gets the controlCategory property value. The controlCategory property +func (m *ControlScore) GetControlCategory()(*string) { + return m.controlCategory +} +// GetControlName gets the controlName property value. The controlName property +func (m *ControlScore) GetControlName()(*string) { + return m.controlName +} +// GetDescription gets the description property value. The description property +func (m *ControlScore) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ControlScore) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["controlCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlCategory(val) + } + return nil + } + res["controlName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlName(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(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["score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetScore(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ControlScore) GetOdataType()(*string) { + return m.odataType +} +// GetScore gets the score property value. The score property +func (m *ControlScore) GetScore()(*float64) { + return m.score +} +// Serialize serializes information the current object +func (m *ControlScore) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("controlCategory", m.GetControlCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("controlName", m.GetControlName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("score", m.GetScore()) + 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 *ControlScore) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetControlCategory sets the controlCategory property value. The controlCategory property +func (m *ControlScore) SetControlCategory(value *string)() { + m.controlCategory = value +} +// SetControlName sets the controlName property value. The controlName property +func (m *ControlScore) SetControlName(value *string)() { + m.controlName = value +} +// SetDescription sets the description property value. The description property +func (m *ControlScore) SetDescription(value *string)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ControlScore) SetOdataType(value *string)() { + m.odataType = value +} +// SetScore sets the score property value. The score property +func (m *ControlScore) SetScore(value *float64)() { + m.score = value +} diff --git a/src/internal/connector/graph/betasdk/models/control_score_collection_response.go b/src/internal/connector/graph/betasdk/models/control_score_collection_response.go new file mode 100644 index 000000000..ffda759c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/control_score_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ControlScoreCollectionResponse +type ControlScoreCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ControlScoreable +} +// NewControlScoreCollectionResponse instantiates a new ControlScoreCollectionResponse and sets the default values. +func NewControlScoreCollectionResponse()(*ControlScoreCollectionResponse) { + m := &ControlScoreCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateControlScoreCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateControlScoreCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewControlScoreCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ControlScoreCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateControlScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ControlScoreable, len(val)) + for i, v := range val { + res[i] = v.(ControlScoreable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ControlScoreCollectionResponse) GetValue()([]ControlScoreable) { + return m.value +} +// Serialize serializes information the current object +func (m *ControlScoreCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ControlScoreCollectionResponse) SetValue(value []ControlScoreable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/control_score_collection_responseable.go b/src/internal/connector/graph/betasdk/models/control_score_collection_responseable.go new file mode 100644 index 000000000..844c516d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/control_score_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ControlScoreCollectionResponseable +type ControlScoreCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ControlScoreable) + SetValue(value []ControlScoreable)() +} diff --git a/src/internal/connector/graph/betasdk/models/control_scoreable.go b/src/internal/connector/graph/betasdk/models/control_scoreable.go new file mode 100644 index 000000000..c3657277f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/control_scoreable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ControlScoreable +type ControlScoreable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetControlCategory()(*string) + GetControlName()(*string) + GetDescription()(*string) + GetOdataType()(*string) + GetScore()(*float64) + SetControlCategory(value *string)() + SetControlName(value *string)() + SetDescription(value *string)() + SetOdataType(value *string)() + SetScore(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation.go b/src/internal/connector/graph/betasdk/models/conversation.go new file mode 100644 index 000000000..1061f92e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation.go @@ -0,0 +1,203 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Conversation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Conversation struct { + Entity + // Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search. + hasAttachments *bool + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, le, ge). + lastDeliveredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A short summary from the body of the latest post in this conversation. + preview *string + // A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable. + threads []ConversationThreadable + // The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. + topic *string + // All the users that sent a message to this Conversation. + uniqueSenders []string +} +// NewConversation instantiates a new conversation and sets the default values. +func NewConversation()(*Conversation) { + m := &Conversation{ + Entity: *NewEntity(), + } + return m +} +// CreateConversationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Conversation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["lastDeliveredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastDeliveredDateTime(val) + } + return nil + } + res["preview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreview(val) + } + return nil + } + res["threads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationThreadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationThreadable, len(val)) + for i, v := range val { + res[i] = v.(ConversationThreadable) + } + m.SetThreads(res) + } + return nil + } + res["topic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTopic(val) + } + return nil + } + res["uniqueSenders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUniqueSenders(res) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search. +func (m *Conversation) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetLastDeliveredDateTime gets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, le, ge). +func (m *Conversation) GetLastDeliveredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastDeliveredDateTime +} +// GetPreview gets the preview property value. A short summary from the body of the latest post in this conversation. +func (m *Conversation) GetPreview()(*string) { + return m.preview +} +// GetThreads gets the threads property value. A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable. +func (m *Conversation) GetThreads()([]ConversationThreadable) { + return m.threads +} +// GetTopic gets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. +func (m *Conversation) GetTopic()(*string) { + return m.topic +} +// GetUniqueSenders gets the uniqueSenders property value. All the users that sent a message to this Conversation. +func (m *Conversation) GetUniqueSenders()([]string) { + return m.uniqueSenders +} +// Serialize serializes information the current object +func (m *Conversation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastDeliveredDateTime", m.GetLastDeliveredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preview", m.GetPreview()) + if err != nil { + return err + } + } + if m.GetThreads() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetThreads())) + for i, v := range m.GetThreads() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("threads", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("topic", m.GetTopic()) + if err != nil { + return err + } + } + if m.GetUniqueSenders() != nil { + err = writer.WriteCollectionOfStringValues("uniqueSenders", m.GetUniqueSenders()) + if err != nil { + return err + } + } + return nil +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether any of the posts within this Conversation has at least one attachment. Supports $filter (eq, ne) and $search. +func (m *Conversation) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetLastDeliveredDateTime sets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, le, ge). +func (m *Conversation) SetLastDeliveredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastDeliveredDateTime = value +} +// SetPreview sets the preview property value. A short summary from the body of the latest post in this conversation. +func (m *Conversation) SetPreview(value *string)() { + m.preview = value +} +// SetThreads sets the threads property value. A collection of all the conversation threads in the conversation. A navigation property. Read-only. Nullable. +func (m *Conversation) SetThreads(value []ConversationThreadable)() { + m.threads = value +} +// SetTopic sets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. +func (m *Conversation) SetTopic(value *string)() { + m.topic = value +} +// SetUniqueSenders sets the uniqueSenders property value. All the users that sent a message to this Conversation. +func (m *Conversation) SetUniqueSenders(value []string)() { + m.uniqueSenders = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_collection_response.go b/src/internal/connector/graph/betasdk/models/conversation_collection_response.go new file mode 100644 index 000000000..d31c12e3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationCollectionResponse +type ConversationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Conversationable +} +// NewConversationCollectionResponse instantiates a new ConversationCollectionResponse and sets the default values. +func NewConversationCollectionResponse()(*ConversationCollectionResponse) { + m := &ConversationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConversationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Conversationable, len(val)) + for i, v := range val { + res[i] = v.(Conversationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConversationCollectionResponse) GetValue()([]Conversationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConversationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConversationCollectionResponse) SetValue(value []Conversationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conversation_collection_responseable.go new file mode 100644 index 000000000..42d44bc30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationCollectionResponseable +type ConversationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Conversationable) + SetValue(value []Conversationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_member.go b/src/internal/connector/graph/betasdk/models/conversation_member.go new file mode 100644 index 000000000..650d94627 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_member.go @@ -0,0 +1,145 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMember provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConversationMember struct { + Entity + // The display name of the user. + displayName *string + // The roles for that user. This property only contains additional qualifiers when relevant - for example, if the member has owner privileges, the roles property contains owner as one of the values. Similarly, if the member is a guest, the roles property contains guest as one of the values. A basic member should not have any values specified in the roles property. + roles []string + // The timestamp denoting how far back a conversation's history is shared with the conversation member. This property is settable only for members of a chat. + visibleHistoryStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewConversationMember instantiates a new conversationMember and sets the default values. +func NewConversationMember()(*ConversationMember) { + m := &ConversationMember{ + Entity: *NewEntity(), + } + return m +} +// CreateConversationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.aadUserConversationMember": + return NewAadUserConversationMember(), nil + case "#microsoft.graph.anonymousGuestConversationMember": + return NewAnonymousGuestConversationMember(), nil + case "#microsoft.graph.azureCommunicationServicesUserConversationMember": + return NewAzureCommunicationServicesUserConversationMember(), nil + case "#microsoft.graph.microsoftAccountUserConversationMember": + return NewMicrosoftAccountUserConversationMember(), nil + case "#microsoft.graph.skypeForBusinessUserConversationMember": + return NewSkypeForBusinessUserConversationMember(), nil + case "#microsoft.graph.skypeUserConversationMember": + return NewSkypeUserConversationMember(), nil + } + } + } + } + return NewConversationMember(), nil +} +// GetDisplayName gets the displayName property value. The display name of the user. +func (m *ConversationMember) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoles(res) + } + return nil + } + res["visibleHistoryStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibleHistoryStartDateTime(val) + } + return nil + } + return res +} +// GetRoles gets the roles property value. The roles for that user. This property only contains additional qualifiers when relevant - for example, if the member has owner privileges, the roles property contains owner as one of the values. Similarly, if the member is a guest, the roles property contains guest as one of the values. A basic member should not have any values specified in the roles property. +func (m *ConversationMember) GetRoles()([]string) { + return m.roles +} +// GetVisibleHistoryStartDateTime gets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation's history is shared with the conversation member. This property is settable only for members of a chat. +func (m *ConversationMember) GetVisibleHistoryStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.visibleHistoryStartDateTime +} +// Serialize serializes information the current object +func (m *ConversationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + err = writer.WriteCollectionOfStringValues("roles", m.GetRoles()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("visibleHistoryStartDateTime", m.GetVisibleHistoryStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the user. +func (m *ConversationMember) SetDisplayName(value *string)() { + m.displayName = value +} +// SetRoles sets the roles property value. The roles for that user. This property only contains additional qualifiers when relevant - for example, if the member has owner privileges, the roles property contains owner as one of the values. Similarly, if the member is a guest, the roles property contains guest as one of the values. A basic member should not have any values specified in the roles property. +func (m *ConversationMember) SetRoles(value []string)() { + m.roles = value +} +// SetVisibleHistoryStartDateTime sets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation's history is shared with the conversation member. This property is settable only for members of a chat. +func (m *ConversationMember) SetVisibleHistoryStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.visibleHistoryStartDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_member_collection_response.go b/src/internal/connector/graph/betasdk/models/conversation_member_collection_response.go new file mode 100644 index 000000000..76e8e76cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMemberCollectionResponse +type ConversationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConversationMemberable +} +// NewConversationMemberCollectionResponse instantiates a new ConversationMemberCollectionResponse and sets the default values. +func NewConversationMemberCollectionResponse()(*ConversationMemberCollectionResponse) { + m := &ConversationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConversationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(ConversationMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConversationMemberCollectionResponse) GetValue()([]ConversationMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConversationMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConversationMemberCollectionResponse) SetValue(value []ConversationMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conversation_member_collection_responseable.go new file mode 100644 index 000000000..8d6feb878 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMemberCollectionResponseable +type ConversationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConversationMemberable) + SetValue(value []ConversationMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detail.go b/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detail.go new file mode 100644 index 000000000..1b63957c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detail.go @@ -0,0 +1,118 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMemberRoleUpdatedEventMessageDetail +type ConversationMemberRoleUpdatedEventMessageDetail struct { + EventMessageDetail + // Roles for the coversation member user. + conversationMemberRoles []string + // Identity of the conversation member user. + conversationMemberUser TeamworkUserIdentityable + // Initiator of the event. + initiator IdentitySetable +} +// NewConversationMemberRoleUpdatedEventMessageDetail instantiates a new ConversationMemberRoleUpdatedEventMessageDetail and sets the default values. +func NewConversationMemberRoleUpdatedEventMessageDetail()(*ConversationMemberRoleUpdatedEventMessageDetail) { + m := &ConversationMemberRoleUpdatedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.conversationMemberRoleUpdatedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateConversationMemberRoleUpdatedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationMemberRoleUpdatedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversationMemberRoleUpdatedEventMessageDetail(), nil +} +// GetConversationMemberRoles gets the conversationMemberRoles property value. Roles for the coversation member user. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) GetConversationMemberRoles()([]string) { + return m.conversationMemberRoles +} +// GetConversationMemberUser gets the conversationMemberUser property value. Identity of the conversation member user. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) GetConversationMemberUser()(TeamworkUserIdentityable) { + return m.conversationMemberUser +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationMemberRoleUpdatedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["conversationMemberRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetConversationMemberRoles(res) + } + return nil + } + res["conversationMemberUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamworkUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConversationMemberUser(val.(TeamworkUserIdentityable)) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *ConversationMemberRoleUpdatedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + if m.GetConversationMemberRoles() != nil { + err = writer.WriteCollectionOfStringValues("conversationMemberRoles", m.GetConversationMemberRoles()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conversationMemberUser", m.GetConversationMemberUser()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetConversationMemberRoles sets the conversationMemberRoles property value. Roles for the coversation member user. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) SetConversationMemberRoles(value []string)() { + m.conversationMemberRoles = value +} +// SetConversationMemberUser sets the conversationMemberUser property value. Identity of the conversation member user. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) SetConversationMemberUser(value TeamworkUserIdentityable)() { + m.conversationMemberUser = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *ConversationMemberRoleUpdatedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detailable.go new file mode 100644 index 000000000..2e32ca27c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_member_role_updated_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMemberRoleUpdatedEventMessageDetailable +type ConversationMemberRoleUpdatedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConversationMemberRoles()([]string) + GetConversationMemberUser()(TeamworkUserIdentityable) + GetInitiator()(IdentitySetable) + SetConversationMemberRoles(value []string)() + SetConversationMemberUser(value TeamworkUserIdentityable)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_memberable.go b/src/internal/connector/graph/betasdk/models/conversation_memberable.go new file mode 100644 index 000000000..0be1126b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_memberable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationMemberable +type ConversationMemberable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetRoles()([]string) + GetVisibleHistoryStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDisplayName(value *string)() + SetRoles(value []string)() + SetVisibleHistoryStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_thread.go b/src/internal/connector/graph/betasdk/models/conversation_thread.go new file mode 100644 index 000000000..0377e27c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_thread.go @@ -0,0 +1,297 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationThread provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConversationThread struct { + Entity + // The Cc: recipients for the thread. Returned only on $select. + ccRecipients []Recipientable + // Indicates whether any of the posts within this thread has at least one attachment. Returned by default. + hasAttachments *bool + // Indicates if the thread is locked. Returned by default. + isLocked *bool + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. + lastDeliveredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The posts property + posts []Postable + // A short summary from the body of the latest post in this conversation. Returned by default. + preview *string + // The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. Returned by default. + topic *string + // The To: recipients for the thread. Returned only on $select. + toRecipients []Recipientable + // All the users that sent a message to this thread. Returned by default. + uniqueSenders []string +} +// NewConversationThread instantiates a new conversationThread and sets the default values. +func NewConversationThread()(*ConversationThread) { + m := &ConversationThread{ + Entity: *NewEntity(), + } + return m +} +// CreateConversationThreadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationThreadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversationThread(), nil +} +// GetCcRecipients gets the ccRecipients property value. The Cc: recipients for the thread. Returned only on $select. +func (m *ConversationThread) GetCcRecipients()([]Recipientable) { + return m.ccRecipients +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationThread) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ccRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetCcRecipients(res) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["isLocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLocked(val) + } + return nil + } + res["lastDeliveredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastDeliveredDateTime(val) + } + return nil + } + res["posts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePostFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Postable, len(val)) + for i, v := range val { + res[i] = v.(Postable) + } + m.SetPosts(res) + } + return nil + } + res["preview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreview(val) + } + return nil + } + res["topic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTopic(val) + } + return nil + } + res["toRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetToRecipients(res) + } + return nil + } + res["uniqueSenders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUniqueSenders(res) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether any of the posts within this thread has at least one attachment. Returned by default. +func (m *ConversationThread) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetIsLocked gets the isLocked property value. Indicates if the thread is locked. Returned by default. +func (m *ConversationThread) GetIsLocked()(*bool) { + return m.isLocked +} +// GetLastDeliveredDateTime gets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. +func (m *ConversationThread) GetLastDeliveredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastDeliveredDateTime +} +// GetPosts gets the posts property value. The posts property +func (m *ConversationThread) GetPosts()([]Postable) { + return m.posts +} +// GetPreview gets the preview property value. A short summary from the body of the latest post in this conversation. Returned by default. +func (m *ConversationThread) GetPreview()(*string) { + return m.preview +} +// GetTopic gets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. Returned by default. +func (m *ConversationThread) GetTopic()(*string) { + return m.topic +} +// GetToRecipients gets the toRecipients property value. The To: recipients for the thread. Returned only on $select. +func (m *ConversationThread) GetToRecipients()([]Recipientable) { + return m.toRecipients +} +// GetUniqueSenders gets the uniqueSenders property value. All the users that sent a message to this thread. Returned by default. +func (m *ConversationThread) GetUniqueSenders()([]string) { + return m.uniqueSenders +} +// Serialize serializes information the current object +func (m *ConversationThread) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCcRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCcRecipients())) + for i, v := range m.GetCcRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ccRecipients", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLocked", m.GetIsLocked()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastDeliveredDateTime", m.GetLastDeliveredDateTime()) + if err != nil { + return err + } + } + if m.GetPosts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPosts())) + for i, v := range m.GetPosts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("posts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preview", m.GetPreview()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("topic", m.GetTopic()) + if err != nil { + return err + } + } + if m.GetToRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetToRecipients())) + for i, v := range m.GetToRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("toRecipients", cast) + if err != nil { + return err + } + } + if m.GetUniqueSenders() != nil { + err = writer.WriteCollectionOfStringValues("uniqueSenders", m.GetUniqueSenders()) + if err != nil { + return err + } + } + return nil +} +// SetCcRecipients sets the ccRecipients property value. The Cc: recipients for the thread. Returned only on $select. +func (m *ConversationThread) SetCcRecipients(value []Recipientable)() { + m.ccRecipients = value +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether any of the posts within this thread has at least one attachment. Returned by default. +func (m *ConversationThread) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetIsLocked sets the isLocked property value. Indicates if the thread is locked. Returned by default. +func (m *ConversationThread) SetIsLocked(value *bool)() { + m.isLocked = value +} +// SetLastDeliveredDateTime sets the lastDeliveredDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. +func (m *ConversationThread) SetLastDeliveredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastDeliveredDateTime = value +} +// SetPosts sets the posts property value. The posts property +func (m *ConversationThread) SetPosts(value []Postable)() { + m.posts = value +} +// SetPreview sets the preview property value. A short summary from the body of the latest post in this conversation. Returned by default. +func (m *ConversationThread) SetPreview(value *string)() { + m.preview = value +} +// SetTopic sets the topic property value. The topic of the conversation. This property can be set when the conversation is created, but it cannot be updated. Returned by default. +func (m *ConversationThread) SetTopic(value *string)() { + m.topic = value +} +// SetToRecipients sets the toRecipients property value. The To: recipients for the thread. Returned only on $select. +func (m *ConversationThread) SetToRecipients(value []Recipientable)() { + m.toRecipients = value +} +// SetUniqueSenders sets the uniqueSenders property value. All the users that sent a message to this thread. Returned by default. +func (m *ConversationThread) SetUniqueSenders(value []string)() { + m.uniqueSenders = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_thread_collection_response.go b/src/internal/connector/graph/betasdk/models/conversation_thread_collection_response.go new file mode 100644 index 000000000..c6c212b8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_thread_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationThreadCollectionResponse +type ConversationThreadCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ConversationThreadable +} +// NewConversationThreadCollectionResponse instantiates a new ConversationThreadCollectionResponse and sets the default values. +func NewConversationThreadCollectionResponse()(*ConversationThreadCollectionResponse) { + m := &ConversationThreadCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConversationThreadCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConversationThreadCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConversationThreadCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConversationThreadCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationThreadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationThreadable, len(val)) + for i, v := range val { + res[i] = v.(ConversationThreadable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConversationThreadCollectionResponse) GetValue()([]ConversationThreadable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConversationThreadCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConversationThreadCollectionResponse) SetValue(value []ConversationThreadable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_thread_collection_responseable.go b/src/internal/connector/graph/betasdk/models/conversation_thread_collection_responseable.go new file mode 100644 index 000000000..e37661681 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_thread_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationThreadCollectionResponseable +type ConversationThreadCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConversationThreadable) + SetValue(value []ConversationThreadable)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversation_threadable.go b/src/internal/connector/graph/betasdk/models/conversation_threadable.go new file mode 100644 index 000000000..786581439 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversation_threadable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ConversationThreadable +type ConversationThreadable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCcRecipients()([]Recipientable) + GetHasAttachments()(*bool) + GetIsLocked()(*bool) + GetLastDeliveredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPosts()([]Postable) + GetPreview()(*string) + GetTopic()(*string) + GetToRecipients()([]Recipientable) + GetUniqueSenders()([]string) + SetCcRecipients(value []Recipientable)() + SetHasAttachments(value *bool)() + SetIsLocked(value *bool)() + SetLastDeliveredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPosts(value []Postable)() + SetPreview(value *string)() + SetTopic(value *string)() + SetToRecipients(value []Recipientable)() + SetUniqueSenders(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/conversationable.go b/src/internal/connector/graph/betasdk/models/conversationable.go new file mode 100644 index 000000000..0a6f13710 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/conversationable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Conversationable +type Conversationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHasAttachments()(*bool) + GetLastDeliveredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPreview()(*string) + GetThreads()([]ConversationThreadable) + GetTopic()(*string) + GetUniqueSenders()([]string) + SetHasAttachments(value *bool)() + SetLastDeliveredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPreview(value *string)() + SetThreads(value []ConversationThreadable)() + SetTopic(value *string)() + SetUniqueSenders(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/copy_notebook_model.go b/src/internal/connector/graph/betasdk/models/copy_notebook_model.go new file mode 100644 index 000000000..138f44fc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/copy_notebook_model.go @@ -0,0 +1,463 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopyNotebookModel +type CopyNotebookModel 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 createdBy property + createdBy *string + // The createdByIdentity property + createdByIdentity IdentitySetable + // The createdTime property + createdTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id property + id *string + // The isDefault property + isDefault *bool + // The isShared property + isShared *bool + // The lastModifiedBy property + lastModifiedBy *string + // The lastModifiedByIdentity property + lastModifiedByIdentity IdentitySetable + // The lastModifiedTime property + lastModifiedTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The links property + links NotebookLinksable + // The name property + name *string + // The OdataType property + odataType *string + // The sectionGroupsUrl property + sectionGroupsUrl *string + // The sectionsUrl property + sectionsUrl *string + // The self property + self *string + // The userRole property + userRole *OnenoteUserRole +} +// NewCopyNotebookModel instantiates a new CopyNotebookModel and sets the default values. +func NewCopyNotebookModel()(*CopyNotebookModel) { + m := &CopyNotebookModel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCopyNotebookModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCopyNotebookModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCopyNotebookModel(), 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 *CopyNotebookModel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *CopyNotebookModel) GetCreatedBy()(*string) { + return m.createdBy +} +// GetCreatedByIdentity gets the createdByIdentity property value. The createdByIdentity property +func (m *CopyNotebookModel) GetCreatedByIdentity()(IdentitySetable) { + return m.createdByIdentity +} +// GetCreatedTime gets the createdTime property value. The createdTime property +func (m *CopyNotebookModel) GetCreatedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CopyNotebookModel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val) + } + return nil + } + res["createdByIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedByIdentity(val.(IdentitySetable)) + } + return nil + } + res["createdTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedTime(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isShared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsShared(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val) + } + return nil + } + res["lastModifiedByIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedByIdentity(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedTime(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNotebookLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(NotebookLinksable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["sectionGroupsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionGroupsUrl(val) + } + return nil + } + res["sectionsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionsUrl(val) + } + return nil + } + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + res["userRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnenoteUserRole) + if err != nil { + return err + } + if val != nil { + m.SetUserRole(val.(*OnenoteUserRole)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *CopyNotebookModel) GetId()(*string) { + return m.id +} +// GetIsDefault gets the isDefault property value. The isDefault property +func (m *CopyNotebookModel) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsShared gets the isShared property value. The isShared property +func (m *CopyNotebookModel) GetIsShared()(*bool) { + return m.isShared +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *CopyNotebookModel) GetLastModifiedBy()(*string) { + return m.lastModifiedBy +} +// GetLastModifiedByIdentity gets the lastModifiedByIdentity property value. The lastModifiedByIdentity property +func (m *CopyNotebookModel) GetLastModifiedByIdentity()(IdentitySetable) { + return m.lastModifiedByIdentity +} +// GetLastModifiedTime gets the lastModifiedTime property value. The lastModifiedTime property +func (m *CopyNotebookModel) GetLastModifiedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedTime +} +// GetLinks gets the links property value. The links property +func (m *CopyNotebookModel) GetLinks()(NotebookLinksable) { + return m.links +} +// GetName gets the name property value. The name property +func (m *CopyNotebookModel) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CopyNotebookModel) GetOdataType()(*string) { + return m.odataType +} +// GetSectionGroupsUrl gets the sectionGroupsUrl property value. The sectionGroupsUrl property +func (m *CopyNotebookModel) GetSectionGroupsUrl()(*string) { + return m.sectionGroupsUrl +} +// GetSectionsUrl gets the sectionsUrl property value. The sectionsUrl property +func (m *CopyNotebookModel) GetSectionsUrl()(*string) { + return m.sectionsUrl +} +// GetSelf gets the self property value. The self property +func (m *CopyNotebookModel) GetSelf()(*string) { + return m.self +} +// GetUserRole gets the userRole property value. The userRole property +func (m *CopyNotebookModel) GetUserRole()(*OnenoteUserRole) { + return m.userRole +} +// Serialize serializes information the current object +func (m *CopyNotebookModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("createdByIdentity", m.GetCreatedByIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdTime", m.GetCreatedTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isShared", m.GetIsShared()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lastModifiedByIdentity", m.GetLastModifiedByIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedTime", m.GetLastModifiedTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sectionGroupsUrl", m.GetSectionGroupsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sectionsUrl", m.GetSectionsUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("self", m.GetSelf()) + if err != nil { + return err + } + } + if m.GetUserRole() != nil { + cast := (*m.GetUserRole()).String() + err := writer.WriteStringValue("userRole", &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 *CopyNotebookModel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *CopyNotebookModel) SetCreatedBy(value *string)() { + m.createdBy = value +} +// SetCreatedByIdentity sets the createdByIdentity property value. The createdByIdentity property +func (m *CopyNotebookModel) SetCreatedByIdentity(value IdentitySetable)() { + m.createdByIdentity = value +} +// SetCreatedTime sets the createdTime property value. The createdTime property +func (m *CopyNotebookModel) SetCreatedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdTime = value +} +// SetId sets the id property value. The id property +func (m *CopyNotebookModel) SetId(value *string)() { + m.id = value +} +// SetIsDefault sets the isDefault property value. The isDefault property +func (m *CopyNotebookModel) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsShared sets the isShared property value. The isShared property +func (m *CopyNotebookModel) SetIsShared(value *bool)() { + m.isShared = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *CopyNotebookModel) SetLastModifiedBy(value *string)() { + m.lastModifiedBy = value +} +// SetLastModifiedByIdentity sets the lastModifiedByIdentity property value. The lastModifiedByIdentity property +func (m *CopyNotebookModel) SetLastModifiedByIdentity(value IdentitySetable)() { + m.lastModifiedByIdentity = value +} +// SetLastModifiedTime sets the lastModifiedTime property value. The lastModifiedTime property +func (m *CopyNotebookModel) SetLastModifiedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedTime = value +} +// SetLinks sets the links property value. The links property +func (m *CopyNotebookModel) SetLinks(value NotebookLinksable)() { + m.links = value +} +// SetName sets the name property value. The name property +func (m *CopyNotebookModel) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CopyNotebookModel) SetOdataType(value *string)() { + m.odataType = value +} +// SetSectionGroupsUrl sets the sectionGroupsUrl property value. The sectionGroupsUrl property +func (m *CopyNotebookModel) SetSectionGroupsUrl(value *string)() { + m.sectionGroupsUrl = value +} +// SetSectionsUrl sets the sectionsUrl property value. The sectionsUrl property +func (m *CopyNotebookModel) SetSectionsUrl(value *string)() { + m.sectionsUrl = value +} +// SetSelf sets the self property value. The self property +func (m *CopyNotebookModel) SetSelf(value *string)() { + m.self = value +} +// SetUserRole sets the userRole property value. The userRole property +func (m *CopyNotebookModel) SetUserRole(value *OnenoteUserRole)() { + m.userRole = value +} diff --git a/src/internal/connector/graph/betasdk/models/copy_notebook_modelable.go b/src/internal/connector/graph/betasdk/models/copy_notebook_modelable.go new file mode 100644 index 000000000..64117375b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/copy_notebook_modelable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CopyNotebookModelable +type CopyNotebookModelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(*string) + GetCreatedByIdentity()(IdentitySetable) + GetCreatedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetId()(*string) + GetIsDefault()(*bool) + GetIsShared()(*bool) + GetLastModifiedBy()(*string) + GetLastModifiedByIdentity()(IdentitySetable) + GetLastModifiedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLinks()(NotebookLinksable) + GetName()(*string) + GetOdataType()(*string) + GetSectionGroupsUrl()(*string) + GetSectionsUrl()(*string) + GetSelf()(*string) + GetUserRole()(*OnenoteUserRole) + SetCreatedBy(value *string)() + SetCreatedByIdentity(value IdentitySetable)() + SetCreatedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetId(value *string)() + SetIsDefault(value *bool)() + SetIsShared(value *bool)() + SetLastModifiedBy(value *string)() + SetLastModifiedByIdentity(value IdentitySetable)() + SetLastModifiedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLinks(value NotebookLinksable)() + SetName(value *string)() + SetOdataType(value *string)() + SetSectionGroupsUrl(value *string)() + SetSectionsUrl(value *string)() + SetSelf(value *string)() + SetUserRole(value *OnenoteUserRole)() +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration.go b/src/internal/connector/graph/betasdk/models/cors_configuration.go new file mode 100644 index 000000000..f9d4dc390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration.go @@ -0,0 +1,213 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfiguration +type CorsConfiguration 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 request headers that the origin domain may specify on the CORS request. The wildcard character * indicates that any header beginning with the specified prefix is allowed. + allowedHeaders []string + // The HTTP request methods that the origin domain may use for a CORS request. + allowedMethods []string + // The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. The origin must be an exact case-sensitive match with the origin that the user age sends to the service. + allowedOrigins []string + // The maximum amount of time that a browser should cache the response to the preflight OPTIONS request. + maxAgeInSeconds *int32 + // The OdataType property + odataType *string + // Resource within the application segment for which CORS permissions are granted. / grants permission for whole app segment. + resource *string +} +// NewCorsConfiguration instantiates a new corsConfiguration and sets the default values. +func NewCorsConfiguration()(*CorsConfiguration) { + m := &CorsConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCorsConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCorsConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCorsConfiguration(), 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 *CorsConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedHeaders gets the allowedHeaders property value. The request headers that the origin domain may specify on the CORS request. The wildcard character * indicates that any header beginning with the specified prefix is allowed. +func (m *CorsConfiguration) GetAllowedHeaders()([]string) { + return m.allowedHeaders +} +// GetAllowedMethods gets the allowedMethods property value. The HTTP request methods that the origin domain may use for a CORS request. +func (m *CorsConfiguration) GetAllowedMethods()([]string) { + return m.allowedMethods +} +// GetAllowedOrigins gets the allowedOrigins property value. The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. The origin must be an exact case-sensitive match with the origin that the user age sends to the service. +func (m *CorsConfiguration) GetAllowedOrigins()([]string) { + return m.allowedOrigins +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CorsConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedHeaders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedHeaders(res) + } + return nil + } + res["allowedMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedMethods(res) + } + return nil + } + res["allowedOrigins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedOrigins(res) + } + return nil + } + res["maxAgeInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxAgeInSeconds(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["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + return res +} +// GetMaxAgeInSeconds gets the maxAgeInSeconds property value. The maximum amount of time that a browser should cache the response to the preflight OPTIONS request. +func (m *CorsConfiguration) GetMaxAgeInSeconds()(*int32) { + return m.maxAgeInSeconds +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CorsConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetResource gets the resource property value. Resource within the application segment for which CORS permissions are granted. / grants permission for whole app segment. +func (m *CorsConfiguration) GetResource()(*string) { + return m.resource +} +// Serialize serializes information the current object +func (m *CorsConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedHeaders() != nil { + err := writer.WriteCollectionOfStringValues("allowedHeaders", m.GetAllowedHeaders()) + if err != nil { + return err + } + } + if m.GetAllowedMethods() != nil { + err := writer.WriteCollectionOfStringValues("allowedMethods", m.GetAllowedMethods()) + if err != nil { + return err + } + } + if m.GetAllowedOrigins() != nil { + err := writer.WriteCollectionOfStringValues("allowedOrigins", m.GetAllowedOrigins()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maxAgeInSeconds", m.GetMaxAgeInSeconds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource", m.GetResource()) + 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 *CorsConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedHeaders sets the allowedHeaders property value. The request headers that the origin domain may specify on the CORS request. The wildcard character * indicates that any header beginning with the specified prefix is allowed. +func (m *CorsConfiguration) SetAllowedHeaders(value []string)() { + m.allowedHeaders = value +} +// SetAllowedMethods sets the allowedMethods property value. The HTTP request methods that the origin domain may use for a CORS request. +func (m *CorsConfiguration) SetAllowedMethods(value []string)() { + m.allowedMethods = value +} +// SetAllowedOrigins sets the allowedOrigins property value. The origin domains that are permitted to make a request against the service via CORS. The origin domain is the domain from which the request originates. The origin must be an exact case-sensitive match with the origin that the user age sends to the service. +func (m *CorsConfiguration) SetAllowedOrigins(value []string)() { + m.allowedOrigins = value +} +// SetMaxAgeInSeconds sets the maxAgeInSeconds property value. The maximum amount of time that a browser should cache the response to the preflight OPTIONS request. +func (m *CorsConfiguration) SetMaxAgeInSeconds(value *int32)() { + m.maxAgeInSeconds = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CorsConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetResource sets the resource property value. Resource within the application segment for which CORS permissions are granted. / grants permission for whole app segment. +func (m *CorsConfiguration) SetResource(value *string)() { + m.resource = value +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/cors_configuration_collection_response.go new file mode 100644 index 000000000..7949b221b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfigurationCollectionResponse +type CorsConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CorsConfigurationable +} +// NewCorsConfigurationCollectionResponse instantiates a new CorsConfigurationCollectionResponse and sets the default values. +func NewCorsConfigurationCollectionResponse()(*CorsConfigurationCollectionResponse) { + m := &CorsConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCorsConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCorsConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCorsConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CorsConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCorsConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CorsConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(CorsConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CorsConfigurationCollectionResponse) GetValue()([]CorsConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CorsConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CorsConfigurationCollectionResponse) SetValue(value []CorsConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cors_configuration_collection_responseable.go new file mode 100644 index 000000000..8d429c9f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfigurationCollectionResponseable +type CorsConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CorsConfigurationable) + SetValue(value []CorsConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_v2.go b/src/internal/connector/graph/betasdk/models/cors_configuration_v2.go new file mode 100644 index 000000000..0600feeed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_v2.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfiguration_v2 provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CorsConfiguration_v2 struct { + Entity + // The allowedHeaders property + allowedHeaders []string + // The allowedMethods property + allowedMethods []string + // The allowedOrigins property + allowedOrigins []string + // The maxAgeInSeconds property + maxAgeInSeconds *int32 + // The resource property + resource *string +} +// NewCorsConfiguration_v2 instantiates a new corsConfiguration_v2 and sets the default values. +func NewCorsConfiguration_v2()(*CorsConfiguration_v2) { + m := &CorsConfiguration_v2{ + Entity: *NewEntity(), + } + return m +} +// CreateCorsConfiguration_v2FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCorsConfiguration_v2FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCorsConfiguration_v2(), nil +} +// GetAllowedHeaders gets the allowedHeaders property value. The allowedHeaders property +func (m *CorsConfiguration_v2) GetAllowedHeaders()([]string) { + return m.allowedHeaders +} +// GetAllowedMethods gets the allowedMethods property value. The allowedMethods property +func (m *CorsConfiguration_v2) GetAllowedMethods()([]string) { + return m.allowedMethods +} +// GetAllowedOrigins gets the allowedOrigins property value. The allowedOrigins property +func (m *CorsConfiguration_v2) GetAllowedOrigins()([]string) { + return m.allowedOrigins +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CorsConfiguration_v2) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedHeaders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedHeaders(res) + } + return nil + } + res["allowedMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedMethods(res) + } + return nil + } + res["allowedOrigins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedOrigins(res) + } + return nil + } + res["maxAgeInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxAgeInSeconds(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + return res +} +// GetMaxAgeInSeconds gets the maxAgeInSeconds property value. The maxAgeInSeconds property +func (m *CorsConfiguration_v2) GetMaxAgeInSeconds()(*int32) { + return m.maxAgeInSeconds +} +// GetResource gets the resource property value. The resource property +func (m *CorsConfiguration_v2) GetResource()(*string) { + return m.resource +} +// Serialize serializes information the current object +func (m *CorsConfiguration_v2) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedHeaders() != nil { + err = writer.WriteCollectionOfStringValues("allowedHeaders", m.GetAllowedHeaders()) + if err != nil { + return err + } + } + if m.GetAllowedMethods() != nil { + err = writer.WriteCollectionOfStringValues("allowedMethods", m.GetAllowedMethods()) + if err != nil { + return err + } + } + if m.GetAllowedOrigins() != nil { + err = writer.WriteCollectionOfStringValues("allowedOrigins", m.GetAllowedOrigins()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maxAgeInSeconds", m.GetMaxAgeInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resource", m.GetResource()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedHeaders sets the allowedHeaders property value. The allowedHeaders property +func (m *CorsConfiguration_v2) SetAllowedHeaders(value []string)() { + m.allowedHeaders = value +} +// SetAllowedMethods sets the allowedMethods property value. The allowedMethods property +func (m *CorsConfiguration_v2) SetAllowedMethods(value []string)() { + m.allowedMethods = value +} +// SetAllowedOrigins sets the allowedOrigins property value. The allowedOrigins property +func (m *CorsConfiguration_v2) SetAllowedOrigins(value []string)() { + m.allowedOrigins = value +} +// SetMaxAgeInSeconds sets the maxAgeInSeconds property value. The maxAgeInSeconds property +func (m *CorsConfiguration_v2) SetMaxAgeInSeconds(value *int32)() { + m.maxAgeInSeconds = value +} +// SetResource sets the resource property value. The resource property +func (m *CorsConfiguration_v2) SetResource(value *string)() { + m.resource = value +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_response.go b/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_response.go new file mode 100644 index 000000000..9cd795d28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfiguration_v2CollectionResponse +type CorsConfiguration_v2CollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CorsConfiguration_v2able +} +// NewCorsConfiguration_v2CollectionResponse instantiates a new CorsConfiguration_v2CollectionResponse and sets the default values. +func NewCorsConfiguration_v2CollectionResponse()(*CorsConfiguration_v2CollectionResponse) { + m := &CorsConfiguration_v2CollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCorsConfiguration_v2CollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCorsConfiguration_v2CollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCorsConfiguration_v2CollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CorsConfiguration_v2CollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCorsConfiguration_v2FromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CorsConfiguration_v2able, len(val)) + for i, v := range val { + res[i] = v.(CorsConfiguration_v2able) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CorsConfiguration_v2CollectionResponse) GetValue()([]CorsConfiguration_v2able) { + return m.value +} +// Serialize serializes information the current object +func (m *CorsConfiguration_v2CollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CorsConfiguration_v2CollectionResponse) SetValue(value []CorsConfiguration_v2able)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_responseable.go new file mode 100644 index 000000000..7cf93833b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_v2_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfiguration_v2CollectionResponseable +type CorsConfiguration_v2CollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CorsConfiguration_v2able) + SetValue(value []CorsConfiguration_v2able)() +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configuration_v2able.go b/src/internal/connector/graph/betasdk/models/cors_configuration_v2able.go new file mode 100644 index 000000000..3a6885584 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configuration_v2able.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfiguration_v2able +type CorsConfiguration_v2able interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedHeaders()([]string) + GetAllowedMethods()([]string) + GetAllowedOrigins()([]string) + GetMaxAgeInSeconds()(*int32) + GetResource()(*string) + SetAllowedHeaders(value []string)() + SetAllowedMethods(value []string)() + SetAllowedOrigins(value []string)() + SetMaxAgeInSeconds(value *int32)() + SetResource(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cors_configurationable.go b/src/internal/connector/graph/betasdk/models/cors_configurationable.go new file mode 100644 index 000000000..d87fa0e3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cors_configurationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CorsConfigurationable +type CorsConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedHeaders()([]string) + GetAllowedMethods()([]string) + GetAllowedOrigins()([]string) + GetMaxAgeInSeconds()(*int32) + GetOdataType()(*string) + GetResource()(*string) + SetAllowedHeaders(value []string)() + SetAllowedMethods(value []string)() + SetAllowedOrigins(value []string)() + SetMaxAgeInSeconds(value *int32)() + SetOdataType(value *string)() + SetResource(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/country_lookup_method_type.go b/src/internal/connector/graph/betasdk/models/country_lookup_method_type.go new file mode 100644 index 000000000..3c0cb62ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_lookup_method_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CountryLookupMethodType int + +const ( + CLIENTIPADDRESS_COUNTRYLOOKUPMETHODTYPE CountryLookupMethodType = iota + AUTHENTICATORAPPGPS_COUNTRYLOOKUPMETHODTYPE + UNKNOWNFUTUREVALUE_COUNTRYLOOKUPMETHODTYPE +) + +func (i CountryLookupMethodType) String() string { + return []string{"clientIpAddress", "authenticatorAppGps", "unknownFutureValue"}[i] +} +func ParseCountryLookupMethodType(v string) (interface{}, error) { + result := CLIENTIPADDRESS_COUNTRYLOOKUPMETHODTYPE + switch v { + case "clientIpAddress": + result = CLIENTIPADDRESS_COUNTRYLOOKUPMETHODTYPE + case "authenticatorAppGps": + result = AUTHENTICATORAPPGPS_COUNTRYLOOKUPMETHODTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_COUNTRYLOOKUPMETHODTYPE + default: + return 0, errors.New("Unknown CountryLookupMethodType value: " + v) + } + return &result, nil +} +func SerializeCountryLookupMethodType(values []CountryLookupMethodType) []string { + 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/country_named_location.go b/src/internal/connector/graph/betasdk/models/country_named_location.go new file mode 100644 index 000000000..231995cbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_named_location.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryNamedLocation +type CountryNamedLocation struct { + NamedLocation + // List of countries and/or regions in two-letter format specified by ISO 3166-2. + countriesAndRegions []string + // Determines what method is used to decide which country the user is located in. Possible values are clientIpAddress (default) and authenticatorAppGps. + countryLookupMethod *CountryLookupMethodType + // true if IP addresses that don't map to a country or region should be included in the named location. Optional. Default value is false. + includeUnknownCountriesAndRegions *bool +} +// NewCountryNamedLocation instantiates a new CountryNamedLocation and sets the default values. +func NewCountryNamedLocation()(*CountryNamedLocation) { + m := &CountryNamedLocation{ + NamedLocation: *NewNamedLocation(), + } + return m +} +// CreateCountryNamedLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCountryNamedLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCountryNamedLocation(), nil +} +// GetCountriesAndRegions gets the countriesAndRegions property value. List of countries and/or regions in two-letter format specified by ISO 3166-2. +func (m *CountryNamedLocation) GetCountriesAndRegions()([]string) { + return m.countriesAndRegions +} +// GetCountryLookupMethod gets the countryLookupMethod property value. Determines what method is used to decide which country the user is located in. Possible values are clientIpAddress (default) and authenticatorAppGps. +func (m *CountryNamedLocation) GetCountryLookupMethod()(*CountryLookupMethodType) { + return m.countryLookupMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CountryNamedLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.NamedLocation.GetFieldDeserializers() + res["countriesAndRegions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCountriesAndRegions(res) + } + return nil + } + res["countryLookupMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCountryLookupMethodType) + if err != nil { + return err + } + if val != nil { + m.SetCountryLookupMethod(val.(*CountryLookupMethodType)) + } + return nil + } + res["includeUnknownCountriesAndRegions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeUnknownCountriesAndRegions(val) + } + return nil + } + return res +} +// GetIncludeUnknownCountriesAndRegions gets the includeUnknownCountriesAndRegions property value. true if IP addresses that don't map to a country or region should be included in the named location. Optional. Default value is false. +func (m *CountryNamedLocation) GetIncludeUnknownCountriesAndRegions()(*bool) { + return m.includeUnknownCountriesAndRegions +} +// Serialize serializes information the current object +func (m *CountryNamedLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.NamedLocation.Serialize(writer) + if err != nil { + return err + } + if m.GetCountriesAndRegions() != nil { + err = writer.WriteCollectionOfStringValues("countriesAndRegions", m.GetCountriesAndRegions()) + if err != nil { + return err + } + } + if m.GetCountryLookupMethod() != nil { + cast := (*m.GetCountryLookupMethod()).String() + err = writer.WriteStringValue("countryLookupMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("includeUnknownCountriesAndRegions", m.GetIncludeUnknownCountriesAndRegions()) + if err != nil { + return err + } + } + return nil +} +// SetCountriesAndRegions sets the countriesAndRegions property value. List of countries and/or regions in two-letter format specified by ISO 3166-2. +func (m *CountryNamedLocation) SetCountriesAndRegions(value []string)() { + m.countriesAndRegions = value +} +// SetCountryLookupMethod sets the countryLookupMethod property value. Determines what method is used to decide which country the user is located in. Possible values are clientIpAddress (default) and authenticatorAppGps. +func (m *CountryNamedLocation) SetCountryLookupMethod(value *CountryLookupMethodType)() { + m.countryLookupMethod = value +} +// SetIncludeUnknownCountriesAndRegions sets the includeUnknownCountriesAndRegions property value. true if IP addresses that don't map to a country or region should be included in the named location. Optional. Default value is false. +func (m *CountryNamedLocation) SetIncludeUnknownCountriesAndRegions(value *bool)() { + m.includeUnknownCountriesAndRegions = value +} diff --git a/src/internal/connector/graph/betasdk/models/country_named_location_collection_response.go b/src/internal/connector/graph/betasdk/models/country_named_location_collection_response.go new file mode 100644 index 000000000..08fc72941 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_named_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryNamedLocationCollectionResponse +type CountryNamedLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CountryNamedLocationable +} +// NewCountryNamedLocationCollectionResponse instantiates a new CountryNamedLocationCollectionResponse and sets the default values. +func NewCountryNamedLocationCollectionResponse()(*CountryNamedLocationCollectionResponse) { + m := &CountryNamedLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCountryNamedLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCountryNamedLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCountryNamedLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CountryNamedLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCountryNamedLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CountryNamedLocationable, len(val)) + for i, v := range val { + res[i] = v.(CountryNamedLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CountryNamedLocationCollectionResponse) GetValue()([]CountryNamedLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CountryNamedLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CountryNamedLocationCollectionResponse) SetValue(value []CountryNamedLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/country_named_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/country_named_location_collection_responseable.go new file mode 100644 index 000000000..20973da34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_named_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryNamedLocationCollectionResponseable +type CountryNamedLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CountryNamedLocationable) + SetValue(value []CountryNamedLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/country_named_locationable.go b/src/internal/connector/graph/betasdk/models/country_named_locationable.go new file mode 100644 index 000000000..5daf96509 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_named_locationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryNamedLocationable +type CountryNamedLocationable interface { + NamedLocationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountriesAndRegions()([]string) + GetCountryLookupMethod()(*CountryLookupMethodType) + GetIncludeUnknownCountriesAndRegions()(*bool) + SetCountriesAndRegions(value []string)() + SetCountryLookupMethod(value *CountryLookupMethodType)() + SetIncludeUnknownCountriesAndRegions(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/country_region.go b/src/internal/connector/graph/betasdk/models/country_region.go new file mode 100644 index 000000000..9d3881b74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_region.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryRegion provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CountryRegion struct { + Entity + // The addressFormat property + addressFormat *string + // The code property + code *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCountryRegion instantiates a new countryRegion and sets the default values. +func NewCountryRegion()(*CountryRegion) { + m := &CountryRegion{ + Entity: *NewEntity(), + } + return m +} +// CreateCountryRegionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCountryRegionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCountryRegion(), nil +} +// GetAddressFormat gets the addressFormat property value. The addressFormat property +func (m *CountryRegion) GetAddressFormat()(*string) { + return m.addressFormat +} +// GetCode gets the code property value. The code property +func (m *CountryRegion) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *CountryRegion) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CountryRegion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["addressFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddressFormat(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CountryRegion) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *CountryRegion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("addressFormat", m.GetAddressFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAddressFormat sets the addressFormat property value. The addressFormat property +func (m *CountryRegion) SetAddressFormat(value *string)() { + m.addressFormat = value +} +// SetCode sets the code property value. The code property +func (m *CountryRegion) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *CountryRegion) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CountryRegion) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/country_region_collection_response.go b/src/internal/connector/graph/betasdk/models/country_region_collection_response.go new file mode 100644 index 000000000..645da55f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_region_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryRegionCollectionResponse +type CountryRegionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CountryRegionable +} +// NewCountryRegionCollectionResponse instantiates a new CountryRegionCollectionResponse and sets the default values. +func NewCountryRegionCollectionResponse()(*CountryRegionCollectionResponse) { + m := &CountryRegionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCountryRegionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCountryRegionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCountryRegionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CountryRegionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCountryRegionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CountryRegionable, len(val)) + for i, v := range val { + res[i] = v.(CountryRegionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CountryRegionCollectionResponse) GetValue()([]CountryRegionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CountryRegionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CountryRegionCollectionResponse) SetValue(value []CountryRegionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/country_region_collection_responseable.go b/src/internal/connector/graph/betasdk/models/country_region_collection_responseable.go new file mode 100644 index 000000000..723014404 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_region_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryRegionCollectionResponseable +type CountryRegionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CountryRegionable) + SetValue(value []CountryRegionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/country_regionable.go b/src/internal/connector/graph/betasdk/models/country_regionable.go new file mode 100644 index 000000000..283681f89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/country_regionable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CountryRegionable +type CountryRegionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddressFormat()(*string) + GetCode()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAddressFormat(value *string)() + SetCode(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/create_action.go b/src/internal/connector/graph/betasdk/models/create_action.go new file mode 100644 index 000000000..ae6506c67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/create_action.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CreateAction +type CreateAction 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 OdataType property + odataType *string +} +// NewCreateAction instantiates a new createAction and sets the default values. +func NewCreateAction()(*CreateAction) { + m := &CreateAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCreateActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCreateActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCreateAction(), 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 *CreateAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CreateAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CreateAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CreateAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CreateAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CreateAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/create_actionable.go b/src/internal/connector/graph/betasdk/models/create_actionable.go new file mode 100644 index 000000000..61b9db86b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/create_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CreateActionable +type CreateActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential.go b/src/internal/connector/graph/betasdk/models/credential.go new file mode 100644 index 000000000..a0a7c4402 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Credential +type Credential 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 name of the field for this credential. e.g, username or password or phoneNumber. This is defined by the application. Must match what is in the html field on singleSignOnSettings/password object. + fieldId *string + // The OdataType property + odataType *string + // The type for this credential. Valid values: username, password, or other. + type_escaped *string + // The value for this credential. e.g, mysuperhiddenpassword. Note the value for passwords is write-only, the value can never be read back. + value *string +} +// NewCredential instantiates a new credential and sets the default values. +func NewCredential()(*Credential) { + m := &Credential{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCredentialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredential(), 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 *Credential) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Credential) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fieldId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFieldId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(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 +} +// GetFieldId gets the fieldId property value. The name of the field for this credential. e.g, username or password or phoneNumber. This is defined by the application. Must match what is in the html field on singleSignOnSettings/password object. +func (m *Credential) GetFieldId()(*string) { + return m.fieldId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Credential) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type for this credential. Valid values: username, password, or other. +func (m *Credential) GetType()(*string) { + return m.type_escaped +} +// GetValue gets the value property value. The value for this credential. e.g, mysuperhiddenpassword. Note the value for passwords is write-only, the value can never be read back. +func (m *Credential) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *Credential) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fieldId", m.GetFieldId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *Credential) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFieldId sets the fieldId property value. The name of the field for this credential. e.g, username or password or phoneNumber. This is defined by the application. Must match what is in the html field on singleSignOnSettings/password object. +func (m *Credential) SetFieldId(value *string)() { + m.fieldId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Credential) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type for this credential. Valid values: username, password, or other. +func (m *Credential) SetType(value *string)() { + m.type_escaped = value +} +// SetValue sets the value property value. The value for this credential. e.g, mysuperhiddenpassword. Note the value for passwords is write-only, the value can never be read back. +func (m *Credential) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_collection_response.go b/src/internal/connector/graph/betasdk/models/credential_collection_response.go new file mode 100644 index 000000000..f076c4de0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialCollectionResponse +type CredentialCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Credentialable +} +// NewCredentialCollectionResponse instantiates a new CredentialCollectionResponse and sets the default values. +func NewCredentialCollectionResponse()(*CredentialCollectionResponse) { + m := &CredentialCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCredentialCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Credentialable, len(val)) + for i, v := range val { + res[i] = v.(Credentialable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CredentialCollectionResponse) GetValue()([]Credentialable) { + return m.value +} +// Serialize serializes information the current object +func (m *CredentialCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CredentialCollectionResponse) SetValue(value []Credentialable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_collection_responseable.go b/src/internal/connector/graph/betasdk/models/credential_collection_responseable.go new file mode 100644 index 000000000..355d6dd81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialCollectionResponseable +type CredentialCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Credentialable) + SetValue(value []Credentialable)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extension.go new file mode 100644 index 000000000..675864eaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extension.go @@ -0,0 +1,178 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialSingleSignOnExtension +type CredentialSingleSignOnExtension struct { + SingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string +} +// NewCredentialSingleSignOnExtension instantiates a new CredentialSingleSignOnExtension and sets the default values. +func NewCredentialSingleSignOnExtension()(*CredentialSingleSignOnExtension) { + m := &CredentialSingleSignOnExtension{ + SingleSignOnExtension: *NewSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.credentialSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCredentialSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *CredentialSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *CredentialSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *CredentialSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *CredentialSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *CredentialSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *CredentialSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *CredentialSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *CredentialSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *CredentialSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *CredentialSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *CredentialSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extensionable.go new file mode 100644 index 000000000..a5202142f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_single_sign_on_extensionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialSingleSignOnExtensionable +type CredentialSingleSignOnExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SingleSignOnExtensionable + GetConfigurations()([]KeyTypedValuePairable) + GetDomains()([]string) + GetExtensionIdentifier()(*string) + GetRealm()(*string) + GetTeamIdentifier()(*string) + SetConfigurations(value []KeyTypedValuePairable)() + SetDomains(value []string)() + SetExtensionIdentifier(value *string)() + SetRealm(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential_usage_summary.go b/src/internal/connector/graph/betasdk/models/credential_usage_summary.go new file mode 100644 index 000000000..2830c7bef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_usage_summary.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUsageSummary +type CredentialUsageSummary struct { + Entity + // The authMethod property + authMethod *UsageAuthMethod + // Provides the count of failed resets or registration data. + failureActivityCount *int64 + // The feature property + feature *FeatureType + // Provides the count of successful registrations or resets. + successfulActivityCount *int64 +} +// NewCredentialUsageSummary instantiates a new CredentialUsageSummary and sets the default values. +func NewCredentialUsageSummary()(*CredentialUsageSummary) { + m := &CredentialUsageSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateCredentialUsageSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUsageSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUsageSummary(), nil +} +// GetAuthMethod gets the authMethod property value. The authMethod property +func (m *CredentialUsageSummary) GetAuthMethod()(*UsageAuthMethod) { + return m.authMethod +} +// GetFailureActivityCount gets the failureActivityCount property value. Provides the count of failed resets or registration data. +func (m *CredentialUsageSummary) GetFailureActivityCount()(*int64) { + return m.failureActivityCount +} +// GetFeature gets the feature property value. The feature property +func (m *CredentialUsageSummary) GetFeature()(*FeatureType) { + return m.feature +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUsageSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUsageAuthMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthMethod(val.(*UsageAuthMethod)) + } + return nil + } + res["failureActivityCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFailureActivityCount(val) + } + return nil + } + res["feature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFeatureType) + if err != nil { + return err + } + if val != nil { + m.SetFeature(val.(*FeatureType)) + } + return nil + } + res["successfulActivityCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulActivityCount(val) + } + return nil + } + return res +} +// GetSuccessfulActivityCount gets the successfulActivityCount property value. Provides the count of successful registrations or resets. +func (m *CredentialUsageSummary) GetSuccessfulActivityCount()(*int64) { + return m.successfulActivityCount +} +// Serialize serializes information the current object +func (m *CredentialUsageSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthMethod() != nil { + cast := (*m.GetAuthMethod()).String() + err = writer.WriteStringValue("authMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("failureActivityCount", m.GetFailureActivityCount()) + if err != nil { + return err + } + } + if m.GetFeature() != nil { + cast := (*m.GetFeature()).String() + err = writer.WriteStringValue("feature", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("successfulActivityCount", m.GetSuccessfulActivityCount()) + if err != nil { + return err + } + } + return nil +} +// SetAuthMethod sets the authMethod property value. The authMethod property +func (m *CredentialUsageSummary) SetAuthMethod(value *UsageAuthMethod)() { + m.authMethod = value +} +// SetFailureActivityCount sets the failureActivityCount property value. Provides the count of failed resets or registration data. +func (m *CredentialUsageSummary) SetFailureActivityCount(value *int64)() { + m.failureActivityCount = value +} +// SetFeature sets the feature property value. The feature property +func (m *CredentialUsageSummary) SetFeature(value *FeatureType)() { + m.feature = value +} +// SetSuccessfulActivityCount sets the successfulActivityCount property value. Provides the count of successful registrations or resets. +func (m *CredentialUsageSummary) SetSuccessfulActivityCount(value *int64)() { + m.successfulActivityCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_usage_summaryable.go b/src/internal/connector/graph/betasdk/models/credential_usage_summaryable.go new file mode 100644 index 000000000..a4bbfbb31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_usage_summaryable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUsageSummaryable +type CredentialUsageSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthMethod()(*UsageAuthMethod) + GetFailureActivityCount()(*int64) + GetFeature()(*FeatureType) + GetSuccessfulActivityCount()(*int64) + SetAuthMethod(value *UsageAuthMethod)() + SetFailureActivityCount(value *int64)() + SetFeature(value *FeatureType)() + SetSuccessfulActivityCount(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_count.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_count.go new file mode 100644 index 000000000..29ed1e303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_count.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationCount +type CredentialUserRegistrationCount struct { + Entity + // Provides the total user count in the tenant. + totalUserCount *int64 + // A collection of registration count and status information for users in your tenant. + userRegistrationCounts []UserRegistrationCountable +} +// NewCredentialUserRegistrationCount instantiates a new CredentialUserRegistrationCount and sets the default values. +func NewCredentialUserRegistrationCount()(*CredentialUserRegistrationCount) { + m := &CredentialUserRegistrationCount{ + Entity: *NewEntity(), + } + return m +} +// CreateCredentialUserRegistrationCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUserRegistrationCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUserRegistrationCount(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUserRegistrationCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["totalUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUserCount(val) + } + return nil + } + res["userRegistrationCounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserRegistrationCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserRegistrationCountable, len(val)) + for i, v := range val { + res[i] = v.(UserRegistrationCountable) + } + m.SetUserRegistrationCounts(res) + } + return nil + } + return res +} +// GetTotalUserCount gets the totalUserCount property value. Provides the total user count in the tenant. +func (m *CredentialUserRegistrationCount) GetTotalUserCount()(*int64) { + return m.totalUserCount +} +// GetUserRegistrationCounts gets the userRegistrationCounts property value. A collection of registration count and status information for users in your tenant. +func (m *CredentialUserRegistrationCount) GetUserRegistrationCounts()([]UserRegistrationCountable) { + return m.userRegistrationCounts +} +// Serialize serializes information the current object +func (m *CredentialUserRegistrationCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("totalUserCount", m.GetTotalUserCount()) + if err != nil { + return err + } + } + if m.GetUserRegistrationCounts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRegistrationCounts())) + for i, v := range m.GetUserRegistrationCounts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userRegistrationCounts", cast) + if err != nil { + return err + } + } + return nil +} +// SetTotalUserCount sets the totalUserCount property value. Provides the total user count in the tenant. +func (m *CredentialUserRegistrationCount) SetTotalUserCount(value *int64)() { + m.totalUserCount = value +} +// SetUserRegistrationCounts sets the userRegistrationCounts property value. A collection of registration count and status information for users in your tenant. +func (m *CredentialUserRegistrationCount) SetUserRegistrationCounts(value []UserRegistrationCountable)() { + m.userRegistrationCounts = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_countable.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_countable.go new file mode 100644 index 000000000..5ad4509e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_countable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationCountable +type CredentialUserRegistrationCountable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTotalUserCount()(*int64) + GetUserRegistrationCounts()([]UserRegistrationCountable) + SetTotalUserCount(value *int64)() + SetUserRegistrationCounts(value []UserRegistrationCountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_details.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_details.go new file mode 100644 index 000000000..dd436f6c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_details.go @@ -0,0 +1,220 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationDetails +type CredentialUserRegistrationDetails struct { + Entity + // Represents the authentication method that the user has registered. Possible values are: email, mobilePhone, officePhone, securityQuestion (only used for self-service password reset), appNotification, appCode, alternateMobilePhone (supported only in registration), fido, appPassword, unknownFutureValue. + authMethods []RegistrationAuthMethod + // Indicates whether the user is ready to perform self-service password reset or MFA. + isCapable *bool + // Indicates whether the user enabled to perform self-service password reset. + isEnabled *bool + // Indicates whether the user is registered for MFA. + isMfaRegistered *bool + // Indicates whether the user has registered any authentication methods for self-service password reset. + isRegistered *bool + // Provides the user name of the corresponding user. + userDisplayName *string + // Provides the user principal name of the corresponding user. + userPrincipalName *string +} +// NewCredentialUserRegistrationDetails instantiates a new CredentialUserRegistrationDetails and sets the default values. +func NewCredentialUserRegistrationDetails()(*CredentialUserRegistrationDetails) { + m := &CredentialUserRegistrationDetails{ + Entity: *NewEntity(), + } + return m +} +// CreateCredentialUserRegistrationDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUserRegistrationDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUserRegistrationDetails(), nil +} +// GetAuthMethods gets the authMethods property value. Represents the authentication method that the user has registered. Possible values are: email, mobilePhone, officePhone, securityQuestion (only used for self-service password reset), appNotification, appCode, alternateMobilePhone (supported only in registration), fido, appPassword, unknownFutureValue. +func (m *CredentialUserRegistrationDetails) GetAuthMethods()([]RegistrationAuthMethod) { + return m.authMethods +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUserRegistrationDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRegistrationAuthMethod) + if err != nil { + return err + } + if val != nil { + res := make([]RegistrationAuthMethod, len(val)) + for i, v := range val { + res[i] = *(v.(*RegistrationAuthMethod)) + } + m.SetAuthMethods(res) + } + return nil + } + res["isCapable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCapable(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["isMfaRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMfaRegistered(val) + } + return nil + } + res["isRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRegistered(val) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetIsCapable gets the isCapable property value. Indicates whether the user is ready to perform self-service password reset or MFA. +func (m *CredentialUserRegistrationDetails) GetIsCapable()(*bool) { + return m.isCapable +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the user enabled to perform self-service password reset. +func (m *CredentialUserRegistrationDetails) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetIsMfaRegistered gets the isMfaRegistered property value. Indicates whether the user is registered for MFA. +func (m *CredentialUserRegistrationDetails) GetIsMfaRegistered()(*bool) { + return m.isMfaRegistered +} +// GetIsRegistered gets the isRegistered property value. Indicates whether the user has registered any authentication methods for self-service password reset. +func (m *CredentialUserRegistrationDetails) GetIsRegistered()(*bool) { + return m.isRegistered +} +// GetUserDisplayName gets the userDisplayName property value. Provides the user name of the corresponding user. +func (m *CredentialUserRegistrationDetails) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. Provides the user principal name of the corresponding user. +func (m *CredentialUserRegistrationDetails) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *CredentialUserRegistrationDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthMethods() != nil { + err = writer.WriteCollectionOfStringValues("authMethods", SerializeRegistrationAuthMethod(m.GetAuthMethods())) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCapable", m.GetIsCapable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMfaRegistered", m.GetIsMfaRegistered()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRegistered", m.GetIsRegistered()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetAuthMethods sets the authMethods property value. Represents the authentication method that the user has registered. Possible values are: email, mobilePhone, officePhone, securityQuestion (only used for self-service password reset), appNotification, appCode, alternateMobilePhone (supported only in registration), fido, appPassword, unknownFutureValue. +func (m *CredentialUserRegistrationDetails) SetAuthMethods(value []RegistrationAuthMethod)() { + m.authMethods = value +} +// SetIsCapable sets the isCapable property value. Indicates whether the user is ready to perform self-service password reset or MFA. +func (m *CredentialUserRegistrationDetails) SetIsCapable(value *bool)() { + m.isCapable = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the user enabled to perform self-service password reset. +func (m *CredentialUserRegistrationDetails) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetIsMfaRegistered sets the isMfaRegistered property value. Indicates whether the user is registered for MFA. +func (m *CredentialUserRegistrationDetails) SetIsMfaRegistered(value *bool)() { + m.isMfaRegistered = value +} +// SetIsRegistered sets the isRegistered property value. Indicates whether the user has registered any authentication methods for self-service password reset. +func (m *CredentialUserRegistrationDetails) SetIsRegistered(value *bool)() { + m.isRegistered = value +} +// SetUserDisplayName sets the userDisplayName property value. Provides the user name of the corresponding user. +func (m *CredentialUserRegistrationDetails) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Provides the user principal name of the corresponding user. +func (m *CredentialUserRegistrationDetails) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_response.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_response.go new file mode 100644 index 000000000..0c63054be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationDetailsCollectionResponse +type CredentialUserRegistrationDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CredentialUserRegistrationDetailsable +} +// NewCredentialUserRegistrationDetailsCollectionResponse instantiates a new CredentialUserRegistrationDetailsCollectionResponse and sets the default values. +func NewCredentialUserRegistrationDetailsCollectionResponse()(*CredentialUserRegistrationDetailsCollectionResponse) { + m := &CredentialUserRegistrationDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCredentialUserRegistrationDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUserRegistrationDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUserRegistrationDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUserRegistrationDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCredentialUserRegistrationDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CredentialUserRegistrationDetailsable, len(val)) + for i, v := range val { + res[i] = v.(CredentialUserRegistrationDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CredentialUserRegistrationDetailsCollectionResponse) GetValue()([]CredentialUserRegistrationDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *CredentialUserRegistrationDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CredentialUserRegistrationDetailsCollectionResponse) SetValue(value []CredentialUserRegistrationDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_responseable.go new file mode 100644 index 000000000..e9a978672 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationDetailsCollectionResponseable +type CredentialUserRegistrationDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CredentialUserRegistrationDetailsable) + SetValue(value []CredentialUserRegistrationDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/credential_user_registration_detailsable.go b/src/internal/connector/graph/betasdk/models/credential_user_registration_detailsable.go new file mode 100644 index 000000000..847da7f04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credential_user_registration_detailsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CredentialUserRegistrationDetailsable +type CredentialUserRegistrationDetailsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthMethods()([]RegistrationAuthMethod) + GetIsCapable()(*bool) + GetIsEnabled()(*bool) + GetIsMfaRegistered()(*bool) + GetIsRegistered()(*bool) + GetUserDisplayName()(*string) + GetUserPrincipalName()(*string) + SetAuthMethods(value []RegistrationAuthMethod)() + SetIsCapable(value *bool)() + SetIsEnabled(value *bool)() + SetIsMfaRegistered(value *bool)() + SetIsRegistered(value *bool)() + SetUserDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/credentialable.go b/src/internal/connector/graph/betasdk/models/credentialable.go new file mode 100644 index 000000000..52e3efae5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/credentialable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Credentialable +type Credentialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFieldId()(*string) + GetOdataType()(*string) + GetType()(*string) + GetValue()(*string) + SetFieldId(value *string)() + SetOdataType(value *string)() + SetType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenant.go b/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenant.go new file mode 100644 index 000000000..c473b5cbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenant.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossCloudAzureActiveDirectoryTenant +type CrossCloudAzureActiveDirectoryTenant struct { + IdentitySource + // The ID of the cloud where the tenant is located, one of microsoftonline.com, microsoftonline.us or partner.microsoftonline.cn. Read only. + cloudInstance *string + // The name of the Azure Active Directory tenant. Read only. + displayName *string + // The ID of the Azure Active Directory tenant. Read only. + tenantId *string +} +// NewCrossCloudAzureActiveDirectoryTenant instantiates a new CrossCloudAzureActiveDirectoryTenant and sets the default values. +func NewCrossCloudAzureActiveDirectoryTenant()(*CrossCloudAzureActiveDirectoryTenant) { + m := &CrossCloudAzureActiveDirectoryTenant{ + IdentitySource: *NewIdentitySource(), + } + odataTypeValue := "#microsoft.graph.crossCloudAzureActiveDirectoryTenant"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCrossCloudAzureActiveDirectoryTenantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossCloudAzureActiveDirectoryTenantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossCloudAzureActiveDirectoryTenant(), nil +} +// GetCloudInstance gets the cloudInstance property value. The ID of the cloud where the tenant is located, one of microsoftonline.com, microsoftonline.us or partner.microsoftonline.cn. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) GetCloudInstance()(*string) { + return m.cloudInstance +} +// GetDisplayName gets the displayName property value. The name of the Azure Active Directory tenant. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossCloudAzureActiveDirectoryTenant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySource.GetFieldDeserializers() + res["cloudInstance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudInstance(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. The ID of the Azure Active Directory tenant. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *CrossCloudAzureActiveDirectoryTenant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cloudInstance", m.GetCloudInstance()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetCloudInstance sets the cloudInstance property value. The ID of the cloud where the tenant is located, one of microsoftonline.com, microsoftonline.us or partner.microsoftonline.cn. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) SetCloudInstance(value *string)() { + m.cloudInstance = value +} +// SetDisplayName sets the displayName property value. The name of the Azure Active Directory tenant. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTenantId sets the tenantId property value. The ID of the Azure Active Directory tenant. Read only. +func (m *CrossCloudAzureActiveDirectoryTenant) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenantable.go b/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenantable.go new file mode 100644 index 000000000..ddeff6036 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_cloud_azure_active_directory_tenantable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossCloudAzureActiveDirectoryTenantable +type CrossCloudAzureActiveDirectoryTenantable interface { + IdentitySourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudInstance()(*string) + GetDisplayName()(*string) + GetTenantId()(*string) + SetCloudInstance(value *string)() + SetDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy.go new file mode 100644 index 000000000..138bc2645 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy.go @@ -0,0 +1,126 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicy +type CrossTenantAccessPolicy struct { + TenantRelationshipAccessPolicyBase + // Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn. + allowedCloudEndpoints []string + // Defines the default configuration for how your organization interacts with external Azure Active Directory organizations. + default_escaped CrossTenantAccessPolicyConfigurationDefaultable + // Defines partner-specific configurations for external Azure Active Directory organizations. + partners []CrossTenantAccessPolicyConfigurationPartnerable +} +// NewCrossTenantAccessPolicy instantiates a new CrossTenantAccessPolicy and sets the default values. +func NewCrossTenantAccessPolicy()(*CrossTenantAccessPolicy) { + m := &CrossTenantAccessPolicy{ + TenantRelationshipAccessPolicyBase: *NewTenantRelationshipAccessPolicyBase(), + } + odataTypeValue := "#microsoft.graph.crossTenantAccessPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCrossTenantAccessPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicy(), nil +} +// GetAllowedCloudEndpoints gets the allowedCloudEndpoints property value. Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn. +func (m *CrossTenantAccessPolicy) GetAllowedCloudEndpoints()([]string) { + return m.allowedCloudEndpoints +} +// GetDefault gets the default property value. Defines the default configuration for how your organization interacts with external Azure Active Directory organizations. +func (m *CrossTenantAccessPolicy) GetDefault()(CrossTenantAccessPolicyConfigurationDefaultable) { + return m.default_escaped +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TenantRelationshipAccessPolicyBase.GetFieldDeserializers() + res["allowedCloudEndpoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedCloudEndpoints(res) + } + return nil + } + res["default"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyConfigurationDefaultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefault(val.(CrossTenantAccessPolicyConfigurationDefaultable)) + } + return nil + } + res["partners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCrossTenantAccessPolicyConfigurationPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CrossTenantAccessPolicyConfigurationPartnerable, len(val)) + for i, v := range val { + res[i] = v.(CrossTenantAccessPolicyConfigurationPartnerable) + } + m.SetPartners(res) + } + return nil + } + return res +} +// GetPartners gets the partners property value. Defines partner-specific configurations for external Azure Active Directory organizations. +func (m *CrossTenantAccessPolicy) GetPartners()([]CrossTenantAccessPolicyConfigurationPartnerable) { + return m.partners +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TenantRelationshipAccessPolicyBase.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedCloudEndpoints() != nil { + err = writer.WriteCollectionOfStringValues("allowedCloudEndpoints", m.GetAllowedCloudEndpoints()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("default", m.GetDefault()) + if err != nil { + return err + } + } + if m.GetPartners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPartners())) + for i, v := range m.GetPartners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("partners", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowedCloudEndpoints sets the allowedCloudEndpoints property value. Used to specify which Microsoft clouds an organization would like to collaborate with. By default, this value is empty. Supported values for this field are: microsoftonline.com, microsoftonline.us, and partner.microsoftonline.cn. +func (m *CrossTenantAccessPolicy) SetAllowedCloudEndpoints(value []string)() { + m.allowedCloudEndpoints = value +} +// SetDefault sets the default property value. Defines the default configuration for how your organization interacts with external Azure Active Directory organizations. +func (m *CrossTenantAccessPolicy) SetDefault(value CrossTenantAccessPolicyConfigurationDefaultable)() { + m.default_escaped = value +} +// SetPartners sets the partners property value. Defines partner-specific configurations for external Azure Active Directory organizations. +func (m *CrossTenantAccessPolicy) SetPartners(value []CrossTenantAccessPolicyConfigurationPartnerable)() { + m.partners = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_setting.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_setting.go new file mode 100644 index 000000000..5473ec233 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_setting.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyB2BSetting +type CrossTenantAccessPolicyB2BSetting 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 list of applications targeted with your cross-tenant access policy. + applications CrossTenantAccessPolicyTargetConfigurationable + // The OdataType property + odataType *string + // The list of users and groups targeted with your cross-tenant access policy. + usersAndGroups CrossTenantAccessPolicyTargetConfigurationable +} +// NewCrossTenantAccessPolicyB2BSetting instantiates a new crossTenantAccessPolicyB2BSetting and sets the default values. +func NewCrossTenantAccessPolicyB2BSetting()(*CrossTenantAccessPolicyB2BSetting) { + m := &CrossTenantAccessPolicyB2BSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.crossTenantAccessPolicyTenantRestrictions": + return NewCrossTenantAccessPolicyTenantRestrictions(), nil + } + } + } + } + return NewCrossTenantAccessPolicyB2BSetting(), 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 *CrossTenantAccessPolicyB2BSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplications gets the applications property value. The list of applications targeted with your cross-tenant access policy. +func (m *CrossTenantAccessPolicyB2BSetting) GetApplications()(CrossTenantAccessPolicyTargetConfigurationable) { + return m.applications +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyB2BSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyTargetConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplications(val.(CrossTenantAccessPolicyTargetConfigurationable)) + } + 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["usersAndGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyTargetConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUsersAndGroups(val.(CrossTenantAccessPolicyTargetConfigurationable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyB2BSetting) GetOdataType()(*string) { + return m.odataType +} +// GetUsersAndGroups gets the usersAndGroups property value. The list of users and groups targeted with your cross-tenant access policy. +func (m *CrossTenantAccessPolicyB2BSetting) GetUsersAndGroups()(CrossTenantAccessPolicyTargetConfigurationable) { + return m.usersAndGroups +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyB2BSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("applications", m.GetApplications()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("usersAndGroups", m.GetUsersAndGroups()) + 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 *CrossTenantAccessPolicyB2BSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplications sets the applications property value. The list of applications targeted with your cross-tenant access policy. +func (m *CrossTenantAccessPolicyB2BSetting) SetApplications(value CrossTenantAccessPolicyTargetConfigurationable)() { + m.applications = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyB2BSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetUsersAndGroups sets the usersAndGroups property value. The list of users and groups targeted with your cross-tenant access policy. +func (m *CrossTenantAccessPolicyB2BSetting) SetUsersAndGroups(value CrossTenantAccessPolicyTargetConfigurationable)() { + m.usersAndGroups = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_settingable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_settingable.go new file mode 100644 index 000000000..ad0aa2401 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_b2_b_settingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyB2BSettingable +type CrossTenantAccessPolicyB2BSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplications()(CrossTenantAccessPolicyTargetConfigurationable) + GetOdataType()(*string) + GetUsersAndGroups()(CrossTenantAccessPolicyTargetConfigurationable) + SetApplications(value CrossTenantAccessPolicyTargetConfigurationable)() + SetOdataType(value *string)() + SetUsersAndGroups(value CrossTenantAccessPolicyTargetConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_response.go new file mode 100644 index 000000000..7440109c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyCollectionResponse +type CrossTenantAccessPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CrossTenantAccessPolicyable +} +// NewCrossTenantAccessPolicyCollectionResponse instantiates a new CrossTenantAccessPolicyCollectionResponse and sets the default values. +func NewCrossTenantAccessPolicyCollectionResponse()(*CrossTenantAccessPolicyCollectionResponse) { + m := &CrossTenantAccessPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCrossTenantAccessPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCrossTenantAccessPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CrossTenantAccessPolicyable, len(val)) + for i, v := range val { + res[i] = v.(CrossTenantAccessPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CrossTenantAccessPolicyCollectionResponse) GetValue()([]CrossTenantAccessPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CrossTenantAccessPolicyCollectionResponse) SetValue(value []CrossTenantAccessPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_responseable.go new file mode 100644 index 000000000..63880fe05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyCollectionResponseable +type CrossTenantAccessPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CrossTenantAccessPolicyable) + SetValue(value []CrossTenantAccessPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_default.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_default.go new file mode 100644 index 000000000..8a953e568 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_default.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationDefault +type CrossTenantAccessPolicyConfigurationDefault struct { + Entity + // Determines the default configuration for automatic user consent settings. inboundAllowed and outboundAllowed will always be false and cannot be updated in the default configuration. Read only. + automaticUserConsentSettings InboundOutboundPolicyConfigurationable + // Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. + b2bCollaborationInbound CrossTenantAccessPolicyB2BSettingable + // Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. + b2bCollaborationOutbound CrossTenantAccessPolicyB2BSettingable + // Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B direct connect. + b2bDirectConnectInbound CrossTenantAccessPolicyB2BSettingable + // Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. + b2bDirectConnectOutbound CrossTenantAccessPolicyB2BSettingable + // Determines the default configuration for trusting other Conditional Access claims from external Azure AD organizations. + inboundTrust CrossTenantAccessPolicyInboundTrustable + // If true, the default configuration is set to the system default configuration. If false, the default settings have been customized. + isServiceDefault *bool + // The tenantRestrictions property + tenantRestrictions CrossTenantAccessPolicyTenantRestrictionsable +} +// NewCrossTenantAccessPolicyConfigurationDefault instantiates a new crossTenantAccessPolicyConfigurationDefault and sets the default values. +func NewCrossTenantAccessPolicyConfigurationDefault()(*CrossTenantAccessPolicyConfigurationDefault) { + m := &CrossTenantAccessPolicyConfigurationDefault{ + Entity: *NewEntity(), + } + return m +} +// CreateCrossTenantAccessPolicyConfigurationDefaultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyConfigurationDefaultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyConfigurationDefault(), nil +} +// GetAutomaticUserConsentSettings gets the automaticUserConsentSettings property value. Determines the default configuration for automatic user consent settings. inboundAllowed and outboundAllowed will always be false and cannot be updated in the default configuration. Read only. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) { + return m.automaticUserConsentSettings +} +// GetB2bCollaborationInbound gets the b2bCollaborationInbound property value. Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bCollaborationInbound +} +// GetB2bCollaborationOutbound gets the b2bCollaborationOutbound property value. Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bCollaborationOutbound +} +// GetB2bDirectConnectInbound gets the b2bDirectConnectInbound property value. Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bDirectConnectInbound +} +// GetB2bDirectConnectOutbound gets the b2bDirectConnectOutbound property value. Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bDirectConnectOutbound +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyConfigurationDefault) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["automaticUserConsentSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInboundOutboundPolicyConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomaticUserConsentSettings(val.(InboundOutboundPolicyConfigurationable)) + } + return nil + } + res["b2bCollaborationInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bCollaborationOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["inboundTrust"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyInboundTrustFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInboundTrust(val.(CrossTenantAccessPolicyInboundTrustable)) + } + return nil + } + res["isServiceDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsServiceDefault(val) + } + return nil + } + res["tenantRestrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyTenantRestrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTenantRestrictions(val.(CrossTenantAccessPolicyTenantRestrictionsable)) + } + return nil + } + return res +} +// GetInboundTrust gets the inboundTrust property value. Determines the default configuration for trusting other Conditional Access claims from external Azure AD organizations. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) { + return m.inboundTrust +} +// GetIsServiceDefault gets the isServiceDefault property value. If true, the default configuration is set to the system default configuration. If false, the default settings have been customized. +func (m *CrossTenantAccessPolicyConfigurationDefault) GetIsServiceDefault()(*bool) { + return m.isServiceDefault +} +// GetTenantRestrictions gets the tenantRestrictions property value. The tenantRestrictions property +func (m *CrossTenantAccessPolicyConfigurationDefault) GetTenantRestrictions()(CrossTenantAccessPolicyTenantRestrictionsable) { + return m.tenantRestrictions +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyConfigurationDefault) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("automaticUserConsentSettings", m.GetAutomaticUserConsentSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bCollaborationInbound", m.GetB2bCollaborationInbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bCollaborationOutbound", m.GetB2bCollaborationOutbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bDirectConnectInbound", m.GetB2bDirectConnectInbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("b2bDirectConnectOutbound", m.GetB2bDirectConnectOutbound()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inboundTrust", m.GetInboundTrust()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isServiceDefault", m.GetIsServiceDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("tenantRestrictions", m.GetTenantRestrictions()) + if err != nil { + return err + } + } + return nil +} +// SetAutomaticUserConsentSettings sets the automaticUserConsentSettings property value. Determines the default configuration for automatic user consent settings. inboundAllowed and outboundAllowed will always be false and cannot be updated in the default configuration. Read only. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() { + m.automaticUserConsentSettings = value +} +// SetB2bCollaborationInbound sets the b2bCollaborationInbound property value. Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bCollaborationInbound = value +} +// SetB2bCollaborationOutbound sets the b2bCollaborationOutbound property value. Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bCollaborationOutbound = value +} +// SetB2bDirectConnectInbound sets the b2bDirectConnectInbound property value. Defines your default configuration for users from other organizations accessing your resources via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bDirectConnectInbound = value +} +// SetB2bDirectConnectOutbound sets the b2bDirectConnectOutbound property value. Defines your default configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bDirectConnectOutbound = value +} +// SetInboundTrust sets the inboundTrust property value. Determines the default configuration for trusting other Conditional Access claims from external Azure AD organizations. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() { + m.inboundTrust = value +} +// SetIsServiceDefault sets the isServiceDefault property value. If true, the default configuration is set to the system default configuration. If false, the default settings have been customized. +func (m *CrossTenantAccessPolicyConfigurationDefault) SetIsServiceDefault(value *bool)() { + m.isServiceDefault = value +} +// SetTenantRestrictions sets the tenantRestrictions property value. The tenantRestrictions property +func (m *CrossTenantAccessPolicyConfigurationDefault) SetTenantRestrictions(value CrossTenantAccessPolicyTenantRestrictionsable)() { + m.tenantRestrictions = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_defaultable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_defaultable.go new file mode 100644 index 000000000..b7bf05ede --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_defaultable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationDefaultable +type CrossTenantAccessPolicyConfigurationDefaultable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) + GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) + GetIsServiceDefault()(*bool) + GetTenantRestrictions()(CrossTenantAccessPolicyTenantRestrictionsable) + SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() + SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() + SetIsServiceDefault(value *bool)() + SetTenantRestrictions(value CrossTenantAccessPolicyTenantRestrictionsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner.go new file mode 100644 index 000000000..68924ebf1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner.go @@ -0,0 +1,331 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationPartner +type CrossTenantAccessPolicyConfigurationPartner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Determines the partner-specific configuration for automatic user consent settings. Unless specifically configured, the inboundAllowed and outboundAllowed properties will be null and inherit from the default settings, which is always false. + automaticUserConsentSettings InboundOutboundPolicyConfigurationable + // Defines your partner-specific configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. + b2bCollaborationInbound CrossTenantAccessPolicyB2BSettingable + // Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. + b2bCollaborationOutbound CrossTenantAccessPolicyB2BSettingable + // Defines your partner-specific configuration for users from other organizations accessing your resources via Azure B2B direct connect. + b2bDirectConnectInbound CrossTenantAccessPolicyB2BSettingable + // Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. + b2bDirectConnectOutbound CrossTenantAccessPolicyB2BSettingable + // Defines the cross-tenant policy for synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multi-tenant organization by automating creating, updating, and deleting users from one tenant to another. + identitySynchronization CrossTenantIdentitySyncPolicyPartnerable + // Determines the partner-specific configuration for trusting other Conditional Access claims from external Azure AD organizations. + inboundTrust CrossTenantAccessPolicyInboundTrustable + // Identifies whether the partner-specific configuration is a Cloud Service Provider for your organization. + isServiceProvider *bool + // The OdataType property + odataType *string + // The tenant identifier for the partner Azure AD organization. Read-only. Key. + tenantId *string + // The tenantRestrictions property + tenantRestrictions CrossTenantAccessPolicyTenantRestrictionsable +} +// NewCrossTenantAccessPolicyConfigurationPartner instantiates a new crossTenantAccessPolicyConfigurationPartner and sets the default values. +func NewCrossTenantAccessPolicyConfigurationPartner()(*CrossTenantAccessPolicyConfigurationPartner) { + m := &CrossTenantAccessPolicyConfigurationPartner{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantAccessPolicyConfigurationPartnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyConfigurationPartnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyConfigurationPartner(), 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 *CrossTenantAccessPolicyConfigurationPartner) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAutomaticUserConsentSettings gets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless specifically configured, the inboundAllowed and outboundAllowed properties will be null and inherit from the default settings, which is always false. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) { + return m.automaticUserConsentSettings +} +// GetB2bCollaborationInbound gets the b2bCollaborationInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bCollaborationInbound +} +// GetB2bCollaborationOutbound gets the b2bCollaborationOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bCollaborationOutbound +} +// GetB2bDirectConnectInbound gets the b2bDirectConnectInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bDirectConnectInbound +} +// GetB2bDirectConnectOutbound gets the b2bDirectConnectOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) { + return m.b2bDirectConnectOutbound +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyConfigurationPartner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["automaticUserConsentSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInboundOutboundPolicyConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomaticUserConsentSettings(val.(InboundOutboundPolicyConfigurationable)) + } + return nil + } + res["b2bCollaborationInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bCollaborationOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bCollaborationOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectInbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectInbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["b2bDirectConnectOutbound"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyB2BSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetB2bDirectConnectOutbound(val.(CrossTenantAccessPolicyB2BSettingable)) + } + return nil + } + res["identitySynchronization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantIdentitySyncPolicyPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentitySynchronization(val.(CrossTenantIdentitySyncPolicyPartnerable)) + } + return nil + } + res["inboundTrust"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyInboundTrustFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInboundTrust(val.(CrossTenantAccessPolicyInboundTrustable)) + } + return nil + } + res["isServiceProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsServiceProvider(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["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["tenantRestrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCrossTenantAccessPolicyTenantRestrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTenantRestrictions(val.(CrossTenantAccessPolicyTenantRestrictionsable)) + } + return nil + } + return res +} +// GetIdentitySynchronization gets the identitySynchronization property value. Defines the cross-tenant policy for synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multi-tenant organization by automating creating, updating, and deleting users from one tenant to another. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetIdentitySynchronization()(CrossTenantIdentitySyncPolicyPartnerable) { + return m.identitySynchronization +} +// GetInboundTrust gets the inboundTrust property value. Determines the partner-specific configuration for trusting other Conditional Access claims from external Azure AD organizations. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) { + return m.inboundTrust +} +// GetIsServiceProvider gets the isServiceProvider property value. Identifies whether the partner-specific configuration is a Cloud Service Provider for your organization. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetIsServiceProvider()(*bool) { + return m.isServiceProvider +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyConfigurationPartner) GetOdataType()(*string) { + return m.odataType +} +// GetTenantId gets the tenantId property value. The tenant identifier for the partner Azure AD organization. Read-only. Key. +func (m *CrossTenantAccessPolicyConfigurationPartner) GetTenantId()(*string) { + return m.tenantId +} +// GetTenantRestrictions gets the tenantRestrictions property value. The tenantRestrictions property +func (m *CrossTenantAccessPolicyConfigurationPartner) GetTenantRestrictions()(CrossTenantAccessPolicyTenantRestrictionsable) { + return m.tenantRestrictions +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyConfigurationPartner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("automaticUserConsentSettings", m.GetAutomaticUserConsentSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("b2bCollaborationInbound", m.GetB2bCollaborationInbound()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("b2bCollaborationOutbound", m.GetB2bCollaborationOutbound()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("b2bDirectConnectInbound", m.GetB2bDirectConnectInbound()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("b2bDirectConnectOutbound", m.GetB2bDirectConnectOutbound()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("identitySynchronization", m.GetIdentitySynchronization()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("inboundTrust", m.GetInboundTrust()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isServiceProvider", m.GetIsServiceProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("tenantRestrictions", m.GetTenantRestrictions()) + 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 *CrossTenantAccessPolicyConfigurationPartner) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAutomaticUserConsentSettings sets the automaticUserConsentSettings property value. Determines the partner-specific configuration for automatic user consent settings. Unless specifically configured, the inboundAllowed and outboundAllowed properties will be null and inherit from the default settings, which is always false. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() { + m.automaticUserConsentSettings = value +} +// SetB2bCollaborationInbound sets the b2bCollaborationInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bCollaborationInbound = value +} +// SetB2bCollaborationOutbound sets the b2bCollaborationOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B collaboration. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bCollaborationOutbound = value +} +// SetB2bDirectConnectInbound sets the b2bDirectConnectInbound property value. Defines your partner-specific configuration for users from other organizations accessing your resources via Azure B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bDirectConnectInbound = value +} +// SetB2bDirectConnectOutbound sets the b2bDirectConnectOutbound property value. Defines your partner-specific configuration for users in your organization going outbound to access resources in another organization via Azure AD B2B direct connect. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() { + m.b2bDirectConnectOutbound = value +} +// SetIdentitySynchronization sets the identitySynchronization property value. Defines the cross-tenant policy for synchronization of users from a partner tenant. Use this user synchronization policy to streamline collaboration between users in a multi-tenant organization by automating creating, updating, and deleting users from one tenant to another. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetIdentitySynchronization(value CrossTenantIdentitySyncPolicyPartnerable)() { + m.identitySynchronization = value +} +// SetInboundTrust sets the inboundTrust property value. Determines the partner-specific configuration for trusting other Conditional Access claims from external Azure AD organizations. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() { + m.inboundTrust = value +} +// SetIsServiceProvider sets the isServiceProvider property value. Identifies whether the partner-specific configuration is a Cloud Service Provider for your organization. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetIsServiceProvider(value *bool)() { + m.isServiceProvider = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyConfigurationPartner) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenantId sets the tenantId property value. The tenant identifier for the partner Azure AD organization. Read-only. Key. +func (m *CrossTenantAccessPolicyConfigurationPartner) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTenantRestrictions sets the tenantRestrictions property value. The tenantRestrictions property +func (m *CrossTenantAccessPolicyConfigurationPartner) SetTenantRestrictions(value CrossTenantAccessPolicyTenantRestrictionsable)() { + m.tenantRestrictions = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_response.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_response.go new file mode 100644 index 000000000..cbc281a7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationPartnerCollectionResponse +type CrossTenantAccessPolicyConfigurationPartnerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CrossTenantAccessPolicyConfigurationPartnerable +} +// NewCrossTenantAccessPolicyConfigurationPartnerCollectionResponse instantiates a new CrossTenantAccessPolicyConfigurationPartnerCollectionResponse and sets the default values. +func NewCrossTenantAccessPolicyConfigurationPartnerCollectionResponse()(*CrossTenantAccessPolicyConfigurationPartnerCollectionResponse) { + m := &CrossTenantAccessPolicyConfigurationPartnerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCrossTenantAccessPolicyConfigurationPartnerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyConfigurationPartnerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyConfigurationPartnerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyConfigurationPartnerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCrossTenantAccessPolicyConfigurationPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CrossTenantAccessPolicyConfigurationPartnerable, len(val)) + for i, v := range val { + res[i] = v.(CrossTenantAccessPolicyConfigurationPartnerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CrossTenantAccessPolicyConfigurationPartnerCollectionResponse) GetValue()([]CrossTenantAccessPolicyConfigurationPartnerable) { + return m.value +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyConfigurationPartnerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CrossTenantAccessPolicyConfigurationPartnerCollectionResponse) SetValue(value []CrossTenantAccessPolicyConfigurationPartnerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_responseable.go new file mode 100644 index 000000000..5aaa9655c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partner_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationPartnerCollectionResponseable +type CrossTenantAccessPolicyConfigurationPartnerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CrossTenantAccessPolicyConfigurationPartnerable) + SetValue(value []CrossTenantAccessPolicyConfigurationPartnerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partnerable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partnerable.go new file mode 100644 index 000000000..5f0b78986 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_configuration_partnerable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyConfigurationPartnerable +type CrossTenantAccessPolicyConfigurationPartnerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutomaticUserConsentSettings()(InboundOutboundPolicyConfigurationable) + GetB2bCollaborationInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bCollaborationOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectInbound()(CrossTenantAccessPolicyB2BSettingable) + GetB2bDirectConnectOutbound()(CrossTenantAccessPolicyB2BSettingable) + GetIdentitySynchronization()(CrossTenantIdentitySyncPolicyPartnerable) + GetInboundTrust()(CrossTenantAccessPolicyInboundTrustable) + GetIsServiceProvider()(*bool) + GetOdataType()(*string) + GetTenantId()(*string) + GetTenantRestrictions()(CrossTenantAccessPolicyTenantRestrictionsable) + SetAutomaticUserConsentSettings(value InboundOutboundPolicyConfigurationable)() + SetB2bCollaborationInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bCollaborationOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectInbound(value CrossTenantAccessPolicyB2BSettingable)() + SetB2bDirectConnectOutbound(value CrossTenantAccessPolicyB2BSettingable)() + SetIdentitySynchronization(value CrossTenantIdentitySyncPolicyPartnerable)() + SetInboundTrust(value CrossTenantAccessPolicyInboundTrustable)() + SetIsServiceProvider(value *bool)() + SetOdataType(value *string)() + SetTenantId(value *string)() + SetTenantRestrictions(value CrossTenantAccessPolicyTenantRestrictionsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trust.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trust.go new file mode 100644 index 000000000..cb0caae6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trust.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyInboundTrust +type CrossTenantAccessPolicyInboundTrust struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether compliant devices from external Azure AD organizations are trusted. + isCompliantDeviceAccepted *bool + // Specifies whether hybrid Azure AD joined devices from external Azure AD organizations are trusted. + isHybridAzureADJoinedDeviceAccepted *bool + // Specifies whether MFA from external Azure AD organizations is trusted. + isMfaAccepted *bool + // The OdataType property + odataType *string +} +// NewCrossTenantAccessPolicyInboundTrust instantiates a new crossTenantAccessPolicyInboundTrust and sets the default values. +func NewCrossTenantAccessPolicyInboundTrust()(*CrossTenantAccessPolicyInboundTrust) { + m := &CrossTenantAccessPolicyInboundTrust{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantAccessPolicyInboundTrustFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyInboundTrustFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyInboundTrust(), 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 *CrossTenantAccessPolicyInboundTrust) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyInboundTrust) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isCompliantDeviceAccepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCompliantDeviceAccepted(val) + } + return nil + } + res["isHybridAzureADJoinedDeviceAccepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHybridAzureADJoinedDeviceAccepted(val) + } + return nil + } + res["isMfaAccepted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMfaAccepted(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 + } + return res +} +// GetIsCompliantDeviceAccepted gets the isCompliantDeviceAccepted property value. Specifies whether compliant devices from external Azure AD organizations are trusted. +func (m *CrossTenantAccessPolicyInboundTrust) GetIsCompliantDeviceAccepted()(*bool) { + return m.isCompliantDeviceAccepted +} +// GetIsHybridAzureADJoinedDeviceAccepted gets the isHybridAzureADJoinedDeviceAccepted property value. Specifies whether hybrid Azure AD joined devices from external Azure AD organizations are trusted. +func (m *CrossTenantAccessPolicyInboundTrust) GetIsHybridAzureADJoinedDeviceAccepted()(*bool) { + return m.isHybridAzureADJoinedDeviceAccepted +} +// GetIsMfaAccepted gets the isMfaAccepted property value. Specifies whether MFA from external Azure AD organizations is trusted. +func (m *CrossTenantAccessPolicyInboundTrust) GetIsMfaAccepted()(*bool) { + return m.isMfaAccepted +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyInboundTrust) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyInboundTrust) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isCompliantDeviceAccepted", m.GetIsCompliantDeviceAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isHybridAzureADJoinedDeviceAccepted", m.GetIsHybridAzureADJoinedDeviceAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isMfaAccepted", m.GetIsMfaAccepted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CrossTenantAccessPolicyInboundTrust) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsCompliantDeviceAccepted sets the isCompliantDeviceAccepted property value. Specifies whether compliant devices from external Azure AD organizations are trusted. +func (m *CrossTenantAccessPolicyInboundTrust) SetIsCompliantDeviceAccepted(value *bool)() { + m.isCompliantDeviceAccepted = value +} +// SetIsHybridAzureADJoinedDeviceAccepted sets the isHybridAzureADJoinedDeviceAccepted property value. Specifies whether hybrid Azure AD joined devices from external Azure AD organizations are trusted. +func (m *CrossTenantAccessPolicyInboundTrust) SetIsHybridAzureADJoinedDeviceAccepted(value *bool)() { + m.isHybridAzureADJoinedDeviceAccepted = value +} +// SetIsMfaAccepted sets the isMfaAccepted property value. Specifies whether MFA from external Azure AD organizations is trusted. +func (m *CrossTenantAccessPolicyInboundTrust) SetIsMfaAccepted(value *bool)() { + m.isMfaAccepted = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyInboundTrust) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trustable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trustable.go new file mode 100644 index 000000000..1c143390c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_inbound_trustable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyInboundTrustable +type CrossTenantAccessPolicyInboundTrustable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsCompliantDeviceAccepted()(*bool) + GetIsHybridAzureADJoinedDeviceAccepted()(*bool) + GetIsMfaAccepted()(*bool) + GetOdataType()(*string) + SetIsCompliantDeviceAccepted(value *bool)() + SetIsHybridAzureADJoinedDeviceAccepted(value *bool)() + SetIsMfaAccepted(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target.go new file mode 100644 index 000000000..1c9556ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTarget +type CrossTenantAccessPolicyTarget 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 OdataType property + odataType *string + // The unique identifier of the user, group, or application; one of the following keywords: AllUsers and AllApplications; or for targets that are applications, you may use reserved values. + target *string + // The type of resource that you want to target. The possible values are: user, group, application, unknownFutureValue. + targetType *CrossTenantAccessPolicyTargetType +} +// NewCrossTenantAccessPolicyTarget instantiates a new crossTenantAccessPolicyTarget and sets the default values. +func NewCrossTenantAccessPolicyTarget()(*CrossTenantAccessPolicyTarget) { + m := &CrossTenantAccessPolicyTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantAccessPolicyTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyTarget(), 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 *CrossTenantAccessPolicyTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + res["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCrossTenantAccessPolicyTargetType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*CrossTenantAccessPolicyTargetType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyTarget) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The unique identifier of the user, group, or application; one of the following keywords: AllUsers and AllApplications; or for targets that are applications, you may use reserved values. +func (m *CrossTenantAccessPolicyTarget) GetTarget()(*string) { + return m.target +} +// GetTargetType gets the targetType property value. The type of resource that you want to target. The possible values are: user, group, application, unknownFutureValue. +func (m *CrossTenantAccessPolicyTarget) GetTargetType()(*CrossTenantAccessPolicyTargetType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err := writer.WriteStringValue("targetType", &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 *CrossTenantAccessPolicyTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyTarget) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The unique identifier of the user, group, or application; one of the following keywords: AllUsers and AllApplications; or for targets that are applications, you may use reserved values. +func (m *CrossTenantAccessPolicyTarget) SetTarget(value *string)() { + m.target = value +} +// SetTargetType sets the targetType property value. The type of resource that you want to target. The possible values are: user, group, application, unknownFutureValue. +func (m *CrossTenantAccessPolicyTarget) SetTargetType(value *CrossTenantAccessPolicyTargetType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_response.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_response.go new file mode 100644 index 000000000..50cad51e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTargetCollectionResponse +type CrossTenantAccessPolicyTargetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CrossTenantAccessPolicyTargetable +} +// NewCrossTenantAccessPolicyTargetCollectionResponse instantiates a new CrossTenantAccessPolicyTargetCollectionResponse and sets the default values. +func NewCrossTenantAccessPolicyTargetCollectionResponse()(*CrossTenantAccessPolicyTargetCollectionResponse) { + m := &CrossTenantAccessPolicyTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCrossTenantAccessPolicyTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCrossTenantAccessPolicyTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CrossTenantAccessPolicyTargetable, len(val)) + for i, v := range val { + res[i] = v.(CrossTenantAccessPolicyTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CrossTenantAccessPolicyTargetCollectionResponse) GetValue()([]CrossTenantAccessPolicyTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CrossTenantAccessPolicyTargetCollectionResponse) SetValue(value []CrossTenantAccessPolicyTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_responseable.go new file mode 100644 index 000000000..8316f741f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTargetCollectionResponseable +type CrossTenantAccessPolicyTargetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CrossTenantAccessPolicyTargetable) + SetValue(value []CrossTenantAccessPolicyTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration.go new file mode 100644 index 000000000..0b8762103 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration.go @@ -0,0 +1,132 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTargetConfiguration +type CrossTenantAccessPolicyTargetConfiguration struct { + // Defines whether access is allowed or blocked. The possible values are: allowed, blocked, unknownFutureValue. + accessType *CrossTenantAccessPolicyTargetConfigurationAccessType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string + // Specifies whether to target users, groups, or applications with this rule. + targets []CrossTenantAccessPolicyTargetable +} +// NewCrossTenantAccessPolicyTargetConfiguration instantiates a new crossTenantAccessPolicyTargetConfiguration and sets the default values. +func NewCrossTenantAccessPolicyTargetConfiguration()(*CrossTenantAccessPolicyTargetConfiguration) { + m := &CrossTenantAccessPolicyTargetConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantAccessPolicyTargetConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyTargetConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyTargetConfiguration(), nil +} +// GetAccessType gets the accessType property value. Defines whether access is allowed or blocked. The possible values are: allowed, blocked, unknownFutureValue. +func (m *CrossTenantAccessPolicyTargetConfiguration) GetAccessType()(*CrossTenantAccessPolicyTargetConfigurationAccessType) { + return m.accessType +} +// 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 *CrossTenantAccessPolicyTargetConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyTargetConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCrossTenantAccessPolicyTargetConfigurationAccessType) + if err != nil { + return err + } + if val != nil { + m.SetAccessType(val.(*CrossTenantAccessPolicyTargetConfigurationAccessType)) + } + 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["targets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCrossTenantAccessPolicyTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CrossTenantAccessPolicyTargetable, len(val)) + for i, v := range val { + res[i] = v.(CrossTenantAccessPolicyTargetable) + } + m.SetTargets(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyTargetConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetTargets gets the targets property value. Specifies whether to target users, groups, or applications with this rule. +func (m *CrossTenantAccessPolicyTargetConfiguration) GetTargets()([]CrossTenantAccessPolicyTargetable) { + return m.targets +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyTargetConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessType() != nil { + cast := (*m.GetAccessType()).String() + err := writer.WriteStringValue("accessType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargets())) + for i, v := range m.GetTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("targets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessType sets the accessType property value. Defines whether access is allowed or blocked. The possible values are: allowed, blocked, unknownFutureValue. +func (m *CrossTenantAccessPolicyTargetConfiguration) SetAccessType(value *CrossTenantAccessPolicyTargetConfigurationAccessType)() { + m.accessType = value +} +// 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 *CrossTenantAccessPolicyTargetConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantAccessPolicyTargetConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetTargets sets the targets property value. Specifies whether to target users, groups, or applications with this rule. +func (m *CrossTenantAccessPolicyTargetConfiguration) SetTargets(value []CrossTenantAccessPolicyTargetable)() { + m.targets = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration_access_type.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration_access_type.go new file mode 100644 index 000000000..aabea58ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configuration_access_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CrossTenantAccessPolicyTargetConfigurationAccessType int + +const ( + ALLOWED_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE CrossTenantAccessPolicyTargetConfigurationAccessType = iota + BLOCKED_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE + UNKNOWNFUTUREVALUE_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE +) + +func (i CrossTenantAccessPolicyTargetConfigurationAccessType) String() string { + return []string{"allowed", "blocked", "unknownFutureValue"}[i] +} +func ParseCrossTenantAccessPolicyTargetConfigurationAccessType(v string) (interface{}, error) { + result := ALLOWED_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE + switch v { + case "allowed": + result = ALLOWED_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE + case "blocked": + result = BLOCKED_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CROSSTENANTACCESSPOLICYTARGETCONFIGURATIONACCESSTYPE + default: + return 0, errors.New("Unknown CrossTenantAccessPolicyTargetConfigurationAccessType value: " + v) + } + return &result, nil +} +func SerializeCrossTenantAccessPolicyTargetConfigurationAccessType(values []CrossTenantAccessPolicyTargetConfigurationAccessType) []string { + 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/cross_tenant_access_policy_target_configurationable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configurationable.go new file mode 100644 index 000000000..aa1a8dadf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTargetConfigurationable +type CrossTenantAccessPolicyTargetConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessType()(*CrossTenantAccessPolicyTargetConfigurationAccessType) + GetOdataType()(*string) + GetTargets()([]CrossTenantAccessPolicyTargetable) + SetAccessType(value *CrossTenantAccessPolicyTargetConfigurationAccessType)() + SetOdataType(value *string)() + SetTargets(value []CrossTenantAccessPolicyTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_type.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_type.go new file mode 100644 index 000000000..b65df903f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_target_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CrossTenantAccessPolicyTargetType int + +const ( + USER_CROSSTENANTACCESSPOLICYTARGETTYPE CrossTenantAccessPolicyTargetType = iota + GROUP_CROSSTENANTACCESSPOLICYTARGETTYPE + APPLICATION_CROSSTENANTACCESSPOLICYTARGETTYPE + UNKNOWNFUTUREVALUE_CROSSTENANTACCESSPOLICYTARGETTYPE +) + +func (i CrossTenantAccessPolicyTargetType) String() string { + return []string{"user", "group", "application", "unknownFutureValue"}[i] +} +func ParseCrossTenantAccessPolicyTargetType(v string) (interface{}, error) { + result := USER_CROSSTENANTACCESSPOLICYTARGETTYPE + switch v { + case "user": + result = USER_CROSSTENANTACCESSPOLICYTARGETTYPE + case "group": + result = GROUP_CROSSTENANTACCESSPOLICYTARGETTYPE + case "application": + result = APPLICATION_CROSSTENANTACCESSPOLICYTARGETTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CROSSTENANTACCESSPOLICYTARGETTYPE + default: + return 0, errors.New("Unknown CrossTenantAccessPolicyTargetType value: " + v) + } + return &result, nil +} +func SerializeCrossTenantAccessPolicyTargetType(values []CrossTenantAccessPolicyTargetType) []string { + 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/cross_tenant_access_policy_targetable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_targetable.go new file mode 100644 index 000000000..4117830a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTargetable +type CrossTenantAccessPolicyTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTarget()(*string) + GetTargetType()(*CrossTenantAccessPolicyTargetType) + SetOdataType(value *string)() + SetTarget(value *string)() + SetTargetType(value *CrossTenantAccessPolicyTargetType)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictions.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictions.go new file mode 100644 index 000000000..3b8125f07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictions.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTenantRestrictions +type CrossTenantAccessPolicyTenantRestrictions struct { + CrossTenantAccessPolicyB2BSetting + // The devices property + devices DevicesFilterable +} +// NewCrossTenantAccessPolicyTenantRestrictions instantiates a new CrossTenantAccessPolicyTenantRestrictions and sets the default values. +func NewCrossTenantAccessPolicyTenantRestrictions()(*CrossTenantAccessPolicyTenantRestrictions) { + m := &CrossTenantAccessPolicyTenantRestrictions{ + CrossTenantAccessPolicyB2BSetting: *NewCrossTenantAccessPolicyB2BSetting(), + } + odataTypeValue := "#microsoft.graph.crossTenantAccessPolicyTenantRestrictions"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCrossTenantAccessPolicyTenantRestrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantAccessPolicyTenantRestrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantAccessPolicyTenantRestrictions(), nil +} +// GetDevices gets the devices property value. The devices property +func (m *CrossTenantAccessPolicyTenantRestrictions) GetDevices()(DevicesFilterable) { + return m.devices +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantAccessPolicyTenantRestrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CrossTenantAccessPolicyB2BSetting.GetFieldDeserializers() + res["devices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDevicesFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevices(val.(DevicesFilterable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CrossTenantAccessPolicyTenantRestrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CrossTenantAccessPolicyB2BSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("devices", m.GetDevices()) + if err != nil { + return err + } + } + return nil +} +// SetDevices sets the devices property value. The devices property +func (m *CrossTenantAccessPolicyTenantRestrictions) SetDevices(value DevicesFilterable)() { + m.devices = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictionsable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictionsable.go new file mode 100644 index 000000000..3d0d74761 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policy_tenant_restrictionsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyTenantRestrictionsable +type CrossTenantAccessPolicyTenantRestrictionsable interface { + CrossTenantAccessPolicyB2BSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevices()(DevicesFilterable) + SetDevices(value DevicesFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_access_policyable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policyable.go new file mode 100644 index 000000000..65ca43bba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_access_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantAccessPolicyable +type CrossTenantAccessPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TenantRelationshipAccessPolicyBaseable + GetAllowedCloudEndpoints()([]string) + GetDefault()(CrossTenantAccessPolicyConfigurationDefaultable) + GetPartners()([]CrossTenantAccessPolicyConfigurationPartnerable) + SetAllowedCloudEndpoints(value []string)() + SetDefault(value CrossTenantAccessPolicyConfigurationDefaultable)() + SetPartners(value []CrossTenantAccessPolicyConfigurationPartnerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partner.go b/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partner.go new file mode 100644 index 000000000..9682e8e3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partner.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantIdentitySyncPolicyPartner +type CrossTenantIdentitySyncPolicyPartner struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name for the cross-tenant user synchronization policy. Use the name of the partner Azure AD tenant to easily identify the policy. Optional. + displayName *string + // The OdataType property + odataType *string + // Tenant identifier for the partner Azure AD organization. Read-only. + tenantId *string +} +// NewCrossTenantIdentitySyncPolicyPartner instantiates a new crossTenantIdentitySyncPolicyPartner and sets the default values. +func NewCrossTenantIdentitySyncPolicyPartner()(*CrossTenantIdentitySyncPolicyPartner) { + m := &CrossTenantIdentitySyncPolicyPartner{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCrossTenantIdentitySyncPolicyPartnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCrossTenantIdentitySyncPolicyPartnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCrossTenantIdentitySyncPolicyPartner(), 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 *CrossTenantIdentitySyncPolicyPartner) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name for the cross-tenant user synchronization policy. Use the name of the partner Azure AD tenant to easily identify the policy. Optional. +func (m *CrossTenantIdentitySyncPolicyPartner) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CrossTenantIdentitySyncPolicyPartner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CrossTenantIdentitySyncPolicyPartner) GetOdataType()(*string) { + return m.odataType +} +// GetTenantId gets the tenantId property value. Tenant identifier for the partner Azure AD organization. Read-only. +func (m *CrossTenantIdentitySyncPolicyPartner) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *CrossTenantIdentitySyncPolicyPartner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + 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 *CrossTenantIdentitySyncPolicyPartner) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name for the cross-tenant user synchronization policy. Use the name of the partner Azure AD tenant to easily identify the policy. Optional. +func (m *CrossTenantIdentitySyncPolicyPartner) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CrossTenantIdentitySyncPolicyPartner) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenantId sets the tenantId property value. Tenant identifier for the partner Azure AD organization. Read-only. +func (m *CrossTenantIdentitySyncPolicyPartner) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partnerable.go b/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partnerable.go new file mode 100644 index 000000000..d702d89d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cross_tenant_identity_sync_policy_partnerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CrossTenantIdentitySyncPolicyPartnerable +type CrossTenantIdentitySyncPolicyPartnerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetTenantId()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/cryptography_suite.go b/src/internal/connector/graph/betasdk/models/cryptography_suite.go new file mode 100644 index 000000000..43a91bad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cryptography_suite.go @@ -0,0 +1,233 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CryptographySuite vPN Security Association Parameters +type CryptographySuite struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Authentication Transform Constants. Possible values are: md5_96, sha1_96, sha_256_128, aes128Gcm, aes192Gcm, aes256Gcm. + authenticationTransformConstants *AuthenticationTransformConstant + // Cipher Transform Constants. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. + cipherTransformConstants *VpnEncryptionAlgorithmType + // Diffie Hellman Group. Possible values are: group1, group2, group14, ecp256, ecp384, group24. + dhGroup *DiffieHellmanGroup + // Encryption Method. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. + encryptionMethod *VpnEncryptionAlgorithmType + // Integrity Check Method. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. + integrityCheckMethod *VpnIntegrityAlgorithmType + // The OdataType property + odataType *string + // Perfect Forward Secrecy Group. Possible values are: pfs1, pfs2, pfs2048, ecp256, ecp384, pfsMM, pfs24. + pfsGroup *PerfectForwardSecrecyGroup +} +// NewCryptographySuite instantiates a new cryptographySuite and sets the default values. +func NewCryptographySuite()(*CryptographySuite) { + m := &CryptographySuite{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCryptographySuiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCryptographySuiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCryptographySuite(), 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 *CryptographySuite) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationTransformConstants gets the authenticationTransformConstants property value. Authentication Transform Constants. Possible values are: md5_96, sha1_96, sha_256_128, aes128Gcm, aes192Gcm, aes256Gcm. +func (m *CryptographySuite) GetAuthenticationTransformConstants()(*AuthenticationTransformConstant) { + return m.authenticationTransformConstants +} +// GetCipherTransformConstants gets the cipherTransformConstants property value. Cipher Transform Constants. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *CryptographySuite) GetCipherTransformConstants()(*VpnEncryptionAlgorithmType) { + return m.cipherTransformConstants +} +// GetDhGroup gets the dhGroup property value. Diffie Hellman Group. Possible values are: group1, group2, group14, ecp256, ecp384, group24. +func (m *CryptographySuite) GetDhGroup()(*DiffieHellmanGroup) { + return m.dhGroup +} +// GetEncryptionMethod gets the encryptionMethod property value. Encryption Method. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *CryptographySuite) GetEncryptionMethod()(*VpnEncryptionAlgorithmType) { + return m.encryptionMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CryptographySuite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationTransformConstants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationTransformConstant) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationTransformConstants(val.(*AuthenticationTransformConstant)) + } + return nil + } + res["cipherTransformConstants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnEncryptionAlgorithmType) + if err != nil { + return err + } + if val != nil { + m.SetCipherTransformConstants(val.(*VpnEncryptionAlgorithmType)) + } + return nil + } + res["dhGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDiffieHellmanGroup) + if err != nil { + return err + } + if val != nil { + m.SetDhGroup(val.(*DiffieHellmanGroup)) + } + return nil + } + res["encryptionMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnEncryptionAlgorithmType) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionMethod(val.(*VpnEncryptionAlgorithmType)) + } + return nil + } + res["integrityCheckMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnIntegrityAlgorithmType) + if err != nil { + return err + } + if val != nil { + m.SetIntegrityCheckMethod(val.(*VpnIntegrityAlgorithmType)) + } + 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["pfsGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePerfectForwardSecrecyGroup) + if err != nil { + return err + } + if val != nil { + m.SetPfsGroup(val.(*PerfectForwardSecrecyGroup)) + } + return nil + } + return res +} +// GetIntegrityCheckMethod gets the integrityCheckMethod property value. Integrity Check Method. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. +func (m *CryptographySuite) GetIntegrityCheckMethod()(*VpnIntegrityAlgorithmType) { + return m.integrityCheckMethod +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CryptographySuite) GetOdataType()(*string) { + return m.odataType +} +// GetPfsGroup gets the pfsGroup property value. Perfect Forward Secrecy Group. Possible values are: pfs1, pfs2, pfs2048, ecp256, ecp384, pfsMM, pfs24. +func (m *CryptographySuite) GetPfsGroup()(*PerfectForwardSecrecyGroup) { + return m.pfsGroup +} +// Serialize serializes information the current object +func (m *CryptographySuite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthenticationTransformConstants() != nil { + cast := (*m.GetAuthenticationTransformConstants()).String() + err := writer.WriteStringValue("authenticationTransformConstants", &cast) + if err != nil { + return err + } + } + if m.GetCipherTransformConstants() != nil { + cast := (*m.GetCipherTransformConstants()).String() + err := writer.WriteStringValue("cipherTransformConstants", &cast) + if err != nil { + return err + } + } + if m.GetDhGroup() != nil { + cast := (*m.GetDhGroup()).String() + err := writer.WriteStringValue("dhGroup", &cast) + if err != nil { + return err + } + } + if m.GetEncryptionMethod() != nil { + cast := (*m.GetEncryptionMethod()).String() + err := writer.WriteStringValue("encryptionMethod", &cast) + if err != nil { + return err + } + } + if m.GetIntegrityCheckMethod() != nil { + cast := (*m.GetIntegrityCheckMethod()).String() + err := writer.WriteStringValue("integrityCheckMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPfsGroup() != nil { + cast := (*m.GetPfsGroup()).String() + err := writer.WriteStringValue("pfsGroup", &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 *CryptographySuite) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationTransformConstants sets the authenticationTransformConstants property value. Authentication Transform Constants. Possible values are: md5_96, sha1_96, sha_256_128, aes128Gcm, aes192Gcm, aes256Gcm. +func (m *CryptographySuite) SetAuthenticationTransformConstants(value *AuthenticationTransformConstant)() { + m.authenticationTransformConstants = value +} +// SetCipherTransformConstants sets the cipherTransformConstants property value. Cipher Transform Constants. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *CryptographySuite) SetCipherTransformConstants(value *VpnEncryptionAlgorithmType)() { + m.cipherTransformConstants = value +} +// SetDhGroup sets the dhGroup property value. Diffie Hellman Group. Possible values are: group1, group2, group14, ecp256, ecp384, group24. +func (m *CryptographySuite) SetDhGroup(value *DiffieHellmanGroup)() { + m.dhGroup = value +} +// SetEncryptionMethod sets the encryptionMethod property value. Encryption Method. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *CryptographySuite) SetEncryptionMethod(value *VpnEncryptionAlgorithmType)() { + m.encryptionMethod = value +} +// SetIntegrityCheckMethod sets the integrityCheckMethod property value. Integrity Check Method. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. +func (m *CryptographySuite) SetIntegrityCheckMethod(value *VpnIntegrityAlgorithmType)() { + m.integrityCheckMethod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CryptographySuite) SetOdataType(value *string)() { + m.odataType = value +} +// SetPfsGroup sets the pfsGroup property value. Perfect Forward Secrecy Group. Possible values are: pfs1, pfs2, pfs2048, ecp256, ecp384, pfsMM, pfs24. +func (m *CryptographySuite) SetPfsGroup(value *PerfectForwardSecrecyGroup)() { + m.pfsGroup = value +} diff --git a/src/internal/connector/graph/betasdk/models/cryptography_suiteable.go b/src/internal/connector/graph/betasdk/models/cryptography_suiteable.go new file mode 100644 index 000000000..0e1628c96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/cryptography_suiteable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CryptographySuiteable +type CryptographySuiteable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationTransformConstants()(*AuthenticationTransformConstant) + GetCipherTransformConstants()(*VpnEncryptionAlgorithmType) + GetDhGroup()(*DiffieHellmanGroup) + GetEncryptionMethod()(*VpnEncryptionAlgorithmType) + GetIntegrityCheckMethod()(*VpnIntegrityAlgorithmType) + GetOdataType()(*string) + GetPfsGroup()(*PerfectForwardSecrecyGroup) + SetAuthenticationTransformConstants(value *AuthenticationTransformConstant)() + SetCipherTransformConstants(value *VpnEncryptionAlgorithmType)() + SetDhGroup(value *DiffieHellmanGroup)() + SetEncryptionMethod(value *VpnEncryptionAlgorithmType)() + SetIntegrityCheckMethod(value *VpnIntegrityAlgorithmType)() + SetOdataType(value *string)() + SetPfsGroup(value *PerfectForwardSecrecyGroup)() +} diff --git a/src/internal/connector/graph/betasdk/models/currency.go b/src/internal/connector/graph/betasdk/models/currency.go new file mode 100644 index 000000000..e3a9e9758 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currency.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Currency provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Currency struct { + Entity + // The amountDecimalPlaces property + amountDecimalPlaces *string + // The amountRoundingPrecision property + amountRoundingPrecision *float64 + // The code property + code *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The symbol property + symbol *string +} +// NewCurrency instantiates a new currency and sets the default values. +func NewCurrency()(*Currency) { + m := &Currency{ + Entity: *NewEntity(), + } + return m +} +// CreateCurrencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCurrencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCurrency(), nil +} +// GetAmountDecimalPlaces gets the amountDecimalPlaces property value. The amountDecimalPlaces property +func (m *Currency) GetAmountDecimalPlaces()(*string) { + return m.amountDecimalPlaces +} +// GetAmountRoundingPrecision gets the amountRoundingPrecision property value. The amountRoundingPrecision property +func (m *Currency) GetAmountRoundingPrecision()(*float64) { + return m.amountRoundingPrecision +} +// GetCode gets the code property value. The code property +func (m *Currency) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Currency) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Currency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["amountDecimalPlaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAmountDecimalPlaces(val) + } + return nil + } + res["amountRoundingPrecision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountRoundingPrecision(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["symbol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSymbol(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Currency) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetSymbol gets the symbol property value. The symbol property +func (m *Currency) GetSymbol()(*string) { + return m.symbol +} +// Serialize serializes information the current object +func (m *Currency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("amountDecimalPlaces", m.GetAmountDecimalPlaces()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountRoundingPrecision", m.GetAmountRoundingPrecision()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("symbol", m.GetSymbol()) + if err != nil { + return err + } + } + return nil +} +// SetAmountDecimalPlaces sets the amountDecimalPlaces property value. The amountDecimalPlaces property +func (m *Currency) SetAmountDecimalPlaces(value *string)() { + m.amountDecimalPlaces = value +} +// SetAmountRoundingPrecision sets the amountRoundingPrecision property value. The amountRoundingPrecision property +func (m *Currency) SetAmountRoundingPrecision(value *float64)() { + m.amountRoundingPrecision = value +} +// SetCode sets the code property value. The code property +func (m *Currency) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Currency) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Currency) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetSymbol sets the symbol property value. The symbol property +func (m *Currency) SetSymbol(value *string)() { + m.symbol = value +} diff --git a/src/internal/connector/graph/betasdk/models/currency_collection_response.go b/src/internal/connector/graph/betasdk/models/currency_collection_response.go new file mode 100644 index 000000000..79e524bf2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currency_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrencyCollectionResponse +type CurrencyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Currencyable +} +// NewCurrencyCollectionResponse instantiates a new CurrencyCollectionResponse and sets the default values. +func NewCurrencyCollectionResponse()(*CurrencyCollectionResponse) { + m := &CurrencyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCurrencyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCurrencyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCurrencyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CurrencyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Currencyable, len(val)) + for i, v := range val { + res[i] = v.(Currencyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CurrencyCollectionResponse) GetValue()([]Currencyable) { + return m.value +} +// Serialize serializes information the current object +func (m *CurrencyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CurrencyCollectionResponse) SetValue(value []Currencyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/currency_collection_responseable.go b/src/internal/connector/graph/betasdk/models/currency_collection_responseable.go new file mode 100644 index 000000000..c996bee46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currency_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrencyCollectionResponseable +type CurrencyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Currencyable) + SetValue(value []Currencyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/currency_column.go b/src/internal/connector/graph/betasdk/models/currency_column.go new file mode 100644 index 000000000..1a8fe4a26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currency_column.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrencyColumn +type CurrencyColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies the locale from which to infer the currency symbol. + locale *string + // The OdataType property + odataType *string +} +// NewCurrencyColumn instantiates a new currencyColumn and sets the default values. +func NewCurrencyColumn()(*CurrencyColumn) { + m := &CurrencyColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCurrencyColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCurrencyColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCurrencyColumn(), 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 *CurrencyColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CurrencyColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(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 + } + return res +} +// GetLocale gets the locale property value. Specifies the locale from which to infer the currency symbol. +func (m *CurrencyColumn) GetLocale()(*string) { + return m.locale +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CurrencyColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CurrencyColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CurrencyColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLocale sets the locale property value. Specifies the locale from which to infer the currency symbol. +func (m *CurrencyColumn) SetLocale(value *string)() { + m.locale = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CurrencyColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/currency_columnable.go b/src/internal/connector/graph/betasdk/models/currency_columnable.go new file mode 100644 index 000000000..7636ce29a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currency_columnable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrencyColumnable +type CurrencyColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLocale()(*string) + GetOdataType()(*string) + SetLocale(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/currencyable.go b/src/internal/connector/graph/betasdk/models/currencyable.go new file mode 100644 index 000000000..4ae465013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/currencyable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Currencyable +type Currencyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAmountDecimalPlaces()(*string) + GetAmountRoundingPrecision()(*float64) + GetCode()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSymbol()(*string) + SetAmountDecimalPlaces(value *string)() + SetAmountRoundingPrecision(value *float64)() + SetCode(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSymbol(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/current_label.go b/src/internal/connector/graph/betasdk/models/current_label.go new file mode 100644 index 000000000..9cc71692c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/current_label.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrentLabel +type CurrentLabel 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 applicationMode property + applicationMode *ApplicationMode + // The id property + id *string + // The OdataType property + odataType *string +} +// NewCurrentLabel instantiates a new currentLabel and sets the default values. +func NewCurrentLabel()(*CurrentLabel) { + m := &CurrentLabel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCurrentLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCurrentLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCurrentLabel(), 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 *CurrentLabel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationMode gets the applicationMode property value. The applicationMode property +func (m *CurrentLabel) GetApplicationMode()(*ApplicationMode) { + return m.applicationMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CurrentLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseApplicationMode) + if err != nil { + return err + } + if val != nil { + m.SetApplicationMode(val.(*ApplicationMode)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The id property +func (m *CurrentLabel) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CurrentLabel) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CurrentLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplicationMode() != nil { + cast := (*m.GetApplicationMode()).String() + err := writer.WriteStringValue("applicationMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CurrentLabel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationMode sets the applicationMode property value. The applicationMode property +func (m *CurrentLabel) SetApplicationMode(value *ApplicationMode)() { + m.applicationMode = value +} +// SetId sets the id property value. The id property +func (m *CurrentLabel) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CurrentLabel) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/current_labelable.go b/src/internal/connector/graph/betasdk/models/current_labelable.go new file mode 100644 index 000000000..ec8b1144d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/current_labelable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CurrentLabelable +type CurrentLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationMode()(*ApplicationMode) + GetId()(*string) + GetOdataType()(*string) + SetApplicationMode(value *ApplicationMode)() + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension.go b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension.go new file mode 100644 index 000000000..8eb2004b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension.go @@ -0,0 +1,89 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAccessPackageWorkflowExtension +type CustomAccessPackageWorkflowExtension struct { + CustomCalloutExtension + // Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCustomAccessPackageWorkflowExtension instantiates a new CustomAccessPackageWorkflowExtension and sets the default values. +func NewCustomAccessPackageWorkflowExtension()(*CustomAccessPackageWorkflowExtension) { + m := &CustomAccessPackageWorkflowExtension{ + CustomCalloutExtension: *NewCustomCalloutExtension(), + } + odataTypeValue := "#microsoft.graph.customAccessPackageWorkflowExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomAccessPackageWorkflowExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomAccessPackageWorkflowExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAccessPackageWorkflowExtension(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *CustomAccessPackageWorkflowExtension) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAccessPackageWorkflowExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomCalloutExtension.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *CustomAccessPackageWorkflowExtension) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *CustomAccessPackageWorkflowExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomCalloutExtension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *CustomAccessPackageWorkflowExtension) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *CustomAccessPackageWorkflowExtension) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_response.go new file mode 100644 index 000000000..12de614ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAccessPackageWorkflowExtensionCollectionResponse +type CustomAccessPackageWorkflowExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomAccessPackageWorkflowExtensionable +} +// NewCustomAccessPackageWorkflowExtensionCollectionResponse instantiates a new CustomAccessPackageWorkflowExtensionCollectionResponse and sets the default values. +func NewCustomAccessPackageWorkflowExtensionCollectionResponse()(*CustomAccessPackageWorkflowExtensionCollectionResponse) { + m := &CustomAccessPackageWorkflowExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomAccessPackageWorkflowExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomAccessPackageWorkflowExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAccessPackageWorkflowExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAccessPackageWorkflowExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomAccessPackageWorkflowExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomAccessPackageWorkflowExtensionable, len(val)) + for i, v := range val { + res[i] = v.(CustomAccessPackageWorkflowExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomAccessPackageWorkflowExtensionCollectionResponse) GetValue()([]CustomAccessPackageWorkflowExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomAccessPackageWorkflowExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomAccessPackageWorkflowExtensionCollectionResponse) SetValue(value []CustomAccessPackageWorkflowExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_responseable.go new file mode 100644 index 000000000..2e5815179 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAccessPackageWorkflowExtensionCollectionResponseable +type CustomAccessPackageWorkflowExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomAccessPackageWorkflowExtensionable) + SetValue(value []CustomAccessPackageWorkflowExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extensionable.go b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extensionable.go new file mode 100644 index 000000000..f2ad7a806 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_access_package_workflow_extensionable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAccessPackageWorkflowExtensionable +type CustomAccessPackageWorkflowExtensionable interface { + CustomCalloutExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_action.go b/src/internal/connector/graph/betasdk/models/custom_action.go new file mode 100644 index 000000000..363527d57 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_action.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAction +type CustomAction struct { + InformationProtectionAction + // Name of the custom action. + name *string + // Properties, in key value pair format, of the action. + properties []KeyValuePairable +} +// NewCustomAction instantiates a new CustomAction and sets the default values. +func NewCustomAction()(*CustomAction) { + m := &CustomAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.customAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the custom action. +func (m *CustomAction) GetName()(*string) { + return m.name +} +// GetProperties gets the properties property value. Properties, in key value pair format, of the action. +func (m *CustomAction) GetProperties()([]KeyValuePairable) { + return m.properties +} +// Serialize serializes information the current object +func (m *CustomAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. Name of the custom action. +func (m *CustomAction) SetName(value *string)() { + m.name = value +} +// SetProperties sets the properties property value. Properties, in key value pair format, of the action. +func (m *CustomAction) SetProperties(value []KeyValuePairable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_actionable.go b/src/internal/connector/graph/betasdk/models/custom_actionable.go new file mode 100644 index 000000000..378b358a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_actionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomActionable +type CustomActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetProperties()([]KeyValuePairable) + SetName(value *string)() + SetProperties(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_authentication_extension.go b/src/internal/connector/graph/betasdk/models/custom_authentication_extension.go new file mode 100644 index 000000000..da2206c6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_authentication_extension.go @@ -0,0 +1,54 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAuthenticationExtension +type CustomAuthenticationExtension struct { + CustomCalloutExtension +} +// NewCustomAuthenticationExtension instantiates a new CustomAuthenticationExtension and sets the default values. +func NewCustomAuthenticationExtension()(*CustomAuthenticationExtension) { + m := &CustomAuthenticationExtension{ + CustomCalloutExtension: *NewCustomCalloutExtension(), + } + odataTypeValue := "#microsoft.graph.customAuthenticationExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomAuthenticationExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomAuthenticationExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil + } + } + } + } + return NewCustomAuthenticationExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAuthenticationExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomCalloutExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CustomAuthenticationExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomCalloutExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_response.go new file mode 100644 index 000000000..8b879bc7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAuthenticationExtensionCollectionResponse +type CustomAuthenticationExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomAuthenticationExtensionable +} +// NewCustomAuthenticationExtensionCollectionResponse instantiates a new CustomAuthenticationExtensionCollectionResponse and sets the default values. +func NewCustomAuthenticationExtensionCollectionResponse()(*CustomAuthenticationExtensionCollectionResponse) { + m := &CustomAuthenticationExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomAuthenticationExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomAuthenticationExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAuthenticationExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAuthenticationExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomAuthenticationExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomAuthenticationExtensionable, len(val)) + for i, v := range val { + res[i] = v.(CustomAuthenticationExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomAuthenticationExtensionCollectionResponse) GetValue()([]CustomAuthenticationExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomAuthenticationExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomAuthenticationExtensionCollectionResponse) SetValue(value []CustomAuthenticationExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_responseable.go new file mode 100644 index 000000000..f0029e7ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_authentication_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAuthenticationExtensionCollectionResponseable +type CustomAuthenticationExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomAuthenticationExtensionable) + SetValue(value []CustomAuthenticationExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_authentication_extensionable.go b/src/internal/connector/graph/betasdk/models/custom_authentication_extensionable.go new file mode 100644 index 000000000..f24115baf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_authentication_extensionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAuthenticationExtensionable +type CustomAuthenticationExtensionable interface { + CustomCalloutExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/custom_callout_extension.go b/src/internal/connector/graph/betasdk/models/custom_callout_extension.go new file mode 100644 index 000000000..2e40a63d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_callout_extension.go @@ -0,0 +1,186 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomCalloutExtension provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CustomCalloutExtension struct { + Entity + // Configuration for securing the API call to the logic app. For example, using OAuth client credentials flow. + authenticationConfiguration CustomExtensionAuthenticationConfigurationable + // HTTP connection settings that define how long Azure AD can wait for a connection to a logic app, how many times you can retry a timed-out connection and the exception scenarios when retries are allowed. + clientConfiguration CustomExtensionClientConfigurationable + // Description for the customCalloutExtension object. + description *string + // Display name for the customCalloutExtension object. + displayName *string + // The type and details for configuring the endpoint to call the logic app's workflow. + endpointConfiguration CustomExtensionEndpointConfigurationable +} +// NewCustomCalloutExtension instantiates a new customCalloutExtension and sets the default values. +func NewCustomCalloutExtension()(*CustomCalloutExtension) { + m := &CustomCalloutExtension{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomCalloutExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomCalloutExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.customAccessPackageWorkflowExtension": + return NewCustomAccessPackageWorkflowExtension(), nil + case "#microsoft.graph.customAuthenticationExtension": + return NewCustomAuthenticationExtension(), nil + case "#microsoft.graph.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil + } + } + } + } + return NewCustomCalloutExtension(), nil +} +// GetAuthenticationConfiguration gets the authenticationConfiguration property value. Configuration for securing the API call to the logic app. For example, using OAuth client credentials flow. +func (m *CustomCalloutExtension) GetAuthenticationConfiguration()(CustomExtensionAuthenticationConfigurationable) { + return m.authenticationConfiguration +} +// GetClientConfiguration gets the clientConfiguration property value. HTTP connection settings that define how long Azure AD can wait for a connection to a logic app, how many times you can retry a timed-out connection and the exception scenarios when retries are allowed. +func (m *CustomCalloutExtension) GetClientConfiguration()(CustomExtensionClientConfigurationable) { + return m.clientConfiguration +} +// GetDescription gets the description property value. Description for the customCalloutExtension object. +func (m *CustomCalloutExtension) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the customCalloutExtension object. +func (m *CustomCalloutExtension) GetDisplayName()(*string) { + return m.displayName +} +// GetEndpointConfiguration gets the endpointConfiguration property value. The type and details for configuring the endpoint to call the logic app's workflow. +func (m *CustomCalloutExtension) GetEndpointConfiguration()(CustomExtensionEndpointConfigurationable) { + return m.endpointConfiguration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomCalloutExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomExtensionAuthenticationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationConfiguration(val.(CustomExtensionAuthenticationConfigurationable)) + } + return nil + } + res["clientConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomExtensionClientConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClientConfiguration(val.(CustomExtensionClientConfigurationable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endpointConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomExtensionEndpointConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEndpointConfiguration(val.(CustomExtensionEndpointConfigurationable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CustomCalloutExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("authenticationConfiguration", m.GetAuthenticationConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("clientConfiguration", m.GetClientConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("endpointConfiguration", m.GetEndpointConfiguration()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationConfiguration sets the authenticationConfiguration property value. Configuration for securing the API call to the logic app. For example, using OAuth client credentials flow. +func (m *CustomCalloutExtension) SetAuthenticationConfiguration(value CustomExtensionAuthenticationConfigurationable)() { + m.authenticationConfiguration = value +} +// SetClientConfiguration sets the clientConfiguration property value. HTTP connection settings that define how long Azure AD can wait for a connection to a logic app, how many times you can retry a timed-out connection and the exception scenarios when retries are allowed. +func (m *CustomCalloutExtension) SetClientConfiguration(value CustomExtensionClientConfigurationable)() { + m.clientConfiguration = value +} +// SetDescription sets the description property value. Description for the customCalloutExtension object. +func (m *CustomCalloutExtension) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the customCalloutExtension object. +func (m *CustomCalloutExtension) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndpointConfiguration sets the endpointConfiguration property value. The type and details for configuring the endpoint to call the logic app's workflow. +func (m *CustomCalloutExtension) SetEndpointConfiguration(value CustomExtensionEndpointConfigurationable)() { + m.endpointConfiguration = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_callout_extensionable.go b/src/internal/connector/graph/betasdk/models/custom_callout_extensionable.go new file mode 100644 index 000000000..4e9684cee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_callout_extensionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomCalloutExtensionable +type CustomCalloutExtensionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationConfiguration()(CustomExtensionAuthenticationConfigurationable) + GetClientConfiguration()(CustomExtensionClientConfigurationable) + GetDescription()(*string) + GetDisplayName()(*string) + GetEndpointConfiguration()(CustomExtensionEndpointConfigurationable) + SetAuthenticationConfiguration(value CustomExtensionAuthenticationConfigurationable)() + SetClientConfiguration(value CustomExtensionClientConfigurationable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEndpointConfiguration(value CustomExtensionEndpointConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configuration.go b/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configuration.go new file mode 100644 index 000000000..eb5d88484 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configuration.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionAuthenticationConfiguration +type CustomExtensionAuthenticationConfiguration 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 OdataType property + odataType *string +} +// NewCustomExtensionAuthenticationConfiguration instantiates a new customExtensionAuthenticationConfiguration and sets the default values. +func NewCustomExtensionAuthenticationConfiguration()(*CustomExtensionAuthenticationConfiguration) { + m := &CustomExtensionAuthenticationConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomExtensionAuthenticationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionAuthenticationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.azureAdTokenAuthentication": + return NewAzureAdTokenAuthentication(), nil + } + } + } + } + return NewCustomExtensionAuthenticationConfiguration(), 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 *CustomExtensionAuthenticationConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionAuthenticationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomExtensionAuthenticationConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CustomExtensionAuthenticationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CustomExtensionAuthenticationConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionAuthenticationConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configurationable.go b/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configurationable.go new file mode 100644 index 000000000..fccdd554b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_authentication_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionAuthenticationConfigurationable +type CustomExtensionAuthenticationConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_callback_configuration.go b/src/internal/connector/graph/betasdk/models/custom_extension_callback_configuration.go new file mode 100644 index 000000000..9bd989f03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_callback_configuration.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionCallbackConfiguration +type CustomExtensionCallbackConfiguration 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 OdataType property + odataType *string + // Callback time out in ISO 8601 time duration. Accepted time durations are between five minutes to three hours. For example, PT5M for five minutes and PT3H for three hours. + timeoutDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewCustomExtensionCallbackConfiguration instantiates a new customExtensionCallbackConfiguration and sets the default values. +func NewCustomExtensionCallbackConfiguration()(*CustomExtensionCallbackConfiguration) { + m := &CustomExtensionCallbackConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomExtensionCallbackConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionCallbackConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionCallbackConfiguration(), 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 *CustomExtensionCallbackConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionCallbackConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["timeoutDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeoutDuration(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomExtensionCallbackConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetTimeoutDuration gets the timeoutDuration property value. Callback time out in ISO 8601 time duration. Accepted time durations are between five minutes to three hours. For example, PT5M for five minutes and PT3H for three hours. +func (m *CustomExtensionCallbackConfiguration) GetTimeoutDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.timeoutDuration +} +// Serialize serializes information the current object +func (m *CustomExtensionCallbackConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("timeoutDuration", m.GetTimeoutDuration()) + 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 *CustomExtensionCallbackConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionCallbackConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeoutDuration sets the timeoutDuration property value. Callback time out in ISO 8601 time duration. Accepted time durations are between five minutes to three hours. For example, PT5M for five minutes and PT3H for three hours. +func (m *CustomExtensionCallbackConfiguration) SetTimeoutDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.timeoutDuration = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_callback_configurationable.go b/src/internal/connector/graph/betasdk/models/custom_extension_callback_configurationable.go new file mode 100644 index 000000000..26c5c565a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_callback_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionCallbackConfigurationable +type CustomExtensionCallbackConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTimeoutDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetOdataType(value *string)() + SetTimeoutDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_callout_result.go b/src/internal/connector/graph/betasdk/models/custom_extension_callout_result.go new file mode 100644 index 000000000..0b5c46724 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_callout_result.go @@ -0,0 +1,167 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionCalloutResult +type CustomExtensionCalloutResult struct { + AuthenticationEventHandlerResult + // The calloutDateTime property + calloutDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The customExtensionId property + customExtensionId *string + // The errorCode property + errorCode *int32 + // The httpStatus property + httpStatus *int32 + // The numberOfAttempts property + numberOfAttempts *int32 +} +// NewCustomExtensionCalloutResult instantiates a new CustomExtensionCalloutResult and sets the default values. +func NewCustomExtensionCalloutResult()(*CustomExtensionCalloutResult) { + m := &CustomExtensionCalloutResult{ + AuthenticationEventHandlerResult: *NewAuthenticationEventHandlerResult(), + } + odataTypeValue := "#microsoft.graph.customExtensionCalloutResult"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomExtensionCalloutResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionCalloutResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionCalloutResult(), nil +} +// GetCalloutDateTime gets the calloutDateTime property value. The calloutDateTime property +func (m *CustomExtensionCalloutResult) GetCalloutDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.calloutDateTime +} +// GetCustomExtensionId gets the customExtensionId property value. The customExtensionId property +func (m *CustomExtensionCalloutResult) GetCustomExtensionId()(*string) { + return m.customExtensionId +} +// GetErrorCode gets the errorCode property value. The errorCode property +func (m *CustomExtensionCalloutResult) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionCalloutResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationEventHandlerResult.GetFieldDeserializers() + res["calloutDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCalloutDateTime(val) + } + return nil + } + res["customExtensionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomExtensionId(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["httpStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHttpStatus(val) + } + return nil + } + res["numberOfAttempts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfAttempts(val) + } + return nil + } + return res +} +// GetHttpStatus gets the httpStatus property value. The httpStatus property +func (m *CustomExtensionCalloutResult) GetHttpStatus()(*int32) { + return m.httpStatus +} +// GetNumberOfAttempts gets the numberOfAttempts property value. The numberOfAttempts property +func (m *CustomExtensionCalloutResult) GetNumberOfAttempts()(*int32) { + return m.numberOfAttempts +} +// Serialize serializes information the current object +func (m *CustomExtensionCalloutResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationEventHandlerResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("calloutDateTime", m.GetCalloutDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customExtensionId", m.GetCustomExtensionId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("httpStatus", m.GetHttpStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfAttempts", m.GetNumberOfAttempts()) + if err != nil { + return err + } + } + return nil +} +// SetCalloutDateTime sets the calloutDateTime property value. The calloutDateTime property +func (m *CustomExtensionCalloutResult) SetCalloutDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.calloutDateTime = value +} +// SetCustomExtensionId sets the customExtensionId property value. The customExtensionId property +func (m *CustomExtensionCalloutResult) SetCustomExtensionId(value *string)() { + m.customExtensionId = value +} +// SetErrorCode sets the errorCode property value. The errorCode property +func (m *CustomExtensionCalloutResult) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetHttpStatus sets the httpStatus property value. The httpStatus property +func (m *CustomExtensionCalloutResult) SetHttpStatus(value *int32)() { + m.httpStatus = value +} +// SetNumberOfAttempts sets the numberOfAttempts property value. The numberOfAttempts property +func (m *CustomExtensionCalloutResult) SetNumberOfAttempts(value *int32)() { + m.numberOfAttempts = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_callout_resultable.go b/src/internal/connector/graph/betasdk/models/custom_extension_callout_resultable.go new file mode 100644 index 000000000..6d35a419a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_callout_resultable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionCalloutResultable +type CustomExtensionCalloutResultable interface { + AuthenticationEventHandlerResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalloutDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomExtensionId()(*string) + GetErrorCode()(*int32) + GetHttpStatus()(*int32) + GetNumberOfAttempts()(*int32) + SetCalloutDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomExtensionId(value *string)() + SetErrorCode(value *int32)() + SetHttpStatus(value *int32)() + SetNumberOfAttempts(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_client_configuration.go b/src/internal/connector/graph/betasdk/models/custom_extension_client_configuration.go new file mode 100644 index 000000000..3dbb4e7ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_client_configuration.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionClientConfiguration +type CustomExtensionClientConfiguration 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 OdataType property + odataType *string + // The max duration in milliseconds that Azure AD will wait for a response from the logic app before it shuts down the connection. The valid range is between 200 and 2000 milliseconds. Default duration is 1000. + timeoutInMilliseconds *int32 +} +// NewCustomExtensionClientConfiguration instantiates a new customExtensionClientConfiguration and sets the default values. +func NewCustomExtensionClientConfiguration()(*CustomExtensionClientConfiguration) { + m := &CustomExtensionClientConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomExtensionClientConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionClientConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionClientConfiguration(), 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 *CustomExtensionClientConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionClientConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["timeoutInMilliseconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTimeoutInMilliseconds(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomExtensionClientConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetTimeoutInMilliseconds gets the timeoutInMilliseconds property value. The max duration in milliseconds that Azure AD will wait for a response from the logic app before it shuts down the connection. The valid range is between 200 and 2000 milliseconds. Default duration is 1000. +func (m *CustomExtensionClientConfiguration) GetTimeoutInMilliseconds()(*int32) { + return m.timeoutInMilliseconds +} +// Serialize serializes information the current object +func (m *CustomExtensionClientConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("timeoutInMilliseconds", m.GetTimeoutInMilliseconds()) + 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 *CustomExtensionClientConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionClientConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeoutInMilliseconds sets the timeoutInMilliseconds property value. The max duration in milliseconds that Azure AD will wait for a response from the logic app before it shuts down the connection. The valid range is between 200 and 2000 milliseconds. Default duration is 1000. +func (m *CustomExtensionClientConfiguration) SetTimeoutInMilliseconds(value *int32)() { + m.timeoutInMilliseconds = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_client_configurationable.go b/src/internal/connector/graph/betasdk/models/custom_extension_client_configurationable.go new file mode 100644 index 000000000..c89551d48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_client_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionClientConfigurationable +type CustomExtensionClientConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTimeoutInMilliseconds()(*int32) + SetOdataType(value *string)() + SetTimeoutInMilliseconds(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configuration.go b/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configuration.go new file mode 100644 index 000000000..72bf3194e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configuration.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionEndpointConfiguration +type CustomExtensionEndpointConfiguration 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 OdataType property + odataType *string +} +// NewCustomExtensionEndpointConfiguration instantiates a new customExtensionEndpointConfiguration and sets the default values. +func NewCustomExtensionEndpointConfiguration()(*CustomExtensionEndpointConfiguration) { + m := &CustomExtensionEndpointConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomExtensionEndpointConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionEndpointConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.httpRequestEndpoint": + return NewHttpRequestEndpoint(), nil + case "#microsoft.graph.logicAppTriggerEndpointConfiguration": + return NewLogicAppTriggerEndpointConfiguration(), nil + } + } + } + } + return NewCustomExtensionEndpointConfiguration(), 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 *CustomExtensionEndpointConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionEndpointConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomExtensionEndpointConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CustomExtensionEndpointConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CustomExtensionEndpointConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionEndpointConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configurationable.go b/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configurationable.go new file mode 100644 index 000000000..9c9b2e67c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_endpoint_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionEndpointConfigurationable +type CustomExtensionEndpointConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler.go new file mode 100644 index 000000000..3dacbc4db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandler provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CustomExtensionHandler struct { + Entity + // Indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. + customExtension CustomAccessPackageWorkflowExtensionable + // Indicates the stage of the access package assignment request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. + stage *AccessPackageCustomExtensionStage +} +// NewCustomExtensionHandler instantiates a new customExtensionHandler and sets the default values. +func NewCustomExtensionHandler()(*CustomExtensionHandler) { + m := &CustomExtensionHandler{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomExtensionHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionHandler(), nil +} +// GetCustomExtension gets the customExtension property value. Indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +func (m *CustomExtensionHandler) GetCustomExtension()(CustomAccessPackageWorkflowExtensionable) { + return m.customExtension +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["customExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomAccessPackageWorkflowExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomExtension(val.(CustomAccessPackageWorkflowExtensionable)) + } + return nil + } + res["stage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessPackageCustomExtensionStage) + if err != nil { + return err + } + if val != nil { + m.SetStage(val.(*AccessPackageCustomExtensionStage)) + } + return nil + } + return res +} +// GetStage gets the stage property value. Indicates the stage of the access package assignment request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. +func (m *CustomExtensionHandler) GetStage()(*AccessPackageCustomExtensionStage) { + return m.stage +} +// Serialize serializes information the current object +func (m *CustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("customExtension", m.GetCustomExtension()) + if err != nil { + return err + } + } + if m.GetStage() != nil { + cast := (*m.GetStage()).String() + err = writer.WriteStringValue("stage", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCustomExtension sets the customExtension property value. Indicates which custom workflow extension will be executed at this stage. Nullable. Supports $expand. +func (m *CustomExtensionHandler) SetCustomExtension(value CustomAccessPackageWorkflowExtensionable)() { + m.customExtension = value +} +// SetStage sets the stage property value. Indicates the stage of the access package assignment request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. +func (m *CustomExtensionHandler) SetStage(value *AccessPackageCustomExtensionStage)() { + m.stage = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_response.go new file mode 100644 index 000000000..ce53e86d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerCollectionResponse +type CustomExtensionHandlerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomExtensionHandlerable +} +// NewCustomExtensionHandlerCollectionResponse instantiates a new CustomExtensionHandlerCollectionResponse and sets the default values. +func NewCustomExtensionHandlerCollectionResponse()(*CustomExtensionHandlerCollectionResponse) { + m := &CustomExtensionHandlerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomExtensionHandlerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionHandlerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionHandlerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionHandlerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomExtensionHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomExtensionHandlerable, len(val)) + for i, v := range val { + res[i] = v.(CustomExtensionHandlerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomExtensionHandlerCollectionResponse) GetValue()([]CustomExtensionHandlerable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomExtensionHandlerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomExtensionHandlerCollectionResponse) SetValue(value []CustomExtensionHandlerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_responseable.go new file mode 100644 index 000000000..06c26ac49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerCollectionResponseable +type CustomExtensionHandlerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomExtensionHandlerable) + SetValue(value []CustomExtensionHandlerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance.go new file mode 100644 index 000000000..b072aba51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerInstance +type CustomExtensionHandlerInstance struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifier of the customAccessPackageWorkflowExtension triggered at this instance. + customExtensionId *string + // The unique run ID for the logic app. + externalCorrelationId *string + // The OdataType property + odataType *string + // Indicates the stage of the request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. + stage *AccessPackageCustomExtensionStage + // Status of the request to run the access package custom extension workflow that is associated with the logic app. The possible values are: requestSent, requestReceived, unknownFutureValue. + status *AccessPackageCustomExtensionHandlerStatus +} +// NewCustomExtensionHandlerInstance instantiates a new customExtensionHandlerInstance and sets the default values. +func NewCustomExtensionHandlerInstance()(*CustomExtensionHandlerInstance) { + m := &CustomExtensionHandlerInstance{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomExtensionHandlerInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionHandlerInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionHandlerInstance(), 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 *CustomExtensionHandlerInstance) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCustomExtensionId gets the customExtensionId property value. Identifier of the customAccessPackageWorkflowExtension triggered at this instance. +func (m *CustomExtensionHandlerInstance) GetCustomExtensionId()(*string) { + return m.customExtensionId +} +// GetExternalCorrelationId gets the externalCorrelationId property value. The unique run ID for the logic app. +func (m *CustomExtensionHandlerInstance) GetExternalCorrelationId()(*string) { + return m.externalCorrelationId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionHandlerInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["customExtensionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomExtensionId(val) + } + return nil + } + res["externalCorrelationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalCorrelationId(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["stage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessPackageCustomExtensionStage) + if err != nil { + return err + } + if val != nil { + m.SetStage(val.(*AccessPackageCustomExtensionStage)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessPackageCustomExtensionHandlerStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AccessPackageCustomExtensionHandlerStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomExtensionHandlerInstance) GetOdataType()(*string) { + return m.odataType +} +// GetStage gets the stage property value. Indicates the stage of the request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. +func (m *CustomExtensionHandlerInstance) GetStage()(*AccessPackageCustomExtensionStage) { + return m.stage +} +// GetStatus gets the status property value. Status of the request to run the access package custom extension workflow that is associated with the logic app. The possible values are: requestSent, requestReceived, unknownFutureValue. +func (m *CustomExtensionHandlerInstance) GetStatus()(*AccessPackageCustomExtensionHandlerStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CustomExtensionHandlerInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("customExtensionId", m.GetCustomExtensionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalCorrelationId", m.GetExternalCorrelationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStage() != nil { + cast := (*m.GetStage()).String() + err := writer.WriteStringValue("stage", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *CustomExtensionHandlerInstance) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCustomExtensionId sets the customExtensionId property value. Identifier of the customAccessPackageWorkflowExtension triggered at this instance. +func (m *CustomExtensionHandlerInstance) SetCustomExtensionId(value *string)() { + m.customExtensionId = value +} +// SetExternalCorrelationId sets the externalCorrelationId property value. The unique run ID for the logic app. +func (m *CustomExtensionHandlerInstance) SetExternalCorrelationId(value *string)() { + m.externalCorrelationId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomExtensionHandlerInstance) SetOdataType(value *string)() { + m.odataType = value +} +// SetStage sets the stage property value. Indicates the stage of the request workflow when the access package custom extension runs. The possible values are: assignmentRequestCreated, assignmentRequestApproved, assignmentRequestGranted, assignmentRequestRemoved, assignmentFourteenDaysBeforeExpiration, assignmentOneDayBeforeExpiration, unknownFutureValue. +func (m *CustomExtensionHandlerInstance) SetStage(value *AccessPackageCustomExtensionStage)() { + m.stage = value +} +// SetStatus sets the status property value. Status of the request to run the access package custom extension workflow that is associated with the logic app. The possible values are: requestSent, requestReceived, unknownFutureValue. +func (m *CustomExtensionHandlerInstance) SetStatus(value *AccessPackageCustomExtensionHandlerStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_response.go new file mode 100644 index 000000000..bd533f47e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerInstanceCollectionResponse +type CustomExtensionHandlerInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomExtensionHandlerInstanceable +} +// NewCustomExtensionHandlerInstanceCollectionResponse instantiates a new CustomExtensionHandlerInstanceCollectionResponse and sets the default values. +func NewCustomExtensionHandlerInstanceCollectionResponse()(*CustomExtensionHandlerInstanceCollectionResponse) { + m := &CustomExtensionHandlerInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomExtensionHandlerInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomExtensionHandlerInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomExtensionHandlerInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomExtensionHandlerInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomExtensionHandlerInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomExtensionHandlerInstanceable, len(val)) + for i, v := range val { + res[i] = v.(CustomExtensionHandlerInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomExtensionHandlerInstanceCollectionResponse) GetValue()([]CustomExtensionHandlerInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomExtensionHandlerInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomExtensionHandlerInstanceCollectionResponse) SetValue(value []CustomExtensionHandlerInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_responseable.go new file mode 100644 index 000000000..f42346309 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerInstanceCollectionResponseable +type CustomExtensionHandlerInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomExtensionHandlerInstanceable) + SetValue(value []CustomExtensionHandlerInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handler_instanceable.go b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instanceable.go new file mode 100644 index 000000000..f36dbbd14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handler_instanceable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerInstanceable +type CustomExtensionHandlerInstanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomExtensionId()(*string) + GetExternalCorrelationId()(*string) + GetOdataType()(*string) + GetStage()(*AccessPackageCustomExtensionStage) + GetStatus()(*AccessPackageCustomExtensionHandlerStatus) + SetCustomExtensionId(value *string)() + SetExternalCorrelationId(value *string)() + SetOdataType(value *string)() + SetStage(value *AccessPackageCustomExtensionStage)() + SetStatus(value *AccessPackageCustomExtensionHandlerStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_extension_handlerable.go b/src/internal/connector/graph/betasdk/models/custom_extension_handlerable.go new file mode 100644 index 000000000..b0ccd2823 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_extension_handlerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomExtensionHandlerable +type CustomExtensionHandlerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomExtension()(CustomAccessPackageWorkflowExtensionable) + GetStage()(*AccessPackageCustomExtensionStage) + SetCustomExtension(value CustomAccessPackageWorkflowExtensionable)() + SetStage(value *AccessPackageCustomExtensionStage)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_question_answer.go b/src/internal/connector/graph/betasdk/models/custom_question_answer.go new file mode 100644 index 000000000..2af70f29a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_question_answer.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomQuestionAnswer +type CustomQuestionAnswer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name of the custom registration question. Read-only. + displayName *string + // The OdataType property + odataType *string + // ID the custom registration question. Read-only. + questionId *string + // Answer to the custom registration question. + value *string +} +// NewCustomQuestionAnswer instantiates a new customQuestionAnswer and sets the default values. +func NewCustomQuestionAnswer()(*CustomQuestionAnswer) { + m := &CustomQuestionAnswer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomQuestionAnswerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomQuestionAnswerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomQuestionAnswer(), 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 *CustomQuestionAnswer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name of the custom registration question. Read-only. +func (m *CustomQuestionAnswer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomQuestionAnswer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["questionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuestionId(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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomQuestionAnswer) GetOdataType()(*string) { + return m.odataType +} +// GetQuestionId gets the questionId property value. ID the custom registration question. Read-only. +func (m *CustomQuestionAnswer) GetQuestionId()(*string) { + return m.questionId +} +// GetValue gets the value property value. Answer to the custom registration question. +func (m *CustomQuestionAnswer) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomQuestionAnswer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("questionId", m.GetQuestionId()) + 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 *CustomQuestionAnswer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name of the custom registration question. Read-only. +func (m *CustomQuestionAnswer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomQuestionAnswer) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuestionId sets the questionId property value. ID the custom registration question. Read-only. +func (m *CustomQuestionAnswer) SetQuestionId(value *string)() { + m.questionId = value +} +// SetValue sets the value property value. Answer to the custom registration question. +func (m *CustomQuestionAnswer) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_response.go new file mode 100644 index 000000000..b9d69f205 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomQuestionAnswerCollectionResponse +type CustomQuestionAnswerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomQuestionAnswerable +} +// NewCustomQuestionAnswerCollectionResponse instantiates a new CustomQuestionAnswerCollectionResponse and sets the default values. +func NewCustomQuestionAnswerCollectionResponse()(*CustomQuestionAnswerCollectionResponse) { + m := &CustomQuestionAnswerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomQuestionAnswerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomQuestionAnswerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomQuestionAnswerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomQuestionAnswerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomQuestionAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomQuestionAnswerable, len(val)) + for i, v := range val { + res[i] = v.(CustomQuestionAnswerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomQuestionAnswerCollectionResponse) GetValue()([]CustomQuestionAnswerable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomQuestionAnswerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomQuestionAnswerCollectionResponse) SetValue(value []CustomQuestionAnswerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_responseable.go new file mode 100644 index 000000000..f30b38514 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_question_answer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomQuestionAnswerCollectionResponseable +type CustomQuestionAnswerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomQuestionAnswerable) + SetValue(value []CustomQuestionAnswerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_question_answerable.go b/src/internal/connector/graph/betasdk/models/custom_question_answerable.go new file mode 100644 index 000000000..6d3283102 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_question_answerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomQuestionAnswerable +type CustomQuestionAnswerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetQuestionId()(*string) + GetValue()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetQuestionId(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition.go new file mode 100644 index 000000000..03ef35020 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition.go @@ -0,0 +1,276 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CustomSecurityAttributeDefinition struct { + Entity + // Values that are predefined for this custom security attribute.This navigation property is not returned by default and must be specified in an $expand query. For example, /directory/customSecurityAttributeDefinitions?$expand=allowedValues. + allowedValues []AllowedValueable + // Name of the attribute set. Case insensitive. + attributeSet *string + // Description of the custom security attribute. Can be up to 128 characters long and include Unicode characters. Can be changed later. + description *string + // Indicates whether multiple values can be assigned to the custom security attribute. Cannot be changed later. If type is set to Boolean, isCollection cannot be set to true. + isCollection *bool + // Indicates whether custom security attribute values will be indexed for searching on objects that are assigned attribute values. Cannot be changed later. + isSearchable *bool + // Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case insensitive. + name *string + // Specifies whether the custom security attribute is active or deactivated. Acceptable values are Available and Deprecated. Can be changed later. + status *string + // Data type for the custom security attribute values. Supported types are Boolean, Integer, and String. Cannot be changed later. + type_escaped *string + // Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but cannot be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly cannot be set to true. + usePreDefinedValuesOnly *bool +} +// NewCustomSecurityAttributeDefinition instantiates a new customSecurityAttributeDefinition and sets the default values. +func NewCustomSecurityAttributeDefinition()(*CustomSecurityAttributeDefinition) { + m := &CustomSecurityAttributeDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomSecurityAttributeDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomSecurityAttributeDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomSecurityAttributeDefinition(), nil +} +// GetAllowedValues gets the allowedValues property value. Values that are predefined for this custom security attribute.This navigation property is not returned by default and must be specified in an $expand query. For example, /directory/customSecurityAttributeDefinitions?$expand=allowedValues. +func (m *CustomSecurityAttributeDefinition) GetAllowedValues()([]AllowedValueable) { + return m.allowedValues +} +// GetAttributeSet gets the attributeSet property value. Name of the attribute set. Case insensitive. +func (m *CustomSecurityAttributeDefinition) GetAttributeSet()(*string) { + return m.attributeSet +} +// GetDescription gets the description property value. Description of the custom security attribute. Can be up to 128 characters long and include Unicode characters. Can be changed later. +func (m *CustomSecurityAttributeDefinition) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomSecurityAttributeDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAllowedValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AllowedValueable, len(val)) + for i, v := range val { + res[i] = v.(AllowedValueable) + } + m.SetAllowedValues(res) + } + return nil + } + res["attributeSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAttributeSet(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCollection(val) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["usePreDefinedValuesOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUsePreDefinedValuesOnly(val) + } + return nil + } + return res +} +// GetIsCollection gets the isCollection property value. Indicates whether multiple values can be assigned to the custom security attribute. Cannot be changed later. If type is set to Boolean, isCollection cannot be set to true. +func (m *CustomSecurityAttributeDefinition) GetIsCollection()(*bool) { + return m.isCollection +} +// GetIsSearchable gets the isSearchable property value. Indicates whether custom security attribute values will be indexed for searching on objects that are assigned attribute values. Cannot be changed later. +func (m *CustomSecurityAttributeDefinition) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetName gets the name property value. Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case insensitive. +func (m *CustomSecurityAttributeDefinition) GetName()(*string) { + return m.name +} +// GetStatus gets the status property value. Specifies whether the custom security attribute is active or deactivated. Acceptable values are Available and Deprecated. Can be changed later. +func (m *CustomSecurityAttributeDefinition) GetStatus()(*string) { + return m.status +} +// GetType gets the type property value. Data type for the custom security attribute values. Supported types are Boolean, Integer, and String. Cannot be changed later. +func (m *CustomSecurityAttributeDefinition) GetType()(*string) { + return m.type_escaped +} +// GetUsePreDefinedValuesOnly gets the usePreDefinedValuesOnly property value. Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but cannot be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly cannot be set to true. +func (m *CustomSecurityAttributeDefinition) GetUsePreDefinedValuesOnly()(*bool) { + return m.usePreDefinedValuesOnly +} +// Serialize serializes information the current object +func (m *CustomSecurityAttributeDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedValues())) + for i, v := range m.GetAllowedValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("allowedValues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("attributeSet", m.GetAttributeSet()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCollection", m.GetIsCollection()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("usePreDefinedValuesOnly", m.GetUsePreDefinedValuesOnly()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedValues sets the allowedValues property value. Values that are predefined for this custom security attribute.This navigation property is not returned by default and must be specified in an $expand query. For example, /directory/customSecurityAttributeDefinitions?$expand=allowedValues. +func (m *CustomSecurityAttributeDefinition) SetAllowedValues(value []AllowedValueable)() { + m.allowedValues = value +} +// SetAttributeSet sets the attributeSet property value. Name of the attribute set. Case insensitive. +func (m *CustomSecurityAttributeDefinition) SetAttributeSet(value *string)() { + m.attributeSet = value +} +// SetDescription sets the description property value. Description of the custom security attribute. Can be up to 128 characters long and include Unicode characters. Can be changed later. +func (m *CustomSecurityAttributeDefinition) SetDescription(value *string)() { + m.description = value +} +// SetIsCollection sets the isCollection property value. Indicates whether multiple values can be assigned to the custom security attribute. Cannot be changed later. If type is set to Boolean, isCollection cannot be set to true. +func (m *CustomSecurityAttributeDefinition) SetIsCollection(value *bool)() { + m.isCollection = value +} +// SetIsSearchable sets the isSearchable property value. Indicates whether custom security attribute values will be indexed for searching on objects that are assigned attribute values. Cannot be changed later. +func (m *CustomSecurityAttributeDefinition) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetName sets the name property value. Name of the custom security attribute. Must be unique within an attribute set. Can be up to 32 characters long and include Unicode characters. Cannot contain spaces or special characters. Cannot be changed later. Case insensitive. +func (m *CustomSecurityAttributeDefinition) SetName(value *string)() { + m.name = value +} +// SetStatus sets the status property value. Specifies whether the custom security attribute is active or deactivated. Acceptable values are Available and Deprecated. Can be changed later. +func (m *CustomSecurityAttributeDefinition) SetStatus(value *string)() { + m.status = value +} +// SetType sets the type property value. Data type for the custom security attribute values. Supported types are Boolean, Integer, and String. Cannot be changed later. +func (m *CustomSecurityAttributeDefinition) SetType(value *string)() { + m.type_escaped = value +} +// SetUsePreDefinedValuesOnly sets the usePreDefinedValuesOnly property value. Indicates whether only predefined values can be assigned to the custom security attribute. If set to false, free-form values are allowed. Can later be changed from true to false, but cannot be changed from false to true. If type is set to Boolean, usePreDefinedValuesOnly cannot be set to true. +func (m *CustomSecurityAttributeDefinition) SetUsePreDefinedValuesOnly(value *bool)() { + m.usePreDefinedValuesOnly = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_response.go new file mode 100644 index 000000000..b5efa4f52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeDefinitionCollectionResponse +type CustomSecurityAttributeDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomSecurityAttributeDefinitionable +} +// NewCustomSecurityAttributeDefinitionCollectionResponse instantiates a new CustomSecurityAttributeDefinitionCollectionResponse and sets the default values. +func NewCustomSecurityAttributeDefinitionCollectionResponse()(*CustomSecurityAttributeDefinitionCollectionResponse) { + m := &CustomSecurityAttributeDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomSecurityAttributeDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomSecurityAttributeDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomSecurityAttributeDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomSecurityAttributeDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSecurityAttributeDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSecurityAttributeDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(CustomSecurityAttributeDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomSecurityAttributeDefinitionCollectionResponse) GetValue()([]CustomSecurityAttributeDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomSecurityAttributeDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomSecurityAttributeDefinitionCollectionResponse) SetValue(value []CustomSecurityAttributeDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_responseable.go new file mode 100644 index 000000000..4332df640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeDefinitionCollectionResponseable +type CustomSecurityAttributeDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomSecurityAttributeDefinitionable) + SetValue(value []CustomSecurityAttributeDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_definitionable.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definitionable.go new file mode 100644 index 000000000..68fef5184 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_definitionable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeDefinitionable +type CustomSecurityAttributeDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedValues()([]AllowedValueable) + GetAttributeSet()(*string) + GetDescription()(*string) + GetIsCollection()(*bool) + GetIsSearchable()(*bool) + GetName()(*string) + GetStatus()(*string) + GetType()(*string) + GetUsePreDefinedValuesOnly()(*bool) + SetAllowedValues(value []AllowedValueable)() + SetAttributeSet(value *string)() + SetDescription(value *string)() + SetIsCollection(value *bool)() + SetIsSearchable(value *bool)() + SetName(value *string)() + SetStatus(value *string)() + SetType(value *string)() + SetUsePreDefinedValuesOnly(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_value.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_value.go new file mode 100644 index 000000000..451ea9f7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_value.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeValue +type CustomSecurityAttributeValue 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 OdataType property + odataType *string +} +// NewCustomSecurityAttributeValue instantiates a new customSecurityAttributeValue and sets the default values. +func NewCustomSecurityAttributeValue()(*CustomSecurityAttributeValue) { + m := &CustomSecurityAttributeValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomSecurityAttributeValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomSecurityAttributeValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomSecurityAttributeValue(), 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 *CustomSecurityAttributeValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomSecurityAttributeValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomSecurityAttributeValue) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *CustomSecurityAttributeValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *CustomSecurityAttributeValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomSecurityAttributeValue) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_security_attribute_valueable.go b/src/internal/connector/graph/betasdk/models/custom_security_attribute_valueable.go new file mode 100644 index 000000000..20c1a4071 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_security_attribute_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSecurityAttributeValueable +type CustomSecurityAttributeValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name.go b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name.go new file mode 100644 index 000000000..27e43aae6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSubjectAlternativeName custom Subject Alternative Name definition +type CustomSubjectAlternativeName struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Custom SAN Name + name *string + // The OdataType property + odataType *string + // Subject Alternative Name Options. + sanType *SubjectAlternativeNameType +} +// NewCustomSubjectAlternativeName instantiates a new customSubjectAlternativeName and sets the default values. +func NewCustomSubjectAlternativeName()(*CustomSubjectAlternativeName) { + m := &CustomSubjectAlternativeName{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomSubjectAlternativeNameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomSubjectAlternativeNameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomSubjectAlternativeName(), 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 *CustomSubjectAlternativeName) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomSubjectAlternativeName) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["sanType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSanType(val.(*SubjectAlternativeNameType)) + } + return nil + } + return res +} +// GetName gets the name property value. Custom SAN Name +func (m *CustomSubjectAlternativeName) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomSubjectAlternativeName) GetOdataType()(*string) { + return m.odataType +} +// GetSanType gets the sanType property value. Subject Alternative Name Options. +func (m *CustomSubjectAlternativeName) GetSanType()(*SubjectAlternativeNameType) { + return m.sanType +} +// Serialize serializes information the current object +func (m *CustomSubjectAlternativeName) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSanType() != nil { + cast := (*m.GetSanType()).String() + err := writer.WriteStringValue("sanType", &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 *CustomSubjectAlternativeName) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Custom SAN Name +func (m *CustomSubjectAlternativeName) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomSubjectAlternativeName) SetOdataType(value *string)() { + m.odataType = value +} +// SetSanType sets the sanType property value. Subject Alternative Name Options. +func (m *CustomSubjectAlternativeName) SetSanType(value *SubjectAlternativeNameType)() { + m.sanType = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_response.go new file mode 100644 index 000000000..7a0b01194 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSubjectAlternativeNameCollectionResponse +type CustomSubjectAlternativeNameCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomSubjectAlternativeNameable +} +// NewCustomSubjectAlternativeNameCollectionResponse instantiates a new CustomSubjectAlternativeNameCollectionResponse and sets the default values. +func NewCustomSubjectAlternativeNameCollectionResponse()(*CustomSubjectAlternativeNameCollectionResponse) { + m := &CustomSubjectAlternativeNameCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomSubjectAlternativeNameCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomSubjectAlternativeNameCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomSubjectAlternativeNameCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomSubjectAlternativeNameCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomSubjectAlternativeNameCollectionResponse) GetValue()([]CustomSubjectAlternativeNameable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomSubjectAlternativeNameCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomSubjectAlternativeNameCollectionResponse) SetValue(value []CustomSubjectAlternativeNameable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_responseable.go new file mode 100644 index 000000000..39c197283 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_name_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSubjectAlternativeNameCollectionResponseable +type CustomSubjectAlternativeNameCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomSubjectAlternativeNameable) + SetValue(value []CustomSubjectAlternativeNameable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_subject_alternative_nameable.go b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_nameable.go new file mode 100644 index 000000000..3a00a1efe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_subject_alternative_nameable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomSubjectAlternativeNameable +type CustomSubjectAlternativeNameable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetSanType()(*SubjectAlternativeNameType) + SetName(value *string)() + SetOdataType(value *string)() + SetSanType(value *SubjectAlternativeNameType)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_time_zone.go b/src/internal/connector/graph/betasdk/models/custom_time_zone.go new file mode 100644 index 000000000..4b592c187 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_time_zone.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomTimeZone +type CustomTimeZone struct { + TimeZoneBase + // The time offset of the time zone from Coordinated Universal Time (UTC). This value is in minutes. Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset. + bias *int32 + // Specifies when the time zone switches from standard time to daylight saving time. + daylightOffset DaylightTimeZoneOffsetable + // Specifies when the time zone switches from daylight saving time to standard time. + standardOffset StandardTimeZoneOffsetable +} +// NewCustomTimeZone instantiates a new CustomTimeZone and sets the default values. +func NewCustomTimeZone()(*CustomTimeZone) { + m := &CustomTimeZone{ + TimeZoneBase: *NewTimeZoneBase(), + } + odataTypeValue := "#microsoft.graph.customTimeZone"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomTimeZoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomTimeZoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomTimeZone(), nil +} +// GetBias gets the bias property value. The time offset of the time zone from Coordinated Universal Time (UTC). This value is in minutes. Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset. +func (m *CustomTimeZone) GetBias()(*int32) { + return m.bias +} +// GetDaylightOffset gets the daylightOffset property value. Specifies when the time zone switches from standard time to daylight saving time. +func (m *CustomTimeZone) GetDaylightOffset()(DaylightTimeZoneOffsetable) { + return m.daylightOffset +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomTimeZone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TimeZoneBase.GetFieldDeserializers() + res["bias"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBias(val) + } + return nil + } + res["daylightOffset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDaylightTimeZoneOffsetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDaylightOffset(val.(DaylightTimeZoneOffsetable)) + } + return nil + } + res["standardOffset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStandardTimeZoneOffsetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStandardOffset(val.(StandardTimeZoneOffsetable)) + } + return nil + } + return res +} +// GetStandardOffset gets the standardOffset property value. Specifies when the time zone switches from daylight saving time to standard time. +func (m *CustomTimeZone) GetStandardOffset()(StandardTimeZoneOffsetable) { + return m.standardOffset +} +// Serialize serializes information the current object +func (m *CustomTimeZone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TimeZoneBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("bias", m.GetBias()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("daylightOffset", m.GetDaylightOffset()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("standardOffset", m.GetStandardOffset()) + if err != nil { + return err + } + } + return nil +} +// SetBias sets the bias property value. The time offset of the time zone from Coordinated Universal Time (UTC). This value is in minutes. Time zones that are ahead of UTC have a positive offset; time zones that are behind UTC have a negative offset. +func (m *CustomTimeZone) SetBias(value *int32)() { + m.bias = value +} +// SetDaylightOffset sets the daylightOffset property value. Specifies when the time zone switches from standard time to daylight saving time. +func (m *CustomTimeZone) SetDaylightOffset(value DaylightTimeZoneOffsetable)() { + m.daylightOffset = value +} +// SetStandardOffset sets the standardOffset property value. Specifies when the time zone switches from daylight saving time to standard time. +func (m *CustomTimeZone) SetStandardOffset(value StandardTimeZoneOffsetable)() { + m.standardOffset = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_time_zoneable.go b/src/internal/connector/graph/betasdk/models/custom_time_zoneable.go new file mode 100644 index 000000000..6c9d0cbfd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_time_zoneable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomTimeZoneable +type CustomTimeZoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TimeZoneBaseable + GetBias()(*int32) + GetDaylightOffset()(DaylightTimeZoneOffsetable) + GetStandardOffset()(StandardTimeZoneOffsetable) + SetBias(value *int32)() + SetDaylightOffset(value DaylightTimeZoneOffsetable)() + SetStandardOffset(value StandardTimeZoneOffsetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_update_time_window.go b/src/internal/connector/graph/betasdk/models/custom_update_time_window.go new file mode 100644 index 000000000..0c5afa39e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_update_time_window.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomUpdateTimeWindow custom update time window +type CustomUpdateTimeWindow 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 endDay property + endDay *DayOfWeek + // End time of the time window + endTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // The OdataType property + odataType *string + // The startDay property + startDay *DayOfWeek + // Start time of the time window + startTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly +} +// NewCustomUpdateTimeWindow instantiates a new customUpdateTimeWindow and sets the default values. +func NewCustomUpdateTimeWindow()(*CustomUpdateTimeWindow) { + m := &CustomUpdateTimeWindow{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateCustomUpdateTimeWindowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomUpdateTimeWindowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomUpdateTimeWindow(), 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 *CustomUpdateTimeWindow) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDay gets the endDay property value. The endDay property +func (m *CustomUpdateTimeWindow) GetEndDay()(*DayOfWeek) { + return m.endDay +} +// GetEndTime gets the endTime property value. End time of the time window +func (m *CustomUpdateTimeWindow) GetEndTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.endTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomUpdateTimeWindow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + m.SetEndDay(val.(*DayOfWeek)) + } + return nil + } + res["endTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndTime(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["startDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + m.SetStartDay(val.(*DayOfWeek)) + } + return nil + } + res["startTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *CustomUpdateTimeWindow) GetOdataType()(*string) { + return m.odataType +} +// GetStartDay gets the startDay property value. The startDay property +func (m *CustomUpdateTimeWindow) GetStartDay()(*DayOfWeek) { + return m.startDay +} +// GetStartTime gets the startTime property value. Start time of the time window +func (m *CustomUpdateTimeWindow) GetStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.startTime +} +// Serialize serializes information the current object +func (m *CustomUpdateTimeWindow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEndDay() != nil { + cast := (*m.GetEndDay()).String() + err := writer.WriteStringValue("endDay", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeOnlyValue("endTime", m.GetEndTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStartDay() != nil { + cast := (*m.GetStartDay()).String() + err := writer.WriteStringValue("startDay", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeOnlyValue("startTime", m.GetStartTime()) + 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 *CustomUpdateTimeWindow) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDay sets the endDay property value. The endDay property +func (m *CustomUpdateTimeWindow) SetEndDay(value *DayOfWeek)() { + m.endDay = value +} +// SetEndTime sets the endTime property value. End time of the time window +func (m *CustomUpdateTimeWindow) SetEndTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.endTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *CustomUpdateTimeWindow) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDay sets the startDay property value. The startDay property +func (m *CustomUpdateTimeWindow) SetStartDay(value *DayOfWeek)() { + m.startDay = value +} +// SetStartTime sets the startTime property value. Start time of the time window +func (m *CustomUpdateTimeWindow) SetStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.startTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_response.go b/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_response.go new file mode 100644 index 000000000..0af487dda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomUpdateTimeWindowCollectionResponse +type CustomUpdateTimeWindowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomUpdateTimeWindowable +} +// NewCustomUpdateTimeWindowCollectionResponse instantiates a new CustomUpdateTimeWindowCollectionResponse and sets the default values. +func NewCustomUpdateTimeWindowCollectionResponse()(*CustomUpdateTimeWindowCollectionResponse) { + m := &CustomUpdateTimeWindowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomUpdateTimeWindowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomUpdateTimeWindowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomUpdateTimeWindowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomUpdateTimeWindowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomUpdateTimeWindowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomUpdateTimeWindowable, len(val)) + for i, v := range val { + res[i] = v.(CustomUpdateTimeWindowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomUpdateTimeWindowCollectionResponse) GetValue()([]CustomUpdateTimeWindowable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomUpdateTimeWindowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomUpdateTimeWindowCollectionResponse) SetValue(value []CustomUpdateTimeWindowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_responseable.go b/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_responseable.go new file mode 100644 index 000000000..eaad7c919 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_update_time_window_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomUpdateTimeWindowCollectionResponseable +type CustomUpdateTimeWindowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomUpdateTimeWindowable) + SetValue(value []CustomUpdateTimeWindowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/custom_update_time_windowable.go b/src/internal/connector/graph/betasdk/models/custom_update_time_windowable.go new file mode 100644 index 000000000..4e8440e94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/custom_update_time_windowable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomUpdateTimeWindowable +type CustomUpdateTimeWindowable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDay()(*DayOfWeek) + GetEndTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetOdataType()(*string) + GetStartDay()(*DayOfWeek) + GetStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + SetEndDay(value *DayOfWeek)() + SetEndTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetOdataType(value *string)() + SetStartDay(value *DayOfWeek)() + SetStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/customer.go b/src/internal/connector/graph/betasdk/models/customer.go new file mode 100644 index 000000000..921065a86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer.go @@ -0,0 +1,642 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Customer +type Customer struct { + Entity + // The address property + address PostalAddressTypeable + // The blocked property + blocked *string + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The displayName property + displayName *string + // The email property + email *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The paymentMethod property + paymentMethod PaymentMethodable + // The paymentMethodId property + paymentMethodId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The paymentTerm property + paymentTerm PaymentTermable + // The paymentTermsId property + paymentTermsId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The phoneNumber property + phoneNumber *string + // The picture property + picture []Pictureable + // The shipmentMethod property + shipmentMethod ShipmentMethodable + // The shipmentMethodId property + shipmentMethodId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The taxAreaDisplayName property + taxAreaDisplayName *string + // The taxAreaId property + taxAreaId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The taxLiable property + taxLiable *bool + // The taxRegistrationNumber property + taxRegistrationNumber *string + // The type property + type_escaped *string + // The website property + website *string +} +// NewCustomer instantiates a new customer and sets the default values. +func NewCustomer()(*Customer) { + m := &Customer{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomer(), nil +} +// GetAddress gets the address property value. The address property +func (m *Customer) GetAddress()(PostalAddressTypeable) { + return m.address +} +// GetBlocked gets the blocked property value. The blocked property +func (m *Customer) GetBlocked()(*string) { + return m.blocked +} +// GetCurrency gets the currency property value. The currency property +func (m *Customer) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *Customer) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *Customer) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Customer) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email property +func (m *Customer) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Customer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["blocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBlocked(val) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["paymentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentMethod(val.(PaymentMethodable)) + } + return nil + } + res["paymentMethodId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentMethodId(val) + } + return nil + } + res["paymentTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentTerm(val.(PaymentTermable)) + } + return nil + } + res["paymentTermsId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentTermsId(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["picture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePictureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pictureable, len(val)) + for i, v := range val { + res[i] = v.(Pictureable) + } + m.SetPicture(res) + } + return nil + } + res["shipmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateShipmentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethod(val.(ShipmentMethodable)) + } + return nil + } + res["shipmentMethodId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethodId(val) + } + return nil + } + res["taxAreaDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxAreaDisplayName(val) + } + return nil + } + res["taxAreaId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxAreaId(val) + } + return nil + } + res["taxLiable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxLiable(val) + } + return nil + } + res["taxRegistrationNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxRegistrationNumber(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["website"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebsite(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Customer) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *Customer) GetNumber()(*string) { + return m.number +} +// GetPaymentMethod gets the paymentMethod property value. The paymentMethod property +func (m *Customer) GetPaymentMethod()(PaymentMethodable) { + return m.paymentMethod +} +// GetPaymentMethodId gets the paymentMethodId property value. The paymentMethodId property +func (m *Customer) GetPaymentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentMethodId +} +// GetPaymentTerm gets the paymentTerm property value. The paymentTerm property +func (m *Customer) GetPaymentTerm()(PaymentTermable) { + return m.paymentTerm +} +// GetPaymentTermsId gets the paymentTermsId property value. The paymentTermsId property +func (m *Customer) GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentTermsId +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *Customer) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPicture gets the picture property value. The picture property +func (m *Customer) GetPicture()([]Pictureable) { + return m.picture +} +// GetShipmentMethod gets the shipmentMethod property value. The shipmentMethod property +func (m *Customer) GetShipmentMethod()(ShipmentMethodable) { + return m.shipmentMethod +} +// GetShipmentMethodId gets the shipmentMethodId property value. The shipmentMethodId property +func (m *Customer) GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.shipmentMethodId +} +// GetTaxAreaDisplayName gets the taxAreaDisplayName property value. The taxAreaDisplayName property +func (m *Customer) GetTaxAreaDisplayName()(*string) { + return m.taxAreaDisplayName +} +// GetTaxAreaId gets the taxAreaId property value. The taxAreaId property +func (m *Customer) GetTaxAreaId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.taxAreaId +} +// GetTaxLiable gets the taxLiable property value. The taxLiable property +func (m *Customer) GetTaxLiable()(*bool) { + return m.taxLiable +} +// GetTaxRegistrationNumber gets the taxRegistrationNumber property value. The taxRegistrationNumber property +func (m *Customer) GetTaxRegistrationNumber()(*string) { + return m.taxRegistrationNumber +} +// GetType gets the type property value. The type property +func (m *Customer) GetType()(*string) { + return m.type_escaped +} +// GetWebsite gets the website property value. The website property +func (m *Customer) GetWebsite()(*string) { + return m.website +} +// Serialize serializes information the current object +func (m *Customer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("blocked", m.GetBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentMethod", m.GetPaymentMethod()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentMethodId", m.GetPaymentMethodId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentTerm", m.GetPaymentTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentTermsId", m.GetPaymentTermsId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + if m.GetPicture() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPicture())) + for i, v := range m.GetPicture() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("picture", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shipmentMethod", m.GetShipmentMethod()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("shipmentMethodId", m.GetShipmentMethodId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxAreaDisplayName", m.GetTaxAreaDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("taxAreaId", m.GetTaxAreaId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("taxLiable", m.GetTaxLiable()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxRegistrationNumber", m.GetTaxRegistrationNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("website", m.GetWebsite()) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The address property +func (m *Customer) SetAddress(value PostalAddressTypeable)() { + m.address = value +} +// SetBlocked sets the blocked property value. The blocked property +func (m *Customer) SetBlocked(value *string)() { + m.blocked = value +} +// SetCurrency sets the currency property value. The currency property +func (m *Customer) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *Customer) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *Customer) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Customer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email property +func (m *Customer) SetEmail(value *string)() { + m.email = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Customer) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *Customer) SetNumber(value *string)() { + m.number = value +} +// SetPaymentMethod sets the paymentMethod property value. The paymentMethod property +func (m *Customer) SetPaymentMethod(value PaymentMethodable)() { + m.paymentMethod = value +} +// SetPaymentMethodId sets the paymentMethodId property value. The paymentMethodId property +func (m *Customer) SetPaymentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentMethodId = value +} +// SetPaymentTerm sets the paymentTerm property value. The paymentTerm property +func (m *Customer) SetPaymentTerm(value PaymentTermable)() { + m.paymentTerm = value +} +// SetPaymentTermsId sets the paymentTermsId property value. The paymentTermsId property +func (m *Customer) SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentTermsId = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *Customer) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPicture sets the picture property value. The picture property +func (m *Customer) SetPicture(value []Pictureable)() { + m.picture = value +} +// SetShipmentMethod sets the shipmentMethod property value. The shipmentMethod property +func (m *Customer) SetShipmentMethod(value ShipmentMethodable)() { + m.shipmentMethod = value +} +// SetShipmentMethodId sets the shipmentMethodId property value. The shipmentMethodId property +func (m *Customer) SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.shipmentMethodId = value +} +// SetTaxAreaDisplayName sets the taxAreaDisplayName property value. The taxAreaDisplayName property +func (m *Customer) SetTaxAreaDisplayName(value *string)() { + m.taxAreaDisplayName = value +} +// SetTaxAreaId sets the taxAreaId property value. The taxAreaId property +func (m *Customer) SetTaxAreaId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.taxAreaId = value +} +// SetTaxLiable sets the taxLiable property value. The taxLiable property +func (m *Customer) SetTaxLiable(value *bool)() { + m.taxLiable = value +} +// SetTaxRegistrationNumber sets the taxRegistrationNumber property value. The taxRegistrationNumber property +func (m *Customer) SetTaxRegistrationNumber(value *string)() { + m.taxRegistrationNumber = value +} +// SetType sets the type property value. The type property +func (m *Customer) SetType(value *string)() { + m.type_escaped = value +} +// SetWebsite sets the website property value. The website property +func (m *Customer) SetWebsite(value *string)() { + m.website = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_collection_response.go b/src/internal/connector/graph/betasdk/models/customer_collection_response.go new file mode 100644 index 000000000..dde9aa686 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerCollectionResponse +type CustomerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Customerable +} +// NewCustomerCollectionResponse instantiates a new CustomerCollectionResponse and sets the default values. +func NewCustomerCollectionResponse()(*CustomerCollectionResponse) { + m := &CustomerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Customerable, len(val)) + for i, v := range val { + res[i] = v.(Customerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomerCollectionResponse) GetValue()([]Customerable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomerCollectionResponse) SetValue(value []Customerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/customer_collection_responseable.go new file mode 100644 index 000000000..4a695981c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerCollectionResponseable +type CustomerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Customerable) + SetValue(value []Customerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment.go b/src/internal/connector/graph/betasdk/models/customer_payment.go new file mode 100644 index 000000000..1e5eef1b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment.go @@ -0,0 +1,426 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPayment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CustomerPayment struct { + Entity + // The amount property + amount *float64 + // The appliesToInvoiceId property + appliesToInvoiceId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The appliesToInvoiceNumber property + appliesToInvoiceNumber *string + // The comment property + comment *string + // The contactId property + contactId *string + // The customer property + customer Customerable + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customerNumber property + customerNumber *string + // The description property + description *string + // The documentNumber property + documentNumber *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The journalDisplayName property + journalDisplayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lineNumber property + lineNumber *int32 + // The postingDate property + postingDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewCustomerPayment instantiates a new customerPayment and sets the default values. +func NewCustomerPayment()(*CustomerPayment) { + m := &CustomerPayment{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomerPaymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerPaymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomerPayment(), nil +} +// GetAmount gets the amount property value. The amount property +func (m *CustomerPayment) GetAmount()(*float64) { + return m.amount +} +// GetAppliesToInvoiceId gets the appliesToInvoiceId property value. The appliesToInvoiceId property +func (m *CustomerPayment) GetAppliesToInvoiceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.appliesToInvoiceId +} +// GetAppliesToInvoiceNumber gets the appliesToInvoiceNumber property value. The appliesToInvoiceNumber property +func (m *CustomerPayment) GetAppliesToInvoiceNumber()(*string) { + return m.appliesToInvoiceNumber +} +// GetComment gets the comment property value. The comment property +func (m *CustomerPayment) GetComment()(*string) { + return m.comment +} +// GetContactId gets the contactId property value. The contactId property +func (m *CustomerPayment) GetContactId()(*string) { + return m.contactId +} +// GetCustomer gets the customer property value. The customer property +func (m *CustomerPayment) GetCustomer()(Customerable) { + return m.customer +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *CustomerPayment) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *CustomerPayment) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetDescription gets the description property value. The description property +func (m *CustomerPayment) GetDescription()(*string) { + return m.description +} +// GetDocumentNumber gets the documentNumber property value. The documentNumber property +func (m *CustomerPayment) GetDocumentNumber()(*string) { + return m.documentNumber +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *CustomerPayment) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomerPayment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmount(val) + } + return nil + } + res["appliesToInvoiceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAppliesToInvoiceId(val) + } + return nil + } + res["appliesToInvoiceNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppliesToInvoiceNumber(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["contactId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactId(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(Customerable)) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["documentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentNumber(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["journalDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJournalDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lineNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLineNumber(val) + } + return nil + } + res["postingDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetPostingDate(val) + } + return nil + } + return res +} +// GetJournalDisplayName gets the journalDisplayName property value. The journalDisplayName property +func (m *CustomerPayment) GetJournalDisplayName()(*string) { + return m.journalDisplayName +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CustomerPayment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLineNumber gets the lineNumber property value. The lineNumber property +func (m *CustomerPayment) GetLineNumber()(*int32) { + return m.lineNumber +} +// GetPostingDate gets the postingDate property value. The postingDate property +func (m *CustomerPayment) GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.postingDate +} +// Serialize serializes information the current object +func (m *CustomerPayment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat64Value("amount", m.GetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("appliesToInvoiceId", m.GetAppliesToInvoiceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appliesToInvoiceNumber", m.GetAppliesToInvoiceNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contactId", m.GetContactId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("documentNumber", m.GetDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("journalDisplayName", m.GetJournalDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("lineNumber", m.GetLineNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("postingDate", m.GetPostingDate()) + if err != nil { + return err + } + } + return nil +} +// SetAmount sets the amount property value. The amount property +func (m *CustomerPayment) SetAmount(value *float64)() { + m.amount = value +} +// SetAppliesToInvoiceId sets the appliesToInvoiceId property value. The appliesToInvoiceId property +func (m *CustomerPayment) SetAppliesToInvoiceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.appliesToInvoiceId = value +} +// SetAppliesToInvoiceNumber sets the appliesToInvoiceNumber property value. The appliesToInvoiceNumber property +func (m *CustomerPayment) SetAppliesToInvoiceNumber(value *string)() { + m.appliesToInvoiceNumber = value +} +// SetComment sets the comment property value. The comment property +func (m *CustomerPayment) SetComment(value *string)() { + m.comment = value +} +// SetContactId sets the contactId property value. The contactId property +func (m *CustomerPayment) SetContactId(value *string)() { + m.contactId = value +} +// SetCustomer sets the customer property value. The customer property +func (m *CustomerPayment) SetCustomer(value Customerable)() { + m.customer = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *CustomerPayment) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *CustomerPayment) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetDescription sets the description property value. The description property +func (m *CustomerPayment) SetDescription(value *string)() { + m.description = value +} +// SetDocumentNumber sets the documentNumber property value. The documentNumber property +func (m *CustomerPayment) SetDocumentNumber(value *string)() { + m.documentNumber = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *CustomerPayment) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetJournalDisplayName sets the journalDisplayName property value. The journalDisplayName property +func (m *CustomerPayment) SetJournalDisplayName(value *string)() { + m.journalDisplayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CustomerPayment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLineNumber sets the lineNumber property value. The lineNumber property +func (m *CustomerPayment) SetLineNumber(value *int32)() { + m.lineNumber = value +} +// SetPostingDate sets the postingDate property value. The postingDate property +func (m *CustomerPayment) SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.postingDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_collection_response.go b/src/internal/connector/graph/betasdk/models/customer_payment_collection_response.go new file mode 100644 index 000000000..7162f2a16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentCollectionResponse +type CustomerPaymentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomerPaymentable +} +// NewCustomerPaymentCollectionResponse instantiates a new CustomerPaymentCollectionResponse and sets the default values. +func NewCustomerPaymentCollectionResponse()(*CustomerPaymentCollectionResponse) { + m := &CustomerPaymentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomerPaymentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerPaymentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomerPaymentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomerPaymentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerPaymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomerPaymentable, len(val)) + for i, v := range val { + res[i] = v.(CustomerPaymentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomerPaymentCollectionResponse) GetValue()([]CustomerPaymentable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomerPaymentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomerPaymentCollectionResponse) SetValue(value []CustomerPaymentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/customer_payment_collection_responseable.go new file mode 100644 index 000000000..b77074735 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentCollectionResponseable +type CustomerPaymentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomerPaymentable) + SetValue(value []CustomerPaymentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_journal.go b/src/internal/connector/graph/betasdk/models/customer_payment_journal.go new file mode 100644 index 000000000..b849eb749 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_journal.go @@ -0,0 +1,226 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentJournal provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CustomerPaymentJournal struct { + Entity + // The account property + account Accountable + // The balancingAccountId property + balancingAccountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The balancingAccountNumber property + balancingAccountNumber *string + // The code property + code *string + // The customerPayments property + customerPayments []CustomerPaymentable + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCustomerPaymentJournal instantiates a new customerPaymentJournal and sets the default values. +func NewCustomerPaymentJournal()(*CustomerPaymentJournal) { + m := &CustomerPaymentJournal{ + Entity: *NewEntity(), + } + return m +} +// CreateCustomerPaymentJournalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerPaymentJournalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomerPaymentJournal(), nil +} +// GetAccount gets the account property value. The account property +func (m *CustomerPaymentJournal) GetAccount()(Accountable) { + return m.account +} +// GetBalancingAccountId gets the balancingAccountId property value. The balancingAccountId property +func (m *CustomerPaymentJournal) GetBalancingAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.balancingAccountId +} +// GetBalancingAccountNumber gets the balancingAccountNumber property value. The balancingAccountNumber property +func (m *CustomerPaymentJournal) GetBalancingAccountNumber()(*string) { + return m.balancingAccountNumber +} +// GetCode gets the code property value. The code property +func (m *CustomerPaymentJournal) GetCode()(*string) { + return m.code +} +// GetCustomerPayments gets the customerPayments property value. The customerPayments property +func (m *CustomerPaymentJournal) GetCustomerPayments()([]CustomerPaymentable) { + return m.customerPayments +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *CustomerPaymentJournal) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomerPaymentJournal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["balancingAccountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBalancingAccountId(val) + } + return nil + } + res["balancingAccountNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBalancingAccountNumber(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["customerPayments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerPaymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomerPaymentable, len(val)) + for i, v := range val { + res[i] = v.(CustomerPaymentable) + } + m.SetCustomerPayments(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CustomerPaymentJournal) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *CustomerPaymentJournal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("balancingAccountId", m.GetBalancingAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("balancingAccountNumber", m.GetBalancingAccountNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + if m.GetCustomerPayments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomerPayments())) + for i, v := range m.GetCustomerPayments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customerPayments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *CustomerPaymentJournal) SetAccount(value Accountable)() { + m.account = value +} +// SetBalancingAccountId sets the balancingAccountId property value. The balancingAccountId property +func (m *CustomerPaymentJournal) SetBalancingAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.balancingAccountId = value +} +// SetBalancingAccountNumber sets the balancingAccountNumber property value. The balancingAccountNumber property +func (m *CustomerPaymentJournal) SetBalancingAccountNumber(value *string)() { + m.balancingAccountNumber = value +} +// SetCode sets the code property value. The code property +func (m *CustomerPaymentJournal) SetCode(value *string)() { + m.code = value +} +// SetCustomerPayments sets the customerPayments property value. The customerPayments property +func (m *CustomerPaymentJournal) SetCustomerPayments(value []CustomerPaymentable)() { + m.customerPayments = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *CustomerPaymentJournal) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *CustomerPaymentJournal) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_response.go b/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_response.go new file mode 100644 index 000000000..deced32cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentJournalCollectionResponse +type CustomerPaymentJournalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []CustomerPaymentJournalable +} +// NewCustomerPaymentJournalCollectionResponse instantiates a new CustomerPaymentJournalCollectionResponse and sets the default values. +func NewCustomerPaymentJournalCollectionResponse()(*CustomerPaymentJournalCollectionResponse) { + m := &CustomerPaymentJournalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomerPaymentJournalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomerPaymentJournalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomerPaymentJournalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomerPaymentJournalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomerPaymentJournalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomerPaymentJournalable, len(val)) + for i, v := range val { + res[i] = v.(CustomerPaymentJournalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomerPaymentJournalCollectionResponse) GetValue()([]CustomerPaymentJournalable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomerPaymentJournalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomerPaymentJournalCollectionResponse) SetValue(value []CustomerPaymentJournalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_responseable.go new file mode 100644 index 000000000..cce4f17db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_journal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentJournalCollectionResponseable +type CustomerPaymentJournalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomerPaymentJournalable) + SetValue(value []CustomerPaymentJournalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/customer_payment_journalable.go b/src/internal/connector/graph/betasdk/models/customer_payment_journalable.go new file mode 100644 index 000000000..d11b0fb3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_payment_journalable.go @@ -0,0 +1,27 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentJournalable +type CustomerPaymentJournalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetBalancingAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBalancingAccountNumber()(*string) + GetCode()(*string) + GetCustomerPayments()([]CustomerPaymentable) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccount(value Accountable)() + SetBalancingAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBalancingAccountNumber(value *string)() + SetCode(value *string)() + SetCustomerPayments(value []CustomerPaymentable)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/customer_paymentable.go b/src/internal/connector/graph/betasdk/models/customer_paymentable.go new file mode 100644 index 000000000..8fe633392 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customer_paymentable.go @@ -0,0 +1,43 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomerPaymentable +type CustomerPaymentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAmount()(*float64) + GetAppliesToInvoiceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAppliesToInvoiceNumber()(*string) + GetComment()(*string) + GetContactId()(*string) + GetCustomer()(Customerable) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomerNumber()(*string) + GetDescription()(*string) + GetDocumentNumber()(*string) + GetExternalDocumentNumber()(*string) + GetJournalDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLineNumber()(*int32) + GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAmount(value *float64)() + SetAppliesToInvoiceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAppliesToInvoiceNumber(value *string)() + SetComment(value *string)() + SetContactId(value *string)() + SetCustomer(value Customerable)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomerNumber(value *string)() + SetDescription(value *string)() + SetDocumentNumber(value *string)() + SetExternalDocumentNumber(value *string)() + SetJournalDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLineNumber(value *int32)() + SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/customerable.go b/src/internal/connector/graph/betasdk/models/customerable.go new file mode 100644 index 000000000..c1e9a6b6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/customerable.go @@ -0,0 +1,59 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Customerable +type Customerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PostalAddressTypeable) + GetBlocked()(*string) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetDisplayName()(*string) + GetEmail()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetPaymentMethod()(PaymentMethodable) + GetPaymentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetPicture()([]Pictureable) + GetShipmentMethod()(ShipmentMethodable) + GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetTaxAreaDisplayName()(*string) + GetTaxAreaId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetTaxLiable()(*bool) + GetTaxRegistrationNumber()(*string) + GetType()(*string) + GetWebsite()(*string) + SetAddress(value PostalAddressTypeable)() + SetBlocked(value *string)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetPaymentMethod(value PaymentMethodable)() + SetPaymentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetPicture(value []Pictureable)() + SetShipmentMethod(value ShipmentMethodable)() + SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetTaxAreaDisplayName(value *string)() + SetTaxAreaId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetTaxLiable(value *bool)() + SetTaxRegistrationNumber(value *string)() + SetType(value *string)() + SetWebsite(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_classification_service.go b/src/internal/connector/graph/betasdk/models/data_classification_service.go new file mode 100644 index 000000000..39b3570a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_classification_service.go @@ -0,0 +1,340 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataClassificationService +type DataClassificationService struct { + Entity + // The classifyFileJobs property + classifyFileJobs []JobResponseBaseable + // The classifyTextJobs property + classifyTextJobs []JobResponseBaseable + // The evaluateDlpPoliciesJobs property + evaluateDlpPoliciesJobs []JobResponseBaseable + // The evaluateLabelJobs property + evaluateLabelJobs []JobResponseBaseable + // The exactMatchDataStores property + exactMatchDataStores []ExactMatchDataStoreable + // The exactMatchUploadAgents property + exactMatchUploadAgents []ExactMatchUploadAgentable + // The jobs property + jobs []JobResponseBaseable + // The sensitiveTypes property + sensitiveTypes []SensitiveTypeable + // The sensitivityLabels property + sensitivityLabels []SensitivityLabelable +} +// NewDataClassificationService instantiates a new DataClassificationService and sets the default values. +func NewDataClassificationService()(*DataClassificationService) { + m := &DataClassificationService{ + Entity: *NewEntity(), + } + return m +} +// CreateDataClassificationServiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataClassificationServiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataClassificationService(), nil +} +// GetClassifyFileJobs gets the classifyFileJobs property value. The classifyFileJobs property +func (m *DataClassificationService) GetClassifyFileJobs()([]JobResponseBaseable) { + return m.classifyFileJobs +} +// GetClassifyTextJobs gets the classifyTextJobs property value. The classifyTextJobs property +func (m *DataClassificationService) GetClassifyTextJobs()([]JobResponseBaseable) { + return m.classifyTextJobs +} +// GetEvaluateDlpPoliciesJobs gets the evaluateDlpPoliciesJobs property value. The evaluateDlpPoliciesJobs property +func (m *DataClassificationService) GetEvaluateDlpPoliciesJobs()([]JobResponseBaseable) { + return m.evaluateDlpPoliciesJobs +} +// GetEvaluateLabelJobs gets the evaluateLabelJobs property value. The evaluateLabelJobs property +func (m *DataClassificationService) GetEvaluateLabelJobs()([]JobResponseBaseable) { + return m.evaluateLabelJobs +} +// GetExactMatchDataStores gets the exactMatchDataStores property value. The exactMatchDataStores property +func (m *DataClassificationService) GetExactMatchDataStores()([]ExactMatchDataStoreable) { + return m.exactMatchDataStores +} +// GetExactMatchUploadAgents gets the exactMatchUploadAgents property value. The exactMatchUploadAgents property +func (m *DataClassificationService) GetExactMatchUploadAgents()([]ExactMatchUploadAgentable) { + return m.exactMatchUploadAgents +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataClassificationService) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["classifyFileJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetClassifyFileJobs(res) + } + return nil + } + res["classifyTextJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetClassifyTextJobs(res) + } + return nil + } + res["evaluateDlpPoliciesJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetEvaluateDlpPoliciesJobs(res) + } + return nil + } + res["evaluateLabelJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetEvaluateLabelJobs(res) + } + return nil + } + res["exactMatchDataStores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchDataStoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchDataStoreable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchDataStoreable) + } + m.SetExactMatchDataStores(res) + } + return nil + } + res["exactMatchUploadAgents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchUploadAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchUploadAgentable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchUploadAgentable) + } + m.SetExactMatchUploadAgents(res) + } + return nil + } + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetJobs(res) + } + return nil + } + res["sensitiveTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveTypeable) + } + m.SetSensitiveTypes(res) + } + return nil + } + res["sensitivityLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetSensitivityLabels(res) + } + return nil + } + return res +} +// GetJobs gets the jobs property value. The jobs property +func (m *DataClassificationService) GetJobs()([]JobResponseBaseable) { + return m.jobs +} +// GetSensitiveTypes gets the sensitiveTypes property value. The sensitiveTypes property +func (m *DataClassificationService) GetSensitiveTypes()([]SensitiveTypeable) { + return m.sensitiveTypes +} +// GetSensitivityLabels gets the sensitivityLabels property value. The sensitivityLabels property +func (m *DataClassificationService) GetSensitivityLabels()([]SensitivityLabelable) { + return m.sensitivityLabels +} +// Serialize serializes information the current object +func (m *DataClassificationService) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClassifyFileJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassifyFileJobs())) + for i, v := range m.GetClassifyFileJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("classifyFileJobs", cast) + if err != nil { + return err + } + } + if m.GetClassifyTextJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassifyTextJobs())) + for i, v := range m.GetClassifyTextJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("classifyTextJobs", cast) + if err != nil { + return err + } + } + if m.GetEvaluateDlpPoliciesJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvaluateDlpPoliciesJobs())) + for i, v := range m.GetEvaluateDlpPoliciesJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("evaluateDlpPoliciesJobs", cast) + if err != nil { + return err + } + } + if m.GetEvaluateLabelJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvaluateLabelJobs())) + for i, v := range m.GetEvaluateLabelJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("evaluateLabelJobs", cast) + if err != nil { + return err + } + } + if m.GetExactMatchDataStores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExactMatchDataStores())) + for i, v := range m.GetExactMatchDataStores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exactMatchDataStores", cast) + if err != nil { + return err + } + } + if m.GetExactMatchUploadAgents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExactMatchUploadAgents())) + for i, v := range m.GetExactMatchUploadAgents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exactMatchUploadAgents", cast) + if err != nil { + return err + } + } + if m.GetJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobs())) + for i, v := range m.GetJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("jobs", cast) + if err != nil { + return err + } + } + if m.GetSensitiveTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSensitiveTypes())) + for i, v := range m.GetSensitiveTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sensitiveTypes", cast) + if err != nil { + return err + } + } + if m.GetSensitivityLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSensitivityLabels())) + for i, v := range m.GetSensitivityLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sensitivityLabels", cast) + if err != nil { + return err + } + } + return nil +} +// SetClassifyFileJobs sets the classifyFileJobs property value. The classifyFileJobs property +func (m *DataClassificationService) SetClassifyFileJobs(value []JobResponseBaseable)() { + m.classifyFileJobs = value +} +// SetClassifyTextJobs sets the classifyTextJobs property value. The classifyTextJobs property +func (m *DataClassificationService) SetClassifyTextJobs(value []JobResponseBaseable)() { + m.classifyTextJobs = value +} +// SetEvaluateDlpPoliciesJobs sets the evaluateDlpPoliciesJobs property value. The evaluateDlpPoliciesJobs property +func (m *DataClassificationService) SetEvaluateDlpPoliciesJobs(value []JobResponseBaseable)() { + m.evaluateDlpPoliciesJobs = value +} +// SetEvaluateLabelJobs sets the evaluateLabelJobs property value. The evaluateLabelJobs property +func (m *DataClassificationService) SetEvaluateLabelJobs(value []JobResponseBaseable)() { + m.evaluateLabelJobs = value +} +// SetExactMatchDataStores sets the exactMatchDataStores property value. The exactMatchDataStores property +func (m *DataClassificationService) SetExactMatchDataStores(value []ExactMatchDataStoreable)() { + m.exactMatchDataStores = value +} +// SetExactMatchUploadAgents sets the exactMatchUploadAgents property value. The exactMatchUploadAgents property +func (m *DataClassificationService) SetExactMatchUploadAgents(value []ExactMatchUploadAgentable)() { + m.exactMatchUploadAgents = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *DataClassificationService) SetJobs(value []JobResponseBaseable)() { + m.jobs = value +} +// SetSensitiveTypes sets the sensitiveTypes property value. The sensitiveTypes property +func (m *DataClassificationService) SetSensitiveTypes(value []SensitiveTypeable)() { + m.sensitiveTypes = value +} +// SetSensitivityLabels sets the sensitivityLabels property value. The sensitivityLabels property +func (m *DataClassificationService) SetSensitivityLabels(value []SensitivityLabelable)() { + m.sensitivityLabels = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_classification_serviceable.go b/src/internal/connector/graph/betasdk/models/data_classification_serviceable.go new file mode 100644 index 000000000..7d0c18dc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_classification_serviceable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataClassificationServiceable +type DataClassificationServiceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassifyFileJobs()([]JobResponseBaseable) + GetClassifyTextJobs()([]JobResponseBaseable) + GetEvaluateDlpPoliciesJobs()([]JobResponseBaseable) + GetEvaluateLabelJobs()([]JobResponseBaseable) + GetExactMatchDataStores()([]ExactMatchDataStoreable) + GetExactMatchUploadAgents()([]ExactMatchUploadAgentable) + GetJobs()([]JobResponseBaseable) + GetSensitiveTypes()([]SensitiveTypeable) + GetSensitivityLabels()([]SensitivityLabelable) + SetClassifyFileJobs(value []JobResponseBaseable)() + SetClassifyTextJobs(value []JobResponseBaseable)() + SetEvaluateDlpPoliciesJobs(value []JobResponseBaseable)() + SetEvaluateLabelJobs(value []JobResponseBaseable)() + SetExactMatchDataStores(value []ExactMatchDataStoreable)() + SetExactMatchUploadAgents(value []ExactMatchUploadAgentable)() + SetJobs(value []JobResponseBaseable)() + SetSensitiveTypes(value []SensitiveTypeable)() + SetSensitivityLabels(value []SensitivityLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy.go b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy.go new file mode 100644 index 000000000..7b1beb24d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataLossPreventionPolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataLossPreventionPolicy struct { + Entity + // The name property + name *string +} +// NewDataLossPreventionPolicy instantiates a new dataLossPreventionPolicy and sets the default values. +func NewDataLossPreventionPolicy()(*DataLossPreventionPolicy) { + m := &DataLossPreventionPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDataLossPreventionPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataLossPreventionPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataLossPreventionPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataLossPreventionPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *DataLossPreventionPolicy) GetName()(*string) { + return m.name +} +// Serialize serializes information the current object +func (m *DataLossPreventionPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. The name property +func (m *DataLossPreventionPolicy) SetName(value *string)() { + m.name = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_response.go new file mode 100644 index 000000000..7eeb76902 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataLossPreventionPolicyCollectionResponse +type DataLossPreventionPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DataLossPreventionPolicyable +} +// NewDataLossPreventionPolicyCollectionResponse instantiates a new DataLossPreventionPolicyCollectionResponse and sets the default values. +func NewDataLossPreventionPolicyCollectionResponse()(*DataLossPreventionPolicyCollectionResponse) { + m := &DataLossPreventionPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDataLossPreventionPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataLossPreventionPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataLossPreventionPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataLossPreventionPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataLossPreventionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataLossPreventionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DataLossPreventionPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DataLossPreventionPolicyCollectionResponse) GetValue()([]DataLossPreventionPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DataLossPreventionPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DataLossPreventionPolicyCollectionResponse) SetValue(value []DataLossPreventionPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_responseable.go new file mode 100644 index 000000000..b334dc00b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataLossPreventionPolicyCollectionResponseable +type DataLossPreventionPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DataLossPreventionPolicyable) + SetValue(value []DataLossPreventionPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_loss_prevention_policyable.go b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policyable.go new file mode 100644 index 000000000..91ca5b783 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_loss_prevention_policyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataLossPreventionPolicyable +type DataLossPreventionPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + SetName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_policy_operation.go b/src/internal/connector/graph/betasdk/models/data_policy_operation.go new file mode 100644 index 000000000..34e874913 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_policy_operation.go @@ -0,0 +1,192 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataPolicyOperation +type DataPolicyOperation struct { + Entity + // Represents when the request for this data policy operation was completed, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Null until the operation completes. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the progress of an operation. + progress *float64 + // Possible values are: notStarted, running, complete, failed, unknownFutureValue. + status *DataPolicyOperationStatus + // The URL location to where data is being exported for export requests. + storageLocation *string + // Represents when the request for this data operation was submitted, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + submittedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id for the user on whom the operation is performed. + userId *string +} +// NewDataPolicyOperation instantiates a new DataPolicyOperation and sets the default values. +func NewDataPolicyOperation()(*DataPolicyOperation) { + m := &DataPolicyOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateDataPolicyOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataPolicyOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataPolicyOperation(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. Represents when the request for this data policy operation was completed, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Null until the operation completes. +func (m *DataPolicyOperation) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataPolicyOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["progress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetProgress(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataPolicyOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DataPolicyOperationStatus)) + } + return nil + } + res["storageLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageLocation(val) + } + return nil + } + res["submittedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmittedDateTime(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetProgress gets the progress property value. Specifies the progress of an operation. +func (m *DataPolicyOperation) GetProgress()(*float64) { + return m.progress +} +// GetStatus gets the status property value. Possible values are: notStarted, running, complete, failed, unknownFutureValue. +func (m *DataPolicyOperation) GetStatus()(*DataPolicyOperationStatus) { + return m.status +} +// GetStorageLocation gets the storageLocation property value. The URL location to where data is being exported for export requests. +func (m *DataPolicyOperation) GetStorageLocation()(*string) { + return m.storageLocation +} +// GetSubmittedDateTime gets the submittedDateTime property value. Represents when the request for this data operation was submitted, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *DataPolicyOperation) GetSubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.submittedDateTime +} +// GetUserId gets the userId property value. The id for the user on whom the operation is performed. +func (m *DataPolicyOperation) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *DataPolicyOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("progress", m.GetProgress()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("storageLocation", m.GetStorageLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("submittedDateTime", m.GetSubmittedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. Represents when the request for this data policy operation was completed, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Null until the operation completes. +func (m *DataPolicyOperation) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetProgress sets the progress property value. Specifies the progress of an operation. +func (m *DataPolicyOperation) SetProgress(value *float64)() { + m.progress = value +} +// SetStatus sets the status property value. Possible values are: notStarted, running, complete, failed, unknownFutureValue. +func (m *DataPolicyOperation) SetStatus(value *DataPolicyOperationStatus)() { + m.status = value +} +// SetStorageLocation sets the storageLocation property value. The URL location to where data is being exported for export requests. +func (m *DataPolicyOperation) SetStorageLocation(value *string)() { + m.storageLocation = value +} +// SetSubmittedDateTime sets the submittedDateTime property value. Represents when the request for this data operation was submitted, in UTC time, using the ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *DataPolicyOperation) SetSubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.submittedDateTime = value +} +// SetUserId sets the userId property value. The id for the user on whom the operation is performed. +func (m *DataPolicyOperation) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_response.go new file mode 100644 index 000000000..f33b6dad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataPolicyOperationCollectionResponse +type DataPolicyOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DataPolicyOperationable +} +// NewDataPolicyOperationCollectionResponse instantiates a new DataPolicyOperationCollectionResponse and sets the default values. +func NewDataPolicyOperationCollectionResponse()(*DataPolicyOperationCollectionResponse) { + m := &DataPolicyOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDataPolicyOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataPolicyOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataPolicyOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataPolicyOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataPolicyOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataPolicyOperationable, len(val)) + for i, v := range val { + res[i] = v.(DataPolicyOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DataPolicyOperationCollectionResponse) GetValue()([]DataPolicyOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DataPolicyOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DataPolicyOperationCollectionResponse) SetValue(value []DataPolicyOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_responseable.go new file mode 100644 index 000000000..8ab2ac27d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_policy_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataPolicyOperationCollectionResponseable +type DataPolicyOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DataPolicyOperationable) + SetValue(value []DataPolicyOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_policy_operation_status.go b/src/internal/connector/graph/betasdk/models/data_policy_operation_status.go new file mode 100644 index 000000000..e8542d9f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_policy_operation_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataPolicyOperationStatus int + +const ( + NOTSTARTED_DATAPOLICYOPERATIONSTATUS DataPolicyOperationStatus = iota + RUNNING_DATAPOLICYOPERATIONSTATUS + COMPLETE_DATAPOLICYOPERATIONSTATUS + FAILED_DATAPOLICYOPERATIONSTATUS + UNKNOWNFUTUREVALUE_DATAPOLICYOPERATIONSTATUS +) + +func (i DataPolicyOperationStatus) String() string { + return []string{"notStarted", "running", "complete", "failed", "unknownFutureValue"}[i] +} +func ParseDataPolicyOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_DATAPOLICYOPERATIONSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_DATAPOLICYOPERATIONSTATUS + case "running": + result = RUNNING_DATAPOLICYOPERATIONSTATUS + case "complete": + result = COMPLETE_DATAPOLICYOPERATIONSTATUS + case "failed": + result = FAILED_DATAPOLICYOPERATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATAPOLICYOPERATIONSTATUS + default: + return 0, errors.New("Unknown DataPolicyOperationStatus value: " + v) + } + return &result, nil +} +func SerializeDataPolicyOperationStatus(values []DataPolicyOperationStatus) []string { + 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/data_policy_operationable.go b/src/internal/connector/graph/betasdk/models/data_policy_operationable.go new file mode 100644 index 000000000..7e2094357 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_policy_operationable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataPolicyOperationable +type DataPolicyOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProgress()(*float64) + GetStatus()(*DataPolicyOperationStatus) + GetStorageLocation()(*string) + GetSubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUserId()(*string) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProgress(value *float64)() + SetStatus(value *DataPolicyOperationStatus)() + SetStorageLocation(value *string)() + SetSubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboarding.go b/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboarding.go new file mode 100644 index 000000000..a826a8d85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboarding.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataProcessorServiceForWindowsFeaturesOnboarding a configuration entity for MEM features that utilize Data Processor Service for Windows (DPSW) data. +type DataProcessorServiceForWindowsFeaturesOnboarding 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 whether the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When TRUE, the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When FALSE, the tenant has not enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. Default value is FALSE. + areDataProcessorServiceForWindowsFeaturesEnabled *bool + // Indicates whether the tenant has required Windows license. When TRUE, the tenant has the required Windows license. When FALSE, the tenant does not have the required Windows license. Default value is FALSE. + hasValidWindowsLicense *bool + // The OdataType property + odataType *string +} +// NewDataProcessorServiceForWindowsFeaturesOnboarding instantiates a new dataProcessorServiceForWindowsFeaturesOnboarding and sets the default values. +func NewDataProcessorServiceForWindowsFeaturesOnboarding()(*DataProcessorServiceForWindowsFeaturesOnboarding) { + m := &DataProcessorServiceForWindowsFeaturesOnboarding{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDataProcessorServiceForWindowsFeaturesOnboardingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataProcessorServiceForWindowsFeaturesOnboardingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataProcessorServiceForWindowsFeaturesOnboarding(), 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 *DataProcessorServiceForWindowsFeaturesOnboarding) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAreDataProcessorServiceForWindowsFeaturesEnabled gets the areDataProcessorServiceForWindowsFeaturesEnabled property value. Indicates whether the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When TRUE, the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When FALSE, the tenant has not enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. Default value is FALSE. +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) GetAreDataProcessorServiceForWindowsFeaturesEnabled()(*bool) { + return m.areDataProcessorServiceForWindowsFeaturesEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["areDataProcessorServiceForWindowsFeaturesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAreDataProcessorServiceForWindowsFeaturesEnabled(val) + } + return nil + } + res["hasValidWindowsLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasValidWindowsLicense(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 + } + return res +} +// GetHasValidWindowsLicense gets the hasValidWindowsLicense property value. Indicates whether the tenant has required Windows license. When TRUE, the tenant has the required Windows license. When FALSE, the tenant does not have the required Windows license. Default value is FALSE. +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) GetHasValidWindowsLicense()(*bool) { + return m.hasValidWindowsLicense +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("areDataProcessorServiceForWindowsFeaturesEnabled", m.GetAreDataProcessorServiceForWindowsFeaturesEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasValidWindowsLicense", m.GetHasValidWindowsLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DataProcessorServiceForWindowsFeaturesOnboarding) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAreDataProcessorServiceForWindowsFeaturesEnabled sets the areDataProcessorServiceForWindowsFeaturesEnabled property value. Indicates whether the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When TRUE, the tenant has enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. When FALSE, the tenant has not enabled MEM features utilizing Data Processor Service for Windows (DPSW) data. Default value is FALSE. +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) SetAreDataProcessorServiceForWindowsFeaturesEnabled(value *bool)() { + m.areDataProcessorServiceForWindowsFeaturesEnabled = value +} +// SetHasValidWindowsLicense sets the hasValidWindowsLicense property value. Indicates whether the tenant has required Windows license. When TRUE, the tenant has the required Windows license. When FALSE, the tenant does not have the required Windows license. Default value is FALSE. +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) SetHasValidWindowsLicense(value *bool)() { + m.hasValidWindowsLicense = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DataProcessorServiceForWindowsFeaturesOnboarding) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboardingable.go b/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboardingable.go new file mode 100644 index 000000000..88027efc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_processor_service_for_windows_features_onboardingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataProcessorServiceForWindowsFeaturesOnboardingable +type DataProcessorServiceForWindowsFeaturesOnboardingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAreDataProcessorServiceForWindowsFeaturesEnabled()(*bool) + GetHasValidWindowsLicense()(*bool) + GetOdataType()(*string) + SetAreDataProcessorServiceForWindowsFeaturesEnabled(value *bool)() + SetHasValidWindowsLicense(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_sharing_consent.go b/src/internal/connector/graph/betasdk/models/data_sharing_consent.go new file mode 100644 index 000000000..2553c3706 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_sharing_consent.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSharingConsent data sharing consent information. +type DataSharingConsent struct { + Entity + // The time consent was granted for this account + grantDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The granted state for the data sharing consent + granted *bool + // The Upn of the user that granted consent for this account + grantedByUpn *string + // The UserId of the user that granted consent for this account + grantedByUserId *string + // The display name of the service work flow + serviceDisplayName *string + // The TermsUrl for the data sharing consent + termsUrl *string +} +// NewDataSharingConsent instantiates a new dataSharingConsent and sets the default values. +func NewDataSharingConsent()(*DataSharingConsent) { + m := &DataSharingConsent{ + Entity: *NewEntity(), + } + return m +} +// CreateDataSharingConsentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSharingConsentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataSharingConsent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSharingConsent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["grantDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGrantDateTime(val) + } + return nil + } + res["granted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGranted(val) + } + return nil + } + res["grantedByUpn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrantedByUpn(val) + } + return nil + } + res["grantedByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrantedByUserId(val) + } + return nil + } + res["serviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceDisplayName(val) + } + return nil + } + res["termsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsUrl(val) + } + return nil + } + return res +} +// GetGrantDateTime gets the grantDateTime property value. The time consent was granted for this account +func (m *DataSharingConsent) GetGrantDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.grantDateTime +} +// GetGranted gets the granted property value. The granted state for the data sharing consent +func (m *DataSharingConsent) GetGranted()(*bool) { + return m.granted +} +// GetGrantedByUpn gets the grantedByUpn property value. The Upn of the user that granted consent for this account +func (m *DataSharingConsent) GetGrantedByUpn()(*string) { + return m.grantedByUpn +} +// GetGrantedByUserId gets the grantedByUserId property value. The UserId of the user that granted consent for this account +func (m *DataSharingConsent) GetGrantedByUserId()(*string) { + return m.grantedByUserId +} +// GetServiceDisplayName gets the serviceDisplayName property value. The display name of the service work flow +func (m *DataSharingConsent) GetServiceDisplayName()(*string) { + return m.serviceDisplayName +} +// GetTermsUrl gets the termsUrl property value. The TermsUrl for the data sharing consent +func (m *DataSharingConsent) GetTermsUrl()(*string) { + return m.termsUrl +} +// Serialize serializes information the current object +func (m *DataSharingConsent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("grantDateTime", m.GetGrantDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("granted", m.GetGranted()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("grantedByUpn", m.GetGrantedByUpn()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("grantedByUserId", m.GetGrantedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceDisplayName", m.GetServiceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("termsUrl", m.GetTermsUrl()) + if err != nil { + return err + } + } + return nil +} +// SetGrantDateTime sets the grantDateTime property value. The time consent was granted for this account +func (m *DataSharingConsent) SetGrantDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.grantDateTime = value +} +// SetGranted sets the granted property value. The granted state for the data sharing consent +func (m *DataSharingConsent) SetGranted(value *bool)() { + m.granted = value +} +// SetGrantedByUpn sets the grantedByUpn property value. The Upn of the user that granted consent for this account +func (m *DataSharingConsent) SetGrantedByUpn(value *string)() { + m.grantedByUpn = value +} +// SetGrantedByUserId sets the grantedByUserId property value. The UserId of the user that granted consent for this account +func (m *DataSharingConsent) SetGrantedByUserId(value *string)() { + m.grantedByUserId = value +} +// SetServiceDisplayName sets the serviceDisplayName property value. The display name of the service work flow +func (m *DataSharingConsent) SetServiceDisplayName(value *string)() { + m.serviceDisplayName = value +} +// SetTermsUrl sets the termsUrl property value. The TermsUrl for the data sharing consent +func (m *DataSharingConsent) SetTermsUrl(value *string)() { + m.termsUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_response.go b/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_response.go new file mode 100644 index 000000000..e49af6e66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSharingConsentCollectionResponse +type DataSharingConsentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DataSharingConsentable +} +// NewDataSharingConsentCollectionResponse instantiates a new DataSharingConsentCollectionResponse and sets the default values. +func NewDataSharingConsentCollectionResponse()(*DataSharingConsentCollectionResponse) { + m := &DataSharingConsentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDataSharingConsentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSharingConsentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataSharingConsentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSharingConsentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSharingConsentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSharingConsentable, len(val)) + for i, v := range val { + res[i] = v.(DataSharingConsentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DataSharingConsentCollectionResponse) GetValue()([]DataSharingConsentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DataSharingConsentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DataSharingConsentCollectionResponse) SetValue(value []DataSharingConsentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_responseable.go new file mode 100644 index 000000000..d1b461010 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_sharing_consent_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSharingConsentCollectionResponseable +type DataSharingConsentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DataSharingConsentable) + SetValue(value []DataSharingConsentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_sharing_consentable.go b/src/internal/connector/graph/betasdk/models/data_sharing_consentable.go new file mode 100644 index 000000000..d77f99718 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_sharing_consentable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSharingConsentable +type DataSharingConsentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGrantDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGranted()(*bool) + GetGrantedByUpn()(*string) + GetGrantedByUserId()(*string) + GetServiceDisplayName()(*string) + GetTermsUrl()(*string) + SetGrantDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGranted(value *bool)() + SetGrantedByUpn(value *string)() + SetGrantedByUserId(value *string)() + SetServiceDisplayName(value *string)() + SetTermsUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_subject.go b/src/internal/connector/graph/betasdk/models/data_subject.go new file mode 100644 index 000000000..fdf38295b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_subject.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSubject +type DataSubject struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Email of the data subject. + email *string + // First name of the data subject. + firstName *string + // Last Name of the data subject. + lastName *string + // The OdataType property + odataType *string + // The country/region of residency. The residency information is uesed only for internal reporting but not for the content search. + residency *string +} +// NewDataSubject instantiates a new dataSubject and sets the default values. +func NewDataSubject()(*DataSubject) { + m := &DataSubject{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDataSubjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSubjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataSubject(), 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 *DataSubject) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEmail gets the email property value. Email of the data subject. +func (m *DataSubject) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSubject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["firstName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstName(val) + } + return nil + } + res["lastName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastName(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["residency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResidency(val) + } + return nil + } + return res +} +// GetFirstName gets the firstName property value. First name of the data subject. +func (m *DataSubject) GetFirstName()(*string) { + return m.firstName +} +// GetLastName gets the lastName property value. Last Name of the data subject. +func (m *DataSubject) GetLastName()(*string) { + return m.lastName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DataSubject) GetOdataType()(*string) { + return m.odataType +} +// GetResidency gets the residency property value. The country/region of residency. The residency information is uesed only for internal reporting but not for the content search. +func (m *DataSubject) GetResidency()(*string) { + return m.residency +} +// Serialize serializes information the current object +func (m *DataSubject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("firstName", m.GetFirstName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lastName", m.GetLastName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("residency", m.GetResidency()) + 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 *DataSubject) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEmail sets the email property value. Email of the data subject. +func (m *DataSubject) SetEmail(value *string)() { + m.email = value +} +// SetFirstName sets the firstName property value. First name of the data subject. +func (m *DataSubject) SetFirstName(value *string)() { + m.firstName = value +} +// SetLastName sets the lastName property value. Last Name of the data subject. +func (m *DataSubject) SetLastName(value *string)() { + m.lastName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DataSubject) SetOdataType(value *string)() { + m.odataType = value +} +// SetResidency sets the residency property value. The country/region of residency. The residency information is uesed only for internal reporting but not for the content search. +func (m *DataSubject) SetResidency(value *string)() { + m.residency = value +} diff --git a/src/internal/connector/graph/betasdk/models/data_subject_type.go b/src/internal/connector/graph/betasdk/models/data_subject_type.go new file mode 100644 index 000000000..46315e660 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_subject_type.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSubjectType int + +const ( + CUSTOMER_DATASUBJECTTYPE DataSubjectType = iota + CURRENTEMPLOYEE_DATASUBJECTTYPE + FORMEREMPLOYEE_DATASUBJECTTYPE + PROSPECTIVEEMPLOYEE_DATASUBJECTTYPE + STUDENT_DATASUBJECTTYPE + TEACHER_DATASUBJECTTYPE + FACULTY_DATASUBJECTTYPE + OTHER_DATASUBJECTTYPE + UNKNOWNFUTUREVALUE_DATASUBJECTTYPE +) + +func (i DataSubjectType) String() string { + return []string{"customer", "currentEmployee", "formerEmployee", "prospectiveEmployee", "student", "teacher", "faculty", "other", "unknownFutureValue"}[i] +} +func ParseDataSubjectType(v string) (interface{}, error) { + result := CUSTOMER_DATASUBJECTTYPE + switch v { + case "customer": + result = CUSTOMER_DATASUBJECTTYPE + case "currentEmployee": + result = CURRENTEMPLOYEE_DATASUBJECTTYPE + case "formerEmployee": + result = FORMEREMPLOYEE_DATASUBJECTTYPE + case "prospectiveEmployee": + result = PROSPECTIVEEMPLOYEE_DATASUBJECTTYPE + case "student": + result = STUDENT_DATASUBJECTTYPE + case "teacher": + result = TEACHER_DATASUBJECTTYPE + case "faculty": + result = FACULTY_DATASUBJECTTYPE + case "other": + result = OTHER_DATASUBJECTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASUBJECTTYPE + default: + return 0, errors.New("Unknown DataSubjectType value: " + v) + } + return &result, nil +} +func SerializeDataSubjectType(values []DataSubjectType) []string { + 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/data_subjectable.go b/src/internal/connector/graph/betasdk/models/data_subjectable.go new file mode 100644 index 000000000..406d20f97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_subjectable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DataSubjectable +type DataSubjectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetFirstName()(*string) + GetLastName()(*string) + GetOdataType()(*string) + GetResidency()(*string) + SetEmail(value *string)() + SetFirstName(value *string)() + SetLastName(value *string)() + SetOdataType(value *string)() + SetResidency(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/data_type.go b/src/internal/connector/graph/betasdk/models/data_type.go new file mode 100644 index 000000000..ce949aaaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/data_type.go @@ -0,0 +1,88 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type DataType int + +const ( + // None data type. + NONE_DATATYPE DataType = iota + // Boolean data type. + BOOLEAN_DATATYPE + // Int64 data type. + INT64_DATATYPE + // Double data type. + DOUBLE_DATATYPE + // String data type. + STRING_DATATYPE + // DateTime data type. + DATETIME_DATATYPE + // Version data type. + VERSION_DATATYPE + // Base64 data type. + BASE64_DATATYPE + // Xml data type. + XML_DATATYPE + // Boolean array data type. + BOOLEANARRAY_DATATYPE + // Int64 array data type. + INT64ARRAY_DATATYPE + // Double array data type. + DOUBLEARRAY_DATATYPE + // String array data type. + STRINGARRAY_DATATYPE + // DateTime array data type. + DATETIMEARRAY_DATATYPE + // Version array data type. + VERSIONARRAY_DATATYPE +) + +func (i DataType) String() string { + return []string{"none", "boolean", "int64", "double", "string", "dateTime", "version", "base64", "xml", "booleanArray", "int64Array", "doubleArray", "stringArray", "dateTimeArray", "versionArray"}[i] +} +func ParseDataType(v string) (interface{}, error) { + result := NONE_DATATYPE + switch v { + case "none": + result = NONE_DATATYPE + case "boolean": + result = BOOLEAN_DATATYPE + case "int64": + result = INT64_DATATYPE + case "double": + result = DOUBLE_DATATYPE + case "string": + result = STRING_DATATYPE + case "dateTime": + result = DATETIME_DATATYPE + case "version": + result = VERSION_DATATYPE + case "base64": + result = BASE64_DATATYPE + case "xml": + result = XML_DATATYPE + case "booleanArray": + result = BOOLEANARRAY_DATATYPE + case "int64Array": + result = INT64ARRAY_DATATYPE + case "doubleArray": + result = DOUBLEARRAY_DATATYPE + case "stringArray": + result = STRINGARRAY_DATATYPE + case "dateTimeArray": + result = DATETIMEARRAY_DATATYPE + case "versionArray": + result = VERSIONARRAY_DATATYPE + default: + return 0, errors.New("Unknown DataType value: " + v) + } + return &result, nil +} +func SerializeDataType(values []DataType) []string { + 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/date_time_column.go b/src/internal/connector/graph/betasdk/models/date_time_column.go new file mode 100644 index 000000000..0b949679c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/date_time_column.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DateTimeColumn +type DateTimeColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // How the value should be presented in the UX. Must be one of default, friendly, or standard. See below for more details. If unspecified, treated as default. + displayAs *string + // Indicates whether the value should be presented as a date only or a date and time. Must be one of dateOnly or dateTime + format *string + // The OdataType property + odataType *string +} +// NewDateTimeColumn instantiates a new dateTimeColumn and sets the default values. +func NewDateTimeColumn()(*DateTimeColumn) { + m := &DateTimeColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDateTimeColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDateTimeColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDateTimeColumn(), 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 *DateTimeColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayAs gets the displayAs property value. How the value should be presented in the UX. Must be one of default, friendly, or standard. See below for more details. If unspecified, treated as default. +func (m *DateTimeColumn) GetDisplayAs()(*string) { + return m.displayAs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DateTimeColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayAs(val) + } + return nil + } + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormat(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 + } + return res +} +// GetFormat gets the format property value. Indicates whether the value should be presented as a date only or a date and time. Must be one of dateOnly or dateTime +func (m *DateTimeColumn) GetFormat()(*string) { + return m.format +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DateTimeColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DateTimeColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayAs", m.GetDisplayAs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("format", m.GetFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DateTimeColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayAs sets the displayAs property value. How the value should be presented in the UX. Must be one of default, friendly, or standard. See below for more details. If unspecified, treated as default. +func (m *DateTimeColumn) SetDisplayAs(value *string)() { + m.displayAs = value +} +// SetFormat sets the format property value. Indicates whether the value should be presented as a date only or a date and time. Must be one of dateOnly or dateTime +func (m *DateTimeColumn) SetFormat(value *string)() { + m.format = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DateTimeColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/date_time_columnable.go b/src/internal/connector/graph/betasdk/models/date_time_columnable.go new file mode 100644 index 000000000..a4f613dfd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/date_time_columnable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DateTimeColumnable +type DateTimeColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayAs()(*string) + GetFormat()(*string) + GetOdataType()(*string) + SetDisplayAs(value *string)() + SetFormat(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/date_time_time_zone.go b/src/internal/connector/graph/betasdk/models/date_time_time_zone.go new file mode 100644 index 000000000..43d7f0c3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/date_time_time_zone.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DateTimeTimeZone +type DateTimeTimeZone struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A single point of time in a combined date and time representation ({date}T{time}). For example, '2019-04-16T09:00:00'. + dateTime *string + // The OdataType property + odataType *string + // Represents a time zone, for example, 'Pacific Standard Time'. See below for possible values. + timeZone *string +} +// NewDateTimeTimeZone instantiates a new dateTimeTimeZone and sets the default values. +func NewDateTimeTimeZone()(*DateTimeTimeZone) { + m := &DateTimeTimeZone{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDateTimeTimeZoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDateTimeTimeZoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDateTimeTimeZone(), 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 *DateTimeTimeZone) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDateTime gets the dateTime property value. A single point of time in a combined date and time representation ({date}T{time}). For example, '2019-04-16T09:00:00'. +func (m *DateTimeTimeZone) GetDateTime()(*string) { + return m.dateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DateTimeTimeZone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDateTime(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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DateTimeTimeZone) GetOdataType()(*string) { + return m.odataType +} +// GetTimeZone gets the timeZone property value. Represents a time zone, for example, 'Pacific Standard Time'. See below for possible values. +func (m *DateTimeTimeZone) GetTimeZone()(*string) { + return m.timeZone +} +// Serialize serializes information the current object +func (m *DateTimeTimeZone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dateTime", m.GetDateTime()) + 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 *DateTimeTimeZone) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDateTime sets the dateTime property value. A single point of time in a combined date and time representation ({date}T{time}). For example, '2019-04-16T09:00:00'. +func (m *DateTimeTimeZone) SetDateTime(value *string)() { + m.dateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DateTimeTimeZone) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeZone sets the timeZone property value. Represents a time zone, for example, 'Pacific Standard Time'. See below for possible values. +func (m *DateTimeTimeZone) SetTimeZone(value *string)() { + m.timeZone = value +} diff --git a/src/internal/connector/graph/betasdk/models/date_time_time_zoneable.go b/src/internal/connector/graph/betasdk/models/date_time_time_zoneable.go new file mode 100644 index 000000000..99e7bbb6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/date_time_time_zoneable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DateTimeTimeZoneable +type DateTimeTimeZoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDateTime()(*string) + GetOdataType()(*string) + GetTimeZone()(*string) + SetDateTime(value *string)() + SetOdataType(value *string)() + SetTimeZone(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/day_of_week.go b/src/internal/connector/graph/betasdk/models/day_of_week.go new file mode 100644 index 000000000..0c5d9204e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/day_of_week.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DayOfWeek int + +const ( + SUNDAY_DAYOFWEEK DayOfWeek = iota + MONDAY_DAYOFWEEK + TUESDAY_DAYOFWEEK + WEDNESDAY_DAYOFWEEK + THURSDAY_DAYOFWEEK + FRIDAY_DAYOFWEEK + SATURDAY_DAYOFWEEK +) + +func (i DayOfWeek) String() string { + return []string{"sunday", "monday", "tuesday", "wednesday", "thursday", "friday", "saturday"}[i] +} +func ParseDayOfWeek(v string) (interface{}, error) { + result := SUNDAY_DAYOFWEEK + switch v { + case "sunday": + result = SUNDAY_DAYOFWEEK + case "monday": + result = MONDAY_DAYOFWEEK + case "tuesday": + result = TUESDAY_DAYOFWEEK + case "wednesday": + result = WEDNESDAY_DAYOFWEEK + case "thursday": + result = THURSDAY_DAYOFWEEK + case "friday": + result = FRIDAY_DAYOFWEEK + case "saturday": + result = SATURDAY_DAYOFWEEK + default: + return 0, errors.New("Unknown DayOfWeek value: " + v) + } + return &result, nil +} +func SerializeDayOfWeek(values []DayOfWeek) []string { + 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/daylight_time_zone_offset.go b/src/internal/connector/graph/betasdk/models/daylight_time_zone_offset.go new file mode 100644 index 000000000..6ce23a955 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/daylight_time_zone_offset.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DaylightTimeZoneOffset +type DaylightTimeZoneOffset struct { + StandardTimeZoneOffset + // The time offset from Coordinated Universal Time (UTC) for daylight saving time. This value is in minutes. + daylightBias *int32 +} +// NewDaylightTimeZoneOffset instantiates a new DaylightTimeZoneOffset and sets the default values. +func NewDaylightTimeZoneOffset()(*DaylightTimeZoneOffset) { + m := &DaylightTimeZoneOffset{ + StandardTimeZoneOffset: *NewStandardTimeZoneOffset(), + } + odataTypeValue := "#microsoft.graph.daylightTimeZoneOffset"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDaylightTimeZoneOffsetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDaylightTimeZoneOffsetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDaylightTimeZoneOffset(), nil +} +// GetDaylightBias gets the daylightBias property value. The time offset from Coordinated Universal Time (UTC) for daylight saving time. This value is in minutes. +func (m *DaylightTimeZoneOffset) GetDaylightBias()(*int32) { + return m.daylightBias +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DaylightTimeZoneOffset) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StandardTimeZoneOffset.GetFieldDeserializers() + res["daylightBias"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDaylightBias(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DaylightTimeZoneOffset) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StandardTimeZoneOffset.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("daylightBias", m.GetDaylightBias()) + if err != nil { + return err + } + } + return nil +} +// SetDaylightBias sets the daylightBias property value. The time offset from Coordinated Universal Time (UTC) for daylight saving time. This value is in minutes. +func (m *DaylightTimeZoneOffset) SetDaylightBias(value *int32)() { + m.daylightBias = value +} diff --git a/src/internal/connector/graph/betasdk/models/daylight_time_zone_offsetable.go b/src/internal/connector/graph/betasdk/models/daylight_time_zone_offsetable.go new file mode 100644 index 000000000..da4131638 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/daylight_time_zone_offsetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DaylightTimeZoneOffsetable +type DaylightTimeZoneOffsetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + StandardTimeZoneOffsetable + GetDaylightBias()(*int32) + SetDaylightBias(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership.go b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership.go new file mode 100644 index 000000000..962493015 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DecisionItemPrincipalResourceMembership +type DecisionItemPrincipalResourceMembership 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 membershipType property + membershipType *DecisionItemPrincipalResourceMembershipType + // The OdataType property + odataType *string +} +// NewDecisionItemPrincipalResourceMembership instantiates a new decisionItemPrincipalResourceMembership and sets the default values. +func NewDecisionItemPrincipalResourceMembership()(*DecisionItemPrincipalResourceMembership) { + m := &DecisionItemPrincipalResourceMembership{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDecisionItemPrincipalResourceMembershipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDecisionItemPrincipalResourceMembershipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDecisionItemPrincipalResourceMembership(), 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 *DecisionItemPrincipalResourceMembership) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DecisionItemPrincipalResourceMembership) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["membershipType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDecisionItemPrincipalResourceMembershipType) + if err != nil { + return err + } + if val != nil { + m.SetMembershipType(val.(*DecisionItemPrincipalResourceMembershipType)) + } + 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 + } + return res +} +// GetMembershipType gets the membershipType property value. The membershipType property +func (m *DecisionItemPrincipalResourceMembership) GetMembershipType()(*DecisionItemPrincipalResourceMembershipType) { + return m.membershipType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DecisionItemPrincipalResourceMembership) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DecisionItemPrincipalResourceMembership) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMembershipType() != nil { + cast := (*m.GetMembershipType()).String() + err := writer.WriteStringValue("membershipType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DecisionItemPrincipalResourceMembership) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMembershipType sets the membershipType property value. The membershipType property +func (m *DecisionItemPrincipalResourceMembership) SetMembershipType(value *DecisionItemPrincipalResourceMembershipType)() { + m.membershipType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DecisionItemPrincipalResourceMembership) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership_type.go b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership_type.go new file mode 100644 index 000000000..a96a6a322 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membership_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DecisionItemPrincipalResourceMembershipType int + +const ( + DIRECT_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE DecisionItemPrincipalResourceMembershipType = iota + INDIRECT_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE + UNKNOWNFUTUREVALUE_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE +) + +func (i DecisionItemPrincipalResourceMembershipType) String() string { + return []string{"direct", "indirect", "unknownFutureValue"}[i] +} +func ParseDecisionItemPrincipalResourceMembershipType(v string) (interface{}, error) { + result := DIRECT_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE + switch v { + case "direct": + result = DIRECT_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE + case "indirect": + result = INDIRECT_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DECISIONITEMPRINCIPALRESOURCEMEMBERSHIPTYPE + default: + return 0, errors.New("Unknown DecisionItemPrincipalResourceMembershipType value: " + v) + } + return &result, nil +} +func SerializeDecisionItemPrincipalResourceMembershipType(values []DecisionItemPrincipalResourceMembershipType) []string { + 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/decision_item_principal_resource_membershipable.go b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membershipable.go new file mode 100644 index 000000000..880de86af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/decision_item_principal_resource_membershipable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DecisionItemPrincipalResourceMembershipable +type DecisionItemPrincipalResourceMembershipable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMembershipType()(*DecisionItemPrincipalResourceMembershipType) + GetOdataType()(*string) + SetMembershipType(value *DecisionItemPrincipalResourceMembershipType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_column_value.go b/src/internal/connector/graph/betasdk/models/default_column_value.go new file mode 100644 index 000000000..565df3dea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_column_value.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultColumnValue +type DefaultColumnValue 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 formula used to compute the default value for this column. + formula *string + // The OdataType property + odataType *string + // The direct value to use as the default value for this column. + value *string +} +// NewDefaultColumnValue instantiates a new defaultColumnValue and sets the default values. +func NewDefaultColumnValue()(*DefaultColumnValue) { + m := &DefaultColumnValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDefaultColumnValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultColumnValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultColumnValue(), 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 *DefaultColumnValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultColumnValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["formula"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormula(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 +} +// GetFormula gets the formula property value. The formula used to compute the default value for this column. +func (m *DefaultColumnValue) GetFormula()(*string) { + return m.formula +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DefaultColumnValue) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The direct value to use as the default value for this column. +func (m *DefaultColumnValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DefaultColumnValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("formula", m.GetFormula()) + 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 *DefaultColumnValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFormula sets the formula property value. The formula used to compute the default value for this column. +func (m *DefaultColumnValue) SetFormula(value *string)() { + m.formula = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DefaultColumnValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The direct value to use as the default value for this column. +func (m *DefaultColumnValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_column_valueable.go b/src/internal/connector/graph/betasdk/models/default_column_valueable.go new file mode 100644 index 000000000..6e205adde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_column_valueable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultColumnValueable +type DefaultColumnValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFormula()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetFormula(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_device_compliance_policy.go b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy.go new file mode 100644 index 000000000..417547720 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultDeviceCompliancePolicy +type DefaultDeviceCompliancePolicy struct { + DeviceCompliancePolicy +} +// NewDefaultDeviceCompliancePolicy instantiates a new DefaultDeviceCompliancePolicy and sets the default values. +func NewDefaultDeviceCompliancePolicy()(*DefaultDeviceCompliancePolicy) { + m := &DefaultDeviceCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.defaultDeviceCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDefaultDeviceCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultDeviceCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultDeviceCompliancePolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultDeviceCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DefaultDeviceCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_response.go new file mode 100644 index 000000000..5e8dfc9c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultDeviceCompliancePolicyCollectionResponse +type DefaultDeviceCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DefaultDeviceCompliancePolicyable +} +// NewDefaultDeviceCompliancePolicyCollectionResponse instantiates a new DefaultDeviceCompliancePolicyCollectionResponse and sets the default values. +func NewDefaultDeviceCompliancePolicyCollectionResponse()(*DefaultDeviceCompliancePolicyCollectionResponse) { + m := &DefaultDeviceCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDefaultDeviceCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultDeviceCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultDeviceCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultDeviceCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDefaultDeviceCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DefaultDeviceCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(DefaultDeviceCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DefaultDeviceCompliancePolicyCollectionResponse) GetValue()([]DefaultDeviceCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DefaultDeviceCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DefaultDeviceCompliancePolicyCollectionResponse) SetValue(value []DefaultDeviceCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..2db97fc1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_device_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultDeviceCompliancePolicyCollectionResponseable +type DefaultDeviceCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DefaultDeviceCompliancePolicyable) + SetValue(value []DefaultDeviceCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_device_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/default_device_compliance_policyable.go new file mode 100644 index 000000000..7d2dc9a80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_device_compliance_policyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultDeviceCompliancePolicyable +type DefaultDeviceCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/default_managed_app_protection.go b/src/internal/connector/graph/betasdk/models/default_managed_app_protection.go new file mode 100644 index 000000000..7d42567a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_managed_app_protection.go @@ -0,0 +1,1489 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultManagedAppProtection +type DefaultManagedAppProtection struct { + ManagedAppProtection + // Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. (Android only) + allowedAndroidDeviceManufacturers *string + // List of device models allowed, as a string, for the managed app to work. (Android Only) + allowedAndroidDeviceModels []string + // Semicolon seperated list of device models allowed, as a string, for the managed app to work. (iOS Only) + allowedIosDeviceModels *string + // An admin initiated action to be applied on a managed app. + appActionIfAndroidDeviceManufacturerNotAllowed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidDeviceModelNotAllowed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidSafetyNetAppsVerificationFailed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfAndroidSafetyNetDeviceAttestationFailed *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfDeviceLockNotSet *ManagedAppRemediationAction + // If the device does not have a passcode of high complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. + appActionIfDevicePasscodeComplexityLessThanHigh *ManagedAppRemediationAction + // If the device does not have a passcode of low complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. + appActionIfDevicePasscodeComplexityLessThanLow *ManagedAppRemediationAction + // If the device does not have a passcode of medium complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. + appActionIfDevicePasscodeComplexityLessThanMedium *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfIosDeviceModelNotAllowed *ManagedAppRemediationAction + // Represents the level to which app data is encrypted for managed apps + appDataEncryptionType *ManagedAppDataEncryptionType + // List of apps to which the policy is deployed. + apps []ManagedMobileAppable + // Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. (Android Only) + biometricAuthenticationBlocked *bool + // Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. + blockAfterCompanyPortalUpdateDeferralInDays *int32 + // Whether the app should connect to the configured VPN on launch (Android only). + connectToVpnOnLaunch *bool + // Friendly name of the preferred custom browser to open weblink on Android. (Android only) + customBrowserDisplayName *string + // Unique identifier of a custom browser to open weblink on Android. (Android only) + customBrowserPackageId *string + // A custom browser protocol to open weblink on iOS. (iOS only) + customBrowserProtocol *string + // Friendly name of a custom dialer app to click-to-open a phone number on Android. + customDialerAppDisplayName *string + // PackageId of a custom dialer app to click-to-open a phone number on Android. + customDialerAppPackageId *string + // Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. + customDialerAppProtocol *string + // A set of string key and string value pairs to be sent to the affected users, unalterned by this service + customSettings []KeyValuePairable + // Count of apps to which the current policy is deployed. + deployedAppCount *int32 + // Navigation property to deployment summary of the configuration. + deploymentSummary ManagedAppPolicyDeploymentSummaryable + // Defines if any kind of lock must be required on device. (android only) + deviceLockRequired *bool + // When this setting is enabled, app level encryption is disabled if device level encryption is enabled. (Android only) + disableAppEncryptionIfDeviceEncryptionIsEnabled *bool + // Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. (iOS Only) + disableProtectionOfManagedOutboundOpenInData *bool + // Indicates whether managed-app data should be encrypted. (Android only) + encryptAppData *bool + // Android App packages in this list will be exempt from the policy and will be able to receive data from managed apps. (Android only) + exemptedAppPackages []KeyValuePairable + // iOS Apps in this list will be exempt from the policy and will be able to receive data from managed apps. (iOS Only) + exemptedAppProtocols []KeyValuePairable + // Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. (iOS Only) + faceIdBlocked *bool + // Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. (iOS Only) + filterOpenInToOnlyManagedApps *bool + // Indicate to the client to enable both biometrics and fingerprints for the app. + fingerprintAndBiometricEnabled *bool + // Minimum version of the Company portal that must be installed on the device or app access will be blocked + minimumRequiredCompanyPortalVersion *string + // Define the oldest required Android security patch level a user can have to gain secure access to the app. (Android only) + minimumRequiredPatchVersion *string + // Versions less than the specified version will block the managed app from accessing company data. (iOS Only) + minimumRequiredSdkVersion *string + // Minimum version of the Company portal that must be installed on the device or the user will receive a warning + minimumWarningCompanyPortalVersion *string + // Define the oldest recommended Android security patch level a user can have for secure access to the app. (Android only) + minimumWarningPatchVersion *string + // Versions less than the specified version will result in warning message on the managed app from accessing company data. (iOS only) + minimumWarningSdkVersion *string + // Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped + minimumWipeCompanyPortalVersion *string + // Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. (Android only) + minimumWipePatchVersion *string + // Versions less than the specified version will block the managed app from accessing company data. + minimumWipeSdkVersion *string + // Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. (iOS Only) + protectInboundDataFromUnknownSources *bool + // Require user to apply Class 3 Biometrics on their Android device. + requireClass3Biometrics *bool + // An admin enforced Android SafetyNet Device Attestation requirement on a managed app. + requiredAndroidSafetyNetAppsVerificationType *AndroidManagedAppSafetyNetAppsVerificationType + // An admin enforced Android SafetyNet Device Attestation requirement on a managed app. + requiredAndroidSafetyNetDeviceAttestationType *AndroidManagedAppSafetyNetDeviceAttestationType + // An admin enforced Android SafetyNet evaluation type requirement on a managed app. + requiredAndroidSafetyNetEvaluationType *AndroidManagedAppSafetyNetEvaluationType + // A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. + requirePinAfterBiometricChange *bool + // Indicates whether screen capture is blocked. (Android only) + screenCaptureBlocked *bool + // Defines if third party keyboards are allowed while accessing a managed app. (iOS Only) + thirdPartyKeyboardsBlocked *bool + // Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning + warnAfterCompanyPortalUpdateDeferralInDays *int32 + // Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped + wipeAfterCompanyPortalUpdateDeferralInDays *int32 +} +// NewDefaultManagedAppProtection instantiates a new DefaultManagedAppProtection and sets the default values. +func NewDefaultManagedAppProtection()(*DefaultManagedAppProtection) { + m := &DefaultManagedAppProtection{ + ManagedAppProtection: *NewManagedAppProtection(), + } + odataTypeValue := "#microsoft.graph.defaultManagedAppProtection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDefaultManagedAppProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultManagedAppProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultManagedAppProtection(), nil +} +// GetAllowedAndroidDeviceManufacturers gets the allowedAndroidDeviceManufacturers property value. Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. (Android only) +func (m *DefaultManagedAppProtection) GetAllowedAndroidDeviceManufacturers()(*string) { + return m.allowedAndroidDeviceManufacturers +} +// GetAllowedAndroidDeviceModels gets the allowedAndroidDeviceModels property value. List of device models allowed, as a string, for the managed app to work. (Android Only) +func (m *DefaultManagedAppProtection) GetAllowedAndroidDeviceModels()([]string) { + return m.allowedAndroidDeviceModels +} +// GetAllowedIosDeviceModels gets the allowedIosDeviceModels property value. Semicolon seperated list of device models allowed, as a string, for the managed app to work. (iOS Only) +func (m *DefaultManagedAppProtection) GetAllowedIosDeviceModels()(*string) { + return m.allowedIosDeviceModels +} +// GetAppActionIfAndroidDeviceManufacturerNotAllowed gets the appActionIfAndroidDeviceManufacturerNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfAndroidDeviceManufacturerNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidDeviceManufacturerNotAllowed +} +// GetAppActionIfAndroidDeviceModelNotAllowed gets the appActionIfAndroidDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfAndroidDeviceModelNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidDeviceModelNotAllowed +} +// GetAppActionIfAndroidSafetyNetAppsVerificationFailed gets the appActionIfAndroidSafetyNetAppsVerificationFailed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfAndroidSafetyNetAppsVerificationFailed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidSafetyNetAppsVerificationFailed +} +// GetAppActionIfAndroidSafetyNetDeviceAttestationFailed gets the appActionIfAndroidSafetyNetDeviceAttestationFailed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()(*ManagedAppRemediationAction) { + return m.appActionIfAndroidSafetyNetDeviceAttestationFailed +} +// GetAppActionIfDeviceLockNotSet gets the appActionIfDeviceLockNotSet property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfDeviceLockNotSet()(*ManagedAppRemediationAction) { + return m.appActionIfDeviceLockNotSet +} +// GetAppActionIfDevicePasscodeComplexityLessThanHigh gets the appActionIfDevicePasscodeComplexityLessThanHigh property value. If the device does not have a passcode of high complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanHigh()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanHigh +} +// GetAppActionIfDevicePasscodeComplexityLessThanLow gets the appActionIfDevicePasscodeComplexityLessThanLow property value. If the device does not have a passcode of low complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanLow()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanLow +} +// GetAppActionIfDevicePasscodeComplexityLessThanMedium gets the appActionIfDevicePasscodeComplexityLessThanMedium property value. If the device does not have a passcode of medium complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) GetAppActionIfDevicePasscodeComplexityLessThanMedium()(*ManagedAppRemediationAction) { + return m.appActionIfDevicePasscodeComplexityLessThanMedium +} +// GetAppActionIfIosDeviceModelNotAllowed gets the appActionIfIosDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) GetAppActionIfIosDeviceModelNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfIosDeviceModelNotAllowed +} +// GetAppDataEncryptionType gets the appDataEncryptionType property value. Represents the level to which app data is encrypted for managed apps +func (m *DefaultManagedAppProtection) GetAppDataEncryptionType()(*ManagedAppDataEncryptionType) { + return m.appDataEncryptionType +} +// GetApps gets the apps property value. List of apps to which the policy is deployed. +func (m *DefaultManagedAppProtection) GetApps()([]ManagedMobileAppable) { + return m.apps +} +// GetBiometricAuthenticationBlocked gets the biometricAuthenticationBlocked property value. Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. (Android Only) +func (m *DefaultManagedAppProtection) GetBiometricAuthenticationBlocked()(*bool) { + return m.biometricAuthenticationBlocked +} +// GetBlockAfterCompanyPortalUpdateDeferralInDays gets the blockAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. +func (m *DefaultManagedAppProtection) GetBlockAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.blockAfterCompanyPortalUpdateDeferralInDays +} +// GetConnectToVpnOnLaunch gets the connectToVpnOnLaunch property value. Whether the app should connect to the configured VPN on launch (Android only). +func (m *DefaultManagedAppProtection) GetConnectToVpnOnLaunch()(*bool) { + return m.connectToVpnOnLaunch +} +// GetCustomBrowserDisplayName gets the customBrowserDisplayName property value. Friendly name of the preferred custom browser to open weblink on Android. (Android only) +func (m *DefaultManagedAppProtection) GetCustomBrowserDisplayName()(*string) { + return m.customBrowserDisplayName +} +// GetCustomBrowserPackageId gets the customBrowserPackageId property value. Unique identifier of a custom browser to open weblink on Android. (Android only) +func (m *DefaultManagedAppProtection) GetCustomBrowserPackageId()(*string) { + return m.customBrowserPackageId +} +// GetCustomBrowserProtocol gets the customBrowserProtocol property value. A custom browser protocol to open weblink on iOS. (iOS only) +func (m *DefaultManagedAppProtection) GetCustomBrowserProtocol()(*string) { + return m.customBrowserProtocol +} +// GetCustomDialerAppDisplayName gets the customDialerAppDisplayName property value. Friendly name of a custom dialer app to click-to-open a phone number on Android. +func (m *DefaultManagedAppProtection) GetCustomDialerAppDisplayName()(*string) { + return m.customDialerAppDisplayName +} +// GetCustomDialerAppPackageId gets the customDialerAppPackageId property value. PackageId of a custom dialer app to click-to-open a phone number on Android. +func (m *DefaultManagedAppProtection) GetCustomDialerAppPackageId()(*string) { + return m.customDialerAppPackageId +} +// GetCustomDialerAppProtocol gets the customDialerAppProtocol property value. Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. +func (m *DefaultManagedAppProtection) GetCustomDialerAppProtocol()(*string) { + return m.customDialerAppProtocol +} +// GetCustomSettings gets the customSettings property value. A set of string key and string value pairs to be sent to the affected users, unalterned by this service +func (m *DefaultManagedAppProtection) GetCustomSettings()([]KeyValuePairable) { + return m.customSettings +} +// GetDeployedAppCount gets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *DefaultManagedAppProtection) GetDeployedAppCount()(*int32) { + return m.deployedAppCount +} +// GetDeploymentSummary gets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *DefaultManagedAppProtection) GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) { + return m.deploymentSummary +} +// GetDeviceLockRequired gets the deviceLockRequired property value. Defines if any kind of lock must be required on device. (android only) +func (m *DefaultManagedAppProtection) GetDeviceLockRequired()(*bool) { + return m.deviceLockRequired +} +// GetDisableAppEncryptionIfDeviceEncryptionIsEnabled gets the disableAppEncryptionIfDeviceEncryptionIsEnabled property value. When this setting is enabled, app level encryption is disabled if device level encryption is enabled. (Android only) +func (m *DefaultManagedAppProtection) GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()(*bool) { + return m.disableAppEncryptionIfDeviceEncryptionIsEnabled +} +// GetDisableProtectionOfManagedOutboundOpenInData gets the disableProtectionOfManagedOutboundOpenInData property value. Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. (iOS Only) +func (m *DefaultManagedAppProtection) GetDisableProtectionOfManagedOutboundOpenInData()(*bool) { + return m.disableProtectionOfManagedOutboundOpenInData +} +// GetEncryptAppData gets the encryptAppData property value. Indicates whether managed-app data should be encrypted. (Android only) +func (m *DefaultManagedAppProtection) GetEncryptAppData()(*bool) { + return m.encryptAppData +} +// GetExemptedAppPackages gets the exemptedAppPackages property value. Android App packages in this list will be exempt from the policy and will be able to receive data from managed apps. (Android only) +func (m *DefaultManagedAppProtection) GetExemptedAppPackages()([]KeyValuePairable) { + return m.exemptedAppPackages +} +// GetExemptedAppProtocols gets the exemptedAppProtocols property value. iOS Apps in this list will be exempt from the policy and will be able to receive data from managed apps. (iOS Only) +func (m *DefaultManagedAppProtection) GetExemptedAppProtocols()([]KeyValuePairable) { + return m.exemptedAppProtocols +} +// GetFaceIdBlocked gets the faceIdBlocked property value. Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. (iOS Only) +func (m *DefaultManagedAppProtection) GetFaceIdBlocked()(*bool) { + return m.faceIdBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultManagedAppProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppProtection.GetFieldDeserializers() + res["allowedAndroidDeviceManufacturers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedAndroidDeviceManufacturers(val) + } + return nil + } + res["allowedAndroidDeviceModels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedAndroidDeviceModels(res) + } + return nil + } + res["allowedIosDeviceModels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedIosDeviceModels(val) + } + return nil + } + res["appActionIfAndroidDeviceManufacturerNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidDeviceManufacturerNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidDeviceModelNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidDeviceModelNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidSafetyNetAppsVerificationFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidSafetyNetAppsVerificationFailed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfAndroidSafetyNetDeviceAttestationFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDeviceLockNotSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDeviceLockNotSet(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanHigh"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanHigh(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanLow"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanLow(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfDevicePasscodeComplexityLessThanMedium"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDevicePasscodeComplexityLessThanMedium(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfIosDeviceModelNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfIosDeviceModelNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appDataEncryptionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppDataEncryptionType) + if err != nil { + return err + } + if val != nil { + m.SetAppDataEncryptionType(val.(*ManagedAppDataEncryptionType)) + } + return nil + } + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedMobileAppable) + } + m.SetApps(res) + } + return nil + } + res["biometricAuthenticationBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBiometricAuthenticationBlocked(val) + } + return nil + } + res["blockAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBlockAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + res["connectToVpnOnLaunch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectToVpnOnLaunch(val) + } + return nil + } + res["customBrowserDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserDisplayName(val) + } + return nil + } + res["customBrowserPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserPackageId(val) + } + return nil + } + res["customBrowserProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserProtocol(val) + } + return nil + } + res["customDialerAppDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppDisplayName(val) + } + return nil + } + res["customDialerAppPackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppPackageId(val) + } + return nil + } + res["customDialerAppProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppProtocol(val) + } + return nil + } + res["customSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomSettings(res) + } + return nil + } + res["deployedAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeployedAppCount(val) + } + return nil + } + res["deploymentSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedAppPolicyDeploymentSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentSummary(val.(ManagedAppPolicyDeploymentSummaryable)) + } + return nil + } + res["deviceLockRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceLockRequired(val) + } + return nil + } + res["disableAppEncryptionIfDeviceEncryptionIsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(val) + } + return nil + } + res["disableProtectionOfManagedOutboundOpenInData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableProtectionOfManagedOutboundOpenInData(val) + } + return nil + } + res["encryptAppData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEncryptAppData(val) + } + return nil + } + res["exemptedAppPackages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetExemptedAppPackages(res) + } + return nil + } + res["exemptedAppProtocols"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetExemptedAppProtocols(res) + } + return nil + } + res["faceIdBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFaceIdBlocked(val) + } + return nil + } + res["filterOpenInToOnlyManagedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFilterOpenInToOnlyManagedApps(val) + } + return nil + } + res["fingerprintAndBiometricEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprintAndBiometricEnabled(val) + } + return nil + } + res["minimumRequiredCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredCompanyPortalVersion(val) + } + return nil + } + res["minimumRequiredPatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredPatchVersion(val) + } + return nil + } + res["minimumRequiredSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredSdkVersion(val) + } + return nil + } + res["minimumWarningCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningCompanyPortalVersion(val) + } + return nil + } + res["minimumWarningPatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningPatchVersion(val) + } + return nil + } + res["minimumWarningSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningSdkVersion(val) + } + return nil + } + res["minimumWipeCompanyPortalVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeCompanyPortalVersion(val) + } + return nil + } + res["minimumWipePatchVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipePatchVersion(val) + } + return nil + } + res["minimumWipeSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeSdkVersion(val) + } + return nil + } + res["protectInboundDataFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectInboundDataFromUnknownSources(val) + } + return nil + } + res["requireClass3Biometrics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireClass3Biometrics(val) + } + return nil + } + res["requiredAndroidSafetyNetAppsVerificationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetAppsVerificationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetAppsVerificationType(val.(*AndroidManagedAppSafetyNetAppsVerificationType)) + } + return nil + } + res["requiredAndroidSafetyNetDeviceAttestationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetDeviceAttestationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetDeviceAttestationType(val.(*AndroidManagedAppSafetyNetDeviceAttestationType)) + } + return nil + } + res["requiredAndroidSafetyNetEvaluationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAndroidManagedAppSafetyNetEvaluationType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAndroidSafetyNetEvaluationType(val.(*AndroidManagedAppSafetyNetEvaluationType)) + } + return nil + } + res["requirePinAfterBiometricChange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequirePinAfterBiometricChange(val) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["thirdPartyKeyboardsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetThirdPartyKeyboardsBlocked(val) + } + return nil + } + res["warnAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWarnAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + res["wipeAfterCompanyPortalUpdateDeferralInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWipeAfterCompanyPortalUpdateDeferralInDays(val) + } + return nil + } + return res +} +// GetFilterOpenInToOnlyManagedApps gets the filterOpenInToOnlyManagedApps property value. Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. (iOS Only) +func (m *DefaultManagedAppProtection) GetFilterOpenInToOnlyManagedApps()(*bool) { + return m.filterOpenInToOnlyManagedApps +} +// GetFingerprintAndBiometricEnabled gets the fingerprintAndBiometricEnabled property value. Indicate to the client to enable both biometrics and fingerprints for the app. +func (m *DefaultManagedAppProtection) GetFingerprintAndBiometricEnabled()(*bool) { + return m.fingerprintAndBiometricEnabled +} +// GetMinimumRequiredCompanyPortalVersion gets the minimumRequiredCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or app access will be blocked +func (m *DefaultManagedAppProtection) GetMinimumRequiredCompanyPortalVersion()(*string) { + return m.minimumRequiredCompanyPortalVersion +} +// GetMinimumRequiredPatchVersion gets the minimumRequiredPatchVersion property value. Define the oldest required Android security patch level a user can have to gain secure access to the app. (Android only) +func (m *DefaultManagedAppProtection) GetMinimumRequiredPatchVersion()(*string) { + return m.minimumRequiredPatchVersion +} +// GetMinimumRequiredSdkVersion gets the minimumRequiredSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. (iOS Only) +func (m *DefaultManagedAppProtection) GetMinimumRequiredSdkVersion()(*string) { + return m.minimumRequiredSdkVersion +} +// GetMinimumWarningCompanyPortalVersion gets the minimumWarningCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the user will receive a warning +func (m *DefaultManagedAppProtection) GetMinimumWarningCompanyPortalVersion()(*string) { + return m.minimumWarningCompanyPortalVersion +} +// GetMinimumWarningPatchVersion gets the minimumWarningPatchVersion property value. Define the oldest recommended Android security patch level a user can have for secure access to the app. (Android only) +func (m *DefaultManagedAppProtection) GetMinimumWarningPatchVersion()(*string) { + return m.minimumWarningPatchVersion +} +// GetMinimumWarningSdkVersion gets the minimumWarningSdkVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. (iOS only) +func (m *DefaultManagedAppProtection) GetMinimumWarningSdkVersion()(*string) { + return m.minimumWarningSdkVersion +} +// GetMinimumWipeCompanyPortalVersion gets the minimumWipeCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped +func (m *DefaultManagedAppProtection) GetMinimumWipeCompanyPortalVersion()(*string) { + return m.minimumWipeCompanyPortalVersion +} +// GetMinimumWipePatchVersion gets the minimumWipePatchVersion property value. Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. (Android only) +func (m *DefaultManagedAppProtection) GetMinimumWipePatchVersion()(*string) { + return m.minimumWipePatchVersion +} +// GetMinimumWipeSdkVersion gets the minimumWipeSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *DefaultManagedAppProtection) GetMinimumWipeSdkVersion()(*string) { + return m.minimumWipeSdkVersion +} +// GetProtectInboundDataFromUnknownSources gets the protectInboundDataFromUnknownSources property value. Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. (iOS Only) +func (m *DefaultManagedAppProtection) GetProtectInboundDataFromUnknownSources()(*bool) { + return m.protectInboundDataFromUnknownSources +} +// GetRequireClass3Biometrics gets the requireClass3Biometrics property value. Require user to apply Class 3 Biometrics on their Android device. +func (m *DefaultManagedAppProtection) GetRequireClass3Biometrics()(*bool) { + return m.requireClass3Biometrics +} +// GetRequiredAndroidSafetyNetAppsVerificationType gets the requiredAndroidSafetyNetAppsVerificationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *DefaultManagedAppProtection) GetRequiredAndroidSafetyNetAppsVerificationType()(*AndroidManagedAppSafetyNetAppsVerificationType) { + return m.requiredAndroidSafetyNetAppsVerificationType +} +// GetRequiredAndroidSafetyNetDeviceAttestationType gets the requiredAndroidSafetyNetDeviceAttestationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *DefaultManagedAppProtection) GetRequiredAndroidSafetyNetDeviceAttestationType()(*AndroidManagedAppSafetyNetDeviceAttestationType) { + return m.requiredAndroidSafetyNetDeviceAttestationType +} +// GetRequiredAndroidSafetyNetEvaluationType gets the requiredAndroidSafetyNetEvaluationType property value. An admin enforced Android SafetyNet evaluation type requirement on a managed app. +func (m *DefaultManagedAppProtection) GetRequiredAndroidSafetyNetEvaluationType()(*AndroidManagedAppSafetyNetEvaluationType) { + return m.requiredAndroidSafetyNetEvaluationType +} +// GetRequirePinAfterBiometricChange gets the requirePinAfterBiometricChange property value. A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. +func (m *DefaultManagedAppProtection) GetRequirePinAfterBiometricChange()(*bool) { + return m.requirePinAfterBiometricChange +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether screen capture is blocked. (Android only) +func (m *DefaultManagedAppProtection) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetThirdPartyKeyboardsBlocked gets the thirdPartyKeyboardsBlocked property value. Defines if third party keyboards are allowed while accessing a managed app. (iOS Only) +func (m *DefaultManagedAppProtection) GetThirdPartyKeyboardsBlocked()(*bool) { + return m.thirdPartyKeyboardsBlocked +} +// GetWarnAfterCompanyPortalUpdateDeferralInDays gets the warnAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning +func (m *DefaultManagedAppProtection) GetWarnAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.warnAfterCompanyPortalUpdateDeferralInDays +} +// GetWipeAfterCompanyPortalUpdateDeferralInDays gets the wipeAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped +func (m *DefaultManagedAppProtection) GetWipeAfterCompanyPortalUpdateDeferralInDays()(*int32) { + return m.wipeAfterCompanyPortalUpdateDeferralInDays +} +// Serialize serializes information the current object +func (m *DefaultManagedAppProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppProtection.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("allowedAndroidDeviceManufacturers", m.GetAllowedAndroidDeviceManufacturers()) + if err != nil { + return err + } + } + if m.GetAllowedAndroidDeviceModels() != nil { + err = writer.WriteCollectionOfStringValues("allowedAndroidDeviceModels", m.GetAllowedAndroidDeviceModels()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("allowedIosDeviceModels", m.GetAllowedIosDeviceModels()) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidDeviceManufacturerNotAllowed() != nil { + cast := (*m.GetAppActionIfAndroidDeviceManufacturerNotAllowed()).String() + err = writer.WriteStringValue("appActionIfAndroidDeviceManufacturerNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidDeviceModelNotAllowed() != nil { + cast := (*m.GetAppActionIfAndroidDeviceModelNotAllowed()).String() + err = writer.WriteStringValue("appActionIfAndroidDeviceModelNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidSafetyNetAppsVerificationFailed() != nil { + cast := (*m.GetAppActionIfAndroidSafetyNetAppsVerificationFailed()).String() + err = writer.WriteStringValue("appActionIfAndroidSafetyNetAppsVerificationFailed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfAndroidSafetyNetDeviceAttestationFailed() != nil { + cast := (*m.GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()).String() + err = writer.WriteStringValue("appActionIfAndroidSafetyNetDeviceAttestationFailed", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDeviceLockNotSet() != nil { + cast := (*m.GetAppActionIfDeviceLockNotSet()).String() + err = writer.WriteStringValue("appActionIfDeviceLockNotSet", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanHigh() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanHigh()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanHigh", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanLow() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanLow()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanLow", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDevicePasscodeComplexityLessThanMedium() != nil { + cast := (*m.GetAppActionIfDevicePasscodeComplexityLessThanMedium()).String() + err = writer.WriteStringValue("appActionIfDevicePasscodeComplexityLessThanMedium", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfIosDeviceModelNotAllowed() != nil { + cast := (*m.GetAppActionIfIosDeviceModelNotAllowed()).String() + err = writer.WriteStringValue("appActionIfIosDeviceModelNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppDataEncryptionType() != nil { + cast := (*m.GetAppDataEncryptionType()).String() + err = writer.WriteStringValue("appDataEncryptionType", &cast) + if err != nil { + return err + } + } + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("biometricAuthenticationBlocked", m.GetBiometricAuthenticationBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("blockAfterCompanyPortalUpdateDeferralInDays", m.GetBlockAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectToVpnOnLaunch", m.GetConnectToVpnOnLaunch()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserDisplayName", m.GetCustomBrowserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserPackageId", m.GetCustomBrowserPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserProtocol", m.GetCustomBrowserProtocol()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppDisplayName", m.GetCustomDialerAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppPackageId", m.GetCustomDialerAppPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppProtocol", m.GetCustomDialerAppProtocol()) + if err != nil { + return err + } + } + if m.GetCustomSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSettings())) + for i, v := range m.GetCustomSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deployedAppCount", m.GetDeployedAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deploymentSummary", m.GetDeploymentSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceLockRequired", m.GetDeviceLockRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableAppEncryptionIfDeviceEncryptionIsEnabled", m.GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableProtectionOfManagedOutboundOpenInData", m.GetDisableProtectionOfManagedOutboundOpenInData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("encryptAppData", m.GetEncryptAppData()) + if err != nil { + return err + } + } + if m.GetExemptedAppPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExemptedAppPackages())) + for i, v := range m.GetExemptedAppPackages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exemptedAppPackages", cast) + if err != nil { + return err + } + } + if m.GetExemptedAppProtocols() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExemptedAppProtocols())) + for i, v := range m.GetExemptedAppProtocols() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exemptedAppProtocols", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("faceIdBlocked", m.GetFaceIdBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("filterOpenInToOnlyManagedApps", m.GetFilterOpenInToOnlyManagedApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fingerprintAndBiometricEnabled", m.GetFingerprintAndBiometricEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredCompanyPortalVersion", m.GetMinimumRequiredCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredPatchVersion", m.GetMinimumRequiredPatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredSdkVersion", m.GetMinimumRequiredSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningCompanyPortalVersion", m.GetMinimumWarningCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningPatchVersion", m.GetMinimumWarningPatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningSdkVersion", m.GetMinimumWarningSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeCompanyPortalVersion", m.GetMinimumWipeCompanyPortalVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipePatchVersion", m.GetMinimumWipePatchVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeSdkVersion", m.GetMinimumWipeSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("protectInboundDataFromUnknownSources", m.GetProtectInboundDataFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireClass3Biometrics", m.GetRequireClass3Biometrics()) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetAppsVerificationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetAppsVerificationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetAppsVerificationType", &cast) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetDeviceAttestationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetDeviceAttestationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetDeviceAttestationType", &cast) + if err != nil { + return err + } + } + if m.GetRequiredAndroidSafetyNetEvaluationType() != nil { + cast := (*m.GetRequiredAndroidSafetyNetEvaluationType()).String() + err = writer.WriteStringValue("requiredAndroidSafetyNetEvaluationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requirePinAfterBiometricChange", m.GetRequirePinAfterBiometricChange()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("thirdPartyKeyboardsBlocked", m.GetThirdPartyKeyboardsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("warnAfterCompanyPortalUpdateDeferralInDays", m.GetWarnAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("wipeAfterCompanyPortalUpdateDeferralInDays", m.GetWipeAfterCompanyPortalUpdateDeferralInDays()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedAndroidDeviceManufacturers sets the allowedAndroidDeviceManufacturers property value. Semicolon seperated list of device manufacturers allowed, as a string, for the managed app to work. (Android only) +func (m *DefaultManagedAppProtection) SetAllowedAndroidDeviceManufacturers(value *string)() { + m.allowedAndroidDeviceManufacturers = value +} +// SetAllowedAndroidDeviceModels sets the allowedAndroidDeviceModels property value. List of device models allowed, as a string, for the managed app to work. (Android Only) +func (m *DefaultManagedAppProtection) SetAllowedAndroidDeviceModels(value []string)() { + m.allowedAndroidDeviceModels = value +} +// SetAllowedIosDeviceModels sets the allowedIosDeviceModels property value. Semicolon seperated list of device models allowed, as a string, for the managed app to work. (iOS Only) +func (m *DefaultManagedAppProtection) SetAllowedIosDeviceModels(value *string)() { + m.allowedIosDeviceModels = value +} +// SetAppActionIfAndroidDeviceManufacturerNotAllowed sets the appActionIfAndroidDeviceManufacturerNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfAndroidDeviceManufacturerNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidDeviceManufacturerNotAllowed = value +} +// SetAppActionIfAndroidDeviceModelNotAllowed sets the appActionIfAndroidDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfAndroidDeviceModelNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidDeviceModelNotAllowed = value +} +// SetAppActionIfAndroidSafetyNetAppsVerificationFailed sets the appActionIfAndroidSafetyNetAppsVerificationFailed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfAndroidSafetyNetAppsVerificationFailed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidSafetyNetAppsVerificationFailed = value +} +// SetAppActionIfAndroidSafetyNetDeviceAttestationFailed sets the appActionIfAndroidSafetyNetDeviceAttestationFailed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(value *ManagedAppRemediationAction)() { + m.appActionIfAndroidSafetyNetDeviceAttestationFailed = value +} +// SetAppActionIfDeviceLockNotSet sets the appActionIfDeviceLockNotSet property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfDeviceLockNotSet(value *ManagedAppRemediationAction)() { + m.appActionIfDeviceLockNotSet = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanHigh sets the appActionIfDevicePasscodeComplexityLessThanHigh property value. If the device does not have a passcode of high complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanHigh(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanHigh = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanLow sets the appActionIfDevicePasscodeComplexityLessThanLow property value. If the device does not have a passcode of low complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanLow(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanLow = value +} +// SetAppActionIfDevicePasscodeComplexityLessThanMedium sets the appActionIfDevicePasscodeComplexityLessThanMedium property value. If the device does not have a passcode of medium complexity or higher, trigger the stored action. Possible values are: block, wipe, warn. +func (m *DefaultManagedAppProtection) SetAppActionIfDevicePasscodeComplexityLessThanMedium(value *ManagedAppRemediationAction)() { + m.appActionIfDevicePasscodeComplexityLessThanMedium = value +} +// SetAppActionIfIosDeviceModelNotAllowed sets the appActionIfIosDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *DefaultManagedAppProtection) SetAppActionIfIosDeviceModelNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfIosDeviceModelNotAllowed = value +} +// SetAppDataEncryptionType sets the appDataEncryptionType property value. Represents the level to which app data is encrypted for managed apps +func (m *DefaultManagedAppProtection) SetAppDataEncryptionType(value *ManagedAppDataEncryptionType)() { + m.appDataEncryptionType = value +} +// SetApps sets the apps property value. List of apps to which the policy is deployed. +func (m *DefaultManagedAppProtection) SetApps(value []ManagedMobileAppable)() { + m.apps = value +} +// SetBiometricAuthenticationBlocked sets the biometricAuthenticationBlocked property value. Indicates whether use of the biometric authentication is allowed in place of a pin if PinRequired is set to True. (Android Only) +func (m *DefaultManagedAppProtection) SetBiometricAuthenticationBlocked(value *bool)() { + m.biometricAuthenticationBlocked = value +} +// SetBlockAfterCompanyPortalUpdateDeferralInDays sets the blockAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or app access will be blocked. +func (m *DefaultManagedAppProtection) SetBlockAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.blockAfterCompanyPortalUpdateDeferralInDays = value +} +// SetConnectToVpnOnLaunch sets the connectToVpnOnLaunch property value. Whether the app should connect to the configured VPN on launch (Android only). +func (m *DefaultManagedAppProtection) SetConnectToVpnOnLaunch(value *bool)() { + m.connectToVpnOnLaunch = value +} +// SetCustomBrowserDisplayName sets the customBrowserDisplayName property value. Friendly name of the preferred custom browser to open weblink on Android. (Android only) +func (m *DefaultManagedAppProtection) SetCustomBrowserDisplayName(value *string)() { + m.customBrowserDisplayName = value +} +// SetCustomBrowserPackageId sets the customBrowserPackageId property value. Unique identifier of a custom browser to open weblink on Android. (Android only) +func (m *DefaultManagedAppProtection) SetCustomBrowserPackageId(value *string)() { + m.customBrowserPackageId = value +} +// SetCustomBrowserProtocol sets the customBrowserProtocol property value. A custom browser protocol to open weblink on iOS. (iOS only) +func (m *DefaultManagedAppProtection) SetCustomBrowserProtocol(value *string)() { + m.customBrowserProtocol = value +} +// SetCustomDialerAppDisplayName sets the customDialerAppDisplayName property value. Friendly name of a custom dialer app to click-to-open a phone number on Android. +func (m *DefaultManagedAppProtection) SetCustomDialerAppDisplayName(value *string)() { + m.customDialerAppDisplayName = value +} +// SetCustomDialerAppPackageId sets the customDialerAppPackageId property value. PackageId of a custom dialer app to click-to-open a phone number on Android. +func (m *DefaultManagedAppProtection) SetCustomDialerAppPackageId(value *string)() { + m.customDialerAppPackageId = value +} +// SetCustomDialerAppProtocol sets the customDialerAppProtocol property value. Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. +func (m *DefaultManagedAppProtection) SetCustomDialerAppProtocol(value *string)() { + m.customDialerAppProtocol = value +} +// SetCustomSettings sets the customSettings property value. A set of string key and string value pairs to be sent to the affected users, unalterned by this service +func (m *DefaultManagedAppProtection) SetCustomSettings(value []KeyValuePairable)() { + m.customSettings = value +} +// SetDeployedAppCount sets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *DefaultManagedAppProtection) SetDeployedAppCount(value *int32)() { + m.deployedAppCount = value +} +// SetDeploymentSummary sets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *DefaultManagedAppProtection) SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() { + m.deploymentSummary = value +} +// SetDeviceLockRequired sets the deviceLockRequired property value. Defines if any kind of lock must be required on device. (android only) +func (m *DefaultManagedAppProtection) SetDeviceLockRequired(value *bool)() { + m.deviceLockRequired = value +} +// SetDisableAppEncryptionIfDeviceEncryptionIsEnabled sets the disableAppEncryptionIfDeviceEncryptionIsEnabled property value. When this setting is enabled, app level encryption is disabled if device level encryption is enabled. (Android only) +func (m *DefaultManagedAppProtection) SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(value *bool)() { + m.disableAppEncryptionIfDeviceEncryptionIsEnabled = value +} +// SetDisableProtectionOfManagedOutboundOpenInData sets the disableProtectionOfManagedOutboundOpenInData property value. Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. (iOS Only) +func (m *DefaultManagedAppProtection) SetDisableProtectionOfManagedOutboundOpenInData(value *bool)() { + m.disableProtectionOfManagedOutboundOpenInData = value +} +// SetEncryptAppData sets the encryptAppData property value. Indicates whether managed-app data should be encrypted. (Android only) +func (m *DefaultManagedAppProtection) SetEncryptAppData(value *bool)() { + m.encryptAppData = value +} +// SetExemptedAppPackages sets the exemptedAppPackages property value. Android App packages in this list will be exempt from the policy and will be able to receive data from managed apps. (Android only) +func (m *DefaultManagedAppProtection) SetExemptedAppPackages(value []KeyValuePairable)() { + m.exemptedAppPackages = value +} +// SetExemptedAppProtocols sets the exemptedAppProtocols property value. iOS Apps in this list will be exempt from the policy and will be able to receive data from managed apps. (iOS Only) +func (m *DefaultManagedAppProtection) SetExemptedAppProtocols(value []KeyValuePairable)() { + m.exemptedAppProtocols = value +} +// SetFaceIdBlocked sets the faceIdBlocked property value. Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. (iOS Only) +func (m *DefaultManagedAppProtection) SetFaceIdBlocked(value *bool)() { + m.faceIdBlocked = value +} +// SetFilterOpenInToOnlyManagedApps sets the filterOpenInToOnlyManagedApps property value. Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. (iOS Only) +func (m *DefaultManagedAppProtection) SetFilterOpenInToOnlyManagedApps(value *bool)() { + m.filterOpenInToOnlyManagedApps = value +} +// SetFingerprintAndBiometricEnabled sets the fingerprintAndBiometricEnabled property value. Indicate to the client to enable both biometrics and fingerprints for the app. +func (m *DefaultManagedAppProtection) SetFingerprintAndBiometricEnabled(value *bool)() { + m.fingerprintAndBiometricEnabled = value +} +// SetMinimumRequiredCompanyPortalVersion sets the minimumRequiredCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or app access will be blocked +func (m *DefaultManagedAppProtection) SetMinimumRequiredCompanyPortalVersion(value *string)() { + m.minimumRequiredCompanyPortalVersion = value +} +// SetMinimumRequiredPatchVersion sets the minimumRequiredPatchVersion property value. Define the oldest required Android security patch level a user can have to gain secure access to the app. (Android only) +func (m *DefaultManagedAppProtection) SetMinimumRequiredPatchVersion(value *string)() { + m.minimumRequiredPatchVersion = value +} +// SetMinimumRequiredSdkVersion sets the minimumRequiredSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. (iOS Only) +func (m *DefaultManagedAppProtection) SetMinimumRequiredSdkVersion(value *string)() { + m.minimumRequiredSdkVersion = value +} +// SetMinimumWarningCompanyPortalVersion sets the minimumWarningCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the user will receive a warning +func (m *DefaultManagedAppProtection) SetMinimumWarningCompanyPortalVersion(value *string)() { + m.minimumWarningCompanyPortalVersion = value +} +// SetMinimumWarningPatchVersion sets the minimumWarningPatchVersion property value. Define the oldest recommended Android security patch level a user can have for secure access to the app. (Android only) +func (m *DefaultManagedAppProtection) SetMinimumWarningPatchVersion(value *string)() { + m.minimumWarningPatchVersion = value +} +// SetMinimumWarningSdkVersion sets the minimumWarningSdkVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. (iOS only) +func (m *DefaultManagedAppProtection) SetMinimumWarningSdkVersion(value *string)() { + m.minimumWarningSdkVersion = value +} +// SetMinimumWipeCompanyPortalVersion sets the minimumWipeCompanyPortalVersion property value. Minimum version of the Company portal that must be installed on the device or the company data on the app will be wiped +func (m *DefaultManagedAppProtection) SetMinimumWipeCompanyPortalVersion(value *string)() { + m.minimumWipeCompanyPortalVersion = value +} +// SetMinimumWipePatchVersion sets the minimumWipePatchVersion property value. Android security patch level less than or equal to the specified value will wipe the managed app and the associated company data. (Android only) +func (m *DefaultManagedAppProtection) SetMinimumWipePatchVersion(value *string)() { + m.minimumWipePatchVersion = value +} +// SetMinimumWipeSdkVersion sets the minimumWipeSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *DefaultManagedAppProtection) SetMinimumWipeSdkVersion(value *string)() { + m.minimumWipeSdkVersion = value +} +// SetProtectInboundDataFromUnknownSources sets the protectInboundDataFromUnknownSources property value. Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. (iOS Only) +func (m *DefaultManagedAppProtection) SetProtectInboundDataFromUnknownSources(value *bool)() { + m.protectInboundDataFromUnknownSources = value +} +// SetRequireClass3Biometrics sets the requireClass3Biometrics property value. Require user to apply Class 3 Biometrics on their Android device. +func (m *DefaultManagedAppProtection) SetRequireClass3Biometrics(value *bool)() { + m.requireClass3Biometrics = value +} +// SetRequiredAndroidSafetyNetAppsVerificationType sets the requiredAndroidSafetyNetAppsVerificationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *DefaultManagedAppProtection) SetRequiredAndroidSafetyNetAppsVerificationType(value *AndroidManagedAppSafetyNetAppsVerificationType)() { + m.requiredAndroidSafetyNetAppsVerificationType = value +} +// SetRequiredAndroidSafetyNetDeviceAttestationType sets the requiredAndroidSafetyNetDeviceAttestationType property value. An admin enforced Android SafetyNet Device Attestation requirement on a managed app. +func (m *DefaultManagedAppProtection) SetRequiredAndroidSafetyNetDeviceAttestationType(value *AndroidManagedAppSafetyNetDeviceAttestationType)() { + m.requiredAndroidSafetyNetDeviceAttestationType = value +} +// SetRequiredAndroidSafetyNetEvaluationType sets the requiredAndroidSafetyNetEvaluationType property value. An admin enforced Android SafetyNet evaluation type requirement on a managed app. +func (m *DefaultManagedAppProtection) SetRequiredAndroidSafetyNetEvaluationType(value *AndroidManagedAppSafetyNetEvaluationType)() { + m.requiredAndroidSafetyNetEvaluationType = value +} +// SetRequirePinAfterBiometricChange sets the requirePinAfterBiometricChange property value. A PIN prompt will override biometric prompts if class 3 biometrics are updated on the device. +func (m *DefaultManagedAppProtection) SetRequirePinAfterBiometricChange(value *bool)() { + m.requirePinAfterBiometricChange = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether screen capture is blocked. (Android only) +func (m *DefaultManagedAppProtection) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetThirdPartyKeyboardsBlocked sets the thirdPartyKeyboardsBlocked property value. Defines if third party keyboards are allowed while accessing a managed app. (iOS Only) +func (m *DefaultManagedAppProtection) SetThirdPartyKeyboardsBlocked(value *bool)() { + m.thirdPartyKeyboardsBlocked = value +} +// SetWarnAfterCompanyPortalUpdateDeferralInDays sets the warnAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the user will receive the warning +func (m *DefaultManagedAppProtection) SetWarnAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.warnAfterCompanyPortalUpdateDeferralInDays = value +} +// SetWipeAfterCompanyPortalUpdateDeferralInDays sets the wipeAfterCompanyPortalUpdateDeferralInDays property value. Maximum number of days Company Portal update can be deferred on the device or the company data on the app will be wiped +func (m *DefaultManagedAppProtection) SetWipeAfterCompanyPortalUpdateDeferralInDays(value *int32)() { + m.wipeAfterCompanyPortalUpdateDeferralInDays = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_response.go b/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_response.go new file mode 100644 index 000000000..660cea486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultManagedAppProtectionCollectionResponse +type DefaultManagedAppProtectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DefaultManagedAppProtectionable +} +// NewDefaultManagedAppProtectionCollectionResponse instantiates a new DefaultManagedAppProtectionCollectionResponse and sets the default values. +func NewDefaultManagedAppProtectionCollectionResponse()(*DefaultManagedAppProtectionCollectionResponse) { + m := &DefaultManagedAppProtectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDefaultManagedAppProtectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultManagedAppProtectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultManagedAppProtectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultManagedAppProtectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDefaultManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DefaultManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(DefaultManagedAppProtectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DefaultManagedAppProtectionCollectionResponse) GetValue()([]DefaultManagedAppProtectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DefaultManagedAppProtectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DefaultManagedAppProtectionCollectionResponse) SetValue(value []DefaultManagedAppProtectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_responseable.go new file mode 100644 index 000000000..9d03cad4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_managed_app_protection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultManagedAppProtectionCollectionResponseable +type DefaultManagedAppProtectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DefaultManagedAppProtectionable) + SetValue(value []DefaultManagedAppProtectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_managed_app_protectionable.go b/src/internal/connector/graph/betasdk/models/default_managed_app_protectionable.go new file mode 100644 index 000000000..75a8a129d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_managed_app_protectionable.go @@ -0,0 +1,119 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultManagedAppProtectionable +type DefaultManagedAppProtectionable interface { + ManagedAppProtectionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAndroidDeviceManufacturers()(*string) + GetAllowedAndroidDeviceModels()([]string) + GetAllowedIosDeviceModels()(*string) + GetAppActionIfAndroidDeviceManufacturerNotAllowed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidDeviceModelNotAllowed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidSafetyNetAppsVerificationFailed()(*ManagedAppRemediationAction) + GetAppActionIfAndroidSafetyNetDeviceAttestationFailed()(*ManagedAppRemediationAction) + GetAppActionIfDeviceLockNotSet()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanHigh()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanLow()(*ManagedAppRemediationAction) + GetAppActionIfDevicePasscodeComplexityLessThanMedium()(*ManagedAppRemediationAction) + GetAppActionIfIosDeviceModelNotAllowed()(*ManagedAppRemediationAction) + GetAppDataEncryptionType()(*ManagedAppDataEncryptionType) + GetApps()([]ManagedMobileAppable) + GetBiometricAuthenticationBlocked()(*bool) + GetBlockAfterCompanyPortalUpdateDeferralInDays()(*int32) + GetConnectToVpnOnLaunch()(*bool) + GetCustomBrowserDisplayName()(*string) + GetCustomBrowserPackageId()(*string) + GetCustomBrowserProtocol()(*string) + GetCustomDialerAppDisplayName()(*string) + GetCustomDialerAppPackageId()(*string) + GetCustomDialerAppProtocol()(*string) + GetCustomSettings()([]KeyValuePairable) + GetDeployedAppCount()(*int32) + GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) + GetDeviceLockRequired()(*bool) + GetDisableAppEncryptionIfDeviceEncryptionIsEnabled()(*bool) + GetDisableProtectionOfManagedOutboundOpenInData()(*bool) + GetEncryptAppData()(*bool) + GetExemptedAppPackages()([]KeyValuePairable) + GetExemptedAppProtocols()([]KeyValuePairable) + GetFaceIdBlocked()(*bool) + GetFilterOpenInToOnlyManagedApps()(*bool) + GetFingerprintAndBiometricEnabled()(*bool) + GetMinimumRequiredCompanyPortalVersion()(*string) + GetMinimumRequiredPatchVersion()(*string) + GetMinimumRequiredSdkVersion()(*string) + GetMinimumWarningCompanyPortalVersion()(*string) + GetMinimumWarningPatchVersion()(*string) + GetMinimumWarningSdkVersion()(*string) + GetMinimumWipeCompanyPortalVersion()(*string) + GetMinimumWipePatchVersion()(*string) + GetMinimumWipeSdkVersion()(*string) + GetProtectInboundDataFromUnknownSources()(*bool) + GetRequireClass3Biometrics()(*bool) + GetRequiredAndroidSafetyNetAppsVerificationType()(*AndroidManagedAppSafetyNetAppsVerificationType) + GetRequiredAndroidSafetyNetDeviceAttestationType()(*AndroidManagedAppSafetyNetDeviceAttestationType) + GetRequiredAndroidSafetyNetEvaluationType()(*AndroidManagedAppSafetyNetEvaluationType) + GetRequirePinAfterBiometricChange()(*bool) + GetScreenCaptureBlocked()(*bool) + GetThirdPartyKeyboardsBlocked()(*bool) + GetWarnAfterCompanyPortalUpdateDeferralInDays()(*int32) + GetWipeAfterCompanyPortalUpdateDeferralInDays()(*int32) + SetAllowedAndroidDeviceManufacturers(value *string)() + SetAllowedAndroidDeviceModels(value []string)() + SetAllowedIosDeviceModels(value *string)() + SetAppActionIfAndroidDeviceManufacturerNotAllowed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidDeviceModelNotAllowed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidSafetyNetAppsVerificationFailed(value *ManagedAppRemediationAction)() + SetAppActionIfAndroidSafetyNetDeviceAttestationFailed(value *ManagedAppRemediationAction)() + SetAppActionIfDeviceLockNotSet(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanHigh(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanLow(value *ManagedAppRemediationAction)() + SetAppActionIfDevicePasscodeComplexityLessThanMedium(value *ManagedAppRemediationAction)() + SetAppActionIfIosDeviceModelNotAllowed(value *ManagedAppRemediationAction)() + SetAppDataEncryptionType(value *ManagedAppDataEncryptionType)() + SetApps(value []ManagedMobileAppable)() + SetBiometricAuthenticationBlocked(value *bool)() + SetBlockAfterCompanyPortalUpdateDeferralInDays(value *int32)() + SetConnectToVpnOnLaunch(value *bool)() + SetCustomBrowserDisplayName(value *string)() + SetCustomBrowserPackageId(value *string)() + SetCustomBrowserProtocol(value *string)() + SetCustomDialerAppDisplayName(value *string)() + SetCustomDialerAppPackageId(value *string)() + SetCustomDialerAppProtocol(value *string)() + SetCustomSettings(value []KeyValuePairable)() + SetDeployedAppCount(value *int32)() + SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() + SetDeviceLockRequired(value *bool)() + SetDisableAppEncryptionIfDeviceEncryptionIsEnabled(value *bool)() + SetDisableProtectionOfManagedOutboundOpenInData(value *bool)() + SetEncryptAppData(value *bool)() + SetExemptedAppPackages(value []KeyValuePairable)() + SetExemptedAppProtocols(value []KeyValuePairable)() + SetFaceIdBlocked(value *bool)() + SetFilterOpenInToOnlyManagedApps(value *bool)() + SetFingerprintAndBiometricEnabled(value *bool)() + SetMinimumRequiredCompanyPortalVersion(value *string)() + SetMinimumRequiredPatchVersion(value *string)() + SetMinimumRequiredSdkVersion(value *string)() + SetMinimumWarningCompanyPortalVersion(value *string)() + SetMinimumWarningPatchVersion(value *string)() + SetMinimumWarningSdkVersion(value *string)() + SetMinimumWipeCompanyPortalVersion(value *string)() + SetMinimumWipePatchVersion(value *string)() + SetMinimumWipeSdkVersion(value *string)() + SetProtectInboundDataFromUnknownSources(value *bool)() + SetRequireClass3Biometrics(value *bool)() + SetRequiredAndroidSafetyNetAppsVerificationType(value *AndroidManagedAppSafetyNetAppsVerificationType)() + SetRequiredAndroidSafetyNetDeviceAttestationType(value *AndroidManagedAppSafetyNetDeviceAttestationType)() + SetRequiredAndroidSafetyNetEvaluationType(value *AndroidManagedAppSafetyNetEvaluationType)() + SetRequirePinAfterBiometricChange(value *bool)() + SetScreenCaptureBlocked(value *bool)() + SetThirdPartyKeyboardsBlocked(value *bool)() + SetWarnAfterCompanyPortalUpdateDeferralInDays(value *int32)() + SetWipeAfterCompanyPortalUpdateDeferralInDays(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_mfa_method_type.go b/src/internal/connector/graph/betasdk/models/default_mfa_method_type.go new file mode 100644 index 000000000..607a3ef35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_mfa_method_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefaultMfaMethodType int + +const ( + NONE_DEFAULTMFAMETHODTYPE DefaultMfaMethodType = iota + MOBILEPHONE_DEFAULTMFAMETHODTYPE + ALTERNATEMOBILEPHONE_DEFAULTMFAMETHODTYPE + OFFICEPHONE_DEFAULTMFAMETHODTYPE + MICROSOFTAUTHENTICATORPUSH_DEFAULTMFAMETHODTYPE + SOFTWAREONETIMEPASSCODE_DEFAULTMFAMETHODTYPE + UNKNOWNFUTUREVALUE_DEFAULTMFAMETHODTYPE +) + +func (i DefaultMfaMethodType) String() string { + return []string{"none", "mobilePhone", "alternateMobilePhone", "officePhone", "microsoftAuthenticatorPush", "softwareOneTimePasscode", "unknownFutureValue"}[i] +} +func ParseDefaultMfaMethodType(v string) (interface{}, error) { + result := NONE_DEFAULTMFAMETHODTYPE + switch v { + case "none": + result = NONE_DEFAULTMFAMETHODTYPE + case "mobilePhone": + result = MOBILEPHONE_DEFAULTMFAMETHODTYPE + case "alternateMobilePhone": + result = ALTERNATEMOBILEPHONE_DEFAULTMFAMETHODTYPE + case "officePhone": + result = OFFICEPHONE_DEFAULTMFAMETHODTYPE + case "microsoftAuthenticatorPush": + result = MICROSOFTAUTHENTICATORPUSH_DEFAULTMFAMETHODTYPE + case "softwareOneTimePasscode": + result = SOFTWAREONETIMEPASSCODE_DEFAULTMFAMETHODTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEFAULTMFAMETHODTYPE + default: + return 0, errors.New("Unknown DefaultMfaMethodType value: " + v) + } + return &result, nil +} +func SerializeDefaultMfaMethodType(values []DefaultMfaMethodType) []string { + 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/default_user_role_override.go b/src/internal/connector/graph/betasdk/models/default_user_role_override.go new file mode 100644 index 000000000..97e26158e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_override.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRoleOverride provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefaultUserRoleOverride struct { + Entity + // The isDefault property + isDefault *bool + // The rolePermissions property + rolePermissions []UnifiedRolePermissionable +} +// NewDefaultUserRoleOverride instantiates a new defaultUserRoleOverride and sets the default values. +func NewDefaultUserRoleOverride()(*DefaultUserRoleOverride) { + m := &DefaultUserRoleOverride{ + Entity: *NewEntity(), + } + return m +} +// CreateDefaultUserRoleOverrideFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultUserRoleOverrideFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultUserRoleOverride(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultUserRoleOverride) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["rolePermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRolePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRolePermissionable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRolePermissionable) + } + m.SetRolePermissions(res) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. The isDefault property +func (m *DefaultUserRoleOverride) GetIsDefault()(*bool) { + return m.isDefault +} +// GetRolePermissions gets the rolePermissions property value. The rolePermissions property +func (m *DefaultUserRoleOverride) GetRolePermissions()([]UnifiedRolePermissionable) { + return m.rolePermissions +} +// Serialize serializes information the current object +func (m *DefaultUserRoleOverride) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + if m.GetRolePermissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRolePermissions())) + for i, v := range m.GetRolePermissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rolePermissions", cast) + if err != nil { + return err + } + } + return nil +} +// SetIsDefault sets the isDefault property value. The isDefault property +func (m *DefaultUserRoleOverride) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetRolePermissions sets the rolePermissions property value. The rolePermissions property +func (m *DefaultUserRoleOverride) SetRolePermissions(value []UnifiedRolePermissionable)() { + m.rolePermissions = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_response.go b/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_response.go new file mode 100644 index 000000000..f7421a0dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRoleOverrideCollectionResponse +type DefaultUserRoleOverrideCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DefaultUserRoleOverrideable +} +// NewDefaultUserRoleOverrideCollectionResponse instantiates a new DefaultUserRoleOverrideCollectionResponse and sets the default values. +func NewDefaultUserRoleOverrideCollectionResponse()(*DefaultUserRoleOverrideCollectionResponse) { + m := &DefaultUserRoleOverrideCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDefaultUserRoleOverrideCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultUserRoleOverrideCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultUserRoleOverrideCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultUserRoleOverrideCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDefaultUserRoleOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DefaultUserRoleOverrideable, len(val)) + for i, v := range val { + res[i] = v.(DefaultUserRoleOverrideable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DefaultUserRoleOverrideCollectionResponse) GetValue()([]DefaultUserRoleOverrideable) { + return m.value +} +// Serialize serializes information the current object +func (m *DefaultUserRoleOverrideCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DefaultUserRoleOverrideCollectionResponse) SetValue(value []DefaultUserRoleOverrideable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_responseable.go b/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_responseable.go new file mode 100644 index 000000000..9435fa99d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_override_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRoleOverrideCollectionResponseable +type DefaultUserRoleOverrideCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DefaultUserRoleOverrideable) + SetValue(value []DefaultUserRoleOverrideable)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_user_role_overrideable.go b/src/internal/connector/graph/betasdk/models/default_user_role_overrideable.go new file mode 100644 index 000000000..a4d9d7c2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_overrideable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRoleOverrideable +type DefaultUserRoleOverrideable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDefault()(*bool) + GetRolePermissions()([]UnifiedRolePermissionable) + SetIsDefault(value *bool)() + SetRolePermissions(value []UnifiedRolePermissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/default_user_role_permissions.go b/src/internal/connector/graph/betasdk/models/default_user_role_permissions.go new file mode 100644 index 000000000..d6ef38ef1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_permissions.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRolePermissions +type DefaultUserRolePermissions 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 whether the default user role can create applications. + allowedToCreateApps *bool + // Indicates whether the default user role can create security groups. + allowedToCreateSecurityGroups *bool + // Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role. + allowedToReadBitlockerKeysForOwnedDevice *bool + // Indicates whether the default user role can read other users. + allowedToReadOtherUsers *bool + // The OdataType property + odataType *string +} +// NewDefaultUserRolePermissions instantiates a new defaultUserRolePermissions and sets the default values. +func NewDefaultUserRolePermissions()(*DefaultUserRolePermissions) { + m := &DefaultUserRolePermissions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDefaultUserRolePermissionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefaultUserRolePermissionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefaultUserRolePermissions(), 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 *DefaultUserRolePermissions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedToCreateApps gets the allowedToCreateApps property value. Indicates whether the default user role can create applications. +func (m *DefaultUserRolePermissions) GetAllowedToCreateApps()(*bool) { + return m.allowedToCreateApps +} +// GetAllowedToCreateSecurityGroups gets the allowedToCreateSecurityGroups property value. Indicates whether the default user role can create security groups. +func (m *DefaultUserRolePermissions) GetAllowedToCreateSecurityGroups()(*bool) { + return m.allowedToCreateSecurityGroups +} +// GetAllowedToReadBitlockerKeysForOwnedDevice gets the allowedToReadBitlockerKeysForOwnedDevice property value. Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role. +func (m *DefaultUserRolePermissions) GetAllowedToReadBitlockerKeysForOwnedDevice()(*bool) { + return m.allowedToReadBitlockerKeysForOwnedDevice +} +// GetAllowedToReadOtherUsers gets the allowedToReadOtherUsers property value. Indicates whether the default user role can read other users. +func (m *DefaultUserRolePermissions) GetAllowedToReadOtherUsers()(*bool) { + return m.allowedToReadOtherUsers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefaultUserRolePermissions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedToCreateApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToCreateApps(val) + } + return nil + } + res["allowedToCreateSecurityGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToCreateSecurityGroups(val) + } + return nil + } + res["allowedToReadBitlockerKeysForOwnedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToReadBitlockerKeysForOwnedDevice(val) + } + return nil + } + res["allowedToReadOtherUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedToReadOtherUsers(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DefaultUserRolePermissions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DefaultUserRolePermissions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowedToCreateApps", m.GetAllowedToCreateApps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowedToCreateSecurityGroups", m.GetAllowedToCreateSecurityGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowedToReadBitlockerKeysForOwnedDevice", m.GetAllowedToReadBitlockerKeysForOwnedDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowedToReadOtherUsers", m.GetAllowedToReadOtherUsers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DefaultUserRolePermissions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedToCreateApps sets the allowedToCreateApps property value. Indicates whether the default user role can create applications. +func (m *DefaultUserRolePermissions) SetAllowedToCreateApps(value *bool)() { + m.allowedToCreateApps = value +} +// SetAllowedToCreateSecurityGroups sets the allowedToCreateSecurityGroups property value. Indicates whether the default user role can create security groups. +func (m *DefaultUserRolePermissions) SetAllowedToCreateSecurityGroups(value *bool)() { + m.allowedToCreateSecurityGroups = value +} +// SetAllowedToReadBitlockerKeysForOwnedDevice sets the allowedToReadBitlockerKeysForOwnedDevice property value. Indicates whether the registered owners of a device can read their own BitLocker recovery keys with default user role. +func (m *DefaultUserRolePermissions) SetAllowedToReadBitlockerKeysForOwnedDevice(value *bool)() { + m.allowedToReadBitlockerKeysForOwnedDevice = value +} +// SetAllowedToReadOtherUsers sets the allowedToReadOtherUsers property value. Indicates whether the default user role can read other users. +func (m *DefaultUserRolePermissions) SetAllowedToReadOtherUsers(value *bool)() { + m.allowedToReadOtherUsers = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DefaultUserRolePermissions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/default_user_role_permissionsable.go b/src/internal/connector/graph/betasdk/models/default_user_role_permissionsable.go new file mode 100644 index 000000000..36fe4e0e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/default_user_role_permissionsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefaultUserRolePermissionsable +type DefaultUserRolePermissionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedToCreateApps()(*bool) + GetAllowedToCreateSecurityGroups()(*bool) + GetAllowedToReadBitlockerKeysForOwnedDevice()(*bool) + GetAllowedToReadOtherUsers()(*bool) + GetOdataType()(*string) + SetAllowedToCreateApps(value *bool)() + SetAllowedToCreateSecurityGroups(value *bool)() + SetAllowedToReadBitlockerKeysForOwnedDevice(value *bool)() + SetAllowedToReadOtherUsers(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/defender_attack_surface_type.go b/src/internal/connector/graph/betasdk/models/defender_attack_surface_type.go new file mode 100644 index 000000000..3c825e006 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_attack_surface_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderAttackSurfaceType int + +const ( + // Default, which disables attack surface reduction rule. + USERDEFINED_DEFENDERATTACKSURFACETYPE DefenderAttackSurfaceType = iota + // Enable the attack surface reduction rule. + BLOCK_DEFENDERATTACKSURFACETYPE + // Evaluate how the ASR rule would impact your organization if enabled. Does not change functionality but generate logs. + AUDITMODE_DEFENDERATTACKSURFACETYPE + // Warning message to end user with ability to bypass block from attack surface reduction rule. + WARN_DEFENDERATTACKSURFACETYPE + // Disable the attack surface reduction rule + DISABLE_DEFENDERATTACKSURFACETYPE +) + +func (i DefenderAttackSurfaceType) String() string { + return []string{"userDefined", "block", "auditMode", "warn", "disable"}[i] +} +func ParseDefenderAttackSurfaceType(v string) (interface{}, error) { + result := USERDEFINED_DEFENDERATTACKSURFACETYPE + switch v { + case "userDefined": + result = USERDEFINED_DEFENDERATTACKSURFACETYPE + case "block": + result = BLOCK_DEFENDERATTACKSURFACETYPE + case "auditMode": + result = AUDITMODE_DEFENDERATTACKSURFACETYPE + case "warn": + result = WARN_DEFENDERATTACKSURFACETYPE + case "disable": + result = DISABLE_DEFENDERATTACKSURFACETYPE + default: + return 0, errors.New("Unknown DefenderAttackSurfaceType value: " + v) + } + return &result, nil +} +func SerializeDefenderAttackSurfaceType(values []DefenderAttackSurfaceType) []string { + 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/defender_cloud_block_level_type.go b/src/internal/connector/graph/betasdk/models/defender_cloud_block_level_type.go new file mode 100644 index 000000000..735272f10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_cloud_block_level_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderCloudBlockLevelType int + +const ( + // Default value, uses the default Windows Defender Antivirus blocking level and provides strong detection without increasing the risk of detecting legitimate files + NOTCONFIGURED_DEFENDERCLOUDBLOCKLEVELTYPE DefenderCloudBlockLevelType = iota + // High applies a strong level of detection. + HIGH_DEFENDERCLOUDBLOCKLEVELTYPE + // High + uses the High level and applies addition protection measures + HIGHPLUS_DEFENDERCLOUDBLOCKLEVELTYPE + // Zero tolerance blocks all unknown executables + ZEROTOLERANCE_DEFENDERCLOUDBLOCKLEVELTYPE +) + +func (i DefenderCloudBlockLevelType) String() string { + return []string{"notConfigured", "high", "highPlus", "zeroTolerance"}[i] +} +func ParseDefenderCloudBlockLevelType(v string) (interface{}, error) { + result := NOTCONFIGURED_DEFENDERCLOUDBLOCKLEVELTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DEFENDERCLOUDBLOCKLEVELTYPE + case "high": + result = HIGH_DEFENDERCLOUDBLOCKLEVELTYPE + case "highPlus": + result = HIGHPLUS_DEFENDERCLOUDBLOCKLEVELTYPE + case "zeroTolerance": + result = ZEROTOLERANCE_DEFENDERCLOUDBLOCKLEVELTYPE + default: + return 0, errors.New("Unknown DefenderCloudBlockLevelType value: " + v) + } + return &result, nil +} +func SerializeDefenderCloudBlockLevelType(values []DefenderCloudBlockLevelType) []string { + 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/defender_detected_malware_actions.go b/src/internal/connector/graph/betasdk/models/defender_detected_malware_actions.go new file mode 100644 index 000000000..0bdeace47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_detected_malware_actions.go @@ -0,0 +1,179 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefenderDetectedMalwareActions specify Defender’s actions to take on detected Malware per threat level. +type DefenderDetectedMalwareActions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defender’s default action to take on detected Malware threats. + highSeverity *DefenderThreatAction + // Defender’s default action to take on detected Malware threats. + lowSeverity *DefenderThreatAction + // Defender’s default action to take on detected Malware threats. + moderateSeverity *DefenderThreatAction + // The OdataType property + odataType *string + // Defender’s default action to take on detected Malware threats. + severeSeverity *DefenderThreatAction +} +// NewDefenderDetectedMalwareActions instantiates a new defenderDetectedMalwareActions and sets the default values. +func NewDefenderDetectedMalwareActions()(*DefenderDetectedMalwareActions) { + m := &DefenderDetectedMalwareActions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDefenderDetectedMalwareActionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDefenderDetectedMalwareActionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDefenderDetectedMalwareActions(), 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 *DefenderDetectedMalwareActions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DefenderDetectedMalwareActions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["highSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefenderThreatAction) + if err != nil { + return err + } + if val != nil { + m.SetHighSeverity(val.(*DefenderThreatAction)) + } + return nil + } + res["lowSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefenderThreatAction) + if err != nil { + return err + } + if val != nil { + m.SetLowSeverity(val.(*DefenderThreatAction)) + } + return nil + } + res["moderateSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefenderThreatAction) + if err != nil { + return err + } + if val != nil { + m.SetModerateSeverity(val.(*DefenderThreatAction)) + } + 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["severeSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefenderThreatAction) + if err != nil { + return err + } + if val != nil { + m.SetSevereSeverity(val.(*DefenderThreatAction)) + } + return nil + } + return res +} +// GetHighSeverity gets the highSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) GetHighSeverity()(*DefenderThreatAction) { + return m.highSeverity +} +// GetLowSeverity gets the lowSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) GetLowSeverity()(*DefenderThreatAction) { + return m.lowSeverity +} +// GetModerateSeverity gets the moderateSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) GetModerateSeverity()(*DefenderThreatAction) { + return m.moderateSeverity +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DefenderDetectedMalwareActions) GetOdataType()(*string) { + return m.odataType +} +// GetSevereSeverity gets the severeSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) GetSevereSeverity()(*DefenderThreatAction) { + return m.severeSeverity +} +// Serialize serializes information the current object +func (m *DefenderDetectedMalwareActions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetHighSeverity() != nil { + cast := (*m.GetHighSeverity()).String() + err := writer.WriteStringValue("highSeverity", &cast) + if err != nil { + return err + } + } + if m.GetLowSeverity() != nil { + cast := (*m.GetLowSeverity()).String() + err := writer.WriteStringValue("lowSeverity", &cast) + if err != nil { + return err + } + } + if m.GetModerateSeverity() != nil { + cast := (*m.GetModerateSeverity()).String() + err := writer.WriteStringValue("moderateSeverity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSevereSeverity() != nil { + cast := (*m.GetSevereSeverity()).String() + err := writer.WriteStringValue("severeSeverity", &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 *DefenderDetectedMalwareActions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHighSeverity sets the highSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) SetHighSeverity(value *DefenderThreatAction)() { + m.highSeverity = value +} +// SetLowSeverity sets the lowSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) SetLowSeverity(value *DefenderThreatAction)() { + m.lowSeverity = value +} +// SetModerateSeverity sets the moderateSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) SetModerateSeverity(value *DefenderThreatAction)() { + m.moderateSeverity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DefenderDetectedMalwareActions) SetOdataType(value *string)() { + m.odataType = value +} +// SetSevereSeverity sets the severeSeverity property value. Defender’s default action to take on detected Malware threats. +func (m *DefenderDetectedMalwareActions) SetSevereSeverity(value *DefenderThreatAction)() { + m.severeSeverity = value +} diff --git a/src/internal/connector/graph/betasdk/models/defender_detected_malware_actionsable.go b/src/internal/connector/graph/betasdk/models/defender_detected_malware_actionsable.go new file mode 100644 index 000000000..2ca618a95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_detected_malware_actionsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DefenderDetectedMalwareActionsable +type DefenderDetectedMalwareActionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHighSeverity()(*DefenderThreatAction) + GetLowSeverity()(*DefenderThreatAction) + GetModerateSeverity()(*DefenderThreatAction) + GetOdataType()(*string) + GetSevereSeverity()(*DefenderThreatAction) + SetHighSeverity(value *DefenderThreatAction)() + SetLowSeverity(value *DefenderThreatAction)() + SetModerateSeverity(value *DefenderThreatAction)() + SetOdataType(value *string)() + SetSevereSeverity(value *DefenderThreatAction)() +} diff --git a/src/internal/connector/graph/betasdk/models/defender_monitor_file_activity.go b/src/internal/connector/graph/betasdk/models/defender_monitor_file_activity.go new file mode 100644 index 000000000..27bd3713f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_monitor_file_activity.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderMonitorFileActivity int + +const ( + // User Defined, default value, no intent. + USERDEFINED_DEFENDERMONITORFILEACTIVITY DefenderMonitorFileActivity = iota + // Disable monitoring file activity. + DISABLE_DEFENDERMONITORFILEACTIVITY + // Monitor all files. + MONITORALLFILES_DEFENDERMONITORFILEACTIVITY + // Monitor incoming files only. + MONITORINCOMINGFILESONLY_DEFENDERMONITORFILEACTIVITY + // Monitor outgoing files only. + MONITOROUTGOINGFILESONLY_DEFENDERMONITORFILEACTIVITY +) + +func (i DefenderMonitorFileActivity) String() string { + return []string{"userDefined", "disable", "monitorAllFiles", "monitorIncomingFilesOnly", "monitorOutgoingFilesOnly"}[i] +} +func ParseDefenderMonitorFileActivity(v string) (interface{}, error) { + result := USERDEFINED_DEFENDERMONITORFILEACTIVITY + switch v { + case "userDefined": + result = USERDEFINED_DEFENDERMONITORFILEACTIVITY + case "disable": + result = DISABLE_DEFENDERMONITORFILEACTIVITY + case "monitorAllFiles": + result = MONITORALLFILES_DEFENDERMONITORFILEACTIVITY + case "monitorIncomingFilesOnly": + result = MONITORINCOMINGFILESONLY_DEFENDERMONITORFILEACTIVITY + case "monitorOutgoingFilesOnly": + result = MONITOROUTGOINGFILESONLY_DEFENDERMONITORFILEACTIVITY + default: + return 0, errors.New("Unknown DefenderMonitorFileActivity value: " + v) + } + return &result, nil +} +func SerializeDefenderMonitorFileActivity(values []DefenderMonitorFileActivity) []string { + 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/defender_potentially_unwanted_app_action.go b/src/internal/connector/graph/betasdk/models/defender_potentially_unwanted_app_action.go new file mode 100644 index 000000000..bc9bc3ed8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_potentially_unwanted_app_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderPotentiallyUnwantedAppAction int + +const ( + // PUA Protection is off. Defender will not protect against potentially unwanted applications. + DEVICEDEFAULT_DEFENDERPOTENTIALLYUNWANTEDAPPACTION DefenderPotentiallyUnwantedAppAction = iota + // PUA Protection is on. Detected items are blocked. They will show in history along with other threats. + BLOCK_DEFENDERPOTENTIALLYUNWANTEDAPPACTION + // Audit mode. Defender will detect potentially unwanted applications, but take no actions. You can review information about applications Defender would have taken action against by searching for events created by Defender in the Event Viewer. + AUDIT_DEFENDERPOTENTIALLYUNWANTEDAPPACTION +) + +func (i DefenderPotentiallyUnwantedAppAction) String() string { + return []string{"deviceDefault", "block", "audit"}[i] +} +func ParseDefenderPotentiallyUnwantedAppAction(v string) (interface{}, error) { + result := DEVICEDEFAULT_DEFENDERPOTENTIALLYUNWANTEDAPPACTION + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_DEFENDERPOTENTIALLYUNWANTEDAPPACTION + case "block": + result = BLOCK_DEFENDERPOTENTIALLYUNWANTEDAPPACTION + case "audit": + result = AUDIT_DEFENDERPOTENTIALLYUNWANTEDAPPACTION + default: + return 0, errors.New("Unknown DefenderPotentiallyUnwantedAppAction value: " + v) + } + return &result, nil +} +func SerializeDefenderPotentiallyUnwantedAppAction(values []DefenderPotentiallyUnwantedAppAction) []string { + 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/defender_prompt_for_sample_submission.go b/src/internal/connector/graph/betasdk/models/defender_prompt_for_sample_submission.go new file mode 100644 index 000000000..64ebc6d7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_prompt_for_sample_submission.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderPromptForSampleSubmission int + +const ( + // User Defined, default value, no intent. + USERDEFINED_DEFENDERPROMPTFORSAMPLESUBMISSION DefenderPromptForSampleSubmission = iota + // Always prompt. + ALWAYSPROMPT_DEFENDERPROMPTFORSAMPLESUBMISSION + // Send safe samples automatically. + PROMPTBEFORESENDINGPERSONALDATA_DEFENDERPROMPTFORSAMPLESUBMISSION + // Never send data. + NEVERSENDDATA_DEFENDERPROMPTFORSAMPLESUBMISSION + // Send all data without prompting. + SENDALLDATAWITHOUTPROMPTING_DEFENDERPROMPTFORSAMPLESUBMISSION +) + +func (i DefenderPromptForSampleSubmission) String() string { + return []string{"userDefined", "alwaysPrompt", "promptBeforeSendingPersonalData", "neverSendData", "sendAllDataWithoutPrompting"}[i] +} +func ParseDefenderPromptForSampleSubmission(v string) (interface{}, error) { + result := USERDEFINED_DEFENDERPROMPTFORSAMPLESUBMISSION + switch v { + case "userDefined": + result = USERDEFINED_DEFENDERPROMPTFORSAMPLESUBMISSION + case "alwaysPrompt": + result = ALWAYSPROMPT_DEFENDERPROMPTFORSAMPLESUBMISSION + case "promptBeforeSendingPersonalData": + result = PROMPTBEFORESENDINGPERSONALDATA_DEFENDERPROMPTFORSAMPLESUBMISSION + case "neverSendData": + result = NEVERSENDDATA_DEFENDERPROMPTFORSAMPLESUBMISSION + case "sendAllDataWithoutPrompting": + result = SENDALLDATAWITHOUTPROMPTING_DEFENDERPROMPTFORSAMPLESUBMISSION + default: + return 0, errors.New("Unknown DefenderPromptForSampleSubmission value: " + v) + } + return &result, nil +} +func SerializeDefenderPromptForSampleSubmission(values []DefenderPromptForSampleSubmission) []string { + 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/defender_protection_type.go b/src/internal/connector/graph/betasdk/models/defender_protection_type.go new file mode 100644 index 000000000..f765e0f8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_protection_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderProtectionType int + +const ( + // Device default value, no intent. + USERDEFINED_DEFENDERPROTECTIONTYPE DefenderProtectionType = iota + // Block functionality. + ENABLE_DEFENDERPROTECTIONTYPE + // Allow functionality but generate logs. + AUDITMODE_DEFENDERPROTECTIONTYPE + // Warning message to end user with ability to bypass block from attack surface reduction rule. + WARN_DEFENDERPROTECTIONTYPE + // Not configured. + NOTCONFIGURED_DEFENDERPROTECTIONTYPE +) + +func (i DefenderProtectionType) String() string { + return []string{"userDefined", "enable", "auditMode", "warn", "notConfigured"}[i] +} +func ParseDefenderProtectionType(v string) (interface{}, error) { + result := USERDEFINED_DEFENDERPROTECTIONTYPE + switch v { + case "userDefined": + result = USERDEFINED_DEFENDERPROTECTIONTYPE + case "enable": + result = ENABLE_DEFENDERPROTECTIONTYPE + case "auditMode": + result = AUDITMODE_DEFENDERPROTECTIONTYPE + case "warn": + result = WARN_DEFENDERPROTECTIONTYPE + case "notConfigured": + result = NOTCONFIGURED_DEFENDERPROTECTIONTYPE + default: + return 0, errors.New("Unknown DefenderProtectionType value: " + v) + } + return &result, nil +} +func SerializeDefenderProtectionType(values []DefenderProtectionType) []string { + 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/defender_realtime_scan_direction.go b/src/internal/connector/graph/betasdk/models/defender_realtime_scan_direction.go new file mode 100644 index 000000000..5942a404a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_realtime_scan_direction.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderRealtimeScanDirection int + +const ( + // 0 (default) – Monitor all files(bi-directional) + MONITORALLFILES_DEFENDERREALTIMESCANDIRECTION DefenderRealtimeScanDirection = iota + // Monitor incoming files only. + MONITORINCOMINGFILESONLY_DEFENDERREALTIMESCANDIRECTION + // Monitor outgoing files only. + MONITOROUTGOINGFILESONLY_DEFENDERREALTIMESCANDIRECTION +) + +func (i DefenderRealtimeScanDirection) String() string { + return []string{"monitorAllFiles", "monitorIncomingFilesOnly", "monitorOutgoingFilesOnly"}[i] +} +func ParseDefenderRealtimeScanDirection(v string) (interface{}, error) { + result := MONITORALLFILES_DEFENDERREALTIMESCANDIRECTION + switch v { + case "monitorAllFiles": + result = MONITORALLFILES_DEFENDERREALTIMESCANDIRECTION + case "monitorIncomingFilesOnly": + result = MONITORINCOMINGFILESONLY_DEFENDERREALTIMESCANDIRECTION + case "monitorOutgoingFilesOnly": + result = MONITOROUTGOINGFILESONLY_DEFENDERREALTIMESCANDIRECTION + default: + return 0, errors.New("Unknown DefenderRealtimeScanDirection value: " + v) + } + return &result, nil +} +func SerializeDefenderRealtimeScanDirection(values []DefenderRealtimeScanDirection) []string { + 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/defender_scan_type.go b/src/internal/connector/graph/betasdk/models/defender_scan_type.go new file mode 100644 index 000000000..6f0eeaca6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_scan_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderScanType int + +const ( + // User Defined, default value, no intent. + USERDEFINED_DEFENDERSCANTYPE DefenderScanType = iota + // System scan disabled. + DISABLED_DEFENDERSCANTYPE + // Quick system scan. + QUICK_DEFENDERSCANTYPE + // Full system scan. + FULL_DEFENDERSCANTYPE +) + +func (i DefenderScanType) String() string { + return []string{"userDefined", "disabled", "quick", "full"}[i] +} +func ParseDefenderScanType(v string) (interface{}, error) { + result := USERDEFINED_DEFENDERSCANTYPE + switch v { + case "userDefined": + result = USERDEFINED_DEFENDERSCANTYPE + case "disabled": + result = DISABLED_DEFENDERSCANTYPE + case "quick": + result = QUICK_DEFENDERSCANTYPE + case "full": + result = FULL_DEFENDERSCANTYPE + default: + return 0, errors.New("Unknown DefenderScanType value: " + v) + } + return &result, nil +} +func SerializeDefenderScanType(values []DefenderScanType) []string { + 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/defender_security_center_i_t_contact_display_type.go b/src/internal/connector/graph/betasdk/models/defender_security_center_i_t_contact_display_type.go new file mode 100644 index 000000000..434188753 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_security_center_i_t_contact_display_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderSecurityCenterITContactDisplayType int + +const ( + // Not Configured + NOTCONFIGURED_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE DefenderSecurityCenterITContactDisplayType = iota + // Display in app and in notifications + DISPLAYINAPPANDINNOTIFICATIONS_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + // Display only in app + DISPLAYONLYINAPP_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + // Display only in notifications + DISPLAYONLYINNOTIFICATIONS_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE +) + +func (i DefenderSecurityCenterITContactDisplayType) String() string { + return []string{"notConfigured", "displayInAppAndInNotifications", "displayOnlyInApp", "displayOnlyInNotifications"}[i] +} +func ParseDefenderSecurityCenterITContactDisplayType(v string) (interface{}, error) { + result := NOTCONFIGURED_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + case "displayInAppAndInNotifications": + result = DISPLAYINAPPANDINNOTIFICATIONS_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + case "displayOnlyInApp": + result = DISPLAYONLYINAPP_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + case "displayOnlyInNotifications": + result = DISPLAYONLYINNOTIFICATIONS_DEFENDERSECURITYCENTERITCONTACTDISPLAYTYPE + default: + return 0, errors.New("Unknown DefenderSecurityCenterITContactDisplayType value: " + v) + } + return &result, nil +} +func SerializeDefenderSecurityCenterITContactDisplayType(values []DefenderSecurityCenterITContactDisplayType) []string { + 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/defender_security_center_notifications_from_app_type.go b/src/internal/connector/graph/betasdk/models/defender_security_center_notifications_from_app_type.go new file mode 100644 index 000000000..166583af4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_security_center_notifications_from_app_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderSecurityCenterNotificationsFromAppType int + +const ( + // Not Configured + NOTCONFIGURED_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE DefenderSecurityCenterNotificationsFromAppType = iota + // Block non-critical notifications + BLOCKNONCRITICALNOTIFICATIONS_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE + // Block all notifications + BLOCKALLNOTIFICATIONS_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE +) + +func (i DefenderSecurityCenterNotificationsFromAppType) String() string { + return []string{"notConfigured", "blockNoncriticalNotifications", "blockAllNotifications"}[i] +} +func ParseDefenderSecurityCenterNotificationsFromAppType(v string) (interface{}, error) { + result := NOTCONFIGURED_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE + case "blockNoncriticalNotifications": + result = BLOCKNONCRITICALNOTIFICATIONS_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE + case "blockAllNotifications": + result = BLOCKALLNOTIFICATIONS_DEFENDERSECURITYCENTERNOTIFICATIONSFROMAPPTYPE + default: + return 0, errors.New("Unknown DefenderSecurityCenterNotificationsFromAppType value: " + v) + } + return &result, nil +} +func SerializeDefenderSecurityCenterNotificationsFromAppType(values []DefenderSecurityCenterNotificationsFromAppType) []string { + 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/defender_submit_samples_consent_type.go b/src/internal/connector/graph/betasdk/models/defender_submit_samples_consent_type.go new file mode 100644 index 000000000..4adaf9e40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_submit_samples_consent_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderSubmitSamplesConsentType int + +const ( + // Send safe samples automatically + SENDSAFESAMPLESAUTOMATICALLY_DEFENDERSUBMITSAMPLESCONSENTTYPE DefenderSubmitSamplesConsentType = iota + // Always prompt + ALWAYSPROMPT_DEFENDERSUBMITSAMPLESCONSENTTYPE + // Never send + NEVERSEND_DEFENDERSUBMITSAMPLESCONSENTTYPE + // Send all samples automatically + SENDALLSAMPLESAUTOMATICALLY_DEFENDERSUBMITSAMPLESCONSENTTYPE +) + +func (i DefenderSubmitSamplesConsentType) String() string { + return []string{"sendSafeSamplesAutomatically", "alwaysPrompt", "neverSend", "sendAllSamplesAutomatically"}[i] +} +func ParseDefenderSubmitSamplesConsentType(v string) (interface{}, error) { + result := SENDSAFESAMPLESAUTOMATICALLY_DEFENDERSUBMITSAMPLESCONSENTTYPE + switch v { + case "sendSafeSamplesAutomatically": + result = SENDSAFESAMPLESAUTOMATICALLY_DEFENDERSUBMITSAMPLESCONSENTTYPE + case "alwaysPrompt": + result = ALWAYSPROMPT_DEFENDERSUBMITSAMPLESCONSENTTYPE + case "neverSend": + result = NEVERSEND_DEFENDERSUBMITSAMPLESCONSENTTYPE + case "sendAllSamplesAutomatically": + result = SENDALLSAMPLESAUTOMATICALLY_DEFENDERSUBMITSAMPLESCONSENTTYPE + default: + return 0, errors.New("Unknown DefenderSubmitSamplesConsentType value: " + v) + } + return &result, nil +} +func SerializeDefenderSubmitSamplesConsentType(values []DefenderSubmitSamplesConsentType) []string { + 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/defender_threat_action.go b/src/internal/connector/graph/betasdk/models/defender_threat_action.go new file mode 100644 index 000000000..c28424516 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/defender_threat_action.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderThreatAction int + +const ( + // Apply action based on the update definition. + DEVICEDEFAULT_DEFENDERTHREATACTION DefenderThreatAction = iota + // Clean the detected threat. + CLEAN_DEFENDERTHREATACTION + // Quarantine the detected threat. + QUARANTINE_DEFENDERTHREATACTION + // Remove the detected threat. + REMOVE_DEFENDERTHREATACTION + // Allow the detected threat. + ALLOW_DEFENDERTHREATACTION + // Allow the user to determine the action to take with the detected threat. + USERDEFINED_DEFENDERTHREATACTION + // Block the detected threat. + BLOCK_DEFENDERTHREATACTION +) + +func (i DefenderThreatAction) String() string { + return []string{"deviceDefault", "clean", "quarantine", "remove", "allow", "userDefined", "block"}[i] +} +func ParseDefenderThreatAction(v string) (interface{}, error) { + result := DEVICEDEFAULT_DEFENDERTHREATACTION + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_DEFENDERTHREATACTION + case "clean": + result = CLEAN_DEFENDERTHREATACTION + case "quarantine": + result = QUARANTINE_DEFENDERTHREATACTION + case "remove": + result = REMOVE_DEFENDERTHREATACTION + case "allow": + result = ALLOW_DEFENDERTHREATACTION + case "userDefined": + result = USERDEFINED_DEFENDERTHREATACTION + case "block": + result = BLOCK_DEFENDERTHREATACTION + default: + return 0, errors.New("Unknown DefenderThreatAction value: " + v) + } + return &result, nil +} +func SerializeDefenderThreatAction(values []DefenderThreatAction) []string { + 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/delegate_meeting_message_delivery_options.go b/src/internal/connector/graph/betasdk/models/delegate_meeting_message_delivery_options.go new file mode 100644 index 000000000..5d52b17eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegate_meeting_message_delivery_options.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegateMeetingMessageDeliveryOptions int + +const ( + SENDTODELEGATEANDINFORMATIONTOPRINCIPAL_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS DelegateMeetingMessageDeliveryOptions = iota + SENDTODELEGATEANDPRINCIPAL_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS + SENDTODELEGATEONLY_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS +) + +func (i DelegateMeetingMessageDeliveryOptions) String() string { + return []string{"sendToDelegateAndInformationToPrincipal", "sendToDelegateAndPrincipal", "sendToDelegateOnly"}[i] +} +func ParseDelegateMeetingMessageDeliveryOptions(v string) (interface{}, error) { + result := SENDTODELEGATEANDINFORMATIONTOPRINCIPAL_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS + switch v { + case "sendToDelegateAndInformationToPrincipal": + result = SENDTODELEGATEANDINFORMATIONTOPRINCIPAL_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS + case "sendToDelegateAndPrincipal": + result = SENDTODELEGATEANDPRINCIPAL_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS + case "sendToDelegateOnly": + result = SENDTODELEGATEONLY_DELEGATEMEETINGMESSAGEDELIVERYOPTIONS + default: + return 0, errors.New("Unknown DelegateMeetingMessageDeliveryOptions value: " + v) + } + return &result, nil +} +func SerializeDelegateMeetingMessageDeliveryOptions(values []DelegateMeetingMessageDeliveryOptions) []string { + 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/delegated_admin_access_assignment.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment.go new file mode 100644 index 000000000..dc25b8a39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminAccessAssignment struct { + Entity + // The accessContainer property + accessContainer DelegatedAdminAccessContainerable + // The accessDetails property + accessDetails DelegatedAdminAccessDetailsable + // The date and time in ISO 8601 format and in UTC time when the access assignment was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time in ISO 8601 and in UTC time when this access assignment was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status of the access assignment. Read-only. The possible values are: pending, active, deleting, deleted, error, unknownFutureValue. + status *DelegatedAdminAccessAssignmentStatus +} +// NewDelegatedAdminAccessAssignment instantiates a new delegatedAdminAccessAssignment and sets the default values. +func NewDelegatedAdminAccessAssignment()(*DelegatedAdminAccessAssignment) { + m := &DelegatedAdminAccessAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminAccessAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminAccessAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminAccessAssignment(), nil +} +// GetAccessContainer gets the accessContainer property value. The accessContainer property +func (m *DelegatedAdminAccessAssignment) GetAccessContainer()(DelegatedAdminAccessContainerable) { + return m.accessContainer +} +// GetAccessDetails gets the accessDetails property value. The accessDetails property +func (m *DelegatedAdminAccessAssignment) GetAccessDetails()(DelegatedAdminAccessDetailsable) { + return m.accessDetails +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the access assignment was created. Read-only. +func (m *DelegatedAdminAccessAssignment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminAccessAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessContainer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDelegatedAdminAccessContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessContainer(val.(DelegatedAdminAccessContainerable)) + } + return nil + } + res["accessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDelegatedAdminAccessDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessDetails(val.(DelegatedAdminAccessDetailsable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminAccessAssignmentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DelegatedAdminAccessAssignmentStatus)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time in ISO 8601 and in UTC time when this access assignment was last modified. Read-only. +func (m *DelegatedAdminAccessAssignment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStatus gets the status property value. The status of the access assignment. Read-only. The possible values are: pending, active, deleting, deleted, error, unknownFutureValue. +func (m *DelegatedAdminAccessAssignment) GetStatus()(*DelegatedAdminAccessAssignmentStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DelegatedAdminAccessAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accessContainer", m.GetAccessContainer()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessDetails", m.GetAccessDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAccessContainer sets the accessContainer property value. The accessContainer property +func (m *DelegatedAdminAccessAssignment) SetAccessContainer(value DelegatedAdminAccessContainerable)() { + m.accessContainer = value +} +// SetAccessDetails sets the accessDetails property value. The accessDetails property +func (m *DelegatedAdminAccessAssignment) SetAccessDetails(value DelegatedAdminAccessDetailsable)() { + m.accessDetails = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the access assignment was created. Read-only. +func (m *DelegatedAdminAccessAssignment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time in ISO 8601 and in UTC time when this access assignment was last modified. Read-only. +func (m *DelegatedAdminAccessAssignment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStatus sets the status property value. The status of the access assignment. Read-only. The possible values are: pending, active, deleting, deleted, error, unknownFutureValue. +func (m *DelegatedAdminAccessAssignment) SetStatus(value *DelegatedAdminAccessAssignmentStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_response.go new file mode 100644 index 000000000..df6fbbc49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessAssignmentCollectionResponse +type DelegatedAdminAccessAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminAccessAssignmentable +} +// NewDelegatedAdminAccessAssignmentCollectionResponse instantiates a new DelegatedAdminAccessAssignmentCollectionResponse and sets the default values. +func NewDelegatedAdminAccessAssignmentCollectionResponse()(*DelegatedAdminAccessAssignmentCollectionResponse) { + m := &DelegatedAdminAccessAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminAccessAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminAccessAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminAccessAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminAccessAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminAccessAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminAccessAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminAccessAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminAccessAssignmentCollectionResponse) GetValue()([]DelegatedAdminAccessAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminAccessAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminAccessAssignmentCollectionResponse) SetValue(value []DelegatedAdminAccessAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_responseable.go new file mode 100644 index 000000000..4c63e5923 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessAssignmentCollectionResponseable +type DelegatedAdminAccessAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminAccessAssignmentable) + SetValue(value []DelegatedAdminAccessAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_status.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_status.go new file mode 100644 index 000000000..78df27db6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignment_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminAccessAssignmentStatus int + +const ( + PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS DelegatedAdminAccessAssignmentStatus = iota + ACTIVE_DELEGATEDADMINACCESSASSIGNMENTSTATUS + DELETING_DELEGATEDADMINACCESSASSIGNMENTSTATUS + DELETED_DELEGATEDADMINACCESSASSIGNMENTSTATUS + ERROR_DELEGATEDADMINACCESSASSIGNMENTSTATUS + UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSASSIGNMENTSTATUS +) + +func (i DelegatedAdminAccessAssignmentStatus) String() string { + return []string{"pending", "active", "deleting", "deleted", "error", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminAccessAssignmentStatus(v string) (interface{}, error) { + result := PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS + switch v { + case "pending": + result = PENDING_DELEGATEDADMINACCESSASSIGNMENTSTATUS + case "active": + result = ACTIVE_DELEGATEDADMINACCESSASSIGNMENTSTATUS + case "deleting": + result = DELETING_DELEGATEDADMINACCESSASSIGNMENTSTATUS + case "deleted": + result = DELETED_DELEGATEDADMINACCESSASSIGNMENTSTATUS + case "error": + result = ERROR_DELEGATEDADMINACCESSASSIGNMENTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSASSIGNMENTSTATUS + default: + return 0, errors.New("Unknown DelegatedAdminAccessAssignmentStatus value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminAccessAssignmentStatus(values []DelegatedAdminAccessAssignmentStatus) []string { + 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/delegated_admin_access_assignmentable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignmentable.go new file mode 100644 index 000000000..0b0124e6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_assignmentable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessAssignmentable +type DelegatedAdminAccessAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessContainer()(DelegatedAdminAccessContainerable) + GetAccessDetails()(DelegatedAdminAccessDetailsable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*DelegatedAdminAccessAssignmentStatus) + SetAccessContainer(value DelegatedAdminAccessContainerable)() + SetAccessDetails(value DelegatedAdminAccessDetailsable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *DelegatedAdminAccessAssignmentStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_container.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_container.go new file mode 100644 index 000000000..b98ac7739 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_container.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessContainer +type DelegatedAdminAccessContainer struct { + // The identifier of the access container (for example, a security group). For 'securityGroup' access containers, this must be a valid ID of an Azure AD security group in the Microsoft partner's tenant. + accessContainerId *string + // The accessContainerType property + accessContainerType *DelegatedAdminAccessContainerType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string +} +// NewDelegatedAdminAccessContainer instantiates a new delegatedAdminAccessContainer and sets the default values. +func NewDelegatedAdminAccessContainer()(*DelegatedAdminAccessContainer) { + m := &DelegatedAdminAccessContainer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDelegatedAdminAccessContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminAccessContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminAccessContainer(), nil +} +// GetAccessContainerId gets the accessContainerId property value. The identifier of the access container (for example, a security group). For 'securityGroup' access containers, this must be a valid ID of an Azure AD security group in the Microsoft partner's tenant. +func (m *DelegatedAdminAccessContainer) GetAccessContainerId()(*string) { + return m.accessContainerId +} +// GetAccessContainerType gets the accessContainerType property value. The accessContainerType property +func (m *DelegatedAdminAccessContainer) GetAccessContainerType()(*DelegatedAdminAccessContainerType) { + return m.accessContainerType +} +// 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 *DelegatedAdminAccessContainer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminAccessContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessContainerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessContainerId(val) + } + return nil + } + res["accessContainerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminAccessContainerType) + if err != nil { + return err + } + if val != nil { + m.SetAccessContainerType(val.(*DelegatedAdminAccessContainerType)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DelegatedAdminAccessContainer) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DelegatedAdminAccessContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accessContainerId", m.GetAccessContainerId()) + if err != nil { + return err + } + } + if m.GetAccessContainerType() != nil { + cast := (*m.GetAccessContainerType()).String() + err := writer.WriteStringValue("accessContainerType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessContainerId sets the accessContainerId property value. The identifier of the access container (for example, a security group). For 'securityGroup' access containers, this must be a valid ID of an Azure AD security group in the Microsoft partner's tenant. +func (m *DelegatedAdminAccessContainer) SetAccessContainerId(value *string)() { + m.accessContainerId = value +} +// SetAccessContainerType sets the accessContainerType property value. The accessContainerType property +func (m *DelegatedAdminAccessContainer) SetAccessContainerType(value *DelegatedAdminAccessContainerType)() { + m.accessContainerType = value +} +// 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 *DelegatedAdminAccessContainer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DelegatedAdminAccessContainer) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_container_type.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_container_type.go new file mode 100644 index 000000000..a231b2ab2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_container_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminAccessContainerType int + +const ( + SECURITYGROUP_DELEGATEDADMINACCESSCONTAINERTYPE DelegatedAdminAccessContainerType = iota + UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSCONTAINERTYPE +) + +func (i DelegatedAdminAccessContainerType) String() string { + return []string{"securityGroup", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminAccessContainerType(v string) (interface{}, error) { + result := SECURITYGROUP_DELEGATEDADMINACCESSCONTAINERTYPE + switch v { + case "securityGroup": + result = SECURITYGROUP_DELEGATEDADMINACCESSCONTAINERTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINACCESSCONTAINERTYPE + default: + return 0, errors.New("Unknown DelegatedAdminAccessContainerType value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminAccessContainerType(values []DelegatedAdminAccessContainerType) []string { + 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/delegated_admin_access_containerable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_containerable.go new file mode 100644 index 000000000..6e77500c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_containerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessContainerable +type DelegatedAdminAccessContainerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessContainerId()(*string) + GetAccessContainerType()(*DelegatedAdminAccessContainerType) + GetOdataType()(*string) + SetAccessContainerId(value *string)() + SetAccessContainerType(value *DelegatedAdminAccessContainerType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_details.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_details.go new file mode 100644 index 000000000..b9b60f6e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_details.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessDetails +type DelegatedAdminAccessDetails 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 OdataType property + odataType *string + // The directory roles that the Microsoft partner is assigned in the customer tenant. + unifiedRoles []UnifiedRoleable +} +// NewDelegatedAdminAccessDetails instantiates a new delegatedAdminAccessDetails and sets the default values. +func NewDelegatedAdminAccessDetails()(*DelegatedAdminAccessDetails) { + m := &DelegatedAdminAccessDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDelegatedAdminAccessDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminAccessDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminAccessDetails(), 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 *DelegatedAdminAccessDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminAccessDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["unifiedRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleable) + } + m.SetUnifiedRoles(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DelegatedAdminAccessDetails) GetOdataType()(*string) { + return m.odataType +} +// GetUnifiedRoles gets the unifiedRoles property value. The directory roles that the Microsoft partner is assigned in the customer tenant. +func (m *DelegatedAdminAccessDetails) GetUnifiedRoles()([]UnifiedRoleable) { + return m.unifiedRoles +} +// Serialize serializes information the current object +func (m *DelegatedAdminAccessDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetUnifiedRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnifiedRoles())) + for i, v := range m.GetUnifiedRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("unifiedRoles", 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 *DelegatedAdminAccessDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DelegatedAdminAccessDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetUnifiedRoles sets the unifiedRoles property value. The directory roles that the Microsoft partner is assigned in the customer tenant. +func (m *DelegatedAdminAccessDetails) SetUnifiedRoles(value []UnifiedRoleable)() { + m.unifiedRoles = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_access_detailsable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_access_detailsable.go new file mode 100644 index 000000000..f62b43d47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_access_detailsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminAccessDetailsable +type DelegatedAdminAccessDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetUnifiedRoles()([]UnifiedRoleable) + SetOdataType(value *string)() + SetUnifiedRoles(value []UnifiedRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_customer.go b/src/internal/connector/graph/betasdk/models/delegated_admin_customer.go new file mode 100644 index 000000000..3ce97545d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_customer.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminCustomer +type DelegatedAdminCustomer struct { + Entity + // The Azure AD display name of the customer tenant. Read-only. Supports $orderBy. + displayName *string + // Contains the management details of a service in the customer tenant that's managed by delegated administration. + serviceManagementDetails []DelegatedAdminServiceManagementDetailable + // The Azure AD-assigned tenant ID of the customer. Read-only. + tenantId *string +} +// NewDelegatedAdminCustomer instantiates a new DelegatedAdminCustomer and sets the default values. +func NewDelegatedAdminCustomer()(*DelegatedAdminCustomer) { + m := &DelegatedAdminCustomer{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminCustomerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminCustomerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminCustomer(), nil +} +// GetDisplayName gets the displayName property value. The Azure AD display name of the customer tenant. Read-only. Supports $orderBy. +func (m *DelegatedAdminCustomer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminCustomer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["serviceManagementDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminServiceManagementDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminServiceManagementDetailable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminServiceManagementDetailable) + } + m.SetServiceManagementDetails(res) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetServiceManagementDetails gets the serviceManagementDetails property value. Contains the management details of a service in the customer tenant that's managed by delegated administration. +func (m *DelegatedAdminCustomer) GetServiceManagementDetails()([]DelegatedAdminServiceManagementDetailable) { + return m.serviceManagementDetails +} +// GetTenantId gets the tenantId property value. The Azure AD-assigned tenant ID of the customer. Read-only. +func (m *DelegatedAdminCustomer) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *DelegatedAdminCustomer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetServiceManagementDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServiceManagementDetails())) + for i, v := range m.GetServiceManagementDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("serviceManagementDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The Azure AD display name of the customer tenant. Read-only. Supports $orderBy. +func (m *DelegatedAdminCustomer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetServiceManagementDetails sets the serviceManagementDetails property value. Contains the management details of a service in the customer tenant that's managed by delegated administration. +func (m *DelegatedAdminCustomer) SetServiceManagementDetails(value []DelegatedAdminServiceManagementDetailable)() { + m.serviceManagementDetails = value +} +// SetTenantId sets the tenantId property value. The Azure AD-assigned tenant ID of the customer. Read-only. +func (m *DelegatedAdminCustomer) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_response.go new file mode 100644 index 000000000..a65124d01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminCustomerCollectionResponse +type DelegatedAdminCustomerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminCustomerable +} +// NewDelegatedAdminCustomerCollectionResponse instantiates a new DelegatedAdminCustomerCollectionResponse and sets the default values. +func NewDelegatedAdminCustomerCollectionResponse()(*DelegatedAdminCustomerCollectionResponse) { + m := &DelegatedAdminCustomerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminCustomerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminCustomerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminCustomerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminCustomerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminCustomerable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminCustomerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminCustomerCollectionResponse) GetValue()([]DelegatedAdminCustomerable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminCustomerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminCustomerCollectionResponse) SetValue(value []DelegatedAdminCustomerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_responseable.go new file mode 100644 index 000000000..9b97663a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_customer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminCustomerCollectionResponseable +type DelegatedAdminCustomerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminCustomerable) + SetValue(value []DelegatedAdminCustomerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_customerable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_customerable.go new file mode 100644 index 000000000..76babe9da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_customerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminCustomerable +type DelegatedAdminCustomerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetServiceManagementDetails()([]DelegatedAdminServiceManagementDetailable) + GetTenantId()(*string) + SetDisplayName(value *string)() + SetServiceManagementDetails(value []DelegatedAdminServiceManagementDetailable)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship.go new file mode 100644 index 000000000..53238e13f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship.go @@ -0,0 +1,372 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationship +type DelegatedAdminRelationship struct { + Entity + // The access assignments associated with the delegated admin relationship. + accessAssignments []DelegatedAdminAccessAssignmentable + // The accessDetails property + accessDetails DelegatedAdminAccessDetailsable + // The date and time in ISO 8601 format and in UTC time when the relationship became active. Read-only. + activatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time in ISO 8601 format and in UTC time when the relationship was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name and unique identifier of the customer of the relationship. This is configured either by the partner at the time the relationship is created or by the system after the customer approves the relationship. Cannot be changed by the customer. + customer DelegatedAdminRelationshipCustomerParticipantable + // The display name of the relationship used for ease of identification. Must be unique across all delegated admin relationships of the partner. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. + displayName *string + // The duration of the relationship in ISO 8601 format. Must be a value between P1D and P2Y inclusive. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The date and time in ISO 8601 format and in UTC time when the status of relationship changes to either terminated or expired. Calculated as endDateTime = activatedDateTime + duration. Read-only. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time in ISO 8601 format and in UTC time when the relationship was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The long running operations associated with the delegated admin relationship. + operations []DelegatedAdminRelationshipOperationable + // The requests associated with the delegated admin relationship. + requests []DelegatedAdminRelationshipRequestable + // The status of the relationship. Read Only. The possible values are: activating, active, approvalPending, approved, created, expired, expiring, terminated, terminating, terminationRequested, unknownFutureValue. Supports $orderBy. + status *DelegatedAdminRelationshipStatus +} +// NewDelegatedAdminRelationship instantiates a new DelegatedAdminRelationship and sets the default values. +func NewDelegatedAdminRelationship()(*DelegatedAdminRelationship) { + m := &DelegatedAdminRelationship{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminRelationshipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationship(), nil +} +// GetAccessAssignments gets the accessAssignments property value. The access assignments associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) GetAccessAssignments()([]DelegatedAdminAccessAssignmentable) { + return m.accessAssignments +} +// GetAccessDetails gets the accessDetails property value. The accessDetails property +func (m *DelegatedAdminRelationship) GetAccessDetails()(DelegatedAdminAccessDetailsable) { + return m.accessDetails +} +// GetActivatedDateTime gets the activatedDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship became active. Read-only. +func (m *DelegatedAdminRelationship) GetActivatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activatedDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship was created. Read-only. +func (m *DelegatedAdminRelationship) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomer gets the customer property value. The display name and unique identifier of the customer of the relationship. This is configured either by the partner at the time the relationship is created or by the system after the customer approves the relationship. Cannot be changed by the customer. +func (m *DelegatedAdminRelationship) GetCustomer()(DelegatedAdminRelationshipCustomerParticipantable) { + return m.customer +} +// GetDisplayName gets the displayName property value. The display name of the relationship used for ease of identification. Must be unique across all delegated admin relationships of the partner. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. +func (m *DelegatedAdminRelationship) GetDisplayName()(*string) { + return m.displayName +} +// GetDuration gets the duration property value. The duration of the relationship in ISO 8601 format. Must be a value between P1D and P2Y inclusive. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. +func (m *DelegatedAdminRelationship) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetEndDateTime gets the endDateTime property value. The date and time in ISO 8601 format and in UTC time when the status of relationship changes to either terminated or expired. Calculated as endDateTime = activatedDateTime + duration. Read-only. +func (m *DelegatedAdminRelationship) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationship) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminAccessAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminAccessAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminAccessAssignmentable) + } + m.SetAccessAssignments(res) + } + return nil + } + res["accessDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDelegatedAdminAccessDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccessDetails(val.(DelegatedAdminAccessDetailsable)) + } + return nil + } + res["activatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivatedDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDelegatedAdminRelationshipCustomerParticipantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(DelegatedAdminRelationshipCustomerParticipantable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminRelationshipOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminRelationshipOperationable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminRelationshipOperationable) + } + m.SetOperations(res) + } + return nil + } + res["requests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminRelationshipRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminRelationshipRequestable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminRelationshipRequestable) + } + m.SetRequests(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminRelationshipStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DelegatedAdminRelationshipStatus)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship was last modified. Read-only. +func (m *DelegatedAdminRelationship) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOperations gets the operations property value. The long running operations associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) GetOperations()([]DelegatedAdminRelationshipOperationable) { + return m.operations +} +// GetRequests gets the requests property value. The requests associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) GetRequests()([]DelegatedAdminRelationshipRequestable) { + return m.requests +} +// GetStatus gets the status property value. The status of the relationship. Read Only. The possible values are: activating, active, approvalPending, approved, created, expired, expiring, terminated, terminating, terminationRequested, unknownFutureValue. Supports $orderBy. +func (m *DelegatedAdminRelationship) GetStatus()(*DelegatedAdminRelationshipStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationship) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessAssignments())) + for i, v := range m.GetAccessAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("accessDetails", m.GetAccessDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activatedDateTime", m.GetActivatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRequests())) + for i, v := range m.GetRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("requests", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAccessAssignments sets the accessAssignments property value. The access assignments associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) SetAccessAssignments(value []DelegatedAdminAccessAssignmentable)() { + m.accessAssignments = value +} +// SetAccessDetails sets the accessDetails property value. The accessDetails property +func (m *DelegatedAdminRelationship) SetAccessDetails(value DelegatedAdminAccessDetailsable)() { + m.accessDetails = value +} +// SetActivatedDateTime sets the activatedDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship became active. Read-only. +func (m *DelegatedAdminRelationship) SetActivatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activatedDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship was created. Read-only. +func (m *DelegatedAdminRelationship) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomer sets the customer property value. The display name and unique identifier of the customer of the relationship. This is configured either by the partner at the time the relationship is created or by the system after the customer approves the relationship. Cannot be changed by the customer. +func (m *DelegatedAdminRelationship) SetCustomer(value DelegatedAdminRelationshipCustomerParticipantable)() { + m.customer = value +} +// SetDisplayName sets the displayName property value. The display name of the relationship used for ease of identification. Must be unique across all delegated admin relationships of the partner. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. +func (m *DelegatedAdminRelationship) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDuration sets the duration property value. The duration of the relationship in ISO 8601 format. Must be a value between P1D and P2Y inclusive. This is set by the partner only when the relationship is in the created status and cannot be changed by the customer. +func (m *DelegatedAdminRelationship) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetEndDateTime sets the endDateTime property value. The date and time in ISO 8601 format and in UTC time when the status of relationship changes to either terminated or expired. Calculated as endDateTime = activatedDateTime + duration. Read-only. +func (m *DelegatedAdminRelationship) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship was last modified. Read-only. +func (m *DelegatedAdminRelationship) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOperations sets the operations property value. The long running operations associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) SetOperations(value []DelegatedAdminRelationshipOperationable)() { + m.operations = value +} +// SetRequests sets the requests property value. The requests associated with the delegated admin relationship. +func (m *DelegatedAdminRelationship) SetRequests(value []DelegatedAdminRelationshipRequestable)() { + m.requests = value +} +// SetStatus sets the status property value. The status of the relationship. Read Only. The possible values are: activating, active, approvalPending, approved, created, expired, expiring, terminated, terminating, terminationRequested, unknownFutureValue. Supports $orderBy. +func (m *DelegatedAdminRelationship) SetStatus(value *DelegatedAdminRelationshipStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_response.go new file mode 100644 index 000000000..89c73db26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipCollectionResponse +type DelegatedAdminRelationshipCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminRelationshipable +} +// NewDelegatedAdminRelationshipCollectionResponse instantiates a new DelegatedAdminRelationshipCollectionResponse and sets the default values. +func NewDelegatedAdminRelationshipCollectionResponse()(*DelegatedAdminRelationshipCollectionResponse) { + m := &DelegatedAdminRelationshipCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminRelationshipCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminRelationshipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminRelationshipable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminRelationshipable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminRelationshipCollectionResponse) GetValue()([]DelegatedAdminRelationshipable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminRelationshipCollectionResponse) SetValue(value []DelegatedAdminRelationshipable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_responseable.go new file mode 100644 index 000000000..382aa0db5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipCollectionResponseable +type DelegatedAdminRelationshipCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminRelationshipable) + SetValue(value []DelegatedAdminRelationshipable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participant.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participant.go new file mode 100644 index 000000000..f6fc04dce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participant.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipCustomerParticipant +type DelegatedAdminRelationshipCustomerParticipant 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 display name of the customer tenant as set by Azure AD. Read only + displayName *string + // The OdataType property + odataType *string + // The Azure AD-assigned tenant ID of the customer tenant. + tenantId *string +} +// NewDelegatedAdminRelationshipCustomerParticipant instantiates a new delegatedAdminRelationshipCustomerParticipant and sets the default values. +func NewDelegatedAdminRelationshipCustomerParticipant()(*DelegatedAdminRelationshipCustomerParticipant) { + m := &DelegatedAdminRelationshipCustomerParticipant{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDelegatedAdminRelationshipCustomerParticipantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipCustomerParticipantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipCustomerParticipant(), 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 *DelegatedAdminRelationshipCustomerParticipant) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name of the customer tenant as set by Azure AD. Read only +func (m *DelegatedAdminRelationshipCustomerParticipant) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipCustomerParticipant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DelegatedAdminRelationshipCustomerParticipant) GetOdataType()(*string) { + return m.odataType +} +// GetTenantId gets the tenantId property value. The Azure AD-assigned tenant ID of the customer tenant. +func (m *DelegatedAdminRelationshipCustomerParticipant) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipCustomerParticipant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + 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 *DelegatedAdminRelationshipCustomerParticipant) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name of the customer tenant as set by Azure AD. Read only +func (m *DelegatedAdminRelationshipCustomerParticipant) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DelegatedAdminRelationshipCustomerParticipant) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenantId sets the tenantId property value. The Azure AD-assigned tenant ID of the customer tenant. +func (m *DelegatedAdminRelationshipCustomerParticipant) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participantable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participantable.go new file mode 100644 index 000000000..f6df90fab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_customer_participantable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipCustomerParticipantable +type DelegatedAdminRelationshipCustomerParticipantable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetTenantId()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation.go new file mode 100644 index 000000000..533ef563f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation.go @@ -0,0 +1,167 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipOperation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipOperation struct { + Entity + // The time in ISO 8601 format and in UTC time when the long-running operation was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The data (payload) for the operation. Read-only. + data *string + // The time in ISO 8601 format and in UTC time when the long-running operation was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The operationType property + operationType *DelegatedAdminRelationshipOperationType + // The status property + status *LongRunningOperationStatus +} +// NewDelegatedAdminRelationshipOperation instantiates a new delegatedAdminRelationshipOperation and sets the default values. +func NewDelegatedAdminRelationshipOperation()(*DelegatedAdminRelationshipOperation) { + m := &DelegatedAdminRelationshipOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminRelationshipOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipOperation(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The time in ISO 8601 format and in UTC time when the long-running operation was created. Read-only. +func (m *DelegatedAdminRelationshipOperation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetData gets the data property value. The data (payload) for the operation. Read-only. +func (m *DelegatedAdminRelationshipOperation) GetData()(*string) { + return m.data +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["data"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetData(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["operationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminRelationshipOperationType) + if err != nil { + return err + } + if val != nil { + m.SetOperationType(val.(*DelegatedAdminRelationshipOperationType)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLongRunningOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*LongRunningOperationStatus)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The time in ISO 8601 format and in UTC time when the long-running operation was last modified. Read-only. +func (m *DelegatedAdminRelationshipOperation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOperationType gets the operationType property value. The operationType property +func (m *DelegatedAdminRelationshipOperation) GetOperationType()(*DelegatedAdminRelationshipOperationType) { + return m.operationType +} +// GetStatus gets the status property value. The status property +func (m *DelegatedAdminRelationshipOperation) GetStatus()(*LongRunningOperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("data", m.GetData()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetOperationType() != nil { + cast := (*m.GetOperationType()).String() + err = writer.WriteStringValue("operationType", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The time in ISO 8601 format and in UTC time when the long-running operation was created. Read-only. +func (m *DelegatedAdminRelationshipOperation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetData sets the data property value. The data (payload) for the operation. Read-only. +func (m *DelegatedAdminRelationshipOperation) SetData(value *string)() { + m.data = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The time in ISO 8601 format and in UTC time when the long-running operation was last modified. Read-only. +func (m *DelegatedAdminRelationshipOperation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOperationType sets the operationType property value. The operationType property +func (m *DelegatedAdminRelationshipOperation) SetOperationType(value *DelegatedAdminRelationshipOperationType)() { + m.operationType = value +} +// SetStatus sets the status property value. The status property +func (m *DelegatedAdminRelationshipOperation) SetStatus(value *LongRunningOperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_response.go new file mode 100644 index 000000000..36c21f953 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipOperationCollectionResponse +type DelegatedAdminRelationshipOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminRelationshipOperationable +} +// NewDelegatedAdminRelationshipOperationCollectionResponse instantiates a new DelegatedAdminRelationshipOperationCollectionResponse and sets the default values. +func NewDelegatedAdminRelationshipOperationCollectionResponse()(*DelegatedAdminRelationshipOperationCollectionResponse) { + m := &DelegatedAdminRelationshipOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminRelationshipOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminRelationshipOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminRelationshipOperationable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminRelationshipOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminRelationshipOperationCollectionResponse) GetValue()([]DelegatedAdminRelationshipOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminRelationshipOperationCollectionResponse) SetValue(value []DelegatedAdminRelationshipOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_responseable.go new file mode 100644 index 000000000..b632a9c93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipOperationCollectionResponseable +type DelegatedAdminRelationshipOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminRelationshipOperationable) + SetValue(value []DelegatedAdminRelationshipOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_type.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_type.go new file mode 100644 index 000000000..aa62989e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operation_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipOperationType int + +const ( + DELEGATEDADMINACCESSASSIGNMENTUPDATE_DELEGATEDADMINRELATIONSHIPOPERATIONTYPE DelegatedAdminRelationshipOperationType = iota + UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPOPERATIONTYPE +) + +func (i DelegatedAdminRelationshipOperationType) String() string { + return []string{"delegatedAdminAccessAssignmentUpdate", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminRelationshipOperationType(v string) (interface{}, error) { + result := DELEGATEDADMINACCESSASSIGNMENTUPDATE_DELEGATEDADMINRELATIONSHIPOPERATIONTYPE + switch v { + case "delegatedAdminAccessAssignmentUpdate": + result = DELEGATEDADMINACCESSASSIGNMENTUPDATE_DELEGATEDADMINRELATIONSHIPOPERATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPOPERATIONTYPE + default: + return 0, errors.New("Unknown DelegatedAdminRelationshipOperationType value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminRelationshipOperationType(values []DelegatedAdminRelationshipOperationType) []string { + 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/delegated_admin_relationship_operationable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operationable.go new file mode 100644 index 000000000..6a0cb1f9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_operationable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipOperationable +type DelegatedAdminRelationshipOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetData()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOperationType()(*DelegatedAdminRelationshipOperationType) + GetStatus()(*LongRunningOperationStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetData(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOperationType(value *DelegatedAdminRelationshipOperationType)() + SetStatus(value *LongRunningOperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request.go new file mode 100644 index 000000000..a092327e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request.go @@ -0,0 +1,141 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipRequest provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipRequest struct { + Entity + // The action property + action *DelegatedAdminRelationshipRequestAction + // The date and time in ISO 8601 format and in UTC time when the relationship request was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time in ISO 8601 format and UTC time when this relationship request was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status of the request. Read-only. The possible values are: created, pending, succeeded, failed, unknownFutureValue. + status *DelegatedAdminRelationshipRequestStatus +} +// NewDelegatedAdminRelationshipRequest instantiates a new delegatedAdminRelationshipRequest and sets the default values. +func NewDelegatedAdminRelationshipRequest()(*DelegatedAdminRelationshipRequest) { + m := &DelegatedAdminRelationshipRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminRelationshipRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipRequest(), nil +} +// GetAction gets the action property value. The action property +func (m *DelegatedAdminRelationshipRequest) GetAction()(*DelegatedAdminRelationshipRequestAction) { + return m.action +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship request was created. Read-only. +func (m *DelegatedAdminRelationshipRequest) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminRelationshipRequestAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*DelegatedAdminRelationshipRequestAction)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedAdminRelationshipRequestStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DelegatedAdminRelationshipRequestStatus)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time in ISO 8601 format and UTC time when this relationship request was last modified. Read-only. +func (m *DelegatedAdminRelationshipRequest) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStatus gets the status property value. The status of the request. Read-only. The possible values are: created, pending, succeeded, failed, unknownFutureValue. +func (m *DelegatedAdminRelationshipRequest) GetStatus()(*DelegatedAdminRelationshipRequestStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *DelegatedAdminRelationshipRequest) SetAction(value *DelegatedAdminRelationshipRequestAction)() { + m.action = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time in ISO 8601 format and in UTC time when the relationship request was created. Read-only. +func (m *DelegatedAdminRelationshipRequest) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time in ISO 8601 format and UTC time when this relationship request was last modified. Read-only. +func (m *DelegatedAdminRelationshipRequest) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStatus sets the status property value. The status of the request. Read-only. The possible values are: created, pending, succeeded, failed, unknownFutureValue. +func (m *DelegatedAdminRelationshipRequest) SetStatus(value *DelegatedAdminRelationshipRequestStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_action.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_action.go new file mode 100644 index 000000000..facc35e9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipRequestAction int + +const ( + LOCKFORAPPROVAL_DELEGATEDADMINRELATIONSHIPREQUESTACTION DelegatedAdminRelationshipRequestAction = iota + APPROVE_DELEGATEDADMINRELATIONSHIPREQUESTACTION + TERMINATE_DELEGATEDADMINRELATIONSHIPREQUESTACTION + UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPREQUESTACTION +) + +func (i DelegatedAdminRelationshipRequestAction) String() string { + return []string{"lockForApproval", "approve", "terminate", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminRelationshipRequestAction(v string) (interface{}, error) { + result := LOCKFORAPPROVAL_DELEGATEDADMINRELATIONSHIPREQUESTACTION + switch v { + case "lockForApproval": + result = LOCKFORAPPROVAL_DELEGATEDADMINRELATIONSHIPREQUESTACTION + case "approve": + result = APPROVE_DELEGATEDADMINRELATIONSHIPREQUESTACTION + case "terminate": + result = TERMINATE_DELEGATEDADMINRELATIONSHIPREQUESTACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPREQUESTACTION + default: + return 0, errors.New("Unknown DelegatedAdminRelationshipRequestAction value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminRelationshipRequestAction(values []DelegatedAdminRelationshipRequestAction) []string { + 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/delegated_admin_relationship_request_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_collection_response.go new file mode 100644 index 000000000..9afe479a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipRequestCollectionResponse +type DelegatedAdminRelationshipRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminRelationshipRequestable +} +// NewDelegatedAdminRelationshipRequestCollectionResponse instantiates a new DelegatedAdminRelationshipRequestCollectionResponse and sets the default values. +func NewDelegatedAdminRelationshipRequestCollectionResponse()(*DelegatedAdminRelationshipRequestCollectionResponse) { + m := &DelegatedAdminRelationshipRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminRelationshipRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminRelationshipRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminRelationshipRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminRelationshipRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminRelationshipRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminRelationshipRequestable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminRelationshipRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminRelationshipRequestCollectionResponse) GetValue()([]DelegatedAdminRelationshipRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminRelationshipRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminRelationshipRequestCollectionResponse) SetValue(value []DelegatedAdminRelationshipRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_collection_responseable.go new file mode 100644 index 000000000..9013b9ba3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipRequestCollectionResponseable +type DelegatedAdminRelationshipRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminRelationshipRequestable) + SetValue(value []DelegatedAdminRelationshipRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_status.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_status.go new file mode 100644 index 000000000..c3ad8cc52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_request_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipRequestStatus int + +const ( + CREATED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS DelegatedAdminRelationshipRequestStatus = iota + PENDING_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + SUCCEEDED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + FAILED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS +) + +func (i DelegatedAdminRelationshipRequestStatus) String() string { + return []string{"created", "pending", "succeeded", "failed", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminRelationshipRequestStatus(v string) (interface{}, error) { + result := CREATED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + switch v { + case "created": + result = CREATED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + case "pending": + result = PENDING_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + case "succeeded": + result = SUCCEEDED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + case "failed": + result = FAILED_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPREQUESTSTATUS + default: + return 0, errors.New("Unknown DelegatedAdminRelationshipRequestStatus value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminRelationshipRequestStatus(values []DelegatedAdminRelationshipRequestStatus) []string { + 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/delegated_admin_relationship_requestable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_requestable.go new file mode 100644 index 000000000..49fd66aea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_requestable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipRequestable +type DelegatedAdminRelationshipRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*DelegatedAdminRelationshipRequestAction) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*DelegatedAdminRelationshipRequestStatus) + SetAction(value *DelegatedAdminRelationshipRequestAction)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *DelegatedAdminRelationshipRequestStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_status.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_status.go new file mode 100644 index 000000000..a8e09ee78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationship_status.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminRelationshipStatus int + +const ( + ACTIVATING_DELEGATEDADMINRELATIONSHIPSTATUS DelegatedAdminRelationshipStatus = iota + ACTIVE_DELEGATEDADMINRELATIONSHIPSTATUS + APPROVALPENDING_DELEGATEDADMINRELATIONSHIPSTATUS + APPROVED_DELEGATEDADMINRELATIONSHIPSTATUS + CREATED_DELEGATEDADMINRELATIONSHIPSTATUS + EXPIRED_DELEGATEDADMINRELATIONSHIPSTATUS + EXPIRING_DELEGATEDADMINRELATIONSHIPSTATUS + TERMINATED_DELEGATEDADMINRELATIONSHIPSTATUS + TERMINATING_DELEGATEDADMINRELATIONSHIPSTATUS + TERMINATIONREQUESTED_DELEGATEDADMINRELATIONSHIPSTATUS + UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPSTATUS +) + +func (i DelegatedAdminRelationshipStatus) String() string { + return []string{"activating", "active", "approvalPending", "approved", "created", "expired", "expiring", "terminated", "terminating", "terminationRequested", "unknownFutureValue"}[i] +} +func ParseDelegatedAdminRelationshipStatus(v string) (interface{}, error) { + result := ACTIVATING_DELEGATEDADMINRELATIONSHIPSTATUS + switch v { + case "activating": + result = ACTIVATING_DELEGATEDADMINRELATIONSHIPSTATUS + case "active": + result = ACTIVE_DELEGATEDADMINRELATIONSHIPSTATUS + case "approvalPending": + result = APPROVALPENDING_DELEGATEDADMINRELATIONSHIPSTATUS + case "approved": + result = APPROVED_DELEGATEDADMINRELATIONSHIPSTATUS + case "created": + result = CREATED_DELEGATEDADMINRELATIONSHIPSTATUS + case "expired": + result = EXPIRED_DELEGATEDADMINRELATIONSHIPSTATUS + case "expiring": + result = EXPIRING_DELEGATEDADMINRELATIONSHIPSTATUS + case "terminated": + result = TERMINATED_DELEGATEDADMINRELATIONSHIPSTATUS + case "terminating": + result = TERMINATING_DELEGATEDADMINRELATIONSHIPSTATUS + case "terminationRequested": + result = TERMINATIONREQUESTED_DELEGATEDADMINRELATIONSHIPSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDADMINRELATIONSHIPSTATUS + default: + return 0, errors.New("Unknown DelegatedAdminRelationshipStatus value: " + v) + } + return &result, nil +} +func SerializeDelegatedAdminRelationshipStatus(values []DelegatedAdminRelationshipStatus) []string { + 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/delegated_admin_relationshipable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_relationshipable.go new file mode 100644 index 000000000..6a45ef97d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_relationshipable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminRelationshipable +type DelegatedAdminRelationshipable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessAssignments()([]DelegatedAdminAccessAssignmentable) + GetAccessDetails()(DelegatedAdminAccessDetailsable) + GetActivatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomer()(DelegatedAdminRelationshipCustomerParticipantable) + GetDisplayName()(*string) + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOperations()([]DelegatedAdminRelationshipOperationable) + GetRequests()([]DelegatedAdminRelationshipRequestable) + GetStatus()(*DelegatedAdminRelationshipStatus) + SetAccessAssignments(value []DelegatedAdminAccessAssignmentable)() + SetAccessDetails(value DelegatedAdminAccessDetailsable)() + SetActivatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomer(value DelegatedAdminRelationshipCustomerParticipantable)() + SetDisplayName(value *string)() + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOperations(value []DelegatedAdminRelationshipOperationable)() + SetRequests(value []DelegatedAdminRelationshipRequestable)() + SetStatus(value *DelegatedAdminRelationshipStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail.go b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail.go new file mode 100644 index 000000000..ad16964c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminServiceManagementDetail provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedAdminServiceManagementDetail struct { + Entity + // The URL of the management portal for the managed service. Read-only. + serviceManagementUrl *string + // The name of a managed service. Read-only. + serviceName *string +} +// NewDelegatedAdminServiceManagementDetail instantiates a new delegatedAdminServiceManagementDetail and sets the default values. +func NewDelegatedAdminServiceManagementDetail()(*DelegatedAdminServiceManagementDetail) { + m := &DelegatedAdminServiceManagementDetail{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedAdminServiceManagementDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminServiceManagementDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminServiceManagementDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminServiceManagementDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["serviceManagementUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceManagementUrl(val) + } + return nil + } + res["serviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceName(val) + } + return nil + } + return res +} +// GetServiceManagementUrl gets the serviceManagementUrl property value. The URL of the management portal for the managed service. Read-only. +func (m *DelegatedAdminServiceManagementDetail) GetServiceManagementUrl()(*string) { + return m.serviceManagementUrl +} +// GetServiceName gets the serviceName property value. The name of a managed service. Read-only. +func (m *DelegatedAdminServiceManagementDetail) GetServiceName()(*string) { + return m.serviceName +} +// Serialize serializes information the current object +func (m *DelegatedAdminServiceManagementDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("serviceManagementUrl", m.GetServiceManagementUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceName", m.GetServiceName()) + if err != nil { + return err + } + } + return nil +} +// SetServiceManagementUrl sets the serviceManagementUrl property value. The URL of the management portal for the managed service. Read-only. +func (m *DelegatedAdminServiceManagementDetail) SetServiceManagementUrl(value *string)() { + m.serviceManagementUrl = value +} +// SetServiceName sets the serviceName property value. The name of a managed service. Read-only. +func (m *DelegatedAdminServiceManagementDetail) SetServiceName(value *string)() { + m.serviceName = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_response.go new file mode 100644 index 000000000..44c57d0e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminServiceManagementDetailCollectionResponse +type DelegatedAdminServiceManagementDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedAdminServiceManagementDetailable +} +// NewDelegatedAdminServiceManagementDetailCollectionResponse instantiates a new DelegatedAdminServiceManagementDetailCollectionResponse and sets the default values. +func NewDelegatedAdminServiceManagementDetailCollectionResponse()(*DelegatedAdminServiceManagementDetailCollectionResponse) { + m := &DelegatedAdminServiceManagementDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedAdminServiceManagementDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedAdminServiceManagementDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedAdminServiceManagementDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedAdminServiceManagementDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedAdminServiceManagementDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedAdminServiceManagementDetailable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedAdminServiceManagementDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedAdminServiceManagementDetailCollectionResponse) GetValue()([]DelegatedAdminServiceManagementDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedAdminServiceManagementDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedAdminServiceManagementDetailCollectionResponse) SetValue(value []DelegatedAdminServiceManagementDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_responseable.go new file mode 100644 index 000000000..fac2d2f96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminServiceManagementDetailCollectionResponseable +type DelegatedAdminServiceManagementDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedAdminServiceManagementDetailable) + SetValue(value []DelegatedAdminServiceManagementDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detailable.go b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detailable.go new file mode 100644 index 000000000..9345676ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_admin_service_management_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedAdminServiceManagementDetailable +type DelegatedAdminServiceManagementDetailable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetServiceManagementUrl()(*string) + GetServiceName()(*string) + SetServiceManagementUrl(value *string)() + SetServiceName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_permission_classification.go b/src/internal/connector/graph/betasdk/models/delegated_permission_classification.go new file mode 100644 index 000000000..4c16a2bf6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_permission_classification.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedPermissionClassification provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedPermissionClassification struct { + Entity + // The classification value being given. Possible value: low. Does not support $filter. + classification *PermissionClassificationType + // The unique identifier (id) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Required on create. Does not support $filter. + permissionId *string + // The claim value (value) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Does not support $filter. + permissionName *string +} +// NewDelegatedPermissionClassification instantiates a new delegatedPermissionClassification and sets the default values. +func NewDelegatedPermissionClassification()(*DelegatedPermissionClassification) { + m := &DelegatedPermissionClassification{ + Entity: *NewEntity(), + } + return m +} +// CreateDelegatedPermissionClassificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedPermissionClassificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedPermissionClassification(), nil +} +// GetClassification gets the classification property value. The classification value being given. Possible value: low. Does not support $filter. +func (m *DelegatedPermissionClassification) GetClassification()(*PermissionClassificationType) { + return m.classification +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedPermissionClassification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePermissionClassificationType) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*PermissionClassificationType)) + } + return nil + } + res["permissionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermissionId(val) + } + return nil + } + res["permissionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermissionName(val) + } + return nil + } + return res +} +// GetPermissionId gets the permissionId property value. The unique identifier (id) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Required on create. Does not support $filter. +func (m *DelegatedPermissionClassification) GetPermissionId()(*string) { + return m.permissionId +} +// GetPermissionName gets the permissionName property value. The claim value (value) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Does not support $filter. +func (m *DelegatedPermissionClassification) GetPermissionName()(*string) { + return m.permissionName +} +// Serialize serializes information the current object +func (m *DelegatedPermissionClassification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClassification() != nil { + cast := (*m.GetClassification()).String() + err = writer.WriteStringValue("classification", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permissionId", m.GetPermissionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permissionName", m.GetPermissionName()) + if err != nil { + return err + } + } + return nil +} +// SetClassification sets the classification property value. The classification value being given. Possible value: low. Does not support $filter. +func (m *DelegatedPermissionClassification) SetClassification(value *PermissionClassificationType)() { + m.classification = value +} +// SetPermissionId sets the permissionId property value. The unique identifier (id) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Required on create. Does not support $filter. +func (m *DelegatedPermissionClassification) SetPermissionId(value *string)() { + m.permissionId = value +} +// SetPermissionName sets the permissionName property value. The claim value (value) for the delegated permission listed in the publishedPermissionScopes collection of the servicePrincipal. Does not support $filter. +func (m *DelegatedPermissionClassification) SetPermissionName(value *string)() { + m.permissionName = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_response.go b/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_response.go new file mode 100644 index 000000000..b76ec7e70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedPermissionClassificationCollectionResponse +type DelegatedPermissionClassificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DelegatedPermissionClassificationable +} +// NewDelegatedPermissionClassificationCollectionResponse instantiates a new DelegatedPermissionClassificationCollectionResponse and sets the default values. +func NewDelegatedPermissionClassificationCollectionResponse()(*DelegatedPermissionClassificationCollectionResponse) { + m := &DelegatedPermissionClassificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDelegatedPermissionClassificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDelegatedPermissionClassificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDelegatedPermissionClassificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DelegatedPermissionClassificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedPermissionClassificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedPermissionClassificationable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedPermissionClassificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DelegatedPermissionClassificationCollectionResponse) GetValue()([]DelegatedPermissionClassificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DelegatedPermissionClassificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DelegatedPermissionClassificationCollectionResponse) SetValue(value []DelegatedPermissionClassificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_responseable.go new file mode 100644 index 000000000..59cf85d46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_permission_classification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedPermissionClassificationCollectionResponseable +type DelegatedPermissionClassificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DelegatedPermissionClassificationable) + SetValue(value []DelegatedPermissionClassificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delegated_permission_classificationable.go b/src/internal/connector/graph/betasdk/models/delegated_permission_classificationable.go new file mode 100644 index 000000000..52b00b823 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delegated_permission_classificationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DelegatedPermissionClassificationable +type DelegatedPermissionClassificationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassification()(*PermissionClassificationType) + GetPermissionId()(*string) + GetPermissionName()(*string) + SetClassification(value *PermissionClassificationType)() + SetPermissionId(value *string)() + SetPermissionName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delete_action.go b/src/internal/connector/graph/betasdk/models/delete_action.go new file mode 100644 index 000000000..766afef96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delete_action.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeleteAction +type DeleteAction 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 name of the item that was deleted. + name *string + // File or Folder, depending on the type of the deleted item. + objectType *string + // The OdataType property + odataType *string +} +// NewDeleteAction instantiates a new deleteAction and sets the default values. +func NewDeleteAction()(*DeleteAction) { + m := &DeleteAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeleteActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeleteActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeleteAction(), 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 *DeleteAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeleteAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["objectType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(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 + } + return res +} +// GetName gets the name property value. The name of the item that was deleted. +func (m *DeleteAction) GetName()(*string) { + return m.name +} +// GetObjectType gets the objectType property value. File or Folder, depending on the type of the deleted item. +func (m *DeleteAction) GetObjectType()(*string) { + return m.objectType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeleteAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeleteAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("objectType", m.GetObjectType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeleteAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name of the item that was deleted. +func (m *DeleteAction) SetName(value *string)() { + m.name = value +} +// SetObjectType sets the objectType property value. File or Folder, depending on the type of the deleted item. +func (m *DeleteAction) SetObjectType(value *string)() { + m.objectType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeleteAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delete_actionable.go b/src/internal/connector/graph/betasdk/models/delete_actionable.go new file mode 100644 index 000000000..7a9e63773 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delete_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeleteActionable +type DeleteActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetObjectType()(*string) + GetOdataType()(*string) + SetName(value *string)() + SetObjectType(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_result.go b/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_result.go new file mode 100644 index 000000000..35b390a7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeleteUserFromSharedAppleDeviceActionResult +type DeleteUserFromSharedAppleDeviceActionResult struct { + DeviceActionResult + // User principal name of the user to be deleted + userPrincipalName *string +} +// NewDeleteUserFromSharedAppleDeviceActionResult instantiates a new DeleteUserFromSharedAppleDeviceActionResult and sets the default values. +func NewDeleteUserFromSharedAppleDeviceActionResult()(*DeleteUserFromSharedAppleDeviceActionResult) { + m := &DeleteUserFromSharedAppleDeviceActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateDeleteUserFromSharedAppleDeviceActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeleteUserFromSharedAppleDeviceActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeleteUserFromSharedAppleDeviceActionResult(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeleteUserFromSharedAppleDeviceActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserPrincipalName gets the userPrincipalName property value. User principal name of the user to be deleted +func (m *DeleteUserFromSharedAppleDeviceActionResult) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeleteUserFromSharedAppleDeviceActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetUserPrincipalName sets the userPrincipalName property value. User principal name of the user to be deleted +func (m *DeleteUserFromSharedAppleDeviceActionResult) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_resultable.go b/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_resultable.go new file mode 100644 index 000000000..6a2769aa7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delete_user_from_shared_apple_device_action_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeleteUserFromSharedAppleDeviceActionResultable +type DeleteUserFromSharedAppleDeviceActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserPrincipalName()(*string) + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/deleted.go b/src/internal/connector/graph/betasdk/models/deleted.go new file mode 100644 index 000000000..43b557dcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deleted +type Deleted 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 OdataType property + odataType *string + // Represents the state of the deleted item. + state *string +} +// NewDeleted instantiates a new deleted and sets the default values. +func NewDeleted()(*Deleted) { + m := &Deleted{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeletedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeletedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeleted(), 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 *Deleted) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Deleted) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Deleted) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. Represents the state of the deleted item. +func (m *Deleted) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *Deleted) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *Deleted) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Deleted) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. Represents the state of the deleted item. +func (m *Deleted) SetState(value *string)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_item_container.go b/src/internal/connector/graph/betasdk/models/deleted_item_container.go new file mode 100644 index 000000000..66192a92a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_item_container.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedItemContainer +type DeletedItemContainer struct { + Entity +} +// NewDeletedItemContainer instantiates a new deletedItemContainer and sets the default values. +func NewDeletedItemContainer()(*DeletedItemContainer) { + m := &DeletedItemContainer{ + Entity: *NewEntity(), + } + return m +} +// CreateDeletedItemContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeletedItemContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeletedItemContainer(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeletedItemContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeletedItemContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_item_containerable.go b/src/internal/connector/graph/betasdk/models/deleted_item_containerable.go new file mode 100644 index 000000000..33a572745 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_item_containerable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedItemContainerable +type DeletedItemContainerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_team.go b/src/internal/connector/graph/betasdk/models/deleted_team.go new file mode 100644 index 000000000..181979ea3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_team.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedTeam +type DeletedTeam struct { + Entity + // The channels those are either shared with this deleted team or created in this deleted team. + channels []Channelable +} +// NewDeletedTeam instantiates a new DeletedTeam and sets the default values. +func NewDeletedTeam()(*DeletedTeam) { + m := &DeletedTeam{ + Entity: *NewEntity(), + } + return m +} +// CreateDeletedTeamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeletedTeamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeletedTeam(), nil +} +// GetChannels gets the channels property value. The channels those are either shared with this deleted team or created in this deleted team. +func (m *DeletedTeam) GetChannels()([]Channelable) { + return m.channels +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeletedTeam) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["channels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChannelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Channelable, len(val)) + for i, v := range val { + res[i] = v.(Channelable) + } + m.SetChannels(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeletedTeam) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetChannels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChannels())) + for i, v := range m.GetChannels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("channels", cast) + if err != nil { + return err + } + } + return nil +} +// SetChannels sets the channels property value. The channels those are either shared with this deleted team or created in this deleted team. +func (m *DeletedTeam) SetChannels(value []Channelable)() { + m.channels = value +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_team_collection_response.go b/src/internal/connector/graph/betasdk/models/deleted_team_collection_response.go new file mode 100644 index 000000000..76bccd4a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_team_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedTeamCollectionResponse +type DeletedTeamCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeletedTeamable +} +// NewDeletedTeamCollectionResponse instantiates a new DeletedTeamCollectionResponse and sets the default values. +func NewDeletedTeamCollectionResponse()(*DeletedTeamCollectionResponse) { + m := &DeletedTeamCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeletedTeamCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeletedTeamCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeletedTeamCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeletedTeamCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeletedTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeletedTeamable, len(val)) + for i, v := range val { + res[i] = v.(DeletedTeamable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeletedTeamCollectionResponse) GetValue()([]DeletedTeamable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeletedTeamCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeletedTeamCollectionResponse) SetValue(value []DeletedTeamable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_team_collection_responseable.go b/src/internal/connector/graph/betasdk/models/deleted_team_collection_responseable.go new file mode 100644 index 000000000..8173748a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_team_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedTeamCollectionResponseable +type DeletedTeamCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeletedTeamable) + SetValue(value []DeletedTeamable)() +} diff --git a/src/internal/connector/graph/betasdk/models/deleted_teamable.go b/src/internal/connector/graph/betasdk/models/deleted_teamable.go new file mode 100644 index 000000000..aed7360f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deleted_teamable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeletedTeamable +type DeletedTeamable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannels()([]Channelable) + SetChannels(value []Channelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/deletedable.go b/src/internal/connector/graph/betasdk/models/deletedable.go new file mode 100644 index 000000000..263b56a7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deletedable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deletedable +type Deletedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetState()(*string) + SetOdataType(value *string)() + SetState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth.go new file mode 100644 index 000000000..cd3f35091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidth bandwidth restriction types +type DeliveryOptimizationBandwidth 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 OdataType property + odataType *string +} +// NewDeliveryOptimizationBandwidth instantiates a new deliveryOptimizationBandwidth and sets the default values. +func NewDeliveryOptimizationBandwidth()(*DeliveryOptimizationBandwidth) { + m := &DeliveryOptimizationBandwidth{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeliveryOptimizationBandwidthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationBandwidthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deliveryOptimizationBandwidthAbsolute": + return NewDeliveryOptimizationBandwidthAbsolute(), nil + case "#microsoft.graph.deliveryOptimizationBandwidthHoursWithPercentage": + return NewDeliveryOptimizationBandwidthHoursWithPercentage(), nil + case "#microsoft.graph.deliveryOptimizationBandwidthPercentage": + return NewDeliveryOptimizationBandwidthPercentage(), nil + } + } + } + } + return NewDeliveryOptimizationBandwidth(), 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 *DeliveryOptimizationBandwidth) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationBandwidth) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationBandwidth) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationBandwidth) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeliveryOptimizationBandwidth) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationBandwidth) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absolute.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absolute.go new file mode 100644 index 000000000..e20ef7637 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absolute.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthAbsolute +type DeliveryOptimizationBandwidthAbsolute struct { + DeliveryOptimizationBandwidth + // Specifies the maximum download bandwidth in KiloBytes/second that the device can use across all concurrent download activities using Delivery Optimization. Valid values 0 to 4294967295 + maximumDownloadBandwidthInKilobytesPerSecond *int64 + // Specifies the maximum upload bandwidth in KiloBytes/second that a device will use across all concurrent upload activity using Delivery Optimization (0-4000000). Valid values 0 to 4000000 + maximumUploadBandwidthInKilobytesPerSecond *int64 +} +// NewDeliveryOptimizationBandwidthAbsolute instantiates a new DeliveryOptimizationBandwidthAbsolute and sets the default values. +func NewDeliveryOptimizationBandwidthAbsolute()(*DeliveryOptimizationBandwidthAbsolute) { + m := &DeliveryOptimizationBandwidthAbsolute{ + DeliveryOptimizationBandwidth: *NewDeliveryOptimizationBandwidth(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationBandwidthAbsolute"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationBandwidthAbsoluteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationBandwidthAbsoluteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationBandwidthAbsolute(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationBandwidthAbsolute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationBandwidth.GetFieldDeserializers() + res["maximumDownloadBandwidthInKilobytesPerSecond"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumDownloadBandwidthInKilobytesPerSecond(val) + } + return nil + } + res["maximumUploadBandwidthInKilobytesPerSecond"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumUploadBandwidthInKilobytesPerSecond(val) + } + return nil + } + return res +} +// GetMaximumDownloadBandwidthInKilobytesPerSecond gets the maximumDownloadBandwidthInKilobytesPerSecond property value. Specifies the maximum download bandwidth in KiloBytes/second that the device can use across all concurrent download activities using Delivery Optimization. Valid values 0 to 4294967295 +func (m *DeliveryOptimizationBandwidthAbsolute) GetMaximumDownloadBandwidthInKilobytesPerSecond()(*int64) { + return m.maximumDownloadBandwidthInKilobytesPerSecond +} +// GetMaximumUploadBandwidthInKilobytesPerSecond gets the maximumUploadBandwidthInKilobytesPerSecond property value. Specifies the maximum upload bandwidth in KiloBytes/second that a device will use across all concurrent upload activity using Delivery Optimization (0-4000000). Valid values 0 to 4000000 +func (m *DeliveryOptimizationBandwidthAbsolute) GetMaximumUploadBandwidthInKilobytesPerSecond()(*int64) { + return m.maximumUploadBandwidthInKilobytesPerSecond +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationBandwidthAbsolute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationBandwidth.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("maximumDownloadBandwidthInKilobytesPerSecond", m.GetMaximumDownloadBandwidthInKilobytesPerSecond()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maximumUploadBandwidthInKilobytesPerSecond", m.GetMaximumUploadBandwidthInKilobytesPerSecond()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumDownloadBandwidthInKilobytesPerSecond sets the maximumDownloadBandwidthInKilobytesPerSecond property value. Specifies the maximum download bandwidth in KiloBytes/second that the device can use across all concurrent download activities using Delivery Optimization. Valid values 0 to 4294967295 +func (m *DeliveryOptimizationBandwidthAbsolute) SetMaximumDownloadBandwidthInKilobytesPerSecond(value *int64)() { + m.maximumDownloadBandwidthInKilobytesPerSecond = value +} +// SetMaximumUploadBandwidthInKilobytesPerSecond sets the maximumUploadBandwidthInKilobytesPerSecond property value. Specifies the maximum upload bandwidth in KiloBytes/second that a device will use across all concurrent upload activity using Delivery Optimization (0-4000000). Valid values 0 to 4000000 +func (m *DeliveryOptimizationBandwidthAbsolute) SetMaximumUploadBandwidthInKilobytesPerSecond(value *int64)() { + m.maximumUploadBandwidthInKilobytesPerSecond = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absoluteable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absoluteable.go new file mode 100644 index 000000000..192bfdb46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_absoluteable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthAbsoluteable +type DeliveryOptimizationBandwidthAbsoluteable interface { + DeliveryOptimizationBandwidthable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumDownloadBandwidthInKilobytesPerSecond()(*int64) + GetMaximumUploadBandwidthInKilobytesPerSecond()(*int64) + SetMaximumDownloadBandwidthInKilobytesPerSecond(value *int64)() + SetMaximumUploadBandwidthInKilobytesPerSecond(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limit.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limit.go new file mode 100644 index 000000000..6fadac756 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limit.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthBusinessHoursLimit bandwidth business hours and percentages type +type DeliveryOptimizationBandwidthBusinessHoursLimit struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies the beginning of business hours using a 24-hour clock (0-23). Valid values 0 to 23 + bandwidthBeginBusinessHours *int32 + // Specifies the end of business hours using a 24-hour clock (0-23). Valid values 0 to 23 + bandwidthEndBusinessHours *int32 + // Specifies the percentage of bandwidth to limit during business hours (0-100). Valid values 0 to 100 + bandwidthPercentageDuringBusinessHours *int32 + // Specifies the percentage of bandwidth to limit outsidse business hours (0-100). Valid values 0 to 100 + bandwidthPercentageOutsideBusinessHours *int32 + // The OdataType property + odataType *string +} +// NewDeliveryOptimizationBandwidthBusinessHoursLimit instantiates a new deliveryOptimizationBandwidthBusinessHoursLimit and sets the default values. +func NewDeliveryOptimizationBandwidthBusinessHoursLimit()(*DeliveryOptimizationBandwidthBusinessHoursLimit) { + m := &DeliveryOptimizationBandwidthBusinessHoursLimit{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeliveryOptimizationBandwidthBusinessHoursLimitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationBandwidthBusinessHoursLimitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationBandwidthBusinessHoursLimit(), 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 *DeliveryOptimizationBandwidthBusinessHoursLimit) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBandwidthBeginBusinessHours gets the bandwidthBeginBusinessHours property value. Specifies the beginning of business hours using a 24-hour clock (0-23). Valid values 0 to 23 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetBandwidthBeginBusinessHours()(*int32) { + return m.bandwidthBeginBusinessHours +} +// GetBandwidthEndBusinessHours gets the bandwidthEndBusinessHours property value. Specifies the end of business hours using a 24-hour clock (0-23). Valid values 0 to 23 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetBandwidthEndBusinessHours()(*int32) { + return m.bandwidthEndBusinessHours +} +// GetBandwidthPercentageDuringBusinessHours gets the bandwidthPercentageDuringBusinessHours property value. Specifies the percentage of bandwidth to limit during business hours (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetBandwidthPercentageDuringBusinessHours()(*int32) { + return m.bandwidthPercentageDuringBusinessHours +} +// GetBandwidthPercentageOutsideBusinessHours gets the bandwidthPercentageOutsideBusinessHours property value. Specifies the percentage of bandwidth to limit outsidse business hours (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetBandwidthPercentageOutsideBusinessHours()(*int32) { + return m.bandwidthPercentageOutsideBusinessHours +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bandwidthBeginBusinessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBandwidthBeginBusinessHours(val) + } + return nil + } + res["bandwidthEndBusinessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBandwidthEndBusinessHours(val) + } + return nil + } + res["bandwidthPercentageDuringBusinessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBandwidthPercentageDuringBusinessHours(val) + } + return nil + } + res["bandwidthPercentageOutsideBusinessHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBandwidthPercentageOutsideBusinessHours(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("bandwidthBeginBusinessHours", m.GetBandwidthBeginBusinessHours()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("bandwidthEndBusinessHours", m.GetBandwidthEndBusinessHours()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("bandwidthPercentageDuringBusinessHours", m.GetBandwidthPercentageDuringBusinessHours()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("bandwidthPercentageOutsideBusinessHours", m.GetBandwidthPercentageOutsideBusinessHours()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeliveryOptimizationBandwidthBusinessHoursLimit) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBandwidthBeginBusinessHours sets the bandwidthBeginBusinessHours property value. Specifies the beginning of business hours using a 24-hour clock (0-23). Valid values 0 to 23 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) SetBandwidthBeginBusinessHours(value *int32)() { + m.bandwidthBeginBusinessHours = value +} +// SetBandwidthEndBusinessHours sets the bandwidthEndBusinessHours property value. Specifies the end of business hours using a 24-hour clock (0-23). Valid values 0 to 23 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) SetBandwidthEndBusinessHours(value *int32)() { + m.bandwidthEndBusinessHours = value +} +// SetBandwidthPercentageDuringBusinessHours sets the bandwidthPercentageDuringBusinessHours property value. Specifies the percentage of bandwidth to limit during business hours (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) SetBandwidthPercentageDuringBusinessHours(value *int32)() { + m.bandwidthPercentageDuringBusinessHours = value +} +// SetBandwidthPercentageOutsideBusinessHours sets the bandwidthPercentageOutsideBusinessHours property value. Specifies the percentage of bandwidth to limit outsidse business hours (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) SetBandwidthPercentageOutsideBusinessHours(value *int32)() { + m.bandwidthPercentageOutsideBusinessHours = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationBandwidthBusinessHoursLimit) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limitable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limitable.go new file mode 100644 index 000000000..caaa9f0e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_business_hours_limitable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthBusinessHoursLimitable +type DeliveryOptimizationBandwidthBusinessHoursLimitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBandwidthBeginBusinessHours()(*int32) + GetBandwidthEndBusinessHours()(*int32) + GetBandwidthPercentageDuringBusinessHours()(*int32) + GetBandwidthPercentageOutsideBusinessHours()(*int32) + GetOdataType()(*string) + SetBandwidthBeginBusinessHours(value *int32)() + SetBandwidthEndBusinessHours(value *int32)() + SetBandwidthPercentageDuringBusinessHours(value *int32)() + SetBandwidthPercentageOutsideBusinessHours(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentage.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentage.go new file mode 100644 index 000000000..cb5392b42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentage.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthHoursWithPercentage +type DeliveryOptimizationBandwidthHoursWithPercentage struct { + DeliveryOptimizationBandwidth + // Background download percentage hours. + bandwidthBackgroundPercentageHours DeliveryOptimizationBandwidthBusinessHoursLimitable + // Foreground download percentage hours. + bandwidthForegroundPercentageHours DeliveryOptimizationBandwidthBusinessHoursLimitable +} +// NewDeliveryOptimizationBandwidthHoursWithPercentage instantiates a new DeliveryOptimizationBandwidthHoursWithPercentage and sets the default values. +func NewDeliveryOptimizationBandwidthHoursWithPercentage()(*DeliveryOptimizationBandwidthHoursWithPercentage) { + m := &DeliveryOptimizationBandwidthHoursWithPercentage{ + DeliveryOptimizationBandwidth: *NewDeliveryOptimizationBandwidth(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationBandwidthHoursWithPercentage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationBandwidthHoursWithPercentageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationBandwidthHoursWithPercentageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationBandwidthHoursWithPercentage(), nil +} +// GetBandwidthBackgroundPercentageHours gets the bandwidthBackgroundPercentageHours property value. Background download percentage hours. +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) GetBandwidthBackgroundPercentageHours()(DeliveryOptimizationBandwidthBusinessHoursLimitable) { + return m.bandwidthBackgroundPercentageHours +} +// GetBandwidthForegroundPercentageHours gets the bandwidthForegroundPercentageHours property value. Foreground download percentage hours. +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) GetBandwidthForegroundPercentageHours()(DeliveryOptimizationBandwidthBusinessHoursLimitable) { + return m.bandwidthForegroundPercentageHours +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationBandwidth.GetFieldDeserializers() + res["bandwidthBackgroundPercentageHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeliveryOptimizationBandwidthBusinessHoursLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBandwidthBackgroundPercentageHours(val.(DeliveryOptimizationBandwidthBusinessHoursLimitable)) + } + return nil + } + res["bandwidthForegroundPercentageHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeliveryOptimizationBandwidthBusinessHoursLimitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBandwidthForegroundPercentageHours(val.(DeliveryOptimizationBandwidthBusinessHoursLimitable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationBandwidth.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("bandwidthBackgroundPercentageHours", m.GetBandwidthBackgroundPercentageHours()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("bandwidthForegroundPercentageHours", m.GetBandwidthForegroundPercentageHours()) + if err != nil { + return err + } + } + return nil +} +// SetBandwidthBackgroundPercentageHours sets the bandwidthBackgroundPercentageHours property value. Background download percentage hours. +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) SetBandwidthBackgroundPercentageHours(value DeliveryOptimizationBandwidthBusinessHoursLimitable)() { + m.bandwidthBackgroundPercentageHours = value +} +// SetBandwidthForegroundPercentageHours sets the bandwidthForegroundPercentageHours property value. Foreground download percentage hours. +func (m *DeliveryOptimizationBandwidthHoursWithPercentage) SetBandwidthForegroundPercentageHours(value DeliveryOptimizationBandwidthBusinessHoursLimitable)() { + m.bandwidthForegroundPercentageHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentageable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentageable.go new file mode 100644 index 000000000..13ec0d53e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_hours_with_percentageable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthHoursWithPercentageable +type DeliveryOptimizationBandwidthHoursWithPercentageable interface { + DeliveryOptimizationBandwidthable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBandwidthBackgroundPercentageHours()(DeliveryOptimizationBandwidthBusinessHoursLimitable) + GetBandwidthForegroundPercentageHours()(DeliveryOptimizationBandwidthBusinessHoursLimitable) + SetBandwidthBackgroundPercentageHours(value DeliveryOptimizationBandwidthBusinessHoursLimitable)() + SetBandwidthForegroundPercentageHours(value DeliveryOptimizationBandwidthBusinessHoursLimitable)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentage.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentage.go new file mode 100644 index 000000000..93c910d02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentage.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthPercentage +type DeliveryOptimizationBandwidthPercentage struct { + DeliveryOptimizationBandwidth + // Specifies the maximum background download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 + maximumBackgroundBandwidthPercentage *int32 + // Specifies the maximum foreground download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 + maximumForegroundBandwidthPercentage *int32 +} +// NewDeliveryOptimizationBandwidthPercentage instantiates a new DeliveryOptimizationBandwidthPercentage and sets the default values. +func NewDeliveryOptimizationBandwidthPercentage()(*DeliveryOptimizationBandwidthPercentage) { + m := &DeliveryOptimizationBandwidthPercentage{ + DeliveryOptimizationBandwidth: *NewDeliveryOptimizationBandwidth(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationBandwidthPercentage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationBandwidthPercentageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationBandwidthPercentageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationBandwidthPercentage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationBandwidthPercentage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationBandwidth.GetFieldDeserializers() + res["maximumBackgroundBandwidthPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumBackgroundBandwidthPercentage(val) + } + return nil + } + res["maximumForegroundBandwidthPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumForegroundBandwidthPercentage(val) + } + return nil + } + return res +} +// GetMaximumBackgroundBandwidthPercentage gets the maximumBackgroundBandwidthPercentage property value. Specifies the maximum background download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthPercentage) GetMaximumBackgroundBandwidthPercentage()(*int32) { + return m.maximumBackgroundBandwidthPercentage +} +// GetMaximumForegroundBandwidthPercentage gets the maximumForegroundBandwidthPercentage property value. Specifies the maximum foreground download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthPercentage) GetMaximumForegroundBandwidthPercentage()(*int32) { + return m.maximumForegroundBandwidthPercentage +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationBandwidthPercentage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationBandwidth.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumBackgroundBandwidthPercentage", m.GetMaximumBackgroundBandwidthPercentage()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maximumForegroundBandwidthPercentage", m.GetMaximumForegroundBandwidthPercentage()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumBackgroundBandwidthPercentage sets the maximumBackgroundBandwidthPercentage property value. Specifies the maximum background download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthPercentage) SetMaximumBackgroundBandwidthPercentage(value *int32)() { + m.maximumBackgroundBandwidthPercentage = value +} +// SetMaximumForegroundBandwidthPercentage sets the maximumForegroundBandwidthPercentage property value. Specifies the maximum foreground download bandwidth that Delivery Optimization uses across all concurrent download activities as a percentage of available download bandwidth (0-100). Valid values 0 to 100 +func (m *DeliveryOptimizationBandwidthPercentage) SetMaximumForegroundBandwidthPercentage(value *int32)() { + m.maximumForegroundBandwidthPercentage = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentageable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentageable.go new file mode 100644 index 000000000..5667b521c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidth_percentageable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthPercentageable +type DeliveryOptimizationBandwidthPercentageable interface { + DeliveryOptimizationBandwidthable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumBackgroundBandwidthPercentage()(*int32) + GetMaximumForegroundBandwidthPercentage()(*int32) + SetMaximumBackgroundBandwidthPercentage(value *int32)() + SetMaximumForegroundBandwidthPercentage(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidthable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidthable.go new file mode 100644 index 000000000..bb17045bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_bandwidthable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationBandwidthable +type DeliveryOptimizationBandwidthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_custom.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_custom.go new file mode 100644 index 000000000..68a117460 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_custom.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdCustom +type DeliveryOptimizationGroupIdCustom struct { + DeliveryOptimizationGroupIdSource + // Specifies an arbitrary group ID that the device belongs to + groupIdCustom *string +} +// NewDeliveryOptimizationGroupIdCustom instantiates a new DeliveryOptimizationGroupIdCustom and sets the default values. +func NewDeliveryOptimizationGroupIdCustom()(*DeliveryOptimizationGroupIdCustom) { + m := &DeliveryOptimizationGroupIdCustom{ + DeliveryOptimizationGroupIdSource: *NewDeliveryOptimizationGroupIdSource(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationGroupIdCustom"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationGroupIdCustomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationGroupIdCustomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationGroupIdCustom(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationGroupIdCustom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationGroupIdSource.GetFieldDeserializers() + res["groupIdCustom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupIdCustom(val) + } + return nil + } + return res +} +// GetGroupIdCustom gets the groupIdCustom property value. Specifies an arbitrary group ID that the device belongs to +func (m *DeliveryOptimizationGroupIdCustom) GetGroupIdCustom()(*string) { + return m.groupIdCustom +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationGroupIdCustom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationGroupIdSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupIdCustom", m.GetGroupIdCustom()) + if err != nil { + return err + } + } + return nil +} +// SetGroupIdCustom sets the groupIdCustom property value. Specifies an arbitrary group ID that the device belongs to +func (m *DeliveryOptimizationGroupIdCustom) SetGroupIdCustom(value *string)() { + m.groupIdCustom = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_customable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_customable.go new file mode 100644 index 000000000..3575bc25e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_customable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdCustomable +type DeliveryOptimizationGroupIdCustomable interface { + DeliveryOptimizationGroupIdSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupIdCustom()(*string) + SetGroupIdCustom(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_options_type.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_options_type.go new file mode 100644 index 000000000..728cd6cc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_options_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeliveryOptimizationGroupIdOptionsType int + +const ( + // Not configured. + NOTCONFIGURED_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE DeliveryOptimizationGroupIdOptionsType = iota + // Active Directory site. + ADSITE_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + // Authenticated domain SID. + AUTHENTICATEDDOMAINSID_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + // DHCP user option. + DHCPUSEROPTION_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + // DNS suffix. + DNSSUFFIX_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE +) + +func (i DeliveryOptimizationGroupIdOptionsType) String() string { + return []string{"notConfigured", "adSite", "authenticatedDomainSid", "dhcpUserOption", "dnsSuffix"}[i] +} +func ParseDeliveryOptimizationGroupIdOptionsType(v string) (interface{}, error) { + result := NOTCONFIGURED_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + case "adSite": + result = ADSITE_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + case "authenticatedDomainSid": + result = AUTHENTICATEDDOMAINSID_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + case "dhcpUserOption": + result = DHCPUSEROPTION_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + case "dnsSuffix": + result = DNSSUFFIX_DELIVERYOPTIMIZATIONGROUPIDOPTIONSTYPE + default: + return 0, errors.New("Unknown DeliveryOptimizationGroupIdOptionsType value: " + v) + } + return &result, nil +} +func SerializeDeliveryOptimizationGroupIdOptionsType(values []DeliveryOptimizationGroupIdOptionsType) []string { + 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/delivery_optimization_group_id_source.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source.go new file mode 100644 index 000000000..7ca9eae89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdSource groupId Support Types +type DeliveryOptimizationGroupIdSource 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 OdataType property + odataType *string +} +// NewDeliveryOptimizationGroupIdSource instantiates a new deliveryOptimizationGroupIdSource and sets the default values. +func NewDeliveryOptimizationGroupIdSource()(*DeliveryOptimizationGroupIdSource) { + m := &DeliveryOptimizationGroupIdSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeliveryOptimizationGroupIdSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationGroupIdSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deliveryOptimizationGroupIdCustom": + return NewDeliveryOptimizationGroupIdCustom(), nil + case "#microsoft.graph.deliveryOptimizationGroupIdSourceOptions": + return NewDeliveryOptimizationGroupIdSourceOptions(), nil + } + } + } + } + return NewDeliveryOptimizationGroupIdSource(), 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 *DeliveryOptimizationGroupIdSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationGroupIdSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationGroupIdSource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationGroupIdSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeliveryOptimizationGroupIdSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationGroupIdSource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_options.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_options.go new file mode 100644 index 000000000..748185e01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_options.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdSourceOptions +type DeliveryOptimizationGroupIdSourceOptions struct { + DeliveryOptimizationGroupIdSource + // Possible values for the DeliveryOptimizationGroupIdOptionsType setting. + groupIdSourceOption *DeliveryOptimizationGroupIdOptionsType +} +// NewDeliveryOptimizationGroupIdSourceOptions instantiates a new DeliveryOptimizationGroupIdSourceOptions and sets the default values. +func NewDeliveryOptimizationGroupIdSourceOptions()(*DeliveryOptimizationGroupIdSourceOptions) { + m := &DeliveryOptimizationGroupIdSourceOptions{ + DeliveryOptimizationGroupIdSource: *NewDeliveryOptimizationGroupIdSource(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationGroupIdSourceOptions"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationGroupIdSourceOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationGroupIdSourceOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationGroupIdSourceOptions(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationGroupIdSourceOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationGroupIdSource.GetFieldDeserializers() + res["groupIdSourceOption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeliveryOptimizationGroupIdOptionsType) + if err != nil { + return err + } + if val != nil { + m.SetGroupIdSourceOption(val.(*DeliveryOptimizationGroupIdOptionsType)) + } + return nil + } + return res +} +// GetGroupIdSourceOption gets the groupIdSourceOption property value. Possible values for the DeliveryOptimizationGroupIdOptionsType setting. +func (m *DeliveryOptimizationGroupIdSourceOptions) GetGroupIdSourceOption()(*DeliveryOptimizationGroupIdOptionsType) { + return m.groupIdSourceOption +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationGroupIdSourceOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationGroupIdSource.Serialize(writer) + if err != nil { + return err + } + if m.GetGroupIdSourceOption() != nil { + cast := (*m.GetGroupIdSourceOption()).String() + err = writer.WriteStringValue("groupIdSourceOption", &cast) + if err != nil { + return err + } + } + return nil +} +// SetGroupIdSourceOption sets the groupIdSourceOption property value. Possible values for the DeliveryOptimizationGroupIdOptionsType setting. +func (m *DeliveryOptimizationGroupIdSourceOptions) SetGroupIdSourceOption(value *DeliveryOptimizationGroupIdOptionsType)() { + m.groupIdSourceOption = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_optionsable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_optionsable.go new file mode 100644 index 000000000..3c6771551 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_source_optionsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdSourceOptionsable +type DeliveryOptimizationGroupIdSourceOptionsable interface { + DeliveryOptimizationGroupIdSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupIdSourceOption()(*DeliveryOptimizationGroupIdOptionsType) + SetGroupIdSourceOption(value *DeliveryOptimizationGroupIdOptionsType)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_sourceable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_sourceable.go new file mode 100644 index 000000000..cb0e76906 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_group_id_sourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationGroupIdSourceable +type DeliveryOptimizationGroupIdSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size.go new file mode 100644 index 000000000..876277843 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSize delivery Optimization max cache size types. +type DeliveryOptimizationMaxCacheSize 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 OdataType property + odataType *string +} +// NewDeliveryOptimizationMaxCacheSize instantiates a new deliveryOptimizationMaxCacheSize and sets the default values. +func NewDeliveryOptimizationMaxCacheSize()(*DeliveryOptimizationMaxCacheSize) { + m := &DeliveryOptimizationMaxCacheSize{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeliveryOptimizationMaxCacheSizeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationMaxCacheSizeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute": + return NewDeliveryOptimizationMaxCacheSizeAbsolute(), nil + case "#microsoft.graph.deliveryOptimizationMaxCacheSizePercentage": + return NewDeliveryOptimizationMaxCacheSizePercentage(), nil + } + } + } + } + return NewDeliveryOptimizationMaxCacheSize(), 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 *DeliveryOptimizationMaxCacheSize) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationMaxCacheSize) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationMaxCacheSize) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationMaxCacheSize) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeliveryOptimizationMaxCacheSize) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeliveryOptimizationMaxCacheSize) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absolute.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absolute.go new file mode 100644 index 000000000..13ef5e14a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absolute.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSizeAbsolute +type DeliveryOptimizationMaxCacheSizeAbsolute struct { + DeliveryOptimizationMaxCacheSize + // Specifies the maximum size in GB of Delivery Optimization cache. Valid values 0 to 4294967295 + maximumCacheSizeInGigabytes *int64 +} +// NewDeliveryOptimizationMaxCacheSizeAbsolute instantiates a new DeliveryOptimizationMaxCacheSizeAbsolute and sets the default values. +func NewDeliveryOptimizationMaxCacheSizeAbsolute()(*DeliveryOptimizationMaxCacheSizeAbsolute) { + m := &DeliveryOptimizationMaxCacheSizeAbsolute{ + DeliveryOptimizationMaxCacheSize: *NewDeliveryOptimizationMaxCacheSize(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationMaxCacheSizeAbsolute"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationMaxCacheSizeAbsoluteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationMaxCacheSizeAbsoluteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationMaxCacheSizeAbsolute(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationMaxCacheSizeAbsolute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationMaxCacheSize.GetFieldDeserializers() + res["maximumCacheSizeInGigabytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumCacheSizeInGigabytes(val) + } + return nil + } + return res +} +// GetMaximumCacheSizeInGigabytes gets the maximumCacheSizeInGigabytes property value. Specifies the maximum size in GB of Delivery Optimization cache. Valid values 0 to 4294967295 +func (m *DeliveryOptimizationMaxCacheSizeAbsolute) GetMaximumCacheSizeInGigabytes()(*int64) { + return m.maximumCacheSizeInGigabytes +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationMaxCacheSizeAbsolute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationMaxCacheSize.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("maximumCacheSizeInGigabytes", m.GetMaximumCacheSizeInGigabytes()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumCacheSizeInGigabytes sets the maximumCacheSizeInGigabytes property value. Specifies the maximum size in GB of Delivery Optimization cache. Valid values 0 to 4294967295 +func (m *DeliveryOptimizationMaxCacheSizeAbsolute) SetMaximumCacheSizeInGigabytes(value *int64)() { + m.maximumCacheSizeInGigabytes = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absoluteable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absoluteable.go new file mode 100644 index 000000000..dbda10b5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_absoluteable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSizeAbsoluteable +type DeliveryOptimizationMaxCacheSizeAbsoluteable interface { + DeliveryOptimizationMaxCacheSizeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumCacheSizeInGigabytes()(*int64) + SetMaximumCacheSizeInGigabytes(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentage.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentage.go new file mode 100644 index 000000000..532c587ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentage.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSizePercentage +type DeliveryOptimizationMaxCacheSizePercentage struct { + DeliveryOptimizationMaxCacheSize + // Specifies the maximum cache size that Delivery Optimization can utilize, as a percentage of disk size (1-100). Valid values 1 to 100 + maximumCacheSizePercentage *int32 +} +// NewDeliveryOptimizationMaxCacheSizePercentage instantiates a new DeliveryOptimizationMaxCacheSizePercentage and sets the default values. +func NewDeliveryOptimizationMaxCacheSizePercentage()(*DeliveryOptimizationMaxCacheSizePercentage) { + m := &DeliveryOptimizationMaxCacheSizePercentage{ + DeliveryOptimizationMaxCacheSize: *NewDeliveryOptimizationMaxCacheSize(), + } + odataTypeValue := "#microsoft.graph.deliveryOptimizationMaxCacheSizePercentage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeliveryOptimizationMaxCacheSizePercentageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeliveryOptimizationMaxCacheSizePercentageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeliveryOptimizationMaxCacheSizePercentage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeliveryOptimizationMaxCacheSizePercentage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeliveryOptimizationMaxCacheSize.GetFieldDeserializers() + res["maximumCacheSizePercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumCacheSizePercentage(val) + } + return nil + } + return res +} +// GetMaximumCacheSizePercentage gets the maximumCacheSizePercentage property value. Specifies the maximum cache size that Delivery Optimization can utilize, as a percentage of disk size (1-100). Valid values 1 to 100 +func (m *DeliveryOptimizationMaxCacheSizePercentage) GetMaximumCacheSizePercentage()(*int32) { + return m.maximumCacheSizePercentage +} +// Serialize serializes information the current object +func (m *DeliveryOptimizationMaxCacheSizePercentage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeliveryOptimizationMaxCacheSize.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumCacheSizePercentage", m.GetMaximumCacheSizePercentage()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumCacheSizePercentage sets the maximumCacheSizePercentage property value. Specifies the maximum cache size that Delivery Optimization can utilize, as a percentage of disk size (1-100). Valid values 1 to 100 +func (m *DeliveryOptimizationMaxCacheSizePercentage) SetMaximumCacheSizePercentage(value *int32)() { + m.maximumCacheSizePercentage = value +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentageable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentageable.go new file mode 100644 index 000000000..2f1e39c90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_size_percentageable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSizePercentageable +type DeliveryOptimizationMaxCacheSizePercentageable interface { + DeliveryOptimizationMaxCacheSizeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumCacheSizePercentage()(*int32) + SetMaximumCacheSizePercentage(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_sizeable.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_sizeable.go new file mode 100644 index 000000000..9ecfd03b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_max_cache_sizeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeliveryOptimizationMaxCacheSizeable +type DeliveryOptimizationMaxCacheSizeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/delivery_optimization_restrict_peer_selection_by_options.go b/src/internal/connector/graph/betasdk/models/delivery_optimization_restrict_peer_selection_by_options.go new file mode 100644 index 000000000..82b3667d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/delivery_optimization_restrict_peer_selection_by_options.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeliveryOptimizationRestrictPeerSelectionByOptions int + +const ( + // Not configured. + NOTCONFIGURED_DELIVERYOPTIMIZATIONRESTRICTPEERSELECTIONBYOPTIONS DeliveryOptimizationRestrictPeerSelectionByOptions = iota + // Subnet mask. + SUBNETMASK_DELIVERYOPTIMIZATIONRESTRICTPEERSELECTIONBYOPTIONS +) + +func (i DeliveryOptimizationRestrictPeerSelectionByOptions) String() string { + return []string{"notConfigured", "subnetMask"}[i] +} +func ParseDeliveryOptimizationRestrictPeerSelectionByOptions(v string) (interface{}, error) { + result := NOTCONFIGURED_DELIVERYOPTIMIZATIONRESTRICTPEERSELECTIONBYOPTIONS + switch v { + case "notConfigured": + result = NOTCONFIGURED_DELIVERYOPTIMIZATIONRESTRICTPEERSELECTIONBYOPTIONS + case "subnetMask": + result = SUBNETMASK_DELIVERYOPTIMIZATIONRESTRICTPEERSELECTIONBYOPTIONS + default: + return 0, errors.New("Unknown DeliveryOptimizationRestrictPeerSelectionByOptions value: " + v) + } + return &result, nil +} +func SerializeDeliveryOptimizationRestrictPeerSelectionByOptions(values []DeliveryOptimizationRestrictPeerSelectionByOptions) []string { + 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/dep_enrollment_base_profile.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile.go new file mode 100644 index 000000000..9b83fdb95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile.go @@ -0,0 +1,580 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentBaseProfile +type DepEnrollmentBaseProfile struct { + EnrollmentProfile + // Indicates if Apple id setup pane is disabled + appleIdDisabled *bool + // Indicates if Apple pay setup pane is disabled + applePayDisabled *bool + // URL for setup assistant login + configurationWebUrl *bool + // Sets a literal or name pattern. + deviceNameTemplate *string + // Indicates if diagnostics setup pane is disabled + diagnosticsDisabled *bool + // Indicates if displaytone setup screen is disabled + displayToneSetupDisabled *bool + // enabledSkipKeys contains all the enabled skip keys as strings + enabledSkipKeys []string + // Indicates if this is the default profile + isDefault *bool + // Indicates if the profile is mandatory + isMandatory *bool + // Indicates if Location service setup pane is disabled + locationDisabled *bool + // Indicates if privacy screen is disabled + privacyPaneDisabled *bool + // Indicates if the profile removal option is disabled + profileRemovalDisabled *bool + // Indicates if Restore setup pane is blocked + restoreBlocked *bool + // Indicates if screen timeout setup is disabled + screenTimeScreenDisabled *bool + // Indicates if siri setup pane is disabled + siriDisabled *bool + // Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. + supervisedModeEnabled *bool + // Support department information + supportDepartment *string + // Support phone number + supportPhoneNumber *string + // Indicates if 'Terms and Conditions' setup pane is disabled + termsAndConditionsDisabled *bool + // Indicates if touch id setup pane is disabled + touchIdDisabled *bool +} +// NewDepEnrollmentBaseProfile instantiates a new DepEnrollmentBaseProfile and sets the default values. +func NewDepEnrollmentBaseProfile()(*DepEnrollmentBaseProfile) { + m := &DepEnrollmentBaseProfile{ + EnrollmentProfile: *NewEnrollmentProfile(), + } + odataTypeValue := "#microsoft.graph.depEnrollmentBaseProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDepEnrollmentBaseProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepEnrollmentBaseProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.depIOSEnrollmentProfile": + return NewDepIOSEnrollmentProfile(), nil + case "#microsoft.graph.depMacOSEnrollmentProfile": + return NewDepMacOSEnrollmentProfile(), nil + } + } + } + } + return NewDepEnrollmentBaseProfile(), nil +} +// GetAppleIdDisabled gets the appleIdDisabled property value. Indicates if Apple id setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetAppleIdDisabled()(*bool) { + return m.appleIdDisabled +} +// GetApplePayDisabled gets the applePayDisabled property value. Indicates if Apple pay setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetApplePayDisabled()(*bool) { + return m.applePayDisabled +} +// GetConfigurationWebUrl gets the configurationWebUrl property value. URL for setup assistant login +func (m *DepEnrollmentBaseProfile) GetConfigurationWebUrl()(*bool) { + return m.configurationWebUrl +} +// GetDeviceNameTemplate gets the deviceNameTemplate property value. Sets a literal or name pattern. +func (m *DepEnrollmentBaseProfile) GetDeviceNameTemplate()(*string) { + return m.deviceNameTemplate +} +// GetDiagnosticsDisabled gets the diagnosticsDisabled property value. Indicates if diagnostics setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetDiagnosticsDisabled()(*bool) { + return m.diagnosticsDisabled +} +// GetDisplayToneSetupDisabled gets the displayToneSetupDisabled property value. Indicates if displaytone setup screen is disabled +func (m *DepEnrollmentBaseProfile) GetDisplayToneSetupDisabled()(*bool) { + return m.displayToneSetupDisabled +} +// GetEnabledSkipKeys gets the enabledSkipKeys property value. enabledSkipKeys contains all the enabled skip keys as strings +func (m *DepEnrollmentBaseProfile) GetEnabledSkipKeys()([]string) { + return m.enabledSkipKeys +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepEnrollmentBaseProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EnrollmentProfile.GetFieldDeserializers() + res["appleIdDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleIdDisabled(val) + } + return nil + } + res["applePayDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplePayDisabled(val) + } + return nil + } + res["configurationWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationWebUrl(val) + } + return nil + } + res["deviceNameTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceNameTemplate(val) + } + return nil + } + res["diagnosticsDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiagnosticsDisabled(val) + } + return nil + } + res["displayToneSetupDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayToneSetupDisabled(val) + } + return nil + } + res["enabledSkipKeys"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnabledSkipKeys(res) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isMandatory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMandatory(val) + } + return nil + } + res["locationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationDisabled(val) + } + return nil + } + res["privacyPaneDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyPaneDisabled(val) + } + return nil + } + res["profileRemovalDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileRemovalDisabled(val) + } + return nil + } + res["restoreBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestoreBlocked(val) + } + return nil + } + res["screenTimeScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenTimeScreenDisabled(val) + } + return nil + } + res["siriDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriDisabled(val) + } + return nil + } + res["supervisedModeEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSupervisedModeEnabled(val) + } + return nil + } + res["supportDepartment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportDepartment(val) + } + return nil + } + res["supportPhoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportPhoneNumber(val) + } + return nil + } + res["termsAndConditionsDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsAndConditionsDisabled(val) + } + return nil + } + res["touchIdDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTouchIdDisabled(val) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates if this is the default profile +func (m *DepEnrollmentBaseProfile) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsMandatory gets the isMandatory property value. Indicates if the profile is mandatory +func (m *DepEnrollmentBaseProfile) GetIsMandatory()(*bool) { + return m.isMandatory +} +// GetLocationDisabled gets the locationDisabled property value. Indicates if Location service setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetLocationDisabled()(*bool) { + return m.locationDisabled +} +// GetPrivacyPaneDisabled gets the privacyPaneDisabled property value. Indicates if privacy screen is disabled +func (m *DepEnrollmentBaseProfile) GetPrivacyPaneDisabled()(*bool) { + return m.privacyPaneDisabled +} +// GetProfileRemovalDisabled gets the profileRemovalDisabled property value. Indicates if the profile removal option is disabled +func (m *DepEnrollmentBaseProfile) GetProfileRemovalDisabled()(*bool) { + return m.profileRemovalDisabled +} +// GetRestoreBlocked gets the restoreBlocked property value. Indicates if Restore setup pane is blocked +func (m *DepEnrollmentBaseProfile) GetRestoreBlocked()(*bool) { + return m.restoreBlocked +} +// GetScreenTimeScreenDisabled gets the screenTimeScreenDisabled property value. Indicates if screen timeout setup is disabled +func (m *DepEnrollmentBaseProfile) GetScreenTimeScreenDisabled()(*bool) { + return m.screenTimeScreenDisabled +} +// GetSiriDisabled gets the siriDisabled property value. Indicates if siri setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetSiriDisabled()(*bool) { + return m.siriDisabled +} +// GetSupervisedModeEnabled gets the supervisedModeEnabled property value. Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. +func (m *DepEnrollmentBaseProfile) GetSupervisedModeEnabled()(*bool) { + return m.supervisedModeEnabled +} +// GetSupportDepartment gets the supportDepartment property value. Support department information +func (m *DepEnrollmentBaseProfile) GetSupportDepartment()(*string) { + return m.supportDepartment +} +// GetSupportPhoneNumber gets the supportPhoneNumber property value. Support phone number +func (m *DepEnrollmentBaseProfile) GetSupportPhoneNumber()(*string) { + return m.supportPhoneNumber +} +// GetTermsAndConditionsDisabled gets the termsAndConditionsDisabled property value. Indicates if 'Terms and Conditions' setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetTermsAndConditionsDisabled()(*bool) { + return m.termsAndConditionsDisabled +} +// GetTouchIdDisabled gets the touchIdDisabled property value. Indicates if touch id setup pane is disabled +func (m *DepEnrollmentBaseProfile) GetTouchIdDisabled()(*bool) { + return m.touchIdDisabled +} +// Serialize serializes information the current object +func (m *DepEnrollmentBaseProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EnrollmentProfile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appleIdDisabled", m.GetAppleIdDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("applePayDisabled", m.GetApplePayDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("configurationWebUrl", m.GetConfigurationWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceNameTemplate", m.GetDeviceNameTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("diagnosticsDisabled", m.GetDiagnosticsDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("displayToneSetupDisabled", m.GetDisplayToneSetupDisabled()) + if err != nil { + return err + } + } + if m.GetEnabledSkipKeys() != nil { + err = writer.WriteCollectionOfStringValues("enabledSkipKeys", m.GetEnabledSkipKeys()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMandatory", m.GetIsMandatory()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("locationDisabled", m.GetLocationDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("privacyPaneDisabled", m.GetPrivacyPaneDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("profileRemovalDisabled", m.GetProfileRemovalDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restoreBlocked", m.GetRestoreBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenTimeScreenDisabled", m.GetScreenTimeScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriDisabled", m.GetSiriDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("supervisedModeEnabled", m.GetSupervisedModeEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportDepartment", m.GetSupportDepartment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportPhoneNumber", m.GetSupportPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("termsAndConditionsDisabled", m.GetTermsAndConditionsDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("touchIdDisabled", m.GetTouchIdDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetAppleIdDisabled sets the appleIdDisabled property value. Indicates if Apple id setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetAppleIdDisabled(value *bool)() { + m.appleIdDisabled = value +} +// SetApplePayDisabled sets the applePayDisabled property value. Indicates if Apple pay setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetApplePayDisabled(value *bool)() { + m.applePayDisabled = value +} +// SetConfigurationWebUrl sets the configurationWebUrl property value. URL for setup assistant login +func (m *DepEnrollmentBaseProfile) SetConfigurationWebUrl(value *bool)() { + m.configurationWebUrl = value +} +// SetDeviceNameTemplate sets the deviceNameTemplate property value. Sets a literal or name pattern. +func (m *DepEnrollmentBaseProfile) SetDeviceNameTemplate(value *string)() { + m.deviceNameTemplate = value +} +// SetDiagnosticsDisabled sets the diagnosticsDisabled property value. Indicates if diagnostics setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetDiagnosticsDisabled(value *bool)() { + m.diagnosticsDisabled = value +} +// SetDisplayToneSetupDisabled sets the displayToneSetupDisabled property value. Indicates if displaytone setup screen is disabled +func (m *DepEnrollmentBaseProfile) SetDisplayToneSetupDisabled(value *bool)() { + m.displayToneSetupDisabled = value +} +// SetEnabledSkipKeys sets the enabledSkipKeys property value. enabledSkipKeys contains all the enabled skip keys as strings +func (m *DepEnrollmentBaseProfile) SetEnabledSkipKeys(value []string)() { + m.enabledSkipKeys = value +} +// SetIsDefault sets the isDefault property value. Indicates if this is the default profile +func (m *DepEnrollmentBaseProfile) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsMandatory sets the isMandatory property value. Indicates if the profile is mandatory +func (m *DepEnrollmentBaseProfile) SetIsMandatory(value *bool)() { + m.isMandatory = value +} +// SetLocationDisabled sets the locationDisabled property value. Indicates if Location service setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetLocationDisabled(value *bool)() { + m.locationDisabled = value +} +// SetPrivacyPaneDisabled sets the privacyPaneDisabled property value. Indicates if privacy screen is disabled +func (m *DepEnrollmentBaseProfile) SetPrivacyPaneDisabled(value *bool)() { + m.privacyPaneDisabled = value +} +// SetProfileRemovalDisabled sets the profileRemovalDisabled property value. Indicates if the profile removal option is disabled +func (m *DepEnrollmentBaseProfile) SetProfileRemovalDisabled(value *bool)() { + m.profileRemovalDisabled = value +} +// SetRestoreBlocked sets the restoreBlocked property value. Indicates if Restore setup pane is blocked +func (m *DepEnrollmentBaseProfile) SetRestoreBlocked(value *bool)() { + m.restoreBlocked = value +} +// SetScreenTimeScreenDisabled sets the screenTimeScreenDisabled property value. Indicates if screen timeout setup is disabled +func (m *DepEnrollmentBaseProfile) SetScreenTimeScreenDisabled(value *bool)() { + m.screenTimeScreenDisabled = value +} +// SetSiriDisabled sets the siriDisabled property value. Indicates if siri setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetSiriDisabled(value *bool)() { + m.siriDisabled = value +} +// SetSupervisedModeEnabled sets the supervisedModeEnabled property value. Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. +func (m *DepEnrollmentBaseProfile) SetSupervisedModeEnabled(value *bool)() { + m.supervisedModeEnabled = value +} +// SetSupportDepartment sets the supportDepartment property value. Support department information +func (m *DepEnrollmentBaseProfile) SetSupportDepartment(value *string)() { + m.supportDepartment = value +} +// SetSupportPhoneNumber sets the supportPhoneNumber property value. Support phone number +func (m *DepEnrollmentBaseProfile) SetSupportPhoneNumber(value *string)() { + m.supportPhoneNumber = value +} +// SetTermsAndConditionsDisabled sets the termsAndConditionsDisabled property value. Indicates if 'Terms and Conditions' setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetTermsAndConditionsDisabled(value *bool)() { + m.termsAndConditionsDisabled = value +} +// SetTouchIdDisabled sets the touchIdDisabled property value. Indicates if touch id setup pane is disabled +func (m *DepEnrollmentBaseProfile) SetTouchIdDisabled(value *bool)() { + m.touchIdDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_response.go new file mode 100644 index 000000000..32063aac0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentBaseProfileCollectionResponse +type DepEnrollmentBaseProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DepEnrollmentBaseProfileable +} +// NewDepEnrollmentBaseProfileCollectionResponse instantiates a new DepEnrollmentBaseProfileCollectionResponse and sets the default values. +func NewDepEnrollmentBaseProfileCollectionResponse()(*DepEnrollmentBaseProfileCollectionResponse) { + m := &DepEnrollmentBaseProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDepEnrollmentBaseProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepEnrollmentBaseProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepEnrollmentBaseProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepEnrollmentBaseProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepEnrollmentBaseProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepEnrollmentBaseProfileable, len(val)) + for i, v := range val { + res[i] = v.(DepEnrollmentBaseProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DepEnrollmentBaseProfileCollectionResponse) GetValue()([]DepEnrollmentBaseProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *DepEnrollmentBaseProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DepEnrollmentBaseProfileCollectionResponse) SetValue(value []DepEnrollmentBaseProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_responseable.go new file mode 100644 index 000000000..3197e4661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentBaseProfileCollectionResponseable +type DepEnrollmentBaseProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DepEnrollmentBaseProfileable) + SetValue(value []DepEnrollmentBaseProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profileable.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profileable.go new file mode 100644 index 000000000..2ee75e1a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_base_profileable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentBaseProfileable +type DepEnrollmentBaseProfileable interface { + EnrollmentProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleIdDisabled()(*bool) + GetApplePayDisabled()(*bool) + GetConfigurationWebUrl()(*bool) + GetDeviceNameTemplate()(*string) + GetDiagnosticsDisabled()(*bool) + GetDisplayToneSetupDisabled()(*bool) + GetEnabledSkipKeys()([]string) + GetIsDefault()(*bool) + GetIsMandatory()(*bool) + GetLocationDisabled()(*bool) + GetPrivacyPaneDisabled()(*bool) + GetProfileRemovalDisabled()(*bool) + GetRestoreBlocked()(*bool) + GetScreenTimeScreenDisabled()(*bool) + GetSiriDisabled()(*bool) + GetSupervisedModeEnabled()(*bool) + GetSupportDepartment()(*string) + GetSupportPhoneNumber()(*string) + GetTermsAndConditionsDisabled()(*bool) + GetTouchIdDisabled()(*bool) + SetAppleIdDisabled(value *bool)() + SetApplePayDisabled(value *bool)() + SetConfigurationWebUrl(value *bool)() + SetDeviceNameTemplate(value *string)() + SetDiagnosticsDisabled(value *bool)() + SetDisplayToneSetupDisabled(value *bool)() + SetEnabledSkipKeys(value []string)() + SetIsDefault(value *bool)() + SetIsMandatory(value *bool)() + SetLocationDisabled(value *bool)() + SetPrivacyPaneDisabled(value *bool)() + SetProfileRemovalDisabled(value *bool)() + SetRestoreBlocked(value *bool)() + SetScreenTimeScreenDisabled(value *bool)() + SetSiriDisabled(value *bool)() + SetSupervisedModeEnabled(value *bool)() + SetSupportDepartment(value *string)() + SetSupportPhoneNumber(value *string)() + SetTermsAndConditionsDisabled(value *bool)() + SetTouchIdDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile.go new file mode 100644 index 000000000..7ceda88ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile.go @@ -0,0 +1,669 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentProfile +type DepEnrollmentProfile struct { + EnrollmentProfile + // Indicates if Apple id setup pane is disabled + appleIdDisabled *bool + // Indicates if Apple pay setup pane is disabled + applePayDisabled *bool + // Indicates if the device will need to wait for configured confirmation + awaitDeviceConfiguredConfirmation *bool + // Indicates if diagnostics setup pane is disabled + diagnosticsDisabled *bool + // This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. + enableSharedIPad *bool + // Indicates if this is the default profile + isDefault *bool + // Indicates if the profile is mandatory + isMandatory *bool + // The iTunesPairingMode property + iTunesPairingMode *ITunesPairingMode + // Indicates if Location service setup pane is disabled + locationDisabled *bool + // Indicates if Mac OS file vault is disabled + macOSFileVaultDisabled *bool + // Indicates if Mac OS registration is disabled + macOSRegistrationDisabled *bool + // Management certificates for Apple Configurator + managementCertificates []ManagementCertificateWithThumbprintable + // Indicates if Passcode setup pane is disabled + passCodeDisabled *bool + // Indicates if the profile removal option is disabled + profileRemovalDisabled *bool + // Indicates if Restore setup pane is blocked + restoreBlocked *bool + // Indicates if Restore from Android is disabled + restoreFromAndroidDisabled *bool + // This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. + sharedIPadMaximumUserCount *int32 + // Indicates if siri setup pane is disabled + siriDisabled *bool + // Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. + supervisedModeEnabled *bool + // Support department information + supportDepartment *string + // Support phone number + supportPhoneNumber *string + // Indicates if 'Terms and Conditions' setup pane is disabled + termsAndConditionsDisabled *bool + // Indicates if touch id setup pane is disabled + touchIdDisabled *bool + // Indicates if zoom setup pane is disabled + zoomDisabled *bool +} +// NewDepEnrollmentProfile instantiates a new DepEnrollmentProfile and sets the default values. +func NewDepEnrollmentProfile()(*DepEnrollmentProfile) { + m := &DepEnrollmentProfile{ + EnrollmentProfile: *NewEnrollmentProfile(), + } + odataTypeValue := "#microsoft.graph.depEnrollmentProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDepEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepEnrollmentProfile(), nil +} +// GetAppleIdDisabled gets the appleIdDisabled property value. Indicates if Apple id setup pane is disabled +func (m *DepEnrollmentProfile) GetAppleIdDisabled()(*bool) { + return m.appleIdDisabled +} +// GetApplePayDisabled gets the applePayDisabled property value. Indicates if Apple pay setup pane is disabled +func (m *DepEnrollmentProfile) GetApplePayDisabled()(*bool) { + return m.applePayDisabled +} +// GetAwaitDeviceConfiguredConfirmation gets the awaitDeviceConfiguredConfirmation property value. Indicates if the device will need to wait for configured confirmation +func (m *DepEnrollmentProfile) GetAwaitDeviceConfiguredConfirmation()(*bool) { + return m.awaitDeviceConfiguredConfirmation +} +// GetDiagnosticsDisabled gets the diagnosticsDisabled property value. Indicates if diagnostics setup pane is disabled +func (m *DepEnrollmentProfile) GetDiagnosticsDisabled()(*bool) { + return m.diagnosticsDisabled +} +// GetEnableSharedIPad gets the enableSharedIPad property value. This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. +func (m *DepEnrollmentProfile) GetEnableSharedIPad()(*bool) { + return m.enableSharedIPad +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EnrollmentProfile.GetFieldDeserializers() + res["appleIdDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleIdDisabled(val) + } + return nil + } + res["applePayDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplePayDisabled(val) + } + return nil + } + res["awaitDeviceConfiguredConfirmation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAwaitDeviceConfiguredConfirmation(val) + } + return nil + } + res["diagnosticsDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiagnosticsDisabled(val) + } + return nil + } + res["enableSharedIPad"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSharedIPad(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isMandatory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMandatory(val) + } + return nil + } + res["iTunesPairingMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseITunesPairingMode) + if err != nil { + return err + } + if val != nil { + m.SetITunesPairingMode(val.(*ITunesPairingMode)) + } + return nil + } + res["locationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationDisabled(val) + } + return nil + } + res["macOSFileVaultDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMacOSFileVaultDisabled(val) + } + return nil + } + res["macOSRegistrationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMacOSRegistrationDisabled(val) + } + return nil + } + res["managementCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementCertificateWithThumbprintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementCertificateWithThumbprintable, len(val)) + for i, v := range val { + res[i] = v.(ManagementCertificateWithThumbprintable) + } + m.SetManagementCertificates(res) + } + return nil + } + res["passCodeDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPassCodeDisabled(val) + } + return nil + } + res["profileRemovalDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileRemovalDisabled(val) + } + return nil + } + res["restoreBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestoreBlocked(val) + } + return nil + } + res["restoreFromAndroidDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestoreFromAndroidDisabled(val) + } + return nil + } + res["sharedIPadMaximumUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSharedIPadMaximumUserCount(val) + } + return nil + } + res["siriDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriDisabled(val) + } + return nil + } + res["supervisedModeEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSupervisedModeEnabled(val) + } + return nil + } + res["supportDepartment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportDepartment(val) + } + return nil + } + res["supportPhoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportPhoneNumber(val) + } + return nil + } + res["termsAndConditionsDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsAndConditionsDisabled(val) + } + return nil + } + res["touchIdDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTouchIdDisabled(val) + } + return nil + } + res["zoomDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetZoomDisabled(val) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates if this is the default profile +func (m *DepEnrollmentProfile) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsMandatory gets the isMandatory property value. Indicates if the profile is mandatory +func (m *DepEnrollmentProfile) GetIsMandatory()(*bool) { + return m.isMandatory +} +// GetITunesPairingMode gets the iTunesPairingMode property value. The iTunesPairingMode property +func (m *DepEnrollmentProfile) GetITunesPairingMode()(*ITunesPairingMode) { + return m.iTunesPairingMode +} +// GetLocationDisabled gets the locationDisabled property value. Indicates if Location service setup pane is disabled +func (m *DepEnrollmentProfile) GetLocationDisabled()(*bool) { + return m.locationDisabled +} +// GetMacOSFileVaultDisabled gets the macOSFileVaultDisabled property value. Indicates if Mac OS file vault is disabled +func (m *DepEnrollmentProfile) GetMacOSFileVaultDisabled()(*bool) { + return m.macOSFileVaultDisabled +} +// GetMacOSRegistrationDisabled gets the macOSRegistrationDisabled property value. Indicates if Mac OS registration is disabled +func (m *DepEnrollmentProfile) GetMacOSRegistrationDisabled()(*bool) { + return m.macOSRegistrationDisabled +} +// GetManagementCertificates gets the managementCertificates property value. Management certificates for Apple Configurator +func (m *DepEnrollmentProfile) GetManagementCertificates()([]ManagementCertificateWithThumbprintable) { + return m.managementCertificates +} +// GetPassCodeDisabled gets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepEnrollmentProfile) GetPassCodeDisabled()(*bool) { + return m.passCodeDisabled +} +// GetProfileRemovalDisabled gets the profileRemovalDisabled property value. Indicates if the profile removal option is disabled +func (m *DepEnrollmentProfile) GetProfileRemovalDisabled()(*bool) { + return m.profileRemovalDisabled +} +// GetRestoreBlocked gets the restoreBlocked property value. Indicates if Restore setup pane is blocked +func (m *DepEnrollmentProfile) GetRestoreBlocked()(*bool) { + return m.restoreBlocked +} +// GetRestoreFromAndroidDisabled gets the restoreFromAndroidDisabled property value. Indicates if Restore from Android is disabled +func (m *DepEnrollmentProfile) GetRestoreFromAndroidDisabled()(*bool) { + return m.restoreFromAndroidDisabled +} +// GetSharedIPadMaximumUserCount gets the sharedIPadMaximumUserCount property value. This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. +func (m *DepEnrollmentProfile) GetSharedIPadMaximumUserCount()(*int32) { + return m.sharedIPadMaximumUserCount +} +// GetSiriDisabled gets the siriDisabled property value. Indicates if siri setup pane is disabled +func (m *DepEnrollmentProfile) GetSiriDisabled()(*bool) { + return m.siriDisabled +} +// GetSupervisedModeEnabled gets the supervisedModeEnabled property value. Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. +func (m *DepEnrollmentProfile) GetSupervisedModeEnabled()(*bool) { + return m.supervisedModeEnabled +} +// GetSupportDepartment gets the supportDepartment property value. Support department information +func (m *DepEnrollmentProfile) GetSupportDepartment()(*string) { + return m.supportDepartment +} +// GetSupportPhoneNumber gets the supportPhoneNumber property value. Support phone number +func (m *DepEnrollmentProfile) GetSupportPhoneNumber()(*string) { + return m.supportPhoneNumber +} +// GetTermsAndConditionsDisabled gets the termsAndConditionsDisabled property value. Indicates if 'Terms and Conditions' setup pane is disabled +func (m *DepEnrollmentProfile) GetTermsAndConditionsDisabled()(*bool) { + return m.termsAndConditionsDisabled +} +// GetTouchIdDisabled gets the touchIdDisabled property value. Indicates if touch id setup pane is disabled +func (m *DepEnrollmentProfile) GetTouchIdDisabled()(*bool) { + return m.touchIdDisabled +} +// GetZoomDisabled gets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepEnrollmentProfile) GetZoomDisabled()(*bool) { + return m.zoomDisabled +} +// Serialize serializes information the current object +func (m *DepEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EnrollmentProfile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appleIdDisabled", m.GetAppleIdDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("applePayDisabled", m.GetApplePayDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("awaitDeviceConfiguredConfirmation", m.GetAwaitDeviceConfiguredConfirmation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("diagnosticsDisabled", m.GetDiagnosticsDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSharedIPad", m.GetEnableSharedIPad()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMandatory", m.GetIsMandatory()) + if err != nil { + return err + } + } + if m.GetITunesPairingMode() != nil { + cast := (*m.GetITunesPairingMode()).String() + err = writer.WriteStringValue("iTunesPairingMode", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("locationDisabled", m.GetLocationDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("macOSFileVaultDisabled", m.GetMacOSFileVaultDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("macOSRegistrationDisabled", m.GetMacOSRegistrationDisabled()) + if err != nil { + return err + } + } + if m.GetManagementCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementCertificates())) + for i, v := range m.GetManagementCertificates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementCertificates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passCodeDisabled", m.GetPassCodeDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("profileRemovalDisabled", m.GetProfileRemovalDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restoreBlocked", m.GetRestoreBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restoreFromAndroidDisabled", m.GetRestoreFromAndroidDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sharedIPadMaximumUserCount", m.GetSharedIPadMaximumUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriDisabled", m.GetSiriDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("supervisedModeEnabled", m.GetSupervisedModeEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportDepartment", m.GetSupportDepartment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportPhoneNumber", m.GetSupportPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("termsAndConditionsDisabled", m.GetTermsAndConditionsDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("touchIdDisabled", m.GetTouchIdDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("zoomDisabled", m.GetZoomDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetAppleIdDisabled sets the appleIdDisabled property value. Indicates if Apple id setup pane is disabled +func (m *DepEnrollmentProfile) SetAppleIdDisabled(value *bool)() { + m.appleIdDisabled = value +} +// SetApplePayDisabled sets the applePayDisabled property value. Indicates if Apple pay setup pane is disabled +func (m *DepEnrollmentProfile) SetApplePayDisabled(value *bool)() { + m.applePayDisabled = value +} +// SetAwaitDeviceConfiguredConfirmation sets the awaitDeviceConfiguredConfirmation property value. Indicates if the device will need to wait for configured confirmation +func (m *DepEnrollmentProfile) SetAwaitDeviceConfiguredConfirmation(value *bool)() { + m.awaitDeviceConfiguredConfirmation = value +} +// SetDiagnosticsDisabled sets the diagnosticsDisabled property value. Indicates if diagnostics setup pane is disabled +func (m *DepEnrollmentProfile) SetDiagnosticsDisabled(value *bool)() { + m.diagnosticsDisabled = value +} +// SetEnableSharedIPad sets the enableSharedIPad property value. This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. +func (m *DepEnrollmentProfile) SetEnableSharedIPad(value *bool)() { + m.enableSharedIPad = value +} +// SetIsDefault sets the isDefault property value. Indicates if this is the default profile +func (m *DepEnrollmentProfile) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsMandatory sets the isMandatory property value. Indicates if the profile is mandatory +func (m *DepEnrollmentProfile) SetIsMandatory(value *bool)() { + m.isMandatory = value +} +// SetITunesPairingMode sets the iTunesPairingMode property value. The iTunesPairingMode property +func (m *DepEnrollmentProfile) SetITunesPairingMode(value *ITunesPairingMode)() { + m.iTunesPairingMode = value +} +// SetLocationDisabled sets the locationDisabled property value. Indicates if Location service setup pane is disabled +func (m *DepEnrollmentProfile) SetLocationDisabled(value *bool)() { + m.locationDisabled = value +} +// SetMacOSFileVaultDisabled sets the macOSFileVaultDisabled property value. Indicates if Mac OS file vault is disabled +func (m *DepEnrollmentProfile) SetMacOSFileVaultDisabled(value *bool)() { + m.macOSFileVaultDisabled = value +} +// SetMacOSRegistrationDisabled sets the macOSRegistrationDisabled property value. Indicates if Mac OS registration is disabled +func (m *DepEnrollmentProfile) SetMacOSRegistrationDisabled(value *bool)() { + m.macOSRegistrationDisabled = value +} +// SetManagementCertificates sets the managementCertificates property value. Management certificates for Apple Configurator +func (m *DepEnrollmentProfile) SetManagementCertificates(value []ManagementCertificateWithThumbprintable)() { + m.managementCertificates = value +} +// SetPassCodeDisabled sets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepEnrollmentProfile) SetPassCodeDisabled(value *bool)() { + m.passCodeDisabled = value +} +// SetProfileRemovalDisabled sets the profileRemovalDisabled property value. Indicates if the profile removal option is disabled +func (m *DepEnrollmentProfile) SetProfileRemovalDisabled(value *bool)() { + m.profileRemovalDisabled = value +} +// SetRestoreBlocked sets the restoreBlocked property value. Indicates if Restore setup pane is blocked +func (m *DepEnrollmentProfile) SetRestoreBlocked(value *bool)() { + m.restoreBlocked = value +} +// SetRestoreFromAndroidDisabled sets the restoreFromAndroidDisabled property value. Indicates if Restore from Android is disabled +func (m *DepEnrollmentProfile) SetRestoreFromAndroidDisabled(value *bool)() { + m.restoreFromAndroidDisabled = value +} +// SetSharedIPadMaximumUserCount sets the sharedIPadMaximumUserCount property value. This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. +func (m *DepEnrollmentProfile) SetSharedIPadMaximumUserCount(value *int32)() { + m.sharedIPadMaximumUserCount = value +} +// SetSiriDisabled sets the siriDisabled property value. Indicates if siri setup pane is disabled +func (m *DepEnrollmentProfile) SetSiriDisabled(value *bool)() { + m.siriDisabled = value +} +// SetSupervisedModeEnabled sets the supervisedModeEnabled property value. Supervised mode, True to enable, false otherwise. See https://learn.microsoft.com/en-us/intune/deploy-use/enroll-devices-in-microsoft-intune for additional information. +func (m *DepEnrollmentProfile) SetSupervisedModeEnabled(value *bool)() { + m.supervisedModeEnabled = value +} +// SetSupportDepartment sets the supportDepartment property value. Support department information +func (m *DepEnrollmentProfile) SetSupportDepartment(value *string)() { + m.supportDepartment = value +} +// SetSupportPhoneNumber sets the supportPhoneNumber property value. Support phone number +func (m *DepEnrollmentProfile) SetSupportPhoneNumber(value *string)() { + m.supportPhoneNumber = value +} +// SetTermsAndConditionsDisabled sets the termsAndConditionsDisabled property value. Indicates if 'Terms and Conditions' setup pane is disabled +func (m *DepEnrollmentProfile) SetTermsAndConditionsDisabled(value *bool)() { + m.termsAndConditionsDisabled = value +} +// SetTouchIdDisabled sets the touchIdDisabled property value. Indicates if touch id setup pane is disabled +func (m *DepEnrollmentProfile) SetTouchIdDisabled(value *bool)() { + m.touchIdDisabled = value +} +// SetZoomDisabled sets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepEnrollmentProfile) SetZoomDisabled(value *bool)() { + m.zoomDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_response.go new file mode 100644 index 000000000..abb0c9634 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentProfileCollectionResponse +type DepEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DepEnrollmentProfileable +} +// NewDepEnrollmentProfileCollectionResponse instantiates a new DepEnrollmentProfileCollectionResponse and sets the default values. +func NewDepEnrollmentProfileCollectionResponse()(*DepEnrollmentProfileCollectionResponse) { + m := &DepEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDepEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(DepEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DepEnrollmentProfileCollectionResponse) GetValue()([]DepEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *DepEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DepEnrollmentProfileCollectionResponse) SetValue(value []DepEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..be044cc61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentProfileCollectionResponseable +type DepEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DepEnrollmentProfileable) + SetValue(value []DepEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/dep_enrollment_profileable.go new file mode 100644 index 000000000..fb8195a9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_enrollment_profileable.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepEnrollmentProfileable +type DepEnrollmentProfileable interface { + EnrollmentProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleIdDisabled()(*bool) + GetApplePayDisabled()(*bool) + GetAwaitDeviceConfiguredConfirmation()(*bool) + GetDiagnosticsDisabled()(*bool) + GetEnableSharedIPad()(*bool) + GetIsDefault()(*bool) + GetIsMandatory()(*bool) + GetITunesPairingMode()(*ITunesPairingMode) + GetLocationDisabled()(*bool) + GetMacOSFileVaultDisabled()(*bool) + GetMacOSRegistrationDisabled()(*bool) + GetManagementCertificates()([]ManagementCertificateWithThumbprintable) + GetPassCodeDisabled()(*bool) + GetProfileRemovalDisabled()(*bool) + GetRestoreBlocked()(*bool) + GetRestoreFromAndroidDisabled()(*bool) + GetSharedIPadMaximumUserCount()(*int32) + GetSiriDisabled()(*bool) + GetSupervisedModeEnabled()(*bool) + GetSupportDepartment()(*string) + GetSupportPhoneNumber()(*string) + GetTermsAndConditionsDisabled()(*bool) + GetTouchIdDisabled()(*bool) + GetZoomDisabled()(*bool) + SetAppleIdDisabled(value *bool)() + SetApplePayDisabled(value *bool)() + SetAwaitDeviceConfiguredConfirmation(value *bool)() + SetDiagnosticsDisabled(value *bool)() + SetEnableSharedIPad(value *bool)() + SetIsDefault(value *bool)() + SetIsMandatory(value *bool)() + SetITunesPairingMode(value *ITunesPairingMode)() + SetLocationDisabled(value *bool)() + SetMacOSFileVaultDisabled(value *bool)() + SetMacOSRegistrationDisabled(value *bool)() + SetManagementCertificates(value []ManagementCertificateWithThumbprintable)() + SetPassCodeDisabled(value *bool)() + SetProfileRemovalDisabled(value *bool)() + SetRestoreBlocked(value *bool)() + SetRestoreFromAndroidDisabled(value *bool)() + SetSharedIPadMaximumUserCount(value *int32)() + SetSiriDisabled(value *bool)() + SetSupervisedModeEnabled(value *bool)() + SetSupportDepartment(value *string)() + SetSupportPhoneNumber(value *string)() + SetTermsAndConditionsDisabled(value *bool)() + SetTouchIdDisabled(value *bool)() + SetZoomDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile.go new file mode 100644 index 000000000..20461aef6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile.go @@ -0,0 +1,799 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepIOSEnrollmentProfile +type DepIOSEnrollmentProfile struct { + DepEnrollmentBaseProfile + // Indicates if Apperance screen is disabled + appearanceScreenDisabled *bool + // Indicates if the device will need to wait for configured confirmation + awaitDeviceConfiguredConfirmation *bool + // Carrier URL for activating device eSIM. + carrierActivationUrl *string + // If set, indicates which Vpp token should be used to deploy the Company Portal w/ device licensing. 'enableAuthenticationViaCompanyPortal' must be set in order for this property to be set. + companyPortalVppTokenId *string + // Indicates if Device To Device Migration is disabled + deviceToDeviceMigrationDisabled *bool + // This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. + enableSharedIPad *bool + // Tells the device to enable single app mode and apply app-lock during enrollment. Default is false. 'enableAuthenticationViaCompanyPortal' and 'companyPortalVppTokenId' must be set for this property to be set. + enableSingleAppEnrollmentMode *bool + // Indicates if Express Language screen is disabled + expressLanguageScreenDisabled *bool + // Indicates if temporary sessions is enabled + forceTemporarySession *bool + // Indicates if home button sensitivity screen is disabled + homeButtonScreenDisabled *bool + // Indicates if iMessage and FaceTime screen is disabled + iMessageAndFaceTimeScreenDisabled *bool + // The iTunesPairingMode property + iTunesPairingMode *ITunesPairingMode + // Management certificates for Apple Configurator + managementCertificates []ManagementCertificateWithThumbprintable + // Indicates if onboarding setup screen is disabled + onBoardingScreenDisabled *bool + // Indicates if Passcode setup pane is disabled + passCodeDisabled *bool + // Indicates timeout before locked screen requires the user to enter the device passocde to unlock it + passcodeLockGracePeriodInSeconds *int32 + // Indicates if Preferred language screen is disabled + preferredLanguageScreenDisabled *bool + // Indicates if Weclome screen is disabled + restoreCompletedScreenDisabled *bool + // Indicates if Restore from Android is disabled + restoreFromAndroidDisabled *bool + // This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. + sharedIPadMaximumUserCount *int32 + // Indicates if the SIMSetup screen is disabled + simSetupScreenDisabled *bool + // Indicates if the mandatory sofware update screen is disabled + softwareUpdateScreenDisabled *bool + // Indicates timeout of temporary session + temporarySessionTimeoutInSeconds *int32 + // Indicates if Weclome screen is disabled + updateCompleteScreenDisabled *bool + // Indicates that this apple device is designated to support 'shared device mode' scenarios. This is distinct from the 'shared iPad' scenario. See https://learn.microsoft.com/en-us/mem/intune/enrollment/device-enrollment-shared-ios + userlessSharedAadModeEnabled *bool + // Indicates timeout of temporary session + userSessionTimeoutInSeconds *int32 + // Indicates if the watch migration screen is disabled + watchMigrationScreenDisabled *bool + // Indicates if Weclome screen is disabled + welcomeScreenDisabled *bool + // Indicates if zoom setup pane is disabled + zoomDisabled *bool +} +// NewDepIOSEnrollmentProfile instantiates a new DepIOSEnrollmentProfile and sets the default values. +func NewDepIOSEnrollmentProfile()(*DepIOSEnrollmentProfile) { + m := &DepIOSEnrollmentProfile{ + DepEnrollmentBaseProfile: *NewDepEnrollmentBaseProfile(), + } + odataTypeValue := "#microsoft.graph.depIOSEnrollmentProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDepIOSEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepIOSEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepIOSEnrollmentProfile(), nil +} +// GetAppearanceScreenDisabled gets the appearanceScreenDisabled property value. Indicates if Apperance screen is disabled +func (m *DepIOSEnrollmentProfile) GetAppearanceScreenDisabled()(*bool) { + return m.appearanceScreenDisabled +} +// GetAwaitDeviceConfiguredConfirmation gets the awaitDeviceConfiguredConfirmation property value. Indicates if the device will need to wait for configured confirmation +func (m *DepIOSEnrollmentProfile) GetAwaitDeviceConfiguredConfirmation()(*bool) { + return m.awaitDeviceConfiguredConfirmation +} +// GetCarrierActivationUrl gets the carrierActivationUrl property value. Carrier URL for activating device eSIM. +func (m *DepIOSEnrollmentProfile) GetCarrierActivationUrl()(*string) { + return m.carrierActivationUrl +} +// GetCompanyPortalVppTokenId gets the companyPortalVppTokenId property value. If set, indicates which Vpp token should be used to deploy the Company Portal w/ device licensing. 'enableAuthenticationViaCompanyPortal' must be set in order for this property to be set. +func (m *DepIOSEnrollmentProfile) GetCompanyPortalVppTokenId()(*string) { + return m.companyPortalVppTokenId +} +// GetDeviceToDeviceMigrationDisabled gets the deviceToDeviceMigrationDisabled property value. Indicates if Device To Device Migration is disabled +func (m *DepIOSEnrollmentProfile) GetDeviceToDeviceMigrationDisabled()(*bool) { + return m.deviceToDeviceMigrationDisabled +} +// GetEnableSharedIPad gets the enableSharedIPad property value. This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. +func (m *DepIOSEnrollmentProfile) GetEnableSharedIPad()(*bool) { + return m.enableSharedIPad +} +// GetEnableSingleAppEnrollmentMode gets the enableSingleAppEnrollmentMode property value. Tells the device to enable single app mode and apply app-lock during enrollment. Default is false. 'enableAuthenticationViaCompanyPortal' and 'companyPortalVppTokenId' must be set for this property to be set. +func (m *DepIOSEnrollmentProfile) GetEnableSingleAppEnrollmentMode()(*bool) { + return m.enableSingleAppEnrollmentMode +} +// GetExpressLanguageScreenDisabled gets the expressLanguageScreenDisabled property value. Indicates if Express Language screen is disabled +func (m *DepIOSEnrollmentProfile) GetExpressLanguageScreenDisabled()(*bool) { + return m.expressLanguageScreenDisabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepIOSEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DepEnrollmentBaseProfile.GetFieldDeserializers() + res["appearanceScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppearanceScreenDisabled(val) + } + return nil + } + res["awaitDeviceConfiguredConfirmation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAwaitDeviceConfiguredConfirmation(val) + } + return nil + } + res["carrierActivationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCarrierActivationUrl(val) + } + return nil + } + res["companyPortalVppTokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompanyPortalVppTokenId(val) + } + return nil + } + res["deviceToDeviceMigrationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceToDeviceMigrationDisabled(val) + } + return nil + } + res["enableSharedIPad"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSharedIPad(val) + } + return nil + } + res["enableSingleAppEnrollmentMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSingleAppEnrollmentMode(val) + } + return nil + } + res["expressLanguageScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExpressLanguageScreenDisabled(val) + } + return nil + } + res["forceTemporarySession"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetForceTemporarySession(val) + } + return nil + } + res["homeButtonScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHomeButtonScreenDisabled(val) + } + return nil + } + res["iMessageAndFaceTimeScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIMessageAndFaceTimeScreenDisabled(val) + } + return nil + } + res["iTunesPairingMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseITunesPairingMode) + if err != nil { + return err + } + if val != nil { + m.SetITunesPairingMode(val.(*ITunesPairingMode)) + } + return nil + } + res["managementCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementCertificateWithThumbprintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementCertificateWithThumbprintable, len(val)) + for i, v := range val { + res[i] = v.(ManagementCertificateWithThumbprintable) + } + m.SetManagementCertificates(res) + } + return nil + } + res["onBoardingScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnBoardingScreenDisabled(val) + } + return nil + } + res["passCodeDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPassCodeDisabled(val) + } + return nil + } + res["passcodeLockGracePeriodInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeLockGracePeriodInSeconds(val) + } + return nil + } + res["preferredLanguageScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredLanguageScreenDisabled(val) + } + return nil + } + res["restoreCompletedScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestoreCompletedScreenDisabled(val) + } + return nil + } + res["restoreFromAndroidDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestoreFromAndroidDisabled(val) + } + return nil + } + res["sharedIPadMaximumUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSharedIPadMaximumUserCount(val) + } + return nil + } + res["simSetupScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSimSetupScreenDisabled(val) + } + return nil + } + res["softwareUpdateScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdateScreenDisabled(val) + } + return nil + } + res["temporarySessionTimeoutInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTemporarySessionTimeoutInSeconds(val) + } + return nil + } + res["updateCompleteScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdateCompleteScreenDisabled(val) + } + return nil + } + res["userlessSharedAadModeEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserlessSharedAadModeEnabled(val) + } + return nil + } + res["userSessionTimeoutInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserSessionTimeoutInSeconds(val) + } + return nil + } + res["watchMigrationScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWatchMigrationScreenDisabled(val) + } + return nil + } + res["welcomeScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWelcomeScreenDisabled(val) + } + return nil + } + res["zoomDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetZoomDisabled(val) + } + return nil + } + return res +} +// GetForceTemporarySession gets the forceTemporarySession property value. Indicates if temporary sessions is enabled +func (m *DepIOSEnrollmentProfile) GetForceTemporarySession()(*bool) { + return m.forceTemporarySession +} +// GetHomeButtonScreenDisabled gets the homeButtonScreenDisabled property value. Indicates if home button sensitivity screen is disabled +func (m *DepIOSEnrollmentProfile) GetHomeButtonScreenDisabled()(*bool) { + return m.homeButtonScreenDisabled +} +// GetIMessageAndFaceTimeScreenDisabled gets the iMessageAndFaceTimeScreenDisabled property value. Indicates if iMessage and FaceTime screen is disabled +func (m *DepIOSEnrollmentProfile) GetIMessageAndFaceTimeScreenDisabled()(*bool) { + return m.iMessageAndFaceTimeScreenDisabled +} +// GetITunesPairingMode gets the iTunesPairingMode property value. The iTunesPairingMode property +func (m *DepIOSEnrollmentProfile) GetITunesPairingMode()(*ITunesPairingMode) { + return m.iTunesPairingMode +} +// GetManagementCertificates gets the managementCertificates property value. Management certificates for Apple Configurator +func (m *DepIOSEnrollmentProfile) GetManagementCertificates()([]ManagementCertificateWithThumbprintable) { + return m.managementCertificates +} +// GetOnBoardingScreenDisabled gets the onBoardingScreenDisabled property value. Indicates if onboarding setup screen is disabled +func (m *DepIOSEnrollmentProfile) GetOnBoardingScreenDisabled()(*bool) { + return m.onBoardingScreenDisabled +} +// GetPassCodeDisabled gets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepIOSEnrollmentProfile) GetPassCodeDisabled()(*bool) { + return m.passCodeDisabled +} +// GetPasscodeLockGracePeriodInSeconds gets the passcodeLockGracePeriodInSeconds property value. Indicates timeout before locked screen requires the user to enter the device passocde to unlock it +func (m *DepIOSEnrollmentProfile) GetPasscodeLockGracePeriodInSeconds()(*int32) { + return m.passcodeLockGracePeriodInSeconds +} +// GetPreferredLanguageScreenDisabled gets the preferredLanguageScreenDisabled property value. Indicates if Preferred language screen is disabled +func (m *DepIOSEnrollmentProfile) GetPreferredLanguageScreenDisabled()(*bool) { + return m.preferredLanguageScreenDisabled +} +// GetRestoreCompletedScreenDisabled gets the restoreCompletedScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) GetRestoreCompletedScreenDisabled()(*bool) { + return m.restoreCompletedScreenDisabled +} +// GetRestoreFromAndroidDisabled gets the restoreFromAndroidDisabled property value. Indicates if Restore from Android is disabled +func (m *DepIOSEnrollmentProfile) GetRestoreFromAndroidDisabled()(*bool) { + return m.restoreFromAndroidDisabled +} +// GetSharedIPadMaximumUserCount gets the sharedIPadMaximumUserCount property value. This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. +func (m *DepIOSEnrollmentProfile) GetSharedIPadMaximumUserCount()(*int32) { + return m.sharedIPadMaximumUserCount +} +// GetSimSetupScreenDisabled gets the simSetupScreenDisabled property value. Indicates if the SIMSetup screen is disabled +func (m *DepIOSEnrollmentProfile) GetSimSetupScreenDisabled()(*bool) { + return m.simSetupScreenDisabled +} +// GetSoftwareUpdateScreenDisabled gets the softwareUpdateScreenDisabled property value. Indicates if the mandatory sofware update screen is disabled +func (m *DepIOSEnrollmentProfile) GetSoftwareUpdateScreenDisabled()(*bool) { + return m.softwareUpdateScreenDisabled +} +// GetTemporarySessionTimeoutInSeconds gets the temporarySessionTimeoutInSeconds property value. Indicates timeout of temporary session +func (m *DepIOSEnrollmentProfile) GetTemporarySessionTimeoutInSeconds()(*int32) { + return m.temporarySessionTimeoutInSeconds +} +// GetUpdateCompleteScreenDisabled gets the updateCompleteScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) GetUpdateCompleteScreenDisabled()(*bool) { + return m.updateCompleteScreenDisabled +} +// GetUserlessSharedAadModeEnabled gets the userlessSharedAadModeEnabled property value. Indicates that this apple device is designated to support 'shared device mode' scenarios. This is distinct from the 'shared iPad' scenario. See https://learn.microsoft.com/en-us/mem/intune/enrollment/device-enrollment-shared-ios +func (m *DepIOSEnrollmentProfile) GetUserlessSharedAadModeEnabled()(*bool) { + return m.userlessSharedAadModeEnabled +} +// GetUserSessionTimeoutInSeconds gets the userSessionTimeoutInSeconds property value. Indicates timeout of temporary session +func (m *DepIOSEnrollmentProfile) GetUserSessionTimeoutInSeconds()(*int32) { + return m.userSessionTimeoutInSeconds +} +// GetWatchMigrationScreenDisabled gets the watchMigrationScreenDisabled property value. Indicates if the watch migration screen is disabled +func (m *DepIOSEnrollmentProfile) GetWatchMigrationScreenDisabled()(*bool) { + return m.watchMigrationScreenDisabled +} +// GetWelcomeScreenDisabled gets the welcomeScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) GetWelcomeScreenDisabled()(*bool) { + return m.welcomeScreenDisabled +} +// GetZoomDisabled gets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepIOSEnrollmentProfile) GetZoomDisabled()(*bool) { + return m.zoomDisabled +} +// Serialize serializes information the current object +func (m *DepIOSEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DepEnrollmentBaseProfile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("appearanceScreenDisabled", m.GetAppearanceScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("awaitDeviceConfiguredConfirmation", m.GetAwaitDeviceConfiguredConfirmation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("carrierActivationUrl", m.GetCarrierActivationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("companyPortalVppTokenId", m.GetCompanyPortalVppTokenId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceToDeviceMigrationDisabled", m.GetDeviceToDeviceMigrationDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSharedIPad", m.GetEnableSharedIPad()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSingleAppEnrollmentMode", m.GetEnableSingleAppEnrollmentMode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("expressLanguageScreenDisabled", m.GetExpressLanguageScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("forceTemporarySession", m.GetForceTemporarySession()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("homeButtonScreenDisabled", m.GetHomeButtonScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iMessageAndFaceTimeScreenDisabled", m.GetIMessageAndFaceTimeScreenDisabled()) + if err != nil { + return err + } + } + if m.GetITunesPairingMode() != nil { + cast := (*m.GetITunesPairingMode()).String() + err = writer.WriteStringValue("iTunesPairingMode", &cast) + if err != nil { + return err + } + } + if m.GetManagementCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementCertificates())) + for i, v := range m.GetManagementCertificates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementCertificates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onBoardingScreenDisabled", m.GetOnBoardingScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passCodeDisabled", m.GetPassCodeDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeLockGracePeriodInSeconds", m.GetPasscodeLockGracePeriodInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("preferredLanguageScreenDisabled", m.GetPreferredLanguageScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restoreCompletedScreenDisabled", m.GetRestoreCompletedScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restoreFromAndroidDisabled", m.GetRestoreFromAndroidDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sharedIPadMaximumUserCount", m.GetSharedIPadMaximumUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("simSetupScreenDisabled", m.GetSimSetupScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("softwareUpdateScreenDisabled", m.GetSoftwareUpdateScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("temporarySessionTimeoutInSeconds", m.GetTemporarySessionTimeoutInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("updateCompleteScreenDisabled", m.GetUpdateCompleteScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("userlessSharedAadModeEnabled", m.GetUserlessSharedAadModeEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("userSessionTimeoutInSeconds", m.GetUserSessionTimeoutInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("watchMigrationScreenDisabled", m.GetWatchMigrationScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("welcomeScreenDisabled", m.GetWelcomeScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("zoomDisabled", m.GetZoomDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetAppearanceScreenDisabled sets the appearanceScreenDisabled property value. Indicates if Apperance screen is disabled +func (m *DepIOSEnrollmentProfile) SetAppearanceScreenDisabled(value *bool)() { + m.appearanceScreenDisabled = value +} +// SetAwaitDeviceConfiguredConfirmation sets the awaitDeviceConfiguredConfirmation property value. Indicates if the device will need to wait for configured confirmation +func (m *DepIOSEnrollmentProfile) SetAwaitDeviceConfiguredConfirmation(value *bool)() { + m.awaitDeviceConfiguredConfirmation = value +} +// SetCarrierActivationUrl sets the carrierActivationUrl property value. Carrier URL for activating device eSIM. +func (m *DepIOSEnrollmentProfile) SetCarrierActivationUrl(value *string)() { + m.carrierActivationUrl = value +} +// SetCompanyPortalVppTokenId sets the companyPortalVppTokenId property value. If set, indicates which Vpp token should be used to deploy the Company Portal w/ device licensing. 'enableAuthenticationViaCompanyPortal' must be set in order for this property to be set. +func (m *DepIOSEnrollmentProfile) SetCompanyPortalVppTokenId(value *string)() { + m.companyPortalVppTokenId = value +} +// SetDeviceToDeviceMigrationDisabled sets the deviceToDeviceMigrationDisabled property value. Indicates if Device To Device Migration is disabled +func (m *DepIOSEnrollmentProfile) SetDeviceToDeviceMigrationDisabled(value *bool)() { + m.deviceToDeviceMigrationDisabled = value +} +// SetEnableSharedIPad sets the enableSharedIPad property value. This indicates whether the device is to be enrolled in a mode which enables multi user scenarios. Only applicable in shared iPads. +func (m *DepIOSEnrollmentProfile) SetEnableSharedIPad(value *bool)() { + m.enableSharedIPad = value +} +// SetEnableSingleAppEnrollmentMode sets the enableSingleAppEnrollmentMode property value. Tells the device to enable single app mode and apply app-lock during enrollment. Default is false. 'enableAuthenticationViaCompanyPortal' and 'companyPortalVppTokenId' must be set for this property to be set. +func (m *DepIOSEnrollmentProfile) SetEnableSingleAppEnrollmentMode(value *bool)() { + m.enableSingleAppEnrollmentMode = value +} +// SetExpressLanguageScreenDisabled sets the expressLanguageScreenDisabled property value. Indicates if Express Language screen is disabled +func (m *DepIOSEnrollmentProfile) SetExpressLanguageScreenDisabled(value *bool)() { + m.expressLanguageScreenDisabled = value +} +// SetForceTemporarySession sets the forceTemporarySession property value. Indicates if temporary sessions is enabled +func (m *DepIOSEnrollmentProfile) SetForceTemporarySession(value *bool)() { + m.forceTemporarySession = value +} +// SetHomeButtonScreenDisabled sets the homeButtonScreenDisabled property value. Indicates if home button sensitivity screen is disabled +func (m *DepIOSEnrollmentProfile) SetHomeButtonScreenDisabled(value *bool)() { + m.homeButtonScreenDisabled = value +} +// SetIMessageAndFaceTimeScreenDisabled sets the iMessageAndFaceTimeScreenDisabled property value. Indicates if iMessage and FaceTime screen is disabled +func (m *DepIOSEnrollmentProfile) SetIMessageAndFaceTimeScreenDisabled(value *bool)() { + m.iMessageAndFaceTimeScreenDisabled = value +} +// SetITunesPairingMode sets the iTunesPairingMode property value. The iTunesPairingMode property +func (m *DepIOSEnrollmentProfile) SetITunesPairingMode(value *ITunesPairingMode)() { + m.iTunesPairingMode = value +} +// SetManagementCertificates sets the managementCertificates property value. Management certificates for Apple Configurator +func (m *DepIOSEnrollmentProfile) SetManagementCertificates(value []ManagementCertificateWithThumbprintable)() { + m.managementCertificates = value +} +// SetOnBoardingScreenDisabled sets the onBoardingScreenDisabled property value. Indicates if onboarding setup screen is disabled +func (m *DepIOSEnrollmentProfile) SetOnBoardingScreenDisabled(value *bool)() { + m.onBoardingScreenDisabled = value +} +// SetPassCodeDisabled sets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepIOSEnrollmentProfile) SetPassCodeDisabled(value *bool)() { + m.passCodeDisabled = value +} +// SetPasscodeLockGracePeriodInSeconds sets the passcodeLockGracePeriodInSeconds property value. Indicates timeout before locked screen requires the user to enter the device passocde to unlock it +func (m *DepIOSEnrollmentProfile) SetPasscodeLockGracePeriodInSeconds(value *int32)() { + m.passcodeLockGracePeriodInSeconds = value +} +// SetPreferredLanguageScreenDisabled sets the preferredLanguageScreenDisabled property value. Indicates if Preferred language screen is disabled +func (m *DepIOSEnrollmentProfile) SetPreferredLanguageScreenDisabled(value *bool)() { + m.preferredLanguageScreenDisabled = value +} +// SetRestoreCompletedScreenDisabled sets the restoreCompletedScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) SetRestoreCompletedScreenDisabled(value *bool)() { + m.restoreCompletedScreenDisabled = value +} +// SetRestoreFromAndroidDisabled sets the restoreFromAndroidDisabled property value. Indicates if Restore from Android is disabled +func (m *DepIOSEnrollmentProfile) SetRestoreFromAndroidDisabled(value *bool)() { + m.restoreFromAndroidDisabled = value +} +// SetSharedIPadMaximumUserCount sets the sharedIPadMaximumUserCount property value. This specifies the maximum number of users that can use a shared iPad. Only applicable in shared iPad mode. +func (m *DepIOSEnrollmentProfile) SetSharedIPadMaximumUserCount(value *int32)() { + m.sharedIPadMaximumUserCount = value +} +// SetSimSetupScreenDisabled sets the simSetupScreenDisabled property value. Indicates if the SIMSetup screen is disabled +func (m *DepIOSEnrollmentProfile) SetSimSetupScreenDisabled(value *bool)() { + m.simSetupScreenDisabled = value +} +// SetSoftwareUpdateScreenDisabled sets the softwareUpdateScreenDisabled property value. Indicates if the mandatory sofware update screen is disabled +func (m *DepIOSEnrollmentProfile) SetSoftwareUpdateScreenDisabled(value *bool)() { + m.softwareUpdateScreenDisabled = value +} +// SetTemporarySessionTimeoutInSeconds sets the temporarySessionTimeoutInSeconds property value. Indicates timeout of temporary session +func (m *DepIOSEnrollmentProfile) SetTemporarySessionTimeoutInSeconds(value *int32)() { + m.temporarySessionTimeoutInSeconds = value +} +// SetUpdateCompleteScreenDisabled sets the updateCompleteScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) SetUpdateCompleteScreenDisabled(value *bool)() { + m.updateCompleteScreenDisabled = value +} +// SetUserlessSharedAadModeEnabled sets the userlessSharedAadModeEnabled property value. Indicates that this apple device is designated to support 'shared device mode' scenarios. This is distinct from the 'shared iPad' scenario. See https://learn.microsoft.com/en-us/mem/intune/enrollment/device-enrollment-shared-ios +func (m *DepIOSEnrollmentProfile) SetUserlessSharedAadModeEnabled(value *bool)() { + m.userlessSharedAadModeEnabled = value +} +// SetUserSessionTimeoutInSeconds sets the userSessionTimeoutInSeconds property value. Indicates timeout of temporary session +func (m *DepIOSEnrollmentProfile) SetUserSessionTimeoutInSeconds(value *int32)() { + m.userSessionTimeoutInSeconds = value +} +// SetWatchMigrationScreenDisabled sets the watchMigrationScreenDisabled property value. Indicates if the watch migration screen is disabled +func (m *DepIOSEnrollmentProfile) SetWatchMigrationScreenDisabled(value *bool)() { + m.watchMigrationScreenDisabled = value +} +// SetWelcomeScreenDisabled sets the welcomeScreenDisabled property value. Indicates if Weclome screen is disabled +func (m *DepIOSEnrollmentProfile) SetWelcomeScreenDisabled(value *bool)() { + m.welcomeScreenDisabled = value +} +// SetZoomDisabled sets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepIOSEnrollmentProfile) SetZoomDisabled(value *bool)() { + m.zoomDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_response.go new file mode 100644 index 000000000..c13ae7166 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepIOSEnrollmentProfileCollectionResponse +type DepIOSEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DepIOSEnrollmentProfileable +} +// NewDepIOSEnrollmentProfileCollectionResponse instantiates a new DepIOSEnrollmentProfileCollectionResponse and sets the default values. +func NewDepIOSEnrollmentProfileCollectionResponse()(*DepIOSEnrollmentProfileCollectionResponse) { + m := &DepIOSEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDepIOSEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepIOSEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepIOSEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepIOSEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepIOSEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepIOSEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(DepIOSEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DepIOSEnrollmentProfileCollectionResponse) GetValue()([]DepIOSEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *DepIOSEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DepIOSEnrollmentProfileCollectionResponse) SetValue(value []DepIOSEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..0eb8c9318 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepIOSEnrollmentProfileCollectionResponseable +type DepIOSEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DepIOSEnrollmentProfileable) + SetValue(value []DepIOSEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profileable.go new file mode 100644 index 000000000..56b167b0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_i_o_s_enrollment_profileable.go @@ -0,0 +1,69 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepIOSEnrollmentProfileable +type DepIOSEnrollmentProfileable interface { + DepEnrollmentBaseProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppearanceScreenDisabled()(*bool) + GetAwaitDeviceConfiguredConfirmation()(*bool) + GetCarrierActivationUrl()(*string) + GetCompanyPortalVppTokenId()(*string) + GetDeviceToDeviceMigrationDisabled()(*bool) + GetEnableSharedIPad()(*bool) + GetEnableSingleAppEnrollmentMode()(*bool) + GetExpressLanguageScreenDisabled()(*bool) + GetForceTemporarySession()(*bool) + GetHomeButtonScreenDisabled()(*bool) + GetIMessageAndFaceTimeScreenDisabled()(*bool) + GetITunesPairingMode()(*ITunesPairingMode) + GetManagementCertificates()([]ManagementCertificateWithThumbprintable) + GetOnBoardingScreenDisabled()(*bool) + GetPassCodeDisabled()(*bool) + GetPasscodeLockGracePeriodInSeconds()(*int32) + GetPreferredLanguageScreenDisabled()(*bool) + GetRestoreCompletedScreenDisabled()(*bool) + GetRestoreFromAndroidDisabled()(*bool) + GetSharedIPadMaximumUserCount()(*int32) + GetSimSetupScreenDisabled()(*bool) + GetSoftwareUpdateScreenDisabled()(*bool) + GetTemporarySessionTimeoutInSeconds()(*int32) + GetUpdateCompleteScreenDisabled()(*bool) + GetUserlessSharedAadModeEnabled()(*bool) + GetUserSessionTimeoutInSeconds()(*int32) + GetWatchMigrationScreenDisabled()(*bool) + GetWelcomeScreenDisabled()(*bool) + GetZoomDisabled()(*bool) + SetAppearanceScreenDisabled(value *bool)() + SetAwaitDeviceConfiguredConfirmation(value *bool)() + SetCarrierActivationUrl(value *string)() + SetCompanyPortalVppTokenId(value *string)() + SetDeviceToDeviceMigrationDisabled(value *bool)() + SetEnableSharedIPad(value *bool)() + SetEnableSingleAppEnrollmentMode(value *bool)() + SetExpressLanguageScreenDisabled(value *bool)() + SetForceTemporarySession(value *bool)() + SetHomeButtonScreenDisabled(value *bool)() + SetIMessageAndFaceTimeScreenDisabled(value *bool)() + SetITunesPairingMode(value *ITunesPairingMode)() + SetManagementCertificates(value []ManagementCertificateWithThumbprintable)() + SetOnBoardingScreenDisabled(value *bool)() + SetPassCodeDisabled(value *bool)() + SetPasscodeLockGracePeriodInSeconds(value *int32)() + SetPreferredLanguageScreenDisabled(value *bool)() + SetRestoreCompletedScreenDisabled(value *bool)() + SetRestoreFromAndroidDisabled(value *bool)() + SetSharedIPadMaximumUserCount(value *int32)() + SetSimSetupScreenDisabled(value *bool)() + SetSoftwareUpdateScreenDisabled(value *bool)() + SetTemporarySessionTimeoutInSeconds(value *int32)() + SetUpdateCompleteScreenDisabled(value *bool)() + SetUserlessSharedAadModeEnabled(value *bool)() + SetUserSessionTimeoutInSeconds(value *int32)() + SetWatchMigrationScreenDisabled(value *bool)() + SetWelcomeScreenDisabled(value *bool)() + SetZoomDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile.go b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile.go new file mode 100644 index 000000000..c17295161 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile.go @@ -0,0 +1,634 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepMacOSEnrollmentProfile +type DepMacOSEnrollmentProfile struct { + DepEnrollmentBaseProfile + // Indicates if Accessibility screen is disabled + accessibilityScreenDisabled *bool + // Indicates if UnlockWithWatch screen is disabled + autoUnlockWithWatchDisabled *bool + // Indicates if iCloud Documents and Desktop screen is disabled + chooseYourLockScreenDisabled *bool + // Indicates whether Setup Assistant will auto populate the primary account information + dontAutoPopulatePrimaryAccountInfo *bool + // Indicates whether the user will enable blockediting + enableRestrictEditing *bool + // Indicates if file vault is disabled + fileVaultDisabled *bool + // Indicates if iCloud Analytics screen is disabled + iCloudDiagnosticsDisabled *bool + // Indicates if iCloud Documents and Desktop screen is disabled + iCloudStorageDisabled *bool + // Indicates whether the profile is a local account + isLocalPrimaryAccount *bool + // Indicates whether the profile is a primary user + isPrimaryUser *bool + // Indicates whether the primary account information will be locked + lockPrimaryAccountInfo *bool + // Indicates whether or not this is the short name of the local account to manage + managedLocalUserShortName *bool + // Indicates if Passcode setup pane is disabled + passCodeDisabled *bool + // Indicates whether the user will prefill their account info + prefillAccountInfo *bool + // Indicates what the full name for the primary account is + primaryAccountFullName *string + // Indicates what the account name for the primary account is + primaryAccountUserName *string + // Indicates who the primary user of the profile is + primaryUser *string + // Indicates who the primary user of the profile is + primaryUserFullName *string + // Indicates if registration is disabled + registrationDisabled *bool + // Indicates if the device is network-tethered to run the command + requestRequiresNetworkTether *bool + // Indicates whether Setup Assistant will set the account as a regular user + setPrimarySetupAccountAsRegularUser *bool + // Indicates whether Setup Assistant will skip the user interface for primary account setup + skipPrimarySetupAccountCreation *bool + // Indicates if zoom setup pane is disabled + zoomDisabled *bool +} +// NewDepMacOSEnrollmentProfile instantiates a new DepMacOSEnrollmentProfile and sets the default values. +func NewDepMacOSEnrollmentProfile()(*DepMacOSEnrollmentProfile) { + m := &DepMacOSEnrollmentProfile{ + DepEnrollmentBaseProfile: *NewDepEnrollmentBaseProfile(), + } + odataTypeValue := "#microsoft.graph.depMacOSEnrollmentProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDepMacOSEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepMacOSEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepMacOSEnrollmentProfile(), nil +} +// GetAccessibilityScreenDisabled gets the accessibilityScreenDisabled property value. Indicates if Accessibility screen is disabled +func (m *DepMacOSEnrollmentProfile) GetAccessibilityScreenDisabled()(*bool) { + return m.accessibilityScreenDisabled +} +// GetAutoUnlockWithWatchDisabled gets the autoUnlockWithWatchDisabled property value. Indicates if UnlockWithWatch screen is disabled +func (m *DepMacOSEnrollmentProfile) GetAutoUnlockWithWatchDisabled()(*bool) { + return m.autoUnlockWithWatchDisabled +} +// GetChooseYourLockScreenDisabled gets the chooseYourLockScreenDisabled property value. Indicates if iCloud Documents and Desktop screen is disabled +func (m *DepMacOSEnrollmentProfile) GetChooseYourLockScreenDisabled()(*bool) { + return m.chooseYourLockScreenDisabled +} +// GetDontAutoPopulatePrimaryAccountInfo gets the dontAutoPopulatePrimaryAccountInfo property value. Indicates whether Setup Assistant will auto populate the primary account information +func (m *DepMacOSEnrollmentProfile) GetDontAutoPopulatePrimaryAccountInfo()(*bool) { + return m.dontAutoPopulatePrimaryAccountInfo +} +// GetEnableRestrictEditing gets the enableRestrictEditing property value. Indicates whether the user will enable blockediting +func (m *DepMacOSEnrollmentProfile) GetEnableRestrictEditing()(*bool) { + return m.enableRestrictEditing +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepMacOSEnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DepEnrollmentBaseProfile.GetFieldDeserializers() + res["accessibilityScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessibilityScreenDisabled(val) + } + return nil + } + res["autoUnlockWithWatchDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoUnlockWithWatchDisabled(val) + } + return nil + } + res["chooseYourLockScreenDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetChooseYourLockScreenDisabled(val) + } + return nil + } + res["dontAutoPopulatePrimaryAccountInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDontAutoPopulatePrimaryAccountInfo(val) + } + return nil + } + res["enableRestrictEditing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableRestrictEditing(val) + } + return nil + } + res["fileVaultDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultDisabled(val) + } + return nil + } + res["iCloudDiagnosticsDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudDiagnosticsDisabled(val) + } + return nil + } + res["iCloudStorageDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudStorageDisabled(val) + } + return nil + } + res["isLocalPrimaryAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLocalPrimaryAccount(val) + } + return nil + } + res["isPrimaryUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPrimaryUser(val) + } + return nil + } + res["lockPrimaryAccountInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockPrimaryAccountInfo(val) + } + return nil + } + res["managedLocalUserShortName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedLocalUserShortName(val) + } + return nil + } + res["passCodeDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPassCodeDisabled(val) + } + return nil + } + res["prefillAccountInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrefillAccountInfo(val) + } + return nil + } + res["primaryAccountFullName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryAccountFullName(val) + } + return nil + } + res["primaryAccountUserName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryAccountUserName(val) + } + return nil + } + res["primaryUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryUser(val) + } + return nil + } + res["primaryUserFullName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryUserFullName(val) + } + return nil + } + res["registrationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistrationDisabled(val) + } + return nil + } + res["requestRequiresNetworkTether"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestRequiresNetworkTether(val) + } + return nil + } + res["setPrimarySetupAccountAsRegularUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSetPrimarySetupAccountAsRegularUser(val) + } + return nil + } + res["skipPrimarySetupAccountCreation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSkipPrimarySetupAccountCreation(val) + } + return nil + } + res["zoomDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetZoomDisabled(val) + } + return nil + } + return res +} +// GetFileVaultDisabled gets the fileVaultDisabled property value. Indicates if file vault is disabled +func (m *DepMacOSEnrollmentProfile) GetFileVaultDisabled()(*bool) { + return m.fileVaultDisabled +} +// GetICloudDiagnosticsDisabled gets the iCloudDiagnosticsDisabled property value. Indicates if iCloud Analytics screen is disabled +func (m *DepMacOSEnrollmentProfile) GetICloudDiagnosticsDisabled()(*bool) { + return m.iCloudDiagnosticsDisabled +} +// GetICloudStorageDisabled gets the iCloudStorageDisabled property value. Indicates if iCloud Documents and Desktop screen is disabled +func (m *DepMacOSEnrollmentProfile) GetICloudStorageDisabled()(*bool) { + return m.iCloudStorageDisabled +} +// GetIsLocalPrimaryAccount gets the isLocalPrimaryAccount property value. Indicates whether the profile is a local account +func (m *DepMacOSEnrollmentProfile) GetIsLocalPrimaryAccount()(*bool) { + return m.isLocalPrimaryAccount +} +// GetIsPrimaryUser gets the isPrimaryUser property value. Indicates whether the profile is a primary user +func (m *DepMacOSEnrollmentProfile) GetIsPrimaryUser()(*bool) { + return m.isPrimaryUser +} +// GetLockPrimaryAccountInfo gets the lockPrimaryAccountInfo property value. Indicates whether the primary account information will be locked +func (m *DepMacOSEnrollmentProfile) GetLockPrimaryAccountInfo()(*bool) { + return m.lockPrimaryAccountInfo +} +// GetManagedLocalUserShortName gets the managedLocalUserShortName property value. Indicates whether or not this is the short name of the local account to manage +func (m *DepMacOSEnrollmentProfile) GetManagedLocalUserShortName()(*bool) { + return m.managedLocalUserShortName +} +// GetPassCodeDisabled gets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepMacOSEnrollmentProfile) GetPassCodeDisabled()(*bool) { + return m.passCodeDisabled +} +// GetPrefillAccountInfo gets the prefillAccountInfo property value. Indicates whether the user will prefill their account info +func (m *DepMacOSEnrollmentProfile) GetPrefillAccountInfo()(*bool) { + return m.prefillAccountInfo +} +// GetPrimaryAccountFullName gets the primaryAccountFullName property value. Indicates what the full name for the primary account is +func (m *DepMacOSEnrollmentProfile) GetPrimaryAccountFullName()(*string) { + return m.primaryAccountFullName +} +// GetPrimaryAccountUserName gets the primaryAccountUserName property value. Indicates what the account name for the primary account is +func (m *DepMacOSEnrollmentProfile) GetPrimaryAccountUserName()(*string) { + return m.primaryAccountUserName +} +// GetPrimaryUser gets the primaryUser property value. Indicates who the primary user of the profile is +func (m *DepMacOSEnrollmentProfile) GetPrimaryUser()(*string) { + return m.primaryUser +} +// GetPrimaryUserFullName gets the primaryUserFullName property value. Indicates who the primary user of the profile is +func (m *DepMacOSEnrollmentProfile) GetPrimaryUserFullName()(*string) { + return m.primaryUserFullName +} +// GetRegistrationDisabled gets the registrationDisabled property value. Indicates if registration is disabled +func (m *DepMacOSEnrollmentProfile) GetRegistrationDisabled()(*bool) { + return m.registrationDisabled +} +// GetRequestRequiresNetworkTether gets the requestRequiresNetworkTether property value. Indicates if the device is network-tethered to run the command +func (m *DepMacOSEnrollmentProfile) GetRequestRequiresNetworkTether()(*bool) { + return m.requestRequiresNetworkTether +} +// GetSetPrimarySetupAccountAsRegularUser gets the setPrimarySetupAccountAsRegularUser property value. Indicates whether Setup Assistant will set the account as a regular user +func (m *DepMacOSEnrollmentProfile) GetSetPrimarySetupAccountAsRegularUser()(*bool) { + return m.setPrimarySetupAccountAsRegularUser +} +// GetSkipPrimarySetupAccountCreation gets the skipPrimarySetupAccountCreation property value. Indicates whether Setup Assistant will skip the user interface for primary account setup +func (m *DepMacOSEnrollmentProfile) GetSkipPrimarySetupAccountCreation()(*bool) { + return m.skipPrimarySetupAccountCreation +} +// GetZoomDisabled gets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepMacOSEnrollmentProfile) GetZoomDisabled()(*bool) { + return m.zoomDisabled +} +// Serialize serializes information the current object +func (m *DepMacOSEnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DepEnrollmentBaseProfile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accessibilityScreenDisabled", m.GetAccessibilityScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("autoUnlockWithWatchDisabled", m.GetAutoUnlockWithWatchDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("chooseYourLockScreenDisabled", m.GetChooseYourLockScreenDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dontAutoPopulatePrimaryAccountInfo", m.GetDontAutoPopulatePrimaryAccountInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableRestrictEditing", m.GetEnableRestrictEditing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fileVaultDisabled", m.GetFileVaultDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudDiagnosticsDisabled", m.GetICloudDiagnosticsDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudStorageDisabled", m.GetICloudStorageDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLocalPrimaryAccount", m.GetIsLocalPrimaryAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPrimaryUser", m.GetIsPrimaryUser()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lockPrimaryAccountInfo", m.GetLockPrimaryAccountInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedLocalUserShortName", m.GetManagedLocalUserShortName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passCodeDisabled", m.GetPassCodeDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("prefillAccountInfo", m.GetPrefillAccountInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryAccountFullName", m.GetPrimaryAccountFullName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryAccountUserName", m.GetPrimaryAccountUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryUser", m.GetPrimaryUser()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryUserFullName", m.GetPrimaryUserFullName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("registrationDisabled", m.GetRegistrationDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requestRequiresNetworkTether", m.GetRequestRequiresNetworkTether()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("setPrimarySetupAccountAsRegularUser", m.GetSetPrimarySetupAccountAsRegularUser()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("skipPrimarySetupAccountCreation", m.GetSkipPrimarySetupAccountCreation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("zoomDisabled", m.GetZoomDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetAccessibilityScreenDisabled sets the accessibilityScreenDisabled property value. Indicates if Accessibility screen is disabled +func (m *DepMacOSEnrollmentProfile) SetAccessibilityScreenDisabled(value *bool)() { + m.accessibilityScreenDisabled = value +} +// SetAutoUnlockWithWatchDisabled sets the autoUnlockWithWatchDisabled property value. Indicates if UnlockWithWatch screen is disabled +func (m *DepMacOSEnrollmentProfile) SetAutoUnlockWithWatchDisabled(value *bool)() { + m.autoUnlockWithWatchDisabled = value +} +// SetChooseYourLockScreenDisabled sets the chooseYourLockScreenDisabled property value. Indicates if iCloud Documents and Desktop screen is disabled +func (m *DepMacOSEnrollmentProfile) SetChooseYourLockScreenDisabled(value *bool)() { + m.chooseYourLockScreenDisabled = value +} +// SetDontAutoPopulatePrimaryAccountInfo sets the dontAutoPopulatePrimaryAccountInfo property value. Indicates whether Setup Assistant will auto populate the primary account information +func (m *DepMacOSEnrollmentProfile) SetDontAutoPopulatePrimaryAccountInfo(value *bool)() { + m.dontAutoPopulatePrimaryAccountInfo = value +} +// SetEnableRestrictEditing sets the enableRestrictEditing property value. Indicates whether the user will enable blockediting +func (m *DepMacOSEnrollmentProfile) SetEnableRestrictEditing(value *bool)() { + m.enableRestrictEditing = value +} +// SetFileVaultDisabled sets the fileVaultDisabled property value. Indicates if file vault is disabled +func (m *DepMacOSEnrollmentProfile) SetFileVaultDisabled(value *bool)() { + m.fileVaultDisabled = value +} +// SetICloudDiagnosticsDisabled sets the iCloudDiagnosticsDisabled property value. Indicates if iCloud Analytics screen is disabled +func (m *DepMacOSEnrollmentProfile) SetICloudDiagnosticsDisabled(value *bool)() { + m.iCloudDiagnosticsDisabled = value +} +// SetICloudStorageDisabled sets the iCloudStorageDisabled property value. Indicates if iCloud Documents and Desktop screen is disabled +func (m *DepMacOSEnrollmentProfile) SetICloudStorageDisabled(value *bool)() { + m.iCloudStorageDisabled = value +} +// SetIsLocalPrimaryAccount sets the isLocalPrimaryAccount property value. Indicates whether the profile is a local account +func (m *DepMacOSEnrollmentProfile) SetIsLocalPrimaryAccount(value *bool)() { + m.isLocalPrimaryAccount = value +} +// SetIsPrimaryUser sets the isPrimaryUser property value. Indicates whether the profile is a primary user +func (m *DepMacOSEnrollmentProfile) SetIsPrimaryUser(value *bool)() { + m.isPrimaryUser = value +} +// SetLockPrimaryAccountInfo sets the lockPrimaryAccountInfo property value. Indicates whether the primary account information will be locked +func (m *DepMacOSEnrollmentProfile) SetLockPrimaryAccountInfo(value *bool)() { + m.lockPrimaryAccountInfo = value +} +// SetManagedLocalUserShortName sets the managedLocalUserShortName property value. Indicates whether or not this is the short name of the local account to manage +func (m *DepMacOSEnrollmentProfile) SetManagedLocalUserShortName(value *bool)() { + m.managedLocalUserShortName = value +} +// SetPassCodeDisabled sets the passCodeDisabled property value. Indicates if Passcode setup pane is disabled +func (m *DepMacOSEnrollmentProfile) SetPassCodeDisabled(value *bool)() { + m.passCodeDisabled = value +} +// SetPrefillAccountInfo sets the prefillAccountInfo property value. Indicates whether the user will prefill their account info +func (m *DepMacOSEnrollmentProfile) SetPrefillAccountInfo(value *bool)() { + m.prefillAccountInfo = value +} +// SetPrimaryAccountFullName sets the primaryAccountFullName property value. Indicates what the full name for the primary account is +func (m *DepMacOSEnrollmentProfile) SetPrimaryAccountFullName(value *string)() { + m.primaryAccountFullName = value +} +// SetPrimaryAccountUserName sets the primaryAccountUserName property value. Indicates what the account name for the primary account is +func (m *DepMacOSEnrollmentProfile) SetPrimaryAccountUserName(value *string)() { + m.primaryAccountUserName = value +} +// SetPrimaryUser sets the primaryUser property value. Indicates who the primary user of the profile is +func (m *DepMacOSEnrollmentProfile) SetPrimaryUser(value *string)() { + m.primaryUser = value +} +// SetPrimaryUserFullName sets the primaryUserFullName property value. Indicates who the primary user of the profile is +func (m *DepMacOSEnrollmentProfile) SetPrimaryUserFullName(value *string)() { + m.primaryUserFullName = value +} +// SetRegistrationDisabled sets the registrationDisabled property value. Indicates if registration is disabled +func (m *DepMacOSEnrollmentProfile) SetRegistrationDisabled(value *bool)() { + m.registrationDisabled = value +} +// SetRequestRequiresNetworkTether sets the requestRequiresNetworkTether property value. Indicates if the device is network-tethered to run the command +func (m *DepMacOSEnrollmentProfile) SetRequestRequiresNetworkTether(value *bool)() { + m.requestRequiresNetworkTether = value +} +// SetSetPrimarySetupAccountAsRegularUser sets the setPrimarySetupAccountAsRegularUser property value. Indicates whether Setup Assistant will set the account as a regular user +func (m *DepMacOSEnrollmentProfile) SetSetPrimarySetupAccountAsRegularUser(value *bool)() { + m.setPrimarySetupAccountAsRegularUser = value +} +// SetSkipPrimarySetupAccountCreation sets the skipPrimarySetupAccountCreation property value. Indicates whether Setup Assistant will skip the user interface for primary account setup +func (m *DepMacOSEnrollmentProfile) SetSkipPrimarySetupAccountCreation(value *bool)() { + m.skipPrimarySetupAccountCreation = value +} +// SetZoomDisabled sets the zoomDisabled property value. Indicates if zoom setup pane is disabled +func (m *DepMacOSEnrollmentProfile) SetZoomDisabled(value *bool)() { + m.zoomDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_response.go new file mode 100644 index 000000000..dd29c8603 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepMacOSEnrollmentProfileCollectionResponse +type DepMacOSEnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DepMacOSEnrollmentProfileable +} +// NewDepMacOSEnrollmentProfileCollectionResponse instantiates a new DepMacOSEnrollmentProfileCollectionResponse and sets the default values. +func NewDepMacOSEnrollmentProfileCollectionResponse()(*DepMacOSEnrollmentProfileCollectionResponse) { + m := &DepMacOSEnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDepMacOSEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepMacOSEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepMacOSEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepMacOSEnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepMacOSEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepMacOSEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(DepMacOSEnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DepMacOSEnrollmentProfileCollectionResponse) GetValue()([]DepMacOSEnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *DepMacOSEnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DepMacOSEnrollmentProfileCollectionResponse) SetValue(value []DepMacOSEnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..493392710 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepMacOSEnrollmentProfileCollectionResponseable +type DepMacOSEnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DepMacOSEnrollmentProfileable) + SetValue(value []DepMacOSEnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profileable.go new file mode 100644 index 000000000..917e96cb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_mac_o_s_enrollment_profileable.go @@ -0,0 +1,57 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepMacOSEnrollmentProfileable +type DepMacOSEnrollmentProfileable interface { + DepEnrollmentBaseProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessibilityScreenDisabled()(*bool) + GetAutoUnlockWithWatchDisabled()(*bool) + GetChooseYourLockScreenDisabled()(*bool) + GetDontAutoPopulatePrimaryAccountInfo()(*bool) + GetEnableRestrictEditing()(*bool) + GetFileVaultDisabled()(*bool) + GetICloudDiagnosticsDisabled()(*bool) + GetICloudStorageDisabled()(*bool) + GetIsLocalPrimaryAccount()(*bool) + GetIsPrimaryUser()(*bool) + GetLockPrimaryAccountInfo()(*bool) + GetManagedLocalUserShortName()(*bool) + GetPassCodeDisabled()(*bool) + GetPrefillAccountInfo()(*bool) + GetPrimaryAccountFullName()(*string) + GetPrimaryAccountUserName()(*string) + GetPrimaryUser()(*string) + GetPrimaryUserFullName()(*string) + GetRegistrationDisabled()(*bool) + GetRequestRequiresNetworkTether()(*bool) + GetSetPrimarySetupAccountAsRegularUser()(*bool) + GetSkipPrimarySetupAccountCreation()(*bool) + GetZoomDisabled()(*bool) + SetAccessibilityScreenDisabled(value *bool)() + SetAutoUnlockWithWatchDisabled(value *bool)() + SetChooseYourLockScreenDisabled(value *bool)() + SetDontAutoPopulatePrimaryAccountInfo(value *bool)() + SetEnableRestrictEditing(value *bool)() + SetFileVaultDisabled(value *bool)() + SetICloudDiagnosticsDisabled(value *bool)() + SetICloudStorageDisabled(value *bool)() + SetIsLocalPrimaryAccount(value *bool)() + SetIsPrimaryUser(value *bool)() + SetLockPrimaryAccountInfo(value *bool)() + SetManagedLocalUserShortName(value *bool)() + SetPassCodeDisabled(value *bool)() + SetPrefillAccountInfo(value *bool)() + SetPrimaryAccountFullName(value *string)() + SetPrimaryAccountUserName(value *string)() + SetPrimaryUser(value *string)() + SetPrimaryUserFullName(value *string)() + SetRegistrationDisabled(value *bool)() + SetRequestRequiresNetworkTether(value *bool)() + SetSetPrimarySetupAccountAsRegularUser(value *bool)() + SetSkipPrimarySetupAccountCreation(value *bool)() + SetZoomDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_onboarding_setting.go b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting.go new file mode 100644 index 000000000..a181249c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting.go @@ -0,0 +1,472 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepOnboardingSetting the depOnboardingSetting represents an instance of the Apple DEP service being onboarded to Intune. The onboarded service instance manages an Apple Token used to synchronize data between Apple and Intune. +type DepOnboardingSetting struct { + Entity + // The Apple ID used to obtain the current token. + appleIdentifier *string + // Consent granted for data sharing with Apple Dep Service + dataSharingConsentGranted *bool + // Default iOS Enrollment Profile + defaultIosEnrollmentProfile DepIOSEnrollmentProfileable + // Default MacOs Enrollment Profile + defaultMacOsEnrollmentProfile DepMacOSEnrollmentProfileable + // The enrollment profiles. + enrollmentProfiles []EnrollmentProfileable + // The imported Apple device identities. + importedAppleDeviceIdentities []ImportedAppleDeviceIdentityable + // When the service was onboarded. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the service last syned with Intune + lastSuccessfulSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Error code reported by Apple during last dep sync. + lastSyncErrorCode *int32 + // When Intune last requested a sync. + lastSyncTriggeredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Whether or not the Dep token sharing is enabled with the School Data Sync service. + shareTokenWithSchoolDataSyncService *bool + // Gets synced device count + syncedDeviceCount *int32 + // When the token will expire. + tokenExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Friendly Name for Dep Token + tokenName *string + // The tokenType property + tokenType *DepTokenType +} +// NewDepOnboardingSetting instantiates a new depOnboardingSetting and sets the default values. +func NewDepOnboardingSetting()(*DepOnboardingSetting) { + m := &DepOnboardingSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateDepOnboardingSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepOnboardingSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepOnboardingSetting(), nil +} +// GetAppleIdentifier gets the appleIdentifier property value. The Apple ID used to obtain the current token. +func (m *DepOnboardingSetting) GetAppleIdentifier()(*string) { + return m.appleIdentifier +} +// GetDataSharingConsentGranted gets the dataSharingConsentGranted property value. Consent granted for data sharing with Apple Dep Service +func (m *DepOnboardingSetting) GetDataSharingConsentGranted()(*bool) { + return m.dataSharingConsentGranted +} +// GetDefaultIosEnrollmentProfile gets the defaultIosEnrollmentProfile property value. Default iOS Enrollment Profile +func (m *DepOnboardingSetting) GetDefaultIosEnrollmentProfile()(DepIOSEnrollmentProfileable) { + return m.defaultIosEnrollmentProfile +} +// GetDefaultMacOsEnrollmentProfile gets the defaultMacOsEnrollmentProfile property value. Default MacOs Enrollment Profile +func (m *DepOnboardingSetting) GetDefaultMacOsEnrollmentProfile()(DepMacOSEnrollmentProfileable) { + return m.defaultMacOsEnrollmentProfile +} +// GetEnrollmentProfiles gets the enrollmentProfiles property value. The enrollment profiles. +func (m *DepOnboardingSetting) GetEnrollmentProfiles()([]EnrollmentProfileable) { + return m.enrollmentProfiles +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepOnboardingSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appleIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleIdentifier(val) + } + return nil + } + res["dataSharingConsentGranted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDataSharingConsentGranted(val) + } + return nil + } + res["defaultIosEnrollmentProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDepIOSEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultIosEnrollmentProfile(val.(DepIOSEnrollmentProfileable)) + } + return nil + } + res["defaultMacOsEnrollmentProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDepMacOSEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultMacOsEnrollmentProfile(val.(DepMacOSEnrollmentProfileable)) + } + return nil + } + res["enrollmentProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentProfileable) + } + m.SetEnrollmentProfiles(res) + } + return nil + } + res["importedAppleDeviceIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedAppleDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedAppleDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedAppleDeviceIdentityable) + } + m.SetImportedAppleDeviceIdentities(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lastSuccessfulSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSuccessfulSyncDateTime(val) + } + return nil + } + res["lastSyncErrorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncErrorCode(val) + } + return nil + } + res["lastSyncTriggeredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncTriggeredDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["shareTokenWithSchoolDataSyncService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShareTokenWithSchoolDataSyncService(val) + } + return nil + } + res["syncedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSyncedDeviceCount(val) + } + return nil + } + res["tokenExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenExpirationDateTime(val) + } + return nil + } + res["tokenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenName(val) + } + return nil + } + res["tokenType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDepTokenType) + if err != nil { + return err + } + if val != nil { + m.SetTokenType(val.(*DepTokenType)) + } + return nil + } + return res +} +// GetImportedAppleDeviceIdentities gets the importedAppleDeviceIdentities property value. The imported Apple device identities. +func (m *DepOnboardingSetting) GetImportedAppleDeviceIdentities()([]ImportedAppleDeviceIdentityable) { + return m.importedAppleDeviceIdentities +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. When the service was onboarded. +func (m *DepOnboardingSetting) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLastSuccessfulSyncDateTime gets the lastSuccessfulSyncDateTime property value. When the service last syned with Intune +func (m *DepOnboardingSetting) GetLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSuccessfulSyncDateTime +} +// GetLastSyncErrorCode gets the lastSyncErrorCode property value. Error code reported by Apple during last dep sync. +func (m *DepOnboardingSetting) GetLastSyncErrorCode()(*int32) { + return m.lastSyncErrorCode +} +// GetLastSyncTriggeredDateTime gets the lastSyncTriggeredDateTime property value. When Intune last requested a sync. +func (m *DepOnboardingSetting) GetLastSyncTriggeredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncTriggeredDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DepOnboardingSetting) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetShareTokenWithSchoolDataSyncService gets the shareTokenWithSchoolDataSyncService property value. Whether or not the Dep token sharing is enabled with the School Data Sync service. +func (m *DepOnboardingSetting) GetShareTokenWithSchoolDataSyncService()(*bool) { + return m.shareTokenWithSchoolDataSyncService +} +// GetSyncedDeviceCount gets the syncedDeviceCount property value. Gets synced device count +func (m *DepOnboardingSetting) GetSyncedDeviceCount()(*int32) { + return m.syncedDeviceCount +} +// GetTokenExpirationDateTime gets the tokenExpirationDateTime property value. When the token will expire. +func (m *DepOnboardingSetting) GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.tokenExpirationDateTime +} +// GetTokenName gets the tokenName property value. Friendly Name for Dep Token +func (m *DepOnboardingSetting) GetTokenName()(*string) { + return m.tokenName +} +// GetTokenType gets the tokenType property value. The tokenType property +func (m *DepOnboardingSetting) GetTokenType()(*DepTokenType) { + return m.tokenType +} +// Serialize serializes information the current object +func (m *DepOnboardingSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appleIdentifier", m.GetAppleIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dataSharingConsentGranted", m.GetDataSharingConsentGranted()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultIosEnrollmentProfile", m.GetDefaultIosEnrollmentProfile()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultMacOsEnrollmentProfile", m.GetDefaultMacOsEnrollmentProfile()) + if err != nil { + return err + } + } + if m.GetEnrollmentProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEnrollmentProfiles())) + for i, v := range m.GetEnrollmentProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("enrollmentProfiles", cast) + if err != nil { + return err + } + } + if m.GetImportedAppleDeviceIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImportedAppleDeviceIdentities())) + for i, v := range m.GetImportedAppleDeviceIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("importedAppleDeviceIdentities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSuccessfulSyncDateTime", m.GetLastSuccessfulSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("lastSyncErrorCode", m.GetLastSyncErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncTriggeredDateTime", m.GetLastSyncTriggeredDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("shareTokenWithSchoolDataSyncService", m.GetShareTokenWithSchoolDataSyncService()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("syncedDeviceCount", m.GetSyncedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("tokenExpirationDateTime", m.GetTokenExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tokenName", m.GetTokenName()) + if err != nil { + return err + } + } + if m.GetTokenType() != nil { + cast := (*m.GetTokenType()).String() + err = writer.WriteStringValue("tokenType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAppleIdentifier sets the appleIdentifier property value. The Apple ID used to obtain the current token. +func (m *DepOnboardingSetting) SetAppleIdentifier(value *string)() { + m.appleIdentifier = value +} +// SetDataSharingConsentGranted sets the dataSharingConsentGranted property value. Consent granted for data sharing with Apple Dep Service +func (m *DepOnboardingSetting) SetDataSharingConsentGranted(value *bool)() { + m.dataSharingConsentGranted = value +} +// SetDefaultIosEnrollmentProfile sets the defaultIosEnrollmentProfile property value. Default iOS Enrollment Profile +func (m *DepOnboardingSetting) SetDefaultIosEnrollmentProfile(value DepIOSEnrollmentProfileable)() { + m.defaultIosEnrollmentProfile = value +} +// SetDefaultMacOsEnrollmentProfile sets the defaultMacOsEnrollmentProfile property value. Default MacOs Enrollment Profile +func (m *DepOnboardingSetting) SetDefaultMacOsEnrollmentProfile(value DepMacOSEnrollmentProfileable)() { + m.defaultMacOsEnrollmentProfile = value +} +// SetEnrollmentProfiles sets the enrollmentProfiles property value. The enrollment profiles. +func (m *DepOnboardingSetting) SetEnrollmentProfiles(value []EnrollmentProfileable)() { + m.enrollmentProfiles = value +} +// SetImportedAppleDeviceIdentities sets the importedAppleDeviceIdentities property value. The imported Apple device identities. +func (m *DepOnboardingSetting) SetImportedAppleDeviceIdentities(value []ImportedAppleDeviceIdentityable)() { + m.importedAppleDeviceIdentities = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. When the service was onboarded. +func (m *DepOnboardingSetting) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLastSuccessfulSyncDateTime sets the lastSuccessfulSyncDateTime property value. When the service last syned with Intune +func (m *DepOnboardingSetting) SetLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSuccessfulSyncDateTime = value +} +// SetLastSyncErrorCode sets the lastSyncErrorCode property value. Error code reported by Apple during last dep sync. +func (m *DepOnboardingSetting) SetLastSyncErrorCode(value *int32)() { + m.lastSyncErrorCode = value +} +// SetLastSyncTriggeredDateTime sets the lastSyncTriggeredDateTime property value. When Intune last requested a sync. +func (m *DepOnboardingSetting) SetLastSyncTriggeredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncTriggeredDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DepOnboardingSetting) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetShareTokenWithSchoolDataSyncService sets the shareTokenWithSchoolDataSyncService property value. Whether or not the Dep token sharing is enabled with the School Data Sync service. +func (m *DepOnboardingSetting) SetShareTokenWithSchoolDataSyncService(value *bool)() { + m.shareTokenWithSchoolDataSyncService = value +} +// SetSyncedDeviceCount sets the syncedDeviceCount property value. Gets synced device count +func (m *DepOnboardingSetting) SetSyncedDeviceCount(value *int32)() { + m.syncedDeviceCount = value +} +// SetTokenExpirationDateTime sets the tokenExpirationDateTime property value. When the token will expire. +func (m *DepOnboardingSetting) SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.tokenExpirationDateTime = value +} +// SetTokenName sets the tokenName property value. Friendly Name for Dep Token +func (m *DepOnboardingSetting) SetTokenName(value *string)() { + m.tokenName = value +} +// SetTokenType sets the tokenType property value. The tokenType property +func (m *DepOnboardingSetting) SetTokenType(value *DepTokenType)() { + m.tokenType = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_response.go new file mode 100644 index 000000000..11145cb63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepOnboardingSettingCollectionResponse +type DepOnboardingSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DepOnboardingSettingable +} +// NewDepOnboardingSettingCollectionResponse instantiates a new DepOnboardingSettingCollectionResponse and sets the default values. +func NewDepOnboardingSettingCollectionResponse()(*DepOnboardingSettingCollectionResponse) { + m := &DepOnboardingSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDepOnboardingSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDepOnboardingSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDepOnboardingSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DepOnboardingSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepOnboardingSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepOnboardingSettingable, len(val)) + for i, v := range val { + res[i] = v.(DepOnboardingSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DepOnboardingSettingCollectionResponse) GetValue()([]DepOnboardingSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *DepOnboardingSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DepOnboardingSettingCollectionResponse) SetValue(value []DepOnboardingSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_responseable.go new file mode 100644 index 000000000..1d44d8049 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_onboarding_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepOnboardingSettingCollectionResponseable +type DepOnboardingSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DepOnboardingSettingable) + SetValue(value []DepOnboardingSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_onboarding_settingable.go b/src/internal/connector/graph/betasdk/models/dep_onboarding_settingable.go new file mode 100644 index 000000000..f362b1fba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_onboarding_settingable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DepOnboardingSettingable +type DepOnboardingSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleIdentifier()(*string) + GetDataSharingConsentGranted()(*bool) + GetDefaultIosEnrollmentProfile()(DepIOSEnrollmentProfileable) + GetDefaultMacOsEnrollmentProfile()(DepMacOSEnrollmentProfileable) + GetEnrollmentProfiles()([]EnrollmentProfileable) + GetImportedAppleDeviceIdentities()([]ImportedAppleDeviceIdentityable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSyncErrorCode()(*int32) + GetLastSyncTriggeredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetShareTokenWithSchoolDataSyncService()(*bool) + GetSyncedDeviceCount()(*int32) + GetTokenExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTokenName()(*string) + GetTokenType()(*DepTokenType) + SetAppleIdentifier(value *string)() + SetDataSharingConsentGranted(value *bool)() + SetDefaultIosEnrollmentProfile(value DepIOSEnrollmentProfileable)() + SetDefaultMacOsEnrollmentProfile(value DepMacOSEnrollmentProfileable)() + SetEnrollmentProfiles(value []EnrollmentProfileable)() + SetImportedAppleDeviceIdentities(value []ImportedAppleDeviceIdentityable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSyncErrorCode(value *int32)() + SetLastSyncTriggeredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetShareTokenWithSchoolDataSyncService(value *bool)() + SetSyncedDeviceCount(value *int32)() + SetTokenExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTokenName(value *string)() + SetTokenType(value *DepTokenType)() +} diff --git a/src/internal/connector/graph/betasdk/models/dep_token_type.go b/src/internal/connector/graph/betasdk/models/dep_token_type.go new file mode 100644 index 000000000..9705d3aa2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dep_token_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DepTokenType int + +const ( + // Token Type is None + NONE_DEPTOKENTYPE DepTokenType = iota + // Token Type is Dep. + DEP_DEPTOKENTYPE + // Token Type is Apple School Manager + APPLESCHOOLMANAGER_DEPTOKENTYPE +) + +func (i DepTokenType) String() string { + return []string{"none", "dep", "appleSchoolManager"}[i] +} +func ParseDepTokenType(v string) (interface{}, error) { + result := NONE_DEPTOKENTYPE + switch v { + case "none": + result = NONE_DEPTOKENTYPE + case "dep": + result = DEP_DEPTOKENTYPE + case "appleSchoolManager": + result = APPLESCHOOLMANAGER_DEPTOKENTYPE + default: + return 0, errors.New("Unknown DepTokenType value: " + v) + } + return &result, nil +} +func SerializeDepTokenType(values []DepTokenType) []string { + 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/derived_credential_provider_type.go b/src/internal/connector/graph/betasdk/models/derived_credential_provider_type.go new file mode 100644 index 000000000..521e44f60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/derived_credential_provider_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DerivedCredentialProviderType int + +const ( + // No Derived Credential Provider Configured. + NOTCONFIGURED_DERIVEDCREDENTIALPROVIDERTYPE DerivedCredentialProviderType = iota + // Entrust. + ENTRUSTDATACARD_DERIVEDCREDENTIALPROVIDERTYPE + // Purebred - Defense Information Systems Agency. + PUREBRED_DERIVEDCREDENTIALPROVIDERTYPE + // Xtec - AuthentX. + XTEC_DERIVEDCREDENTIALPROVIDERTYPE + // Intercede. + INTERCEDE_DERIVEDCREDENTIALPROVIDERTYPE +) + +func (i DerivedCredentialProviderType) String() string { + return []string{"notConfigured", "entrustDataCard", "purebred", "xTec", "intercede"}[i] +} +func ParseDerivedCredentialProviderType(v string) (interface{}, error) { + result := NOTCONFIGURED_DERIVEDCREDENTIALPROVIDERTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DERIVEDCREDENTIALPROVIDERTYPE + case "entrustDataCard": + result = ENTRUSTDATACARD_DERIVEDCREDENTIALPROVIDERTYPE + case "purebred": + result = PUREBRED_DERIVEDCREDENTIALPROVIDERTYPE + case "xTec": + result = XTEC_DERIVEDCREDENTIALPROVIDERTYPE + case "intercede": + result = INTERCEDE_DERIVEDCREDENTIALPROVIDERTYPE + default: + return 0, errors.New("Unknown DerivedCredentialProviderType value: " + v) + } + return &result, nil +} +func SerializeDerivedCredentialProviderType(values []DerivedCredentialProviderType) []string { + 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/details_info.go b/src/internal/connector/graph/betasdk/models/details_info.go new file mode 100644 index 000000000..e613c6b79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/details_info.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetailsInfo +type DetailsInfo 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 OdataType property + odataType *string +} +// NewDetailsInfo instantiates a new detailsInfo and sets the default values. +func NewDetailsInfo()(*DetailsInfo) { + m := &DetailsInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDetailsInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetailsInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDetailsInfo(), 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 *DetailsInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetailsInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DetailsInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DetailsInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DetailsInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DetailsInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/details_infoable.go b/src/internal/connector/graph/betasdk/models/details_infoable.go new file mode 100644 index 000000000..c10806b2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/details_infoable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetailsInfoable +type DetailsInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_app.go b/src/internal/connector/graph/betasdk/models/detected_app.go new file mode 100644 index 000000000..18a63fb05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_app.go @@ -0,0 +1,225 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedApp a managed or unmanaged app that is installed on a managed device. Unmanaged apps will only appear for devices marked as corporate owned. +type DetectedApp struct { + Entity + // The number of devices that have installed this application + deviceCount *int32 + // Name of the discovered application. Read-only + displayName *string + // The devices that have the discovered application installed + managedDevices []ManagedDeviceable + // Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0). + platform *DetectedAppPlatformType + // Indicates the publisher of the discovered application. For example: 'Microsoft'. The default value is an empty string. + publisher *string + // Discovered application size in bytes. Read-only + sizeInByte *int64 + // Version of the discovered application. Read-only + version *string +} +// NewDetectedApp instantiates a new detectedApp and sets the default values. +func NewDetectedApp()(*DetectedApp) { + m := &DetectedApp{ + Entity: *NewEntity(), + } + return m +} +// CreateDetectedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDetectedApp(), nil +} +// GetDeviceCount gets the deviceCount property value. The number of devices that have installed this application +func (m *DetectedApp) GetDeviceCount()(*int32) { + return m.deviceCount +} +// GetDisplayName gets the displayName property value. Name of the discovered application. Read-only +func (m *DetectedApp) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCount(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["managedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceable) + } + m.SetManagedDevices(res) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDetectedAppPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*DetectedAppPlatformType)) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["sizeInByte"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeInByte(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetManagedDevices gets the managedDevices property value. The devices that have the discovered application installed +func (m *DetectedApp) GetManagedDevices()([]ManagedDeviceable) { + return m.managedDevices +} +// GetPlatform gets the platform property value. Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0). +func (m *DetectedApp) GetPlatform()(*DetectedAppPlatformType) { + return m.platform +} +// GetPublisher gets the publisher property value. Indicates the publisher of the discovered application. For example: 'Microsoft'. The default value is an empty string. +func (m *DetectedApp) GetPublisher()(*string) { + return m.publisher +} +// GetSizeInByte gets the sizeInByte property value. Discovered application size in bytes. Read-only +func (m *DetectedApp) GetSizeInByte()(*int64) { + return m.sizeInByte +} +// GetVersion gets the version property value. Version of the discovered application. Read-only +func (m *DetectedApp) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DetectedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("deviceCount", m.GetDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetManagedDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDevices())) + for i, v := range m.GetManagedDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDevices", cast) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sizeInByte", m.GetSizeInByte()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceCount sets the deviceCount property value. The number of devices that have installed this application +func (m *DetectedApp) SetDeviceCount(value *int32)() { + m.deviceCount = value +} +// SetDisplayName sets the displayName property value. Name of the discovered application. Read-only +func (m *DetectedApp) SetDisplayName(value *string)() { + m.displayName = value +} +// SetManagedDevices sets the managedDevices property value. The devices that have the discovered application installed +func (m *DetectedApp) SetManagedDevices(value []ManagedDeviceable)() { + m.managedDevices = value +} +// SetPlatform sets the platform property value. Indicates the operating system / platform of the discovered application. Some possible values are Windows, iOS, macOS. The default value is unknown (0). +func (m *DetectedApp) SetPlatform(value *DetectedAppPlatformType)() { + m.platform = value +} +// SetPublisher sets the publisher property value. Indicates the publisher of the discovered application. For example: 'Microsoft'. The default value is an empty string. +func (m *DetectedApp) SetPublisher(value *string)() { + m.publisher = value +} +// SetSizeInByte sets the sizeInByte property value. Discovered application size in bytes. Read-only +func (m *DetectedApp) SetSizeInByte(value *int64)() { + m.sizeInByte = value +} +// SetVersion sets the version property value. Version of the discovered application. Read-only +func (m *DetectedApp) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_app_collection_response.go b/src/internal/connector/graph/betasdk/models/detected_app_collection_response.go new file mode 100644 index 000000000..14e61e71d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedAppCollectionResponse +type DetectedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DetectedAppable +} +// NewDetectedAppCollectionResponse instantiates a new DetectedAppCollectionResponse and sets the default values. +func NewDetectedAppCollectionResponse()(*DetectedAppCollectionResponse) { + m := &DetectedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDetectedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDetectedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDetectedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DetectedAppable, len(val)) + for i, v := range val { + res[i] = v.(DetectedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DetectedAppCollectionResponse) GetValue()([]DetectedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *DetectedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DetectedAppCollectionResponse) SetValue(value []DetectedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/detected_app_collection_responseable.go new file mode 100644 index 000000000..423a43b0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedAppCollectionResponseable +type DetectedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DetectedAppable) + SetValue(value []DetectedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_app_platform_type.go b/src/internal/connector/graph/betasdk/models/detected_app_platform_type.go new file mode 100644 index 000000000..f121fcf0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_app_platform_type.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DetectedAppPlatformType int + +const ( + // Default. Set to unknown when platform cannot be determined. + UNKNOWN_DETECTEDAPPPLATFORMTYPE DetectedAppPlatformType = iota + // Indicates that the platform of the detected application is Windows. + WINDOWS_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Windows Mobile. + WINDOWSMOBILE_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Windows Holographic. + WINDOWSHOLOGRAPHIC_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is iOS. + IOS_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is macOS. + MACOS_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is ChromeOS. + CHROMEOS_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Android open source project. + ANDROIDOSP_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Android device administrator. + ANDROIDDEVICEADMINISTRATOR_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Android work profile. + ANDROIDWORKPROFILE_DETECTEDAPPPLATFORMTYPE + // Indicates that the platform of the detected application is Android dedicated and fully managed. + ANDROIDDEDICATEDANDFULLYMANAGED_DETECTEDAPPPLATFORMTYPE + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_DETECTEDAPPPLATFORMTYPE +) + +func (i DetectedAppPlatformType) String() string { + return []string{"unknown", "windows", "windowsMobile", "windowsHolographic", "ios", "macOS", "chromeOS", "androidOSP", "androidDeviceAdministrator", "androidWorkProfile", "androidDedicatedAndFullyManaged", "unknownFutureValue"}[i] +} +func ParseDetectedAppPlatformType(v string) (interface{}, error) { + result := UNKNOWN_DETECTEDAPPPLATFORMTYPE + switch v { + case "unknown": + result = UNKNOWN_DETECTEDAPPPLATFORMTYPE + case "windows": + result = WINDOWS_DETECTEDAPPPLATFORMTYPE + case "windowsMobile": + result = WINDOWSMOBILE_DETECTEDAPPPLATFORMTYPE + case "windowsHolographic": + result = WINDOWSHOLOGRAPHIC_DETECTEDAPPPLATFORMTYPE + case "ios": + result = IOS_DETECTEDAPPPLATFORMTYPE + case "macOS": + result = MACOS_DETECTEDAPPPLATFORMTYPE + case "chromeOS": + result = CHROMEOS_DETECTEDAPPPLATFORMTYPE + case "androidOSP": + result = ANDROIDOSP_DETECTEDAPPPLATFORMTYPE + case "androidDeviceAdministrator": + result = ANDROIDDEVICEADMINISTRATOR_DETECTEDAPPPLATFORMTYPE + case "androidWorkProfile": + result = ANDROIDWORKPROFILE_DETECTEDAPPPLATFORMTYPE + case "androidDedicatedAndFullyManaged": + result = ANDROIDDEDICATEDANDFULLYMANAGED_DETECTEDAPPPLATFORMTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DETECTEDAPPPLATFORMTYPE + default: + return 0, errors.New("Unknown DetectedAppPlatformType value: " + v) + } + return &result, nil +} +func SerializeDetectedAppPlatformType(values []DetectedAppPlatformType) []string { + 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/detected_appable.go b/src/internal/connector/graph/betasdk/models/detected_appable.go new file mode 100644 index 000000000..ee998d2f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_appable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedAppable +type DetectedAppable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceCount()(*int32) + GetDisplayName()(*string) + GetManagedDevices()([]ManagedDeviceable) + GetPlatform()(*DetectedAppPlatformType) + GetPublisher()(*string) + GetSizeInByte()(*int64) + GetVersion()(*string) + SetDeviceCount(value *int32)() + SetDisplayName(value *string)() + SetManagedDevices(value []ManagedDeviceable)() + SetPlatform(value *DetectedAppPlatformType)() + SetPublisher(value *string)() + SetSizeInByte(value *int64)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content.go new file mode 100644 index 000000000..f6865807f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContent +type DetectedSensitiveContent struct { + DetectedSensitiveContentBase + // The classificationAttributes property + classificationAttributes []ClassificationAttributeable + // The classificationMethod property + classificationMethod *ClassificationMethod + // The matches property + matches []SensitiveContentLocationable + // The scope property + scope *SensitiveTypeScope + // The sensitiveTypeSource property + sensitiveTypeSource *SensitiveTypeSource +} +// NewDetectedSensitiveContent instantiates a new DetectedSensitiveContent and sets the default values. +func NewDetectedSensitiveContent()(*DetectedSensitiveContent) { + m := &DetectedSensitiveContent{ + DetectedSensitiveContentBase: *NewDetectedSensitiveContentBase(), + } + return m +} +// CreateDetectedSensitiveContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedSensitiveContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.machineLearningDetectedSensitiveContent": + return NewMachineLearningDetectedSensitiveContent(), nil + } + } + } + } + return NewDetectedSensitiveContent(), nil +} +// GetClassificationAttributes gets the classificationAttributes property value. The classificationAttributes property +func (m *DetectedSensitiveContent) GetClassificationAttributes()([]ClassificationAttributeable) { + return m.classificationAttributes +} +// GetClassificationMethod gets the classificationMethod property value. The classificationMethod property +func (m *DetectedSensitiveContent) GetClassificationMethod()(*ClassificationMethod) { + return m.classificationMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedSensitiveContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DetectedSensitiveContentBase.GetFieldDeserializers() + res["classificationAttributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassificationAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassificationAttributeable, len(val)) + for i, v := range val { + res[i] = v.(ClassificationAttributeable) + } + m.SetClassificationAttributes(res) + } + return nil + } + res["classificationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseClassificationMethod) + if err != nil { + return err + } + if val != nil { + m.SetClassificationMethod(val.(*ClassificationMethod)) + } + return nil + } + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveContentLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveContentLocationable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveContentLocationable) + } + m.SetMatches(res) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitiveTypeScope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*SensitiveTypeScope)) + } + return nil + } + res["sensitiveTypeSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitiveTypeSource) + if err != nil { + return err + } + if val != nil { + m.SetSensitiveTypeSource(val.(*SensitiveTypeSource)) + } + return nil + } + return res +} +// GetMatches gets the matches property value. The matches property +func (m *DetectedSensitiveContent) GetMatches()([]SensitiveContentLocationable) { + return m.matches +} +// GetScope gets the scope property value. The scope property +func (m *DetectedSensitiveContent) GetScope()(*SensitiveTypeScope) { + return m.scope +} +// GetSensitiveTypeSource gets the sensitiveTypeSource property value. The sensitiveTypeSource property +func (m *DetectedSensitiveContent) GetSensitiveTypeSource()(*SensitiveTypeSource) { + return m.sensitiveTypeSource +} +// Serialize serializes information the current object +func (m *DetectedSensitiveContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DetectedSensitiveContentBase.Serialize(writer) + if err != nil { + return err + } + if m.GetClassificationAttributes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassificationAttributes())) + for i, v := range m.GetClassificationAttributes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("classificationAttributes", cast) + if err != nil { + return err + } + } + if m.GetClassificationMethod() != nil { + cast := (*m.GetClassificationMethod()).String() + err = writer.WriteStringValue("classificationMethod", &cast) + if err != nil { + return err + } + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + if m.GetScope() != nil { + cast := (*m.GetScope()).String() + err = writer.WriteStringValue("scope", &cast) + if err != nil { + return err + } + } + if m.GetSensitiveTypeSource() != nil { + cast := (*m.GetSensitiveTypeSource()).String() + err = writer.WriteStringValue("sensitiveTypeSource", &cast) + if err != nil { + return err + } + } + return nil +} +// SetClassificationAttributes sets the classificationAttributes property value. The classificationAttributes property +func (m *DetectedSensitiveContent) SetClassificationAttributes(value []ClassificationAttributeable)() { + m.classificationAttributes = value +} +// SetClassificationMethod sets the classificationMethod property value. The classificationMethod property +func (m *DetectedSensitiveContent) SetClassificationMethod(value *ClassificationMethod)() { + m.classificationMethod = value +} +// SetMatches sets the matches property value. The matches property +func (m *DetectedSensitiveContent) SetMatches(value []SensitiveContentLocationable)() { + m.matches = value +} +// SetScope sets the scope property value. The scope property +func (m *DetectedSensitiveContent) SetScope(value *SensitiveTypeScope)() { + m.scope = value +} +// SetSensitiveTypeSource sets the sensitiveTypeSource property value. The sensitiveTypeSource property +func (m *DetectedSensitiveContent) SetSensitiveTypeSource(value *SensitiveTypeSource)() { + m.sensitiveTypeSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_base.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_base.go new file mode 100644 index 000000000..8f899a632 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_base.go @@ -0,0 +1,224 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentBase +type DetectedSensitiveContentBase 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 confidence property + confidence *int32 + // The displayName property + displayName *string + // The id property + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // The recommendedConfidence property + recommendedConfidence *int32 + // The uniqueCount property + uniqueCount *int32 +} +// NewDetectedSensitiveContentBase instantiates a new detectedSensitiveContentBase and sets the default values. +func NewDetectedSensitiveContentBase()(*DetectedSensitiveContentBase) { + m := &DetectedSensitiveContentBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDetectedSensitiveContentBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedSensitiveContentBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.detectedSensitiveContent": + return NewDetectedSensitiveContent(), nil + case "#microsoft.graph.exactMatchDetectedSensitiveContent": + return NewExactMatchDetectedSensitiveContent(), nil + case "#microsoft.graph.machineLearningDetectedSensitiveContent": + return NewMachineLearningDetectedSensitiveContent(), nil + } + } + } + } + return NewDetectedSensitiveContentBase(), 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 *DetectedSensitiveContentBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidence gets the confidence property value. The confidence property +func (m *DetectedSensitiveContentBase) GetConfidence()(*int32) { + return m.confidence +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *DetectedSensitiveContentBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedSensitiveContentBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["recommendedConfidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedConfidence(val) + } + return nil + } + res["uniqueCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUniqueCount(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *DetectedSensitiveContentBase) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DetectedSensitiveContentBase) GetOdataType()(*string) { + return m.odataType +} +// GetRecommendedConfidence gets the recommendedConfidence property value. The recommendedConfidence property +func (m *DetectedSensitiveContentBase) GetRecommendedConfidence()(*int32) { + return m.recommendedConfidence +} +// GetUniqueCount gets the uniqueCount property value. The uniqueCount property +func (m *DetectedSensitiveContentBase) GetUniqueCount()(*int32) { + return m.uniqueCount +} +// Serialize serializes information the current object +func (m *DetectedSensitiveContentBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("recommendedConfidence", m.GetRecommendedConfidence()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("uniqueCount", m.GetUniqueCount()) + 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 *DetectedSensitiveContentBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidence sets the confidence property value. The confidence property +func (m *DetectedSensitiveContentBase) SetConfidence(value *int32)() { + m.confidence = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *DetectedSensitiveContentBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. The id property +func (m *DetectedSensitiveContentBase) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DetectedSensitiveContentBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommendedConfidence sets the recommendedConfidence property value. The recommendedConfidence property +func (m *DetectedSensitiveContentBase) SetRecommendedConfidence(value *int32)() { + m.recommendedConfidence = value +} +// SetUniqueCount sets the uniqueCount property value. The uniqueCount property +func (m *DetectedSensitiveContentBase) SetUniqueCount(value *int32)() { + m.uniqueCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_baseable.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_baseable.go new file mode 100644 index 000000000..18301a61b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_baseable.go @@ -0,0 +1,24 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentBaseable +type DetectedSensitiveContentBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidence()(*int32) + GetDisplayName()(*string) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetRecommendedConfidence()(*int32) + GetUniqueCount()(*int32) + SetConfidence(value *int32)() + SetDisplayName(value *string)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetRecommendedConfidence(value *int32)() + SetUniqueCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_response.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_response.go new file mode 100644 index 000000000..318adcba7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentCollectionResponse +type DetectedSensitiveContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DetectedSensitiveContentable +} +// NewDetectedSensitiveContentCollectionResponse instantiates a new DetectedSensitiveContentCollectionResponse and sets the default values. +func NewDetectedSensitiveContentCollectionResponse()(*DetectedSensitiveContentCollectionResponse) { + m := &DetectedSensitiveContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDetectedSensitiveContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedSensitiveContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDetectedSensitiveContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedSensitiveContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDetectedSensitiveContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DetectedSensitiveContentable, len(val)) + for i, v := range val { + res[i] = v.(DetectedSensitiveContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DetectedSensitiveContentCollectionResponse) GetValue()([]DetectedSensitiveContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DetectedSensitiveContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DetectedSensitiveContentCollectionResponse) SetValue(value []DetectedSensitiveContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_responseable.go new file mode 100644 index 000000000..bc17b225d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentCollectionResponseable +type DetectedSensitiveContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DetectedSensitiveContentable) + SetValue(value []DetectedSensitiveContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapper.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapper.go new file mode 100644 index 000000000..bc0a51f17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapper.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentWrapper +type DetectedSensitiveContentWrapper 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 classification property + classification []DetectedSensitiveContentable + // The OdataType property + odataType *string +} +// NewDetectedSensitiveContentWrapper instantiates a new detectedSensitiveContentWrapper and sets the default values. +func NewDetectedSensitiveContentWrapper()(*DetectedSensitiveContentWrapper) { + m := &DetectedSensitiveContentWrapper{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDetectedSensitiveContentWrapperFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDetectedSensitiveContentWrapperFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDetectedSensitiveContentWrapper(), 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 *DetectedSensitiveContentWrapper) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClassification gets the classification property value. The classification property +func (m *DetectedSensitiveContentWrapper) GetClassification()([]DetectedSensitiveContentable) { + return m.classification +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DetectedSensitiveContentWrapper) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDetectedSensitiveContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DetectedSensitiveContentable, len(val)) + for i, v := range val { + res[i] = v.(DetectedSensitiveContentable) + } + m.SetClassification(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DetectedSensitiveContentWrapper) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DetectedSensitiveContentWrapper) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetClassification() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassification())) + for i, v := range m.GetClassification() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("classification", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DetectedSensitiveContentWrapper) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClassification sets the classification property value. The classification property +func (m *DetectedSensitiveContentWrapper) SetClassification(value []DetectedSensitiveContentable)() { + m.classification = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DetectedSensitiveContentWrapper) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapperable.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapperable.go new file mode 100644 index 000000000..7d67eaee0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_content_wrapperable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentWrapperable +type DetectedSensitiveContentWrapperable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassification()([]DetectedSensitiveContentable) + GetOdataType()(*string) + SetClassification(value []DetectedSensitiveContentable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/detected_sensitive_contentable.go b/src/internal/connector/graph/betasdk/models/detected_sensitive_contentable.go new file mode 100644 index 000000000..38773209f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/detected_sensitive_contentable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DetectedSensitiveContentable +type DetectedSensitiveContentable interface { + DetectedSensitiveContentBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassificationAttributes()([]ClassificationAttributeable) + GetClassificationMethod()(*ClassificationMethod) + GetMatches()([]SensitiveContentLocationable) + GetScope()(*SensitiveTypeScope) + GetSensitiveTypeSource()(*SensitiveTypeSource) + SetClassificationAttributes(value []ClassificationAttributeable)() + SetClassificationMethod(value *ClassificationMethod)() + SetMatches(value []SensitiveContentLocationable)() + SetScope(value *SensitiveTypeScope)() + SetSensitiveTypeSource(value *SensitiveTypeSource)() +} diff --git a/src/internal/connector/graph/betasdk/models/device.go b/src/internal/connector/graph/betasdk/models/device.go new file mode 100644 index 000000000..b0b0314a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device.go @@ -0,0 +1,1231 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Device provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Device struct { + DirectoryObject + // true if the account is enabled; otherwise, false. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property. + accountEnabled *bool + // For internal use only. Not nullable. Supports $filter (eq, not, ge, le). + alternativeSecurityIds []AlternativeSecurityIdable + // The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy. + approximateLastSignInDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Set of commands sent to this device. + commands []Commandable + // The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + complianceExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // User-defined property set by Intune to automatically add devices to groups and simplify managing devices. + deviceCategory *string + // Unique Identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Also Supports $filter (eq, ne, not, startsWith). + deviceId *string + // For internal use only. Set to null. + deviceMetadata *string + // Ownership of the device. This property is set by Intune. Possible values are: unknown, company, personal. + deviceOwnership *string + // For internal use only. + deviceVersion *int32 + // The display name for the device. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. + displayName *string + // The on-premises domain name of Hybrid Azure AD joined devices. This property is set by Intune. + domainName *string + // Enrollment profile applied to the device. For example, Apple Device Enrollment Profile, Device enrollment - Corporate device identifiers, or Windows Autopilot profile name. This property is set by Intune. + enrollmentProfileName *string + // Enrollment type of the device. This property is set by Intune. Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement. + enrollmentType *string + // Contains extension attributes 1-15 for the device. The individual extension attributes are not selectable. These properties are mastered in cloud and can be set during creation or update of a device object in Azure AD. Supports $filter (eq, not, startsWith, and eq on null values). + extensionAttributes OnPremisesExtensionAttributesable + // The collection of open extensions defined for the device. Read-only. Nullable. + extensions []Extensionable + // List of hostNames for the device. + hostnames []string + // true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). + isCompliant *bool + // true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). + isManaged *bool + // The isManagementRestricted property + isManagementRestricted *bool + // true if device is rooted; false if device is jail-broken. This can only be updated by Intune. + isRooted *bool + // Form factor of device. Only returned if user signs in with a Microsoft account as part of Project Rome. + kind *string + // Management channel of the device. This property is set by Intune. Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController. + managementType *string + // Manufacturer of the device. Read-only. + manufacturer *string + // Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith). + mdmAppId *string + // Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. + memberOf []DirectoryObjectable + // Model of the device. Read-only. + model *string + // Friendly name of a device. Only returned if user signs in with a Microsoft account as part of Project Rome. + name *string + // The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in). + onPremisesLastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values). + onPremisesSyncEnabled *bool + // The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). + operatingSystem *string + // Operating system version of the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). + operatingSystemVersion *string + // For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0. + physicalIds []string + // Platform of device. Only returned if user signs in with a Microsoft account as part of Project Rome. Only returned if user signs in with a Microsoft account as part of Project Rome. + platform *string + // The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. + profileType *string + // The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. Read-only. Nullable. Supports $expand. + registeredOwners []DirectoryObjectable + // Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. + registeredUsers []DirectoryObjectable + // Date and time of when the device was registered. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + registrationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device is online or offline. Only returned if user signs in with a Microsoft account as part of Project Rome. + status *string + // List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0). + systemLabels []string + // Groups and administrative units that this device is a member of. This operation is transitive. Supports $expand. + transitiveMemberOf []DirectoryObjectable + // Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory + trustType *string + // Represents the usage rights a device has been granted. + usageRights []UsageRightable +} +// NewDevice instantiates a new device and sets the default values. +func NewDevice()(*Device) { + m := &Device{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.device"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDevice(), nil +} +// GetAccountEnabled gets the accountEnabled property value. true if the account is enabled; otherwise, false. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property. +func (m *Device) GetAccountEnabled()(*bool) { + return m.accountEnabled +} +// GetAlternativeSecurityIds gets the alternativeSecurityIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Device) GetAlternativeSecurityIds()([]AlternativeSecurityIdable) { + return m.alternativeSecurityIds +} +// GetApproximateLastSignInDateTime gets the approximateLastSignInDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy. +func (m *Device) GetApproximateLastSignInDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.approximateLastSignInDateTime +} +// GetCommands gets the commands property value. Set of commands sent to this device. +func (m *Device) GetCommands()([]Commandable) { + return m.commands +} +// GetComplianceExpirationDateTime gets the complianceExpirationDateTime property value. The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Device) GetComplianceExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceExpirationDateTime +} +// GetDeviceCategory gets the deviceCategory property value. User-defined property set by Intune to automatically add devices to groups and simplify managing devices. +func (m *Device) GetDeviceCategory()(*string) { + return m.deviceCategory +} +// GetDeviceId gets the deviceId property value. Unique Identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Also Supports $filter (eq, ne, not, startsWith). +func (m *Device) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceMetadata gets the deviceMetadata property value. For internal use only. Set to null. +func (m *Device) GetDeviceMetadata()(*string) { + return m.deviceMetadata +} +// GetDeviceOwnership gets the deviceOwnership property value. Ownership of the device. This property is set by Intune. Possible values are: unknown, company, personal. +func (m *Device) GetDeviceOwnership()(*string) { + return m.deviceOwnership +} +// GetDeviceVersion gets the deviceVersion property value. For internal use only. +func (m *Device) GetDeviceVersion()(*int32) { + return m.deviceVersion +} +// GetDisplayName gets the displayName property value. The display name for the device. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Device) GetDisplayName()(*string) { + return m.displayName +} +// GetDomainName gets the domainName property value. The on-premises domain name of Hybrid Azure AD joined devices. This property is set by Intune. +func (m *Device) GetDomainName()(*string) { + return m.domainName +} +// GetEnrollmentProfileName gets the enrollmentProfileName property value. Enrollment profile applied to the device. For example, Apple Device Enrollment Profile, Device enrollment - Corporate device identifiers, or Windows Autopilot profile name. This property is set by Intune. +func (m *Device) GetEnrollmentProfileName()(*string) { + return m.enrollmentProfileName +} +// GetEnrollmentType gets the enrollmentType property value. Enrollment type of the device. This property is set by Intune. Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement. +func (m *Device) GetEnrollmentType()(*string) { + return m.enrollmentType +} +// GetExtensionAttributes gets the extensionAttributes property value. Contains extension attributes 1-15 for the device. The individual extension attributes are not selectable. These properties are mastered in cloud and can be set during creation or update of a device object in Azure AD. Supports $filter (eq, not, startsWith, and eq on null values). +func (m *Device) GetExtensionAttributes()(OnPremisesExtensionAttributesable) { + return m.extensionAttributes +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the device. Read-only. Nullable. +func (m *Device) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Device) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountEnabled(val) + } + return nil + } + res["alternativeSecurityIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlternativeSecurityIdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlternativeSecurityIdable, len(val)) + for i, v := range val { + res[i] = v.(AlternativeSecurityIdable) + } + m.SetAlternativeSecurityIds(res) + } + return nil + } + res["approximateLastSignInDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetApproximateLastSignInDateTime(val) + } + return nil + } + res["commands"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCommandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Commandable, len(val)) + for i, v := range val { + res[i] = v.(Commandable) + } + m.SetCommands(res) + } + return nil + } + res["complianceExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceExpirationDateTime(val) + } + return nil + } + res["deviceCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCategory(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceMetadata(val) + } + return nil + } + res["deviceOwnership"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOwnership(val) + } + return nil + } + res["deviceVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceVersion(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(val) + } + return nil + } + res["enrollmentProfileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentProfileName(val) + } + return nil + } + res["enrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentType(val) + } + return nil + } + res["extensionAttributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesExtensionAttributesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttributes(val.(OnPremisesExtensionAttributesable)) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["hostnames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetHostnames(res) + } + return nil + } + res["isCompliant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCompliant(val) + } + return nil + } + res["isManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsManaged(val) + } + return nil + } + res["isManagementRestricted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsManagementRestricted(val) + } + return nil + } + res["isRooted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRooted(val) + } + return nil + } + res["kind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKind(val) + } + return nil + } + res["managementType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementType(val) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["mdmAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdmAppId(val) + } + return nil + } + res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMemberOf(res) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["onPremisesLastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesLastSyncDateTime(val) + } + return nil + } + res["onPremisesSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSyncEnabled(val) + } + return nil + } + res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["operatingSystemVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemVersion(val) + } + return nil + } + res["physicalIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPhysicalIds(res) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["profileType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileType(val) + } + return nil + } + res["registeredOwners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetRegisteredOwners(res) + } + return nil + } + res["registeredUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetRegisteredUsers(res) + } + return nil + } + res["registrationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistrationDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["systemLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSystemLabels(res) + } + return nil + } + res["transitiveMemberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveMemberOf(res) + } + return nil + } + res["trustType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustType(val) + } + return nil + } + res["usageRights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsageRightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UsageRightable, len(val)) + for i, v := range val { + res[i] = v.(UsageRightable) + } + m.SetUsageRights(res) + } + return nil + } + return res +} +// GetHostnames gets the hostnames property value. List of hostNames for the device. +func (m *Device) GetHostnames()([]string) { + return m.hostnames +} +// GetIsCompliant gets the isCompliant property value. true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). +func (m *Device) GetIsCompliant()(*bool) { + return m.isCompliant +} +// GetIsManaged gets the isManaged property value. true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). +func (m *Device) GetIsManaged()(*bool) { + return m.isManaged +} +// GetIsManagementRestricted gets the isManagementRestricted property value. The isManagementRestricted property +func (m *Device) GetIsManagementRestricted()(*bool) { + return m.isManagementRestricted +} +// GetIsRooted gets the isRooted property value. true if device is rooted; false if device is jail-broken. This can only be updated by Intune. +func (m *Device) GetIsRooted()(*bool) { + return m.isRooted +} +// GetKind gets the kind property value. Form factor of device. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) GetKind()(*string) { + return m.kind +} +// GetManagementType gets the managementType property value. Management channel of the device. This property is set by Intune. Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController. +func (m *Device) GetManagementType()(*string) { + return m.managementType +} +// GetManufacturer gets the manufacturer property value. Manufacturer of the device. Read-only. +func (m *Device) GetManufacturer()(*string) { + return m.manufacturer +} +// GetMdmAppId gets the mdmAppId property value. Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith). +func (m *Device) GetMdmAppId()(*string) { + return m.mdmAppId +} +// GetMemberOf gets the memberOf property value. Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. +func (m *Device) GetMemberOf()([]DirectoryObjectable) { + return m.memberOf +} +// GetModel gets the model property value. Model of the device. Read-only. +func (m *Device) GetModel()(*string) { + return m.model +} +// GetName gets the name property value. Friendly name of a device. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) GetName()(*string) { + return m.name +} +// GetOnPremisesLastSyncDateTime gets the onPremisesLastSyncDateTime property value. The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in). +func (m *Device) GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onPremisesLastSyncDateTime +} +// GetOnPremisesSyncEnabled gets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values). +func (m *Device) GetOnPremisesSyncEnabled()(*bool) { + return m.onPremisesSyncEnabled +} +// GetOperatingSystem gets the operatingSystem property value. The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). +func (m *Device) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetOperatingSystemVersion gets the operatingSystemVersion property value. Operating system version of the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). +func (m *Device) GetOperatingSystemVersion()(*string) { + return m.operatingSystemVersion +} +// GetPhysicalIds gets the physicalIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0. +func (m *Device) GetPhysicalIds()([]string) { + return m.physicalIds +} +// GetPlatform gets the platform property value. Platform of device. Only returned if user signs in with a Microsoft account as part of Project Rome. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) GetPlatform()(*string) { + return m.platform +} +// GetProfileType gets the profileType property value. The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. +func (m *Device) GetProfileType()(*string) { + return m.profileType +} +// GetRegisteredOwners gets the registeredOwners property value. The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. Read-only. Nullable. Supports $expand. +func (m *Device) GetRegisteredOwners()([]DirectoryObjectable) { + return m.registeredOwners +} +// GetRegisteredUsers gets the registeredUsers property value. Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. +func (m *Device) GetRegisteredUsers()([]DirectoryObjectable) { + return m.registeredUsers +} +// GetRegistrationDateTime gets the registrationDateTime property value. Date and time of when the device was registered. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Device) GetRegistrationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.registrationDateTime +} +// GetStatus gets the status property value. Device is online or offline. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) GetStatus()(*string) { + return m.status +} +// GetSystemLabels gets the systemLabels property value. List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0). +func (m *Device) GetSystemLabels()([]string) { + return m.systemLabels +} +// GetTransitiveMemberOf gets the transitiveMemberOf property value. Groups and administrative units that this device is a member of. This operation is transitive. Supports $expand. +func (m *Device) GetTransitiveMemberOf()([]DirectoryObjectable) { + return m.transitiveMemberOf +} +// GetTrustType gets the trustType property value. Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory +func (m *Device) GetTrustType()(*string) { + return m.trustType +} +// GetUsageRights gets the usageRights property value. Represents the usage rights a device has been granted. +func (m *Device) GetUsageRights()([]UsageRightable) { + return m.usageRights +} +// Serialize serializes information the current object +func (m *Device) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled()) + if err != nil { + return err + } + } + if m.GetAlternativeSecurityIds() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlternativeSecurityIds())) + for i, v := range m.GetAlternativeSecurityIds() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alternativeSecurityIds", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("approximateLastSignInDateTime", m.GetApproximateLastSignInDateTime()) + if err != nil { + return err + } + } + if m.GetCommands() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCommands())) + for i, v := range m.GetCommands() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("commands", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("complianceExpirationDateTime", m.GetComplianceExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceCategory", m.GetDeviceCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceMetadata", m.GetDeviceMetadata()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceOwnership", m.GetDeviceOwnership()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deviceVersion", m.GetDeviceVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("enrollmentProfileName", m.GetEnrollmentProfileName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("enrollmentType", m.GetEnrollmentType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("extensionAttributes", m.GetExtensionAttributes()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + if m.GetHostnames() != nil { + err = writer.WriteCollectionOfStringValues("hostnames", m.GetHostnames()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCompliant", m.GetIsCompliant()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isManaged", m.GetIsManaged()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isManagementRestricted", m.GetIsManagementRestricted()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRooted", m.GetIsRooted()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kind", m.GetKind()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementType", m.GetManagementType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdmAppId", m.GetMdmAppId()) + if err != nil { + return err + } + } + if m.GetMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf())) + for i, v := range m.GetMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("memberOf", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("onPremisesLastSyncDateTime", m.GetOnPremisesLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onPremisesSyncEnabled", m.GetOnPremisesSyncEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operatingSystemVersion", m.GetOperatingSystemVersion()) + if err != nil { + return err + } + } + if m.GetPhysicalIds() != nil { + err = writer.WriteCollectionOfStringValues("physicalIds", m.GetPhysicalIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("platform", m.GetPlatform()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("profileType", m.GetProfileType()) + if err != nil { + return err + } + } + if m.GetRegisteredOwners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegisteredOwners())) + for i, v := range m.GetRegisteredOwners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("registeredOwners", cast) + if err != nil { + return err + } + } + if m.GetRegisteredUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegisteredUsers())) + for i, v := range m.GetRegisteredUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("registeredUsers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("registrationDateTime", m.GetRegistrationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + if m.GetSystemLabels() != nil { + err = writer.WriteCollectionOfStringValues("systemLabels", m.GetSystemLabels()) + if err != nil { + return err + } + } + if m.GetTransitiveMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMemberOf())) + for i, v := range m.GetTransitiveMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveMemberOf", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("trustType", m.GetTrustType()) + if err != nil { + return err + } + } + if m.GetUsageRights() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsageRights())) + for i, v := range m.GetUsageRights() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("usageRights", cast) + if err != nil { + return err + } + } + return nil +} +// SetAccountEnabled sets the accountEnabled property value. true if the account is enabled; otherwise, false. Default is true. Supports $filter (eq, ne, not, in). Only callers in Global Administrator and Cloud Device Administrator roles can set this property. +func (m *Device) SetAccountEnabled(value *bool)() { + m.accountEnabled = value +} +// SetAlternativeSecurityIds sets the alternativeSecurityIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le). +func (m *Device) SetAlternativeSecurityIds(value []AlternativeSecurityIdable)() { + m.alternativeSecurityIds = value +} +// SetApproximateLastSignInDateTime sets the approximateLastSignInDateTime property value. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. Supports $filter (eq, ne, not, ge, le, and eq on null values) and $orderBy. +func (m *Device) SetApproximateLastSignInDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.approximateLastSignInDateTime = value +} +// SetCommands sets the commands property value. Set of commands sent to this device. +func (m *Device) SetCommands(value []Commandable)() { + m.commands = value +} +// SetComplianceExpirationDateTime sets the complianceExpirationDateTime property value. The timestamp when the device is no longer deemed compliant. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Device) SetComplianceExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceExpirationDateTime = value +} +// SetDeviceCategory sets the deviceCategory property value. User-defined property set by Intune to automatically add devices to groups and simplify managing devices. +func (m *Device) SetDeviceCategory(value *string)() { + m.deviceCategory = value +} +// SetDeviceId sets the deviceId property value. Unique Identifier set by Azure Device Registration Service at the time of registration. This is an alternate key that can be used to reference the device object. Also Supports $filter (eq, ne, not, startsWith). +func (m *Device) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceMetadata sets the deviceMetadata property value. For internal use only. Set to null. +func (m *Device) SetDeviceMetadata(value *string)() { + m.deviceMetadata = value +} +// SetDeviceOwnership sets the deviceOwnership property value. Ownership of the device. This property is set by Intune. Possible values are: unknown, company, personal. +func (m *Device) SetDeviceOwnership(value *string)() { + m.deviceOwnership = value +} +// SetDeviceVersion sets the deviceVersion property value. For internal use only. +func (m *Device) SetDeviceVersion(value *int32)() { + m.deviceVersion = value +} +// SetDisplayName sets the displayName property value. The display name for the device. Required. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Device) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDomainName sets the domainName property value. The on-premises domain name of Hybrid Azure AD joined devices. This property is set by Intune. +func (m *Device) SetDomainName(value *string)() { + m.domainName = value +} +// SetEnrollmentProfileName sets the enrollmentProfileName property value. Enrollment profile applied to the device. For example, Apple Device Enrollment Profile, Device enrollment - Corporate device identifiers, or Windows Autopilot profile name. This property is set by Intune. +func (m *Device) SetEnrollmentProfileName(value *string)() { + m.enrollmentProfileName = value +} +// SetEnrollmentType sets the enrollmentType property value. Enrollment type of the device. This property is set by Intune. Possible values are: unknown, userEnrollment, deviceEnrollmentManager, appleBulkWithUser, appleBulkWithoutUser, windowsAzureADJoin, windowsBulkUserless, windowsAutoEnrollment, windowsBulkAzureDomainJoin, windowsCoManagement. +func (m *Device) SetEnrollmentType(value *string)() { + m.enrollmentType = value +} +// SetExtensionAttributes sets the extensionAttributes property value. Contains extension attributes 1-15 for the device. The individual extension attributes are not selectable. These properties are mastered in cloud and can be set during creation or update of a device object in Azure AD. Supports $filter (eq, not, startsWith, and eq on null values). +func (m *Device) SetExtensionAttributes(value OnPremisesExtensionAttributesable)() { + m.extensionAttributes = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the device. Read-only. Nullable. +func (m *Device) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetHostnames sets the hostnames property value. List of hostNames for the device. +func (m *Device) SetHostnames(value []string)() { + m.hostnames = value +} +// SetIsCompliant sets the isCompliant property value. true if the device complies with Mobile Device Management (MDM) policies; otherwise, false. Read-only. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). +func (m *Device) SetIsCompliant(value *bool)() { + m.isCompliant = value +} +// SetIsManaged sets the isManaged property value. true if the device is managed by a Mobile Device Management (MDM) app; otherwise, false. This can only be updated by Intune for any device OS type or by an approved MDM app for Windows OS devices. Supports $filter (eq, ne, not). +func (m *Device) SetIsManaged(value *bool)() { + m.isManaged = value +} +// SetIsManagementRestricted sets the isManagementRestricted property value. The isManagementRestricted property +func (m *Device) SetIsManagementRestricted(value *bool)() { + m.isManagementRestricted = value +} +// SetIsRooted sets the isRooted property value. true if device is rooted; false if device is jail-broken. This can only be updated by Intune. +func (m *Device) SetIsRooted(value *bool)() { + m.isRooted = value +} +// SetKind sets the kind property value. Form factor of device. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) SetKind(value *string)() { + m.kind = value +} +// SetManagementType sets the managementType property value. Management channel of the device. This property is set by Intune. Possible values are: eas, mdm, easMdm, intuneClient, easIntuneClient, configurationManagerClient, configurationManagerClientMdm, configurationManagerClientMdmEas, unknown, jamf, googleCloudDevicePolicyController. +func (m *Device) SetManagementType(value *string)() { + m.managementType = value +} +// SetManufacturer sets the manufacturer property value. Manufacturer of the device. Read-only. +func (m *Device) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetMdmAppId sets the mdmAppId property value. Application identifier used to register device into MDM. Read-only. Supports $filter (eq, ne, not, startsWith). +func (m *Device) SetMdmAppId(value *string)() { + m.mdmAppId = value +} +// SetMemberOf sets the memberOf property value. Groups and administrative units that this device is a member of. Read-only. Nullable. Supports $expand. +func (m *Device) SetMemberOf(value []DirectoryObjectable)() { + m.memberOf = value +} +// SetModel sets the model property value. Model of the device. Read-only. +func (m *Device) SetModel(value *string)() { + m.model = value +} +// SetName sets the name property value. Friendly name of a device. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) SetName(value *string)() { + m.name = value +} +// SetOnPremisesLastSyncDateTime sets the onPremisesLastSyncDateTime property value. The last time at which the object was synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z Read-only. Supports $filter (eq, ne, not, ge, le, in). +func (m *Device) SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onPremisesLastSyncDateTime = value +} +// SetOnPremisesSyncEnabled sets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Read-only. Supports $filter (eq, ne, not, in, and eq on null values). +func (m *Device) SetOnPremisesSyncEnabled(value *bool)() { + m.onPremisesSyncEnabled = value +} +// SetOperatingSystem sets the operatingSystem property value. The type of operating system on the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). +func (m *Device) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetOperatingSystemVersion sets the operatingSystemVersion property value. Operating system version of the device. Required. Supports $filter (eq, ne, not, ge, le, startsWith, and eq on null values). +func (m *Device) SetOperatingSystemVersion(value *string)() { + m.operatingSystemVersion = value +} +// SetPhysicalIds sets the physicalIds property value. For internal use only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0. +func (m *Device) SetPhysicalIds(value []string)() { + m.physicalIds = value +} +// SetPlatform sets the platform property value. Platform of device. Only returned if user signs in with a Microsoft account as part of Project Rome. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) SetPlatform(value *string)() { + m.platform = value +} +// SetProfileType sets the profileType property value. The profile type of the device. Possible values: RegisteredDevice (default), SecureVM, Printer, Shared, IoT. +func (m *Device) SetProfileType(value *string)() { + m.profileType = value +} +// SetRegisteredOwners sets the registeredOwners property value. The user that cloud joined the device or registered their personal device. The registered owner is set at the time of registration. Currently, there can be only one owner. Read-only. Nullable. Supports $expand. +func (m *Device) SetRegisteredOwners(value []DirectoryObjectable)() { + m.registeredOwners = value +} +// SetRegisteredUsers sets the registeredUsers property value. Collection of registered users of the device. For cloud joined devices and registered personal devices, registered users are set to the same value as registered owners at the time of registration. Read-only. Nullable. Supports $expand. +func (m *Device) SetRegisteredUsers(value []DirectoryObjectable)() { + m.registeredUsers = value +} +// SetRegistrationDateTime sets the registrationDateTime property value. Date and time of when the device was registered. The timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Device) SetRegistrationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.registrationDateTime = value +} +// SetStatus sets the status property value. Device is online or offline. Only returned if user signs in with a Microsoft account as part of Project Rome. +func (m *Device) SetStatus(value *string)() { + m.status = value +} +// SetSystemLabels sets the systemLabels property value. List of labels applied to the device by the system. Supports $filter (/$count eq 0, /$count ne 0). +func (m *Device) SetSystemLabels(value []string)() { + m.systemLabels = value +} +// SetTransitiveMemberOf sets the transitiveMemberOf property value. Groups and administrative units that this device is a member of. This operation is transitive. Supports $expand. +func (m *Device) SetTransitiveMemberOf(value []DirectoryObjectable)() { + m.transitiveMemberOf = value +} +// SetTrustType sets the trustType property value. Type of trust for the joined device. Read-only. Possible values: Workplace (indicates bring your own personal devices), AzureAd (Cloud only joined devices), ServerAd (on-premises domain joined devices joined to Azure AD). For more details, see Introduction to device management in Azure Active Directory +func (m *Device) SetTrustType(value *string)() { + m.trustType = value +} +// SetUsageRights sets the usageRights property value. Represents the usage rights a device has been granted. +func (m *Device) SetUsageRights(value []UsageRightable)() { + m.usageRights = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_action_result.go b/src/internal/connector/graph/betasdk/models/device_action_result.go new file mode 100644 index 000000000..f357ed0fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_action_result.go @@ -0,0 +1,211 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceActionResult device action result +type DeviceActionResult struct { + // Action name + actionName *string + // The actionState property + actionState *ActionState + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Time the action state was last updated + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Time the action was initiated + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDeviceActionResult instantiates a new deviceActionResult and sets the default values. +func NewDeviceActionResult()(*DeviceActionResult) { + m := &DeviceActionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.activateDeviceEsimActionResult": + return NewActivateDeviceEsimActionResult(), nil + case "#microsoft.graph.configurationManagerActionResult": + return NewConfigurationManagerActionResult(), nil + case "#microsoft.graph.deleteUserFromSharedAppleDeviceActionResult": + return NewDeleteUserFromSharedAppleDeviceActionResult(), nil + case "#microsoft.graph.locateDeviceActionResult": + return NewLocateDeviceActionResult(), nil + case "#microsoft.graph.remoteLockActionResult": + return NewRemoteLockActionResult(), nil + case "#microsoft.graph.resetPasscodeActionResult": + return NewResetPasscodeActionResult(), nil + case "#microsoft.graph.revokeAppleVppLicensesActionResult": + return NewRevokeAppleVppLicensesActionResult(), nil + case "#microsoft.graph.rotateBitLockerKeysDeviceActionResult": + return NewRotateBitLockerKeysDeviceActionResult(), nil + case "#microsoft.graph.windowsDefenderScanActionResult": + return NewWindowsDefenderScanActionResult(), nil + } + } + } + } + return NewDeviceActionResult(), nil +} +// GetActionName gets the actionName property value. Action name +func (m *DeviceActionResult) GetActionName()(*string) { + return m.actionName +} +// GetActionState gets the actionState property value. The actionState property +func (m *DeviceActionResult) GetActionState()(*ActionState) { + return m.actionState +} +// 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 *DeviceActionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionName(val) + } + return nil + } + res["actionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionState) + if err != nil { + return err + } + if val != nil { + m.SetActionState(val.(*ActionState)) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *DeviceActionResult) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceActionResult) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. Time the action was initiated +func (m *DeviceActionResult) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *DeviceActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actionName", m.GetActionName()) + if err != nil { + return err + } + } + if m.GetActionState() != nil { + cast := (*m.GetActionState()).String() + err := writer.WriteStringValue("actionState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionName sets the actionName property value. Action name +func (m *DeviceActionResult) SetActionName(value *string)() { + m.actionName = value +} +// SetActionState sets the actionState property value. The actionState property +func (m *DeviceActionResult) SetActionState(value *ActionState)() { + m.actionState = value +} +// 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 *DeviceActionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *DeviceActionResult) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceActionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. Time the action was initiated +func (m *DeviceActionResult) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_action_result_collection_response.go b/src/internal/connector/graph/betasdk/models/device_action_result_collection_response.go new file mode 100644 index 000000000..a8bc00e99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_action_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceActionResultCollectionResponse +type DeviceActionResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceActionResultable +} +// NewDeviceActionResultCollectionResponse instantiates a new DeviceActionResultCollectionResponse and sets the default values. +func NewDeviceActionResultCollectionResponse()(*DeviceActionResultCollectionResponse) { + m := &DeviceActionResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceActionResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceActionResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceActionResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceActionResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceActionResultable, len(val)) + for i, v := range val { + res[i] = v.(DeviceActionResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceActionResultCollectionResponse) GetValue()([]DeviceActionResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceActionResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceActionResultCollectionResponse) SetValue(value []DeviceActionResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_action_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_action_result_collection_responseable.go new file mode 100644 index 000000000..fbd0b3626 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_action_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceActionResultCollectionResponseable +type DeviceActionResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceActionResultable) + SetValue(value []DeviceActionResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_action_resultable.go b/src/internal/connector/graph/betasdk/models/device_action_resultable.go new file mode 100644 index 000000000..19ab50a88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_action_resultable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceActionResultable +type DeviceActionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionName()(*string) + GetActionState()(*ActionState) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActionName(value *string)() + SetActionState(value *ActionState)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter.go new file mode 100644 index 000000000..1e2a6378e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter.go @@ -0,0 +1,274 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentFilter a class containing the properties used for Assignment Filter. +type DeviceAndAppManagementAssignmentFilter struct { + Entity + // Creation time of the Assignment Filter. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description of the Assignment Filter. + description *string + // DisplayName of the Assignment Filter. + displayName *string + // Last modified time of the Assignment Filter. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Associated assignments for a specific filter + payloads []PayloadByFilterable + // Supported platform types. + platform *DevicePlatformType + // RoleScopeTags of the Assignment Filter. + roleScopeTags []string + // Rule definition of the Assignment Filter. + rule *string +} +// NewDeviceAndAppManagementAssignmentFilter instantiates a new deviceAndAppManagementAssignmentFilter and sets the default values. +func NewDeviceAndAppManagementAssignmentFilter()(*DeviceAndAppManagementAssignmentFilter) { + m := &DeviceAndAppManagementAssignmentFilter{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceAndAppManagementAssignmentFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementAssignmentFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.payloadCompatibleAssignmentFilter": + return NewPayloadCompatibleAssignmentFilter(), nil + } + } + } + } + return NewDeviceAndAppManagementAssignmentFilter(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Creation time of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. DisplayName of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementAssignmentFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["payloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadByFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadByFilterable, len(val)) + for i, v := range val { + res[i] = v.(PayloadByFilterable) + } + m.SetPayloads(res) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*DevicePlatformType)) + } + return nil + } + res["roleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTags(res) + } + return nil + } + res["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRule(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified time of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPayloads gets the payloads property value. Associated assignments for a specific filter +func (m *DeviceAndAppManagementAssignmentFilter) GetPayloads()([]PayloadByFilterable) { + return m.payloads +} +// GetPlatform gets the platform property value. Supported platform types. +func (m *DeviceAndAppManagementAssignmentFilter) GetPlatform()(*DevicePlatformType) { + return m.platform +} +// GetRoleScopeTags gets the roleScopeTags property value. RoleScopeTags of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetRoleScopeTags()([]string) { + return m.roleScopeTags +} +// GetRule gets the rule property value. Rule definition of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) GetRule()(*string) { + return m.rule +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementAssignmentFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPayloads() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPayloads())) + for i, v := range m.GetPayloads() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("payloads", cast) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTags() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTags", m.GetRoleScopeTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rule", m.GetRule()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Creation time of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. DisplayName of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified time of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPayloads sets the payloads property value. Associated assignments for a specific filter +func (m *DeviceAndAppManagementAssignmentFilter) SetPayloads(value []PayloadByFilterable)() { + m.payloads = value +} +// SetPlatform sets the platform property value. Supported platform types. +func (m *DeviceAndAppManagementAssignmentFilter) SetPlatform(value *DevicePlatformType)() { + m.platform = value +} +// SetRoleScopeTags sets the roleScopeTags property value. RoleScopeTags of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetRoleScopeTags(value []string)() { + m.roleScopeTags = value +} +// SetRule sets the rule property value. Rule definition of the Assignment Filter. +func (m *DeviceAndAppManagementAssignmentFilter) SetRule(value *string)() { + m.rule = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_response.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_response.go new file mode 100644 index 000000000..e3e809860 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentFilterCollectionResponse +type DeviceAndAppManagementAssignmentFilterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceAndAppManagementAssignmentFilterable +} +// NewDeviceAndAppManagementAssignmentFilterCollectionResponse instantiates a new DeviceAndAppManagementAssignmentFilterCollectionResponse and sets the default values. +func NewDeviceAndAppManagementAssignmentFilterCollectionResponse()(*DeviceAndAppManagementAssignmentFilterCollectionResponse) { + m := &DeviceAndAppManagementAssignmentFilterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceAndAppManagementAssignmentFilterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementAssignmentFilterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAndAppManagementAssignmentFilterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementAssignmentFilterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAndAppManagementAssignmentFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAndAppManagementAssignmentFilterable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAndAppManagementAssignmentFilterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceAndAppManagementAssignmentFilterCollectionResponse) GetValue()([]DeviceAndAppManagementAssignmentFilterable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementAssignmentFilterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceAndAppManagementAssignmentFilterCollectionResponse) SetValue(value []DeviceAndAppManagementAssignmentFilterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_responseable.go new file mode 100644 index 000000000..89121d897 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentFilterCollectionResponseable +type DeviceAndAppManagementAssignmentFilterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceAndAppManagementAssignmentFilterable) + SetValue(value []DeviceAndAppManagementAssignmentFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_type.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_type.go new file mode 100644 index 000000000..d3712ccd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filter_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceAndAppManagementAssignmentFilterType int + +const ( + // Default value. Do not use. + NONE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE DeviceAndAppManagementAssignmentFilterType = iota + // Indicates in-filter, rule matching will offer the payload to devices. + INCLUDE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE + // Indicates out-filter, rule matching will not offer the payload to devices. + EXCLUDE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE +) + +func (i DeviceAndAppManagementAssignmentFilterType) String() string { + return []string{"none", "include", "exclude"}[i] +} +func ParseDeviceAndAppManagementAssignmentFilterType(v string) (interface{}, error) { + result := NONE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE + switch v { + case "none": + result = NONE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE + case "include": + result = INCLUDE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE + case "exclude": + result = EXCLUDE_DEVICEANDAPPMANAGEMENTASSIGNMENTFILTERTYPE + default: + return 0, errors.New("Unknown DeviceAndAppManagementAssignmentFilterType value: " + v) + } + return &result, nil +} +func SerializeDeviceAndAppManagementAssignmentFilterType(values []DeviceAndAppManagementAssignmentFilterType) []string { + 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/device_and_app_management_assignment_filterable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filterable.go new file mode 100644 index 000000000..d0377cb91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_filterable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentFilterable +type DeviceAndAppManagementAssignmentFilterable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPayloads()([]PayloadByFilterable) + GetPlatform()(*DevicePlatformType) + GetRoleScopeTags()([]string) + GetRule()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPayloads(value []PayloadByFilterable)() + SetPlatform(value *DevicePlatformType)() + SetRoleScopeTags(value []string)() + SetRule(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_source.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_source.go new file mode 100644 index 000000000..f30cc66e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_source.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceAndAppManagementAssignmentSource int + +const ( + // Direct indicates a direct assignment. + DIRECT_DEVICEANDAPPMANAGEMENTASSIGNMENTSOURCE DeviceAndAppManagementAssignmentSource = iota + // PolicySets indicates assignment was made via PolicySet assignment. + POLICYSETS_DEVICEANDAPPMANAGEMENTASSIGNMENTSOURCE +) + +func (i DeviceAndAppManagementAssignmentSource) String() string { + return []string{"direct", "policySets"}[i] +} +func ParseDeviceAndAppManagementAssignmentSource(v string) (interface{}, error) { + result := DIRECT_DEVICEANDAPPMANAGEMENTASSIGNMENTSOURCE + switch v { + case "direct": + result = DIRECT_DEVICEANDAPPMANAGEMENTASSIGNMENTSOURCE + case "policySets": + result = POLICYSETS_DEVICEANDAPPMANAGEMENTASSIGNMENTSOURCE + default: + return 0, errors.New("Unknown DeviceAndAppManagementAssignmentSource value: " + v) + } + return &result, nil +} +func SerializeDeviceAndAppManagementAssignmentSource(values []DeviceAndAppManagementAssignmentSource) []string { + 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/device_and_app_management_assignment_target.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_target.go new file mode 100644 index 000000000..2637bb326 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_target.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentTarget base type for assignment targets. +type DeviceAndAppManagementAssignmentTarget 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 Id of the filter for the target assignment. + deviceAndAppManagementAssignmentFilterId *string + // Represents type of the assignment filter. + deviceAndAppManagementAssignmentFilterType *DeviceAndAppManagementAssignmentFilterType + // The OdataType property + odataType *string +} +// NewDeviceAndAppManagementAssignmentTarget instantiates a new deviceAndAppManagementAssignmentTarget and sets the default values. +func NewDeviceAndAppManagementAssignmentTarget()(*DeviceAndAppManagementAssignmentTarget) { + m := &DeviceAndAppManagementAssignmentTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.allDevicesAssignmentTarget": + return NewAllDevicesAssignmentTarget(), nil + case "#microsoft.graph.allLicensedUsersAssignmentTarget": + return NewAllLicensedUsersAssignmentTarget(), nil + case "#microsoft.graph.configurationManagerCollectionAssignmentTarget": + return NewConfigurationManagerCollectionAssignmentTarget(), nil + case "#microsoft.graph.exclusionGroupAssignmentTarget": + return NewExclusionGroupAssignmentTarget(), nil + case "#microsoft.graph.groupAssignmentTarget": + return NewGroupAssignmentTarget(), nil + } + } + } + } + return NewDeviceAndAppManagementAssignmentTarget(), 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 *DeviceAndAppManagementAssignmentTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceAndAppManagementAssignmentFilterId gets the deviceAndAppManagementAssignmentFilterId property value. The Id of the filter for the target assignment. +func (m *DeviceAndAppManagementAssignmentTarget) GetDeviceAndAppManagementAssignmentFilterId()(*string) { + return m.deviceAndAppManagementAssignmentFilterId +} +// GetDeviceAndAppManagementAssignmentFilterType gets the deviceAndAppManagementAssignmentFilterType property value. Represents type of the assignment filter. +func (m *DeviceAndAppManagementAssignmentTarget) GetDeviceAndAppManagementAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) { + return m.deviceAndAppManagementAssignmentFilterType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceAndAppManagementAssignmentFilterId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceAndAppManagementAssignmentFilterId(val) + } + return nil + } + res["deviceAndAppManagementAssignmentFilterType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentFilterType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceAndAppManagementAssignmentFilterType(val.(*DeviceAndAppManagementAssignmentFilterType)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceAndAppManagementAssignmentTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("deviceAndAppManagementAssignmentFilterId", m.GetDeviceAndAppManagementAssignmentFilterId()) + if err != nil { + return err + } + } + if m.GetDeviceAndAppManagementAssignmentFilterType() != nil { + cast := (*m.GetDeviceAndAppManagementAssignmentFilterType()).String() + err := writer.WriteStringValue("deviceAndAppManagementAssignmentFilterType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceAndAppManagementAssignmentTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceAndAppManagementAssignmentFilterId sets the deviceAndAppManagementAssignmentFilterId property value. The Id of the filter for the target assignment. +func (m *DeviceAndAppManagementAssignmentTarget) SetDeviceAndAppManagementAssignmentFilterId(value *string)() { + m.deviceAndAppManagementAssignmentFilterId = value +} +// SetDeviceAndAppManagementAssignmentFilterType sets the deviceAndAppManagementAssignmentFilterType property value. Represents type of the assignment filter. +func (m *DeviceAndAppManagementAssignmentTarget) SetDeviceAndAppManagementAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() { + m.deviceAndAppManagementAssignmentFilterType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceAndAppManagementAssignmentTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_targetable.go new file mode 100644 index 000000000..120934643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_assignment_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementAssignmentTargetable +type DeviceAndAppManagementAssignmentTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceAndAppManagementAssignmentFilterId()(*string) + GetDeviceAndAppManagementAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) + GetOdataType()(*string) + SetDeviceAndAppManagementAssignmentFilterId(value *string)() + SetDeviceAndAppManagementAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment.go new file mode 100644 index 000000000..f945aacc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleAssignment +type DeviceAndAppManagementRoleAssignment struct { + RoleAssignment + // The list of ids of role member security groups. These are IDs from Azure Active Directory. + members []string + // The set of Role Scope Tags defined on the Role Assignment. + roleScopeTags []RoleScopeTagable +} +// NewDeviceAndAppManagementRoleAssignment instantiates a new DeviceAndAppManagementRoleAssignment and sets the default values. +func NewDeviceAndAppManagementRoleAssignment()(*DeviceAndAppManagementRoleAssignment) { + m := &DeviceAndAppManagementRoleAssignment{ + RoleAssignment: *NewRoleAssignment(), + } + return m +} +// CreateDeviceAndAppManagementRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAndAppManagementRoleAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RoleAssignment.GetFieldDeserializers() + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMembers(res) + } + return nil + } + res["roleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagable) + } + m.SetRoleScopeTags(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. The list of ids of role member security groups. These are IDs from Azure Active Directory. +func (m *DeviceAndAppManagementRoleAssignment) GetMembers()([]string) { + return m.members +} +// GetRoleScopeTags gets the roleScopeTags property value. The set of Role Scope Tags defined on the Role Assignment. +func (m *DeviceAndAppManagementRoleAssignment) GetRoleScopeTags()([]RoleScopeTagable) { + return m.roleScopeTags +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RoleAssignment.Serialize(writer) + if err != nil { + return err + } + if m.GetMembers() != nil { + err = writer.WriteCollectionOfStringValues("members", m.GetMembers()) + if err != nil { + return err + } + } + if m.GetRoleScopeTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleScopeTags())) + for i, v := range m.GetRoleScopeTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleScopeTags", cast) + if err != nil { + return err + } + } + return nil +} +// SetMembers sets the members property value. The list of ids of role member security groups. These are IDs from Azure Active Directory. +func (m *DeviceAndAppManagementRoleAssignment) SetMembers(value []string)() { + m.members = value +} +// SetRoleScopeTags sets the roleScopeTags property value. The set of Role Scope Tags defined on the Role Assignment. +func (m *DeviceAndAppManagementRoleAssignment) SetRoleScopeTags(value []RoleScopeTagable)() { + m.roleScopeTags = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_response.go new file mode 100644 index 000000000..373ec1d67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleAssignmentCollectionResponse +type DeviceAndAppManagementRoleAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceAndAppManagementRoleAssignmentable +} +// NewDeviceAndAppManagementRoleAssignmentCollectionResponse instantiates a new DeviceAndAppManagementRoleAssignmentCollectionResponse and sets the default values. +func NewDeviceAndAppManagementRoleAssignmentCollectionResponse()(*DeviceAndAppManagementRoleAssignmentCollectionResponse) { + m := &DeviceAndAppManagementRoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceAndAppManagementRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAndAppManagementRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementRoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAndAppManagementRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAndAppManagementRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAndAppManagementRoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceAndAppManagementRoleAssignmentCollectionResponse) GetValue()([]DeviceAndAppManagementRoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementRoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceAndAppManagementRoleAssignmentCollectionResponse) SetValue(value []DeviceAndAppManagementRoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_responseable.go new file mode 100644 index 000000000..aafbe8555 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleAssignmentCollectionResponseable +type DeviceAndAppManagementRoleAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceAndAppManagementRoleAssignmentable) + SetValue(value []DeviceAndAppManagementRoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignmentable.go new file mode 100644 index 000000000..899262a4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_assignmentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleAssignmentable +type DeviceAndAppManagementRoleAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RoleAssignmentable + GetMembers()([]string) + GetRoleScopeTags()([]RoleScopeTagable) + SetMembers(value []string)() + SetRoleScopeTags(value []RoleScopeTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition.go new file mode 100644 index 000000000..e99096f60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleDefinition +type DeviceAndAppManagementRoleDefinition struct { + RoleDefinition +} +// NewDeviceAndAppManagementRoleDefinition instantiates a new DeviceAndAppManagementRoleDefinition and sets the default values. +func NewDeviceAndAppManagementRoleDefinition()(*DeviceAndAppManagementRoleDefinition) { + m := &DeviceAndAppManagementRoleDefinition{ + RoleDefinition: *NewRoleDefinition(), + } + odataTypeValue := "#microsoft.graph.deviceAndAppManagementRoleDefinition"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceAndAppManagementRoleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementRoleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAndAppManagementRoleDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementRoleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RoleDefinition.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementRoleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RoleDefinition.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_response.go new file mode 100644 index 000000000..fe68b421e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleDefinitionCollectionResponse +type DeviceAndAppManagementRoleDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceAndAppManagementRoleDefinitionable +} +// NewDeviceAndAppManagementRoleDefinitionCollectionResponse instantiates a new DeviceAndAppManagementRoleDefinitionCollectionResponse and sets the default values. +func NewDeviceAndAppManagementRoleDefinitionCollectionResponse()(*DeviceAndAppManagementRoleDefinitionCollectionResponse) { + m := &DeviceAndAppManagementRoleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceAndAppManagementRoleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAndAppManagementRoleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAndAppManagementRoleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAndAppManagementRoleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAndAppManagementRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAndAppManagementRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAndAppManagementRoleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceAndAppManagementRoleDefinitionCollectionResponse) GetValue()([]DeviceAndAppManagementRoleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceAndAppManagementRoleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceAndAppManagementRoleDefinitionCollectionResponse) SetValue(value []DeviceAndAppManagementRoleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_responseable.go new file mode 100644 index 000000000..444cda59a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleDefinitionCollectionResponseable +type DeviceAndAppManagementRoleDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceAndAppManagementRoleDefinitionable) + SetValue(value []DeviceAndAppManagementRoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definitionable.go b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definitionable.go new file mode 100644 index 000000000..7c3c36d44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_and_app_management_role_definitionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAndAppManagementRoleDefinitionable +type DeviceAndAppManagementRoleDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RoleDefinitionable +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_management.go b/src/internal/connector/graph/betasdk/models/device_app_management.go new file mode 100644 index 000000000..1ebce1aff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management.go @@ -0,0 +1,1000 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagement +type DeviceAppManagement struct { + Entity + // Android managed app policies. + androidManagedAppProtections []AndroidManagedAppProtectionable + // Default managed app policies. + defaultManagedAppProtections []DefaultManagedAppProtectionable + // Device app management tasks. + deviceAppManagementTasks []DeviceAppManagementTaskable + // The Windows Enterprise Code Signing Certificate. + enterpriseCodeSigningCertificates []EnterpriseCodeSigningCertificateable + // The IOS Lob App Provisioning Configurations. + iosLobAppProvisioningConfigurations []IosLobAppProvisioningConfigurationable + // iOS managed app policies. + iosManagedAppProtections []IosManagedAppProtectionable + // Whether the account is enabled for syncing applications from the Microsoft Store for Business. + isEnabledForMicrosoftStoreForBusiness *bool + // Managed app policies. + managedAppPolicies []ManagedAppPolicyable + // The managed app registrations. + managedAppRegistrations []ManagedAppRegistrationable + // The managed app statuses. + managedAppStatuses []ManagedAppStatusable + // The mobile eBook categories. + managedEBookCategories []ManagedEBookCategoryable + // The Managed eBook. + managedEBooks []ManagedEBookable + // Windows information protection for apps running on devices which are MDM enrolled. + mdmWindowsInformationProtectionPolicies []MdmWindowsInformationProtectionPolicyable + // The locale information used to sync applications from the Microsoft Store for Business. Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is -, where is a lowercase two-letter code derived from ISO 639-1 and is an uppercase two-letter code derived from ISO 3166. For example, en-US for English (United States) is a specific culture. + microsoftStoreForBusinessLanguage *string + // The last time an application sync from the Microsoft Store for Business was completed. + microsoftStoreForBusinessLastCompletedApplicationSyncTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last time the apps from the Microsoft Store for Business were synced successfully for the account. + microsoftStoreForBusinessLastSuccessfulSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Portal to which admin syncs available Microsoft Store for Business apps. This is available in the Intune Admin Console. + microsoftStoreForBusinessPortalSelection *MicrosoftStoreForBusinessPortalSelectionOptions + // The mobile app categories. + mobileAppCategories []MobileAppCategoryable + // The Managed Device Mobile Application Configurations. + mobileAppConfigurations []ManagedDeviceMobileAppConfigurationable + // The mobile apps. + mobileApps []MobileAppable + // The PolicySet of Policies and Applications + policySets []PolicySetable + // The WinPhone Symantec Code Signing Certificate. + symantecCodeSigningCertificate SymantecCodeSigningCertificateable + // Targeted managed app configurations. + targetedManagedAppConfigurations []TargetedManagedAppConfigurationable + // List of Vpp tokens for this organization. + vppTokens []VppTokenable + // The collection of Windows Defender Application Control Supplemental Policies. + wdacSupplementalPolicies []WindowsDefenderApplicationControlSupplementalPolicyable + // Windows information protection device registrations that are not MDM enrolled. + windowsInformationProtectionDeviceRegistrations []WindowsInformationProtectionDeviceRegistrationable + // Windows information protection for apps running on devices which are not MDM enrolled. + windowsInformationProtectionPolicies []WindowsInformationProtectionPolicyable + // Windows information protection wipe actions. + windowsInformationProtectionWipeActions []WindowsInformationProtectionWipeActionable + // Windows managed app policies. + windowsManagedAppProtections []WindowsManagedAppProtectionable + // Windows management app. + windowsManagementApp WindowsManagementAppable +} +// NewDeviceAppManagement instantiates a new DeviceAppManagement and sets the default values. +func NewDeviceAppManagement()(*DeviceAppManagement) { + m := &DeviceAppManagement{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceAppManagementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAppManagementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAppManagement(), nil +} +// GetAndroidManagedAppProtections gets the androidManagedAppProtections property value. Android managed app policies. +func (m *DeviceAppManagement) GetAndroidManagedAppProtections()([]AndroidManagedAppProtectionable) { + return m.androidManagedAppProtections +} +// GetDefaultManagedAppProtections gets the defaultManagedAppProtections property value. Default managed app policies. +func (m *DeviceAppManagement) GetDefaultManagedAppProtections()([]DefaultManagedAppProtectionable) { + return m.defaultManagedAppProtections +} +// GetDeviceAppManagementTasks gets the deviceAppManagementTasks property value. Device app management tasks. +func (m *DeviceAppManagement) GetDeviceAppManagementTasks()([]DeviceAppManagementTaskable) { + return m.deviceAppManagementTasks +} +// GetEnterpriseCodeSigningCertificates gets the enterpriseCodeSigningCertificates property value. The Windows Enterprise Code Signing Certificate. +func (m *DeviceAppManagement) GetEnterpriseCodeSigningCertificates()([]EnterpriseCodeSigningCertificateable) { + return m.enterpriseCodeSigningCertificates +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAppManagement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["androidManagedAppProtections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedAppProtectionable) + } + m.SetAndroidManagedAppProtections(res) + } + return nil + } + res["defaultManagedAppProtections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDefaultManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DefaultManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(DefaultManagedAppProtectionable) + } + m.SetDefaultManagedAppProtections(res) + } + return nil + } + res["deviceAppManagementTasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAppManagementTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAppManagementTaskable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAppManagementTaskable) + } + m.SetDeviceAppManagementTasks(res) + } + return nil + } + res["enterpriseCodeSigningCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnterpriseCodeSigningCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnterpriseCodeSigningCertificateable, len(val)) + for i, v := range val { + res[i] = v.(EnterpriseCodeSigningCertificateable) + } + m.SetEnterpriseCodeSigningCertificates(res) + } + return nil + } + res["iosLobAppProvisioningConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppProvisioningConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppProvisioningConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppProvisioningConfigurationable) + } + m.SetIosLobAppProvisioningConfigurations(res) + } + return nil + } + res["iosManagedAppProtections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(IosManagedAppProtectionable) + } + m.SetIosManagedAppProtections(res) + } + return nil + } + res["isEnabledForMicrosoftStoreForBusiness"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabledForMicrosoftStoreForBusiness(val) + } + return nil + } + res["managedAppPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyable) + } + m.SetManagedAppPolicies(res) + } + return nil + } + res["managedAppRegistrations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppRegistrationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppRegistrationable) + } + m.SetManagedAppRegistrations(res) + } + return nil + } + res["managedAppStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppStatusable) + } + m.SetManagedAppStatuses(res) + } + return nil + } + res["managedEBookCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookCategoryable) + } + m.SetManagedEBookCategories(res) + } + return nil + } + res["managedEBooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookable) + } + m.SetManagedEBooks(res) + } + return nil + } + res["mdmWindowsInformationProtectionPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMdmWindowsInformationProtectionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MdmWindowsInformationProtectionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(MdmWindowsInformationProtectionPolicyable) + } + m.SetMdmWindowsInformationProtectionPolicies(res) + } + return nil + } + res["microsoftStoreForBusinessLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftStoreForBusinessLanguage(val) + } + return nil + } + res["microsoftStoreForBusinessLastCompletedApplicationSyncTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime(val) + } + return nil + } + res["microsoftStoreForBusinessLastSuccessfulSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime(val) + } + return nil + } + res["microsoftStoreForBusinessPortalSelection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftStoreForBusinessPortalSelectionOptions) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftStoreForBusinessPortalSelection(val.(*MicrosoftStoreForBusinessPortalSelectionOptions)) + } + return nil + } + res["mobileAppCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppCategoryable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppCategoryable) + } + m.SetMobileAppCategories(res) + } + return nil + } + res["mobileAppConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationable) + } + m.SetMobileAppConfigurations(res) + } + return nil + } + res["mobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppable) + } + m.SetMobileApps(res) + } + return nil + } + res["policySets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetable) + } + m.SetPolicySets(res) + } + return nil + } + res["symantecCodeSigningCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSymantecCodeSigningCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSymantecCodeSigningCertificate(val.(SymantecCodeSigningCertificateable)) + } + return nil + } + res["targetedManagedAppConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTargetedManagedAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TargetedManagedAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(TargetedManagedAppConfigurationable) + } + m.SetTargetedManagedAppConfigurations(res) + } + return nil + } + res["vppTokens"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVppTokenFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VppTokenable, len(val)) + for i, v := range val { + res[i] = v.(VppTokenable) + } + m.SetVppTokens(res) + } + return nil + } + res["wdacSupplementalPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsDefenderApplicationControlSupplementalPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsDefenderApplicationControlSupplementalPolicyable, len(val)) + for i, v := range val { + res[i] = v.(WindowsDefenderApplicationControlSupplementalPolicyable) + } + m.SetWdacSupplementalPolicies(res) + } + return nil + } + res["windowsInformationProtectionDeviceRegistrations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsInformationProtectionDeviceRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsInformationProtectionDeviceRegistrationable, len(val)) + for i, v := range val { + res[i] = v.(WindowsInformationProtectionDeviceRegistrationable) + } + m.SetWindowsInformationProtectionDeviceRegistrations(res) + } + return nil + } + res["windowsInformationProtectionPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsInformationProtectionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsInformationProtectionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(WindowsInformationProtectionPolicyable) + } + m.SetWindowsInformationProtectionPolicies(res) + } + return nil + } + res["windowsInformationProtectionWipeActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsInformationProtectionWipeActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsInformationProtectionWipeActionable, len(val)) + for i, v := range val { + res[i] = v.(WindowsInformationProtectionWipeActionable) + } + m.SetWindowsInformationProtectionWipeActions(res) + } + return nil + } + res["windowsManagedAppProtections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(WindowsManagedAppProtectionable) + } + m.SetWindowsManagedAppProtections(res) + } + return nil + } + res["windowsManagementApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsManagementAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsManagementApp(val.(WindowsManagementAppable)) + } + return nil + } + return res +} +// GetIosLobAppProvisioningConfigurations gets the iosLobAppProvisioningConfigurations property value. The IOS Lob App Provisioning Configurations. +func (m *DeviceAppManagement) GetIosLobAppProvisioningConfigurations()([]IosLobAppProvisioningConfigurationable) { + return m.iosLobAppProvisioningConfigurations +} +// GetIosManagedAppProtections gets the iosManagedAppProtections property value. iOS managed app policies. +func (m *DeviceAppManagement) GetIosManagedAppProtections()([]IosManagedAppProtectionable) { + return m.iosManagedAppProtections +} +// GetIsEnabledForMicrosoftStoreForBusiness gets the isEnabledForMicrosoftStoreForBusiness property value. Whether the account is enabled for syncing applications from the Microsoft Store for Business. +func (m *DeviceAppManagement) GetIsEnabledForMicrosoftStoreForBusiness()(*bool) { + return m.isEnabledForMicrosoftStoreForBusiness +} +// GetManagedAppPolicies gets the managedAppPolicies property value. Managed app policies. +func (m *DeviceAppManagement) GetManagedAppPolicies()([]ManagedAppPolicyable) { + return m.managedAppPolicies +} +// GetManagedAppRegistrations gets the managedAppRegistrations property value. The managed app registrations. +func (m *DeviceAppManagement) GetManagedAppRegistrations()([]ManagedAppRegistrationable) { + return m.managedAppRegistrations +} +// GetManagedAppStatuses gets the managedAppStatuses property value. The managed app statuses. +func (m *DeviceAppManagement) GetManagedAppStatuses()([]ManagedAppStatusable) { + return m.managedAppStatuses +} +// GetManagedEBookCategories gets the managedEBookCategories property value. The mobile eBook categories. +func (m *DeviceAppManagement) GetManagedEBookCategories()([]ManagedEBookCategoryable) { + return m.managedEBookCategories +} +// GetManagedEBooks gets the managedEBooks property value. The Managed eBook. +func (m *DeviceAppManagement) GetManagedEBooks()([]ManagedEBookable) { + return m.managedEBooks +} +// GetMdmWindowsInformationProtectionPolicies gets the mdmWindowsInformationProtectionPolicies property value. Windows information protection for apps running on devices which are MDM enrolled. +func (m *DeviceAppManagement) GetMdmWindowsInformationProtectionPolicies()([]MdmWindowsInformationProtectionPolicyable) { + return m.mdmWindowsInformationProtectionPolicies +} +// GetMicrosoftStoreForBusinessLanguage gets the microsoftStoreForBusinessLanguage property value. The locale information used to sync applications from the Microsoft Store for Business. Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is -, where is a lowercase two-letter code derived from ISO 639-1 and is an uppercase two-letter code derived from ISO 3166. For example, en-US for English (United States) is a specific culture. +func (m *DeviceAppManagement) GetMicrosoftStoreForBusinessLanguage()(*string) { + return m.microsoftStoreForBusinessLanguage +} +// GetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime gets the microsoftStoreForBusinessLastCompletedApplicationSyncTime property value. The last time an application sync from the Microsoft Store for Business was completed. +func (m *DeviceAppManagement) GetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.microsoftStoreForBusinessLastCompletedApplicationSyncTime +} +// GetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime gets the microsoftStoreForBusinessLastSuccessfulSyncDateTime property value. The last time the apps from the Microsoft Store for Business were synced successfully for the account. +func (m *DeviceAppManagement) GetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.microsoftStoreForBusinessLastSuccessfulSyncDateTime +} +// GetMicrosoftStoreForBusinessPortalSelection gets the microsoftStoreForBusinessPortalSelection property value. Portal to which admin syncs available Microsoft Store for Business apps. This is available in the Intune Admin Console. +func (m *DeviceAppManagement) GetMicrosoftStoreForBusinessPortalSelection()(*MicrosoftStoreForBusinessPortalSelectionOptions) { + return m.microsoftStoreForBusinessPortalSelection +} +// GetMobileAppCategories gets the mobileAppCategories property value. The mobile app categories. +func (m *DeviceAppManagement) GetMobileAppCategories()([]MobileAppCategoryable) { + return m.mobileAppCategories +} +// GetMobileAppConfigurations gets the mobileAppConfigurations property value. The Managed Device Mobile Application Configurations. +func (m *DeviceAppManagement) GetMobileAppConfigurations()([]ManagedDeviceMobileAppConfigurationable) { + return m.mobileAppConfigurations +} +// GetMobileApps gets the mobileApps property value. The mobile apps. +func (m *DeviceAppManagement) GetMobileApps()([]MobileAppable) { + return m.mobileApps +} +// GetPolicySets gets the policySets property value. The PolicySet of Policies and Applications +func (m *DeviceAppManagement) GetPolicySets()([]PolicySetable) { + return m.policySets +} +// GetSymantecCodeSigningCertificate gets the symantecCodeSigningCertificate property value. The WinPhone Symantec Code Signing Certificate. +func (m *DeviceAppManagement) GetSymantecCodeSigningCertificate()(SymantecCodeSigningCertificateable) { + return m.symantecCodeSigningCertificate +} +// GetTargetedManagedAppConfigurations gets the targetedManagedAppConfigurations property value. Targeted managed app configurations. +func (m *DeviceAppManagement) GetTargetedManagedAppConfigurations()([]TargetedManagedAppConfigurationable) { + return m.targetedManagedAppConfigurations +} +// GetVppTokens gets the vppTokens property value. List of Vpp tokens for this organization. +func (m *DeviceAppManagement) GetVppTokens()([]VppTokenable) { + return m.vppTokens +} +// GetWdacSupplementalPolicies gets the wdacSupplementalPolicies property value. The collection of Windows Defender Application Control Supplemental Policies. +func (m *DeviceAppManagement) GetWdacSupplementalPolicies()([]WindowsDefenderApplicationControlSupplementalPolicyable) { + return m.wdacSupplementalPolicies +} +// GetWindowsInformationProtectionDeviceRegistrations gets the windowsInformationProtectionDeviceRegistrations property value. Windows information protection device registrations that are not MDM enrolled. +func (m *DeviceAppManagement) GetWindowsInformationProtectionDeviceRegistrations()([]WindowsInformationProtectionDeviceRegistrationable) { + return m.windowsInformationProtectionDeviceRegistrations +} +// GetWindowsInformationProtectionPolicies gets the windowsInformationProtectionPolicies property value. Windows information protection for apps running on devices which are not MDM enrolled. +func (m *DeviceAppManagement) GetWindowsInformationProtectionPolicies()([]WindowsInformationProtectionPolicyable) { + return m.windowsInformationProtectionPolicies +} +// GetWindowsInformationProtectionWipeActions gets the windowsInformationProtectionWipeActions property value. Windows information protection wipe actions. +func (m *DeviceAppManagement) GetWindowsInformationProtectionWipeActions()([]WindowsInformationProtectionWipeActionable) { + return m.windowsInformationProtectionWipeActions +} +// GetWindowsManagedAppProtections gets the windowsManagedAppProtections property value. Windows managed app policies. +func (m *DeviceAppManagement) GetWindowsManagedAppProtections()([]WindowsManagedAppProtectionable) { + return m.windowsManagedAppProtections +} +// GetWindowsManagementApp gets the windowsManagementApp property value. Windows management app. +func (m *DeviceAppManagement) GetWindowsManagementApp()(WindowsManagementAppable) { + return m.windowsManagementApp +} +// Serialize serializes information the current object +func (m *DeviceAppManagement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAndroidManagedAppProtections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidManagedAppProtections())) + for i, v := range m.GetAndroidManagedAppProtections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidManagedAppProtections", cast) + if err != nil { + return err + } + } + if m.GetDefaultManagedAppProtections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefaultManagedAppProtections())) + for i, v := range m.GetDefaultManagedAppProtections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("defaultManagedAppProtections", cast) + if err != nil { + return err + } + } + if m.GetDeviceAppManagementTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceAppManagementTasks())) + for i, v := range m.GetDeviceAppManagementTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceAppManagementTasks", cast) + if err != nil { + return err + } + } + if m.GetEnterpriseCodeSigningCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEnterpriseCodeSigningCertificates())) + for i, v := range m.GetEnterpriseCodeSigningCertificates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("enterpriseCodeSigningCertificates", cast) + if err != nil { + return err + } + } + if m.GetIosLobAppProvisioningConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIosLobAppProvisioningConfigurations())) + for i, v := range m.GetIosLobAppProvisioningConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("iosLobAppProvisioningConfigurations", cast) + if err != nil { + return err + } + } + if m.GetIosManagedAppProtections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIosManagedAppProtections())) + for i, v := range m.GetIosManagedAppProtections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("iosManagedAppProtections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabledForMicrosoftStoreForBusiness", m.GetIsEnabledForMicrosoftStoreForBusiness()) + if err != nil { + return err + } + } + if m.GetManagedAppPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedAppPolicies())) + for i, v := range m.GetManagedAppPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedAppPolicies", cast) + if err != nil { + return err + } + } + if m.GetManagedAppRegistrations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedAppRegistrations())) + for i, v := range m.GetManagedAppRegistrations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedAppRegistrations", cast) + if err != nil { + return err + } + } + if m.GetManagedAppStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedAppStatuses())) + for i, v := range m.GetManagedAppStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedAppStatuses", cast) + if err != nil { + return err + } + } + if m.GetManagedEBookCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedEBookCategories())) + for i, v := range m.GetManagedEBookCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedEBookCategories", cast) + if err != nil { + return err + } + } + if m.GetManagedEBooks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedEBooks())) + for i, v := range m.GetManagedEBooks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedEBooks", cast) + if err != nil { + return err + } + } + if m.GetMdmWindowsInformationProtectionPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMdmWindowsInformationProtectionPolicies())) + for i, v := range m.GetMdmWindowsInformationProtectionPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mdmWindowsInformationProtectionPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("microsoftStoreForBusinessLanguage", m.GetMicrosoftStoreForBusinessLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("microsoftStoreForBusinessLastCompletedApplicationSyncTime", m.GetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("microsoftStoreForBusinessLastSuccessfulSyncDateTime", m.GetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime()) + if err != nil { + return err + } + } + if m.GetMicrosoftStoreForBusinessPortalSelection() != nil { + cast := (*m.GetMicrosoftStoreForBusinessPortalSelection()).String() + err = writer.WriteStringValue("microsoftStoreForBusinessPortalSelection", &cast) + if err != nil { + return err + } + } + if m.GetMobileAppCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileAppCategories())) + for i, v := range m.GetMobileAppCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileAppCategories", cast) + if err != nil { + return err + } + } + if m.GetMobileAppConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileAppConfigurations())) + for i, v := range m.GetMobileAppConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileAppConfigurations", cast) + if err != nil { + return err + } + } + if m.GetMobileApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileApps())) + for i, v := range m.GetMobileApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileApps", cast) + if err != nil { + return err + } + } + if m.GetPolicySets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicySets())) + for i, v := range m.GetPolicySets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policySets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("symantecCodeSigningCertificate", m.GetSymantecCodeSigningCertificate()) + if err != nil { + return err + } + } + if m.GetTargetedManagedAppConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedManagedAppConfigurations())) + for i, v := range m.GetTargetedManagedAppConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedManagedAppConfigurations", cast) + if err != nil { + return err + } + } + if m.GetVppTokens() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVppTokens())) + for i, v := range m.GetVppTokens() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("vppTokens", cast) + if err != nil { + return err + } + } + if m.GetWdacSupplementalPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWdacSupplementalPolicies())) + for i, v := range m.GetWdacSupplementalPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("wdacSupplementalPolicies", cast) + if err != nil { + return err + } + } + if m.GetWindowsInformationProtectionDeviceRegistrations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsInformationProtectionDeviceRegistrations())) + for i, v := range m.GetWindowsInformationProtectionDeviceRegistrations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsInformationProtectionDeviceRegistrations", cast) + if err != nil { + return err + } + } + if m.GetWindowsInformationProtectionPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsInformationProtectionPolicies())) + for i, v := range m.GetWindowsInformationProtectionPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsInformationProtectionPolicies", cast) + if err != nil { + return err + } + } + if m.GetWindowsInformationProtectionWipeActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsInformationProtectionWipeActions())) + for i, v := range m.GetWindowsInformationProtectionWipeActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsInformationProtectionWipeActions", cast) + if err != nil { + return err + } + } + if m.GetWindowsManagedAppProtections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsManagedAppProtections())) + for i, v := range m.GetWindowsManagedAppProtections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsManagedAppProtections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsManagementApp", m.GetWindowsManagementApp()) + if err != nil { + return err + } + } + return nil +} +// SetAndroidManagedAppProtections sets the androidManagedAppProtections property value. Android managed app policies. +func (m *DeviceAppManagement) SetAndroidManagedAppProtections(value []AndroidManagedAppProtectionable)() { + m.androidManagedAppProtections = value +} +// SetDefaultManagedAppProtections sets the defaultManagedAppProtections property value. Default managed app policies. +func (m *DeviceAppManagement) SetDefaultManagedAppProtections(value []DefaultManagedAppProtectionable)() { + m.defaultManagedAppProtections = value +} +// SetDeviceAppManagementTasks sets the deviceAppManagementTasks property value. Device app management tasks. +func (m *DeviceAppManagement) SetDeviceAppManagementTasks(value []DeviceAppManagementTaskable)() { + m.deviceAppManagementTasks = value +} +// SetEnterpriseCodeSigningCertificates sets the enterpriseCodeSigningCertificates property value. The Windows Enterprise Code Signing Certificate. +func (m *DeviceAppManagement) SetEnterpriseCodeSigningCertificates(value []EnterpriseCodeSigningCertificateable)() { + m.enterpriseCodeSigningCertificates = value +} +// SetIosLobAppProvisioningConfigurations sets the iosLobAppProvisioningConfigurations property value. The IOS Lob App Provisioning Configurations. +func (m *DeviceAppManagement) SetIosLobAppProvisioningConfigurations(value []IosLobAppProvisioningConfigurationable)() { + m.iosLobAppProvisioningConfigurations = value +} +// SetIosManagedAppProtections sets the iosManagedAppProtections property value. iOS managed app policies. +func (m *DeviceAppManagement) SetIosManagedAppProtections(value []IosManagedAppProtectionable)() { + m.iosManagedAppProtections = value +} +// SetIsEnabledForMicrosoftStoreForBusiness sets the isEnabledForMicrosoftStoreForBusiness property value. Whether the account is enabled for syncing applications from the Microsoft Store for Business. +func (m *DeviceAppManagement) SetIsEnabledForMicrosoftStoreForBusiness(value *bool)() { + m.isEnabledForMicrosoftStoreForBusiness = value +} +// SetManagedAppPolicies sets the managedAppPolicies property value. Managed app policies. +func (m *DeviceAppManagement) SetManagedAppPolicies(value []ManagedAppPolicyable)() { + m.managedAppPolicies = value +} +// SetManagedAppRegistrations sets the managedAppRegistrations property value. The managed app registrations. +func (m *DeviceAppManagement) SetManagedAppRegistrations(value []ManagedAppRegistrationable)() { + m.managedAppRegistrations = value +} +// SetManagedAppStatuses sets the managedAppStatuses property value. The managed app statuses. +func (m *DeviceAppManagement) SetManagedAppStatuses(value []ManagedAppStatusable)() { + m.managedAppStatuses = value +} +// SetManagedEBookCategories sets the managedEBookCategories property value. The mobile eBook categories. +func (m *DeviceAppManagement) SetManagedEBookCategories(value []ManagedEBookCategoryable)() { + m.managedEBookCategories = value +} +// SetManagedEBooks sets the managedEBooks property value. The Managed eBook. +func (m *DeviceAppManagement) SetManagedEBooks(value []ManagedEBookable)() { + m.managedEBooks = value +} +// SetMdmWindowsInformationProtectionPolicies sets the mdmWindowsInformationProtectionPolicies property value. Windows information protection for apps running on devices which are MDM enrolled. +func (m *DeviceAppManagement) SetMdmWindowsInformationProtectionPolicies(value []MdmWindowsInformationProtectionPolicyable)() { + m.mdmWindowsInformationProtectionPolicies = value +} +// SetMicrosoftStoreForBusinessLanguage sets the microsoftStoreForBusinessLanguage property value. The locale information used to sync applications from the Microsoft Store for Business. Cultures that are specific to a country/region. The names of these cultures follow RFC 4646 (Windows Vista and later). The format is -, where is a lowercase two-letter code derived from ISO 639-1 and is an uppercase two-letter code derived from ISO 3166. For example, en-US for English (United States) is a specific culture. +func (m *DeviceAppManagement) SetMicrosoftStoreForBusinessLanguage(value *string)() { + m.microsoftStoreForBusinessLanguage = value +} +// SetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime sets the microsoftStoreForBusinessLastCompletedApplicationSyncTime property value. The last time an application sync from the Microsoft Store for Business was completed. +func (m *DeviceAppManagement) SetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.microsoftStoreForBusinessLastCompletedApplicationSyncTime = value +} +// SetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime sets the microsoftStoreForBusinessLastSuccessfulSyncDateTime property value. The last time the apps from the Microsoft Store for Business were synced successfully for the account. +func (m *DeviceAppManagement) SetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.microsoftStoreForBusinessLastSuccessfulSyncDateTime = value +} +// SetMicrosoftStoreForBusinessPortalSelection sets the microsoftStoreForBusinessPortalSelection property value. Portal to which admin syncs available Microsoft Store for Business apps. This is available in the Intune Admin Console. +func (m *DeviceAppManagement) SetMicrosoftStoreForBusinessPortalSelection(value *MicrosoftStoreForBusinessPortalSelectionOptions)() { + m.microsoftStoreForBusinessPortalSelection = value +} +// SetMobileAppCategories sets the mobileAppCategories property value. The mobile app categories. +func (m *DeviceAppManagement) SetMobileAppCategories(value []MobileAppCategoryable)() { + m.mobileAppCategories = value +} +// SetMobileAppConfigurations sets the mobileAppConfigurations property value. The Managed Device Mobile Application Configurations. +func (m *DeviceAppManagement) SetMobileAppConfigurations(value []ManagedDeviceMobileAppConfigurationable)() { + m.mobileAppConfigurations = value +} +// SetMobileApps sets the mobileApps property value. The mobile apps. +func (m *DeviceAppManagement) SetMobileApps(value []MobileAppable)() { + m.mobileApps = value +} +// SetPolicySets sets the policySets property value. The PolicySet of Policies and Applications +func (m *DeviceAppManagement) SetPolicySets(value []PolicySetable)() { + m.policySets = value +} +// SetSymantecCodeSigningCertificate sets the symantecCodeSigningCertificate property value. The WinPhone Symantec Code Signing Certificate. +func (m *DeviceAppManagement) SetSymantecCodeSigningCertificate(value SymantecCodeSigningCertificateable)() { + m.symantecCodeSigningCertificate = value +} +// SetTargetedManagedAppConfigurations sets the targetedManagedAppConfigurations property value. Targeted managed app configurations. +func (m *DeviceAppManagement) SetTargetedManagedAppConfigurations(value []TargetedManagedAppConfigurationable)() { + m.targetedManagedAppConfigurations = value +} +// SetVppTokens sets the vppTokens property value. List of Vpp tokens for this organization. +func (m *DeviceAppManagement) SetVppTokens(value []VppTokenable)() { + m.vppTokens = value +} +// SetWdacSupplementalPolicies sets the wdacSupplementalPolicies property value. The collection of Windows Defender Application Control Supplemental Policies. +func (m *DeviceAppManagement) SetWdacSupplementalPolicies(value []WindowsDefenderApplicationControlSupplementalPolicyable)() { + m.wdacSupplementalPolicies = value +} +// SetWindowsInformationProtectionDeviceRegistrations sets the windowsInformationProtectionDeviceRegistrations property value. Windows information protection device registrations that are not MDM enrolled. +func (m *DeviceAppManagement) SetWindowsInformationProtectionDeviceRegistrations(value []WindowsInformationProtectionDeviceRegistrationable)() { + m.windowsInformationProtectionDeviceRegistrations = value +} +// SetWindowsInformationProtectionPolicies sets the windowsInformationProtectionPolicies property value. Windows information protection for apps running on devices which are not MDM enrolled. +func (m *DeviceAppManagement) SetWindowsInformationProtectionPolicies(value []WindowsInformationProtectionPolicyable)() { + m.windowsInformationProtectionPolicies = value +} +// SetWindowsInformationProtectionWipeActions sets the windowsInformationProtectionWipeActions property value. Windows information protection wipe actions. +func (m *DeviceAppManagement) SetWindowsInformationProtectionWipeActions(value []WindowsInformationProtectionWipeActionable)() { + m.windowsInformationProtectionWipeActions = value +} +// SetWindowsManagedAppProtections sets the windowsManagedAppProtections property value. Windows managed app policies. +func (m *DeviceAppManagement) SetWindowsManagedAppProtections(value []WindowsManagedAppProtectionable)() { + m.windowsManagedAppProtections = value +} +// SetWindowsManagementApp sets the windowsManagementApp property value. Windows management app. +func (m *DeviceAppManagement) SetWindowsManagementApp(value WindowsManagementAppable)() { + m.windowsManagementApp = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_management_task.go b/src/internal/connector/graph/betasdk/models/device_app_management_task.go new file mode 100644 index 000000000..850ae85bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task.go @@ -0,0 +1,320 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagementTask a device app management task. +type DeviceAppManagementTask struct { + Entity + // The name or email of the admin this task is assigned to. + assignedTo *string + // Device app management task category. + category *DeviceAppManagementTaskCategory + // The created date. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The email address of the creator. + creator *string + // Notes from the creator. + creatorNotes *string + // The description. + description *string + // The name. + displayName *string + // The due date. + dueDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device app management task priority. + priority *DeviceAppManagementTaskPriority + // Device app management task status. + status *DeviceAppManagementTaskStatus +} +// NewDeviceAppManagementTask instantiates a new deviceAppManagementTask and sets the default values. +func NewDeviceAppManagementTask()(*DeviceAppManagementTask) { + m := &DeviceAppManagementTask{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceAppManagementTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAppManagementTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.appVulnerabilityTask": + return NewAppVulnerabilityTask(), nil + case "#microsoft.graph.securityConfigurationTask": + return NewSecurityConfigurationTask(), nil + case "#microsoft.graph.unmanagedDeviceDiscoveryTask": + return NewUnmanagedDeviceDiscoveryTask(), nil + } + } + } + } + return NewDeviceAppManagementTask(), nil +} +// GetAssignedTo gets the assignedTo property value. The name or email of the admin this task is assigned to. +func (m *DeviceAppManagementTask) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetCategory gets the category property value. Device app management task category. +func (m *DeviceAppManagementTask) GetCategory()(*DeviceAppManagementTaskCategory) { + return m.category +} +// GetCreatedDateTime gets the createdDateTime property value. The created date. +func (m *DeviceAppManagementTask) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreator gets the creator property value. The email address of the creator. +func (m *DeviceAppManagementTask) GetCreator()(*string) { + return m.creator +} +// GetCreatorNotes gets the creatorNotes property value. Notes from the creator. +func (m *DeviceAppManagementTask) GetCreatorNotes()(*string) { + return m.creatorNotes +} +// GetDescription gets the description property value. The description. +func (m *DeviceAppManagementTask) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name. +func (m *DeviceAppManagementTask) GetDisplayName()(*string) { + return m.displayName +} +// GetDueDateTime gets the dueDateTime property value. The due date. +func (m *DeviceAppManagementTask) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dueDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAppManagementTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAppManagementTaskCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*DeviceAppManagementTaskCategory)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreator(val) + } + return nil + } + res["creatorNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatorNotes(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAppManagementTaskPriority) + if err != nil { + return err + } + if val != nil { + m.SetPriority(val.(*DeviceAppManagementTaskPriority)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAppManagementTaskStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DeviceAppManagementTaskStatus)) + } + return nil + } + return res +} +// GetPriority gets the priority property value. Device app management task priority. +func (m *DeviceAppManagementTask) GetPriority()(*DeviceAppManagementTaskPriority) { + return m.priority +} +// GetStatus gets the status property value. Device app management task status. +func (m *DeviceAppManagementTask) GetStatus()(*DeviceAppManagementTaskStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DeviceAppManagementTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("creator", m.GetCreator()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("creatorNotes", m.GetCreatorNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + if m.GetPriority() != nil { + cast := (*m.GetPriority()).String() + err = writer.WriteStringValue("priority", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The name or email of the admin this task is assigned to. +func (m *DeviceAppManagementTask) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetCategory sets the category property value. Device app management task category. +func (m *DeviceAppManagementTask) SetCategory(value *DeviceAppManagementTaskCategory)() { + m.category = value +} +// SetCreatedDateTime sets the createdDateTime property value. The created date. +func (m *DeviceAppManagementTask) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreator sets the creator property value. The email address of the creator. +func (m *DeviceAppManagementTask) SetCreator(value *string)() { + m.creator = value +} +// SetCreatorNotes sets the creatorNotes property value. Notes from the creator. +func (m *DeviceAppManagementTask) SetCreatorNotes(value *string)() { + m.creatorNotes = value +} +// SetDescription sets the description property value. The description. +func (m *DeviceAppManagementTask) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name. +func (m *DeviceAppManagementTask) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDueDateTime sets the dueDateTime property value. The due date. +func (m *DeviceAppManagementTask) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dueDateTime = value +} +// SetPriority sets the priority property value. Device app management task priority. +func (m *DeviceAppManagementTask) SetPriority(value *DeviceAppManagementTaskPriority)() { + m.priority = value +} +// SetStatus sets the status property value. Device app management task status. +func (m *DeviceAppManagementTask) SetStatus(value *DeviceAppManagementTaskStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_management_task_category.go b/src/internal/connector/graph/betasdk/models/device_app_management_task_category.go new file mode 100644 index 000000000..43954db0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task_category.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceAppManagementTaskCategory int + +const ( + // Unknown source. + UNKNOWN_DEVICEAPPMANAGEMENTTASKCATEGORY DeviceAppManagementTaskCategory = iota + // Windows Defender ATP Threat & Vulnerability Management. + ADVANCEDTHREATPROTECTION_DEVICEAPPMANAGEMENTTASKCATEGORY +) + +func (i DeviceAppManagementTaskCategory) String() string { + return []string{"unknown", "advancedThreatProtection"}[i] +} +func ParseDeviceAppManagementTaskCategory(v string) (interface{}, error) { + result := UNKNOWN_DEVICEAPPMANAGEMENTTASKCATEGORY + switch v { + case "unknown": + result = UNKNOWN_DEVICEAPPMANAGEMENTTASKCATEGORY + case "advancedThreatProtection": + result = ADVANCEDTHREATPROTECTION_DEVICEAPPMANAGEMENTTASKCATEGORY + default: + return 0, errors.New("Unknown DeviceAppManagementTaskCategory value: " + v) + } + return &result, nil +} +func SerializeDeviceAppManagementTaskCategory(values []DeviceAppManagementTaskCategory) []string { + 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/device_app_management_task_collection_response.go b/src/internal/connector/graph/betasdk/models/device_app_management_task_collection_response.go new file mode 100644 index 000000000..7f3e4beba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagementTaskCollectionResponse +type DeviceAppManagementTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceAppManagementTaskable +} +// NewDeviceAppManagementTaskCollectionResponse instantiates a new DeviceAppManagementTaskCollectionResponse and sets the default values. +func NewDeviceAppManagementTaskCollectionResponse()(*DeviceAppManagementTaskCollectionResponse) { + m := &DeviceAppManagementTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceAppManagementTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceAppManagementTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceAppManagementTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceAppManagementTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAppManagementTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAppManagementTaskable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAppManagementTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceAppManagementTaskCollectionResponse) GetValue()([]DeviceAppManagementTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceAppManagementTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceAppManagementTaskCollectionResponse) SetValue(value []DeviceAppManagementTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_management_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_app_management_task_collection_responseable.go new file mode 100644 index 000000000..a70ef1c4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagementTaskCollectionResponseable +type DeviceAppManagementTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceAppManagementTaskable) + SetValue(value []DeviceAppManagementTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_management_task_priority.go b/src/internal/connector/graph/betasdk/models/device_app_management_task_priority.go new file mode 100644 index 000000000..b9638d93b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task_priority.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceAppManagementTaskPriority int + +const ( + // No priority set. + NONE_DEVICEAPPMANAGEMENTTASKPRIORITY DeviceAppManagementTaskPriority = iota + // High priority. + HIGH_DEVICEAPPMANAGEMENTTASKPRIORITY + // Low priority. + LOW_DEVICEAPPMANAGEMENTTASKPRIORITY +) + +func (i DeviceAppManagementTaskPriority) String() string { + return []string{"none", "high", "low"}[i] +} +func ParseDeviceAppManagementTaskPriority(v string) (interface{}, error) { + result := NONE_DEVICEAPPMANAGEMENTTASKPRIORITY + switch v { + case "none": + result = NONE_DEVICEAPPMANAGEMENTTASKPRIORITY + case "high": + result = HIGH_DEVICEAPPMANAGEMENTTASKPRIORITY + case "low": + result = LOW_DEVICEAPPMANAGEMENTTASKPRIORITY + default: + return 0, errors.New("Unknown DeviceAppManagementTaskPriority value: " + v) + } + return &result, nil +} +func SerializeDeviceAppManagementTaskPriority(values []DeviceAppManagementTaskPriority) []string { + 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/device_app_management_task_status.go b/src/internal/connector/graph/betasdk/models/device_app_management_task_status.go new file mode 100644 index 000000000..6673d74e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_task_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceAppManagementTaskStatus int + +const ( + // State is undefined. + UNKNOWN_DEVICEAPPMANAGEMENTTASKSTATUS DeviceAppManagementTaskStatus = iota + // The task is ready for review. + PENDING_DEVICEAPPMANAGEMENTTASKSTATUS + // The task has been accepted and is being worked on. + ACTIVE_DEVICEAPPMANAGEMENTTASKSTATUS + // The work is complete. + COMPLETED_DEVICEAPPMANAGEMENTTASKSTATUS + // The task was rejected. + REJECTED_DEVICEAPPMANAGEMENTTASKSTATUS +) + +func (i DeviceAppManagementTaskStatus) String() string { + return []string{"unknown", "pending", "active", "completed", "rejected"}[i] +} +func ParseDeviceAppManagementTaskStatus(v string) (interface{}, error) { + result := UNKNOWN_DEVICEAPPMANAGEMENTTASKSTATUS + switch v { + case "unknown": + result = UNKNOWN_DEVICEAPPMANAGEMENTTASKSTATUS + case "pending": + result = PENDING_DEVICEAPPMANAGEMENTTASKSTATUS + case "active": + result = ACTIVE_DEVICEAPPMANAGEMENTTASKSTATUS + case "completed": + result = COMPLETED_DEVICEAPPMANAGEMENTTASKSTATUS + case "rejected": + result = REJECTED_DEVICEAPPMANAGEMENTTASKSTATUS + default: + return 0, errors.New("Unknown DeviceAppManagementTaskStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceAppManagementTaskStatus(values []DeviceAppManagementTaskStatus) []string { + 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/device_app_management_taskable.go b/src/internal/connector/graph/betasdk/models/device_app_management_taskable.go new file mode 100644 index 000000000..2e0854768 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_management_taskable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagementTaskable +type DeviceAppManagementTaskable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetCategory()(*DeviceAppManagementTaskCategory) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreator()(*string) + GetCreatorNotes()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPriority()(*DeviceAppManagementTaskPriority) + GetStatus()(*DeviceAppManagementTaskStatus) + SetAssignedTo(value *string)() + SetCategory(value *DeviceAppManagementTaskCategory)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreator(value *string)() + SetCreatorNotes(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPriority(value *DeviceAppManagementTaskPriority)() + SetStatus(value *DeviceAppManagementTaskStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_app_managementable.go b/src/internal/connector/graph/betasdk/models/device_app_managementable.go new file mode 100644 index 000000000..ceeedd770 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_app_managementable.go @@ -0,0 +1,72 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceAppManagementable +type DeviceAppManagementable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidManagedAppProtections()([]AndroidManagedAppProtectionable) + GetDefaultManagedAppProtections()([]DefaultManagedAppProtectionable) + GetDeviceAppManagementTasks()([]DeviceAppManagementTaskable) + GetEnterpriseCodeSigningCertificates()([]EnterpriseCodeSigningCertificateable) + GetIosLobAppProvisioningConfigurations()([]IosLobAppProvisioningConfigurationable) + GetIosManagedAppProtections()([]IosManagedAppProtectionable) + GetIsEnabledForMicrosoftStoreForBusiness()(*bool) + GetManagedAppPolicies()([]ManagedAppPolicyable) + GetManagedAppRegistrations()([]ManagedAppRegistrationable) + GetManagedAppStatuses()([]ManagedAppStatusable) + GetManagedEBookCategories()([]ManagedEBookCategoryable) + GetManagedEBooks()([]ManagedEBookable) + GetMdmWindowsInformationProtectionPolicies()([]MdmWindowsInformationProtectionPolicyable) + GetMicrosoftStoreForBusinessLanguage()(*string) + GetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMicrosoftStoreForBusinessPortalSelection()(*MicrosoftStoreForBusinessPortalSelectionOptions) + GetMobileAppCategories()([]MobileAppCategoryable) + GetMobileAppConfigurations()([]ManagedDeviceMobileAppConfigurationable) + GetMobileApps()([]MobileAppable) + GetPolicySets()([]PolicySetable) + GetSymantecCodeSigningCertificate()(SymantecCodeSigningCertificateable) + GetTargetedManagedAppConfigurations()([]TargetedManagedAppConfigurationable) + GetVppTokens()([]VppTokenable) + GetWdacSupplementalPolicies()([]WindowsDefenderApplicationControlSupplementalPolicyable) + GetWindowsInformationProtectionDeviceRegistrations()([]WindowsInformationProtectionDeviceRegistrationable) + GetWindowsInformationProtectionPolicies()([]WindowsInformationProtectionPolicyable) + GetWindowsInformationProtectionWipeActions()([]WindowsInformationProtectionWipeActionable) + GetWindowsManagedAppProtections()([]WindowsManagedAppProtectionable) + GetWindowsManagementApp()(WindowsManagementAppable) + SetAndroidManagedAppProtections(value []AndroidManagedAppProtectionable)() + SetDefaultManagedAppProtections(value []DefaultManagedAppProtectionable)() + SetDeviceAppManagementTasks(value []DeviceAppManagementTaskable)() + SetEnterpriseCodeSigningCertificates(value []EnterpriseCodeSigningCertificateable)() + SetIosLobAppProvisioningConfigurations(value []IosLobAppProvisioningConfigurationable)() + SetIosManagedAppProtections(value []IosManagedAppProtectionable)() + SetIsEnabledForMicrosoftStoreForBusiness(value *bool)() + SetManagedAppPolicies(value []ManagedAppPolicyable)() + SetManagedAppRegistrations(value []ManagedAppRegistrationable)() + SetManagedAppStatuses(value []ManagedAppStatusable)() + SetManagedEBookCategories(value []ManagedEBookCategoryable)() + SetManagedEBooks(value []ManagedEBookable)() + SetMdmWindowsInformationProtectionPolicies(value []MdmWindowsInformationProtectionPolicyable)() + SetMicrosoftStoreForBusinessLanguage(value *string)() + SetMicrosoftStoreForBusinessLastCompletedApplicationSyncTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMicrosoftStoreForBusinessLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMicrosoftStoreForBusinessPortalSelection(value *MicrosoftStoreForBusinessPortalSelectionOptions)() + SetMobileAppCategories(value []MobileAppCategoryable)() + SetMobileAppConfigurations(value []ManagedDeviceMobileAppConfigurationable)() + SetMobileApps(value []MobileAppable)() + SetPolicySets(value []PolicySetable)() + SetSymantecCodeSigningCertificate(value SymantecCodeSigningCertificateable)() + SetTargetedManagedAppConfigurations(value []TargetedManagedAppConfigurationable)() + SetVppTokens(value []VppTokenable)() + SetWdacSupplementalPolicies(value []WindowsDefenderApplicationControlSupplementalPolicyable)() + SetWindowsInformationProtectionDeviceRegistrations(value []WindowsInformationProtectionDeviceRegistrationable)() + SetWindowsInformationProtectionPolicies(value []WindowsInformationProtectionPolicyable)() + SetWindowsInformationProtectionWipeActions(value []WindowsInformationProtectionWipeActionable)() + SetWindowsManagedAppProtections(value []WindowsManagedAppProtectionable)() + SetWindowsManagementApp(value WindowsManagementAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_category.go b/src/internal/connector/graph/betasdk/models/device_category.go new file mode 100644 index 000000000..3bbb1ff9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_category.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCategory +type DeviceCategory struct { + Entity + // Optional description for the device category. + description *string + // Display name for the device category. + displayName *string + // Optional role scope tags for the device category. + roleScopeTagIds []string +} +// NewDeviceCategory instantiates a new deviceCategory and sets the default values. +func NewDeviceCategory()(*DeviceCategory) { + m := &DeviceCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCategory(), nil +} +// GetDescription gets the description property value. Optional description for the device category. +func (m *DeviceCategory) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for the device category. +func (m *DeviceCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + return res +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. Optional role scope tags for the device category. +func (m *DeviceCategory) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// Serialize serializes information the current object +func (m *DeviceCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Optional description for the device category. +func (m *DeviceCategory) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for the device category. +func (m *DeviceCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. Optional role scope tags for the device category. +func (m *DeviceCategory) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_category_collection_response.go b/src/internal/connector/graph/betasdk/models/device_category_collection_response.go new file mode 100644 index 000000000..ea75ce7b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCategoryCollectionResponse +type DeviceCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCategoryable +} +// NewDeviceCategoryCollectionResponse instantiates a new DeviceCategoryCollectionResponse and sets the default values. +func NewDeviceCategoryCollectionResponse()(*DeviceCategoryCollectionResponse) { + m := &DeviceCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCategoryCollectionResponse) GetValue()([]DeviceCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCategoryCollectionResponse) SetValue(value []DeviceCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_category_collection_responseable.go new file mode 100644 index 000000000..40b34596f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCategoryCollectionResponseable +type DeviceCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCategoryable) + SetValue(value []DeviceCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_categoryable.go b/src/internal/connector/graph/betasdk/models/device_categoryable.go new file mode 100644 index 000000000..987f99802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_categoryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCategoryable +type DeviceCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetRoleScopeTagIds()([]string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetRoleScopeTagIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_collection_response.go b/src/internal/connector/graph/betasdk/models/device_collection_response.go new file mode 100644 index 000000000..baa4c9f47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCollectionResponse +type DeviceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Deviceable +} +// NewDeviceCollectionResponse instantiates a new DeviceCollectionResponse and sets the default values. +func NewDeviceCollectionResponse()(*DeviceCollectionResponse) { + m := &DeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Deviceable, len(val)) + for i, v := range val { + res[i] = v.(Deviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCollectionResponse) GetValue()([]Deviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCollectionResponse) SetValue(value []Deviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_collection_responseable.go new file mode 100644 index 000000000..f3d2dcc36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCollectionResponseable +type DeviceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Deviceable) + SetValue(value []Deviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration.go b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration.go new file mode 100644 index 000000000..2c2e8741c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComanagementAuthorityConfiguration +type DeviceComanagementAuthorityConfiguration struct { + DeviceEnrollmentConfiguration + // CoManagement Authority configuration ConfigurationManagerAgentCommandLineArgument + configurationManagerAgentCommandLineArgument *string + // CoManagement Authority configuration InstallConfigurationManagerAgent + installConfigurationManagerAgent *bool + // CoManagement Authority configuration ManagedDeviceAuthority + managedDeviceAuthority *int32 +} +// NewDeviceComanagementAuthorityConfiguration instantiates a new DeviceComanagementAuthorityConfiguration and sets the default values. +func NewDeviceComanagementAuthorityConfiguration()(*DeviceComanagementAuthorityConfiguration) { + m := &DeviceComanagementAuthorityConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceComanagementAuthorityConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceComanagementAuthorityConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComanagementAuthorityConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComanagementAuthorityConfiguration(), nil +} +// GetConfigurationManagerAgentCommandLineArgument gets the configurationManagerAgentCommandLineArgument property value. CoManagement Authority configuration ConfigurationManagerAgentCommandLineArgument +func (m *DeviceComanagementAuthorityConfiguration) GetConfigurationManagerAgentCommandLineArgument()(*string) { + return m.configurationManagerAgentCommandLineArgument +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComanagementAuthorityConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["configurationManagerAgentCommandLineArgument"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationManagerAgentCommandLineArgument(val) + } + return nil + } + res["installConfigurationManagerAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInstallConfigurationManagerAgent(val) + } + return nil + } + res["managedDeviceAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceAuthority(val) + } + return nil + } + return res +} +// GetInstallConfigurationManagerAgent gets the installConfigurationManagerAgent property value. CoManagement Authority configuration InstallConfigurationManagerAgent +func (m *DeviceComanagementAuthorityConfiguration) GetInstallConfigurationManagerAgent()(*bool) { + return m.installConfigurationManagerAgent +} +// GetManagedDeviceAuthority gets the managedDeviceAuthority property value. CoManagement Authority configuration ManagedDeviceAuthority +func (m *DeviceComanagementAuthorityConfiguration) GetManagedDeviceAuthority()(*int32) { + return m.managedDeviceAuthority +} +// Serialize serializes information the current object +func (m *DeviceComanagementAuthorityConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("configurationManagerAgentCommandLineArgument", m.GetConfigurationManagerAgentCommandLineArgument()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("installConfigurationManagerAgent", m.GetInstallConfigurationManagerAgent()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("managedDeviceAuthority", m.GetManagedDeviceAuthority()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationManagerAgentCommandLineArgument sets the configurationManagerAgentCommandLineArgument property value. CoManagement Authority configuration ConfigurationManagerAgentCommandLineArgument +func (m *DeviceComanagementAuthorityConfiguration) SetConfigurationManagerAgentCommandLineArgument(value *string)() { + m.configurationManagerAgentCommandLineArgument = value +} +// SetInstallConfigurationManagerAgent sets the installConfigurationManagerAgent property value. CoManagement Authority configuration InstallConfigurationManagerAgent +func (m *DeviceComanagementAuthorityConfiguration) SetInstallConfigurationManagerAgent(value *bool)() { + m.installConfigurationManagerAgent = value +} +// SetManagedDeviceAuthority sets the managedDeviceAuthority property value. CoManagement Authority configuration ManagedDeviceAuthority +func (m *DeviceComanagementAuthorityConfiguration) SetManagedDeviceAuthority(value *int32)() { + m.managedDeviceAuthority = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_response.go new file mode 100644 index 000000000..f3ef13a33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComanagementAuthorityConfigurationCollectionResponse +type DeviceComanagementAuthorityConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComanagementAuthorityConfigurationable +} +// NewDeviceComanagementAuthorityConfigurationCollectionResponse instantiates a new DeviceComanagementAuthorityConfigurationCollectionResponse and sets the default values. +func NewDeviceComanagementAuthorityConfigurationCollectionResponse()(*DeviceComanagementAuthorityConfigurationCollectionResponse) { + m := &DeviceComanagementAuthorityConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComanagementAuthorityConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComanagementAuthorityConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComanagementAuthorityConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComanagementAuthorityConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComanagementAuthorityConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComanagementAuthorityConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComanagementAuthorityConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComanagementAuthorityConfigurationCollectionResponse) GetValue()([]DeviceComanagementAuthorityConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComanagementAuthorityConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComanagementAuthorityConfigurationCollectionResponse) SetValue(value []DeviceComanagementAuthorityConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_responseable.go new file mode 100644 index 000000000..0a43ec4af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComanagementAuthorityConfigurationCollectionResponseable +type DeviceComanagementAuthorityConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComanagementAuthorityConfigurationable) + SetValue(value []DeviceComanagementAuthorityConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configurationable.go b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configurationable.go new file mode 100644 index 000000000..6f780b5d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_comanagement_authority_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComanagementAuthorityConfigurationable +type DeviceComanagementAuthorityConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationManagerAgentCommandLineArgument()(*string) + GetInstallConfigurationManagerAgent()(*bool) + GetManagedDeviceAuthority()(*int32) + SetConfigurationManagerAgentCommandLineArgument(value *string)() + SetInstallConfigurationManagerAgent(value *bool)() + SetManagedDeviceAuthority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_action_item.go b/src/internal/connector/graph/betasdk/models/device_compliance_action_item.go new file mode 100644 index 000000000..22e547da8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_action_item.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceActionItem scheduled Action Configuration +type DeviceComplianceActionItem struct { + Entity + // Scheduled Action Type Enum + actionType *DeviceComplianceActionType + // Number of hours to wait till the action will be enforced. Valid values 0 to 8760 + gracePeriodHours *int32 + // A list of group IDs to speicify who to CC this notification message to. + notificationMessageCCList []string + // What notification Message template to use + notificationTemplateId *string +} +// NewDeviceComplianceActionItem instantiates a new deviceComplianceActionItem and sets the default values. +func NewDeviceComplianceActionItem()(*DeviceComplianceActionItem) { + m := &DeviceComplianceActionItem{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceActionItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceActionItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceActionItem(), nil +} +// GetActionType gets the actionType property value. Scheduled Action Type Enum +func (m *DeviceComplianceActionItem) GetActionType()(*DeviceComplianceActionType) { + return m.actionType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceActionItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceComplianceActionType) + if err != nil { + return err + } + if val != nil { + m.SetActionType(val.(*DeviceComplianceActionType)) + } + return nil + } + res["gracePeriodHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodHours(val) + } + return nil + } + res["notificationMessageCCList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotificationMessageCCList(res) + } + return nil + } + res["notificationTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationTemplateId(val) + } + return nil + } + return res +} +// GetGracePeriodHours gets the gracePeriodHours property value. Number of hours to wait till the action will be enforced. Valid values 0 to 8760 +func (m *DeviceComplianceActionItem) GetGracePeriodHours()(*int32) { + return m.gracePeriodHours +} +// GetNotificationMessageCCList gets the notificationMessageCCList property value. A list of group IDs to speicify who to CC this notification message to. +func (m *DeviceComplianceActionItem) GetNotificationMessageCCList()([]string) { + return m.notificationMessageCCList +} +// GetNotificationTemplateId gets the notificationTemplateId property value. What notification Message template to use +func (m *DeviceComplianceActionItem) GetNotificationTemplateId()(*string) { + return m.notificationTemplateId +} +// Serialize serializes information the current object +func (m *DeviceComplianceActionItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActionType() != nil { + cast := (*m.GetActionType()).String() + err = writer.WriteStringValue("actionType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("gracePeriodHours", m.GetGracePeriodHours()) + if err != nil { + return err + } + } + if m.GetNotificationMessageCCList() != nil { + err = writer.WriteCollectionOfStringValues("notificationMessageCCList", m.GetNotificationMessageCCList()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notificationTemplateId", m.GetNotificationTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetActionType sets the actionType property value. Scheduled Action Type Enum +func (m *DeviceComplianceActionItem) SetActionType(value *DeviceComplianceActionType)() { + m.actionType = value +} +// SetGracePeriodHours sets the gracePeriodHours property value. Number of hours to wait till the action will be enforced. Valid values 0 to 8760 +func (m *DeviceComplianceActionItem) SetGracePeriodHours(value *int32)() { + m.gracePeriodHours = value +} +// SetNotificationMessageCCList sets the notificationMessageCCList property value. A list of group IDs to speicify who to CC this notification message to. +func (m *DeviceComplianceActionItem) SetNotificationMessageCCList(value []string)() { + m.notificationMessageCCList = value +} +// SetNotificationTemplateId sets the notificationTemplateId property value. What notification Message template to use +func (m *DeviceComplianceActionItem) SetNotificationTemplateId(value *string)() { + m.notificationTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_response.go new file mode 100644 index 000000000..da377aca4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceActionItemCollectionResponse +type DeviceComplianceActionItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceActionItemable +} +// NewDeviceComplianceActionItemCollectionResponse instantiates a new DeviceComplianceActionItemCollectionResponse and sets the default values. +func NewDeviceComplianceActionItemCollectionResponse()(*DeviceComplianceActionItemCollectionResponse) { + m := &DeviceComplianceActionItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceActionItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceActionItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceActionItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceActionItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceActionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceActionItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceActionItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceActionItemCollectionResponse) GetValue()([]DeviceComplianceActionItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceActionItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceActionItemCollectionResponse) SetValue(value []DeviceComplianceActionItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_responseable.go new file mode 100644 index 000000000..fd09a56eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_action_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceActionItemCollectionResponseable +type DeviceComplianceActionItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceActionItemable) + SetValue(value []DeviceComplianceActionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_action_itemable.go b/src/internal/connector/graph/betasdk/models/device_compliance_action_itemable.go new file mode 100644 index 000000000..c81cc5eb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_action_itemable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceActionItemable +type DeviceComplianceActionItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionType()(*DeviceComplianceActionType) + GetGracePeriodHours()(*int32) + GetNotificationMessageCCList()([]string) + GetNotificationTemplateId()(*string) + SetActionType(value *DeviceComplianceActionType)() + SetGracePeriodHours(value *int32)() + SetNotificationMessageCCList(value []string)() + SetNotificationTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_action_type.go b/src/internal/connector/graph/betasdk/models/device_compliance_action_type.go new file mode 100644 index 000000000..6431926ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_action_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceComplianceActionType int + +const ( + // No Action + NOACTION_DEVICECOMPLIANCEACTIONTYPE DeviceComplianceActionType = iota + // Send Notification + NOTIFICATION_DEVICECOMPLIANCEACTIONTYPE + // Block the device in AAD + BLOCK_DEVICECOMPLIANCEACTIONTYPE + // Retire the device + RETIRE_DEVICECOMPLIANCEACTIONTYPE + // Wipe the device + WIPE_DEVICECOMPLIANCEACTIONTYPE + // Remove Resource Access Profiles from the device + REMOVERESOURCEACCESSPROFILES_DEVICECOMPLIANCEACTIONTYPE + // Send push notification to device + PUSHNOTIFICATION_DEVICECOMPLIANCEACTIONTYPE + // Remotely lock the device + REMOTELOCK_DEVICECOMPLIANCEACTIONTYPE +) + +func (i DeviceComplianceActionType) String() string { + return []string{"noAction", "notification", "block", "retire", "wipe", "removeResourceAccessProfiles", "pushNotification", "remoteLock"}[i] +} +func ParseDeviceComplianceActionType(v string) (interface{}, error) { + result := NOACTION_DEVICECOMPLIANCEACTIONTYPE + switch v { + case "noAction": + result = NOACTION_DEVICECOMPLIANCEACTIONTYPE + case "notification": + result = NOTIFICATION_DEVICECOMPLIANCEACTIONTYPE + case "block": + result = BLOCK_DEVICECOMPLIANCEACTIONTYPE + case "retire": + result = RETIRE_DEVICECOMPLIANCEACTIONTYPE + case "wipe": + result = WIPE_DEVICECOMPLIANCEACTIONTYPE + case "removeResourceAccessProfiles": + result = REMOVERESOURCEACCESSPROFILES_DEVICECOMPLIANCEACTIONTYPE + case "pushNotification": + result = PUSHNOTIFICATION_DEVICECOMPLIANCEACTIONTYPE + case "remoteLock": + result = REMOTELOCK_DEVICECOMPLIANCEACTIONTYPE + default: + return 0, errors.New("Unknown DeviceComplianceActionType value: " + v) + } + return &result, nil +} +func SerializeDeviceComplianceActionType(values []DeviceComplianceActionType) []string { + 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/device_compliance_device_overview.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_overview.go new file mode 100644 index 000000000..51b547534 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_overview.go @@ -0,0 +1,269 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceOverview +type DeviceComplianceDeviceOverview struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of devices in conflict + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of failed devices + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable devices + notApplicableCount *int32 + // Number of not applicable devices due to mismatch platform and policy + notApplicablePlatformCount *int32 + // Number of pending devices + pendingCount *int32 + // Number of succeeded devices + successCount *int32 +} +// NewDeviceComplianceDeviceOverview instantiates a new deviceComplianceDeviceOverview and sets the default values. +func NewDeviceComplianceDeviceOverview()(*DeviceComplianceDeviceOverview) { + m := &DeviceComplianceDeviceOverview{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceDeviceOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceDeviceOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceDeviceOverview(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceComplianceDeviceOverview) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of devices in conflict +func (m *DeviceComplianceDeviceOverview) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *DeviceComplianceDeviceOverview) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed devices +func (m *DeviceComplianceDeviceOverview) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceDeviceOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["notApplicablePlatformCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicablePlatformCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *DeviceComplianceDeviceOverview) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceComplianceDeviceOverview) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetNotApplicablePlatformCount gets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceComplianceDeviceOverview) GetNotApplicablePlatformCount()(*int32) { + return m.notApplicablePlatformCount +} +// GetPendingCount gets the pendingCount property value. Number of pending devices +func (m *DeviceComplianceDeviceOverview) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded devices +func (m *DeviceComplianceDeviceOverview) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceComplianceDeviceOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicablePlatformCount", m.GetNotApplicablePlatformCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceComplianceDeviceOverview) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of devices in conflict +func (m *DeviceComplianceDeviceOverview) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *DeviceComplianceDeviceOverview) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed devices +func (m *DeviceComplianceDeviceOverview) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *DeviceComplianceDeviceOverview) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceComplianceDeviceOverview) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetNotApplicablePlatformCount sets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceComplianceDeviceOverview) SetNotApplicablePlatformCount(value *int32)() { + m.notApplicablePlatformCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending devices +func (m *DeviceComplianceDeviceOverview) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded devices +func (m *DeviceComplianceDeviceOverview) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_device_overviewable.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_overviewable.go new file mode 100644 index 000000000..56072cf19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_overviewable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceOverviewable +type DeviceComplianceDeviceOverviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetNotApplicablePlatformCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetNotApplicablePlatformCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_device_status.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_status.go new file mode 100644 index 000000000..9a4c8c047 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_status.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceComplianceDeviceStatus struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name of the DevicePolicyStatus. + deviceDisplayName *string + // The device model that is being reported + deviceModel *string + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Platform of the device that is being reported + platform *int32 + // The status property + status *ComplianceStatus + // The User Name that is being reported + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceComplianceDeviceStatus instantiates a new deviceComplianceDeviceStatus and sets the default values. +func NewDeviceComplianceDeviceStatus()(*DeviceComplianceDeviceStatus) { + m := &DeviceComplianceDeviceStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceDeviceStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceDeviceStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceDeviceStatus(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceComplianceDeviceStatus) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *DeviceComplianceDeviceStatus) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *DeviceComplianceDeviceStatus) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceDeviceStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceComplianceDeviceStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetPlatform gets the platform property value. Platform of the device that is being reported +func (m *DeviceComplianceDeviceStatus) GetPlatform()(*int32) { + return m.platform +} +// GetStatus gets the status property value. The status property +func (m *DeviceComplianceDeviceStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *DeviceComplianceDeviceStatus) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceComplianceDeviceStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceComplianceDeviceStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("platform", m.GetPlatform()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceComplianceDeviceStatus) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *DeviceComplianceDeviceStatus) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *DeviceComplianceDeviceStatus) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceComplianceDeviceStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetPlatform sets the platform property value. Platform of the device that is being reported +func (m *DeviceComplianceDeviceStatus) SetPlatform(value *int32)() { + m.platform = value +} +// SetStatus sets the status property value. The status property +func (m *DeviceComplianceDeviceStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *DeviceComplianceDeviceStatus) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceComplianceDeviceStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_response.go new file mode 100644 index 000000000..69d93c797 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceStatusCollectionResponse +type DeviceComplianceDeviceStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceDeviceStatusable +} +// NewDeviceComplianceDeviceStatusCollectionResponse instantiates a new DeviceComplianceDeviceStatusCollectionResponse and sets the default values. +func NewDeviceComplianceDeviceStatusCollectionResponse()(*DeviceComplianceDeviceStatusCollectionResponse) { + m := &DeviceComplianceDeviceStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceDeviceStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceDeviceStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceDeviceStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceDeviceStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceDeviceStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceDeviceStatusCollectionResponse) GetValue()([]DeviceComplianceDeviceStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceDeviceStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceDeviceStatusCollectionResponse) SetValue(value []DeviceComplianceDeviceStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_responseable.go new file mode 100644 index 000000000..e7e37518a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceStatusCollectionResponseable +type DeviceComplianceDeviceStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceDeviceStatusable) + SetValue(value []DeviceComplianceDeviceStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_device_statusable.go b/src/internal/connector/graph/betasdk/models/device_compliance_device_statusable.go new file mode 100644 index 000000000..683926c63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_device_statusable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceDeviceStatusable +type DeviceComplianceDeviceStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceDisplayName()(*string) + GetDeviceModel()(*string) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*int32) + GetStatus()(*ComplianceStatus) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceDisplayName(value *string)() + SetDeviceModel(value *string)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *int32)() + SetStatus(value *ComplianceStatus)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy.go new file mode 100644 index 000000000..72af595ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy.go @@ -0,0 +1,457 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicy this is the base class for Compliance policy. Compliance policies are platform specific and individual per-platform compliance policies inherit from here. +type DeviceCompliancePolicy struct { + Entity + // The collection of assignments for this compliance policy. + assignments []DeviceCompliancePolicyAssignmentable + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the Device Configuration. + description *string + // Compliance Setting State Device Summary + deviceSettingStateSummaries []SettingStateDeviceSummaryable + // List of DeviceComplianceDeviceStatus. + deviceStatuses []DeviceComplianceDeviceStatusable + // Device compliance devices status overview + deviceStatusOverview DeviceComplianceDeviceOverviewable + // Admin provided name of the device configuration. + displayName *string + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // The list of scheduled action for this rule + scheduledActionsForRule []DeviceComplianceScheduledActionForRuleable + // List of DeviceComplianceUserStatus. + userStatuses []DeviceComplianceUserStatusable + // Device compliance users status overview + userStatusOverview DeviceComplianceUserOverviewable + // Version of the device configuration. + version *int32 +} +// NewDeviceCompliancePolicy instantiates a new deviceCompliancePolicy and sets the default values. +func NewDeviceCompliancePolicy()(*DeviceCompliancePolicy) { + m := &DeviceCompliancePolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidCompliancePolicy": + return NewAndroidCompliancePolicy(), nil + case "#microsoft.graph.androidDeviceOwnerCompliancePolicy": + return NewAndroidDeviceOwnerCompliancePolicy(), nil + case "#microsoft.graph.androidForWorkCompliancePolicy": + return NewAndroidForWorkCompliancePolicy(), nil + case "#microsoft.graph.androidWorkProfileCompliancePolicy": + return NewAndroidWorkProfileCompliancePolicy(), nil + case "#microsoft.graph.aospDeviceOwnerCompliancePolicy": + return NewAospDeviceOwnerCompliancePolicy(), nil + case "#microsoft.graph.defaultDeviceCompliancePolicy": + return NewDefaultDeviceCompliancePolicy(), nil + case "#microsoft.graph.iosCompliancePolicy": + return NewIosCompliancePolicy(), nil + case "#microsoft.graph.macOSCompliancePolicy": + return NewMacOSCompliancePolicy(), nil + case "#microsoft.graph.windows10CompliancePolicy": + return NewWindows10CompliancePolicy(), nil + case "#microsoft.graph.windows10MobileCompliancePolicy": + return NewWindows10MobileCompliancePolicy(), nil + case "#microsoft.graph.windows81CompliancePolicy": + return NewWindows81CompliancePolicy(), nil + case "#microsoft.graph.windowsPhone81CompliancePolicy": + return NewWindowsPhone81CompliancePolicy(), nil + } + } + } + } + return NewDeviceCompliancePolicy(), nil +} +// GetAssignments gets the assignments property value. The collection of assignments for this compliance policy. +func (m *DeviceCompliancePolicy) GetAssignments()([]DeviceCompliancePolicyAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *DeviceCompliancePolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceCompliancePolicy) GetDescription()(*string) { + return m.description +} +// GetDeviceSettingStateSummaries gets the deviceSettingStateSummaries property value. Compliance Setting State Device Summary +func (m *DeviceCompliancePolicy) GetDeviceSettingStateSummaries()([]SettingStateDeviceSummaryable) { + return m.deviceSettingStateSummaries +} +// GetDeviceStatuses gets the deviceStatuses property value. List of DeviceComplianceDeviceStatus. +func (m *DeviceCompliancePolicy) GetDeviceStatuses()([]DeviceComplianceDeviceStatusable) { + return m.deviceStatuses +} +// GetDeviceStatusOverview gets the deviceStatusOverview property value. Device compliance devices status overview +func (m *DeviceCompliancePolicy) GetDeviceStatusOverview()(DeviceComplianceDeviceOverviewable) { + return m.deviceStatusOverview +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceCompliancePolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceSettingStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingStateDeviceSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingStateDeviceSummaryable, len(val)) + for i, v := range val { + res[i] = v.(SettingStateDeviceSummaryable) + } + m.SetDeviceSettingStateSummaries(res) + } + return nil + } + res["deviceStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceDeviceStatusable) + } + m.SetDeviceStatuses(res) + } + return nil + } + res["deviceStatusOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceComplianceDeviceOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStatusOverview(val.(DeviceComplianceDeviceOverviewable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["scheduledActionsForRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScheduledActionForRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScheduledActionForRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScheduledActionForRuleable) + } + m.SetScheduledActionsForRule(res) + } + return nil + } + res["userStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceUserStatusable) + } + m.SetUserStatuses(res) + } + return nil + } + res["userStatusOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceComplianceUserOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserStatusOverview(val.(DeviceComplianceUserOverviewable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceCompliancePolicy) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceCompliancePolicy) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetScheduledActionsForRule gets the scheduledActionsForRule property value. The list of scheduled action for this rule +func (m *DeviceCompliancePolicy) GetScheduledActionsForRule()([]DeviceComplianceScheduledActionForRuleable) { + return m.scheduledActionsForRule +} +// GetUserStatuses gets the userStatuses property value. List of DeviceComplianceUserStatus. +func (m *DeviceCompliancePolicy) GetUserStatuses()([]DeviceComplianceUserStatusable) { + return m.userStatuses +} +// GetUserStatusOverview gets the userStatusOverview property value. Device compliance users status overview +func (m *DeviceCompliancePolicy) GetUserStatusOverview()(DeviceComplianceUserOverviewable) { + return m.userStatusOverview +} +// GetVersion gets the version property value. Version of the device configuration. +func (m *DeviceCompliancePolicy) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceSettingStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceSettingStateSummaries())) + for i, v := range m.GetDeviceSettingStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceSettingStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStatuses())) + for i, v := range m.GetDeviceStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceStatusOverview", m.GetDeviceStatusOverview()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetScheduledActionsForRule() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScheduledActionsForRule())) + for i, v := range m.GetScheduledActionsForRule() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scheduledActionsForRule", cast) + if err != nil { + return err + } + } + if m.GetUserStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStatuses())) + for i, v := range m.GetUserStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userStatusOverview", m.GetUserStatusOverview()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The collection of assignments for this compliance policy. +func (m *DeviceCompliancePolicy) SetAssignments(value []DeviceCompliancePolicyAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *DeviceCompliancePolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceCompliancePolicy) SetDescription(value *string)() { + m.description = value +} +// SetDeviceSettingStateSummaries sets the deviceSettingStateSummaries property value. Compliance Setting State Device Summary +func (m *DeviceCompliancePolicy) SetDeviceSettingStateSummaries(value []SettingStateDeviceSummaryable)() { + m.deviceSettingStateSummaries = value +} +// SetDeviceStatuses sets the deviceStatuses property value. List of DeviceComplianceDeviceStatus. +func (m *DeviceCompliancePolicy) SetDeviceStatuses(value []DeviceComplianceDeviceStatusable)() { + m.deviceStatuses = value +} +// SetDeviceStatusOverview sets the deviceStatusOverview property value. Device compliance devices status overview +func (m *DeviceCompliancePolicy) SetDeviceStatusOverview(value DeviceComplianceDeviceOverviewable)() { + m.deviceStatusOverview = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceCompliancePolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceCompliancePolicy) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceCompliancePolicy) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetScheduledActionsForRule sets the scheduledActionsForRule property value. The list of scheduled action for this rule +func (m *DeviceCompliancePolicy) SetScheduledActionsForRule(value []DeviceComplianceScheduledActionForRuleable)() { + m.scheduledActionsForRule = value +} +// SetUserStatuses sets the userStatuses property value. List of DeviceComplianceUserStatus. +func (m *DeviceCompliancePolicy) SetUserStatuses(value []DeviceComplianceUserStatusable)() { + m.userStatuses = value +} +// SetUserStatusOverview sets the userStatusOverview property value. Device compliance users status overview +func (m *DeviceCompliancePolicy) SetUserStatusOverview(value DeviceComplianceUserOverviewable)() { + m.userStatusOverview = value +} +// SetVersion sets the version property value. Version of the device configuration. +func (m *DeviceCompliancePolicy) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment.go new file mode 100644 index 000000000..fb78b0d73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyAssignment device compliance policy assignment. +type DeviceCompliancePolicyAssignment struct { + Entity + // Represents source of assignment. + source *DeviceAndAppManagementAssignmentSource + // The identifier of the source of the assignment. + sourceId *string + // Target for the compliance policy assignment. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceCompliancePolicyAssignment instantiates a new deviceCompliancePolicyAssignment and sets the default values. +func NewDeviceCompliancePolicyAssignment()(*DeviceCompliancePolicyAssignment) { + m := &DeviceCompliancePolicyAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicyAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*DeviceAndAppManagementAssignmentSource)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetSource gets the source property value. Represents source of assignment. +func (m *DeviceCompliancePolicyAssignment) GetSource()(*DeviceAndAppManagementAssignmentSource) { + return m.source +} +// GetSourceId gets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceCompliancePolicyAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. Target for the compliance policy assignment. +func (m *DeviceCompliancePolicyAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetSource sets the source property value. Represents source of assignment. +func (m *DeviceCompliancePolicyAssignment) SetSource(value *DeviceAndAppManagementAssignmentSource)() { + m.source = value +} +// SetSourceId sets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceCompliancePolicyAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. Target for the compliance policy assignment. +func (m *DeviceCompliancePolicyAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_response.go new file mode 100644 index 000000000..f08cbebd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyAssignmentCollectionResponse +type DeviceCompliancePolicyAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicyAssignmentable +} +// NewDeviceCompliancePolicyAssignmentCollectionResponse instantiates a new DeviceCompliancePolicyAssignmentCollectionResponse and sets the default values. +func NewDeviceCompliancePolicyAssignmentCollectionResponse()(*DeviceCompliancePolicyAssignmentCollectionResponse) { + m := &DeviceCompliancePolicyAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicyAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicyAssignmentCollectionResponse) GetValue()([]DeviceCompliancePolicyAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicyAssignmentCollectionResponse) SetValue(value []DeviceCompliancePolicyAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_responseable.go new file mode 100644 index 000000000..582131091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyAssignmentCollectionResponseable +type DeviceCompliancePolicyAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicyAssignmentable) + SetValue(value []DeviceCompliancePolicyAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignmentable.go new file mode 100644 index 000000000..6cbbc98fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyAssignmentable +type DeviceCompliancePolicyAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSource()(*DeviceAndAppManagementAssignmentSource) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetSource(value *DeviceAndAppManagementAssignmentSource)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_response.go new file mode 100644 index 000000000..c8fec62ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyCollectionResponse +type DeviceCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicyable +} +// NewDeviceCompliancePolicyCollectionResponse instantiates a new DeviceCompliancePolicyCollectionResponse and sets the default values. +func NewDeviceCompliancePolicyCollectionResponse()(*DeviceCompliancePolicyCollectionResponse) { + m := &DeviceCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicyCollectionResponse) GetValue()([]DeviceCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicyCollectionResponse) SetValue(value []DeviceCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..7f8e379c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyCollectionResponseable +type DeviceCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicyable) + SetValue(value []DeviceCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summary.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summary.go new file mode 100644 index 000000000..a684ae1f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summary.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyDeviceStateSummary +type DeviceCompliancePolicyDeviceStateSummary struct { + Entity + // Number of compliant devices + compliantDeviceCount *int32 + // Number of devices that have compliance managed by System Center Configuration Manager + configManagerCount *int32 + // Number of conflict devices + conflictDeviceCount *int32 + // Number of error devices + errorDeviceCount *int32 + // Number of devices that are in grace period + inGracePeriodCount *int32 + // Number of NonCompliant devices + nonCompliantDeviceCount *int32 + // Number of not applicable devices + notApplicableDeviceCount *int32 + // Number of remediated devices + remediatedDeviceCount *int32 + // Number of unknown devices + unknownDeviceCount *int32 +} +// NewDeviceCompliancePolicyDeviceStateSummary instantiates a new deviceCompliancePolicyDeviceStateSummary and sets the default values. +func NewDeviceCompliancePolicyDeviceStateSummary()(*DeviceCompliancePolicyDeviceStateSummary) { + m := &DeviceCompliancePolicyDeviceStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicyDeviceStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyDeviceStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyDeviceStateSummary(), nil +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConfigManagerCount gets the configManagerCount property value. Number of devices that have compliance managed by System Center Configuration Manager +func (m *DeviceCompliancePolicyDeviceStateSummary) GetConfigManagerCount()(*int32) { + return m.configManagerCount +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Number of error devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyDeviceStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["configManagerCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigManagerCount(val) + } + return nil + } + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["inGracePeriodCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInGracePeriodCount(val) + } + return nil + } + res["nonCompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantDeviceCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetInGracePeriodCount gets the inGracePeriodCount property value. Number of devices that are in grace period +func (m *DeviceCompliancePolicyDeviceStateSummary) GetInGracePeriodCount()(*int32) { + return m.inGracePeriodCount +} +// GetNonCompliantDeviceCount gets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetNonCompliantDeviceCount()(*int32) { + return m.nonCompliantDeviceCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceCompliancePolicyDeviceStateSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyDeviceStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("configManagerCount", m.GetConfigManagerCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("inGracePeriodCount", m.GetInGracePeriodCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantDeviceCount", m.GetNonCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConfigManagerCount sets the configManagerCount property value. Number of devices that have compliance managed by System Center Configuration Manager +func (m *DeviceCompliancePolicyDeviceStateSummary) SetConfigManagerCount(value *int32)() { + m.configManagerCount = value +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Number of error devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetInGracePeriodCount sets the inGracePeriodCount property value. Number of devices that are in grace period +func (m *DeviceCompliancePolicyDeviceStateSummary) SetInGracePeriodCount(value *int32)() { + m.inGracePeriodCount = value +} +// SetNonCompliantDeviceCount sets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetNonCompliantDeviceCount(value *int32)() { + m.nonCompliantDeviceCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceCompliancePolicyDeviceStateSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summaryable.go new file mode 100644 index 000000000..bc6dcff2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_device_state_summaryable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyDeviceStateSummaryable +type DeviceCompliancePolicyDeviceStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantDeviceCount()(*int32) + GetConfigManagerCount()(*int32) + GetConflictDeviceCount()(*int32) + GetErrorDeviceCount()(*int32) + GetInGracePeriodCount()(*int32) + GetNonCompliantDeviceCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetRemediatedDeviceCount()(*int32) + GetUnknownDeviceCount()(*int32) + SetCompliantDeviceCount(value *int32)() + SetConfigManagerCount(value *int32)() + SetConflictDeviceCount(value *int32)() + SetErrorDeviceCount(value *int32)() + SetInGracePeriodCount(value *int32)() + SetNonCompliantDeviceCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetRemediatedDeviceCount(value *int32)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignment.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignment.go new file mode 100644 index 000000000..1dc81e2e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignment.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyGroupAssignment +type DeviceCompliancePolicyGroupAssignment struct { + Entity + // The navigation link to the device compliance polic targeted. + deviceCompliancePolicy DeviceCompliancePolicyable + // Indicates if this group is should be excluded. Defaults that the group should be included + excludeGroup *bool + // The Id of the AAD group we are targeting the device compliance policy to. + targetGroupId *string +} +// NewDeviceCompliancePolicyGroupAssignment instantiates a new DeviceCompliancePolicyGroupAssignment and sets the default values. +func NewDeviceCompliancePolicyGroupAssignment()(*DeviceCompliancePolicyGroupAssignment) { + m := &DeviceCompliancePolicyGroupAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicyGroupAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyGroupAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyGroupAssignment(), nil +} +// GetDeviceCompliancePolicy gets the deviceCompliancePolicy property value. The navigation link to the device compliance polic targeted. +func (m *DeviceCompliancePolicyGroupAssignment) GetDeviceCompliancePolicy()(DeviceCompliancePolicyable) { + return m.deviceCompliancePolicy +} +// GetExcludeGroup gets the excludeGroup property value. Indicates if this group is should be excluded. Defaults that the group should be included +func (m *DeviceCompliancePolicyGroupAssignment) GetExcludeGroup()(*bool) { + return m.excludeGroup +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyGroupAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceCompliancePolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceCompliancePolicy(val.(DeviceCompliancePolicyable)) + } + return nil + } + res["excludeGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeGroup(val) + } + return nil + } + res["targetGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetGroupId(val) + } + return nil + } + return res +} +// GetTargetGroupId gets the targetGroupId property value. The Id of the AAD group we are targeting the device compliance policy to. +func (m *DeviceCompliancePolicyGroupAssignment) GetTargetGroupId()(*string) { + return m.targetGroupId +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyGroupAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("deviceCompliancePolicy", m.GetDeviceCompliancePolicy()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("excludeGroup", m.GetExcludeGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetGroupId", m.GetTargetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceCompliancePolicy sets the deviceCompliancePolicy property value. The navigation link to the device compliance polic targeted. +func (m *DeviceCompliancePolicyGroupAssignment) SetDeviceCompliancePolicy(value DeviceCompliancePolicyable)() { + m.deviceCompliancePolicy = value +} +// SetExcludeGroup sets the excludeGroup property value. Indicates if this group is should be excluded. Defaults that the group should be included +func (m *DeviceCompliancePolicyGroupAssignment) SetExcludeGroup(value *bool)() { + m.excludeGroup = value +} +// SetTargetGroupId sets the targetGroupId property value. The Id of the AAD group we are targeting the device compliance policy to. +func (m *DeviceCompliancePolicyGroupAssignment) SetTargetGroupId(value *string)() { + m.targetGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignmentable.go new file mode 100644 index 000000000..bcbe57abd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_group_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyGroupAssignmentable +type DeviceCompliancePolicyGroupAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceCompliancePolicy()(DeviceCompliancePolicyable) + GetExcludeGroup()(*bool) + GetTargetGroupId()(*string) + SetDeviceCompliancePolicy(value DeviceCompliancePolicyable)() + SetExcludeGroup(value *bool)() + SetTargetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item.go new file mode 100644 index 000000000..27f8ad7f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyPolicySetItem +type DeviceCompliancePolicyPolicySetItem struct { + PolicySetItem +} +// NewDeviceCompliancePolicyPolicySetItem instantiates a new DeviceCompliancePolicyPolicySetItem and sets the default values. +func NewDeviceCompliancePolicyPolicySetItem()(*DeviceCompliancePolicyPolicySetItem) { + m := &DeviceCompliancePolicyPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.deviceCompliancePolicyPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceCompliancePolicyPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_response.go new file mode 100644 index 000000000..7da52febe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyPolicySetItemCollectionResponse +type DeviceCompliancePolicyPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicyPolicySetItemable +} +// NewDeviceCompliancePolicyPolicySetItemCollectionResponse instantiates a new DeviceCompliancePolicyPolicySetItemCollectionResponse and sets the default values. +func NewDeviceCompliancePolicyPolicySetItemCollectionResponse()(*DeviceCompliancePolicyPolicySetItemCollectionResponse) { + m := &DeviceCompliancePolicyPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicyPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicyPolicySetItemCollectionResponse) GetValue()([]DeviceCompliancePolicyPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicyPolicySetItemCollectionResponse) SetValue(value []DeviceCompliancePolicyPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..a886a453e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyPolicySetItemCollectionResponseable +type DeviceCompliancePolicyPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicyPolicySetItemable) + SetValue(value []DeviceCompliancePolicyPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_itemable.go new file mode 100644 index 000000000..e6ddb7492 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyPolicySetItemable +type DeviceCompliancePolicyPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_script.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_script.go new file mode 100644 index 000000000..998e60b55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_script.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyScript +type DeviceCompliancePolicyScript struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Device compliance script Id. + deviceComplianceScriptId *string + // The OdataType property + odataType *string + // Json of the rules. + rulesContent []byte +} +// NewDeviceCompliancePolicyScript instantiates a new deviceCompliancePolicyScript and sets the default values. +func NewDeviceCompliancePolicyScript()(*DeviceCompliancePolicyScript) { + m := &DeviceCompliancePolicyScript{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceCompliancePolicyScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyScript(), 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 *DeviceCompliancePolicyScript) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceComplianceScriptId gets the deviceComplianceScriptId property value. Device compliance script Id. +func (m *DeviceCompliancePolicyScript) GetDeviceComplianceScriptId()(*string) { + return m.deviceComplianceScriptId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceComplianceScriptId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceScriptId(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["rulesContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetRulesContent(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceCompliancePolicyScript) GetOdataType()(*string) { + return m.odataType +} +// GetRulesContent gets the rulesContent property value. Json of the rules. +func (m *DeviceCompliancePolicyScript) GetRulesContent()([]byte) { + return m.rulesContent +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("deviceComplianceScriptId", m.GetDeviceComplianceScriptId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("rulesContent", m.GetRulesContent()) + 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 *DeviceCompliancePolicyScript) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceComplianceScriptId sets the deviceComplianceScriptId property value. Device compliance script Id. +func (m *DeviceCompliancePolicyScript) SetDeviceComplianceScriptId(value *string)() { + m.deviceComplianceScriptId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceCompliancePolicyScript) SetOdataType(value *string)() { + m.odataType = value +} +// SetRulesContent sets the rulesContent property value. Json of the rules. +func (m *DeviceCompliancePolicyScript) SetRulesContent(value []byte)() { + m.rulesContent = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_scriptable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_scriptable.go new file mode 100644 index 000000000..5f746d495 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_scriptable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyScriptable +type DeviceCompliancePolicyScriptable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceComplianceScriptId()(*string) + GetOdataType()(*string) + GetRulesContent()([]byte) + SetDeviceComplianceScriptId(value *string)() + SetOdataType(value *string)() + SetRulesContent(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state.go new file mode 100644 index 000000000..f24342dbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state.go @@ -0,0 +1,418 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingState device Compilance Policy Setting State for a given device. +type DeviceCompliancePolicySettingState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Current value of setting on device + currentValue *string + // Error code for the setting + errorCode *int64 + // Error description + errorDescription *string + // Name of setting instance that is being reported. + instanceDisplayName *string + // The OdataType property + odataType *string + // The setting that is being reported + setting *string + // SettingInstanceId + settingInstanceId *string + // Localized/user friendly setting name that is being reported + settingName *string + // Contributing policies + sources []SettingSourceable + // The state property + state *ComplianceStatus + // UserEmail + userEmail *string + // UserId + userId *string + // UserName + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceCompliancePolicySettingState instantiates a new deviceCompliancePolicySettingState and sets the default values. +func NewDeviceCompliancePolicySettingState()(*DeviceCompliancePolicySettingState) { + m := &DeviceCompliancePolicySettingState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceCompliancePolicySettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingState(), 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 *DeviceCompliancePolicySettingState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCurrentValue gets the currentValue property value. Current value of setting on device +func (m *DeviceCompliancePolicySettingState) GetCurrentValue()(*string) { + return m.currentValue +} +// GetErrorCode gets the errorCode property value. Error code for the setting +func (m *DeviceCompliancePolicySettingState) GetErrorCode()(*int64) { + return m.errorCode +} +// GetErrorDescription gets the errorDescription property value. Error description +func (m *DeviceCompliancePolicySettingState) GetErrorDescription()(*string) { + return m.errorDescription +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["currentValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentValue(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDescription(val) + } + return nil + } + res["instanceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstanceDisplayName(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["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingInstanceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceId(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["sources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetSources(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetInstanceDisplayName gets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *DeviceCompliancePolicySettingState) GetInstanceDisplayName()(*string) { + return m.instanceDisplayName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceCompliancePolicySettingState) GetOdataType()(*string) { + return m.odataType +} +// GetSetting gets the setting property value. The setting that is being reported +func (m *DeviceCompliancePolicySettingState) GetSetting()(*string) { + return m.setting +} +// GetSettingInstanceId gets the settingInstanceId property value. SettingInstanceId +func (m *DeviceCompliancePolicySettingState) GetSettingInstanceId()(*string) { + return m.settingInstanceId +} +// GetSettingName gets the settingName property value. Localized/user friendly setting name that is being reported +func (m *DeviceCompliancePolicySettingState) GetSettingName()(*string) { + return m.settingName +} +// GetSources gets the sources property value. Contributing policies +func (m *DeviceCompliancePolicySettingState) GetSources()([]SettingSourceable) { + return m.sources +} +// GetState gets the state property value. The state property +func (m *DeviceCompliancePolicySettingState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserEmail gets the userEmail property value. UserEmail +func (m *DeviceCompliancePolicySettingState) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. UserId +func (m *DeviceCompliancePolicySettingState) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. UserName +func (m *DeviceCompliancePolicySettingState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceCompliancePolicySettingState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("currentValue", m.GetCurrentValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("errorDescription", m.GetErrorDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("instanceDisplayName", m.GetInstanceDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingInstanceId", m.GetSettingInstanceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSources())) + for i, v := range m.GetSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sources", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *DeviceCompliancePolicySettingState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCurrentValue sets the currentValue property value. Current value of setting on device +func (m *DeviceCompliancePolicySettingState) SetCurrentValue(value *string)() { + m.currentValue = value +} +// SetErrorCode sets the errorCode property value. Error code for the setting +func (m *DeviceCompliancePolicySettingState) SetErrorCode(value *int64)() { + m.errorCode = value +} +// SetErrorDescription sets the errorDescription property value. Error description +func (m *DeviceCompliancePolicySettingState) SetErrorDescription(value *string)() { + m.errorDescription = value +} +// SetInstanceDisplayName sets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *DeviceCompliancePolicySettingState) SetInstanceDisplayName(value *string)() { + m.instanceDisplayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceCompliancePolicySettingState) SetOdataType(value *string)() { + m.odataType = value +} +// SetSetting sets the setting property value. The setting that is being reported +func (m *DeviceCompliancePolicySettingState) SetSetting(value *string)() { + m.setting = value +} +// SetSettingInstanceId sets the settingInstanceId property value. SettingInstanceId +func (m *DeviceCompliancePolicySettingState) SetSettingInstanceId(value *string)() { + m.settingInstanceId = value +} +// SetSettingName sets the settingName property value. Localized/user friendly setting name that is being reported +func (m *DeviceCompliancePolicySettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetSources sets the sources property value. Contributing policies +func (m *DeviceCompliancePolicySettingState) SetSources(value []SettingSourceable)() { + m.sources = value +} +// SetState sets the state property value. The state property +func (m *DeviceCompliancePolicySettingState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserEmail sets the userEmail property value. UserEmail +func (m *DeviceCompliancePolicySettingState) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. UserId +func (m *DeviceCompliancePolicySettingState) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. UserName +func (m *DeviceCompliancePolicySettingState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceCompliancePolicySettingState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_response.go new file mode 100644 index 000000000..60d8200d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateCollectionResponse +type DeviceCompliancePolicySettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicySettingStateable +} +// NewDeviceCompliancePolicySettingStateCollectionResponse instantiates a new DeviceCompliancePolicySettingStateCollectionResponse and sets the default values. +func NewDeviceCompliancePolicySettingStateCollectionResponse()(*DeviceCompliancePolicySettingStateCollectionResponse) { + m := &DeviceCompliancePolicySettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicySettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateCollectionResponse) GetValue()([]DeviceCompliancePolicySettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateCollectionResponse) SetValue(value []DeviceCompliancePolicySettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_responseable.go new file mode 100644 index 000000000..4f3eaea21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateCollectionResponseable +type DeviceCompliancePolicySettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicySettingStateable) + SetValue(value []DeviceCompliancePolicySettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary.go new file mode 100644 index 000000000..f4a614894 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary.go @@ -0,0 +1,329 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateSummary device Compilance Policy Setting State summary across the account. +type DeviceCompliancePolicySettingStateSummary struct { + Entity + // Number of compliant devices + compliantDeviceCount *int32 + // Number of conflict devices + conflictDeviceCount *int32 + // Not yet documented + deviceComplianceSettingStates []DeviceComplianceSettingStateable + // Number of error devices + errorDeviceCount *int32 + // Number of NonCompliant devices + nonCompliantDeviceCount *int32 + // Number of not applicable devices + notApplicableDeviceCount *int32 + // Supported platform types for policies. + platformType *PolicyPlatformType + // Number of remediated devices + remediatedDeviceCount *int32 + // The setting class name and property name. + setting *string + // Name of the setting. + settingName *string + // Number of unknown devices + unknownDeviceCount *int32 +} +// NewDeviceCompliancePolicySettingStateSummary instantiates a new deviceCompliancePolicySettingStateSummary and sets the default values. +func NewDeviceCompliancePolicySettingStateSummary()(*DeviceCompliancePolicySettingStateSummary) { + m := &DeviceCompliancePolicySettingStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingStateSummary(), nil +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceCompliancePolicySettingStateSummary) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceCompliancePolicySettingStateSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetDeviceComplianceSettingStates gets the deviceComplianceSettingStates property value. Not yet documented +func (m *DeviceCompliancePolicySettingStateSummary) GetDeviceComplianceSettingStates()([]DeviceComplianceSettingStateable) { + return m.deviceComplianceSettingStates +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Number of error devices +func (m *DeviceCompliancePolicySettingStateSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["deviceComplianceSettingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceSettingStateable) + } + m.SetDeviceComplianceSettingStates(res) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["nonCompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantDeviceCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetNonCompliantDeviceCount gets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceCompliancePolicySettingStateSummary) GetNonCompliantDeviceCount()(*int32) { + return m.nonCompliantDeviceCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceCompliancePolicySettingStateSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *DeviceCompliancePolicySettingStateSummary) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceCompliancePolicySettingStateSummary) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// GetSetting gets the setting property value. The setting class name and property name. +func (m *DeviceCompliancePolicySettingStateSummary) GetSetting()(*string) { + return m.setting +} +// GetSettingName gets the settingName property value. Name of the setting. +func (m *DeviceCompliancePolicySettingStateSummary) GetSettingName()(*string) { + return m.settingName +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceCompliancePolicySettingStateSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + if m.GetDeviceComplianceSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceComplianceSettingStates())) + for i, v := range m.GetDeviceComplianceSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceComplianceSettingStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantDeviceCount", m.GetNonCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceCompliancePolicySettingStateSummary) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceCompliancePolicySettingStateSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetDeviceComplianceSettingStates sets the deviceComplianceSettingStates property value. Not yet documented +func (m *DeviceCompliancePolicySettingStateSummary) SetDeviceComplianceSettingStates(value []DeviceComplianceSettingStateable)() { + m.deviceComplianceSettingStates = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Number of error devices +func (m *DeviceCompliancePolicySettingStateSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetNonCompliantDeviceCount sets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceCompliancePolicySettingStateSummary) SetNonCompliantDeviceCount(value *int32)() { + m.nonCompliantDeviceCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceCompliancePolicySettingStateSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *DeviceCompliancePolicySettingStateSummary) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceCompliancePolicySettingStateSummary) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} +// SetSetting sets the setting property value. The setting class name and property name. +func (m *DeviceCompliancePolicySettingStateSummary) SetSetting(value *string)() { + m.setting = value +} +// SetSettingName sets the settingName property value. Name of the setting. +func (m *DeviceCompliancePolicySettingStateSummary) SetSettingName(value *string)() { + m.settingName = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceCompliancePolicySettingStateSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_response.go new file mode 100644 index 000000000..f1c59565e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateSummaryCollectionResponse +type DeviceCompliancePolicySettingStateSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicySettingStateSummaryable +} +// NewDeviceCompliancePolicySettingStateSummaryCollectionResponse instantiates a new DeviceCompliancePolicySettingStateSummaryCollectionResponse and sets the default values. +func NewDeviceCompliancePolicySettingStateSummaryCollectionResponse()(*DeviceCompliancePolicySettingStateSummaryCollectionResponse) { + m := &DeviceCompliancePolicySettingStateSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicySettingStateSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingStateSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) GetValue()([]DeviceCompliancePolicySettingStateSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) SetValue(value []DeviceCompliancePolicySettingStateSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_responseable.go new file mode 100644 index 000000000..7c5213ec4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateSummaryCollectionResponseable +type DeviceCompliancePolicySettingStateSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicySettingStateSummaryable) + SetValue(value []DeviceCompliancePolicySettingStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summaryable.go new file mode 100644 index 000000000..94c47cd3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_state_summaryable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateSummaryable +type DeviceCompliancePolicySettingStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantDeviceCount()(*int32) + GetConflictDeviceCount()(*int32) + GetDeviceComplianceSettingStates()([]DeviceComplianceSettingStateable) + GetErrorDeviceCount()(*int32) + GetNonCompliantDeviceCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetPlatformType()(*PolicyPlatformType) + GetRemediatedDeviceCount()(*int32) + GetSetting()(*string) + GetSettingName()(*string) + GetUnknownDeviceCount()(*int32) + SetCompliantDeviceCount(value *int32)() + SetConflictDeviceCount(value *int32)() + SetDeviceComplianceSettingStates(value []DeviceComplianceSettingStateable)() + SetErrorDeviceCount(value *int32)() + SetNonCompliantDeviceCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetPlatformType(value *PolicyPlatformType)() + SetRemediatedDeviceCount(value *int32)() + SetSetting(value *string)() + SetSettingName(value *string)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_stateable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_stateable.go new file mode 100644 index 000000000..d79d83239 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_setting_stateable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicySettingStateable +type DeviceCompliancePolicySettingStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentValue()(*string) + GetErrorCode()(*int64) + GetErrorDescription()(*string) + GetInstanceDisplayName()(*string) + GetOdataType()(*string) + GetSetting()(*string) + GetSettingInstanceId()(*string) + GetSettingName()(*string) + GetSources()([]SettingSourceable) + GetState()(*ComplianceStatus) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetCurrentValue(value *string)() + SetErrorCode(value *int64)() + SetErrorDescription(value *string)() + SetInstanceDisplayName(value *string)() + SetOdataType(value *string)() + SetSetting(value *string)() + SetSettingInstanceId(value *string)() + SetSettingName(value *string)() + SetSources(value []SettingSourceable)() + SetState(value *ComplianceStatus)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_state.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state.go new file mode 100644 index 000000000..f52dc8a97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyState device Compliance Policy State for a given device. +type DeviceCompliancePolicyState struct { + Entity + // The name of the policy for this policyBase + displayName *string + // Supported platform types for policies. + platformType *PolicyPlatformType + // Count of how many setting a policy holds + settingCount *int32 + // The settingStates property + settingStates []DeviceCompliancePolicySettingStateable + // The state property + state *ComplianceStatus + // User unique identifier, must be Guid + userId *string + // User Principal Name + userPrincipalName *string + // The version of the policy + version *int32 +} +// NewDeviceCompliancePolicyState instantiates a new deviceCompliancePolicyState and sets the default values. +func NewDeviceCompliancePolicyState()(*DeviceCompliancePolicyState) { + m := &DeviceCompliancePolicyState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicyStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyState(), nil +} +// GetDisplayName gets the displayName property value. The name of the policy for this policyBase +func (m *DeviceCompliancePolicyState) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["settingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingCount(val) + } + return nil + } + res["settingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateable) + } + m.SetSettingStates(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *DeviceCompliancePolicyState) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetSettingCount gets the settingCount property value. Count of how many setting a policy holds +func (m *DeviceCompliancePolicyState) GetSettingCount()(*int32) { + return m.settingCount +} +// GetSettingStates gets the settingStates property value. The settingStates property +func (m *DeviceCompliancePolicyState) GetSettingStates()([]DeviceCompliancePolicySettingStateable) { + return m.settingStates +} +// GetState gets the state property value. The state property +func (m *DeviceCompliancePolicyState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserId gets the userId property value. User unique identifier, must be Guid +func (m *DeviceCompliancePolicyState) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *DeviceCompliancePolicyState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetVersion gets the version property value. The version of the policy +func (m *DeviceCompliancePolicyState) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("settingCount", m.GetSettingCount()) + if err != nil { + return err + } + } + if m.GetSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingStates())) + for i, v := range m.GetSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingStates", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the policy for this policyBase +func (m *DeviceCompliancePolicyState) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *DeviceCompliancePolicyState) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetSettingCount sets the settingCount property value. Count of how many setting a policy holds +func (m *DeviceCompliancePolicyState) SetSettingCount(value *int32)() { + m.settingCount = value +} +// SetSettingStates sets the settingStates property value. The settingStates property +func (m *DeviceCompliancePolicyState) SetSettingStates(value []DeviceCompliancePolicySettingStateable)() { + m.settingStates = value +} +// SetState sets the state property value. The state property +func (m *DeviceCompliancePolicyState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserId sets the userId property value. User unique identifier, must be Guid +func (m *DeviceCompliancePolicyState) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *DeviceCompliancePolicyState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetVersion sets the version property value. The version of the policy +func (m *DeviceCompliancePolicyState) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_response.go new file mode 100644 index 000000000..e92e25d42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyStateCollectionResponse +type DeviceCompliancePolicyStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicyStateable +} +// NewDeviceCompliancePolicyStateCollectionResponse instantiates a new DeviceCompliancePolicyStateCollectionResponse and sets the default values. +func NewDeviceCompliancePolicyStateCollectionResponse()(*DeviceCompliancePolicyStateCollectionResponse) { + m := &DeviceCompliancePolicyStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicyStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicyStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicyStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicyStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicyStateCollectionResponse) GetValue()([]DeviceCompliancePolicyStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicyStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicyStateCollectionResponse) SetValue(value []DeviceCompliancePolicyStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_responseable.go new file mode 100644 index 000000000..e06a135d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyStateCollectionResponseable +type DeviceCompliancePolicyStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicyStateable) + SetValue(value []DeviceCompliancePolicyStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policy_stateable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policy_stateable.go new file mode 100644 index 000000000..0c22e0c4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policy_stateable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyStateable +type DeviceCompliancePolicyStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetPlatformType()(*PolicyPlatformType) + GetSettingCount()(*int32) + GetSettingStates()([]DeviceCompliancePolicySettingStateable) + GetState()(*ComplianceStatus) + GetUserId()(*string) + GetUserPrincipalName()(*string) + GetVersion()(*int32) + SetDisplayName(value *string)() + SetPlatformType(value *PolicyPlatformType)() + SetSettingCount(value *int32)() + SetSettingStates(value []DeviceCompliancePolicySettingStateable)() + SetState(value *ComplianceStatus)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/device_compliance_policyable.go new file mode 100644 index 000000000..ece53e195 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_policyable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCompliancePolicyable +type DeviceCompliancePolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceCompliancePolicyAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceSettingStateSummaries()([]SettingStateDeviceSummaryable) + GetDeviceStatuses()([]DeviceComplianceDeviceStatusable) + GetDeviceStatusOverview()(DeviceComplianceDeviceOverviewable) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetScheduledActionsForRule()([]DeviceComplianceScheduledActionForRuleable) + GetUserStatuses()([]DeviceComplianceUserStatusable) + GetUserStatusOverview()(DeviceComplianceUserOverviewable) + GetVersion()(*int32) + SetAssignments(value []DeviceCompliancePolicyAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceSettingStateSummaries(value []SettingStateDeviceSummaryable)() + SetDeviceStatuses(value []DeviceComplianceDeviceStatusable)() + SetDeviceStatusOverview(value DeviceComplianceDeviceOverviewable)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetScheduledActionsForRule(value []DeviceComplianceScheduledActionForRuleable)() + SetUserStatuses(value []DeviceComplianceUserStatusable)() + SetUserStatusOverview(value DeviceComplianceUserOverviewable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule.go b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule.go new file mode 100644 index 000000000..0ca4fe920 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScheduledActionForRule scheduled Action for Rule +type DeviceComplianceScheduledActionForRule struct { + Entity + // Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired. + ruleName *string + // The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action. + scheduledActionConfigurations []DeviceComplianceActionItemable +} +// NewDeviceComplianceScheduledActionForRule instantiates a new deviceComplianceScheduledActionForRule and sets the default values. +func NewDeviceComplianceScheduledActionForRule()(*DeviceComplianceScheduledActionForRule) { + m := &DeviceComplianceScheduledActionForRule{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceScheduledActionForRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScheduledActionForRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScheduledActionForRule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScheduledActionForRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ruleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleName(val) + } + return nil + } + res["scheduledActionConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceActionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceActionItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceActionItemable) + } + m.SetScheduledActionConfigurations(res) + } + return nil + } + return res +} +// GetRuleName gets the ruleName property value. Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired. +func (m *DeviceComplianceScheduledActionForRule) GetRuleName()(*string) { + return m.ruleName +} +// GetScheduledActionConfigurations gets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action. +func (m *DeviceComplianceScheduledActionForRule) GetScheduledActionConfigurations()([]DeviceComplianceActionItemable) { + return m.scheduledActionConfigurations +} +// Serialize serializes information the current object +func (m *DeviceComplianceScheduledActionForRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("ruleName", m.GetRuleName()) + if err != nil { + return err + } + } + if m.GetScheduledActionConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScheduledActionConfigurations())) + for i, v := range m.GetScheduledActionConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scheduledActionConfigurations", cast) + if err != nil { + return err + } + } + return nil +} +// SetRuleName sets the ruleName property value. Name of the rule which this scheduled action applies to. Currently scheduled actions are created per policy instead of per rule, thus RuleName is always set to default value PasswordRequired. +func (m *DeviceComplianceScheduledActionForRule) SetRuleName(value *string)() { + m.ruleName = value +} +// SetScheduledActionConfigurations sets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. Compliance policy must have one and only one block scheduled action. +func (m *DeviceComplianceScheduledActionForRule) SetScheduledActionConfigurations(value []DeviceComplianceActionItemable)() { + m.scheduledActionConfigurations = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_response.go new file mode 100644 index 000000000..885df7f6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScheduledActionForRuleCollectionResponse +type DeviceComplianceScheduledActionForRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScheduledActionForRuleable +} +// NewDeviceComplianceScheduledActionForRuleCollectionResponse instantiates a new DeviceComplianceScheduledActionForRuleCollectionResponse and sets the default values. +func NewDeviceComplianceScheduledActionForRuleCollectionResponse()(*DeviceComplianceScheduledActionForRuleCollectionResponse) { + m := &DeviceComplianceScheduledActionForRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScheduledActionForRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScheduledActionForRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScheduledActionForRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScheduledActionForRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScheduledActionForRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScheduledActionForRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScheduledActionForRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScheduledActionForRuleCollectionResponse) GetValue()([]DeviceComplianceScheduledActionForRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScheduledActionForRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScheduledActionForRuleCollectionResponse) SetValue(value []DeviceComplianceScheduledActionForRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_responseable.go new file mode 100644 index 000000000..11d0ff58c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScheduledActionForRuleCollectionResponseable +type DeviceComplianceScheduledActionForRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScheduledActionForRuleable) + SetValue(value []DeviceComplianceScheduledActionForRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_ruleable.go b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_ruleable.go new file mode 100644 index 000000000..cefde141f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_scheduled_action_for_ruleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScheduledActionForRuleable +type DeviceComplianceScheduledActionForRuleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRuleName()(*string) + GetScheduledActionConfigurations()([]DeviceComplianceActionItemable) + SetRuleName(value *string)() + SetScheduledActionConfigurations(value []DeviceComplianceActionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script.go b/src/internal/connector/graph/betasdk/models/device_compliance_script.go new file mode 100644 index 000000000..ee1a0927a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script.go @@ -0,0 +1,408 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScript intune will provide customer the ability to run their Powershell Compliance scripts (detection) on the enrolled windows 10 Azure Active Directory joined devices. +type DeviceComplianceScript struct { + Entity + // The list of group assignments for the device compliance script + assignments []DeviceHealthScriptAssignmentable + // The timestamp of when the device compliance script was created. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description of the device compliance script + description *string + // The entire content of the detection powershell script + detectionScriptContent []byte + // List of run states for the device compliance script across all devices + deviceRunStates []DeviceComplianceScriptDeviceStateable + // Name of the device compliance script + displayName *string + // Indicate whether the script signature needs be checked + enforceSignatureCheck *bool + // The timestamp of when the device compliance script was modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the device compliance script publisher + publisher *string + // List of Scope Tag IDs for the device compliance script + roleScopeTagIds []string + // Indicate whether PowerShell script(s) should run as 32-bit + runAs32Bit *bool + // Indicates the type of execution context the app runs in. + runAsAccount *RunAsAccountType + // High level run summary for device compliance script. + runSummary DeviceComplianceScriptRunSummaryable + // Version of the device compliance script + version *string +} +// NewDeviceComplianceScript instantiates a new deviceComplianceScript and sets the default values. +func NewDeviceComplianceScript()(*DeviceComplianceScript) { + m := &DeviceComplianceScript{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScript(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device compliance script +func (m *DeviceComplianceScript) GetAssignments()([]DeviceHealthScriptAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The timestamp of when the device compliance script was created. This property is read-only. +func (m *DeviceComplianceScript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description of the device compliance script +func (m *DeviceComplianceScript) GetDescription()(*string) { + return m.description +} +// GetDetectionScriptContent gets the detectionScriptContent property value. The entire content of the detection powershell script +func (m *DeviceComplianceScript) GetDetectionScriptContent()([]byte) { + return m.detectionScriptContent +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for the device compliance script across all devices +func (m *DeviceComplianceScript) GetDeviceRunStates()([]DeviceComplianceScriptDeviceStateable) { + return m.deviceRunStates +} +// GetDisplayName gets the displayName property value. Name of the device compliance script +func (m *DeviceComplianceScript) GetDisplayName()(*string) { + return m.displayName +} +// GetEnforceSignatureCheck gets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked +func (m *DeviceComplianceScript) GetEnforceSignatureCheck()(*bool) { + return m.enforceSignatureCheck +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["detectionScriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptContent(val) + } + return nil + } + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enforceSignatureCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceSignatureCheck(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["runAs32Bit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRunAs32Bit(val) + } + return nil + } + res["runAsAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunAsAccountType) + if err != nil { + return err + } + if val != nil { + m.SetRunAsAccount(val.(*RunAsAccountType)) + } + return nil + } + res["runSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceComplianceScriptRunSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSummary(val.(DeviceComplianceScriptRunSummaryable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The timestamp of when the device compliance script was modified. This property is read-only. +func (m *DeviceComplianceScript) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPublisher gets the publisher property value. Name of the device compliance script publisher +func (m *DeviceComplianceScript) GetPublisher()(*string) { + return m.publisher +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for the device compliance script +func (m *DeviceComplianceScript) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRunAs32Bit gets the runAs32Bit property value. Indicate whether PowerShell script(s) should run as 32-bit +func (m *DeviceComplianceScript) GetRunAs32Bit()(*bool) { + return m.runAs32Bit +} +// GetRunAsAccount gets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceComplianceScript) GetRunAsAccount()(*RunAsAccountType) { + return m.runAsAccount +} +// GetRunSummary gets the runSummary property value. High level run summary for device compliance script. +func (m *DeviceComplianceScript) GetRunSummary()(DeviceComplianceScriptRunSummaryable) { + return m.runSummary +} +// GetVersion gets the version property value. Version of the device compliance script +func (m *DeviceComplianceScript) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceComplianceScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("detectionScriptContent", m.GetDetectionScriptContent()) + if err != nil { + return err + } + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enforceSignatureCheck", m.GetEnforceSignatureCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("runAs32Bit", m.GetRunAs32Bit()) + if err != nil { + return err + } + } + if m.GetRunAsAccount() != nil { + cast := (*m.GetRunAsAccount()).String() + err = writer.WriteStringValue("runAsAccount", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSummary", m.GetRunSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device compliance script +func (m *DeviceComplianceScript) SetAssignments(value []DeviceHealthScriptAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The timestamp of when the device compliance script was created. This property is read-only. +func (m *DeviceComplianceScript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description of the device compliance script +func (m *DeviceComplianceScript) SetDescription(value *string)() { + m.description = value +} +// SetDetectionScriptContent sets the detectionScriptContent property value. The entire content of the detection powershell script +func (m *DeviceComplianceScript) SetDetectionScriptContent(value []byte)() { + m.detectionScriptContent = value +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for the device compliance script across all devices +func (m *DeviceComplianceScript) SetDeviceRunStates(value []DeviceComplianceScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetDisplayName sets the displayName property value. Name of the device compliance script +func (m *DeviceComplianceScript) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnforceSignatureCheck sets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked +func (m *DeviceComplianceScript) SetEnforceSignatureCheck(value *bool)() { + m.enforceSignatureCheck = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The timestamp of when the device compliance script was modified. This property is read-only. +func (m *DeviceComplianceScript) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPublisher sets the publisher property value. Name of the device compliance script publisher +func (m *DeviceComplianceScript) SetPublisher(value *string)() { + m.publisher = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for the device compliance script +func (m *DeviceComplianceScript) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRunAs32Bit sets the runAs32Bit property value. Indicate whether PowerShell script(s) should run as 32-bit +func (m *DeviceComplianceScript) SetRunAs32Bit(value *bool)() { + m.runAs32Bit = value +} +// SetRunAsAccount sets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceComplianceScript) SetRunAsAccount(value *RunAsAccountType)() { + m.runAsAccount = value +} +// SetRunSummary sets the runSummary property value. High level run summary for device compliance script. +func (m *DeviceComplianceScript) SetRunSummary(value DeviceComplianceScriptRunSummaryable)() { + m.runSummary = value +} +// SetVersion sets the version property value. Version of the device compliance script +func (m *DeviceComplianceScript) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_response.go new file mode 100644 index 000000000..57e2f963b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptCollectionResponse +type DeviceComplianceScriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScriptable +} +// NewDeviceComplianceScriptCollectionResponse instantiates a new DeviceComplianceScriptCollectionResponse and sets the default values. +func NewDeviceComplianceScriptCollectionResponse()(*DeviceComplianceScriptCollectionResponse) { + m := &DeviceComplianceScriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScriptCollectionResponse) GetValue()([]DeviceComplianceScriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScriptCollectionResponse) SetValue(value []DeviceComplianceScriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_responseable.go new file mode 100644 index 000000000..bbc3145a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptCollectionResponseable +type DeviceComplianceScriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScriptable) + SetValue(value []DeviceComplianceScriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state.go new file mode 100644 index 000000000..b4524e825 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state.go @@ -0,0 +1,218 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptDeviceState contains properties for device run state of the device compliance script. +type DeviceComplianceScriptDeviceState struct { + Entity + // Indicates the type of execution status of the device management script. + detectionState *RunState + // The next timestamp of when the device compliance script is expected to execute + expectedStateUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last timestamp of when the device compliance script executed + lastStateUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last time that Intune Managment Extension synced with Intune + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managed device on which the device compliance script executed + managedDevice ManagedDeviceable + // Error from the detection script + scriptError *string + // Output of the detection script + scriptOutput *string +} +// NewDeviceComplianceScriptDeviceState instantiates a new deviceComplianceScriptDeviceState and sets the default values. +func NewDeviceComplianceScriptDeviceState()(*DeviceComplianceScriptDeviceState) { + m := &DeviceComplianceScriptDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceScriptDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptDeviceState(), nil +} +// GetDetectionState gets the detectionState property value. Indicates the type of execution status of the device management script. +func (m *DeviceComplianceScriptDeviceState) GetDetectionState()(*RunState) { + return m.detectionState +} +// GetExpectedStateUpdateDateTime gets the expectedStateUpdateDateTime property value. The next timestamp of when the device compliance script is expected to execute +func (m *DeviceComplianceScriptDeviceState) GetExpectedStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expectedStateUpdateDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["detectionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetDetectionState(val.(*RunState)) + } + return nil + } + res["expectedStateUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpectedStateUpdateDateTime(val) + } + return nil + } + res["lastStateUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStateUpdateDateTime(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["managedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDevice(val.(ManagedDeviceable)) + } + return nil + } + res["scriptError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScriptError(val) + } + return nil + } + res["scriptOutput"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScriptOutput(val) + } + return nil + } + return res +} +// GetLastStateUpdateDateTime gets the lastStateUpdateDateTime property value. The last timestamp of when the device compliance script executed +func (m *DeviceComplianceScriptDeviceState) GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStateUpdateDateTime +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The last time that Intune Managment Extension synced with Intune +func (m *DeviceComplianceScriptDeviceState) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetManagedDevice gets the managedDevice property value. The managed device on which the device compliance script executed +func (m *DeviceComplianceScriptDeviceState) GetManagedDevice()(ManagedDeviceable) { + return m.managedDevice +} +// GetScriptError gets the scriptError property value. Error from the detection script +func (m *DeviceComplianceScriptDeviceState) GetScriptError()(*string) { + return m.scriptError +} +// GetScriptOutput gets the scriptOutput property value. Output of the detection script +func (m *DeviceComplianceScriptDeviceState) GetScriptOutput()(*string) { + return m.scriptOutput +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDetectionState() != nil { + cast := (*m.GetDetectionState()).String() + err = writer.WriteStringValue("detectionState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expectedStateUpdateDateTime", m.GetExpectedStateUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStateUpdateDateTime", m.GetLastStateUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDevice", m.GetManagedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("scriptError", m.GetScriptError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("scriptOutput", m.GetScriptOutput()) + if err != nil { + return err + } + } + return nil +} +// SetDetectionState sets the detectionState property value. Indicates the type of execution status of the device management script. +func (m *DeviceComplianceScriptDeviceState) SetDetectionState(value *RunState)() { + m.detectionState = value +} +// SetExpectedStateUpdateDateTime sets the expectedStateUpdateDateTime property value. The next timestamp of when the device compliance script is expected to execute +func (m *DeviceComplianceScriptDeviceState) SetExpectedStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expectedStateUpdateDateTime = value +} +// SetLastStateUpdateDateTime sets the lastStateUpdateDateTime property value. The last timestamp of when the device compliance script executed +func (m *DeviceComplianceScriptDeviceState) SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStateUpdateDateTime = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The last time that Intune Managment Extension synced with Intune +func (m *DeviceComplianceScriptDeviceState) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetManagedDevice sets the managedDevice property value. The managed device on which the device compliance script executed +func (m *DeviceComplianceScriptDeviceState) SetManagedDevice(value ManagedDeviceable)() { + m.managedDevice = value +} +// SetScriptError sets the scriptError property value. Error from the detection script +func (m *DeviceComplianceScriptDeviceState) SetScriptError(value *string)() { + m.scriptError = value +} +// SetScriptOutput sets the scriptOutput property value. Output of the detection script +func (m *DeviceComplianceScriptDeviceState) SetScriptOutput(value *string)() { + m.scriptOutput = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_response.go new file mode 100644 index 000000000..e4743a718 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptDeviceStateCollectionResponse +type DeviceComplianceScriptDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScriptDeviceStateable +} +// NewDeviceComplianceScriptDeviceStateCollectionResponse instantiates a new DeviceComplianceScriptDeviceStateCollectionResponse and sets the default values. +func NewDeviceComplianceScriptDeviceStateCollectionResponse()(*DeviceComplianceScriptDeviceStateCollectionResponse) { + m := &DeviceComplianceScriptDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScriptDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScriptDeviceStateCollectionResponse) GetValue()([]DeviceComplianceScriptDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScriptDeviceStateCollectionResponse) SetValue(value []DeviceComplianceScriptDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_responseable.go new file mode 100644 index 000000000..8d9de8f00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptDeviceStateCollectionResponseable +type DeviceComplianceScriptDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScriptDeviceStateable) + SetValue(value []DeviceComplianceScriptDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_device_stateable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_stateable.go new file mode 100644 index 000000000..f145626f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_device_stateable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptDeviceStateable +type DeviceComplianceScriptDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionState()(*RunState) + GetExpectedStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDevice()(ManagedDeviceable) + GetScriptError()(*string) + GetScriptOutput()(*string) + SetDetectionState(value *RunState)() + SetExpectedStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDevice(value ManagedDeviceable)() + SetScriptError(value *string)() + SetScriptOutput(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_error.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_error.go new file mode 100644 index 000000000..240ac683e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_error.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptError +type DeviceComplianceScriptError struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Error code for rule validation. + code *Code + // Error code for rule validation. + deviceComplianceScriptRulesValidationError *DeviceComplianceScriptRulesValidationError + // Error message. + message *string + // The OdataType property + odataType *string +} +// NewDeviceComplianceScriptError instantiates a new deviceComplianceScriptError and sets the default values. +func NewDeviceComplianceScriptError()(*DeviceComplianceScriptError) { + m := &DeviceComplianceScriptError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceComplianceScriptErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceComplianceScriptRuleError": + return NewDeviceComplianceScriptRuleError(), nil + } + } + } + } + return NewDeviceComplianceScriptError(), 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 *DeviceComplianceScriptError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. Error code for rule validation. +func (m *DeviceComplianceScriptError) GetCode()(*Code) { + return m.code +} +// GetDeviceComplianceScriptRulesValidationError gets the deviceComplianceScriptRulesValidationError property value. Error code for rule validation. +func (m *DeviceComplianceScriptError) GetDeviceComplianceScriptRulesValidationError()(*DeviceComplianceScriptRulesValidationError) { + return m.deviceComplianceScriptRulesValidationError +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCode) + if err != nil { + return err + } + if val != nil { + m.SetCode(val.(*Code)) + } + return nil + } + res["deviceComplianceScriptRulesValidationError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceComplianceScriptRulesValidationError) + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceScriptRulesValidationError(val.(*DeviceComplianceScriptRulesValidationError)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. Error message. +func (m *DeviceComplianceScriptError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceComplianceScriptError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCode() != nil { + cast := (*m.GetCode()).String() + err := writer.WriteStringValue("code", &cast) + if err != nil { + return err + } + } + if m.GetDeviceComplianceScriptRulesValidationError() != nil { + cast := (*m.GetDeviceComplianceScriptRulesValidationError()).String() + err := writer.WriteStringValue("deviceComplianceScriptRulesValidationError", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceComplianceScriptError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. Error code for rule validation. +func (m *DeviceComplianceScriptError) SetCode(value *Code)() { + m.code = value +} +// SetDeviceComplianceScriptRulesValidationError sets the deviceComplianceScriptRulesValidationError property value. Error code for rule validation. +func (m *DeviceComplianceScriptError) SetDeviceComplianceScriptRulesValidationError(value *DeviceComplianceScriptRulesValidationError)() { + m.deviceComplianceScriptRulesValidationError = value +} +// SetMessage sets the message property value. Error message. +func (m *DeviceComplianceScriptError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceComplianceScriptError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_response.go new file mode 100644 index 000000000..ed61d460f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptErrorCollectionResponse +type DeviceComplianceScriptErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScriptErrorable +} +// NewDeviceComplianceScriptErrorCollectionResponse instantiates a new DeviceComplianceScriptErrorCollectionResponse and sets the default values. +func NewDeviceComplianceScriptErrorCollectionResponse()(*DeviceComplianceScriptErrorCollectionResponse) { + m := &DeviceComplianceScriptErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScriptErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptErrorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScriptErrorCollectionResponse) GetValue()([]DeviceComplianceScriptErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScriptErrorCollectionResponse) SetValue(value []DeviceComplianceScriptErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_responseable.go new file mode 100644 index 000000000..a6e94458d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptErrorCollectionResponseable +type DeviceComplianceScriptErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScriptErrorable) + SetValue(value []DeviceComplianceScriptErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_errorable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_errorable.go new file mode 100644 index 000000000..8d4eec9c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_errorable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptErrorable +type DeviceComplianceScriptErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*Code) + GetDeviceComplianceScriptRulesValidationError()(*DeviceComplianceScriptRulesValidationError) + GetMessage()(*string) + GetOdataType()(*string) + SetCode(value *Code)() + SetDeviceComplianceScriptRulesValidationError(value *DeviceComplianceScriptRulesValidationError)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rul_operator.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rul_operator.go new file mode 100644 index 000000000..0760f67a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rul_operator.go @@ -0,0 +1,128 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type DeviceComplianceScriptRulOperator int + +const ( + // None operator. + NONE_DEVICECOMPLIANCESCRIPTRULOPERATOR DeviceComplianceScriptRulOperator = iota + // And operator. + AND_DEVICECOMPLIANCESCRIPTRULOPERATOR + // Or operator. + OR_DEVICECOMPLIANCESCRIPTRULOPERATOR + // IsEquals operator. + ISEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NotEquals operator. + NOTEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // GreaterThan operator. + GREATERTHAN_DEVICECOMPLIANCESCRIPTRULOPERATOR + // LessThan operator. + LESSTHAN_DEVICECOMPLIANCESCRIPTRULOPERATOR + // Between operator. + BETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NotBetween operator. + NOTBETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + // GreaterEquals operator. + GREATEREQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // LessEquals operator. + LESSEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // DayTimeBetween operator. + DAYTIMEBETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + // BeginsWith operator. + BEGINSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NotBeginsWith operator. + NOTBEGINSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + // EndsWith operator. + ENDSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NotEndsWith operator. + NOTENDSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + // Contains operator. + CONTAINS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NotContains operator. + NOTCONTAINS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // AllOf operator. + ALLOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + // OneOf operator. + ONEOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + // NoneOf operator. + NONEOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + // SetEquals operator. + SETEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // OrderedSetEquals operator. + ORDEREDSETEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + // SubsetOf operator. + SUBSETOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + // ExcludesAll operator. + EXCLUDESALL_DEVICECOMPLIANCESCRIPTRULOPERATOR +) + +func (i DeviceComplianceScriptRulOperator) String() string { + return []string{"none", "and", "or", "isEquals", "notEquals", "greaterThan", "lessThan", "between", "notBetween", "greaterEquals", "lessEquals", "dayTimeBetween", "beginsWith", "notBeginsWith", "endsWith", "notEndsWith", "contains", "notContains", "allOf", "oneOf", "noneOf", "setEquals", "orderedSetEquals", "subsetOf", "excludesAll"}[i] +} +func ParseDeviceComplianceScriptRulOperator(v string) (interface{}, error) { + result := NONE_DEVICECOMPLIANCESCRIPTRULOPERATOR + switch v { + case "none": + result = NONE_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "and": + result = AND_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "or": + result = OR_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "isEquals": + result = ISEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "notEquals": + result = NOTEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "greaterThan": + result = GREATERTHAN_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "lessThan": + result = LESSTHAN_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "between": + result = BETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "notBetween": + result = NOTBETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "greaterEquals": + result = GREATEREQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "lessEquals": + result = LESSEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "dayTimeBetween": + result = DAYTIMEBETWEEN_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "beginsWith": + result = BEGINSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "notBeginsWith": + result = NOTBEGINSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "endsWith": + result = ENDSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "notEndsWith": + result = NOTENDSWITH_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "contains": + result = CONTAINS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "notContains": + result = NOTCONTAINS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "allOf": + result = ALLOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "oneOf": + result = ONEOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "noneOf": + result = NONEOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "setEquals": + result = SETEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "orderedSetEquals": + result = ORDEREDSETEQUALS_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "subsetOf": + result = SUBSETOF_DEVICECOMPLIANCESCRIPTRULOPERATOR + case "excludesAll": + result = EXCLUDESALL_DEVICECOMPLIANCESCRIPTRULOPERATOR + default: + return 0, errors.New("Unknown DeviceComplianceScriptRulOperator value: " + v) + } + return &result, nil +} +func SerializeDeviceComplianceScriptRulOperator(values []DeviceComplianceScriptRulOperator) []string { + 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/device_compliance_script_rule.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule.go new file mode 100644 index 000000000..db9dab624 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule.go @@ -0,0 +1,231 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRule +type DeviceComplianceScriptRule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Data types for rules. + dataType *DataType + // Data types for rules. + deviceComplianceScriptRuleDataType *DeviceComplianceScriptRuleDataType + // Operator for rules. + deviceComplianceScriptRulOperator *DeviceComplianceScriptRulOperator + // The OdataType property + odataType *string + // Operand specified in the rule. + operand *string + // Operator for rules. + operator *Operator + // Setting name specified in the rule. + settingName *string +} +// NewDeviceComplianceScriptRule instantiates a new deviceComplianceScriptRule and sets the default values. +func NewDeviceComplianceScriptRule()(*DeviceComplianceScriptRule) { + m := &DeviceComplianceScriptRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceComplianceScriptRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptRule(), 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 *DeviceComplianceScriptRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDataType gets the dataType property value. Data types for rules. +func (m *DeviceComplianceScriptRule) GetDataType()(*DataType) { + return m.dataType +} +// GetDeviceComplianceScriptRuleDataType gets the deviceComplianceScriptRuleDataType property value. Data types for rules. +func (m *DeviceComplianceScriptRule) GetDeviceComplianceScriptRuleDataType()(*DeviceComplianceScriptRuleDataType) { + return m.deviceComplianceScriptRuleDataType +} +// GetDeviceComplianceScriptRulOperator gets the deviceComplianceScriptRulOperator property value. Operator for rules. +func (m *DeviceComplianceScriptRule) GetDeviceComplianceScriptRulOperator()(*DeviceComplianceScriptRulOperator) { + return m.deviceComplianceScriptRulOperator +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataType) + if err != nil { + return err + } + if val != nil { + m.SetDataType(val.(*DataType)) + } + return nil + } + res["deviceComplianceScriptRuleDataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceComplianceScriptRuleDataType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceScriptRuleDataType(val.(*DeviceComplianceScriptRuleDataType)) + } + return nil + } + res["deviceComplianceScriptRulOperator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceComplianceScriptRulOperator) + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceScriptRulOperator(val.(*DeviceComplianceScriptRulOperator)) + } + 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["operand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperand(val) + } + return nil + } + res["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperator) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*Operator)) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceComplianceScriptRule) GetOdataType()(*string) { + return m.odataType +} +// GetOperand gets the operand property value. Operand specified in the rule. +func (m *DeviceComplianceScriptRule) GetOperand()(*string) { + return m.operand +} +// GetOperator gets the operator property value. Operator for rules. +func (m *DeviceComplianceScriptRule) GetOperator()(*Operator) { + return m.operator +} +// GetSettingName gets the settingName property value. Setting name specified in the rule. +func (m *DeviceComplianceScriptRule) GetSettingName()(*string) { + return m.settingName +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDataType() != nil { + cast := (*m.GetDataType()).String() + err := writer.WriteStringValue("dataType", &cast) + if err != nil { + return err + } + } + if m.GetDeviceComplianceScriptRuleDataType() != nil { + cast := (*m.GetDeviceComplianceScriptRuleDataType()).String() + err := writer.WriteStringValue("deviceComplianceScriptRuleDataType", &cast) + if err != nil { + return err + } + } + if m.GetDeviceComplianceScriptRulOperator() != nil { + cast := (*m.GetDeviceComplianceScriptRulOperator()).String() + err := writer.WriteStringValue("deviceComplianceScriptRulOperator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operand", m.GetOperand()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingName", m.GetSettingName()) + 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 *DeviceComplianceScriptRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDataType sets the dataType property value. Data types for rules. +func (m *DeviceComplianceScriptRule) SetDataType(value *DataType)() { + m.dataType = value +} +// SetDeviceComplianceScriptRuleDataType sets the deviceComplianceScriptRuleDataType property value. Data types for rules. +func (m *DeviceComplianceScriptRule) SetDeviceComplianceScriptRuleDataType(value *DeviceComplianceScriptRuleDataType)() { + m.deviceComplianceScriptRuleDataType = value +} +// SetDeviceComplianceScriptRulOperator sets the deviceComplianceScriptRulOperator property value. Operator for rules. +func (m *DeviceComplianceScriptRule) SetDeviceComplianceScriptRulOperator(value *DeviceComplianceScriptRulOperator)() { + m.deviceComplianceScriptRulOperator = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceComplianceScriptRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperand sets the operand property value. Operand specified in the rule. +func (m *DeviceComplianceScriptRule) SetOperand(value *string)() { + m.operand = value +} +// SetOperator sets the operator property value. Operator for rules. +func (m *DeviceComplianceScriptRule) SetOperator(value *Operator)() { + m.operator = value +} +// SetSettingName sets the settingName property value. Setting name specified in the rule. +func (m *DeviceComplianceScriptRule) SetSettingName(value *string)() { + m.settingName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_response.go new file mode 100644 index 000000000..cc633717b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleCollectionResponse +type DeviceComplianceScriptRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScriptRuleable +} +// NewDeviceComplianceScriptRuleCollectionResponse instantiates a new DeviceComplianceScriptRuleCollectionResponse and sets the default values. +func NewDeviceComplianceScriptRuleCollectionResponse()(*DeviceComplianceScriptRuleCollectionResponse) { + m := &DeviceComplianceScriptRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScriptRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScriptRuleCollectionResponse) GetValue()([]DeviceComplianceScriptRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScriptRuleCollectionResponse) SetValue(value []DeviceComplianceScriptRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_responseable.go new file mode 100644 index 000000000..84bcdba0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleCollectionResponseable +type DeviceComplianceScriptRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScriptRuleable) + SetValue(value []DeviceComplianceScriptRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_data_type.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_data_type.go new file mode 100644 index 000000000..02258aeda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_data_type.go @@ -0,0 +1,88 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type DeviceComplianceScriptRuleDataType int + +const ( + // None data type. + NONE_DEVICECOMPLIANCESCRIPTRULEDATATYPE DeviceComplianceScriptRuleDataType = iota + // Boolean data type. + BOOLEAN_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Int64 data type. + INT64_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Double data type. + DOUBLE_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // String data type. + STRING_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // DateTime data type. + DATETIME_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Version data type. + VERSION_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Base64 data type. + BASE64_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Xml data type. + XML_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Boolean array data type. + BOOLEANARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Int64 array data type. + INT64ARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Double array data type. + DOUBLEARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // String array data type. + STRINGARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // DateTime array data type. + DATETIMEARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + // Version array data type. + VERSIONARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE +) + +func (i DeviceComplianceScriptRuleDataType) String() string { + return []string{"none", "boolean", "int64", "double", "string", "dateTime", "version", "base64", "xml", "booleanArray", "int64Array", "doubleArray", "stringArray", "dateTimeArray", "versionArray"}[i] +} +func ParseDeviceComplianceScriptRuleDataType(v string) (interface{}, error) { + result := NONE_DEVICECOMPLIANCESCRIPTRULEDATATYPE + switch v { + case "none": + result = NONE_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "boolean": + result = BOOLEAN_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "int64": + result = INT64_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "double": + result = DOUBLE_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "string": + result = STRING_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "dateTime": + result = DATETIME_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "version": + result = VERSION_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "base64": + result = BASE64_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "xml": + result = XML_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "booleanArray": + result = BOOLEANARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "int64Array": + result = INT64ARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "doubleArray": + result = DOUBLEARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "stringArray": + result = STRINGARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "dateTimeArray": + result = DATETIMEARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + case "versionArray": + result = VERSIONARRAY_DEVICECOMPLIANCESCRIPTRULEDATATYPE + default: + return 0, errors.New("Unknown DeviceComplianceScriptRuleDataType value: " + v) + } + return &result, nil +} +func SerializeDeviceComplianceScriptRuleDataType(values []DeviceComplianceScriptRuleDataType) []string { + 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/device_compliance_script_rule_error.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error.go new file mode 100644 index 000000000..b4296fdb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleError +type DeviceComplianceScriptRuleError struct { + DeviceComplianceScriptError + // Setting name for the rule with error. + settingName *string +} +// NewDeviceComplianceScriptRuleError instantiates a new DeviceComplianceScriptRuleError and sets the default values. +func NewDeviceComplianceScriptRuleError()(*DeviceComplianceScriptRuleError) { + m := &DeviceComplianceScriptRuleError{ + DeviceComplianceScriptError: *NewDeviceComplianceScriptError(), + } + return m +} +// CreateDeviceComplianceScriptRuleErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptRuleErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptRuleError(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptRuleError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceComplianceScriptError.GetFieldDeserializers() + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + return res +} +// GetSettingName gets the settingName property value. Setting name for the rule with error. +func (m *DeviceComplianceScriptRuleError) GetSettingName()(*string) { + return m.settingName +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptRuleError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceComplianceScriptError.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + return nil +} +// SetSettingName sets the settingName property value. Setting name for the rule with error. +func (m *DeviceComplianceScriptRuleError) SetSettingName(value *string)() { + m.settingName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_response.go new file mode 100644 index 000000000..36274c0fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleErrorCollectionResponse +type DeviceComplianceScriptRuleErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceScriptRuleErrorable +} +// NewDeviceComplianceScriptRuleErrorCollectionResponse instantiates a new DeviceComplianceScriptRuleErrorCollectionResponse and sets the default values. +func NewDeviceComplianceScriptRuleErrorCollectionResponse()(*DeviceComplianceScriptRuleErrorCollectionResponse) { + m := &DeviceComplianceScriptRuleErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceScriptRuleErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptRuleErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptRuleErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptRuleErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptRuleErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptRuleErrorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptRuleErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceScriptRuleErrorCollectionResponse) GetValue()([]DeviceComplianceScriptRuleErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptRuleErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceScriptRuleErrorCollectionResponse) SetValue(value []DeviceComplianceScriptRuleErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_responseable.go new file mode 100644 index 000000000..2a3ca4a6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleErrorCollectionResponseable +type DeviceComplianceScriptRuleErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceScriptRuleErrorable) + SetValue(value []DeviceComplianceScriptRuleErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_errorable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_errorable.go new file mode 100644 index 000000000..e56399c70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rule_errorable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleErrorable +type DeviceComplianceScriptRuleErrorable interface { + DeviceComplianceScriptErrorable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettingName()(*string) + SetSettingName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_ruleable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_ruleable.go new file mode 100644 index 000000000..c9c7d3919 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_ruleable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRuleable +type DeviceComplianceScriptRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataType()(*DataType) + GetDeviceComplianceScriptRuleDataType()(*DeviceComplianceScriptRuleDataType) + GetDeviceComplianceScriptRulOperator()(*DeviceComplianceScriptRulOperator) + GetOdataType()(*string) + GetOperand()(*string) + GetOperator()(*Operator) + GetSettingName()(*string) + SetDataType(value *DataType)() + SetDeviceComplianceScriptRuleDataType(value *DeviceComplianceScriptRuleDataType)() + SetDeviceComplianceScriptRulOperator(value *DeviceComplianceScriptRulOperator)() + SetOdataType(value *string)() + SetOperand(value *string)() + SetOperator(value *Operator)() + SetSettingName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_rules_validation_error.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_rules_validation_error.go new file mode 100644 index 000000000..8da969f8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_rules_validation_error.go @@ -0,0 +1,156 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type DeviceComplianceScriptRulesValidationError int + +const ( + // None error. + NONE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR DeviceComplianceScriptRulesValidationError = iota + // Json file invalid error. + JSONFILEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Json file missing error. + JSONFILEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Json file too large error. + JSONFILETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Rules missing error. + RULESMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Duplicate rules error. + DUPLICATERULES_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Too many rules specified error. + TOOMANYRULESSPECIFIED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operator missing error. + OPERATORMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operator not supported error. + OPERATORNOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Data type missing error. + DATATYPEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Data type not supported error. + DATATYPENOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operator data type combination not supported error. + OPERATORDATATYPECOMBINATIONNOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // More info urlmissing error. + MOREINFOURIMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // More info url invalid error. + MOREINFOURIINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // More info ur ltoo large error. + MOREINFOURITOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Description missing error. + DESCRIPTIONMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Description invalid error. + DESCRIPTIONINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Description too large error. + DESCRIPTIONTOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Title missing error. + TITLEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Title invalid error. + TITLEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Title too large error. + TITLETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operand missing error. + OPERANDMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operand invalid error. + OPERANDINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Operand too large error. + OPERANDTOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Setting name missing error. + SETTINGNAMEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Setting name invalid error. + SETTINGNAMEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Setting name too large error. + SETTINGNAMETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // English locale missing error. + ENGLISHLOCALEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Duplicate locales error. + DUPLICATELOCALES_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Unrecognized locale error. + UNRECOGNIZEDLOCALE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Unknown error. + UNKNOWN_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + // Remediation strings missing error. + REMEDIATIONSTRINGSMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR +) + +func (i DeviceComplianceScriptRulesValidationError) String() string { + return []string{"none", "jsonFileInvalid", "jsonFileMissing", "jsonFileTooLarge", "rulesMissing", "duplicateRules", "tooManyRulesSpecified", "operatorMissing", "operatorNotSupported", "datatypeMissing", "datatypeNotSupported", "operatorDataTypeCombinationNotSupported", "moreInfoUriMissing", "moreInfoUriInvalid", "moreInfoUriTooLarge", "descriptionMissing", "descriptionInvalid", "descriptionTooLarge", "titleMissing", "titleInvalid", "titleTooLarge", "operandMissing", "operandInvalid", "operandTooLarge", "settingNameMissing", "settingNameInvalid", "settingNameTooLarge", "englishLocaleMissing", "duplicateLocales", "unrecognizedLocale", "unknown", "remediationStringsMissing"}[i] +} +func ParseDeviceComplianceScriptRulesValidationError(v string) (interface{}, error) { + result := NONE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + switch v { + case "none": + result = NONE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "jsonFileInvalid": + result = JSONFILEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "jsonFileMissing": + result = JSONFILEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "jsonFileTooLarge": + result = JSONFILETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "rulesMissing": + result = RULESMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "duplicateRules": + result = DUPLICATERULES_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "tooManyRulesSpecified": + result = TOOMANYRULESSPECIFIED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operatorMissing": + result = OPERATORMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operatorNotSupported": + result = OPERATORNOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "datatypeMissing": + result = DATATYPEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "datatypeNotSupported": + result = DATATYPENOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operatorDataTypeCombinationNotSupported": + result = OPERATORDATATYPECOMBINATIONNOTSUPPORTED_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "moreInfoUriMissing": + result = MOREINFOURIMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "moreInfoUriInvalid": + result = MOREINFOURIINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "moreInfoUriTooLarge": + result = MOREINFOURITOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "descriptionMissing": + result = DESCRIPTIONMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "descriptionInvalid": + result = DESCRIPTIONINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "descriptionTooLarge": + result = DESCRIPTIONTOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "titleMissing": + result = TITLEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "titleInvalid": + result = TITLEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "titleTooLarge": + result = TITLETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operandMissing": + result = OPERANDMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operandInvalid": + result = OPERANDINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "operandTooLarge": + result = OPERANDTOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "settingNameMissing": + result = SETTINGNAMEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "settingNameInvalid": + result = SETTINGNAMEINVALID_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "settingNameTooLarge": + result = SETTINGNAMETOOLARGE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "englishLocaleMissing": + result = ENGLISHLOCALEMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "duplicateLocales": + result = DUPLICATELOCALES_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "unrecognizedLocale": + result = UNRECOGNIZEDLOCALE_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "unknown": + result = UNKNOWN_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + case "remediationStringsMissing": + result = REMEDIATIONSTRINGSMISSING_DEVICECOMPLIANCESCRIPTRULESVALIDATIONERROR + default: + return 0, errors.New("Unknown DeviceComplianceScriptRulesValidationError value: " + v) + } + return &result, nil +} +func SerializeDeviceComplianceScriptRulesValidationError(values []DeviceComplianceScriptRulesValidationError) []string { + 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/device_compliance_script_run_summary.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_run_summary.go new file mode 100644 index 000000000..1eec8a7aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_run_summary.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRunSummary +type DeviceComplianceScriptRunSummary struct { + Entity + // Number of devices on which the detection script execution encountered an error and did not complete. Valid values -2147483648 to 2147483647 + detectionScriptErrorDeviceCount *int32 + // Number of devices which have not yet run the latest version of the device compliance script. Valid values -2147483648 to 2147483647 + detectionScriptPendingDeviceCount *int32 + // Number of devices for which the detection script found an issue. Valid values -2147483648 to 2147483647 + issueDetectedDeviceCount *int32 + // Last run time for the script across all devices + lastScriptRunDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of devices for which the detection script did not find an issue and the device is healthy. Valid values -2147483648 to 2147483647 + noIssueDetectedDeviceCount *int32 +} +// NewDeviceComplianceScriptRunSummary instantiates a new deviceComplianceScriptRunSummary and sets the default values. +func NewDeviceComplianceScriptRunSummary()(*DeviceComplianceScriptRunSummary) { + m := &DeviceComplianceScriptRunSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceScriptRunSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceScriptRunSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceScriptRunSummary(), nil +} +// GetDetectionScriptErrorDeviceCount gets the detectionScriptErrorDeviceCount property value. Number of devices on which the detection script execution encountered an error and did not complete. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) GetDetectionScriptErrorDeviceCount()(*int32) { + return m.detectionScriptErrorDeviceCount +} +// GetDetectionScriptPendingDeviceCount gets the detectionScriptPendingDeviceCount property value. Number of devices which have not yet run the latest version of the device compliance script. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) GetDetectionScriptPendingDeviceCount()(*int32) { + return m.detectionScriptPendingDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceScriptRunSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["detectionScriptErrorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptErrorDeviceCount(val) + } + return nil + } + res["detectionScriptPendingDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptPendingDeviceCount(val) + } + return nil + } + res["issueDetectedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueDetectedDeviceCount(val) + } + return nil + } + res["lastScriptRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastScriptRunDateTime(val) + } + return nil + } + res["noIssueDetectedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNoIssueDetectedDeviceCount(val) + } + return nil + } + return res +} +// GetIssueDetectedDeviceCount gets the issueDetectedDeviceCount property value. Number of devices for which the detection script found an issue. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) GetIssueDetectedDeviceCount()(*int32) { + return m.issueDetectedDeviceCount +} +// GetLastScriptRunDateTime gets the lastScriptRunDateTime property value. Last run time for the script across all devices +func (m *DeviceComplianceScriptRunSummary) GetLastScriptRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastScriptRunDateTime +} +// GetNoIssueDetectedDeviceCount gets the noIssueDetectedDeviceCount property value. Number of devices for which the detection script did not find an issue and the device is healthy. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) GetNoIssueDetectedDeviceCount()(*int32) { + return m.noIssueDetectedDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceComplianceScriptRunSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("detectionScriptErrorDeviceCount", m.GetDetectionScriptErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("detectionScriptPendingDeviceCount", m.GetDetectionScriptPendingDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("issueDetectedDeviceCount", m.GetIssueDetectedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastScriptRunDateTime", m.GetLastScriptRunDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("noIssueDetectedDeviceCount", m.GetNoIssueDetectedDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetDetectionScriptErrorDeviceCount sets the detectionScriptErrorDeviceCount property value. Number of devices on which the detection script execution encountered an error and did not complete. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) SetDetectionScriptErrorDeviceCount(value *int32)() { + m.detectionScriptErrorDeviceCount = value +} +// SetDetectionScriptPendingDeviceCount sets the detectionScriptPendingDeviceCount property value. Number of devices which have not yet run the latest version of the device compliance script. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) SetDetectionScriptPendingDeviceCount(value *int32)() { + m.detectionScriptPendingDeviceCount = value +} +// SetIssueDetectedDeviceCount sets the issueDetectedDeviceCount property value. Number of devices for which the detection script found an issue. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) SetIssueDetectedDeviceCount(value *int32)() { + m.issueDetectedDeviceCount = value +} +// SetLastScriptRunDateTime sets the lastScriptRunDateTime property value. Last run time for the script across all devices +func (m *DeviceComplianceScriptRunSummary) SetLastScriptRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastScriptRunDateTime = value +} +// SetNoIssueDetectedDeviceCount sets the noIssueDetectedDeviceCount property value. Number of devices for which the detection script did not find an issue and the device is healthy. Valid values -2147483648 to 2147483647 +func (m *DeviceComplianceScriptRunSummary) SetNoIssueDetectedDeviceCount(value *int32)() { + m.noIssueDetectedDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_script_run_summaryable.go b/src/internal/connector/graph/betasdk/models/device_compliance_script_run_summaryable.go new file mode 100644 index 000000000..ff443023d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_script_run_summaryable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptRunSummaryable +type DeviceComplianceScriptRunSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionScriptErrorDeviceCount()(*int32) + GetDetectionScriptPendingDeviceCount()(*int32) + GetIssueDetectedDeviceCount()(*int32) + GetLastScriptRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNoIssueDetectedDeviceCount()(*int32) + SetDetectionScriptErrorDeviceCount(value *int32)() + SetDetectionScriptPendingDeviceCount(value *int32)() + SetIssueDetectedDeviceCount(value *int32)() + SetLastScriptRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNoIssueDetectedDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_scriptable.go b/src/internal/connector/graph/betasdk/models/device_compliance_scriptable.go new file mode 100644 index 000000000..d063d8f32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_scriptable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceScriptable +type DeviceComplianceScriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceHealthScriptAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDetectionScriptContent()([]byte) + GetDeviceRunStates()([]DeviceComplianceScriptDeviceStateable) + GetDisplayName()(*string) + GetEnforceSignatureCheck()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublisher()(*string) + GetRoleScopeTagIds()([]string) + GetRunAs32Bit()(*bool) + GetRunAsAccount()(*RunAsAccountType) + GetRunSummary()(DeviceComplianceScriptRunSummaryable) + GetVersion()(*string) + SetAssignments(value []DeviceHealthScriptAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDetectionScriptContent(value []byte)() + SetDeviceRunStates(value []DeviceComplianceScriptDeviceStateable)() + SetDisplayName(value *string)() + SetEnforceSignatureCheck(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublisher(value *string)() + SetRoleScopeTagIds(value []string)() + SetRunAs32Bit(value *bool)() + SetRunAsAccount(value *RunAsAccountType)() + SetRunSummary(value DeviceComplianceScriptRunSummaryable)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_setting_state.go b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state.go new file mode 100644 index 000000000..c6793de39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state.go @@ -0,0 +1,349 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceSettingState device compliance setting State for a given device. +type DeviceComplianceSettingState struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Device Id that is being reported + deviceId *string + // The device model that is being reported + deviceModel *string + // The Device Name that is being reported + deviceName *string + // Device type. + platformType *DeviceType + // The setting class name and property name. + setting *string + // The Setting Name that is being reported + settingName *string + // The state property + state *ComplianceStatus + // The User email address that is being reported + userEmail *string + // The user Id that is being reported + userId *string + // The User Name that is being reported + userName *string + // The User PrincipalName that is being reported + userPrincipalName *string +} +// NewDeviceComplianceSettingState instantiates a new deviceComplianceSettingState and sets the default values. +func NewDeviceComplianceSettingState()(*DeviceComplianceSettingState) { + m := &DeviceComplianceSettingState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceSettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceSettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceSettingState(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceComplianceSettingState) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceId gets the deviceId property value. The Device Id that is being reported +func (m *DeviceComplianceSettingState) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *DeviceComplianceSettingState) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetDeviceName gets the deviceName property value. The Device Name that is being reported +func (m *DeviceComplianceSettingState) GetDeviceName()(*string) { + return m.deviceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceSettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*DeviceType)) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetPlatformType gets the platformType property value. Device type. +func (m *DeviceComplianceSettingState) GetPlatformType()(*DeviceType) { + return m.platformType +} +// GetSetting gets the setting property value. The setting class name and property name. +func (m *DeviceComplianceSettingState) GetSetting()(*string) { + return m.setting +} +// GetSettingName gets the settingName property value. The Setting Name that is being reported +func (m *DeviceComplianceSettingState) GetSettingName()(*string) { + return m.settingName +} +// GetState gets the state property value. The state property +func (m *DeviceComplianceSettingState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserEmail gets the userEmail property value. The User email address that is being reported +func (m *DeviceComplianceSettingState) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. The user Id that is being reported +func (m *DeviceComplianceSettingState) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *DeviceComplianceSettingState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The User PrincipalName that is being reported +func (m *DeviceComplianceSettingState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceComplianceSettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceComplianceSettingState) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceId sets the deviceId property value. The Device Id that is being reported +func (m *DeviceComplianceSettingState) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *DeviceComplianceSettingState) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetDeviceName sets the deviceName property value. The Device Name that is being reported +func (m *DeviceComplianceSettingState) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetPlatformType sets the platformType property value. Device type. +func (m *DeviceComplianceSettingState) SetPlatformType(value *DeviceType)() { + m.platformType = value +} +// SetSetting sets the setting property value. The setting class name and property name. +func (m *DeviceComplianceSettingState) SetSetting(value *string)() { + m.setting = value +} +// SetSettingName sets the settingName property value. The Setting Name that is being reported +func (m *DeviceComplianceSettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetState sets the state property value. The state property +func (m *DeviceComplianceSettingState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserEmail sets the userEmail property value. The User email address that is being reported +func (m *DeviceComplianceSettingState) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. The user Id that is being reported +func (m *DeviceComplianceSettingState) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *DeviceComplianceSettingState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The User PrincipalName that is being reported +func (m *DeviceComplianceSettingState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_response.go new file mode 100644 index 000000000..e8ef0e6d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceSettingStateCollectionResponse +type DeviceComplianceSettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceSettingStateable +} +// NewDeviceComplianceSettingStateCollectionResponse instantiates a new DeviceComplianceSettingStateCollectionResponse and sets the default values. +func NewDeviceComplianceSettingStateCollectionResponse()(*DeviceComplianceSettingStateCollectionResponse) { + m := &DeviceComplianceSettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceSettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceSettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceSettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceSettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceSettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceSettingStateCollectionResponse) GetValue()([]DeviceComplianceSettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceSettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceSettingStateCollectionResponse) SetValue(value []DeviceComplianceSettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_responseable.go new file mode 100644 index 000000000..a39be2f9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceSettingStateCollectionResponseable +type DeviceComplianceSettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceSettingStateable) + SetValue(value []DeviceComplianceSettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_setting_stateable.go b/src/internal/connector/graph/betasdk/models/device_compliance_setting_stateable.go new file mode 100644 index 000000000..a1f074041 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_setting_stateable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceSettingStateable +type DeviceComplianceSettingStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceId()(*string) + GetDeviceModel()(*string) + GetDeviceName()(*string) + GetPlatformType()(*DeviceType) + GetSetting()(*string) + GetSettingName()(*string) + GetState()(*ComplianceStatus) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceId(value *string)() + SetDeviceModel(value *string)() + SetDeviceName(value *string)() + SetPlatformType(value *DeviceType)() + SetSetting(value *string)() + SetSettingName(value *string)() + SetState(value *ComplianceStatus)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_overview.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_overview.go new file mode 100644 index 000000000..201e524cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_overview.go @@ -0,0 +1,243 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserOverview +type DeviceComplianceUserOverview struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of users in conflict + conflictCount *int32 + // Number of error Users + errorCount *int32 + // Number of failed Users + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable users + notApplicableCount *int32 + // Number of pending Users + pendingCount *int32 + // Number of succeeded Users + successCount *int32 +} +// NewDeviceComplianceUserOverview instantiates a new deviceComplianceUserOverview and sets the default values. +func NewDeviceComplianceUserOverview()(*DeviceComplianceUserOverview) { + m := &DeviceComplianceUserOverview{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceUserOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceUserOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceUserOverview(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceComplianceUserOverview) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of users in conflict +func (m *DeviceComplianceUserOverview) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error Users +func (m *DeviceComplianceUserOverview) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed Users +func (m *DeviceComplianceUserOverview) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceUserOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *DeviceComplianceUserOverview) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable users +func (m *DeviceComplianceUserOverview) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetPendingCount gets the pendingCount property value. Number of pending Users +func (m *DeviceComplianceUserOverview) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded Users +func (m *DeviceComplianceUserOverview) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceComplianceUserOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceComplianceUserOverview) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of users in conflict +func (m *DeviceComplianceUserOverview) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error Users +func (m *DeviceComplianceUserOverview) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed Users +func (m *DeviceComplianceUserOverview) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *DeviceComplianceUserOverview) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable users +func (m *DeviceComplianceUserOverview) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending Users +func (m *DeviceComplianceUserOverview) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded Users +func (m *DeviceComplianceUserOverview) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_overviewable.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_overviewable.go new file mode 100644 index 000000000..93fa47ace --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_overviewable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserOverviewable +type DeviceComplianceUserOverviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_status.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_status.go new file mode 100644 index 000000000..c62ee4d06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_status.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceComplianceUserStatus struct { + Entity + // Devices count for that user. + devicesCount *int32 + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *ComplianceStatus + // User name of the DevicePolicyStatus. + userDisplayName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceComplianceUserStatus instantiates a new deviceComplianceUserStatus and sets the default values. +func NewDeviceComplianceUserStatus()(*DeviceComplianceUserStatus) { + m := &DeviceComplianceUserStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceComplianceUserStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceUserStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceUserStatus(), nil +} +// GetDevicesCount gets the devicesCount property value. Devices count for that user. +func (m *DeviceComplianceUserStatus) GetDevicesCount()(*int32) { + return m.devicesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceUserStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["devicesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDevicesCount(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceComplianceUserStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetStatus gets the status property value. The status property +func (m *DeviceComplianceUserStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserDisplayName gets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *DeviceComplianceUserStatus) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceComplianceUserStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceComplianceUserStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("devicesCount", m.GetDevicesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDevicesCount sets the devicesCount property value. Devices count for that user. +func (m *DeviceComplianceUserStatus) SetDevicesCount(value *int32)() { + m.devicesCount = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceComplianceUserStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *DeviceComplianceUserStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserDisplayName sets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *DeviceComplianceUserStatus) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceComplianceUserStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_response.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_response.go new file mode 100644 index 000000000..f69207f3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserStatusCollectionResponse +type DeviceComplianceUserStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceComplianceUserStatusable +} +// NewDeviceComplianceUserStatusCollectionResponse instantiates a new DeviceComplianceUserStatusCollectionResponse and sets the default values. +func NewDeviceComplianceUserStatusCollectionResponse()(*DeviceComplianceUserStatusCollectionResponse) { + m := &DeviceComplianceUserStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceComplianceUserStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceComplianceUserStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceComplianceUserStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceComplianceUserStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceUserStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceComplianceUserStatusCollectionResponse) GetValue()([]DeviceComplianceUserStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceComplianceUserStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceComplianceUserStatusCollectionResponse) SetValue(value []DeviceComplianceUserStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_responseable.go new file mode 100644 index 000000000..f3da6dc65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserStatusCollectionResponseable +type DeviceComplianceUserStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceComplianceUserStatusable) + SetValue(value []DeviceComplianceUserStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_compliance_user_statusable.go b/src/internal/connector/graph/betasdk/models/device_compliance_user_statusable.go new file mode 100644 index 000000000..f38111d62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_compliance_user_statusable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceComplianceUserStatusable +type DeviceComplianceUserStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevicesCount()(*int32) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*ComplianceStatus) + GetUserDisplayName()(*string) + GetUserPrincipalName()(*string) + SetDevicesCount(value *int32)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *ComplianceStatus)() + SetUserDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_config_assignment_intent.go b/src/internal/connector/graph/betasdk/models/device_config_assignment_intent.go new file mode 100644 index 000000000..4efa4ce01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_config_assignment_intent.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceConfigAssignmentIntent int + +const ( + // Ensure that the configuration profile is applied to the devices in the assignment. + APPLY_DEVICECONFIGASSIGNMENTINTENT DeviceConfigAssignmentIntent = iota + // Ensure that the configuration profile is removed from devices that have previously installed the configuration profile. + REMOVE_DEVICECONFIGASSIGNMENTINTENT +) + +func (i DeviceConfigAssignmentIntent) String() string { + return []string{"apply", "remove"}[i] +} +func ParseDeviceConfigAssignmentIntent(v string) (interface{}, error) { + result := APPLY_DEVICECONFIGASSIGNMENTINTENT + switch v { + case "apply": + result = APPLY_DEVICECONFIGASSIGNMENTINTENT + case "remove": + result = REMOVE_DEVICECONFIGASSIGNMENTINTENT + default: + return 0, errors.New("Unknown DeviceConfigAssignmentIntent value: " + v) + } + return &result, nil +} +func SerializeDeviceConfigAssignmentIntent(values []DeviceConfigAssignmentIntent) []string { + 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/device_configuration.go b/src/internal/connector/graph/betasdk/models/device_configuration.go new file mode 100644 index 000000000..f31d7e6e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration.go @@ -0,0 +1,805 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfiguration device Configuration. +type DeviceConfiguration struct { + Entity + // The list of assignments for the device configuration profile. + assignments []DeviceConfigurationAssignmentable + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the Device Configuration. + description *string + // The device mode applicability rule for this Policy. + deviceManagementApplicabilityRuleDeviceMode DeviceManagementApplicabilityRuleDeviceModeable + // The OS edition applicability for this Policy. + deviceManagementApplicabilityRuleOsEdition DeviceManagementApplicabilityRuleOsEditionable + // The OS version applicability rule for this Policy. + deviceManagementApplicabilityRuleOsVersion DeviceManagementApplicabilityRuleOsVersionable + // Device Configuration Setting State Device Summary + deviceSettingStateSummaries []SettingStateDeviceSummaryable + // Device configuration installation status by device. + deviceStatuses []DeviceConfigurationDeviceStatusable + // Device Configuration devices status overview + deviceStatusOverview DeviceConfigurationDeviceOverviewable + // Admin provided name of the device configuration. + displayName *string + // The list of group assignments for the device configuration profile. + groupAssignments []DeviceConfigurationGroupAssignmentable + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only. + supportsScopeTags *bool + // Device configuration installation status by user. + userStatuses []DeviceConfigurationUserStatusable + // Device Configuration users status overview + userStatusOverview DeviceConfigurationUserOverviewable + // Version of the device configuration. + version *int32 +} +// NewDeviceConfiguration instantiates a new deviceConfiguration and sets the default values. +func NewDeviceConfiguration()(*DeviceConfiguration) { + m := &DeviceConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidCertificateProfileBase": + return NewAndroidCertificateProfileBase(), nil + case "#microsoft.graph.androidCustomConfiguration": + return NewAndroidCustomConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerCertificateProfileBase": + return NewAndroidDeviceOwnerCertificateProfileBase(), nil + case "#microsoft.graph.androidDeviceOwnerDerivedCredentialAuthenticationConfiguration": + return NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration": + return NewAndroidDeviceOwnerEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerGeneralDeviceConfiguration": + return NewAndroidDeviceOwnerGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerImportedPFXCertificateProfile": + return NewAndroidDeviceOwnerImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerPkcsCertificateProfile": + return NewAndroidDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerScepCertificateProfile": + return NewAndroidDeviceOwnerScepCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerTrustedRootCertificate": + return NewAndroidDeviceOwnerTrustedRootCertificate(), nil + case "#microsoft.graph.androidDeviceOwnerVpnConfiguration": + return NewAndroidDeviceOwnerVpnConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerWiFiConfiguration": + return NewAndroidDeviceOwnerWiFiConfiguration(), nil + case "#microsoft.graph.androidEasEmailProfileConfiguration": + return NewAndroidEasEmailProfileConfiguration(), nil + case "#microsoft.graph.androidEnterpriseWiFiConfiguration": + return NewAndroidEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidForWorkCertificateProfileBase": + return NewAndroidForWorkCertificateProfileBase(), nil + case "#microsoft.graph.androidForWorkCustomConfiguration": + return NewAndroidForWorkCustomConfiguration(), nil + case "#microsoft.graph.androidForWorkEasEmailProfileBase": + return NewAndroidForWorkEasEmailProfileBase(), nil + case "#microsoft.graph.androidForWorkEnterpriseWiFiConfiguration": + return NewAndroidForWorkEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidForWorkGeneralDeviceConfiguration": + return NewAndroidForWorkGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidForWorkGmailEasConfiguration": + return NewAndroidForWorkGmailEasConfiguration(), nil + case "#microsoft.graph.androidForWorkImportedPFXCertificateProfile": + return NewAndroidForWorkImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidForWorkNineWorkEasConfiguration": + return NewAndroidForWorkNineWorkEasConfiguration(), nil + case "#microsoft.graph.androidForWorkPkcsCertificateProfile": + return NewAndroidForWorkPkcsCertificateProfile(), nil + case "#microsoft.graph.androidForWorkScepCertificateProfile": + return NewAndroidForWorkScepCertificateProfile(), nil + case "#microsoft.graph.androidForWorkTrustedRootCertificate": + return NewAndroidForWorkTrustedRootCertificate(), nil + case "#microsoft.graph.androidForWorkVpnConfiguration": + return NewAndroidForWorkVpnConfiguration(), nil + case "#microsoft.graph.androidForWorkWiFiConfiguration": + return NewAndroidForWorkWiFiConfiguration(), nil + case "#microsoft.graph.androidGeneralDeviceConfiguration": + return NewAndroidGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidImportedPFXCertificateProfile": + return NewAndroidImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidOmaCpConfiguration": + return NewAndroidOmaCpConfiguration(), nil + case "#microsoft.graph.androidPkcsCertificateProfile": + return NewAndroidPkcsCertificateProfile(), nil + case "#microsoft.graph.androidScepCertificateProfile": + return NewAndroidScepCertificateProfile(), nil + case "#microsoft.graph.androidTrustedRootCertificate": + return NewAndroidTrustedRootCertificate(), nil + case "#microsoft.graph.androidVpnConfiguration": + return NewAndroidVpnConfiguration(), nil + case "#microsoft.graph.androidWiFiConfiguration": + return NewAndroidWiFiConfiguration(), nil + case "#microsoft.graph.androidWorkProfileCertificateProfileBase": + return NewAndroidWorkProfileCertificateProfileBase(), nil + case "#microsoft.graph.androidWorkProfileCustomConfiguration": + return NewAndroidWorkProfileCustomConfiguration(), nil + case "#microsoft.graph.androidWorkProfileEasEmailProfileBase": + return NewAndroidWorkProfileEasEmailProfileBase(), nil + case "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration": + return NewAndroidWorkProfileEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration": + return NewAndroidWorkProfileGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidWorkProfileGmailEasConfiguration": + return NewAndroidWorkProfileGmailEasConfiguration(), nil + case "#microsoft.graph.androidWorkProfileNineWorkEasConfiguration": + return NewAndroidWorkProfileNineWorkEasConfiguration(), nil + case "#microsoft.graph.androidWorkProfilePkcsCertificateProfile": + return NewAndroidWorkProfilePkcsCertificateProfile(), nil + case "#microsoft.graph.androidWorkProfileScepCertificateProfile": + return NewAndroidWorkProfileScepCertificateProfile(), nil + case "#microsoft.graph.androidWorkProfileTrustedRootCertificate": + return NewAndroidWorkProfileTrustedRootCertificate(), nil + case "#microsoft.graph.androidWorkProfileVpnConfiguration": + return NewAndroidWorkProfileVpnConfiguration(), nil + case "#microsoft.graph.androidWorkProfileWiFiConfiguration": + return NewAndroidWorkProfileWiFiConfiguration(), nil + case "#microsoft.graph.aospDeviceOwnerCertificateProfileBase": + return NewAospDeviceOwnerCertificateProfileBase(), nil + case "#microsoft.graph.aospDeviceOwnerDeviceConfiguration": + return NewAospDeviceOwnerDeviceConfiguration(), nil + case "#microsoft.graph.aospDeviceOwnerEnterpriseWiFiConfiguration": + return NewAospDeviceOwnerEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.aospDeviceOwnerPkcsCertificateProfile": + return NewAospDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.aospDeviceOwnerScepCertificateProfile": + return NewAospDeviceOwnerScepCertificateProfile(), nil + case "#microsoft.graph.aospDeviceOwnerTrustedRootCertificate": + return NewAospDeviceOwnerTrustedRootCertificate(), nil + case "#microsoft.graph.aospDeviceOwnerWiFiConfiguration": + return NewAospDeviceOwnerWiFiConfiguration(), nil + case "#microsoft.graph.appleDeviceFeaturesConfigurationBase": + return NewAppleDeviceFeaturesConfigurationBase(), nil + case "#microsoft.graph.appleExpeditedCheckinConfigurationBase": + return NewAppleExpeditedCheckinConfigurationBase(), nil + case "#microsoft.graph.appleVpnConfiguration": + return NewAppleVpnConfiguration(), nil + case "#microsoft.graph.easEmailProfileConfigurationBase": + return NewEasEmailProfileConfigurationBase(), nil + case "#microsoft.graph.editionUpgradeConfiguration": + return NewEditionUpgradeConfiguration(), nil + case "#microsoft.graph.iosCertificateProfile": + return NewIosCertificateProfile(), nil + case "#microsoft.graph.iosCertificateProfileBase": + return NewIosCertificateProfileBase(), nil + case "#microsoft.graph.iosCustomConfiguration": + return NewIosCustomConfiguration(), nil + case "#microsoft.graph.iosDerivedCredentialAuthenticationConfiguration": + return NewIosDerivedCredentialAuthenticationConfiguration(), nil + case "#microsoft.graph.iosDeviceFeaturesConfiguration": + return NewIosDeviceFeaturesConfiguration(), nil + case "#microsoft.graph.iosEasEmailProfileConfiguration": + return NewIosEasEmailProfileConfiguration(), nil + case "#microsoft.graph.iosEducationDeviceConfiguration": + return NewIosEducationDeviceConfiguration(), nil + case "#microsoft.graph.iosEduDeviceConfiguration": + return NewIosEduDeviceConfiguration(), nil + case "#microsoft.graph.iosEnterpriseWiFiConfiguration": + return NewIosEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.iosExpeditedCheckinConfiguration": + return NewIosExpeditedCheckinConfiguration(), nil + case "#microsoft.graph.iosGeneralDeviceConfiguration": + return NewIosGeneralDeviceConfiguration(), nil + case "#microsoft.graph.iosikEv2VpnConfiguration": + return NewIosikEv2VpnConfiguration(), nil + case "#microsoft.graph.iosImportedPFXCertificateProfile": + return NewIosImportedPFXCertificateProfile(), nil + case "#microsoft.graph.iosPkcsCertificateProfile": + return NewIosPkcsCertificateProfile(), nil + case "#microsoft.graph.iosScepCertificateProfile": + return NewIosScepCertificateProfile(), nil + case "#microsoft.graph.iosTrustedRootCertificate": + return NewIosTrustedRootCertificate(), nil + case "#microsoft.graph.iosUpdateConfiguration": + return NewIosUpdateConfiguration(), nil + case "#microsoft.graph.iosVpnConfiguration": + return NewIosVpnConfiguration(), nil + case "#microsoft.graph.iosWiFiConfiguration": + return NewIosWiFiConfiguration(), nil + case "#microsoft.graph.macOSCertificateProfileBase": + return NewMacOSCertificateProfileBase(), nil + case "#microsoft.graph.macOSCustomAppConfiguration": + return NewMacOSCustomAppConfiguration(), nil + case "#microsoft.graph.macOSCustomConfiguration": + return NewMacOSCustomConfiguration(), nil + case "#microsoft.graph.macOSDeviceFeaturesConfiguration": + return NewMacOSDeviceFeaturesConfiguration(), nil + case "#microsoft.graph.macOSEndpointProtectionConfiguration": + return NewMacOSEndpointProtectionConfiguration(), nil + case "#microsoft.graph.macOSEnterpriseWiFiConfiguration": + return NewMacOSEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.macOSExtensionsConfiguration": + return NewMacOSExtensionsConfiguration(), nil + case "#microsoft.graph.macOSGeneralDeviceConfiguration": + return NewMacOSGeneralDeviceConfiguration(), nil + case "#microsoft.graph.macOSImportedPFXCertificateProfile": + return NewMacOSImportedPFXCertificateProfile(), nil + case "#microsoft.graph.macOSPkcsCertificateProfile": + return NewMacOSPkcsCertificateProfile(), nil + case "#microsoft.graph.macOSScepCertificateProfile": + return NewMacOSScepCertificateProfile(), nil + case "#microsoft.graph.macOSSoftwareUpdateConfiguration": + return NewMacOSSoftwareUpdateConfiguration(), nil + case "#microsoft.graph.macOSTrustedRootCertificate": + return NewMacOSTrustedRootCertificate(), nil + case "#microsoft.graph.macOSVpnConfiguration": + return NewMacOSVpnConfiguration(), nil + case "#microsoft.graph.macOSWiFiConfiguration": + return NewMacOSWiFiConfiguration(), nil + case "#microsoft.graph.macOSWiredNetworkConfiguration": + return NewMacOSWiredNetworkConfiguration(), nil + case "#microsoft.graph.sharedPCConfiguration": + return NewSharedPCConfiguration(), nil + case "#microsoft.graph.unsupportedDeviceConfiguration": + return NewUnsupportedDeviceConfiguration(), nil + case "#microsoft.graph.vpnConfiguration": + return NewVpnConfiguration(), nil + case "#microsoft.graph.windows10CertificateProfileBase": + return NewWindows10CertificateProfileBase(), nil + case "#microsoft.graph.windows10CustomConfiguration": + return NewWindows10CustomConfiguration(), nil + case "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface": + return NewWindows10DeviceFirmwareConfigurationInterface(), nil + case "#microsoft.graph.windows10EasEmailProfileConfiguration": + return NewWindows10EasEmailProfileConfiguration(), nil + case "#microsoft.graph.windows10EndpointProtectionConfiguration": + return NewWindows10EndpointProtectionConfiguration(), nil + case "#microsoft.graph.windows10EnterpriseModernAppManagementConfiguration": + return NewWindows10EnterpriseModernAppManagementConfiguration(), nil + case "#microsoft.graph.windows10GeneralConfiguration": + return NewWindows10GeneralConfiguration(), nil + case "#microsoft.graph.windows10ImportedPFXCertificateProfile": + return NewWindows10ImportedPFXCertificateProfile(), nil + case "#microsoft.graph.windows10NetworkBoundaryConfiguration": + return NewWindows10NetworkBoundaryConfiguration(), nil + case "#microsoft.graph.windows10PFXImportCertificateProfile": + return NewWindows10PFXImportCertificateProfile(), nil + case "#microsoft.graph.windows10PkcsCertificateProfile": + return NewWindows10PkcsCertificateProfile(), nil + case "#microsoft.graph.windows10SecureAssessmentConfiguration": + return NewWindows10SecureAssessmentConfiguration(), nil + case "#microsoft.graph.windows10TeamGeneralConfiguration": + return NewWindows10TeamGeneralConfiguration(), nil + case "#microsoft.graph.windows10VpnConfiguration": + return NewWindows10VpnConfiguration(), nil + case "#microsoft.graph.windows81CertificateProfileBase": + return NewWindows81CertificateProfileBase(), nil + case "#microsoft.graph.windows81GeneralConfiguration": + return NewWindows81GeneralConfiguration(), nil + case "#microsoft.graph.windows81SCEPCertificateProfile": + return NewWindows81SCEPCertificateProfile(), nil + case "#microsoft.graph.windows81TrustedRootCertificate": + return NewWindows81TrustedRootCertificate(), nil + case "#microsoft.graph.windows81VpnConfiguration": + return NewWindows81VpnConfiguration(), nil + case "#microsoft.graph.windows81WifiImportConfiguration": + return NewWindows81WifiImportConfiguration(), nil + case "#microsoft.graph.windowsCertificateProfileBase": + return NewWindowsCertificateProfileBase(), nil + case "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration": + return NewWindowsDefenderAdvancedThreatProtectionConfiguration(), nil + case "#microsoft.graph.windowsDeliveryOptimizationConfiguration": + return NewWindowsDeliveryOptimizationConfiguration(), nil + case "#microsoft.graph.windowsDomainJoinConfiguration": + return NewWindowsDomainJoinConfiguration(), nil + case "#microsoft.graph.windowsHealthMonitoringConfiguration": + return NewWindowsHealthMonitoringConfiguration(), nil + case "#microsoft.graph.windowsIdentityProtectionConfiguration": + return NewWindowsIdentityProtectionConfiguration(), nil + case "#microsoft.graph.windowsKioskConfiguration": + return NewWindowsKioskConfiguration(), nil + case "#microsoft.graph.windowsPhone81CertificateProfileBase": + return NewWindowsPhone81CertificateProfileBase(), nil + case "#microsoft.graph.windowsPhone81CustomConfiguration": + return NewWindowsPhone81CustomConfiguration(), nil + case "#microsoft.graph.windowsPhone81GeneralConfiguration": + return NewWindowsPhone81GeneralConfiguration(), nil + case "#microsoft.graph.windowsPhone81ImportedPFXCertificateProfile": + return NewWindowsPhone81ImportedPFXCertificateProfile(), nil + case "#microsoft.graph.windowsPhone81SCEPCertificateProfile": + return NewWindowsPhone81SCEPCertificateProfile(), nil + case "#microsoft.graph.windowsPhone81TrustedRootCertificate": + return NewWindowsPhone81TrustedRootCertificate(), nil + case "#microsoft.graph.windowsPhone81VpnConfiguration": + return NewWindowsPhone81VpnConfiguration(), nil + case "#microsoft.graph.windowsPhoneEASEmailProfileConfiguration": + return NewWindowsPhoneEASEmailProfileConfiguration(), nil + case "#microsoft.graph.windowsUpdateForBusinessConfiguration": + return NewWindowsUpdateForBusinessConfiguration(), nil + case "#microsoft.graph.windowsVpnConfiguration": + return NewWindowsVpnConfiguration(), nil + case "#microsoft.graph.windowsWifiConfiguration": + return NewWindowsWifiConfiguration(), nil + case "#microsoft.graph.windowsWifiEnterpriseEAPConfiguration": + return NewWindowsWifiEnterpriseEAPConfiguration(), nil + case "#microsoft.graph.windowsWiredNetworkConfiguration": + return NewWindowsWiredNetworkConfiguration(), nil + } + } + } + } + return NewDeviceConfiguration(), nil +} +// GetAssignments gets the assignments property value. The list of assignments for the device configuration profile. +func (m *DeviceConfiguration) GetAssignments()([]DeviceConfigurationAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *DeviceConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceConfiguration) GetDescription()(*string) { + return m.description +} +// GetDeviceManagementApplicabilityRuleDeviceMode gets the deviceManagementApplicabilityRuleDeviceMode property value. The device mode applicability rule for this Policy. +func (m *DeviceConfiguration) GetDeviceManagementApplicabilityRuleDeviceMode()(DeviceManagementApplicabilityRuleDeviceModeable) { + return m.deviceManagementApplicabilityRuleDeviceMode +} +// GetDeviceManagementApplicabilityRuleOsEdition gets the deviceManagementApplicabilityRuleOsEdition property value. The OS edition applicability for this Policy. +func (m *DeviceConfiguration) GetDeviceManagementApplicabilityRuleOsEdition()(DeviceManagementApplicabilityRuleOsEditionable) { + return m.deviceManagementApplicabilityRuleOsEdition +} +// GetDeviceManagementApplicabilityRuleOsVersion gets the deviceManagementApplicabilityRuleOsVersion property value. The OS version applicability rule for this Policy. +func (m *DeviceConfiguration) GetDeviceManagementApplicabilityRuleOsVersion()(DeviceManagementApplicabilityRuleOsVersionable) { + return m.deviceManagementApplicabilityRuleOsVersion +} +// GetDeviceSettingStateSummaries gets the deviceSettingStateSummaries property value. Device Configuration Setting State Device Summary +func (m *DeviceConfiguration) GetDeviceSettingStateSummaries()([]SettingStateDeviceSummaryable) { + return m.deviceSettingStateSummaries +} +// GetDeviceStatuses gets the deviceStatuses property value. Device configuration installation status by device. +func (m *DeviceConfiguration) GetDeviceStatuses()([]DeviceConfigurationDeviceStatusable) { + return m.deviceStatuses +} +// GetDeviceStatusOverview gets the deviceStatusOverview property value. Device Configuration devices status overview +func (m *DeviceConfiguration) GetDeviceStatusOverview()(DeviceConfigurationDeviceOverviewable) { + return m.deviceStatusOverview +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceManagementApplicabilityRuleDeviceMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementApplicabilityRuleDeviceModeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceManagementApplicabilityRuleDeviceMode(val.(DeviceManagementApplicabilityRuleDeviceModeable)) + } + return nil + } + res["deviceManagementApplicabilityRuleOsEdition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementApplicabilityRuleOsEditionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceManagementApplicabilityRuleOsEdition(val.(DeviceManagementApplicabilityRuleOsEditionable)) + } + return nil + } + res["deviceManagementApplicabilityRuleOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementApplicabilityRuleOsVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceManagementApplicabilityRuleOsVersion(val.(DeviceManagementApplicabilityRuleOsVersionable)) + } + return nil + } + res["deviceSettingStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingStateDeviceSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingStateDeviceSummaryable, len(val)) + for i, v := range val { + res[i] = v.(SettingStateDeviceSummaryable) + } + m.SetDeviceSettingStateSummaries(res) + } + return nil + } + res["deviceStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationDeviceStatusable) + } + m.SetDeviceStatuses(res) + } + return nil + } + res["deviceStatusOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceConfigurationDeviceOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStatusOverview(val.(DeviceConfigurationDeviceOverviewable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["groupAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationGroupAssignmentable) + } + m.SetGroupAssignments(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["supportsScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportsScopeTags(val) + } + return nil + } + res["userStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationUserStatusable) + } + m.SetUserStatuses(res) + } + return nil + } + res["userStatusOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceConfigurationUserOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserStatusOverview(val.(DeviceConfigurationUserOverviewable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetGroupAssignments gets the groupAssignments property value. The list of group assignments for the device configuration profile. +func (m *DeviceConfiguration) GetGroupAssignments()([]DeviceConfigurationGroupAssignmentable) { + return m.groupAssignments +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSupportsScopeTags gets the supportsScopeTags property value. Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only. +func (m *DeviceConfiguration) GetSupportsScopeTags()(*bool) { + return m.supportsScopeTags +} +// GetUserStatuses gets the userStatuses property value. Device configuration installation status by user. +func (m *DeviceConfiguration) GetUserStatuses()([]DeviceConfigurationUserStatusable) { + return m.userStatuses +} +// GetUserStatusOverview gets the userStatusOverview property value. Device Configuration users status overview +func (m *DeviceConfiguration) GetUserStatusOverview()(DeviceConfigurationUserOverviewable) { + return m.userStatusOverview +} +// GetVersion gets the version property value. Version of the device configuration. +func (m *DeviceConfiguration) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceManagementApplicabilityRuleDeviceMode", m.GetDeviceManagementApplicabilityRuleDeviceMode()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceManagementApplicabilityRuleOsEdition", m.GetDeviceManagementApplicabilityRuleOsEdition()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceManagementApplicabilityRuleOsVersion", m.GetDeviceManagementApplicabilityRuleOsVersion()) + if err != nil { + return err + } + } + if m.GetDeviceSettingStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceSettingStateSummaries())) + for i, v := range m.GetDeviceSettingStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceSettingStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStatuses())) + for i, v := range m.GetDeviceStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceStatusOverview", m.GetDeviceStatusOverview()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetGroupAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupAssignments())) + for i, v := range m.GetGroupAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetUserStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStatuses())) + for i, v := range m.GetUserStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userStatusOverview", m.GetUserStatusOverview()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of assignments for the device configuration profile. +func (m *DeviceConfiguration) SetAssignments(value []DeviceConfigurationAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *DeviceConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDeviceManagementApplicabilityRuleDeviceMode sets the deviceManagementApplicabilityRuleDeviceMode property value. The device mode applicability rule for this Policy. +func (m *DeviceConfiguration) SetDeviceManagementApplicabilityRuleDeviceMode(value DeviceManagementApplicabilityRuleDeviceModeable)() { + m.deviceManagementApplicabilityRuleDeviceMode = value +} +// SetDeviceManagementApplicabilityRuleOsEdition sets the deviceManagementApplicabilityRuleOsEdition property value. The OS edition applicability for this Policy. +func (m *DeviceConfiguration) SetDeviceManagementApplicabilityRuleOsEdition(value DeviceManagementApplicabilityRuleOsEditionable)() { + m.deviceManagementApplicabilityRuleOsEdition = value +} +// SetDeviceManagementApplicabilityRuleOsVersion sets the deviceManagementApplicabilityRuleOsVersion property value. The OS version applicability rule for this Policy. +func (m *DeviceConfiguration) SetDeviceManagementApplicabilityRuleOsVersion(value DeviceManagementApplicabilityRuleOsVersionable)() { + m.deviceManagementApplicabilityRuleOsVersion = value +} +// SetDeviceSettingStateSummaries sets the deviceSettingStateSummaries property value. Device Configuration Setting State Device Summary +func (m *DeviceConfiguration) SetDeviceSettingStateSummaries(value []SettingStateDeviceSummaryable)() { + m.deviceSettingStateSummaries = value +} +// SetDeviceStatuses sets the deviceStatuses property value. Device configuration installation status by device. +func (m *DeviceConfiguration) SetDeviceStatuses(value []DeviceConfigurationDeviceStatusable)() { + m.deviceStatuses = value +} +// SetDeviceStatusOverview sets the deviceStatusOverview property value. Device Configuration devices status overview +func (m *DeviceConfiguration) SetDeviceStatusOverview(value DeviceConfigurationDeviceOverviewable)() { + m.deviceStatusOverview = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGroupAssignments sets the groupAssignments property value. The list of group assignments for the device configuration profile. +func (m *DeviceConfiguration) SetGroupAssignments(value []DeviceConfigurationGroupAssignmentable)() { + m.groupAssignments = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSupportsScopeTags sets the supportsScopeTags property value. Indicates whether or not the underlying Device Configuration supports the assignment of scope tags. Assigning to the ScopeTags property is not allowed when this value is false and entities will not be visible to scoped users. This occurs for Legacy policies created in Silverlight and can be resolved by deleting and recreating the policy in the Azure Portal. This property is read-only. +func (m *DeviceConfiguration) SetSupportsScopeTags(value *bool)() { + m.supportsScopeTags = value +} +// SetUserStatuses sets the userStatuses property value. Device configuration installation status by user. +func (m *DeviceConfiguration) SetUserStatuses(value []DeviceConfigurationUserStatusable)() { + m.userStatuses = value +} +// SetUserStatusOverview sets the userStatusOverview property value. Device Configuration users status overview +func (m *DeviceConfiguration) SetUserStatusOverview(value DeviceConfigurationUserOverviewable)() { + m.userStatusOverview = value +} +// SetVersion sets the version property value. Version of the device configuration. +func (m *DeviceConfiguration) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/device_configuration_assignment.go new file mode 100644 index 000000000..553b42640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_assignment.go @@ -0,0 +1,134 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationAssignment the device configuration assignment entity assigns an AAD group to a specific device configuration. +type DeviceConfigurationAssignment struct { + Entity + // The admin intent to apply or remove the profile. Possible values are: apply, remove. + intent *DeviceConfigAssignmentIntent + // Represents source of assignment. + source *DeviceAndAppManagementAssignmentSource + // The identifier of the source of the assignment. This property is read-only. + sourceId *string + // The assignment target for the device configuration. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceConfigurationAssignment instantiates a new deviceConfigurationAssignment and sets the default values. +func NewDeviceConfigurationAssignment()(*DeviceConfigurationAssignment) { + m := &DeviceConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["intent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceConfigAssignmentIntent) + if err != nil { + return err + } + if val != nil { + m.SetIntent(val.(*DeviceConfigAssignmentIntent)) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*DeviceAndAppManagementAssignmentSource)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetIntent gets the intent property value. The admin intent to apply or remove the profile. Possible values are: apply, remove. +func (m *DeviceConfigurationAssignment) GetIntent()(*DeviceConfigAssignmentIntent) { + return m.intent +} +// GetSource gets the source property value. Represents source of assignment. +func (m *DeviceConfigurationAssignment) GetSource()(*DeviceAndAppManagementAssignmentSource) { + return m.source +} +// GetSourceId gets the sourceId property value. The identifier of the source of the assignment. This property is read-only. +func (m *DeviceConfigurationAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. The assignment target for the device configuration. +func (m *DeviceConfigurationAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetIntent() != nil { + cast := (*m.GetIntent()).String() + err = writer.WriteStringValue("intent", &cast) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetIntent sets the intent property value. The admin intent to apply or remove the profile. Possible values are: apply, remove. +func (m *DeviceConfigurationAssignment) SetIntent(value *DeviceConfigAssignmentIntent)() { + m.intent = value +} +// SetSource sets the source property value. Represents source of assignment. +func (m *DeviceConfigurationAssignment) SetSource(value *DeviceAndAppManagementAssignmentSource)() { + m.source = value +} +// SetSourceId sets the sourceId property value. The identifier of the source of the assignment. This property is read-only. +func (m *DeviceConfigurationAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. The assignment target for the device configuration. +func (m *DeviceConfigurationAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_response.go new file mode 100644 index 000000000..dd9ce1294 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationAssignmentCollectionResponse +type DeviceConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationAssignmentable +} +// NewDeviceConfigurationAssignmentCollectionResponse instantiates a new DeviceConfigurationAssignmentCollectionResponse and sets the default values. +func NewDeviceConfigurationAssignmentCollectionResponse()(*DeviceConfigurationAssignmentCollectionResponse) { + m := &DeviceConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationAssignmentCollectionResponse) GetValue()([]DeviceConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationAssignmentCollectionResponse) SetValue(value []DeviceConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..4b69b27d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationAssignmentCollectionResponseable +type DeviceConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationAssignmentable) + SetValue(value []DeviceConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_configuration_assignmentable.go new file mode 100644 index 000000000..3d127b49e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_assignmentable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationAssignmentable +type DeviceConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntent()(*DeviceConfigAssignmentIntent) + GetSource()(*DeviceAndAppManagementAssignmentSource) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetIntent(value *DeviceConfigAssignmentIntent)() + SetSource(value *DeviceAndAppManagementAssignmentSource)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_collection_response.go new file mode 100644 index 000000000..d4b2d8007 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationCollectionResponse +type DeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationable +} +// NewDeviceConfigurationCollectionResponse instantiates a new DeviceConfigurationCollectionResponse and sets the default values. +func NewDeviceConfigurationCollectionResponse()(*DeviceConfigurationCollectionResponse) { + m := &DeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationCollectionResponse) GetValue()([]DeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationCollectionResponse) SetValue(value []DeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_collection_responseable.go new file mode 100644 index 000000000..3860d8303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationCollectionResponseable +type DeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationable) + SetValue(value []DeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary.go b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary.go new file mode 100644 index 000000000..721937f3e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationConflictSummary conflict summary for a set of device configuration policies. +type DeviceConfigurationConflictSummary struct { + Entity + // The set of policies in conflict with the given setting + conflictingDeviceConfigurations []SettingSourceable + // The set of settings in conflict with the given policies + contributingSettings []string + // The count of checkins impacted by the conflicting policies and settings + deviceCheckinsImpacted *int32 +} +// NewDeviceConfigurationConflictSummary instantiates a new deviceConfigurationConflictSummary and sets the default values. +func NewDeviceConfigurationConflictSummary()(*DeviceConfigurationConflictSummary) { + m := &DeviceConfigurationConflictSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationConflictSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationConflictSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationConflictSummary(), nil +} +// GetConflictingDeviceConfigurations gets the conflictingDeviceConfigurations property value. The set of policies in conflict with the given setting +func (m *DeviceConfigurationConflictSummary) GetConflictingDeviceConfigurations()([]SettingSourceable) { + return m.conflictingDeviceConfigurations +} +// GetContributingSettings gets the contributingSettings property value. The set of settings in conflict with the given policies +func (m *DeviceConfigurationConflictSummary) GetContributingSettings()([]string) { + return m.contributingSettings +} +// GetDeviceCheckinsImpacted gets the deviceCheckinsImpacted property value. The count of checkins impacted by the conflicting policies and settings +func (m *DeviceConfigurationConflictSummary) GetDeviceCheckinsImpacted()(*int32) { + return m.deviceCheckinsImpacted +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationConflictSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conflictingDeviceConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetConflictingDeviceConfigurations(res) + } + return nil + } + res["contributingSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetContributingSettings(res) + } + return nil + } + res["deviceCheckinsImpacted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCheckinsImpacted(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceConfigurationConflictSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetConflictingDeviceConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConflictingDeviceConfigurations())) + for i, v := range m.GetConflictingDeviceConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("conflictingDeviceConfigurations", cast) + if err != nil { + return err + } + } + if m.GetContributingSettings() != nil { + err = writer.WriteCollectionOfStringValues("contributingSettings", m.GetContributingSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deviceCheckinsImpacted", m.GetDeviceCheckinsImpacted()) + if err != nil { + return err + } + } + return nil +} +// SetConflictingDeviceConfigurations sets the conflictingDeviceConfigurations property value. The set of policies in conflict with the given setting +func (m *DeviceConfigurationConflictSummary) SetConflictingDeviceConfigurations(value []SettingSourceable)() { + m.conflictingDeviceConfigurations = value +} +// SetContributingSettings sets the contributingSettings property value. The set of settings in conflict with the given policies +func (m *DeviceConfigurationConflictSummary) SetContributingSettings(value []string)() { + m.contributingSettings = value +} +// SetDeviceCheckinsImpacted sets the deviceCheckinsImpacted property value. The count of checkins impacted by the conflicting policies and settings +func (m *DeviceConfigurationConflictSummary) SetDeviceCheckinsImpacted(value *int32)() { + m.deviceCheckinsImpacted = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_response.go new file mode 100644 index 000000000..970ee5ff1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationConflictSummaryCollectionResponse +type DeviceConfigurationConflictSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationConflictSummaryable +} +// NewDeviceConfigurationConflictSummaryCollectionResponse instantiates a new DeviceConfigurationConflictSummaryCollectionResponse and sets the default values. +func NewDeviceConfigurationConflictSummaryCollectionResponse()(*DeviceConfigurationConflictSummaryCollectionResponse) { + m := &DeviceConfigurationConflictSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationConflictSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationConflictSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationConflictSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationConflictSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationConflictSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationConflictSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationConflictSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationConflictSummaryCollectionResponse) GetValue()([]DeviceConfigurationConflictSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationConflictSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationConflictSummaryCollectionResponse) SetValue(value []DeviceConfigurationConflictSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_responseable.go new file mode 100644 index 000000000..04bc4f55f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationConflictSummaryCollectionResponseable +type DeviceConfigurationConflictSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationConflictSummaryable) + SetValue(value []DeviceConfigurationConflictSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summaryable.go b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summaryable.go new file mode 100644 index 000000000..94ce99ab4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_conflict_summaryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationConflictSummaryable +type DeviceConfigurationConflictSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConflictingDeviceConfigurations()([]SettingSourceable) + GetContributingSettings()([]string) + GetDeviceCheckinsImpacted()(*int32) + SetConflictingDeviceConfigurations(value []SettingSourceable)() + SetContributingSettings(value []string)() + SetDeviceCheckinsImpacted(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_overview.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_overview.go new file mode 100644 index 000000000..116311a59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_overview.go @@ -0,0 +1,269 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceOverview +type DeviceConfigurationDeviceOverview struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of devices in conflict + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of failed devices + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable devices + notApplicableCount *int32 + // Number of not applicable devices due to mismatch platform and policy + notApplicablePlatformCount *int32 + // Number of pending devices + pendingCount *int32 + // Number of succeeded devices + successCount *int32 +} +// NewDeviceConfigurationDeviceOverview instantiates a new deviceConfigurationDeviceOverview and sets the default values. +func NewDeviceConfigurationDeviceOverview()(*DeviceConfigurationDeviceOverview) { + m := &DeviceConfigurationDeviceOverview{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationDeviceOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationDeviceOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationDeviceOverview(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceConfigurationDeviceOverview) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of devices in conflict +func (m *DeviceConfigurationDeviceOverview) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *DeviceConfigurationDeviceOverview) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed devices +func (m *DeviceConfigurationDeviceOverview) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationDeviceOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["notApplicablePlatformCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicablePlatformCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *DeviceConfigurationDeviceOverview) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceConfigurationDeviceOverview) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetNotApplicablePlatformCount gets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceConfigurationDeviceOverview) GetNotApplicablePlatformCount()(*int32) { + return m.notApplicablePlatformCount +} +// GetPendingCount gets the pendingCount property value. Number of pending devices +func (m *DeviceConfigurationDeviceOverview) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded devices +func (m *DeviceConfigurationDeviceOverview) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceConfigurationDeviceOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicablePlatformCount", m.GetNotApplicablePlatformCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceConfigurationDeviceOverview) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of devices in conflict +func (m *DeviceConfigurationDeviceOverview) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *DeviceConfigurationDeviceOverview) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed devices +func (m *DeviceConfigurationDeviceOverview) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *DeviceConfigurationDeviceOverview) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceConfigurationDeviceOverview) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetNotApplicablePlatformCount sets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceConfigurationDeviceOverview) SetNotApplicablePlatformCount(value *int32)() { + m.notApplicablePlatformCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending devices +func (m *DeviceConfigurationDeviceOverview) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded devices +func (m *DeviceConfigurationDeviceOverview) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_overviewable.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_overviewable.go new file mode 100644 index 000000000..01ebb1e66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_overviewable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceOverviewable +type DeviceConfigurationDeviceOverviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetNotApplicablePlatformCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetNotApplicablePlatformCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summary.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summary.go new file mode 100644 index 000000000..76ed13777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summary.go @@ -0,0 +1,216 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStateSummary +type DeviceConfigurationDeviceStateSummary struct { + Entity + // Number of compliant devices + compliantDeviceCount *int32 + // Number of conflict devices + conflictDeviceCount *int32 + // Number of error devices + errorDeviceCount *int32 + // Number of NonCompliant devices + nonCompliantDeviceCount *int32 + // Number of not applicable devices + notApplicableDeviceCount *int32 + // Number of remediated devices + remediatedDeviceCount *int32 + // Number of unknown devices + unknownDeviceCount *int32 +} +// NewDeviceConfigurationDeviceStateSummary instantiates a new deviceConfigurationDeviceStateSummary and sets the default values. +func NewDeviceConfigurationDeviceStateSummary()(*DeviceConfigurationDeviceStateSummary) { + m := &DeviceConfigurationDeviceStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationDeviceStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationDeviceStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationDeviceStateSummary(), nil +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceConfigurationDeviceStateSummary) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceConfigurationDeviceStateSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Number of error devices +func (m *DeviceConfigurationDeviceStateSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationDeviceStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["nonCompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantDeviceCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetNonCompliantDeviceCount gets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceConfigurationDeviceStateSummary) GetNonCompliantDeviceCount()(*int32) { + return m.nonCompliantDeviceCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceConfigurationDeviceStateSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceConfigurationDeviceStateSummary) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceConfigurationDeviceStateSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceConfigurationDeviceStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantDeviceCount", m.GetNonCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. Number of compliant devices +func (m *DeviceConfigurationDeviceStateSummary) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. Number of conflict devices +func (m *DeviceConfigurationDeviceStateSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Number of error devices +func (m *DeviceConfigurationDeviceStateSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetNonCompliantDeviceCount sets the nonCompliantDeviceCount property value. Number of NonCompliant devices +func (m *DeviceConfigurationDeviceStateSummary) SetNonCompliantDeviceCount(value *int32)() { + m.nonCompliantDeviceCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Number of not applicable devices +func (m *DeviceConfigurationDeviceStateSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. Number of remediated devices +func (m *DeviceConfigurationDeviceStateSummary) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Number of unknown devices +func (m *DeviceConfigurationDeviceStateSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summaryable.go new file mode 100644 index 000000000..99a91bf45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_state_summaryable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStateSummaryable +type DeviceConfigurationDeviceStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantDeviceCount()(*int32) + GetConflictDeviceCount()(*int32) + GetErrorDeviceCount()(*int32) + GetNonCompliantDeviceCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetRemediatedDeviceCount()(*int32) + GetUnknownDeviceCount()(*int32) + SetCompliantDeviceCount(value *int32)() + SetConflictDeviceCount(value *int32)() + SetErrorDeviceCount(value *int32)() + SetNonCompliantDeviceCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetRemediatedDeviceCount(value *int32)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_status.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_status.go new file mode 100644 index 000000000..ba281e18e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_status.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceConfigurationDeviceStatus struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name of the DevicePolicyStatus. + deviceDisplayName *string + // The device model that is being reported + deviceModel *string + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Platform of the device that is being reported + platform *int32 + // The status property + status *ComplianceStatus + // The User Name that is being reported + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceConfigurationDeviceStatus instantiates a new deviceConfigurationDeviceStatus and sets the default values. +func NewDeviceConfigurationDeviceStatus()(*DeviceConfigurationDeviceStatus) { + m := &DeviceConfigurationDeviceStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationDeviceStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationDeviceStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationDeviceStatus(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceConfigurationDeviceStatus) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *DeviceConfigurationDeviceStatus) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *DeviceConfigurationDeviceStatus) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationDeviceStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceConfigurationDeviceStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetPlatform gets the platform property value. Platform of the device that is being reported +func (m *DeviceConfigurationDeviceStatus) GetPlatform()(*int32) { + return m.platform +} +// GetStatus gets the status property value. The status property +func (m *DeviceConfigurationDeviceStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *DeviceConfigurationDeviceStatus) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationDeviceStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceConfigurationDeviceStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("platform", m.GetPlatform()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *DeviceConfigurationDeviceStatus) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *DeviceConfigurationDeviceStatus) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *DeviceConfigurationDeviceStatus) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceConfigurationDeviceStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetPlatform sets the platform property value. Platform of the device that is being reported +func (m *DeviceConfigurationDeviceStatus) SetPlatform(value *int32)() { + m.platform = value +} +// SetStatus sets the status property value. The status property +func (m *DeviceConfigurationDeviceStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *DeviceConfigurationDeviceStatus) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationDeviceStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_response.go new file mode 100644 index 000000000..c9acc6521 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStatusCollectionResponse +type DeviceConfigurationDeviceStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationDeviceStatusable +} +// NewDeviceConfigurationDeviceStatusCollectionResponse instantiates a new DeviceConfigurationDeviceStatusCollectionResponse and sets the default values. +func NewDeviceConfigurationDeviceStatusCollectionResponse()(*DeviceConfigurationDeviceStatusCollectionResponse) { + m := &DeviceConfigurationDeviceStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationDeviceStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationDeviceStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationDeviceStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationDeviceStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationDeviceStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationDeviceStatusCollectionResponse) GetValue()([]DeviceConfigurationDeviceStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationDeviceStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationDeviceStatusCollectionResponse) SetValue(value []DeviceConfigurationDeviceStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_responseable.go new file mode 100644 index 000000000..3ee4ef1b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStatusCollectionResponseable +type DeviceConfigurationDeviceStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationDeviceStatusable) + SetValue(value []DeviceConfigurationDeviceStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_device_statusable.go b/src/internal/connector/graph/betasdk/models/device_configuration_device_statusable.go new file mode 100644 index 000000000..46034f217 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_device_statusable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationDeviceStatusable +type DeviceConfigurationDeviceStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceDisplayName()(*string) + GetDeviceModel()(*string) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*int32) + GetStatus()(*ComplianceStatus) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceDisplayName(value *string)() + SetDeviceModel(value *string)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *int32)() + SetStatus(value *ComplianceStatus)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment.go b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment.go new file mode 100644 index 000000000..c400c04b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationGroupAssignment device configuration group assignment. +type DeviceConfigurationGroupAssignment struct { + Entity + // The navigation link to the Device Configuration being targeted. + deviceConfiguration DeviceConfigurationable + // Indicates if this group is should be excluded. Defaults that the group should be included + excludeGroup *bool + // The Id of the AAD group we are targeting the device configuration to. + targetGroupId *string +} +// NewDeviceConfigurationGroupAssignment instantiates a new deviceConfigurationGroupAssignment and sets the default values. +func NewDeviceConfigurationGroupAssignment()(*DeviceConfigurationGroupAssignment) { + m := &DeviceConfigurationGroupAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationGroupAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationGroupAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationGroupAssignment(), nil +} +// GetDeviceConfiguration gets the deviceConfiguration property value. The navigation link to the Device Configuration being targeted. +func (m *DeviceConfigurationGroupAssignment) GetDeviceConfiguration()(DeviceConfigurationable) { + return m.deviceConfiguration +} +// GetExcludeGroup gets the excludeGroup property value. Indicates if this group is should be excluded. Defaults that the group should be included +func (m *DeviceConfigurationGroupAssignment) GetExcludeGroup()(*bool) { + return m.excludeGroup +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationGroupAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfiguration(val.(DeviceConfigurationable)) + } + return nil + } + res["excludeGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcludeGroup(val) + } + return nil + } + res["targetGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetGroupId(val) + } + return nil + } + return res +} +// GetTargetGroupId gets the targetGroupId property value. The Id of the AAD group we are targeting the device configuration to. +func (m *DeviceConfigurationGroupAssignment) GetTargetGroupId()(*string) { + return m.targetGroupId +} +// Serialize serializes information the current object +func (m *DeviceConfigurationGroupAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("deviceConfiguration", m.GetDeviceConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("excludeGroup", m.GetExcludeGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetGroupId", m.GetTargetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceConfiguration sets the deviceConfiguration property value. The navigation link to the Device Configuration being targeted. +func (m *DeviceConfigurationGroupAssignment) SetDeviceConfiguration(value DeviceConfigurationable)() { + m.deviceConfiguration = value +} +// SetExcludeGroup sets the excludeGroup property value. Indicates if this group is should be excluded. Defaults that the group should be included +func (m *DeviceConfigurationGroupAssignment) SetExcludeGroup(value *bool)() { + m.excludeGroup = value +} +// SetTargetGroupId sets the targetGroupId property value. The Id of the AAD group we are targeting the device configuration to. +func (m *DeviceConfigurationGroupAssignment) SetTargetGroupId(value *string)() { + m.targetGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_response.go new file mode 100644 index 000000000..e222417e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationGroupAssignmentCollectionResponse +type DeviceConfigurationGroupAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationGroupAssignmentable +} +// NewDeviceConfigurationGroupAssignmentCollectionResponse instantiates a new DeviceConfigurationGroupAssignmentCollectionResponse and sets the default values. +func NewDeviceConfigurationGroupAssignmentCollectionResponse()(*DeviceConfigurationGroupAssignmentCollectionResponse) { + m := &DeviceConfigurationGroupAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationGroupAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationGroupAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationGroupAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationGroupAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationGroupAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationGroupAssignmentCollectionResponse) GetValue()([]DeviceConfigurationGroupAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationGroupAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationGroupAssignmentCollectionResponse) SetValue(value []DeviceConfigurationGroupAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_responseable.go new file mode 100644 index 000000000..aaf19dfe9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationGroupAssignmentCollectionResponseable +type DeviceConfigurationGroupAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationGroupAssignmentable) + SetValue(value []DeviceConfigurationGroupAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_group_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignmentable.go new file mode 100644 index 000000000..96aaab57c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_group_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationGroupAssignmentable +type DeviceConfigurationGroupAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceConfiguration()(DeviceConfigurationable) + GetExcludeGroup()(*bool) + GetTargetGroupId()(*string) + SetDeviceConfiguration(value DeviceConfigurationable)() + SetExcludeGroup(value *bool)() + SetTargetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item.go b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item.go new file mode 100644 index 000000000..ecc621bdc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationPolicySetItem +type DeviceConfigurationPolicySetItem struct { + PolicySetItem +} +// NewDeviceConfigurationPolicySetItem instantiates a new DeviceConfigurationPolicySetItem and sets the default values. +func NewDeviceConfigurationPolicySetItem()(*DeviceConfigurationPolicySetItem) { + m := &DeviceConfigurationPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.deviceConfigurationPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceConfigurationPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceConfigurationPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_response.go new file mode 100644 index 000000000..f115aa30f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationPolicySetItemCollectionResponse +type DeviceConfigurationPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationPolicySetItemable +} +// NewDeviceConfigurationPolicySetItemCollectionResponse instantiates a new DeviceConfigurationPolicySetItemCollectionResponse and sets the default values. +func NewDeviceConfigurationPolicySetItemCollectionResponse()(*DeviceConfigurationPolicySetItemCollectionResponse) { + m := &DeviceConfigurationPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationPolicySetItemCollectionResponse) GetValue()([]DeviceConfigurationPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationPolicySetItemCollectionResponse) SetValue(value []DeviceConfigurationPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..48b4426fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationPolicySetItemCollectionResponseable +type DeviceConfigurationPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationPolicySetItemable) + SetValue(value []DeviceConfigurationPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_itemable.go new file mode 100644 index 000000000..c863a5e46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationPolicySetItemable +type DeviceConfigurationPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_setting_state.go b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state.go new file mode 100644 index 000000000..98d71580f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state.go @@ -0,0 +1,418 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationSettingState device Configuration Setting State for a given device. +type DeviceConfigurationSettingState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Current value of setting on device + currentValue *string + // Error code for the setting + errorCode *int64 + // Error description + errorDescription *string + // Name of setting instance that is being reported. + instanceDisplayName *string + // The OdataType property + odataType *string + // The setting that is being reported + setting *string + // SettingInstanceId + settingInstanceId *string + // Localized/user friendly setting name that is being reported + settingName *string + // Contributing policies + sources []SettingSourceable + // The state property + state *ComplianceStatus + // UserEmail + userEmail *string + // UserId + userId *string + // UserName + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceConfigurationSettingState instantiates a new deviceConfigurationSettingState and sets the default values. +func NewDeviceConfigurationSettingState()(*DeviceConfigurationSettingState) { + m := &DeviceConfigurationSettingState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceConfigurationSettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationSettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationSettingState(), 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 *DeviceConfigurationSettingState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCurrentValue gets the currentValue property value. Current value of setting on device +func (m *DeviceConfigurationSettingState) GetCurrentValue()(*string) { + return m.currentValue +} +// GetErrorCode gets the errorCode property value. Error code for the setting +func (m *DeviceConfigurationSettingState) GetErrorCode()(*int64) { + return m.errorCode +} +// GetErrorDescription gets the errorDescription property value. Error description +func (m *DeviceConfigurationSettingState) GetErrorDescription()(*string) { + return m.errorDescription +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationSettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["currentValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentValue(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDescription(val) + } + return nil + } + res["instanceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstanceDisplayName(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["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingInstanceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceId(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["sources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetSources(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetInstanceDisplayName gets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *DeviceConfigurationSettingState) GetInstanceDisplayName()(*string) { + return m.instanceDisplayName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceConfigurationSettingState) GetOdataType()(*string) { + return m.odataType +} +// GetSetting gets the setting property value. The setting that is being reported +func (m *DeviceConfigurationSettingState) GetSetting()(*string) { + return m.setting +} +// GetSettingInstanceId gets the settingInstanceId property value. SettingInstanceId +func (m *DeviceConfigurationSettingState) GetSettingInstanceId()(*string) { + return m.settingInstanceId +} +// GetSettingName gets the settingName property value. Localized/user friendly setting name that is being reported +func (m *DeviceConfigurationSettingState) GetSettingName()(*string) { + return m.settingName +} +// GetSources gets the sources property value. Contributing policies +func (m *DeviceConfigurationSettingState) GetSources()([]SettingSourceable) { + return m.sources +} +// GetState gets the state property value. The state property +func (m *DeviceConfigurationSettingState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserEmail gets the userEmail property value. UserEmail +func (m *DeviceConfigurationSettingState) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. UserId +func (m *DeviceConfigurationSettingState) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. UserName +func (m *DeviceConfigurationSettingState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationSettingState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceConfigurationSettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("currentValue", m.GetCurrentValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("errorDescription", m.GetErrorDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("instanceDisplayName", m.GetInstanceDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingInstanceId", m.GetSettingInstanceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSources())) + for i, v := range m.GetSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sources", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *DeviceConfigurationSettingState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCurrentValue sets the currentValue property value. Current value of setting on device +func (m *DeviceConfigurationSettingState) SetCurrentValue(value *string)() { + m.currentValue = value +} +// SetErrorCode sets the errorCode property value. Error code for the setting +func (m *DeviceConfigurationSettingState) SetErrorCode(value *int64)() { + m.errorCode = value +} +// SetErrorDescription sets the errorDescription property value. Error description +func (m *DeviceConfigurationSettingState) SetErrorDescription(value *string)() { + m.errorDescription = value +} +// SetInstanceDisplayName sets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *DeviceConfigurationSettingState) SetInstanceDisplayName(value *string)() { + m.instanceDisplayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceConfigurationSettingState) SetOdataType(value *string)() { + m.odataType = value +} +// SetSetting sets the setting property value. The setting that is being reported +func (m *DeviceConfigurationSettingState) SetSetting(value *string)() { + m.setting = value +} +// SetSettingInstanceId sets the settingInstanceId property value. SettingInstanceId +func (m *DeviceConfigurationSettingState) SetSettingInstanceId(value *string)() { + m.settingInstanceId = value +} +// SetSettingName sets the settingName property value. Localized/user friendly setting name that is being reported +func (m *DeviceConfigurationSettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetSources sets the sources property value. Contributing policies +func (m *DeviceConfigurationSettingState) SetSources(value []SettingSourceable)() { + m.sources = value +} +// SetState sets the state property value. The state property +func (m *DeviceConfigurationSettingState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserEmail sets the userEmail property value. UserEmail +func (m *DeviceConfigurationSettingState) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. UserId +func (m *DeviceConfigurationSettingState) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. UserName +func (m *DeviceConfigurationSettingState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationSettingState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_response.go new file mode 100644 index 000000000..f502b1a9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationSettingStateCollectionResponse +type DeviceConfigurationSettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationSettingStateable +} +// NewDeviceConfigurationSettingStateCollectionResponse instantiates a new DeviceConfigurationSettingStateCollectionResponse and sets the default values. +func NewDeviceConfigurationSettingStateCollectionResponse()(*DeviceConfigurationSettingStateCollectionResponse) { + m := &DeviceConfigurationSettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationSettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationSettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationSettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationSettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationSettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationSettingStateCollectionResponse) GetValue()([]DeviceConfigurationSettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationSettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationSettingStateCollectionResponse) SetValue(value []DeviceConfigurationSettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_responseable.go new file mode 100644 index 000000000..21ea25f0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationSettingStateCollectionResponseable +type DeviceConfigurationSettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationSettingStateable) + SetValue(value []DeviceConfigurationSettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_setting_stateable.go b/src/internal/connector/graph/betasdk/models/device_configuration_setting_stateable.go new file mode 100644 index 000000000..7002fde72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_setting_stateable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationSettingStateable +type DeviceConfigurationSettingStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentValue()(*string) + GetErrorCode()(*int64) + GetErrorDescription()(*string) + GetInstanceDisplayName()(*string) + GetOdataType()(*string) + GetSetting()(*string) + GetSettingInstanceId()(*string) + GetSettingName()(*string) + GetSources()([]SettingSourceable) + GetState()(*ComplianceStatus) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetCurrentValue(value *string)() + SetErrorCode(value *int64)() + SetErrorDescription(value *string)() + SetInstanceDisplayName(value *string)() + SetOdataType(value *string)() + SetSetting(value *string)() + SetSettingInstanceId(value *string)() + SetSettingName(value *string)() + SetSources(value []SettingSourceable)() + SetState(value *ComplianceStatus)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_state.go b/src/internal/connector/graph/betasdk/models/device_configuration_state.go new file mode 100644 index 000000000..64f571b77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_state.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationState device Configuration State for a given device. +type DeviceConfigurationState struct { + Entity + // The name of the policy for this policyBase + displayName *string + // Supported platform types for policies. + platformType *PolicyPlatformType + // Count of how many setting a policy holds + settingCount *int32 + // The settingStates property + settingStates []DeviceConfigurationSettingStateable + // The state property + state *ComplianceStatus + // User unique identifier, must be Guid + userId *string + // User Principal Name + userPrincipalName *string + // The version of the policy + version *int32 +} +// NewDeviceConfigurationState instantiates a new deviceConfigurationState and sets the default values. +func NewDeviceConfigurationState()(*DeviceConfigurationState) { + m := &DeviceConfigurationState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationState(), nil +} +// GetDisplayName gets the displayName property value. The name of the policy for this policyBase +func (m *DeviceConfigurationState) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["settingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingCount(val) + } + return nil + } + res["settingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationSettingStateable) + } + m.SetSettingStates(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *DeviceConfigurationState) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetSettingCount gets the settingCount property value. Count of how many setting a policy holds +func (m *DeviceConfigurationState) GetSettingCount()(*int32) { + return m.settingCount +} +// GetSettingStates gets the settingStates property value. The settingStates property +func (m *DeviceConfigurationState) GetSettingStates()([]DeviceConfigurationSettingStateable) { + return m.settingStates +} +// GetState gets the state property value. The state property +func (m *DeviceConfigurationState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserId gets the userId property value. User unique identifier, must be Guid +func (m *DeviceConfigurationState) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *DeviceConfigurationState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetVersion gets the version property value. The version of the policy +func (m *DeviceConfigurationState) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceConfigurationState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("settingCount", m.GetSettingCount()) + if err != nil { + return err + } + } + if m.GetSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingStates())) + for i, v := range m.GetSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingStates", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the policy for this policyBase +func (m *DeviceConfigurationState) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *DeviceConfigurationState) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetSettingCount sets the settingCount property value. Count of how many setting a policy holds +func (m *DeviceConfigurationState) SetSettingCount(value *int32)() { + m.settingCount = value +} +// SetSettingStates sets the settingStates property value. The settingStates property +func (m *DeviceConfigurationState) SetSettingStates(value []DeviceConfigurationSettingStateable)() { + m.settingStates = value +} +// SetState sets the state property value. The state property +func (m *DeviceConfigurationState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserId sets the userId property value. User unique identifier, must be Guid +func (m *DeviceConfigurationState) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *DeviceConfigurationState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetVersion sets the version property value. The version of the policy +func (m *DeviceConfigurationState) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_response.go new file mode 100644 index 000000000..a9d3b2b05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationStateCollectionResponse +type DeviceConfigurationStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationStateable +} +// NewDeviceConfigurationStateCollectionResponse instantiates a new DeviceConfigurationStateCollectionResponse and sets the default values. +func NewDeviceConfigurationStateCollectionResponse()(*DeviceConfigurationStateCollectionResponse) { + m := &DeviceConfigurationStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationStateCollectionResponse) GetValue()([]DeviceConfigurationStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationStateCollectionResponse) SetValue(value []DeviceConfigurationStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_responseable.go new file mode 100644 index 000000000..f436f5f44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationStateCollectionResponseable +type DeviceConfigurationStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationStateable) + SetValue(value []DeviceConfigurationStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_stateable.go b/src/internal/connector/graph/betasdk/models/device_configuration_stateable.go new file mode 100644 index 000000000..737e00422 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_stateable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationStateable +type DeviceConfigurationStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetPlatformType()(*PolicyPlatformType) + GetSettingCount()(*int32) + GetSettingStates()([]DeviceConfigurationSettingStateable) + GetState()(*ComplianceStatus) + GetUserId()(*string) + GetUserPrincipalName()(*string) + GetVersion()(*int32) + SetDisplayName(value *string)() + SetPlatformType(value *PolicyPlatformType)() + SetSettingCount(value *int32)() + SetSettingStates(value []DeviceConfigurationSettingStateable)() + SetState(value *ComplianceStatus)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_overview.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_overview.go new file mode 100644 index 000000000..b5f08af20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_overview.go @@ -0,0 +1,243 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserOverview +type DeviceConfigurationUserOverview struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of users in conflict + conflictCount *int32 + // Number of error Users + errorCount *int32 + // Number of failed Users + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable users + notApplicableCount *int32 + // Number of pending Users + pendingCount *int32 + // Number of succeeded Users + successCount *int32 +} +// NewDeviceConfigurationUserOverview instantiates a new deviceConfigurationUserOverview and sets the default values. +func NewDeviceConfigurationUserOverview()(*DeviceConfigurationUserOverview) { + m := &DeviceConfigurationUserOverview{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationUserOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationUserOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationUserOverview(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceConfigurationUserOverview) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of users in conflict +func (m *DeviceConfigurationUserOverview) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error Users +func (m *DeviceConfigurationUserOverview) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed Users +func (m *DeviceConfigurationUserOverview) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationUserOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *DeviceConfigurationUserOverview) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable users +func (m *DeviceConfigurationUserOverview) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetPendingCount gets the pendingCount property value. Number of pending Users +func (m *DeviceConfigurationUserOverview) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded Users +func (m *DeviceConfigurationUserOverview) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceConfigurationUserOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *DeviceConfigurationUserOverview) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of users in conflict +func (m *DeviceConfigurationUserOverview) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error Users +func (m *DeviceConfigurationUserOverview) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed Users +func (m *DeviceConfigurationUserOverview) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *DeviceConfigurationUserOverview) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable users +func (m *DeviceConfigurationUserOverview) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending Users +func (m *DeviceConfigurationUserOverview) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded Users +func (m *DeviceConfigurationUserOverview) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_overviewable.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_overviewable.go new file mode 100644 index 000000000..c5b4fed14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_overviewable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserOverviewable +type DeviceConfigurationUserOverviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summary.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summary.go new file mode 100644 index 000000000..30b42601d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summary.go @@ -0,0 +1,216 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStateSummary +type DeviceConfigurationUserStateSummary struct { + Entity + // Number of compliant users + compliantUserCount *int32 + // Number of conflict users + conflictUserCount *int32 + // Number of error users + errorUserCount *int32 + // Number of NonCompliant users + nonCompliantUserCount *int32 + // Number of not applicable users + notApplicableUserCount *int32 + // Number of remediated users + remediatedUserCount *int32 + // Number of unknown users + unknownUserCount *int32 +} +// NewDeviceConfigurationUserStateSummary instantiates a new deviceConfigurationUserStateSummary and sets the default values. +func NewDeviceConfigurationUserStateSummary()(*DeviceConfigurationUserStateSummary) { + m := &DeviceConfigurationUserStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationUserStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationUserStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationUserStateSummary(), nil +} +// GetCompliantUserCount gets the compliantUserCount property value. Number of compliant users +func (m *DeviceConfigurationUserStateSummary) GetCompliantUserCount()(*int32) { + return m.compliantUserCount +} +// GetConflictUserCount gets the conflictUserCount property value. Number of conflict users +func (m *DeviceConfigurationUserStateSummary) GetConflictUserCount()(*int32) { + return m.conflictUserCount +} +// GetErrorUserCount gets the errorUserCount property value. Number of error users +func (m *DeviceConfigurationUserStateSummary) GetErrorUserCount()(*int32) { + return m.errorUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationUserStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantUserCount(val) + } + return nil + } + res["conflictUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictUserCount(val) + } + return nil + } + res["errorUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorUserCount(val) + } + return nil + } + res["nonCompliantUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantUserCount(val) + } + return nil + } + res["notApplicableUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableUserCount(val) + } + return nil + } + res["remediatedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedUserCount(val) + } + return nil + } + res["unknownUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownUserCount(val) + } + return nil + } + return res +} +// GetNonCompliantUserCount gets the nonCompliantUserCount property value. Number of NonCompliant users +func (m *DeviceConfigurationUserStateSummary) GetNonCompliantUserCount()(*int32) { + return m.nonCompliantUserCount +} +// GetNotApplicableUserCount gets the notApplicableUserCount property value. Number of not applicable users +func (m *DeviceConfigurationUserStateSummary) GetNotApplicableUserCount()(*int32) { + return m.notApplicableUserCount +} +// GetRemediatedUserCount gets the remediatedUserCount property value. Number of remediated users +func (m *DeviceConfigurationUserStateSummary) GetRemediatedUserCount()(*int32) { + return m.remediatedUserCount +} +// GetUnknownUserCount gets the unknownUserCount property value. Number of unknown users +func (m *DeviceConfigurationUserStateSummary) GetUnknownUserCount()(*int32) { + return m.unknownUserCount +} +// Serialize serializes information the current object +func (m *DeviceConfigurationUserStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantUserCount", m.GetCompliantUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictUserCount", m.GetConflictUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorUserCount", m.GetErrorUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantUserCount", m.GetNonCompliantUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableUserCount", m.GetNotApplicableUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedUserCount", m.GetRemediatedUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownUserCount", m.GetUnknownUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantUserCount sets the compliantUserCount property value. Number of compliant users +func (m *DeviceConfigurationUserStateSummary) SetCompliantUserCount(value *int32)() { + m.compliantUserCount = value +} +// SetConflictUserCount sets the conflictUserCount property value. Number of conflict users +func (m *DeviceConfigurationUserStateSummary) SetConflictUserCount(value *int32)() { + m.conflictUserCount = value +} +// SetErrorUserCount sets the errorUserCount property value. Number of error users +func (m *DeviceConfigurationUserStateSummary) SetErrorUserCount(value *int32)() { + m.errorUserCount = value +} +// SetNonCompliantUserCount sets the nonCompliantUserCount property value. Number of NonCompliant users +func (m *DeviceConfigurationUserStateSummary) SetNonCompliantUserCount(value *int32)() { + m.nonCompliantUserCount = value +} +// SetNotApplicableUserCount sets the notApplicableUserCount property value. Number of not applicable users +func (m *DeviceConfigurationUserStateSummary) SetNotApplicableUserCount(value *int32)() { + m.notApplicableUserCount = value +} +// SetRemediatedUserCount sets the remediatedUserCount property value. Number of remediated users +func (m *DeviceConfigurationUserStateSummary) SetRemediatedUserCount(value *int32)() { + m.remediatedUserCount = value +} +// SetUnknownUserCount sets the unknownUserCount property value. Number of unknown users +func (m *DeviceConfigurationUserStateSummary) SetUnknownUserCount(value *int32)() { + m.unknownUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summaryable.go new file mode 100644 index 000000000..2519a019a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_state_summaryable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStateSummaryable +type DeviceConfigurationUserStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantUserCount()(*int32) + GetConflictUserCount()(*int32) + GetErrorUserCount()(*int32) + GetNonCompliantUserCount()(*int32) + GetNotApplicableUserCount()(*int32) + GetRemediatedUserCount()(*int32) + GetUnknownUserCount()(*int32) + SetCompliantUserCount(value *int32)() + SetConflictUserCount(value *int32)() + SetErrorUserCount(value *int32)() + SetNonCompliantUserCount(value *int32)() + SetNotApplicableUserCount(value *int32)() + SetRemediatedUserCount(value *int32)() + SetUnknownUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_status.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_status.go new file mode 100644 index 000000000..9ae95fbed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_status.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceConfigurationUserStatus struct { + Entity + // Devices count for that user. + devicesCount *int32 + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *ComplianceStatus + // User name of the DevicePolicyStatus. + userDisplayName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewDeviceConfigurationUserStatus instantiates a new deviceConfigurationUserStatus and sets the default values. +func NewDeviceConfigurationUserStatus()(*DeviceConfigurationUserStatus) { + m := &DeviceConfigurationUserStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceConfigurationUserStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationUserStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationUserStatus(), nil +} +// GetDevicesCount gets the devicesCount property value. Devices count for that user. +func (m *DeviceConfigurationUserStatus) GetDevicesCount()(*int32) { + return m.devicesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationUserStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["devicesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDevicesCount(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceConfigurationUserStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetStatus gets the status property value. The status property +func (m *DeviceConfigurationUserStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserDisplayName gets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *DeviceConfigurationUserStatus) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationUserStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceConfigurationUserStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("devicesCount", m.GetDevicesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDevicesCount sets the devicesCount property value. Devices count for that user. +func (m *DeviceConfigurationUserStatus) SetDevicesCount(value *int32)() { + m.devicesCount = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *DeviceConfigurationUserStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *DeviceConfigurationUserStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserDisplayName sets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *DeviceConfigurationUserStatus) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *DeviceConfigurationUserStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_response.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_response.go new file mode 100644 index 000000000..0a1bccfea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStatusCollectionResponse +type DeviceConfigurationUserStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceConfigurationUserStatusable +} +// NewDeviceConfigurationUserStatusCollectionResponse instantiates a new DeviceConfigurationUserStatusCollectionResponse and sets the default values. +func NewDeviceConfigurationUserStatusCollectionResponse()(*DeviceConfigurationUserStatusCollectionResponse) { + m := &DeviceConfigurationUserStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceConfigurationUserStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceConfigurationUserStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceConfigurationUserStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceConfigurationUserStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationUserStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceConfigurationUserStatusCollectionResponse) GetValue()([]DeviceConfigurationUserStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceConfigurationUserStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceConfigurationUserStatusCollectionResponse) SetValue(value []DeviceConfigurationUserStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_responseable.go new file mode 100644 index 000000000..cd22bddf4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStatusCollectionResponseable +type DeviceConfigurationUserStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceConfigurationUserStatusable) + SetValue(value []DeviceConfigurationUserStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configuration_user_statusable.go b/src/internal/connector/graph/betasdk/models/device_configuration_user_statusable.go new file mode 100644 index 000000000..9137abf69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configuration_user_statusable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationUserStatusable +type DeviceConfigurationUserStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevicesCount()(*int32) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*ComplianceStatus) + GetUserDisplayName()(*string) + GetUserPrincipalName()(*string) + SetDevicesCount(value *int32)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *ComplianceStatus)() + SetUserDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_configurationable.go b/src/internal/connector/graph/betasdk/models/device_configurationable.go new file mode 100644 index 000000000..84b6fe9f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_configurationable.go @@ -0,0 +1,46 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceConfigurationable +type DeviceConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceConfigurationAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceManagementApplicabilityRuleDeviceMode()(DeviceManagementApplicabilityRuleDeviceModeable) + GetDeviceManagementApplicabilityRuleOsEdition()(DeviceManagementApplicabilityRuleOsEditionable) + GetDeviceManagementApplicabilityRuleOsVersion()(DeviceManagementApplicabilityRuleOsVersionable) + GetDeviceSettingStateSummaries()([]SettingStateDeviceSummaryable) + GetDeviceStatuses()([]DeviceConfigurationDeviceStatusable) + GetDeviceStatusOverview()(DeviceConfigurationDeviceOverviewable) + GetDisplayName()(*string) + GetGroupAssignments()([]DeviceConfigurationGroupAssignmentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetSupportsScopeTags()(*bool) + GetUserStatuses()([]DeviceConfigurationUserStatusable) + GetUserStatusOverview()(DeviceConfigurationUserOverviewable) + GetVersion()(*int32) + SetAssignments(value []DeviceConfigurationAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceManagementApplicabilityRuleDeviceMode(value DeviceManagementApplicabilityRuleDeviceModeable)() + SetDeviceManagementApplicabilityRuleOsEdition(value DeviceManagementApplicabilityRuleOsEditionable)() + SetDeviceManagementApplicabilityRuleOsVersion(value DeviceManagementApplicabilityRuleOsVersionable)() + SetDeviceSettingStateSummaries(value []SettingStateDeviceSummaryable)() + SetDeviceStatuses(value []DeviceConfigurationDeviceStatusable)() + SetDeviceStatusOverview(value DeviceConfigurationDeviceOverviewable)() + SetDisplayName(value *string)() + SetGroupAssignments(value []DeviceConfigurationGroupAssignmentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetSupportsScopeTags(value *bool)() + SetUserStatuses(value []DeviceConfigurationUserStatusable)() + SetUserStatusOverview(value DeviceConfigurationUserOverviewable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script.go b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script.go new file mode 100644 index 000000000..2a1b7bf55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script.go @@ -0,0 +1,451 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCustomAttributeShellScript represents a custom attribute script for macOS. +type DeviceCustomAttributeShellScript struct { + Entity + // The list of group assignments for the device management script. + assignments []DeviceManagementScriptAssignmentable + // The date and time the device management script was created. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the custom attribute. + customAttributeName *string + // Represents the expected type for a macOS custom attribute script value. + customAttributeType *DeviceCustomAttributeValueType + // Optional description for the device management script. + description *string + // List of run states for this script across all devices. + deviceRunStates []DeviceManagementScriptDeviceStateable + // Name of the device management script. + displayName *string + // Script file name. + fileName *string + // The list of group assignments for the device management script. + groupAssignments []DeviceManagementScriptGroupAssignmentable + // The date and time the device management script was last modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tag IDs for this PowerShellScript instance. + roleScopeTagIds []string + // Indicates the type of execution context the app runs in. + runAsAccount *RunAsAccountType + // Run summary for device management script. + runSummary DeviceManagementScriptRunSummaryable + // The script content. + scriptContent []byte + // List of run states for this script across all users. + userRunStates []DeviceManagementScriptUserStateable +} +// NewDeviceCustomAttributeShellScript instantiates a new deviceCustomAttributeShellScript and sets the default values. +func NewDeviceCustomAttributeShellScript()(*DeviceCustomAttributeShellScript) { + m := &DeviceCustomAttributeShellScript{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceCustomAttributeShellScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCustomAttributeShellScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCustomAttributeShellScript(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceCustomAttributeShellScript) GetAssignments()([]DeviceManagementScriptAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceCustomAttributeShellScript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomAttributeName gets the customAttributeName property value. The name of the custom attribute. +func (m *DeviceCustomAttributeShellScript) GetCustomAttributeName()(*string) { + return m.customAttributeName +} +// GetCustomAttributeType gets the customAttributeType property value. Represents the expected type for a macOS custom attribute script value. +func (m *DeviceCustomAttributeShellScript) GetCustomAttributeType()(*DeviceCustomAttributeValueType) { + return m.customAttributeType +} +// GetDescription gets the description property value. Optional description for the device management script. +func (m *DeviceCustomAttributeShellScript) GetDescription()(*string) { + return m.description +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceCustomAttributeShellScript) GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) { + return m.deviceRunStates +} +// GetDisplayName gets the displayName property value. Name of the device management script. +func (m *DeviceCustomAttributeShellScript) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCustomAttributeShellScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customAttributeName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomAttributeName(val) + } + return nil + } + res["customAttributeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceCustomAttributeValueType) + if err != nil { + return err + } + if val != nil { + m.SetCustomAttributeType(val.(*DeviceCustomAttributeValueType)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["groupAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptGroupAssignmentable) + } + m.SetGroupAssignments(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["runAsAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunAsAccountType) + if err != nil { + return err + } + if val != nil { + m.SetRunAsAccount(val.(*RunAsAccountType)) + } + return nil + } + res["runSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementScriptRunSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSummary(val.(DeviceManagementScriptRunSummaryable)) + } + return nil + } + res["scriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetScriptContent(val) + } + return nil + } + res["userRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptUserStateable) + } + m.SetUserRunStates(res) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. Script file name. +func (m *DeviceCustomAttributeShellScript) GetFileName()(*string) { + return m.fileName +} +// GetGroupAssignments gets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceCustomAttributeShellScript) GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) { + return m.groupAssignments +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceCustomAttributeShellScript) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceCustomAttributeShellScript) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRunAsAccount gets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceCustomAttributeShellScript) GetRunAsAccount()(*RunAsAccountType) { + return m.runAsAccount +} +// GetRunSummary gets the runSummary property value. Run summary for device management script. +func (m *DeviceCustomAttributeShellScript) GetRunSummary()(DeviceManagementScriptRunSummaryable) { + return m.runSummary +} +// GetScriptContent gets the scriptContent property value. The script content. +func (m *DeviceCustomAttributeShellScript) GetScriptContent()([]byte) { + return m.scriptContent +} +// GetUserRunStates gets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceCustomAttributeShellScript) GetUserRunStates()([]DeviceManagementScriptUserStateable) { + return m.userRunStates +} +// Serialize serializes information the current object +func (m *DeviceCustomAttributeShellScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customAttributeName", m.GetCustomAttributeName()) + if err != nil { + return err + } + } + if m.GetCustomAttributeType() != nil { + cast := (*m.GetCustomAttributeType()).String() + err = writer.WriteStringValue("customAttributeType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + if m.GetGroupAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupAssignments())) + for i, v := range m.GetGroupAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetRunAsAccount() != nil { + cast := (*m.GetRunAsAccount()).String() + err = writer.WriteStringValue("runAsAccount", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSummary", m.GetRunSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("scriptContent", m.GetScriptContent()) + if err != nil { + return err + } + } + if m.GetUserRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRunStates())) + for i, v := range m.GetUserRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userRunStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceCustomAttributeShellScript) SetAssignments(value []DeviceManagementScriptAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceCustomAttributeShellScript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomAttributeName sets the customAttributeName property value. The name of the custom attribute. +func (m *DeviceCustomAttributeShellScript) SetCustomAttributeName(value *string)() { + m.customAttributeName = value +} +// SetCustomAttributeType sets the customAttributeType property value. Represents the expected type for a macOS custom attribute script value. +func (m *DeviceCustomAttributeShellScript) SetCustomAttributeType(value *DeviceCustomAttributeValueType)() { + m.customAttributeType = value +} +// SetDescription sets the description property value. Optional description for the device management script. +func (m *DeviceCustomAttributeShellScript) SetDescription(value *string)() { + m.description = value +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceCustomAttributeShellScript) SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetDisplayName sets the displayName property value. Name of the device management script. +func (m *DeviceCustomAttributeShellScript) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFileName sets the fileName property value. Script file name. +func (m *DeviceCustomAttributeShellScript) SetFileName(value *string)() { + m.fileName = value +} +// SetGroupAssignments sets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceCustomAttributeShellScript) SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() { + m.groupAssignments = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceCustomAttributeShellScript) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceCustomAttributeShellScript) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRunAsAccount sets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceCustomAttributeShellScript) SetRunAsAccount(value *RunAsAccountType)() { + m.runAsAccount = value +} +// SetRunSummary sets the runSummary property value. Run summary for device management script. +func (m *DeviceCustomAttributeShellScript) SetRunSummary(value DeviceManagementScriptRunSummaryable)() { + m.runSummary = value +} +// SetScriptContent sets the scriptContent property value. The script content. +func (m *DeviceCustomAttributeShellScript) SetScriptContent(value []byte)() { + m.scriptContent = value +} +// SetUserRunStates sets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceCustomAttributeShellScript) SetUserRunStates(value []DeviceManagementScriptUserStateable)() { + m.userRunStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_response.go b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_response.go new file mode 100644 index 000000000..1a3a194d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCustomAttributeShellScriptCollectionResponse +type DeviceCustomAttributeShellScriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceCustomAttributeShellScriptable +} +// NewDeviceCustomAttributeShellScriptCollectionResponse instantiates a new DeviceCustomAttributeShellScriptCollectionResponse and sets the default values. +func NewDeviceCustomAttributeShellScriptCollectionResponse()(*DeviceCustomAttributeShellScriptCollectionResponse) { + m := &DeviceCustomAttributeShellScriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCustomAttributeShellScriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCustomAttributeShellScriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCustomAttributeShellScriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCustomAttributeShellScriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCustomAttributeShellScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCustomAttributeShellScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCustomAttributeShellScriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCustomAttributeShellScriptCollectionResponse) GetValue()([]DeviceCustomAttributeShellScriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCustomAttributeShellScriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCustomAttributeShellScriptCollectionResponse) SetValue(value []DeviceCustomAttributeShellScriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_responseable.go new file mode 100644 index 000000000..2f0d5a20e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_script_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCustomAttributeShellScriptCollectionResponseable +type DeviceCustomAttributeShellScriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCustomAttributeShellScriptable) + SetValue(value []DeviceCustomAttributeShellScriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_scriptable.go b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_scriptable.go new file mode 100644 index 000000000..5fa2b37e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_custom_attribute_shell_scriptable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceCustomAttributeShellScriptable +type DeviceCustomAttributeShellScriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementScriptAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomAttributeName()(*string) + GetCustomAttributeType()(*DeviceCustomAttributeValueType) + GetDescription()(*string) + GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) + GetDisplayName()(*string) + GetFileName()(*string) + GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetRunAsAccount()(*RunAsAccountType) + GetRunSummary()(DeviceManagementScriptRunSummaryable) + GetScriptContent()([]byte) + GetUserRunStates()([]DeviceManagementScriptUserStateable) + SetAssignments(value []DeviceManagementScriptAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomAttributeName(value *string)() + SetCustomAttributeType(value *DeviceCustomAttributeValueType)() + SetDescription(value *string)() + SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() + SetDisplayName(value *string)() + SetFileName(value *string)() + SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetRunAsAccount(value *RunAsAccountType)() + SetRunSummary(value DeviceManagementScriptRunSummaryable)() + SetScriptContent(value []byte)() + SetUserRunStates(value []DeviceManagementScriptUserStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_custom_attribute_value_type.go b/src/internal/connector/graph/betasdk/models/device_custom_attribute_value_type.go new file mode 100644 index 000000000..bd660bb4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_custom_attribute_value_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceCustomAttributeValueType int + +const ( + // Indicates the value for a custom attribute script is an integer. + INTEGER_DEVICECUSTOMATTRIBUTEVALUETYPE DeviceCustomAttributeValueType = iota + // Indicates the value for a custom attribute script is a string. + STRING_DEVICECUSTOMATTRIBUTEVALUETYPE + // Indicates the value for a custom attribute script is a date conforming to ISO 8601. + DATETIME_DEVICECUSTOMATTRIBUTEVALUETYPE +) + +func (i DeviceCustomAttributeValueType) String() string { + return []string{"integer", "string", "dateTime"}[i] +} +func ParseDeviceCustomAttributeValueType(v string) (interface{}, error) { + result := INTEGER_DEVICECUSTOMATTRIBUTEVALUETYPE + switch v { + case "integer": + result = INTEGER_DEVICECUSTOMATTRIBUTEVALUETYPE + case "string": + result = STRING_DEVICECUSTOMATTRIBUTEVALUETYPE + case "dateTime": + result = DATETIME_DEVICECUSTOMATTRIBUTEVALUETYPE + default: + return 0, errors.New("Unknown DeviceCustomAttributeValueType value: " + v) + } + return &result, nil +} +func SerializeDeviceCustomAttributeValueType(values []DeviceCustomAttributeValueType) []string { + 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/device_detail.go b/src/internal/connector/graph/betasdk/models/device_detail.go new file mode 100644 index 000000000..cd1e29013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_detail.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceDetail +type DeviceDetail 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 browser information of the used for signing-in. + browser *string + // The browserId property + browserId *string + // Refers to the UniqueID of the device used for signing-in. + deviceId *string + // Refers to the name of the device used for signing-in. + displayName *string + // Indicates whether the device is compliant or not. + isCompliant *bool + // Indicates if the device is managed or not. + isManaged *bool + // The OdataType property + odataType *string + // Indicates the OS name and version used for signing-in. + operatingSystem *string + // Indicates information on whether the signed-in device is Workplace Joined, AzureAD Joined, Domain Joined. + trustType *string +} +// NewDeviceDetail instantiates a new deviceDetail and sets the default values. +func NewDeviceDetail()(*DeviceDetail) { + m := &DeviceDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceDetail(), 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 *DeviceDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBrowser gets the browser property value. Indicates the browser information of the used for signing-in. +func (m *DeviceDetail) GetBrowser()(*string) { + return m.browser +} +// GetBrowserId gets the browserId property value. The browserId property +func (m *DeviceDetail) GetBrowserId()(*string) { + return m.browserId +} +// GetDeviceId gets the deviceId property value. Refers to the UniqueID of the device used for signing-in. +func (m *DeviceDetail) GetDeviceId()(*string) { + return m.deviceId +} +// GetDisplayName gets the displayName property value. Refers to the name of the device used for signing-in. +func (m *DeviceDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["browser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBrowser(val) + } + return nil + } + res["browserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBrowserId(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isCompliant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCompliant(val) + } + return nil + } + res["isManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsManaged(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["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["trustType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustType(val) + } + return nil + } + return res +} +// GetIsCompliant gets the isCompliant property value. Indicates whether the device is compliant or not. +func (m *DeviceDetail) GetIsCompliant()(*bool) { + return m.isCompliant +} +// GetIsManaged gets the isManaged property value. Indicates if the device is managed or not. +func (m *DeviceDetail) GetIsManaged()(*bool) { + return m.isManaged +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceDetail) GetOdataType()(*string) { + return m.odataType +} +// GetOperatingSystem gets the operatingSystem property value. Indicates the OS name and version used for signing-in. +func (m *DeviceDetail) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetTrustType gets the trustType property value. Indicates information on whether the signed-in device is Workplace Joined, AzureAD Joined, Domain Joined. +func (m *DeviceDetail) GetTrustType()(*string) { + return m.trustType +} +// Serialize serializes information the current object +func (m *DeviceDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("browser", m.GetBrowser()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("browserId", m.GetBrowserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isCompliant", m.GetIsCompliant()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isManaged", m.GetIsManaged()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("trustType", m.GetTrustType()) + 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 *DeviceDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBrowser sets the browser property value. Indicates the browser information of the used for signing-in. +func (m *DeviceDetail) SetBrowser(value *string)() { + m.browser = value +} +// SetBrowserId sets the browserId property value. The browserId property +func (m *DeviceDetail) SetBrowserId(value *string)() { + m.browserId = value +} +// SetDeviceId sets the deviceId property value. Refers to the UniqueID of the device used for signing-in. +func (m *DeviceDetail) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDisplayName sets the displayName property value. Refers to the name of the device used for signing-in. +func (m *DeviceDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsCompliant sets the isCompliant property value. Indicates whether the device is compliant or not. +func (m *DeviceDetail) SetIsCompliant(value *bool)() { + m.isCompliant = value +} +// SetIsManaged sets the isManaged property value. Indicates if the device is managed or not. +func (m *DeviceDetail) SetIsManaged(value *bool)() { + m.isManaged = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperatingSystem sets the operatingSystem property value. Indicates the OS name and version used for signing-in. +func (m *DeviceDetail) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetTrustType sets the trustType property value. Indicates information on whether the signed-in device is Workplace Joined, AzureAD Joined, Domain Joined. +func (m *DeviceDetail) SetTrustType(value *string)() { + m.trustType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_detailable.go b/src/internal/connector/graph/betasdk/models/device_detailable.go new file mode 100644 index 000000000..b73c556ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_detailable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceDetailable +type DeviceDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBrowser()(*string) + GetBrowserId()(*string) + GetDeviceId()(*string) + GetDisplayName()(*string) + GetIsCompliant()(*bool) + GetIsManaged()(*bool) + GetOdataType()(*string) + GetOperatingSystem()(*string) + GetTrustType()(*string) + SetBrowser(value *string)() + SetBrowserId(value *string)() + SetDeviceId(value *string)() + SetDisplayName(value *string)() + SetIsCompliant(value *bool)() + SetIsManaged(value *bool)() + SetOdataType(value *string)() + SetOperatingSystem(value *string)() + SetTrustType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration.go new file mode 100644 index 000000000..e120d3b02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration.go @@ -0,0 +1,312 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentConfiguration the Base Class of Device Enrollment Configuration +type DeviceEnrollmentConfiguration struct { + Entity + // The list of group assignments for the device configuration profile + assignments []EnrollmentConfigurationAssignmentable + // Created date time in UTC of the device enrollment configuration + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of the device enrollment configuration + description *string + // Describes the TemplateFamily for the Template entity + deviceEnrollmentConfigurationType *DeviceEnrollmentConfigurationType + // The display name of the device enrollment configuration + displayName *string + // Last modified date time in UTC of the device enrollment configuration + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Priority is used when a user exists in multiple groups that are assigned enrollment configuration. Users are subject only to the configuration with the lowest priority value. + priority *int32 + // Optional role scope tags for the enrollment restrictions. + roleScopeTagIds []string + // The version of the device enrollment configuration + version *int32 +} +// NewDeviceEnrollmentConfiguration instantiates a new deviceEnrollmentConfiguration and sets the default values. +func NewDeviceEnrollmentConfiguration()(*DeviceEnrollmentConfiguration) { + m := &DeviceEnrollmentConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceEnrollmentConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceComanagementAuthorityConfiguration": + return NewDeviceComanagementAuthorityConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentLimitConfiguration": + return NewDeviceEnrollmentLimitConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentNotificationConfiguration": + return NewDeviceEnrollmentNotificationConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration": + return NewDeviceEnrollmentPlatformRestrictionConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration": + return NewDeviceEnrollmentPlatformRestrictionsConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration": + return NewDeviceEnrollmentWindowsHelloForBusinessConfiguration(), nil + case "#microsoft.graph.windows10EnrollmentCompletionPageConfiguration": + return NewWindows10EnrollmentCompletionPageConfiguration(), nil + } + } + } + } + return NewDeviceEnrollmentConfiguration(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device configuration profile +func (m *DeviceEnrollmentConfiguration) GetAssignments()([]EnrollmentConfigurationAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. Created date time in UTC of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) GetDescription()(*string) { + return m.description +} +// GetDeviceEnrollmentConfigurationType gets the deviceEnrollmentConfigurationType property value. Describes the TemplateFamily for the Template entity +func (m *DeviceEnrollmentConfiguration) GetDeviceEnrollmentConfigurationType()(*DeviceEnrollmentConfigurationType) { + return m.deviceEnrollmentConfigurationType +} +// GetDisplayName gets the displayName property value. The display name of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceEnrollmentConfigurationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceEnrollmentConfigurationType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceEnrollmentConfigurationType(val.(*DeviceEnrollmentConfigurationType)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified date time in UTC of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPriority gets the priority property value. Priority is used when a user exists in multiple groups that are assigned enrollment configuration. Users are subject only to the configuration with the lowest priority value. +func (m *DeviceEnrollmentConfiguration) GetPriority()(*int32) { + return m.priority +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. Optional role scope tags for the enrollment restrictions. +func (m *DeviceEnrollmentConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetVersion gets the version property value. The version of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceEnrollmentConfigurationType() != nil { + cast := (*m.GetDeviceEnrollmentConfigurationType()).String() + err = writer.WriteStringValue("deviceEnrollmentConfigurationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device configuration profile +func (m *DeviceEnrollmentConfiguration) SetAssignments(value []EnrollmentConfigurationAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Created date time in UTC of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDeviceEnrollmentConfigurationType sets the deviceEnrollmentConfigurationType property value. Describes the TemplateFamily for the Template entity +func (m *DeviceEnrollmentConfiguration) SetDeviceEnrollmentConfigurationType(value *DeviceEnrollmentConfigurationType)() { + m.deviceEnrollmentConfigurationType = value +} +// SetDisplayName sets the displayName property value. The display name of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified date time in UTC of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPriority sets the priority property value. Priority is used when a user exists in multiple groups that are assigned enrollment configuration. Users are subject only to the configuration with the lowest priority value. +func (m *DeviceEnrollmentConfiguration) SetPriority(value *int32)() { + m.priority = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. Optional role scope tags for the enrollment restrictions. +func (m *DeviceEnrollmentConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetVersion sets the version property value. The version of the device enrollment configuration +func (m *DeviceEnrollmentConfiguration) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_response.go new file mode 100644 index 000000000..a285089cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentConfigurationCollectionResponse +type DeviceEnrollmentConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentConfigurationable +} +// NewDeviceEnrollmentConfigurationCollectionResponse instantiates a new DeviceEnrollmentConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentConfigurationCollectionResponse()(*DeviceEnrollmentConfigurationCollectionResponse) { + m := &DeviceEnrollmentConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_responseable.go new file mode 100644 index 000000000..46460c086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentConfigurationCollectionResponseable +type DeviceEnrollmentConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentConfigurationable) + SetValue(value []DeviceEnrollmentConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_type.go b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_type.go new file mode 100644 index 000000000..4843448f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_configuration_type.go @@ -0,0 +1,80 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceEnrollmentConfigurationType int + +const ( + // Default. Set to unknown if the configuration type cannot be determined. + UNKNOWN_DEVICEENROLLMENTCONFIGURATIONTYPE DeviceEnrollmentConfigurationType = iota + // Indicates that configuration is of type limit which refers to number of devices a user is allowed to enroll. + LIMIT_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type platform restriction which refers to types of devices a user is allowed to enroll. + PLATFORMRESTRICTIONS_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type Windows Hello which refers to authentication method devices would use. + WINDOWSHELLOFORBUSINESS_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type default limit which refers to types of devices a user is allowed to enroll by default. + DEFAULTLIMIT_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type default platform restriction which refers to types of devices a user is allowed to enroll by default. + DEFAULTPLATFORMRESTRICTIONS_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type default Windows Hello which refers to authentication method devices would use by default. + DEFAULTWINDOWSHELLOFORBUSINESS_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type default Enrollment status page which refers to startup page displayed during OOBE in Autopilot devices by default. + DEFAULTWINDOWS10ENROLLMENTCOMPLETIONPAGECONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type Enrollment status page which refers to startup page displayed during OOBE in Autopilot devices. + WINDOWS10ENROLLMENTCOMPLETIONPAGECONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type Comanagement Authority which refers to policies applied to Co-Managed devices. + DEVICECOMANAGEMENTAUTHORITYCONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type single platform restriction which refers to types of devices a user is allowed to enroll. + SINGLEPLATFORMRESTRICTION_DEVICEENROLLMENTCONFIGURATIONTYPE + // Unknown future value + UNKNOWNFUTUREVALUE_DEVICEENROLLMENTCONFIGURATIONTYPE + // Indicates that configuration is of type Enrollment Notification which refers to types of notification a user receives during enrollment. + ENROLLMENTNOTIFICATIONSCONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE +) + +func (i DeviceEnrollmentConfigurationType) String() string { + return []string{"unknown", "limit", "platformRestrictions", "windowsHelloForBusiness", "defaultLimit", "defaultPlatformRestrictions", "defaultWindowsHelloForBusiness", "defaultWindows10EnrollmentCompletionPageConfiguration", "windows10EnrollmentCompletionPageConfiguration", "deviceComanagementAuthorityConfiguration", "singlePlatformRestriction", "unknownFutureValue", "enrollmentNotificationsConfiguration"}[i] +} +func ParseDeviceEnrollmentConfigurationType(v string) (interface{}, error) { + result := UNKNOWN_DEVICEENROLLMENTCONFIGURATIONTYPE + switch v { + case "unknown": + result = UNKNOWN_DEVICEENROLLMENTCONFIGURATIONTYPE + case "limit": + result = LIMIT_DEVICEENROLLMENTCONFIGURATIONTYPE + case "platformRestrictions": + result = PLATFORMRESTRICTIONS_DEVICEENROLLMENTCONFIGURATIONTYPE + case "windowsHelloForBusiness": + result = WINDOWSHELLOFORBUSINESS_DEVICEENROLLMENTCONFIGURATIONTYPE + case "defaultLimit": + result = DEFAULTLIMIT_DEVICEENROLLMENTCONFIGURATIONTYPE + case "defaultPlatformRestrictions": + result = DEFAULTPLATFORMRESTRICTIONS_DEVICEENROLLMENTCONFIGURATIONTYPE + case "defaultWindowsHelloForBusiness": + result = DEFAULTWINDOWSHELLOFORBUSINESS_DEVICEENROLLMENTCONFIGURATIONTYPE + case "defaultWindows10EnrollmentCompletionPageConfiguration": + result = DEFAULTWINDOWS10ENROLLMENTCOMPLETIONPAGECONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + case "windows10EnrollmentCompletionPageConfiguration": + result = WINDOWS10ENROLLMENTCOMPLETIONPAGECONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + case "deviceComanagementAuthorityConfiguration": + result = DEVICECOMANAGEMENTAUTHORITYCONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + case "singlePlatformRestriction": + result = SINGLEPLATFORMRESTRICTION_DEVICEENROLLMENTCONFIGURATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEENROLLMENTCONFIGURATIONTYPE + case "enrollmentNotificationsConfiguration": + result = ENROLLMENTNOTIFICATIONSCONFIGURATION_DEVICEENROLLMENTCONFIGURATIONTYPE + default: + return 0, errors.New("Unknown DeviceEnrollmentConfigurationType value: " + v) + } + return &result, nil +} +func SerializeDeviceEnrollmentConfigurationType(values []DeviceEnrollmentConfigurationType) []string { + 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/device_enrollment_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_configurationable.go new file mode 100644 index 000000000..11b810783 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_configurationable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentConfigurationable +type DeviceEnrollmentConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]EnrollmentConfigurationAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceEnrollmentConfigurationType()(*DeviceEnrollmentConfigurationType) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPriority()(*int32) + GetRoleScopeTagIds()([]string) + GetVersion()(*int32) + SetAssignments(value []EnrollmentConfigurationAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceEnrollmentConfigurationType(value *DeviceEnrollmentConfigurationType)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPriority(value *int32)() + SetRoleScopeTagIds(value []string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_failure_reason.go b/src/internal/connector/graph/betasdk/models/device_enrollment_failure_reason.go new file mode 100644 index 000000000..f875ed545 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_failure_reason.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceEnrollmentFailureReason int + +const ( + // Default value, failure reason is unknown. + UNKNOWN_DEVICEENROLLMENTFAILUREREASON DeviceEnrollmentFailureReason = iota + // Authentication failed + AUTHENTICATION_DEVICEENROLLMENTFAILUREREASON + // Call was authenticated, but not authorized to enroll. + AUTHORIZATION_DEVICEENROLLMENTFAILUREREASON + // Failed to validate the account for enrollment. (Account blocked, enrollment not enabled) + ACCOUNTVALIDATION_DEVICEENROLLMENTFAILUREREASON + // User could not be validated. (User does not exist, missing license) + USERVALIDATION_DEVICEENROLLMENTFAILUREREASON + // Device is not supported for mobile device management. + DEVICENOTSUPPORTED_DEVICEENROLLMENTFAILUREREASON + // Account is in maintenance. + INMAINTENANCE_DEVICEENROLLMENTFAILUREREASON + // Client sent a request that is not understood/supported by the service. + BADREQUEST_DEVICEENROLLMENTFAILUREREASON + // Feature(s) used by this enrollment are not supported for this account. + FEATURENOTSUPPORTED_DEVICEENROLLMENTFAILUREREASON + // Enrollment restrictions configured by admin blocked this enrollment. + ENROLLMENTRESTRICTIONSENFORCED_DEVICEENROLLMENTFAILUREREASON + // Client timed out or enrollment was aborted by enduser. + CLIENTDISCONNECTED_DEVICEENROLLMENTFAILUREREASON + // Enrollment was abandoned by enduser. (Enduser started onboarding but failed to complete it in timely manner) + USERABANDONMENT_DEVICEENROLLMENTFAILUREREASON +) + +func (i DeviceEnrollmentFailureReason) String() string { + return []string{"unknown", "authentication", "authorization", "accountValidation", "userValidation", "deviceNotSupported", "inMaintenance", "badRequest", "featureNotSupported", "enrollmentRestrictionsEnforced", "clientDisconnected", "userAbandonment"}[i] +} +func ParseDeviceEnrollmentFailureReason(v string) (interface{}, error) { + result := UNKNOWN_DEVICEENROLLMENTFAILUREREASON + switch v { + case "unknown": + result = UNKNOWN_DEVICEENROLLMENTFAILUREREASON + case "authentication": + result = AUTHENTICATION_DEVICEENROLLMENTFAILUREREASON + case "authorization": + result = AUTHORIZATION_DEVICEENROLLMENTFAILUREREASON + case "accountValidation": + result = ACCOUNTVALIDATION_DEVICEENROLLMENTFAILUREREASON + case "userValidation": + result = USERVALIDATION_DEVICEENROLLMENTFAILUREREASON + case "deviceNotSupported": + result = DEVICENOTSUPPORTED_DEVICEENROLLMENTFAILUREREASON + case "inMaintenance": + result = INMAINTENANCE_DEVICEENROLLMENTFAILUREREASON + case "badRequest": + result = BADREQUEST_DEVICEENROLLMENTFAILUREREASON + case "featureNotSupported": + result = FEATURENOTSUPPORTED_DEVICEENROLLMENTFAILUREREASON + case "enrollmentRestrictionsEnforced": + result = ENROLLMENTRESTRICTIONSENFORCED_DEVICEENROLLMENTFAILUREREASON + case "clientDisconnected": + result = CLIENTDISCONNECTED_DEVICEENROLLMENTFAILUREREASON + case "userAbandonment": + result = USERABANDONMENT_DEVICEENROLLMENTFAILUREREASON + default: + return 0, errors.New("Unknown DeviceEnrollmentFailureReason value: " + v) + } + return &result, nil +} +func SerializeDeviceEnrollmentFailureReason(values []DeviceEnrollmentFailureReason) []string { + 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/device_enrollment_limit_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration.go new file mode 100644 index 000000000..52223757b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentLimitConfiguration +type DeviceEnrollmentLimitConfiguration struct { + DeviceEnrollmentConfiguration + // The maximum number of devices that a user can enroll + limit *int32 +} +// NewDeviceEnrollmentLimitConfiguration instantiates a new DeviceEnrollmentLimitConfiguration and sets the default values. +func NewDeviceEnrollmentLimitConfiguration()(*DeviceEnrollmentLimitConfiguration) { + m := &DeviceEnrollmentLimitConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceEnrollmentLimitConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceEnrollmentLimitConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentLimitConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentLimitConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentLimitConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLimit(val) + } + return nil + } + return res +} +// GetLimit gets the limit property value. The maximum number of devices that a user can enroll +func (m *DeviceEnrollmentLimitConfiguration) GetLimit()(*int32) { + return m.limit +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentLimitConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("limit", m.GetLimit()) + if err != nil { + return err + } + } + return nil +} +// SetLimit sets the limit property value. The maximum number of devices that a user can enroll +func (m *DeviceEnrollmentLimitConfiguration) SetLimit(value *int32)() { + m.limit = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_response.go new file mode 100644 index 000000000..cf8531653 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentLimitConfigurationCollectionResponse +type DeviceEnrollmentLimitConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentLimitConfigurationable +} +// NewDeviceEnrollmentLimitConfigurationCollectionResponse instantiates a new DeviceEnrollmentLimitConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentLimitConfigurationCollectionResponse()(*DeviceEnrollmentLimitConfigurationCollectionResponse) { + m := &DeviceEnrollmentLimitConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentLimitConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentLimitConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentLimitConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentLimitConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentLimitConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentLimitConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentLimitConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentLimitConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentLimitConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentLimitConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentLimitConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentLimitConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_responseable.go new file mode 100644 index 000000000..4536210be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentLimitConfigurationCollectionResponseable +type DeviceEnrollmentLimitConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentLimitConfigurationable) + SetValue(value []DeviceEnrollmentLimitConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configurationable.go new file mode 100644 index 000000000..c0b11c918 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_limit_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentLimitConfigurationable +type DeviceEnrollmentLimitConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLimit()(*int32) + SetLimit(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration.go new file mode 100644 index 000000000..ac88299f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration.go @@ -0,0 +1,200 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentNotificationConfiguration +type DeviceEnrollmentNotificationConfiguration struct { + DeviceEnrollmentConfiguration + // Branding Options for the Message Template. Branding is defined in the Intune Admin Console. + brandingOptions *EnrollmentNotificationBrandingOptions + // DefaultLocale for the Enrollment Notification + defaultLocale *string + // Notification Message Template Id + notificationMessageTemplateId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The list of notification data - + notificationTemplates []string + // This enum indicates the platform type for which the enrollment restriction applies. + platformType *EnrollmentRestrictionPlatformType + // This enum indicates the Template type for which the enrollment notification applies. + templateType *EnrollmentNotificationTemplateType +} +// NewDeviceEnrollmentNotificationConfiguration instantiates a new DeviceEnrollmentNotificationConfiguration and sets the default values. +func NewDeviceEnrollmentNotificationConfiguration()(*DeviceEnrollmentNotificationConfiguration) { + m := &DeviceEnrollmentNotificationConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceEnrollmentNotificationConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceEnrollmentNotificationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentNotificationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentNotificationConfiguration(), nil +} +// GetBrandingOptions gets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console. +func (m *DeviceEnrollmentNotificationConfiguration) GetBrandingOptions()(*EnrollmentNotificationBrandingOptions) { + return m.brandingOptions +} +// GetDefaultLocale gets the defaultLocale property value. DefaultLocale for the Enrollment Notification +func (m *DeviceEnrollmentNotificationConfiguration) GetDefaultLocale()(*string) { + return m.defaultLocale +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentNotificationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["brandingOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentNotificationBrandingOptions) + if err != nil { + return err + } + if val != nil { + m.SetBrandingOptions(val.(*EnrollmentNotificationBrandingOptions)) + } + return nil + } + res["defaultLocale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLocale(val) + } + return nil + } + res["notificationMessageTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationMessageTemplateId(val) + } + return nil + } + res["notificationTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotificationTemplates(res) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentRestrictionPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*EnrollmentRestrictionPlatformType)) + } + return nil + } + res["templateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentNotificationTemplateType) + if err != nil { + return err + } + if val != nil { + m.SetTemplateType(val.(*EnrollmentNotificationTemplateType)) + } + return nil + } + return res +} +// GetNotificationMessageTemplateId gets the notificationMessageTemplateId property value. Notification Message Template Id +func (m *DeviceEnrollmentNotificationConfiguration) GetNotificationMessageTemplateId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.notificationMessageTemplateId +} +// GetNotificationTemplates gets the notificationTemplates property value. The list of notification data - +func (m *DeviceEnrollmentNotificationConfiguration) GetNotificationTemplates()([]string) { + return m.notificationTemplates +} +// GetPlatformType gets the platformType property value. This enum indicates the platform type for which the enrollment restriction applies. +func (m *DeviceEnrollmentNotificationConfiguration) GetPlatformType()(*EnrollmentRestrictionPlatformType) { + return m.platformType +} +// GetTemplateType gets the templateType property value. This enum indicates the Template type for which the enrollment notification applies. +func (m *DeviceEnrollmentNotificationConfiguration) GetTemplateType()(*EnrollmentNotificationTemplateType) { + return m.templateType +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentNotificationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetBrandingOptions() != nil { + cast := (*m.GetBrandingOptions()).String() + err = writer.WriteStringValue("brandingOptions", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultLocale", m.GetDefaultLocale()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("notificationMessageTemplateId", m.GetNotificationMessageTemplateId()) + if err != nil { + return err + } + } + if m.GetNotificationTemplates() != nil { + err = writer.WriteCollectionOfStringValues("notificationTemplates", m.GetNotificationTemplates()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + if m.GetTemplateType() != nil { + cast := (*m.GetTemplateType()).String() + err = writer.WriteStringValue("templateType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetBrandingOptions sets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console. +func (m *DeviceEnrollmentNotificationConfiguration) SetBrandingOptions(value *EnrollmentNotificationBrandingOptions)() { + m.brandingOptions = value +} +// SetDefaultLocale sets the defaultLocale property value. DefaultLocale for the Enrollment Notification +func (m *DeviceEnrollmentNotificationConfiguration) SetDefaultLocale(value *string)() { + m.defaultLocale = value +} +// SetNotificationMessageTemplateId sets the notificationMessageTemplateId property value. Notification Message Template Id +func (m *DeviceEnrollmentNotificationConfiguration) SetNotificationMessageTemplateId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.notificationMessageTemplateId = value +} +// SetNotificationTemplates sets the notificationTemplates property value. The list of notification data - +func (m *DeviceEnrollmentNotificationConfiguration) SetNotificationTemplates(value []string)() { + m.notificationTemplates = value +} +// SetPlatformType sets the platformType property value. This enum indicates the platform type for which the enrollment restriction applies. +func (m *DeviceEnrollmentNotificationConfiguration) SetPlatformType(value *EnrollmentRestrictionPlatformType)() { + m.platformType = value +} +// SetTemplateType sets the templateType property value. This enum indicates the Template type for which the enrollment notification applies. +func (m *DeviceEnrollmentNotificationConfiguration) SetTemplateType(value *EnrollmentNotificationTemplateType)() { + m.templateType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_response.go new file mode 100644 index 000000000..7214c0a84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentNotificationConfigurationCollectionResponse +type DeviceEnrollmentNotificationConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentNotificationConfigurationable +} +// NewDeviceEnrollmentNotificationConfigurationCollectionResponse instantiates a new DeviceEnrollmentNotificationConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentNotificationConfigurationCollectionResponse()(*DeviceEnrollmentNotificationConfigurationCollectionResponse) { + m := &DeviceEnrollmentNotificationConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentNotificationConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentNotificationConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentNotificationConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentNotificationConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentNotificationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentNotificationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentNotificationConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentNotificationConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentNotificationConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentNotificationConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentNotificationConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentNotificationConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_responseable.go new file mode 100644 index 000000000..408f19596 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentNotificationConfigurationCollectionResponseable +type DeviceEnrollmentNotificationConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentNotificationConfigurationable) + SetValue(value []DeviceEnrollmentNotificationConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configurationable.go new file mode 100644 index 000000000..2870a28d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_notification_configurationable.go @@ -0,0 +1,24 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentNotificationConfigurationable +type DeviceEnrollmentNotificationConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBrandingOptions()(*EnrollmentNotificationBrandingOptions) + GetDefaultLocale()(*string) + GetNotificationMessageTemplateId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetNotificationTemplates()([]string) + GetPlatformType()(*EnrollmentRestrictionPlatformType) + GetTemplateType()(*EnrollmentNotificationTemplateType) + SetBrandingOptions(value *EnrollmentNotificationBrandingOptions)() + SetDefaultLocale(value *string)() + SetNotificationMessageTemplateId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetNotificationTemplates(value []string)() + SetPlatformType(value *EnrollmentRestrictionPlatformType)() + SetTemplateType(value *EnrollmentNotificationTemplateType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction.go new file mode 100644 index 000000000..e92fb5488 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction.go @@ -0,0 +1,235 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestriction platform specific enrollment restrictions +type DeviceEnrollmentPlatformRestriction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Collection of blocked Manufacturers. + blockedManufacturers []string + // Collection of blocked Skus. + blockedSkus []string + // The OdataType property + odataType *string + // Max OS version supported + osMaximumVersion *string + // Min OS version supported + osMinimumVersion *string + // Block personally owned devices from enrolling + personalDeviceEnrollmentBlocked *bool + // Block the platform from enrolling + platformBlocked *bool +} +// NewDeviceEnrollmentPlatformRestriction instantiates a new deviceEnrollmentPlatformRestriction and sets the default values. +func NewDeviceEnrollmentPlatformRestriction()(*DeviceEnrollmentPlatformRestriction) { + m := &DeviceEnrollmentPlatformRestriction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentPlatformRestriction(), 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 *DeviceEnrollmentPlatformRestriction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBlockedManufacturers gets the blockedManufacturers property value. Collection of blocked Manufacturers. +func (m *DeviceEnrollmentPlatformRestriction) GetBlockedManufacturers()([]string) { + return m.blockedManufacturers +} +// GetBlockedSkus gets the blockedSkus property value. Collection of blocked Skus. +func (m *DeviceEnrollmentPlatformRestriction) GetBlockedSkus()([]string) { + return m.blockedSkus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentPlatformRestriction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blockedManufacturers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBlockedManufacturers(res) + } + return nil + } + res["blockedSkus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBlockedSkus(res) + } + 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["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["personalDeviceEnrollmentBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalDeviceEnrollmentBlocked(val) + } + return nil + } + res["platformBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatformBlocked(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceEnrollmentPlatformRestriction) GetOdataType()(*string) { + return m.odataType +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Max OS version supported +func (m *DeviceEnrollmentPlatformRestriction) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Min OS version supported +func (m *DeviceEnrollmentPlatformRestriction) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPersonalDeviceEnrollmentBlocked gets the personalDeviceEnrollmentBlocked property value. Block personally owned devices from enrolling +func (m *DeviceEnrollmentPlatformRestriction) GetPersonalDeviceEnrollmentBlocked()(*bool) { + return m.personalDeviceEnrollmentBlocked +} +// GetPlatformBlocked gets the platformBlocked property value. Block the platform from enrolling +func (m *DeviceEnrollmentPlatformRestriction) GetPlatformBlocked()(*bool) { + return m.platformBlocked +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentPlatformRestriction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBlockedManufacturers() != nil { + err := writer.WriteCollectionOfStringValues("blockedManufacturers", m.GetBlockedManufacturers()) + if err != nil { + return err + } + } + if m.GetBlockedSkus() != nil { + err := writer.WriteCollectionOfStringValues("blockedSkus", m.GetBlockedSkus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("personalDeviceEnrollmentBlocked", m.GetPersonalDeviceEnrollmentBlocked()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("platformBlocked", m.GetPlatformBlocked()) + 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 *DeviceEnrollmentPlatformRestriction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBlockedManufacturers sets the blockedManufacturers property value. Collection of blocked Manufacturers. +func (m *DeviceEnrollmentPlatformRestriction) SetBlockedManufacturers(value []string)() { + m.blockedManufacturers = value +} +// SetBlockedSkus sets the blockedSkus property value. Collection of blocked Skus. +func (m *DeviceEnrollmentPlatformRestriction) SetBlockedSkus(value []string)() { + m.blockedSkus = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceEnrollmentPlatformRestriction) SetOdataType(value *string)() { + m.odataType = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Max OS version supported +func (m *DeviceEnrollmentPlatformRestriction) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Min OS version supported +func (m *DeviceEnrollmentPlatformRestriction) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPersonalDeviceEnrollmentBlocked sets the personalDeviceEnrollmentBlocked property value. Block personally owned devices from enrolling +func (m *DeviceEnrollmentPlatformRestriction) SetPersonalDeviceEnrollmentBlocked(value *bool)() { + m.personalDeviceEnrollmentBlocked = value +} +// SetPlatformBlocked sets the platformBlocked property value. Block the platform from enrolling +func (m *DeviceEnrollmentPlatformRestriction) SetPlatformBlocked(value *bool)() { + m.platformBlocked = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration.go new file mode 100644 index 000000000..71845442d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionConfiguration +type DeviceEnrollmentPlatformRestrictionConfiguration struct { + DeviceEnrollmentConfiguration + // Restrictions based on platform, platform operating system version, and device ownership + platformRestriction DeviceEnrollmentPlatformRestrictionable + // This enum indicates the platform type for which the enrollment restriction applies. + platformType *EnrollmentRestrictionPlatformType +} +// NewDeviceEnrollmentPlatformRestrictionConfiguration instantiates a new DeviceEnrollmentPlatformRestrictionConfiguration and sets the default values. +func NewDeviceEnrollmentPlatformRestrictionConfiguration()(*DeviceEnrollmentPlatformRestrictionConfiguration) { + m := &DeviceEnrollmentPlatformRestrictionConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceEnrollmentPlatformRestrictionConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentPlatformRestrictionConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentPlatformRestrictionConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["platformRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlatformRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentRestrictionPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*EnrollmentRestrictionPlatformType)) + } + return nil + } + return res +} +// GetPlatformRestriction gets the platformRestriction property value. Restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) GetPlatformRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.platformRestriction +} +// GetPlatformType gets the platformType property value. This enum indicates the platform type for which the enrollment restriction applies. +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) GetPlatformType()(*EnrollmentRestrictionPlatformType) { + return m.platformType +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("platformRestriction", m.GetPlatformRestriction()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetPlatformRestriction sets the platformRestriction property value. Restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) SetPlatformRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.platformRestriction = value +} +// SetPlatformType sets the platformType property value. This enum indicates the platform type for which the enrollment restriction applies. +func (m *DeviceEnrollmentPlatformRestrictionConfiguration) SetPlatformType(value *EnrollmentRestrictionPlatformType)() { + m.platformType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_response.go new file mode 100644 index 000000000..33e781010 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse +type DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentPlatformRestrictionConfigurationable +} +// NewDeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse instantiates a new DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse()(*DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse) { + m := &DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentPlatformRestrictionConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentPlatformRestrictionConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentPlatformRestrictionConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentPlatformRestrictionConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentPlatformRestrictionConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentPlatformRestrictionConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentPlatformRestrictionConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_responseable.go new file mode 100644 index 000000000..001243cce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponseable +type DeviceEnrollmentPlatformRestrictionConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentPlatformRestrictionConfigurationable) + SetValue(value []DeviceEnrollmentPlatformRestrictionConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configurationable.go new file mode 100644 index 000000000..a720c8043 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restriction_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionConfigurationable +type DeviceEnrollmentPlatformRestrictionConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlatformRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetPlatformType()(*EnrollmentRestrictionPlatformType) + SetPlatformRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetPlatformType(value *EnrollmentRestrictionPlatformType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictionable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictionable.go new file mode 100644 index 000000000..8f45dea66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictionable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionable +type DeviceEnrollmentPlatformRestrictionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlockedManufacturers()([]string) + GetBlockedSkus()([]string) + GetOdataType()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumVersion()(*string) + GetPersonalDeviceEnrollmentBlocked()(*bool) + GetPlatformBlocked()(*bool) + SetBlockedManufacturers(value []string)() + SetBlockedSkus(value []string)() + SetOdataType(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPersonalDeviceEnrollmentBlocked(value *bool)() + SetPlatformBlocked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration.go new file mode 100644 index 000000000..c6c7eddc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration.go @@ -0,0 +1,244 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionsConfiguration +type DeviceEnrollmentPlatformRestrictionsConfiguration struct { + DeviceEnrollmentConfiguration + // Android for work restrictions based on platform, platform operating system version, and device ownership + androidForWorkRestriction DeviceEnrollmentPlatformRestrictionable + // Android restrictions based on platform, platform operating system version, and device ownership + androidRestriction DeviceEnrollmentPlatformRestrictionable + // Ios restrictions based on platform, platform operating system version, and device ownership + iosRestriction DeviceEnrollmentPlatformRestrictionable + // Mac restrictions based on platform, platform operating system version, and device ownership + macOSRestriction DeviceEnrollmentPlatformRestrictionable + // Mac restrictions based on platform, platform operating system version, and device ownership + macRestriction DeviceEnrollmentPlatformRestrictionable + // Windows Home Sku restrictions based on platform, platform operating system version, and device ownership + windowsHomeSkuRestriction DeviceEnrollmentPlatformRestrictionable + // Windows mobile restrictions based on platform, platform operating system version, and device ownership + windowsMobileRestriction DeviceEnrollmentPlatformRestrictionable + // Windows restrictions based on platform, platform operating system version, and device ownership + windowsRestriction DeviceEnrollmentPlatformRestrictionable +} +// NewDeviceEnrollmentPlatformRestrictionsConfiguration instantiates a new DeviceEnrollmentPlatformRestrictionsConfiguration and sets the default values. +func NewDeviceEnrollmentPlatformRestrictionsConfiguration()(*DeviceEnrollmentPlatformRestrictionsConfiguration) { + m := &DeviceEnrollmentPlatformRestrictionsConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceEnrollmentPlatformRestrictionsConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentPlatformRestrictionsConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentPlatformRestrictionsConfiguration(), nil +} +// GetAndroidForWorkRestriction gets the androidForWorkRestriction property value. Android for work restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetAndroidForWorkRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.androidForWorkRestriction +} +// GetAndroidRestriction gets the androidRestriction property value. Android restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetAndroidRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.androidRestriction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["androidForWorkRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAndroidForWorkRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["androidRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAndroidRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["iosRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIosRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["macOSRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMacOSRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["macRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMacRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["windowsHomeSkuRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsHomeSkuRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["windowsMobileRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsMobileRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + res["windowsRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceEnrollmentPlatformRestrictionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsRestriction(val.(DeviceEnrollmentPlatformRestrictionable)) + } + return nil + } + return res +} +// GetIosRestriction gets the iosRestriction property value. Ios restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetIosRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.iosRestriction +} +// GetMacOSRestriction gets the macOSRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetMacOSRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.macOSRestriction +} +// GetMacRestriction gets the macRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetMacRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.macRestriction +} +// GetWindowsHomeSkuRestriction gets the windowsHomeSkuRestriction property value. Windows Home Sku restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetWindowsHomeSkuRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.windowsHomeSkuRestriction +} +// GetWindowsMobileRestriction gets the windowsMobileRestriction property value. Windows mobile restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetWindowsMobileRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.windowsMobileRestriction +} +// GetWindowsRestriction gets the windowsRestriction property value. Windows restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) GetWindowsRestriction()(DeviceEnrollmentPlatformRestrictionable) { + return m.windowsRestriction +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("androidForWorkRestriction", m.GetAndroidForWorkRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("androidRestriction", m.GetAndroidRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("iosRestriction", m.GetIosRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("macOSRestriction", m.GetMacOSRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("macRestriction", m.GetMacRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsHomeSkuRestriction", m.GetWindowsHomeSkuRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsMobileRestriction", m.GetWindowsMobileRestriction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsRestriction", m.GetWindowsRestriction()) + if err != nil { + return err + } + } + return nil +} +// SetAndroidForWorkRestriction sets the androidForWorkRestriction property value. Android for work restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetAndroidForWorkRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.androidForWorkRestriction = value +} +// SetAndroidRestriction sets the androidRestriction property value. Android restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetAndroidRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.androidRestriction = value +} +// SetIosRestriction sets the iosRestriction property value. Ios restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetIosRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.iosRestriction = value +} +// SetMacOSRestriction sets the macOSRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetMacOSRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.macOSRestriction = value +} +// SetMacRestriction sets the macRestriction property value. Mac restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetMacRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.macRestriction = value +} +// SetWindowsHomeSkuRestriction sets the windowsHomeSkuRestriction property value. Windows Home Sku restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetWindowsHomeSkuRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.windowsHomeSkuRestriction = value +} +// SetWindowsMobileRestriction sets the windowsMobileRestriction property value. Windows mobile restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetWindowsMobileRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.windowsMobileRestriction = value +} +// SetWindowsRestriction sets the windowsRestriction property value. Windows restrictions based on platform, platform operating system version, and device ownership +func (m *DeviceEnrollmentPlatformRestrictionsConfiguration) SetWindowsRestriction(value DeviceEnrollmentPlatformRestrictionable)() { + m.windowsRestriction = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_response.go new file mode 100644 index 000000000..cf439c7f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse +type DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentPlatformRestrictionsConfigurationable +} +// NewDeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse instantiates a new DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse()(*DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse) { + m := &DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentPlatformRestrictionsConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentPlatformRestrictionsConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentPlatformRestrictionsConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentPlatformRestrictionsConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentPlatformRestrictionsConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_responseable.go new file mode 100644 index 000000000..9328939c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponseable +type DeviceEnrollmentPlatformRestrictionsConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentPlatformRestrictionsConfigurationable) + SetValue(value []DeviceEnrollmentPlatformRestrictionsConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configurationable.go new file mode 100644 index 000000000..79260dd7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_platform_restrictions_configurationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentPlatformRestrictionsConfigurationable +type DeviceEnrollmentPlatformRestrictionsConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidForWorkRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetAndroidRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetIosRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetMacOSRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetMacRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetWindowsHomeSkuRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetWindowsMobileRestriction()(DeviceEnrollmentPlatformRestrictionable) + GetWindowsRestriction()(DeviceEnrollmentPlatformRestrictionable) + SetAndroidForWorkRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetAndroidRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetIosRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetMacOSRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetMacRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetWindowsHomeSkuRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetWindowsMobileRestriction(value DeviceEnrollmentPlatformRestrictionable)() + SetWindowsRestriction(value DeviceEnrollmentPlatformRestrictionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_type.go b/src/internal/connector/graph/betasdk/models/device_enrollment_type.go new file mode 100644 index 000000000..1096d2ea4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_type.go @@ -0,0 +1,96 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceEnrollmentType int + +const ( + // Default value, enrollment type was not collected. + UNKNOWN_DEVICEENROLLMENTTYPE DeviceEnrollmentType = iota + // User driven enrollment through BYOD channel. + USERENROLLMENT_DEVICEENROLLMENTTYPE + // User enrollment with a device enrollment manager account. + DEVICEENROLLMENTMANAGER_DEVICEENROLLMENTTYPE + // Apple bulk enrollment with user challenge. (DEP, Apple Configurator) + APPLEBULKWITHUSER_DEVICEENROLLMENTTYPE + // Apple bulk enrollment without user challenge. (DEP, Apple Configurator, Mobile Config) + APPLEBULKWITHOUTUSER_DEVICEENROLLMENTTYPE + // Windows 10 Azure AD Join. + WINDOWSAZUREADJOIN_DEVICEENROLLMENTTYPE + // Windows 10 Bulk enrollment through ICD with certificate. + WINDOWSBULKUSERLESS_DEVICEENROLLMENTTYPE + // Windows 10 automatic enrollment. (Add work account) + WINDOWSAUTOENROLLMENT_DEVICEENROLLMENTTYPE + // Windows 10 bulk Azure AD Join. + WINDOWSBULKAZUREDOMAINJOIN_DEVICEENROLLMENTTYPE + // Windows 10 Co-Management triggered by AutoPilot or Group Policy. + WINDOWSCOMANAGEMENT_DEVICEENROLLMENTTYPE + // Windows 10 Azure AD Join using Device Auth. + WINDOWSAZUREADJOINUSINGDEVICEAUTH_DEVICEENROLLMENTTYPE + // Device managed by Apple user enrollment + APPLEUSERENROLLMENT_DEVICEENROLLMENTTYPE + // Device managed by Apple user enrollment with service account + APPLEUSERENROLLMENTWITHSERVICEACCOUNT_DEVICEENROLLMENTTYPE + // Azure AD Join enrollment when an Azure VM is provisioned + AZUREADJOINUSINGAZUREVMEXTENSION_DEVICEENROLLMENTTYPE + // Android Enterprise Dedicated Device + ANDROIDENTERPRISEDEDICATEDDEVICE_DEVICEENROLLMENTTYPE + // Android Enterprise Fully Managed + ANDROIDENTERPRISEFULLYMANAGED_DEVICEENROLLMENTTYPE + // Android Enterprise Corporate Work Profile + ANDROIDENTERPRISECORPORATEWORKPROFILE_DEVICEENROLLMENTTYPE +) + +func (i DeviceEnrollmentType) String() string { + return []string{"unknown", "userEnrollment", "deviceEnrollmentManager", "appleBulkWithUser", "appleBulkWithoutUser", "windowsAzureADJoin", "windowsBulkUserless", "windowsAutoEnrollment", "windowsBulkAzureDomainJoin", "windowsCoManagement", "windowsAzureADJoinUsingDeviceAuth", "appleUserEnrollment", "appleUserEnrollmentWithServiceAccount", "azureAdJoinUsingAzureVmExtension", "androidEnterpriseDedicatedDevice", "androidEnterpriseFullyManaged", "androidEnterpriseCorporateWorkProfile"}[i] +} +func ParseDeviceEnrollmentType(v string) (interface{}, error) { + result := UNKNOWN_DEVICEENROLLMENTTYPE + switch v { + case "unknown": + result = UNKNOWN_DEVICEENROLLMENTTYPE + case "userEnrollment": + result = USERENROLLMENT_DEVICEENROLLMENTTYPE + case "deviceEnrollmentManager": + result = DEVICEENROLLMENTMANAGER_DEVICEENROLLMENTTYPE + case "appleBulkWithUser": + result = APPLEBULKWITHUSER_DEVICEENROLLMENTTYPE + case "appleBulkWithoutUser": + result = APPLEBULKWITHOUTUSER_DEVICEENROLLMENTTYPE + case "windowsAzureADJoin": + result = WINDOWSAZUREADJOIN_DEVICEENROLLMENTTYPE + case "windowsBulkUserless": + result = WINDOWSBULKUSERLESS_DEVICEENROLLMENTTYPE + case "windowsAutoEnrollment": + result = WINDOWSAUTOENROLLMENT_DEVICEENROLLMENTTYPE + case "windowsBulkAzureDomainJoin": + result = WINDOWSBULKAZUREDOMAINJOIN_DEVICEENROLLMENTTYPE + case "windowsCoManagement": + result = WINDOWSCOMANAGEMENT_DEVICEENROLLMENTTYPE + case "windowsAzureADJoinUsingDeviceAuth": + result = WINDOWSAZUREADJOINUSINGDEVICEAUTH_DEVICEENROLLMENTTYPE + case "appleUserEnrollment": + result = APPLEUSERENROLLMENT_DEVICEENROLLMENTTYPE + case "appleUserEnrollmentWithServiceAccount": + result = APPLEUSERENROLLMENTWITHSERVICEACCOUNT_DEVICEENROLLMENTTYPE + case "azureAdJoinUsingAzureVmExtension": + result = AZUREADJOINUSINGAZUREVMEXTENSION_DEVICEENROLLMENTTYPE + case "androidEnterpriseDedicatedDevice": + result = ANDROIDENTERPRISEDEDICATEDDEVICE_DEVICEENROLLMENTTYPE + case "androidEnterpriseFullyManaged": + result = ANDROIDENTERPRISEFULLYMANAGED_DEVICEENROLLMENTTYPE + case "androidEnterpriseCorporateWorkProfile": + result = ANDROIDENTERPRISECORPORATEWORKPROFILE_DEVICEENROLLMENTTYPE + default: + return 0, errors.New("Unknown DeviceEnrollmentType value: " + v) + } + return &result, nil +} +func SerializeDeviceEnrollmentType(values []DeviceEnrollmentType) []string { + 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/device_enrollment_windows_hello_for_business_configuration.go b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration.go new file mode 100644 index 000000000..b6b78a8ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration.go @@ -0,0 +1,380 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentWindowsHelloForBusinessConfiguration +type DeviceEnrollmentWindowsHelloForBusinessConfiguration struct { + DeviceEnrollmentConfiguration + // Possible values of a property + enhancedBiometricsState *Enablement + // Controls the period of time (in days) that a PIN can be used before the system requires the user to change it. This must be set between 0 and 730, inclusive. If set to 0, the user's PIN will never expire + pinExpirationInDays *int32 + // Windows Hello for Business pin usage options + pinLowercaseCharactersUsage *WindowsHelloForBusinessPinUsage + // Controls the maximum number of characters allowed for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive. This value must be greater than or equal to the value set for the minimum PIN. + pinMaximumLength *int32 + // Controls the minimum number of characters required for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive, and less than or equal to the value set for the maximum PIN. + pinMinimumLength *int32 + // Controls the ability to prevent users from using past PINs. This must be set between 0 and 50, inclusive, and the current PIN of the user is included in that count. If set to 0, previous PINs are not stored. PIN history is not preserved through a PIN reset. + pinPreviousBlockCount *int32 + // Windows Hello for Business pin usage options + pinSpecialCharactersUsage *WindowsHelloForBusinessPinUsage + // Windows Hello for Business pin usage options + pinUppercaseCharactersUsage *WindowsHelloForBusinessPinUsage + // Controls the use of Remote Windows Hello for Business. Remote Windows Hello for Business provides the ability for a portable, registered device to be usable as a companion for desktop authentication. The desktop must be Azure AD joined and the companion device must have a Windows Hello for Business PIN. + remotePassportEnabled *bool + // Controls whether to require a Trusted Platform Module (TPM) for provisioning Windows Hello for Business. A TPM provides an additional security benefit in that data stored on it cannot be used on other devices. If set to False, all devices can provision Windows Hello for Business even if there is not a usable TPM. + securityDeviceRequired *bool + // Possible values of a property + securityKeyForSignIn *Enablement + // Possible values of a property + state *Enablement + // Controls the use of biometric gestures, such as face and fingerprint, as an alternative to the Windows Hello for Business PIN. If set to False, biometric gestures are not allowed. Users must still configure a PIN as a backup in case of failures. + unlockWithBiometricsEnabled *bool +} +// NewDeviceEnrollmentWindowsHelloForBusinessConfiguration instantiates a new DeviceEnrollmentWindowsHelloForBusinessConfiguration and sets the default values. +func NewDeviceEnrollmentWindowsHelloForBusinessConfiguration()(*DeviceEnrollmentWindowsHelloForBusinessConfiguration) { + m := &DeviceEnrollmentWindowsHelloForBusinessConfiguration{ + DeviceEnrollmentConfiguration: *NewDeviceEnrollmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceEnrollmentWindowsHelloForBusinessConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentWindowsHelloForBusinessConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentWindowsHelloForBusinessConfiguration(), nil +} +// GetEnhancedBiometricsState gets the enhancedBiometricsState property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetEnhancedBiometricsState()(*Enablement) { + return m.enhancedBiometricsState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceEnrollmentConfiguration.GetFieldDeserializers() + res["enhancedBiometricsState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetEnhancedBiometricsState(val.(*Enablement)) + } + return nil + } + res["pinExpirationInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPinExpirationInDays(val) + } + return nil + } + res["pinLowercaseCharactersUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsHelloForBusinessPinUsage) + if err != nil { + return err + } + if val != nil { + m.SetPinLowercaseCharactersUsage(val.(*WindowsHelloForBusinessPinUsage)) + } + return nil + } + res["pinMaximumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPinMaximumLength(val) + } + return nil + } + res["pinMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPinMinimumLength(val) + } + return nil + } + res["pinPreviousBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPinPreviousBlockCount(val) + } + return nil + } + res["pinSpecialCharactersUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsHelloForBusinessPinUsage) + if err != nil { + return err + } + if val != nil { + m.SetPinSpecialCharactersUsage(val.(*WindowsHelloForBusinessPinUsage)) + } + return nil + } + res["pinUppercaseCharactersUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsHelloForBusinessPinUsage) + if err != nil { + return err + } + if val != nil { + m.SetPinUppercaseCharactersUsage(val.(*WindowsHelloForBusinessPinUsage)) + } + return nil + } + res["remotePassportEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRemotePassportEnabled(val) + } + return nil + } + res["securityDeviceRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDeviceRequired(val) + } + return nil + } + res["securityKeyForSignIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSecurityKeyForSignIn(val.(*Enablement)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*Enablement)) + } + return nil + } + res["unlockWithBiometricsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnlockWithBiometricsEnabled(val) + } + return nil + } + return res +} +// GetPinExpirationInDays gets the pinExpirationInDays property value. Controls the period of time (in days) that a PIN can be used before the system requires the user to change it. This must be set between 0 and 730, inclusive. If set to 0, the user's PIN will never expire +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinExpirationInDays()(*int32) { + return m.pinExpirationInDays +} +// GetPinLowercaseCharactersUsage gets the pinLowercaseCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinLowercaseCharactersUsage()(*WindowsHelloForBusinessPinUsage) { + return m.pinLowercaseCharactersUsage +} +// GetPinMaximumLength gets the pinMaximumLength property value. Controls the maximum number of characters allowed for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive. This value must be greater than or equal to the value set for the minimum PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinMaximumLength()(*int32) { + return m.pinMaximumLength +} +// GetPinMinimumLength gets the pinMinimumLength property value. Controls the minimum number of characters required for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive, and less than or equal to the value set for the maximum PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinMinimumLength()(*int32) { + return m.pinMinimumLength +} +// GetPinPreviousBlockCount gets the pinPreviousBlockCount property value. Controls the ability to prevent users from using past PINs. This must be set between 0 and 50, inclusive, and the current PIN of the user is included in that count. If set to 0, previous PINs are not stored. PIN history is not preserved through a PIN reset. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinPreviousBlockCount()(*int32) { + return m.pinPreviousBlockCount +} +// GetPinSpecialCharactersUsage gets the pinSpecialCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinSpecialCharactersUsage()(*WindowsHelloForBusinessPinUsage) { + return m.pinSpecialCharactersUsage +} +// GetPinUppercaseCharactersUsage gets the pinUppercaseCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetPinUppercaseCharactersUsage()(*WindowsHelloForBusinessPinUsage) { + return m.pinUppercaseCharactersUsage +} +// GetRemotePassportEnabled gets the remotePassportEnabled property value. Controls the use of Remote Windows Hello for Business. Remote Windows Hello for Business provides the ability for a portable, registered device to be usable as a companion for desktop authentication. The desktop must be Azure AD joined and the companion device must have a Windows Hello for Business PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetRemotePassportEnabled()(*bool) { + return m.remotePassportEnabled +} +// GetSecurityDeviceRequired gets the securityDeviceRequired property value. Controls whether to require a Trusted Platform Module (TPM) for provisioning Windows Hello for Business. A TPM provides an additional security benefit in that data stored on it cannot be used on other devices. If set to False, all devices can provision Windows Hello for Business even if there is not a usable TPM. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetSecurityDeviceRequired()(*bool) { + return m.securityDeviceRequired +} +// GetSecurityKeyForSignIn gets the securityKeyForSignIn property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetSecurityKeyForSignIn()(*Enablement) { + return m.securityKeyForSignIn +} +// GetState gets the state property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetState()(*Enablement) { + return m.state +} +// GetUnlockWithBiometricsEnabled gets the unlockWithBiometricsEnabled property value. Controls the use of biometric gestures, such as face and fingerprint, as an alternative to the Windows Hello for Business PIN. If set to False, biometric gestures are not allowed. Users must still configure a PIN as a backup in case of failures. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) GetUnlockWithBiometricsEnabled()(*bool) { + return m.unlockWithBiometricsEnabled +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceEnrollmentConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetEnhancedBiometricsState() != nil { + cast := (*m.GetEnhancedBiometricsState()).String() + err = writer.WriteStringValue("enhancedBiometricsState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pinExpirationInDays", m.GetPinExpirationInDays()) + if err != nil { + return err + } + } + if m.GetPinLowercaseCharactersUsage() != nil { + cast := (*m.GetPinLowercaseCharactersUsage()).String() + err = writer.WriteStringValue("pinLowercaseCharactersUsage", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pinMaximumLength", m.GetPinMaximumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pinMinimumLength", m.GetPinMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pinPreviousBlockCount", m.GetPinPreviousBlockCount()) + if err != nil { + return err + } + } + if m.GetPinSpecialCharactersUsage() != nil { + cast := (*m.GetPinSpecialCharactersUsage()).String() + err = writer.WriteStringValue("pinSpecialCharactersUsage", &cast) + if err != nil { + return err + } + } + if m.GetPinUppercaseCharactersUsage() != nil { + cast := (*m.GetPinUppercaseCharactersUsage()).String() + err = writer.WriteStringValue("pinUppercaseCharactersUsage", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("remotePassportEnabled", m.GetRemotePassportEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDeviceRequired", m.GetSecurityDeviceRequired()) + if err != nil { + return err + } + } + if m.GetSecurityKeyForSignIn() != nil { + cast := (*m.GetSecurityKeyForSignIn()).String() + err = writer.WriteStringValue("securityKeyForSignIn", &cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("unlockWithBiometricsEnabled", m.GetUnlockWithBiometricsEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetEnhancedBiometricsState sets the enhancedBiometricsState property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetEnhancedBiometricsState(value *Enablement)() { + m.enhancedBiometricsState = value +} +// SetPinExpirationInDays sets the pinExpirationInDays property value. Controls the period of time (in days) that a PIN can be used before the system requires the user to change it. This must be set between 0 and 730, inclusive. If set to 0, the user's PIN will never expire +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinExpirationInDays(value *int32)() { + m.pinExpirationInDays = value +} +// SetPinLowercaseCharactersUsage sets the pinLowercaseCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinLowercaseCharactersUsage(value *WindowsHelloForBusinessPinUsage)() { + m.pinLowercaseCharactersUsage = value +} +// SetPinMaximumLength sets the pinMaximumLength property value. Controls the maximum number of characters allowed for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive. This value must be greater than or equal to the value set for the minimum PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinMaximumLength(value *int32)() { + m.pinMaximumLength = value +} +// SetPinMinimumLength sets the pinMinimumLength property value. Controls the minimum number of characters required for the Windows Hello for Business PIN. This value must be between 4 and 127, inclusive, and less than or equal to the value set for the maximum PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinMinimumLength(value *int32)() { + m.pinMinimumLength = value +} +// SetPinPreviousBlockCount sets the pinPreviousBlockCount property value. Controls the ability to prevent users from using past PINs. This must be set between 0 and 50, inclusive, and the current PIN of the user is included in that count. If set to 0, previous PINs are not stored. PIN history is not preserved through a PIN reset. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinPreviousBlockCount(value *int32)() { + m.pinPreviousBlockCount = value +} +// SetPinSpecialCharactersUsage sets the pinSpecialCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinSpecialCharactersUsage(value *WindowsHelloForBusinessPinUsage)() { + m.pinSpecialCharactersUsage = value +} +// SetPinUppercaseCharactersUsage sets the pinUppercaseCharactersUsage property value. Windows Hello for Business pin usage options +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetPinUppercaseCharactersUsage(value *WindowsHelloForBusinessPinUsage)() { + m.pinUppercaseCharactersUsage = value +} +// SetRemotePassportEnabled sets the remotePassportEnabled property value. Controls the use of Remote Windows Hello for Business. Remote Windows Hello for Business provides the ability for a portable, registered device to be usable as a companion for desktop authentication. The desktop must be Azure AD joined and the companion device must have a Windows Hello for Business PIN. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetRemotePassportEnabled(value *bool)() { + m.remotePassportEnabled = value +} +// SetSecurityDeviceRequired sets the securityDeviceRequired property value. Controls whether to require a Trusted Platform Module (TPM) for provisioning Windows Hello for Business. A TPM provides an additional security benefit in that data stored on it cannot be used on other devices. If set to False, all devices can provision Windows Hello for Business even if there is not a usable TPM. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetSecurityDeviceRequired(value *bool)() { + m.securityDeviceRequired = value +} +// SetSecurityKeyForSignIn sets the securityKeyForSignIn property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetSecurityKeyForSignIn(value *Enablement)() { + m.securityKeyForSignIn = value +} +// SetState sets the state property value. Possible values of a property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetState(value *Enablement)() { + m.state = value +} +// SetUnlockWithBiometricsEnabled sets the unlockWithBiometricsEnabled property value. Controls the use of biometric gestures, such as face and fingerprint, as an alternative to the Windows Hello for Business PIN. If set to False, biometric gestures are not allowed. Users must still configure a PIN as a backup in case of failures. +func (m *DeviceEnrollmentWindowsHelloForBusinessConfiguration) SetUnlockWithBiometricsEnabled(value *bool)() { + m.unlockWithBiometricsEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_response.go new file mode 100644 index 000000000..453d74cde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse +type DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceEnrollmentWindowsHelloForBusinessConfigurationable +} +// NewDeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse instantiates a new DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse and sets the default values. +func NewDeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse()(*DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse) { + m := &DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentWindowsHelloForBusinessConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentWindowsHelloForBusinessConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentWindowsHelloForBusinessConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse) GetValue()([]DeviceEnrollmentWindowsHelloForBusinessConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponse) SetValue(value []DeviceEnrollmentWindowsHelloForBusinessConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_responseable.go new file mode 100644 index 000000000..5dc9b61d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponseable +type DeviceEnrollmentWindowsHelloForBusinessConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceEnrollmentWindowsHelloForBusinessConfigurationable) + SetValue(value []DeviceEnrollmentWindowsHelloForBusinessConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configurationable.go b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configurationable.go new file mode 100644 index 000000000..8e331dcd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_enrollment_windows_hello_for_business_configurationable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEnrollmentWindowsHelloForBusinessConfigurationable +type DeviceEnrollmentWindowsHelloForBusinessConfigurationable interface { + DeviceEnrollmentConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnhancedBiometricsState()(*Enablement) + GetPinExpirationInDays()(*int32) + GetPinLowercaseCharactersUsage()(*WindowsHelloForBusinessPinUsage) + GetPinMaximumLength()(*int32) + GetPinMinimumLength()(*int32) + GetPinPreviousBlockCount()(*int32) + GetPinSpecialCharactersUsage()(*WindowsHelloForBusinessPinUsage) + GetPinUppercaseCharactersUsage()(*WindowsHelloForBusinessPinUsage) + GetRemotePassportEnabled()(*bool) + GetSecurityDeviceRequired()(*bool) + GetSecurityKeyForSignIn()(*Enablement) + GetState()(*Enablement) + GetUnlockWithBiometricsEnabled()(*bool) + SetEnhancedBiometricsState(value *Enablement)() + SetPinExpirationInDays(value *int32)() + SetPinLowercaseCharactersUsage(value *WindowsHelloForBusinessPinUsage)() + SetPinMaximumLength(value *int32)() + SetPinMinimumLength(value *int32)() + SetPinPreviousBlockCount(value *int32)() + SetPinSpecialCharactersUsage(value *WindowsHelloForBusinessPinUsage)() + SetPinUppercaseCharactersUsage(value *WindowsHelloForBusinessPinUsage)() + SetRemotePassportEnabled(value *bool)() + SetSecurityDeviceRequired(value *bool)() + SetSecurityKeyForSignIn(value *Enablement)() + SetState(value *Enablement)() + SetUnlockWithBiometricsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_event_level.go b/src/internal/connector/graph/betasdk/models/device_event_level.go new file mode 100644 index 000000000..f6a01f84a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_event_level.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceEventLevel int + +const ( + // Indicates that the device event level is none. + NONE_DEVICEEVENTLEVEL DeviceEventLevel = iota + // Indicates that the device event level is verbose. + VERBOSE_DEVICEEVENTLEVEL + // Indicates that the device event level is information. + INFORMATION_DEVICEEVENTLEVEL + // Indicates that the device event level is warning. + WARNING_DEVICEEVENTLEVEL + // Indicates that the device event level is error. + ERROR_DEVICEEVENTLEVEL + // Indicates that the device event level is critical. + CRITICAL_DEVICEEVENTLEVEL + // Placeholder value for future expansion. + UNKNOWNFUTUREVALUE_DEVICEEVENTLEVEL +) + +func (i DeviceEventLevel) String() string { + return []string{"none", "verbose", "information", "warning", "error", "critical", "unknownFutureValue"}[i] +} +func ParseDeviceEventLevel(v string) (interface{}, error) { + result := NONE_DEVICEEVENTLEVEL + switch v { + case "none": + result = NONE_DEVICEEVENTLEVEL + case "verbose": + result = VERBOSE_DEVICEEVENTLEVEL + case "information": + result = INFORMATION_DEVICEEVENTLEVEL + case "warning": + result = WARNING_DEVICEEVENTLEVEL + case "error": + result = ERROR_DEVICEEVENTLEVEL + case "critical": + result = CRITICAL_DEVICEEVENTLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEEVENTLEVEL + default: + return 0, errors.New("Unknown DeviceEventLevel value: " + v) + } + return &result, nil +} +func SerializeDeviceEventLevel(values []DeviceEventLevel) []string { + 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/device_exchange_access_state_summary.go b/src/internal/connector/graph/betasdk/models/device_exchange_access_state_summary.go new file mode 100644 index 000000000..0f49aa2a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_exchange_access_state_summary.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceExchangeAccessStateSummary device Exchange Access State summary +type DeviceExchangeAccessStateSummary struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Total count of devices with Exchange Access State: Allowed. + allowedDeviceCount *int32 + // Total count of devices with Exchange Access State: Blocked. + blockedDeviceCount *int32 + // The OdataType property + odataType *string + // Total count of devices with Exchange Access State: Quarantined. + quarantinedDeviceCount *int32 + // Total count of devices for which no Exchange Access State could be found. + unavailableDeviceCount *int32 + // Total count of devices with Exchange Access State: Unknown. + unknownDeviceCount *int32 +} +// NewDeviceExchangeAccessStateSummary instantiates a new deviceExchangeAccessStateSummary and sets the default values. +func NewDeviceExchangeAccessStateSummary()(*DeviceExchangeAccessStateSummary) { + m := &DeviceExchangeAccessStateSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceExchangeAccessStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceExchangeAccessStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceExchangeAccessStateSummary(), 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 *DeviceExchangeAccessStateSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedDeviceCount gets the allowedDeviceCount property value. Total count of devices with Exchange Access State: Allowed. +func (m *DeviceExchangeAccessStateSummary) GetAllowedDeviceCount()(*int32) { + return m.allowedDeviceCount +} +// GetBlockedDeviceCount gets the blockedDeviceCount property value. Total count of devices with Exchange Access State: Blocked. +func (m *DeviceExchangeAccessStateSummary) GetBlockedDeviceCount()(*int32) { + return m.blockedDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceExchangeAccessStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAllowedDeviceCount(val) + } + return nil + } + res["blockedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBlockedDeviceCount(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["quarantinedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetQuarantinedDeviceCount(val) + } + return nil + } + res["unavailableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnavailableDeviceCount(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceExchangeAccessStateSummary) GetOdataType()(*string) { + return m.odataType +} +// GetQuarantinedDeviceCount gets the quarantinedDeviceCount property value. Total count of devices with Exchange Access State: Quarantined. +func (m *DeviceExchangeAccessStateSummary) GetQuarantinedDeviceCount()(*int32) { + return m.quarantinedDeviceCount +} +// GetUnavailableDeviceCount gets the unavailableDeviceCount property value. Total count of devices for which no Exchange Access State could be found. +func (m *DeviceExchangeAccessStateSummary) GetUnavailableDeviceCount()(*int32) { + return m.unavailableDeviceCount +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Total count of devices with Exchange Access State: Unknown. +func (m *DeviceExchangeAccessStateSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceExchangeAccessStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("allowedDeviceCount", m.GetAllowedDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("blockedDeviceCount", m.GetBlockedDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("quarantinedDeviceCount", m.GetQuarantinedDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unavailableDeviceCount", m.GetUnavailableDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + 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 *DeviceExchangeAccessStateSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedDeviceCount sets the allowedDeviceCount property value. Total count of devices with Exchange Access State: Allowed. +func (m *DeviceExchangeAccessStateSummary) SetAllowedDeviceCount(value *int32)() { + m.allowedDeviceCount = value +} +// SetBlockedDeviceCount sets the blockedDeviceCount property value. Total count of devices with Exchange Access State: Blocked. +func (m *DeviceExchangeAccessStateSummary) SetBlockedDeviceCount(value *int32)() { + m.blockedDeviceCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceExchangeAccessStateSummary) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuarantinedDeviceCount sets the quarantinedDeviceCount property value. Total count of devices with Exchange Access State: Quarantined. +func (m *DeviceExchangeAccessStateSummary) SetQuarantinedDeviceCount(value *int32)() { + m.quarantinedDeviceCount = value +} +// SetUnavailableDeviceCount sets the unavailableDeviceCount property value. Total count of devices for which no Exchange Access State could be found. +func (m *DeviceExchangeAccessStateSummary) SetUnavailableDeviceCount(value *int32)() { + m.unavailableDeviceCount = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Total count of devices with Exchange Access State: Unknown. +func (m *DeviceExchangeAccessStateSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_exchange_access_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_exchange_access_state_summaryable.go new file mode 100644 index 000000000..e32844374 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_exchange_access_state_summaryable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceExchangeAccessStateSummaryable +type DeviceExchangeAccessStateSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedDeviceCount()(*int32) + GetBlockedDeviceCount()(*int32) + GetOdataType()(*string) + GetQuarantinedDeviceCount()(*int32) + GetUnavailableDeviceCount()(*int32) + GetUnknownDeviceCount()(*int32) + SetAllowedDeviceCount(value *int32)() + SetBlockedDeviceCount(value *int32)() + SetOdataType(value *string)() + SetQuarantinedDeviceCount(value *int32)() + SetUnavailableDeviceCount(value *int32)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_geo_location.go b/src/internal/connector/graph/betasdk/models/device_geo_location.go new file mode 100644 index 000000000..8d0245661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_geo_location.go @@ -0,0 +1,306 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceGeoLocation device location +type DeviceGeoLocation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Altitude, given in meters above sea level + altitude *float64 + // Heading in degrees from true north + heading *float64 + // Accuracy of longitude and latitude in meters + horizontalAccuracy *float64 + // Time at which location was recorded, relative to UTC + lastCollectedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Time at which location was recorded, relative to UTC + lastCollectedDateTimeUtc *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Latitude coordinate of the device's location + latitude *float64 + // Longitude coordinate of the device's location + longitude *float64 + // The OdataType property + odataType *string + // Speed the device is traveling in meters per second + speed *float64 + // Accuracy of altitude in meters + verticalAccuracy *float64 +} +// NewDeviceGeoLocation instantiates a new deviceGeoLocation and sets the default values. +func NewDeviceGeoLocation()(*DeviceGeoLocation) { + m := &DeviceGeoLocation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceGeoLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceGeoLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceGeoLocation(), 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 *DeviceGeoLocation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAltitude gets the altitude property value. Altitude, given in meters above sea level +func (m *DeviceGeoLocation) GetAltitude()(*float64) { + return m.altitude +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceGeoLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["altitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAltitude(val) + } + return nil + } + res["heading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetHeading(val) + } + return nil + } + res["horizontalAccuracy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetHorizontalAccuracy(val) + } + return nil + } + res["lastCollectedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCollectedDateTime(val) + } + return nil + } + res["lastCollectedDateTimeUtc"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCollectedDateTimeUtc(val) + } + return nil + } + res["latitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLatitude(val) + } + return nil + } + res["longitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLongitude(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["speed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetSpeed(val) + } + return nil + } + res["verticalAccuracy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetVerticalAccuracy(val) + } + return nil + } + return res +} +// GetHeading gets the heading property value. Heading in degrees from true north +func (m *DeviceGeoLocation) GetHeading()(*float64) { + return m.heading +} +// GetHorizontalAccuracy gets the horizontalAccuracy property value. Accuracy of longitude and latitude in meters +func (m *DeviceGeoLocation) GetHorizontalAccuracy()(*float64) { + return m.horizontalAccuracy +} +// GetLastCollectedDateTime gets the lastCollectedDateTime property value. Time at which location was recorded, relative to UTC +func (m *DeviceGeoLocation) GetLastCollectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCollectedDateTime +} +// GetLastCollectedDateTimeUtc gets the lastCollectedDateTimeUtc property value. Time at which location was recorded, relative to UTC +func (m *DeviceGeoLocation) GetLastCollectedDateTimeUtc()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCollectedDateTimeUtc +} +// GetLatitude gets the latitude property value. Latitude coordinate of the device's location +func (m *DeviceGeoLocation) GetLatitude()(*float64) { + return m.latitude +} +// GetLongitude gets the longitude property value. Longitude coordinate of the device's location +func (m *DeviceGeoLocation) GetLongitude()(*float64) { + return m.longitude +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceGeoLocation) GetOdataType()(*string) { + return m.odataType +} +// GetSpeed gets the speed property value. Speed the device is traveling in meters per second +func (m *DeviceGeoLocation) GetSpeed()(*float64) { + return m.speed +} +// GetVerticalAccuracy gets the verticalAccuracy property value. Accuracy of altitude in meters +func (m *DeviceGeoLocation) GetVerticalAccuracy()(*float64) { + return m.verticalAccuracy +} +// Serialize serializes information the current object +func (m *DeviceGeoLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("altitude", m.GetAltitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("heading", m.GetHeading()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("horizontalAccuracy", m.GetHorizontalAccuracy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastCollectedDateTime", m.GetLastCollectedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastCollectedDateTimeUtc", m.GetLastCollectedDateTimeUtc()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("latitude", m.GetLatitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("longitude", m.GetLongitude()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("speed", m.GetSpeed()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("verticalAccuracy", m.GetVerticalAccuracy()) + 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 *DeviceGeoLocation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAltitude sets the altitude property value. Altitude, given in meters above sea level +func (m *DeviceGeoLocation) SetAltitude(value *float64)() { + m.altitude = value +} +// SetHeading sets the heading property value. Heading in degrees from true north +func (m *DeviceGeoLocation) SetHeading(value *float64)() { + m.heading = value +} +// SetHorizontalAccuracy sets the horizontalAccuracy property value. Accuracy of longitude and latitude in meters +func (m *DeviceGeoLocation) SetHorizontalAccuracy(value *float64)() { + m.horizontalAccuracy = value +} +// SetLastCollectedDateTime sets the lastCollectedDateTime property value. Time at which location was recorded, relative to UTC +func (m *DeviceGeoLocation) SetLastCollectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCollectedDateTime = value +} +// SetLastCollectedDateTimeUtc sets the lastCollectedDateTimeUtc property value. Time at which location was recorded, relative to UTC +func (m *DeviceGeoLocation) SetLastCollectedDateTimeUtc(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCollectedDateTimeUtc = value +} +// SetLatitude sets the latitude property value. Latitude coordinate of the device's location +func (m *DeviceGeoLocation) SetLatitude(value *float64)() { + m.latitude = value +} +// SetLongitude sets the longitude property value. Longitude coordinate of the device's location +func (m *DeviceGeoLocation) SetLongitude(value *float64)() { + m.longitude = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceGeoLocation) SetOdataType(value *string)() { + m.odataType = value +} +// SetSpeed sets the speed property value. Speed the device is traveling in meters per second +func (m *DeviceGeoLocation) SetSpeed(value *float64)() { + m.speed = value +} +// SetVerticalAccuracy sets the verticalAccuracy property value. Accuracy of altitude in meters +func (m *DeviceGeoLocation) SetVerticalAccuracy(value *float64)() { + m.verticalAccuracy = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_geo_locationable.go b/src/internal/connector/graph/betasdk/models/device_geo_locationable.go new file mode 100644 index 000000000..8972fe359 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_geo_locationable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceGeoLocationable +type DeviceGeoLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAltitude()(*float64) + GetHeading()(*float64) + GetHorizontalAccuracy()(*float64) + GetLastCollectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastCollectedDateTimeUtc()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLatitude()(*float64) + GetLongitude()(*float64) + GetOdataType()(*string) + GetSpeed()(*float64) + GetVerticalAccuracy()(*float64) + SetAltitude(value *float64)() + SetHeading(value *float64)() + SetHorizontalAccuracy(value *float64)() + SetLastCollectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastCollectedDateTimeUtc(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLatitude(value *float64)() + SetLongitude(value *float64)() + SetOdataType(value *string)() + SetSpeed(value *float64)() + SetVerticalAccuracy(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_guard_local_system_authority_credential_guard_state.go b/src/internal/connector/graph/betasdk/models/device_guard_local_system_authority_credential_guard_state.go new file mode 100644 index 000000000..0abdc5b23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_guard_local_system_authority_credential_guard_state.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceGuardLocalSystemAuthorityCredentialGuardState int + +const ( + // Running + RUNNING_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE DeviceGuardLocalSystemAuthorityCredentialGuardState = iota + // Reboot required + REBOOTREQUIRED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + // Not licensed for Credential Guard + NOTLICENSED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + // Not configured + NOTCONFIGURED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + // Virtualization Based security is not running + VIRTUALIZATIONBASEDSECURITYNOTRUNNING_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE +) + +func (i DeviceGuardLocalSystemAuthorityCredentialGuardState) String() string { + return []string{"running", "rebootRequired", "notLicensed", "notConfigured", "virtualizationBasedSecurityNotRunning"}[i] +} +func ParseDeviceGuardLocalSystemAuthorityCredentialGuardState(v string) (interface{}, error) { + result := RUNNING_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + switch v { + case "running": + result = RUNNING_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + case "rebootRequired": + result = REBOOTREQUIRED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + case "notLicensed": + result = NOTLICENSED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + case "notConfigured": + result = NOTCONFIGURED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + case "virtualizationBasedSecurityNotRunning": + result = VIRTUALIZATIONBASEDSECURITYNOTRUNNING_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDSTATE + default: + return 0, errors.New("Unknown DeviceGuardLocalSystemAuthorityCredentialGuardState value: " + v) + } + return &result, nil +} +func SerializeDeviceGuardLocalSystemAuthorityCredentialGuardState(values []DeviceGuardLocalSystemAuthorityCredentialGuardState) []string { + 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/device_guard_local_system_authority_credential_guard_type.go b/src/internal/connector/graph/betasdk/models/device_guard_local_system_authority_credential_guard_type.go new file mode 100644 index 000000000..5a05bd37b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_guard_local_system_authority_credential_guard_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceGuardLocalSystemAuthorityCredentialGuardType int + +const ( + // Turns off Credential Guard remotely if configured previously without UEFI Lock. + NOTCONFIGURED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE DeviceGuardLocalSystemAuthorityCredentialGuardType = iota + // Turns on Credential Guard with UEFI lock. + ENABLEWITHUEFILOCK_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + // Turns on Credential Guard without UEFI lock. + ENABLEWITHOUTUEFILOCK_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + // Disables Credential Guard. This is the default OS value. + DISABLE_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE +) + +func (i DeviceGuardLocalSystemAuthorityCredentialGuardType) String() string { + return []string{"notConfigured", "enableWithUEFILock", "enableWithoutUEFILock", "disable"}[i] +} +func ParseDeviceGuardLocalSystemAuthorityCredentialGuardType(v string) (interface{}, error) { + result := NOTCONFIGURED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + case "enableWithUEFILock": + result = ENABLEWITHUEFILOCK_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + case "enableWithoutUEFILock": + result = ENABLEWITHOUTUEFILOCK_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + case "disable": + result = DISABLE_DEVICEGUARDLOCALSYSTEMAUTHORITYCREDENTIALGUARDTYPE + default: + return 0, errors.New("Unknown DeviceGuardLocalSystemAuthorityCredentialGuardType value: " + v) + } + return &result, nil +} +func SerializeDeviceGuardLocalSystemAuthorityCredentialGuardType(values []DeviceGuardLocalSystemAuthorityCredentialGuardType) []string { + 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/device_guard_virtualization_based_security_hardware_requirement_state.go b/src/internal/connector/graph/betasdk/models/device_guard_virtualization_based_security_hardware_requirement_state.go new file mode 100644 index 000000000..bb5d4637b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_guard_virtualization_based_security_hardware_requirement_state.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceGuardVirtualizationBasedSecurityHardwareRequirementState int + +const ( + // System meets hardware configuration requirements + MEETHARDWAREREQUIREMENTS_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE DeviceGuardVirtualizationBasedSecurityHardwareRequirementState = iota + // Secure boot required + SECUREBOOTREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + // DMA protection required + DMAPROTECTIONREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + // HyperV not supported for Guest VM + HYPERVNOTSUPPORTEDFORGUESTVM_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + // HyperV feature is not available + HYPERVNOTAVAILABLE_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE +) + +func (i DeviceGuardVirtualizationBasedSecurityHardwareRequirementState) String() string { + return []string{"meetHardwareRequirements", "secureBootRequired", "dmaProtectionRequired", "hyperVNotSupportedForGuestVM", "hyperVNotAvailable"}[i] +} +func ParseDeviceGuardVirtualizationBasedSecurityHardwareRequirementState(v string) (interface{}, error) { + result := MEETHARDWAREREQUIREMENTS_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + switch v { + case "meetHardwareRequirements": + result = MEETHARDWAREREQUIREMENTS_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + case "secureBootRequired": + result = SECUREBOOTREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + case "dmaProtectionRequired": + result = DMAPROTECTIONREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + case "hyperVNotSupportedForGuestVM": + result = HYPERVNOTSUPPORTEDFORGUESTVM_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + case "hyperVNotAvailable": + result = HYPERVNOTAVAILABLE_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYHARDWAREREQUIREMENTSTATE + default: + return 0, errors.New("Unknown DeviceGuardVirtualizationBasedSecurityHardwareRequirementState value: " + v) + } + return &result, nil +} +func SerializeDeviceGuardVirtualizationBasedSecurityHardwareRequirementState(values []DeviceGuardVirtualizationBasedSecurityHardwareRequirementState) []string { + 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/device_guard_virtualization_based_security_state.go b/src/internal/connector/graph/betasdk/models/device_guard_virtualization_based_security_state.go new file mode 100644 index 000000000..ada44bae1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_guard_virtualization_based_security_state.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceGuardVirtualizationBasedSecurityState int + +const ( + // Running + RUNNING_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE DeviceGuardVirtualizationBasedSecurityState = iota + // Root required + REBOOTREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + // 64 bit architecture required + REQUIRE64BITARCHITECTURE_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + // Not licensed + NOTLICENSED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + // Not configured + NOTCONFIGURED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + // System does not meet hardware requirements + DOESNOTMEETHARDWAREREQUIREMENTS_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + // Other. Event logs in microsoft-Windows-DeviceGuard have more details. + OTHER_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE +) + +func (i DeviceGuardVirtualizationBasedSecurityState) String() string { + return []string{"running", "rebootRequired", "require64BitArchitecture", "notLicensed", "notConfigured", "doesNotMeetHardwareRequirements", "other"}[i] +} +func ParseDeviceGuardVirtualizationBasedSecurityState(v string) (interface{}, error) { + result := RUNNING_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + switch v { + case "running": + result = RUNNING_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "rebootRequired": + result = REBOOTREQUIRED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "require64BitArchitecture": + result = REQUIRE64BITARCHITECTURE_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "notLicensed": + result = NOTLICENSED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "notConfigured": + result = NOTCONFIGURED_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "doesNotMeetHardwareRequirements": + result = DOESNOTMEETHARDWAREREQUIREMENTS_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + case "other": + result = OTHER_DEVICEGUARDVIRTUALIZATIONBASEDSECURITYSTATE + default: + return 0, errors.New("Unknown DeviceGuardVirtualizationBasedSecurityState value: " + v) + } + return &result, nil +} +func SerializeDeviceGuardVirtualizationBasedSecurityState(values []DeviceGuardVirtualizationBasedSecurityState) []string { + 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/device_health.go b/src/internal/connector/graph/betasdk/models/device_health.go new file mode 100644 index 000000000..42709bf93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health.go @@ -0,0 +1,98 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealth +type DeviceHealth 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 last time the device was connected. + lastConnectionTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewDeviceHealth instantiates a new deviceHealth and sets the default values. +func NewDeviceHealth()(*DeviceHealth) { + m := &DeviceHealth{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceHealthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealth(), 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 *DeviceHealth) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealth) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastConnectionTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastConnectionTime(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 + } + return res +} +// GetLastConnectionTime gets the lastConnectionTime property value. The last time the device was connected. +func (m *DeviceHealth) GetLastConnectionTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastConnectionTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceHealth) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceHealth) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastConnectionTime", m.GetLastConnectionTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceHealth) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastConnectionTime sets the lastConnectionTime property value. The last time the device was connected. +func (m *DeviceHealth) SetLastConnectionTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastConnectionTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceHealth) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_attestation_state.go b/src/internal/connector/graph/betasdk/models/device_health_attestation_state.go new file mode 100644 index 000000000..5262072f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_attestation_state.go @@ -0,0 +1,904 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthAttestationState +type DeviceHealthAttestationState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // TWhen an Attestation Identity Key (AIK) is present on a device, it indicates that the device has an endorsement key (EK) certificate. + attestationIdentityKey *string + // On or Off of BitLocker Drive Encryption + bitLockerStatus *string + // The security version number of the Boot Application + bootAppSecurityVersion *string + // When bootDebugging is enabled, the device is used in development and testing + bootDebugging *string + // The security version number of the Boot Application + bootManagerSecurityVersion *string + // The version of the Boot Manager + bootManagerVersion *string + // The Boot Revision List that was loaded during initial boot on the attested device + bootRevisionListInfo *string + // When code integrity is enabled, code execution is restricted to integrity verified code + codeIntegrity *string + // The version of the Boot Manager + codeIntegrityCheckVersion *string + // The Code Integrity policy that is controlling the security of the boot environment + codeIntegrityPolicy *string + // The DHA report version. (Namespace version) + contentNamespaceUrl *string + // The HealthAttestation state schema version + contentVersion *string + // DEP Policy defines a set of hardware and software technologies that perform additional checks on memory + dataExcutionPolicy *string + // The DHA report version. (Namespace version) + deviceHealthAttestationStatus *string + // ELAM provides protection for the computers in your network when they start up + earlyLaunchAntiMalwareDriverProtection *string + // This attribute indicates if DHA is supported for the device + healthAttestationSupportedStatus *string + // This attribute appears if DHA-Service detects an integrity issue + healthStatusMismatchInfo *string + // The DateTime when device was evaluated or issued to MDM + issuedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Timestamp of the last update. + lastUpdateDateTime *string + // The OdataType property + odataType *string + // When operatingSystemKernelDebugging is enabled, the device is used in development and testing + operatingSystemKernelDebugging *string + // The Operating System Revision List that was loaded during initial boot on the attested device + operatingSystemRevListInfo *string + // The measurement that is captured in PCR[0] + pcr0 *string + // Informational attribute that identifies the HASH algorithm that was used by TPM + pcrHashAlgorithm *string + // The number of times a PC device has hibernated or resumed + resetCount *int64 + // The number of times a PC device has rebooted + restartCount *int64 + // Safe mode is a troubleshooting option for Windows that starts your computer in a limited state + safeMode *string + // When Secure Boot is enabled, the core components must have the correct cryptographic signatures + secureBoot *string + // Fingerprint of the Custom Secure Boot Configuration Policy + secureBootConfigurationPolicyFingerPrint *string + // When test signing is allowed, the device does not enforce signature validation during boot + testSigning *string + // The security version number of the Boot Application + tpmVersion *string + // VSM is a container that protects high value assets from a compromised kernel + virtualSecureMode *string + // Operating system running with limited services that is used to prepare a computer for Windows + windowsPE *string +} +// NewDeviceHealthAttestationState instantiates a new deviceHealthAttestationState and sets the default values. +func NewDeviceHealthAttestationState()(*DeviceHealthAttestationState) { + m := &DeviceHealthAttestationState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceHealthAttestationStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthAttestationStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthAttestationState(), 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 *DeviceHealthAttestationState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttestationIdentityKey gets the attestationIdentityKey property value. TWhen an Attestation Identity Key (AIK) is present on a device, it indicates that the device has an endorsement key (EK) certificate. +func (m *DeviceHealthAttestationState) GetAttestationIdentityKey()(*string) { + return m.attestationIdentityKey +} +// GetBitLockerStatus gets the bitLockerStatus property value. On or Off of BitLocker Drive Encryption +func (m *DeviceHealthAttestationState) GetBitLockerStatus()(*string) { + return m.bitLockerStatus +} +// GetBootAppSecurityVersion gets the bootAppSecurityVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) GetBootAppSecurityVersion()(*string) { + return m.bootAppSecurityVersion +} +// GetBootDebugging gets the bootDebugging property value. When bootDebugging is enabled, the device is used in development and testing +func (m *DeviceHealthAttestationState) GetBootDebugging()(*string) { + return m.bootDebugging +} +// GetBootManagerSecurityVersion gets the bootManagerSecurityVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) GetBootManagerSecurityVersion()(*string) { + return m.bootManagerSecurityVersion +} +// GetBootManagerVersion gets the bootManagerVersion property value. The version of the Boot Manager +func (m *DeviceHealthAttestationState) GetBootManagerVersion()(*string) { + return m.bootManagerVersion +} +// GetBootRevisionListInfo gets the bootRevisionListInfo property value. The Boot Revision List that was loaded during initial boot on the attested device +func (m *DeviceHealthAttestationState) GetBootRevisionListInfo()(*string) { + return m.bootRevisionListInfo +} +// GetCodeIntegrity gets the codeIntegrity property value. When code integrity is enabled, code execution is restricted to integrity verified code +func (m *DeviceHealthAttestationState) GetCodeIntegrity()(*string) { + return m.codeIntegrity +} +// GetCodeIntegrityCheckVersion gets the codeIntegrityCheckVersion property value. The version of the Boot Manager +func (m *DeviceHealthAttestationState) GetCodeIntegrityCheckVersion()(*string) { + return m.codeIntegrityCheckVersion +} +// GetCodeIntegrityPolicy gets the codeIntegrityPolicy property value. The Code Integrity policy that is controlling the security of the boot environment +func (m *DeviceHealthAttestationState) GetCodeIntegrityPolicy()(*string) { + return m.codeIntegrityPolicy +} +// GetContentNamespaceUrl gets the contentNamespaceUrl property value. The DHA report version. (Namespace version) +func (m *DeviceHealthAttestationState) GetContentNamespaceUrl()(*string) { + return m.contentNamespaceUrl +} +// GetContentVersion gets the contentVersion property value. The HealthAttestation state schema version +func (m *DeviceHealthAttestationState) GetContentVersion()(*string) { + return m.contentVersion +} +// GetDataExcutionPolicy gets the dataExcutionPolicy property value. DEP Policy defines a set of hardware and software technologies that perform additional checks on memory +func (m *DeviceHealthAttestationState) GetDataExcutionPolicy()(*string) { + return m.dataExcutionPolicy +} +// GetDeviceHealthAttestationStatus gets the deviceHealthAttestationStatus property value. The DHA report version. (Namespace version) +func (m *DeviceHealthAttestationState) GetDeviceHealthAttestationStatus()(*string) { + return m.deviceHealthAttestationStatus +} +// GetEarlyLaunchAntiMalwareDriverProtection gets the earlyLaunchAntiMalwareDriverProtection property value. ELAM provides protection for the computers in your network when they start up +func (m *DeviceHealthAttestationState) GetEarlyLaunchAntiMalwareDriverProtection()(*string) { + return m.earlyLaunchAntiMalwareDriverProtection +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthAttestationState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attestationIdentityKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAttestationIdentityKey(val) + } + return nil + } + res["bitLockerStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBitLockerStatus(val) + } + return nil + } + res["bootAppSecurityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBootAppSecurityVersion(val) + } + return nil + } + res["bootDebugging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBootDebugging(val) + } + return nil + } + res["bootManagerSecurityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBootManagerSecurityVersion(val) + } + return nil + } + res["bootManagerVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBootManagerVersion(val) + } + return nil + } + res["bootRevisionListInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBootRevisionListInfo(val) + } + return nil + } + res["codeIntegrity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeIntegrity(val) + } + return nil + } + res["codeIntegrityCheckVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeIntegrityCheckVersion(val) + } + return nil + } + res["codeIntegrityPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeIntegrityPolicy(val) + } + return nil + } + res["contentNamespaceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentNamespaceUrl(val) + } + return nil + } + res["contentVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentVersion(val) + } + return nil + } + res["dataExcutionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataExcutionPolicy(val) + } + return nil + } + res["deviceHealthAttestationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceHealthAttestationStatus(val) + } + return nil + } + res["earlyLaunchAntiMalwareDriverProtection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEarlyLaunchAntiMalwareDriverProtection(val) + } + return nil + } + res["healthAttestationSupportedStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHealthAttestationSupportedStatus(val) + } + return nil + } + res["healthStatusMismatchInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHealthStatusMismatchInfo(val) + } + return nil + } + res["issuedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuedDateTime(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(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["operatingSystemKernelDebugging"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemKernelDebugging(val) + } + return nil + } + res["operatingSystemRevListInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemRevListInfo(val) + } + return nil + } + res["pcr0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPcr0(val) + } + return nil + } + res["pcrHashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPcrHashAlgorithm(val) + } + return nil + } + res["resetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetResetCount(val) + } + return nil + } + res["restartCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRestartCount(val) + } + return nil + } + res["safeMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSafeMode(val) + } + return nil + } + res["secureBoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecureBoot(val) + } + return nil + } + res["secureBootConfigurationPolicyFingerPrint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecureBootConfigurationPolicyFingerPrint(val) + } + return nil + } + res["testSigning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTestSigning(val) + } + return nil + } + res["tpmVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTpmVersion(val) + } + return nil + } + res["virtualSecureMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVirtualSecureMode(val) + } + return nil + } + res["windowsPE"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsPE(val) + } + return nil + } + return res +} +// GetHealthAttestationSupportedStatus gets the healthAttestationSupportedStatus property value. This attribute indicates if DHA is supported for the device +func (m *DeviceHealthAttestationState) GetHealthAttestationSupportedStatus()(*string) { + return m.healthAttestationSupportedStatus +} +// GetHealthStatusMismatchInfo gets the healthStatusMismatchInfo property value. This attribute appears if DHA-Service detects an integrity issue +func (m *DeviceHealthAttestationState) GetHealthStatusMismatchInfo()(*string) { + return m.healthStatusMismatchInfo +} +// GetIssuedDateTime gets the issuedDateTime property value. The DateTime when device was evaluated or issued to MDM +func (m *DeviceHealthAttestationState) GetIssuedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.issuedDateTime +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. The Timestamp of the last update. +func (m *DeviceHealthAttestationState) GetLastUpdateDateTime()(*string) { + return m.lastUpdateDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceHealthAttestationState) GetOdataType()(*string) { + return m.odataType +} +// GetOperatingSystemKernelDebugging gets the operatingSystemKernelDebugging property value. When operatingSystemKernelDebugging is enabled, the device is used in development and testing +func (m *DeviceHealthAttestationState) GetOperatingSystemKernelDebugging()(*string) { + return m.operatingSystemKernelDebugging +} +// GetOperatingSystemRevListInfo gets the operatingSystemRevListInfo property value. The Operating System Revision List that was loaded during initial boot on the attested device +func (m *DeviceHealthAttestationState) GetOperatingSystemRevListInfo()(*string) { + return m.operatingSystemRevListInfo +} +// GetPcr0 gets the pcr0 property value. The measurement that is captured in PCR[0] +func (m *DeviceHealthAttestationState) GetPcr0()(*string) { + return m.pcr0 +} +// GetPcrHashAlgorithm gets the pcrHashAlgorithm property value. Informational attribute that identifies the HASH algorithm that was used by TPM +func (m *DeviceHealthAttestationState) GetPcrHashAlgorithm()(*string) { + return m.pcrHashAlgorithm +} +// GetResetCount gets the resetCount property value. The number of times a PC device has hibernated or resumed +func (m *DeviceHealthAttestationState) GetResetCount()(*int64) { + return m.resetCount +} +// GetRestartCount gets the restartCount property value. The number of times a PC device has rebooted +func (m *DeviceHealthAttestationState) GetRestartCount()(*int64) { + return m.restartCount +} +// GetSafeMode gets the safeMode property value. Safe mode is a troubleshooting option for Windows that starts your computer in a limited state +func (m *DeviceHealthAttestationState) GetSafeMode()(*string) { + return m.safeMode +} +// GetSecureBoot gets the secureBoot property value. When Secure Boot is enabled, the core components must have the correct cryptographic signatures +func (m *DeviceHealthAttestationState) GetSecureBoot()(*string) { + return m.secureBoot +} +// GetSecureBootConfigurationPolicyFingerPrint gets the secureBootConfigurationPolicyFingerPrint property value. Fingerprint of the Custom Secure Boot Configuration Policy +func (m *DeviceHealthAttestationState) GetSecureBootConfigurationPolicyFingerPrint()(*string) { + return m.secureBootConfigurationPolicyFingerPrint +} +// GetTestSigning gets the testSigning property value. When test signing is allowed, the device does not enforce signature validation during boot +func (m *DeviceHealthAttestationState) GetTestSigning()(*string) { + return m.testSigning +} +// GetTpmVersion gets the tpmVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) GetTpmVersion()(*string) { + return m.tpmVersion +} +// GetVirtualSecureMode gets the virtualSecureMode property value. VSM is a container that protects high value assets from a compromised kernel +func (m *DeviceHealthAttestationState) GetVirtualSecureMode()(*string) { + return m.virtualSecureMode +} +// GetWindowsPE gets the windowsPE property value. Operating system running with limited services that is used to prepare a computer for Windows +func (m *DeviceHealthAttestationState) GetWindowsPE()(*string) { + return m.windowsPE +} +// Serialize serializes information the current object +func (m *DeviceHealthAttestationState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("attestationIdentityKey", m.GetAttestationIdentityKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bitLockerStatus", m.GetBitLockerStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bootAppSecurityVersion", m.GetBootAppSecurityVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bootDebugging", m.GetBootDebugging()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bootManagerSecurityVersion", m.GetBootManagerSecurityVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bootManagerVersion", m.GetBootManagerVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bootRevisionListInfo", m.GetBootRevisionListInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("codeIntegrity", m.GetCodeIntegrity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("codeIntegrityCheckVersion", m.GetCodeIntegrityCheckVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("codeIntegrityPolicy", m.GetCodeIntegrityPolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contentNamespaceUrl", m.GetContentNamespaceUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contentVersion", m.GetContentVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dataExcutionPolicy", m.GetDataExcutionPolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceHealthAttestationStatus", m.GetDeviceHealthAttestationStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("earlyLaunchAntiMalwareDriverProtection", m.GetEarlyLaunchAntiMalwareDriverProtection()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("healthAttestationSupportedStatus", m.GetHealthAttestationSupportedStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("healthStatusMismatchInfo", m.GetHealthStatusMismatchInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("issuedDateTime", m.GetIssuedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystemKernelDebugging", m.GetOperatingSystemKernelDebugging()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystemRevListInfo", m.GetOperatingSystemRevListInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pcr0", m.GetPcr0()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("pcrHashAlgorithm", m.GetPcrHashAlgorithm()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("resetCount", m.GetResetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("restartCount", m.GetRestartCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("safeMode", m.GetSafeMode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secureBoot", m.GetSecureBoot()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secureBootConfigurationPolicyFingerPrint", m.GetSecureBootConfigurationPolicyFingerPrint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("testSigning", m.GetTestSigning()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tpmVersion", m.GetTpmVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("virtualSecureMode", m.GetVirtualSecureMode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("windowsPE", m.GetWindowsPE()) + 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 *DeviceHealthAttestationState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttestationIdentityKey sets the attestationIdentityKey property value. TWhen an Attestation Identity Key (AIK) is present on a device, it indicates that the device has an endorsement key (EK) certificate. +func (m *DeviceHealthAttestationState) SetAttestationIdentityKey(value *string)() { + m.attestationIdentityKey = value +} +// SetBitLockerStatus sets the bitLockerStatus property value. On or Off of BitLocker Drive Encryption +func (m *DeviceHealthAttestationState) SetBitLockerStatus(value *string)() { + m.bitLockerStatus = value +} +// SetBootAppSecurityVersion sets the bootAppSecurityVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) SetBootAppSecurityVersion(value *string)() { + m.bootAppSecurityVersion = value +} +// SetBootDebugging sets the bootDebugging property value. When bootDebugging is enabled, the device is used in development and testing +func (m *DeviceHealthAttestationState) SetBootDebugging(value *string)() { + m.bootDebugging = value +} +// SetBootManagerSecurityVersion sets the bootManagerSecurityVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) SetBootManagerSecurityVersion(value *string)() { + m.bootManagerSecurityVersion = value +} +// SetBootManagerVersion sets the bootManagerVersion property value. The version of the Boot Manager +func (m *DeviceHealthAttestationState) SetBootManagerVersion(value *string)() { + m.bootManagerVersion = value +} +// SetBootRevisionListInfo sets the bootRevisionListInfo property value. The Boot Revision List that was loaded during initial boot on the attested device +func (m *DeviceHealthAttestationState) SetBootRevisionListInfo(value *string)() { + m.bootRevisionListInfo = value +} +// SetCodeIntegrity sets the codeIntegrity property value. When code integrity is enabled, code execution is restricted to integrity verified code +func (m *DeviceHealthAttestationState) SetCodeIntegrity(value *string)() { + m.codeIntegrity = value +} +// SetCodeIntegrityCheckVersion sets the codeIntegrityCheckVersion property value. The version of the Boot Manager +func (m *DeviceHealthAttestationState) SetCodeIntegrityCheckVersion(value *string)() { + m.codeIntegrityCheckVersion = value +} +// SetCodeIntegrityPolicy sets the codeIntegrityPolicy property value. The Code Integrity policy that is controlling the security of the boot environment +func (m *DeviceHealthAttestationState) SetCodeIntegrityPolicy(value *string)() { + m.codeIntegrityPolicy = value +} +// SetContentNamespaceUrl sets the contentNamespaceUrl property value. The DHA report version. (Namespace version) +func (m *DeviceHealthAttestationState) SetContentNamespaceUrl(value *string)() { + m.contentNamespaceUrl = value +} +// SetContentVersion sets the contentVersion property value. The HealthAttestation state schema version +func (m *DeviceHealthAttestationState) SetContentVersion(value *string)() { + m.contentVersion = value +} +// SetDataExcutionPolicy sets the dataExcutionPolicy property value. DEP Policy defines a set of hardware and software technologies that perform additional checks on memory +func (m *DeviceHealthAttestationState) SetDataExcutionPolicy(value *string)() { + m.dataExcutionPolicy = value +} +// SetDeviceHealthAttestationStatus sets the deviceHealthAttestationStatus property value. The DHA report version. (Namespace version) +func (m *DeviceHealthAttestationState) SetDeviceHealthAttestationStatus(value *string)() { + m.deviceHealthAttestationStatus = value +} +// SetEarlyLaunchAntiMalwareDriverProtection sets the earlyLaunchAntiMalwareDriverProtection property value. ELAM provides protection for the computers in your network when they start up +func (m *DeviceHealthAttestationState) SetEarlyLaunchAntiMalwareDriverProtection(value *string)() { + m.earlyLaunchAntiMalwareDriverProtection = value +} +// SetHealthAttestationSupportedStatus sets the healthAttestationSupportedStatus property value. This attribute indicates if DHA is supported for the device +func (m *DeviceHealthAttestationState) SetHealthAttestationSupportedStatus(value *string)() { + m.healthAttestationSupportedStatus = value +} +// SetHealthStatusMismatchInfo sets the healthStatusMismatchInfo property value. This attribute appears if DHA-Service detects an integrity issue +func (m *DeviceHealthAttestationState) SetHealthStatusMismatchInfo(value *string)() { + m.healthStatusMismatchInfo = value +} +// SetIssuedDateTime sets the issuedDateTime property value. The DateTime when device was evaluated or issued to MDM +func (m *DeviceHealthAttestationState) SetIssuedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.issuedDateTime = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. The Timestamp of the last update. +func (m *DeviceHealthAttestationState) SetLastUpdateDateTime(value *string)() { + m.lastUpdateDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceHealthAttestationState) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperatingSystemKernelDebugging sets the operatingSystemKernelDebugging property value. When operatingSystemKernelDebugging is enabled, the device is used in development and testing +func (m *DeviceHealthAttestationState) SetOperatingSystemKernelDebugging(value *string)() { + m.operatingSystemKernelDebugging = value +} +// SetOperatingSystemRevListInfo sets the operatingSystemRevListInfo property value. The Operating System Revision List that was loaded during initial boot on the attested device +func (m *DeviceHealthAttestationState) SetOperatingSystemRevListInfo(value *string)() { + m.operatingSystemRevListInfo = value +} +// SetPcr0 sets the pcr0 property value. The measurement that is captured in PCR[0] +func (m *DeviceHealthAttestationState) SetPcr0(value *string)() { + m.pcr0 = value +} +// SetPcrHashAlgorithm sets the pcrHashAlgorithm property value. Informational attribute that identifies the HASH algorithm that was used by TPM +func (m *DeviceHealthAttestationState) SetPcrHashAlgorithm(value *string)() { + m.pcrHashAlgorithm = value +} +// SetResetCount sets the resetCount property value. The number of times a PC device has hibernated or resumed +func (m *DeviceHealthAttestationState) SetResetCount(value *int64)() { + m.resetCount = value +} +// SetRestartCount sets the restartCount property value. The number of times a PC device has rebooted +func (m *DeviceHealthAttestationState) SetRestartCount(value *int64)() { + m.restartCount = value +} +// SetSafeMode sets the safeMode property value. Safe mode is a troubleshooting option for Windows that starts your computer in a limited state +func (m *DeviceHealthAttestationState) SetSafeMode(value *string)() { + m.safeMode = value +} +// SetSecureBoot sets the secureBoot property value. When Secure Boot is enabled, the core components must have the correct cryptographic signatures +func (m *DeviceHealthAttestationState) SetSecureBoot(value *string)() { + m.secureBoot = value +} +// SetSecureBootConfigurationPolicyFingerPrint sets the secureBootConfigurationPolicyFingerPrint property value. Fingerprint of the Custom Secure Boot Configuration Policy +func (m *DeviceHealthAttestationState) SetSecureBootConfigurationPolicyFingerPrint(value *string)() { + m.secureBootConfigurationPolicyFingerPrint = value +} +// SetTestSigning sets the testSigning property value. When test signing is allowed, the device does not enforce signature validation during boot +func (m *DeviceHealthAttestationState) SetTestSigning(value *string)() { + m.testSigning = value +} +// SetTpmVersion sets the tpmVersion property value. The security version number of the Boot Application +func (m *DeviceHealthAttestationState) SetTpmVersion(value *string)() { + m.tpmVersion = value +} +// SetVirtualSecureMode sets the virtualSecureMode property value. VSM is a container that protects high value assets from a compromised kernel +func (m *DeviceHealthAttestationState) SetVirtualSecureMode(value *string)() { + m.virtualSecureMode = value +} +// SetWindowsPE sets the windowsPE property value. Operating system running with limited services that is used to prepare a computer for Windows +func (m *DeviceHealthAttestationState) SetWindowsPE(value *string)() { + m.windowsPE = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_attestation_stateable.go b/src/internal/connector/graph/betasdk/models/device_health_attestation_stateable.go new file mode 100644 index 000000000..a9419cb23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_attestation_stateable.go @@ -0,0 +1,78 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthAttestationStateable +type DeviceHealthAttestationStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttestationIdentityKey()(*string) + GetBitLockerStatus()(*string) + GetBootAppSecurityVersion()(*string) + GetBootDebugging()(*string) + GetBootManagerSecurityVersion()(*string) + GetBootManagerVersion()(*string) + GetBootRevisionListInfo()(*string) + GetCodeIntegrity()(*string) + GetCodeIntegrityCheckVersion()(*string) + GetCodeIntegrityPolicy()(*string) + GetContentNamespaceUrl()(*string) + GetContentVersion()(*string) + GetDataExcutionPolicy()(*string) + GetDeviceHealthAttestationStatus()(*string) + GetEarlyLaunchAntiMalwareDriverProtection()(*string) + GetHealthAttestationSupportedStatus()(*string) + GetHealthStatusMismatchInfo()(*string) + GetIssuedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastUpdateDateTime()(*string) + GetOdataType()(*string) + GetOperatingSystemKernelDebugging()(*string) + GetOperatingSystemRevListInfo()(*string) + GetPcr0()(*string) + GetPcrHashAlgorithm()(*string) + GetResetCount()(*int64) + GetRestartCount()(*int64) + GetSafeMode()(*string) + GetSecureBoot()(*string) + GetSecureBootConfigurationPolicyFingerPrint()(*string) + GetTestSigning()(*string) + GetTpmVersion()(*string) + GetVirtualSecureMode()(*string) + GetWindowsPE()(*string) + SetAttestationIdentityKey(value *string)() + SetBitLockerStatus(value *string)() + SetBootAppSecurityVersion(value *string)() + SetBootDebugging(value *string)() + SetBootManagerSecurityVersion(value *string)() + SetBootManagerVersion(value *string)() + SetBootRevisionListInfo(value *string)() + SetCodeIntegrity(value *string)() + SetCodeIntegrityCheckVersion(value *string)() + SetCodeIntegrityPolicy(value *string)() + SetContentNamespaceUrl(value *string)() + SetContentVersion(value *string)() + SetDataExcutionPolicy(value *string)() + SetDeviceHealthAttestationStatus(value *string)() + SetEarlyLaunchAntiMalwareDriverProtection(value *string)() + SetHealthAttestationSupportedStatus(value *string)() + SetHealthStatusMismatchInfo(value *string)() + SetIssuedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastUpdateDateTime(value *string)() + SetOdataType(value *string)() + SetOperatingSystemKernelDebugging(value *string)() + SetOperatingSystemRevListInfo(value *string)() + SetPcr0(value *string)() + SetPcrHashAlgorithm(value *string)() + SetResetCount(value *int64)() + SetRestartCount(value *int64)() + SetSafeMode(value *string)() + SetSecureBoot(value *string)() + SetSecureBootConfigurationPolicyFingerPrint(value *string)() + SetTestSigning(value *string)() + SetTpmVersion(value *string)() + SetVirtualSecureMode(value *string)() + SetWindowsPE(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script.go b/src/internal/connector/graph/betasdk/models/device_health_script.go new file mode 100644 index 000000000..4bf628d73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script.go @@ -0,0 +1,554 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScript intune will provide customer the ability to run their Powershell Health scripts (remediation + detection) on the enrolled windows 10 Azure Active Directory joined devices. +type DeviceHealthScript struct { + Entity + // The list of group assignments for the device health script + assignments []DeviceHealthScriptAssignmentable + // The timestamp of when the device health script was created. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description of the device health script + description *string + // The entire content of the detection powershell script + detectionScriptContent []byte + // List of ComplexType DetectionScriptParameters objects. + detectionScriptParameters []DeviceHealthScriptParameterable + // List of run states for the device health script across all devices + deviceRunStates []DeviceHealthScriptDeviceStateable + // Name of the device health script + displayName *string + // Indicate whether the script signature needs be checked + enforceSignatureCheck *bool + // Highest available version for a Microsoft Proprietary script + highestAvailableVersion *string + // Determines if this is Microsoft Proprietary Script. Proprietary scripts are read-only + isGlobalScript *bool + // The timestamp of when the device health script was modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the device health script publisher + publisher *string + // The entire content of the remediation powershell script + remediationScriptContent []byte + // List of ComplexType RemediationScriptParameters objects. + remediationScriptParameters []DeviceHealthScriptParameterable + // List of Scope Tag IDs for the device health script + roleScopeTagIds []string + // Indicate whether PowerShell script(s) should run as 32-bit + runAs32Bit *bool + // Indicates the type of execution context the app runs in. + runAsAccount *RunAsAccountType + // High level run summary for device health script. + runSummary DeviceHealthScriptRunSummaryable + // Version of the device health script + version *string +} +// NewDeviceHealthScript instantiates a new deviceHealthScript and sets the default values. +func NewDeviceHealthScript()(*DeviceHealthScript) { + m := &DeviceHealthScript{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceHealthScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScript(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device health script +func (m *DeviceHealthScript) GetAssignments()([]DeviceHealthScriptAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The timestamp of when the device health script was created. This property is read-only. +func (m *DeviceHealthScript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description of the device health script +func (m *DeviceHealthScript) GetDescription()(*string) { + return m.description +} +// GetDetectionScriptContent gets the detectionScriptContent property value. The entire content of the detection powershell script +func (m *DeviceHealthScript) GetDetectionScriptContent()([]byte) { + return m.detectionScriptContent +} +// GetDetectionScriptParameters gets the detectionScriptParameters property value. List of ComplexType DetectionScriptParameters objects. +func (m *DeviceHealthScript) GetDetectionScriptParameters()([]DeviceHealthScriptParameterable) { + return m.detectionScriptParameters +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for the device health script across all devices +func (m *DeviceHealthScript) GetDeviceRunStates()([]DeviceHealthScriptDeviceStateable) { + return m.deviceRunStates +} +// GetDisplayName gets the displayName property value. Name of the device health script +func (m *DeviceHealthScript) GetDisplayName()(*string) { + return m.displayName +} +// GetEnforceSignatureCheck gets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked +func (m *DeviceHealthScript) GetEnforceSignatureCheck()(*bool) { + return m.enforceSignatureCheck +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["detectionScriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptContent(val) + } + return nil + } + res["detectionScriptParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptParameterable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptParameterable) + } + m.SetDetectionScriptParameters(res) + } + return nil + } + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enforceSignatureCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceSignatureCheck(val) + } + return nil + } + res["highestAvailableVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHighestAvailableVersion(val) + } + return nil + } + res["isGlobalScript"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsGlobalScript(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["remediationScriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediationScriptContent(val) + } + return nil + } + res["remediationScriptParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptParameterable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptParameterable) + } + m.SetRemediationScriptParameters(res) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["runAs32Bit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRunAs32Bit(val) + } + return nil + } + res["runAsAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunAsAccountType) + if err != nil { + return err + } + if val != nil { + m.SetRunAsAccount(val.(*RunAsAccountType)) + } + return nil + } + res["runSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceHealthScriptRunSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSummary(val.(DeviceHealthScriptRunSummaryable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetHighestAvailableVersion gets the highestAvailableVersion property value. Highest available version for a Microsoft Proprietary script +func (m *DeviceHealthScript) GetHighestAvailableVersion()(*string) { + return m.highestAvailableVersion +} +// GetIsGlobalScript gets the isGlobalScript property value. Determines if this is Microsoft Proprietary Script. Proprietary scripts are read-only +func (m *DeviceHealthScript) GetIsGlobalScript()(*bool) { + return m.isGlobalScript +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The timestamp of when the device health script was modified. This property is read-only. +func (m *DeviceHealthScript) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPublisher gets the publisher property value. Name of the device health script publisher +func (m *DeviceHealthScript) GetPublisher()(*string) { + return m.publisher +} +// GetRemediationScriptContent gets the remediationScriptContent property value. The entire content of the remediation powershell script +func (m *DeviceHealthScript) GetRemediationScriptContent()([]byte) { + return m.remediationScriptContent +} +// GetRemediationScriptParameters gets the remediationScriptParameters property value. List of ComplexType RemediationScriptParameters objects. +func (m *DeviceHealthScript) GetRemediationScriptParameters()([]DeviceHealthScriptParameterable) { + return m.remediationScriptParameters +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for the device health script +func (m *DeviceHealthScript) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRunAs32Bit gets the runAs32Bit property value. Indicate whether PowerShell script(s) should run as 32-bit +func (m *DeviceHealthScript) GetRunAs32Bit()(*bool) { + return m.runAs32Bit +} +// GetRunAsAccount gets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceHealthScript) GetRunAsAccount()(*RunAsAccountType) { + return m.runAsAccount +} +// GetRunSummary gets the runSummary property value. High level run summary for device health script. +func (m *DeviceHealthScript) GetRunSummary()(DeviceHealthScriptRunSummaryable) { + return m.runSummary +} +// GetVersion gets the version property value. Version of the device health script +func (m *DeviceHealthScript) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceHealthScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("detectionScriptContent", m.GetDetectionScriptContent()) + if err != nil { + return err + } + } + if m.GetDetectionScriptParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetectionScriptParameters())) + for i, v := range m.GetDetectionScriptParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("detectionScriptParameters", cast) + if err != nil { + return err + } + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enforceSignatureCheck", m.GetEnforceSignatureCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("highestAvailableVersion", m.GetHighestAvailableVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isGlobalScript", m.GetIsGlobalScript()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("remediationScriptContent", m.GetRemediationScriptContent()) + if err != nil { + return err + } + } + if m.GetRemediationScriptParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRemediationScriptParameters())) + for i, v := range m.GetRemediationScriptParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("remediationScriptParameters", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("runAs32Bit", m.GetRunAs32Bit()) + if err != nil { + return err + } + } + if m.GetRunAsAccount() != nil { + cast := (*m.GetRunAsAccount()).String() + err = writer.WriteStringValue("runAsAccount", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSummary", m.GetRunSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device health script +func (m *DeviceHealthScript) SetAssignments(value []DeviceHealthScriptAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The timestamp of when the device health script was created. This property is read-only. +func (m *DeviceHealthScript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description of the device health script +func (m *DeviceHealthScript) SetDescription(value *string)() { + m.description = value +} +// SetDetectionScriptContent sets the detectionScriptContent property value. The entire content of the detection powershell script +func (m *DeviceHealthScript) SetDetectionScriptContent(value []byte)() { + m.detectionScriptContent = value +} +// SetDetectionScriptParameters sets the detectionScriptParameters property value. List of ComplexType DetectionScriptParameters objects. +func (m *DeviceHealthScript) SetDetectionScriptParameters(value []DeviceHealthScriptParameterable)() { + m.detectionScriptParameters = value +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for the device health script across all devices +func (m *DeviceHealthScript) SetDeviceRunStates(value []DeviceHealthScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetDisplayName sets the displayName property value. Name of the device health script +func (m *DeviceHealthScript) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnforceSignatureCheck sets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked +func (m *DeviceHealthScript) SetEnforceSignatureCheck(value *bool)() { + m.enforceSignatureCheck = value +} +// SetHighestAvailableVersion sets the highestAvailableVersion property value. Highest available version for a Microsoft Proprietary script +func (m *DeviceHealthScript) SetHighestAvailableVersion(value *string)() { + m.highestAvailableVersion = value +} +// SetIsGlobalScript sets the isGlobalScript property value. Determines if this is Microsoft Proprietary Script. Proprietary scripts are read-only +func (m *DeviceHealthScript) SetIsGlobalScript(value *bool)() { + m.isGlobalScript = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The timestamp of when the device health script was modified. This property is read-only. +func (m *DeviceHealthScript) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPublisher sets the publisher property value. Name of the device health script publisher +func (m *DeviceHealthScript) SetPublisher(value *string)() { + m.publisher = value +} +// SetRemediationScriptContent sets the remediationScriptContent property value. The entire content of the remediation powershell script +func (m *DeviceHealthScript) SetRemediationScriptContent(value []byte)() { + m.remediationScriptContent = value +} +// SetRemediationScriptParameters sets the remediationScriptParameters property value. List of ComplexType RemediationScriptParameters objects. +func (m *DeviceHealthScript) SetRemediationScriptParameters(value []DeviceHealthScriptParameterable)() { + m.remediationScriptParameters = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for the device health script +func (m *DeviceHealthScript) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRunAs32Bit sets the runAs32Bit property value. Indicate whether PowerShell script(s) should run as 32-bit +func (m *DeviceHealthScript) SetRunAs32Bit(value *bool)() { + m.runAs32Bit = value +} +// SetRunAsAccount sets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceHealthScript) SetRunAsAccount(value *RunAsAccountType)() { + m.runAsAccount = value +} +// SetRunSummary sets the runSummary property value. High level run summary for device health script. +func (m *DeviceHealthScript) SetRunSummary(value DeviceHealthScriptRunSummaryable)() { + m.runSummary = value +} +// SetVersion sets the version property value. Version of the device health script +func (m *DeviceHealthScript) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_assignment.go b/src/internal/connector/graph/betasdk/models/device_health_script_assignment.go new file mode 100644 index 000000000..f932b96ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_assignment.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptAssignment contains properties used to assign a device management script to a group. +type DeviceHealthScriptAssignment struct { + Entity + // Determine whether we want to run detection script only or run both detection script and remediation script + runRemediationScript *bool + // Script run schedule for the target group + runSchedule DeviceHealthScriptRunScheduleable + // The Azure Active Directory group we are targeting the script to + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceHealthScriptAssignment instantiates a new deviceHealthScriptAssignment and sets the default values. +func NewDeviceHealthScriptAssignment()(*DeviceHealthScriptAssignment) { + m := &DeviceHealthScriptAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceHealthScriptAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["runRemediationScript"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRunRemediationScript(val) + } + return nil + } + res["runSchedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceHealthScriptRunScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSchedule(val.(DeviceHealthScriptRunScheduleable)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetRunRemediationScript gets the runRemediationScript property value. Determine whether we want to run detection script only or run both detection script and remediation script +func (m *DeviceHealthScriptAssignment) GetRunRemediationScript()(*bool) { + return m.runRemediationScript +} +// GetRunSchedule gets the runSchedule property value. Script run schedule for the target group +func (m *DeviceHealthScriptAssignment) GetRunSchedule()(DeviceHealthScriptRunScheduleable) { + return m.runSchedule +} +// GetTarget gets the target property value. The Azure Active Directory group we are targeting the script to +func (m *DeviceHealthScriptAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("runRemediationScript", m.GetRunRemediationScript()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSchedule", m.GetRunSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetRunRemediationScript sets the runRemediationScript property value. Determine whether we want to run detection script only or run both detection script and remediation script +func (m *DeviceHealthScriptAssignment) SetRunRemediationScript(value *bool)() { + m.runRemediationScript = value +} +// SetRunSchedule sets the runSchedule property value. Script run schedule for the target group +func (m *DeviceHealthScriptAssignment) SetRunSchedule(value DeviceHealthScriptRunScheduleable)() { + m.runSchedule = value +} +// SetTarget sets the target property value. The Azure Active Directory group we are targeting the script to +func (m *DeviceHealthScriptAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_response.go new file mode 100644 index 000000000..13f868ecd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptAssignmentCollectionResponse +type DeviceHealthScriptAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceHealthScriptAssignmentable +} +// NewDeviceHealthScriptAssignmentCollectionResponse instantiates a new DeviceHealthScriptAssignmentCollectionResponse and sets the default values. +func NewDeviceHealthScriptAssignmentCollectionResponse()(*DeviceHealthScriptAssignmentCollectionResponse) { + m := &DeviceHealthScriptAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceHealthScriptAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceHealthScriptAssignmentCollectionResponse) GetValue()([]DeviceHealthScriptAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceHealthScriptAssignmentCollectionResponse) SetValue(value []DeviceHealthScriptAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_responseable.go new file mode 100644 index 000000000..93974f2c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptAssignmentCollectionResponseable +type DeviceHealthScriptAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceHealthScriptAssignmentable) + SetValue(value []DeviceHealthScriptAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_health_script_assignmentable.go new file mode 100644 index 000000000..201a94c56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptAssignmentable +type DeviceHealthScriptAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRunRemediationScript()(*bool) + GetRunSchedule()(DeviceHealthScriptRunScheduleable) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetRunRemediationScript(value *bool)() + SetRunSchedule(value DeviceHealthScriptRunScheduleable)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameter.go b/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameter.go new file mode 100644 index 000000000..fab8b5b57 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameter.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptBooleanParameter +type DeviceHealthScriptBooleanParameter struct { + DeviceHealthScriptParameter + // The default value of boolean param + defaultValue *bool +} +// NewDeviceHealthScriptBooleanParameter instantiates a new DeviceHealthScriptBooleanParameter and sets the default values. +func NewDeviceHealthScriptBooleanParameter()(*DeviceHealthScriptBooleanParameter) { + m := &DeviceHealthScriptBooleanParameter{ + DeviceHealthScriptParameter: *NewDeviceHealthScriptParameter(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptBooleanParameter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptBooleanParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptBooleanParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptBooleanParameter(), nil +} +// GetDefaultValue gets the defaultValue property value. The default value of boolean param +func (m *DeviceHealthScriptBooleanParameter) GetDefaultValue()(*bool) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptBooleanParameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptParameter.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptBooleanParameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptParameter.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. The default value of boolean param +func (m *DeviceHealthScriptBooleanParameter) SetDefaultValue(value *bool)() { + m.defaultValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameterable.go b/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameterable.go new file mode 100644 index 000000000..900ad8106 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_boolean_parameterable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptBooleanParameterable +type DeviceHealthScriptBooleanParameterable interface { + DeviceHealthScriptParameterable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*bool) + SetDefaultValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_collection_response.go b/src/internal/connector/graph/betasdk/models/device_health_script_collection_response.go new file mode 100644 index 000000000..2f4e77be9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptCollectionResponse +type DeviceHealthScriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceHealthScriptable +} +// NewDeviceHealthScriptCollectionResponse instantiates a new DeviceHealthScriptCollectionResponse and sets the default values. +func NewDeviceHealthScriptCollectionResponse()(*DeviceHealthScriptCollectionResponse) { + m := &DeviceHealthScriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceHealthScriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceHealthScriptCollectionResponse) GetValue()([]DeviceHealthScriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceHealthScriptCollectionResponse) SetValue(value []DeviceHealthScriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_health_script_collection_responseable.go new file mode 100644 index 000000000..1162fec1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptCollectionResponseable +type DeviceHealthScriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceHealthScriptable) + SetValue(value []DeviceHealthScriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_daily_schedule.go b/src/internal/connector/graph/betasdk/models/device_health_script_daily_schedule.go new file mode 100644 index 000000000..4d7b650f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_daily_schedule.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDailySchedule +type DeviceHealthScriptDailySchedule struct { + DeviceHealthScriptTimeSchedule +} +// NewDeviceHealthScriptDailySchedule instantiates a new DeviceHealthScriptDailySchedule and sets the default values. +func NewDeviceHealthScriptDailySchedule()(*DeviceHealthScriptDailySchedule) { + m := &DeviceHealthScriptDailySchedule{ + DeviceHealthScriptTimeSchedule: *NewDeviceHealthScriptTimeSchedule(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptDailySchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptDailyScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptDailyScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptDailySchedule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptDailySchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptTimeSchedule.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptDailySchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptTimeSchedule.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_daily_scheduleable.go b/src/internal/connector/graph/betasdk/models/device_health_script_daily_scheduleable.go new file mode 100644 index 000000000..5c9c8f1fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_daily_scheduleable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDailyScheduleable +type DeviceHealthScriptDailyScheduleable interface { + DeviceHealthScriptTimeScheduleable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_device_state.go b/src/internal/connector/graph/betasdk/models/device_health_script_device_state.go new file mode 100644 index 000000000..db442fc0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_device_state.go @@ -0,0 +1,353 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDeviceState contains properties for device run state of the device health script. +type DeviceHealthScriptDeviceState struct { + Entity + // A list of the assignment filter ids used for health script applicability evaluation + assignmentFilterIds []string + // Indicates the type of execution status of the device management script. + detectionState *RunState + // The next timestamp of when the device health script is expected to execute + expectedStateUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last timestamp of when the device health script executed + lastStateUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last time that Intune Managment Extension synced with Intune + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managed device on which the device health script executed + managedDevice ManagedDeviceable + // Error from the detection script after remediation + postRemediationDetectionScriptError *string + // Detection script output after remediation + postRemediationDetectionScriptOutput *string + // Error from the detection script before remediation + preRemediationDetectionScriptError *string + // Output of the detection script before remediation + preRemediationDetectionScriptOutput *string + // Error output of the remediation script + remediationScriptError *string + // Indicates the type of execution status of the device management script. + remediationState *RemediationState +} +// NewDeviceHealthScriptDeviceState instantiates a new deviceHealthScriptDeviceState and sets the default values. +func NewDeviceHealthScriptDeviceState()(*DeviceHealthScriptDeviceState) { + m := &DeviceHealthScriptDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceHealthScriptDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptDeviceState(), nil +} +// GetAssignmentFilterIds gets the assignmentFilterIds property value. A list of the assignment filter ids used for health script applicability evaluation +func (m *DeviceHealthScriptDeviceState) GetAssignmentFilterIds()([]string) { + return m.assignmentFilterIds +} +// GetDetectionState gets the detectionState property value. Indicates the type of execution status of the device management script. +func (m *DeviceHealthScriptDeviceState) GetDetectionState()(*RunState) { + return m.detectionState +} +// GetExpectedStateUpdateDateTime gets the expectedStateUpdateDateTime property value. The next timestamp of when the device health script is expected to execute +func (m *DeviceHealthScriptDeviceState) GetExpectedStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expectedStateUpdateDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentFilterIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAssignmentFilterIds(res) + } + return nil + } + res["detectionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetDetectionState(val.(*RunState)) + } + return nil + } + res["expectedStateUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpectedStateUpdateDateTime(val) + } + return nil + } + res["lastStateUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStateUpdateDateTime(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["managedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDevice(val.(ManagedDeviceable)) + } + return nil + } + res["postRemediationDetectionScriptError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostRemediationDetectionScriptError(val) + } + return nil + } + res["postRemediationDetectionScriptOutput"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostRemediationDetectionScriptOutput(val) + } + return nil + } + res["preRemediationDetectionScriptError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreRemediationDetectionScriptError(val) + } + return nil + } + res["preRemediationDetectionScriptOutput"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreRemediationDetectionScriptOutput(val) + } + return nil + } + res["remediationScriptError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediationScriptError(val) + } + return nil + } + res["remediationState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRemediationState) + if err != nil { + return err + } + if val != nil { + m.SetRemediationState(val.(*RemediationState)) + } + return nil + } + return res +} +// GetLastStateUpdateDateTime gets the lastStateUpdateDateTime property value. The last timestamp of when the device health script executed +func (m *DeviceHealthScriptDeviceState) GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStateUpdateDateTime +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The last time that Intune Managment Extension synced with Intune +func (m *DeviceHealthScriptDeviceState) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetManagedDevice gets the managedDevice property value. The managed device on which the device health script executed +func (m *DeviceHealthScriptDeviceState) GetManagedDevice()(ManagedDeviceable) { + return m.managedDevice +} +// GetPostRemediationDetectionScriptError gets the postRemediationDetectionScriptError property value. Error from the detection script after remediation +func (m *DeviceHealthScriptDeviceState) GetPostRemediationDetectionScriptError()(*string) { + return m.postRemediationDetectionScriptError +} +// GetPostRemediationDetectionScriptOutput gets the postRemediationDetectionScriptOutput property value. Detection script output after remediation +func (m *DeviceHealthScriptDeviceState) GetPostRemediationDetectionScriptOutput()(*string) { + return m.postRemediationDetectionScriptOutput +} +// GetPreRemediationDetectionScriptError gets the preRemediationDetectionScriptError property value. Error from the detection script before remediation +func (m *DeviceHealthScriptDeviceState) GetPreRemediationDetectionScriptError()(*string) { + return m.preRemediationDetectionScriptError +} +// GetPreRemediationDetectionScriptOutput gets the preRemediationDetectionScriptOutput property value. Output of the detection script before remediation +func (m *DeviceHealthScriptDeviceState) GetPreRemediationDetectionScriptOutput()(*string) { + return m.preRemediationDetectionScriptOutput +} +// GetRemediationScriptError gets the remediationScriptError property value. Error output of the remediation script +func (m *DeviceHealthScriptDeviceState) GetRemediationScriptError()(*string) { + return m.remediationScriptError +} +// GetRemediationState gets the remediationState property value. Indicates the type of execution status of the device management script. +func (m *DeviceHealthScriptDeviceState) GetRemediationState()(*RemediationState) { + return m.remediationState +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignmentFilterIds() != nil { + err = writer.WriteCollectionOfStringValues("assignmentFilterIds", m.GetAssignmentFilterIds()) + if err != nil { + return err + } + } + if m.GetDetectionState() != nil { + cast := (*m.GetDetectionState()).String() + err = writer.WriteStringValue("detectionState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expectedStateUpdateDateTime", m.GetExpectedStateUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStateUpdateDateTime", m.GetLastStateUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDevice", m.GetManagedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("postRemediationDetectionScriptError", m.GetPostRemediationDetectionScriptError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("postRemediationDetectionScriptOutput", m.GetPostRemediationDetectionScriptOutput()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preRemediationDetectionScriptError", m.GetPreRemediationDetectionScriptError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preRemediationDetectionScriptOutput", m.GetPreRemediationDetectionScriptOutput()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remediationScriptError", m.GetRemediationScriptError()) + if err != nil { + return err + } + } + if m.GetRemediationState() != nil { + cast := (*m.GetRemediationState()).String() + err = writer.WriteStringValue("remediationState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentFilterIds sets the assignmentFilterIds property value. A list of the assignment filter ids used for health script applicability evaluation +func (m *DeviceHealthScriptDeviceState) SetAssignmentFilterIds(value []string)() { + m.assignmentFilterIds = value +} +// SetDetectionState sets the detectionState property value. Indicates the type of execution status of the device management script. +func (m *DeviceHealthScriptDeviceState) SetDetectionState(value *RunState)() { + m.detectionState = value +} +// SetExpectedStateUpdateDateTime sets the expectedStateUpdateDateTime property value. The next timestamp of when the device health script is expected to execute +func (m *DeviceHealthScriptDeviceState) SetExpectedStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expectedStateUpdateDateTime = value +} +// SetLastStateUpdateDateTime sets the lastStateUpdateDateTime property value. The last timestamp of when the device health script executed +func (m *DeviceHealthScriptDeviceState) SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStateUpdateDateTime = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The last time that Intune Managment Extension synced with Intune +func (m *DeviceHealthScriptDeviceState) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetManagedDevice sets the managedDevice property value. The managed device on which the device health script executed +func (m *DeviceHealthScriptDeviceState) SetManagedDevice(value ManagedDeviceable)() { + m.managedDevice = value +} +// SetPostRemediationDetectionScriptError sets the postRemediationDetectionScriptError property value. Error from the detection script after remediation +func (m *DeviceHealthScriptDeviceState) SetPostRemediationDetectionScriptError(value *string)() { + m.postRemediationDetectionScriptError = value +} +// SetPostRemediationDetectionScriptOutput sets the postRemediationDetectionScriptOutput property value. Detection script output after remediation +func (m *DeviceHealthScriptDeviceState) SetPostRemediationDetectionScriptOutput(value *string)() { + m.postRemediationDetectionScriptOutput = value +} +// SetPreRemediationDetectionScriptError sets the preRemediationDetectionScriptError property value. Error from the detection script before remediation +func (m *DeviceHealthScriptDeviceState) SetPreRemediationDetectionScriptError(value *string)() { + m.preRemediationDetectionScriptError = value +} +// SetPreRemediationDetectionScriptOutput sets the preRemediationDetectionScriptOutput property value. Output of the detection script before remediation +func (m *DeviceHealthScriptDeviceState) SetPreRemediationDetectionScriptOutput(value *string)() { + m.preRemediationDetectionScriptOutput = value +} +// SetRemediationScriptError sets the remediationScriptError property value. Error output of the remediation script +func (m *DeviceHealthScriptDeviceState) SetRemediationScriptError(value *string)() { + m.remediationScriptError = value +} +// SetRemediationState sets the remediationState property value. Indicates the type of execution status of the device management script. +func (m *DeviceHealthScriptDeviceState) SetRemediationState(value *RemediationState)() { + m.remediationState = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_response.go new file mode 100644 index 000000000..61f70ed33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDeviceStateCollectionResponse +type DeviceHealthScriptDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceHealthScriptDeviceStateable +} +// NewDeviceHealthScriptDeviceStateCollectionResponse instantiates a new DeviceHealthScriptDeviceStateCollectionResponse and sets the default values. +func NewDeviceHealthScriptDeviceStateCollectionResponse()(*DeviceHealthScriptDeviceStateCollectionResponse) { + m := &DeviceHealthScriptDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceHealthScriptDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceHealthScriptDeviceStateCollectionResponse) GetValue()([]DeviceHealthScriptDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceHealthScriptDeviceStateCollectionResponse) SetValue(value []DeviceHealthScriptDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_responseable.go new file mode 100644 index 000000000..0b97a6886 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDeviceStateCollectionResponseable +type DeviceHealthScriptDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceHealthScriptDeviceStateable) + SetValue(value []DeviceHealthScriptDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_device_stateable.go b/src/internal/connector/graph/betasdk/models/device_health_script_device_stateable.go new file mode 100644 index 000000000..3a1141b78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_device_stateable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptDeviceStateable +type DeviceHealthScriptDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentFilterIds()([]string) + GetDetectionState()(*RunState) + GetExpectedStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDevice()(ManagedDeviceable) + GetPostRemediationDetectionScriptError()(*string) + GetPostRemediationDetectionScriptOutput()(*string) + GetPreRemediationDetectionScriptError()(*string) + GetPreRemediationDetectionScriptOutput()(*string) + GetRemediationScriptError()(*string) + GetRemediationState()(*RemediationState) + SetAssignmentFilterIds(value []string)() + SetDetectionState(value *RunState)() + SetExpectedStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDevice(value ManagedDeviceable)() + SetPostRemediationDetectionScriptError(value *string)() + SetPostRemediationDetectionScriptOutput(value *string)() + SetPreRemediationDetectionScriptError(value *string)() + SetPreRemediationDetectionScriptOutput(value *string)() + SetRemediationScriptError(value *string)() + SetRemediationState(value *RemediationState)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_hourly_schedule.go b/src/internal/connector/graph/betasdk/models/device_health_script_hourly_schedule.go new file mode 100644 index 000000000..1ca3b027e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_hourly_schedule.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptHourlySchedule +type DeviceHealthScriptHourlySchedule struct { + DeviceHealthScriptRunSchedule +} +// NewDeviceHealthScriptHourlySchedule instantiates a new DeviceHealthScriptHourlySchedule and sets the default values. +func NewDeviceHealthScriptHourlySchedule()(*DeviceHealthScriptHourlySchedule) { + m := &DeviceHealthScriptHourlySchedule{ + DeviceHealthScriptRunSchedule: *NewDeviceHealthScriptRunSchedule(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptHourlySchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptHourlyScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptHourlyScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptHourlySchedule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptHourlySchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptRunSchedule.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptHourlySchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptRunSchedule.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_hourly_scheduleable.go b/src/internal/connector/graph/betasdk/models/device_health_script_hourly_scheduleable.go new file mode 100644 index 000000000..9d1d47423 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_hourly_scheduleable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptHourlyScheduleable +type DeviceHealthScriptHourlyScheduleable interface { + DeviceHealthScriptRunScheduleable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameter.go b/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameter.go new file mode 100644 index 000000000..6c264f62d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameter.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptIntegerParameter +type DeviceHealthScriptIntegerParameter struct { + DeviceHealthScriptParameter + // The default value of Integer param. Valid values -2147483648 to 2147483647 + defaultValue *int32 +} +// NewDeviceHealthScriptIntegerParameter instantiates a new DeviceHealthScriptIntegerParameter and sets the default values. +func NewDeviceHealthScriptIntegerParameter()(*DeviceHealthScriptIntegerParameter) { + m := &DeviceHealthScriptIntegerParameter{ + DeviceHealthScriptParameter: *NewDeviceHealthScriptParameter(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptIntegerParameter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptIntegerParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptIntegerParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptIntegerParameter(), nil +} +// GetDefaultValue gets the defaultValue property value. The default value of Integer param. Valid values -2147483648 to 2147483647 +func (m *DeviceHealthScriptIntegerParameter) GetDefaultValue()(*int32) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptIntegerParameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptParameter.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptIntegerParameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptParameter.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. The default value of Integer param. Valid values -2147483648 to 2147483647 +func (m *DeviceHealthScriptIntegerParameter) SetDefaultValue(value *int32)() { + m.defaultValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameterable.go b/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameterable.go new file mode 100644 index 000000000..51434876c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_integer_parameterable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptIntegerParameterable +type DeviceHealthScriptIntegerParameterable interface { + DeviceHealthScriptParameterable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*int32) + SetDefaultValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_parameter.go b/src/internal/connector/graph/betasdk/models/device_health_script_parameter.go new file mode 100644 index 000000000..d40aba46a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_parameter.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptParameter base properties of the script parameter. +type DeviceHealthScriptParameter struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether Apply DefaultValue When Not Assigned + applyDefaultValueWhenNotAssigned *bool + // The description of the param + description *string + // Whether the param is required + isRequired *bool + // The name of the param + name *string + // The OdataType property + odataType *string +} +// NewDeviceHealthScriptParameter instantiates a new deviceHealthScriptParameter and sets the default values. +func NewDeviceHealthScriptParameter()(*DeviceHealthScriptParameter) { + m := &DeviceHealthScriptParameter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceHealthScriptParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceHealthScriptBooleanParameter": + return NewDeviceHealthScriptBooleanParameter(), nil + case "#microsoft.graph.deviceHealthScriptIntegerParameter": + return NewDeviceHealthScriptIntegerParameter(), nil + case "#microsoft.graph.deviceHealthScriptStringParameter": + return NewDeviceHealthScriptStringParameter(), nil + } + } + } + } + return NewDeviceHealthScriptParameter(), 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 *DeviceHealthScriptParameter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplyDefaultValueWhenNotAssigned gets the applyDefaultValueWhenNotAssigned property value. Whether Apply DefaultValue When Not Assigned +func (m *DeviceHealthScriptParameter) GetApplyDefaultValueWhenNotAssigned()(*bool) { + return m.applyDefaultValueWhenNotAssigned +} +// GetDescription gets the description property value. The description of the param +func (m *DeviceHealthScriptParameter) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptParameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applyDefaultValueWhenNotAssigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyDefaultValueWhenNotAssigned(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetIsRequired gets the isRequired property value. Whether the param is required +func (m *DeviceHealthScriptParameter) GetIsRequired()(*bool) { + return m.isRequired +} +// GetName gets the name property value. The name of the param +func (m *DeviceHealthScriptParameter) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptParameter) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptParameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("applyDefaultValueWhenNotAssigned", m.GetApplyDefaultValueWhenNotAssigned()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceHealthScriptParameter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplyDefaultValueWhenNotAssigned sets the applyDefaultValueWhenNotAssigned property value. Whether Apply DefaultValue When Not Assigned +func (m *DeviceHealthScriptParameter) SetApplyDefaultValueWhenNotAssigned(value *bool)() { + m.applyDefaultValueWhenNotAssigned = value +} +// SetDescription sets the description property value. The description of the param +func (m *DeviceHealthScriptParameter) SetDescription(value *string)() { + m.description = value +} +// SetIsRequired sets the isRequired property value. Whether the param is required +func (m *DeviceHealthScriptParameter) SetIsRequired(value *bool)() { + m.isRequired = value +} +// SetName sets the name property value. The name of the param +func (m *DeviceHealthScriptParameter) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptParameter) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_response.go b/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_response.go new file mode 100644 index 000000000..16014fe52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptParameterCollectionResponse +type DeviceHealthScriptParameterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceHealthScriptParameterable +} +// NewDeviceHealthScriptParameterCollectionResponse instantiates a new DeviceHealthScriptParameterCollectionResponse and sets the default values. +func NewDeviceHealthScriptParameterCollectionResponse()(*DeviceHealthScriptParameterCollectionResponse) { + m := &DeviceHealthScriptParameterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceHealthScriptParameterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptParameterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptParameterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptParameterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptParameterable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptParameterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceHealthScriptParameterCollectionResponse) GetValue()([]DeviceHealthScriptParameterable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptParameterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceHealthScriptParameterCollectionResponse) SetValue(value []DeviceHealthScriptParameterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_responseable.go new file mode 100644 index 000000000..24057b9de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_parameter_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptParameterCollectionResponseable +type DeviceHealthScriptParameterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceHealthScriptParameterable) + SetValue(value []DeviceHealthScriptParameterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_parameterable.go b/src/internal/connector/graph/betasdk/models/device_health_script_parameterable.go new file mode 100644 index 000000000..469c02f9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_parameterable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptParameterable +type DeviceHealthScriptParameterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplyDefaultValueWhenNotAssigned()(*bool) + GetDescription()(*string) + GetIsRequired()(*bool) + GetName()(*string) + GetOdataType()(*string) + SetApplyDefaultValueWhenNotAssigned(value *bool)() + SetDescription(value *string)() + SetIsRequired(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data.go b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data.go new file mode 100644 index 000000000..876cc5fd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRemediationHistoryData the number of devices remediated by a device health script on a given date. +type DeviceHealthScriptRemediationHistoryData 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 date on which devices were remediated by the device health script. + date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of devices that were found to have no issue by the device health script. + noIssueDeviceCount *int32 + // The OdataType property + odataType *string + // The number of devices remediated by the device health script. + remediatedDeviceCount *int32 +} +// NewDeviceHealthScriptRemediationHistoryData instantiates a new deviceHealthScriptRemediationHistoryData and sets the default values. +func NewDeviceHealthScriptRemediationHistoryData()(*DeviceHealthScriptRemediationHistoryData) { + m := &DeviceHealthScriptRemediationHistoryData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceHealthScriptRemediationHistoryDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptRemediationHistoryDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptRemediationHistoryData(), 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 *DeviceHealthScriptRemediationHistoryData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDate gets the date property value. The date on which devices were remediated by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.date +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptRemediationHistoryData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["noIssueDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNoIssueDeviceCount(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["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + return res +} +// GetNoIssueDeviceCount gets the noIssueDeviceCount property value. The number of devices that were found to have no issue by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) GetNoIssueDeviceCount()(*int32) { + return m.noIssueDeviceCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptRemediationHistoryData) GetOdataType()(*string) { + return m.odataType +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. The number of devices remediated by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptRemediationHistoryData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteDateOnlyValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("noIssueDeviceCount", m.GetNoIssueDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + 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 *DeviceHealthScriptRemediationHistoryData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDate sets the date property value. The date on which devices were remediated by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.date = value +} +// SetNoIssueDeviceCount sets the noIssueDeviceCount property value. The number of devices that were found to have no issue by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) SetNoIssueDeviceCount(value *int32)() { + m.noIssueDeviceCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptRemediationHistoryData) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. The number of devices remediated by the device health script. +func (m *DeviceHealthScriptRemediationHistoryData) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_response.go b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_response.go new file mode 100644 index 000000000..994060769 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRemediationHistoryDataCollectionResponse +type DeviceHealthScriptRemediationHistoryDataCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceHealthScriptRemediationHistoryDataable +} +// NewDeviceHealthScriptRemediationHistoryDataCollectionResponse instantiates a new DeviceHealthScriptRemediationHistoryDataCollectionResponse and sets the default values. +func NewDeviceHealthScriptRemediationHistoryDataCollectionResponse()(*DeviceHealthScriptRemediationHistoryDataCollectionResponse) { + m := &DeviceHealthScriptRemediationHistoryDataCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceHealthScriptRemediationHistoryDataCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptRemediationHistoryDataCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptRemediationHistoryDataCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptRemediationHistoryDataCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptRemediationHistoryDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptRemediationHistoryDataable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptRemediationHistoryDataable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceHealthScriptRemediationHistoryDataCollectionResponse) GetValue()([]DeviceHealthScriptRemediationHistoryDataable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptRemediationHistoryDataCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceHealthScriptRemediationHistoryDataCollectionResponse) SetValue(value []DeviceHealthScriptRemediationHistoryDataable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_responseable.go new file mode 100644 index 000000000..1d84d44af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_data_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRemediationHistoryDataCollectionResponseable +type DeviceHealthScriptRemediationHistoryDataCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceHealthScriptRemediationHistoryDataable) + SetValue(value []DeviceHealthScriptRemediationHistoryDataable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_dataable.go b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_dataable.go new file mode 100644 index 000000000..2573a382b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_remediation_history_dataable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRemediationHistoryDataable +type DeviceHealthScriptRemediationHistoryDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetNoIssueDeviceCount()(*int32) + GetOdataType()(*string) + GetRemediatedDeviceCount()(*int32) + SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetNoIssueDeviceCount(value *int32)() + SetOdataType(value *string)() + SetRemediatedDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_once_schedule.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_once_schedule.go new file mode 100644 index 000000000..b084cb15a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_once_schedule.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunOnceSchedule +type DeviceHealthScriptRunOnceSchedule struct { + DeviceHealthScriptTimeSchedule + // The date the script is scheduled to run. This collection can contain a maximum of 20 elements. + date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewDeviceHealthScriptRunOnceSchedule instantiates a new DeviceHealthScriptRunOnceSchedule and sets the default values. +func NewDeviceHealthScriptRunOnceSchedule()(*DeviceHealthScriptRunOnceSchedule) { + m := &DeviceHealthScriptRunOnceSchedule{ + DeviceHealthScriptTimeSchedule: *NewDeviceHealthScriptTimeSchedule(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptRunOnceSchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptRunOnceScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptRunOnceScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptRunOnceSchedule(), nil +} +// GetDate gets the date property value. The date the script is scheduled to run. This collection can contain a maximum of 20 elements. +func (m *DeviceHealthScriptRunOnceSchedule) GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.date +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptRunOnceSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptTimeSchedule.GetFieldDeserializers() + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptRunOnceSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptTimeSchedule.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("date", m.GetDate()) + if err != nil { + return err + } + } + return nil +} +// SetDate sets the date property value. The date the script is scheduled to run. This collection can contain a maximum of 20 elements. +func (m *DeviceHealthScriptRunOnceSchedule) SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.date = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_once_scheduleable.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_once_scheduleable.go new file mode 100644 index 000000000..6989292a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_once_scheduleable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunOnceScheduleable +type DeviceHealthScriptRunOnceScheduleable interface { + DeviceHealthScriptTimeScheduleable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_schedule.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_schedule.go new file mode 100644 index 000000000..43ccad32b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_schedule.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunSchedule base type of Device health script run schedule. +type DeviceHealthScriptRunSchedule 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 x value of every x hours for hourly schedule, every x days for Daily Schedule, every x weeks for weekly schedule, every x months for Monthly Schedule. Valid values 1 to 23 + interval *int32 + // The OdataType property + odataType *string +} +// NewDeviceHealthScriptRunSchedule instantiates a new deviceHealthScriptRunSchedule and sets the default values. +func NewDeviceHealthScriptRunSchedule()(*DeviceHealthScriptRunSchedule) { + m := &DeviceHealthScriptRunSchedule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceHealthScriptRunScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptRunScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceHealthScriptDailySchedule": + return NewDeviceHealthScriptDailySchedule(), nil + case "#microsoft.graph.deviceHealthScriptHourlySchedule": + return NewDeviceHealthScriptHourlySchedule(), nil + case "#microsoft.graph.deviceHealthScriptRunOnceSchedule": + return NewDeviceHealthScriptRunOnceSchedule(), nil + case "#microsoft.graph.deviceHealthScriptTimeSchedule": + return NewDeviceHealthScriptTimeSchedule(), nil + } + } + } + } + return NewDeviceHealthScriptRunSchedule(), 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 *DeviceHealthScriptRunSchedule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptRunSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["interval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInterval(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 + } + return res +} +// GetInterval gets the interval property value. The x value of every x hours for hourly schedule, every x days for Daily Schedule, every x weeks for weekly schedule, every x months for Monthly Schedule. Valid values 1 to 23 +func (m *DeviceHealthScriptRunSchedule) GetInterval()(*int32) { + return m.interval +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptRunSchedule) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptRunSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("interval", m.GetInterval()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceHealthScriptRunSchedule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetInterval sets the interval property value. The x value of every x hours for hourly schedule, every x days for Daily Schedule, every x weeks for weekly schedule, every x months for Monthly Schedule. Valid values 1 to 23 +func (m *DeviceHealthScriptRunSchedule) SetInterval(value *int32)() { + m.interval = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceHealthScriptRunSchedule) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_scheduleable.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_scheduleable.go new file mode 100644 index 000000000..c71efb55d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_scheduleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunScheduleable +type DeviceHealthScriptRunScheduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInterval()(*int32) + GetOdataType()(*string) + SetInterval(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_summary.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_summary.go new file mode 100644 index 000000000..b04bd0456 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_summary.go @@ -0,0 +1,321 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunSummary +type DeviceHealthScriptRunSummary struct { + Entity + // Number of devices on which the detection script execution encountered an error and did not complete + detectionScriptErrorDeviceCount *int32 + // Number of devices for which the detection script was not applicable + detectionScriptNotApplicableDeviceCount *int32 + // Number of devices which have not yet run the latest version of the device health script + detectionScriptPendingDeviceCount *int32 + // Number of devices for which the detection script found an issue + issueDetectedDeviceCount *int32 + // Number of devices that were remediated over the last 30 days + issueRemediatedCumulativeDeviceCount *int32 + // Number of devices for which the remediation script was able to resolve the detected issue + issueRemediatedDeviceCount *int32 + // Number of devices for which the remediation script executed successfully but failed to resolve the detected issue + issueReoccurredDeviceCount *int32 + // Last run time for the script across all devices + lastScriptRunDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of devices for which the detection script did not find an issue and the device is healthy + noIssueDetectedDeviceCount *int32 + // Number of devices for which the remediation script execution encountered an error and did not complete + remediationScriptErrorDeviceCount *int32 + // Number of devices for which remediation was skipped + remediationSkippedDeviceCount *int32 +} +// NewDeviceHealthScriptRunSummary instantiates a new deviceHealthScriptRunSummary and sets the default values. +func NewDeviceHealthScriptRunSummary()(*DeviceHealthScriptRunSummary) { + m := &DeviceHealthScriptRunSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceHealthScriptRunSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptRunSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptRunSummary(), nil +} +// GetDetectionScriptErrorDeviceCount gets the detectionScriptErrorDeviceCount property value. Number of devices on which the detection script execution encountered an error and did not complete +func (m *DeviceHealthScriptRunSummary) GetDetectionScriptErrorDeviceCount()(*int32) { + return m.detectionScriptErrorDeviceCount +} +// GetDetectionScriptNotApplicableDeviceCount gets the detectionScriptNotApplicableDeviceCount property value. Number of devices for which the detection script was not applicable +func (m *DeviceHealthScriptRunSummary) GetDetectionScriptNotApplicableDeviceCount()(*int32) { + return m.detectionScriptNotApplicableDeviceCount +} +// GetDetectionScriptPendingDeviceCount gets the detectionScriptPendingDeviceCount property value. Number of devices which have not yet run the latest version of the device health script +func (m *DeviceHealthScriptRunSummary) GetDetectionScriptPendingDeviceCount()(*int32) { + return m.detectionScriptPendingDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptRunSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["detectionScriptErrorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptErrorDeviceCount(val) + } + return nil + } + res["detectionScriptNotApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptNotApplicableDeviceCount(val) + } + return nil + } + res["detectionScriptPendingDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionScriptPendingDeviceCount(val) + } + return nil + } + res["issueDetectedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueDetectedDeviceCount(val) + } + return nil + } + res["issueRemediatedCumulativeDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueRemediatedCumulativeDeviceCount(val) + } + return nil + } + res["issueRemediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueRemediatedDeviceCount(val) + } + return nil + } + res["issueReoccurredDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIssueReoccurredDeviceCount(val) + } + return nil + } + res["lastScriptRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastScriptRunDateTime(val) + } + return nil + } + res["noIssueDetectedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNoIssueDetectedDeviceCount(val) + } + return nil + } + res["remediationScriptErrorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediationScriptErrorDeviceCount(val) + } + return nil + } + res["remediationSkippedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediationSkippedDeviceCount(val) + } + return nil + } + return res +} +// GetIssueDetectedDeviceCount gets the issueDetectedDeviceCount property value. Number of devices for which the detection script found an issue +func (m *DeviceHealthScriptRunSummary) GetIssueDetectedDeviceCount()(*int32) { + return m.issueDetectedDeviceCount +} +// GetIssueRemediatedCumulativeDeviceCount gets the issueRemediatedCumulativeDeviceCount property value. Number of devices that were remediated over the last 30 days +func (m *DeviceHealthScriptRunSummary) GetIssueRemediatedCumulativeDeviceCount()(*int32) { + return m.issueRemediatedCumulativeDeviceCount +} +// GetIssueRemediatedDeviceCount gets the issueRemediatedDeviceCount property value. Number of devices for which the remediation script was able to resolve the detected issue +func (m *DeviceHealthScriptRunSummary) GetIssueRemediatedDeviceCount()(*int32) { + return m.issueRemediatedDeviceCount +} +// GetIssueReoccurredDeviceCount gets the issueReoccurredDeviceCount property value. Number of devices for which the remediation script executed successfully but failed to resolve the detected issue +func (m *DeviceHealthScriptRunSummary) GetIssueReoccurredDeviceCount()(*int32) { + return m.issueReoccurredDeviceCount +} +// GetLastScriptRunDateTime gets the lastScriptRunDateTime property value. Last run time for the script across all devices +func (m *DeviceHealthScriptRunSummary) GetLastScriptRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastScriptRunDateTime +} +// GetNoIssueDetectedDeviceCount gets the noIssueDetectedDeviceCount property value. Number of devices for which the detection script did not find an issue and the device is healthy +func (m *DeviceHealthScriptRunSummary) GetNoIssueDetectedDeviceCount()(*int32) { + return m.noIssueDetectedDeviceCount +} +// GetRemediationScriptErrorDeviceCount gets the remediationScriptErrorDeviceCount property value. Number of devices for which the remediation script execution encountered an error and did not complete +func (m *DeviceHealthScriptRunSummary) GetRemediationScriptErrorDeviceCount()(*int32) { + return m.remediationScriptErrorDeviceCount +} +// GetRemediationSkippedDeviceCount gets the remediationSkippedDeviceCount property value. Number of devices for which remediation was skipped +func (m *DeviceHealthScriptRunSummary) GetRemediationSkippedDeviceCount()(*int32) { + return m.remediationSkippedDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptRunSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("detectionScriptErrorDeviceCount", m.GetDetectionScriptErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("detectionScriptNotApplicableDeviceCount", m.GetDetectionScriptNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("detectionScriptPendingDeviceCount", m.GetDetectionScriptPendingDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("issueDetectedDeviceCount", m.GetIssueDetectedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("issueRemediatedCumulativeDeviceCount", m.GetIssueRemediatedCumulativeDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("issueRemediatedDeviceCount", m.GetIssueRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("issueReoccurredDeviceCount", m.GetIssueReoccurredDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastScriptRunDateTime", m.GetLastScriptRunDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("noIssueDetectedDeviceCount", m.GetNoIssueDetectedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediationScriptErrorDeviceCount", m.GetRemediationScriptErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediationSkippedDeviceCount", m.GetRemediationSkippedDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetDetectionScriptErrorDeviceCount sets the detectionScriptErrorDeviceCount property value. Number of devices on which the detection script execution encountered an error and did not complete +func (m *DeviceHealthScriptRunSummary) SetDetectionScriptErrorDeviceCount(value *int32)() { + m.detectionScriptErrorDeviceCount = value +} +// SetDetectionScriptNotApplicableDeviceCount sets the detectionScriptNotApplicableDeviceCount property value. Number of devices for which the detection script was not applicable +func (m *DeviceHealthScriptRunSummary) SetDetectionScriptNotApplicableDeviceCount(value *int32)() { + m.detectionScriptNotApplicableDeviceCount = value +} +// SetDetectionScriptPendingDeviceCount sets the detectionScriptPendingDeviceCount property value. Number of devices which have not yet run the latest version of the device health script +func (m *DeviceHealthScriptRunSummary) SetDetectionScriptPendingDeviceCount(value *int32)() { + m.detectionScriptPendingDeviceCount = value +} +// SetIssueDetectedDeviceCount sets the issueDetectedDeviceCount property value. Number of devices for which the detection script found an issue +func (m *DeviceHealthScriptRunSummary) SetIssueDetectedDeviceCount(value *int32)() { + m.issueDetectedDeviceCount = value +} +// SetIssueRemediatedCumulativeDeviceCount sets the issueRemediatedCumulativeDeviceCount property value. Number of devices that were remediated over the last 30 days +func (m *DeviceHealthScriptRunSummary) SetIssueRemediatedCumulativeDeviceCount(value *int32)() { + m.issueRemediatedCumulativeDeviceCount = value +} +// SetIssueRemediatedDeviceCount sets the issueRemediatedDeviceCount property value. Number of devices for which the remediation script was able to resolve the detected issue +func (m *DeviceHealthScriptRunSummary) SetIssueRemediatedDeviceCount(value *int32)() { + m.issueRemediatedDeviceCount = value +} +// SetIssueReoccurredDeviceCount sets the issueReoccurredDeviceCount property value. Number of devices for which the remediation script executed successfully but failed to resolve the detected issue +func (m *DeviceHealthScriptRunSummary) SetIssueReoccurredDeviceCount(value *int32)() { + m.issueReoccurredDeviceCount = value +} +// SetLastScriptRunDateTime sets the lastScriptRunDateTime property value. Last run time for the script across all devices +func (m *DeviceHealthScriptRunSummary) SetLastScriptRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastScriptRunDateTime = value +} +// SetNoIssueDetectedDeviceCount sets the noIssueDetectedDeviceCount property value. Number of devices for which the detection script did not find an issue and the device is healthy +func (m *DeviceHealthScriptRunSummary) SetNoIssueDetectedDeviceCount(value *int32)() { + m.noIssueDetectedDeviceCount = value +} +// SetRemediationScriptErrorDeviceCount sets the remediationScriptErrorDeviceCount property value. Number of devices for which the remediation script execution encountered an error and did not complete +func (m *DeviceHealthScriptRunSummary) SetRemediationScriptErrorDeviceCount(value *int32)() { + m.remediationScriptErrorDeviceCount = value +} +// SetRemediationSkippedDeviceCount sets the remediationSkippedDeviceCount property value. Number of devices for which remediation was skipped +func (m *DeviceHealthScriptRunSummary) SetRemediationSkippedDeviceCount(value *int32)() { + m.remediationSkippedDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_run_summaryable.go b/src/internal/connector/graph/betasdk/models/device_health_script_run_summaryable.go new file mode 100644 index 000000000..de6c1a827 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_run_summaryable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptRunSummaryable +type DeviceHealthScriptRunSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionScriptErrorDeviceCount()(*int32) + GetDetectionScriptNotApplicableDeviceCount()(*int32) + GetDetectionScriptPendingDeviceCount()(*int32) + GetIssueDetectedDeviceCount()(*int32) + GetIssueRemediatedCumulativeDeviceCount()(*int32) + GetIssueRemediatedDeviceCount()(*int32) + GetIssueReoccurredDeviceCount()(*int32) + GetLastScriptRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNoIssueDetectedDeviceCount()(*int32) + GetRemediationScriptErrorDeviceCount()(*int32) + GetRemediationSkippedDeviceCount()(*int32) + SetDetectionScriptErrorDeviceCount(value *int32)() + SetDetectionScriptNotApplicableDeviceCount(value *int32)() + SetDetectionScriptPendingDeviceCount(value *int32)() + SetIssueDetectedDeviceCount(value *int32)() + SetIssueRemediatedCumulativeDeviceCount(value *int32)() + SetIssueRemediatedDeviceCount(value *int32)() + SetIssueReoccurredDeviceCount(value *int32)() + SetLastScriptRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNoIssueDetectedDeviceCount(value *int32)() + SetRemediationScriptErrorDeviceCount(value *int32)() + SetRemediationSkippedDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_string_parameter.go b/src/internal/connector/graph/betasdk/models/device_health_script_string_parameter.go new file mode 100644 index 000000000..325779f6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_string_parameter.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptStringParameter +type DeviceHealthScriptStringParameter struct { + DeviceHealthScriptParameter + // The default value of string param + defaultValue *string +} +// NewDeviceHealthScriptStringParameter instantiates a new DeviceHealthScriptStringParameter and sets the default values. +func NewDeviceHealthScriptStringParameter()(*DeviceHealthScriptStringParameter) { + m := &DeviceHealthScriptStringParameter{ + DeviceHealthScriptParameter: *NewDeviceHealthScriptParameter(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptStringParameter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptStringParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptStringParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceHealthScriptStringParameter(), nil +} +// GetDefaultValue gets the defaultValue property value. The default value of string param +func (m *DeviceHealthScriptStringParameter) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptStringParameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptParameter.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptStringParameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptParameter.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. The default value of string param +func (m *DeviceHealthScriptStringParameter) SetDefaultValue(value *string)() { + m.defaultValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_string_parameterable.go b/src/internal/connector/graph/betasdk/models/device_health_script_string_parameterable.go new file mode 100644 index 000000000..d30dce4c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_string_parameterable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptStringParameterable +type DeviceHealthScriptStringParameterable interface { + DeviceHealthScriptParameterable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*string) + SetDefaultValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_time_schedule.go b/src/internal/connector/graph/betasdk/models/device_health_script_time_schedule.go new file mode 100644 index 000000000..03af66a54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_time_schedule.go @@ -0,0 +1,108 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptTimeSchedule +type DeviceHealthScriptTimeSchedule struct { + DeviceHealthScriptRunSchedule + // At what time the script is scheduled to run. This collection can contain a maximum of 20 elements. + time *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // Indicate if the time is Utc or client local time. + useUtc *bool +} +// NewDeviceHealthScriptTimeSchedule instantiates a new DeviceHealthScriptTimeSchedule and sets the default values. +func NewDeviceHealthScriptTimeSchedule()(*DeviceHealthScriptTimeSchedule) { + m := &DeviceHealthScriptTimeSchedule{ + DeviceHealthScriptRunSchedule: *NewDeviceHealthScriptRunSchedule(), + } + odataTypeValue := "#microsoft.graph.deviceHealthScriptTimeSchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceHealthScriptTimeScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceHealthScriptTimeScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceHealthScriptDailySchedule": + return NewDeviceHealthScriptDailySchedule(), nil + case "#microsoft.graph.deviceHealthScriptRunOnceSchedule": + return NewDeviceHealthScriptRunOnceSchedule(), nil + } + } + } + } + return NewDeviceHealthScriptTimeSchedule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceHealthScriptTimeSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceHealthScriptRunSchedule.GetFieldDeserializers() + res["time"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetTime(val) + } + return nil + } + res["useUtc"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseUtc(val) + } + return nil + } + return res +} +// GetTime gets the time property value. At what time the script is scheduled to run. This collection can contain a maximum of 20 elements. +func (m *DeviceHealthScriptTimeSchedule) GetTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.time +} +// GetUseUtc gets the useUtc property value. Indicate if the time is Utc or client local time. +func (m *DeviceHealthScriptTimeSchedule) GetUseUtc()(*bool) { + return m.useUtc +} +// Serialize serializes information the current object +func (m *DeviceHealthScriptTimeSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceHealthScriptRunSchedule.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeOnlyValue("time", m.GetTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useUtc", m.GetUseUtc()) + if err != nil { + return err + } + } + return nil +} +// SetTime sets the time property value. At what time the script is scheduled to run. This collection can contain a maximum of 20 elements. +func (m *DeviceHealthScriptTimeSchedule) SetTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.time = value +} +// SetUseUtc sets the useUtc property value. Indicate if the time is Utc or client local time. +func (m *DeviceHealthScriptTimeSchedule) SetUseUtc(value *bool)() { + m.useUtc = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_script_time_scheduleable.go b/src/internal/connector/graph/betasdk/models/device_health_script_time_scheduleable.go new file mode 100644 index 000000000..6b3f2d1d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_script_time_scheduleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptTimeScheduleable +type DeviceHealthScriptTimeScheduleable interface { + DeviceHealthScriptRunScheduleable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetUseUtc()(*bool) + SetTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetUseUtc(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_health_scriptable.go b/src/internal/connector/graph/betasdk/models/device_health_scriptable.go new file mode 100644 index 000000000..9850fcc83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_health_scriptable.go @@ -0,0 +1,50 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthScriptable +type DeviceHealthScriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceHealthScriptAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDetectionScriptContent()([]byte) + GetDetectionScriptParameters()([]DeviceHealthScriptParameterable) + GetDeviceRunStates()([]DeviceHealthScriptDeviceStateable) + GetDisplayName()(*string) + GetEnforceSignatureCheck()(*bool) + GetHighestAvailableVersion()(*string) + GetIsGlobalScript()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublisher()(*string) + GetRemediationScriptContent()([]byte) + GetRemediationScriptParameters()([]DeviceHealthScriptParameterable) + GetRoleScopeTagIds()([]string) + GetRunAs32Bit()(*bool) + GetRunAsAccount()(*RunAsAccountType) + GetRunSummary()(DeviceHealthScriptRunSummaryable) + GetVersion()(*string) + SetAssignments(value []DeviceHealthScriptAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDetectionScriptContent(value []byte)() + SetDetectionScriptParameters(value []DeviceHealthScriptParameterable)() + SetDeviceRunStates(value []DeviceHealthScriptDeviceStateable)() + SetDisplayName(value *string)() + SetEnforceSignatureCheck(value *bool)() + SetHighestAvailableVersion(value *string)() + SetIsGlobalScript(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublisher(value *string)() + SetRemediationScriptContent(value []byte)() + SetRemediationScriptParameters(value []DeviceHealthScriptParameterable)() + SetRoleScopeTagIds(value []string)() + SetRunAs32Bit(value *bool)() + SetRunAsAccount(value *RunAsAccountType)() + SetRunSummary(value DeviceHealthScriptRunSummaryable)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_healthable.go b/src/internal/connector/graph/betasdk/models/device_healthable.go new file mode 100644 index 000000000..1b986db2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_healthable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceHealthable +type DeviceHealthable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastConnectionTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetLastConnectionTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_install_state.go b/src/internal/connector/graph/betasdk/models/device_install_state.go new file mode 100644 index 000000000..e14e506f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_install_state.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInstallState contains properties for the installation state for a device. +type DeviceInstallState struct { + Entity + // Device Id. + deviceId *string + // Device name. + deviceName *string + // The error code for install failures. + errorCode *string + // Possible values for install state. + installState *InstallState + // Last sync date and time. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // OS Description. + osDescription *string + // OS Version. + osVersion *string + // Device User Name. + userName *string +} +// NewDeviceInstallState instantiates a new deviceInstallState and sets the default values. +func NewDeviceInstallState()(*DeviceInstallState) { + m := &DeviceInstallState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceInstallStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceInstallStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceInstallState(), nil +} +// GetDeviceId gets the deviceId property value. Device Id. +func (m *DeviceInstallState) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceName gets the deviceName property value. Device name. +func (m *DeviceInstallState) GetDeviceName()(*string) { + return m.deviceName +} +// GetErrorCode gets the errorCode property value. The error code for install failures. +func (m *DeviceInstallState) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceInstallState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["installState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallState) + if err != nil { + return err + } + if val != nil { + m.SetInstallState(val.(*InstallState)) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["osDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsDescription(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetInstallState gets the installState property value. Possible values for install state. +func (m *DeviceInstallState) GetInstallState()(*InstallState) { + return m.installState +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Last sync date and time. +func (m *DeviceInstallState) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetOsDescription gets the osDescription property value. OS Description. +func (m *DeviceInstallState) GetOsDescription()(*string) { + return m.osDescription +} +// GetOsVersion gets the osVersion property value. OS Version. +func (m *DeviceInstallState) GetOsVersion()(*string) { + return m.osVersion +} +// GetUserName gets the userName property value. Device User Name. +func (m *DeviceInstallState) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *DeviceInstallState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + if m.GetInstallState() != nil { + cast := (*m.GetInstallState()).String() + err = writer.WriteStringValue("installState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osDescription", m.GetOsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceId sets the deviceId property value. Device Id. +func (m *DeviceInstallState) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceName sets the deviceName property value. Device name. +func (m *DeviceInstallState) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetErrorCode sets the errorCode property value. The error code for install failures. +func (m *DeviceInstallState) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetInstallState sets the installState property value. Possible values for install state. +func (m *DeviceInstallState) SetInstallState(value *InstallState)() { + m.installState = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Last sync date and time. +func (m *DeviceInstallState) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetOsDescription sets the osDescription property value. OS Description. +func (m *DeviceInstallState) SetOsDescription(value *string)() { + m.osDescription = value +} +// SetOsVersion sets the osVersion property value. OS Version. +func (m *DeviceInstallState) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetUserName sets the userName property value. Device User Name. +func (m *DeviceInstallState) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_install_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_install_state_collection_response.go new file mode 100644 index 000000000..5f41fd941 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_install_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInstallStateCollectionResponse +type DeviceInstallStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceInstallStateable +} +// NewDeviceInstallStateCollectionResponse instantiates a new DeviceInstallStateCollectionResponse and sets the default values. +func NewDeviceInstallStateCollectionResponse()(*DeviceInstallStateCollectionResponse) { + m := &DeviceInstallStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceInstallStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceInstallStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceInstallStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceInstallStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceInstallStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceInstallStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceInstallStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceInstallStateCollectionResponse) GetValue()([]DeviceInstallStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceInstallStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceInstallStateCollectionResponse) SetValue(value []DeviceInstallStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_install_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_install_state_collection_responseable.go new file mode 100644 index 000000000..761d0fa6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_install_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInstallStateCollectionResponseable +type DeviceInstallStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceInstallStateable) + SetValue(value []DeviceInstallStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_install_stateable.go b/src/internal/connector/graph/betasdk/models/device_install_stateable.go new file mode 100644 index 000000000..bd76f62d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_install_stateable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceInstallStateable +type DeviceInstallStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceId()(*string) + GetDeviceName()(*string) + GetErrorCode()(*string) + GetInstallState()(*InstallState) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOsDescription()(*string) + GetOsVersion()(*string) + GetUserName()(*string) + SetDeviceId(value *string)() + SetDeviceName(value *string)() + SetErrorCode(value *string)() + SetInstallState(value *InstallState)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOsDescription(value *string)() + SetOsVersion(value *string)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_key.go b/src/internal/connector/graph/betasdk/models/device_key.go new file mode 100644 index 000000000..1bf2213ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_key.go @@ -0,0 +1,150 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceKey +type DeviceKey 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 deviceId property + deviceId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The keyMaterial property + keyMaterial []byte + // The keyType property + keyType *string + // The OdataType property + odataType *string +} +// NewDeviceKey instantiates a new deviceKey and sets the default values. +func NewDeviceKey()(*DeviceKey) { + m := &DeviceKey{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceKeyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceKeyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceKey(), 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 *DeviceKey) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceId gets the deviceId property value. The deviceId property +func (m *DeviceKey) GetDeviceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.deviceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceKey) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["keyMaterial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyMaterial(val) + } + return nil + } + res["keyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyType(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 + } + return res +} +// GetKeyMaterial gets the keyMaterial property value. The keyMaterial property +func (m *DeviceKey) GetKeyMaterial()([]byte) { + return m.keyMaterial +} +// GetKeyType gets the keyType property value. The keyType property +func (m *DeviceKey) GetKeyType()(*string) { + return m.keyType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceKey) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceKey) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteUUIDValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("keyMaterial", m.GetKeyMaterial()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("keyType", m.GetKeyType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceKey) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceId sets the deviceId property value. The deviceId property +func (m *DeviceKey) SetDeviceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.deviceId = value +} +// SetKeyMaterial sets the keyMaterial property value. The keyMaterial property +func (m *DeviceKey) SetKeyMaterial(value []byte)() { + m.keyMaterial = value +} +// SetKeyType sets the keyType property value. The keyType property +func (m *DeviceKey) SetKeyType(value *string)() { + m.keyType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceKey) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_key_collection_response.go b/src/internal/connector/graph/betasdk/models/device_key_collection_response.go new file mode 100644 index 000000000..6d6e84bfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_key_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceKeyCollectionResponse +type DeviceKeyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceKeyable +} +// NewDeviceKeyCollectionResponse instantiates a new DeviceKeyCollectionResponse and sets the default values. +func NewDeviceKeyCollectionResponse()(*DeviceKeyCollectionResponse) { + m := &DeviceKeyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceKeyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceKeyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceKeyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceKeyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceKeyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceKeyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceKeyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceKeyCollectionResponse) GetValue()([]DeviceKeyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceKeyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceKeyCollectionResponse) SetValue(value []DeviceKeyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_key_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_key_collection_responseable.go new file mode 100644 index 000000000..a84c09365 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_key_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceKeyCollectionResponseable +type DeviceKeyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceKeyable) + SetValue(value []DeviceKeyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_keyable.go b/src/internal/connector/graph/betasdk/models/device_keyable.go new file mode 100644 index 000000000..c515f0747 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_keyable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceKeyable +type DeviceKeyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetKeyMaterial()([]byte) + GetKeyType()(*string) + GetOdataType()(*string) + SetDeviceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetKeyMaterial(value []byte)() + SetKeyType(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_licensing_status.go b/src/internal/connector/graph/betasdk/models/device_licensing_status.go new file mode 100644 index 000000000..7b1940345 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_licensing_status.go @@ -0,0 +1,92 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceLicensingStatus int + +const ( + // Default. Set to unknown when status cannot be determined. + UNKNOWN_DEVICELICENSINGSTATUS DeviceLicensingStatus = iota + // This status is set when the license refresh is started. + LICENSEREFRESHSTARTED_DEVICELICENSINGSTATUS + // This status is set when the license refresh is pending. + LICENSEREFRESHPENDING_DEVICELICENSINGSTATUS + // This status is set when the device is not joined to Azure Active Directory. + DEVICEISNOTAZUREACTIVEDIRECTORYJOINED_DEVICELICENSINGSTATUS + // This status is set when the Microsoft device identity is being verified. + VERIFYINGMICROSOFTDEVICEIDENTITY_DEVICELICENSINGSTATUS + // This status is set when the Microsoft device identity verification fails. + DEVICEIDENTITYVERIFICATIONFAILED_DEVICELICENSINGSTATUS + // This status is set when the Microsoft account identity is being verified. + VERIFYINGMIROSOFTACCOUNTIDENTITY_DEVICELICENSINGSTATUS + // This status is set when the Microsoft account identity verification fails. + MIROSOFTACCOUNTVERIFICATIONFAILED_DEVICELICENSINGSTATUS + // This status is set when the device license is being acquired. + ACQUIRINGDEVICELICENSE_DEVICELICENSINGSTATUS + // This status is set when the device license is being refreshed. + REFRESHINGDEVICELICENSE_DEVICELICENSINGSTATUS + // This status is set when the device license refresh succeeds. + DEVICELICENSEREFRESHSUCCEED_DEVICELICENSINGSTATUS + // This status is set when the device license refresh fails. + DEVICELICENSEREFRESHFAILED_DEVICELICENSINGSTATUS + // This status is set when the device license is being removed. + REMOVINGDEVICELICENSE_DEVICELICENSINGSTATUS + // This status is set when the device license removing succeeds. + DEVICELICENSEREMOVESUCCEED_DEVICELICENSINGSTATUS + // This status is set when the device license removing fails. + DEVICELICENSEREMOVEFAILED_DEVICELICENSINGSTATUS + // This is put here as a place holder for future extension. + UNKNOWNFUTUREVALUE_DEVICELICENSINGSTATUS +) + +func (i DeviceLicensingStatus) String() string { + return []string{"unknown", "licenseRefreshStarted", "licenseRefreshPending", "deviceIsNotAzureActiveDirectoryJoined", "verifyingMicrosoftDeviceIdentity", "deviceIdentityVerificationFailed", "verifyingMirosoftAccountIdentity", "mirosoftAccountVerificationFailed", "acquiringDeviceLicense", "refreshingDeviceLicense", "deviceLicenseRefreshSucceed", "deviceLicenseRefreshFailed", "removingDeviceLicense", "deviceLicenseRemoveSucceed", "deviceLicenseRemoveFailed", "unknownFutureValue"}[i] +} +func ParseDeviceLicensingStatus(v string) (interface{}, error) { + result := UNKNOWN_DEVICELICENSINGSTATUS + switch v { + case "unknown": + result = UNKNOWN_DEVICELICENSINGSTATUS + case "licenseRefreshStarted": + result = LICENSEREFRESHSTARTED_DEVICELICENSINGSTATUS + case "licenseRefreshPending": + result = LICENSEREFRESHPENDING_DEVICELICENSINGSTATUS + case "deviceIsNotAzureActiveDirectoryJoined": + result = DEVICEISNOTAZUREACTIVEDIRECTORYJOINED_DEVICELICENSINGSTATUS + case "verifyingMicrosoftDeviceIdentity": + result = VERIFYINGMICROSOFTDEVICEIDENTITY_DEVICELICENSINGSTATUS + case "deviceIdentityVerificationFailed": + result = DEVICEIDENTITYVERIFICATIONFAILED_DEVICELICENSINGSTATUS + case "verifyingMirosoftAccountIdentity": + result = VERIFYINGMIROSOFTACCOUNTIDENTITY_DEVICELICENSINGSTATUS + case "mirosoftAccountVerificationFailed": + result = MIROSOFTACCOUNTVERIFICATIONFAILED_DEVICELICENSINGSTATUS + case "acquiringDeviceLicense": + result = ACQUIRINGDEVICELICENSE_DEVICELICENSINGSTATUS + case "refreshingDeviceLicense": + result = REFRESHINGDEVICELICENSE_DEVICELICENSINGSTATUS + case "deviceLicenseRefreshSucceed": + result = DEVICELICENSEREFRESHSUCCEED_DEVICELICENSINGSTATUS + case "deviceLicenseRefreshFailed": + result = DEVICELICENSEREFRESHFAILED_DEVICELICENSINGSTATUS + case "removingDeviceLicense": + result = REMOVINGDEVICELICENSE_DEVICELICENSINGSTATUS + case "deviceLicenseRemoveSucceed": + result = DEVICELICENSEREMOVESUCCEED_DEVICELICENSINGSTATUS + case "deviceLicenseRemoveFailed": + result = DEVICELICENSEREMOVEFAILED_DEVICELICENSINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICELICENSINGSTATUS + default: + return 0, errors.New("Unknown DeviceLicensingStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceLicensingStatus(values []DeviceLicensingStatus) []string { + 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/device_log_collection_response.go b/src/internal/connector/graph/betasdk/models/device_log_collection_response.go new file mode 100644 index 000000000..1d0f4ffcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_log_collection_response.go @@ -0,0 +1,270 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceLogCollectionResponse windows Log Collection request entity. +type DeviceLogCollectionResponse struct { + Entity + // The User Principal Name (UPN) of the user that enrolled the device + enrolledByUser *string + // The error code, if any. Valid values -9.22337203685478E+18 to 9.22337203685478E+18 + errorCode *int64 + // The DateTime of the expiration of the logs + expirationDateTimeUTC *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The UPN for who initiated the request + initiatedByUserPrincipalName *string + // The device Id + managedDeviceId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The DateTime the request was received + receivedDateTimeUTC *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The DateTime of the request + requestedDateTimeUTC *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The size of the logs. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 + size *float64 + // The status of the log collection request + status *string +} +// NewDeviceLogCollectionResponse instantiates a new deviceLogCollectionResponse and sets the default values. +func NewDeviceLogCollectionResponse()(*DeviceLogCollectionResponse) { + m := &DeviceLogCollectionResponse{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceLogCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceLogCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceLogCollectionResponse(), nil +} +// GetEnrolledByUser gets the enrolledByUser property value. The User Principal Name (UPN) of the user that enrolled the device +func (m *DeviceLogCollectionResponse) GetEnrolledByUser()(*string) { + return m.enrolledByUser +} +// GetErrorCode gets the errorCode property value. The error code, if any. Valid values -9.22337203685478E+18 to 9.22337203685478E+18 +func (m *DeviceLogCollectionResponse) GetErrorCode()(*int64) { + return m.errorCode +} +// GetExpirationDateTimeUTC gets the expirationDateTimeUTC property value. The DateTime of the expiration of the logs +func (m *DeviceLogCollectionResponse) GetExpirationDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTimeUTC +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceLogCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["enrolledByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledByUser(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["expirationDateTimeUTC"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTimeUTC(val) + } + return nil + } + res["initiatedByUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedByUserPrincipalName(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["receivedDateTimeUTC"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTimeUTC(val) + } + return nil + } + res["requestedDateTimeUTC"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedDateTimeUTC(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetInitiatedByUserPrincipalName gets the initiatedByUserPrincipalName property value. The UPN for who initiated the request +func (m *DeviceLogCollectionResponse) GetInitiatedByUserPrincipalName()(*string) { + return m.initiatedByUserPrincipalName +} +// GetManagedDeviceId gets the managedDeviceId property value. The device Id +func (m *DeviceLogCollectionResponse) GetManagedDeviceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.managedDeviceId +} +// GetReceivedDateTimeUTC gets the receivedDateTimeUTC property value. The DateTime the request was received +func (m *DeviceLogCollectionResponse) GetReceivedDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTimeUTC +} +// GetRequestedDateTimeUTC gets the requestedDateTimeUTC property value. The DateTime of the request +func (m *DeviceLogCollectionResponse) GetRequestedDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestedDateTimeUTC +} +// GetSize gets the size property value. The size of the logs. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 +func (m *DeviceLogCollectionResponse) GetSize()(*float64) { + return m.size +} +// GetStatus gets the status property value. The status of the log collection request +func (m *DeviceLogCollectionResponse) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *DeviceLogCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("enrolledByUser", m.GetEnrolledByUser()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTimeUTC", m.GetExpirationDateTimeUTC()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedByUserPrincipalName", m.GetInitiatedByUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTimeUTC", m.GetReceivedDateTimeUTC()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestedDateTimeUTC", m.GetRequestedDateTimeUTC()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetEnrolledByUser sets the enrolledByUser property value. The User Principal Name (UPN) of the user that enrolled the device +func (m *DeviceLogCollectionResponse) SetEnrolledByUser(value *string)() { + m.enrolledByUser = value +} +// SetErrorCode sets the errorCode property value. The error code, if any. Valid values -9.22337203685478E+18 to 9.22337203685478E+18 +func (m *DeviceLogCollectionResponse) SetErrorCode(value *int64)() { + m.errorCode = value +} +// SetExpirationDateTimeUTC sets the expirationDateTimeUTC property value. The DateTime of the expiration of the logs +func (m *DeviceLogCollectionResponse) SetExpirationDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTimeUTC = value +} +// SetInitiatedByUserPrincipalName sets the initiatedByUserPrincipalName property value. The UPN for who initiated the request +func (m *DeviceLogCollectionResponse) SetInitiatedByUserPrincipalName(value *string)() { + m.initiatedByUserPrincipalName = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The device Id +func (m *DeviceLogCollectionResponse) SetManagedDeviceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.managedDeviceId = value +} +// SetReceivedDateTimeUTC sets the receivedDateTimeUTC property value. The DateTime the request was received +func (m *DeviceLogCollectionResponse) SetReceivedDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTimeUTC = value +} +// SetRequestedDateTimeUTC sets the requestedDateTimeUTC property value. The DateTime of the request +func (m *DeviceLogCollectionResponse) SetRequestedDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestedDateTimeUTC = value +} +// SetSize sets the size property value. The size of the logs. Valid values -1.79769313486232E+308 to 1.79769313486232E+308 +func (m *DeviceLogCollectionResponse) SetSize(value *float64)() { + m.size = value +} +// SetStatus sets the status property value. The status of the log collection request +func (m *DeviceLogCollectionResponse) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_response.go b/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_response.go new file mode 100644 index 000000000..d013ac1b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceLogCollectionResponseCollectionResponse +type DeviceLogCollectionResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceLogCollectionResponseable +} +// NewDeviceLogCollectionResponseCollectionResponse instantiates a new DeviceLogCollectionResponseCollectionResponse and sets the default values. +func NewDeviceLogCollectionResponseCollectionResponse()(*DeviceLogCollectionResponseCollectionResponse) { + m := &DeviceLogCollectionResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceLogCollectionResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceLogCollectionResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceLogCollectionResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceLogCollectionResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceLogCollectionResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceLogCollectionResponseable, len(val)) + for i, v := range val { + res[i] = v.(DeviceLogCollectionResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceLogCollectionResponseCollectionResponse) GetValue()([]DeviceLogCollectionResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceLogCollectionResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceLogCollectionResponseCollectionResponse) SetValue(value []DeviceLogCollectionResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_responseable.go new file mode 100644 index 000000000..ac6fd587e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_log_collection_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceLogCollectionResponseCollectionResponseable +type DeviceLogCollectionResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceLogCollectionResponseable) + SetValue(value []DeviceLogCollectionResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_log_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_log_collection_responseable.go new file mode 100644 index 000000000..3fce8c6ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_log_collection_responseable.go @@ -0,0 +1,31 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceLogCollectionResponseable +type DeviceLogCollectionResponseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnrolledByUser()(*string) + GetErrorCode()(*int64) + GetExpirationDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInitiatedByUserPrincipalName()(*string) + GetManagedDeviceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetReceivedDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRequestedDateTimeUTC()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSize()(*float64) + GetStatus()(*string) + SetEnrolledByUser(value *string)() + SetErrorCode(value *int64)() + SetExpirationDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInitiatedByUserPrincipalName(value *string)() + SetManagedDeviceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetReceivedDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRequestedDateTimeUTC(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSize(value *float64)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management.go b/src/internal/connector/graph/betasdk/models/device_management.go new file mode 100644 index 000000000..6789c866a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management.go @@ -0,0 +1,5636 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagement +type DeviceManagement struct { + Entity + // The date & time when tenant data moved between scaleunits. + accountMoveCompletionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin consent information. + adminConsent AdminConsentable + // The summary state of ATP onboarding state for this account. + advancedThreatProtectionOnboardingStateSummary AdvancedThreatProtectionOnboardingStateSummaryable + // Android device owner enrollment profile entities. + androidDeviceOwnerEnrollmentProfiles []AndroidDeviceOwnerEnrollmentProfileable + // Android for Work app configuration schema entities. + androidForWorkAppConfigurationSchemas []AndroidForWorkAppConfigurationSchemaable + // Android for Work enrollment profile entities. + androidForWorkEnrollmentProfiles []AndroidForWorkEnrollmentProfileable + // The singleton Android for Work settings entity. + androidForWorkSettings AndroidForWorkSettingsable + // The singleton Android managed store account enterprise settings entity. + androidManagedStoreAccountEnterpriseSettings AndroidManagedStoreAccountEnterpriseSettingsable + // Android Enterprise app configuration schema entities. + androidManagedStoreAppConfigurationSchemas []AndroidManagedStoreAppConfigurationSchemaable + // Apple push notification certificate. + applePushNotificationCertificate ApplePushNotificationCertificateable + // Apple user initiated enrollment profiles + appleUserInitiatedEnrollmentProfiles []AppleUserInitiatedEnrollmentProfileable + // The list of assignment filters + assignmentFilters []DeviceAndAppManagementAssignmentFilterable + // The Audit Events + auditEvents []AuditEventable + // The list of autopilot events for the tenant. + autopilotEvents []DeviceManagementAutopilotEventable + // The Cart To Class Associations. + cartToClassAssociations []CartToClassAssociationable + // The available categories + categories []DeviceManagementSettingCategoryable + // Collection of certificate connector details, each associated with a corresponding Intune Certificate Connector. + certificateConnectorDetails []CertificateConnectorDetailsable + // Collection of ChromeOSOnboardingSettings settings associated with account. + chromeOSOnboardingSettings []ChromeOSOnboardingSettingsable + // The list of CloudPC Connectivity Issue. + cloudPCConnectivityIssues []CloudPCConnectivityIssueable + // The list of co-managed devices report + comanagedDevices []ManagedDeviceable + // The list of co-management eligible devices report + comanagementEligibleDevices []ComanagementEligibleDeviceable + // List of all compliance categories + complianceCategories []DeviceManagementConfigurationCategoryable + // The list of Compliance Management Partners configured by the tenant. + complianceManagementPartners []ComplianceManagementPartnerable + // List of all compliance policies + compliancePolicies []DeviceManagementCompliancePolicyable + // List of all ComplianceSettings + complianceSettings []DeviceManagementConfigurationSettingDefinitionable + // The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access + conditionalAccessSettings OnPremisesConditionalAccessSettingsable + // A list of ConfigManagerCollection + configManagerCollections []ConfigManagerCollectionable + // List of all Configuration Categories + configurationCategories []DeviceManagementConfigurationCategoryable + // List of all Configuration policies + configurationPolicies []DeviceManagementConfigurationPolicyable + // List of all templates + configurationPolicyTemplates []DeviceManagementConfigurationPolicyTemplateable + // List of all ConfigurationSettings + configurationSettings []DeviceManagementConfigurationSettingDefinitionable + // A configuration entity for MEM features that utilize Data Processor Service for Windows (DPSW) data. + dataProcessorServiceForWindowsFeaturesOnboarding DataProcessorServiceForWindowsFeaturesOnboardingable + // Data sharing consents. + dataSharingConsents []DataSharingConsentable + // This collections of multiple DEP tokens per-tenant. + depOnboardingSettings []DepOnboardingSettingable + // Collection of Derived credential settings associated with account. + derivedCredentials []DeviceManagementDerivedCredentialSettingsable + // The list of detected apps associated with a device. + detectedApps []DetectedAppable + // The list of device categories with the tenant. + deviceCategories []DeviceCategoryable + // The device compliance policies. + deviceCompliancePolicies []DeviceCompliancePolicyable + // The device compliance state summary for this account. + deviceCompliancePolicyDeviceStateSummary DeviceCompliancePolicyDeviceStateSummaryable + // The summary states of compliance policy settings for this account. + deviceCompliancePolicySettingStateSummaries []DeviceCompliancePolicySettingStateSummaryable + // The last requested time of device compliance reporting for this account. This property is read-only. + deviceComplianceReportSummarizationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The list of device compliance scripts associated with the tenant. + deviceComplianceScripts []DeviceComplianceScriptable + // Summary of policies in conflict state for this account. + deviceConfigurationConflictSummary []DeviceConfigurationConflictSummaryable + // The device configuration device state summary for this account. + deviceConfigurationDeviceStateSummaries DeviceConfigurationDeviceStateSummaryable + // Restricted apps violations for this account. + deviceConfigurationRestrictedAppsViolations []RestrictedAppsViolationable + // The device configurations. + deviceConfigurations []DeviceConfigurationable + // Summary of all certificates for all devices. + deviceConfigurationsAllManagedDeviceCertificateStates []ManagedAllDeviceCertificateStateable + // The device configuration user state summary for this account. + deviceConfigurationUserStateSummaries DeviceConfigurationUserStateSummaryable + // The list of device custom attribute shell scripts associated with the tenant. + deviceCustomAttributeShellScripts []DeviceCustomAttributeShellScriptable + // The list of device enrollment configurations + deviceEnrollmentConfigurations []DeviceEnrollmentConfigurationable + // The list of device health scripts associated with the tenant. + deviceHealthScripts []DeviceHealthScriptable + // The list of Device Management Partners configured by the tenant. + deviceManagementPartners []DeviceManagementPartnerable + // The list of device management scripts associated with the tenant. + deviceManagementScripts []DeviceManagementScriptable + // Device protection overview. + deviceProtectionOverview DeviceProtectionOverviewable + // The list of device shell scripts associated with the tenant. + deviceShellScripts []DeviceShellScriptable + // A list of connector objects. + domainJoinConnectors []DeviceManagementDomainJoinConnectorable + // The embedded SIM activation code pools created by this account. + embeddedSIMActivationCodePools []EmbeddedSIMActivationCodePoolable + // The list of Exchange Connectors configured by the tenant. + exchangeConnectors []DeviceManagementExchangeConnectorable + // The list of Exchange On Premisis policies configured by the tenant. + exchangeOnPremisesPolicies []DeviceManagementExchangeOnPremisesPolicyable + // The policy which controls mobile device access to Exchange On Premises + exchangeOnPremisesPolicy DeviceManagementExchangeOnPremisesPolicyable + // The available group policy categories for this account. + groupPolicyCategories []GroupPolicyCategoryable + // The group policy configurations created by this account. + groupPolicyConfigurations []GroupPolicyConfigurationable + // The available group policy definition files for this account. + groupPolicyDefinitionFiles []GroupPolicyDefinitionFileable + // The available group policy definitions for this account. + groupPolicyDefinitions []GroupPolicyDefinitionable + // A list of Group Policy migration reports. + groupPolicyMigrationReports []GroupPolicyMigrationReportable + // A list of Group Policy Object files uploaded. + groupPolicyObjectFiles []GroupPolicyObjectFileable + // The available group policy uploaded definition files for this account. + groupPolicyUploadedDefinitionFiles []GroupPolicyUploadedDefinitionFileable + // The imported device identities. + importedDeviceIdentities []ImportedDeviceIdentityable + // Collection of imported Windows autopilot devices. + importedWindowsAutopilotDeviceIdentities []ImportedWindowsAutopilotDeviceIdentityable + // The device management intents + intents []DeviceManagementIntentable + // Intune Account ID for given tenant + intuneAccountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // intuneBrand contains data which is used in customizing the appearance of the Company Portal applications as well as the end user web portal. + intuneBrand IntuneBrandable + // Intune branding profiles targeted to AAD groups + intuneBrandingProfiles []IntuneBrandingProfileable + // The IOS software update installation statuses for this account. + iosUpdateStatuses []IosUpdateDeviceStatusable + // The last modified time of reporting for this account. This property is read-only. + lastReportAggregationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The property to enable Non-MDM managed legacy PC management for this account. This property is read-only. + legacyPcManangementEnabled *bool + // The MacOS software update account summaries for this account. + macOSSoftwareUpdateAccountSummaries []MacOSSoftwareUpdateAccountSummaryable + // Device cleanup rule + managedDeviceCleanupSettings ManagedDeviceCleanupSettingsable + // Encryption report for devices in this account + managedDeviceEncryptionStates []ManagedDeviceEncryptionStateable + // Device overview + managedDeviceOverview ManagedDeviceOverviewable + // The list of managed devices. + managedDevices []ManagedDeviceable + // Maximum number of DEP tokens allowed per-tenant. + maximumDepTokens *int32 + // Collection of MicrosoftTunnelConfiguration settings associated with account. + microsoftTunnelConfigurations []MicrosoftTunnelConfigurationable + // Collection of MicrosoftTunnelHealthThreshold settings associated with account. + microsoftTunnelHealthThresholds []MicrosoftTunnelHealthThresholdable + // Collection of MicrosoftTunnelServerLogCollectionResponse settings associated with account. + microsoftTunnelServerLogCollectionResponses []MicrosoftTunnelServerLogCollectionResponseable + // Collection of MicrosoftTunnelSite settings associated with account. + microsoftTunnelSites []MicrosoftTunnelSiteable + // The collection property of MobileAppTroubleshootingEvent. + mobileAppTroubleshootingEvents []MobileAppTroubleshootingEventable + // The list of Mobile threat Defense connectors configured by the tenant. + mobileThreatDefenseConnectors []MobileThreatDefenseConnectorable + // The collection of Ndes connectors for this account. + ndesConnectors []NdesConnectorable + // The Notification Message Templates. + notificationMessageTemplates []NotificationMessageTemplateable + // List of OEM Warranty Statuses + oemWarrantyInformationOnboarding []OemWarrantyInformationOnboardingable + // The list of device remote action audits with the tenant. + remoteActionAudits []RemoteActionAuditable + // The remote assist partners. + remoteAssistancePartners []RemoteAssistancePartnerable + // The remote assistance settings singleton + remoteAssistanceSettings RemoteAssistanceSettingsable + // Reports singleton + reports DeviceManagementReportsable + // Collection of resource access settings associated with account. + resourceAccessProfiles []DeviceManagementResourceAccessProfileBaseable + // The Resource Operations. + resourceOperations []ResourceOperationable + // List of all reusable settings that can be referred in a policy + reusablePolicySettings []DeviceManagementReusablePolicySettingable + // List of all reusable settings + reusableSettings []DeviceManagementConfigurationSettingDefinitionable + // The Role Assignments. + roleAssignments []DeviceAndAppManagementRoleAssignmentable + // The Role Definitions. + roleDefinitions []RoleDefinitionable + // The Role Scope Tags. + roleScopeTags []RoleScopeTagable + // The device management intent setting definitions + settingDefinitions []DeviceManagementSettingDefinitionable + // Account level settings. + settings DeviceManagementSettingsable + // The software update status summary. + softwareUpdateStatusSummary SoftwareUpdateStatusSummaryable + // Tenant mobile device management subscriptions. + subscriptions *DeviceManagementSubscriptions + // Tenant mobile device management subscription state. + subscriptionState *DeviceManagementSubscriptionState + // The telecom expense management partners. + telecomExpenseManagementPartners []TelecomExpenseManagementPartnerable + // The available templates + templates []DeviceManagementTemplateable + // List of all TemplateSettings + templateSettings []DeviceManagementConfigurationSettingTemplateable + // TenantAttach RBAC Enablement + tenantAttachRBAC TenantAttachRBACable + // The terms and conditions associated with device management of the company. + termsAndConditions []TermsAndConditionsable + // The list of troubleshooting events for the tenant. + troubleshootingEvents []DeviceManagementTroubleshootingEventable + // When enabled, users assigned as administrators via Role Assignment Memberships do not require an assigned Intune license. Prior to this, only Intune licensed users were granted permissions with an Intune role unless they were assigned a role via Azure Active Directory. You are limited to 350 unlicensed direct members for each AAD security group in a role assignment, but you can assign multiple AAD security groups to a role if you need to support more than 350 unlicensed administrators. Licensed administrators are unaffected, do not have to be direct members, nor does the 350 member limit apply. This property is read-only. + unlicensedAdminstratorsEnabled *bool + // The user experience analytics anomaly entity contains anomaly details. + userExperienceAnalyticsAnomaly []UserExperienceAnalyticsAnomalyable + // The user experience analytics anomaly entity contains device details. + userExperienceAnalyticsAnomalyDevice []UserExperienceAnalyticsAnomalyDeviceable + // The user experience analytics anomaly severity overview entity contains the count information for each severity of anomaly. + userExperienceAnalyticsAnomalySeverityOverview UserExperienceAnalyticsAnomalySeverityOverviewable + // User experience analytics appHealth Application Performance + userExperienceAnalyticsAppHealthApplicationPerformance []UserExperienceAnalyticsAppHealthApplicationPerformanceable + // User experience analytics appHealth Application Performance by App Version + userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable + // User experience analytics appHealth Application Performance by App Version details + userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable + // User experience analytics appHealth Application Performance by App Version Device Id + userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable + // User experience analytics appHealth Application Performance by OS Version + userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion []UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable + // User experience analytics appHealth Model Performance + userExperienceAnalyticsAppHealthDeviceModelPerformance []UserExperienceAnalyticsAppHealthDeviceModelPerformanceable + // User experience analytics appHealth Device Performance + userExperienceAnalyticsAppHealthDevicePerformance []UserExperienceAnalyticsAppHealthDevicePerformanceable + // User experience analytics device performance details + userExperienceAnalyticsAppHealthDevicePerformanceDetails []UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable + // User experience analytics appHealth OS version Performance + userExperienceAnalyticsAppHealthOSVersionPerformance []UserExperienceAnalyticsAppHealthOSVersionPerformanceable + // User experience analytics appHealth overview + userExperienceAnalyticsAppHealthOverview UserExperienceAnalyticsCategoryable + // User experience analytics baselines + userExperienceAnalyticsBaselines []UserExperienceAnalyticsBaselineable + // User Experience Analytics Battery Health App Impact + userExperienceAnalyticsBatteryHealthAppImpact []UserExperienceAnalyticsBatteryHealthAppImpactable + // User Experience Analytics Battery Health Capacity Details + userExperienceAnalyticsBatteryHealthCapacityDetails UserExperienceAnalyticsBatteryHealthCapacityDetailsable + // User Experience Analytics Battery Health Device App Impact + userExperienceAnalyticsBatteryHealthDeviceAppImpact []UserExperienceAnalyticsBatteryHealthDeviceAppImpactable + // User Experience Analytics Battery Health Device Performance + userExperienceAnalyticsBatteryHealthDevicePerformance []UserExperienceAnalyticsBatteryHealthDevicePerformanceable + // User Experience Analytics Battery Health Device Runtime History + userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory []UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable + // User Experience Analytics Battery Health Model Performance + userExperienceAnalyticsBatteryHealthModelPerformance []UserExperienceAnalyticsBatteryHealthModelPerformanceable + // User Experience Analytics Battery Health Os Performance + userExperienceAnalyticsBatteryHealthOsPerformance []UserExperienceAnalyticsBatteryHealthOsPerformanceable + // User Experience Analytics Battery Health Runtime Details + userExperienceAnalyticsBatteryHealthRuntimeDetails UserExperienceAnalyticsBatteryHealthRuntimeDetailsable + // User experience analytics categories + userExperienceAnalyticsCategories []UserExperienceAnalyticsCategoryable + // User experience analytics device metric history + userExperienceAnalyticsDeviceMetricHistory []UserExperienceAnalyticsMetricHistoryable + // User experience analytics device performance + userExperienceAnalyticsDevicePerformance []UserExperienceAnalyticsDevicePerformanceable + // The user experience analytics device scope entity endpoint to trigger on the service to either START or STOP computing metrics data based on a device scope configuration. + userExperienceAnalyticsDeviceScope UserExperienceAnalyticsDeviceScopeable + // The user experience analytics device scope entity contains device scope configuration use to apply filtering on the endpoint analytics reports. + userExperienceAnalyticsDeviceScopes []UserExperienceAnalyticsDeviceScopeable + // User experience analytics device scores + userExperienceAnalyticsDeviceScores []UserExperienceAnalyticsDeviceScoresable + // User experience analytics device Startup History + userExperienceAnalyticsDeviceStartupHistory []UserExperienceAnalyticsDeviceStartupHistoryable + // User experience analytics device Startup Processes + userExperienceAnalyticsDeviceStartupProcesses []UserExperienceAnalyticsDeviceStartupProcessable + // User experience analytics device Startup Process Performance + userExperienceAnalyticsDeviceStartupProcessPerformance []UserExperienceAnalyticsDeviceStartupProcessPerformanceable + // User experience analytics devices without cloud identity. + userExperienceAnalyticsDevicesWithoutCloudIdentity []UserExperienceAnalyticsDeviceWithoutCloudIdentityable + // The user experience analytics device events entity contains NRT device timeline events details. + userExperienceAnalyticsDeviceTimelineEvents []UserExperienceAnalyticsDeviceTimelineEventsable + // User experience analytics impacting process + userExperienceAnalyticsImpactingProcess []UserExperienceAnalyticsImpactingProcessable + // User experience analytics metric history + userExperienceAnalyticsMetricHistory []UserExperienceAnalyticsMetricHistoryable + // User experience analytics model scores + userExperienceAnalyticsModelScores []UserExperienceAnalyticsModelScoresable + // User experience analytics devices not Windows Autopilot ready. + userExperienceAnalyticsNotAutopilotReadyDevice []UserExperienceAnalyticsNotAutopilotReadyDeviceable + // User experience analytics overview + userExperienceAnalyticsOverview UserExperienceAnalyticsOverviewable + // User experience analytics remote connection + userExperienceAnalyticsRemoteConnection []UserExperienceAnalyticsRemoteConnectionable + // User experience analytics resource performance + userExperienceAnalyticsResourcePerformance []UserExperienceAnalyticsResourcePerformanceable + // User experience analytics device Startup Score History + userExperienceAnalyticsScoreHistory []UserExperienceAnalyticsScoreHistoryable + // User experience analytics device settings + userExperienceAnalyticsSettings UserExperienceAnalyticsSettingsable + // User experience analytics work from anywhere hardware readiness metrics. + userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable + // User experience analytics work from anywhere metrics. + userExperienceAnalyticsWorkFromAnywhereMetrics []UserExperienceAnalyticsWorkFromAnywhereMetricable + // The user experience analytics work from anywhere model performance + userExperienceAnalyticsWorkFromAnywhereModelPerformance []UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable + // Collection of PFX certificates associated with a user. + userPfxCertificates []UserPFXCertificateable + // The virtualEndpoint property + virtualEndpoint VirtualEndpointable + // Windows auto pilot deployment profiles + windowsAutopilotDeploymentProfiles []WindowsAutopilotDeploymentProfileable + // The Windows autopilot device identities contained collection. + windowsAutopilotDeviceIdentities []WindowsAutopilotDeviceIdentityable + // The Windows autopilot account settings. + windowsAutopilotSettings WindowsAutopilotSettingsable + // A collection of windows driver update profiles + windowsDriverUpdateProfiles []WindowsDriverUpdateProfileable + // A collection of windows feature update profiles + windowsFeatureUpdateProfiles []WindowsFeatureUpdateProfileable + // The windows information protection app learning summaries. + windowsInformationProtectionAppLearningSummaries []WindowsInformationProtectionAppLearningSummaryable + // The windows information protection network learning summaries. + windowsInformationProtectionNetworkLearningSummaries []WindowsInformationProtectionNetworkLearningSummaryable + // The list of affected malware in the tenant. + windowsMalwareInformation []WindowsMalwareInformationable + // Malware overview for windows devices. + windowsMalwareOverview WindowsMalwareOverviewable + // A collection of windows quality update profiles + windowsQualityUpdateProfiles []WindowsQualityUpdateProfileable + // A collection of windows update catalog items (fetaure updates item , quality updates item) + windowsUpdateCatalogItems []WindowsUpdateCatalogItemable + // The Collection of ZebraFotaArtifacts. + zebraFotaArtifacts []ZebraFotaArtifactable + // The singleton ZebraFotaConnector associated with account. + zebraFotaConnector ZebraFotaConnectorable + // Collection of ZebraFotaDeployments associated with account. + zebraFotaDeployments []ZebraFotaDeploymentable +} +// NewDeviceManagement instantiates a new DeviceManagement and sets the default values. +func NewDeviceManagement()(*DeviceManagement) { + m := &DeviceManagement{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagement(), nil +} +// GetAccountMoveCompletionDateTime gets the accountMoveCompletionDateTime property value. The date & time when tenant data moved between scaleunits. +func (m *DeviceManagement) GetAccountMoveCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.accountMoveCompletionDateTime +} +// GetAdminConsent gets the adminConsent property value. Admin consent information. +func (m *DeviceManagement) GetAdminConsent()(AdminConsentable) { + return m.adminConsent +} +// GetAdvancedThreatProtectionOnboardingStateSummary gets the advancedThreatProtectionOnboardingStateSummary property value. The summary state of ATP onboarding state for this account. +func (m *DeviceManagement) GetAdvancedThreatProtectionOnboardingStateSummary()(AdvancedThreatProtectionOnboardingStateSummaryable) { + return m.advancedThreatProtectionOnboardingStateSummary +} +// GetAndroidDeviceOwnerEnrollmentProfiles gets the androidDeviceOwnerEnrollmentProfiles property value. Android device owner enrollment profile entities. +func (m *DeviceManagement) GetAndroidDeviceOwnerEnrollmentProfiles()([]AndroidDeviceOwnerEnrollmentProfileable) { + return m.androidDeviceOwnerEnrollmentProfiles +} +// GetAndroidForWorkAppConfigurationSchemas gets the androidForWorkAppConfigurationSchemas property value. Android for Work app configuration schema entities. +func (m *DeviceManagement) GetAndroidForWorkAppConfigurationSchemas()([]AndroidForWorkAppConfigurationSchemaable) { + return m.androidForWorkAppConfigurationSchemas +} +// GetAndroidForWorkEnrollmentProfiles gets the androidForWorkEnrollmentProfiles property value. Android for Work enrollment profile entities. +func (m *DeviceManagement) GetAndroidForWorkEnrollmentProfiles()([]AndroidForWorkEnrollmentProfileable) { + return m.androidForWorkEnrollmentProfiles +} +// GetAndroidForWorkSettings gets the androidForWorkSettings property value. The singleton Android for Work settings entity. +func (m *DeviceManagement) GetAndroidForWorkSettings()(AndroidForWorkSettingsable) { + return m.androidForWorkSettings +} +// GetAndroidManagedStoreAccountEnterpriseSettings gets the androidManagedStoreAccountEnterpriseSettings property value. The singleton Android managed store account enterprise settings entity. +func (m *DeviceManagement) GetAndroidManagedStoreAccountEnterpriseSettings()(AndroidManagedStoreAccountEnterpriseSettingsable) { + return m.androidManagedStoreAccountEnterpriseSettings +} +// GetAndroidManagedStoreAppConfigurationSchemas gets the androidManagedStoreAppConfigurationSchemas property value. Android Enterprise app configuration schema entities. +func (m *DeviceManagement) GetAndroidManagedStoreAppConfigurationSchemas()([]AndroidManagedStoreAppConfigurationSchemaable) { + return m.androidManagedStoreAppConfigurationSchemas +} +// GetApplePushNotificationCertificate gets the applePushNotificationCertificate property value. Apple push notification certificate. +func (m *DeviceManagement) GetApplePushNotificationCertificate()(ApplePushNotificationCertificateable) { + return m.applePushNotificationCertificate +} +// GetAppleUserInitiatedEnrollmentProfiles gets the appleUserInitiatedEnrollmentProfiles property value. Apple user initiated enrollment profiles +func (m *DeviceManagement) GetAppleUserInitiatedEnrollmentProfiles()([]AppleUserInitiatedEnrollmentProfileable) { + return m.appleUserInitiatedEnrollmentProfiles +} +// GetAssignmentFilters gets the assignmentFilters property value. The list of assignment filters +func (m *DeviceManagement) GetAssignmentFilters()([]DeviceAndAppManagementAssignmentFilterable) { + return m.assignmentFilters +} +// GetAuditEvents gets the auditEvents property value. The Audit Events +func (m *DeviceManagement) GetAuditEvents()([]AuditEventable) { + return m.auditEvents +} +// GetAutopilotEvents gets the autopilotEvents property value. The list of autopilot events for the tenant. +func (m *DeviceManagement) GetAutopilotEvents()([]DeviceManagementAutopilotEventable) { + return m.autopilotEvents +} +// GetCartToClassAssociations gets the cartToClassAssociations property value. The Cart To Class Associations. +func (m *DeviceManagement) GetCartToClassAssociations()([]CartToClassAssociationable) { + return m.cartToClassAssociations +} +// GetCategories gets the categories property value. The available categories +func (m *DeviceManagement) GetCategories()([]DeviceManagementSettingCategoryable) { + return m.categories +} +// GetCertificateConnectorDetails gets the certificateConnectorDetails property value. Collection of certificate connector details, each associated with a corresponding Intune Certificate Connector. +func (m *DeviceManagement) GetCertificateConnectorDetails()([]CertificateConnectorDetailsable) { + return m.certificateConnectorDetails +} +// GetChromeOSOnboardingSettings gets the chromeOSOnboardingSettings property value. Collection of ChromeOSOnboardingSettings settings associated with account. +func (m *DeviceManagement) GetChromeOSOnboardingSettings()([]ChromeOSOnboardingSettingsable) { + return m.chromeOSOnboardingSettings +} +// GetCloudPCConnectivityIssues gets the cloudPCConnectivityIssues property value. The list of CloudPC Connectivity Issue. +func (m *DeviceManagement) GetCloudPCConnectivityIssues()([]CloudPCConnectivityIssueable) { + return m.cloudPCConnectivityIssues +} +// GetComanagedDevices gets the comanagedDevices property value. The list of co-managed devices report +func (m *DeviceManagement) GetComanagedDevices()([]ManagedDeviceable) { + return m.comanagedDevices +} +// GetComanagementEligibleDevices gets the comanagementEligibleDevices property value. The list of co-management eligible devices report +func (m *DeviceManagement) GetComanagementEligibleDevices()([]ComanagementEligibleDeviceable) { + return m.comanagementEligibleDevices +} +// GetComplianceCategories gets the complianceCategories property value. List of all compliance categories +func (m *DeviceManagement) GetComplianceCategories()([]DeviceManagementConfigurationCategoryable) { + return m.complianceCategories +} +// GetComplianceManagementPartners gets the complianceManagementPartners property value. The list of Compliance Management Partners configured by the tenant. +func (m *DeviceManagement) GetComplianceManagementPartners()([]ComplianceManagementPartnerable) { + return m.complianceManagementPartners +} +// GetCompliancePolicies gets the compliancePolicies property value. List of all compliance policies +func (m *DeviceManagement) GetCompliancePolicies()([]DeviceManagementCompliancePolicyable) { + return m.compliancePolicies +} +// GetComplianceSettings gets the complianceSettings property value. List of all ComplianceSettings +func (m *DeviceManagement) GetComplianceSettings()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.complianceSettings +} +// GetConditionalAccessSettings gets the conditionalAccessSettings property value. The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access +func (m *DeviceManagement) GetConditionalAccessSettings()(OnPremisesConditionalAccessSettingsable) { + return m.conditionalAccessSettings +} +// GetConfigManagerCollections gets the configManagerCollections property value. A list of ConfigManagerCollection +func (m *DeviceManagement) GetConfigManagerCollections()([]ConfigManagerCollectionable) { + return m.configManagerCollections +} +// GetConfigurationCategories gets the configurationCategories property value. List of all Configuration Categories +func (m *DeviceManagement) GetConfigurationCategories()([]DeviceManagementConfigurationCategoryable) { + return m.configurationCategories +} +// GetConfigurationPolicies gets the configurationPolicies property value. List of all Configuration policies +func (m *DeviceManagement) GetConfigurationPolicies()([]DeviceManagementConfigurationPolicyable) { + return m.configurationPolicies +} +// GetConfigurationPolicyTemplates gets the configurationPolicyTemplates property value. List of all templates +func (m *DeviceManagement) GetConfigurationPolicyTemplates()([]DeviceManagementConfigurationPolicyTemplateable) { + return m.configurationPolicyTemplates +} +// GetConfigurationSettings gets the configurationSettings property value. List of all ConfigurationSettings +func (m *DeviceManagement) GetConfigurationSettings()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.configurationSettings +} +// GetDataProcessorServiceForWindowsFeaturesOnboarding gets the dataProcessorServiceForWindowsFeaturesOnboarding property value. A configuration entity for MEM features that utilize Data Processor Service for Windows (DPSW) data. +func (m *DeviceManagement) GetDataProcessorServiceForWindowsFeaturesOnboarding()(DataProcessorServiceForWindowsFeaturesOnboardingable) { + return m.dataProcessorServiceForWindowsFeaturesOnboarding +} +// GetDataSharingConsents gets the dataSharingConsents property value. Data sharing consents. +func (m *DeviceManagement) GetDataSharingConsents()([]DataSharingConsentable) { + return m.dataSharingConsents +} +// GetDepOnboardingSettings gets the depOnboardingSettings property value. This collections of multiple DEP tokens per-tenant. +func (m *DeviceManagement) GetDepOnboardingSettings()([]DepOnboardingSettingable) { + return m.depOnboardingSettings +} +// GetDerivedCredentials gets the derivedCredentials property value. Collection of Derived credential settings associated with account. +func (m *DeviceManagement) GetDerivedCredentials()([]DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentials +} +// GetDetectedApps gets the detectedApps property value. The list of detected apps associated with a device. +func (m *DeviceManagement) GetDetectedApps()([]DetectedAppable) { + return m.detectedApps +} +// GetDeviceCategories gets the deviceCategories property value. The list of device categories with the tenant. +func (m *DeviceManagement) GetDeviceCategories()([]DeviceCategoryable) { + return m.deviceCategories +} +// GetDeviceCompliancePolicies gets the deviceCompliancePolicies property value. The device compliance policies. +func (m *DeviceManagement) GetDeviceCompliancePolicies()([]DeviceCompliancePolicyable) { + return m.deviceCompliancePolicies +} +// GetDeviceCompliancePolicyDeviceStateSummary gets the deviceCompliancePolicyDeviceStateSummary property value. The device compliance state summary for this account. +func (m *DeviceManagement) GetDeviceCompliancePolicyDeviceStateSummary()(DeviceCompliancePolicyDeviceStateSummaryable) { + return m.deviceCompliancePolicyDeviceStateSummary +} +// GetDeviceCompliancePolicySettingStateSummaries gets the deviceCompliancePolicySettingStateSummaries property value. The summary states of compliance policy settings for this account. +func (m *DeviceManagement) GetDeviceCompliancePolicySettingStateSummaries()([]DeviceCompliancePolicySettingStateSummaryable) { + return m.deviceCompliancePolicySettingStateSummaries +} +// GetDeviceComplianceReportSummarizationDateTime gets the deviceComplianceReportSummarizationDateTime property value. The last requested time of device compliance reporting for this account. This property is read-only. +func (m *DeviceManagement) GetDeviceComplianceReportSummarizationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deviceComplianceReportSummarizationDateTime +} +// GetDeviceComplianceScripts gets the deviceComplianceScripts property value. The list of device compliance scripts associated with the tenant. +func (m *DeviceManagement) GetDeviceComplianceScripts()([]DeviceComplianceScriptable) { + return m.deviceComplianceScripts +} +// GetDeviceConfigurationConflictSummary gets the deviceConfigurationConflictSummary property value. Summary of policies in conflict state for this account. +func (m *DeviceManagement) GetDeviceConfigurationConflictSummary()([]DeviceConfigurationConflictSummaryable) { + return m.deviceConfigurationConflictSummary +} +// GetDeviceConfigurationDeviceStateSummaries gets the deviceConfigurationDeviceStateSummaries property value. The device configuration device state summary for this account. +func (m *DeviceManagement) GetDeviceConfigurationDeviceStateSummaries()(DeviceConfigurationDeviceStateSummaryable) { + return m.deviceConfigurationDeviceStateSummaries +} +// GetDeviceConfigurationRestrictedAppsViolations gets the deviceConfigurationRestrictedAppsViolations property value. Restricted apps violations for this account. +func (m *DeviceManagement) GetDeviceConfigurationRestrictedAppsViolations()([]RestrictedAppsViolationable) { + return m.deviceConfigurationRestrictedAppsViolations +} +// GetDeviceConfigurations gets the deviceConfigurations property value. The device configurations. +func (m *DeviceManagement) GetDeviceConfigurations()([]DeviceConfigurationable) { + return m.deviceConfigurations +} +// GetDeviceConfigurationsAllManagedDeviceCertificateStates gets the deviceConfigurationsAllManagedDeviceCertificateStates property value. Summary of all certificates for all devices. +func (m *DeviceManagement) GetDeviceConfigurationsAllManagedDeviceCertificateStates()([]ManagedAllDeviceCertificateStateable) { + return m.deviceConfigurationsAllManagedDeviceCertificateStates +} +// GetDeviceConfigurationUserStateSummaries gets the deviceConfigurationUserStateSummaries property value. The device configuration user state summary for this account. +func (m *DeviceManagement) GetDeviceConfigurationUserStateSummaries()(DeviceConfigurationUserStateSummaryable) { + return m.deviceConfigurationUserStateSummaries +} +// GetDeviceCustomAttributeShellScripts gets the deviceCustomAttributeShellScripts property value. The list of device custom attribute shell scripts associated with the tenant. +func (m *DeviceManagement) GetDeviceCustomAttributeShellScripts()([]DeviceCustomAttributeShellScriptable) { + return m.deviceCustomAttributeShellScripts +} +// GetDeviceEnrollmentConfigurations gets the deviceEnrollmentConfigurations property value. The list of device enrollment configurations +func (m *DeviceManagement) GetDeviceEnrollmentConfigurations()([]DeviceEnrollmentConfigurationable) { + return m.deviceEnrollmentConfigurations +} +// GetDeviceHealthScripts gets the deviceHealthScripts property value. The list of device health scripts associated with the tenant. +func (m *DeviceManagement) GetDeviceHealthScripts()([]DeviceHealthScriptable) { + return m.deviceHealthScripts +} +// GetDeviceManagementPartners gets the deviceManagementPartners property value. The list of Device Management Partners configured by the tenant. +func (m *DeviceManagement) GetDeviceManagementPartners()([]DeviceManagementPartnerable) { + return m.deviceManagementPartners +} +// GetDeviceManagementScripts gets the deviceManagementScripts property value. The list of device management scripts associated with the tenant. +func (m *DeviceManagement) GetDeviceManagementScripts()([]DeviceManagementScriptable) { + return m.deviceManagementScripts +} +// GetDeviceProtectionOverview gets the deviceProtectionOverview property value. Device protection overview. +func (m *DeviceManagement) GetDeviceProtectionOverview()(DeviceProtectionOverviewable) { + return m.deviceProtectionOverview +} +// GetDeviceShellScripts gets the deviceShellScripts property value. The list of device shell scripts associated with the tenant. +func (m *DeviceManagement) GetDeviceShellScripts()([]DeviceShellScriptable) { + return m.deviceShellScripts +} +// GetDomainJoinConnectors gets the domainJoinConnectors property value. A list of connector objects. +func (m *DeviceManagement) GetDomainJoinConnectors()([]DeviceManagementDomainJoinConnectorable) { + return m.domainJoinConnectors +} +// GetEmbeddedSIMActivationCodePools gets the embeddedSIMActivationCodePools property value. The embedded SIM activation code pools created by this account. +func (m *DeviceManagement) GetEmbeddedSIMActivationCodePools()([]EmbeddedSIMActivationCodePoolable) { + return m.embeddedSIMActivationCodePools +} +// GetExchangeConnectors gets the exchangeConnectors property value. The list of Exchange Connectors configured by the tenant. +func (m *DeviceManagement) GetExchangeConnectors()([]DeviceManagementExchangeConnectorable) { + return m.exchangeConnectors +} +// GetExchangeOnPremisesPolicies gets the exchangeOnPremisesPolicies property value. The list of Exchange On Premisis policies configured by the tenant. +func (m *DeviceManagement) GetExchangeOnPremisesPolicies()([]DeviceManagementExchangeOnPremisesPolicyable) { + return m.exchangeOnPremisesPolicies +} +// GetExchangeOnPremisesPolicy gets the exchangeOnPremisesPolicy property value. The policy which controls mobile device access to Exchange On Premises +func (m *DeviceManagement) GetExchangeOnPremisesPolicy()(DeviceManagementExchangeOnPremisesPolicyable) { + return m.exchangeOnPremisesPolicy +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountMoveCompletionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountMoveCompletionDateTime(val) + } + return nil + } + res["adminConsent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdminConsentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdminConsent(val.(AdminConsentable)) + } + return nil + } + res["advancedThreatProtectionOnboardingStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdvancedThreatProtectionOnboardingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionOnboardingStateSummary(val.(AdvancedThreatProtectionOnboardingStateSummaryable)) + } + return nil + } + res["androidDeviceOwnerEnrollmentProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidDeviceOwnerEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidDeviceOwnerEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidDeviceOwnerEnrollmentProfileable) + } + m.SetAndroidDeviceOwnerEnrollmentProfiles(res) + } + return nil + } + res["androidForWorkAppConfigurationSchemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkAppConfigurationSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkAppConfigurationSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkAppConfigurationSchemaable) + } + m.SetAndroidForWorkAppConfigurationSchemas(res) + } + return nil + } + res["androidForWorkEnrollmentProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidForWorkEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidForWorkEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AndroidForWorkEnrollmentProfileable) + } + m.SetAndroidForWorkEnrollmentProfiles(res) + } + return nil + } + res["androidForWorkSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidForWorkSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAndroidForWorkSettings(val.(AndroidForWorkSettingsable)) + } + return nil + } + res["androidManagedStoreAccountEnterpriseSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidManagedStoreAccountEnterpriseSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAndroidManagedStoreAccountEnterpriseSettings(val.(AndroidManagedStoreAccountEnterpriseSettingsable)) + } + return nil + } + res["androidManagedStoreAppConfigurationSchemas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAndroidManagedStoreAppConfigurationSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AndroidManagedStoreAppConfigurationSchemaable, len(val)) + for i, v := range val { + res[i] = v.(AndroidManagedStoreAppConfigurationSchemaable) + } + m.SetAndroidManagedStoreAppConfigurationSchemas(res) + } + return nil + } + res["applePushNotificationCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApplePushNotificationCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplePushNotificationCertificate(val.(ApplePushNotificationCertificateable)) + } + return nil + } + res["appleUserInitiatedEnrollmentProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppleUserInitiatedEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppleUserInitiatedEnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(AppleUserInitiatedEnrollmentProfileable) + } + m.SetAppleUserInitiatedEnrollmentProfiles(res) + } + return nil + } + res["assignmentFilters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAndAppManagementAssignmentFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAndAppManagementAssignmentFilterable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAndAppManagementAssignmentFilterable) + } + m.SetAssignmentFilters(res) + } + return nil + } + res["auditEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditEventable, len(val)) + for i, v := range val { + res[i] = v.(AuditEventable) + } + m.SetAuditEvents(res) + } + return nil + } + res["autopilotEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAutopilotEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAutopilotEventable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAutopilotEventable) + } + m.SetAutopilotEvents(res) + } + return nil + } + res["cartToClassAssociations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCartToClassAssociationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CartToClassAssociationable, len(val)) + for i, v := range val { + res[i] = v.(CartToClassAssociationable) + } + m.SetCartToClassAssociations(res) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["certificateConnectorDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateConnectorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateConnectorDetailsable, len(val)) + for i, v := range val { + res[i] = v.(CertificateConnectorDetailsable) + } + m.SetCertificateConnectorDetails(res) + } + return nil + } + res["chromeOSOnboardingSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChromeOSOnboardingSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChromeOSOnboardingSettingsable, len(val)) + for i, v := range val { + res[i] = v.(ChromeOSOnboardingSettingsable) + } + m.SetChromeOSOnboardingSettings(res) + } + return nil + } + res["cloudPCConnectivityIssues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPCConnectivityIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPCConnectivityIssueable, len(val)) + for i, v := range val { + res[i] = v.(CloudPCConnectivityIssueable) + } + m.SetCloudPCConnectivityIssues(res) + } + return nil + } + res["comanagedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceable) + } + m.SetComanagedDevices(res) + } + return nil + } + res["comanagementEligibleDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComanagementEligibleDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComanagementEligibleDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ComanagementEligibleDeviceable) + } + m.SetComanagementEligibleDevices(res) + } + return nil + } + res["complianceCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationCategoryable) + } + m.SetComplianceCategories(res) + } + return nil + } + res["complianceManagementPartners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceManagementPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceManagementPartnerable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceManagementPartnerable) + } + m.SetComplianceManagementPartners(res) + } + return nil + } + res["compliancePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCompliancePolicyable) + } + m.SetCompliancePolicies(res) + } + return nil + } + res["complianceSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetComplianceSettings(res) + } + return nil + } + res["conditionalAccessSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesConditionalAccessSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditionalAccessSettings(val.(OnPremisesConditionalAccessSettingsable)) + } + return nil + } + res["configManagerCollections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConfigManagerCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConfigManagerCollectionable, len(val)) + for i, v := range val { + res[i] = v.(ConfigManagerCollectionable) + } + m.SetConfigManagerCollections(res) + } + return nil + } + res["configurationCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationCategoryable) + } + m.SetConfigurationCategories(res) + } + return nil + } + res["configurationPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyable) + } + m.SetConfigurationPolicies(res) + } + return nil + } + res["configurationPolicyTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyTemplateable) + } + m.SetConfigurationPolicyTemplates(res) + } + return nil + } + res["configurationSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetConfigurationSettings(res) + } + return nil + } + res["dataProcessorServiceForWindowsFeaturesOnboarding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDataProcessorServiceForWindowsFeaturesOnboardingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDataProcessorServiceForWindowsFeaturesOnboarding(val.(DataProcessorServiceForWindowsFeaturesOnboardingable)) + } + return nil + } + res["dataSharingConsents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSharingConsentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSharingConsentable, len(val)) + for i, v := range val { + res[i] = v.(DataSharingConsentable) + } + m.SetDataSharingConsents(res) + } + return nil + } + res["depOnboardingSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDepOnboardingSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DepOnboardingSettingable, len(val)) + for i, v := range val { + res[i] = v.(DepOnboardingSettingable) + } + m.SetDepOnboardingSettings(res) + } + return nil + } + res["derivedCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementDerivedCredentialSettingsable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementDerivedCredentialSettingsable) + } + m.SetDerivedCredentials(res) + } + return nil + } + res["detectedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDetectedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DetectedAppable, len(val)) + for i, v := range val { + res[i] = v.(DetectedAppable) + } + m.SetDetectedApps(res) + } + return nil + } + res["deviceCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCategoryable) + } + m.SetDeviceCategories(res) + } + return nil + } + res["deviceCompliancePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyable) + } + m.SetDeviceCompliancePolicies(res) + } + return nil + } + res["deviceCompliancePolicyDeviceStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceCompliancePolicyDeviceStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceCompliancePolicyDeviceStateSummary(val.(DeviceCompliancePolicyDeviceStateSummaryable)) + } + return nil + } + res["deviceCompliancePolicySettingStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateSummaryable) + } + m.SetDeviceCompliancePolicySettingStateSummaries(res) + } + return nil + } + res["deviceComplianceReportSummarizationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceReportSummarizationDateTime(val) + } + return nil + } + res["deviceComplianceScripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceComplianceScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceComplianceScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceComplianceScriptable) + } + m.SetDeviceComplianceScripts(res) + } + return nil + } + res["deviceConfigurationConflictSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationConflictSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationConflictSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationConflictSummaryable) + } + m.SetDeviceConfigurationConflictSummary(res) + } + return nil + } + res["deviceConfigurationDeviceStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceConfigurationDeviceStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfigurationDeviceStateSummaries(val.(DeviceConfigurationDeviceStateSummaryable)) + } + return nil + } + res["deviceConfigurationRestrictedAppsViolations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRestrictedAppsViolationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RestrictedAppsViolationable, len(val)) + for i, v := range val { + res[i] = v.(RestrictedAppsViolationable) + } + m.SetDeviceConfigurationRestrictedAppsViolations(res) + } + return nil + } + res["deviceConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationable) + } + m.SetDeviceConfigurations(res) + } + return nil + } + res["deviceConfigurationsAllManagedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAllDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAllDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAllDeviceCertificateStateable) + } + m.SetDeviceConfigurationsAllManagedDeviceCertificateStates(res) + } + return nil + } + res["deviceConfigurationUserStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceConfigurationUserStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfigurationUserStateSummaries(val.(DeviceConfigurationUserStateSummaryable)) + } + return nil + } + res["deviceCustomAttributeShellScripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCustomAttributeShellScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCustomAttributeShellScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCustomAttributeShellScriptable) + } + m.SetDeviceCustomAttributeShellScripts(res) + } + return nil + } + res["deviceEnrollmentConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceEnrollmentConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceEnrollmentConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceEnrollmentConfigurationable) + } + m.SetDeviceEnrollmentConfigurations(res) + } + return nil + } + res["deviceHealthScripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceHealthScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceHealthScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceHealthScriptable) + } + m.SetDeviceHealthScripts(res) + } + return nil + } + res["deviceManagementPartners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementPartnerable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementPartnerable) + } + m.SetDeviceManagementPartners(res) + } + return nil + } + res["deviceManagementScripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptable) + } + m.SetDeviceManagementScripts(res) + } + return nil + } + res["deviceProtectionOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceProtectionOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceProtectionOverview(val.(DeviceProtectionOverviewable)) + } + return nil + } + res["deviceShellScripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceShellScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceShellScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceShellScriptable) + } + m.SetDeviceShellScripts(res) + } + return nil + } + res["domainJoinConnectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementDomainJoinConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementDomainJoinConnectorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementDomainJoinConnectorable) + } + m.SetDomainJoinConnectors(res) + } + return nil + } + res["embeddedSIMActivationCodePools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodePoolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodePoolable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodePoolable) + } + m.SetEmbeddedSIMActivationCodePools(res) + } + return nil + } + res["exchangeConnectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeConnectorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeConnectorable) + } + m.SetExchangeConnectors(res) + } + return nil + } + res["exchangeOnPremisesPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeOnPremisesPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeOnPremisesPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeOnPremisesPolicyable) + } + m.SetExchangeOnPremisesPolicies(res) + } + return nil + } + res["exchangeOnPremisesPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementExchangeOnPremisesPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExchangeOnPremisesPolicy(val.(DeviceManagementExchangeOnPremisesPolicyable)) + } + return nil + } + res["groupPolicyCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyCategoryable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyCategoryable) + } + m.SetGroupPolicyCategories(res) + } + return nil + } + res["groupPolicyConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyConfigurationable) + } + m.SetGroupPolicyConfigurations(res) + } + return nil + } + res["groupPolicyDefinitionFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionFileable) + } + m.SetGroupPolicyDefinitionFiles(res) + } + return nil + } + res["groupPolicyDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionable) + } + m.SetGroupPolicyDefinitions(res) + } + return nil + } + res["groupPolicyMigrationReports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyMigrationReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyMigrationReportable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyMigrationReportable) + } + m.SetGroupPolicyMigrationReports(res) + } + return nil + } + res["groupPolicyObjectFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyObjectFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyObjectFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyObjectFileable) + } + m.SetGroupPolicyObjectFiles(res) + } + return nil + } + res["groupPolicyUploadedDefinitionFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyUploadedDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyUploadedDefinitionFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyUploadedDefinitionFileable) + } + m.SetGroupPolicyUploadedDefinitionFiles(res) + } + return nil + } + res["importedDeviceIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedDeviceIdentityable) + } + m.SetImportedDeviceIdentities(res) + } + return nil + } + res["importedWindowsAutopilotDeviceIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedWindowsAutopilotDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedWindowsAutopilotDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedWindowsAutopilotDeviceIdentityable) + } + m.SetImportedWindowsAutopilotDeviceIdentities(res) + } + return nil + } + res["intents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentable) + } + m.SetIntents(res) + } + return nil + } + res["intuneAccountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetIntuneAccountId(val) + } + return nil + } + res["intuneBrand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntuneBrandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIntuneBrand(val.(IntuneBrandable)) + } + return nil + } + res["intuneBrandingProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntuneBrandingProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntuneBrandingProfileable, len(val)) + for i, v := range val { + res[i] = v.(IntuneBrandingProfileable) + } + m.SetIntuneBrandingProfiles(res) + } + return nil + } + res["iosUpdateStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosUpdateDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosUpdateDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(IosUpdateDeviceStatusable) + } + m.SetIosUpdateStatuses(res) + } + return nil + } + res["lastReportAggregationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportAggregationDateTime(val) + } + return nil + } + res["legacyPcManangementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLegacyPcManangementEnabled(val) + } + return nil + } + res["macOSSoftwareUpdateAccountSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateAccountSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateAccountSummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateAccountSummaryable) + } + m.SetMacOSSoftwareUpdateAccountSummaries(res) + } + return nil + } + res["managedDeviceCleanupSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceCleanupSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceCleanupSettings(val.(ManagedDeviceCleanupSettingsable)) + } + return nil + } + res["managedDeviceEncryptionStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceEncryptionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceEncryptionStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceEncryptionStateable) + } + m.SetManagedDeviceEncryptionStates(res) + } + return nil + } + res["managedDeviceOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceOverview(val.(ManagedDeviceOverviewable)) + } + return nil + } + res["managedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceable) + } + m.SetManagedDevices(res) + } + return nil + } + res["maximumDepTokens"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumDepTokens(val) + } + return nil + } + res["microsoftTunnelConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelConfigurationable) + } + m.SetMicrosoftTunnelConfigurations(res) + } + return nil + } + res["microsoftTunnelHealthThresholds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelHealthThresholdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelHealthThresholdable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelHealthThresholdable) + } + m.SetMicrosoftTunnelHealthThresholds(res) + } + return nil + } + res["microsoftTunnelServerLogCollectionResponses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelServerLogCollectionResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelServerLogCollectionResponseable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelServerLogCollectionResponseable) + } + m.SetMicrosoftTunnelServerLogCollectionResponses(res) + } + return nil + } + res["microsoftTunnelSites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelSiteable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelSiteable) + } + m.SetMicrosoftTunnelSites(res) + } + return nil + } + res["mobileAppTroubleshootingEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppTroubleshootingEventable) + } + m.SetMobileAppTroubleshootingEvents(res) + } + return nil + } + res["mobileThreatDefenseConnectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileThreatDefenseConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileThreatDefenseConnectorable, len(val)) + for i, v := range val { + res[i] = v.(MobileThreatDefenseConnectorable) + } + m.SetMobileThreatDefenseConnectors(res) + } + return nil + } + res["ndesConnectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNdesConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NdesConnectorable, len(val)) + for i, v := range val { + res[i] = v.(NdesConnectorable) + } + m.SetNdesConnectors(res) + } + return nil + } + res["notificationMessageTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationMessageTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationMessageTemplateable, len(val)) + for i, v := range val { + res[i] = v.(NotificationMessageTemplateable) + } + m.SetNotificationMessageTemplates(res) + } + return nil + } + res["oemWarrantyInformationOnboarding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOemWarrantyInformationOnboardingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OemWarrantyInformationOnboardingable, len(val)) + for i, v := range val { + res[i] = v.(OemWarrantyInformationOnboardingable) + } + m.SetOemWarrantyInformationOnboarding(res) + } + return nil + } + res["remoteActionAudits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRemoteActionAuditFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RemoteActionAuditable, len(val)) + for i, v := range val { + res[i] = v.(RemoteActionAuditable) + } + m.SetRemoteActionAudits(res) + } + return nil + } + res["remoteAssistancePartners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRemoteAssistancePartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RemoteAssistancePartnerable, len(val)) + for i, v := range val { + res[i] = v.(RemoteAssistancePartnerable) + } + m.SetRemoteAssistancePartners(res) + } + return nil + } + res["remoteAssistanceSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRemoteAssistanceSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRemoteAssistanceSettings(val.(RemoteAssistanceSettingsable)) + } + return nil + } + res["reports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementReportsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReports(val.(DeviceManagementReportsable)) + } + return nil + } + res["resourceAccessProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementResourceAccessProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementResourceAccessProfileBaseable) + } + m.SetResourceAccessProfiles(res) + } + return nil + } + res["resourceOperations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceOperationable, len(val)) + for i, v := range val { + res[i] = v.(ResourceOperationable) + } + m.SetResourceOperations(res) + } + return nil + } + res["reusablePolicySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementReusablePolicySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementReusablePolicySettingable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementReusablePolicySettingable) + } + m.SetReusablePolicySettings(res) + } + return nil + } + res["reusableSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetReusableSettings(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceAndAppManagementRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceAndAppManagementRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceAndAppManagementRoleAssignmentable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["roleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(RoleDefinitionable) + } + m.SetRoleDefinitions(res) + } + return nil + } + res["roleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagable) + } + m.SetRoleScopeTags(res) + } + return nil + } + res["settingDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingDefinitionable) + } + m.SetSettingDefinitions(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(DeviceManagementSettingsable)) + } + return nil + } + res["softwareUpdateStatusSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSoftwareUpdateStatusSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdateStatusSummary(val.(SoftwareUpdateStatusSummaryable)) + } + return nil + } + res["subscriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementSubscriptions) + if err != nil { + return err + } + if val != nil { + m.SetSubscriptions(val.(*DeviceManagementSubscriptions)) + } + return nil + } + res["subscriptionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementSubscriptionState) + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionState(val.(*DeviceManagementSubscriptionState)) + } + return nil + } + res["telecomExpenseManagementPartners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTelecomExpenseManagementPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TelecomExpenseManagementPartnerable, len(val)) + for i, v := range val { + res[i] = v.(TelecomExpenseManagementPartnerable) + } + m.SetTelecomExpenseManagementPartners(res) + } + return nil + } + res["templates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTemplateable) + } + m.SetTemplates(res) + } + return nil + } + res["templateSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingTemplateable) + } + m.SetTemplateSettings(res) + } + return nil + } + res["tenantAttachRBAC"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTenantAttachRBACFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTenantAttachRBAC(val.(TenantAttachRBACable)) + } + return nil + } + res["termsAndConditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTermsAndConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TermsAndConditionsable, len(val)) + for i, v := range val { + res[i] = v.(TermsAndConditionsable) + } + m.SetTermsAndConditions(res) + } + return nil + } + res["troubleshootingEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTroubleshootingEventable) + } + m.SetTroubleshootingEvents(res) + } + return nil + } + res["unlicensedAdminstratorsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnlicensedAdminstratorsEnabled(val) + } + return nil + } + res["userExperienceAnalyticsAnomaly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAnomalyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAnomalyable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAnomalyable) + } + m.SetUserExperienceAnalyticsAnomaly(res) + } + return nil + } + res["userExperienceAnalyticsAnomalyDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAnomalyDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAnomalyDeviceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAnomalyDeviceable) + } + m.SetUserExperienceAnalyticsAnomalyDevice(res) + } + return nil + } + res["userExperienceAnalyticsAnomalySeverityOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsAnomalySeverityOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsAnomalySeverityOverview(val.(UserExperienceAnalyticsAnomalySeverityOverviewable)) + } + return nil + } + res["userExperienceAnalyticsAppHealthApplicationPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthApplicationPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthApplicationPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthApplicationPerformanceable) + } + m.SetUserExperienceAnalyticsAppHealthApplicationPerformance(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable) + } + m.SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable) + } + m.SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable) + } + m.SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthAppPerformanceByOSVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable) + } + m.SetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthDeviceModelPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthDeviceModelPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthDeviceModelPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthDeviceModelPerformanceable) + } + m.SetUserExperienceAnalyticsAppHealthDeviceModelPerformance(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthDevicePerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthDevicePerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthDevicePerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthDevicePerformanceable) + } + m.SetUserExperienceAnalyticsAppHealthDevicePerformance(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthDevicePerformanceDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthDevicePerformanceDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable) + } + m.SetUserExperienceAnalyticsAppHealthDevicePerformanceDetails(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthOSVersionPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsAppHealthOSVersionPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsAppHealthOSVersionPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsAppHealthOSVersionPerformanceable) + } + m.SetUserExperienceAnalyticsAppHealthOSVersionPerformance(res) + } + return nil + } + res["userExperienceAnalyticsAppHealthOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsAppHealthOverview(val.(UserExperienceAnalyticsCategoryable)) + } + return nil + } + res["userExperienceAnalyticsBaselines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBaselineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBaselineable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBaselineable) + } + m.SetUserExperienceAnalyticsBaselines(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthAppImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthAppImpactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthAppImpactable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthAppImpactable) + } + m.SetUserExperienceAnalyticsBatteryHealthAppImpact(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthCapacityDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsBatteryHealthCapacityDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsBatteryHealthCapacityDetails(val.(UserExperienceAnalyticsBatteryHealthCapacityDetailsable)) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthDeviceAppImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthDeviceAppImpactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthDeviceAppImpactable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthDeviceAppImpactable) + } + m.SetUserExperienceAnalyticsBatteryHealthDeviceAppImpact(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthDevicePerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthDevicePerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthDevicePerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthDevicePerformanceable) + } + m.SetUserExperienceAnalyticsBatteryHealthDevicePerformance(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable) + } + m.SetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthModelPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthModelPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthModelPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthModelPerformanceable) + } + m.SetUserExperienceAnalyticsBatteryHealthModelPerformance(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthOsPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsBatteryHealthOsPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsBatteryHealthOsPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsBatteryHealthOsPerformanceable) + } + m.SetUserExperienceAnalyticsBatteryHealthOsPerformance(res) + } + return nil + } + res["userExperienceAnalyticsBatteryHealthRuntimeDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsBatteryHealthRuntimeDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsBatteryHealthRuntimeDetails(val.(UserExperienceAnalyticsBatteryHealthRuntimeDetailsable)) + } + return nil + } + res["userExperienceAnalyticsCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsCategoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsCategoryable) + } + m.SetUserExperienceAnalyticsCategories(res) + } + return nil + } + res["userExperienceAnalyticsDeviceMetricHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsMetricHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsMetricHistoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsMetricHistoryable) + } + m.SetUserExperienceAnalyticsDeviceMetricHistory(res) + } + return nil + } + res["userExperienceAnalyticsDevicePerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDevicePerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDevicePerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDevicePerformanceable) + } + m.SetUserExperienceAnalyticsDevicePerformance(res) + } + return nil + } + res["userExperienceAnalyticsDeviceScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsDeviceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsDeviceScope(val.(UserExperienceAnalyticsDeviceScopeable)) + } + return nil + } + res["userExperienceAnalyticsDeviceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceScopeable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceScopeable) + } + m.SetUserExperienceAnalyticsDeviceScopes(res) + } + return nil + } + res["userExperienceAnalyticsDeviceScores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceScoresFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceScoresable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceScoresable) + } + m.SetUserExperienceAnalyticsDeviceScores(res) + } + return nil + } + res["userExperienceAnalyticsDeviceStartupHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceStartupHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceStartupHistoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceStartupHistoryable) + } + m.SetUserExperienceAnalyticsDeviceStartupHistory(res) + } + return nil + } + res["userExperienceAnalyticsDeviceStartupProcesses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceStartupProcessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceStartupProcessable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceStartupProcessable) + } + m.SetUserExperienceAnalyticsDeviceStartupProcesses(res) + } + return nil + } + res["userExperienceAnalyticsDeviceStartupProcessPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceStartupProcessPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceStartupProcessPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceStartupProcessPerformanceable) + } + m.SetUserExperienceAnalyticsDeviceStartupProcessPerformance(res) + } + return nil + } + res["userExperienceAnalyticsDevicesWithoutCloudIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceWithoutCloudIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceWithoutCloudIdentityable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceWithoutCloudIdentityable) + } + m.SetUserExperienceAnalyticsDevicesWithoutCloudIdentity(res) + } + return nil + } + res["userExperienceAnalyticsDeviceTimelineEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsDeviceTimelineEventsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsDeviceTimelineEventsable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsDeviceTimelineEventsable) + } + m.SetUserExperienceAnalyticsDeviceTimelineEvents(res) + } + return nil + } + res["userExperienceAnalyticsImpactingProcess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsImpactingProcessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsImpactingProcessable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsImpactingProcessable) + } + m.SetUserExperienceAnalyticsImpactingProcess(res) + } + return nil + } + res["userExperienceAnalyticsMetricHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsMetricHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsMetricHistoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsMetricHistoryable) + } + m.SetUserExperienceAnalyticsMetricHistory(res) + } + return nil + } + res["userExperienceAnalyticsModelScores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsModelScoresFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsModelScoresable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsModelScoresable) + } + m.SetUserExperienceAnalyticsModelScores(res) + } + return nil + } + res["userExperienceAnalyticsNotAutopilotReadyDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsNotAutopilotReadyDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsNotAutopilotReadyDeviceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsNotAutopilotReadyDeviceable) + } + m.SetUserExperienceAnalyticsNotAutopilotReadyDevice(res) + } + return nil + } + res["userExperienceAnalyticsOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsOverview(val.(UserExperienceAnalyticsOverviewable)) + } + return nil + } + res["userExperienceAnalyticsRemoteConnection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsRemoteConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsRemoteConnectionable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsRemoteConnectionable) + } + m.SetUserExperienceAnalyticsRemoteConnection(res) + } + return nil + } + res["userExperienceAnalyticsResourcePerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsResourcePerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsResourcePerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsResourcePerformanceable) + } + m.SetUserExperienceAnalyticsResourcePerformance(res) + } + return nil + } + res["userExperienceAnalyticsScoreHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsScoreHistoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsScoreHistoryable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsScoreHistoryable) + } + m.SetUserExperienceAnalyticsScoreHistory(res) + } + return nil + } + res["userExperienceAnalyticsSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsSettings(val.(UserExperienceAnalyticsSettingsable)) + } + return nil + } + res["userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(val.(UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable)) + } + return nil + } + res["userExperienceAnalyticsWorkFromAnywhereMetrics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsWorkFromAnywhereMetricFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsWorkFromAnywhereMetricable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsWorkFromAnywhereMetricable) + } + m.SetUserExperienceAnalyticsWorkFromAnywhereMetrics(res) + } + return nil + } + res["userExperienceAnalyticsWorkFromAnywhereModelPerformance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserExperienceAnalyticsWorkFromAnywhereModelPerformanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable, len(val)) + for i, v := range val { + res[i] = v.(UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable) + } + m.SetUserExperienceAnalyticsWorkFromAnywhereModelPerformance(res) + } + return nil + } + res["userPfxCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserPFXCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserPFXCertificateable, len(val)) + for i, v := range val { + res[i] = v.(UserPFXCertificateable) + } + m.SetUserPfxCertificates(res) + } + return nil + } + res["virtualEndpoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVirtualEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVirtualEndpoint(val.(VirtualEndpointable)) + } + return nil + } + res["windowsAutopilotDeploymentProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsAutopilotDeploymentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsAutopilotDeploymentProfileable, len(val)) + for i, v := range val { + res[i] = v.(WindowsAutopilotDeploymentProfileable) + } + m.SetWindowsAutopilotDeploymentProfiles(res) + } + return nil + } + res["windowsAutopilotDeviceIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsAutopilotDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsAutopilotDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(WindowsAutopilotDeviceIdentityable) + } + m.SetWindowsAutopilotDeviceIdentities(res) + } + return nil + } + res["windowsAutopilotSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsAutopilotSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsAutopilotSettings(val.(WindowsAutopilotSettingsable)) + } + return nil + } + res["windowsDriverUpdateProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsDriverUpdateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsDriverUpdateProfileable, len(val)) + for i, v := range val { + res[i] = v.(WindowsDriverUpdateProfileable) + } + m.SetWindowsDriverUpdateProfiles(res) + } + return nil + } + res["windowsFeatureUpdateProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsFeatureUpdateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsFeatureUpdateProfileable, len(val)) + for i, v := range val { + res[i] = v.(WindowsFeatureUpdateProfileable) + } + m.SetWindowsFeatureUpdateProfiles(res) + } + return nil + } + res["windowsInformationProtectionAppLearningSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsInformationProtectionAppLearningSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsInformationProtectionAppLearningSummaryable, len(val)) + for i, v := range val { + res[i] = v.(WindowsInformationProtectionAppLearningSummaryable) + } + m.SetWindowsInformationProtectionAppLearningSummaries(res) + } + return nil + } + res["windowsInformationProtectionNetworkLearningSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsInformationProtectionNetworkLearningSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsInformationProtectionNetworkLearningSummaryable, len(val)) + for i, v := range val { + res[i] = v.(WindowsInformationProtectionNetworkLearningSummaryable) + } + m.SetWindowsInformationProtectionNetworkLearningSummaries(res) + } + return nil + } + res["windowsMalwareInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsMalwareInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsMalwareInformationable, len(val)) + for i, v := range val { + res[i] = v.(WindowsMalwareInformationable) + } + m.SetWindowsMalwareInformation(res) + } + return nil + } + res["windowsMalwareOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsMalwareOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsMalwareOverview(val.(WindowsMalwareOverviewable)) + } + return nil + } + res["windowsQualityUpdateProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsQualityUpdateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsQualityUpdateProfileable, len(val)) + for i, v := range val { + res[i] = v.(WindowsQualityUpdateProfileable) + } + m.SetWindowsQualityUpdateProfiles(res) + } + return nil + } + res["windowsUpdateCatalogItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsUpdateCatalogItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsUpdateCatalogItemable, len(val)) + for i, v := range val { + res[i] = v.(WindowsUpdateCatalogItemable) + } + m.SetWindowsUpdateCatalogItems(res) + } + return nil + } + res["zebraFotaArtifacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateZebraFotaArtifactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ZebraFotaArtifactable, len(val)) + for i, v := range val { + res[i] = v.(ZebraFotaArtifactable) + } + m.SetZebraFotaArtifacts(res) + } + return nil + } + res["zebraFotaConnector"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateZebraFotaConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetZebraFotaConnector(val.(ZebraFotaConnectorable)) + } + return nil + } + res["zebraFotaDeployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateZebraFotaDeploymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ZebraFotaDeploymentable, len(val)) + for i, v := range val { + res[i] = v.(ZebraFotaDeploymentable) + } + m.SetZebraFotaDeployments(res) + } + return nil + } + return res +} +// GetGroupPolicyCategories gets the groupPolicyCategories property value. The available group policy categories for this account. +func (m *DeviceManagement) GetGroupPolicyCategories()([]GroupPolicyCategoryable) { + return m.groupPolicyCategories +} +// GetGroupPolicyConfigurations gets the groupPolicyConfigurations property value. The group policy configurations created by this account. +func (m *DeviceManagement) GetGroupPolicyConfigurations()([]GroupPolicyConfigurationable) { + return m.groupPolicyConfigurations +} +// GetGroupPolicyDefinitionFiles gets the groupPolicyDefinitionFiles property value. The available group policy definition files for this account. +func (m *DeviceManagement) GetGroupPolicyDefinitionFiles()([]GroupPolicyDefinitionFileable) { + return m.groupPolicyDefinitionFiles +} +// GetGroupPolicyDefinitions gets the groupPolicyDefinitions property value. The available group policy definitions for this account. +func (m *DeviceManagement) GetGroupPolicyDefinitions()([]GroupPolicyDefinitionable) { + return m.groupPolicyDefinitions +} +// GetGroupPolicyMigrationReports gets the groupPolicyMigrationReports property value. A list of Group Policy migration reports. +func (m *DeviceManagement) GetGroupPolicyMigrationReports()([]GroupPolicyMigrationReportable) { + return m.groupPolicyMigrationReports +} +// GetGroupPolicyObjectFiles gets the groupPolicyObjectFiles property value. A list of Group Policy Object files uploaded. +func (m *DeviceManagement) GetGroupPolicyObjectFiles()([]GroupPolicyObjectFileable) { + return m.groupPolicyObjectFiles +} +// GetGroupPolicyUploadedDefinitionFiles gets the groupPolicyUploadedDefinitionFiles property value. The available group policy uploaded definition files for this account. +func (m *DeviceManagement) GetGroupPolicyUploadedDefinitionFiles()([]GroupPolicyUploadedDefinitionFileable) { + return m.groupPolicyUploadedDefinitionFiles +} +// GetImportedDeviceIdentities gets the importedDeviceIdentities property value. The imported device identities. +func (m *DeviceManagement) GetImportedDeviceIdentities()([]ImportedDeviceIdentityable) { + return m.importedDeviceIdentities +} +// GetImportedWindowsAutopilotDeviceIdentities gets the importedWindowsAutopilotDeviceIdentities property value. Collection of imported Windows autopilot devices. +func (m *DeviceManagement) GetImportedWindowsAutopilotDeviceIdentities()([]ImportedWindowsAutopilotDeviceIdentityable) { + return m.importedWindowsAutopilotDeviceIdentities +} +// GetIntents gets the intents property value. The device management intents +func (m *DeviceManagement) GetIntents()([]DeviceManagementIntentable) { + return m.intents +} +// GetIntuneAccountId gets the intuneAccountId property value. Intune Account ID for given tenant +func (m *DeviceManagement) GetIntuneAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.intuneAccountId +} +// GetIntuneBrand gets the intuneBrand property value. intuneBrand contains data which is used in customizing the appearance of the Company Portal applications as well as the end user web portal. +func (m *DeviceManagement) GetIntuneBrand()(IntuneBrandable) { + return m.intuneBrand +} +// GetIntuneBrandingProfiles gets the intuneBrandingProfiles property value. Intune branding profiles targeted to AAD groups +func (m *DeviceManagement) GetIntuneBrandingProfiles()([]IntuneBrandingProfileable) { + return m.intuneBrandingProfiles +} +// GetIosUpdateStatuses gets the iosUpdateStatuses property value. The IOS software update installation statuses for this account. +func (m *DeviceManagement) GetIosUpdateStatuses()([]IosUpdateDeviceStatusable) { + return m.iosUpdateStatuses +} +// GetLastReportAggregationDateTime gets the lastReportAggregationDateTime property value. The last modified time of reporting for this account. This property is read-only. +func (m *DeviceManagement) GetLastReportAggregationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportAggregationDateTime +} +// GetLegacyPcManangementEnabled gets the legacyPcManangementEnabled property value. The property to enable Non-MDM managed legacy PC management for this account. This property is read-only. +func (m *DeviceManagement) GetLegacyPcManangementEnabled()(*bool) { + return m.legacyPcManangementEnabled +} +// GetMacOSSoftwareUpdateAccountSummaries gets the macOSSoftwareUpdateAccountSummaries property value. The MacOS software update account summaries for this account. +func (m *DeviceManagement) GetMacOSSoftwareUpdateAccountSummaries()([]MacOSSoftwareUpdateAccountSummaryable) { + return m.macOSSoftwareUpdateAccountSummaries +} +// GetManagedDeviceCleanupSettings gets the managedDeviceCleanupSettings property value. Device cleanup rule +func (m *DeviceManagement) GetManagedDeviceCleanupSettings()(ManagedDeviceCleanupSettingsable) { + return m.managedDeviceCleanupSettings +} +// GetManagedDeviceEncryptionStates gets the managedDeviceEncryptionStates property value. Encryption report for devices in this account +func (m *DeviceManagement) GetManagedDeviceEncryptionStates()([]ManagedDeviceEncryptionStateable) { + return m.managedDeviceEncryptionStates +} +// GetManagedDeviceOverview gets the managedDeviceOverview property value. Device overview +func (m *DeviceManagement) GetManagedDeviceOverview()(ManagedDeviceOverviewable) { + return m.managedDeviceOverview +} +// GetManagedDevices gets the managedDevices property value. The list of managed devices. +func (m *DeviceManagement) GetManagedDevices()([]ManagedDeviceable) { + return m.managedDevices +} +// GetMaximumDepTokens gets the maximumDepTokens property value. Maximum number of DEP tokens allowed per-tenant. +func (m *DeviceManagement) GetMaximumDepTokens()(*int32) { + return m.maximumDepTokens +} +// GetMicrosoftTunnelConfigurations gets the microsoftTunnelConfigurations property value. Collection of MicrosoftTunnelConfiguration settings associated with account. +func (m *DeviceManagement) GetMicrosoftTunnelConfigurations()([]MicrosoftTunnelConfigurationable) { + return m.microsoftTunnelConfigurations +} +// GetMicrosoftTunnelHealthThresholds gets the microsoftTunnelHealthThresholds property value. Collection of MicrosoftTunnelHealthThreshold settings associated with account. +func (m *DeviceManagement) GetMicrosoftTunnelHealthThresholds()([]MicrosoftTunnelHealthThresholdable) { + return m.microsoftTunnelHealthThresholds +} +// GetMicrosoftTunnelServerLogCollectionResponses gets the microsoftTunnelServerLogCollectionResponses property value. Collection of MicrosoftTunnelServerLogCollectionResponse settings associated with account. +func (m *DeviceManagement) GetMicrosoftTunnelServerLogCollectionResponses()([]MicrosoftTunnelServerLogCollectionResponseable) { + return m.microsoftTunnelServerLogCollectionResponses +} +// GetMicrosoftTunnelSites gets the microsoftTunnelSites property value. Collection of MicrosoftTunnelSite settings associated with account. +func (m *DeviceManagement) GetMicrosoftTunnelSites()([]MicrosoftTunnelSiteable) { + return m.microsoftTunnelSites +} +// GetMobileAppTroubleshootingEvents gets the mobileAppTroubleshootingEvents property value. The collection property of MobileAppTroubleshootingEvent. +func (m *DeviceManagement) GetMobileAppTroubleshootingEvents()([]MobileAppTroubleshootingEventable) { + return m.mobileAppTroubleshootingEvents +} +// GetMobileThreatDefenseConnectors gets the mobileThreatDefenseConnectors property value. The list of Mobile threat Defense connectors configured by the tenant. +func (m *DeviceManagement) GetMobileThreatDefenseConnectors()([]MobileThreatDefenseConnectorable) { + return m.mobileThreatDefenseConnectors +} +// GetNdesConnectors gets the ndesConnectors property value. The collection of Ndes connectors for this account. +func (m *DeviceManagement) GetNdesConnectors()([]NdesConnectorable) { + return m.ndesConnectors +} +// GetNotificationMessageTemplates gets the notificationMessageTemplates property value. The Notification Message Templates. +func (m *DeviceManagement) GetNotificationMessageTemplates()([]NotificationMessageTemplateable) { + return m.notificationMessageTemplates +} +// GetOemWarrantyInformationOnboarding gets the oemWarrantyInformationOnboarding property value. List of OEM Warranty Statuses +func (m *DeviceManagement) GetOemWarrantyInformationOnboarding()([]OemWarrantyInformationOnboardingable) { + return m.oemWarrantyInformationOnboarding +} +// GetRemoteActionAudits gets the remoteActionAudits property value. The list of device remote action audits with the tenant. +func (m *DeviceManagement) GetRemoteActionAudits()([]RemoteActionAuditable) { + return m.remoteActionAudits +} +// GetRemoteAssistancePartners gets the remoteAssistancePartners property value. The remote assist partners. +func (m *DeviceManagement) GetRemoteAssistancePartners()([]RemoteAssistancePartnerable) { + return m.remoteAssistancePartners +} +// GetRemoteAssistanceSettings gets the remoteAssistanceSettings property value. The remote assistance settings singleton +func (m *DeviceManagement) GetRemoteAssistanceSettings()(RemoteAssistanceSettingsable) { + return m.remoteAssistanceSettings +} +// GetReports gets the reports property value. Reports singleton +func (m *DeviceManagement) GetReports()(DeviceManagementReportsable) { + return m.reports +} +// GetResourceAccessProfiles gets the resourceAccessProfiles property value. Collection of resource access settings associated with account. +func (m *DeviceManagement) GetResourceAccessProfiles()([]DeviceManagementResourceAccessProfileBaseable) { + return m.resourceAccessProfiles +} +// GetResourceOperations gets the resourceOperations property value. The Resource Operations. +func (m *DeviceManagement) GetResourceOperations()([]ResourceOperationable) { + return m.resourceOperations +} +// GetReusablePolicySettings gets the reusablePolicySettings property value. List of all reusable settings that can be referred in a policy +func (m *DeviceManagement) GetReusablePolicySettings()([]DeviceManagementReusablePolicySettingable) { + return m.reusablePolicySettings +} +// GetReusableSettings gets the reusableSettings property value. List of all reusable settings +func (m *DeviceManagement) GetReusableSettings()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.reusableSettings +} +// GetRoleAssignments gets the roleAssignments property value. The Role Assignments. +func (m *DeviceManagement) GetRoleAssignments()([]DeviceAndAppManagementRoleAssignmentable) { + return m.roleAssignments +} +// GetRoleDefinitions gets the roleDefinitions property value. The Role Definitions. +func (m *DeviceManagement) GetRoleDefinitions()([]RoleDefinitionable) { + return m.roleDefinitions +} +// GetRoleScopeTags gets the roleScopeTags property value. The Role Scope Tags. +func (m *DeviceManagement) GetRoleScopeTags()([]RoleScopeTagable) { + return m.roleScopeTags +} +// GetSettingDefinitions gets the settingDefinitions property value. The device management intent setting definitions +func (m *DeviceManagement) GetSettingDefinitions()([]DeviceManagementSettingDefinitionable) { + return m.settingDefinitions +} +// GetSettings gets the settings property value. Account level settings. +func (m *DeviceManagement) GetSettings()(DeviceManagementSettingsable) { + return m.settings +} +// GetSoftwareUpdateStatusSummary gets the softwareUpdateStatusSummary property value. The software update status summary. +func (m *DeviceManagement) GetSoftwareUpdateStatusSummary()(SoftwareUpdateStatusSummaryable) { + return m.softwareUpdateStatusSummary +} +// GetSubscriptions gets the subscriptions property value. Tenant mobile device management subscriptions. +func (m *DeviceManagement) GetSubscriptions()(*DeviceManagementSubscriptions) { + return m.subscriptions +} +// GetSubscriptionState gets the subscriptionState property value. Tenant mobile device management subscription state. +func (m *DeviceManagement) GetSubscriptionState()(*DeviceManagementSubscriptionState) { + return m.subscriptionState +} +// GetTelecomExpenseManagementPartners gets the telecomExpenseManagementPartners property value. The telecom expense management partners. +func (m *DeviceManagement) GetTelecomExpenseManagementPartners()([]TelecomExpenseManagementPartnerable) { + return m.telecomExpenseManagementPartners +} +// GetTemplates gets the templates property value. The available templates +func (m *DeviceManagement) GetTemplates()([]DeviceManagementTemplateable) { + return m.templates +} +// GetTemplateSettings gets the templateSettings property value. List of all TemplateSettings +func (m *DeviceManagement) GetTemplateSettings()([]DeviceManagementConfigurationSettingTemplateable) { + return m.templateSettings +} +// GetTenantAttachRBAC gets the tenantAttachRBAC property value. TenantAttach RBAC Enablement +func (m *DeviceManagement) GetTenantAttachRBAC()(TenantAttachRBACable) { + return m.tenantAttachRBAC +} +// GetTermsAndConditions gets the termsAndConditions property value. The terms and conditions associated with device management of the company. +func (m *DeviceManagement) GetTermsAndConditions()([]TermsAndConditionsable) { + return m.termsAndConditions +} +// GetTroubleshootingEvents gets the troubleshootingEvents property value. The list of troubleshooting events for the tenant. +func (m *DeviceManagement) GetTroubleshootingEvents()([]DeviceManagementTroubleshootingEventable) { + return m.troubleshootingEvents +} +// GetUnlicensedAdminstratorsEnabled gets the unlicensedAdminstratorsEnabled property value. When enabled, users assigned as administrators via Role Assignment Memberships do not require an assigned Intune license. Prior to this, only Intune licensed users were granted permissions with an Intune role unless they were assigned a role via Azure Active Directory. You are limited to 350 unlicensed direct members for each AAD security group in a role assignment, but you can assign multiple AAD security groups to a role if you need to support more than 350 unlicensed administrators. Licensed administrators are unaffected, do not have to be direct members, nor does the 350 member limit apply. This property is read-only. +func (m *DeviceManagement) GetUnlicensedAdminstratorsEnabled()(*bool) { + return m.unlicensedAdminstratorsEnabled +} +// GetUserExperienceAnalyticsAnomaly gets the userExperienceAnalyticsAnomaly property value. The user experience analytics anomaly entity contains anomaly details. +func (m *DeviceManagement) GetUserExperienceAnalyticsAnomaly()([]UserExperienceAnalyticsAnomalyable) { + return m.userExperienceAnalyticsAnomaly +} +// GetUserExperienceAnalyticsAnomalyDevice gets the userExperienceAnalyticsAnomalyDevice property value. The user experience analytics anomaly entity contains device details. +func (m *DeviceManagement) GetUserExperienceAnalyticsAnomalyDevice()([]UserExperienceAnalyticsAnomalyDeviceable) { + return m.userExperienceAnalyticsAnomalyDevice +} +// GetUserExperienceAnalyticsAnomalySeverityOverview gets the userExperienceAnalyticsAnomalySeverityOverview property value. The user experience analytics anomaly severity overview entity contains the count information for each severity of anomaly. +func (m *DeviceManagement) GetUserExperienceAnalyticsAnomalySeverityOverview()(UserExperienceAnalyticsAnomalySeverityOverviewable) { + return m.userExperienceAnalyticsAnomalySeverityOverview +} +// GetUserExperienceAnalyticsAppHealthApplicationPerformance gets the userExperienceAnalyticsAppHealthApplicationPerformance property value. User experience analytics appHealth Application Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthApplicationPerformance()([]UserExperienceAnalyticsAppHealthApplicationPerformanceable) { + return m.userExperienceAnalyticsAppHealthApplicationPerformance +} +// GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion gets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion property value. User experience analytics appHealth Application Performance by App Version +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable) { + return m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion +} +// GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails gets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property value. User experience analytics appHealth Application Performance by App Version details +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable) { + return m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails +} +// GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId gets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property value. User experience analytics appHealth Application Performance by App Version Device Id +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable) { + return m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId +} +// GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion gets the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property value. User experience analytics appHealth Application Performance by OS Version +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion()([]UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable) { + return m.userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion +} +// GetUserExperienceAnalyticsAppHealthDeviceModelPerformance gets the userExperienceAnalyticsAppHealthDeviceModelPerformance property value. User experience analytics appHealth Model Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthDeviceModelPerformance()([]UserExperienceAnalyticsAppHealthDeviceModelPerformanceable) { + return m.userExperienceAnalyticsAppHealthDeviceModelPerformance +} +// GetUserExperienceAnalyticsAppHealthDevicePerformance gets the userExperienceAnalyticsAppHealthDevicePerformance property value. User experience analytics appHealth Device Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthDevicePerformance()([]UserExperienceAnalyticsAppHealthDevicePerformanceable) { + return m.userExperienceAnalyticsAppHealthDevicePerformance +} +// GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails gets the userExperienceAnalyticsAppHealthDevicePerformanceDetails property value. User experience analytics device performance details +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails()([]UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable) { + return m.userExperienceAnalyticsAppHealthDevicePerformanceDetails +} +// GetUserExperienceAnalyticsAppHealthOSVersionPerformance gets the userExperienceAnalyticsAppHealthOSVersionPerformance property value. User experience analytics appHealth OS version Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthOSVersionPerformance()([]UserExperienceAnalyticsAppHealthOSVersionPerformanceable) { + return m.userExperienceAnalyticsAppHealthOSVersionPerformance +} +// GetUserExperienceAnalyticsAppHealthOverview gets the userExperienceAnalyticsAppHealthOverview property value. User experience analytics appHealth overview +func (m *DeviceManagement) GetUserExperienceAnalyticsAppHealthOverview()(UserExperienceAnalyticsCategoryable) { + return m.userExperienceAnalyticsAppHealthOverview +} +// GetUserExperienceAnalyticsBaselines gets the userExperienceAnalyticsBaselines property value. User experience analytics baselines +func (m *DeviceManagement) GetUserExperienceAnalyticsBaselines()([]UserExperienceAnalyticsBaselineable) { + return m.userExperienceAnalyticsBaselines +} +// GetUserExperienceAnalyticsBatteryHealthAppImpact gets the userExperienceAnalyticsBatteryHealthAppImpact property value. User Experience Analytics Battery Health App Impact +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthAppImpact()([]UserExperienceAnalyticsBatteryHealthAppImpactable) { + return m.userExperienceAnalyticsBatteryHealthAppImpact +} +// GetUserExperienceAnalyticsBatteryHealthCapacityDetails gets the userExperienceAnalyticsBatteryHealthCapacityDetails property value. User Experience Analytics Battery Health Capacity Details +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthCapacityDetails()(UserExperienceAnalyticsBatteryHealthCapacityDetailsable) { + return m.userExperienceAnalyticsBatteryHealthCapacityDetails +} +// GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact gets the userExperienceAnalyticsBatteryHealthDeviceAppImpact property value. User Experience Analytics Battery Health Device App Impact +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact()([]UserExperienceAnalyticsBatteryHealthDeviceAppImpactable) { + return m.userExperienceAnalyticsBatteryHealthDeviceAppImpact +} +// GetUserExperienceAnalyticsBatteryHealthDevicePerformance gets the userExperienceAnalyticsBatteryHealthDevicePerformance property value. User Experience Analytics Battery Health Device Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthDevicePerformance()([]UserExperienceAnalyticsBatteryHealthDevicePerformanceable) { + return m.userExperienceAnalyticsBatteryHealthDevicePerformance +} +// GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory gets the userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory property value. User Experience Analytics Battery Health Device Runtime History +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory()([]UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable) { + return m.userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory +} +// GetUserExperienceAnalyticsBatteryHealthModelPerformance gets the userExperienceAnalyticsBatteryHealthModelPerformance property value. User Experience Analytics Battery Health Model Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthModelPerformance()([]UserExperienceAnalyticsBatteryHealthModelPerformanceable) { + return m.userExperienceAnalyticsBatteryHealthModelPerformance +} +// GetUserExperienceAnalyticsBatteryHealthOsPerformance gets the userExperienceAnalyticsBatteryHealthOsPerformance property value. User Experience Analytics Battery Health Os Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthOsPerformance()([]UserExperienceAnalyticsBatteryHealthOsPerformanceable) { + return m.userExperienceAnalyticsBatteryHealthOsPerformance +} +// GetUserExperienceAnalyticsBatteryHealthRuntimeDetails gets the userExperienceAnalyticsBatteryHealthRuntimeDetails property value. User Experience Analytics Battery Health Runtime Details +func (m *DeviceManagement) GetUserExperienceAnalyticsBatteryHealthRuntimeDetails()(UserExperienceAnalyticsBatteryHealthRuntimeDetailsable) { + return m.userExperienceAnalyticsBatteryHealthRuntimeDetails +} +// GetUserExperienceAnalyticsCategories gets the userExperienceAnalyticsCategories property value. User experience analytics categories +func (m *DeviceManagement) GetUserExperienceAnalyticsCategories()([]UserExperienceAnalyticsCategoryable) { + return m.userExperienceAnalyticsCategories +} +// GetUserExperienceAnalyticsDeviceMetricHistory gets the userExperienceAnalyticsDeviceMetricHistory property value. User experience analytics device metric history +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceMetricHistory()([]UserExperienceAnalyticsMetricHistoryable) { + return m.userExperienceAnalyticsDeviceMetricHistory +} +// GetUserExperienceAnalyticsDevicePerformance gets the userExperienceAnalyticsDevicePerformance property value. User experience analytics device performance +func (m *DeviceManagement) GetUserExperienceAnalyticsDevicePerformance()([]UserExperienceAnalyticsDevicePerformanceable) { + return m.userExperienceAnalyticsDevicePerformance +} +// GetUserExperienceAnalyticsDeviceScope gets the userExperienceAnalyticsDeviceScope property value. The user experience analytics device scope entity endpoint to trigger on the service to either START or STOP computing metrics data based on a device scope configuration. +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceScope()(UserExperienceAnalyticsDeviceScopeable) { + return m.userExperienceAnalyticsDeviceScope +} +// GetUserExperienceAnalyticsDeviceScopes gets the userExperienceAnalyticsDeviceScopes property value. The user experience analytics device scope entity contains device scope configuration use to apply filtering on the endpoint analytics reports. +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceScopes()([]UserExperienceAnalyticsDeviceScopeable) { + return m.userExperienceAnalyticsDeviceScopes +} +// GetUserExperienceAnalyticsDeviceScores gets the userExperienceAnalyticsDeviceScores property value. User experience analytics device scores +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceScores()([]UserExperienceAnalyticsDeviceScoresable) { + return m.userExperienceAnalyticsDeviceScores +} +// GetUserExperienceAnalyticsDeviceStartupHistory gets the userExperienceAnalyticsDeviceStartupHistory property value. User experience analytics device Startup History +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceStartupHistory()([]UserExperienceAnalyticsDeviceStartupHistoryable) { + return m.userExperienceAnalyticsDeviceStartupHistory +} +// GetUserExperienceAnalyticsDeviceStartupProcesses gets the userExperienceAnalyticsDeviceStartupProcesses property value. User experience analytics device Startup Processes +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceStartupProcesses()([]UserExperienceAnalyticsDeviceStartupProcessable) { + return m.userExperienceAnalyticsDeviceStartupProcesses +} +// GetUserExperienceAnalyticsDeviceStartupProcessPerformance gets the userExperienceAnalyticsDeviceStartupProcessPerformance property value. User experience analytics device Startup Process Performance +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceStartupProcessPerformance()([]UserExperienceAnalyticsDeviceStartupProcessPerformanceable) { + return m.userExperienceAnalyticsDeviceStartupProcessPerformance +} +// GetUserExperienceAnalyticsDevicesWithoutCloudIdentity gets the userExperienceAnalyticsDevicesWithoutCloudIdentity property value. User experience analytics devices without cloud identity. +func (m *DeviceManagement) GetUserExperienceAnalyticsDevicesWithoutCloudIdentity()([]UserExperienceAnalyticsDeviceWithoutCloudIdentityable) { + return m.userExperienceAnalyticsDevicesWithoutCloudIdentity +} +// GetUserExperienceAnalyticsDeviceTimelineEvents gets the userExperienceAnalyticsDeviceTimelineEvents property value. The user experience analytics device events entity contains NRT device timeline events details. +func (m *DeviceManagement) GetUserExperienceAnalyticsDeviceTimelineEvents()([]UserExperienceAnalyticsDeviceTimelineEventsable) { + return m.userExperienceAnalyticsDeviceTimelineEvents +} +// GetUserExperienceAnalyticsImpactingProcess gets the userExperienceAnalyticsImpactingProcess property value. User experience analytics impacting process +func (m *DeviceManagement) GetUserExperienceAnalyticsImpactingProcess()([]UserExperienceAnalyticsImpactingProcessable) { + return m.userExperienceAnalyticsImpactingProcess +} +// GetUserExperienceAnalyticsMetricHistory gets the userExperienceAnalyticsMetricHistory property value. User experience analytics metric history +func (m *DeviceManagement) GetUserExperienceAnalyticsMetricHistory()([]UserExperienceAnalyticsMetricHistoryable) { + return m.userExperienceAnalyticsMetricHistory +} +// GetUserExperienceAnalyticsModelScores gets the userExperienceAnalyticsModelScores property value. User experience analytics model scores +func (m *DeviceManagement) GetUserExperienceAnalyticsModelScores()([]UserExperienceAnalyticsModelScoresable) { + return m.userExperienceAnalyticsModelScores +} +// GetUserExperienceAnalyticsNotAutopilotReadyDevice gets the userExperienceAnalyticsNotAutopilotReadyDevice property value. User experience analytics devices not Windows Autopilot ready. +func (m *DeviceManagement) GetUserExperienceAnalyticsNotAutopilotReadyDevice()([]UserExperienceAnalyticsNotAutopilotReadyDeviceable) { + return m.userExperienceAnalyticsNotAutopilotReadyDevice +} +// GetUserExperienceAnalyticsOverview gets the userExperienceAnalyticsOverview property value. User experience analytics overview +func (m *DeviceManagement) GetUserExperienceAnalyticsOverview()(UserExperienceAnalyticsOverviewable) { + return m.userExperienceAnalyticsOverview +} +// GetUserExperienceAnalyticsRemoteConnection gets the userExperienceAnalyticsRemoteConnection property value. User experience analytics remote connection +func (m *DeviceManagement) GetUserExperienceAnalyticsRemoteConnection()([]UserExperienceAnalyticsRemoteConnectionable) { + return m.userExperienceAnalyticsRemoteConnection +} +// GetUserExperienceAnalyticsResourcePerformance gets the userExperienceAnalyticsResourcePerformance property value. User experience analytics resource performance +func (m *DeviceManagement) GetUserExperienceAnalyticsResourcePerformance()([]UserExperienceAnalyticsResourcePerformanceable) { + return m.userExperienceAnalyticsResourcePerformance +} +// GetUserExperienceAnalyticsScoreHistory gets the userExperienceAnalyticsScoreHistory property value. User experience analytics device Startup Score History +func (m *DeviceManagement) GetUserExperienceAnalyticsScoreHistory()([]UserExperienceAnalyticsScoreHistoryable) { + return m.userExperienceAnalyticsScoreHistory +} +// GetUserExperienceAnalyticsSettings gets the userExperienceAnalyticsSettings property value. User experience analytics device settings +func (m *DeviceManagement) GetUserExperienceAnalyticsSettings()(UserExperienceAnalyticsSettingsable) { + return m.userExperienceAnalyticsSettings +} +// GetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric gets the userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric property value. User experience analytics work from anywhere hardware readiness metrics. +func (m *DeviceManagement) GetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric()(UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable) { + return m.userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric +} +// GetUserExperienceAnalyticsWorkFromAnywhereMetrics gets the userExperienceAnalyticsWorkFromAnywhereMetrics property value. User experience analytics work from anywhere metrics. +func (m *DeviceManagement) GetUserExperienceAnalyticsWorkFromAnywhereMetrics()([]UserExperienceAnalyticsWorkFromAnywhereMetricable) { + return m.userExperienceAnalyticsWorkFromAnywhereMetrics +} +// GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance gets the userExperienceAnalyticsWorkFromAnywhereModelPerformance property value. The user experience analytics work from anywhere model performance +func (m *DeviceManagement) GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance()([]UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable) { + return m.userExperienceAnalyticsWorkFromAnywhereModelPerformance +} +// GetUserPfxCertificates gets the userPfxCertificates property value. Collection of PFX certificates associated with a user. +func (m *DeviceManagement) GetUserPfxCertificates()([]UserPFXCertificateable) { + return m.userPfxCertificates +} +// GetVirtualEndpoint gets the virtualEndpoint property value. The virtualEndpoint property +func (m *DeviceManagement) GetVirtualEndpoint()(VirtualEndpointable) { + return m.virtualEndpoint +} +// GetWindowsAutopilotDeploymentProfiles gets the windowsAutopilotDeploymentProfiles property value. Windows auto pilot deployment profiles +func (m *DeviceManagement) GetWindowsAutopilotDeploymentProfiles()([]WindowsAutopilotDeploymentProfileable) { + return m.windowsAutopilotDeploymentProfiles +} +// GetWindowsAutopilotDeviceIdentities gets the windowsAutopilotDeviceIdentities property value. The Windows autopilot device identities contained collection. +func (m *DeviceManagement) GetWindowsAutopilotDeviceIdentities()([]WindowsAutopilotDeviceIdentityable) { + return m.windowsAutopilotDeviceIdentities +} +// GetWindowsAutopilotSettings gets the windowsAutopilotSettings property value. The Windows autopilot account settings. +func (m *DeviceManagement) GetWindowsAutopilotSettings()(WindowsAutopilotSettingsable) { + return m.windowsAutopilotSettings +} +// GetWindowsDriverUpdateProfiles gets the windowsDriverUpdateProfiles property value. A collection of windows driver update profiles +func (m *DeviceManagement) GetWindowsDriverUpdateProfiles()([]WindowsDriverUpdateProfileable) { + return m.windowsDriverUpdateProfiles +} +// GetWindowsFeatureUpdateProfiles gets the windowsFeatureUpdateProfiles property value. A collection of windows feature update profiles +func (m *DeviceManagement) GetWindowsFeatureUpdateProfiles()([]WindowsFeatureUpdateProfileable) { + return m.windowsFeatureUpdateProfiles +} +// GetWindowsInformationProtectionAppLearningSummaries gets the windowsInformationProtectionAppLearningSummaries property value. The windows information protection app learning summaries. +func (m *DeviceManagement) GetWindowsInformationProtectionAppLearningSummaries()([]WindowsInformationProtectionAppLearningSummaryable) { + return m.windowsInformationProtectionAppLearningSummaries +} +// GetWindowsInformationProtectionNetworkLearningSummaries gets the windowsInformationProtectionNetworkLearningSummaries property value. The windows information protection network learning summaries. +func (m *DeviceManagement) GetWindowsInformationProtectionNetworkLearningSummaries()([]WindowsInformationProtectionNetworkLearningSummaryable) { + return m.windowsInformationProtectionNetworkLearningSummaries +} +// GetWindowsMalwareInformation gets the windowsMalwareInformation property value. The list of affected malware in the tenant. +func (m *DeviceManagement) GetWindowsMalwareInformation()([]WindowsMalwareInformationable) { + return m.windowsMalwareInformation +} +// GetWindowsMalwareOverview gets the windowsMalwareOverview property value. Malware overview for windows devices. +func (m *DeviceManagement) GetWindowsMalwareOverview()(WindowsMalwareOverviewable) { + return m.windowsMalwareOverview +} +// GetWindowsQualityUpdateProfiles gets the windowsQualityUpdateProfiles property value. A collection of windows quality update profiles +func (m *DeviceManagement) GetWindowsQualityUpdateProfiles()([]WindowsQualityUpdateProfileable) { + return m.windowsQualityUpdateProfiles +} +// GetWindowsUpdateCatalogItems gets the windowsUpdateCatalogItems property value. A collection of windows update catalog items (fetaure updates item , quality updates item) +func (m *DeviceManagement) GetWindowsUpdateCatalogItems()([]WindowsUpdateCatalogItemable) { + return m.windowsUpdateCatalogItems +} +// GetZebraFotaArtifacts gets the zebraFotaArtifacts property value. The Collection of ZebraFotaArtifacts. +func (m *DeviceManagement) GetZebraFotaArtifacts()([]ZebraFotaArtifactable) { + return m.zebraFotaArtifacts +} +// GetZebraFotaConnector gets the zebraFotaConnector property value. The singleton ZebraFotaConnector associated with account. +func (m *DeviceManagement) GetZebraFotaConnector()(ZebraFotaConnectorable) { + return m.zebraFotaConnector +} +// GetZebraFotaDeployments gets the zebraFotaDeployments property value. Collection of ZebraFotaDeployments associated with account. +func (m *DeviceManagement) GetZebraFotaDeployments()([]ZebraFotaDeploymentable) { + return m.zebraFotaDeployments +} +// Serialize serializes information the current object +func (m *DeviceManagement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("accountMoveCompletionDateTime", m.GetAccountMoveCompletionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("adminConsent", m.GetAdminConsent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("advancedThreatProtectionOnboardingStateSummary", m.GetAdvancedThreatProtectionOnboardingStateSummary()) + if err != nil { + return err + } + } + if m.GetAndroidDeviceOwnerEnrollmentProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidDeviceOwnerEnrollmentProfiles())) + for i, v := range m.GetAndroidDeviceOwnerEnrollmentProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidDeviceOwnerEnrollmentProfiles", cast) + if err != nil { + return err + } + } + if m.GetAndroidForWorkAppConfigurationSchemas() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidForWorkAppConfigurationSchemas())) + for i, v := range m.GetAndroidForWorkAppConfigurationSchemas() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidForWorkAppConfigurationSchemas", cast) + if err != nil { + return err + } + } + if m.GetAndroidForWorkEnrollmentProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidForWorkEnrollmentProfiles())) + for i, v := range m.GetAndroidForWorkEnrollmentProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidForWorkEnrollmentProfiles", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("androidForWorkSettings", m.GetAndroidForWorkSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("androidManagedStoreAccountEnterpriseSettings", m.GetAndroidManagedStoreAccountEnterpriseSettings()) + if err != nil { + return err + } + } + if m.GetAndroidManagedStoreAppConfigurationSchemas() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAndroidManagedStoreAppConfigurationSchemas())) + for i, v := range m.GetAndroidManagedStoreAppConfigurationSchemas() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("androidManagedStoreAppConfigurationSchemas", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("applePushNotificationCertificate", m.GetApplePushNotificationCertificate()) + if err != nil { + return err + } + } + if m.GetAppleUserInitiatedEnrollmentProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppleUserInitiatedEnrollmentProfiles())) + for i, v := range m.GetAppleUserInitiatedEnrollmentProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appleUserInitiatedEnrollmentProfiles", cast) + if err != nil { + return err + } + } + if m.GetAssignmentFilters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentFilters())) + for i, v := range m.GetAssignmentFilters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentFilters", cast) + if err != nil { + return err + } + } + if m.GetAuditEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuditEvents())) + for i, v := range m.GetAuditEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("auditEvents", cast) + if err != nil { + return err + } + } + if m.GetAutopilotEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAutopilotEvents())) + for i, v := range m.GetAutopilotEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("autopilotEvents", cast) + if err != nil { + return err + } + } + if m.GetCartToClassAssociations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCartToClassAssociations())) + for i, v := range m.GetCartToClassAssociations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cartToClassAssociations", cast) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + if m.GetCertificateConnectorDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificateConnectorDetails())) + for i, v := range m.GetCertificateConnectorDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("certificateConnectorDetails", cast) + if err != nil { + return err + } + } + if m.GetChromeOSOnboardingSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChromeOSOnboardingSettings())) + for i, v := range m.GetChromeOSOnboardingSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("chromeOSOnboardingSettings", cast) + if err != nil { + return err + } + } + if m.GetCloudPCConnectivityIssues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudPCConnectivityIssues())) + for i, v := range m.GetCloudPCConnectivityIssues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudPCConnectivityIssues", cast) + if err != nil { + return err + } + } + if m.GetComanagedDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComanagedDevices())) + for i, v := range m.GetComanagedDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comanagedDevices", cast) + if err != nil { + return err + } + } + if m.GetComanagementEligibleDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComanagementEligibleDevices())) + for i, v := range m.GetComanagementEligibleDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comanagementEligibleDevices", cast) + if err != nil { + return err + } + } + if m.GetComplianceCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComplianceCategories())) + for i, v := range m.GetComplianceCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("complianceCategories", cast) + if err != nil { + return err + } + } + if m.GetComplianceManagementPartners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComplianceManagementPartners())) + for i, v := range m.GetComplianceManagementPartners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("complianceManagementPartners", cast) + if err != nil { + return err + } + } + if m.GetCompliancePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompliancePolicies())) + for i, v := range m.GetCompliancePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("compliancePolicies", cast) + if err != nil { + return err + } + } + if m.GetComplianceSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComplianceSettings())) + for i, v := range m.GetComplianceSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("complianceSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conditionalAccessSettings", m.GetConditionalAccessSettings()) + if err != nil { + return err + } + } + if m.GetConfigManagerCollections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigManagerCollections())) + for i, v := range m.GetConfigManagerCollections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configManagerCollections", cast) + if err != nil { + return err + } + } + if m.GetConfigurationCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurationCategories())) + for i, v := range m.GetConfigurationCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurationCategories", cast) + if err != nil { + return err + } + } + if m.GetConfigurationPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurationPolicies())) + for i, v := range m.GetConfigurationPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurationPolicies", cast) + if err != nil { + return err + } + } + if m.GetConfigurationPolicyTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurationPolicyTemplates())) + for i, v := range m.GetConfigurationPolicyTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurationPolicyTemplates", cast) + if err != nil { + return err + } + } + if m.GetConfigurationSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurationSettings())) + for i, v := range m.GetConfigurationSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurationSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("dataProcessorServiceForWindowsFeaturesOnboarding", m.GetDataProcessorServiceForWindowsFeaturesOnboarding()) + if err != nil { + return err + } + } + if m.GetDataSharingConsents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDataSharingConsents())) + for i, v := range m.GetDataSharingConsents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dataSharingConsents", cast) + if err != nil { + return err + } + } + if m.GetDepOnboardingSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDepOnboardingSettings())) + for i, v := range m.GetDepOnboardingSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("depOnboardingSettings", cast) + if err != nil { + return err + } + } + if m.GetDerivedCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDerivedCredentials())) + for i, v := range m.GetDerivedCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("derivedCredentials", cast) + if err != nil { + return err + } + } + if m.GetDetectedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetectedApps())) + for i, v := range m.GetDetectedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("detectedApps", cast) + if err != nil { + return err + } + } + if m.GetDeviceCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCategories())) + for i, v := range m.GetDeviceCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCategories", cast) + if err != nil { + return err + } + } + if m.GetDeviceCompliancePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCompliancePolicies())) + for i, v := range m.GetDeviceCompliancePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCompliancePolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceCompliancePolicyDeviceStateSummary", m.GetDeviceCompliancePolicyDeviceStateSummary()) + if err != nil { + return err + } + } + if m.GetDeviceCompliancePolicySettingStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCompliancePolicySettingStateSummaries())) + for i, v := range m.GetDeviceCompliancePolicySettingStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCompliancePolicySettingStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceComplianceScripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceComplianceScripts())) + for i, v := range m.GetDeviceComplianceScripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceComplianceScripts", cast) + if err != nil { + return err + } + } + if m.GetDeviceConfigurationConflictSummary() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceConfigurationConflictSummary())) + for i, v := range m.GetDeviceConfigurationConflictSummary() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceConfigurationConflictSummary", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceConfigurationDeviceStateSummaries", m.GetDeviceConfigurationDeviceStateSummaries()) + if err != nil { + return err + } + } + if m.GetDeviceConfigurationRestrictedAppsViolations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceConfigurationRestrictedAppsViolations())) + for i, v := range m.GetDeviceConfigurationRestrictedAppsViolations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceConfigurationRestrictedAppsViolations", cast) + if err != nil { + return err + } + } + if m.GetDeviceConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceConfigurations())) + for i, v := range m.GetDeviceConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceConfigurations", cast) + if err != nil { + return err + } + } + if m.GetDeviceConfigurationsAllManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceConfigurationsAllManagedDeviceCertificateStates())) + for i, v := range m.GetDeviceConfigurationsAllManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceConfigurationsAllManagedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceConfigurationUserStateSummaries", m.GetDeviceConfigurationUserStateSummaries()) + if err != nil { + return err + } + } + if m.GetDeviceCustomAttributeShellScripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCustomAttributeShellScripts())) + for i, v := range m.GetDeviceCustomAttributeShellScripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCustomAttributeShellScripts", cast) + if err != nil { + return err + } + } + if m.GetDeviceEnrollmentConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceEnrollmentConfigurations())) + for i, v := range m.GetDeviceEnrollmentConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceEnrollmentConfigurations", cast) + if err != nil { + return err + } + } + if m.GetDeviceHealthScripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceHealthScripts())) + for i, v := range m.GetDeviceHealthScripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceHealthScripts", cast) + if err != nil { + return err + } + } + if m.GetDeviceManagementPartners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceManagementPartners())) + for i, v := range m.GetDeviceManagementPartners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceManagementPartners", cast) + if err != nil { + return err + } + } + if m.GetDeviceManagementScripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceManagementScripts())) + for i, v := range m.GetDeviceManagementScripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceManagementScripts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceProtectionOverview", m.GetDeviceProtectionOverview()) + if err != nil { + return err + } + } + if m.GetDeviceShellScripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceShellScripts())) + for i, v := range m.GetDeviceShellScripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceShellScripts", cast) + if err != nil { + return err + } + } + if m.GetDomainJoinConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDomainJoinConnectors())) + for i, v := range m.GetDomainJoinConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("domainJoinConnectors", cast) + if err != nil { + return err + } + } + if m.GetEmbeddedSIMActivationCodePools() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmbeddedSIMActivationCodePools())) + for i, v := range m.GetEmbeddedSIMActivationCodePools() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("embeddedSIMActivationCodePools", cast) + if err != nil { + return err + } + } + if m.GetExchangeConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExchangeConnectors())) + for i, v := range m.GetExchangeConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exchangeConnectors", cast) + if err != nil { + return err + } + } + if m.GetExchangeOnPremisesPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExchangeOnPremisesPolicies())) + for i, v := range m.GetExchangeOnPremisesPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exchangeOnPremisesPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("exchangeOnPremisesPolicy", m.GetExchangeOnPremisesPolicy()) + if err != nil { + return err + } + } + if m.GetGroupPolicyCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyCategories())) + for i, v := range m.GetGroupPolicyCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyCategories", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyConfigurations())) + for i, v := range m.GetGroupPolicyConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyConfigurations", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyDefinitionFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyDefinitionFiles())) + for i, v := range m.GetGroupPolicyDefinitionFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyDefinitionFiles", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyDefinitions())) + for i, v := range m.GetGroupPolicyDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyDefinitions", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyMigrationReports() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyMigrationReports())) + for i, v := range m.GetGroupPolicyMigrationReports() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyMigrationReports", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyObjectFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyObjectFiles())) + for i, v := range m.GetGroupPolicyObjectFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyObjectFiles", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyUploadedDefinitionFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyUploadedDefinitionFiles())) + for i, v := range m.GetGroupPolicyUploadedDefinitionFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyUploadedDefinitionFiles", cast) + if err != nil { + return err + } + } + if m.GetImportedDeviceIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImportedDeviceIdentities())) + for i, v := range m.GetImportedDeviceIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("importedDeviceIdentities", cast) + if err != nil { + return err + } + } + if m.GetImportedWindowsAutopilotDeviceIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImportedWindowsAutopilotDeviceIdentities())) + for i, v := range m.GetImportedWindowsAutopilotDeviceIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("importedWindowsAutopilotDeviceIdentities", cast) + if err != nil { + return err + } + } + if m.GetIntents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIntents())) + for i, v := range m.GetIntents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("intents", cast) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("intuneAccountId", m.GetIntuneAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("intuneBrand", m.GetIntuneBrand()) + if err != nil { + return err + } + } + if m.GetIntuneBrandingProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIntuneBrandingProfiles())) + for i, v := range m.GetIntuneBrandingProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("intuneBrandingProfiles", cast) + if err != nil { + return err + } + } + if m.GetIosUpdateStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIosUpdateStatuses())) + for i, v := range m.GetIosUpdateStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("iosUpdateStatuses", cast) + if err != nil { + return err + } + } + if m.GetMacOSSoftwareUpdateAccountSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMacOSSoftwareUpdateAccountSummaries())) + for i, v := range m.GetMacOSSoftwareUpdateAccountSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("macOSSoftwareUpdateAccountSummaries", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDeviceCleanupSettings", m.GetManagedDeviceCleanupSettings()) + if err != nil { + return err + } + } + if m.GetManagedDeviceEncryptionStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceEncryptionStates())) + for i, v := range m.GetManagedDeviceEncryptionStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceEncryptionStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDeviceOverview", m.GetManagedDeviceOverview()) + if err != nil { + return err + } + } + if m.GetManagedDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDevices())) + for i, v := range m.GetManagedDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDevices", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maximumDepTokens", m.GetMaximumDepTokens()) + if err != nil { + return err + } + } + if m.GetMicrosoftTunnelConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftTunnelConfigurations())) + for i, v := range m.GetMicrosoftTunnelConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftTunnelConfigurations", cast) + if err != nil { + return err + } + } + if m.GetMicrosoftTunnelHealthThresholds() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftTunnelHealthThresholds())) + for i, v := range m.GetMicrosoftTunnelHealthThresholds() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftTunnelHealthThresholds", cast) + if err != nil { + return err + } + } + if m.GetMicrosoftTunnelServerLogCollectionResponses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftTunnelServerLogCollectionResponses())) + for i, v := range m.GetMicrosoftTunnelServerLogCollectionResponses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftTunnelServerLogCollectionResponses", cast) + if err != nil { + return err + } + } + if m.GetMicrosoftTunnelSites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftTunnelSites())) + for i, v := range m.GetMicrosoftTunnelSites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftTunnelSites", cast) + if err != nil { + return err + } + } + if m.GetMobileAppTroubleshootingEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileAppTroubleshootingEvents())) + for i, v := range m.GetMobileAppTroubleshootingEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileAppTroubleshootingEvents", cast) + if err != nil { + return err + } + } + if m.GetMobileThreatDefenseConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileThreatDefenseConnectors())) + for i, v := range m.GetMobileThreatDefenseConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileThreatDefenseConnectors", cast) + if err != nil { + return err + } + } + if m.GetNdesConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNdesConnectors())) + for i, v := range m.GetNdesConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ndesConnectors", cast) + if err != nil { + return err + } + } + if m.GetNotificationMessageTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotificationMessageTemplates())) + for i, v := range m.GetNotificationMessageTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("notificationMessageTemplates", cast) + if err != nil { + return err + } + } + if m.GetOemWarrantyInformationOnboarding() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOemWarrantyInformationOnboarding())) + for i, v := range m.GetOemWarrantyInformationOnboarding() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("oemWarrantyInformationOnboarding", cast) + if err != nil { + return err + } + } + if m.GetRemoteActionAudits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRemoteActionAudits())) + for i, v := range m.GetRemoteActionAudits() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("remoteActionAudits", cast) + if err != nil { + return err + } + } + if m.GetRemoteAssistancePartners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRemoteAssistancePartners())) + for i, v := range m.GetRemoteAssistancePartners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("remoteAssistancePartners", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("remoteAssistanceSettings", m.GetRemoteAssistanceSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reports", m.GetReports()) + if err != nil { + return err + } + } + if m.GetResourceAccessProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceAccessProfiles())) + for i, v := range m.GetResourceAccessProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceAccessProfiles", cast) + if err != nil { + return err + } + } + if m.GetResourceOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceOperations())) + for i, v := range m.GetResourceOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceOperations", cast) + if err != nil { + return err + } + } + if m.GetReusablePolicySettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReusablePolicySettings())) + for i, v := range m.GetReusablePolicySettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reusablePolicySettings", cast) + if err != nil { + return err + } + } + if m.GetReusableSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReusableSettings())) + for i, v := range m.GetReusableSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reusableSettings", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleDefinitions())) + for i, v := range m.GetRoleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleDefinitions", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleScopeTags())) + for i, v := range m.GetRoleScopeTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleScopeTags", cast) + if err != nil { + return err + } + } + if m.GetSettingDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingDefinitions())) + for i, v := range m.GetSettingDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingDefinitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("softwareUpdateStatusSummary", m.GetSoftwareUpdateStatusSummary()) + if err != nil { + return err + } + } + if m.GetSubscriptions() != nil { + cast := (*m.GetSubscriptions()).String() + err = writer.WriteStringValue("subscriptions", &cast) + if err != nil { + return err + } + } + if m.GetSubscriptionState() != nil { + cast := (*m.GetSubscriptionState()).String() + err = writer.WriteStringValue("subscriptionState", &cast) + if err != nil { + return err + } + } + if m.GetTelecomExpenseManagementPartners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTelecomExpenseManagementPartners())) + for i, v := range m.GetTelecomExpenseManagementPartners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("telecomExpenseManagementPartners", cast) + if err != nil { + return err + } + } + if m.GetTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTemplates())) + for i, v := range m.GetTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("templates", cast) + if err != nil { + return err + } + } + if m.GetTemplateSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTemplateSettings())) + for i, v := range m.GetTemplateSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("templateSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("tenantAttachRBAC", m.GetTenantAttachRBAC()) + if err != nil { + return err + } + } + if m.GetTermsAndConditions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTermsAndConditions())) + for i, v := range m.GetTermsAndConditions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("termsAndConditions", cast) + if err != nil { + return err + } + } + if m.GetTroubleshootingEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTroubleshootingEvents())) + for i, v := range m.GetTroubleshootingEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("troubleshootingEvents", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAnomaly() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAnomaly())) + for i, v := range m.GetUserExperienceAnalyticsAnomaly() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAnomaly", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAnomalyDevice() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAnomalyDevice())) + for i, v := range m.GetUserExperienceAnalyticsAnomalyDevice() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAnomalyDevice", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsAnomalySeverityOverview", m.GetUserExperienceAnalyticsAnomalySeverityOverview()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthApplicationPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthApplicationPerformance())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthApplicationPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthDeviceModelPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthDeviceModelPerformance())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthDeviceModelPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDeviceModelPerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthDevicePerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthDevicePerformance())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthDevicePerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDevicePerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthDevicePerformanceDetails", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsAppHealthOSVersionPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsAppHealthOSVersionPerformance())) + for i, v := range m.GetUserExperienceAnalyticsAppHealthOSVersionPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsAppHealthOSVersionPerformance", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsAppHealthOverview", m.GetUserExperienceAnalyticsAppHealthOverview()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBaselines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBaselines())) + for i, v := range m.GetUserExperienceAnalyticsBaselines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBaselines", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthAppImpact() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthAppImpact())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthAppImpact() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthAppImpact", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsBatteryHealthCapacityDetails", m.GetUserExperienceAnalyticsBatteryHealthCapacityDetails()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthDeviceAppImpact", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthDevicePerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthDevicePerformance())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthDevicePerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthDevicePerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthModelPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthModelPerformance())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthModelPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthModelPerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsBatteryHealthOsPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsBatteryHealthOsPerformance())) + for i, v := range m.GetUserExperienceAnalyticsBatteryHealthOsPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsBatteryHealthOsPerformance", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsBatteryHealthRuntimeDetails", m.GetUserExperienceAnalyticsBatteryHealthRuntimeDetails()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsCategories())) + for i, v := range m.GetUserExperienceAnalyticsCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsCategories", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceMetricHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceMetricHistory())) + for i, v := range m.GetUserExperienceAnalyticsDeviceMetricHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceMetricHistory", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDevicePerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDevicePerformance())) + for i, v := range m.GetUserExperienceAnalyticsDevicePerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDevicePerformance", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsDeviceScope", m.GetUserExperienceAnalyticsDeviceScope()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceScopes())) + for i, v := range m.GetUserExperienceAnalyticsDeviceScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceScopes", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceScores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceScores())) + for i, v := range m.GetUserExperienceAnalyticsDeviceScores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceScores", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceStartupHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceStartupHistory())) + for i, v := range m.GetUserExperienceAnalyticsDeviceStartupHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceStartupHistory", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceStartupProcesses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceStartupProcesses())) + for i, v := range m.GetUserExperienceAnalyticsDeviceStartupProcesses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceStartupProcesses", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceStartupProcessPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceStartupProcessPerformance())) + for i, v := range m.GetUserExperienceAnalyticsDeviceStartupProcessPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceStartupProcessPerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDevicesWithoutCloudIdentity() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDevicesWithoutCloudIdentity())) + for i, v := range m.GetUserExperienceAnalyticsDevicesWithoutCloudIdentity() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDevicesWithoutCloudIdentity", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsDeviceTimelineEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsDeviceTimelineEvents())) + for i, v := range m.GetUserExperienceAnalyticsDeviceTimelineEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsDeviceTimelineEvents", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsImpactingProcess() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsImpactingProcess())) + for i, v := range m.GetUserExperienceAnalyticsImpactingProcess() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsImpactingProcess", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsMetricHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsMetricHistory())) + for i, v := range m.GetUserExperienceAnalyticsMetricHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsMetricHistory", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsModelScores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsModelScores())) + for i, v := range m.GetUserExperienceAnalyticsModelScores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsModelScores", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsNotAutopilotReadyDevice() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsNotAutopilotReadyDevice())) + for i, v := range m.GetUserExperienceAnalyticsNotAutopilotReadyDevice() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsNotAutopilotReadyDevice", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsOverview", m.GetUserExperienceAnalyticsOverview()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsRemoteConnection() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsRemoteConnection())) + for i, v := range m.GetUserExperienceAnalyticsRemoteConnection() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsRemoteConnection", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsResourcePerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsResourcePerformance())) + for i, v := range m.GetUserExperienceAnalyticsResourcePerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsResourcePerformance", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsScoreHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsScoreHistory())) + for i, v := range m.GetUserExperienceAnalyticsScoreHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsScoreHistory", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsSettings", m.GetUserExperienceAnalyticsSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric", m.GetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric()) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsWorkFromAnywhereMetrics() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsWorkFromAnywhereMetrics())) + for i, v := range m.GetUserExperienceAnalyticsWorkFromAnywhereMetrics() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsWorkFromAnywhereMetrics", cast) + if err != nil { + return err + } + } + if m.GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance())) + for i, v := range m.GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userExperienceAnalyticsWorkFromAnywhereModelPerformance", cast) + if err != nil { + return err + } + } + if m.GetUserPfxCertificates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserPfxCertificates())) + for i, v := range m.GetUserPfxCertificates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userPfxCertificates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("virtualEndpoint", m.GetVirtualEndpoint()) + if err != nil { + return err + } + } + if m.GetWindowsAutopilotDeploymentProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsAutopilotDeploymentProfiles())) + for i, v := range m.GetWindowsAutopilotDeploymentProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsAutopilotDeploymentProfiles", cast) + if err != nil { + return err + } + } + if m.GetWindowsAutopilotDeviceIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsAutopilotDeviceIdentities())) + for i, v := range m.GetWindowsAutopilotDeviceIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsAutopilotDeviceIdentities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsAutopilotSettings", m.GetWindowsAutopilotSettings()) + if err != nil { + return err + } + } + if m.GetWindowsDriverUpdateProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsDriverUpdateProfiles())) + for i, v := range m.GetWindowsDriverUpdateProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsDriverUpdateProfiles", cast) + if err != nil { + return err + } + } + if m.GetWindowsFeatureUpdateProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsFeatureUpdateProfiles())) + for i, v := range m.GetWindowsFeatureUpdateProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsFeatureUpdateProfiles", cast) + if err != nil { + return err + } + } + if m.GetWindowsInformationProtectionAppLearningSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsInformationProtectionAppLearningSummaries())) + for i, v := range m.GetWindowsInformationProtectionAppLearningSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsInformationProtectionAppLearningSummaries", cast) + if err != nil { + return err + } + } + if m.GetWindowsInformationProtectionNetworkLearningSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsInformationProtectionNetworkLearningSummaries())) + for i, v := range m.GetWindowsInformationProtectionNetworkLearningSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsInformationProtectionNetworkLearningSummaries", cast) + if err != nil { + return err + } + } + if m.GetWindowsMalwareInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsMalwareInformation())) + for i, v := range m.GetWindowsMalwareInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsMalwareInformation", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsMalwareOverview", m.GetWindowsMalwareOverview()) + if err != nil { + return err + } + } + if m.GetWindowsQualityUpdateProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsQualityUpdateProfiles())) + for i, v := range m.GetWindowsQualityUpdateProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsQualityUpdateProfiles", cast) + if err != nil { + return err + } + } + if m.GetWindowsUpdateCatalogItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsUpdateCatalogItems())) + for i, v := range m.GetWindowsUpdateCatalogItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsUpdateCatalogItems", cast) + if err != nil { + return err + } + } + if m.GetZebraFotaArtifacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetZebraFotaArtifacts())) + for i, v := range m.GetZebraFotaArtifacts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("zebraFotaArtifacts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("zebraFotaConnector", m.GetZebraFotaConnector()) + if err != nil { + return err + } + } + if m.GetZebraFotaDeployments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetZebraFotaDeployments())) + for i, v := range m.GetZebraFotaDeployments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("zebraFotaDeployments", cast) + if err != nil { + return err + } + } + return nil +} +// SetAccountMoveCompletionDateTime sets the accountMoveCompletionDateTime property value. The date & time when tenant data moved between scaleunits. +func (m *DeviceManagement) SetAccountMoveCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.accountMoveCompletionDateTime = value +} +// SetAdminConsent sets the adminConsent property value. Admin consent information. +func (m *DeviceManagement) SetAdminConsent(value AdminConsentable)() { + m.adminConsent = value +} +// SetAdvancedThreatProtectionOnboardingStateSummary sets the advancedThreatProtectionOnboardingStateSummary property value. The summary state of ATP onboarding state for this account. +func (m *DeviceManagement) SetAdvancedThreatProtectionOnboardingStateSummary(value AdvancedThreatProtectionOnboardingStateSummaryable)() { + m.advancedThreatProtectionOnboardingStateSummary = value +} +// SetAndroidDeviceOwnerEnrollmentProfiles sets the androidDeviceOwnerEnrollmentProfiles property value. Android device owner enrollment profile entities. +func (m *DeviceManagement) SetAndroidDeviceOwnerEnrollmentProfiles(value []AndroidDeviceOwnerEnrollmentProfileable)() { + m.androidDeviceOwnerEnrollmentProfiles = value +} +// SetAndroidForWorkAppConfigurationSchemas sets the androidForWorkAppConfigurationSchemas property value. Android for Work app configuration schema entities. +func (m *DeviceManagement) SetAndroidForWorkAppConfigurationSchemas(value []AndroidForWorkAppConfigurationSchemaable)() { + m.androidForWorkAppConfigurationSchemas = value +} +// SetAndroidForWorkEnrollmentProfiles sets the androidForWorkEnrollmentProfiles property value. Android for Work enrollment profile entities. +func (m *DeviceManagement) SetAndroidForWorkEnrollmentProfiles(value []AndroidForWorkEnrollmentProfileable)() { + m.androidForWorkEnrollmentProfiles = value +} +// SetAndroidForWorkSettings sets the androidForWorkSettings property value. The singleton Android for Work settings entity. +func (m *DeviceManagement) SetAndroidForWorkSettings(value AndroidForWorkSettingsable)() { + m.androidForWorkSettings = value +} +// SetAndroidManagedStoreAccountEnterpriseSettings sets the androidManagedStoreAccountEnterpriseSettings property value. The singleton Android managed store account enterprise settings entity. +func (m *DeviceManagement) SetAndroidManagedStoreAccountEnterpriseSettings(value AndroidManagedStoreAccountEnterpriseSettingsable)() { + m.androidManagedStoreAccountEnterpriseSettings = value +} +// SetAndroidManagedStoreAppConfigurationSchemas sets the androidManagedStoreAppConfigurationSchemas property value. Android Enterprise app configuration schema entities. +func (m *DeviceManagement) SetAndroidManagedStoreAppConfigurationSchemas(value []AndroidManagedStoreAppConfigurationSchemaable)() { + m.androidManagedStoreAppConfigurationSchemas = value +} +// SetApplePushNotificationCertificate sets the applePushNotificationCertificate property value. Apple push notification certificate. +func (m *DeviceManagement) SetApplePushNotificationCertificate(value ApplePushNotificationCertificateable)() { + m.applePushNotificationCertificate = value +} +// SetAppleUserInitiatedEnrollmentProfiles sets the appleUserInitiatedEnrollmentProfiles property value. Apple user initiated enrollment profiles +func (m *DeviceManagement) SetAppleUserInitiatedEnrollmentProfiles(value []AppleUserInitiatedEnrollmentProfileable)() { + m.appleUserInitiatedEnrollmentProfiles = value +} +// SetAssignmentFilters sets the assignmentFilters property value. The list of assignment filters +func (m *DeviceManagement) SetAssignmentFilters(value []DeviceAndAppManagementAssignmentFilterable)() { + m.assignmentFilters = value +} +// SetAuditEvents sets the auditEvents property value. The Audit Events +func (m *DeviceManagement) SetAuditEvents(value []AuditEventable)() { + m.auditEvents = value +} +// SetAutopilotEvents sets the autopilotEvents property value. The list of autopilot events for the tenant. +func (m *DeviceManagement) SetAutopilotEvents(value []DeviceManagementAutopilotEventable)() { + m.autopilotEvents = value +} +// SetCartToClassAssociations sets the cartToClassAssociations property value. The Cart To Class Associations. +func (m *DeviceManagement) SetCartToClassAssociations(value []CartToClassAssociationable)() { + m.cartToClassAssociations = value +} +// SetCategories sets the categories property value. The available categories +func (m *DeviceManagement) SetCategories(value []DeviceManagementSettingCategoryable)() { + m.categories = value +} +// SetCertificateConnectorDetails sets the certificateConnectorDetails property value. Collection of certificate connector details, each associated with a corresponding Intune Certificate Connector. +func (m *DeviceManagement) SetCertificateConnectorDetails(value []CertificateConnectorDetailsable)() { + m.certificateConnectorDetails = value +} +// SetChromeOSOnboardingSettings sets the chromeOSOnboardingSettings property value. Collection of ChromeOSOnboardingSettings settings associated with account. +func (m *DeviceManagement) SetChromeOSOnboardingSettings(value []ChromeOSOnboardingSettingsable)() { + m.chromeOSOnboardingSettings = value +} +// SetCloudPCConnectivityIssues sets the cloudPCConnectivityIssues property value. The list of CloudPC Connectivity Issue. +func (m *DeviceManagement) SetCloudPCConnectivityIssues(value []CloudPCConnectivityIssueable)() { + m.cloudPCConnectivityIssues = value +} +// SetComanagedDevices sets the comanagedDevices property value. The list of co-managed devices report +func (m *DeviceManagement) SetComanagedDevices(value []ManagedDeviceable)() { + m.comanagedDevices = value +} +// SetComanagementEligibleDevices sets the comanagementEligibleDevices property value. The list of co-management eligible devices report +func (m *DeviceManagement) SetComanagementEligibleDevices(value []ComanagementEligibleDeviceable)() { + m.comanagementEligibleDevices = value +} +// SetComplianceCategories sets the complianceCategories property value. List of all compliance categories +func (m *DeviceManagement) SetComplianceCategories(value []DeviceManagementConfigurationCategoryable)() { + m.complianceCategories = value +} +// SetComplianceManagementPartners sets the complianceManagementPartners property value. The list of Compliance Management Partners configured by the tenant. +func (m *DeviceManagement) SetComplianceManagementPartners(value []ComplianceManagementPartnerable)() { + m.complianceManagementPartners = value +} +// SetCompliancePolicies sets the compliancePolicies property value. List of all compliance policies +func (m *DeviceManagement) SetCompliancePolicies(value []DeviceManagementCompliancePolicyable)() { + m.compliancePolicies = value +} +// SetComplianceSettings sets the complianceSettings property value. List of all ComplianceSettings +func (m *DeviceManagement) SetComplianceSettings(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.complianceSettings = value +} +// SetConditionalAccessSettings sets the conditionalAccessSettings property value. The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access +func (m *DeviceManagement) SetConditionalAccessSettings(value OnPremisesConditionalAccessSettingsable)() { + m.conditionalAccessSettings = value +} +// SetConfigManagerCollections sets the configManagerCollections property value. A list of ConfigManagerCollection +func (m *DeviceManagement) SetConfigManagerCollections(value []ConfigManagerCollectionable)() { + m.configManagerCollections = value +} +// SetConfigurationCategories sets the configurationCategories property value. List of all Configuration Categories +func (m *DeviceManagement) SetConfigurationCategories(value []DeviceManagementConfigurationCategoryable)() { + m.configurationCategories = value +} +// SetConfigurationPolicies sets the configurationPolicies property value. List of all Configuration policies +func (m *DeviceManagement) SetConfigurationPolicies(value []DeviceManagementConfigurationPolicyable)() { + m.configurationPolicies = value +} +// SetConfigurationPolicyTemplates sets the configurationPolicyTemplates property value. List of all templates +func (m *DeviceManagement) SetConfigurationPolicyTemplates(value []DeviceManagementConfigurationPolicyTemplateable)() { + m.configurationPolicyTemplates = value +} +// SetConfigurationSettings sets the configurationSettings property value. List of all ConfigurationSettings +func (m *DeviceManagement) SetConfigurationSettings(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.configurationSettings = value +} +// SetDataProcessorServiceForWindowsFeaturesOnboarding sets the dataProcessorServiceForWindowsFeaturesOnboarding property value. A configuration entity for MEM features that utilize Data Processor Service for Windows (DPSW) data. +func (m *DeviceManagement) SetDataProcessorServiceForWindowsFeaturesOnboarding(value DataProcessorServiceForWindowsFeaturesOnboardingable)() { + m.dataProcessorServiceForWindowsFeaturesOnboarding = value +} +// SetDataSharingConsents sets the dataSharingConsents property value. Data sharing consents. +func (m *DeviceManagement) SetDataSharingConsents(value []DataSharingConsentable)() { + m.dataSharingConsents = value +} +// SetDepOnboardingSettings sets the depOnboardingSettings property value. This collections of multiple DEP tokens per-tenant. +func (m *DeviceManagement) SetDepOnboardingSettings(value []DepOnboardingSettingable)() { + m.depOnboardingSettings = value +} +// SetDerivedCredentials sets the derivedCredentials property value. Collection of Derived credential settings associated with account. +func (m *DeviceManagement) SetDerivedCredentials(value []DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentials = value +} +// SetDetectedApps sets the detectedApps property value. The list of detected apps associated with a device. +func (m *DeviceManagement) SetDetectedApps(value []DetectedAppable)() { + m.detectedApps = value +} +// SetDeviceCategories sets the deviceCategories property value. The list of device categories with the tenant. +func (m *DeviceManagement) SetDeviceCategories(value []DeviceCategoryable)() { + m.deviceCategories = value +} +// SetDeviceCompliancePolicies sets the deviceCompliancePolicies property value. The device compliance policies. +func (m *DeviceManagement) SetDeviceCompliancePolicies(value []DeviceCompliancePolicyable)() { + m.deviceCompliancePolicies = value +} +// SetDeviceCompliancePolicyDeviceStateSummary sets the deviceCompliancePolicyDeviceStateSummary property value. The device compliance state summary for this account. +func (m *DeviceManagement) SetDeviceCompliancePolicyDeviceStateSummary(value DeviceCompliancePolicyDeviceStateSummaryable)() { + m.deviceCompliancePolicyDeviceStateSummary = value +} +// SetDeviceCompliancePolicySettingStateSummaries sets the deviceCompliancePolicySettingStateSummaries property value. The summary states of compliance policy settings for this account. +func (m *DeviceManagement) SetDeviceCompliancePolicySettingStateSummaries(value []DeviceCompliancePolicySettingStateSummaryable)() { + m.deviceCompliancePolicySettingStateSummaries = value +} +// SetDeviceComplianceReportSummarizationDateTime sets the deviceComplianceReportSummarizationDateTime property value. The last requested time of device compliance reporting for this account. This property is read-only. +func (m *DeviceManagement) SetDeviceComplianceReportSummarizationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deviceComplianceReportSummarizationDateTime = value +} +// SetDeviceComplianceScripts sets the deviceComplianceScripts property value. The list of device compliance scripts associated with the tenant. +func (m *DeviceManagement) SetDeviceComplianceScripts(value []DeviceComplianceScriptable)() { + m.deviceComplianceScripts = value +} +// SetDeviceConfigurationConflictSummary sets the deviceConfigurationConflictSummary property value. Summary of policies in conflict state for this account. +func (m *DeviceManagement) SetDeviceConfigurationConflictSummary(value []DeviceConfigurationConflictSummaryable)() { + m.deviceConfigurationConflictSummary = value +} +// SetDeviceConfigurationDeviceStateSummaries sets the deviceConfigurationDeviceStateSummaries property value. The device configuration device state summary for this account. +func (m *DeviceManagement) SetDeviceConfigurationDeviceStateSummaries(value DeviceConfigurationDeviceStateSummaryable)() { + m.deviceConfigurationDeviceStateSummaries = value +} +// SetDeviceConfigurationRestrictedAppsViolations sets the deviceConfigurationRestrictedAppsViolations property value. Restricted apps violations for this account. +func (m *DeviceManagement) SetDeviceConfigurationRestrictedAppsViolations(value []RestrictedAppsViolationable)() { + m.deviceConfigurationRestrictedAppsViolations = value +} +// SetDeviceConfigurations sets the deviceConfigurations property value. The device configurations. +func (m *DeviceManagement) SetDeviceConfigurations(value []DeviceConfigurationable)() { + m.deviceConfigurations = value +} +// SetDeviceConfigurationsAllManagedDeviceCertificateStates sets the deviceConfigurationsAllManagedDeviceCertificateStates property value. Summary of all certificates for all devices. +func (m *DeviceManagement) SetDeviceConfigurationsAllManagedDeviceCertificateStates(value []ManagedAllDeviceCertificateStateable)() { + m.deviceConfigurationsAllManagedDeviceCertificateStates = value +} +// SetDeviceConfigurationUserStateSummaries sets the deviceConfigurationUserStateSummaries property value. The device configuration user state summary for this account. +func (m *DeviceManagement) SetDeviceConfigurationUserStateSummaries(value DeviceConfigurationUserStateSummaryable)() { + m.deviceConfigurationUserStateSummaries = value +} +// SetDeviceCustomAttributeShellScripts sets the deviceCustomAttributeShellScripts property value. The list of device custom attribute shell scripts associated with the tenant. +func (m *DeviceManagement) SetDeviceCustomAttributeShellScripts(value []DeviceCustomAttributeShellScriptable)() { + m.deviceCustomAttributeShellScripts = value +} +// SetDeviceEnrollmentConfigurations sets the deviceEnrollmentConfigurations property value. The list of device enrollment configurations +func (m *DeviceManagement) SetDeviceEnrollmentConfigurations(value []DeviceEnrollmentConfigurationable)() { + m.deviceEnrollmentConfigurations = value +} +// SetDeviceHealthScripts sets the deviceHealthScripts property value. The list of device health scripts associated with the tenant. +func (m *DeviceManagement) SetDeviceHealthScripts(value []DeviceHealthScriptable)() { + m.deviceHealthScripts = value +} +// SetDeviceManagementPartners sets the deviceManagementPartners property value. The list of Device Management Partners configured by the tenant. +func (m *DeviceManagement) SetDeviceManagementPartners(value []DeviceManagementPartnerable)() { + m.deviceManagementPartners = value +} +// SetDeviceManagementScripts sets the deviceManagementScripts property value. The list of device management scripts associated with the tenant. +func (m *DeviceManagement) SetDeviceManagementScripts(value []DeviceManagementScriptable)() { + m.deviceManagementScripts = value +} +// SetDeviceProtectionOverview sets the deviceProtectionOverview property value. Device protection overview. +func (m *DeviceManagement) SetDeviceProtectionOverview(value DeviceProtectionOverviewable)() { + m.deviceProtectionOverview = value +} +// SetDeviceShellScripts sets the deviceShellScripts property value. The list of device shell scripts associated with the tenant. +func (m *DeviceManagement) SetDeviceShellScripts(value []DeviceShellScriptable)() { + m.deviceShellScripts = value +} +// SetDomainJoinConnectors sets the domainJoinConnectors property value. A list of connector objects. +func (m *DeviceManagement) SetDomainJoinConnectors(value []DeviceManagementDomainJoinConnectorable)() { + m.domainJoinConnectors = value +} +// SetEmbeddedSIMActivationCodePools sets the embeddedSIMActivationCodePools property value. The embedded SIM activation code pools created by this account. +func (m *DeviceManagement) SetEmbeddedSIMActivationCodePools(value []EmbeddedSIMActivationCodePoolable)() { + m.embeddedSIMActivationCodePools = value +} +// SetExchangeConnectors sets the exchangeConnectors property value. The list of Exchange Connectors configured by the tenant. +func (m *DeviceManagement) SetExchangeConnectors(value []DeviceManagementExchangeConnectorable)() { + m.exchangeConnectors = value +} +// SetExchangeOnPremisesPolicies sets the exchangeOnPremisesPolicies property value. The list of Exchange On Premisis policies configured by the tenant. +func (m *DeviceManagement) SetExchangeOnPremisesPolicies(value []DeviceManagementExchangeOnPremisesPolicyable)() { + m.exchangeOnPremisesPolicies = value +} +// SetExchangeOnPremisesPolicy sets the exchangeOnPremisesPolicy property value. The policy which controls mobile device access to Exchange On Premises +func (m *DeviceManagement) SetExchangeOnPremisesPolicy(value DeviceManagementExchangeOnPremisesPolicyable)() { + m.exchangeOnPremisesPolicy = value +} +// SetGroupPolicyCategories sets the groupPolicyCategories property value. The available group policy categories for this account. +func (m *DeviceManagement) SetGroupPolicyCategories(value []GroupPolicyCategoryable)() { + m.groupPolicyCategories = value +} +// SetGroupPolicyConfigurations sets the groupPolicyConfigurations property value. The group policy configurations created by this account. +func (m *DeviceManagement) SetGroupPolicyConfigurations(value []GroupPolicyConfigurationable)() { + m.groupPolicyConfigurations = value +} +// SetGroupPolicyDefinitionFiles sets the groupPolicyDefinitionFiles property value. The available group policy definition files for this account. +func (m *DeviceManagement) SetGroupPolicyDefinitionFiles(value []GroupPolicyDefinitionFileable)() { + m.groupPolicyDefinitionFiles = value +} +// SetGroupPolicyDefinitions sets the groupPolicyDefinitions property value. The available group policy definitions for this account. +func (m *DeviceManagement) SetGroupPolicyDefinitions(value []GroupPolicyDefinitionable)() { + m.groupPolicyDefinitions = value +} +// SetGroupPolicyMigrationReports sets the groupPolicyMigrationReports property value. A list of Group Policy migration reports. +func (m *DeviceManagement) SetGroupPolicyMigrationReports(value []GroupPolicyMigrationReportable)() { + m.groupPolicyMigrationReports = value +} +// SetGroupPolicyObjectFiles sets the groupPolicyObjectFiles property value. A list of Group Policy Object files uploaded. +func (m *DeviceManagement) SetGroupPolicyObjectFiles(value []GroupPolicyObjectFileable)() { + m.groupPolicyObjectFiles = value +} +// SetGroupPolicyUploadedDefinitionFiles sets the groupPolicyUploadedDefinitionFiles property value. The available group policy uploaded definition files for this account. +func (m *DeviceManagement) SetGroupPolicyUploadedDefinitionFiles(value []GroupPolicyUploadedDefinitionFileable)() { + m.groupPolicyUploadedDefinitionFiles = value +} +// SetImportedDeviceIdentities sets the importedDeviceIdentities property value. The imported device identities. +func (m *DeviceManagement) SetImportedDeviceIdentities(value []ImportedDeviceIdentityable)() { + m.importedDeviceIdentities = value +} +// SetImportedWindowsAutopilotDeviceIdentities sets the importedWindowsAutopilotDeviceIdentities property value. Collection of imported Windows autopilot devices. +func (m *DeviceManagement) SetImportedWindowsAutopilotDeviceIdentities(value []ImportedWindowsAutopilotDeviceIdentityable)() { + m.importedWindowsAutopilotDeviceIdentities = value +} +// SetIntents sets the intents property value. The device management intents +func (m *DeviceManagement) SetIntents(value []DeviceManagementIntentable)() { + m.intents = value +} +// SetIntuneAccountId sets the intuneAccountId property value. Intune Account ID for given tenant +func (m *DeviceManagement) SetIntuneAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.intuneAccountId = value +} +// SetIntuneBrand sets the intuneBrand property value. intuneBrand contains data which is used in customizing the appearance of the Company Portal applications as well as the end user web portal. +func (m *DeviceManagement) SetIntuneBrand(value IntuneBrandable)() { + m.intuneBrand = value +} +// SetIntuneBrandingProfiles sets the intuneBrandingProfiles property value. Intune branding profiles targeted to AAD groups +func (m *DeviceManagement) SetIntuneBrandingProfiles(value []IntuneBrandingProfileable)() { + m.intuneBrandingProfiles = value +} +// SetIosUpdateStatuses sets the iosUpdateStatuses property value. The IOS software update installation statuses for this account. +func (m *DeviceManagement) SetIosUpdateStatuses(value []IosUpdateDeviceStatusable)() { + m.iosUpdateStatuses = value +} +// SetLastReportAggregationDateTime sets the lastReportAggregationDateTime property value. The last modified time of reporting for this account. This property is read-only. +func (m *DeviceManagement) SetLastReportAggregationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportAggregationDateTime = value +} +// SetLegacyPcManangementEnabled sets the legacyPcManangementEnabled property value. The property to enable Non-MDM managed legacy PC management for this account. This property is read-only. +func (m *DeviceManagement) SetLegacyPcManangementEnabled(value *bool)() { + m.legacyPcManangementEnabled = value +} +// SetMacOSSoftwareUpdateAccountSummaries sets the macOSSoftwareUpdateAccountSummaries property value. The MacOS software update account summaries for this account. +func (m *DeviceManagement) SetMacOSSoftwareUpdateAccountSummaries(value []MacOSSoftwareUpdateAccountSummaryable)() { + m.macOSSoftwareUpdateAccountSummaries = value +} +// SetManagedDeviceCleanupSettings sets the managedDeviceCleanupSettings property value. Device cleanup rule +func (m *DeviceManagement) SetManagedDeviceCleanupSettings(value ManagedDeviceCleanupSettingsable)() { + m.managedDeviceCleanupSettings = value +} +// SetManagedDeviceEncryptionStates sets the managedDeviceEncryptionStates property value. Encryption report for devices in this account +func (m *DeviceManagement) SetManagedDeviceEncryptionStates(value []ManagedDeviceEncryptionStateable)() { + m.managedDeviceEncryptionStates = value +} +// SetManagedDeviceOverview sets the managedDeviceOverview property value. Device overview +func (m *DeviceManagement) SetManagedDeviceOverview(value ManagedDeviceOverviewable)() { + m.managedDeviceOverview = value +} +// SetManagedDevices sets the managedDevices property value. The list of managed devices. +func (m *DeviceManagement) SetManagedDevices(value []ManagedDeviceable)() { + m.managedDevices = value +} +// SetMaximumDepTokens sets the maximumDepTokens property value. Maximum number of DEP tokens allowed per-tenant. +func (m *DeviceManagement) SetMaximumDepTokens(value *int32)() { + m.maximumDepTokens = value +} +// SetMicrosoftTunnelConfigurations sets the microsoftTunnelConfigurations property value. Collection of MicrosoftTunnelConfiguration settings associated with account. +func (m *DeviceManagement) SetMicrosoftTunnelConfigurations(value []MicrosoftTunnelConfigurationable)() { + m.microsoftTunnelConfigurations = value +} +// SetMicrosoftTunnelHealthThresholds sets the microsoftTunnelHealthThresholds property value. Collection of MicrosoftTunnelHealthThreshold settings associated with account. +func (m *DeviceManagement) SetMicrosoftTunnelHealthThresholds(value []MicrosoftTunnelHealthThresholdable)() { + m.microsoftTunnelHealthThresholds = value +} +// SetMicrosoftTunnelServerLogCollectionResponses sets the microsoftTunnelServerLogCollectionResponses property value. Collection of MicrosoftTunnelServerLogCollectionResponse settings associated with account. +func (m *DeviceManagement) SetMicrosoftTunnelServerLogCollectionResponses(value []MicrosoftTunnelServerLogCollectionResponseable)() { + m.microsoftTunnelServerLogCollectionResponses = value +} +// SetMicrosoftTunnelSites sets the microsoftTunnelSites property value. Collection of MicrosoftTunnelSite settings associated with account. +func (m *DeviceManagement) SetMicrosoftTunnelSites(value []MicrosoftTunnelSiteable)() { + m.microsoftTunnelSites = value +} +// SetMobileAppTroubleshootingEvents sets the mobileAppTroubleshootingEvents property value. The collection property of MobileAppTroubleshootingEvent. +func (m *DeviceManagement) SetMobileAppTroubleshootingEvents(value []MobileAppTroubleshootingEventable)() { + m.mobileAppTroubleshootingEvents = value +} +// SetMobileThreatDefenseConnectors sets the mobileThreatDefenseConnectors property value. The list of Mobile threat Defense connectors configured by the tenant. +func (m *DeviceManagement) SetMobileThreatDefenseConnectors(value []MobileThreatDefenseConnectorable)() { + m.mobileThreatDefenseConnectors = value +} +// SetNdesConnectors sets the ndesConnectors property value. The collection of Ndes connectors for this account. +func (m *DeviceManagement) SetNdesConnectors(value []NdesConnectorable)() { + m.ndesConnectors = value +} +// SetNotificationMessageTemplates sets the notificationMessageTemplates property value. The Notification Message Templates. +func (m *DeviceManagement) SetNotificationMessageTemplates(value []NotificationMessageTemplateable)() { + m.notificationMessageTemplates = value +} +// SetOemWarrantyInformationOnboarding sets the oemWarrantyInformationOnboarding property value. List of OEM Warranty Statuses +func (m *DeviceManagement) SetOemWarrantyInformationOnboarding(value []OemWarrantyInformationOnboardingable)() { + m.oemWarrantyInformationOnboarding = value +} +// SetRemoteActionAudits sets the remoteActionAudits property value. The list of device remote action audits with the tenant. +func (m *DeviceManagement) SetRemoteActionAudits(value []RemoteActionAuditable)() { + m.remoteActionAudits = value +} +// SetRemoteAssistancePartners sets the remoteAssistancePartners property value. The remote assist partners. +func (m *DeviceManagement) SetRemoteAssistancePartners(value []RemoteAssistancePartnerable)() { + m.remoteAssistancePartners = value +} +// SetRemoteAssistanceSettings sets the remoteAssistanceSettings property value. The remote assistance settings singleton +func (m *DeviceManagement) SetRemoteAssistanceSettings(value RemoteAssistanceSettingsable)() { + m.remoteAssistanceSettings = value +} +// SetReports sets the reports property value. Reports singleton +func (m *DeviceManagement) SetReports(value DeviceManagementReportsable)() { + m.reports = value +} +// SetResourceAccessProfiles sets the resourceAccessProfiles property value. Collection of resource access settings associated with account. +func (m *DeviceManagement) SetResourceAccessProfiles(value []DeviceManagementResourceAccessProfileBaseable)() { + m.resourceAccessProfiles = value +} +// SetResourceOperations sets the resourceOperations property value. The Resource Operations. +func (m *DeviceManagement) SetResourceOperations(value []ResourceOperationable)() { + m.resourceOperations = value +} +// SetReusablePolicySettings sets the reusablePolicySettings property value. List of all reusable settings that can be referred in a policy +func (m *DeviceManagement) SetReusablePolicySettings(value []DeviceManagementReusablePolicySettingable)() { + m.reusablePolicySettings = value +} +// SetReusableSettings sets the reusableSettings property value. List of all reusable settings +func (m *DeviceManagement) SetReusableSettings(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.reusableSettings = value +} +// SetRoleAssignments sets the roleAssignments property value. The Role Assignments. +func (m *DeviceManagement) SetRoleAssignments(value []DeviceAndAppManagementRoleAssignmentable)() { + m.roleAssignments = value +} +// SetRoleDefinitions sets the roleDefinitions property value. The Role Definitions. +func (m *DeviceManagement) SetRoleDefinitions(value []RoleDefinitionable)() { + m.roleDefinitions = value +} +// SetRoleScopeTags sets the roleScopeTags property value. The Role Scope Tags. +func (m *DeviceManagement) SetRoleScopeTags(value []RoleScopeTagable)() { + m.roleScopeTags = value +} +// SetSettingDefinitions sets the settingDefinitions property value. The device management intent setting definitions +func (m *DeviceManagement) SetSettingDefinitions(value []DeviceManagementSettingDefinitionable)() { + m.settingDefinitions = value +} +// SetSettings sets the settings property value. Account level settings. +func (m *DeviceManagement) SetSettings(value DeviceManagementSettingsable)() { + m.settings = value +} +// SetSoftwareUpdateStatusSummary sets the softwareUpdateStatusSummary property value. The software update status summary. +func (m *DeviceManagement) SetSoftwareUpdateStatusSummary(value SoftwareUpdateStatusSummaryable)() { + m.softwareUpdateStatusSummary = value +} +// SetSubscriptions sets the subscriptions property value. Tenant mobile device management subscriptions. +func (m *DeviceManagement) SetSubscriptions(value *DeviceManagementSubscriptions)() { + m.subscriptions = value +} +// SetSubscriptionState sets the subscriptionState property value. Tenant mobile device management subscription state. +func (m *DeviceManagement) SetSubscriptionState(value *DeviceManagementSubscriptionState)() { + m.subscriptionState = value +} +// SetTelecomExpenseManagementPartners sets the telecomExpenseManagementPartners property value. The telecom expense management partners. +func (m *DeviceManagement) SetTelecomExpenseManagementPartners(value []TelecomExpenseManagementPartnerable)() { + m.telecomExpenseManagementPartners = value +} +// SetTemplates sets the templates property value. The available templates +func (m *DeviceManagement) SetTemplates(value []DeviceManagementTemplateable)() { + m.templates = value +} +// SetTemplateSettings sets the templateSettings property value. List of all TemplateSettings +func (m *DeviceManagement) SetTemplateSettings(value []DeviceManagementConfigurationSettingTemplateable)() { + m.templateSettings = value +} +// SetTenantAttachRBAC sets the tenantAttachRBAC property value. TenantAttach RBAC Enablement +func (m *DeviceManagement) SetTenantAttachRBAC(value TenantAttachRBACable)() { + m.tenantAttachRBAC = value +} +// SetTermsAndConditions sets the termsAndConditions property value. The terms and conditions associated with device management of the company. +func (m *DeviceManagement) SetTermsAndConditions(value []TermsAndConditionsable)() { + m.termsAndConditions = value +} +// SetTroubleshootingEvents sets the troubleshootingEvents property value. The list of troubleshooting events for the tenant. +func (m *DeviceManagement) SetTroubleshootingEvents(value []DeviceManagementTroubleshootingEventable)() { + m.troubleshootingEvents = value +} +// SetUnlicensedAdminstratorsEnabled sets the unlicensedAdminstratorsEnabled property value. When enabled, users assigned as administrators via Role Assignment Memberships do not require an assigned Intune license. Prior to this, only Intune licensed users were granted permissions with an Intune role unless they were assigned a role via Azure Active Directory. You are limited to 350 unlicensed direct members for each AAD security group in a role assignment, but you can assign multiple AAD security groups to a role if you need to support more than 350 unlicensed administrators. Licensed administrators are unaffected, do not have to be direct members, nor does the 350 member limit apply. This property is read-only. +func (m *DeviceManagement) SetUnlicensedAdminstratorsEnabled(value *bool)() { + m.unlicensedAdminstratorsEnabled = value +} +// SetUserExperienceAnalyticsAnomaly sets the userExperienceAnalyticsAnomaly property value. The user experience analytics anomaly entity contains anomaly details. +func (m *DeviceManagement) SetUserExperienceAnalyticsAnomaly(value []UserExperienceAnalyticsAnomalyable)() { + m.userExperienceAnalyticsAnomaly = value +} +// SetUserExperienceAnalyticsAnomalyDevice sets the userExperienceAnalyticsAnomalyDevice property value. The user experience analytics anomaly entity contains device details. +func (m *DeviceManagement) SetUserExperienceAnalyticsAnomalyDevice(value []UserExperienceAnalyticsAnomalyDeviceable)() { + m.userExperienceAnalyticsAnomalyDevice = value +} +// SetUserExperienceAnalyticsAnomalySeverityOverview sets the userExperienceAnalyticsAnomalySeverityOverview property value. The user experience analytics anomaly severity overview entity contains the count information for each severity of anomaly. +func (m *DeviceManagement) SetUserExperienceAnalyticsAnomalySeverityOverview(value UserExperienceAnalyticsAnomalySeverityOverviewable)() { + m.userExperienceAnalyticsAnomalySeverityOverview = value +} +// SetUserExperienceAnalyticsAppHealthApplicationPerformance sets the userExperienceAnalyticsAppHealthApplicationPerformance property value. User experience analytics appHealth Application Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthApplicationPerformance(value []UserExperienceAnalyticsAppHealthApplicationPerformanceable)() { + m.userExperienceAnalyticsAppHealthApplicationPerformance = value +} +// SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion sets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion property value. User experience analytics appHealth Application Performance by App Version +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable)() { + m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion = value +} +// SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails sets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails property value. User experience analytics appHealth Application Performance by App Version details +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable)() { + m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails = value +} +// SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId sets the userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId property value. User experience analytics appHealth Application Performance by App Version Device Id +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable)() { + m.userExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId = value +} +// SetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion sets the userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion property value. User experience analytics appHealth Application Performance by OS Version +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion(value []UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable)() { + m.userExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion = value +} +// SetUserExperienceAnalyticsAppHealthDeviceModelPerformance sets the userExperienceAnalyticsAppHealthDeviceModelPerformance property value. User experience analytics appHealth Model Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthDeviceModelPerformance(value []UserExperienceAnalyticsAppHealthDeviceModelPerformanceable)() { + m.userExperienceAnalyticsAppHealthDeviceModelPerformance = value +} +// SetUserExperienceAnalyticsAppHealthDevicePerformance sets the userExperienceAnalyticsAppHealthDevicePerformance property value. User experience analytics appHealth Device Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthDevicePerformance(value []UserExperienceAnalyticsAppHealthDevicePerformanceable)() { + m.userExperienceAnalyticsAppHealthDevicePerformance = value +} +// SetUserExperienceAnalyticsAppHealthDevicePerformanceDetails sets the userExperienceAnalyticsAppHealthDevicePerformanceDetails property value. User experience analytics device performance details +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthDevicePerformanceDetails(value []UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable)() { + m.userExperienceAnalyticsAppHealthDevicePerformanceDetails = value +} +// SetUserExperienceAnalyticsAppHealthOSVersionPerformance sets the userExperienceAnalyticsAppHealthOSVersionPerformance property value. User experience analytics appHealth OS version Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthOSVersionPerformance(value []UserExperienceAnalyticsAppHealthOSVersionPerformanceable)() { + m.userExperienceAnalyticsAppHealthOSVersionPerformance = value +} +// SetUserExperienceAnalyticsAppHealthOverview sets the userExperienceAnalyticsAppHealthOverview property value. User experience analytics appHealth overview +func (m *DeviceManagement) SetUserExperienceAnalyticsAppHealthOverview(value UserExperienceAnalyticsCategoryable)() { + m.userExperienceAnalyticsAppHealthOverview = value +} +// SetUserExperienceAnalyticsBaselines sets the userExperienceAnalyticsBaselines property value. User experience analytics baselines +func (m *DeviceManagement) SetUserExperienceAnalyticsBaselines(value []UserExperienceAnalyticsBaselineable)() { + m.userExperienceAnalyticsBaselines = value +} +// SetUserExperienceAnalyticsBatteryHealthAppImpact sets the userExperienceAnalyticsBatteryHealthAppImpact property value. User Experience Analytics Battery Health App Impact +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthAppImpact(value []UserExperienceAnalyticsBatteryHealthAppImpactable)() { + m.userExperienceAnalyticsBatteryHealthAppImpact = value +} +// SetUserExperienceAnalyticsBatteryHealthCapacityDetails sets the userExperienceAnalyticsBatteryHealthCapacityDetails property value. User Experience Analytics Battery Health Capacity Details +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthCapacityDetails(value UserExperienceAnalyticsBatteryHealthCapacityDetailsable)() { + m.userExperienceAnalyticsBatteryHealthCapacityDetails = value +} +// SetUserExperienceAnalyticsBatteryHealthDeviceAppImpact sets the userExperienceAnalyticsBatteryHealthDeviceAppImpact property value. User Experience Analytics Battery Health Device App Impact +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthDeviceAppImpact(value []UserExperienceAnalyticsBatteryHealthDeviceAppImpactable)() { + m.userExperienceAnalyticsBatteryHealthDeviceAppImpact = value +} +// SetUserExperienceAnalyticsBatteryHealthDevicePerformance sets the userExperienceAnalyticsBatteryHealthDevicePerformance property value. User Experience Analytics Battery Health Device Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthDevicePerformance(value []UserExperienceAnalyticsBatteryHealthDevicePerformanceable)() { + m.userExperienceAnalyticsBatteryHealthDevicePerformance = value +} +// SetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory sets the userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory property value. User Experience Analytics Battery Health Device Runtime History +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory(value []UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable)() { + m.userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory = value +} +// SetUserExperienceAnalyticsBatteryHealthModelPerformance sets the userExperienceAnalyticsBatteryHealthModelPerformance property value. User Experience Analytics Battery Health Model Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthModelPerformance(value []UserExperienceAnalyticsBatteryHealthModelPerformanceable)() { + m.userExperienceAnalyticsBatteryHealthModelPerformance = value +} +// SetUserExperienceAnalyticsBatteryHealthOsPerformance sets the userExperienceAnalyticsBatteryHealthOsPerformance property value. User Experience Analytics Battery Health Os Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthOsPerformance(value []UserExperienceAnalyticsBatteryHealthOsPerformanceable)() { + m.userExperienceAnalyticsBatteryHealthOsPerformance = value +} +// SetUserExperienceAnalyticsBatteryHealthRuntimeDetails sets the userExperienceAnalyticsBatteryHealthRuntimeDetails property value. User Experience Analytics Battery Health Runtime Details +func (m *DeviceManagement) SetUserExperienceAnalyticsBatteryHealthRuntimeDetails(value UserExperienceAnalyticsBatteryHealthRuntimeDetailsable)() { + m.userExperienceAnalyticsBatteryHealthRuntimeDetails = value +} +// SetUserExperienceAnalyticsCategories sets the userExperienceAnalyticsCategories property value. User experience analytics categories +func (m *DeviceManagement) SetUserExperienceAnalyticsCategories(value []UserExperienceAnalyticsCategoryable)() { + m.userExperienceAnalyticsCategories = value +} +// SetUserExperienceAnalyticsDeviceMetricHistory sets the userExperienceAnalyticsDeviceMetricHistory property value. User experience analytics device metric history +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceMetricHistory(value []UserExperienceAnalyticsMetricHistoryable)() { + m.userExperienceAnalyticsDeviceMetricHistory = value +} +// SetUserExperienceAnalyticsDevicePerformance sets the userExperienceAnalyticsDevicePerformance property value. User experience analytics device performance +func (m *DeviceManagement) SetUserExperienceAnalyticsDevicePerformance(value []UserExperienceAnalyticsDevicePerformanceable)() { + m.userExperienceAnalyticsDevicePerformance = value +} +// SetUserExperienceAnalyticsDeviceScope sets the userExperienceAnalyticsDeviceScope property value. The user experience analytics device scope entity endpoint to trigger on the service to either START or STOP computing metrics data based on a device scope configuration. +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceScope(value UserExperienceAnalyticsDeviceScopeable)() { + m.userExperienceAnalyticsDeviceScope = value +} +// SetUserExperienceAnalyticsDeviceScopes sets the userExperienceAnalyticsDeviceScopes property value. The user experience analytics device scope entity contains device scope configuration use to apply filtering on the endpoint analytics reports. +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceScopes(value []UserExperienceAnalyticsDeviceScopeable)() { + m.userExperienceAnalyticsDeviceScopes = value +} +// SetUserExperienceAnalyticsDeviceScores sets the userExperienceAnalyticsDeviceScores property value. User experience analytics device scores +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceScores(value []UserExperienceAnalyticsDeviceScoresable)() { + m.userExperienceAnalyticsDeviceScores = value +} +// SetUserExperienceAnalyticsDeviceStartupHistory sets the userExperienceAnalyticsDeviceStartupHistory property value. User experience analytics device Startup History +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceStartupHistory(value []UserExperienceAnalyticsDeviceStartupHistoryable)() { + m.userExperienceAnalyticsDeviceStartupHistory = value +} +// SetUserExperienceAnalyticsDeviceStartupProcesses sets the userExperienceAnalyticsDeviceStartupProcesses property value. User experience analytics device Startup Processes +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceStartupProcesses(value []UserExperienceAnalyticsDeviceStartupProcessable)() { + m.userExperienceAnalyticsDeviceStartupProcesses = value +} +// SetUserExperienceAnalyticsDeviceStartupProcessPerformance sets the userExperienceAnalyticsDeviceStartupProcessPerformance property value. User experience analytics device Startup Process Performance +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceStartupProcessPerformance(value []UserExperienceAnalyticsDeviceStartupProcessPerformanceable)() { + m.userExperienceAnalyticsDeviceStartupProcessPerformance = value +} +// SetUserExperienceAnalyticsDevicesWithoutCloudIdentity sets the userExperienceAnalyticsDevicesWithoutCloudIdentity property value. User experience analytics devices without cloud identity. +func (m *DeviceManagement) SetUserExperienceAnalyticsDevicesWithoutCloudIdentity(value []UserExperienceAnalyticsDeviceWithoutCloudIdentityable)() { + m.userExperienceAnalyticsDevicesWithoutCloudIdentity = value +} +// SetUserExperienceAnalyticsDeviceTimelineEvents sets the userExperienceAnalyticsDeviceTimelineEvents property value. The user experience analytics device events entity contains NRT device timeline events details. +func (m *DeviceManagement) SetUserExperienceAnalyticsDeviceTimelineEvents(value []UserExperienceAnalyticsDeviceTimelineEventsable)() { + m.userExperienceAnalyticsDeviceTimelineEvents = value +} +// SetUserExperienceAnalyticsImpactingProcess sets the userExperienceAnalyticsImpactingProcess property value. User experience analytics impacting process +func (m *DeviceManagement) SetUserExperienceAnalyticsImpactingProcess(value []UserExperienceAnalyticsImpactingProcessable)() { + m.userExperienceAnalyticsImpactingProcess = value +} +// SetUserExperienceAnalyticsMetricHistory sets the userExperienceAnalyticsMetricHistory property value. User experience analytics metric history +func (m *DeviceManagement) SetUserExperienceAnalyticsMetricHistory(value []UserExperienceAnalyticsMetricHistoryable)() { + m.userExperienceAnalyticsMetricHistory = value +} +// SetUserExperienceAnalyticsModelScores sets the userExperienceAnalyticsModelScores property value. User experience analytics model scores +func (m *DeviceManagement) SetUserExperienceAnalyticsModelScores(value []UserExperienceAnalyticsModelScoresable)() { + m.userExperienceAnalyticsModelScores = value +} +// SetUserExperienceAnalyticsNotAutopilotReadyDevice sets the userExperienceAnalyticsNotAutopilotReadyDevice property value. User experience analytics devices not Windows Autopilot ready. +func (m *DeviceManagement) SetUserExperienceAnalyticsNotAutopilotReadyDevice(value []UserExperienceAnalyticsNotAutopilotReadyDeviceable)() { + m.userExperienceAnalyticsNotAutopilotReadyDevice = value +} +// SetUserExperienceAnalyticsOverview sets the userExperienceAnalyticsOverview property value. User experience analytics overview +func (m *DeviceManagement) SetUserExperienceAnalyticsOverview(value UserExperienceAnalyticsOverviewable)() { + m.userExperienceAnalyticsOverview = value +} +// SetUserExperienceAnalyticsRemoteConnection sets the userExperienceAnalyticsRemoteConnection property value. User experience analytics remote connection +func (m *DeviceManagement) SetUserExperienceAnalyticsRemoteConnection(value []UserExperienceAnalyticsRemoteConnectionable)() { + m.userExperienceAnalyticsRemoteConnection = value +} +// SetUserExperienceAnalyticsResourcePerformance sets the userExperienceAnalyticsResourcePerformance property value. User experience analytics resource performance +func (m *DeviceManagement) SetUserExperienceAnalyticsResourcePerformance(value []UserExperienceAnalyticsResourcePerformanceable)() { + m.userExperienceAnalyticsResourcePerformance = value +} +// SetUserExperienceAnalyticsScoreHistory sets the userExperienceAnalyticsScoreHistory property value. User experience analytics device Startup Score History +func (m *DeviceManagement) SetUserExperienceAnalyticsScoreHistory(value []UserExperienceAnalyticsScoreHistoryable)() { + m.userExperienceAnalyticsScoreHistory = value +} +// SetUserExperienceAnalyticsSettings sets the userExperienceAnalyticsSettings property value. User experience analytics device settings +func (m *DeviceManagement) SetUserExperienceAnalyticsSettings(value UserExperienceAnalyticsSettingsable)() { + m.userExperienceAnalyticsSettings = value +} +// SetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric sets the userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric property value. User experience analytics work from anywhere hardware readiness metrics. +func (m *DeviceManagement) SetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(value UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable)() { + m.userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric = value +} +// SetUserExperienceAnalyticsWorkFromAnywhereMetrics sets the userExperienceAnalyticsWorkFromAnywhereMetrics property value. User experience analytics work from anywhere metrics. +func (m *DeviceManagement) SetUserExperienceAnalyticsWorkFromAnywhereMetrics(value []UserExperienceAnalyticsWorkFromAnywhereMetricable)() { + m.userExperienceAnalyticsWorkFromAnywhereMetrics = value +} +// SetUserExperienceAnalyticsWorkFromAnywhereModelPerformance sets the userExperienceAnalyticsWorkFromAnywhereModelPerformance property value. The user experience analytics work from anywhere model performance +func (m *DeviceManagement) SetUserExperienceAnalyticsWorkFromAnywhereModelPerformance(value []UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable)() { + m.userExperienceAnalyticsWorkFromAnywhereModelPerformance = value +} +// SetUserPfxCertificates sets the userPfxCertificates property value. Collection of PFX certificates associated with a user. +func (m *DeviceManagement) SetUserPfxCertificates(value []UserPFXCertificateable)() { + m.userPfxCertificates = value +} +// SetVirtualEndpoint sets the virtualEndpoint property value. The virtualEndpoint property +func (m *DeviceManagement) SetVirtualEndpoint(value VirtualEndpointable)() { + m.virtualEndpoint = value +} +// SetWindowsAutopilotDeploymentProfiles sets the windowsAutopilotDeploymentProfiles property value. Windows auto pilot deployment profiles +func (m *DeviceManagement) SetWindowsAutopilotDeploymentProfiles(value []WindowsAutopilotDeploymentProfileable)() { + m.windowsAutopilotDeploymentProfiles = value +} +// SetWindowsAutopilotDeviceIdentities sets the windowsAutopilotDeviceIdentities property value. The Windows autopilot device identities contained collection. +func (m *DeviceManagement) SetWindowsAutopilotDeviceIdentities(value []WindowsAutopilotDeviceIdentityable)() { + m.windowsAutopilotDeviceIdentities = value +} +// SetWindowsAutopilotSettings sets the windowsAutopilotSettings property value. The Windows autopilot account settings. +func (m *DeviceManagement) SetWindowsAutopilotSettings(value WindowsAutopilotSettingsable)() { + m.windowsAutopilotSettings = value +} +// SetWindowsDriverUpdateProfiles sets the windowsDriverUpdateProfiles property value. A collection of windows driver update profiles +func (m *DeviceManagement) SetWindowsDriverUpdateProfiles(value []WindowsDriverUpdateProfileable)() { + m.windowsDriverUpdateProfiles = value +} +// SetWindowsFeatureUpdateProfiles sets the windowsFeatureUpdateProfiles property value. A collection of windows feature update profiles +func (m *DeviceManagement) SetWindowsFeatureUpdateProfiles(value []WindowsFeatureUpdateProfileable)() { + m.windowsFeatureUpdateProfiles = value +} +// SetWindowsInformationProtectionAppLearningSummaries sets the windowsInformationProtectionAppLearningSummaries property value. The windows information protection app learning summaries. +func (m *DeviceManagement) SetWindowsInformationProtectionAppLearningSummaries(value []WindowsInformationProtectionAppLearningSummaryable)() { + m.windowsInformationProtectionAppLearningSummaries = value +} +// SetWindowsInformationProtectionNetworkLearningSummaries sets the windowsInformationProtectionNetworkLearningSummaries property value. The windows information protection network learning summaries. +func (m *DeviceManagement) SetWindowsInformationProtectionNetworkLearningSummaries(value []WindowsInformationProtectionNetworkLearningSummaryable)() { + m.windowsInformationProtectionNetworkLearningSummaries = value +} +// SetWindowsMalwareInformation sets the windowsMalwareInformation property value. The list of affected malware in the tenant. +func (m *DeviceManagement) SetWindowsMalwareInformation(value []WindowsMalwareInformationable)() { + m.windowsMalwareInformation = value +} +// SetWindowsMalwareOverview sets the windowsMalwareOverview property value. Malware overview for windows devices. +func (m *DeviceManagement) SetWindowsMalwareOverview(value WindowsMalwareOverviewable)() { + m.windowsMalwareOverview = value +} +// SetWindowsQualityUpdateProfiles sets the windowsQualityUpdateProfiles property value. A collection of windows quality update profiles +func (m *DeviceManagement) SetWindowsQualityUpdateProfiles(value []WindowsQualityUpdateProfileable)() { + m.windowsQualityUpdateProfiles = value +} +// SetWindowsUpdateCatalogItems sets the windowsUpdateCatalogItems property value. A collection of windows update catalog items (fetaure updates item , quality updates item) +func (m *DeviceManagement) SetWindowsUpdateCatalogItems(value []WindowsUpdateCatalogItemable)() { + m.windowsUpdateCatalogItems = value +} +// SetZebraFotaArtifacts sets the zebraFotaArtifacts property value. The Collection of ZebraFotaArtifacts. +func (m *DeviceManagement) SetZebraFotaArtifacts(value []ZebraFotaArtifactable)() { + m.zebraFotaArtifacts = value +} +// SetZebraFotaConnector sets the zebraFotaConnector property value. The singleton ZebraFotaConnector associated with account. +func (m *DeviceManagement) SetZebraFotaConnector(value ZebraFotaConnectorable)() { + m.zebraFotaConnector = value +} +// SetZebraFotaDeployments sets the zebraFotaDeployments property value. Collection of ZebraFotaDeployments associated with account. +func (m *DeviceManagement) SetZebraFotaDeployments(value []ZebraFotaDeploymentable)() { + m.zebraFotaDeployments = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition.go new file mode 100644 index 000000000..a3f1e4630 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingDefinition +type DeviceManagementAbstractComplexSettingDefinition struct { + DeviceManagementSettingDefinition + // List of definition IDs for all possible implementations of this abstract complex setting + implementations []string +} +// NewDeviceManagementAbstractComplexSettingDefinition instantiates a new DeviceManagementAbstractComplexSettingDefinition and sets the default values. +func NewDeviceManagementAbstractComplexSettingDefinition()(*DeviceManagementAbstractComplexSettingDefinition) { + m := &DeviceManagementAbstractComplexSettingDefinition{ + DeviceManagementSettingDefinition: *NewDeviceManagementSettingDefinition(), + } + return m +} +// CreateDeviceManagementAbstractComplexSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAbstractComplexSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAbstractComplexSettingDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAbstractComplexSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingDefinition.GetFieldDeserializers() + res["implementations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetImplementations(res) + } + return nil + } + return res +} +// GetImplementations gets the implementations property value. List of definition IDs for all possible implementations of this abstract complex setting +func (m *DeviceManagementAbstractComplexSettingDefinition) GetImplementations()([]string) { + return m.implementations +} +// Serialize serializes information the current object +func (m *DeviceManagementAbstractComplexSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingDefinition.Serialize(writer) + if err != nil { + return err + } + if m.GetImplementations() != nil { + err = writer.WriteCollectionOfStringValues("implementations", m.GetImplementations()) + if err != nil { + return err + } + } + return nil +} +// SetImplementations sets the implementations property value. List of definition IDs for all possible implementations of this abstract complex setting +func (m *DeviceManagementAbstractComplexSettingDefinition) SetImplementations(value []string)() { + m.implementations = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_response.go new file mode 100644 index 000000000..7dc6bf746 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingDefinitionCollectionResponse +type DeviceManagementAbstractComplexSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementAbstractComplexSettingDefinitionable +} +// NewDeviceManagementAbstractComplexSettingDefinitionCollectionResponse instantiates a new DeviceManagementAbstractComplexSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementAbstractComplexSettingDefinitionCollectionResponse()(*DeviceManagementAbstractComplexSettingDefinitionCollectionResponse) { + m := &DeviceManagementAbstractComplexSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementAbstractComplexSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAbstractComplexSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAbstractComplexSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAbstractComplexSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAbstractComplexSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAbstractComplexSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAbstractComplexSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementAbstractComplexSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementAbstractComplexSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementAbstractComplexSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementAbstractComplexSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementAbstractComplexSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_responseable.go new file mode 100644 index 000000000..9f6bd989b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingDefinitionCollectionResponseable +type DeviceManagementAbstractComplexSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementAbstractComplexSettingDefinitionable) + SetValue(value []DeviceManagementAbstractComplexSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definitionable.go new file mode 100644 index 000000000..ec577553b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_definitionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingDefinitionable +type DeviceManagementAbstractComplexSettingDefinitionable interface { + DeviceManagementSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetImplementations()([]string) + SetImplementations(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance.go new file mode 100644 index 000000000..34ab2c30f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingInstance +type DeviceManagementAbstractComplexSettingInstance struct { + DeviceManagementSettingInstance + // The definition ID for the chosen implementation of this complex setting + implementationId *string + // The values that make up the complex setting + value []DeviceManagementSettingInstanceable +} +// NewDeviceManagementAbstractComplexSettingInstance instantiates a new DeviceManagementAbstractComplexSettingInstance and sets the default values. +func NewDeviceManagementAbstractComplexSettingInstance()(*DeviceManagementAbstractComplexSettingInstance) { + m := &DeviceManagementAbstractComplexSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementAbstractComplexSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementAbstractComplexSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAbstractComplexSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAbstractComplexSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAbstractComplexSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + res["implementationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImplementationId(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetImplementationId gets the implementationId property value. The definition ID for the chosen implementation of this complex setting +func (m *DeviceManagementAbstractComplexSettingInstance) GetImplementationId()(*string) { + return m.implementationId +} +// GetValue gets the value property value. The values that make up the complex setting +func (m *DeviceManagementAbstractComplexSettingInstance) GetValue()([]DeviceManagementSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementAbstractComplexSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("implementationId", m.GetImplementationId()) + if err != nil { + return err + } + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetImplementationId sets the implementationId property value. The definition ID for the chosen implementation of this complex setting +func (m *DeviceManagementAbstractComplexSettingInstance) SetImplementationId(value *string)() { + m.implementationId = value +} +// SetValue sets the value property value. The values that make up the complex setting +func (m *DeviceManagementAbstractComplexSettingInstance) SetValue(value []DeviceManagementSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_response.go new file mode 100644 index 000000000..522637b75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingInstanceCollectionResponse +type DeviceManagementAbstractComplexSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementAbstractComplexSettingInstanceable +} +// NewDeviceManagementAbstractComplexSettingInstanceCollectionResponse instantiates a new DeviceManagementAbstractComplexSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementAbstractComplexSettingInstanceCollectionResponse()(*DeviceManagementAbstractComplexSettingInstanceCollectionResponse) { + m := &DeviceManagementAbstractComplexSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementAbstractComplexSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAbstractComplexSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAbstractComplexSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAbstractComplexSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAbstractComplexSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAbstractComplexSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAbstractComplexSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementAbstractComplexSettingInstanceCollectionResponse) GetValue()([]DeviceManagementAbstractComplexSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementAbstractComplexSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementAbstractComplexSettingInstanceCollectionResponse) SetValue(value []DeviceManagementAbstractComplexSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_responseable.go new file mode 100644 index 000000000..e341b9f7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingInstanceCollectionResponseable +type DeviceManagementAbstractComplexSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementAbstractComplexSettingInstanceable) + SetValue(value []DeviceManagementAbstractComplexSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instanceable.go new file mode 100644 index 000000000..6b02f07d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_abstract_complex_setting_instanceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAbstractComplexSettingInstanceable +type DeviceManagementAbstractComplexSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetImplementationId()(*string) + GetValue()([]DeviceManagementSettingInstanceable) + SetImplementationId(value *string)() + SetValue(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_mode.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_mode.go new file mode 100644 index 000000000..d90e254e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_mode.go @@ -0,0 +1,151 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleDeviceMode +type DeviceManagementApplicabilityRuleDeviceMode struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Windows 10 Device Mode type. + deviceMode *Windows10DeviceModeType + // Name for object. + name *string + // The OdataType property + odataType *string + // Supported Applicability rule types for Device Configuration + ruleType *DeviceManagementApplicabilityRuleType +} +// NewDeviceManagementApplicabilityRuleDeviceMode instantiates a new deviceManagementApplicabilityRuleDeviceMode and sets the default values. +func NewDeviceManagementApplicabilityRuleDeviceMode()(*DeviceManagementApplicabilityRuleDeviceMode) { + m := &DeviceManagementApplicabilityRuleDeviceMode{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementApplicabilityRuleDeviceModeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementApplicabilityRuleDeviceModeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementApplicabilityRuleDeviceMode(), 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 *DeviceManagementApplicabilityRuleDeviceMode) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceMode gets the deviceMode property value. Windows 10 Device Mode type. +func (m *DeviceManagementApplicabilityRuleDeviceMode) GetDeviceMode()(*Windows10DeviceModeType) { + return m.deviceMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementApplicabilityRuleDeviceMode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindows10DeviceModeType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceMode(val.(*Windows10DeviceModeType)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["ruleType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementApplicabilityRuleType) + if err != nil { + return err + } + if val != nil { + m.SetRuleType(val.(*DeviceManagementApplicabilityRuleType)) + } + return nil + } + return res +} +// GetName gets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleDeviceMode) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleDeviceMode) GetOdataType()(*string) { + return m.odataType +} +// GetRuleType gets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleDeviceMode) GetRuleType()(*DeviceManagementApplicabilityRuleType) { + return m.ruleType +} +// Serialize serializes information the current object +func (m *DeviceManagementApplicabilityRuleDeviceMode) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDeviceMode() != nil { + cast := (*m.GetDeviceMode()).String() + err := writer.WriteStringValue("deviceMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRuleType() != nil { + cast := (*m.GetRuleType()).String() + err := writer.WriteStringValue("ruleType", &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 *DeviceManagementApplicabilityRuleDeviceMode) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceMode sets the deviceMode property value. Windows 10 Device Mode type. +func (m *DeviceManagementApplicabilityRuleDeviceMode) SetDeviceMode(value *Windows10DeviceModeType)() { + m.deviceMode = value +} +// SetName sets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleDeviceMode) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleDeviceMode) SetOdataType(value *string)() { + m.odataType = value +} +// SetRuleType sets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleDeviceMode) SetRuleType(value *DeviceManagementApplicabilityRuleType)() { + m.ruleType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_modeable.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_modeable.go new file mode 100644 index 000000000..102fc1a29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_device_modeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleDeviceModeable +type DeviceManagementApplicabilityRuleDeviceModeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceMode()(*Windows10DeviceModeType) + GetName()(*string) + GetOdataType()(*string) + GetRuleType()(*DeviceManagementApplicabilityRuleType) + SetDeviceMode(value *Windows10DeviceModeType)() + SetName(value *string)() + SetOdataType(value *string)() + SetRuleType(value *DeviceManagementApplicabilityRuleType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_edition.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_edition.go new file mode 100644 index 000000000..241555bdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_edition.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleOsEdition +type DeviceManagementApplicabilityRuleOsEdition struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name for object. + name *string + // The OdataType property + odataType *string + // Applicability rule OS edition type. + osEditionTypes []Windows10EditionType + // Supported Applicability rule types for Device Configuration + ruleType *DeviceManagementApplicabilityRuleType +} +// NewDeviceManagementApplicabilityRuleOsEdition instantiates a new deviceManagementApplicabilityRuleOsEdition and sets the default values. +func NewDeviceManagementApplicabilityRuleOsEdition()(*DeviceManagementApplicabilityRuleOsEdition) { + m := &DeviceManagementApplicabilityRuleOsEdition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementApplicabilityRuleOsEditionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementApplicabilityRuleOsEditionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementApplicabilityRuleOsEdition(), 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 *DeviceManagementApplicabilityRuleOsEdition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementApplicabilityRuleOsEdition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["osEditionTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseWindows10EditionType) + if err != nil { + return err + } + if val != nil { + res := make([]Windows10EditionType, len(val)) + for i, v := range val { + res[i] = *(v.(*Windows10EditionType)) + } + m.SetOsEditionTypes(res) + } + return nil + } + res["ruleType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementApplicabilityRuleType) + if err != nil { + return err + } + if val != nil { + m.SetRuleType(val.(*DeviceManagementApplicabilityRuleType)) + } + return nil + } + return res +} +// GetName gets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleOsEdition) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleOsEdition) GetOdataType()(*string) { + return m.odataType +} +// GetOsEditionTypes gets the osEditionTypes property value. Applicability rule OS edition type. +func (m *DeviceManagementApplicabilityRuleOsEdition) GetOsEditionTypes()([]Windows10EditionType) { + return m.osEditionTypes +} +// GetRuleType gets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleOsEdition) GetRuleType()(*DeviceManagementApplicabilityRuleType) { + return m.ruleType +} +// Serialize serializes information the current object +func (m *DeviceManagementApplicabilityRuleOsEdition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOsEditionTypes() != nil { + err := writer.WriteCollectionOfStringValues("osEditionTypes", SerializeWindows10EditionType(m.GetOsEditionTypes())) + if err != nil { + return err + } + } + if m.GetRuleType() != nil { + cast := (*m.GetRuleType()).String() + err := writer.WriteStringValue("ruleType", &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 *DeviceManagementApplicabilityRuleOsEdition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleOsEdition) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleOsEdition) SetOdataType(value *string)() { + m.odataType = value +} +// SetOsEditionTypes sets the osEditionTypes property value. Applicability rule OS edition type. +func (m *DeviceManagementApplicabilityRuleOsEdition) SetOsEditionTypes(value []Windows10EditionType)() { + m.osEditionTypes = value +} +// SetRuleType sets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleOsEdition) SetRuleType(value *DeviceManagementApplicabilityRuleType)() { + m.ruleType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_editionable.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_editionable.go new file mode 100644 index 000000000..2e37fc665 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_editionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleOsEditionable +type DeviceManagementApplicabilityRuleOsEditionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetOsEditionTypes()([]Windows10EditionType) + GetRuleType()(*DeviceManagementApplicabilityRuleType) + SetName(value *string)() + SetOdataType(value *string)() + SetOsEditionTypes(value []Windows10EditionType)() + SetRuleType(value *DeviceManagementApplicabilityRuleType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_version.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_version.go new file mode 100644 index 000000000..ef678e534 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_version.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleOsVersion +type DeviceManagementApplicabilityRuleOsVersion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Max OS version for Applicability Rule. + maxOSVersion *string + // Min OS version for Applicability Rule. + minOSVersion *string + // Name for object. + name *string + // The OdataType property + odataType *string + // Supported Applicability rule types for Device Configuration + ruleType *DeviceManagementApplicabilityRuleType +} +// NewDeviceManagementApplicabilityRuleOsVersion instantiates a new deviceManagementApplicabilityRuleOsVersion and sets the default values. +func NewDeviceManagementApplicabilityRuleOsVersion()(*DeviceManagementApplicabilityRuleOsVersion) { + m := &DeviceManagementApplicabilityRuleOsVersion{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementApplicabilityRuleOsVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementApplicabilityRuleOsVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementApplicabilityRuleOsVersion(), 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 *DeviceManagementApplicabilityRuleOsVersion) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementApplicabilityRuleOsVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maxOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxOSVersion(val) + } + return nil + } + res["minOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinOSVersion(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["ruleType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementApplicabilityRuleType) + if err != nil { + return err + } + if val != nil { + m.SetRuleType(val.(*DeviceManagementApplicabilityRuleType)) + } + return nil + } + return res +} +// GetMaxOSVersion gets the maxOSVersion property value. Max OS version for Applicability Rule. +func (m *DeviceManagementApplicabilityRuleOsVersion) GetMaxOSVersion()(*string) { + return m.maxOSVersion +} +// GetMinOSVersion gets the minOSVersion property value. Min OS version for Applicability Rule. +func (m *DeviceManagementApplicabilityRuleOsVersion) GetMinOSVersion()(*string) { + return m.minOSVersion +} +// GetName gets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleOsVersion) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleOsVersion) GetOdataType()(*string) { + return m.odataType +} +// GetRuleType gets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleOsVersion) GetRuleType()(*DeviceManagementApplicabilityRuleType) { + return m.ruleType +} +// Serialize serializes information the current object +func (m *DeviceManagementApplicabilityRuleOsVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("maxOSVersion", m.GetMaxOSVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("minOSVersion", m.GetMinOSVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRuleType() != nil { + cast := (*m.GetRuleType()).String() + err := writer.WriteStringValue("ruleType", &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 *DeviceManagementApplicabilityRuleOsVersion) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaxOSVersion sets the maxOSVersion property value. Max OS version for Applicability Rule. +func (m *DeviceManagementApplicabilityRuleOsVersion) SetMaxOSVersion(value *string)() { + m.maxOSVersion = value +} +// SetMinOSVersion sets the minOSVersion property value. Min OS version for Applicability Rule. +func (m *DeviceManagementApplicabilityRuleOsVersion) SetMinOSVersion(value *string)() { + m.minOSVersion = value +} +// SetName sets the name property value. Name for object. +func (m *DeviceManagementApplicabilityRuleOsVersion) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementApplicabilityRuleOsVersion) SetOdataType(value *string)() { + m.odataType = value +} +// SetRuleType sets the ruleType property value. Supported Applicability rule types for Device Configuration +func (m *DeviceManagementApplicabilityRuleOsVersion) SetRuleType(value *DeviceManagementApplicabilityRuleType)() { + m.ruleType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_versionable.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_versionable.go new file mode 100644 index 000000000..12da7cfbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_os_versionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementApplicabilityRuleOsVersionable +type DeviceManagementApplicabilityRuleOsVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxOSVersion()(*string) + GetMinOSVersion()(*string) + GetName()(*string) + GetOdataType()(*string) + GetRuleType()(*DeviceManagementApplicabilityRuleType) + SetMaxOSVersion(value *string)() + SetMinOSVersion(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetRuleType(value *DeviceManagementApplicabilityRuleType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_type.go b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_type.go new file mode 100644 index 000000000..5bed3ffa3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_applicability_rule_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementApplicabilityRuleType int + +const ( + // Include + INCLUDE_DEVICEMANAGEMENTAPPLICABILITYRULETYPE DeviceManagementApplicabilityRuleType = iota + // Exclude + EXCLUDE_DEVICEMANAGEMENTAPPLICABILITYRULETYPE +) + +func (i DeviceManagementApplicabilityRuleType) String() string { + return []string{"include", "exclude"}[i] +} +func ParseDeviceManagementApplicabilityRuleType(v string) (interface{}, error) { + result := INCLUDE_DEVICEMANAGEMENTAPPLICABILITYRULETYPE + switch v { + case "include": + result = INCLUDE_DEVICEMANAGEMENTAPPLICABILITYRULETYPE + case "exclude": + result = EXCLUDE_DEVICEMANAGEMENTAPPLICABILITYRULETYPE + default: + return 0, errors.New("Unknown DeviceManagementApplicabilityRuleType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementApplicabilityRuleType(values []DeviceManagementApplicabilityRuleType) []string { + 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/device_management_autopilot_event.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event.go new file mode 100644 index 000000000..c3b17db13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event.go @@ -0,0 +1,750 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotEvent represents an Autopilot flow event. +type DeviceManagementAutopilotEvent struct { + Entity + // Time spent in user ESP. + accountSetupDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The accountSetupStatus property + accountSetupStatus *WindowsAutopilotDeploymentState + // Autopilot deployment duration including enrollment. + deploymentDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Deployment end time. + deploymentEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Deployment start time. + deploymentStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deploymentState property + deploymentState *WindowsAutopilotDeploymentState + // Total deployment duration from enrollment to Desktop screen. + deploymentTotalDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Device id associated with the object + deviceId *string + // Time spent in device enrollment. + devicePreparationDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Device registration date. + deviceRegisteredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device serial number. + deviceSerialNumber *string + // Time spent in device ESP. + deviceSetupDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The deviceSetupStatus property + deviceSetupStatus *WindowsAutopilotDeploymentState + // Enrollment failure details. + enrollmentFailureDetails *string + // Device enrollment start date. + enrollmentStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The enrollmentState property + enrollmentState *EnrollmentState + // The enrollmentType property + enrollmentType *WindowsAutopilotEnrollmentType + // Time when the event occurred . + eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Managed device name. + managedDeviceName *string + // Device operating system version. + osVersion *string + // Policy and application status details for this device. + policyStatusDetails []DeviceManagementAutopilotPolicyStatusDetailable + // Count of applications targeted. + targetedAppCount *int32 + // Count of policies targeted. + targetedPolicyCount *int32 + // User principal name used to enroll the device. + userPrincipalName *string + // Enrollment Status Page profile name + windows10EnrollmentCompletionPageConfigurationDisplayName *string + // Enrollment Status Page profile ID + windows10EnrollmentCompletionPageConfigurationId *string + // Autopilot profile name. + windowsAutopilotDeploymentProfileDisplayName *string +} +// NewDeviceManagementAutopilotEvent instantiates a new deviceManagementAutopilotEvent and sets the default values. +func NewDeviceManagementAutopilotEvent()(*DeviceManagementAutopilotEvent) { + m := &DeviceManagementAutopilotEvent{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementAutopilotEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAutopilotEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAutopilotEvent(), nil +} +// GetAccountSetupDuration gets the accountSetupDuration property value. Time spent in user ESP. +func (m *DeviceManagementAutopilotEvent) GetAccountSetupDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.accountSetupDuration +} +// GetAccountSetupStatus gets the accountSetupStatus property value. The accountSetupStatus property +func (m *DeviceManagementAutopilotEvent) GetAccountSetupStatus()(*WindowsAutopilotDeploymentState) { + return m.accountSetupStatus +} +// GetDeploymentDuration gets the deploymentDuration property value. Autopilot deployment duration including enrollment. +func (m *DeviceManagementAutopilotEvent) GetDeploymentDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.deploymentDuration +} +// GetDeploymentEndDateTime gets the deploymentEndDateTime property value. Deployment end time. +func (m *DeviceManagementAutopilotEvent) GetDeploymentEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deploymentEndDateTime +} +// GetDeploymentStartDateTime gets the deploymentStartDateTime property value. Deployment start time. +func (m *DeviceManagementAutopilotEvent) GetDeploymentStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deploymentStartDateTime +} +// GetDeploymentState gets the deploymentState property value. The deploymentState property +func (m *DeviceManagementAutopilotEvent) GetDeploymentState()(*WindowsAutopilotDeploymentState) { + return m.deploymentState +} +// GetDeploymentTotalDuration gets the deploymentTotalDuration property value. Total deployment duration from enrollment to Desktop screen. +func (m *DeviceManagementAutopilotEvent) GetDeploymentTotalDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.deploymentTotalDuration +} +// GetDeviceId gets the deviceId property value. Device id associated with the object +func (m *DeviceManagementAutopilotEvent) GetDeviceId()(*string) { + return m.deviceId +} +// GetDevicePreparationDuration gets the devicePreparationDuration property value. Time spent in device enrollment. +func (m *DeviceManagementAutopilotEvent) GetDevicePreparationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.devicePreparationDuration +} +// GetDeviceRegisteredDateTime gets the deviceRegisteredDateTime property value. Device registration date. +func (m *DeviceManagementAutopilotEvent) GetDeviceRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deviceRegisteredDateTime +} +// GetDeviceSerialNumber gets the deviceSerialNumber property value. Device serial number. +func (m *DeviceManagementAutopilotEvent) GetDeviceSerialNumber()(*string) { + return m.deviceSerialNumber +} +// GetDeviceSetupDuration gets the deviceSetupDuration property value. Time spent in device ESP. +func (m *DeviceManagementAutopilotEvent) GetDeviceSetupDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.deviceSetupDuration +} +// GetDeviceSetupStatus gets the deviceSetupStatus property value. The deviceSetupStatus property +func (m *DeviceManagementAutopilotEvent) GetDeviceSetupStatus()(*WindowsAutopilotDeploymentState) { + return m.deviceSetupStatus +} +// GetEnrollmentFailureDetails gets the enrollmentFailureDetails property value. Enrollment failure details. +func (m *DeviceManagementAutopilotEvent) GetEnrollmentFailureDetails()(*string) { + return m.enrollmentFailureDetails +} +// GetEnrollmentStartDateTime gets the enrollmentStartDateTime property value. Device enrollment start date. +func (m *DeviceManagementAutopilotEvent) GetEnrollmentStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.enrollmentStartDateTime +} +// GetEnrollmentState gets the enrollmentState property value. The enrollmentState property +func (m *DeviceManagementAutopilotEvent) GetEnrollmentState()(*EnrollmentState) { + return m.enrollmentState +} +// GetEnrollmentType gets the enrollmentType property value. The enrollmentType property +func (m *DeviceManagementAutopilotEvent) GetEnrollmentType()(*WindowsAutopilotEnrollmentType) { + return m.enrollmentType +} +// GetEventDateTime gets the eventDateTime property value. Time when the event occurred . +func (m *DeviceManagementAutopilotEvent) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAutopilotEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountSetupDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountSetupDuration(val) + } + return nil + } + res["accountSetupStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsAutopilotDeploymentState) + if err != nil { + return err + } + if val != nil { + m.SetAccountSetupStatus(val.(*WindowsAutopilotDeploymentState)) + } + return nil + } + res["deploymentDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentDuration(val) + } + return nil + } + res["deploymentEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentEndDateTime(val) + } + return nil + } + res["deploymentStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentStartDateTime(val) + } + return nil + } + res["deploymentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsAutopilotDeploymentState) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentState(val.(*WindowsAutopilotDeploymentState)) + } + return nil + } + res["deploymentTotalDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDeploymentTotalDuration(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["devicePreparationDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDevicePreparationDuration(val) + } + return nil + } + res["deviceRegisteredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceRegisteredDateTime(val) + } + return nil + } + res["deviceSerialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceSerialNumber(val) + } + return nil + } + res["deviceSetupDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceSetupDuration(val) + } + return nil + } + res["deviceSetupStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsAutopilotDeploymentState) + if err != nil { + return err + } + if val != nil { + m.SetDeviceSetupStatus(val.(*WindowsAutopilotDeploymentState)) + } + return nil + } + res["enrollmentFailureDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentFailureDetails(val) + } + return nil + } + res["enrollmentStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentStartDateTime(val) + } + return nil + } + res["enrollmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentState) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentState(val.(*EnrollmentState)) + } + return nil + } + res["enrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsAutopilotEnrollmentType) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentType(val.(*WindowsAutopilotEnrollmentType)) + } + return nil + } + res["eventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventDateTime(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["policyStatusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAutopilotPolicyStatusDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAutopilotPolicyStatusDetailable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAutopilotPolicyStatusDetailable) + } + m.SetPolicyStatusDetails(res) + } + return nil + } + res["targetedAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTargetedAppCount(val) + } + return nil + } + res["targetedPolicyCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTargetedPolicyCount(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["windows10EnrollmentCompletionPageConfigurationDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWindows10EnrollmentCompletionPageConfigurationDisplayName(val) + } + return nil + } + res["windows10EnrollmentCompletionPageConfigurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWindows10EnrollmentCompletionPageConfigurationId(val) + } + return nil + } + res["windowsAutopilotDeploymentProfileDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsAutopilotDeploymentProfileDisplayName(val) + } + return nil + } + return res +} +// GetManagedDeviceName gets the managedDeviceName property value. Managed device name. +func (m *DeviceManagementAutopilotEvent) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetOsVersion gets the osVersion property value. Device operating system version. +func (m *DeviceManagementAutopilotEvent) GetOsVersion()(*string) { + return m.osVersion +} +// GetPolicyStatusDetails gets the policyStatusDetails property value. Policy and application status details for this device. +func (m *DeviceManagementAutopilotEvent) GetPolicyStatusDetails()([]DeviceManagementAutopilotPolicyStatusDetailable) { + return m.policyStatusDetails +} +// GetTargetedAppCount gets the targetedAppCount property value. Count of applications targeted. +func (m *DeviceManagementAutopilotEvent) GetTargetedAppCount()(*int32) { + return m.targetedAppCount +} +// GetTargetedPolicyCount gets the targetedPolicyCount property value. Count of policies targeted. +func (m *DeviceManagementAutopilotEvent) GetTargetedPolicyCount()(*int32) { + return m.targetedPolicyCount +} +// GetUserPrincipalName gets the userPrincipalName property value. User principal name used to enroll the device. +func (m *DeviceManagementAutopilotEvent) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetWindows10EnrollmentCompletionPageConfigurationDisplayName gets the windows10EnrollmentCompletionPageConfigurationDisplayName property value. Enrollment Status Page profile name +func (m *DeviceManagementAutopilotEvent) GetWindows10EnrollmentCompletionPageConfigurationDisplayName()(*string) { + return m.windows10EnrollmentCompletionPageConfigurationDisplayName +} +// GetWindows10EnrollmentCompletionPageConfigurationId gets the windows10EnrollmentCompletionPageConfigurationId property value. Enrollment Status Page profile ID +func (m *DeviceManagementAutopilotEvent) GetWindows10EnrollmentCompletionPageConfigurationId()(*string) { + return m.windows10EnrollmentCompletionPageConfigurationId +} +// GetWindowsAutopilotDeploymentProfileDisplayName gets the windowsAutopilotDeploymentProfileDisplayName property value. Autopilot profile name. +func (m *DeviceManagementAutopilotEvent) GetWindowsAutopilotDeploymentProfileDisplayName()(*string) { + return m.windowsAutopilotDeploymentProfileDisplayName +} +// Serialize serializes information the current object +func (m *DeviceManagementAutopilotEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("accountSetupDuration", m.GetAccountSetupDuration()) + if err != nil { + return err + } + } + if m.GetAccountSetupStatus() != nil { + cast := (*m.GetAccountSetupStatus()).String() + err = writer.WriteStringValue("accountSetupStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("deploymentDuration", m.GetDeploymentDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deploymentEndDateTime", m.GetDeploymentEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deploymentStartDateTime", m.GetDeploymentStartDateTime()) + if err != nil { + return err + } + } + if m.GetDeploymentState() != nil { + cast := (*m.GetDeploymentState()).String() + err = writer.WriteStringValue("deploymentState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("deploymentTotalDuration", m.GetDeploymentTotalDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("devicePreparationDuration", m.GetDevicePreparationDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deviceRegisteredDateTime", m.GetDeviceRegisteredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceSerialNumber", m.GetDeviceSerialNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("deviceSetupDuration", m.GetDeviceSetupDuration()) + if err != nil { + return err + } + } + if m.GetDeviceSetupStatus() != nil { + cast := (*m.GetDeviceSetupStatus()).String() + err = writer.WriteStringValue("deviceSetupStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("enrollmentFailureDetails", m.GetEnrollmentFailureDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("enrollmentStartDateTime", m.GetEnrollmentStartDateTime()) + if err != nil { + return err + } + } + if m.GetEnrollmentState() != nil { + cast := (*m.GetEnrollmentState()).String() + err = writer.WriteStringValue("enrollmentState", &cast) + if err != nil { + return err + } + } + if m.GetEnrollmentType() != nil { + cast := (*m.GetEnrollmentType()).String() + err = writer.WriteStringValue("enrollmentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + if m.GetPolicyStatusDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicyStatusDetails())) + for i, v := range m.GetPolicyStatusDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policyStatusDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("targetedAppCount", m.GetTargetedAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("targetedPolicyCount", m.GetTargetedPolicyCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("windows10EnrollmentCompletionPageConfigurationDisplayName", m.GetWindows10EnrollmentCompletionPageConfigurationDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("windows10EnrollmentCompletionPageConfigurationId", m.GetWindows10EnrollmentCompletionPageConfigurationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("windowsAutopilotDeploymentProfileDisplayName", m.GetWindowsAutopilotDeploymentProfileDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetAccountSetupDuration sets the accountSetupDuration property value. Time spent in user ESP. +func (m *DeviceManagementAutopilotEvent) SetAccountSetupDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.accountSetupDuration = value +} +// SetAccountSetupStatus sets the accountSetupStatus property value. The accountSetupStatus property +func (m *DeviceManagementAutopilotEvent) SetAccountSetupStatus(value *WindowsAutopilotDeploymentState)() { + m.accountSetupStatus = value +} +// SetDeploymentDuration sets the deploymentDuration property value. Autopilot deployment duration including enrollment. +func (m *DeviceManagementAutopilotEvent) SetDeploymentDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.deploymentDuration = value +} +// SetDeploymentEndDateTime sets the deploymentEndDateTime property value. Deployment end time. +func (m *DeviceManagementAutopilotEvent) SetDeploymentEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deploymentEndDateTime = value +} +// SetDeploymentStartDateTime sets the deploymentStartDateTime property value. Deployment start time. +func (m *DeviceManagementAutopilotEvent) SetDeploymentStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deploymentStartDateTime = value +} +// SetDeploymentState sets the deploymentState property value. The deploymentState property +func (m *DeviceManagementAutopilotEvent) SetDeploymentState(value *WindowsAutopilotDeploymentState)() { + m.deploymentState = value +} +// SetDeploymentTotalDuration sets the deploymentTotalDuration property value. Total deployment duration from enrollment to Desktop screen. +func (m *DeviceManagementAutopilotEvent) SetDeploymentTotalDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.deploymentTotalDuration = value +} +// SetDeviceId sets the deviceId property value. Device id associated with the object +func (m *DeviceManagementAutopilotEvent) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDevicePreparationDuration sets the devicePreparationDuration property value. Time spent in device enrollment. +func (m *DeviceManagementAutopilotEvent) SetDevicePreparationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.devicePreparationDuration = value +} +// SetDeviceRegisteredDateTime sets the deviceRegisteredDateTime property value. Device registration date. +func (m *DeviceManagementAutopilotEvent) SetDeviceRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deviceRegisteredDateTime = value +} +// SetDeviceSerialNumber sets the deviceSerialNumber property value. Device serial number. +func (m *DeviceManagementAutopilotEvent) SetDeviceSerialNumber(value *string)() { + m.deviceSerialNumber = value +} +// SetDeviceSetupDuration sets the deviceSetupDuration property value. Time spent in device ESP. +func (m *DeviceManagementAutopilotEvent) SetDeviceSetupDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.deviceSetupDuration = value +} +// SetDeviceSetupStatus sets the deviceSetupStatus property value. The deviceSetupStatus property +func (m *DeviceManagementAutopilotEvent) SetDeviceSetupStatus(value *WindowsAutopilotDeploymentState)() { + m.deviceSetupStatus = value +} +// SetEnrollmentFailureDetails sets the enrollmentFailureDetails property value. Enrollment failure details. +func (m *DeviceManagementAutopilotEvent) SetEnrollmentFailureDetails(value *string)() { + m.enrollmentFailureDetails = value +} +// SetEnrollmentStartDateTime sets the enrollmentStartDateTime property value. Device enrollment start date. +func (m *DeviceManagementAutopilotEvent) SetEnrollmentStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.enrollmentStartDateTime = value +} +// SetEnrollmentState sets the enrollmentState property value. The enrollmentState property +func (m *DeviceManagementAutopilotEvent) SetEnrollmentState(value *EnrollmentState)() { + m.enrollmentState = value +} +// SetEnrollmentType sets the enrollmentType property value. The enrollmentType property +func (m *DeviceManagementAutopilotEvent) SetEnrollmentType(value *WindowsAutopilotEnrollmentType)() { + m.enrollmentType = value +} +// SetEventDateTime sets the eventDateTime property value. Time when the event occurred . +func (m *DeviceManagementAutopilotEvent) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventDateTime = value +} +// SetManagedDeviceName sets the managedDeviceName property value. Managed device name. +func (m *DeviceManagementAutopilotEvent) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetOsVersion sets the osVersion property value. Device operating system version. +func (m *DeviceManagementAutopilotEvent) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetPolicyStatusDetails sets the policyStatusDetails property value. Policy and application status details for this device. +func (m *DeviceManagementAutopilotEvent) SetPolicyStatusDetails(value []DeviceManagementAutopilotPolicyStatusDetailable)() { + m.policyStatusDetails = value +} +// SetTargetedAppCount sets the targetedAppCount property value. Count of applications targeted. +func (m *DeviceManagementAutopilotEvent) SetTargetedAppCount(value *int32)() { + m.targetedAppCount = value +} +// SetTargetedPolicyCount sets the targetedPolicyCount property value. Count of policies targeted. +func (m *DeviceManagementAutopilotEvent) SetTargetedPolicyCount(value *int32)() { + m.targetedPolicyCount = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User principal name used to enroll the device. +func (m *DeviceManagementAutopilotEvent) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetWindows10EnrollmentCompletionPageConfigurationDisplayName sets the windows10EnrollmentCompletionPageConfigurationDisplayName property value. Enrollment Status Page profile name +func (m *DeviceManagementAutopilotEvent) SetWindows10EnrollmentCompletionPageConfigurationDisplayName(value *string)() { + m.windows10EnrollmentCompletionPageConfigurationDisplayName = value +} +// SetWindows10EnrollmentCompletionPageConfigurationId sets the windows10EnrollmentCompletionPageConfigurationId property value. Enrollment Status Page profile ID +func (m *DeviceManagementAutopilotEvent) SetWindows10EnrollmentCompletionPageConfigurationId(value *string)() { + m.windows10EnrollmentCompletionPageConfigurationId = value +} +// SetWindowsAutopilotDeploymentProfileDisplayName sets the windowsAutopilotDeploymentProfileDisplayName property value. Autopilot profile name. +func (m *DeviceManagementAutopilotEvent) SetWindowsAutopilotDeploymentProfileDisplayName(value *string)() { + m.windowsAutopilotDeploymentProfileDisplayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_response.go new file mode 100644 index 000000000..5ba582413 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotEventCollectionResponse +type DeviceManagementAutopilotEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementAutopilotEventable +} +// NewDeviceManagementAutopilotEventCollectionResponse instantiates a new DeviceManagementAutopilotEventCollectionResponse and sets the default values. +func NewDeviceManagementAutopilotEventCollectionResponse()(*DeviceManagementAutopilotEventCollectionResponse) { + m := &DeviceManagementAutopilotEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementAutopilotEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAutopilotEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAutopilotEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAutopilotEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAutopilotEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAutopilotEventable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAutopilotEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementAutopilotEventCollectionResponse) GetValue()([]DeviceManagementAutopilotEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementAutopilotEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementAutopilotEventCollectionResponse) SetValue(value []DeviceManagementAutopilotEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_responseable.go new file mode 100644 index 000000000..5157e68f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotEventCollectionResponseable +type DeviceManagementAutopilotEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementAutopilotEventable) + SetValue(value []DeviceManagementAutopilotEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_eventable.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_eventable.go new file mode 100644 index 000000000..d37a8d4bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_eventable.go @@ -0,0 +1,66 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotEventable +type DeviceManagementAutopilotEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountSetupDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetAccountSetupStatus()(*WindowsAutopilotDeploymentState) + GetDeploymentDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetDeploymentEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeploymentStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeploymentState()(*WindowsAutopilotDeploymentState) + GetDeploymentTotalDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetDeviceId()(*string) + GetDevicePreparationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetDeviceRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceSerialNumber()(*string) + GetDeviceSetupDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetDeviceSetupStatus()(*WindowsAutopilotDeploymentState) + GetEnrollmentFailureDetails()(*string) + GetEnrollmentStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEnrollmentState()(*EnrollmentState) + GetEnrollmentType()(*WindowsAutopilotEnrollmentType) + GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceName()(*string) + GetOsVersion()(*string) + GetPolicyStatusDetails()([]DeviceManagementAutopilotPolicyStatusDetailable) + GetTargetedAppCount()(*int32) + GetTargetedPolicyCount()(*int32) + GetUserPrincipalName()(*string) + GetWindows10EnrollmentCompletionPageConfigurationDisplayName()(*string) + GetWindows10EnrollmentCompletionPageConfigurationId()(*string) + GetWindowsAutopilotDeploymentProfileDisplayName()(*string) + SetAccountSetupDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetAccountSetupStatus(value *WindowsAutopilotDeploymentState)() + SetDeploymentDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetDeploymentEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeploymentStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeploymentState(value *WindowsAutopilotDeploymentState)() + SetDeploymentTotalDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetDeviceId(value *string)() + SetDevicePreparationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetDeviceRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceSerialNumber(value *string)() + SetDeviceSetupDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetDeviceSetupStatus(value *WindowsAutopilotDeploymentState)() + SetEnrollmentFailureDetails(value *string)() + SetEnrollmentStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEnrollmentState(value *EnrollmentState)() + SetEnrollmentType(value *WindowsAutopilotEnrollmentType)() + SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceName(value *string)() + SetOsVersion(value *string)() + SetPolicyStatusDetails(value []DeviceManagementAutopilotPolicyStatusDetailable)() + SetTargetedAppCount(value *int32)() + SetTargetedPolicyCount(value *int32)() + SetUserPrincipalName(value *string)() + SetWindows10EnrollmentCompletionPageConfigurationDisplayName(value *string)() + SetWindows10EnrollmentCompletionPageConfigurationId(value *string)() + SetWindowsAutopilotDeploymentProfileDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_compliance_status.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_compliance_status.go new file mode 100644 index 000000000..fa2edac79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_compliance_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementAutopilotPolicyComplianceStatus int + +const ( + UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS DeviceManagementAutopilotPolicyComplianceStatus = iota + COMPLIANT_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + INSTALLED_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + NOTCOMPLIANT_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + NOTINSTALLED_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + ERROR_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS +) + +func (i DeviceManagementAutopilotPolicyComplianceStatus) String() string { + return []string{"unknown", "compliant", "installed", "notCompliant", "notInstalled", "error"}[i] +} +func ParseDeviceManagementAutopilotPolicyComplianceStatus(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + case "compliant": + result = COMPLIANT_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + case "installed": + result = INSTALLED_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + case "notCompliant": + result = NOTCOMPLIANT_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + case "notInstalled": + result = NOTINSTALLED_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + case "error": + result = ERROR_DEVICEMANAGEMENTAUTOPILOTPOLICYCOMPLIANCESTATUS + default: + return 0, errors.New("Unknown DeviceManagementAutopilotPolicyComplianceStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementAutopilotPolicyComplianceStatus(values []DeviceManagementAutopilotPolicyComplianceStatus) []string { + 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/device_management_autopilot_policy_status_detail.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail.go new file mode 100644 index 000000000..43fe28f81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotPolicyStatusDetail policy status detail item contained by an autopilot event. +type DeviceManagementAutopilotPolicyStatusDetail struct { + Entity + // The complianceStatus property + complianceStatus *DeviceManagementAutopilotPolicyComplianceStatus + // The friendly name of the policy. + displayName *string + // The errorode associated with the compliance or enforcement status of the policy. Error code for enforcement status takes precedence if it exists. + errorCode *int32 + // Timestamp of the reported policy status + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The policyType property + policyType *DeviceManagementAutopilotPolicyType + // Indicates if this prolicy was tracked as part of the autopilot bootstrap enrollment sync session + trackedOnEnrollmentStatus *bool +} +// NewDeviceManagementAutopilotPolicyStatusDetail instantiates a new deviceManagementAutopilotPolicyStatusDetail and sets the default values. +func NewDeviceManagementAutopilotPolicyStatusDetail()(*DeviceManagementAutopilotPolicyStatusDetail) { + m := &DeviceManagementAutopilotPolicyStatusDetail{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementAutopilotPolicyStatusDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAutopilotPolicyStatusDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAutopilotPolicyStatusDetail(), nil +} +// GetComplianceStatus gets the complianceStatus property value. The complianceStatus property +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetComplianceStatus()(*DeviceManagementAutopilotPolicyComplianceStatus) { + return m.complianceStatus +} +// GetDisplayName gets the displayName property value. The friendly name of the policy. +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetErrorCode gets the errorCode property value. The errorode associated with the compliance or enforcement status of the policy. Error code for enforcement status takes precedence if it exists. +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementAutopilotPolicyComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetComplianceStatus(val.(*DeviceManagementAutopilotPolicyComplianceStatus)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["policyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementAutopilotPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyType(val.(*DeviceManagementAutopilotPolicyType)) + } + return nil + } + res["trackedOnEnrollmentStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTrackedOnEnrollmentStatus(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Timestamp of the reported policy status +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetPolicyType gets the policyType property value. The policyType property +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetPolicyType()(*DeviceManagementAutopilotPolicyType) { + return m.policyType +} +// GetTrackedOnEnrollmentStatus gets the trackedOnEnrollmentStatus property value. Indicates if this prolicy was tracked as part of the autopilot bootstrap enrollment sync session +func (m *DeviceManagementAutopilotPolicyStatusDetail) GetTrackedOnEnrollmentStatus()(*bool) { + return m.trackedOnEnrollmentStatus +} +// Serialize serializes information the current object +func (m *DeviceManagementAutopilotPolicyStatusDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetComplianceStatus() != nil { + cast := (*m.GetComplianceStatus()).String() + err = writer.WriteStringValue("complianceStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetPolicyType() != nil { + cast := (*m.GetPolicyType()).String() + err = writer.WriteStringValue("policyType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("trackedOnEnrollmentStatus", m.GetTrackedOnEnrollmentStatus()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceStatus sets the complianceStatus property value. The complianceStatus property +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetComplianceStatus(value *DeviceManagementAutopilotPolicyComplianceStatus)() { + m.complianceStatus = value +} +// SetDisplayName sets the displayName property value. The friendly name of the policy. +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetErrorCode sets the errorCode property value. The errorode associated with the compliance or enforcement status of the policy. Error code for enforcement status takes precedence if it exists. +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Timestamp of the reported policy status +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetPolicyType sets the policyType property value. The policyType property +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetPolicyType(value *DeviceManagementAutopilotPolicyType)() { + m.policyType = value +} +// SetTrackedOnEnrollmentStatus sets the trackedOnEnrollmentStatus property value. Indicates if this prolicy was tracked as part of the autopilot bootstrap enrollment sync session +func (m *DeviceManagementAutopilotPolicyStatusDetail) SetTrackedOnEnrollmentStatus(value *bool)() { + m.trackedOnEnrollmentStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_response.go new file mode 100644 index 000000000..c55674482 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotPolicyStatusDetailCollectionResponse +type DeviceManagementAutopilotPolicyStatusDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementAutopilotPolicyStatusDetailable +} +// NewDeviceManagementAutopilotPolicyStatusDetailCollectionResponse instantiates a new DeviceManagementAutopilotPolicyStatusDetailCollectionResponse and sets the default values. +func NewDeviceManagementAutopilotPolicyStatusDetailCollectionResponse()(*DeviceManagementAutopilotPolicyStatusDetailCollectionResponse) { + m := &DeviceManagementAutopilotPolicyStatusDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementAutopilotPolicyStatusDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementAutopilotPolicyStatusDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementAutopilotPolicyStatusDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementAutopilotPolicyStatusDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementAutopilotPolicyStatusDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementAutopilotPolicyStatusDetailable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementAutopilotPolicyStatusDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementAutopilotPolicyStatusDetailCollectionResponse) GetValue()([]DeviceManagementAutopilotPolicyStatusDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementAutopilotPolicyStatusDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementAutopilotPolicyStatusDetailCollectionResponse) SetValue(value []DeviceManagementAutopilotPolicyStatusDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_responseable.go new file mode 100644 index 000000000..45778f15d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotPolicyStatusDetailCollectionResponseable +type DeviceManagementAutopilotPolicyStatusDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementAutopilotPolicyStatusDetailable) + SetValue(value []DeviceManagementAutopilotPolicyStatusDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detailable.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detailable.go new file mode 100644 index 000000000..2d99bd35e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_status_detailable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementAutopilotPolicyStatusDetailable +type DeviceManagementAutopilotPolicyStatusDetailable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceStatus()(*DeviceManagementAutopilotPolicyComplianceStatus) + GetDisplayName()(*string) + GetErrorCode()(*int32) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPolicyType()(*DeviceManagementAutopilotPolicyType) + GetTrackedOnEnrollmentStatus()(*bool) + SetComplianceStatus(value *DeviceManagementAutopilotPolicyComplianceStatus)() + SetDisplayName(value *string)() + SetErrorCode(value *int32)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPolicyType(value *DeviceManagementAutopilotPolicyType)() + SetTrackedOnEnrollmentStatus(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_type.go b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_type.go new file mode 100644 index 000000000..8437e8297 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_autopilot_policy_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementAutopilotPolicyType int + +const ( + UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE DeviceManagementAutopilotPolicyType = iota + APPLICATION_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + APPMODEL_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + CONFIGURATIONPOLICY_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE +) + +func (i DeviceManagementAutopilotPolicyType) String() string { + return []string{"unknown", "application", "appModel", "configurationPolicy"}[i] +} +func ParseDeviceManagementAutopilotPolicyType(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + case "application": + result = APPLICATION_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + case "appModel": + result = APPMODEL_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + case "configurationPolicy": + result = CONFIGURATIONPOLICY_DEVICEMANAGEMENTAUTOPILOTPOLICYTYPE + default: + return 0, errors.New("Unknown DeviceManagementAutopilotPolicyType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementAutopilotPolicyType(values []DeviceManagementAutopilotPolicyType) []string { + 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/device_management_boolean_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance.go new file mode 100644 index 000000000..0c49e64e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementBooleanSettingInstance +type DeviceManagementBooleanSettingInstance struct { + DeviceManagementSettingInstance + // The boolean value + value *bool +} +// NewDeviceManagementBooleanSettingInstance instantiates a new DeviceManagementBooleanSettingInstance and sets the default values. +func NewDeviceManagementBooleanSettingInstance()(*DeviceManagementBooleanSettingInstance) { + m := &DeviceManagementBooleanSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementBooleanSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementBooleanSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementBooleanSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementBooleanSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementBooleanSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The boolean value +func (m *DeviceManagementBooleanSettingInstance) GetValue()(*bool) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementBooleanSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The boolean value +func (m *DeviceManagementBooleanSettingInstance) SetValue(value *bool)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_response.go new file mode 100644 index 000000000..6864a1c71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementBooleanSettingInstanceCollectionResponse +type DeviceManagementBooleanSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementBooleanSettingInstanceable +} +// NewDeviceManagementBooleanSettingInstanceCollectionResponse instantiates a new DeviceManagementBooleanSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementBooleanSettingInstanceCollectionResponse()(*DeviceManagementBooleanSettingInstanceCollectionResponse) { + m := &DeviceManagementBooleanSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementBooleanSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementBooleanSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementBooleanSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementBooleanSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementBooleanSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementBooleanSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementBooleanSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementBooleanSettingInstanceCollectionResponse) GetValue()([]DeviceManagementBooleanSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementBooleanSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementBooleanSettingInstanceCollectionResponse) SetValue(value []DeviceManagementBooleanSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_responseable.go new file mode 100644 index 000000000..8f9478883 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementBooleanSettingInstanceCollectionResponseable +type DeviceManagementBooleanSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementBooleanSettingInstanceable) + SetValue(value []DeviceManagementBooleanSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instanceable.go new file mode 100644 index 000000000..b980c3dd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_boolean_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementBooleanSettingInstanceable +type DeviceManagementBooleanSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration.go b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration.go new file mode 100644 index 000000000..40b4d9573 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration.go @@ -0,0 +1,252 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCachedReportConfiguration entity representing the configuration of a cached report +type DeviceManagementCachedReportConfiguration struct { + Entity + // Time that the cached report expires + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Filters applied on report creation. + filter *string + // Time that the cached report was last refreshed + lastRefreshDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Caller-managed metadata associated with the report + metadata *string + // Ordering of columns in the report + orderBy []string + // Name of the report + reportName *string + // Columns selected from the report + select_escaped []string + // Possible statuses associated with a generated report + status *DeviceManagementReportStatus +} +// NewDeviceManagementCachedReportConfiguration instantiates a new deviceManagementCachedReportConfiguration and sets the default values. +func NewDeviceManagementCachedReportConfiguration()(*DeviceManagementCachedReportConfiguration) { + m := &DeviceManagementCachedReportConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementCachedReportConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCachedReportConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCachedReportConfiguration(), nil +} +// GetExpirationDateTime gets the expirationDateTime property value. Time that the cached report expires +func (m *DeviceManagementCachedReportConfiguration) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCachedReportConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["filter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilter(val) + } + return nil + } + res["lastRefreshDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshDateTime(val) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val) + } + return nil + } + res["orderBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOrderBy(res) + } + return nil + } + res["reportName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportName(val) + } + return nil + } + res["select"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSelect(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementReportStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DeviceManagementReportStatus)) + } + return nil + } + return res +} +// GetFilter gets the filter property value. Filters applied on report creation. +func (m *DeviceManagementCachedReportConfiguration) GetFilter()(*string) { + return m.filter +} +// GetLastRefreshDateTime gets the lastRefreshDateTime property value. Time that the cached report was last refreshed +func (m *DeviceManagementCachedReportConfiguration) GetLastRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshDateTime +} +// GetMetadata gets the metadata property value. Caller-managed metadata associated with the report +func (m *DeviceManagementCachedReportConfiguration) GetMetadata()(*string) { + return m.metadata +} +// GetOrderBy gets the orderBy property value. Ordering of columns in the report +func (m *DeviceManagementCachedReportConfiguration) GetOrderBy()([]string) { + return m.orderBy +} +// GetReportName gets the reportName property value. Name of the report +func (m *DeviceManagementCachedReportConfiguration) GetReportName()(*string) { + return m.reportName +} +// GetSelect gets the select property value. Columns selected from the report +func (m *DeviceManagementCachedReportConfiguration) GetSelect()([]string) { + return m.select_escaped +} +// GetStatus gets the status property value. Possible statuses associated with a generated report +func (m *DeviceManagementCachedReportConfiguration) GetStatus()(*DeviceManagementReportStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DeviceManagementCachedReportConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("filter", m.GetFilter()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshDateTime", m.GetLastRefreshDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + if m.GetOrderBy() != nil { + err = writer.WriteCollectionOfStringValues("orderBy", m.GetOrderBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportName", m.GetReportName()) + if err != nil { + return err + } + } + if m.GetSelect() != nil { + err = writer.WriteCollectionOfStringValues("select", m.GetSelect()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetExpirationDateTime sets the expirationDateTime property value. Time that the cached report expires +func (m *DeviceManagementCachedReportConfiguration) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetFilter sets the filter property value. Filters applied on report creation. +func (m *DeviceManagementCachedReportConfiguration) SetFilter(value *string)() { + m.filter = value +} +// SetLastRefreshDateTime sets the lastRefreshDateTime property value. Time that the cached report was last refreshed +func (m *DeviceManagementCachedReportConfiguration) SetLastRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshDateTime = value +} +// SetMetadata sets the metadata property value. Caller-managed metadata associated with the report +func (m *DeviceManagementCachedReportConfiguration) SetMetadata(value *string)() { + m.metadata = value +} +// SetOrderBy sets the orderBy property value. Ordering of columns in the report +func (m *DeviceManagementCachedReportConfiguration) SetOrderBy(value []string)() { + m.orderBy = value +} +// SetReportName sets the reportName property value. Name of the report +func (m *DeviceManagementCachedReportConfiguration) SetReportName(value *string)() { + m.reportName = value +} +// SetSelect sets the select property value. Columns selected from the report +func (m *DeviceManagementCachedReportConfiguration) SetSelect(value []string)() { + m.select_escaped = value +} +// SetStatus sets the status property value. Possible statuses associated with a generated report +func (m *DeviceManagementCachedReportConfiguration) SetStatus(value *DeviceManagementReportStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_response.go new file mode 100644 index 000000000..2101c7543 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCachedReportConfigurationCollectionResponse +type DeviceManagementCachedReportConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementCachedReportConfigurationable +} +// NewDeviceManagementCachedReportConfigurationCollectionResponse instantiates a new DeviceManagementCachedReportConfigurationCollectionResponse and sets the default values. +func NewDeviceManagementCachedReportConfigurationCollectionResponse()(*DeviceManagementCachedReportConfigurationCollectionResponse) { + m := &DeviceManagementCachedReportConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementCachedReportConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCachedReportConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCachedReportConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCachedReportConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCachedReportConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCachedReportConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCachedReportConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementCachedReportConfigurationCollectionResponse) GetValue()([]DeviceManagementCachedReportConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementCachedReportConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementCachedReportConfigurationCollectionResponse) SetValue(value []DeviceManagementCachedReportConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_responseable.go new file mode 100644 index 000000000..a6d3c6d41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCachedReportConfigurationCollectionResponseable +type DeviceManagementCachedReportConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementCachedReportConfigurationable) + SetValue(value []DeviceManagementCachedReportConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_cached_report_configurationable.go b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configurationable.go new file mode 100644 index 000000000..b6c2f620c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_cached_report_configurationable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCachedReportConfigurationable +type DeviceManagementCachedReportConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFilter()(*string) + GetLastRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMetadata()(*string) + GetOrderBy()([]string) + GetReportName()(*string) + GetSelect()([]string) + GetStatus()(*DeviceManagementReportStatus) + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFilter(value *string)() + SetLastRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMetadata(value *string)() + SetOrderBy(value []string)() + SetReportName(value *string)() + SetSelect(value []string)() + SetStatus(value *DeviceManagementReportStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_certification_authority.go b/src/internal/connector/graph/betasdk/models/device_management_certification_authority.go new file mode 100644 index 000000000..41cd0791f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_certification_authority.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementCertificationAuthority int + +const ( + // Not configured. + NOTCONFIGURED_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY DeviceManagementCertificationAuthority = iota + // Microsoft Certification Authority type. + MICROSOFT_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY + // DigiCert Certification Authority type. + DIGICERT_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY +) + +func (i DeviceManagementCertificationAuthority) String() string { + return []string{"notConfigured", "microsoft", "digiCert"}[i] +} +func ParseDeviceManagementCertificationAuthority(v string) (interface{}, error) { + result := NOTCONFIGURED_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY + switch v { + case "notConfigured": + result = NOTCONFIGURED_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY + case "microsoft": + result = MICROSOFT_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY + case "digiCert": + result = DIGICERT_DEVICEMANAGEMENTCERTIFICATIONAUTHORITY + default: + return 0, errors.New("Unknown DeviceManagementCertificationAuthority value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementCertificationAuthority(values []DeviceManagementCertificationAuthority) []string { + 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/device_management_collection_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition.go new file mode 100644 index 000000000..07c0a1f33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingDefinition +type DeviceManagementCollectionSettingDefinition struct { + DeviceManagementSettingDefinition + // The Setting Definition ID that describes what each element of the collection looks like + elementDefinitionId *string +} +// NewDeviceManagementCollectionSettingDefinition instantiates a new DeviceManagementCollectionSettingDefinition and sets the default values. +func NewDeviceManagementCollectionSettingDefinition()(*DeviceManagementCollectionSettingDefinition) { + m := &DeviceManagementCollectionSettingDefinition{ + DeviceManagementSettingDefinition: *NewDeviceManagementSettingDefinition(), + } + return m +} +// CreateDeviceManagementCollectionSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCollectionSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCollectionSettingDefinition(), nil +} +// GetElementDefinitionId gets the elementDefinitionId property value. The Setting Definition ID that describes what each element of the collection looks like +func (m *DeviceManagementCollectionSettingDefinition) GetElementDefinitionId()(*string) { + return m.elementDefinitionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCollectionSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingDefinition.GetFieldDeserializers() + res["elementDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetElementDefinitionId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementCollectionSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("elementDefinitionId", m.GetElementDefinitionId()) + if err != nil { + return err + } + } + return nil +} +// SetElementDefinitionId sets the elementDefinitionId property value. The Setting Definition ID that describes what each element of the collection looks like +func (m *DeviceManagementCollectionSettingDefinition) SetElementDefinitionId(value *string)() { + m.elementDefinitionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_response.go new file mode 100644 index 000000000..7d2b539cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingDefinitionCollectionResponse +type DeviceManagementCollectionSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementCollectionSettingDefinitionable +} +// NewDeviceManagementCollectionSettingDefinitionCollectionResponse instantiates a new DeviceManagementCollectionSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementCollectionSettingDefinitionCollectionResponse()(*DeviceManagementCollectionSettingDefinitionCollectionResponse) { + m := &DeviceManagementCollectionSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementCollectionSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCollectionSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCollectionSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCollectionSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCollectionSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCollectionSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCollectionSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementCollectionSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementCollectionSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementCollectionSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementCollectionSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementCollectionSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_responseable.go new file mode 100644 index 000000000..f711a69dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingDefinitionCollectionResponseable +type DeviceManagementCollectionSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementCollectionSettingDefinitionable) + SetValue(value []DeviceManagementCollectionSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definitionable.go new file mode 100644 index 000000000..7569271e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_definitionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingDefinitionable +type DeviceManagementCollectionSettingDefinitionable interface { + DeviceManagementSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetElementDefinitionId()(*string) + SetElementDefinitionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance.go new file mode 100644 index 000000000..29ec481ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingInstance +type DeviceManagementCollectionSettingInstance struct { + DeviceManagementSettingInstance + // The collection of values + value []DeviceManagementSettingInstanceable +} +// NewDeviceManagementCollectionSettingInstance instantiates a new DeviceManagementCollectionSettingInstance and sets the default values. +func NewDeviceManagementCollectionSettingInstance()(*DeviceManagementCollectionSettingInstance) { + m := &DeviceManagementCollectionSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementCollectionSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementCollectionSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCollectionSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCollectionSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCollectionSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The collection of values +func (m *DeviceManagementCollectionSettingInstance) GetValue()([]DeviceManagementSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementCollectionSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The collection of values +func (m *DeviceManagementCollectionSettingInstance) SetValue(value []DeviceManagementSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_response.go new file mode 100644 index 000000000..297d80703 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingInstanceCollectionResponse +type DeviceManagementCollectionSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementCollectionSettingInstanceable +} +// NewDeviceManagementCollectionSettingInstanceCollectionResponse instantiates a new DeviceManagementCollectionSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementCollectionSettingInstanceCollectionResponse()(*DeviceManagementCollectionSettingInstanceCollectionResponse) { + m := &DeviceManagementCollectionSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementCollectionSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCollectionSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCollectionSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCollectionSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCollectionSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCollectionSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCollectionSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementCollectionSettingInstanceCollectionResponse) GetValue()([]DeviceManagementCollectionSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementCollectionSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementCollectionSettingInstanceCollectionResponse) SetValue(value []DeviceManagementCollectionSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_responseable.go new file mode 100644 index 000000000..b5cc82c3e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingInstanceCollectionResponseable +type DeviceManagementCollectionSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementCollectionSettingInstanceable) + SetValue(value []DeviceManagementCollectionSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instanceable.go new file mode 100644 index 000000000..8b10c97fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_collection_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCollectionSettingInstanceable +type DeviceManagementCollectionSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingInstanceable) + SetValue(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition.go new file mode 100644 index 000000000..4174d8797 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingDefinition +type DeviceManagementComplexSettingDefinition struct { + DeviceManagementSettingDefinition + // The definitions of each property of the complex setting + propertyDefinitionIds []string +} +// NewDeviceManagementComplexSettingDefinition instantiates a new DeviceManagementComplexSettingDefinition and sets the default values. +func NewDeviceManagementComplexSettingDefinition()(*DeviceManagementComplexSettingDefinition) { + m := &DeviceManagementComplexSettingDefinition{ + DeviceManagementSettingDefinition: *NewDeviceManagementSettingDefinition(), + } + return m +} +// CreateDeviceManagementComplexSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplexSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplexSettingDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplexSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingDefinition.GetFieldDeserializers() + res["propertyDefinitionIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPropertyDefinitionIds(res) + } + return nil + } + return res +} +// GetPropertyDefinitionIds gets the propertyDefinitionIds property value. The definitions of each property of the complex setting +func (m *DeviceManagementComplexSettingDefinition) GetPropertyDefinitionIds()([]string) { + return m.propertyDefinitionIds +} +// Serialize serializes information the current object +func (m *DeviceManagementComplexSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingDefinition.Serialize(writer) + if err != nil { + return err + } + if m.GetPropertyDefinitionIds() != nil { + err = writer.WriteCollectionOfStringValues("propertyDefinitionIds", m.GetPropertyDefinitionIds()) + if err != nil { + return err + } + } + return nil +} +// SetPropertyDefinitionIds sets the propertyDefinitionIds property value. The definitions of each property of the complex setting +func (m *DeviceManagementComplexSettingDefinition) SetPropertyDefinitionIds(value []string)() { + m.propertyDefinitionIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_response.go new file mode 100644 index 000000000..4f3a4d573 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingDefinitionCollectionResponse +type DeviceManagementComplexSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementComplexSettingDefinitionable +} +// NewDeviceManagementComplexSettingDefinitionCollectionResponse instantiates a new DeviceManagementComplexSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementComplexSettingDefinitionCollectionResponse()(*DeviceManagementComplexSettingDefinitionCollectionResponse) { + m := &DeviceManagementComplexSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementComplexSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplexSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplexSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplexSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplexSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplexSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplexSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementComplexSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementComplexSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementComplexSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementComplexSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementComplexSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_responseable.go new file mode 100644 index 000000000..273b20f23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingDefinitionCollectionResponseable +type DeviceManagementComplexSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementComplexSettingDefinitionable) + SetValue(value []DeviceManagementComplexSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definitionable.go new file mode 100644 index 000000000..6da6524fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_definitionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingDefinitionable +type DeviceManagementComplexSettingDefinitionable interface { + DeviceManagementSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPropertyDefinitionIds()([]string) + SetPropertyDefinitionIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance.go new file mode 100644 index 000000000..b42d96dc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingInstance +type DeviceManagementComplexSettingInstance struct { + DeviceManagementSettingInstance + // The values that make up the complex setting + value []DeviceManagementSettingInstanceable +} +// NewDeviceManagementComplexSettingInstance instantiates a new DeviceManagementComplexSettingInstance and sets the default values. +func NewDeviceManagementComplexSettingInstance()(*DeviceManagementComplexSettingInstance) { + m := &DeviceManagementComplexSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementComplexSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementComplexSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplexSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplexSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplexSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The values that make up the complex setting +func (m *DeviceManagementComplexSettingInstance) GetValue()([]DeviceManagementSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementComplexSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The values that make up the complex setting +func (m *DeviceManagementComplexSettingInstance) SetValue(value []DeviceManagementSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_response.go new file mode 100644 index 000000000..e636e67d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingInstanceCollectionResponse +type DeviceManagementComplexSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementComplexSettingInstanceable +} +// NewDeviceManagementComplexSettingInstanceCollectionResponse instantiates a new DeviceManagementComplexSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementComplexSettingInstanceCollectionResponse()(*DeviceManagementComplexSettingInstanceCollectionResponse) { + m := &DeviceManagementComplexSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementComplexSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplexSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplexSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplexSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplexSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplexSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplexSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementComplexSettingInstanceCollectionResponse) GetValue()([]DeviceManagementComplexSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementComplexSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementComplexSettingInstanceCollectionResponse) SetValue(value []DeviceManagementComplexSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_responseable.go new file mode 100644 index 000000000..71b1f528e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingInstanceCollectionResponseable +type DeviceManagementComplexSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementComplexSettingInstanceable) + SetValue(value []DeviceManagementComplexSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instanceable.go new file mode 100644 index 000000000..4e0aa41a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_complex_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplexSettingInstanceable +type DeviceManagementComplexSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingInstanceable) + SetValue(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item.go new file mode 100644 index 000000000..463d06c46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceActionItem scheduled Action for Rule +type DeviceManagementComplianceActionItem struct { + Entity + // Scheduled Action Type Enum + actionType *DeviceManagementComplianceActionType + // Number of hours to wait till the action will be enforced. Valid values 0 to 8760 + gracePeriodHours *int32 + // A list of group IDs to speicify who to CC this notification message to. This collection can contain a maximum of 100 elements. + notificationMessageCCList []string + // What notification Message template to use + notificationTemplateId *string +} +// NewDeviceManagementComplianceActionItem instantiates a new deviceManagementComplianceActionItem and sets the default values. +func NewDeviceManagementComplianceActionItem()(*DeviceManagementComplianceActionItem) { + m := &DeviceManagementComplianceActionItem{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementComplianceActionItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplianceActionItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplianceActionItem(), nil +} +// GetActionType gets the actionType property value. Scheduled Action Type Enum +func (m *DeviceManagementComplianceActionItem) GetActionType()(*DeviceManagementComplianceActionType) { + return m.actionType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplianceActionItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementComplianceActionType) + if err != nil { + return err + } + if val != nil { + m.SetActionType(val.(*DeviceManagementComplianceActionType)) + } + return nil + } + res["gracePeriodHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodHours(val) + } + return nil + } + res["notificationMessageCCList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotificationMessageCCList(res) + } + return nil + } + res["notificationTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationTemplateId(val) + } + return nil + } + return res +} +// GetGracePeriodHours gets the gracePeriodHours property value. Number of hours to wait till the action will be enforced. Valid values 0 to 8760 +func (m *DeviceManagementComplianceActionItem) GetGracePeriodHours()(*int32) { + return m.gracePeriodHours +} +// GetNotificationMessageCCList gets the notificationMessageCCList property value. A list of group IDs to speicify who to CC this notification message to. This collection can contain a maximum of 100 elements. +func (m *DeviceManagementComplianceActionItem) GetNotificationMessageCCList()([]string) { + return m.notificationMessageCCList +} +// GetNotificationTemplateId gets the notificationTemplateId property value. What notification Message template to use +func (m *DeviceManagementComplianceActionItem) GetNotificationTemplateId()(*string) { + return m.notificationTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementComplianceActionItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActionType() != nil { + cast := (*m.GetActionType()).String() + err = writer.WriteStringValue("actionType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("gracePeriodHours", m.GetGracePeriodHours()) + if err != nil { + return err + } + } + if m.GetNotificationMessageCCList() != nil { + err = writer.WriteCollectionOfStringValues("notificationMessageCCList", m.GetNotificationMessageCCList()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notificationTemplateId", m.GetNotificationTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetActionType sets the actionType property value. Scheduled Action Type Enum +func (m *DeviceManagementComplianceActionItem) SetActionType(value *DeviceManagementComplianceActionType)() { + m.actionType = value +} +// SetGracePeriodHours sets the gracePeriodHours property value. Number of hours to wait till the action will be enforced. Valid values 0 to 8760 +func (m *DeviceManagementComplianceActionItem) SetGracePeriodHours(value *int32)() { + m.gracePeriodHours = value +} +// SetNotificationMessageCCList sets the notificationMessageCCList property value. A list of group IDs to speicify who to CC this notification message to. This collection can contain a maximum of 100 elements. +func (m *DeviceManagementComplianceActionItem) SetNotificationMessageCCList(value []string)() { + m.notificationMessageCCList = value +} +// SetNotificationTemplateId sets the notificationTemplateId property value. What notification Message template to use +func (m *DeviceManagementComplianceActionItem) SetNotificationTemplateId(value *string)() { + m.notificationTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_response.go new file mode 100644 index 000000000..7d11aac0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceActionItemCollectionResponse +type DeviceManagementComplianceActionItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementComplianceActionItemable +} +// NewDeviceManagementComplianceActionItemCollectionResponse instantiates a new DeviceManagementComplianceActionItemCollectionResponse and sets the default values. +func NewDeviceManagementComplianceActionItemCollectionResponse()(*DeviceManagementComplianceActionItemCollectionResponse) { + m := &DeviceManagementComplianceActionItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementComplianceActionItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplianceActionItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplianceActionItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplianceActionItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplianceActionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplianceActionItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplianceActionItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementComplianceActionItemCollectionResponse) GetValue()([]DeviceManagementComplianceActionItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementComplianceActionItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementComplianceActionItemCollectionResponse) SetValue(value []DeviceManagementComplianceActionItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_responseable.go new file mode 100644 index 000000000..30a5a42b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceActionItemCollectionResponseable +type DeviceManagementComplianceActionItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementComplianceActionItemable) + SetValue(value []DeviceManagementComplianceActionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_action_itemable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_itemable.go new file mode 100644 index 000000000..5d4681608 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_itemable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceActionItemable +type DeviceManagementComplianceActionItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionType()(*DeviceManagementComplianceActionType) + GetGracePeriodHours()(*int32) + GetNotificationMessageCCList()([]string) + GetNotificationTemplateId()(*string) + SetActionType(value *DeviceManagementComplianceActionType)() + SetGracePeriodHours(value *int32)() + SetNotificationMessageCCList(value []string)() + SetNotificationTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_action_type.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_type.go new file mode 100644 index 000000000..f837a9fb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_action_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementComplianceActionType int + +const ( + // No Action + NOACTION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE DeviceManagementComplianceActionType = iota + // Send Notification + NOTIFICATION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Block the device in AAD + BLOCK_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Retire the device + RETIRE_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Wipe the device + WIPE_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Remove Resource Access Profiles from the device + REMOVERESOURCEACCESSPROFILES_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Send push notification to device + PUSHNOTIFICATION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + // Remotely lock the device + REMOTELOCK_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE +) + +func (i DeviceManagementComplianceActionType) String() string { + return []string{"noAction", "notification", "block", "retire", "wipe", "removeResourceAccessProfiles", "pushNotification", "remoteLock"}[i] +} +func ParseDeviceManagementComplianceActionType(v string) (interface{}, error) { + result := NOACTION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + switch v { + case "noAction": + result = NOACTION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "notification": + result = NOTIFICATION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "block": + result = BLOCK_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "retire": + result = RETIRE_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "wipe": + result = WIPE_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "removeResourceAccessProfiles": + result = REMOVERESOURCEACCESSPROFILES_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "pushNotification": + result = PUSHNOTIFICATION_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + case "remoteLock": + result = REMOTELOCK_DEVICEMANAGEMENTCOMPLIANCEACTIONTYPE + default: + return 0, errors.New("Unknown DeviceManagementComplianceActionType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementComplianceActionType(values []DeviceManagementComplianceActionType) []string { + 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/device_management_compliance_policy.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy.go new file mode 100644 index 000000000..c77ee6192 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy.go @@ -0,0 +1,379 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCompliancePolicy device Management Compliance Policy +type DeviceManagementCompliancePolicy struct { + Entity + // Policy assignments + assignments []DeviceManagementConfigurationPolicyAssignmentable + // Policy creation date and time. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Policy creation source + creationSource *string + // Policy description + description *string + // Policy assignment status. This property is read-only. + isAssigned *bool + // Policy last modification date and time. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Policy name + name *string + // Supported platform types. + platforms *DeviceManagementConfigurationPlatforms + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // The list of scheduled action for this rule + scheduledActionsForRule []DeviceManagementComplianceScheduledActionForRuleable + // Number of settings. This property is read-only. + settingCount *int32 + // Policy settings + settings []DeviceManagementConfigurationSettingable + // Describes which technology this setting can be deployed with + technologies *DeviceManagementConfigurationTechnologies +} +// NewDeviceManagementCompliancePolicy instantiates a new deviceManagementCompliancePolicy and sets the default values. +func NewDeviceManagementCompliancePolicy()(*DeviceManagementCompliancePolicy) { + m := &DeviceManagementCompliancePolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCompliancePolicy(), nil +} +// GetAssignments gets the assignments property value. Policy assignments +func (m *DeviceManagementCompliancePolicy) GetAssignments()([]DeviceManagementConfigurationPolicyAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. Policy creation date and time. This property is read-only. +func (m *DeviceManagementCompliancePolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationSource gets the creationSource property value. Policy creation source +func (m *DeviceManagementCompliancePolicy) GetCreationSource()(*string) { + return m.creationSource +} +// GetDescription gets the description property value. Policy description +func (m *DeviceManagementCompliancePolicy) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationSource(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isAssigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAssigned(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationPlatforms) + if err != nil { + return err + } + if val != nil { + m.SetPlatforms(val.(*DeviceManagementConfigurationPlatforms)) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["scheduledActionsForRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplianceScheduledActionForRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplianceScheduledActionForRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplianceScheduledActionForRuleable) + } + m.SetScheduledActionsForRule(res) + } + return nil + } + res["settingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingCount(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingable) + } + m.SetSettings(res) + } + return nil + } + res["technologies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTechnologies) + if err != nil { + return err + } + if val != nil { + m.SetTechnologies(val.(*DeviceManagementConfigurationTechnologies)) + } + return nil + } + return res +} +// GetIsAssigned gets the isAssigned property value. Policy assignment status. This property is read-only. +func (m *DeviceManagementCompliancePolicy) GetIsAssigned()(*bool) { + return m.isAssigned +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Policy last modification date and time. This property is read-only. +func (m *DeviceManagementCompliancePolicy) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. Policy name +func (m *DeviceManagementCompliancePolicy) GetName()(*string) { + return m.name +} +// GetPlatforms gets the platforms property value. Supported platform types. +func (m *DeviceManagementCompliancePolicy) GetPlatforms()(*DeviceManagementConfigurationPlatforms) { + return m.platforms +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementCompliancePolicy) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetScheduledActionsForRule gets the scheduledActionsForRule property value. The list of scheduled action for this rule +func (m *DeviceManagementCompliancePolicy) GetScheduledActionsForRule()([]DeviceManagementComplianceScheduledActionForRuleable) { + return m.scheduledActionsForRule +} +// GetSettingCount gets the settingCount property value. Number of settings. This property is read-only. +func (m *DeviceManagementCompliancePolicy) GetSettingCount()(*int32) { + return m.settingCount +} +// GetSettings gets the settings property value. Policy settings +func (m *DeviceManagementCompliancePolicy) GetSettings()([]DeviceManagementConfigurationSettingable) { + return m.settings +} +// GetTechnologies gets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementCompliancePolicy) GetTechnologies()(*DeviceManagementConfigurationTechnologies) { + return m.technologies +} +// Serialize serializes information the current object +func (m *DeviceManagementCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("creationSource", m.GetCreationSource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + cast := (*m.GetPlatforms()).String() + err = writer.WriteStringValue("platforms", &cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetScheduledActionsForRule() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScheduledActionsForRule())) + for i, v := range m.GetScheduledActionsForRule() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scheduledActionsForRule", cast) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + if m.GetTechnologies() != nil { + cast := (*m.GetTechnologies()).String() + err = writer.WriteStringValue("technologies", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. Policy assignments +func (m *DeviceManagementCompliancePolicy) SetAssignments(value []DeviceManagementConfigurationPolicyAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Policy creation date and time. This property is read-only. +func (m *DeviceManagementCompliancePolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationSource sets the creationSource property value. Policy creation source +func (m *DeviceManagementCompliancePolicy) SetCreationSource(value *string)() { + m.creationSource = value +} +// SetDescription sets the description property value. Policy description +func (m *DeviceManagementCompliancePolicy) SetDescription(value *string)() { + m.description = value +} +// SetIsAssigned sets the isAssigned property value. Policy assignment status. This property is read-only. +func (m *DeviceManagementCompliancePolicy) SetIsAssigned(value *bool)() { + m.isAssigned = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Policy last modification date and time. This property is read-only. +func (m *DeviceManagementCompliancePolicy) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. Policy name +func (m *DeviceManagementCompliancePolicy) SetName(value *string)() { + m.name = value +} +// SetPlatforms sets the platforms property value. Supported platform types. +func (m *DeviceManagementCompliancePolicy) SetPlatforms(value *DeviceManagementConfigurationPlatforms)() { + m.platforms = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementCompliancePolicy) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetScheduledActionsForRule sets the scheduledActionsForRule property value. The list of scheduled action for this rule +func (m *DeviceManagementCompliancePolicy) SetScheduledActionsForRule(value []DeviceManagementComplianceScheduledActionForRuleable)() { + m.scheduledActionsForRule = value +} +// SetSettingCount sets the settingCount property value. Number of settings. This property is read-only. +func (m *DeviceManagementCompliancePolicy) SetSettingCount(value *int32)() { + m.settingCount = value +} +// SetSettings sets the settings property value. Policy settings +func (m *DeviceManagementCompliancePolicy) SetSettings(value []DeviceManagementConfigurationSettingable)() { + m.settings = value +} +// SetTechnologies sets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementCompliancePolicy) SetTechnologies(value *DeviceManagementConfigurationTechnologies)() { + m.technologies = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_response.go new file mode 100644 index 000000000..1c526a98c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCompliancePolicyCollectionResponse +type DeviceManagementCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementCompliancePolicyable +} +// NewDeviceManagementCompliancePolicyCollectionResponse instantiates a new DeviceManagementCompliancePolicyCollectionResponse and sets the default values. +func NewDeviceManagementCompliancePolicyCollectionResponse()(*DeviceManagementCompliancePolicyCollectionResponse) { + m := &DeviceManagementCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementCompliancePolicyCollectionResponse) GetValue()([]DeviceManagementCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementCompliancePolicyCollectionResponse) SetValue(value []DeviceManagementCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..e2ba8275d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCompliancePolicyCollectionResponseable +type DeviceManagementCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementCompliancePolicyable) + SetValue(value []DeviceManagementCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_policyable.go new file mode 100644 index 000000000..026560385 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_policyable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementCompliancePolicyable +type DeviceManagementCompliancePolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementConfigurationPolicyAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationSource()(*string) + GetDescription()(*string) + GetIsAssigned()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetPlatforms()(*DeviceManagementConfigurationPlatforms) + GetRoleScopeTagIds()([]string) + GetScheduledActionsForRule()([]DeviceManagementComplianceScheduledActionForRuleable) + GetSettingCount()(*int32) + GetSettings()([]DeviceManagementConfigurationSettingable) + GetTechnologies()(*DeviceManagementConfigurationTechnologies) + SetAssignments(value []DeviceManagementConfigurationPolicyAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationSource(value *string)() + SetDescription(value *string)() + SetIsAssigned(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetPlatforms(value *DeviceManagementConfigurationPlatforms)() + SetRoleScopeTagIds(value []string)() + SetScheduledActionsForRule(value []DeviceManagementComplianceScheduledActionForRuleable)() + SetSettingCount(value *int32)() + SetSettings(value []DeviceManagementConfigurationSettingable)() + SetTechnologies(value *DeviceManagementConfigurationTechnologies)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule.go new file mode 100644 index 000000000..af4da6e9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceScheduledActionForRule scheduled Action for Rule +type DeviceManagementComplianceScheduledActionForRule struct { + Entity + // Name of the rule which this scheduled action applies to. + ruleName *string + // The list of scheduled action configurations for this compliance policy. This collection can contain a maximum of 100 elements. + scheduledActionConfigurations []DeviceManagementComplianceActionItemable +} +// NewDeviceManagementComplianceScheduledActionForRule instantiates a new deviceManagementComplianceScheduledActionForRule and sets the default values. +func NewDeviceManagementComplianceScheduledActionForRule()(*DeviceManagementComplianceScheduledActionForRule) { + m := &DeviceManagementComplianceScheduledActionForRule{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementComplianceScheduledActionForRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplianceScheduledActionForRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplianceScheduledActionForRule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplianceScheduledActionForRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ruleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleName(val) + } + return nil + } + res["scheduledActionConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplianceActionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplianceActionItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplianceActionItemable) + } + m.SetScheduledActionConfigurations(res) + } + return nil + } + return res +} +// GetRuleName gets the ruleName property value. Name of the rule which this scheduled action applies to. +func (m *DeviceManagementComplianceScheduledActionForRule) GetRuleName()(*string) { + return m.ruleName +} +// GetScheduledActionConfigurations gets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. This collection can contain a maximum of 100 elements. +func (m *DeviceManagementComplianceScheduledActionForRule) GetScheduledActionConfigurations()([]DeviceManagementComplianceActionItemable) { + return m.scheduledActionConfigurations +} +// Serialize serializes information the current object +func (m *DeviceManagementComplianceScheduledActionForRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("ruleName", m.GetRuleName()) + if err != nil { + return err + } + } + if m.GetScheduledActionConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScheduledActionConfigurations())) + for i, v := range m.GetScheduledActionConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scheduledActionConfigurations", cast) + if err != nil { + return err + } + } + return nil +} +// SetRuleName sets the ruleName property value. Name of the rule which this scheduled action applies to. +func (m *DeviceManagementComplianceScheduledActionForRule) SetRuleName(value *string)() { + m.ruleName = value +} +// SetScheduledActionConfigurations sets the scheduledActionConfigurations property value. The list of scheduled action configurations for this compliance policy. This collection can contain a maximum of 100 elements. +func (m *DeviceManagementComplianceScheduledActionForRule) SetScheduledActionConfigurations(value []DeviceManagementComplianceActionItemable)() { + m.scheduledActionConfigurations = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_response.go new file mode 100644 index 000000000..4d4d67d64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceScheduledActionForRuleCollectionResponse +type DeviceManagementComplianceScheduledActionForRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementComplianceScheduledActionForRuleable +} +// NewDeviceManagementComplianceScheduledActionForRuleCollectionResponse instantiates a new DeviceManagementComplianceScheduledActionForRuleCollectionResponse and sets the default values. +func NewDeviceManagementComplianceScheduledActionForRuleCollectionResponse()(*DeviceManagementComplianceScheduledActionForRuleCollectionResponse) { + m := &DeviceManagementComplianceScheduledActionForRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementComplianceScheduledActionForRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementComplianceScheduledActionForRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementComplianceScheduledActionForRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementComplianceScheduledActionForRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementComplianceScheduledActionForRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementComplianceScheduledActionForRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementComplianceScheduledActionForRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementComplianceScheduledActionForRuleCollectionResponse) GetValue()([]DeviceManagementComplianceScheduledActionForRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementComplianceScheduledActionForRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementComplianceScheduledActionForRuleCollectionResponse) SetValue(value []DeviceManagementComplianceScheduledActionForRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_responseable.go new file mode 100644 index 000000000..06390d8c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceScheduledActionForRuleCollectionResponseable +type DeviceManagementComplianceScheduledActionForRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementComplianceScheduledActionForRuleable) + SetValue(value []DeviceManagementComplianceScheduledActionForRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_ruleable.go b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_ruleable.go new file mode 100644 index 000000000..d98bb865b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_compliance_scheduled_action_for_ruleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementComplianceScheduledActionForRuleable +type DeviceManagementComplianceScheduledActionForRuleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRuleName()(*string) + GetScheduledActionConfigurations()([]DeviceManagementComplianceActionItemable) + SetRuleName(value *string)() + SetScheduledActionConfigurations(value []DeviceManagementComplianceActionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_azure_ad_trust_type.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_azure_ad_trust_type.go new file mode 100644 index 000000000..4a07bb38f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_azure_ad_trust_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationAzureAdTrustType int + +const ( + // No AAD Trust Type specified + NONE_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE DeviceManagementConfigurationAzureAdTrustType = iota + // AAD Joined Trust Type + AZUREADJOINED_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + // AddWorkAccount + ADDWORKACCOUNT_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + // MDM only + MDMONLY_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE +) + +func (i DeviceManagementConfigurationAzureAdTrustType) String() string { + return []string{"none", "azureAdJoined", "addWorkAccount", "mdmOnly"}[i] +} +func ParseDeviceManagementConfigurationAzureAdTrustType(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + case "azureAdJoined": + result = AZUREADJOINED_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + case "addWorkAccount": + result = ADDWORKACCOUNT_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + case "mdmOnly": + result = MDMONLY_DEVICEMANAGEMENTCONFIGURATIONAZUREADTRUSTTYPE + default: + return 0, errors.New("Unknown DeviceManagementConfigurationAzureAdTrustType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationAzureAdTrustType(values []DeviceManagementConfigurationAzureAdTrustType) []string { + 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/device_management_configuration_category.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_category.go new file mode 100644 index 000000000..82a86f5bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_category.go @@ -0,0 +1,327 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationCategory device Management Configuration Policy +type DeviceManagementConfigurationCategory struct { + Entity + // Description of the category header + categoryDescription *string + // List of child ids of the category. + childCategoryIds []string + // Description of the item + description *string + // Display name of the item + displayName *string + // Help text of the item + helpText *string + // Name of the item + name *string + // Parent id of the category. + parentCategoryId *string + // Supported platform types. + platforms *DeviceManagementConfigurationPlatforms + // Root id of the category. + rootCategoryId *string + // Supported setting types + settingUsage *DeviceManagementConfigurationSettingUsage + // Describes which technology this setting can be deployed with + technologies *DeviceManagementConfigurationTechnologies +} +// NewDeviceManagementConfigurationCategory instantiates a new deviceManagementConfigurationCategory and sets the default values. +func NewDeviceManagementConfigurationCategory()(*DeviceManagementConfigurationCategory) { + m := &DeviceManagementConfigurationCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationCategory(), nil +} +// GetCategoryDescription gets the categoryDescription property value. Description of the category header +func (m *DeviceManagementConfigurationCategory) GetCategoryDescription()(*string) { + return m.categoryDescription +} +// GetChildCategoryIds gets the childCategoryIds property value. List of child ids of the category. +func (m *DeviceManagementConfigurationCategory) GetChildCategoryIds()([]string) { + return m.childCategoryIds +} +// GetDescription gets the description property value. Description of the item +func (m *DeviceManagementConfigurationCategory) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name of the item +func (m *DeviceManagementConfigurationCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["categoryDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategoryDescription(val) + } + return nil + } + res["childCategoryIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetChildCategoryIds(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["helpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpText(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parentCategoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentCategoryId(val) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationPlatforms) + if err != nil { + return err + } + if val != nil { + m.SetPlatforms(val.(*DeviceManagementConfigurationPlatforms)) + } + return nil + } + res["rootCategoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRootCategoryId(val) + } + return nil + } + res["settingUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationSettingUsage) + if err != nil { + return err + } + if val != nil { + m.SetSettingUsage(val.(*DeviceManagementConfigurationSettingUsage)) + } + return nil + } + res["technologies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTechnologies) + if err != nil { + return err + } + if val != nil { + m.SetTechnologies(val.(*DeviceManagementConfigurationTechnologies)) + } + return nil + } + return res +} +// GetHelpText gets the helpText property value. Help text of the item +func (m *DeviceManagementConfigurationCategory) GetHelpText()(*string) { + return m.helpText +} +// GetName gets the name property value. Name of the item +func (m *DeviceManagementConfigurationCategory) GetName()(*string) { + return m.name +} +// GetParentCategoryId gets the parentCategoryId property value. Parent id of the category. +func (m *DeviceManagementConfigurationCategory) GetParentCategoryId()(*string) { + return m.parentCategoryId +} +// GetPlatforms gets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationCategory) GetPlatforms()(*DeviceManagementConfigurationPlatforms) { + return m.platforms +} +// GetRootCategoryId gets the rootCategoryId property value. Root id of the category. +func (m *DeviceManagementConfigurationCategory) GetRootCategoryId()(*string) { + return m.rootCategoryId +} +// GetSettingUsage gets the settingUsage property value. Supported setting types +func (m *DeviceManagementConfigurationCategory) GetSettingUsage()(*DeviceManagementConfigurationSettingUsage) { + return m.settingUsage +} +// GetTechnologies gets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationCategory) GetTechnologies()(*DeviceManagementConfigurationTechnologies) { + return m.technologies +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("categoryDescription", m.GetCategoryDescription()) + if err != nil { + return err + } + } + if m.GetChildCategoryIds() != nil { + err = writer.WriteCollectionOfStringValues("childCategoryIds", m.GetChildCategoryIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("helpText", m.GetHelpText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentCategoryId", m.GetParentCategoryId()) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + cast := (*m.GetPlatforms()).String() + err = writer.WriteStringValue("platforms", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rootCategoryId", m.GetRootCategoryId()) + if err != nil { + return err + } + } + if m.GetSettingUsage() != nil { + cast := (*m.GetSettingUsage()).String() + err = writer.WriteStringValue("settingUsage", &cast) + if err != nil { + return err + } + } + if m.GetTechnologies() != nil { + cast := (*m.GetTechnologies()).String() + err = writer.WriteStringValue("technologies", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCategoryDescription sets the categoryDescription property value. Description of the category header +func (m *DeviceManagementConfigurationCategory) SetCategoryDescription(value *string)() { + m.categoryDescription = value +} +// SetChildCategoryIds sets the childCategoryIds property value. List of child ids of the category. +func (m *DeviceManagementConfigurationCategory) SetChildCategoryIds(value []string)() { + m.childCategoryIds = value +} +// SetDescription sets the description property value. Description of the item +func (m *DeviceManagementConfigurationCategory) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name of the item +func (m *DeviceManagementConfigurationCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHelpText sets the helpText property value. Help text of the item +func (m *DeviceManagementConfigurationCategory) SetHelpText(value *string)() { + m.helpText = value +} +// SetName sets the name property value. Name of the item +func (m *DeviceManagementConfigurationCategory) SetName(value *string)() { + m.name = value +} +// SetParentCategoryId sets the parentCategoryId property value. Parent id of the category. +func (m *DeviceManagementConfigurationCategory) SetParentCategoryId(value *string)() { + m.parentCategoryId = value +} +// SetPlatforms sets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationCategory) SetPlatforms(value *DeviceManagementConfigurationPlatforms)() { + m.platforms = value +} +// SetRootCategoryId sets the rootCategoryId property value. Root id of the category. +func (m *DeviceManagementConfigurationCategory) SetRootCategoryId(value *string)() { + m.rootCategoryId = value +} +// SetSettingUsage sets the settingUsage property value. Supported setting types +func (m *DeviceManagementConfigurationCategory) SetSettingUsage(value *DeviceManagementConfigurationSettingUsage)() { + m.settingUsage = value +} +// SetTechnologies sets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationCategory) SetTechnologies(value *DeviceManagementConfigurationTechnologies)() { + m.technologies = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_response.go new file mode 100644 index 000000000..74c0b0d19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationCategoryCollectionResponse +type DeviceManagementConfigurationCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationCategoryable +} +// NewDeviceManagementConfigurationCategoryCollectionResponse instantiates a new DeviceManagementConfigurationCategoryCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationCategoryCollectionResponse()(*DeviceManagementConfigurationCategoryCollectionResponse) { + m := &DeviceManagementConfigurationCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationCategoryCollectionResponse) GetValue()([]DeviceManagementConfigurationCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationCategoryCollectionResponse) SetValue(value []DeviceManagementConfigurationCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_responseable.go new file mode 100644 index 000000000..4fee386c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationCategoryCollectionResponseable +type DeviceManagementConfigurationCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationCategoryable) + SetValue(value []DeviceManagementConfigurationCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_categoryable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_categoryable.go new file mode 100644 index 000000000..626f87af2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_categoryable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationCategoryable +type DeviceManagementConfigurationCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategoryDescription()(*string) + GetChildCategoryIds()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetHelpText()(*string) + GetName()(*string) + GetParentCategoryId()(*string) + GetPlatforms()(*DeviceManagementConfigurationPlatforms) + GetRootCategoryId()(*string) + GetSettingUsage()(*DeviceManagementConfigurationSettingUsage) + GetTechnologies()(*DeviceManagementConfigurationTechnologies) + SetCategoryDescription(value *string)() + SetChildCategoryIds(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetHelpText(value *string)() + SetName(value *string)() + SetParentCategoryId(value *string)() + SetPlatforms(value *DeviceManagementConfigurationPlatforms)() + SetRootCategoryId(value *string)() + SetSettingUsage(value *DeviceManagementConfigurationSettingUsage)() + SetTechnologies(value *DeviceManagementConfigurationTechnologies)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition.go new file mode 100644 index 000000000..551f7c872 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionDefinition +type DeviceManagementConfigurationChoiceSettingCollectionDefinition struct { + DeviceManagementConfigurationChoiceSettingDefinition + // Maximum number of choices in the collection. Valid values 1 to 100 + maximumCount *int32 + // Minimum number of choices in the collection. Valid values 1 to 100 + minimumCount *int32 +} +// NewDeviceManagementConfigurationChoiceSettingCollectionDefinition instantiates a new DeviceManagementConfigurationChoiceSettingCollectionDefinition and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingCollectionDefinition()(*DeviceManagementConfigurationChoiceSettingCollectionDefinition) { + m := &DeviceManagementConfigurationChoiceSettingCollectionDefinition{ + DeviceManagementConfigurationChoiceSettingDefinition: *NewDeviceManagementConfigurationChoiceSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingCollectionDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingCollectionDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingCollectionDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationChoiceSettingDefinition.GetFieldDeserializers() + res["maximumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumCount(val) + } + return nil + } + res["minimumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumCount(val) + } + return nil + } + return res +} +// GetMaximumCount gets the maximumCount property value. Maximum number of choices in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetMaximumCount()(*int32) { + return m.maximumCount +} +// GetMinimumCount gets the minimumCount property value. Minimum number of choices in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) GetMinimumCount()(*int32) { + return m.minimumCount +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationChoiceSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumCount", m.GetMaximumCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumCount", m.GetMinimumCount()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumCount sets the maximumCount property value. Maximum number of choices in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) SetMaximumCount(value *int32)() { + m.maximumCount = value +} +// SetMinimumCount sets the minimumCount property value. Minimum number of choices in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinition) SetMinimumCount(value *int32)() { + m.minimumCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_response.go new file mode 100644 index 000000000..dcf0dd20a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse +type DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationChoiceSettingCollectionDefinitionable +} +// NewDeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse()(*DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingCollectionDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingCollectionDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingCollectionDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationChoiceSettingCollectionDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationChoiceSettingCollectionDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_responseable.go new file mode 100644 index 000000000..ed1bb4660 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponseable +type DeviceManagementConfigurationChoiceSettingCollectionDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationChoiceSettingCollectionDefinitionable) + SetValue(value []DeviceManagementConfigurationChoiceSettingCollectionDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definitionable.go new file mode 100644 index 000000000..2863d0809 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionDefinitionable +type DeviceManagementConfigurationChoiceSettingCollectionDefinitionable interface { + DeviceManagementConfigurationChoiceSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumCount()(*int32) + GetMinimumCount()(*int32) + SetMaximumCount(value *int32)() + SetMinimumCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance.go new file mode 100644 index 000000000..125f1129a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionInstance +type DeviceManagementConfigurationChoiceSettingCollectionInstance struct { + DeviceManagementConfigurationSettingInstance + // Choice setting collection value + choiceSettingCollectionValue []DeviceManagementConfigurationChoiceSettingValueable +} +// NewDeviceManagementConfigurationChoiceSettingCollectionInstance instantiates a new DeviceManagementConfigurationChoiceSettingCollectionInstance and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingCollectionInstance()(*DeviceManagementConfigurationChoiceSettingCollectionInstance) { + m := &DeviceManagementConfigurationChoiceSettingCollectionInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingCollectionInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingCollectionInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingCollectionInstance(), nil +} +// GetChoiceSettingCollectionValue gets the choiceSettingCollectionValue property value. Choice setting collection value +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstance) GetChoiceSettingCollectionValue()([]DeviceManagementConfigurationChoiceSettingValueable) { + return m.choiceSettingCollectionValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["choiceSettingCollectionValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingValueable) + } + m.SetChoiceSettingCollectionValue(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetChoiceSettingCollectionValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChoiceSettingCollectionValue())) + for i, v := range m.GetChoiceSettingCollectionValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("choiceSettingCollectionValue", cast) + if err != nil { + return err + } + } + return nil +} +// SetChoiceSettingCollectionValue sets the choiceSettingCollectionValue property value. Choice setting collection value +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstance) SetChoiceSettingCollectionValue(value []DeviceManagementConfigurationChoiceSettingValueable)() { + m.choiceSettingCollectionValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_template.go new file mode 100644 index 000000000..59186efb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_template.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate +type DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Linked policy may append values which are not present in the template. + allowUnmanagedValues *bool + // Choice Setting Collection Value Template + choiceSettingCollectionValueTemplate []DeviceManagementConfigurationChoiceSettingValueTemplateable +} +// NewDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate instantiates a new DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate()(*DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) { + m := &DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate(), nil +} +// GetAllowUnmanagedValues gets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) GetAllowUnmanagedValues()(*bool) { + return m.allowUnmanagedValues +} +// GetChoiceSettingCollectionValueTemplate gets the choiceSettingCollectionValueTemplate property value. Choice Setting Collection Value Template +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) GetChoiceSettingCollectionValueTemplate()([]DeviceManagementConfigurationChoiceSettingValueTemplateable) { + return m.choiceSettingCollectionValueTemplate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["allowUnmanagedValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUnmanagedValues(val) + } + return nil + } + res["choiceSettingCollectionValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingValueTemplateable) + } + m.SetChoiceSettingCollectionValueTemplate(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowUnmanagedValues", m.GetAllowUnmanagedValues()) + if err != nil { + return err + } + } + if m.GetChoiceSettingCollectionValueTemplate() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChoiceSettingCollectionValueTemplate())) + for i, v := range m.GetChoiceSettingCollectionValueTemplate() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("choiceSettingCollectionValueTemplate", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowUnmanagedValues sets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) SetAllowUnmanagedValues(value *bool)() { + m.allowUnmanagedValues = value +} +// SetChoiceSettingCollectionValueTemplate sets the choiceSettingCollectionValueTemplate property value. Choice Setting Collection Value Template +func (m *DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate) SetChoiceSettingCollectionValueTemplate(value []DeviceManagementConfigurationChoiceSettingValueTemplateable)() { + m.choiceSettingCollectionValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_templateable.go new file mode 100644 index 000000000..76245f1e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instance_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplateable +type DeviceManagementConfigurationChoiceSettingCollectionInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowUnmanagedValues()(*bool) + GetChoiceSettingCollectionValueTemplate()([]DeviceManagementConfigurationChoiceSettingValueTemplateable) + SetAllowUnmanagedValues(value *bool)() + SetChoiceSettingCollectionValueTemplate(value []DeviceManagementConfigurationChoiceSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instanceable.go new file mode 100644 index 000000000..30a1a620c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_collection_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingCollectionInstanceable +type DeviceManagementConfigurationChoiceSettingCollectionInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChoiceSettingCollectionValue()([]DeviceManagementConfigurationChoiceSettingValueable) + SetChoiceSettingCollectionValue(value []DeviceManagementConfigurationChoiceSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition.go new file mode 100644 index 000000000..c3c4e0626 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingDefinition +type DeviceManagementConfigurationChoiceSettingDefinition struct { + DeviceManagementConfigurationSettingDefinition + // Default option for choice setting + defaultOptionId *string + // Options for the setting that can be selected + options []DeviceManagementConfigurationOptionDefinitionable +} +// NewDeviceManagementConfigurationChoiceSettingDefinition instantiates a new DeviceManagementConfigurationChoiceSettingDefinition and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingDefinition()(*DeviceManagementConfigurationChoiceSettingDefinition) { + m := &DeviceManagementConfigurationChoiceSettingDefinition{ + DeviceManagementConfigurationSettingDefinition: *NewDeviceManagementConfigurationSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionDefinition": + return NewDeviceManagementConfigurationChoiceSettingCollectionDefinition(), nil + } + } + } + } + return NewDeviceManagementConfigurationChoiceSettingDefinition(), nil +} +// GetDefaultOptionId gets the defaultOptionId property value. Default option for choice setting +func (m *DeviceManagementConfigurationChoiceSettingDefinition) GetDefaultOptionId()(*string) { + return m.defaultOptionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingDefinition.GetFieldDeserializers() + res["defaultOptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultOptionId(val) + } + return nil + } + res["options"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationOptionDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationOptionDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationOptionDefinitionable) + } + m.SetOptions(res) + } + return nil + } + return res +} +// GetOptions gets the options property value. Options for the setting that can be selected +func (m *DeviceManagementConfigurationChoiceSettingDefinition) GetOptions()([]DeviceManagementConfigurationOptionDefinitionable) { + return m.options +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultOptionId", m.GetDefaultOptionId()) + if err != nil { + return err + } + } + if m.GetOptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOptions())) + for i, v := range m.GetOptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("options", cast) + if err != nil { + return err + } + } + return nil +} +// SetDefaultOptionId sets the defaultOptionId property value. Default option for choice setting +func (m *DeviceManagementConfigurationChoiceSettingDefinition) SetDefaultOptionId(value *string)() { + m.defaultOptionId = value +} +// SetOptions sets the options property value. Options for the setting that can be selected +func (m *DeviceManagementConfigurationChoiceSettingDefinition) SetOptions(value []DeviceManagementConfigurationOptionDefinitionable)() { + m.options = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_response.go new file mode 100644 index 000000000..de984345b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse +type DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationChoiceSettingDefinitionable +} +// NewDeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse()(*DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationChoiceSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationChoiceSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_responseable.go new file mode 100644 index 000000000..a6871b76c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponseable +type DeviceManagementConfigurationChoiceSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationChoiceSettingDefinitionable) + SetValue(value []DeviceManagementConfigurationChoiceSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definitionable.go new file mode 100644 index 000000000..6e068acd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingDefinitionable +type DeviceManagementConfigurationChoiceSettingDefinitionable interface { + DeviceManagementConfigurationSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultOptionId()(*string) + GetOptions()([]DeviceManagementConfigurationOptionDefinitionable) + SetDefaultOptionId(value *string)() + SetOptions(value []DeviceManagementConfigurationOptionDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance.go new file mode 100644 index 000000000..5d35fcc96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingInstance +type DeviceManagementConfigurationChoiceSettingInstance struct { + DeviceManagementConfigurationSettingInstance + // The choiceSettingValue property + choiceSettingValue DeviceManagementConfigurationChoiceSettingValueable +} +// NewDeviceManagementConfigurationChoiceSettingInstance instantiates a new DeviceManagementConfigurationChoiceSettingInstance and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingInstance()(*DeviceManagementConfigurationChoiceSettingInstance) { + m := &DeviceManagementConfigurationChoiceSettingInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingInstance(), nil +} +// GetChoiceSettingValue gets the choiceSettingValue property value. The choiceSettingValue property +func (m *DeviceManagementConfigurationChoiceSettingInstance) GetChoiceSettingValue()(DeviceManagementConfigurationChoiceSettingValueable) { + return m.choiceSettingValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["choiceSettingValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationChoiceSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChoiceSettingValue(val.(DeviceManagementConfigurationChoiceSettingValueable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("choiceSettingValue", m.GetChoiceSettingValue()) + if err != nil { + return err + } + } + return nil +} +// SetChoiceSettingValue sets the choiceSettingValue property value. The choiceSettingValue property +func (m *DeviceManagementConfigurationChoiceSettingInstance) SetChoiceSettingValue(value DeviceManagementConfigurationChoiceSettingValueable)() { + m.choiceSettingValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_template.go new file mode 100644 index 000000000..1288e6519 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingInstanceTemplate +type DeviceManagementConfigurationChoiceSettingInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Choice Setting Value Template + choiceSettingValueTemplate DeviceManagementConfigurationChoiceSettingValueTemplateable +} +// NewDeviceManagementConfigurationChoiceSettingInstanceTemplate instantiates a new DeviceManagementConfigurationChoiceSettingInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingInstanceTemplate()(*DeviceManagementConfigurationChoiceSettingInstanceTemplate) { + m := &DeviceManagementConfigurationChoiceSettingInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingInstanceTemplate(), nil +} +// GetChoiceSettingValueTemplate gets the choiceSettingValueTemplate property value. Choice Setting Value Template +func (m *DeviceManagementConfigurationChoiceSettingInstanceTemplate) GetChoiceSettingValueTemplate()(DeviceManagementConfigurationChoiceSettingValueTemplateable) { + return m.choiceSettingValueTemplate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["choiceSettingValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationChoiceSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChoiceSettingValueTemplate(val.(DeviceManagementConfigurationChoiceSettingValueTemplateable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("choiceSettingValueTemplate", m.GetChoiceSettingValueTemplate()) + if err != nil { + return err + } + } + return nil +} +// SetChoiceSettingValueTemplate sets the choiceSettingValueTemplate property value. Choice Setting Value Template +func (m *DeviceManagementConfigurationChoiceSettingInstanceTemplate) SetChoiceSettingValueTemplate(value DeviceManagementConfigurationChoiceSettingValueTemplateable)() { + m.choiceSettingValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_templateable.go new file mode 100644 index 000000000..e0e55d4cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instance_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingInstanceTemplateable +type DeviceManagementConfigurationChoiceSettingInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChoiceSettingValueTemplate()(DeviceManagementConfigurationChoiceSettingValueTemplateable) + SetChoiceSettingValueTemplate(value DeviceManagementConfigurationChoiceSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instanceable.go new file mode 100644 index 000000000..702dba048 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingInstanceable +type DeviceManagementConfigurationChoiceSettingInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChoiceSettingValue()(DeviceManagementConfigurationChoiceSettingValueable) + SetChoiceSettingValue(value DeviceManagementConfigurationChoiceSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value.go new file mode 100644 index 000000000..0195d66a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValue +type DeviceManagementConfigurationChoiceSettingValue struct { + DeviceManagementConfigurationSettingValue + // Child settings. + children []DeviceManagementConfigurationSettingInstanceable + // Choice setting value: an OptionDefinition ItemId. + value *string +} +// NewDeviceManagementConfigurationChoiceSettingValue instantiates a new DeviceManagementConfigurationChoiceSettingValue and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValue()(*DeviceManagementConfigurationChoiceSettingValue) { + m := &DeviceManagementConfigurationChoiceSettingValue{ + DeviceManagementConfigurationSettingValue: *NewDeviceManagementConfigurationSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValue(), nil +} +// GetChildren gets the children property value. Child settings. +func (m *DeviceManagementConfigurationChoiceSettingValue) GetChildren()([]DeviceManagementConfigurationSettingInstanceable) { + return m.children +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingValue.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceable) + } + m.SetChildren(res) + } + 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 +} +// GetValue gets the value property value. Choice setting value: an OptionDefinition ItemId. +func (m *DeviceManagementConfigurationChoiceSettingValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingValue.Serialize(writer) + if err != nil { + return err + } + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. Child settings. +func (m *DeviceManagementConfigurationChoiceSettingValue) SetChildren(value []DeviceManagementConfigurationSettingInstanceable)() { + m.children = value +} +// SetValue sets the value property value. Choice setting value: an OptionDefinition ItemId. +func (m *DeviceManagementConfigurationChoiceSettingValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_response.go new file mode 100644 index 000000000..08a3265f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueCollectionResponse +type DeviceManagementConfigurationChoiceSettingValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationChoiceSettingValueable +} +// NewDeviceManagementConfigurationChoiceSettingValueCollectionResponse instantiates a new DeviceManagementConfigurationChoiceSettingValueCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueCollectionResponse()(*DeviceManagementConfigurationChoiceSettingValueCollectionResponse) { + m := &DeviceManagementConfigurationChoiceSettingValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingValueCollectionResponse) GetValue()([]DeviceManagementConfigurationChoiceSettingValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingValueCollectionResponse) SetValue(value []DeviceManagementConfigurationChoiceSettingValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_responseable.go new file mode 100644 index 000000000..8811c677a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueCollectionResponseable +type DeviceManagementConfigurationChoiceSettingValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationChoiceSettingValueable) + SetValue(value []DeviceManagementConfigurationChoiceSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_template.go new file mode 100644 index 000000000..736247f69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_template.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate +type DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate struct { + DeviceManagementConfigurationChoiceSettingValueDefaultTemplate + // Option Children + children []DeviceManagementConfigurationSettingInstanceTemplateable + // Default Constant Value + settingDefinitionOptionId *string +} +// NewDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate instantiates a new DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate()(*DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) { + m := &DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate{ + DeviceManagementConfigurationChoiceSettingValueDefaultTemplate: *NewDeviceManagementConfigurationChoiceSettingValueDefaultTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate(), nil +} +// GetChildren gets the children property value. Option Children +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) { + return m.children +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceTemplateable) + } + m.SetChildren(res) + } + return nil + } + res["settingDefinitionOptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDefinitionOptionId(val) + } + return nil + } + return res +} +// GetSettingDefinitionOptionId gets the settingDefinitionOptionId property value. Default Constant Value +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) GetSettingDefinitionOptionId()(*string) { + return m.settingDefinitionOptionId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationChoiceSettingValueDefaultTemplate.Serialize(writer) + if err != nil { + return err + } + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingDefinitionOptionId", m.GetSettingDefinitionOptionId()) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. Option Children +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() { + m.children = value +} +// SetSettingDefinitionOptionId sets the settingDefinitionOptionId property value. Default Constant Value +func (m *DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate) SetSettingDefinitionOptionId(value *string)() { + m.settingDefinitionOptionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_templateable.go new file mode 100644 index 000000000..ccd5929ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_constant_default_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplateable +type DeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplateable interface { + DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) + GetSettingDefinitionOptionId()(*string) + SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() + SetSettingDefinitionOptionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_template.go new file mode 100644 index 000000000..186b3e4db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_template.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueDefaultTemplate choice Setting Value Default Template +type DeviceManagementConfigurationChoiceSettingValueDefaultTemplate 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 OdataType property + odataType *string +} +// NewDeviceManagementConfigurationChoiceSettingValueDefaultTemplate instantiates a new deviceManagementConfigurationChoiceSettingValueDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueDefaultTemplate()(*DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) { + m := &DeviceManagementConfigurationChoiceSettingValueDefaultTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate": + return NewDeviceManagementConfigurationChoiceSettingValueConstantDefaultTemplate(), nil + } + } + } + } + return NewDeviceManagementConfigurationChoiceSettingValueDefaultTemplate(), 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 *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueDefaultTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_templateable.go new file mode 100644 index 000000000..573c68d9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_default_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable +type DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_template.go new file mode 100644 index 000000000..4cf23a02f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_template.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate choice Setting Value Definition Template +type DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Choice Setting Allowed Options + allowedOptions []DeviceManagementConfigurationOptionDefinitionTemplateable + // The OdataType property + odataType *string +} +// NewDeviceManagementConfigurationChoiceSettingValueDefinitionTemplate instantiates a new deviceManagementConfigurationChoiceSettingValueDefinitionTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueDefinitionTemplate()(*DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) { + m := &DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueDefinitionTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueDefinitionTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValueDefinitionTemplate(), 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 *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedOptions gets the allowedOptions property value. Choice Setting Allowed Options +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) GetAllowedOptions()([]DeviceManagementConfigurationOptionDefinitionTemplateable) { + return m.allowedOptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationOptionDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationOptionDefinitionTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationOptionDefinitionTemplateable) + } + m.SetAllowedOptions(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedOptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedOptions())) + for i, v := range m.GetAllowedOptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("allowedOptions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedOptions sets the allowedOptions property value. Choice Setting Allowed Options +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) SetAllowedOptions(value []DeviceManagementConfigurationOptionDefinitionTemplateable)() { + m.allowedOptions = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueDefinitionTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_templateable.go new file mode 100644 index 000000000..9181a47a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_definition_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable +type DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedOptions()([]DeviceManagementConfigurationOptionDefinitionTemplateable) + GetOdataType()(*string) + SetAllowedOptions(value []DeviceManagementConfigurationOptionDefinitionTemplateable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template.go new file mode 100644 index 000000000..bbb119fc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueTemplate choice Setting Value Template +type DeviceManagementConfigurationChoiceSettingValueTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Choice Setting Value Default Template. + defaultValue DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable + // The OdataType property + odataType *string + // Recommended definition override. + recommendedValueDefinition DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable + // Required definition override. + requiredValueDefinition DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable + // Setting Value Template Id + settingValueTemplateId *string +} +// NewDeviceManagementConfigurationChoiceSettingValueTemplate instantiates a new deviceManagementConfigurationChoiceSettingValueTemplate and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueTemplate()(*DeviceManagementConfigurationChoiceSettingValueTemplate) { + m := &DeviceManagementConfigurationChoiceSettingValueTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValueTemplate(), 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 *DeviceManagementConfigurationChoiceSettingValueTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultValue gets the defaultValue property value. Choice Setting Value Default Template. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetDefaultValue()(DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationChoiceSettingValueDefaultTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable)) + } + 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["recommendedValueDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationChoiceSettingValueDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecommendedValueDefinition(val.(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)) + } + return nil + } + res["requiredValueDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationChoiceSettingValueDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredValueDefinition(val.(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)) + } + return nil + } + res["settingValueTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetRecommendedValueDefinition gets the recommendedValueDefinition property value. Recommended definition override. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetRecommendedValueDefinition()(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable) { + return m.recommendedValueDefinition +} +// GetRequiredValueDefinition gets the requiredValueDefinition property value. Required definition override. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetRequiredValueDefinition()(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable) { + return m.requiredValueDefinition +} +// GetSettingValueTemplateId gets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) GetSettingValueTemplateId()(*string) { + return m.settingValueTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recommendedValueDefinition", m.GetRecommendedValueDefinition()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("requiredValueDefinition", m.GetRequiredValueDefinition()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingValueTemplateId", m.GetSettingValueTemplateId()) + 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 *DeviceManagementConfigurationChoiceSettingValueTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultValue sets the defaultValue property value. Choice Setting Value Default Template. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) SetDefaultValue(value DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable)() { + m.defaultValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommendedValueDefinition sets the recommendedValueDefinition property value. Recommended definition override. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) SetRecommendedValueDefinition(value DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)() { + m.recommendedValueDefinition = value +} +// SetRequiredValueDefinition sets the requiredValueDefinition property value. Required definition override. +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) SetRequiredValueDefinition(value DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)() { + m.requiredValueDefinition = value +} +// SetSettingValueTemplateId sets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationChoiceSettingValueTemplate) SetSettingValueTemplateId(value *string)() { + m.settingValueTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_response.go new file mode 100644 index 000000000..2543b16ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse +type DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationChoiceSettingValueTemplateable +} +// NewDeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse instantiates a new DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse()(*DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse) { + m := &DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationChoiceSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationChoiceSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationChoiceSettingValueTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationChoiceSettingValueTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationChoiceSettingValueTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_responseable.go new file mode 100644 index 000000000..5334f8562 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponseable +type DeviceManagementConfigurationChoiceSettingValueTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationChoiceSettingValueTemplateable) + SetValue(value []DeviceManagementConfigurationChoiceSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_templateable.go new file mode 100644 index 000000000..7382f29a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_value_templateable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueTemplateable +type DeviceManagementConfigurationChoiceSettingValueTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable) + GetOdataType()(*string) + GetRecommendedValueDefinition()(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable) + GetRequiredValueDefinition()(DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable) + GetSettingValueTemplateId()(*string) + SetDefaultValue(value DeviceManagementConfigurationChoiceSettingValueDefaultTemplateable)() + SetOdataType(value *string)() + SetRecommendedValueDefinition(value DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)() + SetRequiredValueDefinition(value DeviceManagementConfigurationChoiceSettingValueDefinitionTemplateable)() + SetSettingValueTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_valueable.go new file mode 100644 index 000000000..6ee684d09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_choice_setting_valueable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationChoiceSettingValueable +type DeviceManagementConfigurationChoiceSettingValueable interface { + DeviceManagementConfigurationSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]DeviceManagementConfigurationSettingInstanceable) + GetValue()(*string) + SetChildren(value []DeviceManagementConfigurationSettingInstanceable)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_control_type.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_control_type.go new file mode 100644 index 000000000..4daddbc92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_control_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationControlType int + +const ( + // Don’t override default + DEFAULT_ESCAPED_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE DeviceManagementConfigurationControlType = iota + // Display Choice in dropdown + DROPDOWN_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + // Display text input in small text input + SMALLTEXTBOX_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + // Display text input in large text input + LARGETEXTBOX_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + // Allow for toggle control type + TOGGLE_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + // Allow for multiheader grid control type + MULTIHEADERGRID_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + // Allow for context pane control type + CONTEXTPANE_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE +) + +func (i DeviceManagementConfigurationControlType) String() string { + return []string{"default", "dropdown", "smallTextBox", "largeTextBox", "toggle", "multiheaderGrid", "contextPane"}[i] +} +func ParseDeviceManagementConfigurationControlType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "dropdown": + result = DROPDOWN_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "smallTextBox": + result = SMALLTEXTBOX_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "largeTextBox": + result = LARGETEXTBOX_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "toggle": + result = TOGGLE_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "multiheaderGrid": + result = MULTIHEADERGRID_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + case "contextPane": + result = CONTEXTPANE_DEVICEMANAGEMENTCONFIGURATIONCONTROLTYPE + default: + return 0, errors.New("Unknown DeviceManagementConfigurationControlType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationControlType(values []DeviceManagementConfigurationControlType) []string { + 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/device_management_configuration_dependent_on.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on.go new file mode 100644 index 000000000..ff0833e2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationDependentOn +type DeviceManagementConfigurationDependentOn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifier of parent setting/ parent setting option dependent on + dependentOn *string + // The OdataType property + odataType *string + // Identifier of parent setting/ parent setting id dependent on + parentSettingId *string +} +// NewDeviceManagementConfigurationDependentOn instantiates a new deviceManagementConfigurationDependentOn and sets the default values. +func NewDeviceManagementConfigurationDependentOn()(*DeviceManagementConfigurationDependentOn) { + m := &DeviceManagementConfigurationDependentOn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationDependentOn(), 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 *DeviceManagementConfigurationDependentOn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDependentOn gets the dependentOn property value. Identifier of parent setting/ parent setting option dependent on +func (m *DeviceManagementConfigurationDependentOn) GetDependentOn()(*string) { + return m.dependentOn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationDependentOn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dependentOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDependentOn(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["parentSettingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentSettingId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationDependentOn) GetOdataType()(*string) { + return m.odataType +} +// GetParentSettingId gets the parentSettingId property value. Identifier of parent setting/ parent setting id dependent on +func (m *DeviceManagementConfigurationDependentOn) GetParentSettingId()(*string) { + return m.parentSettingId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationDependentOn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dependentOn", m.GetDependentOn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("parentSettingId", m.GetParentSettingId()) + 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 *DeviceManagementConfigurationDependentOn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDependentOn sets the dependentOn property value. Identifier of parent setting/ parent setting option dependent on +func (m *DeviceManagementConfigurationDependentOn) SetDependentOn(value *string)() { + m.dependentOn = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationDependentOn) SetOdataType(value *string)() { + m.odataType = value +} +// SetParentSettingId sets the parentSettingId property value. Identifier of parent setting/ parent setting id dependent on +func (m *DeviceManagementConfigurationDependentOn) SetParentSettingId(value *string)() { + m.parentSettingId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_response.go new file mode 100644 index 000000000..8da5937ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationDependentOnCollectionResponse +type DeviceManagementConfigurationDependentOnCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationDependentOnable +} +// NewDeviceManagementConfigurationDependentOnCollectionResponse instantiates a new DeviceManagementConfigurationDependentOnCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationDependentOnCollectionResponse()(*DeviceManagementConfigurationDependentOnCollectionResponse) { + m := &DeviceManagementConfigurationDependentOnCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationDependentOnCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationDependentOnCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationDependentOnCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationDependentOnCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationDependentOnable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationDependentOnable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationDependentOnCollectionResponse) GetValue()([]DeviceManagementConfigurationDependentOnable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationDependentOnCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationDependentOnCollectionResponse) SetValue(value []DeviceManagementConfigurationDependentOnable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_responseable.go new file mode 100644 index 000000000..ec9024dd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_on_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationDependentOnCollectionResponseable +type DeviceManagementConfigurationDependentOnCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationDependentOnable) + SetValue(value []DeviceManagementConfigurationDependentOnable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_onable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_onable.go new file mode 100644 index 000000000..dae486319 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_dependent_onable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationDependentOnable +type DeviceManagementConfigurationDependentOnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependentOn()(*string) + GetOdataType()(*string) + GetParentSettingId()(*string) + SetDependentOn(value *string)() + SetOdataType(value *string)() + SetParentSettingId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_device_mode.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_device_mode.go new file mode 100644 index 000000000..15035e1ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_device_mode.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationDeviceMode int + +const ( + // No Device Mode specified + NONE_DEVICEMANAGEMENTCONFIGURATIONDEVICEMODE DeviceManagementConfigurationDeviceMode = iota + // Device must be in kiosk mode for this setting to apply + KIOSK_DEVICEMANAGEMENTCONFIGURATIONDEVICEMODE +) + +func (i DeviceManagementConfigurationDeviceMode) String() string { + return []string{"none", "kiosk"}[i] +} +func ParseDeviceManagementConfigurationDeviceMode(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONDEVICEMODE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONDEVICEMODE + case "kiosk": + result = KIOSK_DEVICEMANAGEMENTCONFIGURATIONDEVICEMODE + default: + return 0, errors.New("Unknown DeviceManagementConfigurationDeviceMode value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationDeviceMode(values []DeviceManagementConfigurationDeviceMode) []string { + 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/device_management_configuration_exchange_online_setting_applicability.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_exchange_online_setting_applicability.go new file mode 100644 index 000000000..04e960f6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_exchange_online_setting_applicability.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationExchangeOnlineSettingApplicability +type DeviceManagementConfigurationExchangeOnlineSettingApplicability struct { + DeviceManagementConfigurationSettingApplicability +} +// NewDeviceManagementConfigurationExchangeOnlineSettingApplicability instantiates a new DeviceManagementConfigurationExchangeOnlineSettingApplicability and sets the default values. +func NewDeviceManagementConfigurationExchangeOnlineSettingApplicability()(*DeviceManagementConfigurationExchangeOnlineSettingApplicability) { + m := &DeviceManagementConfigurationExchangeOnlineSettingApplicability{ + DeviceManagementConfigurationSettingApplicability: *NewDeviceManagementConfigurationSettingApplicability(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationExchangeOnlineSettingApplicability"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationExchangeOnlineSettingApplicabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationExchangeOnlineSettingApplicabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationExchangeOnlineSettingApplicability(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationExchangeOnlineSettingApplicability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingApplicability.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationExchangeOnlineSettingApplicability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingApplicability.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_exchange_online_setting_applicabilityable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_exchange_online_setting_applicabilityable.go new file mode 100644 index 000000000..3b33cb05a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_exchange_online_setting_applicabilityable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationExchangeOnlineSettingApplicabilityable +type DeviceManagementConfigurationExchangeOnlineSettingApplicabilityable interface { + DeviceManagementConfigurationSettingApplicabilityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance.go new file mode 100644 index 000000000..e11ed9a9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingCollectionInstance +type DeviceManagementConfigurationGroupSettingCollectionInstance struct { + DeviceManagementConfigurationSettingInstance + // A collection of GroupSetting values + groupSettingCollectionValue []DeviceManagementConfigurationGroupSettingValueable +} +// NewDeviceManagementConfigurationGroupSettingCollectionInstance instantiates a new DeviceManagementConfigurationGroupSettingCollectionInstance and sets the default values. +func NewDeviceManagementConfigurationGroupSettingCollectionInstance()(*DeviceManagementConfigurationGroupSettingCollectionInstance) { + m := &DeviceManagementConfigurationGroupSettingCollectionInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationGroupSettingCollectionInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingCollectionInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingCollectionInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingCollectionInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["groupSettingCollectionValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationGroupSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationGroupSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationGroupSettingValueable) + } + m.SetGroupSettingCollectionValue(res) + } + return nil + } + return res +} +// GetGroupSettingCollectionValue gets the groupSettingCollectionValue property value. A collection of GroupSetting values +func (m *DeviceManagementConfigurationGroupSettingCollectionInstance) GetGroupSettingCollectionValue()([]DeviceManagementConfigurationGroupSettingValueable) { + return m.groupSettingCollectionValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingCollectionInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetGroupSettingCollectionValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupSettingCollectionValue())) + for i, v := range m.GetGroupSettingCollectionValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupSettingCollectionValue", cast) + if err != nil { + return err + } + } + return nil +} +// SetGroupSettingCollectionValue sets the groupSettingCollectionValue property value. A collection of GroupSetting values +func (m *DeviceManagementConfigurationGroupSettingCollectionInstance) SetGroupSettingCollectionValue(value []DeviceManagementConfigurationGroupSettingValueable)() { + m.groupSettingCollectionValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_template.go new file mode 100644 index 000000000..fe72d8c1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_template.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate +type DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Linked policy may append values which are not present in the template. + allowUnmanagedValues *bool + // Group Setting Collection Value Template + groupSettingCollectionValueTemplate []DeviceManagementConfigurationGroupSettingValueTemplateable +} +// NewDeviceManagementConfigurationGroupSettingCollectionInstanceTemplate instantiates a new DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationGroupSettingCollectionInstanceTemplate()(*DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) { + m := &DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationGroupSettingCollectionInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingCollectionInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingCollectionInstanceTemplate(), nil +} +// GetAllowUnmanagedValues gets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) GetAllowUnmanagedValues()(*bool) { + return m.allowUnmanagedValues +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["allowUnmanagedValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUnmanagedValues(val) + } + return nil + } + res["groupSettingCollectionValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationGroupSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationGroupSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationGroupSettingValueTemplateable) + } + m.SetGroupSettingCollectionValueTemplate(res) + } + return nil + } + return res +} +// GetGroupSettingCollectionValueTemplate gets the groupSettingCollectionValueTemplate property value. Group Setting Collection Value Template +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) GetGroupSettingCollectionValueTemplate()([]DeviceManagementConfigurationGroupSettingValueTemplateable) { + return m.groupSettingCollectionValueTemplate +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowUnmanagedValues", m.GetAllowUnmanagedValues()) + if err != nil { + return err + } + } + if m.GetGroupSettingCollectionValueTemplate() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupSettingCollectionValueTemplate())) + for i, v := range m.GetGroupSettingCollectionValueTemplate() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupSettingCollectionValueTemplate", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowUnmanagedValues sets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) SetAllowUnmanagedValues(value *bool)() { + m.allowUnmanagedValues = value +} +// SetGroupSettingCollectionValueTemplate sets the groupSettingCollectionValueTemplate property value. Group Setting Collection Value Template +func (m *DeviceManagementConfigurationGroupSettingCollectionInstanceTemplate) SetGroupSettingCollectionValueTemplate(value []DeviceManagementConfigurationGroupSettingValueTemplateable)() { + m.groupSettingCollectionValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_templateable.go new file mode 100644 index 000000000..212359e65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instance_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingCollectionInstanceTemplateable +type DeviceManagementConfigurationGroupSettingCollectionInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowUnmanagedValues()(*bool) + GetGroupSettingCollectionValueTemplate()([]DeviceManagementConfigurationGroupSettingValueTemplateable) + SetAllowUnmanagedValues(value *bool)() + SetGroupSettingCollectionValueTemplate(value []DeviceManagementConfigurationGroupSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instanceable.go new file mode 100644 index 000000000..56f9bccaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_collection_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingCollectionInstanceable +type DeviceManagementConfigurationGroupSettingCollectionInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupSettingCollectionValue()([]DeviceManagementConfigurationGroupSettingValueable) + SetGroupSettingCollectionValue(value []DeviceManagementConfigurationGroupSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance.go new file mode 100644 index 000000000..48660b0eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingInstance +type DeviceManagementConfigurationGroupSettingInstance struct { + DeviceManagementConfigurationSettingInstance + // The groupSettingValue property + groupSettingValue DeviceManagementConfigurationGroupSettingValueable +} +// NewDeviceManagementConfigurationGroupSettingInstance instantiates a new DeviceManagementConfigurationGroupSettingInstance and sets the default values. +func NewDeviceManagementConfigurationGroupSettingInstance()(*DeviceManagementConfigurationGroupSettingInstance) { + m := &DeviceManagementConfigurationGroupSettingInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationGroupSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationGroupSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["groupSettingValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationGroupSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroupSettingValue(val.(DeviceManagementConfigurationGroupSettingValueable)) + } + return nil + } + return res +} +// GetGroupSettingValue gets the groupSettingValue property value. The groupSettingValue property +func (m *DeviceManagementConfigurationGroupSettingInstance) GetGroupSettingValue()(DeviceManagementConfigurationGroupSettingValueable) { + return m.groupSettingValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("groupSettingValue", m.GetGroupSettingValue()) + if err != nil { + return err + } + } + return nil +} +// SetGroupSettingValue sets the groupSettingValue property value. The groupSettingValue property +func (m *DeviceManagementConfigurationGroupSettingInstance) SetGroupSettingValue(value DeviceManagementConfigurationGroupSettingValueable)() { + m.groupSettingValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_template.go new file mode 100644 index 000000000..1b52d6d5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingInstanceTemplate +type DeviceManagementConfigurationGroupSettingInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Group Setting Value Template + groupSettingValueTemplate DeviceManagementConfigurationGroupSettingValueTemplateable +} +// NewDeviceManagementConfigurationGroupSettingInstanceTemplate instantiates a new DeviceManagementConfigurationGroupSettingInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationGroupSettingInstanceTemplate()(*DeviceManagementConfigurationGroupSettingInstanceTemplate) { + m := &DeviceManagementConfigurationGroupSettingInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationGroupSettingInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationGroupSettingInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingInstanceTemplate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["groupSettingValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationGroupSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroupSettingValueTemplate(val.(DeviceManagementConfigurationGroupSettingValueTemplateable)) + } + return nil + } + return res +} +// GetGroupSettingValueTemplate gets the groupSettingValueTemplate property value. Group Setting Value Template +func (m *DeviceManagementConfigurationGroupSettingInstanceTemplate) GetGroupSettingValueTemplate()(DeviceManagementConfigurationGroupSettingValueTemplateable) { + return m.groupSettingValueTemplate +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("groupSettingValueTemplate", m.GetGroupSettingValueTemplate()) + if err != nil { + return err + } + } + return nil +} +// SetGroupSettingValueTemplate sets the groupSettingValueTemplate property value. Group Setting Value Template +func (m *DeviceManagementConfigurationGroupSettingInstanceTemplate) SetGroupSettingValueTemplate(value DeviceManagementConfigurationGroupSettingValueTemplateable)() { + m.groupSettingValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_templateable.go new file mode 100644 index 000000000..34e84b848 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instance_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingInstanceTemplateable +type DeviceManagementConfigurationGroupSettingInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupSettingValueTemplate()(DeviceManagementConfigurationGroupSettingValueTemplateable) + SetGroupSettingValueTemplate(value DeviceManagementConfigurationGroupSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instanceable.go new file mode 100644 index 000000000..22b854ae9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingInstanceable +type DeviceManagementConfigurationGroupSettingInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupSettingValue()(DeviceManagementConfigurationGroupSettingValueable) + SetGroupSettingValue(value DeviceManagementConfigurationGroupSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value.go new file mode 100644 index 000000000..701132346 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValue +type DeviceManagementConfigurationGroupSettingValue struct { + DeviceManagementConfigurationSettingValue + // Collection of child setting instances contained within this GroupSetting + children []DeviceManagementConfigurationSettingInstanceable +} +// NewDeviceManagementConfigurationGroupSettingValue instantiates a new DeviceManagementConfigurationGroupSettingValue and sets the default values. +func NewDeviceManagementConfigurationGroupSettingValue()(*DeviceManagementConfigurationGroupSettingValue) { + m := &DeviceManagementConfigurationGroupSettingValue{ + DeviceManagementConfigurationSettingValue: *NewDeviceManagementConfigurationSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationGroupSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationGroupSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingValue(), nil +} +// GetChildren gets the children property value. Collection of child setting instances contained within this GroupSetting +func (m *DeviceManagementConfigurationGroupSettingValue) GetChildren()([]DeviceManagementConfigurationSettingInstanceable) { + return m.children +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingValue.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceable) + } + m.SetChildren(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingValue.Serialize(writer) + if err != nil { + return err + } + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. Collection of child setting instances contained within this GroupSetting +func (m *DeviceManagementConfigurationGroupSettingValue) SetChildren(value []DeviceManagementConfigurationSettingInstanceable)() { + m.children = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_response.go new file mode 100644 index 000000000..9f4d0677a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueCollectionResponse +type DeviceManagementConfigurationGroupSettingValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationGroupSettingValueable +} +// NewDeviceManagementConfigurationGroupSettingValueCollectionResponse instantiates a new DeviceManagementConfigurationGroupSettingValueCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationGroupSettingValueCollectionResponse()(*DeviceManagementConfigurationGroupSettingValueCollectionResponse) { + m := &DeviceManagementConfigurationGroupSettingValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationGroupSettingValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationGroupSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationGroupSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationGroupSettingValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationGroupSettingValueCollectionResponse) GetValue()([]DeviceManagementConfigurationGroupSettingValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationGroupSettingValueCollectionResponse) SetValue(value []DeviceManagementConfigurationGroupSettingValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_responseable.go new file mode 100644 index 000000000..ba750b603 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueCollectionResponseable +type DeviceManagementConfigurationGroupSettingValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationGroupSettingValueable) + SetValue(value []DeviceManagementConfigurationGroupSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template.go new file mode 100644 index 000000000..7152ba975 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueTemplate group Setting Value Template +type DeviceManagementConfigurationGroupSettingValueTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Group setting value children + children []DeviceManagementConfigurationSettingInstanceTemplateable + // The OdataType property + odataType *string + // Setting Value Template Id + settingValueTemplateId *string +} +// NewDeviceManagementConfigurationGroupSettingValueTemplate instantiates a new deviceManagementConfigurationGroupSettingValueTemplate and sets the default values. +func NewDeviceManagementConfigurationGroupSettingValueTemplate()(*DeviceManagementConfigurationGroupSettingValueTemplate) { + m := &DeviceManagementConfigurationGroupSettingValueTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationGroupSettingValueTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingValueTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingValueTemplate(), 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 *DeviceManagementConfigurationGroupSettingValueTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChildren gets the children property value. Group setting value children +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) { + return m.children +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceTemplateable) + } + m.SetChildren(res) + } + 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["settingValueTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetSettingValueTemplateId gets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) GetSettingValueTemplateId()(*string) { + return m.settingValueTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingValueTemplateId", m.GetSettingValueTemplateId()) + 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 *DeviceManagementConfigurationGroupSettingValueTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChildren sets the children property value. Group setting value children +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() { + m.children = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingValueTemplateId sets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationGroupSettingValueTemplate) SetSettingValueTemplateId(value *string)() { + m.settingValueTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_response.go new file mode 100644 index 000000000..d9f1099d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse +type DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationGroupSettingValueTemplateable +} +// NewDeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse instantiates a new DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse()(*DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse) { + m := &DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationGroupSettingValueTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationGroupSettingValueTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationGroupSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationGroupSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationGroupSettingValueTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationGroupSettingValueTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationGroupSettingValueTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_responseable.go new file mode 100644 index 000000000..a7ec5469c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponseable +type DeviceManagementConfigurationGroupSettingValueTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationGroupSettingValueTemplateable) + SetValue(value []DeviceManagementConfigurationGroupSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_templateable.go new file mode 100644 index 000000000..73fa4f722 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_value_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueTemplateable +type DeviceManagementConfigurationGroupSettingValueTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) + GetOdataType()(*string) + GetSettingValueTemplateId()(*string) + SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() + SetOdataType(value *string)() + SetSettingValueTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_valueable.go new file mode 100644 index 000000000..ef5c8c417 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_group_setting_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationGroupSettingValueable +type DeviceManagementConfigurationGroupSettingValueable interface { + DeviceManagementConfigurationSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]DeviceManagementConfigurationSettingInstanceable) + SetChildren(value []DeviceManagementConfigurationSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value.go new file mode 100644 index 000000000..cff6057cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValue +type DeviceManagementConfigurationIntegerSettingValue struct { + DeviceManagementConfigurationSimpleSettingValue + // Value of the integer setting. + value *int32 +} +// NewDeviceManagementConfigurationIntegerSettingValue instantiates a new DeviceManagementConfigurationIntegerSettingValue and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValue()(*DeviceManagementConfigurationIntegerSettingValue) { + m := &DeviceManagementConfigurationIntegerSettingValue{ + DeviceManagementConfigurationSimpleSettingValue: *NewDeviceManagementConfigurationSimpleSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationIntegerSettingValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Value of the integer setting. +func (m *DeviceManagementConfigurationIntegerSettingValue) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value of the integer setting. +func (m *DeviceManagementConfigurationIntegerSettingValue) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_template.go new file mode 100644 index 000000000..74ae52446 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate +type DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate struct { + DeviceManagementConfigurationIntegerSettingValueDefaultTemplate + // Default Constant Value. Valid values -2147483648 to 2147483647 + constantValue *int32 +} +// NewDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate instantiates a new DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate()(*DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate) { + m := &DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate{ + DeviceManagementConfigurationIntegerSettingValueDefaultTemplate: *NewDeviceManagementConfigurationIntegerSettingValueDefaultTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate(), nil +} +// GetConstantValue gets the constantValue property value. Default Constant Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate) GetConstantValue()(*int32) { + return m.constantValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.GetFieldDeserializers() + res["constantValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConstantValue(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationIntegerSettingValueDefaultTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("constantValue", m.GetConstantValue()) + if err != nil { + return err + } + } + return nil +} +// SetConstantValue sets the constantValue property value. Default Constant Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate) SetConstantValue(value *int32)() { + m.constantValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_templateable.go new file mode 100644 index 000000000..c04fd7b59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_constant_default_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplateable +type DeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplateable interface { + DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConstantValue()(*int32) + SetConstantValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_template.go new file mode 100644 index 000000000..dbc0f31b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_template.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefaultTemplate integer Setting Value Default Template +type DeviceManagementConfigurationIntegerSettingValueDefaultTemplate 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 OdataType property + odataType *string +} +// NewDeviceManagementConfigurationIntegerSettingValueDefaultTemplate instantiates a new deviceManagementConfigurationIntegerSettingValueDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValueDefaultTemplate()(*DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) { + m := &DeviceManagementConfigurationIntegerSettingValueDefaultTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate": + return NewDeviceManagementConfigurationIntegerSettingValueConstantDefaultTemplate(), nil + } + } + } + } + return NewDeviceManagementConfigurationIntegerSettingValueDefaultTemplate(), 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 *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationIntegerSettingValueDefaultTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_templateable.go new file mode 100644 index 000000000..5e08d98b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_default_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable +type DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition.go new file mode 100644 index 000000000..673bf3405 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefinition +type DeviceManagementConfigurationIntegerSettingValueDefinition struct { + DeviceManagementConfigurationSettingValueDefinition + // Maximum allowed value of the integer + maximumValue *int64 + // Minimum allowed value of the integer + minimumValue *int64 +} +// NewDeviceManagementConfigurationIntegerSettingValueDefinition instantiates a new DeviceManagementConfigurationIntegerSettingValueDefinition and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValueDefinition()(*DeviceManagementConfigurationIntegerSettingValueDefinition) { + m := &DeviceManagementConfigurationIntegerSettingValueDefinition{ + DeviceManagementConfigurationSettingValueDefinition: *NewDeviceManagementConfigurationSettingValueDefinition(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueDefinition"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationIntegerSettingValueDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingValueDefinition.GetFieldDeserializers() + res["maximumValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumValue(val) + } + return nil + } + res["minimumValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumValue(val) + } + return nil + } + return res +} +// GetMaximumValue gets the maximumValue property value. Maximum allowed value of the integer +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) GetMaximumValue()(*int64) { + return m.maximumValue +} +// GetMinimumValue gets the minimumValue property value. Minimum allowed value of the integer +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) GetMinimumValue()(*int64) { + return m.minimumValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingValueDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("maximumValue", m.GetMaximumValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("minimumValue", m.GetMinimumValue()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumValue sets the maximumValue property value. Maximum allowed value of the integer +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) SetMaximumValue(value *int64)() { + m.maximumValue = value +} +// SetMinimumValue sets the minimumValue property value. Minimum allowed value of the integer +func (m *DeviceManagementConfigurationIntegerSettingValueDefinition) SetMinimumValue(value *int64)() { + m.minimumValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_template.go new file mode 100644 index 000000000..4f6f0e39d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_template.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate integer Setting Value Definition Template +type DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Integer Setting Maximum Value. Valid values -2147483648 to 2147483647 + maxValue *int32 + // Integer Setting Minimum Value. Valid values -2147483648 to 2147483647 + minValue *int32 + // The OdataType property + odataType *string +} +// NewDeviceManagementConfigurationIntegerSettingValueDefinitionTemplate instantiates a new deviceManagementConfigurationIntegerSettingValueDefinitionTemplate and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValueDefinitionTemplate()(*DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) { + m := &DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueDefinitionTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueDefinitionTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationIntegerSettingValueDefinitionTemplate(), 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 *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maxValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxValue(val) + } + return nil + } + res["minValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinValue(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 + } + return res +} +// GetMaxValue gets the maxValue property value. Integer Setting Maximum Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) GetMaxValue()(*int32) { + return m.maxValue +} +// GetMinValue gets the minValue property value. Integer Setting Minimum Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) GetMinValue()(*int32) { + return m.minValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("maxValue", m.GetMaxValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minValue", m.GetMinValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaxValue sets the maxValue property value. Integer Setting Maximum Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) SetMaxValue(value *int32)() { + m.maxValue = value +} +// SetMinValue sets the minValue property value. Integer Setting Minimum Value. Valid values -2147483648 to 2147483647 +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) SetMinValue(value *int32)() { + m.minValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationIntegerSettingValueDefinitionTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_templateable.go new file mode 100644 index 000000000..b8bed89ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definition_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable +type DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxValue()(*int32) + GetMinValue()(*int32) + GetOdataType()(*string) + SetMaxValue(value *int32)() + SetMinValue(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definitionable.go new file mode 100644 index 000000000..25896ffc9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueDefinitionable +type DeviceManagementConfigurationIntegerSettingValueDefinitionable interface { + DeviceManagementConfigurationSettingValueDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumValue()(*int64) + GetMinimumValue()(*int64) + SetMaximumValue(value *int64)() + SetMinimumValue(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_template.go new file mode 100644 index 000000000..535bc8b68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_template.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueTemplate +type DeviceManagementConfigurationIntegerSettingValueTemplate struct { + DeviceManagementConfigurationSimpleSettingValueTemplate + // Integer Setting Value Default Template. + defaultValue DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable + // Recommended value definition. + recommendedValueDefinition DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable + // Required value definition. + requiredValueDefinition DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable +} +// NewDeviceManagementConfigurationIntegerSettingValueTemplate instantiates a new DeviceManagementConfigurationIntegerSettingValueTemplate and sets the default values. +func NewDeviceManagementConfigurationIntegerSettingValueTemplate()(*DeviceManagementConfigurationIntegerSettingValueTemplate) { + m := &DeviceManagementConfigurationIntegerSettingValueTemplate{ + DeviceManagementConfigurationSimpleSettingValueTemplate: *NewDeviceManagementConfigurationSimpleSettingValueTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationIntegerSettingValueTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationIntegerSettingValueTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationIntegerSettingValueTemplate(), nil +} +// GetDefaultValue gets the defaultValue property value. Integer Setting Value Default Template. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) GetDefaultValue()(DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingValueTemplate.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationIntegerSettingValueDefaultTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable)) + } + return nil + } + res["recommendedValueDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationIntegerSettingValueDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecommendedValueDefinition(val.(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)) + } + return nil + } + res["requiredValueDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationIntegerSettingValueDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequiredValueDefinition(val.(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)) + } + return nil + } + return res +} +// GetRecommendedValueDefinition gets the recommendedValueDefinition property value. Recommended value definition. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) GetRecommendedValueDefinition()(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable) { + return m.recommendedValueDefinition +} +// GetRequiredValueDefinition gets the requiredValueDefinition property value. Required value definition. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) GetRequiredValueDefinition()(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable) { + return m.requiredValueDefinition +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingValueTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recommendedValueDefinition", m.GetRecommendedValueDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("requiredValueDefinition", m.GetRequiredValueDefinition()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. Integer Setting Value Default Template. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) SetDefaultValue(value DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable)() { + m.defaultValue = value +} +// SetRecommendedValueDefinition sets the recommendedValueDefinition property value. Recommended value definition. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) SetRecommendedValueDefinition(value DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)() { + m.recommendedValueDefinition = value +} +// SetRequiredValueDefinition sets the requiredValueDefinition property value. Required value definition. +func (m *DeviceManagementConfigurationIntegerSettingValueTemplate) SetRequiredValueDefinition(value DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)() { + m.requiredValueDefinition = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_templateable.go new file mode 100644 index 000000000..a99152140 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_value_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueTemplateable +type DeviceManagementConfigurationIntegerSettingValueTemplateable interface { + DeviceManagementConfigurationSimpleSettingValueTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable) + GetRecommendedValueDefinition()(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable) + GetRequiredValueDefinition()(DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable) + SetDefaultValue(value DeviceManagementConfigurationIntegerSettingValueDefaultTemplateable)() + SetRecommendedValueDefinition(value DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)() + SetRequiredValueDefinition(value DeviceManagementConfigurationIntegerSettingValueDefinitionTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_valueable.go new file mode 100644 index 000000000..5e5deb993 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_integer_setting_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationIntegerSettingValueable +type DeviceManagementConfigurationIntegerSettingValueable interface { + DeviceManagementConfigurationSimpleSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*int32) + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition.go new file mode 100644 index 000000000..e93918e89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition.go @@ -0,0 +1,295 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinition +type DeviceManagementConfigurationOptionDefinition struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // List of Settings that depends on this option + dependedOnBy []DeviceManagementConfigurationSettingDependedOnByable + // List of dependent settings for this option + dependentOn []DeviceManagementConfigurationDependentOnable + // Description of the option + description *string + // Friendly name of the option + displayName *string + // Help text of the option + helpText *string + // Identifier of option + itemId *string + // Name of the option + name *string + // The OdataType property + odataType *string + // Value of the option + optionValue DeviceManagementConfigurationSettingValueable +} +// NewDeviceManagementConfigurationOptionDefinition instantiates a new deviceManagementConfigurationOptionDefinition and sets the default values. +func NewDeviceManagementConfigurationOptionDefinition()(*DeviceManagementConfigurationOptionDefinition) { + m := &DeviceManagementConfigurationOptionDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationOptionDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationOptionDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationOptionDefinition(), 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 *DeviceManagementConfigurationOptionDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDependedOnBy gets the dependedOnBy property value. List of Settings that depends on this option +func (m *DeviceManagementConfigurationOptionDefinition) GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) { + return m.dependedOnBy +} +// GetDependentOn gets the dependentOn property value. List of dependent settings for this option +func (m *DeviceManagementConfigurationOptionDefinition) GetDependentOn()([]DeviceManagementConfigurationDependentOnable) { + return m.dependentOn +} +// GetDescription gets the description property value. Description of the option +func (m *DeviceManagementConfigurationOptionDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Friendly name of the option +func (m *DeviceManagementConfigurationOptionDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationOptionDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dependedOnBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDependedOnByable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDependedOnByable) + } + m.SetDependedOnBy(res) + } + return nil + } + res["dependentOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationDependentOnable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationDependentOnable) + } + m.SetDependentOn(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["helpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpText(val) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["optionValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOptionValue(val.(DeviceManagementConfigurationSettingValueable)) + } + return nil + } + return res +} +// GetHelpText gets the helpText property value. Help text of the option +func (m *DeviceManagementConfigurationOptionDefinition) GetHelpText()(*string) { + return m.helpText +} +// GetItemId gets the itemId property value. Identifier of option +func (m *DeviceManagementConfigurationOptionDefinition) GetItemId()(*string) { + return m.itemId +} +// GetName gets the name property value. Name of the option +func (m *DeviceManagementConfigurationOptionDefinition) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationOptionDefinition) GetOdataType()(*string) { + return m.odataType +} +// GetOptionValue gets the optionValue property value. Value of the option +func (m *DeviceManagementConfigurationOptionDefinition) GetOptionValue()(DeviceManagementConfigurationSettingValueable) { + return m.optionValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationOptionDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDependedOnBy() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependedOnBy())) + for i, v := range m.GetDependedOnBy() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("dependedOnBy", cast) + if err != nil { + return err + } + } + if m.GetDependentOn() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependentOn())) + for i, v := range m.GetDependentOn() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("dependentOn", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("helpText", m.GetHelpText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("optionValue", m.GetOptionValue()) + 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 *DeviceManagementConfigurationOptionDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDependedOnBy sets the dependedOnBy property value. List of Settings that depends on this option +func (m *DeviceManagementConfigurationOptionDefinition) SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() { + m.dependedOnBy = value +} +// SetDependentOn sets the dependentOn property value. List of dependent settings for this option +func (m *DeviceManagementConfigurationOptionDefinition) SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() { + m.dependentOn = value +} +// SetDescription sets the description property value. Description of the option +func (m *DeviceManagementConfigurationOptionDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Friendly name of the option +func (m *DeviceManagementConfigurationOptionDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHelpText sets the helpText property value. Help text of the option +func (m *DeviceManagementConfigurationOptionDefinition) SetHelpText(value *string)() { + m.helpText = value +} +// SetItemId sets the itemId property value. Identifier of option +func (m *DeviceManagementConfigurationOptionDefinition) SetItemId(value *string)() { + m.itemId = value +} +// SetName sets the name property value. Name of the option +func (m *DeviceManagementConfigurationOptionDefinition) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationOptionDefinition) SetOdataType(value *string)() { + m.odataType = value +} +// SetOptionValue sets the optionValue property value. Value of the option +func (m *DeviceManagementConfigurationOptionDefinition) SetOptionValue(value DeviceManagementConfigurationSettingValueable)() { + m.optionValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_response.go new file mode 100644 index 000000000..af54506b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionCollectionResponse +type DeviceManagementConfigurationOptionDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationOptionDefinitionable +} +// NewDeviceManagementConfigurationOptionDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationOptionDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationOptionDefinitionCollectionResponse()(*DeviceManagementConfigurationOptionDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationOptionDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationOptionDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationOptionDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationOptionDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationOptionDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationOptionDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationOptionDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationOptionDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationOptionDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationOptionDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationOptionDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationOptionDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationOptionDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_responseable.go new file mode 100644 index 000000000..e5a397923 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionCollectionResponseable +type DeviceManagementConfigurationOptionDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationOptionDefinitionable) + SetValue(value []DeviceManagementConfigurationOptionDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template.go new file mode 100644 index 000000000..7734dcf22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionTemplate option Definition Template +type DeviceManagementConfigurationOptionDefinitionTemplate struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Option Children + children []DeviceManagementConfigurationSettingInstanceTemplateable + // Option ItemId + itemId *string + // The OdataType property + odataType *string +} +// NewDeviceManagementConfigurationOptionDefinitionTemplate instantiates a new deviceManagementConfigurationOptionDefinitionTemplate and sets the default values. +func NewDeviceManagementConfigurationOptionDefinitionTemplate()(*DeviceManagementConfigurationOptionDefinitionTemplate) { + m := &DeviceManagementConfigurationOptionDefinitionTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationOptionDefinitionTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationOptionDefinitionTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationOptionDefinitionTemplate(), 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 *DeviceManagementConfigurationOptionDefinitionTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChildren gets the children property value. Option Children +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) { + return m.children +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceTemplateable) + } + m.SetChildren(res) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(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 + } + return res +} +// GetItemId gets the itemId property value. Option ItemId +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) GetItemId()(*string) { + return m.itemId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationOptionDefinitionTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChildren sets the children property value. Option Children +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() { + m.children = value +} +// SetItemId sets the itemId property value. Option ItemId +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) SetItemId(value *string)() { + m.itemId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationOptionDefinitionTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_response.go new file mode 100644 index 000000000..2f7b9a050 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse +type DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationOptionDefinitionTemplateable +} +// NewDeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse instantiates a new DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse()(*DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse) { + m := &DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationOptionDefinitionTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationOptionDefinitionTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationOptionDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationOptionDefinitionTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationOptionDefinitionTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationOptionDefinitionTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationOptionDefinitionTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_responseable.go new file mode 100644 index 000000000..3389f7770 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponseable +type DeviceManagementConfigurationOptionDefinitionTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationOptionDefinitionTemplateable) + SetValue(value []DeviceManagementConfigurationOptionDefinitionTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_templateable.go new file mode 100644 index 000000000..336144d7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definition_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionTemplateable +type DeviceManagementConfigurationOptionDefinitionTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]DeviceManagementConfigurationSettingInstanceTemplateable) + GetItemId()(*string) + GetOdataType()(*string) + SetChildren(value []DeviceManagementConfigurationSettingInstanceTemplateable)() + SetItemId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definitionable.go new file mode 100644 index 000000000..72138d955 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_option_definitionable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationOptionDefinitionable +type DeviceManagementConfigurationOptionDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) + GetDependentOn()([]DeviceManagementConfigurationDependentOnable) + GetDescription()(*string) + GetDisplayName()(*string) + GetHelpText()(*string) + GetItemId()(*string) + GetName()(*string) + GetOdataType()(*string) + GetOptionValue()(DeviceManagementConfigurationSettingValueable) + SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() + SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetHelpText(value *string)() + SetItemId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetOptionValue(value DeviceManagementConfigurationSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_platforms.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_platforms.go new file mode 100644 index 000000000..beefcdd76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_platforms.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationPlatforms int + +const ( + // None. + NONE_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS DeviceManagementConfigurationPlatforms = iota + // Android. + ANDROID_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // iOS. + IOS_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // MacOS. + MACOS_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // Windows 10 X. + WINDOWS10X_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // Windows 10. + WINDOWS10_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // Linux. + LINUX_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + // Sentinel member for cases where the client cannot handle the new enum values. + UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS +) + +func (i DeviceManagementConfigurationPlatforms) String() string { + return []string{"none", "android", "iOS", "macOS", "windows10X", "windows10", "linux", "unknownFutureValue"}[i] +} +func ParseDeviceManagementConfigurationPlatforms(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "android": + result = ANDROID_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "iOS": + result = IOS_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "macOS": + result = MACOS_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "windows10X": + result = WINDOWS10X_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "windows10": + result = WINDOWS10_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "linux": + result = LINUX_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONPLATFORMS + default: + return 0, errors.New("Unknown DeviceManagementConfigurationPlatforms value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationPlatforms(values []DeviceManagementConfigurationPlatforms) []string { + 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/device_management_configuration_policy.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy.go new file mode 100644 index 000000000..e91076fbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy.go @@ -0,0 +1,415 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicy device Management Configuration Policy +type DeviceManagementConfigurationPolicy struct { + Entity + // Policy assignments + assignments []DeviceManagementConfigurationPolicyAssignmentable + // Policy creation date and time + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Policy creation source + creationSource *string + // Policy description + description *string + // Policy assignment status. This property is read-only. + isAssigned *bool + // Policy last modification date and time + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Policy name + name *string + // Supported platform types. + platforms *DeviceManagementConfigurationPlatforms + // Indicates the priority of each policies that are selected by the admin during enrollment process + priorityMetaData DeviceManagementPriorityMetaDataable + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Number of settings + settingCount *int32 + // Policy settings + settings []DeviceManagementConfigurationSettingable + // Describes which technology this setting can be deployed with + technologies *DeviceManagementConfigurationTechnologies + // Template reference information + templateReference DeviceManagementConfigurationPolicyTemplateReferenceable +} +// NewDeviceManagementConfigurationPolicy instantiates a new deviceManagementConfigurationPolicy and sets the default values. +func NewDeviceManagementConfigurationPolicy()(*DeviceManagementConfigurationPolicy) { + m := &DeviceManagementConfigurationPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicy(), nil +} +// GetAssignments gets the assignments property value. Policy assignments +func (m *DeviceManagementConfigurationPolicy) GetAssignments()([]DeviceManagementConfigurationPolicyAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. Policy creation date and time +func (m *DeviceManagementConfigurationPolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationSource gets the creationSource property value. Policy creation source +func (m *DeviceManagementConfigurationPolicy) GetCreationSource()(*string) { + return m.creationSource +} +// GetDescription gets the description property value. Policy description +func (m *DeviceManagementConfigurationPolicy) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationSource(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isAssigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAssigned(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationPlatforms) + if err != nil { + return err + } + if val != nil { + m.SetPlatforms(val.(*DeviceManagementConfigurationPlatforms)) + } + return nil + } + res["priorityMetaData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementPriorityMetaDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPriorityMetaData(val.(DeviceManagementPriorityMetaDataable)) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["settingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingCount(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingable) + } + m.SetSettings(res) + } + return nil + } + res["technologies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTechnologies) + if err != nil { + return err + } + if val != nil { + m.SetTechnologies(val.(*DeviceManagementConfigurationTechnologies)) + } + return nil + } + res["templateReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationPolicyTemplateReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTemplateReference(val.(DeviceManagementConfigurationPolicyTemplateReferenceable)) + } + return nil + } + return res +} +// GetIsAssigned gets the isAssigned property value. Policy assignment status. This property is read-only. +func (m *DeviceManagementConfigurationPolicy) GetIsAssigned()(*bool) { + return m.isAssigned +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Policy last modification date and time +func (m *DeviceManagementConfigurationPolicy) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. Policy name +func (m *DeviceManagementConfigurationPolicy) GetName()(*string) { + return m.name +} +// GetPlatforms gets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationPolicy) GetPlatforms()(*DeviceManagementConfigurationPlatforms) { + return m.platforms +} +// GetPriorityMetaData gets the priorityMetaData property value. Indicates the priority of each policies that are selected by the admin during enrollment process +func (m *DeviceManagementConfigurationPolicy) GetPriorityMetaData()(DeviceManagementPriorityMetaDataable) { + return m.priorityMetaData +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementConfigurationPolicy) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSettingCount gets the settingCount property value. Number of settings +func (m *DeviceManagementConfigurationPolicy) GetSettingCount()(*int32) { + return m.settingCount +} +// GetSettings gets the settings property value. Policy settings +func (m *DeviceManagementConfigurationPolicy) GetSettings()([]DeviceManagementConfigurationSettingable) { + return m.settings +} +// GetTechnologies gets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationPolicy) GetTechnologies()(*DeviceManagementConfigurationTechnologies) { + return m.technologies +} +// GetTemplateReference gets the templateReference property value. Template reference information +func (m *DeviceManagementConfigurationPolicy) GetTemplateReference()(DeviceManagementConfigurationPolicyTemplateReferenceable) { + return m.templateReference +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("creationSource", m.GetCreationSource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + cast := (*m.GetPlatforms()).String() + err = writer.WriteStringValue("platforms", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("priorityMetaData", m.GetPriorityMetaData()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("settingCount", m.GetSettingCount()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + if m.GetTechnologies() != nil { + cast := (*m.GetTechnologies()).String() + err = writer.WriteStringValue("technologies", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("templateReference", m.GetTemplateReference()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. Policy assignments +func (m *DeviceManagementConfigurationPolicy) SetAssignments(value []DeviceManagementConfigurationPolicyAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Policy creation date and time +func (m *DeviceManagementConfigurationPolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationSource sets the creationSource property value. Policy creation source +func (m *DeviceManagementConfigurationPolicy) SetCreationSource(value *string)() { + m.creationSource = value +} +// SetDescription sets the description property value. Policy description +func (m *DeviceManagementConfigurationPolicy) SetDescription(value *string)() { + m.description = value +} +// SetIsAssigned sets the isAssigned property value. Policy assignment status. This property is read-only. +func (m *DeviceManagementConfigurationPolicy) SetIsAssigned(value *bool)() { + m.isAssigned = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Policy last modification date and time +func (m *DeviceManagementConfigurationPolicy) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. Policy name +func (m *DeviceManagementConfigurationPolicy) SetName(value *string)() { + m.name = value +} +// SetPlatforms sets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationPolicy) SetPlatforms(value *DeviceManagementConfigurationPlatforms)() { + m.platforms = value +} +// SetPriorityMetaData sets the priorityMetaData property value. Indicates the priority of each policies that are selected by the admin during enrollment process +func (m *DeviceManagementConfigurationPolicy) SetPriorityMetaData(value DeviceManagementPriorityMetaDataable)() { + m.priorityMetaData = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementConfigurationPolicy) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSettingCount sets the settingCount property value. Number of settings +func (m *DeviceManagementConfigurationPolicy) SetSettingCount(value *int32)() { + m.settingCount = value +} +// SetSettings sets the settings property value. Policy settings +func (m *DeviceManagementConfigurationPolicy) SetSettings(value []DeviceManagementConfigurationSettingable)() { + m.settings = value +} +// SetTechnologies sets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationPolicy) SetTechnologies(value *DeviceManagementConfigurationTechnologies)() { + m.technologies = value +} +// SetTemplateReference sets the templateReference property value. Template reference information +func (m *DeviceManagementConfigurationPolicy) SetTemplateReference(value DeviceManagementConfigurationPolicyTemplateReferenceable)() { + m.templateReference = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment.go new file mode 100644 index 000000000..389b34977 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyAssignment the DeviceManagementConfigurationPolicyAssignment entity assigns a specific DeviceManagementConfigurationPolicy to an AAD group. +type DeviceManagementConfigurationPolicyAssignment struct { + Entity + // Represents source of assignment. + source *DeviceAndAppManagementAssignmentSource + // The identifier of the source of the assignment. + sourceId *string + // The assignment target for the DeviceManagementConfigurationPolicy. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceManagementConfigurationPolicyAssignment instantiates a new deviceManagementConfigurationPolicyAssignment and sets the default values. +func NewDeviceManagementConfigurationPolicyAssignment()(*DeviceManagementConfigurationPolicyAssignment) { + m := &DeviceManagementConfigurationPolicyAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*DeviceAndAppManagementAssignmentSource)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetSource gets the source property value. Represents source of assignment. +func (m *DeviceManagementConfigurationPolicyAssignment) GetSource()(*DeviceAndAppManagementAssignmentSource) { + return m.source +} +// GetSourceId gets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceManagementConfigurationPolicyAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. The assignment target for the DeviceManagementConfigurationPolicy. +func (m *DeviceManagementConfigurationPolicyAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetSource sets the source property value. Represents source of assignment. +func (m *DeviceManagementConfigurationPolicyAssignment) SetSource(value *DeviceAndAppManagementAssignmentSource)() { + m.source = value +} +// SetSourceId sets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceManagementConfigurationPolicyAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. The assignment target for the DeviceManagementConfigurationPolicy. +func (m *DeviceManagementConfigurationPolicyAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_response.go new file mode 100644 index 000000000..33528e180 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyAssignmentCollectionResponse +type DeviceManagementConfigurationPolicyAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationPolicyAssignmentable +} +// NewDeviceManagementConfigurationPolicyAssignmentCollectionResponse instantiates a new DeviceManagementConfigurationPolicyAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationPolicyAssignmentCollectionResponse()(*DeviceManagementConfigurationPolicyAssignmentCollectionResponse) { + m := &DeviceManagementConfigurationPolicyAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyAssignmentCollectionResponse) GetValue()([]DeviceManagementConfigurationPolicyAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyAssignmentCollectionResponse) SetValue(value []DeviceManagementConfigurationPolicyAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_responseable.go new file mode 100644 index 000000000..71692a2d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyAssignmentCollectionResponseable +type DeviceManagementConfigurationPolicyAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationPolicyAssignmentable) + SetValue(value []DeviceManagementConfigurationPolicyAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignmentable.go new file mode 100644 index 000000000..ed181ccae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyAssignmentable +type DeviceManagementConfigurationPolicyAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSource()(*DeviceAndAppManagementAssignmentSource) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetSource(value *DeviceAndAppManagementAssignmentSource)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_response.go new file mode 100644 index 000000000..e8a4b24a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyCollectionResponse +type DeviceManagementConfigurationPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationPolicyable +} +// NewDeviceManagementConfigurationPolicyCollectionResponse instantiates a new DeviceManagementConfigurationPolicyCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationPolicyCollectionResponse()(*DeviceManagementConfigurationPolicyCollectionResponse) { + m := &DeviceManagementConfigurationPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyCollectionResponse) GetValue()([]DeviceManagementConfigurationPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyCollectionResponse) SetValue(value []DeviceManagementConfigurationPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_responseable.go new file mode 100644 index 000000000..259d70cd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyCollectionResponseable +type DeviceManagementConfigurationPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationPolicyable) + SetValue(value []DeviceManagementConfigurationPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item.go new file mode 100644 index 000000000..8331f7929 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyPolicySetItem +type DeviceManagementConfigurationPolicyPolicySetItem struct { + PolicySetItem +} +// NewDeviceManagementConfigurationPolicyPolicySetItem instantiates a new DeviceManagementConfigurationPolicyPolicySetItem and sets the default values. +func NewDeviceManagementConfigurationPolicyPolicySetItem()(*DeviceManagementConfigurationPolicyPolicySetItem) { + m := &DeviceManagementConfigurationPolicyPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationPolicyPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationPolicyPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_response.go new file mode 100644 index 000000000..7b0539c66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse +type DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationPolicyPolicySetItemable +} +// NewDeviceManagementConfigurationPolicyPolicySetItemCollectionResponse instantiates a new DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationPolicyPolicySetItemCollectionResponse()(*DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse) { + m := &DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse) GetValue()([]DeviceManagementConfigurationPolicyPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyPolicySetItemCollectionResponse) SetValue(value []DeviceManagementConfigurationPolicyPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..1f8c5202b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyPolicySetItemCollectionResponseable +type DeviceManagementConfigurationPolicyPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationPolicyPolicySetItemable) + SetValue(value []DeviceManagementConfigurationPolicyPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_itemable.go new file mode 100644 index 000000000..153b1b1c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyPolicySetItemable +type DeviceManagementConfigurationPolicyPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template.go new file mode 100644 index 000000000..5e014f8be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template.go @@ -0,0 +1,346 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplate device Management Configuration Policy Template +type DeviceManagementConfigurationPolicyTemplate struct { + Entity + // Allow unmanaged setting templates + allowUnmanagedSettings *bool + // Template base identifier + baseId *string + // Template description + description *string + // Template display name + displayName *string + // Description of template version + displayVersion *string + // Describes current lifecycle state of a template + lifecycleState *DeviceManagementTemplateLifecycleState + // Supported platform types. + platforms *DeviceManagementConfigurationPlatforms + // Number of setting templates. Valid values 0 to 2147483647. This property is read-only. + settingTemplateCount *int32 + // Setting templates + settingTemplates []DeviceManagementConfigurationSettingTemplateable + // Describes which technology this setting can be deployed with + technologies *DeviceManagementConfigurationTechnologies + // Describes the TemplateFamily for the Template entity + templateFamily *DeviceManagementConfigurationTemplateFamily + // Template version. Valid values 1 to 2147483647. This property is read-only. + version *int32 +} +// NewDeviceManagementConfigurationPolicyTemplate instantiates a new deviceManagementConfigurationPolicyTemplate and sets the default values. +func NewDeviceManagementConfigurationPolicyTemplate()(*DeviceManagementConfigurationPolicyTemplate) { + m := &DeviceManagementConfigurationPolicyTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyTemplate(), nil +} +// GetAllowUnmanagedSettings gets the allowUnmanagedSettings property value. Allow unmanaged setting templates +func (m *DeviceManagementConfigurationPolicyTemplate) GetAllowUnmanagedSettings()(*bool) { + return m.allowUnmanagedSettings +} +// GetBaseId gets the baseId property value. Template base identifier +func (m *DeviceManagementConfigurationPolicyTemplate) GetBaseId()(*string) { + return m.baseId +} +// GetDescription gets the description property value. Template description +func (m *DeviceManagementConfigurationPolicyTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Template display name +func (m *DeviceManagementConfigurationPolicyTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetDisplayVersion gets the displayVersion property value. Description of template version +func (m *DeviceManagementConfigurationPolicyTemplate) GetDisplayVersion()(*string) { + return m.displayVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowUnmanagedSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUnmanagedSettings(val) + } + return nil + } + res["baseId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseId(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["displayVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayVersion(val) + } + return nil + } + res["lifecycleState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementTemplateLifecycleState) + if err != nil { + return err + } + if val != nil { + m.SetLifecycleState(val.(*DeviceManagementTemplateLifecycleState)) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationPlatforms) + if err != nil { + return err + } + if val != nil { + m.SetPlatforms(val.(*DeviceManagementConfigurationPlatforms)) + } + return nil + } + res["settingTemplateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingTemplateCount(val) + } + return nil + } + res["settingTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingTemplateable) + } + m.SetSettingTemplates(res) + } + return nil + } + res["technologies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTechnologies) + if err != nil { + return err + } + if val != nil { + m.SetTechnologies(val.(*DeviceManagementConfigurationTechnologies)) + } + return nil + } + res["templateFamily"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTemplateFamily) + if err != nil { + return err + } + if val != nil { + m.SetTemplateFamily(val.(*DeviceManagementConfigurationTemplateFamily)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLifecycleState gets the lifecycleState property value. Describes current lifecycle state of a template +func (m *DeviceManagementConfigurationPolicyTemplate) GetLifecycleState()(*DeviceManagementTemplateLifecycleState) { + return m.lifecycleState +} +// GetPlatforms gets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationPolicyTemplate) GetPlatforms()(*DeviceManagementConfigurationPlatforms) { + return m.platforms +} +// GetSettingTemplateCount gets the settingTemplateCount property value. Number of setting templates. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplate) GetSettingTemplateCount()(*int32) { + return m.settingTemplateCount +} +// GetSettingTemplates gets the settingTemplates property value. Setting templates +func (m *DeviceManagementConfigurationPolicyTemplate) GetSettingTemplates()([]DeviceManagementConfigurationSettingTemplateable) { + return m.settingTemplates +} +// GetTechnologies gets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationPolicyTemplate) GetTechnologies()(*DeviceManagementConfigurationTechnologies) { + return m.technologies +} +// GetTemplateFamily gets the templateFamily property value. Describes the TemplateFamily for the Template entity +func (m *DeviceManagementConfigurationPolicyTemplate) GetTemplateFamily()(*DeviceManagementConfigurationTemplateFamily) { + return m.templateFamily +} +// GetVersion gets the version property value. Template version. Valid values 1 to 2147483647. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplate) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowUnmanagedSettings", m.GetAllowUnmanagedSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("baseId", m.GetBaseId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayVersion", m.GetDisplayVersion()) + if err != nil { + return err + } + } + if m.GetLifecycleState() != nil { + cast := (*m.GetLifecycleState()).String() + err = writer.WriteStringValue("lifecycleState", &cast) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + cast := (*m.GetPlatforms()).String() + err = writer.WriteStringValue("platforms", &cast) + if err != nil { + return err + } + } + if m.GetSettingTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingTemplates())) + for i, v := range m.GetSettingTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingTemplates", cast) + if err != nil { + return err + } + } + if m.GetTechnologies() != nil { + cast := (*m.GetTechnologies()).String() + err = writer.WriteStringValue("technologies", &cast) + if err != nil { + return err + } + } + if m.GetTemplateFamily() != nil { + cast := (*m.GetTemplateFamily()).String() + err = writer.WriteStringValue("templateFamily", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowUnmanagedSettings sets the allowUnmanagedSettings property value. Allow unmanaged setting templates +func (m *DeviceManagementConfigurationPolicyTemplate) SetAllowUnmanagedSettings(value *bool)() { + m.allowUnmanagedSettings = value +} +// SetBaseId sets the baseId property value. Template base identifier +func (m *DeviceManagementConfigurationPolicyTemplate) SetBaseId(value *string)() { + m.baseId = value +} +// SetDescription sets the description property value. Template description +func (m *DeviceManagementConfigurationPolicyTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Template display name +func (m *DeviceManagementConfigurationPolicyTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDisplayVersion sets the displayVersion property value. Description of template version +func (m *DeviceManagementConfigurationPolicyTemplate) SetDisplayVersion(value *string)() { + m.displayVersion = value +} +// SetLifecycleState sets the lifecycleState property value. Describes current lifecycle state of a template +func (m *DeviceManagementConfigurationPolicyTemplate) SetLifecycleState(value *DeviceManagementTemplateLifecycleState)() { + m.lifecycleState = value +} +// SetPlatforms sets the platforms property value. Supported platform types. +func (m *DeviceManagementConfigurationPolicyTemplate) SetPlatforms(value *DeviceManagementConfigurationPlatforms)() { + m.platforms = value +} +// SetSettingTemplateCount sets the settingTemplateCount property value. Number of setting templates. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplate) SetSettingTemplateCount(value *int32)() { + m.settingTemplateCount = value +} +// SetSettingTemplates sets the settingTemplates property value. Setting templates +func (m *DeviceManagementConfigurationPolicyTemplate) SetSettingTemplates(value []DeviceManagementConfigurationSettingTemplateable)() { + m.settingTemplates = value +} +// SetTechnologies sets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationPolicyTemplate) SetTechnologies(value *DeviceManagementConfigurationTechnologies)() { + m.technologies = value +} +// SetTemplateFamily sets the templateFamily property value. Describes the TemplateFamily for the Template entity +func (m *DeviceManagementConfigurationPolicyTemplate) SetTemplateFamily(value *DeviceManagementConfigurationTemplateFamily)() { + m.templateFamily = value +} +// SetVersion sets the version property value. Template version. Valid values 1 to 2147483647. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplate) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_response.go new file mode 100644 index 000000000..5cee3aba3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplateCollectionResponse +type DeviceManagementConfigurationPolicyTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationPolicyTemplateable +} +// NewDeviceManagementConfigurationPolicyTemplateCollectionResponse instantiates a new DeviceManagementConfigurationPolicyTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationPolicyTemplateCollectionResponse()(*DeviceManagementConfigurationPolicyTemplateCollectionResponse) { + m := &DeviceManagementConfigurationPolicyTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationPolicyTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationPolicyTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationPolicyTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationPolicyTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_responseable.go new file mode 100644 index 000000000..133705e6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplateCollectionResponseable +type DeviceManagementConfigurationPolicyTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationPolicyTemplateable) + SetValue(value []DeviceManagementConfigurationPolicyTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_reference.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_reference.go new file mode 100644 index 000000000..f1c05b22e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_reference.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplateReference policy template reference information +type DeviceManagementConfigurationPolicyTemplateReference 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 OdataType property + odataType *string + // Template Display Name of the referenced template. This property is read-only. + templateDisplayName *string + // Template Display Version of the referenced Template. This property is read-only. + templateDisplayVersion *string + // Describes the TemplateFamily for the Template entity + templateFamily *DeviceManagementConfigurationTemplateFamily + // Template id + templateId *string +} +// NewDeviceManagementConfigurationPolicyTemplateReference instantiates a new deviceManagementConfigurationPolicyTemplateReference and sets the default values. +func NewDeviceManagementConfigurationPolicyTemplateReference()(*DeviceManagementConfigurationPolicyTemplateReference) { + m := &DeviceManagementConfigurationPolicyTemplateReference{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationPolicyTemplateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationPolicyTemplateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationPolicyTemplateReference(), 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 *DeviceManagementConfigurationPolicyTemplateReference) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["templateDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateDisplayName(val) + } + return nil + } + res["templateDisplayVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateDisplayVersion(val) + } + return nil + } + res["templateFamily"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTemplateFamily) + if err != nil { + return err + } + if val != nil { + m.SetTemplateFamily(val.(*DeviceManagementConfigurationTemplateFamily)) + } + return nil + } + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetOdataType()(*string) { + return m.odataType +} +// GetTemplateDisplayName gets the templateDisplayName property value. Template Display Name of the referenced template. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetTemplateDisplayName()(*string) { + return m.templateDisplayName +} +// GetTemplateDisplayVersion gets the templateDisplayVersion property value. Template Display Version of the referenced Template. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetTemplateDisplayVersion()(*string) { + return m.templateDisplayVersion +} +// GetTemplateFamily gets the templateFamily property value. Describes the TemplateFamily for the Template entity +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetTemplateFamily()(*DeviceManagementConfigurationTemplateFamily) { + return m.templateFamily +} +// GetTemplateId gets the templateId property value. Template id +func (m *DeviceManagementConfigurationPolicyTemplateReference) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationPolicyTemplateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTemplateFamily() != nil { + cast := (*m.GetTemplateFamily()).String() + err := writer.WriteStringValue("templateFamily", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("templateId", m.GetTemplateId()) + 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 *DeviceManagementConfigurationPolicyTemplateReference) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationPolicyTemplateReference) SetOdataType(value *string)() { + m.odataType = value +} +// SetTemplateDisplayName sets the templateDisplayName property value. Template Display Name of the referenced template. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplateReference) SetTemplateDisplayName(value *string)() { + m.templateDisplayName = value +} +// SetTemplateDisplayVersion sets the templateDisplayVersion property value. Template Display Version of the referenced Template. This property is read-only. +func (m *DeviceManagementConfigurationPolicyTemplateReference) SetTemplateDisplayVersion(value *string)() { + m.templateDisplayVersion = value +} +// SetTemplateFamily sets the templateFamily property value. Describes the TemplateFamily for the Template entity +func (m *DeviceManagementConfigurationPolicyTemplateReference) SetTemplateFamily(value *DeviceManagementConfigurationTemplateFamily)() { + m.templateFamily = value +} +// SetTemplateId sets the templateId property value. Template id +func (m *DeviceManagementConfigurationPolicyTemplateReference) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_referenceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_referenceable.go new file mode 100644 index 000000000..18de51673 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_template_referenceable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplateReferenceable +type DeviceManagementConfigurationPolicyTemplateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTemplateDisplayName()(*string) + GetTemplateDisplayVersion()(*string) + GetTemplateFamily()(*DeviceManagementConfigurationTemplateFamily) + GetTemplateId()(*string) + SetOdataType(value *string)() + SetTemplateDisplayName(value *string)() + SetTemplateDisplayVersion(value *string)() + SetTemplateFamily(value *DeviceManagementConfigurationTemplateFamily)() + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_templateable.go new file mode 100644 index 000000000..552e9ef28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policy_templateable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyTemplateable +type DeviceManagementConfigurationPolicyTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowUnmanagedSettings()(*bool) + GetBaseId()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetDisplayVersion()(*string) + GetLifecycleState()(*DeviceManagementTemplateLifecycleState) + GetPlatforms()(*DeviceManagementConfigurationPlatforms) + GetSettingTemplateCount()(*int32) + GetSettingTemplates()([]DeviceManagementConfigurationSettingTemplateable) + GetTechnologies()(*DeviceManagementConfigurationTechnologies) + GetTemplateFamily()(*DeviceManagementConfigurationTemplateFamily) + GetVersion()(*int32) + SetAllowUnmanagedSettings(value *bool)() + SetBaseId(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDisplayVersion(value *string)() + SetLifecycleState(value *DeviceManagementTemplateLifecycleState)() + SetPlatforms(value *DeviceManagementConfigurationPlatforms)() + SetSettingTemplateCount(value *int32)() + SetSettingTemplates(value []DeviceManagementConfigurationSettingTemplateable)() + SetTechnologies(value *DeviceManagementConfigurationTechnologies)() + SetTemplateFamily(value *DeviceManagementConfigurationTemplateFamily)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_policyable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_policyable.go new file mode 100644 index 000000000..097c76306 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_policyable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationPolicyable +type DeviceManagementConfigurationPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementConfigurationPolicyAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationSource()(*string) + GetDescription()(*string) + GetIsAssigned()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetPlatforms()(*DeviceManagementConfigurationPlatforms) + GetPriorityMetaData()(DeviceManagementPriorityMetaDataable) + GetRoleScopeTagIds()([]string) + GetSettingCount()(*int32) + GetSettings()([]DeviceManagementConfigurationSettingable) + GetTechnologies()(*DeviceManagementConfigurationTechnologies) + GetTemplateReference()(DeviceManagementConfigurationPolicyTemplateReferenceable) + SetAssignments(value []DeviceManagementConfigurationPolicyAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationSource(value *string)() + SetDescription(value *string)() + SetIsAssigned(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetPlatforms(value *DeviceManagementConfigurationPlatforms)() + SetPriorityMetaData(value DeviceManagementPriorityMetaDataable)() + SetRoleScopeTagIds(value []string)() + SetSettingCount(value *int32)() + SetSettings(value []DeviceManagementConfigurationSettingable)() + SetTechnologies(value *DeviceManagementConfigurationTechnologies)() + SetTemplateReference(value DeviceManagementConfigurationPolicyTemplateReferenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition.go new file mode 100644 index 000000000..8f8fd1c16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationRedirectSettingDefinition +type DeviceManagementConfigurationRedirectSettingDefinition struct { + DeviceManagementConfigurationSettingDefinition + // A deep link that points to the specific location in the Intune console where feature support must be managed from. + deepLink *string + // A message that explains that clicking the link will redirect the user to a supported page to manage the settings. + redirectMessage *string + // Indicates the reason for redirecting the user to an alternative location in the console. For example: WiFi profiles are not supported in the settings catalog and must be created with a template policy. + redirectReason *string +} +// NewDeviceManagementConfigurationRedirectSettingDefinition instantiates a new DeviceManagementConfigurationRedirectSettingDefinition and sets the default values. +func NewDeviceManagementConfigurationRedirectSettingDefinition()(*DeviceManagementConfigurationRedirectSettingDefinition) { + m := &DeviceManagementConfigurationRedirectSettingDefinition{ + DeviceManagementConfigurationSettingDefinition: *NewDeviceManagementConfigurationSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationRedirectSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationRedirectSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationRedirectSettingDefinition(), nil +} +// GetDeepLink gets the deepLink property value. A deep link that points to the specific location in the Intune console where feature support must be managed from. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) GetDeepLink()(*string) { + return m.deepLink +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationRedirectSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingDefinition.GetFieldDeserializers() + res["deepLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeepLink(val) + } + return nil + } + res["redirectMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedirectMessage(val) + } + return nil + } + res["redirectReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedirectReason(val) + } + return nil + } + return res +} +// GetRedirectMessage gets the redirectMessage property value. A message that explains that clicking the link will redirect the user to a supported page to manage the settings. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) GetRedirectMessage()(*string) { + return m.redirectMessage +} +// GetRedirectReason gets the redirectReason property value. Indicates the reason for redirecting the user to an alternative location in the console. For example: WiFi profiles are not supported in the settings catalog and must be created with a template policy. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) GetRedirectReason()(*string) { + return m.redirectReason +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationRedirectSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deepLink", m.GetDeepLink()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("redirectMessage", m.GetRedirectMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("redirectReason", m.GetRedirectReason()) + if err != nil { + return err + } + } + return nil +} +// SetDeepLink sets the deepLink property value. A deep link that points to the specific location in the Intune console where feature support must be managed from. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) SetDeepLink(value *string)() { + m.deepLink = value +} +// SetRedirectMessage sets the redirectMessage property value. A message that explains that clicking the link will redirect the user to a supported page to manage the settings. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) SetRedirectMessage(value *string)() { + m.redirectMessage = value +} +// SetRedirectReason sets the redirectReason property value. Indicates the reason for redirecting the user to an alternative location in the console. For example: WiFi profiles are not supported in the settings catalog and must be created with a template policy. +func (m *DeviceManagementConfigurationRedirectSettingDefinition) SetRedirectReason(value *string)() { + m.redirectReason = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_response.go new file mode 100644 index 000000000..15e594f9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse +type DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationRedirectSettingDefinitionable +} +// NewDeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse()(*DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationRedirectSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationRedirectSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationRedirectSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationRedirectSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationRedirectSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationRedirectSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationRedirectSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_responseable.go new file mode 100644 index 000000000..e9e24b4e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponseable +type DeviceManagementConfigurationRedirectSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationRedirectSettingDefinitionable) + SetValue(value []DeviceManagementConfigurationRedirectSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definitionable.go new file mode 100644 index 000000000..8f53b26d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_redirect_setting_definitionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationRedirectSettingDefinitionable +type DeviceManagementConfigurationRedirectSettingDefinitionable interface { + DeviceManagementConfigurationSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeepLink()(*string) + GetRedirectMessage()(*string) + GetRedirectReason()(*string) + SetDeepLink(value *string)() + SetRedirectMessage(value *string)() + SetRedirectReason(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_value.go new file mode 100644 index 000000000..556a25d7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_value.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferenceSettingValue +type DeviceManagementConfigurationReferenceSettingValue struct { + DeviceManagementConfigurationStringSettingValue + // A note that admin can use to put some contextual information + note *string +} +// NewDeviceManagementConfigurationReferenceSettingValue instantiates a new DeviceManagementConfigurationReferenceSettingValue and sets the default values. +func NewDeviceManagementConfigurationReferenceSettingValue()(*DeviceManagementConfigurationReferenceSettingValue) { + m := &DeviceManagementConfigurationReferenceSettingValue{ + DeviceManagementConfigurationStringSettingValue: *NewDeviceManagementConfigurationStringSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationReferenceSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationReferenceSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationReferenceSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationReferenceSettingValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationReferenceSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationStringSettingValue.GetFieldDeserializers() + res["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(val) + } + return nil + } + return res +} +// GetNote gets the note property value. A note that admin can use to put some contextual information +func (m *DeviceManagementConfigurationReferenceSettingValue) GetNote()(*string) { + return m.note +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationReferenceSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationStringSettingValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("note", m.GetNote()) + if err != nil { + return err + } + } + return nil +} +// SetNote sets the note property value. A note that admin can use to put some contextual information +func (m *DeviceManagementConfigurationReferenceSettingValue) SetNote(value *string)() { + m.note = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_valueable.go new file mode 100644 index 000000000..3f7c18897 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_reference_setting_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferenceSettingValueable +type DeviceManagementConfigurationReferenceSettingValueable interface { + DeviceManagementConfigurationStringSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNote()(*string) + SetNote(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information.go new file mode 100644 index 000000000..158a88222 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferredSettingInformation referred setting information about reusable setting +type DeviceManagementConfigurationReferredSettingInformation 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 OdataType property + odataType *string + // Setting definition id that is being referred to a setting. Applicable for reusable setting + settingDefinitionId *string +} +// NewDeviceManagementConfigurationReferredSettingInformation instantiates a new deviceManagementConfigurationReferredSettingInformation and sets the default values. +func NewDeviceManagementConfigurationReferredSettingInformation()(*DeviceManagementConfigurationReferredSettingInformation) { + m := &DeviceManagementConfigurationReferredSettingInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationReferredSettingInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationReferredSettingInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationReferredSettingInformation(), 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 *DeviceManagementConfigurationReferredSettingInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationReferredSettingInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDefinitionId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationReferredSettingInformation) GetOdataType()(*string) { + return m.odataType +} +// GetSettingDefinitionId gets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting +func (m *DeviceManagementConfigurationReferredSettingInformation) GetSettingDefinitionId()(*string) { + return m.settingDefinitionId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationReferredSettingInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingDefinitionId", m.GetSettingDefinitionId()) + 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 *DeviceManagementConfigurationReferredSettingInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationReferredSettingInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingDefinitionId sets the settingDefinitionId property value. Setting definition id that is being referred to a setting. Applicable for reusable setting +func (m *DeviceManagementConfigurationReferredSettingInformation) SetSettingDefinitionId(value *string)() { + m.settingDefinitionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_response.go new file mode 100644 index 000000000..b9aed1688 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferredSettingInformationCollectionResponse +type DeviceManagementConfigurationReferredSettingInformationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationReferredSettingInformationable +} +// NewDeviceManagementConfigurationReferredSettingInformationCollectionResponse instantiates a new DeviceManagementConfigurationReferredSettingInformationCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationReferredSettingInformationCollectionResponse()(*DeviceManagementConfigurationReferredSettingInformationCollectionResponse) { + m := &DeviceManagementConfigurationReferredSettingInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationReferredSettingInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationReferredSettingInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationReferredSettingInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationReferredSettingInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationReferredSettingInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationReferredSettingInformationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationReferredSettingInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationReferredSettingInformationCollectionResponse) GetValue()([]DeviceManagementConfigurationReferredSettingInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationReferredSettingInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationReferredSettingInformationCollectionResponse) SetValue(value []DeviceManagementConfigurationReferredSettingInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_responseable.go new file mode 100644 index 000000000..a02bf85e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_information_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferredSettingInformationCollectionResponseable +type DeviceManagementConfigurationReferredSettingInformationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationReferredSettingInformationable) + SetValue(value []DeviceManagementConfigurationReferredSettingInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_informationable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_informationable.go new file mode 100644 index 000000000..fd5cf1dd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_referred_setting_informationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationReferredSettingInformationable +type DeviceManagementConfigurationReferredSettingInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingDefinitionId()(*string) + SetOdataType(value *string)() + SetSettingDefinitionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value.go new file mode 100644 index 000000000..bd7b3a5f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSecretSettingValue +type DeviceManagementConfigurationSecretSettingValue struct { + DeviceManagementConfigurationSimpleSettingValue + // Value of the secret setting. + value *string + // type tracking the encryption state of a secret setting value + valueState *DeviceManagementConfigurationSecretSettingValueState +} +// NewDeviceManagementConfigurationSecretSettingValue instantiates a new DeviceManagementConfigurationSecretSettingValue and sets the default values. +func NewDeviceManagementConfigurationSecretSettingValue()(*DeviceManagementConfigurationSecretSettingValue) { + m := &DeviceManagementConfigurationSecretSettingValue{ + DeviceManagementConfigurationSimpleSettingValue: *NewDeviceManagementConfigurationSimpleSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSecretSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSecretSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSecretSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSecretSettingValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSecretSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + res["valueState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationSecretSettingValueState) + if err != nil { + return err + } + if val != nil { + m.SetValueState(val.(*DeviceManagementConfigurationSecretSettingValueState)) + } + return nil + } + return res +} +// GetValue gets the value property value. Value of the secret setting. +func (m *DeviceManagementConfigurationSecretSettingValue) GetValue()(*string) { + return m.value +} +// GetValueState gets the valueState property value. type tracking the encryption state of a secret setting value +func (m *DeviceManagementConfigurationSecretSettingValue) GetValueState()(*DeviceManagementConfigurationSecretSettingValueState) { + return m.valueState +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSecretSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + if m.GetValueState() != nil { + cast := (*m.GetValueState()).String() + err = writer.WriteStringValue("valueState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value of the secret setting. +func (m *DeviceManagementConfigurationSecretSettingValue) SetValue(value *string)() { + m.value = value +} +// SetValueState sets the valueState property value. type tracking the encryption state of a secret setting value +func (m *DeviceManagementConfigurationSecretSettingValue) SetValueState(value *DeviceManagementConfigurationSecretSettingValueState)() { + m.valueState = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value_state.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value_state.go new file mode 100644 index 000000000..ee2858d8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_value_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationSecretSettingValueState int + +const ( + // default invalid value + INVALID_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE DeviceManagementConfigurationSecretSettingValueState = iota + // secret value is not encrypted + NOTENCRYPTED_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE + // a token for the encrypted value is returned by the service + ENCRYPTEDVALUETOKEN_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE +) + +func (i DeviceManagementConfigurationSecretSettingValueState) String() string { + return []string{"invalid", "notEncrypted", "encryptedValueToken"}[i] +} +func ParseDeviceManagementConfigurationSecretSettingValueState(v string) (interface{}, error) { + result := INVALID_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE + switch v { + case "invalid": + result = INVALID_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE + case "notEncrypted": + result = NOTENCRYPTED_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE + case "encryptedValueToken": + result = ENCRYPTEDVALUETOKEN_DEVICEMANAGEMENTCONFIGURATIONSECRETSETTINGVALUESTATE + default: + return 0, errors.New("Unknown DeviceManagementConfigurationSecretSettingValueState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationSecretSettingValueState(values []DeviceManagementConfigurationSecretSettingValueState) []string { + 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/device_management_configuration_secret_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_valueable.go new file mode 100644 index 000000000..26d274ab1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_secret_setting_valueable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSecretSettingValueable +type DeviceManagementConfigurationSecretSettingValueable interface { + DeviceManagementConfigurationSimpleSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + GetValueState()(*DeviceManagementConfigurationSecretSettingValueState) + SetValue(value *string)() + SetValueState(value *DeviceManagementConfigurationSecretSettingValueState)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting.go new file mode 100644 index 000000000..0194d8ad5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSetting setting instance within policy +type DeviceManagementConfigurationSetting struct { + Entity + // List of related Setting Definitions. This property is read-only. + settingDefinitions []DeviceManagementConfigurationSettingDefinitionable + // Setting instance within policy + settingInstance DeviceManagementConfigurationSettingInstanceable +} +// NewDeviceManagementConfigurationSetting instantiates a new deviceManagementConfigurationSetting and sets the default values. +func NewDeviceManagementConfigurationSetting()(*DeviceManagementConfigurationSetting) { + m := &DeviceManagementConfigurationSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSetting(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["settingDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetSettingDefinitions(res) + } + return nil + } + res["settingInstance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettingInstance(val.(DeviceManagementConfigurationSettingInstanceable)) + } + return nil + } + return res +} +// GetSettingDefinitions gets the settingDefinitions property value. List of related Setting Definitions. This property is read-only. +func (m *DeviceManagementConfigurationSetting) GetSettingDefinitions()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.settingDefinitions +} +// GetSettingInstance gets the settingInstance property value. Setting instance within policy +func (m *DeviceManagementConfigurationSetting) GetSettingInstance()(DeviceManagementConfigurationSettingInstanceable) { + return m.settingInstance +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSettingDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingDefinitions())) + for i, v := range m.GetSettingDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingDefinitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settingInstance", m.GetSettingInstance()) + if err != nil { + return err + } + } + return nil +} +// SetSettingDefinitions sets the settingDefinitions property value. List of related Setting Definitions. This property is read-only. +func (m *DeviceManagementConfigurationSetting) SetSettingDefinitions(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.settingDefinitions = value +} +// SetSettingInstance sets the settingInstance property value. Setting instance within policy +func (m *DeviceManagementConfigurationSetting) SetSettingInstance(value DeviceManagementConfigurationSettingInstanceable)() { + m.settingInstance = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_access_types.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_access_types.go new file mode 100644 index 000000000..4fb79ae9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_access_types.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationSettingAccessTypes int + +const ( + NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES DeviceManagementConfigurationSettingAccessTypes = iota + ADD_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + COPY_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + DELETE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + GET_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + REPLACE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + EXECUTE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES +) + +func (i DeviceManagementConfigurationSettingAccessTypes) String() string { + return []string{"none", "add", "copy", "delete", "get", "replace", "execute"}[i] +} +func ParseDeviceManagementConfigurationSettingAccessTypes(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "add": + result = ADD_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "copy": + result = COPY_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "delete": + result = DELETE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "get": + result = GET_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "replace": + result = REPLACE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + case "execute": + result = EXECUTE_DEVICEMANAGEMENTCONFIGURATIONSETTINGACCESSTYPES + default: + return 0, errors.New("Unknown DeviceManagementConfigurationSettingAccessTypes value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationSettingAccessTypes(values []DeviceManagementConfigurationSettingAccessTypes) []string { + 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/device_management_configuration_setting_applicability.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_applicability.go new file mode 100644 index 000000000..8dda3a804 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_applicability.go @@ -0,0 +1,198 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingApplicability +type DeviceManagementConfigurationSettingApplicability struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // description of the setting + description *string + // Describes applicability for the mode the device is in + deviceMode *DeviceManagementConfigurationDeviceMode + // The OdataType property + odataType *string + // Supported platform types. + platform *DeviceManagementConfigurationPlatforms + // Describes which technology this setting can be deployed with + technologies *DeviceManagementConfigurationTechnologies +} +// NewDeviceManagementConfigurationSettingApplicability instantiates a new deviceManagementConfigurationSettingApplicability and sets the default values. +func NewDeviceManagementConfigurationSettingApplicability()(*DeviceManagementConfigurationSettingApplicability) { + m := &DeviceManagementConfigurationSettingApplicability{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingApplicabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingApplicabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationExchangeOnlineSettingApplicability": + return NewDeviceManagementConfigurationExchangeOnlineSettingApplicability(), nil + case "#microsoft.graph.deviceManagementConfigurationWindowsSettingApplicability": + return NewDeviceManagementConfigurationWindowsSettingApplicability(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingApplicability(), 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 *DeviceManagementConfigurationSettingApplicability) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. description of the setting +func (m *DeviceManagementConfigurationSettingApplicability) GetDescription()(*string) { + return m.description +} +// GetDeviceMode gets the deviceMode property value. Describes applicability for the mode the device is in +func (m *DeviceManagementConfigurationSettingApplicability) GetDeviceMode()(*DeviceManagementConfigurationDeviceMode) { + return m.deviceMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingApplicability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationDeviceMode) + if err != nil { + return err + } + if val != nil { + m.SetDeviceMode(val.(*DeviceManagementConfigurationDeviceMode)) + } + 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["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationPlatforms) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*DeviceManagementConfigurationPlatforms)) + } + return nil + } + res["technologies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationTechnologies) + if err != nil { + return err + } + if val != nil { + m.SetTechnologies(val.(*DeviceManagementConfigurationTechnologies)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingApplicability) GetOdataType()(*string) { + return m.odataType +} +// GetPlatform gets the platform property value. Supported platform types. +func (m *DeviceManagementConfigurationSettingApplicability) GetPlatform()(*DeviceManagementConfigurationPlatforms) { + return m.platform +} +// GetTechnologies gets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationSettingApplicability) GetTechnologies()(*DeviceManagementConfigurationTechnologies) { + return m.technologies +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingApplicability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceMode() != nil { + cast := (*m.GetDeviceMode()).String() + err := writer.WriteStringValue("deviceMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err := writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + if m.GetTechnologies() != nil { + cast := (*m.GetTechnologies()).String() + err := writer.WriteStringValue("technologies", &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 *DeviceManagementConfigurationSettingApplicability) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. description of the setting +func (m *DeviceManagementConfigurationSettingApplicability) SetDescription(value *string)() { + m.description = value +} +// SetDeviceMode sets the deviceMode property value. Describes applicability for the mode the device is in +func (m *DeviceManagementConfigurationSettingApplicability) SetDeviceMode(value *DeviceManagementConfigurationDeviceMode)() { + m.deviceMode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingApplicability) SetOdataType(value *string)() { + m.odataType = value +} +// SetPlatform sets the platform property value. Supported platform types. +func (m *DeviceManagementConfigurationSettingApplicability) SetPlatform(value *DeviceManagementConfigurationPlatforms)() { + m.platform = value +} +// SetTechnologies sets the technologies property value. Describes which technology this setting can be deployed with +func (m *DeviceManagementConfigurationSettingApplicability) SetTechnologies(value *DeviceManagementConfigurationTechnologies)() { + m.technologies = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_applicabilityable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_applicabilityable.go new file mode 100644 index 000000000..8606297a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_applicabilityable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingApplicabilityable +type DeviceManagementConfigurationSettingApplicabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDeviceMode()(*DeviceManagementConfigurationDeviceMode) + GetOdataType()(*string) + GetPlatform()(*DeviceManagementConfigurationPlatforms) + GetTechnologies()(*DeviceManagementConfigurationTechnologies) + SetDescription(value *string)() + SetDeviceMode(value *DeviceManagementConfigurationDeviceMode)() + SetOdataType(value *string)() + SetPlatform(value *DeviceManagementConfigurationPlatforms)() + SetTechnologies(value *DeviceManagementConfigurationTechnologies)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_response.go new file mode 100644 index 000000000..422a315f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingCollectionResponse +type DeviceManagementConfigurationSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingable +} +// NewDeviceManagementConfigurationSettingCollectionResponse instantiates a new DeviceManagementConfigurationSettingCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingCollectionResponse()(*DeviceManagementConfigurationSettingCollectionResponse) { + m := &DeviceManagementConfigurationSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_responseable.go new file mode 100644 index 000000000..e825f73de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingCollectionResponseable +type DeviceManagementConfigurationSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingable) + SetValue(value []DeviceManagementConfigurationSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition.go new file mode 100644 index 000000000..0c6b850a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition.go @@ -0,0 +1,552 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationSettingDefinition struct { + Entity + // The accessTypes property + accessTypes *DeviceManagementConfigurationSettingAccessTypes + // Details which device setting is applicable on + applicability DeviceManagementConfigurationSettingApplicabilityable + // Base CSP Path + baseUri *string + // Specifies the area group under which the setting is configured in a specified configuration service provider (CSP) + categoryId *string + // Description of the item + description *string + // Display name of the item + displayName *string + // Help text of the item + helpText *string + // List of links more info for the setting can be found at + infoUrls []string + // Tokens which to search settings on + keywords []string + // Name of the item + name *string + // Indicates whether the setting is required or not + occurrence DeviceManagementConfigurationSettingOccurrenceable + // Offset CSP Path from Base + offsetUri *string + // List of referred setting information. + referredSettingInformationList []DeviceManagementConfigurationReferredSettingInformationable + // Root setting definition if the setting is a child setting. + rootDefinitionId *string + // Supported setting types + settingUsage *DeviceManagementConfigurationSettingUsage + // Setting control type representation in the UX + uxBehavior *DeviceManagementConfigurationControlType + // Item Version + version *string + // Supported setting types + visibility *DeviceManagementConfigurationSettingVisibility +} +// NewDeviceManagementConfigurationSettingDefinition instantiates a new deviceManagementConfigurationSettingDefinition and sets the default values. +func NewDeviceManagementConfigurationSettingDefinition()(*DeviceManagementConfigurationSettingDefinition) { + m := &DeviceManagementConfigurationSettingDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionDefinition": + return NewDeviceManagementConfigurationChoiceSettingCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingDefinition": + return NewDeviceManagementConfigurationChoiceSettingDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationRedirectSettingDefinition": + return NewDeviceManagementConfigurationRedirectSettingDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionDefinition": + return NewDeviceManagementConfigurationSettingGroupCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupDefinition": + return NewDeviceManagementConfigurationSettingGroupDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionDefinition": + return NewDeviceManagementConfigurationSimpleSettingCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingDefinition": + return NewDeviceManagementConfigurationSimpleSettingDefinition(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingDefinition(), nil +} +// GetAccessTypes gets the accessTypes property value. The accessTypes property +func (m *DeviceManagementConfigurationSettingDefinition) GetAccessTypes()(*DeviceManagementConfigurationSettingAccessTypes) { + return m.accessTypes +} +// GetApplicability gets the applicability property value. Details which device setting is applicable on +func (m *DeviceManagementConfigurationSettingDefinition) GetApplicability()(DeviceManagementConfigurationSettingApplicabilityable) { + return m.applicability +} +// GetBaseUri gets the baseUri property value. Base CSP Path +func (m *DeviceManagementConfigurationSettingDefinition) GetBaseUri()(*string) { + return m.baseUri +} +// GetCategoryId gets the categoryId property value. Specifies the area group under which the setting is configured in a specified configuration service provider (CSP) +func (m *DeviceManagementConfigurationSettingDefinition) GetCategoryId()(*string) { + return m.categoryId +} +// GetDescription gets the description property value. Description of the item +func (m *DeviceManagementConfigurationSettingDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name of the item +func (m *DeviceManagementConfigurationSettingDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationSettingAccessTypes) + if err != nil { + return err + } + if val != nil { + m.SetAccessTypes(val.(*DeviceManagementConfigurationSettingAccessTypes)) + } + return nil + } + res["applicability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingApplicabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicability(val.(DeviceManagementConfigurationSettingApplicabilityable)) + } + return nil + } + res["baseUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseUri(val) + } + return nil + } + res["categoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategoryId(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["helpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpText(val) + } + return nil + } + res["infoUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetInfoUrls(res) + } + return nil + } + res["keywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKeywords(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["occurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingOccurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOccurrence(val.(DeviceManagementConfigurationSettingOccurrenceable)) + } + return nil + } + res["offsetUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOffsetUri(val) + } + return nil + } + res["referredSettingInformationList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationReferredSettingInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationReferredSettingInformationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationReferredSettingInformationable) + } + m.SetReferredSettingInformationList(res) + } + return nil + } + res["rootDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRootDefinitionId(val) + } + return nil + } + res["settingUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationSettingUsage) + if err != nil { + return err + } + if val != nil { + m.SetSettingUsage(val.(*DeviceManagementConfigurationSettingUsage)) + } + return nil + } + res["uxBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationControlType) + if err != nil { + return err + } + if val != nil { + m.SetUxBehavior(val.(*DeviceManagementConfigurationControlType)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationSettingVisibility) + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val.(*DeviceManagementConfigurationSettingVisibility)) + } + return nil + } + return res +} +// GetHelpText gets the helpText property value. Help text of the item +func (m *DeviceManagementConfigurationSettingDefinition) GetHelpText()(*string) { + return m.helpText +} +// GetInfoUrls gets the infoUrls property value. List of links more info for the setting can be found at +func (m *DeviceManagementConfigurationSettingDefinition) GetInfoUrls()([]string) { + return m.infoUrls +} +// GetKeywords gets the keywords property value. Tokens which to search settings on +func (m *DeviceManagementConfigurationSettingDefinition) GetKeywords()([]string) { + return m.keywords +} +// GetName gets the name property value. Name of the item +func (m *DeviceManagementConfigurationSettingDefinition) GetName()(*string) { + return m.name +} +// GetOccurrence gets the occurrence property value. Indicates whether the setting is required or not +func (m *DeviceManagementConfigurationSettingDefinition) GetOccurrence()(DeviceManagementConfigurationSettingOccurrenceable) { + return m.occurrence +} +// GetOffsetUri gets the offsetUri property value. Offset CSP Path from Base +func (m *DeviceManagementConfigurationSettingDefinition) GetOffsetUri()(*string) { + return m.offsetUri +} +// GetReferredSettingInformationList gets the referredSettingInformationList property value. List of referred setting information. +func (m *DeviceManagementConfigurationSettingDefinition) GetReferredSettingInformationList()([]DeviceManagementConfigurationReferredSettingInformationable) { + return m.referredSettingInformationList +} +// GetRootDefinitionId gets the rootDefinitionId property value. Root setting definition if the setting is a child setting. +func (m *DeviceManagementConfigurationSettingDefinition) GetRootDefinitionId()(*string) { + return m.rootDefinitionId +} +// GetSettingUsage gets the settingUsage property value. Supported setting types +func (m *DeviceManagementConfigurationSettingDefinition) GetSettingUsage()(*DeviceManagementConfigurationSettingUsage) { + return m.settingUsage +} +// GetUxBehavior gets the uxBehavior property value. Setting control type representation in the UX +func (m *DeviceManagementConfigurationSettingDefinition) GetUxBehavior()(*DeviceManagementConfigurationControlType) { + return m.uxBehavior +} +// GetVersion gets the version property value. Item Version +func (m *DeviceManagementConfigurationSettingDefinition) GetVersion()(*string) { + return m.version +} +// GetVisibility gets the visibility property value. Supported setting types +func (m *DeviceManagementConfigurationSettingDefinition) GetVisibility()(*DeviceManagementConfigurationSettingVisibility) { + return m.visibility +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessTypes() != nil { + cast := (*m.GetAccessTypes()).String() + err = writer.WriteStringValue("accessTypes", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("applicability", m.GetApplicability()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("baseUri", m.GetBaseUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("categoryId", m.GetCategoryId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("helpText", m.GetHelpText()) + if err != nil { + return err + } + } + if m.GetInfoUrls() != nil { + err = writer.WriteCollectionOfStringValues("infoUrls", m.GetInfoUrls()) + if err != nil { + return err + } + } + if m.GetKeywords() != nil { + err = writer.WriteCollectionOfStringValues("keywords", m.GetKeywords()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("occurrence", m.GetOccurrence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("offsetUri", m.GetOffsetUri()) + if err != nil { + return err + } + } + if m.GetReferredSettingInformationList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReferredSettingInformationList())) + for i, v := range m.GetReferredSettingInformationList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("referredSettingInformationList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rootDefinitionId", m.GetRootDefinitionId()) + if err != nil { + return err + } + } + if m.GetSettingUsage() != nil { + cast := (*m.GetSettingUsage()).String() + err = writer.WriteStringValue("settingUsage", &cast) + if err != nil { + return err + } + } + if m.GetUxBehavior() != nil { + cast := (*m.GetUxBehavior()).String() + err = writer.WriteStringValue("uxBehavior", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + if m.GetVisibility() != nil { + cast := (*m.GetVisibility()).String() + err = writer.WriteStringValue("visibility", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAccessTypes sets the accessTypes property value. The accessTypes property +func (m *DeviceManagementConfigurationSettingDefinition) SetAccessTypes(value *DeviceManagementConfigurationSettingAccessTypes)() { + m.accessTypes = value +} +// SetApplicability sets the applicability property value. Details which device setting is applicable on +func (m *DeviceManagementConfigurationSettingDefinition) SetApplicability(value DeviceManagementConfigurationSettingApplicabilityable)() { + m.applicability = value +} +// SetBaseUri sets the baseUri property value. Base CSP Path +func (m *DeviceManagementConfigurationSettingDefinition) SetBaseUri(value *string)() { + m.baseUri = value +} +// SetCategoryId sets the categoryId property value. Specifies the area group under which the setting is configured in a specified configuration service provider (CSP) +func (m *DeviceManagementConfigurationSettingDefinition) SetCategoryId(value *string)() { + m.categoryId = value +} +// SetDescription sets the description property value. Description of the item +func (m *DeviceManagementConfigurationSettingDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name of the item +func (m *DeviceManagementConfigurationSettingDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHelpText sets the helpText property value. Help text of the item +func (m *DeviceManagementConfigurationSettingDefinition) SetHelpText(value *string)() { + m.helpText = value +} +// SetInfoUrls sets the infoUrls property value. List of links more info for the setting can be found at +func (m *DeviceManagementConfigurationSettingDefinition) SetInfoUrls(value []string)() { + m.infoUrls = value +} +// SetKeywords sets the keywords property value. Tokens which to search settings on +func (m *DeviceManagementConfigurationSettingDefinition) SetKeywords(value []string)() { + m.keywords = value +} +// SetName sets the name property value. Name of the item +func (m *DeviceManagementConfigurationSettingDefinition) SetName(value *string)() { + m.name = value +} +// SetOccurrence sets the occurrence property value. Indicates whether the setting is required or not +func (m *DeviceManagementConfigurationSettingDefinition) SetOccurrence(value DeviceManagementConfigurationSettingOccurrenceable)() { + m.occurrence = value +} +// SetOffsetUri sets the offsetUri property value. Offset CSP Path from Base +func (m *DeviceManagementConfigurationSettingDefinition) SetOffsetUri(value *string)() { + m.offsetUri = value +} +// SetReferredSettingInformationList sets the referredSettingInformationList property value. List of referred setting information. +func (m *DeviceManagementConfigurationSettingDefinition) SetReferredSettingInformationList(value []DeviceManagementConfigurationReferredSettingInformationable)() { + m.referredSettingInformationList = value +} +// SetRootDefinitionId sets the rootDefinitionId property value. Root setting definition if the setting is a child setting. +func (m *DeviceManagementConfigurationSettingDefinition) SetRootDefinitionId(value *string)() { + m.rootDefinitionId = value +} +// SetSettingUsage sets the settingUsage property value. Supported setting types +func (m *DeviceManagementConfigurationSettingDefinition) SetSettingUsage(value *DeviceManagementConfigurationSettingUsage)() { + m.settingUsage = value +} +// SetUxBehavior sets the uxBehavior property value. Setting control type representation in the UX +func (m *DeviceManagementConfigurationSettingDefinition) SetUxBehavior(value *DeviceManagementConfigurationControlType)() { + m.uxBehavior = value +} +// SetVersion sets the version property value. Item Version +func (m *DeviceManagementConfigurationSettingDefinition) SetVersion(value *string)() { + m.version = value +} +// SetVisibility sets the visibility property value. Supported setting types +func (m *DeviceManagementConfigurationSettingDefinition) SetVisibility(value *DeviceManagementConfigurationSettingVisibility)() { + m.visibility = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_response.go new file mode 100644 index 000000000..1755b8dba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDefinitionCollectionResponse +type DeviceManagementConfigurationSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingDefinitionable +} +// NewDeviceManagementConfigurationSettingDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingDefinitionCollectionResponse()(*DeviceManagementConfigurationSettingDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_responseable.go new file mode 100644 index 000000000..c0ca7378a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDefinitionCollectionResponseable +type DeviceManagementConfigurationSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingDefinitionable) + SetValue(value []DeviceManagementConfigurationSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definitionable.go new file mode 100644 index 000000000..fb875a2b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_definitionable.go @@ -0,0 +1,47 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDefinitionable +type DeviceManagementConfigurationSettingDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessTypes()(*DeviceManagementConfigurationSettingAccessTypes) + GetApplicability()(DeviceManagementConfigurationSettingApplicabilityable) + GetBaseUri()(*string) + GetCategoryId()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetHelpText()(*string) + GetInfoUrls()([]string) + GetKeywords()([]string) + GetName()(*string) + GetOccurrence()(DeviceManagementConfigurationSettingOccurrenceable) + GetOffsetUri()(*string) + GetReferredSettingInformationList()([]DeviceManagementConfigurationReferredSettingInformationable) + GetRootDefinitionId()(*string) + GetSettingUsage()(*DeviceManagementConfigurationSettingUsage) + GetUxBehavior()(*DeviceManagementConfigurationControlType) + GetVersion()(*string) + GetVisibility()(*DeviceManagementConfigurationSettingVisibility) + SetAccessTypes(value *DeviceManagementConfigurationSettingAccessTypes)() + SetApplicability(value DeviceManagementConfigurationSettingApplicabilityable)() + SetBaseUri(value *string)() + SetCategoryId(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetHelpText(value *string)() + SetInfoUrls(value []string)() + SetKeywords(value []string)() + SetName(value *string)() + SetOccurrence(value DeviceManagementConfigurationSettingOccurrenceable)() + SetOffsetUri(value *string)() + SetReferredSettingInformationList(value []DeviceManagementConfigurationReferredSettingInformationable)() + SetRootDefinitionId(value *string)() + SetSettingUsage(value *DeviceManagementConfigurationSettingUsage)() + SetUxBehavior(value *DeviceManagementConfigurationControlType)() + SetVersion(value *string)() + SetVisibility(value *DeviceManagementConfigurationSettingVisibility)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by.go new file mode 100644 index 000000000..fbc5f76c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDependedOnBy +type DeviceManagementConfigurationSettingDependedOnBy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifier of child setting that is dependent on the current setting + dependedOnBy *string + // The OdataType property + odataType *string + // Value that determines if the child setting is required based on the parent setting's selection + required *bool +} +// NewDeviceManagementConfigurationSettingDependedOnBy instantiates a new deviceManagementConfigurationSettingDependedOnBy and sets the default values. +func NewDeviceManagementConfigurationSettingDependedOnBy()(*DeviceManagementConfigurationSettingDependedOnBy) { + m := &DeviceManagementConfigurationSettingDependedOnBy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingDependedOnBy(), 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 *DeviceManagementConfigurationSettingDependedOnBy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDependedOnBy gets the dependedOnBy property value. Identifier of child setting that is dependent on the current setting +func (m *DeviceManagementConfigurationSettingDependedOnBy) GetDependedOnBy()(*string) { + return m.dependedOnBy +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingDependedOnBy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dependedOnBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDependedOnBy(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["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingDependedOnBy) GetOdataType()(*string) { + return m.odataType +} +// GetRequired gets the required property value. Value that determines if the child setting is required based on the parent setting's selection +func (m *DeviceManagementConfigurationSettingDependedOnBy) GetRequired()(*bool) { + return m.required +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingDependedOnBy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("dependedOnBy", m.GetDependedOnBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("required", m.GetRequired()) + 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 *DeviceManagementConfigurationSettingDependedOnBy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDependedOnBy sets the dependedOnBy property value. Identifier of child setting that is dependent on the current setting +func (m *DeviceManagementConfigurationSettingDependedOnBy) SetDependedOnBy(value *string)() { + m.dependedOnBy = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingDependedOnBy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRequired sets the required property value. Value that determines if the child setting is required based on the parent setting's selection +func (m *DeviceManagementConfigurationSettingDependedOnBy) SetRequired(value *bool)() { + m.required = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_response.go new file mode 100644 index 000000000..8693e25a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDependedOnByCollectionResponse +type DeviceManagementConfigurationSettingDependedOnByCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingDependedOnByable +} +// NewDeviceManagementConfigurationSettingDependedOnByCollectionResponse instantiates a new DeviceManagementConfigurationSettingDependedOnByCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingDependedOnByCollectionResponse()(*DeviceManagementConfigurationSettingDependedOnByCollectionResponse) { + m := &DeviceManagementConfigurationSettingDependedOnByCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingDependedOnByCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingDependedOnByCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingDependedOnByCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingDependedOnByCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDependedOnByable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDependedOnByable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingDependedOnByCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingDependedOnByable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingDependedOnByCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingDependedOnByCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingDependedOnByable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_responseable.go new file mode 100644 index 000000000..36316c112 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_by_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDependedOnByCollectionResponseable +type DeviceManagementConfigurationSettingDependedOnByCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingDependedOnByable) + SetValue(value []DeviceManagementConfigurationSettingDependedOnByable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_byable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_byable.go new file mode 100644 index 000000000..ced41cae3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_depended_on_byable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingDependedOnByable +type DeviceManagementConfigurationSettingDependedOnByable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependedOnBy()(*string) + GetOdataType()(*string) + GetRequired()(*bool) + SetDependedOnBy(value *string)() + SetOdataType(value *string)() + SetRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition.go new file mode 100644 index 000000000..613a81595 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionDefinition +type DeviceManagementConfigurationSettingGroupCollectionDefinition struct { + DeviceManagementConfigurationSettingGroupDefinition + // Maximum number of setting group count in the collection. Valid values 1 to 100 + maximumCount *int32 + // Minimum number of setting group count in the collection. Valid values 1 to 100 + minimumCount *int32 +} +// NewDeviceManagementConfigurationSettingGroupCollectionDefinition instantiates a new DeviceManagementConfigurationSettingGroupCollectionDefinition and sets the default values. +func NewDeviceManagementConfigurationSettingGroupCollectionDefinition()(*DeviceManagementConfigurationSettingGroupCollectionDefinition) { + m := &DeviceManagementConfigurationSettingGroupCollectionDefinition{ + DeviceManagementConfigurationSettingGroupDefinition: *NewDeviceManagementConfigurationSettingGroupDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationSettingGroupCollectionDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupCollectionDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingGroupCollectionDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingGroupDefinition.GetFieldDeserializers() + res["maximumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumCount(val) + } + return nil + } + res["minimumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumCount(val) + } + return nil + } + return res +} +// GetMaximumCount gets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMaximumCount()(*int32) { + return m.maximumCount +} +// GetMinimumCount gets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) GetMinimumCount()(*int32) { + return m.minimumCount +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingGroupDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumCount", m.GetMaximumCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumCount", m.GetMinimumCount()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumCount sets the maximumCount property value. Maximum number of setting group count in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMaximumCount(value *int32)() { + m.maximumCount = value +} +// SetMinimumCount sets the minimumCount property value. Minimum number of setting group count in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinition) SetMinimumCount(value *int32)() { + m.minimumCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_response.go new file mode 100644 index 000000000..089c1e894 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse +type DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingGroupCollectionDefinitionable +} +// NewDeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse()(*DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingGroupCollectionDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingGroupCollectionDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingGroupCollectionDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingGroupCollectionDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingGroupCollectionDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_responseable.go new file mode 100644 index 000000000..7163c909b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponseable +type DeviceManagementConfigurationSettingGroupCollectionDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingGroupCollectionDefinitionable) + SetValue(value []DeviceManagementConfigurationSettingGroupCollectionDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definitionable.go new file mode 100644 index 000000000..6aa613d67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionDefinitionable +type DeviceManagementConfigurationSettingGroupCollectionDefinitionable interface { + DeviceManagementConfigurationSettingGroupDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumCount()(*int32) + GetMinimumCount()(*int32) + SetMaximumCount(value *int32)() + SetMinimumCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instance.go new file mode 100644 index 000000000..e81e587be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instance.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionInstance +type DeviceManagementConfigurationSettingGroupCollectionInstance struct { + DeviceManagementConfigurationSettingInstance +} +// NewDeviceManagementConfigurationSettingGroupCollectionInstance instantiates a new DeviceManagementConfigurationSettingGroupCollectionInstance and sets the default values. +func NewDeviceManagementConfigurationSettingGroupCollectionInstance()(*DeviceManagementConfigurationSettingGroupCollectionInstance) { + m := &DeviceManagementConfigurationSettingGroupCollectionInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSettingGroupCollectionInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupCollectionInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingGroupCollectionInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupCollectionInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupCollectionInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instanceable.go new file mode 100644 index 000000000..3ae9dad86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_collection_instanceable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupCollectionInstanceable +type DeviceManagementConfigurationSettingGroupCollectionInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition.go new file mode 100644 index 000000000..17dddc251 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupDefinition +type DeviceManagementConfigurationSettingGroupDefinition struct { + DeviceManagementConfigurationSettingDefinition + // Dependent child settings to this group of settings + childIds []string + // List of child settings that depend on this setting + dependedOnBy []DeviceManagementConfigurationSettingDependedOnByable + // List of Dependencies for the setting group + dependentOn []DeviceManagementConfigurationDependentOnable +} +// NewDeviceManagementConfigurationSettingGroupDefinition instantiates a new DeviceManagementConfigurationSettingGroupDefinition and sets the default values. +func NewDeviceManagementConfigurationSettingGroupDefinition()(*DeviceManagementConfigurationSettingGroupDefinition) { + m := &DeviceManagementConfigurationSettingGroupDefinition{ + DeviceManagementConfigurationSettingDefinition: *NewDeviceManagementConfigurationSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationSettingGroupDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionDefinition": + return NewDeviceManagementConfigurationSettingGroupCollectionDefinition(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingGroupDefinition(), nil +} +// GetChildIds gets the childIds property value. Dependent child settings to this group of settings +func (m *DeviceManagementConfigurationSettingGroupDefinition) GetChildIds()([]string) { + return m.childIds +} +// GetDependedOnBy gets the dependedOnBy property value. List of child settings that depend on this setting +func (m *DeviceManagementConfigurationSettingGroupDefinition) GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) { + return m.dependedOnBy +} +// GetDependentOn gets the dependentOn property value. List of Dependencies for the setting group +func (m *DeviceManagementConfigurationSettingGroupDefinition) GetDependentOn()([]DeviceManagementConfigurationDependentOnable) { + return m.dependentOn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingDefinition.GetFieldDeserializers() + res["childIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetChildIds(res) + } + return nil + } + res["dependedOnBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDependedOnByable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDependedOnByable) + } + m.SetDependedOnBy(res) + } + return nil + } + res["dependentOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationDependentOnable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationDependentOnable) + } + m.SetDependentOn(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingDefinition.Serialize(writer) + if err != nil { + return err + } + if m.GetChildIds() != nil { + err = writer.WriteCollectionOfStringValues("childIds", m.GetChildIds()) + if err != nil { + return err + } + } + if m.GetDependedOnBy() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependedOnBy())) + for i, v := range m.GetDependedOnBy() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dependedOnBy", cast) + if err != nil { + return err + } + } + if m.GetDependentOn() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependentOn())) + for i, v := range m.GetDependentOn() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dependentOn", cast) + if err != nil { + return err + } + } + return nil +} +// SetChildIds sets the childIds property value. Dependent child settings to this group of settings +func (m *DeviceManagementConfigurationSettingGroupDefinition) SetChildIds(value []string)() { + m.childIds = value +} +// SetDependedOnBy sets the dependedOnBy property value. List of child settings that depend on this setting +func (m *DeviceManagementConfigurationSettingGroupDefinition) SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() { + m.dependedOnBy = value +} +// SetDependentOn sets the dependentOn property value. List of Dependencies for the setting group +func (m *DeviceManagementConfigurationSettingGroupDefinition) SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() { + m.dependentOn = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_response.go new file mode 100644 index 000000000..3a0538eaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse +type DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingGroupDefinitionable +} +// NewDeviceManagementConfigurationSettingGroupDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingGroupDefinitionCollectionResponse()(*DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingGroupDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingGroupDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingGroupDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingGroupDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingGroupDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingGroupDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingGroupDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingGroupDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_responseable.go new file mode 100644 index 000000000..3ac5b7db6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupDefinitionCollectionResponseable +type DeviceManagementConfigurationSettingGroupDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingGroupDefinitionable) + SetValue(value []DeviceManagementConfigurationSettingGroupDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definitionable.go new file mode 100644 index 000000000..3f12aed9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_definitionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupDefinitionable +type DeviceManagementConfigurationSettingGroupDefinitionable interface { + DeviceManagementConfigurationSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildIds()([]string) + GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) + GetDependentOn()([]DeviceManagementConfigurationDependentOnable) + SetChildIds(value []string)() + SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() + SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instance.go new file mode 100644 index 000000000..c3e009ed9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instance.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupInstance +type DeviceManagementConfigurationSettingGroupInstance struct { + DeviceManagementConfigurationSettingInstance +} +// NewDeviceManagementConfigurationSettingGroupInstance instantiates a new DeviceManagementConfigurationSettingGroupInstance and sets the default values. +func NewDeviceManagementConfigurationSettingGroupInstance()(*DeviceManagementConfigurationSettingGroupInstance) { + m := &DeviceManagementConfigurationSettingGroupInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSettingGroupInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSettingGroupInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingGroupInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingGroupInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingGroupInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingGroupInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instanceable.go new file mode 100644 index 000000000..68c83c827 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_group_instanceable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingGroupInstanceable +type DeviceManagementConfigurationSettingGroupInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance.go new file mode 100644 index 000000000..8d009a15f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance.go @@ -0,0 +1,155 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstance setting instance within policy +type DeviceManagementConfigurationSettingInstance 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 OdataType property + odataType *string + // Setting Definition Id + settingDefinitionId *string + // Setting Instance Template Reference + settingInstanceTemplateReference DeviceManagementConfigurationSettingInstanceTemplateReferenceable +} +// NewDeviceManagementConfigurationSettingInstance instantiates a new deviceManagementConfigurationSettingInstance and sets the default values. +func NewDeviceManagementConfigurationSettingInstance()(*DeviceManagementConfigurationSettingInstance) { + m := &DeviceManagementConfigurationSettingInstance{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstance": + return NewDeviceManagementConfigurationChoiceSettingCollectionInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingInstance": + return NewDeviceManagementConfigurationChoiceSettingInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstance": + return NewDeviceManagementConfigurationGroupSettingCollectionInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationGroupSettingInstance": + return NewDeviceManagementConfigurationGroupSettingInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionInstance": + return NewDeviceManagementConfigurationSettingGroupCollectionInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupInstance": + return NewDeviceManagementConfigurationSettingGroupInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance": + return NewDeviceManagementConfigurationSimpleSettingCollectionInstance(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance": + return NewDeviceManagementConfigurationSimpleSettingInstance(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingInstance(), 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 *DeviceManagementConfigurationSettingInstance) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDefinitionId(val) + } + return nil + } + res["settingInstanceTemplateReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingInstanceTemplateReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceTemplateReference(val.(DeviceManagementConfigurationSettingInstanceTemplateReferenceable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstance) GetOdataType()(*string) { + return m.odataType +} +// GetSettingDefinitionId gets the settingDefinitionId property value. Setting Definition Id +func (m *DeviceManagementConfigurationSettingInstance) GetSettingDefinitionId()(*string) { + return m.settingDefinitionId +} +// GetSettingInstanceTemplateReference gets the settingInstanceTemplateReference property value. Setting Instance Template Reference +func (m *DeviceManagementConfigurationSettingInstance) GetSettingInstanceTemplateReference()(DeviceManagementConfigurationSettingInstanceTemplateReferenceable) { + return m.settingInstanceTemplateReference +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingDefinitionId", m.GetSettingDefinitionId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("settingInstanceTemplateReference", m.GetSettingInstanceTemplateReference()) + 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 *DeviceManagementConfigurationSettingInstance) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstance) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingDefinitionId sets the settingDefinitionId property value. Setting Definition Id +func (m *DeviceManagementConfigurationSettingInstance) SetSettingDefinitionId(value *string)() { + m.settingDefinitionId = value +} +// SetSettingInstanceTemplateReference sets the settingInstanceTemplateReference property value. Setting Instance Template Reference +func (m *DeviceManagementConfigurationSettingInstance) SetSettingInstanceTemplateReference(value DeviceManagementConfigurationSettingInstanceTemplateReferenceable)() { + m.settingInstanceTemplateReference = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_response.go new file mode 100644 index 000000000..a38c41ef0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceCollectionResponse +type DeviceManagementConfigurationSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingInstanceable +} +// NewDeviceManagementConfigurationSettingInstanceCollectionResponse instantiates a new DeviceManagementConfigurationSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingInstanceCollectionResponse()(*DeviceManagementConfigurationSettingInstanceCollectionResponse) { + m := &DeviceManagementConfigurationSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingInstanceCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingInstanceCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_responseable.go new file mode 100644 index 000000000..824ebd6bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceCollectionResponseable +type DeviceManagementConfigurationSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingInstanceable) + SetValue(value []DeviceManagementConfigurationSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template.go new file mode 100644 index 000000000..aeabb8d74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplate setting Instance Template +type DeviceManagementConfigurationSettingInstanceTemplate 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 if a policy must specify this setting. + isRequired *bool + // The OdataType property + odataType *string + // Setting Definition Id + settingDefinitionId *string + // Setting Instance Template Id + settingInstanceTemplateId *string +} +// NewDeviceManagementConfigurationSettingInstanceTemplate instantiates a new deviceManagementConfigurationSettingInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationSettingInstanceTemplate()(*DeviceManagementConfigurationSettingInstanceTemplate) { + m := &DeviceManagementConfigurationSettingInstanceTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionInstanceTemplate": + return NewDeviceManagementConfigurationChoiceSettingCollectionInstanceTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingInstanceTemplate": + return NewDeviceManagementConfigurationChoiceSettingInstanceTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationGroupSettingCollectionInstanceTemplate": + return NewDeviceManagementConfigurationGroupSettingCollectionInstanceTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationGroupSettingInstanceTemplate": + return NewDeviceManagementConfigurationGroupSettingInstanceTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstanceTemplate": + return NewDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstanceTemplate": + return NewDeviceManagementConfigurationSimpleSettingInstanceTemplate(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingInstanceTemplate(), 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 *DeviceManagementConfigurationSettingInstanceTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(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["settingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDefinitionId(val) + } + return nil + } + res["settingInstanceTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceTemplateId(val) + } + return nil + } + return res +} +// GetIsRequired gets the isRequired property value. Indicates if a policy must specify this setting. +func (m *DeviceManagementConfigurationSettingInstanceTemplate) GetIsRequired()(*bool) { + return m.isRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstanceTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetSettingDefinitionId gets the settingDefinitionId property value. Setting Definition Id +func (m *DeviceManagementConfigurationSettingInstanceTemplate) GetSettingDefinitionId()(*string) { + return m.settingDefinitionId +} +// GetSettingInstanceTemplateId gets the settingInstanceTemplateId property value. Setting Instance Template Id +func (m *DeviceManagementConfigurationSettingInstanceTemplate) GetSettingInstanceTemplateId()(*string) { + return m.settingInstanceTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingDefinitionId", m.GetSettingDefinitionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingInstanceTemplateId", m.GetSettingInstanceTemplateId()) + 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 *DeviceManagementConfigurationSettingInstanceTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsRequired sets the isRequired property value. Indicates if a policy must specify this setting. +func (m *DeviceManagementConfigurationSettingInstanceTemplate) SetIsRequired(value *bool)() { + m.isRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstanceTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingDefinitionId sets the settingDefinitionId property value. Setting Definition Id +func (m *DeviceManagementConfigurationSettingInstanceTemplate) SetSettingDefinitionId(value *string)() { + m.settingDefinitionId = value +} +// SetSettingInstanceTemplateId sets the settingInstanceTemplateId property value. Setting Instance Template Id +func (m *DeviceManagementConfigurationSettingInstanceTemplate) SetSettingInstanceTemplateId(value *string)() { + m.settingInstanceTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_response.go new file mode 100644 index 000000000..100e31633 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse +type DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingInstanceTemplateable +} +// NewDeviceManagementConfigurationSettingInstanceTemplateCollectionResponse instantiates a new DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingInstanceTemplateCollectionResponse()(*DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse) { + m := &DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingInstanceTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingInstanceTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingInstanceTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingInstanceTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingInstanceTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingInstanceTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingInstanceTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingInstanceTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_responseable.go new file mode 100644 index 000000000..e639df51b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplateCollectionResponseable +type DeviceManagementConfigurationSettingInstanceTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingInstanceTemplateable) + SetValue(value []DeviceManagementConfigurationSettingInstanceTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_reference.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_reference.go new file mode 100644 index 000000000..a9977f41d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_reference.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplateReference setting instance template reference information +type DeviceManagementConfigurationSettingInstanceTemplateReference 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 OdataType property + odataType *string + // Setting instance template id + settingInstanceTemplateId *string +} +// NewDeviceManagementConfigurationSettingInstanceTemplateReference instantiates a new deviceManagementConfigurationSettingInstanceTemplateReference and sets the default values. +func NewDeviceManagementConfigurationSettingInstanceTemplateReference()(*DeviceManagementConfigurationSettingInstanceTemplateReference) { + m := &DeviceManagementConfigurationSettingInstanceTemplateReference{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingInstanceTemplateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingInstanceTemplateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingInstanceTemplateReference(), 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 *DeviceManagementConfigurationSettingInstanceTemplateReference) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingInstanceTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) GetOdataType()(*string) { + return m.odataType +} +// GetSettingInstanceTemplateId gets the settingInstanceTemplateId property value. Setting instance template id +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) GetSettingInstanceTemplateId()(*string) { + return m.settingInstanceTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingInstanceTemplateId", m.GetSettingInstanceTemplateId()) + 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 *DeviceManagementConfigurationSettingInstanceTemplateReference) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingInstanceTemplateId sets the settingInstanceTemplateId property value. Setting instance template id +func (m *DeviceManagementConfigurationSettingInstanceTemplateReference) SetSettingInstanceTemplateId(value *string)() { + m.settingInstanceTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_referenceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_referenceable.go new file mode 100644 index 000000000..8b8a541ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_template_referenceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplateReferenceable +type DeviceManagementConfigurationSettingInstanceTemplateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingInstanceTemplateId()(*string) + SetOdataType(value *string)() + SetSettingInstanceTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_templateable.go new file mode 100644 index 000000000..77af0504d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instance_templateable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceTemplateable +type DeviceManagementConfigurationSettingInstanceTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRequired()(*bool) + GetOdataType()(*string) + GetSettingDefinitionId()(*string) + GetSettingInstanceTemplateId()(*string) + SetIsRequired(value *bool)() + SetOdataType(value *string)() + SetSettingDefinitionId(value *string)() + SetSettingInstanceTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instanceable.go new file mode 100644 index 000000000..9a674853a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_instanceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingInstanceable +type DeviceManagementConfigurationSettingInstanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingDefinitionId()(*string) + GetSettingInstanceTemplateReference()(DeviceManagementConfigurationSettingInstanceTemplateReferenceable) + SetOdataType(value *string)() + SetSettingDefinitionId(value *string)() + SetSettingInstanceTemplateReference(value DeviceManagementConfigurationSettingInstanceTemplateReferenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrence.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrence.go new file mode 100644 index 000000000..e2cd8f104 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrence.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingOccurrence +type DeviceManagementConfigurationSettingOccurrence struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Maximum times setting can be set on device. + maxDeviceOccurrence *int32 + // Minimum times setting can be set on device. A MinDeviceOccurrence of 0 means setting is optional + minDeviceOccurrence *int32 + // The OdataType property + odataType *string +} +// NewDeviceManagementConfigurationSettingOccurrence instantiates a new deviceManagementConfigurationSettingOccurrence and sets the default values. +func NewDeviceManagementConfigurationSettingOccurrence()(*DeviceManagementConfigurationSettingOccurrence) { + m := &DeviceManagementConfigurationSettingOccurrence{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingOccurrenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingOccurrenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingOccurrence(), 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 *DeviceManagementConfigurationSettingOccurrence) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingOccurrence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maxDeviceOccurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxDeviceOccurrence(val) + } + return nil + } + res["minDeviceOccurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinDeviceOccurrence(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 + } + return res +} +// GetMaxDeviceOccurrence gets the maxDeviceOccurrence property value. Maximum times setting can be set on device. +func (m *DeviceManagementConfigurationSettingOccurrence) GetMaxDeviceOccurrence()(*int32) { + return m.maxDeviceOccurrence +} +// GetMinDeviceOccurrence gets the minDeviceOccurrence property value. Minimum times setting can be set on device. A MinDeviceOccurrence of 0 means setting is optional +func (m *DeviceManagementConfigurationSettingOccurrence) GetMinDeviceOccurrence()(*int32) { + return m.minDeviceOccurrence +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingOccurrence) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingOccurrence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("maxDeviceOccurrence", m.GetMaxDeviceOccurrence()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minDeviceOccurrence", m.GetMinDeviceOccurrence()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationSettingOccurrence) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaxDeviceOccurrence sets the maxDeviceOccurrence property value. Maximum times setting can be set on device. +func (m *DeviceManagementConfigurationSettingOccurrence) SetMaxDeviceOccurrence(value *int32)() { + m.maxDeviceOccurrence = value +} +// SetMinDeviceOccurrence sets the minDeviceOccurrence property value. Minimum times setting can be set on device. A MinDeviceOccurrence of 0 means setting is optional +func (m *DeviceManagementConfigurationSettingOccurrence) SetMinDeviceOccurrence(value *int32)() { + m.minDeviceOccurrence = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingOccurrence) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrenceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrenceable.go new file mode 100644 index 000000000..549ba50c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_occurrenceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingOccurrenceable +type DeviceManagementConfigurationSettingOccurrenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxDeviceOccurrence()(*int32) + GetMinDeviceOccurrence()(*int32) + GetOdataType()(*string) + SetMaxDeviceOccurrence(value *int32)() + SetMinDeviceOccurrence(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template.go new file mode 100644 index 000000000..e1f3915e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingTemplate setting Template +type DeviceManagementConfigurationSettingTemplate struct { + Entity + // List of related Setting Definitions + settingDefinitions []DeviceManagementConfigurationSettingDefinitionable + // Setting Instance Template + settingInstanceTemplate DeviceManagementConfigurationSettingInstanceTemplateable +} +// NewDeviceManagementConfigurationSettingTemplate instantiates a new deviceManagementConfigurationSettingTemplate and sets the default values. +func NewDeviceManagementConfigurationSettingTemplate()(*DeviceManagementConfigurationSettingTemplate) { + m := &DeviceManagementConfigurationSettingTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementConfigurationSettingTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingTemplate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["settingDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDefinitionable) + } + m.SetSettingDefinitions(res) + } + return nil + } + res["settingInstanceTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingInstanceTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceTemplate(val.(DeviceManagementConfigurationSettingInstanceTemplateable)) + } + return nil + } + return res +} +// GetSettingDefinitions gets the settingDefinitions property value. List of related Setting Definitions +func (m *DeviceManagementConfigurationSettingTemplate) GetSettingDefinitions()([]DeviceManagementConfigurationSettingDefinitionable) { + return m.settingDefinitions +} +// GetSettingInstanceTemplate gets the settingInstanceTemplate property value. Setting Instance Template +func (m *DeviceManagementConfigurationSettingTemplate) GetSettingInstanceTemplate()(DeviceManagementConfigurationSettingInstanceTemplateable) { + return m.settingInstanceTemplate +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSettingDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingDefinitions())) + for i, v := range m.GetSettingDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingDefinitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settingInstanceTemplate", m.GetSettingInstanceTemplate()) + if err != nil { + return err + } + } + return nil +} +// SetSettingDefinitions sets the settingDefinitions property value. List of related Setting Definitions +func (m *DeviceManagementConfigurationSettingTemplate) SetSettingDefinitions(value []DeviceManagementConfigurationSettingDefinitionable)() { + m.settingDefinitions = value +} +// SetSettingInstanceTemplate sets the settingInstanceTemplate property value. Setting Instance Template +func (m *DeviceManagementConfigurationSettingTemplate) SetSettingInstanceTemplate(value DeviceManagementConfigurationSettingInstanceTemplateable)() { + m.settingInstanceTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_response.go new file mode 100644 index 000000000..dfd9ddf6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingTemplateCollectionResponse +type DeviceManagementConfigurationSettingTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSettingTemplateable +} +// NewDeviceManagementConfigurationSettingTemplateCollectionResponse instantiates a new DeviceManagementConfigurationSettingTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSettingTemplateCollectionResponse()(*DeviceManagementConfigurationSettingTemplateCollectionResponse) { + m := &DeviceManagementConfigurationSettingTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSettingTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSettingTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationSettingTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSettingTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationSettingTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_responseable.go new file mode 100644 index 000000000..85f303679 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingTemplateCollectionResponseable +type DeviceManagementConfigurationSettingTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSettingTemplateable) + SetValue(value []DeviceManagementConfigurationSettingTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_templateable.go new file mode 100644 index 000000000..2feb63949 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingTemplateable +type DeviceManagementConfigurationSettingTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettingDefinitions()([]DeviceManagementConfigurationSettingDefinitionable) + GetSettingInstanceTemplate()(DeviceManagementConfigurationSettingInstanceTemplateable) + SetSettingDefinitions(value []DeviceManagementConfigurationSettingDefinitionable)() + SetSettingInstanceTemplate(value DeviceManagementConfigurationSettingInstanceTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_usage.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_usage.go new file mode 100644 index 000000000..601fb7de5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_usage.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationSettingUsage int + +const ( + // No setting type specified + NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE DeviceManagementConfigurationSettingUsage = iota + // Configuration setting + CONFIGURATION_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE + // Compliance setting + COMPLIANCE_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE +) + +func (i DeviceManagementConfigurationSettingUsage) String() string { + return []string{"none", "configuration", "compliance"}[i] +} +func ParseDeviceManagementConfigurationSettingUsage(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE + case "configuration": + result = CONFIGURATION_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE + case "compliance": + result = COMPLIANCE_DEVICEMANAGEMENTCONFIGURATIONSETTINGUSAGE + default: + return 0, errors.New("Unknown DeviceManagementConfigurationSettingUsage value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationSettingUsage(values []DeviceManagementConfigurationSettingUsage) []string { + 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/device_management_configuration_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value.go new file mode 100644 index 000000000..04691085b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValue setting value +type DeviceManagementConfigurationSettingValue 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 OdataType property + odataType *string + // Setting value template reference + settingValueTemplateReference DeviceManagementConfigurationSettingValueTemplateReferenceable +} +// NewDeviceManagementConfigurationSettingValue instantiates a new deviceManagementConfigurationSettingValue and sets the default values. +func NewDeviceManagementConfigurationSettingValue()(*DeviceManagementConfigurationSettingValue) { + m := &DeviceManagementConfigurationSettingValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingValue": + return NewDeviceManagementConfigurationChoiceSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationGroupSettingValue": + return NewDeviceManagementConfigurationGroupSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue": + return NewDeviceManagementConfigurationIntegerSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationReferenceSettingValue": + return NewDeviceManagementConfigurationReferenceSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationSecretSettingValue": + return NewDeviceManagementConfigurationSecretSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingValue": + return NewDeviceManagementConfigurationSimpleSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationStringSettingValue": + return NewDeviceManagementConfigurationStringSettingValue(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingValue(), 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 *DeviceManagementConfigurationSettingValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingValueTemplateReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingValueTemplateReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettingValueTemplateReference(val.(DeviceManagementConfigurationSettingValueTemplateReferenceable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValue) GetOdataType()(*string) { + return m.odataType +} +// GetSettingValueTemplateReference gets the settingValueTemplateReference property value. Setting value template reference +func (m *DeviceManagementConfigurationSettingValue) GetSettingValueTemplateReference()(DeviceManagementConfigurationSettingValueTemplateReferenceable) { + return m.settingValueTemplateReference +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("settingValueTemplateReference", m.GetSettingValueTemplateReference()) + 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 *DeviceManagementConfigurationSettingValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingValueTemplateReference sets the settingValueTemplateReference property value. Setting value template reference +func (m *DeviceManagementConfigurationSettingValue) SetSettingValueTemplateReference(value DeviceManagementConfigurationSettingValueTemplateReferenceable)() { + m.settingValueTemplateReference = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definition.go new file mode 100644 index 000000000..97597122d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definition.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValueDefinition +type DeviceManagementConfigurationSettingValueDefinition 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 OdataType property + odataType *string +} +// NewDeviceManagementConfigurationSettingValueDefinition instantiates a new deviceManagementConfigurationSettingValueDefinition and sets the default values. +func NewDeviceManagementConfigurationSettingValueDefinition()(*DeviceManagementConfigurationSettingValueDefinition) { + m := &DeviceManagementConfigurationSettingValueDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingValueDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingValueDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueDefinition": + return NewDeviceManagementConfigurationIntegerSettingValueDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationStringSettingValueDefinition": + return NewDeviceManagementConfigurationStringSettingValueDefinition(), nil + } + } + } + } + return NewDeviceManagementConfigurationSettingValueDefinition(), 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 *DeviceManagementConfigurationSettingValueDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingValueDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValueDefinition) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingValueDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationSettingValueDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValueDefinition) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definitionable.go new file mode 100644 index 000000000..2c411fc87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_definitionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValueDefinitionable +type DeviceManagementConfigurationSettingValueDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_reference.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_reference.go new file mode 100644 index 000000000..eb1ae131e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_reference.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValueTemplateReference setting value template reference information +type DeviceManagementConfigurationSettingValueTemplateReference 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 OdataType property + odataType *string + // Setting value template id + settingValueTemplateId *string + // Indicates whether to update policy setting value to match template setting default value + useTemplateDefault *bool +} +// NewDeviceManagementConfigurationSettingValueTemplateReference instantiates a new deviceManagementConfigurationSettingValueTemplateReference and sets the default values. +func NewDeviceManagementConfigurationSettingValueTemplateReference()(*DeviceManagementConfigurationSettingValueTemplateReference) { + m := &DeviceManagementConfigurationSettingValueTemplateReference{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSettingValueTemplateReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSettingValueTemplateReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSettingValueTemplateReference(), 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 *DeviceManagementConfigurationSettingValueTemplateReference) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSettingValueTemplateReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingValueTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueTemplateId(val) + } + return nil + } + res["useTemplateDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseTemplateDefault(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValueTemplateReference) GetOdataType()(*string) { + return m.odataType +} +// GetSettingValueTemplateId gets the settingValueTemplateId property value. Setting value template id +func (m *DeviceManagementConfigurationSettingValueTemplateReference) GetSettingValueTemplateId()(*string) { + return m.settingValueTemplateId +} +// GetUseTemplateDefault gets the useTemplateDefault property value. Indicates whether to update policy setting value to match template setting default value +func (m *DeviceManagementConfigurationSettingValueTemplateReference) GetUseTemplateDefault()(*bool) { + return m.useTemplateDefault +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSettingValueTemplateReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingValueTemplateId", m.GetSettingValueTemplateId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("useTemplateDefault", m.GetUseTemplateDefault()) + 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 *DeviceManagementConfigurationSettingValueTemplateReference) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSettingValueTemplateReference) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingValueTemplateId sets the settingValueTemplateId property value. Setting value template id +func (m *DeviceManagementConfigurationSettingValueTemplateReference) SetSettingValueTemplateId(value *string)() { + m.settingValueTemplateId = value +} +// SetUseTemplateDefault sets the useTemplateDefault property value. Indicates whether to update policy setting value to match template setting default value +func (m *DeviceManagementConfigurationSettingValueTemplateReference) SetUseTemplateDefault(value *bool)() { + m.useTemplateDefault = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_referenceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_referenceable.go new file mode 100644 index 000000000..095a7c2db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_value_template_referenceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValueTemplateReferenceable +type DeviceManagementConfigurationSettingValueTemplateReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingValueTemplateId()(*string) + GetUseTemplateDefault()(*bool) + SetOdataType(value *string)() + SetSettingValueTemplateId(value *string)() + SetUseTemplateDefault(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_valueable.go new file mode 100644 index 000000000..981316537 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_valueable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingValueable +type DeviceManagementConfigurationSettingValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingValueTemplateReference()(DeviceManagementConfigurationSettingValueTemplateReferenceable) + SetOdataType(value *string)() + SetSettingValueTemplateReference(value DeviceManagementConfigurationSettingValueTemplateReferenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_visibility.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_visibility.go new file mode 100644 index 000000000..3bfad4787 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_setting_visibility.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationSettingVisibility int + +const ( + // Not visible + NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY DeviceManagementConfigurationSettingVisibility = iota + // Visible to setting catalog UX + SETTINGSCATALOG_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY + // Visible to template + TEMPLATE_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY +) + +func (i DeviceManagementConfigurationSettingVisibility) String() string { + return []string{"none", "settingsCatalog", "template"}[i] +} +func ParseDeviceManagementConfigurationSettingVisibility(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY + case "settingsCatalog": + result = SETTINGSCATALOG_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY + case "template": + result = TEMPLATE_DEVICEMANAGEMENTCONFIGURATIONSETTINGVISIBILITY + default: + return 0, errors.New("Unknown DeviceManagementConfigurationSettingVisibility value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationSettingVisibility(values []DeviceManagementConfigurationSettingVisibility) []string { + 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/device_management_configuration_settingable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_settingable.go new file mode 100644 index 000000000..e3b733bb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_settingable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSettingable +type DeviceManagementConfigurationSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettingDefinitions()([]DeviceManagementConfigurationSettingDefinitionable) + GetSettingInstance()(DeviceManagementConfigurationSettingInstanceable) + SetSettingDefinitions(value []DeviceManagementConfigurationSettingDefinitionable)() + SetSettingInstance(value DeviceManagementConfigurationSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition.go new file mode 100644 index 000000000..2f682e047 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionDefinition +type DeviceManagementConfigurationSimpleSettingCollectionDefinition struct { + DeviceManagementConfigurationSimpleSettingDefinition + // Maximum number of simple settings in the collection. Valid values 1 to 100 + maximumCount *int32 + // Minimum number of simple settings in the collection. Valid values 1 to 100 + minimumCount *int32 +} +// NewDeviceManagementConfigurationSimpleSettingCollectionDefinition instantiates a new DeviceManagementConfigurationSimpleSettingCollectionDefinition and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingCollectionDefinition()(*DeviceManagementConfigurationSimpleSettingCollectionDefinition) { + m := &DeviceManagementConfigurationSimpleSettingCollectionDefinition{ + DeviceManagementConfigurationSimpleSettingDefinition: *NewDeviceManagementConfigurationSimpleSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingCollectionDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingCollectionDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingCollectionDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingDefinition.GetFieldDeserializers() + res["maximumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumCount(val) + } + return nil + } + res["minimumCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumCount(val) + } + return nil + } + return res +} +// GetMaximumCount gets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMaximumCount()(*int32) { + return m.maximumCount +} +// GetMinimumCount gets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) GetMinimumCount()(*int32) { + return m.minimumCount +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumCount", m.GetMaximumCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumCount", m.GetMinimumCount()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumCount sets the maximumCount property value. Maximum number of simple settings in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMaximumCount(value *int32)() { + m.maximumCount = value +} +// SetMinimumCount sets the minimumCount property value. Minimum number of simple settings in the collection. Valid values 1 to 100 +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinition) SetMinimumCount(value *int32)() { + m.minimumCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_response.go new file mode 100644 index 000000000..9f45923ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse +type DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSimpleSettingCollectionDefinitionable +} +// NewDeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse()(*DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingCollectionDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingCollectionDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingCollectionDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationSimpleSettingCollectionDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationSimpleSettingCollectionDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_responseable.go new file mode 100644 index 000000000..ce63ca16d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponseable +type DeviceManagementConfigurationSimpleSettingCollectionDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSimpleSettingCollectionDefinitionable) + SetValue(value []DeviceManagementConfigurationSimpleSettingCollectionDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definitionable.go new file mode 100644 index 000000000..41aa27061 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionDefinitionable +type DeviceManagementConfigurationSimpleSettingCollectionDefinitionable interface { + DeviceManagementConfigurationSimpleSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumCount()(*int32) + GetMinimumCount()(*int32) + SetMaximumCount(value *int32)() + SetMinimumCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance.go new file mode 100644 index 000000000..7dcb745a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionInstance +type DeviceManagementConfigurationSimpleSettingCollectionInstance struct { + DeviceManagementConfigurationSettingInstance + // Simple setting collection instance value + simpleSettingCollectionValue []DeviceManagementConfigurationSimpleSettingValueable +} +// NewDeviceManagementConfigurationSimpleSettingCollectionInstance instantiates a new DeviceManagementConfigurationSimpleSettingCollectionInstance and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingCollectionInstance()(*DeviceManagementConfigurationSimpleSettingCollectionInstance) { + m := &DeviceManagementConfigurationSimpleSettingCollectionInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingCollectionInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingCollectionInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingCollectionInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["simpleSettingCollectionValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingValueable) + } + m.SetSimpleSettingCollectionValue(res) + } + return nil + } + return res +} +// GetSimpleSettingCollectionValue gets the simpleSettingCollectionValue property value. Simple setting collection instance value +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstance) GetSimpleSettingCollectionValue()([]DeviceManagementConfigurationSimpleSettingValueable) { + return m.simpleSettingCollectionValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetSimpleSettingCollectionValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSimpleSettingCollectionValue())) + for i, v := range m.GetSimpleSettingCollectionValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("simpleSettingCollectionValue", cast) + if err != nil { + return err + } + } + return nil +} +// SetSimpleSettingCollectionValue sets the simpleSettingCollectionValue property value. Simple setting collection instance value +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstance) SetSimpleSettingCollectionValue(value []DeviceManagementConfigurationSimpleSettingValueable)() { + m.simpleSettingCollectionValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_template.go new file mode 100644 index 000000000..9b47e0812 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_template.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate +type DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Linked policy may append values which are not present in the template. + allowUnmanagedValues *bool + // Simple Setting Collection Value Template + simpleSettingCollectionValueTemplate []DeviceManagementConfigurationSimpleSettingValueTemplateable +} +// NewDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate instantiates a new DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate()(*DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) { + m := &DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate(), nil +} +// GetAllowUnmanagedValues gets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) GetAllowUnmanagedValues()(*bool) { + return m.allowUnmanagedValues +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["allowUnmanagedValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUnmanagedValues(val) + } + return nil + } + res["simpleSettingCollectionValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingValueTemplateable) + } + m.SetSimpleSettingCollectionValueTemplate(res) + } + return nil + } + return res +} +// GetSimpleSettingCollectionValueTemplate gets the simpleSettingCollectionValueTemplate property value. Simple Setting Collection Value Template +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) GetSimpleSettingCollectionValueTemplate()([]DeviceManagementConfigurationSimpleSettingValueTemplateable) { + return m.simpleSettingCollectionValueTemplate +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowUnmanagedValues", m.GetAllowUnmanagedValues()) + if err != nil { + return err + } + } + if m.GetSimpleSettingCollectionValueTemplate() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSimpleSettingCollectionValueTemplate())) + for i, v := range m.GetSimpleSettingCollectionValueTemplate() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("simpleSettingCollectionValueTemplate", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowUnmanagedValues sets the allowUnmanagedValues property value. Linked policy may append values which are not present in the template. +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) SetAllowUnmanagedValues(value *bool)() { + m.allowUnmanagedValues = value +} +// SetSimpleSettingCollectionValueTemplate sets the simpleSettingCollectionValueTemplate property value. Simple Setting Collection Value Template +func (m *DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplate) SetSimpleSettingCollectionValueTemplate(value []DeviceManagementConfigurationSimpleSettingValueTemplateable)() { + m.simpleSettingCollectionValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_templateable.go new file mode 100644 index 000000000..bcb16744c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instance_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplateable +type DeviceManagementConfigurationSimpleSettingCollectionInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowUnmanagedValues()(*bool) + GetSimpleSettingCollectionValueTemplate()([]DeviceManagementConfigurationSimpleSettingValueTemplateable) + SetAllowUnmanagedValues(value *bool)() + SetSimpleSettingCollectionValueTemplate(value []DeviceManagementConfigurationSimpleSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instanceable.go new file mode 100644 index 000000000..3f0a3e75e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_collection_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingCollectionInstanceable +type DeviceManagementConfigurationSimpleSettingCollectionInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSimpleSettingCollectionValue()([]DeviceManagementConfigurationSimpleSettingValueable) + SetSimpleSettingCollectionValue(value []DeviceManagementConfigurationSimpleSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition.go new file mode 100644 index 000000000..d0846228f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition.go @@ -0,0 +1,172 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingDefinition +type DeviceManagementConfigurationSimpleSettingDefinition struct { + DeviceManagementConfigurationSettingDefinition + // Default setting value for this setting + defaultValue DeviceManagementConfigurationSettingValueable + // list of child settings that depend on this setting + dependedOnBy []DeviceManagementConfigurationSettingDependedOnByable + // list of parent settings this setting is dependent on + dependentOn []DeviceManagementConfigurationDependentOnable + // Definition of the value for this setting + valueDefinition DeviceManagementConfigurationSettingValueDefinitionable +} +// NewDeviceManagementConfigurationSimpleSettingDefinition instantiates a new DeviceManagementConfigurationSimpleSettingDefinition and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingDefinition()(*DeviceManagementConfigurationSimpleSettingDefinition) { + m := &DeviceManagementConfigurationSimpleSettingDefinition{ + DeviceManagementConfigurationSettingDefinition: *NewDeviceManagementConfigurationSettingDefinition(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionDefinition": + return NewDeviceManagementConfigurationSimpleSettingCollectionDefinition(), nil + } + } + } + } + return NewDeviceManagementConfigurationSimpleSettingDefinition(), nil +} +// GetDefaultValue gets the defaultValue property value. Default setting value for this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDefaultValue()(DeviceManagementConfigurationSettingValueable) { + return m.defaultValue +} +// GetDependedOnBy gets the dependedOnBy property value. list of child settings that depend on this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) { + return m.dependedOnBy +} +// GetDependentOn gets the dependentOn property value. list of parent settings this setting is dependent on +func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetDependentOn()([]DeviceManagementConfigurationDependentOnable) { + return m.dependentOn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingDefinition.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(DeviceManagementConfigurationSettingValueable)) + } + return nil + } + res["dependedOnBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSettingDependedOnByFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSettingDependedOnByable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSettingDependedOnByable) + } + m.SetDependedOnBy(res) + } + return nil + } + res["dependentOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationDependentOnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationDependentOnable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationDependentOnable) + } + m.SetDependentOn(res) + } + return nil + } + res["valueDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingValueDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValueDefinition(val.(DeviceManagementConfigurationSettingValueDefinitionable)) + } + return nil + } + return res +} +// GetValueDefinition gets the valueDefinition property value. Definition of the value for this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) GetValueDefinition()(DeviceManagementConfigurationSettingValueDefinitionable) { + return m.valueDefinition +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingDefinition.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + if m.GetDependedOnBy() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependedOnBy())) + for i, v := range m.GetDependedOnBy() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dependedOnBy", cast) + if err != nil { + return err + } + } + if m.GetDependentOn() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependentOn())) + for i, v := range m.GetDependentOn() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dependentOn", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("valueDefinition", m.GetValueDefinition()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. Default setting value for this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDefaultValue(value DeviceManagementConfigurationSettingValueable)() { + m.defaultValue = value +} +// SetDependedOnBy sets the dependedOnBy property value. list of child settings that depend on this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() { + m.dependedOnBy = value +} +// SetDependentOn sets the dependentOn property value. list of parent settings this setting is dependent on +func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() { + m.dependentOn = value +} +// SetValueDefinition sets the valueDefinition property value. Definition of the value for this setting +func (m *DeviceManagementConfigurationSimpleSettingDefinition) SetValueDefinition(value DeviceManagementConfigurationSettingValueDefinitionable)() { + m.valueDefinition = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_response.go new file mode 100644 index 000000000..4c43210e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse +type DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSimpleSettingDefinitionable +} +// NewDeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse instantiates a new DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse()(*DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse) { + m := &DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementConfigurationSimpleSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementConfigurationSimpleSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_responseable.go new file mode 100644 index 000000000..b577a3913 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponseable +type DeviceManagementConfigurationSimpleSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSimpleSettingDefinitionable) + SetValue(value []DeviceManagementConfigurationSimpleSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definitionable.go new file mode 100644 index 000000000..fb4bd5b75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_definitionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingDefinitionable +type DeviceManagementConfigurationSimpleSettingDefinitionable interface { + DeviceManagementConfigurationSettingDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(DeviceManagementConfigurationSettingValueable) + GetDependedOnBy()([]DeviceManagementConfigurationSettingDependedOnByable) + GetDependentOn()([]DeviceManagementConfigurationDependentOnable) + GetValueDefinition()(DeviceManagementConfigurationSettingValueDefinitionable) + SetDefaultValue(value DeviceManagementConfigurationSettingValueable)() + SetDependedOnBy(value []DeviceManagementConfigurationSettingDependedOnByable)() + SetDependentOn(value []DeviceManagementConfigurationDependentOnable)() + SetValueDefinition(value DeviceManagementConfigurationSettingValueDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance.go new file mode 100644 index 000000000..086926bb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingInstance +type DeviceManagementConfigurationSimpleSettingInstance struct { + DeviceManagementConfigurationSettingInstance + // The simpleSettingValue property + simpleSettingValue DeviceManagementConfigurationSimpleSettingValueable +} +// NewDeviceManagementConfigurationSimpleSettingInstance instantiates a new DeviceManagementConfigurationSimpleSettingInstance and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingInstance()(*DeviceManagementConfigurationSimpleSettingInstance) { + m := &DeviceManagementConfigurationSimpleSettingInstance{ + DeviceManagementConfigurationSettingInstance: *NewDeviceManagementConfigurationSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstance.GetFieldDeserializers() + res["simpleSettingValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSimpleSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSimpleSettingValue(val.(DeviceManagementConfigurationSimpleSettingValueable)) + } + return nil + } + return res +} +// GetSimpleSettingValue gets the simpleSettingValue property value. The simpleSettingValue property +func (m *DeviceManagementConfigurationSimpleSettingInstance) GetSimpleSettingValue()(DeviceManagementConfigurationSimpleSettingValueable) { + return m.simpleSettingValue +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("simpleSettingValue", m.GetSimpleSettingValue()) + if err != nil { + return err + } + } + return nil +} +// SetSimpleSettingValue sets the simpleSettingValue property value. The simpleSettingValue property +func (m *DeviceManagementConfigurationSimpleSettingInstance) SetSimpleSettingValue(value DeviceManagementConfigurationSimpleSettingValueable)() { + m.simpleSettingValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_template.go new file mode 100644 index 000000000..e2daaf9fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingInstanceTemplate +type DeviceManagementConfigurationSimpleSettingInstanceTemplate struct { + DeviceManagementConfigurationSettingInstanceTemplate + // Simple Setting Value Template + simpleSettingValueTemplate DeviceManagementConfigurationSimpleSettingValueTemplateable +} +// NewDeviceManagementConfigurationSimpleSettingInstanceTemplate instantiates a new DeviceManagementConfigurationSimpleSettingInstanceTemplate and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingInstanceTemplate()(*DeviceManagementConfigurationSimpleSettingInstanceTemplate) { + m := &DeviceManagementConfigurationSimpleSettingInstanceTemplate{ + DeviceManagementConfigurationSettingInstanceTemplate: *NewDeviceManagementConfigurationSettingInstanceTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSimpleSettingInstanceTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingInstanceTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingInstanceTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingInstanceTemplate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingInstanceTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingInstanceTemplate.GetFieldDeserializers() + res["simpleSettingValueTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSimpleSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSimpleSettingValueTemplate(val.(DeviceManagementConfigurationSimpleSettingValueTemplateable)) + } + return nil + } + return res +} +// GetSimpleSettingValueTemplate gets the simpleSettingValueTemplate property value. Simple Setting Value Template +func (m *DeviceManagementConfigurationSimpleSettingInstanceTemplate) GetSimpleSettingValueTemplate()(DeviceManagementConfigurationSimpleSettingValueTemplateable) { + return m.simpleSettingValueTemplate +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingInstanceTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingInstanceTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("simpleSettingValueTemplate", m.GetSimpleSettingValueTemplate()) + if err != nil { + return err + } + } + return nil +} +// SetSimpleSettingValueTemplate sets the simpleSettingValueTemplate property value. Simple Setting Value Template +func (m *DeviceManagementConfigurationSimpleSettingInstanceTemplate) SetSimpleSettingValueTemplate(value DeviceManagementConfigurationSimpleSettingValueTemplateable)() { + m.simpleSettingValueTemplate = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_templateable.go new file mode 100644 index 000000000..9b3e7cb6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instance_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingInstanceTemplateable +type DeviceManagementConfigurationSimpleSettingInstanceTemplateable interface { + DeviceManagementConfigurationSettingInstanceTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSimpleSettingValueTemplate()(DeviceManagementConfigurationSimpleSettingValueTemplateable) + SetSimpleSettingValueTemplate(value DeviceManagementConfigurationSimpleSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instanceable.go new file mode 100644 index 000000000..91fd75d9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingInstanceable +type DeviceManagementConfigurationSimpleSettingInstanceable interface { + DeviceManagementConfigurationSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSimpleSettingValue()(DeviceManagementConfigurationSimpleSettingValueable) + SetSimpleSettingValue(value DeviceManagementConfigurationSimpleSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value.go new file mode 100644 index 000000000..4e6678889 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValue +type DeviceManagementConfigurationSimpleSettingValue struct { + DeviceManagementConfigurationSettingValue +} +// NewDeviceManagementConfigurationSimpleSettingValue instantiates a new DeviceManagementConfigurationSimpleSettingValue and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingValue()(*DeviceManagementConfigurationSimpleSettingValue) { + m := &DeviceManagementConfigurationSimpleSettingValue{ + DeviceManagementConfigurationSettingValue: *NewDeviceManagementConfigurationSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationSimpleSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationIntegerSettingValue": + return NewDeviceManagementConfigurationIntegerSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationReferenceSettingValue": + return NewDeviceManagementConfigurationReferenceSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationSecretSettingValue": + return NewDeviceManagementConfigurationSecretSettingValue(), nil + case "#microsoft.graph.deviceManagementConfigurationStringSettingValue": + return NewDeviceManagementConfigurationStringSettingValue(), nil + } + } + } + } + return NewDeviceManagementConfigurationSimpleSettingValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingValue.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingValue.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_response.go new file mode 100644 index 000000000..3b3214653 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueCollectionResponse +type DeviceManagementConfigurationSimpleSettingValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSimpleSettingValueable +} +// NewDeviceManagementConfigurationSimpleSettingValueCollectionResponse instantiates a new DeviceManagementConfigurationSimpleSettingValueCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingValueCollectionResponse()(*DeviceManagementConfigurationSimpleSettingValueCollectionResponse) { + m := &DeviceManagementConfigurationSimpleSettingValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingValueCollectionResponse) GetValue()([]DeviceManagementConfigurationSimpleSettingValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingValueCollectionResponse) SetValue(value []DeviceManagementConfigurationSimpleSettingValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_responseable.go new file mode 100644 index 000000000..b5e91233a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueCollectionResponseable +type DeviceManagementConfigurationSimpleSettingValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSimpleSettingValueable) + SetValue(value []DeviceManagementConfigurationSimpleSettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template.go new file mode 100644 index 000000000..4fdeb69f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueTemplate simple Setting Value Template +type DeviceManagementConfigurationSimpleSettingValueTemplate 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 OdataType property + odataType *string + // Setting Value Template Id + settingValueTemplateId *string +} +// NewDeviceManagementConfigurationSimpleSettingValueTemplate instantiates a new deviceManagementConfigurationSimpleSettingValueTemplate and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingValueTemplate()(*DeviceManagementConfigurationSimpleSettingValueTemplate) { + m := &DeviceManagementConfigurationSimpleSettingValueTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationSimpleSettingValueTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingValueTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationIntegerSettingValueTemplate": + return NewDeviceManagementConfigurationIntegerSettingValueTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationStringSettingValueTemplate": + return NewDeviceManagementConfigurationStringSettingValueTemplate(), nil + } + } + } + } + return NewDeviceManagementConfigurationSimpleSettingValueTemplate(), 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 *DeviceManagementConfigurationSimpleSettingValueTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["settingValueTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetSettingValueTemplateId gets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) GetSettingValueTemplateId()(*string) { + return m.settingValueTemplateId +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingValueTemplateId", m.GetSettingValueTemplateId()) + 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 *DeviceManagementConfigurationSimpleSettingValueTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetSettingValueTemplateId sets the settingValueTemplateId property value. Setting Value Template Id +func (m *DeviceManagementConfigurationSimpleSettingValueTemplate) SetSettingValueTemplateId(value *string)() { + m.settingValueTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_response.go new file mode 100644 index 000000000..81c95babe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse +type DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConfigurationSimpleSettingValueTemplateable +} +// NewDeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse instantiates a new DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse and sets the default values. +func NewDeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse()(*DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse) { + m := &DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationSimpleSettingValueTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationSimpleSettingValueTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationSimpleSettingValueTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse) GetValue()([]DeviceManagementConfigurationSimpleSettingValueTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponse) SetValue(value []DeviceManagementConfigurationSimpleSettingValueTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_responseable.go new file mode 100644 index 000000000..77a06c6b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponseable +type DeviceManagementConfigurationSimpleSettingValueTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConfigurationSimpleSettingValueTemplateable) + SetValue(value []DeviceManagementConfigurationSimpleSettingValueTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_templateable.go new file mode 100644 index 000000000..0e5158136 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_value_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueTemplateable +type DeviceManagementConfigurationSimpleSettingValueTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSettingValueTemplateId()(*string) + SetOdataType(value *string)() + SetSettingValueTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_valueable.go new file mode 100644 index 000000000..84b295301 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_simple_setting_valueable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationSimpleSettingValueable +type DeviceManagementConfigurationSimpleSettingValueable interface { + DeviceManagementConfigurationSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_format.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_format.go new file mode 100644 index 000000000..533c8be86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_format.go @@ -0,0 +1,73 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationStringFormat int + +const ( + NONE_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT DeviceManagementConfigurationStringFormat = iota + EMAIL_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + GUID_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + IP_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + BASE64_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + URL_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + VERSION_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + XML_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + DATE_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + TIME_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + BINARY_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + REGEX_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + JSON_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + DATETIME_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + SURFACEHUB_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT +) + +func (i DeviceManagementConfigurationStringFormat) String() string { + return []string{"none", "email", "guid", "ip", "base64", "url", "version", "xml", "date", "time", "binary", "regEx", "json", "dateTime", "surfaceHub"}[i] +} +func ParseDeviceManagementConfigurationStringFormat(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "email": + result = EMAIL_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "guid": + result = GUID_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "ip": + result = IP_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "base64": + result = BASE64_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "url": + result = URL_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "version": + result = VERSION_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "xml": + result = XML_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "date": + result = DATE_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "time": + result = TIME_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "binary": + result = BINARY_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "regEx": + result = REGEX_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "json": + result = JSON_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "dateTime": + result = DATETIME_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + case "surfaceHub": + result = SURFACEHUB_DEVICEMANAGEMENTCONFIGURATIONSTRINGFORMAT + default: + return 0, errors.New("Unknown DeviceManagementConfigurationStringFormat value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationStringFormat(values []DeviceManagementConfigurationStringFormat) []string { + 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/device_management_configuration_string_setting_value.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value.go new file mode 100644 index 000000000..0171bc562 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValue +type DeviceManagementConfigurationStringSettingValue struct { + DeviceManagementConfigurationSimpleSettingValue + // Value of the string setting. + value *string +} +// NewDeviceManagementConfigurationStringSettingValue instantiates a new DeviceManagementConfigurationStringSettingValue and sets the default values. +func NewDeviceManagementConfigurationStringSettingValue()(*DeviceManagementConfigurationStringSettingValue) { + m := &DeviceManagementConfigurationStringSettingValue{ + DeviceManagementConfigurationSimpleSettingValue: *NewDeviceManagementConfigurationSimpleSettingValue(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationStringSettingValue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationStringSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationStringSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationReferenceSettingValue": + return NewDeviceManagementConfigurationReferenceSettingValue(), nil + } + } + } + } + return NewDeviceManagementConfigurationStringSettingValue(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationStringSettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingValue.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. Value of the string setting. +func (m *DeviceManagementConfigurationStringSettingValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationStringSettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value of the string setting. +func (m *DeviceManagementConfigurationStringSettingValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_template.go new file mode 100644 index 000000000..63002368b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate +type DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate struct { + DeviceManagementConfigurationStringSettingValueDefaultTemplate + // Default Constant Value + constantValue *string +} +// NewDeviceManagementConfigurationStringSettingValueConstantDefaultTemplate instantiates a new DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationStringSettingValueConstantDefaultTemplate()(*DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate) { + m := &DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate{ + DeviceManagementConfigurationStringSettingValueDefaultTemplate: *NewDeviceManagementConfigurationStringSettingValueDefaultTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationStringSettingValueConstantDefaultTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationStringSettingValueConstantDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationStringSettingValueConstantDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationStringSettingValueConstantDefaultTemplate(), nil +} +// GetConstantValue gets the constantValue property value. Default Constant Value +func (m *DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate) GetConstantValue()(*string) { + return m.constantValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationStringSettingValueDefaultTemplate.GetFieldDeserializers() + res["constantValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConstantValue(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationStringSettingValueDefaultTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("constantValue", m.GetConstantValue()) + if err != nil { + return err + } + } + return nil +} +// SetConstantValue sets the constantValue property value. Default Constant Value +func (m *DeviceManagementConfigurationStringSettingValueConstantDefaultTemplate) SetConstantValue(value *string)() { + m.constantValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_templateable.go new file mode 100644 index 000000000..f09b62381 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_constant_default_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueConstantDefaultTemplateable +type DeviceManagementConfigurationStringSettingValueConstantDefaultTemplateable interface { + DeviceManagementConfigurationStringSettingValueDefaultTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConstantValue()(*string) + SetConstantValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_template.go new file mode 100644 index 000000000..5bb354f61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_template.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueDefaultTemplate string Setting Value Default Template +type DeviceManagementConfigurationStringSettingValueDefaultTemplate 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 OdataType property + odataType *string +} +// NewDeviceManagementConfigurationStringSettingValueDefaultTemplate instantiates a new deviceManagementConfigurationStringSettingValueDefaultTemplate and sets the default values. +func NewDeviceManagementConfigurationStringSettingValueDefaultTemplate()(*DeviceManagementConfigurationStringSettingValueDefaultTemplate) { + m := &DeviceManagementConfigurationStringSettingValueDefaultTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConfigurationStringSettingValueDefaultTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationStringSettingValueDefaultTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementConfigurationStringSettingValueConstantDefaultTemplate": + return NewDeviceManagementConfigurationStringSettingValueConstantDefaultTemplate(), nil + } + } + } + } + return NewDeviceManagementConfigurationStringSettingValueDefaultTemplate(), 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 *DeviceManagementConfigurationStringSettingValueDefaultTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationStringSettingValueDefaultTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationStringSettingValueDefaultTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationStringSettingValueDefaultTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConfigurationStringSettingValueDefaultTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConfigurationStringSettingValueDefaultTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_templateable.go new file mode 100644 index 000000000..295882753 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_default_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueDefaultTemplateable +type DeviceManagementConfigurationStringSettingValueDefaultTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definition.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definition.go new file mode 100644 index 000000000..62238b8a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definition.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueDefinition +type DeviceManagementConfigurationStringSettingValueDefinition struct { + DeviceManagementConfigurationSettingValueDefinition + // Supported file types for this setting. + fileTypes []string + // The format property + format *DeviceManagementConfigurationStringFormat + // Regular expression or any xml or json schema that the input string should match + inputValidationSchema *string + // Specifies whether the setting needs to be treated as a secret. Settings marked as yes will be encrypted in transit and at rest and will be displayed as asterisks when represented in the UX. + isSecret *bool + // Maximum length of string + maximumLength *int64 + // Minimum length of string + minimumLength *int64 +} +// NewDeviceManagementConfigurationStringSettingValueDefinition instantiates a new DeviceManagementConfigurationStringSettingValueDefinition and sets the default values. +func NewDeviceManagementConfigurationStringSettingValueDefinition()(*DeviceManagementConfigurationStringSettingValueDefinition) { + m := &DeviceManagementConfigurationStringSettingValueDefinition{ + DeviceManagementConfigurationSettingValueDefinition: *NewDeviceManagementConfigurationSettingValueDefinition(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationStringSettingValueDefinition"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationStringSettingValueDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationStringSettingValueDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationStringSettingValueDefinition(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingValueDefinition.GetFieldDeserializers() + res["fileTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetFileTypes(res) + } + return nil + } + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationStringFormat) + if err != nil { + return err + } + if val != nil { + m.SetFormat(val.(*DeviceManagementConfigurationStringFormat)) + } + return nil + } + res["inputValidationSchema"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInputValidationSchema(val) + } + return nil + } + res["isSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSecret(val) + } + return nil + } + res["maximumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumLength(val) + } + return nil + } + res["minimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumLength(val) + } + return nil + } + return res +} +// GetFileTypes gets the fileTypes property value. Supported file types for this setting. +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetFileTypes()([]string) { + return m.fileTypes +} +// GetFormat gets the format property value. The format property +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetFormat()(*DeviceManagementConfigurationStringFormat) { + return m.format +} +// GetInputValidationSchema gets the inputValidationSchema property value. Regular expression or any xml or json schema that the input string should match +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetInputValidationSchema()(*string) { + return m.inputValidationSchema +} +// GetIsSecret gets the isSecret property value. Specifies whether the setting needs to be treated as a secret. Settings marked as yes will be encrypted in transit and at rest and will be displayed as asterisks when represented in the UX. +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetIsSecret()(*bool) { + return m.isSecret +} +// GetMaximumLength gets the maximumLength property value. Maximum length of string +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetMaximumLength()(*int64) { + return m.maximumLength +} +// GetMinimumLength gets the minimumLength property value. Minimum length of string +func (m *DeviceManagementConfigurationStringSettingValueDefinition) GetMinimumLength()(*int64) { + return m.minimumLength +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationStringSettingValueDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingValueDefinition.Serialize(writer) + if err != nil { + return err + } + if m.GetFileTypes() != nil { + err = writer.WriteCollectionOfStringValues("fileTypes", m.GetFileTypes()) + if err != nil { + return err + } + } + if m.GetFormat() != nil { + cast := (*m.GetFormat()).String() + err = writer.WriteStringValue("format", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("inputValidationSchema", m.GetInputValidationSchema()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSecret", m.GetIsSecret()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maximumLength", m.GetMaximumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("minimumLength", m.GetMinimumLength()) + if err != nil { + return err + } + } + return nil +} +// SetFileTypes sets the fileTypes property value. Supported file types for this setting. +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetFileTypes(value []string)() { + m.fileTypes = value +} +// SetFormat sets the format property value. The format property +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetFormat(value *DeviceManagementConfigurationStringFormat)() { + m.format = value +} +// SetInputValidationSchema sets the inputValidationSchema property value. Regular expression or any xml or json schema that the input string should match +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetInputValidationSchema(value *string)() { + m.inputValidationSchema = value +} +// SetIsSecret sets the isSecret property value. Specifies whether the setting needs to be treated as a secret. Settings marked as yes will be encrypted in transit and at rest and will be displayed as asterisks when represented in the UX. +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetIsSecret(value *bool)() { + m.isSecret = value +} +// SetMaximumLength sets the maximumLength property value. Maximum length of string +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetMaximumLength(value *int64)() { + m.maximumLength = value +} +// SetMinimumLength sets the minimumLength property value. Minimum length of string +func (m *DeviceManagementConfigurationStringSettingValueDefinition) SetMinimumLength(value *int64)() { + m.minimumLength = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definitionable.go new file mode 100644 index 000000000..8e611da00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_definitionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueDefinitionable +type DeviceManagementConfigurationStringSettingValueDefinitionable interface { + DeviceManagementConfigurationSettingValueDefinitionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileTypes()([]string) + GetFormat()(*DeviceManagementConfigurationStringFormat) + GetInputValidationSchema()(*string) + GetIsSecret()(*bool) + GetMaximumLength()(*int64) + GetMinimumLength()(*int64) + SetFileTypes(value []string)() + SetFormat(value *DeviceManagementConfigurationStringFormat)() + SetInputValidationSchema(value *string)() + SetIsSecret(value *bool)() + SetMaximumLength(value *int64)() + SetMinimumLength(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_template.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_template.go new file mode 100644 index 000000000..1b81582e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_template.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueTemplate +type DeviceManagementConfigurationStringSettingValueTemplate struct { + DeviceManagementConfigurationSimpleSettingValueTemplate + // String Setting Value Default Template. + defaultValue DeviceManagementConfigurationStringSettingValueDefaultTemplateable +} +// NewDeviceManagementConfigurationStringSettingValueTemplate instantiates a new DeviceManagementConfigurationStringSettingValueTemplate and sets the default values. +func NewDeviceManagementConfigurationStringSettingValueTemplate()(*DeviceManagementConfigurationStringSettingValueTemplate) { + m := &DeviceManagementConfigurationStringSettingValueTemplate{ + DeviceManagementConfigurationSimpleSettingValueTemplate: *NewDeviceManagementConfigurationSimpleSettingValueTemplate(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationStringSettingValueTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationStringSettingValueTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationStringSettingValueTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationStringSettingValueTemplate(), nil +} +// GetDefaultValue gets the defaultValue property value. String Setting Value Default Template. +func (m *DeviceManagementConfigurationStringSettingValueTemplate) GetDefaultValue()(DeviceManagementConfigurationStringSettingValueDefaultTemplateable) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationStringSettingValueTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSimpleSettingValueTemplate.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationStringSettingValueDefaultTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val.(DeviceManagementConfigurationStringSettingValueDefaultTemplateable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationStringSettingValueTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSimpleSettingValueTemplate.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. String Setting Value Default Template. +func (m *DeviceManagementConfigurationStringSettingValueTemplate) SetDefaultValue(value DeviceManagementConfigurationStringSettingValueDefaultTemplateable)() { + m.defaultValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_templateable.go new file mode 100644 index 000000000..0e3c02b0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_value_templateable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueTemplateable +type DeviceManagementConfigurationStringSettingValueTemplateable interface { + DeviceManagementConfigurationSimpleSettingValueTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(DeviceManagementConfigurationStringSettingValueDefaultTemplateable) + SetDefaultValue(value DeviceManagementConfigurationStringSettingValueDefaultTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_valueable.go new file mode 100644 index 000000000..6fa567514 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_string_setting_valueable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationStringSettingValueable +type DeviceManagementConfigurationStringSettingValueable interface { + DeviceManagementConfigurationSimpleSettingValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_technologies.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_technologies.go new file mode 100644 index 000000000..003412ce4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_technologies.go @@ -0,0 +1,72 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationTechnologies int + +const ( + // Setting cannot be deployed through any channel + NONE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES DeviceManagementConfigurationTechnologies = iota + // Setting can be deployed through the MDM channel + MDM_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the Windows10XManagement channel + WINDOWS10XMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the ConfigManager channel + CONFIGMANAGER_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the AppleRemoteManagement channel + APPLEREMOTEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the SENSE agent channel + MICROSOFTSENSE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the Exchange Online agent channel + EXCHANGEONLINE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through the Linux Mdm channel + LINUXMDM_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed through device enrollment. + ENROLLMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Setting can be deployed using the Endpoint privilege management channel + ENDPOINTPRIVILEGEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES +) + +func (i DeviceManagementConfigurationTechnologies) String() string { + return []string{"none", "mdm", "windows10XManagement", "configManager", "appleRemoteManagement", "microsoftSense", "exchangeOnline", "linuxMdm", "enrollment", "endpointPrivilegeManagement", "unknownFutureValue"}[i] +} +func ParseDeviceManagementConfigurationTechnologies(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "mdm": + result = MDM_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "windows10XManagement": + result = WINDOWS10XMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "configManager": + result = CONFIGMANAGER_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "appleRemoteManagement": + result = APPLEREMOTEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "microsoftSense": + result = MICROSOFTSENSE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "exchangeOnline": + result = EXCHANGEONLINE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "linuxMdm": + result = LINUXMDM_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "enrollment": + result = ENROLLMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "endpointPrivilegeManagement": + result = ENDPOINTPRIVILEGEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONTECHNOLOGIES + default: + return 0, errors.New("Unknown DeviceManagementConfigurationTechnologies value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationTechnologies(values []DeviceManagementConfigurationTechnologies) []string { + 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/device_management_configuration_template_family.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_template_family.go new file mode 100644 index 000000000..7414d30f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_template_family.go @@ -0,0 +1,80 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationTemplateFamily int + +const ( + // Default for Template Family when Policy is not linked to a Template + NONE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY DeviceManagementConfigurationTemplateFamily = iota + // Template Family for EndpointSecurityAntivirus that manages the discrete group of antivirus settings for managed devices + ENDPOINTSECURITYANTIVIRUS_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EndpointSecurityDiskEncryption that provides settings that are relevant for a devices built-in encryption method, like FileVault or BitLocker + ENDPOINTSECURITYDISKENCRYPTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EndpointSecurityFirewall that helps configure a devices built-in firewall for device that run macOS and Windows 10 + ENDPOINTSECURITYFIREWALL_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EndpointSecurityEndpointDetectionAndResponse that facilitates management of the EDR settings and onboard devices to Microsoft Defender for Endpoint + ENDPOINTSECURITYENDPOINTDETECTIONANDRESPONSE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EndpointSecurityAttackSurfaceReduction that help reduce your attack surfaces, by minimizing the places where your organization is vulnerable to cyberthreats and attacks + ENDPOINTSECURITYATTACKSURFACEREDUCTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EndpointSecurityAccountProtection that facilitates protecting the identity and accounts of users + ENDPOINTSECURITYACCOUNTPROTECTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for ApplicationControl that helps mitigate security threats by restricting the applications that users can run and the code that runs in the System Core (kernel) + ENDPOINTSECURITYAPPLICATIONCONTROL_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EPM Elevation Rules + ENDPOINTSECURITYENDPOINTPRIVILEGEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for EnrollmentConfiguration + ENROLLMENTCONFIGURATION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for QuietTimeIndicates Template Family for all the Apps QuietTime policies and templates + APPQUIETTIME_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Template Family for Baseline + BASELINE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY +) + +func (i DeviceManagementConfigurationTemplateFamily) String() string { + return []string{"none", "endpointSecurityAntivirus", "endpointSecurityDiskEncryption", "endpointSecurityFirewall", "endpointSecurityEndpointDetectionAndResponse", "endpointSecurityAttackSurfaceReduction", "endpointSecurityAccountProtection", "endpointSecurityApplicationControl", "endpointSecurityEndpointPrivilegeManagement", "enrollmentConfiguration", "appQuietTime", "baseline", "unknownFutureValue"}[i] +} +func ParseDeviceManagementConfigurationTemplateFamily(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityAntivirus": + result = ENDPOINTSECURITYANTIVIRUS_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityDiskEncryption": + result = ENDPOINTSECURITYDISKENCRYPTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityFirewall": + result = ENDPOINTSECURITYFIREWALL_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityEndpointDetectionAndResponse": + result = ENDPOINTSECURITYENDPOINTDETECTIONANDRESPONSE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityAttackSurfaceReduction": + result = ENDPOINTSECURITYATTACKSURFACEREDUCTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityAccountProtection": + result = ENDPOINTSECURITYACCOUNTPROTECTION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityApplicationControl": + result = ENDPOINTSECURITYAPPLICATIONCONTROL_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "endpointSecurityEndpointPrivilegeManagement": + result = ENDPOINTSECURITYENDPOINTPRIVILEGEMANAGEMENT_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "enrollmentConfiguration": + result = ENROLLMENTCONFIGURATION_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "appQuietTime": + result = APPQUIETTIME_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "baseline": + result = BASELINE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTCONFIGURATIONTEMPLATEFAMILY + default: + return 0, errors.New("Unknown DeviceManagementConfigurationTemplateFamily value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationTemplateFamily(values []DeviceManagementConfigurationTemplateFamily) []string { + 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/device_management_configuration_windows_setting_applicability.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_setting_applicability.go new file mode 100644 index 000000000..e7cc469a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_setting_applicability.go @@ -0,0 +1,197 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationWindowsSettingApplicability +type DeviceManagementConfigurationWindowsSettingApplicability struct { + DeviceManagementConfigurationSettingApplicability + // Version of CSP setting is a part of + configurationServiceProviderVersion *string + // Maximum supported version of Windows + maximumSupportedVersion *string + // Minimum supported version of Windows + minimumSupportedVersion *string + // Required AAD Trust Type + requiredAzureAdTrustType *DeviceManagementConfigurationAzureAdTrustType + // AzureAD setting requirement + requiresAzureAd *bool + // List of Windows SKUs that the setting is applicable for + windowsSkus []DeviceManagementConfigurationWindowsSkus +} +// NewDeviceManagementConfigurationWindowsSettingApplicability instantiates a new DeviceManagementConfigurationWindowsSettingApplicability and sets the default values. +func NewDeviceManagementConfigurationWindowsSettingApplicability()(*DeviceManagementConfigurationWindowsSettingApplicability) { + m := &DeviceManagementConfigurationWindowsSettingApplicability{ + DeviceManagementConfigurationSettingApplicability: *NewDeviceManagementConfigurationSettingApplicability(), + } + odataTypeValue := "#microsoft.graph.deviceManagementConfigurationWindowsSettingApplicability"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementConfigurationWindowsSettingApplicabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConfigurationWindowsSettingApplicabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConfigurationWindowsSettingApplicability(), nil +} +// GetConfigurationServiceProviderVersion gets the configurationServiceProviderVersion property value. Version of CSP setting is a part of +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetConfigurationServiceProviderVersion()(*string) { + return m.configurationServiceProviderVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConfigurationSettingApplicability.GetFieldDeserializers() + res["configurationServiceProviderVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationServiceProviderVersion(val) + } + return nil + } + res["maximumSupportedVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumSupportedVersion(val) + } + return nil + } + res["minimumSupportedVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedVersion(val) + } + return nil + } + res["requiredAzureAdTrustType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementConfigurationAzureAdTrustType) + if err != nil { + return err + } + if val != nil { + m.SetRequiredAzureAdTrustType(val.(*DeviceManagementConfigurationAzureAdTrustType)) + } + return nil + } + res["requiresAzureAd"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiresAzureAd(val) + } + return nil + } + res["windowsSkus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseDeviceManagementConfigurationWindowsSkus) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationWindowsSkus, len(val)) + for i, v := range val { + res[i] = *(v.(*DeviceManagementConfigurationWindowsSkus)) + } + m.SetWindowsSkus(res) + } + return nil + } + return res +} +// GetMaximumSupportedVersion gets the maximumSupportedVersion property value. Maximum supported version of Windows +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetMaximumSupportedVersion()(*string) { + return m.maximumSupportedVersion +} +// GetMinimumSupportedVersion gets the minimumSupportedVersion property value. Minimum supported version of Windows +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetMinimumSupportedVersion()(*string) { + return m.minimumSupportedVersion +} +// GetRequiredAzureAdTrustType gets the requiredAzureAdTrustType property value. Required AAD Trust Type +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetRequiredAzureAdTrustType()(*DeviceManagementConfigurationAzureAdTrustType) { + return m.requiredAzureAdTrustType +} +// GetRequiresAzureAd gets the requiresAzureAd property value. AzureAD setting requirement +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetRequiresAzureAd()(*bool) { + return m.requiresAzureAd +} +// GetWindowsSkus gets the windowsSkus property value. List of Windows SKUs that the setting is applicable for +func (m *DeviceManagementConfigurationWindowsSettingApplicability) GetWindowsSkus()([]DeviceManagementConfigurationWindowsSkus) { + return m.windowsSkus +} +// Serialize serializes information the current object +func (m *DeviceManagementConfigurationWindowsSettingApplicability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConfigurationSettingApplicability.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("configurationServiceProviderVersion", m.GetConfigurationServiceProviderVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("maximumSupportedVersion", m.GetMaximumSupportedVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumSupportedVersion", m.GetMinimumSupportedVersion()) + if err != nil { + return err + } + } + if m.GetRequiredAzureAdTrustType() != nil { + cast := (*m.GetRequiredAzureAdTrustType()).String() + err = writer.WriteStringValue("requiredAzureAdTrustType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requiresAzureAd", m.GetRequiresAzureAd()) + if err != nil { + return err + } + } + if m.GetWindowsSkus() != nil { + err = writer.WriteCollectionOfStringValues("windowsSkus", SerializeDeviceManagementConfigurationWindowsSkus(m.GetWindowsSkus())) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationServiceProviderVersion sets the configurationServiceProviderVersion property value. Version of CSP setting is a part of +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetConfigurationServiceProviderVersion(value *string)() { + m.configurationServiceProviderVersion = value +} +// SetMaximumSupportedVersion sets the maximumSupportedVersion property value. Maximum supported version of Windows +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetMaximumSupportedVersion(value *string)() { + m.maximumSupportedVersion = value +} +// SetMinimumSupportedVersion sets the minimumSupportedVersion property value. Minimum supported version of Windows +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetMinimumSupportedVersion(value *string)() { + m.minimumSupportedVersion = value +} +// SetRequiredAzureAdTrustType sets the requiredAzureAdTrustType property value. Required AAD Trust Type +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetRequiredAzureAdTrustType(value *DeviceManagementConfigurationAzureAdTrustType)() { + m.requiredAzureAdTrustType = value +} +// SetRequiresAzureAd sets the requiresAzureAd property value. AzureAD setting requirement +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetRequiresAzureAd(value *bool)() { + m.requiresAzureAd = value +} +// SetWindowsSkus sets the windowsSkus property value. List of Windows SKUs that the setting is applicable for +func (m *DeviceManagementConfigurationWindowsSettingApplicability) SetWindowsSkus(value []DeviceManagementConfigurationWindowsSkus)() { + m.windowsSkus = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_setting_applicabilityable.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_setting_applicabilityable.go new file mode 100644 index 000000000..cce74385b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_setting_applicabilityable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConfigurationWindowsSettingApplicabilityable +type DeviceManagementConfigurationWindowsSettingApplicabilityable interface { + DeviceManagementConfigurationSettingApplicabilityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationServiceProviderVersion()(*string) + GetMaximumSupportedVersion()(*string) + GetMinimumSupportedVersion()(*string) + GetRequiredAzureAdTrustType()(*DeviceManagementConfigurationAzureAdTrustType) + GetRequiresAzureAd()(*bool) + GetWindowsSkus()([]DeviceManagementConfigurationWindowsSkus) + SetConfigurationServiceProviderVersion(value *string)() + SetMaximumSupportedVersion(value *string)() + SetMinimumSupportedVersion(value *string)() + SetRequiredAzureAdTrustType(value *DeviceManagementConfigurationAzureAdTrustType)() + SetRequiresAzureAd(value *bool)() + SetWindowsSkus(value []DeviceManagementConfigurationWindowsSkus)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_skus.go b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_skus.go new file mode 100644 index 000000000..ee66cee66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_configuration_windows_skus.go @@ -0,0 +1,73 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementConfigurationWindowsSkus int + +const ( + UNKNOWN_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS DeviceManagementConfigurationWindowsSkus = iota + WINDOWSHOME_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSPROFESSIONAL_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSEDUCATION_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSMOBILE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSMOBILEENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSTEAMSURFACE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + IOT_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + IOTENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + HOLOLENS_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + HOLOLENSENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + HOLOGRAPHICFORBUSINESS_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + WINDOWSMULTISESSION_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + SURFACEHUB_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS +) + +func (i DeviceManagementConfigurationWindowsSkus) String() string { + return []string{"unknown", "windowsHome", "windowsProfessional", "windowsEnterprise", "windowsEducation", "windowsMobile", "windowsMobileEnterprise", "windowsTeamSurface", "iot", "iotEnterprise", "holoLens", "holoLensEnterprise", "holographicForBusiness", "windowsMultiSession", "surfaceHub"}[i] +} +func ParseDeviceManagementConfigurationWindowsSkus(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsHome": + result = WINDOWSHOME_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsProfessional": + result = WINDOWSPROFESSIONAL_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsEnterprise": + result = WINDOWSENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsEducation": + result = WINDOWSEDUCATION_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsMobile": + result = WINDOWSMOBILE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsMobileEnterprise": + result = WINDOWSMOBILEENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsTeamSurface": + result = WINDOWSTEAMSURFACE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "iot": + result = IOT_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "iotEnterprise": + result = IOTENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "holoLens": + result = HOLOLENS_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "holoLensEnterprise": + result = HOLOLENSENTERPRISE_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "holographicForBusiness": + result = HOLOGRAPHICFORBUSINESS_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "windowsMultiSession": + result = WINDOWSMULTISESSION_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + case "surfaceHub": + result = SURFACEHUB_DEVICEMANAGEMENTCONFIGURATIONWINDOWSSKUS + default: + return 0, errors.New("Unknown DeviceManagementConfigurationWindowsSkus value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementConfigurationWindowsSkus(values []DeviceManagementConfigurationWindowsSkus) []string { + 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/device_management_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_constraint.go new file mode 100644 index 000000000..18d8501aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_constraint.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConstraint base entity for a constraint +type DeviceManagementConstraint 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 OdataType property + odataType *string +} +// NewDeviceManagementConstraint instantiates a new deviceManagementConstraint and sets the default values. +func NewDeviceManagementConstraint()(*DeviceManagementConstraint) { + m := &DeviceManagementConstraint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementEnumConstraint": + return NewDeviceManagementEnumConstraint(), nil + case "#microsoft.graph.deviceManagementIntentSettingSecretConstraint": + return NewDeviceManagementIntentSettingSecretConstraint(), nil + case "#microsoft.graph.deviceManagementSettingAbstractImplementationConstraint": + return NewDeviceManagementSettingAbstractImplementationConstraint(), nil + case "#microsoft.graph.deviceManagementSettingAppConstraint": + return NewDeviceManagementSettingAppConstraint(), nil + case "#microsoft.graph.deviceManagementSettingBooleanConstraint": + return NewDeviceManagementSettingBooleanConstraint(), nil + case "#microsoft.graph.deviceManagementSettingCollectionConstraint": + return NewDeviceManagementSettingCollectionConstraint(), nil + case "#microsoft.graph.deviceManagementSettingEnrollmentTypeConstraint": + return NewDeviceManagementSettingEnrollmentTypeConstraint(), nil + case "#microsoft.graph.deviceManagementSettingFileConstraint": + return NewDeviceManagementSettingFileConstraint(), nil + case "#microsoft.graph.deviceManagementSettingIntegerConstraint": + return NewDeviceManagementSettingIntegerConstraint(), nil + case "#microsoft.graph.deviceManagementSettingProfileConstraint": + return NewDeviceManagementSettingProfileConstraint(), nil + case "#microsoft.graph.deviceManagementSettingRegexConstraint": + return NewDeviceManagementSettingRegexConstraint(), nil + case "#microsoft.graph.deviceManagementSettingRequiredConstraint": + return NewDeviceManagementSettingRequiredConstraint(), nil + case "#microsoft.graph.deviceManagementSettingSddlConstraint": + return NewDeviceManagementSettingSddlConstraint(), nil + case "#microsoft.graph.deviceManagementSettingStringLengthConstraint": + return NewDeviceManagementSettingStringLengthConstraint(), nil + case "#microsoft.graph.deviceManagementSettingXmlConstraint": + return NewDeviceManagementSettingXmlConstraint(), nil + } + } + } + } + return NewDeviceManagementConstraint(), 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 *DeviceManagementConstraint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementConstraint) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementConstraint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementConstraint) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_response.go new file mode 100644 index 000000000..feaf135e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConstraintCollectionResponse +type DeviceManagementConstraintCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementConstraintable +} +// NewDeviceManagementConstraintCollectionResponse instantiates a new DeviceManagementConstraintCollectionResponse and sets the default values. +func NewDeviceManagementConstraintCollectionResponse()(*DeviceManagementConstraintCollectionResponse) { + m := &DeviceManagementConstraintCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementConstraintCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementConstraintCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementConstraintCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementConstraintCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConstraintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConstraintable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConstraintable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementConstraintCollectionResponse) GetValue()([]DeviceManagementConstraintable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementConstraintCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementConstraintCollectionResponse) SetValue(value []DeviceManagementConstraintable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_responseable.go new file mode 100644 index 000000000..3773992e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_constraint_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConstraintCollectionResponseable +type DeviceManagementConstraintCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementConstraintable) + SetValue(value []DeviceManagementConstraintable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_constraintable.go new file mode 100644 index 000000000..5358791cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementConstraintable +type DeviceManagementConstraintable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_derived_credential_issuer.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_issuer.go new file mode 100644 index 000000000..94db853b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_issuer.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementDerivedCredentialIssuer int + +const ( + // Intercede + INTERCEDE_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER DeviceManagementDerivedCredentialIssuer = iota + // Entrust + ENTRUSTDATACARD_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + // Purebred + PUREBRED_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + // XTec + XTEC_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER +) + +func (i DeviceManagementDerivedCredentialIssuer) String() string { + return []string{"intercede", "entrustDatacard", "purebred", "xTec"}[i] +} +func ParseDeviceManagementDerivedCredentialIssuer(v string) (interface{}, error) { + result := INTERCEDE_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + switch v { + case "intercede": + result = INTERCEDE_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + case "entrustDatacard": + result = ENTRUSTDATACARD_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + case "purebred": + result = PUREBRED_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + case "xTec": + result = XTEC_DEVICEMANAGEMENTDERIVEDCREDENTIALISSUER + default: + return 0, errors.New("Unknown DeviceManagementDerivedCredentialIssuer value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementDerivedCredentialIssuer(values []DeviceManagementDerivedCredentialIssuer) []string { + 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/device_management_derived_credential_notification_type.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_notification_type.go new file mode 100644 index 000000000..f75519312 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_notification_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementDerivedCredentialNotificationType int + +const ( + // None + NONE_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE DeviceManagementDerivedCredentialNotificationType = iota + // Company Portal + COMPANYPORTAL_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE + // Email + EMAIL_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE +) + +func (i DeviceManagementDerivedCredentialNotificationType) String() string { + return []string{"none", "companyPortal", "email"}[i] +} +func ParseDeviceManagementDerivedCredentialNotificationType(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE + case "companyPortal": + result = COMPANYPORTAL_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE + case "email": + result = EMAIL_DEVICEMANAGEMENTDERIVEDCREDENTIALNOTIFICATIONTYPE + default: + return 0, errors.New("Unknown DeviceManagementDerivedCredentialNotificationType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementDerivedCredentialNotificationType(values []DeviceManagementDerivedCredentialNotificationType) []string { + 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/device_management_derived_credential_settings.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings.go new file mode 100644 index 000000000..62bce8363 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDerivedCredentialSettings +type DeviceManagementDerivedCredentialSettings struct { + Entity + // The display name for the profile. + displayName *string + // The URL that will be accessible to end users as they retrieve a derived credential using the Company Portal. + helpUrl *string + // Supported values for the derived credential issuer. + issuer *DeviceManagementDerivedCredentialIssuer + // Supported values for the notification type to use. + notificationType *DeviceManagementDerivedCredentialNotificationType + // The nominal percentage of time before certificate renewal is initiated by the client. + renewalThresholdPercentage *int32 +} +// NewDeviceManagementDerivedCredentialSettings instantiates a new deviceManagementDerivedCredentialSettings and sets the default values. +func NewDeviceManagementDerivedCredentialSettings()(*DeviceManagementDerivedCredentialSettings) { + m := &DeviceManagementDerivedCredentialSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementDerivedCredentialSettings(), nil +} +// GetDisplayName gets the displayName property value. The display name for the profile. +func (m *DeviceManagementDerivedCredentialSettings) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementDerivedCredentialSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["helpUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpUrl(val) + } + return nil + } + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementDerivedCredentialIssuer) + if err != nil { + return err + } + if val != nil { + m.SetIssuer(val.(*DeviceManagementDerivedCredentialIssuer)) + } + return nil + } + res["notificationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementDerivedCredentialNotificationType) + if err != nil { + return err + } + if val != nil { + m.SetNotificationType(val.(*DeviceManagementDerivedCredentialNotificationType)) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + return res +} +// GetHelpUrl gets the helpUrl property value. The URL that will be accessible to end users as they retrieve a derived credential using the Company Portal. +func (m *DeviceManagementDerivedCredentialSettings) GetHelpUrl()(*string) { + return m.helpUrl +} +// GetIssuer gets the issuer property value. Supported values for the derived credential issuer. +func (m *DeviceManagementDerivedCredentialSettings) GetIssuer()(*DeviceManagementDerivedCredentialIssuer) { + return m.issuer +} +// GetNotificationType gets the notificationType property value. Supported values for the notification type to use. +func (m *DeviceManagementDerivedCredentialSettings) GetNotificationType()(*DeviceManagementDerivedCredentialNotificationType) { + return m.notificationType +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. The nominal percentage of time before certificate renewal is initiated by the client. +func (m *DeviceManagementDerivedCredentialSettings) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// Serialize serializes information the current object +func (m *DeviceManagementDerivedCredentialSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("helpUrl", m.GetHelpUrl()) + if err != nil { + return err + } + } + if m.GetIssuer() != nil { + cast := (*m.GetIssuer()).String() + err = writer.WriteStringValue("issuer", &cast) + if err != nil { + return err + } + } + if m.GetNotificationType() != nil { + cast := (*m.GetNotificationType()).String() + err = writer.WriteStringValue("notificationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name for the profile. +func (m *DeviceManagementDerivedCredentialSettings) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHelpUrl sets the helpUrl property value. The URL that will be accessible to end users as they retrieve a derived credential using the Company Portal. +func (m *DeviceManagementDerivedCredentialSettings) SetHelpUrl(value *string)() { + m.helpUrl = value +} +// SetIssuer sets the issuer property value. Supported values for the derived credential issuer. +func (m *DeviceManagementDerivedCredentialSettings) SetIssuer(value *DeviceManagementDerivedCredentialIssuer)() { + m.issuer = value +} +// SetNotificationType sets the notificationType property value. Supported values for the notification type to use. +func (m *DeviceManagementDerivedCredentialSettings) SetNotificationType(value *DeviceManagementDerivedCredentialNotificationType)() { + m.notificationType = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. The nominal percentage of time before certificate renewal is initiated by the client. +func (m *DeviceManagementDerivedCredentialSettings) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_response.go new file mode 100644 index 000000000..79e82cdbb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDerivedCredentialSettingsCollectionResponse +type DeviceManagementDerivedCredentialSettingsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementDerivedCredentialSettingsable +} +// NewDeviceManagementDerivedCredentialSettingsCollectionResponse instantiates a new DeviceManagementDerivedCredentialSettingsCollectionResponse and sets the default values. +func NewDeviceManagementDerivedCredentialSettingsCollectionResponse()(*DeviceManagementDerivedCredentialSettingsCollectionResponse) { + m := &DeviceManagementDerivedCredentialSettingsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementDerivedCredentialSettingsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementDerivedCredentialSettingsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementDerivedCredentialSettingsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementDerivedCredentialSettingsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementDerivedCredentialSettingsable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementDerivedCredentialSettingsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementDerivedCredentialSettingsCollectionResponse) GetValue()([]DeviceManagementDerivedCredentialSettingsable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementDerivedCredentialSettingsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementDerivedCredentialSettingsCollectionResponse) SetValue(value []DeviceManagementDerivedCredentialSettingsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_responseable.go new file mode 100644 index 000000000..a52687a04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settings_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDerivedCredentialSettingsCollectionResponseable +type DeviceManagementDerivedCredentialSettingsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementDerivedCredentialSettingsable) + SetValue(value []DeviceManagementDerivedCredentialSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settingsable.go b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settingsable.go new file mode 100644 index 000000000..7ebfa45da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_derived_credential_settingsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDerivedCredentialSettingsable +type DeviceManagementDerivedCredentialSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetHelpUrl()(*string) + GetIssuer()(*DeviceManagementDerivedCredentialIssuer) + GetNotificationType()(*DeviceManagementDerivedCredentialNotificationType) + GetRenewalThresholdPercentage()(*int32) + SetDisplayName(value *string)() + SetHelpUrl(value *string)() + SetIssuer(value *DeviceManagementDerivedCredentialIssuer)() + SetNotificationType(value *DeviceManagementDerivedCredentialNotificationType)() + SetRenewalThresholdPercentage(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector.go b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector.go new file mode 100644 index 000000000..6295fb15c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector.go @@ -0,0 +1,140 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDomainJoinConnector a Domain Join Connector is a connector that is responsible to allocate (and delete) machine account blobs +type DeviceManagementDomainJoinConnector struct { + Entity + // The connector display name. + displayName *string + // Last time connector contacted Intune. + lastConnectionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ODJ request states. + state *DeviceManagementDomainJoinConnectorState + // The version of the connector. + version *string +} +// NewDeviceManagementDomainJoinConnector instantiates a new deviceManagementDomainJoinConnector and sets the default values. +func NewDeviceManagementDomainJoinConnector()(*DeviceManagementDomainJoinConnector) { + m := &DeviceManagementDomainJoinConnector{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementDomainJoinConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementDomainJoinConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementDomainJoinConnector(), nil +} +// GetDisplayName gets the displayName property value. The connector display name. +func (m *DeviceManagementDomainJoinConnector) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementDomainJoinConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastConnectionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastConnectionDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementDomainJoinConnectorState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*DeviceManagementDomainJoinConnectorState)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastConnectionDateTime gets the lastConnectionDateTime property value. Last time connector contacted Intune. +func (m *DeviceManagementDomainJoinConnector) GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastConnectionDateTime +} +// GetState gets the state property value. The ODJ request states. +func (m *DeviceManagementDomainJoinConnector) GetState()(*DeviceManagementDomainJoinConnectorState) { + return m.state +} +// GetVersion gets the version property value. The version of the connector. +func (m *DeviceManagementDomainJoinConnector) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceManagementDomainJoinConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastConnectionDateTime", m.GetLastConnectionDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The connector display name. +func (m *DeviceManagementDomainJoinConnector) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastConnectionDateTime sets the lastConnectionDateTime property value. Last time connector contacted Intune. +func (m *DeviceManagementDomainJoinConnector) SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastConnectionDateTime = value +} +// SetState sets the state property value. The ODJ request states. +func (m *DeviceManagementDomainJoinConnector) SetState(value *DeviceManagementDomainJoinConnectorState)() { + m.state = value +} +// SetVersion sets the version property value. The version of the connector. +func (m *DeviceManagementDomainJoinConnector) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_response.go new file mode 100644 index 000000000..0dd07cc61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDomainJoinConnectorCollectionResponse +type DeviceManagementDomainJoinConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementDomainJoinConnectorable +} +// NewDeviceManagementDomainJoinConnectorCollectionResponse instantiates a new DeviceManagementDomainJoinConnectorCollectionResponse and sets the default values. +func NewDeviceManagementDomainJoinConnectorCollectionResponse()(*DeviceManagementDomainJoinConnectorCollectionResponse) { + m := &DeviceManagementDomainJoinConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementDomainJoinConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementDomainJoinConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementDomainJoinConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementDomainJoinConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementDomainJoinConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementDomainJoinConnectorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementDomainJoinConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementDomainJoinConnectorCollectionResponse) GetValue()([]DeviceManagementDomainJoinConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementDomainJoinConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementDomainJoinConnectorCollectionResponse) SetValue(value []DeviceManagementDomainJoinConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_responseable.go new file mode 100644 index 000000000..b474485eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDomainJoinConnectorCollectionResponseable +type DeviceManagementDomainJoinConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementDomainJoinConnectorable) + SetValue(value []DeviceManagementDomainJoinConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_state.go b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_state.go new file mode 100644 index 000000000..a9a291510 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connector_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementDomainJoinConnectorState int + +const ( + // Connector is actively pinging Intune. + ACTIVE_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE DeviceManagementDomainJoinConnectorState = iota + // There is no heart-beat from connector from last one hour. + ERROR_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE + // There is no heart-beat from connector from last 5 days. + INACTIVE_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE +) + +func (i DeviceManagementDomainJoinConnectorState) String() string { + return []string{"active", "error", "inactive"}[i] +} +func ParseDeviceManagementDomainJoinConnectorState(v string) (interface{}, error) { + result := ACTIVE_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE + switch v { + case "active": + result = ACTIVE_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE + case "error": + result = ERROR_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE + case "inactive": + result = INACTIVE_DEVICEMANAGEMENTDOMAINJOINCONNECTORSTATE + default: + return 0, errors.New("Unknown DeviceManagementDomainJoinConnectorState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementDomainJoinConnectorState(values []DeviceManagementDomainJoinConnectorState) []string { + 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/device_management_domain_join_connectorable.go b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connectorable.go new file mode 100644 index 000000000..d2556b5b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_domain_join_connectorable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementDomainJoinConnectorable +type DeviceManagementDomainJoinConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*DeviceManagementDomainJoinConnectorState) + GetVersion()(*string) + SetDisplayName(value *string)() + SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *DeviceManagementDomainJoinConnectorState)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_enum_constraint.go new file mode 100644 index 000000000..0427bdc01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_constraint.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumConstraint +type DeviceManagementEnumConstraint struct { + DeviceManagementConstraint + // List of valid values for this string + values []DeviceManagementEnumValueable +} +// NewDeviceManagementEnumConstraint instantiates a new DeviceManagementEnumConstraint and sets the default values. +func NewDeviceManagementEnumConstraint()(*DeviceManagementEnumConstraint) { + m := &DeviceManagementEnumConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementEnumConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementEnumConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementEnumConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementEnumConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementEnumConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementEnumValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementEnumValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementEnumValueable) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetValues gets the values property value. List of valid values for this string +func (m *DeviceManagementEnumConstraint) GetValues()([]DeviceManagementEnumValueable) { + return m.values +} +// Serialize serializes information the current object +func (m *DeviceManagementEnumConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + if m.GetValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValues())) + for i, v := range m.GetValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("values", cast) + if err != nil { + return err + } + } + return nil +} +// SetValues sets the values property value. List of valid values for this string +func (m *DeviceManagementEnumConstraint) SetValues(value []DeviceManagementEnumValueable)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_enum_constraintable.go new file mode 100644 index 000000000..7348fca80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumConstraintable +type DeviceManagementEnumConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValues()([]DeviceManagementEnumValueable) + SetValues(value []DeviceManagementEnumValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_value.go b/src/internal/connector/graph/betasdk/models/device_management_enum_value.go new file mode 100644 index 000000000..5daf339f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_value.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumValue definition information for an enum value +type DeviceManagementEnumValue struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name for this enum value + displayName *string + // The OdataType property + odataType *string + // The raw enum value text + value *string +} +// NewDeviceManagementEnumValue instantiates a new deviceManagementEnumValue and sets the default values. +func NewDeviceManagementEnumValue()(*DeviceManagementEnumValue) { + m := &DeviceManagementEnumValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementEnumValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementEnumValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementEnumValue(), 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 *DeviceManagementEnumValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name for this enum value +func (m *DeviceManagementEnumValue) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementEnumValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementEnumValue) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The raw enum value text +func (m *DeviceManagementEnumValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementEnumValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + 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 *DeviceManagementEnumValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name for this enum value +func (m *DeviceManagementEnumValue) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementEnumValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The raw enum value text +func (m *DeviceManagementEnumValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_response.go new file mode 100644 index 000000000..8d5917193 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumValueCollectionResponse +type DeviceManagementEnumValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementEnumValueable +} +// NewDeviceManagementEnumValueCollectionResponse instantiates a new DeviceManagementEnumValueCollectionResponse and sets the default values. +func NewDeviceManagementEnumValueCollectionResponse()(*DeviceManagementEnumValueCollectionResponse) { + m := &DeviceManagementEnumValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementEnumValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementEnumValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementEnumValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementEnumValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementEnumValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementEnumValueable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementEnumValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementEnumValueCollectionResponse) GetValue()([]DeviceManagementEnumValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementEnumValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementEnumValueCollectionResponse) SetValue(value []DeviceManagementEnumValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_responseable.go new file mode 100644 index 000000000..8ec6371cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumValueCollectionResponseable +type DeviceManagementEnumValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementEnumValueable) + SetValue(value []DeviceManagementEnumValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_enum_valueable.go b/src/internal/connector/graph/betasdk/models/device_management_enum_valueable.go new file mode 100644 index 000000000..65eb38e2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_enum_valueable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementEnumValueable +type DeviceManagementEnumValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_access_level.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_level.go new file mode 100644 index 000000000..2fce7be3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_level.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeAccessLevel int + +const ( + // No device access rule has been configured in Exchange. + NONE_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL DeviceManagementExchangeAccessLevel = iota + // Allow the device access to Exchange. + ALLOW_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + // Block the device from accessing Exchange. + BLOCK_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + // Quarantine the device in Exchange. + QUARANTINE_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL +) + +func (i DeviceManagementExchangeAccessLevel) String() string { + return []string{"none", "allow", "block", "quarantine"}[i] +} +func ParseDeviceManagementExchangeAccessLevel(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + case "allow": + result = ALLOW_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + case "block": + result = BLOCK_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + case "quarantine": + result = QUARANTINE_DEVICEMANAGEMENTEXCHANGEACCESSLEVEL + default: + return 0, errors.New("Unknown DeviceManagementExchangeAccessLevel value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeAccessLevel(values []DeviceManagementExchangeAccessLevel) []string { + 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/device_management_exchange_access_rule.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule.go new file mode 100644 index 000000000..d86afc348 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeAccessRule device Access Rules in Exchange. +type DeviceManagementExchangeAccessRule struct { + // Access Level in Exchange. + accessLevel *DeviceManagementExchangeAccessLevel + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Device Class which will be impacted by this rule. + deviceClass DeviceManagementExchangeDeviceClassable + // The OdataType property + odataType *string +} +// NewDeviceManagementExchangeAccessRule instantiates a new deviceManagementExchangeAccessRule and sets the default values. +func NewDeviceManagementExchangeAccessRule()(*DeviceManagementExchangeAccessRule) { + m := &DeviceManagementExchangeAccessRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementExchangeAccessRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeAccessRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeAccessRule(), nil +} +// GetAccessLevel gets the accessLevel property value. Access Level in Exchange. +func (m *DeviceManagementExchangeAccessRule) GetAccessLevel()(*DeviceManagementExchangeAccessLevel) { + return m.accessLevel +} +// 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 *DeviceManagementExchangeAccessRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceClass gets the deviceClass property value. Device Class which will be impacted by this rule. +func (m *DeviceManagementExchangeAccessRule) GetDeviceClass()(DeviceManagementExchangeDeviceClassable) { + return m.deviceClass +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeAccessRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeAccessLevel) + if err != nil { + return err + } + if val != nil { + m.SetAccessLevel(val.(*DeviceManagementExchangeAccessLevel)) + } + return nil + } + res["deviceClass"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementExchangeDeviceClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceClass(val.(DeviceManagementExchangeDeviceClassable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementExchangeAccessRule) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeAccessRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessLevel() != nil { + cast := (*m.GetAccessLevel()).String() + err := writer.WriteStringValue("accessLevel", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("deviceClass", m.GetDeviceClass()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessLevel sets the accessLevel property value. Access Level in Exchange. +func (m *DeviceManagementExchangeAccessRule) SetAccessLevel(value *DeviceManagementExchangeAccessLevel)() { + m.accessLevel = value +} +// 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 *DeviceManagementExchangeAccessRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceClass sets the deviceClass property value. Device Class which will be impacted by this rule. +func (m *DeviceManagementExchangeAccessRule) SetDeviceClass(value DeviceManagementExchangeDeviceClassable)() { + m.deviceClass = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementExchangeAccessRule) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_response.go new file mode 100644 index 000000000..62165ef79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeAccessRuleCollectionResponse +type DeviceManagementExchangeAccessRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementExchangeAccessRuleable +} +// NewDeviceManagementExchangeAccessRuleCollectionResponse instantiates a new DeviceManagementExchangeAccessRuleCollectionResponse and sets the default values. +func NewDeviceManagementExchangeAccessRuleCollectionResponse()(*DeviceManagementExchangeAccessRuleCollectionResponse) { + m := &DeviceManagementExchangeAccessRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementExchangeAccessRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeAccessRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeAccessRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeAccessRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeAccessRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeAccessRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeAccessRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementExchangeAccessRuleCollectionResponse) GetValue()([]DeviceManagementExchangeAccessRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeAccessRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementExchangeAccessRuleCollectionResponse) SetValue(value []DeviceManagementExchangeAccessRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_responseable.go new file mode 100644 index 000000000..1f3b43b55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeAccessRuleCollectionResponseable +type DeviceManagementExchangeAccessRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementExchangeAccessRuleable) + SetValue(value []DeviceManagementExchangeAccessRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_type.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_type.go new file mode 100644 index 000000000..bfad93e3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_rule_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeAccessRuleType int + +const ( + // Family of devices + FAMILY_DEVICEMANAGEMENTEXCHANGEACCESSRULETYPE DeviceManagementExchangeAccessRuleType = iota + // Specific model of device + MODEL_DEVICEMANAGEMENTEXCHANGEACCESSRULETYPE +) + +func (i DeviceManagementExchangeAccessRuleType) String() string { + return []string{"family", "model"}[i] +} +func ParseDeviceManagementExchangeAccessRuleType(v string) (interface{}, error) { + result := FAMILY_DEVICEMANAGEMENTEXCHANGEACCESSRULETYPE + switch v { + case "family": + result = FAMILY_DEVICEMANAGEMENTEXCHANGEACCESSRULETYPE + case "model": + result = MODEL_DEVICEMANAGEMENTEXCHANGEACCESSRULETYPE + default: + return 0, errors.New("Unknown DeviceManagementExchangeAccessRuleType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeAccessRuleType(values []DeviceManagementExchangeAccessRuleType) []string { + 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/device_management_exchange_access_ruleable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_ruleable.go new file mode 100644 index 000000000..5658f3276 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_ruleable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeAccessRuleable +type DeviceManagementExchangeAccessRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessLevel()(*DeviceManagementExchangeAccessLevel) + GetDeviceClass()(DeviceManagementExchangeDeviceClassable) + GetOdataType()(*string) + SetAccessLevel(value *DeviceManagementExchangeAccessLevel)() + SetDeviceClass(value DeviceManagementExchangeDeviceClassable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_access_state.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_state.go new file mode 100644 index 000000000..82861128b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_state.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeAccessState int + +const ( + // No access state discovered from Exchange + NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATE DeviceManagementExchangeAccessState = iota + // Device access state to Exchange is unknown + UNKNOWN_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + // Device has access to Exchange + ALLOWED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + // Device is Blocked in Exchange + BLOCKED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + // Device is Quarantined in Exchange + QUARANTINED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE +) + +func (i DeviceManagementExchangeAccessState) String() string { + return []string{"none", "unknown", "allowed", "blocked", "quarantined"}[i] +} +func ParseDeviceManagementExchangeAccessState(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + case "allowed": + result = ALLOWED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + case "blocked": + result = BLOCKED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + case "quarantined": + result = QUARANTINED_DEVICEMANAGEMENTEXCHANGEACCESSSTATE + default: + return 0, errors.New("Unknown DeviceManagementExchangeAccessState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeAccessState(values []DeviceManagementExchangeAccessState) []string { + 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/device_management_exchange_access_state_reason.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_state_reason.go new file mode 100644 index 000000000..45c98fb04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_access_state_reason.go @@ -0,0 +1,92 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeAccessStateReason int + +const ( + // No access state reason discovered from Exchange + NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON DeviceManagementExchangeAccessStateReason = iota + // Unknown access state reason + UNKNOWN_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state determined by Exchange Global rule + EXCHANGEGLOBALRULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state determined by Exchange Individual rule + EXCHANGEINDIVIDUALRULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state determined by Exchange Device rule + EXCHANGEDEVICERULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state due to Exchange upgrade + EXCHANGEUPGRADE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state determined by Exchange Mailbox Policy + EXCHANGEMAILBOXPOLICY_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state determined by Exchange + OTHER_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state granted by compliance challenge + COMPLIANT_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state revoked by compliance challenge + NOTCOMPLIANT_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state revoked by management challenge + NOTENROLLED_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state due to unknown location + UNKNOWNLOCATION_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state due to MFA challenge + MFAREQUIRED_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access State revoked by AAD Access Policy + AZUREADBLOCKDUETOACCESSPOLICY_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access State revoked by compromised password + COMPROMISEDPASSWORD_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + // Access state revoked by managed application challenge + DEVICENOTKNOWNWITHMANAGEDAPP_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON +) + +func (i DeviceManagementExchangeAccessStateReason) String() string { + return []string{"none", "unknown", "exchangeGlobalRule", "exchangeIndividualRule", "exchangeDeviceRule", "exchangeUpgrade", "exchangeMailboxPolicy", "other", "compliant", "notCompliant", "notEnrolled", "unknownLocation", "mfaRequired", "azureADBlockDueToAccessPolicy", "compromisedPassword", "deviceNotKnownWithManagedApp"}[i] +} +func ParseDeviceManagementExchangeAccessStateReason(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "exchangeGlobalRule": + result = EXCHANGEGLOBALRULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "exchangeIndividualRule": + result = EXCHANGEINDIVIDUALRULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "exchangeDeviceRule": + result = EXCHANGEDEVICERULE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "exchangeUpgrade": + result = EXCHANGEUPGRADE_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "exchangeMailboxPolicy": + result = EXCHANGEMAILBOXPOLICY_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "other": + result = OTHER_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "compliant": + result = COMPLIANT_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "notCompliant": + result = NOTCOMPLIANT_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "notEnrolled": + result = NOTENROLLED_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "unknownLocation": + result = UNKNOWNLOCATION_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "mfaRequired": + result = MFAREQUIRED_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "azureADBlockDueToAccessPolicy": + result = AZUREADBLOCKDUETOACCESSPOLICY_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "compromisedPassword": + result = COMPROMISEDPASSWORD_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + case "deviceNotKnownWithManagedApp": + result = DEVICENOTKNOWNWITHMANAGEDAPP_DEVICEMANAGEMENTEXCHANGEACCESSSTATEREASON + default: + return 0, errors.New("Unknown DeviceManagementExchangeAccessStateReason value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeAccessStateReason(values []DeviceManagementExchangeAccessStateReason) []string { + 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/device_management_exchange_connector.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector.go new file mode 100644 index 000000000..fe8f62474 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector.go @@ -0,0 +1,271 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeConnector entity which represents a connection to an Exchange environment. +type DeviceManagementExchangeConnector struct { + Entity + // The name of the server hosting the Exchange Connector. + connectorServerName *string + // An alias assigned to the Exchange server + exchangeAlias *string + // The type of Exchange Connector. + exchangeConnectorType *DeviceManagementExchangeConnectorType + // Exchange Organization to the Exchange server + exchangeOrganization *string + // Last sync time for the Exchange Connector + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Email address used to configure the Service To Service Exchange Connector. + primarySmtpAddress *string + // The name of the Exchange server. + serverName *string + // The current status of the Exchange Connector. + status *DeviceManagementExchangeConnectorStatus + // The version of the ExchangeConnectorAgent + version *string +} +// NewDeviceManagementExchangeConnector instantiates a new deviceManagementExchangeConnector and sets the default values. +func NewDeviceManagementExchangeConnector()(*DeviceManagementExchangeConnector) { + m := &DeviceManagementExchangeConnector{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementExchangeConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeConnector(), nil +} +// GetConnectorServerName gets the connectorServerName property value. The name of the server hosting the Exchange Connector. +func (m *DeviceManagementExchangeConnector) GetConnectorServerName()(*string) { + return m.connectorServerName +} +// GetExchangeAlias gets the exchangeAlias property value. An alias assigned to the Exchange server +func (m *DeviceManagementExchangeConnector) GetExchangeAlias()(*string) { + return m.exchangeAlias +} +// GetExchangeConnectorType gets the exchangeConnectorType property value. The type of Exchange Connector. +func (m *DeviceManagementExchangeConnector) GetExchangeConnectorType()(*DeviceManagementExchangeConnectorType) { + return m.exchangeConnectorType +} +// GetExchangeOrganization gets the exchangeOrganization property value. Exchange Organization to the Exchange server +func (m *DeviceManagementExchangeConnector) GetExchangeOrganization()(*string) { + return m.exchangeOrganization +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["connectorServerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorServerName(val) + } + return nil + } + res["exchangeAlias"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExchangeAlias(val) + } + return nil + } + res["exchangeConnectorType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeConnectorType) + if err != nil { + return err + } + if val != nil { + m.SetExchangeConnectorType(val.(*DeviceManagementExchangeConnectorType)) + } + return nil + } + res["exchangeOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExchangeOrganization(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["primarySmtpAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimarySmtpAddress(val) + } + return nil + } + res["serverName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeConnectorStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DeviceManagementExchangeConnectorStatus)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Last sync time for the Exchange Connector +func (m *DeviceManagementExchangeConnector) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetPrimarySmtpAddress gets the primarySmtpAddress property value. Email address used to configure the Service To Service Exchange Connector. +func (m *DeviceManagementExchangeConnector) GetPrimarySmtpAddress()(*string) { + return m.primarySmtpAddress +} +// GetServerName gets the serverName property value. The name of the Exchange server. +func (m *DeviceManagementExchangeConnector) GetServerName()(*string) { + return m.serverName +} +// GetStatus gets the status property value. The current status of the Exchange Connector. +func (m *DeviceManagementExchangeConnector) GetStatus()(*DeviceManagementExchangeConnectorStatus) { + return m.status +} +// GetVersion gets the version property value. The version of the ExchangeConnectorAgent +func (m *DeviceManagementExchangeConnector) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("connectorServerName", m.GetConnectorServerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("exchangeAlias", m.GetExchangeAlias()) + if err != nil { + return err + } + } + if m.GetExchangeConnectorType() != nil { + cast := (*m.GetExchangeConnectorType()).String() + err = writer.WriteStringValue("exchangeConnectorType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("exchangeOrganization", m.GetExchangeOrganization()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primarySmtpAddress", m.GetPrimarySmtpAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serverName", m.GetServerName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetConnectorServerName sets the connectorServerName property value. The name of the server hosting the Exchange Connector. +func (m *DeviceManagementExchangeConnector) SetConnectorServerName(value *string)() { + m.connectorServerName = value +} +// SetExchangeAlias sets the exchangeAlias property value. An alias assigned to the Exchange server +func (m *DeviceManagementExchangeConnector) SetExchangeAlias(value *string)() { + m.exchangeAlias = value +} +// SetExchangeConnectorType sets the exchangeConnectorType property value. The type of Exchange Connector. +func (m *DeviceManagementExchangeConnector) SetExchangeConnectorType(value *DeviceManagementExchangeConnectorType)() { + m.exchangeConnectorType = value +} +// SetExchangeOrganization sets the exchangeOrganization property value. Exchange Organization to the Exchange server +func (m *DeviceManagementExchangeConnector) SetExchangeOrganization(value *string)() { + m.exchangeOrganization = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Last sync time for the Exchange Connector +func (m *DeviceManagementExchangeConnector) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetPrimarySmtpAddress sets the primarySmtpAddress property value. Email address used to configure the Service To Service Exchange Connector. +func (m *DeviceManagementExchangeConnector) SetPrimarySmtpAddress(value *string)() { + m.primarySmtpAddress = value +} +// SetServerName sets the serverName property value. The name of the Exchange server. +func (m *DeviceManagementExchangeConnector) SetServerName(value *string)() { + m.serverName = value +} +// SetStatus sets the status property value. The current status of the Exchange Connector. +func (m *DeviceManagementExchangeConnector) SetStatus(value *DeviceManagementExchangeConnectorStatus)() { + m.status = value +} +// SetVersion sets the version property value. The version of the ExchangeConnectorAgent +func (m *DeviceManagementExchangeConnector) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_response.go new file mode 100644 index 000000000..80b90879e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeConnectorCollectionResponse +type DeviceManagementExchangeConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementExchangeConnectorable +} +// NewDeviceManagementExchangeConnectorCollectionResponse instantiates a new DeviceManagementExchangeConnectorCollectionResponse and sets the default values. +func NewDeviceManagementExchangeConnectorCollectionResponse()(*DeviceManagementExchangeConnectorCollectionResponse) { + m := &DeviceManagementExchangeConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementExchangeConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeConnectorable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementExchangeConnectorCollectionResponse) GetValue()([]DeviceManagementExchangeConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementExchangeConnectorCollectionResponse) SetValue(value []DeviceManagementExchangeConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_responseable.go new file mode 100644 index 000000000..9439c2578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeConnectorCollectionResponseable +type DeviceManagementExchangeConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementExchangeConnectorable) + SetValue(value []DeviceManagementExchangeConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_status.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_status.go new file mode 100644 index 000000000..e9e2705c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeConnectorStatus int + +const ( + // No Connector exists. + NONE_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS DeviceManagementExchangeConnectorStatus = iota + // Pending Connection to the Exchange Environment. + CONNECTIONPENDING_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + // Connected to the Exchange Environment + CONNECTED_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + // Disconnected from the Exchange Environment + DISCONNECTED_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS +) + +func (i DeviceManagementExchangeConnectorStatus) String() string { + return []string{"none", "connectionPending", "connected", "disconnected"}[i] +} +func ParseDeviceManagementExchangeConnectorStatus(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + case "connectionPending": + result = CONNECTIONPENDING_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + case "connected": + result = CONNECTED_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + case "disconnected": + result = DISCONNECTED_DEVICEMANAGEMENTEXCHANGECONNECTORSTATUS + default: + return 0, errors.New("Unknown DeviceManagementExchangeConnectorStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeConnectorStatus(values []DeviceManagementExchangeConnectorStatus) []string { + 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/device_management_exchange_connector_type.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_type.go new file mode 100644 index 000000000..abc279060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connector_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExchangeConnectorType int + +const ( + // Connects to on-premises Exchange Environment. + ONPREMISES_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE DeviceManagementExchangeConnectorType = iota + // Connects to O365 multi-tenant Exchange environment + HOSTED_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + // Intune Service connects directly to O365 multi-tenant Exchange environment + SERVICETOSERVICE_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + // Connects to O365 Dedicated Exchange environment. + DEDICATED_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE +) + +func (i DeviceManagementExchangeConnectorType) String() string { + return []string{"onPremises", "hosted", "serviceToService", "dedicated"}[i] +} +func ParseDeviceManagementExchangeConnectorType(v string) (interface{}, error) { + result := ONPREMISES_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + switch v { + case "onPremises": + result = ONPREMISES_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + case "hosted": + result = HOSTED_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + case "serviceToService": + result = SERVICETOSERVICE_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + case "dedicated": + result = DEDICATED_DEVICEMANAGEMENTEXCHANGECONNECTORTYPE + default: + return 0, errors.New("Unknown DeviceManagementExchangeConnectorType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExchangeConnectorType(values []DeviceManagementExchangeConnectorType) []string { + 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/device_management_exchange_connectorable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_connectorable.go new file mode 100644 index 000000000..d7c7fbfac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_connectorable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeConnectorable +type DeviceManagementExchangeConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectorServerName()(*string) + GetExchangeAlias()(*string) + GetExchangeConnectorType()(*DeviceManagementExchangeConnectorType) + GetExchangeOrganization()(*string) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPrimarySmtpAddress()(*string) + GetServerName()(*string) + GetStatus()(*DeviceManagementExchangeConnectorStatus) + GetVersion()(*string) + SetConnectorServerName(value *string)() + SetExchangeAlias(value *string)() + SetExchangeConnectorType(value *DeviceManagementExchangeConnectorType)() + SetExchangeOrganization(value *string)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPrimarySmtpAddress(value *string)() + SetServerName(value *string)() + SetStatus(value *DeviceManagementExchangeConnectorStatus)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class.go new file mode 100644 index 000000000..164f6bcab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeDeviceClass device Class in Exchange. +type DeviceManagementExchangeDeviceClass struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the device class which will be impacted by this rule. + name *string + // The OdataType property + odataType *string + // Criteria which defines the type of device this access rule will apply to + type_escaped *DeviceManagementExchangeAccessRuleType +} +// NewDeviceManagementExchangeDeviceClass instantiates a new deviceManagementExchangeDeviceClass and sets the default values. +func NewDeviceManagementExchangeDeviceClass()(*DeviceManagementExchangeDeviceClass) { + m := &DeviceManagementExchangeDeviceClass{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementExchangeDeviceClassFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeDeviceClassFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeDeviceClass(), 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 *DeviceManagementExchangeDeviceClass) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeDeviceClass) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeAccessRuleType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*DeviceManagementExchangeAccessRuleType)) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the device class which will be impacted by this rule. +func (m *DeviceManagementExchangeDeviceClass) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementExchangeDeviceClass) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Criteria which defines the type of device this access rule will apply to +func (m *DeviceManagementExchangeDeviceClass) GetType()(*DeviceManagementExchangeAccessRuleType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeDeviceClass) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *DeviceManagementExchangeDeviceClass) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name of the device class which will be impacted by this rule. +func (m *DeviceManagementExchangeDeviceClass) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementExchangeDeviceClass) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Criteria which defines the type of device this access rule will apply to +func (m *DeviceManagementExchangeDeviceClass) SetType(value *DeviceManagementExchangeAccessRuleType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_response.go new file mode 100644 index 000000000..6e31ed3e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeDeviceClassCollectionResponse +type DeviceManagementExchangeDeviceClassCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementExchangeDeviceClassable +} +// NewDeviceManagementExchangeDeviceClassCollectionResponse instantiates a new DeviceManagementExchangeDeviceClassCollectionResponse and sets the default values. +func NewDeviceManagementExchangeDeviceClassCollectionResponse()(*DeviceManagementExchangeDeviceClassCollectionResponse) { + m := &DeviceManagementExchangeDeviceClassCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementExchangeDeviceClassCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeDeviceClassCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeDeviceClassCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeDeviceClassCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeDeviceClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeDeviceClassable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeDeviceClassable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementExchangeDeviceClassCollectionResponse) GetValue()([]DeviceManagementExchangeDeviceClassable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeDeviceClassCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementExchangeDeviceClassCollectionResponse) SetValue(value []DeviceManagementExchangeDeviceClassable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_responseable.go new file mode 100644 index 000000000..4396475e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_class_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeDeviceClassCollectionResponseable +type DeviceManagementExchangeDeviceClassCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementExchangeDeviceClassable) + SetValue(value []DeviceManagementExchangeDeviceClassable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_device_classable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_classable.go new file mode 100644 index 000000000..9087a41ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_device_classable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeDeviceClassable +type DeviceManagementExchangeDeviceClassable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetType()(*DeviceManagementExchangeAccessRuleType) + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *DeviceManagementExchangeAccessRuleType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy.go new file mode 100644 index 000000000..9d9d7052f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy.go @@ -0,0 +1,181 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeOnPremisesPolicy singleton entity which represents the Exchange OnPremises policy configured for a tenant. +type DeviceManagementExchangeOnPremisesPolicy struct { + Entity + // The list of device access rules in Exchange. The access rules apply globally to the entire Exchange organization + accessRules []DeviceManagementExchangeAccessRuleable + // The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access + conditionalAccessSettings OnPremisesConditionalAccessSettingsable + // Access Level in Exchange. + defaultAccessLevel *DeviceManagementExchangeAccessLevel + // The list of device classes known to Exchange + knownDeviceClasses []DeviceManagementExchangeDeviceClassable + // Notification text that will be sent to users quarantined by this policy. This is UTF8 encoded byte array HTML. + notificationContent []byte +} +// NewDeviceManagementExchangeOnPremisesPolicy instantiates a new deviceManagementExchangeOnPremisesPolicy and sets the default values. +func NewDeviceManagementExchangeOnPremisesPolicy()(*DeviceManagementExchangeOnPremisesPolicy) { + m := &DeviceManagementExchangeOnPremisesPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementExchangeOnPremisesPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeOnPremisesPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeOnPremisesPolicy(), nil +} +// GetAccessRules gets the accessRules property value. The list of device access rules in Exchange. The access rules apply globally to the entire Exchange organization +func (m *DeviceManagementExchangeOnPremisesPolicy) GetAccessRules()([]DeviceManagementExchangeAccessRuleable) { + return m.accessRules +} +// GetConditionalAccessSettings gets the conditionalAccessSettings property value. The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access +func (m *DeviceManagementExchangeOnPremisesPolicy) GetConditionalAccessSettings()(OnPremisesConditionalAccessSettingsable) { + return m.conditionalAccessSettings +} +// GetDefaultAccessLevel gets the defaultAccessLevel property value. Access Level in Exchange. +func (m *DeviceManagementExchangeOnPremisesPolicy) GetDefaultAccessLevel()(*DeviceManagementExchangeAccessLevel) { + return m.defaultAccessLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeOnPremisesPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeAccessRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeAccessRuleable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeAccessRuleable) + } + m.SetAccessRules(res) + } + return nil + } + res["conditionalAccessSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesConditionalAccessSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditionalAccessSettings(val.(OnPremisesConditionalAccessSettingsable)) + } + return nil + } + res["defaultAccessLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeAccessLevel) + if err != nil { + return err + } + if val != nil { + m.SetDefaultAccessLevel(val.(*DeviceManagementExchangeAccessLevel)) + } + return nil + } + res["knownDeviceClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeDeviceClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeDeviceClassable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeDeviceClassable) + } + m.SetKnownDeviceClasses(res) + } + return nil + } + res["notificationContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationContent(val) + } + return nil + } + return res +} +// GetKnownDeviceClasses gets the knownDeviceClasses property value. The list of device classes known to Exchange +func (m *DeviceManagementExchangeOnPremisesPolicy) GetKnownDeviceClasses()([]DeviceManagementExchangeDeviceClassable) { + return m.knownDeviceClasses +} +// GetNotificationContent gets the notificationContent property value. Notification text that will be sent to users quarantined by this policy. This is UTF8 encoded byte array HTML. +func (m *DeviceManagementExchangeOnPremisesPolicy) GetNotificationContent()([]byte) { + return m.notificationContent +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeOnPremisesPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessRules())) + for i, v := range m.GetAccessRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessRules", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conditionalAccessSettings", m.GetConditionalAccessSettings()) + if err != nil { + return err + } + } + if m.GetDefaultAccessLevel() != nil { + cast := (*m.GetDefaultAccessLevel()).String() + err = writer.WriteStringValue("defaultAccessLevel", &cast) + if err != nil { + return err + } + } + if m.GetKnownDeviceClasses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKnownDeviceClasses())) + for i, v := range m.GetKnownDeviceClasses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("knownDeviceClasses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("notificationContent", m.GetNotificationContent()) + if err != nil { + return err + } + } + return nil +} +// SetAccessRules sets the accessRules property value. The list of device access rules in Exchange. The access rules apply globally to the entire Exchange organization +func (m *DeviceManagementExchangeOnPremisesPolicy) SetAccessRules(value []DeviceManagementExchangeAccessRuleable)() { + m.accessRules = value +} +// SetConditionalAccessSettings sets the conditionalAccessSettings property value. The Exchange on premises conditional access settings. On premises conditional access will require devices to be both enrolled and compliant for mail access +func (m *DeviceManagementExchangeOnPremisesPolicy) SetConditionalAccessSettings(value OnPremisesConditionalAccessSettingsable)() { + m.conditionalAccessSettings = value +} +// SetDefaultAccessLevel sets the defaultAccessLevel property value. Access Level in Exchange. +func (m *DeviceManagementExchangeOnPremisesPolicy) SetDefaultAccessLevel(value *DeviceManagementExchangeAccessLevel)() { + m.defaultAccessLevel = value +} +// SetKnownDeviceClasses sets the knownDeviceClasses property value. The list of device classes known to Exchange +func (m *DeviceManagementExchangeOnPremisesPolicy) SetKnownDeviceClasses(value []DeviceManagementExchangeDeviceClassable)() { + m.knownDeviceClasses = value +} +// SetNotificationContent sets the notificationContent property value. Notification text that will be sent to users quarantined by this policy. This is UTF8 encoded byte array HTML. +func (m *DeviceManagementExchangeOnPremisesPolicy) SetNotificationContent(value []byte)() { + m.notificationContent = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_response.go new file mode 100644 index 000000000..fda823ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeOnPremisesPolicyCollectionResponse +type DeviceManagementExchangeOnPremisesPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementExchangeOnPremisesPolicyable +} +// NewDeviceManagementExchangeOnPremisesPolicyCollectionResponse instantiates a new DeviceManagementExchangeOnPremisesPolicyCollectionResponse and sets the default values. +func NewDeviceManagementExchangeOnPremisesPolicyCollectionResponse()(*DeviceManagementExchangeOnPremisesPolicyCollectionResponse) { + m := &DeviceManagementExchangeOnPremisesPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementExchangeOnPremisesPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExchangeOnPremisesPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExchangeOnPremisesPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExchangeOnPremisesPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExchangeOnPremisesPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExchangeOnPremisesPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExchangeOnPremisesPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementExchangeOnPremisesPolicyCollectionResponse) GetValue()([]DeviceManagementExchangeOnPremisesPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementExchangeOnPremisesPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementExchangeOnPremisesPolicyCollectionResponse) SetValue(value []DeviceManagementExchangeOnPremisesPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_responseable.go new file mode 100644 index 000000000..2269d7bd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeOnPremisesPolicyCollectionResponseable +type DeviceManagementExchangeOnPremisesPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementExchangeOnPremisesPolicyable) + SetValue(value []DeviceManagementExchangeOnPremisesPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policyable.go b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policyable.go new file mode 100644 index 000000000..d6277fe9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_exchange_on_premises_policyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExchangeOnPremisesPolicyable +type DeviceManagementExchangeOnPremisesPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessRules()([]DeviceManagementExchangeAccessRuleable) + GetConditionalAccessSettings()(OnPremisesConditionalAccessSettingsable) + GetDefaultAccessLevel()(*DeviceManagementExchangeAccessLevel) + GetKnownDeviceClasses()([]DeviceManagementExchangeDeviceClassable) + GetNotificationContent()([]byte) + SetAccessRules(value []DeviceManagementExchangeAccessRuleable)() + SetConditionalAccessSettings(value OnPremisesConditionalAccessSettingsable)() + SetDefaultAccessLevel(value *DeviceManagementExchangeAccessLevel)() + SetKnownDeviceClasses(value []DeviceManagementExchangeDeviceClassable)() + SetNotificationContent(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_export_job.go b/src/internal/connector/graph/betasdk/models/device_management_export_job.go new file mode 100644 index 000000000..b0858d009 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_export_job.go @@ -0,0 +1,302 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExportJob entity representing a job to export a report +type DeviceManagementExportJob struct { + Entity + // Time that the exported report expires + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Filters applied on the report + filter *string + // Possible values for the file format of a report + format *DeviceManagementReportFileFormat + // Configures how the requested export job is localized + localizationType *DeviceManagementExportJobLocalizationType + // Name of the report + reportName *string + // Time that the exported report was requested + requestDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Columns selected from the report + select_escaped []string + // A snapshot is an identifiable subset of the dataset represented by the ReportName. A sessionId or CachedReportConfiguration id can be used here. If a sessionId is specified, Filter, Select, and OrderBy are applied to the data represented by the sessionId. Filter, Select, and OrderBy cannot be specified together with a CachedReportConfiguration id. + snapshotId *string + // Possible statuses associated with a generated report + status *DeviceManagementReportStatus + // Temporary location of the exported report + url *string +} +// NewDeviceManagementExportJob instantiates a new deviceManagementExportJob and sets the default values. +func NewDeviceManagementExportJob()(*DeviceManagementExportJob) { + m := &DeviceManagementExportJob{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementExportJobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExportJobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExportJob(), nil +} +// GetExpirationDateTime gets the expirationDateTime property value. Time that the exported report expires +func (m *DeviceManagementExportJob) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExportJob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["filter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilter(val) + } + return nil + } + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementReportFileFormat) + if err != nil { + return err + } + if val != nil { + m.SetFormat(val.(*DeviceManagementReportFileFormat)) + } + return nil + } + res["localizationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExportJobLocalizationType) + if err != nil { + return err + } + if val != nil { + m.SetLocalizationType(val.(*DeviceManagementExportJobLocalizationType)) + } + return nil + } + res["reportName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportName(val) + } + return nil + } + res["requestDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestDateTime(val) + } + return nil + } + res["select"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSelect(res) + } + return nil + } + res["snapshotId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSnapshotId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementReportStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DeviceManagementReportStatus)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetFilter gets the filter property value. Filters applied on the report +func (m *DeviceManagementExportJob) GetFilter()(*string) { + return m.filter +} +// GetFormat gets the format property value. Possible values for the file format of a report +func (m *DeviceManagementExportJob) GetFormat()(*DeviceManagementReportFileFormat) { + return m.format +} +// GetLocalizationType gets the localizationType property value. Configures how the requested export job is localized +func (m *DeviceManagementExportJob) GetLocalizationType()(*DeviceManagementExportJobLocalizationType) { + return m.localizationType +} +// GetReportName gets the reportName property value. Name of the report +func (m *DeviceManagementExportJob) GetReportName()(*string) { + return m.reportName +} +// GetRequestDateTime gets the requestDateTime property value. Time that the exported report was requested +func (m *DeviceManagementExportJob) GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestDateTime +} +// GetSelect gets the select property value. Columns selected from the report +func (m *DeviceManagementExportJob) GetSelect()([]string) { + return m.select_escaped +} +// GetSnapshotId gets the snapshotId property value. A snapshot is an identifiable subset of the dataset represented by the ReportName. A sessionId or CachedReportConfiguration id can be used here. If a sessionId is specified, Filter, Select, and OrderBy are applied to the data represented by the sessionId. Filter, Select, and OrderBy cannot be specified together with a CachedReportConfiguration id. +func (m *DeviceManagementExportJob) GetSnapshotId()(*string) { + return m.snapshotId +} +// GetStatus gets the status property value. Possible statuses associated with a generated report +func (m *DeviceManagementExportJob) GetStatus()(*DeviceManagementReportStatus) { + return m.status +} +// GetUrl gets the url property value. Temporary location of the exported report +func (m *DeviceManagementExportJob) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *DeviceManagementExportJob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("filter", m.GetFilter()) + if err != nil { + return err + } + } + if m.GetFormat() != nil { + cast := (*m.GetFormat()).String() + err = writer.WriteStringValue("format", &cast) + if err != nil { + return err + } + } + if m.GetLocalizationType() != nil { + cast := (*m.GetLocalizationType()).String() + err = writer.WriteStringValue("localizationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportName", m.GetReportName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestDateTime", m.GetRequestDateTime()) + if err != nil { + return err + } + } + if m.GetSelect() != nil { + err = writer.WriteCollectionOfStringValues("select", m.GetSelect()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("snapshotId", m.GetSnapshotId()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetExpirationDateTime sets the expirationDateTime property value. Time that the exported report expires +func (m *DeviceManagementExportJob) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetFilter sets the filter property value. Filters applied on the report +func (m *DeviceManagementExportJob) SetFilter(value *string)() { + m.filter = value +} +// SetFormat sets the format property value. Possible values for the file format of a report +func (m *DeviceManagementExportJob) SetFormat(value *DeviceManagementReportFileFormat)() { + m.format = value +} +// SetLocalizationType sets the localizationType property value. Configures how the requested export job is localized +func (m *DeviceManagementExportJob) SetLocalizationType(value *DeviceManagementExportJobLocalizationType)() { + m.localizationType = value +} +// SetReportName sets the reportName property value. Name of the report +func (m *DeviceManagementExportJob) SetReportName(value *string)() { + m.reportName = value +} +// SetRequestDateTime sets the requestDateTime property value. Time that the exported report was requested +func (m *DeviceManagementExportJob) SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestDateTime = value +} +// SetSelect sets the select property value. Columns selected from the report +func (m *DeviceManagementExportJob) SetSelect(value []string)() { + m.select_escaped = value +} +// SetSnapshotId sets the snapshotId property value. A snapshot is an identifiable subset of the dataset represented by the ReportName. A sessionId or CachedReportConfiguration id can be used here. If a sessionId is specified, Filter, Select, and OrderBy are applied to the data represented by the sessionId. Filter, Select, and OrderBy cannot be specified together with a CachedReportConfiguration id. +func (m *DeviceManagementExportJob) SetSnapshotId(value *string)() { + m.snapshotId = value +} +// SetStatus sets the status property value. Possible statuses associated with a generated report +func (m *DeviceManagementExportJob) SetStatus(value *DeviceManagementReportStatus)() { + m.status = value +} +// SetUrl sets the url property value. Temporary location of the exported report +func (m *DeviceManagementExportJob) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_response.go new file mode 100644 index 000000000..e1cdafde1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExportJobCollectionResponse +type DeviceManagementExportJobCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementExportJobable +} +// NewDeviceManagementExportJobCollectionResponse instantiates a new DeviceManagementExportJobCollectionResponse and sets the default values. +func NewDeviceManagementExportJobCollectionResponse()(*DeviceManagementExportJobCollectionResponse) { + m := &DeviceManagementExportJobCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementExportJobCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementExportJobCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementExportJobCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementExportJobCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExportJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExportJobable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExportJobable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementExportJobCollectionResponse) GetValue()([]DeviceManagementExportJobable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementExportJobCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementExportJobCollectionResponse) SetValue(value []DeviceManagementExportJobable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_responseable.go new file mode 100644 index 000000000..27a1e8962 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_export_job_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExportJobCollectionResponseable +type DeviceManagementExportJobCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementExportJobable) + SetValue(value []DeviceManagementExportJobable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_export_job_localization_type.go b/src/internal/connector/graph/betasdk/models/device_management_export_job_localization_type.go new file mode 100644 index 000000000..536f553fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_export_job_localization_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementExportJobLocalizationType int + +const ( + // Configures the export job to expose localized values as an additional column + LOCALIZEDVALUESASADDITIONALCOLUMN_DEVICEMANAGEMENTEXPORTJOBLOCALIZATIONTYPE DeviceManagementExportJobLocalizationType = iota + // Configures the export job to replace enumerable values with their localized values + REPLACELOCALIZABLEVALUES_DEVICEMANAGEMENTEXPORTJOBLOCALIZATIONTYPE +) + +func (i DeviceManagementExportJobLocalizationType) String() string { + return []string{"localizedValuesAsAdditionalColumn", "replaceLocalizableValues"}[i] +} +func ParseDeviceManagementExportJobLocalizationType(v string) (interface{}, error) { + result := LOCALIZEDVALUESASADDITIONALCOLUMN_DEVICEMANAGEMENTEXPORTJOBLOCALIZATIONTYPE + switch v { + case "localizedValuesAsAdditionalColumn": + result = LOCALIZEDVALUESASADDITIONALCOLUMN_DEVICEMANAGEMENTEXPORTJOBLOCALIZATIONTYPE + case "replaceLocalizableValues": + result = REPLACELOCALIZABLEVALUES_DEVICEMANAGEMENTEXPORTJOBLOCALIZATIONTYPE + default: + return 0, errors.New("Unknown DeviceManagementExportJobLocalizationType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementExportJobLocalizationType(values []DeviceManagementExportJobLocalizationType) []string { + 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/device_management_export_jobable.go b/src/internal/connector/graph/betasdk/models/device_management_export_jobable.go new file mode 100644 index 000000000..1bdafe0f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_export_jobable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementExportJobable +type DeviceManagementExportJobable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFilter()(*string) + GetFormat()(*DeviceManagementReportFileFormat) + GetLocalizationType()(*DeviceManagementExportJobLocalizationType) + GetReportName()(*string) + GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSelect()([]string) + GetSnapshotId()(*string) + GetStatus()(*DeviceManagementReportStatus) + GetUrl()(*string) + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFilter(value *string)() + SetFormat(value *DeviceManagementReportFileFormat)() + SetLocalizationType(value *DeviceManagementExportJobLocalizationType)() + SetReportName(value *string)() + SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSelect(value []string)() + SetSnapshotId(value *string)() + SetStatus(value *DeviceManagementReportStatus)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance.go new file mode 100644 index 000000000..7311d6bed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntegerSettingInstance +type DeviceManagementIntegerSettingInstance struct { + DeviceManagementSettingInstance + // The integer value + value *int32 +} +// NewDeviceManagementIntegerSettingInstance instantiates a new DeviceManagementIntegerSettingInstance and sets the default values. +func NewDeviceManagementIntegerSettingInstance()(*DeviceManagementIntegerSettingInstance) { + m := &DeviceManagementIntegerSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementIntegerSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementIntegerSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntegerSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntegerSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntegerSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The integer value +func (m *DeviceManagementIntegerSettingInstance) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntegerSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The integer value +func (m *DeviceManagementIntegerSettingInstance) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_response.go new file mode 100644 index 000000000..fe19b1993 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntegerSettingInstanceCollectionResponse +type DeviceManagementIntegerSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntegerSettingInstanceable +} +// NewDeviceManagementIntegerSettingInstanceCollectionResponse instantiates a new DeviceManagementIntegerSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementIntegerSettingInstanceCollectionResponse()(*DeviceManagementIntegerSettingInstanceCollectionResponse) { + m := &DeviceManagementIntegerSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntegerSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntegerSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntegerSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntegerSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntegerSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntegerSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntegerSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntegerSettingInstanceCollectionResponse) GetValue()([]DeviceManagementIntegerSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntegerSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntegerSettingInstanceCollectionResponse) SetValue(value []DeviceManagementIntegerSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_responseable.go new file mode 100644 index 000000000..786d2e265 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntegerSettingInstanceCollectionResponseable +type DeviceManagementIntegerSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntegerSettingInstanceable) + SetValue(value []DeviceManagementIntegerSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instanceable.go new file mode 100644 index 000000000..fa4d6cc0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_integer_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntegerSettingInstanceable +type DeviceManagementIntegerSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*int32) + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent.go b/src/internal/connector/graph/betasdk/models/device_management_intent.go new file mode 100644 index 000000000..b226f7091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent.go @@ -0,0 +1,451 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntent entity that represents an intent to apply settings to a device +type DeviceManagementIntent struct { + Entity + // Collection of assignments + assignments []DeviceManagementIntentAssignmentable + // Collection of setting categories within the intent + categories []DeviceManagementIntentSettingCategoryable + // The user given description + description *string + // Collection of settings and their states and counts of devices that belong to corresponding state for all settings within the intent + deviceSettingStateSummaries []DeviceManagementIntentDeviceSettingStateSummaryable + // Collection of states of all devices that the intent is applied to + deviceStates []DeviceManagementIntentDeviceStateable + // A summary of device states and counts of devices that belong to corresponding state for all devices that the intent is applied to + deviceStateSummary DeviceManagementIntentDeviceStateSummaryable + // The user given display name + displayName *string + // Signifies whether or not the intent is assigned to users + isAssigned *bool + // When the intent was last modified + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Collection of all settings to be applied + settings []DeviceManagementSettingInstanceable + // The ID of the template this intent was created from (if any) + templateId *string + // Collection of states of all users that the intent is applied to + userStates []DeviceManagementIntentUserStateable + // A summary of user states and counts of users that belong to corresponding state for all users that the intent is applied to + userStateSummary DeviceManagementIntentUserStateSummaryable +} +// NewDeviceManagementIntent instantiates a new deviceManagementIntent and sets the default values. +func NewDeviceManagementIntent()(*DeviceManagementIntent) { + m := &DeviceManagementIntent{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntent(), nil +} +// GetAssignments gets the assignments property value. Collection of assignments +func (m *DeviceManagementIntent) GetAssignments()([]DeviceManagementIntentAssignmentable) { + return m.assignments +} +// GetCategories gets the categories property value. Collection of setting categories within the intent +func (m *DeviceManagementIntent) GetCategories()([]DeviceManagementIntentSettingCategoryable) { + return m.categories +} +// GetDescription gets the description property value. The user given description +func (m *DeviceManagementIntent) GetDescription()(*string) { + return m.description +} +// GetDeviceSettingStateSummaries gets the deviceSettingStateSummaries property value. Collection of settings and their states and counts of devices that belong to corresponding state for all settings within the intent +func (m *DeviceManagementIntent) GetDeviceSettingStateSummaries()([]DeviceManagementIntentDeviceSettingStateSummaryable) { + return m.deviceSettingStateSummaries +} +// GetDeviceStates gets the deviceStates property value. Collection of states of all devices that the intent is applied to +func (m *DeviceManagementIntent) GetDeviceStates()([]DeviceManagementIntentDeviceStateable) { + return m.deviceStates +} +// GetDeviceStateSummary gets the deviceStateSummary property value. A summary of device states and counts of devices that belong to corresponding state for all devices that the intent is applied to +func (m *DeviceManagementIntent) GetDeviceStateSummary()(DeviceManagementIntentDeviceStateSummaryable) { + return m.deviceStateSummary +} +// GetDisplayName gets the displayName property value. The user given display name +func (m *DeviceManagementIntent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentSettingCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceSettingStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentDeviceSettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentDeviceSettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentDeviceSettingStateSummaryable) + } + m.SetDeviceSettingStateSummaries(res) + } + return nil + } + res["deviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentDeviceStateable) + } + m.SetDeviceStates(res) + } + return nil + } + res["deviceStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementIntentDeviceStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStateSummary(val.(DeviceManagementIntentDeviceStateSummaryable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isAssigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAssigned(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetSettings(res) + } + return nil + } + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + res["userStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentUserStateable) + } + m.SetUserStates(res) + } + return nil + } + res["userStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementIntentUserStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserStateSummary(val.(DeviceManagementIntentUserStateSummaryable)) + } + return nil + } + return res +} +// GetIsAssigned gets the isAssigned property value. Signifies whether or not the intent is assigned to users +func (m *DeviceManagementIntent) GetIsAssigned()(*bool) { + return m.isAssigned +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. When the intent was last modified +func (m *DeviceManagementIntent) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementIntent) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSettings gets the settings property value. Collection of all settings to be applied +func (m *DeviceManagementIntent) GetSettings()([]DeviceManagementSettingInstanceable) { + return m.settings +} +// GetTemplateId gets the templateId property value. The ID of the template this intent was created from (if any) +func (m *DeviceManagementIntent) GetTemplateId()(*string) { + return m.templateId +} +// GetUserStates gets the userStates property value. Collection of states of all users that the intent is applied to +func (m *DeviceManagementIntent) GetUserStates()([]DeviceManagementIntentUserStateable) { + return m.userStates +} +// GetUserStateSummary gets the userStateSummary property value. A summary of user states and counts of users that belong to corresponding state for all users that the intent is applied to +func (m *DeviceManagementIntent) GetUserStateSummary()(DeviceManagementIntentUserStateSummaryable) { + return m.userStateSummary +} +// Serialize serializes information the current object +func (m *DeviceManagementIntent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceSettingStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceSettingStateSummaries())) + for i, v := range m.GetDeviceSettingStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceSettingStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStates())) + for i, v := range m.GetDeviceStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceStateSummary", m.GetDeviceStateSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAssigned", m.GetIsAssigned()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + if m.GetUserStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStates())) + for i, v := range m.GetUserStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userStateSummary", m.GetUserStateSummary()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. Collection of assignments +func (m *DeviceManagementIntent) SetAssignments(value []DeviceManagementIntentAssignmentable)() { + m.assignments = value +} +// SetCategories sets the categories property value. Collection of setting categories within the intent +func (m *DeviceManagementIntent) SetCategories(value []DeviceManagementIntentSettingCategoryable)() { + m.categories = value +} +// SetDescription sets the description property value. The user given description +func (m *DeviceManagementIntent) SetDescription(value *string)() { + m.description = value +} +// SetDeviceSettingStateSummaries sets the deviceSettingStateSummaries property value. Collection of settings and their states and counts of devices that belong to corresponding state for all settings within the intent +func (m *DeviceManagementIntent) SetDeviceSettingStateSummaries(value []DeviceManagementIntentDeviceSettingStateSummaryable)() { + m.deviceSettingStateSummaries = value +} +// SetDeviceStates sets the deviceStates property value. Collection of states of all devices that the intent is applied to +func (m *DeviceManagementIntent) SetDeviceStates(value []DeviceManagementIntentDeviceStateable)() { + m.deviceStates = value +} +// SetDeviceStateSummary sets the deviceStateSummary property value. A summary of device states and counts of devices that belong to corresponding state for all devices that the intent is applied to +func (m *DeviceManagementIntent) SetDeviceStateSummary(value DeviceManagementIntentDeviceStateSummaryable)() { + m.deviceStateSummary = value +} +// SetDisplayName sets the displayName property value. The user given display name +func (m *DeviceManagementIntent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsAssigned sets the isAssigned property value. Signifies whether or not the intent is assigned to users +func (m *DeviceManagementIntent) SetIsAssigned(value *bool)() { + m.isAssigned = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. When the intent was last modified +func (m *DeviceManagementIntent) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *DeviceManagementIntent) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSettings sets the settings property value. Collection of all settings to be applied +func (m *DeviceManagementIntent) SetSettings(value []DeviceManagementSettingInstanceable)() { + m.settings = value +} +// SetTemplateId sets the templateId property value. The ID of the template this intent was created from (if any) +func (m *DeviceManagementIntent) SetTemplateId(value *string)() { + m.templateId = value +} +// SetUserStates sets the userStates property value. Collection of states of all users that the intent is applied to +func (m *DeviceManagementIntent) SetUserStates(value []DeviceManagementIntentUserStateable)() { + m.userStates = value +} +// SetUserStateSummary sets the userStateSummary property value. A summary of user states and counts of users that belong to corresponding state for all users that the intent is applied to +func (m *DeviceManagementIntent) SetUserStateSummary(value DeviceManagementIntentUserStateSummaryable)() { + m.userStateSummary = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment.go new file mode 100644 index 000000000..b1d74cefa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentAssignment intent assignment entity +type DeviceManagementIntentAssignment struct { + Entity + // The assignment target + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceManagementIntentAssignment instantiates a new deviceManagementIntentAssignment and sets the default values. +func NewDeviceManagementIntentAssignment()(*DeviceManagementIntentAssignment) { + m := &DeviceManagementIntentAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The assignment target +func (m *DeviceManagementIntentAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The assignment target +func (m *DeviceManagementIntentAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_response.go new file mode 100644 index 000000000..67e6a6f6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentAssignmentCollectionResponse +type DeviceManagementIntentAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentAssignmentable +} +// NewDeviceManagementIntentAssignmentCollectionResponse instantiates a new DeviceManagementIntentAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementIntentAssignmentCollectionResponse()(*DeviceManagementIntentAssignmentCollectionResponse) { + m := &DeviceManagementIntentAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentAssignmentCollectionResponse) GetValue()([]DeviceManagementIntentAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentAssignmentCollectionResponse) SetValue(value []DeviceManagementIntentAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_responseable.go new file mode 100644 index 000000000..5f12d0a21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentAssignmentCollectionResponseable +type DeviceManagementIntentAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentAssignmentable) + SetValue(value []DeviceManagementIntentAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_assignmentable.go new file mode 100644 index 000000000..8a222eb01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentAssignmentable +type DeviceManagementIntentAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_collection_response.go new file mode 100644 index 000000000..59d4cdd59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentCollectionResponse +type DeviceManagementIntentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentable +} +// NewDeviceManagementIntentCollectionResponse instantiates a new DeviceManagementIntentCollectionResponse and sets the default values. +func NewDeviceManagementIntentCollectionResponse()(*DeviceManagementIntentCollectionResponse) { + m := &DeviceManagementIntentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentCollectionResponse) GetValue()([]DeviceManagementIntentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentCollectionResponse) SetValue(value []DeviceManagementIntentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_collection_responseable.go new file mode 100644 index 000000000..becd545b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentCollectionResponseable +type DeviceManagementIntentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentable) + SetValue(value []DeviceManagementIntentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary.go new file mode 100644 index 000000000..752c8eda4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary.go @@ -0,0 +1,216 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceSettingStateSummary entity that represents device setting state summary for an intent +type DeviceManagementIntentDeviceSettingStateSummary struct { + Entity + // Number of compliant devices + compliantCount *int32 + // Number of devices in conflict + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of non compliant devices + nonCompliantCount *int32 + // Number of not applicable devices + notApplicableCount *int32 + // Number of remediated devices + remediatedCount *int32 + // Name of a setting + settingName *string +} +// NewDeviceManagementIntentDeviceSettingStateSummary instantiates a new deviceManagementIntentDeviceSettingStateSummary and sets the default values. +func NewDeviceManagementIntentDeviceSettingStateSummary()(*DeviceManagementIntentDeviceSettingStateSummary) { + m := &DeviceManagementIntentDeviceSettingStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentDeviceSettingStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentDeviceSettingStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentDeviceSettingStateSummary(), nil +} +// GetCompliantCount gets the compliantCount property value. Number of compliant devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetCompliantCount()(*int32) { + return m.compliantCount +} +// GetConflictCount gets the conflictCount property value. Number of devices in conflict +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantCount(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["nonCompliantCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantCount(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["remediatedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedCount(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + return res +} +// GetNonCompliantCount gets the nonCompliantCount property value. Number of non compliant devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetNonCompliantCount()(*int32) { + return m.nonCompliantCount +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetRemediatedCount gets the remediatedCount property value. Number of remediated devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetRemediatedCount()(*int32) { + return m.remediatedCount +} +// GetSettingName gets the settingName property value. Name of a setting +func (m *DeviceManagementIntentDeviceSettingStateSummary) GetSettingName()(*string) { + return m.settingName +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentDeviceSettingStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantCount", m.GetCompliantCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantCount", m.GetNonCompliantCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedCount", m.GetRemediatedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantCount sets the compliantCount property value. Number of compliant devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetCompliantCount(value *int32)() { + m.compliantCount = value +} +// SetConflictCount sets the conflictCount property value. Number of devices in conflict +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetNonCompliantCount sets the nonCompliantCount property value. Number of non compliant devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetNonCompliantCount(value *int32)() { + m.nonCompliantCount = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetRemediatedCount sets the remediatedCount property value. Number of remediated devices +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetRemediatedCount(value *int32)() { + m.remediatedCount = value +} +// SetSettingName sets the settingName property value. Name of a setting +func (m *DeviceManagementIntentDeviceSettingStateSummary) SetSettingName(value *string)() { + m.settingName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_response.go new file mode 100644 index 000000000..f05d9844a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse +type DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentDeviceSettingStateSummaryable +} +// NewDeviceManagementIntentDeviceSettingStateSummaryCollectionResponse instantiates a new DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse and sets the default values. +func NewDeviceManagementIntentDeviceSettingStateSummaryCollectionResponse()(*DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse) { + m := &DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentDeviceSettingStateSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentDeviceSettingStateSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentDeviceSettingStateSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentDeviceSettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentDeviceSettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentDeviceSettingStateSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse) GetValue()([]DeviceManagementIntentDeviceSettingStateSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentDeviceSettingStateSummaryCollectionResponse) SetValue(value []DeviceManagementIntentDeviceSettingStateSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_responseable.go new file mode 100644 index 000000000..427dd8751 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceSettingStateSummaryCollectionResponseable +type DeviceManagementIntentDeviceSettingStateSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentDeviceSettingStateSummaryable) + SetValue(value []DeviceManagementIntentDeviceSettingStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summaryable.go new file mode 100644 index 000000000..91ede7b7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_setting_state_summaryable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceSettingStateSummaryable +type DeviceManagementIntentDeviceSettingStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantCount()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetNonCompliantCount()(*int32) + GetNotApplicableCount()(*int32) + GetRemediatedCount()(*int32) + GetSettingName()(*string) + SetCompliantCount(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetNonCompliantCount(value *int32)() + SetNotApplicableCount(value *int32)() + SetRemediatedCount(value *int32)() + SetSettingName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_state.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state.go new file mode 100644 index 000000000..bad88a36f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state.go @@ -0,0 +1,192 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceState entity that represents device state for an intent +type DeviceManagementIntentDeviceState struct { + Entity + // Device name that is being reported + deviceDisplayName *string + // Device id that is being reported + deviceId *string + // Last modified date time of an intent report + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state property + state *ComplianceStatus + // The user name that is being reported on a device + userName *string + // The user principal name that is being reported on a device + userPrincipalName *string +} +// NewDeviceManagementIntentDeviceState instantiates a new deviceManagementIntentDeviceState and sets the default values. +func NewDeviceManagementIntentDeviceState()(*DeviceManagementIntentDeviceState) { + m := &DeviceManagementIntentDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentDeviceState(), nil +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device name that is being reported +func (m *DeviceManagementIntentDeviceState) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceId gets the deviceId property value. Device id that is being reported +func (m *DeviceManagementIntentDeviceState) GetDeviceId()(*string) { + return m.deviceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of an intent report +func (m *DeviceManagementIntentDeviceState) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetState gets the state property value. The state property +func (m *DeviceManagementIntentDeviceState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserName gets the userName property value. The user name that is being reported on a device +func (m *DeviceManagementIntentDeviceState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name that is being reported on a device +func (m *DeviceManagementIntentDeviceState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device name that is being reported +func (m *DeviceManagementIntentDeviceState) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceId sets the deviceId property value. Device id that is being reported +func (m *DeviceManagementIntentDeviceState) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of an intent report +func (m *DeviceManagementIntentDeviceState) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetState sets the state property value. The state property +func (m *DeviceManagementIntentDeviceState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserName sets the userName property value. The user name that is being reported on a device +func (m *DeviceManagementIntentDeviceState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name that is being reported on a device +func (m *DeviceManagementIntentDeviceState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_response.go new file mode 100644 index 000000000..7a4093cdc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceStateCollectionResponse +type DeviceManagementIntentDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentDeviceStateable +} +// NewDeviceManagementIntentDeviceStateCollectionResponse instantiates a new DeviceManagementIntentDeviceStateCollectionResponse and sets the default values. +func NewDeviceManagementIntentDeviceStateCollectionResponse()(*DeviceManagementIntentDeviceStateCollectionResponse) { + m := &DeviceManagementIntentDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentDeviceStateCollectionResponse) GetValue()([]DeviceManagementIntentDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentDeviceStateCollectionResponse) SetValue(value []DeviceManagementIntentDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_responseable.go new file mode 100644 index 000000000..347c4b8af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceStateCollectionResponseable +type DeviceManagementIntentDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentDeviceStateable) + SetValue(value []DeviceManagementIntentDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summary.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summary.go new file mode 100644 index 000000000..1acd2e988 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summary.go @@ -0,0 +1,190 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceStateSummary +type DeviceManagementIntentDeviceStateSummary struct { + Entity + // Number of devices in conflict + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of failed devices + failedCount *int32 + // Number of not applicable devices + notApplicableCount *int32 + // Number of not applicable devices due to mismatch platform and policy + notApplicablePlatformCount *int32 + // Number of succeeded devices + successCount *int32 +} +// NewDeviceManagementIntentDeviceStateSummary instantiates a new deviceManagementIntentDeviceStateSummary and sets the default values. +func NewDeviceManagementIntentDeviceStateSummary()(*DeviceManagementIntentDeviceStateSummary) { + m := &DeviceManagementIntentDeviceStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentDeviceStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentDeviceStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentDeviceStateSummary(), nil +} +// GetConflictCount gets the conflictCount property value. Number of devices in conflict +func (m *DeviceManagementIntentDeviceStateSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *DeviceManagementIntentDeviceStateSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed devices +func (m *DeviceManagementIntentDeviceStateSummary) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentDeviceStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["notApplicablePlatformCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicablePlatformCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceManagementIntentDeviceStateSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetNotApplicablePlatformCount gets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceManagementIntentDeviceStateSummary) GetNotApplicablePlatformCount()(*int32) { + return m.notApplicablePlatformCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded devices +func (m *DeviceManagementIntentDeviceStateSummary) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentDeviceStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicablePlatformCount", m.GetNotApplicablePlatformCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConflictCount sets the conflictCount property value. Number of devices in conflict +func (m *DeviceManagementIntentDeviceStateSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *DeviceManagementIntentDeviceStateSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed devices +func (m *DeviceManagementIntentDeviceStateSummary) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *DeviceManagementIntentDeviceStateSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetNotApplicablePlatformCount sets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *DeviceManagementIntentDeviceStateSummary) SetNotApplicablePlatformCount(value *int32)() { + m.notApplicablePlatformCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded devices +func (m *DeviceManagementIntentDeviceStateSummary) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summaryable.go new file mode 100644 index 000000000..10069be13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_state_summaryable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceStateSummaryable +type DeviceManagementIntentDeviceStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetNotApplicableCount()(*int32) + GetNotApplicablePlatformCount()(*int32) + GetSuccessCount()(*int32) + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetNotApplicableCount(value *int32)() + SetNotApplicablePlatformCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_device_stateable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_device_stateable.go new file mode 100644 index 000000000..ec6ffda35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_device_stateable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentDeviceStateable +type DeviceManagementIntentDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceDisplayName()(*string) + GetDeviceId()(*string) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*ComplianceStatus) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetDeviceDisplayName(value *string)() + SetDeviceId(value *string)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *ComplianceStatus)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category.go new file mode 100644 index 000000000..462887750 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingCategory +type DeviceManagementIntentSettingCategory struct { + DeviceManagementSettingCategory + // The settings this category contains + settings []DeviceManagementSettingInstanceable +} +// NewDeviceManagementIntentSettingCategory instantiates a new DeviceManagementIntentSettingCategory and sets the default values. +func NewDeviceManagementIntentSettingCategory()(*DeviceManagementIntentSettingCategory) { + m := &DeviceManagementIntentSettingCategory{ + DeviceManagementSettingCategory: *NewDeviceManagementSettingCategory(), + } + return m +} +// CreateDeviceManagementIntentSettingCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentSettingCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentSettingCategory(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentSettingCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingCategory.GetFieldDeserializers() + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetSettings(res) + } + return nil + } + return res +} +// GetSettings gets the settings property value. The settings this category contains +func (m *DeviceManagementIntentSettingCategory) GetSettings()([]DeviceManagementSettingInstanceable) { + return m.settings +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentSettingCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingCategory.Serialize(writer) + if err != nil { + return err + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + return nil +} +// SetSettings sets the settings property value. The settings this category contains +func (m *DeviceManagementIntentSettingCategory) SetSettings(value []DeviceManagementSettingInstanceable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_response.go new file mode 100644 index 000000000..efa204a37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingCategoryCollectionResponse +type DeviceManagementIntentSettingCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentSettingCategoryable +} +// NewDeviceManagementIntentSettingCategoryCollectionResponse instantiates a new DeviceManagementIntentSettingCategoryCollectionResponse and sets the default values. +func NewDeviceManagementIntentSettingCategoryCollectionResponse()(*DeviceManagementIntentSettingCategoryCollectionResponse) { + m := &DeviceManagementIntentSettingCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentSettingCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentSettingCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentSettingCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentSettingCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentSettingCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentSettingCategoryCollectionResponse) GetValue()([]DeviceManagementIntentSettingCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentSettingCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentSettingCategoryCollectionResponse) SetValue(value []DeviceManagementIntentSettingCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_responseable.go new file mode 100644 index 000000000..9f506b74d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingCategoryCollectionResponseable +type DeviceManagementIntentSettingCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentSettingCategoryable) + SetValue(value []DeviceManagementIntentSettingCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_categoryable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_categoryable.go new file mode 100644 index 000000000..b53d22046 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_categoryable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingCategoryable +type DeviceManagementIntentSettingCategoryable interface { + DeviceManagementSettingCategoryable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettings()([]DeviceManagementSettingInstanceable) + SetSettings(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraint.go new file mode 100644 index 000000000..bc679378a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraint.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingSecretConstraint +type DeviceManagementIntentSettingSecretConstraint struct { + DeviceManagementConstraint +} +// NewDeviceManagementIntentSettingSecretConstraint instantiates a new DeviceManagementIntentSettingSecretConstraint and sets the default values. +func NewDeviceManagementIntentSettingSecretConstraint()(*DeviceManagementIntentSettingSecretConstraint) { + m := &DeviceManagementIntentSettingSecretConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementIntentSettingSecretConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementIntentSettingSecretConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentSettingSecretConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentSettingSecretConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentSettingSecretConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentSettingSecretConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraintable.go new file mode 100644 index 000000000..25b7fd336 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_setting_secret_constraintable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentSettingSecretConstraintable +type DeviceManagementIntentSettingSecretConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_state.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state.go new file mode 100644 index 000000000..13397ee9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserState entity that represents user state for an intent +type DeviceManagementIntentUserState struct { + Entity + // Count of Devices that belongs to a user for an intent + deviceCount *int32 + // Last modified date time of an intent report + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The state property + state *ComplianceStatus + // The user name that is being reported on a device + userName *string + // The user principal name that is being reported on a device + userPrincipalName *string +} +// NewDeviceManagementIntentUserState instantiates a new deviceManagementIntentUserState and sets the default values. +func NewDeviceManagementIntentUserState()(*DeviceManagementIntentUserState) { + m := &DeviceManagementIntentUserState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentUserStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentUserStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentUserState(), nil +} +// GetDeviceCount gets the deviceCount property value. Count of Devices that belongs to a user for an intent +func (m *DeviceManagementIntentUserState) GetDeviceCount()(*int32) { + return m.deviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentUserState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCount(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of an intent report +func (m *DeviceManagementIntentUserState) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetState gets the state property value. The state property +func (m *DeviceManagementIntentUserState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserName gets the userName property value. The user name that is being reported on a device +func (m *DeviceManagementIntentUserState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name that is being reported on a device +func (m *DeviceManagementIntentUserState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentUserState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("deviceCount", m.GetDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceCount sets the deviceCount property value. Count of Devices that belongs to a user for an intent +func (m *DeviceManagementIntentUserState) SetDeviceCount(value *int32)() { + m.deviceCount = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of an intent report +func (m *DeviceManagementIntentUserState) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetState sets the state property value. The state property +func (m *DeviceManagementIntentUserState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserName sets the userName property value. The user name that is being reported on a device +func (m *DeviceManagementIntentUserState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name that is being reported on a device +func (m *DeviceManagementIntentUserState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_response.go new file mode 100644 index 000000000..99dd5b997 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserStateCollectionResponse +type DeviceManagementIntentUserStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementIntentUserStateable +} +// NewDeviceManagementIntentUserStateCollectionResponse instantiates a new DeviceManagementIntentUserStateCollectionResponse and sets the default values. +func NewDeviceManagementIntentUserStateCollectionResponse()(*DeviceManagementIntentUserStateCollectionResponse) { + m := &DeviceManagementIntentUserStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementIntentUserStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentUserStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentUserStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentUserStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementIntentUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementIntentUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementIntentUserStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementIntentUserStateCollectionResponse) GetValue()([]DeviceManagementIntentUserStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentUserStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementIntentUserStateCollectionResponse) SetValue(value []DeviceManagementIntentUserStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_responseable.go new file mode 100644 index 000000000..5640cb388 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserStateCollectionResponseable +type DeviceManagementIntentUserStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementIntentUserStateable) + SetValue(value []DeviceManagementIntentUserStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summary.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summary.go new file mode 100644 index 000000000..c01116ed8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summary.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserStateSummary +type DeviceManagementIntentUserStateSummary struct { + Entity + // Number of users in conflict + conflictCount *int32 + // Number of error users + errorCount *int32 + // Number of failed users + failedCount *int32 + // Number of not applicable users + notApplicableCount *int32 + // Number of succeeded users + successCount *int32 +} +// NewDeviceManagementIntentUserStateSummary instantiates a new deviceManagementIntentUserStateSummary and sets the default values. +func NewDeviceManagementIntentUserStateSummary()(*DeviceManagementIntentUserStateSummary) { + m := &DeviceManagementIntentUserStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementIntentUserStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementIntentUserStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementIntentUserStateSummary(), nil +} +// GetConflictCount gets the conflictCount property value. Number of users in conflict +func (m *DeviceManagementIntentUserStateSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error users +func (m *DeviceManagementIntentUserStateSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed users +func (m *DeviceManagementIntentUserStateSummary) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementIntentUserStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable users +func (m *DeviceManagementIntentUserStateSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded users +func (m *DeviceManagementIntentUserStateSummary) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *DeviceManagementIntentUserStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConflictCount sets the conflictCount property value. Number of users in conflict +func (m *DeviceManagementIntentUserStateSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error users +func (m *DeviceManagementIntentUserStateSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed users +func (m *DeviceManagementIntentUserStateSummary) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable users +func (m *DeviceManagementIntentUserStateSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded users +func (m *DeviceManagementIntentUserStateSummary) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summaryable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summaryable.go new file mode 100644 index 000000000..0558bf331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_state_summaryable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserStateSummaryable +type DeviceManagementIntentUserStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetNotApplicableCount()(*int32) + GetSuccessCount()(*int32) + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetNotApplicableCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intent_user_stateable.go b/src/internal/connector/graph/betasdk/models/device_management_intent_user_stateable.go new file mode 100644 index 000000000..093d69a3e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intent_user_stateable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentUserStateable +type DeviceManagementIntentUserStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceCount()(*int32) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*ComplianceStatus) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetDeviceCount(value *int32)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *ComplianceStatus)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_intentable.go b/src/internal/connector/graph/betasdk/models/device_management_intentable.go new file mode 100644 index 000000000..d0cf97685 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_intentable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementIntentable +type DeviceManagementIntentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementIntentAssignmentable) + GetCategories()([]DeviceManagementIntentSettingCategoryable) + GetDescription()(*string) + GetDeviceSettingStateSummaries()([]DeviceManagementIntentDeviceSettingStateSummaryable) + GetDeviceStates()([]DeviceManagementIntentDeviceStateable) + GetDeviceStateSummary()(DeviceManagementIntentDeviceStateSummaryable) + GetDisplayName()(*string) + GetIsAssigned()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetSettings()([]DeviceManagementSettingInstanceable) + GetTemplateId()(*string) + GetUserStates()([]DeviceManagementIntentUserStateable) + GetUserStateSummary()(DeviceManagementIntentUserStateSummaryable) + SetAssignments(value []DeviceManagementIntentAssignmentable)() + SetCategories(value []DeviceManagementIntentSettingCategoryable)() + SetDescription(value *string)() + SetDeviceSettingStateSummaries(value []DeviceManagementIntentDeviceSettingStateSummaryable)() + SetDeviceStates(value []DeviceManagementIntentDeviceStateable)() + SetDeviceStateSummary(value DeviceManagementIntentDeviceStateSummaryable)() + SetDisplayName(value *string)() + SetIsAssigned(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetSettings(value []DeviceManagementSettingInstanceable)() + SetTemplateId(value *string)() + SetUserStates(value []DeviceManagementIntentUserStateable)() + SetUserStateSummary(value DeviceManagementIntentUserStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner.go b/src/internal/connector/graph/betasdk/models/device_management_partner.go new file mode 100644 index 000000000..e454b1f75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner.go @@ -0,0 +1,331 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartner entity which represents a connection to device management partner. +type DeviceManagementPartner struct { + Entity + // Partner display name + displayName *string + // User groups that specifies whether enrollment is through partner. + groupsRequiringPartnerEnrollment []DeviceManagementPartnerAssignmentable + // Whether device management partner is configured or not + isConfigured *bool + // Timestamp of last heartbeat after admin enabled option Connect to Device management Partner + lastHeartbeatDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Partner App Type. + partnerAppType *DeviceManagementPartnerAppType + // Partner state of this tenant. + partnerState *DeviceManagementPartnerTenantState + // Partner Single tenant App id + singleTenantAppId *string + // DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will become obselete soon. + whenPartnerDevicesWillBeMarkedAsNonCompliant *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DateTime in UTC when PartnerDevices will be marked as NonCompliant + whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DateTime in UTC when PartnerDevices will be removed. This will become obselete soon. + whenPartnerDevicesWillBeRemoved *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DateTime in UTC when PartnerDevices will be removed + whenPartnerDevicesWillBeRemovedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDeviceManagementPartner instantiates a new deviceManagementPartner and sets the default values. +func NewDeviceManagementPartner()(*DeviceManagementPartner) { + m := &DeviceManagementPartner{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementPartnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementPartnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementPartner(), nil +} +// GetDisplayName gets the displayName property value. Partner display name +func (m *DeviceManagementPartner) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementPartner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["groupsRequiringPartnerEnrollment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementPartnerAssignmentable) + } + m.SetGroupsRequiringPartnerEnrollment(res) + } + return nil + } + res["isConfigured"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsConfigured(val) + } + return nil + } + res["lastHeartbeatDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastHeartbeatDateTime(val) + } + return nil + } + res["partnerAppType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementPartnerAppType) + if err != nil { + return err + } + if val != nil { + m.SetPartnerAppType(val.(*DeviceManagementPartnerAppType)) + } + return nil + } + res["partnerState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementPartnerTenantState) + if err != nil { + return err + } + if val != nil { + m.SetPartnerState(val.(*DeviceManagementPartnerTenantState)) + } + return nil + } + res["singleTenantAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleTenantAppId(val) + } + return nil + } + res["whenPartnerDevicesWillBeMarkedAsNonCompliant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWhenPartnerDevicesWillBeMarkedAsNonCompliant(val) + } + return nil + } + res["whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime(val) + } + return nil + } + res["whenPartnerDevicesWillBeRemoved"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWhenPartnerDevicesWillBeRemoved(val) + } + return nil + } + res["whenPartnerDevicesWillBeRemovedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetWhenPartnerDevicesWillBeRemovedDateTime(val) + } + return nil + } + return res +} +// GetGroupsRequiringPartnerEnrollment gets the groupsRequiringPartnerEnrollment property value. User groups that specifies whether enrollment is through partner. +func (m *DeviceManagementPartner) GetGroupsRequiringPartnerEnrollment()([]DeviceManagementPartnerAssignmentable) { + return m.groupsRequiringPartnerEnrollment +} +// GetIsConfigured gets the isConfigured property value. Whether device management partner is configured or not +func (m *DeviceManagementPartner) GetIsConfigured()(*bool) { + return m.isConfigured +} +// GetLastHeartbeatDateTime gets the lastHeartbeatDateTime property value. Timestamp of last heartbeat after admin enabled option Connect to Device management Partner +func (m *DeviceManagementPartner) GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastHeartbeatDateTime +} +// GetPartnerAppType gets the partnerAppType property value. Partner App Type. +func (m *DeviceManagementPartner) GetPartnerAppType()(*DeviceManagementPartnerAppType) { + return m.partnerAppType +} +// GetPartnerState gets the partnerState property value. Partner state of this tenant. +func (m *DeviceManagementPartner) GetPartnerState()(*DeviceManagementPartnerTenantState) { + return m.partnerState +} +// GetSingleTenantAppId gets the singleTenantAppId property value. Partner Single tenant App id +func (m *DeviceManagementPartner) GetSingleTenantAppId()(*string) { + return m.singleTenantAppId +} +// GetWhenPartnerDevicesWillBeMarkedAsNonCompliant gets the whenPartnerDevicesWillBeMarkedAsNonCompliant property value. DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will become obselete soon. +func (m *DeviceManagementPartner) GetWhenPartnerDevicesWillBeMarkedAsNonCompliant()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.whenPartnerDevicesWillBeMarkedAsNonCompliant +} +// GetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime gets the whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime property value. DateTime in UTC when PartnerDevices will be marked as NonCompliant +func (m *DeviceManagementPartner) GetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime +} +// GetWhenPartnerDevicesWillBeRemoved gets the whenPartnerDevicesWillBeRemoved property value. DateTime in UTC when PartnerDevices will be removed. This will become obselete soon. +func (m *DeviceManagementPartner) GetWhenPartnerDevicesWillBeRemoved()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.whenPartnerDevicesWillBeRemoved +} +// GetWhenPartnerDevicesWillBeRemovedDateTime gets the whenPartnerDevicesWillBeRemovedDateTime property value. DateTime in UTC when PartnerDevices will be removed +func (m *DeviceManagementPartner) GetWhenPartnerDevicesWillBeRemovedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.whenPartnerDevicesWillBeRemovedDateTime +} +// Serialize serializes information the current object +func (m *DeviceManagementPartner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetGroupsRequiringPartnerEnrollment() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupsRequiringPartnerEnrollment())) + for i, v := range m.GetGroupsRequiringPartnerEnrollment() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupsRequiringPartnerEnrollment", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isConfigured", m.GetIsConfigured()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastHeartbeatDateTime", m.GetLastHeartbeatDateTime()) + if err != nil { + return err + } + } + if m.GetPartnerAppType() != nil { + cast := (*m.GetPartnerAppType()).String() + err = writer.WriteStringValue("partnerAppType", &cast) + if err != nil { + return err + } + } + if m.GetPartnerState() != nil { + cast := (*m.GetPartnerState()).String() + err = writer.WriteStringValue("partnerState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("singleTenantAppId", m.GetSingleTenantAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("whenPartnerDevicesWillBeMarkedAsNonCompliant", m.GetWhenPartnerDevicesWillBeMarkedAsNonCompliant()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime", m.GetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("whenPartnerDevicesWillBeRemoved", m.GetWhenPartnerDevicesWillBeRemoved()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("whenPartnerDevicesWillBeRemovedDateTime", m.GetWhenPartnerDevicesWillBeRemovedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Partner display name +func (m *DeviceManagementPartner) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGroupsRequiringPartnerEnrollment sets the groupsRequiringPartnerEnrollment property value. User groups that specifies whether enrollment is through partner. +func (m *DeviceManagementPartner) SetGroupsRequiringPartnerEnrollment(value []DeviceManagementPartnerAssignmentable)() { + m.groupsRequiringPartnerEnrollment = value +} +// SetIsConfigured sets the isConfigured property value. Whether device management partner is configured or not +func (m *DeviceManagementPartner) SetIsConfigured(value *bool)() { + m.isConfigured = value +} +// SetLastHeartbeatDateTime sets the lastHeartbeatDateTime property value. Timestamp of last heartbeat after admin enabled option Connect to Device management Partner +func (m *DeviceManagementPartner) SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastHeartbeatDateTime = value +} +// SetPartnerAppType sets the partnerAppType property value. Partner App Type. +func (m *DeviceManagementPartner) SetPartnerAppType(value *DeviceManagementPartnerAppType)() { + m.partnerAppType = value +} +// SetPartnerState sets the partnerState property value. Partner state of this tenant. +func (m *DeviceManagementPartner) SetPartnerState(value *DeviceManagementPartnerTenantState)() { + m.partnerState = value +} +// SetSingleTenantAppId sets the singleTenantAppId property value. Partner Single tenant App id +func (m *DeviceManagementPartner) SetSingleTenantAppId(value *string)() { + m.singleTenantAppId = value +} +// SetWhenPartnerDevicesWillBeMarkedAsNonCompliant sets the whenPartnerDevicesWillBeMarkedAsNonCompliant property value. DateTime in UTC when PartnerDevices will be marked as NonCompliant. This will become obselete soon. +func (m *DeviceManagementPartner) SetWhenPartnerDevicesWillBeMarkedAsNonCompliant(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.whenPartnerDevicesWillBeMarkedAsNonCompliant = value +} +// SetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime sets the whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime property value. DateTime in UTC when PartnerDevices will be marked as NonCompliant +func (m *DeviceManagementPartner) SetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.whenPartnerDevicesWillBeMarkedAsNonCompliantDateTime = value +} +// SetWhenPartnerDevicesWillBeRemoved sets the whenPartnerDevicesWillBeRemoved property value. DateTime in UTC when PartnerDevices will be removed. This will become obselete soon. +func (m *DeviceManagementPartner) SetWhenPartnerDevicesWillBeRemoved(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.whenPartnerDevicesWillBeRemoved = value +} +// SetWhenPartnerDevicesWillBeRemovedDateTime sets the whenPartnerDevicesWillBeRemovedDateTime property value. DateTime in UTC when PartnerDevices will be removed +func (m *DeviceManagementPartner) SetWhenPartnerDevicesWillBeRemovedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.whenPartnerDevicesWillBeRemovedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_app_type.go b/src/internal/connector/graph/betasdk/models/device_management_partner_app_type.go new file mode 100644 index 000000000..bfd5bba89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_app_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementPartnerAppType int + +const ( + // Partner App type is unknown. + UNKNOWN_DEVICEMANAGEMENTPARTNERAPPTYPE DeviceManagementPartnerAppType = iota + // Partner App is Single tenant in AAD. + SINGLETENANTAPP_DEVICEMANAGEMENTPARTNERAPPTYPE + // Partner App is Multi tenant in AAD. + MULTITENANTAPP_DEVICEMANAGEMENTPARTNERAPPTYPE +) + +func (i DeviceManagementPartnerAppType) String() string { + return []string{"unknown", "singleTenantApp", "multiTenantApp"}[i] +} +func ParseDeviceManagementPartnerAppType(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTPARTNERAPPTYPE + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTPARTNERAPPTYPE + case "singleTenantApp": + result = SINGLETENANTAPP_DEVICEMANAGEMENTPARTNERAPPTYPE + case "multiTenantApp": + result = MULTITENANTAPP_DEVICEMANAGEMENTPARTNERAPPTYPE + default: + return 0, errors.New("Unknown DeviceManagementPartnerAppType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementPartnerAppType(values []DeviceManagementPartnerAppType) []string { + 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/device_management_partner_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment.go new file mode 100644 index 000000000..e55f850f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerAssignment user group targeting for Device Management Partner +type DeviceManagementPartnerAssignment 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 OdataType property + odataType *string + // User groups targeting for devices to be enrolled through partner. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceManagementPartnerAssignment instantiates a new deviceManagementPartnerAssignment and sets the default values. +func NewDeviceManagementPartnerAssignment()(*DeviceManagementPartnerAssignment) { + m := &DeviceManagementPartnerAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementPartnerAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementPartnerAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementPartnerAssignment(), 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 *DeviceManagementPartnerAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementPartnerAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementPartnerAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. User groups targeting for devices to be enrolled through partner. +func (m *DeviceManagementPartnerAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceManagementPartnerAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("target", m.GetTarget()) + 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 *DeviceManagementPartnerAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementPartnerAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. User groups targeting for devices to be enrolled through partner. +func (m *DeviceManagementPartnerAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_response.go new file mode 100644 index 000000000..ba60d270d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerAssignmentCollectionResponse +type DeviceManagementPartnerAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementPartnerAssignmentable +} +// NewDeviceManagementPartnerAssignmentCollectionResponse instantiates a new DeviceManagementPartnerAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementPartnerAssignmentCollectionResponse()(*DeviceManagementPartnerAssignmentCollectionResponse) { + m := &DeviceManagementPartnerAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementPartnerAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementPartnerAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementPartnerAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementPartnerAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementPartnerAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementPartnerAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementPartnerAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementPartnerAssignmentCollectionResponse) GetValue()([]DeviceManagementPartnerAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementPartnerAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementPartnerAssignmentCollectionResponse) SetValue(value []DeviceManagementPartnerAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_responseable.go new file mode 100644 index 000000000..277c5bb52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerAssignmentCollectionResponseable +type DeviceManagementPartnerAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementPartnerAssignmentable) + SetValue(value []DeviceManagementPartnerAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_partner_assignmentable.go new file mode 100644 index 000000000..99f70ab37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_assignmentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerAssignmentable +type DeviceManagementPartnerAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetOdataType(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_partner_collection_response.go new file mode 100644 index 000000000..c3f302c75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerCollectionResponse +type DeviceManagementPartnerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementPartnerable +} +// NewDeviceManagementPartnerCollectionResponse instantiates a new DeviceManagementPartnerCollectionResponse and sets the default values. +func NewDeviceManagementPartnerCollectionResponse()(*DeviceManagementPartnerCollectionResponse) { + m := &DeviceManagementPartnerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementPartnerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementPartnerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementPartnerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementPartnerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementPartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementPartnerable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementPartnerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementPartnerCollectionResponse) GetValue()([]DeviceManagementPartnerable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementPartnerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementPartnerCollectionResponse) SetValue(value []DeviceManagementPartnerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_partner_collection_responseable.go new file mode 100644 index 000000000..195aeabb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerCollectionResponseable +type DeviceManagementPartnerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementPartnerable) + SetValue(value []DeviceManagementPartnerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_partner_tenant_state.go b/src/internal/connector/graph/betasdk/models/device_management_partner_tenant_state.go new file mode 100644 index 000000000..f3daae80b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partner_tenant_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementPartnerTenantState int + +const ( + // Partner state is unknown. + UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE DeviceManagementPartnerTenantState = iota + // Partner is unavailable. + UNAVAILABLE_DEVICEMANAGEMENTPARTNERTENANTSTATE + // Partner is enabled. + ENABLED_DEVICEMANAGEMENTPARTNERTENANTSTATE + // Partner connection is terminated. + TERMINATED_DEVICEMANAGEMENTPARTNERTENANTSTATE + // Partner messages are rejected. + REJECTED_DEVICEMANAGEMENTPARTNERTENANTSTATE + // Partner is unresponsive. + UNRESPONSIVE_DEVICEMANAGEMENTPARTNERTENANTSTATE +) + +func (i DeviceManagementPartnerTenantState) String() string { + return []string{"unknown", "unavailable", "enabled", "terminated", "rejected", "unresponsive"}[i] +} +func ParseDeviceManagementPartnerTenantState(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTPARTNERTENANTSTATE + case "unavailable": + result = UNAVAILABLE_DEVICEMANAGEMENTPARTNERTENANTSTATE + case "enabled": + result = ENABLED_DEVICEMANAGEMENTPARTNERTENANTSTATE + case "terminated": + result = TERMINATED_DEVICEMANAGEMENTPARTNERTENANTSTATE + case "rejected": + result = REJECTED_DEVICEMANAGEMENTPARTNERTENANTSTATE + case "unresponsive": + result = UNRESPONSIVE_DEVICEMANAGEMENTPARTNERTENANTSTATE + default: + return 0, errors.New("Unknown DeviceManagementPartnerTenantState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementPartnerTenantState(values []DeviceManagementPartnerTenantState) []string { + 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/device_management_partnerable.go b/src/internal/connector/graph/betasdk/models/device_management_partnerable.go new file mode 100644 index 000000000..1beec56e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_partnerable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPartnerable +type DeviceManagementPartnerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetGroupsRequiringPartnerEnrollment()([]DeviceManagementPartnerAssignmentable) + GetIsConfigured()(*bool) + GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPartnerAppType()(*DeviceManagementPartnerAppType) + GetPartnerState()(*DeviceManagementPartnerTenantState) + GetSingleTenantAppId()(*string) + GetWhenPartnerDevicesWillBeMarkedAsNonCompliant()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWhenPartnerDevicesWillBeRemoved()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWhenPartnerDevicesWillBeRemovedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDisplayName(value *string)() + SetGroupsRequiringPartnerEnrollment(value []DeviceManagementPartnerAssignmentable)() + SetIsConfigured(value *bool)() + SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPartnerAppType(value *DeviceManagementPartnerAppType)() + SetPartnerState(value *DeviceManagementPartnerTenantState)() + SetSingleTenantAppId(value *string)() + SetWhenPartnerDevicesWillBeMarkedAsNonCompliant(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWhenPartnerDevicesWillBeMarkedAsNonCompliantDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWhenPartnerDevicesWillBeRemoved(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWhenPartnerDevicesWillBeRemovedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_priority_meta_data.go b/src/internal/connector/graph/betasdk/models/device_management_priority_meta_data.go new file mode 100644 index 000000000..5b8aeb0d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_priority_meta_data.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPriorityMetaData priority metadata of the policy. +type DeviceManagementPriorityMetaData 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 OdataType property + odataType *string + // Priority of the policy. Valid values 1 to 500 + priority *int32 +} +// NewDeviceManagementPriorityMetaData instantiates a new deviceManagementPriorityMetaData and sets the default values. +func NewDeviceManagementPriorityMetaData()(*DeviceManagementPriorityMetaData) { + m := &DeviceManagementPriorityMetaData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementPriorityMetaDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementPriorityMetaDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementPriorityMetaData(), 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 *DeviceManagementPriorityMetaData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementPriorityMetaData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementPriorityMetaData) GetOdataType()(*string) { + return m.odataType +} +// GetPriority gets the priority property value. Priority of the policy. Valid values 1 to 500 +func (m *DeviceManagementPriorityMetaData) GetPriority()(*int32) { + return m.priority +} +// Serialize serializes information the current object +func (m *DeviceManagementPriorityMetaData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("priority", m.GetPriority()) + 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 *DeviceManagementPriorityMetaData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementPriorityMetaData) SetOdataType(value *string)() { + m.odataType = value +} +// SetPriority sets the priority property value. Priority of the policy. Valid values 1 to 500 +func (m *DeviceManagementPriorityMetaData) SetPriority(value *int32)() { + m.priority = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_priority_meta_dataable.go b/src/internal/connector/graph/betasdk/models/device_management_priority_meta_dataable.go new file mode 100644 index 000000000..99bec8b75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_priority_meta_dataable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementPriorityMetaDataable +type DeviceManagementPriorityMetaDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPriority()(*int32) + SetOdataType(value *string)() + SetPriority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_report_file_format.go b/src/internal/connector/graph/betasdk/models/device_management_report_file_format.go new file mode 100644 index 000000000..979396e02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_report_file_format.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementReportFileFormat int + +const ( + // CSV Format + CSV_DEVICEMANAGEMENTREPORTFILEFORMAT DeviceManagementReportFileFormat = iota + // PDF Format (Deprecate later) + PDF_DEVICEMANAGEMENTREPORTFILEFORMAT + // JSON Format + JSON_DEVICEMANAGEMENTREPORTFILEFORMAT + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTREPORTFILEFORMAT +) + +func (i DeviceManagementReportFileFormat) String() string { + return []string{"csv", "pdf", "json", "unknownFutureValue"}[i] +} +func ParseDeviceManagementReportFileFormat(v string) (interface{}, error) { + result := CSV_DEVICEMANAGEMENTREPORTFILEFORMAT + switch v { + case "csv": + result = CSV_DEVICEMANAGEMENTREPORTFILEFORMAT + case "pdf": + result = PDF_DEVICEMANAGEMENTREPORTFILEFORMAT + case "json": + result = JSON_DEVICEMANAGEMENTREPORTFILEFORMAT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEMANAGEMENTREPORTFILEFORMAT + default: + return 0, errors.New("Unknown DeviceManagementReportFileFormat value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementReportFileFormat(values []DeviceManagementReportFileFormat) []string { + 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/device_management_report_status.go b/src/internal/connector/graph/betasdk/models/device_management_report_status.go new file mode 100644 index 000000000..532647f42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_report_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementReportStatus int + +const ( + // Report generation status is unknown + UNKNOWN_DEVICEMANAGEMENTREPORTSTATUS DeviceManagementReportStatus = iota + // Report generation has not started + NOTSTARTED_DEVICEMANAGEMENTREPORTSTATUS + // Report generation is in progress + INPROGRESS_DEVICEMANAGEMENTREPORTSTATUS + // Report generation is completed + COMPLETED_DEVICEMANAGEMENTREPORTSTATUS + // Report generation has failed + FAILED_DEVICEMANAGEMENTREPORTSTATUS +) + +func (i DeviceManagementReportStatus) String() string { + return []string{"unknown", "notStarted", "inProgress", "completed", "failed"}[i] +} +func ParseDeviceManagementReportStatus(v string) (interface{}, error) { + result := UNKNOWN_DEVICEMANAGEMENTREPORTSTATUS + switch v { + case "unknown": + result = UNKNOWN_DEVICEMANAGEMENTREPORTSTATUS + case "notStarted": + result = NOTSTARTED_DEVICEMANAGEMENTREPORTSTATUS + case "inProgress": + result = INPROGRESS_DEVICEMANAGEMENTREPORTSTATUS + case "completed": + result = COMPLETED_DEVICEMANAGEMENTREPORTSTATUS + case "failed": + result = FAILED_DEVICEMANAGEMENTREPORTSTATUS + default: + return 0, errors.New("Unknown DeviceManagementReportStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementReportStatus(values []DeviceManagementReportStatus) []string { + 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/device_management_reports.go b/src/internal/connector/graph/betasdk/models/device_management_reports.go new file mode 100644 index 000000000..a532fe90d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reports.go @@ -0,0 +1,102 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReports +type DeviceManagementReports struct { + Entity + // Entity representing the configuration of a cached report + cachedReportConfigurations []DeviceManagementCachedReportConfigurationable + // Entity representing a job to export a report + exportJobs []DeviceManagementExportJobable +} +// NewDeviceManagementReports instantiates a new deviceManagementReports and sets the default values. +func NewDeviceManagementReports()(*DeviceManagementReports) { + m := &DeviceManagementReports{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementReportsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementReportsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementReports(), nil +} +// GetCachedReportConfigurations gets the cachedReportConfigurations property value. Entity representing the configuration of a cached report +func (m *DeviceManagementReports) GetCachedReportConfigurations()([]DeviceManagementCachedReportConfigurationable) { + return m.cachedReportConfigurations +} +// GetExportJobs gets the exportJobs property value. Entity representing a job to export a report +func (m *DeviceManagementReports) GetExportJobs()([]DeviceManagementExportJobable) { + return m.exportJobs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementReports) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["cachedReportConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementCachedReportConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementCachedReportConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementCachedReportConfigurationable) + } + m.SetCachedReportConfigurations(res) + } + return nil + } + res["exportJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementExportJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementExportJobable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementExportJobable) + } + m.SetExportJobs(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementReports) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCachedReportConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCachedReportConfigurations())) + for i, v := range m.GetCachedReportConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cachedReportConfigurations", cast) + if err != nil { + return err + } + } + if m.GetExportJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExportJobs())) + for i, v := range m.GetExportJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exportJobs", cast) + if err != nil { + return err + } + } + return nil +} +// SetCachedReportConfigurations sets the cachedReportConfigurations property value. Entity representing the configuration of a cached report +func (m *DeviceManagementReports) SetCachedReportConfigurations(value []DeviceManagementCachedReportConfigurationable)() { + m.cachedReportConfigurations = value +} +// SetExportJobs sets the exportJobs property value. Entity representing a job to export a report +func (m *DeviceManagementReports) SetExportJobs(value []DeviceManagementExportJobable)() { + m.exportJobs = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_reportsable.go b/src/internal/connector/graph/betasdk/models/device_management_reportsable.go new file mode 100644 index 000000000..2dbd02ce9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reportsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReportsable +type DeviceManagementReportsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCachedReportConfigurations()([]DeviceManagementCachedReportConfigurationable) + GetExportJobs()([]DeviceManagementExportJobable) + SetCachedReportConfigurations(value []DeviceManagementCachedReportConfigurationable)() + SetExportJobs(value []DeviceManagementExportJobable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment.go new file mode 100644 index 000000000..bf1303b22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileAssignment entity that describes tenant level settings for derived credentials +type DeviceManagementResourceAccessProfileAssignment struct { + Entity + // The administrator intent for the assignment of the profile. + intent *DeviceManagementResourceAccessProfileIntent + // The identifier of the source of the assignment. + sourceId *string + // Base type for assignment targets. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceManagementResourceAccessProfileAssignment instantiates a new deviceManagementResourceAccessProfileAssignment and sets the default values. +func NewDeviceManagementResourceAccessProfileAssignment()(*DeviceManagementResourceAccessProfileAssignment) { + m := &DeviceManagementResourceAccessProfileAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementResourceAccessProfileAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementResourceAccessProfileAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementResourceAccessProfileAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementResourceAccessProfileAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["intent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementResourceAccessProfileIntent) + if err != nil { + return err + } + if val != nil { + m.SetIntent(val.(*DeviceManagementResourceAccessProfileIntent)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetIntent gets the intent property value. The administrator intent for the assignment of the profile. +func (m *DeviceManagementResourceAccessProfileAssignment) GetIntent()(*DeviceManagementResourceAccessProfileIntent) { + return m.intent +} +// GetSourceId gets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceManagementResourceAccessProfileAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. Base type for assignment targets. +func (m *DeviceManagementResourceAccessProfileAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceManagementResourceAccessProfileAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetIntent() != nil { + cast := (*m.GetIntent()).String() + err = writer.WriteStringValue("intent", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetIntent sets the intent property value. The administrator intent for the assignment of the profile. +func (m *DeviceManagementResourceAccessProfileAssignment) SetIntent(value *DeviceManagementResourceAccessProfileIntent)() { + m.intent = value +} +// SetSourceId sets the sourceId property value. The identifier of the source of the assignment. +func (m *DeviceManagementResourceAccessProfileAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. Base type for assignment targets. +func (m *DeviceManagementResourceAccessProfileAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_response.go new file mode 100644 index 000000000..8e4578452 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileAssignmentCollectionResponse +type DeviceManagementResourceAccessProfileAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementResourceAccessProfileAssignmentable +} +// NewDeviceManagementResourceAccessProfileAssignmentCollectionResponse instantiates a new DeviceManagementResourceAccessProfileAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementResourceAccessProfileAssignmentCollectionResponse()(*DeviceManagementResourceAccessProfileAssignmentCollectionResponse) { + m := &DeviceManagementResourceAccessProfileAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementResourceAccessProfileAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementResourceAccessProfileAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementResourceAccessProfileAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementResourceAccessProfileAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementResourceAccessProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementResourceAccessProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementResourceAccessProfileAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementResourceAccessProfileAssignmentCollectionResponse) GetValue()([]DeviceManagementResourceAccessProfileAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementResourceAccessProfileAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementResourceAccessProfileAssignmentCollectionResponse) SetValue(value []DeviceManagementResourceAccessProfileAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_responseable.go new file mode 100644 index 000000000..d3af6a01b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileAssignmentCollectionResponseable +type DeviceManagementResourceAccessProfileAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementResourceAccessProfileAssignmentable) + SetValue(value []DeviceManagementResourceAccessProfileAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignmentable.go new file mode 100644 index 000000000..439243b0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileAssignmentable +type DeviceManagementResourceAccessProfileAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntent()(*DeviceManagementResourceAccessProfileIntent) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetIntent(value *DeviceManagementResourceAccessProfileIntent)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base.go new file mode 100644 index 000000000..b1662dfea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base.go @@ -0,0 +1,255 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileBase base Profile Type for Resource Access +type DeviceManagementResourceAccessProfileBase struct { + Entity + // The list of assignments for the device configuration profile. + assignments []DeviceManagementResourceAccessProfileAssignmentable + // DateTime profile was created + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Profile description + description *string + // Profile display name + displayName *string + // DateTime profile was last modified + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Scope Tags + roleScopeTagIds []string + // Version of the profile + version *int32 +} +// NewDeviceManagementResourceAccessProfileBase instantiates a new deviceManagementResourceAccessProfileBase and sets the default values. +func NewDeviceManagementResourceAccessProfileBase()(*DeviceManagementResourceAccessProfileBase) { + m := &DeviceManagementResourceAccessProfileBase{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windows10XCertificateProfile": + return NewWindows10XCertificateProfile(), nil + case "#microsoft.graph.windows10XSCEPCertificateProfile": + return NewWindows10XSCEPCertificateProfile(), nil + case "#microsoft.graph.windows10XTrustedRootCertificate": + return NewWindows10XTrustedRootCertificate(), nil + case "#microsoft.graph.windows10XVpnConfiguration": + return NewWindows10XVpnConfiguration(), nil + case "#microsoft.graph.windows10XWifiConfiguration": + return NewWindows10XWifiConfiguration(), nil + } + } + } + } + return NewDeviceManagementResourceAccessProfileBase(), nil +} +// GetAssignments gets the assignments property value. The list of assignments for the device configuration profile. +func (m *DeviceManagementResourceAccessProfileBase) GetAssignments()([]DeviceManagementResourceAccessProfileAssignmentable) { + return m.assignments +} +// GetCreationDateTime gets the creationDateTime property value. DateTime profile was created +func (m *DeviceManagementResourceAccessProfileBase) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetDescription gets the description property value. Profile description +func (m *DeviceManagementResourceAccessProfileBase) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Profile display name +func (m *DeviceManagementResourceAccessProfileBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementResourceAccessProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementResourceAccessProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementResourceAccessProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementResourceAccessProfileAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime profile was last modified +func (m *DeviceManagementResourceAccessProfileBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. Scope Tags +func (m *DeviceManagementResourceAccessProfileBase) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetVersion gets the version property value. Version of the profile +func (m *DeviceManagementResourceAccessProfileBase) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceManagementResourceAccessProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of assignments for the device configuration profile. +func (m *DeviceManagementResourceAccessProfileBase) SetAssignments(value []DeviceManagementResourceAccessProfileAssignmentable)() { + m.assignments = value +} +// SetCreationDateTime sets the creationDateTime property value. DateTime profile was created +func (m *DeviceManagementResourceAccessProfileBase) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetDescription sets the description property value. Profile description +func (m *DeviceManagementResourceAccessProfileBase) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Profile display name +func (m *DeviceManagementResourceAccessProfileBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime profile was last modified +func (m *DeviceManagementResourceAccessProfileBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. Scope Tags +func (m *DeviceManagementResourceAccessProfileBase) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetVersion sets the version property value. Version of the profile +func (m *DeviceManagementResourceAccessProfileBase) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_response.go new file mode 100644 index 000000000..5f604e067 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileBaseCollectionResponse +type DeviceManagementResourceAccessProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementResourceAccessProfileBaseable +} +// NewDeviceManagementResourceAccessProfileBaseCollectionResponse instantiates a new DeviceManagementResourceAccessProfileBaseCollectionResponse and sets the default values. +func NewDeviceManagementResourceAccessProfileBaseCollectionResponse()(*DeviceManagementResourceAccessProfileBaseCollectionResponse) { + m := &DeviceManagementResourceAccessProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementResourceAccessProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementResourceAccessProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementResourceAccessProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementResourceAccessProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementResourceAccessProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementResourceAccessProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementResourceAccessProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementResourceAccessProfileBaseCollectionResponse) GetValue()([]DeviceManagementResourceAccessProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementResourceAccessProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementResourceAccessProfileBaseCollectionResponse) SetValue(value []DeviceManagementResourceAccessProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_responseable.go new file mode 100644 index 000000000..62f7ebe7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileBaseCollectionResponseable +type DeviceManagementResourceAccessProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementResourceAccessProfileBaseable) + SetValue(value []DeviceManagementResourceAccessProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_baseable.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_baseable.go new file mode 100644 index 000000000..f6c98f22e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_baseable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementResourceAccessProfileBaseable +type DeviceManagementResourceAccessProfileBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementResourceAccessProfileAssignmentable) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetVersion()(*int32) + SetAssignments(value []DeviceManagementResourceAccessProfileAssignmentable)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_intent.go b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_intent.go new file mode 100644 index 000000000..ddf5fa0fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_resource_access_profile_intent.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementResourceAccessProfileIntent int + +const ( + // Apply the profile. + APPLY_DEVICEMANAGEMENTRESOURCEACCESSPROFILEINTENT DeviceManagementResourceAccessProfileIntent = iota + // Remove the profile from devices that have installed the profile. + REMOVE_DEVICEMANAGEMENTRESOURCEACCESSPROFILEINTENT +) + +func (i DeviceManagementResourceAccessProfileIntent) String() string { + return []string{"apply", "remove"}[i] +} +func ParseDeviceManagementResourceAccessProfileIntent(v string) (interface{}, error) { + result := APPLY_DEVICEMANAGEMENTRESOURCEACCESSPROFILEINTENT + switch v { + case "apply": + result = APPLY_DEVICEMANAGEMENTRESOURCEACCESSPROFILEINTENT + case "remove": + result = REMOVE_DEVICEMANAGEMENTRESOURCEACCESSPROFILEINTENT + default: + return 0, errors.New("Unknown DeviceManagementResourceAccessProfileIntent value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementResourceAccessProfileIntent(values []DeviceManagementResourceAccessProfileIntent) []string { + 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/device_management_reusable_policy_setting.go b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting.go new file mode 100644 index 000000000..9dddbf310 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting.go @@ -0,0 +1,253 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReusablePolicySetting graph model for a reusable setting +type DeviceManagementReusablePolicySetting struct { + Entity + // reusable setting creation date and time. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // reusable setting description supplied by user. + description *string + // reusable setting display name supplied by user. + displayName *string + // date and time when reusable setting was last modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // configuration policies referencing the current reusable setting. This property is read-only. + referencingConfigurationPolicies []DeviceManagementConfigurationPolicyable + // count of configuration policies referencing the current reusable setting. Valid values 0 to 2147483647. This property is read-only. + referencingConfigurationPolicyCount *int32 + // setting definition id associated with this reusable setting. + settingDefinitionId *string + // reusable setting configuration instance + settingInstance DeviceManagementConfigurationSettingInstanceable + // version number for reusable setting. Valid values 0 to 2147483647. This property is read-only. + version *int32 +} +// NewDeviceManagementReusablePolicySetting instantiates a new deviceManagementReusablePolicySetting and sets the default values. +func NewDeviceManagementReusablePolicySetting()(*DeviceManagementReusablePolicySetting) { + m := &DeviceManagementReusablePolicySetting{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementReusablePolicySettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementReusablePolicySettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementReusablePolicySetting(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. reusable setting creation date and time. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. reusable setting description supplied by user. +func (m *DeviceManagementReusablePolicySetting) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. reusable setting display name supplied by user. +func (m *DeviceManagementReusablePolicySetting) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementReusablePolicySetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["referencingConfigurationPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConfigurationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConfigurationPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConfigurationPolicyable) + } + m.SetReferencingConfigurationPolicies(res) + } + return nil + } + res["referencingConfigurationPolicyCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReferencingConfigurationPolicyCount(val) + } + return nil + } + res["settingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDefinitionId(val) + } + return nil + } + res["settingInstance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementConfigurationSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettingInstance(val.(DeviceManagementConfigurationSettingInstanceable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. date and time when reusable setting was last modified. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetReferencingConfigurationPolicies gets the referencingConfigurationPolicies property value. configuration policies referencing the current reusable setting. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) GetReferencingConfigurationPolicies()([]DeviceManagementConfigurationPolicyable) { + return m.referencingConfigurationPolicies +} +// GetReferencingConfigurationPolicyCount gets the referencingConfigurationPolicyCount property value. count of configuration policies referencing the current reusable setting. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) GetReferencingConfigurationPolicyCount()(*int32) { + return m.referencingConfigurationPolicyCount +} +// GetSettingDefinitionId gets the settingDefinitionId property value. setting definition id associated with this reusable setting. +func (m *DeviceManagementReusablePolicySetting) GetSettingDefinitionId()(*string) { + return m.settingDefinitionId +} +// GetSettingInstance gets the settingInstance property value. reusable setting configuration instance +func (m *DeviceManagementReusablePolicySetting) GetSettingInstance()(DeviceManagementConfigurationSettingInstanceable) { + return m.settingInstance +} +// GetVersion gets the version property value. version number for reusable setting. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceManagementReusablePolicySetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetReferencingConfigurationPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReferencingConfigurationPolicies())) + for i, v := range m.GetReferencingConfigurationPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("referencingConfigurationPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingDefinitionId", m.GetSettingDefinitionId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settingInstance", m.GetSettingInstance()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. reusable setting creation date and time. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. reusable setting description supplied by user. +func (m *DeviceManagementReusablePolicySetting) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. reusable setting display name supplied by user. +func (m *DeviceManagementReusablePolicySetting) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. date and time when reusable setting was last modified. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetReferencingConfigurationPolicies sets the referencingConfigurationPolicies property value. configuration policies referencing the current reusable setting. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) SetReferencingConfigurationPolicies(value []DeviceManagementConfigurationPolicyable)() { + m.referencingConfigurationPolicies = value +} +// SetReferencingConfigurationPolicyCount sets the referencingConfigurationPolicyCount property value. count of configuration policies referencing the current reusable setting. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) SetReferencingConfigurationPolicyCount(value *int32)() { + m.referencingConfigurationPolicyCount = value +} +// SetSettingDefinitionId sets the settingDefinitionId property value. setting definition id associated with this reusable setting. +func (m *DeviceManagementReusablePolicySetting) SetSettingDefinitionId(value *string)() { + m.settingDefinitionId = value +} +// SetSettingInstance sets the settingInstance property value. reusable setting configuration instance +func (m *DeviceManagementReusablePolicySetting) SetSettingInstance(value DeviceManagementConfigurationSettingInstanceable)() { + m.settingInstance = value +} +// SetVersion sets the version property value. version number for reusable setting. Valid values 0 to 2147483647. This property is read-only. +func (m *DeviceManagementReusablePolicySetting) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_response.go new file mode 100644 index 000000000..abc279808 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReusablePolicySettingCollectionResponse +type DeviceManagementReusablePolicySettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementReusablePolicySettingable +} +// NewDeviceManagementReusablePolicySettingCollectionResponse instantiates a new DeviceManagementReusablePolicySettingCollectionResponse and sets the default values. +func NewDeviceManagementReusablePolicySettingCollectionResponse()(*DeviceManagementReusablePolicySettingCollectionResponse) { + m := &DeviceManagementReusablePolicySettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementReusablePolicySettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementReusablePolicySettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementReusablePolicySettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementReusablePolicySettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementReusablePolicySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementReusablePolicySettingable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementReusablePolicySettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementReusablePolicySettingCollectionResponse) GetValue()([]DeviceManagementReusablePolicySettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementReusablePolicySettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementReusablePolicySettingCollectionResponse) SetValue(value []DeviceManagementReusablePolicySettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_responseable.go new file mode 100644 index 000000000..e76eeae2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReusablePolicySettingCollectionResponseable +type DeviceManagementReusablePolicySettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementReusablePolicySettingable) + SetValue(value []DeviceManagementReusablePolicySettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_settingable.go b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_settingable.go new file mode 100644 index 000000000..20b960ca3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_reusable_policy_settingable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementReusablePolicySettingable +type DeviceManagementReusablePolicySettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReferencingConfigurationPolicies()([]DeviceManagementConfigurationPolicyable) + GetReferencingConfigurationPolicyCount()(*int32) + GetSettingDefinitionId()(*string) + GetSettingInstance()(DeviceManagementConfigurationSettingInstanceable) + GetVersion()(*int32) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReferencingConfigurationPolicies(value []DeviceManagementConfigurationPolicyable)() + SetReferencingConfigurationPolicyCount(value *int32)() + SetSettingDefinitionId(value *string)() + SetSettingInstance(value DeviceManagementConfigurationSettingInstanceable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script.go b/src/internal/connector/graph/betasdk/models/device_management_script.go new file mode 100644 index 000000000..caa9403b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script.go @@ -0,0 +1,450 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScript intune will provide customer the ability to run their Powershell scripts on the enrolled windows 10 Azure Active Directory joined devices. The script can be run once or periodically. +type DeviceManagementScript struct { + Entity + // The list of group assignments for the device management script. + assignments []DeviceManagementScriptAssignmentable + // The date and time the device management script was created. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional description for the device management script. + description *string + // List of run states for this script across all devices. + deviceRunStates []DeviceManagementScriptDeviceStateable + // Name of the device management script. + displayName *string + // Indicate whether the script signature needs be checked. + enforceSignatureCheck *bool + // Script file name. + fileName *string + // The list of group assignments for the device management script. + groupAssignments []DeviceManagementScriptGroupAssignmentable + // The date and time the device management script was last modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tag IDs for this PowerShellScript instance. + roleScopeTagIds []string + // A value indicating whether the PowerShell script should run as 32-bit + runAs32Bit *bool + // Indicates the type of execution context the app runs in. + runAsAccount *RunAsAccountType + // Run summary for device management script. + runSummary DeviceManagementScriptRunSummaryable + // The script content. + scriptContent []byte + // List of run states for this script across all users. + userRunStates []DeviceManagementScriptUserStateable +} +// NewDeviceManagementScript instantiates a new deviceManagementScript and sets the default values. +func NewDeviceManagementScript()(*DeviceManagementScript) { + m := &DeviceManagementScript{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScript(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceManagementScript) GetAssignments()([]DeviceManagementScriptAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceManagementScript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Optional description for the device management script. +func (m *DeviceManagementScript) GetDescription()(*string) { + return m.description +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceManagementScript) GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) { + return m.deviceRunStates +} +// GetDisplayName gets the displayName property value. Name of the device management script. +func (m *DeviceManagementScript) GetDisplayName()(*string) { + return m.displayName +} +// GetEnforceSignatureCheck gets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked. +func (m *DeviceManagementScript) GetEnforceSignatureCheck()(*bool) { + return m.enforceSignatureCheck +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enforceSignatureCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnforceSignatureCheck(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["groupAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptGroupAssignmentable) + } + m.SetGroupAssignments(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["runAs32Bit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRunAs32Bit(val) + } + return nil + } + res["runAsAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunAsAccountType) + if err != nil { + return err + } + if val != nil { + m.SetRunAsAccount(val.(*RunAsAccountType)) + } + return nil + } + res["runSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementScriptRunSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSummary(val.(DeviceManagementScriptRunSummaryable)) + } + return nil + } + res["scriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetScriptContent(val) + } + return nil + } + res["userRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptUserStateable) + } + m.SetUserRunStates(res) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. Script file name. +func (m *DeviceManagementScript) GetFileName()(*string) { + return m.fileName +} +// GetGroupAssignments gets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceManagementScript) GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) { + return m.groupAssignments +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceManagementScript) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceManagementScript) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRunAs32Bit gets the runAs32Bit property value. A value indicating whether the PowerShell script should run as 32-bit +func (m *DeviceManagementScript) GetRunAs32Bit()(*bool) { + return m.runAs32Bit +} +// GetRunAsAccount gets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceManagementScript) GetRunAsAccount()(*RunAsAccountType) { + return m.runAsAccount +} +// GetRunSummary gets the runSummary property value. Run summary for device management script. +func (m *DeviceManagementScript) GetRunSummary()(DeviceManagementScriptRunSummaryable) { + return m.runSummary +} +// GetScriptContent gets the scriptContent property value. The script content. +func (m *DeviceManagementScript) GetScriptContent()([]byte) { + return m.scriptContent +} +// GetUserRunStates gets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceManagementScript) GetUserRunStates()([]DeviceManagementScriptUserStateable) { + return m.userRunStates +} +// Serialize serializes information the current object +func (m *DeviceManagementScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enforceSignatureCheck", m.GetEnforceSignatureCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + if m.GetGroupAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupAssignments())) + for i, v := range m.GetGroupAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("runAs32Bit", m.GetRunAs32Bit()) + if err != nil { + return err + } + } + if m.GetRunAsAccount() != nil { + cast := (*m.GetRunAsAccount()).String() + err = writer.WriteStringValue("runAsAccount", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSummary", m.GetRunSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("scriptContent", m.GetScriptContent()) + if err != nil { + return err + } + } + if m.GetUserRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRunStates())) + for i, v := range m.GetUserRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userRunStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceManagementScript) SetAssignments(value []DeviceManagementScriptAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceManagementScript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Optional description for the device management script. +func (m *DeviceManagementScript) SetDescription(value *string)() { + m.description = value +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceManagementScript) SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetDisplayName sets the displayName property value. Name of the device management script. +func (m *DeviceManagementScript) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnforceSignatureCheck sets the enforceSignatureCheck property value. Indicate whether the script signature needs be checked. +func (m *DeviceManagementScript) SetEnforceSignatureCheck(value *bool)() { + m.enforceSignatureCheck = value +} +// SetFileName sets the fileName property value. Script file name. +func (m *DeviceManagementScript) SetFileName(value *string)() { + m.fileName = value +} +// SetGroupAssignments sets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceManagementScript) SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() { + m.groupAssignments = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceManagementScript) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceManagementScript) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRunAs32Bit sets the runAs32Bit property value. A value indicating whether the PowerShell script should run as 32-bit +func (m *DeviceManagementScript) SetRunAs32Bit(value *bool)() { + m.runAs32Bit = value +} +// SetRunAsAccount sets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceManagementScript) SetRunAsAccount(value *RunAsAccountType)() { + m.runAsAccount = value +} +// SetRunSummary sets the runSummary property value. Run summary for device management script. +func (m *DeviceManagementScript) SetRunSummary(value DeviceManagementScriptRunSummaryable)() { + m.runSummary = value +} +// SetScriptContent sets the scriptContent property value. The script content. +func (m *DeviceManagementScript) SetScriptContent(value []byte)() { + m.scriptContent = value +} +// SetUserRunStates sets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceManagementScript) SetUserRunStates(value []DeviceManagementScriptUserStateable)() { + m.userRunStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_script_assignment.go new file mode 100644 index 000000000..da796e8d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptAssignment contains properties used to assign a device management script to a group. +type DeviceManagementScriptAssignment struct { + Entity + // The Id of the Azure Active Directory group we are targeting the script to. + target DeviceAndAppManagementAssignmentTargetable +} +// NewDeviceManagementScriptAssignment instantiates a new deviceManagementScriptAssignment and sets the default values. +func NewDeviceManagementScriptAssignment()(*DeviceManagementScriptAssignment) { + m := &DeviceManagementScriptAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The Id of the Azure Active Directory group we are targeting the script to. +func (m *DeviceManagementScriptAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The Id of the Azure Active Directory group we are targeting the script to. +func (m *DeviceManagementScriptAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_response.go new file mode 100644 index 000000000..0d7adc66f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptAssignmentCollectionResponse +type DeviceManagementScriptAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptAssignmentable +} +// NewDeviceManagementScriptAssignmentCollectionResponse instantiates a new DeviceManagementScriptAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementScriptAssignmentCollectionResponse()(*DeviceManagementScriptAssignmentCollectionResponse) { + m := &DeviceManagementScriptAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptAssignmentCollectionResponse) GetValue()([]DeviceManagementScriptAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptAssignmentCollectionResponse) SetValue(value []DeviceManagementScriptAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_responseable.go new file mode 100644 index 000000000..a7e4c29ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptAssignmentCollectionResponseable +type DeviceManagementScriptAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptAssignmentable) + SetValue(value []DeviceManagementScriptAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_script_assignmentable.go new file mode 100644 index 000000000..16132e460 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptAssignmentable +type DeviceManagementScriptAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_collection_response.go new file mode 100644 index 000000000..e1e54cf86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptCollectionResponse +type DeviceManagementScriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptable +} +// NewDeviceManagementScriptCollectionResponse instantiates a new DeviceManagementScriptCollectionResponse and sets the default values. +func NewDeviceManagementScriptCollectionResponse()(*DeviceManagementScriptCollectionResponse) { + m := &DeviceManagementScriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptCollectionResponse) GetValue()([]DeviceManagementScriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptCollectionResponse) SetValue(value []DeviceManagementScriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_collection_responseable.go new file mode 100644 index 000000000..fcab9a50c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptCollectionResponseable +type DeviceManagementScriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptable) + SetValue(value []DeviceManagementScriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_device_state.go b/src/internal/connector/graph/betasdk/models/device_management_script_device_state.go new file mode 100644 index 000000000..52cdcc94c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_device_state.go @@ -0,0 +1,192 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptDeviceState contains properties for device run state of the device management script. +type DeviceManagementScriptDeviceState struct { + Entity + // Error code corresponding to erroneous execution of the device management script. + errorCode *int32 + // Error description corresponding to erroneous execution of the device management script. + errorDescription *string + // Latest time the device management script executes. + lastStateUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managed devices that executes the device management script. + managedDevice ManagedDeviceable + // Details of execution output. + resultMessage *string + // Indicates the type of execution status of the device management script. + runState *RunState +} +// NewDeviceManagementScriptDeviceState instantiates a new deviceManagementScriptDeviceState and sets the default values. +func NewDeviceManagementScriptDeviceState()(*DeviceManagementScriptDeviceState) { + m := &DeviceManagementScriptDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptDeviceState(), nil +} +// GetErrorCode gets the errorCode property value. Error code corresponding to erroneous execution of the device management script. +func (m *DeviceManagementScriptDeviceState) GetErrorCode()(*int32) { + return m.errorCode +} +// GetErrorDescription gets the errorDescription property value. Error description corresponding to erroneous execution of the device management script. +func (m *DeviceManagementScriptDeviceState) GetErrorDescription()(*string) { + return m.errorDescription +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDescription(val) + } + return nil + } + res["lastStateUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStateUpdateDateTime(val) + } + return nil + } + res["managedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDevice(val.(ManagedDeviceable)) + } + return nil + } + res["resultMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResultMessage(val) + } + return nil + } + res["runState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetRunState(val.(*RunState)) + } + return nil + } + return res +} +// GetLastStateUpdateDateTime gets the lastStateUpdateDateTime property value. Latest time the device management script executes. +func (m *DeviceManagementScriptDeviceState) GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStateUpdateDateTime +} +// GetManagedDevice gets the managedDevice property value. The managed devices that executes the device management script. +func (m *DeviceManagementScriptDeviceState) GetManagedDevice()(ManagedDeviceable) { + return m.managedDevice +} +// GetResultMessage gets the resultMessage property value. Details of execution output. +func (m *DeviceManagementScriptDeviceState) GetResultMessage()(*string) { + return m.resultMessage +} +// GetRunState gets the runState property value. Indicates the type of execution status of the device management script. +func (m *DeviceManagementScriptDeviceState) GetRunState()(*RunState) { + return m.runState +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorDescription", m.GetErrorDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStateUpdateDateTime", m.GetLastStateUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDevice", m.GetManagedDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resultMessage", m.GetResultMessage()) + if err != nil { + return err + } + } + if m.GetRunState() != nil { + cast := (*m.GetRunState()).String() + err = writer.WriteStringValue("runState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetErrorCode sets the errorCode property value. Error code corresponding to erroneous execution of the device management script. +func (m *DeviceManagementScriptDeviceState) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetErrorDescription sets the errorDescription property value. Error description corresponding to erroneous execution of the device management script. +func (m *DeviceManagementScriptDeviceState) SetErrorDescription(value *string)() { + m.errorDescription = value +} +// SetLastStateUpdateDateTime sets the lastStateUpdateDateTime property value. Latest time the device management script executes. +func (m *DeviceManagementScriptDeviceState) SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStateUpdateDateTime = value +} +// SetManagedDevice sets the managedDevice property value. The managed devices that executes the device management script. +func (m *DeviceManagementScriptDeviceState) SetManagedDevice(value ManagedDeviceable)() { + m.managedDevice = value +} +// SetResultMessage sets the resultMessage property value. Details of execution output. +func (m *DeviceManagementScriptDeviceState) SetResultMessage(value *string)() { + m.resultMessage = value +} +// SetRunState sets the runState property value. Indicates the type of execution status of the device management script. +func (m *DeviceManagementScriptDeviceState) SetRunState(value *RunState)() { + m.runState = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_response.go new file mode 100644 index 000000000..4248fed1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptDeviceStateCollectionResponse +type DeviceManagementScriptDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptDeviceStateable +} +// NewDeviceManagementScriptDeviceStateCollectionResponse instantiates a new DeviceManagementScriptDeviceStateCollectionResponse and sets the default values. +func NewDeviceManagementScriptDeviceStateCollectionResponse()(*DeviceManagementScriptDeviceStateCollectionResponse) { + m := &DeviceManagementScriptDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptDeviceStateCollectionResponse) GetValue()([]DeviceManagementScriptDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptDeviceStateCollectionResponse) SetValue(value []DeviceManagementScriptDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_responseable.go new file mode 100644 index 000000000..d319fdf3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptDeviceStateCollectionResponseable +type DeviceManagementScriptDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptDeviceStateable) + SetValue(value []DeviceManagementScriptDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_device_stateable.go b/src/internal/connector/graph/betasdk/models/device_management_script_device_stateable.go new file mode 100644 index 000000000..6666b525d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_device_stateable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptDeviceStateable +type DeviceManagementScriptDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*int32) + GetErrorDescription()(*string) + GetLastStateUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDevice()(ManagedDeviceable) + GetResultMessage()(*string) + GetRunState()(*RunState) + SetErrorCode(value *int32)() + SetErrorDescription(value *string)() + SetLastStateUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDevice(value ManagedDeviceable)() + SetResultMessage(value *string)() + SetRunState(value *RunState)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment.go b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment.go new file mode 100644 index 000000000..8026b1b14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptGroupAssignment contains properties used to assign a device management script to a group. +type DeviceManagementScriptGroupAssignment struct { + Entity + // The Id of the Azure Active Directory group we are targeting the script to. + targetGroupId *string +} +// NewDeviceManagementScriptGroupAssignment instantiates a new deviceManagementScriptGroupAssignment and sets the default values. +func NewDeviceManagementScriptGroupAssignment()(*DeviceManagementScriptGroupAssignment) { + m := &DeviceManagementScriptGroupAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptGroupAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptGroupAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["targetGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetGroupId(val) + } + return nil + } + return res +} +// GetTargetGroupId gets the targetGroupId property value. The Id of the Azure Active Directory group we are targeting the script to. +func (m *DeviceManagementScriptGroupAssignment) GetTargetGroupId()(*string) { + return m.targetGroupId +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptGroupAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetGroupId", m.GetTargetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetTargetGroupId sets the targetGroupId property value. The Id of the Azure Active Directory group we are targeting the script to. +func (m *DeviceManagementScriptGroupAssignment) SetTargetGroupId(value *string)() { + m.targetGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_response.go new file mode 100644 index 000000000..05b73ddff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptGroupAssignmentCollectionResponse +type DeviceManagementScriptGroupAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptGroupAssignmentable +} +// NewDeviceManagementScriptGroupAssignmentCollectionResponse instantiates a new DeviceManagementScriptGroupAssignmentCollectionResponse and sets the default values. +func NewDeviceManagementScriptGroupAssignmentCollectionResponse()(*DeviceManagementScriptGroupAssignmentCollectionResponse) { + m := &DeviceManagementScriptGroupAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptGroupAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptGroupAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptGroupAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptGroupAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptGroupAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptGroupAssignmentCollectionResponse) GetValue()([]DeviceManagementScriptGroupAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptGroupAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptGroupAssignmentCollectionResponse) SetValue(value []DeviceManagementScriptGroupAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_responseable.go new file mode 100644 index 000000000..278b2223f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptGroupAssignmentCollectionResponseable +type DeviceManagementScriptGroupAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptGroupAssignmentable) + SetValue(value []DeviceManagementScriptGroupAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_group_assignmentable.go b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignmentable.go new file mode 100644 index 000000000..3a0b6284e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_group_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptGroupAssignmentable +type DeviceManagementScriptGroupAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTargetGroupId()(*string) + SetTargetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item.go b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item.go new file mode 100644 index 000000000..6f38dae92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptPolicySetItem +type DeviceManagementScriptPolicySetItem struct { + PolicySetItem +} +// NewDeviceManagementScriptPolicySetItem instantiates a new DeviceManagementScriptPolicySetItem and sets the default values. +func NewDeviceManagementScriptPolicySetItem()(*DeviceManagementScriptPolicySetItem) { + m := &DeviceManagementScriptPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.deviceManagementScriptPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementScriptPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_response.go new file mode 100644 index 000000000..ccfa6ff53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptPolicySetItemCollectionResponse +type DeviceManagementScriptPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptPolicySetItemable +} +// NewDeviceManagementScriptPolicySetItemCollectionResponse instantiates a new DeviceManagementScriptPolicySetItemCollectionResponse and sets the default values. +func NewDeviceManagementScriptPolicySetItemCollectionResponse()(*DeviceManagementScriptPolicySetItemCollectionResponse) { + m := &DeviceManagementScriptPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptPolicySetItemCollectionResponse) GetValue()([]DeviceManagementScriptPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptPolicySetItemCollectionResponse) SetValue(value []DeviceManagementScriptPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..0ca043cf4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptPolicySetItemCollectionResponseable +type DeviceManagementScriptPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptPolicySetItemable) + SetValue(value []DeviceManagementScriptPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_itemable.go new file mode 100644 index 000000000..468b22b75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptPolicySetItemable +type DeviceManagementScriptPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_run_summary.go b/src/internal/connector/graph/betasdk/models/device_management_script_run_summary.go new file mode 100644 index 000000000..b1daa840d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_run_summary.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptRunSummary +type DeviceManagementScriptRunSummary struct { + Entity + // Error device count. + errorDeviceCount *int32 + // Error user count. + errorUserCount *int32 + // Success device count. + successDeviceCount *int32 + // Success user count. + successUserCount *int32 +} +// NewDeviceManagementScriptRunSummary instantiates a new deviceManagementScriptRunSummary and sets the default values. +func NewDeviceManagementScriptRunSummary()(*DeviceManagementScriptRunSummary) { + m := &DeviceManagementScriptRunSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptRunSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptRunSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptRunSummary(), nil +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Error device count. +func (m *DeviceManagementScriptRunSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetErrorUserCount gets the errorUserCount property value. Error user count. +func (m *DeviceManagementScriptRunSummary) GetErrorUserCount()(*int32) { + return m.errorUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptRunSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["errorUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorUserCount(val) + } + return nil + } + res["successDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessDeviceCount(val) + } + return nil + } + res["successUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessUserCount(val) + } + return nil + } + return res +} +// GetSuccessDeviceCount gets the successDeviceCount property value. Success device count. +func (m *DeviceManagementScriptRunSummary) GetSuccessDeviceCount()(*int32) { + return m.successDeviceCount +} +// GetSuccessUserCount gets the successUserCount property value. Success user count. +func (m *DeviceManagementScriptRunSummary) GetSuccessUserCount()(*int32) { + return m.successUserCount +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptRunSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorUserCount", m.GetErrorUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successDeviceCount", m.GetSuccessDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successUserCount", m.GetSuccessUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Error device count. +func (m *DeviceManagementScriptRunSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetErrorUserCount sets the errorUserCount property value. Error user count. +func (m *DeviceManagementScriptRunSummary) SetErrorUserCount(value *int32)() { + m.errorUserCount = value +} +// SetSuccessDeviceCount sets the successDeviceCount property value. Success device count. +func (m *DeviceManagementScriptRunSummary) SetSuccessDeviceCount(value *int32)() { + m.successDeviceCount = value +} +// SetSuccessUserCount sets the successUserCount property value. Success user count. +func (m *DeviceManagementScriptRunSummary) SetSuccessUserCount(value *int32)() { + m.successUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_run_summaryable.go b/src/internal/connector/graph/betasdk/models/device_management_script_run_summaryable.go new file mode 100644 index 000000000..7e3f59d83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_run_summaryable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptRunSummaryable +type DeviceManagementScriptRunSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorDeviceCount()(*int32) + GetErrorUserCount()(*int32) + GetSuccessDeviceCount()(*int32) + GetSuccessUserCount()(*int32) + SetErrorDeviceCount(value *int32)() + SetErrorUserCount(value *int32)() + SetSuccessDeviceCount(value *int32)() + SetSuccessUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_user_state.go b/src/internal/connector/graph/betasdk/models/device_management_script_user_state.go new file mode 100644 index 000000000..fd74c2e4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_user_state.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptUserState contains properties for user run state of the device management script. +type DeviceManagementScriptUserState struct { + Entity + // List of run states for this script across all devices of specific user. + deviceRunStates []DeviceManagementScriptDeviceStateable + // Error device count for specific user. + errorDeviceCount *int32 + // Success device count for specific user. + successDeviceCount *int32 + // User principle name of specific user. + userPrincipalName *string +} +// NewDeviceManagementScriptUserState instantiates a new deviceManagementScriptUserState and sets the default values. +func NewDeviceManagementScriptUserState()(*DeviceManagementScriptUserState) { + m := &DeviceManagementScriptUserState{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementScriptUserStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptUserStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptUserState(), nil +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for this script across all devices of specific user. +func (m *DeviceManagementScriptUserState) GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) { + return m.deviceRunStates +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Error device count for specific user. +func (m *DeviceManagementScriptUserState) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptUserState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["successDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessDeviceCount(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetSuccessDeviceCount gets the successDeviceCount property value. Success device count for specific user. +func (m *DeviceManagementScriptUserState) GetSuccessDeviceCount()(*int32) { + return m.successDeviceCount +} +// GetUserPrincipalName gets the userPrincipalName property value. User principle name of specific user. +func (m *DeviceManagementScriptUserState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptUserState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successDeviceCount", m.GetSuccessDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for this script across all devices of specific user. +func (m *DeviceManagementScriptUserState) SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Error device count for specific user. +func (m *DeviceManagementScriptUserState) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetSuccessDeviceCount sets the successDeviceCount property value. Success device count for specific user. +func (m *DeviceManagementScriptUserState) SetSuccessDeviceCount(value *int32)() { + m.successDeviceCount = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User principle name of specific user. +func (m *DeviceManagementScriptUserState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_response.go new file mode 100644 index 000000000..85cef4d95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptUserStateCollectionResponse +type DeviceManagementScriptUserStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementScriptUserStateable +} +// NewDeviceManagementScriptUserStateCollectionResponse instantiates a new DeviceManagementScriptUserStateCollectionResponse and sets the default values. +func NewDeviceManagementScriptUserStateCollectionResponse()(*DeviceManagementScriptUserStateCollectionResponse) { + m := &DeviceManagementScriptUserStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementScriptUserStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementScriptUserStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementScriptUserStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementScriptUserStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptUserStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementScriptUserStateCollectionResponse) GetValue()([]DeviceManagementScriptUserStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementScriptUserStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementScriptUserStateCollectionResponse) SetValue(value []DeviceManagementScriptUserStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_responseable.go new file mode 100644 index 000000000..04d007033 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_user_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptUserStateCollectionResponseable +type DeviceManagementScriptUserStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementScriptUserStateable) + SetValue(value []DeviceManagementScriptUserStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_script_user_stateable.go b/src/internal/connector/graph/betasdk/models/device_management_script_user_stateable.go new file mode 100644 index 000000000..346cd79b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_script_user_stateable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptUserStateable +type DeviceManagementScriptUserStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) + GetErrorDeviceCount()(*int32) + GetSuccessDeviceCount()(*int32) + GetUserPrincipalName()(*string) + SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() + SetErrorDeviceCount(value *int32)() + SetSuccessDeviceCount(value *int32)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_scriptable.go b/src/internal/connector/graph/betasdk/models/device_management_scriptable.go new file mode 100644 index 000000000..cc7072633 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_scriptable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementScriptable +type DeviceManagementScriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementScriptAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) + GetDisplayName()(*string) + GetEnforceSignatureCheck()(*bool) + GetFileName()(*string) + GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetRunAs32Bit()(*bool) + GetRunAsAccount()(*RunAsAccountType) + GetRunSummary()(DeviceManagementScriptRunSummaryable) + GetScriptContent()([]byte) + GetUserRunStates()([]DeviceManagementScriptUserStateable) + SetAssignments(value []DeviceManagementScriptAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() + SetDisplayName(value *string)() + SetEnforceSignatureCheck(value *bool)() + SetFileName(value *string)() + SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetRunAs32Bit(value *bool)() + SetRunAsAccount(value *RunAsAccountType)() + SetRunSummary(value DeviceManagementScriptRunSummaryable)() + SetScriptContent(value []byte)() + SetUserRunStates(value []DeviceManagementScriptUserStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraint.go new file mode 100644 index 000000000..f5caae526 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraint.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingAbstractImplementationConstraint +type DeviceManagementSettingAbstractImplementationConstraint struct { + DeviceManagementConstraint + // List of value which means not configured for the setting + allowedAbstractImplementationDefinitionIds []string +} +// NewDeviceManagementSettingAbstractImplementationConstraint instantiates a new DeviceManagementSettingAbstractImplementationConstraint and sets the default values. +func NewDeviceManagementSettingAbstractImplementationConstraint()(*DeviceManagementSettingAbstractImplementationConstraint) { + m := &DeviceManagementSettingAbstractImplementationConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingAbstractImplementationConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingAbstractImplementationConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingAbstractImplementationConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingAbstractImplementationConstraint(), nil +} +// GetAllowedAbstractImplementationDefinitionIds gets the allowedAbstractImplementationDefinitionIds property value. List of value which means not configured for the setting +func (m *DeviceManagementSettingAbstractImplementationConstraint) GetAllowedAbstractImplementationDefinitionIds()([]string) { + return m.allowedAbstractImplementationDefinitionIds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingAbstractImplementationConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["allowedAbstractImplementationDefinitionIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedAbstractImplementationDefinitionIds(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingAbstractImplementationConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedAbstractImplementationDefinitionIds() != nil { + err = writer.WriteCollectionOfStringValues("allowedAbstractImplementationDefinitionIds", m.GetAllowedAbstractImplementationDefinitionIds()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedAbstractImplementationDefinitionIds sets the allowedAbstractImplementationDefinitionIds property value. List of value which means not configured for the setting +func (m *DeviceManagementSettingAbstractImplementationConstraint) SetAllowedAbstractImplementationDefinitionIds(value []string)() { + m.allowedAbstractImplementationDefinitionIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraintable.go new file mode 100644 index 000000000..70b8fc837 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_abstract_implementation_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingAbstractImplementationConstraintable +type DeviceManagementSettingAbstractImplementationConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAbstractImplementationDefinitionIds()([]string) + SetAllowedAbstractImplementationDefinitionIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraint.go new file mode 100644 index 000000000..d5c48ea9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraint.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingAppConstraint +type DeviceManagementSettingAppConstraint struct { + DeviceManagementConstraint + // Acceptable app types to allow for this setting + supportedTypes []string +} +// NewDeviceManagementSettingAppConstraint instantiates a new DeviceManagementSettingAppConstraint and sets the default values. +func NewDeviceManagementSettingAppConstraint()(*DeviceManagementSettingAppConstraint) { + m := &DeviceManagementSettingAppConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingAppConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingAppConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingAppConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingAppConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingAppConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["supportedTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedTypes(res) + } + return nil + } + return res +} +// GetSupportedTypes gets the supportedTypes property value. Acceptable app types to allow for this setting +func (m *DeviceManagementSettingAppConstraint) GetSupportedTypes()([]string) { + return m.supportedTypes +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingAppConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + if m.GetSupportedTypes() != nil { + err = writer.WriteCollectionOfStringValues("supportedTypes", m.GetSupportedTypes()) + if err != nil { + return err + } + } + return nil +} +// SetSupportedTypes sets the supportedTypes property value. Acceptable app types to allow for this setting +func (m *DeviceManagementSettingAppConstraint) SetSupportedTypes(value []string)() { + m.supportedTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraintable.go new file mode 100644 index 000000000..0136009c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_app_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingAppConstraintable +type DeviceManagementSettingAppConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSupportedTypes()([]string) + SetSupportedTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraint.go new file mode 100644 index 000000000..0cd84dc0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraint.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingBooleanConstraint +type DeviceManagementSettingBooleanConstraint struct { + DeviceManagementConstraint + // The boolean value to compare against + value *bool +} +// NewDeviceManagementSettingBooleanConstraint instantiates a new DeviceManagementSettingBooleanConstraint and sets the default values. +func NewDeviceManagementSettingBooleanConstraint()(*DeviceManagementSettingBooleanConstraint) { + m := &DeviceManagementSettingBooleanConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingBooleanConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingBooleanConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingBooleanConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingBooleanConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingBooleanConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The boolean value to compare against +func (m *DeviceManagementSettingBooleanConstraint) GetValue()(*bool) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingBooleanConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The boolean value to compare against +func (m *DeviceManagementSettingBooleanConstraint) SetValue(value *bool)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraintable.go new file mode 100644 index 000000000..0e1b32465 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_boolean_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingBooleanConstraintable +type DeviceManagementSettingBooleanConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_category.go b/src/internal/connector/graph/betasdk/models/device_management_setting_category.go new file mode 100644 index 000000000..7cec0a6fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_category.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCategory entity representing a setting category +type DeviceManagementSettingCategory struct { + Entity + // The category name + displayName *string + // The category contains top level required setting + hasRequiredSetting *bool + // The setting definitions this category contains + settingDefinitions []DeviceManagementSettingDefinitionable +} +// NewDeviceManagementSettingCategory instantiates a new deviceManagementSettingCategory and sets the default values. +func NewDeviceManagementSettingCategory()(*DeviceManagementSettingCategory) { + m := &DeviceManagementSettingCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementSettingCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementIntentSettingCategory": + return NewDeviceManagementIntentSettingCategory(), nil + case "#microsoft.graph.deviceManagementTemplateSettingCategory": + return NewDeviceManagementTemplateSettingCategory(), nil + } + } + } + } + return NewDeviceManagementSettingCategory(), nil +} +// GetDisplayName gets the displayName property value. The category name +func (m *DeviceManagementSettingCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["hasRequiredSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRequiredSetting(val) + } + return nil + } + res["settingDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingDefinitionable) + } + m.SetSettingDefinitions(res) + } + return nil + } + return res +} +// GetHasRequiredSetting gets the hasRequiredSetting property value. The category contains top level required setting +func (m *DeviceManagementSettingCategory) GetHasRequiredSetting()(*bool) { + return m.hasRequiredSetting +} +// GetSettingDefinitions gets the settingDefinitions property value. The setting definitions this category contains +func (m *DeviceManagementSettingCategory) GetSettingDefinitions()([]DeviceManagementSettingDefinitionable) { + return m.settingDefinitions +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasRequiredSetting", m.GetHasRequiredSetting()) + if err != nil { + return err + } + } + if m.GetSettingDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingDefinitions())) + for i, v := range m.GetSettingDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingDefinitions", cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The category name +func (m *DeviceManagementSettingCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHasRequiredSetting sets the hasRequiredSetting property value. The category contains top level required setting +func (m *DeviceManagementSettingCategory) SetHasRequiredSetting(value *bool)() { + m.hasRequiredSetting = value +} +// SetSettingDefinitions sets the settingDefinitions property value. The setting definitions this category contains +func (m *DeviceManagementSettingCategory) SetSettingDefinitions(value []DeviceManagementSettingDefinitionable)() { + m.settingDefinitions = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_response.go new file mode 100644 index 000000000..94b1fd683 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCategoryCollectionResponse +type DeviceManagementSettingCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementSettingCategoryable +} +// NewDeviceManagementSettingCategoryCollectionResponse instantiates a new DeviceManagementSettingCategoryCollectionResponse and sets the default values. +func NewDeviceManagementSettingCategoryCollectionResponse()(*DeviceManagementSettingCategoryCollectionResponse) { + m := &DeviceManagementSettingCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementSettingCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementSettingCategoryCollectionResponse) GetValue()([]DeviceManagementSettingCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementSettingCategoryCollectionResponse) SetValue(value []DeviceManagementSettingCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_responseable.go new file mode 100644 index 000000000..a7140c8ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCategoryCollectionResponseable +type DeviceManagementSettingCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingCategoryable) + SetValue(value []DeviceManagementSettingCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_categoryable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_categoryable.go new file mode 100644 index 000000000..3af6efa2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_categoryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCategoryable +type DeviceManagementSettingCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetHasRequiredSetting()(*bool) + GetSettingDefinitions()([]DeviceManagementSettingDefinitionable) + SetDisplayName(value *string)() + SetHasRequiredSetting(value *bool)() + SetSettingDefinitions(value []DeviceManagementSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraint.go new file mode 100644 index 000000000..0dc0716dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraint.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCollectionConstraint +type DeviceManagementSettingCollectionConstraint struct { + DeviceManagementConstraint + // The maximum number of elements in the collection + maximumLength *int32 + // The minimum number of elements in the collection + minimumLength *int32 +} +// NewDeviceManagementSettingCollectionConstraint instantiates a new DeviceManagementSettingCollectionConstraint and sets the default values. +func NewDeviceManagementSettingCollectionConstraint()(*DeviceManagementSettingCollectionConstraint) { + m := &DeviceManagementSettingCollectionConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingCollectionConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingCollectionConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingCollectionConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingCollectionConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingCollectionConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["maximumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumLength(val) + } + return nil + } + res["minimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumLength(val) + } + return nil + } + return res +} +// GetMaximumLength gets the maximumLength property value. The maximum number of elements in the collection +func (m *DeviceManagementSettingCollectionConstraint) GetMaximumLength()(*int32) { + return m.maximumLength +} +// GetMinimumLength gets the minimumLength property value. The minimum number of elements in the collection +func (m *DeviceManagementSettingCollectionConstraint) GetMinimumLength()(*int32) { + return m.minimumLength +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingCollectionConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumLength", m.GetMaximumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumLength", m.GetMinimumLength()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumLength sets the maximumLength property value. The maximum number of elements in the collection +func (m *DeviceManagementSettingCollectionConstraint) SetMaximumLength(value *int32)() { + m.maximumLength = value +} +// SetMinimumLength sets the minimumLength property value. The minimum number of elements in the collection +func (m *DeviceManagementSettingCollectionConstraint) SetMinimumLength(value *int32)() { + m.minimumLength = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraintable.go new file mode 100644 index 000000000..6cd6a084b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_collection_constraintable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingCollectionConstraintable +type DeviceManagementSettingCollectionConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumLength()(*int32) + GetMinimumLength()(*int32) + SetMaximumLength(value *int32)() + SetMinimumLength(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_definition.go b/src/internal/connector/graph/betasdk/models/device_management_setting_definition.go new file mode 100644 index 000000000..c9983efe6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_definition.go @@ -0,0 +1,363 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDefinition entity representing the defintion for a given setting +type DeviceManagementSettingDefinition struct { + Entity + // Collection of constraints for the setting value + constraints []DeviceManagementConstraintable + // Collection of dependencies on other settings + dependencies []DeviceManagementSettingDependencyable + // The setting's description + description *string + // The setting's display name + displayName *string + // Url to setting documentation + documentationUrl *string + // subtitle of the setting header for more details about the category/section + headerSubtitle *string + // title of the setting header represents a category/section of a setting/settings + headerTitle *string + // If the setting is top level, it can be configured without the need to be wrapped in a collection or complex setting + isTopLevel *bool + // Keywords associated with the setting + keywords []string + // Placeholder text as an example of valid input + placeholderText *string + // The valueType property + valueType *DeviceManangementIntentValueType +} +// NewDeviceManagementSettingDefinition instantiates a new deviceManagementSettingDefinition and sets the default values. +func NewDeviceManagementSettingDefinition()(*DeviceManagementSettingDefinition) { + m := &DeviceManagementSettingDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementSettingDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementAbstractComplexSettingDefinition": + return NewDeviceManagementAbstractComplexSettingDefinition(), nil + case "#microsoft.graph.deviceManagementCollectionSettingDefinition": + return NewDeviceManagementCollectionSettingDefinition(), nil + case "#microsoft.graph.deviceManagementComplexSettingDefinition": + return NewDeviceManagementComplexSettingDefinition(), nil + } + } + } + } + return NewDeviceManagementSettingDefinition(), nil +} +// GetConstraints gets the constraints property value. Collection of constraints for the setting value +func (m *DeviceManagementSettingDefinition) GetConstraints()([]DeviceManagementConstraintable) { + return m.constraints +} +// GetDependencies gets the dependencies property value. Collection of dependencies on other settings +func (m *DeviceManagementSettingDefinition) GetDependencies()([]DeviceManagementSettingDependencyable) { + return m.dependencies +} +// GetDescription gets the description property value. The setting's description +func (m *DeviceManagementSettingDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The setting's display name +func (m *DeviceManagementSettingDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetDocumentationUrl gets the documentationUrl property value. Url to setting documentation +func (m *DeviceManagementSettingDefinition) GetDocumentationUrl()(*string) { + return m.documentationUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["constraints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConstraintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConstraintable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConstraintable) + } + m.SetConstraints(res) + } + return nil + } + res["dependencies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingDependencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingDependencyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingDependencyable) + } + m.SetDependencies(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["documentationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentationUrl(val) + } + return nil + } + res["headerSubtitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderSubtitle(val) + } + return nil + } + res["headerTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderTitle(val) + } + return nil + } + res["isTopLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTopLevel(val) + } + return nil + } + res["keywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKeywords(res) + } + return nil + } + res["placeholderText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlaceholderText(val) + } + return nil + } + res["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManangementIntentValueType) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*DeviceManangementIntentValueType)) + } + return nil + } + return res +} +// GetHeaderSubtitle gets the headerSubtitle property value. subtitle of the setting header for more details about the category/section +func (m *DeviceManagementSettingDefinition) GetHeaderSubtitle()(*string) { + return m.headerSubtitle +} +// GetHeaderTitle gets the headerTitle property value. title of the setting header represents a category/section of a setting/settings +func (m *DeviceManagementSettingDefinition) GetHeaderTitle()(*string) { + return m.headerTitle +} +// GetIsTopLevel gets the isTopLevel property value. If the setting is top level, it can be configured without the need to be wrapped in a collection or complex setting +func (m *DeviceManagementSettingDefinition) GetIsTopLevel()(*bool) { + return m.isTopLevel +} +// GetKeywords gets the keywords property value. Keywords associated with the setting +func (m *DeviceManagementSettingDefinition) GetKeywords()([]string) { + return m.keywords +} +// GetPlaceholderText gets the placeholderText property value. Placeholder text as an example of valid input +func (m *DeviceManagementSettingDefinition) GetPlaceholderText()(*string) { + return m.placeholderText +} +// GetValueType gets the valueType property value. The valueType property +func (m *DeviceManagementSettingDefinition) GetValueType()(*DeviceManangementIntentValueType) { + return m.valueType +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetConstraints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConstraints())) + for i, v := range m.GetConstraints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("constraints", cast) + if err != nil { + return err + } + } + if m.GetDependencies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDependencies())) + for i, v := range m.GetDependencies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dependencies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("documentationUrl", m.GetDocumentationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("headerSubtitle", m.GetHeaderSubtitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("headerTitle", m.GetHeaderTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTopLevel", m.GetIsTopLevel()) + if err != nil { + return err + } + } + if m.GetKeywords() != nil { + err = writer.WriteCollectionOfStringValues("keywords", m.GetKeywords()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("placeholderText", m.GetPlaceholderText()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err = writer.WriteStringValue("valueType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConstraints sets the constraints property value. Collection of constraints for the setting value +func (m *DeviceManagementSettingDefinition) SetConstraints(value []DeviceManagementConstraintable)() { + m.constraints = value +} +// SetDependencies sets the dependencies property value. Collection of dependencies on other settings +func (m *DeviceManagementSettingDefinition) SetDependencies(value []DeviceManagementSettingDependencyable)() { + m.dependencies = value +} +// SetDescription sets the description property value. The setting's description +func (m *DeviceManagementSettingDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The setting's display name +func (m *DeviceManagementSettingDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDocumentationUrl sets the documentationUrl property value. Url to setting documentation +func (m *DeviceManagementSettingDefinition) SetDocumentationUrl(value *string)() { + m.documentationUrl = value +} +// SetHeaderSubtitle sets the headerSubtitle property value. subtitle of the setting header for more details about the category/section +func (m *DeviceManagementSettingDefinition) SetHeaderSubtitle(value *string)() { + m.headerSubtitle = value +} +// SetHeaderTitle sets the headerTitle property value. title of the setting header represents a category/section of a setting/settings +func (m *DeviceManagementSettingDefinition) SetHeaderTitle(value *string)() { + m.headerTitle = value +} +// SetIsTopLevel sets the isTopLevel property value. If the setting is top level, it can be configured without the need to be wrapped in a collection or complex setting +func (m *DeviceManagementSettingDefinition) SetIsTopLevel(value *bool)() { + m.isTopLevel = value +} +// SetKeywords sets the keywords property value. Keywords associated with the setting +func (m *DeviceManagementSettingDefinition) SetKeywords(value []string)() { + m.keywords = value +} +// SetPlaceholderText sets the placeholderText property value. Placeholder text as an example of valid input +func (m *DeviceManagementSettingDefinition) SetPlaceholderText(value *string)() { + m.placeholderText = value +} +// SetValueType sets the valueType property value. The valueType property +func (m *DeviceManagementSettingDefinition) SetValueType(value *DeviceManangementIntentValueType)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_response.go new file mode 100644 index 000000000..f0d878015 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDefinitionCollectionResponse +type DeviceManagementSettingDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementSettingDefinitionable +} +// NewDeviceManagementSettingDefinitionCollectionResponse instantiates a new DeviceManagementSettingDefinitionCollectionResponse and sets the default values. +func NewDeviceManagementSettingDefinitionCollectionResponse()(*DeviceManagementSettingDefinitionCollectionResponse) { + m := &DeviceManagementSettingDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementSettingDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementSettingDefinitionCollectionResponse) GetValue()([]DeviceManagementSettingDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementSettingDefinitionCollectionResponse) SetValue(value []DeviceManagementSettingDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_responseable.go new file mode 100644 index 000000000..401d4f87b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDefinitionCollectionResponseable +type DeviceManagementSettingDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingDefinitionable) + SetValue(value []DeviceManagementSettingDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_definitionable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_definitionable.go new file mode 100644 index 000000000..a7f5fd084 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_definitionable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDefinitionable +type DeviceManagementSettingDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConstraints()([]DeviceManagementConstraintable) + GetDependencies()([]DeviceManagementSettingDependencyable) + GetDescription()(*string) + GetDisplayName()(*string) + GetDocumentationUrl()(*string) + GetHeaderSubtitle()(*string) + GetHeaderTitle()(*string) + GetIsTopLevel()(*bool) + GetKeywords()([]string) + GetPlaceholderText()(*string) + GetValueType()(*DeviceManangementIntentValueType) + SetConstraints(value []DeviceManagementConstraintable)() + SetDependencies(value []DeviceManagementSettingDependencyable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDocumentationUrl(value *string)() + SetHeaderSubtitle(value *string)() + SetHeaderTitle(value *string)() + SetIsTopLevel(value *bool)() + SetKeywords(value []string)() + SetPlaceholderText(value *string)() + SetValueType(value *DeviceManangementIntentValueType)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_dependency.go b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency.go new file mode 100644 index 000000000..38ca1dbd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDependency dependency information for a setting +type DeviceManagementSettingDependency struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Collection of constraints for the dependency setting value + constraints []DeviceManagementConstraintable + // The setting definition ID of the setting depended on + definitionId *string + // The OdataType property + odataType *string +} +// NewDeviceManagementSettingDependency instantiates a new deviceManagementSettingDependency and sets the default values. +func NewDeviceManagementSettingDependency()(*DeviceManagementSettingDependency) { + m := &DeviceManagementSettingDependency{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementSettingDependencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingDependencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingDependency(), 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 *DeviceManagementSettingDependency) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConstraints gets the constraints property value. Collection of constraints for the dependency setting value +func (m *DeviceManagementSettingDependency) GetConstraints()([]DeviceManagementConstraintable) { + return m.constraints +} +// GetDefinitionId gets the definitionId property value. The setting definition ID of the setting depended on +func (m *DeviceManagementSettingDependency) GetDefinitionId()(*string) { + return m.definitionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingDependency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["constraints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementConstraintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementConstraintable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementConstraintable) + } + m.SetConstraints(res) + } + return nil + } + res["definitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefinitionId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementSettingDependency) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingDependency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetConstraints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConstraints())) + for i, v := range m.GetConstraints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("constraints", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("definitionId", m.GetDefinitionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DeviceManagementSettingDependency) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConstraints sets the constraints property value. Collection of constraints for the dependency setting value +func (m *DeviceManagementSettingDependency) SetConstraints(value []DeviceManagementConstraintable)() { + m.constraints = value +} +// SetDefinitionId sets the definitionId property value. The setting definition ID of the setting depended on +func (m *DeviceManagementSettingDependency) SetDefinitionId(value *string)() { + m.definitionId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementSettingDependency) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_response.go new file mode 100644 index 000000000..885ff547a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDependencyCollectionResponse +type DeviceManagementSettingDependencyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementSettingDependencyable +} +// NewDeviceManagementSettingDependencyCollectionResponse instantiates a new DeviceManagementSettingDependencyCollectionResponse and sets the default values. +func NewDeviceManagementSettingDependencyCollectionResponse()(*DeviceManagementSettingDependencyCollectionResponse) { + m := &DeviceManagementSettingDependencyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementSettingDependencyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingDependencyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingDependencyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingDependencyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingDependencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingDependencyable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingDependencyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementSettingDependencyCollectionResponse) GetValue()([]DeviceManagementSettingDependencyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingDependencyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementSettingDependencyCollectionResponse) SetValue(value []DeviceManagementSettingDependencyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_responseable.go new file mode 100644 index 000000000..3a15082ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_dependency_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDependencyCollectionResponseable +type DeviceManagementSettingDependencyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingDependencyable) + SetValue(value []DeviceManagementSettingDependencyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_dependencyable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_dependencyable.go new file mode 100644 index 000000000..5e0c62cd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_dependencyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingDependencyable +type DeviceManagementSettingDependencyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConstraints()([]DeviceManagementConstraintable) + GetDefinitionId()(*string) + GetOdataType()(*string) + SetConstraints(value []DeviceManagementConstraintable)() + SetDefinitionId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraint.go new file mode 100644 index 000000000..738932dac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraint.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingEnrollmentTypeConstraint +type DeviceManagementSettingEnrollmentTypeConstraint struct { + DeviceManagementConstraint + // List of enrollment types + enrollmentTypes []string +} +// NewDeviceManagementSettingEnrollmentTypeConstraint instantiates a new DeviceManagementSettingEnrollmentTypeConstraint and sets the default values. +func NewDeviceManagementSettingEnrollmentTypeConstraint()(*DeviceManagementSettingEnrollmentTypeConstraint) { + m := &DeviceManagementSettingEnrollmentTypeConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingEnrollmentTypeConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingEnrollmentTypeConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingEnrollmentTypeConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingEnrollmentTypeConstraint(), nil +} +// GetEnrollmentTypes gets the enrollmentTypes property value. List of enrollment types +func (m *DeviceManagementSettingEnrollmentTypeConstraint) GetEnrollmentTypes()([]string) { + return m.enrollmentTypes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingEnrollmentTypeConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["enrollmentTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnrollmentTypes(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingEnrollmentTypeConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + if m.GetEnrollmentTypes() != nil { + err = writer.WriteCollectionOfStringValues("enrollmentTypes", m.GetEnrollmentTypes()) + if err != nil { + return err + } + } + return nil +} +// SetEnrollmentTypes sets the enrollmentTypes property value. List of enrollment types +func (m *DeviceManagementSettingEnrollmentTypeConstraint) SetEnrollmentTypes(value []string)() { + m.enrollmentTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraintable.go new file mode 100644 index 000000000..95aaa2226 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_enrollment_type_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingEnrollmentTypeConstraintable +type DeviceManagementSettingEnrollmentTypeConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnrollmentTypes()([]string) + SetEnrollmentTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraint.go new file mode 100644 index 000000000..decb85738 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraint.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingFileConstraint +type DeviceManagementSettingFileConstraint struct { + DeviceManagementConstraint + // Acceptable file extensions to upload for this setting + supportedExtensions []string +} +// NewDeviceManagementSettingFileConstraint instantiates a new DeviceManagementSettingFileConstraint and sets the default values. +func NewDeviceManagementSettingFileConstraint()(*DeviceManagementSettingFileConstraint) { + m := &DeviceManagementSettingFileConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingFileConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingFileConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingFileConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingFileConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingFileConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["supportedExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedExtensions(res) + } + return nil + } + return res +} +// GetSupportedExtensions gets the supportedExtensions property value. Acceptable file extensions to upload for this setting +func (m *DeviceManagementSettingFileConstraint) GetSupportedExtensions()([]string) { + return m.supportedExtensions +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingFileConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + if m.GetSupportedExtensions() != nil { + err = writer.WriteCollectionOfStringValues("supportedExtensions", m.GetSupportedExtensions()) + if err != nil { + return err + } + } + return nil +} +// SetSupportedExtensions sets the supportedExtensions property value. Acceptable file extensions to upload for this setting +func (m *DeviceManagementSettingFileConstraint) SetSupportedExtensions(value []string)() { + m.supportedExtensions = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraintable.go new file mode 100644 index 000000000..65f8d0ff5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_file_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingFileConstraintable +type DeviceManagementSettingFileConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSupportedExtensions()([]string) + SetSupportedExtensions(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_setting_instance.go new file mode 100644 index 000000000..94d0b2a35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_instance.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingInstance base type for a setting instance +type DeviceManagementSettingInstance struct { + Entity + // The ID of the setting definition for this instance + definitionId *string + // JSON representation of the value + valueJson *string +} +// NewDeviceManagementSettingInstance instantiates a new deviceManagementSettingInstance and sets the default values. +func NewDeviceManagementSettingInstance()(*DeviceManagementSettingInstance) { + m := &DeviceManagementSettingInstance{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceManagementAbstractComplexSettingInstance": + return NewDeviceManagementAbstractComplexSettingInstance(), nil + case "#microsoft.graph.deviceManagementBooleanSettingInstance": + return NewDeviceManagementBooleanSettingInstance(), nil + case "#microsoft.graph.deviceManagementCollectionSettingInstance": + return NewDeviceManagementCollectionSettingInstance(), nil + case "#microsoft.graph.deviceManagementComplexSettingInstance": + return NewDeviceManagementComplexSettingInstance(), nil + case "#microsoft.graph.deviceManagementIntegerSettingInstance": + return NewDeviceManagementIntegerSettingInstance(), nil + case "#microsoft.graph.deviceManagementStringSettingInstance": + return NewDeviceManagementStringSettingInstance(), nil + } + } + } + } + return NewDeviceManagementSettingInstance(), nil +} +// GetDefinitionId gets the definitionId property value. The ID of the setting definition for this instance +func (m *DeviceManagementSettingInstance) GetDefinitionId()(*string) { + return m.definitionId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["definitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefinitionId(val) + } + return nil + } + res["valueJson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValueJson(val) + } + return nil + } + return res +} +// GetValueJson gets the valueJson property value. JSON representation of the value +func (m *DeviceManagementSettingInstance) GetValueJson()(*string) { + return m.valueJson +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("definitionId", m.GetDefinitionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("valueJson", m.GetValueJson()) + if err != nil { + return err + } + } + return nil +} +// SetDefinitionId sets the definitionId property value. The ID of the setting definition for this instance +func (m *DeviceManagementSettingInstance) SetDefinitionId(value *string)() { + m.definitionId = value +} +// SetValueJson sets the valueJson property value. JSON representation of the value +func (m *DeviceManagementSettingInstance) SetValueJson(value *string)() { + m.valueJson = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_response.go new file mode 100644 index 000000000..38f6c1aac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingInstanceCollectionResponse +type DeviceManagementSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementSettingInstanceable +} +// NewDeviceManagementSettingInstanceCollectionResponse instantiates a new DeviceManagementSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementSettingInstanceCollectionResponse()(*DeviceManagementSettingInstanceCollectionResponse) { + m := &DeviceManagementSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementSettingInstanceCollectionResponse) GetValue()([]DeviceManagementSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementSettingInstanceCollectionResponse) SetValue(value []DeviceManagementSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_responseable.go new file mode 100644 index 000000000..047aec687 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingInstanceCollectionResponseable +type DeviceManagementSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementSettingInstanceable) + SetValue(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_instanceable.go new file mode 100644 index 000000000..af7426227 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_instanceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingInstanceable +type DeviceManagementSettingInstanceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefinitionId()(*string) + GetValueJson()(*string) + SetDefinitionId(value *string)() + SetValueJson(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraint.go new file mode 100644 index 000000000..d3c7df7e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraint.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingIntegerConstraint +type DeviceManagementSettingIntegerConstraint struct { + DeviceManagementConstraint + // The maximum permitted value + maximumValue *int32 + // The minimum permitted value + minimumValue *int32 +} +// NewDeviceManagementSettingIntegerConstraint instantiates a new DeviceManagementSettingIntegerConstraint and sets the default values. +func NewDeviceManagementSettingIntegerConstraint()(*DeviceManagementSettingIntegerConstraint) { + m := &DeviceManagementSettingIntegerConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingIntegerConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingIntegerConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingIntegerConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingIntegerConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingIntegerConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["maximumValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumValue(val) + } + return nil + } + res["minimumValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumValue(val) + } + return nil + } + return res +} +// GetMaximumValue gets the maximumValue property value. The maximum permitted value +func (m *DeviceManagementSettingIntegerConstraint) GetMaximumValue()(*int32) { + return m.maximumValue +} +// GetMinimumValue gets the minimumValue property value. The minimum permitted value +func (m *DeviceManagementSettingIntegerConstraint) GetMinimumValue()(*int32) { + return m.minimumValue +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingIntegerConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumValue", m.GetMaximumValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumValue", m.GetMinimumValue()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumValue sets the maximumValue property value. The maximum permitted value +func (m *DeviceManagementSettingIntegerConstraint) SetMaximumValue(value *int32)() { + m.maximumValue = value +} +// SetMinimumValue sets the minimumValue property value. The minimum permitted value +func (m *DeviceManagementSettingIntegerConstraint) SetMinimumValue(value *int32)() { + m.minimumValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraintable.go new file mode 100644 index 000000000..c15498771 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_integer_constraintable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingIntegerConstraintable +type DeviceManagementSettingIntegerConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumValue()(*int32) + GetMinimumValue()(*int32) + SetMaximumValue(value *int32)() + SetMinimumValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraint.go new file mode 100644 index 000000000..acb0357cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraint.go @@ -0,0 +1,92 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingProfileConstraint +type DeviceManagementSettingProfileConstraint struct { + DeviceManagementConstraint + // The source of the entity + source *string + // A collection of types this entity carries + types []string +} +// NewDeviceManagementSettingProfileConstraint instantiates a new DeviceManagementSettingProfileConstraint and sets the default values. +func NewDeviceManagementSettingProfileConstraint()(*DeviceManagementSettingProfileConstraint) { + m := &DeviceManagementSettingProfileConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingProfileConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingProfileConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingProfileConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingProfileConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingProfileConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["types"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTypes(res) + } + return nil + } + return res +} +// GetSource gets the source property value. The source of the entity +func (m *DeviceManagementSettingProfileConstraint) GetSource()(*string) { + return m.source +} +// GetTypes gets the types property value. A collection of types this entity carries +func (m *DeviceManagementSettingProfileConstraint) GetTypes()([]string) { + return m.types +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingProfileConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetTypes() != nil { + err = writer.WriteCollectionOfStringValues("types", m.GetTypes()) + if err != nil { + return err + } + } + return nil +} +// SetSource sets the source property value. The source of the entity +func (m *DeviceManagementSettingProfileConstraint) SetSource(value *string)() { + m.source = value +} +// SetTypes sets the types property value. A collection of types this entity carries +func (m *DeviceManagementSettingProfileConstraint) SetTypes(value []string)() { + m.types = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraintable.go new file mode 100644 index 000000000..7121a67bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_profile_constraintable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingProfileConstraintable +type DeviceManagementSettingProfileConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSource()(*string) + GetTypes()([]string) + SetSource(value *string)() + SetTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraint.go new file mode 100644 index 000000000..bda98f029 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraint.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingRegexConstraint +type DeviceManagementSettingRegexConstraint struct { + DeviceManagementConstraint + // The RegEx pattern to match against + regex *string +} +// NewDeviceManagementSettingRegexConstraint instantiates a new DeviceManagementSettingRegexConstraint and sets the default values. +func NewDeviceManagementSettingRegexConstraint()(*DeviceManagementSettingRegexConstraint) { + m := &DeviceManagementSettingRegexConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingRegexConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingRegexConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingRegexConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingRegexConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingRegexConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["regex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegex(val) + } + return nil + } + return res +} +// GetRegex gets the regex property value. The RegEx pattern to match against +func (m *DeviceManagementSettingRegexConstraint) GetRegex()(*string) { + return m.regex +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingRegexConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("regex", m.GetRegex()) + if err != nil { + return err + } + } + return nil +} +// SetRegex sets the regex property value. The RegEx pattern to match against +func (m *DeviceManagementSettingRegexConstraint) SetRegex(value *string)() { + m.regex = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraintable.go new file mode 100644 index 000000000..1c088dd45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_regex_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingRegexConstraintable +type DeviceManagementSettingRegexConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRegex()(*string) + SetRegex(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraint.go new file mode 100644 index 000000000..129101526 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraint.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingRequiredConstraint +type DeviceManagementSettingRequiredConstraint struct { + DeviceManagementConstraint + // List of value which means not configured for the setting + notConfiguredValue *string +} +// NewDeviceManagementSettingRequiredConstraint instantiates a new DeviceManagementSettingRequiredConstraint and sets the default values. +func NewDeviceManagementSettingRequiredConstraint()(*DeviceManagementSettingRequiredConstraint) { + m := &DeviceManagementSettingRequiredConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingRequiredConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingRequiredConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingRequiredConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingRequiredConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingRequiredConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["notConfiguredValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotConfiguredValue(val) + } + return nil + } + return res +} +// GetNotConfiguredValue gets the notConfiguredValue property value. List of value which means not configured for the setting +func (m *DeviceManagementSettingRequiredConstraint) GetNotConfiguredValue()(*string) { + return m.notConfiguredValue +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingRequiredConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("notConfiguredValue", m.GetNotConfiguredValue()) + if err != nil { + return err + } + } + return nil +} +// SetNotConfiguredValue sets the notConfiguredValue property value. List of value which means not configured for the setting +func (m *DeviceManagementSettingRequiredConstraint) SetNotConfiguredValue(value *string)() { + m.notConfiguredValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraintable.go new file mode 100644 index 000000000..8231fd818 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_required_constraintable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingRequiredConstraintable +type DeviceManagementSettingRequiredConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNotConfiguredValue()(*string) + SetNotConfiguredValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraint.go new file mode 100644 index 000000000..10fe2659a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraint.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingSddlConstraint +type DeviceManagementSettingSddlConstraint struct { + DeviceManagementConstraint +} +// NewDeviceManagementSettingSddlConstraint instantiates a new DeviceManagementSettingSddlConstraint and sets the default values. +func NewDeviceManagementSettingSddlConstraint()(*DeviceManagementSettingSddlConstraint) { + m := &DeviceManagementSettingSddlConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingSddlConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingSddlConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingSddlConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingSddlConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingSddlConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingSddlConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraintable.go new file mode 100644 index 000000000..7c18c1a79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_sddl_constraintable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingSddlConstraintable +type DeviceManagementSettingSddlConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraint.go new file mode 100644 index 000000000..2f6718837 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraint.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingStringLengthConstraint +type DeviceManagementSettingStringLengthConstraint struct { + DeviceManagementConstraint + // The maximum permitted string length + maximumLength *int32 + // The minimum permitted string length + minimumLength *int32 +} +// NewDeviceManagementSettingStringLengthConstraint instantiates a new DeviceManagementSettingStringLengthConstraint and sets the default values. +func NewDeviceManagementSettingStringLengthConstraint()(*DeviceManagementSettingStringLengthConstraint) { + m := &DeviceManagementSettingStringLengthConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingStringLengthConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingStringLengthConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingStringLengthConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingStringLengthConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingStringLengthConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + res["maximumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumLength(val) + } + return nil + } + res["minimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumLength(val) + } + return nil + } + return res +} +// GetMaximumLength gets the maximumLength property value. The maximum permitted string length +func (m *DeviceManagementSettingStringLengthConstraint) GetMaximumLength()(*int32) { + return m.maximumLength +} +// GetMinimumLength gets the minimumLength property value. The minimum permitted string length +func (m *DeviceManagementSettingStringLengthConstraint) GetMinimumLength()(*int32) { + return m.minimumLength +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingStringLengthConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("maximumLength", m.GetMaximumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumLength", m.GetMinimumLength()) + if err != nil { + return err + } + } + return nil +} +// SetMaximumLength sets the maximumLength property value. The maximum permitted string length +func (m *DeviceManagementSettingStringLengthConstraint) SetMaximumLength(value *int32)() { + m.maximumLength = value +} +// SetMinimumLength sets the minimumLength property value. The minimum permitted string length +func (m *DeviceManagementSettingStringLengthConstraint) SetMinimumLength(value *int32)() { + m.minimumLength = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraintable.go new file mode 100644 index 000000000..233b36aa3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_string_length_constraintable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingStringLengthConstraintable +type DeviceManagementSettingStringLengthConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumLength()(*int32) + GetMinimumLength()(*int32) + SetMaximumLength(value *int32)() + SetMinimumLength(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraint.go b/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraint.go new file mode 100644 index 000000000..d7fa8d471 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraint.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingXmlConstraint +type DeviceManagementSettingXmlConstraint struct { + DeviceManagementConstraint +} +// NewDeviceManagementSettingXmlConstraint instantiates a new DeviceManagementSettingXmlConstraint and sets the default values. +func NewDeviceManagementSettingXmlConstraint()(*DeviceManagementSettingXmlConstraint) { + m := &DeviceManagementSettingXmlConstraint{ + DeviceManagementConstraint: *NewDeviceManagementConstraint(), + } + odataTypeValue := "#microsoft.graph.deviceManagementSettingXmlConstraint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementSettingXmlConstraintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingXmlConstraintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettingXmlConstraint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettingXmlConstraint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementConstraint.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DeviceManagementSettingXmlConstraint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementConstraint.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraintable.go b/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraintable.go new file mode 100644 index 000000000..0fcd6e388 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_setting_xml_constraintable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingXmlConstraintable +type DeviceManagementSettingXmlConstraintable interface { + DeviceManagementConstraintable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_settings.go b/src/internal/connector/graph/betasdk/models/device_management_settings.go new file mode 100644 index 000000000..f114b9211 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_settings.go @@ -0,0 +1,410 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettings +type DeviceManagementSettings 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 property to determine if Android device administrator enrollment is enabled for this account. + androidDeviceAdministratorEnrollmentEnabled *bool + // Provider type for Derived Credentials. + derivedCredentialProvider *DerivedCredentialProviderType + // The Derived Credential Provider self-service URI. + derivedCredentialUrl *string + // The number of days a device is allowed to go without checking in to remain compliant. + deviceComplianceCheckinThresholdDays *int32 + // When the device does not check in for specified number of days, the company data might be removed and the device will not be under management. Valid values 30 to 270 + deviceInactivityBeforeRetirementInDay *int32 + // Determines whether the autopilot diagnostic feature is enabled or not. + enableAutopilotDiagnostics *bool + // Determines whether the device group membership report feature is enabled or not. + enableDeviceGroupMembershipReport *bool + // Determines whether the enhanced troubleshooting UX is enabled or not. + enableEnhancedTroubleshootingExperience *bool + // Determines whether the log collection feature should be available for use. + enableLogCollection *bool + // Is feature enabled or not for enhanced jailbreak detection. + enhancedJailBreak *bool + // The property to determine whether to ignore unsupported compliance settings on certian models of devices. + ignoreDevicesForUnsupportedSettingsEnabled *bool + // Is feature enabled or not for scheduled action for rule. + isScheduledActionEnabled *bool + // The OdataType property + odataType *string + // Device should be noncompliant when there is no compliance policy targeted when this is true + secureByDefault *bool +} +// NewDeviceManagementSettings instantiates a new deviceManagementSettings and sets the default values. +func NewDeviceManagementSettings()(*DeviceManagementSettings) { + m := &DeviceManagementSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementSettings(), 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 *DeviceManagementSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAndroidDeviceAdministratorEnrollmentEnabled gets the androidDeviceAdministratorEnrollmentEnabled property value. The property to determine if Android device administrator enrollment is enabled for this account. +func (m *DeviceManagementSettings) GetAndroidDeviceAdministratorEnrollmentEnabled()(*bool) { + return m.androidDeviceAdministratorEnrollmentEnabled +} +// GetDerivedCredentialProvider gets the derivedCredentialProvider property value. Provider type for Derived Credentials. +func (m *DeviceManagementSettings) GetDerivedCredentialProvider()(*DerivedCredentialProviderType) { + return m.derivedCredentialProvider +} +// GetDerivedCredentialUrl gets the derivedCredentialUrl property value. The Derived Credential Provider self-service URI. +func (m *DeviceManagementSettings) GetDerivedCredentialUrl()(*string) { + return m.derivedCredentialUrl +} +// GetDeviceComplianceCheckinThresholdDays gets the deviceComplianceCheckinThresholdDays property value. The number of days a device is allowed to go without checking in to remain compliant. +func (m *DeviceManagementSettings) GetDeviceComplianceCheckinThresholdDays()(*int32) { + return m.deviceComplianceCheckinThresholdDays +} +// GetDeviceInactivityBeforeRetirementInDay gets the deviceInactivityBeforeRetirementInDay property value. When the device does not check in for specified number of days, the company data might be removed and the device will not be under management. Valid values 30 to 270 +func (m *DeviceManagementSettings) GetDeviceInactivityBeforeRetirementInDay()(*int32) { + return m.deviceInactivityBeforeRetirementInDay +} +// GetEnableAutopilotDiagnostics gets the enableAutopilotDiagnostics property value. Determines whether the autopilot diagnostic feature is enabled or not. +func (m *DeviceManagementSettings) GetEnableAutopilotDiagnostics()(*bool) { + return m.enableAutopilotDiagnostics +} +// GetEnableDeviceGroupMembershipReport gets the enableDeviceGroupMembershipReport property value. Determines whether the device group membership report feature is enabled or not. +func (m *DeviceManagementSettings) GetEnableDeviceGroupMembershipReport()(*bool) { + return m.enableDeviceGroupMembershipReport +} +// GetEnableEnhancedTroubleshootingExperience gets the enableEnhancedTroubleshootingExperience property value. Determines whether the enhanced troubleshooting UX is enabled or not. +func (m *DeviceManagementSettings) GetEnableEnhancedTroubleshootingExperience()(*bool) { + return m.enableEnhancedTroubleshootingExperience +} +// GetEnableLogCollection gets the enableLogCollection property value. Determines whether the log collection feature should be available for use. +func (m *DeviceManagementSettings) GetEnableLogCollection()(*bool) { + return m.enableLogCollection +} +// GetEnhancedJailBreak gets the enhancedJailBreak property value. Is feature enabled or not for enhanced jailbreak detection. +func (m *DeviceManagementSettings) GetEnhancedJailBreak()(*bool) { + return m.enhancedJailBreak +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["androidDeviceAdministratorEnrollmentEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidDeviceAdministratorEnrollmentEnabled(val) + } + return nil + } + res["derivedCredentialProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDerivedCredentialProviderType) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialProvider(val.(*DerivedCredentialProviderType)) + } + return nil + } + res["derivedCredentialUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialUrl(val) + } + return nil + } + res["deviceComplianceCheckinThresholdDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceCheckinThresholdDays(val) + } + return nil + } + res["deviceInactivityBeforeRetirementInDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceInactivityBeforeRetirementInDay(val) + } + return nil + } + res["enableAutopilotDiagnostics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableAutopilotDiagnostics(val) + } + return nil + } + res["enableDeviceGroupMembershipReport"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableDeviceGroupMembershipReport(val) + } + return nil + } + res["enableEnhancedTroubleshootingExperience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableEnhancedTroubleshootingExperience(val) + } + return nil + } + res["enableLogCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableLogCollection(val) + } + return nil + } + res["enhancedJailBreak"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnhancedJailBreak(val) + } + return nil + } + res["ignoreDevicesForUnsupportedSettingsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnoreDevicesForUnsupportedSettingsEnabled(val) + } + return nil + } + res["isScheduledActionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsScheduledActionEnabled(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["secureByDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecureByDefault(val) + } + return nil + } + return res +} +// GetIgnoreDevicesForUnsupportedSettingsEnabled gets the ignoreDevicesForUnsupportedSettingsEnabled property value. The property to determine whether to ignore unsupported compliance settings on certian models of devices. +func (m *DeviceManagementSettings) GetIgnoreDevicesForUnsupportedSettingsEnabled()(*bool) { + return m.ignoreDevicesForUnsupportedSettingsEnabled +} +// GetIsScheduledActionEnabled gets the isScheduledActionEnabled property value. Is feature enabled or not for scheduled action for rule. +func (m *DeviceManagementSettings) GetIsScheduledActionEnabled()(*bool) { + return m.isScheduledActionEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSecureByDefault gets the secureByDefault property value. Device should be noncompliant when there is no compliance policy targeted when this is true +func (m *DeviceManagementSettings) GetSecureByDefault()(*bool) { + return m.secureByDefault +} +// Serialize serializes information the current object +func (m *DeviceManagementSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("androidDeviceAdministratorEnrollmentEnabled", m.GetAndroidDeviceAdministratorEnrollmentEnabled()) + if err != nil { + return err + } + } + if m.GetDerivedCredentialProvider() != nil { + cast := (*m.GetDerivedCredentialProvider()).String() + err := writer.WriteStringValue("derivedCredentialProvider", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("derivedCredentialUrl", m.GetDerivedCredentialUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deviceComplianceCheckinThresholdDays", m.GetDeviceComplianceCheckinThresholdDays()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deviceInactivityBeforeRetirementInDay", m.GetDeviceInactivityBeforeRetirementInDay()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableAutopilotDiagnostics", m.GetEnableAutopilotDiagnostics()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableDeviceGroupMembershipReport", m.GetEnableDeviceGroupMembershipReport()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableEnhancedTroubleshootingExperience", m.GetEnableEnhancedTroubleshootingExperience()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableLogCollection", m.GetEnableLogCollection()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enhancedJailBreak", m.GetEnhancedJailBreak()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("ignoreDevicesForUnsupportedSettingsEnabled", m.GetIgnoreDevicesForUnsupportedSettingsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isScheduledActionEnabled", m.GetIsScheduledActionEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("secureByDefault", m.GetSecureByDefault()) + 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 *DeviceManagementSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAndroidDeviceAdministratorEnrollmentEnabled sets the androidDeviceAdministratorEnrollmentEnabled property value. The property to determine if Android device administrator enrollment is enabled for this account. +func (m *DeviceManagementSettings) SetAndroidDeviceAdministratorEnrollmentEnabled(value *bool)() { + m.androidDeviceAdministratorEnrollmentEnabled = value +} +// SetDerivedCredentialProvider sets the derivedCredentialProvider property value. Provider type for Derived Credentials. +func (m *DeviceManagementSettings) SetDerivedCredentialProvider(value *DerivedCredentialProviderType)() { + m.derivedCredentialProvider = value +} +// SetDerivedCredentialUrl sets the derivedCredentialUrl property value. The Derived Credential Provider self-service URI. +func (m *DeviceManagementSettings) SetDerivedCredentialUrl(value *string)() { + m.derivedCredentialUrl = value +} +// SetDeviceComplianceCheckinThresholdDays sets the deviceComplianceCheckinThresholdDays property value. The number of days a device is allowed to go without checking in to remain compliant. +func (m *DeviceManagementSettings) SetDeviceComplianceCheckinThresholdDays(value *int32)() { + m.deviceComplianceCheckinThresholdDays = value +} +// SetDeviceInactivityBeforeRetirementInDay sets the deviceInactivityBeforeRetirementInDay property value. When the device does not check in for specified number of days, the company data might be removed and the device will not be under management. Valid values 30 to 270 +func (m *DeviceManagementSettings) SetDeviceInactivityBeforeRetirementInDay(value *int32)() { + m.deviceInactivityBeforeRetirementInDay = value +} +// SetEnableAutopilotDiagnostics sets the enableAutopilotDiagnostics property value. Determines whether the autopilot diagnostic feature is enabled or not. +func (m *DeviceManagementSettings) SetEnableAutopilotDiagnostics(value *bool)() { + m.enableAutopilotDiagnostics = value +} +// SetEnableDeviceGroupMembershipReport sets the enableDeviceGroupMembershipReport property value. Determines whether the device group membership report feature is enabled or not. +func (m *DeviceManagementSettings) SetEnableDeviceGroupMembershipReport(value *bool)() { + m.enableDeviceGroupMembershipReport = value +} +// SetEnableEnhancedTroubleshootingExperience sets the enableEnhancedTroubleshootingExperience property value. Determines whether the enhanced troubleshooting UX is enabled or not. +func (m *DeviceManagementSettings) SetEnableEnhancedTroubleshootingExperience(value *bool)() { + m.enableEnhancedTroubleshootingExperience = value +} +// SetEnableLogCollection sets the enableLogCollection property value. Determines whether the log collection feature should be available for use. +func (m *DeviceManagementSettings) SetEnableLogCollection(value *bool)() { + m.enableLogCollection = value +} +// SetEnhancedJailBreak sets the enhancedJailBreak property value. Is feature enabled or not for enhanced jailbreak detection. +func (m *DeviceManagementSettings) SetEnhancedJailBreak(value *bool)() { + m.enhancedJailBreak = value +} +// SetIgnoreDevicesForUnsupportedSettingsEnabled sets the ignoreDevicesForUnsupportedSettingsEnabled property value. The property to determine whether to ignore unsupported compliance settings on certian models of devices. +func (m *DeviceManagementSettings) SetIgnoreDevicesForUnsupportedSettingsEnabled(value *bool)() { + m.ignoreDevicesForUnsupportedSettingsEnabled = value +} +// SetIsScheduledActionEnabled sets the isScheduledActionEnabled property value. Is feature enabled or not for scheduled action for rule. +func (m *DeviceManagementSettings) SetIsScheduledActionEnabled(value *bool)() { + m.isScheduledActionEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSecureByDefault sets the secureByDefault property value. Device should be noncompliant when there is no compliance policy targeted when this is true +func (m *DeviceManagementSettings) SetSecureByDefault(value *bool)() { + m.secureByDefault = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_settingsable.go b/src/internal/connector/graph/betasdk/models/device_management_settingsable.go new file mode 100644 index 000000000..d4e40fa51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_settingsable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementSettingsable +type DeviceManagementSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidDeviceAdministratorEnrollmentEnabled()(*bool) + GetDerivedCredentialProvider()(*DerivedCredentialProviderType) + GetDerivedCredentialUrl()(*string) + GetDeviceComplianceCheckinThresholdDays()(*int32) + GetDeviceInactivityBeforeRetirementInDay()(*int32) + GetEnableAutopilotDiagnostics()(*bool) + GetEnableDeviceGroupMembershipReport()(*bool) + GetEnableEnhancedTroubleshootingExperience()(*bool) + GetEnableLogCollection()(*bool) + GetEnhancedJailBreak()(*bool) + GetIgnoreDevicesForUnsupportedSettingsEnabled()(*bool) + GetIsScheduledActionEnabled()(*bool) + GetOdataType()(*string) + GetSecureByDefault()(*bool) + SetAndroidDeviceAdministratorEnrollmentEnabled(value *bool)() + SetDerivedCredentialProvider(value *DerivedCredentialProviderType)() + SetDerivedCredentialUrl(value *string)() + SetDeviceComplianceCheckinThresholdDays(value *int32)() + SetDeviceInactivityBeforeRetirementInDay(value *int32)() + SetEnableAutopilotDiagnostics(value *bool)() + SetEnableDeviceGroupMembershipReport(value *bool)() + SetEnableEnhancedTroubleshootingExperience(value *bool)() + SetEnableLogCollection(value *bool)() + SetEnhancedJailBreak(value *bool)() + SetIgnoreDevicesForUnsupportedSettingsEnabled(value *bool)() + SetIsScheduledActionEnabled(value *bool)() + SetOdataType(value *string)() + SetSecureByDefault(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance.go b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance.go new file mode 100644 index 000000000..54ee1ac2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementStringSettingInstance +type DeviceManagementStringSettingInstance struct { + DeviceManagementSettingInstance + // The string value + value *string +} +// NewDeviceManagementStringSettingInstance instantiates a new DeviceManagementStringSettingInstance and sets the default values. +func NewDeviceManagementStringSettingInstance()(*DeviceManagementStringSettingInstance) { + m := &DeviceManagementStringSettingInstance{ + DeviceManagementSettingInstance: *NewDeviceManagementSettingInstance(), + } + odataTypeValue := "#microsoft.graph.deviceManagementStringSettingInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDeviceManagementStringSettingInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementStringSettingInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementStringSettingInstance(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementStringSettingInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingInstance.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. The string value +func (m *DeviceManagementStringSettingInstance) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementStringSettingInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingInstance.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The string value +func (m *DeviceManagementStringSettingInstance) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_response.go new file mode 100644 index 000000000..9851a2dd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementStringSettingInstanceCollectionResponse +type DeviceManagementStringSettingInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementStringSettingInstanceable +} +// NewDeviceManagementStringSettingInstanceCollectionResponse instantiates a new DeviceManagementStringSettingInstanceCollectionResponse and sets the default values. +func NewDeviceManagementStringSettingInstanceCollectionResponse()(*DeviceManagementStringSettingInstanceCollectionResponse) { + m := &DeviceManagementStringSettingInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementStringSettingInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementStringSettingInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementStringSettingInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementStringSettingInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementStringSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementStringSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementStringSettingInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementStringSettingInstanceCollectionResponse) GetValue()([]DeviceManagementStringSettingInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementStringSettingInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementStringSettingInstanceCollectionResponse) SetValue(value []DeviceManagementStringSettingInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_responseable.go new file mode 100644 index 000000000..1bf75e072 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementStringSettingInstanceCollectionResponseable +type DeviceManagementStringSettingInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementStringSettingInstanceable) + SetValue(value []DeviceManagementStringSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_string_setting_instanceable.go b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instanceable.go new file mode 100644 index 000000000..572cbd361 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_string_setting_instanceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementStringSettingInstanceable +type DeviceManagementStringSettingInstanceable interface { + DeviceManagementSettingInstanceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_subscription_state.go b/src/internal/connector/graph/betasdk/models/device_management_subscription_state.go new file mode 100644 index 000000000..5ccefea7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_subscription_state.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementSubscriptionState int + +const ( + // Pending + PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE DeviceManagementSubscriptionState = iota + // Active + ACTIVE_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + // Warning + WARNING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + // Disabled + DISABLED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + // Deleted + DELETED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + // Blocked + BLOCKED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + // LockedOut + LOCKEDOUT_DEVICEMANAGEMENTSUBSCRIPTIONSTATE +) + +func (i DeviceManagementSubscriptionState) String() string { + return []string{"pending", "active", "warning", "disabled", "deleted", "blocked", "lockedOut"}[i] +} +func ParseDeviceManagementSubscriptionState(v string) (interface{}, error) { + result := PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + switch v { + case "pending": + result = PENDING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "active": + result = ACTIVE_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "warning": + result = WARNING_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "disabled": + result = DISABLED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "deleted": + result = DELETED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "blocked": + result = BLOCKED_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + case "lockedOut": + result = LOCKEDOUT_DEVICEMANAGEMENTSUBSCRIPTIONSTATE + default: + return 0, errors.New("Unknown DeviceManagementSubscriptionState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementSubscriptionState(values []DeviceManagementSubscriptionState) []string { + 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/device_management_subscriptions.go b/src/internal/connector/graph/betasdk/models/device_management_subscriptions.go new file mode 100644 index 000000000..bcc0f7996 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_subscriptions.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementSubscriptions int + +const ( + // None + NONE_DEVICEMANAGEMENTSUBSCRIPTIONS DeviceManagementSubscriptions = iota + // Microsoft Intune Subscription + INTUNE_DEVICEMANAGEMENTSUBSCRIPTIONS + // Office365 Subscription + OFFICE365_DEVICEMANAGEMENTSUBSCRIPTIONS + // Microsoft Intune Premium Subscription + INTUNEPREMIUM_DEVICEMANAGEMENTSUBSCRIPTIONS + // Microsoft Intune for Education Subscription + INTUNE_EDU_DEVICEMANAGEMENTSUBSCRIPTIONS + // Microsoft Intune for Small Businesses Subscription + INTUNE_SMB_DEVICEMANAGEMENTSUBSCRIPTIONS +) + +func (i DeviceManagementSubscriptions) String() string { + return []string{"none", "intune", "office365", "intunePremium", "intune_EDU", "intune_SMB"}[i] +} +func ParseDeviceManagementSubscriptions(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTSUBSCRIPTIONS + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTSUBSCRIPTIONS + case "intune": + result = INTUNE_DEVICEMANAGEMENTSUBSCRIPTIONS + case "office365": + result = OFFICE365_DEVICEMANAGEMENTSUBSCRIPTIONS + case "intunePremium": + result = INTUNEPREMIUM_DEVICEMANAGEMENTSUBSCRIPTIONS + case "intune_EDU": + result = INTUNE_EDU_DEVICEMANAGEMENTSUBSCRIPTIONS + case "intune_SMB": + result = INTUNE_SMB_DEVICEMANAGEMENTSUBSCRIPTIONS + default: + return 0, errors.New("Unknown DeviceManagementSubscriptions value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementSubscriptions(values []DeviceManagementSubscriptions) []string { + 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/device_management_template.go b/src/internal/connector/graph/betasdk/models/device_management_template.go new file mode 100644 index 000000000..85df36433 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template.go @@ -0,0 +1,392 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplate entity that represents a defined collection of device settings +type DeviceManagementTemplate struct { + Entity + // Collection of setting categories within the template + categories []DeviceManagementTemplateSettingCategoryable + // The template's description + description *string + // The template's display name + displayName *string + // Number of Intents created from this template. + intentCount *int32 + // The template is deprecated or not. Intents cannot be created from a deprecated template. + isDeprecated *bool + // Collection of templates this template can migrate to + migratableTo []DeviceManagementTemplateable + // Supported platform types for policies. + platformType *PolicyPlatformType + // When the template was published + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Collection of all settings this template has + settings []DeviceManagementSettingInstanceable + // Template subtype + templateSubtype *DeviceManagementTemplateSubtype + // Template type + templateType *DeviceManagementTemplateType + // The template's version information + versionInfo *string +} +// NewDeviceManagementTemplate instantiates a new deviceManagementTemplate and sets the default values. +func NewDeviceManagementTemplate()(*DeviceManagementTemplate) { + m := &DeviceManagementTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.securityBaselineTemplate": + return NewSecurityBaselineTemplate(), nil + } + } + } + } + return NewDeviceManagementTemplate(), nil +} +// GetCategories gets the categories property value. Collection of setting categories within the template +func (m *DeviceManagementTemplate) GetCategories()([]DeviceManagementTemplateSettingCategoryable) { + return m.categories +} +// GetDescription gets the description property value. The template's description +func (m *DeviceManagementTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The template's display name +func (m *DeviceManagementTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTemplateSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTemplateSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTemplateSettingCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["intentCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIntentCount(val) + } + return nil + } + res["isDeprecated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeprecated(val) + } + return nil + } + res["migratableTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTemplateable) + } + m.SetMigratableTo(res) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetSettings(res) + } + return nil + } + res["templateSubtype"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementTemplateSubtype) + if err != nil { + return err + } + if val != nil { + m.SetTemplateSubtype(val.(*DeviceManagementTemplateSubtype)) + } + return nil + } + res["templateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementTemplateType) + if err != nil { + return err + } + if val != nil { + m.SetTemplateType(val.(*DeviceManagementTemplateType)) + } + return nil + } + res["versionInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionInfo(val) + } + return nil + } + return res +} +// GetIntentCount gets the intentCount property value. Number of Intents created from this template. +func (m *DeviceManagementTemplate) GetIntentCount()(*int32) { + return m.intentCount +} +// GetIsDeprecated gets the isDeprecated property value. The template is deprecated or not. Intents cannot be created from a deprecated template. +func (m *DeviceManagementTemplate) GetIsDeprecated()(*bool) { + return m.isDeprecated +} +// GetMigratableTo gets the migratableTo property value. Collection of templates this template can migrate to +func (m *DeviceManagementTemplate) GetMigratableTo()([]DeviceManagementTemplateable) { + return m.migratableTo +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *DeviceManagementTemplate) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetPublishedDateTime gets the publishedDateTime property value. When the template was published +func (m *DeviceManagementTemplate) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// GetSettings gets the settings property value. Collection of all settings this template has +func (m *DeviceManagementTemplate) GetSettings()([]DeviceManagementSettingInstanceable) { + return m.settings +} +// GetTemplateSubtype gets the templateSubtype property value. Template subtype +func (m *DeviceManagementTemplate) GetTemplateSubtype()(*DeviceManagementTemplateSubtype) { + return m.templateSubtype +} +// GetTemplateType gets the templateType property value. Template type +func (m *DeviceManagementTemplate) GetTemplateType()(*DeviceManagementTemplateType) { + return m.templateType +} +// GetVersionInfo gets the versionInfo property value. The template's version information +func (m *DeviceManagementTemplate) GetVersionInfo()(*string) { + return m.versionInfo +} +// Serialize serializes information the current object +func (m *DeviceManagementTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("intentCount", m.GetIntentCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeprecated", m.GetIsDeprecated()) + if err != nil { + return err + } + } + if m.GetMigratableTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMigratableTo())) + for i, v := range m.GetMigratableTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("migratableTo", cast) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + if m.GetTemplateSubtype() != nil { + cast := (*m.GetTemplateSubtype()).String() + err = writer.WriteStringValue("templateSubtype", &cast) + if err != nil { + return err + } + } + if m.GetTemplateType() != nil { + cast := (*m.GetTemplateType()).String() + err = writer.WriteStringValue("templateType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionInfo", m.GetVersionInfo()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. Collection of setting categories within the template +func (m *DeviceManagementTemplate) SetCategories(value []DeviceManagementTemplateSettingCategoryable)() { + m.categories = value +} +// SetDescription sets the description property value. The template's description +func (m *DeviceManagementTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The template's display name +func (m *DeviceManagementTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIntentCount sets the intentCount property value. Number of Intents created from this template. +func (m *DeviceManagementTemplate) SetIntentCount(value *int32)() { + m.intentCount = value +} +// SetIsDeprecated sets the isDeprecated property value. The template is deprecated or not. Intents cannot be created from a deprecated template. +func (m *DeviceManagementTemplate) SetIsDeprecated(value *bool)() { + m.isDeprecated = value +} +// SetMigratableTo sets the migratableTo property value. Collection of templates this template can migrate to +func (m *DeviceManagementTemplate) SetMigratableTo(value []DeviceManagementTemplateable)() { + m.migratableTo = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *DeviceManagementTemplate) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetPublishedDateTime sets the publishedDateTime property value. When the template was published +func (m *DeviceManagementTemplate) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} +// SetSettings sets the settings property value. Collection of all settings this template has +func (m *DeviceManagementTemplate) SetSettings(value []DeviceManagementSettingInstanceable)() { + m.settings = value +} +// SetTemplateSubtype sets the templateSubtype property value. Template subtype +func (m *DeviceManagementTemplate) SetTemplateSubtype(value *DeviceManagementTemplateSubtype)() { + m.templateSubtype = value +} +// SetTemplateType sets the templateType property value. Template type +func (m *DeviceManagementTemplate) SetTemplateType(value *DeviceManagementTemplateType)() { + m.templateType = value +} +// SetVersionInfo sets the versionInfo property value. The template's version information +func (m *DeviceManagementTemplate) SetVersionInfo(value *string)() { + m.versionInfo = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_template_collection_response.go new file mode 100644 index 000000000..a58371b4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateCollectionResponse +type DeviceManagementTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementTemplateable +} +// NewDeviceManagementTemplateCollectionResponse instantiates a new DeviceManagementTemplateCollectionResponse and sets the default values. +func NewDeviceManagementTemplateCollectionResponse()(*DeviceManagementTemplateCollectionResponse) { + m := &DeviceManagementTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementTemplateCollectionResponse) GetValue()([]DeviceManagementTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementTemplateCollectionResponse) SetValue(value []DeviceManagementTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_template_collection_responseable.go new file mode 100644 index 000000000..ce52c3110 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateCollectionResponseable +type DeviceManagementTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementTemplateable) + SetValue(value []DeviceManagementTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_lifecycle_state.go b/src/internal/connector/graph/betasdk/models/device_management_template_lifecycle_state.go new file mode 100644 index 000000000..817dcd8bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_lifecycle_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementTemplateLifecycleState int + +const ( + // Invalid + INVALID_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE DeviceManagementTemplateLifecycleState = iota + // Draft + DRAFT_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + // Active + ACTIVE_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + // Superseded + SUPERSEDED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + // Deprecated + DEPRECATED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + // Retired + RETIRED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE +) + +func (i DeviceManagementTemplateLifecycleState) String() string { + return []string{"invalid", "draft", "active", "superseded", "deprecated", "retired"}[i] +} +func ParseDeviceManagementTemplateLifecycleState(v string) (interface{}, error) { + result := INVALID_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + switch v { + case "invalid": + result = INVALID_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + case "draft": + result = DRAFT_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + case "active": + result = ACTIVE_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + case "superseded": + result = SUPERSEDED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + case "deprecated": + result = DEPRECATED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + case "retired": + result = RETIRED_DEVICEMANAGEMENTTEMPLATELIFECYCLESTATE + default: + return 0, errors.New("Unknown DeviceManagementTemplateLifecycleState value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementTemplateLifecycleState(values []DeviceManagementTemplateLifecycleState) []string { + 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/device_management_template_setting_category.go b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category.go new file mode 100644 index 000000000..f7423b893 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateSettingCategory +type DeviceManagementTemplateSettingCategory struct { + DeviceManagementSettingCategory + // The settings this category contains + recommendedSettings []DeviceManagementSettingInstanceable +} +// NewDeviceManagementTemplateSettingCategory instantiates a new DeviceManagementTemplateSettingCategory and sets the default values. +func NewDeviceManagementTemplateSettingCategory()(*DeviceManagementTemplateSettingCategory) { + m := &DeviceManagementTemplateSettingCategory{ + DeviceManagementSettingCategory: *NewDeviceManagementSettingCategory(), + } + return m +} +// CreateDeviceManagementTemplateSettingCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTemplateSettingCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTemplateSettingCategory(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTemplateSettingCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementSettingCategory.GetFieldDeserializers() + res["recommendedSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementSettingInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementSettingInstanceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementSettingInstanceable) + } + m.SetRecommendedSettings(res) + } + return nil + } + return res +} +// GetRecommendedSettings gets the recommendedSettings property value. The settings this category contains +func (m *DeviceManagementTemplateSettingCategory) GetRecommendedSettings()([]DeviceManagementSettingInstanceable) { + return m.recommendedSettings +} +// Serialize serializes information the current object +func (m *DeviceManagementTemplateSettingCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementSettingCategory.Serialize(writer) + if err != nil { + return err + } + if m.GetRecommendedSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecommendedSettings())) + for i, v := range m.GetRecommendedSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("recommendedSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetRecommendedSettings sets the recommendedSettings property value. The settings this category contains +func (m *DeviceManagementTemplateSettingCategory) SetRecommendedSettings(value []DeviceManagementSettingInstanceable)() { + m.recommendedSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_response.go new file mode 100644 index 000000000..963abc9a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateSettingCategoryCollectionResponse +type DeviceManagementTemplateSettingCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementTemplateSettingCategoryable +} +// NewDeviceManagementTemplateSettingCategoryCollectionResponse instantiates a new DeviceManagementTemplateSettingCategoryCollectionResponse and sets the default values. +func NewDeviceManagementTemplateSettingCategoryCollectionResponse()(*DeviceManagementTemplateSettingCategoryCollectionResponse) { + m := &DeviceManagementTemplateSettingCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementTemplateSettingCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTemplateSettingCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTemplateSettingCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTemplateSettingCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTemplateSettingCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTemplateSettingCategoryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTemplateSettingCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementTemplateSettingCategoryCollectionResponse) GetValue()([]DeviceManagementTemplateSettingCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementTemplateSettingCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementTemplateSettingCategoryCollectionResponse) SetValue(value []DeviceManagementTemplateSettingCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_responseable.go new file mode 100644 index 000000000..aafb2f496 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_setting_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateSettingCategoryCollectionResponseable +type DeviceManagementTemplateSettingCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementTemplateSettingCategoryable) + SetValue(value []DeviceManagementTemplateSettingCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_setting_categoryable.go b/src/internal/connector/graph/betasdk/models/device_management_template_setting_categoryable.go new file mode 100644 index 000000000..5c9efb01c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_setting_categoryable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateSettingCategoryable +type DeviceManagementTemplateSettingCategoryable interface { + DeviceManagementSettingCategoryable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRecommendedSettings()([]DeviceManagementSettingInstanceable) + SetRecommendedSettings(value []DeviceManagementSettingInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_template_subtype.go b/src/internal/connector/graph/betasdk/models/device_management_template_subtype.go new file mode 100644 index 000000000..88d386cfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_subtype.go @@ -0,0 +1,68 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementTemplateSubtype int + +const ( + // Template has no subtype + NONE_DEVICEMANAGEMENTTEMPLATESUBTYPE DeviceManagementTemplateSubtype = iota + // Endpoint security firewall subtype + FIREWALL_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security disk encryption subtype + DISKENCRYPTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security attack surface reduction subtype + ATTACKSURFACEREDUCTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security endpoint detection and response subtype + ENDPOINTDETECTIONREPONSE_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security account protection subtype + ACCOUNTPROTECTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security anitivirus subtype + ANTIVIRUS_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security firewall shared app subtype + FIREWALLSHAREDAPPLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security firewall shared ip range list subtype + FIREWALLSHAREDIPLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE + // Endpoint security firewall shared port range list subtype + FIREWALLSHAREDPORTLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE +) + +func (i DeviceManagementTemplateSubtype) String() string { + return []string{"none", "firewall", "diskEncryption", "attackSurfaceReduction", "endpointDetectionReponse", "accountProtection", "antivirus", "firewallSharedAppList", "firewallSharedIpList", "firewallSharedPortlist"}[i] +} +func ParseDeviceManagementTemplateSubtype(v string) (interface{}, error) { + result := NONE_DEVICEMANAGEMENTTEMPLATESUBTYPE + switch v { + case "none": + result = NONE_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "firewall": + result = FIREWALL_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "diskEncryption": + result = DISKENCRYPTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "attackSurfaceReduction": + result = ATTACKSURFACEREDUCTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "endpointDetectionReponse": + result = ENDPOINTDETECTIONREPONSE_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "accountProtection": + result = ACCOUNTPROTECTION_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "antivirus": + result = ANTIVIRUS_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "firewallSharedAppList": + result = FIREWALLSHAREDAPPLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "firewallSharedIpList": + result = FIREWALLSHAREDIPLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE + case "firewallSharedPortlist": + result = FIREWALLSHAREDPORTLIST_DEVICEMANAGEMENTTEMPLATESUBTYPE + default: + return 0, errors.New("Unknown DeviceManagementTemplateSubtype value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementTemplateSubtype(values []DeviceManagementTemplateSubtype) []string { + 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/device_management_template_type.go b/src/internal/connector/graph/betasdk/models/device_management_template_type.go new file mode 100644 index 000000000..c696c57c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_template_type.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManagementTemplateType int + +const ( + // Security baseline template + SECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE DeviceManagementTemplateType = iota + // Specialized devices template + SPECIALIZEDDEVICES_DEVICEMANAGEMENTTEMPLATETYPE + // Advanced Threat Protection security baseline template + ADVANCEDTHREATPROTECTIONSECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + // Device configuration template + DEVICECONFIGURATION_DEVICEMANAGEMENTTEMPLATETYPE + // Custom admin defined template + CUSTOM_DEVICEMANAGEMENTTEMPLATETYPE + // Templates containing specific security focused settings + SECURITYTEMPLATE_DEVICEMANAGEMENTTEMPLATETYPE + // Microsoft Edge security baseline template + MICROSOFTEDGESECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + // Microsoft Office 365 ProPlus security baseline template + MICROSOFTOFFICE365PROPLUSSECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + // Device compliance template + DEVICECOMPLIANCE_DEVICEMANAGEMENTTEMPLATETYPE + // Device Configuration for Microsoft Office 365 settings + DEVICECONFIGURATIONFOROFFICE365_DEVICEMANAGEMENTTEMPLATETYPE + // Windows 365 security baseline template + CLOUDPC_DEVICEMANAGEMENTTEMPLATETYPE + // Firewall Shared Object templates for reference settings + FIREWALLSHAREDSETTINGS_DEVICEMANAGEMENTTEMPLATETYPE +) + +func (i DeviceManagementTemplateType) String() string { + return []string{"securityBaseline", "specializedDevices", "advancedThreatProtectionSecurityBaseline", "deviceConfiguration", "custom", "securityTemplate", "microsoftEdgeSecurityBaseline", "microsoftOffice365ProPlusSecurityBaseline", "deviceCompliance", "deviceConfigurationForOffice365", "cloudPC", "firewallSharedSettings"}[i] +} +func ParseDeviceManagementTemplateType(v string) (interface{}, error) { + result := SECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + switch v { + case "securityBaseline": + result = SECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + case "specializedDevices": + result = SPECIALIZEDDEVICES_DEVICEMANAGEMENTTEMPLATETYPE + case "advancedThreatProtectionSecurityBaseline": + result = ADVANCEDTHREATPROTECTIONSECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + case "deviceConfiguration": + result = DEVICECONFIGURATION_DEVICEMANAGEMENTTEMPLATETYPE + case "custom": + result = CUSTOM_DEVICEMANAGEMENTTEMPLATETYPE + case "securityTemplate": + result = SECURITYTEMPLATE_DEVICEMANAGEMENTTEMPLATETYPE + case "microsoftEdgeSecurityBaseline": + result = MICROSOFTEDGESECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + case "microsoftOffice365ProPlusSecurityBaseline": + result = MICROSOFTOFFICE365PROPLUSSECURITYBASELINE_DEVICEMANAGEMENTTEMPLATETYPE + case "deviceCompliance": + result = DEVICECOMPLIANCE_DEVICEMANAGEMENTTEMPLATETYPE + case "deviceConfigurationForOffice365": + result = DEVICECONFIGURATIONFOROFFICE365_DEVICEMANAGEMENTTEMPLATETYPE + case "cloudPC": + result = CLOUDPC_DEVICEMANAGEMENTTEMPLATETYPE + case "firewallSharedSettings": + result = FIREWALLSHAREDSETTINGS_DEVICEMANAGEMENTTEMPLATETYPE + default: + return 0, errors.New("Unknown DeviceManagementTemplateType value: " + v) + } + return &result, nil +} +func SerializeDeviceManagementTemplateType(values []DeviceManagementTemplateType) []string { + 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/device_management_templateable.go b/src/internal/connector/graph/betasdk/models/device_management_templateable.go new file mode 100644 index 000000000..200ee2c85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_templateable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTemplateable +type DeviceManagementTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]DeviceManagementTemplateSettingCategoryable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIntentCount()(*int32) + GetIsDeprecated()(*bool) + GetMigratableTo()([]DeviceManagementTemplateable) + GetPlatformType()(*PolicyPlatformType) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSettings()([]DeviceManagementSettingInstanceable) + GetTemplateSubtype()(*DeviceManagementTemplateSubtype) + GetTemplateType()(*DeviceManagementTemplateType) + GetVersionInfo()(*string) + SetCategories(value []DeviceManagementTemplateSettingCategoryable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIntentCount(value *int32)() + SetIsDeprecated(value *bool)() + SetMigratableTo(value []DeviceManagementTemplateable)() + SetPlatformType(value *PolicyPlatformType)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSettings(value []DeviceManagementSettingInstanceable)() + SetTemplateSubtype(value *DeviceManagementTemplateSubtype)() + SetTemplateType(value *DeviceManagementTemplateType)() + SetVersionInfo(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_details.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_details.go new file mode 100644 index 000000000..6e69d0814 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_details.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorDetails object containing detailed information about the error and its remediation. +type DeviceManagementTroubleshootingErrorDetails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Not yet documented + context *string + // Not yet documented + failure *string + // The detailed description of what went wrong. + failureDetails *string + // The OdataType property + odataType *string + // The detailed description of how to remediate this issue. + remediation *string + // Links to helpful documentation about this failure. + resources []DeviceManagementTroubleshootingErrorResourceable +} +// NewDeviceManagementTroubleshootingErrorDetails instantiates a new deviceManagementTroubleshootingErrorDetails and sets the default values. +func NewDeviceManagementTroubleshootingErrorDetails()(*DeviceManagementTroubleshootingErrorDetails) { + m := &DeviceManagementTroubleshootingErrorDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementTroubleshootingErrorDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTroubleshootingErrorDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTroubleshootingErrorDetails(), 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 *DeviceManagementTroubleshootingErrorDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContext gets the context property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorDetails) GetContext()(*string) { + return m.context +} +// GetFailure gets the failure property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorDetails) GetFailure()(*string) { + return m.failure +} +// GetFailureDetails gets the failureDetails property value. The detailed description of what went wrong. +func (m *DeviceManagementTroubleshootingErrorDetails) GetFailureDetails()(*string) { + return m.failureDetails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTroubleshootingErrorDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["context"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContext(val) + } + return nil + } + res["failure"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailure(val) + } + return nil + } + res["failureDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureDetails(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["remediation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediation(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTroubleshootingErrorResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTroubleshootingErrorResourceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTroubleshootingErrorResourceable) + } + m.SetResources(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementTroubleshootingErrorDetails) GetOdataType()(*string) { + return m.odataType +} +// GetRemediation gets the remediation property value. The detailed description of how to remediate this issue. +func (m *DeviceManagementTroubleshootingErrorDetails) GetRemediation()(*string) { + return m.remediation +} +// GetResources gets the resources property value. Links to helpful documentation about this failure. +func (m *DeviceManagementTroubleshootingErrorDetails) GetResources()([]DeviceManagementTroubleshootingErrorResourceable) { + return m.resources +} +// Serialize serializes information the current object +func (m *DeviceManagementTroubleshootingErrorDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("context", m.GetContext()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failure", m.GetFailure()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("failureDetails", m.GetFailureDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remediation", m.GetRemediation()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("resources", 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 *DeviceManagementTroubleshootingErrorDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContext sets the context property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorDetails) SetContext(value *string)() { + m.context = value +} +// SetFailure sets the failure property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorDetails) SetFailure(value *string)() { + m.failure = value +} +// SetFailureDetails sets the failureDetails property value. The detailed description of what went wrong. +func (m *DeviceManagementTroubleshootingErrorDetails) SetFailureDetails(value *string)() { + m.failureDetails = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementTroubleshootingErrorDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemediation sets the remediation property value. The detailed description of how to remediate this issue. +func (m *DeviceManagementTroubleshootingErrorDetails) SetRemediation(value *string)() { + m.remediation = value +} +// SetResources sets the resources property value. Links to helpful documentation about this failure. +func (m *DeviceManagementTroubleshootingErrorDetails) SetResources(value []DeviceManagementTroubleshootingErrorResourceable)() { + m.resources = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_detailsable.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_detailsable.go new file mode 100644 index 000000000..1f70581c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_detailsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorDetailsable +type DeviceManagementTroubleshootingErrorDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContext()(*string) + GetFailure()(*string) + GetFailureDetails()(*string) + GetOdataType()(*string) + GetRemediation()(*string) + GetResources()([]DeviceManagementTroubleshootingErrorResourceable) + SetContext(value *string)() + SetFailure(value *string)() + SetFailureDetails(value *string)() + SetOdataType(value *string)() + SetRemediation(value *string)() + SetResources(value []DeviceManagementTroubleshootingErrorResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource.go new file mode 100644 index 000000000..5ffb946df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorResource object representing a link to troubleshooting information, the link could be to the Azure Portal or a Microsoft doc. +type DeviceManagementTroubleshootingErrorResource 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 link to the web resource. Can contain any of the following formatters: {{UPN}}, {{DeviceGUID}}, {{UserGUID}} + link *string + // The OdataType property + odataType *string + // Not yet documented + text *string +} +// NewDeviceManagementTroubleshootingErrorResource instantiates a new deviceManagementTroubleshootingErrorResource and sets the default values. +func NewDeviceManagementTroubleshootingErrorResource()(*DeviceManagementTroubleshootingErrorResource) { + m := &DeviceManagementTroubleshootingErrorResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementTroubleshootingErrorResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTroubleshootingErrorResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTroubleshootingErrorResource(), 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 *DeviceManagementTroubleshootingErrorResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTroubleshootingErrorResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLink(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["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetLink gets the link property value. The link to the web resource. Can contain any of the following formatters: {{UPN}}, {{DeviceGUID}}, {{UserGUID}} +func (m *DeviceManagementTroubleshootingErrorResource) GetLink()(*string) { + return m.link +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementTroubleshootingErrorResource) GetOdataType()(*string) { + return m.odataType +} +// GetText gets the text property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorResource) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *DeviceManagementTroubleshootingErrorResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("link", m.GetLink()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("text", m.GetText()) + 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 *DeviceManagementTroubleshootingErrorResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLink sets the link property value. The link to the web resource. Can contain any of the following formatters: {{UPN}}, {{DeviceGUID}}, {{UserGUID}} +func (m *DeviceManagementTroubleshootingErrorResource) SetLink(value *string)() { + m.link = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementTroubleshootingErrorResource) SetOdataType(value *string)() { + m.odataType = value +} +// SetText sets the text property value. Not yet documented +func (m *DeviceManagementTroubleshootingErrorResource) SetText(value *string)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_response.go new file mode 100644 index 000000000..40492fe24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorResourceCollectionResponse +type DeviceManagementTroubleshootingErrorResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementTroubleshootingErrorResourceable +} +// NewDeviceManagementTroubleshootingErrorResourceCollectionResponse instantiates a new DeviceManagementTroubleshootingErrorResourceCollectionResponse and sets the default values. +func NewDeviceManagementTroubleshootingErrorResourceCollectionResponse()(*DeviceManagementTroubleshootingErrorResourceCollectionResponse) { + m := &DeviceManagementTroubleshootingErrorResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementTroubleshootingErrorResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTroubleshootingErrorResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTroubleshootingErrorResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTroubleshootingErrorResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTroubleshootingErrorResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTroubleshootingErrorResourceable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTroubleshootingErrorResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementTroubleshootingErrorResourceCollectionResponse) GetValue()([]DeviceManagementTroubleshootingErrorResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementTroubleshootingErrorResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementTroubleshootingErrorResourceCollectionResponse) SetValue(value []DeviceManagementTroubleshootingErrorResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_responseable.go new file mode 100644 index 000000000..0ab8402da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorResourceCollectionResponseable +type DeviceManagementTroubleshootingErrorResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementTroubleshootingErrorResourceable) + SetValue(value []DeviceManagementTroubleshootingErrorResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resourceable.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resourceable.go new file mode 100644 index 000000000..16af766fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_error_resourceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingErrorResourceable +type DeviceManagementTroubleshootingErrorResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLink()(*string) + GetOdataType()(*string) + GetText()(*string) + SetLink(value *string)() + SetOdataType(value *string)() + SetText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event.go new file mode 100644 index 000000000..72c84982e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event.go @@ -0,0 +1,195 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingEvent event representing an general failure. +type DeviceManagementTroubleshootingEvent struct { + Entity + // A set of string key and string value pairs which provides additional information on the Troubleshooting event + additionalInformation []KeyValuePairable + // Id used for tracing the failure in the service. + correlationId *string + // Time when the event occurred . + eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Event Name corresponding to the Troubleshooting Event. It is an Optional field + eventName *string + // Object containing detailed information about the error and its remediation. + troubleshootingErrorDetails DeviceManagementTroubleshootingErrorDetailsable +} +// NewDeviceManagementTroubleshootingEvent instantiates a new deviceManagementTroubleshootingEvent and sets the default values. +func NewDeviceManagementTroubleshootingEvent()(*DeviceManagementTroubleshootingEvent) { + m := &DeviceManagementTroubleshootingEvent{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceManagementTroubleshootingEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTroubleshootingEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.appleVppTokenTroubleshootingEvent": + return NewAppleVppTokenTroubleshootingEvent(), nil + case "#microsoft.graph.enrollmentTroubleshootingEvent": + return NewEnrollmentTroubleshootingEvent(), nil + case "#microsoft.graph.mobileAppTroubleshootingEvent": + return NewMobileAppTroubleshootingEvent(), nil + } + } + } + } + return NewDeviceManagementTroubleshootingEvent(), nil +} +// GetAdditionalInformation gets the additionalInformation property value. A set of string key and string value pairs which provides additional information on the Troubleshooting event +func (m *DeviceManagementTroubleshootingEvent) GetAdditionalInformation()([]KeyValuePairable) { + return m.additionalInformation +} +// GetCorrelationId gets the correlationId property value. Id used for tracing the failure in the service. +func (m *DeviceManagementTroubleshootingEvent) GetCorrelationId()(*string) { + return m.correlationId +} +// GetEventDateTime gets the eventDateTime property value. Time when the event occurred . +func (m *DeviceManagementTroubleshootingEvent) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventDateTime +} +// GetEventName gets the eventName property value. Event Name corresponding to the Troubleshooting Event. It is an Optional field +func (m *DeviceManagementTroubleshootingEvent) GetEventName()(*string) { + return m.eventName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTroubleshootingEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetAdditionalInformation(res) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["eventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventDateTime(val) + } + return nil + } + res["eventName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEventName(val) + } + return nil + } + res["troubleshootingErrorDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementTroubleshootingErrorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTroubleshootingErrorDetails(val.(DeviceManagementTroubleshootingErrorDetailsable)) + } + return nil + } + return res +} +// GetTroubleshootingErrorDetails gets the troubleshootingErrorDetails property value. Object containing detailed information about the error and its remediation. +func (m *DeviceManagementTroubleshootingEvent) GetTroubleshootingErrorDetails()(DeviceManagementTroubleshootingErrorDetailsable) { + return m.troubleshootingErrorDetails +} +// Serialize serializes information the current object +func (m *DeviceManagementTroubleshootingEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdditionalInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalInformation())) + for i, v := range m.GetAdditionalInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalInformation", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("eventName", m.GetEventName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("troubleshootingErrorDetails", m.GetTroubleshootingErrorDetails()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalInformation sets the additionalInformation property value. A set of string key and string value pairs which provides additional information on the Troubleshooting event +func (m *DeviceManagementTroubleshootingEvent) SetAdditionalInformation(value []KeyValuePairable)() { + m.additionalInformation = value +} +// SetCorrelationId sets the correlationId property value. Id used for tracing the failure in the service. +func (m *DeviceManagementTroubleshootingEvent) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetEventDateTime sets the eventDateTime property value. Time when the event occurred . +func (m *DeviceManagementTroubleshootingEvent) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventDateTime = value +} +// SetEventName sets the eventName property value. Event Name corresponding to the Troubleshooting Event. It is an Optional field +func (m *DeviceManagementTroubleshootingEvent) SetEventName(value *string)() { + m.eventName = value +} +// SetTroubleshootingErrorDetails sets the troubleshootingErrorDetails property value. Object containing detailed information about the error and its remediation. +func (m *DeviceManagementTroubleshootingEvent) SetTroubleshootingErrorDetails(value DeviceManagementTroubleshootingErrorDetailsable)() { + m.troubleshootingErrorDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_response.go new file mode 100644 index 000000000..55e633d75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingEventCollectionResponse +type DeviceManagementTroubleshootingEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementTroubleshootingEventable +} +// NewDeviceManagementTroubleshootingEventCollectionResponse instantiates a new DeviceManagementTroubleshootingEventCollectionResponse and sets the default values. +func NewDeviceManagementTroubleshootingEventCollectionResponse()(*DeviceManagementTroubleshootingEventCollectionResponse) { + m := &DeviceManagementTroubleshootingEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementTroubleshootingEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementTroubleshootingEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementTroubleshootingEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementTroubleshootingEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementTroubleshootingEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementTroubleshootingEventCollectionResponse) GetValue()([]DeviceManagementTroubleshootingEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementTroubleshootingEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementTroubleshootingEventCollectionResponse) SetValue(value []DeviceManagementTroubleshootingEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_responseable.go new file mode 100644 index 000000000..7dcbf651c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingEventCollectionResponseable +type DeviceManagementTroubleshootingEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementTroubleshootingEventable) + SetValue(value []DeviceManagementTroubleshootingEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_eventable.go b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_eventable.go new file mode 100644 index 000000000..31dbeeff6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_troubleshooting_eventable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementTroubleshootingEventable +type DeviceManagementTroubleshootingEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformation()([]KeyValuePairable) + GetCorrelationId()(*string) + GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEventName()(*string) + GetTroubleshootingErrorDetails()(DeviceManagementTroubleshootingErrorDetailsable) + SetAdditionalInformation(value []KeyValuePairable)() + SetCorrelationId(value *string)() + SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEventName(value *string)() + SetTroubleshootingErrorDetails(value DeviceManagementTroubleshootingErrorDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group.go new file mode 100644 index 000000000..427628a47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsLocalUserOrGroup represents information for a local user or group used for user rights setting. +type DeviceManagementUserRightsLocalUserOrGroup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Admin’s description of this local user or group. + description *string + // The name of this local user or group. + name *string + // The OdataType property + odataType *string + // The security identifier of this local user or group (e.g. S-1-5-32-544). + securityIdentifier *string +} +// NewDeviceManagementUserRightsLocalUserOrGroup instantiates a new deviceManagementUserRightsLocalUserOrGroup and sets the default values. +func NewDeviceManagementUserRightsLocalUserOrGroup()(*DeviceManagementUserRightsLocalUserOrGroup) { + m := &DeviceManagementUserRightsLocalUserOrGroup{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementUserRightsLocalUserOrGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementUserRightsLocalUserOrGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementUserRightsLocalUserOrGroup(), 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 *DeviceManagementUserRightsLocalUserOrGroup) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Admin’s description of this local user or group. +func (m *DeviceManagementUserRightsLocalUserOrGroup) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementUserRightsLocalUserOrGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["securityIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityIdentifier(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of this local user or group. +func (m *DeviceManagementUserRightsLocalUserOrGroup) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementUserRightsLocalUserOrGroup) GetOdataType()(*string) { + return m.odataType +} +// GetSecurityIdentifier gets the securityIdentifier property value. The security identifier of this local user or group (e.g. S-1-5-32-544). +func (m *DeviceManagementUserRightsLocalUserOrGroup) GetSecurityIdentifier()(*string) { + return m.securityIdentifier +} +// Serialize serializes information the current object +func (m *DeviceManagementUserRightsLocalUserOrGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("securityIdentifier", m.GetSecurityIdentifier()) + 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 *DeviceManagementUserRightsLocalUserOrGroup) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Admin’s description of this local user or group. +func (m *DeviceManagementUserRightsLocalUserOrGroup) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name of this local user or group. +func (m *DeviceManagementUserRightsLocalUserOrGroup) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementUserRightsLocalUserOrGroup) SetOdataType(value *string)() { + m.odataType = value +} +// SetSecurityIdentifier sets the securityIdentifier property value. The security identifier of this local user or group (e.g. S-1-5-32-544). +func (m *DeviceManagementUserRightsLocalUserOrGroup) SetSecurityIdentifier(value *string)() { + m.securityIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_response.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_response.go new file mode 100644 index 000000000..030c81c58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsLocalUserOrGroupCollectionResponse +type DeviceManagementUserRightsLocalUserOrGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceManagementUserRightsLocalUserOrGroupable +} +// NewDeviceManagementUserRightsLocalUserOrGroupCollectionResponse instantiates a new DeviceManagementUserRightsLocalUserOrGroupCollectionResponse and sets the default values. +func NewDeviceManagementUserRightsLocalUserOrGroupCollectionResponse()(*DeviceManagementUserRightsLocalUserOrGroupCollectionResponse) { + m := &DeviceManagementUserRightsLocalUserOrGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceManagementUserRightsLocalUserOrGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementUserRightsLocalUserOrGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementUserRightsLocalUserOrGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementUserRightsLocalUserOrGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementUserRightsLocalUserOrGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementUserRightsLocalUserOrGroupable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementUserRightsLocalUserOrGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceManagementUserRightsLocalUserOrGroupCollectionResponse) GetValue()([]DeviceManagementUserRightsLocalUserOrGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceManagementUserRightsLocalUserOrGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceManagementUserRightsLocalUserOrGroupCollectionResponse) SetValue(value []DeviceManagementUserRightsLocalUserOrGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_responseable.go new file mode 100644 index 000000000..e3da3771b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsLocalUserOrGroupCollectionResponseable +type DeviceManagementUserRightsLocalUserOrGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceManagementUserRightsLocalUserOrGroupable) + SetValue(value []DeviceManagementUserRightsLocalUserOrGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_groupable.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_groupable.go new file mode 100644 index 000000000..7a8790bd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_local_user_or_groupable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsLocalUserOrGroupable +type DeviceManagementUserRightsLocalUserOrGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetOdataType()(*string) + GetSecurityIdentifier()(*string) + SetDescription(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetSecurityIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_setting.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_setting.go new file mode 100644 index 000000000..ce81b6992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_setting.go @@ -0,0 +1,132 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsSetting represents a user rights setting. +type DeviceManagementUserRightsSetting struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Representing a collection of local users or groups which will be set on device if the state of this setting is Allowed. This collection can contain a maximum of 500 elements. + localUsersOrGroups []DeviceManagementUserRightsLocalUserOrGroupable + // The OdataType property + odataType *string + // State Management Setting. + state *StateManagementSetting +} +// NewDeviceManagementUserRightsSetting instantiates a new deviceManagementUserRightsSetting and sets the default values. +func NewDeviceManagementUserRightsSetting()(*DeviceManagementUserRightsSetting) { + m := &DeviceManagementUserRightsSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceManagementUserRightsSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceManagementUserRightsSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceManagementUserRightsSetting(), 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 *DeviceManagementUserRightsSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceManagementUserRightsSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["localUsersOrGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementUserRightsLocalUserOrGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementUserRightsLocalUserOrGroupable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementUserRightsLocalUserOrGroupable) + } + m.SetLocalUsersOrGroups(res) + } + 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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStateManagementSetting) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*StateManagementSetting)) + } + return nil + } + return res +} +// GetLocalUsersOrGroups gets the localUsersOrGroups property value. Representing a collection of local users or groups which will be set on device if the state of this setting is Allowed. This collection can contain a maximum of 500 elements. +func (m *DeviceManagementUserRightsSetting) GetLocalUsersOrGroups()([]DeviceManagementUserRightsLocalUserOrGroupable) { + return m.localUsersOrGroups +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceManagementUserRightsSetting) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. State Management Setting. +func (m *DeviceManagementUserRightsSetting) GetState()(*StateManagementSetting) { + return m.state +} +// Serialize serializes information the current object +func (m *DeviceManagementUserRightsSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetLocalUsersOrGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalUsersOrGroups())) + for i, v := range m.GetLocalUsersOrGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("localUsersOrGroups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *DeviceManagementUserRightsSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLocalUsersOrGroups sets the localUsersOrGroups property value. Representing a collection of local users or groups which will be set on device if the state of this setting is Allowed. This collection can contain a maximum of 500 elements. +func (m *DeviceManagementUserRightsSetting) SetLocalUsersOrGroups(value []DeviceManagementUserRightsLocalUserOrGroupable)() { + m.localUsersOrGroups = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceManagementUserRightsSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. State Management Setting. +func (m *DeviceManagementUserRightsSetting) SetState(value *StateManagementSetting)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_management_user_rights_settingable.go b/src/internal/connector/graph/betasdk/models/device_management_user_rights_settingable.go new file mode 100644 index 000000000..db340d84c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_management_user_rights_settingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementUserRightsSettingable +type DeviceManagementUserRightsSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLocalUsersOrGroups()([]DeviceManagementUserRightsLocalUserOrGroupable) + GetOdataType()(*string) + GetState()(*StateManagementSetting) + SetLocalUsersOrGroups(value []DeviceManagementUserRightsLocalUserOrGroupable)() + SetOdataType(value *string)() + SetState(value *StateManagementSetting)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_managementable.go b/src/internal/connector/graph/betasdk/models/device_managementable.go new file mode 100644 index 000000000..4a4dba11b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_managementable.go @@ -0,0 +1,363 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceManagementable +type DeviceManagementable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountMoveCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAdminConsent()(AdminConsentable) + GetAdvancedThreatProtectionOnboardingStateSummary()(AdvancedThreatProtectionOnboardingStateSummaryable) + GetAndroidDeviceOwnerEnrollmentProfiles()([]AndroidDeviceOwnerEnrollmentProfileable) + GetAndroidForWorkAppConfigurationSchemas()([]AndroidForWorkAppConfigurationSchemaable) + GetAndroidForWorkEnrollmentProfiles()([]AndroidForWorkEnrollmentProfileable) + GetAndroidForWorkSettings()(AndroidForWorkSettingsable) + GetAndroidManagedStoreAccountEnterpriseSettings()(AndroidManagedStoreAccountEnterpriseSettingsable) + GetAndroidManagedStoreAppConfigurationSchemas()([]AndroidManagedStoreAppConfigurationSchemaable) + GetApplePushNotificationCertificate()(ApplePushNotificationCertificateable) + GetAppleUserInitiatedEnrollmentProfiles()([]AppleUserInitiatedEnrollmentProfileable) + GetAssignmentFilters()([]DeviceAndAppManagementAssignmentFilterable) + GetAuditEvents()([]AuditEventable) + GetAutopilotEvents()([]DeviceManagementAutopilotEventable) + GetCartToClassAssociations()([]CartToClassAssociationable) + GetCategories()([]DeviceManagementSettingCategoryable) + GetCertificateConnectorDetails()([]CertificateConnectorDetailsable) + GetChromeOSOnboardingSettings()([]ChromeOSOnboardingSettingsable) + GetCloudPCConnectivityIssues()([]CloudPCConnectivityIssueable) + GetComanagedDevices()([]ManagedDeviceable) + GetComanagementEligibleDevices()([]ComanagementEligibleDeviceable) + GetComplianceCategories()([]DeviceManagementConfigurationCategoryable) + GetComplianceManagementPartners()([]ComplianceManagementPartnerable) + GetCompliancePolicies()([]DeviceManagementCompliancePolicyable) + GetComplianceSettings()([]DeviceManagementConfigurationSettingDefinitionable) + GetConditionalAccessSettings()(OnPremisesConditionalAccessSettingsable) + GetConfigManagerCollections()([]ConfigManagerCollectionable) + GetConfigurationCategories()([]DeviceManagementConfigurationCategoryable) + GetConfigurationPolicies()([]DeviceManagementConfigurationPolicyable) + GetConfigurationPolicyTemplates()([]DeviceManagementConfigurationPolicyTemplateable) + GetConfigurationSettings()([]DeviceManagementConfigurationSettingDefinitionable) + GetDataProcessorServiceForWindowsFeaturesOnboarding()(DataProcessorServiceForWindowsFeaturesOnboardingable) + GetDataSharingConsents()([]DataSharingConsentable) + GetDepOnboardingSettings()([]DepOnboardingSettingable) + GetDerivedCredentials()([]DeviceManagementDerivedCredentialSettingsable) + GetDetectedApps()([]DetectedAppable) + GetDeviceCategories()([]DeviceCategoryable) + GetDeviceCompliancePolicies()([]DeviceCompliancePolicyable) + GetDeviceCompliancePolicyDeviceStateSummary()(DeviceCompliancePolicyDeviceStateSummaryable) + GetDeviceCompliancePolicySettingStateSummaries()([]DeviceCompliancePolicySettingStateSummaryable) + GetDeviceComplianceReportSummarizationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceComplianceScripts()([]DeviceComplianceScriptable) + GetDeviceConfigurationConflictSummary()([]DeviceConfigurationConflictSummaryable) + GetDeviceConfigurationDeviceStateSummaries()(DeviceConfigurationDeviceStateSummaryable) + GetDeviceConfigurationRestrictedAppsViolations()([]RestrictedAppsViolationable) + GetDeviceConfigurations()([]DeviceConfigurationable) + GetDeviceConfigurationsAllManagedDeviceCertificateStates()([]ManagedAllDeviceCertificateStateable) + GetDeviceConfigurationUserStateSummaries()(DeviceConfigurationUserStateSummaryable) + GetDeviceCustomAttributeShellScripts()([]DeviceCustomAttributeShellScriptable) + GetDeviceEnrollmentConfigurations()([]DeviceEnrollmentConfigurationable) + GetDeviceHealthScripts()([]DeviceHealthScriptable) + GetDeviceManagementPartners()([]DeviceManagementPartnerable) + GetDeviceManagementScripts()([]DeviceManagementScriptable) + GetDeviceProtectionOverview()(DeviceProtectionOverviewable) + GetDeviceShellScripts()([]DeviceShellScriptable) + GetDomainJoinConnectors()([]DeviceManagementDomainJoinConnectorable) + GetEmbeddedSIMActivationCodePools()([]EmbeddedSIMActivationCodePoolable) + GetExchangeConnectors()([]DeviceManagementExchangeConnectorable) + GetExchangeOnPremisesPolicies()([]DeviceManagementExchangeOnPremisesPolicyable) + GetExchangeOnPremisesPolicy()(DeviceManagementExchangeOnPremisesPolicyable) + GetGroupPolicyCategories()([]GroupPolicyCategoryable) + GetGroupPolicyConfigurations()([]GroupPolicyConfigurationable) + GetGroupPolicyDefinitionFiles()([]GroupPolicyDefinitionFileable) + GetGroupPolicyDefinitions()([]GroupPolicyDefinitionable) + GetGroupPolicyMigrationReports()([]GroupPolicyMigrationReportable) + GetGroupPolicyObjectFiles()([]GroupPolicyObjectFileable) + GetGroupPolicyUploadedDefinitionFiles()([]GroupPolicyUploadedDefinitionFileable) + GetImportedDeviceIdentities()([]ImportedDeviceIdentityable) + GetImportedWindowsAutopilotDeviceIdentities()([]ImportedWindowsAutopilotDeviceIdentityable) + GetIntents()([]DeviceManagementIntentable) + GetIntuneAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIntuneBrand()(IntuneBrandable) + GetIntuneBrandingProfiles()([]IntuneBrandingProfileable) + GetIosUpdateStatuses()([]IosUpdateDeviceStatusable) + GetLastReportAggregationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLegacyPcManangementEnabled()(*bool) + GetMacOSSoftwareUpdateAccountSummaries()([]MacOSSoftwareUpdateAccountSummaryable) + GetManagedDeviceCleanupSettings()(ManagedDeviceCleanupSettingsable) + GetManagedDeviceEncryptionStates()([]ManagedDeviceEncryptionStateable) + GetManagedDeviceOverview()(ManagedDeviceOverviewable) + GetManagedDevices()([]ManagedDeviceable) + GetMaximumDepTokens()(*int32) + GetMicrosoftTunnelConfigurations()([]MicrosoftTunnelConfigurationable) + GetMicrosoftTunnelHealthThresholds()([]MicrosoftTunnelHealthThresholdable) + GetMicrosoftTunnelServerLogCollectionResponses()([]MicrosoftTunnelServerLogCollectionResponseable) + GetMicrosoftTunnelSites()([]MicrosoftTunnelSiteable) + GetMobileAppTroubleshootingEvents()([]MobileAppTroubleshootingEventable) + GetMobileThreatDefenseConnectors()([]MobileThreatDefenseConnectorable) + GetNdesConnectors()([]NdesConnectorable) + GetNotificationMessageTemplates()([]NotificationMessageTemplateable) + GetOemWarrantyInformationOnboarding()([]OemWarrantyInformationOnboardingable) + GetRemoteActionAudits()([]RemoteActionAuditable) + GetRemoteAssistancePartners()([]RemoteAssistancePartnerable) + GetRemoteAssistanceSettings()(RemoteAssistanceSettingsable) + GetReports()(DeviceManagementReportsable) + GetResourceAccessProfiles()([]DeviceManagementResourceAccessProfileBaseable) + GetResourceOperations()([]ResourceOperationable) + GetReusablePolicySettings()([]DeviceManagementReusablePolicySettingable) + GetReusableSettings()([]DeviceManagementConfigurationSettingDefinitionable) + GetRoleAssignments()([]DeviceAndAppManagementRoleAssignmentable) + GetRoleDefinitions()([]RoleDefinitionable) + GetRoleScopeTags()([]RoleScopeTagable) + GetSettingDefinitions()([]DeviceManagementSettingDefinitionable) + GetSettings()(DeviceManagementSettingsable) + GetSoftwareUpdateStatusSummary()(SoftwareUpdateStatusSummaryable) + GetSubscriptions()(*DeviceManagementSubscriptions) + GetSubscriptionState()(*DeviceManagementSubscriptionState) + GetTelecomExpenseManagementPartners()([]TelecomExpenseManagementPartnerable) + GetTemplates()([]DeviceManagementTemplateable) + GetTemplateSettings()([]DeviceManagementConfigurationSettingTemplateable) + GetTenantAttachRBAC()(TenantAttachRBACable) + GetTermsAndConditions()([]TermsAndConditionsable) + GetTroubleshootingEvents()([]DeviceManagementTroubleshootingEventable) + GetUnlicensedAdminstratorsEnabled()(*bool) + GetUserExperienceAnalyticsAnomaly()([]UserExperienceAnalyticsAnomalyable) + GetUserExperienceAnalyticsAnomalyDevice()([]UserExperienceAnalyticsAnomalyDeviceable) + GetUserExperienceAnalyticsAnomalySeverityOverview()(UserExperienceAnalyticsAnomalySeverityOverviewable) + GetUserExperienceAnalyticsAppHealthApplicationPerformance()([]UserExperienceAnalyticsAppHealthApplicationPerformanceable) + GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable) + GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable) + GetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId()([]UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable) + GetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion()([]UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable) + GetUserExperienceAnalyticsAppHealthDeviceModelPerformance()([]UserExperienceAnalyticsAppHealthDeviceModelPerformanceable) + GetUserExperienceAnalyticsAppHealthDevicePerformance()([]UserExperienceAnalyticsAppHealthDevicePerformanceable) + GetUserExperienceAnalyticsAppHealthDevicePerformanceDetails()([]UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable) + GetUserExperienceAnalyticsAppHealthOSVersionPerformance()([]UserExperienceAnalyticsAppHealthOSVersionPerformanceable) + GetUserExperienceAnalyticsAppHealthOverview()(UserExperienceAnalyticsCategoryable) + GetUserExperienceAnalyticsBaselines()([]UserExperienceAnalyticsBaselineable) + GetUserExperienceAnalyticsBatteryHealthAppImpact()([]UserExperienceAnalyticsBatteryHealthAppImpactable) + GetUserExperienceAnalyticsBatteryHealthCapacityDetails()(UserExperienceAnalyticsBatteryHealthCapacityDetailsable) + GetUserExperienceAnalyticsBatteryHealthDeviceAppImpact()([]UserExperienceAnalyticsBatteryHealthDeviceAppImpactable) + GetUserExperienceAnalyticsBatteryHealthDevicePerformance()([]UserExperienceAnalyticsBatteryHealthDevicePerformanceable) + GetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory()([]UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable) + GetUserExperienceAnalyticsBatteryHealthModelPerformance()([]UserExperienceAnalyticsBatteryHealthModelPerformanceable) + GetUserExperienceAnalyticsBatteryHealthOsPerformance()([]UserExperienceAnalyticsBatteryHealthOsPerformanceable) + GetUserExperienceAnalyticsBatteryHealthRuntimeDetails()(UserExperienceAnalyticsBatteryHealthRuntimeDetailsable) + GetUserExperienceAnalyticsCategories()([]UserExperienceAnalyticsCategoryable) + GetUserExperienceAnalyticsDeviceMetricHistory()([]UserExperienceAnalyticsMetricHistoryable) + GetUserExperienceAnalyticsDevicePerformance()([]UserExperienceAnalyticsDevicePerformanceable) + GetUserExperienceAnalyticsDeviceScope()(UserExperienceAnalyticsDeviceScopeable) + GetUserExperienceAnalyticsDeviceScopes()([]UserExperienceAnalyticsDeviceScopeable) + GetUserExperienceAnalyticsDeviceScores()([]UserExperienceAnalyticsDeviceScoresable) + GetUserExperienceAnalyticsDeviceStartupHistory()([]UserExperienceAnalyticsDeviceStartupHistoryable) + GetUserExperienceAnalyticsDeviceStartupProcesses()([]UserExperienceAnalyticsDeviceStartupProcessable) + GetUserExperienceAnalyticsDeviceStartupProcessPerformance()([]UserExperienceAnalyticsDeviceStartupProcessPerformanceable) + GetUserExperienceAnalyticsDevicesWithoutCloudIdentity()([]UserExperienceAnalyticsDeviceWithoutCloudIdentityable) + GetUserExperienceAnalyticsDeviceTimelineEvents()([]UserExperienceAnalyticsDeviceTimelineEventsable) + GetUserExperienceAnalyticsImpactingProcess()([]UserExperienceAnalyticsImpactingProcessable) + GetUserExperienceAnalyticsMetricHistory()([]UserExperienceAnalyticsMetricHistoryable) + GetUserExperienceAnalyticsModelScores()([]UserExperienceAnalyticsModelScoresable) + GetUserExperienceAnalyticsNotAutopilotReadyDevice()([]UserExperienceAnalyticsNotAutopilotReadyDeviceable) + GetUserExperienceAnalyticsOverview()(UserExperienceAnalyticsOverviewable) + GetUserExperienceAnalyticsRemoteConnection()([]UserExperienceAnalyticsRemoteConnectionable) + GetUserExperienceAnalyticsResourcePerformance()([]UserExperienceAnalyticsResourcePerformanceable) + GetUserExperienceAnalyticsScoreHistory()([]UserExperienceAnalyticsScoreHistoryable) + GetUserExperienceAnalyticsSettings()(UserExperienceAnalyticsSettingsable) + GetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric()(UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable) + GetUserExperienceAnalyticsWorkFromAnywhereMetrics()([]UserExperienceAnalyticsWorkFromAnywhereMetricable) + GetUserExperienceAnalyticsWorkFromAnywhereModelPerformance()([]UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable) + GetUserPfxCertificates()([]UserPFXCertificateable) + GetVirtualEndpoint()(VirtualEndpointable) + GetWindowsAutopilotDeploymentProfiles()([]WindowsAutopilotDeploymentProfileable) + GetWindowsAutopilotDeviceIdentities()([]WindowsAutopilotDeviceIdentityable) + GetWindowsAutopilotSettings()(WindowsAutopilotSettingsable) + GetWindowsDriverUpdateProfiles()([]WindowsDriverUpdateProfileable) + GetWindowsFeatureUpdateProfiles()([]WindowsFeatureUpdateProfileable) + GetWindowsInformationProtectionAppLearningSummaries()([]WindowsInformationProtectionAppLearningSummaryable) + GetWindowsInformationProtectionNetworkLearningSummaries()([]WindowsInformationProtectionNetworkLearningSummaryable) + GetWindowsMalwareInformation()([]WindowsMalwareInformationable) + GetWindowsMalwareOverview()(WindowsMalwareOverviewable) + GetWindowsQualityUpdateProfiles()([]WindowsQualityUpdateProfileable) + GetWindowsUpdateCatalogItems()([]WindowsUpdateCatalogItemable) + GetZebraFotaArtifacts()([]ZebraFotaArtifactable) + GetZebraFotaConnector()(ZebraFotaConnectorable) + GetZebraFotaDeployments()([]ZebraFotaDeploymentable) + SetAccountMoveCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAdminConsent(value AdminConsentable)() + SetAdvancedThreatProtectionOnboardingStateSummary(value AdvancedThreatProtectionOnboardingStateSummaryable)() + SetAndroidDeviceOwnerEnrollmentProfiles(value []AndroidDeviceOwnerEnrollmentProfileable)() + SetAndroidForWorkAppConfigurationSchemas(value []AndroidForWorkAppConfigurationSchemaable)() + SetAndroidForWorkEnrollmentProfiles(value []AndroidForWorkEnrollmentProfileable)() + SetAndroidForWorkSettings(value AndroidForWorkSettingsable)() + SetAndroidManagedStoreAccountEnterpriseSettings(value AndroidManagedStoreAccountEnterpriseSettingsable)() + SetAndroidManagedStoreAppConfigurationSchemas(value []AndroidManagedStoreAppConfigurationSchemaable)() + SetApplePushNotificationCertificate(value ApplePushNotificationCertificateable)() + SetAppleUserInitiatedEnrollmentProfiles(value []AppleUserInitiatedEnrollmentProfileable)() + SetAssignmentFilters(value []DeviceAndAppManagementAssignmentFilterable)() + SetAuditEvents(value []AuditEventable)() + SetAutopilotEvents(value []DeviceManagementAutopilotEventable)() + SetCartToClassAssociations(value []CartToClassAssociationable)() + SetCategories(value []DeviceManagementSettingCategoryable)() + SetCertificateConnectorDetails(value []CertificateConnectorDetailsable)() + SetChromeOSOnboardingSettings(value []ChromeOSOnboardingSettingsable)() + SetCloudPCConnectivityIssues(value []CloudPCConnectivityIssueable)() + SetComanagedDevices(value []ManagedDeviceable)() + SetComanagementEligibleDevices(value []ComanagementEligibleDeviceable)() + SetComplianceCategories(value []DeviceManagementConfigurationCategoryable)() + SetComplianceManagementPartners(value []ComplianceManagementPartnerable)() + SetCompliancePolicies(value []DeviceManagementCompliancePolicyable)() + SetComplianceSettings(value []DeviceManagementConfigurationSettingDefinitionable)() + SetConditionalAccessSettings(value OnPremisesConditionalAccessSettingsable)() + SetConfigManagerCollections(value []ConfigManagerCollectionable)() + SetConfigurationCategories(value []DeviceManagementConfigurationCategoryable)() + SetConfigurationPolicies(value []DeviceManagementConfigurationPolicyable)() + SetConfigurationPolicyTemplates(value []DeviceManagementConfigurationPolicyTemplateable)() + SetConfigurationSettings(value []DeviceManagementConfigurationSettingDefinitionable)() + SetDataProcessorServiceForWindowsFeaturesOnboarding(value DataProcessorServiceForWindowsFeaturesOnboardingable)() + SetDataSharingConsents(value []DataSharingConsentable)() + SetDepOnboardingSettings(value []DepOnboardingSettingable)() + SetDerivedCredentials(value []DeviceManagementDerivedCredentialSettingsable)() + SetDetectedApps(value []DetectedAppable)() + SetDeviceCategories(value []DeviceCategoryable)() + SetDeviceCompliancePolicies(value []DeviceCompliancePolicyable)() + SetDeviceCompliancePolicyDeviceStateSummary(value DeviceCompliancePolicyDeviceStateSummaryable)() + SetDeviceCompliancePolicySettingStateSummaries(value []DeviceCompliancePolicySettingStateSummaryable)() + SetDeviceComplianceReportSummarizationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceComplianceScripts(value []DeviceComplianceScriptable)() + SetDeviceConfigurationConflictSummary(value []DeviceConfigurationConflictSummaryable)() + SetDeviceConfigurationDeviceStateSummaries(value DeviceConfigurationDeviceStateSummaryable)() + SetDeviceConfigurationRestrictedAppsViolations(value []RestrictedAppsViolationable)() + SetDeviceConfigurations(value []DeviceConfigurationable)() + SetDeviceConfigurationsAllManagedDeviceCertificateStates(value []ManagedAllDeviceCertificateStateable)() + SetDeviceConfigurationUserStateSummaries(value DeviceConfigurationUserStateSummaryable)() + SetDeviceCustomAttributeShellScripts(value []DeviceCustomAttributeShellScriptable)() + SetDeviceEnrollmentConfigurations(value []DeviceEnrollmentConfigurationable)() + SetDeviceHealthScripts(value []DeviceHealthScriptable)() + SetDeviceManagementPartners(value []DeviceManagementPartnerable)() + SetDeviceManagementScripts(value []DeviceManagementScriptable)() + SetDeviceProtectionOverview(value DeviceProtectionOverviewable)() + SetDeviceShellScripts(value []DeviceShellScriptable)() + SetDomainJoinConnectors(value []DeviceManagementDomainJoinConnectorable)() + SetEmbeddedSIMActivationCodePools(value []EmbeddedSIMActivationCodePoolable)() + SetExchangeConnectors(value []DeviceManagementExchangeConnectorable)() + SetExchangeOnPremisesPolicies(value []DeviceManagementExchangeOnPremisesPolicyable)() + SetExchangeOnPremisesPolicy(value DeviceManagementExchangeOnPremisesPolicyable)() + SetGroupPolicyCategories(value []GroupPolicyCategoryable)() + SetGroupPolicyConfigurations(value []GroupPolicyConfigurationable)() + SetGroupPolicyDefinitionFiles(value []GroupPolicyDefinitionFileable)() + SetGroupPolicyDefinitions(value []GroupPolicyDefinitionable)() + SetGroupPolicyMigrationReports(value []GroupPolicyMigrationReportable)() + SetGroupPolicyObjectFiles(value []GroupPolicyObjectFileable)() + SetGroupPolicyUploadedDefinitionFiles(value []GroupPolicyUploadedDefinitionFileable)() + SetImportedDeviceIdentities(value []ImportedDeviceIdentityable)() + SetImportedWindowsAutopilotDeviceIdentities(value []ImportedWindowsAutopilotDeviceIdentityable)() + SetIntents(value []DeviceManagementIntentable)() + SetIntuneAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIntuneBrand(value IntuneBrandable)() + SetIntuneBrandingProfiles(value []IntuneBrandingProfileable)() + SetIosUpdateStatuses(value []IosUpdateDeviceStatusable)() + SetLastReportAggregationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLegacyPcManangementEnabled(value *bool)() + SetMacOSSoftwareUpdateAccountSummaries(value []MacOSSoftwareUpdateAccountSummaryable)() + SetManagedDeviceCleanupSettings(value ManagedDeviceCleanupSettingsable)() + SetManagedDeviceEncryptionStates(value []ManagedDeviceEncryptionStateable)() + SetManagedDeviceOverview(value ManagedDeviceOverviewable)() + SetManagedDevices(value []ManagedDeviceable)() + SetMaximumDepTokens(value *int32)() + SetMicrosoftTunnelConfigurations(value []MicrosoftTunnelConfigurationable)() + SetMicrosoftTunnelHealthThresholds(value []MicrosoftTunnelHealthThresholdable)() + SetMicrosoftTunnelServerLogCollectionResponses(value []MicrosoftTunnelServerLogCollectionResponseable)() + SetMicrosoftTunnelSites(value []MicrosoftTunnelSiteable)() + SetMobileAppTroubleshootingEvents(value []MobileAppTroubleshootingEventable)() + SetMobileThreatDefenseConnectors(value []MobileThreatDefenseConnectorable)() + SetNdesConnectors(value []NdesConnectorable)() + SetNotificationMessageTemplates(value []NotificationMessageTemplateable)() + SetOemWarrantyInformationOnboarding(value []OemWarrantyInformationOnboardingable)() + SetRemoteActionAudits(value []RemoteActionAuditable)() + SetRemoteAssistancePartners(value []RemoteAssistancePartnerable)() + SetRemoteAssistanceSettings(value RemoteAssistanceSettingsable)() + SetReports(value DeviceManagementReportsable)() + SetResourceAccessProfiles(value []DeviceManagementResourceAccessProfileBaseable)() + SetResourceOperations(value []ResourceOperationable)() + SetReusablePolicySettings(value []DeviceManagementReusablePolicySettingable)() + SetReusableSettings(value []DeviceManagementConfigurationSettingDefinitionable)() + SetRoleAssignments(value []DeviceAndAppManagementRoleAssignmentable)() + SetRoleDefinitions(value []RoleDefinitionable)() + SetRoleScopeTags(value []RoleScopeTagable)() + SetSettingDefinitions(value []DeviceManagementSettingDefinitionable)() + SetSettings(value DeviceManagementSettingsable)() + SetSoftwareUpdateStatusSummary(value SoftwareUpdateStatusSummaryable)() + SetSubscriptions(value *DeviceManagementSubscriptions)() + SetSubscriptionState(value *DeviceManagementSubscriptionState)() + SetTelecomExpenseManagementPartners(value []TelecomExpenseManagementPartnerable)() + SetTemplates(value []DeviceManagementTemplateable)() + SetTemplateSettings(value []DeviceManagementConfigurationSettingTemplateable)() + SetTenantAttachRBAC(value TenantAttachRBACable)() + SetTermsAndConditions(value []TermsAndConditionsable)() + SetTroubleshootingEvents(value []DeviceManagementTroubleshootingEventable)() + SetUnlicensedAdminstratorsEnabled(value *bool)() + SetUserExperienceAnalyticsAnomaly(value []UserExperienceAnalyticsAnomalyable)() + SetUserExperienceAnalyticsAnomalyDevice(value []UserExperienceAnalyticsAnomalyDeviceable)() + SetUserExperienceAnalyticsAnomalySeverityOverview(value UserExperienceAnalyticsAnomalySeverityOverviewable)() + SetUserExperienceAnalyticsAppHealthApplicationPerformance(value []UserExperienceAnalyticsAppHealthApplicationPerformanceable)() + SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersion(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionable)() + SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDetails(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetailsable)() + SetUserExperienceAnalyticsAppHealthApplicationPerformanceByAppVersionDeviceId(value []UserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceIdable)() + SetUserExperienceAnalyticsAppHealthApplicationPerformanceByOSVersion(value []UserExperienceAnalyticsAppHealthAppPerformanceByOSVersionable)() + SetUserExperienceAnalyticsAppHealthDeviceModelPerformance(value []UserExperienceAnalyticsAppHealthDeviceModelPerformanceable)() + SetUserExperienceAnalyticsAppHealthDevicePerformance(value []UserExperienceAnalyticsAppHealthDevicePerformanceable)() + SetUserExperienceAnalyticsAppHealthDevicePerformanceDetails(value []UserExperienceAnalyticsAppHealthDevicePerformanceDetailsable)() + SetUserExperienceAnalyticsAppHealthOSVersionPerformance(value []UserExperienceAnalyticsAppHealthOSVersionPerformanceable)() + SetUserExperienceAnalyticsAppHealthOverview(value UserExperienceAnalyticsCategoryable)() + SetUserExperienceAnalyticsBaselines(value []UserExperienceAnalyticsBaselineable)() + SetUserExperienceAnalyticsBatteryHealthAppImpact(value []UserExperienceAnalyticsBatteryHealthAppImpactable)() + SetUserExperienceAnalyticsBatteryHealthCapacityDetails(value UserExperienceAnalyticsBatteryHealthCapacityDetailsable)() + SetUserExperienceAnalyticsBatteryHealthDeviceAppImpact(value []UserExperienceAnalyticsBatteryHealthDeviceAppImpactable)() + SetUserExperienceAnalyticsBatteryHealthDevicePerformance(value []UserExperienceAnalyticsBatteryHealthDevicePerformanceable)() + SetUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory(value []UserExperienceAnalyticsBatteryHealthDeviceRuntimeHistoryable)() + SetUserExperienceAnalyticsBatteryHealthModelPerformance(value []UserExperienceAnalyticsBatteryHealthModelPerformanceable)() + SetUserExperienceAnalyticsBatteryHealthOsPerformance(value []UserExperienceAnalyticsBatteryHealthOsPerformanceable)() + SetUserExperienceAnalyticsBatteryHealthRuntimeDetails(value UserExperienceAnalyticsBatteryHealthRuntimeDetailsable)() + SetUserExperienceAnalyticsCategories(value []UserExperienceAnalyticsCategoryable)() + SetUserExperienceAnalyticsDeviceMetricHistory(value []UserExperienceAnalyticsMetricHistoryable)() + SetUserExperienceAnalyticsDevicePerformance(value []UserExperienceAnalyticsDevicePerformanceable)() + SetUserExperienceAnalyticsDeviceScope(value UserExperienceAnalyticsDeviceScopeable)() + SetUserExperienceAnalyticsDeviceScopes(value []UserExperienceAnalyticsDeviceScopeable)() + SetUserExperienceAnalyticsDeviceScores(value []UserExperienceAnalyticsDeviceScoresable)() + SetUserExperienceAnalyticsDeviceStartupHistory(value []UserExperienceAnalyticsDeviceStartupHistoryable)() + SetUserExperienceAnalyticsDeviceStartupProcesses(value []UserExperienceAnalyticsDeviceStartupProcessable)() + SetUserExperienceAnalyticsDeviceStartupProcessPerformance(value []UserExperienceAnalyticsDeviceStartupProcessPerformanceable)() + SetUserExperienceAnalyticsDevicesWithoutCloudIdentity(value []UserExperienceAnalyticsDeviceWithoutCloudIdentityable)() + SetUserExperienceAnalyticsDeviceTimelineEvents(value []UserExperienceAnalyticsDeviceTimelineEventsable)() + SetUserExperienceAnalyticsImpactingProcess(value []UserExperienceAnalyticsImpactingProcessable)() + SetUserExperienceAnalyticsMetricHistory(value []UserExperienceAnalyticsMetricHistoryable)() + SetUserExperienceAnalyticsModelScores(value []UserExperienceAnalyticsModelScoresable)() + SetUserExperienceAnalyticsNotAutopilotReadyDevice(value []UserExperienceAnalyticsNotAutopilotReadyDeviceable)() + SetUserExperienceAnalyticsOverview(value UserExperienceAnalyticsOverviewable)() + SetUserExperienceAnalyticsRemoteConnection(value []UserExperienceAnalyticsRemoteConnectionable)() + SetUserExperienceAnalyticsResourcePerformance(value []UserExperienceAnalyticsResourcePerformanceable)() + SetUserExperienceAnalyticsScoreHistory(value []UserExperienceAnalyticsScoreHistoryable)() + SetUserExperienceAnalyticsSettings(value UserExperienceAnalyticsSettingsable)() + SetUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(value UserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetricable)() + SetUserExperienceAnalyticsWorkFromAnywhereMetrics(value []UserExperienceAnalyticsWorkFromAnywhereMetricable)() + SetUserExperienceAnalyticsWorkFromAnywhereModelPerformance(value []UserExperienceAnalyticsWorkFromAnywhereModelPerformanceable)() + SetUserPfxCertificates(value []UserPFXCertificateable)() + SetVirtualEndpoint(value VirtualEndpointable)() + SetWindowsAutopilotDeploymentProfiles(value []WindowsAutopilotDeploymentProfileable)() + SetWindowsAutopilotDeviceIdentities(value []WindowsAutopilotDeviceIdentityable)() + SetWindowsAutopilotSettings(value WindowsAutopilotSettingsable)() + SetWindowsDriverUpdateProfiles(value []WindowsDriverUpdateProfileable)() + SetWindowsFeatureUpdateProfiles(value []WindowsFeatureUpdateProfileable)() + SetWindowsInformationProtectionAppLearningSummaries(value []WindowsInformationProtectionAppLearningSummaryable)() + SetWindowsInformationProtectionNetworkLearningSummaries(value []WindowsInformationProtectionNetworkLearningSummaryable)() + SetWindowsMalwareInformation(value []WindowsMalwareInformationable)() + SetWindowsMalwareOverview(value WindowsMalwareOverviewable)() + SetWindowsQualityUpdateProfiles(value []WindowsQualityUpdateProfileable)() + SetWindowsUpdateCatalogItems(value []WindowsUpdateCatalogItemable)() + SetZebraFotaArtifacts(value []ZebraFotaArtifactable)() + SetZebraFotaConnector(value ZebraFotaConnectorable)() + SetZebraFotaDeployments(value []ZebraFotaDeploymentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_manangement_intent_value_type.go b/src/internal/connector/graph/betasdk/models/device_manangement_intent_value_type.go new file mode 100644 index 000000000..fcf36d356 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_manangement_intent_value_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceManangementIntentValueType int + +const ( + // The setting value is an integer + INTEGER_DEVICEMANANGEMENTINTENTVALUETYPE DeviceManangementIntentValueType = iota + // The setting value is a boolean + BOOLEAN_DEVICEMANANGEMENTINTENTVALUETYPE + // The setting value is a string + STRING_DEVICEMANANGEMENTINTENTVALUETYPE + // The setting value is a complex object + COMPLEX_DEVICEMANANGEMENTINTENTVALUETYPE + // The setting value is a collection + COLLECTION_DEVICEMANANGEMENTINTENTVALUETYPE + // The setting value is an abstract complex object + ABSTRACTCOMPLEX_DEVICEMANANGEMENTINTENTVALUETYPE +) + +func (i DeviceManangementIntentValueType) String() string { + return []string{"integer", "boolean", "string", "complex", "collection", "abstractComplex"}[i] +} +func ParseDeviceManangementIntentValueType(v string) (interface{}, error) { + result := INTEGER_DEVICEMANANGEMENTINTENTVALUETYPE + switch v { + case "integer": + result = INTEGER_DEVICEMANANGEMENTINTENTVALUETYPE + case "boolean": + result = BOOLEAN_DEVICEMANANGEMENTINTENTVALUETYPE + case "string": + result = STRING_DEVICEMANANGEMENTINTENTVALUETYPE + case "complex": + result = COMPLEX_DEVICEMANANGEMENTINTENTVALUETYPE + case "collection": + result = COLLECTION_DEVICEMANANGEMENTINTENTVALUETYPE + case "abstractComplex": + result = ABSTRACTCOMPLEX_DEVICEMANANGEMENTINTENTVALUETYPE + default: + return 0, errors.New("Unknown DeviceManangementIntentValueType value: " + v) + } + return &result, nil +} +func SerializeDeviceManangementIntentValueType(values []DeviceManangementIntentValueType) []string { + 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/device_operating_system_summary.go b/src/internal/connector/graph/betasdk/models/device_operating_system_summary.go new file mode 100644 index 000000000..f374a7b4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_operating_system_summary.go @@ -0,0 +1,487 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceOperatingSystemSummary device operating system summary. +type DeviceOperatingSystemSummary 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 count of Corporate work profile Android devices. Also known as Corporate Owned Personally Enabled (COPE). Valid values -1 to 2147483647 + androidCorporateWorkProfileCount *int32 + // Number of android device count. + androidCount *int32 + // Number of dedicated Android devices. + androidDedicatedCount *int32 + // Number of device admin Android devices. + androidDeviceAdminCount *int32 + // Number of fully managed Android devices. + androidFullyManagedCount *int32 + // Number of work profile Android devices. + androidWorkProfileCount *int32 + // Number of AOSP user-associated Android devices. Valid values 0 to 2147483647 + aospUserAssociatedCount *int32 + // Number of AOSP userless Android devices. Valid values 0 to 2147483647 + aospUserlessCount *int32 + // Number of Chrome OS devices. Valid values 0 to 2147483647 + chromeOSCount *int32 + // Number of ConfigMgr managed devices. + configMgrDeviceCount *int32 + // Number of iOS device count. + iosCount *int32 + // Number of Linux OS devices. Valid values 0 to 2147483647 + linuxCount *int32 + // Number of Mac OS X device count. + macOSCount *int32 + // The OdataType property + odataType *string + // Number of unknown device count. + unknownCount *int32 + // Number of Windows device count. + windowsCount *int32 + // Number of Windows mobile device count. + windowsMobileCount *int32 +} +// NewDeviceOperatingSystemSummary instantiates a new deviceOperatingSystemSummary and sets the default values. +func NewDeviceOperatingSystemSummary()(*DeviceOperatingSystemSummary) { + m := &DeviceOperatingSystemSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceOperatingSystemSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceOperatingSystemSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceOperatingSystemSummary(), 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 *DeviceOperatingSystemSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAndroidCorporateWorkProfileCount gets the androidCorporateWorkProfileCount property value. The count of Corporate work profile Android devices. Also known as Corporate Owned Personally Enabled (COPE). Valid values -1 to 2147483647 +func (m *DeviceOperatingSystemSummary) GetAndroidCorporateWorkProfileCount()(*int32) { + return m.androidCorporateWorkProfileCount +} +// GetAndroidCount gets the androidCount property value. Number of android device count. +func (m *DeviceOperatingSystemSummary) GetAndroidCount()(*int32) { + return m.androidCount +} +// GetAndroidDedicatedCount gets the androidDedicatedCount property value. Number of dedicated Android devices. +func (m *DeviceOperatingSystemSummary) GetAndroidDedicatedCount()(*int32) { + return m.androidDedicatedCount +} +// GetAndroidDeviceAdminCount gets the androidDeviceAdminCount property value. Number of device admin Android devices. +func (m *DeviceOperatingSystemSummary) GetAndroidDeviceAdminCount()(*int32) { + return m.androidDeviceAdminCount +} +// GetAndroidFullyManagedCount gets the androidFullyManagedCount property value. Number of fully managed Android devices. +func (m *DeviceOperatingSystemSummary) GetAndroidFullyManagedCount()(*int32) { + return m.androidFullyManagedCount +} +// GetAndroidWorkProfileCount gets the androidWorkProfileCount property value. Number of work profile Android devices. +func (m *DeviceOperatingSystemSummary) GetAndroidWorkProfileCount()(*int32) { + return m.androidWorkProfileCount +} +// GetAospUserAssociatedCount gets the aospUserAssociatedCount property value. Number of AOSP user-associated Android devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) GetAospUserAssociatedCount()(*int32) { + return m.aospUserAssociatedCount +} +// GetAospUserlessCount gets the aospUserlessCount property value. Number of AOSP userless Android devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) GetAospUserlessCount()(*int32) { + return m.aospUserlessCount +} +// GetChromeOSCount gets the chromeOSCount property value. Number of Chrome OS devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) GetChromeOSCount()(*int32) { + return m.chromeOSCount +} +// GetConfigMgrDeviceCount gets the configMgrDeviceCount property value. Number of ConfigMgr managed devices. +func (m *DeviceOperatingSystemSummary) GetConfigMgrDeviceCount()(*int32) { + return m.configMgrDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceOperatingSystemSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["androidCorporateWorkProfileCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidCorporateWorkProfileCount(val) + } + return nil + } + res["androidCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidCount(val) + } + return nil + } + res["androidDedicatedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidDedicatedCount(val) + } + return nil + } + res["androidDeviceAdminCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidDeviceAdminCount(val) + } + return nil + } + res["androidFullyManagedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidFullyManagedCount(val) + } + return nil + } + res["androidWorkProfileCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAndroidWorkProfileCount(val) + } + return nil + } + res["aospUserAssociatedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAospUserAssociatedCount(val) + } + return nil + } + res["aospUserlessCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAospUserlessCount(val) + } + return nil + } + res["chromeOSCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChromeOSCount(val) + } + return nil + } + res["configMgrDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigMgrDeviceCount(val) + } + return nil + } + res["iosCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIosCount(val) + } + return nil + } + res["linuxCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLinuxCount(val) + } + return nil + } + res["macOSCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMacOSCount(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["unknownCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownCount(val) + } + return nil + } + res["windowsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindowsCount(val) + } + return nil + } + res["windowsMobileCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindowsMobileCount(val) + } + return nil + } + return res +} +// GetIosCount gets the iosCount property value. Number of iOS device count. +func (m *DeviceOperatingSystemSummary) GetIosCount()(*int32) { + return m.iosCount +} +// GetLinuxCount gets the linuxCount property value. Number of Linux OS devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) GetLinuxCount()(*int32) { + return m.linuxCount +} +// GetMacOSCount gets the macOSCount property value. Number of Mac OS X device count. +func (m *DeviceOperatingSystemSummary) GetMacOSCount()(*int32) { + return m.macOSCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceOperatingSystemSummary) GetOdataType()(*string) { + return m.odataType +} +// GetUnknownCount gets the unknownCount property value. Number of unknown device count. +func (m *DeviceOperatingSystemSummary) GetUnknownCount()(*int32) { + return m.unknownCount +} +// GetWindowsCount gets the windowsCount property value. Number of Windows device count. +func (m *DeviceOperatingSystemSummary) GetWindowsCount()(*int32) { + return m.windowsCount +} +// GetWindowsMobileCount gets the windowsMobileCount property value. Number of Windows mobile device count. +func (m *DeviceOperatingSystemSummary) GetWindowsMobileCount()(*int32) { + return m.windowsMobileCount +} +// Serialize serializes information the current object +func (m *DeviceOperatingSystemSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("androidCorporateWorkProfileCount", m.GetAndroidCorporateWorkProfileCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("androidCount", m.GetAndroidCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("androidDedicatedCount", m.GetAndroidDedicatedCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("androidDeviceAdminCount", m.GetAndroidDeviceAdminCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("androidFullyManagedCount", m.GetAndroidFullyManagedCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("androidWorkProfileCount", m.GetAndroidWorkProfileCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("aospUserAssociatedCount", m.GetAospUserAssociatedCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("aospUserlessCount", m.GetAospUserlessCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("chromeOSCount", m.GetChromeOSCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("configMgrDeviceCount", m.GetConfigMgrDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("iosCount", m.GetIosCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("linuxCount", m.GetLinuxCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("macOSCount", m.GetMacOSCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknownCount", m.GetUnknownCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windowsCount", m.GetWindowsCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("windowsMobileCount", m.GetWindowsMobileCount()) + 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 *DeviceOperatingSystemSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAndroidCorporateWorkProfileCount sets the androidCorporateWorkProfileCount property value. The count of Corporate work profile Android devices. Also known as Corporate Owned Personally Enabled (COPE). Valid values -1 to 2147483647 +func (m *DeviceOperatingSystemSummary) SetAndroidCorporateWorkProfileCount(value *int32)() { + m.androidCorporateWorkProfileCount = value +} +// SetAndroidCount sets the androidCount property value. Number of android device count. +func (m *DeviceOperatingSystemSummary) SetAndroidCount(value *int32)() { + m.androidCount = value +} +// SetAndroidDedicatedCount sets the androidDedicatedCount property value. Number of dedicated Android devices. +func (m *DeviceOperatingSystemSummary) SetAndroidDedicatedCount(value *int32)() { + m.androidDedicatedCount = value +} +// SetAndroidDeviceAdminCount sets the androidDeviceAdminCount property value. Number of device admin Android devices. +func (m *DeviceOperatingSystemSummary) SetAndroidDeviceAdminCount(value *int32)() { + m.androidDeviceAdminCount = value +} +// SetAndroidFullyManagedCount sets the androidFullyManagedCount property value. Number of fully managed Android devices. +func (m *DeviceOperatingSystemSummary) SetAndroidFullyManagedCount(value *int32)() { + m.androidFullyManagedCount = value +} +// SetAndroidWorkProfileCount sets the androidWorkProfileCount property value. Number of work profile Android devices. +func (m *DeviceOperatingSystemSummary) SetAndroidWorkProfileCount(value *int32)() { + m.androidWorkProfileCount = value +} +// SetAospUserAssociatedCount sets the aospUserAssociatedCount property value. Number of AOSP user-associated Android devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) SetAospUserAssociatedCount(value *int32)() { + m.aospUserAssociatedCount = value +} +// SetAospUserlessCount sets the aospUserlessCount property value. Number of AOSP userless Android devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) SetAospUserlessCount(value *int32)() { + m.aospUserlessCount = value +} +// SetChromeOSCount sets the chromeOSCount property value. Number of Chrome OS devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) SetChromeOSCount(value *int32)() { + m.chromeOSCount = value +} +// SetConfigMgrDeviceCount sets the configMgrDeviceCount property value. Number of ConfigMgr managed devices. +func (m *DeviceOperatingSystemSummary) SetConfigMgrDeviceCount(value *int32)() { + m.configMgrDeviceCount = value +} +// SetIosCount sets the iosCount property value. Number of iOS device count. +func (m *DeviceOperatingSystemSummary) SetIosCount(value *int32)() { + m.iosCount = value +} +// SetLinuxCount sets the linuxCount property value. Number of Linux OS devices. Valid values 0 to 2147483647 +func (m *DeviceOperatingSystemSummary) SetLinuxCount(value *int32)() { + m.linuxCount = value +} +// SetMacOSCount sets the macOSCount property value. Number of Mac OS X device count. +func (m *DeviceOperatingSystemSummary) SetMacOSCount(value *int32)() { + m.macOSCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceOperatingSystemSummary) SetOdataType(value *string)() { + m.odataType = value +} +// SetUnknownCount sets the unknownCount property value. Number of unknown device count. +func (m *DeviceOperatingSystemSummary) SetUnknownCount(value *int32)() { + m.unknownCount = value +} +// SetWindowsCount sets the windowsCount property value. Number of Windows device count. +func (m *DeviceOperatingSystemSummary) SetWindowsCount(value *int32)() { + m.windowsCount = value +} +// SetWindowsMobileCount sets the windowsMobileCount property value. Number of Windows mobile device count. +func (m *DeviceOperatingSystemSummary) SetWindowsMobileCount(value *int32)() { + m.windowsMobileCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_operating_system_summaryable.go b/src/internal/connector/graph/betasdk/models/device_operating_system_summaryable.go new file mode 100644 index 000000000..ce6ef1952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_operating_system_summaryable.go @@ -0,0 +1,45 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceOperatingSystemSummaryable +type DeviceOperatingSystemSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAndroidCorporateWorkProfileCount()(*int32) + GetAndroidCount()(*int32) + GetAndroidDedicatedCount()(*int32) + GetAndroidDeviceAdminCount()(*int32) + GetAndroidFullyManagedCount()(*int32) + GetAndroidWorkProfileCount()(*int32) + GetAospUserAssociatedCount()(*int32) + GetAospUserlessCount()(*int32) + GetChromeOSCount()(*int32) + GetConfigMgrDeviceCount()(*int32) + GetIosCount()(*int32) + GetLinuxCount()(*int32) + GetMacOSCount()(*int32) + GetOdataType()(*string) + GetUnknownCount()(*int32) + GetWindowsCount()(*int32) + GetWindowsMobileCount()(*int32) + SetAndroidCorporateWorkProfileCount(value *int32)() + SetAndroidCount(value *int32)() + SetAndroidDedicatedCount(value *int32)() + SetAndroidDeviceAdminCount(value *int32)() + SetAndroidFullyManagedCount(value *int32)() + SetAndroidWorkProfileCount(value *int32)() + SetAospUserAssociatedCount(value *int32)() + SetAospUserlessCount(value *int32)() + SetChromeOSCount(value *int32)() + SetConfigMgrDeviceCount(value *int32)() + SetIosCount(value *int32)() + SetLinuxCount(value *int32)() + SetMacOSCount(value *int32)() + SetOdataType(value *string)() + SetUnknownCount(value *int32)() + SetWindowsCount(value *int32)() + SetWindowsMobileCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_platform_type.go b/src/internal/connector/graph/betasdk/models/device_platform_type.go new file mode 100644 index 000000000..d0a54351f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_platform_type.go @@ -0,0 +1,68 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DevicePlatformType int + +const ( + // Android. + ANDROID_DEVICEPLATFORMTYPE DevicePlatformType = iota + // AndroidForWork. + ANDROIDFORWORK_DEVICEPLATFORMTYPE + // iOS. + IOS_DEVICEPLATFORMTYPE + // MacOS. + MACOS_DEVICEPLATFORMTYPE + // WindowsPhone 8.1. + WINDOWSPHONE81_DEVICEPLATFORMTYPE + // Windows 8.1 and later + WINDOWS81ANDLATER_DEVICEPLATFORMTYPE + // Windows 10 and later. + WINDOWS10ANDLATER_DEVICEPLATFORMTYPE + // Android Work Profile. + ANDROIDWORKPROFILE_DEVICEPLATFORMTYPE + // Unknown. + UNKNOWN_DEVICEPLATFORMTYPE + // Android AOSP. + ANDROIDAOSP_DEVICEPLATFORMTYPE +) + +func (i DevicePlatformType) String() string { + return []string{"android", "androidForWork", "iOS", "macOS", "windowsPhone81", "windows81AndLater", "windows10AndLater", "androidWorkProfile", "unknown", "androidAOSP"}[i] +} +func ParseDevicePlatformType(v string) (interface{}, error) { + result := ANDROID_DEVICEPLATFORMTYPE + switch v { + case "android": + result = ANDROID_DEVICEPLATFORMTYPE + case "androidForWork": + result = ANDROIDFORWORK_DEVICEPLATFORMTYPE + case "iOS": + result = IOS_DEVICEPLATFORMTYPE + case "macOS": + result = MACOS_DEVICEPLATFORMTYPE + case "windowsPhone81": + result = WINDOWSPHONE81_DEVICEPLATFORMTYPE + case "windows81AndLater": + result = WINDOWS81ANDLATER_DEVICEPLATFORMTYPE + case "windows10AndLater": + result = WINDOWS10ANDLATER_DEVICEPLATFORMTYPE + case "androidWorkProfile": + result = ANDROIDWORKPROFILE_DEVICEPLATFORMTYPE + case "unknown": + result = UNKNOWN_DEVICEPLATFORMTYPE + case "androidAOSP": + result = ANDROIDAOSP_DEVICEPLATFORMTYPE + default: + return 0, errors.New("Unknown DevicePlatformType value: " + v) + } + return &result, nil +} +func SerializeDevicePlatformType(values []DevicePlatformType) []string { + 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/device_protection_overview.go b/src/internal/connector/graph/betasdk/models/device_protection_overview.go new file mode 100644 index 000000000..bb68f8490 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_protection_overview.go @@ -0,0 +1,357 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceProtectionOverview hardware information of a given device. +type DeviceProtectionOverview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Clean device count. + cleanDeviceCount *int32 + // Critical failures device count. + criticalFailuresDeviceCount *int32 + // Device with inactive threat agent count + inactiveThreatAgentDeviceCount *int32 + // The OdataType property + odataType *string + // Pending full scan device count. + pendingFullScanDeviceCount *int32 + // Pending manual steps device count. + pendingManualStepsDeviceCount *int32 + // Pending offline scan device count. + pendingOfflineScanDeviceCount *int32 + // Pending quick scan device count. Valid values -2147483648 to 2147483647 + pendingQuickScanDeviceCount *int32 + // Pending restart device count. + pendingRestartDeviceCount *int32 + // Device with old signature count. + pendingSignatureUpdateDeviceCount *int32 + // Total device count. + totalReportedDeviceCount *int32 + // Device with threat agent state as unknown count. + unknownStateThreatAgentDeviceCount *int32 +} +// NewDeviceProtectionOverview instantiates a new deviceProtectionOverview and sets the default values. +func NewDeviceProtectionOverview()(*DeviceProtectionOverview) { + m := &DeviceProtectionOverview{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDeviceProtectionOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceProtectionOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceProtectionOverview(), 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 *DeviceProtectionOverview) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCleanDeviceCount gets the cleanDeviceCount property value. Clean device count. +func (m *DeviceProtectionOverview) GetCleanDeviceCount()(*int32) { + return m.cleanDeviceCount +} +// GetCriticalFailuresDeviceCount gets the criticalFailuresDeviceCount property value. Critical failures device count. +func (m *DeviceProtectionOverview) GetCriticalFailuresDeviceCount()(*int32) { + return m.criticalFailuresDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceProtectionOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cleanDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCleanDeviceCount(val) + } + return nil + } + res["criticalFailuresDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCriticalFailuresDeviceCount(val) + } + return nil + } + res["inactiveThreatAgentDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInactiveThreatAgentDeviceCount(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["pendingFullScanDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingFullScanDeviceCount(val) + } + return nil + } + res["pendingManualStepsDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingManualStepsDeviceCount(val) + } + return nil + } + res["pendingOfflineScanDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingOfflineScanDeviceCount(val) + } + return nil + } + res["pendingQuickScanDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingQuickScanDeviceCount(val) + } + return nil + } + res["pendingRestartDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingRestartDeviceCount(val) + } + return nil + } + res["pendingSignatureUpdateDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingSignatureUpdateDeviceCount(val) + } + return nil + } + res["totalReportedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalReportedDeviceCount(val) + } + return nil + } + res["unknownStateThreatAgentDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownStateThreatAgentDeviceCount(val) + } + return nil + } + return res +} +// GetInactiveThreatAgentDeviceCount gets the inactiveThreatAgentDeviceCount property value. Device with inactive threat agent count +func (m *DeviceProtectionOverview) GetInactiveThreatAgentDeviceCount()(*int32) { + return m.inactiveThreatAgentDeviceCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DeviceProtectionOverview) GetOdataType()(*string) { + return m.odataType +} +// GetPendingFullScanDeviceCount gets the pendingFullScanDeviceCount property value. Pending full scan device count. +func (m *DeviceProtectionOverview) GetPendingFullScanDeviceCount()(*int32) { + return m.pendingFullScanDeviceCount +} +// GetPendingManualStepsDeviceCount gets the pendingManualStepsDeviceCount property value. Pending manual steps device count. +func (m *DeviceProtectionOverview) GetPendingManualStepsDeviceCount()(*int32) { + return m.pendingManualStepsDeviceCount +} +// GetPendingOfflineScanDeviceCount gets the pendingOfflineScanDeviceCount property value. Pending offline scan device count. +func (m *DeviceProtectionOverview) GetPendingOfflineScanDeviceCount()(*int32) { + return m.pendingOfflineScanDeviceCount +} +// GetPendingQuickScanDeviceCount gets the pendingQuickScanDeviceCount property value. Pending quick scan device count. Valid values -2147483648 to 2147483647 +func (m *DeviceProtectionOverview) GetPendingQuickScanDeviceCount()(*int32) { + return m.pendingQuickScanDeviceCount +} +// GetPendingRestartDeviceCount gets the pendingRestartDeviceCount property value. Pending restart device count. +func (m *DeviceProtectionOverview) GetPendingRestartDeviceCount()(*int32) { + return m.pendingRestartDeviceCount +} +// GetPendingSignatureUpdateDeviceCount gets the pendingSignatureUpdateDeviceCount property value. Device with old signature count. +func (m *DeviceProtectionOverview) GetPendingSignatureUpdateDeviceCount()(*int32) { + return m.pendingSignatureUpdateDeviceCount +} +// GetTotalReportedDeviceCount gets the totalReportedDeviceCount property value. Total device count. +func (m *DeviceProtectionOverview) GetTotalReportedDeviceCount()(*int32) { + return m.totalReportedDeviceCount +} +// GetUnknownStateThreatAgentDeviceCount gets the unknownStateThreatAgentDeviceCount property value. Device with threat agent state as unknown count. +func (m *DeviceProtectionOverview) GetUnknownStateThreatAgentDeviceCount()(*int32) { + return m.unknownStateThreatAgentDeviceCount +} +// Serialize serializes information the current object +func (m *DeviceProtectionOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("cleanDeviceCount", m.GetCleanDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("criticalFailuresDeviceCount", m.GetCriticalFailuresDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("inactiveThreatAgentDeviceCount", m.GetInactiveThreatAgentDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingFullScanDeviceCount", m.GetPendingFullScanDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingManualStepsDeviceCount", m.GetPendingManualStepsDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingOfflineScanDeviceCount", m.GetPendingOfflineScanDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingQuickScanDeviceCount", m.GetPendingQuickScanDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingRestartDeviceCount", m.GetPendingRestartDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pendingSignatureUpdateDeviceCount", m.GetPendingSignatureUpdateDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalReportedDeviceCount", m.GetTotalReportedDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("unknownStateThreatAgentDeviceCount", m.GetUnknownStateThreatAgentDeviceCount()) + 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 *DeviceProtectionOverview) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCleanDeviceCount sets the cleanDeviceCount property value. Clean device count. +func (m *DeviceProtectionOverview) SetCleanDeviceCount(value *int32)() { + m.cleanDeviceCount = value +} +// SetCriticalFailuresDeviceCount sets the criticalFailuresDeviceCount property value. Critical failures device count. +func (m *DeviceProtectionOverview) SetCriticalFailuresDeviceCount(value *int32)() { + m.criticalFailuresDeviceCount = value +} +// SetInactiveThreatAgentDeviceCount sets the inactiveThreatAgentDeviceCount property value. Device with inactive threat agent count +func (m *DeviceProtectionOverview) SetInactiveThreatAgentDeviceCount(value *int32)() { + m.inactiveThreatAgentDeviceCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DeviceProtectionOverview) SetOdataType(value *string)() { + m.odataType = value +} +// SetPendingFullScanDeviceCount sets the pendingFullScanDeviceCount property value. Pending full scan device count. +func (m *DeviceProtectionOverview) SetPendingFullScanDeviceCount(value *int32)() { + m.pendingFullScanDeviceCount = value +} +// SetPendingManualStepsDeviceCount sets the pendingManualStepsDeviceCount property value. Pending manual steps device count. +func (m *DeviceProtectionOverview) SetPendingManualStepsDeviceCount(value *int32)() { + m.pendingManualStepsDeviceCount = value +} +// SetPendingOfflineScanDeviceCount sets the pendingOfflineScanDeviceCount property value. Pending offline scan device count. +func (m *DeviceProtectionOverview) SetPendingOfflineScanDeviceCount(value *int32)() { + m.pendingOfflineScanDeviceCount = value +} +// SetPendingQuickScanDeviceCount sets the pendingQuickScanDeviceCount property value. Pending quick scan device count. Valid values -2147483648 to 2147483647 +func (m *DeviceProtectionOverview) SetPendingQuickScanDeviceCount(value *int32)() { + m.pendingQuickScanDeviceCount = value +} +// SetPendingRestartDeviceCount sets the pendingRestartDeviceCount property value. Pending restart device count. +func (m *DeviceProtectionOverview) SetPendingRestartDeviceCount(value *int32)() { + m.pendingRestartDeviceCount = value +} +// SetPendingSignatureUpdateDeviceCount sets the pendingSignatureUpdateDeviceCount property value. Device with old signature count. +func (m *DeviceProtectionOverview) SetPendingSignatureUpdateDeviceCount(value *int32)() { + m.pendingSignatureUpdateDeviceCount = value +} +// SetTotalReportedDeviceCount sets the totalReportedDeviceCount property value. Total device count. +func (m *DeviceProtectionOverview) SetTotalReportedDeviceCount(value *int32)() { + m.totalReportedDeviceCount = value +} +// SetUnknownStateThreatAgentDeviceCount sets the unknownStateThreatAgentDeviceCount property value. Device with threat agent state as unknown count. +func (m *DeviceProtectionOverview) SetUnknownStateThreatAgentDeviceCount(value *int32)() { + m.unknownStateThreatAgentDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_protection_overviewable.go b/src/internal/connector/graph/betasdk/models/device_protection_overviewable.go new file mode 100644 index 000000000..80c7ee651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_protection_overviewable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceProtectionOverviewable +type DeviceProtectionOverviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCleanDeviceCount()(*int32) + GetCriticalFailuresDeviceCount()(*int32) + GetInactiveThreatAgentDeviceCount()(*int32) + GetOdataType()(*string) + GetPendingFullScanDeviceCount()(*int32) + GetPendingManualStepsDeviceCount()(*int32) + GetPendingOfflineScanDeviceCount()(*int32) + GetPendingQuickScanDeviceCount()(*int32) + GetPendingRestartDeviceCount()(*int32) + GetPendingSignatureUpdateDeviceCount()(*int32) + GetTotalReportedDeviceCount()(*int32) + GetUnknownStateThreatAgentDeviceCount()(*int32) + SetCleanDeviceCount(value *int32)() + SetCriticalFailuresDeviceCount(value *int32)() + SetInactiveThreatAgentDeviceCount(value *int32)() + SetOdataType(value *string)() + SetPendingFullScanDeviceCount(value *int32)() + SetPendingManualStepsDeviceCount(value *int32)() + SetPendingOfflineScanDeviceCount(value *int32)() + SetPendingQuickScanDeviceCount(value *int32)() + SetPendingRestartDeviceCount(value *int32)() + SetPendingSignatureUpdateDeviceCount(value *int32)() + SetTotalReportedDeviceCount(value *int32)() + SetUnknownStateThreatAgentDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_registration_policy.go b/src/internal/connector/graph/betasdk/models/device_registration_policy.go new file mode 100644 index 000000000..0fbd96bcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_registration_policy.go @@ -0,0 +1,191 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceRegistrationPolicy +type DeviceRegistrationPolicy struct { + Entity + // Specifies the authorization policy for controlling registration of new devices using Azure AD Join within your organization. Required. For more information, see What is a device identity?. + azureADJoin AzureAdJoinPolicyable + // Specifies the authorization policy for controlling registration of new devices using Azure AD registered within your organization. Required. For more information, see What is a device identity?. + azureADRegistration AzureADRegistrationPolicyable + // The description of the device registration policy. It is always set to Tenant-wide policy that manages intial provisioning controls using quota restrictions, additional authentication and authorization checks. Read-only. + description *string + // The name of the device registration policy. It is always set to Device Registration Policy. Read-only. + displayName *string + // The multiFactorAuthConfiguration property + multiFactorAuthConfiguration *MultiFactorAuthConfiguration + // Specifies the maximum number of devices that a user can have within your organization before blocking new device registrations. The default value is set to 50. If this property is not specified during the policy update operation, it is automatically reset to 0 to indicate that users are not allowed to join any devices. + userDeviceQuota *int32 +} +// NewDeviceRegistrationPolicy instantiates a new DeviceRegistrationPolicy and sets the default values. +func NewDeviceRegistrationPolicy()(*DeviceRegistrationPolicy) { + m := &DeviceRegistrationPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceRegistrationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceRegistrationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceRegistrationPolicy(), nil +} +// GetAzureADJoin gets the azureADJoin property value. Specifies the authorization policy for controlling registration of new devices using Azure AD Join within your organization. Required. For more information, see What is a device identity?. +func (m *DeviceRegistrationPolicy) GetAzureADJoin()(AzureAdJoinPolicyable) { + return m.azureADJoin +} +// GetAzureADRegistration gets the azureADRegistration property value. Specifies the authorization policy for controlling registration of new devices using Azure AD registered within your organization. Required. For more information, see What is a device identity?. +func (m *DeviceRegistrationPolicy) GetAzureADRegistration()(AzureADRegistrationPolicyable) { + return m.azureADRegistration +} +// GetDescription gets the description property value. The description of the device registration policy. It is always set to Tenant-wide policy that manages intial provisioning controls using quota restrictions, additional authentication and authorization checks. Read-only. +func (m *DeviceRegistrationPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of the device registration policy. It is always set to Device Registration Policy. Read-only. +func (m *DeviceRegistrationPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceRegistrationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["azureADJoin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAzureAdJoinPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAzureADJoin(val.(AzureAdJoinPolicyable)) + } + return nil + } + res["azureADRegistration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAzureADRegistrationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAzureADRegistration(val.(AzureADRegistrationPolicyable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["multiFactorAuthConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMultiFactorAuthConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetMultiFactorAuthConfiguration(val.(*MultiFactorAuthConfiguration)) + } + return nil + } + res["userDeviceQuota"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserDeviceQuota(val) + } + return nil + } + return res +} +// GetMultiFactorAuthConfiguration gets the multiFactorAuthConfiguration property value. The multiFactorAuthConfiguration property +func (m *DeviceRegistrationPolicy) GetMultiFactorAuthConfiguration()(*MultiFactorAuthConfiguration) { + return m.multiFactorAuthConfiguration +} +// GetUserDeviceQuota gets the userDeviceQuota property value. Specifies the maximum number of devices that a user can have within your organization before blocking new device registrations. The default value is set to 50. If this property is not specified during the policy update operation, it is automatically reset to 0 to indicate that users are not allowed to join any devices. +func (m *DeviceRegistrationPolicy) GetUserDeviceQuota()(*int32) { + return m.userDeviceQuota +} +// Serialize serializes information the current object +func (m *DeviceRegistrationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("azureADJoin", m.GetAzureADJoin()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("azureADRegistration", m.GetAzureADRegistration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetMultiFactorAuthConfiguration() != nil { + cast := (*m.GetMultiFactorAuthConfiguration()).String() + err = writer.WriteStringValue("multiFactorAuthConfiguration", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("userDeviceQuota", m.GetUserDeviceQuota()) + if err != nil { + return err + } + } + return nil +} +// SetAzureADJoin sets the azureADJoin property value. Specifies the authorization policy for controlling registration of new devices using Azure AD Join within your organization. Required. For more information, see What is a device identity?. +func (m *DeviceRegistrationPolicy) SetAzureADJoin(value AzureAdJoinPolicyable)() { + m.azureADJoin = value +} +// SetAzureADRegistration sets the azureADRegistration property value. Specifies the authorization policy for controlling registration of new devices using Azure AD registered within your organization. Required. For more information, see What is a device identity?. +func (m *DeviceRegistrationPolicy) SetAzureADRegistration(value AzureADRegistrationPolicyable)() { + m.azureADRegistration = value +} +// SetDescription sets the description property value. The description of the device registration policy. It is always set to Tenant-wide policy that manages intial provisioning controls using quota restrictions, additional authentication and authorization checks. Read-only. +func (m *DeviceRegistrationPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of the device registration policy. It is always set to Device Registration Policy. Read-only. +func (m *DeviceRegistrationPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetMultiFactorAuthConfiguration sets the multiFactorAuthConfiguration property value. The multiFactorAuthConfiguration property +func (m *DeviceRegistrationPolicy) SetMultiFactorAuthConfiguration(value *MultiFactorAuthConfiguration)() { + m.multiFactorAuthConfiguration = value +} +// SetUserDeviceQuota sets the userDeviceQuota property value. Specifies the maximum number of devices that a user can have within your organization before blocking new device registrations. The default value is set to 50. If this property is not specified during the policy update operation, it is automatically reset to 0 to indicate that users are not allowed to join any devices. +func (m *DeviceRegistrationPolicy) SetUserDeviceQuota(value *int32)() { + m.userDeviceQuota = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_registration_policyable.go b/src/internal/connector/graph/betasdk/models/device_registration_policyable.go new file mode 100644 index 000000000..ea50fedca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_registration_policyable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceRegistrationPolicyable +type DeviceRegistrationPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureADJoin()(AzureAdJoinPolicyable) + GetAzureADRegistration()(AzureADRegistrationPolicyable) + GetDescription()(*string) + GetDisplayName()(*string) + GetMultiFactorAuthConfiguration()(*MultiFactorAuthConfiguration) + GetUserDeviceQuota()(*int32) + SetAzureADJoin(value AzureAdJoinPolicyable)() + SetAzureADRegistration(value AzureADRegistrationPolicyable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetMultiFactorAuthConfiguration(value *MultiFactorAuthConfiguration)() + SetUserDeviceQuota(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_registration_state.go b/src/internal/connector/graph/betasdk/models/device_registration_state.go new file mode 100644 index 000000000..f89e51f01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_registration_state.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceRegistrationState int + +const ( + // The device is not registered. + NOTREGISTERED_DEVICEREGISTRATIONSTATE DeviceRegistrationState = iota + // The device is registered. + REGISTERED_DEVICEREGISTRATIONSTATE + // The device has been blocked, wiped or retired. + REVOKED_DEVICEREGISTRATIONSTATE + // The device has a key conflict. + KEYCONFLICT_DEVICEREGISTRATIONSTATE + // The device is pending approval. + APPROVALPENDING_DEVICEREGISTRATIONSTATE + // The device certificate has been reset. + CERTIFICATERESET_DEVICEREGISTRATIONSTATE + // The device is not registered and pending enrollment. + NOTREGISTEREDPENDINGENROLLMENT_DEVICEREGISTRATIONSTATE + // The device registration status is unknown. + UNKNOWN_DEVICEREGISTRATIONSTATE +) + +func (i DeviceRegistrationState) String() string { + return []string{"notRegistered", "registered", "revoked", "keyConflict", "approvalPending", "certificateReset", "notRegisteredPendingEnrollment", "unknown"}[i] +} +func ParseDeviceRegistrationState(v string) (interface{}, error) { + result := NOTREGISTERED_DEVICEREGISTRATIONSTATE + switch v { + case "notRegistered": + result = NOTREGISTERED_DEVICEREGISTRATIONSTATE + case "registered": + result = REGISTERED_DEVICEREGISTRATIONSTATE + case "revoked": + result = REVOKED_DEVICEREGISTRATIONSTATE + case "keyConflict": + result = KEYCONFLICT_DEVICEREGISTRATIONSTATE + case "approvalPending": + result = APPROVALPENDING_DEVICEREGISTRATIONSTATE + case "certificateReset": + result = CERTIFICATERESET_DEVICEREGISTRATIONSTATE + case "notRegisteredPendingEnrollment": + result = NOTREGISTEREDPENDINGENROLLMENT_DEVICEREGISTRATIONSTATE + case "unknown": + result = UNKNOWN_DEVICEREGISTRATIONSTATE + default: + return 0, errors.New("Unknown DeviceRegistrationState value: " + v) + } + return &result, nil +} +func SerializeDeviceRegistrationState(values []DeviceRegistrationState) []string { + 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/device_restriction_action.go b/src/internal/connector/graph/betasdk/models/device_restriction_action.go new file mode 100644 index 000000000..39df101a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_restriction_action.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceRestrictionAction +type DeviceRestrictionAction struct { + DlpActionInfo + // The message property + message *string + // The restrictionAction property + restrictionAction *RestrictionAction + // The triggers property + triggers []RestrictionTrigger +} +// NewDeviceRestrictionAction instantiates a new DeviceRestrictionAction and sets the default values. +func NewDeviceRestrictionAction()(*DeviceRestrictionAction) { + m := &DeviceRestrictionAction{ + DlpActionInfo: *NewDlpActionInfo(), + } + return m +} +// CreateDeviceRestrictionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceRestrictionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceRestrictionAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceRestrictionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DlpActionInfo.GetFieldDeserializers() + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["restrictionAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRestrictionAction) + if err != nil { + return err + } + if val != nil { + m.SetRestrictionAction(val.(*RestrictionAction)) + } + return nil + } + res["triggers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRestrictionTrigger) + if err != nil { + return err + } + if val != nil { + res := make([]RestrictionTrigger, len(val)) + for i, v := range val { + res[i] = *(v.(*RestrictionTrigger)) + } + m.SetTriggers(res) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +func (m *DeviceRestrictionAction) GetMessage()(*string) { + return m.message +} +// GetRestrictionAction gets the restrictionAction property value. The restrictionAction property +func (m *DeviceRestrictionAction) GetRestrictionAction()(*RestrictionAction) { + return m.restrictionAction +} +// GetTriggers gets the triggers property value. The triggers property +func (m *DeviceRestrictionAction) GetTriggers()([]RestrictionTrigger) { + return m.triggers +} +// Serialize serializes information the current object +func (m *DeviceRestrictionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DlpActionInfo.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + if m.GetRestrictionAction() != nil { + cast := (*m.GetRestrictionAction()).String() + err = writer.WriteStringValue("restrictionAction", &cast) + if err != nil { + return err + } + } + if m.GetTriggers() != nil { + err = writer.WriteCollectionOfStringValues("triggers", SerializeRestrictionTrigger(m.GetTriggers())) + if err != nil { + return err + } + } + return nil +} +// SetMessage sets the message property value. The message property +func (m *DeviceRestrictionAction) SetMessage(value *string)() { + m.message = value +} +// SetRestrictionAction sets the restrictionAction property value. The restrictionAction property +func (m *DeviceRestrictionAction) SetRestrictionAction(value *RestrictionAction)() { + m.restrictionAction = value +} +// SetTriggers sets the triggers property value. The triggers property +func (m *DeviceRestrictionAction) SetTriggers(value []RestrictionTrigger)() { + m.triggers = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_restriction_actionable.go b/src/internal/connector/graph/betasdk/models/device_restriction_actionable.go new file mode 100644 index 000000000..f2d9c44ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_restriction_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceRestrictionActionable +type DeviceRestrictionActionable interface { + DlpActionInfoable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(*string) + GetRestrictionAction()(*RestrictionAction) + GetTriggers()([]RestrictionTrigger) + SetMessage(value *string)() + SetRestrictionAction(value *RestrictionAction)() + SetTriggers(value []RestrictionTrigger)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_scope_operator.go b/src/internal/connector/graph/betasdk/models/device_scope_operator.go new file mode 100644 index 000000000..000fa71b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_scope_operator.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceScopeOperator int + +const ( + // No operator set for the device scope configuration. + NONE_DEVICESCOPEOPERATOR DeviceScopeOperator = iota + // Operator for the device configuration query to be used (Equals). + EQUALS_DEVICESCOPEOPERATOR + // Placeholder value for future expansion enums such as notEquals, contains, notContains, greaterThan, lessThan. + UNKNOWNFUTUREVALUE_DEVICESCOPEOPERATOR +) + +func (i DeviceScopeOperator) String() string { + return []string{"none", "equals", "unknownFutureValue"}[i] +} +func ParseDeviceScopeOperator(v string) (interface{}, error) { + result := NONE_DEVICESCOPEOPERATOR + switch v { + case "none": + result = NONE_DEVICESCOPEOPERATOR + case "equals": + result = EQUALS_DEVICESCOPEOPERATOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICESCOPEOPERATOR + default: + return 0, errors.New("Unknown DeviceScopeOperator value: " + v) + } + return &result, nil +} +func SerializeDeviceScopeOperator(values []DeviceScopeOperator) []string { + 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/device_scope_parameter.go b/src/internal/connector/graph/betasdk/models/device_scope_parameter.go new file mode 100644 index 000000000..a029c5f42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_scope_parameter.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceScopeParameter int + +const ( + // Device Scope parameter is not set + NONE_DEVICESCOPEPARAMETER DeviceScopeParameter = iota + // use Scope Tag as parameter for the device scope configuration. + SCOPETAG_DEVICESCOPEPARAMETER + // Placeholder value for future expansion. + UNKNOWNFUTUREVALUE_DEVICESCOPEPARAMETER +) + +func (i DeviceScopeParameter) String() string { + return []string{"none", "scopeTag", "unknownFutureValue"}[i] +} +func ParseDeviceScopeParameter(v string) (interface{}, error) { + result := NONE_DEVICESCOPEPARAMETER + switch v { + case "none": + result = NONE_DEVICESCOPEPARAMETER + case "scopeTag": + result = SCOPETAG_DEVICESCOPEPARAMETER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICESCOPEPARAMETER + default: + return 0, errors.New("Unknown DeviceScopeParameter value: " + v) + } + return &result, nil +} +func SerializeDeviceScopeParameter(values []DeviceScopeParameter) []string { + 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/device_scope_status.go b/src/internal/connector/graph/betasdk/models/device_scope_status.go new file mode 100644 index 000000000..5185016a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_scope_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceScopeStatus int + +const ( + // Indicates the device scope is not enabled and there are no calculations in progress. + NONE_DEVICESCOPESTATUS DeviceScopeStatus = iota + // Indicates the device scope is enabled and report metrics data are being recalculated by the service. + COMPUTING_DEVICESCOPESTATUS + // Indicates the device scope is enabled but there is insufficient data to calculate results. The system requires information from at least 5 devices before calculations can occur. + INSUFFICIENTDATA_DEVICESCOPESTATUS + // Device scope is enabled and finished recalculating the report metric. Device scope is now ready to be used. + COMPLETED_DEVICESCOPESTATUS + // Placeholder value for future expansion. + UNKNOWNFUTUREVALUE_DEVICESCOPESTATUS +) + +func (i DeviceScopeStatus) String() string { + return []string{"none", "computing", "insufficientData", "completed", "unknownFutureValue"}[i] +} +func ParseDeviceScopeStatus(v string) (interface{}, error) { + result := NONE_DEVICESCOPESTATUS + switch v { + case "none": + result = NONE_DEVICESCOPESTATUS + case "computing": + result = COMPUTING_DEVICESCOPESTATUS + case "insufficientData": + result = INSUFFICIENTDATA_DEVICESCOPESTATUS + case "completed": + result = COMPLETED_DEVICESCOPESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICESCOPESTATUS + default: + return 0, errors.New("Unknown DeviceScopeStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceScopeStatus(values []DeviceScopeStatus) []string { + 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/device_setup_configuration.go b/src/internal/connector/graph/betasdk/models/device_setup_configuration.go new file mode 100644 index 000000000..7d202db59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_setup_configuration.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceSetupConfiguration +type DeviceSetupConfiguration struct { + Entity + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the Device Configuration. + description *string + // Admin provided name of the device configuration. + displayName *string + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Version of the device configuration. + version *int32 +} +// NewDeviceSetupConfiguration instantiates a new DeviceSetupConfiguration and sets the default values. +func NewDeviceSetupConfiguration()(*DeviceSetupConfiguration) { + m := &DeviceSetupConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceSetupConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceSetupConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceSetupConfiguration(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *DeviceSetupConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceSetupConfiguration) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceSetupConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceSetupConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceSetupConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetVersion gets the version property value. Version of the device configuration. +func (m *DeviceSetupConfiguration) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *DeviceSetupConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *DeviceSetupConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the Device Configuration. +func (m *DeviceSetupConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *DeviceSetupConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *DeviceSetupConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetVersion sets the version property value. Version of the device configuration. +func (m *DeviceSetupConfiguration) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_setup_configurationable.go b/src/internal/connector/graph/betasdk/models/device_setup_configurationable.go new file mode 100644 index 000000000..5e4381b64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_setup_configurationable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceSetupConfigurationable +type DeviceSetupConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVersion()(*int32) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_shell_script.go b/src/internal/connector/graph/betasdk/models/device_shell_script.go new file mode 100644 index 000000000..540cbc688 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_shell_script.go @@ -0,0 +1,476 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceShellScript intune will provide customer the ability to run their Shell scripts on the enrolled Mac OS devices. The script can be run once or periodically. +type DeviceShellScript struct { + Entity + // The list of group assignments for the device management script. + assignments []DeviceManagementScriptAssignmentable + // Does not notify the user a script is being executed + blockExecutionNotifications *bool + // The date and time the device management script was created. This property is read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional description for the device management script. + description *string + // List of run states for this script across all devices. + deviceRunStates []DeviceManagementScriptDeviceStateable + // Name of the device management script. + displayName *string + // The interval for script to run. If not defined the script will run once + executionFrequency *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Script file name. + fileName *string + // The list of group assignments for the device management script. + groupAssignments []DeviceManagementScriptGroupAssignmentable + // The date and time the device management script was last modified. This property is read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of times for the script to be retried if it fails + retryCount *int32 + // List of Scope Tag IDs for this PowerShellScript instance. + roleScopeTagIds []string + // Indicates the type of execution context the app runs in. + runAsAccount *RunAsAccountType + // Run summary for device management script. + runSummary DeviceManagementScriptRunSummaryable + // The script content. + scriptContent []byte + // List of run states for this script across all users. + userRunStates []DeviceManagementScriptUserStateable +} +// NewDeviceShellScript instantiates a new deviceShellScript and sets the default values. +func NewDeviceShellScript()(*DeviceShellScript) { + m := &DeviceShellScript{ + Entity: *NewEntity(), + } + return m +} +// CreateDeviceShellScriptFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceShellScriptFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceShellScript(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceShellScript) GetAssignments()([]DeviceManagementScriptAssignmentable) { + return m.assignments +} +// GetBlockExecutionNotifications gets the blockExecutionNotifications property value. Does not notify the user a script is being executed +func (m *DeviceShellScript) GetBlockExecutionNotifications()(*bool) { + return m.blockExecutionNotifications +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceShellScript) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Optional description for the device management script. +func (m *DeviceShellScript) GetDescription()(*string) { + return m.description +} +// GetDeviceRunStates gets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceShellScript) GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) { + return m.deviceRunStates +} +// GetDisplayName gets the displayName property value. Name of the device management script. +func (m *DeviceShellScript) GetDisplayName()(*string) { + return m.displayName +} +// GetExecutionFrequency gets the executionFrequency property value. The interval for script to run. If not defined the script will run once +func (m *DeviceShellScript) GetExecutionFrequency()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.executionFrequency +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceShellScript) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["blockExecutionNotifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockExecutionNotifications(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptDeviceStateable) + } + m.SetDeviceRunStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["executionFrequency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetExecutionFrequency(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["groupAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptGroupAssignmentable) + } + m.SetGroupAssignments(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["retryCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRetryCount(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["runAsAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunAsAccountType) + if err != nil { + return err + } + if val != nil { + m.SetRunAsAccount(val.(*RunAsAccountType)) + } + return nil + } + res["runSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementScriptRunSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRunSummary(val.(DeviceManagementScriptRunSummaryable)) + } + return nil + } + res["scriptContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetScriptContent(val) + } + return nil + } + res["userRunStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceManagementScriptUserStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceManagementScriptUserStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceManagementScriptUserStateable) + } + m.SetUserRunStates(res) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. Script file name. +func (m *DeviceShellScript) GetFileName()(*string) { + return m.fileName +} +// GetGroupAssignments gets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceShellScript) GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) { + return m.groupAssignments +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceShellScript) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRetryCount gets the retryCount property value. Number of times for the script to be retried if it fails +func (m *DeviceShellScript) GetRetryCount()(*int32) { + return m.retryCount +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceShellScript) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRunAsAccount gets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceShellScript) GetRunAsAccount()(*RunAsAccountType) { + return m.runAsAccount +} +// GetRunSummary gets the runSummary property value. Run summary for device management script. +func (m *DeviceShellScript) GetRunSummary()(DeviceManagementScriptRunSummaryable) { + return m.runSummary +} +// GetScriptContent gets the scriptContent property value. The script content. +func (m *DeviceShellScript) GetScriptContent()([]byte) { + return m.scriptContent +} +// GetUserRunStates gets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceShellScript) GetUserRunStates()([]DeviceManagementScriptUserStateable) { + return m.userRunStates +} +// Serialize serializes information the current object +func (m *DeviceShellScript) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockExecutionNotifications", m.GetBlockExecutionNotifications()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceRunStates())) + for i, v := range m.GetDeviceRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceRunStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("executionFrequency", m.GetExecutionFrequency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + if m.GetGroupAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupAssignments())) + for i, v := range m.GetGroupAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("retryCount", m.GetRetryCount()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetRunAsAccount() != nil { + cast := (*m.GetRunAsAccount()).String() + err = writer.WriteStringValue("runAsAccount", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("runSummary", m.GetRunSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("scriptContent", m.GetScriptContent()) + if err != nil { + return err + } + } + if m.GetUserRunStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserRunStates())) + for i, v := range m.GetUserRunStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userRunStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the device management script. +func (m *DeviceShellScript) SetAssignments(value []DeviceManagementScriptAssignmentable)() { + m.assignments = value +} +// SetBlockExecutionNotifications sets the blockExecutionNotifications property value. Does not notify the user a script is being executed +func (m *DeviceShellScript) SetBlockExecutionNotifications(value *bool)() { + m.blockExecutionNotifications = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the device management script was created. This property is read-only. +func (m *DeviceShellScript) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Optional description for the device management script. +func (m *DeviceShellScript) SetDescription(value *string)() { + m.description = value +} +// SetDeviceRunStates sets the deviceRunStates property value. List of run states for this script across all devices. +func (m *DeviceShellScript) SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() { + m.deviceRunStates = value +} +// SetDisplayName sets the displayName property value. Name of the device management script. +func (m *DeviceShellScript) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExecutionFrequency sets the executionFrequency property value. The interval for script to run. If not defined the script will run once +func (m *DeviceShellScript) SetExecutionFrequency(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.executionFrequency = value +} +// SetFileName sets the fileName property value. Script file name. +func (m *DeviceShellScript) SetFileName(value *string)() { + m.fileName = value +} +// SetGroupAssignments sets the groupAssignments property value. The list of group assignments for the device management script. +func (m *DeviceShellScript) SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() { + m.groupAssignments = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the device management script was last modified. This property is read-only. +func (m *DeviceShellScript) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRetryCount sets the retryCount property value. Number of times for the script to be retried if it fails +func (m *DeviceShellScript) SetRetryCount(value *int32)() { + m.retryCount = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for this PowerShellScript instance. +func (m *DeviceShellScript) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRunAsAccount sets the runAsAccount property value. Indicates the type of execution context the app runs in. +func (m *DeviceShellScript) SetRunAsAccount(value *RunAsAccountType)() { + m.runAsAccount = value +} +// SetRunSummary sets the runSummary property value. Run summary for device management script. +func (m *DeviceShellScript) SetRunSummary(value DeviceManagementScriptRunSummaryable)() { + m.runSummary = value +} +// SetScriptContent sets the scriptContent property value. The script content. +func (m *DeviceShellScript) SetScriptContent(value []byte)() { + m.scriptContent = value +} +// SetUserRunStates sets the userRunStates property value. List of run states for this script across all users. +func (m *DeviceShellScript) SetUserRunStates(value []DeviceManagementScriptUserStateable)() { + m.userRunStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_shell_script_collection_response.go b/src/internal/connector/graph/betasdk/models/device_shell_script_collection_response.go new file mode 100644 index 000000000..ea60b4ed2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_shell_script_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceShellScriptCollectionResponse +type DeviceShellScriptCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DeviceShellScriptable +} +// NewDeviceShellScriptCollectionResponse instantiates a new DeviceShellScriptCollectionResponse and sets the default values. +func NewDeviceShellScriptCollectionResponse()(*DeviceShellScriptCollectionResponse) { + m := &DeviceShellScriptCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceShellScriptCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceShellScriptCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceShellScriptCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceShellScriptCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceShellScriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceShellScriptable, len(val)) + for i, v := range val { + res[i] = v.(DeviceShellScriptable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceShellScriptCollectionResponse) GetValue()([]DeviceShellScriptable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceShellScriptCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceShellScriptCollectionResponse) SetValue(value []DeviceShellScriptable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/device_shell_script_collection_responseable.go b/src/internal/connector/graph/betasdk/models/device_shell_script_collection_responseable.go new file mode 100644 index 000000000..fde0fa8d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_shell_script_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceShellScriptCollectionResponseable +type DeviceShellScriptCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceShellScriptable) + SetValue(value []DeviceShellScriptable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_shell_scriptable.go b/src/internal/connector/graph/betasdk/models/device_shell_scriptable.go new file mode 100644 index 000000000..8503e62f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_shell_scriptable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceShellScriptable +type DeviceShellScriptable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]DeviceManagementScriptAssignmentable) + GetBlockExecutionNotifications()(*bool) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceRunStates()([]DeviceManagementScriptDeviceStateable) + GetDisplayName()(*string) + GetExecutionFrequency()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetFileName()(*string) + GetGroupAssignments()([]DeviceManagementScriptGroupAssignmentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRetryCount()(*int32) + GetRoleScopeTagIds()([]string) + GetRunAsAccount()(*RunAsAccountType) + GetRunSummary()(DeviceManagementScriptRunSummaryable) + GetScriptContent()([]byte) + GetUserRunStates()([]DeviceManagementScriptUserStateable) + SetAssignments(value []DeviceManagementScriptAssignmentable)() + SetBlockExecutionNotifications(value *bool)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceRunStates(value []DeviceManagementScriptDeviceStateable)() + SetDisplayName(value *string)() + SetExecutionFrequency(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetFileName(value *string)() + SetGroupAssignments(value []DeviceManagementScriptGroupAssignmentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRetryCount(value *int32)() + SetRoleScopeTagIds(value []string)() + SetRunAsAccount(value *RunAsAccountType)() + SetRunSummary(value DeviceManagementScriptRunSummaryable)() + SetScriptContent(value []byte)() + SetUserRunStates(value []DeviceManagementScriptUserStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/device_threat_protection_level.go b/src/internal/connector/graph/betasdk/models/device_threat_protection_level.go new file mode 100644 index 000000000..4f7280036 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_threat_protection_level.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceThreatProtectionLevel int + +const ( + // Default Value. Do not use. + UNAVAILABLE_DEVICETHREATPROTECTIONLEVEL DeviceThreatProtectionLevel = iota + // Device Threat Level requirement: Secured. This is the most secure level, and represents that no threats were found on the device. + SECURED_DEVICETHREATPROTECTIONLEVEL + // Device Threat Protection level requirement: Low. Low represents a severity of threat that poses minimal risk to the device or device data. + LOW_DEVICETHREATPROTECTIONLEVEL + // Device Threat Protection level requirement: Medium. Medium represents a severity of threat that poses moderate risk to the device or device data. + MEDIUM_DEVICETHREATPROTECTIONLEVEL + // Device Threat Protection level requirement: High. High represents a severity of threat that poses severe risk to the device or device data. + HIGH_DEVICETHREATPROTECTIONLEVEL + // Device Threat Protection level requirement: Not Set. Not set represents that there is no requirement for the device to meet a Threat Protection level. + NOTSET_DEVICETHREATPROTECTIONLEVEL +) + +func (i DeviceThreatProtectionLevel) String() string { + return []string{"unavailable", "secured", "low", "medium", "high", "notSet"}[i] +} +func ParseDeviceThreatProtectionLevel(v string) (interface{}, error) { + result := UNAVAILABLE_DEVICETHREATPROTECTIONLEVEL + switch v { + case "unavailable": + result = UNAVAILABLE_DEVICETHREATPROTECTIONLEVEL + case "secured": + result = SECURED_DEVICETHREATPROTECTIONLEVEL + case "low": + result = LOW_DEVICETHREATPROTECTIONLEVEL + case "medium": + result = MEDIUM_DEVICETHREATPROTECTIONLEVEL + case "high": + result = HIGH_DEVICETHREATPROTECTIONLEVEL + case "notSet": + result = NOTSET_DEVICETHREATPROTECTIONLEVEL + default: + return 0, errors.New("Unknown DeviceThreatProtectionLevel value: " + v) + } + return &result, nil +} +func SerializeDeviceThreatProtectionLevel(values []DeviceThreatProtectionLevel) []string { + 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/device_type.go b/src/internal/connector/graph/betasdk/models/device_type.go new file mode 100644 index 000000000..be0331ec7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_type.go @@ -0,0 +1,136 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceType int + +const ( + // Desktop. + DESKTOP_DEVICETYPE DeviceType = iota + // WindowsRT. + WINDOWSRT_DEVICETYPE + // WinMO6. + WINMO6_DEVICETYPE + // Nokia. + NOKIA_DEVICETYPE + // Windows phone. + WINDOWSPHONE_DEVICETYPE + // Mac. + MAC_DEVICETYPE + // WinCE. + WINCE_DEVICETYPE + // WinEmbedded. + WINEMBEDDED_DEVICETYPE + // iPhone. + IPHONE_DEVICETYPE + // iPad. + IPAD_DEVICETYPE + // iPodTouch. + IPOD_DEVICETYPE + // Android. + ANDROID_DEVICETYPE + // iSocConsumer. + ISOCCONSUMER_DEVICETYPE + // Unix. + UNIX_DEVICETYPE + // Mac OS X client using built in MDM agent. + MACMDM_DEVICETYPE + // Representing the fancy Windows 10 goggles. + HOLOLENS_DEVICETYPE + // Surface HUB device. + SURFACEHUB_DEVICETYPE + // Android for work device. + ANDROIDFORWORK_DEVICETYPE + // Android enterprise device. + ANDROIDENTERPRISE_DEVICETYPE + // Windows 10x device. + WINDOWS10X_DEVICETYPE + // Android non Google managed device. + ANDROIDNGMS_DEVICETYPE + // ChromeOS device. + CHROMEOS_DEVICETYPE + // Linux device. + LINUX_DEVICETYPE + // Blackberry. + BLACKBERRY_DEVICETYPE + // Palm. + PALM_DEVICETYPE + // Represents that the device type is unknown. + UNKNOWN_DEVICETYPE + // Cloud PC device. + CLOUDPC_DEVICETYPE +) + +func (i DeviceType) String() string { + return []string{"desktop", "windowsRT", "winMO6", "nokia", "windowsPhone", "mac", "winCE", "winEmbedded", "iPhone", "iPad", "iPod", "android", "iSocConsumer", "unix", "macMDM", "holoLens", "surfaceHub", "androidForWork", "androidEnterprise", "windows10x", "androidnGMS", "chromeOS", "linux", "blackberry", "palm", "unknown", "cloudPC"}[i] +} +func ParseDeviceType(v string) (interface{}, error) { + result := DESKTOP_DEVICETYPE + switch v { + case "desktop": + result = DESKTOP_DEVICETYPE + case "windowsRT": + result = WINDOWSRT_DEVICETYPE + case "winMO6": + result = WINMO6_DEVICETYPE + case "nokia": + result = NOKIA_DEVICETYPE + case "windowsPhone": + result = WINDOWSPHONE_DEVICETYPE + case "mac": + result = MAC_DEVICETYPE + case "winCE": + result = WINCE_DEVICETYPE + case "winEmbedded": + result = WINEMBEDDED_DEVICETYPE + case "iPhone": + result = IPHONE_DEVICETYPE + case "iPad": + result = IPAD_DEVICETYPE + case "iPod": + result = IPOD_DEVICETYPE + case "android": + result = ANDROID_DEVICETYPE + case "iSocConsumer": + result = ISOCCONSUMER_DEVICETYPE + case "unix": + result = UNIX_DEVICETYPE + case "macMDM": + result = MACMDM_DEVICETYPE + case "holoLens": + result = HOLOLENS_DEVICETYPE + case "surfaceHub": + result = SURFACEHUB_DEVICETYPE + case "androidForWork": + result = ANDROIDFORWORK_DEVICETYPE + case "androidEnterprise": + result = ANDROIDENTERPRISE_DEVICETYPE + case "windows10x": + result = WINDOWS10X_DEVICETYPE + case "androidnGMS": + result = ANDROIDNGMS_DEVICETYPE + case "chromeOS": + result = CHROMEOS_DEVICETYPE + case "linux": + result = LINUX_DEVICETYPE + case "blackberry": + result = BLACKBERRY_DEVICETYPE + case "palm": + result = PALM_DEVICETYPE + case "unknown": + result = UNKNOWN_DEVICETYPE + case "cloudPC": + result = CLOUDPC_DEVICETYPE + default: + return 0, errors.New("Unknown DeviceType value: " + v) + } + return &result, nil +} +func SerializeDeviceType(values []DeviceType) []string { + 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/device_types.go b/src/internal/connector/graph/betasdk/models/device_types.go new file mode 100644 index 000000000..6c94c059d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/device_types.go @@ -0,0 +1,116 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceTypes int + +const ( + // Desktop. + DESKTOP_DEVICETYPES DeviceTypes = iota + // WindowsRT. + WINDOWSRT_DEVICETYPES + // WinMO6. + WINMO6_DEVICETYPES + // Nokia. + NOKIA_DEVICETYPES + // Windows phone. + WINDOWSPHONE_DEVICETYPES + // Mac. + MAC_DEVICETYPES + // WinCE. + WINCE_DEVICETYPES + // WinEmbedded. + WINEMBEDDED_DEVICETYPES + // iPhone. + IPHONE_DEVICETYPES + // iPad. + IPAD_DEVICETYPES + // iPodTouch. + IPOD_DEVICETYPES + // Android. + ANDROID_DEVICETYPES + // iSocConsumer. + ISOCCONSUMER_DEVICETYPES + // Unix. + UNIX_DEVICETYPES + // Mac OS X client using built in MDM agent. + MACMDM_DEVICETYPES + // Representing the fancy Windows 10 goggles. + HOLOLENS_DEVICETYPES + // Surface HUB device. + SURFACEHUB_DEVICETYPES + // Android for work device. + ANDROIDFORWORK_DEVICETYPES + // Android enterprise device. + ANDROIDENTERPRISE_DEVICETYPES + // Blackberry. + BLACKBERRY_DEVICETYPES + // Palm. + PALM_DEVICETYPES + // Represents that the device type is unknown. + UNKNOWN_DEVICETYPES +) + +func (i DeviceTypes) String() string { + return []string{"desktop", "windowsRT", "winMO6", "nokia", "windowsPhone", "mac", "winCE", "winEmbedded", "iPhone", "iPad", "iPod", "android", "iSocConsumer", "unix", "macMDM", "holoLens", "surfaceHub", "androidForWork", "androidEnterprise", "blackberry", "palm", "unknown"}[i] +} +func ParseDeviceTypes(v string) (interface{}, error) { + result := DESKTOP_DEVICETYPES + switch v { + case "desktop": + result = DESKTOP_DEVICETYPES + case "windowsRT": + result = WINDOWSRT_DEVICETYPES + case "winMO6": + result = WINMO6_DEVICETYPES + case "nokia": + result = NOKIA_DEVICETYPES + case "windowsPhone": + result = WINDOWSPHONE_DEVICETYPES + case "mac": + result = MAC_DEVICETYPES + case "winCE": + result = WINCE_DEVICETYPES + case "winEmbedded": + result = WINEMBEDDED_DEVICETYPES + case "iPhone": + result = IPHONE_DEVICETYPES + case "iPad": + result = IPAD_DEVICETYPES + case "iPod": + result = IPOD_DEVICETYPES + case "android": + result = ANDROID_DEVICETYPES + case "iSocConsumer": + result = ISOCCONSUMER_DEVICETYPES + case "unix": + result = UNIX_DEVICETYPES + case "macMDM": + result = MACMDM_DEVICETYPES + case "holoLens": + result = HOLOLENS_DEVICETYPES + case "surfaceHub": + result = SURFACEHUB_DEVICETYPES + case "androidForWork": + result = ANDROIDFORWORK_DEVICETYPES + case "androidEnterprise": + result = ANDROIDENTERPRISE_DEVICETYPES + case "blackberry": + result = BLACKBERRY_DEVICETYPES + case "palm": + result = PALM_DEVICETYPES + case "unknown": + result = UNKNOWN_DEVICETYPES + default: + return 0, errors.New("Unknown DeviceTypes value: " + v) + } + return &result, nil +} +func SerializeDeviceTypes(values []DeviceTypes) []string { + 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/deviceable.go b/src/internal/connector/graph/betasdk/models/deviceable.go new file mode 100644 index 000000000..fdcfb6e7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/deviceable.go @@ -0,0 +1,98 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Deviceable +type Deviceable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountEnabled()(*bool) + GetAlternativeSecurityIds()([]AlternativeSecurityIdable) + GetApproximateLastSignInDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCommands()([]Commandable) + GetComplianceExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceCategory()(*string) + GetDeviceId()(*string) + GetDeviceMetadata()(*string) + GetDeviceOwnership()(*string) + GetDeviceVersion()(*int32) + GetDisplayName()(*string) + GetDomainName()(*string) + GetEnrollmentProfileName()(*string) + GetEnrollmentType()(*string) + GetExtensionAttributes()(OnPremisesExtensionAttributesable) + GetExtensions()([]Extensionable) + GetHostnames()([]string) + GetIsCompliant()(*bool) + GetIsManaged()(*bool) + GetIsManagementRestricted()(*bool) + GetIsRooted()(*bool) + GetKind()(*string) + GetManagementType()(*string) + GetManufacturer()(*string) + GetMdmAppId()(*string) + GetMemberOf()([]DirectoryObjectable) + GetModel()(*string) + GetName()(*string) + GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnPremisesSyncEnabled()(*bool) + GetOperatingSystem()(*string) + GetOperatingSystemVersion()(*string) + GetPhysicalIds()([]string) + GetPlatform()(*string) + GetProfileType()(*string) + GetRegisteredOwners()([]DirectoryObjectable) + GetRegisteredUsers()([]DirectoryObjectable) + GetRegistrationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + GetSystemLabels()([]string) + GetTransitiveMemberOf()([]DirectoryObjectable) + GetTrustType()(*string) + GetUsageRights()([]UsageRightable) + SetAccountEnabled(value *bool)() + SetAlternativeSecurityIds(value []AlternativeSecurityIdable)() + SetApproximateLastSignInDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCommands(value []Commandable)() + SetComplianceExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceCategory(value *string)() + SetDeviceId(value *string)() + SetDeviceMetadata(value *string)() + SetDeviceOwnership(value *string)() + SetDeviceVersion(value *int32)() + SetDisplayName(value *string)() + SetDomainName(value *string)() + SetEnrollmentProfileName(value *string)() + SetEnrollmentType(value *string)() + SetExtensionAttributes(value OnPremisesExtensionAttributesable)() + SetExtensions(value []Extensionable)() + SetHostnames(value []string)() + SetIsCompliant(value *bool)() + SetIsManaged(value *bool)() + SetIsManagementRestricted(value *bool)() + SetIsRooted(value *bool)() + SetKind(value *string)() + SetManagementType(value *string)() + SetManufacturer(value *string)() + SetMdmAppId(value *string)() + SetMemberOf(value []DirectoryObjectable)() + SetModel(value *string)() + SetName(value *string)() + SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnPremisesSyncEnabled(value *bool)() + SetOperatingSystem(value *string)() + SetOperatingSystemVersion(value *string)() + SetPhysicalIds(value []string)() + SetPlatform(value *string)() + SetProfileType(value *string)() + SetRegisteredOwners(value []DirectoryObjectable)() + SetRegisteredUsers(value []DirectoryObjectable)() + SetRegistrationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() + SetSystemLabels(value []string)() + SetTransitiveMemberOf(value []DirectoryObjectable)() + SetTrustType(value *string)() + SetUsageRights(value []UsageRightable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/aggregation_type.go b/src/internal/connector/graph/betasdk/models/devicemanagement/aggregation_type.go new file mode 100644 index 000000000..2cc97030a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/aggregation_type.go @@ -0,0 +1,43 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AggregationType int + +const ( + COUNT_AGGREGATIONTYPE AggregationType = iota + PERCENTAGE_AGGREGATIONTYPE + AFFECTEDCLOUDPCCOUNT_AGGREGATIONTYPE + AFFECTEDCLOUDPCPERCENTAGE_AGGREGATIONTYPE + UNKNOWNFUTUREVALUE_AGGREGATIONTYPE +) + +func (i AggregationType) String() string { + return []string{"count", "percentage", "affectedCloudPcCount", "affectedCloudPcPercentage", "unknownFutureValue"}[i] +} +func ParseAggregationType(v string) (interface{}, error) { + result := COUNT_AGGREGATIONTYPE + switch v { + case "count": + result = COUNT_AGGREGATIONTYPE + case "percentage": + result = PERCENTAGE_AGGREGATIONTYPE + case "affectedCloudPcCount": + result = AFFECTEDCLOUDPCCOUNT_AGGREGATIONTYPE + case "affectedCloudPcPercentage": + result = AFFECTEDCLOUDPCPERCENTAGE_AGGREGATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_AGGREGATIONTYPE + default: + return 0, errors.New("Unknown AggregationType value: " + v) + } + return &result, nil +} +func SerializeAggregationType(values []AggregationType) []string { + 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/devicemanagement/alert_impact.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_impact.go new file mode 100644 index 000000000..ef68aecfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_impact.go @@ -0,0 +1,124 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertImpact +type AlertImpact 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 aggregation type of the impact. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. + aggregationType *AggregationType + // The OdataType property + odataType *string + // The number value of the impact. For the aggregation types of count and affectedCloudPcCount, the value indicates the number of affected instances. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. For the aggregation types of percentage and affectedCloudPcPercentage, the value indicates the percent of affected instances. For example, 12 affectedCloudPcPercentage means that 12% of Cloud PCs are affected. + value *int32 +} +// NewAlertImpact instantiates a new alertImpact and sets the default values. +func NewAlertImpact()(*AlertImpact) { + m := &AlertImpact{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertImpactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertImpactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertImpact(), 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 *AlertImpact) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAggregationType gets the aggregationType property value. The aggregation type of the impact. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *AlertImpact) GetAggregationType()(*AggregationType) { + return m.aggregationType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertImpact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aggregationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAggregationType) + if err != nil { + return err + } + if val != nil { + m.SetAggregationType(val.(*AggregationType)) + } + 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.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertImpact) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The number value of the impact. For the aggregation types of count and affectedCloudPcCount, the value indicates the number of affected instances. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. For the aggregation types of percentage and affectedCloudPcPercentage, the value indicates the percent of affected instances. For example, 12 affectedCloudPcPercentage means that 12% of Cloud PCs are affected. +func (m *AlertImpact) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertImpact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAggregationType() != nil { + cast := (*m.GetAggregationType()).String() + err := writer.WriteStringValue("aggregationType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("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 *AlertImpact) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAggregationType sets the aggregationType property value. The aggregation type of the impact. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *AlertImpact) SetAggregationType(value *AggregationType)() { + m.aggregationType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertImpact) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The number value of the impact. For the aggregation types of count and affectedCloudPcCount, the value indicates the number of affected instances. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. For the aggregation types of percentage and affectedCloudPcPercentage, the value indicates the percent of affected instances. For example, 12 affectedCloudPcPercentage means that 12% of Cloud PCs are affected. +func (m *AlertImpact) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_impactable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_impactable.go new file mode 100644 index 000000000..dcd6c9ac7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_impactable.go @@ -0,0 +1,17 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertImpactable +type AlertImpactable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregationType()(*AggregationType) + GetOdataType()(*string) + GetValue()(*int32) + SetAggregationType(value *AggregationType)() + SetOdataType(value *string)() + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record.go new file mode 100644 index 000000000..126c0f67f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record.go @@ -0,0 +1,273 @@ +package devicemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRecord provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertRecord struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The impact of the alert event. Consists of a number followed by the aggregation type. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. 12 affectedCloudPcPercentage means 12% of Cloud PCs are affected. + alertImpact AlertImpactable + // The corresponding ID of the alert rule. + alertRuleId *string + // The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. + alertRuleTemplate *AlertRuleTemplate + // The date and time when the alert event was detected. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + detectedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the alert record. + displayName *string + // The date and time when the alert record was last updated. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the alert event was resolved. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + resolvedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The severity of the alert event. The possible values are: unknown, informational, warning, critical, unknownFutureValue. + severity *RuleSeverityType + // The status of the alert record. The possible values are: active, resolved, unknownFutureValue. + status *AlertStatusType +} +// NewAlertRecord instantiates a new alertRecord and sets the default values. +func NewAlertRecord()(*AlertRecord) { + m := &AlertRecord{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateAlertRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertRecord(), nil +} +// GetAlertImpact gets the alertImpact property value. The impact of the alert event. Consists of a number followed by the aggregation type. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. 12 affectedCloudPcPercentage means 12% of Cloud PCs are affected. +func (m *AlertRecord) GetAlertImpact()(AlertImpactable) { + return m.alertImpact +} +// GetAlertRuleId gets the alertRuleId property value. The corresponding ID of the alert rule. +func (m *AlertRecord) GetAlertRuleId()(*string) { + return m.alertRuleId +} +// GetAlertRuleTemplate gets the alertRuleTemplate property value. The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. +func (m *AlertRecord) GetAlertRuleTemplate()(*AlertRuleTemplate) { + return m.alertRuleTemplate +} +// GetDetectedDateTime gets the detectedDateTime property value. The date and time when the alert event was detected. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.detectedDateTime +} +// GetDisplayName gets the displayName property value. The display name of the alert record. +func (m *AlertRecord) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertImpactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlertImpact(val.(AlertImpactable)) + } + return nil + } + res["alertRuleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlertRuleId(val) + } + return nil + } + res["alertRuleTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertRuleTemplate) + if err != nil { + return err + } + if val != nil { + m.SetAlertRuleTemplate(val.(*AlertRuleTemplate)) + } + return nil + } + res["detectedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["resolvedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetResolvedDateTime(val) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSeverityType) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*RuleSeverityType)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertStatusType) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AlertStatusType)) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The date and time when the alert record was last updated. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetResolvedDateTime gets the resolvedDateTime property value. The date and time when the alert event was resolved. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) GetResolvedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.resolvedDateTime +} +// GetSeverity gets the severity property value. The severity of the alert event. The possible values are: unknown, informational, warning, critical, unknownFutureValue. +func (m *AlertRecord) GetSeverity()(*RuleSeverityType) { + return m.severity +} +// GetStatus gets the status property value. The status of the alert record. The possible values are: active, resolved, unknownFutureValue. +func (m *AlertRecord) GetStatus()(*AlertStatusType) { + return m.status +} +// Serialize serializes information the current object +func (m *AlertRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("alertImpact", m.GetAlertImpact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("alertRuleId", m.GetAlertRuleId()) + if err != nil { + return err + } + } + if m.GetAlertRuleTemplate() != nil { + cast := (*m.GetAlertRuleTemplate()).String() + err = writer.WriteStringValue("alertRuleTemplate", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("detectedDateTime", m.GetDetectedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("resolvedDateTime", m.GetResolvedDateTime()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAlertImpact sets the alertImpact property value. The impact of the alert event. Consists of a number followed by the aggregation type. For example, 6 affectedCloudPcCount means that 6 Cloud PCs are affected. 12 affectedCloudPcPercentage means 12% of Cloud PCs are affected. +func (m *AlertRecord) SetAlertImpact(value AlertImpactable)() { + m.alertImpact = value +} +// SetAlertRuleId sets the alertRuleId property value. The corresponding ID of the alert rule. +func (m *AlertRecord) SetAlertRuleId(value *string)() { + m.alertRuleId = value +} +// SetAlertRuleTemplate sets the alertRuleTemplate property value. The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. +func (m *AlertRecord) SetAlertRuleTemplate(value *AlertRuleTemplate)() { + m.alertRuleTemplate = value +} +// SetDetectedDateTime sets the detectedDateTime property value. The date and time when the alert event was detected. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.detectedDateTime = value +} +// SetDisplayName sets the displayName property value. The display name of the alert record. +func (m *AlertRecord) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The date and time when the alert record was last updated. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetResolvedDateTime sets the resolvedDateTime property value. The date and time when the alert event was resolved. The Timestamp type represents date and time information using ISO 8601 format. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *AlertRecord) SetResolvedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.resolvedDateTime = value +} +// SetSeverity sets the severity property value. The severity of the alert event. The possible values are: unknown, informational, warning, critical, unknownFutureValue. +func (m *AlertRecord) SetSeverity(value *RuleSeverityType)() { + m.severity = value +} +// SetStatus sets the status property value. The status of the alert record. The possible values are: active, resolved, unknownFutureValue. +func (m *AlertRecord) SetStatus(value *AlertStatusType)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_response.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_response.go new file mode 100644 index 000000000..89c4ecf91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_response.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRecordCollectionResponse +type AlertRecordCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AlertRecordable +} +// NewAlertRecordCollectionResponse instantiates a new AlertRecordCollectionResponse and sets the default values. +func NewAlertRecordCollectionResponse()(*AlertRecordCollectionResponse) { + m := &AlertRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertRecordable, len(val)) + for i, v := range val { + res[i] = v.(AlertRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertRecordCollectionResponse) GetValue()([]AlertRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertRecordCollectionResponse) SetValue(value []AlertRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_responseable.go new file mode 100644 index 000000000..b62e78a6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_record_collection_responseable.go @@ -0,0 +1,14 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRecordCollectionResponseable +type AlertRecordCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertRecordable) + SetValue(value []AlertRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_recordable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_recordable.go new file mode 100644 index 000000000..0c1c8beae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_recordable.go @@ -0,0 +1,31 @@ +package devicemanagement + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRecordable +type AlertRecordable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertImpact()(AlertImpactable) + GetAlertRuleId()(*string) + GetAlertRuleTemplate()(*AlertRuleTemplate) + GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResolvedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSeverity()(*RuleSeverityType) + GetStatus()(*AlertStatusType) + SetAlertImpact(value AlertImpactable)() + SetAlertRuleId(value *string)() + SetAlertRuleTemplate(value *AlertRuleTemplate)() + SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResolvedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSeverity(value *RuleSeverityType)() + SetStatus(value *AlertStatusType)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule.go new file mode 100644 index 000000000..94727710b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule.go @@ -0,0 +1,253 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRule provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertRule struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. + alertRuleTemplate *AlertRuleTemplate + // The rule description. + description *string + // The display name of the rule. + displayName *string + // The status of the rule that indicates whether the rule is enabled or disabled. If true, the rule is enabled; otherwise, the rule is disabled. + enabled *bool + // Indicates whether the rule is a system rule. If true, the rule is a system rule; otherwise, the rule is a custom defined rule and can be edited. System rules are built-in and only a few properties can be edited. + isSystemRule *bool + // The notification channels of the rule selected by the user. + notificationChannels []NotificationChannelable + // The severity of the rule. The possible values are: unknown, informational, warning, critical, unknownFutureValue. + severity *RuleSeverityType + // The conditions to send alerts. For example, send alert when provisioning has failed for greater than or equal to 6 Cloud PCs. + threshold RuleThresholdable +} +// NewAlertRule instantiates a new alertRule and sets the default values. +func NewAlertRule()(*AlertRule) { + m := &AlertRule{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateAlertRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertRule(), nil +} +// GetAlertRuleTemplate gets the alertRuleTemplate property value. The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. +func (m *AlertRule) GetAlertRuleTemplate()(*AlertRuleTemplate) { + return m.alertRuleTemplate +} +// GetDescription gets the description property value. The rule description. +func (m *AlertRule) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the rule. +func (m *AlertRule) GetDisplayName()(*string) { + return m.displayName +} +// GetEnabled gets the enabled property value. The status of the rule that indicates whether the rule is enabled or disabled. If true, the rule is enabled; otherwise, the rule is disabled. +func (m *AlertRule) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertRuleTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertRuleTemplate) + if err != nil { + return err + } + if val != nil { + m.SetAlertRuleTemplate(val.(*AlertRuleTemplate)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["isSystemRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSystemRule(val) + } + return nil + } + res["notificationChannels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationChannelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationChannelable, len(val)) + for i, v := range val { + res[i] = v.(NotificationChannelable) + } + m.SetNotificationChannels(res) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleSeverityType) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*RuleSeverityType)) + } + return nil + } + res["threshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRuleThresholdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThreshold(val.(RuleThresholdable)) + } + return nil + } + return res +} +// GetIsSystemRule gets the isSystemRule property value. Indicates whether the rule is a system rule. If true, the rule is a system rule; otherwise, the rule is a custom defined rule and can be edited. System rules are built-in and only a few properties can be edited. +func (m *AlertRule) GetIsSystemRule()(*bool) { + return m.isSystemRule +} +// GetNotificationChannels gets the notificationChannels property value. The notification channels of the rule selected by the user. +func (m *AlertRule) GetNotificationChannels()([]NotificationChannelable) { + return m.notificationChannels +} +// GetSeverity gets the severity property value. The severity of the rule. The possible values are: unknown, informational, warning, critical, unknownFutureValue. +func (m *AlertRule) GetSeverity()(*RuleSeverityType) { + return m.severity +} +// GetThreshold gets the threshold property value. The conditions to send alerts. For example, send alert when provisioning has failed for greater than or equal to 6 Cloud PCs. +func (m *AlertRule) GetThreshold()(RuleThresholdable) { + return m.threshold +} +// Serialize serializes information the current object +func (m *AlertRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAlertRuleTemplate() != nil { + cast := (*m.GetAlertRuleTemplate()).String() + err = writer.WriteStringValue("alertRuleTemplate", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSystemRule", m.GetIsSystemRule()) + if err != nil { + return err + } + } + if m.GetNotificationChannels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotificationChannels())) + for i, v := range m.GetNotificationChannels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("notificationChannels", cast) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("threshold", m.GetThreshold()) + if err != nil { + return err + } + } + return nil +} +// SetAlertRuleTemplate sets the alertRuleTemplate property value. The rule template of the alert event. The possible values are: cloudPcProvisionScenario, cloudPcImageUploadScenario, cloudPcOnPremiseNetworkConnectionCheckScenario, unknownFutureValue. +func (m *AlertRule) SetAlertRuleTemplate(value *AlertRuleTemplate)() { + m.alertRuleTemplate = value +} +// SetDescription sets the description property value. The rule description. +func (m *AlertRule) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the rule. +func (m *AlertRule) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnabled sets the enabled property value. The status of the rule that indicates whether the rule is enabled or disabled. If true, the rule is enabled; otherwise, the rule is disabled. +func (m *AlertRule) SetEnabled(value *bool)() { + m.enabled = value +} +// SetIsSystemRule sets the isSystemRule property value. Indicates whether the rule is a system rule. If true, the rule is a system rule; otherwise, the rule is a custom defined rule and can be edited. System rules are built-in and only a few properties can be edited. +func (m *AlertRule) SetIsSystemRule(value *bool)() { + m.isSystemRule = value +} +// SetNotificationChannels sets the notificationChannels property value. The notification channels of the rule selected by the user. +func (m *AlertRule) SetNotificationChannels(value []NotificationChannelable)() { + m.notificationChannels = value +} +// SetSeverity sets the severity property value. The severity of the rule. The possible values are: unknown, informational, warning, critical, unknownFutureValue. +func (m *AlertRule) SetSeverity(value *RuleSeverityType)() { + m.severity = value +} +// SetThreshold sets the threshold property value. The conditions to send alerts. For example, send alert when provisioning has failed for greater than or equal to 6 Cloud PCs. +func (m *AlertRule) SetThreshold(value RuleThresholdable)() { + m.threshold = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_response.go new file mode 100644 index 000000000..7c0df97e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_response.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRuleCollectionResponse +type AlertRuleCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AlertRuleable +} +// NewAlertRuleCollectionResponse instantiates a new AlertRuleCollectionResponse and sets the default values. +func NewAlertRuleCollectionResponse()(*AlertRuleCollectionResponse) { + m := &AlertRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertRuleable, len(val)) + for i, v := range val { + res[i] = v.(AlertRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertRuleCollectionResponse) GetValue()([]AlertRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertRuleCollectionResponse) SetValue(value []AlertRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_responseable.go new file mode 100644 index 000000000..5e576c75e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_collection_responseable.go @@ -0,0 +1,14 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRuleCollectionResponseable +type AlertRuleCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertRuleable) + SetValue(value []AlertRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_template.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_template.go new file mode 100644 index 000000000..3f9343279 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_rule_template.go @@ -0,0 +1,40 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertRuleTemplate int + +const ( + CLOUDPCPROVISIONSCENARIO_ALERTRULETEMPLATE AlertRuleTemplate = iota + CLOUDPCIMAGEUPLOADSCENARIO_ALERTRULETEMPLATE + CLOUDPCONPREMISENETWORKCONNECTIONCHECKSCENARIO_ALERTRULETEMPLATE + UNKNOWNFUTUREVALUE_ALERTRULETEMPLATE +) + +func (i AlertRuleTemplate) String() string { + return []string{"cloudPcProvisionScenario", "cloudPcImageUploadScenario", "cloudPcOnPremiseNetworkConnectionCheckScenario", "unknownFutureValue"}[i] +} +func ParseAlertRuleTemplate(v string) (interface{}, error) { + result := CLOUDPCPROVISIONSCENARIO_ALERTRULETEMPLATE + switch v { + case "cloudPcProvisionScenario": + result = CLOUDPCPROVISIONSCENARIO_ALERTRULETEMPLATE + case "cloudPcImageUploadScenario": + result = CLOUDPCIMAGEUPLOADSCENARIO_ALERTRULETEMPLATE + case "cloudPcOnPremiseNetworkConnectionCheckScenario": + result = CLOUDPCONPREMISENETWORKCONNECTIONCHECKSCENARIO_ALERTRULETEMPLATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTRULETEMPLATE + default: + return 0, errors.New("Unknown AlertRuleTemplate value: " + v) + } + return &result, nil +} +func SerializeAlertRuleTemplate(values []AlertRuleTemplate) []string { + 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/devicemanagement/alert_ruleable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_ruleable.go new file mode 100644 index 000000000..8a9def84f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_ruleable.go @@ -0,0 +1,28 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertRuleable +type AlertRuleable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertRuleTemplate()(*AlertRuleTemplate) + GetDescription()(*string) + GetDisplayName()(*string) + GetEnabled()(*bool) + GetIsSystemRule()(*bool) + GetNotificationChannels()([]NotificationChannelable) + GetSeverity()(*RuleSeverityType) + GetThreshold()(RuleThresholdable) + SetAlertRuleTemplate(value *AlertRuleTemplate)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEnabled(value *bool)() + SetIsSystemRule(value *bool)() + SetNotificationChannels(value []NotificationChannelable)() + SetSeverity(value *RuleSeverityType)() + SetThreshold(value RuleThresholdable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/alert_status_type.go b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_status_type.go new file mode 100644 index 000000000..0ef4c5127 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/alert_status_type.go @@ -0,0 +1,37 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertStatusType int + +const ( + ACTIVE_ALERTSTATUSTYPE AlertStatusType = iota + RESOLVED_ALERTSTATUSTYPE + UNKNOWNFUTUREVALUE_ALERTSTATUSTYPE +) + +func (i AlertStatusType) String() string { + return []string{"active", "resolved", "unknownFutureValue"}[i] +} +func ParseAlertStatusType(v string) (interface{}, error) { + result := ACTIVE_ALERTSTATUSTYPE + switch v { + case "active": + result = ACTIVE_ALERTSTATUSTYPE + case "resolved": + result = RESOLVED_ALERTSTATUSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSTATUSTYPE + default: + return 0, errors.New("Unknown AlertStatusType value: " + v) + } + return &result, nil +} +func SerializeAlertStatusType(values []AlertStatusType) []string { + 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/devicemanagement/monitoring.go b/src/internal/connector/graph/betasdk/models/devicemanagement/monitoring.go new file mode 100644 index 000000000..9b8a6ac2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/monitoring.go @@ -0,0 +1,103 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Monitoring +type Monitoring struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The collection of records of alert events. + alertRecords []AlertRecordable + // The collection of alert rules. + alertRules []AlertRuleable +} +// NewMonitoring instantiates a new monitoring and sets the default values. +func NewMonitoring()(*Monitoring) { + m := &Monitoring{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateMonitoringFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMonitoringFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMonitoring(), nil +} +// GetAlertRecords gets the alertRecords property value. The collection of records of alert events. +func (m *Monitoring) GetAlertRecords()([]AlertRecordable) { + return m.alertRecords +} +// GetAlertRules gets the alertRules property value. The collection of alert rules. +func (m *Monitoring) GetAlertRules()([]AlertRuleable) { + return m.alertRules +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Monitoring) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertRecords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertRecordable, len(val)) + for i, v := range val { + res[i] = v.(AlertRecordable) + } + m.SetAlertRecords(res) + } + return nil + } + res["alertRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertRuleable, len(val)) + for i, v := range val { + res[i] = v.(AlertRuleable) + } + m.SetAlertRules(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Monitoring) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAlertRecords() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertRecords())) + for i, v := range m.GetAlertRecords() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertRecords", cast) + if err != nil { + return err + } + } + if m.GetAlertRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertRules())) + for i, v := range m.GetAlertRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertRules", cast) + if err != nil { + return err + } + } + return nil +} +// SetAlertRecords sets the alertRecords property value. The collection of records of alert events. +func (m *Monitoring) SetAlertRecords(value []AlertRecordable)() { + m.alertRecords = value +} +// SetAlertRules sets the alertRules property value. The collection of alert rules. +func (m *Monitoring) SetAlertRules(value []AlertRuleable)() { + m.alertRules = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/monitoringable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/monitoringable.go new file mode 100644 index 000000000..9082c3269 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/monitoringable.go @@ -0,0 +1,16 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Monitoringable +type Monitoringable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertRecords()([]AlertRecordable) + GetAlertRules()([]AlertRuleable) + SetAlertRecords(value []AlertRecordable)() + SetAlertRules(value []AlertRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel.go new file mode 100644 index 000000000..0e75d9da4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel.go @@ -0,0 +1,162 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationChannel +type NotificationChannel 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 type of the notification channel. The possible values are: portal, email, phoneCall, sms, unknownFutureValue. + notificationChannelType *NotificationChannelType + // Information about the notification receivers, such as locale and contact information. For example, en-us for locale and serena.davis@contoso.com for contact information. + notificationReceivers []NotificationReceiverable + // The OdataType property + odataType *string + // The contact information about the notification receivers, such as email addresses. For portal notifications, receivers can be left blank. For email notifications, receivers consists of email addresses such as serena.davis@contoso.com. + receivers []string +} +// NewNotificationChannel instantiates a new notificationChannel and sets the default values. +func NewNotificationChannel()(*NotificationChannel) { + m := &NotificationChannel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNotificationChannelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationChannelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationChannel(), 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 *NotificationChannel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationChannel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["notificationChannelType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNotificationChannelType) + if err != nil { + return err + } + if val != nil { + m.SetNotificationChannelType(val.(*NotificationChannelType)) + } + return nil + } + res["notificationReceivers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationReceiverFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationReceiverable, len(val)) + for i, v := range val { + res[i] = v.(NotificationReceiverable) + } + m.SetNotificationReceivers(res) + } + 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["receivers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReceivers(res) + } + return nil + } + return res +} +// GetNotificationChannelType gets the notificationChannelType property value. The type of the notification channel. The possible values are: portal, email, phoneCall, sms, unknownFutureValue. +func (m *NotificationChannel) GetNotificationChannelType()(*NotificationChannelType) { + return m.notificationChannelType +} +// GetNotificationReceivers gets the notificationReceivers property value. Information about the notification receivers, such as locale and contact information. For example, en-us for locale and serena.davis@contoso.com for contact information. +func (m *NotificationChannel) GetNotificationReceivers()([]NotificationReceiverable) { + return m.notificationReceivers +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NotificationChannel) GetOdataType()(*string) { + return m.odataType +} +// GetReceivers gets the receivers property value. The contact information about the notification receivers, such as email addresses. For portal notifications, receivers can be left blank. For email notifications, receivers consists of email addresses such as serena.davis@contoso.com. +func (m *NotificationChannel) GetReceivers()([]string) { + return m.receivers +} +// Serialize serializes information the current object +func (m *NotificationChannel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNotificationChannelType() != nil { + cast := (*m.GetNotificationChannelType()).String() + err := writer.WriteStringValue("notificationChannelType", &cast) + if err != nil { + return err + } + } + if m.GetNotificationReceivers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotificationReceivers())) + for i, v := range m.GetNotificationReceivers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("notificationReceivers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetReceivers() != nil { + err := writer.WriteCollectionOfStringValues("receivers", m.GetReceivers()) + 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 *NotificationChannel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNotificationChannelType sets the notificationChannelType property value. The type of the notification channel. The possible values are: portal, email, phoneCall, sms, unknownFutureValue. +func (m *NotificationChannel) SetNotificationChannelType(value *NotificationChannelType)() { + m.notificationChannelType = value +} +// SetNotificationReceivers sets the notificationReceivers property value. Information about the notification receivers, such as locale and contact information. For example, en-us for locale and serena.davis@contoso.com for contact information. +func (m *NotificationChannel) SetNotificationReceivers(value []NotificationReceiverable)() { + m.notificationReceivers = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NotificationChannel) SetOdataType(value *string)() { + m.odataType = value +} +// SetReceivers sets the receivers property value. The contact information about the notification receivers, such as email addresses. For portal notifications, receivers can be left blank. For email notifications, receivers consists of email addresses such as serena.davis@contoso.com. +func (m *NotificationChannel) SetReceivers(value []string)() { + m.receivers = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_response.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_response.go new file mode 100644 index 000000000..00e944407 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_response.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationChannelCollectionResponse +type NotificationChannelCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []NotificationChannelable +} +// NewNotificationChannelCollectionResponse instantiates a new NotificationChannelCollectionResponse and sets the default values. +func NewNotificationChannelCollectionResponse()(*NotificationChannelCollectionResponse) { + m := &NotificationChannelCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotificationChannelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationChannelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationChannelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationChannelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationChannelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationChannelable, len(val)) + for i, v := range val { + res[i] = v.(NotificationChannelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotificationChannelCollectionResponse) GetValue()([]NotificationChannelable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotificationChannelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotificationChannelCollectionResponse) SetValue(value []NotificationChannelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_responseable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_responseable.go new file mode 100644 index 000000000..2f04c69a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_collection_responseable.go @@ -0,0 +1,14 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationChannelCollectionResponseable +type NotificationChannelCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NotificationChannelable) + SetValue(value []NotificationChannelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_type.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_type.go new file mode 100644 index 000000000..0ccdf40c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channel_type.go @@ -0,0 +1,43 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NotificationChannelType int + +const ( + PORTAL_NOTIFICATIONCHANNELTYPE NotificationChannelType = iota + EMAIL_NOTIFICATIONCHANNELTYPE + PHONECALL_NOTIFICATIONCHANNELTYPE + SMS_NOTIFICATIONCHANNELTYPE + UNKNOWNFUTUREVALUE_NOTIFICATIONCHANNELTYPE +) + +func (i NotificationChannelType) String() string { + return []string{"portal", "email", "phoneCall", "sms", "unknownFutureValue"}[i] +} +func ParseNotificationChannelType(v string) (interface{}, error) { + result := PORTAL_NOTIFICATIONCHANNELTYPE + switch v { + case "portal": + result = PORTAL_NOTIFICATIONCHANNELTYPE + case "email": + result = EMAIL_NOTIFICATIONCHANNELTYPE + case "phoneCall": + result = PHONECALL_NOTIFICATIONCHANNELTYPE + case "sms": + result = SMS_NOTIFICATIONCHANNELTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_NOTIFICATIONCHANNELTYPE + default: + return 0, errors.New("Unknown NotificationChannelType value: " + v) + } + return &result, nil +} +func SerializeNotificationChannelType(values []NotificationChannelType) []string { + 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/devicemanagement/notification_channelable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channelable.go new file mode 100644 index 000000000..de500a90c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_channelable.go @@ -0,0 +1,19 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationChannelable +type NotificationChannelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNotificationChannelType()(*NotificationChannelType) + GetNotificationReceivers()([]NotificationReceiverable) + GetOdataType()(*string) + GetReceivers()([]string) + SetNotificationChannelType(value *NotificationChannelType)() + SetNotificationReceivers(value []NotificationReceiverable)() + SetOdataType(value *string)() + SetReceivers(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver.go new file mode 100644 index 000000000..30f2b38bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver.go @@ -0,0 +1,123 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationReceiver +type NotificationReceiver 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 contact information about the notification receivers, such as an email address. Currently, only email and portal notifications are supported. For portal notifications, contactInformation can be left blank. For email notifications, contactInformation consists of an email address such as serena.davis@contoso.com. + contactInformation *string + // Defines the language and format in which the notification will be sent. Supported locale values are: en-us, cs-cz, de-de, es-es, fr-fr, hu-hu, it-it, ja-jp, ko-kr, nl-nl, pl-pl, pt-br, pt-pt, ru-ru, sv-se, tr-tr, zh-cn, zh-tw. + locale *string + // The OdataType property + odataType *string +} +// NewNotificationReceiver instantiates a new notificationReceiver and sets the default values. +func NewNotificationReceiver()(*NotificationReceiver) { + m := &NotificationReceiver{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNotificationReceiverFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationReceiverFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationReceiver(), 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 *NotificationReceiver) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContactInformation gets the contactInformation property value. The contact information about the notification receivers, such as an email address. Currently, only email and portal notifications are supported. For portal notifications, contactInformation can be left blank. For email notifications, contactInformation consists of an email address such as serena.davis@contoso.com. +func (m *NotificationReceiver) GetContactInformation()(*string) { + return m.contactInformation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationReceiver) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contactInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactInformation(val) + } + return nil + } + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(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 + } + return res +} +// GetLocale gets the locale property value. Defines the language and format in which the notification will be sent. Supported locale values are: en-us, cs-cz, de-de, es-es, fr-fr, hu-hu, it-it, ja-jp, ko-kr, nl-nl, pl-pl, pt-br, pt-pt, ru-ru, sv-se, tr-tr, zh-cn, zh-tw. +func (m *NotificationReceiver) GetLocale()(*string) { + return m.locale +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NotificationReceiver) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *NotificationReceiver) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("contactInformation", m.GetContactInformation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *NotificationReceiver) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContactInformation sets the contactInformation property value. The contact information about the notification receivers, such as an email address. Currently, only email and portal notifications are supported. For portal notifications, contactInformation can be left blank. For email notifications, contactInformation consists of an email address such as serena.davis@contoso.com. +func (m *NotificationReceiver) SetContactInformation(value *string)() { + m.contactInformation = value +} +// SetLocale sets the locale property value. Defines the language and format in which the notification will be sent. Supported locale values are: en-us, cs-cz, de-de, es-es, fr-fr, hu-hu, it-it, ja-jp, ko-kr, nl-nl, pl-pl, pt-br, pt-pt, ru-ru, sv-se, tr-tr, zh-cn, zh-tw. +func (m *NotificationReceiver) SetLocale(value *string)() { + m.locale = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NotificationReceiver) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_response.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_response.go new file mode 100644 index 000000000..88fb0dd55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_response.go @@ -0,0 +1,69 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationReceiverCollectionResponse +type NotificationReceiverCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []NotificationReceiverable +} +// NewNotificationReceiverCollectionResponse instantiates a new NotificationReceiverCollectionResponse and sets the default values. +func NewNotificationReceiverCollectionResponse()(*NotificationReceiverCollectionResponse) { + m := &NotificationReceiverCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotificationReceiverCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationReceiverCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationReceiverCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationReceiverCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationReceiverFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationReceiverable, len(val)) + for i, v := range val { + res[i] = v.(NotificationReceiverable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotificationReceiverCollectionResponse) GetValue()([]NotificationReceiverable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotificationReceiverCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotificationReceiverCollectionResponse) SetValue(value []NotificationReceiverable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_responseable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_responseable.go new file mode 100644 index 000000000..f5cc73110 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiver_collection_responseable.go @@ -0,0 +1,14 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationReceiverCollectionResponseable +type NotificationReceiverCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NotificationReceiverable) + SetValue(value []NotificationReceiverable)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiverable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiverable.go new file mode 100644 index 000000000..c69599a89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/notification_receiverable.go @@ -0,0 +1,17 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationReceiverable +type NotificationReceiverable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContactInformation()(*string) + GetLocale()(*string) + GetOdataType()(*string) + SetContactInformation(value *string)() + SetLocale(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/operator_type.go b/src/internal/connector/graph/betasdk/models/devicemanagement/operator_type.go new file mode 100644 index 000000000..4f7c5a0fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/operator_type.go @@ -0,0 +1,49 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OperatorType int + +const ( + GREATEROREQUAL_OPERATORTYPE OperatorType = iota + EQUAL_OPERATORTYPE + GREATER_OPERATORTYPE + LESS_OPERATORTYPE + LESSOREQUAL_OPERATORTYPE + NOTEQUAL_OPERATORTYPE + UNKNOWNFUTUREVALUE_OPERATORTYPE +) + +func (i OperatorType) String() string { + return []string{"greaterOrEqual", "equal", "greater", "less", "lessOrEqual", "notEqual", "unknownFutureValue"}[i] +} +func ParseOperatorType(v string) (interface{}, error) { + result := GREATEROREQUAL_OPERATORTYPE + switch v { + case "greaterOrEqual": + result = GREATEROREQUAL_OPERATORTYPE + case "equal": + result = EQUAL_OPERATORTYPE + case "greater": + result = GREATER_OPERATORTYPE + case "less": + result = LESS_OPERATORTYPE + case "lessOrEqual": + result = LESSOREQUAL_OPERATORTYPE + case "notEqual": + result = NOTEQUAL_OPERATORTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OPERATORTYPE + default: + return 0, errors.New("Unknown OperatorType value: " + v) + } + return &result, nil +} +func SerializeOperatorType(values []OperatorType) []string { + 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/devicemanagement/rule_severity_type.go b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_severity_type.go new file mode 100644 index 000000000..f69e65b56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_severity_type.go @@ -0,0 +1,43 @@ +package devicemanagement +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RuleSeverityType int + +const ( + UNKNOWN_RULESEVERITYTYPE RuleSeverityType = iota + INFORMATIONAL_RULESEVERITYTYPE + WARNING_RULESEVERITYTYPE + CRITICAL_RULESEVERITYTYPE + UNKNOWNFUTUREVALUE_RULESEVERITYTYPE +) + +func (i RuleSeverityType) String() string { + return []string{"unknown", "informational", "warning", "critical", "unknownFutureValue"}[i] +} +func ParseRuleSeverityType(v string) (interface{}, error) { + result := UNKNOWN_RULESEVERITYTYPE + switch v { + case "unknown": + result = UNKNOWN_RULESEVERITYTYPE + case "informational": + result = INFORMATIONAL_RULESEVERITYTYPE + case "warning": + result = WARNING_RULESEVERITYTYPE + case "critical": + result = CRITICAL_RULESEVERITYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RULESEVERITYTYPE + default: + return 0, errors.New("Unknown RuleSeverityType value: " + v) + } + return &result, nil +} +func SerializeRuleSeverityType(values []RuleSeverityType) []string { + 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/devicemanagement/rule_threshold.go b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_threshold.go new file mode 100644 index 000000000..c244e67b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_threshold.go @@ -0,0 +1,151 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RuleThreshold +type RuleThreshold 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 built-in aggregation methods. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. + aggregation *AggregationType + // The OdataType property + odataType *string + // Indicates the built-in operator. The possible values are: greaterOrEqual, equal, greater, less, lessOrEqual, notEqual, unknownFutureValue. + operator *OperatorType + // The target threshold value. + target *int32 +} +// NewRuleThreshold instantiates a new ruleThreshold and sets the default values. +func NewRuleThreshold()(*RuleThreshold) { + m := &RuleThreshold{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRuleThresholdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRuleThresholdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleThreshold(), 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 *RuleThreshold) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAggregation gets the aggregation property value. Indicates the built-in aggregation methods. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *RuleThreshold) GetAggregation()(*AggregationType) { + return m.aggregation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RuleThreshold) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aggregation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAggregationType) + if err != nil { + return err + } + if val != nil { + m.SetAggregation(val.(*AggregationType)) + } + 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["operator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperatorType) + if err != nil { + return err + } + if val != nil { + m.SetOperator(val.(*OperatorType)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RuleThreshold) GetOdataType()(*string) { + return m.odataType +} +// GetOperator gets the operator property value. Indicates the built-in operator. The possible values are: greaterOrEqual, equal, greater, less, lessOrEqual, notEqual, unknownFutureValue. +func (m *RuleThreshold) GetOperator()(*OperatorType) { + return m.operator +} +// GetTarget gets the target property value. The target threshold value. +func (m *RuleThreshold) GetTarget()(*int32) { + return m.target +} +// Serialize serializes information the current object +func (m *RuleThreshold) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAggregation() != nil { + cast := (*m.GetAggregation()).String() + err := writer.WriteStringValue("aggregation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOperator() != nil { + cast := (*m.GetOperator()).String() + err := writer.WriteStringValue("operator", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("target", m.GetTarget()) + 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 *RuleThreshold) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAggregation sets the aggregation property value. Indicates the built-in aggregation methods. The possible values are: count, percentage, affectedCloudPcCount, affectedCloudPcPercentage, unknownFutureValue. +func (m *RuleThreshold) SetAggregation(value *AggregationType)() { + m.aggregation = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RuleThreshold) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperator sets the operator property value. Indicates the built-in operator. The possible values are: greaterOrEqual, equal, greater, less, lessOrEqual, notEqual, unknownFutureValue. +func (m *RuleThreshold) SetOperator(value *OperatorType)() { + m.operator = value +} +// SetTarget sets the target property value. The target threshold value. +func (m *RuleThreshold) SetTarget(value *int32)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/devicemanagement/rule_thresholdable.go b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_thresholdable.go new file mode 100644 index 000000000..22fd66bc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devicemanagement/rule_thresholdable.go @@ -0,0 +1,19 @@ +package devicemanagement + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RuleThresholdable +type RuleThresholdable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregation()(*AggregationType) + GetOdataType()(*string) + GetOperator()(*OperatorType) + GetTarget()(*int32) + SetAggregation(value *AggregationType)() + SetOdataType(value *string)() + SetOperator(value *OperatorType)() + SetTarget(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/devices_filter.go b/src/internal/connector/graph/betasdk/models/devices_filter.go new file mode 100644 index 000000000..37e3d3ecf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devices_filter.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DevicesFilter +type DevicesFilter 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 mode property + mode *CrossTenantAccessPolicyTargetConfigurationAccessType + // The OdataType property + odataType *string + // The rule property + rule *string +} +// NewDevicesFilter instantiates a new devicesFilter and sets the default values. +func NewDevicesFilter()(*DevicesFilter) { + m := &DevicesFilter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDevicesFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDevicesFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDevicesFilter(), 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 *DevicesFilter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DevicesFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCrossTenantAccessPolicyTargetConfigurationAccessType) + if err != nil { + return err + } + if val != nil { + m.SetMode(val.(*CrossTenantAccessPolicyTargetConfigurationAccessType)) + } + 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["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRule(val) + } + return nil + } + return res +} +// GetMode gets the mode property value. The mode property +func (m *DevicesFilter) GetMode()(*CrossTenantAccessPolicyTargetConfigurationAccessType) { + return m.mode +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DevicesFilter) GetOdataType()(*string) { + return m.odataType +} +// GetRule gets the rule property value. The rule property +func (m *DevicesFilter) GetRule()(*string) { + return m.rule +} +// Serialize serializes information the current object +func (m *DevicesFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMode() != nil { + cast := (*m.GetMode()).String() + err := writer.WriteStringValue("mode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rule", m.GetRule()) + 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 *DevicesFilter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMode sets the mode property value. The mode property +func (m *DevicesFilter) SetMode(value *CrossTenantAccessPolicyTargetConfigurationAccessType)() { + m.mode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DevicesFilter) SetOdataType(value *string)() { + m.odataType = value +} +// SetRule sets the rule property value. The rule property +func (m *DevicesFilter) SetRule(value *string)() { + m.rule = value +} diff --git a/src/internal/connector/graph/betasdk/models/devices_filterable.go b/src/internal/connector/graph/betasdk/models/devices_filterable.go new file mode 100644 index 000000000..151d548dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/devices_filterable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DevicesFilterable +type DevicesFilterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMode()(*CrossTenantAccessPolicyTargetConfigurationAccessType) + GetOdataType()(*string) + GetRule()(*string) + SetMode(value *CrossTenantAccessPolicyTargetConfigurationAccessType)() + SetOdataType(value *string)() + SetRule(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/diagnostic_data_submission_mode.go b/src/internal/connector/graph/betasdk/models/diagnostic_data_submission_mode.go new file mode 100644 index 000000000..efdf914ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/diagnostic_data_submission_mode.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DiagnosticDataSubmissionMode int + +const ( + // Allow the user to set. + USERDEFINED_DIAGNOSTICDATASUBMISSIONMODE DiagnosticDataSubmissionMode = iota + // No telemetry data is sent from OS components. Note: This value is only applicable to enterprise and server devices. Using this setting on other devices is equivalent to setting the value of 1. + NONE_DIAGNOSTICDATASUBMISSIONMODE + // Sends basic telemetry data. + BASIC_DIAGNOSTICDATASUBMISSIONMODE + // Sends enhanced telemetry data including usage and insights data. + ENHANCED_DIAGNOSTICDATASUBMISSIONMODE + // Sends full telemetry data including diagnostic data, such as system state. + FULL_DIAGNOSTICDATASUBMISSIONMODE +) + +func (i DiagnosticDataSubmissionMode) String() string { + return []string{"userDefined", "none", "basic", "enhanced", "full"}[i] +} +func ParseDiagnosticDataSubmissionMode(v string) (interface{}, error) { + result := USERDEFINED_DIAGNOSTICDATASUBMISSIONMODE + switch v { + case "userDefined": + result = USERDEFINED_DIAGNOSTICDATASUBMISSIONMODE + case "none": + result = NONE_DIAGNOSTICDATASUBMISSIONMODE + case "basic": + result = BASIC_DIAGNOSTICDATASUBMISSIONMODE + case "enhanced": + result = ENHANCED_DIAGNOSTICDATASUBMISSIONMODE + case "full": + result = FULL_DIAGNOSTICDATASUBMISSIONMODE + default: + return 0, errors.New("Unknown DiagnosticDataSubmissionMode value: " + v) + } + return &result, nil +} +func SerializeDiagnosticDataSubmissionMode(values []DiagnosticDataSubmissionMode) []string { + 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/diamond_model.go b/src/internal/connector/graph/betasdk/models/diamond_model.go new file mode 100644 index 000000000..762ea7144 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/diamond_model.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DiamondModel int + +const ( + UNKNOWN_DIAMONDMODEL DiamondModel = iota + ADVERSARY_DIAMONDMODEL + CAPABILITY_DIAMONDMODEL + INFRASTRUCTURE_DIAMONDMODEL + VICTIM_DIAMONDMODEL + UNKNOWNFUTUREVALUE_DIAMONDMODEL +) + +func (i DiamondModel) String() string { + return []string{"unknown", "adversary", "capability", "infrastructure", "victim", "unknownFutureValue"}[i] +} +func ParseDiamondModel(v string) (interface{}, error) { + result := UNKNOWN_DIAMONDMODEL + switch v { + case "unknown": + result = UNKNOWN_DIAMONDMODEL + case "adversary": + result = ADVERSARY_DIAMONDMODEL + case "capability": + result = CAPABILITY_DIAMONDMODEL + case "infrastructure": + result = INFRASTRUCTURE_DIAMONDMODEL + case "victim": + result = VICTIM_DIAMONDMODEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DIAMONDMODEL + default: + return 0, errors.New("Unknown DiamondModel value: " + v) + } + return &result, nil +} +func SerializeDiamondModel(values []DiamondModel) []string { + 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/diffie_hellman_group.go b/src/internal/connector/graph/betasdk/models/diffie_hellman_group.go new file mode 100644 index 000000000..50550291f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/diffie_hellman_group.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DiffieHellmanGroup int + +const ( + // Group1 + GROUP1_DIFFIEHELLMANGROUP DiffieHellmanGroup = iota + // Group2 + GROUP2_DIFFIEHELLMANGROUP + // Group14 + GROUP14_DIFFIEHELLMANGROUP + // ECP256 + ECP256_DIFFIEHELLMANGROUP + // ECP384 + ECP384_DIFFIEHELLMANGROUP + // Group24 + GROUP24_DIFFIEHELLMANGROUP +) + +func (i DiffieHellmanGroup) String() string { + return []string{"group1", "group2", "group14", "ecp256", "ecp384", "group24"}[i] +} +func ParseDiffieHellmanGroup(v string) (interface{}, error) { + result := GROUP1_DIFFIEHELLMANGROUP + switch v { + case "group1": + result = GROUP1_DIFFIEHELLMANGROUP + case "group2": + result = GROUP2_DIFFIEHELLMANGROUP + case "group14": + result = GROUP14_DIFFIEHELLMANGROUP + case "ecp256": + result = ECP256_DIFFIEHELLMANGROUP + case "ecp384": + result = ECP384_DIFFIEHELLMANGROUP + case "group24": + result = GROUP24_DIFFIEHELLMANGROUP + default: + return 0, errors.New("Unknown DiffieHellmanGroup value: " + v) + } + return &result, nil +} +func SerializeDiffieHellmanGroup(values []DiffieHellmanGroup) []string { + 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/dimension.go b/src/internal/connector/graph/betasdk/models/dimension.go new file mode 100644 index 000000000..80729f53c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension.go @@ -0,0 +1,147 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Dimension provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Dimension struct { + Entity + // The code property + code *string + // The dimensionValues property + dimensionValues []DimensionValueable + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDimension instantiates a new dimension and sets the default values. +func NewDimension()(*Dimension) { + m := &Dimension{ + Entity: *NewEntity(), + } + return m +} +// CreateDimensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDimensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDimension(), nil +} +// GetCode gets the code property value. The code property +func (m *Dimension) GetCode()(*string) { + return m.code +} +// GetDimensionValues gets the dimensionValues property value. The dimensionValues property +func (m *Dimension) GetDimensionValues()([]DimensionValueable) { + return m.dimensionValues +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Dimension) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Dimension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["dimensionValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDimensionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DimensionValueable, len(val)) + for i, v := range val { + res[i] = v.(DimensionValueable) + } + m.SetDimensionValues(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Dimension) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *Dimension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + if m.GetDimensionValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDimensionValues())) + for i, v := range m.GetDimensionValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dimensionValues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCode sets the code property value. The code property +func (m *Dimension) SetCode(value *string)() { + m.code = value +} +// SetDimensionValues sets the dimensionValues property value. The dimensionValues property +func (m *Dimension) SetDimensionValues(value []DimensionValueable)() { + m.dimensionValues = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Dimension) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Dimension) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_collection_response.go b/src/internal/connector/graph/betasdk/models/dimension_collection_response.go new file mode 100644 index 000000000..4a964b7a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionCollectionResponse +type DimensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Dimensionable +} +// NewDimensionCollectionResponse instantiates a new DimensionCollectionResponse and sets the default values. +func NewDimensionCollectionResponse()(*DimensionCollectionResponse) { + m := &DimensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDimensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDimensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDimensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DimensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDimensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Dimensionable, len(val)) + for i, v := range val { + res[i] = v.(Dimensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DimensionCollectionResponse) GetValue()([]Dimensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DimensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DimensionCollectionResponse) SetValue(value []Dimensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dimension_collection_responseable.go new file mode 100644 index 000000000..ca12fd1ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionCollectionResponseable +type DimensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Dimensionable) + SetValue(value []Dimensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_value.go b/src/internal/connector/graph/betasdk/models/dimension_value.go new file mode 100644 index 000000000..774a1b413 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_value.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionValue provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DimensionValue struct { + Entity + // The code property + code *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDimensionValue instantiates a new dimensionValue and sets the default values. +func NewDimensionValue()(*DimensionValue) { + m := &DimensionValue{ + Entity: *NewEntity(), + } + return m +} +// CreateDimensionValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDimensionValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDimensionValue(), nil +} +// GetCode gets the code property value. The code property +func (m *DimensionValue) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *DimensionValue) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DimensionValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *DimensionValue) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *DimensionValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCode sets the code property value. The code property +func (m *DimensionValue) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *DimensionValue) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *DimensionValue) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_value_collection_response.go b/src/internal/connector/graph/betasdk/models/dimension_value_collection_response.go new file mode 100644 index 000000000..40acc70cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionValueCollectionResponse +type DimensionValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DimensionValueable +} +// NewDimensionValueCollectionResponse instantiates a new DimensionValueCollectionResponse and sets the default values. +func NewDimensionValueCollectionResponse()(*DimensionValueCollectionResponse) { + m := &DimensionValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDimensionValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDimensionValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDimensionValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DimensionValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDimensionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DimensionValueable, len(val)) + for i, v := range val { + res[i] = v.(DimensionValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DimensionValueCollectionResponse) GetValue()([]DimensionValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *DimensionValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DimensionValueCollectionResponse) SetValue(value []DimensionValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dimension_value_collection_responseable.go new file mode 100644 index 000000000..cf04ba34d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionValueCollectionResponseable +type DimensionValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DimensionValueable) + SetValue(value []DimensionValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dimension_valueable.go b/src/internal/connector/graph/betasdk/models/dimension_valueable.go new file mode 100644 index 000000000..93f0ac3c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimension_valueable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DimensionValueable +type DimensionValueable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCode(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/dimensionable.go b/src/internal/connector/graph/betasdk/models/dimensionable.go new file mode 100644 index 000000000..42e4424d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dimensionable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Dimensionable +type Dimensionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDimensionValues()([]DimensionValueable) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCode(value *string)() + SetDimensionValues(value []DimensionValueable)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory.go b/src/internal/connector/graph/betasdk/models/directory.go new file mode 100644 index 000000000..091dce5ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory.go @@ -0,0 +1,442 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Directory +type Directory struct { + Entity + // Conceptual container for user and group directory objects. + administrativeUnits []AdministrativeUnitable + // Group of related custom security attribute definitions. + attributeSets []AttributeSetable + // Schema of a custom security attributes (key-value pairs). + customSecurityAttributeDefinitions []CustomSecurityAttributeDefinitionable + // The deletedItems property + deletedItems []DirectoryObjectable + // The featureRolloutPolicies property + featureRolloutPolicies []FeatureRolloutPolicyable + // Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. + federationConfigurations []IdentityProviderBaseable + // The impactedResources property + impactedResources []ImpactedResourceable + // The inboundSharedUserProfiles property + inboundSharedUserProfiles []InboundSharedUserProfileable + // A container for on-premises directory synchronization functionalities that are available for the organization. + onPremisesSynchronization []OnPremisesDirectorySynchronizationable + // The outboundSharedUserProfiles property + outboundSharedUserProfiles []OutboundSharedUserProfileable + // The recommendations property + recommendations []Recommendationable + // The sharedEmailDomains property + sharedEmailDomains []SharedEmailDomainable +} +// NewDirectory instantiates a new Directory and sets the default values. +func NewDirectory()(*Directory) { + m := &Directory{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectory(), nil +} +// GetAdministrativeUnits gets the administrativeUnits property value. Conceptual container for user and group directory objects. +func (m *Directory) GetAdministrativeUnits()([]AdministrativeUnitable) { + return m.administrativeUnits +} +// GetAttributeSets gets the attributeSets property value. Group of related custom security attribute definitions. +func (m *Directory) GetAttributeSets()([]AttributeSetable) { + return m.attributeSets +} +// GetCustomSecurityAttributeDefinitions gets the customSecurityAttributeDefinitions property value. Schema of a custom security attributes (key-value pairs). +func (m *Directory) GetCustomSecurityAttributeDefinitions()([]CustomSecurityAttributeDefinitionable) { + return m.customSecurityAttributeDefinitions +} +// GetDeletedItems gets the deletedItems property value. The deletedItems property +func (m *Directory) GetDeletedItems()([]DirectoryObjectable) { + return m.deletedItems +} +// GetFeatureRolloutPolicies gets the featureRolloutPolicies property value. The featureRolloutPolicies property +func (m *Directory) GetFeatureRolloutPolicies()([]FeatureRolloutPolicyable) { + return m.featureRolloutPolicies +} +// GetFederationConfigurations gets the federationConfigurations property value. Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. +func (m *Directory) GetFederationConfigurations()([]IdentityProviderBaseable) { + return m.federationConfigurations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Directory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["administrativeUnits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAdministrativeUnitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AdministrativeUnitable, len(val)) + for i, v := range val { + res[i] = v.(AdministrativeUnitable) + } + m.SetAdministrativeUnits(res) + } + return nil + } + res["attributeSets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeSetable, len(val)) + for i, v := range val { + res[i] = v.(AttributeSetable) + } + m.SetAttributeSets(res) + } + return nil + } + res["customSecurityAttributeDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSecurityAttributeDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSecurityAttributeDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(CustomSecurityAttributeDefinitionable) + } + m.SetCustomSecurityAttributeDefinitions(res) + } + return nil + } + res["deletedItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetDeletedItems(res) + } + return nil + } + res["featureRolloutPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFeatureRolloutPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FeatureRolloutPolicyable, len(val)) + for i, v := range val { + res[i] = v.(FeatureRolloutPolicyable) + } + m.SetFeatureRolloutPolicies(res) + } + return nil + } + res["federationConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderBaseable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderBaseable) + } + m.SetFederationConfigurations(res) + } + return nil + } + res["impactedResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImpactedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImpactedResourceable, len(val)) + for i, v := range val { + res[i] = v.(ImpactedResourceable) + } + m.SetImpactedResources(res) + } + return nil + } + res["inboundSharedUserProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInboundSharedUserProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InboundSharedUserProfileable, len(val)) + for i, v := range val { + res[i] = v.(InboundSharedUserProfileable) + } + m.SetInboundSharedUserProfiles(res) + } + return nil + } + res["onPremisesSynchronization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesDirectorySynchronizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesDirectorySynchronizationable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesDirectorySynchronizationable) + } + m.SetOnPremisesSynchronization(res) + } + return nil + } + res["outboundSharedUserProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutboundSharedUserProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutboundSharedUserProfileable, len(val)) + for i, v := range val { + res[i] = v.(OutboundSharedUserProfileable) + } + m.SetOutboundSharedUserProfiles(res) + } + return nil + } + res["recommendations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecommendationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recommendationable, len(val)) + for i, v := range val { + res[i] = v.(Recommendationable) + } + m.SetRecommendations(res) + } + return nil + } + res["sharedEmailDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedEmailDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedEmailDomainable, len(val)) + for i, v := range val { + res[i] = v.(SharedEmailDomainable) + } + m.SetSharedEmailDomains(res) + } + return nil + } + return res +} +// GetImpactedResources gets the impactedResources property value. The impactedResources property +func (m *Directory) GetImpactedResources()([]ImpactedResourceable) { + return m.impactedResources +} +// GetInboundSharedUserProfiles gets the inboundSharedUserProfiles property value. The inboundSharedUserProfiles property +func (m *Directory) GetInboundSharedUserProfiles()([]InboundSharedUserProfileable) { + return m.inboundSharedUserProfiles +} +// GetOnPremisesSynchronization gets the onPremisesSynchronization property value. A container for on-premises directory synchronization functionalities that are available for the organization. +func (m *Directory) GetOnPremisesSynchronization()([]OnPremisesDirectorySynchronizationable) { + return m.onPremisesSynchronization +} +// GetOutboundSharedUserProfiles gets the outboundSharedUserProfiles property value. The outboundSharedUserProfiles property +func (m *Directory) GetOutboundSharedUserProfiles()([]OutboundSharedUserProfileable) { + return m.outboundSharedUserProfiles +} +// GetRecommendations gets the recommendations property value. The recommendations property +func (m *Directory) GetRecommendations()([]Recommendationable) { + return m.recommendations +} +// GetSharedEmailDomains gets the sharedEmailDomains property value. The sharedEmailDomains property +func (m *Directory) GetSharedEmailDomains()([]SharedEmailDomainable) { + return m.sharedEmailDomains +} +// Serialize serializes information the current object +func (m *Directory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdministrativeUnits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdministrativeUnits())) + for i, v := range m.GetAdministrativeUnits() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("administrativeUnits", cast) + if err != nil { + return err + } + } + if m.GetAttributeSets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttributeSets())) + for i, v := range m.GetAttributeSets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attributeSets", cast) + if err != nil { + return err + } + } + if m.GetCustomSecurityAttributeDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSecurityAttributeDefinitions())) + for i, v := range m.GetCustomSecurityAttributeDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSecurityAttributeDefinitions", cast) + if err != nil { + return err + } + } + if m.GetDeletedItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeletedItems())) + for i, v := range m.GetDeletedItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deletedItems", cast) + if err != nil { + return err + } + } + if m.GetFeatureRolloutPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFeatureRolloutPolicies())) + for i, v := range m.GetFeatureRolloutPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("featureRolloutPolicies", cast) + if err != nil { + return err + } + } + if m.GetFederationConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFederationConfigurations())) + for i, v := range m.GetFederationConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("federationConfigurations", cast) + if err != nil { + return err + } + } + if m.GetImpactedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImpactedResources())) + for i, v := range m.GetImpactedResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("impactedResources", cast) + if err != nil { + return err + } + } + if m.GetInboundSharedUserProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInboundSharedUserProfiles())) + for i, v := range m.GetInboundSharedUserProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("inboundSharedUserProfiles", cast) + if err != nil { + return err + } + } + if m.GetOnPremisesSynchronization() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnPremisesSynchronization())) + for i, v := range m.GetOnPremisesSynchronization() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onPremisesSynchronization", cast) + if err != nil { + return err + } + } + if m.GetOutboundSharedUserProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOutboundSharedUserProfiles())) + for i, v := range m.GetOutboundSharedUserProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("outboundSharedUserProfiles", cast) + if err != nil { + return err + } + } + if m.GetRecommendations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecommendations())) + for i, v := range m.GetRecommendations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("recommendations", cast) + if err != nil { + return err + } + } + if m.GetSharedEmailDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedEmailDomains())) + for i, v := range m.GetSharedEmailDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharedEmailDomains", cast) + if err != nil { + return err + } + } + return nil +} +// SetAdministrativeUnits sets the administrativeUnits property value. Conceptual container for user and group directory objects. +func (m *Directory) SetAdministrativeUnits(value []AdministrativeUnitable)() { + m.administrativeUnits = value +} +// SetAttributeSets sets the attributeSets property value. Group of related custom security attribute definitions. +func (m *Directory) SetAttributeSets(value []AttributeSetable)() { + m.attributeSets = value +} +// SetCustomSecurityAttributeDefinitions sets the customSecurityAttributeDefinitions property value. Schema of a custom security attributes (key-value pairs). +func (m *Directory) SetCustomSecurityAttributeDefinitions(value []CustomSecurityAttributeDefinitionable)() { + m.customSecurityAttributeDefinitions = value +} +// SetDeletedItems sets the deletedItems property value. The deletedItems property +func (m *Directory) SetDeletedItems(value []DirectoryObjectable)() { + m.deletedItems = value +} +// SetFeatureRolloutPolicies sets the featureRolloutPolicies property value. The featureRolloutPolicies property +func (m *Directory) SetFeatureRolloutPolicies(value []FeatureRolloutPolicyable)() { + m.featureRolloutPolicies = value +} +// SetFederationConfigurations sets the federationConfigurations property value. Configure domain federation with organizations whose identity provider (IdP) supports either the SAML or WS-Fed protocol. +func (m *Directory) SetFederationConfigurations(value []IdentityProviderBaseable)() { + m.federationConfigurations = value +} +// SetImpactedResources sets the impactedResources property value. The impactedResources property +func (m *Directory) SetImpactedResources(value []ImpactedResourceable)() { + m.impactedResources = value +} +// SetInboundSharedUserProfiles sets the inboundSharedUserProfiles property value. The inboundSharedUserProfiles property +func (m *Directory) SetInboundSharedUserProfiles(value []InboundSharedUserProfileable)() { + m.inboundSharedUserProfiles = value +} +// SetOnPremisesSynchronization sets the onPremisesSynchronization property value. A container for on-premises directory synchronization functionalities that are available for the organization. +func (m *Directory) SetOnPremisesSynchronization(value []OnPremisesDirectorySynchronizationable)() { + m.onPremisesSynchronization = value +} +// SetOutboundSharedUserProfiles sets the outboundSharedUserProfiles property value. The outboundSharedUserProfiles property +func (m *Directory) SetOutboundSharedUserProfiles(value []OutboundSharedUserProfileable)() { + m.outboundSharedUserProfiles = value +} +// SetRecommendations sets the recommendations property value. The recommendations property +func (m *Directory) SetRecommendations(value []Recommendationable)() { + m.recommendations = value +} +// SetSharedEmailDomains sets the sharedEmailDomains property value. The sharedEmailDomains property +func (m *Directory) SetSharedEmailDomains(value []SharedEmailDomainable)() { + m.sharedEmailDomains = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_audit.go b/src/internal/connector/graph/betasdk/models/directory_audit.go new file mode 100644 index 000000000..bfdd044d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_audit.go @@ -0,0 +1,364 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryAudit +type DirectoryAudit struct { + Entity + // Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates the activity name or the operation name (E.g. 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure Ad activity list. + activityDisplayName *string + // Indicates additional details on the activity. + additionalDetails []KeyValueable + // Indicates which resource category that's targeted by the activity. For example: UserManagement, GroupManagement, ApplicationManagement, RoleManagement. + category *string + // Indicates a unique ID that helps correlate activities that span across various services. Can be used to trace logs across services. + correlationId *string + // The initiatedBy property + initiatedBy AuditActivityInitiatorable + // Indicates information on which service initiated the activity (For example: Self-service Password Management, Core Directory, B2C, Invited Users, Microsoft Identity Manager, Privileged Identity Management. + loggedByService *string + // Indicates the type of operation that was performed. The possible values include but are not limited to the following: Add, Assign, Update, Unassign, and Delete. + operationType *string + // Indicates the result of the activity. Possible values are: success, failure, timeout, unknownFutureValue. + result *OperationResult + // Indicates the reason for failure if the result is failure or timeout. + resultReason *string + // Information about the resource that changed due to the activity. + targetResources []TargetResourceable + // Type of user agent used by a user in the activity. + userAgent *string +} +// NewDirectoryAudit instantiates a new DirectoryAudit and sets the default values. +func NewDirectoryAudit()(*DirectoryAudit) { + m := &DirectoryAudit{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectoryAuditFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryAuditFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryAudit(), nil +} +// GetActivityDateTime gets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *DirectoryAudit) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetActivityDisplayName gets the activityDisplayName property value. Indicates the activity name or the operation name (E.g. 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure Ad activity list. +func (m *DirectoryAudit) GetActivityDisplayName()(*string) { + return m.activityDisplayName +} +// GetAdditionalDetails gets the additionalDetails property value. Indicates additional details on the activity. +func (m *DirectoryAudit) GetAdditionalDetails()([]KeyValueable) { + return m.additionalDetails +} +// GetCategory gets the category property value. Indicates which resource category that's targeted by the activity. For example: UserManagement, GroupManagement, ApplicationManagement, RoleManagement. +func (m *DirectoryAudit) GetCategory()(*string) { + return m.category +} +// GetCorrelationId gets the correlationId property value. Indicates a unique ID that helps correlate activities that span across various services. Can be used to trace logs across services. +func (m *DirectoryAudit) GetCorrelationId()(*string) { + return m.correlationId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryAudit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["activityDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDisplayName(val) + } + return nil + } + res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetAdditionalDetails(res) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["initiatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuditActivityInitiatorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiatedBy(val.(AuditActivityInitiatorable)) + } + return nil + } + res["loggedByService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoggedByService(val) + } + return nil + } + res["operationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperationType(val) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationResult) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(*OperationResult)) + } + return nil + } + res["resultReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResultReason(val) + } + return nil + } + res["targetResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTargetResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TargetResourceable, len(val)) + for i, v := range val { + res[i] = v.(TargetResourceable) + } + m.SetTargetResources(res) + } + return nil + } + res["userAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserAgent(val) + } + return nil + } + return res +} +// GetInitiatedBy gets the initiatedBy property value. The initiatedBy property +func (m *DirectoryAudit) GetInitiatedBy()(AuditActivityInitiatorable) { + return m.initiatedBy +} +// GetLoggedByService gets the loggedByService property value. Indicates information on which service initiated the activity (For example: Self-service Password Management, Core Directory, B2C, Invited Users, Microsoft Identity Manager, Privileged Identity Management. +func (m *DirectoryAudit) GetLoggedByService()(*string) { + return m.loggedByService +} +// GetOperationType gets the operationType property value. Indicates the type of operation that was performed. The possible values include but are not limited to the following: Add, Assign, Update, Unassign, and Delete. +func (m *DirectoryAudit) GetOperationType()(*string) { + return m.operationType +} +// GetResult gets the result property value. Indicates the result of the activity. Possible values are: success, failure, timeout, unknownFutureValue. +func (m *DirectoryAudit) GetResult()(*OperationResult) { + return m.result +} +// GetResultReason gets the resultReason property value. Indicates the reason for failure if the result is failure or timeout. +func (m *DirectoryAudit) GetResultReason()(*string) { + return m.resultReason +} +// GetTargetResources gets the targetResources property value. Information about the resource that changed due to the activity. +func (m *DirectoryAudit) GetTargetResources()([]TargetResourceable) { + return m.targetResources +} +// GetUserAgent gets the userAgent property value. Type of user agent used by a user in the activity. +func (m *DirectoryAudit) GetUserAgent()(*string) { + return m.userAgent +} +// Serialize serializes information the current object +func (m *DirectoryAudit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityDisplayName", m.GetActivityDisplayName()) + if err != nil { + return err + } + } + if m.GetAdditionalDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalDetails())) + for i, v := range m.GetAdditionalDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiatedBy", m.GetInitiatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("loggedByService", m.GetLoggedByService()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operationType", m.GetOperationType()) + if err != nil { + return err + } + } + if m.GetResult() != nil { + cast := (*m.GetResult()).String() + err = writer.WriteStringValue("result", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resultReason", m.GetResultReason()) + if err != nil { + return err + } + } + if m.GetTargetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetResources())) + for i, v := range m.GetTargetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetResources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userAgent", m.GetUserAgent()) + if err != nil { + return err + } + } + return nil +} +// SetActivityDateTime sets the activityDateTime property value. Indicates the date and time the activity was performed. The Timestamp type is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *DirectoryAudit) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetActivityDisplayName sets the activityDisplayName property value. Indicates the activity name or the operation name (E.g. 'Create User', 'Add member to group'). For a list of activities logged, refer to Azure Ad activity list. +func (m *DirectoryAudit) SetActivityDisplayName(value *string)() { + m.activityDisplayName = value +} +// SetAdditionalDetails sets the additionalDetails property value. Indicates additional details on the activity. +func (m *DirectoryAudit) SetAdditionalDetails(value []KeyValueable)() { + m.additionalDetails = value +} +// SetCategory sets the category property value. Indicates which resource category that's targeted by the activity. For example: UserManagement, GroupManagement, ApplicationManagement, RoleManagement. +func (m *DirectoryAudit) SetCategory(value *string)() { + m.category = value +} +// SetCorrelationId sets the correlationId property value. Indicates a unique ID that helps correlate activities that span across various services. Can be used to trace logs across services. +func (m *DirectoryAudit) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetInitiatedBy sets the initiatedBy property value. The initiatedBy property +func (m *DirectoryAudit) SetInitiatedBy(value AuditActivityInitiatorable)() { + m.initiatedBy = value +} +// SetLoggedByService sets the loggedByService property value. Indicates information on which service initiated the activity (For example: Self-service Password Management, Core Directory, B2C, Invited Users, Microsoft Identity Manager, Privileged Identity Management. +func (m *DirectoryAudit) SetLoggedByService(value *string)() { + m.loggedByService = value +} +// SetOperationType sets the operationType property value. Indicates the type of operation that was performed. The possible values include but are not limited to the following: Add, Assign, Update, Unassign, and Delete. +func (m *DirectoryAudit) SetOperationType(value *string)() { + m.operationType = value +} +// SetResult sets the result property value. Indicates the result of the activity. Possible values are: success, failure, timeout, unknownFutureValue. +func (m *DirectoryAudit) SetResult(value *OperationResult)() { + m.result = value +} +// SetResultReason sets the resultReason property value. Indicates the reason for failure if the result is failure or timeout. +func (m *DirectoryAudit) SetResultReason(value *string)() { + m.resultReason = value +} +// SetTargetResources sets the targetResources property value. Information about the resource that changed due to the activity. +func (m *DirectoryAudit) SetTargetResources(value []TargetResourceable)() { + m.targetResources = value +} +// SetUserAgent sets the userAgent property value. Type of user agent used by a user in the activity. +func (m *DirectoryAudit) SetUserAgent(value *string)() { + m.userAgent = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_audit_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_audit_collection_response.go new file mode 100644 index 000000000..a69b14508 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_audit_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryAuditCollectionResponse +type DirectoryAuditCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryAuditable +} +// NewDirectoryAuditCollectionResponse instantiates a new DirectoryAuditCollectionResponse and sets the default values. +func NewDirectoryAuditCollectionResponse()(*DirectoryAuditCollectionResponse) { + m := &DirectoryAuditCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryAuditCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryAuditCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryAuditCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryAuditCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryAuditFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryAuditable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryAuditable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryAuditCollectionResponse) GetValue()([]DirectoryAuditable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryAuditCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryAuditCollectionResponse) SetValue(value []DirectoryAuditable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_audit_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_audit_collection_responseable.go new file mode 100644 index 000000000..f696d6825 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_audit_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryAuditCollectionResponseable +type DirectoryAuditCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryAuditable) + SetValue(value []DirectoryAuditable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_auditable.go b/src/internal/connector/graph/betasdk/models/directory_auditable.go new file mode 100644 index 000000000..46bdf2095 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_auditable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryAuditable +type DirectoryAuditable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetActivityDisplayName()(*string) + GetAdditionalDetails()([]KeyValueable) + GetCategory()(*string) + GetCorrelationId()(*string) + GetInitiatedBy()(AuditActivityInitiatorable) + GetLoggedByService()(*string) + GetOperationType()(*string) + GetResult()(*OperationResult) + GetResultReason()(*string) + GetTargetResources()([]TargetResourceable) + GetUserAgent()(*string) + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetActivityDisplayName(value *string)() + SetAdditionalDetails(value []KeyValueable)() + SetCategory(value *string)() + SetCorrelationId(value *string)() + SetInitiatedBy(value AuditActivityInitiatorable)() + SetLoggedByService(value *string)() + SetOperationType(value *string)() + SetResult(value *OperationResult)() + SetResultReason(value *string)() + SetTargetResources(value []TargetResourceable)() + SetUserAgent(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_definition.go b/src/internal/connector/graph/betasdk/models/directory_definition.go new file mode 100644 index 000000000..f09f02c12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_definition.go @@ -0,0 +1,200 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DirectoryDefinition struct { + Entity + // The discoverabilities property + discoverabilities *DirectoryDefinitionDiscoverabilities + // Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + discoveryDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the directory. Must be unique within the synchronization schema. Not nullable. + name *string + // Collection of objects supported by the directory. + objects []ObjectDefinitionable + // The readOnly property + readOnly *bool + // Read only value that indicates version discovered. null if discovery has not yet occurred. + version *string +} +// NewDirectoryDefinition instantiates a new directoryDefinition and sets the default values. +func NewDirectoryDefinition()(*DirectoryDefinition) { + m := &DirectoryDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectoryDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryDefinition(), nil +} +// GetDiscoverabilities gets the discoverabilities property value. The discoverabilities property +func (m *DirectoryDefinition) GetDiscoverabilities()(*DirectoryDefinitionDiscoverabilities) { + return m.discoverabilities +} +// GetDiscoveryDateTime gets the discoveryDateTime property value. Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *DirectoryDefinition) GetDiscoveryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.discoveryDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["discoverabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDirectoryDefinitionDiscoverabilities) + if err != nil { + return err + } + if val != nil { + m.SetDiscoverabilities(val.(*DirectoryDefinitionDiscoverabilities)) + } + return nil + } + res["discoveryDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscoveryDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["objects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateObjectDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ObjectDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ObjectDefinitionable) + } + m.SetObjects(res) + } + 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["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the directory. Must be unique within the synchronization schema. Not nullable. +func (m *DirectoryDefinition) GetName()(*string) { + return m.name +} +// GetObjects gets the objects property value. Collection of objects supported by the directory. +func (m *DirectoryDefinition) GetObjects()([]ObjectDefinitionable) { + return m.objects +} +// GetReadOnly gets the readOnly property value. The readOnly property +func (m *DirectoryDefinition) GetReadOnly()(*bool) { + return m.readOnly +} +// GetVersion gets the version property value. Read only value that indicates version discovered. null if discovery has not yet occurred. +func (m *DirectoryDefinition) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *DirectoryDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDiscoverabilities() != nil { + cast := (*m.GetDiscoverabilities()).String() + err = writer.WriteStringValue("discoverabilities", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("discoveryDateTime", m.GetDiscoveryDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetObjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetObjects())) + for i, v := range m.GetObjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("objects", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("readOnly", m.GetReadOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDiscoverabilities sets the discoverabilities property value. The discoverabilities property +func (m *DirectoryDefinition) SetDiscoverabilities(value *DirectoryDefinitionDiscoverabilities)() { + m.discoverabilities = value +} +// SetDiscoveryDateTime sets the discoveryDateTime property value. Represents the discovery date and time using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *DirectoryDefinition) SetDiscoveryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.discoveryDateTime = value +} +// SetName sets the name property value. Name of the directory. Must be unique within the synchronization schema. Not nullable. +func (m *DirectoryDefinition) SetName(value *string)() { + m.name = value +} +// SetObjects sets the objects property value. Collection of objects supported by the directory. +func (m *DirectoryDefinition) SetObjects(value []ObjectDefinitionable)() { + m.objects = value +} +// SetReadOnly sets the readOnly property value. The readOnly property +func (m *DirectoryDefinition) SetReadOnly(value *bool)() { + m.readOnly = value +} +// SetVersion sets the version property value. Read only value that indicates version discovered. null if discovery has not yet occurred. +func (m *DirectoryDefinition) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_definition_collection_response.go new file mode 100644 index 000000000..8cab1a1d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryDefinitionCollectionResponse +type DirectoryDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryDefinitionable +} +// NewDirectoryDefinitionCollectionResponse instantiates a new DirectoryDefinitionCollectionResponse and sets the default values. +func NewDirectoryDefinitionCollectionResponse()(*DirectoryDefinitionCollectionResponse) { + m := &DirectoryDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryDefinitionCollectionResponse) GetValue()([]DirectoryDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryDefinitionCollectionResponse) SetValue(value []DirectoryDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_definition_collection_responseable.go new file mode 100644 index 000000000..329f5fc28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryDefinitionCollectionResponseable +type DirectoryDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryDefinitionable) + SetValue(value []DirectoryDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_definition_discoverabilities.go b/src/internal/connector/graph/betasdk/models/directory_definition_discoverabilities.go new file mode 100644 index 000000000..ac62fe54e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_definition_discoverabilities.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DirectoryDefinitionDiscoverabilities int + +const ( + NONE_DIRECTORYDEFINITIONDISCOVERABILITIES DirectoryDefinitionDiscoverabilities = iota + ATTRIBUTENAMES_DIRECTORYDEFINITIONDISCOVERABILITIES + ATTRIBUTEDATATYPES_DIRECTORYDEFINITIONDISCOVERABILITIES + ATTRIBUTEREADONLY_DIRECTORYDEFINITIONDISCOVERABILITIES + REFERENCEATTRIBUTES_DIRECTORYDEFINITIONDISCOVERABILITIES + UNKNOWNFUTUREVALUE_DIRECTORYDEFINITIONDISCOVERABILITIES +) + +func (i DirectoryDefinitionDiscoverabilities) String() string { + return []string{"None", "AttributeNames", "AttributeDataTypes", "AttributeReadOnly", "ReferenceAttributes", "UnknownFutureValue"}[i] +} +func ParseDirectoryDefinitionDiscoverabilities(v string) (interface{}, error) { + result := NONE_DIRECTORYDEFINITIONDISCOVERABILITIES + switch v { + case "None": + result = NONE_DIRECTORYDEFINITIONDISCOVERABILITIES + case "AttributeNames": + result = ATTRIBUTENAMES_DIRECTORYDEFINITIONDISCOVERABILITIES + case "AttributeDataTypes": + result = ATTRIBUTEDATATYPES_DIRECTORYDEFINITIONDISCOVERABILITIES + case "AttributeReadOnly": + result = ATTRIBUTEREADONLY_DIRECTORYDEFINITIONDISCOVERABILITIES + case "ReferenceAttributes": + result = REFERENCEATTRIBUTES_DIRECTORYDEFINITIONDISCOVERABILITIES + case "UnknownFutureValue": + result = UNKNOWNFUTUREVALUE_DIRECTORYDEFINITIONDISCOVERABILITIES + default: + return 0, errors.New("Unknown DirectoryDefinitionDiscoverabilities value: " + v) + } + return &result, nil +} +func SerializeDirectoryDefinitionDiscoverabilities(values []DirectoryDefinitionDiscoverabilities) []string { + 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/directory_definitionable.go b/src/internal/connector/graph/betasdk/models/directory_definitionable.go new file mode 100644 index 000000000..981f07600 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_definitionable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryDefinitionable +type DirectoryDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDiscoverabilities()(*DirectoryDefinitionDiscoverabilities) + GetDiscoveryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetObjects()([]ObjectDefinitionable) + GetReadOnly()(*bool) + GetVersion()(*string) + SetDiscoverabilities(value *DirectoryDefinitionDiscoverabilities)() + SetDiscoveryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetObjects(value []ObjectDefinitionable)() + SetReadOnly(value *bool)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object.go b/src/internal/connector/graph/betasdk/models/directory_object.go new file mode 100644 index 000000000..5e403e25e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object.go @@ -0,0 +1,141 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObject +type DirectoryObject struct { + Entity + // Date and time when this object was deleted. Always null when the object hasn't been deleted. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewDirectoryObject instantiates a new directoryObject and sets the default values. +func NewDirectoryObject()(*DirectoryObject) { + m := &DirectoryObject{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectoryObjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryObjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.activityBasedTimeoutPolicy": + return NewActivityBasedTimeoutPolicy(), nil + case "#microsoft.graph.administrativeUnit": + return NewAdministrativeUnit(), nil + case "#microsoft.graph.application": + return NewApplication(), nil + case "#microsoft.graph.appManagementPolicy": + return NewAppManagementPolicy(), nil + case "#microsoft.graph.authorizationPolicy": + return NewAuthorizationPolicy(), nil + case "#microsoft.graph.claimsMappingPolicy": + return NewClaimsMappingPolicy(), nil + case "#microsoft.graph.contract": + return NewContract(), nil + case "#microsoft.graph.crossTenantAccessPolicy": + return NewCrossTenantAccessPolicy(), nil + case "#microsoft.graph.device": + return NewDevice(), nil + case "#microsoft.graph.directoryObjectPartnerReference": + return NewDirectoryObjectPartnerReference(), nil + case "#microsoft.graph.directoryRole": + return NewDirectoryRole(), nil + case "#microsoft.graph.directoryRoleTemplate": + return NewDirectoryRoleTemplate(), nil + case "#microsoft.graph.directorySettingTemplate": + return NewDirectorySettingTemplate(), nil + case "#microsoft.graph.endpoint": + return NewEndpoint(), nil + case "#microsoft.graph.extensionProperty": + return NewExtensionProperty(), nil + case "#microsoft.graph.externalIdentitiesPolicy": + return NewExternalIdentitiesPolicy(), nil + case "#microsoft.graph.group": + return NewGroup(), nil + case "#microsoft.graph.homeRealmDiscoveryPolicy": + return NewHomeRealmDiscoveryPolicy(), nil + case "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy": + return NewIdentitySecurityDefaultsEnforcementPolicy(), nil + case "#microsoft.graph.organization": + return NewOrganization(), nil + case "#microsoft.graph.orgContact": + return NewOrgContact(), nil + case "#microsoft.graph.permissionGrantPolicy": + return NewPermissionGrantPolicy(), nil + case "#microsoft.graph.policyBase": + return NewPolicyBase(), nil + case "#microsoft.graph.resourceSpecificPermissionGrant": + return NewResourceSpecificPermissionGrant(), nil + case "#microsoft.graph.servicePrincipal": + return NewServicePrincipal(), nil + case "#microsoft.graph.servicePrincipalCreationPolicy": + return NewServicePrincipalCreationPolicy(), nil + case "#microsoft.graph.stsPolicy": + return NewStsPolicy(), nil + case "#microsoft.graph.tenantAppManagementPolicy": + return NewTenantAppManagementPolicy(), nil + case "#microsoft.graph.tenantRelationshipAccessPolicyBase": + return NewTenantRelationshipAccessPolicyBase(), nil + case "#microsoft.graph.tokenIssuancePolicy": + return NewTokenIssuancePolicy(), nil + case "#microsoft.graph.tokenLifetimePolicy": + return NewTokenLifetimePolicy(), nil + case "#microsoft.graph.user": + return NewUser(), nil + } + } + } + } + return NewDirectoryObject(), nil +} +// GetDeletedDateTime gets the deletedDateTime property value. Date and time when this object was deleted. Always null when the object hasn't been deleted. +func (m *DirectoryObject) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryObject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DirectoryObject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDeletedDateTime sets the deletedDateTime property value. Date and time when this object was deleted. Always null when the object hasn't been deleted. +func (m *DirectoryObject) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_object_collection_response.go new file mode 100644 index 000000000..bb4cc2714 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectCollectionResponse +type DirectoryObjectCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryObjectable +} +// NewDirectoryObjectCollectionResponse instantiates a new DirectoryObjectCollectionResponse and sets the default values. +func NewDirectoryObjectCollectionResponse()(*DirectoryObjectCollectionResponse) { + m := &DirectoryObjectCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryObjectCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryObjectCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryObjectCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryObjectCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryObjectCollectionResponse) GetValue()([]DirectoryObjectable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryObjectCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryObjectCollectionResponse) SetValue(value []DirectoryObjectable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_object_collection_responseable.go new file mode 100644 index 000000000..bfba364f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectCollectionResponseable +type DirectoryObjectCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryObjectable) + SetValue(value []DirectoryObjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_partner_reference.go b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference.go new file mode 100644 index 000000000..7bed58641 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference.go @@ -0,0 +1,141 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectPartnerReference +type DirectoryObjectPartnerReference struct { + DirectoryObject + // Description of the object returned. Read-only. + description *string + // Name of directory object being returned, like group or application. Read-only. + displayName *string + // The tenant identifier for the partner tenant. Read-only. + externalPartnerTenantId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The type of the referenced object in the partner tenant. Read-only. + objectType *string +} +// NewDirectoryObjectPartnerReference instantiates a new DirectoryObjectPartnerReference and sets the default values. +func NewDirectoryObjectPartnerReference()(*DirectoryObjectPartnerReference) { + m := &DirectoryObjectPartnerReference{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.directoryObjectPartnerReference"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDirectoryObjectPartnerReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryObjectPartnerReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryObjectPartnerReference(), nil +} +// GetDescription gets the description property value. Description of the object returned. Read-only. +func (m *DirectoryObjectPartnerReference) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of directory object being returned, like group or application. Read-only. +func (m *DirectoryObjectPartnerReference) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalPartnerTenantId gets the externalPartnerTenantId property value. The tenant identifier for the partner tenant. Read-only. +func (m *DirectoryObjectPartnerReference) GetExternalPartnerTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.externalPartnerTenantId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryObjectPartnerReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalPartnerTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalPartnerTenantId(val) + } + return nil + } + res["objectType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectType(val) + } + return nil + } + return res +} +// GetObjectType gets the objectType property value. The type of the referenced object in the partner tenant. Read-only. +func (m *DirectoryObjectPartnerReference) GetObjectType()(*string) { + return m.objectType +} +// Serialize serializes information the current object +func (m *DirectoryObjectPartnerReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("externalPartnerTenantId", m.GetExternalPartnerTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("objectType", m.GetObjectType()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the object returned. Read-only. +func (m *DirectoryObjectPartnerReference) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of directory object being returned, like group or application. Read-only. +func (m *DirectoryObjectPartnerReference) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalPartnerTenantId sets the externalPartnerTenantId property value. The tenant identifier for the partner tenant. Read-only. +func (m *DirectoryObjectPartnerReference) SetExternalPartnerTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.externalPartnerTenantId = value +} +// SetObjectType sets the objectType property value. The type of the referenced object in the partner tenant. Read-only. +func (m *DirectoryObjectPartnerReference) SetObjectType(value *string)() { + m.objectType = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_response.go new file mode 100644 index 000000000..4c4d9d360 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectPartnerReferenceCollectionResponse +type DirectoryObjectPartnerReferenceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryObjectPartnerReferenceable +} +// NewDirectoryObjectPartnerReferenceCollectionResponse instantiates a new DirectoryObjectPartnerReferenceCollectionResponse and sets the default values. +func NewDirectoryObjectPartnerReferenceCollectionResponse()(*DirectoryObjectPartnerReferenceCollectionResponse) { + m := &DirectoryObjectPartnerReferenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryObjectPartnerReferenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryObjectPartnerReferenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryObjectPartnerReferenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryObjectPartnerReferenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectPartnerReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectPartnerReferenceable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectPartnerReferenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryObjectPartnerReferenceCollectionResponse) GetValue()([]DirectoryObjectPartnerReferenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryObjectPartnerReferenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryObjectPartnerReferenceCollectionResponse) SetValue(value []DirectoryObjectPartnerReferenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_responseable.go new file mode 100644 index 000000000..77debbbbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_partner_reference_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectPartnerReferenceCollectionResponseable +type DirectoryObjectPartnerReferenceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryObjectPartnerReferenceable) + SetValue(value []DirectoryObjectPartnerReferenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_object_partner_referenceable.go b/src/internal/connector/graph/betasdk/models/directory_object_partner_referenceable.go new file mode 100644 index 000000000..f7f4e1ad6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_object_partner_referenceable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectPartnerReferenceable +type DirectoryObjectPartnerReferenceable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalPartnerTenantId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetObjectType()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalPartnerTenantId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetObjectType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_objectable.go b/src/internal/connector/graph/betasdk/models/directory_objectable.go new file mode 100644 index 000000000..04dac25c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_objectable.go @@ -0,0 +1,14 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryObjectable +type DirectoryObjectable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role.go b/src/internal/connector/graph/betasdk/models/directory_role.go new file mode 100644 index 000000000..08c5d0981 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role.go @@ -0,0 +1,182 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRole +type DirectoryRole struct { + DirectoryObject + // The description for the directory role. Read-only. Supports $filter (eq), $search, $select. + description *string + // The display name for the directory role. Read-only. Supports $filter (eq), $search, $select. + displayName *string + // Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. + members []DirectoryObjectable + // The id of the directoryRoleTemplate that this role is based on. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only. Supports $filter (eq), $select. + roleTemplateId *string + // Members of this directory role that are scoped to administrative units. Read-only. Nullable. + scopedMembers []ScopedRoleMembershipable +} +// NewDirectoryRole instantiates a new DirectoryRole and sets the default values. +func NewDirectoryRole()(*DirectoryRole) { + m := &DirectoryRole{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.directoryRole"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDirectoryRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryRole(), nil +} +// GetDescription gets the description property value. The description for the directory role. Read-only. Supports $filter (eq), $search, $select. +func (m *DirectoryRole) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the directory role. Read-only. Supports $filter (eq), $search, $select. +func (m *DirectoryRole) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMembers(res) + } + return nil + } + res["roleTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleTemplateId(val) + } + return nil + } + res["scopedMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScopedRoleMembershipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScopedRoleMembershipable, len(val)) + for i, v := range val { + res[i] = v.(ScopedRoleMembershipable) + } + m.SetScopedMembers(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. +func (m *DirectoryRole) GetMembers()([]DirectoryObjectable) { + return m.members +} +// GetRoleTemplateId gets the roleTemplateId property value. The id of the directoryRoleTemplate that this role is based on. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only. Supports $filter (eq), $select. +func (m *DirectoryRole) GetRoleTemplateId()(*string) { + return m.roleTemplateId +} +// GetScopedMembers gets the scopedMembers property value. Members of this directory role that are scoped to administrative units. Read-only. Nullable. +func (m *DirectoryRole) GetScopedMembers()([]ScopedRoleMembershipable) { + return m.scopedMembers +} +// Serialize serializes information the current object +func (m *DirectoryRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleTemplateId", m.GetRoleTemplateId()) + if err != nil { + return err + } + } + if m.GetScopedMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetScopedMembers())) + for i, v := range m.GetScopedMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("scopedMembers", cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description for the directory role. Read-only. Supports $filter (eq), $search, $select. +func (m *DirectoryRole) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the directory role. Read-only. Supports $filter (eq), $search, $select. +func (m *DirectoryRole) SetDisplayName(value *string)() { + m.displayName = value +} +// SetMembers sets the members property value. Users that are members of this directory role. HTTP Methods: GET, POST, DELETE. Read-only. Nullable. Supports $expand. +func (m *DirectoryRole) SetMembers(value []DirectoryObjectable)() { + m.members = value +} +// SetRoleTemplateId sets the roleTemplateId property value. The id of the directoryRoleTemplate that this role is based on. The property must be specified when activating a directory role in a tenant with a POST operation. After the directory role has been activated, the property is read only. Supports $filter (eq), $select. +func (m *DirectoryRole) SetRoleTemplateId(value *string)() { + m.roleTemplateId = value +} +// SetScopedMembers sets the scopedMembers property value. Members of this directory role that are scoped to administrative units. Read-only. Nullable. +func (m *DirectoryRole) SetScopedMembers(value []ScopedRoleMembershipable)() { + m.scopedMembers = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_access_review_policy.go b/src/internal/connector/graph/betasdk/models/directory_role_access_review_policy.go new file mode 100644 index 000000000..80899e560 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_access_review_policy.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleAccessReviewPolicy +type DirectoryRoleAccessReviewPolicy struct { + Entity + // The settings property + settings AccessReviewScheduleSettingsable +} +// NewDirectoryRoleAccessReviewPolicy instantiates a new DirectoryRoleAccessReviewPolicy and sets the default values. +func NewDirectoryRoleAccessReviewPolicy()(*DirectoryRoleAccessReviewPolicy) { + m := &DirectoryRoleAccessReviewPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectoryRoleAccessReviewPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryRoleAccessReviewPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryRoleAccessReviewPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryRoleAccessReviewPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessReviewScheduleSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(AccessReviewScheduleSettingsable)) + } + return nil + } + return res +} +// GetSettings gets the settings property value. The settings property +func (m *DirectoryRoleAccessReviewPolicy) GetSettings()(AccessReviewScheduleSettingsable) { + return m.settings +} +// Serialize serializes information the current object +func (m *DirectoryRoleAccessReviewPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + return nil +} +// SetSettings sets the settings property value. The settings property +func (m *DirectoryRoleAccessReviewPolicy) SetSettings(value AccessReviewScheduleSettingsable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_access_review_policyable.go b/src/internal/connector/graph/betasdk/models/directory_role_access_review_policyable.go new file mode 100644 index 000000000..58b1ff73c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_access_review_policyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleAccessReviewPolicyable +type DirectoryRoleAccessReviewPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSettings()(AccessReviewScheduleSettingsable) + SetSettings(value AccessReviewScheduleSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_role_collection_response.go new file mode 100644 index 000000000..bde5efc53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleCollectionResponse +type DirectoryRoleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryRoleable +} +// NewDirectoryRoleCollectionResponse instantiates a new DirectoryRoleCollectionResponse and sets the default values. +func NewDirectoryRoleCollectionResponse()(*DirectoryRoleCollectionResponse) { + m := &DirectoryRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryRoleable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryRoleCollectionResponse) GetValue()([]DirectoryRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryRoleCollectionResponse) SetValue(value []DirectoryRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_role_collection_responseable.go new file mode 100644 index 000000000..d102553e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleCollectionResponseable +type DirectoryRoleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryRoleable) + SetValue(value []DirectoryRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_template.go b/src/internal/connector/graph/betasdk/models/directory_role_template.go new file mode 100644 index 000000000..5d45a5a02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_template.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleTemplate +type DirectoryRoleTemplate struct { + DirectoryObject + // The description to set for the directory role. Read-only. + description *string + // The display name to set for the directory role. Read-only. + displayName *string +} +// NewDirectoryRoleTemplate instantiates a new DirectoryRoleTemplate and sets the default values. +func NewDirectoryRoleTemplate()(*DirectoryRoleTemplate) { + m := &DirectoryRoleTemplate{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.directoryRoleTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDirectoryRoleTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryRoleTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryRoleTemplate(), nil +} +// GetDescription gets the description property value. The description to set for the directory role. Read-only. +func (m *DirectoryRoleTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name to set for the directory role. Read-only. +func (m *DirectoryRoleTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryRoleTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DirectoryRoleTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description to set for the directory role. Read-only. +func (m *DirectoryRoleTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name to set for the directory role. Read-only. +func (m *DirectoryRoleTemplate) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_template_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_role_template_collection_response.go new file mode 100644 index 000000000..7515260d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleTemplateCollectionResponse +type DirectoryRoleTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectoryRoleTemplateable +} +// NewDirectoryRoleTemplateCollectionResponse instantiates a new DirectoryRoleTemplateCollectionResponse and sets the default values. +func NewDirectoryRoleTemplateCollectionResponse()(*DirectoryRoleTemplateCollectionResponse) { + m := &DirectoryRoleTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectoryRoleTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectoryRoleTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectoryRoleTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectoryRoleTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryRoleTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryRoleTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryRoleTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectoryRoleTemplateCollectionResponse) GetValue()([]DirectoryRoleTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectoryRoleTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectoryRoleTemplateCollectionResponse) SetValue(value []DirectoryRoleTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_role_template_collection_responseable.go new file mode 100644 index 000000000..83f99b4bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleTemplateCollectionResponseable +type DirectoryRoleTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectoryRoleTemplateable) + SetValue(value []DirectoryRoleTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_role_templateable.go b/src/internal/connector/graph/betasdk/models/directory_role_templateable.go new file mode 100644 index 000000000..9f0f753a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_role_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleTemplateable +type DirectoryRoleTemplateable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_roleable.go b/src/internal/connector/graph/betasdk/models/directory_roleable.go new file mode 100644 index 000000000..dcf9ed18d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_roleable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectoryRoleable +type DirectoryRoleable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetMembers()([]DirectoryObjectable) + GetRoleTemplateId()(*string) + GetScopedMembers()([]ScopedRoleMembershipable) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetMembers(value []DirectoryObjectable)() + SetRoleTemplateId(value *string)() + SetScopedMembers(value []ScopedRoleMembershipable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting.go b/src/internal/connector/graph/betasdk/models/directory_setting.go new file mode 100644 index 000000000..c890fdee4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySetting provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DirectorySetting struct { + Entity + // Display name of this group of settings, which comes from the associated template. Read-only. + displayName *string + // Unique identifier for the template used to create this group of settings. Read-only. + templateId *string + // Collection of name-value pairs corresponding to the name and defaultValue properties in the referenced directorySettingTemplates object. + values []SettingValueable +} +// NewDirectorySetting instantiates a new directorySetting and sets the default values. +func NewDirectorySetting()(*DirectorySetting) { + m := &DirectorySetting{ + Entity: *NewEntity(), + } + return m +} +// CreateDirectorySettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectorySettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectorySetting(), nil +} +// GetDisplayName gets the displayName property value. Display name of this group of settings, which comes from the associated template. Read-only. +func (m *DirectorySetting) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectorySetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingValueable, len(val)) + for i, v := range val { + res[i] = v.(SettingValueable) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetTemplateId gets the templateId property value. Unique identifier for the template used to create this group of settings. Read-only. +func (m *DirectorySetting) GetTemplateId()(*string) { + return m.templateId +} +// GetValues gets the values property value. Collection of name-value pairs corresponding to the name and defaultValue properties in the referenced directorySettingTemplates object. +func (m *DirectorySetting) GetValues()([]SettingValueable) { + return m.values +} +// Serialize serializes information the current object +func (m *DirectorySetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValues())) + for i, v := range m.GetValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("values", cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Display name of this group of settings, which comes from the associated template. Read-only. +func (m *DirectorySetting) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTemplateId sets the templateId property value. Unique identifier for the template used to create this group of settings. Read-only. +func (m *DirectorySetting) SetTemplateId(value *string)() { + m.templateId = value +} +// SetValues sets the values property value. Collection of name-value pairs corresponding to the name and defaultValue properties in the referenced directorySettingTemplates object. +func (m *DirectorySetting) SetValues(value []SettingValueable)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_setting_collection_response.go new file mode 100644 index 000000000..a169a89ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingCollectionResponse +type DirectorySettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectorySettingable +} +// NewDirectorySettingCollectionResponse instantiates a new DirectorySettingCollectionResponse and sets the default values. +func NewDirectorySettingCollectionResponse()(*DirectorySettingCollectionResponse) { + m := &DirectorySettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectorySettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectorySettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectorySettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectorySettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectorySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectorySettingable, len(val)) + for i, v := range val { + res[i] = v.(DirectorySettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectorySettingCollectionResponse) GetValue()([]DirectorySettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectorySettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectorySettingCollectionResponse) SetValue(value []DirectorySettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_setting_collection_responseable.go new file mode 100644 index 000000000..d4527233a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingCollectionResponseable +type DirectorySettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectorySettingable) + SetValue(value []DirectorySettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_template.go b/src/internal/connector/graph/betasdk/models/directory_setting_template.go new file mode 100644 index 000000000..69242d5b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_template.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingTemplate +type DirectorySettingTemplate struct { + DirectoryObject + // Description of the template. Read-only. + description *string + // Display name of the template. Read-only. + displayName *string + // Collection of settingTemplateValues that list the set of available settings, defaults and types that make up this template. Read-only. + values []SettingTemplateValueable +} +// NewDirectorySettingTemplate instantiates a new DirectorySettingTemplate and sets the default values. +func NewDirectorySettingTemplate()(*DirectorySettingTemplate) { + m := &DirectorySettingTemplate{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.directorySettingTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDirectorySettingTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectorySettingTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectorySettingTemplate(), nil +} +// GetDescription gets the description property value. Description of the template. Read-only. +func (m *DirectorySettingTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name of the template. Read-only. +func (m *DirectorySettingTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectorySettingTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingTemplateValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingTemplateValueable, len(val)) + for i, v := range val { + res[i] = v.(SettingTemplateValueable) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetValues gets the values property value. Collection of settingTemplateValues that list the set of available settings, defaults and types that make up this template. Read-only. +func (m *DirectorySettingTemplate) GetValues()([]SettingTemplateValueable) { + return m.values +} +// Serialize serializes information the current object +func (m *DirectorySettingTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValues())) + for i, v := range m.GetValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("values", cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the template. Read-only. +func (m *DirectorySettingTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name of the template. Read-only. +func (m *DirectorySettingTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetValues sets the values property value. Collection of settingTemplateValues that list the set of available settings, defaults and types that make up this template. Read-only. +func (m *DirectorySettingTemplate) SetValues(value []SettingTemplateValueable)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_response.go b/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_response.go new file mode 100644 index 000000000..2f6f9ea01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingTemplateCollectionResponse +type DirectorySettingTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DirectorySettingTemplateable +} +// NewDirectorySettingTemplateCollectionResponse instantiates a new DirectorySettingTemplateCollectionResponse and sets the default values. +func NewDirectorySettingTemplateCollectionResponse()(*DirectorySettingTemplateCollectionResponse) { + m := &DirectorySettingTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDirectorySettingTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectorySettingTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectorySettingTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectorySettingTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectorySettingTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectorySettingTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DirectorySettingTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DirectorySettingTemplateCollectionResponse) GetValue()([]DirectorySettingTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DirectorySettingTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DirectorySettingTemplateCollectionResponse) SetValue(value []DirectorySettingTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_responseable.go new file mode 100644 index 000000000..61bc73f62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingTemplateCollectionResponseable +type DirectorySettingTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DirectorySettingTemplateable) + SetValue(value []DirectorySettingTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_setting_templateable.go b/src/internal/connector/graph/betasdk/models/directory_setting_templateable.go new file mode 100644 index 000000000..07b90452f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_setting_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingTemplateable +type DirectorySettingTemplateable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetValues()([]SettingTemplateValueable) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetValues(value []SettingTemplateValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_settingable.go b/src/internal/connector/graph/betasdk/models/directory_settingable.go new file mode 100644 index 000000000..465a7351e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_settingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySettingable +type DirectorySettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetTemplateId()(*string) + GetValues()([]SettingValueable) + SetDisplayName(value *string)() + SetTemplateId(value *string)() + SetValues(value []SettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/directory_size_quota.go b/src/internal/connector/graph/betasdk/models/directory_size_quota.go new file mode 100644 index 000000000..3c5ffc14f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_size_quota.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySizeQuota +type DirectorySizeQuota 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 OdataType property + odataType *string + // Total amount of the directory quota. + total *int32 + // Used amount of the directory quota. + used *int32 +} +// NewDirectorySizeQuota instantiates a new directorySizeQuota and sets the default values. +func NewDirectorySizeQuota()(*DirectorySizeQuota) { + m := &DirectorySizeQuota{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDirectorySizeQuotaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDirectorySizeQuotaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDirectorySizeQuota(), 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 *DirectorySizeQuota) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DirectorySizeQuota) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsed(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DirectorySizeQuota) GetOdataType()(*string) { + return m.odataType +} +// GetTotal gets the total property value. Total amount of the directory quota. +func (m *DirectorySizeQuota) GetTotal()(*int32) { + return m.total +} +// GetUsed gets the used property value. Used amount of the directory quota. +func (m *DirectorySizeQuota) GetUsed()(*int32) { + return m.used +} +// Serialize serializes information the current object +func (m *DirectorySizeQuota) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("used", m.GetUsed()) + 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 *DirectorySizeQuota) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DirectorySizeQuota) SetOdataType(value *string)() { + m.odataType = value +} +// SetTotal sets the total property value. Total amount of the directory quota. +func (m *DirectorySizeQuota) SetTotal(value *int32)() { + m.total = value +} +// SetUsed sets the used property value. Used amount of the directory quota. +func (m *DirectorySizeQuota) SetUsed(value *int32)() { + m.used = value +} diff --git a/src/internal/connector/graph/betasdk/models/directory_size_quotaable.go b/src/internal/connector/graph/betasdk/models/directory_size_quotaable.go new file mode 100644 index 000000000..fb4f6a651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directory_size_quotaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DirectorySizeQuotaable +type DirectorySizeQuotaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTotal()(*int32) + GetUsed()(*int32) + SetOdataType(value *string)() + SetTotal(value *int32)() + SetUsed(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/directoryable.go b/src/internal/connector/graph/betasdk/models/directoryable.go new file mode 100644 index 000000000..b25069cf3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/directoryable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Directoryable +type Directoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdministrativeUnits()([]AdministrativeUnitable) + GetAttributeSets()([]AttributeSetable) + GetCustomSecurityAttributeDefinitions()([]CustomSecurityAttributeDefinitionable) + GetDeletedItems()([]DirectoryObjectable) + GetFeatureRolloutPolicies()([]FeatureRolloutPolicyable) + GetFederationConfigurations()([]IdentityProviderBaseable) + GetImpactedResources()([]ImpactedResourceable) + GetInboundSharedUserProfiles()([]InboundSharedUserProfileable) + GetOnPremisesSynchronization()([]OnPremisesDirectorySynchronizationable) + GetOutboundSharedUserProfiles()([]OutboundSharedUserProfileable) + GetRecommendations()([]Recommendationable) + GetSharedEmailDomains()([]SharedEmailDomainable) + SetAdministrativeUnits(value []AdministrativeUnitable)() + SetAttributeSets(value []AttributeSetable)() + SetCustomSecurityAttributeDefinitions(value []CustomSecurityAttributeDefinitionable)() + SetDeletedItems(value []DirectoryObjectable)() + SetFeatureRolloutPolicies(value []FeatureRolloutPolicyable)() + SetFederationConfigurations(value []IdentityProviderBaseable)() + SetImpactedResources(value []ImpactedResourceable)() + SetInboundSharedUserProfiles(value []InboundSharedUserProfileable)() + SetOnPremisesSynchronization(value []OnPremisesDirectorySynchronizationable)() + SetOutboundSharedUserProfiles(value []OutboundSharedUserProfileable)() + SetRecommendations(value []Recommendationable)() + SetSharedEmailDomains(value []SharedEmailDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_action.go b/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_action.go new file mode 100644 index 000000000..34f5531be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisableAndDeleteUserApplyAction +type DisableAndDeleteUserApplyAction struct { + AccessReviewApplyAction +} +// NewDisableAndDeleteUserApplyAction instantiates a new DisableAndDeleteUserApplyAction and sets the default values. +func NewDisableAndDeleteUserApplyAction()(*DisableAndDeleteUserApplyAction) { + m := &DisableAndDeleteUserApplyAction{ + AccessReviewApplyAction: *NewAccessReviewApplyAction(), + } + odataTypeValue := "#microsoft.graph.disableAndDeleteUserApplyAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDisableAndDeleteUserApplyActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDisableAndDeleteUserApplyActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDisableAndDeleteUserApplyAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DisableAndDeleteUserApplyAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewApplyAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *DisableAndDeleteUserApplyAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewApplyAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_actionable.go b/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_actionable.go new file mode 100644 index 000000000..103868ba4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/disable_and_delete_user_apply_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisableAndDeleteUserApplyActionable +type DisableAndDeleteUserApplyActionable interface { + AccessReviewApplyActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/discovered_sensitive_type.go b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type.go new file mode 100644 index 000000000..d6d753501 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type.go @@ -0,0 +1,184 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DiscoveredSensitiveType +type DiscoveredSensitiveType 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 classificationAttributes property + classificationAttributes []ClassificationAttributeable + // The confidence property + confidence *int32 + // The count property + count *int32 + // The id property + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string +} +// NewDiscoveredSensitiveType instantiates a new discoveredSensitiveType and sets the default values. +func NewDiscoveredSensitiveType()(*DiscoveredSensitiveType) { + m := &DiscoveredSensitiveType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDiscoveredSensitiveTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDiscoveredSensitiveTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDiscoveredSensitiveType(), 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 *DiscoveredSensitiveType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClassificationAttributes gets the classificationAttributes property value. The classificationAttributes property +func (m *DiscoveredSensitiveType) GetClassificationAttributes()([]ClassificationAttributeable) { + return m.classificationAttributes +} +// GetConfidence gets the confidence property value. The confidence property +func (m *DiscoveredSensitiveType) GetConfidence()(*int32) { + return m.confidence +} +// GetCount gets the count property value. The count property +func (m *DiscoveredSensitiveType) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DiscoveredSensitiveType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["classificationAttributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClassificationAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClassificationAttributeable, len(val)) + for i, v := range val { + res[i] = v.(ClassificationAttributeable) + } + m.SetClassificationAttributes(res) + } + return nil + } + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The id property +func (m *DiscoveredSensitiveType) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DiscoveredSensitiveType) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DiscoveredSensitiveType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetClassificationAttributes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClassificationAttributes())) + for i, v := range m.GetClassificationAttributes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("classificationAttributes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DiscoveredSensitiveType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClassificationAttributes sets the classificationAttributes property value. The classificationAttributes property +func (m *DiscoveredSensitiveType) SetClassificationAttributes(value []ClassificationAttributeable)() { + m.classificationAttributes = value +} +// SetConfidence sets the confidence property value. The confidence property +func (m *DiscoveredSensitiveType) SetConfidence(value *int32)() { + m.confidence = value +} +// SetCount sets the count property value. The count property +func (m *DiscoveredSensitiveType) SetCount(value *int32)() { + m.count = value +} +// SetId sets the id property value. The id property +func (m *DiscoveredSensitiveType) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DiscoveredSensitiveType) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_response.go b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_response.go new file mode 100644 index 000000000..3d6367968 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DiscoveredSensitiveTypeCollectionResponse +type DiscoveredSensitiveTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DiscoveredSensitiveTypeable +} +// NewDiscoveredSensitiveTypeCollectionResponse instantiates a new DiscoveredSensitiveTypeCollectionResponse and sets the default values. +func NewDiscoveredSensitiveTypeCollectionResponse()(*DiscoveredSensitiveTypeCollectionResponse) { + m := &DiscoveredSensitiveTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDiscoveredSensitiveTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDiscoveredSensitiveTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDiscoveredSensitiveTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DiscoveredSensitiveTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDiscoveredSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DiscoveredSensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(DiscoveredSensitiveTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DiscoveredSensitiveTypeCollectionResponse) GetValue()([]DiscoveredSensitiveTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *DiscoveredSensitiveTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DiscoveredSensitiveTypeCollectionResponse) SetValue(value []DiscoveredSensitiveTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_responseable.go new file mode 100644 index 000000000..2e6b49dfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/discovered_sensitive_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DiscoveredSensitiveTypeCollectionResponseable +type DiscoveredSensitiveTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DiscoveredSensitiveTypeable) + SetValue(value []DiscoveredSensitiveTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/discovered_sensitive_typeable.go b/src/internal/connector/graph/betasdk/models/discovered_sensitive_typeable.go new file mode 100644 index 000000000..712729736 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/discovered_sensitive_typeable.go @@ -0,0 +1,22 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DiscoveredSensitiveTypeable +type DiscoveredSensitiveTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassificationAttributes()([]ClassificationAttributeable) + GetConfidence()(*int32) + GetCount()(*int32) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + SetClassificationAttributes(value []ClassificationAttributeable)() + SetConfidence(value *int32)() + SetCount(value *int32)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/discovery_source.go b/src/internal/connector/graph/betasdk/models/discovery_source.go new file mode 100644 index 000000000..eba22d2d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/discovery_source.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DiscoverySource int + +const ( + // DiscoverySource is Unknown. + UNKNOWN_DISCOVERYSOURCE DiscoverySource = iota + // Device is imported by admin. + ADMINIMPORT_DISCOVERYSOURCE + // Device is added by Apple device enrollment program (Dep). + DEVICEENROLLMENTPROGRAM_DISCOVERYSOURCE +) + +func (i DiscoverySource) String() string { + return []string{"unknown", "adminImport", "deviceEnrollmentProgram"}[i] +} +func ParseDiscoverySource(v string) (interface{}, error) { + result := UNKNOWN_DISCOVERYSOURCE + switch v { + case "unknown": + result = UNKNOWN_DISCOVERYSOURCE + case "adminImport": + result = ADMINIMPORT_DISCOVERYSOURCE + case "deviceEnrollmentProgram": + result = DEVICEENROLLMENTPROGRAM_DISCOVERYSOURCE + default: + return 0, errors.New("Unknown DiscoverySource value: " + v) + } + return &result, nil +} +func SerializeDiscoverySource(values []DiscoverySource) []string { + 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/disk_type.go b/src/internal/connector/graph/betasdk/models/disk_type.go new file mode 100644 index 000000000..346bc4ffe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/disk_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DiskType int + +const ( + // Enum member for unknown or default diskType + UNKNOWN_DISKTYPE DiskType = iota + // Enum member for HDD devices + HDD_DISKTYPE + // Enum member for SSD devices + SSD_DISKTYPE + // Evolvable enum member + UNKNOWNFUTUREVALUE_DISKTYPE +) + +func (i DiskType) String() string { + return []string{"unknown", "hdd", "ssd", "unknownFutureValue"}[i] +} +func ParseDiskType(v string) (interface{}, error) { + result := UNKNOWN_DISKTYPE + switch v { + case "unknown": + result = UNKNOWN_DISKTYPE + case "hdd": + result = HDD_DISKTYPE + case "ssd": + result = SSD_DISKTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DISKTYPE + default: + return 0, errors.New("Unknown DiskType value: " + v) + } + return &result, nil +} +func SerializeDiskType(values []DiskType) []string { + 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/display_name_localization.go b/src/internal/connector/graph/betasdk/models/display_name_localization.go new file mode 100644 index 000000000..ad17c4af2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/display_name_localization.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisplayNameLocalization +type DisplayNameLocalization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If present, the value of this field contains the displayName string that has been set for the language present in the languageTag field. + displayName *string + // Provides the language culture-code and friendly name of the language that the displayName field has been provided in. + languageTag *string + // The OdataType property + odataType *string +} +// NewDisplayNameLocalization instantiates a new displayNameLocalization and sets the default values. +func NewDisplayNameLocalization()(*DisplayNameLocalization) { + m := &DisplayNameLocalization{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDisplayNameLocalizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDisplayNameLocalizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDisplayNameLocalization(), 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 *DisplayNameLocalization) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. If present, the value of this field contains the displayName string that has been set for the language present in the languageTag field. +func (m *DisplayNameLocalization) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DisplayNameLocalization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + 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 + } + return res +} +// GetLanguageTag gets the languageTag property value. Provides the language culture-code and friendly name of the language that the displayName field has been provided in. +func (m *DisplayNameLocalization) GetLanguageTag()(*string) { + return m.languageTag +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DisplayNameLocalization) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DisplayNameLocalization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + 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.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 *DisplayNameLocalization) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. If present, the value of this field contains the displayName string that has been set for the language present in the languageTag field. +func (m *DisplayNameLocalization) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLanguageTag sets the languageTag property value. Provides the language culture-code and friendly name of the language that the displayName field has been provided in. +func (m *DisplayNameLocalization) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DisplayNameLocalization) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/display_name_localization_collection_response.go b/src/internal/connector/graph/betasdk/models/display_name_localization_collection_response.go new file mode 100644 index 000000000..db0afe0de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/display_name_localization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisplayNameLocalizationCollectionResponse +type DisplayNameLocalizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DisplayNameLocalizationable +} +// NewDisplayNameLocalizationCollectionResponse instantiates a new DisplayNameLocalizationCollectionResponse and sets the default values. +func NewDisplayNameLocalizationCollectionResponse()(*DisplayNameLocalizationCollectionResponse) { + m := &DisplayNameLocalizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDisplayNameLocalizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDisplayNameLocalizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDisplayNameLocalizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DisplayNameLocalizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayNameLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayNameLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(DisplayNameLocalizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DisplayNameLocalizationCollectionResponse) GetValue()([]DisplayNameLocalizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *DisplayNameLocalizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DisplayNameLocalizationCollectionResponse) SetValue(value []DisplayNameLocalizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/display_name_localization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/display_name_localization_collection_responseable.go new file mode 100644 index 000000000..4272bcd2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/display_name_localization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisplayNameLocalizationCollectionResponseable +type DisplayNameLocalizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DisplayNameLocalizationable) + SetValue(value []DisplayNameLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/display_name_localizationable.go b/src/internal/connector/graph/betasdk/models/display_name_localizationable.go new file mode 100644 index 000000000..591cf9c82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/display_name_localizationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DisplayNameLocalizationable +type DisplayNameLocalizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLanguageTag()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetLanguageTag(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_action.go b/src/internal/connector/graph/betasdk/models/dlp_action.go new file mode 100644 index 000000000..12ad94fed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_action.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DlpAction int + +const ( + NOTIFYUSER_DLPACTION DlpAction = iota + BLOCKACCESS_DLPACTION + DEVICERESTRICTION_DLPACTION +) + +func (i DlpAction) String() string { + return []string{"notifyUser", "blockAccess", "deviceRestriction"}[i] +} +func ParseDlpAction(v string) (interface{}, error) { + result := NOTIFYUSER_DLPACTION + switch v { + case "notifyUser": + result = NOTIFYUSER_DLPACTION + case "blockAccess": + result = BLOCKACCESS_DLPACTION + case "deviceRestriction": + result = DEVICERESTRICTION_DLPACTION + default: + return 0, errors.New("Unknown DlpAction value: " + v) + } + return &result, nil +} +func SerializeDlpAction(values []DlpAction) []string { + 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/dlp_action_info.go b/src/internal/connector/graph/betasdk/models/dlp_action_info.go new file mode 100644 index 000000000..62b0d09d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_action_info.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpActionInfo +type DlpActionInfo struct { + // The action property + action *DlpAction + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string +} +// NewDlpActionInfo instantiates a new dlpActionInfo and sets the default values. +func NewDlpActionInfo()(*DlpActionInfo) { + m := &DlpActionInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDlpActionInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpActionInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.blockAccessAction": + return NewBlockAccessAction(), nil + case "#microsoft.graph.deviceRestrictionAction": + return NewDeviceRestrictionAction(), nil + case "#microsoft.graph.notifyUserAction": + return NewNotifyUserAction(), nil + } + } + } + } + return NewDlpActionInfo(), nil +} +// GetAction gets the action property value. The action property +func (m *DlpActionInfo) GetAction()(*DlpAction) { + return m.action +} +// 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 *DlpActionInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpActionInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDlpAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*DlpAction)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DlpActionInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DlpActionInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *DlpActionInfo) SetAction(value *DlpAction)() { + m.action = value +} +// 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 *DlpActionInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DlpActionInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_response.go b/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_response.go new file mode 100644 index 000000000..27f8e16f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpActionInfoCollectionResponse +type DlpActionInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DlpActionInfoable +} +// NewDlpActionInfoCollectionResponse instantiates a new DlpActionInfoCollectionResponse and sets the default values. +func NewDlpActionInfoCollectionResponse()(*DlpActionInfoCollectionResponse) { + m := &DlpActionInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDlpActionInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpActionInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpActionInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpActionInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDlpActionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DlpActionInfoable, len(val)) + for i, v := range val { + res[i] = v.(DlpActionInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DlpActionInfoCollectionResponse) GetValue()([]DlpActionInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *DlpActionInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DlpActionInfoCollectionResponse) SetValue(value []DlpActionInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_responseable.go new file mode 100644 index 000000000..e57767be2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_action_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpActionInfoCollectionResponseable +type DlpActionInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DlpActionInfoable) + SetValue(value []DlpActionInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_action_infoable.go b/src/internal/connector/graph/betasdk/models/dlp_action_infoable.go new file mode 100644 index 000000000..459efb80f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_action_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpActionInfoable +type DlpActionInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*DlpAction) + GetOdataType()(*string) + SetAction(value *DlpAction)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response.go b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response.go new file mode 100644 index 000000000..dae2d6c5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluatePoliciesJobResponse +type DlpEvaluatePoliciesJobResponse struct { + JobResponseBase + // The result property + result DlpPoliciesJobResultable +} +// NewDlpEvaluatePoliciesJobResponse instantiates a new DlpEvaluatePoliciesJobResponse and sets the default values. +func NewDlpEvaluatePoliciesJobResponse()(*DlpEvaluatePoliciesJobResponse) { + m := &DlpEvaluatePoliciesJobResponse{ + JobResponseBase: *NewJobResponseBase(), + } + return m +} +// CreateDlpEvaluatePoliciesJobResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpEvaluatePoliciesJobResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpEvaluatePoliciesJobResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpEvaluatePoliciesJobResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.JobResponseBase.GetFieldDeserializers() + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDlpPoliciesJobResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(DlpPoliciesJobResultable)) + } + return nil + } + return res +} +// GetResult gets the result property value. The result property +func (m *DlpEvaluatePoliciesJobResponse) GetResult()(DlpPoliciesJobResultable) { + return m.result +} +// Serialize serializes information the current object +func (m *DlpEvaluatePoliciesJobResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.JobResponseBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("result", m.GetResult()) + if err != nil { + return err + } + } + return nil +} +// SetResult sets the result property value. The result property +func (m *DlpEvaluatePoliciesJobResponse) SetResult(value DlpPoliciesJobResultable)() { + m.result = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_response.go b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_response.go new file mode 100644 index 000000000..8c9181fbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluatePoliciesJobResponseCollectionResponse +type DlpEvaluatePoliciesJobResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DlpEvaluatePoliciesJobResponseable +} +// NewDlpEvaluatePoliciesJobResponseCollectionResponse instantiates a new DlpEvaluatePoliciesJobResponseCollectionResponse and sets the default values. +func NewDlpEvaluatePoliciesJobResponseCollectionResponse()(*DlpEvaluatePoliciesJobResponseCollectionResponse) { + m := &DlpEvaluatePoliciesJobResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDlpEvaluatePoliciesJobResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpEvaluatePoliciesJobResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpEvaluatePoliciesJobResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpEvaluatePoliciesJobResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDlpEvaluatePoliciesJobResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DlpEvaluatePoliciesJobResponseable, len(val)) + for i, v := range val { + res[i] = v.(DlpEvaluatePoliciesJobResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DlpEvaluatePoliciesJobResponseCollectionResponse) GetValue()([]DlpEvaluatePoliciesJobResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *DlpEvaluatePoliciesJobResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DlpEvaluatePoliciesJobResponseCollectionResponse) SetValue(value []DlpEvaluatePoliciesJobResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_responseable.go new file mode 100644 index 000000000..589766390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluatePoliciesJobResponseCollectionResponseable +type DlpEvaluatePoliciesJobResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DlpEvaluatePoliciesJobResponseable) + SetValue(value []DlpEvaluatePoliciesJobResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_responseable.go b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_responseable.go new file mode 100644 index 000000000..4b5e62bd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluate_policies_job_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluatePoliciesJobResponseable +type DlpEvaluatePoliciesJobResponseable interface { + JobResponseBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResult()(DlpPoliciesJobResultable) + SetResult(value DlpPoliciesJobResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluation_input.go b/src/internal/connector/graph/betasdk/models/dlp_evaluation_input.go new file mode 100644 index 000000000..5b42fbfa7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluation_input.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluationInput +type DlpEvaluationInput 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 currentLabel property + currentLabel CurrentLabelable + // The discoveredSensitiveTypes property + discoveredSensitiveTypes []DiscoveredSensitiveTypeable + // The OdataType property + odataType *string +} +// NewDlpEvaluationInput instantiates a new dlpEvaluationInput and sets the default values. +func NewDlpEvaluationInput()(*DlpEvaluationInput) { + m := &DlpEvaluationInput{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDlpEvaluationInputFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpEvaluationInputFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.dlpEvaluationWindowsDevicesInput": + return NewDlpEvaluationWindowsDevicesInput(), nil + } + } + } + } + return NewDlpEvaluationInput(), 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 *DlpEvaluationInput) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCurrentLabel gets the currentLabel property value. The currentLabel property +func (m *DlpEvaluationInput) GetCurrentLabel()(CurrentLabelable) { + return m.currentLabel +} +// GetDiscoveredSensitiveTypes gets the discoveredSensitiveTypes property value. The discoveredSensitiveTypes property +func (m *DlpEvaluationInput) GetDiscoveredSensitiveTypes()([]DiscoveredSensitiveTypeable) { + return m.discoveredSensitiveTypes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpEvaluationInput) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["currentLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrentLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrentLabel(val.(CurrentLabelable)) + } + return nil + } + res["discoveredSensitiveTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDiscoveredSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DiscoveredSensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(DiscoveredSensitiveTypeable) + } + m.SetDiscoveredSensitiveTypes(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DlpEvaluationInput) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DlpEvaluationInput) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("currentLabel", m.GetCurrentLabel()) + if err != nil { + return err + } + } + if m.GetDiscoveredSensitiveTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDiscoveredSensitiveTypes())) + for i, v := range m.GetDiscoveredSensitiveTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("discoveredSensitiveTypes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DlpEvaluationInput) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCurrentLabel sets the currentLabel property value. The currentLabel property +func (m *DlpEvaluationInput) SetCurrentLabel(value CurrentLabelable)() { + m.currentLabel = value +} +// SetDiscoveredSensitiveTypes sets the discoveredSensitiveTypes property value. The discoveredSensitiveTypes property +func (m *DlpEvaluationInput) SetDiscoveredSensitiveTypes(value []DiscoveredSensitiveTypeable)() { + m.discoveredSensitiveTypes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DlpEvaluationInput) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluation_inputable.go b/src/internal/connector/graph/betasdk/models/dlp_evaluation_inputable.go new file mode 100644 index 000000000..8c349f604 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluation_inputable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluationInputable +type DlpEvaluationInputable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentLabel()(CurrentLabelable) + GetDiscoveredSensitiveTypes()([]DiscoveredSensitiveTypeable) + GetOdataType()(*string) + SetCurrentLabel(value CurrentLabelable)() + SetDiscoveredSensitiveTypes(value []DiscoveredSensitiveTypeable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_input.go b/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_input.go new file mode 100644 index 000000000..72170ed90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_input.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluationWindowsDevicesInput +type DlpEvaluationWindowsDevicesInput struct { + DlpEvaluationInput + // The contentProperties property + contentProperties ContentPropertiesable + // The sharedBy property + sharedBy *string +} +// NewDlpEvaluationWindowsDevicesInput instantiates a new DlpEvaluationWindowsDevicesInput and sets the default values. +func NewDlpEvaluationWindowsDevicesInput()(*DlpEvaluationWindowsDevicesInput) { + m := &DlpEvaluationWindowsDevicesInput{ + DlpEvaluationInput: *NewDlpEvaluationInput(), + } + odataTypeValue := "#microsoft.graph.dlpEvaluationWindowsDevicesInput"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDlpEvaluationWindowsDevicesInputFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpEvaluationWindowsDevicesInputFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpEvaluationWindowsDevicesInput(), nil +} +// GetContentProperties gets the contentProperties property value. The contentProperties property +func (m *DlpEvaluationWindowsDevicesInput) GetContentProperties()(ContentPropertiesable) { + return m.contentProperties +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpEvaluationWindowsDevicesInput) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DlpEvaluationInput.GetFieldDeserializers() + res["contentProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentPropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContentProperties(val.(ContentPropertiesable)) + } + return nil + } + res["sharedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSharedBy(val) + } + return nil + } + return res +} +// GetSharedBy gets the sharedBy property value. The sharedBy property +func (m *DlpEvaluationWindowsDevicesInput) GetSharedBy()(*string) { + return m.sharedBy +} +// Serialize serializes information the current object +func (m *DlpEvaluationWindowsDevicesInput) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DlpEvaluationInput.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("contentProperties", m.GetContentProperties()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sharedBy", m.GetSharedBy()) + if err != nil { + return err + } + } + return nil +} +// SetContentProperties sets the contentProperties property value. The contentProperties property +func (m *DlpEvaluationWindowsDevicesInput) SetContentProperties(value ContentPropertiesable)() { + m.contentProperties = value +} +// SetSharedBy sets the sharedBy property value. The sharedBy property +func (m *DlpEvaluationWindowsDevicesInput) SetSharedBy(value *string)() { + m.sharedBy = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_inputable.go b/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_inputable.go new file mode 100644 index 000000000..4d182030a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_evaluation_windows_devices_inputable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpEvaluationWindowsDevicesInputable +type DlpEvaluationWindowsDevicesInputable interface { + DlpEvaluationInputable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentProperties()(ContentPropertiesable) + GetSharedBy()(*string) + SetContentProperties(value ContentPropertiesable)() + SetSharedBy(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_notification.go b/src/internal/connector/graph/betasdk/models/dlp_notification.go new file mode 100644 index 000000000..78e082694 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_notification.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpNotification +type DlpNotification 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 author property + author *string + // The OdataType property + odataType *string +} +// NewDlpNotification instantiates a new dlpNotification and sets the default values. +func NewDlpNotification()(*DlpNotification) { + m := &DlpNotification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDlpNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.dlpWindowsDevicesNotification": + return NewDlpWindowsDevicesNotification(), nil + } + } + } + } + return NewDlpNotification(), 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 *DlpNotification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthor gets the author property value. The author property +func (m *DlpNotification) GetAuthor()(*string) { + return m.author +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["author"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthor(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DlpNotification) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DlpNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("author", m.GetAuthor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DlpNotification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthor sets the author property value. The author property +func (m *DlpNotification) SetAuthor(value *string)() { + m.author = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DlpNotification) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_notificationable.go b/src/internal/connector/graph/betasdk/models/dlp_notificationable.go new file mode 100644 index 000000000..94758fcf6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_notificationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpNotificationable +type DlpNotificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthor()(*string) + GetOdataType()(*string) + SetAuthor(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_policies_job_result.go b/src/internal/connector/graph/betasdk/models/dlp_policies_job_result.go new file mode 100644 index 000000000..da4257d1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_policies_job_result.go @@ -0,0 +1,158 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpPoliciesJobResult +type DlpPoliciesJobResult 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 auditCorrelationId property + auditCorrelationId *string + // The evaluationDateTime property + evaluationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The matchingRules property + matchingRules []MatchingDlpRuleable + // The OdataType property + odataType *string +} +// NewDlpPoliciesJobResult instantiates a new dlpPoliciesJobResult and sets the default values. +func NewDlpPoliciesJobResult()(*DlpPoliciesJobResult) { + m := &DlpPoliciesJobResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDlpPoliciesJobResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpPoliciesJobResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpPoliciesJobResult(), 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 *DlpPoliciesJobResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuditCorrelationId gets the auditCorrelationId property value. The auditCorrelationId property +func (m *DlpPoliciesJobResult) GetAuditCorrelationId()(*string) { + return m.auditCorrelationId +} +// GetEvaluationDateTime gets the evaluationDateTime property value. The evaluationDateTime property +func (m *DlpPoliciesJobResult) GetEvaluationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.evaluationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpPoliciesJobResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["auditCorrelationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuditCorrelationId(val) + } + return nil + } + res["evaluationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEvaluationDateTime(val) + } + return nil + } + res["matchingRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMatchingDlpRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MatchingDlpRuleable, len(val)) + for i, v := range val { + res[i] = v.(MatchingDlpRuleable) + } + m.SetMatchingRules(res) + } + 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 + } + return res +} +// GetMatchingRules gets the matchingRules property value. The matchingRules property +func (m *DlpPoliciesJobResult) GetMatchingRules()([]MatchingDlpRuleable) { + return m.matchingRules +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DlpPoliciesJobResult) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DlpPoliciesJobResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("auditCorrelationId", m.GetAuditCorrelationId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("evaluationDateTime", m.GetEvaluationDateTime()) + if err != nil { + return err + } + } + if m.GetMatchingRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatchingRules())) + for i, v := range m.GetMatchingRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("matchingRules", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DlpPoliciesJobResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuditCorrelationId sets the auditCorrelationId property value. The auditCorrelationId property +func (m *DlpPoliciesJobResult) SetAuditCorrelationId(value *string)() { + m.auditCorrelationId = value +} +// SetEvaluationDateTime sets the evaluationDateTime property value. The evaluationDateTime property +func (m *DlpPoliciesJobResult) SetEvaluationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.evaluationDateTime = value +} +// SetMatchingRules sets the matchingRules property value. The matchingRules property +func (m *DlpPoliciesJobResult) SetMatchingRules(value []MatchingDlpRuleable)() { + m.matchingRules = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DlpPoliciesJobResult) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_policies_job_resultable.go b/src/internal/connector/graph/betasdk/models/dlp_policies_job_resultable.go new file mode 100644 index 000000000..c718b61c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_policies_job_resultable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpPoliciesJobResultable +type DlpPoliciesJobResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuditCorrelationId()(*string) + GetEvaluationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMatchingRules()([]MatchingDlpRuleable) + GetOdataType()(*string) + SetAuditCorrelationId(value *string)() + SetEvaluationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMatchingRules(value []MatchingDlpRuleable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notification.go b/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notification.go new file mode 100644 index 000000000..c7b0e8614 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notification.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpWindowsDevicesNotification +type DlpWindowsDevicesNotification struct { + DlpNotification + // The contentName property + contentName *string + // The lastModfiedBy property + lastModfiedBy *string +} +// NewDlpWindowsDevicesNotification instantiates a new DlpWindowsDevicesNotification and sets the default values. +func NewDlpWindowsDevicesNotification()(*DlpWindowsDevicesNotification) { + m := &DlpWindowsDevicesNotification{ + DlpNotification: *NewDlpNotification(), + } + odataTypeValue := "#microsoft.graph.dlpWindowsDevicesNotification"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDlpWindowsDevicesNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDlpWindowsDevicesNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDlpWindowsDevicesNotification(), nil +} +// GetContentName gets the contentName property value. The contentName property +func (m *DlpWindowsDevicesNotification) GetContentName()(*string) { + return m.contentName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DlpWindowsDevicesNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DlpNotification.GetFieldDeserializers() + res["contentName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentName(val) + } + return nil + } + res["lastModfiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModfiedBy(val) + } + return nil + } + return res +} +// GetLastModfiedBy gets the lastModfiedBy property value. The lastModfiedBy property +func (m *DlpWindowsDevicesNotification) GetLastModfiedBy()(*string) { + return m.lastModfiedBy +} +// Serialize serializes information the current object +func (m *DlpWindowsDevicesNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DlpNotification.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentName", m.GetContentName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastModfiedBy", m.GetLastModfiedBy()) + if err != nil { + return err + } + } + return nil +} +// SetContentName sets the contentName property value. The contentName property +func (m *DlpWindowsDevicesNotification) SetContentName(value *string)() { + m.contentName = value +} +// SetLastModfiedBy sets the lastModfiedBy property value. The lastModfiedBy property +func (m *DlpWindowsDevicesNotification) SetLastModfiedBy(value *string)() { + m.lastModfiedBy = value +} diff --git a/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notificationable.go b/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notificationable.go new file mode 100644 index 000000000..791b3a221 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dlp_windows_devices_notificationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DlpWindowsDevicesNotificationable +type DlpWindowsDevicesNotificationable interface { + DlpNotificationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentName()(*string) + GetLastModfiedBy()(*string) + SetContentName(value *string)() + SetLastModfiedBy(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/dma_guard_device_enumeration_policy_type.go b/src/internal/connector/graph/betasdk/models/dma_guard_device_enumeration_policy_type.go new file mode 100644 index 000000000..faa21521f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/dma_guard_device_enumeration_policy_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DmaGuardDeviceEnumerationPolicyType int + +const ( + // Default value. Devices with DMA remapping incompatible drivers will only be enumerated after the user unlocks the screen. + DEVICEDEFAULT_DMAGUARDDEVICEENUMERATIONPOLICYTYPE DmaGuardDeviceEnumerationPolicyType = iota + // Devices with DMA remapping incompatible drivers will never be allowed to start and perform DMA at any time. + BLOCKALL_DMAGUARDDEVICEENUMERATIONPOLICYTYPE + // All external DMA capable PCIe devices will be enumerated at any time. + ALLOWALL_DMAGUARDDEVICEENUMERATIONPOLICYTYPE +) + +func (i DmaGuardDeviceEnumerationPolicyType) String() string { + return []string{"deviceDefault", "blockAll", "allowAll"}[i] +} +func ParseDmaGuardDeviceEnumerationPolicyType(v string) (interface{}, error) { + result := DEVICEDEFAULT_DMAGUARDDEVICEENUMERATIONPOLICYTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_DMAGUARDDEVICEENUMERATIONPOLICYTYPE + case "blockAll": + result = BLOCKALL_DMAGUARDDEVICEENUMERATIONPOLICYTYPE + case "allowAll": + result = ALLOWALL_DMAGUARDDEVICEENUMERATIONPOLICYTYPE + default: + return 0, errors.New("Unknown DmaGuardDeviceEnumerationPolicyType value: " + v) + } + return &result, nil +} +func SerializeDmaGuardDeviceEnumerationPolicyType(values []DmaGuardDeviceEnumerationPolicyType) []string { + 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/document.go b/src/internal/connector/graph/betasdk/models/document.go new file mode 100644 index 000000000..4734bcf53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Document +type Document struct { + Entity + // The comments property + comments []DocumentCommentable +} +// NewDocument instantiates a new Document and sets the default values. +func NewDocument()(*Document) { + m := &Document{ + Entity: *NewEntity(), + } + return m +} +// CreateDocumentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocument(), nil +} +// GetComments gets the comments property value. The comments property +func (m *Document) GetComments()([]DocumentCommentable) { + return m.comments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Document) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentCommentable, len(val)) + for i, v := range val { + res[i] = v.(DocumentCommentable) + } + m.SetComments(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Document) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + return nil +} +// SetComments sets the comments property value. The comments property +func (m *Document) SetComments(value []DocumentCommentable)() { + m.comments = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment.go b/src/internal/connector/graph/betasdk/models/document_comment.go new file mode 100644 index 000000000..f10b02645 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentComment +type DocumentComment struct { + Entity + // The content property + content *string + // The replies property + replies []DocumentCommentReplyable +} +// NewDocumentComment instantiates a new DocumentComment and sets the default values. +func NewDocumentComment()(*DocumentComment) { + m := &DocumentComment{ + Entity: *NewEntity(), + } + return m +} +// CreateDocumentCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentComment(), nil +} +// GetContent gets the content property value. The content property +func (m *DocumentComment) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["replies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentCommentReplyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentCommentReplyable, len(val)) + for i, v := range val { + res[i] = v.(DocumentCommentReplyable) + } + m.SetReplies(res) + } + return nil + } + return res +} +// GetReplies gets the replies property value. The replies property +func (m *DocumentComment) GetReplies()([]DocumentCommentReplyable) { + return m.replies +} +// Serialize serializes information the current object +func (m *DocumentComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + if m.GetReplies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReplies())) + for i, v := range m.GetReplies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("replies", cast) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *DocumentComment) SetContent(value *string)() { + m.content = value +} +// SetReplies sets the replies property value. The replies property +func (m *DocumentComment) SetReplies(value []DocumentCommentReplyable)() { + m.replies = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_collection_response.go b/src/internal/connector/graph/betasdk/models/document_comment_collection_response.go new file mode 100644 index 000000000..25db14ff4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentCollectionResponse +type DocumentCommentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DocumentCommentable +} +// NewDocumentCommentCollectionResponse instantiates a new DocumentCommentCollectionResponse and sets the default values. +func NewDocumentCommentCollectionResponse()(*DocumentCommentCollectionResponse) { + m := &DocumentCommentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDocumentCommentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentCommentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentCommentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentCommentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentCommentable, len(val)) + for i, v := range val { + res[i] = v.(DocumentCommentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DocumentCommentCollectionResponse) GetValue()([]DocumentCommentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DocumentCommentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DocumentCommentCollectionResponse) SetValue(value []DocumentCommentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/document_comment_collection_responseable.go new file mode 100644 index 000000000..29f6f72ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentCollectionResponseable +type DocumentCommentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DocumentCommentable) + SetValue(value []DocumentCommentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_reply.go b/src/internal/connector/graph/betasdk/models/document_comment_reply.go new file mode 100644 index 000000000..47b530c0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_reply.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentReply provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DocumentCommentReply struct { + Entity + // The content property + content *string + // The location property + location *string +} +// NewDocumentCommentReply instantiates a new documentCommentReply and sets the default values. +func NewDocumentCommentReply()(*DocumentCommentReply) { + m := &DocumentCommentReply{ + Entity: *NewEntity(), + } + return m +} +// CreateDocumentCommentReplyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentCommentReplyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentCommentReply(), nil +} +// GetContent gets the content property value. The content property +func (m *DocumentCommentReply) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentCommentReply) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(val) + } + return nil + } + return res +} +// GetLocation gets the location property value. The location property +func (m *DocumentCommentReply) GetLocation()(*string) { + return m.location +} +// Serialize serializes information the current object +func (m *DocumentCommentReply) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *DocumentCommentReply) SetContent(value *string)() { + m.content = value +} +// SetLocation sets the location property value. The location property +func (m *DocumentCommentReply) SetLocation(value *string)() { + m.location = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_response.go b/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_response.go new file mode 100644 index 000000000..baadd18f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentReplyCollectionResponse +type DocumentCommentReplyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DocumentCommentReplyable +} +// NewDocumentCommentReplyCollectionResponse instantiates a new DocumentCommentReplyCollectionResponse and sets the default values. +func NewDocumentCommentReplyCollectionResponse()(*DocumentCommentReplyCollectionResponse) { + m := &DocumentCommentReplyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDocumentCommentReplyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentCommentReplyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentCommentReplyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentCommentReplyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentCommentReplyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentCommentReplyable, len(val)) + for i, v := range val { + res[i] = v.(DocumentCommentReplyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DocumentCommentReplyCollectionResponse) GetValue()([]DocumentCommentReplyable) { + return m.value +} +// Serialize serializes information the current object +func (m *DocumentCommentReplyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DocumentCommentReplyCollectionResponse) SetValue(value []DocumentCommentReplyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_responseable.go b/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_responseable.go new file mode 100644 index 000000000..5be872443 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_reply_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentReplyCollectionResponseable +type DocumentCommentReplyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DocumentCommentReplyable) + SetValue(value []DocumentCommentReplyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_comment_replyable.go b/src/internal/connector/graph/betasdk/models/document_comment_replyable.go new file mode 100644 index 000000000..8e7fe5729 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_comment_replyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentReplyable +type DocumentCommentReplyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetLocation()(*string) + SetContent(value *string)() + SetLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_commentable.go b/src/internal/connector/graph/betasdk/models/document_commentable.go new file mode 100644 index 000000000..3bbd30832 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_commentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentCommentable +type DocumentCommentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetReplies()([]DocumentCommentReplyable) + SetContent(value *string)() + SetReplies(value []DocumentCommentReplyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set.go b/src/internal/connector/graph/betasdk/models/document_set.go new file mode 100644 index 000000000..680661b12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set.go @@ -0,0 +1,285 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSet +type DocumentSet struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Content types allowed in document set. + allowedContentTypes []ContentTypeInfoable + // Default contents of document set. + defaultContents []DocumentSetContentable + // The OdataType property + odataType *string + // Indicates whether to add the name of the document set to each file name. + propagateWelcomePageChanges *bool + // The sharedColumns property + sharedColumns []ColumnDefinitionable + // Add the name of the Document Set to each file name. + shouldPrefixNameToFile *bool + // The welcomePageColumns property + welcomePageColumns []ColumnDefinitionable + // Welcome page absolute URL. + welcomePageUrl *string +} +// NewDocumentSet instantiates a new documentSet and sets the default values. +func NewDocumentSet()(*DocumentSet) { + m := &DocumentSet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDocumentSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSet(), 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 *DocumentSet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedContentTypes gets the allowedContentTypes property value. Content types allowed in document set. +func (m *DocumentSet) GetAllowedContentTypes()([]ContentTypeInfoable) { + return m.allowedContentTypes +} +// GetDefaultContents gets the defaultContents property value. Default contents of document set. +func (m *DocumentSet) GetDefaultContents()([]DocumentSetContentable) { + return m.defaultContents +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedContentTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentTypeInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentTypeInfoable, len(val)) + for i, v := range val { + res[i] = v.(ContentTypeInfoable) + } + m.SetAllowedContentTypes(res) + } + return nil + } + res["defaultContents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetContentable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetContentable) + } + m.SetDefaultContents(res) + } + 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["propagateWelcomePageChanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPropagateWelcomePageChanges(val) + } + return nil + } + res["sharedColumns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetSharedColumns(res) + } + return nil + } + res["shouldPrefixNameToFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldPrefixNameToFile(val) + } + return nil + } + res["welcomePageColumns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetWelcomePageColumns(res) + } + return nil + } + res["welcomePageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWelcomePageUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DocumentSet) GetOdataType()(*string) { + return m.odataType +} +// GetPropagateWelcomePageChanges gets the propagateWelcomePageChanges property value. Indicates whether to add the name of the document set to each file name. +func (m *DocumentSet) GetPropagateWelcomePageChanges()(*bool) { + return m.propagateWelcomePageChanges +} +// GetSharedColumns gets the sharedColumns property value. The sharedColumns property +func (m *DocumentSet) GetSharedColumns()([]ColumnDefinitionable) { + return m.sharedColumns +} +// GetShouldPrefixNameToFile gets the shouldPrefixNameToFile property value. Add the name of the Document Set to each file name. +func (m *DocumentSet) GetShouldPrefixNameToFile()(*bool) { + return m.shouldPrefixNameToFile +} +// GetWelcomePageColumns gets the welcomePageColumns property value. The welcomePageColumns property +func (m *DocumentSet) GetWelcomePageColumns()([]ColumnDefinitionable) { + return m.welcomePageColumns +} +// GetWelcomePageUrl gets the welcomePageUrl property value. Welcome page absolute URL. +func (m *DocumentSet) GetWelcomePageUrl()(*string) { + return m.welcomePageUrl +} +// Serialize serializes information the current object +func (m *DocumentSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedContentTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedContentTypes())) + for i, v := range m.GetAllowedContentTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("allowedContentTypes", cast) + if err != nil { + return err + } + } + if m.GetDefaultContents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefaultContents())) + for i, v := range m.GetDefaultContents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("defaultContents", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("propagateWelcomePageChanges", m.GetPropagateWelcomePageChanges()) + if err != nil { + return err + } + } + if m.GetSharedColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedColumns())) + for i, v := range m.GetSharedColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sharedColumns", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("shouldPrefixNameToFile", m.GetShouldPrefixNameToFile()) + if err != nil { + return err + } + } + if m.GetWelcomePageColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWelcomePageColumns())) + for i, v := range m.GetWelcomePageColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("welcomePageColumns", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("welcomePageUrl", m.GetWelcomePageUrl()) + 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 *DocumentSet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedContentTypes sets the allowedContentTypes property value. Content types allowed in document set. +func (m *DocumentSet) SetAllowedContentTypes(value []ContentTypeInfoable)() { + m.allowedContentTypes = value +} +// SetDefaultContents sets the defaultContents property value. Default contents of document set. +func (m *DocumentSet) SetDefaultContents(value []DocumentSetContentable)() { + m.defaultContents = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DocumentSet) SetOdataType(value *string)() { + m.odataType = value +} +// SetPropagateWelcomePageChanges sets the propagateWelcomePageChanges property value. Indicates whether to add the name of the document set to each file name. +func (m *DocumentSet) SetPropagateWelcomePageChanges(value *bool)() { + m.propagateWelcomePageChanges = value +} +// SetSharedColumns sets the sharedColumns property value. The sharedColumns property +func (m *DocumentSet) SetSharedColumns(value []ColumnDefinitionable)() { + m.sharedColumns = value +} +// SetShouldPrefixNameToFile sets the shouldPrefixNameToFile property value. Add the name of the Document Set to each file name. +func (m *DocumentSet) SetShouldPrefixNameToFile(value *bool)() { + m.shouldPrefixNameToFile = value +} +// SetWelcomePageColumns sets the welcomePageColumns property value. The welcomePageColumns property +func (m *DocumentSet) SetWelcomePageColumns(value []ColumnDefinitionable)() { + m.welcomePageColumns = value +} +// SetWelcomePageUrl sets the welcomePageUrl property value. Welcome page absolute URL. +func (m *DocumentSet) SetWelcomePageUrl(value *string)() { + m.welcomePageUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_content.go b/src/internal/connector/graph/betasdk/models/document_set_content.go new file mode 100644 index 000000000..2437f2d2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_content.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetContent +type DocumentSetContent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Content type information of the file. + contentType ContentTypeInfoable + // Name of the file in resource folder that should be added as a default content or a template in the document set + fileName *string + // Folder name in which the file will be placed when a new document set is created in the library. + folderName *string + // The OdataType property + odataType *string +} +// NewDocumentSetContent instantiates a new documentSetContent and sets the default values. +func NewDocumentSetContent()(*DocumentSetContent) { + m := &DocumentSetContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDocumentSetContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetContent(), 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 *DocumentSetContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContentType gets the contentType property value. Content type information of the file. +func (m *DocumentSetContent) GetContentType()(ContentTypeInfoable) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentTypeInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContentType(val.(ContentTypeInfoable)) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["folderName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFolderName(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 + } + return res +} +// GetFileName gets the fileName property value. Name of the file in resource folder that should be added as a default content or a template in the document set +func (m *DocumentSetContent) GetFileName()(*string) { + return m.fileName +} +// GetFolderName gets the folderName property value. Folder name in which the file will be placed when a new document set is created in the library. +func (m *DocumentSetContent) GetFolderName()(*string) { + return m.folderName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DocumentSetContent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DocumentSetContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("folderName", m.GetFolderName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DocumentSetContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContentType sets the contentType property value. Content type information of the file. +func (m *DocumentSetContent) SetContentType(value ContentTypeInfoable)() { + m.contentType = value +} +// SetFileName sets the fileName property value. Name of the file in resource folder that should be added as a default content or a template in the document set +func (m *DocumentSetContent) SetFileName(value *string)() { + m.fileName = value +} +// SetFolderName sets the folderName property value. Folder name in which the file will be placed when a new document set is created in the library. +func (m *DocumentSetContent) SetFolderName(value *string)() { + m.folderName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DocumentSetContent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_content_collection_response.go b/src/internal/connector/graph/betasdk/models/document_set_content_collection_response.go new file mode 100644 index 000000000..1beea031c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetContentCollectionResponse +type DocumentSetContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DocumentSetContentable +} +// NewDocumentSetContentCollectionResponse instantiates a new DocumentSetContentCollectionResponse and sets the default values. +func NewDocumentSetContentCollectionResponse()(*DocumentSetContentCollectionResponse) { + m := &DocumentSetContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDocumentSetContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetContentable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DocumentSetContentCollectionResponse) GetValue()([]DocumentSetContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *DocumentSetContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DocumentSetContentCollectionResponse) SetValue(value []DocumentSetContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/document_set_content_collection_responseable.go new file mode 100644 index 000000000..5e6a3b66e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetContentCollectionResponseable +type DocumentSetContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DocumentSetContentable) + SetValue(value []DocumentSetContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_contentable.go b/src/internal/connector/graph/betasdk/models/document_set_contentable.go new file mode 100644 index 000000000..fad9b6fb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_contentable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetContentable +type DocumentSetContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentType()(ContentTypeInfoable) + GetFileName()(*string) + GetFolderName()(*string) + GetOdataType()(*string) + SetContentType(value ContentTypeInfoable)() + SetFileName(value *string)() + SetFolderName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version.go b/src/internal/connector/graph/betasdk/models/document_set_version.go new file mode 100644 index 000000000..270f57d7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version.go @@ -0,0 +1,175 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersion +type DocumentSetVersion struct { + ListItemVersion + // Comment about the captured version. + comment *string + // User who captured the version. + createdBy IdentitySetable + // Date and time when this version was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Items within the document set that are captured as part of this version. + items []DocumentSetVersionItemable + // If true, minor versions of items are also captured; otherwise, only major versions will be captured. Default value is false. + shouldCaptureMinorVersion *bool +} +// NewDocumentSetVersion instantiates a new DocumentSetVersion and sets the default values. +func NewDocumentSetVersion()(*DocumentSetVersion) { + m := &DocumentSetVersion{ + ListItemVersion: *NewListItemVersion(), + } + odataTypeValue := "#microsoft.graph.documentSetVersion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDocumentSetVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetVersion(), nil +} +// GetComment gets the comment property value. Comment about the captured version. +func (m *DocumentSetVersion) GetComment()(*string) { + return m.comment +} +// GetCreatedBy gets the createdBy property value. User who captured the version. +func (m *DocumentSetVersion) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time when this version was created. +func (m *DocumentSetVersion) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ListItemVersion.GetFieldDeserializers() + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetVersionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetVersionItemable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetVersionItemable) + } + m.SetItems(res) + } + return nil + } + res["shouldCaptureMinorVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldCaptureMinorVersion(val) + } + return nil + } + return res +} +// GetItems gets the items property value. Items within the document set that are captured as part of this version. +func (m *DocumentSetVersion) GetItems()([]DocumentSetVersionItemable) { + return m.items +} +// GetShouldCaptureMinorVersion gets the shouldCaptureMinorVersion property value. If true, minor versions of items are also captured; otherwise, only major versions will be captured. Default value is false. +func (m *DocumentSetVersion) GetShouldCaptureMinorVersion()(*bool) { + return m.shouldCaptureMinorVersion +} +// Serialize serializes information the current object +func (m *DocumentSetVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ListItemVersion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("shouldCaptureMinorVersion", m.GetShouldCaptureMinorVersion()) + if err != nil { + return err + } + } + return nil +} +// SetComment sets the comment property value. Comment about the captured version. +func (m *DocumentSetVersion) SetComment(value *string)() { + m.comment = value +} +// SetCreatedBy sets the createdBy property value. User who captured the version. +func (m *DocumentSetVersion) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time when this version was created. +func (m *DocumentSetVersion) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetItems sets the items property value. Items within the document set that are captured as part of this version. +func (m *DocumentSetVersion) SetItems(value []DocumentSetVersionItemable)() { + m.items = value +} +// SetShouldCaptureMinorVersion sets the shouldCaptureMinorVersion property value. If true, minor versions of items are also captured; otherwise, only major versions will be captured. Default value is false. +func (m *DocumentSetVersion) SetShouldCaptureMinorVersion(value *bool)() { + m.shouldCaptureMinorVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_collection_response.go b/src/internal/connector/graph/betasdk/models/document_set_version_collection_response.go new file mode 100644 index 000000000..e572182b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionCollectionResponse +type DocumentSetVersionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DocumentSetVersionable +} +// NewDocumentSetVersionCollectionResponse instantiates a new DocumentSetVersionCollectionResponse and sets the default values. +func NewDocumentSetVersionCollectionResponse()(*DocumentSetVersionCollectionResponse) { + m := &DocumentSetVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDocumentSetVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetVersionable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DocumentSetVersionCollectionResponse) GetValue()([]DocumentSetVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DocumentSetVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DocumentSetVersionCollectionResponse) SetValue(value []DocumentSetVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/document_set_version_collection_responseable.go new file mode 100644 index 000000000..926c6fc77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionCollectionResponseable +type DocumentSetVersionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DocumentSetVersionable) + SetValue(value []DocumentSetVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_item.go b/src/internal/connector/graph/betasdk/models/document_set_version_item.go new file mode 100644 index 000000000..d5c7547a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_item.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionItem +type DocumentSetVersionItem 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 unique identifier for the item. + itemId *string + // The OdataType property + odataType *string + // The title of the item. + title *string + // The version ID of the item. + versionId *string +} +// NewDocumentSetVersionItem instantiates a new documentSetVersionItem and sets the default values. +func NewDocumentSetVersionItem()(*DocumentSetVersionItem) { + m := &DocumentSetVersionItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDocumentSetVersionItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetVersionItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetVersionItem(), 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 *DocumentSetVersionItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetVersionItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(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["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(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 +} +// GetItemId gets the itemId property value. The unique identifier for the item. +func (m *DocumentSetVersionItem) GetItemId()(*string) { + return m.itemId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DocumentSetVersionItem) GetOdataType()(*string) { + return m.odataType +} +// GetTitle gets the title property value. The title of the item. +func (m *DocumentSetVersionItem) GetTitle()(*string) { + return m.title +} +// GetVersionId gets the versionId property value. The version ID of the item. +func (m *DocumentSetVersionItem) GetVersionId()(*string) { + return m.versionId +} +// Serialize serializes information the current object +func (m *DocumentSetVersionItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *DocumentSetVersionItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetItemId sets the itemId property value. The unique identifier for the item. +func (m *DocumentSetVersionItem) SetItemId(value *string)() { + m.itemId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DocumentSetVersionItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetTitle sets the title property value. The title of the item. +func (m *DocumentSetVersionItem) SetTitle(value *string)() { + m.title = value +} +// SetVersionId sets the versionId property value. The version ID of the item. +func (m *DocumentSetVersionItem) SetVersionId(value *string)() { + m.versionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_response.go b/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_response.go new file mode 100644 index 000000000..adba21890 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionItemCollectionResponse +type DocumentSetVersionItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DocumentSetVersionItemable +} +// NewDocumentSetVersionItemCollectionResponse instantiates a new DocumentSetVersionItemCollectionResponse and sets the default values. +func NewDocumentSetVersionItemCollectionResponse()(*DocumentSetVersionItemCollectionResponse) { + m := &DocumentSetVersionItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDocumentSetVersionItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDocumentSetVersionItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDocumentSetVersionItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DocumentSetVersionItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetVersionItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetVersionItemable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetVersionItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DocumentSetVersionItemCollectionResponse) GetValue()([]DocumentSetVersionItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DocumentSetVersionItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DocumentSetVersionItemCollectionResponse) SetValue(value []DocumentSetVersionItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_responseable.go new file mode 100644 index 000000000..774b10b25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionItemCollectionResponseable +type DocumentSetVersionItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DocumentSetVersionItemable) + SetValue(value []DocumentSetVersionItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_version_itemable.go b/src/internal/connector/graph/betasdk/models/document_set_version_itemable.go new file mode 100644 index 000000000..1eb0ca095 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_version_itemable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionItemable +type DocumentSetVersionItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemId()(*string) + GetOdataType()(*string) + GetTitle()(*string) + GetVersionId()(*string) + SetItemId(value *string)() + SetOdataType(value *string)() + SetTitle(value *string)() + SetVersionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_set_versionable.go b/src/internal/connector/graph/betasdk/models/document_set_versionable.go new file mode 100644 index 000000000..d8d30053d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_set_versionable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetVersionable +type DocumentSetVersionable interface { + ListItemVersionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetItems()([]DocumentSetVersionItemable) + GetShouldCaptureMinorVersion()(*bool) + SetComment(value *string)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetItems(value []DocumentSetVersionItemable)() + SetShouldCaptureMinorVersion(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/document_setable.go b/src/internal/connector/graph/betasdk/models/document_setable.go new file mode 100644 index 000000000..748bb8f9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/document_setable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DocumentSetable +type DocumentSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedContentTypes()([]ContentTypeInfoable) + GetDefaultContents()([]DocumentSetContentable) + GetOdataType()(*string) + GetPropagateWelcomePageChanges()(*bool) + GetSharedColumns()([]ColumnDefinitionable) + GetShouldPrefixNameToFile()(*bool) + GetWelcomePageColumns()([]ColumnDefinitionable) + GetWelcomePageUrl()(*string) + SetAllowedContentTypes(value []ContentTypeInfoable)() + SetDefaultContents(value []DocumentSetContentable)() + SetOdataType(value *string)() + SetPropagateWelcomePageChanges(value *bool)() + SetSharedColumns(value []ColumnDefinitionable)() + SetShouldPrefixNameToFile(value *bool)() + SetWelcomePageColumns(value []ColumnDefinitionable)() + SetWelcomePageUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/documentable.go b/src/internal/connector/graph/betasdk/models/documentable.go new file mode 100644 index 000000000..0f9818dbb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/documentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Documentable +type Documentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()([]DocumentCommentable) + SetComments(value []DocumentCommentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain.go b/src/internal/connector/graph/betasdk/models/domain.go new file mode 100644 index 000000000..999bd0cec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain.go @@ -0,0 +1,494 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Domain +type Domain struct { + Entity + // Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Azure AD performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. This property is read-only and is not nullable. + authenticationType *string + // This property is always null except when the verify action is used. When the verify action is used, a domain entity is returned in the response. The availabilityStatus property of the domain entity in the response is either AvailableImmediately or EmailVerifiedDomainTakeoverScheduled. + availabilityStatus *string + // The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. + domainNameReferences []DirectoryObjectable + // Domain settings configured by customer when federated with Azure AD. Supports $expand. + federationConfiguration []InternalDomainFederationable + // The value of the property is false if the DNS record management of the domain has been delegated to Microsoft 365. Otherwise, the value is true. Not nullable + isAdminManaged *bool + // true if this is the default domain that is used for user creation. There is only one default domain per company. Not nullable + isDefault *bool + // true if this is the initial domain created by Microsoft Online Services (companyname.onmicrosoft.com). There is only one initial domain per company. Not nullable + isInitial *bool + // true if the domain is a verified root domain. Otherwise, false if the domain is a subdomain or unverified. Not nullable + isRoot *bool + // true if the domain has completed domain ownership verification. Not nullable + isVerified *bool + // Specifies the number of days before a user receives notification that their password will expire. If the property is not set, a default value of 14 days will be used. + passwordNotificationWindowInDays *int32 + // Specifies the length of time that a password is valid before it must be changed. If the property is not set, a default value of 90 days will be used. + passwordValidityPeriodInDays *int32 + // DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. + serviceConfigurationRecords []DomainDnsRecordable + // The sharedEmailDomainInvitations property + sharedEmailDomainInvitations []SharedEmailDomainInvitationable + // Status of asynchronous operations scheduled for the domain. + state DomainStateable + // The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline,SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values which you can add/remove using Graph API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. + supportedServices []string + // DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. + verificationDnsRecords []DomainDnsRecordable +} +// NewDomain instantiates a new Domain and sets the default values. +func NewDomain()(*Domain) { + m := &Domain{ + Entity: *NewEntity(), + } + return m +} +// CreateDomainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomain(), nil +} +// GetAuthenticationType gets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Azure AD performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. This property is read-only and is not nullable. +func (m *Domain) GetAuthenticationType()(*string) { + return m.authenticationType +} +// GetAvailabilityStatus gets the availabilityStatus property value. This property is always null except when the verify action is used. When the verify action is used, a domain entity is returned in the response. The availabilityStatus property of the domain entity in the response is either AvailableImmediately or EmailVerifiedDomainTakeoverScheduled. +func (m *Domain) GetAvailabilityStatus()(*string) { + return m.availabilityStatus +} +// GetDomainNameReferences gets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +func (m *Domain) GetDomainNameReferences()([]DirectoryObjectable) { + return m.domainNameReferences +} +// GetFederationConfiguration gets the federationConfiguration property value. Domain settings configured by customer when federated with Azure AD. Supports $expand. +func (m *Domain) GetFederationConfiguration()([]InternalDomainFederationable) { + return m.federationConfiguration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Domain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationType(val) + } + return nil + } + res["availabilityStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityStatus(val) + } + return nil + } + res["domainNameReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetDomainNameReferences(res) + } + return nil + } + res["federationConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInternalDomainFederationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InternalDomainFederationable, len(val)) + for i, v := range val { + res[i] = v.(InternalDomainFederationable) + } + m.SetFederationConfiguration(res) + } + return nil + } + res["isAdminManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAdminManaged(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isInitial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInitial(val) + } + return nil + } + res["isRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRoot(val) + } + return nil + } + res["isVerified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVerified(val) + } + return nil + } + res["passwordNotificationWindowInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordNotificationWindowInDays(val) + } + return nil + } + res["passwordValidityPeriodInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordValidityPeriodInDays(val) + } + return nil + } + res["serviceConfigurationRecords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsRecordable) + } + m.SetServiceConfigurationRecords(res) + } + return nil + } + res["sharedEmailDomainInvitations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedEmailDomainInvitationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedEmailDomainInvitationable, len(val)) + for i, v := range val { + res[i] = v.(SharedEmailDomainInvitationable) + } + m.SetSharedEmailDomainInvitations(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDomainStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(DomainStateable)) + } + return nil + } + res["supportedServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedServices(res) + } + return nil + } + res["verificationDnsRecords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsRecordable) + } + m.SetVerificationDnsRecords(res) + } + return nil + } + return res +} +// GetIsAdminManaged gets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain has been delegated to Microsoft 365. Otherwise, the value is true. Not nullable +func (m *Domain) GetIsAdminManaged()(*bool) { + return m.isAdminManaged +} +// GetIsDefault gets the isDefault property value. true if this is the default domain that is used for user creation. There is only one default domain per company. Not nullable +func (m *Domain) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsInitial gets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (companyname.onmicrosoft.com). There is only one initial domain per company. Not nullable +func (m *Domain) GetIsInitial()(*bool) { + return m.isInitial +} +// GetIsRoot gets the isRoot property value. true if the domain is a verified root domain. Otherwise, false if the domain is a subdomain or unverified. Not nullable +func (m *Domain) GetIsRoot()(*bool) { + return m.isRoot +} +// GetIsVerified gets the isVerified property value. true if the domain has completed domain ownership verification. Not nullable +func (m *Domain) GetIsVerified()(*bool) { + return m.isVerified +} +// GetPasswordNotificationWindowInDays gets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property is not set, a default value of 14 days will be used. +func (m *Domain) GetPasswordNotificationWindowInDays()(*int32) { + return m.passwordNotificationWindowInDays +} +// GetPasswordValidityPeriodInDays gets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property is not set, a default value of 90 days will be used. +func (m *Domain) GetPasswordValidityPeriodInDays()(*int32) { + return m.passwordValidityPeriodInDays +} +// GetServiceConfigurationRecords gets the serviceConfigurationRecords property value. DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. +func (m *Domain) GetServiceConfigurationRecords()([]DomainDnsRecordable) { + return m.serviceConfigurationRecords +} +// GetSharedEmailDomainInvitations gets the sharedEmailDomainInvitations property value. The sharedEmailDomainInvitations property +func (m *Domain) GetSharedEmailDomainInvitations()([]SharedEmailDomainInvitationable) { + return m.sharedEmailDomainInvitations +} +// GetState gets the state property value. Status of asynchronous operations scheduled for the domain. +func (m *Domain) GetState()(DomainStateable) { + return m.state +} +// GetSupportedServices gets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline,SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values which you can add/remove using Graph API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. +func (m *Domain) GetSupportedServices()([]string) { + return m.supportedServices +} +// GetVerificationDnsRecords gets the verificationDnsRecords property value. DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. +func (m *Domain) GetVerificationDnsRecords()([]DomainDnsRecordable) { + return m.verificationDnsRecords +} +// Serialize serializes information the current object +func (m *Domain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("authenticationType", m.GetAuthenticationType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("availabilityStatus", m.GetAvailabilityStatus()) + if err != nil { + return err + } + } + if m.GetDomainNameReferences() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDomainNameReferences())) + for i, v := range m.GetDomainNameReferences() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("domainNameReferences", cast) + if err != nil { + return err + } + } + if m.GetFederationConfiguration() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFederationConfiguration())) + for i, v := range m.GetFederationConfiguration() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("federationConfiguration", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAdminManaged", m.GetIsAdminManaged()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isInitial", m.GetIsInitial()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRoot", m.GetIsRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isVerified", m.GetIsVerified()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordNotificationWindowInDays", m.GetPasswordNotificationWindowInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordValidityPeriodInDays", m.GetPasswordValidityPeriodInDays()) + if err != nil { + return err + } + } + if m.GetServiceConfigurationRecords() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServiceConfigurationRecords())) + for i, v := range m.GetServiceConfigurationRecords() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("serviceConfigurationRecords", cast) + if err != nil { + return err + } + } + if m.GetSharedEmailDomainInvitations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedEmailDomainInvitations())) + for i, v := range m.GetSharedEmailDomainInvitations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharedEmailDomainInvitations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("state", m.GetState()) + if err != nil { + return err + } + } + if m.GetSupportedServices() != nil { + err = writer.WriteCollectionOfStringValues("supportedServices", m.GetSupportedServices()) + if err != nil { + return err + } + } + if m.GetVerificationDnsRecords() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVerificationDnsRecords())) + for i, v := range m.GetVerificationDnsRecords() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("verificationDnsRecords", cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationType sets the authenticationType property value. Indicates the configured authentication type for the domain. The value is either Managed or Federated. Managed indicates a cloud managed domain where Azure AD performs user authentication. Federated indicates authentication is federated with an identity provider such as the tenant's on-premises Active Directory via Active Directory Federation Services. This property is read-only and is not nullable. +func (m *Domain) SetAuthenticationType(value *string)() { + m.authenticationType = value +} +// SetAvailabilityStatus sets the availabilityStatus property value. This property is always null except when the verify action is used. When the verify action is used, a domain entity is returned in the response. The availabilityStatus property of the domain entity in the response is either AvailableImmediately or EmailVerifiedDomainTakeoverScheduled. +func (m *Domain) SetAvailabilityStatus(value *string)() { + m.availabilityStatus = value +} +// SetDomainNameReferences sets the domainNameReferences property value. The objects such as users and groups that reference the domain ID. Read-only, Nullable. Supports $expand and $filter by the OData type of objects returned. For example /domains/{domainId}/domainNameReferences/microsoft.graph.user and /domains/{domainId}/domainNameReferences/microsoft.graph.group. +func (m *Domain) SetDomainNameReferences(value []DirectoryObjectable)() { + m.domainNameReferences = value +} +// SetFederationConfiguration sets the federationConfiguration property value. Domain settings configured by customer when federated with Azure AD. Supports $expand. +func (m *Domain) SetFederationConfiguration(value []InternalDomainFederationable)() { + m.federationConfiguration = value +} +// SetIsAdminManaged sets the isAdminManaged property value. The value of the property is false if the DNS record management of the domain has been delegated to Microsoft 365. Otherwise, the value is true. Not nullable +func (m *Domain) SetIsAdminManaged(value *bool)() { + m.isAdminManaged = value +} +// SetIsDefault sets the isDefault property value. true if this is the default domain that is used for user creation. There is only one default domain per company. Not nullable +func (m *Domain) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsInitial sets the isInitial property value. true if this is the initial domain created by Microsoft Online Services (companyname.onmicrosoft.com). There is only one initial domain per company. Not nullable +func (m *Domain) SetIsInitial(value *bool)() { + m.isInitial = value +} +// SetIsRoot sets the isRoot property value. true if the domain is a verified root domain. Otherwise, false if the domain is a subdomain or unverified. Not nullable +func (m *Domain) SetIsRoot(value *bool)() { + m.isRoot = value +} +// SetIsVerified sets the isVerified property value. true if the domain has completed domain ownership verification. Not nullable +func (m *Domain) SetIsVerified(value *bool)() { + m.isVerified = value +} +// SetPasswordNotificationWindowInDays sets the passwordNotificationWindowInDays property value. Specifies the number of days before a user receives notification that their password will expire. If the property is not set, a default value of 14 days will be used. +func (m *Domain) SetPasswordNotificationWindowInDays(value *int32)() { + m.passwordNotificationWindowInDays = value +} +// SetPasswordValidityPeriodInDays sets the passwordValidityPeriodInDays property value. Specifies the length of time that a password is valid before it must be changed. If the property is not set, a default value of 90 days will be used. +func (m *Domain) SetPasswordValidityPeriodInDays(value *int32)() { + m.passwordValidityPeriodInDays = value +} +// SetServiceConfigurationRecords sets the serviceConfigurationRecords property value. DNS records the customer adds to the DNS zone file of the domain before the domain can be used by Microsoft Online services. Read-only, Nullable. Supports $expand. +func (m *Domain) SetServiceConfigurationRecords(value []DomainDnsRecordable)() { + m.serviceConfigurationRecords = value +} +// SetSharedEmailDomainInvitations sets the sharedEmailDomainInvitations property value. The sharedEmailDomainInvitations property +func (m *Domain) SetSharedEmailDomainInvitations(value []SharedEmailDomainInvitationable)() { + m.sharedEmailDomainInvitations = value +} +// SetState sets the state property value. Status of asynchronous operations scheduled for the domain. +func (m *Domain) SetState(value DomainStateable)() { + m.state = value +} +// SetSupportedServices sets the supportedServices property value. The capabilities assigned to the domain. Can include 0, 1 or more of following values: Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline,SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. The values which you can add/remove using Graph API include: Email, OfficeCommunicationsOnline, Yammer. Not nullable. +func (m *Domain) SetSupportedServices(value []string)() { + m.supportedServices = value +} +// SetVerificationDnsRecords sets the verificationDnsRecords property value. DNS records that the customer adds to the DNS zone file of the domain before the customer can complete domain ownership verification with Azure AD. Read-only, Nullable. Supports $expand. +func (m *Domain) SetVerificationDnsRecords(value []DomainDnsRecordable)() { + m.verificationDnsRecords = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_collection_response.go new file mode 100644 index 000000000..144cecb59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainCollectionResponse +type DomainCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Domainable +} +// NewDomainCollectionResponse instantiates a new DomainCollectionResponse and sets the default values. +func NewDomainCollectionResponse()(*DomainCollectionResponse) { + m := &DomainCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Domainable, len(val)) + for i, v := range val { + res[i] = v.(Domainable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainCollectionResponse) GetValue()([]Domainable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainCollectionResponse) SetValue(value []Domainable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_collection_responseable.go new file mode 100644 index 000000000..c628f0fde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainCollectionResponseable +type DomainCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Domainable) + SetValue(value []Domainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_cname_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record.go new file mode 100644 index 000000000..c5a3e07f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsCnameRecord +type DomainDnsCnameRecord struct { + DomainDnsRecord + // The canonical name of the CNAME record. Used to configure the CNAME record at the DNS host. + canonicalName *string +} +// NewDomainDnsCnameRecord instantiates a new DomainDnsCnameRecord and sets the default values. +func NewDomainDnsCnameRecord()(*DomainDnsCnameRecord) { + m := &DomainDnsCnameRecord{ + DomainDnsRecord: *NewDomainDnsRecord(), + } + return m +} +// CreateDomainDnsCnameRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsCnameRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsCnameRecord(), nil +} +// GetCanonicalName gets the canonicalName property value. The canonical name of the CNAME record. Used to configure the CNAME record at the DNS host. +func (m *DomainDnsCnameRecord) GetCanonicalName()(*string) { + return m.canonicalName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsCnameRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DomainDnsRecord.GetFieldDeserializers() + res["canonicalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCanonicalName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DomainDnsCnameRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DomainDnsRecord.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("canonicalName", m.GetCanonicalName()) + if err != nil { + return err + } + } + return nil +} +// SetCanonicalName sets the canonicalName property value. The canonical name of the CNAME record. Used to configure the CNAME record at the DNS host. +func (m *DomainDnsCnameRecord) SetCanonicalName(value *string)() { + m.canonicalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_response.go new file mode 100644 index 000000000..b747e30ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsCnameRecordCollectionResponse +type DomainDnsCnameRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsCnameRecordable +} +// NewDomainDnsCnameRecordCollectionResponse instantiates a new DomainDnsCnameRecordCollectionResponse and sets the default values. +func NewDomainDnsCnameRecordCollectionResponse()(*DomainDnsCnameRecordCollectionResponse) { + m := &DomainDnsCnameRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsCnameRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsCnameRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsCnameRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsCnameRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsCnameRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsCnameRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsCnameRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsCnameRecordCollectionResponse) GetValue()([]DomainDnsCnameRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsCnameRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsCnameRecordCollectionResponse) SetValue(value []DomainDnsCnameRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_responseable.go new file mode 100644 index 000000000..05439da3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_cname_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsCnameRecordCollectionResponseable +type DomainDnsCnameRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsCnameRecordable) + SetValue(value []DomainDnsCnameRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_cname_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_cname_recordable.go new file mode 100644 index 000000000..acdb4b27e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_cname_recordable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsCnameRecordable +type DomainDnsCnameRecordable interface { + DomainDnsRecordable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCanonicalName()(*string) + SetCanonicalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_mx_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record.go new file mode 100644 index 000000000..cda003d00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsMxRecord +type DomainDnsMxRecord struct { + DomainDnsRecord + // Value used when configuring the answer/destination/value of the MX record at the DNS host. + mailExchange *string + // Value used when configuring the Preference/Priority property of the MX record at the DNS host. + preference *int32 +} +// NewDomainDnsMxRecord instantiates a new DomainDnsMxRecord and sets the default values. +func NewDomainDnsMxRecord()(*DomainDnsMxRecord) { + m := &DomainDnsMxRecord{ + DomainDnsRecord: *NewDomainDnsRecord(), + } + return m +} +// CreateDomainDnsMxRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsMxRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsMxRecord(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsMxRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DomainDnsRecord.GetFieldDeserializers() + res["mailExchange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailExchange(val) + } + return nil + } + res["preference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPreference(val) + } + return nil + } + return res +} +// GetMailExchange gets the mailExchange property value. Value used when configuring the answer/destination/value of the MX record at the DNS host. +func (m *DomainDnsMxRecord) GetMailExchange()(*string) { + return m.mailExchange +} +// GetPreference gets the preference property value. Value used when configuring the Preference/Priority property of the MX record at the DNS host. +func (m *DomainDnsMxRecord) GetPreference()(*int32) { + return m.preference +} +// Serialize serializes information the current object +func (m *DomainDnsMxRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DomainDnsRecord.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("mailExchange", m.GetMailExchange()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("preference", m.GetPreference()) + if err != nil { + return err + } + } + return nil +} +// SetMailExchange sets the mailExchange property value. Value used when configuring the answer/destination/value of the MX record at the DNS host. +func (m *DomainDnsMxRecord) SetMailExchange(value *string)() { + m.mailExchange = value +} +// SetPreference sets the preference property value. Value used when configuring the Preference/Priority property of the MX record at the DNS host. +func (m *DomainDnsMxRecord) SetPreference(value *int32)() { + m.preference = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_response.go new file mode 100644 index 000000000..49ebb572b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsMxRecordCollectionResponse +type DomainDnsMxRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsMxRecordable +} +// NewDomainDnsMxRecordCollectionResponse instantiates a new DomainDnsMxRecordCollectionResponse and sets the default values. +func NewDomainDnsMxRecordCollectionResponse()(*DomainDnsMxRecordCollectionResponse) { + m := &DomainDnsMxRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsMxRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsMxRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsMxRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsMxRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsMxRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsMxRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsMxRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsMxRecordCollectionResponse) GetValue()([]DomainDnsMxRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsMxRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsMxRecordCollectionResponse) SetValue(value []DomainDnsMxRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_responseable.go new file mode 100644 index 000000000..3292ccff0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_mx_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsMxRecordCollectionResponseable +type DomainDnsMxRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsMxRecordable) + SetValue(value []DomainDnsMxRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_mx_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_mx_recordable.go new file mode 100644 index 000000000..2e4ffaa6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_mx_recordable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsMxRecordable +type DomainDnsMxRecordable interface { + DomainDnsRecordable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMailExchange()(*string) + GetPreference()(*int32) + SetMailExchange(value *string)() + SetPreference(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_record.go new file mode 100644 index 000000000..d4fdd0e8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_record.go @@ -0,0 +1,190 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsRecord provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DomainDnsRecord struct { + Entity + // If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain. + isOptional *bool + // Value used when configuring the name of the DNS record at the DNS host. + label *string + // Indicates what type of DNS record this entity represents.The value can be one of the following: CName, Mx, Srv, Txt. + recordType *string + // Microsoft Online Service or feature that has a dependency on this DNS record.Can be one of the following values: null, Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. + supportedService *string + // Value to use when configuring the time-to-live (ttl) property of the DNS record at the DNS host. Not nullable. + ttl *int32 +} +// NewDomainDnsRecord instantiates a new domainDnsRecord and sets the default values. +func NewDomainDnsRecord()(*DomainDnsRecord) { + m := &DomainDnsRecord{ + Entity: *NewEntity(), + } + return m +} +// CreateDomainDnsRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.domainDnsCnameRecord": + return NewDomainDnsCnameRecord(), nil + case "#microsoft.graph.domainDnsMxRecord": + return NewDomainDnsMxRecord(), nil + case "#microsoft.graph.domainDnsSrvRecord": + return NewDomainDnsSrvRecord(), nil + case "#microsoft.graph.domainDnsTxtRecord": + return NewDomainDnsTxtRecord(), nil + case "#microsoft.graph.domainDnsUnavailableRecord": + return NewDomainDnsUnavailableRecord(), nil + } + } + } + } + return NewDomainDnsRecord(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isOptional"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOptional(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["recordType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordType(val) + } + return nil + } + res["supportedService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportedService(val) + } + return nil + } + res["ttl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTtl(val) + } + return nil + } + return res +} +// GetIsOptional gets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain. +func (m *DomainDnsRecord) GetIsOptional()(*bool) { + return m.isOptional +} +// GetLabel gets the label property value. Value used when configuring the name of the DNS record at the DNS host. +func (m *DomainDnsRecord) GetLabel()(*string) { + return m.label +} +// GetRecordType gets the recordType property value. Indicates what type of DNS record this entity represents.The value can be one of the following: CName, Mx, Srv, Txt. +func (m *DomainDnsRecord) GetRecordType()(*string) { + return m.recordType +} +// GetSupportedService gets the supportedService property value. Microsoft Online Service or feature that has a dependency on this DNS record.Can be one of the following values: null, Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. +func (m *DomainDnsRecord) GetSupportedService()(*string) { + return m.supportedService +} +// GetTtl gets the ttl property value. Value to use when configuring the time-to-live (ttl) property of the DNS record at the DNS host. Not nullable. +func (m *DomainDnsRecord) GetTtl()(*int32) { + return m.ttl +} +// Serialize serializes information the current object +func (m *DomainDnsRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isOptional", m.GetIsOptional()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recordType", m.GetRecordType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportedService", m.GetSupportedService()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ttl", m.GetTtl()) + if err != nil { + return err + } + } + return nil +} +// SetIsOptional sets the isOptional property value. If false, this record must be configured by the customer at the DNS host for Microsoft Online Services to operate correctly with the domain. +func (m *DomainDnsRecord) SetIsOptional(value *bool)() { + m.isOptional = value +} +// SetLabel sets the label property value. Value used when configuring the name of the DNS record at the DNS host. +func (m *DomainDnsRecord) SetLabel(value *string)() { + m.label = value +} +// SetRecordType sets the recordType property value. Indicates what type of DNS record this entity represents.The value can be one of the following: CName, Mx, Srv, Txt. +func (m *DomainDnsRecord) SetRecordType(value *string)() { + m.recordType = value +} +// SetSupportedService sets the supportedService property value. Microsoft Online Service or feature that has a dependency on this DNS record.Can be one of the following values: null, Email, Sharepoint, EmailInternalRelayOnly, OfficeCommunicationsOnline, SharePointDefaultDomain, FullRedelegation, SharePointPublic, OrgIdAuthentication, Yammer, Intune. +func (m *DomainDnsRecord) SetSupportedService(value *string)() { + m.supportedService = value +} +// SetTtl sets the ttl property value. Value to use when configuring the time-to-live (ttl) property of the DNS record at the DNS host. Not nullable. +func (m *DomainDnsRecord) SetTtl(value *int32)() { + m.ttl = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_response.go new file mode 100644 index 000000000..98492b303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsRecordCollectionResponse +type DomainDnsRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsRecordable +} +// NewDomainDnsRecordCollectionResponse instantiates a new DomainDnsRecordCollectionResponse and sets the default values. +func NewDomainDnsRecordCollectionResponse()(*DomainDnsRecordCollectionResponse) { + m := &DomainDnsRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsRecordCollectionResponse) GetValue()([]DomainDnsRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsRecordCollectionResponse) SetValue(value []DomainDnsRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_responseable.go new file mode 100644 index 000000000..47ad7d1fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsRecordCollectionResponseable +type DomainDnsRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsRecordable) + SetValue(value []DomainDnsRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_recordable.go new file mode 100644 index 000000000..b95b10963 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_recordable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsRecordable +type DomainDnsRecordable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsOptional()(*bool) + GetLabel()(*string) + GetRecordType()(*string) + GetSupportedService()(*string) + GetTtl()(*int32) + SetIsOptional(value *bool)() + SetLabel(value *string)() + SetRecordType(value *string)() + SetSupportedService(value *string)() + SetTtl(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_srv_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record.go new file mode 100644 index 000000000..1644ff22c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record.go @@ -0,0 +1,190 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsSrvRecord +type DomainDnsSrvRecord struct { + DomainDnsRecord + // Value to use when configuring the Target property of the SRV record at the DNS host. + nameTarget *string + // Value to use when configuring the port property of the SRV record at the DNS host. + port *int32 + // Value to use when configuring the priority property of the SRV record at the DNS host. + priority *int32 + // Value to use when configuring the protocol property of the SRV record at the DNS host. + protocol *string + // Value to use when configuring the service property of the SRV record at the DNS host. + service *string + // Value to use when configuring the weight property of the SRV record at the DNS host. + weight *int32 +} +// NewDomainDnsSrvRecord instantiates a new DomainDnsSrvRecord and sets the default values. +func NewDomainDnsSrvRecord()(*DomainDnsSrvRecord) { + m := &DomainDnsSrvRecord{ + DomainDnsRecord: *NewDomainDnsRecord(), + } + return m +} +// CreateDomainDnsSrvRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsSrvRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsSrvRecord(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsSrvRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DomainDnsRecord.GetFieldDeserializers() + res["nameTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNameTarget(val) + } + return nil + } + res["port"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPort(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["protocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProtocol(val) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["weight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWeight(val) + } + return nil + } + return res +} +// GetNameTarget gets the nameTarget property value. Value to use when configuring the Target property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetNameTarget()(*string) { + return m.nameTarget +} +// GetPort gets the port property value. Value to use when configuring the port property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetPort()(*int32) { + return m.port +} +// GetPriority gets the priority property value. Value to use when configuring the priority property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetPriority()(*int32) { + return m.priority +} +// GetProtocol gets the protocol property value. Value to use when configuring the protocol property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetProtocol()(*string) { + return m.protocol +} +// GetService gets the service property value. Value to use when configuring the service property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetService()(*string) { + return m.service +} +// GetWeight gets the weight property value. Value to use when configuring the weight property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) GetWeight()(*int32) { + return m.weight +} +// Serialize serializes information the current object +func (m *DomainDnsSrvRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DomainDnsRecord.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("nameTarget", m.GetNameTarget()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("port", m.GetPort()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("protocol", m.GetProtocol()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("weight", m.GetWeight()) + if err != nil { + return err + } + } + return nil +} +// SetNameTarget sets the nameTarget property value. Value to use when configuring the Target property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetNameTarget(value *string)() { + m.nameTarget = value +} +// SetPort sets the port property value. Value to use when configuring the port property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetPort(value *int32)() { + m.port = value +} +// SetPriority sets the priority property value. Value to use when configuring the priority property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetPriority(value *int32)() { + m.priority = value +} +// SetProtocol sets the protocol property value. Value to use when configuring the protocol property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetProtocol(value *string)() { + m.protocol = value +} +// SetService sets the service property value. Value to use when configuring the service property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetService(value *string)() { + m.service = value +} +// SetWeight sets the weight property value. Value to use when configuring the weight property of the SRV record at the DNS host. +func (m *DomainDnsSrvRecord) SetWeight(value *int32)() { + m.weight = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_response.go new file mode 100644 index 000000000..37a9fb8db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsSrvRecordCollectionResponse +type DomainDnsSrvRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsSrvRecordable +} +// NewDomainDnsSrvRecordCollectionResponse instantiates a new DomainDnsSrvRecordCollectionResponse and sets the default values. +func NewDomainDnsSrvRecordCollectionResponse()(*DomainDnsSrvRecordCollectionResponse) { + m := &DomainDnsSrvRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsSrvRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsSrvRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsSrvRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsSrvRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsSrvRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsSrvRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsSrvRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsSrvRecordCollectionResponse) GetValue()([]DomainDnsSrvRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsSrvRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsSrvRecordCollectionResponse) SetValue(value []DomainDnsSrvRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_responseable.go new file mode 100644 index 000000000..d741c47ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_srv_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsSrvRecordCollectionResponseable +type DomainDnsSrvRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsSrvRecordable) + SetValue(value []DomainDnsSrvRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_srv_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_srv_recordable.go new file mode 100644 index 000000000..7fddec643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_srv_recordable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsSrvRecordable +type DomainDnsSrvRecordable interface { + DomainDnsRecordable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNameTarget()(*string) + GetPort()(*int32) + GetPriority()(*int32) + GetProtocol()(*string) + GetService()(*string) + GetWeight()(*int32) + SetNameTarget(value *string)() + SetPort(value *int32)() + SetPriority(value *int32)() + SetProtocol(value *string)() + SetService(value *string)() + SetWeight(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_txt_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record.go new file mode 100644 index 000000000..c87e66161 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsTxtRecord +type DomainDnsTxtRecord struct { + DomainDnsRecord + // Value used when configuring the text property at the DNS host. + text *string +} +// NewDomainDnsTxtRecord instantiates a new DomainDnsTxtRecord and sets the default values. +func NewDomainDnsTxtRecord()(*DomainDnsTxtRecord) { + m := &DomainDnsTxtRecord{ + DomainDnsRecord: *NewDomainDnsRecord(), + } + return m +} +// CreateDomainDnsTxtRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsTxtRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsTxtRecord(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsTxtRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DomainDnsRecord.GetFieldDeserializers() + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetText gets the text property value. Value used when configuring the text property at the DNS host. +func (m *DomainDnsTxtRecord) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *DomainDnsTxtRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DomainDnsRecord.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + return nil +} +// SetText sets the text property value. Value used when configuring the text property at the DNS host. +func (m *DomainDnsTxtRecord) SetText(value *string)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_response.go new file mode 100644 index 000000000..e35d75f56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsTxtRecordCollectionResponse +type DomainDnsTxtRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsTxtRecordable +} +// NewDomainDnsTxtRecordCollectionResponse instantiates a new DomainDnsTxtRecordCollectionResponse and sets the default values. +func NewDomainDnsTxtRecordCollectionResponse()(*DomainDnsTxtRecordCollectionResponse) { + m := &DomainDnsTxtRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsTxtRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsTxtRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsTxtRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsTxtRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsTxtRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsTxtRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsTxtRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsTxtRecordCollectionResponse) GetValue()([]DomainDnsTxtRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsTxtRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsTxtRecordCollectionResponse) SetValue(value []DomainDnsTxtRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_responseable.go new file mode 100644 index 000000000..1d37a39e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_txt_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsTxtRecordCollectionResponseable +type DomainDnsTxtRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsTxtRecordable) + SetValue(value []DomainDnsTxtRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_txt_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_txt_recordable.go new file mode 100644 index 000000000..e55723dd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_txt_recordable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsTxtRecordable +type DomainDnsTxtRecordable interface { + DomainDnsRecordable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetText()(*string) + SetText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record.go b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record.go new file mode 100644 index 000000000..3a809bc8a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsUnavailableRecord +type DomainDnsUnavailableRecord struct { + DomainDnsRecord + // Provides the reason why the DomainDnsUnavailableRecord entity is returned. + description *string +} +// NewDomainDnsUnavailableRecord instantiates a new DomainDnsUnavailableRecord and sets the default values. +func NewDomainDnsUnavailableRecord()(*DomainDnsUnavailableRecord) { + m := &DomainDnsUnavailableRecord{ + DomainDnsRecord: *NewDomainDnsRecord(), + } + return m +} +// CreateDomainDnsUnavailableRecordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsUnavailableRecordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsUnavailableRecord(), nil +} +// GetDescription gets the description property value. Provides the reason why the DomainDnsUnavailableRecord entity is returned. +func (m *DomainDnsUnavailableRecord) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsUnavailableRecord) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DomainDnsRecord.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DomainDnsUnavailableRecord) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DomainDnsRecord.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Provides the reason why the DomainDnsUnavailableRecord entity is returned. +func (m *DomainDnsUnavailableRecord) SetDescription(value *string)() { + m.description = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_response.go new file mode 100644 index 000000000..3040d6014 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsUnavailableRecordCollectionResponse +type DomainDnsUnavailableRecordCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainDnsUnavailableRecordable +} +// NewDomainDnsUnavailableRecordCollectionResponse instantiates a new DomainDnsUnavailableRecordCollectionResponse and sets the default values. +func NewDomainDnsUnavailableRecordCollectionResponse()(*DomainDnsUnavailableRecordCollectionResponse) { + m := &DomainDnsUnavailableRecordCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainDnsUnavailableRecordCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainDnsUnavailableRecordCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainDnsUnavailableRecordCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainDnsUnavailableRecordCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainDnsUnavailableRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainDnsUnavailableRecordable, len(val)) + for i, v := range val { + res[i] = v.(DomainDnsUnavailableRecordable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainDnsUnavailableRecordCollectionResponse) GetValue()([]DomainDnsUnavailableRecordable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainDnsUnavailableRecordCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainDnsUnavailableRecordCollectionResponse) SetValue(value []DomainDnsUnavailableRecordable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_responseable.go new file mode 100644 index 000000000..36758701a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_record_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsUnavailableRecordCollectionResponseable +type DomainDnsUnavailableRecordCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainDnsUnavailableRecordable) + SetValue(value []DomainDnsUnavailableRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_recordable.go b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_recordable.go new file mode 100644 index 000000000..e1992f49a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_dns_unavailable_recordable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainDnsUnavailableRecordable +type DomainDnsUnavailableRecordable interface { + DomainDnsRecordable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + SetDescription(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_identity_source.go b/src/internal/connector/graph/betasdk/models/domain_identity_source.go new file mode 100644 index 000000000..8d212f3f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_identity_source.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainIdentitySource +type DomainIdentitySource struct { + IdentitySource + // The name of the identity source, typically also the domain name. Read only. + displayName *string + // The domain name. Read only. + domainName *string +} +// NewDomainIdentitySource instantiates a new DomainIdentitySource and sets the default values. +func NewDomainIdentitySource()(*DomainIdentitySource) { + m := &DomainIdentitySource{ + IdentitySource: *NewIdentitySource(), + } + odataTypeValue := "#microsoft.graph.domainIdentitySource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDomainIdentitySourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainIdentitySourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainIdentitySource(), nil +} +// GetDisplayName gets the displayName property value. The name of the identity source, typically also the domain name. Read only. +func (m *DomainIdentitySource) GetDisplayName()(*string) { + return m.displayName +} +// GetDomainName gets the domainName property value. The domain name. Read only. +func (m *DomainIdentitySource) GetDomainName()(*string) { + return m.domainName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainIdentitySource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySource.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DomainIdentitySource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the identity source, typically also the domain name. Read only. +func (m *DomainIdentitySource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDomainName sets the domainName property value. The domain name. Read only. +func (m *DomainIdentitySource) SetDomainName(value *string)() { + m.domainName = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_identity_sourceable.go b/src/internal/connector/graph/betasdk/models/domain_identity_sourceable.go new file mode 100644 index 000000000..e726b49a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_identity_sourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainIdentitySourceable +type DomainIdentitySourceable interface { + IdentitySourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetDomainName()(*string) + SetDisplayName(value *string)() + SetDomainName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_name_source.go b/src/internal/connector/graph/betasdk/models/domain_name_source.go new file mode 100644 index 000000000..24f04bcc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_name_source.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DomainNameSource int + +const ( + // Full domain name. + FULLDOMAINNAME_DOMAINNAMESOURCE DomainNameSource = iota + // net bios domain name. + NETBIOSDOMAINNAME_DOMAINNAMESOURCE +) + +func (i DomainNameSource) String() string { + return []string{"fullDomainName", "netBiosDomainName"}[i] +} +func ParseDomainNameSource(v string) (interface{}, error) { + result := FULLDOMAINNAME_DOMAINNAMESOURCE + switch v { + case "fullDomainName": + result = FULLDOMAINNAME_DOMAINNAMESOURCE + case "netBiosDomainName": + result = NETBIOSDOMAINNAME_DOMAINNAMESOURCE + default: + return 0, errors.New("Unknown DomainNameSource value: " + v) + } + return &result, nil +} +func SerializeDomainNameSource(values []DomainNameSource) []string { + 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/domain_registrant.go b/src/internal/connector/graph/betasdk/models/domain_registrant.go new file mode 100644 index 000000000..2e26b073b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_registrant.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainRegistrant +type DomainRegistrant 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 countryOrRegionCode property + countryOrRegionCode *string + // The OdataType property + odataType *string + // The organization property + organization *string + // The url property + url *string + // The vendor property + vendor_escaped *string +} +// NewDomainRegistrant instantiates a new domainRegistrant and sets the default values. +func NewDomainRegistrant()(*DomainRegistrant) { + m := &DomainRegistrant{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDomainRegistrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainRegistrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainRegistrant(), 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 *DomainRegistrant) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCountryOrRegionCode gets the countryOrRegionCode property value. The countryOrRegionCode property +func (m *DomainRegistrant) GetCountryOrRegionCode()(*string) { + return m.countryOrRegionCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainRegistrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["countryOrRegionCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryOrRegionCode(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["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DomainRegistrant) GetOdataType()(*string) { + return m.odataType +} +// GetOrganization gets the organization property value. The organization property +func (m *DomainRegistrant) GetOrganization()(*string) { + return m.organization +} +// GetUrl gets the url property value. The url property +func (m *DomainRegistrant) GetUrl()(*string) { + return m.url +} +// GetVendor gets the vendor property value. The vendor property +func (m *DomainRegistrant) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *DomainRegistrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("countryOrRegionCode", m.GetCountryOrRegionCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *DomainRegistrant) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCountryOrRegionCode sets the countryOrRegionCode property value. The countryOrRegionCode property +func (m *DomainRegistrant) SetCountryOrRegionCode(value *string)() { + m.countryOrRegionCode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DomainRegistrant) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrganization sets the organization property value. The organization property +func (m *DomainRegistrant) SetOrganization(value *string)() { + m.organization = value +} +// SetUrl sets the url property value. The url property +func (m *DomainRegistrant) SetUrl(value *string)() { + m.url = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *DomainRegistrant) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_registrantable.go b/src/internal/connector/graph/betasdk/models/domain_registrantable.go new file mode 100644 index 000000000..96ba9b48d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_registrantable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainRegistrantable +type DomainRegistrantable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountryOrRegionCode()(*string) + GetOdataType()(*string) + GetOrganization()(*string) + GetUrl()(*string) + GetVendor()(*string) + SetCountryOrRegionCode(value *string)() + SetOdataType(value *string)() + SetOrganization(value *string)() + SetUrl(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_security_profile.go b/src/internal/connector/graph/betasdk/models/domain_security_profile.go new file mode 100644 index 000000000..b88be1e1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_security_profile.go @@ -0,0 +1,415 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainSecurityProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DomainSecurityProfile struct { + Entity + // The activityGroupNames property + activityGroupNames []string + // The azureSubscriptionId property + azureSubscriptionId *string + // The azureTenantId property + azureTenantId *string + // The countHits property + countHits *int32 + // The countInOrg property + countInOrg *int32 + // The domainCategories property + domainCategories []ReputationCategoryable + // The domainRegisteredDateTime property + domainRegisteredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The firstSeenDateTime property + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastSeenDateTime property + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name property + name *string + // The registrant property + registrant DomainRegistrantable + // The riskScore property + riskScore *string + // The tags property + tags []string + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewDomainSecurityProfile instantiates a new domainSecurityProfile and sets the default values. +func NewDomainSecurityProfile()(*DomainSecurityProfile) { + m := &DomainSecurityProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateDomainSecurityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainSecurityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainSecurityProfile(), nil +} +// GetActivityGroupNames gets the activityGroupNames property value. The activityGroupNames property +func (m *DomainSecurityProfile) GetActivityGroupNames()([]string) { + return m.activityGroupNames +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *DomainSecurityProfile) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *DomainSecurityProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetCountHits gets the countHits property value. The countHits property +func (m *DomainSecurityProfile) GetCountHits()(*int32) { + return m.countHits +} +// GetCountInOrg gets the countInOrg property value. The countInOrg property +func (m *DomainSecurityProfile) GetCountInOrg()(*int32) { + return m.countInOrg +} +// GetDomainCategories gets the domainCategories property value. The domainCategories property +func (m *DomainSecurityProfile) GetDomainCategories()([]ReputationCategoryable) { + return m.domainCategories +} +// GetDomainRegisteredDateTime gets the domainRegisteredDateTime property value. The domainRegisteredDateTime property +func (m *DomainSecurityProfile) GetDomainRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.domainRegisteredDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainSecurityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activityGroupNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetActivityGroupNames(res) + } + return nil + } + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["countHits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCountHits(val) + } + return nil + } + res["countInOrg"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCountInOrg(val) + } + return nil + } + res["domainCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReputationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReputationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ReputationCategoryable) + } + m.SetDomainCategories(res) + } + return nil + } + res["domainRegisteredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainRegisteredDateTime(val) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["registrant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDomainRegistrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRegistrant(val.(DomainRegistrantable)) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *DomainSecurityProfile) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *DomainSecurityProfile) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetName gets the name property value. The name property +func (m *DomainSecurityProfile) GetName()(*string) { + return m.name +} +// GetRegistrant gets the registrant property value. The registrant property +func (m *DomainSecurityProfile) GetRegistrant()(DomainRegistrantable) { + return m.registrant +} +// GetRiskScore gets the riskScore property value. The riskScore property +func (m *DomainSecurityProfile) GetRiskScore()(*string) { + return m.riskScore +} +// GetTags gets the tags property value. The tags property +func (m *DomainSecurityProfile) GetTags()([]string) { + return m.tags +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *DomainSecurityProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *DomainSecurityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivityGroupNames() != nil { + err = writer.WriteCollectionOfStringValues("activityGroupNames", m.GetActivityGroupNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("countHits", m.GetCountHits()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("countInOrg", m.GetCountInOrg()) + if err != nil { + return err + } + } + if m.GetDomainCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDomainCategories())) + for i, v := range m.GetDomainCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("domainCategories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("domainRegisteredDateTime", m.GetDomainRegisteredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("registrant", m.GetRegistrant()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetActivityGroupNames sets the activityGroupNames property value. The activityGroupNames property +func (m *DomainSecurityProfile) SetActivityGroupNames(value []string)() { + m.activityGroupNames = value +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *DomainSecurityProfile) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *DomainSecurityProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetCountHits sets the countHits property value. The countHits property +func (m *DomainSecurityProfile) SetCountHits(value *int32)() { + m.countHits = value +} +// SetCountInOrg sets the countInOrg property value. The countInOrg property +func (m *DomainSecurityProfile) SetCountInOrg(value *int32)() { + m.countInOrg = value +} +// SetDomainCategories sets the domainCategories property value. The domainCategories property +func (m *DomainSecurityProfile) SetDomainCategories(value []ReputationCategoryable)() { + m.domainCategories = value +} +// SetDomainRegisteredDateTime sets the domainRegisteredDateTime property value. The domainRegisteredDateTime property +func (m *DomainSecurityProfile) SetDomainRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.domainRegisteredDateTime = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *DomainSecurityProfile) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *DomainSecurityProfile) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetName sets the name property value. The name property +func (m *DomainSecurityProfile) SetName(value *string)() { + m.name = value +} +// SetRegistrant sets the registrant property value. The registrant property +func (m *DomainSecurityProfile) SetRegistrant(value DomainRegistrantable)() { + m.registrant = value +} +// SetRiskScore sets the riskScore property value. The riskScore property +func (m *DomainSecurityProfile) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetTags sets the tags property value. The tags property +func (m *DomainSecurityProfile) SetTags(value []string)() { + m.tags = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *DomainSecurityProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_response.go new file mode 100644 index 000000000..89efeb9e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainSecurityProfileCollectionResponse +type DomainSecurityProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DomainSecurityProfileable +} +// NewDomainSecurityProfileCollectionResponse instantiates a new DomainSecurityProfileCollectionResponse and sets the default values. +func NewDomainSecurityProfileCollectionResponse()(*DomainSecurityProfileCollectionResponse) { + m := &DomainSecurityProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDomainSecurityProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainSecurityProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainSecurityProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainSecurityProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(DomainSecurityProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DomainSecurityProfileCollectionResponse) GetValue()([]DomainSecurityProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *DomainSecurityProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DomainSecurityProfileCollectionResponse) SetValue(value []DomainSecurityProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_responseable.go new file mode 100644 index 000000000..847044c94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_security_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainSecurityProfileCollectionResponseable +type DomainSecurityProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DomainSecurityProfileable) + SetValue(value []DomainSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_security_profileable.go b/src/internal/connector/graph/betasdk/models/domain_security_profileable.go new file mode 100644 index 000000000..820b2813c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_security_profileable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainSecurityProfileable +type DomainSecurityProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityGroupNames()([]string) + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetCountHits()(*int32) + GetCountInOrg()(*int32) + GetDomainCategories()([]ReputationCategoryable) + GetDomainRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetRegistrant()(DomainRegistrantable) + GetRiskScore()(*string) + GetTags()([]string) + GetVendorInformation()(SecurityVendorInformationable) + SetActivityGroupNames(value []string)() + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetCountHits(value *int32)() + SetCountInOrg(value *int32)() + SetDomainCategories(value []ReputationCategoryable)() + SetDomainRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetRegistrant(value DomainRegistrantable)() + SetRiskScore(value *string)() + SetTags(value []string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/domain_state.go b/src/internal/connector/graph/betasdk/models/domain_state.go new file mode 100644 index 000000000..961ea3a90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_state.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainState +type DomainState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Timestamp for when the last activity occurred. The value is updated when an operation is scheduled, the asynchronous task starts, and when the operation completes. + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Type of asynchronous operation. The values can be ForceDelete or Verification + operation *string + // Current status of the operation. Scheduled - Operation has been scheduled but has not started. InProgress - Task has started and is in progress. Failed - Operation has failed. + status *string +} +// NewDomainState instantiates a new domainState and sets the default values. +func NewDomainState()(*DomainState) { + m := &DomainState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDomainStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDomainStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDomainState(), 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 *DomainState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DomainState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(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["operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperation(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetLastActionDateTime gets the lastActionDateTime property value. Timestamp for when the last activity occurred. The value is updated when an operation is scheduled, the asynchronous task starts, and when the operation completes. +func (m *DomainState) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DomainState) GetOdataType()(*string) { + return m.odataType +} +// GetOperation gets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification +func (m *DomainState) GetOperation()(*string) { + return m.operation +} +// GetStatus gets the status property value. Current status of the operation. Scheduled - Operation has been scheduled but has not started. InProgress - Task has started and is in progress. Failed - Operation has failed. +func (m *DomainState) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *DomainState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operation", m.GetOperation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + 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 *DomainState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. Timestamp for when the last activity occurred. The value is updated when an operation is scheduled, the asynchronous task starts, and when the operation completes. +func (m *DomainState) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DomainState) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperation sets the operation property value. Type of asynchronous operation. The values can be ForceDelete or Verification +func (m *DomainState) SetOperation(value *string)() { + m.operation = value +} +// SetStatus sets the status property value. Current status of the operation. Scheduled - Operation has been scheduled but has not started. InProgress - Task has started and is in progress. Failed - Operation has failed. +func (m *DomainState) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/domain_stateable.go b/src/internal/connector/graph/betasdk/models/domain_stateable.go new file mode 100644 index 000000000..6492e88a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domain_stateable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DomainStateable +type DomainStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetOperation()(*string) + GetStatus()(*string) + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetOperation(value *string)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/domainable.go b/src/internal/connector/graph/betasdk/models/domainable.go new file mode 100644 index 000000000..7bf246e05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/domainable.go @@ -0,0 +1,43 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Domainable +type Domainable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationType()(*string) + GetAvailabilityStatus()(*string) + GetDomainNameReferences()([]DirectoryObjectable) + GetFederationConfiguration()([]InternalDomainFederationable) + GetIsAdminManaged()(*bool) + GetIsDefault()(*bool) + GetIsInitial()(*bool) + GetIsRoot()(*bool) + GetIsVerified()(*bool) + GetPasswordNotificationWindowInDays()(*int32) + GetPasswordValidityPeriodInDays()(*int32) + GetServiceConfigurationRecords()([]DomainDnsRecordable) + GetSharedEmailDomainInvitations()([]SharedEmailDomainInvitationable) + GetState()(DomainStateable) + GetSupportedServices()([]string) + GetVerificationDnsRecords()([]DomainDnsRecordable) + SetAuthenticationType(value *string)() + SetAvailabilityStatus(value *string)() + SetDomainNameReferences(value []DirectoryObjectable)() + SetFederationConfiguration(value []InternalDomainFederationable)() + SetIsAdminManaged(value *bool)() + SetIsDefault(value *bool)() + SetIsInitial(value *bool)() + SetIsRoot(value *bool)() + SetIsVerified(value *bool)() + SetPasswordNotificationWindowInDays(value *int32)() + SetPasswordValidityPeriodInDays(value *int32)() + SetServiceConfigurationRecords(value []DomainDnsRecordable)() + SetSharedEmailDomainInvitations(value []SharedEmailDomainInvitationable)() + SetState(value DomainStateable)() + SetSupportedServices(value []string)() + SetVerificationDnsRecords(value []DomainDnsRecordable)() +} diff --git a/src/internal/connector/graph/betasdk/models/downgrade_justification.go b/src/internal/connector/graph/betasdk/models/downgrade_justification.go new file mode 100644 index 000000000..cab3e60c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/downgrade_justification.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DowngradeJustification +type DowngradeJustification 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 whether the downgrade is or is not justified. + isDowngradeJustified *bool + // Message that indicates why a downgrade is justified. The message will appear in administrative logs. + justificationMessage *string + // The OdataType property + odataType *string +} +// NewDowngradeJustification instantiates a new downgradeJustification and sets the default values. +func NewDowngradeJustification()(*DowngradeJustification) { + m := &DowngradeJustification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDowngradeJustificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDowngradeJustificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDowngradeJustification(), 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 *DowngradeJustification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DowngradeJustification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isDowngradeJustified"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDowngradeJustified(val) + } + return nil + } + res["justificationMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustificationMessage(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 + } + return res +} +// GetIsDowngradeJustified gets the isDowngradeJustified property value. Indicates whether the downgrade is or is not justified. +func (m *DowngradeJustification) GetIsDowngradeJustified()(*bool) { + return m.isDowngradeJustified +} +// GetJustificationMessage gets the justificationMessage property value. Message that indicates why a downgrade is justified. The message will appear in administrative logs. +func (m *DowngradeJustification) GetJustificationMessage()(*string) { + return m.justificationMessage +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DowngradeJustification) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DowngradeJustification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isDowngradeJustified", m.GetIsDowngradeJustified()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("justificationMessage", m.GetJustificationMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DowngradeJustification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsDowngradeJustified sets the isDowngradeJustified property value. Indicates whether the downgrade is or is not justified. +func (m *DowngradeJustification) SetIsDowngradeJustified(value *bool)() { + m.isDowngradeJustified = value +} +// SetJustificationMessage sets the justificationMessage property value. Message that indicates why a downgrade is justified. The message will appear in administrative logs. +func (m *DowngradeJustification) SetJustificationMessage(value *string)() { + m.justificationMessage = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DowngradeJustification) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/downgrade_justificationable.go b/src/internal/connector/graph/betasdk/models/downgrade_justificationable.go new file mode 100644 index 000000000..22f7f9771 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/downgrade_justificationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DowngradeJustificationable +type DowngradeJustificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDowngradeJustified()(*bool) + GetJustificationMessage()(*string) + GetOdataType()(*string) + SetIsDowngradeJustified(value *bool)() + SetJustificationMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive.go b/src/internal/connector/graph/betasdk/models/drive.go new file mode 100644 index 000000000..a50f9d354 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive.go @@ -0,0 +1,388 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Drive +type Drive struct { + BaseItem + // The list of recent activities that took place under this drive. + activities []ItemActivityOLDable + // Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. + bundles []DriveItemable + // Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only. + driveType *string + // The list of items the user is following. Only in OneDrive for Business. + following []DriveItemable + // All items contained in the drive. Read-only. Nullable. + items []DriveItemable + // For drives in SharePoint, the underlying document library list. Read-only. Nullable. + list Listable + // Optional. The user account that owns the drive. Read-only. + owner IdentitySetable + // Optional. Information about the drive's storage space quota. Read-only. + quota Quotaable + // The root folder of the drive. Read-only. + root DriveItemable + // The sharePointIds property + sharePointIds SharepointIdsable + // Collection of common folders available in OneDrive. Read-only. Nullable. + special []DriveItemable + // If present, indicates that this is a system-managed drive. Read-only. + system SystemFacetable +} +// NewDrive instantiates a new Drive and sets the default values. +func NewDrive()(*Drive) { + m := &Drive{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.drive"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDriveFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDrive(), nil +} +// GetActivities gets the activities property value. The list of recent activities that took place under this drive. +func (m *Drive) GetActivities()([]ItemActivityOLDable) { + return m.activities +} +// GetBundles gets the bundles property value. Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. +func (m *Drive) GetBundles()([]DriveItemable) { + return m.bundles +} +// GetDriveType gets the driveType property value. Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only. +func (m *Drive) GetDriveType()(*string) { + return m.driveType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Drive) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityOLDFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityOLDable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityOLDable) + } + m.SetActivities(res) + } + return nil + } + res["bundles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetBundles(res) + } + return nil + } + res["driveType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDriveType(val) + } + return nil + } + res["following"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetFollowing(res) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetItems(res) + } + return nil + } + res["list"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetList(val.(Listable)) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(IdentitySetable)) + } + return nil + } + res["quota"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateQuotaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQuota(val.(Quotaable)) + } + return nil + } + res["root"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoot(val.(DriveItemable)) + } + return nil + } + res["sharePointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharePointIds(val.(SharepointIdsable)) + } + return nil + } + res["special"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetSpecial(res) + } + return nil + } + res["system"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSystemFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSystem(val.(SystemFacetable)) + } + return nil + } + return res +} +// GetFollowing gets the following property value. The list of items the user is following. Only in OneDrive for Business. +func (m *Drive) GetFollowing()([]DriveItemable) { + return m.following +} +// GetItems gets the items property value. All items contained in the drive. Read-only. Nullable. +func (m *Drive) GetItems()([]DriveItemable) { + return m.items +} +// GetList gets the list property value. For drives in SharePoint, the underlying document library list. Read-only. Nullable. +func (m *Drive) GetList()(Listable) { + return m.list +} +// GetOwner gets the owner property value. Optional. The user account that owns the drive. Read-only. +func (m *Drive) GetOwner()(IdentitySetable) { + return m.owner +} +// GetQuota gets the quota property value. Optional. Information about the drive's storage space quota. Read-only. +func (m *Drive) GetQuota()(Quotaable) { + return m.quota +} +// GetRoot gets the root property value. The root folder of the drive. Read-only. +func (m *Drive) GetRoot()(DriveItemable) { + return m.root +} +// GetSharePointIds gets the sharePointIds property value. The sharePointIds property +func (m *Drive) GetSharePointIds()(SharepointIdsable) { + return m.sharePointIds +} +// GetSpecial gets the special property value. Collection of common folders available in OneDrive. Read-only. Nullable. +func (m *Drive) GetSpecial()([]DriveItemable) { + return m.special +} +// GetSystem gets the system property value. If present, indicates that this is a system-managed drive. Read-only. +func (m *Drive) GetSystem()(SystemFacetable) { + return m.system +} +// Serialize serializes information the current object +func (m *Drive) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + if m.GetBundles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBundles())) + for i, v := range m.GetBundles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("bundles", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("driveType", m.GetDriveType()) + if err != nil { + return err + } + } + if m.GetFollowing() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFollowing())) + for i, v := range m.GetFollowing() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("following", cast) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("list", m.GetList()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("quota", m.GetQuota()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("root", m.GetRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharePointIds", m.GetSharePointIds()) + if err != nil { + return err + } + } + if m.GetSpecial() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSpecial())) + for i, v := range m.GetSpecial() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("special", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("system", m.GetSystem()) + if err != nil { + return err + } + } + return nil +} +// SetActivities sets the activities property value. The list of recent activities that took place under this drive. +func (m *Drive) SetActivities(value []ItemActivityOLDable)() { + m.activities = value +} +// SetBundles sets the bundles property value. Collection of [bundles][bundle] (albums and multi-select-shared sets of items). Only in personal OneDrive. +func (m *Drive) SetBundles(value []DriveItemable)() { + m.bundles = value +} +// SetDriveType sets the driveType property value. Describes the type of drive represented by this resource. OneDrive personal drives will return personal. OneDrive for Business will return business. SharePoint document libraries will return documentLibrary. Read-only. +func (m *Drive) SetDriveType(value *string)() { + m.driveType = value +} +// SetFollowing sets the following property value. The list of items the user is following. Only in OneDrive for Business. +func (m *Drive) SetFollowing(value []DriveItemable)() { + m.following = value +} +// SetItems sets the items property value. All items contained in the drive. Read-only. Nullable. +func (m *Drive) SetItems(value []DriveItemable)() { + m.items = value +} +// SetList sets the list property value. For drives in SharePoint, the underlying document library list. Read-only. Nullable. +func (m *Drive) SetList(value Listable)() { + m.list = value +} +// SetOwner sets the owner property value. Optional. The user account that owns the drive. Read-only. +func (m *Drive) SetOwner(value IdentitySetable)() { + m.owner = value +} +// SetQuota sets the quota property value. Optional. Information about the drive's storage space quota. Read-only. +func (m *Drive) SetQuota(value Quotaable)() { + m.quota = value +} +// SetRoot sets the root property value. The root folder of the drive. Read-only. +func (m *Drive) SetRoot(value DriveItemable)() { + m.root = value +} +// SetSharePointIds sets the sharePointIds property value. The sharePointIds property +func (m *Drive) SetSharePointIds(value SharepointIdsable)() { + m.sharePointIds = value +} +// SetSpecial sets the special property value. Collection of common folders available in OneDrive. Read-only. Nullable. +func (m *Drive) SetSpecial(value []DriveItemable)() { + m.special = value +} +// SetSystem sets the system property value. If present, indicates that this is a system-managed drive. Read-only. +func (m *Drive) SetSystem(value SystemFacetable)() { + m.system = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_collection_response.go b/src/internal/connector/graph/betasdk/models/drive_collection_response.go new file mode 100644 index 000000000..d57215832 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveCollectionResponse +type DriveCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Driveable +} +// NewDriveCollectionResponse instantiates a new DriveCollectionResponse and sets the default values. +func NewDriveCollectionResponse()(*DriveCollectionResponse) { + m := &DriveCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDriveCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Driveable, len(val)) + for i, v := range val { + res[i] = v.(Driveable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DriveCollectionResponse) GetValue()([]Driveable) { + return m.value +} +// Serialize serializes information the current object +func (m *DriveCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DriveCollectionResponse) SetValue(value []Driveable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_collection_responseable.go b/src/internal/connector/graph/betasdk/models/drive_collection_responseable.go new file mode 100644 index 000000000..58a33ca92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveCollectionResponseable +type DriveCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Driveable) + SetValue(value []Driveable)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item.go b/src/internal/connector/graph/betasdk/models/drive_item.go new file mode 100644 index 000000000..0cd0c028a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item.go @@ -0,0 +1,994 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItem +type DriveItem struct { + BaseItem + // The list of recent activities that took place on this item. + activities []ItemActivityOLDable + // Analytics about the view activities that took place on this item. + analytics ItemAnalyticsable + // Audio metadata, if the item is an audio file. Read-only. Only on OneDrive Personal. + audio Audioable + // Bundle metadata, if the item is a bundle. Read-only. + bundle Bundleable + // Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. + children []DriveItemable + // The content stream, if the item represents a file. + content []byte + // An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. + cTag *string + // Information about the deleted state of the item. Read-only. + deleted Deletedable + // File metadata, if the item is a file. Read-only. + file Fileable + // File system information on client. Read-write. + fileSystemInfo FileSystemInfoable + // Folder metadata, if the item is a folder. Read-only. + folder Folderable + // Image metadata, if the item is an image. Read-only. + image Imageable + // For drives in SharePoint, the associated document library list item. Read-only. Nullable. + listItem ListItemable + // Location metadata, if the item has location data. Read-only. + location GeoCoordinatesable + // Malware metadata, if the item was detected to contain malware. Read-only. + malware Malwareable + // Information about the media (audio or video) item. Read-write. Only on OneDrive for Business and SharePoint. + media Mediaable + // If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. + package_escaped Package_escapedable + // If present, indicates that indicates that one or more operations that may affect the state of the driveItem are pending completion. Read-only. + pendingOperations PendingOperationsable + // The set of permissions for the item. Read-only. Nullable. + permissions []Permissionable + // Photo metadata, if the item is a photo. Read-only. + photo Photoable + // Provides information about the published or checked-out state of an item, in locations that support such actions. This property is not returned by default. Read-only. + publication PublicationFacetable + // Remote item data, if the item is shared from a drive other than the one being accessed. Read-only. + remoteItem RemoteItemable + // If this property is non-null, it indicates that the driveItem is the top-most driveItem in the drive. + root Rootable + // Search metadata, if the item is from a search result. Read-only. + searchResult SearchResultable + // Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. + shared Sharedable + // Returns identifiers useful for SharePoint REST compatibility. Read-only. + sharepointIds SharepointIdsable + // Size of the item in bytes. Read-only. + size *int64 + // Information about the drive item source. Read-only. Only on OneDrive for Business and SharePoint. + source DriveItemSourceable + // If the current item is also available as a special folder, this facet is returned. Read-only. + specialFolder SpecialFolderable + // The set of subscriptions on the item. Only supported on the root of a drive. + subscriptions []Subscriptionable + // Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. + thumbnails []ThumbnailSetable + // The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. + versions []DriveItemVersionable + // Video metadata, if the item is a video. Read-only. + video Videoable + // WebDAV compatible URL for the item. + webDavUrl *string + // For files that are Excel spreadsheets, accesses the workbook API to work with the spreadsheet's contents. Nullable. + workbook Workbookable +} +// NewDriveItem instantiates a new driveItem and sets the default values. +func NewDriveItem()(*DriveItem) { + m := &DriveItem{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.driveItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDriveItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveItem(), nil +} +// GetActivities gets the activities property value. The list of recent activities that took place on this item. +func (m *DriveItem) GetActivities()([]ItemActivityOLDable) { + return m.activities +} +// GetAnalytics gets the analytics property value. Analytics about the view activities that took place on this item. +func (m *DriveItem) GetAnalytics()(ItemAnalyticsable) { + return m.analytics +} +// GetAudio gets the audio property value. Audio metadata, if the item is an audio file. Read-only. Only on OneDrive Personal. +func (m *DriveItem) GetAudio()(Audioable) { + return m.audio +} +// GetBundle gets the bundle property value. Bundle metadata, if the item is a bundle. Read-only. +func (m *DriveItem) GetBundle()(Bundleable) { + return m.bundle +} +// GetChildren gets the children property value. Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. +func (m *DriveItem) GetChildren()([]DriveItemable) { + return m.children +} +// GetContent gets the content property value. The content stream, if the item represents a file. +func (m *DriveItem) GetContent()([]byte) { + return m.content +} +// GetCTag gets the cTag property value. An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. +func (m *DriveItem) GetCTag()(*string) { + return m.cTag +} +// GetDeleted gets the deleted property value. Information about the deleted state of the item. Read-only. +func (m *DriveItem) GetDeleted()(Deletedable) { + return m.deleted +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityOLDFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityOLDable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityOLDable) + } + m.SetActivities(res) + } + return nil + } + res["analytics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAnalyticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAnalytics(val.(ItemAnalyticsable)) + } + return nil + } + res["audio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAudioFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAudio(val.(Audioable)) + } + return nil + } + res["bundle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBundleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBundle(val.(Bundleable)) + } + return nil + } + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetChildren(res) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["cTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCTag(val) + } + return nil + } + res["deleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeletedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeleted(val.(Deletedable)) + } + return nil + } + res["file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFile(val.(Fileable)) + } + return nil + } + res["fileSystemInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileSystemInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileSystemInfo(val.(FileSystemInfoable)) + } + return nil + } + res["folder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFolder(val.(Folderable)) + } + return nil + } + res["image"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImage(val.(Imageable)) + } + return nil + } + res["listItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetListItem(val.(ListItemable)) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGeoCoordinatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(GeoCoordinatesable)) + } + return nil + } + res["malware"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMalwareFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMalware(val.(Malwareable)) + } + return nil + } + res["media"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMedia(val.(Mediaable)) + } + return nil + } + res["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePackage_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackage(val.(Package_escapedable)) + } + return nil + } + res["pendingOperations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePendingOperationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPendingOperations(val.(PendingOperationsable)) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Permissionable, len(val)) + for i, v := range val { + res[i] = v.(Permissionable) + } + m.SetPermissions(res) + } + return nil + } + res["photo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhotoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPhoto(val.(Photoable)) + } + return nil + } + res["publication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicationFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublication(val.(PublicationFacetable)) + } + return nil + } + res["remoteItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRemoteItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRemoteItem(val.(RemoteItemable)) + } + return nil + } + res["root"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRootFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoot(val.(Rootable)) + } + return nil + } + res["searchResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSearchResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSearchResult(val.(SearchResultable)) + } + return nil + } + res["shared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShared(val.(Sharedable)) + } + return nil + } + res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharepointIds(val.(SharepointIdsable)) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(DriveItemSourceable)) + } + return nil + } + res["specialFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSpecialFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSpecialFolder(val.(SpecialFolderable)) + } + return nil + } + res["subscriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSubscriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Subscriptionable, len(val)) + for i, v := range val { + res[i] = v.(Subscriptionable) + } + m.SetSubscriptions(res) + } + return nil + } + res["thumbnails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateThumbnailSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ThumbnailSetable, len(val)) + for i, v := range val { + res[i] = v.(ThumbnailSetable) + } + m.SetThumbnails(res) + } + return nil + } + res["versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemVersionable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemVersionable) + } + m.SetVersions(res) + } + return nil + } + res["video"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVideoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVideo(val.(Videoable)) + } + return nil + } + res["webDavUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebDavUrl(val) + } + return nil + } + res["workbook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkbookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWorkbook(val.(Workbookable)) + } + return nil + } + return res +} +// GetFile gets the file property value. File metadata, if the item is a file. Read-only. +func (m *DriveItem) GetFile()(Fileable) { + return m.file +} +// GetFileSystemInfo gets the fileSystemInfo property value. File system information on client. Read-write. +func (m *DriveItem) GetFileSystemInfo()(FileSystemInfoable) { + return m.fileSystemInfo +} +// GetFolder gets the folder property value. Folder metadata, if the item is a folder. Read-only. +func (m *DriveItem) GetFolder()(Folderable) { + return m.folder +} +// GetImage gets the image property value. Image metadata, if the item is an image. Read-only. +func (m *DriveItem) GetImage()(Imageable) { + return m.image +} +// GetListItem gets the listItem property value. For drives in SharePoint, the associated document library list item. Read-only. Nullable. +func (m *DriveItem) GetListItem()(ListItemable) { + return m.listItem +} +// GetLocation gets the location property value. Location metadata, if the item has location data. Read-only. +func (m *DriveItem) GetLocation()(GeoCoordinatesable) { + return m.location +} +// GetMalware gets the malware property value. Malware metadata, if the item was detected to contain malware. Read-only. +func (m *DriveItem) GetMalware()(Malwareable) { + return m.malware +} +// GetMedia gets the media property value. Information about the media (audio or video) item. Read-write. Only on OneDrive for Business and SharePoint. +func (m *DriveItem) GetMedia()(Mediaable) { + return m.media +} +// GetPackage gets the package property value. If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. +func (m *DriveItem) GetPackage()(Package_escapedable) { + return m.package_escaped +} +// GetPendingOperations gets the pendingOperations property value. If present, indicates that indicates that one or more operations that may affect the state of the driveItem are pending completion. Read-only. +func (m *DriveItem) GetPendingOperations()(PendingOperationsable) { + return m.pendingOperations +} +// GetPermissions gets the permissions property value. The set of permissions for the item. Read-only. Nullable. +func (m *DriveItem) GetPermissions()([]Permissionable) { + return m.permissions +} +// GetPhoto gets the photo property value. Photo metadata, if the item is a photo. Read-only. +func (m *DriveItem) GetPhoto()(Photoable) { + return m.photo +} +// GetPublication gets the publication property value. Provides information about the published or checked-out state of an item, in locations that support such actions. This property is not returned by default. Read-only. +func (m *DriveItem) GetPublication()(PublicationFacetable) { + return m.publication +} +// GetRemoteItem gets the remoteItem property value. Remote item data, if the item is shared from a drive other than the one being accessed. Read-only. +func (m *DriveItem) GetRemoteItem()(RemoteItemable) { + return m.remoteItem +} +// GetRoot gets the root property value. If this property is non-null, it indicates that the driveItem is the top-most driveItem in the drive. +func (m *DriveItem) GetRoot()(Rootable) { + return m.root +} +// GetSearchResult gets the searchResult property value. Search metadata, if the item is from a search result. Read-only. +func (m *DriveItem) GetSearchResult()(SearchResultable) { + return m.searchResult +} +// GetShared gets the shared property value. Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. +func (m *DriveItem) GetShared()(Sharedable) { + return m.shared +} +// GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *DriveItem) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetSize gets the size property value. Size of the item in bytes. Read-only. +func (m *DriveItem) GetSize()(*int64) { + return m.size +} +// GetSource gets the source property value. Information about the drive item source. Read-only. Only on OneDrive for Business and SharePoint. +func (m *DriveItem) GetSource()(DriveItemSourceable) { + return m.source +} +// GetSpecialFolder gets the specialFolder property value. If the current item is also available as a special folder, this facet is returned. Read-only. +func (m *DriveItem) GetSpecialFolder()(SpecialFolderable) { + return m.specialFolder +} +// GetSubscriptions gets the subscriptions property value. The set of subscriptions on the item. Only supported on the root of a drive. +func (m *DriveItem) GetSubscriptions()([]Subscriptionable) { + return m.subscriptions +} +// GetThumbnails gets the thumbnails property value. Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. +func (m *DriveItem) GetThumbnails()([]ThumbnailSetable) { + return m.thumbnails +} +// GetVersions gets the versions property value. The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. +func (m *DriveItem) GetVersions()([]DriveItemVersionable) { + return m.versions +} +// GetVideo gets the video property value. Video metadata, if the item is a video. Read-only. +func (m *DriveItem) GetVideo()(Videoable) { + return m.video +} +// GetWebDavUrl gets the webDavUrl property value. WebDAV compatible URL for the item. +func (m *DriveItem) GetWebDavUrl()(*string) { + return m.webDavUrl +} +// GetWorkbook gets the workbook property value. For files that are Excel spreadsheets, accesses the workbook API to work with the spreadsheet's contents. Nullable. +func (m *DriveItem) GetWorkbook()(Workbookable) { + return m.workbook +} +// Serialize serializes information the current object +func (m *DriveItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("analytics", m.GetAnalytics()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("audio", m.GetAudio()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("bundle", m.GetBundle()) + if err != nil { + return err + } + } + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cTag", m.GetCTag()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deleted", m.GetDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("file", m.GetFile()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("fileSystemInfo", m.GetFileSystemInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("folder", m.GetFolder()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("image", m.GetImage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("listItem", m.GetListItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("malware", m.GetMalware()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("media", m.GetMedia()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("package", m.GetPackage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("pendingOperations", m.GetPendingOperations()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissions())) + for i, v := range m.GetPermissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("photo", m.GetPhoto()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publication", m.GetPublication()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("remoteItem", m.GetRemoteItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("root", m.GetRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("searchResult", m.GetSearchResult()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shared", m.GetShared()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("specialFolder", m.GetSpecialFolder()) + if err != nil { + return err + } + } + if m.GetSubscriptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubscriptions())) + for i, v := range m.GetSubscriptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("subscriptions", cast) + if err != nil { + return err + } + } + if m.GetThumbnails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetThumbnails())) + for i, v := range m.GetThumbnails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("thumbnails", cast) + if err != nil { + return err + } + } + if m.GetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVersions())) + for i, v := range m.GetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("versions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("video", m.GetVideo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webDavUrl", m.GetWebDavUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("workbook", m.GetWorkbook()) + if err != nil { + return err + } + } + return nil +} +// SetActivities sets the activities property value. The list of recent activities that took place on this item. +func (m *DriveItem) SetActivities(value []ItemActivityOLDable)() { + m.activities = value +} +// SetAnalytics sets the analytics property value. Analytics about the view activities that took place on this item. +func (m *DriveItem) SetAnalytics(value ItemAnalyticsable)() { + m.analytics = value +} +// SetAudio sets the audio property value. Audio metadata, if the item is an audio file. Read-only. Only on OneDrive Personal. +func (m *DriveItem) SetAudio(value Audioable)() { + m.audio = value +} +// SetBundle sets the bundle property value. Bundle metadata, if the item is a bundle. Read-only. +func (m *DriveItem) SetBundle(value Bundleable)() { + m.bundle = value +} +// SetChildren sets the children property value. Collection containing Item objects for the immediate children of Item. Only items representing folders have children. Read-only. Nullable. +func (m *DriveItem) SetChildren(value []DriveItemable)() { + m.children = value +} +// SetContent sets the content property value. The content stream, if the item represents a file. +func (m *DriveItem) SetContent(value []byte)() { + m.content = value +} +// SetCTag sets the cTag property value. An eTag for the content of the item. This eTag is not changed if only the metadata is changed. Note This property is not returned if the item is a folder. Read-only. +func (m *DriveItem) SetCTag(value *string)() { + m.cTag = value +} +// SetDeleted sets the deleted property value. Information about the deleted state of the item. Read-only. +func (m *DriveItem) SetDeleted(value Deletedable)() { + m.deleted = value +} +// SetFile sets the file property value. File metadata, if the item is a file. Read-only. +func (m *DriveItem) SetFile(value Fileable)() { + m.file = value +} +// SetFileSystemInfo sets the fileSystemInfo property value. File system information on client. Read-write. +func (m *DriveItem) SetFileSystemInfo(value FileSystemInfoable)() { + m.fileSystemInfo = value +} +// SetFolder sets the folder property value. Folder metadata, if the item is a folder. Read-only. +func (m *DriveItem) SetFolder(value Folderable)() { + m.folder = value +} +// SetImage sets the image property value. Image metadata, if the item is an image. Read-only. +func (m *DriveItem) SetImage(value Imageable)() { + m.image = value +} +// SetListItem sets the listItem property value. For drives in SharePoint, the associated document library list item. Read-only. Nullable. +func (m *DriveItem) SetListItem(value ListItemable)() { + m.listItem = value +} +// SetLocation sets the location property value. Location metadata, if the item has location data. Read-only. +func (m *DriveItem) SetLocation(value GeoCoordinatesable)() { + m.location = value +} +// SetMalware sets the malware property value. Malware metadata, if the item was detected to contain malware. Read-only. +func (m *DriveItem) SetMalware(value Malwareable)() { + m.malware = value +} +// SetMedia sets the media property value. Information about the media (audio or video) item. Read-write. Only on OneDrive for Business and SharePoint. +func (m *DriveItem) SetMedia(value Mediaable)() { + m.media = value +} +// SetPackage sets the package property value. If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. +func (m *DriveItem) SetPackage(value Package_escapedable)() { + m.package_escaped = value +} +// SetPendingOperations sets the pendingOperations property value. If present, indicates that indicates that one or more operations that may affect the state of the driveItem are pending completion. Read-only. +func (m *DriveItem) SetPendingOperations(value PendingOperationsable)() { + m.pendingOperations = value +} +// SetPermissions sets the permissions property value. The set of permissions for the item. Read-only. Nullable. +func (m *DriveItem) SetPermissions(value []Permissionable)() { + m.permissions = value +} +// SetPhoto sets the photo property value. Photo metadata, if the item is a photo. Read-only. +func (m *DriveItem) SetPhoto(value Photoable)() { + m.photo = value +} +// SetPublication sets the publication property value. Provides information about the published or checked-out state of an item, in locations that support such actions. This property is not returned by default. Read-only. +func (m *DriveItem) SetPublication(value PublicationFacetable)() { + m.publication = value +} +// SetRemoteItem sets the remoteItem property value. Remote item data, if the item is shared from a drive other than the one being accessed. Read-only. +func (m *DriveItem) SetRemoteItem(value RemoteItemable)() { + m.remoteItem = value +} +// SetRoot sets the root property value. If this property is non-null, it indicates that the driveItem is the top-most driveItem in the drive. +func (m *DriveItem) SetRoot(value Rootable)() { + m.root = value +} +// SetSearchResult sets the searchResult property value. Search metadata, if the item is from a search result. Read-only. +func (m *DriveItem) SetSearchResult(value SearchResultable)() { + m.searchResult = value +} +// SetShared sets the shared property value. Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. +func (m *DriveItem) SetShared(value Sharedable)() { + m.shared = value +} +// SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *DriveItem) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetSize sets the size property value. Size of the item in bytes. Read-only. +func (m *DriveItem) SetSize(value *int64)() { + m.size = value +} +// SetSource sets the source property value. Information about the drive item source. Read-only. Only on OneDrive for Business and SharePoint. +func (m *DriveItem) SetSource(value DriveItemSourceable)() { + m.source = value +} +// SetSpecialFolder sets the specialFolder property value. If the current item is also available as a special folder, this facet is returned. Read-only. +func (m *DriveItem) SetSpecialFolder(value SpecialFolderable)() { + m.specialFolder = value +} +// SetSubscriptions sets the subscriptions property value. The set of subscriptions on the item. Only supported on the root of a drive. +func (m *DriveItem) SetSubscriptions(value []Subscriptionable)() { + m.subscriptions = value +} +// SetThumbnails sets the thumbnails property value. Collection containing [ThumbnailSet][] objects associated with the item. For more info, see [getting thumbnails][]. Read-only. Nullable. +func (m *DriveItem) SetThumbnails(value []ThumbnailSetable)() { + m.thumbnails = value +} +// SetVersions sets the versions property value. The list of previous versions of the item. For more info, see [getting previous versions][]. Read-only. Nullable. +func (m *DriveItem) SetVersions(value []DriveItemVersionable)() { + m.versions = value +} +// SetVideo sets the video property value. Video metadata, if the item is a video. Read-only. +func (m *DriveItem) SetVideo(value Videoable)() { + m.video = value +} +// SetWebDavUrl sets the webDavUrl property value. WebDAV compatible URL for the item. +func (m *DriveItem) SetWebDavUrl(value *string)() { + m.webDavUrl = value +} +// SetWorkbook sets the workbook property value. For files that are Excel spreadsheets, accesses the workbook API to work with the spreadsheet's contents. Nullable. +func (m *DriveItem) SetWorkbook(value Workbookable)() { + m.workbook = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_collection_response.go b/src/internal/connector/graph/betasdk/models/drive_item_collection_response.go new file mode 100644 index 000000000..9cc02bb2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemCollectionResponse +type DriveItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DriveItemable +} +// NewDriveItemCollectionResponse instantiates a new DriveItemCollectionResponse and sets the default values. +func NewDriveItemCollectionResponse()(*DriveItemCollectionResponse) { + m := &DriveItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDriveItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DriveItemCollectionResponse) GetValue()([]DriveItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *DriveItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DriveItemCollectionResponse) SetValue(value []DriveItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/drive_item_collection_responseable.go new file mode 100644 index 000000000..040b09f1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemCollectionResponseable +type DriveItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DriveItemable) + SetValue(value []DriveItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_source.go b/src/internal/connector/graph/betasdk/models/drive_item_source.go new file mode 100644 index 000000000..274fa50fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_source.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemSource +type DriveItemSource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enumeration value that indicates the source application where the file was created. + application *DriveItemSourceApplication + // The external identifier for the drive item from the source. + externalId *string + // The OdataType property + odataType *string +} +// NewDriveItemSource instantiates a new driveItemSource and sets the default values. +func NewDriveItemSource()(*DriveItemSource) { + m := &DriveItemSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDriveItemSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveItemSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveItemSource(), 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 *DriveItemSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplication gets the application property value. Enumeration value that indicates the source application where the file was created. +func (m *DriveItemSource) GetApplication()(*DriveItemSourceApplication) { + return m.application +} +// GetExternalId gets the externalId property value. The external identifier for the drive item from the source. +func (m *DriveItemSource) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveItemSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["application"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDriveItemSourceApplication) + if err != nil { + return err + } + if val != nil { + m.SetApplication(val.(*DriveItemSourceApplication)) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DriveItemSource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DriveItemSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplication() != nil { + cast := (*m.GetApplication()).String() + err := writer.WriteStringValue("application", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DriveItemSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplication sets the application property value. Enumeration value that indicates the source application where the file was created. +func (m *DriveItemSource) SetApplication(value *DriveItemSourceApplication)() { + m.application = value +} +// SetExternalId sets the externalId property value. The external identifier for the drive item from the source. +func (m *DriveItemSource) SetExternalId(value *string)() { + m.externalId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DriveItemSource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_source_application.go b/src/internal/connector/graph/betasdk/models/drive_item_source_application.go new file mode 100644 index 000000000..2f549911f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_source_application.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DriveItemSourceApplication int + +const ( + TEAMS_DRIVEITEMSOURCEAPPLICATION DriveItemSourceApplication = iota + YAMMER_DRIVEITEMSOURCEAPPLICATION + SHAREPOINT_DRIVEITEMSOURCEAPPLICATION + ONEDRIVE_DRIVEITEMSOURCEAPPLICATION + STREAM_DRIVEITEMSOURCEAPPLICATION + POWERPOINT_DRIVEITEMSOURCEAPPLICATION + OFFICE_DRIVEITEMSOURCEAPPLICATION + UNKNOWNFUTUREVALUE_DRIVEITEMSOURCEAPPLICATION +) + +func (i DriveItemSourceApplication) String() string { + return []string{"teams", "yammer", "sharePoint", "oneDrive", "stream", "powerPoint", "office", "unknownFutureValue"}[i] +} +func ParseDriveItemSourceApplication(v string) (interface{}, error) { + result := TEAMS_DRIVEITEMSOURCEAPPLICATION + switch v { + case "teams": + result = TEAMS_DRIVEITEMSOURCEAPPLICATION + case "yammer": + result = YAMMER_DRIVEITEMSOURCEAPPLICATION + case "sharePoint": + result = SHAREPOINT_DRIVEITEMSOURCEAPPLICATION + case "oneDrive": + result = ONEDRIVE_DRIVEITEMSOURCEAPPLICATION + case "stream": + result = STREAM_DRIVEITEMSOURCEAPPLICATION + case "powerPoint": + result = POWERPOINT_DRIVEITEMSOURCEAPPLICATION + case "office": + result = OFFICE_DRIVEITEMSOURCEAPPLICATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DRIVEITEMSOURCEAPPLICATION + default: + return 0, errors.New("Unknown DriveItemSourceApplication value: " + v) + } + return &result, nil +} +func SerializeDriveItemSourceApplication(values []DriveItemSourceApplication) []string { + 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/drive_item_sourceable.go b/src/internal/connector/graph/betasdk/models/drive_item_sourceable.go new file mode 100644 index 000000000..bc58c5444 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_sourceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemSourceable +type DriveItemSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplication()(*DriveItemSourceApplication) + GetExternalId()(*string) + GetOdataType()(*string) + SetApplication(value *DriveItemSourceApplication)() + SetExternalId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_version.go b/src/internal/connector/graph/betasdk/models/drive_item_version.go new file mode 100644 index 000000000..29bc05411 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_version.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemVersion +type DriveItemVersion struct { + BaseItemVersion + // The content property + content []byte + // Indicates the size of the content stream for this version of the item. + size *int64 +} +// NewDriveItemVersion instantiates a new DriveItemVersion and sets the default values. +func NewDriveItemVersion()(*DriveItemVersion) { + m := &DriveItemVersion{ + BaseItemVersion: *NewBaseItemVersion(), + } + odataTypeValue := "#microsoft.graph.driveItemVersion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateDriveItemVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveItemVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveItemVersion(), nil +} +// GetContent gets the content property value. The content property +func (m *DriveItemVersion) GetContent()([]byte) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveItemVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItemVersion.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetSize gets the size property value. Indicates the size of the content stream for this version of the item. +func (m *DriveItemVersion) GetSize()(*int64) { + return m.size +} +// Serialize serializes information the current object +func (m *DriveItemVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItemVersion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *DriveItemVersion) SetContent(value []byte)() { + m.content = value +} +// SetSize sets the size property value. Indicates the size of the content stream for this version of the item. +func (m *DriveItemVersion) SetSize(value *int64)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_version_collection_response.go b/src/internal/connector/graph/betasdk/models/drive_item_version_collection_response.go new file mode 100644 index 000000000..3a9c73e83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_version_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemVersionCollectionResponse +type DriveItemVersionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []DriveItemVersionable +} +// NewDriveItemVersionCollectionResponse instantiates a new DriveItemVersionCollectionResponse and sets the default values. +func NewDriveItemVersionCollectionResponse()(*DriveItemVersionCollectionResponse) { + m := &DriveItemVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDriveItemVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveItemVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveItemVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveItemVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemVersionable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DriveItemVersionCollectionResponse) GetValue()([]DriveItemVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *DriveItemVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DriveItemVersionCollectionResponse) SetValue(value []DriveItemVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/drive_item_version_collection_responseable.go new file mode 100644 index 000000000..119dbaa4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_version_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemVersionCollectionResponseable +type DriveItemVersionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DriveItemVersionable) + SetValue(value []DriveItemVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_item_versionable.go b/src/internal/connector/graph/betasdk/models/drive_item_versionable.go new file mode 100644 index 000000000..378906de9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_item_versionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemVersionable +type DriveItemVersionable interface { + BaseItemVersionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetSize()(*int64) + SetContent(value []byte)() + SetSize(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_itemable.go b/src/internal/connector/graph/betasdk/models/drive_itemable.go new file mode 100644 index 000000000..a5ac5151c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_itemable.go @@ -0,0 +1,81 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveItemable +type DriveItemable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivities()([]ItemActivityOLDable) + GetAnalytics()(ItemAnalyticsable) + GetAudio()(Audioable) + GetBundle()(Bundleable) + GetChildren()([]DriveItemable) + GetContent()([]byte) + GetCTag()(*string) + GetDeleted()(Deletedable) + GetFile()(Fileable) + GetFileSystemInfo()(FileSystemInfoable) + GetFolder()(Folderable) + GetImage()(Imageable) + GetListItem()(ListItemable) + GetLocation()(GeoCoordinatesable) + GetMalware()(Malwareable) + GetMedia()(Mediaable) + GetPackage()(Package_escapedable) + GetPendingOperations()(PendingOperationsable) + GetPermissions()([]Permissionable) + GetPhoto()(Photoable) + GetPublication()(PublicationFacetable) + GetRemoteItem()(RemoteItemable) + GetRoot()(Rootable) + GetSearchResult()(SearchResultable) + GetShared()(Sharedable) + GetSharepointIds()(SharepointIdsable) + GetSize()(*int64) + GetSource()(DriveItemSourceable) + GetSpecialFolder()(SpecialFolderable) + GetSubscriptions()([]Subscriptionable) + GetThumbnails()([]ThumbnailSetable) + GetVersions()([]DriveItemVersionable) + GetVideo()(Videoable) + GetWebDavUrl()(*string) + GetWorkbook()(Workbookable) + SetActivities(value []ItemActivityOLDable)() + SetAnalytics(value ItemAnalyticsable)() + SetAudio(value Audioable)() + SetBundle(value Bundleable)() + SetChildren(value []DriveItemable)() + SetContent(value []byte)() + SetCTag(value *string)() + SetDeleted(value Deletedable)() + SetFile(value Fileable)() + SetFileSystemInfo(value FileSystemInfoable)() + SetFolder(value Folderable)() + SetImage(value Imageable)() + SetListItem(value ListItemable)() + SetLocation(value GeoCoordinatesable)() + SetMalware(value Malwareable)() + SetMedia(value Mediaable)() + SetPackage(value Package_escapedable)() + SetPendingOperations(value PendingOperationsable)() + SetPermissions(value []Permissionable)() + SetPhoto(value Photoable)() + SetPublication(value PublicationFacetable)() + SetRemoteItem(value RemoteItemable)() + SetRoot(value Rootable)() + SetSearchResult(value SearchResultable)() + SetShared(value Sharedable)() + SetSharepointIds(value SharepointIdsable)() + SetSize(value *int64)() + SetSource(value DriveItemSourceable)() + SetSpecialFolder(value SpecialFolderable)() + SetSubscriptions(value []Subscriptionable)() + SetThumbnails(value []ThumbnailSetable)() + SetVersions(value []DriveItemVersionable)() + SetVideo(value Videoable)() + SetWebDavUrl(value *string)() + SetWorkbook(value Workbookable)() +} diff --git a/src/internal/connector/graph/betasdk/models/drive_recipient.go b/src/internal/connector/graph/betasdk/models/drive_recipient.go new file mode 100644 index 000000000..a2cfb151d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_recipient.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveRecipient +type DriveRecipient 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 alias of the domain object, for cases where an email address is unavailable (e.g. security groups). + alias *string + // The email address for the recipient, if the recipient has an associated email address. + email *string + // The unique identifier for the recipient in the directory. + objectId *string + // The OdataType property + odataType *string +} +// NewDriveRecipient instantiates a new driveRecipient and sets the default values. +func NewDriveRecipient()(*DriveRecipient) { + m := &DriveRecipient{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDriveRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDriveRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDriveRecipient(), 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 *DriveRecipient) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlias gets the alias property value. The alias of the domain object, for cases where an email address is unavailable (e.g. security groups). +func (m *DriveRecipient) GetAlias()(*string) { + return m.alias +} +// GetEmail gets the email property value. The email address for the recipient, if the recipient has an associated email address. +func (m *DriveRecipient) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DriveRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alias"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlias(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["objectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectId(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 + } + return res +} +// GetObjectId gets the objectId property value. The unique identifier for the recipient in the directory. +func (m *DriveRecipient) GetObjectId()(*string) { + return m.objectId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DriveRecipient) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *DriveRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("alias", m.GetAlias()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("objectId", m.GetObjectId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *DriveRecipient) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlias sets the alias property value. The alias of the domain object, for cases where an email address is unavailable (e.g. security groups). +func (m *DriveRecipient) SetAlias(value *string)() { + m.alias = value +} +// SetEmail sets the email property value. The email address for the recipient, if the recipient has an associated email address. +func (m *DriveRecipient) SetEmail(value *string)() { + m.email = value +} +// SetObjectId sets the objectId property value. The unique identifier for the recipient in the directory. +func (m *DriveRecipient) SetObjectId(value *string)() { + m.objectId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DriveRecipient) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/drive_recipientable.go b/src/internal/connector/graph/betasdk/models/drive_recipientable.go new file mode 100644 index 000000000..4d4afe1ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/drive_recipientable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DriveRecipientable +type DriveRecipientable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlias()(*string) + GetEmail()(*string) + GetObjectId()(*string) + GetOdataType()(*string) + SetAlias(value *string)() + SetEmail(value *string)() + SetObjectId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/driveable.go b/src/internal/connector/graph/betasdk/models/driveable.go new file mode 100644 index 000000000..e1edba06a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/driveable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Driveable +type Driveable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivities()([]ItemActivityOLDable) + GetBundles()([]DriveItemable) + GetDriveType()(*string) + GetFollowing()([]DriveItemable) + GetItems()([]DriveItemable) + GetList()(Listable) + GetOwner()(IdentitySetable) + GetQuota()(Quotaable) + GetRoot()(DriveItemable) + GetSharePointIds()(SharepointIdsable) + GetSpecial()([]DriveItemable) + GetSystem()(SystemFacetable) + SetActivities(value []ItemActivityOLDable)() + SetBundles(value []DriveItemable)() + SetDriveType(value *string)() + SetFollowing(value []DriveItemable)() + SetItems(value []DriveItemable)() + SetList(value Listable)() + SetOwner(value IdentitySetable)() + SetQuota(value Quotaable)() + SetRoot(value DriveItemable)() + SetSharePointIds(value SharepointIdsable)() + SetSpecial(value []DriveItemable)() + SetSystem(value SystemFacetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/driver_approval_status.go b/src/internal/connector/graph/betasdk/models/driver_approval_status.go new file mode 100644 index 000000000..b5acea0cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/driver_approval_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DriverApprovalStatus int + +const ( + // This indicates a driver needs IT admin's review. + NEEDSREVIEW_DRIVERAPPROVALSTATUS DriverApprovalStatus = iota + // This indicates IT admin has declined a driver. + DECLINED_DRIVERAPPROVALSTATUS + // This indicates IT admin has approved a driver. + APPROVED_DRIVERAPPROVALSTATUS + // This indicates IT admin has suspended a driver. + SUSPENDED_DRIVERAPPROVALSTATUS +) + +func (i DriverApprovalStatus) String() string { + return []string{"needsReview", "declined", "approved", "suspended"}[i] +} +func ParseDriverApprovalStatus(v string) (interface{}, error) { + result := NEEDSREVIEW_DRIVERAPPROVALSTATUS + switch v { + case "needsReview": + result = NEEDSREVIEW_DRIVERAPPROVALSTATUS + case "declined": + result = DECLINED_DRIVERAPPROVALSTATUS + case "approved": + result = APPROVED_DRIVERAPPROVALSTATUS + case "suspended": + result = SUSPENDED_DRIVERAPPROVALSTATUS + default: + return 0, errors.New("Unknown DriverApprovalStatus value: " + v) + } + return &result, nil +} +func SerializeDriverApprovalStatus(values []DriverApprovalStatus) []string { + 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/driver_category.go b/src/internal/connector/graph/betasdk/models/driver_category.go new file mode 100644 index 000000000..1ad6bf757 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/driver_category.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DriverCategory int + +const ( + // This indicates a driver is recommended by Microsoft. + RECOMMENDED_DRIVERCATEGORY DriverCategory = iota + // This indicates a driver was recommended by Microsoft and IT admin has taken some approval action on it. + PREVIOUSLYAPPROVED_DRIVERCATEGORY + // This indicates a driver is never recommended by Microsoft. + OTHER_DRIVERCATEGORY +) + +func (i DriverCategory) String() string { + return []string{"recommended", "previouslyApproved", "other"}[i] +} +func ParseDriverCategory(v string) (interface{}, error) { + result := RECOMMENDED_DRIVERCATEGORY + switch v { + case "recommended": + result = RECOMMENDED_DRIVERCATEGORY + case "previouslyApproved": + result = PREVIOUSLYAPPROVED_DRIVERCATEGORY + case "other": + result = OTHER_DRIVERCATEGORY + default: + return 0, errors.New("Unknown DriverCategory value: " + v) + } + return &result, nil +} +func SerializeDriverCategory(values []DriverCategory) []string { + 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/driver_update_profile_approval_type.go b/src/internal/connector/graph/betasdk/models/driver_update_profile_approval_type.go new file mode 100644 index 000000000..a9abd1bb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/driver_update_profile_approval_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DriverUpdateProfileApprovalType int + +const ( + // This indicates a driver and firmware profile needs to be approved manually. + MANUAL_DRIVERUPDATEPROFILEAPPROVALTYPE DriverUpdateProfileApprovalType = iota + // This indicates a driver and firmware profile is approved automatically. + AUTOMATIC_DRIVERUPDATEPROFILEAPPROVALTYPE +) + +func (i DriverUpdateProfileApprovalType) String() string { + return []string{"manual", "automatic"}[i] +} +func ParseDriverUpdateProfileApprovalType(v string) (interface{}, error) { + result := MANUAL_DRIVERUPDATEPROFILEAPPROVALTYPE + switch v { + case "manual": + result = MANUAL_DRIVERUPDATEPROFILEAPPROVALTYPE + case "automatic": + result = AUTOMATIC_DRIVERUPDATEPROFILEAPPROVALTYPE + default: + return 0, errors.New("Unknown DriverUpdateProfileApprovalType value: " + v) + } + return &result, nil +} +func SerializeDriverUpdateProfileApprovalType(values []DriverUpdateProfileApprovalType) []string { + 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/e_book_install_summary.go b/src/internal/connector/graph/betasdk/models/e_book_install_summary.go new file mode 100644 index 000000000..4fb1b0af9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/e_book_install_summary.go @@ -0,0 +1,190 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EBookInstallSummary +type EBookInstallSummary struct { + Entity + // Number of Devices that have failed to install this book. + failedDeviceCount *int32 + // Number of Users that have 1 or more device that failed to install this book. + failedUserCount *int32 + // Number of Devices that have successfully installed this book. + installedDeviceCount *int32 + // Number of Users whose devices have all succeeded to install this book. + installedUserCount *int32 + // Number of Devices that does not have this book installed. + notInstalledDeviceCount *int32 + // Number of Users that did not install this book. + notInstalledUserCount *int32 +} +// NewEBookInstallSummary instantiates a new eBookInstallSummary and sets the default values. +func NewEBookInstallSummary()(*EBookInstallSummary) { + m := &EBookInstallSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateEBookInstallSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEBookInstallSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEBookInstallSummary(), nil +} +// GetFailedDeviceCount gets the failedDeviceCount property value. Number of Devices that have failed to install this book. +func (m *EBookInstallSummary) GetFailedDeviceCount()(*int32) { + return m.failedDeviceCount +} +// GetFailedUserCount gets the failedUserCount property value. Number of Users that have 1 or more device that failed to install this book. +func (m *EBookInstallSummary) GetFailedUserCount()(*int32) { + return m.failedUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EBookInstallSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["failedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedDeviceCount(val) + } + return nil + } + res["failedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUserCount(val) + } + return nil + } + res["installedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstalledDeviceCount(val) + } + return nil + } + res["installedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstalledUserCount(val) + } + return nil + } + res["notInstalledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotInstalledDeviceCount(val) + } + return nil + } + res["notInstalledUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotInstalledUserCount(val) + } + return nil + } + return res +} +// GetInstalledDeviceCount gets the installedDeviceCount property value. Number of Devices that have successfully installed this book. +func (m *EBookInstallSummary) GetInstalledDeviceCount()(*int32) { + return m.installedDeviceCount +} +// GetInstalledUserCount gets the installedUserCount property value. Number of Users whose devices have all succeeded to install this book. +func (m *EBookInstallSummary) GetInstalledUserCount()(*int32) { + return m.installedUserCount +} +// GetNotInstalledDeviceCount gets the notInstalledDeviceCount property value. Number of Devices that does not have this book installed. +func (m *EBookInstallSummary) GetNotInstalledDeviceCount()(*int32) { + return m.notInstalledDeviceCount +} +// GetNotInstalledUserCount gets the notInstalledUserCount property value. Number of Users that did not install this book. +func (m *EBookInstallSummary) GetNotInstalledUserCount()(*int32) { + return m.notInstalledUserCount +} +// Serialize serializes information the current object +func (m *EBookInstallSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("failedDeviceCount", m.GetFailedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUserCount", m.GetFailedUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("installedDeviceCount", m.GetInstalledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("installedUserCount", m.GetInstalledUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notInstalledDeviceCount", m.GetNotInstalledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notInstalledUserCount", m.GetNotInstalledUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetFailedDeviceCount sets the failedDeviceCount property value. Number of Devices that have failed to install this book. +func (m *EBookInstallSummary) SetFailedDeviceCount(value *int32)() { + m.failedDeviceCount = value +} +// SetFailedUserCount sets the failedUserCount property value. Number of Users that have 1 or more device that failed to install this book. +func (m *EBookInstallSummary) SetFailedUserCount(value *int32)() { + m.failedUserCount = value +} +// SetInstalledDeviceCount sets the installedDeviceCount property value. Number of Devices that have successfully installed this book. +func (m *EBookInstallSummary) SetInstalledDeviceCount(value *int32)() { + m.installedDeviceCount = value +} +// SetInstalledUserCount sets the installedUserCount property value. Number of Users whose devices have all succeeded to install this book. +func (m *EBookInstallSummary) SetInstalledUserCount(value *int32)() { + m.installedUserCount = value +} +// SetNotInstalledDeviceCount sets the notInstalledDeviceCount property value. Number of Devices that does not have this book installed. +func (m *EBookInstallSummary) SetNotInstalledDeviceCount(value *int32)() { + m.notInstalledDeviceCount = value +} +// SetNotInstalledUserCount sets the notInstalledUserCount property value. Number of Users that did not install this book. +func (m *EBookInstallSummary) SetNotInstalledUserCount(value *int32)() { + m.notInstalledUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/e_book_install_summaryable.go b/src/internal/connector/graph/betasdk/models/e_book_install_summaryable.go new file mode 100644 index 000000000..fccb784b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/e_book_install_summaryable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EBookInstallSummaryable +type EBookInstallSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedDeviceCount()(*int32) + GetFailedUserCount()(*int32) + GetInstalledDeviceCount()(*int32) + GetInstalledUserCount()(*int32) + GetNotInstalledDeviceCount()(*int32) + GetNotInstalledUserCount()(*int32) + SetFailedDeviceCount(value *int32)() + SetFailedUserCount(value *int32)() + SetInstalledDeviceCount(value *int32)() + SetInstalledUserCount(value *int32)() + SetNotInstalledDeviceCount(value *int32)() + SetNotInstalledUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/eap_fast_configuration.go b/src/internal/connector/graph/betasdk/models/eap_fast_configuration.go new file mode 100644 index 000000000..d3f08fc4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eap_fast_configuration.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EapFastConfiguration int + +const ( + // Use EAP-FAST without Protected Access Credential (PAC). + NOPROTECTEDACCESSCREDENTIAL_EAPFASTCONFIGURATION EapFastConfiguration = iota + // Use Protected Access Credential (PAC). + USEPROTECTEDACCESSCREDENTIAL_EAPFASTCONFIGURATION + // Use Protected Access Credential (PAC) and Provision PAC. + USEPROTECTEDACCESSCREDENTIALANDPROVISION_EAPFASTCONFIGURATION + // Use Protected Access Credential (PAC), Provision PAC, and do so anonymously. + USEPROTECTEDACCESSCREDENTIALANDPROVISIONANONYMOUSLY_EAPFASTCONFIGURATION +) + +func (i EapFastConfiguration) String() string { + return []string{"noProtectedAccessCredential", "useProtectedAccessCredential", "useProtectedAccessCredentialAndProvision", "useProtectedAccessCredentialAndProvisionAnonymously"}[i] +} +func ParseEapFastConfiguration(v string) (interface{}, error) { + result := NOPROTECTEDACCESSCREDENTIAL_EAPFASTCONFIGURATION + switch v { + case "noProtectedAccessCredential": + result = NOPROTECTEDACCESSCREDENTIAL_EAPFASTCONFIGURATION + case "useProtectedAccessCredential": + result = USEPROTECTEDACCESSCREDENTIAL_EAPFASTCONFIGURATION + case "useProtectedAccessCredentialAndProvision": + result = USEPROTECTEDACCESSCREDENTIALANDPROVISION_EAPFASTCONFIGURATION + case "useProtectedAccessCredentialAndProvisionAnonymously": + result = USEPROTECTEDACCESSCREDENTIALANDPROVISIONANONYMOUSLY_EAPFASTCONFIGURATION + default: + return 0, errors.New("Unknown EapFastConfiguration value: " + v) + } + return &result, nil +} +func SerializeEapFastConfiguration(values []EapFastConfiguration) []string { + 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/eap_type.go b/src/internal/connector/graph/betasdk/models/eap_type.go new file mode 100644 index 000000000..0d914a2ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eap_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EapType int + +const ( + // EAP-Transport Layer Security (EAP-TLS). + EAPTLS_EAPTYPE EapType = iota + // Lightweight Extensible Authentication Protocol (LEAP). + LEAP_EAPTYPE + // EAP for GSM Subscriber Identity Module (EAP-SIM). + EAPSIM_EAPTYPE + // EAP-Tunneled Transport Layer Security (EAP-TTLS). + EAPTTLS_EAPTYPE + // Protected Extensible Authentication Protocol (PEAP). + PEAP_EAPTYPE + // EAP-Flexible Authentication via Secure Tunneling (EAP-FAST). + EAPFAST_EAPTYPE + // Tunnel Extensible Authentication Protocol (TEAP). + TEAP_EAPTYPE +) + +func (i EapType) String() string { + return []string{"eapTls", "leap", "eapSim", "eapTtls", "peap", "eapFast", "teap"}[i] +} +func ParseEapType(v string) (interface{}, error) { + result := EAPTLS_EAPTYPE + switch v { + case "eapTls": + result = EAPTLS_EAPTYPE + case "leap": + result = LEAP_EAPTYPE + case "eapSim": + result = EAPSIM_EAPTYPE + case "eapTtls": + result = EAPTTLS_EAPTYPE + case "peap": + result = PEAP_EAPTYPE + case "eapFast": + result = EAPFAST_EAPTYPE + case "teap": + result = TEAP_EAPTYPE + default: + return 0, errors.New("Unknown EapType value: " + v) + } + return &result, nil +} +func SerializeEapType(values []EapType) []string { + 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/eas_authentication_method.go b/src/internal/connector/graph/betasdk/models/eas_authentication_method.go new file mode 100644 index 000000000..c5a85fdca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_authentication_method.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EasAuthenticationMethod int + +const ( + // Authenticate with a username and password. + USERNAMEANDPASSWORD_EASAUTHENTICATIONMETHOD EasAuthenticationMethod = iota + // Authenticate with a certificate. + CERTIFICATE_EASAUTHENTICATIONMETHOD + // Authenticate with derived credential. + DERIVEDCREDENTIAL_EASAUTHENTICATIONMETHOD +) + +func (i EasAuthenticationMethod) String() string { + return []string{"usernameAndPassword", "certificate", "derivedCredential"}[i] +} +func ParseEasAuthenticationMethod(v string) (interface{}, error) { + result := USERNAMEANDPASSWORD_EASAUTHENTICATIONMETHOD + switch v { + case "usernameAndPassword": + result = USERNAMEANDPASSWORD_EASAUTHENTICATIONMETHOD + case "certificate": + result = CERTIFICATE_EASAUTHENTICATIONMETHOD + case "derivedCredential": + result = DERIVEDCREDENTIAL_EASAUTHENTICATIONMETHOD + default: + return 0, errors.New("Unknown EasAuthenticationMethod value: " + v) + } + return &result, nil +} +func SerializeEasAuthenticationMethod(values []EasAuthenticationMethod) []string { + 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/eas_email_profile_configuration_base.go b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base.go new file mode 100644 index 000000000..14989f206 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base.go @@ -0,0 +1,165 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EasEmailProfileConfigurationBase +type EasEmailProfileConfigurationBase struct { + DeviceConfiguration + // Custom domain name value used while generating an email profile before installing on the device. + customDomainName *string + // UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. + userDomainNameSource *DomainNameSource + // Name of the AAD field, that will be used to retrieve UserName for email profile. Possible values are: userPrincipalName, primarySmtpAddress, samAccountName. + usernameAADSource *UsernameSource + // Possible values for username source or email source. + usernameSource *UserEmailSource +} +// NewEasEmailProfileConfigurationBase instantiates a new EasEmailProfileConfigurationBase and sets the default values. +func NewEasEmailProfileConfigurationBase()(*EasEmailProfileConfigurationBase) { + m := &EasEmailProfileConfigurationBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.easEmailProfileConfigurationBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEasEmailProfileConfigurationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEasEmailProfileConfigurationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosEasEmailProfileConfiguration": + return NewIosEasEmailProfileConfiguration(), nil + case "#microsoft.graph.windows10EasEmailProfileConfiguration": + return NewWindows10EasEmailProfileConfiguration(), nil + case "#microsoft.graph.windowsPhoneEASEmailProfileConfiguration": + return NewWindowsPhoneEASEmailProfileConfiguration(), nil + } + } + } + } + return NewEasEmailProfileConfigurationBase(), nil +} +// GetCustomDomainName gets the customDomainName property value. Custom domain name value used while generating an email profile before installing on the device. +func (m *EasEmailProfileConfigurationBase) GetCustomDomainName()(*string) { + return m.customDomainName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EasEmailProfileConfigurationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["customDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDomainName(val) + } + return nil + } + res["userDomainNameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDomainNameSource) + if err != nil { + return err + } + if val != nil { + m.SetUserDomainNameSource(val.(*DomainNameSource)) + } + return nil + } + res["usernameAADSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUsernameSource) + if err != nil { + return err + } + if val != nil { + m.SetUsernameAADSource(val.(*UsernameSource)) + } + return nil + } + res["usernameSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserEmailSource) + if err != nil { + return err + } + if val != nil { + m.SetUsernameSource(val.(*UserEmailSource)) + } + return nil + } + return res +} +// GetUserDomainNameSource gets the userDomainNameSource property value. UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. +func (m *EasEmailProfileConfigurationBase) GetUserDomainNameSource()(*DomainNameSource) { + return m.userDomainNameSource +} +// GetUsernameAADSource gets the usernameAADSource property value. Name of the AAD field, that will be used to retrieve UserName for email profile. Possible values are: userPrincipalName, primarySmtpAddress, samAccountName. +func (m *EasEmailProfileConfigurationBase) GetUsernameAADSource()(*UsernameSource) { + return m.usernameAADSource +} +// GetUsernameSource gets the usernameSource property value. Possible values for username source or email source. +func (m *EasEmailProfileConfigurationBase) GetUsernameSource()(*UserEmailSource) { + return m.usernameSource +} +// Serialize serializes information the current object +func (m *EasEmailProfileConfigurationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("customDomainName", m.GetCustomDomainName()) + if err != nil { + return err + } + } + if m.GetUserDomainNameSource() != nil { + cast := (*m.GetUserDomainNameSource()).String() + err = writer.WriteStringValue("userDomainNameSource", &cast) + if err != nil { + return err + } + } + if m.GetUsernameAADSource() != nil { + cast := (*m.GetUsernameAADSource()).String() + err = writer.WriteStringValue("usernameAADSource", &cast) + if err != nil { + return err + } + } + if m.GetUsernameSource() != nil { + cast := (*m.GetUsernameSource()).String() + err = writer.WriteStringValue("usernameSource", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCustomDomainName sets the customDomainName property value. Custom domain name value used while generating an email profile before installing on the device. +func (m *EasEmailProfileConfigurationBase) SetCustomDomainName(value *string)() { + m.customDomainName = value +} +// SetUserDomainNameSource sets the userDomainNameSource property value. UserDomainname attribute that is picked from AAD and injected into this profile before installing on the device. Possible values are: fullDomainName, netBiosDomainName. +func (m *EasEmailProfileConfigurationBase) SetUserDomainNameSource(value *DomainNameSource)() { + m.userDomainNameSource = value +} +// SetUsernameAADSource sets the usernameAADSource property value. Name of the AAD field, that will be used to retrieve UserName for email profile. Possible values are: userPrincipalName, primarySmtpAddress, samAccountName. +func (m *EasEmailProfileConfigurationBase) SetUsernameAADSource(value *UsernameSource)() { + m.usernameAADSource = value +} +// SetUsernameSource sets the usernameSource property value. Possible values for username source or email source. +func (m *EasEmailProfileConfigurationBase) SetUsernameSource(value *UserEmailSource)() { + m.usernameSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_response.go b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_response.go new file mode 100644 index 000000000..e1b0104ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EasEmailProfileConfigurationBaseCollectionResponse +type EasEmailProfileConfigurationBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EasEmailProfileConfigurationBaseable +} +// NewEasEmailProfileConfigurationBaseCollectionResponse instantiates a new EasEmailProfileConfigurationBaseCollectionResponse and sets the default values. +func NewEasEmailProfileConfigurationBaseCollectionResponse()(*EasEmailProfileConfigurationBaseCollectionResponse) { + m := &EasEmailProfileConfigurationBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEasEmailProfileConfigurationBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEasEmailProfileConfigurationBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEasEmailProfileConfigurationBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EasEmailProfileConfigurationBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEasEmailProfileConfigurationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EasEmailProfileConfigurationBaseable, len(val)) + for i, v := range val { + res[i] = v.(EasEmailProfileConfigurationBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EasEmailProfileConfigurationBaseCollectionResponse) GetValue()([]EasEmailProfileConfigurationBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *EasEmailProfileConfigurationBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EasEmailProfileConfigurationBaseCollectionResponse) SetValue(value []EasEmailProfileConfigurationBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_responseable.go new file mode 100644 index 000000000..6e39ce480 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EasEmailProfileConfigurationBaseCollectionResponseable +type EasEmailProfileConfigurationBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EasEmailProfileConfigurationBaseable) + SetValue(value []EasEmailProfileConfigurationBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_baseable.go b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_baseable.go new file mode 100644 index 000000000..7a3f22b5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_email_profile_configuration_baseable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EasEmailProfileConfigurationBaseable +type EasEmailProfileConfigurationBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomDomainName()(*string) + GetUserDomainNameSource()(*DomainNameSource) + GetUsernameAADSource()(*UsernameSource) + GetUsernameSource()(*UserEmailSource) + SetCustomDomainName(value *string)() + SetUserDomainNameSource(value *DomainNameSource)() + SetUsernameAADSource(value *UsernameSource)() + SetUsernameSource(value *UserEmailSource)() +} diff --git a/src/internal/connector/graph/betasdk/models/eas_services.go b/src/internal/connector/graph/betasdk/models/eas_services.go new file mode 100644 index 000000000..087a8b413 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eas_services.go @@ -0,0 +1,51 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EasServices int + +const ( + NONE_EASSERVICES EasServices = iota + // Enables synchronization of calendars. + CALENDARS_EASSERVICES + // Enables synchronization of contacts. + CONTACTS_EASSERVICES + // Enables synchronization of email. + EMAIL_EASSERVICES + // Enables synchronization of notes. + NOTES_EASSERVICES + // Enables synchronization of reminders. + REMINDERS_EASSERVICES +) + +func (i EasServices) String() string { + return []string{"none", "calendars", "contacts", "email", "notes", "reminders"}[i] +} +func ParseEasServices(v string) (interface{}, error) { + result := NONE_EASSERVICES + switch v { + case "none": + result = NONE_EASSERVICES + case "calendars": + result = CALENDARS_EASSERVICES + case "contacts": + result = CONTACTS_EASSERVICES + case "email": + result = EMAIL_EASSERVICES + case "notes": + result = NOTES_EASSERVICES + case "reminders": + result = REMINDERS_EASSERVICES + default: + return 0, errors.New("Unknown EasServices value: " + v) + } + return &result, nil +} +func SerializeEasServices(values []EasServices) []string { + 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/edge.go b/src/internal/connector/graph/betasdk/models/edge.go new file mode 100644 index 000000000..9ed27c1c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Edge +type Edge struct { + Entity + // A container for Internet Explorer mode resources. + internetExplorerMode InternetExplorerModeable +} +// NewEdge instantiates a new Edge and sets the default values. +func NewEdge()(*Edge) { + m := &Edge{ + Entity: *NewEntity(), + } + return m +} +// CreateEdgeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdge(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Edge) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["internetExplorerMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInternetExplorerModeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInternetExplorerMode(val.(InternetExplorerModeable)) + } + return nil + } + return res +} +// GetInternetExplorerMode gets the internetExplorerMode property value. A container for Internet Explorer mode resources. +func (m *Edge) GetInternetExplorerMode()(InternetExplorerModeable) { + return m.internetExplorerMode +} +// Serialize serializes information the current object +func (m *Edge) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("internetExplorerMode", m.GetInternetExplorerMode()) + if err != nil { + return err + } + } + return nil +} +// SetInternetExplorerMode sets the internetExplorerMode property value. A container for Internet Explorer mode resources. +func (m *Edge) SetInternetExplorerMode(value InternetExplorerModeable)() { + m.internetExplorerMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_cookie_policy.go b/src/internal/connector/graph/betasdk/models/edge_cookie_policy.go new file mode 100644 index 000000000..171b805fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_cookie_policy.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdgeCookiePolicy int + +const ( + // Allow the user to set. + USERDEFINED_EDGECOOKIEPOLICY EdgeCookiePolicy = iota + // Allow. + ALLOW_EDGECOOKIEPOLICY + // Block only third party cookies. + BLOCKTHIRDPARTY_EDGECOOKIEPOLICY + // Block all cookies. + BLOCKALL_EDGECOOKIEPOLICY +) + +func (i EdgeCookiePolicy) String() string { + return []string{"userDefined", "allow", "blockThirdParty", "blockAll"}[i] +} +func ParseEdgeCookiePolicy(v string) (interface{}, error) { + result := USERDEFINED_EDGECOOKIEPOLICY + switch v { + case "userDefined": + result = USERDEFINED_EDGECOOKIEPOLICY + case "allow": + result = ALLOW_EDGECOOKIEPOLICY + case "blockThirdParty": + result = BLOCKTHIRDPARTY_EDGECOOKIEPOLICY + case "blockAll": + result = BLOCKALL_EDGECOOKIEPOLICY + default: + return 0, errors.New("Unknown EdgeCookiePolicy value: " + v) + } + return &result, nil +} +func SerializeEdgeCookiePolicy(values []EdgeCookiePolicy) []string { + 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/edge_home_button_configuration.go b/src/internal/connector/graph/betasdk/models/edge_home_button_configuration.go new file mode 100644 index 000000000..7d1a2bb3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_configuration.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonConfiguration the home button configuration base class used to identify the available options +type EdgeHomeButtonConfiguration 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 OdataType property + odataType *string +} +// NewEdgeHomeButtonConfiguration instantiates a new edgeHomeButtonConfiguration and sets the default values. +func NewEdgeHomeButtonConfiguration()(*EdgeHomeButtonConfiguration) { + m := &EdgeHomeButtonConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEdgeHomeButtonConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeHomeButtonConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.edgeHomeButtonHidden": + return NewEdgeHomeButtonHidden(), nil + case "#microsoft.graph.edgeHomeButtonLoadsStartPage": + return NewEdgeHomeButtonLoadsStartPage(), nil + case "#microsoft.graph.edgeHomeButtonOpensCustomURL": + return NewEdgeHomeButtonOpensCustomURL(), nil + case "#microsoft.graph.edgeHomeButtonOpensNewTab": + return NewEdgeHomeButtonOpensNewTab(), nil + } + } + } + } + return NewEdgeHomeButtonConfiguration(), 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 *EdgeHomeButtonConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeHomeButtonConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EdgeHomeButtonConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EdgeHomeButtonConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EdgeHomeButtonConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EdgeHomeButtonConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_configurationable.go b/src/internal/connector/graph/betasdk/models/edge_home_button_configurationable.go new file mode 100644 index 000000000..84caba9ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonConfigurationable +type EdgeHomeButtonConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_hidden.go b/src/internal/connector/graph/betasdk/models/edge_home_button_hidden.go new file mode 100644 index 000000000..a978939c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_hidden.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonHidden +type EdgeHomeButtonHidden struct { + EdgeHomeButtonConfiguration +} +// NewEdgeHomeButtonHidden instantiates a new EdgeHomeButtonHidden and sets the default values. +func NewEdgeHomeButtonHidden()(*EdgeHomeButtonHidden) { + m := &EdgeHomeButtonHidden{ + EdgeHomeButtonConfiguration: *NewEdgeHomeButtonConfiguration(), + } + odataTypeValue := "#microsoft.graph.edgeHomeButtonHidden"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeHomeButtonHiddenFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeHomeButtonHiddenFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeHomeButtonHidden(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeHomeButtonHidden) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeHomeButtonConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdgeHomeButtonHidden) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeHomeButtonConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_hiddenable.go b/src/internal/connector/graph/betasdk/models/edge_home_button_hiddenable.go new file mode 100644 index 000000000..e043d873f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_hiddenable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonHiddenable +type EdgeHomeButtonHiddenable interface { + EdgeHomeButtonConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_page.go b/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_page.go new file mode 100644 index 000000000..532e7e7ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_page.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonLoadsStartPage +type EdgeHomeButtonLoadsStartPage struct { + EdgeHomeButtonConfiguration +} +// NewEdgeHomeButtonLoadsStartPage instantiates a new EdgeHomeButtonLoadsStartPage and sets the default values. +func NewEdgeHomeButtonLoadsStartPage()(*EdgeHomeButtonLoadsStartPage) { + m := &EdgeHomeButtonLoadsStartPage{ + EdgeHomeButtonConfiguration: *NewEdgeHomeButtonConfiguration(), + } + odataTypeValue := "#microsoft.graph.edgeHomeButtonLoadsStartPage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeHomeButtonLoadsStartPageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeHomeButtonLoadsStartPageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeHomeButtonLoadsStartPage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeHomeButtonLoadsStartPage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeHomeButtonConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdgeHomeButtonLoadsStartPage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeHomeButtonConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_pageable.go b/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_pageable.go new file mode 100644 index 000000000..cab36474b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_loads_start_pageable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonLoadsStartPageable +type EdgeHomeButtonLoadsStartPageable interface { + EdgeHomeButtonConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_l.go b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_l.go new file mode 100644 index 000000000..69923ff76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_l.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonOpensCustomURL +type EdgeHomeButtonOpensCustomURL struct { + EdgeHomeButtonConfiguration + // The specific URL to load. + homeButtonCustomURL *string +} +// NewEdgeHomeButtonOpensCustomURL instantiates a new EdgeHomeButtonOpensCustomURL and sets the default values. +func NewEdgeHomeButtonOpensCustomURL()(*EdgeHomeButtonOpensCustomURL) { + m := &EdgeHomeButtonOpensCustomURL{ + EdgeHomeButtonConfiguration: *NewEdgeHomeButtonConfiguration(), + } + odataTypeValue := "#microsoft.graph.edgeHomeButtonOpensCustomURL"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeHomeButtonOpensCustomURLFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeHomeButtonOpensCustomURLFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeHomeButtonOpensCustomURL(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeHomeButtonOpensCustomURL) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeHomeButtonConfiguration.GetFieldDeserializers() + res["homeButtonCustomURL"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomeButtonCustomURL(val) + } + return nil + } + return res +} +// GetHomeButtonCustomURL gets the homeButtonCustomURL property value. The specific URL to load. +func (m *EdgeHomeButtonOpensCustomURL) GetHomeButtonCustomURL()(*string) { + return m.homeButtonCustomURL +} +// Serialize serializes information the current object +func (m *EdgeHomeButtonOpensCustomURL) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeHomeButtonConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("homeButtonCustomURL", m.GetHomeButtonCustomURL()) + if err != nil { + return err + } + } + return nil +} +// SetHomeButtonCustomURL sets the homeButtonCustomURL property value. The specific URL to load. +func (m *EdgeHomeButtonOpensCustomURL) SetHomeButtonCustomURL(value *string)() { + m.homeButtonCustomURL = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_lable.go b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_lable.go new file mode 100644 index 000000000..cd5367de2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_custom_u_r_lable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonOpensCustomURLable +type EdgeHomeButtonOpensCustomURLable interface { + EdgeHomeButtonConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHomeButtonCustomURL()(*string) + SetHomeButtonCustomURL(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tab.go b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tab.go new file mode 100644 index 000000000..5db8f9321 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tab.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonOpensNewTab +type EdgeHomeButtonOpensNewTab struct { + EdgeHomeButtonConfiguration +} +// NewEdgeHomeButtonOpensNewTab instantiates a new EdgeHomeButtonOpensNewTab and sets the default values. +func NewEdgeHomeButtonOpensNewTab()(*EdgeHomeButtonOpensNewTab) { + m := &EdgeHomeButtonOpensNewTab{ + EdgeHomeButtonConfiguration: *NewEdgeHomeButtonConfiguration(), + } + odataTypeValue := "#microsoft.graph.edgeHomeButtonOpensNewTab"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeHomeButtonOpensNewTabFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeHomeButtonOpensNewTabFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeHomeButtonOpensNewTab(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeHomeButtonOpensNewTab) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeHomeButtonConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdgeHomeButtonOpensNewTab) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeHomeButtonConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tabable.go b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tabable.go new file mode 100644 index 000000000..866e5579d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_home_button_opens_new_tabable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeHomeButtonOpensNewTabable +type EdgeHomeButtonOpensNewTabable interface { + EdgeHomeButtonConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/edge_kiosk_mode_restriction_type.go b/src/internal/connector/graph/betasdk/models/edge_kiosk_mode_restriction_type.go new file mode 100644 index 000000000..e1c3dc4f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_kiosk_mode_restriction_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdgeKioskModeRestrictionType int + +const ( + // Not configured (unrestricted). + NOTCONFIGURED_EDGEKIOSKMODERESTRICTIONTYPE EdgeKioskModeRestrictionType = iota + // Interactive/Digital signage in single-app mode. + DIGITALSIGNAGE_EDGEKIOSKMODERESTRICTIONTYPE + // Normal mode (full version of Microsoft Edge). + NORMALMODE_EDGEKIOSKMODERESTRICTIONTYPE + // Public browsing in single-app mode. + PUBLICBROWSINGSINGLEAPP_EDGEKIOSKMODERESTRICTIONTYPE + // Public browsing (inPrivate) in multi-app mode. + PUBLICBROWSINGMULTIAPP_EDGEKIOSKMODERESTRICTIONTYPE +) + +func (i EdgeKioskModeRestrictionType) String() string { + return []string{"notConfigured", "digitalSignage", "normalMode", "publicBrowsingSingleApp", "publicBrowsingMultiApp"}[i] +} +func ParseEdgeKioskModeRestrictionType(v string) (interface{}, error) { + result := NOTCONFIGURED_EDGEKIOSKMODERESTRICTIONTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_EDGEKIOSKMODERESTRICTIONTYPE + case "digitalSignage": + result = DIGITALSIGNAGE_EDGEKIOSKMODERESTRICTIONTYPE + case "normalMode": + result = NORMALMODE_EDGEKIOSKMODERESTRICTIONTYPE + case "publicBrowsingSingleApp": + result = PUBLICBROWSINGSINGLEAPP_EDGEKIOSKMODERESTRICTIONTYPE + case "publicBrowsingMultiApp": + result = PUBLICBROWSINGMULTIAPP_EDGEKIOSKMODERESTRICTIONTYPE + default: + return 0, errors.New("Unknown EdgeKioskModeRestrictionType value: " + v) + } + return &result, nil +} +func SerializeEdgeKioskModeRestrictionType(values []EdgeKioskModeRestrictionType) []string { + 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/edge_open_options.go b/src/internal/connector/graph/betasdk/models/edge_open_options.go new file mode 100644 index 000000000..9a3ff3be5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_open_options.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdgeOpenOptions int + +const ( + // Not configured. + NOTCONFIGURED_EDGEOPENOPTIONS EdgeOpenOptions = iota + // StartPage. + STARTPAGE_EDGEOPENOPTIONS + // NewTabPage. + NEWTABPAGE_EDGEOPENOPTIONS + // PreviousPages. + PREVIOUSPAGES_EDGEOPENOPTIONS + // SpecificPages. + SPECIFICPAGES_EDGEOPENOPTIONS +) + +func (i EdgeOpenOptions) String() string { + return []string{"notConfigured", "startPage", "newTabPage", "previousPages", "specificPages"}[i] +} +func ParseEdgeOpenOptions(v string) (interface{}, error) { + result := NOTCONFIGURED_EDGEOPENOPTIONS + switch v { + case "notConfigured": + result = NOTCONFIGURED_EDGEOPENOPTIONS + case "startPage": + result = STARTPAGE_EDGEOPENOPTIONS + case "newTabPage": + result = NEWTABPAGE_EDGEOPENOPTIONS + case "previousPages": + result = PREVIOUSPAGES_EDGEOPENOPTIONS + case "specificPages": + result = SPECIFICPAGES_EDGEOPENOPTIONS + default: + return 0, errors.New("Unknown EdgeOpenOptions value: " + v) + } + return &result, nil +} +func SerializeEdgeOpenOptions(values []EdgeOpenOptions) []string { + 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/edge_search_engine.go b/src/internal/connector/graph/betasdk/models/edge_search_engine.go new file mode 100644 index 000000000..5de4cf4d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngine +type EdgeSearchEngine struct { + EdgeSearchEngineBase + // Allows IT admind to set a predefined default search engine for MDM-Controlled devices + edgeSearchEngineType *EdgeSearchEngineType +} +// NewEdgeSearchEngine instantiates a new EdgeSearchEngine and sets the default values. +func NewEdgeSearchEngine()(*EdgeSearchEngine) { + m := &EdgeSearchEngine{ + EdgeSearchEngineBase: *NewEdgeSearchEngineBase(), + } + odataTypeValue := "#microsoft.graph.edgeSearchEngine"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeSearchEngineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeSearchEngineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeSearchEngine(), nil +} +// GetEdgeSearchEngineType gets the edgeSearchEngineType property value. Allows IT admind to set a predefined default search engine for MDM-Controlled devices +func (m *EdgeSearchEngine) GetEdgeSearchEngineType()(*EdgeSearchEngineType) { + return m.edgeSearchEngineType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeSearchEngine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeSearchEngineBase.GetFieldDeserializers() + res["edgeSearchEngineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEdgeSearchEngineType) + if err != nil { + return err + } + if val != nil { + m.SetEdgeSearchEngineType(val.(*EdgeSearchEngineType)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EdgeSearchEngine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeSearchEngineBase.Serialize(writer) + if err != nil { + return err + } + if m.GetEdgeSearchEngineType() != nil { + cast := (*m.GetEdgeSearchEngineType()).String() + err = writer.WriteStringValue("edgeSearchEngineType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetEdgeSearchEngineType sets the edgeSearchEngineType property value. Allows IT admind to set a predefined default search engine for MDM-Controlled devices +func (m *EdgeSearchEngine) SetEdgeSearchEngineType(value *EdgeSearchEngineType)() { + m.edgeSearchEngineType = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_search_engine_base.go b/src/internal/connector/graph/betasdk/models/edge_search_engine_base.go new file mode 100644 index 000000000..c020d2108 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine_base.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngineBase allows IT admins to set a default search engine for MDM-Controlled devices. Users can override this and change their default search engine provided the AllowSearchEngineCustomization policy is not set. +type EdgeSearchEngineBase 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 OdataType property + odataType *string +} +// NewEdgeSearchEngineBase instantiates a new edgeSearchEngineBase and sets the default values. +func NewEdgeSearchEngineBase()(*EdgeSearchEngineBase) { + m := &EdgeSearchEngineBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEdgeSearchEngineBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeSearchEngineBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.edgeSearchEngine": + return NewEdgeSearchEngine(), nil + case "#microsoft.graph.edgeSearchEngineCustom": + return NewEdgeSearchEngineCustom(), nil + } + } + } + } + return NewEdgeSearchEngineBase(), 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 *EdgeSearchEngineBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeSearchEngineBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EdgeSearchEngineBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EdgeSearchEngineBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EdgeSearchEngineBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EdgeSearchEngineBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_search_engine_baseable.go b/src/internal/connector/graph/betasdk/models/edge_search_engine_baseable.go new file mode 100644 index 000000000..658b93930 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngineBaseable +type EdgeSearchEngineBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edge_search_engine_custom.go b/src/internal/connector/graph/betasdk/models/edge_search_engine_custom.go new file mode 100644 index 000000000..6f73487b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine_custom.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngineCustom +type EdgeSearchEngineCustom struct { + EdgeSearchEngineBase + // Points to a https link containing the OpenSearch xml file that contains, at minimum, the short name and the URL to the search Engine. + edgeSearchEngineOpenSearchXmlUrl *string +} +// NewEdgeSearchEngineCustom instantiates a new EdgeSearchEngineCustom and sets the default values. +func NewEdgeSearchEngineCustom()(*EdgeSearchEngineCustom) { + m := &EdgeSearchEngineCustom{ + EdgeSearchEngineBase: *NewEdgeSearchEngineBase(), + } + odataTypeValue := "#microsoft.graph.edgeSearchEngineCustom"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdgeSearchEngineCustomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdgeSearchEngineCustomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdgeSearchEngineCustom(), nil +} +// GetEdgeSearchEngineOpenSearchXmlUrl gets the edgeSearchEngineOpenSearchXmlUrl property value. Points to a https link containing the OpenSearch xml file that contains, at minimum, the short name and the URL to the search Engine. +func (m *EdgeSearchEngineCustom) GetEdgeSearchEngineOpenSearchXmlUrl()(*string) { + return m.edgeSearchEngineOpenSearchXmlUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdgeSearchEngineCustom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EdgeSearchEngineBase.GetFieldDeserializers() + res["edgeSearchEngineOpenSearchXmlUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEdgeSearchEngineOpenSearchXmlUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EdgeSearchEngineCustom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EdgeSearchEngineBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("edgeSearchEngineOpenSearchXmlUrl", m.GetEdgeSearchEngineOpenSearchXmlUrl()) + if err != nil { + return err + } + } + return nil +} +// SetEdgeSearchEngineOpenSearchXmlUrl sets the edgeSearchEngineOpenSearchXmlUrl property value. Points to a https link containing the OpenSearch xml file that contains, at minimum, the short name and the URL to the search Engine. +func (m *EdgeSearchEngineCustom) SetEdgeSearchEngineOpenSearchXmlUrl(value *string)() { + m.edgeSearchEngineOpenSearchXmlUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/edge_search_engine_customable.go b/src/internal/connector/graph/betasdk/models/edge_search_engine_customable.go new file mode 100644 index 000000000..ef3c0b32d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine_customable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngineCustomable +type EdgeSearchEngineCustomable interface { + EdgeSearchEngineBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEdgeSearchEngineOpenSearchXmlUrl()(*string) + SetEdgeSearchEngineOpenSearchXmlUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edge_search_engine_type.go b/src/internal/connector/graph/betasdk/models/edge_search_engine_type.go new file mode 100644 index 000000000..d615af863 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engine_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdgeSearchEngineType int + +const ( + // Uses factory settings of Edge to assign the default search engine as per the user market + DEFAULT_ESCAPED_EDGESEARCHENGINETYPE EdgeSearchEngineType = iota + // Sets Bing as the default search engine + BING_EDGESEARCHENGINETYPE +) + +func (i EdgeSearchEngineType) String() string { + return []string{"default", "bing"}[i] +} +func ParseEdgeSearchEngineType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_EDGESEARCHENGINETYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_EDGESEARCHENGINETYPE + case "bing": + result = BING_EDGESEARCHENGINETYPE + default: + return 0, errors.New("Unknown EdgeSearchEngineType value: " + v) + } + return &result, nil +} +func SerializeEdgeSearchEngineType(values []EdgeSearchEngineType) []string { + 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/edge_search_engineable.go b/src/internal/connector/graph/betasdk/models/edge_search_engineable.go new file mode 100644 index 000000000..bef3575ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_search_engineable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdgeSearchEngineable +type EdgeSearchEngineable interface { + EdgeSearchEngineBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEdgeSearchEngineType()(*EdgeSearchEngineType) + SetEdgeSearchEngineType(value *EdgeSearchEngineType)() +} diff --git a/src/internal/connector/graph/betasdk/models/edge_telemetry_mode.go b/src/internal/connector/graph/betasdk/models/edge_telemetry_mode.go new file mode 100644 index 000000000..6f515f40d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edge_telemetry_mode.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdgeTelemetryMode int + +const ( + // Default – No telemetry data collected or sent + NOTCONFIGURED_EDGETELEMETRYMODE EdgeTelemetryMode = iota + // Allow sending intranet history only: Only send browsing history data for intranet sites + INTRANET_EDGETELEMETRYMODE + // Allow sending internet history only: Only send browsing history data for internet sites + INTERNET_EDGETELEMETRYMODE + // Allow sending both intranet and internet history: Send browsing history data for intranet and internet sites + INTRANETANDINTERNET_EDGETELEMETRYMODE +) + +func (i EdgeTelemetryMode) String() string { + return []string{"notConfigured", "intranet", "internet", "intranetAndInternet"}[i] +} +func ParseEdgeTelemetryMode(v string) (interface{}, error) { + result := NOTCONFIGURED_EDGETELEMETRYMODE + switch v { + case "notConfigured": + result = NOTCONFIGURED_EDGETELEMETRYMODE + case "intranet": + result = INTRANET_EDGETELEMETRYMODE + case "internet": + result = INTERNET_EDGETELEMETRYMODE + case "intranetAndInternet": + result = INTRANETANDINTERNET_EDGETELEMETRYMODE + default: + return 0, errors.New("Unknown EdgeTelemetryMode value: " + v) + } + return &result, nil +} +func SerializeEdgeTelemetryMode(values []EdgeTelemetryMode) []string { + 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/edgeable.go b/src/internal/connector/graph/betasdk/models/edgeable.go new file mode 100644 index 000000000..dbdc848c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edgeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Edgeable +type Edgeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInternetExplorerMode()(InternetExplorerModeable) + SetInternetExplorerMode(value InternetExplorerModeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation.go new file mode 100644 index 000000000..d49340fb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation.go @@ -0,0 +1,86 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddToReviewSetOperation +type AddToReviewSetOperation struct { + CaseOperation + // The review set to which items matching the source collection query are added to. + reviewSet ReviewSetable + // The sourceCollection that items are being added from. + sourceCollection SourceCollectionable +} +// NewAddToReviewSetOperation instantiates a new AddToReviewSetOperation and sets the default values. +func NewAddToReviewSetOperation()(*AddToReviewSetOperation) { + m := &AddToReviewSetOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateAddToReviewSetOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddToReviewSetOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddToReviewSetOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddToReviewSetOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["reviewSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewSet(val.(ReviewSetable)) + } + return nil + } + res["sourceCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSourceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceCollection(val.(SourceCollectionable)) + } + return nil + } + return res +} +// GetReviewSet gets the reviewSet property value. The review set to which items matching the source collection query are added to. +func (m *AddToReviewSetOperation) GetReviewSet()(ReviewSetable) { + return m.reviewSet +} +// GetSourceCollection gets the sourceCollection property value. The sourceCollection that items are being added from. +func (m *AddToReviewSetOperation) GetSourceCollection()(SourceCollectionable) { + return m.sourceCollection +} +// Serialize serializes information the current object +func (m *AddToReviewSetOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("reviewSet", m.GetReviewSet()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceCollection", m.GetSourceCollection()) + if err != nil { + return err + } + } + return nil +} +// SetReviewSet sets the reviewSet property value. The review set to which items matching the source collection query are added to. +func (m *AddToReviewSetOperation) SetReviewSet(value ReviewSetable)() { + m.reviewSet = value +} +// SetSourceCollection sets the sourceCollection property value. The sourceCollection that items are being added from. +func (m *AddToReviewSetOperation) SetSourceCollection(value SourceCollectionable)() { + m.sourceCollection = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_response.go new file mode 100644 index 000000000..7ba26672f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AddToReviewSetOperationCollectionResponse +type AddToReviewSetOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AddToReviewSetOperationable +} +// NewAddToReviewSetOperationCollectionResponse instantiates a new AddToReviewSetOperationCollectionResponse and sets the default values. +func NewAddToReviewSetOperationCollectionResponse()(*AddToReviewSetOperationCollectionResponse) { + m := &AddToReviewSetOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAddToReviewSetOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddToReviewSetOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddToReviewSetOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddToReviewSetOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAddToReviewSetOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AddToReviewSetOperationable, len(val)) + for i, v := range val { + res[i] = v.(AddToReviewSetOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AddToReviewSetOperationCollectionResponse) GetValue()([]AddToReviewSetOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *AddToReviewSetOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AddToReviewSetOperationCollectionResponse) SetValue(value []AddToReviewSetOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_responseable.go new file mode 100644 index 000000000..5db0d45da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AddToReviewSetOperationCollectionResponseable +type AddToReviewSetOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AddToReviewSetOperationable) + SetValue(value []AddToReviewSetOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operationable.go new file mode 100644 index 000000000..ae24dfa89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/add_to_review_set_operationable.go @@ -0,0 +1,15 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddToReviewSetOperationable +type AddToReviewSetOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewSet()(ReviewSetable) + GetSourceCollection()(SourceCollectionable) + SetReviewSet(value ReviewSetable)() + SetSourceCollection(value SourceCollectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_action.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_action.go new file mode 100644 index 000000000..036e01d1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_action.go @@ -0,0 +1,55 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseAction int + +const ( + CONTENTEXPORT_CASEACTION CaseAction = iota + APPLYTAGS_CASEACTION + CONVERTTOPDF_CASEACTION + INDEX_CASEACTION + ESTIMATESTATISTICS_CASEACTION + ADDTOREVIEWSET_CASEACTION + HOLDUPDATE_CASEACTION + UNKNOWNFUTUREVALUE_CASEACTION + PURGEDATA_CASEACTION +) + +func (i CaseAction) String() string { + return []string{"contentExport", "applyTags", "convertToPdf", "index", "estimateStatistics", "addToReviewSet", "holdUpdate", "unknownFutureValue", "purgeData"}[i] +} +func ParseCaseAction(v string) (interface{}, error) { + result := CONTENTEXPORT_CASEACTION + switch v { + case "contentExport": + result = CONTENTEXPORT_CASEACTION + case "applyTags": + result = APPLYTAGS_CASEACTION + case "convertToPdf": + result = CONVERTTOPDF_CASEACTION + case "index": + result = INDEX_CASEACTION + case "estimateStatistics": + result = ESTIMATESTATISTICS_CASEACTION + case "addToReviewSet": + result = ADDTOREVIEWSET_CASEACTION + case "holdUpdate": + result = HOLDUPDATE_CASEACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASEACTION + case "purgeData": + result = PURGEDATA_CASEACTION + default: + return 0, errors.New("Unknown CaseAction value: " + v) + } + return &result, nil +} +func SerializeCaseAction(values []CaseAction) []string { + 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/ediscovery/case_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_collection_response.go new file mode 100644 index 000000000..3002fbfc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseCollectionResponse +type CaseCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Case_escapedable +} +// NewCaseCollectionResponse instantiates a new CaseCollectionResponse and sets the default values. +func NewCaseCollectionResponse()(*CaseCollectionResponse) { + m := &CaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCase_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Case_escapedable, len(val)) + for i, v := range val { + res[i] = v.(Case_escapedable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseCollectionResponse) GetValue()([]Case_escapedable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseCollectionResponse) SetValue(value []Case_escapedable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_collection_responseable.go new file mode 100644 index 000000000..2a66c24ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseCollectionResponseable +type CaseCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Case_escapedable) + SetValue(value []Case_escapedable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_escaped.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_escaped.go new file mode 100644 index 000000000..026db973d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_escaped.go @@ -0,0 +1,535 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Case_escaped provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Case_escaped struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who closed the case. + closedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + closedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Returns a list of case custodian objects for this case. Nullable. + custodians []Custodianable + // The case description. + description *string + // The case name. + displayName *string + // The external case number for customer reference. + externalId *string + // The last user who modified the entity. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The latest date and time when the case was modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Returns a list of case legalHold objects for this case. Nullable. + legalHolds []LegalHoldable + // Returns a list of case noncustodialDataSource objects for this case. Nullable. + noncustodialDataSources []NoncustodialDataSourceable + // Returns a list of case operation objects for this case. Nullable. + operations []CaseOperationable + // Returns a list of reviewSet objects in the case. Read-only. Nullable. + reviewSets []ReviewSetable + // The settings property + settings CaseSettingsable + // Returns a list of sourceCollection objects associated with this case. + sourceCollections []SourceCollectionable + // The case status. Possible values are unknown, active, pendingDelete, closing, closed, and closedWithError. For details, see the following table. + status *CaseStatus + // Returns a list of tag objects associated to this case. + tags []Tagable +} +// NewCase_escaped instantiates a new case_escaped and sets the default values. +func NewCase_escaped()(*Case_escaped) { + m := &Case_escaped{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCase_escapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCase_escapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCase_escaped(), nil +} +// GetClosedBy gets the closedBy property value. The user who closed the case. +func (m *Case_escaped) GetClosedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.closedBy +} +// GetClosedDateTime gets the closedDateTime property value. The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closedDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustodians gets the custodians property value. Returns a list of case custodian objects for this case. Nullable. +func (m *Case_escaped) GetCustodians()([]Custodianable) { + return m.custodians +} +// GetDescription gets the description property value. The case description. +func (m *Case_escaped) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The case name. +func (m *Case_escaped) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. The external case number for customer reference. +func (m *Case_escaped) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Case_escaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["closedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClosedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["closedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["custodians"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustodianFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Custodianable, len(val)) + for i, v := range val { + res[i] = v.(Custodianable) + } + m.SetCustodians(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["legalHolds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLegalHoldFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LegalHoldable, len(val)) + for i, v := range val { + res[i] = v.(LegalHoldable) + } + m.SetLegalHolds(res) + } + return nil + } + res["noncustodialDataSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(NoncustodialDataSourceable) + } + m.SetNoncustodialDataSources(res) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseOperationable) + } + m.SetOperations(res) + } + return nil + } + res["reviewSets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReviewSetable, len(val)) + for i, v := range val { + res[i] = v.(ReviewSetable) + } + m.SetReviewSets(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCaseSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(CaseSettingsable)) + } + return nil + } + res["sourceCollections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSourceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SourceCollectionable, len(val)) + for i, v := range val { + res[i] = v.(SourceCollectionable) + } + m.SetSourceCollections(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CaseStatus)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Tagable, len(val)) + for i, v := range val { + res[i] = v.(Tagable) + } + m.SetTags(res) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The last user who modified the entity. +func (m *Case_escaped) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The latest date and time when the case was modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLegalHolds gets the legalHolds property value. Returns a list of case legalHold objects for this case. Nullable. +func (m *Case_escaped) GetLegalHolds()([]LegalHoldable) { + return m.legalHolds +} +// GetNoncustodialDataSources gets the noncustodialDataSources property value. Returns a list of case noncustodialDataSource objects for this case. Nullable. +func (m *Case_escaped) GetNoncustodialDataSources()([]NoncustodialDataSourceable) { + return m.noncustodialDataSources +} +// GetOperations gets the operations property value. Returns a list of case operation objects for this case. Nullable. +func (m *Case_escaped) GetOperations()([]CaseOperationable) { + return m.operations +} +// GetReviewSets gets the reviewSets property value. Returns a list of reviewSet objects in the case. Read-only. Nullable. +func (m *Case_escaped) GetReviewSets()([]ReviewSetable) { + return m.reviewSets +} +// GetSettings gets the settings property value. The settings property +func (m *Case_escaped) GetSettings()(CaseSettingsable) { + return m.settings +} +// GetSourceCollections gets the sourceCollections property value. Returns a list of sourceCollection objects associated with this case. +func (m *Case_escaped) GetSourceCollections()([]SourceCollectionable) { + return m.sourceCollections +} +// GetStatus gets the status property value. The case status. Possible values are unknown, active, pendingDelete, closing, closed, and closedWithError. For details, see the following table. +func (m *Case_escaped) GetStatus()(*CaseStatus) { + return m.status +} +// GetTags gets the tags property value. Returns a list of tag objects associated to this case. +func (m *Case_escaped) GetTags()([]Tagable) { + return m.tags +} +// Serialize serializes information the current object +func (m *Case_escaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("closedBy", m.GetClosedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("closedDateTime", m.GetClosedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustodians() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustodians())) + for i, v := range m.GetCustodians() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("custodians", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetLegalHolds() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLegalHolds())) + for i, v := range m.GetLegalHolds() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("legalHolds", cast) + if err != nil { + return err + } + } + if m.GetNoncustodialDataSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNoncustodialDataSources())) + for i, v := range m.GetNoncustodialDataSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("noncustodialDataSources", cast) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetReviewSets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewSets())) + for i, v := range m.GetReviewSets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewSets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetSourceCollections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSourceCollections())) + for i, v := range m.GetSourceCollections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sourceCollections", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTags())) + for i, v := range m.GetTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tags", cast) + if err != nil { + return err + } + } + return nil +} +// SetClosedBy sets the closedBy property value. The user who closed the case. +func (m *Case_escaped) SetClosedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.closedBy = value +} +// SetClosedDateTime sets the closedDateTime property value. The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closedDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the entity was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustodians sets the custodians property value. Returns a list of case custodian objects for this case. Nullable. +func (m *Case_escaped) SetCustodians(value []Custodianable)() { + m.custodians = value +} +// SetDescription sets the description property value. The case description. +func (m *Case_escaped) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The case name. +func (m *Case_escaped) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. The external case number for customer reference. +func (m *Case_escaped) SetExternalId(value *string)() { + m.externalId = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The last user who modified the entity. +func (m *Case_escaped) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The latest date and time when the case was modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Case_escaped) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLegalHolds sets the legalHolds property value. Returns a list of case legalHold objects for this case. Nullable. +func (m *Case_escaped) SetLegalHolds(value []LegalHoldable)() { + m.legalHolds = value +} +// SetNoncustodialDataSources sets the noncustodialDataSources property value. Returns a list of case noncustodialDataSource objects for this case. Nullable. +func (m *Case_escaped) SetNoncustodialDataSources(value []NoncustodialDataSourceable)() { + m.noncustodialDataSources = value +} +// SetOperations sets the operations property value. Returns a list of case operation objects for this case. Nullable. +func (m *Case_escaped) SetOperations(value []CaseOperationable)() { + m.operations = value +} +// SetReviewSets sets the reviewSets property value. Returns a list of reviewSet objects in the case. Read-only. Nullable. +func (m *Case_escaped) SetReviewSets(value []ReviewSetable)() { + m.reviewSets = value +} +// SetSettings sets the settings property value. The settings property +func (m *Case_escaped) SetSettings(value CaseSettingsable)() { + m.settings = value +} +// SetSourceCollections sets the sourceCollections property value. Returns a list of sourceCollection objects associated with this case. +func (m *Case_escaped) SetSourceCollections(value []SourceCollectionable)() { + m.sourceCollections = value +} +// SetStatus sets the status property value. The case status. Possible values are unknown, active, pendingDelete, closing, closed, and closedWithError. For details, see the following table. +func (m *Case_escaped) SetStatus(value *CaseStatus)() { + m.status = value +} +// SetTags sets the tags property value. Returns a list of tag objects associated to this case. +func (m *Case_escaped) SetTags(value []Tagable)() { + m.tags = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_escapedable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_escapedable.go new file mode 100644 index 000000000..0025b9582 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_escapedable.go @@ -0,0 +1,47 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Case_escapedable +type Case_escapedable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustodians()([]Custodianable) + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalId()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLegalHolds()([]LegalHoldable) + GetNoncustodialDataSources()([]NoncustodialDataSourceable) + GetOperations()([]CaseOperationable) + GetReviewSets()([]ReviewSetable) + GetSettings()(CaseSettingsable) + GetSourceCollections()([]SourceCollectionable) + GetStatus()(*CaseStatus) + GetTags()([]Tagable) + SetClosedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustodians(value []Custodianable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLegalHolds(value []LegalHoldable)() + SetNoncustodialDataSources(value []NoncustodialDataSourceable)() + SetOperations(value []CaseOperationable)() + SetReviewSets(value []ReviewSetable)() + SetSettings(value CaseSettingsable)() + SetSourceCollections(value []SourceCollectionable)() + SetStatus(value *CaseStatus)() + SetTags(value []Tagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation.go new file mode 100644 index 000000000..3c4231a6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation.go @@ -0,0 +1,244 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseExportOperation +type CaseExportOperation struct { + CaseOperation + // The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. + azureBlobContainer *string + // The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. + azureBlobToken *string + // The description provided for the export. + description *string + // The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. + exportOptions *ExportOptions + // The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. + exportStructure *ExportFileStructure + // The outputFolderId property + outputFolderId *string + // The name provided for the export. + outputName *string + // The review set the content is being exported from. + reviewSet ReviewSetable +} +// NewCaseExportOperation instantiates a new CaseExportOperation and sets the default values. +func NewCaseExportOperation()(*CaseExportOperation) { + m := &CaseExportOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateCaseExportOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseExportOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseExportOperation(), nil +} +// GetAzureBlobContainer gets the azureBlobContainer property value. The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. +func (m *CaseExportOperation) GetAzureBlobContainer()(*string) { + return m.azureBlobContainer +} +// GetAzureBlobToken gets the azureBlobToken property value. The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. +func (m *CaseExportOperation) GetAzureBlobToken()(*string) { + return m.azureBlobToken +} +// GetDescription gets the description property value. The description provided for the export. +func (m *CaseExportOperation) GetDescription()(*string) { + return m.description +} +// GetExportOptions gets the exportOptions property value. The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. +func (m *CaseExportOperation) GetExportOptions()(*ExportOptions) { + return m.exportOptions +} +// GetExportStructure gets the exportStructure property value. The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. +func (m *CaseExportOperation) GetExportStructure()(*ExportFileStructure) { + return m.exportStructure +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseExportOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["azureBlobContainer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureBlobContainer(val) + } + return nil + } + res["azureBlobToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureBlobToken(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["exportOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExportOptions) + if err != nil { + return err + } + if val != nil { + m.SetExportOptions(val.(*ExportOptions)) + } + return nil + } + res["exportStructure"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExportFileStructure) + if err != nil { + return err + } + if val != nil { + m.SetExportStructure(val.(*ExportFileStructure)) + } + return nil + } + res["outputFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputFolderId(val) + } + return nil + } + res["outputName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputName(val) + } + return nil + } + res["reviewSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewSet(val.(ReviewSetable)) + } + return nil + } + return res +} +// GetOutputFolderId gets the outputFolderId property value. The outputFolderId property +func (m *CaseExportOperation) GetOutputFolderId()(*string) { + return m.outputFolderId +} +// GetOutputName gets the outputName property value. The name provided for the export. +func (m *CaseExportOperation) GetOutputName()(*string) { + return m.outputName +} +// GetReviewSet gets the reviewSet property value. The review set the content is being exported from. +func (m *CaseExportOperation) GetReviewSet()(ReviewSetable) { + return m.reviewSet +} +// Serialize serializes information the current object +func (m *CaseExportOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureBlobContainer", m.GetAzureBlobContainer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureBlobToken", m.GetAzureBlobToken()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetExportOptions() != nil { + cast := (*m.GetExportOptions()).String() + err = writer.WriteStringValue("exportOptions", &cast) + if err != nil { + return err + } + } + if m.GetExportStructure() != nil { + cast := (*m.GetExportStructure()).String() + err = writer.WriteStringValue("exportStructure", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outputFolderId", m.GetOutputFolderId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outputName", m.GetOutputName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewSet", m.GetReviewSet()) + if err != nil { + return err + } + } + return nil +} +// SetAzureBlobContainer sets the azureBlobContainer property value. The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. +func (m *CaseExportOperation) SetAzureBlobContainer(value *string)() { + m.azureBlobContainer = value +} +// SetAzureBlobToken sets the azureBlobToken property value. The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. +func (m *CaseExportOperation) SetAzureBlobToken(value *string)() { + m.azureBlobToken = value +} +// SetDescription sets the description property value. The description provided for the export. +func (m *CaseExportOperation) SetDescription(value *string)() { + m.description = value +} +// SetExportOptions sets the exportOptions property value. The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. +func (m *CaseExportOperation) SetExportOptions(value *ExportOptions)() { + m.exportOptions = value +} +// SetExportStructure sets the exportStructure property value. The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. +func (m *CaseExportOperation) SetExportStructure(value *ExportFileStructure)() { + m.exportStructure = value +} +// SetOutputFolderId sets the outputFolderId property value. The outputFolderId property +func (m *CaseExportOperation) SetOutputFolderId(value *string)() { + m.outputFolderId = value +} +// SetOutputName sets the outputName property value. The name provided for the export. +func (m *CaseExportOperation) SetOutputName(value *string)() { + m.outputName = value +} +// SetReviewSet sets the reviewSet property value. The review set the content is being exported from. +func (m *CaseExportOperation) SetReviewSet(value ReviewSetable)() { + m.reviewSet = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_response.go new file mode 100644 index 000000000..bc1b75a63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseExportOperationCollectionResponse +type CaseExportOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CaseExportOperationable +} +// NewCaseExportOperationCollectionResponse instantiates a new CaseExportOperationCollectionResponse and sets the default values. +func NewCaseExportOperationCollectionResponse()(*CaseExportOperationCollectionResponse) { + m := &CaseExportOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseExportOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseExportOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseExportOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseExportOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseExportOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseExportOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseExportOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseExportOperationCollectionResponse) GetValue()([]CaseExportOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseExportOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseExportOperationCollectionResponse) SetValue(value []CaseExportOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_responseable.go new file mode 100644 index 000000000..d2b06fd77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseExportOperationCollectionResponseable +type CaseExportOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseExportOperationable) + SetValue(value []CaseExportOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operationable.go new file mode 100644 index 000000000..65ab1774c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_export_operationable.go @@ -0,0 +1,27 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseExportOperationable +type CaseExportOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureBlobContainer()(*string) + GetAzureBlobToken()(*string) + GetDescription()(*string) + GetExportOptions()(*ExportOptions) + GetExportStructure()(*ExportFileStructure) + GetOutputFolderId()(*string) + GetOutputName()(*string) + GetReviewSet()(ReviewSetable) + SetAzureBlobContainer(value *string)() + SetAzureBlobToken(value *string)() + SetDescription(value *string)() + SetExportOptions(value *ExportOptions)() + SetExportStructure(value *ExportFileStructure)() + SetOutputFolderId(value *string)() + SetOutputName(value *string)() + SetReviewSet(value ReviewSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation.go new file mode 100644 index 000000000..7834a780a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation.go @@ -0,0 +1,34 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseHoldOperation +type CaseHoldOperation struct { + CaseOperation +} +// NewCaseHoldOperation instantiates a new CaseHoldOperation and sets the default values. +func NewCaseHoldOperation()(*CaseHoldOperation) { + m := &CaseHoldOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateCaseHoldOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseHoldOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseHoldOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseHoldOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CaseHoldOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_response.go new file mode 100644 index 000000000..6ec676df5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseHoldOperationCollectionResponse +type CaseHoldOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CaseHoldOperationable +} +// NewCaseHoldOperationCollectionResponse instantiates a new CaseHoldOperationCollectionResponse and sets the default values. +func NewCaseHoldOperationCollectionResponse()(*CaseHoldOperationCollectionResponse) { + m := &CaseHoldOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseHoldOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseHoldOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseHoldOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseHoldOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseHoldOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseHoldOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseHoldOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseHoldOperationCollectionResponse) GetValue()([]CaseHoldOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseHoldOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseHoldOperationCollectionResponse) SetValue(value []CaseHoldOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_responseable.go new file mode 100644 index 000000000..650111480 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseHoldOperationCollectionResponseable +type CaseHoldOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseHoldOperationable) + SetValue(value []CaseHoldOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operationable.go new file mode 100644 index 000000000..44e8248ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_hold_operationable.go @@ -0,0 +1,11 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseHoldOperationable +type CaseHoldOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation.go new file mode 100644 index 000000000..080de13a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation.go @@ -0,0 +1,34 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseIndexOperation +type CaseIndexOperation struct { + CaseOperation +} +// NewCaseIndexOperation instantiates a new CaseIndexOperation and sets the default values. +func NewCaseIndexOperation()(*CaseIndexOperation) { + m := &CaseIndexOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateCaseIndexOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseIndexOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseIndexOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseIndexOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CaseIndexOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_response.go new file mode 100644 index 000000000..7f02e6d34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseIndexOperationCollectionResponse +type CaseIndexOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CaseIndexOperationable +} +// NewCaseIndexOperationCollectionResponse instantiates a new CaseIndexOperationCollectionResponse and sets the default values. +func NewCaseIndexOperationCollectionResponse()(*CaseIndexOperationCollectionResponse) { + m := &CaseIndexOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseIndexOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseIndexOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseIndexOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseIndexOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseIndexOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseIndexOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseIndexOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseIndexOperationCollectionResponse) GetValue()([]CaseIndexOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseIndexOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseIndexOperationCollectionResponse) SetValue(value []CaseIndexOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_responseable.go new file mode 100644 index 000000000..758fb7794 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseIndexOperationCollectionResponseable +type CaseIndexOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseIndexOperationable) + SetValue(value []CaseIndexOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operationable.go new file mode 100644 index 000000000..b7c93745d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_index_operationable.go @@ -0,0 +1,11 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CaseIndexOperationable +type CaseIndexOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation.go new file mode 100644 index 000000000..b842904fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation.go @@ -0,0 +1,250 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperation +type CaseOperation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData + action *CaseAction + // The date and time the operation was completed. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user that created the operation. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the operation was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The progress of the operation. + percentProgress *int32 + // Contains success and failure-specific result information. + resultInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable + // The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. + status *CaseOperationStatus +} +// NewCaseOperation instantiates a new caseOperation and sets the default values. +func NewCaseOperation()(*CaseOperation) { + m := &CaseOperation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCaseOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.ediscovery.addToReviewSetOperation": + return NewAddToReviewSetOperation(), nil + case "#microsoft.graph.ediscovery.caseExportOperation": + return NewCaseExportOperation(), nil + case "#microsoft.graph.ediscovery.caseHoldOperation": + return NewCaseHoldOperation(), nil + case "#microsoft.graph.ediscovery.caseIndexOperation": + return NewCaseIndexOperation(), nil + case "#microsoft.graph.ediscovery.estimateStatisticsOperation": + return NewEstimateStatisticsOperation(), nil + case "#microsoft.graph.ediscovery.purgeDataOperation": + return NewPurgeDataOperation(), nil + case "#microsoft.graph.ediscovery.tagOperation": + return NewTagOperation(), nil + } + } + } + } + return NewCaseOperation(), nil +} +// GetAction gets the action property value. The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData +func (m *CaseOperation) GetAction()(*CaseAction) { + return m.action +} +// GetCompletedDateTime gets the completedDateTime property value. The date and time the operation was completed. +func (m *CaseOperation) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCreatedBy gets the createdBy property value. The user that created the operation. +func (m *CaseOperation) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the operation was created. +func (m *CaseOperation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*CaseAction)) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["percentProgress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentProgress(val) + } + return nil + } + res["resultInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateResultInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CaseOperationStatus)) + } + return nil + } + return res +} +// GetPercentProgress gets the percentProgress property value. The progress of the operation. +func (m *CaseOperation) GetPercentProgress()(*int32) { + return m.percentProgress +} +// GetResultInfo gets the resultInfo property value. Contains success and failure-specific result information. +func (m *CaseOperation) GetResultInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable) { + return m.resultInfo +} +// GetStatus gets the status property value. The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. +func (m *CaseOperation) GetStatus()(*CaseOperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CaseOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("percentProgress", m.GetPercentProgress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resultInfo", m.GetResultInfo()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData +func (m *CaseOperation) SetAction(value *CaseAction)() { + m.action = value +} +// SetCompletedDateTime sets the completedDateTime property value. The date and time the operation was completed. +func (m *CaseOperation) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCreatedBy sets the createdBy property value. The user that created the operation. +func (m *CaseOperation) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the operation was created. +func (m *CaseOperation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetPercentProgress sets the percentProgress property value. The progress of the operation. +func (m *CaseOperation) SetPercentProgress(value *int32)() { + m.percentProgress = value +} +// SetResultInfo sets the resultInfo property value. Contains success and failure-specific result information. +func (m *CaseOperation) SetResultInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)() { + m.resultInfo = value +} +// SetStatus sets the status property value. The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. +func (m *CaseOperation) SetStatus(value *CaseOperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_response.go new file mode 100644 index 000000000..2cd87f089 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationCollectionResponse +type CaseOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CaseOperationable +} +// NewCaseOperationCollectionResponse instantiates a new CaseOperationCollectionResponse and sets the default values. +func NewCaseOperationCollectionResponse()(*CaseOperationCollectionResponse) { + m := &CaseOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseOperationCollectionResponse) GetValue()([]CaseOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseOperationCollectionResponse) SetValue(value []CaseOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_responseable.go new file mode 100644 index 000000000..7b1c7652f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationCollectionResponseable +type CaseOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseOperationable) + SetValue(value []CaseOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_status.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_status.go new file mode 100644 index 000000000..c5e2e99d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_operation_status.go @@ -0,0 +1,46 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseOperationStatus int + +const ( + NOTSTARTED_CASEOPERATIONSTATUS CaseOperationStatus = iota + SUBMISSIONFAILED_CASEOPERATIONSTATUS + RUNNING_CASEOPERATIONSTATUS + SUCCEEDED_CASEOPERATIONSTATUS + PARTIALLYSUCCEEDED_CASEOPERATIONSTATUS + FAILED_CASEOPERATIONSTATUS +) + +func (i CaseOperationStatus) String() string { + return []string{"notStarted", "submissionFailed", "running", "succeeded", "partiallySucceeded", "failed"}[i] +} +func ParseCaseOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_CASEOPERATIONSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_CASEOPERATIONSTATUS + case "submissionFailed": + result = SUBMISSIONFAILED_CASEOPERATIONSTATUS + case "running": + result = RUNNING_CASEOPERATIONSTATUS + case "succeeded": + result = SUCCEEDED_CASEOPERATIONSTATUS + case "partiallySucceeded": + result = PARTIALLYSUCCEEDED_CASEOPERATIONSTATUS + case "failed": + result = FAILED_CASEOPERATIONSTATUS + default: + return 0, errors.New("Unknown CaseOperationStatus value: " + v) + } + return &result, nil +} +func SerializeCaseOperationStatus(values []CaseOperationStatus) []string { + 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/ediscovery/case_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_operationable.go new file mode 100644 index 000000000..62092b499 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_operationable.go @@ -0,0 +1,27 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationable +type CaseOperationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*CaseAction) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPercentProgress()(*int32) + GetResultInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable) + GetStatus()(*CaseOperationStatus) + SetAction(value *CaseAction)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPercentProgress(value *int32)() + SetResultInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)() + SetStatus(value *CaseOperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_settings.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_settings.go new file mode 100644 index 000000000..43110fbc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_settings.go @@ -0,0 +1,113 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseSettings +type CaseSettings struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The OCR (Optical Character Recognition) settings for the case. + ocr OcrSettingsable + // The redundancy (near duplicate and email threading) detection settings for the case. + redundancyDetection RedundancyDetectionSettingsable + // The Topic Modeling (Themes) settings for the case. + topicModeling TopicModelingSettingsable +} +// NewCaseSettings instantiates a new caseSettings and sets the default values. +func NewCaseSettings()(*CaseSettings) { + m := &CaseSettings{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCaseSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ocr"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOcrSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOcr(val.(OcrSettingsable)) + } + return nil + } + res["redundancyDetection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRedundancyDetectionSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRedundancyDetection(val.(RedundancyDetectionSettingsable)) + } + return nil + } + res["topicModeling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTopicModelingSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTopicModeling(val.(TopicModelingSettingsable)) + } + return nil + } + return res +} +// GetOcr gets the ocr property value. The OCR (Optical Character Recognition) settings for the case. +func (m *CaseSettings) GetOcr()(OcrSettingsable) { + return m.ocr +} +// GetRedundancyDetection gets the redundancyDetection property value. The redundancy (near duplicate and email threading) detection settings for the case. +func (m *CaseSettings) GetRedundancyDetection()(RedundancyDetectionSettingsable) { + return m.redundancyDetection +} +// GetTopicModeling gets the topicModeling property value. The Topic Modeling (Themes) settings for the case. +func (m *CaseSettings) GetTopicModeling()(TopicModelingSettingsable) { + return m.topicModeling +} +// Serialize serializes information the current object +func (m *CaseSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("ocr", m.GetOcr()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("redundancyDetection", m.GetRedundancyDetection()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("topicModeling", m.GetTopicModeling()) + if err != nil { + return err + } + } + return nil +} +// SetOcr sets the ocr property value. The OCR (Optical Character Recognition) settings for the case. +func (m *CaseSettings) SetOcr(value OcrSettingsable)() { + m.ocr = value +} +// SetRedundancyDetection sets the redundancyDetection property value. The redundancy (near duplicate and email threading) detection settings for the case. +func (m *CaseSettings) SetRedundancyDetection(value RedundancyDetectionSettingsable)() { + m.redundancyDetection = value +} +// SetTopicModeling sets the topicModeling property value. The Topic Modeling (Themes) settings for the case. +func (m *CaseSettings) SetTopicModeling(value TopicModelingSettingsable)() { + m.topicModeling = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_settingsable.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_settingsable.go new file mode 100644 index 000000000..0b87a7ce1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_settingsable.go @@ -0,0 +1,18 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseSettingsable +type CaseSettingsable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOcr()(OcrSettingsable) + GetRedundancyDetection()(RedundancyDetectionSettingsable) + GetTopicModeling()(TopicModelingSettingsable) + SetOcr(value OcrSettingsable)() + SetRedundancyDetection(value RedundancyDetectionSettingsable)() + SetTopicModeling(value TopicModelingSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/case_status.go b/src/internal/connector/graph/betasdk/models/ediscovery/case_status.go new file mode 100644 index 000000000..3d9420dc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/case_status.go @@ -0,0 +1,46 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseStatus int + +const ( + UNKNOWN_CASESTATUS CaseStatus = iota + ACTIVE_CASESTATUS + PENDINGDELETE_CASESTATUS + CLOSING_CASESTATUS + CLOSED_CASESTATUS + CLOSEDWITHERROR_CASESTATUS +) + +func (i CaseStatus) String() string { + return []string{"unknown", "active", "pendingDelete", "closing", "closed", "closedWithError"}[i] +} +func ParseCaseStatus(v string) (interface{}, error) { + result := UNKNOWN_CASESTATUS + switch v { + case "unknown": + result = UNKNOWN_CASESTATUS + case "active": + result = ACTIVE_CASESTATUS + case "pendingDelete": + result = PENDINGDELETE_CASESTATUS + case "closing": + result = CLOSING_CASESTATUS + case "closed": + result = CLOSED_CASESTATUS + case "closedWithError": + result = CLOSEDWITHERROR_CASESTATUS + default: + return 0, errors.New("Unknown CaseStatus value: " + v) + } + return &result, nil +} +func SerializeCaseStatus(values []CaseStatus) []string { + 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/ediscovery/child_selectability.go b/src/internal/connector/graph/betasdk/models/ediscovery/child_selectability.go new file mode 100644 index 000000000..a2fd8752b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/child_selectability.go @@ -0,0 +1,34 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChildSelectability int + +const ( + ONE_CHILDSELECTABILITY ChildSelectability = iota + MANY_CHILDSELECTABILITY +) + +func (i ChildSelectability) String() string { + return []string{"One", "Many"}[i] +} +func ParseChildSelectability(v string) (interface{}, error) { + result := ONE_CHILDSELECTABILITY + switch v { + case "One": + result = ONE_CHILDSELECTABILITY + case "Many": + result = MANY_CHILDSELECTABILITY + default: + return 0, errors.New("Unknown ChildSelectability value: " + v) + } + return &result, nil +} +func SerializeChildSelectability(values []ChildSelectability) []string { + 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/ediscovery/custodian.go b/src/internal/connector/graph/betasdk/models/ediscovery/custodian.go new file mode 100644 index 000000000..04536b47f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/custodian.go @@ -0,0 +1,217 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Custodian +type Custodian struct { + DataSourceContainer + // Date and time the custodian acknowledged a hold notification. + acknowledgedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Identifies whether a custodian's sources were placed on hold during creation. + applyHoldToSources *bool + // Email address of the custodian. + email *string + // Data source entity for SharePoint sites associated with the custodian. + siteSources []SiteSourceable + // Data source entity for groups associated with the custodian. + unifiedGroupSources []UnifiedGroupSourceable + // Data source entity for a the custodian. This is the container for a custodian's mailbox and OneDrive for Business site. + userSources []UserSourceable +} +// NewCustodian instantiates a new Custodian and sets the default values. +func NewCustodian()(*Custodian) { + m := &Custodian{ + DataSourceContainer: *NewDataSourceContainer(), + } + odataTypeValue := "#microsoft.graph.ediscovery.custodian"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustodianFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustodianFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustodian(), nil +} +// GetAcknowledgedDateTime gets the acknowledgedDateTime property value. Date and time the custodian acknowledged a hold notification. +func (m *Custodian) GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.acknowledgedDateTime +} +// GetApplyHoldToSources gets the applyHoldToSources property value. Identifies whether a custodian's sources were placed on hold during creation. +func (m *Custodian) GetApplyHoldToSources()(*bool) { + return m.applyHoldToSources +} +// GetEmail gets the email property value. Email address of the custodian. +func (m *Custodian) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Custodian) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSourceContainer.GetFieldDeserializers() + res["acknowledgedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAcknowledgedDateTime(val) + } + return nil + } + res["applyHoldToSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyHoldToSources(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["siteSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetSiteSources(res) + } + return nil + } + res["unifiedGroupSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedGroupSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedGroupSourceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedGroupSourceable) + } + m.SetUnifiedGroupSources(res) + } + return nil + } + res["userSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetUserSources(res) + } + return nil + } + return res +} +// GetSiteSources gets the siteSources property value. Data source entity for SharePoint sites associated with the custodian. +func (m *Custodian) GetSiteSources()([]SiteSourceable) { + return m.siteSources +} +// GetUnifiedGroupSources gets the unifiedGroupSources property value. Data source entity for groups associated with the custodian. +func (m *Custodian) GetUnifiedGroupSources()([]UnifiedGroupSourceable) { + return m.unifiedGroupSources +} +// GetUserSources gets the userSources property value. Data source entity for a the custodian. This is the container for a custodian's mailbox and OneDrive for Business site. +func (m *Custodian) GetUserSources()([]UserSourceable) { + return m.userSources +} +// Serialize serializes information the current object +func (m *Custodian) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSourceContainer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("acknowledgedDateTime", m.GetAcknowledgedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("applyHoldToSources", m.GetApplyHoldToSources()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + if m.GetSiteSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSiteSources())) + for i, v := range m.GetSiteSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("siteSources", cast) + if err != nil { + return err + } + } + if m.GetUnifiedGroupSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnifiedGroupSources())) + for i, v := range m.GetUnifiedGroupSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("unifiedGroupSources", cast) + if err != nil { + return err + } + } + if m.GetUserSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserSources())) + for i, v := range m.GetUserSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetAcknowledgedDateTime sets the acknowledgedDateTime property value. Date and time the custodian acknowledged a hold notification. +func (m *Custodian) SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.acknowledgedDateTime = value +} +// SetApplyHoldToSources sets the applyHoldToSources property value. Identifies whether a custodian's sources were placed on hold during creation. +func (m *Custodian) SetApplyHoldToSources(value *bool)() { + m.applyHoldToSources = value +} +// SetEmail sets the email property value. Email address of the custodian. +func (m *Custodian) SetEmail(value *string)() { + m.email = value +} +// SetSiteSources sets the siteSources property value. Data source entity for SharePoint sites associated with the custodian. +func (m *Custodian) SetSiteSources(value []SiteSourceable)() { + m.siteSources = value +} +// SetUnifiedGroupSources sets the unifiedGroupSources property value. Data source entity for groups associated with the custodian. +func (m *Custodian) SetUnifiedGroupSources(value []UnifiedGroupSourceable)() { + m.unifiedGroupSources = value +} +// SetUserSources sets the userSources property value. Data source entity for a the custodian. This is the container for a custodian's mailbox and OneDrive for Business site. +func (m *Custodian) SetUserSources(value []UserSourceable)() { + m.userSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_response.go new file mode 100644 index 000000000..f76cfca58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustodianCollectionResponse +type CustodianCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Custodianable +} +// NewCustodianCollectionResponse instantiates a new CustodianCollectionResponse and sets the default values. +func NewCustodianCollectionResponse()(*CustodianCollectionResponse) { + m := &CustodianCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustodianCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustodianCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustodianCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustodianCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustodianFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Custodianable, len(val)) + for i, v := range val { + res[i] = v.(Custodianable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustodianCollectionResponse) GetValue()([]Custodianable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustodianCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustodianCollectionResponse) SetValue(value []Custodianable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_responseable.go new file mode 100644 index 000000000..04e5f0331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/custodian_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustodianCollectionResponseable +type CustodianCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Custodianable) + SetValue(value []Custodianable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/custodianable.go b/src/internal/connector/graph/betasdk/models/ediscovery/custodianable.go new file mode 100644 index 000000000..3b3ac80a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/custodianable.go @@ -0,0 +1,24 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Custodianable +type Custodianable interface { + DataSourceContainerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetApplyHoldToSources()(*bool) + GetEmail()(*string) + GetSiteSources()([]SiteSourceable) + GetUnifiedGroupSources()([]UnifiedGroupSourceable) + GetUserSources()([]UserSourceable) + SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetApplyHoldToSources(value *bool)() + SetEmail(value *string)() + SetSiteSources(value []SiteSourceable)() + SetUnifiedGroupSources(value []UnifiedGroupSourceable)() + SetUserSources(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source.go new file mode 100644 index 000000000..780994bf1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source.go @@ -0,0 +1,163 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSource struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the dataSource. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the dataSource was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the dataSource. This will be the name of the SharePoint site. + displayName *string + // The holdStatus property + holdStatus *DataSourceHoldStatus +} +// NewDataSource instantiates a new dataSource and sets the default values. +func NewDataSource()(*DataSource) { + m := &DataSource{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDataSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.ediscovery.siteSource": + return NewSiteSource(), nil + case "#microsoft.graph.ediscovery.unifiedGroupSource": + return NewUnifiedGroupSource(), nil + case "#microsoft.graph.ediscovery.userSource": + return NewUserSource(), nil + } + } + } + } + return NewDataSource(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the dataSource. +func (m *DataSource) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the dataSource was created. +func (m *DataSource) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site. +func (m *DataSource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["holdStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceHoldStatus) + if err != nil { + return err + } + if val != nil { + m.SetHoldStatus(val.(*DataSourceHoldStatus)) + } + return nil + } + return res +} +// GetHoldStatus gets the holdStatus property value. The holdStatus property +func (m *DataSource) GetHoldStatus()(*DataSourceHoldStatus) { + return m.holdStatus +} +// Serialize serializes information the current object +func (m *DataSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHoldStatus() != nil { + cast := (*m.GetHoldStatus()).String() + err = writer.WriteStringValue("holdStatus", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the dataSource. +func (m *DataSource) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the dataSource was created. +func (m *DataSource) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site. +func (m *DataSource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHoldStatus sets the holdStatus property value. The holdStatus property +func (m *DataSource) SetHoldStatus(value *DataSourceHoldStatus)() { + m.holdStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_response.go new file mode 100644 index 000000000..c872cb623 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceCollectionResponse +type DataSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DataSourceable +} +// NewDataSourceCollectionResponse instantiates a new DataSourceCollectionResponse and sets the default values. +func NewDataSourceCollectionResponse()(*DataSourceCollectionResponse) { + m := &DataSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDataSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DataSourceCollectionResponse) GetValue()([]DataSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DataSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DataSourceCollectionResponse) SetValue(value []DataSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_responseable.go new file mode 100644 index 000000000..93cc498da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceCollectionResponseable +type DataSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DataSourceable) + SetValue(value []DataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container.go new file mode 100644 index 000000000..44a366935 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container.go @@ -0,0 +1,240 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceContainer provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceContainer struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Created date and time of the dataSourceContainer entity. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Display name of the dataSourceContainer entity. + displayName *string + // The holdStatus property + holdStatus *DataSourceHoldStatus + // The lastIndexOperation property + lastIndexOperation CaseIndexOperationable + // Last modified date and time of the dataSourceContainer. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date and time that the dataSourceContainer was released from the case. + releasedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Latest status of the dataSourceContainer. Possible values are: Active, Released. + status *DataSourceContainerStatus +} +// NewDataSourceContainer instantiates a new dataSourceContainer and sets the default values. +func NewDataSourceContainer()(*DataSourceContainer) { + m := &DataSourceContainer{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDataSourceContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.ediscovery.custodian": + return NewCustodian(), nil + case "#microsoft.graph.ediscovery.noncustodialDataSource": + return NewNoncustodialDataSource(), nil + } + } + } + } + return NewDataSourceContainer(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Created date and time of the dataSourceContainer entity. +func (m *DataSourceContainer) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Display name of the dataSourceContainer entity. +func (m *DataSourceContainer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSourceContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["holdStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceHoldStatus) + if err != nil { + return err + } + if val != nil { + m.SetHoldStatus(val.(*DataSourceHoldStatus)) + } + return nil + } + res["lastIndexOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCaseIndexOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastIndexOperation(val.(CaseIndexOperationable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["releasedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceContainerStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DataSourceContainerStatus)) + } + return nil + } + return res +} +// GetHoldStatus gets the holdStatus property value. The holdStatus property +func (m *DataSourceContainer) GetHoldStatus()(*DataSourceHoldStatus) { + return m.holdStatus +} +// GetLastIndexOperation gets the lastIndexOperation property value. The lastIndexOperation property +func (m *DataSourceContainer) GetLastIndexOperation()(CaseIndexOperationable) { + return m.lastIndexOperation +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified date and time of the dataSourceContainer. +func (m *DataSourceContainer) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetReleasedDateTime gets the releasedDateTime property value. Date and time that the dataSourceContainer was released from the case. +func (m *DataSourceContainer) GetReleasedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releasedDateTime +} +// GetStatus gets the status property value. Latest status of the dataSourceContainer. Possible values are: Active, Released. +func (m *DataSourceContainer) GetStatus()(*DataSourceContainerStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DataSourceContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHoldStatus() != nil { + cast := (*m.GetHoldStatus()).String() + err = writer.WriteStringValue("holdStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastIndexOperation", m.GetLastIndexOperation()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("releasedDateTime", m.GetReleasedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Created date and time of the dataSourceContainer entity. +func (m *DataSourceContainer) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Display name of the dataSourceContainer entity. +func (m *DataSourceContainer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHoldStatus sets the holdStatus property value. The holdStatus property +func (m *DataSourceContainer) SetHoldStatus(value *DataSourceHoldStatus)() { + m.holdStatus = value +} +// SetLastIndexOperation sets the lastIndexOperation property value. The lastIndexOperation property +func (m *DataSourceContainer) SetLastIndexOperation(value CaseIndexOperationable)() { + m.lastIndexOperation = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified date and time of the dataSourceContainer. +func (m *DataSourceContainer) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetReleasedDateTime sets the releasedDateTime property value. Date and time that the dataSourceContainer was released from the case. +func (m *DataSourceContainer) SetReleasedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releasedDateTime = value +} +// SetStatus sets the status property value. Latest status of the dataSourceContainer. Possible values are: Active, Released. +func (m *DataSourceContainer) SetStatus(value *DataSourceContainerStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container_status.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container_status.go new file mode 100644 index 000000000..b20049088 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_container_status.go @@ -0,0 +1,37 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceContainerStatus int + +const ( + ACTIVE_DATASOURCECONTAINERSTATUS DataSourceContainerStatus = iota + RELEASED_DATASOURCECONTAINERSTATUS + UNKNOWNFUTUREVALUE_DATASOURCECONTAINERSTATUS +) + +func (i DataSourceContainerStatus) String() string { + return []string{"Active", "Released", "UnknownFutureValue"}[i] +} +func ParseDataSourceContainerStatus(v string) (interface{}, error) { + result := ACTIVE_DATASOURCECONTAINERSTATUS + switch v { + case "Active": + result = ACTIVE_DATASOURCECONTAINERSTATUS + case "Released": + result = RELEASED_DATASOURCECONTAINERSTATUS + case "UnknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCECONTAINERSTATUS + default: + return 0, errors.New("Unknown DataSourceContainerStatus value: " + v) + } + return &result, nil +} +func SerializeDataSourceContainerStatus(values []DataSourceContainerStatus) []string { + 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/ediscovery/data_source_containerable.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_containerable.go new file mode 100644 index 000000000..2abc849b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_containerable.go @@ -0,0 +1,27 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceContainerable +type DataSourceContainerable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHoldStatus()(*DataSourceHoldStatus) + GetLastIndexOperation()(CaseIndexOperationable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*DataSourceContainerStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHoldStatus(value *DataSourceHoldStatus)() + SetLastIndexOperation(value CaseIndexOperationable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *DataSourceContainerStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/data_source_hold_status.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_hold_status.go new file mode 100644 index 000000000..73f68b344 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_hold_status.go @@ -0,0 +1,46 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceHoldStatus int + +const ( + NOTAPPLIED_DATASOURCEHOLDSTATUS DataSourceHoldStatus = iota + APPLIED_DATASOURCEHOLDSTATUS + APPLYING_DATASOURCEHOLDSTATUS + REMOVING_DATASOURCEHOLDSTATUS + PARTIAL_DATASOURCEHOLDSTATUS + UNKNOWNFUTUREVALUE_DATASOURCEHOLDSTATUS +) + +func (i DataSourceHoldStatus) String() string { + return []string{"notApplied", "applied", "applying", "removing", "partial", "unknownFutureValue"}[i] +} +func ParseDataSourceHoldStatus(v string) (interface{}, error) { + result := NOTAPPLIED_DATASOURCEHOLDSTATUS + switch v { + case "notApplied": + result = NOTAPPLIED_DATASOURCEHOLDSTATUS + case "applied": + result = APPLIED_DATASOURCEHOLDSTATUS + case "applying": + result = APPLYING_DATASOURCEHOLDSTATUS + case "removing": + result = REMOVING_DATASOURCEHOLDSTATUS + case "partial": + result = PARTIAL_DATASOURCEHOLDSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCEHOLDSTATUS + default: + return 0, errors.New("Unknown DataSourceHoldStatus value: " + v) + } + return &result, nil +} +func SerializeDataSourceHoldStatus(values []DataSourceHoldStatus) []string { + 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/ediscovery/data_source_scopes.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_scopes.go new file mode 100644 index 000000000..31a30add7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_source_scopes.go @@ -0,0 +1,46 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceScopes int + +const ( + NONE_DATASOURCESCOPES DataSourceScopes = iota + ALLTENANTMAILBOXES_DATASOURCESCOPES + ALLTENANTSITES_DATASOURCESCOPES + ALLCASECUSTODIANS_DATASOURCESCOPES + ALLCASENONCUSTODIALDATASOURCES_DATASOURCESCOPES + UNKNOWNFUTUREVALUE_DATASOURCESCOPES +) + +func (i DataSourceScopes) String() string { + return []string{"none", "allTenantMailboxes", "allTenantSites", "allCaseCustodians", "allCaseNoncustodialDataSources", "unknownFutureValue"}[i] +} +func ParseDataSourceScopes(v string) (interface{}, error) { + result := NONE_DATASOURCESCOPES + switch v { + case "none": + result = NONE_DATASOURCESCOPES + case "allTenantMailboxes": + result = ALLTENANTMAILBOXES_DATASOURCESCOPES + case "allTenantSites": + result = ALLTENANTSITES_DATASOURCESCOPES + case "allCaseCustodians": + result = ALLCASECUSTODIANS_DATASOURCESCOPES + case "allCaseNoncustodialDataSources": + result = ALLCASENONCUSTODIALDATASOURCES_DATASOURCESCOPES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCESCOPES + default: + return 0, errors.New("Unknown DataSourceScopes value: " + v) + } + return &result, nil +} +func SerializeDataSourceScopes(values []DataSourceScopes) []string { + 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/ediscovery/data_sourceable.go b/src/internal/connector/graph/betasdk/models/ediscovery/data_sourceable.go new file mode 100644 index 000000000..4ae6bb953 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/data_sourceable.go @@ -0,0 +1,21 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceable +type DataSourceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHoldStatus()(*DataSourceHoldStatus) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHoldStatus(value *DataSourceHoldStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryroot.go b/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryroot.go new file mode 100644 index 000000000..efd57e4dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryroot.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Ediscoveryroot +type Ediscoveryroot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The cases property + cases []Case_escapedable +} +// NewEdiscoveryroot instantiates a new Ediscoveryroot and sets the default values. +func NewEdiscoveryroot()(*Ediscoveryroot) { + m := &Ediscoveryroot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateEdiscoveryrootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryrootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryroot(), nil +} +// GetCases gets the cases property value. The cases property +func (m *Ediscoveryroot) GetCases()([]Case_escapedable) { + return m.cases +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Ediscoveryroot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["cases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCase_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Case_escapedable, len(val)) + for i, v := range val { + res[i] = v.(Case_escapedable) + } + m.SetCases(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Ediscoveryroot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCases() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCases())) + for i, v := range m.GetCases() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cases", cast) + if err != nil { + return err + } + } + return nil +} +// SetCases sets the cases property value. The cases property +func (m *Ediscoveryroot) SetCases(value []Case_escapedable)() { + m.cases = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryrootable.go b/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryrootable.go new file mode 100644 index 000000000..fe18b99a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/ediscoveryrootable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Ediscoveryrootable +type Ediscoveryrootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCases()([]Case_escapedable) + SetCases(value []Case_escapedable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation.go new file mode 100644 index 000000000..2b4240bee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation.go @@ -0,0 +1,216 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EstimateStatisticsOperation +type EstimateStatisticsOperation struct { + CaseOperation + // The estimated count of items for the sourceCollection that matched the content query. + indexedItemCount *int64 + // The estimated size of items for the sourceCollection that matched the content query. + indexedItemsSize *int64 + // The number of mailboxes that had search hits. + mailboxCount *int32 + // The number of mailboxes that had search hits. + siteCount *int32 + // eDiscovery collection, commonly known as a search. + sourceCollection SourceCollectionable + // The estimated count of unindexed items for the collection. + unindexedItemCount *int64 + // The estimated size of unindexed items for the collection. + unindexedItemsSize *int64 +} +// NewEstimateStatisticsOperation instantiates a new estimateStatisticsOperation and sets the default values. +func NewEstimateStatisticsOperation()(*EstimateStatisticsOperation) { + m := &EstimateStatisticsOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEstimateStatisticsOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEstimateStatisticsOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEstimateStatisticsOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EstimateStatisticsOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["indexedItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIndexedItemCount(val) + } + return nil + } + res["indexedItemsSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIndexedItemsSize(val) + } + return nil + } + res["mailboxCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMailboxCount(val) + } + return nil + } + res["siteCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSiteCount(val) + } + return nil + } + res["sourceCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSourceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceCollection(val.(SourceCollectionable)) + } + return nil + } + res["unindexedItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnindexedItemCount(val) + } + return nil + } + res["unindexedItemsSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnindexedItemsSize(val) + } + return nil + } + return res +} +// GetIndexedItemCount gets the indexedItemCount property value. The estimated count of items for the sourceCollection that matched the content query. +func (m *EstimateStatisticsOperation) GetIndexedItemCount()(*int64) { + return m.indexedItemCount +} +// GetIndexedItemsSize gets the indexedItemsSize property value. The estimated size of items for the sourceCollection that matched the content query. +func (m *EstimateStatisticsOperation) GetIndexedItemsSize()(*int64) { + return m.indexedItemsSize +} +// GetMailboxCount gets the mailboxCount property value. The number of mailboxes that had search hits. +func (m *EstimateStatisticsOperation) GetMailboxCount()(*int32) { + return m.mailboxCount +} +// GetSiteCount gets the siteCount property value. The number of mailboxes that had search hits. +func (m *EstimateStatisticsOperation) GetSiteCount()(*int32) { + return m.siteCount +} +// GetSourceCollection gets the sourceCollection property value. eDiscovery collection, commonly known as a search. +func (m *EstimateStatisticsOperation) GetSourceCollection()(SourceCollectionable) { + return m.sourceCollection +} +// GetUnindexedItemCount gets the unindexedItemCount property value. The estimated count of unindexed items for the collection. +func (m *EstimateStatisticsOperation) GetUnindexedItemCount()(*int64) { + return m.unindexedItemCount +} +// GetUnindexedItemsSize gets the unindexedItemsSize property value. The estimated size of unindexed items for the collection. +func (m *EstimateStatisticsOperation) GetUnindexedItemsSize()(*int64) { + return m.unindexedItemsSize +} +// Serialize serializes information the current object +func (m *EstimateStatisticsOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("indexedItemCount", m.GetIndexedItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("indexedItemsSize", m.GetIndexedItemsSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mailboxCount", m.GetMailboxCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("siteCount", m.GetSiteCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceCollection", m.GetSourceCollection()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("unindexedItemCount", m.GetUnindexedItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("unindexedItemsSize", m.GetUnindexedItemsSize()) + if err != nil { + return err + } + } + return nil +} +// SetIndexedItemCount sets the indexedItemCount property value. The estimated count of items for the sourceCollection that matched the content query. +func (m *EstimateStatisticsOperation) SetIndexedItemCount(value *int64)() { + m.indexedItemCount = value +} +// SetIndexedItemsSize sets the indexedItemsSize property value. The estimated size of items for the sourceCollection that matched the content query. +func (m *EstimateStatisticsOperation) SetIndexedItemsSize(value *int64)() { + m.indexedItemsSize = value +} +// SetMailboxCount sets the mailboxCount property value. The number of mailboxes that had search hits. +func (m *EstimateStatisticsOperation) SetMailboxCount(value *int32)() { + m.mailboxCount = value +} +// SetSiteCount sets the siteCount property value. The number of mailboxes that had search hits. +func (m *EstimateStatisticsOperation) SetSiteCount(value *int32)() { + m.siteCount = value +} +// SetSourceCollection sets the sourceCollection property value. eDiscovery collection, commonly known as a search. +func (m *EstimateStatisticsOperation) SetSourceCollection(value SourceCollectionable)() { + m.sourceCollection = value +} +// SetUnindexedItemCount sets the unindexedItemCount property value. The estimated count of unindexed items for the collection. +func (m *EstimateStatisticsOperation) SetUnindexedItemCount(value *int64)() { + m.unindexedItemCount = value +} +// SetUnindexedItemsSize sets the unindexedItemsSize property value. The estimated size of unindexed items for the collection. +func (m *EstimateStatisticsOperation) SetUnindexedItemsSize(value *int64)() { + m.unindexedItemsSize = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_response.go new file mode 100644 index 000000000..fa8477ce6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EstimateStatisticsOperationCollectionResponse +type EstimateStatisticsOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EstimateStatisticsOperationable +} +// NewEstimateStatisticsOperationCollectionResponse instantiates a new EstimateStatisticsOperationCollectionResponse and sets the default values. +func NewEstimateStatisticsOperationCollectionResponse()(*EstimateStatisticsOperationCollectionResponse) { + m := &EstimateStatisticsOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEstimateStatisticsOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEstimateStatisticsOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEstimateStatisticsOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EstimateStatisticsOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEstimateStatisticsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EstimateStatisticsOperationable, len(val)) + for i, v := range val { + res[i] = v.(EstimateStatisticsOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EstimateStatisticsOperationCollectionResponse) GetValue()([]EstimateStatisticsOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EstimateStatisticsOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EstimateStatisticsOperationCollectionResponse) SetValue(value []EstimateStatisticsOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_responseable.go new file mode 100644 index 000000000..187118a57 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EstimateStatisticsOperationCollectionResponseable +type EstimateStatisticsOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EstimateStatisticsOperationable) + SetValue(value []EstimateStatisticsOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operationable.go new file mode 100644 index 000000000..c3a24c734 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/estimate_statistics_operationable.go @@ -0,0 +1,25 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EstimateStatisticsOperationable +type EstimateStatisticsOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndexedItemCount()(*int64) + GetIndexedItemsSize()(*int64) + GetMailboxCount()(*int32) + GetSiteCount()(*int32) + GetSourceCollection()(SourceCollectionable) + GetUnindexedItemCount()(*int64) + GetUnindexedItemsSize()(*int64) + SetIndexedItemCount(value *int64)() + SetIndexedItemsSize(value *int64)() + SetMailboxCount(value *int32)() + SetSiteCount(value *int32)() + SetSourceCollection(value SourceCollectionable)() + SetUnindexedItemCount(value *int64)() + SetUnindexedItemsSize(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/export_file_structure.go b/src/internal/connector/graph/betasdk/models/ediscovery/export_file_structure.go new file mode 100644 index 000000000..39aeb6455 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/export_file_structure.go @@ -0,0 +1,40 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExportFileStructure int + +const ( + NONE_EXPORTFILESTRUCTURE ExportFileStructure = iota + DIRECTORY_EXPORTFILESTRUCTURE + PST_EXPORTFILESTRUCTURE + UNKNOWNFUTUREVALUE_EXPORTFILESTRUCTURE +) + +func (i ExportFileStructure) String() string { + return []string{"none", "directory", "pst", "unknownFutureValue"}[i] +} +func ParseExportFileStructure(v string) (interface{}, error) { + result := NONE_EXPORTFILESTRUCTURE + switch v { + case "none": + result = NONE_EXPORTFILESTRUCTURE + case "directory": + result = DIRECTORY_EXPORTFILESTRUCTURE + case "pst": + result = PST_EXPORTFILESTRUCTURE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXPORTFILESTRUCTURE + default: + return 0, errors.New("Unknown ExportFileStructure value: " + v) + } + return &result, nil +} +func SerializeExportFileStructure(values []ExportFileStructure) []string { + 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/ediscovery/export_options.go b/src/internal/connector/graph/betasdk/models/ediscovery/export_options.go new file mode 100644 index 000000000..af625cd77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/export_options.go @@ -0,0 +1,46 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExportOptions int + +const ( + ORIGINALFILES_EXPORTOPTIONS ExportOptions = iota + TEXT_EXPORTOPTIONS + PDFREPLACEMENT_EXPORTOPTIONS + FILEINFO_EXPORTOPTIONS + TAGS_EXPORTOPTIONS + UNKNOWNFUTUREVALUE_EXPORTOPTIONS +) + +func (i ExportOptions) String() string { + return []string{"originalFiles", "text", "pdfReplacement", "fileInfo", "tags", "unknownFutureValue"}[i] +} +func ParseExportOptions(v string) (interface{}, error) { + result := ORIGINALFILES_EXPORTOPTIONS + switch v { + case "originalFiles": + result = ORIGINALFILES_EXPORTOPTIONS + case "text": + result = TEXT_EXPORTOPTIONS + case "pdfReplacement": + result = PDFREPLACEMENT_EXPORTOPTIONS + case "fileInfo": + result = FILEINFO_EXPORTOPTIONS + case "tags": + result = TAGS_EXPORTOPTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXPORTOPTIONS + default: + return 0, errors.New("Unknown ExportOptions value: " + v) + } + return &result, nil +} +func SerializeExportOptions(values []ExportOptions) []string { + 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/ediscovery/legal_hold.go b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold.go new file mode 100644 index 000000000..a4f8e68af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold.go @@ -0,0 +1,403 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LegalHold provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LegalHold struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. + contentQuery *string + // The user who created the legal hold. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the legal hold was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The legal hold description. + description *string + // The display name of the legal hold. + displayName *string + // Lists any errors that happened while placing the hold. + errors []string + // Indicates whether the hold is enabled and actively holding content. + isEnabled *bool + // the user who last modified the legal hold. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the legal hold was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Data source entity for SharePoint sites associated with the legal hold. + siteSources []SiteSourceable + // The status of the legal hold. Possible values are: Pending, Error, Success, UnknownFutureValue. + status *LegalHoldStatus + // The unifiedGroupSources property + unifiedGroupSources []UnifiedGroupSourceable + // Data source entity for a the legal hold. This is the container for a mailbox and OneDrive for Business site. + userSources []UserSourceable +} +// NewLegalHold instantiates a new legalHold and sets the default values. +func NewLegalHold()(*LegalHold) { + m := &LegalHold{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateLegalHoldFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLegalHoldFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLegalHold(), nil +} +// GetContentQuery gets the contentQuery property value. KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. +func (m *LegalHold) GetContentQuery()(*string) { + return m.contentQuery +} +// GetCreatedBy gets the createdBy property value. The user who created the legal hold. +func (m *LegalHold) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the legal hold was created. +func (m *LegalHold) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The legal hold description. +func (m *LegalHold) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the legal hold. +func (m *LegalHold) GetDisplayName()(*string) { + return m.displayName +} +// GetErrors gets the errors property value. Lists any errors that happened while placing the hold. +func (m *LegalHold) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LegalHold) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contentQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentQuery(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetErrors(res) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["siteSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetSiteSources(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLegalHoldStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*LegalHoldStatus)) + } + return nil + } + res["unifiedGroupSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedGroupSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedGroupSourceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedGroupSourceable) + } + m.SetUnifiedGroupSources(res) + } + return nil + } + res["userSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetUserSources(res) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the hold is enabled and actively holding content. +func (m *LegalHold) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetLastModifiedBy gets the lastModifiedBy property value. the user who last modified the legal hold. +func (m *LegalHold) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the legal hold was last modified. +func (m *LegalHold) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetSiteSources gets the siteSources property value. Data source entity for SharePoint sites associated with the legal hold. +func (m *LegalHold) GetSiteSources()([]SiteSourceable) { + return m.siteSources +} +// GetStatus gets the status property value. The status of the legal hold. Possible values are: Pending, Error, Success, UnknownFutureValue. +func (m *LegalHold) GetStatus()(*LegalHoldStatus) { + return m.status +} +// GetUnifiedGroupSources gets the unifiedGroupSources property value. The unifiedGroupSources property +func (m *LegalHold) GetUnifiedGroupSources()([]UnifiedGroupSourceable) { + return m.unifiedGroupSources +} +// GetUserSources gets the userSources property value. Data source entity for a the legal hold. This is the container for a mailbox and OneDrive for Business site. +func (m *LegalHold) GetUserSources()([]UserSourceable) { + return m.userSources +} +// Serialize serializes information the current object +func (m *LegalHold) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentQuery", m.GetContentQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err = writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetSiteSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSiteSources())) + for i, v := range m.GetSiteSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("siteSources", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetUnifiedGroupSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnifiedGroupSources())) + for i, v := range m.GetUnifiedGroupSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("unifiedGroupSources", cast) + if err != nil { + return err + } + } + if m.GetUserSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserSources())) + for i, v := range m.GetUserSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetContentQuery sets the contentQuery property value. KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. +func (m *LegalHold) SetContentQuery(value *string)() { + m.contentQuery = value +} +// SetCreatedBy sets the createdBy property value. The user who created the legal hold. +func (m *LegalHold) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the legal hold was created. +func (m *LegalHold) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The legal hold description. +func (m *LegalHold) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the legal hold. +func (m *LegalHold) SetDisplayName(value *string)() { + m.displayName = value +} +// SetErrors sets the errors property value. Lists any errors that happened while placing the hold. +func (m *LegalHold) SetErrors(value []string)() { + m.errors = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the hold is enabled and actively holding content. +func (m *LegalHold) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. the user who last modified the legal hold. +func (m *LegalHold) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the legal hold was last modified. +func (m *LegalHold) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetSiteSources sets the siteSources property value. Data source entity for SharePoint sites associated with the legal hold. +func (m *LegalHold) SetSiteSources(value []SiteSourceable)() { + m.siteSources = value +} +// SetStatus sets the status property value. The status of the legal hold. Possible values are: Pending, Error, Success, UnknownFutureValue. +func (m *LegalHold) SetStatus(value *LegalHoldStatus)() { + m.status = value +} +// SetUnifiedGroupSources sets the unifiedGroupSources property value. The unifiedGroupSources property +func (m *LegalHold) SetUnifiedGroupSources(value []UnifiedGroupSourceable)() { + m.unifiedGroupSources = value +} +// SetUserSources sets the userSources property value. Data source entity for a the legal hold. This is the container for a mailbox and OneDrive for Business site. +func (m *LegalHold) SetUserSources(value []UserSourceable)() { + m.userSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_response.go new file mode 100644 index 000000000..09f88067a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LegalHoldCollectionResponse +type LegalHoldCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []LegalHoldable +} +// NewLegalHoldCollectionResponse instantiates a new LegalHoldCollectionResponse and sets the default values. +func NewLegalHoldCollectionResponse()(*LegalHoldCollectionResponse) { + m := &LegalHoldCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLegalHoldCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLegalHoldCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLegalHoldCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LegalHoldCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLegalHoldFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LegalHoldable, len(val)) + for i, v := range val { + res[i] = v.(LegalHoldable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LegalHoldCollectionResponse) GetValue()([]LegalHoldable) { + return m.value +} +// Serialize serializes information the current object +func (m *LegalHoldCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LegalHoldCollectionResponse) SetValue(value []LegalHoldable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_responseable.go new file mode 100644 index 000000000..3721b5f7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LegalHoldCollectionResponseable +type LegalHoldCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LegalHoldable) + SetValue(value []LegalHoldable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_status.go b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_status.go new file mode 100644 index 000000000..a323ed9fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/legal_hold_status.go @@ -0,0 +1,40 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LegalHoldStatus int + +const ( + PENDING_LEGALHOLDSTATUS LegalHoldStatus = iota + ERROR_LEGALHOLDSTATUS + SUCCESS_LEGALHOLDSTATUS + UNKNOWNFUTUREVALUE_LEGALHOLDSTATUS +) + +func (i LegalHoldStatus) String() string { + return []string{"Pending", "Error", "Success", "UnknownFutureValue"}[i] +} +func ParseLegalHoldStatus(v string) (interface{}, error) { + result := PENDING_LEGALHOLDSTATUS + switch v { + case "Pending": + result = PENDING_LEGALHOLDSTATUS + case "Error": + result = ERROR_LEGALHOLDSTATUS + case "Success": + result = SUCCESS_LEGALHOLDSTATUS + case "UnknownFutureValue": + result = UNKNOWNFUTUREVALUE_LEGALHOLDSTATUS + default: + return 0, errors.New("Unknown LegalHoldStatus value: " + v) + } + return &result, nil +} +func SerializeLegalHoldStatus(values []LegalHoldStatus) []string { + 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/ediscovery/legal_holdable.go b/src/internal/connector/graph/betasdk/models/ediscovery/legal_holdable.go new file mode 100644 index 000000000..41884ac48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/legal_holdable.go @@ -0,0 +1,39 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LegalHoldable +type LegalHoldable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentQuery()(*string) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetErrors()([]string) + GetIsEnabled()(*bool) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSiteSources()([]SiteSourceable) + GetStatus()(*LegalHoldStatus) + GetUnifiedGroupSources()([]UnifiedGroupSourceable) + GetUserSources()([]UserSourceable) + SetContentQuery(value *string)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetErrors(value []string)() + SetIsEnabled(value *bool)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSiteSources(value []SiteSourceable)() + SetStatus(value *LegalHoldStatus)() + SetUnifiedGroupSources(value []UnifiedGroupSourceable)() + SetUserSources(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source.go b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source.go new file mode 100644 index 000000000..3b066fe71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source.go @@ -0,0 +1,88 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NoncustodialDataSource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NoncustodialDataSource struct { + DataSourceContainer + // Indicates if hold is applied to non-custodial data source (such as mailbox or site). + applyHoldToSource *bool + // User source or SharePoint site data source as non-custodial data source. + dataSource DataSourceable +} +// NewNoncustodialDataSource instantiates a new noncustodialDataSource and sets the default values. +func NewNoncustodialDataSource()(*NoncustodialDataSource) { + m := &NoncustodialDataSource{ + DataSourceContainer: *NewDataSourceContainer(), + } + odataTypeValue := "#microsoft.graph.ediscovery.noncustodialDataSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateNoncustodialDataSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNoncustodialDataSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNoncustodialDataSource(), nil +} +// GetApplyHoldToSource gets the applyHoldToSource property value. Indicates if hold is applied to non-custodial data source (such as mailbox or site). +func (m *NoncustodialDataSource) GetApplyHoldToSource()(*bool) { + return m.applyHoldToSource +} +// GetDataSource gets the dataSource property value. User source or SharePoint site data source as non-custodial data source. +func (m *NoncustodialDataSource) GetDataSource()(DataSourceable) { + return m.dataSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NoncustodialDataSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSourceContainer.GetFieldDeserializers() + res["applyHoldToSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplyHoldToSource(val) + } + return nil + } + res["dataSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDataSource(val.(DataSourceable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *NoncustodialDataSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSourceContainer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("applyHoldToSource", m.GetApplyHoldToSource()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("dataSource", m.GetDataSource()) + if err != nil { + return err + } + } + return nil +} +// SetApplyHoldToSource sets the applyHoldToSource property value. Indicates if hold is applied to non-custodial data source (such as mailbox or site). +func (m *NoncustodialDataSource) SetApplyHoldToSource(value *bool)() { + m.applyHoldToSource = value +} +// SetDataSource sets the dataSource property value. User source or SharePoint site data source as non-custodial data source. +func (m *NoncustodialDataSource) SetDataSource(value DataSourceable)() { + m.dataSource = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_response.go new file mode 100644 index 000000000..5f18e2b64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NoncustodialDataSourceCollectionResponse +type NoncustodialDataSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []NoncustodialDataSourceable +} +// NewNoncustodialDataSourceCollectionResponse instantiates a new NoncustodialDataSourceCollectionResponse and sets the default values. +func NewNoncustodialDataSourceCollectionResponse()(*NoncustodialDataSourceCollectionResponse) { + m := &NoncustodialDataSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNoncustodialDataSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNoncustodialDataSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNoncustodialDataSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NoncustodialDataSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(NoncustodialDataSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NoncustodialDataSourceCollectionResponse) GetValue()([]NoncustodialDataSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *NoncustodialDataSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NoncustodialDataSourceCollectionResponse) SetValue(value []NoncustodialDataSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_responseable.go new file mode 100644 index 000000000..4e9f753c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_source_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NoncustodialDataSourceCollectionResponseable +type NoncustodialDataSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NoncustodialDataSourceable) + SetValue(value []NoncustodialDataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_sourceable.go b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_sourceable.go new file mode 100644 index 000000000..6bd601b93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/noncustodial_data_sourceable.go @@ -0,0 +1,15 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NoncustodialDataSourceable +type NoncustodialDataSourceable interface { + DataSourceContainerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplyHoldToSource()(*bool) + GetDataSource()(DataSourceable) + SetApplyHoldToSource(value *bool)() + SetDataSource(value DataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settings.go b/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settings.go new file mode 100644 index 000000000..51199f7af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settings.go @@ -0,0 +1,149 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OcrSettings +type OcrSettings 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 whether or not OCR is enabled for the case. + isEnabled *bool + // Maximum image size that will be processed in KB). + maxImageSize *int32 + // The OdataType property + odataType *string + // The timeout duration for the OCR engine. A longer timeout may increase success of OCR, but may add to the total processing time. + timeout *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewOcrSettings instantiates a new ocrSettings and sets the default values. +func NewOcrSettings()(*OcrSettings) { + m := &OcrSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOcrSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOcrSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOcrSettings(), 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 *OcrSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OcrSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["maxImageSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxImageSize(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["timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeout(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether or not OCR is enabled for the case. +func (m *OcrSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetMaxImageSize gets the maxImageSize property value. Maximum image size that will be processed in KB). +func (m *OcrSettings) GetMaxImageSize()(*int32) { + return m.maxImageSize +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OcrSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTimeout gets the timeout property value. The timeout duration for the OCR engine. A longer timeout may increase success of OCR, but may add to the total processing time. +func (m *OcrSettings) GetTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.timeout +} +// Serialize serializes information the current object +func (m *OcrSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maxImageSize", m.GetMaxImageSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("timeout", m.GetTimeout()) + 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 *OcrSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether or not OCR is enabled for the case. +func (m *OcrSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetMaxImageSize sets the maxImageSize property value. Maximum image size that will be processed in KB). +func (m *OcrSettings) SetMaxImageSize(value *int32)() { + m.maxImageSize = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OcrSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeout sets the timeout property value. The timeout duration for the OCR engine. A longer timeout may increase success of OCR, but may add to the total processing time. +func (m *OcrSettings) SetTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.timeout = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settingsable.go b/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settingsable.go new file mode 100644 index 000000000..362908ffd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/ocr_settingsable.go @@ -0,0 +1,19 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OcrSettingsable +type OcrSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetMaxImageSize()(*int32) + GetOdataType()(*string) + GetTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetIsEnabled(value *bool)() + SetMaxImageSize(value *int32)() + SetOdataType(value *string)() + SetTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation.go new file mode 100644 index 000000000..1793627cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation.go @@ -0,0 +1,34 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurgeDataOperation +type PurgeDataOperation struct { + CaseOperation +} +// NewPurgeDataOperation instantiates a new PurgeDataOperation and sets the default values. +func NewPurgeDataOperation()(*PurgeDataOperation) { + m := &PurgeDataOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreatePurgeDataOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurgeDataOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurgeDataOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurgeDataOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *PurgeDataOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_response.go new file mode 100644 index 000000000..2b66f2c90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PurgeDataOperationCollectionResponse +type PurgeDataOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []PurgeDataOperationable +} +// NewPurgeDataOperationCollectionResponse instantiates a new PurgeDataOperationCollectionResponse and sets the default values. +func NewPurgeDataOperationCollectionResponse()(*PurgeDataOperationCollectionResponse) { + m := &PurgeDataOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePurgeDataOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurgeDataOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurgeDataOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurgeDataOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurgeDataOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurgeDataOperationable, len(val)) + for i, v := range val { + res[i] = v.(PurgeDataOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PurgeDataOperationCollectionResponse) GetValue()([]PurgeDataOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PurgeDataOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PurgeDataOperationCollectionResponse) SetValue(value []PurgeDataOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_responseable.go new file mode 100644 index 000000000..4d09bb114 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PurgeDataOperationCollectionResponseable +type PurgeDataOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PurgeDataOperationable) + SetValue(value []PurgeDataOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operationable.go new file mode 100644 index 000000000..3dd24eed4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/purge_data_operationable.go @@ -0,0 +1,11 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurgeDataOperationable +type PurgeDataOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settings.go b/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settings.go new file mode 100644 index 000000000..dbb58e447 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settings.go @@ -0,0 +1,175 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedundancyDetectionSettings +type RedundancyDetectionSettings 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 whether email threading and near duplicate detection are enabled. + isEnabled *bool + // Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. + maxWords *int32 + // Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. + minWords *int32 + // The OdataType property + odataType *string + // Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. + similarityThreshold *int32 +} +// NewRedundancyDetectionSettings instantiates a new redundancyDetectionSettings and sets the default values. +func NewRedundancyDetectionSettings()(*RedundancyDetectionSettings) { + m := &RedundancyDetectionSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRedundancyDetectionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRedundancyDetectionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRedundancyDetectionSettings(), 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 *RedundancyDetectionSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RedundancyDetectionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["maxWords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxWords(val) + } + return nil + } + res["minWords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinWords(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["similarityThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSimilarityThreshold(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether email threading and near duplicate detection are enabled. +func (m *RedundancyDetectionSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetMaxWords gets the maxWords property value. Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) GetMaxWords()(*int32) { + return m.maxWords +} +// GetMinWords gets the minWords property value. Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) GetMinWords()(*int32) { + return m.minWords +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RedundancyDetectionSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSimilarityThreshold gets the similarityThreshold property value. Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. +func (m *RedundancyDetectionSettings) GetSimilarityThreshold()(*int32) { + return m.similarityThreshold +} +// Serialize serializes information the current object +func (m *RedundancyDetectionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maxWords", m.GetMaxWords()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minWords", m.GetMinWords()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("similarityThreshold", m.GetSimilarityThreshold()) + 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 *RedundancyDetectionSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether email threading and near duplicate detection are enabled. +func (m *RedundancyDetectionSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetMaxWords sets the maxWords property value. Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) SetMaxWords(value *int32)() { + m.maxWords = value +} +// SetMinWords sets the minWords property value. Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) SetMinWords(value *int32)() { + m.minWords = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RedundancyDetectionSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSimilarityThreshold sets the similarityThreshold property value. Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. +func (m *RedundancyDetectionSettings) SetSimilarityThreshold(value *int32)() { + m.similarityThreshold = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settingsable.go b/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settingsable.go new file mode 100644 index 000000000..f4033f003 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/redundancy_detection_settingsable.go @@ -0,0 +1,21 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedundancyDetectionSettingsable +type RedundancyDetectionSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetMaxWords()(*int32) + GetMinWords()(*int32) + GetOdataType()(*string) + GetSimilarityThreshold()(*int32) + SetIsEnabled(value *bool)() + SetMaxWords(value *int32)() + SetMinWords(value *int32)() + SetOdataType(value *string)() + SetSimilarityThreshold(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set.go new file mode 100644 index 000000000..f70e7f60c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set.go @@ -0,0 +1,148 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSet +type ReviewSet struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the review set. Read-only. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The datetime when the review set was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The review set name. The name is unique with a maximum limit of 64 characters. + displayName *string + // The queries property + queries []ReviewSetQueryable +} +// NewReviewSet instantiates a new reviewSet and sets the default values. +func NewReviewSet()(*ReviewSet) { + m := &ReviewSet{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateReviewSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReviewSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewSet(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the review set. Read-only. +func (m *ReviewSet) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The datetime when the review set was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ReviewSet) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The review set name. The name is unique with a maximum limit of 64 characters. +func (m *ReviewSet) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReviewSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["queries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReviewSetQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReviewSetQueryable, len(val)) + for i, v := range val { + res[i] = v.(ReviewSetQueryable) + } + m.SetQueries(res) + } + return nil + } + return res +} +// GetQueries gets the queries property value. The queries property +func (m *ReviewSet) GetQueries()([]ReviewSetQueryable) { + return m.queries +} +// Serialize serializes information the current object +func (m *ReviewSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetQueries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetQueries())) + for i, v := range m.GetQueries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("queries", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the review set. Read-only. +func (m *ReviewSet) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The datetime when the review set was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *ReviewSet) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The review set name. The name is unique with a maximum limit of 64 characters. +func (m *ReviewSet) SetDisplayName(value *string)() { + m.displayName = value +} +// SetQueries sets the queries property value. The queries property +func (m *ReviewSet) SetQueries(value []ReviewSetQueryable)() { + m.queries = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_response.go new file mode 100644 index 000000000..d8bbcc10f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetCollectionResponse +type ReviewSetCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ReviewSetable +} +// NewReviewSetCollectionResponse instantiates a new ReviewSetCollectionResponse and sets the default values. +func NewReviewSetCollectionResponse()(*ReviewSetCollectionResponse) { + m := &ReviewSetCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateReviewSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReviewSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReviewSetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReviewSetable, len(val)) + for i, v := range val { + res[i] = v.(ReviewSetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ReviewSetCollectionResponse) GetValue()([]ReviewSetable) { + return m.value +} +// Serialize serializes information the current object +func (m *ReviewSetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ReviewSetCollectionResponse) SetValue(value []ReviewSetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_responseable.go new file mode 100644 index 000000000..ac5c5c7c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetCollectionResponseable +type ReviewSetCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ReviewSetable) + SetValue(value []ReviewSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query.go new file mode 100644 index 000000000..47d830ec6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query.go @@ -0,0 +1,192 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetQuery provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ReviewSetQuery struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the query. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The time and date when the query was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the query. + displayName *string + // The user who last modified the query. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the query was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The query string in KQL (Keyword Query Language) query. For details, see Document metadata fields in Advanced eDiscovery. This field maps directly to the keywords condition. You can refine searches by using fields listed in the searchable field name paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. + query *string +} +// NewReviewSetQuery instantiates a new reviewSetQuery and sets the default values. +func NewReviewSetQuery()(*ReviewSetQuery) { + m := &ReviewSetQuery{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateReviewSetQueryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReviewSetQueryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewSetQuery(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the query. +func (m *ReviewSetQuery) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The time and date when the query was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ReviewSetQuery) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The name of the query. +func (m *ReviewSetQuery) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReviewSetQuery) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the query. +func (m *ReviewSetQuery) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the query was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ReviewSetQuery) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetQuery gets the query property value. The query string in KQL (Keyword Query Language) query. For details, see Document metadata fields in Advanced eDiscovery. This field maps directly to the keywords condition. You can refine searches by using fields listed in the searchable field name paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. +func (m *ReviewSetQuery) GetQuery()(*string) { + return m.query +} +// Serialize serializes information the current object +func (m *ReviewSetQuery) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the query. +func (m *ReviewSetQuery) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The time and date when the query was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ReviewSetQuery) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The name of the query. +func (m *ReviewSetQuery) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the query. +func (m *ReviewSetQuery) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the query was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ReviewSetQuery) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetQuery sets the query property value. The query string in KQL (Keyword Query Language) query. For details, see Document metadata fields in Advanced eDiscovery. This field maps directly to the keywords condition. You can refine searches by using fields listed in the searchable field name paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. +func (m *ReviewSetQuery) SetQuery(value *string)() { + m.query = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_response.go new file mode 100644 index 000000000..6e8986244 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetQueryCollectionResponse +type ReviewSetQueryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ReviewSetQueryable +} +// NewReviewSetQueryCollectionResponse instantiates a new ReviewSetQueryCollectionResponse and sets the default values. +func NewReviewSetQueryCollectionResponse()(*ReviewSetQueryCollectionResponse) { + m := &ReviewSetQueryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateReviewSetQueryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReviewSetQueryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReviewSetQueryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReviewSetQueryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReviewSetQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReviewSetQueryable, len(val)) + for i, v := range val { + res[i] = v.(ReviewSetQueryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ReviewSetQueryCollectionResponse) GetValue()([]ReviewSetQueryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ReviewSetQueryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ReviewSetQueryCollectionResponse) SetValue(value []ReviewSetQueryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_responseable.go new file mode 100644 index 000000000..2a5df7533 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_query_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetQueryCollectionResponseable +type ReviewSetQueryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ReviewSetQueryable) + SetValue(value []ReviewSetQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_set_queryable.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_queryable.go new file mode 100644 index 000000000..250ba93a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_set_queryable.go @@ -0,0 +1,25 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetQueryable +type ReviewSetQueryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetQuery()(*string) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetQuery(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/review_setable.go b/src/internal/connector/graph/betasdk/models/ediscovery/review_setable.go new file mode 100644 index 000000000..807e54bb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/review_setable.go @@ -0,0 +1,21 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ReviewSetable +type ReviewSetable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetQueries()([]ReviewSetQueryable) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetQueries(value []ReviewSetQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/site_source.go b/src/internal/connector/graph/betasdk/models/ediscovery/site_source.go new file mode 100644 index 000000000..c0164d7a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/site_source.go @@ -0,0 +1,63 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSource +type SiteSource struct { + DataSource + // The site property + site ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable +} +// NewSiteSource instantiates a new SiteSource and sets the default values. +func NewSiteSource()(*SiteSource) { + m := &SiteSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.ediscovery.siteSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSiteSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["site"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSite(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)) + } + return nil + } + return res +} +// GetSite gets the site property value. The site property +func (m *SiteSource) GetSite()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) { + return m.site +} +// Serialize serializes information the current object +func (m *SiteSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("site", m.GetSite()) + if err != nil { + return err + } + } + return nil +} +// SetSite sets the site property value. The site property +func (m *SiteSource) SetSite(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() { + m.site = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_response.go new file mode 100644 index 000000000..20c0b31ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceCollectionResponse +type SiteSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SiteSourceable +} +// NewSiteSourceCollectionResponse instantiates a new SiteSourceCollectionResponse and sets the default values. +func NewSiteSourceCollectionResponse()(*SiteSourceCollectionResponse) { + m := &SiteSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSiteSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SiteSourceCollectionResponse) GetValue()([]SiteSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SiteSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SiteSourceCollectionResponse) SetValue(value []SiteSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_responseable.go new file mode 100644 index 000000000..3e35c6dba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/site_source_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceCollectionResponseable +type SiteSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SiteSourceable) + SetValue(value []SiteSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/site_sourceable.go b/src/internal/connector/graph/betasdk/models/ediscovery/site_sourceable.go new file mode 100644 index 000000000..b2c3d5a2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/site_sourceable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceable +type SiteSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSite()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) + SetSite(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/source_collection.go b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection.go new file mode 100644 index 000000000..a1b1b9220 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection.go @@ -0,0 +1,399 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SourceCollection +type SourceCollection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Adds an additional source to the sourceCollection. + additionalSources []DataSourceable + // Adds the results of the sourceCollection to the specified reviewSet. + addToReviewSetOperation AddToReviewSetOperationable + // The query string in KQL (Keyword Query Language) query. For details, see Keyword queries and search conditions for Content Search and eDiscovery. You can refine searches by using fields paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. + contentQuery *string + // The user who created the sourceCollection. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the sourceCollection was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Custodian sources that are included in the sourceCollection. + custodianSources []DataSourceable + // When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. + dataSourceScopes *DataSourceScopes + // The description of the sourceCollection. + description *string + // The display name of the sourceCollection. + displayName *string + // The last estimate operation associated with the sourceCollection. + lastEstimateStatisticsOperation EstimateStatisticsOperationable + // The last user who modified the sourceCollection. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The last date and time the sourceCollection was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // noncustodialDataSource sources that are included in the sourceCollection + noncustodialSources []NoncustodialDataSourceable +} +// NewSourceCollection instantiates a new sourceCollection and sets the default values. +func NewSourceCollection()(*SourceCollection) { + m := &SourceCollection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSourceCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSourceCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSourceCollection(), nil +} +// GetAdditionalSources gets the additionalSources property value. Adds an additional source to the sourceCollection. +func (m *SourceCollection) GetAdditionalSources()([]DataSourceable) { + return m.additionalSources +} +// GetAddToReviewSetOperation gets the addToReviewSetOperation property value. Adds the results of the sourceCollection to the specified reviewSet. +func (m *SourceCollection) GetAddToReviewSetOperation()(AddToReviewSetOperationable) { + return m.addToReviewSetOperation +} +// GetContentQuery gets the contentQuery property value. The query string in KQL (Keyword Query Language) query. For details, see Keyword queries and search conditions for Content Search and eDiscovery. You can refine searches by using fields paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. +func (m *SourceCollection) GetContentQuery()(*string) { + return m.contentQuery +} +// GetCreatedBy gets the createdBy property value. The user who created the sourceCollection. +func (m *SourceCollection) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the sourceCollection was created. +func (m *SourceCollection) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustodianSources gets the custodianSources property value. Custodian sources that are included in the sourceCollection. +func (m *SourceCollection) GetCustodianSources()([]DataSourceable) { + return m.custodianSources +} +// GetDataSourceScopes gets the dataSourceScopes property value. When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. +func (m *SourceCollection) GetDataSourceScopes()(*DataSourceScopes) { + return m.dataSourceScopes +} +// GetDescription gets the description property value. The description of the sourceCollection. +func (m *SourceCollection) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the sourceCollection. +func (m *SourceCollection) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SourceCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetAdditionalSources(res) + } + return nil + } + res["addToReviewSetOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAddToReviewSetOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddToReviewSetOperation(val.(AddToReviewSetOperationable)) + } + return nil + } + res["contentQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentQuery(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["custodianSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetCustodianSources(res) + } + return nil + } + res["dataSourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceScopes) + if err != nil { + return err + } + if val != nil { + m.SetDataSourceScopes(val.(*DataSourceScopes)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastEstimateStatisticsOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEstimateStatisticsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastEstimateStatisticsOperation(val.(EstimateStatisticsOperationable)) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["noncustodialSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(NoncustodialDataSourceable) + } + m.SetNoncustodialSources(res) + } + return nil + } + return res +} +// GetLastEstimateStatisticsOperation gets the lastEstimateStatisticsOperation property value. The last estimate operation associated with the sourceCollection. +func (m *SourceCollection) GetLastEstimateStatisticsOperation()(EstimateStatisticsOperationable) { + return m.lastEstimateStatisticsOperation +} +// GetLastModifiedBy gets the lastModifiedBy property value. The last user who modified the sourceCollection. +func (m *SourceCollection) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last date and time the sourceCollection was modified. +func (m *SourceCollection) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNoncustodialSources gets the noncustodialSources property value. noncustodialDataSource sources that are included in the sourceCollection +func (m *SourceCollection) GetNoncustodialSources()([]NoncustodialDataSourceable) { + return m.noncustodialSources +} +// Serialize serializes information the current object +func (m *SourceCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdditionalSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalSources())) + for i, v := range m.GetAdditionalSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalSources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("addToReviewSetOperation", m.GetAddToReviewSetOperation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentQuery", m.GetContentQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustodianSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustodianSources())) + for i, v := range m.GetCustodianSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("custodianSources", cast) + if err != nil { + return err + } + } + if m.GetDataSourceScopes() != nil { + cast := (*m.GetDataSourceScopes()).String() + err = writer.WriteStringValue("dataSourceScopes", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastEstimateStatisticsOperation", m.GetLastEstimateStatisticsOperation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetNoncustodialSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNoncustodialSources())) + for i, v := range m.GetNoncustodialSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("noncustodialSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalSources sets the additionalSources property value. Adds an additional source to the sourceCollection. +func (m *SourceCollection) SetAdditionalSources(value []DataSourceable)() { + m.additionalSources = value +} +// SetAddToReviewSetOperation sets the addToReviewSetOperation property value. Adds the results of the sourceCollection to the specified reviewSet. +func (m *SourceCollection) SetAddToReviewSetOperation(value AddToReviewSetOperationable)() { + m.addToReviewSetOperation = value +} +// SetContentQuery sets the contentQuery property value. The query string in KQL (Keyword Query Language) query. For details, see Keyword queries and search conditions for Content Search and eDiscovery. You can refine searches by using fields paired with values; for example, subject:'Quarterly Financials' AND Date>=06/01/2016 AND Date<=07/01/2016. +func (m *SourceCollection) SetContentQuery(value *string)() { + m.contentQuery = value +} +// SetCreatedBy sets the createdBy property value. The user who created the sourceCollection. +func (m *SourceCollection) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the sourceCollection was created. +func (m *SourceCollection) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustodianSources sets the custodianSources property value. Custodian sources that are included in the sourceCollection. +func (m *SourceCollection) SetCustodianSources(value []DataSourceable)() { + m.custodianSources = value +} +// SetDataSourceScopes sets the dataSourceScopes property value. When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. +func (m *SourceCollection) SetDataSourceScopes(value *DataSourceScopes)() { + m.dataSourceScopes = value +} +// SetDescription sets the description property value. The description of the sourceCollection. +func (m *SourceCollection) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the sourceCollection. +func (m *SourceCollection) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastEstimateStatisticsOperation sets the lastEstimateStatisticsOperation property value. The last estimate operation associated with the sourceCollection. +func (m *SourceCollection) SetLastEstimateStatisticsOperation(value EstimateStatisticsOperationable)() { + m.lastEstimateStatisticsOperation = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The last user who modified the sourceCollection. +func (m *SourceCollection) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last date and time the sourceCollection was modified. +func (m *SourceCollection) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNoncustodialSources sets the noncustodialSources property value. noncustodialDataSource sources that are included in the sourceCollection +func (m *SourceCollection) SetNoncustodialSources(value []NoncustodialDataSourceable)() { + m.noncustodialSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_response.go new file mode 100644 index 000000000..b963e1255 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SourceCollectionCollectionResponse +type SourceCollectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SourceCollectionable +} +// NewSourceCollectionCollectionResponse instantiates a new SourceCollectionCollectionResponse and sets the default values. +func NewSourceCollectionCollectionResponse()(*SourceCollectionCollectionResponse) { + m := &SourceCollectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSourceCollectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSourceCollectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSourceCollectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SourceCollectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSourceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SourceCollectionable, len(val)) + for i, v := range val { + res[i] = v.(SourceCollectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SourceCollectionCollectionResponse) GetValue()([]SourceCollectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *SourceCollectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SourceCollectionCollectionResponse) SetValue(value []SourceCollectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_responseable.go new file mode 100644 index 000000000..84fe72f3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/source_collection_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SourceCollectionCollectionResponseable +type SourceCollectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SourceCollectionable) + SetValue(value []SourceCollectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/source_collectionable.go b/src/internal/connector/graph/betasdk/models/ediscovery/source_collectionable.go new file mode 100644 index 000000000..836b10a9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/source_collectionable.go @@ -0,0 +1,39 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SourceCollectionable +type SourceCollectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalSources()([]DataSourceable) + GetAddToReviewSetOperation()(AddToReviewSetOperationable) + GetContentQuery()(*string) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustodianSources()([]DataSourceable) + GetDataSourceScopes()(*DataSourceScopes) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastEstimateStatisticsOperation()(EstimateStatisticsOperationable) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNoncustodialSources()([]NoncustodialDataSourceable) + SetAdditionalSources(value []DataSourceable)() + SetAddToReviewSetOperation(value AddToReviewSetOperationable)() + SetContentQuery(value *string)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustodianSources(value []DataSourceable)() + SetDataSourceScopes(value *DataSourceScopes)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastEstimateStatisticsOperation(value EstimateStatisticsOperationable)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNoncustodialSources(value []NoncustodialDataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/source_type.go b/src/internal/connector/graph/betasdk/models/ediscovery/source_type.go new file mode 100644 index 000000000..55140a74f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/source_type.go @@ -0,0 +1,34 @@ +package ediscovery +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SourceType int + +const ( + MAILBOX_SOURCETYPE SourceType = iota + SITE_SOURCETYPE +) + +func (i SourceType) String() string { + return []string{"mailbox", "site"}[i] +} +func ParseSourceType(v string) (interface{}, error) { + result := MAILBOX_SOURCETYPE + switch v { + case "mailbox": + result = MAILBOX_SOURCETYPE + case "site": + result = SITE_SOURCETYPE + default: + return 0, errors.New("Unknown SourceType value: " + v) + } + return &result, nil +} +func SerializeSourceType(values []SourceType) []string { + 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/ediscovery/tag.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag.go new file mode 100644 index 000000000..47563ebf6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag.go @@ -0,0 +1,227 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tag provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Tag struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. + childSelectability *ChildSelectability + // Returns the tags that are a child of a tag. + childTags []Tagable + // The user who created the tag. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The description for the tag. + description *string + // Display name of the tag. + displayName *string + // The date and time the tag was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Returns the parent tag of the specified tag. + parent Tagable +} +// NewTag instantiates a new tag and sets the default values. +func NewTag()(*Tag) { + m := &Tag{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTag(), nil +} +// GetChildSelectability gets the childSelectability property value. Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. +func (m *Tag) GetChildSelectability()(*ChildSelectability) { + return m.childSelectability +} +// GetChildTags gets the childTags property value. Returns the tags that are a child of a tag. +func (m *Tag) GetChildTags()([]Tagable) { + return m.childTags +} +// GetCreatedBy gets the createdBy property value. The user who created the tag. +func (m *Tag) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetDescription gets the description property value. The description for the tag. +func (m *Tag) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name of the tag. +func (m *Tag) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Tag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["childSelectability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChildSelectability) + if err != nil { + return err + } + if val != nil { + m.SetChildSelectability(val.(*ChildSelectability)) + } + return nil + } + res["childTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Tagable, len(val)) + for i, v := range val { + res[i] = v.(Tagable) + } + m.SetChildTags(res) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(Tagable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the tag was last modified. +func (m *Tag) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetParent gets the parent property value. Returns the parent tag of the specified tag. +func (m *Tag) GetParent()(Tagable) { + return m.parent +} +// Serialize serializes information the current object +func (m *Tag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetChildSelectability() != nil { + cast := (*m.GetChildSelectability()).String() + err = writer.WriteStringValue("childSelectability", &cast) + if err != nil { + return err + } + } + if m.GetChildTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildTags())) + for i, v := range m.GetChildTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("childTags", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + return nil +} +// SetChildSelectability sets the childSelectability property value. Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. +func (m *Tag) SetChildSelectability(value *ChildSelectability)() { + m.childSelectability = value +} +// SetChildTags sets the childTags property value. Returns the tags that are a child of a tag. +func (m *Tag) SetChildTags(value []Tagable)() { + m.childTags = value +} +// SetCreatedBy sets the createdBy property value. The user who created the tag. +func (m *Tag) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetDescription sets the description property value. The description for the tag. +func (m *Tag) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name of the tag. +func (m *Tag) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the tag was last modified. +func (m *Tag) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetParent sets the parent property value. Returns the parent tag of the specified tag. +func (m *Tag) SetParent(value Tagable)() { + m.parent = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_response.go new file mode 100644 index 000000000..a4f903bf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TagCollectionResponse +type TagCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Tagable +} +// NewTagCollectionResponse instantiates a new TagCollectionResponse and sets the default values. +func NewTagCollectionResponse()(*TagCollectionResponse) { + m := &TagCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTagCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTagCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTagCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TagCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Tagable, len(val)) + for i, v := range val { + res[i] = v.(Tagable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TagCollectionResponse) GetValue()([]Tagable) { + return m.value +} +// Serialize serializes information the current object +func (m *TagCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TagCollectionResponse) SetValue(value []Tagable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_responseable.go new file mode 100644 index 000000000..c2cfdcbbb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TagCollectionResponseable +type TagCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Tagable) + SetValue(value []Tagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation.go new file mode 100644 index 000000000..3bc467e10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation.go @@ -0,0 +1,34 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TagOperation +type TagOperation struct { + CaseOperation +} +// NewTagOperation instantiates a new TagOperation and sets the default values. +func NewTagOperation()(*TagOperation) { + m := &TagOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateTagOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTagOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTagOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TagOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *TagOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_response.go new file mode 100644 index 000000000..1b08034a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TagOperationCollectionResponse +type TagOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TagOperationable +} +// NewTagOperationCollectionResponse instantiates a new TagOperationCollectionResponse and sets the default values. +func NewTagOperationCollectionResponse()(*TagOperationCollectionResponse) { + m := &TagOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTagOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTagOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTagOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TagOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTagOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TagOperationable, len(val)) + for i, v := range val { + res[i] = v.(TagOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TagOperationCollectionResponse) GetValue()([]TagOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *TagOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TagOperationCollectionResponse) SetValue(value []TagOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_responseable.go new file mode 100644 index 000000000..43ad1b297 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TagOperationCollectionResponseable +type TagOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TagOperationable) + SetValue(value []TagOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tag_operationable.go b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operationable.go new file mode 100644 index 000000000..8732f3a6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tag_operationable.go @@ -0,0 +1,11 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TagOperationable +type TagOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/tagable.go b/src/internal/connector/graph/betasdk/models/ediscovery/tagable.go new file mode 100644 index 000000000..b45bfd8d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/tagable.go @@ -0,0 +1,27 @@ +package ediscovery + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tagable +type Tagable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildSelectability()(*ChildSelectability) + GetChildTags()([]Tagable) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetParent()(Tagable) + SetChildSelectability(value *ChildSelectability)() + SetChildTags(value []Tagable)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetParent(value Tagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settings.go b/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settings.go new file mode 100644 index 000000000..2ace2d8a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settings.go @@ -0,0 +1,175 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TopicModelingSettings +type TopicModelingSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // To learn more, see Adjust maximum number of themes dynamically. + dynamicallyAdjustTopicCount *bool + // To learn more, see Include numbers in themes. + ignoreNumbers *bool + // Indicates whether themes is enabled for the case. + isEnabled *bool + // The OdataType property + odataType *string + // To learn more, see Maximum number of themes. + topicCount *int32 +} +// NewTopicModelingSettings instantiates a new topicModelingSettings and sets the default values. +func NewTopicModelingSettings()(*TopicModelingSettings) { + m := &TopicModelingSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTopicModelingSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTopicModelingSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicModelingSettings(), 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 *TopicModelingSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDynamicallyAdjustTopicCount gets the dynamicallyAdjustTopicCount property value. To learn more, see Adjust maximum number of themes dynamically. +func (m *TopicModelingSettings) GetDynamicallyAdjustTopicCount()(*bool) { + return m.dynamicallyAdjustTopicCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TopicModelingSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dynamicallyAdjustTopicCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDynamicallyAdjustTopicCount(val) + } + return nil + } + res["ignoreNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnoreNumbers(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["topicCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTopicCount(val) + } + return nil + } + return res +} +// GetIgnoreNumbers gets the ignoreNumbers property value. To learn more, see Include numbers in themes. +func (m *TopicModelingSettings) GetIgnoreNumbers()(*bool) { + return m.ignoreNumbers +} +// GetIsEnabled gets the isEnabled property value. Indicates whether themes is enabled for the case. +func (m *TopicModelingSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TopicModelingSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTopicCount gets the topicCount property value. To learn more, see Maximum number of themes. +func (m *TopicModelingSettings) GetTopicCount()(*int32) { + return m.topicCount +} +// Serialize serializes information the current object +func (m *TopicModelingSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("dynamicallyAdjustTopicCount", m.GetDynamicallyAdjustTopicCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("ignoreNumbers", m.GetIgnoreNumbers()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("topicCount", m.GetTopicCount()) + 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 *TopicModelingSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDynamicallyAdjustTopicCount sets the dynamicallyAdjustTopicCount property value. To learn more, see Adjust maximum number of themes dynamically. +func (m *TopicModelingSettings) SetDynamicallyAdjustTopicCount(value *bool)() { + m.dynamicallyAdjustTopicCount = value +} +// SetIgnoreNumbers sets the ignoreNumbers property value. To learn more, see Include numbers in themes. +func (m *TopicModelingSettings) SetIgnoreNumbers(value *bool)() { + m.ignoreNumbers = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether themes is enabled for the case. +func (m *TopicModelingSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TopicModelingSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTopicCount sets the topicCount property value. To learn more, see Maximum number of themes. +func (m *TopicModelingSettings) SetTopicCount(value *int32)() { + m.topicCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settingsable.go b/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settingsable.go new file mode 100644 index 000000000..18d6c41a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/topic_modeling_settingsable.go @@ -0,0 +1,21 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TopicModelingSettingsable +type TopicModelingSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDynamicallyAdjustTopicCount()(*bool) + GetIgnoreNumbers()(*bool) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetTopicCount()(*int32) + SetDynamicallyAdjustTopicCount(value *bool)() + SetIgnoreNumbers(value *bool)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetTopicCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source.go b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source.go new file mode 100644 index 000000000..23c79bd23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source.go @@ -0,0 +1,90 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSource +type UnifiedGroupSource struct { + DataSource + // The group property + group ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable + // Specifies which sources are included in this group. Possible values are: mailbox, site. + includedSources *SourceType +} +// NewUnifiedGroupSource instantiates a new UnifiedGroupSource and sets the default values. +func NewUnifiedGroupSource()(*UnifiedGroupSource) { + m := &UnifiedGroupSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.ediscovery.unifiedGroupSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUnifiedGroupSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUnifiedGroupSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnifiedGroupSource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UnifiedGroupSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)) + } + return nil + } + res["includedSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSourceType) + if err != nil { + return err + } + if val != nil { + m.SetIncludedSources(val.(*SourceType)) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *UnifiedGroupSource) GetGroup()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable) { + return m.group +} +// GetIncludedSources gets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UnifiedGroupSource) GetIncludedSources()(*SourceType) { + return m.includedSources +} +// Serialize serializes information the current object +func (m *UnifiedGroupSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + if m.GetIncludedSources() != nil { + cast := (*m.GetIncludedSources()).String() + err = writer.WriteStringValue("includedSources", &cast) + if err != nil { + return err + } + } + return nil +} +// SetGroup sets the group property value. The group property +func (m *UnifiedGroupSource) SetGroup(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)() { + m.group = value +} +// SetIncludedSources sets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UnifiedGroupSource) SetIncludedSources(value *SourceType)() { + m.includedSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_response.go new file mode 100644 index 000000000..788e6768b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceCollectionResponse +type UnifiedGroupSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UnifiedGroupSourceable +} +// NewUnifiedGroupSourceCollectionResponse instantiates a new UnifiedGroupSourceCollectionResponse and sets the default values. +func NewUnifiedGroupSourceCollectionResponse()(*UnifiedGroupSourceCollectionResponse) { + m := &UnifiedGroupSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUnifiedGroupSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUnifiedGroupSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnifiedGroupSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UnifiedGroupSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedGroupSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedGroupSourceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedGroupSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UnifiedGroupSourceCollectionResponse) GetValue()([]UnifiedGroupSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *UnifiedGroupSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UnifiedGroupSourceCollectionResponse) SetValue(value []UnifiedGroupSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_responseable.go new file mode 100644 index 000000000..5afec1e61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_source_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceCollectionResponseable +type UnifiedGroupSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UnifiedGroupSourceable) + SetValue(value []UnifiedGroupSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_sourceable.go b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_sourceable.go new file mode 100644 index 000000000..421f2c8a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/unified_group_sourceable.go @@ -0,0 +1,16 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceable +type UnifiedGroupSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroup()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable) + GetIncludedSources()(*SourceType) + SetGroup(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)() + SetIncludedSources(value *SourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/user_source.go b/src/internal/connector/graph/betasdk/models/ediscovery/user_source.go new file mode 100644 index 000000000..6b3422097 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/user_source.go @@ -0,0 +1,115 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserSource +type UserSource struct { + DataSource + // Email address of the user's mailbox. + email *string + // Specifies which sources are included in this group. Possible values are: mailbox, site. + includedSources *SourceType + // The URL of the user's OneDrive for Business site. Read-only. + siteWebUrl *string +} +// NewUserSource instantiates a new UserSource and sets the default values. +func NewUserSource()(*UserSource) { + m := &UserSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.ediscovery.userSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUserSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserSource(), nil +} +// GetEmail gets the email property value. Email address of the user's mailbox. +func (m *UserSource) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["includedSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSourceType) + if err != nil { + return err + } + if val != nil { + m.SetIncludedSources(val.(*SourceType)) + } + return nil + } + res["siteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteWebUrl(val) + } + return nil + } + return res +} +// GetIncludedSources gets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UserSource) GetIncludedSources()(*SourceType) { + return m.includedSources +} +// GetSiteWebUrl gets the siteWebUrl property value. The URL of the user's OneDrive for Business site. Read-only. +func (m *UserSource) GetSiteWebUrl()(*string) { + return m.siteWebUrl +} +// Serialize serializes information the current object +func (m *UserSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + if m.GetIncludedSources() != nil { + cast := (*m.GetIncludedSources()).String() + err = writer.WriteStringValue("includedSources", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("siteWebUrl", m.GetSiteWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. Email address of the user's mailbox. +func (m *UserSource) SetEmail(value *string)() { + m.email = value +} +// SetIncludedSources sets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UserSource) SetIncludedSources(value *SourceType)() { + m.includedSources = value +} +// SetSiteWebUrl sets the siteWebUrl property value. The URL of the user's OneDrive for Business site. Read-only. +func (m *UserSource) SetSiteWebUrl(value *string)() { + m.siteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_response.go b/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_response.go new file mode 100644 index 000000000..2688d6cac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_response.go @@ -0,0 +1,69 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserSourceCollectionResponse +type UserSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UserSourceable +} +// NewUserSourceCollectionResponse instantiates a new UserSourceCollectionResponse and sets the default values. +func NewUserSourceCollectionResponse()(*UserSourceCollectionResponse) { + m := &UserSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUserSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UserSourceCollectionResponse) GetValue()([]UserSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *UserSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UserSourceCollectionResponse) SetValue(value []UserSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_responseable.go new file mode 100644 index 000000000..91906d011 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/user_source_collection_responseable.go @@ -0,0 +1,14 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserSourceCollectionResponseable +type UserSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UserSourceable) + SetValue(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ediscovery/user_sourceable.go b/src/internal/connector/graph/betasdk/models/ediscovery/user_sourceable.go new file mode 100644 index 000000000..93a6b4940 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ediscovery/user_sourceable.go @@ -0,0 +1,17 @@ +package ediscovery + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserSourceable +type UserSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetIncludedSources()(*SourceType) + GetSiteWebUrl()(*string) + SetEmail(value *string)() + SetIncludedSources(value *SourceType)() + SetSiteWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edit_action.go b/src/internal/connector/graph/betasdk/models/edit_action.go new file mode 100644 index 000000000..bf7b4ea07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edit_action.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditAction +type EditAction 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 OdataType property + odataType *string +} +// NewEditAction instantiates a new editAction and sets the default values. +func NewEditAction()(*EditAction) { + m := &EditAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEditActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEditActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEditAction(), 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 *EditAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EditAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EditAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EditAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EditAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EditAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/edit_actionable.go b/src/internal/connector/graph/betasdk/models/edit_actionable.go new file mode 100644 index 000000000..24d39d23a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edit_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditActionable +type EditActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration.go b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration.go new file mode 100644 index 000000000..23cc53273 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration.go @@ -0,0 +1,169 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditionUpgradeConfiguration +type EditionUpgradeConfiguration struct { + DeviceConfiguration + // Edition Upgrade License File Content. + license *string + // Edition Upgrade License type + licenseType *EditionUpgradeLicenseType + // Edition Upgrade Product Key. + productKey *string + // Windows 10 Edition type. + targetEdition *Windows10EditionType + // The possible options to configure S mode unlock + windowsSMode *WindowsSModeConfiguration +} +// NewEditionUpgradeConfiguration instantiates a new EditionUpgradeConfiguration and sets the default values. +func NewEditionUpgradeConfiguration()(*EditionUpgradeConfiguration) { + m := &EditionUpgradeConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.editionUpgradeConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEditionUpgradeConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEditionUpgradeConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEditionUpgradeConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EditionUpgradeConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["license"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLicense(val) + } + return nil + } + res["licenseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEditionUpgradeLicenseType) + if err != nil { + return err + } + if val != nil { + m.SetLicenseType(val.(*EditionUpgradeLicenseType)) + } + return nil + } + res["productKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProductKey(val) + } + return nil + } + res["targetEdition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindows10EditionType) + if err != nil { + return err + } + if val != nil { + m.SetTargetEdition(val.(*Windows10EditionType)) + } + return nil + } + res["windowsSMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsSModeConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetWindowsSMode(val.(*WindowsSModeConfiguration)) + } + return nil + } + return res +} +// GetLicense gets the license property value. Edition Upgrade License File Content. +func (m *EditionUpgradeConfiguration) GetLicense()(*string) { + return m.license +} +// GetLicenseType gets the licenseType property value. Edition Upgrade License type +func (m *EditionUpgradeConfiguration) GetLicenseType()(*EditionUpgradeLicenseType) { + return m.licenseType +} +// GetProductKey gets the productKey property value. Edition Upgrade Product Key. +func (m *EditionUpgradeConfiguration) GetProductKey()(*string) { + return m.productKey +} +// GetTargetEdition gets the targetEdition property value. Windows 10 Edition type. +func (m *EditionUpgradeConfiguration) GetTargetEdition()(*Windows10EditionType) { + return m.targetEdition +} +// GetWindowsSMode gets the windowsSMode property value. The possible options to configure S mode unlock +func (m *EditionUpgradeConfiguration) GetWindowsSMode()(*WindowsSModeConfiguration) { + return m.windowsSMode +} +// Serialize serializes information the current object +func (m *EditionUpgradeConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("license", m.GetLicense()) + if err != nil { + return err + } + } + if m.GetLicenseType() != nil { + cast := (*m.GetLicenseType()).String() + err = writer.WriteStringValue("licenseType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("productKey", m.GetProductKey()) + if err != nil { + return err + } + } + if m.GetTargetEdition() != nil { + cast := (*m.GetTargetEdition()).String() + err = writer.WriteStringValue("targetEdition", &cast) + if err != nil { + return err + } + } + if m.GetWindowsSMode() != nil { + cast := (*m.GetWindowsSMode()).String() + err = writer.WriteStringValue("windowsSMode", &cast) + if err != nil { + return err + } + } + return nil +} +// SetLicense sets the license property value. Edition Upgrade License File Content. +func (m *EditionUpgradeConfiguration) SetLicense(value *string)() { + m.license = value +} +// SetLicenseType sets the licenseType property value. Edition Upgrade License type +func (m *EditionUpgradeConfiguration) SetLicenseType(value *EditionUpgradeLicenseType)() { + m.licenseType = value +} +// SetProductKey sets the productKey property value. Edition Upgrade Product Key. +func (m *EditionUpgradeConfiguration) SetProductKey(value *string)() { + m.productKey = value +} +// SetTargetEdition sets the targetEdition property value. Windows 10 Edition type. +func (m *EditionUpgradeConfiguration) SetTargetEdition(value *Windows10EditionType)() { + m.targetEdition = value +} +// SetWindowsSMode sets the windowsSMode property value. The possible options to configure S mode unlock +func (m *EditionUpgradeConfiguration) SetWindowsSMode(value *WindowsSModeConfiguration)() { + m.windowsSMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_response.go new file mode 100644 index 000000000..31163f7a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditionUpgradeConfigurationCollectionResponse +type EditionUpgradeConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EditionUpgradeConfigurationable +} +// NewEditionUpgradeConfigurationCollectionResponse instantiates a new EditionUpgradeConfigurationCollectionResponse and sets the default values. +func NewEditionUpgradeConfigurationCollectionResponse()(*EditionUpgradeConfigurationCollectionResponse) { + m := &EditionUpgradeConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEditionUpgradeConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEditionUpgradeConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEditionUpgradeConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EditionUpgradeConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEditionUpgradeConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EditionUpgradeConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(EditionUpgradeConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EditionUpgradeConfigurationCollectionResponse) GetValue()([]EditionUpgradeConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EditionUpgradeConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EditionUpgradeConfigurationCollectionResponse) SetValue(value []EditionUpgradeConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_responseable.go new file mode 100644 index 000000000..a2e3b17b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edition_upgrade_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditionUpgradeConfigurationCollectionResponseable +type EditionUpgradeConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EditionUpgradeConfigurationable) + SetValue(value []EditionUpgradeConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/edition_upgrade_configurationable.go b/src/internal/connector/graph/betasdk/models/edition_upgrade_configurationable.go new file mode 100644 index 000000000..17f1ec24d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edition_upgrade_configurationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EditionUpgradeConfigurationable +type EditionUpgradeConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLicense()(*string) + GetLicenseType()(*EditionUpgradeLicenseType) + GetProductKey()(*string) + GetTargetEdition()(*Windows10EditionType) + GetWindowsSMode()(*WindowsSModeConfiguration) + SetLicense(value *string)() + SetLicenseType(value *EditionUpgradeLicenseType)() + SetProductKey(value *string)() + SetTargetEdition(value *Windows10EditionType)() + SetWindowsSMode(value *WindowsSModeConfiguration)() +} diff --git a/src/internal/connector/graph/betasdk/models/edition_upgrade_license_type.go b/src/internal/connector/graph/betasdk/models/edition_upgrade_license_type.go new file mode 100644 index 000000000..e88706c32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/edition_upgrade_license_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EditionUpgradeLicenseType int + +const ( + // Product Key Type + PRODUCTKEY_EDITIONUPGRADELICENSETYPE EditionUpgradeLicenseType = iota + // License File Type + LICENSEFILE_EDITIONUPGRADELICENSETYPE + // NotConfigured + NOTCONFIGURED_EDITIONUPGRADELICENSETYPE +) + +func (i EditionUpgradeLicenseType) String() string { + return []string{"productKey", "licenseFile", "notConfigured"}[i] +} +func ParseEditionUpgradeLicenseType(v string) (interface{}, error) { + result := PRODUCTKEY_EDITIONUPGRADELICENSETYPE + switch v { + case "productKey": + result = PRODUCTKEY_EDITIONUPGRADELICENSETYPE + case "licenseFile": + result = LICENSEFILE_EDITIONUPGRADELICENSETYPE + case "notConfigured": + result = NOTCONFIGURED_EDITIONUPGRADELICENSETYPE + default: + return 0, errors.New("Unknown EditionUpgradeLicenseType value: " + v) + } + return &result, nil +} +func SerializeEditionUpgradeLicenseType(values []EditionUpgradeLicenseType) []string { + 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/education_add_to_calendar_options.go b/src/internal/connector/graph/betasdk/models/education_add_to_calendar_options.go new file mode 100644 index 000000000..bd6415d43 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_add_to_calendar_options.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationAddToCalendarOptions int + +const ( + NONE_EDUCATIONADDTOCALENDAROPTIONS EducationAddToCalendarOptions = iota + STUDENTSANDPUBLISHER_EDUCATIONADDTOCALENDAROPTIONS + STUDENTSANDTEAMOWNERS_EDUCATIONADDTOCALENDAROPTIONS + UNKNOWNFUTUREVALUE_EDUCATIONADDTOCALENDAROPTIONS + STUDENTSONLY_EDUCATIONADDTOCALENDAROPTIONS +) + +func (i EducationAddToCalendarOptions) String() string { + return []string{"none", "studentsAndPublisher", "studentsAndTeamOwners", "unknownFutureValue", "studentsOnly"}[i] +} +func ParseEducationAddToCalendarOptions(v string) (interface{}, error) { + result := NONE_EDUCATIONADDTOCALENDAROPTIONS + switch v { + case "none": + result = NONE_EDUCATIONADDTOCALENDAROPTIONS + case "studentsAndPublisher": + result = STUDENTSANDPUBLISHER_EDUCATIONADDTOCALENDAROPTIONS + case "studentsAndTeamOwners": + result = STUDENTSANDTEAMOWNERS_EDUCATIONADDTOCALENDAROPTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONADDTOCALENDAROPTIONS + case "studentsOnly": + result = STUDENTSONLY_EDUCATIONADDTOCALENDAROPTIONS + default: + return 0, errors.New("Unknown EducationAddToCalendarOptions value: " + v) + } + return &result, nil +} +func SerializeEducationAddToCalendarOptions(values []EducationAddToCalendarOptions) []string { + 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/education_added_student_action.go b/src/internal/connector/graph/betasdk/models/education_added_student_action.go new file mode 100644 index 000000000..1a2fe3943 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_added_student_action.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationAddedStudentAction int + +const ( + NONE_EDUCATIONADDEDSTUDENTACTION EducationAddedStudentAction = iota + ASSIGNIFOPEN_EDUCATIONADDEDSTUDENTACTION + UNKNOWNFUTUREVALUE_EDUCATIONADDEDSTUDENTACTION +) + +func (i EducationAddedStudentAction) String() string { + return []string{"none", "assignIfOpen", "unknownFutureValue"}[i] +} +func ParseEducationAddedStudentAction(v string) (interface{}, error) { + result := NONE_EDUCATIONADDEDSTUDENTACTION + switch v { + case "none": + result = NONE_EDUCATIONADDEDSTUDENTACTION + case "assignIfOpen": + result = ASSIGNIFOPEN_EDUCATIONADDEDSTUDENTACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONADDEDSTUDENTACTION + default: + return 0, errors.New("Unknown EducationAddedStudentAction value: " + v) + } + return &result, nil +} +func SerializeEducationAddedStudentAction(values []EducationAddedStudentAction) []string { + 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/education_assignment.go b/src/internal/connector/graph/betasdk/models/education_assignment.go new file mode 100644 index 000000000..a2a2cb02d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment.go @@ -0,0 +1,677 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignment +type EducationAssignment struct { + Entity + // Optional field to control the assignment behavior for students who are added after the assignment is published. If not specified, defaults to none. Supported values are: none, assignIfOpen. For example, a teacher can use assignIfOpen to indicate that an assignment should be assigned to any new student who joins the class while the assignment is still open, and none to indicate that an assignment should not be assigned to new students. + addedStudentAction *EducationAddedStudentAction + // Optional field to control the assignment behavior for adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. + addToCalendarAction *EducationAddToCalendarOptions + // Identifies whether students can submit after the due date. If this property is not specified during create, it defaults to true. + allowLateSubmissions *bool + // Identifies whether students can add their own resources to a submission or if they can only modify resources added by the teacher. + allowStudentsToAddResourcesToSubmission *bool + // The date when the assignment should become active. If in the future, the assignment is not shown to the student until this date. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + assignDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The moment that the assignment was published to students and the assignment shows up on the students timeline. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + assignedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Which users, or whole class should receive a submission object once the assignment is published. + assignTo EducationAssignmentRecipientable + // When set, enables users to easily find assignments of a given type. Read-only. Nullable. + categories []EducationCategoryable + // Class which this assignment belongs. + classId *string + // Date when the assignment will be closed for submissions. This is an optional field that can be null if the assignment does not allowLateSubmissions or when the closeDateTime is the same as the dueDateTime. But if specified, then the closeDateTime must be greater than or equal to the dueDateTime. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + closeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Who created the assignment. + createdBy IdentitySetable + // Moment when the assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the assignment. + displayName *string + // Date when the students assignment is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + dueDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Folder URL where all the feedback file resources for this assignment are stored. + feedbackResourcesFolderUrl *string + // How the assignment will be graded. + grading EducationAssignmentGradeTypeable + // Instructions for the assignment. This along with the display name tell the student what to do. + instructions EducationItemBodyable + // Who last modified the assignment. + lastModifiedBy IdentitySetable + // Moment when the assignment was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional field to specify the URL of the channel to post the assignment publish notification. If not specified or null, defaults to the General channel. This field only applies to assignments where the assignTo value is educationAssignmentClassRecipient. Updating the notificationChannelUrl is not allowed after the assignment has been published. + notificationChannelUrl *string + // Learning objects that are associated with this assignment. Only teachers can modify this list. Nullable. + resources []EducationAssignmentResourceable + // Folder URL where all the file resources for this assignment are stored. + resourcesFolderUrl *string + // When set, the grading rubric attached to this assignment. + rubric EducationRubricable + // Status of the Assignment. You can not PATCH this value. Possible values are: draft, scheduled, published, assigned. + status *EducationAssignmentStatus + // Once published, there is a submission object for each student representing their work and grade. Read-only. Nullable. + submissions []EducationSubmissionable + // The deep link URL for the given assignment. + webUrl *string +} +// NewEducationAssignment instantiates a new EducationAssignment and sets the default values. +func NewEducationAssignment()(*EducationAssignment) { + m := &EducationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignment(), nil +} +// GetAddedStudentAction gets the addedStudentAction property value. Optional field to control the assignment behavior for students who are added after the assignment is published. If not specified, defaults to none. Supported values are: none, assignIfOpen. For example, a teacher can use assignIfOpen to indicate that an assignment should be assigned to any new student who joins the class while the assignment is still open, and none to indicate that an assignment should not be assigned to new students. +func (m *EducationAssignment) GetAddedStudentAction()(*EducationAddedStudentAction) { + return m.addedStudentAction +} +// GetAddToCalendarAction gets the addToCalendarAction property value. Optional field to control the assignment behavior for adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. +func (m *EducationAssignment) GetAddToCalendarAction()(*EducationAddToCalendarOptions) { + return m.addToCalendarAction +} +// GetAllowLateSubmissions gets the allowLateSubmissions property value. Identifies whether students can submit after the due date. If this property is not specified during create, it defaults to true. +func (m *EducationAssignment) GetAllowLateSubmissions()(*bool) { + return m.allowLateSubmissions +} +// GetAllowStudentsToAddResourcesToSubmission gets the allowStudentsToAddResourcesToSubmission property value. Identifies whether students can add their own resources to a submission or if they can only modify resources added by the teacher. +func (m *EducationAssignment) GetAllowStudentsToAddResourcesToSubmission()(*bool) { + return m.allowStudentsToAddResourcesToSubmission +} +// GetAssignDateTime gets the assignDateTime property value. The date when the assignment should become active. If in the future, the assignment is not shown to the student until this date. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetAssignDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.assignDateTime +} +// GetAssignedDateTime gets the assignedDateTime property value. The moment that the assignment was published to students and the assignment shows up on the students timeline. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetAssignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.assignedDateTime +} +// GetAssignTo gets the assignTo property value. Which users, or whole class should receive a submission object once the assignment is published. +func (m *EducationAssignment) GetAssignTo()(EducationAssignmentRecipientable) { + return m.assignTo +} +// GetCategories gets the categories property value. When set, enables users to easily find assignments of a given type. Read-only. Nullable. +func (m *EducationAssignment) GetCategories()([]EducationCategoryable) { + return m.categories +} +// GetClassId gets the classId property value. Class which this assignment belongs. +func (m *EducationAssignment) GetClassId()(*string) { + return m.classId +} +// GetCloseDateTime gets the closeDateTime property value. Date when the assignment will be closed for submissions. This is an optional field that can be null if the assignment does not allowLateSubmissions or when the closeDateTime is the same as the dueDateTime. But if specified, then the closeDateTime must be greater than or equal to the dueDateTime. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetCloseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closeDateTime +} +// GetCreatedBy gets the createdBy property value. Who created the assignment. +func (m *EducationAssignment) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Moment when the assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Name of the assignment. +func (m *EducationAssignment) GetDisplayName()(*string) { + return m.displayName +} +// GetDueDateTime gets the dueDateTime property value. Date when the students assignment is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dueDateTime +} +// GetFeedbackResourcesFolderUrl gets the feedbackResourcesFolderUrl property value. Folder URL where all the feedback file resources for this assignment are stored. +func (m *EducationAssignment) GetFeedbackResourcesFolderUrl()(*string) { + return m.feedbackResourcesFolderUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["addedStudentAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationAddedStudentAction) + if err != nil { + return err + } + if val != nil { + m.SetAddedStudentAction(val.(*EducationAddedStudentAction)) + } + return nil + } + res["addToCalendarAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationAddToCalendarOptions) + if err != nil { + return err + } + if val != nil { + m.SetAddToCalendarAction(val.(*EducationAddToCalendarOptions)) + } + return nil + } + res["allowLateSubmissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowLateSubmissions(val) + } + return nil + } + res["allowStudentsToAddResourcesToSubmission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowStudentsToAddResourcesToSubmission(val) + } + return nil + } + res["assignDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignDateTime(val) + } + return nil + } + res["assignedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedDateTime(val) + } + return nil + } + res["assignTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignTo(val.(EducationAssignmentRecipientable)) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(EducationCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["classId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClassId(val) + } + return nil + } + res["closeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCloseDateTime(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["feedbackResourcesFolderUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFeedbackResourcesFolderUrl(val) + } + return nil + } + res["grading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentGradeTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrading(val.(EducationAssignmentGradeTypeable)) + } + return nil + } + res["instructions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstructions(val.(EducationItemBodyable)) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["notificationChannelUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationChannelUrl(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationAssignmentResourceable, len(val)) + for i, v := range val { + res[i] = v.(EducationAssignmentResourceable) + } + m.SetResources(res) + } + return nil + } + res["resourcesFolderUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourcesFolderUrl(val) + } + return nil + } + res["rubric"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationRubricFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRubric(val.(EducationRubricable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationAssignmentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*EducationAssignmentStatus)) + } + return nil + } + res["submissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EducationSubmissionable) + } + m.SetSubmissions(res) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetGrading gets the grading property value. How the assignment will be graded. +func (m *EducationAssignment) GetGrading()(EducationAssignmentGradeTypeable) { + return m.grading +} +// GetInstructions gets the instructions property value. Instructions for the assignment. This along with the display name tell the student what to do. +func (m *EducationAssignment) GetInstructions()(EducationItemBodyable) { + return m.instructions +} +// GetLastModifiedBy gets the lastModifiedBy property value. Who last modified the assignment. +func (m *EducationAssignment) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Moment when the assignment was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNotificationChannelUrl gets the notificationChannelUrl property value. Optional field to specify the URL of the channel to post the assignment publish notification. If not specified or null, defaults to the General channel. This field only applies to assignments where the assignTo value is educationAssignmentClassRecipient. Updating the notificationChannelUrl is not allowed after the assignment has been published. +func (m *EducationAssignment) GetNotificationChannelUrl()(*string) { + return m.notificationChannelUrl +} +// GetResources gets the resources property value. Learning objects that are associated with this assignment. Only teachers can modify this list. Nullable. +func (m *EducationAssignment) GetResources()([]EducationAssignmentResourceable) { + return m.resources +} +// GetResourcesFolderUrl gets the resourcesFolderUrl property value. Folder URL where all the file resources for this assignment are stored. +func (m *EducationAssignment) GetResourcesFolderUrl()(*string) { + return m.resourcesFolderUrl +} +// GetRubric gets the rubric property value. When set, the grading rubric attached to this assignment. +func (m *EducationAssignment) GetRubric()(EducationRubricable) { + return m.rubric +} +// GetStatus gets the status property value. Status of the Assignment. You can not PATCH this value. Possible values are: draft, scheduled, published, assigned. +func (m *EducationAssignment) GetStatus()(*EducationAssignmentStatus) { + return m.status +} +// GetSubmissions gets the submissions property value. Once published, there is a submission object for each student representing their work and grade. Read-only. Nullable. +func (m *EducationAssignment) GetSubmissions()([]EducationSubmissionable) { + return m.submissions +} +// GetWebUrl gets the webUrl property value. The deep link URL for the given assignment. +func (m *EducationAssignment) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *EducationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAddedStudentAction() != nil { + cast := (*m.GetAddedStudentAction()).String() + err = writer.WriteStringValue("addedStudentAction", &cast) + if err != nil { + return err + } + } + if m.GetAddToCalendarAction() != nil { + cast := (*m.GetAddToCalendarAction()).String() + err = writer.WriteStringValue("addToCalendarAction", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowLateSubmissions", m.GetAllowLateSubmissions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowStudentsToAddResourcesToSubmission", m.GetAllowStudentsToAddResourcesToSubmission()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignTo", m.GetAssignTo()) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("classId", m.GetClassId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("closeDateTime", m.GetCloseDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("grading", m.GetGrading()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("instructions", m.GetInstructions()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notificationChannelUrl", m.GetNotificationChannelUrl()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rubric", m.GetRubric()) + if err != nil { + return err + } + } + if m.GetSubmissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubmissions())) + for i, v := range m.GetSubmissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("submissions", cast) + if err != nil { + return err + } + } + return nil +} +// SetAddedStudentAction sets the addedStudentAction property value. Optional field to control the assignment behavior for students who are added after the assignment is published. If not specified, defaults to none. Supported values are: none, assignIfOpen. For example, a teacher can use assignIfOpen to indicate that an assignment should be assigned to any new student who joins the class while the assignment is still open, and none to indicate that an assignment should not be assigned to new students. +func (m *EducationAssignment) SetAddedStudentAction(value *EducationAddedStudentAction)() { + m.addedStudentAction = value +} +// SetAddToCalendarAction sets the addToCalendarAction property value. Optional field to control the assignment behavior for adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. +func (m *EducationAssignment) SetAddToCalendarAction(value *EducationAddToCalendarOptions)() { + m.addToCalendarAction = value +} +// SetAllowLateSubmissions sets the allowLateSubmissions property value. Identifies whether students can submit after the due date. If this property is not specified during create, it defaults to true. +func (m *EducationAssignment) SetAllowLateSubmissions(value *bool)() { + m.allowLateSubmissions = value +} +// SetAllowStudentsToAddResourcesToSubmission sets the allowStudentsToAddResourcesToSubmission property value. Identifies whether students can add their own resources to a submission or if they can only modify resources added by the teacher. +func (m *EducationAssignment) SetAllowStudentsToAddResourcesToSubmission(value *bool)() { + m.allowStudentsToAddResourcesToSubmission = value +} +// SetAssignDateTime sets the assignDateTime property value. The date when the assignment should become active. If in the future, the assignment is not shown to the student until this date. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetAssignDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.assignDateTime = value +} +// SetAssignedDateTime sets the assignedDateTime property value. The moment that the assignment was published to students and the assignment shows up on the students timeline. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetAssignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.assignedDateTime = value +} +// SetAssignTo sets the assignTo property value. Which users, or whole class should receive a submission object once the assignment is published. +func (m *EducationAssignment) SetAssignTo(value EducationAssignmentRecipientable)() { + m.assignTo = value +} +// SetCategories sets the categories property value. When set, enables users to easily find assignments of a given type. Read-only. Nullable. +func (m *EducationAssignment) SetCategories(value []EducationCategoryable)() { + m.categories = value +} +// SetClassId sets the classId property value. Class which this assignment belongs. +func (m *EducationAssignment) SetClassId(value *string)() { + m.classId = value +} +// SetCloseDateTime sets the closeDateTime property value. Date when the assignment will be closed for submissions. This is an optional field that can be null if the assignment does not allowLateSubmissions or when the closeDateTime is the same as the dueDateTime. But if specified, then the closeDateTime must be greater than or equal to the dueDateTime. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetCloseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closeDateTime = value +} +// SetCreatedBy sets the createdBy property value. Who created the assignment. +func (m *EducationAssignment) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Moment when the assignment was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Name of the assignment. +func (m *EducationAssignment) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDueDateTime sets the dueDateTime property value. Date when the students assignment is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dueDateTime = value +} +// SetFeedbackResourcesFolderUrl sets the feedbackResourcesFolderUrl property value. Folder URL where all the feedback file resources for this assignment are stored. +func (m *EducationAssignment) SetFeedbackResourcesFolderUrl(value *string)() { + m.feedbackResourcesFolderUrl = value +} +// SetGrading sets the grading property value. How the assignment will be graded. +func (m *EducationAssignment) SetGrading(value EducationAssignmentGradeTypeable)() { + m.grading = value +} +// SetInstructions sets the instructions property value. Instructions for the assignment. This along with the display name tell the student what to do. +func (m *EducationAssignment) SetInstructions(value EducationItemBodyable)() { + m.instructions = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Who last modified the assignment. +func (m *EducationAssignment) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Moment when the assignment was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNotificationChannelUrl sets the notificationChannelUrl property value. Optional field to specify the URL of the channel to post the assignment publish notification. If not specified or null, defaults to the General channel. This field only applies to assignments where the assignTo value is educationAssignmentClassRecipient. Updating the notificationChannelUrl is not allowed after the assignment has been published. +func (m *EducationAssignment) SetNotificationChannelUrl(value *string)() { + m.notificationChannelUrl = value +} +// SetResources sets the resources property value. Learning objects that are associated with this assignment. Only teachers can modify this list. Nullable. +func (m *EducationAssignment) SetResources(value []EducationAssignmentResourceable)() { + m.resources = value +} +// SetResourcesFolderUrl sets the resourcesFolderUrl property value. Folder URL where all the file resources for this assignment are stored. +func (m *EducationAssignment) SetResourcesFolderUrl(value *string)() { + m.resourcesFolderUrl = value +} +// SetRubric sets the rubric property value. When set, the grading rubric attached to this assignment. +func (m *EducationAssignment) SetRubric(value EducationRubricable)() { + m.rubric = value +} +// SetStatus sets the status property value. Status of the Assignment. You can not PATCH this value. Possible values are: draft, scheduled, published, assigned. +func (m *EducationAssignment) SetStatus(value *EducationAssignmentStatus)() { + m.status = value +} +// SetSubmissions sets the submissions property value. Once published, there is a submission object for each student representing their work and grade. Read-only. Nullable. +func (m *EducationAssignment) SetSubmissions(value []EducationSubmissionable)() { + m.submissions = value +} +// SetWebUrl sets the webUrl property value. The deep link URL for the given assignment. +func (m *EducationAssignment) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_class_recipient.go b/src/internal/connector/graph/betasdk/models/education_assignment_class_recipient.go new file mode 100644 index 000000000..4db8cf2a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_class_recipient.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentClassRecipient +type EducationAssignmentClassRecipient struct { + EducationAssignmentRecipient +} +// NewEducationAssignmentClassRecipient instantiates a new EducationAssignmentClassRecipient and sets the default values. +func NewEducationAssignmentClassRecipient()(*EducationAssignmentClassRecipient) { + m := &EducationAssignmentClassRecipient{ + EducationAssignmentRecipient: *NewEducationAssignmentRecipient(), + } + odataTypeValue := "#microsoft.graph.educationAssignmentClassRecipient"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationAssignmentClassRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentClassRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentClassRecipient(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentClassRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationAssignmentRecipient.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EducationAssignmentClassRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationAssignmentRecipient.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_class_recipientable.go b/src/internal/connector/graph/betasdk/models/education_assignment_class_recipientable.go new file mode 100644 index 000000000..848f22011 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_class_recipientable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentClassRecipientable +type EducationAssignmentClassRecipientable interface { + EducationAssignmentRecipientable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/education_assignment_collection_response.go new file mode 100644 index 000000000..c7749d70d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentCollectionResponse +type EducationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationAssignmentable +} +// NewEducationAssignmentCollectionResponse instantiates a new EducationAssignmentCollectionResponse and sets the default values. +func NewEducationAssignmentCollectionResponse()(*EducationAssignmentCollectionResponse) { + m := &EducationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EducationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationAssignmentCollectionResponse) GetValue()([]EducationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationAssignmentCollectionResponse) SetValue(value []EducationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_assignment_collection_responseable.go new file mode 100644 index 000000000..a7a6a8a1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentCollectionResponseable +type EducationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationAssignmentable) + SetValue(value []EducationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_defaults.go b/src/internal/connector/graph/betasdk/models/education_assignment_defaults.go new file mode 100644 index 000000000..fd4c4f552 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_defaults.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentDefaults +type EducationAssignmentDefaults struct { + Entity + // Class-level default behavior for handling students who are added after the assignment is published. Possible values are: none, assignIfOpen. + addedStudentAction *EducationAddedStudentAction + // Optional field to control adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. + addToCalendarAction *EducationAddToCalendarOptions + // Class-level default value for due time field. Default value is 23:59:00. + dueTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // Default Teams channel to which notifications will be sent. Default value is null. + notificationChannelUrl *string +} +// NewEducationAssignmentDefaults instantiates a new EducationAssignmentDefaults and sets the default values. +func NewEducationAssignmentDefaults()(*EducationAssignmentDefaults) { + m := &EducationAssignmentDefaults{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationAssignmentDefaultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentDefaultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentDefaults(), nil +} +// GetAddedStudentAction gets the addedStudentAction property value. Class-level default behavior for handling students who are added after the assignment is published. Possible values are: none, assignIfOpen. +func (m *EducationAssignmentDefaults) GetAddedStudentAction()(*EducationAddedStudentAction) { + return m.addedStudentAction +} +// GetAddToCalendarAction gets the addToCalendarAction property value. Optional field to control adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. +func (m *EducationAssignmentDefaults) GetAddToCalendarAction()(*EducationAddToCalendarOptions) { + return m.addToCalendarAction +} +// GetDueTime gets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00. +func (m *EducationAssignmentDefaults) GetDueTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.dueTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentDefaults) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["addedStudentAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationAddedStudentAction) + if err != nil { + return err + } + if val != nil { + m.SetAddedStudentAction(val.(*EducationAddedStudentAction)) + } + return nil + } + res["addToCalendarAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationAddToCalendarOptions) + if err != nil { + return err + } + if val != nil { + m.SetAddToCalendarAction(val.(*EducationAddToCalendarOptions)) + } + return nil + } + res["dueTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDueTime(val) + } + return nil + } + res["notificationChannelUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationChannelUrl(val) + } + return nil + } + return res +} +// GetNotificationChannelUrl gets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null. +func (m *EducationAssignmentDefaults) GetNotificationChannelUrl()(*string) { + return m.notificationChannelUrl +} +// Serialize serializes information the current object +func (m *EducationAssignmentDefaults) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAddedStudentAction() != nil { + cast := (*m.GetAddedStudentAction()).String() + err = writer.WriteStringValue("addedStudentAction", &cast) + if err != nil { + return err + } + } + if m.GetAddToCalendarAction() != nil { + cast := (*m.GetAddToCalendarAction()).String() + err = writer.WriteStringValue("addToCalendarAction", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeOnlyValue("dueTime", m.GetDueTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notificationChannelUrl", m.GetNotificationChannelUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAddedStudentAction sets the addedStudentAction property value. Class-level default behavior for handling students who are added after the assignment is published. Possible values are: none, assignIfOpen. +func (m *EducationAssignmentDefaults) SetAddedStudentAction(value *EducationAddedStudentAction)() { + m.addedStudentAction = value +} +// SetAddToCalendarAction sets the addToCalendarAction property value. Optional field to control adding assignments to students' and teachers' calendars when the assignment is published. The possible values are: none, studentsAndPublisher, studentsAndTeamOwners, unknownFutureValue, and studentsOnly. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: studentsOnly. The default value is none. +func (m *EducationAssignmentDefaults) SetAddToCalendarAction(value *EducationAddToCalendarOptions)() { + m.addToCalendarAction = value +} +// SetDueTime sets the dueTime property value. Class-level default value for due time field. Default value is 23:59:00. +func (m *EducationAssignmentDefaults) SetDueTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.dueTime = value +} +// SetNotificationChannelUrl sets the notificationChannelUrl property value. Default Teams channel to which notifications will be sent. Default value is null. +func (m *EducationAssignmentDefaults) SetNotificationChannelUrl(value *string)() { + m.notificationChannelUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_defaultsable.go b/src/internal/connector/graph/betasdk/models/education_assignment_defaultsable.go new file mode 100644 index 000000000..650d243b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_defaultsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentDefaultsable +type EducationAssignmentDefaultsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedStudentAction()(*EducationAddedStudentAction) + GetAddToCalendarAction()(*EducationAddToCalendarOptions) + GetDueTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetNotificationChannelUrl()(*string) + SetAddedStudentAction(value *EducationAddedStudentAction)() + SetAddToCalendarAction(value *EducationAddToCalendarOptions)() + SetDueTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetNotificationChannelUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_grade.go b/src/internal/connector/graph/betasdk/models/education_assignment_grade.go new file mode 100644 index 000000000..e34c8dbf3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_grade.go @@ -0,0 +1,142 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGrade +type EducationAssignmentGrade struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // User who did the grading. + gradedBy IdentitySetable + // Moment in time when the grade was applied to this submission object. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + gradedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewEducationAssignmentGrade instantiates a new educationAssignmentGrade and sets the default values. +func NewEducationAssignmentGrade()(*EducationAssignmentGrade) { + m := &EducationAssignmentGrade{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationAssignmentGradeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentGradeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationAssignmentPointsGrade": + return NewEducationAssignmentPointsGrade(), nil + } + } + } + } + return NewEducationAssignmentGrade(), 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 *EducationAssignmentGrade) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentGrade) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["gradedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGradedBy(val.(IdentitySetable)) + } + return nil + } + res["gradedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGradedDateTime(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 + } + return res +} +// GetGradedBy gets the gradedBy property value. User who did the grading. +func (m *EducationAssignmentGrade) GetGradedBy()(IdentitySetable) { + return m.gradedBy +} +// GetGradedDateTime gets the gradedDateTime property value. Moment in time when the grade was applied to this submission object. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignmentGrade) GetGradedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.gradedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationAssignmentGrade) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationAssignmentGrade) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("gradedBy", m.GetGradedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("gradedDateTime", m.GetGradedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationAssignmentGrade) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetGradedBy sets the gradedBy property value. User who did the grading. +func (m *EducationAssignmentGrade) SetGradedBy(value IdentitySetable)() { + m.gradedBy = value +} +// SetGradedDateTime sets the gradedDateTime property value. Moment in time when the grade was applied to this submission object. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationAssignmentGrade) SetGradedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.gradedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationAssignmentGrade) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_grade_type.go b/src/internal/connector/graph/betasdk/models/education_assignment_grade_type.go new file mode 100644 index 000000000..4605c4a6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_grade_type.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGradeType +type EducationAssignmentGradeType 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 OdataType property + odataType *string +} +// NewEducationAssignmentGradeType instantiates a new educationAssignmentGradeType and sets the default values. +func NewEducationAssignmentGradeType()(*EducationAssignmentGradeType) { + m := &EducationAssignmentGradeType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationAssignmentGradeTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentGradeTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationAssignmentPointsGradeType": + return NewEducationAssignmentPointsGradeType(), nil + } + } + } + } + return NewEducationAssignmentGradeType(), 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 *EducationAssignmentGradeType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentGradeType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationAssignmentGradeType) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationAssignmentGradeType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationAssignmentGradeType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationAssignmentGradeType) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_grade_typeable.go b/src/internal/connector/graph/betasdk/models/education_assignment_grade_typeable.go new file mode 100644 index 000000000..03a3d39d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_grade_typeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGradeTypeable +type EducationAssignmentGradeTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_gradeable.go b/src/internal/connector/graph/betasdk/models/education_assignment_gradeable.go new file mode 100644 index 000000000..c33d9e0cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_gradeable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGradeable +type EducationAssignmentGradeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGradedBy()(IdentitySetable) + GetGradedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetGradedBy(value IdentitySetable)() + SetGradedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_group_recipient.go b/src/internal/connector/graph/betasdk/models/education_assignment_group_recipient.go new file mode 100644 index 000000000..e46b96c73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_group_recipient.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGroupRecipient +type EducationAssignmentGroupRecipient struct { + EducationAssignmentRecipient +} +// NewEducationAssignmentGroupRecipient instantiates a new EducationAssignmentGroupRecipient and sets the default values. +func NewEducationAssignmentGroupRecipient()(*EducationAssignmentGroupRecipient) { + m := &EducationAssignmentGroupRecipient{ + EducationAssignmentRecipient: *NewEducationAssignmentRecipient(), + } + odataTypeValue := "#microsoft.graph.educationAssignmentGroupRecipient"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationAssignmentGroupRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentGroupRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentGroupRecipient(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentGroupRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationAssignmentRecipient.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EducationAssignmentGroupRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationAssignmentRecipient.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_group_recipientable.go b/src/internal/connector/graph/betasdk/models/education_assignment_group_recipientable.go new file mode 100644 index 000000000..0e89e73bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_group_recipientable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentGroupRecipientable +type EducationAssignmentGroupRecipientable interface { + EducationAssignmentRecipientable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipient.go b/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipient.go new file mode 100644 index 000000000..88aaa921d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipient.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentIndividualRecipient +type EducationAssignmentIndividualRecipient struct { + EducationAssignmentRecipient + // A collection of ids of the recipients. + recipients []string +} +// NewEducationAssignmentIndividualRecipient instantiates a new EducationAssignmentIndividualRecipient and sets the default values. +func NewEducationAssignmentIndividualRecipient()(*EducationAssignmentIndividualRecipient) { + m := &EducationAssignmentIndividualRecipient{ + EducationAssignmentRecipient: *NewEducationAssignmentRecipient(), + } + odataTypeValue := "#microsoft.graph.educationAssignmentIndividualRecipient"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationAssignmentIndividualRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentIndividualRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentIndividualRecipient(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentIndividualRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationAssignmentRecipient.GetFieldDeserializers() + res["recipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRecipients(res) + } + return nil + } + return res +} +// GetRecipients gets the recipients property value. A collection of ids of the recipients. +func (m *EducationAssignmentIndividualRecipient) GetRecipients()([]string) { + return m.recipients +} +// Serialize serializes information the current object +func (m *EducationAssignmentIndividualRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationAssignmentRecipient.Serialize(writer) + if err != nil { + return err + } + if m.GetRecipients() != nil { + err = writer.WriteCollectionOfStringValues("recipients", m.GetRecipients()) + if err != nil { + return err + } + } + return nil +} +// SetRecipients sets the recipients property value. A collection of ids of the recipients. +func (m *EducationAssignmentIndividualRecipient) SetRecipients(value []string)() { + m.recipients = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipientable.go b/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipientable.go new file mode 100644 index 000000000..57c503f83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_individual_recipientable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentIndividualRecipientable +type EducationAssignmentIndividualRecipientable interface { + EducationAssignmentRecipientable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRecipients()([]string) + SetRecipients(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_points_grade.go b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade.go new file mode 100644 index 000000000..5c6723813 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentPointsGrade +type EducationAssignmentPointsGrade struct { + EducationAssignmentGrade + // Number of points a teacher is giving this submission object. + points *float32 +} +// NewEducationAssignmentPointsGrade instantiates a new EducationAssignmentPointsGrade and sets the default values. +func NewEducationAssignmentPointsGrade()(*EducationAssignmentPointsGrade) { + m := &EducationAssignmentPointsGrade{ + EducationAssignmentGrade: *NewEducationAssignmentGrade(), + } + odataTypeValue := "#microsoft.graph.educationAssignmentPointsGrade"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationAssignmentPointsGradeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentPointsGradeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentPointsGrade(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentPointsGrade) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationAssignmentGrade.GetFieldDeserializers() + res["points"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetPoints(val) + } + return nil + } + return res +} +// GetPoints gets the points property value. Number of points a teacher is giving this submission object. +func (m *EducationAssignmentPointsGrade) GetPoints()(*float32) { + return m.points +} +// Serialize serializes information the current object +func (m *EducationAssignmentPointsGrade) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationAssignmentGrade.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat32Value("points", m.GetPoints()) + if err != nil { + return err + } + } + return nil +} +// SetPoints sets the points property value. Number of points a teacher is giving this submission object. +func (m *EducationAssignmentPointsGrade) SetPoints(value *float32)() { + m.points = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_type.go b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_type.go new file mode 100644 index 000000000..9f76b282c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_type.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentPointsGradeType +type EducationAssignmentPointsGradeType struct { + EducationAssignmentGradeType + // Max points possible for this assignment. + maxPoints *float32 +} +// NewEducationAssignmentPointsGradeType instantiates a new EducationAssignmentPointsGradeType and sets the default values. +func NewEducationAssignmentPointsGradeType()(*EducationAssignmentPointsGradeType) { + m := &EducationAssignmentPointsGradeType{ + EducationAssignmentGradeType: *NewEducationAssignmentGradeType(), + } + odataTypeValue := "#microsoft.graph.educationAssignmentPointsGradeType"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationAssignmentPointsGradeTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentPointsGradeTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentPointsGradeType(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentPointsGradeType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationAssignmentGradeType.GetFieldDeserializers() + res["maxPoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxPoints(val) + } + return nil + } + return res +} +// GetMaxPoints gets the maxPoints property value. Max points possible for this assignment. +func (m *EducationAssignmentPointsGradeType) GetMaxPoints()(*float32) { + return m.maxPoints +} +// Serialize serializes information the current object +func (m *EducationAssignmentPointsGradeType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationAssignmentGradeType.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat32Value("maxPoints", m.GetMaxPoints()) + if err != nil { + return err + } + } + return nil +} +// SetMaxPoints sets the maxPoints property value. Max points possible for this assignment. +func (m *EducationAssignmentPointsGradeType) SetMaxPoints(value *float32)() { + m.maxPoints = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_typeable.go b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_typeable.go new file mode 100644 index 000000000..e0c762be7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_points_grade_typeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentPointsGradeTypeable +type EducationAssignmentPointsGradeTypeable interface { + EducationAssignmentGradeTypeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxPoints()(*float32) + SetMaxPoints(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_points_gradeable.go b/src/internal/connector/graph/betasdk/models/education_assignment_points_gradeable.go new file mode 100644 index 000000000..053e120bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_points_gradeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentPointsGradeable +type EducationAssignmentPointsGradeable interface { + EducationAssignmentGradeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPoints()(*float32) + SetPoints(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_recipient.go b/src/internal/connector/graph/betasdk/models/education_assignment_recipient.go new file mode 100644 index 000000000..a4dcffc99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_recipient.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentRecipient +type EducationAssignmentRecipient 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 OdataType property + odataType *string +} +// NewEducationAssignmentRecipient instantiates a new educationAssignmentRecipient and sets the default values. +func NewEducationAssignmentRecipient()(*EducationAssignmentRecipient) { + m := &EducationAssignmentRecipient{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationAssignmentRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationAssignmentClassRecipient": + return NewEducationAssignmentClassRecipient(), nil + case "#microsoft.graph.educationAssignmentGroupRecipient": + return NewEducationAssignmentGroupRecipient(), nil + case "#microsoft.graph.educationAssignmentIndividualRecipient": + return NewEducationAssignmentIndividualRecipient(), nil + } + } + } + } + return NewEducationAssignmentRecipient(), 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 *EducationAssignmentRecipient) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationAssignmentRecipient) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationAssignmentRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationAssignmentRecipient) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationAssignmentRecipient) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_recipientable.go b/src/internal/connector/graph/betasdk/models/education_assignment_recipientable.go new file mode 100644 index 000000000..69c80c41c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_recipientable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentRecipientable +type EducationAssignmentRecipientable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_resource.go b/src/internal/connector/graph/betasdk/models/education_assignment_resource.go new file mode 100644 index 000000000..02d6a8439 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_resource.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentResource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationAssignmentResource struct { + Entity + // Indicates whether this resource should be copied to each student submission for modification and submission. Required + distributeForStudentWork *bool + // Resource object that has been associated with this assignment. + resource EducationResourceable +} +// NewEducationAssignmentResource instantiates a new educationAssignmentResource and sets the default values. +func NewEducationAssignmentResource()(*EducationAssignmentResource) { + m := &EducationAssignmentResource{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationAssignmentResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentResource(), nil +} +// GetDistributeForStudentWork gets the distributeForStudentWork property value. Indicates whether this resource should be copied to each student submission for modification and submission. Required +func (m *EducationAssignmentResource) GetDistributeForStudentWork()(*bool) { + return m.distributeForStudentWork +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["distributeForStudentWork"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDistributeForStudentWork(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(EducationResourceable)) + } + return nil + } + return res +} +// GetResource gets the resource property value. Resource object that has been associated with this assignment. +func (m *EducationAssignmentResource) GetResource()(EducationResourceable) { + return m.resource +} +// Serialize serializes information the current object +func (m *EducationAssignmentResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("distributeForStudentWork", m.GetDistributeForStudentWork()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + return nil +} +// SetDistributeForStudentWork sets the distributeForStudentWork property value. Indicates whether this resource should be copied to each student submission for modification and submission. Required +func (m *EducationAssignmentResource) SetDistributeForStudentWork(value *bool)() { + m.distributeForStudentWork = value +} +// SetResource sets the resource property value. Resource object that has been associated with this assignment. +func (m *EducationAssignmentResource) SetResource(value EducationResourceable)() { + m.resource = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_response.go new file mode 100644 index 000000000..23f199f4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentResourceCollectionResponse +type EducationAssignmentResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationAssignmentResourceable +} +// NewEducationAssignmentResourceCollectionResponse instantiates a new EducationAssignmentResourceCollectionResponse and sets the default values. +func NewEducationAssignmentResourceCollectionResponse()(*EducationAssignmentResourceCollectionResponse) { + m := &EducationAssignmentResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationAssignmentResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationAssignmentResourceable, len(val)) + for i, v := range val { + res[i] = v.(EducationAssignmentResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationAssignmentResourceCollectionResponse) GetValue()([]EducationAssignmentResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationAssignmentResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationAssignmentResourceCollectionResponse) SetValue(value []EducationAssignmentResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_responseable.go new file mode 100644 index 000000000..88f89d984 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentResourceCollectionResponseable +type EducationAssignmentResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationAssignmentResourceable) + SetValue(value []EducationAssignmentResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_resourceable.go b/src/internal/connector/graph/betasdk/models/education_assignment_resourceable.go new file mode 100644 index 000000000..28aa24fe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_resourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentResourceable +type EducationAssignmentResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDistributeForStudentWork()(*bool) + GetResource()(EducationResourceable) + SetDistributeForStudentWork(value *bool)() + SetResource(value EducationResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_settings.go b/src/internal/connector/graph/betasdk/models/education_assignment_settings.go new file mode 100644 index 000000000..51fa05474 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_settings.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentSettings +type EducationAssignmentSettings struct { + Entity + // Indicates whether turn-in celebration animation will be shown. A value of true indicates that the animation will not be shown. Default value is false. + submissionAnimationDisabled *bool +} +// NewEducationAssignmentSettings instantiates a new EducationAssignmentSettings and sets the default values. +func NewEducationAssignmentSettings()(*EducationAssignmentSettings) { + m := &EducationAssignmentSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["submissionAnimationDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmissionAnimationDisabled(val) + } + return nil + } + return res +} +// GetSubmissionAnimationDisabled gets the submissionAnimationDisabled property value. Indicates whether turn-in celebration animation will be shown. A value of true indicates that the animation will not be shown. Default value is false. +func (m *EducationAssignmentSettings) GetSubmissionAnimationDisabled()(*bool) { + return m.submissionAnimationDisabled +} +// Serialize serializes information the current object +func (m *EducationAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("submissionAnimationDisabled", m.GetSubmissionAnimationDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetSubmissionAnimationDisabled sets the submissionAnimationDisabled property value. Indicates whether turn-in celebration animation will be shown. A value of true indicates that the animation will not be shown. Default value is false. +func (m *EducationAssignmentSettings) SetSubmissionAnimationDisabled(value *bool)() { + m.submissionAnimationDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/education_assignment_settingsable.go new file mode 100644 index 000000000..c1c91d042 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentSettingsable +type EducationAssignmentSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSubmissionAnimationDisabled()(*bool) + SetSubmissionAnimationDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_assignment_status.go b/src/internal/connector/graph/betasdk/models/education_assignment_status.go new file mode 100644 index 000000000..6707a3974 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignment_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationAssignmentStatus int + +const ( + DRAFT_EDUCATIONASSIGNMENTSTATUS EducationAssignmentStatus = iota + PUBLISHED_EDUCATIONASSIGNMENTSTATUS + ASSIGNED_EDUCATIONASSIGNMENTSTATUS + UNKNOWNFUTUREVALUE_EDUCATIONASSIGNMENTSTATUS +) + +func (i EducationAssignmentStatus) String() string { + return []string{"draft", "published", "assigned", "unknownFutureValue"}[i] +} +func ParseEducationAssignmentStatus(v string) (interface{}, error) { + result := DRAFT_EDUCATIONASSIGNMENTSTATUS + switch v { + case "draft": + result = DRAFT_EDUCATIONASSIGNMENTSTATUS + case "published": + result = PUBLISHED_EDUCATIONASSIGNMENTSTATUS + case "assigned": + result = ASSIGNED_EDUCATIONASSIGNMENTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONASSIGNMENTSTATUS + default: + return 0, errors.New("Unknown EducationAssignmentStatus value: " + v) + } + return &result, nil +} +func SerializeEducationAssignmentStatus(values []EducationAssignmentStatus) []string { + 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/education_assignmentable.go b/src/internal/connector/graph/betasdk/models/education_assignmentable.go new file mode 100644 index 000000000..5f4518afc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_assignmentable.go @@ -0,0 +1,64 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationAssignmentable +type EducationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedStudentAction()(*EducationAddedStudentAction) + GetAddToCalendarAction()(*EducationAddToCalendarOptions) + GetAllowLateSubmissions()(*bool) + GetAllowStudentsToAddResourcesToSubmission()(*bool) + GetAssignDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAssignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAssignTo()(EducationAssignmentRecipientable) + GetCategories()([]EducationCategoryable) + GetClassId()(*string) + GetCloseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFeedbackResourcesFolderUrl()(*string) + GetGrading()(EducationAssignmentGradeTypeable) + GetInstructions()(EducationItemBodyable) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotificationChannelUrl()(*string) + GetResources()([]EducationAssignmentResourceable) + GetResourcesFolderUrl()(*string) + GetRubric()(EducationRubricable) + GetStatus()(*EducationAssignmentStatus) + GetSubmissions()([]EducationSubmissionable) + GetWebUrl()(*string) + SetAddedStudentAction(value *EducationAddedStudentAction)() + SetAddToCalendarAction(value *EducationAddToCalendarOptions)() + SetAllowLateSubmissions(value *bool)() + SetAllowStudentsToAddResourcesToSubmission(value *bool)() + SetAssignDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAssignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAssignTo(value EducationAssignmentRecipientable)() + SetCategories(value []EducationCategoryable)() + SetClassId(value *string)() + SetCloseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFeedbackResourcesFolderUrl(value *string)() + SetGrading(value EducationAssignmentGradeTypeable)() + SetInstructions(value EducationItemBodyable)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotificationChannelUrl(value *string)() + SetResources(value []EducationAssignmentResourceable)() + SetResourcesFolderUrl(value *string)() + SetRubric(value EducationRubricable)() + SetStatus(value *EducationAssignmentStatus)() + SetSubmissions(value []EducationSubmissionable)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_category.go b/src/internal/connector/graph/betasdk/models/education_category.go new file mode 100644 index 000000000..297fe8f80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_category.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCategory provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationCategory struct { + Entity + // Unique identifier for the category. + displayName *string +} +// NewEducationCategory instantiates a new educationCategory and sets the default values. +func NewEducationCategory()(*EducationCategory) { + m := &EducationCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationCategory(), nil +} +// GetDisplayName gets the displayName property value. Unique identifier for the category. +func (m *EducationCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EducationCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Unique identifier for the category. +func (m *EducationCategory) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_category_collection_response.go b/src/internal/connector/graph/betasdk/models/education_category_collection_response.go new file mode 100644 index 000000000..39c5bd215 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCategoryCollectionResponse +type EducationCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationCategoryable +} +// NewEducationCategoryCollectionResponse instantiates a new EducationCategoryCollectionResponse and sets the default values. +func NewEducationCategoryCollectionResponse()(*EducationCategoryCollectionResponse) { + m := &EducationCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(EducationCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationCategoryCollectionResponse) GetValue()([]EducationCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationCategoryCollectionResponse) SetValue(value []EducationCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_category_collection_responseable.go new file mode 100644 index 000000000..4b96ca89e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCategoryCollectionResponseable +type EducationCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationCategoryable) + SetValue(value []EducationCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_categoryable.go b/src/internal/connector/graph/betasdk/models/education_categoryable.go new file mode 100644 index 000000000..1b86defa9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_categoryable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCategoryable +type EducationCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_class.go b/src/internal/connector/graph/betasdk/models/education_class.go new file mode 100644 index 000000000..e80c17cbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_class.go @@ -0,0 +1,595 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationClass +type EducationClass struct { + Entity + // All categories associated with this class. Nullable. + assignmentCategories []EducationCategoryable + // Specifies class-level defaults respected by new assignments created in the class. + assignmentDefaults EducationAssignmentDefaultsable + // All assignments associated with this class. Nullable. + assignments []EducationAssignmentable + // Specifies class-level assignments settings. + assignmentSettings EducationAssignmentSettingsable + // Class code used by the school to identify the class. + classCode *string + // Course information for the class. + course EducationCourseable + // Entity who created the class. + createdBy IdentitySetable + // Description of the class. + description *string + // Name of the class. + displayName *string + // ID of the class from the syncing system. + externalId *string + // Name of the class in the syncing system. + externalName *string + // The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. + externalSource *EducationExternalSource + // The name of the external source this resources was generated from. + externalSourceDetail *string + // Grade level of the class. + grade *string + // The group property + group Groupable + // Mail name for sending email to all members, if this is enabled. + mailNickname *string + // All users in the class. Nullable. + members []EducationUserable + // All schools that this class is associated with. Nullable. + schools []EducationSchoolable + // All teachers in the class. Nullable. + teachers []EducationUserable + // Term for the class. + term EducationTermable +} +// NewEducationClass instantiates a new EducationClass and sets the default values. +func NewEducationClass()(*EducationClass) { + m := &EducationClass{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationClassFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationClassFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationClass(), nil +} +// GetAssignmentCategories gets the assignmentCategories property value. All categories associated with this class. Nullable. +func (m *EducationClass) GetAssignmentCategories()([]EducationCategoryable) { + return m.assignmentCategories +} +// GetAssignmentDefaults gets the assignmentDefaults property value. Specifies class-level defaults respected by new assignments created in the class. +func (m *EducationClass) GetAssignmentDefaults()(EducationAssignmentDefaultsable) { + return m.assignmentDefaults +} +// GetAssignments gets the assignments property value. All assignments associated with this class. Nullable. +func (m *EducationClass) GetAssignments()([]EducationAssignmentable) { + return m.assignments +} +// GetAssignmentSettings gets the assignmentSettings property value. Specifies class-level assignments settings. +func (m *EducationClass) GetAssignmentSettings()(EducationAssignmentSettingsable) { + return m.assignmentSettings +} +// GetClassCode gets the classCode property value. Class code used by the school to identify the class. +func (m *EducationClass) GetClassCode()(*string) { + return m.classCode +} +// GetCourse gets the course property value. Course information for the class. +func (m *EducationClass) GetCourse()(EducationCourseable) { + return m.course +} +// GetCreatedBy gets the createdBy property value. Entity who created the class. +func (m *EducationClass) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetDescription gets the description property value. Description of the class. +func (m *EducationClass) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the class. +func (m *EducationClass) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. ID of the class from the syncing system. +func (m *EducationClass) GetExternalId()(*string) { + return m.externalId +} +// GetExternalName gets the externalName property value. Name of the class in the syncing system. +func (m *EducationClass) GetExternalName()(*string) { + return m.externalName +} +// GetExternalSource gets the externalSource property value. The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. +func (m *EducationClass) GetExternalSource()(*EducationExternalSource) { + return m.externalSource +} +// GetExternalSourceDetail gets the externalSourceDetail property value. The name of the external source this resources was generated from. +func (m *EducationClass) GetExternalSourceDetail()(*string) { + return m.externalSourceDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationClass) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(EducationCategoryable) + } + m.SetAssignmentCategories(res) + } + return nil + } + res["assignmentDefaults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentDefaultsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentDefaults(val.(EducationAssignmentDefaultsable)) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EducationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["assignmentSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentSettings(val.(EducationAssignmentSettingsable)) + } + return nil + } + res["classCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClassCode(val) + } + return nil + } + res["course"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationCourseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCourse(val.(EducationCourseable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["externalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalName(val) + } + return nil + } + res["externalSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationExternalSource) + if err != nil { + return err + } + if val != nil { + m.SetExternalSource(val.(*EducationExternalSource)) + } + return nil + } + res["externalSourceDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalSourceDetail(val) + } + return nil + } + res["grade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrade(val) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNickname(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationUserable, len(val)) + for i, v := range val { + res[i] = v.(EducationUserable) + } + m.SetMembers(res) + } + return nil + } + res["schools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSchoolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSchoolable, len(val)) + for i, v := range val { + res[i] = v.(EducationSchoolable) + } + m.SetSchools(res) + } + return nil + } + res["teachers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationUserable, len(val)) + for i, v := range val { + res[i] = v.(EducationUserable) + } + m.SetTeachers(res) + } + return nil + } + res["term"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTerm(val.(EducationTermable)) + } + return nil + } + return res +} +// GetGrade gets the grade property value. Grade level of the class. +func (m *EducationClass) GetGrade()(*string) { + return m.grade +} +// GetGroup gets the group property value. The group property +func (m *EducationClass) GetGroup()(Groupable) { + return m.group +} +// GetMailNickname gets the mailNickname property value. Mail name for sending email to all members, if this is enabled. +func (m *EducationClass) GetMailNickname()(*string) { + return m.mailNickname +} +// GetMembers gets the members property value. All users in the class. Nullable. +func (m *EducationClass) GetMembers()([]EducationUserable) { + return m.members +} +// GetSchools gets the schools property value. All schools that this class is associated with. Nullable. +func (m *EducationClass) GetSchools()([]EducationSchoolable) { + return m.schools +} +// GetTeachers gets the teachers property value. All teachers in the class. Nullable. +func (m *EducationClass) GetTeachers()([]EducationUserable) { + return m.teachers +} +// GetTerm gets the term property value. Term for the class. +func (m *EducationClass) GetTerm()(EducationTermable) { + return m.term +} +// Serialize serializes information the current object +func (m *EducationClass) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignmentCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentCategories())) + for i, v := range m.GetAssignmentCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentCategories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignmentDefaults", m.GetAssignmentDefaults()) + if err != nil { + return err + } + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignmentSettings", m.GetAssignmentSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("classCode", m.GetClassCode()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("course", m.GetCourse()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalName", m.GetExternalName()) + if err != nil { + return err + } + } + if m.GetExternalSource() != nil { + cast := (*m.GetExternalSource()).String() + err = writer.WriteStringValue("externalSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalSourceDetail", m.GetExternalSourceDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("grade", m.GetGrade()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mailNickname", m.GetMailNickname()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetSchools() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSchools())) + for i, v := range m.GetSchools() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("schools", cast) + if err != nil { + return err + } + } + if m.GetTeachers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTeachers())) + for i, v := range m.GetTeachers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("teachers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("term", m.GetTerm()) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentCategories sets the assignmentCategories property value. All categories associated with this class. Nullable. +func (m *EducationClass) SetAssignmentCategories(value []EducationCategoryable)() { + m.assignmentCategories = value +} +// SetAssignmentDefaults sets the assignmentDefaults property value. Specifies class-level defaults respected by new assignments created in the class. +func (m *EducationClass) SetAssignmentDefaults(value EducationAssignmentDefaultsable)() { + m.assignmentDefaults = value +} +// SetAssignments sets the assignments property value. All assignments associated with this class. Nullable. +func (m *EducationClass) SetAssignments(value []EducationAssignmentable)() { + m.assignments = value +} +// SetAssignmentSettings sets the assignmentSettings property value. Specifies class-level assignments settings. +func (m *EducationClass) SetAssignmentSettings(value EducationAssignmentSettingsable)() { + m.assignmentSettings = value +} +// SetClassCode sets the classCode property value. Class code used by the school to identify the class. +func (m *EducationClass) SetClassCode(value *string)() { + m.classCode = value +} +// SetCourse sets the course property value. Course information for the class. +func (m *EducationClass) SetCourse(value EducationCourseable)() { + m.course = value +} +// SetCreatedBy sets the createdBy property value. Entity who created the class. +func (m *EducationClass) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetDescription sets the description property value. Description of the class. +func (m *EducationClass) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the class. +func (m *EducationClass) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. ID of the class from the syncing system. +func (m *EducationClass) SetExternalId(value *string)() { + m.externalId = value +} +// SetExternalName sets the externalName property value. Name of the class in the syncing system. +func (m *EducationClass) SetExternalName(value *string)() { + m.externalName = value +} +// SetExternalSource sets the externalSource property value. The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. +func (m *EducationClass) SetExternalSource(value *EducationExternalSource)() { + m.externalSource = value +} +// SetExternalSourceDetail sets the externalSourceDetail property value. The name of the external source this resources was generated from. +func (m *EducationClass) SetExternalSourceDetail(value *string)() { + m.externalSourceDetail = value +} +// SetGrade sets the grade property value. Grade level of the class. +func (m *EducationClass) SetGrade(value *string)() { + m.grade = value +} +// SetGroup sets the group property value. The group property +func (m *EducationClass) SetGroup(value Groupable)() { + m.group = value +} +// SetMailNickname sets the mailNickname property value. Mail name for sending email to all members, if this is enabled. +func (m *EducationClass) SetMailNickname(value *string)() { + m.mailNickname = value +} +// SetMembers sets the members property value. All users in the class. Nullable. +func (m *EducationClass) SetMembers(value []EducationUserable)() { + m.members = value +} +// SetSchools sets the schools property value. All schools that this class is associated with. Nullable. +func (m *EducationClass) SetSchools(value []EducationSchoolable)() { + m.schools = value +} +// SetTeachers sets the teachers property value. All teachers in the class. Nullable. +func (m *EducationClass) SetTeachers(value []EducationUserable)() { + m.teachers = value +} +// SetTerm sets the term property value. Term for the class. +func (m *EducationClass) SetTerm(value EducationTermable)() { + m.term = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_class_collection_response.go b/src/internal/connector/graph/betasdk/models/education_class_collection_response.go new file mode 100644 index 000000000..11103d240 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_class_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationClassCollectionResponse +type EducationClassCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationClassable +} +// NewEducationClassCollectionResponse instantiates a new EducationClassCollectionResponse and sets the default values. +func NewEducationClassCollectionResponse()(*EducationClassCollectionResponse) { + m := &EducationClassCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationClassCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationClassCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationClassCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationClassCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationClassable, len(val)) + for i, v := range val { + res[i] = v.(EducationClassable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationClassCollectionResponse) GetValue()([]EducationClassable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationClassCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationClassCollectionResponse) SetValue(value []EducationClassable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_class_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_class_collection_responseable.go new file mode 100644 index 000000000..354ef4d6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_class_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationClassCollectionResponseable +type EducationClassCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationClassable) + SetValue(value []EducationClassable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_classable.go b/src/internal/connector/graph/betasdk/models/education_classable.go new file mode 100644 index 000000000..53b3a37e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_classable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationClassable +type EducationClassable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentCategories()([]EducationCategoryable) + GetAssignmentDefaults()(EducationAssignmentDefaultsable) + GetAssignments()([]EducationAssignmentable) + GetAssignmentSettings()(EducationAssignmentSettingsable) + GetClassCode()(*string) + GetCourse()(EducationCourseable) + GetCreatedBy()(IdentitySetable) + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalId()(*string) + GetExternalName()(*string) + GetExternalSource()(*EducationExternalSource) + GetExternalSourceDetail()(*string) + GetGrade()(*string) + GetGroup()(Groupable) + GetMailNickname()(*string) + GetMembers()([]EducationUserable) + GetSchools()([]EducationSchoolable) + GetTeachers()([]EducationUserable) + GetTerm()(EducationTermable) + SetAssignmentCategories(value []EducationCategoryable)() + SetAssignmentDefaults(value EducationAssignmentDefaultsable)() + SetAssignments(value []EducationAssignmentable)() + SetAssignmentSettings(value EducationAssignmentSettingsable)() + SetClassCode(value *string)() + SetCourse(value EducationCourseable)() + SetCreatedBy(value IdentitySetable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetExternalName(value *string)() + SetExternalSource(value *EducationExternalSource)() + SetExternalSourceDetail(value *string)() + SetGrade(value *string)() + SetGroup(value Groupable)() + SetMailNickname(value *string)() + SetMembers(value []EducationUserable)() + SetSchools(value []EducationSchoolable)() + SetTeachers(value []EducationUserable)() + SetTerm(value EducationTermable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_course.go b/src/internal/connector/graph/betasdk/models/education_course.go new file mode 100644 index 000000000..b50c26e23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_course.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCourse +type EducationCourse struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Unique identifier for the course. + courseNumber *string + // Description of the course. + description *string + // Name of the course. + displayName *string + // ID of the course from the syncing system. + externalId *string + // The OdataType property + odataType *string + // Subject of the course. + subject *string +} +// NewEducationCourse instantiates a new educationCourse and sets the default values. +func NewEducationCourse()(*EducationCourse) { + m := &EducationCourse{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationCourseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationCourseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationCourse(), 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 *EducationCourse) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCourseNumber gets the courseNumber property value. Unique identifier for the course. +func (m *EducationCourse) GetCourseNumber()(*string) { + return m.courseNumber +} +// GetDescription gets the description property value. Description of the course. +func (m *EducationCourse) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the course. +func (m *EducationCourse) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. ID of the course from the syncing system. +func (m *EducationCourse) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationCourse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["courseNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCourseNumber(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(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["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationCourse) GetOdataType()(*string) { + return m.odataType +} +// GetSubject gets the subject property value. Subject of the course. +func (m *EducationCourse) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *EducationCourse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("courseNumber", m.GetCourseNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subject", m.GetSubject()) + 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 *EducationCourse) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCourseNumber sets the courseNumber property value. Unique identifier for the course. +func (m *EducationCourse) SetCourseNumber(value *string)() { + m.courseNumber = value +} +// SetDescription sets the description property value. Description of the course. +func (m *EducationCourse) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the course. +func (m *EducationCourse) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. ID of the course from the syncing system. +func (m *EducationCourse) SetExternalId(value *string)() { + m.externalId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationCourse) SetOdataType(value *string)() { + m.odataType = value +} +// SetSubject sets the subject property value. Subject of the course. +func (m *EducationCourse) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_courseable.go b/src/internal/connector/graph/betasdk/models/education_courseable.go new file mode 100644 index 000000000..de0013e10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_courseable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCourseable +type EducationCourseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCourseNumber()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalId()(*string) + GetOdataType()(*string) + GetSubject()(*string) + SetCourseNumber(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetOdataType(value *string)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_csv_data_provider.go b/src/internal/connector/graph/betasdk/models/education_csv_data_provider.go new file mode 100644 index 000000000..0fe5daa0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_csv_data_provider.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCsvDataProvider +type EducationCsvDataProvider struct { + EducationSynchronizationDataProvider + // Optional customizations to be applied to the synchronization profile. + customizations EducationSynchronizationCustomizationsable +} +// NewEducationCsvDataProvider instantiates a new EducationCsvDataProvider and sets the default values. +func NewEducationCsvDataProvider()(*EducationCsvDataProvider) { + m := &EducationCsvDataProvider{ + EducationSynchronizationDataProvider: *NewEducationSynchronizationDataProvider(), + } + odataTypeValue := "#microsoft.graph.educationCsvDataProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationCsvDataProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationCsvDataProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationCsvDataProvider(), nil +} +// GetCustomizations gets the customizations property value. Optional customizations to be applied to the synchronization profile. +func (m *EducationCsvDataProvider) GetCustomizations()(EducationSynchronizationCustomizationsable) { + return m.customizations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationCsvDataProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationDataProvider.GetFieldDeserializers() + res["customizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomizations(val.(EducationSynchronizationCustomizationsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EducationCsvDataProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationDataProvider.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("customizations", m.GetCustomizations()) + if err != nil { + return err + } + } + return nil +} +// SetCustomizations sets the customizations property value. Optional customizations to be applied to the synchronization profile. +func (m *EducationCsvDataProvider) SetCustomizations(value EducationSynchronizationCustomizationsable)() { + m.customizations = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_csv_data_providerable.go b/src/internal/connector/graph/betasdk/models/education_csv_data_providerable.go new file mode 100644 index 000000000..f2fc69648 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_csv_data_providerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationCsvDataProviderable +type EducationCsvDataProviderable interface { + EducationSynchronizationDataProviderable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomizations()(EducationSynchronizationCustomizationsable) + SetCustomizations(value EducationSynchronizationCustomizationsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_excel_resource.go b/src/internal/connector/graph/betasdk/models/education_excel_resource.go new file mode 100644 index 000000000..b16c9089d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_excel_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationExcelResource +type EducationExcelResource struct { + EducationResource + // Pointer to the Excel file object. + fileUrl *string +} +// NewEducationExcelResource instantiates a new EducationExcelResource and sets the default values. +func NewEducationExcelResource()(*EducationExcelResource) { + m := &EducationExcelResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationExcelResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationExcelResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationExcelResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationExcelResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationExcelResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. Pointer to the Excel file object. +func (m *EducationExcelResource) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *EducationExcelResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. Pointer to the Excel file object. +func (m *EducationExcelResource) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_excel_resourceable.go b/src/internal/connector/graph/betasdk/models/education_excel_resourceable.go new file mode 100644 index 000000000..5000cc1f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_excel_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationExcelResourceable +type EducationExcelResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_external_resource.go b/src/internal/connector/graph/betasdk/models/education_external_resource.go new file mode 100644 index 000000000..307a92013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_external_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationExternalResource +type EducationExternalResource struct { + EducationResource + // Location of the resource. Required. + webUrl *string +} +// NewEducationExternalResource instantiates a new EducationExternalResource and sets the default values. +func NewEducationExternalResource()(*EducationExternalResource) { + m := &EducationExternalResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationExternalResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationExternalResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationExternalResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationExternalResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationExternalResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetWebUrl gets the webUrl property value. Location of the resource. Required. +func (m *EducationExternalResource) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *EducationExternalResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetWebUrl sets the webUrl property value. Location of the resource. Required. +func (m *EducationExternalResource) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_external_resourceable.go b/src/internal/connector/graph/betasdk/models/education_external_resourceable.go new file mode 100644 index 000000000..1dcce0a5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_external_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationExternalResourceable +type EducationExternalResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWebUrl()(*string) + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_external_source.go b/src/internal/connector/graph/betasdk/models/education_external_source.go new file mode 100644 index 000000000..f38e37693 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_external_source.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationExternalSource int + +const ( + SIS_EDUCATIONEXTERNALSOURCE EducationExternalSource = iota + MANUAL_EDUCATIONEXTERNALSOURCE + UNKNOWNFUTUREVALUE_EDUCATIONEXTERNALSOURCE + LMS_EDUCATIONEXTERNALSOURCE +) + +func (i EducationExternalSource) String() string { + return []string{"sis", "manual", "unknownFutureValue", "lms"}[i] +} +func ParseEducationExternalSource(v string) (interface{}, error) { + result := SIS_EDUCATIONEXTERNALSOURCE + switch v { + case "sis": + result = SIS_EDUCATIONEXTERNALSOURCE + case "manual": + result = MANUAL_EDUCATIONEXTERNALSOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONEXTERNALSOURCE + case "lms": + result = LMS_EDUCATIONEXTERNALSOURCE + default: + return 0, errors.New("Unknown EducationExternalSource value: " + v) + } + return &result, nil +} +func SerializeEducationExternalSource(values []EducationExternalSource) []string { + 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/education_feedback.go b/src/internal/connector/graph/betasdk/models/education_feedback.go new file mode 100644 index 000000000..3db80be1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedback +type EducationFeedback struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // User who created the feedback. + feedbackBy IdentitySetable + // Moment in time when the feedback was given. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + feedbackDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Feedback. + text EducationItemBodyable +} +// NewEducationFeedback instantiates a new educationFeedback and sets the default values. +func NewEducationFeedback()(*EducationFeedback) { + m := &EducationFeedback{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationFeedbackFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFeedbackFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFeedback(), 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 *EducationFeedback) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFeedbackBy gets the feedbackBy property value. User who created the feedback. +func (m *EducationFeedback) GetFeedbackBy()(IdentitySetable) { + return m.feedbackBy +} +// GetFeedbackDateTime gets the feedbackDateTime property value. Moment in time when the feedback was given. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationFeedback) GetFeedbackDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.feedbackDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFeedback) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["feedbackBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeedbackBy(val.(IdentitySetable)) + } + return nil + } + res["feedbackDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFeedbackDateTime(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["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetText(val.(EducationItemBodyable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationFeedback) GetOdataType()(*string) { + return m.odataType +} +// GetText gets the text property value. Feedback. +func (m *EducationFeedback) GetText()(EducationItemBodyable) { + return m.text +} +// Serialize serializes information the current object +func (m *EducationFeedback) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("feedbackBy", m.GetFeedbackBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("feedbackDateTime", m.GetFeedbackDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("text", m.GetText()) + 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 *EducationFeedback) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFeedbackBy sets the feedbackBy property value. User who created the feedback. +func (m *EducationFeedback) SetFeedbackBy(value IdentitySetable)() { + m.feedbackBy = value +} +// SetFeedbackDateTime sets the feedbackDateTime property value. Moment in time when the feedback was given. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationFeedback) SetFeedbackDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.feedbackDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationFeedback) SetOdataType(value *string)() { + m.odataType = value +} +// SetText sets the text property value. Feedback. +func (m *EducationFeedback) SetText(value EducationItemBodyable)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_outcome.go b/src/internal/connector/graph/betasdk/models/education_feedback_outcome.go new file mode 100644 index 000000000..c7130df46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_outcome.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackOutcome +type EducationFeedbackOutcome struct { + EducationOutcome + // Teacher's written feedback to the student. + feedback EducationFeedbackable + // A copy of the feedback property that is made when the grade is released to the student. + publishedFeedback EducationFeedbackable +} +// NewEducationFeedbackOutcome instantiates a new EducationFeedbackOutcome and sets the default values. +func NewEducationFeedbackOutcome()(*EducationFeedbackOutcome) { + m := &EducationFeedbackOutcome{ + EducationOutcome: *NewEducationOutcome(), + } + odataTypeValue := "#microsoft.graph.educationFeedbackOutcome"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationFeedbackOutcomeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFeedbackOutcomeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFeedbackOutcome(), nil +} +// GetFeedback gets the feedback property value. Teacher's written feedback to the student. +func (m *EducationFeedbackOutcome) GetFeedback()(EducationFeedbackable) { + return m.feedback +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFeedbackOutcome) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationOutcome.GetFieldDeserializers() + res["feedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationFeedbackFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeedback(val.(EducationFeedbackable)) + } + return nil + } + res["publishedFeedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationFeedbackFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublishedFeedback(val.(EducationFeedbackable)) + } + return nil + } + return res +} +// GetPublishedFeedback gets the publishedFeedback property value. A copy of the feedback property that is made when the grade is released to the student. +func (m *EducationFeedbackOutcome) GetPublishedFeedback()(EducationFeedbackable) { + return m.publishedFeedback +} +// Serialize serializes information the current object +func (m *EducationFeedbackOutcome) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationOutcome.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("feedback", m.GetFeedback()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publishedFeedback", m.GetPublishedFeedback()) + if err != nil { + return err + } + } + return nil +} +// SetFeedback sets the feedback property value. Teacher's written feedback to the student. +func (m *EducationFeedbackOutcome) SetFeedback(value EducationFeedbackable)() { + m.feedback = value +} +// SetPublishedFeedback sets the publishedFeedback property value. A copy of the feedback property that is made when the grade is released to the student. +func (m *EducationFeedbackOutcome) SetPublishedFeedback(value EducationFeedbackable)() { + m.publishedFeedback = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_response.go b/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_response.go new file mode 100644 index 000000000..dd9afc36c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackOutcomeCollectionResponse +type EducationFeedbackOutcomeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationFeedbackOutcomeable +} +// NewEducationFeedbackOutcomeCollectionResponse instantiates a new EducationFeedbackOutcomeCollectionResponse and sets the default values. +func NewEducationFeedbackOutcomeCollectionResponse()(*EducationFeedbackOutcomeCollectionResponse) { + m := &EducationFeedbackOutcomeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationFeedbackOutcomeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFeedbackOutcomeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFeedbackOutcomeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFeedbackOutcomeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationFeedbackOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationFeedbackOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationFeedbackOutcomeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationFeedbackOutcomeCollectionResponse) GetValue()([]EducationFeedbackOutcomeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationFeedbackOutcomeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationFeedbackOutcomeCollectionResponse) SetValue(value []EducationFeedbackOutcomeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_responseable.go new file mode 100644 index 000000000..b977289cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_outcome_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackOutcomeCollectionResponseable +type EducationFeedbackOutcomeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationFeedbackOutcomeable) + SetValue(value []EducationFeedbackOutcomeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_outcomeable.go b/src/internal/connector/graph/betasdk/models/education_feedback_outcomeable.go new file mode 100644 index 000000000..2ee72e429 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_outcomeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackOutcomeable +type EducationFeedbackOutcomeable interface { + EducationOutcomeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeedback()(EducationFeedbackable) + GetPublishedFeedback()(EducationFeedbackable) + SetFeedback(value EducationFeedbackable)() + SetPublishedFeedback(value EducationFeedbackable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome.go b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome.go new file mode 100644 index 000000000..1c1a47f0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackResourceOutcome +type EducationFeedbackResourceOutcome struct { + EducationOutcome + // The actual feedback resource. + feedbackResource EducationResourceable + // The status of the feedback resource. The possible values are: notPublished, pendingPublish, published, failedPublish, unknownFutureValue. + resourceStatus *EducationFeedbackResourceOutcomeStatus +} +// NewEducationFeedbackResourceOutcome instantiates a new EducationFeedbackResourceOutcome and sets the default values. +func NewEducationFeedbackResourceOutcome()(*EducationFeedbackResourceOutcome) { + m := &EducationFeedbackResourceOutcome{ + EducationOutcome: *NewEducationOutcome(), + } + odataTypeValue := "#microsoft.graph.educationFeedbackResourceOutcome"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationFeedbackResourceOutcomeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFeedbackResourceOutcomeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFeedbackResourceOutcome(), nil +} +// GetFeedbackResource gets the feedbackResource property value. The actual feedback resource. +func (m *EducationFeedbackResourceOutcome) GetFeedbackResource()(EducationResourceable) { + return m.feedbackResource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFeedbackResourceOutcome) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationOutcome.GetFieldDeserializers() + res["feedbackResource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeedbackResource(val.(EducationResourceable)) + } + return nil + } + res["resourceStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationFeedbackResourceOutcomeStatus) + if err != nil { + return err + } + if val != nil { + m.SetResourceStatus(val.(*EducationFeedbackResourceOutcomeStatus)) + } + return nil + } + return res +} +// GetResourceStatus gets the resourceStatus property value. The status of the feedback resource. The possible values are: notPublished, pendingPublish, published, failedPublish, unknownFutureValue. +func (m *EducationFeedbackResourceOutcome) GetResourceStatus()(*EducationFeedbackResourceOutcomeStatus) { + return m.resourceStatus +} +// Serialize serializes information the current object +func (m *EducationFeedbackResourceOutcome) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationOutcome.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("feedbackResource", m.GetFeedbackResource()) + if err != nil { + return err + } + } + if m.GetResourceStatus() != nil { + cast := (*m.GetResourceStatus()).String() + err = writer.WriteStringValue("resourceStatus", &cast) + if err != nil { + return err + } + } + return nil +} +// SetFeedbackResource sets the feedbackResource property value. The actual feedback resource. +func (m *EducationFeedbackResourceOutcome) SetFeedbackResource(value EducationResourceable)() { + m.feedbackResource = value +} +// SetResourceStatus sets the resourceStatus property value. The status of the feedback resource. The possible values are: notPublished, pendingPublish, published, failedPublish, unknownFutureValue. +func (m *EducationFeedbackResourceOutcome) SetResourceStatus(value *EducationFeedbackResourceOutcomeStatus)() { + m.resourceStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_response.go b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_response.go new file mode 100644 index 000000000..b15587a39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackResourceOutcomeCollectionResponse +type EducationFeedbackResourceOutcomeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationFeedbackResourceOutcomeable +} +// NewEducationFeedbackResourceOutcomeCollectionResponse instantiates a new EducationFeedbackResourceOutcomeCollectionResponse and sets the default values. +func NewEducationFeedbackResourceOutcomeCollectionResponse()(*EducationFeedbackResourceOutcomeCollectionResponse) { + m := &EducationFeedbackResourceOutcomeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationFeedbackResourceOutcomeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFeedbackResourceOutcomeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFeedbackResourceOutcomeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFeedbackResourceOutcomeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationFeedbackResourceOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationFeedbackResourceOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationFeedbackResourceOutcomeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationFeedbackResourceOutcomeCollectionResponse) GetValue()([]EducationFeedbackResourceOutcomeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationFeedbackResourceOutcomeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationFeedbackResourceOutcomeCollectionResponse) SetValue(value []EducationFeedbackResourceOutcomeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_responseable.go new file mode 100644 index 000000000..7ab4e25d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackResourceOutcomeCollectionResponseable +type EducationFeedbackResourceOutcomeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationFeedbackResourceOutcomeable) + SetValue(value []EducationFeedbackResourceOutcomeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_status.go b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_status.go new file mode 100644 index 000000000..1ef04df4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcome_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationFeedbackResourceOutcomeStatus int + +const ( + NOTPUBLISHED_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS EducationFeedbackResourceOutcomeStatus = iota + PENDINGPUBLISH_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + PUBLISHED_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + FAILEDPUBLISH_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + UNKNOWNFUTUREVALUE_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS +) + +func (i EducationFeedbackResourceOutcomeStatus) String() string { + return []string{"notPublished", "pendingPublish", "published", "failedPublish", "unknownFutureValue"}[i] +} +func ParseEducationFeedbackResourceOutcomeStatus(v string) (interface{}, error) { + result := NOTPUBLISHED_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + switch v { + case "notPublished": + result = NOTPUBLISHED_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + case "pendingPublish": + result = PENDINGPUBLISH_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + case "published": + result = PUBLISHED_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + case "failedPublish": + result = FAILEDPUBLISH_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONFEEDBACKRESOURCEOUTCOMESTATUS + default: + return 0, errors.New("Unknown EducationFeedbackResourceOutcomeStatus value: " + v) + } + return &result, nil +} +func SerializeEducationFeedbackResourceOutcomeStatus(values []EducationFeedbackResourceOutcomeStatus) []string { + 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/education_feedback_resource_outcomeable.go b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcomeable.go new file mode 100644 index 000000000..6f928be70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedback_resource_outcomeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackResourceOutcomeable +type EducationFeedbackResourceOutcomeable interface { + EducationOutcomeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeedbackResource()(EducationResourceable) + GetResourceStatus()(*EducationFeedbackResourceOutcomeStatus) + SetFeedbackResource(value EducationResourceable)() + SetResourceStatus(value *EducationFeedbackResourceOutcomeStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_feedbackable.go b/src/internal/connector/graph/betasdk/models/education_feedbackable.go new file mode 100644 index 000000000..22de0c453 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_feedbackable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFeedbackable +type EducationFeedbackable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeedbackBy()(IdentitySetable) + GetFeedbackDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetText()(EducationItemBodyable) + SetFeedbackBy(value IdentitySetable)() + SetFeedbackDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetText(value EducationItemBodyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_file_resource.go b/src/internal/connector/graph/betasdk/models/education_file_resource.go new file mode 100644 index 000000000..d7f6fec0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_file_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFileResource +type EducationFileResource struct { + EducationResource + // Location on disk of the file resource. + fileUrl *string +} +// NewEducationFileResource instantiates a new EducationFileResource and sets the default values. +func NewEducationFileResource()(*EducationFileResource) { + m := &EducationFileResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationFileResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationFileResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationFileResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationFileResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationFileResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. Location on disk of the file resource. +func (m *EducationFileResource) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *EducationFileResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. Location on disk of the file resource. +func (m *EducationFileResource) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_file_resourceable.go b/src/internal/connector/graph/betasdk/models/education_file_resourceable.go new file mode 100644 index 000000000..433fd5cc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_file_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationFileResourceable +type EducationFileResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_gender.go b/src/internal/connector/graph/betasdk/models/education_gender.go new file mode 100644 index 000000000..78d4b992b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_gender.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationGender int + +const ( + FEMALE_EDUCATIONGENDER EducationGender = iota + MALE_EDUCATIONGENDER + OTHER_EDUCATIONGENDER + UNKNOWNFUTUREVALUE_EDUCATIONGENDER +) + +func (i EducationGender) String() string { + return []string{"female", "male", "other", "unknownFutureValue"}[i] +} +func ParseEducationGender(v string) (interface{}, error) { + result := FEMALE_EDUCATIONGENDER + switch v { + case "female": + result = FEMALE_EDUCATIONGENDER + case "male": + result = MALE_EDUCATIONGENDER + case "other": + result = OTHER_EDUCATIONGENDER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONGENDER + default: + return 0, errors.New("Unknown EducationGender value: " + v) + } + return &result, nil +} +func SerializeEducationGender(values []EducationGender) []string { + 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/education_identity_creation_configuration.go b/src/internal/connector/graph/betasdk/models/education_identity_creation_configuration.go new file mode 100644 index 000000000..09f35a5f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_creation_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityCreationConfiguration +type EducationIdentityCreationConfiguration struct { + EducationIdentitySynchronizationConfiguration + // The userDomains property + userDomains []EducationIdentityDomainable +} +// NewEducationIdentityCreationConfiguration instantiates a new EducationIdentityCreationConfiguration and sets the default values. +func NewEducationIdentityCreationConfiguration()(*EducationIdentityCreationConfiguration) { + m := &EducationIdentityCreationConfiguration{ + EducationIdentitySynchronizationConfiguration: *NewEducationIdentitySynchronizationConfiguration(), + } + odataTypeValue := "#microsoft.graph.educationIdentityCreationConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationIdentityCreationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityCreationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityCreationConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityCreationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationIdentitySynchronizationConfiguration.GetFieldDeserializers() + res["userDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationIdentityDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationIdentityDomainable, len(val)) + for i, v := range val { + res[i] = v.(EducationIdentityDomainable) + } + m.SetUserDomains(res) + } + return nil + } + return res +} +// GetUserDomains gets the userDomains property value. The userDomains property +func (m *EducationIdentityCreationConfiguration) GetUserDomains()([]EducationIdentityDomainable) { + return m.userDomains +} +// Serialize serializes information the current object +func (m *EducationIdentityCreationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationIdentitySynchronizationConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetUserDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserDomains())) + for i, v := range m.GetUserDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userDomains", cast) + if err != nil { + return err + } + } + return nil +} +// SetUserDomains sets the userDomains property value. The userDomains property +func (m *EducationIdentityCreationConfiguration) SetUserDomains(value []EducationIdentityDomainable)() { + m.userDomains = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_creation_configurationable.go b/src/internal/connector/graph/betasdk/models/education_identity_creation_configurationable.go new file mode 100644 index 000000000..b3a56afe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_creation_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityCreationConfigurationable +type EducationIdentityCreationConfigurationable interface { + EducationIdentitySynchronizationConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserDomains()([]EducationIdentityDomainable) + SetUserDomains(value []EducationIdentityDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_domain.go b/src/internal/connector/graph/betasdk/models/education_identity_domain.go new file mode 100644 index 000000000..f7a597def --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_domain.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityDomain +type EducationIdentityDomain 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 appliesTo property + appliesTo *EducationUserRole + // Represents the domain for the user account. + name *string + // The OdataType property + odataType *string +} +// NewEducationIdentityDomain instantiates a new educationIdentityDomain and sets the default values. +func NewEducationIdentityDomain()(*EducationIdentityDomain) { + m := &EducationIdentityDomain{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationIdentityDomainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityDomainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityDomain(), 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 *EducationIdentityDomain) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppliesTo gets the appliesTo property value. The appliesTo property +func (m *EducationIdentityDomain) GetAppliesTo()(*EducationUserRole) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityDomain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationUserRole) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*EducationUserRole)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetName gets the name property value. Represents the domain for the user account. +func (m *EducationIdentityDomain) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationIdentityDomain) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationIdentityDomain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err := writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationIdentityDomain) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppliesTo sets the appliesTo property value. The appliesTo property +func (m *EducationIdentityDomain) SetAppliesTo(value *EducationUserRole)() { + m.appliesTo = value +} +// SetName sets the name property value. Represents the domain for the user account. +func (m *EducationIdentityDomain) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationIdentityDomain) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_response.go b/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_response.go new file mode 100644 index 000000000..d2afc3e08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityDomainCollectionResponse +type EducationIdentityDomainCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationIdentityDomainable +} +// NewEducationIdentityDomainCollectionResponse instantiates a new EducationIdentityDomainCollectionResponse and sets the default values. +func NewEducationIdentityDomainCollectionResponse()(*EducationIdentityDomainCollectionResponse) { + m := &EducationIdentityDomainCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationIdentityDomainCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityDomainCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityDomainCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityDomainCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationIdentityDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationIdentityDomainable, len(val)) + for i, v := range val { + res[i] = v.(EducationIdentityDomainable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationIdentityDomainCollectionResponse) GetValue()([]EducationIdentityDomainable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationIdentityDomainCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationIdentityDomainCollectionResponse) SetValue(value []EducationIdentityDomainable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_responseable.go new file mode 100644 index 000000000..db4c0f135 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_domain_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityDomainCollectionResponseable +type EducationIdentityDomainCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationIdentityDomainable) + SetValue(value []EducationIdentityDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_domainable.go b/src/internal/connector/graph/betasdk/models/education_identity_domainable.go new file mode 100644 index 000000000..e46b78bda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_domainable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityDomainable +type EducationIdentityDomainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()(*EducationUserRole) + GetName()(*string) + GetOdataType()(*string) + SetAppliesTo(value *EducationUserRole)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_configuration.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_configuration.go new file mode 100644 index 000000000..8f0bc85ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingConfiguration +type EducationIdentityMatchingConfiguration struct { + EducationIdentitySynchronizationConfiguration + // Mapping between the user account and the options to use to uniquely identify the user to update. + matchingOptions []EducationIdentityMatchingOptionsable +} +// NewEducationIdentityMatchingConfiguration instantiates a new EducationIdentityMatchingConfiguration and sets the default values. +func NewEducationIdentityMatchingConfiguration()(*EducationIdentityMatchingConfiguration) { + m := &EducationIdentityMatchingConfiguration{ + EducationIdentitySynchronizationConfiguration: *NewEducationIdentitySynchronizationConfiguration(), + } + odataTypeValue := "#microsoft.graph.educationIdentityMatchingConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationIdentityMatchingConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityMatchingConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityMatchingConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityMatchingConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationIdentitySynchronizationConfiguration.GetFieldDeserializers() + res["matchingOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationIdentityMatchingOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationIdentityMatchingOptionsable, len(val)) + for i, v := range val { + res[i] = v.(EducationIdentityMatchingOptionsable) + } + m.SetMatchingOptions(res) + } + return nil + } + return res +} +// GetMatchingOptions gets the matchingOptions property value. Mapping between the user account and the options to use to uniquely identify the user to update. +func (m *EducationIdentityMatchingConfiguration) GetMatchingOptions()([]EducationIdentityMatchingOptionsable) { + return m.matchingOptions +} +// Serialize serializes information the current object +func (m *EducationIdentityMatchingConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationIdentitySynchronizationConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetMatchingOptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatchingOptions())) + for i, v := range m.GetMatchingOptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("matchingOptions", cast) + if err != nil { + return err + } + } + return nil +} +// SetMatchingOptions sets the matchingOptions property value. Mapping between the user account and the options to use to uniquely identify the user to update. +func (m *EducationIdentityMatchingConfiguration) SetMatchingOptions(value []EducationIdentityMatchingOptionsable)() { + m.matchingOptions = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_configurationable.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_configurationable.go new file mode 100644 index 000000000..b035632ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingConfigurationable +type EducationIdentityMatchingConfigurationable interface { + EducationIdentitySynchronizationConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMatchingOptions()([]EducationIdentityMatchingOptionsable) + SetMatchingOptions(value []EducationIdentityMatchingOptionsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_options.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_options.go new file mode 100644 index 000000000..c60b0758e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_options.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingOptions +type EducationIdentityMatchingOptions 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 appliesTo property + appliesTo *EducationUserRole + // The OdataType property + odataType *string + // The name of the source property, which should be a field name in the source data. This property is case-sensitive. + sourcePropertyName *string + // The domain to suffix with the source property to match on the target. If provided as null, the source property will be used to match with the target property. + targetDomain *string + // The name of the target property, which should be a valid property in Azure AD. This property is case-sensitive. + targetPropertyName *string +} +// NewEducationIdentityMatchingOptions instantiates a new educationIdentityMatchingOptions and sets the default values. +func NewEducationIdentityMatchingOptions()(*EducationIdentityMatchingOptions) { + m := &EducationIdentityMatchingOptions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationIdentityMatchingOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityMatchingOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityMatchingOptions(), 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 *EducationIdentityMatchingOptions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppliesTo gets the appliesTo property value. The appliesTo property +func (m *EducationIdentityMatchingOptions) GetAppliesTo()(*EducationUserRole) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityMatchingOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationUserRole) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*EducationUserRole)) + } + 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["sourcePropertyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourcePropertyName(val) + } + return nil + } + res["targetDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetDomain(val) + } + return nil + } + res["targetPropertyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetPropertyName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationIdentityMatchingOptions) GetOdataType()(*string) { + return m.odataType +} +// GetSourcePropertyName gets the sourcePropertyName property value. The name of the source property, which should be a field name in the source data. This property is case-sensitive. +func (m *EducationIdentityMatchingOptions) GetSourcePropertyName()(*string) { + return m.sourcePropertyName +} +// GetTargetDomain gets the targetDomain property value. The domain to suffix with the source property to match on the target. If provided as null, the source property will be used to match with the target property. +func (m *EducationIdentityMatchingOptions) GetTargetDomain()(*string) { + return m.targetDomain +} +// GetTargetPropertyName gets the targetPropertyName property value. The name of the target property, which should be a valid property in Azure AD. This property is case-sensitive. +func (m *EducationIdentityMatchingOptions) GetTargetPropertyName()(*string) { + return m.targetPropertyName +} +// Serialize serializes information the current object +func (m *EducationIdentityMatchingOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err := writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourcePropertyName", m.GetSourcePropertyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("targetDomain", m.GetTargetDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("targetPropertyName", m.GetTargetPropertyName()) + 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 *EducationIdentityMatchingOptions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppliesTo sets the appliesTo property value. The appliesTo property +func (m *EducationIdentityMatchingOptions) SetAppliesTo(value *EducationUserRole)() { + m.appliesTo = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationIdentityMatchingOptions) SetOdataType(value *string)() { + m.odataType = value +} +// SetSourcePropertyName sets the sourcePropertyName property value. The name of the source property, which should be a field name in the source data. This property is case-sensitive. +func (m *EducationIdentityMatchingOptions) SetSourcePropertyName(value *string)() { + m.sourcePropertyName = value +} +// SetTargetDomain sets the targetDomain property value. The domain to suffix with the source property to match on the target. If provided as null, the source property will be used to match with the target property. +func (m *EducationIdentityMatchingOptions) SetTargetDomain(value *string)() { + m.targetDomain = value +} +// SetTargetPropertyName sets the targetPropertyName property value. The name of the target property, which should be a valid property in Azure AD. This property is case-sensitive. +func (m *EducationIdentityMatchingOptions) SetTargetPropertyName(value *string)() { + m.targetPropertyName = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_response.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_response.go new file mode 100644 index 000000000..59489bc46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingOptionsCollectionResponse +type EducationIdentityMatchingOptionsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationIdentityMatchingOptionsable +} +// NewEducationIdentityMatchingOptionsCollectionResponse instantiates a new EducationIdentityMatchingOptionsCollectionResponse and sets the default values. +func NewEducationIdentityMatchingOptionsCollectionResponse()(*EducationIdentityMatchingOptionsCollectionResponse) { + m := &EducationIdentityMatchingOptionsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationIdentityMatchingOptionsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentityMatchingOptionsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationIdentityMatchingOptionsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentityMatchingOptionsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationIdentityMatchingOptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationIdentityMatchingOptionsable, len(val)) + for i, v := range val { + res[i] = v.(EducationIdentityMatchingOptionsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationIdentityMatchingOptionsCollectionResponse) GetValue()([]EducationIdentityMatchingOptionsable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationIdentityMatchingOptionsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationIdentityMatchingOptionsCollectionResponse) SetValue(value []EducationIdentityMatchingOptionsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_responseable.go new file mode 100644 index 000000000..2e11c21dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_options_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingOptionsCollectionResponseable +type EducationIdentityMatchingOptionsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationIdentityMatchingOptionsable) + SetValue(value []EducationIdentityMatchingOptionsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_matching_optionsable.go b/src/internal/connector/graph/betasdk/models/education_identity_matching_optionsable.go new file mode 100644 index 000000000..52d084952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_matching_optionsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentityMatchingOptionsable +type EducationIdentityMatchingOptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()(*EducationUserRole) + GetOdataType()(*string) + GetSourcePropertyName()(*string) + GetTargetDomain()(*string) + GetTargetPropertyName()(*string) + SetAppliesTo(value *EducationUserRole)() + SetOdataType(value *string)() + SetSourcePropertyName(value *string)() + SetTargetDomain(value *string)() + SetTargetPropertyName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configuration.go b/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configuration.go new file mode 100644 index 000000000..15a791adc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configuration.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentitySynchronizationConfiguration +type EducationIdentitySynchronizationConfiguration 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 OdataType property + odataType *string +} +// NewEducationIdentitySynchronizationConfiguration instantiates a new educationIdentitySynchronizationConfiguration and sets the default values. +func NewEducationIdentitySynchronizationConfiguration()(*EducationIdentitySynchronizationConfiguration) { + m := &EducationIdentitySynchronizationConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationIdentitySynchronizationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationIdentitySynchronizationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationIdentityCreationConfiguration": + return NewEducationIdentityCreationConfiguration(), nil + case "#microsoft.graph.educationIdentityMatchingConfiguration": + return NewEducationIdentityMatchingConfiguration(), nil + } + } + } + } + return NewEducationIdentitySynchronizationConfiguration(), 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 *EducationIdentitySynchronizationConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationIdentitySynchronizationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationIdentitySynchronizationConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationIdentitySynchronizationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationIdentitySynchronizationConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationIdentitySynchronizationConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configurationable.go b/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configurationable.go new file mode 100644 index 000000000..b4bb01451 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_identity_synchronization_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationIdentitySynchronizationConfigurationable +type EducationIdentitySynchronizationConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_item_body.go b/src/internal/connector/graph/betasdk/models/education_item_body.go new file mode 100644 index 000000000..604488a13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_item_body.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationItemBody +type EducationItemBody 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 content property + content *string + // The contentType property + contentType *BodyType + // The OdataType property + odataType *string +} +// NewEducationItemBody instantiates a new educationItemBody and sets the default values. +func NewEducationItemBody()(*EducationItemBody) { + m := &EducationItemBody{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationItemBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationItemBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationItemBody(), 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 *EducationItemBody) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContent gets the content property value. The content property +func (m *EducationItemBody) GetContent()(*string) { + return m.content +} +// GetContentType gets the contentType property value. The contentType property +func (m *EducationItemBody) GetContentType()(*BodyType) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationItemBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBodyType) + if err != nil { + return err + } + if val != nil { + m.SetContentType(val.(*BodyType)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationItemBody) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationItemBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + if m.GetContentType() != nil { + cast := (*m.GetContentType()).String() + err := writer.WriteStringValue("contentType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationItemBody) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContent sets the content property value. The content property +func (m *EducationItemBody) SetContent(value *string)() { + m.content = value +} +// SetContentType sets the contentType property value. The contentType property +func (m *EducationItemBody) SetContentType(value *BodyType)() { + m.contentType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationItemBody) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_item_bodyable.go b/src/internal/connector/graph/betasdk/models/education_item_bodyable.go new file mode 100644 index 000000000..8b00c5cad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_item_bodyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationItemBodyable +type EducationItemBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetContentType()(*BodyType) + GetOdataType()(*string) + SetContent(value *string)() + SetContentType(value *BodyType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_link_resource.go b/src/internal/connector/graph/betasdk/models/education_link_resource.go new file mode 100644 index 000000000..3e43d7905 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_link_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationLinkResource +type EducationLinkResource struct { + EducationResource + // URL to the resource. + link *string +} +// NewEducationLinkResource instantiates a new EducationLinkResource and sets the default values. +func NewEducationLinkResource()(*EducationLinkResource) { + m := &EducationLinkResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationLinkResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationLinkResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationLinkResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationLinkResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationLinkResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLink(val) + } + return nil + } + return res +} +// GetLink gets the link property value. URL to the resource. +func (m *EducationLinkResource) GetLink()(*string) { + return m.link +} +// Serialize serializes information the current object +func (m *EducationLinkResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("link", m.GetLink()) + if err != nil { + return err + } + } + return nil +} +// SetLink sets the link property value. URL to the resource. +func (m *EducationLinkResource) SetLink(value *string)() { + m.link = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_link_resourceable.go b/src/internal/connector/graph/betasdk/models/education_link_resourceable.go new file mode 100644 index 000000000..f18cb21a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_link_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationLinkResourceable +type EducationLinkResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLink()(*string) + SetLink(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_media_resource.go b/src/internal/connector/graph/betasdk/models/education_media_resource.go new file mode 100644 index 000000000..ae87eb336 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_media_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationMediaResource +type EducationMediaResource struct { + EducationResource + // Location of the file on shared point folder. Required + fileUrl *string +} +// NewEducationMediaResource instantiates a new EducationMediaResource and sets the default values. +func NewEducationMediaResource()(*EducationMediaResource) { + m := &EducationMediaResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationMediaResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationMediaResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationMediaResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationMediaResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationMediaResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. Location of the file on shared point folder. Required +func (m *EducationMediaResource) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *EducationMediaResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. Location of the file on shared point folder. Required +func (m *EducationMediaResource) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_media_resourceable.go b/src/internal/connector/graph/betasdk/models/education_media_resourceable.go new file mode 100644 index 000000000..184dc97c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_media_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationMediaResourceable +type EducationMediaResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_on_premises_info.go b/src/internal/connector/graph/betasdk/models/education_on_premises_info.go new file mode 100644 index 000000000..83d140f7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_on_premises_info.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOnPremisesInfo +type EducationOnPremisesInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Unique identifier for the user object in Active Directory. + immutableId *string + // The OdataType property + odataType *string +} +// NewEducationOnPremisesInfo instantiates a new educationOnPremisesInfo and sets the default values. +func NewEducationOnPremisesInfo()(*EducationOnPremisesInfo) { + m := &EducationOnPremisesInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationOnPremisesInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationOnPremisesInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationOnPremisesInfo(), 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 *EducationOnPremisesInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationOnPremisesInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["immutableId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImmutableId(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 + } + return res +} +// GetImmutableId gets the immutableId property value. Unique identifier for the user object in Active Directory. +func (m *EducationOnPremisesInfo) GetImmutableId()(*string) { + return m.immutableId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationOnPremisesInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationOnPremisesInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("immutableId", m.GetImmutableId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationOnPremisesInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetImmutableId sets the immutableId property value. Unique identifier for the user object in Active Directory. +func (m *EducationOnPremisesInfo) SetImmutableId(value *string)() { + m.immutableId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationOnPremisesInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_on_premises_infoable.go b/src/internal/connector/graph/betasdk/models/education_on_premises_infoable.go new file mode 100644 index 000000000..481d3c2e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_on_premises_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOnPremisesInfoable +type EducationOnPremisesInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetImmutableId()(*string) + GetOdataType()(*string) + SetImmutableId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_provider.go b/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_provider.go new file mode 100644 index 000000000..bbd805958 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_provider.go @@ -0,0 +1,200 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOneRosterApiDataProvider +type EducationOneRosterApiDataProvider struct { + EducationSynchronizationDataProvider + // The connectionSettings property + connectionSettings EducationSynchronizationConnectionSettingsable + // The connectionUrl property + connectionUrl *string + // The customizations property + customizations EducationSynchronizationCustomizationsable + // The providerName property + providerName *string + // The schoolsIds property + schoolsIds []string + // The termIds property + termIds []string +} +// NewEducationOneRosterApiDataProvider instantiates a new EducationOneRosterApiDataProvider and sets the default values. +func NewEducationOneRosterApiDataProvider()(*EducationOneRosterApiDataProvider) { + m := &EducationOneRosterApiDataProvider{ + EducationSynchronizationDataProvider: *NewEducationSynchronizationDataProvider(), + } + odataTypeValue := "#microsoft.graph.educationOneRosterApiDataProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationOneRosterApiDataProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationOneRosterApiDataProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationOneRosterApiDataProvider(), nil +} +// GetConnectionSettings gets the connectionSettings property value. The connectionSettings property +func (m *EducationOneRosterApiDataProvider) GetConnectionSettings()(EducationSynchronizationConnectionSettingsable) { + return m.connectionSettings +} +// GetConnectionUrl gets the connectionUrl property value. The connectionUrl property +func (m *EducationOneRosterApiDataProvider) GetConnectionUrl()(*string) { + return m.connectionUrl +} +// GetCustomizations gets the customizations property value. The customizations property +func (m *EducationOneRosterApiDataProvider) GetCustomizations()(EducationSynchronizationCustomizationsable) { + return m.customizations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationOneRosterApiDataProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationDataProvider.GetFieldDeserializers() + res["connectionSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationConnectionSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConnectionSettings(val.(EducationSynchronizationConnectionSettingsable)) + } + return nil + } + res["connectionUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionUrl(val) + } + return nil + } + res["customizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomizations(val.(EducationSynchronizationCustomizationsable)) + } + return nil + } + res["providerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderName(val) + } + return nil + } + res["schoolsIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSchoolsIds(res) + } + return nil + } + res["termIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTermIds(res) + } + return nil + } + return res +} +// GetProviderName gets the providerName property value. The providerName property +func (m *EducationOneRosterApiDataProvider) GetProviderName()(*string) { + return m.providerName +} +// GetSchoolsIds gets the schoolsIds property value. The schoolsIds property +func (m *EducationOneRosterApiDataProvider) GetSchoolsIds()([]string) { + return m.schoolsIds +} +// GetTermIds gets the termIds property value. The termIds property +func (m *EducationOneRosterApiDataProvider) GetTermIds()([]string) { + return m.termIds +} +// Serialize serializes information the current object +func (m *EducationOneRosterApiDataProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationDataProvider.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("connectionSettings", m.GetConnectionSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionUrl", m.GetConnectionUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customizations", m.GetCustomizations()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("providerName", m.GetProviderName()) + if err != nil { + return err + } + } + if m.GetSchoolsIds() != nil { + err = writer.WriteCollectionOfStringValues("schoolsIds", m.GetSchoolsIds()) + if err != nil { + return err + } + } + if m.GetTermIds() != nil { + err = writer.WriteCollectionOfStringValues("termIds", m.GetTermIds()) + if err != nil { + return err + } + } + return nil +} +// SetConnectionSettings sets the connectionSettings property value. The connectionSettings property +func (m *EducationOneRosterApiDataProvider) SetConnectionSettings(value EducationSynchronizationConnectionSettingsable)() { + m.connectionSettings = value +} +// SetConnectionUrl sets the connectionUrl property value. The connectionUrl property +func (m *EducationOneRosterApiDataProvider) SetConnectionUrl(value *string)() { + m.connectionUrl = value +} +// SetCustomizations sets the customizations property value. The customizations property +func (m *EducationOneRosterApiDataProvider) SetCustomizations(value EducationSynchronizationCustomizationsable)() { + m.customizations = value +} +// SetProviderName sets the providerName property value. The providerName property +func (m *EducationOneRosterApiDataProvider) SetProviderName(value *string)() { + m.providerName = value +} +// SetSchoolsIds sets the schoolsIds property value. The schoolsIds property +func (m *EducationOneRosterApiDataProvider) SetSchoolsIds(value []string)() { + m.schoolsIds = value +} +// SetTermIds sets the termIds property value. The termIds property +func (m *EducationOneRosterApiDataProvider) SetTermIds(value []string)() { + m.termIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_providerable.go b/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_providerable.go new file mode 100644 index 000000000..1648eec3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_one_roster_api_data_providerable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOneRosterApiDataProviderable +type EducationOneRosterApiDataProviderable interface { + EducationSynchronizationDataProviderable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectionSettings()(EducationSynchronizationConnectionSettingsable) + GetConnectionUrl()(*string) + GetCustomizations()(EducationSynchronizationCustomizationsable) + GetProviderName()(*string) + GetSchoolsIds()([]string) + GetTermIds()([]string) + SetConnectionSettings(value EducationSynchronizationConnectionSettingsable)() + SetConnectionUrl(value *string)() + SetCustomizations(value EducationSynchronizationCustomizationsable)() + SetProviderName(value *string)() + SetSchoolsIds(value []string)() + SetTermIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_organization.go b/src/internal/connector/graph/betasdk/models/education_organization.go new file mode 100644 index 000000000..3aa8b9ece --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_organization.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOrganization provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationOrganization struct { + Entity + // Organization description. + description *string + // Organization display name. + displayName *string + // Where this user was created from. Possible values are: sis, lms, or manual. + externalSource *EducationExternalSource + // The externalSourceDetail property + externalSourceDetail *string +} +// NewEducationOrganization instantiates a new educationOrganization and sets the default values. +func NewEducationOrganization()(*EducationOrganization) { + m := &EducationOrganization{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationSchool": + return NewEducationSchool(), nil + } + } + } + } + return NewEducationOrganization(), nil +} +// GetDescription gets the description property value. Organization description. +func (m *EducationOrganization) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Organization display name. +func (m *EducationOrganization) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalSource gets the externalSource property value. Where this user was created from. Possible values are: sis, lms, or manual. +func (m *EducationOrganization) GetExternalSource()(*EducationExternalSource) { + return m.externalSource +} +// GetExternalSourceDetail gets the externalSourceDetail property value. The externalSourceDetail property +func (m *EducationOrganization) GetExternalSourceDetail()(*string) { + return m.externalSourceDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationOrganization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationExternalSource) + if err != nil { + return err + } + if val != nil { + m.SetExternalSource(val.(*EducationExternalSource)) + } + return nil + } + res["externalSourceDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalSourceDetail(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EducationOrganization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExternalSource() != nil { + cast := (*m.GetExternalSource()).String() + err = writer.WriteStringValue("externalSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalSourceDetail", m.GetExternalSourceDetail()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Organization description. +func (m *EducationOrganization) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Organization display name. +func (m *EducationOrganization) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalSource sets the externalSource property value. Where this user was created from. Possible values are: sis, lms, or manual. +func (m *EducationOrganization) SetExternalSource(value *EducationExternalSource)() { + m.externalSource = value +} +// SetExternalSourceDetail sets the externalSourceDetail property value. The externalSourceDetail property +func (m *EducationOrganization) SetExternalSourceDetail(value *string)() { + m.externalSourceDetail = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_organizationable.go b/src/internal/connector/graph/betasdk/models/education_organizationable.go new file mode 100644 index 000000000..1e1656928 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_organizationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOrganizationable +type EducationOrganizationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetExternalSource()(*EducationExternalSource) + GetExternalSourceDetail()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExternalSource(value *EducationExternalSource)() + SetExternalSourceDetail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_outcome.go b/src/internal/connector/graph/betasdk/models/education_outcome.go new file mode 100644 index 000000000..d74ad060e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_outcome.go @@ -0,0 +1,111 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOutcome provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationOutcome struct { + Entity + // The individual who updated the resource. + lastModifiedBy IdentitySetable + // The moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewEducationOutcome instantiates a new educationOutcome and sets the default values. +func NewEducationOutcome()(*EducationOutcome) { + m := &EducationOutcome{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationOutcomeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationOutcomeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationFeedbackOutcome": + return NewEducationFeedbackOutcome(), nil + case "#microsoft.graph.educationFeedbackResourceOutcome": + return NewEducationFeedbackResourceOutcome(), nil + case "#microsoft.graph.educationPointsOutcome": + return NewEducationPointsOutcome(), nil + case "#microsoft.graph.educationRubricOutcome": + return NewEducationRubricOutcome(), nil + } + } + } + } + return NewEducationOutcome(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationOutcome) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The individual who updated the resource. +func (m *EducationOutcome) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. +func (m *EducationOutcome) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *EducationOutcome) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedBy sets the lastModifiedBy property value. The individual who updated the resource. +func (m *EducationOutcome) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. +func (m *EducationOutcome) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_outcome_collection_response.go b/src/internal/connector/graph/betasdk/models/education_outcome_collection_response.go new file mode 100644 index 000000000..46cb3d2ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_outcome_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOutcomeCollectionResponse +type EducationOutcomeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationOutcomeable +} +// NewEducationOutcomeCollectionResponse instantiates a new EducationOutcomeCollectionResponse and sets the default values. +func NewEducationOutcomeCollectionResponse()(*EducationOutcomeCollectionResponse) { + m := &EducationOutcomeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationOutcomeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationOutcomeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationOutcomeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationOutcomeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationOutcomeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationOutcomeCollectionResponse) GetValue()([]EducationOutcomeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationOutcomeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationOutcomeCollectionResponse) SetValue(value []EducationOutcomeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_outcome_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_outcome_collection_responseable.go new file mode 100644 index 000000000..9e5e8a99e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_outcome_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOutcomeCollectionResponseable +type EducationOutcomeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationOutcomeable) + SetValue(value []EducationOutcomeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_outcomeable.go b/src/internal/connector/graph/betasdk/models/education_outcomeable.go new file mode 100644 index 000000000..b12f4ba29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_outcomeable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationOutcomeable +type EducationOutcomeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_points_outcome.go b/src/internal/connector/graph/betasdk/models/education_points_outcome.go new file mode 100644 index 000000000..975e1ba3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_points_outcome.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPointsOutcome +type EducationPointsOutcome struct { + EducationOutcome + // The numeric grade the teacher has given the student for this assignment. + points EducationAssignmentPointsGradeable + // A copy of the points property that is made when the grade is released to the student. + publishedPoints EducationAssignmentPointsGradeable +} +// NewEducationPointsOutcome instantiates a new EducationPointsOutcome and sets the default values. +func NewEducationPointsOutcome()(*EducationPointsOutcome) { + m := &EducationPointsOutcome{ + EducationOutcome: *NewEducationOutcome(), + } + odataTypeValue := "#microsoft.graph.educationPointsOutcome"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationPointsOutcomeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationPointsOutcomeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationPointsOutcome(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationPointsOutcome) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationOutcome.GetFieldDeserializers() + res["points"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentPointsGradeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPoints(val.(EducationAssignmentPointsGradeable)) + } + return nil + } + res["publishedPoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentPointsGradeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPublishedPoints(val.(EducationAssignmentPointsGradeable)) + } + return nil + } + return res +} +// GetPoints gets the points property value. The numeric grade the teacher has given the student for this assignment. +func (m *EducationPointsOutcome) GetPoints()(EducationAssignmentPointsGradeable) { + return m.points +} +// GetPublishedPoints gets the publishedPoints property value. A copy of the points property that is made when the grade is released to the student. +func (m *EducationPointsOutcome) GetPublishedPoints()(EducationAssignmentPointsGradeable) { + return m.publishedPoints +} +// Serialize serializes information the current object +func (m *EducationPointsOutcome) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationOutcome.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("points", m.GetPoints()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("publishedPoints", m.GetPublishedPoints()) + if err != nil { + return err + } + } + return nil +} +// SetPoints sets the points property value. The numeric grade the teacher has given the student for this assignment. +func (m *EducationPointsOutcome) SetPoints(value EducationAssignmentPointsGradeable)() { + m.points = value +} +// SetPublishedPoints sets the publishedPoints property value. A copy of the points property that is made when the grade is released to the student. +func (m *EducationPointsOutcome) SetPublishedPoints(value EducationAssignmentPointsGradeable)() { + m.publishedPoints = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_response.go b/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_response.go new file mode 100644 index 000000000..0488ec907 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPointsOutcomeCollectionResponse +type EducationPointsOutcomeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationPointsOutcomeable +} +// NewEducationPointsOutcomeCollectionResponse instantiates a new EducationPointsOutcomeCollectionResponse and sets the default values. +func NewEducationPointsOutcomeCollectionResponse()(*EducationPointsOutcomeCollectionResponse) { + m := &EducationPointsOutcomeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationPointsOutcomeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationPointsOutcomeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationPointsOutcomeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationPointsOutcomeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationPointsOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationPointsOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationPointsOutcomeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationPointsOutcomeCollectionResponse) GetValue()([]EducationPointsOutcomeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationPointsOutcomeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationPointsOutcomeCollectionResponse) SetValue(value []EducationPointsOutcomeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_responseable.go new file mode 100644 index 000000000..4fdb1dde1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_points_outcome_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPointsOutcomeCollectionResponseable +type EducationPointsOutcomeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationPointsOutcomeable) + SetValue(value []EducationPointsOutcomeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_points_outcomeable.go b/src/internal/connector/graph/betasdk/models/education_points_outcomeable.go new file mode 100644 index 000000000..9d9f4d35c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_points_outcomeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPointsOutcomeable +type EducationPointsOutcomeable interface { + EducationOutcomeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPoints()(EducationAssignmentPointsGradeable) + GetPublishedPoints()(EducationAssignmentPointsGradeable) + SetPoints(value EducationAssignmentPointsGradeable)() + SetPublishedPoints(value EducationAssignmentPointsGradeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_power_point_resource.go b/src/internal/connector/graph/betasdk/models/education_power_point_resource.go new file mode 100644 index 000000000..b3dc37e36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_power_point_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPowerPointResource +type EducationPowerPointResource struct { + EducationResource + // Location of the file on disk. + fileUrl *string +} +// NewEducationPowerPointResource instantiates a new EducationPowerPointResource and sets the default values. +func NewEducationPowerPointResource()(*EducationPowerPointResource) { + m := &EducationPowerPointResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationPowerPointResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationPowerPointResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationPowerPointResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationPowerPointResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationPowerPointResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. Location of the file on disk. +func (m *EducationPowerPointResource) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *EducationPowerPointResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. Location of the file on disk. +func (m *EducationPowerPointResource) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_power_point_resourceable.go b/src/internal/connector/graph/betasdk/models/education_power_point_resourceable.go new file mode 100644 index 000000000..eb6e54f8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_power_point_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPowerPointResourceable +type EducationPowerPointResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_power_school_data_provider.go b/src/internal/connector/graph/betasdk/models/education_power_school_data_provider.go new file mode 100644 index 000000000..5bcaf5252 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_power_school_data_provider.go @@ -0,0 +1,222 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPowerSchoolDataProvider +type EducationPowerSchoolDataProvider struct { + EducationSynchronizationDataProvider + // Indicates whether the source has multiple identifiers for a single student or teacher. + allowTeachersInMultipleSchools *bool + // The client ID used to connect to PowerSchool. + clientId *string + // The client secret to authenticate the connection to the PowerSchool instance. + clientSecret *string + // The connection URL to the PowerSchool instance. + connectionUrl *string + // Optional customization to be applied to the synchronization profile. + customizations EducationSynchronizationCustomizationsable + // The list of schools to sync. + schoolsIds []string + // The school year to sync. + schoolYear *string +} +// NewEducationPowerSchoolDataProvider instantiates a new EducationPowerSchoolDataProvider and sets the default values. +func NewEducationPowerSchoolDataProvider()(*EducationPowerSchoolDataProvider) { + m := &EducationPowerSchoolDataProvider{ + EducationSynchronizationDataProvider: *NewEducationSynchronizationDataProvider(), + } + odataTypeValue := "#microsoft.graph.educationPowerSchoolDataProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationPowerSchoolDataProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationPowerSchoolDataProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationPowerSchoolDataProvider(), nil +} +// GetAllowTeachersInMultipleSchools gets the allowTeachersInMultipleSchools property value. Indicates whether the source has multiple identifiers for a single student or teacher. +func (m *EducationPowerSchoolDataProvider) GetAllowTeachersInMultipleSchools()(*bool) { + return m.allowTeachersInMultipleSchools +} +// GetClientId gets the clientId property value. The client ID used to connect to PowerSchool. +func (m *EducationPowerSchoolDataProvider) GetClientId()(*string) { + return m.clientId +} +// GetClientSecret gets the clientSecret property value. The client secret to authenticate the connection to the PowerSchool instance. +func (m *EducationPowerSchoolDataProvider) GetClientSecret()(*string) { + return m.clientSecret +} +// GetConnectionUrl gets the connectionUrl property value. The connection URL to the PowerSchool instance. +func (m *EducationPowerSchoolDataProvider) GetConnectionUrl()(*string) { + return m.connectionUrl +} +// GetCustomizations gets the customizations property value. Optional customization to be applied to the synchronization profile. +func (m *EducationPowerSchoolDataProvider) GetCustomizations()(EducationSynchronizationCustomizationsable) { + return m.customizations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationPowerSchoolDataProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationDataProvider.GetFieldDeserializers() + res["allowTeachersInMultipleSchools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowTeachersInMultipleSchools(val) + } + return nil + } + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["clientSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(val) + } + return nil + } + res["connectionUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectionUrl(val) + } + return nil + } + res["customizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomizations(val.(EducationSynchronizationCustomizationsable)) + } + return nil + } + res["schoolsIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSchoolsIds(res) + } + return nil + } + res["schoolYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchoolYear(val) + } + return nil + } + return res +} +// GetSchoolsIds gets the schoolsIds property value. The list of schools to sync. +func (m *EducationPowerSchoolDataProvider) GetSchoolsIds()([]string) { + return m.schoolsIds +} +// GetSchoolYear gets the schoolYear property value. The school year to sync. +func (m *EducationPowerSchoolDataProvider) GetSchoolYear()(*string) { + return m.schoolYear +} +// Serialize serializes information the current object +func (m *EducationPowerSchoolDataProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationDataProvider.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowTeachersInMultipleSchools", m.GetAllowTeachersInMultipleSchools()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientSecret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectionUrl", m.GetConnectionUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customizations", m.GetCustomizations()) + if err != nil { + return err + } + } + if m.GetSchoolsIds() != nil { + err = writer.WriteCollectionOfStringValues("schoolsIds", m.GetSchoolsIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("schoolYear", m.GetSchoolYear()) + if err != nil { + return err + } + } + return nil +} +// SetAllowTeachersInMultipleSchools sets the allowTeachersInMultipleSchools property value. Indicates whether the source has multiple identifiers for a single student or teacher. +func (m *EducationPowerSchoolDataProvider) SetAllowTeachersInMultipleSchools(value *bool)() { + m.allowTeachersInMultipleSchools = value +} +// SetClientId sets the clientId property value. The client ID used to connect to PowerSchool. +func (m *EducationPowerSchoolDataProvider) SetClientId(value *string)() { + m.clientId = value +} +// SetClientSecret sets the clientSecret property value. The client secret to authenticate the connection to the PowerSchool instance. +func (m *EducationPowerSchoolDataProvider) SetClientSecret(value *string)() { + m.clientSecret = value +} +// SetConnectionUrl sets the connectionUrl property value. The connection URL to the PowerSchool instance. +func (m *EducationPowerSchoolDataProvider) SetConnectionUrl(value *string)() { + m.connectionUrl = value +} +// SetCustomizations sets the customizations property value. Optional customization to be applied to the synchronization profile. +func (m *EducationPowerSchoolDataProvider) SetCustomizations(value EducationSynchronizationCustomizationsable)() { + m.customizations = value +} +// SetSchoolsIds sets the schoolsIds property value. The list of schools to sync. +func (m *EducationPowerSchoolDataProvider) SetSchoolsIds(value []string)() { + m.schoolsIds = value +} +// SetSchoolYear sets the schoolYear property value. The school year to sync. +func (m *EducationPowerSchoolDataProvider) SetSchoolYear(value *string)() { + m.schoolYear = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_power_school_data_providerable.go b/src/internal/connector/graph/betasdk/models/education_power_school_data_providerable.go new file mode 100644 index 000000000..435ed2445 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_power_school_data_providerable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationPowerSchoolDataProviderable +type EducationPowerSchoolDataProviderable interface { + EducationSynchronizationDataProviderable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowTeachersInMultipleSchools()(*bool) + GetClientId()(*string) + GetClientSecret()(*string) + GetConnectionUrl()(*string) + GetCustomizations()(EducationSynchronizationCustomizationsable) + GetSchoolsIds()([]string) + GetSchoolYear()(*string) + SetAllowTeachersInMultipleSchools(value *bool)() + SetClientId(value *string)() + SetClientSecret(value *string)() + SetConnectionUrl(value *string)() + SetCustomizations(value EducationSynchronizationCustomizationsable)() + SetSchoolsIds(value []string)() + SetSchoolYear(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_resource.go b/src/internal/connector/graph/betasdk/models/education_resource.go new file mode 100644 index 000000000..7e5d776b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_resource.go @@ -0,0 +1,210 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationResource +type EducationResource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Who created the resource. + createdBy IdentitySetable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Display name of resource. + displayName *string + // Who was the last user to modify the resource. + lastModifiedBy IdentitySetable + // Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewEducationResource instantiates a new educationResource and sets the default values. +func NewEducationResource()(*EducationResource) { + m := &EducationResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationExcelResource": + return NewEducationExcelResource(), nil + case "#microsoft.graph.educationExternalResource": + return NewEducationExternalResource(), nil + case "#microsoft.graph.educationFileResource": + return NewEducationFileResource(), nil + case "#microsoft.graph.educationLinkResource": + return NewEducationLinkResource(), nil + case "#microsoft.graph.educationMediaResource": + return NewEducationMediaResource(), nil + case "#microsoft.graph.educationPowerPointResource": + return NewEducationPowerPointResource(), nil + case "#microsoft.graph.educationTeamsAppResource": + return NewEducationTeamsAppResource(), nil + case "#microsoft.graph.educationWordResource": + return NewEducationWordResource(), nil + } + } + } + } + return NewEducationResource(), 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 *EducationResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedBy gets the createdBy property value. Who created the resource. +func (m *EducationResource) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationResource) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Display name of resource. +func (m *EducationResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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 + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. Who was the last user to modify the resource. +func (m *EducationResource) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationResource) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationResource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedBy sets the createdBy property value. Who created the resource. +func (m *EducationResource) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationResource) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Display name of resource. +func (m *EducationResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Who was the last user to modify the resource. +func (m *EducationResource) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationResource) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationResource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_resourceable.go b/src/internal/connector/graph/betasdk/models/education_resourceable.go new file mode 100644 index 000000000..948ce89a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_resourceable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationResourceable +type EducationResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric.go b/src/internal/connector/graph/betasdk/models/education_rubric.go new file mode 100644 index 000000000..d680f6756 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric.go @@ -0,0 +1,261 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubric +type EducationRubric struct { + Entity + // The user who created this resource. + createdBy IdentitySetable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of this rubric. + description EducationItemBodyable + // The name of this rubric. + displayName *string + // The grading type of this rubric -- null for a no-points rubric, or educationAssignmentPointsGradeType for a points rubric. + grading EducationAssignmentGradeTypeable + // The last user to modify the resource. + lastModifiedBy IdentitySetable + // Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of levels making up this rubric. + levels []RubricLevelable + // The collection of qualities making up this rubric. + qualities []RubricQualityable +} +// NewEducationRubric instantiates a new educationRubric and sets the default values. +func NewEducationRubric()(*EducationRubric) { + m := &EducationRubric{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationRubricFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationRubricFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationRubric(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created this resource. +func (m *EducationRubric) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationRubric) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of this rubric. +func (m *EducationRubric) GetDescription()(EducationItemBodyable) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of this rubric. +func (m *EducationRubric) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationRubric) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDescription(val.(EducationItemBodyable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["grading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentGradeTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrading(val.(EducationAssignmentGradeTypeable)) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["levels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricLevelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricLevelable, len(val)) + for i, v := range val { + res[i] = v.(RubricLevelable) + } + m.SetLevels(res) + } + return nil + } + res["qualities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualityable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualityable) + } + m.SetQualities(res) + } + return nil + } + return res +} +// GetGrading gets the grading property value. The grading type of this rubric -- null for a no-points rubric, or educationAssignmentPointsGradeType for a points rubric. +func (m *EducationRubric) GetGrading()(EducationAssignmentGradeTypeable) { + return m.grading +} +// GetLastModifiedBy gets the lastModifiedBy property value. The last user to modify the resource. +func (m *EducationRubric) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationRubric) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLevels gets the levels property value. The collection of levels making up this rubric. +func (m *EducationRubric) GetLevels()([]RubricLevelable) { + return m.levels +} +// GetQualities gets the qualities property value. The collection of qualities making up this rubric. +func (m *EducationRubric) GetQualities()([]RubricQualityable) { + return m.qualities +} +// Serialize serializes information the current object +func (m *EducationRubric) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("grading", m.GetGrading()) + if err != nil { + return err + } + } + if m.GetLevels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLevels())) + for i, v := range m.GetLevels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("levels", cast) + if err != nil { + return err + } + } + if m.GetQualities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetQualities())) + for i, v := range m.GetQualities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("qualities", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created this resource. +func (m *EducationRubric) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationRubric) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of this rubric. +func (m *EducationRubric) SetDescription(value EducationItemBodyable)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of this rubric. +func (m *EducationRubric) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGrading sets the grading property value. The grading type of this rubric -- null for a no-points rubric, or educationAssignmentPointsGradeType for a points rubric. +func (m *EducationRubric) SetGrading(value EducationAssignmentGradeTypeable)() { + m.grading = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The last user to modify the resource. +func (m *EducationRubric) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Moment in time when the resource was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationRubric) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLevels sets the levels property value. The collection of levels making up this rubric. +func (m *EducationRubric) SetLevels(value []RubricLevelable)() { + m.levels = value +} +// SetQualities sets the qualities property value. The collection of qualities making up this rubric. +func (m *EducationRubric) SetQualities(value []RubricQualityable)() { + m.qualities = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_collection_response.go b/src/internal/connector/graph/betasdk/models/education_rubric_collection_response.go new file mode 100644 index 000000000..13c8724b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricCollectionResponse +type EducationRubricCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationRubricable +} +// NewEducationRubricCollectionResponse instantiates a new EducationRubricCollectionResponse and sets the default values. +func NewEducationRubricCollectionResponse()(*EducationRubricCollectionResponse) { + m := &EducationRubricCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationRubricCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationRubricCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationRubricCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationRubricCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationRubricFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationRubricable, len(val)) + for i, v := range val { + res[i] = v.(EducationRubricable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationRubricCollectionResponse) GetValue()([]EducationRubricable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationRubricCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationRubricCollectionResponse) SetValue(value []EducationRubricable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_rubric_collection_responseable.go new file mode 100644 index 000000000..9576824af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricCollectionResponseable +type EducationRubricCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationRubricable) + SetValue(value []EducationRubricable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_outcome.go b/src/internal/connector/graph/betasdk/models/education_rubric_outcome.go new file mode 100644 index 000000000..84ba14852 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_outcome.go @@ -0,0 +1,172 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricOutcome +type EducationRubricOutcome struct { + EducationOutcome + // A copy of the rubricQualityFeedback property that is made when the grade is released to the student. + publishedRubricQualityFeedback []RubricQualityFeedbackModelable + // A copy of the rubricQualitySelectedLevels property that is made when the grade is released to the student. + publishedRubricQualitySelectedLevels []RubricQualitySelectedColumnModelable + // A collection of specific feedback for each quality of this rubric. + rubricQualityFeedback []RubricQualityFeedbackModelable + // The level that the teacher has selected for each quality while grading this assignment. + rubricQualitySelectedLevels []RubricQualitySelectedColumnModelable +} +// NewEducationRubricOutcome instantiates a new EducationRubricOutcome and sets the default values. +func NewEducationRubricOutcome()(*EducationRubricOutcome) { + m := &EducationRubricOutcome{ + EducationOutcome: *NewEducationOutcome(), + } + odataTypeValue := "#microsoft.graph.educationRubricOutcome"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationRubricOutcomeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationRubricOutcomeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationRubricOutcome(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationRubricOutcome) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationOutcome.GetFieldDeserializers() + res["publishedRubricQualityFeedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualityFeedbackModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualityFeedbackModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualityFeedbackModelable) + } + m.SetPublishedRubricQualityFeedback(res) + } + return nil + } + res["publishedRubricQualitySelectedLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualitySelectedColumnModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualitySelectedColumnModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualitySelectedColumnModelable) + } + m.SetPublishedRubricQualitySelectedLevels(res) + } + return nil + } + res["rubricQualityFeedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualityFeedbackModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualityFeedbackModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualityFeedbackModelable) + } + m.SetRubricQualityFeedback(res) + } + return nil + } + res["rubricQualitySelectedLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualitySelectedColumnModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualitySelectedColumnModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualitySelectedColumnModelable) + } + m.SetRubricQualitySelectedLevels(res) + } + return nil + } + return res +} +// GetPublishedRubricQualityFeedback gets the publishedRubricQualityFeedback property value. A copy of the rubricQualityFeedback property that is made when the grade is released to the student. +func (m *EducationRubricOutcome) GetPublishedRubricQualityFeedback()([]RubricQualityFeedbackModelable) { + return m.publishedRubricQualityFeedback +} +// GetPublishedRubricQualitySelectedLevels gets the publishedRubricQualitySelectedLevels property value. A copy of the rubricQualitySelectedLevels property that is made when the grade is released to the student. +func (m *EducationRubricOutcome) GetPublishedRubricQualitySelectedLevels()([]RubricQualitySelectedColumnModelable) { + return m.publishedRubricQualitySelectedLevels +} +// GetRubricQualityFeedback gets the rubricQualityFeedback property value. A collection of specific feedback for each quality of this rubric. +func (m *EducationRubricOutcome) GetRubricQualityFeedback()([]RubricQualityFeedbackModelable) { + return m.rubricQualityFeedback +} +// GetRubricQualitySelectedLevels gets the rubricQualitySelectedLevels property value. The level that the teacher has selected for each quality while grading this assignment. +func (m *EducationRubricOutcome) GetRubricQualitySelectedLevels()([]RubricQualitySelectedColumnModelable) { + return m.rubricQualitySelectedLevels +} +// Serialize serializes information the current object +func (m *EducationRubricOutcome) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationOutcome.Serialize(writer) + if err != nil { + return err + } + if m.GetPublishedRubricQualityFeedback() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublishedRubricQualityFeedback())) + for i, v := range m.GetPublishedRubricQualityFeedback() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publishedRubricQualityFeedback", cast) + if err != nil { + return err + } + } + if m.GetPublishedRubricQualitySelectedLevels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublishedRubricQualitySelectedLevels())) + for i, v := range m.GetPublishedRubricQualitySelectedLevels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publishedRubricQualitySelectedLevels", cast) + if err != nil { + return err + } + } + if m.GetRubricQualityFeedback() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRubricQualityFeedback())) + for i, v := range m.GetRubricQualityFeedback() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rubricQualityFeedback", cast) + if err != nil { + return err + } + } + if m.GetRubricQualitySelectedLevels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRubricQualitySelectedLevels())) + for i, v := range m.GetRubricQualitySelectedLevels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rubricQualitySelectedLevels", cast) + if err != nil { + return err + } + } + return nil +} +// SetPublishedRubricQualityFeedback sets the publishedRubricQualityFeedback property value. A copy of the rubricQualityFeedback property that is made when the grade is released to the student. +func (m *EducationRubricOutcome) SetPublishedRubricQualityFeedback(value []RubricQualityFeedbackModelable)() { + m.publishedRubricQualityFeedback = value +} +// SetPublishedRubricQualitySelectedLevels sets the publishedRubricQualitySelectedLevels property value. A copy of the rubricQualitySelectedLevels property that is made when the grade is released to the student. +func (m *EducationRubricOutcome) SetPublishedRubricQualitySelectedLevels(value []RubricQualitySelectedColumnModelable)() { + m.publishedRubricQualitySelectedLevels = value +} +// SetRubricQualityFeedback sets the rubricQualityFeedback property value. A collection of specific feedback for each quality of this rubric. +func (m *EducationRubricOutcome) SetRubricQualityFeedback(value []RubricQualityFeedbackModelable)() { + m.rubricQualityFeedback = value +} +// SetRubricQualitySelectedLevels sets the rubricQualitySelectedLevels property value. The level that the teacher has selected for each quality while grading this assignment. +func (m *EducationRubricOutcome) SetRubricQualitySelectedLevels(value []RubricQualitySelectedColumnModelable)() { + m.rubricQualitySelectedLevels = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_response.go b/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_response.go new file mode 100644 index 000000000..8c0352035 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricOutcomeCollectionResponse +type EducationRubricOutcomeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationRubricOutcomeable +} +// NewEducationRubricOutcomeCollectionResponse instantiates a new EducationRubricOutcomeCollectionResponse and sets the default values. +func NewEducationRubricOutcomeCollectionResponse()(*EducationRubricOutcomeCollectionResponse) { + m := &EducationRubricOutcomeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationRubricOutcomeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationRubricOutcomeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationRubricOutcomeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationRubricOutcomeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationRubricOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationRubricOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationRubricOutcomeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationRubricOutcomeCollectionResponse) GetValue()([]EducationRubricOutcomeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationRubricOutcomeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationRubricOutcomeCollectionResponse) SetValue(value []EducationRubricOutcomeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_responseable.go new file mode 100644 index 000000000..a9a60b220 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_outcome_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricOutcomeCollectionResponseable +type EducationRubricOutcomeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationRubricOutcomeable) + SetValue(value []EducationRubricOutcomeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubric_outcomeable.go b/src/internal/connector/graph/betasdk/models/education_rubric_outcomeable.go new file mode 100644 index 000000000..ff2081960 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubric_outcomeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricOutcomeable +type EducationRubricOutcomeable interface { + EducationOutcomeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPublishedRubricQualityFeedback()([]RubricQualityFeedbackModelable) + GetPublishedRubricQualitySelectedLevels()([]RubricQualitySelectedColumnModelable) + GetRubricQualityFeedback()([]RubricQualityFeedbackModelable) + GetRubricQualitySelectedLevels()([]RubricQualitySelectedColumnModelable) + SetPublishedRubricQualityFeedback(value []RubricQualityFeedbackModelable)() + SetPublishedRubricQualitySelectedLevels(value []RubricQualitySelectedColumnModelable)() + SetRubricQualityFeedback(value []RubricQualityFeedbackModelable)() + SetRubricQualitySelectedLevels(value []RubricQualitySelectedColumnModelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_rubricable.go b/src/internal/connector/graph/betasdk/models/education_rubricable.go new file mode 100644 index 000000000..c17071cf9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_rubricable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationRubricable +type EducationRubricable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(EducationItemBodyable) + GetDisplayName()(*string) + GetGrading()(EducationAssignmentGradeTypeable) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLevels()([]RubricLevelable) + GetQualities()([]RubricQualityable) + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value EducationItemBodyable)() + SetDisplayName(value *string)() + SetGrading(value EducationAssignmentGradeTypeable)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLevels(value []RubricLevelable)() + SetQualities(value []RubricQualityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_school.go b/src/internal/connector/graph/betasdk/models/education_school.go new file mode 100644 index 000000000..00e53e913 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_school.go @@ -0,0 +1,416 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSchool +type EducationSchool struct { + EducationOrganization + // Address of the school. + address PhysicalAddressable + // The administrativeUnit property + administrativeUnit AdministrativeUnitable + // Classes taught at the school. Nullable. + classes []EducationClassable + // Entity who created the school. + createdBy IdentitySetable + // ID of school in syncing system. + externalId *string + // ID of principal in syncing system. + externalPrincipalId *string + // The fax property + fax *string + // Highest grade taught. + highestGrade *string + // Lowest grade taught. + lowestGrade *string + // Phone number of school. + phone *string + // Email address of the principal. + principalEmail *string + // Name of the principal. + principalName *string + // School Number. + schoolNumber *string + // Users in the school. Nullable. + users []EducationUserable +} +// NewEducationSchool instantiates a new EducationSchool and sets the default values. +func NewEducationSchool()(*EducationSchool) { + m := &EducationSchool{ + EducationOrganization: *NewEducationOrganization(), + } + odataTypeValue := "#microsoft.graph.educationSchool"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationSchoolFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSchoolFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSchool(), nil +} +// GetAddress gets the address property value. Address of the school. +func (m *EducationSchool) GetAddress()(PhysicalAddressable) { + return m.address +} +// GetAdministrativeUnit gets the administrativeUnit property value. The administrativeUnit property +func (m *EducationSchool) GetAdministrativeUnit()(AdministrativeUnitable) { + return m.administrativeUnit +} +// GetClasses gets the classes property value. Classes taught at the school. Nullable. +func (m *EducationSchool) GetClasses()([]EducationClassable) { + return m.classes +} +// GetCreatedBy gets the createdBy property value. Entity who created the school. +func (m *EducationSchool) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetExternalId gets the externalId property value. ID of school in syncing system. +func (m *EducationSchool) GetExternalId()(*string) { + return m.externalId +} +// GetExternalPrincipalId gets the externalPrincipalId property value. ID of principal in syncing system. +func (m *EducationSchool) GetExternalPrincipalId()(*string) { + return m.externalPrincipalId +} +// GetFax gets the fax property value. The fax property +func (m *EducationSchool) GetFax()(*string) { + return m.fax +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSchool) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationOrganization.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PhysicalAddressable)) + } + return nil + } + res["administrativeUnit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAdministrativeUnitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdministrativeUnit(val.(AdministrativeUnitable)) + } + return nil + } + res["classes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationClassable, len(val)) + for i, v := range val { + res[i] = v.(EducationClassable) + } + m.SetClasses(res) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["externalPrincipalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalPrincipalId(val) + } + return nil + } + res["fax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFax(val) + } + return nil + } + res["highestGrade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHighestGrade(val) + } + return nil + } + res["lowestGrade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLowestGrade(val) + } + return nil + } + res["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhone(val) + } + return nil + } + res["principalEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalEmail(val) + } + return nil + } + res["principalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalName(val) + } + return nil + } + res["schoolNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchoolNumber(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationUserable, len(val)) + for i, v := range val { + res[i] = v.(EducationUserable) + } + m.SetUsers(res) + } + return nil + } + return res +} +// GetHighestGrade gets the highestGrade property value. Highest grade taught. +func (m *EducationSchool) GetHighestGrade()(*string) { + return m.highestGrade +} +// GetLowestGrade gets the lowestGrade property value. Lowest grade taught. +func (m *EducationSchool) GetLowestGrade()(*string) { + return m.lowestGrade +} +// GetPhone gets the phone property value. Phone number of school. +func (m *EducationSchool) GetPhone()(*string) { + return m.phone +} +// GetPrincipalEmail gets the principalEmail property value. Email address of the principal. +func (m *EducationSchool) GetPrincipalEmail()(*string) { + return m.principalEmail +} +// GetPrincipalName gets the principalName property value. Name of the principal. +func (m *EducationSchool) GetPrincipalName()(*string) { + return m.principalName +} +// GetSchoolNumber gets the schoolNumber property value. School Number. +func (m *EducationSchool) GetSchoolNumber()(*string) { + return m.schoolNumber +} +// GetUsers gets the users property value. Users in the school. Nullable. +func (m *EducationSchool) GetUsers()([]EducationUserable) { + return m.users +} +// Serialize serializes information the current object +func (m *EducationSchool) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationOrganization.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("administrativeUnit", m.GetAdministrativeUnit()) + if err != nil { + return err + } + } + if m.GetClasses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClasses())) + for i, v := range m.GetClasses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("classes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalPrincipalId", m.GetExternalPrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fax", m.GetFax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("highestGrade", m.GetHighestGrade()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lowestGrade", m.GetLowestGrade()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalEmail", m.GetPrincipalEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalName", m.GetPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("schoolNumber", m.GetSchoolNumber()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. Address of the school. +func (m *EducationSchool) SetAddress(value PhysicalAddressable)() { + m.address = value +} +// SetAdministrativeUnit sets the administrativeUnit property value. The administrativeUnit property +func (m *EducationSchool) SetAdministrativeUnit(value AdministrativeUnitable)() { + m.administrativeUnit = value +} +// SetClasses sets the classes property value. Classes taught at the school. Nullable. +func (m *EducationSchool) SetClasses(value []EducationClassable)() { + m.classes = value +} +// SetCreatedBy sets the createdBy property value. Entity who created the school. +func (m *EducationSchool) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetExternalId sets the externalId property value. ID of school in syncing system. +func (m *EducationSchool) SetExternalId(value *string)() { + m.externalId = value +} +// SetExternalPrincipalId sets the externalPrincipalId property value. ID of principal in syncing system. +func (m *EducationSchool) SetExternalPrincipalId(value *string)() { + m.externalPrincipalId = value +} +// SetFax sets the fax property value. The fax property +func (m *EducationSchool) SetFax(value *string)() { + m.fax = value +} +// SetHighestGrade sets the highestGrade property value. Highest grade taught. +func (m *EducationSchool) SetHighestGrade(value *string)() { + m.highestGrade = value +} +// SetLowestGrade sets the lowestGrade property value. Lowest grade taught. +func (m *EducationSchool) SetLowestGrade(value *string)() { + m.lowestGrade = value +} +// SetPhone sets the phone property value. Phone number of school. +func (m *EducationSchool) SetPhone(value *string)() { + m.phone = value +} +// SetPrincipalEmail sets the principalEmail property value. Email address of the principal. +func (m *EducationSchool) SetPrincipalEmail(value *string)() { + m.principalEmail = value +} +// SetPrincipalName sets the principalName property value. Name of the principal. +func (m *EducationSchool) SetPrincipalName(value *string)() { + m.principalName = value +} +// SetSchoolNumber sets the schoolNumber property value. School Number. +func (m *EducationSchool) SetSchoolNumber(value *string)() { + m.schoolNumber = value +} +// SetUsers sets the users property value. Users in the school. Nullable. +func (m *EducationSchool) SetUsers(value []EducationUserable)() { + m.users = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_school_collection_response.go b/src/internal/connector/graph/betasdk/models/education_school_collection_response.go new file mode 100644 index 000000000..5cda2d650 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_school_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSchoolCollectionResponse +type EducationSchoolCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSchoolable +} +// NewEducationSchoolCollectionResponse instantiates a new EducationSchoolCollectionResponse and sets the default values. +func NewEducationSchoolCollectionResponse()(*EducationSchoolCollectionResponse) { + m := &EducationSchoolCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSchoolCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSchoolCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSchoolCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSchoolCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSchoolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSchoolable, len(val)) + for i, v := range val { + res[i] = v.(EducationSchoolable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSchoolCollectionResponse) GetValue()([]EducationSchoolable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSchoolCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSchoolCollectionResponse) SetValue(value []EducationSchoolable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_school_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_school_collection_responseable.go new file mode 100644 index 000000000..a4343ac47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_school_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSchoolCollectionResponseable +type EducationSchoolCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSchoolable) + SetValue(value []EducationSchoolable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_schoolable.go b/src/internal/connector/graph/betasdk/models/education_schoolable.go new file mode 100644 index 000000000..f1294f46d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_schoolable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSchoolable +type EducationSchoolable interface { + EducationOrganizationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PhysicalAddressable) + GetAdministrativeUnit()(AdministrativeUnitable) + GetClasses()([]EducationClassable) + GetCreatedBy()(IdentitySetable) + GetExternalId()(*string) + GetExternalPrincipalId()(*string) + GetFax()(*string) + GetHighestGrade()(*string) + GetLowestGrade()(*string) + GetPhone()(*string) + GetPrincipalEmail()(*string) + GetPrincipalName()(*string) + GetSchoolNumber()(*string) + GetUsers()([]EducationUserable) + SetAddress(value PhysicalAddressable)() + SetAdministrativeUnit(value AdministrativeUnitable)() + SetClasses(value []EducationClassable)() + SetCreatedBy(value IdentitySetable)() + SetExternalId(value *string)() + SetExternalPrincipalId(value *string)() + SetFax(value *string)() + SetHighestGrade(value *string)() + SetLowestGrade(value *string)() + SetPhone(value *string)() + SetPrincipalEmail(value *string)() + SetPrincipalName(value *string)() + SetSchoolNumber(value *string)() + SetUsers(value []EducationUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_student.go b/src/internal/connector/graph/betasdk/models/education_student.go new file mode 100644 index 000000000..a3205a341 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_student.go @@ -0,0 +1,228 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationStudent +type EducationStudent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Birth date of the student. + birthDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // ID of the student in the source system. + externalId *string + // Possible values are: female, male, other. + gender *EducationGender + // Current grade level of the student. + grade *string + // Year the student is graduating from the school. + graduationYear *string + // The OdataType property + odataType *string + // Student Number. + studentNumber *string +} +// NewEducationStudent instantiates a new educationStudent and sets the default values. +func NewEducationStudent()(*EducationStudent) { + m := &EducationStudent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationStudentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationStudentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationStudent(), 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 *EducationStudent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBirthDate gets the birthDate property value. Birth date of the student. +func (m *EducationStudent) GetBirthDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.birthDate +} +// GetExternalId gets the externalId property value. ID of the student in the source system. +func (m *EducationStudent) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationStudent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["birthDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetBirthDate(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["gender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationGender) + if err != nil { + return err + } + if val != nil { + m.SetGender(val.(*EducationGender)) + } + return nil + } + res["grade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrade(val) + } + return nil + } + res["graduationYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGraduationYear(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["studentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStudentNumber(val) + } + return nil + } + return res +} +// GetGender gets the gender property value. Possible values are: female, male, other. +func (m *EducationStudent) GetGender()(*EducationGender) { + return m.gender +} +// GetGrade gets the grade property value. Current grade level of the student. +func (m *EducationStudent) GetGrade()(*string) { + return m.grade +} +// GetGraduationYear gets the graduationYear property value. Year the student is graduating from the school. +func (m *EducationStudent) GetGraduationYear()(*string) { + return m.graduationYear +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationStudent) GetOdataType()(*string) { + return m.odataType +} +// GetStudentNumber gets the studentNumber property value. Student Number. +func (m *EducationStudent) GetStudentNumber()(*string) { + return m.studentNumber +} +// Serialize serializes information the current object +func (m *EducationStudent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteDateOnlyValue("birthDate", m.GetBirthDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetGender() != nil { + cast := (*m.GetGender()).String() + err := writer.WriteStringValue("gender", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("grade", m.GetGrade()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("graduationYear", m.GetGraduationYear()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("studentNumber", m.GetStudentNumber()) + 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 *EducationStudent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBirthDate sets the birthDate property value. Birth date of the student. +func (m *EducationStudent) SetBirthDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.birthDate = value +} +// SetExternalId sets the externalId property value. ID of the student in the source system. +func (m *EducationStudent) SetExternalId(value *string)() { + m.externalId = value +} +// SetGender sets the gender property value. Possible values are: female, male, other. +func (m *EducationStudent) SetGender(value *EducationGender)() { + m.gender = value +} +// SetGrade sets the grade property value. Current grade level of the student. +func (m *EducationStudent) SetGrade(value *string)() { + m.grade = value +} +// SetGraduationYear sets the graduationYear property value. Year the student is graduating from the school. +func (m *EducationStudent) SetGraduationYear(value *string)() { + m.graduationYear = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationStudent) SetOdataType(value *string)() { + m.odataType = value +} +// SetStudentNumber sets the studentNumber property value. Student Number. +func (m *EducationStudent) SetStudentNumber(value *string)() { + m.studentNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_studentable.go b/src/internal/connector/graph/betasdk/models/education_studentable.go new file mode 100644 index 000000000..115fcfb41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_studentable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationStudentable +type EducationStudentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBirthDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetExternalId()(*string) + GetGender()(*EducationGender) + GetGrade()(*string) + GetGraduationYear()(*string) + GetOdataType()(*string) + GetStudentNumber()(*string) + SetBirthDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetExternalId(value *string)() + SetGender(value *EducationGender)() + SetGrade(value *string)() + SetGraduationYear(value *string)() + SetOdataType(value *string)() + SetStudentNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission.go b/src/internal/connector/graph/betasdk/models/education_submission.go new file mode 100644 index 000000000..ccdfa977d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission.go @@ -0,0 +1,383 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmission provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSubmission struct { + Entity + // The outcomes property + outcomes []EducationOutcomeable + // User who moved the status of this submission to reassigned. + reassignedBy IdentitySetable + // Moment in time when the submission was reassigned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + reassignedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Who this submission is assigned to. + recipient EducationSubmissionRecipientable + // The resources property + resources []EducationSubmissionResourceable + // Folder where all file resources for this submission need to be stored. + resourcesFolderUrl *string + // User who moved the status of this submission to returned. + returnedBy IdentitySetable + // Moment in time when the submission was returned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + returnedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. Possible values are: working, submitted, released, returned, unknownFutureValue and reassigned. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: reassigned. + status *EducationSubmissionStatus + // User who moved the resource into the submitted state. + submittedBy IdentitySetable + // Moment in time when the submission was moved into the submitted state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + submittedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The submittedResources property + submittedResources []EducationSubmissionResourceable + // User who moved the resource from submitted into the working state. + unsubmittedBy IdentitySetable + // Moment in time when the submission was moved from submitted into the working state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + unsubmittedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deep link URL for the given submission. + webUrl *string +} +// NewEducationSubmission instantiates a new educationSubmission and sets the default values. +func NewEducationSubmission()(*EducationSubmission) { + m := &EducationSubmission{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["outcomes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationOutcomeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationOutcomeable, len(val)) + for i, v := range val { + res[i] = v.(EducationOutcomeable) + } + m.SetOutcomes(res) + } + return nil + } + res["reassignedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReassignedBy(val.(IdentitySetable)) + } + return nil + } + res["reassignedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReassignedDateTime(val) + } + return nil + } + res["recipient"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSubmissionRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecipient(val.(EducationSubmissionRecipientable)) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSubmissionResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSubmissionResourceable, len(val)) + for i, v := range val { + res[i] = v.(EducationSubmissionResourceable) + } + m.SetResources(res) + } + return nil + } + res["resourcesFolderUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourcesFolderUrl(val) + } + return nil + } + res["returnedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReturnedBy(val.(IdentitySetable)) + } + return nil + } + res["returnedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReturnedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationSubmissionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*EducationSubmissionStatus)) + } + return nil + } + res["submittedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubmittedBy(val.(IdentitySetable)) + } + return nil + } + res["submittedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSubmittedDateTime(val) + } + return nil + } + res["submittedResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSubmissionResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSubmissionResourceable, len(val)) + for i, v := range val { + res[i] = v.(EducationSubmissionResourceable) + } + m.SetSubmittedResources(res) + } + return nil + } + res["unsubmittedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUnsubmittedBy(val.(IdentitySetable)) + } + return nil + } + res["unsubmittedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUnsubmittedDateTime(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetOutcomes gets the outcomes property value. The outcomes property +func (m *EducationSubmission) GetOutcomes()([]EducationOutcomeable) { + return m.outcomes +} +// GetReassignedBy gets the reassignedBy property value. User who moved the status of this submission to reassigned. +func (m *EducationSubmission) GetReassignedBy()(IdentitySetable) { + return m.reassignedBy +} +// GetReassignedDateTime gets the reassignedDateTime property value. Moment in time when the submission was reassigned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) GetReassignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reassignedDateTime +} +// GetRecipient gets the recipient property value. Who this submission is assigned to. +func (m *EducationSubmission) GetRecipient()(EducationSubmissionRecipientable) { + return m.recipient +} +// GetResources gets the resources property value. The resources property +func (m *EducationSubmission) GetResources()([]EducationSubmissionResourceable) { + return m.resources +} +// GetResourcesFolderUrl gets the resourcesFolderUrl property value. Folder where all file resources for this submission need to be stored. +func (m *EducationSubmission) GetResourcesFolderUrl()(*string) { + return m.resourcesFolderUrl +} +// GetReturnedBy gets the returnedBy property value. User who moved the status of this submission to returned. +func (m *EducationSubmission) GetReturnedBy()(IdentitySetable) { + return m.returnedBy +} +// GetReturnedDateTime gets the returnedDateTime property value. Moment in time when the submission was returned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) GetReturnedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.returnedDateTime +} +// GetStatus gets the status property value. Read-only. Possible values are: working, submitted, released, returned, unknownFutureValue and reassigned. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: reassigned. +func (m *EducationSubmission) GetStatus()(*EducationSubmissionStatus) { + return m.status +} +// GetSubmittedBy gets the submittedBy property value. User who moved the resource into the submitted state. +func (m *EducationSubmission) GetSubmittedBy()(IdentitySetable) { + return m.submittedBy +} +// GetSubmittedDateTime gets the submittedDateTime property value. Moment in time when the submission was moved into the submitted state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) GetSubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.submittedDateTime +} +// GetSubmittedResources gets the submittedResources property value. The submittedResources property +func (m *EducationSubmission) GetSubmittedResources()([]EducationSubmissionResourceable) { + return m.submittedResources +} +// GetUnsubmittedBy gets the unsubmittedBy property value. User who moved the resource from submitted into the working state. +func (m *EducationSubmission) GetUnsubmittedBy()(IdentitySetable) { + return m.unsubmittedBy +} +// GetUnsubmittedDateTime gets the unsubmittedDateTime property value. Moment in time when the submission was moved from submitted into the working state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) GetUnsubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.unsubmittedDateTime +} +// GetWebUrl gets the webUrl property value. The deep link URL for the given submission. +func (m *EducationSubmission) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *EducationSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetOutcomes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOutcomes())) + for i, v := range m.GetOutcomes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("outcomes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recipient", m.GetRecipient()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + if m.GetSubmittedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubmittedResources())) + for i, v := range m.GetSubmittedResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("submittedResources", cast) + if err != nil { + return err + } + } + return nil +} +// SetOutcomes sets the outcomes property value. The outcomes property +func (m *EducationSubmission) SetOutcomes(value []EducationOutcomeable)() { + m.outcomes = value +} +// SetReassignedBy sets the reassignedBy property value. User who moved the status of this submission to reassigned. +func (m *EducationSubmission) SetReassignedBy(value IdentitySetable)() { + m.reassignedBy = value +} +// SetReassignedDateTime sets the reassignedDateTime property value. Moment in time when the submission was reassigned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) SetReassignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reassignedDateTime = value +} +// SetRecipient sets the recipient property value. Who this submission is assigned to. +func (m *EducationSubmission) SetRecipient(value EducationSubmissionRecipientable)() { + m.recipient = value +} +// SetResources sets the resources property value. The resources property +func (m *EducationSubmission) SetResources(value []EducationSubmissionResourceable)() { + m.resources = value +} +// SetResourcesFolderUrl sets the resourcesFolderUrl property value. Folder where all file resources for this submission need to be stored. +func (m *EducationSubmission) SetResourcesFolderUrl(value *string)() { + m.resourcesFolderUrl = value +} +// SetReturnedBy sets the returnedBy property value. User who moved the status of this submission to returned. +func (m *EducationSubmission) SetReturnedBy(value IdentitySetable)() { + m.returnedBy = value +} +// SetReturnedDateTime sets the returnedDateTime property value. Moment in time when the submission was returned. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) SetReturnedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.returnedDateTime = value +} +// SetStatus sets the status property value. Read-only. Possible values are: working, submitted, released, returned, unknownFutureValue and reassigned. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: reassigned. +func (m *EducationSubmission) SetStatus(value *EducationSubmissionStatus)() { + m.status = value +} +// SetSubmittedBy sets the submittedBy property value. User who moved the resource into the submitted state. +func (m *EducationSubmission) SetSubmittedBy(value IdentitySetable)() { + m.submittedBy = value +} +// SetSubmittedDateTime sets the submittedDateTime property value. Moment in time when the submission was moved into the submitted state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) SetSubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.submittedDateTime = value +} +// SetSubmittedResources sets the submittedResources property value. The submittedResources property +func (m *EducationSubmission) SetSubmittedResources(value []EducationSubmissionResourceable)() { + m.submittedResources = value +} +// SetUnsubmittedBy sets the unsubmittedBy property value. User who moved the resource from submitted into the working state. +func (m *EducationSubmission) SetUnsubmittedBy(value IdentitySetable)() { + m.unsubmittedBy = value +} +// SetUnsubmittedDateTime sets the unsubmittedDateTime property value. Moment in time when the submission was moved from submitted into the working state. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EducationSubmission) SetUnsubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.unsubmittedDateTime = value +} +// SetWebUrl sets the webUrl property value. The deep link URL for the given submission. +func (m *EducationSubmission) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/education_submission_collection_response.go new file mode 100644 index 000000000..a4b2e6715 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionCollectionResponse +type EducationSubmissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSubmissionable +} +// NewEducationSubmissionCollectionResponse instantiates a new EducationSubmissionCollectionResponse and sets the default values. +func NewEducationSubmissionCollectionResponse()(*EducationSubmissionCollectionResponse) { + m := &EducationSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EducationSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSubmissionCollectionResponse) GetValue()([]EducationSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSubmissionCollectionResponse) SetValue(value []EducationSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_submission_collection_responseable.go new file mode 100644 index 000000000..6293fc955 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionCollectionResponseable +type EducationSubmissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSubmissionable) + SetValue(value []EducationSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_individual_recipient.go b/src/internal/connector/graph/betasdk/models/education_submission_individual_recipient.go new file mode 100644 index 000000000..45cb33b28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_individual_recipient.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionIndividualRecipient +type EducationSubmissionIndividualRecipient struct { + EducationSubmissionRecipient + // User ID of the user to whom the submission is assigned. + userId *string +} +// NewEducationSubmissionIndividualRecipient instantiates a new EducationSubmissionIndividualRecipient and sets the default values. +func NewEducationSubmissionIndividualRecipient()(*EducationSubmissionIndividualRecipient) { + m := &EducationSubmissionIndividualRecipient{ + EducationSubmissionRecipient: *NewEducationSubmissionRecipient(), + } + odataTypeValue := "#microsoft.graph.educationSubmissionIndividualRecipient"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationSubmissionIndividualRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionIndividualRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSubmissionIndividualRecipient(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmissionIndividualRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSubmissionRecipient.GetFieldDeserializers() + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetUserId gets the userId property value. User ID of the user to whom the submission is assigned. +func (m *EducationSubmissionIndividualRecipient) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *EducationSubmissionIndividualRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSubmissionRecipient.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetUserId sets the userId property value. User ID of the user to whom the submission is assigned. +func (m *EducationSubmissionIndividualRecipient) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_individual_recipientable.go b/src/internal/connector/graph/betasdk/models/education_submission_individual_recipientable.go new file mode 100644 index 000000000..b3aea699c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_individual_recipientable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionIndividualRecipientable +type EducationSubmissionIndividualRecipientable interface { + EducationSubmissionRecipientable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserId()(*string) + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_recipient.go b/src/internal/connector/graph/betasdk/models/education_submission_recipient.go new file mode 100644 index 000000000..c5112b68a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_recipient.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionRecipient +type EducationSubmissionRecipient 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 OdataType property + odataType *string +} +// NewEducationSubmissionRecipient instantiates a new educationSubmissionRecipient and sets the default values. +func NewEducationSubmissionRecipient()(*EducationSubmissionRecipient) { + m := &EducationSubmissionRecipient{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSubmissionRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationSubmissionIndividualRecipient": + return NewEducationSubmissionIndividualRecipient(), nil + } + } + } + } + return NewEducationSubmissionRecipient(), 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 *EducationSubmissionRecipient) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmissionRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSubmissionRecipient) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationSubmissionRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationSubmissionRecipient) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSubmissionRecipient) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_recipientable.go b/src/internal/connector/graph/betasdk/models/education_submission_recipientable.go new file mode 100644 index 000000000..6c1da2945 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_recipientable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionRecipientable +type EducationSubmissionRecipientable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_resource.go b/src/internal/connector/graph/betasdk/models/education_submission_resource.go new file mode 100644 index 000000000..07054de3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_resource.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionResource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSubmissionResource struct { + Entity + // Pointer to the assignment from which this resource was copied. If this is null, the student uploaded the resource. + assignmentResourceUrl *string + // Resource object. + resource EducationResourceable +} +// NewEducationSubmissionResource instantiates a new educationSubmissionResource and sets the default values. +func NewEducationSubmissionResource()(*EducationSubmissionResource) { + m := &EducationSubmissionResource{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationSubmissionResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSubmissionResource(), nil +} +// GetAssignmentResourceUrl gets the assignmentResourceUrl property value. Pointer to the assignment from which this resource was copied. If this is null, the student uploaded the resource. +func (m *EducationSubmissionResource) GetAssignmentResourceUrl()(*string) { + return m.assignmentResourceUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmissionResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentResourceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentResourceUrl(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(EducationResourceable)) + } + return nil + } + return res +} +// GetResource gets the resource property value. Resource object. +func (m *EducationSubmissionResource) GetResource()(EducationResourceable) { + return m.resource +} +// Serialize serializes information the current object +func (m *EducationSubmissionResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignmentResourceUrl", m.GetAssignmentResourceUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentResourceUrl sets the assignmentResourceUrl property value. Pointer to the assignment from which this resource was copied. If this is null, the student uploaded the resource. +func (m *EducationSubmissionResource) SetAssignmentResourceUrl(value *string)() { + m.assignmentResourceUrl = value +} +// SetResource sets the resource property value. Resource object. +func (m *EducationSubmissionResource) SetResource(value EducationResourceable)() { + m.resource = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_response.go new file mode 100644 index 000000000..c6643c96c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionResourceCollectionResponse +type EducationSubmissionResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSubmissionResourceable +} +// NewEducationSubmissionResourceCollectionResponse instantiates a new EducationSubmissionResourceCollectionResponse and sets the default values. +func NewEducationSubmissionResourceCollectionResponse()(*EducationSubmissionResourceCollectionResponse) { + m := &EducationSubmissionResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSubmissionResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSubmissionResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSubmissionResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSubmissionResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSubmissionResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSubmissionResourceable, len(val)) + for i, v := range val { + res[i] = v.(EducationSubmissionResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSubmissionResourceCollectionResponse) GetValue()([]EducationSubmissionResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSubmissionResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSubmissionResourceCollectionResponse) SetValue(value []EducationSubmissionResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_responseable.go new file mode 100644 index 000000000..4279390e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionResourceCollectionResponseable +type EducationSubmissionResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSubmissionResourceable) + SetValue(value []EducationSubmissionResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_resourceable.go b/src/internal/connector/graph/betasdk/models/education_submission_resourceable.go new file mode 100644 index 000000000..e8664a0ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_resourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionResourceable +type EducationSubmissionResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentResourceUrl()(*string) + GetResource()(EducationResourceable) + SetAssignmentResourceUrl(value *string)() + SetResource(value EducationResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_submission_status.go b/src/internal/connector/graph/betasdk/models/education_submission_status.go new file mode 100644 index 000000000..d7cfd5a1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submission_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSubmissionStatus int + +const ( + WORKING_EDUCATIONSUBMISSIONSTATUS EducationSubmissionStatus = iota + SUBMITTED_EDUCATIONSUBMISSIONSTATUS + RELEASED_EDUCATIONSUBMISSIONSTATUS + RETURNED_EDUCATIONSUBMISSIONSTATUS + UNKNOWNFUTUREVALUE_EDUCATIONSUBMISSIONSTATUS + REASSIGNED_EDUCATIONSUBMISSIONSTATUS +) + +func (i EducationSubmissionStatus) String() string { + return []string{"working", "submitted", "released", "returned", "unknownFutureValue", "reassigned"}[i] +} +func ParseEducationSubmissionStatus(v string) (interface{}, error) { + result := WORKING_EDUCATIONSUBMISSIONSTATUS + switch v { + case "working": + result = WORKING_EDUCATIONSUBMISSIONSTATUS + case "submitted": + result = SUBMITTED_EDUCATIONSUBMISSIONSTATUS + case "released": + result = RELEASED_EDUCATIONSUBMISSIONSTATUS + case "returned": + result = RETURNED_EDUCATIONSUBMISSIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONSUBMISSIONSTATUS + case "reassigned": + result = REASSIGNED_EDUCATIONSUBMISSIONSTATUS + default: + return 0, errors.New("Unknown EducationSubmissionStatus value: " + v) + } + return &result, nil +} +func SerializeEducationSubmissionStatus(values []EducationSubmissionStatus) []string { + 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/education_submissionable.go b/src/internal/connector/graph/betasdk/models/education_submissionable.go new file mode 100644 index 000000000..4e76e15a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_submissionable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSubmissionable +type EducationSubmissionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOutcomes()([]EducationOutcomeable) + GetReassignedBy()(IdentitySetable) + GetReassignedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecipient()(EducationSubmissionRecipientable) + GetResources()([]EducationSubmissionResourceable) + GetResourcesFolderUrl()(*string) + GetReturnedBy()(IdentitySetable) + GetReturnedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*EducationSubmissionStatus) + GetSubmittedBy()(IdentitySetable) + GetSubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubmittedResources()([]EducationSubmissionResourceable) + GetUnsubmittedBy()(IdentitySetable) + GetUnsubmittedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWebUrl()(*string) + SetOutcomes(value []EducationOutcomeable)() + SetReassignedBy(value IdentitySetable)() + SetReassignedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecipient(value EducationSubmissionRecipientable)() + SetResources(value []EducationSubmissionResourceable)() + SetResourcesFolderUrl(value *string)() + SetReturnedBy(value IdentitySetable)() + SetReturnedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *EducationSubmissionStatus)() + SetSubmittedBy(value IdentitySetable)() + SetSubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubmittedResources(value []EducationSubmissionResourceable)() + SetUnsubmittedBy(value IdentitySetable)() + SetUnsubmittedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settings.go b/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settings.go new file mode 100644 index 000000000..2a4c3240b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settings.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationConnectionSettings +type EducationSynchronizationConnectionSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Client ID used to connect to the provider. + clientId *string + // Client secret to authenticate the connection to the provider. + clientSecret *string + // The OdataType property + odataType *string +} +// NewEducationSynchronizationConnectionSettings instantiates a new educationSynchronizationConnectionSettings and sets the default values. +func NewEducationSynchronizationConnectionSettings()(*EducationSynchronizationConnectionSettings) { + m := &EducationSynchronizationConnectionSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSynchronizationConnectionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationConnectionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationSynchronizationOAuth1ConnectionSettings": + return NewEducationSynchronizationOAuth1ConnectionSettings(), nil + case "#microsoft.graph.educationSynchronizationOAuth2ClientCredentialsConnectionSettings": + return NewEducationSynchronizationOAuth2ClientCredentialsConnectionSettings(), nil + } + } + } + } + return NewEducationSynchronizationConnectionSettings(), 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 *EducationSynchronizationConnectionSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClientId gets the clientId property value. Client ID used to connect to the provider. +func (m *EducationSynchronizationConnectionSettings) GetClientId()(*string) { + return m.clientId +} +// GetClientSecret gets the clientSecret property value. Client secret to authenticate the connection to the provider. +func (m *EducationSynchronizationConnectionSettings) GetClientSecret()(*string) { + return m.clientSecret +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationConnectionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["clientSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationConnectionSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationSynchronizationConnectionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("clientSecret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationSynchronizationConnectionSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClientId sets the clientId property value. Client ID used to connect to the provider. +func (m *EducationSynchronizationConnectionSettings) SetClientId(value *string)() { + m.clientId = value +} +// SetClientSecret sets the clientSecret property value. Client secret to authenticate the connection to the provider. +func (m *EducationSynchronizationConnectionSettings) SetClientSecret(value *string)() { + m.clientSecret = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationConnectionSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settingsable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settingsable.go new file mode 100644 index 000000000..eab009bf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_connection_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationConnectionSettingsable +type EducationSynchronizationConnectionSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetClientSecret()(*string) + GetOdataType()(*string) + SetClientId(value *string)() + SetClientSecret(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customization.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customization.go new file mode 100644 index 000000000..89a01849d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customization.go @@ -0,0 +1,180 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomization +type EducationSynchronizationCustomization 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 whether the display name of the resource can be overwritten by the sync. + allowDisplayNameUpdate *bool + // Indicates whether synchronization of the parent entity is deferred to a later date. + isSyncDeferred *bool + // The OdataType property + odataType *string + // The collection of property names to sync. If set to null, all properties will be synchronized. Does not apply to Student Enrollments or Teacher Rosters + optionalPropertiesToSync []string + // The date that the synchronization should start. This value should be set to a future date. If set to null, the resource will be synchronized when the profile setup completes. Only applies to Student Enrollments + synchronizationStartDate *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewEducationSynchronizationCustomization instantiates a new educationSynchronizationCustomization and sets the default values. +func NewEducationSynchronizationCustomization()(*EducationSynchronizationCustomization) { + m := &EducationSynchronizationCustomization{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSynchronizationCustomizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationCustomizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationCustomization(), 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 *EducationSynchronizationCustomization) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowDisplayNameUpdate gets the allowDisplayNameUpdate property value. Indicates whether the display name of the resource can be overwritten by the sync. +func (m *EducationSynchronizationCustomization) GetAllowDisplayNameUpdate()(*bool) { + return m.allowDisplayNameUpdate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationCustomization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowDisplayNameUpdate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowDisplayNameUpdate(val) + } + return nil + } + res["isSyncDeferred"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSyncDeferred(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["optionalPropertiesToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOptionalPropertiesToSync(res) + } + return nil + } + res["synchronizationStartDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSynchronizationStartDate(val) + } + return nil + } + return res +} +// GetIsSyncDeferred gets the isSyncDeferred property value. Indicates whether synchronization of the parent entity is deferred to a later date. +func (m *EducationSynchronizationCustomization) GetIsSyncDeferred()(*bool) { + return m.isSyncDeferred +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationCustomization) GetOdataType()(*string) { + return m.odataType +} +// GetOptionalPropertiesToSync gets the optionalPropertiesToSync property value. The collection of property names to sync. If set to null, all properties will be synchronized. Does not apply to Student Enrollments or Teacher Rosters +func (m *EducationSynchronizationCustomization) GetOptionalPropertiesToSync()([]string) { + return m.optionalPropertiesToSync +} +// GetSynchronizationStartDate gets the synchronizationStartDate property value. The date that the synchronization should start. This value should be set to a future date. If set to null, the resource will be synchronized when the profile setup completes. Only applies to Student Enrollments +func (m *EducationSynchronizationCustomization) GetSynchronizationStartDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.synchronizationStartDate +} +// Serialize serializes information the current object +func (m *EducationSynchronizationCustomization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowDisplayNameUpdate", m.GetAllowDisplayNameUpdate()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSyncDeferred", m.GetIsSyncDeferred()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOptionalPropertiesToSync() != nil { + err := writer.WriteCollectionOfStringValues("optionalPropertiesToSync", m.GetOptionalPropertiesToSync()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("synchronizationStartDate", m.GetSynchronizationStartDate()) + 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 *EducationSynchronizationCustomization) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowDisplayNameUpdate sets the allowDisplayNameUpdate property value. Indicates whether the display name of the resource can be overwritten by the sync. +func (m *EducationSynchronizationCustomization) SetAllowDisplayNameUpdate(value *bool)() { + m.allowDisplayNameUpdate = value +} +// SetIsSyncDeferred sets the isSyncDeferred property value. Indicates whether synchronization of the parent entity is deferred to a later date. +func (m *EducationSynchronizationCustomization) SetIsSyncDeferred(value *bool)() { + m.isSyncDeferred = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationCustomization) SetOdataType(value *string)() { + m.odataType = value +} +// SetOptionalPropertiesToSync sets the optionalPropertiesToSync property value. The collection of property names to sync. If set to null, all properties will be synchronized. Does not apply to Student Enrollments or Teacher Rosters +func (m *EducationSynchronizationCustomization) SetOptionalPropertiesToSync(value []string)() { + m.optionalPropertiesToSync = value +} +// SetSynchronizationStartDate sets the synchronizationStartDate property value. The date that the synchronization should start. This value should be set to a future date. If set to null, the resource will be synchronized when the profile setup completes. Only applies to Student Enrollments +func (m *EducationSynchronizationCustomization) SetSynchronizationStartDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.synchronizationStartDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customizationable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customizationable.go new file mode 100644 index 000000000..5cf04da23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customizationable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomizationable +type EducationSynchronizationCustomizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowDisplayNameUpdate()(*bool) + GetIsSyncDeferred()(*bool) + GetOdataType()(*string) + GetOptionalPropertiesToSync()([]string) + GetSynchronizationStartDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAllowDisplayNameUpdate(value *bool)() + SetIsSyncDeferred(value *bool)() + SetOdataType(value *string)() + SetOptionalPropertiesToSync(value []string)() + SetSynchronizationStartDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customizations.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations.go new file mode 100644 index 000000000..a634205a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomizations +type EducationSynchronizationCustomizations struct { + EducationSynchronizationCustomizationsBase + // Customizations for School entities. + school EducationSynchronizationCustomizationable + // Customizations for Section entities. + section EducationSynchronizationCustomizationable + // Customizations for Student entities. + student EducationSynchronizationCustomizationable + // Customizations for Student Enrollments. + studentEnrollment EducationSynchronizationCustomizationable + // Customizations for Teacher entities. + teacher EducationSynchronizationCustomizationable + // Customizations for Teacher Rosters. + teacherRoster EducationSynchronizationCustomizationable +} +// NewEducationSynchronizationCustomizations instantiates a new EducationSynchronizationCustomizations and sets the default values. +func NewEducationSynchronizationCustomizations()(*EducationSynchronizationCustomizations) { + m := &EducationSynchronizationCustomizations{ + EducationSynchronizationCustomizationsBase: *NewEducationSynchronizationCustomizationsBase(), + } + odataTypeValue := "#microsoft.graph.educationSynchronizationCustomizations"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationSynchronizationCustomizationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationCustomizationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationCustomizations(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationCustomizations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationCustomizationsBase.GetFieldDeserializers() + res["school"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchool(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + res["section"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSection(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + res["student"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStudent(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + res["studentEnrollment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStudentEnrollment(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + res["teacher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeacher(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + res["teacherRoster"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationCustomizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeacherRoster(val.(EducationSynchronizationCustomizationable)) + } + return nil + } + return res +} +// GetSchool gets the school property value. Customizations for School entities. +func (m *EducationSynchronizationCustomizations) GetSchool()(EducationSynchronizationCustomizationable) { + return m.school +} +// GetSection gets the section property value. Customizations for Section entities. +func (m *EducationSynchronizationCustomizations) GetSection()(EducationSynchronizationCustomizationable) { + return m.section +} +// GetStudent gets the student property value. Customizations for Student entities. +func (m *EducationSynchronizationCustomizations) GetStudent()(EducationSynchronizationCustomizationable) { + return m.student +} +// GetStudentEnrollment gets the studentEnrollment property value. Customizations for Student Enrollments. +func (m *EducationSynchronizationCustomizations) GetStudentEnrollment()(EducationSynchronizationCustomizationable) { + return m.studentEnrollment +} +// GetTeacher gets the teacher property value. Customizations for Teacher entities. +func (m *EducationSynchronizationCustomizations) GetTeacher()(EducationSynchronizationCustomizationable) { + return m.teacher +} +// GetTeacherRoster gets the teacherRoster property value. Customizations for Teacher Rosters. +func (m *EducationSynchronizationCustomizations) GetTeacherRoster()(EducationSynchronizationCustomizationable) { + return m.teacherRoster +} +// Serialize serializes information the current object +func (m *EducationSynchronizationCustomizations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationCustomizationsBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("school", m.GetSchool()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("section", m.GetSection()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("student", m.GetStudent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("studentEnrollment", m.GetStudentEnrollment()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("teacher", m.GetTeacher()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("teacherRoster", m.GetTeacherRoster()) + if err != nil { + return err + } + } + return nil +} +// SetSchool sets the school property value. Customizations for School entities. +func (m *EducationSynchronizationCustomizations) SetSchool(value EducationSynchronizationCustomizationable)() { + m.school = value +} +// SetSection sets the section property value. Customizations for Section entities. +func (m *EducationSynchronizationCustomizations) SetSection(value EducationSynchronizationCustomizationable)() { + m.section = value +} +// SetStudent sets the student property value. Customizations for Student entities. +func (m *EducationSynchronizationCustomizations) SetStudent(value EducationSynchronizationCustomizationable)() { + m.student = value +} +// SetStudentEnrollment sets the studentEnrollment property value. Customizations for Student Enrollments. +func (m *EducationSynchronizationCustomizations) SetStudentEnrollment(value EducationSynchronizationCustomizationable)() { + m.studentEnrollment = value +} +// SetTeacher sets the teacher property value. Customizations for Teacher entities. +func (m *EducationSynchronizationCustomizations) SetTeacher(value EducationSynchronizationCustomizationable)() { + m.teacher = value +} +// SetTeacherRoster sets the teacherRoster property value. Customizations for Teacher Rosters. +func (m *EducationSynchronizationCustomizations) SetTeacherRoster(value EducationSynchronizationCustomizationable)() { + m.teacherRoster = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_base.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_base.go new file mode 100644 index 000000000..021c70fcc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_base.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomizationsBase +type EducationSynchronizationCustomizationsBase 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 OdataType property + odataType *string +} +// NewEducationSynchronizationCustomizationsBase instantiates a new educationSynchronizationCustomizationsBase and sets the default values. +func NewEducationSynchronizationCustomizationsBase()(*EducationSynchronizationCustomizationsBase) { + m := &EducationSynchronizationCustomizationsBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSynchronizationCustomizationsBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationCustomizationsBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationSynchronizationCustomizations": + return NewEducationSynchronizationCustomizations(), nil + } + } + } + } + return NewEducationSynchronizationCustomizationsBase(), 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 *EducationSynchronizationCustomizationsBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationCustomizationsBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationCustomizationsBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationSynchronizationCustomizationsBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationSynchronizationCustomizationsBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationCustomizationsBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_baseable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_baseable.go new file mode 100644 index 000000000..bcb8e0799 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customizations_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomizationsBaseable +type EducationSynchronizationCustomizationsBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_customizationsable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_customizationsable.go new file mode 100644 index 000000000..3aa2620ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_customizationsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationCustomizationsable +type EducationSynchronizationCustomizationsable interface { + EducationSynchronizationCustomizationsBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSchool()(EducationSynchronizationCustomizationable) + GetSection()(EducationSynchronizationCustomizationable) + GetStudent()(EducationSynchronizationCustomizationable) + GetStudentEnrollment()(EducationSynchronizationCustomizationable) + GetTeacher()(EducationSynchronizationCustomizationable) + GetTeacherRoster()(EducationSynchronizationCustomizationable) + SetSchool(value EducationSynchronizationCustomizationable)() + SetSection(value EducationSynchronizationCustomizationable)() + SetStudent(value EducationSynchronizationCustomizationable)() + SetStudentEnrollment(value EducationSynchronizationCustomizationable)() + SetTeacher(value EducationSynchronizationCustomizationable)() + SetTeacherRoster(value EducationSynchronizationCustomizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_data_provider.go b/src/internal/connector/graph/betasdk/models/education_synchronization_data_provider.go new file mode 100644 index 000000000..8b5c705cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_data_provider.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationDataProvider +type EducationSynchronizationDataProvider 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 OdataType property + odataType *string +} +// NewEducationSynchronizationDataProvider instantiates a new educationSynchronizationDataProvider and sets the default values. +func NewEducationSynchronizationDataProvider()(*EducationSynchronizationDataProvider) { + m := &EducationSynchronizationDataProvider{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSynchronizationDataProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationDataProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationCsvDataProvider": + return NewEducationCsvDataProvider(), nil + case "#microsoft.graph.educationOneRosterApiDataProvider": + return NewEducationOneRosterApiDataProvider(), nil + case "#microsoft.graph.educationPowerSchoolDataProvider": + return NewEducationPowerSchoolDataProvider(), nil + } + } + } + } + return NewEducationSynchronizationDataProvider(), 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 *EducationSynchronizationDataProvider) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationDataProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationDataProvider) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EducationSynchronizationDataProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EducationSynchronizationDataProvider) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationDataProvider) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_data_providerable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_data_providerable.go new file mode 100644 index 000000000..0493ac7e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_data_providerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationDataProviderable +type EducationSynchronizationDataProviderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_error.go b/src/internal/connector/graph/betasdk/models/education_synchronization_error.go new file mode 100644 index 000000000..31075cde1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_error.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationError provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSynchronizationError struct { + Entity + // Represents the sync entity (school, section, student, teacher). + entryType *string + // Represents the error code for this error. + errorCode *string + // Contains a description of the error. + errorMessage *string + // The unique identifier for the entry. + joiningValue *string + // The time of occurrence of this error. + recordedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The identifier of this error entry. + reportableIdentifier *string +} +// NewEducationSynchronizationError instantiates a new educationSynchronizationError and sets the default values. +func NewEducationSynchronizationError()(*EducationSynchronizationError) { + m := &EducationSynchronizationError{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationSynchronizationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationError(), nil +} +// GetEntryType gets the entryType property value. Represents the sync entity (school, section, student, teacher). +func (m *EducationSynchronizationError) GetEntryType()(*string) { + return m.entryType +} +// GetErrorCode gets the errorCode property value. Represents the error code for this error. +func (m *EducationSynchronizationError) GetErrorCode()(*string) { + return m.errorCode +} +// GetErrorMessage gets the errorMessage property value. Contains a description of the error. +func (m *EducationSynchronizationError) GetErrorMessage()(*string) { + return m.errorMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["entryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEntryType(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["joiningValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoiningValue(val) + } + return nil + } + res["recordedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordedDateTime(val) + } + return nil + } + res["reportableIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportableIdentifier(val) + } + return nil + } + return res +} +// GetJoiningValue gets the joiningValue property value. The unique identifier for the entry. +func (m *EducationSynchronizationError) GetJoiningValue()(*string) { + return m.joiningValue +} +// GetRecordedDateTime gets the recordedDateTime property value. The time of occurrence of this error. +func (m *EducationSynchronizationError) GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.recordedDateTime +} +// GetReportableIdentifier gets the reportableIdentifier property value. The identifier of this error entry. +func (m *EducationSynchronizationError) GetReportableIdentifier()(*string) { + return m.reportableIdentifier +} +// Serialize serializes information the current object +func (m *EducationSynchronizationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("entryType", m.GetEntryType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorMessage", m.GetErrorMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("joiningValue", m.GetJoiningValue()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("recordedDateTime", m.GetRecordedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportableIdentifier", m.GetReportableIdentifier()) + if err != nil { + return err + } + } + return nil +} +// SetEntryType sets the entryType property value. Represents the sync entity (school, section, student, teacher). +func (m *EducationSynchronizationError) SetEntryType(value *string)() { + m.entryType = value +} +// SetErrorCode sets the errorCode property value. Represents the error code for this error. +func (m *EducationSynchronizationError) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetErrorMessage sets the errorMessage property value. Contains a description of the error. +func (m *EducationSynchronizationError) SetErrorMessage(value *string)() { + m.errorMessage = value +} +// SetJoiningValue sets the joiningValue property value. The unique identifier for the entry. +func (m *EducationSynchronizationError) SetJoiningValue(value *string)() { + m.joiningValue = value +} +// SetRecordedDateTime sets the recordedDateTime property value. The time of occurrence of this error. +func (m *EducationSynchronizationError) SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.recordedDateTime = value +} +// SetReportableIdentifier sets the reportableIdentifier property value. The identifier of this error entry. +func (m *EducationSynchronizationError) SetReportableIdentifier(value *string)() { + m.reportableIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_response.go b/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_response.go new file mode 100644 index 000000000..578f141b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationErrorCollectionResponse +type EducationSynchronizationErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSynchronizationErrorable +} +// NewEducationSynchronizationErrorCollectionResponse instantiates a new EducationSynchronizationErrorCollectionResponse and sets the default values. +func NewEducationSynchronizationErrorCollectionResponse()(*EducationSynchronizationErrorCollectionResponse) { + m := &EducationSynchronizationErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSynchronizationErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSynchronizationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSynchronizationErrorable, len(val)) + for i, v := range val { + res[i] = v.(EducationSynchronizationErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSynchronizationErrorCollectionResponse) GetValue()([]EducationSynchronizationErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSynchronizationErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSynchronizationErrorCollectionResponse) SetValue(value []EducationSynchronizationErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_responseable.go new file mode 100644 index 000000000..ae41f87a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationErrorCollectionResponseable +type EducationSynchronizationErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSynchronizationErrorable) + SetValue(value []EducationSynchronizationErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_errorable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_errorable.go new file mode 100644 index 000000000..5f1e7b465 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_errorable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationErrorable +type EducationSynchronizationErrorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntryType()(*string) + GetErrorCode()(*string) + GetErrorMessage()(*string) + GetJoiningValue()(*string) + GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReportableIdentifier()(*string) + SetEntryType(value *string)() + SetErrorCode(value *string)() + SetErrorMessage(value *string)() + SetJoiningValue(value *string)() + SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReportableIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment.go b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment.go new file mode 100644 index 000000000..502580768 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationLicenseAssignment +type EducationSynchronizationLicenseAssignment 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 user role type to assign to license. Possible values are: student, teacher, faculty. + appliesTo *EducationUserRole + // The OdataType property + odataType *string + // Represents the SKU identifiers of the licenses to assign. + skuIds []string +} +// NewEducationSynchronizationLicenseAssignment instantiates a new educationSynchronizationLicenseAssignment and sets the default values. +func NewEducationSynchronizationLicenseAssignment()(*EducationSynchronizationLicenseAssignment) { + m := &EducationSynchronizationLicenseAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationSynchronizationLicenseAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationLicenseAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationLicenseAssignment(), 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 *EducationSynchronizationLicenseAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppliesTo gets the appliesTo property value. The user role type to assign to license. Possible values are: student, teacher, faculty. +func (m *EducationSynchronizationLicenseAssignment) GetAppliesTo()(*EducationUserRole) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationLicenseAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationUserRole) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*EducationUserRole)) + } + 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["skuIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSkuIds(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationLicenseAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetSkuIds gets the skuIds property value. Represents the SKU identifiers of the licenses to assign. +func (m *EducationSynchronizationLicenseAssignment) GetSkuIds()([]string) { + return m.skuIds +} +// Serialize serializes information the current object +func (m *EducationSynchronizationLicenseAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err := writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSkuIds() != nil { + err := writer.WriteCollectionOfStringValues("skuIds", m.GetSkuIds()) + 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 *EducationSynchronizationLicenseAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppliesTo sets the appliesTo property value. The user role type to assign to license. Possible values are: student, teacher, faculty. +func (m *EducationSynchronizationLicenseAssignment) SetAppliesTo(value *EducationUserRole)() { + m.appliesTo = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationSynchronizationLicenseAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetSkuIds sets the skuIds property value. Represents the SKU identifiers of the licenses to assign. +func (m *EducationSynchronizationLicenseAssignment) SetSkuIds(value []string)() { + m.skuIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_response.go new file mode 100644 index 000000000..7db329ef8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationLicenseAssignmentCollectionResponse +type EducationSynchronizationLicenseAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSynchronizationLicenseAssignmentable +} +// NewEducationSynchronizationLicenseAssignmentCollectionResponse instantiates a new EducationSynchronizationLicenseAssignmentCollectionResponse and sets the default values. +func NewEducationSynchronizationLicenseAssignmentCollectionResponse()(*EducationSynchronizationLicenseAssignmentCollectionResponse) { + m := &EducationSynchronizationLicenseAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSynchronizationLicenseAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationLicenseAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationLicenseAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationLicenseAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSynchronizationLicenseAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSynchronizationLicenseAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EducationSynchronizationLicenseAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSynchronizationLicenseAssignmentCollectionResponse) GetValue()([]EducationSynchronizationLicenseAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSynchronizationLicenseAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSynchronizationLicenseAssignmentCollectionResponse) SetValue(value []EducationSynchronizationLicenseAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_responseable.go new file mode 100644 index 000000000..07a6b7e29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationLicenseAssignmentCollectionResponseable +type EducationSynchronizationLicenseAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSynchronizationLicenseAssignmentable) + SetValue(value []EducationSynchronizationLicenseAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignmentable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignmentable.go new file mode 100644 index 000000000..3e66cb9f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_license_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationLicenseAssignmentable +type EducationSynchronizationLicenseAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()(*EducationUserRole) + GetOdataType()(*string) + GetSkuIds()([]string) + SetAppliesTo(value *EducationUserRole)() + SetOdataType(value *string)() + SetSkuIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settings.go b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settings.go new file mode 100644 index 000000000..6ea6f1659 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settings.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationOAuth1ConnectionSettings +type EducationSynchronizationOAuth1ConnectionSettings struct { + EducationSynchronizationConnectionSettings +} +// NewEducationSynchronizationOAuth1ConnectionSettings instantiates a new EducationSynchronizationOAuth1ConnectionSettings and sets the default values. +func NewEducationSynchronizationOAuth1ConnectionSettings()(*EducationSynchronizationOAuth1ConnectionSettings) { + m := &EducationSynchronizationOAuth1ConnectionSettings{ + EducationSynchronizationConnectionSettings: *NewEducationSynchronizationConnectionSettings(), + } + odataTypeValue := "#microsoft.graph.educationSynchronizationOAuth1ConnectionSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationSynchronizationOAuth1ConnectionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationOAuth1ConnectionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationOAuth1ConnectionSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationOAuth1ConnectionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationConnectionSettings.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EducationSynchronizationOAuth1ConnectionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationConnectionSettings.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settingsable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settingsable.go new file mode 100644 index 000000000..28f76c8a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth1_connection_settingsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationOAuth1ConnectionSettingsable +type EducationSynchronizationOAuth1ConnectionSettingsable interface { + EducationSynchronizationConnectionSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settings.go b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settings.go new file mode 100644 index 000000000..e892c5d8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settings.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationOAuth2ClientCredentialsConnectionSettings +type EducationSynchronizationOAuth2ClientCredentialsConnectionSettings struct { + EducationSynchronizationConnectionSettings + // The scope of the access request (see RFC6749). + scope *string + // The URL to get access tokens for the data provider. + tokenUrl *string +} +// NewEducationSynchronizationOAuth2ClientCredentialsConnectionSettings instantiates a new EducationSynchronizationOAuth2ClientCredentialsConnectionSettings and sets the default values. +func NewEducationSynchronizationOAuth2ClientCredentialsConnectionSettings()(*EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) { + m := &EducationSynchronizationOAuth2ClientCredentialsConnectionSettings{ + EducationSynchronizationConnectionSettings: *NewEducationSynchronizationConnectionSettings(), + } + odataTypeValue := "#microsoft.graph.educationSynchronizationOAuth2ClientCredentialsConnectionSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationSynchronizationOAuth2ClientCredentialsConnectionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationOAuth2ClientCredentialsConnectionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationOAuth2ClientCredentialsConnectionSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationSynchronizationConnectionSettings.GetFieldDeserializers() + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScope(val) + } + return nil + } + res["tokenUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenUrl(val) + } + return nil + } + return res +} +// GetScope gets the scope property value. The scope of the access request (see RFC6749). +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) GetScope()(*string) { + return m.scope +} +// GetTokenUrl gets the tokenUrl property value. The URL to get access tokens for the data provider. +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) GetTokenUrl()(*string) { + return m.tokenUrl +} +// Serialize serializes information the current object +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationSynchronizationConnectionSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tokenUrl", m.GetTokenUrl()) + if err != nil { + return err + } + } + return nil +} +// SetScope sets the scope property value. The scope of the access request (see RFC6749). +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) SetScope(value *string)() { + m.scope = value +} +// SetTokenUrl sets the tokenUrl property value. The URL to get access tokens for the data provider. +func (m *EducationSynchronizationOAuth2ClientCredentialsConnectionSettings) SetTokenUrl(value *string)() { + m.tokenUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settingsable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settingsable.go new file mode 100644 index 000000000..50ca1d262 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_o_auth2_client_credentials_connection_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationOAuth2ClientCredentialsConnectionSettingsable +type EducationSynchronizationOAuth2ClientCredentialsConnectionSettingsable interface { + EducationSynchronizationConnectionSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetScope()(*string) + GetTokenUrl()(*string) + SetScope(value *string)() + SetTokenUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profile.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile.go new file mode 100644 index 000000000..7a8a3ea2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile.go @@ -0,0 +1,285 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfile +type EducationSynchronizationProfile struct { + Entity + // The dataProvider property + dataProvider EducationSynchronizationDataProviderable + // Name of the configuration profile for syncing identities. + displayName *string + // All errors associated with this synchronization profile. + errors []EducationSynchronizationErrorable + // The date the profile should be considered expired and cease syncing. Provide the date in YYYY-MM-DD format, following ISO 8601. Maximum value is 18 months from profile creation. (optional) + expirationDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Determines if School Data Sync should automatically replace unsupported special characters while syncing from source. + handleSpecialCharacterConstraint *bool + // The identitySynchronizationConfiguration property + identitySynchronizationConfiguration EducationIdentitySynchronizationConfigurationable + // License setup configuration. + licensesToAssign []EducationSynchronizationLicenseAssignmentable + // The synchronization status. + profileStatus EducationSynchronizationProfileStatusable + // The state of the profile. Possible values are: provisioning, provisioned, provisioningFailed, deleting, deletionFailed. + state *EducationSynchronizationProfileState +} +// NewEducationSynchronizationProfile instantiates a new EducationSynchronizationProfile and sets the default values. +func NewEducationSynchronizationProfile()(*EducationSynchronizationProfile) { + m := &EducationSynchronizationProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationSynchronizationProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationProfile(), nil +} +// GetDataProvider gets the dataProvider property value. The dataProvider property +func (m *EducationSynchronizationProfile) GetDataProvider()(EducationSynchronizationDataProviderable) { + return m.dataProvider +} +// GetDisplayName gets the displayName property value. Name of the configuration profile for syncing identities. +func (m *EducationSynchronizationProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetErrors gets the errors property value. All errors associated with this synchronization profile. +func (m *EducationSynchronizationProfile) GetErrors()([]EducationSynchronizationErrorable) { + return m.errors +} +// GetExpirationDate gets the expirationDate property value. The date the profile should be considered expired and cease syncing. Provide the date in YYYY-MM-DD format, following ISO 8601. Maximum value is 18 months from profile creation. (optional) +func (m *EducationSynchronizationProfile) GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.expirationDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["dataProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationDataProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDataProvider(val.(EducationSynchronizationDataProviderable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSynchronizationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSynchronizationErrorable, len(val)) + for i, v := range val { + res[i] = v.(EducationSynchronizationErrorable) + } + m.SetErrors(res) + } + return nil + } + res["expirationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDate(val) + } + return nil + } + res["handleSpecialCharacterConstraint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHandleSpecialCharacterConstraint(val) + } + return nil + } + res["identitySynchronizationConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationIdentitySynchronizationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentitySynchronizationConfiguration(val.(EducationIdentitySynchronizationConfigurationable)) + } + return nil + } + res["licensesToAssign"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSynchronizationLicenseAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSynchronizationLicenseAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EducationSynchronizationLicenseAssignmentable) + } + m.SetLicensesToAssign(res) + } + return nil + } + res["profileStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationSynchronizationProfileStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProfileStatus(val.(EducationSynchronizationProfileStatusable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationSynchronizationProfileState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*EducationSynchronizationProfileState)) + } + return nil + } + return res +} +// GetHandleSpecialCharacterConstraint gets the handleSpecialCharacterConstraint property value. Determines if School Data Sync should automatically replace unsupported special characters while syncing from source. +func (m *EducationSynchronizationProfile) GetHandleSpecialCharacterConstraint()(*bool) { + return m.handleSpecialCharacterConstraint +} +// GetIdentitySynchronizationConfiguration gets the identitySynchronizationConfiguration property value. The identitySynchronizationConfiguration property +func (m *EducationSynchronizationProfile) GetIdentitySynchronizationConfiguration()(EducationIdentitySynchronizationConfigurationable) { + return m.identitySynchronizationConfiguration +} +// GetLicensesToAssign gets the licensesToAssign property value. License setup configuration. +func (m *EducationSynchronizationProfile) GetLicensesToAssign()([]EducationSynchronizationLicenseAssignmentable) { + return m.licensesToAssign +} +// GetProfileStatus gets the profileStatus property value. The synchronization status. +func (m *EducationSynchronizationProfile) GetProfileStatus()(EducationSynchronizationProfileStatusable) { + return m.profileStatus +} +// GetState gets the state property value. The state of the profile. Possible values are: provisioning, provisioned, provisioningFailed, deleting, deletionFailed. +func (m *EducationSynchronizationProfile) GetState()(*EducationSynchronizationProfileState) { + return m.state +} +// Serialize serializes information the current object +func (m *EducationSynchronizationProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("dataProvider", m.GetDataProvider()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetErrors())) + for i, v := range m.GetErrors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("errors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("expirationDate", m.GetExpirationDate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("handleSpecialCharacterConstraint", m.GetHandleSpecialCharacterConstraint()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identitySynchronizationConfiguration", m.GetIdentitySynchronizationConfiguration()) + if err != nil { + return err + } + } + if m.GetLicensesToAssign() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLicensesToAssign())) + for i, v := range m.GetLicensesToAssign() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("licensesToAssign", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("profileStatus", m.GetProfileStatus()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDataProvider sets the dataProvider property value. The dataProvider property +func (m *EducationSynchronizationProfile) SetDataProvider(value EducationSynchronizationDataProviderable)() { + m.dataProvider = value +} +// SetDisplayName sets the displayName property value. Name of the configuration profile for syncing identities. +func (m *EducationSynchronizationProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetErrors sets the errors property value. All errors associated with this synchronization profile. +func (m *EducationSynchronizationProfile) SetErrors(value []EducationSynchronizationErrorable)() { + m.errors = value +} +// SetExpirationDate sets the expirationDate property value. The date the profile should be considered expired and cease syncing. Provide the date in YYYY-MM-DD format, following ISO 8601. Maximum value is 18 months from profile creation. (optional) +func (m *EducationSynchronizationProfile) SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.expirationDate = value +} +// SetHandleSpecialCharacterConstraint sets the handleSpecialCharacterConstraint property value. Determines if School Data Sync should automatically replace unsupported special characters while syncing from source. +func (m *EducationSynchronizationProfile) SetHandleSpecialCharacterConstraint(value *bool)() { + m.handleSpecialCharacterConstraint = value +} +// SetIdentitySynchronizationConfiguration sets the identitySynchronizationConfiguration property value. The identitySynchronizationConfiguration property +func (m *EducationSynchronizationProfile) SetIdentitySynchronizationConfiguration(value EducationIdentitySynchronizationConfigurationable)() { + m.identitySynchronizationConfiguration = value +} +// SetLicensesToAssign sets the licensesToAssign property value. License setup configuration. +func (m *EducationSynchronizationProfile) SetLicensesToAssign(value []EducationSynchronizationLicenseAssignmentable)() { + m.licensesToAssign = value +} +// SetProfileStatus sets the profileStatus property value. The synchronization status. +func (m *EducationSynchronizationProfile) SetProfileStatus(value EducationSynchronizationProfileStatusable)() { + m.profileStatus = value +} +// SetState sets the state property value. The state of the profile. Possible values are: provisioning, provisioned, provisioningFailed, deleting, deletionFailed. +func (m *EducationSynchronizationProfile) SetState(value *EducationSynchronizationProfileState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_response.go new file mode 100644 index 000000000..2cd34bbca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfileCollectionResponse +type EducationSynchronizationProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationSynchronizationProfileable +} +// NewEducationSynchronizationProfileCollectionResponse instantiates a new EducationSynchronizationProfileCollectionResponse and sets the default values. +func NewEducationSynchronizationProfileCollectionResponse()(*EducationSynchronizationProfileCollectionResponse) { + m := &EducationSynchronizationProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationSynchronizationProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSynchronizationProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSynchronizationProfileable, len(val)) + for i, v := range val { + res[i] = v.(EducationSynchronizationProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationSynchronizationProfileCollectionResponse) GetValue()([]EducationSynchronizationProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationSynchronizationProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationSynchronizationProfileCollectionResponse) SetValue(value []EducationSynchronizationProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_responseable.go new file mode 100644 index 000000000..55a42c7a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfileCollectionResponseable +type EducationSynchronizationProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationSynchronizationProfileable) + SetValue(value []EducationSynchronizationProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profile_state.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_state.go new file mode 100644 index 000000000..1957106ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_state.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSynchronizationProfileState int + +const ( + DELETING_EDUCATIONSYNCHRONIZATIONPROFILESTATE EducationSynchronizationProfileState = iota + DELETIONFAILED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + PROVISIONINGFAILED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + PROVISIONED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + PROVISIONING_EDUCATIONSYNCHRONIZATIONPROFILESTATE + UNKNOWNFUTUREVALUE_EDUCATIONSYNCHRONIZATIONPROFILESTATE +) + +func (i EducationSynchronizationProfileState) String() string { + return []string{"deleting", "deletionFailed", "provisioningFailed", "provisioned", "provisioning", "unknownFutureValue"}[i] +} +func ParseEducationSynchronizationProfileState(v string) (interface{}, error) { + result := DELETING_EDUCATIONSYNCHRONIZATIONPROFILESTATE + switch v { + case "deleting": + result = DELETING_EDUCATIONSYNCHRONIZATIONPROFILESTATE + case "deletionFailed": + result = DELETIONFAILED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + case "provisioningFailed": + result = PROVISIONINGFAILED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + case "provisioned": + result = PROVISIONED_EDUCATIONSYNCHRONIZATIONPROFILESTATE + case "provisioning": + result = PROVISIONING_EDUCATIONSYNCHRONIZATIONPROFILESTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONSYNCHRONIZATIONPROFILESTATE + default: + return 0, errors.New("Unknown EducationSynchronizationProfileState value: " + v) + } + return &result, nil +} +func SerializeEducationSynchronizationProfileState(values []EducationSynchronizationProfileState) []string { + 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/education_synchronization_profile_status.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_status.go new file mode 100644 index 000000000..849a20399 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_status.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfileStatus +type EducationSynchronizationProfileStatus struct { + Entity + // Number of errors during synchronization. + errorCount *int64 + // Date and time when most recent changes were observed in the profile. + lastActivityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date and time of the most recent successful synchronization. + lastSynchronizationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status of a sync. The possible values are: paused, inProgress, success, error, validationError, quarantined, unknownFutureValue, extracting, validating. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: extracting, validating. + status *EducationSynchronizationStatus + // Status message for the synchronization stage of the current profile. + statusMessage *string +} +// NewEducationSynchronizationProfileStatus instantiates a new educationSynchronizationProfileStatus and sets the default values. +func NewEducationSynchronizationProfileStatus()(*EducationSynchronizationProfileStatus) { + m := &EducationSynchronizationProfileStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationSynchronizationProfileStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationSynchronizationProfileStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationSynchronizationProfileStatus(), nil +} +// GetErrorCount gets the errorCount property value. Number of errors during synchronization. +func (m *EducationSynchronizationProfileStatus) GetErrorCount()(*int64) { + return m.errorCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationSynchronizationProfileStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["lastActivityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActivityDateTime(val) + } + return nil + } + res["lastSynchronizationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSynchronizationDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationSynchronizationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*EducationSynchronizationStatus)) + } + return nil + } + res["statusMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusMessage(val) + } + return nil + } + return res +} +// GetLastActivityDateTime gets the lastActivityDateTime property value. Date and time when most recent changes were observed in the profile. +func (m *EducationSynchronizationProfileStatus) GetLastActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActivityDateTime +} +// GetLastSynchronizationDateTime gets the lastSynchronizationDateTime property value. Date and time of the most recent successful synchronization. +func (m *EducationSynchronizationProfileStatus) GetLastSynchronizationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSynchronizationDateTime +} +// GetStatus gets the status property value. The status of a sync. The possible values are: paused, inProgress, success, error, validationError, quarantined, unknownFutureValue, extracting, validating. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: extracting, validating. +func (m *EducationSynchronizationProfileStatus) GetStatus()(*EducationSynchronizationStatus) { + return m.status +} +// GetStatusMessage gets the statusMessage property value. Status message for the synchronization stage of the current profile. +func (m *EducationSynchronizationProfileStatus) GetStatusMessage()(*string) { + return m.statusMessage +} +// Serialize serializes information the current object +func (m *EducationSynchronizationProfileStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActivityDateTime", m.GetLastActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSynchronizationDateTime", m.GetLastSynchronizationDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("statusMessage", m.GetStatusMessage()) + if err != nil { + return err + } + } + return nil +} +// SetErrorCount sets the errorCount property value. Number of errors during synchronization. +func (m *EducationSynchronizationProfileStatus) SetErrorCount(value *int64)() { + m.errorCount = value +} +// SetLastActivityDateTime sets the lastActivityDateTime property value. Date and time when most recent changes were observed in the profile. +func (m *EducationSynchronizationProfileStatus) SetLastActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActivityDateTime = value +} +// SetLastSynchronizationDateTime sets the lastSynchronizationDateTime property value. Date and time of the most recent successful synchronization. +func (m *EducationSynchronizationProfileStatus) SetLastSynchronizationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSynchronizationDateTime = value +} +// SetStatus sets the status property value. The status of a sync. The possible values are: paused, inProgress, success, error, validationError, quarantined, unknownFutureValue, extracting, validating. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: extracting, validating. +func (m *EducationSynchronizationProfileStatus) SetStatus(value *EducationSynchronizationStatus)() { + m.status = value +} +// SetStatusMessage sets the statusMessage property value. Status message for the synchronization stage of the current profile. +func (m *EducationSynchronizationProfileStatus) SetStatusMessage(value *string)() { + m.statusMessage = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profile_statusable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_statusable.go new file mode 100644 index 000000000..d02a27eb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profile_statusable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfileStatusable +type EducationSynchronizationProfileStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCount()(*int64) + GetLastActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSynchronizationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*EducationSynchronizationStatus) + GetStatusMessage()(*string) + SetErrorCount(value *int64)() + SetLastActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSynchronizationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *EducationSynchronizationStatus)() + SetStatusMessage(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_profileable.go b/src/internal/connector/graph/betasdk/models/education_synchronization_profileable.go new file mode 100644 index 000000000..72f679b9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationSynchronizationProfileable +type EducationSynchronizationProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataProvider()(EducationSynchronizationDataProviderable) + GetDisplayName()(*string) + GetErrors()([]EducationSynchronizationErrorable) + GetExpirationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetHandleSpecialCharacterConstraint()(*bool) + GetIdentitySynchronizationConfiguration()(EducationIdentitySynchronizationConfigurationable) + GetLicensesToAssign()([]EducationSynchronizationLicenseAssignmentable) + GetProfileStatus()(EducationSynchronizationProfileStatusable) + GetState()(*EducationSynchronizationProfileState) + SetDataProvider(value EducationSynchronizationDataProviderable)() + SetDisplayName(value *string)() + SetErrors(value []EducationSynchronizationErrorable)() + SetExpirationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetHandleSpecialCharacterConstraint(value *bool)() + SetIdentitySynchronizationConfiguration(value EducationIdentitySynchronizationConfigurationable)() + SetLicensesToAssign(value []EducationSynchronizationLicenseAssignmentable)() + SetProfileStatus(value EducationSynchronizationProfileStatusable)() + SetState(value *EducationSynchronizationProfileState)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_synchronization_status.go b/src/internal/connector/graph/betasdk/models/education_synchronization_status.go new file mode 100644 index 000000000..10bc9c0c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_synchronization_status.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationSynchronizationStatus int + +const ( + PAUSED_EDUCATIONSYNCHRONIZATIONSTATUS EducationSynchronizationStatus = iota + INPROGRESS_EDUCATIONSYNCHRONIZATIONSTATUS + SUCCESS_EDUCATIONSYNCHRONIZATIONSTATUS + ERROR_EDUCATIONSYNCHRONIZATIONSTATUS + VALIDATIONERROR_EDUCATIONSYNCHRONIZATIONSTATUS + QUARANTINED_EDUCATIONSYNCHRONIZATIONSTATUS + UNKNOWNFUTUREVALUE_EDUCATIONSYNCHRONIZATIONSTATUS + EXTRACTING_EDUCATIONSYNCHRONIZATIONSTATUS + VALIDATING_EDUCATIONSYNCHRONIZATIONSTATUS +) + +func (i EducationSynchronizationStatus) String() string { + return []string{"paused", "inProgress", "success", "error", "validationError", "quarantined", "unknownFutureValue", "extracting", "validating"}[i] +} +func ParseEducationSynchronizationStatus(v string) (interface{}, error) { + result := PAUSED_EDUCATIONSYNCHRONIZATIONSTATUS + switch v { + case "paused": + result = PAUSED_EDUCATIONSYNCHRONIZATIONSTATUS + case "inProgress": + result = INPROGRESS_EDUCATIONSYNCHRONIZATIONSTATUS + case "success": + result = SUCCESS_EDUCATIONSYNCHRONIZATIONSTATUS + case "error": + result = ERROR_EDUCATIONSYNCHRONIZATIONSTATUS + case "validationError": + result = VALIDATIONERROR_EDUCATIONSYNCHRONIZATIONSTATUS + case "quarantined": + result = QUARANTINED_EDUCATIONSYNCHRONIZATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONSYNCHRONIZATIONSTATUS + case "extracting": + result = EXTRACTING_EDUCATIONSYNCHRONIZATIONSTATUS + case "validating": + result = VALIDATING_EDUCATIONSYNCHRONIZATIONSTATUS + default: + return 0, errors.New("Unknown EducationSynchronizationStatus value: " + v) + } + return &result, nil +} +func SerializeEducationSynchronizationStatus(values []EducationSynchronizationStatus) []string { + 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/education_teacher.go b/src/internal/connector/graph/betasdk/models/education_teacher.go new file mode 100644 index 000000000..2201b8c95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_teacher.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTeacher +type EducationTeacher struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Id of the Teacher in external source system. + externalId *string + // The OdataType property + odataType *string + // Teacher number. + teacherNumber *string +} +// NewEducationTeacher instantiates a new educationTeacher and sets the default values. +func NewEducationTeacher()(*EducationTeacher) { + m := &EducationTeacher{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationTeacherFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationTeacherFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationTeacher(), 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 *EducationTeacher) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalId gets the externalId property value. Id of the Teacher in external source system. +func (m *EducationTeacher) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationTeacher) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(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["teacherNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeacherNumber(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationTeacher) GetOdataType()(*string) { + return m.odataType +} +// GetTeacherNumber gets the teacherNumber property value. Teacher number. +func (m *EducationTeacher) GetTeacherNumber()(*string) { + return m.teacherNumber +} +// Serialize serializes information the current object +func (m *EducationTeacher) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teacherNumber", m.GetTeacherNumber()) + 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 *EducationTeacher) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalId sets the externalId property value. Id of the Teacher in external source system. +func (m *EducationTeacher) SetExternalId(value *string)() { + m.externalId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationTeacher) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeacherNumber sets the teacherNumber property value. Teacher number. +func (m *EducationTeacher) SetTeacherNumber(value *string)() { + m.teacherNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_teacherable.go b/src/internal/connector/graph/betasdk/models/education_teacherable.go new file mode 100644 index 000000000..ad0a1e86e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_teacherable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTeacherable +type EducationTeacherable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalId()(*string) + GetOdataType()(*string) + GetTeacherNumber()(*string) + SetExternalId(value *string)() + SetOdataType(value *string)() + SetTeacherNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_teams_app_resource.go b/src/internal/connector/graph/betasdk/models/education_teams_app_resource.go new file mode 100644 index 000000000..8fbaceeb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_teams_app_resource.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTeamsAppResource +type EducationTeamsAppResource struct { + EducationResource + // URL that points to the icon of the app. + appIconWebUrl *string + // Teams app ID of the application. + appId *string + // URL for the app resource that will be opened by Teams. + teamsEmbeddedContentUrl *string + // URL for the app resource that can be opened in the browser. + webUrl *string +} +// NewEducationTeamsAppResource instantiates a new EducationTeamsAppResource and sets the default values. +func NewEducationTeamsAppResource()(*EducationTeamsAppResource) { + m := &EducationTeamsAppResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationTeamsAppResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationTeamsAppResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationTeamsAppResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationTeamsAppResource(), nil +} +// GetAppIconWebUrl gets the appIconWebUrl property value. URL that points to the icon of the app. +func (m *EducationTeamsAppResource) GetAppIconWebUrl()(*string) { + return m.appIconWebUrl +} +// GetAppId gets the appId property value. Teams app ID of the application. +func (m *EducationTeamsAppResource) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationTeamsAppResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["appIconWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppIconWebUrl(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["teamsEmbeddedContentUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsEmbeddedContentUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetTeamsEmbeddedContentUrl gets the teamsEmbeddedContentUrl property value. URL for the app resource that will be opened by Teams. +func (m *EducationTeamsAppResource) GetTeamsEmbeddedContentUrl()(*string) { + return m.teamsEmbeddedContentUrl +} +// GetWebUrl gets the webUrl property value. URL for the app resource that can be opened in the browser. +func (m *EducationTeamsAppResource) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *EducationTeamsAppResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appIconWebUrl", m.GetAppIconWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamsEmbeddedContentUrl", m.GetTeamsEmbeddedContentUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAppIconWebUrl sets the appIconWebUrl property value. URL that points to the icon of the app. +func (m *EducationTeamsAppResource) SetAppIconWebUrl(value *string)() { + m.appIconWebUrl = value +} +// SetAppId sets the appId property value. Teams app ID of the application. +func (m *EducationTeamsAppResource) SetAppId(value *string)() { + m.appId = value +} +// SetTeamsEmbeddedContentUrl sets the teamsEmbeddedContentUrl property value. URL for the app resource that will be opened by Teams. +func (m *EducationTeamsAppResource) SetTeamsEmbeddedContentUrl(value *string)() { + m.teamsEmbeddedContentUrl = value +} +// SetWebUrl sets the webUrl property value. URL for the app resource that can be opened in the browser. +func (m *EducationTeamsAppResource) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_teams_app_resourceable.go b/src/internal/connector/graph/betasdk/models/education_teams_app_resourceable.go new file mode 100644 index 000000000..2d9880e6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_teams_app_resourceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTeamsAppResourceable +type EducationTeamsAppResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppIconWebUrl()(*string) + GetAppId()(*string) + GetTeamsEmbeddedContentUrl()(*string) + GetWebUrl()(*string) + SetAppIconWebUrl(value *string)() + SetAppId(value *string)() + SetTeamsEmbeddedContentUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_term.go b/src/internal/connector/graph/betasdk/models/education_term.go new file mode 100644 index 000000000..b6a860ca9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_term.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTerm +type EducationTerm struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Display name of the term. + displayName *string + // End of the term. + endDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // ID of term in the syncing system. + externalId *string + // The OdataType property + odataType *string + // Start of the term. + startDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewEducationTerm instantiates a new educationTerm and sets the default values. +func NewEducationTerm()(*EducationTerm) { + m := &EducationTerm{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationTermFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationTermFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationTerm(), 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 *EducationTerm) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Display name of the term. +func (m *EducationTerm) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDate gets the endDate property value. End of the term. +func (m *EducationTerm) GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endDate +} +// GetExternalId gets the externalId property value. ID of term in the syncing system. +func (m *EducationTerm) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationTerm) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDate(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(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["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationTerm) GetOdataType()(*string) { + return m.odataType +} +// GetStartDate gets the startDate property value. Start of the term. +func (m *EducationTerm) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startDate +} +// Serialize serializes information the current object +func (m *EducationTerm) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("endDate", m.GetEndDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + 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 *EducationTerm) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Display name of the term. +func (m *EducationTerm) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDate sets the endDate property value. End of the term. +func (m *EducationTerm) SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endDate = value +} +// SetExternalId sets the externalId property value. ID of term in the syncing system. +func (m *EducationTerm) SetExternalId(value *string)() { + m.externalId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationTerm) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDate sets the startDate property value. Start of the term. +func (m *EducationTerm) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_termable.go b/src/internal/connector/graph/betasdk/models/education_termable.go new file mode 100644 index 000000000..f77b4aca8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_termable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationTermable +type EducationTermable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetExternalId()(*string) + GetOdataType()(*string) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetDisplayName(value *string)() + SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetExternalId(value *string)() + SetOdataType(value *string)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_user.go b/src/internal/connector/graph/betasdk/models/education_user.go new file mode 100644 index 000000000..35b79526b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_user.go @@ -0,0 +1,1101 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationUser provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationUser struct { + Entity + // True if the account is enabled; otherwise, false. This property is required when a user is created. Supports /$filter. + accountEnabled *bool + // The licenses that are assigned to the user. Not nullable. + assignedLicenses []AssignedLicenseable + // The plans that are assigned to the user. Read-only. Not nullable. + assignedPlans []AssignedPlanable + // List of assignments for the user. Nullable. + assignments []EducationAssignmentable + // The telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property. + businessPhones []string + // Classes to which the user belongs. Nullable. + classes []EducationClassable + // Entity who created the user. + createdBy IdentitySetable + // The name for the department in which the user works. Supports /$filter. + department *string + // The name displayed in the address book for the user. Supports $filter and $orderby. + displayName *string + // The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. + externalSource *EducationExternalSource + // The name of the external source this resources was generated from. + externalSourceDetail *string + // The given name (first name) of the user. Supports /$filter. + givenName *string + // The SMTP address for the user; for example, 'jeff@contoso.onmicrosoft.com'. Read-Only. Supports /$filter. + mail *string + // Mail address of user. Note: type and postOfficeBox are not supported for educationUser resources. + mailingAddress PhysicalAddressable + // The mail alias for the user. This property must be specified when a user is created. Supports /$filter. + mailNickname *string + // The middle name of user. + middleName *string + // The primary cellular telephone number for the user. + mobilePhone *string + // The officeLocation property + officeLocation *string + // Additional information used to associate the AAD user with it's Active Directory counterpart. + onPremisesInfo EducationOnPremisesInfoable + // Specifies password policies for the user. See standard [user] resource for additional details. + passwordPolicies *string + // Specifies the password profile for the user. The profile contains the user's password. This property is required when a user is created. See standard [user] resource for additional details. + passwordProfile PasswordProfileable + // The preferred language for the user. Should follow ISO 639-1 Code; for example, 'en-US'. + preferredLanguage *string + // The primaryRole property + primaryRole *EducationUserRole + // The plans that are provisioned for the user. Read-only. Not nullable. + provisionedPlans []ProvisionedPlanable + // The refreshTokensValidFromDateTime property + refreshTokensValidFromDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Related records related to the user. Possible relationships are parent, relative, aide, doctor, guardian, child, other, unknownFutureValue + relatedContacts []RelatedContactable + // Address where user lives. Note: type and postOfficeBox are not supported for educationUser resources. + residenceAddress PhysicalAddressable + // When set, the grading rubric attached to the assignment. + rubrics []EducationRubricable + // Schools to which the user belongs. Nullable. + schools []EducationSchoolable + // The showInAddressList property + showInAddressList *bool + // If the primary role is student, this block will contain student specific data. + student EducationStudentable + // The user's surname (family name or last name). Supports /$filter. + surname *string + // Classes for which the user is a teacher. + taughtClasses []EducationClassable + // If the primary role is teacher, this block will contain teacher specific data. + teacher EducationTeacherable + // A two-letter country code ([ISO 3166 Alpha-2]). Required for users who will be assigned licenses. Not nullable. Supports /$filter. + usageLocation *string + // The user property + user Userable + // The user principal name (UPN) for the user. Supports $filter and $orderby. See standard [user] resource for additional details. + userPrincipalName *string + // A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'. Supports /$filter. + userType *string +} +// NewEducationUser instantiates a new educationUser and sets the default values. +func NewEducationUser()(*EducationUser) { + m := &EducationUser{ + Entity: *NewEntity(), + } + return m +} +// CreateEducationUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationUser(), nil +} +// GetAccountEnabled gets the accountEnabled property value. True if the account is enabled; otherwise, false. This property is required when a user is created. Supports /$filter. +func (m *EducationUser) GetAccountEnabled()(*bool) { + return m.accountEnabled +} +// GetAssignedLicenses gets the assignedLicenses property value. The licenses that are assigned to the user. Not nullable. +func (m *EducationUser) GetAssignedLicenses()([]AssignedLicenseable) { + return m.assignedLicenses +} +// GetAssignedPlans gets the assignedPlans property value. The plans that are assigned to the user. Read-only. Not nullable. +func (m *EducationUser) GetAssignedPlans()([]AssignedPlanable) { + return m.assignedPlans +} +// GetAssignments gets the assignments property value. List of assignments for the user. Nullable. +func (m *EducationUser) GetAssignments()([]EducationAssignmentable) { + return m.assignments +} +// GetBusinessPhones gets the businessPhones property value. The telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property. +func (m *EducationUser) GetBusinessPhones()([]string) { + return m.businessPhones +} +// GetClasses gets the classes property value. Classes to which the user belongs. Nullable. +func (m *EducationUser) GetClasses()([]EducationClassable) { + return m.classes +} +// GetCreatedBy gets the createdBy property value. Entity who created the user. +func (m *EducationUser) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetDepartment gets the department property value. The name for the department in which the user works. Supports /$filter. +func (m *EducationUser) GetDepartment()(*string) { + return m.department +} +// GetDisplayName gets the displayName property value. The name displayed in the address book for the user. Supports $filter and $orderby. +func (m *EducationUser) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalSource gets the externalSource property value. The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. +func (m *EducationUser) GetExternalSource()(*EducationExternalSource) { + return m.externalSource +} +// GetExternalSourceDetail gets the externalSourceDetail property value. The name of the external source this resources was generated from. +func (m *EducationUser) GetExternalSourceDetail()(*string) { + return m.externalSourceDetail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountEnabled(val) + } + return nil + } + res["assignedLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(AssignedLicenseable) + } + m.SetAssignedLicenses(res) + } + return nil + } + res["assignedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedPlanable, len(val)) + for i, v := range val { + res[i] = v.(AssignedPlanable) + } + m.SetAssignedPlans(res) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EducationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["businessPhones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBusinessPhones(res) + } + return nil + } + res["classes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationClassable, len(val)) + for i, v := range val { + res[i] = v.(EducationClassable) + } + m.SetClasses(res) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDepartment(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationExternalSource) + if err != nil { + return err + } + if val != nil { + m.SetExternalSource(val.(*EducationExternalSource)) + } + return nil + } + res["externalSourceDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalSourceDetail(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["mail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMail(val) + } + return nil + } + res["mailingAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMailingAddress(val.(PhysicalAddressable)) + } + return nil + } + res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNickname(val) + } + return nil + } + res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddleName(val) + } + return nil + } + res["mobilePhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMobilePhone(val) + } + return nil + } + res["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeLocation(val) + } + return nil + } + res["onPremisesInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationOnPremisesInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesInfo(val.(EducationOnPremisesInfoable)) + } + return nil + } + res["passwordPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPolicies(val) + } + return nil + } + res["passwordProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePasswordProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPasswordProfile(val.(PasswordProfileable)) + } + return nil + } + res["preferredLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredLanguage(val) + } + return nil + } + res["primaryRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEducationUserRole) + if err != nil { + return err + } + if val != nil { + m.SetPrimaryRole(val.(*EducationUserRole)) + } + return nil + } + res["provisionedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisionedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisionedPlanable, len(val)) + for i, v := range val { + res[i] = v.(ProvisionedPlanable) + } + m.SetProvisionedPlans(res) + } + return nil + } + res["refreshTokensValidFromDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRefreshTokensValidFromDateTime(val) + } + return nil + } + res["relatedContacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelatedContactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RelatedContactable, len(val)) + for i, v := range val { + res[i] = v.(RelatedContactable) + } + m.SetRelatedContacts(res) + } + return nil + } + res["residenceAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResidenceAddress(val.(PhysicalAddressable)) + } + return nil + } + res["rubrics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationRubricFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationRubricable, len(val)) + for i, v := range val { + res[i] = v.(EducationRubricable) + } + m.SetRubrics(res) + } + return nil + } + res["schools"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationSchoolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationSchoolable, len(val)) + for i, v := range val { + res[i] = v.(EducationSchoolable) + } + m.SetSchools(res) + } + return nil + } + res["showInAddressList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowInAddressList(val) + } + return nil + } + res["student"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationStudentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStudent(val.(EducationStudentable)) + } + return nil + } + res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["taughtClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationClassFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationClassable, len(val)) + for i, v := range val { + res[i] = v.(EducationClassable) + } + m.SetTaughtClasses(res) + } + return nil + } + res["teacher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationTeacherFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeacher(val.(EducationTeacherable)) + } + return nil + } + res["usageLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsageLocation(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(Userable)) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["userType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserType(val) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. The given name (first name) of the user. Supports /$filter. +func (m *EducationUser) GetGivenName()(*string) { + return m.givenName +} +// GetMail gets the mail property value. The SMTP address for the user; for example, 'jeff@contoso.onmicrosoft.com'. Read-Only. Supports /$filter. +func (m *EducationUser) GetMail()(*string) { + return m.mail +} +// GetMailingAddress gets the mailingAddress property value. Mail address of user. Note: type and postOfficeBox are not supported for educationUser resources. +func (m *EducationUser) GetMailingAddress()(PhysicalAddressable) { + return m.mailingAddress +} +// GetMailNickname gets the mailNickname property value. The mail alias for the user. This property must be specified when a user is created. Supports /$filter. +func (m *EducationUser) GetMailNickname()(*string) { + return m.mailNickname +} +// GetMiddleName gets the middleName property value. The middle name of user. +func (m *EducationUser) GetMiddleName()(*string) { + return m.middleName +} +// GetMobilePhone gets the mobilePhone property value. The primary cellular telephone number for the user. +func (m *EducationUser) GetMobilePhone()(*string) { + return m.mobilePhone +} +// GetOfficeLocation gets the officeLocation property value. The officeLocation property +func (m *EducationUser) GetOfficeLocation()(*string) { + return m.officeLocation +} +// GetOnPremisesInfo gets the onPremisesInfo property value. Additional information used to associate the AAD user with it's Active Directory counterpart. +func (m *EducationUser) GetOnPremisesInfo()(EducationOnPremisesInfoable) { + return m.onPremisesInfo +} +// GetPasswordPolicies gets the passwordPolicies property value. Specifies password policies for the user. See standard [user] resource for additional details. +func (m *EducationUser) GetPasswordPolicies()(*string) { + return m.passwordPolicies +} +// GetPasswordProfile gets the passwordProfile property value. Specifies the password profile for the user. The profile contains the user's password. This property is required when a user is created. See standard [user] resource for additional details. +func (m *EducationUser) GetPasswordProfile()(PasswordProfileable) { + return m.passwordProfile +} +// GetPreferredLanguage gets the preferredLanguage property value. The preferred language for the user. Should follow ISO 639-1 Code; for example, 'en-US'. +func (m *EducationUser) GetPreferredLanguage()(*string) { + return m.preferredLanguage +} +// GetPrimaryRole gets the primaryRole property value. The primaryRole property +func (m *EducationUser) GetPrimaryRole()(*EducationUserRole) { + return m.primaryRole +} +// GetProvisionedPlans gets the provisionedPlans property value. The plans that are provisioned for the user. Read-only. Not nullable. +func (m *EducationUser) GetProvisionedPlans()([]ProvisionedPlanable) { + return m.provisionedPlans +} +// GetRefreshTokensValidFromDateTime gets the refreshTokensValidFromDateTime property value. The refreshTokensValidFromDateTime property +func (m *EducationUser) GetRefreshTokensValidFromDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.refreshTokensValidFromDateTime +} +// GetRelatedContacts gets the relatedContacts property value. Related records related to the user. Possible relationships are parent, relative, aide, doctor, guardian, child, other, unknownFutureValue +func (m *EducationUser) GetRelatedContacts()([]RelatedContactable) { + return m.relatedContacts +} +// GetResidenceAddress gets the residenceAddress property value. Address where user lives. Note: type and postOfficeBox are not supported for educationUser resources. +func (m *EducationUser) GetResidenceAddress()(PhysicalAddressable) { + return m.residenceAddress +} +// GetRubrics gets the rubrics property value. When set, the grading rubric attached to the assignment. +func (m *EducationUser) GetRubrics()([]EducationRubricable) { + return m.rubrics +} +// GetSchools gets the schools property value. Schools to which the user belongs. Nullable. +func (m *EducationUser) GetSchools()([]EducationSchoolable) { + return m.schools +} +// GetShowInAddressList gets the showInAddressList property value. The showInAddressList property +func (m *EducationUser) GetShowInAddressList()(*bool) { + return m.showInAddressList +} +// GetStudent gets the student property value. If the primary role is student, this block will contain student specific data. +func (m *EducationUser) GetStudent()(EducationStudentable) { + return m.student +} +// GetSurname gets the surname property value. The user's surname (family name or last name). Supports /$filter. +func (m *EducationUser) GetSurname()(*string) { + return m.surname +} +// GetTaughtClasses gets the taughtClasses property value. Classes for which the user is a teacher. +func (m *EducationUser) GetTaughtClasses()([]EducationClassable) { + return m.taughtClasses +} +// GetTeacher gets the teacher property value. If the primary role is teacher, this block will contain teacher specific data. +func (m *EducationUser) GetTeacher()(EducationTeacherable) { + return m.teacher +} +// GetUsageLocation gets the usageLocation property value. A two-letter country code ([ISO 3166 Alpha-2]). Required for users who will be assigned licenses. Not nullable. Supports /$filter. +func (m *EducationUser) GetUsageLocation()(*string) { + return m.usageLocation +} +// GetUser gets the user property value. The user property +func (m *EducationUser) GetUser()(Userable) { + return m.user +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) for the user. Supports $filter and $orderby. See standard [user] resource for additional details. +func (m *EducationUser) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUserType gets the userType property value. A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'. Supports /$filter. +func (m *EducationUser) GetUserType()(*string) { + return m.userType +} +// Serialize serializes information the current object +func (m *EducationUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled()) + if err != nil { + return err + } + } + if m.GetAssignedLicenses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLicenses())) + for i, v := range m.GetAssignedLicenses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedLicenses", cast) + if err != nil { + return err + } + } + if m.GetAssignedPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedPlans())) + for i, v := range m.GetAssignedPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedPlans", cast) + if err != nil { + return err + } + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetBusinessPhones() != nil { + err = writer.WriteCollectionOfStringValues("businessPhones", m.GetBusinessPhones()) + if err != nil { + return err + } + } + if m.GetClasses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClasses())) + for i, v := range m.GetClasses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("classes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("department", m.GetDepartment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExternalSource() != nil { + cast := (*m.GetExternalSource()).String() + err = writer.WriteStringValue("externalSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalSourceDetail", m.GetExternalSourceDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mail", m.GetMail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mailingAddress", m.GetMailingAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mailNickname", m.GetMailNickname()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("middleName", m.GetMiddleName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mobilePhone", m.GetMobilePhone()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("officeLocation", m.GetOfficeLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onPremisesInfo", m.GetOnPremisesInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordPolicies", m.GetPasswordPolicies()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("passwordProfile", m.GetPasswordProfile()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredLanguage", m.GetPreferredLanguage()) + if err != nil { + return err + } + } + if m.GetPrimaryRole() != nil { + cast := (*m.GetPrimaryRole()).String() + err = writer.WriteStringValue("primaryRole", &cast) + if err != nil { + return err + } + } + if m.GetProvisionedPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProvisionedPlans())) + for i, v := range m.GetProvisionedPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("provisionedPlans", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("refreshTokensValidFromDateTime", m.GetRefreshTokensValidFromDateTime()) + if err != nil { + return err + } + } + if m.GetRelatedContacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelatedContacts())) + for i, v := range m.GetRelatedContacts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("relatedContacts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("residenceAddress", m.GetResidenceAddress()) + if err != nil { + return err + } + } + if m.GetRubrics() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRubrics())) + for i, v := range m.GetRubrics() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rubrics", cast) + if err != nil { + return err + } + } + if m.GetSchools() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSchools())) + for i, v := range m.GetSchools() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("schools", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showInAddressList", m.GetShowInAddressList()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("student", m.GetStudent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + if m.GetTaughtClasses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaughtClasses())) + for i, v := range m.GetTaughtClasses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taughtClasses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("teacher", m.GetTeacher()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("usageLocation", m.GetUsageLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userType", m.GetUserType()) + if err != nil { + return err + } + } + return nil +} +// SetAccountEnabled sets the accountEnabled property value. True if the account is enabled; otherwise, false. This property is required when a user is created. Supports /$filter. +func (m *EducationUser) SetAccountEnabled(value *bool)() { + m.accountEnabled = value +} +// SetAssignedLicenses sets the assignedLicenses property value. The licenses that are assigned to the user. Not nullable. +func (m *EducationUser) SetAssignedLicenses(value []AssignedLicenseable)() { + m.assignedLicenses = value +} +// SetAssignedPlans sets the assignedPlans property value. The plans that are assigned to the user. Read-only. Not nullable. +func (m *EducationUser) SetAssignedPlans(value []AssignedPlanable)() { + m.assignedPlans = value +} +// SetAssignments sets the assignments property value. List of assignments for the user. Nullable. +func (m *EducationUser) SetAssignments(value []EducationAssignmentable)() { + m.assignments = value +} +// SetBusinessPhones sets the businessPhones property value. The telephone numbers for the user. Note: Although this is a string collection, only one number can be set for this property. +func (m *EducationUser) SetBusinessPhones(value []string)() { + m.businessPhones = value +} +// SetClasses sets the classes property value. Classes to which the user belongs. Nullable. +func (m *EducationUser) SetClasses(value []EducationClassable)() { + m.classes = value +} +// SetCreatedBy sets the createdBy property value. Entity who created the user. +func (m *EducationUser) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetDepartment sets the department property value. The name for the department in which the user works. Supports /$filter. +func (m *EducationUser) SetDepartment(value *string)() { + m.department = value +} +// SetDisplayName sets the displayName property value. The name displayed in the address book for the user. Supports $filter and $orderby. +func (m *EducationUser) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalSource sets the externalSource property value. The type of external source this resource was generated from (automatically determined from externalSourceDetail). Possible values are: sis, lms, or manual. +func (m *EducationUser) SetExternalSource(value *EducationExternalSource)() { + m.externalSource = value +} +// SetExternalSourceDetail sets the externalSourceDetail property value. The name of the external source this resources was generated from. +func (m *EducationUser) SetExternalSourceDetail(value *string)() { + m.externalSourceDetail = value +} +// SetGivenName sets the givenName property value. The given name (first name) of the user. Supports /$filter. +func (m *EducationUser) SetGivenName(value *string)() { + m.givenName = value +} +// SetMail sets the mail property value. The SMTP address for the user; for example, 'jeff@contoso.onmicrosoft.com'. Read-Only. Supports /$filter. +func (m *EducationUser) SetMail(value *string)() { + m.mail = value +} +// SetMailingAddress sets the mailingAddress property value. Mail address of user. Note: type and postOfficeBox are not supported for educationUser resources. +func (m *EducationUser) SetMailingAddress(value PhysicalAddressable)() { + m.mailingAddress = value +} +// SetMailNickname sets the mailNickname property value. The mail alias for the user. This property must be specified when a user is created. Supports /$filter. +func (m *EducationUser) SetMailNickname(value *string)() { + m.mailNickname = value +} +// SetMiddleName sets the middleName property value. The middle name of user. +func (m *EducationUser) SetMiddleName(value *string)() { + m.middleName = value +} +// SetMobilePhone sets the mobilePhone property value. The primary cellular telephone number for the user. +func (m *EducationUser) SetMobilePhone(value *string)() { + m.mobilePhone = value +} +// SetOfficeLocation sets the officeLocation property value. The officeLocation property +func (m *EducationUser) SetOfficeLocation(value *string)() { + m.officeLocation = value +} +// SetOnPremisesInfo sets the onPremisesInfo property value. Additional information used to associate the AAD user with it's Active Directory counterpart. +func (m *EducationUser) SetOnPremisesInfo(value EducationOnPremisesInfoable)() { + m.onPremisesInfo = value +} +// SetPasswordPolicies sets the passwordPolicies property value. Specifies password policies for the user. See standard [user] resource for additional details. +func (m *EducationUser) SetPasswordPolicies(value *string)() { + m.passwordPolicies = value +} +// SetPasswordProfile sets the passwordProfile property value. Specifies the password profile for the user. The profile contains the user's password. This property is required when a user is created. See standard [user] resource for additional details. +func (m *EducationUser) SetPasswordProfile(value PasswordProfileable)() { + m.passwordProfile = value +} +// SetPreferredLanguage sets the preferredLanguage property value. The preferred language for the user. Should follow ISO 639-1 Code; for example, 'en-US'. +func (m *EducationUser) SetPreferredLanguage(value *string)() { + m.preferredLanguage = value +} +// SetPrimaryRole sets the primaryRole property value. The primaryRole property +func (m *EducationUser) SetPrimaryRole(value *EducationUserRole)() { + m.primaryRole = value +} +// SetProvisionedPlans sets the provisionedPlans property value. The plans that are provisioned for the user. Read-only. Not nullable. +func (m *EducationUser) SetProvisionedPlans(value []ProvisionedPlanable)() { + m.provisionedPlans = value +} +// SetRefreshTokensValidFromDateTime sets the refreshTokensValidFromDateTime property value. The refreshTokensValidFromDateTime property +func (m *EducationUser) SetRefreshTokensValidFromDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.refreshTokensValidFromDateTime = value +} +// SetRelatedContacts sets the relatedContacts property value. Related records related to the user. Possible relationships are parent, relative, aide, doctor, guardian, child, other, unknownFutureValue +func (m *EducationUser) SetRelatedContacts(value []RelatedContactable)() { + m.relatedContacts = value +} +// SetResidenceAddress sets the residenceAddress property value. Address where user lives. Note: type and postOfficeBox are not supported for educationUser resources. +func (m *EducationUser) SetResidenceAddress(value PhysicalAddressable)() { + m.residenceAddress = value +} +// SetRubrics sets the rubrics property value. When set, the grading rubric attached to the assignment. +func (m *EducationUser) SetRubrics(value []EducationRubricable)() { + m.rubrics = value +} +// SetSchools sets the schools property value. Schools to which the user belongs. Nullable. +func (m *EducationUser) SetSchools(value []EducationSchoolable)() { + m.schools = value +} +// SetShowInAddressList sets the showInAddressList property value. The showInAddressList property +func (m *EducationUser) SetShowInAddressList(value *bool)() { + m.showInAddressList = value +} +// SetStudent sets the student property value. If the primary role is student, this block will contain student specific data. +func (m *EducationUser) SetStudent(value EducationStudentable)() { + m.student = value +} +// SetSurname sets the surname property value. The user's surname (family name or last name). Supports /$filter. +func (m *EducationUser) SetSurname(value *string)() { + m.surname = value +} +// SetTaughtClasses sets the taughtClasses property value. Classes for which the user is a teacher. +func (m *EducationUser) SetTaughtClasses(value []EducationClassable)() { + m.taughtClasses = value +} +// SetTeacher sets the teacher property value. If the primary role is teacher, this block will contain teacher specific data. +func (m *EducationUser) SetTeacher(value EducationTeacherable)() { + m.teacher = value +} +// SetUsageLocation sets the usageLocation property value. A two-letter country code ([ISO 3166 Alpha-2]). Required for users who will be assigned licenses. Not nullable. Supports /$filter. +func (m *EducationUser) SetUsageLocation(value *string)() { + m.usageLocation = value +} +// SetUser sets the user property value. The user property +func (m *EducationUser) SetUser(value Userable)() { + m.user = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) for the user. Supports $filter and $orderby. See standard [user] resource for additional details. +func (m *EducationUser) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUserType sets the userType property value. A string value that can be used to classify user types in your directory, such as 'Member' and 'Guest'. Supports /$filter. +func (m *EducationUser) SetUserType(value *string)() { + m.userType = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_user_collection_response.go b/src/internal/connector/graph/betasdk/models/education_user_collection_response.go new file mode 100644 index 000000000..72ff1b37a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationUserCollectionResponse +type EducationUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationUserable +} +// NewEducationUserCollectionResponse instantiates a new EducationUserCollectionResponse and sets the default values. +func NewEducationUserCollectionResponse()(*EducationUserCollectionResponse) { + m := &EducationUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationUserable, len(val)) + for i, v := range val { + res[i] = v.(EducationUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationUserCollectionResponse) GetValue()([]EducationUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationUserCollectionResponse) SetValue(value []EducationUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/education_user_collection_responseable.go new file mode 100644 index 000000000..e7337ac26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationUserCollectionResponseable +type EducationUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationUserable) + SetValue(value []EducationUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_user_role.go b/src/internal/connector/graph/betasdk/models/education_user_role.go new file mode 100644 index 000000000..02589d765 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_user_role.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EducationUserRole int + +const ( + STUDENT_EDUCATIONUSERROLE EducationUserRole = iota + TEACHER_EDUCATIONUSERROLE + NONE_EDUCATIONUSERROLE + UNKNOWNFUTUREVALUE_EDUCATIONUSERROLE + FACULTY_EDUCATIONUSERROLE +) + +func (i EducationUserRole) String() string { + return []string{"student", "teacher", "none", "unknownFutureValue", "faculty"}[i] +} +func ParseEducationUserRole(v string) (interface{}, error) { + result := STUDENT_EDUCATIONUSERROLE + switch v { + case "student": + result = STUDENT_EDUCATIONUSERROLE + case "teacher": + result = TEACHER_EDUCATIONUSERROLE + case "none": + result = NONE_EDUCATIONUSERROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EDUCATIONUSERROLE + case "faculty": + result = FACULTY_EDUCATIONUSERROLE + default: + return 0, errors.New("Unknown EducationUserRole value: " + v) + } + return &result, nil +} +func SerializeEducationUserRole(values []EducationUserRole) []string { + 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/education_userable.go b/src/internal/connector/graph/betasdk/models/education_userable.go new file mode 100644 index 000000000..25611717c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_userable.go @@ -0,0 +1,88 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationUserable +type EducationUserable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountEnabled()(*bool) + GetAssignedLicenses()([]AssignedLicenseable) + GetAssignedPlans()([]AssignedPlanable) + GetAssignments()([]EducationAssignmentable) + GetBusinessPhones()([]string) + GetClasses()([]EducationClassable) + GetCreatedBy()(IdentitySetable) + GetDepartment()(*string) + GetDisplayName()(*string) + GetExternalSource()(*EducationExternalSource) + GetExternalSourceDetail()(*string) + GetGivenName()(*string) + GetMail()(*string) + GetMailingAddress()(PhysicalAddressable) + GetMailNickname()(*string) + GetMiddleName()(*string) + GetMobilePhone()(*string) + GetOfficeLocation()(*string) + GetOnPremisesInfo()(EducationOnPremisesInfoable) + GetPasswordPolicies()(*string) + GetPasswordProfile()(PasswordProfileable) + GetPreferredLanguage()(*string) + GetPrimaryRole()(*EducationUserRole) + GetProvisionedPlans()([]ProvisionedPlanable) + GetRefreshTokensValidFromDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRelatedContacts()([]RelatedContactable) + GetResidenceAddress()(PhysicalAddressable) + GetRubrics()([]EducationRubricable) + GetSchools()([]EducationSchoolable) + GetShowInAddressList()(*bool) + GetStudent()(EducationStudentable) + GetSurname()(*string) + GetTaughtClasses()([]EducationClassable) + GetTeacher()(EducationTeacherable) + GetUsageLocation()(*string) + GetUser()(Userable) + GetUserPrincipalName()(*string) + GetUserType()(*string) + SetAccountEnabled(value *bool)() + SetAssignedLicenses(value []AssignedLicenseable)() + SetAssignedPlans(value []AssignedPlanable)() + SetAssignments(value []EducationAssignmentable)() + SetBusinessPhones(value []string)() + SetClasses(value []EducationClassable)() + SetCreatedBy(value IdentitySetable)() + SetDepartment(value *string)() + SetDisplayName(value *string)() + SetExternalSource(value *EducationExternalSource)() + SetExternalSourceDetail(value *string)() + SetGivenName(value *string)() + SetMail(value *string)() + SetMailingAddress(value PhysicalAddressable)() + SetMailNickname(value *string)() + SetMiddleName(value *string)() + SetMobilePhone(value *string)() + SetOfficeLocation(value *string)() + SetOnPremisesInfo(value EducationOnPremisesInfoable)() + SetPasswordPolicies(value *string)() + SetPasswordProfile(value PasswordProfileable)() + SetPreferredLanguage(value *string)() + SetPrimaryRole(value *EducationUserRole)() + SetProvisionedPlans(value []ProvisionedPlanable)() + SetRefreshTokensValidFromDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRelatedContacts(value []RelatedContactable)() + SetResidenceAddress(value PhysicalAddressable)() + SetRubrics(value []EducationRubricable)() + SetSchools(value []EducationSchoolable)() + SetShowInAddressList(value *bool)() + SetStudent(value EducationStudentable)() + SetSurname(value *string)() + SetTaughtClasses(value []EducationClassable)() + SetTeacher(value EducationTeacherable)() + SetUsageLocation(value *string)() + SetUser(value Userable)() + SetUserPrincipalName(value *string)() + SetUserType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/education_word_resource.go b/src/internal/connector/graph/betasdk/models/education_word_resource.go new file mode 100644 index 000000000..f9cae662b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_word_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationWordResource +type EducationWordResource struct { + EducationResource + // Location of the file on disk. + fileUrl *string +} +// NewEducationWordResource instantiates a new EducationWordResource and sets the default values. +func NewEducationWordResource()(*EducationWordResource) { + m := &EducationWordResource{ + EducationResource: *NewEducationResource(), + } + odataTypeValue := "#microsoft.graph.educationWordResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationWordResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationWordResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationWordResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationWordResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EducationResource.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. Location of the file on disk. +func (m *EducationWordResource) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *EducationWordResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EducationResource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. Location of the file on disk. +func (m *EducationWordResource) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/education_word_resourceable.go b/src/internal/connector/graph/betasdk/models/education_word_resourceable.go new file mode 100644 index 000000000..6367f33e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/education_word_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationWordResourceable +type EducationWordResourceable interface { + EducationResourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activity.go b/src/internal/connector/graph/betasdk/models/educational_activity.go new file mode 100644 index 000000000..854b1a5bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activity.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivity +type EducationalActivity struct { + ItemFacet + // The month and year the user graduated or completed the activity. + completionMonthYear *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The month and year the user completed the educational activity referenced. + endMonthYear *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The institution property + institution InstitutionDataable + // The program property + program EducationalActivityDetailable + // The month and year the user commenced the activity referenced. + startMonthYear *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewEducationalActivity instantiates a new EducationalActivity and sets the default values. +func NewEducationalActivity()(*EducationalActivity) { + m := &EducationalActivity{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.educationalActivity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEducationalActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationalActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationalActivity(), nil +} +// GetCompletionMonthYear gets the completionMonthYear property value. The month and year the user graduated or completed the activity. +func (m *EducationalActivity) GetCompletionMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.completionMonthYear +} +// GetEndMonthYear gets the endMonthYear property value. The month and year the user completed the educational activity referenced. +func (m *EducationalActivity) GetEndMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endMonthYear +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationalActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["completionMonthYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletionMonthYear(val) + } + return nil + } + res["endMonthYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndMonthYear(val) + } + return nil + } + res["institution"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInstitutionDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstitution(val.(InstitutionDataable)) + } + return nil + } + res["program"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationalActivityDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProgram(val.(EducationalActivityDetailable)) + } + return nil + } + res["startMonthYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartMonthYear(val) + } + return nil + } + return res +} +// GetInstitution gets the institution property value. The institution property +func (m *EducationalActivity) GetInstitution()(InstitutionDataable) { + return m.institution +} +// GetProgram gets the program property value. The program property +func (m *EducationalActivity) GetProgram()(EducationalActivityDetailable) { + return m.program +} +// GetStartMonthYear gets the startMonthYear property value. The month and year the user commenced the activity referenced. +func (m *EducationalActivity) GetStartMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startMonthYear +} +// Serialize serializes information the current object +func (m *EducationalActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("completionMonthYear", m.GetCompletionMonthYear()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("endMonthYear", m.GetEndMonthYear()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("institution", m.GetInstitution()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("program", m.GetProgram()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("startMonthYear", m.GetStartMonthYear()) + if err != nil { + return err + } + } + return nil +} +// SetCompletionMonthYear sets the completionMonthYear property value. The month and year the user graduated or completed the activity. +func (m *EducationalActivity) SetCompletionMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.completionMonthYear = value +} +// SetEndMonthYear sets the endMonthYear property value. The month and year the user completed the educational activity referenced. +func (m *EducationalActivity) SetEndMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endMonthYear = value +} +// SetInstitution sets the institution property value. The institution property +func (m *EducationalActivity) SetInstitution(value InstitutionDataable)() { + m.institution = value +} +// SetProgram sets the program property value. The program property +func (m *EducationalActivity) SetProgram(value EducationalActivityDetailable)() { + m.program = value +} +// SetStartMonthYear sets the startMonthYear property value. The month and year the user commenced the activity referenced. +func (m *EducationalActivity) SetStartMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startMonthYear = value +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activity_collection_response.go b/src/internal/connector/graph/betasdk/models/educational_activity_collection_response.go new file mode 100644 index 000000000..eff81a812 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivityCollectionResponse +type EducationalActivityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EducationalActivityable +} +// NewEducationalActivityCollectionResponse instantiates a new EducationalActivityCollectionResponse and sets the default values. +func NewEducationalActivityCollectionResponse()(*EducationalActivityCollectionResponse) { + m := &EducationalActivityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEducationalActivityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationalActivityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationalActivityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationalActivityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationalActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationalActivityable, len(val)) + for i, v := range val { + res[i] = v.(EducationalActivityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EducationalActivityCollectionResponse) GetValue()([]EducationalActivityable) { + return m.value +} +// Serialize serializes information the current object +func (m *EducationalActivityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EducationalActivityCollectionResponse) SetValue(value []EducationalActivityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/educational_activity_collection_responseable.go new file mode 100644 index 000000000..7d845fa5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivityCollectionResponseable +type EducationalActivityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EducationalActivityable) + SetValue(value []EducationalActivityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activity_detail.go b/src/internal/connector/graph/betasdk/models/educational_activity_detail.go new file mode 100644 index 000000000..4f72bd3d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activity_detail.go @@ -0,0 +1,317 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivityDetail +type EducationalActivityDetail struct { + // Shortened name of the degree or program (example: PhD, MBA) + abbreviation *string + // Extracurricular activities undertaken alongside the program. + activities []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Any awards or honors associated with the program. + awards []string + // Short description of the program provided by the user. + description *string + // Long-form name of the program that the user has provided. + displayName *string + // Majors and minors associated with the program. (if applicable) + fieldsOfStudy []string + // The final grade, class, GPA or score. + grade *string + // Additional notes the user has provided. + notes *string + // The OdataType property + odataType *string + // Link to the degree or program page. + webUrl *string +} +// NewEducationalActivityDetail instantiates a new educationalActivityDetail and sets the default values. +func NewEducationalActivityDetail()(*EducationalActivityDetail) { + m := &EducationalActivityDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEducationalActivityDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEducationalActivityDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEducationalActivityDetail(), nil +} +// GetAbbreviation gets the abbreviation property value. Shortened name of the degree or program (example: PhD, MBA) +func (m *EducationalActivityDetail) GetAbbreviation()(*string) { + return m.abbreviation +} +// GetActivities gets the activities property value. Extracurricular activities undertaken alongside the program. +func (m *EducationalActivityDetail) GetActivities()([]string) { + return m.activities +} +// 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 *EducationalActivityDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAwards gets the awards property value. Any awards or honors associated with the program. +func (m *EducationalActivityDetail) GetAwards()([]string) { + return m.awards +} +// GetDescription gets the description property value. Short description of the program provided by the user. +func (m *EducationalActivityDetail) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Long-form name of the program that the user has provided. +func (m *EducationalActivityDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EducationalActivityDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["abbreviation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAbbreviation(val) + } + return nil + } + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetActivities(res) + } + return nil + } + res["awards"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAwards(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fieldsOfStudy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetFieldsOfStudy(res) + } + return nil + } + res["grade"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGrade(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(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["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetFieldsOfStudy gets the fieldsOfStudy property value. Majors and minors associated with the program. (if applicable) +func (m *EducationalActivityDetail) GetFieldsOfStudy()([]string) { + return m.fieldsOfStudy +} +// GetGrade gets the grade property value. The final grade, class, GPA or score. +func (m *EducationalActivityDetail) GetGrade()(*string) { + return m.grade +} +// GetNotes gets the notes property value. Additional notes the user has provided. +func (m *EducationalActivityDetail) GetNotes()(*string) { + return m.notes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EducationalActivityDetail) GetOdataType()(*string) { + return m.odataType +} +// GetWebUrl gets the webUrl property value. Link to the degree or program page. +func (m *EducationalActivityDetail) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *EducationalActivityDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("abbreviation", m.GetAbbreviation()) + if err != nil { + return err + } + } + if m.GetActivities() != nil { + err := writer.WriteCollectionOfStringValues("activities", m.GetActivities()) + if err != nil { + return err + } + } + if m.GetAwards() != nil { + err := writer.WriteCollectionOfStringValues("awards", m.GetAwards()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetFieldsOfStudy() != nil { + err := writer.WriteCollectionOfStringValues("fieldsOfStudy", m.GetFieldsOfStudy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("grade", m.GetGrade()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAbbreviation sets the abbreviation property value. Shortened name of the degree or program (example: PhD, MBA) +func (m *EducationalActivityDetail) SetAbbreviation(value *string)() { + m.abbreviation = value +} +// SetActivities sets the activities property value. Extracurricular activities undertaken alongside the program. +func (m *EducationalActivityDetail) SetActivities(value []string)() { + m.activities = value +} +// 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 *EducationalActivityDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAwards sets the awards property value. Any awards or honors associated with the program. +func (m *EducationalActivityDetail) SetAwards(value []string)() { + m.awards = value +} +// SetDescription sets the description property value. Short description of the program provided by the user. +func (m *EducationalActivityDetail) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Long-form name of the program that the user has provided. +func (m *EducationalActivityDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFieldsOfStudy sets the fieldsOfStudy property value. Majors and minors associated with the program. (if applicable) +func (m *EducationalActivityDetail) SetFieldsOfStudy(value []string)() { + m.fieldsOfStudy = value +} +// SetGrade sets the grade property value. The final grade, class, GPA or score. +func (m *EducationalActivityDetail) SetGrade(value *string)() { + m.grade = value +} +// SetNotes sets the notes property value. Additional notes the user has provided. +func (m *EducationalActivityDetail) SetNotes(value *string)() { + m.notes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EducationalActivityDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetWebUrl sets the webUrl property value. Link to the degree or program page. +func (m *EducationalActivityDetail) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activity_detailable.go b/src/internal/connector/graph/betasdk/models/educational_activity_detailable.go new file mode 100644 index 000000000..9dff40fb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activity_detailable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivityDetailable +type EducationalActivityDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAbbreviation()(*string) + GetActivities()([]string) + GetAwards()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetFieldsOfStudy()([]string) + GetGrade()(*string) + GetNotes()(*string) + GetOdataType()(*string) + GetWebUrl()(*string) + SetAbbreviation(value *string)() + SetActivities(value []string)() + SetAwards(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetFieldsOfStudy(value []string)() + SetGrade(value *string)() + SetNotes(value *string)() + SetOdataType(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/educational_activityable.go b/src/internal/connector/graph/betasdk/models/educational_activityable.go new file mode 100644 index 000000000..85924c5b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/educational_activityable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EducationalActivityable +type EducationalActivityable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletionMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetEndMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetInstitution()(InstitutionDataable) + GetProgram()(EducationalActivityDetailable) + GetStartMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetCompletionMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetEndMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetInstitution(value InstitutionDataable)() + SetProgram(value EducationalActivityDetailable)() + SetStartMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/eligibility_filtering_enabled_entities.go b/src/internal/connector/graph/betasdk/models/eligibility_filtering_enabled_entities.go new file mode 100644 index 000000000..3bec42d90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eligibility_filtering_enabled_entities.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EligibilityFilteringEnabledEntities int + +const ( + NONE_ELIGIBILITYFILTERINGENABLEDENTITIES EligibilityFilteringEnabledEntities = iota + SWAPREQUEST_ELIGIBILITYFILTERINGENABLEDENTITIES + OFFERSHIFTREQUEST_ELIGIBILITYFILTERINGENABLEDENTITIES + UNKNOWNFUTUREVALUE_ELIGIBILITYFILTERINGENABLEDENTITIES + TIMEOFFREASON_ELIGIBILITYFILTERINGENABLEDENTITIES +) + +func (i EligibilityFilteringEnabledEntities) String() string { + return []string{"none", "swapRequest", "offerShiftRequest", "unknownFutureValue", "timeOffReason"}[i] +} +func ParseEligibilityFilteringEnabledEntities(v string) (interface{}, error) { + result := NONE_ELIGIBILITYFILTERINGENABLEDENTITIES + switch v { + case "none": + result = NONE_ELIGIBILITYFILTERINGENABLEDENTITIES + case "swapRequest": + result = SWAPREQUEST_ELIGIBILITYFILTERINGENABLEDENTITIES + case "offerShiftRequest": + result = OFFERSHIFTREQUEST_ELIGIBILITYFILTERINGENABLEDENTITIES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ELIGIBILITYFILTERINGENABLEDENTITIES + case "timeOffReason": + result = TIMEOFFREASON_ELIGIBILITYFILTERINGENABLEDENTITIES + default: + return 0, errors.New("Unknown EligibilityFilteringEnabledEntities value: " + v) + } + return &result, nil +} +func SerializeEligibilityFilteringEnabledEntities(values []EligibilityFilteringEnabledEntities) []string { + 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/email_activity_statistics.go b/src/internal/connector/graph/betasdk/models/email_activity_statistics.go new file mode 100644 index 000000000..2a5cad939 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_activity_statistics.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailActivityStatistics +type EmailActivityStatistics struct { + ActivityStatistics + // Total hours spent on email outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. + afterHours *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Total hours spent reading email. The value is represented in ISO 8601 format for durations. + readEmail *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Total hours spent writing and sending email. The value is represented in ISO 8601 format for durations. + sentEmail *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewEmailActivityStatistics instantiates a new EmailActivityStatistics and sets the default values. +func NewEmailActivityStatistics()(*EmailActivityStatistics) { + m := &EmailActivityStatistics{ + ActivityStatistics: *NewActivityStatistics(), + } + odataTypeValue := "#microsoft.graph.emailActivityStatistics"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailActivityStatistics(), nil +} +// GetAfterHours gets the afterHours property value. Total hours spent on email outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.afterHours +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ActivityStatistics.GetFieldDeserializers() + res["afterHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterHours(val) + } + return nil + } + res["readEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetReadEmail(val) + } + return nil + } + res["sentEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetSentEmail(val) + } + return nil + } + return res +} +// GetReadEmail gets the readEmail property value. Total hours spent reading email. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) GetReadEmail()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.readEmail +} +// GetSentEmail gets the sentEmail property value. Total hours spent writing and sending email. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) GetSentEmail()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.sentEmail +} +// Serialize serializes information the current object +func (m *EmailActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ActivityStatistics.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("afterHours", m.GetAfterHours()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("readEmail", m.GetReadEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("sentEmail", m.GetSentEmail()) + if err != nil { + return err + } + } + return nil +} +// SetAfterHours sets the afterHours property value. Total hours spent on email outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.afterHours = value +} +// SetReadEmail sets the readEmail property value. Total hours spent reading email. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) SetReadEmail(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.readEmail = value +} +// SetSentEmail sets the sentEmail property value. Total hours spent writing and sending email. The value is represented in ISO 8601 format for durations. +func (m *EmailActivityStatistics) SetSentEmail(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.sentEmail = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_response.go new file mode 100644 index 000000000..9b0c8d525 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailActivityStatisticsCollectionResponse +type EmailActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmailActivityStatisticsable +} +// NewEmailActivityStatisticsCollectionResponse instantiates a new EmailActivityStatisticsCollectionResponse and sets the default values. +func NewEmailActivityStatisticsCollectionResponse()(*EmailActivityStatisticsCollectionResponse) { + m := &EmailActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(EmailActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailActivityStatisticsCollectionResponse) GetValue()([]EmailActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailActivityStatisticsCollectionResponse) SetValue(value []EmailActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_responseable.go new file mode 100644 index 000000000..cd4410c64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailActivityStatisticsCollectionResponseable +type EmailActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailActivityStatisticsable) + SetValue(value []EmailActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/email_activity_statisticsable.go new file mode 100644 index 000000000..ef514f17b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_activity_statisticsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailActivityStatisticsable +type EmailActivityStatisticsable interface { + ActivityStatisticsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetReadEmail()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetSentEmail()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetReadEmail(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetSentEmail(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_address.go b/src/internal/connector/graph/betasdk/models/email_address.go new file mode 100644 index 000000000..b41482d3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_address.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAddress +type EmailAddress 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 email address of an entity instance. + address *string + // The display name of an entity instance. + name *string + // The OdataType property + odataType *string +} +// NewEmailAddress instantiates a new emailAddress and sets the default values. +func NewEmailAddress()(*EmailAddress) { + m := &EmailAddress{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEmailAddressFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailAddressFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.typedEmailAddress": + return NewTypedEmailAddress(), nil + } + } + } + } + return NewEmailAddress(), 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 *EmailAddress) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddress gets the address property value. The email address of an entity instance. +func (m *EmailAddress) GetAddress()(*string) { + return m.address +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailAddress) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddress(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetName gets the name property value. The display name of an entity instance. +func (m *EmailAddress) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EmailAddress) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EmailAddress) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EmailAddress) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddress sets the address property value. The email address of an entity instance. +func (m *EmailAddress) SetAddress(value *string)() { + m.address = value +} +// SetName sets the name property value. The display name of an entity instance. +func (m *EmailAddress) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EmailAddress) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_addressable.go b/src/internal/connector/graph/betasdk/models/email_addressable.go new file mode 100644 index 000000000..1d80ed28e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_addressable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAddressable +type EmailAddressable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(*string) + GetName()(*string) + GetOdataType()(*string) + SetAddress(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method.go b/src/internal/connector/graph/betasdk/models/email_authentication_method.go new file mode 100644 index 000000000..b7b6ca80c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethod +type EmailAuthenticationMethod struct { + AuthenticationMethod + // The email address registered to this user. + emailAddress *string +} +// NewEmailAuthenticationMethod instantiates a new EmailAuthenticationMethod and sets the default values. +func NewEmailAuthenticationMethod()(*EmailAuthenticationMethod) { + m := &EmailAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.emailAuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailAuthenticationMethod(), nil +} +// GetEmailAddress gets the emailAddress property value. The email address registered to this user. +func (m *EmailAuthenticationMethod) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EmailAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + return nil +} +// SetEmailAddress sets the emailAddress property value. The email address registered to this user. +func (m *EmailAuthenticationMethod) SetEmailAddress(value *string)() { + m.emailAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_response.go new file mode 100644 index 000000000..2cbd6e789 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodCollectionResponse +type EmailAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmailAuthenticationMethodable +} +// NewEmailAuthenticationMethodCollectionResponse instantiates a new EmailAuthenticationMethodCollectionResponse and sets the default values. +func NewEmailAuthenticationMethodCollectionResponse()(*EmailAuthenticationMethodCollectionResponse) { + m := &EmailAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(EmailAuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailAuthenticationMethodCollectionResponse) GetValue()([]EmailAuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailAuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailAuthenticationMethodCollectionResponse) SetValue(value []EmailAuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_responseable.go new file mode 100644 index 000000000..38f36e179 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodCollectionResponseable +type EmailAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailAuthenticationMethodable) + SetValue(value []EmailAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration.go new file mode 100644 index 000000000..3e6481bd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodConfiguration +type EmailAuthenticationMethodConfiguration struct { + AuthenticationMethodConfiguration + // Determines whether email OTP is usable by external users for authentication. Possible values are: default, enabled, disabled, unknownFutureValue. Tenants in the default state who did not use public preview will automatically have email OTP enabled beginning in October 2021. + allowExternalIdToUseEmailOtp *ExternalEmailOtpState + // A collection of groups that are enabled to use the authentication method. + includeTargets []AuthenticationMethodTargetable +} +// NewEmailAuthenticationMethodConfiguration instantiates a new EmailAuthenticationMethodConfiguration and sets the default values. +func NewEmailAuthenticationMethodConfiguration()(*EmailAuthenticationMethodConfiguration) { + m := &EmailAuthenticationMethodConfiguration{ + AuthenticationMethodConfiguration: *NewAuthenticationMethodConfiguration(), + } + odataTypeValue := "#microsoft.graph.emailAuthenticationMethodConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailAuthenticationMethodConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailAuthenticationMethodConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailAuthenticationMethodConfiguration(), nil +} +// GetAllowExternalIdToUseEmailOtp gets the allowExternalIdToUseEmailOtp property value. Determines whether email OTP is usable by external users for authentication. Possible values are: default, enabled, disabled, unknownFutureValue. Tenants in the default state who did not use public preview will automatically have email OTP enabled beginning in October 2021. +func (m *EmailAuthenticationMethodConfiguration) GetAllowExternalIdToUseEmailOtp()(*ExternalEmailOtpState) { + return m.allowExternalIdToUseEmailOtp +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailAuthenticationMethodConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethodConfiguration.GetFieldDeserializers() + res["allowExternalIdToUseEmailOtp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalEmailOtpState) + if err != nil { + return err + } + if val != nil { + m.SetAllowExternalIdToUseEmailOtp(val.(*ExternalEmailOtpState)) + } + return nil + } + res["includeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodTargetable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodTargetable) + } + m.SetIncludeTargets(res) + } + return nil + } + return res +} +// GetIncludeTargets gets the includeTargets property value. A collection of groups that are enabled to use the authentication method. +func (m *EmailAuthenticationMethodConfiguration) GetIncludeTargets()([]AuthenticationMethodTargetable) { + return m.includeTargets +} +// Serialize serializes information the current object +func (m *EmailAuthenticationMethodConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethodConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowExternalIdToUseEmailOtp() != nil { + cast := (*m.GetAllowExternalIdToUseEmailOtp()).String() + err = writer.WriteStringValue("allowExternalIdToUseEmailOtp", &cast) + if err != nil { + return err + } + } + if m.GetIncludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeTargets())) + for i, v := range m.GetIncludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includeTargets", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowExternalIdToUseEmailOtp sets the allowExternalIdToUseEmailOtp property value. Determines whether email OTP is usable by external users for authentication. Possible values are: default, enabled, disabled, unknownFutureValue. Tenants in the default state who did not use public preview will automatically have email OTP enabled beginning in October 2021. +func (m *EmailAuthenticationMethodConfiguration) SetAllowExternalIdToUseEmailOtp(value *ExternalEmailOtpState)() { + m.allowExternalIdToUseEmailOtp = value +} +// SetIncludeTargets sets the includeTargets property value. A collection of groups that are enabled to use the authentication method. +func (m *EmailAuthenticationMethodConfiguration) SetIncludeTargets(value []AuthenticationMethodTargetable)() { + m.includeTargets = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_response.go new file mode 100644 index 000000000..35bb127b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodConfigurationCollectionResponse +type EmailAuthenticationMethodConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmailAuthenticationMethodConfigurationable +} +// NewEmailAuthenticationMethodConfigurationCollectionResponse instantiates a new EmailAuthenticationMethodConfigurationCollectionResponse and sets the default values. +func NewEmailAuthenticationMethodConfigurationCollectionResponse()(*EmailAuthenticationMethodConfigurationCollectionResponse) { + m := &EmailAuthenticationMethodConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailAuthenticationMethodConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailAuthenticationMethodConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailAuthenticationMethodConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailAuthenticationMethodConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(EmailAuthenticationMethodConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailAuthenticationMethodConfigurationCollectionResponse) GetValue()([]EmailAuthenticationMethodConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailAuthenticationMethodConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailAuthenticationMethodConfigurationCollectionResponse) SetValue(value []EmailAuthenticationMethodConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_responseable.go new file mode 100644 index 000000000..1203cbca9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodConfigurationCollectionResponseable +type EmailAuthenticationMethodConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailAuthenticationMethodConfigurationable) + SetValue(value []EmailAuthenticationMethodConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_method_configurationable.go b/src/internal/connector/graph/betasdk/models/email_authentication_method_configurationable.go new file mode 100644 index 000000000..e478fc39b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_method_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodConfigurationable +type EmailAuthenticationMethodConfigurationable interface { + AuthenticationMethodConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowExternalIdToUseEmailOtp()(*ExternalEmailOtpState) + GetIncludeTargets()([]AuthenticationMethodTargetable) + SetAllowExternalIdToUseEmailOtp(value *ExternalEmailOtpState)() + SetIncludeTargets(value []AuthenticationMethodTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/email_authentication_methodable.go new file mode 100644 index 000000000..6c9dc180b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_authentication_methodable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailAuthenticationMethodable +type EmailAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailAddress()(*string) + SetEmailAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_certificate_type.go b/src/internal/connector/graph/betasdk/models/email_certificate_type.go new file mode 100644 index 000000000..86418e128 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_certificate_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailCertificateType int + +const ( + // Do not use a certificate as a source. + NONE_EMAILCERTIFICATETYPE EmailCertificateType = iota + // Use an certificate for certificate source. + CERTIFICATE_EMAILCERTIFICATETYPE + // Use a derived credential for certificate source. + DERIVEDCREDENTIAL_EMAILCERTIFICATETYPE +) + +func (i EmailCertificateType) String() string { + return []string{"none", "certificate", "derivedCredential"}[i] +} +func ParseEmailCertificateType(v string) (interface{}, error) { + result := NONE_EMAILCERTIFICATETYPE + switch v { + case "none": + result = NONE_EMAILCERTIFICATETYPE + case "certificate": + result = CERTIFICATE_EMAILCERTIFICATETYPE + case "derivedCredential": + result = DERIVEDCREDENTIAL_EMAILCERTIFICATETYPE + default: + return 0, errors.New("Unknown EmailCertificateType value: " + v) + } + return &result, nil +} +func SerializeEmailCertificateType(values []EmailCertificateType) []string { + 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/email_file_assessment_request.go b/src/internal/connector/graph/betasdk/models/email_file_assessment_request.go new file mode 100644 index 000000000..59dd4a6d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_file_assessment_request.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailFileAssessmentRequest +type EmailFileAssessmentRequest struct { + ThreatAssessmentRequest + // Base64 encoded .eml email file content. The file content cannot fetch back because it isn't stored. + contentData *string + // The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. + destinationRoutingReason *MailDestinationRoutingReason + // The mail recipient whose policies are used to assess the mail. + recipientEmail *string +} +// NewEmailFileAssessmentRequest instantiates a new EmailFileAssessmentRequest and sets the default values. +func NewEmailFileAssessmentRequest()(*EmailFileAssessmentRequest) { + m := &EmailFileAssessmentRequest{ + ThreatAssessmentRequest: *NewThreatAssessmentRequest(), + } + odataTypeValue := "#microsoft.graph.emailFileAssessmentRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailFileAssessmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailFileAssessmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailFileAssessmentRequest(), nil +} +// GetContentData gets the contentData property value. Base64 encoded .eml email file content. The file content cannot fetch back because it isn't stored. +func (m *EmailFileAssessmentRequest) GetContentData()(*string) { + return m.contentData +} +// GetDestinationRoutingReason gets the destinationRoutingReason property value. The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. +func (m *EmailFileAssessmentRequest) GetDestinationRoutingReason()(*MailDestinationRoutingReason) { + return m.destinationRoutingReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailFileAssessmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatAssessmentRequest.GetFieldDeserializers() + res["contentData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentData(val) + } + return nil + } + res["destinationRoutingReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMailDestinationRoutingReason) + if err != nil { + return err + } + if val != nil { + m.SetDestinationRoutingReason(val.(*MailDestinationRoutingReason)) + } + return nil + } + res["recipientEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientEmail(val) + } + return nil + } + return res +} +// GetRecipientEmail gets the recipientEmail property value. The mail recipient whose policies are used to assess the mail. +func (m *EmailFileAssessmentRequest) GetRecipientEmail()(*string) { + return m.recipientEmail +} +// Serialize serializes information the current object +func (m *EmailFileAssessmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatAssessmentRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentData", m.GetContentData()) + if err != nil { + return err + } + } + if m.GetDestinationRoutingReason() != nil { + cast := (*m.GetDestinationRoutingReason()).String() + err = writer.WriteStringValue("destinationRoutingReason", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientEmail", m.GetRecipientEmail()) + if err != nil { + return err + } + } + return nil +} +// SetContentData sets the contentData property value. Base64 encoded .eml email file content. The file content cannot fetch back because it isn't stored. +func (m *EmailFileAssessmentRequest) SetContentData(value *string)() { + m.contentData = value +} +// SetDestinationRoutingReason sets the destinationRoutingReason property value. The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. +func (m *EmailFileAssessmentRequest) SetDestinationRoutingReason(value *MailDestinationRoutingReason)() { + m.destinationRoutingReason = value +} +// SetRecipientEmail sets the recipientEmail property value. The mail recipient whose policies are used to assess the mail. +func (m *EmailFileAssessmentRequest) SetRecipientEmail(value *string)() { + m.recipientEmail = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_response.go new file mode 100644 index 000000000..cd5bdcff0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailFileAssessmentRequestCollectionResponse +type EmailFileAssessmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmailFileAssessmentRequestable +} +// NewEmailFileAssessmentRequestCollectionResponse instantiates a new EmailFileAssessmentRequestCollectionResponse and sets the default values. +func NewEmailFileAssessmentRequestCollectionResponse()(*EmailFileAssessmentRequestCollectionResponse) { + m := &EmailFileAssessmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailFileAssessmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailFileAssessmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailFileAssessmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailFileAssessmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailFileAssessmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailFileAssessmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(EmailFileAssessmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailFileAssessmentRequestCollectionResponse) GetValue()([]EmailFileAssessmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailFileAssessmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailFileAssessmentRequestCollectionResponse) SetValue(value []EmailFileAssessmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_responseable.go new file mode 100644 index 000000000..e335feb77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_file_assessment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailFileAssessmentRequestCollectionResponseable +type EmailFileAssessmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailFileAssessmentRequestable) + SetValue(value []EmailFileAssessmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_file_assessment_requestable.go b/src/internal/connector/graph/betasdk/models/email_file_assessment_requestable.go new file mode 100644 index 000000000..051eb7145 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_file_assessment_requestable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailFileAssessmentRequestable +type EmailFileAssessmentRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatAssessmentRequestable + GetContentData()(*string) + GetDestinationRoutingReason()(*MailDestinationRoutingReason) + GetRecipientEmail()(*string) + SetContentData(value *string)() + SetDestinationRoutingReason(value *MailDestinationRoutingReason)() + SetRecipientEmail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_identity.go b/src/internal/connector/graph/betasdk/models/email_identity.go new file mode 100644 index 000000000..86cb73dca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_identity.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailIdentity +type EmailIdentity struct { + Identity + // Email address of the user. + email *string +} +// NewEmailIdentity instantiates a new EmailIdentity and sets the default values. +func NewEmailIdentity()(*EmailIdentity) { + m := &EmailIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.emailIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailIdentity(), nil +} +// GetEmail gets the email property value. Email address of the user. +func (m *EmailIdentity) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EmailIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. Email address of the user. +func (m *EmailIdentity) SetEmail(value *string)() { + m.email = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_identityable.go b/src/internal/connector/graph/betasdk/models/email_identityable.go new file mode 100644 index 000000000..b5597e5a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_identityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailIdentityable +type EmailIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + SetEmail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_payload_detail.go b/src/internal/connector/graph/betasdk/models/email_payload_detail.go new file mode 100644 index 000000000..3cc0175c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_payload_detail.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailPayloadDetail +type EmailPayloadDetail struct { + PayloadDetail + // Email address of the user. + fromEmail *string + // Display name of the user. + fromName *string + // Indicates whether the sender is not from the user's organization. + isExternalSender *bool + // The subject of the email address sent to the user. + subject *string +} +// NewEmailPayloadDetail instantiates a new EmailPayloadDetail and sets the default values. +func NewEmailPayloadDetail()(*EmailPayloadDetail) { + m := &EmailPayloadDetail{ + PayloadDetail: *NewPayloadDetail(), + } + odataTypeValue := "#microsoft.graph.emailPayloadDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailPayloadDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailPayloadDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailPayloadDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailPayloadDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PayloadDetail.GetFieldDeserializers() + res["fromEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFromEmail(val) + } + return nil + } + res["fromName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFromName(val) + } + return nil + } + res["isExternalSender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsExternalSender(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetFromEmail gets the fromEmail property value. Email address of the user. +func (m *EmailPayloadDetail) GetFromEmail()(*string) { + return m.fromEmail +} +// GetFromName gets the fromName property value. Display name of the user. +func (m *EmailPayloadDetail) GetFromName()(*string) { + return m.fromName +} +// GetIsExternalSender gets the isExternalSender property value. Indicates whether the sender is not from the user's organization. +func (m *EmailPayloadDetail) GetIsExternalSender()(*bool) { + return m.isExternalSender +} +// GetSubject gets the subject property value. The subject of the email address sent to the user. +func (m *EmailPayloadDetail) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *EmailPayloadDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PayloadDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fromEmail", m.GetFromEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fromName", m.GetFromName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isExternalSender", m.GetIsExternalSender()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetFromEmail sets the fromEmail property value. Email address of the user. +func (m *EmailPayloadDetail) SetFromEmail(value *string)() { + m.fromEmail = value +} +// SetFromName sets the fromName property value. Display name of the user. +func (m *EmailPayloadDetail) SetFromName(value *string)() { + m.fromName = value +} +// SetIsExternalSender sets the isExternalSender property value. Indicates whether the sender is not from the user's organization. +func (m *EmailPayloadDetail) SetIsExternalSender(value *bool)() { + m.isExternalSender = value +} +// SetSubject sets the subject property value. The subject of the email address sent to the user. +func (m *EmailPayloadDetail) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/email_payload_detailable.go b/src/internal/connector/graph/betasdk/models/email_payload_detailable.go new file mode 100644 index 000000000..234a0ec6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_payload_detailable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailPayloadDetailable +type EmailPayloadDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PayloadDetailable + GetFromEmail()(*string) + GetFromName()(*string) + GetIsExternalSender()(*bool) + GetSubject()(*string) + SetFromEmail(value *string)() + SetFromName(value *string)() + SetIsExternalSender(value *bool)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/email_role.go b/src/internal/connector/graph/betasdk/models/email_role.go new file mode 100644 index 000000000..6625a2a83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_role.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailRole int + +const ( + UNKNOWN_EMAILROLE EmailRole = iota + SENDER_EMAILROLE + RECIPIENT_EMAILROLE + UNKNOWNFUTUREVALUE_EMAILROLE +) + +func (i EmailRole) String() string { + return []string{"unknown", "sender", "recipient", "unknownFutureValue"}[i] +} +func ParseEmailRole(v string) (interface{}, error) { + result := UNKNOWN_EMAILROLE + switch v { + case "unknown": + result = UNKNOWN_EMAILROLE + case "sender": + result = SENDER_EMAILROLE + case "recipient": + result = RECIPIENT_EMAILROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EMAILROLE + default: + return 0, errors.New("Unknown EmailRole value: " + v) + } + return &result, nil +} +func SerializeEmailRole(values []EmailRole) []string { + 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/email_sync_duration.go b/src/internal/connector/graph/betasdk/models/email_sync_duration.go new file mode 100644 index 000000000..21f0ce48d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_sync_duration.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailSyncDuration int + +const ( + // User Defined, default value, no intent. + USERDEFINED_EMAILSYNCDURATION EmailSyncDuration = iota + // Sync one day of email. + ONEDAY_EMAILSYNCDURATION + // Sync three days of email. + THREEDAYS_EMAILSYNCDURATION + // Sync one week of email. + ONEWEEK_EMAILSYNCDURATION + // Sync two weeks of email. + TWOWEEKS_EMAILSYNCDURATION + // Sync one month of email. + ONEMONTH_EMAILSYNCDURATION + // Sync an unlimited duration of email. + UNLIMITED_EMAILSYNCDURATION +) + +func (i EmailSyncDuration) String() string { + return []string{"userDefined", "oneDay", "threeDays", "oneWeek", "twoWeeks", "oneMonth", "unlimited"}[i] +} +func ParseEmailSyncDuration(v string) (interface{}, error) { + result := USERDEFINED_EMAILSYNCDURATION + switch v { + case "userDefined": + result = USERDEFINED_EMAILSYNCDURATION + case "oneDay": + result = ONEDAY_EMAILSYNCDURATION + case "threeDays": + result = THREEDAYS_EMAILSYNCDURATION + case "oneWeek": + result = ONEWEEK_EMAILSYNCDURATION + case "twoWeeks": + result = TWOWEEKS_EMAILSYNCDURATION + case "oneMonth": + result = ONEMONTH_EMAILSYNCDURATION + case "unlimited": + result = UNLIMITED_EMAILSYNCDURATION + default: + return 0, errors.New("Unknown EmailSyncDuration value: " + v) + } + return &result, nil +} +func SerializeEmailSyncDuration(values []EmailSyncDuration) []string { + 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/email_sync_schedule.go b/src/internal/connector/graph/betasdk/models/email_sync_schedule.go new file mode 100644 index 000000000..854067d24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_sync_schedule.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailSyncSchedule int + +const ( + // User Defined, default value, no intent. + USERDEFINED_EMAILSYNCSCHEDULE EmailSyncSchedule = iota + // Sync as messages arrive. + ASMESSAGESARRIVE_EMAILSYNCSCHEDULE + // Sync manually. + MANUAL_EMAILSYNCSCHEDULE + // Sync every fifteen minutes. + FIFTEENMINUTES_EMAILSYNCSCHEDULE + // Sync every thirty minutes. + THIRTYMINUTES_EMAILSYNCSCHEDULE + // Sync every sixty minutes. + SIXTYMINUTES_EMAILSYNCSCHEDULE + // Sync based on my usage. + BASEDONMYUSAGE_EMAILSYNCSCHEDULE +) + +func (i EmailSyncSchedule) String() string { + return []string{"userDefined", "asMessagesArrive", "manual", "fifteenMinutes", "thirtyMinutes", "sixtyMinutes", "basedOnMyUsage"}[i] +} +func ParseEmailSyncSchedule(v string) (interface{}, error) { + result := USERDEFINED_EMAILSYNCSCHEDULE + switch v { + case "userDefined": + result = USERDEFINED_EMAILSYNCSCHEDULE + case "asMessagesArrive": + result = ASMESSAGESARRIVE_EMAILSYNCSCHEDULE + case "manual": + result = MANUAL_EMAILSYNCSCHEDULE + case "fifteenMinutes": + result = FIFTEENMINUTES_EMAILSYNCSCHEDULE + case "thirtyMinutes": + result = THIRTYMINUTES_EMAILSYNCSCHEDULE + case "sixtyMinutes": + result = SIXTYMINUTES_EMAILSYNCSCHEDULE + case "basedOnMyUsage": + result = BASEDONMYUSAGE_EMAILSYNCSCHEDULE + default: + return 0, errors.New("Unknown EmailSyncSchedule value: " + v) + } + return &result, nil +} +func SerializeEmailSyncSchedule(values []EmailSyncSchedule) []string { + 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/email_type.go b/src/internal/connector/graph/betasdk/models/email_type.go new file mode 100644 index 000000000..29313b5d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/email_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailType int + +const ( + UNKNOWN_EMAILTYPE EmailType = iota + WORK_EMAILTYPE + PERSONAL_EMAILTYPE + MAIN_EMAILTYPE + OTHER_EMAILTYPE +) + +func (i EmailType) String() string { + return []string{"unknown", "work", "personal", "main", "other"}[i] +} +func ParseEmailType(v string) (interface{}, error) { + result := UNKNOWN_EMAILTYPE + switch v { + case "unknown": + result = UNKNOWN_EMAILTYPE + case "work": + result = WORK_EMAILTYPE + case "personal": + result = PERSONAL_EMAILTYPE + case "main": + result = MAIN_EMAILTYPE + case "other": + result = OTHER_EMAILTYPE + default: + return 0, errors.New("Unknown EmailType value: " + v) + } + return &result, nil +} +func SerializeEmailType(values []EmailType) []string { + 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/embedded_s_i_m_activation_code.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code.go new file mode 100644 index 000000000..68002ff0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCode the embedded SIM activation code as provided by the mobile operator. +type EmbeddedSIMActivationCode 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 Integrated Circuit Card Identifier (ICCID) for this embedded SIM activation code as provided by the mobile operator. + integratedCircuitCardIdentifier *string + // The MatchingIdentifier (MatchingID) as specified in the GSMA Association SGP.22 RSP Technical Specification section 4.1. + matchingIdentifier *string + // The OdataType property + odataType *string + // The fully qualified domain name of the SM-DP+ server as specified in the GSM Association SPG .22 RSP Technical Specification. + smdpPlusServerAddress *string +} +// NewEmbeddedSIMActivationCode instantiates a new embeddedSIMActivationCode and sets the default values. +func NewEmbeddedSIMActivationCode()(*EmbeddedSIMActivationCode) { + m := &EmbeddedSIMActivationCode{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEmbeddedSIMActivationCodeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCode(), 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 *EmbeddedSIMActivationCode) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["integratedCircuitCardIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntegratedCircuitCardIdentifier(val) + } + return nil + } + res["matchingIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMatchingIdentifier(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["smdpPlusServerAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSmdpPlusServerAddress(val) + } + return nil + } + return res +} +// GetIntegratedCircuitCardIdentifier gets the integratedCircuitCardIdentifier property value. The Integrated Circuit Card Identifier (ICCID) for this embedded SIM activation code as provided by the mobile operator. +func (m *EmbeddedSIMActivationCode) GetIntegratedCircuitCardIdentifier()(*string) { + return m.integratedCircuitCardIdentifier +} +// GetMatchingIdentifier gets the matchingIdentifier property value. The MatchingIdentifier (MatchingID) as specified in the GSMA Association SGP.22 RSP Technical Specification section 4.1. +func (m *EmbeddedSIMActivationCode) GetMatchingIdentifier()(*string) { + return m.matchingIdentifier +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EmbeddedSIMActivationCode) GetOdataType()(*string) { + return m.odataType +} +// GetSmdpPlusServerAddress gets the smdpPlusServerAddress property value. The fully qualified domain name of the SM-DP+ server as specified in the GSM Association SPG .22 RSP Technical Specification. +func (m *EmbeddedSIMActivationCode) GetSmdpPlusServerAddress()(*string) { + return m.smdpPlusServerAddress +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCode) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("integratedCircuitCardIdentifier", m.GetIntegratedCircuitCardIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("matchingIdentifier", m.GetMatchingIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("smdpPlusServerAddress", m.GetSmdpPlusServerAddress()) + 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 *EmbeddedSIMActivationCode) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIntegratedCircuitCardIdentifier sets the integratedCircuitCardIdentifier property value. The Integrated Circuit Card Identifier (ICCID) for this embedded SIM activation code as provided by the mobile operator. +func (m *EmbeddedSIMActivationCode) SetIntegratedCircuitCardIdentifier(value *string)() { + m.integratedCircuitCardIdentifier = value +} +// SetMatchingIdentifier sets the matchingIdentifier property value. The MatchingIdentifier (MatchingID) as specified in the GSMA Association SGP.22 RSP Technical Specification section 4.1. +func (m *EmbeddedSIMActivationCode) SetMatchingIdentifier(value *string)() { + m.matchingIdentifier = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EmbeddedSIMActivationCode) SetOdataType(value *string)() { + m.odataType = value +} +// SetSmdpPlusServerAddress sets the smdpPlusServerAddress property value. The fully qualified domain name of the SM-DP+ server as specified in the GSM Association SPG .22 RSP Technical Specification. +func (m *EmbeddedSIMActivationCode) SetSmdpPlusServerAddress(value *string)() { + m.smdpPlusServerAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_response.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_response.go new file mode 100644 index 000000000..c325f85ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodeCollectionResponse +type EmbeddedSIMActivationCodeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmbeddedSIMActivationCodeable +} +// NewEmbeddedSIMActivationCodeCollectionResponse instantiates a new EmbeddedSIMActivationCodeCollectionResponse and sets the default values. +func NewEmbeddedSIMActivationCodeCollectionResponse()(*EmbeddedSIMActivationCodeCollectionResponse) { + m := &EmbeddedSIMActivationCodeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmbeddedSIMActivationCodeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCodeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCodeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodeable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmbeddedSIMActivationCodeCollectionResponse) GetValue()([]EmbeddedSIMActivationCodeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCodeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmbeddedSIMActivationCodeCollectionResponse) SetValue(value []EmbeddedSIMActivationCodeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_responseable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_responseable.go new file mode 100644 index 000000000..df2bfd67d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodeCollectionResponseable +type EmbeddedSIMActivationCodeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmbeddedSIMActivationCodeable) + SetValue(value []EmbeddedSIMActivationCodeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool.go new file mode 100644 index 000000000..b45b4873e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool.go @@ -0,0 +1,241 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePool a pool represents a group of embedded SIM activation codes. +type EmbeddedSIMActivationCodePool struct { + Entity + // The total count of activation codes which belong to this pool. + activationCodeCount *int32 + // The activation codes which belong to this pool. This navigation property is used to post activation codes to Intune but cannot be used to read activation codes from Intune. + activationCodes []EmbeddedSIMActivationCodeable + // Navigational property to a list of targets to which this pool is assigned. + assignments []EmbeddedSIMActivationCodePoolAssignmentable + // The time the embedded SIM activation code pool was created. Generated service side. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Navigational property to a list of device states for this pool. + deviceStates []EmbeddedSIMDeviceStateable + // The admin defined name of the embedded SIM activation code pool. + displayName *string + // The time the embedded SIM activation code pool was last modified. Updated service side. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewEmbeddedSIMActivationCodePool instantiates a new embeddedSIMActivationCodePool and sets the default values. +func NewEmbeddedSIMActivationCodePool()(*EmbeddedSIMActivationCodePool) { + m := &EmbeddedSIMActivationCodePool{ + Entity: *NewEntity(), + } + return m +} +// CreateEmbeddedSIMActivationCodePoolFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodePoolFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCodePool(), nil +} +// GetActivationCodeCount gets the activationCodeCount property value. The total count of activation codes which belong to this pool. +func (m *EmbeddedSIMActivationCodePool) GetActivationCodeCount()(*int32) { + return m.activationCodeCount +} +// GetActivationCodes gets the activationCodes property value. The activation codes which belong to this pool. This navigation property is used to post activation codes to Intune but cannot be used to read activation codes from Intune. +func (m *EmbeddedSIMActivationCodePool) GetActivationCodes()([]EmbeddedSIMActivationCodeable) { + return m.activationCodes +} +// GetAssignments gets the assignments property value. Navigational property to a list of targets to which this pool is assigned. +func (m *EmbeddedSIMActivationCodePool) GetAssignments()([]EmbeddedSIMActivationCodePoolAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The time the embedded SIM activation code pool was created. Generated service side. +func (m *EmbeddedSIMActivationCodePool) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeviceStates gets the deviceStates property value. Navigational property to a list of device states for this pool. +func (m *EmbeddedSIMActivationCodePool) GetDeviceStates()([]EmbeddedSIMDeviceStateable) { + return m.deviceStates +} +// GetDisplayName gets the displayName property value. The admin defined name of the embedded SIM activation code pool. +func (m *EmbeddedSIMActivationCodePool) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCodePool) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activationCodeCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActivationCodeCount(val) + } + return nil + } + res["activationCodes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodeable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodeable) + } + m.SetActivationCodes(res) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodePoolAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodePoolAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodePoolAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMDeviceStateable) + } + m.SetDeviceStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + return res +} +// GetModifiedDateTime gets the modifiedDateTime property value. The time the embedded SIM activation code pool was last modified. Updated service side. +func (m *EmbeddedSIMActivationCodePool) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCodePool) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("activationCodeCount", m.GetActivationCodeCount()) + if err != nil { + return err + } + } + if m.GetActivationCodes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivationCodes())) + for i, v := range m.GetActivationCodes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activationCodes", cast) + if err != nil { + return err + } + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDeviceStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStates())) + for i, v := range m.GetDeviceStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetActivationCodeCount sets the activationCodeCount property value. The total count of activation codes which belong to this pool. +func (m *EmbeddedSIMActivationCodePool) SetActivationCodeCount(value *int32)() { + m.activationCodeCount = value +} +// SetActivationCodes sets the activationCodes property value. The activation codes which belong to this pool. This navigation property is used to post activation codes to Intune but cannot be used to read activation codes from Intune. +func (m *EmbeddedSIMActivationCodePool) SetActivationCodes(value []EmbeddedSIMActivationCodeable)() { + m.activationCodes = value +} +// SetAssignments sets the assignments property value. Navigational property to a list of targets to which this pool is assigned. +func (m *EmbeddedSIMActivationCodePool) SetAssignments(value []EmbeddedSIMActivationCodePoolAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The time the embedded SIM activation code pool was created. Generated service side. +func (m *EmbeddedSIMActivationCodePool) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeviceStates sets the deviceStates property value. Navigational property to a list of device states for this pool. +func (m *EmbeddedSIMActivationCodePool) SetDeviceStates(value []EmbeddedSIMDeviceStateable)() { + m.deviceStates = value +} +// SetDisplayName sets the displayName property value. The admin defined name of the embedded SIM activation code pool. +func (m *EmbeddedSIMActivationCodePool) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The time the embedded SIM activation code pool was last modified. Updated service side. +func (m *EmbeddedSIMActivationCodePool) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment.go new file mode 100644 index 000000000..315586e88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolAssignment the embedded SIM activation code pool assignment entity assigns a specific embeddedSIMActivationCodePool to an AAD device group. +type EmbeddedSIMActivationCodePoolAssignment struct { + Entity + // Base type for assignment targets. + target DeviceAndAppManagementAssignmentTargetable +} +// NewEmbeddedSIMActivationCodePoolAssignment instantiates a new embeddedSIMActivationCodePoolAssignment and sets the default values. +func NewEmbeddedSIMActivationCodePoolAssignment()(*EmbeddedSIMActivationCodePoolAssignment) { + m := &EmbeddedSIMActivationCodePoolAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateEmbeddedSIMActivationCodePoolAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodePoolAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCodePoolAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCodePoolAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. Base type for assignment targets. +func (m *EmbeddedSIMActivationCodePoolAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCodePoolAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. Base type for assignment targets. +func (m *EmbeddedSIMActivationCodePoolAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_response.go new file mode 100644 index 000000000..899ec1c18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolAssignmentCollectionResponse +type EmbeddedSIMActivationCodePoolAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmbeddedSIMActivationCodePoolAssignmentable +} +// NewEmbeddedSIMActivationCodePoolAssignmentCollectionResponse instantiates a new EmbeddedSIMActivationCodePoolAssignmentCollectionResponse and sets the default values. +func NewEmbeddedSIMActivationCodePoolAssignmentCollectionResponse()(*EmbeddedSIMActivationCodePoolAssignmentCollectionResponse) { + m := &EmbeddedSIMActivationCodePoolAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmbeddedSIMActivationCodePoolAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodePoolAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCodePoolAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCodePoolAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodePoolAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodePoolAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodePoolAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmbeddedSIMActivationCodePoolAssignmentCollectionResponse) GetValue()([]EmbeddedSIMActivationCodePoolAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCodePoolAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmbeddedSIMActivationCodePoolAssignmentCollectionResponse) SetValue(value []EmbeddedSIMActivationCodePoolAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_responseable.go new file mode 100644 index 000000000..0541cd26b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolAssignmentCollectionResponseable +type EmbeddedSIMActivationCodePoolAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmbeddedSIMActivationCodePoolAssignmentable) + SetValue(value []EmbeddedSIMActivationCodePoolAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignmentable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignmentable.go new file mode 100644 index 000000000..fb4b20938 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolAssignmentable +type EmbeddedSIMActivationCodePoolAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_response.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_response.go new file mode 100644 index 000000000..80c734aab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolCollectionResponse +type EmbeddedSIMActivationCodePoolCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmbeddedSIMActivationCodePoolable +} +// NewEmbeddedSIMActivationCodePoolCollectionResponse instantiates a new EmbeddedSIMActivationCodePoolCollectionResponse and sets the default values. +func NewEmbeddedSIMActivationCodePoolCollectionResponse()(*EmbeddedSIMActivationCodePoolCollectionResponse) { + m := &EmbeddedSIMActivationCodePoolCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmbeddedSIMActivationCodePoolCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMActivationCodePoolCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMActivationCodePoolCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMActivationCodePoolCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMActivationCodePoolFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMActivationCodePoolable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMActivationCodePoolable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmbeddedSIMActivationCodePoolCollectionResponse) GetValue()([]EmbeddedSIMActivationCodePoolable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmbeddedSIMActivationCodePoolCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmbeddedSIMActivationCodePoolCollectionResponse) SetValue(value []EmbeddedSIMActivationCodePoolable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_responseable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_responseable.go new file mode 100644 index 000000000..d9d3bf75d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_pool_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolCollectionResponseable +type EmbeddedSIMActivationCodePoolCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmbeddedSIMActivationCodePoolable) + SetValue(value []EmbeddedSIMActivationCodePoolable)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_poolable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_poolable.go new file mode 100644 index 000000000..eabd59c68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_code_poolable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodePoolable +type EmbeddedSIMActivationCodePoolable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivationCodeCount()(*int32) + GetActivationCodes()([]EmbeddedSIMActivationCodeable) + GetAssignments()([]EmbeddedSIMActivationCodePoolAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceStates()([]EmbeddedSIMDeviceStateable) + GetDisplayName()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetActivationCodeCount(value *int32)() + SetActivationCodes(value []EmbeddedSIMActivationCodeable)() + SetAssignments(value []EmbeddedSIMActivationCodePoolAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceStates(value []EmbeddedSIMDeviceStateable)() + SetDisplayName(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_codeable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_codeable.go new file mode 100644 index 000000000..8f55e9749 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_activation_codeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMActivationCodeable +type EmbeddedSIMActivationCodeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntegratedCircuitCardIdentifier()(*string) + GetMatchingIdentifier()(*string) + GetOdataType()(*string) + GetSmdpPlusServerAddress()(*string) + SetIntegratedCircuitCardIdentifier(value *string)() + SetMatchingIdentifier(value *string)() + SetOdataType(value *string)() + SetSmdpPlusServerAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state.go new file mode 100644 index 000000000..f44950795 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMDeviceState describes the embedded SIM activation code deployment state in relation to a device. +type EmbeddedSIMDeviceState struct { + Entity + // The time the embedded SIM device status was created. Generated service side. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name to which the subscription was provisioned e.g. DESKTOP-JOE + deviceName *string + // The time the embedded SIM device last checked in. Updated service side. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time the embedded SIM device status was last modified. Updated service side. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Describes the various states for an embedded SIM activation code. + state *EmbeddedSIMDeviceStateValue + // String description of the provisioning state. + stateDetails *string + // The Universal Integrated Circuit Card Identifier (UICCID) identifying the hardware onto which a profile is to be deployed. + universalIntegratedCircuitCardIdentifier *string + // Username which the subscription was provisioned to e.g. joe@contoso.com + userName *string +} +// NewEmbeddedSIMDeviceState instantiates a new embeddedSIMDeviceState and sets the default values. +func NewEmbeddedSIMDeviceState()(*EmbeddedSIMDeviceState) { + m := &EmbeddedSIMDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateEmbeddedSIMDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMDeviceState(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The time the embedded SIM device status was created. Generated service side. +func (m *EmbeddedSIMDeviceState) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeviceName gets the deviceName property value. Device name to which the subscription was provisioned e.g. DESKTOP-JOE +func (m *EmbeddedSIMDeviceState) GetDeviceName()(*string) { + return m.deviceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmbeddedSIMDeviceStateValue) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*EmbeddedSIMDeviceStateValue)) + } + return nil + } + res["stateDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStateDetails(val) + } + return nil + } + res["universalIntegratedCircuitCardIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUniversalIntegratedCircuitCardIdentifier(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The time the embedded SIM device last checked in. Updated service side. +func (m *EmbeddedSIMDeviceState) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetModifiedDateTime gets the modifiedDateTime property value. The time the embedded SIM device status was last modified. Updated service side. +func (m *EmbeddedSIMDeviceState) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetState gets the state property value. Describes the various states for an embedded SIM activation code. +func (m *EmbeddedSIMDeviceState) GetState()(*EmbeddedSIMDeviceStateValue) { + return m.state +} +// GetStateDetails gets the stateDetails property value. String description of the provisioning state. +func (m *EmbeddedSIMDeviceState) GetStateDetails()(*string) { + return m.stateDetails +} +// GetUniversalIntegratedCircuitCardIdentifier gets the universalIntegratedCircuitCardIdentifier property value. The Universal Integrated Circuit Card Identifier (UICCID) identifying the hardware onto which a profile is to be deployed. +func (m *EmbeddedSIMDeviceState) GetUniversalIntegratedCircuitCardIdentifier()(*string) { + return m.universalIntegratedCircuitCardIdentifier +} +// GetUserName gets the userName property value. Username which the subscription was provisioned to e.g. joe@contoso.com +func (m *EmbeddedSIMDeviceState) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *EmbeddedSIMDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("stateDetails", m.GetStateDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("universalIntegratedCircuitCardIdentifier", m.GetUniversalIntegratedCircuitCardIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The time the embedded SIM device status was created. Generated service side. +func (m *EmbeddedSIMDeviceState) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeviceName sets the deviceName property value. Device name to which the subscription was provisioned e.g. DESKTOP-JOE +func (m *EmbeddedSIMDeviceState) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The time the embedded SIM device last checked in. Updated service side. +func (m *EmbeddedSIMDeviceState) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The time the embedded SIM device status was last modified. Updated service side. +func (m *EmbeddedSIMDeviceState) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetState sets the state property value. Describes the various states for an embedded SIM activation code. +func (m *EmbeddedSIMDeviceState) SetState(value *EmbeddedSIMDeviceStateValue)() { + m.state = value +} +// SetStateDetails sets the stateDetails property value. String description of the provisioning state. +func (m *EmbeddedSIMDeviceState) SetStateDetails(value *string)() { + m.stateDetails = value +} +// SetUniversalIntegratedCircuitCardIdentifier sets the universalIntegratedCircuitCardIdentifier property value. The Universal Integrated Circuit Card Identifier (UICCID) identifying the hardware onto which a profile is to be deployed. +func (m *EmbeddedSIMDeviceState) SetUniversalIntegratedCircuitCardIdentifier(value *string)() { + m.universalIntegratedCircuitCardIdentifier = value +} +// SetUserName sets the userName property value. Username which the subscription was provisioned to e.g. joe@contoso.com +func (m *EmbeddedSIMDeviceState) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_response.go new file mode 100644 index 000000000..c959616b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMDeviceStateCollectionResponse +type EmbeddedSIMDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EmbeddedSIMDeviceStateable +} +// NewEmbeddedSIMDeviceStateCollectionResponse instantiates a new EmbeddedSIMDeviceStateCollectionResponse and sets the default values. +func NewEmbeddedSIMDeviceStateCollectionResponse()(*EmbeddedSIMDeviceStateCollectionResponse) { + m := &EmbeddedSIMDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmbeddedSIMDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmbeddedSIMDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmbeddedSIMDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmbeddedSIMDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmbeddedSIMDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmbeddedSIMDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(EmbeddedSIMDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmbeddedSIMDeviceStateCollectionResponse) GetValue()([]EmbeddedSIMDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmbeddedSIMDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmbeddedSIMDeviceStateCollectionResponse) SetValue(value []EmbeddedSIMDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_responseable.go new file mode 100644 index 000000000..9a3308e21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMDeviceStateCollectionResponseable +type EmbeddedSIMDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmbeddedSIMDeviceStateable) + SetValue(value []EmbeddedSIMDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_value.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_value.go new file mode 100644 index 000000000..49c1234eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_state_value.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmbeddedSIMDeviceStateValue int + +const ( + // Designates that the embedded SIM activation code is free and available to be assigned to a device. + NOTEVALUATED_EMBEDDEDSIMDEVICESTATEVALUE EmbeddedSIMDeviceStateValue = iota + // Designates that Intune Service failed to deliver this profile to a device. + FAILED_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that the embedded SIM activation code has been assigned to a device and the device is installing the token. + INSTALLING_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that the embedded SIM activation code has been successfully installed on the target device. + INSTALLED_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that Intune Service is trying to delete the profile from the device. + DELETING_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that there is error with this profile. + ERROR_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that the profile is deleted from the device. + DELETED_EMBEDDEDSIMDEVICESTATEVALUE + // Designates that the profile is removed from the device by the user + REMOVEDBYUSER_EMBEDDEDSIMDEVICESTATEVALUE +) + +func (i EmbeddedSIMDeviceStateValue) String() string { + return []string{"notEvaluated", "failed", "installing", "installed", "deleting", "error", "deleted", "removedByUser"}[i] +} +func ParseEmbeddedSIMDeviceStateValue(v string) (interface{}, error) { + result := NOTEVALUATED_EMBEDDEDSIMDEVICESTATEVALUE + switch v { + case "notEvaluated": + result = NOTEVALUATED_EMBEDDEDSIMDEVICESTATEVALUE + case "failed": + result = FAILED_EMBEDDEDSIMDEVICESTATEVALUE + case "installing": + result = INSTALLING_EMBEDDEDSIMDEVICESTATEVALUE + case "installed": + result = INSTALLED_EMBEDDEDSIMDEVICESTATEVALUE + case "deleting": + result = DELETING_EMBEDDEDSIMDEVICESTATEVALUE + case "error": + result = ERROR_EMBEDDEDSIMDEVICESTATEVALUE + case "deleted": + result = DELETED_EMBEDDEDSIMDEVICESTATEVALUE + case "removedByUser": + result = REMOVEDBYUSER_EMBEDDEDSIMDEVICESTATEVALUE + default: + return 0, errors.New("Unknown EmbeddedSIMDeviceStateValue value: " + v) + } + return &result, nil +} +func SerializeEmbeddedSIMDeviceStateValue(values []EmbeddedSIMDeviceStateValue) []string { + 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/embedded_s_i_m_device_stateable.go b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_stateable.go new file mode 100644 index 000000000..ef882a902 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/embedded_s_i_m_device_stateable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmbeddedSIMDeviceStateable +type EmbeddedSIMDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceName()(*string) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*EmbeddedSIMDeviceStateValue) + GetStateDetails()(*string) + GetUniversalIntegratedCircuitCardIdentifier()(*string) + GetUserName()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceName(value *string)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *EmbeddedSIMDeviceStateValue)() + SetStateDetails(value *string)() + SetUniversalIntegratedCircuitCardIdentifier(value *string)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/employee.go b/src/internal/connector/graph/betasdk/models/employee.go new file mode 100644 index 000000000..7696fee06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employee.go @@ -0,0 +1,511 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Employee provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Employee struct { + Entity + // The address property + address PostalAddressTypeable + // The birthDate property + birthDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The displayName property + displayName *string + // The email property + email *string + // The employmentDate property + employmentDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The givenName property + givenName *string + // The jobTitle property + jobTitle *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The middleName property + middleName *string + // The mobilePhone property + mobilePhone *string + // The number property + number *string + // The personalEmail property + personalEmail *string + // The phoneNumber property + phoneNumber *string + // The picture property + picture []Pictureable + // The statisticsGroupCode property + statisticsGroupCode *string + // The status property + status *string + // The surname property + surname *string + // The terminationDate property + terminationDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewEmployee instantiates a new employee and sets the default values. +func NewEmployee()(*Employee) { + m := &Employee{ + Entity: *NewEntity(), + } + return m +} +// CreateEmployeeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmployeeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmployee(), nil +} +// GetAddress gets the address property value. The address property +func (m *Employee) GetAddress()(PostalAddressTypeable) { + return m.address +} +// GetBirthDate gets the birthDate property value. The birthDate property +func (m *Employee) GetBirthDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.birthDate +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Employee) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email property +func (m *Employee) GetEmail()(*string) { + return m.email +} +// GetEmploymentDate gets the employmentDate property value. The employmentDate property +func (m *Employee) GetEmploymentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.employmentDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Employee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["birthDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetBirthDate(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["employmentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEmploymentDate(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["jobTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobTitle(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["middleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddleName(val) + } + return nil + } + res["mobilePhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMobilePhone(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["personalEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonalEmail(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["picture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePictureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pictureable, len(val)) + for i, v := range val { + res[i] = v.(Pictureable) + } + m.SetPicture(res) + } + return nil + } + res["statisticsGroupCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatisticsGroupCode(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["terminationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetTerminationDate(val) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. The givenName property +func (m *Employee) GetGivenName()(*string) { + return m.givenName +} +// GetJobTitle gets the jobTitle property value. The jobTitle property +func (m *Employee) GetJobTitle()(*string) { + return m.jobTitle +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Employee) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMiddleName gets the middleName property value. The middleName property +func (m *Employee) GetMiddleName()(*string) { + return m.middleName +} +// GetMobilePhone gets the mobilePhone property value. The mobilePhone property +func (m *Employee) GetMobilePhone()(*string) { + return m.mobilePhone +} +// GetNumber gets the number property value. The number property +func (m *Employee) GetNumber()(*string) { + return m.number +} +// GetPersonalEmail gets the personalEmail property value. The personalEmail property +func (m *Employee) GetPersonalEmail()(*string) { + return m.personalEmail +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *Employee) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPicture gets the picture property value. The picture property +func (m *Employee) GetPicture()([]Pictureable) { + return m.picture +} +// GetStatisticsGroupCode gets the statisticsGroupCode property value. The statisticsGroupCode property +func (m *Employee) GetStatisticsGroupCode()(*string) { + return m.statisticsGroupCode +} +// GetStatus gets the status property value. The status property +func (m *Employee) GetStatus()(*string) { + return m.status +} +// GetSurname gets the surname property value. The surname property +func (m *Employee) GetSurname()(*string) { + return m.surname +} +// GetTerminationDate gets the terminationDate property value. The terminationDate property +func (m *Employee) GetTerminationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.terminationDate +} +// Serialize serializes information the current object +func (m *Employee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("birthDate", m.GetBirthDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("employmentDate", m.GetEmploymentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("jobTitle", m.GetJobTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("middleName", m.GetMiddleName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mobilePhone", m.GetMobilePhone()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("personalEmail", m.GetPersonalEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + if m.GetPicture() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPicture())) + for i, v := range m.GetPicture() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("picture", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("statisticsGroupCode", m.GetStatisticsGroupCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("terminationDate", m.GetTerminationDate()) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The address property +func (m *Employee) SetAddress(value PostalAddressTypeable)() { + m.address = value +} +// SetBirthDate sets the birthDate property value. The birthDate property +func (m *Employee) SetBirthDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.birthDate = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Employee) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email property +func (m *Employee) SetEmail(value *string)() { + m.email = value +} +// SetEmploymentDate sets the employmentDate property value. The employmentDate property +func (m *Employee) SetEmploymentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.employmentDate = value +} +// SetGivenName sets the givenName property value. The givenName property +func (m *Employee) SetGivenName(value *string)() { + m.givenName = value +} +// SetJobTitle sets the jobTitle property value. The jobTitle property +func (m *Employee) SetJobTitle(value *string)() { + m.jobTitle = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Employee) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMiddleName sets the middleName property value. The middleName property +func (m *Employee) SetMiddleName(value *string)() { + m.middleName = value +} +// SetMobilePhone sets the mobilePhone property value. The mobilePhone property +func (m *Employee) SetMobilePhone(value *string)() { + m.mobilePhone = value +} +// SetNumber sets the number property value. The number property +func (m *Employee) SetNumber(value *string)() { + m.number = value +} +// SetPersonalEmail sets the personalEmail property value. The personalEmail property +func (m *Employee) SetPersonalEmail(value *string)() { + m.personalEmail = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *Employee) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPicture sets the picture property value. The picture property +func (m *Employee) SetPicture(value []Pictureable)() { + m.picture = value +} +// SetStatisticsGroupCode sets the statisticsGroupCode property value. The statisticsGroupCode property +func (m *Employee) SetStatisticsGroupCode(value *string)() { + m.statisticsGroupCode = value +} +// SetStatus sets the status property value. The status property +func (m *Employee) SetStatus(value *string)() { + m.status = value +} +// SetSurname sets the surname property value. The surname property +func (m *Employee) SetSurname(value *string)() { + m.surname = value +} +// SetTerminationDate sets the terminationDate property value. The terminationDate property +func (m *Employee) SetTerminationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.terminationDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/employee_collection_response.go b/src/internal/connector/graph/betasdk/models/employee_collection_response.go new file mode 100644 index 000000000..492ab2090 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employee_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmployeeCollectionResponse +type EmployeeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Employeeable +} +// NewEmployeeCollectionResponse instantiates a new EmployeeCollectionResponse and sets the default values. +func NewEmployeeCollectionResponse()(*EmployeeCollectionResponse) { + m := &EmployeeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmployeeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmployeeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmployeeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmployeeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmployeeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Employeeable, len(val)) + for i, v := range val { + res[i] = v.(Employeeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmployeeCollectionResponse) GetValue()([]Employeeable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmployeeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmployeeCollectionResponse) SetValue(value []Employeeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/employee_collection_responseable.go b/src/internal/connector/graph/betasdk/models/employee_collection_responseable.go new file mode 100644 index 000000000..8b25224bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employee_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmployeeCollectionResponseable +type EmployeeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Employeeable) + SetValue(value []Employeeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/employee_org_data.go b/src/internal/connector/graph/betasdk/models/employee_org_data.go new file mode 100644 index 000000000..04cbf512a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employee_org_data.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmployeeOrgData +type EmployeeOrgData 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 cost center associated with the user. Returned only on $select. Supports $filter. + costCenter *string + // The name of the division in which the user works. Returned only on $select. Supports $filter. + division *string + // The OdataType property + odataType *string +} +// NewEmployeeOrgData instantiates a new employeeOrgData and sets the default values. +func NewEmployeeOrgData()(*EmployeeOrgData) { + m := &EmployeeOrgData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEmployeeOrgDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmployeeOrgDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmployeeOrgData(), 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 *EmployeeOrgData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCostCenter gets the costCenter property value. The cost center associated with the user. Returned only on $select. Supports $filter. +func (m *EmployeeOrgData) GetCostCenter()(*string) { + return m.costCenter +} +// GetDivision gets the division property value. The name of the division in which the user works. Returned only on $select. Supports $filter. +func (m *EmployeeOrgData) GetDivision()(*string) { + return m.division +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmployeeOrgData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["costCenter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCostCenter(val) + } + return nil + } + res["division"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDivision(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EmployeeOrgData) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EmployeeOrgData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("costCenter", m.GetCostCenter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("division", m.GetDivision()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EmployeeOrgData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCostCenter sets the costCenter property value. The cost center associated with the user. Returned only on $select. Supports $filter. +func (m *EmployeeOrgData) SetCostCenter(value *string)() { + m.costCenter = value +} +// SetDivision sets the division property value. The name of the division in which the user works. Returned only on $select. Supports $filter. +func (m *EmployeeOrgData) SetDivision(value *string)() { + m.division = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EmployeeOrgData) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/employee_org_dataable.go b/src/internal/connector/graph/betasdk/models/employee_org_dataable.go new file mode 100644 index 000000000..8f241e2eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employee_org_dataable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmployeeOrgDataable +type EmployeeOrgDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCostCenter()(*string) + GetDivision()(*string) + GetOdataType()(*string) + SetCostCenter(value *string)() + SetDivision(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/employeeable.go b/src/internal/connector/graph/betasdk/models/employeeable.go new file mode 100644 index 000000000..916b022ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/employeeable.go @@ -0,0 +1,48 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Employeeable +type Employeeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PostalAddressTypeable) + GetBirthDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetDisplayName()(*string) + GetEmail()(*string) + GetEmploymentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetGivenName()(*string) + GetJobTitle()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMiddleName()(*string) + GetMobilePhone()(*string) + GetNumber()(*string) + GetPersonalEmail()(*string) + GetPhoneNumber()(*string) + GetPicture()([]Pictureable) + GetStatisticsGroupCode()(*string) + GetStatus()(*string) + GetSurname()(*string) + GetTerminationDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAddress(value PostalAddressTypeable)() + SetBirthDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetDisplayName(value *string)() + SetEmail(value *string)() + SetEmploymentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetGivenName(value *string)() + SetJobTitle(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMiddleName(value *string)() + SetMobilePhone(value *string)() + SetNumber(value *string)() + SetPersonalEmail(value *string)() + SetPhoneNumber(value *string)() + SetPicture(value []Pictureable)() + SetStatisticsGroupCode(value *string)() + SetStatus(value *string)() + SetSurname(value *string)() + SetTerminationDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/enablement.go b/src/internal/connector/graph/betasdk/models/enablement.go new file mode 100644 index 000000000..428d8acd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enablement.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Enablement int + +const ( + // Device default value, no intent. + NOTCONFIGURED_ENABLEMENT Enablement = iota + // Enables the setting on the device. + ENABLED_ENABLEMENT + // Disables the setting on the device. + DISABLED_ENABLEMENT +) + +func (i Enablement) String() string { + return []string{"notConfigured", "enabled", "disabled"}[i] +} +func ParseEnablement(v string) (interface{}, error) { + result := NOTCONFIGURED_ENABLEMENT + switch v { + case "notConfigured": + result = NOTCONFIGURED_ENABLEMENT + case "enabled": + result = ENABLED_ENABLEMENT + case "disabled": + result = DISABLED_ENABLEMENT + default: + return 0, errors.New("Unknown Enablement value: " + v) + } + return &result, nil +} +func SerializeEnablement(values []Enablement) []string { + 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/encrypt_content.go b/src/internal/connector/graph/betasdk/models/encrypt_content.go new file mode 100644 index 000000000..296fa3c24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_content.go @@ -0,0 +1,83 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptContent +type EncryptContent struct { + LabelActionBase + // The encryptWith property + encryptWith *EncryptWith +} +// NewEncryptContent instantiates a new EncryptContent and sets the default values. +func NewEncryptContent()(*EncryptContent) { + m := &EncryptContent{ + LabelActionBase: *NewLabelActionBase(), + } + odataTypeValue := "#microsoft.graph.encryptContent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEncryptContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEncryptContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.encryptWithTemplate": + return NewEncryptWithTemplate(), nil + case "#microsoft.graph.encryptWithUserDefinedRights": + return NewEncryptWithUserDefinedRights(), nil + } + } + } + } + return NewEncryptContent(), nil +} +// GetEncryptWith gets the encryptWith property value. The encryptWith property +func (m *EncryptContent) GetEncryptWith()(*EncryptWith) { + return m.encryptWith +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EncryptContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LabelActionBase.GetFieldDeserializers() + res["encryptWith"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEncryptWith) + if err != nil { + return err + } + if val != nil { + m.SetEncryptWith(val.(*EncryptWith)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EncryptContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LabelActionBase.Serialize(writer) + if err != nil { + return err + } + if m.GetEncryptWith() != nil { + cast := (*m.GetEncryptWith()).String() + err = writer.WriteStringValue("encryptWith", &cast) + if err != nil { + return err + } + } + return nil +} +// SetEncryptWith sets the encryptWith property value. The encryptWith property +func (m *EncryptContent) SetEncryptWith(value *EncryptWith)() { + m.encryptWith = value +} diff --git a/src/internal/connector/graph/betasdk/models/encrypt_contentable.go b/src/internal/connector/graph/betasdk/models/encrypt_contentable.go new file mode 100644 index 000000000..d50544dca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_contentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptContentable +type EncryptContentable interface { + LabelActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncryptWith()(*EncryptWith) + SetEncryptWith(value *EncryptWith)() +} diff --git a/src/internal/connector/graph/betasdk/models/encrypt_with.go b/src/internal/connector/graph/betasdk/models/encrypt_with.go new file mode 100644 index 000000000..57fc0fb88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_with.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EncryptWith int + +const ( + TEMPLATE_ENCRYPTWITH EncryptWith = iota + USERDEFINEDRIGHTS_ENCRYPTWITH +) + +func (i EncryptWith) String() string { + return []string{"template", "userDefinedRights"}[i] +} +func ParseEncryptWith(v string) (interface{}, error) { + result := TEMPLATE_ENCRYPTWITH + switch v { + case "template": + result = TEMPLATE_ENCRYPTWITH + case "userDefinedRights": + result = USERDEFINEDRIGHTS_ENCRYPTWITH + default: + return 0, errors.New("Unknown EncryptWith value: " + v) + } + return &result, nil +} +func SerializeEncryptWith(values []EncryptWith) []string { + 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/encrypt_with_template.go b/src/internal/connector/graph/betasdk/models/encrypt_with_template.go new file mode 100644 index 000000000..910fbac27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_with_template.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptWithTemplate +type EncryptWithTemplate struct { + EncryptContent + // The availableForEncryption property + availableForEncryption *bool + // The templateId property + templateId *string +} +// NewEncryptWithTemplate instantiates a new EncryptWithTemplate and sets the default values. +func NewEncryptWithTemplate()(*EncryptWithTemplate) { + m := &EncryptWithTemplate{ + EncryptContent: *NewEncryptContent(), + } + odataTypeValue := "#microsoft.graph.encryptWithTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEncryptWithTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEncryptWithTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEncryptWithTemplate(), nil +} +// GetAvailableForEncryption gets the availableForEncryption property value. The availableForEncryption property +func (m *EncryptWithTemplate) GetAvailableForEncryption()(*bool) { + return m.availableForEncryption +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EncryptWithTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EncryptContent.GetFieldDeserializers() + res["availableForEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailableForEncryption(val) + } + return nil + } + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetTemplateId gets the templateId property value. The templateId property +func (m *EncryptWithTemplate) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *EncryptWithTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EncryptContent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("availableForEncryption", m.GetAvailableForEncryption()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetAvailableForEncryption sets the availableForEncryption property value. The availableForEncryption property +func (m *EncryptWithTemplate) SetAvailableForEncryption(value *bool)() { + m.availableForEncryption = value +} +// SetTemplateId sets the templateId property value. The templateId property +func (m *EncryptWithTemplate) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/encrypt_with_templateable.go b/src/internal/connector/graph/betasdk/models/encrypt_with_templateable.go new file mode 100644 index 000000000..7771c7330 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_with_templateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptWithTemplateable +type EncryptWithTemplateable interface { + EncryptContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvailableForEncryption()(*bool) + GetTemplateId()(*string) + SetAvailableForEncryption(value *bool)() + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rights.go b/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rights.go new file mode 100644 index 000000000..8716371b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rights.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptWithUserDefinedRights +type EncryptWithUserDefinedRights struct { + EncryptContent + // The allowAdHocPermissions property + allowAdHocPermissions *bool + // The allowMailForwarding property + allowMailForwarding *bool + // The decryptionRightsManagementTemplateId property + decryptionRightsManagementTemplateId *string +} +// NewEncryptWithUserDefinedRights instantiates a new EncryptWithUserDefinedRights and sets the default values. +func NewEncryptWithUserDefinedRights()(*EncryptWithUserDefinedRights) { + m := &EncryptWithUserDefinedRights{ + EncryptContent: *NewEncryptContent(), + } + odataTypeValue := "#microsoft.graph.encryptWithUserDefinedRights"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEncryptWithUserDefinedRightsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEncryptWithUserDefinedRightsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEncryptWithUserDefinedRights(), nil +} +// GetAllowAdHocPermissions gets the allowAdHocPermissions property value. The allowAdHocPermissions property +func (m *EncryptWithUserDefinedRights) GetAllowAdHocPermissions()(*bool) { + return m.allowAdHocPermissions +} +// GetAllowMailForwarding gets the allowMailForwarding property value. The allowMailForwarding property +func (m *EncryptWithUserDefinedRights) GetAllowMailForwarding()(*bool) { + return m.allowMailForwarding +} +// GetDecryptionRightsManagementTemplateId gets the decryptionRightsManagementTemplateId property value. The decryptionRightsManagementTemplateId property +func (m *EncryptWithUserDefinedRights) GetDecryptionRightsManagementTemplateId()(*string) { + return m.decryptionRightsManagementTemplateId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EncryptWithUserDefinedRights) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EncryptContent.GetFieldDeserializers() + res["allowAdHocPermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAdHocPermissions(val) + } + return nil + } + res["allowMailForwarding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMailForwarding(val) + } + return nil + } + res["decryptionRightsManagementTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDecryptionRightsManagementTemplateId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EncryptWithUserDefinedRights) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EncryptContent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowAdHocPermissions", m.GetAllowAdHocPermissions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowMailForwarding", m.GetAllowMailForwarding()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("decryptionRightsManagementTemplateId", m.GetDecryptionRightsManagementTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAdHocPermissions sets the allowAdHocPermissions property value. The allowAdHocPermissions property +func (m *EncryptWithUserDefinedRights) SetAllowAdHocPermissions(value *bool)() { + m.allowAdHocPermissions = value +} +// SetAllowMailForwarding sets the allowMailForwarding property value. The allowMailForwarding property +func (m *EncryptWithUserDefinedRights) SetAllowMailForwarding(value *bool)() { + m.allowMailForwarding = value +} +// SetDecryptionRightsManagementTemplateId sets the decryptionRightsManagementTemplateId property value. The decryptionRightsManagementTemplateId property +func (m *EncryptWithUserDefinedRights) SetDecryptionRightsManagementTemplateId(value *string)() { + m.decryptionRightsManagementTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rightsable.go b/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rightsable.go new file mode 100644 index 000000000..9689e50e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encrypt_with_user_defined_rightsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptWithUserDefinedRightsable +type EncryptWithUserDefinedRightsable interface { + EncryptContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAdHocPermissions()(*bool) + GetAllowMailForwarding()(*bool) + GetDecryptionRightsManagementTemplateId()(*string) + SetAllowAdHocPermissions(value *bool)() + SetAllowMailForwarding(value *bool)() + SetDecryptionRightsManagementTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/encryption_readiness_state.go b/src/internal/connector/graph/betasdk/models/encryption_readiness_state.go new file mode 100644 index 000000000..caa619bee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_readiness_state.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EncryptionReadinessState int + +const ( + // Not ready + NOTREADY_ENCRYPTIONREADINESSSTATE EncryptionReadinessState = iota + // Ready + READY_ENCRYPTIONREADINESSSTATE +) + +func (i EncryptionReadinessState) String() string { + return []string{"notReady", "ready"}[i] +} +func ParseEncryptionReadinessState(v string) (interface{}, error) { + result := NOTREADY_ENCRYPTIONREADINESSSTATE + switch v { + case "notReady": + result = NOTREADY_ENCRYPTIONREADINESSSTATE + case "ready": + result = READY_ENCRYPTIONREADINESSSTATE + default: + return 0, errors.New("Unknown EncryptionReadinessState value: " + v) + } + return &result, nil +} +func SerializeEncryptionReadinessState(values []EncryptionReadinessState) []string { + 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/encryption_report_policy_details.go b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details.go new file mode 100644 index 000000000..401363324 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptionReportPolicyDetails policy Details for Encryption Report +type EncryptionReportPolicyDetails 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 OdataType property + odataType *string + // Policy Id for Encryption Report + policyId *string + // Policy Name for Encryption Report + policyName *string +} +// NewEncryptionReportPolicyDetails instantiates a new encryptionReportPolicyDetails and sets the default values. +func NewEncryptionReportPolicyDetails()(*EncryptionReportPolicyDetails) { + m := &EncryptionReportPolicyDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEncryptionReportPolicyDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEncryptionReportPolicyDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEncryptionReportPolicyDetails(), 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 *EncryptionReportPolicyDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EncryptionReportPolicyDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["policyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyId(val) + } + return nil + } + res["policyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EncryptionReportPolicyDetails) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyId gets the policyId property value. Policy Id for Encryption Report +func (m *EncryptionReportPolicyDetails) GetPolicyId()(*string) { + return m.policyId +} +// GetPolicyName gets the policyName property value. Policy Name for Encryption Report +func (m *EncryptionReportPolicyDetails) GetPolicyName()(*string) { + return m.policyName +} +// Serialize serializes information the current object +func (m *EncryptionReportPolicyDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyId", m.GetPolicyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyName", m.GetPolicyName()) + 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 *EncryptionReportPolicyDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EncryptionReportPolicyDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyId sets the policyId property value. Policy Id for Encryption Report +func (m *EncryptionReportPolicyDetails) SetPolicyId(value *string)() { + m.policyId = value +} +// SetPolicyName sets the policyName property value. Policy Name for Encryption Report +func (m *EncryptionReportPolicyDetails) SetPolicyName(value *string)() { + m.policyName = value +} diff --git a/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_response.go b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_response.go new file mode 100644 index 000000000..751a369b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptionReportPolicyDetailsCollectionResponse +type EncryptionReportPolicyDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EncryptionReportPolicyDetailsable +} +// NewEncryptionReportPolicyDetailsCollectionResponse instantiates a new EncryptionReportPolicyDetailsCollectionResponse and sets the default values. +func NewEncryptionReportPolicyDetailsCollectionResponse()(*EncryptionReportPolicyDetailsCollectionResponse) { + m := &EncryptionReportPolicyDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEncryptionReportPolicyDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEncryptionReportPolicyDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEncryptionReportPolicyDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EncryptionReportPolicyDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEncryptionReportPolicyDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EncryptionReportPolicyDetailsable, len(val)) + for i, v := range val { + res[i] = v.(EncryptionReportPolicyDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EncryptionReportPolicyDetailsCollectionResponse) GetValue()([]EncryptionReportPolicyDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *EncryptionReportPolicyDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EncryptionReportPolicyDetailsCollectionResponse) SetValue(value []EncryptionReportPolicyDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_responseable.go new file mode 100644 index 000000000..b0152c961 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_report_policy_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptionReportPolicyDetailsCollectionResponseable +type EncryptionReportPolicyDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EncryptionReportPolicyDetailsable) + SetValue(value []EncryptionReportPolicyDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/encryption_report_policy_detailsable.go b/src/internal/connector/graph/betasdk/models/encryption_report_policy_detailsable.go new file mode 100644 index 000000000..4afa76a4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_report_policy_detailsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EncryptionReportPolicyDetailsable +type EncryptionReportPolicyDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPolicyId()(*string) + GetPolicyName()(*string) + SetOdataType(value *string)() + SetPolicyId(value *string)() + SetPolicyName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/encryption_state.go b/src/internal/connector/graph/betasdk/models/encryption_state.go new file mode 100644 index 000000000..9a3eea2db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/encryption_state.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EncryptionState int + +const ( + // Not encrypted + NOTENCRYPTED_ENCRYPTIONSTATE EncryptionState = iota + // Encrypted + ENCRYPTED_ENCRYPTIONSTATE +) + +func (i EncryptionState) String() string { + return []string{"notEncrypted", "encrypted"}[i] +} +func ParseEncryptionState(v string) (interface{}, error) { + result := NOTENCRYPTED_ENCRYPTIONSTATE + switch v { + case "notEncrypted": + result = NOTENCRYPTED_ENCRYPTIONSTATE + case "encrypted": + result = ENCRYPTED_ENCRYPTIONSTATE + default: + return 0, errors.New("Unknown EncryptionState value: " + v) + } + return &result, nil +} +func SerializeEncryptionState(values []EncryptionState) []string { + 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/endpoint.go b/src/internal/connector/graph/betasdk/models/endpoint.go new file mode 100644 index 000000000..fcd5b1201 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Endpoint provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Endpoint struct { + DirectoryObject + // Describes the capability that is associated with this resource. (e.g. Messages, Conversations, etc.) Not nullable. Read-only. + capability *string + // Application id of the publishing underlying service. Not nullable. Read-only. + providerId *string + // Name of the publishing underlying service. Read-only. + providerName *string + // For Microsoft 365 groups, this is set to a well-known name for the resource (e.g. Yammer.FeedURL etc.). Not nullable. Read-only. + providerResourceId *string + // URL of the published resource. Not nullable. Read-only. + uri *string +} +// NewEndpoint instantiates a new endpoint and sets the default values. +func NewEndpoint()(*Endpoint) { + m := &Endpoint{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.endpoint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEndpoint(), nil +} +// GetCapability gets the capability property value. Describes the capability that is associated with this resource. (e.g. Messages, Conversations, etc.) Not nullable. Read-only. +func (m *Endpoint) GetCapability()(*string) { + return m.capability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Endpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["capability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCapability(val) + } + return nil + } + res["providerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderId(val) + } + return nil + } + res["providerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderName(val) + } + return nil + } + res["providerResourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderResourceId(val) + } + return nil + } + res["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetProviderId gets the providerId property value. Application id of the publishing underlying service. Not nullable. Read-only. +func (m *Endpoint) GetProviderId()(*string) { + return m.providerId +} +// GetProviderName gets the providerName property value. Name of the publishing underlying service. Read-only. +func (m *Endpoint) GetProviderName()(*string) { + return m.providerName +} +// GetProviderResourceId gets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (e.g. Yammer.FeedURL etc.). Not nullable. Read-only. +func (m *Endpoint) GetProviderResourceId()(*string) { + return m.providerResourceId +} +// GetUri gets the uri property value. URL of the published resource. Not nullable. Read-only. +func (m *Endpoint) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *Endpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("capability", m.GetCapability()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("providerId", m.GetProviderId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("providerName", m.GetProviderName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("providerResourceId", m.GetProviderResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uri", m.GetUri()) + if err != nil { + return err + } + } + return nil +} +// SetCapability sets the capability property value. Describes the capability that is associated with this resource. (e.g. Messages, Conversations, etc.) Not nullable. Read-only. +func (m *Endpoint) SetCapability(value *string)() { + m.capability = value +} +// SetProviderId sets the providerId property value. Application id of the publishing underlying service. Not nullable. Read-only. +func (m *Endpoint) SetProviderId(value *string)() { + m.providerId = value +} +// SetProviderName sets the providerName property value. Name of the publishing underlying service. Read-only. +func (m *Endpoint) SetProviderName(value *string)() { + m.providerName = value +} +// SetProviderResourceId sets the providerResourceId property value. For Microsoft 365 groups, this is set to a well-known name for the resource (e.g. Yammer.FeedURL etc.). Not nullable. Read-only. +func (m *Endpoint) SetProviderResourceId(value *string)() { + m.providerResourceId = value +} +// SetUri sets the uri property value. URL of the published resource. Not nullable. Read-only. +func (m *Endpoint) SetUri(value *string)() { + m.uri = value +} diff --git a/src/internal/connector/graph/betasdk/models/endpoint_collection_response.go b/src/internal/connector/graph/betasdk/models/endpoint_collection_response.go new file mode 100644 index 000000000..bf643a12e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EndpointCollectionResponse +type EndpointCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Endpointable +} +// NewEndpointCollectionResponse instantiates a new EndpointCollectionResponse and sets the default values. +func NewEndpointCollectionResponse()(*EndpointCollectionResponse) { + m := &EndpointCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEndpointCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEndpointCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEndpointCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EndpointCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Endpointable, len(val)) + for i, v := range val { + res[i] = v.(Endpointable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EndpointCollectionResponse) GetValue()([]Endpointable) { + return m.value +} +// Serialize serializes information the current object +func (m *EndpointCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EndpointCollectionResponse) SetValue(value []Endpointable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/endpoint_collection_responseable.go b/src/internal/connector/graph/betasdk/models/endpoint_collection_responseable.go new file mode 100644 index 000000000..ad2416fcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EndpointCollectionResponseable +type EndpointCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Endpointable) + SetValue(value []Endpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_applicable_platform.go b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_applicable_platform.go new file mode 100644 index 000000000..7842c3e04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_applicable_platform.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EndpointSecurityConfigurationApplicablePlatform int + +const ( + // Unknown. + UNKNOWN_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM EndpointSecurityConfigurationApplicablePlatform = iota + // MacOS. + MACOS_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + // Windows 10 and later. + WINDOWS10ANDLATER_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + // Windows 10 and Windows Server. + WINDOWS10ANDWINDOWSSERVER_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM +) + +func (i EndpointSecurityConfigurationApplicablePlatform) String() string { + return []string{"unknown", "macOS", "windows10AndLater", "windows10AndWindowsServer"}[i] +} +func ParseEndpointSecurityConfigurationApplicablePlatform(v string) (interface{}, error) { + result := UNKNOWN_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + switch v { + case "unknown": + result = UNKNOWN_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + case "macOS": + result = MACOS_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + case "windows10AndLater": + result = WINDOWS10ANDLATER_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + case "windows10AndWindowsServer": + result = WINDOWS10ANDWINDOWSSERVER_ENDPOINTSECURITYCONFIGURATIONAPPLICABLEPLATFORM + default: + return 0, errors.New("Unknown EndpointSecurityConfigurationApplicablePlatform value: " + v) + } + return &result, nil +} +func SerializeEndpointSecurityConfigurationApplicablePlatform(values []EndpointSecurityConfigurationApplicablePlatform) []string { + 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/endpoint_security_configuration_profile_type.go b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_profile_type.go new file mode 100644 index 000000000..bb2aaaffc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_profile_type.go @@ -0,0 +1,88 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EndpointSecurityConfigurationProfileType int + +const ( + // Unknown. + UNKNOWN_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE EndpointSecurityConfigurationProfileType = iota + // Antivirus. + ANTIVIRUS_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Windows Security. + WINDOWSSECURITY_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // BitLocker. + BITLOCKER_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // FileVault. + FILEVAULT_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Firewall. + FIREWALL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Firewall rules. + FIREWALLRULES_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Endpoint detection and response. + ENDPOINTDETECTIONANDRESPONSE_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Device control. + DEVICECONTROL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // App and browser isolation. + APPANDBROWSERISOLATION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Exploit protection. + EXPLOITPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Web protection. + WEBPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Application control. + APPLICATIONCONTROL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Attack surface reduction rules. + ATTACKSURFACEREDUCTIONRULES_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + // Account protection. + ACCOUNTPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE +) + +func (i EndpointSecurityConfigurationProfileType) String() string { + return []string{"unknown", "antivirus", "windowsSecurity", "bitLocker", "fileVault", "firewall", "firewallRules", "endpointDetectionAndResponse", "deviceControl", "appAndBrowserIsolation", "exploitProtection", "webProtection", "applicationControl", "attackSurfaceReductionRules", "accountProtection"}[i] +} +func ParseEndpointSecurityConfigurationProfileType(v string) (interface{}, error) { + result := UNKNOWN_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + switch v { + case "unknown": + result = UNKNOWN_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "antivirus": + result = ANTIVIRUS_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "windowsSecurity": + result = WINDOWSSECURITY_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "bitLocker": + result = BITLOCKER_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "fileVault": + result = FILEVAULT_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "firewall": + result = FIREWALL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "firewallRules": + result = FIREWALLRULES_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "endpointDetectionAndResponse": + result = ENDPOINTDETECTIONANDRESPONSE_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "deviceControl": + result = DEVICECONTROL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "appAndBrowserIsolation": + result = APPANDBROWSERISOLATION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "exploitProtection": + result = EXPLOITPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "webProtection": + result = WEBPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "applicationControl": + result = APPLICATIONCONTROL_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "attackSurfaceReductionRules": + result = ATTACKSURFACEREDUCTIONRULES_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + case "accountProtection": + result = ACCOUNTPROTECTION_ENDPOINTSECURITYCONFIGURATIONPROFILETYPE + default: + return 0, errors.New("Unknown EndpointSecurityConfigurationProfileType value: " + v) + } + return &result, nil +} +func SerializeEndpointSecurityConfigurationProfileType(values []EndpointSecurityConfigurationProfileType) []string { + 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/endpoint_security_configuration_type.go b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_type.go new file mode 100644 index 000000000..464a9476c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_security_configuration_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EndpointSecurityConfigurationType int + +const ( + // Unknown. + UNKNOWN_ENDPOINTSECURITYCONFIGURATIONTYPE EndpointSecurityConfigurationType = iota + // Antivirus. + ANTIVIRUS_ENDPOINTSECURITYCONFIGURATIONTYPE + // Disk encryption. + DISKENCRYPTION_ENDPOINTSECURITYCONFIGURATIONTYPE + // Firewall. + FIREWALL_ENDPOINTSECURITYCONFIGURATIONTYPE + // Endpoint detection and response. + ENDPOINTDETECTIONANDRESPONSE_ENDPOINTSECURITYCONFIGURATIONTYPE + // Attack surface reduction. + ATTACKSURFACEREDUCTION_ENDPOINTSECURITYCONFIGURATIONTYPE + // Account protection. + ACCOUNTPROTECTION_ENDPOINTSECURITYCONFIGURATIONTYPE +) + +func (i EndpointSecurityConfigurationType) String() string { + return []string{"unknown", "antivirus", "diskEncryption", "firewall", "endpointDetectionAndResponse", "attackSurfaceReduction", "accountProtection"}[i] +} +func ParseEndpointSecurityConfigurationType(v string) (interface{}, error) { + result := UNKNOWN_ENDPOINTSECURITYCONFIGURATIONTYPE + switch v { + case "unknown": + result = UNKNOWN_ENDPOINTSECURITYCONFIGURATIONTYPE + case "antivirus": + result = ANTIVIRUS_ENDPOINTSECURITYCONFIGURATIONTYPE + case "diskEncryption": + result = DISKENCRYPTION_ENDPOINTSECURITYCONFIGURATIONTYPE + case "firewall": + result = FIREWALL_ENDPOINTSECURITYCONFIGURATIONTYPE + case "endpointDetectionAndResponse": + result = ENDPOINTDETECTIONANDRESPONSE_ENDPOINTSECURITYCONFIGURATIONTYPE + case "attackSurfaceReduction": + result = ATTACKSURFACEREDUCTION_ENDPOINTSECURITYCONFIGURATIONTYPE + case "accountProtection": + result = ACCOUNTPROTECTION_ENDPOINTSECURITYCONFIGURATIONTYPE + default: + return 0, errors.New("Unknown EndpointSecurityConfigurationType value: " + v) + } + return &result, nil +} +func SerializeEndpointSecurityConfigurationType(values []EndpointSecurityConfigurationType) []string { + 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/endpoint_type.go b/src/internal/connector/graph/betasdk/models/endpoint_type.go new file mode 100644 index 000000000..28911230f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpoint_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EndpointType int + +const ( + DEFAULT_ESCAPED_ENDPOINTTYPE EndpointType = iota + VOICEMAIL_ENDPOINTTYPE + SKYPEFORBUSINESS_ENDPOINTTYPE + SKYPEFORBUSINESSVOIPPHONE_ENDPOINTTYPE + UNKNOWNFUTUREVALUE_ENDPOINTTYPE +) + +func (i EndpointType) String() string { + return []string{"default", "voicemail", "skypeForBusiness", "skypeForBusinessVoipPhone", "unknownFutureValue"}[i] +} +func ParseEndpointType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_ENDPOINTTYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_ENDPOINTTYPE + case "voicemail": + result = VOICEMAIL_ENDPOINTTYPE + case "skypeForBusiness": + result = SKYPEFORBUSINESS_ENDPOINTTYPE + case "skypeForBusinessVoipPhone": + result = SKYPEFORBUSINESSVOIPPHONE_ENDPOINTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ENDPOINTTYPE + default: + return 0, errors.New("Unknown EndpointType value: " + v) + } + return &result, nil +} +func SerializeEndpointType(values []EndpointType) []string { + 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/endpointable.go b/src/internal/connector/graph/betasdk/models/endpointable.go new file mode 100644 index 000000000..a8c8f00bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/endpointable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Endpointable +type Endpointable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCapability()(*string) + GetProviderId()(*string) + GetProviderName()(*string) + GetProviderResourceId()(*string) + GetUri()(*string) + SetCapability(value *string)() + SetProviderId(value *string)() + SetProviderName(value *string)() + SetProviderResourceId(value *string)() + SetUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_availability_options.go b/src/internal/connector/graph/betasdk/models/enrollment_availability_options.go new file mode 100644 index 000000000..8043dc43f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_availability_options.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnrollmentAvailabilityOptions int + +const ( + // Device enrollment flow is shown to the end user with guided enrollment prompts + AVAILABLEWITHPROMPTS_ENROLLMENTAVAILABILITYOPTIONS EnrollmentAvailabilityOptions = iota + // Device enrollment flow is available to the end user without guided enrollment prompts + AVAILABLEWITHOUTPROMPTS_ENROLLMENTAVAILABILITYOPTIONS + // Device enrollment flow is unavailable to the enduser + UNAVAILABLE_ENROLLMENTAVAILABILITYOPTIONS +) + +func (i EnrollmentAvailabilityOptions) String() string { + return []string{"availableWithPrompts", "availableWithoutPrompts", "unavailable"}[i] +} +func ParseEnrollmentAvailabilityOptions(v string) (interface{}, error) { + result := AVAILABLEWITHPROMPTS_ENROLLMENTAVAILABILITYOPTIONS + switch v { + case "availableWithPrompts": + result = AVAILABLEWITHPROMPTS_ENROLLMENTAVAILABILITYOPTIONS + case "availableWithoutPrompts": + result = AVAILABLEWITHOUTPROMPTS_ENROLLMENTAVAILABILITYOPTIONS + case "unavailable": + result = UNAVAILABLE_ENROLLMENTAVAILABILITYOPTIONS + default: + return 0, errors.New("Unknown EnrollmentAvailabilityOptions value: " + v) + } + return &result, nil +} +func SerializeEnrollmentAvailabilityOptions(values []EnrollmentAvailabilityOptions) []string { + 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/enrollment_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment.go new file mode 100644 index 000000000..0cf049678 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentConfigurationAssignment enrollment Configuration Assignment +type EnrollmentConfigurationAssignment struct { + Entity + // Represents source of assignment. + source *DeviceAndAppManagementAssignmentSource + // Identifier for resource used for deployment to a group + sourceId *string + // Represents an assignment to managed devices in the tenant + target DeviceAndAppManagementAssignmentTargetable +} +// NewEnrollmentConfigurationAssignment instantiates a new enrollmentConfigurationAssignment and sets the default values. +func NewEnrollmentConfigurationAssignment()(*EnrollmentConfigurationAssignment) { + m := &EnrollmentConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateEnrollmentConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*DeviceAndAppManagementAssignmentSource)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetSource gets the source property value. Represents source of assignment. +func (m *EnrollmentConfigurationAssignment) GetSource()(*DeviceAndAppManagementAssignmentSource) { + return m.source +} +// GetSourceId gets the sourceId property value. Identifier for resource used for deployment to a group +func (m *EnrollmentConfigurationAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. Represents an assignment to managed devices in the tenant +func (m *EnrollmentConfigurationAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *EnrollmentConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetSource sets the source property value. Represents source of assignment. +func (m *EnrollmentConfigurationAssignment) SetSource(value *DeviceAndAppManagementAssignmentSource)() { + m.source = value +} +// SetSourceId sets the sourceId property value. Identifier for resource used for deployment to a group +func (m *EnrollmentConfigurationAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. Represents an assignment to managed devices in the tenant +func (m *EnrollmentConfigurationAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_response.go new file mode 100644 index 000000000..7ca3e5db9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentConfigurationAssignmentCollectionResponse +type EnrollmentConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EnrollmentConfigurationAssignmentable +} +// NewEnrollmentConfigurationAssignmentCollectionResponse instantiates a new EnrollmentConfigurationAssignmentCollectionResponse and sets the default values. +func NewEnrollmentConfigurationAssignmentCollectionResponse()(*EnrollmentConfigurationAssignmentCollectionResponse) { + m := &EnrollmentConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEnrollmentConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EnrollmentConfigurationAssignmentCollectionResponse) GetValue()([]EnrollmentConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *EnrollmentConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EnrollmentConfigurationAssignmentCollectionResponse) SetValue(value []EnrollmentConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..5fe957c3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentConfigurationAssignmentCollectionResponseable +type EnrollmentConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EnrollmentConfigurationAssignmentable) + SetValue(value []EnrollmentConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignmentable.go new file mode 100644 index 000000000..b10b2c180 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_configuration_assignmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentConfigurationAssignmentable +type EnrollmentConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSource()(*DeviceAndAppManagementAssignmentSource) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetSource(value *DeviceAndAppManagementAssignmentSource)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_notification_branding_options.go b/src/internal/connector/graph/betasdk/models/enrollment_notification_branding_options.go new file mode 100644 index 000000000..1d7c35015 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_notification_branding_options.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnrollmentNotificationBrandingOptions int + +const ( + // Indicates that the template has no branding. + NONE_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS EnrollmentNotificationBrandingOptions = iota + // Indicates that the Company Logo is included in the notification. + INCLUDECOMPANYLOGO_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + // Indicates that the Company Name is included in the notification. + INCLUDECOMPANYNAME_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + // Indicates that the Contact Information is included in the notification. + INCLUDECONTACTINFORMATION_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + // Indicates that the Company Portal Link is included in the notification. + INCLUDECOMPANYPORTALLINK_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + // Indicates that the DeviceDetails is included in the notification. + INCLUDEDEVICEDETAILS_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + // unknownFutureValue for evolvable enums pattern. + UNKNOWNFUTUREVALUE_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS +) + +func (i EnrollmentNotificationBrandingOptions) String() string { + return []string{"none", "includeCompanyLogo", "includeCompanyName", "includeContactInformation", "includeCompanyPortalLink", "includeDeviceDetails", "unknownFutureValue"}[i] +} +func ParseEnrollmentNotificationBrandingOptions(v string) (interface{}, error) { + result := NONE_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + switch v { + case "none": + result = NONE_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "includeCompanyLogo": + result = INCLUDECOMPANYLOGO_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "includeCompanyName": + result = INCLUDECOMPANYNAME_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "includeContactInformation": + result = INCLUDECONTACTINFORMATION_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "includeCompanyPortalLink": + result = INCLUDECOMPANYPORTALLINK_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "includeDeviceDetails": + result = INCLUDEDEVICEDETAILS_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ENROLLMENTNOTIFICATIONBRANDINGOPTIONS + default: + return 0, errors.New("Unknown EnrollmentNotificationBrandingOptions value: " + v) + } + return &result, nil +} +func SerializeEnrollmentNotificationBrandingOptions(values []EnrollmentNotificationBrandingOptions) []string { + 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/enrollment_notification_template_type.go b/src/internal/connector/graph/betasdk/models/enrollment_notification_template_type.go new file mode 100644 index 000000000..ace4eef2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_notification_template_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnrollmentNotificationTemplateType int + +const ( + // Email Notification + EMAIL_ENROLLMENTNOTIFICATIONTEMPLATETYPE EnrollmentNotificationTemplateType = iota + // Push Notification + PUSH_ENROLLMENTNOTIFICATIONTEMPLATETYPE + // Unknown Type + UNKNOWNFUTUREVALUE_ENROLLMENTNOTIFICATIONTEMPLATETYPE +) + +func (i EnrollmentNotificationTemplateType) String() string { + return []string{"email", "push", "unknownFutureValue"}[i] +} +func ParseEnrollmentNotificationTemplateType(v string) (interface{}, error) { + result := EMAIL_ENROLLMENTNOTIFICATIONTEMPLATETYPE + switch v { + case "email": + result = EMAIL_ENROLLMENTNOTIFICATIONTEMPLATETYPE + case "push": + result = PUSH_ENROLLMENTNOTIFICATIONTEMPLATETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ENROLLMENTNOTIFICATIONTEMPLATETYPE + default: + return 0, errors.New("Unknown EnrollmentNotificationTemplateType value: " + v) + } + return &result, nil +} +func SerializeEnrollmentNotificationTemplateType(values []EnrollmentNotificationTemplateType) []string { + 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/enrollment_profile.go b/src/internal/connector/graph/betasdk/models/enrollment_profile.go new file mode 100644 index 000000000..009025caf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_profile.go @@ -0,0 +1,214 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentProfile +type EnrollmentProfile struct { + Entity + // Configuration endpoint url to use for Enrollment + configurationEndpointUrl *string + // Description of the profile + description *string + // Name of the profile + displayName *string + // Indicates to authenticate with Apple Setup Assistant instead of Company Portal. + enableAuthenticationViaCompanyPortal *bool + // Indicates that Company Portal is required on setup assistant enrolled devices + requireCompanyPortalOnSetupAssistantEnrolledDevices *bool + // Indicates if the profile requires user authentication + requiresUserAuthentication *bool +} +// NewEnrollmentProfile instantiates a new enrollmentProfile and sets the default values. +func NewEnrollmentProfile()(*EnrollmentProfile) { + m := &EnrollmentProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateEnrollmentProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.depEnrollmentBaseProfile": + return NewDepEnrollmentBaseProfile(), nil + case "#microsoft.graph.depEnrollmentProfile": + return NewDepEnrollmentProfile(), nil + case "#microsoft.graph.depIOSEnrollmentProfile": + return NewDepIOSEnrollmentProfile(), nil + case "#microsoft.graph.depMacOSEnrollmentProfile": + return NewDepMacOSEnrollmentProfile(), nil + } + } + } + } + return NewEnrollmentProfile(), nil +} +// GetConfigurationEndpointUrl gets the configurationEndpointUrl property value. Configuration endpoint url to use for Enrollment +func (m *EnrollmentProfile) GetConfigurationEndpointUrl()(*string) { + return m.configurationEndpointUrl +} +// GetDescription gets the description property value. Description of the profile +func (m *EnrollmentProfile) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the profile +func (m *EnrollmentProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetEnableAuthenticationViaCompanyPortal gets the enableAuthenticationViaCompanyPortal property value. Indicates to authenticate with Apple Setup Assistant instead of Company Portal. +func (m *EnrollmentProfile) GetEnableAuthenticationViaCompanyPortal()(*bool) { + return m.enableAuthenticationViaCompanyPortal +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationEndpointUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationEndpointUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enableAuthenticationViaCompanyPortal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableAuthenticationViaCompanyPortal(val) + } + return nil + } + res["requireCompanyPortalOnSetupAssistantEnrolledDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireCompanyPortalOnSetupAssistantEnrolledDevices(val) + } + return nil + } + res["requiresUserAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiresUserAuthentication(val) + } + return nil + } + return res +} +// GetRequireCompanyPortalOnSetupAssistantEnrolledDevices gets the requireCompanyPortalOnSetupAssistantEnrolledDevices property value. Indicates that Company Portal is required on setup assistant enrolled devices +func (m *EnrollmentProfile) GetRequireCompanyPortalOnSetupAssistantEnrolledDevices()(*bool) { + return m.requireCompanyPortalOnSetupAssistantEnrolledDevices +} +// GetRequiresUserAuthentication gets the requiresUserAuthentication property value. Indicates if the profile requires user authentication +func (m *EnrollmentProfile) GetRequiresUserAuthentication()(*bool) { + return m.requiresUserAuthentication +} +// Serialize serializes information the current object +func (m *EnrollmentProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("configurationEndpointUrl", m.GetConfigurationEndpointUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableAuthenticationViaCompanyPortal", m.GetEnableAuthenticationViaCompanyPortal()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireCompanyPortalOnSetupAssistantEnrolledDevices", m.GetRequireCompanyPortalOnSetupAssistantEnrolledDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requiresUserAuthentication", m.GetRequiresUserAuthentication()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationEndpointUrl sets the configurationEndpointUrl property value. Configuration endpoint url to use for Enrollment +func (m *EnrollmentProfile) SetConfigurationEndpointUrl(value *string)() { + m.configurationEndpointUrl = value +} +// SetDescription sets the description property value. Description of the profile +func (m *EnrollmentProfile) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the profile +func (m *EnrollmentProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnableAuthenticationViaCompanyPortal sets the enableAuthenticationViaCompanyPortal property value. Indicates to authenticate with Apple Setup Assistant instead of Company Portal. +func (m *EnrollmentProfile) SetEnableAuthenticationViaCompanyPortal(value *bool)() { + m.enableAuthenticationViaCompanyPortal = value +} +// SetRequireCompanyPortalOnSetupAssistantEnrolledDevices sets the requireCompanyPortalOnSetupAssistantEnrolledDevices property value. Indicates that Company Portal is required on setup assistant enrolled devices +func (m *EnrollmentProfile) SetRequireCompanyPortalOnSetupAssistantEnrolledDevices(value *bool)() { + m.requireCompanyPortalOnSetupAssistantEnrolledDevices = value +} +// SetRequiresUserAuthentication sets the requiresUserAuthentication property value. Indicates if the profile requires user authentication +func (m *EnrollmentProfile) SetRequiresUserAuthentication(value *bool)() { + m.requiresUserAuthentication = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_response.go new file mode 100644 index 000000000..db732dcdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentProfileCollectionResponse +type EnrollmentProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EnrollmentProfileable +} +// NewEnrollmentProfileCollectionResponse instantiates a new EnrollmentProfileCollectionResponse and sets the default values. +func NewEnrollmentProfileCollectionResponse()(*EnrollmentProfileCollectionResponse) { + m := &EnrollmentProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEnrollmentProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentProfileable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EnrollmentProfileCollectionResponse) GetValue()([]EnrollmentProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *EnrollmentProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EnrollmentProfileCollectionResponse) SetValue(value []EnrollmentProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_responseable.go new file mode 100644 index 000000000..35882e93a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentProfileCollectionResponseable +type EnrollmentProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EnrollmentProfileable) + SetValue(value []EnrollmentProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_profileable.go b/src/internal/connector/graph/betasdk/models/enrollment_profileable.go new file mode 100644 index 000000000..03d4ba0f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_profileable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentProfileable +type EnrollmentProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationEndpointUrl()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetEnableAuthenticationViaCompanyPortal()(*bool) + GetRequireCompanyPortalOnSetupAssistantEnrolledDevices()(*bool) + GetRequiresUserAuthentication()(*bool) + SetConfigurationEndpointUrl(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEnableAuthenticationViaCompanyPortal(value *bool)() + SetRequireCompanyPortalOnSetupAssistantEnrolledDevices(value *bool)() + SetRequiresUserAuthentication(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_restriction_platform_type.go b/src/internal/connector/graph/betasdk/models/enrollment_restriction_platform_type.go new file mode 100644 index 000000000..747d4b57c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_restriction_platform_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnrollmentRestrictionPlatformType int + +const ( + // Indicates that the enrollment configuration applies to all platforms + ALLPLATFORMS_ENROLLMENTRESTRICTIONPLATFORMTYPE EnrollmentRestrictionPlatformType = iota + // Indicates that the enrollment configuration applies only to iOS/iPadOS devices + IOS_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to Windows devices + WINDOWS_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to Windows Phone devices + WINDOWSPHONE_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to Android devices + ANDROID_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to Android for Work devices + ANDROIDFORWORK_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to macOS devices + MAC_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Indicates that the enrollment configuration applies only to Linux devices + LINUX_ENROLLMENTRESTRICTIONPLATFORMTYPE + // Evolvable enumeration sentinel value. Do not use + UNKNOWNFUTUREVALUE_ENROLLMENTRESTRICTIONPLATFORMTYPE +) + +func (i EnrollmentRestrictionPlatformType) String() string { + return []string{"allPlatforms", "ios", "windows", "windowsPhone", "android", "androidForWork", "mac", "linux", "unknownFutureValue"}[i] +} +func ParseEnrollmentRestrictionPlatformType(v string) (interface{}, error) { + result := ALLPLATFORMS_ENROLLMENTRESTRICTIONPLATFORMTYPE + switch v { + case "allPlatforms": + result = ALLPLATFORMS_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "ios": + result = IOS_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "windows": + result = WINDOWS_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "windowsPhone": + result = WINDOWSPHONE_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "android": + result = ANDROID_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "androidForWork": + result = ANDROIDFORWORK_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "mac": + result = MAC_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "linux": + result = LINUX_ENROLLMENTRESTRICTIONPLATFORMTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ENROLLMENTRESTRICTIONPLATFORMTYPE + default: + return 0, errors.New("Unknown EnrollmentRestrictionPlatformType value: " + v) + } + return &result, nil +} +func SerializeEnrollmentRestrictionPlatformType(values []EnrollmentRestrictionPlatformType) []string { + 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/enrollment_restrictions_configuration_policy_set_item.go b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item.go new file mode 100644 index 000000000..6084ae2d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentRestrictionsConfigurationPolicySetItem +type EnrollmentRestrictionsConfigurationPolicySetItem struct { + PolicySetItem + // Limit of the EnrollmentRestrictionsConfigurationPolicySetItem. + limit *int32 + // Priority of the EnrollmentRestrictionsConfigurationPolicySetItem. + priority *int32 +} +// NewEnrollmentRestrictionsConfigurationPolicySetItem instantiates a new EnrollmentRestrictionsConfigurationPolicySetItem and sets the default values. +func NewEnrollmentRestrictionsConfigurationPolicySetItem()(*EnrollmentRestrictionsConfigurationPolicySetItem) { + m := &EnrollmentRestrictionsConfigurationPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.enrollmentRestrictionsConfigurationPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEnrollmentRestrictionsConfigurationPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentRestrictionsConfigurationPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentRestrictionsConfigurationPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + res["limit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLimit(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetLimit gets the limit property value. Limit of the EnrollmentRestrictionsConfigurationPolicySetItem. +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) GetLimit()(*int32) { + return m.limit +} +// GetPriority gets the priority property value. Priority of the EnrollmentRestrictionsConfigurationPolicySetItem. +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) GetPriority()(*int32) { + return m.priority +} +// Serialize serializes information the current object +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("limit", m.GetLimit()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + return nil +} +// SetLimit sets the limit property value. Limit of the EnrollmentRestrictionsConfigurationPolicySetItem. +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) SetLimit(value *int32)() { + m.limit = value +} +// SetPriority sets the priority property value. Priority of the EnrollmentRestrictionsConfigurationPolicySetItem. +func (m *EnrollmentRestrictionsConfigurationPolicySetItem) SetPriority(value *int32)() { + m.priority = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_response.go new file mode 100644 index 000000000..74a809d51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse +type EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EnrollmentRestrictionsConfigurationPolicySetItemable +} +// NewEnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse instantiates a new EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse and sets the default values. +func NewEnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse()(*EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse) { + m := &EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEnrollmentRestrictionsConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentRestrictionsConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentRestrictionsConfigurationPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentRestrictionsConfigurationPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentRestrictionsConfigurationPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse) GetValue()([]EnrollmentRestrictionsConfigurationPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponse) SetValue(value []EnrollmentRestrictionsConfigurationPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..91fe1ecdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponseable +type EnrollmentRestrictionsConfigurationPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EnrollmentRestrictionsConfigurationPolicySetItemable) + SetValue(value []EnrollmentRestrictionsConfigurationPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_itemable.go new file mode 100644 index 000000000..f24356736 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_restrictions_configuration_policy_set_itemable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentRestrictionsConfigurationPolicySetItemable +type EnrollmentRestrictionsConfigurationPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable + GetLimit()(*int32) + GetPriority()(*int32) + SetLimit(value *int32)() + SetPriority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_state.go b/src/internal/connector/graph/betasdk/models/enrollment_state.go new file mode 100644 index 000000000..b6434bd92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnrollmentState int + +const ( + // Device enrollment state is unknown + UNKNOWN_ENROLLMENTSTATE EnrollmentState = iota + // Device is Enrolled. + ENROLLED_ENROLLMENTSTATE + // Enrolled but it's enrolled via enrollment profile and the enrolled profile is different from the assigned profile. + PENDINGRESET_ENROLLMENTSTATE + // Not enrolled and there is enrollment failure record. + FAILED_ENROLLMENTSTATE + // Device is imported but not enrolled. + NOTCONTACTED_ENROLLMENTSTATE + // Device is enrolled as userless, but is blocked from moving to user enrollment because the app failed to install. + BLOCKED_ENROLLMENTSTATE +) + +func (i EnrollmentState) String() string { + return []string{"unknown", "enrolled", "pendingReset", "failed", "notContacted", "blocked"}[i] +} +func ParseEnrollmentState(v string) (interface{}, error) { + result := UNKNOWN_ENROLLMENTSTATE + switch v { + case "unknown": + result = UNKNOWN_ENROLLMENTSTATE + case "enrolled": + result = ENROLLED_ENROLLMENTSTATE + case "pendingReset": + result = PENDINGRESET_ENROLLMENTSTATE + case "failed": + result = FAILED_ENROLLMENTSTATE + case "notContacted": + result = NOTCONTACTED_ENROLLMENTSTATE + case "blocked": + result = BLOCKED_ENROLLMENTSTATE + default: + return 0, errors.New("Unknown EnrollmentState value: " + v) + } + return &result, nil +} +func SerializeEnrollmentState(values []EnrollmentState) []string { + 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/enrollment_troubleshooting_event.go b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event.go new file mode 100644 index 000000000..aef6e6124 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event.go @@ -0,0 +1,244 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentTroubleshootingEvent +type EnrollmentTroubleshootingEvent struct { + DeviceManagementTroubleshootingEvent + // Azure AD device identifier. + deviceId *string + // Possible ways of adding a mobile device to management. + enrollmentType *DeviceEnrollmentType + // Top level failure categories for enrollment. + failureCategory *DeviceEnrollmentFailureReason + // Detailed failure reason. + failureReason *string + // Device identifier created or collected by Intune. + managedDeviceIdentifier *string + // Operating System. + operatingSystem *string + // OS Version. + osVersion *string + // Identifier for the user that tried to enroll the device. + userId *string +} +// NewEnrollmentTroubleshootingEvent instantiates a new EnrollmentTroubleshootingEvent and sets the default values. +func NewEnrollmentTroubleshootingEvent()(*EnrollmentTroubleshootingEvent) { + m := &EnrollmentTroubleshootingEvent{ + DeviceManagementTroubleshootingEvent: *NewDeviceManagementTroubleshootingEvent(), + } + return m +} +// CreateEnrollmentTroubleshootingEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentTroubleshootingEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentTroubleshootingEvent(), nil +} +// GetDeviceId gets the deviceId property value. Azure AD device identifier. +func (m *EnrollmentTroubleshootingEvent) GetDeviceId()(*string) { + return m.deviceId +} +// GetEnrollmentType gets the enrollmentType property value. Possible ways of adding a mobile device to management. +func (m *EnrollmentTroubleshootingEvent) GetEnrollmentType()(*DeviceEnrollmentType) { + return m.enrollmentType +} +// GetFailureCategory gets the failureCategory property value. Top level failure categories for enrollment. +func (m *EnrollmentTroubleshootingEvent) GetFailureCategory()(*DeviceEnrollmentFailureReason) { + return m.failureCategory +} +// GetFailureReason gets the failureReason property value. Detailed failure reason. +func (m *EnrollmentTroubleshootingEvent) GetFailureReason()(*string) { + return m.failureReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentTroubleshootingEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementTroubleshootingEvent.GetFieldDeserializers() + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["enrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceEnrollmentType) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentType(val.(*DeviceEnrollmentType)) + } + return nil + } + res["failureCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceEnrollmentFailureReason) + if err != nil { + return err + } + if val != nil { + m.SetFailureCategory(val.(*DeviceEnrollmentFailureReason)) + } + return nil + } + res["failureReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureReason(val) + } + return nil + } + res["managedDeviceIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceIdentifier(val) + } + return nil + } + res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetManagedDeviceIdentifier gets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *EnrollmentTroubleshootingEvent) GetManagedDeviceIdentifier()(*string) { + return m.managedDeviceIdentifier +} +// GetOperatingSystem gets the operatingSystem property value. Operating System. +func (m *EnrollmentTroubleshootingEvent) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetOsVersion gets the osVersion property value. OS Version. +func (m *EnrollmentTroubleshootingEvent) GetOsVersion()(*string) { + return m.osVersion +} +// GetUserId gets the userId property value. Identifier for the user that tried to enroll the device. +func (m *EnrollmentTroubleshootingEvent) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *EnrollmentTroubleshootingEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementTroubleshootingEvent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + if m.GetEnrollmentType() != nil { + cast := (*m.GetEnrollmentType()).String() + err = writer.WriteStringValue("enrollmentType", &cast) + if err != nil { + return err + } + } + if m.GetFailureCategory() != nil { + cast := (*m.GetFailureCategory()).String() + err = writer.WriteStringValue("failureCategory", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("failureReason", m.GetFailureReason()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceIdentifier", m.GetManagedDeviceIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceId sets the deviceId property value. Azure AD device identifier. +func (m *EnrollmentTroubleshootingEvent) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetEnrollmentType sets the enrollmentType property value. Possible ways of adding a mobile device to management. +func (m *EnrollmentTroubleshootingEvent) SetEnrollmentType(value *DeviceEnrollmentType)() { + m.enrollmentType = value +} +// SetFailureCategory sets the failureCategory property value. Top level failure categories for enrollment. +func (m *EnrollmentTroubleshootingEvent) SetFailureCategory(value *DeviceEnrollmentFailureReason)() { + m.failureCategory = value +} +// SetFailureReason sets the failureReason property value. Detailed failure reason. +func (m *EnrollmentTroubleshootingEvent) SetFailureReason(value *string)() { + m.failureReason = value +} +// SetManagedDeviceIdentifier sets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *EnrollmentTroubleshootingEvent) SetManagedDeviceIdentifier(value *string)() { + m.managedDeviceIdentifier = value +} +// SetOperatingSystem sets the operatingSystem property value. Operating System. +func (m *EnrollmentTroubleshootingEvent) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetOsVersion sets the osVersion property value. OS Version. +func (m *EnrollmentTroubleshootingEvent) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetUserId sets the userId property value. Identifier for the user that tried to enroll the device. +func (m *EnrollmentTroubleshootingEvent) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_response.go b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_response.go new file mode 100644 index 000000000..fecf286f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentTroubleshootingEventCollectionResponse +type EnrollmentTroubleshootingEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EnrollmentTroubleshootingEventable +} +// NewEnrollmentTroubleshootingEventCollectionResponse instantiates a new EnrollmentTroubleshootingEventCollectionResponse and sets the default values. +func NewEnrollmentTroubleshootingEventCollectionResponse()(*EnrollmentTroubleshootingEventCollectionResponse) { + m := &EnrollmentTroubleshootingEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEnrollmentTroubleshootingEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnrollmentTroubleshootingEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnrollmentTroubleshootingEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnrollmentTroubleshootingEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnrollmentTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnrollmentTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(EnrollmentTroubleshootingEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EnrollmentTroubleshootingEventCollectionResponse) GetValue()([]EnrollmentTroubleshootingEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *EnrollmentTroubleshootingEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EnrollmentTroubleshootingEventCollectionResponse) SetValue(value []EnrollmentTroubleshootingEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_responseable.go new file mode 100644 index 000000000..6c4cc31af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentTroubleshootingEventCollectionResponseable +type EnrollmentTroubleshootingEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EnrollmentTroubleshootingEventable) + SetValue(value []EnrollmentTroubleshootingEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_eventable.go b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_eventable.go new file mode 100644 index 000000000..855709d5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enrollment_troubleshooting_eventable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnrollmentTroubleshootingEventable +type EnrollmentTroubleshootingEventable interface { + DeviceManagementTroubleshootingEventable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceId()(*string) + GetEnrollmentType()(*DeviceEnrollmentType) + GetFailureCategory()(*DeviceEnrollmentFailureReason) + GetFailureReason()(*string) + GetManagedDeviceIdentifier()(*string) + GetOperatingSystem()(*string) + GetOsVersion()(*string) + GetUserId()(*string) + SetDeviceId(value *string)() + SetEnrollmentType(value *DeviceEnrollmentType)() + SetFailureCategory(value *DeviceEnrollmentFailureReason)() + SetFailureReason(value *string)() + SetManagedDeviceIdentifier(value *string)() + SetOperatingSystem(value *string)() + SetOsVersion(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate.go b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate.go new file mode 100644 index 000000000..da33a48c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseCodeSigningCertificate provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EnterpriseCodeSigningCertificate struct { + Entity + // The Windows Enterprise Code-Signing Certificate in the raw data format. + content []byte + // The Cert Expiration Date. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Issuer value for the cert. + issuer *string + // The Issuer Name for the cert. + issuerName *string + // The status property + status *CertificateStatus + // The Subject Value for the cert. + subject *string + // The Subject Name for the cert. + subjectName *string + // The date time of CodeSigning Cert when it is uploaded. + uploadDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewEnterpriseCodeSigningCertificate instantiates a new enterpriseCodeSigningCertificate and sets the default values. +func NewEnterpriseCodeSigningCertificate()(*EnterpriseCodeSigningCertificate) { + m := &EnterpriseCodeSigningCertificate{ + Entity: *NewEntity(), + } + return m +} +// CreateEnterpriseCodeSigningCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnterpriseCodeSigningCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterpriseCodeSigningCertificate(), nil +} +// GetContent gets the content property value. The Windows Enterprise Code-Signing Certificate in the raw data format. +func (m *EnterpriseCodeSigningCertificate) GetContent()([]byte) { + return m.content +} +// GetExpirationDateTime gets the expirationDateTime property value. The Cert Expiration Date. +func (m *EnterpriseCodeSigningCertificate) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnterpriseCodeSigningCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuer(val) + } + return nil + } + res["issuerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuerName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CertificateStatus)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["subjectName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectName(val) + } + return nil + } + res["uploadDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadDateTime(val) + } + return nil + } + return res +} +// GetIssuer gets the issuer property value. The Issuer value for the cert. +func (m *EnterpriseCodeSigningCertificate) GetIssuer()(*string) { + return m.issuer +} +// GetIssuerName gets the issuerName property value. The Issuer Name for the cert. +func (m *EnterpriseCodeSigningCertificate) GetIssuerName()(*string) { + return m.issuerName +} +// GetStatus gets the status property value. The status property +func (m *EnterpriseCodeSigningCertificate) GetStatus()(*CertificateStatus) { + return m.status +} +// GetSubject gets the subject property value. The Subject Value for the cert. +func (m *EnterpriseCodeSigningCertificate) GetSubject()(*string) { + return m.subject +} +// GetSubjectName gets the subjectName property value. The Subject Name for the cert. +func (m *EnterpriseCodeSigningCertificate) GetSubjectName()(*string) { + return m.subjectName +} +// GetUploadDateTime gets the uploadDateTime property value. The date time of CodeSigning Cert when it is uploaded. +func (m *EnterpriseCodeSigningCertificate) GetUploadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.uploadDateTime +} +// Serialize serializes information the current object +func (m *EnterpriseCodeSigningCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuer", m.GetIssuer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuerName", m.GetIssuerName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectName", m.GetSubjectName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("uploadDateTime", m.GetUploadDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The Windows Enterprise Code-Signing Certificate in the raw data format. +func (m *EnterpriseCodeSigningCertificate) SetContent(value []byte)() { + m.content = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The Cert Expiration Date. +func (m *EnterpriseCodeSigningCertificate) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIssuer sets the issuer property value. The Issuer value for the cert. +func (m *EnterpriseCodeSigningCertificate) SetIssuer(value *string)() { + m.issuer = value +} +// SetIssuerName sets the issuerName property value. The Issuer Name for the cert. +func (m *EnterpriseCodeSigningCertificate) SetIssuerName(value *string)() { + m.issuerName = value +} +// SetStatus sets the status property value. The status property +func (m *EnterpriseCodeSigningCertificate) SetStatus(value *CertificateStatus)() { + m.status = value +} +// SetSubject sets the subject property value. The Subject Value for the cert. +func (m *EnterpriseCodeSigningCertificate) SetSubject(value *string)() { + m.subject = value +} +// SetSubjectName sets the subjectName property value. The Subject Name for the cert. +func (m *EnterpriseCodeSigningCertificate) SetSubjectName(value *string)() { + m.subjectName = value +} +// SetUploadDateTime sets the uploadDateTime property value. The date time of CodeSigning Cert when it is uploaded. +func (m *EnterpriseCodeSigningCertificate) SetUploadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.uploadDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_response.go new file mode 100644 index 000000000..e303c3fb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseCodeSigningCertificateCollectionResponse +type EnterpriseCodeSigningCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EnterpriseCodeSigningCertificateable +} +// NewEnterpriseCodeSigningCertificateCollectionResponse instantiates a new EnterpriseCodeSigningCertificateCollectionResponse and sets the default values. +func NewEnterpriseCodeSigningCertificateCollectionResponse()(*EnterpriseCodeSigningCertificateCollectionResponse) { + m := &EnterpriseCodeSigningCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEnterpriseCodeSigningCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEnterpriseCodeSigningCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEnterpriseCodeSigningCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EnterpriseCodeSigningCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEnterpriseCodeSigningCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EnterpriseCodeSigningCertificateable, len(val)) + for i, v := range val { + res[i] = v.(EnterpriseCodeSigningCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EnterpriseCodeSigningCertificateCollectionResponse) GetValue()([]EnterpriseCodeSigningCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *EnterpriseCodeSigningCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EnterpriseCodeSigningCertificateCollectionResponse) SetValue(value []EnterpriseCodeSigningCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_responseable.go new file mode 100644 index 000000000..54db050e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseCodeSigningCertificateCollectionResponseable +type EnterpriseCodeSigningCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EnterpriseCodeSigningCertificateable) + SetValue(value []EnterpriseCodeSigningCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificateable.go b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificateable.go new file mode 100644 index 000000000..633cc3b5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/enterprise_code_signing_certificateable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EnterpriseCodeSigningCertificateable +type EnterpriseCodeSigningCertificateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIssuer()(*string) + GetIssuerName()(*string) + GetStatus()(*CertificateStatus) + GetSubject()(*string) + GetSubjectName()(*string) + GetUploadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetContent(value []byte)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIssuer(value *string)() + SetIssuerName(value *string)() + SetStatus(value *CertificateStatus)() + SetSubject(value *string)() + SetSubjectName(value *string)() + SetUploadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/entitlement_management.go b/src/internal/connector/graph/betasdk/models/entitlement_management.go new file mode 100644 index 000000000..461a792af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entitlement_management.go @@ -0,0 +1,502 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EntitlementManagement +type EntitlementManagement struct { + Entity + // The accessPackageAssignmentApprovals property + accessPackageAssignmentApprovals []Approvalable + // Represents the policy that governs which subjects can request or be assigned an access package via an access package assignment. + accessPackageAssignmentPolicies []AccessPackageAssignmentPolicyable + // Represents access package assignment requests created by or on behalf of a user. + accessPackageAssignmentRequests []AccessPackageAssignmentRequestable + // Represents the resource-specific role which a subject has been assigned through an access package assignment. + accessPackageAssignmentResourceRoles []AccessPackageAssignmentResourceRoleable + // The assignment of an access package to a subject for a period of time. + accessPackageAssignments []AccessPackageAssignmentable + // A container of access packages. + accessPackageCatalogs []AccessPackageCatalogable + // A reference to the geolocation environment in which a resource is located. + accessPackageResourceEnvironments []AccessPackageResourceEnvironmentable + // Represents a request to add or remove a resource to or from a catalog respectively. + accessPackageResourceRequests []AccessPackageResourceRequestable + // A reference to both a scope within a resource, and a role in that resource for that scope. + accessPackageResourceRoleScopes []AccessPackageResourceRoleScopeable + // A reference to a resource associated with an access package catalog. + accessPackageResources []AccessPackageResourceable + // Represents access package objects. + accessPackages []AccessPackageable + // Represents references to a directory or domain of another organization whose users can request access. + connectedOrganizations []ConnectedOrganizationable + // Represents the settings that control the behavior of Azure AD entitlement management. + settings EntitlementManagementSettingsable + // The subjects property + subjects []AccessPackageSubjectable +} +// NewEntitlementManagement instantiates a new EntitlementManagement and sets the default values. +func NewEntitlementManagement()(*EntitlementManagement) { + m := &EntitlementManagement{ + Entity: *NewEntity(), + } + return m +} +// CreateEntitlementManagementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEntitlementManagementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEntitlementManagement(), nil +} +// GetAccessPackageAssignmentApprovals gets the accessPackageAssignmentApprovals property value. The accessPackageAssignmentApprovals property +func (m *EntitlementManagement) GetAccessPackageAssignmentApprovals()([]Approvalable) { + return m.accessPackageAssignmentApprovals +} +// GetAccessPackageAssignmentPolicies gets the accessPackageAssignmentPolicies property value. Represents the policy that governs which subjects can request or be assigned an access package via an access package assignment. +func (m *EntitlementManagement) GetAccessPackageAssignmentPolicies()([]AccessPackageAssignmentPolicyable) { + return m.accessPackageAssignmentPolicies +} +// GetAccessPackageAssignmentRequests gets the accessPackageAssignmentRequests property value. Represents access package assignment requests created by or on behalf of a user. +func (m *EntitlementManagement) GetAccessPackageAssignmentRequests()([]AccessPackageAssignmentRequestable) { + return m.accessPackageAssignmentRequests +} +// GetAccessPackageAssignmentResourceRoles gets the accessPackageAssignmentResourceRoles property value. Represents the resource-specific role which a subject has been assigned through an access package assignment. +func (m *EntitlementManagement) GetAccessPackageAssignmentResourceRoles()([]AccessPackageAssignmentResourceRoleable) { + return m.accessPackageAssignmentResourceRoles +} +// GetAccessPackageAssignments gets the accessPackageAssignments property value. The assignment of an access package to a subject for a period of time. +func (m *EntitlementManagement) GetAccessPackageAssignments()([]AccessPackageAssignmentable) { + return m.accessPackageAssignments +} +// GetAccessPackageCatalogs gets the accessPackageCatalogs property value. A container of access packages. +func (m *EntitlementManagement) GetAccessPackageCatalogs()([]AccessPackageCatalogable) { + return m.accessPackageCatalogs +} +// GetAccessPackageResourceEnvironments gets the accessPackageResourceEnvironments property value. A reference to the geolocation environment in which a resource is located. +func (m *EntitlementManagement) GetAccessPackageResourceEnvironments()([]AccessPackageResourceEnvironmentable) { + return m.accessPackageResourceEnvironments +} +// GetAccessPackageResourceRequests gets the accessPackageResourceRequests property value. Represents a request to add or remove a resource to or from a catalog respectively. +func (m *EntitlementManagement) GetAccessPackageResourceRequests()([]AccessPackageResourceRequestable) { + return m.accessPackageResourceRequests +} +// GetAccessPackageResourceRoleScopes gets the accessPackageResourceRoleScopes property value. A reference to both a scope within a resource, and a role in that resource for that scope. +func (m *EntitlementManagement) GetAccessPackageResourceRoleScopes()([]AccessPackageResourceRoleScopeable) { + return m.accessPackageResourceRoleScopes +} +// GetAccessPackageResources gets the accessPackageResources property value. A reference to a resource associated with an access package catalog. +func (m *EntitlementManagement) GetAccessPackageResources()([]AccessPackageResourceable) { + return m.accessPackageResources +} +// GetAccessPackages gets the accessPackages property value. Represents access package objects. +func (m *EntitlementManagement) GetAccessPackages()([]AccessPackageable) { + return m.accessPackages +} +// GetConnectedOrganizations gets the connectedOrganizations property value. Represents references to a directory or domain of another organization whose users can request access. +func (m *EntitlementManagement) GetConnectedOrganizations()([]ConnectedOrganizationable) { + return m.connectedOrganizations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EntitlementManagement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accessPackageAssignmentApprovals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Approvalable, len(val)) + for i, v := range val { + res[i] = v.(Approvalable) + } + m.SetAccessPackageAssignmentApprovals(res) + } + return nil + } + res["accessPackageAssignmentPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentPolicyable) + } + m.SetAccessPackageAssignmentPolicies(res) + } + return nil + } + res["accessPackageAssignmentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentRequestable) + } + m.SetAccessPackageAssignmentRequests(res) + } + return nil + } + res["accessPackageAssignmentResourceRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentResourceRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentResourceRoleable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentResourceRoleable) + } + m.SetAccessPackageAssignmentResourceRoles(res) + } + return nil + } + res["accessPackageAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageAssignmentable) + } + m.SetAccessPackageAssignments(res) + } + return nil + } + res["accessPackageCatalogs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageCatalogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageCatalogable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageCatalogable) + } + m.SetAccessPackageCatalogs(res) + } + return nil + } + res["accessPackageResourceEnvironments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceEnvironmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceEnvironmentable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceEnvironmentable) + } + m.SetAccessPackageResourceEnvironments(res) + } + return nil + } + res["accessPackageResourceRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRequestable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRequestable) + } + m.SetAccessPackageResourceRequests(res) + } + return nil + } + res["accessPackageResourceRoleScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceRoleScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceRoleScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceRoleScopeable) + } + m.SetAccessPackageResourceRoleScopes(res) + } + return nil + } + res["accessPackageResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageResourceable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageResourceable) + } + m.SetAccessPackageResources(res) + } + return nil + } + res["accessPackages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageable) + } + m.SetAccessPackages(res) + } + return nil + } + res["connectedOrganizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectedOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectedOrganizationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectedOrganizationable) + } + m.SetConnectedOrganizations(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEntitlementManagementSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(EntitlementManagementSettingsable)) + } + return nil + } + res["subjects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessPackageSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessPackageSubjectable, len(val)) + for i, v := range val { + res[i] = v.(AccessPackageSubjectable) + } + m.SetSubjects(res) + } + return nil + } + return res +} +// GetSettings gets the settings property value. Represents the settings that control the behavior of Azure AD entitlement management. +func (m *EntitlementManagement) GetSettings()(EntitlementManagementSettingsable) { + return m.settings +} +// GetSubjects gets the subjects property value. The subjects property +func (m *EntitlementManagement) GetSubjects()([]AccessPackageSubjectable) { + return m.subjects +} +// Serialize serializes information the current object +func (m *EntitlementManagement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessPackageAssignmentApprovals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentApprovals())) + for i, v := range m.GetAccessPackageAssignmentApprovals() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentApprovals", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignmentPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentPolicies())) + for i, v := range m.GetAccessPackageAssignmentPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentPolicies", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignmentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentRequests())) + for i, v := range m.GetAccessPackageAssignmentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentRequests", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignmentResourceRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignmentResourceRoles())) + for i, v := range m.GetAccessPackageAssignmentResourceRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignmentResourceRoles", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageAssignments())) + for i, v := range m.GetAccessPackageAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageAssignments", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageCatalogs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageCatalogs())) + for i, v := range m.GetAccessPackageCatalogs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageCatalogs", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceEnvironments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceEnvironments())) + for i, v := range m.GetAccessPackageResourceEnvironments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceEnvironments", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceRequests())) + for i, v := range m.GetAccessPackageResourceRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceRequests", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResourceRoleScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResourceRoleScopes())) + for i, v := range m.GetAccessPackageResourceRoleScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResourceRoleScopes", cast) + if err != nil { + return err + } + } + if m.GetAccessPackageResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackageResources())) + for i, v := range m.GetAccessPackageResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackageResources", cast) + if err != nil { + return err + } + } + if m.GetAccessPackages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessPackages())) + for i, v := range m.GetAccessPackages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("accessPackages", cast) + if err != nil { + return err + } + } + if m.GetConnectedOrganizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConnectedOrganizations())) + for i, v := range m.GetConnectedOrganizations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("connectedOrganizations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetSubjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubjects())) + for i, v := range m.GetSubjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("subjects", cast) + if err != nil { + return err + } + } + return nil +} +// SetAccessPackageAssignmentApprovals sets the accessPackageAssignmentApprovals property value. The accessPackageAssignmentApprovals property +func (m *EntitlementManagement) SetAccessPackageAssignmentApprovals(value []Approvalable)() { + m.accessPackageAssignmentApprovals = value +} +// SetAccessPackageAssignmentPolicies sets the accessPackageAssignmentPolicies property value. Represents the policy that governs which subjects can request or be assigned an access package via an access package assignment. +func (m *EntitlementManagement) SetAccessPackageAssignmentPolicies(value []AccessPackageAssignmentPolicyable)() { + m.accessPackageAssignmentPolicies = value +} +// SetAccessPackageAssignmentRequests sets the accessPackageAssignmentRequests property value. Represents access package assignment requests created by or on behalf of a user. +func (m *EntitlementManagement) SetAccessPackageAssignmentRequests(value []AccessPackageAssignmentRequestable)() { + m.accessPackageAssignmentRequests = value +} +// SetAccessPackageAssignmentResourceRoles sets the accessPackageAssignmentResourceRoles property value. Represents the resource-specific role which a subject has been assigned through an access package assignment. +func (m *EntitlementManagement) SetAccessPackageAssignmentResourceRoles(value []AccessPackageAssignmentResourceRoleable)() { + m.accessPackageAssignmentResourceRoles = value +} +// SetAccessPackageAssignments sets the accessPackageAssignments property value. The assignment of an access package to a subject for a period of time. +func (m *EntitlementManagement) SetAccessPackageAssignments(value []AccessPackageAssignmentable)() { + m.accessPackageAssignments = value +} +// SetAccessPackageCatalogs sets the accessPackageCatalogs property value. A container of access packages. +func (m *EntitlementManagement) SetAccessPackageCatalogs(value []AccessPackageCatalogable)() { + m.accessPackageCatalogs = value +} +// SetAccessPackageResourceEnvironments sets the accessPackageResourceEnvironments property value. A reference to the geolocation environment in which a resource is located. +func (m *EntitlementManagement) SetAccessPackageResourceEnvironments(value []AccessPackageResourceEnvironmentable)() { + m.accessPackageResourceEnvironments = value +} +// SetAccessPackageResourceRequests sets the accessPackageResourceRequests property value. Represents a request to add or remove a resource to or from a catalog respectively. +func (m *EntitlementManagement) SetAccessPackageResourceRequests(value []AccessPackageResourceRequestable)() { + m.accessPackageResourceRequests = value +} +// SetAccessPackageResourceRoleScopes sets the accessPackageResourceRoleScopes property value. A reference to both a scope within a resource, and a role in that resource for that scope. +func (m *EntitlementManagement) SetAccessPackageResourceRoleScopes(value []AccessPackageResourceRoleScopeable)() { + m.accessPackageResourceRoleScopes = value +} +// SetAccessPackageResources sets the accessPackageResources property value. A reference to a resource associated with an access package catalog. +func (m *EntitlementManagement) SetAccessPackageResources(value []AccessPackageResourceable)() { + m.accessPackageResources = value +} +// SetAccessPackages sets the accessPackages property value. Represents access package objects. +func (m *EntitlementManagement) SetAccessPackages(value []AccessPackageable)() { + m.accessPackages = value +} +// SetConnectedOrganizations sets the connectedOrganizations property value. Represents references to a directory or domain of another organization whose users can request access. +func (m *EntitlementManagement) SetConnectedOrganizations(value []ConnectedOrganizationable)() { + m.connectedOrganizations = value +} +// SetSettings sets the settings property value. Represents the settings that control the behavior of Azure AD entitlement management. +func (m *EntitlementManagement) SetSettings(value EntitlementManagementSettingsable)() { + m.settings = value +} +// SetSubjects sets the subjects property value. The subjects property +func (m *EntitlementManagement) SetSubjects(value []AccessPackageSubjectable)() { + m.subjects = value +} diff --git a/src/internal/connector/graph/betasdk/models/entitlement_management_settings.go b/src/internal/connector/graph/betasdk/models/entitlement_management_settings.go new file mode 100644 index 000000000..152525199 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entitlement_management_settings.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EntitlementManagementSettings +type EntitlementManagementSettings struct { + Entity + // If externalUserLifecycleAction is BlockSignInAndDelete, the number of days after an external user is blocked from sign in before their account is deleted. + daysUntilExternalUserDeletedAfterBlocked *int32 + // One of None, BlockSignIn, or BlockSignInAndDelete. + externalUserLifecycleAction *string +} +// NewEntitlementManagementSettings instantiates a new entitlementManagementSettings and sets the default values. +func NewEntitlementManagementSettings()(*EntitlementManagementSettings) { + m := &EntitlementManagementSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateEntitlementManagementSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEntitlementManagementSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEntitlementManagementSettings(), nil +} +// GetDaysUntilExternalUserDeletedAfterBlocked gets the daysUntilExternalUserDeletedAfterBlocked property value. If externalUserLifecycleAction is BlockSignInAndDelete, the number of days after an external user is blocked from sign in before their account is deleted. +func (m *EntitlementManagementSettings) GetDaysUntilExternalUserDeletedAfterBlocked()(*int32) { + return m.daysUntilExternalUserDeletedAfterBlocked +} +// GetExternalUserLifecycleAction gets the externalUserLifecycleAction property value. One of None, BlockSignIn, or BlockSignInAndDelete. +func (m *EntitlementManagementSettings) GetExternalUserLifecycleAction()(*string) { + return m.externalUserLifecycleAction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EntitlementManagementSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["daysUntilExternalUserDeletedAfterBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDaysUntilExternalUserDeletedAfterBlocked(val) + } + return nil + } + res["externalUserLifecycleAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUserLifecycleAction(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *EntitlementManagementSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("daysUntilExternalUserDeletedAfterBlocked", m.GetDaysUntilExternalUserDeletedAfterBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalUserLifecycleAction", m.GetExternalUserLifecycleAction()) + if err != nil { + return err + } + } + return nil +} +// SetDaysUntilExternalUserDeletedAfterBlocked sets the daysUntilExternalUserDeletedAfterBlocked property value. If externalUserLifecycleAction is BlockSignInAndDelete, the number of days after an external user is blocked from sign in before their account is deleted. +func (m *EntitlementManagementSettings) SetDaysUntilExternalUserDeletedAfterBlocked(value *int32)() { + m.daysUntilExternalUserDeletedAfterBlocked = value +} +// SetExternalUserLifecycleAction sets the externalUserLifecycleAction property value. One of None, BlockSignIn, or BlockSignInAndDelete. +func (m *EntitlementManagementSettings) SetExternalUserLifecycleAction(value *string)() { + m.externalUserLifecycleAction = value +} diff --git a/src/internal/connector/graph/betasdk/models/entitlement_management_settingsable.go b/src/internal/connector/graph/betasdk/models/entitlement_management_settingsable.go new file mode 100644 index 000000000..8027087ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entitlement_management_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EntitlementManagementSettingsable +type EntitlementManagementSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDaysUntilExternalUserDeletedAfterBlocked()(*int32) + GetExternalUserLifecycleAction()(*string) + SetDaysUntilExternalUserDeletedAfterBlocked(value *int32)() + SetExternalUserLifecycleAction(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/entitlement_managementable.go b/src/internal/connector/graph/betasdk/models/entitlement_managementable.go new file mode 100644 index 000000000..73245f92f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entitlement_managementable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EntitlementManagementable +type EntitlementManagementable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessPackageAssignmentApprovals()([]Approvalable) + GetAccessPackageAssignmentPolicies()([]AccessPackageAssignmentPolicyable) + GetAccessPackageAssignmentRequests()([]AccessPackageAssignmentRequestable) + GetAccessPackageAssignmentResourceRoles()([]AccessPackageAssignmentResourceRoleable) + GetAccessPackageAssignments()([]AccessPackageAssignmentable) + GetAccessPackageCatalogs()([]AccessPackageCatalogable) + GetAccessPackageResourceEnvironments()([]AccessPackageResourceEnvironmentable) + GetAccessPackageResourceRequests()([]AccessPackageResourceRequestable) + GetAccessPackageResourceRoleScopes()([]AccessPackageResourceRoleScopeable) + GetAccessPackageResources()([]AccessPackageResourceable) + GetAccessPackages()([]AccessPackageable) + GetConnectedOrganizations()([]ConnectedOrganizationable) + GetSettings()(EntitlementManagementSettingsable) + GetSubjects()([]AccessPackageSubjectable) + SetAccessPackageAssignmentApprovals(value []Approvalable)() + SetAccessPackageAssignmentPolicies(value []AccessPackageAssignmentPolicyable)() + SetAccessPackageAssignmentRequests(value []AccessPackageAssignmentRequestable)() + SetAccessPackageAssignmentResourceRoles(value []AccessPackageAssignmentResourceRoleable)() + SetAccessPackageAssignments(value []AccessPackageAssignmentable)() + SetAccessPackageCatalogs(value []AccessPackageCatalogable)() + SetAccessPackageResourceEnvironments(value []AccessPackageResourceEnvironmentable)() + SetAccessPackageResourceRequests(value []AccessPackageResourceRequestable)() + SetAccessPackageResourceRoleScopes(value []AccessPackageResourceRoleScopeable)() + SetAccessPackageResources(value []AccessPackageResourceable)() + SetAccessPackages(value []AccessPackageable)() + SetConnectedOrganizations(value []ConnectedOrganizationable)() + SetSettings(value EntitlementManagementSettingsable)() + SetSubjects(value []AccessPackageSubjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/entity.go b/src/internal/connector/graph/betasdk/models/entity.go new file mode 100644 index 000000000..932aeeddc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entity.go @@ -0,0 +1,2867 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Entity +type Entity 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 unique identifier for an entity. Read-only. + id *string + // The OdataType property + odataType *string +} +// NewEntity instantiates a new entity and sets the default values. +func NewEntity()(*Entity) { + m := &Entity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.aadUserConversationMember": + return NewAadUserConversationMember(), nil + case "#microsoft.graph.accessPackage": + return NewAccessPackage(), nil + case "#microsoft.graph.accessPackageAssignment": + return NewAccessPackageAssignment(), nil + case "#microsoft.graph.accessPackageAssignmentPolicy": + return NewAccessPackageAssignmentPolicy(), nil + case "#microsoft.graph.accessPackageAssignmentRequest": + return NewAccessPackageAssignmentRequest(), nil + case "#microsoft.graph.accessPackageAssignmentResourceRole": + return NewAccessPackageAssignmentResourceRole(), nil + case "#microsoft.graph.accessPackageCatalog": + return NewAccessPackageCatalog(), nil + case "#microsoft.graph.accessPackageResource": + return NewAccessPackageResource(), nil + case "#microsoft.graph.accessPackageResourceEnvironment": + return NewAccessPackageResourceEnvironment(), nil + case "#microsoft.graph.accessPackageResourceRequest": + return NewAccessPackageResourceRequest(), nil + case "#microsoft.graph.accessPackageResourceRole": + return NewAccessPackageResourceRole(), nil + case "#microsoft.graph.accessPackageResourceRoleScope": + return NewAccessPackageResourceRoleScope(), nil + case "#microsoft.graph.accessPackageResourceScope": + return NewAccessPackageResourceScope(), nil + case "#microsoft.graph.accessPackageSubject": + return NewAccessPackageSubject(), nil + case "#microsoft.graph.accessReview": + return NewAccessReview(), nil + case "#microsoft.graph.accessReviewDecision": + return NewAccessReviewDecision(), nil + case "#microsoft.graph.accessReviewHistoryDefinition": + return NewAccessReviewHistoryDefinition(), nil + case "#microsoft.graph.accessReviewHistoryInstance": + return NewAccessReviewHistoryInstance(), nil + case "#microsoft.graph.accessReviewInstance": + return NewAccessReviewInstance(), nil + case "#microsoft.graph.accessReviewInstanceDecisionItem": + return NewAccessReviewInstanceDecisionItem(), nil + case "#microsoft.graph.accessReviewPolicy": + return NewAccessReviewPolicy(), nil + case "#microsoft.graph.accessReviewReviewer": + return NewAccessReviewReviewer(), nil + case "#microsoft.graph.accessReviewScheduleDefinition": + return NewAccessReviewScheduleDefinition(), nil + case "#microsoft.graph.accessReviewSet": + return NewAccessReviewSet(), nil + case "#microsoft.graph.accessReviewStage": + return NewAccessReviewStage(), nil + case "#microsoft.graph.account": + return NewAccount(), nil + case "#microsoft.graph.activeDirectoryWindowsAutopilotDeploymentProfile": + return NewActiveDirectoryWindowsAutopilotDeploymentProfile(), nil + case "#microsoft.graph.activityBasedTimeoutPolicy": + return NewActivityBasedTimeoutPolicy(), nil + case "#microsoft.graph.activityHistoryItem": + return NewActivityHistoryItem(), nil + case "#microsoft.graph.activityStatistics": + return NewActivityStatistics(), nil + case "#microsoft.graph.addLargeGalleryViewOperation": + return NewAddLargeGalleryViewOperation(), nil + case "#microsoft.graph.adminConsentRequestPolicy": + return NewAdminConsentRequestPolicy(), nil + case "#microsoft.graph.administrativeUnit": + return NewAdministrativeUnit(), nil + case "#microsoft.graph.adminReportSettings": + return NewAdminReportSettings(), nil + case "#microsoft.graph.advancedThreatProtectionOnboardingDeviceSettingState": + return NewAdvancedThreatProtectionOnboardingDeviceSettingState(), nil + case "#microsoft.graph.advancedThreatProtectionOnboardingStateSummary": + return NewAdvancedThreatProtectionOnboardingStateSummary(), nil + case "#microsoft.graph.agedAccountsPayable": + return NewAgedAccountsPayable(), nil + case "#microsoft.graph.agedAccountsReceivable": + return NewAgedAccountsReceivable(), nil + case "#microsoft.graph.agreement": + return NewAgreement(), nil + case "#microsoft.graph.agreementAcceptance": + return NewAgreementAcceptance(), nil + case "#microsoft.graph.agreementFile": + return NewAgreementFile(), nil + case "#microsoft.graph.agreementFileLocalization": + return NewAgreementFileLocalization(), nil + case "#microsoft.graph.agreementFileProperties": + return NewAgreementFileProperties(), nil + case "#microsoft.graph.agreementFileVersion": + return NewAgreementFileVersion(), nil + case "#microsoft.graph.alert": + return NewAlert(), nil + case "#microsoft.graph.allowedDataLocation": + return NewAllowedDataLocation(), nil + case "#microsoft.graph.allowedValue": + return NewAllowedValue(), nil + case "#microsoft.graph.androidCertificateProfileBase": + return NewAndroidCertificateProfileBase(), nil + case "#microsoft.graph.androidCompliancePolicy": + return NewAndroidCompliancePolicy(), nil + case "#microsoft.graph.androidCustomConfiguration": + return NewAndroidCustomConfiguration(), nil + case "#microsoft.graph.androidDeviceComplianceLocalActionBase": + return NewAndroidDeviceComplianceLocalActionBase(), nil + case "#microsoft.graph.androidDeviceComplianceLocalActionLockDevice": + return NewAndroidDeviceComplianceLocalActionLockDevice(), nil + case "#microsoft.graph.androidDeviceComplianceLocalActionLockDeviceWithPasscode": + return NewAndroidDeviceComplianceLocalActionLockDeviceWithPasscode(), nil + case "#microsoft.graph.androidDeviceOwnerCertificateProfileBase": + return NewAndroidDeviceOwnerCertificateProfileBase(), nil + case "#microsoft.graph.androidDeviceOwnerCompliancePolicy": + return NewAndroidDeviceOwnerCompliancePolicy(), nil + case "#microsoft.graph.androidDeviceOwnerDerivedCredentialAuthenticationConfiguration": + return NewAndroidDeviceOwnerDerivedCredentialAuthenticationConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerEnrollmentProfile": + return NewAndroidDeviceOwnerEnrollmentProfile(), nil + case "#microsoft.graph.androidDeviceOwnerEnterpriseWiFiConfiguration": + return NewAndroidDeviceOwnerEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerGeneralDeviceConfiguration": + return NewAndroidDeviceOwnerGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerImportedPFXCertificateProfile": + return NewAndroidDeviceOwnerImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerPkcsCertificateProfile": + return NewAndroidDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerScepCertificateProfile": + return NewAndroidDeviceOwnerScepCertificateProfile(), nil + case "#microsoft.graph.androidDeviceOwnerTrustedRootCertificate": + return NewAndroidDeviceOwnerTrustedRootCertificate(), nil + case "#microsoft.graph.androidDeviceOwnerVpnConfiguration": + return NewAndroidDeviceOwnerVpnConfiguration(), nil + case "#microsoft.graph.androidDeviceOwnerWiFiConfiguration": + return NewAndroidDeviceOwnerWiFiConfiguration(), nil + case "#microsoft.graph.androidEasEmailProfileConfiguration": + return NewAndroidEasEmailProfileConfiguration(), nil + case "#microsoft.graph.androidEnterpriseWiFiConfiguration": + return NewAndroidEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidForWorkApp": + return NewAndroidForWorkApp(), nil + case "#microsoft.graph.androidForWorkAppConfigurationSchema": + return NewAndroidForWorkAppConfigurationSchema(), nil + case "#microsoft.graph.androidForWorkCertificateProfileBase": + return NewAndroidForWorkCertificateProfileBase(), nil + case "#microsoft.graph.androidForWorkCompliancePolicy": + return NewAndroidForWorkCompliancePolicy(), nil + case "#microsoft.graph.androidForWorkCustomConfiguration": + return NewAndroidForWorkCustomConfiguration(), nil + case "#microsoft.graph.androidForWorkEasEmailProfileBase": + return NewAndroidForWorkEasEmailProfileBase(), nil + case "#microsoft.graph.androidForWorkEnrollmentProfile": + return NewAndroidForWorkEnrollmentProfile(), nil + case "#microsoft.graph.androidForWorkEnterpriseWiFiConfiguration": + return NewAndroidForWorkEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidForWorkGeneralDeviceConfiguration": + return NewAndroidForWorkGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidForWorkGmailEasConfiguration": + return NewAndroidForWorkGmailEasConfiguration(), nil + case "#microsoft.graph.androidForWorkImportedPFXCertificateProfile": + return NewAndroidForWorkImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidForWorkMobileAppConfiguration": + return NewAndroidForWorkMobileAppConfiguration(), nil + case "#microsoft.graph.androidForWorkNineWorkEasConfiguration": + return NewAndroidForWorkNineWorkEasConfiguration(), nil + case "#microsoft.graph.androidForWorkPkcsCertificateProfile": + return NewAndroidForWorkPkcsCertificateProfile(), nil + case "#microsoft.graph.androidForWorkScepCertificateProfile": + return NewAndroidForWorkScepCertificateProfile(), nil + case "#microsoft.graph.androidForWorkSettings": + return NewAndroidForWorkSettings(), nil + case "#microsoft.graph.androidForWorkTrustedRootCertificate": + return NewAndroidForWorkTrustedRootCertificate(), nil + case "#microsoft.graph.androidForWorkVpnConfiguration": + return NewAndroidForWorkVpnConfiguration(), nil + case "#microsoft.graph.androidForWorkWiFiConfiguration": + return NewAndroidForWorkWiFiConfiguration(), nil + case "#microsoft.graph.androidGeneralDeviceConfiguration": + return NewAndroidGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidImportedPFXCertificateProfile": + return NewAndroidImportedPFXCertificateProfile(), nil + case "#microsoft.graph.androidLobApp": + return NewAndroidLobApp(), nil + case "#microsoft.graph.androidManagedAppProtection": + return NewAndroidManagedAppProtection(), nil + case "#microsoft.graph.androidManagedAppRegistration": + return NewAndroidManagedAppRegistration(), nil + case "#microsoft.graph.androidManagedStoreAccountEnterpriseSettings": + return NewAndroidManagedStoreAccountEnterpriseSettings(), nil + case "#microsoft.graph.androidManagedStoreApp": + return NewAndroidManagedStoreApp(), nil + case "#microsoft.graph.androidManagedStoreAppConfiguration": + return NewAndroidManagedStoreAppConfiguration(), nil + case "#microsoft.graph.androidManagedStoreAppConfigurationSchema": + return NewAndroidManagedStoreAppConfigurationSchema(), nil + case "#microsoft.graph.androidManagedStoreWebApp": + return NewAndroidManagedStoreWebApp(), nil + case "#microsoft.graph.androidOmaCpConfiguration": + return NewAndroidOmaCpConfiguration(), nil + case "#microsoft.graph.androidPkcsCertificateProfile": + return NewAndroidPkcsCertificateProfile(), nil + case "#microsoft.graph.androidScepCertificateProfile": + return NewAndroidScepCertificateProfile(), nil + case "#microsoft.graph.androidStoreApp": + return NewAndroidStoreApp(), nil + case "#microsoft.graph.androidTrustedRootCertificate": + return NewAndroidTrustedRootCertificate(), nil + case "#microsoft.graph.androidVpnConfiguration": + return NewAndroidVpnConfiguration(), nil + case "#microsoft.graph.androidWiFiConfiguration": + return NewAndroidWiFiConfiguration(), nil + case "#microsoft.graph.androidWorkProfileCertificateProfileBase": + return NewAndroidWorkProfileCertificateProfileBase(), nil + case "#microsoft.graph.androidWorkProfileCompliancePolicy": + return NewAndroidWorkProfileCompliancePolicy(), nil + case "#microsoft.graph.androidWorkProfileCustomConfiguration": + return NewAndroidWorkProfileCustomConfiguration(), nil + case "#microsoft.graph.androidWorkProfileEasEmailProfileBase": + return NewAndroidWorkProfileEasEmailProfileBase(), nil + case "#microsoft.graph.androidWorkProfileEnterpriseWiFiConfiguration": + return NewAndroidWorkProfileEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.androidWorkProfileGeneralDeviceConfiguration": + return NewAndroidWorkProfileGeneralDeviceConfiguration(), nil + case "#microsoft.graph.androidWorkProfileGmailEasConfiguration": + return NewAndroidWorkProfileGmailEasConfiguration(), nil + case "#microsoft.graph.androidWorkProfileNineWorkEasConfiguration": + return NewAndroidWorkProfileNineWorkEasConfiguration(), nil + case "#microsoft.graph.androidWorkProfilePkcsCertificateProfile": + return NewAndroidWorkProfilePkcsCertificateProfile(), nil + case "#microsoft.graph.androidWorkProfileScepCertificateProfile": + return NewAndroidWorkProfileScepCertificateProfile(), nil + case "#microsoft.graph.androidWorkProfileTrustedRootCertificate": + return NewAndroidWorkProfileTrustedRootCertificate(), nil + case "#microsoft.graph.androidWorkProfileVpnConfiguration": + return NewAndroidWorkProfileVpnConfiguration(), nil + case "#microsoft.graph.androidWorkProfileWiFiConfiguration": + return NewAndroidWorkProfileWiFiConfiguration(), nil + case "#microsoft.graph.anonymousGuestConversationMember": + return NewAnonymousGuestConversationMember(), nil + case "#microsoft.graph.aospDeviceOwnerCertificateProfileBase": + return NewAospDeviceOwnerCertificateProfileBase(), nil + case "#microsoft.graph.aospDeviceOwnerCompliancePolicy": + return NewAospDeviceOwnerCompliancePolicy(), nil + case "#microsoft.graph.aospDeviceOwnerDeviceConfiguration": + return NewAospDeviceOwnerDeviceConfiguration(), nil + case "#microsoft.graph.aospDeviceOwnerEnterpriseWiFiConfiguration": + return NewAospDeviceOwnerEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.aospDeviceOwnerPkcsCertificateProfile": + return NewAospDeviceOwnerPkcsCertificateProfile(), nil + case "#microsoft.graph.aospDeviceOwnerScepCertificateProfile": + return NewAospDeviceOwnerScepCertificateProfile(), nil + case "#microsoft.graph.aospDeviceOwnerTrustedRootCertificate": + return NewAospDeviceOwnerTrustedRootCertificate(), nil + case "#microsoft.graph.aospDeviceOwnerWiFiConfiguration": + return NewAospDeviceOwnerWiFiConfiguration(), nil + case "#microsoft.graph.appConsentApprovalRoute": + return NewAppConsentApprovalRoute(), nil + case "#microsoft.graph.appConsentRequest": + return NewAppConsentRequest(), nil + case "#microsoft.graph.appleDeviceFeaturesConfigurationBase": + return NewAppleDeviceFeaturesConfigurationBase(), nil + case "#microsoft.graph.appleEnrollmentProfileAssignment": + return NewAppleEnrollmentProfileAssignment(), nil + case "#microsoft.graph.appleExpeditedCheckinConfigurationBase": + return NewAppleExpeditedCheckinConfigurationBase(), nil + case "#microsoft.graph.appleManagedIdentityProvider": + return NewAppleManagedIdentityProvider(), nil + case "#microsoft.graph.applePushNotificationCertificate": + return NewApplePushNotificationCertificate(), nil + case "#microsoft.graph.appleUserInitiatedEnrollmentProfile": + return NewAppleUserInitiatedEnrollmentProfile(), nil + case "#microsoft.graph.appleVpnConfiguration": + return NewAppleVpnConfiguration(), nil + case "#microsoft.graph.appleVppTokenTroubleshootingEvent": + return NewAppleVppTokenTroubleshootingEvent(), nil + case "#microsoft.graph.application": + return NewApplication(), nil + case "#microsoft.graph.applicationSegment": + return NewApplicationSegment(), nil + case "#microsoft.graph.applicationSignInDetailedSummary": + return NewApplicationSignInDetailedSummary(), nil + case "#microsoft.graph.applicationSignInSummary": + return NewApplicationSignInSummary(), nil + case "#microsoft.graph.applicationTemplate": + return NewApplicationTemplate(), nil + case "#microsoft.graph.appLogCollectionRequest": + return NewAppLogCollectionRequest(), nil + case "#microsoft.graph.appManagementPolicy": + return NewAppManagementPolicy(), nil + case "#microsoft.graph.appRoleAssignment": + return NewAppRoleAssignment(), nil + case "#microsoft.graph.approval": + return NewApproval(), nil + case "#microsoft.graph.approvalStep": + return NewApprovalStep(), nil + case "#microsoft.graph.approvalWorkflowProvider": + return NewApprovalWorkflowProvider(), nil + case "#microsoft.graph.appScope": + return NewAppScope(), nil + case "#microsoft.graph.appVulnerabilityManagedDevice": + return NewAppVulnerabilityManagedDevice(), nil + case "#microsoft.graph.appVulnerabilityMobileApp": + return NewAppVulnerabilityMobileApp(), nil + case "#microsoft.graph.appVulnerabilityTask": + return NewAppVulnerabilityTask(), nil + case "#microsoft.graph.assignmentFilterEvaluationStatusDetails": + return NewAssignmentFilterEvaluationStatusDetails(), nil + case "#microsoft.graph.associatedTeamInfo": + return NewAssociatedTeamInfo(), nil + case "#microsoft.graph.attachment": + return NewAttachment(), nil + case "#microsoft.graph.attachmentBase": + return NewAttachmentBase(), nil + case "#microsoft.graph.attachmentSession": + return NewAttachmentSession(), nil + case "#microsoft.graph.attackSimulationOperation": + return NewAttackSimulationOperation(), nil + case "#microsoft.graph.attackSimulationRoot": + return NewAttackSimulationRoot(), nil + case "#microsoft.graph.attendanceRecord": + return NewAttendanceRecord(), nil + case "#microsoft.graph.attributeMappingFunctionSchema": + return NewAttributeMappingFunctionSchema(), nil + case "#microsoft.graph.attributeSet": + return NewAttributeSet(), nil + case "#microsoft.graph.audioRoutingGroup": + return NewAudioRoutingGroup(), nil + case "#microsoft.graph.auditEvent": + return NewAuditEvent(), nil + case "#microsoft.graph.authentication": + return NewAuthentication(), nil + case "#microsoft.graph.authenticationCombinationConfiguration": + return NewAuthenticationCombinationConfiguration(), nil + case "#microsoft.graph.authenticationContextClassReference": + return NewAuthenticationContextClassReference(), nil + case "#microsoft.graph.authenticationEventListener": + return NewAuthenticationEventListener(), nil + case "#microsoft.graph.authenticationEventsPolicy": + return NewAuthenticationEventsPolicy(), nil + case "#microsoft.graph.authenticationFlowsPolicy": + return NewAuthenticationFlowsPolicy(), nil + case "#microsoft.graph.authenticationListener": + return NewAuthenticationListener(), nil + case "#microsoft.graph.authenticationMethod": + return NewAuthenticationMethod(), nil + case "#microsoft.graph.authenticationMethodConfiguration": + return NewAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.authenticationMethodModeDetail": + return NewAuthenticationMethodModeDetail(), nil + case "#microsoft.graph.authenticationMethodsPolicy": + return NewAuthenticationMethodsPolicy(), nil + case "#microsoft.graph.authenticationMethodsRoot": + return NewAuthenticationMethodsRoot(), nil + case "#microsoft.graph.authenticationMethodTarget": + return NewAuthenticationMethodTarget(), nil + case "#microsoft.graph.authenticationStrengthPolicy": + return NewAuthenticationStrengthPolicy(), nil + case "#microsoft.graph.authenticationStrengthRoot": + return NewAuthenticationStrengthRoot(), nil + case "#microsoft.graph.authoredNote": + return NewAuthoredNote(), nil + case "#microsoft.graph.authorizationPolicy": + return NewAuthorizationPolicy(), nil + case "#microsoft.graph.azureADWindowsAutopilotDeploymentProfile": + return NewAzureADWindowsAutopilotDeploymentProfile(), nil + case "#microsoft.graph.azureCommunicationServicesUserConversationMember": + return NewAzureCommunicationServicesUserConversationMember(), nil + case "#microsoft.graph.b2cAuthenticationMethodsPolicy": + return NewB2cAuthenticationMethodsPolicy(), nil + case "#microsoft.graph.b2cIdentityUserFlow": + return NewB2cIdentityUserFlow(), nil + case "#microsoft.graph.b2xIdentityUserFlow": + return NewB2xIdentityUserFlow(), nil + case "#microsoft.graph.baseItem": + return NewBaseItem(), nil + case "#microsoft.graph.baseItemVersion": + return NewBaseItemVersion(), nil + case "#microsoft.graph.bitlocker": + return NewBitlocker(), nil + case "#microsoft.graph.bitlockerRecoveryKey": + return NewBitlockerRecoveryKey(), nil + case "#microsoft.graph.bookingAppointment": + return NewBookingAppointment(), nil + case "#microsoft.graph.bookingBusiness": + return NewBookingBusiness(), nil + case "#microsoft.graph.bookingCurrency": + return NewBookingCurrency(), nil + case "#microsoft.graph.bookingCustomer": + return NewBookingCustomer(), nil + case "#microsoft.graph.bookingCustomQuestion": + return NewBookingCustomQuestion(), nil + case "#microsoft.graph.bookingNamedEntity": + return NewBookingNamedEntity(), nil + case "#microsoft.graph.bookingPerson": + return NewBookingPerson(), nil + case "#microsoft.graph.bookingService": + return NewBookingService(), nil + case "#microsoft.graph.bookingStaffMember": + return NewBookingStaffMember(), nil + case "#microsoft.graph.browserSharedCookie": + return NewBrowserSharedCookie(), nil + case "#microsoft.graph.browserSite": + return NewBrowserSite(), nil + case "#microsoft.graph.browserSiteList": + return NewBrowserSiteList(), nil + case "#microsoft.graph.builtInIdentityProvider": + return NewBuiltInIdentityProvider(), nil + case "#microsoft.graph.businessFlow": + return NewBusinessFlow(), nil + case "#microsoft.graph.businessFlowTemplate": + return NewBusinessFlowTemplate(), nil + case "#microsoft.graph.businessScenario": + return NewBusinessScenario(), nil + case "#microsoft.graph.businessScenarioPlanner": + return NewBusinessScenarioPlanner(), nil + case "#microsoft.graph.businessScenarioPlanReference": + return NewBusinessScenarioPlanReference(), nil + case "#microsoft.graph.businessScenarioTask": + return NewBusinessScenarioTask(), nil + case "#microsoft.graph.calendar": + return NewCalendar(), nil + case "#microsoft.graph.calendarGroup": + return NewCalendarGroup(), nil + case "#microsoft.graph.calendarPermission": + return NewCalendarPermission(), nil + case "#microsoft.graph.calendarSharingMessage": + return NewCalendarSharingMessage(), nil + case "#microsoft.graph.call": + return NewCall(), nil + case "#microsoft.graph.callActivityStatistics": + return NewCallActivityStatistics(), nil + case "#microsoft.graph.callTranscript": + return NewCallTranscript(), nil + case "#microsoft.graph.cancelMediaProcessingOperation": + return NewCancelMediaProcessingOperation(), nil + case "#microsoft.graph.canvasLayout": + return NewCanvasLayout(), nil + case "#microsoft.graph.cartToClassAssociation": + return NewCartToClassAssociation(), nil + case "#microsoft.graph.certificateBasedAuthConfiguration": + return NewCertificateBasedAuthConfiguration(), nil + case "#microsoft.graph.certificateConnectorDetails": + return NewCertificateConnectorDetails(), nil + case "#microsoft.graph.changeTrackedEntity": + return NewChangeTrackedEntity(), nil + case "#microsoft.graph.channel": + return NewChannel(), nil + case "#microsoft.graph.chat": + return NewChat(), nil + case "#microsoft.graph.chatActivityStatistics": + return NewChatActivityStatistics(), nil + case "#microsoft.graph.chatMessage": + return NewChatMessage(), nil + case "#microsoft.graph.chatMessageHostedContent": + return NewChatMessageHostedContent(), nil + case "#microsoft.graph.chatMessageInfo": + return NewChatMessageInfo(), nil + case "#microsoft.graph.checklistItem": + return NewChecklistItem(), nil + case "#microsoft.graph.chromeOSOnboardingSettings": + return NewChromeOSOnboardingSettings(), nil + case "#microsoft.graph.claimsMappingPolicy": + return NewClaimsMappingPolicy(), nil + case "#microsoft.graph.classificationJobResponse": + return NewClassificationJobResponse(), nil + case "#microsoft.graph.cloudAppSecurityProfile": + return NewCloudAppSecurityProfile(), nil + case "#microsoft.graph.cloudCommunications": + return NewCloudCommunications(), nil + case "#microsoft.graph.cloudPC": + return NewCloudPC(), nil + case "#microsoft.graph.cloudPcAuditEvent": + return NewCloudPcAuditEvent(), nil + case "#microsoft.graph.cloudPCConnectivityIssue": + return NewCloudPCConnectivityIssue(), nil + case "#microsoft.graph.cloudPcCrossCloudGovernmentOrganizationMapping": + return NewCloudPcCrossCloudGovernmentOrganizationMapping(), nil + case "#microsoft.graph.cloudPcDeviceImage": + return NewCloudPcDeviceImage(), nil + case "#microsoft.graph.cloudPcExportJob": + return NewCloudPcExportJob(), nil + case "#microsoft.graph.cloudPcExternalPartnerSetting": + return NewCloudPcExternalPartnerSetting(), nil + case "#microsoft.graph.cloudPcGalleryImage": + return NewCloudPcGalleryImage(), nil + case "#microsoft.graph.cloudPcOnPremisesConnection": + return NewCloudPcOnPremisesConnection(), nil + case "#microsoft.graph.cloudPcOrganizationSettings": + return NewCloudPcOrganizationSettings(), nil + case "#microsoft.graph.cloudPcProvisioningPolicy": + return NewCloudPcProvisioningPolicy(), nil + case "#microsoft.graph.cloudPcProvisioningPolicyAssignment": + return NewCloudPcProvisioningPolicyAssignment(), nil + case "#microsoft.graph.cloudPcReports": + return NewCloudPcReports(), nil + case "#microsoft.graph.cloudPcServicePlan": + return NewCloudPcServicePlan(), nil + case "#microsoft.graph.cloudPcSharedUseServicePlan": + return NewCloudPcSharedUseServicePlan(), nil + case "#microsoft.graph.cloudPcSnapshot": + return NewCloudPcSnapshot(), nil + case "#microsoft.graph.cloudPcSupportedRegion": + return NewCloudPcSupportedRegion(), nil + case "#microsoft.graph.cloudPcUserSetting": + return NewCloudPcUserSetting(), nil + case "#microsoft.graph.cloudPcUserSettingAssignment": + return NewCloudPcUserSettingAssignment(), nil + case "#microsoft.graph.columnDefinition": + return NewColumnDefinition(), nil + case "#microsoft.graph.columnLink": + return NewColumnLink(), nil + case "#microsoft.graph.comanagementEligibleDevice": + return NewComanagementEligibleDevice(), nil + case "#microsoft.graph.command": + return NewCommand(), nil + case "#microsoft.graph.commsOperation": + return NewCommsOperation(), nil + case "#microsoft.graph.company": + return NewCompany(), nil + case "#microsoft.graph.companyInformation": + return NewCompanyInformation(), nil + case "#microsoft.graph.complianceManagementPartner": + return NewComplianceManagementPartner(), nil + case "#microsoft.graph.conditionalAccessPolicy": + return NewConditionalAccessPolicy(), nil + case "#microsoft.graph.conditionalAccessRoot": + return NewConditionalAccessRoot(), nil + case "#microsoft.graph.conditionalAccessTemplate": + return NewConditionalAccessTemplate(), nil + case "#microsoft.graph.configManagerCollection": + return NewConfigManagerCollection(), nil + case "#microsoft.graph.connectedOrganization": + return NewConnectedOrganization(), nil + case "#microsoft.graph.connectionOperation": + return NewConnectionOperation(), nil + case "#microsoft.graph.connector": + return NewConnector(), nil + case "#microsoft.graph.connectorGroup": + return NewConnectorGroup(), nil + case "#microsoft.graph.contact": + return NewContact(), nil + case "#microsoft.graph.contactFolder": + return NewContactFolder(), nil + case "#microsoft.graph.contactMergeSuggestions": + return NewContactMergeSuggestions(), nil + case "#microsoft.graph.contentSharingSession": + return NewContentSharingSession(), nil + case "#microsoft.graph.contentType": + return NewContentType(), nil + case "#microsoft.graph.continuousAccessEvaluationPolicy": + return NewContinuousAccessEvaluationPolicy(), nil + case "#microsoft.graph.contract": + return NewContract(), nil + case "#microsoft.graph.conversation": + return NewConversation(), nil + case "#microsoft.graph.conversationMember": + return NewConversationMember(), nil + case "#microsoft.graph.conversationThread": + return NewConversationThread(), nil + case "#microsoft.graph.corsConfiguration_v2": + return NewCorsConfiguration_v2(), nil + case "#microsoft.graph.countryNamedLocation": + return NewCountryNamedLocation(), nil + case "#microsoft.graph.countryRegion": + return NewCountryRegion(), nil + case "#microsoft.graph.credentialUsageSummary": + return NewCredentialUsageSummary(), nil + case "#microsoft.graph.credentialUserRegistrationCount": + return NewCredentialUserRegistrationCount(), nil + case "#microsoft.graph.credentialUserRegistrationDetails": + return NewCredentialUserRegistrationDetails(), nil + case "#microsoft.graph.crossTenantAccessPolicy": + return NewCrossTenantAccessPolicy(), nil + case "#microsoft.graph.crossTenantAccessPolicyConfigurationDefault": + return NewCrossTenantAccessPolicyConfigurationDefault(), nil + case "#microsoft.graph.currency": + return NewCurrency(), nil + case "#microsoft.graph.customAccessPackageWorkflowExtension": + return NewCustomAccessPackageWorkflowExtension(), nil + case "#microsoft.graph.customAuthenticationExtension": + return NewCustomAuthenticationExtension(), nil + case "#microsoft.graph.customCalloutExtension": + return NewCustomCalloutExtension(), nil + case "#microsoft.graph.customer": + return NewCustomer(), nil + case "#microsoft.graph.customerPayment": + return NewCustomerPayment(), nil + case "#microsoft.graph.customerPaymentJournal": + return NewCustomerPaymentJournal(), nil + case "#microsoft.graph.customExtensionHandler": + return NewCustomExtensionHandler(), nil + case "#microsoft.graph.customSecurityAttributeDefinition": + return NewCustomSecurityAttributeDefinition(), nil + case "#microsoft.graph.dataClassificationService": + return NewDataClassificationService(), nil + case "#microsoft.graph.dataLossPreventionPolicy": + return NewDataLossPreventionPolicy(), nil + case "#microsoft.graph.dataPolicyOperation": + return NewDataPolicyOperation(), nil + case "#microsoft.graph.dataSharingConsent": + return NewDataSharingConsent(), nil + case "#microsoft.graph.defaultDeviceCompliancePolicy": + return NewDefaultDeviceCompliancePolicy(), nil + case "#microsoft.graph.defaultManagedAppProtection": + return NewDefaultManagedAppProtection(), nil + case "#microsoft.graph.defaultUserRoleOverride": + return NewDefaultUserRoleOverride(), nil + case "#microsoft.graph.delegatedAdminAccessAssignment": + return NewDelegatedAdminAccessAssignment(), nil + case "#microsoft.graph.delegatedAdminCustomer": + return NewDelegatedAdminCustomer(), nil + case "#microsoft.graph.delegatedAdminRelationship": + return NewDelegatedAdminRelationship(), nil + case "#microsoft.graph.delegatedAdminRelationshipOperation": + return NewDelegatedAdminRelationshipOperation(), nil + case "#microsoft.graph.delegatedAdminRelationshipRequest": + return NewDelegatedAdminRelationshipRequest(), nil + case "#microsoft.graph.delegatedAdminServiceManagementDetail": + return NewDelegatedAdminServiceManagementDetail(), nil + case "#microsoft.graph.delegatedPermissionClassification": + return NewDelegatedPermissionClassification(), nil + case "#microsoft.graph.deletedItemContainer": + return NewDeletedItemContainer(), nil + case "#microsoft.graph.deletedTeam": + return NewDeletedTeam(), nil + case "#microsoft.graph.depEnrollmentBaseProfile": + return NewDepEnrollmentBaseProfile(), nil + case "#microsoft.graph.depEnrollmentProfile": + return NewDepEnrollmentProfile(), nil + case "#microsoft.graph.depIOSEnrollmentProfile": + return NewDepIOSEnrollmentProfile(), nil + case "#microsoft.graph.depMacOSEnrollmentProfile": + return NewDepMacOSEnrollmentProfile(), nil + case "#microsoft.graph.depOnboardingSetting": + return NewDepOnboardingSetting(), nil + case "#microsoft.graph.detectedApp": + return NewDetectedApp(), nil + case "#microsoft.graph.device": + return NewDevice(), nil + case "#microsoft.graph.deviceAndAppManagementAssignmentFilter": + return NewDeviceAndAppManagementAssignmentFilter(), nil + case "#microsoft.graph.deviceAndAppManagementRoleAssignment": + return NewDeviceAndAppManagementRoleAssignment(), nil + case "#microsoft.graph.deviceAndAppManagementRoleDefinition": + return NewDeviceAndAppManagementRoleDefinition(), nil + case "#microsoft.graph.deviceAppManagement": + return NewDeviceAppManagement(), nil + case "#microsoft.graph.deviceAppManagementTask": + return NewDeviceAppManagementTask(), nil + case "#microsoft.graph.deviceCategory": + return NewDeviceCategory(), nil + case "#microsoft.graph.deviceComanagementAuthorityConfiguration": + return NewDeviceComanagementAuthorityConfiguration(), nil + case "#microsoft.graph.deviceComplianceActionItem": + return NewDeviceComplianceActionItem(), nil + case "#microsoft.graph.deviceComplianceDeviceOverview": + return NewDeviceComplianceDeviceOverview(), nil + case "#microsoft.graph.deviceComplianceDeviceStatus": + return NewDeviceComplianceDeviceStatus(), nil + case "#microsoft.graph.deviceCompliancePolicy": + return NewDeviceCompliancePolicy(), nil + case "#microsoft.graph.deviceCompliancePolicyAssignment": + return NewDeviceCompliancePolicyAssignment(), nil + case "#microsoft.graph.deviceCompliancePolicyDeviceStateSummary": + return NewDeviceCompliancePolicyDeviceStateSummary(), nil + case "#microsoft.graph.deviceCompliancePolicyGroupAssignment": + return NewDeviceCompliancePolicyGroupAssignment(), nil + case "#microsoft.graph.deviceCompliancePolicyPolicySetItem": + return NewDeviceCompliancePolicyPolicySetItem(), nil + case "#microsoft.graph.deviceCompliancePolicySettingStateSummary": + return NewDeviceCompliancePolicySettingStateSummary(), nil + case "#microsoft.graph.deviceCompliancePolicyState": + return NewDeviceCompliancePolicyState(), nil + case "#microsoft.graph.deviceComplianceScheduledActionForRule": + return NewDeviceComplianceScheduledActionForRule(), nil + case "#microsoft.graph.deviceComplianceScript": + return NewDeviceComplianceScript(), nil + case "#microsoft.graph.deviceComplianceScriptDeviceState": + return NewDeviceComplianceScriptDeviceState(), nil + case "#microsoft.graph.deviceComplianceScriptRunSummary": + return NewDeviceComplianceScriptRunSummary(), nil + case "#microsoft.graph.deviceComplianceSettingState": + return NewDeviceComplianceSettingState(), nil + case "#microsoft.graph.deviceComplianceUserOverview": + return NewDeviceComplianceUserOverview(), nil + case "#microsoft.graph.deviceComplianceUserStatus": + return NewDeviceComplianceUserStatus(), nil + case "#microsoft.graph.deviceConfiguration": + return NewDeviceConfiguration(), nil + case "#microsoft.graph.deviceConfigurationAssignment": + return NewDeviceConfigurationAssignment(), nil + case "#microsoft.graph.deviceConfigurationConflictSummary": + return NewDeviceConfigurationConflictSummary(), nil + case "#microsoft.graph.deviceConfigurationDeviceOverview": + return NewDeviceConfigurationDeviceOverview(), nil + case "#microsoft.graph.deviceConfigurationDeviceStateSummary": + return NewDeviceConfigurationDeviceStateSummary(), nil + case "#microsoft.graph.deviceConfigurationDeviceStatus": + return NewDeviceConfigurationDeviceStatus(), nil + case "#microsoft.graph.deviceConfigurationGroupAssignment": + return NewDeviceConfigurationGroupAssignment(), nil + case "#microsoft.graph.deviceConfigurationPolicySetItem": + return NewDeviceConfigurationPolicySetItem(), nil + case "#microsoft.graph.deviceConfigurationState": + return NewDeviceConfigurationState(), nil + case "#microsoft.graph.deviceConfigurationUserOverview": + return NewDeviceConfigurationUserOverview(), nil + case "#microsoft.graph.deviceConfigurationUserStateSummary": + return NewDeviceConfigurationUserStateSummary(), nil + case "#microsoft.graph.deviceConfigurationUserStatus": + return NewDeviceConfigurationUserStatus(), nil + case "#microsoft.graph.deviceCustomAttributeShellScript": + return NewDeviceCustomAttributeShellScript(), nil + case "#microsoft.graph.deviceEnrollmentConfiguration": + return NewDeviceEnrollmentConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentLimitConfiguration": + return NewDeviceEnrollmentLimitConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentNotificationConfiguration": + return NewDeviceEnrollmentNotificationConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentPlatformRestrictionConfiguration": + return NewDeviceEnrollmentPlatformRestrictionConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentPlatformRestrictionsConfiguration": + return NewDeviceEnrollmentPlatformRestrictionsConfiguration(), nil + case "#microsoft.graph.deviceEnrollmentWindowsHelloForBusinessConfiguration": + return NewDeviceEnrollmentWindowsHelloForBusinessConfiguration(), nil + case "#microsoft.graph.deviceHealthScript": + return NewDeviceHealthScript(), nil + case "#microsoft.graph.deviceHealthScriptAssignment": + return NewDeviceHealthScriptAssignment(), nil + case "#microsoft.graph.deviceHealthScriptDeviceState": + return NewDeviceHealthScriptDeviceState(), nil + case "#microsoft.graph.deviceHealthScriptRunSummary": + return NewDeviceHealthScriptRunSummary(), nil + case "#microsoft.graph.deviceInstallState": + return NewDeviceInstallState(), nil + case "#microsoft.graph.deviceLogCollectionResponse": + return NewDeviceLogCollectionResponse(), nil + case "#microsoft.graph.deviceManagement": + return NewDeviceManagement(), nil + case "#microsoft.graph.deviceManagementAbstractComplexSettingDefinition": + return NewDeviceManagementAbstractComplexSettingDefinition(), nil + case "#microsoft.graph.deviceManagementAbstractComplexSettingInstance": + return NewDeviceManagementAbstractComplexSettingInstance(), nil + case "#microsoft.graph.deviceManagementAutopilotEvent": + return NewDeviceManagementAutopilotEvent(), nil + case "#microsoft.graph.deviceManagementAutopilotPolicyStatusDetail": + return NewDeviceManagementAutopilotPolicyStatusDetail(), nil + case "#microsoft.graph.deviceManagementBooleanSettingInstance": + return NewDeviceManagementBooleanSettingInstance(), nil + case "#microsoft.graph.deviceManagementCachedReportConfiguration": + return NewDeviceManagementCachedReportConfiguration(), nil + case "#microsoft.graph.deviceManagementCollectionSettingDefinition": + return NewDeviceManagementCollectionSettingDefinition(), nil + case "#microsoft.graph.deviceManagementCollectionSettingInstance": + return NewDeviceManagementCollectionSettingInstance(), nil + case "#microsoft.graph.deviceManagementComplexSettingDefinition": + return NewDeviceManagementComplexSettingDefinition(), nil + case "#microsoft.graph.deviceManagementComplexSettingInstance": + return NewDeviceManagementComplexSettingInstance(), nil + case "#microsoft.graph.deviceManagementComplianceActionItem": + return NewDeviceManagementComplianceActionItem(), nil + case "#microsoft.graph.deviceManagementCompliancePolicy": + return NewDeviceManagementCompliancePolicy(), nil + case "#microsoft.graph.deviceManagementComplianceScheduledActionForRule": + return NewDeviceManagementComplianceScheduledActionForRule(), nil + case "#microsoft.graph.deviceManagementConfigurationCategory": + return NewDeviceManagementConfigurationCategory(), nil + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingCollectionDefinition": + return NewDeviceManagementConfigurationChoiceSettingCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationChoiceSettingDefinition": + return NewDeviceManagementConfigurationChoiceSettingDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationPolicy": + return NewDeviceManagementConfigurationPolicy(), nil + case "#microsoft.graph.deviceManagementConfigurationPolicyAssignment": + return NewDeviceManagementConfigurationPolicyAssignment(), nil + case "#microsoft.graph.deviceManagementConfigurationPolicyPolicySetItem": + return NewDeviceManagementConfigurationPolicyPolicySetItem(), nil + case "#microsoft.graph.deviceManagementConfigurationPolicyTemplate": + return NewDeviceManagementConfigurationPolicyTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationRedirectSettingDefinition": + return NewDeviceManagementConfigurationRedirectSettingDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSetting": + return NewDeviceManagementConfigurationSetting(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingDefinition": + return NewDeviceManagementConfigurationSettingDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupCollectionDefinition": + return NewDeviceManagementConfigurationSettingGroupCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingGroupDefinition": + return NewDeviceManagementConfigurationSettingGroupDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSettingTemplate": + return NewDeviceManagementConfigurationSettingTemplate(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingCollectionDefinition": + return NewDeviceManagementConfigurationSimpleSettingCollectionDefinition(), nil + case "#microsoft.graph.deviceManagementConfigurationSimpleSettingDefinition": + return NewDeviceManagementConfigurationSimpleSettingDefinition(), nil + case "#microsoft.graph.deviceManagementDerivedCredentialSettings": + return NewDeviceManagementDerivedCredentialSettings(), nil + case "#microsoft.graph.deviceManagementDomainJoinConnector": + return NewDeviceManagementDomainJoinConnector(), nil + case "#microsoft.graph.deviceManagementExchangeConnector": + return NewDeviceManagementExchangeConnector(), nil + case "#microsoft.graph.deviceManagementExchangeOnPremisesPolicy": + return NewDeviceManagementExchangeOnPremisesPolicy(), nil + case "#microsoft.graph.deviceManagementExportJob": + return NewDeviceManagementExportJob(), nil + case "#microsoft.graph.deviceManagementIntegerSettingInstance": + return NewDeviceManagementIntegerSettingInstance(), nil + case "#microsoft.graph.deviceManagementIntent": + return NewDeviceManagementIntent(), nil + case "#microsoft.graph.deviceManagementIntentAssignment": + return NewDeviceManagementIntentAssignment(), nil + case "#microsoft.graph.deviceManagementIntentDeviceSettingStateSummary": + return NewDeviceManagementIntentDeviceSettingStateSummary(), nil + case "#microsoft.graph.deviceManagementIntentDeviceState": + return NewDeviceManagementIntentDeviceState(), nil + case "#microsoft.graph.deviceManagementIntentDeviceStateSummary": + return NewDeviceManagementIntentDeviceStateSummary(), nil + case "#microsoft.graph.deviceManagementIntentSettingCategory": + return NewDeviceManagementIntentSettingCategory(), nil + case "#microsoft.graph.deviceManagementIntentUserState": + return NewDeviceManagementIntentUserState(), nil + case "#microsoft.graph.deviceManagementIntentUserStateSummary": + return NewDeviceManagementIntentUserStateSummary(), nil + case "#microsoft.graph.deviceManagementPartner": + return NewDeviceManagementPartner(), nil + case "#microsoft.graph.deviceManagementReports": + return NewDeviceManagementReports(), nil + case "#microsoft.graph.deviceManagementResourceAccessProfileAssignment": + return NewDeviceManagementResourceAccessProfileAssignment(), nil + case "#microsoft.graph.deviceManagementResourceAccessProfileBase": + return NewDeviceManagementResourceAccessProfileBase(), nil + case "#microsoft.graph.deviceManagementReusablePolicySetting": + return NewDeviceManagementReusablePolicySetting(), nil + case "#microsoft.graph.deviceManagementScript": + return NewDeviceManagementScript(), nil + case "#microsoft.graph.deviceManagementScriptAssignment": + return NewDeviceManagementScriptAssignment(), nil + case "#microsoft.graph.deviceManagementScriptDeviceState": + return NewDeviceManagementScriptDeviceState(), nil + case "#microsoft.graph.deviceManagementScriptGroupAssignment": + return NewDeviceManagementScriptGroupAssignment(), nil + case "#microsoft.graph.deviceManagementScriptPolicySetItem": + return NewDeviceManagementScriptPolicySetItem(), nil + case "#microsoft.graph.deviceManagementScriptRunSummary": + return NewDeviceManagementScriptRunSummary(), nil + case "#microsoft.graph.deviceManagementScriptUserState": + return NewDeviceManagementScriptUserState(), nil + case "#microsoft.graph.deviceManagementSettingCategory": + return NewDeviceManagementSettingCategory(), nil + case "#microsoft.graph.deviceManagementSettingDefinition": + return NewDeviceManagementSettingDefinition(), nil + case "#microsoft.graph.deviceManagementSettingInstance": + return NewDeviceManagementSettingInstance(), nil + case "#microsoft.graph.deviceManagementStringSettingInstance": + return NewDeviceManagementStringSettingInstance(), nil + case "#microsoft.graph.deviceManagementTemplate": + return NewDeviceManagementTemplate(), nil + case "#microsoft.graph.deviceManagementTemplateSettingCategory": + return NewDeviceManagementTemplateSettingCategory(), nil + case "#microsoft.graph.deviceManagementTroubleshootingEvent": + return NewDeviceManagementTroubleshootingEvent(), nil + case "#microsoft.graph.deviceRegistrationPolicy": + return NewDeviceRegistrationPolicy(), nil + case "#microsoft.graph.deviceSetupConfiguration": + return NewDeviceSetupConfiguration(), nil + case "#microsoft.graph.deviceShellScript": + return NewDeviceShellScript(), nil + case "#microsoft.graph.dimension": + return NewDimension(), nil + case "#microsoft.graph.dimensionValue": + return NewDimensionValue(), nil + case "#microsoft.graph.directory": + return NewDirectory(), nil + case "#microsoft.graph.directoryAudit": + return NewDirectoryAudit(), nil + case "#microsoft.graph.directoryDefinition": + return NewDirectoryDefinition(), nil + case "#microsoft.graph.directoryObject": + return NewDirectoryObject(), nil + case "#microsoft.graph.directoryObjectPartnerReference": + return NewDirectoryObjectPartnerReference(), nil + case "#microsoft.graph.directoryRole": + return NewDirectoryRole(), nil + case "#microsoft.graph.directoryRoleAccessReviewPolicy": + return NewDirectoryRoleAccessReviewPolicy(), nil + case "#microsoft.graph.directoryRoleTemplate": + return NewDirectoryRoleTemplate(), nil + case "#microsoft.graph.directorySetting": + return NewDirectorySetting(), nil + case "#microsoft.graph.directorySettingTemplate": + return NewDirectorySettingTemplate(), nil + case "#microsoft.graph.dlpEvaluatePoliciesJobResponse": + return NewDlpEvaluatePoliciesJobResponse(), nil + case "#microsoft.graph.document": + return NewDocument(), nil + case "#microsoft.graph.documentComment": + return NewDocumentComment(), nil + case "#microsoft.graph.documentCommentReply": + return NewDocumentCommentReply(), nil + case "#microsoft.graph.documentSetVersion": + return NewDocumentSetVersion(), nil + case "#microsoft.graph.domain": + return NewDomain(), nil + case "#microsoft.graph.domainDnsCnameRecord": + return NewDomainDnsCnameRecord(), nil + case "#microsoft.graph.domainDnsMxRecord": + return NewDomainDnsMxRecord(), nil + case "#microsoft.graph.domainDnsRecord": + return NewDomainDnsRecord(), nil + case "#microsoft.graph.domainDnsSrvRecord": + return NewDomainDnsSrvRecord(), nil + case "#microsoft.graph.domainDnsTxtRecord": + return NewDomainDnsTxtRecord(), nil + case "#microsoft.graph.domainDnsUnavailableRecord": + return NewDomainDnsUnavailableRecord(), nil + case "#microsoft.graph.domainSecurityProfile": + return NewDomainSecurityProfile(), nil + case "#microsoft.graph.drive": + return NewDrive(), nil + case "#microsoft.graph.driveItem": + return NewDriveItem(), nil + case "#microsoft.graph.driveItemVersion": + return NewDriveItemVersion(), nil + case "#microsoft.graph.easEmailProfileConfigurationBase": + return NewEasEmailProfileConfigurationBase(), nil + case "#microsoft.graph.eBookInstallSummary": + return NewEBookInstallSummary(), nil + case "#microsoft.graph.edge": + return NewEdge(), nil + case "#microsoft.graph.editionUpgradeConfiguration": + return NewEditionUpgradeConfiguration(), nil + case "#microsoft.graph.educationalActivity": + return NewEducationalActivity(), nil + case "#microsoft.graph.educationAssignment": + return NewEducationAssignment(), nil + case "#microsoft.graph.educationAssignmentDefaults": + return NewEducationAssignmentDefaults(), nil + case "#microsoft.graph.educationAssignmentResource": + return NewEducationAssignmentResource(), nil + case "#microsoft.graph.educationAssignmentSettings": + return NewEducationAssignmentSettings(), nil + case "#microsoft.graph.educationCategory": + return NewEducationCategory(), nil + case "#microsoft.graph.educationClass": + return NewEducationClass(), nil + case "#microsoft.graph.educationFeedbackOutcome": + return NewEducationFeedbackOutcome(), nil + case "#microsoft.graph.educationFeedbackResourceOutcome": + return NewEducationFeedbackResourceOutcome(), nil + case "#microsoft.graph.educationOrganization": + return NewEducationOrganization(), nil + case "#microsoft.graph.educationOutcome": + return NewEducationOutcome(), nil + case "#microsoft.graph.educationPointsOutcome": + return NewEducationPointsOutcome(), nil + case "#microsoft.graph.educationRubric": + return NewEducationRubric(), nil + case "#microsoft.graph.educationRubricOutcome": + return NewEducationRubricOutcome(), nil + case "#microsoft.graph.educationSchool": + return NewEducationSchool(), nil + case "#microsoft.graph.educationSubmission": + return NewEducationSubmission(), nil + case "#microsoft.graph.educationSubmissionResource": + return NewEducationSubmissionResource(), nil + case "#microsoft.graph.educationSynchronizationError": + return NewEducationSynchronizationError(), nil + case "#microsoft.graph.educationSynchronizationProfile": + return NewEducationSynchronizationProfile(), nil + case "#microsoft.graph.educationSynchronizationProfileStatus": + return NewEducationSynchronizationProfileStatus(), nil + case "#microsoft.graph.educationUser": + return NewEducationUser(), nil + case "#microsoft.graph.emailActivityStatistics": + return NewEmailActivityStatistics(), nil + case "#microsoft.graph.emailAuthenticationMethod": + return NewEmailAuthenticationMethod(), nil + case "#microsoft.graph.emailAuthenticationMethodConfiguration": + return NewEmailAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.emailFileAssessmentRequest": + return NewEmailFileAssessmentRequest(), nil + case "#microsoft.graph.embeddedSIMActivationCodePool": + return NewEmbeddedSIMActivationCodePool(), nil + case "#microsoft.graph.embeddedSIMActivationCodePoolAssignment": + return NewEmbeddedSIMActivationCodePoolAssignment(), nil + case "#microsoft.graph.embeddedSIMDeviceState": + return NewEmbeddedSIMDeviceState(), nil + case "#microsoft.graph.employee": + return NewEmployee(), nil + case "#microsoft.graph.endpoint": + return NewEndpoint(), nil + case "#microsoft.graph.enrollmentConfigurationAssignment": + return NewEnrollmentConfigurationAssignment(), nil + case "#microsoft.graph.enrollmentProfile": + return NewEnrollmentProfile(), nil + case "#microsoft.graph.enrollmentRestrictionsConfigurationPolicySetItem": + return NewEnrollmentRestrictionsConfigurationPolicySetItem(), nil + case "#microsoft.graph.enrollmentTroubleshootingEvent": + return NewEnrollmentTroubleshootingEvent(), nil + case "#microsoft.graph.enterpriseCodeSigningCertificate": + return NewEnterpriseCodeSigningCertificate(), nil + case "#microsoft.graph.entitlementManagement": + return NewEntitlementManagement(), nil + case "#microsoft.graph.entitlementManagementSettings": + return NewEntitlementManagementSettings(), nil + case "#microsoft.graph.evaluateLabelJobResponse": + return NewEvaluateLabelJobResponse(), nil + case "#microsoft.graph.event": + return NewEvent(), nil + case "#microsoft.graph.eventMessage": + return NewEventMessage(), nil + case "#microsoft.graph.eventMessageRequest": + return NewEventMessageRequest(), nil + case "#microsoft.graph.eventMessageResponse": + return NewEventMessageResponse(), nil + case "#microsoft.graph.exactMatchDataStore": + return NewExactMatchDataStore(), nil + case "#microsoft.graph.exactMatchDataStoreBase": + return NewExactMatchDataStoreBase(), nil + case "#microsoft.graph.exactMatchJobBase": + return NewExactMatchJobBase(), nil + case "#microsoft.graph.exactMatchLookupJob": + return NewExactMatchLookupJob(), nil + case "#microsoft.graph.exactMatchSession": + return NewExactMatchSession(), nil + case "#microsoft.graph.exactMatchSessionBase": + return NewExactMatchSessionBase(), nil + case "#microsoft.graph.exactMatchUploadAgent": + return NewExactMatchUploadAgent(), nil + case "#microsoft.graph.extension": + return NewExtension(), nil + case "#microsoft.graph.extensionProperty": + return NewExtensionProperty(), nil + case "#microsoft.graph.external": + return NewExternal(), nil + case "#microsoft.graph.externalConnection": + return NewExternalConnection(), nil + case "#microsoft.graph.externalDomainName": + return NewExternalDomainName(), nil + case "#microsoft.graph.externalGroup": + return NewExternalGroup(), nil + case "#microsoft.graph.externalIdentitiesPolicy": + return NewExternalIdentitiesPolicy(), nil + case "#microsoft.graph.externalItem": + return NewExternalItem(), nil + case "#microsoft.graph.externalMeetingRegistrant": + return NewExternalMeetingRegistrant(), nil + case "#microsoft.graph.externalMeetingRegistration": + return NewExternalMeetingRegistration(), nil + case "#microsoft.graph.featureRolloutPolicy": + return NewFeatureRolloutPolicy(), nil + case "#microsoft.graph.federatedIdentityCredential": + return NewFederatedIdentityCredential(), nil + case "#microsoft.graph.fido2AuthenticationMethod": + return NewFido2AuthenticationMethod(), nil + case "#microsoft.graph.fido2AuthenticationMethodConfiguration": + return NewFido2AuthenticationMethodConfiguration(), nil + case "#microsoft.graph.fido2CombinationConfiguration": + return NewFido2CombinationConfiguration(), nil + case "#microsoft.graph.fieldValueSet": + return NewFieldValueSet(), nil + case "#microsoft.graph.fileAssessmentRequest": + return NewFileAssessmentRequest(), nil + case "#microsoft.graph.fileAttachment": + return NewFileAttachment(), nil + case "#microsoft.graph.fileClassificationRequest": + return NewFileClassificationRequest(), nil + case "#microsoft.graph.fileSecurityProfile": + return NewFileSecurityProfile(), nil + case "#microsoft.graph.filterOperatorSchema": + return NewFilterOperatorSchema(), nil + case "#microsoft.graph.focusActivityStatistics": + return NewFocusActivityStatistics(), nil + case "#microsoft.graph.generalLedgerEntry": + return NewGeneralLedgerEntry(), nil + case "#microsoft.graph.governanceInsight": + return NewGovernanceInsight(), nil + case "#microsoft.graph.governancePolicyTemplate": + return NewGovernancePolicyTemplate(), nil + case "#microsoft.graph.governanceResource": + return NewGovernanceResource(), nil + case "#microsoft.graph.governanceRoleAssignment": + return NewGovernanceRoleAssignment(), nil + case "#microsoft.graph.governanceRoleAssignmentRequest": + return NewGovernanceRoleAssignmentRequest(), nil + case "#microsoft.graph.governanceRoleDefinition": + return NewGovernanceRoleDefinition(), nil + case "#microsoft.graph.governanceRoleSetting": + return NewGovernanceRoleSetting(), nil + case "#microsoft.graph.governanceSubject": + return NewGovernanceSubject(), nil + case "#microsoft.graph.group": + return NewGroup(), nil + case "#microsoft.graph.groupLifecyclePolicy": + return NewGroupLifecyclePolicy(), nil + case "#microsoft.graph.groupPolicyCategory": + return NewGroupPolicyCategory(), nil + case "#microsoft.graph.groupPolicyConfiguration": + return NewGroupPolicyConfiguration(), nil + case "#microsoft.graph.groupPolicyConfigurationAssignment": + return NewGroupPolicyConfigurationAssignment(), nil + case "#microsoft.graph.groupPolicyDefinition": + return NewGroupPolicyDefinition(), nil + case "#microsoft.graph.groupPolicyDefinitionFile": + return NewGroupPolicyDefinitionFile(), nil + case "#microsoft.graph.groupPolicyDefinitionValue": + return NewGroupPolicyDefinitionValue(), nil + case "#microsoft.graph.groupPolicyMigrationReport": + return NewGroupPolicyMigrationReport(), nil + case "#microsoft.graph.groupPolicyObjectFile": + return NewGroupPolicyObjectFile(), nil + case "#microsoft.graph.groupPolicyOperation": + return NewGroupPolicyOperation(), nil + case "#microsoft.graph.groupPolicyPresentation": + return NewGroupPolicyPresentation(), nil + case "#microsoft.graph.groupPolicyPresentationCheckBox": + return NewGroupPolicyPresentationCheckBox(), nil + case "#microsoft.graph.groupPolicyPresentationComboBox": + return NewGroupPolicyPresentationComboBox(), nil + case "#microsoft.graph.groupPolicyPresentationDecimalTextBox": + return NewGroupPolicyPresentationDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationDropdownList": + return NewGroupPolicyPresentationDropdownList(), nil + case "#microsoft.graph.groupPolicyPresentationListBox": + return NewGroupPolicyPresentationListBox(), nil + case "#microsoft.graph.groupPolicyPresentationLongDecimalTextBox": + return NewGroupPolicyPresentationLongDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationMultiTextBox": + return NewGroupPolicyPresentationMultiTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationText": + return NewGroupPolicyPresentationText(), nil + case "#microsoft.graph.groupPolicyPresentationTextBox": + return NewGroupPolicyPresentationTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationValue": + return NewGroupPolicyPresentationValue(), nil + case "#microsoft.graph.groupPolicyPresentationValueBoolean": + return NewGroupPolicyPresentationValueBoolean(), nil + case "#microsoft.graph.groupPolicyPresentationValueDecimal": + return NewGroupPolicyPresentationValueDecimal(), nil + case "#microsoft.graph.groupPolicyPresentationValueList": + return NewGroupPolicyPresentationValueList(), nil + case "#microsoft.graph.groupPolicyPresentationValueLongDecimal": + return NewGroupPolicyPresentationValueLongDecimal(), nil + case "#microsoft.graph.groupPolicyPresentationValueMultiText": + return NewGroupPolicyPresentationValueMultiText(), nil + case "#microsoft.graph.groupPolicyPresentationValueText": + return NewGroupPolicyPresentationValueText(), nil + case "#microsoft.graph.groupPolicySettingMapping": + return NewGroupPolicySettingMapping(), nil + case "#microsoft.graph.groupPolicyUploadedDefinitionFile": + return NewGroupPolicyUploadedDefinitionFile(), nil + case "#microsoft.graph.groupPolicyUploadedPresentation": + return NewGroupPolicyUploadedPresentation(), nil + case "#microsoft.graph.homeRealmDiscoveryPolicy": + return NewHomeRealmDiscoveryPolicy(), nil + case "#microsoft.graph.horizontalSection": + return NewHorizontalSection(), nil + case "#microsoft.graph.horizontalSectionColumn": + return NewHorizontalSectionColumn(), nil + case "#microsoft.graph.hostSecurityProfile": + return NewHostSecurityProfile(), nil + case "#microsoft.graph.identityApiConnector": + return NewIdentityApiConnector(), nil + case "#microsoft.graph.identityBuiltInUserFlowAttribute": + return NewIdentityBuiltInUserFlowAttribute(), nil + case "#microsoft.graph.identityCustomUserFlowAttribute": + return NewIdentityCustomUserFlowAttribute(), nil + case "#microsoft.graph.identityProvider": + return NewIdentityProvider(), nil + case "#microsoft.graph.identityProviderBase": + return NewIdentityProviderBase(), nil + case "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy": + return NewIdentitySecurityDefaultsEnforcementPolicy(), nil + case "#microsoft.graph.identityUserFlow": + return NewIdentityUserFlow(), nil + case "#microsoft.graph.identityUserFlowAttribute": + return NewIdentityUserFlowAttribute(), nil + case "#microsoft.graph.identityUserFlowAttributeAssignment": + return NewIdentityUserFlowAttributeAssignment(), nil + case "#microsoft.graph.impactedResource": + return NewImpactedResource(), nil + case "#microsoft.graph.importedAppleDeviceIdentity": + return NewImportedAppleDeviceIdentity(), nil + case "#microsoft.graph.importedAppleDeviceIdentityResult": + return NewImportedAppleDeviceIdentityResult(), nil + case "#microsoft.graph.importedDeviceIdentity": + return NewImportedDeviceIdentity(), nil + case "#microsoft.graph.importedDeviceIdentityResult": + return NewImportedDeviceIdentityResult(), nil + case "#microsoft.graph.importedWindowsAutopilotDeviceIdentity": + return NewImportedWindowsAutopilotDeviceIdentity(), nil + case "#microsoft.graph.importedWindowsAutopilotDeviceIdentityUpload": + return NewImportedWindowsAutopilotDeviceIdentityUpload(), nil + case "#microsoft.graph.inferenceClassification": + return NewInferenceClassification(), nil + case "#microsoft.graph.inferenceClassificationOverride": + return NewInferenceClassificationOverride(), nil + case "#microsoft.graph.informationProtection": + return NewInformationProtection(), nil + case "#microsoft.graph.informationProtectionLabel": + return NewInformationProtectionLabel(), nil + case "#microsoft.graph.informationProtectionPolicy": + return NewInformationProtectionPolicy(), nil + case "#microsoft.graph.insightsSettings": + return NewInsightsSettings(), nil + case "#microsoft.graph.internalDomainFederation": + return NewInternalDomainFederation(), nil + case "#microsoft.graph.internetExplorerMode": + return NewInternetExplorerMode(), nil + case "#microsoft.graph.intuneBrandingProfile": + return NewIntuneBrandingProfile(), nil + case "#microsoft.graph.intuneBrandingProfileAssignment": + return NewIntuneBrandingProfileAssignment(), nil + case "#microsoft.graph.invitation": + return NewInvitation(), nil + case "#microsoft.graph.inviteParticipantsOperation": + return NewInviteParticipantsOperation(), nil + case "#microsoft.graph.invokeUserFlowListener": + return NewInvokeUserFlowListener(), nil + case "#microsoft.graph.iosCertificateProfile": + return NewIosCertificateProfile(), nil + case "#microsoft.graph.iosCertificateProfileBase": + return NewIosCertificateProfileBase(), nil + case "#microsoft.graph.iosCompliancePolicy": + return NewIosCompliancePolicy(), nil + case "#microsoft.graph.iosCustomConfiguration": + return NewIosCustomConfiguration(), nil + case "#microsoft.graph.iosDerivedCredentialAuthenticationConfiguration": + return NewIosDerivedCredentialAuthenticationConfiguration(), nil + case "#microsoft.graph.iosDeviceFeaturesConfiguration": + return NewIosDeviceFeaturesConfiguration(), nil + case "#microsoft.graph.iosEasEmailProfileConfiguration": + return NewIosEasEmailProfileConfiguration(), nil + case "#microsoft.graph.iosEducationDeviceConfiguration": + return NewIosEducationDeviceConfiguration(), nil + case "#microsoft.graph.iosEduDeviceConfiguration": + return NewIosEduDeviceConfiguration(), nil + case "#microsoft.graph.iosEnterpriseWiFiConfiguration": + return NewIosEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.iosExpeditedCheckinConfiguration": + return NewIosExpeditedCheckinConfiguration(), nil + case "#microsoft.graph.iosGeneralDeviceConfiguration": + return NewIosGeneralDeviceConfiguration(), nil + case "#microsoft.graph.iosikEv2VpnConfiguration": + return NewIosikEv2VpnConfiguration(), nil + case "#microsoft.graph.iosImportedPFXCertificateProfile": + return NewIosImportedPFXCertificateProfile(), nil + case "#microsoft.graph.iosiPadOSWebClip": + return NewIosiPadOSWebClip(), nil + case "#microsoft.graph.iosLobApp": + return NewIosLobApp(), nil + case "#microsoft.graph.iosLobAppProvisioningConfiguration": + return NewIosLobAppProvisioningConfiguration(), nil + case "#microsoft.graph.iosLobAppProvisioningConfigurationAssignment": + return NewIosLobAppProvisioningConfigurationAssignment(), nil + case "#microsoft.graph.iosLobAppProvisioningConfigurationPolicySetItem": + return NewIosLobAppProvisioningConfigurationPolicySetItem(), nil + case "#microsoft.graph.iosManagedAppProtection": + return NewIosManagedAppProtection(), nil + case "#microsoft.graph.iosManagedAppRegistration": + return NewIosManagedAppRegistration(), nil + case "#microsoft.graph.iosMobileAppConfiguration": + return NewIosMobileAppConfiguration(), nil + case "#microsoft.graph.iosPkcsCertificateProfile": + return NewIosPkcsCertificateProfile(), nil + case "#microsoft.graph.iosScepCertificateProfile": + return NewIosScepCertificateProfile(), nil + case "#microsoft.graph.iosStoreApp": + return NewIosStoreApp(), nil + case "#microsoft.graph.iosTrustedRootCertificate": + return NewIosTrustedRootCertificate(), nil + case "#microsoft.graph.iosUpdateConfiguration": + return NewIosUpdateConfiguration(), nil + case "#microsoft.graph.iosUpdateDeviceStatus": + return NewIosUpdateDeviceStatus(), nil + case "#microsoft.graph.iosVpnConfiguration": + return NewIosVpnConfiguration(), nil + case "#microsoft.graph.iosVppApp": + return NewIosVppApp(), nil + case "#microsoft.graph.iosVppAppAssignedDeviceLicense": + return NewIosVppAppAssignedDeviceLicense(), nil + case "#microsoft.graph.iosVppAppAssignedLicense": + return NewIosVppAppAssignedLicense(), nil + case "#microsoft.graph.iosVppAppAssignedUserLicense": + return NewIosVppAppAssignedUserLicense(), nil + case "#microsoft.graph.iosVppEBook": + return NewIosVppEBook(), nil + case "#microsoft.graph.iosVppEBookAssignment": + return NewIosVppEBookAssignment(), nil + case "#microsoft.graph.iosWiFiConfiguration": + return NewIosWiFiConfiguration(), nil + case "#microsoft.graph.ipApplicationSegment": + return NewIpApplicationSegment(), nil + case "#microsoft.graph.ipNamedLocation": + return NewIpNamedLocation(), nil + case "#microsoft.graph.ipSecurityProfile": + return NewIpSecurityProfile(), nil + case "#microsoft.graph.item": + return NewItem(), nil + case "#microsoft.graph.itemActivity": + return NewItemActivity(), nil + case "#microsoft.graph.itemActivityOLD": + return NewItemActivityOLD(), nil + case "#microsoft.graph.itemActivityStat": + return NewItemActivityStat(), nil + case "#microsoft.graph.itemAddress": + return NewItemAddress(), nil + case "#microsoft.graph.itemAnalytics": + return NewItemAnalytics(), nil + case "#microsoft.graph.itemAttachment": + return NewItemAttachment(), nil + case "#microsoft.graph.itemCategory": + return NewItemCategory(), nil + case "#microsoft.graph.itemEmail": + return NewItemEmail(), nil + case "#microsoft.graph.itemFacet": + return NewItemFacet(), nil + case "#microsoft.graph.itemInsights": + return NewItemInsights(), nil + case "#microsoft.graph.itemPatent": + return NewItemPatent(), nil + case "#microsoft.graph.itemPhone": + return NewItemPhone(), nil + case "#microsoft.graph.itemPublication": + return NewItemPublication(), nil + case "#microsoft.graph.jobResponseBase": + return NewJobResponseBase(), nil + case "#microsoft.graph.journal": + return NewJournal(), nil + case "#microsoft.graph.journalLine": + return NewJournalLine(), nil + case "#microsoft.graph.languageProficiency": + return NewLanguageProficiency(), nil + case "#microsoft.graph.learningContent": + return NewLearningContent(), nil + case "#microsoft.graph.learningProvider": + return NewLearningProvider(), nil + case "#microsoft.graph.licenseDetails": + return NewLicenseDetails(), nil + case "#microsoft.graph.linkedResource": + return NewLinkedResource(), nil + case "#microsoft.graph.list": + return NewList(), nil + case "#microsoft.graph.listItem": + return NewListItem(), nil + case "#microsoft.graph.listItemVersion": + return NewListItemVersion(), nil + case "#microsoft.graph.localizedNotificationMessage": + return NewLocalizedNotificationMessage(), nil + case "#microsoft.graph.longRunningOperation": + return NewLongRunningOperation(), nil + case "#microsoft.graph.lookupResultRow": + return NewLookupResultRow(), nil + case "#microsoft.graph.macOSCertificateProfileBase": + return NewMacOSCertificateProfileBase(), nil + case "#microsoft.graph.macOSCompliancePolicy": + return NewMacOSCompliancePolicy(), nil + case "#microsoft.graph.macOSCustomAppConfiguration": + return NewMacOSCustomAppConfiguration(), nil + case "#microsoft.graph.macOSCustomConfiguration": + return NewMacOSCustomConfiguration(), nil + case "#microsoft.graph.macOSDeviceFeaturesConfiguration": + return NewMacOSDeviceFeaturesConfiguration(), nil + case "#microsoft.graph.macOSDmgApp": + return NewMacOSDmgApp(), nil + case "#microsoft.graph.macOSEndpointProtectionConfiguration": + return NewMacOSEndpointProtectionConfiguration(), nil + case "#microsoft.graph.macOSEnterpriseWiFiConfiguration": + return NewMacOSEnterpriseWiFiConfiguration(), nil + case "#microsoft.graph.macOSExtensionsConfiguration": + return NewMacOSExtensionsConfiguration(), nil + case "#microsoft.graph.macOSGeneralDeviceConfiguration": + return NewMacOSGeneralDeviceConfiguration(), nil + case "#microsoft.graph.macOSImportedPFXCertificateProfile": + return NewMacOSImportedPFXCertificateProfile(), nil + case "#microsoft.graph.macOSLobApp": + return NewMacOSLobApp(), nil + case "#microsoft.graph.macOSMdatpApp": + return NewMacOSMdatpApp(), nil + case "#microsoft.graph.macOSMicrosoftDefenderApp": + return NewMacOSMicrosoftDefenderApp(), nil + case "#microsoft.graph.macOSMicrosoftEdgeApp": + return NewMacOSMicrosoftEdgeApp(), nil + case "#microsoft.graph.macOSOfficeSuiteApp": + return NewMacOSOfficeSuiteApp(), nil + case "#microsoft.graph.macOSPkcsCertificateProfile": + return NewMacOSPkcsCertificateProfile(), nil + case "#microsoft.graph.macOSScepCertificateProfile": + return NewMacOSScepCertificateProfile(), nil + case "#microsoft.graph.macOSSoftwareUpdateAccountSummary": + return NewMacOSSoftwareUpdateAccountSummary(), nil + case "#microsoft.graph.macOSSoftwareUpdateCategorySummary": + return NewMacOSSoftwareUpdateCategorySummary(), nil + case "#microsoft.graph.macOSSoftwareUpdateConfiguration": + return NewMacOSSoftwareUpdateConfiguration(), nil + case "#microsoft.graph.macOSSoftwareUpdateStateSummary": + return NewMacOSSoftwareUpdateStateSummary(), nil + case "#microsoft.graph.macOSTrustedRootCertificate": + return NewMacOSTrustedRootCertificate(), nil + case "#microsoft.graph.macOSVpnConfiguration": + return NewMacOSVpnConfiguration(), nil + case "#microsoft.graph.macOsVppApp": + return NewMacOsVppApp(), nil + case "#microsoft.graph.macOsVppAppAssignedLicense": + return NewMacOsVppAppAssignedLicense(), nil + case "#microsoft.graph.macOSWiFiConfiguration": + return NewMacOSWiFiConfiguration(), nil + case "#microsoft.graph.macOSWiredNetworkConfiguration": + return NewMacOSWiredNetworkConfiguration(), nil + case "#microsoft.graph.mailAssessmentRequest": + return NewMailAssessmentRequest(), nil + case "#microsoft.graph.mailFolder": + return NewMailFolder(), nil + case "#microsoft.graph.mailSearchFolder": + return NewMailSearchFolder(), nil + case "#microsoft.graph.malwareStateForWindowsDevice": + return NewMalwareStateForWindowsDevice(), nil + case "#microsoft.graph.managedAllDeviceCertificateState": + return NewManagedAllDeviceCertificateState(), nil + case "#microsoft.graph.managedAndroidLobApp": + return NewManagedAndroidLobApp(), nil + case "#microsoft.graph.managedAndroidStoreApp": + return NewManagedAndroidStoreApp(), nil + case "#microsoft.graph.managedApp": + return NewManagedApp(), nil + case "#microsoft.graph.managedAppConfiguration": + return NewManagedAppConfiguration(), nil + case "#microsoft.graph.managedAppOperation": + return NewManagedAppOperation(), nil + case "#microsoft.graph.managedAppPolicy": + return NewManagedAppPolicy(), nil + case "#microsoft.graph.managedAppPolicyDeploymentSummary": + return NewManagedAppPolicyDeploymentSummary(), nil + case "#microsoft.graph.managedAppProtection": + return NewManagedAppProtection(), nil + case "#microsoft.graph.managedAppProtectionPolicySetItem": + return NewManagedAppProtectionPolicySetItem(), nil + case "#microsoft.graph.managedAppRegistration": + return NewManagedAppRegistration(), nil + case "#microsoft.graph.managedAppStatus": + return NewManagedAppStatus(), nil + case "#microsoft.graph.managedAppStatusRaw": + return NewManagedAppStatusRaw(), nil + case "#microsoft.graph.managedDevice": + return NewManagedDevice(), nil + case "#microsoft.graph.managedDeviceCertificateState": + return NewManagedDeviceCertificateState(), nil + case "#microsoft.graph.managedDeviceEncryptionState": + return NewManagedDeviceEncryptionState(), nil + case "#microsoft.graph.managedDeviceMobileAppConfiguration": + return NewManagedDeviceMobileAppConfiguration(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationAssignment": + return NewManagedDeviceMobileAppConfigurationAssignment(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationDeviceStatus": + return NewManagedDeviceMobileAppConfigurationDeviceStatus(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationDeviceSummary": + return NewManagedDeviceMobileAppConfigurationDeviceSummary(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationPolicySetItem": + return NewManagedDeviceMobileAppConfigurationPolicySetItem(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationState": + return NewManagedDeviceMobileAppConfigurationState(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationUserStatus": + return NewManagedDeviceMobileAppConfigurationUserStatus(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationUserSummary": + return NewManagedDeviceMobileAppConfigurationUserSummary(), nil + case "#microsoft.graph.managedDeviceOverview": + return NewManagedDeviceOverview(), nil + case "#microsoft.graph.managedEBook": + return NewManagedEBook(), nil + case "#microsoft.graph.managedEBookAssignment": + return NewManagedEBookAssignment(), nil + case "#microsoft.graph.managedEBookCategory": + return NewManagedEBookCategory(), nil + case "#microsoft.graph.managedIOSLobApp": + return NewManagedIOSLobApp(), nil + case "#microsoft.graph.managedIOSStoreApp": + return NewManagedIOSStoreApp(), nil + case "#microsoft.graph.managedMobileApp": + return NewManagedMobileApp(), nil + case "#microsoft.graph.managedMobileLobApp": + return NewManagedMobileLobApp(), nil + case "#microsoft.graph.mdmWindowsInformationProtectionPolicy": + return NewMdmWindowsInformationProtectionPolicy(), nil + case "#microsoft.graph.mdmWindowsInformationProtectionPolicyPolicySetItem": + return NewMdmWindowsInformationProtectionPolicyPolicySetItem(), nil + case "#microsoft.graph.meetingActivityStatistics": + return NewMeetingActivityStatistics(), nil + case "#microsoft.graph.meetingAttendanceReport": + return NewMeetingAttendanceReport(), nil + case "#microsoft.graph.meetingRegistrant": + return NewMeetingRegistrant(), nil + case "#microsoft.graph.meetingRegistrantBase": + return NewMeetingRegistrantBase(), nil + case "#microsoft.graph.meetingRegistration": + return NewMeetingRegistration(), nil + case "#microsoft.graph.meetingRegistrationBase": + return NewMeetingRegistrationBase(), nil + case "#microsoft.graph.meetingRegistrationQuestion": + return NewMeetingRegistrationQuestion(), nil + case "#microsoft.graph.membershipOutlierInsight": + return NewMembershipOutlierInsight(), nil + case "#microsoft.graph.mention": + return NewMention(), nil + case "#microsoft.graph.message": + return NewMessage(), nil + case "#microsoft.graph.messageEvent": + return NewMessageEvent(), nil + case "#microsoft.graph.messageRecipient": + return NewMessageRecipient(), nil + case "#microsoft.graph.messageRule": + return NewMessageRule(), nil + case "#microsoft.graph.messageTrace": + return NewMessageTrace(), nil + case "#microsoft.graph.microsoftAccountUserConversationMember": + return NewMicrosoftAccountUserConversationMember(), nil + case "#microsoft.graph.microsoftApplicationDataAccessSettings": + return NewMicrosoftApplicationDataAccessSettings(), nil + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod": + return NewMicrosoftAuthenticatorAuthenticationMethod(), nil + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration": + return NewMicrosoftAuthenticatorAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodTarget": + return NewMicrosoftAuthenticatorAuthenticationMethodTarget(), nil + case "#microsoft.graph.microsoftStoreForBusinessApp": + return NewMicrosoftStoreForBusinessApp(), nil + case "#microsoft.graph.microsoftStoreForBusinessContainedApp": + return NewMicrosoftStoreForBusinessContainedApp(), nil + case "#microsoft.graph.microsoftTunnelConfiguration": + return NewMicrosoftTunnelConfiguration(), nil + case "#microsoft.graph.microsoftTunnelHealthThreshold": + return NewMicrosoftTunnelHealthThreshold(), nil + case "#microsoft.graph.microsoftTunnelServer": + return NewMicrosoftTunnelServer(), nil + case "#microsoft.graph.microsoftTunnelServerLogCollectionResponse": + return NewMicrosoftTunnelServerLogCollectionResponse(), nil + case "#microsoft.graph.microsoftTunnelSite": + return NewMicrosoftTunnelSite(), nil + case "#microsoft.graph.mobileApp": + return NewMobileApp(), nil + case "#microsoft.graph.mobileAppAssignment": + return NewMobileAppAssignment(), nil + case "#microsoft.graph.mobileAppCategory": + return NewMobileAppCategory(), nil + case "#microsoft.graph.mobileAppContent": + return NewMobileAppContent(), nil + case "#microsoft.graph.mobileAppContentFile": + return NewMobileAppContentFile(), nil + case "#microsoft.graph.mobileAppDependency": + return NewMobileAppDependency(), nil + case "#microsoft.graph.mobileAppInstallStatus": + return NewMobileAppInstallStatus(), nil + case "#microsoft.graph.mobileAppInstallSummary": + return NewMobileAppInstallSummary(), nil + case "#microsoft.graph.mobileAppIntentAndState": + return NewMobileAppIntentAndState(), nil + case "#microsoft.graph.mobileAppPolicySetItem": + return NewMobileAppPolicySetItem(), nil + case "#microsoft.graph.mobileAppProvisioningConfigGroupAssignment": + return NewMobileAppProvisioningConfigGroupAssignment(), nil + case "#microsoft.graph.mobileAppRelationship": + return NewMobileAppRelationship(), nil + case "#microsoft.graph.mobileAppSupersedence": + return NewMobileAppSupersedence(), nil + case "#microsoft.graph.mobileAppTroubleshootingEvent": + return NewMobileAppTroubleshootingEvent(), nil + case "#microsoft.graph.mobileContainedApp": + return NewMobileContainedApp(), nil + case "#microsoft.graph.mobileLobApp": + return NewMobileLobApp(), nil + case "#microsoft.graph.mobileThreatDefenseConnector": + return NewMobileThreatDefenseConnector(), nil + case "#microsoft.graph.mobilityManagementPolicy": + return NewMobilityManagementPolicy(), nil + case "#microsoft.graph.multiValueLegacyExtendedProperty": + return NewMultiValueLegacyExtendedProperty(), nil + case "#microsoft.graph.muteParticipantOperation": + return NewMuteParticipantOperation(), nil + case "#microsoft.graph.muteParticipantsOperation": + return NewMuteParticipantsOperation(), nil + case "#microsoft.graph.namedLocation": + return NewNamedLocation(), nil + case "#microsoft.graph.ndesConnector": + return NewNdesConnector(), nil + case "#microsoft.graph.note": + return NewNote(), nil + case "#microsoft.graph.notebook": + return NewNotebook(), nil + case "#microsoft.graph.notification": + return NewNotification(), nil + case "#microsoft.graph.notificationMessageTemplate": + return NewNotificationMessageTemplate(), nil + case "#microsoft.graph.oAuth2PermissionGrant": + return NewOAuth2PermissionGrant(), nil + case "#microsoft.graph.oemWarrantyInformationOnboarding": + return NewOemWarrantyInformationOnboarding(), nil + case "#microsoft.graph.offerShiftRequest": + return NewOfferShiftRequest(), nil + case "#microsoft.graph.office365ActiveUserCounts": + return NewOffice365ActiveUserCounts(), nil + case "#microsoft.graph.office365ActiveUserDetail": + return NewOffice365ActiveUserDetail(), nil + case "#microsoft.graph.office365GroupsActivityCounts": + return NewOffice365GroupsActivityCounts(), nil + case "#microsoft.graph.office365GroupsActivityDetail": + return NewOffice365GroupsActivityDetail(), nil + case "#microsoft.graph.office365GroupsActivityFileCounts": + return NewOffice365GroupsActivityFileCounts(), nil + case "#microsoft.graph.office365GroupsActivityGroupCounts": + return NewOffice365GroupsActivityGroupCounts(), nil + case "#microsoft.graph.office365GroupsActivityStorage": + return NewOffice365GroupsActivityStorage(), nil + case "#microsoft.graph.office365ServicesUserCounts": + return NewOffice365ServicesUserCounts(), nil + case "#microsoft.graph.officeClientConfiguration": + return NewOfficeClientConfiguration(), nil + case "#microsoft.graph.officeClientConfigurationAssignment": + return NewOfficeClientConfigurationAssignment(), nil + case "#microsoft.graph.officeGraphInsights": + return NewOfficeGraphInsights(), nil + case "#microsoft.graph.officeSuiteApp": + return NewOfficeSuiteApp(), nil + case "#microsoft.graph.onenote": + return NewOnenote(), nil + case "#microsoft.graph.onenoteEntityBaseModel": + return NewOnenoteEntityBaseModel(), nil + case "#microsoft.graph.onenoteEntityHierarchyModel": + return NewOnenoteEntityHierarchyModel(), nil + case "#microsoft.graph.onenoteEntitySchemaObjectModel": + return NewOnenoteEntitySchemaObjectModel(), nil + case "#microsoft.graph.onenoteOperation": + return NewOnenoteOperation(), nil + case "#microsoft.graph.onenotePage": + return NewOnenotePage(), nil + case "#microsoft.graph.onenoteResource": + return NewOnenoteResource(), nil + case "#microsoft.graph.onenoteSection": + return NewOnenoteSection(), nil + case "#microsoft.graph.onlineMeeting": + return NewOnlineMeeting(), nil + case "#microsoft.graph.onPremisesAgent": + return NewOnPremisesAgent(), nil + case "#microsoft.graph.onPremisesAgentGroup": + return NewOnPremisesAgentGroup(), nil + case "#microsoft.graph.onPremisesConditionalAccessSettings": + return NewOnPremisesConditionalAccessSettings(), nil + case "#microsoft.graph.onPremisesDirectorySynchronization": + return NewOnPremisesDirectorySynchronization(), nil + case "#microsoft.graph.onPremisesPublishingProfile": + return NewOnPremisesPublishingProfile(), nil + case "#microsoft.graph.onTokenIssuanceStartCustomExtension": + return NewOnTokenIssuanceStartCustomExtension(), nil + case "#microsoft.graph.onTokenIssuanceStartListener": + return NewOnTokenIssuanceStartListener(), nil + case "#microsoft.graph.openIdConnectIdentityProvider": + return NewOpenIdConnectIdentityProvider(), nil + case "#microsoft.graph.openIdConnectProvider": + return NewOpenIdConnectProvider(), nil + case "#microsoft.graph.openShift": + return NewOpenShift(), nil + case "#microsoft.graph.openShiftChangeRequest": + return NewOpenShiftChangeRequest(), nil + case "#microsoft.graph.openTypeExtension": + return NewOpenTypeExtension(), nil + case "#microsoft.graph.operation": + return NewOperation(), nil + case "#microsoft.graph.organization": + return NewOrganization(), nil + case "#microsoft.graph.organizationalBranding": + return NewOrganizationalBranding(), nil + case "#microsoft.graph.organizationalBrandingLocalization": + return NewOrganizationalBrandingLocalization(), nil + case "#microsoft.graph.organizationalBrandingProperties": + return NewOrganizationalBrandingProperties(), nil + case "#microsoft.graph.organizationSettings": + return NewOrganizationSettings(), nil + case "#microsoft.graph.orgContact": + return NewOrgContact(), nil + case "#microsoft.graph.outlookCategory": + return NewOutlookCategory(), nil + case "#microsoft.graph.outlookItem": + return NewOutlookItem(), nil + case "#microsoft.graph.outlookTask": + return NewOutlookTask(), nil + case "#microsoft.graph.outlookTaskFolder": + return NewOutlookTaskFolder(), nil + case "#microsoft.graph.outlookTaskGroup": + return NewOutlookTaskGroup(), nil + case "#microsoft.graph.outlookUser": + return NewOutlookUser(), nil + case "#microsoft.graph.participant": + return NewParticipant(), nil + case "#microsoft.graph.participantJoiningNotification": + return NewParticipantJoiningNotification(), nil + case "#microsoft.graph.participantLeftNotification": + return NewParticipantLeftNotification(), nil + case "#microsoft.graph.passwordAuthenticationMethod": + return NewPasswordAuthenticationMethod(), nil + case "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod": + return NewPasswordlessMicrosoftAuthenticatorAuthenticationMethod(), nil + case "#microsoft.graph.payload": + return NewPayload(), nil + case "#microsoft.graph.payloadCompatibleAssignmentFilter": + return NewPayloadCompatibleAssignmentFilter(), nil + case "#microsoft.graph.payloadResponse": + return NewPayloadResponse(), nil + case "#microsoft.graph.paymentMethod": + return NewPaymentMethod(), nil + case "#microsoft.graph.paymentTerm": + return NewPaymentTerm(), nil + case "#microsoft.graph.permission": + return NewPermission(), nil + case "#microsoft.graph.permissionGrantConditionSet": + return NewPermissionGrantConditionSet(), nil + case "#microsoft.graph.permissionGrantPolicy": + return NewPermissionGrantPolicy(), nil + case "#microsoft.graph.person": + return NewPerson(), nil + case "#microsoft.graph.personAnnotation": + return NewPersonAnnotation(), nil + case "#microsoft.graph.personAnnualEvent": + return NewPersonAnnualEvent(), nil + case "#microsoft.graph.personAward": + return NewPersonAward(), nil + case "#microsoft.graph.personCertification": + return NewPersonCertification(), nil + case "#microsoft.graph.personExtension": + return NewPersonExtension(), nil + case "#microsoft.graph.personInterest": + return NewPersonInterest(), nil + case "#microsoft.graph.personName": + return NewPersonName(), nil + case "#microsoft.graph.personResponsibility": + return NewPersonResponsibility(), nil + case "#microsoft.graph.personWebsite": + return NewPersonWebsite(), nil + case "#microsoft.graph.phoneAuthenticationMethod": + return NewPhoneAuthenticationMethod(), nil + case "#microsoft.graph.picture": + return NewPicture(), nil + case "#microsoft.graph.pinnedChatMessageInfo": + return NewPinnedChatMessageInfo(), nil + case "#microsoft.graph.place": + return NewPlace(), nil + case "#microsoft.graph.planner": + return NewPlanner(), nil + case "#microsoft.graph.plannerAssignedToTaskBoardTaskFormat": + return NewPlannerAssignedToTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerBucket": + return NewPlannerBucket(), nil + case "#microsoft.graph.plannerBucketTaskBoardTaskFormat": + return NewPlannerBucketTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerDelta": + return NewPlannerDelta(), nil + case "#microsoft.graph.plannerGroup": + return NewPlannerGroup(), nil + case "#microsoft.graph.plannerPlan": + return NewPlannerPlan(), nil + case "#microsoft.graph.plannerPlanConfiguration": + return NewPlannerPlanConfiguration(), nil + case "#microsoft.graph.plannerPlanConfigurationLocalization": + return NewPlannerPlanConfigurationLocalization(), nil + case "#microsoft.graph.plannerPlanDetails": + return NewPlannerPlanDetails(), nil + case "#microsoft.graph.plannerProgressTaskBoardTaskFormat": + return NewPlannerProgressTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerRoster": + return NewPlannerRoster(), nil + case "#microsoft.graph.plannerRosterMember": + return NewPlannerRosterMember(), nil + case "#microsoft.graph.plannerTask": + return NewPlannerTask(), nil + case "#microsoft.graph.plannerTaskConfiguration": + return NewPlannerTaskConfiguration(), nil + case "#microsoft.graph.plannerTaskDetails": + return NewPlannerTaskDetails(), nil + case "#microsoft.graph.plannerUser": + return NewPlannerUser(), nil + case "#microsoft.graph.playPromptOperation": + return NewPlayPromptOperation(), nil + case "#microsoft.graph.policyBase": + return NewPolicyBase(), nil + case "#microsoft.graph.policySet": + return NewPolicySet(), nil + case "#microsoft.graph.policySetAssignment": + return NewPolicySetAssignment(), nil + case "#microsoft.graph.policySetItem": + return NewPolicySetItem(), nil + case "#microsoft.graph.post": + return NewPost(), nil + case "#microsoft.graph.presence": + return NewPresence(), nil + case "#microsoft.graph.presentation": + return NewPresentation(), nil + case "#microsoft.graph.printConnector": + return NewPrintConnector(), nil + case "#microsoft.graph.printDocument": + return NewPrintDocument(), nil + case "#microsoft.graph.printer": + return NewPrinter(), nil + case "#microsoft.graph.printerBase": + return NewPrinterBase(), nil + case "#microsoft.graph.printerCreateOperation": + return NewPrinterCreateOperation(), nil + case "#microsoft.graph.printerShare": + return NewPrinterShare(), nil + case "#microsoft.graph.printJob": + return NewPrintJob(), nil + case "#microsoft.graph.printOperation": + return NewPrintOperation(), nil + case "#microsoft.graph.printService": + return NewPrintService(), nil + case "#microsoft.graph.printServiceEndpoint": + return NewPrintServiceEndpoint(), nil + case "#microsoft.graph.printTask": + return NewPrintTask(), nil + case "#microsoft.graph.printTaskDefinition": + return NewPrintTaskDefinition(), nil + case "#microsoft.graph.printTaskTrigger": + return NewPrintTaskTrigger(), nil + case "#microsoft.graph.printUsage": + return NewPrintUsage(), nil + case "#microsoft.graph.printUsageByPrinter": + return NewPrintUsageByPrinter(), nil + case "#microsoft.graph.printUsageByUser": + return NewPrintUsageByUser(), nil + case "#microsoft.graph.privilegedAccess": + return NewPrivilegedAccess(), nil + case "#microsoft.graph.privilegedAccessGroup": + return NewPrivilegedAccessGroup(), nil + case "#microsoft.graph.privilegedAccessGroupAssignmentSchedule": + return NewPrivilegedAccessGroupAssignmentSchedule(), nil + case "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance": + return NewPrivilegedAccessGroupAssignmentScheduleInstance(), nil + case "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest": + return NewPrivilegedAccessGroupAssignmentScheduleRequest(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilitySchedule": + return NewPrivilegedAccessGroupEligibilitySchedule(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance": + return NewPrivilegedAccessGroupEligibilityScheduleInstance(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest": + return NewPrivilegedAccessGroupEligibilityScheduleRequest(), nil + case "#microsoft.graph.privilegedAccessRoot": + return NewPrivilegedAccessRoot(), nil + case "#microsoft.graph.privilegedAccessSchedule": + return NewPrivilegedAccessSchedule(), nil + case "#microsoft.graph.privilegedAccessScheduleInstance": + return NewPrivilegedAccessScheduleInstance(), nil + case "#microsoft.graph.privilegedAccessScheduleRequest": + return NewPrivilegedAccessScheduleRequest(), nil + case "#microsoft.graph.privilegedApproval": + return NewPrivilegedApproval(), nil + case "#microsoft.graph.privilegedOperationEvent": + return NewPrivilegedOperationEvent(), nil + case "#microsoft.graph.privilegedRole": + return NewPrivilegedRole(), nil + case "#microsoft.graph.privilegedRoleAssignment": + return NewPrivilegedRoleAssignment(), nil + case "#microsoft.graph.privilegedRoleAssignmentRequest": + return NewPrivilegedRoleAssignmentRequest(), nil + case "#microsoft.graph.privilegedRoleSettings": + return NewPrivilegedRoleSettings(), nil + case "#microsoft.graph.privilegedRoleSummary": + return NewPrivilegedRoleSummary(), nil + case "#microsoft.graph.privilegedSignupStatus": + return NewPrivilegedSignupStatus(), nil + case "#microsoft.graph.profile": + return NewProfile(), nil + case "#microsoft.graph.profileCardProperty": + return NewProfileCardProperty(), nil + case "#microsoft.graph.profilePhoto": + return NewProfilePhoto(), nil + case "#microsoft.graph.program": + return NewProgram(), nil + case "#microsoft.graph.programControl": + return NewProgramControl(), nil + case "#microsoft.graph.programControlType": + return NewProgramControlType(), nil + case "#microsoft.graph.projectParticipation": + return NewProjectParticipation(), nil + case "#microsoft.graph.providerTenantSetting": + return NewProviderTenantSetting(), nil + case "#microsoft.graph.provisioningObjectSummary": + return NewProvisioningObjectSummary(), nil + case "#microsoft.graph.publishedResource": + return NewPublishedResource(), nil + case "#microsoft.graph.purchaseInvoice": + return NewPurchaseInvoice(), nil + case "#microsoft.graph.purchaseInvoiceLine": + return NewPurchaseInvoiceLine(), nil + case "#microsoft.graph.rbacApplication": + return NewRbacApplication(), nil + case "#microsoft.graph.rbacApplicationMultiple": + return NewRbacApplicationMultiple(), nil + case "#microsoft.graph.recommendation": + return NewRecommendation(), nil + case "#microsoft.graph.recommendationBase": + return NewRecommendationBase(), nil + case "#microsoft.graph.recordOperation": + return NewRecordOperation(), nil + case "#microsoft.graph.referenceAttachment": + return NewReferenceAttachment(), nil + case "#microsoft.graph.regionalAndLanguageSettings": + return NewRegionalAndLanguageSettings(), nil + case "#microsoft.graph.relyingPartyDetailedSummary": + return NewRelyingPartyDetailedSummary(), nil + case "#microsoft.graph.remoteActionAudit": + return NewRemoteActionAudit(), nil + case "#microsoft.graph.remoteAssistancePartner": + return NewRemoteAssistancePartner(), nil + case "#microsoft.graph.remoteAssistanceSettings": + return NewRemoteAssistanceSettings(), nil + case "#microsoft.graph.reportRoot": + return NewReportRoot(), nil + case "#microsoft.graph.request": + return NewRequest(), nil + case "#microsoft.graph.resourceOperation": + return NewResourceOperation(), nil + case "#microsoft.graph.resourceSpecificPermissionGrant": + return NewResourceSpecificPermissionGrant(), nil + case "#microsoft.graph.restrictedAppsViolation": + return NewRestrictedAppsViolation(), nil + case "#microsoft.graph.richLongRunningOperation": + return NewRichLongRunningOperation(), nil + case "#microsoft.graph.riskDetection": + return NewRiskDetection(), nil + case "#microsoft.graph.riskyServicePrincipal": + return NewRiskyServicePrincipal(), nil + case "#microsoft.graph.riskyServicePrincipalHistoryItem": + return NewRiskyServicePrincipalHistoryItem(), nil + case "#microsoft.graph.riskyUser": + return NewRiskyUser(), nil + case "#microsoft.graph.riskyUserHistoryItem": + return NewRiskyUserHistoryItem(), nil + case "#microsoft.graph.roleAssignment": + return NewRoleAssignment(), nil + case "#microsoft.graph.roleDefinition": + return NewRoleDefinition(), nil + case "#microsoft.graph.roleScopeTag": + return NewRoleScopeTag(), nil + case "#microsoft.graph.roleScopeTagAutoAssignment": + return NewRoleScopeTagAutoAssignment(), nil + case "#microsoft.graph.room": + return NewRoom(), nil + case "#microsoft.graph.roomList": + return NewRoomList(), nil + case "#microsoft.graph.salesCreditMemo": + return NewSalesCreditMemo(), nil + case "#microsoft.graph.salesCreditMemoLine": + return NewSalesCreditMemoLine(), nil + case "#microsoft.graph.salesInvoice": + return NewSalesInvoice(), nil + case "#microsoft.graph.salesInvoiceLine": + return NewSalesInvoiceLine(), nil + case "#microsoft.graph.salesOrder": + return NewSalesOrder(), nil + case "#microsoft.graph.salesOrderLine": + return NewSalesOrderLine(), nil + case "#microsoft.graph.salesQuote": + return NewSalesQuote(), nil + case "#microsoft.graph.salesQuoteLine": + return NewSalesQuoteLine(), nil + case "#microsoft.graph.samlOrWsFedExternalDomainFederation": + return NewSamlOrWsFedExternalDomainFederation(), nil + case "#microsoft.graph.samlOrWsFedProvider": + return NewSamlOrWsFedProvider(), nil + case "#microsoft.graph.schedule": + return NewSchedule(), nil + case "#microsoft.graph.scheduleChangeRequest": + return NewScheduleChangeRequest(), nil + case "#microsoft.graph.schedulingGroup": + return NewSchedulingGroup(), nil + case "#microsoft.graph.schema": + return NewSchema(), nil + case "#microsoft.graph.schemaExtension": + return NewSchemaExtension(), nil + case "#microsoft.graph.scopedRoleMembership": + return NewScopedRoleMembership(), nil + case "#microsoft.graph.searchEntity": + return NewSearchEntity(), nil + case "#microsoft.graph.sectionGroup": + return NewSectionGroup(), nil + case "#microsoft.graph.secureScore": + return NewSecureScore(), nil + case "#microsoft.graph.secureScoreControlProfile": + return NewSecureScoreControlProfile(), nil + case "#microsoft.graph.security": + return NewSecurity(), nil + case "#microsoft.graph.securityAction": + return NewSecurityAction(), nil + case "#microsoft.graph.securityBaselineCategoryStateSummary": + return NewSecurityBaselineCategoryStateSummary(), nil + case "#microsoft.graph.securityBaselineDeviceState": + return NewSecurityBaselineDeviceState(), nil + case "#microsoft.graph.securityBaselineSettingState": + return NewSecurityBaselineSettingState(), nil + case "#microsoft.graph.securityBaselineState": + return NewSecurityBaselineState(), nil + case "#microsoft.graph.securityBaselineStateSummary": + return NewSecurityBaselineStateSummary(), nil + case "#microsoft.graph.securityBaselineTemplate": + return NewSecurityBaselineTemplate(), nil + case "#microsoft.graph.securityConfigurationTask": + return NewSecurityConfigurationTask(), nil + case "#microsoft.graph.securityReportsRoot": + return NewSecurityReportsRoot(), nil + case "#microsoft.graph.sensitiveType": + return NewSensitiveType(), nil + case "#microsoft.graph.sensitivityLabel": + return NewSensitivityLabel(), nil + case "#microsoft.graph.sensitivityPolicySettings": + return NewSensitivityPolicySettings(), nil + case "#microsoft.graph.serviceAnnouncement": + return NewServiceAnnouncement(), nil + case "#microsoft.graph.serviceAnnouncementAttachment": + return NewServiceAnnouncementAttachment(), nil + case "#microsoft.graph.serviceAnnouncementBase": + return NewServiceAnnouncementBase(), nil + case "#microsoft.graph.serviceHealth": + return NewServiceHealth(), nil + case "#microsoft.graph.serviceHealthIssue": + return NewServiceHealthIssue(), nil + case "#microsoft.graph.servicePrincipal": + return NewServicePrincipal(), nil + case "#microsoft.graph.servicePrincipalCreationConditionSet": + return NewServicePrincipalCreationConditionSet(), nil + case "#microsoft.graph.servicePrincipalCreationPolicy": + return NewServicePrincipalCreationPolicy(), nil + case "#microsoft.graph.servicePrincipalRiskDetection": + return NewServicePrincipalRiskDetection(), nil + case "#microsoft.graph.serviceUpdateMessage": + return NewServiceUpdateMessage(), nil + case "#microsoft.graph.settingStateDeviceSummary": + return NewSettingStateDeviceSummary(), nil + case "#microsoft.graph.sharedDriveItem": + return NewSharedDriveItem(), nil + case "#microsoft.graph.sharedEmailDomain": + return NewSharedEmailDomain(), nil + case "#microsoft.graph.sharedEmailDomainInvitation": + return NewSharedEmailDomainInvitation(), nil + case "#microsoft.graph.sharedInsight": + return NewSharedInsight(), nil + case "#microsoft.graph.sharedPCConfiguration": + return NewSharedPCConfiguration(), nil + case "#microsoft.graph.sharedWithChannelTeamInfo": + return NewSharedWithChannelTeamInfo(), nil + case "#microsoft.graph.shift": + return NewShift(), nil + case "#microsoft.graph.shiftPreferences": + return NewShiftPreferences(), nil + case "#microsoft.graph.shipmentMethod": + return NewShipmentMethod(), nil + case "#microsoft.graph.signIn": + return NewSignIn(), nil + case "#microsoft.graph.simulation": + return NewSimulation(), nil + case "#microsoft.graph.simulationAutomation": + return NewSimulationAutomation(), nil + case "#microsoft.graph.simulationAutomationRun": + return NewSimulationAutomationRun(), nil + case "#microsoft.graph.singleValueLegacyExtendedProperty": + return NewSingleValueLegacyExtendedProperty(), nil + case "#microsoft.graph.site": + return NewSite(), nil + case "#microsoft.graph.sitePage": + return NewSitePage(), nil + case "#microsoft.graph.skillProficiency": + return NewSkillProficiency(), nil + case "#microsoft.graph.skypeForBusinessUserConversationMember": + return NewSkypeForBusinessUserConversationMember(), nil + case "#microsoft.graph.skypeUserConversationMember": + return NewSkypeUserConversationMember(), nil + case "#microsoft.graph.smsAuthenticationMethodConfiguration": + return NewSmsAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.smsAuthenticationMethodTarget": + return NewSmsAuthenticationMethodTarget(), nil + case "#microsoft.graph.socialIdentityProvider": + return NewSocialIdentityProvider(), nil + case "#microsoft.graph.softwareOathAuthenticationMethod": + return NewSoftwareOathAuthenticationMethod(), nil + case "#microsoft.graph.softwareOathAuthenticationMethodConfiguration": + return NewSoftwareOathAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.softwareUpdateStatusSummary": + return NewSoftwareUpdateStatusSummary(), nil + case "#microsoft.graph.standardWebPart": + return NewStandardWebPart(), nil + case "#microsoft.graph.startHoldMusicOperation": + return NewStartHoldMusicOperation(), nil + case "#microsoft.graph.stopHoldMusicOperation": + return NewStopHoldMusicOperation(), nil + case "#microsoft.graph.strongAuthenticationDetail": + return NewStrongAuthenticationDetail(), nil + case "#microsoft.graph.strongAuthenticationPhoneAppDetail": + return NewStrongAuthenticationPhoneAppDetail(), nil + case "#microsoft.graph.stsPolicy": + return NewStsPolicy(), nil + case "#microsoft.graph.subjectRightsRequest": + return NewSubjectRightsRequest(), nil + case "#microsoft.graph.subscribedSku": + return NewSubscribedSku(), nil + case "#microsoft.graph.subscribeToToneOperation": + return NewSubscribeToToneOperation(), nil + case "#microsoft.graph.subscription": + return NewSubscription(), nil + case "#microsoft.graph.swapShiftsChangeRequest": + return NewSwapShiftsChangeRequest(), nil + case "#microsoft.graph.symantecCodeSigningCertificate": + return NewSymantecCodeSigningCertificate(), nil + case "#microsoft.graph.synchronization": + return NewSynchronization(), nil + case "#microsoft.graph.synchronizationJob": + return NewSynchronizationJob(), nil + case "#microsoft.graph.synchronizationSchema": + return NewSynchronizationSchema(), nil + case "#microsoft.graph.synchronizationTemplate": + return NewSynchronizationTemplate(), nil + case "#microsoft.graph.targetedManagedAppConfiguration": + return NewTargetedManagedAppConfiguration(), nil + case "#microsoft.graph.targetedManagedAppConfigurationPolicySetItem": + return NewTargetedManagedAppConfigurationPolicySetItem(), nil + case "#microsoft.graph.targetedManagedAppPolicyAssignment": + return NewTargetedManagedAppPolicyAssignment(), nil + case "#microsoft.graph.targetedManagedAppProtection": + return NewTargetedManagedAppProtection(), nil + case "#microsoft.graph.taskFileAttachment": + return NewTaskFileAttachment(), nil + case "#microsoft.graph.taxArea": + return NewTaxArea(), nil + case "#microsoft.graph.taxGroup": + return NewTaxGroup(), nil + case "#microsoft.graph.team": + return NewTeam(), nil + case "#microsoft.graph.teamInfo": + return NewTeamInfo(), nil + case "#microsoft.graph.teamsApp": + return NewTeamsApp(), nil + case "#microsoft.graph.teamsAppDefinition": + return NewTeamsAppDefinition(), nil + case "#microsoft.graph.teamsAppIcon": + return NewTeamsAppIcon(), nil + case "#microsoft.graph.teamsAppInstallation": + return NewTeamsAppInstallation(), nil + case "#microsoft.graph.teamsAppSettings": + return NewTeamsAppSettings(), nil + case "#microsoft.graph.teamsAsyncOperation": + return NewTeamsAsyncOperation(), nil + case "#microsoft.graph.teamsTab": + return NewTeamsTab(), nil + case "#microsoft.graph.teamsTemplate": + return NewTeamsTemplate(), nil + case "#microsoft.graph.teamTemplate": + return NewTeamTemplate(), nil + case "#microsoft.graph.teamTemplateDefinition": + return NewTeamTemplateDefinition(), nil + case "#microsoft.graph.teamwork": + return NewTeamwork(), nil + case "#microsoft.graph.teamworkBot": + return NewTeamworkBot(), nil + case "#microsoft.graph.teamworkDevice": + return NewTeamworkDevice(), nil + case "#microsoft.graph.teamworkDeviceActivity": + return NewTeamworkDeviceActivity(), nil + case "#microsoft.graph.teamworkDeviceConfiguration": + return NewTeamworkDeviceConfiguration(), nil + case "#microsoft.graph.teamworkDeviceHealth": + return NewTeamworkDeviceHealth(), nil + case "#microsoft.graph.teamworkDeviceOperation": + return NewTeamworkDeviceOperation(), nil + case "#microsoft.graph.teamworkHostedContent": + return NewTeamworkHostedContent(), nil + case "#microsoft.graph.teamworkPeripheral": + return NewTeamworkPeripheral(), nil + case "#microsoft.graph.teamworkTag": + return NewTeamworkTag(), nil + case "#microsoft.graph.teamworkTagMember": + return NewTeamworkTagMember(), nil + case "#microsoft.graph.telecomExpenseManagementPartner": + return NewTelecomExpenseManagementPartner(), nil + case "#microsoft.graph.temporaryAccessPassAuthenticationMethod": + return NewTemporaryAccessPassAuthenticationMethod(), nil + case "#microsoft.graph.temporaryAccessPassAuthenticationMethodConfiguration": + return NewTemporaryAccessPassAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.tenantAppManagementPolicy": + return NewTenantAppManagementPolicy(), nil + case "#microsoft.graph.tenantAttachRBAC": + return NewTenantAttachRBAC(), nil + case "#microsoft.graph.tenantRelationshipAccessPolicyBase": + return NewTenantRelationshipAccessPolicyBase(), nil + case "#microsoft.graph.tenantSetupInfo": + return NewTenantSetupInfo(), nil + case "#microsoft.graph.termsAndConditions": + return NewTermsAndConditions(), nil + case "#microsoft.graph.termsAndConditionsAcceptanceStatus": + return NewTermsAndConditionsAcceptanceStatus(), nil + case "#microsoft.graph.termsAndConditionsAssignment": + return NewTermsAndConditionsAssignment(), nil + case "#microsoft.graph.termsAndConditionsGroupAssignment": + return NewTermsAndConditionsGroupAssignment(), nil + case "#microsoft.graph.termsOfUseContainer": + return NewTermsOfUseContainer(), nil + case "#microsoft.graph.textClassificationRequest": + return NewTextClassificationRequest(), nil + case "#microsoft.graph.textWebPart": + return NewTextWebPart(), nil + case "#microsoft.graph.threatAssessmentRequest": + return NewThreatAssessmentRequest(), nil + case "#microsoft.graph.threatAssessmentResult": + return NewThreatAssessmentResult(), nil + case "#microsoft.graph.thumbnailSet": + return NewThumbnailSet(), nil + case "#microsoft.graph.tiIndicator": + return NewTiIndicator(), nil + case "#microsoft.graph.timeCard": + return NewTimeCard(), nil + case "#microsoft.graph.timeOff": + return NewTimeOff(), nil + case "#microsoft.graph.timeOffReason": + return NewTimeOffReason(), nil + case "#microsoft.graph.timeOffRequest": + return NewTimeOffRequest(), nil + case "#microsoft.graph.todo": + return NewTodo(), nil + case "#microsoft.graph.todoTask": + return NewTodoTask(), nil + case "#microsoft.graph.todoTaskList": + return NewTodoTaskList(), nil + case "#microsoft.graph.tokenIssuancePolicy": + return NewTokenIssuancePolicy(), nil + case "#microsoft.graph.tokenLifetimePolicy": + return NewTokenLifetimePolicy(), nil + case "#microsoft.graph.trending": + return NewTrending(), nil + case "#microsoft.graph.trustFrameworkKeySet": + return NewTrustFrameworkKeySet(), nil + case "#microsoft.graph.trustFrameworkPolicy": + return NewTrustFrameworkPolicy(), nil + case "#microsoft.graph.unifiedRbacResourceAction": + return NewUnifiedRbacResourceAction(), nil + case "#microsoft.graph.unifiedRbacResourceNamespace": + return NewUnifiedRbacResourceNamespace(), nil + case "#microsoft.graph.unifiedRbacResourceScope": + return NewUnifiedRbacResourceScope(), nil + case "#microsoft.graph.unifiedRoleAssignment": + return NewUnifiedRoleAssignment(), nil + case "#microsoft.graph.unifiedRoleAssignmentMultiple": + return NewUnifiedRoleAssignmentMultiple(), nil + case "#microsoft.graph.unifiedRoleAssignmentSchedule": + return NewUnifiedRoleAssignmentSchedule(), nil + case "#microsoft.graph.unifiedRoleAssignmentScheduleInstance": + return NewUnifiedRoleAssignmentScheduleInstance(), nil + case "#microsoft.graph.unifiedRoleAssignmentScheduleRequest": + return NewUnifiedRoleAssignmentScheduleRequest(), nil + case "#microsoft.graph.unifiedRoleDefinition": + return NewUnifiedRoleDefinition(), nil + case "#microsoft.graph.unifiedRoleEligibilitySchedule": + return NewUnifiedRoleEligibilitySchedule(), nil + case "#microsoft.graph.unifiedRoleEligibilityScheduleInstance": + return NewUnifiedRoleEligibilityScheduleInstance(), nil + case "#microsoft.graph.unifiedRoleEligibilityScheduleRequest": + return NewUnifiedRoleEligibilityScheduleRequest(), nil + case "#microsoft.graph.unifiedRoleManagementPolicy": + return NewUnifiedRoleManagementPolicy(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyApprovalRule": + return NewUnifiedRoleManagementPolicyApprovalRule(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyAssignment": + return NewUnifiedRoleManagementPolicyAssignment(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyAuthenticationContextRule": + return NewUnifiedRoleManagementPolicyAuthenticationContextRule(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyEnablementRule": + return NewUnifiedRoleManagementPolicyEnablementRule(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyExpirationRule": + return NewUnifiedRoleManagementPolicyExpirationRule(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyNotificationRule": + return NewUnifiedRoleManagementPolicyNotificationRule(), nil + case "#microsoft.graph.unifiedRoleManagementPolicyRule": + return NewUnifiedRoleManagementPolicyRule(), nil + case "#microsoft.graph.unifiedRoleScheduleBase": + return NewUnifiedRoleScheduleBase(), nil + case "#microsoft.graph.unifiedRoleScheduleInstanceBase": + return NewUnifiedRoleScheduleInstanceBase(), nil + case "#microsoft.graph.unitOfMeasure": + return NewUnitOfMeasure(), nil + case "#microsoft.graph.unmanagedDeviceDiscoveryTask": + return NewUnmanagedDeviceDiscoveryTask(), nil + case "#microsoft.graph.unmuteParticipantOperation": + return NewUnmuteParticipantOperation(), nil + case "#microsoft.graph.unsupportedDeviceConfiguration": + return NewUnsupportedDeviceConfiguration(), nil + case "#microsoft.graph.unsupportedGroupPolicyExtension": + return NewUnsupportedGroupPolicyExtension(), nil + case "#microsoft.graph.updateRecordingStatusOperation": + return NewUpdateRecordingStatusOperation(), nil + case "#microsoft.graph.urlAssessmentRequest": + return NewUrlAssessmentRequest(), nil + case "#microsoft.graph.usageRight": + return NewUsageRight(), nil + case "#microsoft.graph.usedInsight": + return NewUsedInsight(), nil + case "#microsoft.graph.user": + return NewUser(), nil + case "#microsoft.graph.userAccountInformation": + return NewUserAccountInformation(), nil + case "#microsoft.graph.userActivity": + return NewUserActivity(), nil + case "#microsoft.graph.userAnalytics": + return NewUserAnalytics(), nil + case "#microsoft.graph.userAppInstallStatus": + return NewUserAppInstallStatus(), nil + case "#microsoft.graph.userConfiguration": + return NewUserConfiguration(), nil + case "#microsoft.graph.userConsentRequest": + return NewUserConsentRequest(), nil + case "#microsoft.graph.userCredentialUsageDetails": + return NewUserCredentialUsageDetails(), nil + case "#microsoft.graph.userExperienceAnalyticsAnomaly": + return NewUserExperienceAnalyticsAnomaly(), nil + case "#microsoft.graph.userExperienceAnalyticsAnomalyDevice": + return NewUserExperienceAnalyticsAnomalyDevice(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthApplicationPerformance": + return NewUserExperienceAnalyticsAppHealthApplicationPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByAppVersion": + return NewUserExperienceAnalyticsAppHealthAppPerformanceByAppVersion(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails": + return NewUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDetails(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByAppVersionDeviceId": + return NewUserExperienceAnalyticsAppHealthAppPerformanceByAppVersionDevice(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthAppPerformanceByOSVersion": + return NewUserExperienceAnalyticsAppHealthAppPerformanceByOSVersion(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthDeviceModelPerformance": + return NewUserExperienceAnalyticsAppHealthDeviceModelPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthDevicePerformance": + return NewUserExperienceAnalyticsAppHealthDevicePerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthDevicePerformanceDetails": + return NewUserExperienceAnalyticsAppHealthDevicePerformanceDetails(), nil + case "#microsoft.graph.userExperienceAnalyticsAppHealthOSVersionPerformance": + return NewUserExperienceAnalyticsAppHealthOSVersionPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsBaseline": + return NewUserExperienceAnalyticsBaseline(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthAppImpact": + return NewUserExperienceAnalyticsBatteryHealthAppImpact(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthCapacityDetails": + return NewUserExperienceAnalyticsBatteryHealthCapacityDetails(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthDeviceAppImpact": + return NewUserExperienceAnalyticsBatteryHealthDeviceAppImpact(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthDevicePerformance": + return NewUserExperienceAnalyticsBatteryHealthDevicePerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthDeviceRuntimeHistory": + return NewUserExperienceAnalyticsBatteryHealthDeviceRuntimeHistory(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthModelPerformance": + return NewUserExperienceAnalyticsBatteryHealthModelPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthOsPerformance": + return NewUserExperienceAnalyticsBatteryHealthOsPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsBatteryHealthRuntimeDetails": + return NewUserExperienceAnalyticsBatteryHealthRuntimeDetails(), nil + case "#microsoft.graph.userExperienceAnalyticsCategory": + return NewUserExperienceAnalyticsCategory(), nil + case "#microsoft.graph.userExperienceAnalyticsDevicePerformance": + return NewUserExperienceAnalyticsDevicePerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceScope": + return NewUserExperienceAnalyticsDeviceScope(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceScores": + return NewUserExperienceAnalyticsDeviceScores(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceStartupHistory": + return NewUserExperienceAnalyticsDeviceStartupHistory(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceStartupProcess": + return NewUserExperienceAnalyticsDeviceStartupProcess(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceStartupProcessPerformance": + return NewUserExperienceAnalyticsDeviceStartupProcessPerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceTimelineEvents": + return NewUserExperienceAnalyticsDeviceTimelineEvents(), nil + case "#microsoft.graph.userExperienceAnalyticsDeviceWithoutCloudIdentity": + return NewUserExperienceAnalyticsDeviceWithoutCloudIdentity(), nil + case "#microsoft.graph.userExperienceAnalyticsImpactingProcess": + return NewUserExperienceAnalyticsImpactingProcess(), nil + case "#microsoft.graph.userExperienceAnalyticsMetric": + return NewUserExperienceAnalyticsMetric(), nil + case "#microsoft.graph.userExperienceAnalyticsMetricHistory": + return NewUserExperienceAnalyticsMetricHistory(), nil + case "#microsoft.graph.userExperienceAnalyticsModelScores": + return NewUserExperienceAnalyticsModelScores(), nil + case "#microsoft.graph.userExperienceAnalyticsNotAutopilotReadyDevice": + return NewUserExperienceAnalyticsNotAutopilotReadyDevice(), nil + case "#microsoft.graph.userExperienceAnalyticsOverview": + return NewUserExperienceAnalyticsOverview(), nil + case "#microsoft.graph.userExperienceAnalyticsRemoteConnection": + return NewUserExperienceAnalyticsRemoteConnection(), nil + case "#microsoft.graph.userExperienceAnalyticsResourcePerformance": + return NewUserExperienceAnalyticsResourcePerformance(), nil + case "#microsoft.graph.userExperienceAnalyticsScoreHistory": + return NewUserExperienceAnalyticsScoreHistory(), nil + case "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereDevice": + return NewUserExperienceAnalyticsWorkFromAnywhereDevice(), nil + case "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric": + return NewUserExperienceAnalyticsWorkFromAnywhereHardwareReadinessMetric(), nil + case "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereMetric": + return NewUserExperienceAnalyticsWorkFromAnywhereMetric(), nil + case "#microsoft.graph.userExperienceAnalyticsWorkFromAnywhereModelPerformance": + return NewUserExperienceAnalyticsWorkFromAnywhereModelPerformance(), nil + case "#microsoft.graph.userFlowLanguageConfiguration": + return NewUserFlowLanguageConfiguration(), nil + case "#microsoft.graph.userFlowLanguagePage": + return NewUserFlowLanguagePage(), nil + case "#microsoft.graph.userInsightsSettings": + return NewUserInsightsSettings(), nil + case "#microsoft.graph.userInstallStateSummary": + return NewUserInstallStateSummary(), nil + case "#microsoft.graph.userPFXCertificate": + return NewUserPFXCertificate(), nil + case "#microsoft.graph.userRegistrationDetails": + return NewUserRegistrationDetails(), nil + case "#microsoft.graph.userScopeTeamsAppInstallation": + return NewUserScopeTeamsAppInstallation(), nil + case "#microsoft.graph.userSecurityProfile": + return NewUserSecurityProfile(), nil + case "#microsoft.graph.userSettings": + return NewUserSettings(), nil + case "#microsoft.graph.userSignInInsight": + return NewUserSignInInsight(), nil + case "#microsoft.graph.userTeamwork": + return NewUserTeamwork(), nil + case "#microsoft.graph.vendor": + return NewVendor_escaped(), nil + case "#microsoft.graph.verticalSection": + return NewVerticalSection(), nil + case "#microsoft.graph.virtualAppointment": + return NewVirtualAppointment(), nil + case "#microsoft.graph.virtualEndpoint": + return NewVirtualEndpoint(), nil + case "#microsoft.graph.voiceAuthenticationMethodConfiguration": + return NewVoiceAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.voiceAuthenticationMethodTarget": + return NewVoiceAuthenticationMethodTarget(), nil + case "#microsoft.graph.vpnConfiguration": + return NewVpnConfiguration(), nil + case "#microsoft.graph.vppToken": + return NewVppToken(), nil + case "#microsoft.graph.vulnerableManagedDevice": + return NewVulnerableManagedDevice(), nil + case "#microsoft.graph.webAccount": + return NewWebAccount(), nil + case "#microsoft.graph.webApp": + return NewWebApp(), nil + case "#microsoft.graph.webApplicationSegment": + return NewWebApplicationSegment(), nil + case "#microsoft.graph.webPart": + return NewWebPart(), nil + case "#microsoft.graph.win32LobApp": + return NewWin32LobApp(), nil + case "#microsoft.graph.windows10CertificateProfileBase": + return NewWindows10CertificateProfileBase(), nil + case "#microsoft.graph.windows10CompliancePolicy": + return NewWindows10CompliancePolicy(), nil + case "#microsoft.graph.windows10CustomConfiguration": + return NewWindows10CustomConfiguration(), nil + case "#microsoft.graph.windows10DeviceFirmwareConfigurationInterface": + return NewWindows10DeviceFirmwareConfigurationInterface(), nil + case "#microsoft.graph.windows10EasEmailProfileConfiguration": + return NewWindows10EasEmailProfileConfiguration(), nil + case "#microsoft.graph.windows10EndpointProtectionConfiguration": + return NewWindows10EndpointProtectionConfiguration(), nil + case "#microsoft.graph.windows10EnrollmentCompletionPageConfiguration": + return NewWindows10EnrollmentCompletionPageConfiguration(), nil + case "#microsoft.graph.windows10EnrollmentCompletionPageConfigurationPolicySetItem": + return NewWindows10EnrollmentCompletionPageConfigurationPolicySetItem(), nil + case "#microsoft.graph.windows10EnterpriseModernAppManagementConfiguration": + return NewWindows10EnterpriseModernAppManagementConfiguration(), nil + case "#microsoft.graph.windows10GeneralConfiguration": + return NewWindows10GeneralConfiguration(), nil + case "#microsoft.graph.windows10ImportedPFXCertificateProfile": + return NewWindows10ImportedPFXCertificateProfile(), nil + case "#microsoft.graph.windows10MobileCompliancePolicy": + return NewWindows10MobileCompliancePolicy(), nil + case "#microsoft.graph.windows10NetworkBoundaryConfiguration": + return NewWindows10NetworkBoundaryConfiguration(), nil + case "#microsoft.graph.windows10PFXImportCertificateProfile": + return NewWindows10PFXImportCertificateProfile(), nil + case "#microsoft.graph.windows10PkcsCertificateProfile": + return NewWindows10PkcsCertificateProfile(), nil + case "#microsoft.graph.windows10SecureAssessmentConfiguration": + return NewWindows10SecureAssessmentConfiguration(), nil + case "#microsoft.graph.windows10TeamGeneralConfiguration": + return NewWindows10TeamGeneralConfiguration(), nil + case "#microsoft.graph.windows10VpnConfiguration": + return NewWindows10VpnConfiguration(), nil + case "#microsoft.graph.windows10XCertificateProfile": + return NewWindows10XCertificateProfile(), nil + case "#microsoft.graph.windows10XSCEPCertificateProfile": + return NewWindows10XSCEPCertificateProfile(), nil + case "#microsoft.graph.windows10XTrustedRootCertificate": + return NewWindows10XTrustedRootCertificate(), nil + case "#microsoft.graph.windows10XVpnConfiguration": + return NewWindows10XVpnConfiguration(), nil + case "#microsoft.graph.windows10XWifiConfiguration": + return NewWindows10XWifiConfiguration(), nil + case "#microsoft.graph.windows81CertificateProfileBase": + return NewWindows81CertificateProfileBase(), nil + case "#microsoft.graph.windows81CompliancePolicy": + return NewWindows81CompliancePolicy(), nil + case "#microsoft.graph.windows81GeneralConfiguration": + return NewWindows81GeneralConfiguration(), nil + case "#microsoft.graph.windows81SCEPCertificateProfile": + return NewWindows81SCEPCertificateProfile(), nil + case "#microsoft.graph.windows81TrustedRootCertificate": + return NewWindows81TrustedRootCertificate(), nil + case "#microsoft.graph.windows81VpnConfiguration": + return NewWindows81VpnConfiguration(), nil + case "#microsoft.graph.windows81WifiImportConfiguration": + return NewWindows81WifiImportConfiguration(), nil + case "#microsoft.graph.windowsAppX": + return NewWindowsAppX(), nil + case "#microsoft.graph.windowsAssignedAccessProfile": + return NewWindowsAssignedAccessProfile(), nil + case "#microsoft.graph.windowsAutopilotDeploymentProfile": + return NewWindowsAutopilotDeploymentProfile(), nil + case "#microsoft.graph.windowsAutopilotDeploymentProfileAssignment": + return NewWindowsAutopilotDeploymentProfileAssignment(), nil + case "#microsoft.graph.windowsAutopilotDeploymentProfilePolicySetItem": + return NewWindowsAutopilotDeploymentProfilePolicySetItem(), nil + case "#microsoft.graph.windowsAutopilotDeviceIdentity": + return NewWindowsAutopilotDeviceIdentity(), nil + case "#microsoft.graph.windowsAutopilotSettings": + return NewWindowsAutopilotSettings(), nil + case "#microsoft.graph.windowsCertificateProfileBase": + return NewWindowsCertificateProfileBase(), nil + case "#microsoft.graph.windowsDefenderAdvancedThreatProtectionConfiguration": + return NewWindowsDefenderAdvancedThreatProtectionConfiguration(), nil + case "#microsoft.graph.windowsDefenderApplicationControlSupplementalPolicy": + return NewWindowsDefenderApplicationControlSupplementalPolicy(), nil + case "#microsoft.graph.windowsDefenderApplicationControlSupplementalPolicyAssignment": + return NewWindowsDefenderApplicationControlSupplementalPolicyAssignment(), nil + case "#microsoft.graph.windowsDefenderApplicationControlSupplementalPolicyDeploymentStatus": + return NewWindowsDefenderApplicationControlSupplementalPolicyDeploymentStatus(), nil + case "#microsoft.graph.windowsDefenderApplicationControlSupplementalPolicyDeploymentSummary": + return NewWindowsDefenderApplicationControlSupplementalPolicyDeploymentSummary(), nil + case "#microsoft.graph.windowsDeliveryOptimizationConfiguration": + return NewWindowsDeliveryOptimizationConfiguration(), nil + case "#microsoft.graph.windowsDeviceMalwareState": + return NewWindowsDeviceMalwareState(), nil + case "#microsoft.graph.windowsDomainJoinConfiguration": + return NewWindowsDomainJoinConfiguration(), nil + case "#microsoft.graph.windowsDriverUpdateInventory": + return NewWindowsDriverUpdateInventory(), nil + case "#microsoft.graph.windowsDriverUpdateProfile": + return NewWindowsDriverUpdateProfile(), nil + case "#microsoft.graph.windowsDriverUpdateProfileAssignment": + return NewWindowsDriverUpdateProfileAssignment(), nil + case "#microsoft.graph.windowsFeatureUpdateCatalogItem": + return NewWindowsFeatureUpdateCatalogItem(), nil + case "#microsoft.graph.windowsFeatureUpdateProfile": + return NewWindowsFeatureUpdateProfile(), nil + case "#microsoft.graph.windowsFeatureUpdateProfileAssignment": + return NewWindowsFeatureUpdateProfileAssignment(), nil + case "#microsoft.graph.windowsHealthMonitoringConfiguration": + return NewWindowsHealthMonitoringConfiguration(), nil + case "#microsoft.graph.windowsHelloForBusinessAuthenticationMethod": + return NewWindowsHelloForBusinessAuthenticationMethod(), nil + case "#microsoft.graph.windowsIdentityProtectionConfiguration": + return NewWindowsIdentityProtectionConfiguration(), nil + case "#microsoft.graph.windowsInformationProtection": + return NewWindowsInformationProtection(), nil + case "#microsoft.graph.windowsInformationProtectionAppLearningSummary": + return NewWindowsInformationProtectionAppLearningSummary(), nil + case "#microsoft.graph.windowsInformationProtectionAppLockerFile": + return NewWindowsInformationProtectionAppLockerFile(), nil + case "#microsoft.graph.windowsInformationProtectionDeviceRegistration": + return NewWindowsInformationProtectionDeviceRegistration(), nil + case "#microsoft.graph.windowsInformationProtectionNetworkLearningSummary": + return NewWindowsInformationProtectionNetworkLearningSummary(), nil + case "#microsoft.graph.windowsInformationProtectionPolicy": + return NewWindowsInformationProtectionPolicy(), nil + case "#microsoft.graph.windowsInformationProtectionWipeAction": + return NewWindowsInformationProtectionWipeAction(), nil + case "#microsoft.graph.windowsKioskConfiguration": + return NewWindowsKioskConfiguration(), nil + case "#microsoft.graph.windowsMalwareInformation": + return NewWindowsMalwareInformation(), nil + case "#microsoft.graph.windowsManagedAppProtection": + return NewWindowsManagedAppProtection(), nil + case "#microsoft.graph.windowsManagedDevice": + return NewWindowsManagedDevice(), nil + case "#microsoft.graph.windowsManagementApp": + return NewWindowsManagementApp(), nil + case "#microsoft.graph.windowsManagementAppHealthState": + return NewWindowsManagementAppHealthState(), nil + case "#microsoft.graph.windowsManagementAppHealthSummary": + return NewWindowsManagementAppHealthSummary(), nil + case "#microsoft.graph.windowsMicrosoftEdgeApp": + return NewWindowsMicrosoftEdgeApp(), nil + case "#microsoft.graph.windowsMobileMSI": + return NewWindowsMobileMSI(), nil + case "#microsoft.graph.windowsOfficeClientConfiguration": + return NewWindowsOfficeClientConfiguration(), nil + case "#microsoft.graph.windowsOfficeClientSecurityConfiguration": + return NewWindowsOfficeClientSecurityConfiguration(), nil + case "#microsoft.graph.windowsPhone81AppX": + return NewWindowsPhone81AppX(), nil + case "#microsoft.graph.windowsPhone81AppXBundle": + return NewWindowsPhone81AppXBundle(), nil + case "#microsoft.graph.windowsPhone81CertificateProfileBase": + return NewWindowsPhone81CertificateProfileBase(), nil + case "#microsoft.graph.windowsPhone81CompliancePolicy": + return NewWindowsPhone81CompliancePolicy(), nil + case "#microsoft.graph.windowsPhone81CustomConfiguration": + return NewWindowsPhone81CustomConfiguration(), nil + case "#microsoft.graph.windowsPhone81GeneralConfiguration": + return NewWindowsPhone81GeneralConfiguration(), nil + case "#microsoft.graph.windowsPhone81ImportedPFXCertificateProfile": + return NewWindowsPhone81ImportedPFXCertificateProfile(), nil + case "#microsoft.graph.windowsPhone81SCEPCertificateProfile": + return NewWindowsPhone81SCEPCertificateProfile(), nil + case "#microsoft.graph.windowsPhone81StoreApp": + return NewWindowsPhone81StoreApp(), nil + case "#microsoft.graph.windowsPhone81TrustedRootCertificate": + return NewWindowsPhone81TrustedRootCertificate(), nil + case "#microsoft.graph.windowsPhone81VpnConfiguration": + return NewWindowsPhone81VpnConfiguration(), nil + case "#microsoft.graph.windowsPhoneEASEmailProfileConfiguration": + return NewWindowsPhoneEASEmailProfileConfiguration(), nil + case "#microsoft.graph.windowsPhoneXAP": + return NewWindowsPhoneXAP(), nil + case "#microsoft.graph.windowsPrivacyDataAccessControlItem": + return NewWindowsPrivacyDataAccessControlItem(), nil + case "#microsoft.graph.windowsProtectionState": + return NewWindowsProtectionState(), nil + case "#microsoft.graph.windowsQualityUpdateCatalogItem": + return NewWindowsQualityUpdateCatalogItem(), nil + case "#microsoft.graph.windowsQualityUpdateProfile": + return NewWindowsQualityUpdateProfile(), nil + case "#microsoft.graph.windowsQualityUpdateProfileAssignment": + return NewWindowsQualityUpdateProfileAssignment(), nil + case "#microsoft.graph.windowsStoreApp": + return NewWindowsStoreApp(), nil + case "#microsoft.graph.windowsUniversalAppX": + return NewWindowsUniversalAppX(), nil + case "#microsoft.graph.windowsUniversalAppXContainedApp": + return NewWindowsUniversalAppXContainedApp(), nil + case "#microsoft.graph.windowsUpdateCatalogItem": + return NewWindowsUpdateCatalogItem(), nil + case "#microsoft.graph.windowsUpdateForBusinessConfiguration": + return NewWindowsUpdateForBusinessConfiguration(), nil + case "#microsoft.graph.windowsUpdateState": + return NewWindowsUpdateState(), nil + case "#microsoft.graph.windowsVpnConfiguration": + return NewWindowsVpnConfiguration(), nil + case "#microsoft.graph.windowsWebApp": + return NewWindowsWebApp(), nil + case "#microsoft.graph.windowsWifiConfiguration": + return NewWindowsWifiConfiguration(), nil + case "#microsoft.graph.windowsWifiEnterpriseEAPConfiguration": + return NewWindowsWifiEnterpriseEAPConfiguration(), nil + case "#microsoft.graph.windowsWiredNetworkConfiguration": + return NewWindowsWiredNetworkConfiguration(), nil + case "#microsoft.graph.winGetApp": + return NewWinGetApp(), nil + case "#microsoft.graph.workbook": + return NewWorkbook(), nil + case "#microsoft.graph.workbookApplication": + return NewWorkbookApplication(), nil + case "#microsoft.graph.workbookChart": + return NewWorkbookChart(), nil + case "#microsoft.graph.workbookChartAreaFormat": + return NewWorkbookChartAreaFormat(), nil + case "#microsoft.graph.workbookChartAxes": + return NewWorkbookChartAxes(), nil + case "#microsoft.graph.workbookChartAxis": + return NewWorkbookChartAxis(), nil + case "#microsoft.graph.workbookChartAxisFormat": + return NewWorkbookChartAxisFormat(), nil + case "#microsoft.graph.workbookChartAxisTitle": + return NewWorkbookChartAxisTitle(), nil + case "#microsoft.graph.workbookChartAxisTitleFormat": + return NewWorkbookChartAxisTitleFormat(), nil + case "#microsoft.graph.workbookChartDataLabelFormat": + return NewWorkbookChartDataLabelFormat(), nil + case "#microsoft.graph.workbookChartDataLabels": + return NewWorkbookChartDataLabels(), nil + case "#microsoft.graph.workbookChartFill": + return NewWorkbookChartFill(), nil + case "#microsoft.graph.workbookChartFont": + return NewWorkbookChartFont(), nil + case "#microsoft.graph.workbookChartGridlines": + return NewWorkbookChartGridlines(), nil + case "#microsoft.graph.workbookChartGridlinesFormat": + return NewWorkbookChartGridlinesFormat(), nil + case "#microsoft.graph.workbookChartLegend": + return NewWorkbookChartLegend(), nil + case "#microsoft.graph.workbookChartLegendFormat": + return NewWorkbookChartLegendFormat(), nil + case "#microsoft.graph.workbookChartLineFormat": + return NewWorkbookChartLineFormat(), nil + case "#microsoft.graph.workbookChartPoint": + return NewWorkbookChartPoint(), nil + case "#microsoft.graph.workbookChartPointFormat": + return NewWorkbookChartPointFormat(), nil + case "#microsoft.graph.workbookChartSeries": + return NewWorkbookChartSeries(), nil + case "#microsoft.graph.workbookChartSeriesFormat": + return NewWorkbookChartSeriesFormat(), nil + case "#microsoft.graph.workbookChartTitle": + return NewWorkbookChartTitle(), nil + case "#microsoft.graph.workbookChartTitleFormat": + return NewWorkbookChartTitleFormat(), nil + case "#microsoft.graph.workbookComment": + return NewWorkbookComment(), nil + case "#microsoft.graph.workbookCommentReply": + return NewWorkbookCommentReply(), nil + case "#microsoft.graph.workbookFilter": + return NewWorkbookFilter(), nil + case "#microsoft.graph.workbookFormatProtection": + return NewWorkbookFormatProtection(), nil + case "#microsoft.graph.workbookFunctionResult": + return NewWorkbookFunctionResult(), nil + case "#microsoft.graph.workbookFunctions": + return NewWorkbookFunctions(), nil + case "#microsoft.graph.workbookNamedItem": + return NewWorkbookNamedItem(), nil + case "#microsoft.graph.workbookOperation": + return NewWorkbookOperation(), nil + case "#microsoft.graph.workbookPivotTable": + return NewWorkbookPivotTable(), nil + case "#microsoft.graph.workbookRange": + return NewWorkbookRange(), nil + case "#microsoft.graph.workbookRangeBorder": + return NewWorkbookRangeBorder(), nil + case "#microsoft.graph.workbookRangeFill": + return NewWorkbookRangeFill(), nil + case "#microsoft.graph.workbookRangeFont": + return NewWorkbookRangeFont(), nil + case "#microsoft.graph.workbookRangeFormat": + return NewWorkbookRangeFormat(), nil + case "#microsoft.graph.workbookRangeSort": + return NewWorkbookRangeSort(), nil + case "#microsoft.graph.workbookRangeView": + return NewWorkbookRangeView(), nil + case "#microsoft.graph.workbookTable": + return NewWorkbookTable(), nil + case "#microsoft.graph.workbookTableColumn": + return NewWorkbookTableColumn(), nil + case "#microsoft.graph.workbookTableRow": + return NewWorkbookTableRow(), nil + case "#microsoft.graph.workbookTableSort": + return NewWorkbookTableSort(), nil + case "#microsoft.graph.workbookWorksheet": + return NewWorkbookWorksheet(), nil + case "#microsoft.graph.workbookWorksheetProtection": + return NewWorkbookWorksheetProtection(), nil + case "#microsoft.graph.workforceIntegration": + return NewWorkforceIntegration(), nil + case "#microsoft.graph.workPosition": + return NewWorkPosition(), nil + case "#microsoft.graph.workspace": + return NewWorkspace(), nil + case "#microsoft.graph.x509CertificateAuthenticationMethodConfiguration": + return NewX509CertificateAuthenticationMethodConfiguration(), nil + case "#microsoft.graph.zebraFotaArtifact": + return NewZebraFotaArtifact(), nil + case "#microsoft.graph.zebraFotaConnector": + return NewZebraFotaConnector(), nil + case "#microsoft.graph.zebraFotaDeployment": + return NewZebraFotaDeployment(), nil + } + } + } + } + return NewEntity(), 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 *Entity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Entity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The unique identifier for an entity. Read-only. +func (m *Entity) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Entity) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Entity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Entity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier for an entity. Read-only. +func (m *Entity) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Entity) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/entityable.go b/src/internal/connector/graph/betasdk/models/entityable.go new file mode 100644 index 000000000..9d8bf35ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/entityable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Entityable +type Entityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetOdataType()(*string) + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/error_code.go b/src/internal/connector/graph/betasdk/models/error_code.go new file mode 100644 index 000000000..cb7dafc24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/error_code.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ErrorCode int + +const ( + // Default Value to indicate no error. + NOERROR_ERRORCODE ErrorCode = iota + // The current user does not have access due to lack of RBAC permissions on the resource. + UNAUTHORIZED_ERRORCODE + // The current user does not have access due to lack of RBAC Scope Tags on the resource. + NOTFOUND_ERRORCODE + // The resource has been deleted. + DELETED_ERRORCODE +) + +func (i ErrorCode) String() string { + return []string{"noError", "unauthorized", "notFound", "deleted"}[i] +} +func ParseErrorCode(v string) (interface{}, error) { + result := NOERROR_ERRORCODE + switch v { + case "noError": + result = NOERROR_ERRORCODE + case "unauthorized": + result = UNAUTHORIZED_ERRORCODE + case "notFound": + result = NOTFOUND_ERRORCODE + case "deleted": + result = DELETED_ERRORCODE + default: + return 0, errors.New("Unknown ErrorCode value: " + v) + } + return &result, nil +} +func SerializeErrorCode(values []ErrorCode) []string { + 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/evaluate_label_job_response.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response.go new file mode 100644 index 000000000..087fb1c2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResponse +type EvaluateLabelJobResponse struct { + JobResponseBase + // The result property + result EvaluateLabelJobResultGroupable +} +// NewEvaluateLabelJobResponse instantiates a new EvaluateLabelJobResponse and sets the default values. +func NewEvaluateLabelJobResponse()(*EvaluateLabelJobResponse) { + m := &EvaluateLabelJobResponse{ + JobResponseBase: *NewJobResponseBase(), + } + return m +} +// CreateEvaluateLabelJobResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEvaluateLabelJobResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvaluateLabelJobResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EvaluateLabelJobResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.JobResponseBase.GetFieldDeserializers() + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEvaluateLabelJobResultGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(EvaluateLabelJobResultGroupable)) + } + return nil + } + return res +} +// GetResult gets the result property value. The result property +func (m *EvaluateLabelJobResponse) GetResult()(EvaluateLabelJobResultGroupable) { + return m.result +} +// Serialize serializes information the current object +func (m *EvaluateLabelJobResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.JobResponseBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("result", m.GetResult()) + if err != nil { + return err + } + } + return nil +} +// SetResult sets the result property value. The result property +func (m *EvaluateLabelJobResponse) SetResult(value EvaluateLabelJobResultGroupable)() { + m.result = value +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_response.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_response.go new file mode 100644 index 000000000..56cfac2c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResponseCollectionResponse +type EvaluateLabelJobResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EvaluateLabelJobResponseable +} +// NewEvaluateLabelJobResponseCollectionResponse instantiates a new EvaluateLabelJobResponseCollectionResponse and sets the default values. +func NewEvaluateLabelJobResponseCollectionResponse()(*EvaluateLabelJobResponseCollectionResponse) { + m := &EvaluateLabelJobResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEvaluateLabelJobResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEvaluateLabelJobResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvaluateLabelJobResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EvaluateLabelJobResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEvaluateLabelJobResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EvaluateLabelJobResponseable, len(val)) + for i, v := range val { + res[i] = v.(EvaluateLabelJobResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EvaluateLabelJobResponseCollectionResponse) GetValue()([]EvaluateLabelJobResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *EvaluateLabelJobResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EvaluateLabelJobResponseCollectionResponse) SetValue(value []EvaluateLabelJobResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_responseable.go new file mode 100644 index 000000000..d5223972f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResponseCollectionResponseable +type EvaluateLabelJobResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EvaluateLabelJobResponseable) + SetValue(value []EvaluateLabelJobResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_responseable.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_responseable.go new file mode 100644 index 000000000..bff41910c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResponseable +type EvaluateLabelJobResponseable interface { + JobResponseBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResult()(EvaluateLabelJobResultGroupable) + SetResult(value EvaluateLabelJobResultGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_result.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result.go new file mode 100644 index 000000000..ffcc1b6b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResult +type EvaluateLabelJobResult 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 OdataType property + odataType *string + // The responsiblePolicy property + responsiblePolicy ResponsiblePolicyable + // The responsibleSensitiveTypes property + responsibleSensitiveTypes []ResponsibleSensitiveTypeable + // The sensitivityLabel property + sensitivityLabel MatchingLabelable +} +// NewEvaluateLabelJobResult instantiates a new evaluateLabelJobResult and sets the default values. +func NewEvaluateLabelJobResult()(*EvaluateLabelJobResult) { + m := &EvaluateLabelJobResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEvaluateLabelJobResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEvaluateLabelJobResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvaluateLabelJobResult(), 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 *EvaluateLabelJobResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EvaluateLabelJobResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["responsiblePolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResponsiblePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResponsiblePolicy(val.(ResponsiblePolicyable)) + } + return nil + } + res["responsibleSensitiveTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResponsibleSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResponsibleSensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(ResponsibleSensitiveTypeable) + } + m.SetResponsibleSensitiveTypes(res) + } + return nil + } + res["sensitivityLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMatchingLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSensitivityLabel(val.(MatchingLabelable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EvaluateLabelJobResult) GetOdataType()(*string) { + return m.odataType +} +// GetResponsiblePolicy gets the responsiblePolicy property value. The responsiblePolicy property +func (m *EvaluateLabelJobResult) GetResponsiblePolicy()(ResponsiblePolicyable) { + return m.responsiblePolicy +} +// GetResponsibleSensitiveTypes gets the responsibleSensitiveTypes property value. The responsibleSensitiveTypes property +func (m *EvaluateLabelJobResult) GetResponsibleSensitiveTypes()([]ResponsibleSensitiveTypeable) { + return m.responsibleSensitiveTypes +} +// GetSensitivityLabel gets the sensitivityLabel property value. The sensitivityLabel property +func (m *EvaluateLabelJobResult) GetSensitivityLabel()(MatchingLabelable) { + return m.sensitivityLabel +} +// Serialize serializes information the current object +func (m *EvaluateLabelJobResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("responsiblePolicy", m.GetResponsiblePolicy()) + if err != nil { + return err + } + } + if m.GetResponsibleSensitiveTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResponsibleSensitiveTypes())) + for i, v := range m.GetResponsibleSensitiveTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("responsibleSensitiveTypes", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sensitivityLabel", m.GetSensitivityLabel()) + 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 *EvaluateLabelJobResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EvaluateLabelJobResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetResponsiblePolicy sets the responsiblePolicy property value. The responsiblePolicy property +func (m *EvaluateLabelJobResult) SetResponsiblePolicy(value ResponsiblePolicyable)() { + m.responsiblePolicy = value +} +// SetResponsibleSensitiveTypes sets the responsibleSensitiveTypes property value. The responsibleSensitiveTypes property +func (m *EvaluateLabelJobResult) SetResponsibleSensitiveTypes(value []ResponsibleSensitiveTypeable)() { + m.responsibleSensitiveTypes = value +} +// SetSensitivityLabel sets the sensitivityLabel property value. The sensitivityLabel property +func (m *EvaluateLabelJobResult) SetSensitivityLabel(value MatchingLabelable)() { + m.sensitivityLabel = value +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_group.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_group.go new file mode 100644 index 000000000..ba2cbbebf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_group.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResultGroup +type EvaluateLabelJobResultGroup 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 automatic property + automatic EvaluateLabelJobResultable + // The OdataType property + odataType *string + // The recommended property + recommended EvaluateLabelJobResultable +} +// NewEvaluateLabelJobResultGroup instantiates a new evaluateLabelJobResultGroup and sets the default values. +func NewEvaluateLabelJobResultGroup()(*EvaluateLabelJobResultGroup) { + m := &EvaluateLabelJobResultGroup{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEvaluateLabelJobResultGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEvaluateLabelJobResultGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvaluateLabelJobResultGroup(), 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 *EvaluateLabelJobResultGroup) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAutomatic gets the automatic property value. The automatic property +func (m *EvaluateLabelJobResultGroup) GetAutomatic()(EvaluateLabelJobResultable) { + return m.automatic +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EvaluateLabelJobResultGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["automatic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEvaluateLabelJobResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomatic(val.(EvaluateLabelJobResultable)) + } + 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["recommended"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEvaluateLabelJobResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecommended(val.(EvaluateLabelJobResultable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EvaluateLabelJobResultGroup) GetOdataType()(*string) { + return m.odataType +} +// GetRecommended gets the recommended property value. The recommended property +func (m *EvaluateLabelJobResultGroup) GetRecommended()(EvaluateLabelJobResultable) { + return m.recommended +} +// Serialize serializes information the current object +func (m *EvaluateLabelJobResultGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("automatic", m.GetAutomatic()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recommended", m.GetRecommended()) + 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 *EvaluateLabelJobResultGroup) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAutomatic sets the automatic property value. The automatic property +func (m *EvaluateLabelJobResultGroup) SetAutomatic(value EvaluateLabelJobResultable)() { + m.automatic = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EvaluateLabelJobResultGroup) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecommended sets the recommended property value. The recommended property +func (m *EvaluateLabelJobResultGroup) SetRecommended(value EvaluateLabelJobResultable)() { + m.recommended = value +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_groupable.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_groupable.go new file mode 100644 index 000000000..6bc07cb5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_result_groupable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResultGroupable +type EvaluateLabelJobResultGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutomatic()(EvaluateLabelJobResultable) + GetOdataType()(*string) + GetRecommended()(EvaluateLabelJobResultable) + SetAutomatic(value EvaluateLabelJobResultable)() + SetOdataType(value *string)() + SetRecommended(value EvaluateLabelJobResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/evaluate_label_job_resultable.go b/src/internal/connector/graph/betasdk/models/evaluate_label_job_resultable.go new file mode 100644 index 000000000..dcb538894 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/evaluate_label_job_resultable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EvaluateLabelJobResultable +type EvaluateLabelJobResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetResponsiblePolicy()(ResponsiblePolicyable) + GetResponsibleSensitiveTypes()([]ResponsibleSensitiveTypeable) + GetSensitivityLabel()(MatchingLabelable) + SetOdataType(value *string)() + SetResponsiblePolicy(value ResponsiblePolicyable)() + SetResponsibleSensitiveTypes(value []ResponsibleSensitiveTypeable)() + SetSensitivityLabel(value MatchingLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/event.go b/src/internal/connector/graph/betasdk/models/event.go new file mode 100644 index 000000000..8df7f7f39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event.go @@ -0,0 +1,1280 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Event +type Event struct { + OutlookItem + // true if the meeting organizer allows invitees to propose a new time when responding; otherwise false. Optional. Default is true. + allowNewTimeProposals *bool + // The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. + attachments []Attachmentable + // The collection of attendees for the event. + attendees []Attendeeable + // The body of the message associated with the event. It can be in HTML or text format. + body ItemBodyable + // The preview of the message associated with the event. It is in text format. + bodyPreview *string + // The calendar that contains the event. Navigation property. Read-only. + calendar Calendarable + // Contains occurrenceId property values of cancelled instances in a recurring series, if the event is the series master. Instances in a recurring series that are cancelled are called cancelledOccurences.Returned only on $select in a Get operation which specifies the id of a series master event (that is, the seriesMasterId property value). + cancelledOccurrences []string + // The date, time, and time zone that the event ends. By default, the end time is in UTC. + end DateTimeTimeZoneable + // The exceptionOccurrences property + exceptionOccurrences []Eventable + // The collection of open extensions defined for the event. Nullable. + extensions []Extensionable + // Set to true if the event has attachments. + hasAttachments *bool + // When set to true, each attendee only sees themselves in the meeting request and meeting Tracking list. Default is false. + hideAttendees *bool + // The importance property + importance *Importance + // The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. + instances []Eventable + // The isAllDay property + isAllDay *bool + // The isCancelled property + isCancelled *bool + // The isDraft property + isDraft *bool + // The isOnlineMeeting property + isOnlineMeeting *bool + // The isOrganizer property + isOrganizer *bool + // The isReminderOn property + isReminderOn *bool + // The location property + location Locationable + // The locations property + locations []Locationable + // The collection of multi-value extended properties defined for the event. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The occurrenceId property + occurrenceId *string + // The onlineMeeting property + onlineMeeting OnlineMeetingInfoable + // The onlineMeetingProvider property + onlineMeetingProvider *OnlineMeetingProviderType + // The onlineMeetingUrl property + onlineMeetingUrl *string + // The organizer property + organizer Recipientable + // The originalEndTimeZone property + originalEndTimeZone *string + // The originalStart property + originalStart *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The originalStartTimeZone property + originalStartTimeZone *string + // The recurrence property + recurrence PatternedRecurrenceable + // The reminderMinutesBeforeStart property + reminderMinutesBeforeStart *int32 + // The responseRequested property + responseRequested *bool + // The responseStatus property + responseStatus ResponseStatusable + // The sensitivity property + sensitivity *Sensitivity + // The seriesMasterId property + seriesMasterId *string + // The showAs property + showAs *FreeBusyStatus + // The collection of single-value extended properties defined for the event. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The start property + start DateTimeTimeZoneable + // The subject property + subject *string + // The transactionId property + transactionId *string + // The type property + type_escaped *EventType + // The uid property + uid *string + // The webLink property + webLink *string +} +// NewEvent instantiates a new Event and sets the default values. +func NewEvent()(*Event) { + m := &Event{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.event"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEvent(), nil +} +// GetAllowNewTimeProposals gets the allowNewTimeProposals property value. true if the meeting organizer allows invitees to propose a new time when responding; otherwise false. Optional. Default is true. +func (m *Event) GetAllowNewTimeProposals()(*bool) { + return m.allowNewTimeProposals +} +// GetAttachments gets the attachments property value. The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. +func (m *Event) GetAttachments()([]Attachmentable) { + return m.attachments +} +// GetAttendees gets the attendees property value. The collection of attendees for the event. +func (m *Event) GetAttendees()([]Attendeeable) { + return m.attendees +} +// GetBody gets the body property value. The body of the message associated with the event. It can be in HTML or text format. +func (m *Event) GetBody()(ItemBodyable) { + return m.body +} +// GetBodyPreview gets the bodyPreview property value. The preview of the message associated with the event. It is in text format. +func (m *Event) GetBodyPreview()(*string) { + return m.bodyPreview +} +// GetCalendar gets the calendar property value. The calendar that contains the event. Navigation property. Read-only. +func (m *Event) GetCalendar()(Calendarable) { + return m.calendar +} +// GetCancelledOccurrences gets the cancelledOccurrences property value. Contains occurrenceId property values of cancelled instances in a recurring series, if the event is the series master. Instances in a recurring series that are cancelled are called cancelledOccurences.Returned only on $select in a Get operation which specifies the id of a series master event (that is, the seriesMasterId property value). +func (m *Event) GetCancelledOccurrences()([]string) { + return m.cancelledOccurrences +} +// GetEnd gets the end property value. The date, time, and time zone that the event ends. By default, the end time is in UTC. +func (m *Event) GetEnd()(DateTimeTimeZoneable) { + return m.end +} +// GetExceptionOccurrences gets the exceptionOccurrences property value. The exceptionOccurrences property +func (m *Event) GetExceptionOccurrences()([]Eventable) { + return m.exceptionOccurrences +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the event. Nullable. +func (m *Event) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Event) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["allowNewTimeProposals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowNewTimeProposals(val) + } + return nil + } + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendeeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attendeeable, len(val)) + for i, v := range val { + res[i] = v.(Attendeeable) + } + m.SetAttendees(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["bodyPreview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyPreview(val) + } + return nil + } + res["calendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCalendarFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCalendar(val.(Calendarable)) + } + return nil + } + res["cancelledOccurrences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCancelledOccurrences(res) + } + return nil + } + res["end"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnd(val.(DateTimeTimeZoneable)) + } + return nil + } + res["exceptionOccurrences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetExceptionOccurrences(res) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["hideAttendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideAttendees(val) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*Importance)) + } + return nil + } + res["instances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetInstances(res) + } + return nil + } + res["isAllDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAllDay(val) + } + return nil + } + res["isCancelled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCancelled(val) + } + return nil + } + res["isDraft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDraft(val) + } + return nil + } + res["isOnlineMeeting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOnlineMeeting(val) + } + return nil + } + res["isOrganizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOrganizer(val) + } + return nil + } + res["isReminderOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReminderOn(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(Locationable)) + } + return nil + } + res["locations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Locationable, len(val)) + for i, v := range val { + res[i] = v.(Locationable) + } + m.SetLocations(res) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["occurrenceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOccurrenceId(val) + } + return nil + } + res["onlineMeeting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnlineMeetingInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnlineMeeting(val.(OnlineMeetingInfoable)) + } + return nil + } + res["onlineMeetingProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingProviderType) + if err != nil { + return err + } + if val != nil { + m.SetOnlineMeetingProvider(val.(*OnlineMeetingProviderType)) + } + return nil + } + res["onlineMeetingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineMeetingUrl(val) + } + return nil + } + res["organizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganizer(val.(Recipientable)) + } + return nil + } + res["originalEndTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalEndTimeZone(val) + } + return nil + } + res["originalStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalStart(val) + } + return nil + } + res["originalStartTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOriginalStartTimeZone(val) + } + return nil + } + res["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["reminderMinutesBeforeStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReminderMinutesBeforeStart(val) + } + return nil + } + res["responseRequested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetResponseRequested(val) + } + return nil + } + res["responseStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResponseStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResponseStatus(val.(ResponseStatusable)) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivity) + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val.(*Sensitivity)) + } + return nil + } + res["seriesMasterId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSeriesMasterId(val) + } + return nil + } + res["showAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFreeBusyStatus) + if err != nil { + return err + } + if val != nil { + m.SetShowAs(val.(*FreeBusyStatus)) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStart(val.(DateTimeTimeZoneable)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["transactionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTransactionId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEventType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*EventType)) + } + return nil + } + res["uid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUid(val) + } + return nil + } + res["webLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebLink(val) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. Set to true if the event has attachments. +func (m *Event) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetHideAttendees gets the hideAttendees property value. When set to true, each attendee only sees themselves in the meeting request and meeting Tracking list. Default is false. +func (m *Event) GetHideAttendees()(*bool) { + return m.hideAttendees +} +// GetImportance gets the importance property value. The importance property +func (m *Event) GetImportance()(*Importance) { + return m.importance +} +// GetInstances gets the instances property value. The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. +func (m *Event) GetInstances()([]Eventable) { + return m.instances +} +// GetIsAllDay gets the isAllDay property value. The isAllDay property +func (m *Event) GetIsAllDay()(*bool) { + return m.isAllDay +} +// GetIsCancelled gets the isCancelled property value. The isCancelled property +func (m *Event) GetIsCancelled()(*bool) { + return m.isCancelled +} +// GetIsDraft gets the isDraft property value. The isDraft property +func (m *Event) GetIsDraft()(*bool) { + return m.isDraft +} +// GetIsOnlineMeeting gets the isOnlineMeeting property value. The isOnlineMeeting property +func (m *Event) GetIsOnlineMeeting()(*bool) { + return m.isOnlineMeeting +} +// GetIsOrganizer gets the isOrganizer property value. The isOrganizer property +func (m *Event) GetIsOrganizer()(*bool) { + return m.isOrganizer +} +// GetIsReminderOn gets the isReminderOn property value. The isReminderOn property +func (m *Event) GetIsReminderOn()(*bool) { + return m.isReminderOn +} +// GetLocation gets the location property value. The location property +func (m *Event) GetLocation()(Locationable) { + return m.location +} +// GetLocations gets the locations property value. The locations property +func (m *Event) GetLocations()([]Locationable) { + return m.locations +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the event. Read-only. Nullable. +func (m *Event) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetOccurrenceId gets the occurrenceId property value. The occurrenceId property +func (m *Event) GetOccurrenceId()(*string) { + return m.occurrenceId +} +// GetOnlineMeeting gets the onlineMeeting property value. The onlineMeeting property +func (m *Event) GetOnlineMeeting()(OnlineMeetingInfoable) { + return m.onlineMeeting +} +// GetOnlineMeetingProvider gets the onlineMeetingProvider property value. The onlineMeetingProvider property +func (m *Event) GetOnlineMeetingProvider()(*OnlineMeetingProviderType) { + return m.onlineMeetingProvider +} +// GetOnlineMeetingUrl gets the onlineMeetingUrl property value. The onlineMeetingUrl property +func (m *Event) GetOnlineMeetingUrl()(*string) { + return m.onlineMeetingUrl +} +// GetOrganizer gets the organizer property value. The organizer property +func (m *Event) GetOrganizer()(Recipientable) { + return m.organizer +} +// GetOriginalEndTimeZone gets the originalEndTimeZone property value. The originalEndTimeZone property +func (m *Event) GetOriginalEndTimeZone()(*string) { + return m.originalEndTimeZone +} +// GetOriginalStart gets the originalStart property value. The originalStart property +func (m *Event) GetOriginalStart()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.originalStart +} +// GetOriginalStartTimeZone gets the originalStartTimeZone property value. The originalStartTimeZone property +func (m *Event) GetOriginalStartTimeZone()(*string) { + return m.originalStartTimeZone +} +// GetRecurrence gets the recurrence property value. The recurrence property +func (m *Event) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetReminderMinutesBeforeStart gets the reminderMinutesBeforeStart property value. The reminderMinutesBeforeStart property +func (m *Event) GetReminderMinutesBeforeStart()(*int32) { + return m.reminderMinutesBeforeStart +} +// GetResponseRequested gets the responseRequested property value. The responseRequested property +func (m *Event) GetResponseRequested()(*bool) { + return m.responseRequested +} +// GetResponseStatus gets the responseStatus property value. The responseStatus property +func (m *Event) GetResponseStatus()(ResponseStatusable) { + return m.responseStatus +} +// GetSensitivity gets the sensitivity property value. The sensitivity property +func (m *Event) GetSensitivity()(*Sensitivity) { + return m.sensitivity +} +// GetSeriesMasterId gets the seriesMasterId property value. The seriesMasterId property +func (m *Event) GetSeriesMasterId()(*string) { + return m.seriesMasterId +} +// GetShowAs gets the showAs property value. The showAs property +func (m *Event) GetShowAs()(*FreeBusyStatus) { + return m.showAs +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the event. Read-only. Nullable. +func (m *Event) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetStart gets the start property value. The start property +func (m *Event) GetStart()(DateTimeTimeZoneable) { + return m.start +} +// GetSubject gets the subject property value. The subject property +func (m *Event) GetSubject()(*string) { + return m.subject +} +// GetTransactionId gets the transactionId property value. The transactionId property +func (m *Event) GetTransactionId()(*string) { + return m.transactionId +} +// GetType gets the type property value. The type property +func (m *Event) GetType()(*EventType) { + return m.type_escaped +} +// GetUid gets the uid property value. The uid property +func (m *Event) GetUid()(*string) { + return m.uid +} +// GetWebLink gets the webLink property value. The webLink property +func (m *Event) GetWebLink()(*string) { + return m.webLink +} +// Serialize serializes information the current object +func (m *Event) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowNewTimeProposals", m.GetAllowNewTimeProposals()) + if err != nil { + return err + } + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attendees", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bodyPreview", m.GetBodyPreview()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("calendar", m.GetCalendar()) + if err != nil { + return err + } + } + if m.GetCancelledOccurrences() != nil { + err = writer.WriteCollectionOfStringValues("cancelledOccurrences", m.GetCancelledOccurrences()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("end", m.GetEnd()) + if err != nil { + return err + } + } + if m.GetExceptionOccurrences() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExceptionOccurrences())) + for i, v := range m.GetExceptionOccurrences() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exceptionOccurrences", cast) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hideAttendees", m.GetHideAttendees()) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err = writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + if m.GetInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInstances())) + for i, v := range m.GetInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("instances", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAllDay", m.GetIsAllDay()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCancelled", m.GetIsCancelled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDraft", m.GetIsDraft()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOnlineMeeting", m.GetIsOnlineMeeting()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOrganizer", m.GetIsOrganizer()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReminderOn", m.GetIsReminderOn()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + if m.GetLocations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocations())) + for i, v := range m.GetLocations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("locations", cast) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("occurrenceId", m.GetOccurrenceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onlineMeeting", m.GetOnlineMeeting()) + if err != nil { + return err + } + } + if m.GetOnlineMeetingProvider() != nil { + cast := (*m.GetOnlineMeetingProvider()).String() + err = writer.WriteStringValue("onlineMeetingProvider", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onlineMeetingUrl", m.GetOnlineMeetingUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("organizer", m.GetOrganizer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originalEndTimeZone", m.GetOriginalEndTimeZone()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("originalStart", m.GetOriginalStart()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("originalStartTimeZone", m.GetOriginalStartTimeZone()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("reminderMinutesBeforeStart", m.GetReminderMinutesBeforeStart()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("responseRequested", m.GetResponseRequested()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("responseStatus", m.GetResponseStatus()) + if err != nil { + return err + } + } + if m.GetSensitivity() != nil { + cast := (*m.GetSensitivity()).String() + err = writer.WriteStringValue("sensitivity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("seriesMasterId", m.GetSeriesMasterId()) + if err != nil { + return err + } + } + if m.GetShowAs() != nil { + cast := (*m.GetShowAs()).String() + err = writer.WriteStringValue("showAs", &cast) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("start", m.GetStart()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("transactionId", m.GetTransactionId()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uid", m.GetUid()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webLink", m.GetWebLink()) + if err != nil { + return err + } + } + return nil +} +// SetAllowNewTimeProposals sets the allowNewTimeProposals property value. true if the meeting organizer allows invitees to propose a new time when responding; otherwise false. Optional. Default is true. +func (m *Event) SetAllowNewTimeProposals(value *bool)() { + m.allowNewTimeProposals = value +} +// SetAttachments sets the attachments property value. The collection of FileAttachment, ItemAttachment, and referenceAttachment attachments for the event. Navigation property. Read-only. Nullable. +func (m *Event) SetAttachments(value []Attachmentable)() { + m.attachments = value +} +// SetAttendees sets the attendees property value. The collection of attendees for the event. +func (m *Event) SetAttendees(value []Attendeeable)() { + m.attendees = value +} +// SetBody sets the body property value. The body of the message associated with the event. It can be in HTML or text format. +func (m *Event) SetBody(value ItemBodyable)() { + m.body = value +} +// SetBodyPreview sets the bodyPreview property value. The preview of the message associated with the event. It is in text format. +func (m *Event) SetBodyPreview(value *string)() { + m.bodyPreview = value +} +// SetCalendar sets the calendar property value. The calendar that contains the event. Navigation property. Read-only. +func (m *Event) SetCalendar(value Calendarable)() { + m.calendar = value +} +// SetCancelledOccurrences sets the cancelledOccurrences property value. Contains occurrenceId property values of cancelled instances in a recurring series, if the event is the series master. Instances in a recurring series that are cancelled are called cancelledOccurences.Returned only on $select in a Get operation which specifies the id of a series master event (that is, the seriesMasterId property value). +func (m *Event) SetCancelledOccurrences(value []string)() { + m.cancelledOccurrences = value +} +// SetEnd sets the end property value. The date, time, and time zone that the event ends. By default, the end time is in UTC. +func (m *Event) SetEnd(value DateTimeTimeZoneable)() { + m.end = value +} +// SetExceptionOccurrences sets the exceptionOccurrences property value. The exceptionOccurrences property +func (m *Event) SetExceptionOccurrences(value []Eventable)() { + m.exceptionOccurrences = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the event. Nullable. +func (m *Event) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetHasAttachments sets the hasAttachments property value. Set to true if the event has attachments. +func (m *Event) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetHideAttendees sets the hideAttendees property value. When set to true, each attendee only sees themselves in the meeting request and meeting Tracking list. Default is false. +func (m *Event) SetHideAttendees(value *bool)() { + m.hideAttendees = value +} +// SetImportance sets the importance property value. The importance property +func (m *Event) SetImportance(value *Importance)() { + m.importance = value +} +// SetInstances sets the instances property value. The occurrences of a recurring series, if the event is a series master. This property includes occurrences that are part of the recurrence pattern, and exceptions that have been modified, but does not include occurrences that have been cancelled from the series. Navigation property. Read-only. Nullable. +func (m *Event) SetInstances(value []Eventable)() { + m.instances = value +} +// SetIsAllDay sets the isAllDay property value. The isAllDay property +func (m *Event) SetIsAllDay(value *bool)() { + m.isAllDay = value +} +// SetIsCancelled sets the isCancelled property value. The isCancelled property +func (m *Event) SetIsCancelled(value *bool)() { + m.isCancelled = value +} +// SetIsDraft sets the isDraft property value. The isDraft property +func (m *Event) SetIsDraft(value *bool)() { + m.isDraft = value +} +// SetIsOnlineMeeting sets the isOnlineMeeting property value. The isOnlineMeeting property +func (m *Event) SetIsOnlineMeeting(value *bool)() { + m.isOnlineMeeting = value +} +// SetIsOrganizer sets the isOrganizer property value. The isOrganizer property +func (m *Event) SetIsOrganizer(value *bool)() { + m.isOrganizer = value +} +// SetIsReminderOn sets the isReminderOn property value. The isReminderOn property +func (m *Event) SetIsReminderOn(value *bool)() { + m.isReminderOn = value +} +// SetLocation sets the location property value. The location property +func (m *Event) SetLocation(value Locationable)() { + m.location = value +} +// SetLocations sets the locations property value. The locations property +func (m *Event) SetLocations(value []Locationable)() { + m.locations = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the event. Read-only. Nullable. +func (m *Event) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetOccurrenceId sets the occurrenceId property value. The occurrenceId property +func (m *Event) SetOccurrenceId(value *string)() { + m.occurrenceId = value +} +// SetOnlineMeeting sets the onlineMeeting property value. The onlineMeeting property +func (m *Event) SetOnlineMeeting(value OnlineMeetingInfoable)() { + m.onlineMeeting = value +} +// SetOnlineMeetingProvider sets the onlineMeetingProvider property value. The onlineMeetingProvider property +func (m *Event) SetOnlineMeetingProvider(value *OnlineMeetingProviderType)() { + m.onlineMeetingProvider = value +} +// SetOnlineMeetingUrl sets the onlineMeetingUrl property value. The onlineMeetingUrl property +func (m *Event) SetOnlineMeetingUrl(value *string)() { + m.onlineMeetingUrl = value +} +// SetOrganizer sets the organizer property value. The organizer property +func (m *Event) SetOrganizer(value Recipientable)() { + m.organizer = value +} +// SetOriginalEndTimeZone sets the originalEndTimeZone property value. The originalEndTimeZone property +func (m *Event) SetOriginalEndTimeZone(value *string)() { + m.originalEndTimeZone = value +} +// SetOriginalStart sets the originalStart property value. The originalStart property +func (m *Event) SetOriginalStart(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.originalStart = value +} +// SetOriginalStartTimeZone sets the originalStartTimeZone property value. The originalStartTimeZone property +func (m *Event) SetOriginalStartTimeZone(value *string)() { + m.originalStartTimeZone = value +} +// SetRecurrence sets the recurrence property value. The recurrence property +func (m *Event) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetReminderMinutesBeforeStart sets the reminderMinutesBeforeStart property value. The reminderMinutesBeforeStart property +func (m *Event) SetReminderMinutesBeforeStart(value *int32)() { + m.reminderMinutesBeforeStart = value +} +// SetResponseRequested sets the responseRequested property value. The responseRequested property +func (m *Event) SetResponseRequested(value *bool)() { + m.responseRequested = value +} +// SetResponseStatus sets the responseStatus property value. The responseStatus property +func (m *Event) SetResponseStatus(value ResponseStatusable)() { + m.responseStatus = value +} +// SetSensitivity sets the sensitivity property value. The sensitivity property +func (m *Event) SetSensitivity(value *Sensitivity)() { + m.sensitivity = value +} +// SetSeriesMasterId sets the seriesMasterId property value. The seriesMasterId property +func (m *Event) SetSeriesMasterId(value *string)() { + m.seriesMasterId = value +} +// SetShowAs sets the showAs property value. The showAs property +func (m *Event) SetShowAs(value *FreeBusyStatus)() { + m.showAs = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the event. Read-only. Nullable. +func (m *Event) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetStart sets the start property value. The start property +func (m *Event) SetStart(value DateTimeTimeZoneable)() { + m.start = value +} +// SetSubject sets the subject property value. The subject property +func (m *Event) SetSubject(value *string)() { + m.subject = value +} +// SetTransactionId sets the transactionId property value. The transactionId property +func (m *Event) SetTransactionId(value *string)() { + m.transactionId = value +} +// SetType sets the type property value. The type property +func (m *Event) SetType(value *EventType)() { + m.type_escaped = value +} +// SetUid sets the uid property value. The uid property +func (m *Event) SetUid(value *string)() { + m.uid = value +} +// SetWebLink sets the webLink property value. The webLink property +func (m *Event) SetWebLink(value *string)() { + m.webLink = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_collection_response.go b/src/internal/connector/graph/betasdk/models/event_collection_response.go new file mode 100644 index 000000000..1b4a0ec47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventCollectionResponse +type EventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Eventable +} +// NewEventCollectionResponse instantiates a new EventCollectionResponse and sets the default values. +func NewEventCollectionResponse()(*EventCollectionResponse) { + m := &EventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventCollectionResponse) GetValue()([]Eventable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventCollectionResponse) SetValue(value []Eventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/event_collection_responseable.go new file mode 100644 index 000000000..30478190a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventCollectionResponseable +type EventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Eventable) + SetValue(value []Eventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message.go b/src/internal/connector/graph/betasdk/models/event_message.go new file mode 100644 index 000000000..d33c4569d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message.go @@ -0,0 +1,318 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessage +type EventMessage struct { + Message + // The end time of the requested meeting. + endDateTime DateTimeTimeZoneable + // The event associated with the event message. The assumption for attendees or room resources is that the Calendar Attendant is set to automatically update the calendar with an event when meeting request event messages arrive. Navigation property. Read-only. + event Eventable + // The isAllDay property + isAllDay *bool + // The isDelegated property + isDelegated *bool + // The isOutOfDate property + isOutOfDate *bool + // The location property + location Locationable + // The meetingMessageType property + meetingMessageType *MeetingMessageType + // The recurrence property + recurrence PatternedRecurrenceable + // The startDateTime property + startDateTime DateTimeTimeZoneable + // The type property + type_escaped *EventType +} +// NewEventMessage instantiates a new EventMessage and sets the default values. +func NewEventMessage()(*EventMessage) { + m := &EventMessage{ + Message: *NewMessage(), + } + odataTypeValue := "#microsoft.graph.eventMessage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEventMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.eventMessageRequest": + return NewEventMessageRequest(), nil + case "#microsoft.graph.eventMessageResponse": + return NewEventMessageResponse(), nil + } + } + } + } + return NewEventMessage(), nil +} +// GetEndDateTime gets the endDateTime property value. The end time of the requested meeting. +func (m *EventMessage) GetEndDateTime()(DateTimeTimeZoneable) { + return m.endDateTime +} +// GetEvent gets the event property value. The event associated with the event message. The assumption for attendees or room resources is that the Calendar Attendant is set to automatically update the calendar with an event when meeting request event messages arrive. Navigation property. Read-only. +func (m *EventMessage) GetEvent()(Eventable) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Message.GetFieldDeserializers() + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEvent(val.(Eventable)) + } + return nil + } + res["isAllDay"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAllDay(val) + } + return nil + } + res["isDelegated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDelegated(val) + } + return nil + } + res["isOutOfDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOutOfDate(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(Locationable)) + } + return nil + } + res["meetingMessageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMeetingMessageType) + if err != nil { + return err + } + if val != nil { + m.SetMeetingMessageType(val.(*MeetingMessageType)) + } + return nil + } + res["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEventType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*EventType)) + } + return nil + } + return res +} +// GetIsAllDay gets the isAllDay property value. The isAllDay property +func (m *EventMessage) GetIsAllDay()(*bool) { + return m.isAllDay +} +// GetIsDelegated gets the isDelegated property value. The isDelegated property +func (m *EventMessage) GetIsDelegated()(*bool) { + return m.isDelegated +} +// GetIsOutOfDate gets the isOutOfDate property value. The isOutOfDate property +func (m *EventMessage) GetIsOutOfDate()(*bool) { + return m.isOutOfDate +} +// GetLocation gets the location property value. The location property +func (m *EventMessage) GetLocation()(Locationable) { + return m.location +} +// GetMeetingMessageType gets the meetingMessageType property value. The meetingMessageType property +func (m *EventMessage) GetMeetingMessageType()(*MeetingMessageType) { + return m.meetingMessageType +} +// GetRecurrence gets the recurrence property value. The recurrence property +func (m *EventMessage) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *EventMessage) GetStartDateTime()(DateTimeTimeZoneable) { + return m.startDateTime +} +// GetType gets the type property value. The type property +func (m *EventMessage) GetType()(*EventType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *EventMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Message.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("event", m.GetEvent()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAllDay", m.GetIsAllDay()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDelegated", m.GetIsDelegated()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOutOfDate", m.GetIsOutOfDate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + if m.GetMeetingMessageType() != nil { + cast := (*m.GetMeetingMessageType()).String() + err = writer.WriteStringValue("meetingMessageType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetEndDateTime sets the endDateTime property value. The end time of the requested meeting. +func (m *EventMessage) SetEndDateTime(value DateTimeTimeZoneable)() { + m.endDateTime = value +} +// SetEvent sets the event property value. The event associated with the event message. The assumption for attendees or room resources is that the Calendar Attendant is set to automatically update the calendar with an event when meeting request event messages arrive. Navigation property. Read-only. +func (m *EventMessage) SetEvent(value Eventable)() { + m.event = value +} +// SetIsAllDay sets the isAllDay property value. The isAllDay property +func (m *EventMessage) SetIsAllDay(value *bool)() { + m.isAllDay = value +} +// SetIsDelegated sets the isDelegated property value. The isDelegated property +func (m *EventMessage) SetIsDelegated(value *bool)() { + m.isDelegated = value +} +// SetIsOutOfDate sets the isOutOfDate property value. The isOutOfDate property +func (m *EventMessage) SetIsOutOfDate(value *bool)() { + m.isOutOfDate = value +} +// SetLocation sets the location property value. The location property +func (m *EventMessage) SetLocation(value Locationable)() { + m.location = value +} +// SetMeetingMessageType sets the meetingMessageType property value. The meetingMessageType property +func (m *EventMessage) SetMeetingMessageType(value *MeetingMessageType)() { + m.meetingMessageType = value +} +// SetRecurrence sets the recurrence property value. The recurrence property +func (m *EventMessage) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *EventMessage) SetStartDateTime(value DateTimeTimeZoneable)() { + m.startDateTime = value +} +// SetType sets the type property value. The type property +func (m *EventMessage) SetType(value *EventType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_collection_response.go b/src/internal/connector/graph/betasdk/models/event_message_collection_response.go new file mode 100644 index 000000000..a019f1b35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageCollectionResponse +type EventMessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EventMessageable +} +// NewEventMessageCollectionResponse instantiates a new EventMessageCollectionResponse and sets the default values. +func NewEventMessageCollectionResponse()(*EventMessageCollectionResponse) { + m := &EventMessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventMessageable, len(val)) + for i, v := range val { + res[i] = v.(EventMessageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventMessageCollectionResponse) GetValue()([]EventMessageable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventMessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventMessageCollectionResponse) SetValue(value []EventMessageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/event_message_collection_responseable.go new file mode 100644 index 000000000..1ebe83290 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageCollectionResponseable +type EventMessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EventMessageable) + SetValue(value []EventMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_detail.go b/src/internal/connector/graph/betasdk/models/event_message_detail.go new file mode 100644 index 000000000..1950832ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_detail.go @@ -0,0 +1,147 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageDetail +type EventMessageDetail 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 OdataType property + odataType *string +} +// NewEventMessageDetail instantiates a new eventMessageDetail and sets the default values. +func NewEventMessageDetail()(*EventMessageDetail) { + m := &EventMessageDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.callEndedEventMessageDetail": + return NewCallEndedEventMessageDetail(), nil + case "#microsoft.graph.callRecordingEventMessageDetail": + return NewCallRecordingEventMessageDetail(), nil + case "#microsoft.graph.callStartedEventMessageDetail": + return NewCallStartedEventMessageDetail(), nil + case "#microsoft.graph.callTranscriptEventMessageDetail": + return NewCallTranscriptEventMessageDetail(), nil + case "#microsoft.graph.channelAddedEventMessageDetail": + return NewChannelAddedEventMessageDetail(), nil + case "#microsoft.graph.channelDeletedEventMessageDetail": + return NewChannelDeletedEventMessageDetail(), nil + case "#microsoft.graph.channelDescriptionUpdatedEventMessageDetail": + return NewChannelDescriptionUpdatedEventMessageDetail(), nil + case "#microsoft.graph.channelRenamedEventMessageDetail": + return NewChannelRenamedEventMessageDetail(), nil + case "#microsoft.graph.channelSetAsFavoriteByDefaultEventMessageDetail": + return NewChannelSetAsFavoriteByDefaultEventMessageDetail(), nil + case "#microsoft.graph.channelUnsetAsFavoriteByDefaultEventMessageDetail": + return NewChannelUnsetAsFavoriteByDefaultEventMessageDetail(), nil + case "#microsoft.graph.chatRenamedEventMessageDetail": + return NewChatRenamedEventMessageDetail(), nil + case "#microsoft.graph.conversationMemberRoleUpdatedEventMessageDetail": + return NewConversationMemberRoleUpdatedEventMessageDetail(), nil + case "#microsoft.graph.meetingPolicyUpdatedEventMessageDetail": + return NewMeetingPolicyUpdatedEventMessageDetail(), nil + case "#microsoft.graph.membersAddedEventMessageDetail": + return NewMembersAddedEventMessageDetail(), nil + case "#microsoft.graph.membersDeletedEventMessageDetail": + return NewMembersDeletedEventMessageDetail(), nil + case "#microsoft.graph.membersJoinedEventMessageDetail": + return NewMembersJoinedEventMessageDetail(), nil + case "#microsoft.graph.membersLeftEventMessageDetail": + return NewMembersLeftEventMessageDetail(), nil + case "#microsoft.graph.messagePinnedEventMessageDetail": + return NewMessagePinnedEventMessageDetail(), nil + case "#microsoft.graph.messageUnpinnedEventMessageDetail": + return NewMessageUnpinnedEventMessageDetail(), nil + case "#microsoft.graph.tabUpdatedEventMessageDetail": + return NewTabUpdatedEventMessageDetail(), nil + case "#microsoft.graph.teamArchivedEventMessageDetail": + return NewTeamArchivedEventMessageDetail(), nil + case "#microsoft.graph.teamCreatedEventMessageDetail": + return NewTeamCreatedEventMessageDetail(), nil + case "#microsoft.graph.teamDescriptionUpdatedEventMessageDetail": + return NewTeamDescriptionUpdatedEventMessageDetail(), nil + case "#microsoft.graph.teamJoiningDisabledEventMessageDetail": + return NewTeamJoiningDisabledEventMessageDetail(), nil + case "#microsoft.graph.teamJoiningEnabledEventMessageDetail": + return NewTeamJoiningEnabledEventMessageDetail(), nil + case "#microsoft.graph.teamRenamedEventMessageDetail": + return NewTeamRenamedEventMessageDetail(), nil + case "#microsoft.graph.teamsAppInstalledEventMessageDetail": + return NewTeamsAppInstalledEventMessageDetail(), nil + case "#microsoft.graph.teamsAppRemovedEventMessageDetail": + return NewTeamsAppRemovedEventMessageDetail(), nil + case "#microsoft.graph.teamsAppUpgradedEventMessageDetail": + return NewTeamsAppUpgradedEventMessageDetail(), nil + case "#microsoft.graph.teamUnarchivedEventMessageDetail": + return NewTeamUnarchivedEventMessageDetail(), nil + } + } + } + } + return NewEventMessageDetail(), 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 *EventMessageDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EventMessageDetail) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EventMessageDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EventMessageDetail) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_detailable.go b/src/internal/connector/graph/betasdk/models/event_message_detailable.go new file mode 100644 index 000000000..7fdf01c55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_detailable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageDetailable +type EventMessageDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_request.go b/src/internal/connector/graph/betasdk/models/event_message_request.go new file mode 100644 index 000000000..bbf2c400c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_request.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageRequest +type EventMessageRequest struct { + EventMessage + // True if the meeting organizer allows invitees to propose a new time when responding, false otherwise. Optional. Default is true. + allowNewTimeProposals *bool + // If the meeting update changes the meeting end time, this property specifies the previous meeting end time. + previousEndDateTime DateTimeTimeZoneable + // If the meeting update changes the meeting location, this property specifies the previous meeting location. + previousLocation Locationable + // If the meeting update changes the meeting start time, this property specifies the previous meeting start time. + previousStartDateTime DateTimeTimeZoneable + // Set to true if the sender would like the invitee to send a response to the requested meeting. + responseRequested *bool +} +// NewEventMessageRequest instantiates a new EventMessageRequest and sets the default values. +func NewEventMessageRequest()(*EventMessageRequest) { + m := &EventMessageRequest{ + EventMessage: *NewEventMessage(), + } + odataTypeValue := "#microsoft.graph.eventMessageRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEventMessageRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventMessageRequest(), nil +} +// GetAllowNewTimeProposals gets the allowNewTimeProposals property value. True if the meeting organizer allows invitees to propose a new time when responding, false otherwise. Optional. Default is true. +func (m *EventMessageRequest) GetAllowNewTimeProposals()(*bool) { + return m.allowNewTimeProposals +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessage.GetFieldDeserializers() + res["allowNewTimeProposals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowNewTimeProposals(val) + } + return nil + } + res["previousEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreviousEndDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["previousLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreviousLocation(val.(Locationable)) + } + return nil + } + res["previousStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreviousStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["responseRequested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetResponseRequested(val) + } + return nil + } + return res +} +// GetPreviousEndDateTime gets the previousEndDateTime property value. If the meeting update changes the meeting end time, this property specifies the previous meeting end time. +func (m *EventMessageRequest) GetPreviousEndDateTime()(DateTimeTimeZoneable) { + return m.previousEndDateTime +} +// GetPreviousLocation gets the previousLocation property value. If the meeting update changes the meeting location, this property specifies the previous meeting location. +func (m *EventMessageRequest) GetPreviousLocation()(Locationable) { + return m.previousLocation +} +// GetPreviousStartDateTime gets the previousStartDateTime property value. If the meeting update changes the meeting start time, this property specifies the previous meeting start time. +func (m *EventMessageRequest) GetPreviousStartDateTime()(DateTimeTimeZoneable) { + return m.previousStartDateTime +} +// GetResponseRequested gets the responseRequested property value. Set to true if the sender would like the invitee to send a response to the requested meeting. +func (m *EventMessageRequest) GetResponseRequested()(*bool) { + return m.responseRequested +} +// Serialize serializes information the current object +func (m *EventMessageRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessage.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowNewTimeProposals", m.GetAllowNewTimeProposals()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("previousEndDateTime", m.GetPreviousEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("previousLocation", m.GetPreviousLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("previousStartDateTime", m.GetPreviousStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("responseRequested", m.GetResponseRequested()) + if err != nil { + return err + } + } + return nil +} +// SetAllowNewTimeProposals sets the allowNewTimeProposals property value. True if the meeting organizer allows invitees to propose a new time when responding, false otherwise. Optional. Default is true. +func (m *EventMessageRequest) SetAllowNewTimeProposals(value *bool)() { + m.allowNewTimeProposals = value +} +// SetPreviousEndDateTime sets the previousEndDateTime property value. If the meeting update changes the meeting end time, this property specifies the previous meeting end time. +func (m *EventMessageRequest) SetPreviousEndDateTime(value DateTimeTimeZoneable)() { + m.previousEndDateTime = value +} +// SetPreviousLocation sets the previousLocation property value. If the meeting update changes the meeting location, this property specifies the previous meeting location. +func (m *EventMessageRequest) SetPreviousLocation(value Locationable)() { + m.previousLocation = value +} +// SetPreviousStartDateTime sets the previousStartDateTime property value. If the meeting update changes the meeting start time, this property specifies the previous meeting start time. +func (m *EventMessageRequest) SetPreviousStartDateTime(value DateTimeTimeZoneable)() { + m.previousStartDateTime = value +} +// SetResponseRequested sets the responseRequested property value. Set to true if the sender would like the invitee to send a response to the requested meeting. +func (m *EventMessageRequest) SetResponseRequested(value *bool)() { + m.responseRequested = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_request_collection_response.go b/src/internal/connector/graph/betasdk/models/event_message_request_collection_response.go new file mode 100644 index 000000000..4ffcd59a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageRequestCollectionResponse +type EventMessageRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EventMessageRequestable +} +// NewEventMessageRequestCollectionResponse instantiates a new EventMessageRequestCollectionResponse and sets the default values. +func NewEventMessageRequestCollectionResponse()(*EventMessageRequestCollectionResponse) { + m := &EventMessageRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventMessageRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventMessageRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventMessageRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventMessageRequestable, len(val)) + for i, v := range val { + res[i] = v.(EventMessageRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventMessageRequestCollectionResponse) GetValue()([]EventMessageRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventMessageRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventMessageRequestCollectionResponse) SetValue(value []EventMessageRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/event_message_request_collection_responseable.go new file mode 100644 index 000000000..1fd83b4b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageRequestCollectionResponseable +type EventMessageRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EventMessageRequestable) + SetValue(value []EventMessageRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_requestable.go b/src/internal/connector/graph/betasdk/models/event_message_requestable.go new file mode 100644 index 000000000..f0b3ac563 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_requestable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageRequestable +type EventMessageRequestable interface { + EventMessageable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowNewTimeProposals()(*bool) + GetPreviousEndDateTime()(DateTimeTimeZoneable) + GetPreviousLocation()(Locationable) + GetPreviousStartDateTime()(DateTimeTimeZoneable) + GetResponseRequested()(*bool) + SetAllowNewTimeProposals(value *bool)() + SetPreviousEndDateTime(value DateTimeTimeZoneable)() + SetPreviousLocation(value Locationable)() + SetPreviousStartDateTime(value DateTimeTimeZoneable)() + SetResponseRequested(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_response.go b/src/internal/connector/graph/betasdk/models/event_message_response.go new file mode 100644 index 000000000..b46fd5e8a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_response.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageResponse +type EventMessageResponse struct { + EventMessage + // The proposedNewTime property + proposedNewTime TimeSlotable + // The responseType property + responseType *ResponseType +} +// NewEventMessageResponse instantiates a new EventMessageResponse and sets the default values. +func NewEventMessageResponse()(*EventMessageResponse) { + m := &EventMessageResponse{ + EventMessage: *NewEventMessage(), + } + odataTypeValue := "#microsoft.graph.eventMessageResponse"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEventMessageResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventMessageResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessage.GetFieldDeserializers() + res["proposedNewTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimeSlotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProposedNewTime(val.(TimeSlotable)) + } + return nil + } + res["responseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResponseType) + if err != nil { + return err + } + if val != nil { + m.SetResponseType(val.(*ResponseType)) + } + return nil + } + return res +} +// GetProposedNewTime gets the proposedNewTime property value. The proposedNewTime property +func (m *EventMessageResponse) GetProposedNewTime()(TimeSlotable) { + return m.proposedNewTime +} +// GetResponseType gets the responseType property value. The responseType property +func (m *EventMessageResponse) GetResponseType()(*ResponseType) { + return m.responseType +} +// Serialize serializes information the current object +func (m *EventMessageResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessage.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("proposedNewTime", m.GetProposedNewTime()) + if err != nil { + return err + } + } + if m.GetResponseType() != nil { + cast := (*m.GetResponseType()).String() + err = writer.WriteStringValue("responseType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetProposedNewTime sets the proposedNewTime property value. The proposedNewTime property +func (m *EventMessageResponse) SetProposedNewTime(value TimeSlotable)() { + m.proposedNewTime = value +} +// SetResponseType sets the responseType property value. The responseType property +func (m *EventMessageResponse) SetResponseType(value *ResponseType)() { + m.responseType = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_response_collection_response.go b/src/internal/connector/graph/betasdk/models/event_message_response_collection_response.go new file mode 100644 index 000000000..64075106c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageResponseCollectionResponse +type EventMessageResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []EventMessageResponseable +} +// NewEventMessageResponseCollectionResponse instantiates a new EventMessageResponseCollectionResponse and sets the default values. +func NewEventMessageResponseCollectionResponse()(*EventMessageResponseCollectionResponse) { + m := &EventMessageResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventMessageResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventMessageResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventMessageResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventMessageResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventMessageResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventMessageResponseable, len(val)) + for i, v := range val { + res[i] = v.(EventMessageResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventMessageResponseCollectionResponse) GetValue()([]EventMessageResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventMessageResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventMessageResponseCollectionResponse) SetValue(value []EventMessageResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/event_message_response_collection_responseable.go new file mode 100644 index 000000000..ac1ac9cd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageResponseCollectionResponseable +type EventMessageResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EventMessageResponseable) + SetValue(value []EventMessageResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_message_responseable.go b/src/internal/connector/graph/betasdk/models/event_message_responseable.go new file mode 100644 index 000000000..dbc6fcd5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_message_responseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageResponseable +type EventMessageResponseable interface { + EventMessageable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProposedNewTime()(TimeSlotable) + GetResponseType()(*ResponseType) + SetProposedNewTime(value TimeSlotable)() + SetResponseType(value *ResponseType)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_messageable.go b/src/internal/connector/graph/betasdk/models/event_messageable.go new file mode 100644 index 000000000..f991ac08e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_messageable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventMessageable +type EventMessageable interface { + Messageable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(DateTimeTimeZoneable) + GetEvent()(Eventable) + GetIsAllDay()(*bool) + GetIsDelegated()(*bool) + GetIsOutOfDate()(*bool) + GetLocation()(Locationable) + GetMeetingMessageType()(*MeetingMessageType) + GetRecurrence()(PatternedRecurrenceable) + GetStartDateTime()(DateTimeTimeZoneable) + GetType()(*EventType) + SetEndDateTime(value DateTimeTimeZoneable)() + SetEvent(value Eventable)() + SetIsAllDay(value *bool)() + SetIsDelegated(value *bool)() + SetIsOutOfDate(value *bool)() + SetLocation(value Locationable)() + SetMeetingMessageType(value *MeetingMessageType)() + SetRecurrence(value PatternedRecurrenceable)() + SetStartDateTime(value DateTimeTimeZoneable)() + SetType(value *EventType)() +} diff --git a/src/internal/connector/graph/betasdk/models/event_type.go b/src/internal/connector/graph/betasdk/models/event_type.go new file mode 100644 index 000000000..bb2b3a7ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/event_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EventType int + +const ( + SINGLEINSTANCE_EVENTTYPE EventType = iota + OCCURRENCE_EVENTTYPE + EXCEPTION_EVENTTYPE + SERIESMASTER_EVENTTYPE +) + +func (i EventType) String() string { + return []string{"singleInstance", "occurrence", "exception", "seriesMaster"}[i] +} +func ParseEventType(v string) (interface{}, error) { + result := SINGLEINSTANCE_EVENTTYPE + switch v { + case "singleInstance": + result = SINGLEINSTANCE_EVENTTYPE + case "occurrence": + result = OCCURRENCE_EVENTTYPE + case "exception": + result = EXCEPTION_EVENTTYPE + case "seriesMaster": + result = SERIESMASTER_EVENTTYPE + default: + return 0, errors.New("Unknown EventType value: " + v) + } + return &result, nil +} +func SerializeEventType(values []EventType) []string { + 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/eventable.go b/src/internal/connector/graph/betasdk/models/eventable.go new file mode 100644 index 000000000..6bcb96dc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/eventable.go @@ -0,0 +1,102 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Eventable +type Eventable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowNewTimeProposals()(*bool) + GetAttachments()([]Attachmentable) + GetAttendees()([]Attendeeable) + GetBody()(ItemBodyable) + GetBodyPreview()(*string) + GetCalendar()(Calendarable) + GetCancelledOccurrences()([]string) + GetEnd()(DateTimeTimeZoneable) + GetExceptionOccurrences()([]Eventable) + GetExtensions()([]Extensionable) + GetHasAttachments()(*bool) + GetHideAttendees()(*bool) + GetImportance()(*Importance) + GetInstances()([]Eventable) + GetIsAllDay()(*bool) + GetIsCancelled()(*bool) + GetIsDraft()(*bool) + GetIsOnlineMeeting()(*bool) + GetIsOrganizer()(*bool) + GetIsReminderOn()(*bool) + GetLocation()(Locationable) + GetLocations()([]Locationable) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetOccurrenceId()(*string) + GetOnlineMeeting()(OnlineMeetingInfoable) + GetOnlineMeetingProvider()(*OnlineMeetingProviderType) + GetOnlineMeetingUrl()(*string) + GetOrganizer()(Recipientable) + GetOriginalEndTimeZone()(*string) + GetOriginalStart()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOriginalStartTimeZone()(*string) + GetRecurrence()(PatternedRecurrenceable) + GetReminderMinutesBeforeStart()(*int32) + GetResponseRequested()(*bool) + GetResponseStatus()(ResponseStatusable) + GetSensitivity()(*Sensitivity) + GetSeriesMasterId()(*string) + GetShowAs()(*FreeBusyStatus) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetStart()(DateTimeTimeZoneable) + GetSubject()(*string) + GetTransactionId()(*string) + GetType()(*EventType) + GetUid()(*string) + GetWebLink()(*string) + SetAllowNewTimeProposals(value *bool)() + SetAttachments(value []Attachmentable)() + SetAttendees(value []Attendeeable)() + SetBody(value ItemBodyable)() + SetBodyPreview(value *string)() + SetCalendar(value Calendarable)() + SetCancelledOccurrences(value []string)() + SetEnd(value DateTimeTimeZoneable)() + SetExceptionOccurrences(value []Eventable)() + SetExtensions(value []Extensionable)() + SetHasAttachments(value *bool)() + SetHideAttendees(value *bool)() + SetImportance(value *Importance)() + SetInstances(value []Eventable)() + SetIsAllDay(value *bool)() + SetIsCancelled(value *bool)() + SetIsDraft(value *bool)() + SetIsOnlineMeeting(value *bool)() + SetIsOrganizer(value *bool)() + SetIsReminderOn(value *bool)() + SetLocation(value Locationable)() + SetLocations(value []Locationable)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetOccurrenceId(value *string)() + SetOnlineMeeting(value OnlineMeetingInfoable)() + SetOnlineMeetingProvider(value *OnlineMeetingProviderType)() + SetOnlineMeetingUrl(value *string)() + SetOrganizer(value Recipientable)() + SetOriginalEndTimeZone(value *string)() + SetOriginalStart(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOriginalStartTimeZone(value *string)() + SetRecurrence(value PatternedRecurrenceable)() + SetReminderMinutesBeforeStart(value *int32)() + SetResponseRequested(value *bool)() + SetResponseStatus(value ResponseStatusable)() + SetSensitivity(value *Sensitivity)() + SetSeriesMasterId(value *string)() + SetShowAs(value *FreeBusyStatus)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetStart(value DateTimeTimeZoneable)() + SetSubject(value *string)() + SetTransactionId(value *string)() + SetType(value *EventType)() + SetUid(value *string)() + SetWebLink(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_data_match_store_column.go b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column.go new file mode 100644 index 000000000..1c2f9f083 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column.go @@ -0,0 +1,179 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactDataMatchStoreColumn +type ExactDataMatchStoreColumn 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 ignoredDelimiters property + ignoredDelimiters []string + // The isCaseInsensitive property + isCaseInsensitive *bool + // The isSearchable property + isSearchable *bool + // The name property + name *string + // The OdataType property + odataType *string +} +// NewExactDataMatchStoreColumn instantiates a new exactDataMatchStoreColumn and sets the default values. +func NewExactDataMatchStoreColumn()(*ExactDataMatchStoreColumn) { + m := &ExactDataMatchStoreColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExactDataMatchStoreColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactDataMatchStoreColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactDataMatchStoreColumn(), 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 *ExactDataMatchStoreColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactDataMatchStoreColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ignoredDelimiters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIgnoredDelimiters(res) + } + return nil + } + res["isCaseInsensitive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCaseInsensitive(val) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetIgnoredDelimiters gets the ignoredDelimiters property value. The ignoredDelimiters property +func (m *ExactDataMatchStoreColumn) GetIgnoredDelimiters()([]string) { + return m.ignoredDelimiters +} +// GetIsCaseInsensitive gets the isCaseInsensitive property value. The isCaseInsensitive property +func (m *ExactDataMatchStoreColumn) GetIsCaseInsensitive()(*bool) { + return m.isCaseInsensitive +} +// GetIsSearchable gets the isSearchable property value. The isSearchable property +func (m *ExactDataMatchStoreColumn) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetName gets the name property value. The name property +func (m *ExactDataMatchStoreColumn) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExactDataMatchStoreColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ExactDataMatchStoreColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetIgnoredDelimiters() != nil { + err := writer.WriteCollectionOfStringValues("ignoredDelimiters", m.GetIgnoredDelimiters()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isCaseInsensitive", m.GetIsCaseInsensitive()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ExactDataMatchStoreColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIgnoredDelimiters sets the ignoredDelimiters property value. The ignoredDelimiters property +func (m *ExactDataMatchStoreColumn) SetIgnoredDelimiters(value []string)() { + m.ignoredDelimiters = value +} +// SetIsCaseInsensitive sets the isCaseInsensitive property value. The isCaseInsensitive property +func (m *ExactDataMatchStoreColumn) SetIsCaseInsensitive(value *bool)() { + m.isCaseInsensitive = value +} +// SetIsSearchable sets the isSearchable property value. The isSearchable property +func (m *ExactDataMatchStoreColumn) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetName sets the name property value. The name property +func (m *ExactDataMatchStoreColumn) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExactDataMatchStoreColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_response.go b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_response.go new file mode 100644 index 000000000..b37bef272 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactDataMatchStoreColumnCollectionResponse +type ExactDataMatchStoreColumnCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExactDataMatchStoreColumnable +} +// NewExactDataMatchStoreColumnCollectionResponse instantiates a new ExactDataMatchStoreColumnCollectionResponse and sets the default values. +func NewExactDataMatchStoreColumnCollectionResponse()(*ExactDataMatchStoreColumnCollectionResponse) { + m := &ExactDataMatchStoreColumnCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExactDataMatchStoreColumnCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactDataMatchStoreColumnCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactDataMatchStoreColumnCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactDataMatchStoreColumnCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactDataMatchStoreColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactDataMatchStoreColumnable, len(val)) + for i, v := range val { + res[i] = v.(ExactDataMatchStoreColumnable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExactDataMatchStoreColumnCollectionResponse) GetValue()([]ExactDataMatchStoreColumnable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExactDataMatchStoreColumnCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExactDataMatchStoreColumnCollectionResponse) SetValue(value []ExactDataMatchStoreColumnable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_responseable.go new file mode 100644 index 000000000..4291053c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_data_match_store_column_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactDataMatchStoreColumnCollectionResponseable +type ExactDataMatchStoreColumnCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExactDataMatchStoreColumnable) + SetValue(value []ExactDataMatchStoreColumnable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_data_match_store_columnable.go b/src/internal/connector/graph/betasdk/models/exact_data_match_store_columnable.go new file mode 100644 index 000000000..bd1d49245 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_data_match_store_columnable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactDataMatchStoreColumnable +type ExactDataMatchStoreColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIgnoredDelimiters()([]string) + GetIsCaseInsensitive()(*bool) + GetIsSearchable()(*bool) + GetName()(*string) + GetOdataType()(*string) + SetIgnoredDelimiters(value []string)() + SetIsCaseInsensitive(value *bool)() + SetIsSearchable(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_store.go b/src/internal/connector/graph/betasdk/models/exact_match_data_store.go new file mode 100644 index 000000000..8e00560c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_store.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStore +type ExactMatchDataStore struct { + ExactMatchDataStoreBase + // The sessions property + sessions []ExactMatchSessionable +} +// NewExactMatchDataStore instantiates a new ExactMatchDataStore and sets the default values. +func NewExactMatchDataStore()(*ExactMatchDataStore) { + m := &ExactMatchDataStore{ + ExactMatchDataStoreBase: *NewExactMatchDataStoreBase(), + } + return m +} +// CreateExactMatchDataStoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchDataStoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchDataStore(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchDataStore) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ExactMatchDataStoreBase.GetFieldDeserializers() + res["sessions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchSessionable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchSessionable) + } + m.SetSessions(res) + } + return nil + } + return res +} +// GetSessions gets the sessions property value. The sessions property +func (m *ExactMatchDataStore) GetSessions()([]ExactMatchSessionable) { + return m.sessions +} +// Serialize serializes information the current object +func (m *ExactMatchDataStore) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ExactMatchDataStoreBase.Serialize(writer) + if err != nil { + return err + } + if m.GetSessions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSessions())) + for i, v := range m.GetSessions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sessions", cast) + if err != nil { + return err + } + } + return nil +} +// SetSessions sets the sessions property value. The sessions property +func (m *ExactMatchDataStore) SetSessions(value []ExactMatchSessionable)() { + m.sessions = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_store_base.go b/src/internal/connector/graph/betasdk/models/exact_match_data_store_base.go new file mode 100644 index 000000000..fac57b96c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_store_base.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStoreBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExactMatchDataStoreBase struct { + Entity + // The columns property + columns []ExactDataMatchStoreColumnable + // The dataLastUpdatedDateTime property + dataLastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string +} +// NewExactMatchDataStoreBase instantiates a new exactMatchDataStoreBase and sets the default values. +func NewExactMatchDataStoreBase()(*ExactMatchDataStoreBase) { + m := &ExactMatchDataStoreBase{ + Entity: *NewEntity(), + } + return m +} +// CreateExactMatchDataStoreBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchDataStoreBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.exactMatchDataStore": + return NewExactMatchDataStore(), nil + } + } + } + } + return NewExactMatchDataStoreBase(), nil +} +// GetColumns gets the columns property value. The columns property +func (m *ExactMatchDataStoreBase) GetColumns()([]ExactDataMatchStoreColumnable) { + return m.columns +} +// GetDataLastUpdatedDateTime gets the dataLastUpdatedDateTime property value. The dataLastUpdatedDateTime property +func (m *ExactMatchDataStoreBase) GetDataLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dataLastUpdatedDateTime +} +// GetDescription gets the description property value. The description property +func (m *ExactMatchDataStoreBase) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ExactMatchDataStoreBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchDataStoreBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["columns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactDataMatchStoreColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactDataMatchStoreColumnable, len(val)) + for i, v := range val { + res[i] = v.(ExactDataMatchStoreColumnable) + } + m.SetColumns(res) + } + return nil + } + res["dataLastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDataLastUpdatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExactMatchDataStoreBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumns())) + for i, v := range m.GetColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columns", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dataLastUpdatedDateTime", m.GetDataLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetColumns sets the columns property value. The columns property +func (m *ExactMatchDataStoreBase) SetColumns(value []ExactDataMatchStoreColumnable)() { + m.columns = value +} +// SetDataLastUpdatedDateTime sets the dataLastUpdatedDateTime property value. The dataLastUpdatedDateTime property +func (m *ExactMatchDataStoreBase) SetDataLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dataLastUpdatedDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *ExactMatchDataStoreBase) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ExactMatchDataStoreBase) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_store_baseable.go b/src/internal/connector/graph/betasdk/models/exact_match_data_store_baseable.go new file mode 100644 index 000000000..8f227d80c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_store_baseable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStoreBaseable +type ExactMatchDataStoreBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumns()([]ExactDataMatchStoreColumnable) + GetDataLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + SetColumns(value []ExactDataMatchStoreColumnable)() + SetDataLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_response.go b/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_response.go new file mode 100644 index 000000000..5df74672d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStoreCollectionResponse +type ExactMatchDataStoreCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExactMatchDataStoreable +} +// NewExactMatchDataStoreCollectionResponse instantiates a new ExactMatchDataStoreCollectionResponse and sets the default values. +func NewExactMatchDataStoreCollectionResponse()(*ExactMatchDataStoreCollectionResponse) { + m := &ExactMatchDataStoreCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExactMatchDataStoreCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchDataStoreCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchDataStoreCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchDataStoreCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchDataStoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchDataStoreable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchDataStoreable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExactMatchDataStoreCollectionResponse) GetValue()([]ExactMatchDataStoreable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExactMatchDataStoreCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExactMatchDataStoreCollectionResponse) SetValue(value []ExactMatchDataStoreable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_responseable.go new file mode 100644 index 000000000..2cbde942e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_store_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStoreCollectionResponseable +type ExactMatchDataStoreCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExactMatchDataStoreable) + SetValue(value []ExactMatchDataStoreable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_data_storeable.go b/src/internal/connector/graph/betasdk/models/exact_match_data_storeable.go new file mode 100644 index 000000000..67792268b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_data_storeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDataStoreable +type ExactMatchDataStoreable interface { + ExactMatchDataStoreBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSessions()([]ExactMatchSessionable) + SetSessions(value []ExactMatchSessionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content.go b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content.go new file mode 100644 index 000000000..0b9d090e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDetectedSensitiveContent +type ExactMatchDetectedSensitiveContent struct { + DetectedSensitiveContentBase + // The matches property + matches []SensitiveContentLocationable +} +// NewExactMatchDetectedSensitiveContent instantiates a new ExactMatchDetectedSensitiveContent and sets the default values. +func NewExactMatchDetectedSensitiveContent()(*ExactMatchDetectedSensitiveContent) { + m := &ExactMatchDetectedSensitiveContent{ + DetectedSensitiveContentBase: *NewDetectedSensitiveContentBase(), + } + return m +} +// CreateExactMatchDetectedSensitiveContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchDetectedSensitiveContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchDetectedSensitiveContent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchDetectedSensitiveContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DetectedSensitiveContentBase.GetFieldDeserializers() + res["matches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveContentLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveContentLocationable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveContentLocationable) + } + m.SetMatches(res) + } + return nil + } + return res +} +// GetMatches gets the matches property value. The matches property +func (m *ExactMatchDetectedSensitiveContent) GetMatches()([]SensitiveContentLocationable) { + return m.matches +} +// Serialize serializes information the current object +func (m *ExactMatchDetectedSensitiveContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DetectedSensitiveContentBase.Serialize(writer) + if err != nil { + return err + } + if m.GetMatches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatches())) + for i, v := range m.GetMatches() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("matches", cast) + if err != nil { + return err + } + } + return nil +} +// SetMatches sets the matches property value. The matches property +func (m *ExactMatchDetectedSensitiveContent) SetMatches(value []SensitiveContentLocationable)() { + m.matches = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_response.go b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_response.go new file mode 100644 index 000000000..f58885d5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDetectedSensitiveContentCollectionResponse +type ExactMatchDetectedSensitiveContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExactMatchDetectedSensitiveContentable +} +// NewExactMatchDetectedSensitiveContentCollectionResponse instantiates a new ExactMatchDetectedSensitiveContentCollectionResponse and sets the default values. +func NewExactMatchDetectedSensitiveContentCollectionResponse()(*ExactMatchDetectedSensitiveContentCollectionResponse) { + m := &ExactMatchDetectedSensitiveContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExactMatchDetectedSensitiveContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchDetectedSensitiveContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchDetectedSensitiveContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchDetectedSensitiveContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchDetectedSensitiveContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchDetectedSensitiveContentable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchDetectedSensitiveContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExactMatchDetectedSensitiveContentCollectionResponse) GetValue()([]ExactMatchDetectedSensitiveContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExactMatchDetectedSensitiveContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExactMatchDetectedSensitiveContentCollectionResponse) SetValue(value []ExactMatchDetectedSensitiveContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_responseable.go new file mode 100644 index 000000000..4464936cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDetectedSensitiveContentCollectionResponseable +type ExactMatchDetectedSensitiveContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExactMatchDetectedSensitiveContentable) + SetValue(value []ExactMatchDetectedSensitiveContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_contentable.go b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_contentable.go new file mode 100644 index 000000000..59ea855af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_detected_sensitive_contentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchDetectedSensitiveContentable +type ExactMatchDetectedSensitiveContentable interface { + DetectedSensitiveContentBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMatches()([]SensitiveContentLocationable) + SetMatches(value []SensitiveContentLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_job_base.go b/src/internal/connector/graph/betasdk/models/exact_match_job_base.go new file mode 100644 index 000000000..55c1ee406 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_job_base.go @@ -0,0 +1,187 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchJobBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExactMatchJobBase struct { + Entity + // The completionDateTime property + completionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The creationDateTime property + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The error property + error ClassificationErrorable + // The lastUpdatedDateTime property + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The startDateTime property + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewExactMatchJobBase instantiates a new exactMatchJobBase and sets the default values. +func NewExactMatchJobBase()(*ExactMatchJobBase) { + m := &ExactMatchJobBase{ + Entity: *NewEntity(), + } + return m +} +// CreateExactMatchJobBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchJobBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.exactMatchLookupJob": + return NewExactMatchLookupJob(), nil + case "#microsoft.graph.exactMatchSession": + return NewExactMatchSession(), nil + case "#microsoft.graph.exactMatchSessionBase": + return NewExactMatchSessionBase(), nil + } + } + } + } + return NewExactMatchJobBase(), nil +} +// GetCompletionDateTime gets the completionDateTime property value. The completionDateTime property +func (m *ExactMatchJobBase) GetCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completionDateTime +} +// GetCreationDateTime gets the creationDateTime property value. The creationDateTime property +func (m *ExactMatchJobBase) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetError gets the error property value. The error property +func (m *ExactMatchJobBase) GetError()(ClassificationErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchJobBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletionDateTime(val) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClassificationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ClassificationErrorable)) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *ExactMatchJobBase) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *ExactMatchJobBase) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *ExactMatchJobBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completionDateTime", m.GetCompletionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCompletionDateTime sets the completionDateTime property value. The completionDateTime property +func (m *ExactMatchJobBase) SetCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completionDateTime = value +} +// SetCreationDateTime sets the creationDateTime property value. The creationDateTime property +func (m *ExactMatchJobBase) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetError sets the error property value. The error property +func (m *ExactMatchJobBase) SetError(value ClassificationErrorable)() { + m.error = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The lastUpdatedDateTime property +func (m *ExactMatchJobBase) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *ExactMatchJobBase) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_job_baseable.go b/src/internal/connector/graph/betasdk/models/exact_match_job_baseable.go new file mode 100644 index 000000000..bb48a1268 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_job_baseable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchJobBaseable +type ExactMatchJobBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetError()(ClassificationErrorable) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetError(value ClassificationErrorable)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_lookup_job.go b/src/internal/connector/graph/betasdk/models/exact_match_lookup_job.go new file mode 100644 index 000000000..769831d51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_lookup_job.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchLookupJob +type ExactMatchLookupJob struct { + ExactMatchJobBase + // The matchingRows property + matchingRows []LookupResultRowable + // The state property + state *string +} +// NewExactMatchLookupJob instantiates a new ExactMatchLookupJob and sets the default values. +func NewExactMatchLookupJob()(*ExactMatchLookupJob) { + m := &ExactMatchLookupJob{ + ExactMatchJobBase: *NewExactMatchJobBase(), + } + odataTypeValue := "#microsoft.graph.exactMatchLookupJob"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExactMatchLookupJobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchLookupJobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchLookupJob(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchLookupJob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ExactMatchJobBase.GetFieldDeserializers() + res["matchingRows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLookupResultRowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LookupResultRowable, len(val)) + for i, v := range val { + res[i] = v.(LookupResultRowable) + } + m.SetMatchingRows(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetMatchingRows gets the matchingRows property value. The matchingRows property +func (m *ExactMatchLookupJob) GetMatchingRows()([]LookupResultRowable) { + return m.matchingRows +} +// GetState gets the state property value. The state property +func (m *ExactMatchLookupJob) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *ExactMatchLookupJob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ExactMatchJobBase.Serialize(writer) + if err != nil { + return err + } + if m.GetMatchingRows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMatchingRows())) + for i, v := range m.GetMatchingRows() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("matchingRows", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + return nil +} +// SetMatchingRows sets the matchingRows property value. The matchingRows property +func (m *ExactMatchLookupJob) SetMatchingRows(value []LookupResultRowable)() { + m.matchingRows = value +} +// SetState sets the state property value. The state property +func (m *ExactMatchLookupJob) SetState(value *string)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_lookup_jobable.go b/src/internal/connector/graph/betasdk/models/exact_match_lookup_jobable.go new file mode 100644 index 000000000..7e9461fd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_lookup_jobable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchLookupJobable +type ExactMatchLookupJobable interface { + ExactMatchJobBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMatchingRows()([]LookupResultRowable) + GetState()(*string) + SetMatchingRows(value []LookupResultRowable)() + SetState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_session.go b/src/internal/connector/graph/betasdk/models/exact_match_session.go new file mode 100644 index 000000000..f8e1d9bd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_session.go @@ -0,0 +1,246 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSession +type ExactMatchSession struct { + ExactMatchSessionBase + // The checksum property + checksum *string + // The dataUploadURI property + dataUploadURI *string + // The fields property + fields []string + // The fileName property + fileName *string + // The rowsPerBlock property + rowsPerBlock *int32 + // The salt property + salt *string + // The uploadAgent property + uploadAgent ExactMatchUploadAgentable + // The uploadAgentId property + uploadAgentId *string +} +// NewExactMatchSession instantiates a new ExactMatchSession and sets the default values. +func NewExactMatchSession()(*ExactMatchSession) { + m := &ExactMatchSession{ + ExactMatchSessionBase: *NewExactMatchSessionBase(), + } + return m +} +// CreateExactMatchSessionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchSessionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchSession(), nil +} +// GetChecksum gets the checksum property value. The checksum property +func (m *ExactMatchSession) GetChecksum()(*string) { + return m.checksum +} +// GetDataUploadURI gets the dataUploadURI property value. The dataUploadURI property +func (m *ExactMatchSession) GetDataUploadURI()(*string) { + return m.dataUploadURI +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchSession) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ExactMatchSessionBase.GetFieldDeserializers() + res["checksum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChecksum(val) + } + return nil + } + res["dataUploadURI"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataUploadURI(val) + } + return nil + } + res["fields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetFields(res) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["rowsPerBlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRowsPerBlock(val) + } + return nil + } + res["salt"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSalt(val) + } + return nil + } + res["uploadAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExactMatchUploadAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUploadAgent(val.(ExactMatchUploadAgentable)) + } + return nil + } + res["uploadAgentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadAgentId(val) + } + return nil + } + return res +} +// GetFields gets the fields property value. The fields property +func (m *ExactMatchSession) GetFields()([]string) { + return m.fields +} +// GetFileName gets the fileName property value. The fileName property +func (m *ExactMatchSession) GetFileName()(*string) { + return m.fileName +} +// GetRowsPerBlock gets the rowsPerBlock property value. The rowsPerBlock property +func (m *ExactMatchSession) GetRowsPerBlock()(*int32) { + return m.rowsPerBlock +} +// GetSalt gets the salt property value. The salt property +func (m *ExactMatchSession) GetSalt()(*string) { + return m.salt +} +// GetUploadAgent gets the uploadAgent property value. The uploadAgent property +func (m *ExactMatchSession) GetUploadAgent()(ExactMatchUploadAgentable) { + return m.uploadAgent +} +// GetUploadAgentId gets the uploadAgentId property value. The uploadAgentId property +func (m *ExactMatchSession) GetUploadAgentId()(*string) { + return m.uploadAgentId +} +// Serialize serializes information the current object +func (m *ExactMatchSession) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ExactMatchSessionBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("checksum", m.GetChecksum()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("dataUploadURI", m.GetDataUploadURI()) + if err != nil { + return err + } + } + if m.GetFields() != nil { + err = writer.WriteCollectionOfStringValues("fields", m.GetFields()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("rowsPerBlock", m.GetRowsPerBlock()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("salt", m.GetSalt()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("uploadAgent", m.GetUploadAgent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uploadAgentId", m.GetUploadAgentId()) + if err != nil { + return err + } + } + return nil +} +// SetChecksum sets the checksum property value. The checksum property +func (m *ExactMatchSession) SetChecksum(value *string)() { + m.checksum = value +} +// SetDataUploadURI sets the dataUploadURI property value. The dataUploadURI property +func (m *ExactMatchSession) SetDataUploadURI(value *string)() { + m.dataUploadURI = value +} +// SetFields sets the fields property value. The fields property +func (m *ExactMatchSession) SetFields(value []string)() { + m.fields = value +} +// SetFileName sets the fileName property value. The fileName property +func (m *ExactMatchSession) SetFileName(value *string)() { + m.fileName = value +} +// SetRowsPerBlock sets the rowsPerBlock property value. The rowsPerBlock property +func (m *ExactMatchSession) SetRowsPerBlock(value *int32)() { + m.rowsPerBlock = value +} +// SetSalt sets the salt property value. The salt property +func (m *ExactMatchSession) SetSalt(value *string)() { + m.salt = value +} +// SetUploadAgent sets the uploadAgent property value. The uploadAgent property +func (m *ExactMatchSession) SetUploadAgent(value ExactMatchUploadAgentable)() { + m.uploadAgent = value +} +// SetUploadAgentId sets the uploadAgentId property value. The uploadAgentId property +func (m *ExactMatchSession) SetUploadAgentId(value *string)() { + m.uploadAgentId = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_session_base.go b/src/internal/connector/graph/betasdk/models/exact_match_session_base.go new file mode 100644 index 000000000..ebadfbb33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_session_base.go @@ -0,0 +1,263 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSessionBase +type ExactMatchSessionBase struct { + ExactMatchJobBase + // The dataStoreId property + dataStoreId *string + // The processingCompletionDateTime property + processingCompletionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The remainingBlockCount property + remainingBlockCount *int32 + // The remainingJobCount property + remainingJobCount *int32 + // The state property + state *string + // The totalBlockCount property + totalBlockCount *int32 + // The totalJobCount property + totalJobCount *int32 + // The uploadCompletionDateTime property + uploadCompletionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewExactMatchSessionBase instantiates a new ExactMatchSessionBase and sets the default values. +func NewExactMatchSessionBase()(*ExactMatchSessionBase) { + m := &ExactMatchSessionBase{ + ExactMatchJobBase: *NewExactMatchJobBase(), + } + odataTypeValue := "#microsoft.graph.exactMatchSessionBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExactMatchSessionBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchSessionBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.exactMatchSession": + return NewExactMatchSession(), nil + } + } + } + } + return NewExactMatchSessionBase(), nil +} +// GetDataStoreId gets the dataStoreId property value. The dataStoreId property +func (m *ExactMatchSessionBase) GetDataStoreId()(*string) { + return m.dataStoreId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchSessionBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ExactMatchJobBase.GetFieldDeserializers() + res["dataStoreId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataStoreId(val) + } + return nil + } + res["processingCompletionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessingCompletionDateTime(val) + } + return nil + } + res["remainingBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemainingBlockCount(val) + } + return nil + } + res["remainingJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemainingJobCount(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["totalBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalBlockCount(val) + } + return nil + } + res["totalJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalJobCount(val) + } + return nil + } + res["uploadCompletionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadCompletionDateTime(val) + } + return nil + } + return res +} +// GetProcessingCompletionDateTime gets the processingCompletionDateTime property value. The processingCompletionDateTime property +func (m *ExactMatchSessionBase) GetProcessingCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.processingCompletionDateTime +} +// GetRemainingBlockCount gets the remainingBlockCount property value. The remainingBlockCount property +func (m *ExactMatchSessionBase) GetRemainingBlockCount()(*int32) { + return m.remainingBlockCount +} +// GetRemainingJobCount gets the remainingJobCount property value. The remainingJobCount property +func (m *ExactMatchSessionBase) GetRemainingJobCount()(*int32) { + return m.remainingJobCount +} +// GetState gets the state property value. The state property +func (m *ExactMatchSessionBase) GetState()(*string) { + return m.state +} +// GetTotalBlockCount gets the totalBlockCount property value. The totalBlockCount property +func (m *ExactMatchSessionBase) GetTotalBlockCount()(*int32) { + return m.totalBlockCount +} +// GetTotalJobCount gets the totalJobCount property value. The totalJobCount property +func (m *ExactMatchSessionBase) GetTotalJobCount()(*int32) { + return m.totalJobCount +} +// GetUploadCompletionDateTime gets the uploadCompletionDateTime property value. The uploadCompletionDateTime property +func (m *ExactMatchSessionBase) GetUploadCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.uploadCompletionDateTime +} +// Serialize serializes information the current object +func (m *ExactMatchSessionBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ExactMatchJobBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("dataStoreId", m.GetDataStoreId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("processingCompletionDateTime", m.GetProcessingCompletionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remainingBlockCount", m.GetRemainingBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remainingJobCount", m.GetRemainingJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalBlockCount", m.GetTotalBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalJobCount", m.GetTotalJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("uploadCompletionDateTime", m.GetUploadCompletionDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDataStoreId sets the dataStoreId property value. The dataStoreId property +func (m *ExactMatchSessionBase) SetDataStoreId(value *string)() { + m.dataStoreId = value +} +// SetProcessingCompletionDateTime sets the processingCompletionDateTime property value. The processingCompletionDateTime property +func (m *ExactMatchSessionBase) SetProcessingCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.processingCompletionDateTime = value +} +// SetRemainingBlockCount sets the remainingBlockCount property value. The remainingBlockCount property +func (m *ExactMatchSessionBase) SetRemainingBlockCount(value *int32)() { + m.remainingBlockCount = value +} +// SetRemainingJobCount sets the remainingJobCount property value. The remainingJobCount property +func (m *ExactMatchSessionBase) SetRemainingJobCount(value *int32)() { + m.remainingJobCount = value +} +// SetState sets the state property value. The state property +func (m *ExactMatchSessionBase) SetState(value *string)() { + m.state = value +} +// SetTotalBlockCount sets the totalBlockCount property value. The totalBlockCount property +func (m *ExactMatchSessionBase) SetTotalBlockCount(value *int32)() { + m.totalBlockCount = value +} +// SetTotalJobCount sets the totalJobCount property value. The totalJobCount property +func (m *ExactMatchSessionBase) SetTotalJobCount(value *int32)() { + m.totalJobCount = value +} +// SetUploadCompletionDateTime sets the uploadCompletionDateTime property value. The uploadCompletionDateTime property +func (m *ExactMatchSessionBase) SetUploadCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.uploadCompletionDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_session_baseable.go b/src/internal/connector/graph/betasdk/models/exact_match_session_baseable.go new file mode 100644 index 000000000..576df6f1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_session_baseable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSessionBaseable +type ExactMatchSessionBaseable interface { + ExactMatchJobBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataStoreId()(*string) + GetProcessingCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRemainingBlockCount()(*int32) + GetRemainingJobCount()(*int32) + GetState()(*string) + GetTotalBlockCount()(*int32) + GetTotalJobCount()(*int32) + GetUploadCompletionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDataStoreId(value *string)() + SetProcessingCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRemainingBlockCount(value *int32)() + SetRemainingJobCount(value *int32)() + SetState(value *string)() + SetTotalBlockCount(value *int32)() + SetTotalJobCount(value *int32)() + SetUploadCompletionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_session_collection_response.go b/src/internal/connector/graph/betasdk/models/exact_match_session_collection_response.go new file mode 100644 index 000000000..ce5abfedd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_session_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSessionCollectionResponse +type ExactMatchSessionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExactMatchSessionable +} +// NewExactMatchSessionCollectionResponse instantiates a new ExactMatchSessionCollectionResponse and sets the default values. +func NewExactMatchSessionCollectionResponse()(*ExactMatchSessionCollectionResponse) { + m := &ExactMatchSessionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExactMatchSessionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchSessionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchSessionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchSessionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchSessionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchSessionable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchSessionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExactMatchSessionCollectionResponse) GetValue()([]ExactMatchSessionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExactMatchSessionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExactMatchSessionCollectionResponse) SetValue(value []ExactMatchSessionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_session_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exact_match_session_collection_responseable.go new file mode 100644 index 000000000..7c12a095f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_session_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSessionCollectionResponseable +type ExactMatchSessionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExactMatchSessionable) + SetValue(value []ExactMatchSessionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_sessionable.go b/src/internal/connector/graph/betasdk/models/exact_match_sessionable.go new file mode 100644 index 000000000..4a2d2956e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_sessionable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchSessionable +type ExactMatchSessionable interface { + ExactMatchSessionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChecksum()(*string) + GetDataUploadURI()(*string) + GetFields()([]string) + GetFileName()(*string) + GetRowsPerBlock()(*int32) + GetSalt()(*string) + GetUploadAgent()(ExactMatchUploadAgentable) + GetUploadAgentId()(*string) + SetChecksum(value *string)() + SetDataUploadURI(value *string)() + SetFields(value []string)() + SetFileName(value *string)() + SetRowsPerBlock(value *int32)() + SetSalt(value *string)() + SetUploadAgent(value ExactMatchUploadAgentable)() + SetUploadAgentId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_upload_agent.go b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent.go new file mode 100644 index 000000000..a2eeb8715 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchUploadAgent +type ExactMatchUploadAgent struct { + Entity + // The creationDateTime property + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string +} +// NewExactMatchUploadAgent instantiates a new exactMatchUploadAgent and sets the default values. +func NewExactMatchUploadAgent()(*ExactMatchUploadAgent) { + m := &ExactMatchUploadAgent{ + Entity: *NewEntity(), + } + return m +} +// CreateExactMatchUploadAgentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchUploadAgentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchUploadAgent(), nil +} +// GetCreationDateTime gets the creationDateTime property value. The creationDateTime property +func (m *ExactMatchUploadAgent) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetDescription gets the description property value. The description property +func (m *ExactMatchUploadAgent) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchUploadAgent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExactMatchUploadAgent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + return nil +} +// SetCreationDateTime sets the creationDateTime property value. The creationDateTime property +func (m *ExactMatchUploadAgent) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *ExactMatchUploadAgent) SetDescription(value *string)() { + m.description = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_response.go b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_response.go new file mode 100644 index 000000000..d3bf7b10e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchUploadAgentCollectionResponse +type ExactMatchUploadAgentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExactMatchUploadAgentable +} +// NewExactMatchUploadAgentCollectionResponse instantiates a new ExactMatchUploadAgentCollectionResponse and sets the default values. +func NewExactMatchUploadAgentCollectionResponse()(*ExactMatchUploadAgentCollectionResponse) { + m := &ExactMatchUploadAgentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExactMatchUploadAgentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExactMatchUploadAgentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExactMatchUploadAgentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExactMatchUploadAgentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExactMatchUploadAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExactMatchUploadAgentable, len(val)) + for i, v := range val { + res[i] = v.(ExactMatchUploadAgentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExactMatchUploadAgentCollectionResponse) GetValue()([]ExactMatchUploadAgentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExactMatchUploadAgentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExactMatchUploadAgentCollectionResponse) SetValue(value []ExactMatchUploadAgentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_responseable.go new file mode 100644 index 000000000..bfa09a851 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_upload_agent_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchUploadAgentCollectionResponseable +type ExactMatchUploadAgentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExactMatchUploadAgentable) + SetValue(value []ExactMatchUploadAgentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exact_match_upload_agentable.go b/src/internal/connector/graph/betasdk/models/exact_match_upload_agentable.go new file mode 100644 index 000000000..0deda52a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exact_match_upload_agentable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExactMatchUploadAgentable +type ExactMatchUploadAgentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/exclude_target.go b/src/internal/connector/graph/betasdk/models/exclude_target.go new file mode 100644 index 000000000..5f6956e53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclude_target.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludeTarget +type ExcludeTarget 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 object identifier of an Azure AD group. + id *string + // The OdataType property + odataType *string + // The targetType property + targetType *AuthenticationMethodTargetType +} +// NewExcludeTarget instantiates a new excludeTarget and sets the default values. +func NewExcludeTarget()(*ExcludeTarget) { + m := &ExcludeTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExcludeTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExcludeTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExcludeTarget(), 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 *ExcludeTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExcludeTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodTargetType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*AuthenticationMethodTargetType)) + } + return nil + } + return res +} +// GetId gets the id property value. The object identifier of an Azure AD group. +func (m *ExcludeTarget) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExcludeTarget) GetOdataType()(*string) { + return m.odataType +} +// GetTargetType gets the targetType property value. The targetType property +func (m *ExcludeTarget) GetTargetType()(*AuthenticationMethodTargetType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *ExcludeTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err := writer.WriteStringValue("targetType", &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 *ExcludeTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The object identifier of an Azure AD group. +func (m *ExcludeTarget) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExcludeTarget) SetOdataType(value *string)() { + m.odataType = value +} +// SetTargetType sets the targetType property value. The targetType property +func (m *ExcludeTarget) SetTargetType(value *AuthenticationMethodTargetType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/exclude_target_collection_response.go b/src/internal/connector/graph/betasdk/models/exclude_target_collection_response.go new file mode 100644 index 000000000..fc8150c59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclude_target_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludeTargetCollectionResponse +type ExcludeTargetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExcludeTargetable +} +// NewExcludeTargetCollectionResponse instantiates a new ExcludeTargetCollectionResponse and sets the default values. +func NewExcludeTargetCollectionResponse()(*ExcludeTargetCollectionResponse) { + m := &ExcludeTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExcludeTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExcludeTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExcludeTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExcludeTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExcludeTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExcludeTargetable, len(val)) + for i, v := range val { + res[i] = v.(ExcludeTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExcludeTargetCollectionResponse) GetValue()([]ExcludeTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExcludeTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExcludeTargetCollectionResponse) SetValue(value []ExcludeTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/exclude_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/exclude_target_collection_responseable.go new file mode 100644 index 000000000..986758ad1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclude_target_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludeTargetCollectionResponseable +type ExcludeTargetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExcludeTargetable) + SetValue(value []ExcludeTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/exclude_targetable.go b/src/internal/connector/graph/betasdk/models/exclude_targetable.go new file mode 100644 index 000000000..d584d77de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclude_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludeTargetable +type ExcludeTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetOdataType()(*string) + GetTargetType()(*AuthenticationMethodTargetType) + SetId(value *string)() + SetOdataType(value *string)() + SetTargetType(value *AuthenticationMethodTargetType)() +} diff --git a/src/internal/connector/graph/betasdk/models/excluded_apps.go b/src/internal/connector/graph/betasdk/models/excluded_apps.go new file mode 100644 index 000000000..f06ec274d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/excluded_apps.go @@ -0,0 +1,461 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludedApps contains properties for Excluded Office365 Apps. +type ExcludedApps struct { + // The value for if MS Office Access should be excluded or not. + access *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The value for if Microsoft Search as default should be excluded or not. + bing *bool + // The value for if MS Office Excel should be excluded or not. + excel *bool + // The value for if MS Office OneDrive for Business - Groove should be excluded or not. + groove *bool + // The value for if MS Office InfoPath should be excluded or not. + infoPath *bool + // The value for if MS Office Skype for Business - Lync should be excluded or not. + lync *bool + // The OdataType property + odataType *string + // The value for if MS Office OneDrive should be excluded or not. + oneDrive *bool + // The value for if MS Office OneNote should be excluded or not. + oneNote *bool + // The value for if MS Office Outlook should be excluded or not. + outlook *bool + // The value for if MS Office PowerPoint should be excluded or not. + powerPoint *bool + // The value for if MS Office Publisher should be excluded or not. + publisher *bool + // The value for if MS Office SharePointDesigner should be excluded or not. + sharePointDesigner *bool + // The value for if MS Office Teams should be excluded or not. + teams *bool + // The value for if MS Office Visio should be excluded or not. + visio *bool + // The value for if MS Office Word should be excluded or not. + word *bool +} +// NewExcludedApps instantiates a new excludedApps and sets the default values. +func NewExcludedApps()(*ExcludedApps) { + m := &ExcludedApps{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExcludedAppsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExcludedAppsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExcludedApps(), nil +} +// GetAccess gets the access property value. The value for if MS Office Access should be excluded or not. +func (m *ExcludedApps) GetAccess()(*bool) { + return m.access +} +// 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 *ExcludedApps) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBing gets the bing property value. The value for if Microsoft Search as default should be excluded or not. +func (m *ExcludedApps) GetBing()(*bool) { + return m.bing +} +// GetExcel gets the excel property value. The value for if MS Office Excel should be excluded or not. +func (m *ExcludedApps) GetExcel()(*bool) { + return m.excel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExcludedApps) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccess(val) + } + return nil + } + res["bing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBing(val) + } + return nil + } + res["excel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExcel(val) + } + return nil + } + res["groove"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGroove(val) + } + return nil + } + res["infoPath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInfoPath(val) + } + return nil + } + res["lync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLync(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["oneDrive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOneDrive(val) + } + return nil + } + res["oneNote"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOneNote(val) + } + return nil + } + res["outlook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOutlook(val) + } + return nil + } + res["powerPoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPowerPoint(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["sharePointDesigner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSharePointDesigner(val) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTeams(val) + } + return nil + } + res["visio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVisio(val) + } + return nil + } + res["word"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWord(val) + } + return nil + } + return res +} +// GetGroove gets the groove property value. The value for if MS Office OneDrive for Business - Groove should be excluded or not. +func (m *ExcludedApps) GetGroove()(*bool) { + return m.groove +} +// GetInfoPath gets the infoPath property value. The value for if MS Office InfoPath should be excluded or not. +func (m *ExcludedApps) GetInfoPath()(*bool) { + return m.infoPath +} +// GetLync gets the lync property value. The value for if MS Office Skype for Business - Lync should be excluded or not. +func (m *ExcludedApps) GetLync()(*bool) { + return m.lync +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExcludedApps) GetOdataType()(*string) { + return m.odataType +} +// GetOneDrive gets the oneDrive property value. The value for if MS Office OneDrive should be excluded or not. +func (m *ExcludedApps) GetOneDrive()(*bool) { + return m.oneDrive +} +// GetOneNote gets the oneNote property value. The value for if MS Office OneNote should be excluded or not. +func (m *ExcludedApps) GetOneNote()(*bool) { + return m.oneNote +} +// GetOutlook gets the outlook property value. The value for if MS Office Outlook should be excluded or not. +func (m *ExcludedApps) GetOutlook()(*bool) { + return m.outlook +} +// GetPowerPoint gets the powerPoint property value. The value for if MS Office PowerPoint should be excluded or not. +func (m *ExcludedApps) GetPowerPoint()(*bool) { + return m.powerPoint +} +// GetPublisher gets the publisher property value. The value for if MS Office Publisher should be excluded or not. +func (m *ExcludedApps) GetPublisher()(*bool) { + return m.publisher +} +// GetSharePointDesigner gets the sharePointDesigner property value. The value for if MS Office SharePointDesigner should be excluded or not. +func (m *ExcludedApps) GetSharePointDesigner()(*bool) { + return m.sharePointDesigner +} +// GetTeams gets the teams property value. The value for if MS Office Teams should be excluded or not. +func (m *ExcludedApps) GetTeams()(*bool) { + return m.teams +} +// GetVisio gets the visio property value. The value for if MS Office Visio should be excluded or not. +func (m *ExcludedApps) GetVisio()(*bool) { + return m.visio +} +// GetWord gets the word property value. The value for if MS Office Word should be excluded or not. +func (m *ExcludedApps) GetWord()(*bool) { + return m.word +} +// Serialize serializes information the current object +func (m *ExcludedApps) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("access", m.GetAccess()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("bing", m.GetBing()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("excel", m.GetExcel()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("groove", m.GetGroove()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("infoPath", m.GetInfoPath()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("lync", m.GetLync()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("oneDrive", m.GetOneDrive()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("oneNote", m.GetOneNote()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("outlook", m.GetOutlook()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("powerPoint", m.GetPowerPoint()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sharePointDesigner", m.GetSharePointDesigner()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("teams", m.GetTeams()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("visio", m.GetVisio()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("word", m.GetWord()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccess sets the access property value. The value for if MS Office Access should be excluded or not. +func (m *ExcludedApps) SetAccess(value *bool)() { + m.access = value +} +// 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 *ExcludedApps) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBing sets the bing property value. The value for if Microsoft Search as default should be excluded or not. +func (m *ExcludedApps) SetBing(value *bool)() { + m.bing = value +} +// SetExcel sets the excel property value. The value for if MS Office Excel should be excluded or not. +func (m *ExcludedApps) SetExcel(value *bool)() { + m.excel = value +} +// SetGroove sets the groove property value. The value for if MS Office OneDrive for Business - Groove should be excluded or not. +func (m *ExcludedApps) SetGroove(value *bool)() { + m.groove = value +} +// SetInfoPath sets the infoPath property value. The value for if MS Office InfoPath should be excluded or not. +func (m *ExcludedApps) SetInfoPath(value *bool)() { + m.infoPath = value +} +// SetLync sets the lync property value. The value for if MS Office Skype for Business - Lync should be excluded or not. +func (m *ExcludedApps) SetLync(value *bool)() { + m.lync = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExcludedApps) SetOdataType(value *string)() { + m.odataType = value +} +// SetOneDrive sets the oneDrive property value. The value for if MS Office OneDrive should be excluded or not. +func (m *ExcludedApps) SetOneDrive(value *bool)() { + m.oneDrive = value +} +// SetOneNote sets the oneNote property value. The value for if MS Office OneNote should be excluded or not. +func (m *ExcludedApps) SetOneNote(value *bool)() { + m.oneNote = value +} +// SetOutlook sets the outlook property value. The value for if MS Office Outlook should be excluded or not. +func (m *ExcludedApps) SetOutlook(value *bool)() { + m.outlook = value +} +// SetPowerPoint sets the powerPoint property value. The value for if MS Office PowerPoint should be excluded or not. +func (m *ExcludedApps) SetPowerPoint(value *bool)() { + m.powerPoint = value +} +// SetPublisher sets the publisher property value. The value for if MS Office Publisher should be excluded or not. +func (m *ExcludedApps) SetPublisher(value *bool)() { + m.publisher = value +} +// SetSharePointDesigner sets the sharePointDesigner property value. The value for if MS Office SharePointDesigner should be excluded or not. +func (m *ExcludedApps) SetSharePointDesigner(value *bool)() { + m.sharePointDesigner = value +} +// SetTeams sets the teams property value. The value for if MS Office Teams should be excluded or not. +func (m *ExcludedApps) SetTeams(value *bool)() { + m.teams = value +} +// SetVisio sets the visio property value. The value for if MS Office Visio should be excluded or not. +func (m *ExcludedApps) SetVisio(value *bool)() { + m.visio = value +} +// SetWord sets the word property value. The value for if MS Office Word should be excluded or not. +func (m *ExcludedApps) SetWord(value *bool)() { + m.word = value +} diff --git a/src/internal/connector/graph/betasdk/models/excluded_appsable.go b/src/internal/connector/graph/betasdk/models/excluded_appsable.go new file mode 100644 index 000000000..097f713b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/excluded_appsable.go @@ -0,0 +1,43 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExcludedAppsable +type ExcludedAppsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccess()(*bool) + GetBing()(*bool) + GetExcel()(*bool) + GetGroove()(*bool) + GetInfoPath()(*bool) + GetLync()(*bool) + GetOdataType()(*string) + GetOneDrive()(*bool) + GetOneNote()(*bool) + GetOutlook()(*bool) + GetPowerPoint()(*bool) + GetPublisher()(*bool) + GetSharePointDesigner()(*bool) + GetTeams()(*bool) + GetVisio()(*bool) + GetWord()(*bool) + SetAccess(value *bool)() + SetBing(value *bool)() + SetExcel(value *bool)() + SetGroove(value *bool)() + SetInfoPath(value *bool)() + SetLync(value *bool)() + SetOdataType(value *string)() + SetOneDrive(value *bool)() + SetOneNote(value *bool)() + SetOutlook(value *bool)() + SetPowerPoint(value *bool)() + SetPublisher(value *bool)() + SetSharePointDesigner(value *bool)() + SetTeams(value *bool)() + SetVisio(value *bool)() + SetWord(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_target.go b/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_target.go new file mode 100644 index 000000000..5bb4d1b45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_target.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExclusionGroupAssignmentTarget +type ExclusionGroupAssignmentTarget struct { + GroupAssignmentTarget +} +// NewExclusionGroupAssignmentTarget instantiates a new ExclusionGroupAssignmentTarget and sets the default values. +func NewExclusionGroupAssignmentTarget()(*ExclusionGroupAssignmentTarget) { + m := &ExclusionGroupAssignmentTarget{ + GroupAssignmentTarget: *NewGroupAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.exclusionGroupAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExclusionGroupAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExclusionGroupAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExclusionGroupAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExclusionGroupAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupAssignmentTarget.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ExclusionGroupAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_targetable.go new file mode 100644 index 000000000..54db62c66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/exclusion_group_assignment_targetable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExclusionGroupAssignmentTargetable +type ExclusionGroupAssignmentTargetable interface { + GroupAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settings.go b/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settings.go new file mode 100644 index 000000000..7397106e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpeditedWindowsQualityUpdateSettings a complex type to store the expedited quality update settings such as release date and days until forced reboot. +type ExpeditedWindowsQualityUpdateSettings 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 number of days after installation that forced reboot will happen. + daysUntilForcedReboot *int32 + // The OdataType property + odataType *string + // The release date to identify a quality update. + qualityUpdateRelease *string +} +// NewExpeditedWindowsQualityUpdateSettings instantiates a new expeditedWindowsQualityUpdateSettings and sets the default values. +func NewExpeditedWindowsQualityUpdateSettings()(*ExpeditedWindowsQualityUpdateSettings) { + m := &ExpeditedWindowsQualityUpdateSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExpeditedWindowsQualityUpdateSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExpeditedWindowsQualityUpdateSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExpeditedWindowsQualityUpdateSettings(), 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 *ExpeditedWindowsQualityUpdateSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDaysUntilForcedReboot gets the daysUntilForcedReboot property value. The number of days after installation that forced reboot will happen. +func (m *ExpeditedWindowsQualityUpdateSettings) GetDaysUntilForcedReboot()(*int32) { + return m.daysUntilForcedReboot +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExpeditedWindowsQualityUpdateSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["daysUntilForcedReboot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDaysUntilForcedReboot(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["qualityUpdateRelease"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQualityUpdateRelease(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExpeditedWindowsQualityUpdateSettings) GetOdataType()(*string) { + return m.odataType +} +// GetQualityUpdateRelease gets the qualityUpdateRelease property value. The release date to identify a quality update. +func (m *ExpeditedWindowsQualityUpdateSettings) GetQualityUpdateRelease()(*string) { + return m.qualityUpdateRelease +} +// Serialize serializes information the current object +func (m *ExpeditedWindowsQualityUpdateSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("daysUntilForcedReboot", m.GetDaysUntilForcedReboot()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("qualityUpdateRelease", m.GetQualityUpdateRelease()) + 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 *ExpeditedWindowsQualityUpdateSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDaysUntilForcedReboot sets the daysUntilForcedReboot property value. The number of days after installation that forced reboot will happen. +func (m *ExpeditedWindowsQualityUpdateSettings) SetDaysUntilForcedReboot(value *int32)() { + m.daysUntilForcedReboot = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExpeditedWindowsQualityUpdateSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetQualityUpdateRelease sets the qualityUpdateRelease property value. The release date to identify a quality update. +func (m *ExpeditedWindowsQualityUpdateSettings) SetQualityUpdateRelease(value *string)() { + m.qualityUpdateRelease = value +} diff --git a/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settingsable.go b/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settingsable.go new file mode 100644 index 000000000..c06d3e395 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expedited_windows_quality_update_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpeditedWindowsQualityUpdateSettingsable +type ExpeditedWindowsQualityUpdateSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDaysUntilForcedReboot()(*int32) + GetOdataType()(*string) + GetQualityUpdateRelease()(*string) + SetDaysUntilForcedReboot(value *int32)() + SetOdataType(value *string)() + SetQualityUpdateRelease(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/expiration_pattern.go b/src/internal/connector/graph/betasdk/models/expiration_pattern.go new file mode 100644 index 000000000..796b00e9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expiration_pattern.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpirationPattern +type ExpirationPattern 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 requestor's desired duration of access represented in ISO 8601 format for durations. For example, PT3H refers to three hours. If specified in a request, endDateTime should not be present and the type property should be set to afterDuration. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Timestamp of date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The requestor's desired expiration pattern type. + type_escaped *ExpirationPatternType +} +// NewExpirationPattern instantiates a new expirationPattern and sets the default values. +func NewExpirationPattern()(*ExpirationPattern) { + m := &ExpirationPattern{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExpirationPatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExpirationPatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExpirationPattern(), 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 *ExpirationPattern) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDuration gets the duration property value. The requestor's desired duration of access represented in ISO 8601 format for durations. For example, PT3H refers to three hours. If specified in a request, endDateTime should not be present and the type property should be set to afterDuration. +func (m *ExpirationPattern) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetEndDateTime gets the endDateTime property value. Timestamp of date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ExpirationPattern) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExpirationPattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExpirationPatternType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*ExpirationPatternType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExpirationPattern) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The requestor's desired expiration pattern type. +func (m *ExpirationPattern) GetType()(*ExpirationPatternType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ExpirationPattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteISODurationValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *ExpirationPattern) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDuration sets the duration property value. The requestor's desired duration of access represented in ISO 8601 format for durations. For example, PT3H refers to three hours. If specified in a request, endDateTime should not be present and the type property should be set to afterDuration. +func (m *ExpirationPattern) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetEndDateTime sets the endDateTime property value. Timestamp of date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ExpirationPattern) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExpirationPattern) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The requestor's desired expiration pattern type. +func (m *ExpirationPattern) SetType(value *ExpirationPatternType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/expiration_pattern_type.go b/src/internal/connector/graph/betasdk/models/expiration_pattern_type.go new file mode 100644 index 000000000..c6626e834 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expiration_pattern_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExpirationPatternType int + +const ( + NOTSPECIFIED_EXPIRATIONPATTERNTYPE ExpirationPatternType = iota + NOEXPIRATION_EXPIRATIONPATTERNTYPE + AFTERDATETIME_EXPIRATIONPATTERNTYPE + AFTERDURATION_EXPIRATIONPATTERNTYPE +) + +func (i ExpirationPatternType) String() string { + return []string{"notSpecified", "noExpiration", "afterDateTime", "afterDuration"}[i] +} +func ParseExpirationPatternType(v string) (interface{}, error) { + result := NOTSPECIFIED_EXPIRATIONPATTERNTYPE + switch v { + case "notSpecified": + result = NOTSPECIFIED_EXPIRATIONPATTERNTYPE + case "noExpiration": + result = NOEXPIRATION_EXPIRATIONPATTERNTYPE + case "afterDateTime": + result = AFTERDATETIME_EXPIRATIONPATTERNTYPE + case "afterDuration": + result = AFTERDURATION_EXPIRATIONPATTERNTYPE + default: + return 0, errors.New("Unknown ExpirationPatternType value: " + v) + } + return &result, nil +} +func SerializeExpirationPatternType(values []ExpirationPatternType) []string { + 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/expiration_patternable.go b/src/internal/connector/graph/betasdk/models/expiration_patternable.go new file mode 100644 index 000000000..8065bc917 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expiration_patternable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpirationPatternable +type ExpirationPatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetType()(*ExpirationPatternType) + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetType(value *ExpirationPatternType)() +} diff --git a/src/internal/connector/graph/betasdk/models/expiration_requirement.go b/src/internal/connector/graph/betasdk/models/expiration_requirement.go new file mode 100644 index 000000000..1fa28dec9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expiration_requirement.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExpirationRequirement int + +const ( + REMEMBERMULTIFACTORAUTHENTICATIONONTRUSTEDDEVICES_EXPIRATIONREQUIREMENT ExpirationRequirement = iota + TENANTTOKENLIFETIMEPOLICY_EXPIRATIONREQUIREMENT + AUDIENCETOKENLIFETIMEPOLICY_EXPIRATIONREQUIREMENT + SIGNINFREQUENCYPERIODICREAUTHENTICATION_EXPIRATIONREQUIREMENT + NGCMFA_EXPIRATIONREQUIREMENT + SIGNINFREQUENCYEVERYTIME_EXPIRATIONREQUIREMENT + UNKNOWNFUTUREVALUE_EXPIRATIONREQUIREMENT +) + +func (i ExpirationRequirement) String() string { + return []string{"rememberMultifactorAuthenticationOnTrustedDevices", "tenantTokenLifetimePolicy", "audienceTokenLifetimePolicy", "signInFrequencyPeriodicReauthentication", "ngcMfa", "signInFrequencyEveryTime", "unknownFutureValue"}[i] +} +func ParseExpirationRequirement(v string) (interface{}, error) { + result := REMEMBERMULTIFACTORAUTHENTICATIONONTRUSTEDDEVICES_EXPIRATIONREQUIREMENT + switch v { + case "rememberMultifactorAuthenticationOnTrustedDevices": + result = REMEMBERMULTIFACTORAUTHENTICATIONONTRUSTEDDEVICES_EXPIRATIONREQUIREMENT + case "tenantTokenLifetimePolicy": + result = TENANTTOKENLIFETIMEPOLICY_EXPIRATIONREQUIREMENT + case "audienceTokenLifetimePolicy": + result = AUDIENCETOKENLIFETIMEPOLICY_EXPIRATIONREQUIREMENT + case "signInFrequencyPeriodicReauthentication": + result = SIGNINFREQUENCYPERIODICREAUTHENTICATION_EXPIRATIONREQUIREMENT + case "ngcMfa": + result = NGCMFA_EXPIRATIONREQUIREMENT + case "signInFrequencyEveryTime": + result = SIGNINFREQUENCYEVERYTIME_EXPIRATIONREQUIREMENT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXPIRATIONREQUIREMENT + default: + return 0, errors.New("Unknown ExpirationRequirement value: " + v) + } + return &result, nil +} +func SerializeExpirationRequirement(values []ExpirationRequirement) []string { + 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/expression_evaluation_details.go b/src/internal/connector/graph/betasdk/models/expression_evaluation_details.go new file mode 100644 index 000000000..002e4d646 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expression_evaluation_details.go @@ -0,0 +1,183 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpressionEvaluationDetails +type ExpressionEvaluationDetails struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents expression which has been evaluated. + expression *string + // Represents the details of the evaluation of the expression. + expressionEvaluationDetails []ExpressionEvaluationDetailsable + // Represents the value of the result of the current expression. + expressionResult *bool + // The OdataType property + odataType *string + // Defines the name of the property and the value of that property. + propertyToEvaluate PropertyToEvaluateable +} +// NewExpressionEvaluationDetails instantiates a new expressionEvaluationDetails and sets the default values. +func NewExpressionEvaluationDetails()(*ExpressionEvaluationDetails) { + m := &ExpressionEvaluationDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExpressionEvaluationDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExpressionEvaluationDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExpressionEvaluationDetails(), 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 *ExpressionEvaluationDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExpression gets the expression property value. Represents expression which has been evaluated. +func (m *ExpressionEvaluationDetails) GetExpression()(*string) { + return m.expression +} +// GetExpressionEvaluationDetails gets the expressionEvaluationDetails property value. Represents the details of the evaluation of the expression. +func (m *ExpressionEvaluationDetails) GetExpressionEvaluationDetails()([]ExpressionEvaluationDetailsable) { + return m.expressionEvaluationDetails +} +// GetExpressionResult gets the expressionResult property value. Represents the value of the result of the current expression. +func (m *ExpressionEvaluationDetails) GetExpressionResult()(*bool) { + return m.expressionResult +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExpressionEvaluationDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expression"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExpression(val) + } + return nil + } + res["expressionEvaluationDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExpressionEvaluationDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExpressionEvaluationDetailsable, len(val)) + for i, v := range val { + res[i] = v.(ExpressionEvaluationDetailsable) + } + m.SetExpressionEvaluationDetails(res) + } + return nil + } + res["expressionResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExpressionResult(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["propertyToEvaluate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePropertyToEvaluateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPropertyToEvaluate(val.(PropertyToEvaluateable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExpressionEvaluationDetails) GetOdataType()(*string) { + return m.odataType +} +// GetPropertyToEvaluate gets the propertyToEvaluate property value. Defines the name of the property and the value of that property. +func (m *ExpressionEvaluationDetails) GetPropertyToEvaluate()(PropertyToEvaluateable) { + return m.propertyToEvaluate +} +// Serialize serializes information the current object +func (m *ExpressionEvaluationDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("expression", m.GetExpression()) + if err != nil { + return err + } + } + if m.GetExpressionEvaluationDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExpressionEvaluationDetails())) + for i, v := range m.GetExpressionEvaluationDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("expressionEvaluationDetails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("expressionResult", m.GetExpressionResult()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("propertyToEvaluate", m.GetPropertyToEvaluate()) + 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 *ExpressionEvaluationDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExpression sets the expression property value. Represents expression which has been evaluated. +func (m *ExpressionEvaluationDetails) SetExpression(value *string)() { + m.expression = value +} +// SetExpressionEvaluationDetails sets the expressionEvaluationDetails property value. Represents the details of the evaluation of the expression. +func (m *ExpressionEvaluationDetails) SetExpressionEvaluationDetails(value []ExpressionEvaluationDetailsable)() { + m.expressionEvaluationDetails = value +} +// SetExpressionResult sets the expressionResult property value. Represents the value of the result of the current expression. +func (m *ExpressionEvaluationDetails) SetExpressionResult(value *bool)() { + m.expressionResult = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExpressionEvaluationDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetPropertyToEvaluate sets the propertyToEvaluate property value. Defines the name of the property and the value of that property. +func (m *ExpressionEvaluationDetails) SetPropertyToEvaluate(value PropertyToEvaluateable)() { + m.propertyToEvaluate = value +} diff --git a/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_response.go b/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_response.go new file mode 100644 index 000000000..fe9ca4391 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpressionEvaluationDetailsCollectionResponse +type ExpressionEvaluationDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExpressionEvaluationDetailsable +} +// NewExpressionEvaluationDetailsCollectionResponse instantiates a new ExpressionEvaluationDetailsCollectionResponse and sets the default values. +func NewExpressionEvaluationDetailsCollectionResponse()(*ExpressionEvaluationDetailsCollectionResponse) { + m := &ExpressionEvaluationDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExpressionEvaluationDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExpressionEvaluationDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExpressionEvaluationDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExpressionEvaluationDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExpressionEvaluationDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExpressionEvaluationDetailsable, len(val)) + for i, v := range val { + res[i] = v.(ExpressionEvaluationDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExpressionEvaluationDetailsCollectionResponse) GetValue()([]ExpressionEvaluationDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExpressionEvaluationDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExpressionEvaluationDetailsCollectionResponse) SetValue(value []ExpressionEvaluationDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_responseable.go new file mode 100644 index 000000000..b6bc01055 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expression_evaluation_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpressionEvaluationDetailsCollectionResponseable +type ExpressionEvaluationDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExpressionEvaluationDetailsable) + SetValue(value []ExpressionEvaluationDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/expression_evaluation_detailsable.go b/src/internal/connector/graph/betasdk/models/expression_evaluation_detailsable.go new file mode 100644 index 000000000..b1571db48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/expression_evaluation_detailsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExpressionEvaluationDetailsable +type ExpressionEvaluationDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpression()(*string) + GetExpressionEvaluationDetails()([]ExpressionEvaluationDetailsable) + GetExpressionResult()(*bool) + GetOdataType()(*string) + GetPropertyToEvaluate()(PropertyToEvaluateable) + SetExpression(value *string)() + SetExpressionEvaluationDetails(value []ExpressionEvaluationDetailsable)() + SetExpressionResult(value *bool)() + SetOdataType(value *string)() + SetPropertyToEvaluate(value PropertyToEvaluateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/extended_key_usage.go b/src/internal/connector/graph/betasdk/models/extended_key_usage.go new file mode 100644 index 000000000..1acef4594 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extended_key_usage.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtendedKeyUsage custom Extended Key Usage definition +type ExtendedKeyUsage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Extended Key Usage Name + name *string + // Extended Key Usage Object Identifier + objectIdentifier *string + // The OdataType property + odataType *string +} +// NewExtendedKeyUsage instantiates a new extendedKeyUsage and sets the default values. +func NewExtendedKeyUsage()(*ExtendedKeyUsage) { + m := &ExtendedKeyUsage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExtendedKeyUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtendedKeyUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtendedKeyUsage(), 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 *ExtendedKeyUsage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtendedKeyUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["objectIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectIdentifier(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 + } + return res +} +// GetName gets the name property value. Extended Key Usage Name +func (m *ExtendedKeyUsage) GetName()(*string) { + return m.name +} +// GetObjectIdentifier gets the objectIdentifier property value. Extended Key Usage Object Identifier +func (m *ExtendedKeyUsage) GetObjectIdentifier()(*string) { + return m.objectIdentifier +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExtendedKeyUsage) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ExtendedKeyUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("objectIdentifier", m.GetObjectIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ExtendedKeyUsage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Extended Key Usage Name +func (m *ExtendedKeyUsage) SetName(value *string)() { + m.name = value +} +// SetObjectIdentifier sets the objectIdentifier property value. Extended Key Usage Object Identifier +func (m *ExtendedKeyUsage) SetObjectIdentifier(value *string)() { + m.objectIdentifier = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExtendedKeyUsage) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_response.go b/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_response.go new file mode 100644 index 000000000..512cf7457 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtendedKeyUsageCollectionResponse +type ExtendedKeyUsageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExtendedKeyUsageable +} +// NewExtendedKeyUsageCollectionResponse instantiates a new ExtendedKeyUsageCollectionResponse and sets the default values. +func NewExtendedKeyUsageCollectionResponse()(*ExtendedKeyUsageCollectionResponse) { + m := &ExtendedKeyUsageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExtendedKeyUsageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtendedKeyUsageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtendedKeyUsageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtendedKeyUsageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExtendedKeyUsageCollectionResponse) GetValue()([]ExtendedKeyUsageable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExtendedKeyUsageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExtendedKeyUsageCollectionResponse) SetValue(value []ExtendedKeyUsageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_responseable.go new file mode 100644 index 000000000..f5f32c487 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extended_key_usage_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtendedKeyUsageCollectionResponseable +type ExtendedKeyUsageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExtendedKeyUsageable) + SetValue(value []ExtendedKeyUsageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/extended_key_usageable.go b/src/internal/connector/graph/betasdk/models/extended_key_usageable.go new file mode 100644 index 000000000..648136496 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extended_key_usageable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtendedKeyUsageable +type ExtendedKeyUsageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetObjectIdentifier()(*string) + GetOdataType()(*string) + SetName(value *string)() + SetObjectIdentifier(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/extension.go b/src/internal/connector/graph/betasdk/models/extension.go new file mode 100644 index 000000000..1ee4bf505 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension.go @@ -0,0 +1,54 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Extension provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Extension struct { + Entity +} +// NewExtension instantiates a new extension and sets the default values. +func NewExtension()(*Extension) { + m := &Extension{ + Entity: *NewEntity(), + } + return m +} +// CreateExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.openTypeExtension": + return NewOpenTypeExtension(), nil + case "#microsoft.graph.personExtension": + return NewPersonExtension(), nil + } + } + } + } + return NewExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Extension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *Extension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/extension_collection_response.go b/src/internal/connector/graph/betasdk/models/extension_collection_response.go new file mode 100644 index 000000000..35e0dd9a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionCollectionResponse +type ExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Extensionable +} +// NewExtensionCollectionResponse instantiates a new ExtensionCollectionResponse and sets the default values. +func NewExtensionCollectionResponse()(*ExtensionCollectionResponse) { + m := &ExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExtensionCollectionResponse) GetValue()([]Extensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExtensionCollectionResponse) SetValue(value []Extensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/extension_collection_responseable.go new file mode 100644 index 000000000..1b7cb89fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionCollectionResponseable +type ExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Extensionable) + SetValue(value []Extensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/extension_property.go b/src/internal/connector/graph/betasdk/models/extension_property.go new file mode 100644 index 000000000..a8a6e7503 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_property.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionProperty provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExtensionProperty struct { + DirectoryObject + // Display name of the application object on which this extension property is defined. Read-only. + appDisplayName *string + // Specifies the data type of the value the extension property can hold. Following values are supported. Not nullable. Binary - 256 bytes maximumBooleanDateTime - Must be specified in ISO 8601 format. Will be stored in UTC.Integer - 32-bit value.LargeInteger - 64-bit value.String - 256 characters maximum + dataType *string + // Indicates if this extension property was synced from on-premises active directory using Azure AD Connect. Read-only. + isSyncedFromOnPremises *bool + // Name of the extension property. Not nullable. Supports $filter (eq). + name *string + // Following values are supported. Not nullable. UserGroupAdministrativeUnitApplicationDeviceOrganization + targetObjects []string +} +// NewExtensionProperty instantiates a new extensionProperty and sets the default values. +func NewExtensionProperty()(*ExtensionProperty) { + m := &ExtensionProperty{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.extensionProperty"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExtensionPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtensionProperty(), nil +} +// GetAppDisplayName gets the appDisplayName property value. Display name of the application object on which this extension property is defined. Read-only. +func (m *ExtensionProperty) GetAppDisplayName()(*string) { + return m.appDisplayName +} +// GetDataType gets the dataType property value. Specifies the data type of the value the extension property can hold. Following values are supported. Not nullable. Binary - 256 bytes maximumBooleanDateTime - Must be specified in ISO 8601 format. Will be stored in UTC.Integer - 32-bit value.LargeInteger - 64-bit value.String - 256 characters maximum +func (m *ExtensionProperty) GetDataType()(*string) { + return m.dataType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtensionProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["appDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDisplayName(val) + } + return nil + } + res["dataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDataType(val) + } + return nil + } + res["isSyncedFromOnPremises"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSyncedFromOnPremises(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["targetObjects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetObjects(res) + } + return nil + } + return res +} +// GetIsSyncedFromOnPremises gets the isSyncedFromOnPremises property value. Indicates if this extension property was synced from on-premises active directory using Azure AD Connect. Read-only. +func (m *ExtensionProperty) GetIsSyncedFromOnPremises()(*bool) { + return m.isSyncedFromOnPremises +} +// GetName gets the name property value. Name of the extension property. Not nullable. Supports $filter (eq). +func (m *ExtensionProperty) GetName()(*string) { + return m.name +} +// GetTargetObjects gets the targetObjects property value. Following values are supported. Not nullable. UserGroupAdministrativeUnitApplicationDeviceOrganization +func (m *ExtensionProperty) GetTargetObjects()([]string) { + return m.targetObjects +} +// Serialize serializes information the current object +func (m *ExtensionProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appDisplayName", m.GetAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("dataType", m.GetDataType()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSyncedFromOnPremises", m.GetIsSyncedFromOnPremises()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetTargetObjects() != nil { + err = writer.WriteCollectionOfStringValues("targetObjects", m.GetTargetObjects()) + if err != nil { + return err + } + } + return nil +} +// SetAppDisplayName sets the appDisplayName property value. Display name of the application object on which this extension property is defined. Read-only. +func (m *ExtensionProperty) SetAppDisplayName(value *string)() { + m.appDisplayName = value +} +// SetDataType sets the dataType property value. Specifies the data type of the value the extension property can hold. Following values are supported. Not nullable. Binary - 256 bytes maximumBooleanDateTime - Must be specified in ISO 8601 format. Will be stored in UTC.Integer - 32-bit value.LargeInteger - 64-bit value.String - 256 characters maximum +func (m *ExtensionProperty) SetDataType(value *string)() { + m.dataType = value +} +// SetIsSyncedFromOnPremises sets the isSyncedFromOnPremises property value. Indicates if this extension property was synced from on-premises active directory using Azure AD Connect. Read-only. +func (m *ExtensionProperty) SetIsSyncedFromOnPremises(value *bool)() { + m.isSyncedFromOnPremises = value +} +// SetName sets the name property value. Name of the extension property. Not nullable. Supports $filter (eq). +func (m *ExtensionProperty) SetName(value *string)() { + m.name = value +} +// SetTargetObjects sets the targetObjects property value. Following values are supported. Not nullable. UserGroupAdministrativeUnitApplicationDeviceOrganization +func (m *ExtensionProperty) SetTargetObjects(value []string)() { + m.targetObjects = value +} diff --git a/src/internal/connector/graph/betasdk/models/extension_property_collection_response.go b/src/internal/connector/graph/betasdk/models/extension_property_collection_response.go new file mode 100644 index 000000000..33a5ded84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionPropertyCollectionResponse +type ExtensionPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExtensionPropertyable +} +// NewExtensionPropertyCollectionResponse instantiates a new ExtensionPropertyCollectionResponse and sets the default values. +func NewExtensionPropertyCollectionResponse()(*ExtensionPropertyCollectionResponse) { + m := &ExtensionPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExtensionPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtensionPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtensionPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtensionPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ExtensionPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExtensionPropertyCollectionResponse) GetValue()([]ExtensionPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExtensionPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExtensionPropertyCollectionResponse) SetValue(value []ExtensionPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/extension_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/extension_property_collection_responseable.go new file mode 100644 index 000000000..aad253989 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionPropertyCollectionResponseable +type ExtensionPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExtensionPropertyable) + SetValue(value []ExtensionPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/extension_propertyable.go b/src/internal/connector/graph/betasdk/models/extension_propertyable.go new file mode 100644 index 000000000..067246c2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_propertyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionPropertyable +type ExtensionPropertyable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppDisplayName()(*string) + GetDataType()(*string) + GetIsSyncedFromOnPremises()(*bool) + GetName()(*string) + GetTargetObjects()([]string) + SetAppDisplayName(value *string)() + SetDataType(value *string)() + SetIsSyncedFromOnPremises(value *bool)() + SetName(value *string)() + SetTargetObjects(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/extension_schema_property.go b/src/internal/connector/graph/betasdk/models/extension_schema_property.go new file mode 100644 index 000000000..1564578a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_schema_property.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionSchemaProperty +type ExtensionSchemaProperty 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 name of the strongly typed property defined as part of a schema extension. + name *string + // The OdataType property + odataType *string + // The type of the property that is defined as part of a schema extension. Allowed values are Binary, Boolean, DateTime, Integer or String. See the table below for more details. + type_escaped *string +} +// NewExtensionSchemaProperty instantiates a new extensionSchemaProperty and sets the default values. +func NewExtensionSchemaProperty()(*ExtensionSchemaProperty) { + m := &ExtensionSchemaProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExtensionSchemaPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionSchemaPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtensionSchemaProperty(), 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 *ExtensionSchemaProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtensionSchemaProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the strongly typed property defined as part of a schema extension. +func (m *ExtensionSchemaProperty) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExtensionSchemaProperty) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of the property that is defined as part of a schema extension. Allowed values are Binary, Boolean, DateTime, Integer or String. See the table below for more details. +func (m *ExtensionSchemaProperty) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ExtensionSchemaProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *ExtensionSchemaProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name of the strongly typed property defined as part of a schema extension. +func (m *ExtensionSchemaProperty) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExtensionSchemaProperty) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of the property that is defined as part of a schema extension. Allowed values are Binary, Boolean, DateTime, Integer or String. See the table below for more details. +func (m *ExtensionSchemaProperty) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_response.go b/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_response.go new file mode 100644 index 000000000..f0c7363cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionSchemaPropertyCollectionResponse +type ExtensionSchemaPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExtensionSchemaPropertyable +} +// NewExtensionSchemaPropertyCollectionResponse instantiates a new ExtensionSchemaPropertyCollectionResponse and sets the default values. +func NewExtensionSchemaPropertyCollectionResponse()(*ExtensionSchemaPropertyCollectionResponse) { + m := &ExtensionSchemaPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExtensionSchemaPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExtensionSchemaPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExtensionSchemaPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExtensionSchemaPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionSchemaPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtensionSchemaPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ExtensionSchemaPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExtensionSchemaPropertyCollectionResponse) GetValue()([]ExtensionSchemaPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExtensionSchemaPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExtensionSchemaPropertyCollectionResponse) SetValue(value []ExtensionSchemaPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_responseable.go new file mode 100644 index 000000000..5b53f0135 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_schema_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionSchemaPropertyCollectionResponseable +type ExtensionSchemaPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExtensionSchemaPropertyable) + SetValue(value []ExtensionSchemaPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/extension_schema_propertyable.go b/src/internal/connector/graph/betasdk/models/extension_schema_propertyable.go new file mode 100644 index 000000000..b4a5b5177 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extension_schema_propertyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExtensionSchemaPropertyable +type ExtensionSchemaPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetType()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/extensionable.go b/src/internal/connector/graph/betasdk/models/extensionable.go new file mode 100644 index 000000000..3e6c61104 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/extensionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Extensionable +type Extensionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/external.go b/src/internal/connector/graph/betasdk/models/external.go new file mode 100644 index 000000000..db61ba94c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// External +type External struct { + Entity + // The connections property + connections []ExternalConnectionable +} +// NewExternal instantiates a new External and sets the default values. +func NewExternal()(*External) { + m := &External{ + Entity: *NewEntity(), + } + return m +} +// CreateExternalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternal(), nil +} +// GetConnections gets the connections property value. The connections property +func (m *External) GetConnections()([]ExternalConnectionable) { + return m.connections +} +// GetFieldDeserializers the deserialization information for the current model +func (m *External) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["connections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalConnectionable, len(val)) + for i, v := range val { + res[i] = v.(ExternalConnectionable) + } + m.SetConnections(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *External) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetConnections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConnections())) + for i, v := range m.GetConnections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("connections", cast) + if err != nil { + return err + } + } + return nil +} +// SetConnections sets the connections property value. The connections property +func (m *External) SetConnections(value []ExternalConnectionable)() { + m.connections = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_audience_scope.go b/src/internal/connector/graph/betasdk/models/external_audience_scope.go new file mode 100644 index 000000000..a0ed08d41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_audience_scope.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalAudienceScope int + +const ( + NONE_EXTERNALAUDIENCESCOPE ExternalAudienceScope = iota + CONTACTSONLY_EXTERNALAUDIENCESCOPE + ALL_EXTERNALAUDIENCESCOPE +) + +func (i ExternalAudienceScope) String() string { + return []string{"none", "contactsOnly", "all"}[i] +} +func ParseExternalAudienceScope(v string) (interface{}, error) { + result := NONE_EXTERNALAUDIENCESCOPE + switch v { + case "none": + result = NONE_EXTERNALAUDIENCESCOPE + case "contactsOnly": + result = CONTACTSONLY_EXTERNALAUDIENCESCOPE + case "all": + result = ALL_EXTERNALAUDIENCESCOPE + default: + return 0, errors.New("Unknown ExternalAudienceScope value: " + v) + } + return &result, nil +} +func SerializeExternalAudienceScope(values []ExternalAudienceScope) []string { + 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/external_authentication_type.go b/src/internal/connector/graph/betasdk/models/external_authentication_type.go new file mode 100644 index 000000000..bd19cc4a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_authentication_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalAuthenticationType int + +const ( + PASSTHRU_EXTERNALAUTHENTICATIONTYPE ExternalAuthenticationType = iota + AADPREAUTHENTICATION_EXTERNALAUTHENTICATIONTYPE +) + +func (i ExternalAuthenticationType) String() string { + return []string{"passthru", "aadPreAuthentication"}[i] +} +func ParseExternalAuthenticationType(v string) (interface{}, error) { + result := PASSTHRU_EXTERNALAUTHENTICATIONTYPE + switch v { + case "passthru": + result = PASSTHRU_EXTERNALAUTHENTICATIONTYPE + case "aadPreAuthentication": + result = AADPREAUTHENTICATION_EXTERNALAUTHENTICATIONTYPE + default: + return 0, errors.New("Unknown ExternalAuthenticationType value: " + v) + } + return &result, nil +} +func SerializeExternalAuthenticationType(values []ExternalAuthenticationType) []string { + 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/external_connection.go b/src/internal/connector/graph/betasdk/models/external_connection.go new file mode 100644 index 000000000..f227e2889 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_connection.go @@ -0,0 +1,260 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalConnection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalConnection struct { + Entity + // The configuration property + configuration Configurationable + // The description property + description *string + // The groups property + groups []ExternalGroupable + // The items property + items []ExternalItemable + // The name property + name *string + // The operations property + operations []ConnectionOperationable + // The schema property + schema Schemaable + // The state property + state *ConnectionState +} +// NewExternalConnection instantiates a new externalConnection and sets the default values. +func NewExternalConnection()(*ExternalConnection) { + m := &ExternalConnection{ + Entity: *NewEntity(), + } + return m +} +// CreateExternalConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalConnection(), nil +} +// GetConfiguration gets the configuration property value. The configuration property +func (m *ExternalConnection) GetConfiguration()(Configurationable) { + return m.configuration +} +// GetDescription gets the description property value. The description property +func (m *ExternalConnection) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(Configurationable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroupable, len(val)) + for i, v := range val { + res[i] = v.(ExternalGroupable) + } + m.SetGroups(res) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalItemable, len(val)) + for i, v := range val { + res[i] = v.(ExternalItemable) + } + m.SetItems(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectionOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectionOperationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectionOperationable) + } + m.SetOperations(res) + } + return nil + } + res["schema"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchema(val.(Schemaable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ConnectionState)) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The groups property +func (m *ExternalConnection) GetGroups()([]ExternalGroupable) { + return m.groups +} +// GetItems gets the items property value. The items property +func (m *ExternalConnection) GetItems()([]ExternalItemable) { + return m.items +} +// GetName gets the name property value. The name property +func (m *ExternalConnection) GetName()(*string) { + return m.name +} +// GetOperations gets the operations property value. The operations property +func (m *ExternalConnection) GetOperations()([]ConnectionOperationable) { + return m.operations +} +// GetSchema gets the schema property value. The schema property +func (m *ExternalConnection) GetSchema()(Schemaable) { + return m.schema +} +// GetState gets the state property value. The state property +func (m *ExternalConnection) GetState()(*ConnectionState) { + return m.state +} +// Serialize serializes information the current object +func (m *ExternalConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schema", m.GetSchema()) + if err != nil { + return err + } + } + return nil +} +// SetConfiguration sets the configuration property value. The configuration property +func (m *ExternalConnection) SetConfiguration(value Configurationable)() { + m.configuration = value +} +// SetDescription sets the description property value. The description property +func (m *ExternalConnection) SetDescription(value *string)() { + m.description = value +} +// SetGroups sets the groups property value. The groups property +func (m *ExternalConnection) SetGroups(value []ExternalGroupable)() { + m.groups = value +} +// SetItems sets the items property value. The items property +func (m *ExternalConnection) SetItems(value []ExternalItemable)() { + m.items = value +} +// SetName sets the name property value. The name property +func (m *ExternalConnection) SetName(value *string)() { + m.name = value +} +// SetOperations sets the operations property value. The operations property +func (m *ExternalConnection) SetOperations(value []ConnectionOperationable)() { + m.operations = value +} +// SetSchema sets the schema property value. The schema property +func (m *ExternalConnection) SetSchema(value Schemaable)() { + m.schema = value +} +// SetState sets the state property value. The state property +func (m *ExternalConnection) SetState(value *ConnectionState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_connection_collection_response.go b/src/internal/connector/graph/betasdk/models/external_connection_collection_response.go new file mode 100644 index 000000000..7ed3ff082 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_connection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalConnectionCollectionResponse +type ExternalConnectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalConnectionable +} +// NewExternalConnectionCollectionResponse instantiates a new ExternalConnectionCollectionResponse and sets the default values. +func NewExternalConnectionCollectionResponse()(*ExternalConnectionCollectionResponse) { + m := &ExternalConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalConnectionable, len(val)) + for i, v := range val { + res[i] = v.(ExternalConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalConnectionCollectionResponse) GetValue()([]ExternalConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalConnectionCollectionResponse) SetValue(value []ExternalConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_connection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_connection_collection_responseable.go new file mode 100644 index 000000000..3a486e9df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_connection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalConnectionCollectionResponseable +type ExternalConnectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalConnectionable) + SetValue(value []ExternalConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_connectionable.go b/src/internal/connector/graph/betasdk/models/external_connectionable.go new file mode 100644 index 000000000..5f2f2754f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_connectionable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalConnectionable +type ExternalConnectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(Configurationable) + GetDescription()(*string) + GetGroups()([]ExternalGroupable) + GetItems()([]ExternalItemable) + GetName()(*string) + GetOperations()([]ConnectionOperationable) + GetSchema()(Schemaable) + GetState()(*ConnectionState) + SetConfiguration(value Configurationable)() + SetDescription(value *string)() + SetGroups(value []ExternalGroupable)() + SetItems(value []ExternalItemable)() + SetName(value *string)() + SetOperations(value []ConnectionOperationable)() + SetSchema(value Schemaable)() + SetState(value *ConnectionState)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_federation.go b/src/internal/connector/graph/betasdk/models/external_domain_federation.go new file mode 100644 index 000000000..8ddb22728 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_federation.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainFederation +type ExternalDomainFederation struct { + IdentitySource + // The name of the identity source, typically also the domain name. Read only. + displayName *string + // The domain name. Read only. + domainName *string + // The issuerURI of the incoming federation. Read only. + issuerUri *string +} +// NewExternalDomainFederation instantiates a new ExternalDomainFederation and sets the default values. +func NewExternalDomainFederation()(*ExternalDomainFederation) { + m := &ExternalDomainFederation{ + IdentitySource: *NewIdentitySource(), + } + odataTypeValue := "#microsoft.graph.externalDomainFederation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExternalDomainFederationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalDomainFederationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalDomainFederation(), nil +} +// GetDisplayName gets the displayName property value. The name of the identity source, typically also the domain name. Read only. +func (m *ExternalDomainFederation) GetDisplayName()(*string) { + return m.displayName +} +// GetDomainName gets the domainName property value. The domain name. Read only. +func (m *ExternalDomainFederation) GetDomainName()(*string) { + return m.domainName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalDomainFederation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySource.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(val) + } + return nil + } + res["issuerUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuerUri(val) + } + return nil + } + return res +} +// GetIssuerUri gets the issuerUri property value. The issuerURI of the incoming federation. Read only. +func (m *ExternalDomainFederation) GetIssuerUri()(*string) { + return m.issuerUri +} +// Serialize serializes information the current object +func (m *ExternalDomainFederation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuerUri", m.GetIssuerUri()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the identity source, typically also the domain name. Read only. +func (m *ExternalDomainFederation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDomainName sets the domainName property value. The domain name. Read only. +func (m *ExternalDomainFederation) SetDomainName(value *string)() { + m.domainName = value +} +// SetIssuerUri sets the issuerUri property value. The issuerURI of the incoming federation. Read only. +func (m *ExternalDomainFederation) SetIssuerUri(value *string)() { + m.issuerUri = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_federationable.go b/src/internal/connector/graph/betasdk/models/external_domain_federationable.go new file mode 100644 index 000000000..144f6c843 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_federationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainFederationable +type ExternalDomainFederationable interface { + IdentitySourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetDomainName()(*string) + GetIssuerUri()(*string) + SetDisplayName(value *string)() + SetDomainName(value *string)() + SetIssuerUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_name.go b/src/internal/connector/graph/betasdk/models/external_domain_name.go new file mode 100644 index 000000000..e55ac6705 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_name.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainName provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalDomainName struct { + Entity +} +// NewExternalDomainName instantiates a new externalDomainName and sets the default values. +func NewExternalDomainName()(*ExternalDomainName) { + m := &ExternalDomainName{ + Entity: *NewEntity(), + } + return m +} +// CreateExternalDomainNameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalDomainNameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalDomainName(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalDomainName) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ExternalDomainName) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_name_collection_response.go b/src/internal/connector/graph/betasdk/models/external_domain_name_collection_response.go new file mode 100644 index 000000000..8677166c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_name_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainNameCollectionResponse +type ExternalDomainNameCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalDomainNameable +} +// NewExternalDomainNameCollectionResponse instantiates a new ExternalDomainNameCollectionResponse and sets the default values. +func NewExternalDomainNameCollectionResponse()(*ExternalDomainNameCollectionResponse) { + m := &ExternalDomainNameCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalDomainNameCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalDomainNameCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalDomainNameCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalDomainNameCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalDomainNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalDomainNameable, len(val)) + for i, v := range val { + res[i] = v.(ExternalDomainNameable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalDomainNameCollectionResponse) GetValue()([]ExternalDomainNameable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalDomainNameCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalDomainNameCollectionResponse) SetValue(value []ExternalDomainNameable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_name_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_domain_name_collection_responseable.go new file mode 100644 index 000000000..8e8d46a73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_name_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainNameCollectionResponseable +type ExternalDomainNameCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalDomainNameable) + SetValue(value []ExternalDomainNameable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_domain_nameable.go b/src/internal/connector/graph/betasdk/models/external_domain_nameable.go new file mode 100644 index 000000000..42c123da3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_domain_nameable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalDomainNameable +type ExternalDomainNameable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/external_email_otp_state.go b/src/internal/connector/graph/betasdk/models/external_email_otp_state.go new file mode 100644 index 000000000..59042020f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_email_otp_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalEmailOtpState int + +const ( + DEFAULT_ESCAPED_EXTERNALEMAILOTPSTATE ExternalEmailOtpState = iota + ENABLED_EXTERNALEMAILOTPSTATE + DISABLED_EXTERNALEMAILOTPSTATE + UNKNOWNFUTUREVALUE_EXTERNALEMAILOTPSTATE +) + +func (i ExternalEmailOtpState) String() string { + return []string{"default", "enabled", "disabled", "unknownFutureValue"}[i] +} +func ParseExternalEmailOtpState(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_EXTERNALEMAILOTPSTATE + switch v { + case "default": + result = DEFAULT_ESCAPED_EXTERNALEMAILOTPSTATE + case "enabled": + result = ENABLED_EXTERNALEMAILOTPSTATE + case "disabled": + result = DISABLED_EXTERNALEMAILOTPSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXTERNALEMAILOTPSTATE + default: + return 0, errors.New("Unknown ExternalEmailOtpState value: " + v) + } + return &result, nil +} +func SerializeExternalEmailOtpState(values []ExternalEmailOtpState) []string { + 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/external_group.go b/src/internal/connector/graph/betasdk/models/external_group.go new file mode 100644 index 000000000..c149ba708 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_group.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalGroup struct { + Entity + // The description property + description *string + // The displayName property + displayName *string +} +// NewExternalGroup instantiates a new externalGroup and sets the default values. +func NewExternalGroup()(*ExternalGroup) { + m := &ExternalGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateExternalGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroup(), nil +} +// GetDescription gets the description property value. The description property +func (m *ExternalGroup) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ExternalGroup) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExternalGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description property +func (m *ExternalGroup) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ExternalGroup) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_group_collection_response.go b/src/internal/connector/graph/betasdk/models/external_group_collection_response.go new file mode 100644 index 000000000..f5dc856b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroupCollectionResponse +type ExternalGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalGroupable +} +// NewExternalGroupCollectionResponse instantiates a new ExternalGroupCollectionResponse and sets the default values. +func NewExternalGroupCollectionResponse()(*ExternalGroupCollectionResponse) { + m := &ExternalGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroupable, len(val)) + for i, v := range val { + res[i] = v.(ExternalGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalGroupCollectionResponse) GetValue()([]ExternalGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalGroupCollectionResponse) SetValue(value []ExternalGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_group_collection_responseable.go new file mode 100644 index 000000000..f05558675 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroupCollectionResponseable +type ExternalGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalGroupable) + SetValue(value []ExternalGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_groupable.go b/src/internal/connector/graph/betasdk/models/external_groupable.go new file mode 100644 index 000000000..e6193ed67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_groupable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalGroupable +type ExternalGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_identities_policy.go b/src/internal/connector/graph/betasdk/models/external_identities_policy.go new file mode 100644 index 000000000..51c8dc4d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_identities_policy.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalIdentitiesPolicy +type ExternalIdentitiesPolicy struct { + PolicyBase + // Reserved for future use. + allowDeletedIdentitiesDataRemoval *bool + // Defines whether external users can leave the guest tenant. If set to false, self-service controls are disabled, and the admin of the guest tenant must manually remove the external user from the guest tenant. When the external user leaves the tenant, their data in the guest tenant is first soft-deleted then permanently deleted in 30 days. + allowExternalIdentitiesToLeave *bool +} +// NewExternalIdentitiesPolicy instantiates a new ExternalIdentitiesPolicy and sets the default values. +func NewExternalIdentitiesPolicy()(*ExternalIdentitiesPolicy) { + m := &ExternalIdentitiesPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.externalIdentitiesPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExternalIdentitiesPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalIdentitiesPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalIdentitiesPolicy(), nil +} +// GetAllowDeletedIdentitiesDataRemoval gets the allowDeletedIdentitiesDataRemoval property value. Reserved for future use. +func (m *ExternalIdentitiesPolicy) GetAllowDeletedIdentitiesDataRemoval()(*bool) { + return m.allowDeletedIdentitiesDataRemoval +} +// GetAllowExternalIdentitiesToLeave gets the allowExternalIdentitiesToLeave property value. Defines whether external users can leave the guest tenant. If set to false, self-service controls are disabled, and the admin of the guest tenant must manually remove the external user from the guest tenant. When the external user leaves the tenant, their data in the guest tenant is first soft-deleted then permanently deleted in 30 days. +func (m *ExternalIdentitiesPolicy) GetAllowExternalIdentitiesToLeave()(*bool) { + return m.allowExternalIdentitiesToLeave +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalIdentitiesPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["allowDeletedIdentitiesDataRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowDeletedIdentitiesDataRemoval(val) + } + return nil + } + res["allowExternalIdentitiesToLeave"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowExternalIdentitiesToLeave(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExternalIdentitiesPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowDeletedIdentitiesDataRemoval", m.GetAllowDeletedIdentitiesDataRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowExternalIdentitiesToLeave", m.GetAllowExternalIdentitiesToLeave()) + if err != nil { + return err + } + } + return nil +} +// SetAllowDeletedIdentitiesDataRemoval sets the allowDeletedIdentitiesDataRemoval property value. Reserved for future use. +func (m *ExternalIdentitiesPolicy) SetAllowDeletedIdentitiesDataRemoval(value *bool)() { + m.allowDeletedIdentitiesDataRemoval = value +} +// SetAllowExternalIdentitiesToLeave sets the allowExternalIdentitiesToLeave property value. Defines whether external users can leave the guest tenant. If set to false, self-service controls are disabled, and the admin of the guest tenant must manually remove the external user from the guest tenant. When the external user leaves the tenant, their data in the guest tenant is first soft-deleted then permanently deleted in 30 days. +func (m *ExternalIdentitiesPolicy) SetAllowExternalIdentitiesToLeave(value *bool)() { + m.allowExternalIdentitiesToLeave = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_response.go new file mode 100644 index 000000000..95e12a6c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalIdentitiesPolicyCollectionResponse +type ExternalIdentitiesPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalIdentitiesPolicyable +} +// NewExternalIdentitiesPolicyCollectionResponse instantiates a new ExternalIdentitiesPolicyCollectionResponse and sets the default values. +func NewExternalIdentitiesPolicyCollectionResponse()(*ExternalIdentitiesPolicyCollectionResponse) { + m := &ExternalIdentitiesPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalIdentitiesPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalIdentitiesPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalIdentitiesPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalIdentitiesPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalIdentitiesPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalIdentitiesPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ExternalIdentitiesPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalIdentitiesPolicyCollectionResponse) GetValue()([]ExternalIdentitiesPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalIdentitiesPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalIdentitiesPolicyCollectionResponse) SetValue(value []ExternalIdentitiesPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_responseable.go new file mode 100644 index 000000000..86191b6b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_identities_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalIdentitiesPolicyCollectionResponseable +type ExternalIdentitiesPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalIdentitiesPolicyable) + SetValue(value []ExternalIdentitiesPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_identities_policyable.go b/src/internal/connector/graph/betasdk/models/external_identities_policyable.go new file mode 100644 index 000000000..631aa0e70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_identities_policyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalIdentitiesPolicyable +type ExternalIdentitiesPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetAllowDeletedIdentitiesDataRemoval()(*bool) + GetAllowExternalIdentitiesToLeave()(*bool) + SetAllowDeletedIdentitiesDataRemoval(value *bool)() + SetAllowExternalIdentitiesToLeave(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_item.go b/src/internal/connector/graph/betasdk/models/external_item.go new file mode 100644 index 000000000..91adbec51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalItem struct { + Entity + // The acl property + acl []Aclable + // The content property + content ExternalItemContentable + // The properties property + properties Propertiesable +} +// NewExternalItem instantiates a new externalItem and sets the default values. +func NewExternalItem()(*ExternalItem) { + m := &ExternalItem{ + Entity: *NewEntity(), + } + return m +} +// CreateExternalItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItem(), nil +} +// GetAcl gets the acl property value. The acl property +func (m *ExternalItem) GetAcl()([]Aclable) { + return m.acl +} +// GetContent gets the content property value. The content property +func (m *ExternalItem) GetContent()(ExternalItemContentable) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAclFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Aclable, len(val)) + for i, v := range val { + res[i] = v.(Aclable) + } + m.SetAcl(res) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalItemContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(ExternalItemContentable)) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProperties(val.(Propertiesable)) + } + return nil + } + return res +} +// GetProperties gets the properties property value. The properties property +func (m *ExternalItem) GetProperties()(Propertiesable) { + return m.properties +} +// Serialize serializes information the current object +func (m *ExternalItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAcl() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAcl())) + for i, v := range m.GetAcl() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("acl", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("properties", m.GetProperties()) + if err != nil { + return err + } + } + return nil +} +// SetAcl sets the acl property value. The acl property +func (m *ExternalItem) SetAcl(value []Aclable)() { + m.acl = value +} +// SetContent sets the content property value. The content property +func (m *ExternalItem) SetContent(value ExternalItemContentable)() { + m.content = value +} +// SetProperties sets the properties property value. The properties property +func (m *ExternalItem) SetProperties(value Propertiesable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_item_collection_response.go b/src/internal/connector/graph/betasdk/models/external_item_collection_response.go new file mode 100644 index 000000000..9164ec40a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemCollectionResponse +type ExternalItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalItemable +} +// NewExternalItemCollectionResponse instantiates a new ExternalItemCollectionResponse and sets the default values. +func NewExternalItemCollectionResponse()(*ExternalItemCollectionResponse) { + m := &ExternalItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalItemable, len(val)) + for i, v := range val { + res[i] = v.(ExternalItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalItemCollectionResponse) GetValue()([]ExternalItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalItemCollectionResponse) SetValue(value []ExternalItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_item_collection_responseable.go new file mode 100644 index 000000000..4bda43987 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemCollectionResponseable +type ExternalItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalItemable) + SetValue(value []ExternalItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_item_content.go b/src/internal/connector/graph/betasdk/models/external_item_content.go new file mode 100644 index 000000000..7b73fd012 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item_content.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemContent +type ExternalItemContent 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 OdataType property + odataType *string + // The type property + type_escaped *ExternalItemContentType + // The value property + value *string +} +// NewExternalItemContent instantiates a new externalItemContent and sets the default values. +func NewExternalItemContent()(*ExternalItemContent) { + m := &ExternalItemContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExternalItemContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItemContent(), 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 *ExternalItemContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItemContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalItemContentType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*ExternalItemContentType)) + } + 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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExternalItemContent) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *ExternalItemContent) GetType()(*ExternalItemContentType) { + return m.type_escaped +} +// GetValue gets the value property value. The value property +func (m *ExternalItemContent) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalItemContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + 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 *ExternalItemContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExternalItemContent) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *ExternalItemContent) SetType(value *ExternalItemContentType)() { + m.type_escaped = value +} +// SetValue sets the value property value. The value property +func (m *ExternalItemContent) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_item_content_type.go b/src/internal/connector/graph/betasdk/models/external_item_content_type.go new file mode 100644 index 000000000..0dbdbeffb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item_content_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalItemContentType int + +const ( + TEXT_EXTERNALITEMCONTENTTYPE ExternalItemContentType = iota + HTML_EXTERNALITEMCONTENTTYPE + UNKNOWNFUTUREVALUE_EXTERNALITEMCONTENTTYPE +) + +func (i ExternalItemContentType) String() string { + return []string{"text", "html", "unknownFutureValue"}[i] +} +func ParseExternalItemContentType(v string) (interface{}, error) { + result := TEXT_EXTERNALITEMCONTENTTYPE + switch v { + case "text": + result = TEXT_EXTERNALITEMCONTENTTYPE + case "html": + result = HTML_EXTERNALITEMCONTENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXTERNALITEMCONTENTTYPE + default: + return 0, errors.New("Unknown ExternalItemContentType value: " + v) + } + return &result, nil +} +func SerializeExternalItemContentType(values []ExternalItemContentType) []string { + 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/external_item_contentable.go b/src/internal/connector/graph/betasdk/models/external_item_contentable.go new file mode 100644 index 000000000..c5446d120 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_item_contentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemContentable +type ExternalItemContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*ExternalItemContentType) + GetValue()(*string) + SetOdataType(value *string)() + SetType(value *ExternalItemContentType)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_itemable.go b/src/internal/connector/graph/betasdk/models/external_itemable.go new file mode 100644 index 000000000..b4a9d4d41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemable +type ExternalItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcl()([]Aclable) + GetContent()(ExternalItemContentable) + GetProperties()(Propertiesable) + SetAcl(value []Aclable)() + SetContent(value ExternalItemContentable)() + SetProperties(value Propertiesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_link.go b/src/internal/connector/graph/betasdk/models/external_link.go new file mode 100644 index 000000000..ce1a61851 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_link.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalLink +type ExternalLink 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 URL of the link. + href *string + // The OdataType property + odataType *string +} +// NewExternalLink instantiates a new externalLink and sets the default values. +func NewExternalLink()(*ExternalLink) { + m := &ExternalLink{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExternalLinkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalLinkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalLink(), 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 *ExternalLink) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalLink) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["href"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHref(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 + } + return res +} +// GetHref gets the href property value. The URL of the link. +func (m *ExternalLink) GetHref()(*string) { + return m.href +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExternalLink) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ExternalLink) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("href", m.GetHref()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ExternalLink) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHref sets the href property value. The URL of the link. +func (m *ExternalLink) SetHref(value *string)() { + m.href = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExternalLink) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_linkable.go b/src/internal/connector/graph/betasdk/models/external_linkable.go new file mode 100644 index 000000000..5e7ce6cf2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_linkable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalLinkable +type ExternalLinkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHref()(*string) + GetOdataType()(*string) + SetHref(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registrant.go b/src/internal/connector/graph/betasdk/models/external_meeting_registrant.go new file mode 100644 index 000000000..d15786b0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registrant.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistrant +type ExternalMeetingRegistrant struct { + MeetingRegistrantBase + // The tenant ID of this registrant if in Azure Active Directory. + tenantId *string + // The user ID of this registrant if in Azure Active Directory. + userId *string +} +// NewExternalMeetingRegistrant instantiates a new ExternalMeetingRegistrant and sets the default values. +func NewExternalMeetingRegistrant()(*ExternalMeetingRegistrant) { + m := &ExternalMeetingRegistrant{ + MeetingRegistrantBase: *NewMeetingRegistrantBase(), + } + odataTypeValue := "#microsoft.graph.externalMeetingRegistrant"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExternalMeetingRegistrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalMeetingRegistrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalMeetingRegistrant(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalMeetingRegistrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingRegistrantBase.GetFieldDeserializers() + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. The tenant ID of this registrant if in Azure Active Directory. +func (m *ExternalMeetingRegistrant) GetTenantId()(*string) { + return m.tenantId +} +// GetUserId gets the userId property value. The user ID of this registrant if in Azure Active Directory. +func (m *ExternalMeetingRegistrant) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *ExternalMeetingRegistrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingRegistrantBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetTenantId sets the tenantId property value. The tenant ID of this registrant if in Azure Active Directory. +func (m *ExternalMeetingRegistrant) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUserId sets the userId property value. The user ID of this registrant if in Azure Active Directory. +func (m *ExternalMeetingRegistrant) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_response.go b/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_response.go new file mode 100644 index 000000000..7b56d631d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistrantCollectionResponse +type ExternalMeetingRegistrantCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ExternalMeetingRegistrantable +} +// NewExternalMeetingRegistrantCollectionResponse instantiates a new ExternalMeetingRegistrantCollectionResponse and sets the default values. +func NewExternalMeetingRegistrantCollectionResponse()(*ExternalMeetingRegistrantCollectionResponse) { + m := &ExternalMeetingRegistrantCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalMeetingRegistrantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalMeetingRegistrantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalMeetingRegistrantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalMeetingRegistrantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalMeetingRegistrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalMeetingRegistrantable, len(val)) + for i, v := range val { + res[i] = v.(ExternalMeetingRegistrantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalMeetingRegistrantCollectionResponse) GetValue()([]ExternalMeetingRegistrantable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalMeetingRegistrantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalMeetingRegistrantCollectionResponse) SetValue(value []ExternalMeetingRegistrantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_responseable.go new file mode 100644 index 000000000..ed7b34096 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registrant_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistrantCollectionResponseable +type ExternalMeetingRegistrantCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalMeetingRegistrantable) + SetValue(value []ExternalMeetingRegistrantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registrantable.go b/src/internal/connector/graph/betasdk/models/external_meeting_registrantable.go new file mode 100644 index 000000000..78ecec733 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registrantable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistrantable +type ExternalMeetingRegistrantable interface { + MeetingRegistrantBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTenantId()(*string) + GetUserId()(*string) + SetTenantId(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registration.go b/src/internal/connector/graph/betasdk/models/external_meeting_registration.go new file mode 100644 index 000000000..4287223e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistration +type ExternalMeetingRegistration struct { + MeetingRegistrationBase +} +// NewExternalMeetingRegistration instantiates a new ExternalMeetingRegistration and sets the default values. +func NewExternalMeetingRegistration()(*ExternalMeetingRegistration) { + m := &ExternalMeetingRegistration{ + MeetingRegistrationBase: *NewMeetingRegistrationBase(), + } + odataTypeValue := "#microsoft.graph.externalMeetingRegistration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExternalMeetingRegistrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalMeetingRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalMeetingRegistration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalMeetingRegistration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingRegistrationBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ExternalMeetingRegistration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingRegistrationBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/external_meeting_registrationable.go b/src/internal/connector/graph/betasdk/models/external_meeting_registrationable.go new file mode 100644 index 000000000..81eb4556d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_meeting_registrationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalMeetingRegistrationable +type ExternalMeetingRegistrationable interface { + MeetingRegistrationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/external_sponsors.go b/src/internal/connector/graph/betasdk/models/external_sponsors.go new file mode 100644 index 000000000..3dbe53889 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_sponsors.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalSponsors +type ExternalSponsors struct { + UserSet +} +// NewExternalSponsors instantiates a new ExternalSponsors and sets the default values. +func NewExternalSponsors()(*ExternalSponsors) { + m := &ExternalSponsors{ + UserSet: *NewUserSet(), + } + odataTypeValue := "#microsoft.graph.externalSponsors"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateExternalSponsorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalSponsorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalSponsors(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalSponsors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserSet.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ExternalSponsors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserSet.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/external_sponsorsable.go b/src/internal/connector/graph/betasdk/models/external_sponsorsable.go new file mode 100644 index 000000000..178c331c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/external_sponsorsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalSponsorsable +type ExternalSponsorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserSetable +} diff --git a/src/internal/connector/graph/betasdk/models/externalable.go b/src/internal/connector/graph/betasdk/models/externalable.go new file mode 100644 index 000000000..3655a2068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Externalable +type Externalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnections()([]ExternalConnectionable) + SetConnections(value []ExternalConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/access_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/access_type.go new file mode 100644 index 000000000..d68efb349 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/access_type.go @@ -0,0 +1,37 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AccessType int + +const ( + GRANT_ACCESSTYPE AccessType = iota + DENY_ACCESSTYPE + UNKNOWNFUTUREVALUE_ACCESSTYPE +) + +func (i AccessType) String() string { + return []string{"grant", "deny", "unknownFutureValue"}[i] +} +func ParseAccessType(v string) (interface{}, error) { + result := GRANT_ACCESSTYPE + switch v { + case "grant": + result = GRANT_ACCESSTYPE + case "deny": + result = DENY_ACCESSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACCESSTYPE + default: + return 0, errors.New("Unknown AccessType value: " + v) + } + return &result, nil +} +func SerializeAccessType(values []AccessType) []string { + 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/externalconnectors/acl.go b/src/internal/connector/graph/betasdk/models/externalconnectors/acl.go new file mode 100644 index 000000000..f316fdba3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/acl.go @@ -0,0 +1,178 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Acl +type Acl struct { + // The accessType property + accessType *AccessType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The source of identity. Possible values are azureActiveDirectory or external. + identitySource *IdentitySourceType + // The OdataType property + odataType *string + // The type property + type_escaped *AclType + // The unique identifer of the identity. In case of Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. In case of external groups value is set to the ID of the externalGroup. + value *string +} +// NewAcl instantiates a new acl and sets the default values. +func NewAcl()(*Acl) { + m := &Acl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAclFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAclFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAcl(), nil +} +// GetAccessType gets the accessType property value. The accessType property +func (m *Acl) GetAccessType()(*AccessType) { + return m.accessType +} +// 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 *Acl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Acl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAccessType) + if err != nil { + return err + } + if val != nil { + m.SetAccessType(val.(*AccessType)) + } + return nil + } + res["identitySource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentitySourceType) + if err != nil { + return err + } + if val != nil { + m.SetIdentitySource(val.(*IdentitySourceType)) + } + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAclType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*AclType)) + } + 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 +} +// GetIdentitySource gets the identitySource property value. The source of identity. Possible values are azureActiveDirectory or external. +func (m *Acl) GetIdentitySource()(*IdentitySourceType) { + return m.identitySource +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Acl) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *Acl) GetType()(*AclType) { + return m.type_escaped +} +// GetValue gets the value property value. The unique identifer of the identity. In case of Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. In case of external groups value is set to the ID of the externalGroup. +func (m *Acl) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *Acl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessType() != nil { + cast := (*m.GetAccessType()).String() + err := writer.WriteStringValue("accessType", &cast) + if err != nil { + return err + } + } + if m.GetIdentitySource() != nil { + cast := (*m.GetIdentitySource()).String() + err := writer.WriteStringValue("identitySource", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + 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 +} +// SetAccessType sets the accessType property value. The accessType property +func (m *Acl) SetAccessType(value *AccessType)() { + m.accessType = value +} +// 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 *Acl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdentitySource sets the identitySource property value. The source of identity. Possible values are azureActiveDirectory or external. +func (m *Acl) SetIdentitySource(value *IdentitySourceType)() { + m.identitySource = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Acl) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *Acl) SetType(value *AclType)() { + m.type_escaped = value +} +// SetValue sets the value property value. The unique identifer of the identity. In case of Azure Active Directory identities, value is set to the object identifier of the user, group or tenant for types user, group and everyone (and everyoneExceptGuests) respectively. In case of external groups value is set to the ID of the externalGroup. +func (m *Acl) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_response.go new file mode 100644 index 000000000..e2882e5fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AclCollectionResponse +type AclCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Aclable +} +// NewAclCollectionResponse instantiates a new AclCollectionResponse and sets the default values. +func NewAclCollectionResponse()(*AclCollectionResponse) { + m := &AclCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAclCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAclCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAclCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AclCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAclFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Aclable, len(val)) + for i, v := range val { + res[i] = v.(Aclable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AclCollectionResponse) GetValue()([]Aclable) { + return m.value +} +// Serialize serializes information the current object +func (m *AclCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AclCollectionResponse) SetValue(value []Aclable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_responseable.go new file mode 100644 index 000000000..fceb049c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AclCollectionResponseable +type AclCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Aclable) + SetValue(value []Aclable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/acl_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_type.go new file mode 100644 index 000000000..26d0764ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/acl_type.go @@ -0,0 +1,46 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AclType int + +const ( + USER_ACLTYPE AclType = iota + GROUP_ACLTYPE + EVERYONE_ACLTYPE + EVERYONEEXCEPTGUESTS_ACLTYPE + EXTERNALGROUP_ACLTYPE + UNKNOWNFUTUREVALUE_ACLTYPE +) + +func (i AclType) String() string { + return []string{"user", "group", "everyone", "everyoneExceptGuests", "externalGroup", "unknownFutureValue"}[i] +} +func ParseAclType(v string) (interface{}, error) { + result := USER_ACLTYPE + switch v { + case "user": + result = USER_ACLTYPE + case "group": + result = GROUP_ACLTYPE + case "everyone": + result = EVERYONE_ACLTYPE + case "everyoneExceptGuests": + result = EVERYONEEXCEPTGUESTS_ACLTYPE + case "externalGroup": + result = EXTERNALGROUP_ACLTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACLTYPE + default: + return 0, errors.New("Unknown AclType value: " + v) + } + return &result, nil +} +func SerializeAclType(values []AclType) []string { + 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/externalconnectors/aclable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/aclable.go new file mode 100644 index 000000000..752a4e998 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/aclable.go @@ -0,0 +1,21 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Aclable +type Aclable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessType()(*AccessType) + GetIdentitySource()(*IdentitySourceType) + GetOdataType()(*string) + GetType()(*AclType) + GetValue()(*string) + SetAccessType(value *AccessType)() + SetIdentitySource(value *IdentitySourceType)() + SetOdataType(value *string)() + SetType(value *AclType)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settings.go b/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settings.go new file mode 100644 index 000000000..500fd6c93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settings.go @@ -0,0 +1,105 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivitySettings +type ActivitySettings 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 OdataType property + odataType *string + // Specifies configurations to identify an externalItem based on a shared URL. + urlToItemResolvers []UrlToItemResolverBaseable +} +// NewActivitySettings instantiates a new activitySettings and sets the default values. +func NewActivitySettings()(*ActivitySettings) { + m := &ActivitySettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateActivitySettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateActivitySettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewActivitySettings(), 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 *ActivitySettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ActivitySettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["urlToItemResolvers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUrlToItemResolverBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UrlToItemResolverBaseable, len(val)) + for i, v := range val { + res[i] = v.(UrlToItemResolverBaseable) + } + m.SetUrlToItemResolvers(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ActivitySettings) GetOdataType()(*string) { + return m.odataType +} +// GetUrlToItemResolvers gets the urlToItemResolvers property value. Specifies configurations to identify an externalItem based on a shared URL. +func (m *ActivitySettings) GetUrlToItemResolvers()([]UrlToItemResolverBaseable) { + return m.urlToItemResolvers +} +// Serialize serializes information the current object +func (m *ActivitySettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetUrlToItemResolvers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUrlToItemResolvers())) + for i, v := range m.GetUrlToItemResolvers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("urlToItemResolvers", 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 *ActivitySettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ActivitySettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrlToItemResolvers sets the urlToItemResolvers property value. Specifies configurations to identify an externalItem based on a shared URL. +func (m *ActivitySettings) SetUrlToItemResolvers(value []UrlToItemResolverBaseable)() { + m.urlToItemResolvers = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settingsable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settingsable.go new file mode 100644 index 000000000..a6f89ae68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/activity_settingsable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ActivitySettingsable +type ActivitySettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetUrlToItemResolvers()([]UrlToItemResolverBaseable) + SetOdataType(value *string)() + SetUrlToItemResolvers(value []UrlToItemResolverBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settings.go b/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settings.go new file mode 100644 index 000000000..1a234ed2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settings.go @@ -0,0 +1,105 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceSettings +type ComplianceSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of two eDiscovery result templates per connection. + eDiscoveryResultTemplates []DisplayTemplateable + // The OdataType property + odataType *string +} +// NewComplianceSettings instantiates a new complianceSettings and sets the default values. +func NewComplianceSettings()(*ComplianceSettings) { + m := &ComplianceSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateComplianceSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateComplianceSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewComplianceSettings(), 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 *ComplianceSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEDiscoveryResultTemplates gets the eDiscoveryResultTemplates property value. Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of two eDiscovery result templates per connection. +func (m *ComplianceSettings) GetEDiscoveryResultTemplates()([]DisplayTemplateable) { + return m.eDiscoveryResultTemplates +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ComplianceSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["eDiscoveryResultTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DisplayTemplateable) + } + m.SetEDiscoveryResultTemplates(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ComplianceSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ComplianceSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEDiscoveryResultTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEDiscoveryResultTemplates())) + for i, v := range m.GetEDiscoveryResultTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("eDiscoveryResultTemplates", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ComplianceSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEDiscoveryResultTemplates sets the eDiscoveryResultTemplates property value. Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of two eDiscovery result templates per connection. +func (m *ComplianceSettings) SetEDiscoveryResultTemplates(value []DisplayTemplateable)() { + m.eDiscoveryResultTemplates = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ComplianceSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settingsable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settingsable.go new file mode 100644 index 000000000..3d5f98000 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/compliance_settingsable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ComplianceSettingsable +type ComplianceSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEDiscoveryResultTemplates()([]DisplayTemplateable) + GetOdataType()(*string) + SetEDiscoveryResultTemplates(value []DisplayTemplateable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/configuration.go b/src/internal/connector/graph/betasdk/models/externalconnectors/configuration.go new file mode 100644 index 000000000..858c4d74b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/configuration.go @@ -0,0 +1,101 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Configuration +type Configuration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A collection of application IDs for registered Azure Active Directory apps that are allowed to manage the externalConnection and to index content in the externalConnection. + authorizedAppIds []string + // The OdataType property + odataType *string +} +// NewConfiguration instantiates a new configuration and sets the default values. +func NewConfiguration()(*Configuration) { + m := &Configuration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConfiguration(), 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 *Configuration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthorizedAppIds gets the authorizedAppIds property value. A collection of application IDs for registered Azure Active Directory apps that are allowed to manage the externalConnection and to index content in the externalConnection. +func (m *Configuration) GetAuthorizedAppIds()([]string) { + return m.authorizedAppIds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Configuration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authorizedAppIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAuthorizedAppIds(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Configuration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Configuration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAuthorizedAppIds() != nil { + err := writer.WriteCollectionOfStringValues("authorizedAppIds", m.GetAuthorizedAppIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Configuration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthorizedAppIds sets the authorizedAppIds property value. A collection of application IDs for registered Azure Active Directory apps that are allowed to manage the externalConnection and to index content in the externalConnection. +func (m *Configuration) SetAuthorizedAppIds(value []string)() { + m.authorizedAppIds = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Configuration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/configurationable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/configurationable.go new file mode 100644 index 000000000..755f4cfb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/configurationable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Configurationable +type Configurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthorizedAppIds()([]string) + GetOdataType()(*string) + SetAuthorizedAppIds(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation.go new file mode 100644 index 000000000..0d69842e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation.go @@ -0,0 +1,88 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionOperation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionOperation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // If status is failed, provides more information about the error that caused the failure. + error ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable + // Indicates the status of the asynchronous operation. Possible values are: unspecified, inprogress, completed, failed. + status *ConnectionOperationStatus +} +// NewConnectionOperation instantiates a new connectionOperation and sets the default values. +func NewConnectionOperation()(*ConnectionOperation) { + m := &ConnectionOperation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateConnectionOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionOperation(), nil +} +// GetError gets the error property value. If status is failed, provides more information about the error that caused the failure. +func (m *ConnectionOperation) GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreatePublicErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ConnectionOperationStatus)) + } + return nil + } + return res +} +// GetStatus gets the status property value. Indicates the status of the asynchronous operation. Possible values are: unspecified, inprogress, completed, failed. +func (m *ConnectionOperation) GetStatus()(*ConnectionOperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *ConnectionOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetError sets the error property value. If status is failed, provides more information about the error that caused the failure. +func (m *ConnectionOperation) SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() { + m.error = value +} +// SetStatus sets the status property value. Indicates the status of the asynchronous operation. Possible values are: unspecified, inprogress, completed, failed. +func (m *ConnectionOperation) SetStatus(value *ConnectionOperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_response.go new file mode 100644 index 000000000..c78ad1149 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionOperationCollectionResponse +type ConnectionOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ConnectionOperationable +} +// NewConnectionOperationCollectionResponse instantiates a new ConnectionOperationCollectionResponse and sets the default values. +func NewConnectionOperationCollectionResponse()(*ConnectionOperationCollectionResponse) { + m := &ConnectionOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConnectionOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectionOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectionOperationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectionOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConnectionOperationCollectionResponse) GetValue()([]ConnectionOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConnectionOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConnectionOperationCollectionResponse) SetValue(value []ConnectionOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_responseable.go new file mode 100644 index 000000000..04b3675db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionOperationCollectionResponseable +type ConnectionOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConnectionOperationable) + SetValue(value []ConnectionOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_status.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_status.go new file mode 100644 index 000000000..d023e751b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operation_status.go @@ -0,0 +1,43 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionOperationStatus int + +const ( + UNSPECIFIED_CONNECTIONOPERATIONSTATUS ConnectionOperationStatus = iota + INPROGRESS_CONNECTIONOPERATIONSTATUS + COMPLETED_CONNECTIONOPERATIONSTATUS + FAILED_CONNECTIONOPERATIONSTATUS + UNKNOWNFUTUREVALUE_CONNECTIONOPERATIONSTATUS +) + +func (i ConnectionOperationStatus) String() string { + return []string{"unspecified", "inprogress", "completed", "failed", "unknownFutureValue"}[i] +} +func ParseConnectionOperationStatus(v string) (interface{}, error) { + result := UNSPECIFIED_CONNECTIONOPERATIONSTATUS + switch v { + case "unspecified": + result = UNSPECIFIED_CONNECTIONOPERATIONSTATUS + case "inprogress": + result = INPROGRESS_CONNECTIONOPERATIONSTATUS + case "completed": + result = COMPLETED_CONNECTIONOPERATIONSTATUS + case "failed": + result = FAILED_CONNECTIONOPERATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTIONOPERATIONSTATUS + default: + return 0, errors.New("Unknown ConnectionOperationStatus value: " + v) + } + return &result, nil +} +func SerializeConnectionOperationStatus(values []ConnectionOperationStatus) []string { + 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/externalconnectors/connection_operationable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operationable.go new file mode 100644 index 000000000..9063fb157 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_operationable.go @@ -0,0 +1,16 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionOperationable +type ConnectionOperationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) + GetStatus()(*ConnectionOperationStatus) + SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() + SetStatus(value *ConnectionOperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quota.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quota.go new file mode 100644 index 000000000..78e43570d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quota.go @@ -0,0 +1,61 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionQuota +type ConnectionQuota struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The minimum of two values, one representing the items remaining in the connection and the other remaining items at tenant-level. The following equation represents the formula used to calculate the minimum number: min ({max capacity in the connection} – {number of items in the connection}, {tenant quota} – {number of items indexed in all connections}). If the connection is not monetized, such as in a preview connector or preview content experience, then this property is simply the number of remaining items in the connection. + itemsRemaining *int64 +} +// NewConnectionQuota instantiates a new connectionQuota and sets the default values. +func NewConnectionQuota()(*ConnectionQuota) { + m := &ConnectionQuota{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateConnectionQuotaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConnectionQuotaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConnectionQuota(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConnectionQuota) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["itemsRemaining"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetItemsRemaining(val) + } + return nil + } + return res +} +// GetItemsRemaining gets the itemsRemaining property value. The minimum of two values, one representing the items remaining in the connection and the other remaining items at tenant-level. The following equation represents the formula used to calculate the minimum number: min ({max capacity in the connection} – {number of items in the connection}, {tenant quota} – {number of items indexed in all connections}). If the connection is not monetized, such as in a preview connector or preview content experience, then this property is simply the number of remaining items in the connection. +func (m *ConnectionQuota) GetItemsRemaining()(*int64) { + return m.itemsRemaining +} +// Serialize serializes information the current object +func (m *ConnectionQuota) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("itemsRemaining", m.GetItemsRemaining()) + if err != nil { + return err + } + } + return nil +} +// SetItemsRemaining sets the itemsRemaining property value. The minimum of two values, one representing the items remaining in the connection and the other remaining items at tenant-level. The following equation represents the formula used to calculate the minimum number: min ({max capacity in the connection} – {number of items in the connection}, {tenant quota} – {number of items indexed in all connections}). If the connection is not monetized, such as in a preview connector or preview content experience, then this property is simply the number of remaining items in the connection. +func (m *ConnectionQuota) SetItemsRemaining(value *int64)() { + m.itemsRemaining = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quotaable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quotaable.go new file mode 100644 index 000000000..d1be9144e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_quotaable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConnectionQuotaable +type ConnectionQuotaable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItemsRemaining()(*int64) + SetItemsRemaining(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/connection_state.go b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_state.go new file mode 100644 index 000000000..b3514d997 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/connection_state.go @@ -0,0 +1,43 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConnectionState int + +const ( + DRAFT_CONNECTIONSTATE ConnectionState = iota + READY_CONNECTIONSTATE + OBSOLETE_CONNECTIONSTATE + LIMITEXCEEDED_CONNECTIONSTATE + UNKNOWNFUTUREVALUE_CONNECTIONSTATE +) + +func (i ConnectionState) String() string { + return []string{"draft", "ready", "obsolete", "limitExceeded", "unknownFutureValue"}[i] +} +func ParseConnectionState(v string) (interface{}, error) { + result := DRAFT_CONNECTIONSTATE + switch v { + case "draft": + result = DRAFT_CONNECTIONSTATE + case "ready": + result = READY_CONNECTIONSTATE + case "obsolete": + result = OBSOLETE_CONNECTIONSTATE + case "limitExceeded": + result = LIMITEXCEEDED_CONNECTIONSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONNECTIONSTATE + default: + return 0, errors.New("Unknown ConnectionState value: " + v) + } + return &result, nil +} +func SerializeConnectionState(values []ConnectionState) []string { + 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/externalconnectors/content_experience_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/content_experience_type.go new file mode 100644 index 000000000..a81304a37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/content_experience_type.go @@ -0,0 +1,37 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ContentExperienceType int + +const ( + SEARCH_CONTENTEXPERIENCETYPE ContentExperienceType = iota + COMPLIANCE_CONTENTEXPERIENCETYPE + UNKNOWNFUTUREVALUE_CONTENTEXPERIENCETYPE +) + +func (i ContentExperienceType) String() string { + return []string{"search", "compliance", "unknownFutureValue"}[i] +} +func ParseContentExperienceType(v string) (interface{}, error) { + result := SEARCH_CONTENTEXPERIENCETYPE + switch v { + case "search": + result = SEARCH_CONTENTEXPERIENCETYPE + case "compliance": + result = COMPLIANCE_CONTENTEXPERIENCETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CONTENTEXPERIENCETYPE + default: + return 0, errors.New("Unknown ContentExperienceType value: " + v) + } + return &result, nil +} +func SerializeContentExperienceType(values []ContentExperienceType) []string { + 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/externalconnectors/display_template.go b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template.go new file mode 100644 index 000000000..bb815484d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template.go @@ -0,0 +1,184 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DisplayTemplate +type DisplayTemplate 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 text identifier for the display template; for example, contosoTickets. Maximum 16 characters. Only alphanumeric characters allowed. + id *string + // The layout property + layout ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable + // The OdataType property + odataType *string + // Defines the priority of a display template. A display template with priority 1 is evaluated before a template with priority 4. Gaps in priority values are supported. Must be positive value. + priority *int32 + // Specifies additional rules for selecting this display template based on the item schema. Optional. + rules []PropertyRuleable +} +// NewDisplayTemplate instantiates a new displayTemplate and sets the default values. +func NewDisplayTemplate()(*DisplayTemplate) { + m := &DisplayTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateDisplayTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDisplayTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDisplayTemplate(), 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 *DisplayTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DisplayTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["layout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateJsonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLayout(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable)) + } + 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["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PropertyRuleable, len(val)) + for i, v := range val { + res[i] = v.(PropertyRuleable) + } + m.SetRules(res) + } + return nil + } + return res +} +// GetId gets the id property value. The text identifier for the display template; for example, contosoTickets. Maximum 16 characters. Only alphanumeric characters allowed. +func (m *DisplayTemplate) GetId()(*string) { + return m.id +} +// GetLayout gets the layout property value. The layout property +func (m *DisplayTemplate) GetLayout()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable) { + return m.layout +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *DisplayTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetPriority gets the priority property value. Defines the priority of a display template. A display template with priority 1 is evaluated before a template with priority 4. Gaps in priority values are supported. Must be positive value. +func (m *DisplayTemplate) GetPriority()(*int32) { + return m.priority +} +// GetRules gets the rules property value. Specifies additional rules for selecting this display template based on the item schema. Optional. +func (m *DisplayTemplate) GetRules()([]PropertyRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *DisplayTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("layout", m.GetLayout()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("rules", 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 *DisplayTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The text identifier for the display template; for example, contosoTickets. Maximum 16 characters. Only alphanumeric characters allowed. +func (m *DisplayTemplate) SetId(value *string)() { + m.id = value +} +// SetLayout sets the layout property value. The layout property +func (m *DisplayTemplate) SetLayout(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable)() { + m.layout = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *DisplayTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetPriority sets the priority property value. Defines the priority of a display template. A display template with priority 1 is evaluated before a template with priority 4. Gaps in priority values are supported. Must be positive value. +func (m *DisplayTemplate) SetPriority(value *int32)() { + m.priority = value +} +// SetRules sets the rules property value. Specifies additional rules for selecting this display template based on the item schema. Optional. +func (m *DisplayTemplate) SetRules(value []PropertyRuleable)() { + m.rules = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_response.go new file mode 100644 index 000000000..6b0ffadac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DisplayTemplateCollectionResponse +type DisplayTemplateCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DisplayTemplateable +} +// NewDisplayTemplateCollectionResponse instantiates a new DisplayTemplateCollectionResponse and sets the default values. +func NewDisplayTemplateCollectionResponse()(*DisplayTemplateCollectionResponse) { + m := &DisplayTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDisplayTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDisplayTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDisplayTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DisplayTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DisplayTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DisplayTemplateCollectionResponse) GetValue()([]DisplayTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *DisplayTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DisplayTemplateCollectionResponse) SetValue(value []DisplayTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_responseable.go new file mode 100644 index 000000000..812b5934c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/display_template_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DisplayTemplateCollectionResponseable +type DisplayTemplateCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DisplayTemplateable) + SetValue(value []DisplayTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/display_templateable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/display_templateable.go new file mode 100644 index 000000000..67489c03c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/display_templateable.go @@ -0,0 +1,22 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DisplayTemplateable +type DisplayTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetLayout()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable) + GetOdataType()(*string) + GetPriority()(*int32) + GetRules()([]PropertyRuleable) + SetId(value *string)() + SetLayout(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Jsonable)() + SetOdataType(value *string)() + SetPriority(value *int32)() + SetRules(value []PropertyRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity.go new file mode 100644 index 000000000..99712b389 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity.go @@ -0,0 +1,133 @@ +package externalconnectors + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivity provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalActivity struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Represents an identity used to identify who is responsible for the activity. + performedBy Identityable + // When the particular activity occurred. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type property + type_escaped *ExternalActivityType +} +// NewExternalActivity instantiates a new externalActivity and sets the default values. +func NewExternalActivity()(*ExternalActivity) { + m := &ExternalActivity{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateExternalActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.externalConnectors.externalActivityResult": + return NewExternalActivityResult(), nil + } + } + } + } + return NewExternalActivity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["performedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPerformedBy(val.(Identityable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalActivityType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*ExternalActivityType)) + } + return nil + } + return res +} +// GetPerformedBy gets the performedBy property value. Represents an identity used to identify who is responsible for the activity. +func (m *ExternalActivity) GetPerformedBy()(Identityable) { + return m.performedBy +} +// GetStartDateTime gets the startDateTime property value. When the particular activity occurred. +func (m *ExternalActivity) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetType gets the type property value. The type property +func (m *ExternalActivity) GetType()(*ExternalActivityType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ExternalActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("performedBy", m.GetPerformedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetPerformedBy sets the performedBy property value. Represents an identity used to identify who is responsible for the activity. +func (m *ExternalActivity) SetPerformedBy(value Identityable)() { + m.performedBy = value +} +// SetStartDateTime sets the startDateTime property value. When the particular activity occurred. +func (m *ExternalActivity) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetType sets the type property value. The type property +func (m *ExternalActivity) SetType(value *ExternalActivityType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_response.go new file mode 100644 index 000000000..d3052adbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityCollectionResponse +type ExternalActivityCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ExternalActivityable +} +// NewExternalActivityCollectionResponse instantiates a new ExternalActivityCollectionResponse and sets the default values. +func NewExternalActivityCollectionResponse()(*ExternalActivityCollectionResponse) { + m := &ExternalActivityCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalActivityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalActivityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalActivityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalActivityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalActivityable, len(val)) + for i, v := range val { + res[i] = v.(ExternalActivityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalActivityCollectionResponse) GetValue()([]ExternalActivityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalActivityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalActivityCollectionResponse) SetValue(value []ExternalActivityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_responseable.go new file mode 100644 index 000000000..0c3b39455 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityCollectionResponseable +type ExternalActivityCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalActivityable) + SetValue(value []ExternalActivityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result.go new file mode 100644 index 000000000..a1d4fd13c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result.go @@ -0,0 +1,61 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityResult +type ExternalActivityResult struct { + ExternalActivity + // Error information explaining failure to process external activity. + error ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable +} +// NewExternalActivityResult instantiates a new ExternalActivityResult and sets the default values. +func NewExternalActivityResult()(*ExternalActivityResult) { + m := &ExternalActivityResult{ + ExternalActivity: *NewExternalActivity(), + } + return m +} +// CreateExternalActivityResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalActivityResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalActivityResult(), nil +} +// GetError gets the error property value. Error information explaining failure to process external activity. +func (m *ExternalActivityResult) GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalActivityResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ExternalActivity.GetFieldDeserializers() + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreatePublicErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ExternalActivityResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ExternalActivity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + return nil +} +// SetError sets the error property value. Error information explaining failure to process external activity. +func (m *ExternalActivityResult) SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() { + m.error = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_response.go new file mode 100644 index 000000000..2d4ff83c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityResultCollectionResponse +type ExternalActivityResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ExternalActivityResultable +} +// NewExternalActivityResultCollectionResponse instantiates a new ExternalActivityResultCollectionResponse and sets the default values. +func NewExternalActivityResultCollectionResponse()(*ExternalActivityResultCollectionResponse) { + m := &ExternalActivityResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalActivityResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalActivityResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalActivityResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalActivityResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalActivityResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalActivityResultable, len(val)) + for i, v := range val { + res[i] = v.(ExternalActivityResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalActivityResultCollectionResponse) GetValue()([]ExternalActivityResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalActivityResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalActivityResultCollectionResponse) SetValue(value []ExternalActivityResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_responseable.go new file mode 100644 index 000000000..4bba52843 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_result_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityResultCollectionResponseable +type ExternalActivityResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalActivityResultable) + SetValue(value []ExternalActivityResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_resultable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_resultable.go new file mode 100644 index 000000000..40de0dac3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_resultable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityResultable +type ExternalActivityResultable interface { + ExternalActivityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) + SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_type.go new file mode 100644 index 000000000..ba4f88d34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activity_type.go @@ -0,0 +1,43 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalActivityType int + +const ( + VIEWED_EXTERNALACTIVITYTYPE ExternalActivityType = iota + MODIFIED_EXTERNALACTIVITYTYPE + CREATED_EXTERNALACTIVITYTYPE + COMMENTED_EXTERNALACTIVITYTYPE + UNKNOWNFUTUREVALUE_EXTERNALACTIVITYTYPE +) + +func (i ExternalActivityType) String() string { + return []string{"viewed", "modified", "created", "commented", "unknownFutureValue"}[i] +} +func ParseExternalActivityType(v string) (interface{}, error) { + result := VIEWED_EXTERNALACTIVITYTYPE + switch v { + case "viewed": + result = VIEWED_EXTERNALACTIVITYTYPE + case "modified": + result = MODIFIED_EXTERNALACTIVITYTYPE + case "created": + result = CREATED_EXTERNALACTIVITYTYPE + case "commented": + result = COMMENTED_EXTERNALACTIVITYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXTERNALACTIVITYTYPE + default: + return 0, errors.New("Unknown ExternalActivityType value: " + v) + } + return &result, nil +} +func SerializeExternalActivityType(values []ExternalActivityType) []string { + 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/externalconnectors/external_activityable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activityable.go new file mode 100644 index 000000000..5857806ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_activityable.go @@ -0,0 +1,19 @@ +package externalconnectors + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalActivityable +type ExternalActivityable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPerformedBy()(Identityable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetType()(*ExternalActivityType) + SetPerformedBy(value Identityable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetType(value *ExternalActivityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection.go new file mode 100644 index 000000000..971c5b78a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection.go @@ -0,0 +1,444 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalConnection +type ExternalConnection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Collects configurable settings related to activities involving connector content. + activitySettings ActivitySettingsable + // The settings required for the connection to participate in eDiscovery, such as the display templates for eDiscovery results. + complianceSettings ComplianceSettingsable + // Specifies additional application IDs that are allowed to manage the connection and to index content in the connection. Optional. + configuration Configurationable + // The Teams App ID. Optional. + connectorId *string + // Description of the connection displayed in the Microsoft 365 admin center. Optional. + description *string + // The list of content experiences the connection will participate in. Possible values are search and compliance. + enabledContentExperiences *ContentExperienceType + // The groups property + groups []ExternalGroupable + // The number of items ingested into a connection. This value is refreshed every 15 minutes. If the connection state is draft, then ingestedItemsCount will be null. + ingestedItemsCount *int64 + // The items property + items []ExternalItemable + // The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters. Required. + name *string + // The operations property + operations []ConnectionOperationable + // The quota property + quota ConnectionQuotaable + // The schema property + schema Schemaable + // The settings configuring the search experience for content in this connection, such as the display templates for search results. + searchSettings SearchSettingsable + // Indicates the current state of the connection. Possible values are draft, ready, obsolete, and limitExceeded. Required. + state *ConnectionState +} +// NewExternalConnection instantiates a new ExternalConnection and sets the default values. +func NewExternalConnection()(*ExternalConnection) { + m := &ExternalConnection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateExternalConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalConnection(), nil +} +// GetActivitySettings gets the activitySettings property value. Collects configurable settings related to activities involving connector content. +func (m *ExternalConnection) GetActivitySettings()(ActivitySettingsable) { + return m.activitySettings +} +// GetComplianceSettings gets the complianceSettings property value. The settings required for the connection to participate in eDiscovery, such as the display templates for eDiscovery results. +func (m *ExternalConnection) GetComplianceSettings()(ComplianceSettingsable) { + return m.complianceSettings +} +// GetConfiguration gets the configuration property value. Specifies additional application IDs that are allowed to manage the connection and to index content in the connection. Optional. +func (m *ExternalConnection) GetConfiguration()(Configurationable) { + return m.configuration +} +// GetConnectorId gets the connectorId property value. The Teams App ID. Optional. +func (m *ExternalConnection) GetConnectorId()(*string) { + return m.connectorId +} +// GetDescription gets the description property value. Description of the connection displayed in the Microsoft 365 admin center. Optional. +func (m *ExternalConnection) GetDescription()(*string) { + return m.description +} +// GetEnabledContentExperiences gets the enabledContentExperiences property value. The list of content experiences the connection will participate in. Possible values are search and compliance. +func (m *ExternalConnection) GetEnabledContentExperiences()(*ContentExperienceType) { + return m.enabledContentExperiences +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activitySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateActivitySettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivitySettings(val.(ActivitySettingsable)) + } + return nil + } + res["complianceSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateComplianceSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComplianceSettings(val.(ComplianceSettingsable)) + } + return nil + } + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(Configurationable)) + } + return nil + } + res["connectorId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorId(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["enabledContentExperiences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentExperienceType) + if err != nil { + return err + } + if val != nil { + m.SetEnabledContentExperiences(val.(*ContentExperienceType)) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroupable, len(val)) + for i, v := range val { + res[i] = v.(ExternalGroupable) + } + m.SetGroups(res) + } + return nil + } + res["ingestedItemsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIngestedItemsCount(val) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalItemable, len(val)) + for i, v := range val { + res[i] = v.(ExternalItemable) + } + m.SetItems(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectionOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectionOperationable, len(val)) + for i, v := range val { + res[i] = v.(ConnectionOperationable) + } + m.SetOperations(res) + } + return nil + } + res["quota"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConnectionQuotaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetQuota(val.(ConnectionQuotaable)) + } + return nil + } + res["schema"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchema(val.(Schemaable)) + } + return nil + } + res["searchSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSearchSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSearchSettings(val.(SearchSettingsable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ConnectionState)) + } + return nil + } + return res +} +// GetGroups gets the groups property value. The groups property +func (m *ExternalConnection) GetGroups()([]ExternalGroupable) { + return m.groups +} +// GetIngestedItemsCount gets the ingestedItemsCount property value. The number of items ingested into a connection. This value is refreshed every 15 minutes. If the connection state is draft, then ingestedItemsCount will be null. +func (m *ExternalConnection) GetIngestedItemsCount()(*int64) { + return m.ingestedItemsCount +} +// GetItems gets the items property value. The items property +func (m *ExternalConnection) GetItems()([]ExternalItemable) { + return m.items +} +// GetName gets the name property value. The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters. Required. +func (m *ExternalConnection) GetName()(*string) { + return m.name +} +// GetOperations gets the operations property value. The operations property +func (m *ExternalConnection) GetOperations()([]ConnectionOperationable) { + return m.operations +} +// GetQuota gets the quota property value. The quota property +func (m *ExternalConnection) GetQuota()(ConnectionQuotaable) { + return m.quota +} +// GetSchema gets the schema property value. The schema property +func (m *ExternalConnection) GetSchema()(Schemaable) { + return m.schema +} +// GetSearchSettings gets the searchSettings property value. The settings configuring the search experience for content in this connection, such as the display templates for search results. +func (m *ExternalConnection) GetSearchSettings()(SearchSettingsable) { + return m.searchSettings +} +// GetState gets the state property value. Indicates the current state of the connection. Possible values are draft, ready, obsolete, and limitExceeded. Required. +func (m *ExternalConnection) GetState()(*ConnectionState) { + return m.state +} +// Serialize serializes information the current object +func (m *ExternalConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("activitySettings", m.GetActivitySettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("complianceSettings", m.GetComplianceSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("connectorId", m.GetConnectorId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEnabledContentExperiences() != nil { + cast := (*m.GetEnabledContentExperiences()).String() + err = writer.WriteStringValue("enabledContentExperiences", &cast) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("ingestedItemsCount", m.GetIngestedItemsCount()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("quota", m.GetQuota()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schema", m.GetSchema()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("searchSettings", m.GetSearchSettings()) + if err != nil { + return err + } + } + return nil +} +// SetActivitySettings sets the activitySettings property value. Collects configurable settings related to activities involving connector content. +func (m *ExternalConnection) SetActivitySettings(value ActivitySettingsable)() { + m.activitySettings = value +} +// SetComplianceSettings sets the complianceSettings property value. The settings required for the connection to participate in eDiscovery, such as the display templates for eDiscovery results. +func (m *ExternalConnection) SetComplianceSettings(value ComplianceSettingsable)() { + m.complianceSettings = value +} +// SetConfiguration sets the configuration property value. Specifies additional application IDs that are allowed to manage the connection and to index content in the connection. Optional. +func (m *ExternalConnection) SetConfiguration(value Configurationable)() { + m.configuration = value +} +// SetConnectorId sets the connectorId property value. The Teams App ID. Optional. +func (m *ExternalConnection) SetConnectorId(value *string)() { + m.connectorId = value +} +// SetDescription sets the description property value. Description of the connection displayed in the Microsoft 365 admin center. Optional. +func (m *ExternalConnection) SetDescription(value *string)() { + m.description = value +} +// SetEnabledContentExperiences sets the enabledContentExperiences property value. The list of content experiences the connection will participate in. Possible values are search and compliance. +func (m *ExternalConnection) SetEnabledContentExperiences(value *ContentExperienceType)() { + m.enabledContentExperiences = value +} +// SetGroups sets the groups property value. The groups property +func (m *ExternalConnection) SetGroups(value []ExternalGroupable)() { + m.groups = value +} +// SetIngestedItemsCount sets the ingestedItemsCount property value. The number of items ingested into a connection. This value is refreshed every 15 minutes. If the connection state is draft, then ingestedItemsCount will be null. +func (m *ExternalConnection) SetIngestedItemsCount(value *int64)() { + m.ingestedItemsCount = value +} +// SetItems sets the items property value. The items property +func (m *ExternalConnection) SetItems(value []ExternalItemable)() { + m.items = value +} +// SetName sets the name property value. The display name of the connection to be displayed in the Microsoft 365 admin center. Maximum length of 128 characters. Required. +func (m *ExternalConnection) SetName(value *string)() { + m.name = value +} +// SetOperations sets the operations property value. The operations property +func (m *ExternalConnection) SetOperations(value []ConnectionOperationable)() { + m.operations = value +} +// SetQuota sets the quota property value. The quota property +func (m *ExternalConnection) SetQuota(value ConnectionQuotaable)() { + m.quota = value +} +// SetSchema sets the schema property value. The schema property +func (m *ExternalConnection) SetSchema(value Schemaable)() { + m.schema = value +} +// SetSearchSettings sets the searchSettings property value. The settings configuring the search experience for content in this connection, such as the display templates for search results. +func (m *ExternalConnection) SetSearchSettings(value SearchSettingsable)() { + m.searchSettings = value +} +// SetState sets the state property value. Indicates the current state of the connection. Possible values are draft, ready, obsolete, and limitExceeded. Required. +func (m *ExternalConnection) SetState(value *ConnectionState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_response.go new file mode 100644 index 000000000..e8eb35bf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalConnectionCollectionResponse +type ExternalConnectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ExternalConnectionable +} +// NewExternalConnectionCollectionResponse instantiates a new ExternalConnectionCollectionResponse and sets the default values. +func NewExternalConnectionCollectionResponse()(*ExternalConnectionCollectionResponse) { + m := &ExternalConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalConnectionable, len(val)) + for i, v := range val { + res[i] = v.(ExternalConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalConnectionCollectionResponse) GetValue()([]ExternalConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalConnectionCollectionResponse) SetValue(value []ExternalConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_responseable.go new file mode 100644 index 000000000..4e4b5f953 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connection_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalConnectionCollectionResponseable +type ExternalConnectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalConnectionable) + SetValue(value []ExternalConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_connectionable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connectionable.go new file mode 100644 index 000000000..6f88342d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_connectionable.go @@ -0,0 +1,42 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalConnectionable +type ExternalConnectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivitySettings()(ActivitySettingsable) + GetComplianceSettings()(ComplianceSettingsable) + GetConfiguration()(Configurationable) + GetConnectorId()(*string) + GetDescription()(*string) + GetEnabledContentExperiences()(*ContentExperienceType) + GetGroups()([]ExternalGroupable) + GetIngestedItemsCount()(*int64) + GetItems()([]ExternalItemable) + GetName()(*string) + GetOperations()([]ConnectionOperationable) + GetQuota()(ConnectionQuotaable) + GetSchema()(Schemaable) + GetSearchSettings()(SearchSettingsable) + GetState()(*ConnectionState) + SetActivitySettings(value ActivitySettingsable)() + SetComplianceSettings(value ComplianceSettingsable)() + SetConfiguration(value Configurationable)() + SetConnectorId(value *string)() + SetDescription(value *string)() + SetEnabledContentExperiences(value *ContentExperienceType)() + SetGroups(value []ExternalGroupable)() + SetIngestedItemsCount(value *int64)() + SetItems(value []ExternalItemable)() + SetName(value *string)() + SetOperations(value []ConnectionOperationable)() + SetQuota(value ConnectionQuotaable)() + SetSchema(value Schemaable)() + SetSearchSettings(value SearchSettingsable)() + SetState(value *ConnectionState)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_group.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group.go new file mode 100644 index 000000000..f57539eb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group.go @@ -0,0 +1,121 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalGroup struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The description of the external group. Optional. + description *string + // The friendly name of the external group. Optional. + displayName *string + // A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or other externalGroups as members. + members []Identityable +} +// NewExternalGroup instantiates a new externalGroup and sets the default values. +func NewExternalGroup()(*ExternalGroup) { + m := &ExternalGroup{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateExternalGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroup(), nil +} +// GetDescription gets the description property value. The description of the external group. Optional. +func (m *ExternalGroup) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The friendly name of the external group. Optional. +func (m *ExternalGroup) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Identityable, len(val)) + for i, v := range val { + res[i] = v.(Identityable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or other externalGroups as members. +func (m *ExternalGroup) GetMembers()([]Identityable) { + return m.members +} +// Serialize serializes information the current object +func (m *ExternalGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The description of the external group. Optional. +func (m *ExternalGroup) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The friendly name of the external group. Optional. +func (m *ExternalGroup) SetDisplayName(value *string)() { + m.displayName = value +} +// SetMembers sets the members property value. A member added to an externalGroup. You can add Azure Active Directory users, Azure Active Directory groups, or other externalGroups as members. +func (m *ExternalGroup) SetMembers(value []Identityable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_response.go new file mode 100644 index 000000000..6d414fb14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalGroupCollectionResponse +type ExternalGroupCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ExternalGroupable +} +// NewExternalGroupCollectionResponse instantiates a new ExternalGroupCollectionResponse and sets the default values. +func NewExternalGroupCollectionResponse()(*ExternalGroupCollectionResponse) { + m := &ExternalGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalGroupable, len(val)) + for i, v := range val { + res[i] = v.(ExternalGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalGroupCollectionResponse) GetValue()([]ExternalGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalGroupCollectionResponse) SetValue(value []ExternalGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_responseable.go new file mode 100644 index 000000000..715f4c228 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_group_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalGroupCollectionResponseable +type ExternalGroupCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalGroupable) + SetValue(value []ExternalGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_groupable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_groupable.go new file mode 100644 index 000000000..619afb71b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_groupable.go @@ -0,0 +1,18 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalGroupable +type ExternalGroupable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetMembers()([]Identityable) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetMembers(value []Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_item.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item.go new file mode 100644 index 000000000..dc5621178 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item.go @@ -0,0 +1,155 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalItem struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // An array of access control entries. Each entry specifies the access granted to a user or group. Required. + acl []Aclable + // Write-only property. Returns results. + activities []ExternalActivityable + // A plain-text representation of the contents of the item. The text in this property is full-text indexed. Optional. + content ExternalItemContentable + // A property bag with the properties of the item. The properties MUST conform to the schema defined for the externalConnection. Required. + properties Propertiesable +} +// NewExternalItem instantiates a new externalItem and sets the default values. +func NewExternalItem()(*ExternalItem) { + m := &ExternalItem{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateExternalItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItem(), nil +} +// GetAcl gets the acl property value. An array of access control entries. Each entry specifies the access granted to a user or group. Required. +func (m *ExternalItem) GetAcl()([]Aclable) { + return m.acl +} +// GetActivities gets the activities property value. Write-only property. Returns results. +func (m *ExternalItem) GetActivities()([]ExternalActivityable) { + return m.activities +} +// GetContent gets the content property value. A plain-text representation of the contents of the item. The text in this property is full-text indexed. Optional. +func (m *ExternalItem) GetContent()(ExternalItemContentable) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAclFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Aclable, len(val)) + for i, v := range val { + res[i] = v.(Aclable) + } + m.SetAcl(res) + } + return nil + } + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalActivityable, len(val)) + for i, v := range val { + res[i] = v.(ExternalActivityable) + } + m.SetActivities(res) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalItemContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(ExternalItemContentable)) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProperties(val.(Propertiesable)) + } + return nil + } + return res +} +// GetProperties gets the properties property value. A property bag with the properties of the item. The properties MUST conform to the schema defined for the externalConnection. Required. +func (m *ExternalItem) GetProperties()(Propertiesable) { + return m.properties +} +// Serialize serializes information the current object +func (m *ExternalItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAcl() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAcl())) + for i, v := range m.GetAcl() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("acl", cast) + if err != nil { + return err + } + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("properties", m.GetProperties()) + if err != nil { + return err + } + } + return nil +} +// SetAcl sets the acl property value. An array of access control entries. Each entry specifies the access granted to a user or group. Required. +func (m *ExternalItem) SetAcl(value []Aclable)() { + m.acl = value +} +// SetActivities sets the activities property value. Write-only property. Returns results. +func (m *ExternalItem) SetActivities(value []ExternalActivityable)() { + m.activities = value +} +// SetContent sets the content property value. A plain-text representation of the contents of the item. The text in this property is full-text indexed. Optional. +func (m *ExternalItem) SetContent(value ExternalItemContentable)() { + m.content = value +} +// SetProperties sets the properties property value. A property bag with the properties of the item. The properties MUST conform to the schema defined for the externalConnection. Required. +func (m *ExternalItem) SetProperties(value Propertiesable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_response.go new file mode 100644 index 000000000..9675e6238 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalItemCollectionResponse +type ExternalItemCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ExternalItemable +} +// NewExternalItemCollectionResponse instantiates a new ExternalItemCollectionResponse and sets the default values. +func NewExternalItemCollectionResponse()(*ExternalItemCollectionResponse) { + m := &ExternalItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateExternalItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalItemable, len(val)) + for i, v := range val { + res[i] = v.(ExternalItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ExternalItemCollectionResponse) GetValue()([]ExternalItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ExternalItemCollectionResponse) SetValue(value []ExternalItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_responseable.go new file mode 100644 index 000000000..9b555144e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalItemCollectionResponseable +type ExternalItemCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ExternalItemable) + SetValue(value []ExternalItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content.go new file mode 100644 index 000000000..7f95fd3da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content.go @@ -0,0 +1,124 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemContent +type ExternalItemContent 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 OdataType property + odataType *string + // The type property + type_escaped *ExternalItemContentType + // The content for the externalItem. Required. + value *string +} +// NewExternalItemContent instantiates a new externalItemContent and sets the default values. +func NewExternalItemContent()(*ExternalItemContent) { + m := &ExternalItemContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateExternalItemContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateExternalItemContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewExternalItemContent(), 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 *ExternalItemContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ExternalItemContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalItemContentType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*ExternalItemContentType)) + } + 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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ExternalItemContent) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *ExternalItemContent) GetType()(*ExternalItemContentType) { + return m.type_escaped +} +// GetValue gets the value property value. The content for the externalItem. Required. +func (m *ExternalItemContent) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ExternalItemContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + 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 *ExternalItemContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ExternalItemContent) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *ExternalItemContent) SetType(value *ExternalItemContentType)() { + m.type_escaped = value +} +// SetValue sets the value property value. The content for the externalItem. Required. +func (m *ExternalItemContent) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content_type.go new file mode 100644 index 000000000..6af8a7fae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_content_type.go @@ -0,0 +1,37 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExternalItemContentType int + +const ( + TEXT_EXTERNALITEMCONTENTTYPE ExternalItemContentType = iota + HTML_EXTERNALITEMCONTENTTYPE + UNKNOWNFUTUREVALUE_EXTERNALITEMCONTENTTYPE +) + +func (i ExternalItemContentType) String() string { + return []string{"text", "html", "unknownFutureValue"}[i] +} +func ParseExternalItemContentType(v string) (interface{}, error) { + result := TEXT_EXTERNALITEMCONTENTTYPE + switch v { + case "text": + result = TEXT_EXTERNALITEMCONTENTTYPE + case "html": + result = HTML_EXTERNALITEMCONTENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXTERNALITEMCONTENTTYPE + default: + return 0, errors.New("Unknown ExternalItemContentType value: " + v) + } + return &result, nil +} +func SerializeExternalItemContentType(values []ExternalItemContentType) []string { + 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/externalconnectors/external_item_contentable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_contentable.go new file mode 100644 index 000000000..e2d87ad3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_item_contentable.go @@ -0,0 +1,17 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ExternalItemContentable +type ExternalItemContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*ExternalItemContentType) + GetValue()(*string) + SetOdataType(value *string)() + SetType(value *ExternalItemContentType)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/external_itemable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/external_itemable.go new file mode 100644 index 000000000..a4a8fd8f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/external_itemable.go @@ -0,0 +1,20 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ExternalItemable +type ExternalItemable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcl()([]Aclable) + GetActivities()([]ExternalActivityable) + GetContent()(ExternalItemContentable) + GetProperties()(Propertiesable) + SetAcl(value []Aclable)() + SetActivities(value []ExternalActivityable)() + SetContent(value ExternalItemContentable)() + SetProperties(value Propertiesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/identity.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identity.go new file mode 100644 index 000000000..662eba67f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identity.go @@ -0,0 +1,62 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Identity provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Identity struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The type property + type_escaped *IdentityType +} +// NewIdentity instantiates a new identity and sets the default values. +func NewIdentity()(*Identity) { + m := &Identity{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Identity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentityType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*IdentityType)) + } + return nil + } + return res +} +// GetType gets the type property value. The type property +func (m *Identity) GetType()(*IdentityType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Identity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetType sets the type property value. The type property +func (m *Identity) SetType(value *IdentityType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_response.go new file mode 100644 index 000000000..32b386804 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// IdentityCollectionResponse +type IdentityCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Identityable +} +// NewIdentityCollectionResponse instantiates a new IdentityCollectionResponse and sets the default values. +func NewIdentityCollectionResponse()(*IdentityCollectionResponse) { + m := &IdentityCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Identityable, len(val)) + for i, v := range val { + res[i] = v.(Identityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityCollectionResponse) GetValue()([]Identityable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityCollectionResponse) SetValue(value []Identityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_responseable.go new file mode 100644 index 000000000..e0008734c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// IdentityCollectionResponseable +type IdentityCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Identityable) + SetValue(value []Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/identity_source_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_source_type.go new file mode 100644 index 000000000..e4c18cc44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_source_type.go @@ -0,0 +1,37 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentitySourceType int + +const ( + AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE IdentitySourceType = iota + EXTERNAL_IDENTITYSOURCETYPE + UNKNOWNFUTUREVALUE_IDENTITYSOURCETYPE +) + +func (i IdentitySourceType) String() string { + return []string{"azureActiveDirectory", "external", "unknownFutureValue"}[i] +} +func ParseIdentitySourceType(v string) (interface{}, error) { + result := AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE + switch v { + case "azureActiveDirectory": + result = AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE + case "external": + result = EXTERNAL_IDENTITYSOURCETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IDENTITYSOURCETYPE + default: + return 0, errors.New("Unknown IdentitySourceType value: " + v) + } + return &result, nil +} +func SerializeIdentitySourceType(values []IdentitySourceType) []string { + 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/externalconnectors/identity_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_type.go new file mode 100644 index 000000000..15e7613fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identity_type.go @@ -0,0 +1,40 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityType int + +const ( + USER_IDENTITYTYPE IdentityType = iota + GROUP_IDENTITYTYPE + EXTERNALGROUP_IDENTITYTYPE + UNKNOWNFUTUREVALUE_IDENTITYTYPE +) + +func (i IdentityType) String() string { + return []string{"user", "group", "externalGroup", "unknownFutureValue"}[i] +} +func ParseIdentityType(v string) (interface{}, error) { + result := USER_IDENTITYTYPE + switch v { + case "user": + result = USER_IDENTITYTYPE + case "group": + result = GROUP_IDENTITYTYPE + case "externalGroup": + result = EXTERNALGROUP_IDENTITYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IDENTITYTYPE + default: + return 0, errors.New("Unknown IdentityType value: " + v) + } + return &result, nil +} +func SerializeIdentityType(values []IdentityType) []string { + 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/externalconnectors/identityable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/identityable.go new file mode 100644 index 000000000..c18de3ccf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/identityable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Identityable +type Identityable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetType()(*IdentityType) + SetType(value *IdentityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolver.go b/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolver.go new file mode 100644 index 000000000..5124732db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolver.go @@ -0,0 +1,88 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemIdResolver +type ItemIdResolver struct { + UrlToItemResolverBase + // Pattern that specifies how to form the ID of the external item that the URL represents. The named groups from the regular expression in urlPattern within the urlMatchInfo can be referenced by inserting the group name inside curly brackets. + itemId *string + // Configurations to match and resolve URL. + urlMatchInfo UrlMatchInfoable +} +// NewItemIdResolver instantiates a new ItemIdResolver and sets the default values. +func NewItemIdResolver()(*ItemIdResolver) { + m := &ItemIdResolver{ + UrlToItemResolverBase: *NewUrlToItemResolverBase(), + } + odataTypeValue := "#microsoft.graph.externalConnectors.itemIdResolver"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemIdResolverFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemIdResolverFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemIdResolver(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemIdResolver) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UrlToItemResolverBase.GetFieldDeserializers() + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["urlMatchInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUrlMatchInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUrlMatchInfo(val.(UrlMatchInfoable)) + } + return nil + } + return res +} +// GetItemId gets the itemId property value. Pattern that specifies how to form the ID of the external item that the URL represents. The named groups from the regular expression in urlPattern within the urlMatchInfo can be referenced by inserting the group name inside curly brackets. +func (m *ItemIdResolver) GetItemId()(*string) { + return m.itemId +} +// GetUrlMatchInfo gets the urlMatchInfo property value. Configurations to match and resolve URL. +func (m *ItemIdResolver) GetUrlMatchInfo()(UrlMatchInfoable) { + return m.urlMatchInfo +} +// Serialize serializes information the current object +func (m *ItemIdResolver) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UrlToItemResolverBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("urlMatchInfo", m.GetUrlMatchInfo()) + if err != nil { + return err + } + } + return nil +} +// SetItemId sets the itemId property value. Pattern that specifies how to form the ID of the external item that the URL represents. The named groups from the regular expression in urlPattern within the urlMatchInfo can be referenced by inserting the group name inside curly brackets. +func (m *ItemIdResolver) SetItemId(value *string)() { + m.itemId = value +} +// SetUrlMatchInfo sets the urlMatchInfo property value. Configurations to match and resolve URL. +func (m *ItemIdResolver) SetUrlMatchInfo(value UrlMatchInfoable)() { + m.urlMatchInfo = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolverable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolverable.go new file mode 100644 index 000000000..842bb046e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/item_id_resolverable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemIdResolverable +type ItemIdResolverable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UrlToItemResolverBaseable + GetItemId()(*string) + GetUrlMatchInfo()(UrlMatchInfoable) + SetItemId(value *string)() + SetUrlMatchInfo(value UrlMatchInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/label.go b/src/internal/connector/graph/betasdk/models/externalconnectors/label.go new file mode 100644 index 000000000..30d87be88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/label.go @@ -0,0 +1,67 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Label int + +const ( + TITLE_LABEL Label = iota + URL_LABEL + CREATEDBY_LABEL + LASTMODIFIEDBY_LABEL + AUTHORS_LABEL + CREATEDDATETIME_LABEL + LASTMODIFIEDDATETIME_LABEL + FILENAME_LABEL + FILEEXTENSION_LABEL + UNKNOWNFUTUREVALUE_LABEL + ICONURL_LABEL + CONTAINERNAME_LABEL + CONTAINERURL_LABEL +) + +func (i Label) String() string { + return []string{"title", "url", "createdBy", "lastModifiedBy", "authors", "createdDateTime", "lastModifiedDateTime", "fileName", "fileExtension", "unknownFutureValue", "iconUrl", "containerName", "containerUrl"}[i] +} +func ParseLabel(v string) (interface{}, error) { + result := TITLE_LABEL + switch v { + case "title": + result = TITLE_LABEL + case "url": + result = URL_LABEL + case "createdBy": + result = CREATEDBY_LABEL + case "lastModifiedBy": + result = LASTMODIFIEDBY_LABEL + case "authors": + result = AUTHORS_LABEL + case "createdDateTime": + result = CREATEDDATETIME_LABEL + case "lastModifiedDateTime": + result = LASTMODIFIEDDATETIME_LABEL + case "fileName": + result = FILENAME_LABEL + case "fileExtension": + result = FILEEXTENSION_LABEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LABEL + case "iconUrl": + result = ICONURL_LABEL + case "containerName": + result = CONTAINERNAME_LABEL + case "containerUrl": + result = CONTAINERURL_LABEL + default: + return 0, errors.New("Unknown Label value: " + v) + } + return &result, nil +} +func SerializeLabel(values []Label) []string { + 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/externalconnectors/properties.go b/src/internal/connector/graph/betasdk/models/externalconnectors/properties.go new file mode 100644 index 000000000..8f3bb9c9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/properties.go @@ -0,0 +1,71 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Properties +type Properties 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 OdataType property + odataType *string +} +// NewProperties instantiates a new properties and sets the default values. +func NewProperties()(*Properties) { + m := &Properties{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProperties(), 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 *Properties) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Properties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Properties) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Properties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Properties) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Properties) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/propertiesable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/propertiesable.go new file mode 100644 index 000000000..a4ba9084e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/propertiesable.go @@ -0,0 +1,13 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Propertiesable +type Propertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property.go new file mode 100644 index 000000000..a1eddb28e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property.go @@ -0,0 +1,314 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Property +type Property struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. + aliases []string + // Specifies if the property will be matched exactly for queries. Exact matching can only be set to true for non-searchable properties of type string or stringCollection. Optional. + isExactMatchRequired *bool + // Specifies if the property is queryable. Queryable properties can be used in Keyword Query Language (KQL) queries. Optional. + isQueryable *bool + // Specifies if the property is refinable. Refinable properties can be used to filter search results in the Search API and add a refiner control in the Microsoft Search user experience. Optional. + isRefinable *bool + // Specifies if the property is retrievable. Retrievable properties are returned in the result set when items are returned by the search API. Retrievable properties are also available to add to the display template used to render search results. Optional. + isRetrievable *bool + // Specifies if the property is searchable. Only properties of type string or stringCollection can be searchable. Non-searchable properties are not added to the search index. Optional. + isSearchable *bool + // Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (e.g. better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl, containerName, containerUrl. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. + labels []Label + // The name of the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, the property name may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Required. + name *string + // The OdataType property + odataType *string + // The type property + type_escaped *PropertyType +} +// NewProperty instantiates a new property and sets the default values. +func NewProperty()(*Property) { + m := &Property{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProperty(), 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 *Property) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAliases gets the aliases property value. A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. +func (m *Property) GetAliases()([]string) { + return m.aliases +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Property) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aliases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAliases(res) + } + return nil + } + res["isExactMatchRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsExactMatchRequired(val) + } + return nil + } + res["isQueryable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsQueryable(val) + } + return nil + } + res["isRefinable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRefinable(val) + } + return nil + } + res["isRetrievable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRetrievable(val) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseLabel) + if err != nil { + return err + } + if val != nil { + res := make([]Label, len(val)) + for i, v := range val { + res[i] = *(v.(*Label)) + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePropertyType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PropertyType)) + } + return nil + } + return res +} +// GetIsExactMatchRequired gets the isExactMatchRequired property value. Specifies if the property will be matched exactly for queries. Exact matching can only be set to true for non-searchable properties of type string or stringCollection. Optional. +func (m *Property) GetIsExactMatchRequired()(*bool) { + return m.isExactMatchRequired +} +// GetIsQueryable gets the isQueryable property value. Specifies if the property is queryable. Queryable properties can be used in Keyword Query Language (KQL) queries. Optional. +func (m *Property) GetIsQueryable()(*bool) { + return m.isQueryable +} +// GetIsRefinable gets the isRefinable property value. Specifies if the property is refinable. Refinable properties can be used to filter search results in the Search API and add a refiner control in the Microsoft Search user experience. Optional. +func (m *Property) GetIsRefinable()(*bool) { + return m.isRefinable +} +// GetIsRetrievable gets the isRetrievable property value. Specifies if the property is retrievable. Retrievable properties are returned in the result set when items are returned by the search API. Retrievable properties are also available to add to the display template used to render search results. Optional. +func (m *Property) GetIsRetrievable()(*bool) { + return m.isRetrievable +} +// GetIsSearchable gets the isSearchable property value. Specifies if the property is searchable. Only properties of type string or stringCollection can be searchable. Non-searchable properties are not added to the search index. Optional. +func (m *Property) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetLabels gets the labels property value. Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (e.g. better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl, containerName, containerUrl. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. +func (m *Property) GetLabels()([]Label) { + return m.labels +} +// GetName gets the name property value. The name of the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, the property name may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Required. +func (m *Property) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Property) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *Property) GetType()(*PropertyType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Property) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAliases() != nil { + err := writer.WriteCollectionOfStringValues("aliases", m.GetAliases()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isExactMatchRequired", m.GetIsExactMatchRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isQueryable", m.GetIsQueryable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRefinable", m.GetIsRefinable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRetrievable", m.GetIsRetrievable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", SerializeLabel(m.GetLabels())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *Property) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAliases sets the aliases property value. A set of aliases or a friendly names for the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, each string might not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Optional. +func (m *Property) SetAliases(value []string)() { + m.aliases = value +} +// SetIsExactMatchRequired sets the isExactMatchRequired property value. Specifies if the property will be matched exactly for queries. Exact matching can only be set to true for non-searchable properties of type string or stringCollection. Optional. +func (m *Property) SetIsExactMatchRequired(value *bool)() { + m.isExactMatchRequired = value +} +// SetIsQueryable sets the isQueryable property value. Specifies if the property is queryable. Queryable properties can be used in Keyword Query Language (KQL) queries. Optional. +func (m *Property) SetIsQueryable(value *bool)() { + m.isQueryable = value +} +// SetIsRefinable sets the isRefinable property value. Specifies if the property is refinable. Refinable properties can be used to filter search results in the Search API and add a refiner control in the Microsoft Search user experience. Optional. +func (m *Property) SetIsRefinable(value *bool)() { + m.isRefinable = value +} +// SetIsRetrievable sets the isRetrievable property value. Specifies if the property is retrievable. Retrievable properties are returned in the result set when items are returned by the search API. Retrievable properties are also available to add to the display template used to render search results. Optional. +func (m *Property) SetIsRetrievable(value *bool)() { + m.isRetrievable = value +} +// SetIsSearchable sets the isSearchable property value. Specifies if the property is searchable. Only properties of type string or stringCollection can be searchable. Non-searchable properties are not added to the search index. Optional. +func (m *Property) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetLabels sets the labels property value. Specifies one or more well-known tags added against a property. Labels help Microsoft Search understand the semantics of the data in the connection. Adding appropriate labels would result in an enhanced search experience (e.g. better relevance). Optional.The possible values are: title, url, createdBy, lastModifiedBy, authors, createdDateTime, lastModifiedDateTime, fileName, fileExtension, unknownFutureValue, iconUrl, containerName, containerUrl. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values in this evolvable enum: iconUrl, containerName, containerUrl. +func (m *Property) SetLabels(value []Label)() { + m.labels = value +} +// SetName sets the name property value. The name of the property. Maximum 32 characters. Only alphanumeric characters allowed. For example, the property name may not contain control characters, whitespace, or any of the following: :, ;, ,, (, ), [, ], {, }, %, $, +, !, *, =, &, ?, @, #, /, ~, ', ', <, >, `, ^. Required. +func (m *Property) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Property) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *Property) SetType(value *PropertyType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_response.go new file mode 100644 index 000000000..b377425f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyCollectionResponse +type PropertyCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Propertyable +} +// NewPropertyCollectionResponse instantiates a new PropertyCollectionResponse and sets the default values. +func NewPropertyCollectionResponse()(*PropertyCollectionResponse) { + m := &PropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Propertyable, len(val)) + for i, v := range val { + res[i] = v.(Propertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PropertyCollectionResponse) GetValue()([]Propertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *PropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PropertyCollectionResponse) SetValue(value []Propertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_responseable.go new file mode 100644 index 000000000..da1945fa8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyCollectionResponseable +type PropertyCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Propertyable) + SetValue(value []Propertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule.go new file mode 100644 index 000000000..d83d17387 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule.go @@ -0,0 +1,182 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyRule +type PropertyRule 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 OdataType property + odataType *string + // The operation property + operation *RuleOperation + // The property from the externalItem schema. Required. + property *string + // A collection with one or many strings. The specified string(s) will be matched with the specified property using the specified operation. Required. + values []string + // The valuesJoinedBy property + valuesJoinedBy *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator +} +// NewPropertyRule instantiates a new propertyRule and sets the default values. +func NewPropertyRule()(*PropertyRule) { + m := &PropertyRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertyRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPropertyRule(), 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 *PropertyRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PropertyRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleOperation) + if err != nil { + return err + } + if val != nil { + m.SetOperation(val.(*RuleOperation)) + } + return nil + } + res["property"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProperty(val) + } + return nil + } + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetValues(res) + } + return nil + } + res["valuesJoinedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ParseBinaryOperator) + if err != nil { + return err + } + if val != nil { + m.SetValuesJoinedBy(val.(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PropertyRule) GetOdataType()(*string) { + return m.odataType +} +// GetOperation gets the operation property value. The operation property +func (m *PropertyRule) GetOperation()(*RuleOperation) { + return m.operation +} +// GetProperty gets the property property value. The property from the externalItem schema. Required. +func (m *PropertyRule) GetProperty()(*string) { + return m.property +} +// GetValues gets the values property value. A collection with one or many strings. The specified string(s) will be matched with the specified property using the specified operation. Required. +func (m *PropertyRule) GetValues()([]string) { + return m.values +} +// GetValuesJoinedBy gets the valuesJoinedBy property value. The valuesJoinedBy property +func (m *PropertyRule) GetValuesJoinedBy()(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator) { + return m.valuesJoinedBy +} +// Serialize serializes information the current object +func (m *PropertyRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOperation() != nil { + cast := (*m.GetOperation()).String() + err := writer.WriteStringValue("operation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("property", m.GetProperty()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + err := writer.WriteCollectionOfStringValues("values", m.GetValues()) + if err != nil { + return err + } + } + if m.GetValuesJoinedBy() != nil { + cast := (*m.GetValuesJoinedBy()).String() + err := writer.WriteStringValue("valuesJoinedBy", &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 *PropertyRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PropertyRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperation sets the operation property value. The operation property +func (m *PropertyRule) SetOperation(value *RuleOperation)() { + m.operation = value +} +// SetProperty sets the property property value. The property from the externalItem schema. Required. +func (m *PropertyRule) SetProperty(value *string)() { + m.property = value +} +// SetValues sets the values property value. A collection with one or many strings. The specified string(s) will be matched with the specified property using the specified operation. Required. +func (m *PropertyRule) SetValues(value []string)() { + m.values = value +} +// SetValuesJoinedBy sets the valuesJoinedBy property value. The valuesJoinedBy property +func (m *PropertyRule) SetValuesJoinedBy(value *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator)() { + m.valuesJoinedBy = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_response.go new file mode 100644 index 000000000..55ebcf215 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyRuleCollectionResponse +type PropertyRuleCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []PropertyRuleable +} +// NewPropertyRuleCollectionResponse instantiates a new PropertyRuleCollectionResponse and sets the default values. +func NewPropertyRuleCollectionResponse()(*PropertyRuleCollectionResponse) { + m := &PropertyRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePropertyRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPropertyRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PropertyRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PropertyRuleable, len(val)) + for i, v := range val { + res[i] = v.(PropertyRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PropertyRuleCollectionResponse) GetValue()([]PropertyRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *PropertyRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PropertyRuleCollectionResponse) SetValue(value []PropertyRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_responseable.go new file mode 100644 index 000000000..c438f6a8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_rule_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyRuleCollectionResponseable +type PropertyRuleCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PropertyRuleable) + SetValue(value []PropertyRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_ruleable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_ruleable.go new file mode 100644 index 000000000..261f8168a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_ruleable.go @@ -0,0 +1,22 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PropertyRuleable +type PropertyRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOperation()(*RuleOperation) + GetProperty()(*string) + GetValues()([]string) + GetValuesJoinedBy()(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator) + SetOdataType(value *string)() + SetOperation(value *RuleOperation)() + SetProperty(value *string)() + SetValues(value []string)() + SetValuesJoinedBy(value *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BinaryOperator)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/property_type.go b/src/internal/connector/graph/betasdk/models/externalconnectors/property_type.go new file mode 100644 index 000000000..1777dff27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/property_type.go @@ -0,0 +1,58 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PropertyType int + +const ( + STRING_PROPERTYTYPE PropertyType = iota + INT64_PROPERTYTYPE + DOUBLE_PROPERTYTYPE + DATETIME_PROPERTYTYPE + BOOLEAN_PROPERTYTYPE + STRINGCOLLECTION_PROPERTYTYPE + INT64COLLECTION_PROPERTYTYPE + DOUBLECOLLECTION_PROPERTYTYPE + DATETIMECOLLECTION_PROPERTYTYPE + UNKNOWNFUTUREVALUE_PROPERTYTYPE +) + +func (i PropertyType) String() string { + return []string{"string", "int64", "double", "dateTime", "boolean", "stringCollection", "int64Collection", "doubleCollection", "dateTimeCollection", "unknownFutureValue"}[i] +} +func ParsePropertyType(v string) (interface{}, error) { + result := STRING_PROPERTYTYPE + switch v { + case "string": + result = STRING_PROPERTYTYPE + case "int64": + result = INT64_PROPERTYTYPE + case "double": + result = DOUBLE_PROPERTYTYPE + case "dateTime": + result = DATETIME_PROPERTYTYPE + case "boolean": + result = BOOLEAN_PROPERTYTYPE + case "stringCollection": + result = STRINGCOLLECTION_PROPERTYTYPE + case "int64Collection": + result = INT64COLLECTION_PROPERTYTYPE + case "doubleCollection": + result = DOUBLECOLLECTION_PROPERTYTYPE + case "dateTimeCollection": + result = DATETIMECOLLECTION_PROPERTYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROPERTYTYPE + default: + return 0, errors.New("Unknown PropertyType value: " + v) + } + return &result, nil +} +func SerializePropertyType(values []PropertyType) []string { + 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/externalconnectors/propertyable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/propertyable.go new file mode 100644 index 000000000..c259495af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/propertyable.go @@ -0,0 +1,31 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Propertyable +type Propertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAliases()([]string) + GetIsExactMatchRequired()(*bool) + GetIsQueryable()(*bool) + GetIsRefinable()(*bool) + GetIsRetrievable()(*bool) + GetIsSearchable()(*bool) + GetLabels()([]Label) + GetName()(*string) + GetOdataType()(*string) + GetType()(*PropertyType) + SetAliases(value []string)() + SetIsExactMatchRequired(value *bool)() + SetIsQueryable(value *bool)() + SetIsRefinable(value *bool)() + SetIsRetrievable(value *bool)() + SetIsSearchable(value *bool)() + SetLabels(value []Label)() + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *PropertyType)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/rule_operation.go b/src/internal/connector/graph/betasdk/models/externalconnectors/rule_operation.go new file mode 100644 index 000000000..4fc2cc79d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/rule_operation.go @@ -0,0 +1,52 @@ +package externalconnectors +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RuleOperation int + +const ( + EQUALS_RULEOPERATION RuleOperation = iota + NOTEQUALS_RULEOPERATION + CONTAINS_RULEOPERATION + NOTCONTAINS_RULEOPERATION + LESSTHAN_RULEOPERATION + GREATERTHAN_RULEOPERATION + STARTSWITH_RULEOPERATION + UNKNOWNFUTUREVALUE_RULEOPERATION +) + +func (i RuleOperation) String() string { + return []string{"equals", "notEquals", "contains", "notContains", "lessThan", "greaterThan", "startsWith", "unknownFutureValue"}[i] +} +func ParseRuleOperation(v string) (interface{}, error) { + result := EQUALS_RULEOPERATION + switch v { + case "equals": + result = EQUALS_RULEOPERATION + case "notEquals": + result = NOTEQUALS_RULEOPERATION + case "contains": + result = CONTAINS_RULEOPERATION + case "notContains": + result = NOTCONTAINS_RULEOPERATION + case "lessThan": + result = LESSTHAN_RULEOPERATION + case "greaterThan": + result = GREATERTHAN_RULEOPERATION + case "startsWith": + result = STARTSWITH_RULEOPERATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RULEOPERATION + default: + return 0, errors.New("Unknown RuleOperation value: " + v) + } + return &result, nil +} +func SerializeRuleOperation(values []RuleOperation) []string { + 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/externalconnectors/schema.go b/src/internal/connector/graph/betasdk/models/externalconnectors/schema.go new file mode 100644 index 000000000..f0751e265 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/schema.go @@ -0,0 +1,95 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Schema +type Schema struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Must be set to microsoft.graph.externalItem. Required. + baseType *string + // The properties defined for the items in the connection. The minimum number of properties is one, the maximum is 128. + properties []Propertyable +} +// NewSchema instantiates a new schema and sets the default values. +func NewSchema()(*Schema) { + m := &Schema{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchema(), nil +} +// GetBaseType gets the baseType property value. Must be set to microsoft.graph.externalItem. Required. +func (m *Schema) GetBaseType()(*string) { + return m.baseType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Schema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["baseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseType(val) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Propertyable, len(val)) + for i, v := range val { + res[i] = v.(Propertyable) + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetProperties gets the properties property value. The properties defined for the items in the connection. The minimum number of properties is one, the maximum is 128. +func (m *Schema) GetProperties()([]Propertyable) { + return m.properties +} +// Serialize serializes information the current object +func (m *Schema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("baseType", m.GetBaseType()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + return nil +} +// SetBaseType sets the baseType property value. Must be set to microsoft.graph.externalItem. Required. +func (m *Schema) SetBaseType(value *string)() { + m.baseType = value +} +// SetProperties sets the properties property value. The properties defined for the items in the connection. The minimum number of properties is one, the maximum is 128. +func (m *Schema) SetProperties(value []Propertyable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/schemaable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/schemaable.go new file mode 100644 index 000000000..f456ef12f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/schemaable.go @@ -0,0 +1,16 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Schemaable +type Schemaable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseType()(*string) + GetProperties()([]Propertyable) + SetBaseType(value *string)() + SetProperties(value []Propertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/search_settings.go b/src/internal/connector/graph/betasdk/models/externalconnectors/search_settings.go new file mode 100644 index 000000000..98272d15d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/search_settings.go @@ -0,0 +1,105 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchSettings +type SearchSettings 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 OdataType property + odataType *string + // Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of 2 search result templates per connection. + searchResultTemplates []DisplayTemplateable +} +// NewSearchSettings instantiates a new searchSettings and sets the default values. +func NewSearchSettings()(*SearchSettings) { + m := &SearchSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchSettings(), 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 *SearchSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["searchResultTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayTemplateable, len(val)) + for i, v := range val { + res[i] = v.(DisplayTemplateable) + } + m.SetSearchResultTemplates(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSearchResultTemplates gets the searchResultTemplates property value. Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of 2 search result templates per connection. +func (m *SearchSettings) GetSearchResultTemplates()([]DisplayTemplateable) { + return m.searchResultTemplates +} +// Serialize serializes information the current object +func (m *SearchSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSearchResultTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSearchResultTemplates())) + for i, v := range m.GetSearchResultTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("searchResultTemplates", 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 *SearchSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSearchResultTemplates sets the searchResultTemplates property value. Enables the developer to define the appearance of the content and configure conditions that dictate when the template should be displayed. Maximum of 2 search result templates per connection. +func (m *SearchSettings) SetSearchResultTemplates(value []DisplayTemplateable)() { + m.searchResultTemplates = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/search_settingsable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/search_settingsable.go new file mode 100644 index 000000000..05af6d2f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/search_settingsable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchSettingsable +type SearchSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSearchResultTemplates()([]DisplayTemplateable) + SetOdataType(value *string)() + SetSearchResultTemplates(value []DisplayTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_info.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_info.go new file mode 100644 index 000000000..9b1b1fb3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_info.go @@ -0,0 +1,127 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlMatchInfo +type UrlMatchInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A list of the URL prefixes that must match URLs to be processed by this URL-to-item-resolver. + baseUrls []string + // The OdataType property + odataType *string + // A regular expression that will be matched towards the URL that is processed by this URL-to-item-resolver. The ECMAScript specification for regular expressions (ECMA-262) is used for the evaluation. The named groups defined by the regular expression will be used later to extract values from the URL. + urlPattern *string +} +// NewUrlMatchInfo instantiates a new urlMatchInfo and sets the default values. +func NewUrlMatchInfo()(*UrlMatchInfo) { + m := &UrlMatchInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUrlMatchInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlMatchInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUrlMatchInfo(), 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 *UrlMatchInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBaseUrls gets the baseUrls property value. A list of the URL prefixes that must match URLs to be processed by this URL-to-item-resolver. +func (m *UrlMatchInfo) GetBaseUrls()([]string) { + return m.baseUrls +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlMatchInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["baseUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBaseUrls(res) + } + 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["urlPattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrlPattern(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UrlMatchInfo) GetOdataType()(*string) { + return m.odataType +} +// GetUrlPattern gets the urlPattern property value. A regular expression that will be matched towards the URL that is processed by this URL-to-item-resolver. The ECMAScript specification for regular expressions (ECMA-262) is used for the evaluation. The named groups defined by the regular expression will be used later to extract values from the URL. +func (m *UrlMatchInfo) GetUrlPattern()(*string) { + return m.urlPattern +} +// Serialize serializes information the current object +func (m *UrlMatchInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBaseUrls() != nil { + err := writer.WriteCollectionOfStringValues("baseUrls", m.GetBaseUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("urlPattern", m.GetUrlPattern()) + 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 *UrlMatchInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBaseUrls sets the baseUrls property value. A list of the URL prefixes that must match URLs to be processed by this URL-to-item-resolver. +func (m *UrlMatchInfo) SetBaseUrls(value []string)() { + m.baseUrls = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UrlMatchInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrlPattern sets the urlPattern property value. A regular expression that will be matched towards the URL that is processed by this URL-to-item-resolver. The ECMAScript specification for regular expressions (ECMA-262) is used for the evaluation. The named groups defined by the regular expression will be used later to extract values from the URL. +func (m *UrlMatchInfo) SetUrlPattern(value *string)() { + m.urlPattern = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_infoable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_infoable.go new file mode 100644 index 000000000..1d753e1e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_match_infoable.go @@ -0,0 +1,17 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlMatchInfoable +type UrlMatchInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseUrls()([]string) + GetOdataType()(*string) + GetUrlPattern()(*string) + SetBaseUrls(value []string)() + SetOdataType(value *string)() + SetUrlPattern(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base.go new file mode 100644 index 000000000..309f1cfc5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base.go @@ -0,0 +1,115 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlToItemResolverBase +type UrlToItemResolverBase 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 OdataType property + odataType *string + // The priority which defines the sequence in which the urlToItemResolverBase instances are evaluated. + priority *int32 +} +// NewUrlToItemResolverBase instantiates a new urlToItemResolverBase and sets the default values. +func NewUrlToItemResolverBase()(*UrlToItemResolverBase) { + m := &UrlToItemResolverBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUrlToItemResolverBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlToItemResolverBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.externalConnectors.itemIdResolver": + return NewItemIdResolver(), nil + } + } + } + } + return NewUrlToItemResolverBase(), 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 *UrlToItemResolverBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlToItemResolverBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UrlToItemResolverBase) GetOdataType()(*string) { + return m.odataType +} +// GetPriority gets the priority property value. The priority which defines the sequence in which the urlToItemResolverBase instances are evaluated. +func (m *UrlToItemResolverBase) GetPriority()(*int32) { + return m.priority +} +// Serialize serializes information the current object +func (m *UrlToItemResolverBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("priority", m.GetPriority()) + 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 *UrlToItemResolverBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UrlToItemResolverBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetPriority sets the priority property value. The priority which defines the sequence in which the urlToItemResolverBase instances are evaluated. +func (m *UrlToItemResolverBase) SetPriority(value *int32)() { + m.priority = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_response.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_response.go new file mode 100644 index 000000000..53b42eecf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_response.go @@ -0,0 +1,69 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UrlToItemResolverBaseCollectionResponse +type UrlToItemResolverBaseCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UrlToItemResolverBaseable +} +// NewUrlToItemResolverBaseCollectionResponse instantiates a new UrlToItemResolverBaseCollectionResponse and sets the default values. +func NewUrlToItemResolverBaseCollectionResponse()(*UrlToItemResolverBaseCollectionResponse) { + m := &UrlToItemResolverBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUrlToItemResolverBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlToItemResolverBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUrlToItemResolverBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlToItemResolverBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUrlToItemResolverBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UrlToItemResolverBaseable, len(val)) + for i, v := range val { + res[i] = v.(UrlToItemResolverBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UrlToItemResolverBaseCollectionResponse) GetValue()([]UrlToItemResolverBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *UrlToItemResolverBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UrlToItemResolverBaseCollectionResponse) SetValue(value []UrlToItemResolverBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_responseable.go new file mode 100644 index 000000000..1d5d9a115 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_base_collection_responseable.go @@ -0,0 +1,14 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UrlToItemResolverBaseCollectionResponseable +type UrlToItemResolverBaseCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UrlToItemResolverBaseable) + SetValue(value []UrlToItemResolverBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_baseable.go b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_baseable.go new file mode 100644 index 000000000..a1af8254b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/externalconnectors/url_to_item_resolver_baseable.go @@ -0,0 +1,15 @@ +package externalconnectors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlToItemResolverBaseable +type UrlToItemResolverBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPriority()(*int32) + SetOdataType(value *string)() + SetPriority(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/feature_rollout_policy.go b/src/internal/connector/graph/betasdk/models/feature_rollout_policy.go new file mode 100644 index 000000000..793f3524f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_rollout_policy.go @@ -0,0 +1,199 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureRolloutPolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FeatureRolloutPolicy struct { + Entity + // Nullable. Specifies a list of directoryObjects that feature is enabled for. + appliesTo []DirectoryObjectable + // A description for this feature rollout policy. + description *string + // The display name for this feature rollout policy. + displayName *string + // The feature property + feature *StagedFeatureName + // Indicates whether this feature rollout policy should be applied to the entire organization. + isAppliedToOrganization *bool + // Indicates whether the feature rollout is enabled. + isEnabled *bool +} +// NewFeatureRolloutPolicy instantiates a new featureRolloutPolicy and sets the default values. +func NewFeatureRolloutPolicy()(*FeatureRolloutPolicy) { + m := &FeatureRolloutPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateFeatureRolloutPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureRolloutPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureRolloutPolicy(), nil +} +// GetAppliesTo gets the appliesTo property value. Nullable. Specifies a list of directoryObjects that feature is enabled for. +func (m *FeatureRolloutPolicy) GetAppliesTo()([]DirectoryObjectable) { + return m.appliesTo +} +// GetDescription gets the description property value. A description for this feature rollout policy. +func (m *FeatureRolloutPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for this feature rollout policy. +func (m *FeatureRolloutPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFeature gets the feature property value. The feature property +func (m *FeatureRolloutPolicy) GetFeature()(*StagedFeatureName) { + return m.feature +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureRolloutPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetAppliesTo(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["feature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseStagedFeatureName) + if err != nil { + return err + } + if val != nil { + m.SetFeature(val.(*StagedFeatureName)) + } + return nil + } + res["isAppliedToOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAppliedToOrganization(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + return res +} +// GetIsAppliedToOrganization gets the isAppliedToOrganization property value. Indicates whether this feature rollout policy should be applied to the entire organization. +func (m *FeatureRolloutPolicy) GetIsAppliedToOrganization()(*bool) { + return m.isAppliedToOrganization +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the feature rollout is enabled. +func (m *FeatureRolloutPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// Serialize serializes information the current object +func (m *FeatureRolloutPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAppliesTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppliesTo())) + for i, v := range m.GetAppliesTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appliesTo", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetFeature() != nil { + cast := (*m.GetFeature()).String() + err = writer.WriteStringValue("feature", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAppliedToOrganization", m.GetIsAppliedToOrganization()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetAppliesTo sets the appliesTo property value. Nullable. Specifies a list of directoryObjects that feature is enabled for. +func (m *FeatureRolloutPolicy) SetAppliesTo(value []DirectoryObjectable)() { + m.appliesTo = value +} +// SetDescription sets the description property value. A description for this feature rollout policy. +func (m *FeatureRolloutPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for this feature rollout policy. +func (m *FeatureRolloutPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFeature sets the feature property value. The feature property +func (m *FeatureRolloutPolicy) SetFeature(value *StagedFeatureName)() { + m.feature = value +} +// SetIsAppliedToOrganization sets the isAppliedToOrganization property value. Indicates whether this feature rollout policy should be applied to the entire organization. +func (m *FeatureRolloutPolicy) SetIsAppliedToOrganization(value *bool)() { + m.isAppliedToOrganization = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the feature rollout is enabled. +func (m *FeatureRolloutPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_response.go new file mode 100644 index 000000000..fcd6771bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureRolloutPolicyCollectionResponse +type FeatureRolloutPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FeatureRolloutPolicyable +} +// NewFeatureRolloutPolicyCollectionResponse instantiates a new FeatureRolloutPolicyCollectionResponse and sets the default values. +func NewFeatureRolloutPolicyCollectionResponse()(*FeatureRolloutPolicyCollectionResponse) { + m := &FeatureRolloutPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFeatureRolloutPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureRolloutPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureRolloutPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureRolloutPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFeatureRolloutPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FeatureRolloutPolicyable, len(val)) + for i, v := range val { + res[i] = v.(FeatureRolloutPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FeatureRolloutPolicyCollectionResponse) GetValue()([]FeatureRolloutPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *FeatureRolloutPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FeatureRolloutPolicyCollectionResponse) SetValue(value []FeatureRolloutPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_responseable.go new file mode 100644 index 000000000..780362bdb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_rollout_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureRolloutPolicyCollectionResponseable +type FeatureRolloutPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FeatureRolloutPolicyable) + SetValue(value []FeatureRolloutPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/feature_rollout_policyable.go b/src/internal/connector/graph/betasdk/models/feature_rollout_policyable.go new file mode 100644 index 000000000..9f02303e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_rollout_policyable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureRolloutPolicyable +type FeatureRolloutPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()([]DirectoryObjectable) + GetDescription()(*string) + GetDisplayName()(*string) + GetFeature()(*StagedFeatureName) + GetIsAppliedToOrganization()(*bool) + GetIsEnabled()(*bool) + SetAppliesTo(value []DirectoryObjectable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetFeature(value *StagedFeatureName)() + SetIsAppliedToOrganization(value *bool)() + SetIsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/feature_target.go b/src/internal/connector/graph/betasdk/models/feature_target.go new file mode 100644 index 000000000..6dc070873 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_target.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureTarget +type FeatureTarget 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 ID of the entity that's targeted in the include or exclude rule or all_users to target all users. + id *string + // The OdataType property + odataType *string + // The kind of entity that's targeted. The possible values are: group, administrativeUnit, role, unknownFutureValue. + targetType *FeatureTargetType +} +// NewFeatureTarget instantiates a new featureTarget and sets the default values. +func NewFeatureTarget()(*FeatureTarget) { + m := &FeatureTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFeatureTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFeatureTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFeatureTarget(), 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 *FeatureTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FeatureTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFeatureTargetType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*FeatureTargetType)) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the entity that's targeted in the include or exclude rule or all_users to target all users. +func (m *FeatureTarget) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FeatureTarget) GetOdataType()(*string) { + return m.odataType +} +// GetTargetType gets the targetType property value. The kind of entity that's targeted. The possible values are: group, administrativeUnit, role, unknownFutureValue. +func (m *FeatureTarget) GetTargetType()(*FeatureTargetType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *FeatureTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err := writer.WriteStringValue("targetType", &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 *FeatureTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The ID of the entity that's targeted in the include or exclude rule or all_users to target all users. +func (m *FeatureTarget) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FeatureTarget) SetOdataType(value *string)() { + m.odataType = value +} +// SetTargetType sets the targetType property value. The kind of entity that's targeted. The possible values are: group, administrativeUnit, role, unknownFutureValue. +func (m *FeatureTarget) SetTargetType(value *FeatureTargetType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/feature_target_type.go b/src/internal/connector/graph/betasdk/models/feature_target_type.go new file mode 100644 index 000000000..6699a7225 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_target_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FeatureTargetType int + +const ( + GROUP_FEATURETARGETTYPE FeatureTargetType = iota + ADMINISTRATIVEUNIT_FEATURETARGETTYPE + ROLE_FEATURETARGETTYPE + UNKNOWNFUTUREVALUE_FEATURETARGETTYPE +) + +func (i FeatureTargetType) String() string { + return []string{"group", "administrativeUnit", "role", "unknownFutureValue"}[i] +} +func ParseFeatureTargetType(v string) (interface{}, error) { + result := GROUP_FEATURETARGETTYPE + switch v { + case "group": + result = GROUP_FEATURETARGETTYPE + case "administrativeUnit": + result = ADMINISTRATIVEUNIT_FEATURETARGETTYPE + case "role": + result = ROLE_FEATURETARGETTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FEATURETARGETTYPE + default: + return 0, errors.New("Unknown FeatureTargetType value: " + v) + } + return &result, nil +} +func SerializeFeatureTargetType(values []FeatureTargetType) []string { + 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/feature_targetable.go b/src/internal/connector/graph/betasdk/models/feature_targetable.go new file mode 100644 index 000000000..42e95b87d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_targetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FeatureTargetable +type FeatureTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetOdataType()(*string) + GetTargetType()(*FeatureTargetType) + SetId(value *string)() + SetOdataType(value *string)() + SetTargetType(value *FeatureTargetType)() +} diff --git a/src/internal/connector/graph/betasdk/models/feature_type.go b/src/internal/connector/graph/betasdk/models/feature_type.go new file mode 100644 index 000000000..2524fd314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/feature_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FeatureType int + +const ( + REGISTRATION_FEATURETYPE FeatureType = iota + RESET_FEATURETYPE + UNKNOWNFUTUREVALUE_FEATURETYPE +) + +func (i FeatureType) String() string { + return []string{"registration", "reset", "unknownFutureValue"}[i] +} +func ParseFeatureType(v string) (interface{}, error) { + result := REGISTRATION_FEATURETYPE + switch v { + case "registration": + result = REGISTRATION_FEATURETYPE + case "reset": + result = RESET_FEATURETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FEATURETYPE + default: + return 0, errors.New("Unknown FeatureType value: " + v) + } + return &result, nil +} +func SerializeFeatureType(values []FeatureType) []string { + 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/federated_identity_credential.go b/src/internal/connector/graph/betasdk/models/federated_identity_credential.go new file mode 100644 index 000000000..ff699253f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/federated_identity_credential.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FederatedIdentityCredential provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FederatedIdentityCredential struct { + Entity + // The audience that can appear in the external token. This field is mandatory and should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you may need to create a new application registration in your identity provider to serve as the audience of this token. This field can only accept a single value and has a limit of 600 characters. Required. + audiences []string + // The un-validated, user-provided description of the federated identity credential. It has a limit of 600 characters. Optional. + description *string + // The URL of the external identity provider and must match the issuer claim of the external token being exchanged. The combination of the values of issuer and subject must be unique on the app. It has a limit of 600 characters. Required. + issuer *string + // is the unique identifier for the federated identity credential, which has a limit of 120 characters and must be URL friendly. It is immutable once created. Required. Not nullable. Supports $filter (eq). + name *string + // Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each identity provider uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD. The combination of issuer and subject must be unique on the app. It has a limit of 600 characters. Supports $filter (eq). + subject *string +} +// NewFederatedIdentityCredential instantiates a new federatedIdentityCredential and sets the default values. +func NewFederatedIdentityCredential()(*FederatedIdentityCredential) { + m := &FederatedIdentityCredential{ + Entity: *NewEntity(), + } + return m +} +// CreateFederatedIdentityCredentialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFederatedIdentityCredentialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFederatedIdentityCredential(), nil +} +// GetAudiences gets the audiences property value. The audience that can appear in the external token. This field is mandatory and should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you may need to create a new application registration in your identity provider to serve as the audience of this token. This field can only accept a single value and has a limit of 600 characters. Required. +func (m *FederatedIdentityCredential) GetAudiences()([]string) { + return m.audiences +} +// GetDescription gets the description property value. The un-validated, user-provided description of the federated identity credential. It has a limit of 600 characters. Optional. +func (m *FederatedIdentityCredential) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FederatedIdentityCredential) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["audiences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAudiences(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuer(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetIssuer gets the issuer property value. The URL of the external identity provider and must match the issuer claim of the external token being exchanged. The combination of the values of issuer and subject must be unique on the app. It has a limit of 600 characters. Required. +func (m *FederatedIdentityCredential) GetIssuer()(*string) { + return m.issuer +} +// GetName gets the name property value. is the unique identifier for the federated identity credential, which has a limit of 120 characters and must be URL friendly. It is immutable once created. Required. Not nullable. Supports $filter (eq). +func (m *FederatedIdentityCredential) GetName()(*string) { + return m.name +} +// GetSubject gets the subject property value. Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each identity provider uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD. The combination of issuer and subject must be unique on the app. It has a limit of 600 characters. Supports $filter (eq). +func (m *FederatedIdentityCredential) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *FederatedIdentityCredential) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAudiences() != nil { + err = writer.WriteCollectionOfStringValues("audiences", m.GetAudiences()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuer", m.GetIssuer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetAudiences sets the audiences property value. The audience that can appear in the external token. This field is mandatory and should be set to api://AzureADTokenExchange for Azure AD. It says what Microsoft identity platform should accept in the aud claim in the incoming token. This value represents Azure AD in your external identity provider and has no fixed value across identity providers - you may need to create a new application registration in your identity provider to serve as the audience of this token. This field can only accept a single value and has a limit of 600 characters. Required. +func (m *FederatedIdentityCredential) SetAudiences(value []string)() { + m.audiences = value +} +// SetDescription sets the description property value. The un-validated, user-provided description of the federated identity credential. It has a limit of 600 characters. Optional. +func (m *FederatedIdentityCredential) SetDescription(value *string)() { + m.description = value +} +// SetIssuer sets the issuer property value. The URL of the external identity provider and must match the issuer claim of the external token being exchanged. The combination of the values of issuer and subject must be unique on the app. It has a limit of 600 characters. Required. +func (m *FederatedIdentityCredential) SetIssuer(value *string)() { + m.issuer = value +} +// SetName sets the name property value. is the unique identifier for the federated identity credential, which has a limit of 120 characters and must be URL friendly. It is immutable once created. Required. Not nullable. Supports $filter (eq). +func (m *FederatedIdentityCredential) SetName(value *string)() { + m.name = value +} +// SetSubject sets the subject property value. Required. The identifier of the external software workload within the external identity provider. Like the audience value, it has no fixed format, as each identity provider uses their own - sometimes a GUID, sometimes a colon delimited identifier, sometimes arbitrary strings. The value here must match the sub claim within the token presented to Azure AD. The combination of issuer and subject must be unique on the app. It has a limit of 600 characters. Supports $filter (eq). +func (m *FederatedIdentityCredential) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_response.go b/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_response.go new file mode 100644 index 000000000..d2d718c2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FederatedIdentityCredentialCollectionResponse +type FederatedIdentityCredentialCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FederatedIdentityCredentialable +} +// NewFederatedIdentityCredentialCollectionResponse instantiates a new FederatedIdentityCredentialCollectionResponse and sets the default values. +func NewFederatedIdentityCredentialCollectionResponse()(*FederatedIdentityCredentialCollectionResponse) { + m := &FederatedIdentityCredentialCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFederatedIdentityCredentialCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFederatedIdentityCredentialCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFederatedIdentityCredentialCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FederatedIdentityCredentialCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFederatedIdentityCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FederatedIdentityCredentialable, len(val)) + for i, v := range val { + res[i] = v.(FederatedIdentityCredentialable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FederatedIdentityCredentialCollectionResponse) GetValue()([]FederatedIdentityCredentialable) { + return m.value +} +// Serialize serializes information the current object +func (m *FederatedIdentityCredentialCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FederatedIdentityCredentialCollectionResponse) SetValue(value []FederatedIdentityCredentialable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_responseable.go b/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_responseable.go new file mode 100644 index 000000000..591218977 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/federated_identity_credential_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FederatedIdentityCredentialCollectionResponseable +type FederatedIdentityCredentialCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FederatedIdentityCredentialable) + SetValue(value []FederatedIdentityCredentialable)() +} diff --git a/src/internal/connector/graph/betasdk/models/federated_identity_credentialable.go b/src/internal/connector/graph/betasdk/models/federated_identity_credentialable.go new file mode 100644 index 000000000..fb99275ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/federated_identity_credentialable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FederatedIdentityCredentialable +type FederatedIdentityCredentialable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAudiences()([]string) + GetDescription()(*string) + GetIssuer()(*string) + GetName()(*string) + GetSubject()(*string) + SetAudiences(value []string)() + SetDescription(value *string)() + SetIssuer(value *string)() + SetName(value *string)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/federated_idp_mfa_behavior.go b/src/internal/connector/graph/betasdk/models/federated_idp_mfa_behavior.go new file mode 100644 index 000000000..ee5f06dd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/federated_idp_mfa_behavior.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FederatedIdpMfaBehavior int + +const ( + ACCEPTIFMFADONEBYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR FederatedIdpMfaBehavior = iota + ENFORCEMFABYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + REJECTMFABYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + UNKNOWNFUTUREVALUE_FEDERATEDIDPMFABEHAVIOR +) + +func (i FederatedIdpMfaBehavior) String() string { + return []string{"acceptIfMfaDoneByFederatedIdp", "enforceMfaByFederatedIdp", "rejectMfaByFederatedIdp", "unknownFutureValue"}[i] +} +func ParseFederatedIdpMfaBehavior(v string) (interface{}, error) { + result := ACCEPTIFMFADONEBYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + switch v { + case "acceptIfMfaDoneByFederatedIdp": + result = ACCEPTIFMFADONEBYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + case "enforceMfaByFederatedIdp": + result = ENFORCEMFABYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + case "rejectMfaByFederatedIdp": + result = REJECTMFABYFEDERATEDIDP_FEDERATEDIDPMFABEHAVIOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FEDERATEDIDPMFABEHAVIOR + default: + return 0, errors.New("Unknown FederatedIdpMfaBehavior value: " + v) + } + return &result, nil +} +func SerializeFederatedIdpMfaBehavior(values []FederatedIdpMfaBehavior) []string { + 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/fido2_authentication_method.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method.go new file mode 100644 index 000000000..9b5bd57a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method.go @@ -0,0 +1,224 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethod +type Fido2AuthenticationMethod struct { + AuthenticationMethod + // Authenticator Attestation GUID, an identifier that indicates the type (e.g. make and model) of the authenticator. + aaGuid *string + // The attestation certificate(s) attached to this security key. + attestationCertificates []string + // The attestation level of this FIDO2 security key. Possible values are: attested, notAttested, unknownFutureValue. + attestationLevel *AttestationLevel + // The timestamp when this key was registered to the user. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The creationDateTime property + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the key as given by the user. + displayName *string + // The manufacturer-assigned model of the FIDO2 security key. + model *string +} +// NewFido2AuthenticationMethod instantiates a new Fido2AuthenticationMethod and sets the default values. +func NewFido2AuthenticationMethod()(*Fido2AuthenticationMethod) { + m := &Fido2AuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.fido2AuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFido2AuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2AuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2AuthenticationMethod(), nil +} +// GetAaGuid gets the aaGuid property value. Authenticator Attestation GUID, an identifier that indicates the type (e.g. make and model) of the authenticator. +func (m *Fido2AuthenticationMethod) GetAaGuid()(*string) { + return m.aaGuid +} +// GetAttestationCertificates gets the attestationCertificates property value. The attestation certificate(s) attached to this security key. +func (m *Fido2AuthenticationMethod) GetAttestationCertificates()([]string) { + return m.attestationCertificates +} +// GetAttestationLevel gets the attestationLevel property value. The attestation level of this FIDO2 security key. Possible values are: attested, notAttested, unknownFutureValue. +func (m *Fido2AuthenticationMethod) GetAttestationLevel()(*AttestationLevel) { + return m.attestationLevel +} +// GetCreatedDateTime gets the createdDateTime property value. The timestamp when this key was registered to the user. +func (m *Fido2AuthenticationMethod) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationDateTime gets the creationDateTime property value. The creationDateTime property +func (m *Fido2AuthenticationMethod) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetDisplayName gets the displayName property value. The display name of the key as given by the user. +func (m *Fido2AuthenticationMethod) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2AuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["aaGuid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAaGuid(val) + } + return nil + } + res["attestationCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAttestationCertificates(res) + } + return nil + } + res["attestationLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAttestationLevel) + if err != nil { + return err + } + if val != nil { + m.SetAttestationLevel(val.(*AttestationLevel)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + return res +} +// GetModel gets the model property value. The manufacturer-assigned model of the FIDO2 security key. +func (m *Fido2AuthenticationMethod) GetModel()(*string) { + return m.model +} +// Serialize serializes information the current object +func (m *Fido2AuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("aaGuid", m.GetAaGuid()) + if err != nil { + return err + } + } + if m.GetAttestationCertificates() != nil { + err = writer.WriteCollectionOfStringValues("attestationCertificates", m.GetAttestationCertificates()) + if err != nil { + return err + } + } + if m.GetAttestationLevel() != nil { + cast := (*m.GetAttestationLevel()).String() + err = writer.WriteStringValue("attestationLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + return nil +} +// SetAaGuid sets the aaGuid property value. Authenticator Attestation GUID, an identifier that indicates the type (e.g. make and model) of the authenticator. +func (m *Fido2AuthenticationMethod) SetAaGuid(value *string)() { + m.aaGuid = value +} +// SetAttestationCertificates sets the attestationCertificates property value. The attestation certificate(s) attached to this security key. +func (m *Fido2AuthenticationMethod) SetAttestationCertificates(value []string)() { + m.attestationCertificates = value +} +// SetAttestationLevel sets the attestationLevel property value. The attestation level of this FIDO2 security key. Possible values are: attested, notAttested, unknownFutureValue. +func (m *Fido2AuthenticationMethod) SetAttestationLevel(value *AttestationLevel)() { + m.attestationLevel = value +} +// SetCreatedDateTime sets the createdDateTime property value. The timestamp when this key was registered to the user. +func (m *Fido2AuthenticationMethod) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationDateTime sets the creationDateTime property value. The creationDateTime property +func (m *Fido2AuthenticationMethod) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetDisplayName sets the displayName property value. The display name of the key as given by the user. +func (m *Fido2AuthenticationMethod) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModel sets the model property value. The manufacturer-assigned model of the FIDO2 security key. +func (m *Fido2AuthenticationMethod) SetModel(value *string)() { + m.model = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_response.go new file mode 100644 index 000000000..2d0f51fb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodCollectionResponse +type Fido2AuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Fido2AuthenticationMethodable +} +// NewFido2AuthenticationMethodCollectionResponse instantiates a new Fido2AuthenticationMethodCollectionResponse and sets the default values. +func NewFido2AuthenticationMethodCollectionResponse()(*Fido2AuthenticationMethodCollectionResponse) { + m := &Fido2AuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFido2AuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2AuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2AuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2AuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFido2AuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Fido2AuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(Fido2AuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *Fido2AuthenticationMethodCollectionResponse) GetValue()([]Fido2AuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *Fido2AuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *Fido2AuthenticationMethodCollectionResponse) SetValue(value []Fido2AuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_responseable.go new file mode 100644 index 000000000..a7e2458e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodCollectionResponseable +type Fido2AuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Fido2AuthenticationMethodable) + SetValue(value []Fido2AuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration.go new file mode 100644 index 000000000..75846d9a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration.go @@ -0,0 +1,148 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodConfiguration +type Fido2AuthenticationMethodConfiguration struct { + AuthenticationMethodConfiguration + // A collection of groups that are enabled to use the authentication method. + includeTargets []AuthenticationMethodTargetable + // Determines whether attestation must be enforced for FIDO2 security key registration. + isAttestationEnforced *bool + // Determines if users can register new FIDO2 security keys. + isSelfServiceRegistrationAllowed *bool + // Controls whether key restrictions are enforced on FIDO2 security keys, either allowing or disallowing certain key types as defined by Authenticator Attestation GUID (AAGUID), an identifier that indicates the type (e.g. make and model) of the authenticator. + keyRestrictions Fido2KeyRestrictionsable +} +// NewFido2AuthenticationMethodConfiguration instantiates a new Fido2AuthenticationMethodConfiguration and sets the default values. +func NewFido2AuthenticationMethodConfiguration()(*Fido2AuthenticationMethodConfiguration) { + m := &Fido2AuthenticationMethodConfiguration{ + AuthenticationMethodConfiguration: *NewAuthenticationMethodConfiguration(), + } + odataTypeValue := "#microsoft.graph.fido2AuthenticationMethodConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFido2AuthenticationMethodConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2AuthenticationMethodConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2AuthenticationMethodConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2AuthenticationMethodConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethodConfiguration.GetFieldDeserializers() + res["includeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuthenticationMethodTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuthenticationMethodTargetable, len(val)) + for i, v := range val { + res[i] = v.(AuthenticationMethodTargetable) + } + m.SetIncludeTargets(res) + } + return nil + } + res["isAttestationEnforced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAttestationEnforced(val) + } + return nil + } + res["isSelfServiceRegistrationAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSelfServiceRegistrationAllowed(val) + } + return nil + } + res["keyRestrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFido2KeyRestrictionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKeyRestrictions(val.(Fido2KeyRestrictionsable)) + } + return nil + } + return res +} +// GetIncludeTargets gets the includeTargets property value. A collection of groups that are enabled to use the authentication method. +func (m *Fido2AuthenticationMethodConfiguration) GetIncludeTargets()([]AuthenticationMethodTargetable) { + return m.includeTargets +} +// GetIsAttestationEnforced gets the isAttestationEnforced property value. Determines whether attestation must be enforced for FIDO2 security key registration. +func (m *Fido2AuthenticationMethodConfiguration) GetIsAttestationEnforced()(*bool) { + return m.isAttestationEnforced +} +// GetIsSelfServiceRegistrationAllowed gets the isSelfServiceRegistrationAllowed property value. Determines if users can register new FIDO2 security keys. +func (m *Fido2AuthenticationMethodConfiguration) GetIsSelfServiceRegistrationAllowed()(*bool) { + return m.isSelfServiceRegistrationAllowed +} +// GetKeyRestrictions gets the keyRestrictions property value. Controls whether key restrictions are enforced on FIDO2 security keys, either allowing or disallowing certain key types as defined by Authenticator Attestation GUID (AAGUID), an identifier that indicates the type (e.g. make and model) of the authenticator. +func (m *Fido2AuthenticationMethodConfiguration) GetKeyRestrictions()(Fido2KeyRestrictionsable) { + return m.keyRestrictions +} +// Serialize serializes information the current object +func (m *Fido2AuthenticationMethodConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethodConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetIncludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeTargets())) + for i, v := range m.GetIncludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includeTargets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAttestationEnforced", m.GetIsAttestationEnforced()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSelfServiceRegistrationAllowed", m.GetIsSelfServiceRegistrationAllowed()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("keyRestrictions", m.GetKeyRestrictions()) + if err != nil { + return err + } + } + return nil +} +// SetIncludeTargets sets the includeTargets property value. A collection of groups that are enabled to use the authentication method. +func (m *Fido2AuthenticationMethodConfiguration) SetIncludeTargets(value []AuthenticationMethodTargetable)() { + m.includeTargets = value +} +// SetIsAttestationEnforced sets the isAttestationEnforced property value. Determines whether attestation must be enforced for FIDO2 security key registration. +func (m *Fido2AuthenticationMethodConfiguration) SetIsAttestationEnforced(value *bool)() { + m.isAttestationEnforced = value +} +// SetIsSelfServiceRegistrationAllowed sets the isSelfServiceRegistrationAllowed property value. Determines if users can register new FIDO2 security keys. +func (m *Fido2AuthenticationMethodConfiguration) SetIsSelfServiceRegistrationAllowed(value *bool)() { + m.isSelfServiceRegistrationAllowed = value +} +// SetKeyRestrictions sets the keyRestrictions property value. Controls whether key restrictions are enforced on FIDO2 security keys, either allowing or disallowing certain key types as defined by Authenticator Attestation GUID (AAGUID), an identifier that indicates the type (e.g. make and model) of the authenticator. +func (m *Fido2AuthenticationMethodConfiguration) SetKeyRestrictions(value Fido2KeyRestrictionsable)() { + m.keyRestrictions = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_response.go new file mode 100644 index 000000000..ff6bfbdc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodConfigurationCollectionResponse +type Fido2AuthenticationMethodConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Fido2AuthenticationMethodConfigurationable +} +// NewFido2AuthenticationMethodConfigurationCollectionResponse instantiates a new Fido2AuthenticationMethodConfigurationCollectionResponse and sets the default values. +func NewFido2AuthenticationMethodConfigurationCollectionResponse()(*Fido2AuthenticationMethodConfigurationCollectionResponse) { + m := &Fido2AuthenticationMethodConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFido2AuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2AuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2AuthenticationMethodConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2AuthenticationMethodConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFido2AuthenticationMethodConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Fido2AuthenticationMethodConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(Fido2AuthenticationMethodConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *Fido2AuthenticationMethodConfigurationCollectionResponse) GetValue()([]Fido2AuthenticationMethodConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *Fido2AuthenticationMethodConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *Fido2AuthenticationMethodConfigurationCollectionResponse) SetValue(value []Fido2AuthenticationMethodConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_responseable.go new file mode 100644 index 000000000..40c46cc96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodConfigurationCollectionResponseable +type Fido2AuthenticationMethodConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Fido2AuthenticationMethodConfigurationable) + SetValue(value []Fido2AuthenticationMethodConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configurationable.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configurationable.go new file mode 100644 index 000000000..008ca1ffa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_method_configurationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodConfigurationable +type Fido2AuthenticationMethodConfigurationable interface { + AuthenticationMethodConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIncludeTargets()([]AuthenticationMethodTargetable) + GetIsAttestationEnforced()(*bool) + GetIsSelfServiceRegistrationAllowed()(*bool) + GetKeyRestrictions()(Fido2KeyRestrictionsable) + SetIncludeTargets(value []AuthenticationMethodTargetable)() + SetIsAttestationEnforced(value *bool)() + SetIsSelfServiceRegistrationAllowed(value *bool)() + SetKeyRestrictions(value Fido2KeyRestrictionsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/fido2_authentication_methodable.go new file mode 100644 index 000000000..ebfcc51df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_authentication_methodable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2AuthenticationMethodable +type Fido2AuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAaGuid()(*string) + GetAttestationCertificates()([]string) + GetAttestationLevel()(*AttestationLevel) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetModel()(*string) + SetAaGuid(value *string)() + SetAttestationCertificates(value []string)() + SetAttestationLevel(value *AttestationLevel)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetModel(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_combination_configuration.go b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration.go new file mode 100644 index 000000000..f89cca107 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2CombinationConfiguration +type Fido2CombinationConfiguration struct { + AuthenticationCombinationConfiguration + // A list of AAGUIDs allowed to be used as part of the specified authentication method combinations. + allowedAAGUIDs []string +} +// NewFido2CombinationConfiguration instantiates a new Fido2CombinationConfiguration and sets the default values. +func NewFido2CombinationConfiguration()(*Fido2CombinationConfiguration) { + m := &Fido2CombinationConfiguration{ + AuthenticationCombinationConfiguration: *NewAuthenticationCombinationConfiguration(), + } + odataTypeValue := "#microsoft.graph.fido2CombinationConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFido2CombinationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2CombinationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2CombinationConfiguration(), nil +} +// GetAllowedAAGUIDs gets the allowedAAGUIDs property value. A list of AAGUIDs allowed to be used as part of the specified authentication method combinations. +func (m *Fido2CombinationConfiguration) GetAllowedAAGUIDs()([]string) { + return m.allowedAAGUIDs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2CombinationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationCombinationConfiguration.GetFieldDeserializers() + res["allowedAAGUIDs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedAAGUIDs(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Fido2CombinationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationCombinationConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedAAGUIDs() != nil { + err = writer.WriteCollectionOfStringValues("allowedAAGUIDs", m.GetAllowedAAGUIDs()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedAAGUIDs sets the allowedAAGUIDs property value. A list of AAGUIDs allowed to be used as part of the specified authentication method combinations. +func (m *Fido2CombinationConfiguration) SetAllowedAAGUIDs(value []string)() { + m.allowedAAGUIDs = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_response.go new file mode 100644 index 000000000..5ae399577 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2CombinationConfigurationCollectionResponse +type Fido2CombinationConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Fido2CombinationConfigurationable +} +// NewFido2CombinationConfigurationCollectionResponse instantiates a new Fido2CombinationConfigurationCollectionResponse and sets the default values. +func NewFido2CombinationConfigurationCollectionResponse()(*Fido2CombinationConfigurationCollectionResponse) { + m := &Fido2CombinationConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFido2CombinationConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2CombinationConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2CombinationConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2CombinationConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFido2CombinationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Fido2CombinationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(Fido2CombinationConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *Fido2CombinationConfigurationCollectionResponse) GetValue()([]Fido2CombinationConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *Fido2CombinationConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *Fido2CombinationConfigurationCollectionResponse) SetValue(value []Fido2CombinationConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_responseable.go new file mode 100644 index 000000000..61f8785db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_combination_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2CombinationConfigurationCollectionResponseable +type Fido2CombinationConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Fido2CombinationConfigurationable) + SetValue(value []Fido2CombinationConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_combination_configurationable.go b/src/internal/connector/graph/betasdk/models/fido2_combination_configurationable.go new file mode 100644 index 000000000..c8a9bdadf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_combination_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2CombinationConfigurationable +type Fido2CombinationConfigurationable interface { + AuthenticationCombinationConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAAGUIDs()([]string) + SetAllowedAAGUIDs(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_key_restrictions.go b/src/internal/connector/graph/betasdk/models/fido2_key_restrictions.go new file mode 100644 index 000000000..6b043e245 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_key_restrictions.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2KeyRestrictions +type Fido2KeyRestrictions struct { + // A collection of Authenticator Attestation GUIDs. AADGUIDs define key types and manufacturers. + aaGuids []string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enforcement type. Possible values are: allow, block. + enforcementType *Fido2RestrictionEnforcementType + // Determines if the configured key enforcement is enabled. + isEnforced *bool + // The OdataType property + odataType *string +} +// NewFido2KeyRestrictions instantiates a new fido2KeyRestrictions and sets the default values. +func NewFido2KeyRestrictions()(*Fido2KeyRestrictions) { + m := &Fido2KeyRestrictions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFido2KeyRestrictionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFido2KeyRestrictionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFido2KeyRestrictions(), nil +} +// GetAaGuids gets the aaGuids property value. A collection of Authenticator Attestation GUIDs. AADGUIDs define key types and manufacturers. +func (m *Fido2KeyRestrictions) GetAaGuids()([]string) { + return m.aaGuids +} +// 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 *Fido2KeyRestrictions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnforcementType gets the enforcementType property value. Enforcement type. Possible values are: allow, block. +func (m *Fido2KeyRestrictions) GetEnforcementType()(*Fido2RestrictionEnforcementType) { + return m.enforcementType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Fido2KeyRestrictions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aaGuids"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAaGuids(res) + } + return nil + } + res["enforcementType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFido2RestrictionEnforcementType) + if err != nil { + return err + } + if val != nil { + m.SetEnforcementType(val.(*Fido2RestrictionEnforcementType)) + } + return nil + } + res["isEnforced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnforced(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 + } + return res +} +// GetIsEnforced gets the isEnforced property value. Determines if the configured key enforcement is enabled. +func (m *Fido2KeyRestrictions) GetIsEnforced()(*bool) { + return m.isEnforced +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Fido2KeyRestrictions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Fido2KeyRestrictions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAaGuids() != nil { + err := writer.WriteCollectionOfStringValues("aaGuids", m.GetAaGuids()) + if err != nil { + return err + } + } + if m.GetEnforcementType() != nil { + cast := (*m.GetEnforcementType()).String() + err := writer.WriteStringValue("enforcementType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnforced", m.GetIsEnforced()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAaGuids sets the aaGuids property value. A collection of Authenticator Attestation GUIDs. AADGUIDs define key types and manufacturers. +func (m *Fido2KeyRestrictions) SetAaGuids(value []string)() { + m.aaGuids = value +} +// 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 *Fido2KeyRestrictions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnforcementType sets the enforcementType property value. Enforcement type. Possible values are: allow, block. +func (m *Fido2KeyRestrictions) SetEnforcementType(value *Fido2RestrictionEnforcementType)() { + m.enforcementType = value +} +// SetIsEnforced sets the isEnforced property value. Determines if the configured key enforcement is enabled. +func (m *Fido2KeyRestrictions) SetIsEnforced(value *bool)() { + m.isEnforced = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Fido2KeyRestrictions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_key_restrictionsable.go b/src/internal/connector/graph/betasdk/models/fido2_key_restrictionsable.go new file mode 100644 index 000000000..e9bced16d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_key_restrictionsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fido2KeyRestrictionsable +type Fido2KeyRestrictionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAaGuids()([]string) + GetEnforcementType()(*Fido2RestrictionEnforcementType) + GetIsEnforced()(*bool) + GetOdataType()(*string) + SetAaGuids(value []string)() + SetEnforcementType(value *Fido2RestrictionEnforcementType)() + SetIsEnforced(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/fido2_restriction_enforcement_type.go b/src/internal/connector/graph/betasdk/models/fido2_restriction_enforcement_type.go new file mode 100644 index 000000000..e93066974 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fido2_restriction_enforcement_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Fido2RestrictionEnforcementType int + +const ( + ALLOW_FIDO2RESTRICTIONENFORCEMENTTYPE Fido2RestrictionEnforcementType = iota + BLOCK_FIDO2RESTRICTIONENFORCEMENTTYPE + UNKNOWNFUTUREVALUE_FIDO2RESTRICTIONENFORCEMENTTYPE +) + +func (i Fido2RestrictionEnforcementType) String() string { + return []string{"allow", "block", "unknownFutureValue"}[i] +} +func ParseFido2RestrictionEnforcementType(v string) (interface{}, error) { + result := ALLOW_FIDO2RESTRICTIONENFORCEMENTTYPE + switch v { + case "allow": + result = ALLOW_FIDO2RESTRICTIONENFORCEMENTTYPE + case "block": + result = BLOCK_FIDO2RESTRICTIONENFORCEMENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FIDO2RESTRICTIONENFORCEMENTTYPE + default: + return 0, errors.New("Unknown Fido2RestrictionEnforcementType value: " + v) + } + return &result, nil +} +func SerializeFido2RestrictionEnforcementType(values []Fido2RestrictionEnforcementType) []string { + 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/field_value_set.go b/src/internal/connector/graph/betasdk/models/field_value_set.go new file mode 100644 index 000000000..9c452fe52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/field_value_set.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FieldValueSet +type FieldValueSet struct { + Entity +} +// NewFieldValueSet instantiates a new fieldValueSet and sets the default values. +func NewFieldValueSet()(*FieldValueSet) { + m := &FieldValueSet{ + Entity: *NewEntity(), + } + return m +} +// CreateFieldValueSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFieldValueSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFieldValueSet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FieldValueSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *FieldValueSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/field_value_setable.go b/src/internal/connector/graph/betasdk/models/field_value_setable.go new file mode 100644 index 000000000..2d1ef1745 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/field_value_setable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FieldValueSetable +type FieldValueSetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/file.go b/src/internal/connector/graph/betasdk/models/file.go new file mode 100644 index 000000000..6f546eed1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// File +type File struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Hashes of the file's binary content, if available. Read-only. + hashes Hashesable + // The MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded. Read-only. + mimeType *string + // The OdataType property + odataType *string + // The processingMetadata property + processingMetadata *bool +} +// NewFile instantiates a new file and sets the default values. +func NewFile()(*File) { + m := &File{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFile(), 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 *File) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *File) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hashes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHashesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHashes(val.(Hashesable)) + } + return nil + } + res["mimeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMimeType(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["processingMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessingMetadata(val) + } + return nil + } + return res +} +// GetHashes gets the hashes property value. Hashes of the file's binary content, if available. Read-only. +func (m *File) GetHashes()(Hashesable) { + return m.hashes +} +// GetMimeType gets the mimeType property value. The MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded. Read-only. +func (m *File) GetMimeType()(*string) { + return m.mimeType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *File) GetOdataType()(*string) { + return m.odataType +} +// GetProcessingMetadata gets the processingMetadata property value. The processingMetadata property +func (m *File) GetProcessingMetadata()(*bool) { + return m.processingMetadata +} +// Serialize serializes information the current object +func (m *File) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("hashes", m.GetHashes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mimeType", m.GetMimeType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("processingMetadata", m.GetProcessingMetadata()) + 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 *File) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHashes sets the hashes property value. Hashes of the file's binary content, if available. Read-only. +func (m *File) SetHashes(value Hashesable)() { + m.hashes = value +} +// SetMimeType sets the mimeType property value. The MIME type for the file. This is determined by logic on the server and might not be the value provided when the file was uploaded. Read-only. +func (m *File) SetMimeType(value *string)() { + m.mimeType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *File) SetOdataType(value *string)() { + m.odataType = value +} +// SetProcessingMetadata sets the processingMetadata property value. The processingMetadata property +func (m *File) SetProcessingMetadata(value *bool)() { + m.processingMetadata = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_assessment_request.go b/src/internal/connector/graph/betasdk/models/file_assessment_request.go new file mode 100644 index 000000000..bac7ca32e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_assessment_request.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAssessmentRequest +type FileAssessmentRequest struct { + ThreatAssessmentRequest + // Base64 encoded file content. The file content cannot fetch back because it isn't stored. + contentData *string + // The file name. + fileName *string +} +// NewFileAssessmentRequest instantiates a new FileAssessmentRequest and sets the default values. +func NewFileAssessmentRequest()(*FileAssessmentRequest) { + m := &FileAssessmentRequest{ + ThreatAssessmentRequest: *NewThreatAssessmentRequest(), + } + odataTypeValue := "#microsoft.graph.fileAssessmentRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFileAssessmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileAssessmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileAssessmentRequest(), nil +} +// GetContentData gets the contentData property value. Base64 encoded file content. The file content cannot fetch back because it isn't stored. +func (m *FileAssessmentRequest) GetContentData()(*string) { + return m.contentData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileAssessmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatAssessmentRequest.GetFieldDeserializers() + res["contentData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentData(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. The file name. +func (m *FileAssessmentRequest) GetFileName()(*string) { + return m.fileName +} +// Serialize serializes information the current object +func (m *FileAssessmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatAssessmentRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentData", m.GetContentData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + return nil +} +// SetContentData sets the contentData property value. Base64 encoded file content. The file content cannot fetch back because it isn't stored. +func (m *FileAssessmentRequest) SetContentData(value *string)() { + m.contentData = value +} +// SetFileName sets the fileName property value. The file name. +func (m *FileAssessmentRequest) SetFileName(value *string)() { + m.fileName = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_response.go new file mode 100644 index 000000000..ed1fd01f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAssessmentRequestCollectionResponse +type FileAssessmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FileAssessmentRequestable +} +// NewFileAssessmentRequestCollectionResponse instantiates a new FileAssessmentRequestCollectionResponse and sets the default values. +func NewFileAssessmentRequestCollectionResponse()(*FileAssessmentRequestCollectionResponse) { + m := &FileAssessmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileAssessmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileAssessmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileAssessmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileAssessmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileAssessmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileAssessmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(FileAssessmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileAssessmentRequestCollectionResponse) GetValue()([]FileAssessmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileAssessmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileAssessmentRequestCollectionResponse) SetValue(value []FileAssessmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_responseable.go new file mode 100644 index 000000000..64739b9b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_assessment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAssessmentRequestCollectionResponseable +type FileAssessmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileAssessmentRequestable) + SetValue(value []FileAssessmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_assessment_requestable.go b/src/internal/connector/graph/betasdk/models/file_assessment_requestable.go new file mode 100644 index 000000000..b64236a49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_assessment_requestable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAssessmentRequestable +type FileAssessmentRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatAssessmentRequestable + GetContentData()(*string) + GetFileName()(*string) + SetContentData(value *string)() + SetFileName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_attachment.go b/src/internal/connector/graph/betasdk/models/file_attachment.go new file mode 100644 index 000000000..8087b2564 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_attachment.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAttachment +type FileAttachment struct { + Attachment + // The base64-encoded contents of the file. + contentBytes []byte + // The ID of the attachment in the Exchange store. + contentId *string + // Do not use this property as it is not supported. + contentLocation *string +} +// NewFileAttachment instantiates a new FileAttachment and sets the default values. +func NewFileAttachment()(*FileAttachment) { + m := &FileAttachment{ + Attachment: *NewAttachment(), + } + odataTypeValue := "#microsoft.graph.fileAttachment"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFileAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileAttachment(), nil +} +// GetContentBytes gets the contentBytes property value. The base64-encoded contents of the file. +func (m *FileAttachment) GetContentBytes()([]byte) { + return m.contentBytes +} +// GetContentId gets the contentId property value. The ID of the attachment in the Exchange store. +func (m *FileAttachment) GetContentId()(*string) { + return m.contentId +} +// GetContentLocation gets the contentLocation property value. Do not use this property as it is not supported. +func (m *FileAttachment) GetContentLocation()(*string) { + return m.contentLocation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Attachment.GetFieldDeserializers() + res["contentBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContentBytes(val) + } + return nil + } + res["contentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentId(val) + } + return nil + } + res["contentLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentLocation(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *FileAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Attachment.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("contentBytes", m.GetContentBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentId", m.GetContentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentLocation", m.GetContentLocation()) + if err != nil { + return err + } + } + return nil +} +// SetContentBytes sets the contentBytes property value. The base64-encoded contents of the file. +func (m *FileAttachment) SetContentBytes(value []byte)() { + m.contentBytes = value +} +// SetContentId sets the contentId property value. The ID of the attachment in the Exchange store. +func (m *FileAttachment) SetContentId(value *string)() { + m.contentId = value +} +// SetContentLocation sets the contentLocation property value. Do not use this property as it is not supported. +func (m *FileAttachment) SetContentLocation(value *string)() { + m.contentLocation = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/file_attachment_collection_response.go new file mode 100644 index 000000000..e7d316ba3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAttachmentCollectionResponse +type FileAttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FileAttachmentable +} +// NewFileAttachmentCollectionResponse instantiates a new FileAttachmentCollectionResponse and sets the default values. +func NewFileAttachmentCollectionResponse()(*FileAttachmentCollectionResponse) { + m := &FileAttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileAttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(FileAttachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileAttachmentCollectionResponse) GetValue()([]FileAttachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileAttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileAttachmentCollectionResponse) SetValue(value []FileAttachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/file_attachment_collection_responseable.go new file mode 100644 index 000000000..965bae748 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAttachmentCollectionResponseable +type FileAttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileAttachmentable) + SetValue(value []FileAttachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_attachmentable.go b/src/internal/connector/graph/betasdk/models/file_attachmentable.go new file mode 100644 index 000000000..ba46c5345 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_attachmentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileAttachmentable +type FileAttachmentable interface { + Attachmentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentBytes()([]byte) + GetContentId()(*string) + GetContentLocation()(*string) + SetContentBytes(value []byte)() + SetContentId(value *string)() + SetContentLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_classification_request.go b/src/internal/connector/graph/betasdk/models/file_classification_request.go new file mode 100644 index 000000000..823479150 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_classification_request.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileClassificationRequest +type FileClassificationRequest struct { + Entity + // The file property + file []byte + // The sensitiveTypeIds property + sensitiveTypeIds []string +} +// NewFileClassificationRequest instantiates a new FileClassificationRequest and sets the default values. +func NewFileClassificationRequest()(*FileClassificationRequest) { + m := &FileClassificationRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateFileClassificationRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileClassificationRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileClassificationRequest(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileClassificationRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetFile(val) + } + return nil + } + res["sensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSensitiveTypeIds(res) + } + return nil + } + return res +} +// GetFile gets the file property value. The file property +func (m *FileClassificationRequest) GetFile()([]byte) { + return m.file +} +// GetSensitiveTypeIds gets the sensitiveTypeIds property value. The sensitiveTypeIds property +func (m *FileClassificationRequest) GetSensitiveTypeIds()([]string) { + return m.sensitiveTypeIds +} +// Serialize serializes information the current object +func (m *FileClassificationRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("file", m.GetFile()) + if err != nil { + return err + } + } + if m.GetSensitiveTypeIds() != nil { + err = writer.WriteCollectionOfStringValues("sensitiveTypeIds", m.GetSensitiveTypeIds()) + if err != nil { + return err + } + } + return nil +} +// SetFile sets the file property value. The file property +func (m *FileClassificationRequest) SetFile(value []byte)() { + m.file = value +} +// SetSensitiveTypeIds sets the sensitiveTypeIds property value. The sensitiveTypeIds property +func (m *FileClassificationRequest) SetSensitiveTypeIds(value []string)() { + m.sensitiveTypeIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_classification_requestable.go b/src/internal/connector/graph/betasdk/models/file_classification_requestable.go new file mode 100644 index 000000000..955f500f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_classification_requestable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileClassificationRequestable +type FileClassificationRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFile()([]byte) + GetSensitiveTypeIds()([]string) + SetFile(value []byte)() + SetSensitiveTypeIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_hash.go b/src/internal/connector/graph/betasdk/models/file_hash.go new file mode 100644 index 000000000..15c8cc92a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_hash.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileHash +type FileHash struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // File hash type. Possible values are: unknown, sha1, sha256, md5, authenticodeHash256, lsHash, ctph, peSha1, peSha256. + hashType *FileHashType + // Value of the file hash. + hashValue *string + // The OdataType property + odataType *string +} +// NewFileHash instantiates a new fileHash and sets the default values. +func NewFileHash()(*FileHash) { + m := &FileHash{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFileHashFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileHashFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileHash(), 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 *FileHash) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileHash) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hashType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFileHashType) + if err != nil { + return err + } + if val != nil { + m.SetHashType(val.(*FileHashType)) + } + return nil + } + res["hashValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHashValue(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 + } + return res +} +// GetHashType gets the hashType property value. File hash type. Possible values are: unknown, sha1, sha256, md5, authenticodeHash256, lsHash, ctph, peSha1, peSha256. +func (m *FileHash) GetHashType()(*FileHashType) { + return m.hashType +} +// GetHashValue gets the hashValue property value. Value of the file hash. +func (m *FileHash) GetHashValue()(*string) { + return m.hashValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FileHash) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *FileHash) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetHashType() != nil { + cast := (*m.GetHashType()).String() + err := writer.WriteStringValue("hashType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hashValue", m.GetHashValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *FileHash) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHashType sets the hashType property value. File hash type. Possible values are: unknown, sha1, sha256, md5, authenticodeHash256, lsHash, ctph, peSha1, peSha256. +func (m *FileHash) SetHashType(value *FileHashType)() { + m.hashType = value +} +// SetHashValue sets the hashValue property value. Value of the file hash. +func (m *FileHash) SetHashValue(value *string)() { + m.hashValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FileHash) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_hash_collection_response.go b/src/internal/connector/graph/betasdk/models/file_hash_collection_response.go new file mode 100644 index 000000000..48ffbb672 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_hash_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileHashCollectionResponse +type FileHashCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FileHashable +} +// NewFileHashCollectionResponse instantiates a new FileHashCollectionResponse and sets the default values. +func NewFileHashCollectionResponse()(*FileHashCollectionResponse) { + m := &FileHashCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileHashCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileHashCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileHashCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileHashCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileHashFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileHashable, len(val)) + for i, v := range val { + res[i] = v.(FileHashable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileHashCollectionResponse) GetValue()([]FileHashable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileHashCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileHashCollectionResponse) SetValue(value []FileHashable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_hash_collection_responseable.go b/src/internal/connector/graph/betasdk/models/file_hash_collection_responseable.go new file mode 100644 index 000000000..12625cee8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_hash_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileHashCollectionResponseable +type FileHashCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileHashable) + SetValue(value []FileHashable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_hash_type.go b/src/internal/connector/graph/betasdk/models/file_hash_type.go new file mode 100644 index 000000000..c4dbe5d86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_hash_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FileHashType int + +const ( + UNKNOWN_FILEHASHTYPE FileHashType = iota + SHA1_FILEHASHTYPE + SHA256_FILEHASHTYPE + MD5_FILEHASHTYPE + AUTHENTICODEHASH256_FILEHASHTYPE + LSHASH_FILEHASHTYPE + CTPH_FILEHASHTYPE + UNKNOWNFUTUREVALUE_FILEHASHTYPE +) + +func (i FileHashType) String() string { + return []string{"unknown", "sha1", "sha256", "md5", "authenticodeHash256", "lsHash", "ctph", "unknownFutureValue"}[i] +} +func ParseFileHashType(v string) (interface{}, error) { + result := UNKNOWN_FILEHASHTYPE + switch v { + case "unknown": + result = UNKNOWN_FILEHASHTYPE + case "sha1": + result = SHA1_FILEHASHTYPE + case "sha256": + result = SHA256_FILEHASHTYPE + case "md5": + result = MD5_FILEHASHTYPE + case "authenticodeHash256": + result = AUTHENTICODEHASH256_FILEHASHTYPE + case "lsHash": + result = LSHASH_FILEHASHTYPE + case "ctph": + result = CTPH_FILEHASHTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FILEHASHTYPE + default: + return 0, errors.New("Unknown FileHashType value: " + v) + } + return &result, nil +} +func SerializeFileHashType(values []FileHashType) []string { + 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/file_hashable.go b/src/internal/connector/graph/betasdk/models/file_hashable.go new file mode 100644 index 000000000..4713fe1a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_hashable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileHashable +type FileHashable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHashType()(*FileHashType) + GetHashValue()(*string) + GetOdataType()(*string) + SetHashType(value *FileHashType)() + SetHashValue(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_profile.go b/src/internal/connector/graph/betasdk/models/file_security_profile.go new file mode 100644 index 000000000..f5ee74ec8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_profile.go @@ -0,0 +1,491 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FileSecurityProfile struct { + Entity + // The activityGroupNames property + activityGroupNames []string + // The azureSubscriptionId property + azureSubscriptionId *string + // The azureTenantId property + azureTenantId *string + // The certificateThumbprint property + certificateThumbprint *string + // The extensions property + extensions []string + // The fileType property + fileType *string + // The firstSeenDateTime property + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The hashes property + hashes []FileHashable + // The lastSeenDateTime property + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The malwareStates property + malwareStates []MalwareStateable + // The names property + names []string + // The riskScore property + riskScore *string + // The size property + size *int64 + // The tags property + tags []string + // The vendorInformation property + vendorInformation SecurityVendorInformationable + // The vulnerabilityStates property + vulnerabilityStates []VulnerabilityStateable +} +// NewFileSecurityProfile instantiates a new fileSecurityProfile and sets the default values. +func NewFileSecurityProfile()(*FileSecurityProfile) { + m := &FileSecurityProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateFileSecurityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileSecurityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileSecurityProfile(), nil +} +// GetActivityGroupNames gets the activityGroupNames property value. The activityGroupNames property +func (m *FileSecurityProfile) GetActivityGroupNames()([]string) { + return m.activityGroupNames +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *FileSecurityProfile) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *FileSecurityProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetCertificateThumbprint gets the certificateThumbprint property value. The certificateThumbprint property +func (m *FileSecurityProfile) GetCertificateThumbprint()(*string) { + return m.certificateThumbprint +} +// GetExtensions gets the extensions property value. The extensions property +func (m *FileSecurityProfile) GetExtensions()([]string) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileSecurityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activityGroupNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetActivityGroupNames(res) + } + return nil + } + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["certificateThumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateThumbprint(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExtensions(res) + } + return nil + } + res["fileType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileType(val) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["hashes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileHashFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileHashable, len(val)) + for i, v := range val { + res[i] = v.(FileHashable) + } + m.SetHashes(res) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["malwareStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMalwareStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MalwareStateable, len(val)) + for i, v := range val { + res[i] = v.(MalwareStateable) + } + m.SetMalwareStates(res) + } + return nil + } + res["names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNames(res) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + res["vulnerabilityStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVulnerabilityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VulnerabilityStateable, len(val)) + for i, v := range val { + res[i] = v.(VulnerabilityStateable) + } + m.SetVulnerabilityStates(res) + } + return nil + } + return res +} +// GetFileType gets the fileType property value. The fileType property +func (m *FileSecurityProfile) GetFileType()(*string) { + return m.fileType +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *FileSecurityProfile) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetHashes gets the hashes property value. The hashes property +func (m *FileSecurityProfile) GetHashes()([]FileHashable) { + return m.hashes +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *FileSecurityProfile) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetMalwareStates gets the malwareStates property value. The malwareStates property +func (m *FileSecurityProfile) GetMalwareStates()([]MalwareStateable) { + return m.malwareStates +} +// GetNames gets the names property value. The names property +func (m *FileSecurityProfile) GetNames()([]string) { + return m.names +} +// GetRiskScore gets the riskScore property value. The riskScore property +func (m *FileSecurityProfile) GetRiskScore()(*string) { + return m.riskScore +} +// GetSize gets the size property value. The size property +func (m *FileSecurityProfile) GetSize()(*int64) { + return m.size +} +// GetTags gets the tags property value. The tags property +func (m *FileSecurityProfile) GetTags()([]string) { + return m.tags +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *FileSecurityProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// GetVulnerabilityStates gets the vulnerabilityStates property value. The vulnerabilityStates property +func (m *FileSecurityProfile) GetVulnerabilityStates()([]VulnerabilityStateable) { + return m.vulnerabilityStates +} +// Serialize serializes information the current object +func (m *FileSecurityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivityGroupNames() != nil { + err = writer.WriteCollectionOfStringValues("activityGroupNames", m.GetActivityGroupNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateThumbprint", m.GetCertificateThumbprint()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + err = writer.WriteCollectionOfStringValues("extensions", m.GetExtensions()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileType", m.GetFileType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + if m.GetHashes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHashes())) + for i, v := range m.GetHashes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("hashes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + if m.GetMalwareStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMalwareStates())) + for i, v := range m.GetMalwareStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("malwareStates", cast) + if err != nil { + return err + } + } + if m.GetNames() != nil { + err = writer.WriteCollectionOfStringValues("names", m.GetNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + if m.GetVulnerabilityStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVulnerabilityStates())) + for i, v := range m.GetVulnerabilityStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("vulnerabilityStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivityGroupNames sets the activityGroupNames property value. The activityGroupNames property +func (m *FileSecurityProfile) SetActivityGroupNames(value []string)() { + m.activityGroupNames = value +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *FileSecurityProfile) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *FileSecurityProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetCertificateThumbprint sets the certificateThumbprint property value. The certificateThumbprint property +func (m *FileSecurityProfile) SetCertificateThumbprint(value *string)() { + m.certificateThumbprint = value +} +// SetExtensions sets the extensions property value. The extensions property +func (m *FileSecurityProfile) SetExtensions(value []string)() { + m.extensions = value +} +// SetFileType sets the fileType property value. The fileType property +func (m *FileSecurityProfile) SetFileType(value *string)() { + m.fileType = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *FileSecurityProfile) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetHashes sets the hashes property value. The hashes property +func (m *FileSecurityProfile) SetHashes(value []FileHashable)() { + m.hashes = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *FileSecurityProfile) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetMalwareStates sets the malwareStates property value. The malwareStates property +func (m *FileSecurityProfile) SetMalwareStates(value []MalwareStateable)() { + m.malwareStates = value +} +// SetNames sets the names property value. The names property +func (m *FileSecurityProfile) SetNames(value []string)() { + m.names = value +} +// SetRiskScore sets the riskScore property value. The riskScore property +func (m *FileSecurityProfile) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetSize sets the size property value. The size property +func (m *FileSecurityProfile) SetSize(value *int64)() { + m.size = value +} +// SetTags sets the tags property value. The tags property +func (m *FileSecurityProfile) SetTags(value []string)() { + m.tags = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *FileSecurityProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} +// SetVulnerabilityStates sets the vulnerabilityStates property value. The vulnerabilityStates property +func (m *FileSecurityProfile) SetVulnerabilityStates(value []VulnerabilityStateable)() { + m.vulnerabilityStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/file_security_profile_collection_response.go new file mode 100644 index 000000000..a7a6ad327 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityProfileCollectionResponse +type FileSecurityProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FileSecurityProfileable +} +// NewFileSecurityProfileCollectionResponse instantiates a new FileSecurityProfileCollectionResponse and sets the default values. +func NewFileSecurityProfileCollectionResponse()(*FileSecurityProfileCollectionResponse) { + m := &FileSecurityProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileSecurityProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileSecurityProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileSecurityProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileSecurityProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(FileSecurityProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileSecurityProfileCollectionResponse) GetValue()([]FileSecurityProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileSecurityProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileSecurityProfileCollectionResponse) SetValue(value []FileSecurityProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/file_security_profile_collection_responseable.go new file mode 100644 index 000000000..66285d329 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityProfileCollectionResponseable +type FileSecurityProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileSecurityProfileable) + SetValue(value []FileSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_profileable.go b/src/internal/connector/graph/betasdk/models/file_security_profileable.go new file mode 100644 index 000000000..b5a4945e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_profileable.go @@ -0,0 +1,44 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityProfileable +type FileSecurityProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityGroupNames()([]string) + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetCertificateThumbprint()(*string) + GetExtensions()([]string) + GetFileType()(*string) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHashes()([]FileHashable) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMalwareStates()([]MalwareStateable) + GetNames()([]string) + GetRiskScore()(*string) + GetSize()(*int64) + GetTags()([]string) + GetVendorInformation()(SecurityVendorInformationable) + GetVulnerabilityStates()([]VulnerabilityStateable) + SetActivityGroupNames(value []string)() + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetCertificateThumbprint(value *string)() + SetExtensions(value []string)() + SetFileType(value *string)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHashes(value []FileHashable)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMalwareStates(value []MalwareStateable)() + SetNames(value []string)() + SetRiskScore(value *string)() + SetSize(value *int64)() + SetTags(value []string)() + SetVendorInformation(value SecurityVendorInformationable)() + SetVulnerabilityStates(value []VulnerabilityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_state.go b/src/internal/connector/graph/betasdk/models/file_security_state.go new file mode 100644 index 000000000..2ee5ac5c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_state.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityState +type FileSecurityState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Complex type containing file hashes (cryptographic and location-sensitive). + fileHash FileHashable + // File name (without path). + name *string + // The OdataType property + odataType *string + // Full file path of the file/imageFile. + path *string + // Provider generated/calculated risk score of the alert file. Recommended value range of 0-1, which equates to a percentage. + riskScore *string +} +// NewFileSecurityState instantiates a new fileSecurityState and sets the default values. +func NewFileSecurityState()(*FileSecurityState) { + m := &FileSecurityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFileSecurityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileSecurityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileSecurityState(), 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 *FileSecurityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileSecurityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileHash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileHashFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileHash(val.(FileHashable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + return res +} +// GetFileHash gets the fileHash property value. Complex type containing file hashes (cryptographic and location-sensitive). +func (m *FileSecurityState) GetFileHash()(FileHashable) { + return m.fileHash +} +// GetName gets the name property value. File name (without path). +func (m *FileSecurityState) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FileSecurityState) GetOdataType()(*string) { + return m.odataType +} +// GetPath gets the path property value. Full file path of the file/imageFile. +func (m *FileSecurityState) GetPath()(*string) { + return m.path +} +// GetRiskScore gets the riskScore property value. Provider generated/calculated risk score of the alert file. Recommended value range of 0-1, which equates to a percentage. +func (m *FileSecurityState) GetRiskScore()(*string) { + return m.riskScore +} +// Serialize serializes information the current object +func (m *FileSecurityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("fileHash", m.GetFileHash()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("riskScore", m.GetRiskScore()) + 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 *FileSecurityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFileHash sets the fileHash property value. Complex type containing file hashes (cryptographic and location-sensitive). +func (m *FileSecurityState) SetFileHash(value FileHashable)() { + m.fileHash = value +} +// SetName sets the name property value. File name (without path). +func (m *FileSecurityState) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FileSecurityState) SetOdataType(value *string)() { + m.odataType = value +} +// SetPath sets the path property value. Full file path of the file/imageFile. +func (m *FileSecurityState) SetPath(value *string)() { + m.path = value +} +// SetRiskScore sets the riskScore property value. Provider generated/calculated risk score of the alert file. Recommended value range of 0-1, which equates to a percentage. +func (m *FileSecurityState) SetRiskScore(value *string)() { + m.riskScore = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_state_collection_response.go b/src/internal/connector/graph/betasdk/models/file_security_state_collection_response.go new file mode 100644 index 000000000..39b1806ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityStateCollectionResponse +type FileSecurityStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FileSecurityStateable +} +// NewFileSecurityStateCollectionResponse instantiates a new FileSecurityStateCollectionResponse and sets the default values. +func NewFileSecurityStateCollectionResponse()(*FileSecurityStateCollectionResponse) { + m := &FileSecurityStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileSecurityStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileSecurityStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(FileSecurityStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileSecurityStateCollectionResponse) GetValue()([]FileSecurityStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileSecurityStateCollectionResponse) SetValue(value []FileSecurityStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/file_security_state_collection_responseable.go new file mode 100644 index 000000000..3012498d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityStateCollectionResponseable +type FileSecurityStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileSecurityStateable) + SetValue(value []FileSecurityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_security_stateable.go b/src/internal/connector/graph/betasdk/models/file_security_stateable.go new file mode 100644 index 000000000..d08f9972d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_security_stateable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSecurityStateable +type FileSecurityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileHash()(FileHashable) + GetName()(*string) + GetOdataType()(*string) + GetPath()(*string) + GetRiskScore()(*string) + SetFileHash(value FileHashable)() + SetName(value *string)() + SetOdataType(value *string)() + SetPath(value *string)() + SetRiskScore(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_system_info.go b/src/internal/connector/graph/betasdk/models/file_system_info.go new file mode 100644 index 000000000..72c7e4b70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_system_info.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSystemInfo +type FileSystemInfo 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 UTC date and time the file was created on a client. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The UTC date and time the file was last accessed. Available for the recent file list only. + lastAccessedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The UTC date and time the file was last modified on a client. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewFileSystemInfo instantiates a new fileSystemInfo and sets the default values. +func NewFileSystemInfo()(*FileSystemInfo) { + m := &FileSystemInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFileSystemInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileSystemInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileSystemInfo(), 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 *FileSystemInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedDateTime gets the createdDateTime property value. The UTC date and time the file was created on a client. +func (m *FileSystemInfo) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileSystemInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastAccessedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastAccessedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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 + } + return res +} +// GetLastAccessedDateTime gets the lastAccessedDateTime property value. The UTC date and time the file was last accessed. Available for the recent file list only. +func (m *FileSystemInfo) GetLastAccessedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastAccessedDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The UTC date and time the file was last modified on a client. +func (m *FileSystemInfo) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FileSystemInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *FileSystemInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastAccessedDateTime", m.GetLastAccessedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *FileSystemInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedDateTime sets the createdDateTime property value. The UTC date and time the file was created on a client. +func (m *FileSystemInfo) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastAccessedDateTime sets the lastAccessedDateTime property value. The UTC date and time the file was last accessed. Available for the recent file list only. +func (m *FileSystemInfo) SetLastAccessedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastAccessedDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The UTC date and time the file was last modified on a client. +func (m *FileSystemInfo) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FileSystemInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/file_system_infoable.go b/src/internal/connector/graph/betasdk/models/file_system_infoable.go new file mode 100644 index 000000000..5e56af577 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_system_infoable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileSystemInfoable +type FileSystemInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastAccessedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastAccessedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/file_vault_state.go b/src/internal/connector/graph/betasdk/models/file_vault_state.go new file mode 100644 index 000000000..4b54e98af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/file_vault_state.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FileVaultState int + +const ( + // FileVault State Success + SUCCESS_FILEVAULTSTATE FileVaultState = iota + // FileVault has been enabled by user and is not being managed by policy + DRIVEENCRYPTEDBYUSER_FILEVAULTSTATE + // FileVault policy is successfully installed but user has not started encryption + USERDEFERREDENCRYPTION_FILEVAULTSTATE + // FileVault recovery key escrow is not enabled + ESCROWNOTENABLED_FILEVAULTSTATE +) + +func (i FileVaultState) String() string { + return []string{"success", "driveEncryptedByUser", "userDeferredEncryption", "escrowNotEnabled"}[i] +} +func ParseFileVaultState(v string) (interface{}, error) { + result := SUCCESS_FILEVAULTSTATE + switch v { + case "success": + result = SUCCESS_FILEVAULTSTATE + case "driveEncryptedByUser": + result = DRIVEENCRYPTEDBYUSER_FILEVAULTSTATE + case "userDeferredEncryption": + result = USERDEFERREDENCRYPTION_FILEVAULTSTATE + case "escrowNotEnabled": + result = ESCROWNOTENABLED_FILEVAULTSTATE + default: + return 0, errors.New("Unknown FileVaultState value: " + v) + } + return &result, nil +} +func SerializeFileVaultState(values []FileVaultState) []string { + 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/fileable.go b/src/internal/connector/graph/betasdk/models/fileable.go new file mode 100644 index 000000000..09ce51a81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/fileable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Fileable +type Fileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHashes()(Hashesable) + GetMimeType()(*string) + GetOdataType()(*string) + GetProcessingMetadata()(*bool) + SetHashes(value Hashesable)() + SetMimeType(value *string)() + SetOdataType(value *string)() + SetProcessingMetadata(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter.go b/src/internal/connector/graph/betasdk/models/filter.go new file mode 100644 index 000000000..78426e27a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter.go @@ -0,0 +1,173 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Filter +type Filter struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // *Experimental* Filter group set used to decide whether given object belongs and should be processed as part of this object mapping. An object is considered in scope if ANY of the groups in the collection is evaluated to true. + categoryFilterGroups []FilterGroupable + // Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is not satisfied any longer, such object will get de-provisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. + groups []FilterGroupable + // *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get de-provisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. + inputFilterGroups []FilterGroupable + // The OdataType property + odataType *string +} +// NewFilter instantiates a new filter and sets the default values. +func NewFilter()(*Filter) { + m := &Filter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilter(), 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 *Filter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategoryFilterGroups gets the categoryFilterGroups property value. *Experimental* Filter group set used to decide whether given object belongs and should be processed as part of this object mapping. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) GetCategoryFilterGroups()([]FilterGroupable) { + return m.categoryFilterGroups +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Filter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["categoryFilterGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterGroupable, len(val)) + for i, v := range val { + res[i] = v.(FilterGroupable) + } + m.SetCategoryFilterGroups(res) + } + return nil + } + res["groups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterGroupable, len(val)) + for i, v := range val { + res[i] = v.(FilterGroupable) + } + m.SetGroups(res) + } + return nil + } + res["inputFilterGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterGroupable, len(val)) + for i, v := range val { + res[i] = v.(FilterGroupable) + } + m.SetInputFilterGroups(res) + } + 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 + } + return res +} +// GetGroups gets the groups property value. Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is not satisfied any longer, such object will get de-provisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) GetGroups()([]FilterGroupable) { + return m.groups +} +// GetInputFilterGroups gets the inputFilterGroups property value. *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get de-provisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) GetInputFilterGroups()([]FilterGroupable) { + return m.inputFilterGroups +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Filter) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Filter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCategoryFilterGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategoryFilterGroups())) + for i, v := range m.GetCategoryFilterGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("categoryFilterGroups", cast) + if err != nil { + return err + } + } + if m.GetGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroups())) + for i, v := range m.GetGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("groups", cast) + if err != nil { + return err + } + } + if m.GetInputFilterGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInputFilterGroups())) + for i, v := range m.GetInputFilterGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("inputFilterGroups", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Filter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategoryFilterGroups sets the categoryFilterGroups property value. *Experimental* Filter group set used to decide whether given object belongs and should be processed as part of this object mapping. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) SetCategoryFilterGroups(value []FilterGroupable)() { + m.categoryFilterGroups = value +} +// SetGroups sets the groups property value. Filter group set used to decide whether given object is in scope for provisioning. This is the filter which should be used in most cases. If an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is not satisfied any longer, such object will get de-provisioned'. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) SetGroups(value []FilterGroupable)() { + m.groups = value +} +// SetInputFilterGroups sets the inputFilterGroups property value. *Experimental* Filter group set used to filter out objects at the early stage of reading them from the directory. If an object doesn't satisfy this filter it will not be processed further. Important to understand is that if an object used to satisfy this filter at a given moment, and then the object or the filter was changed so that filter is no longer satisfied, such object will NOT get de-provisioned. An object is considered in scope if ANY of the groups in the collection is evaluated to true. +func (m *Filter) SetInputFilterGroups(value []FilterGroupable)() { + m.inputFilterGroups = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Filter) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_clause.go b/src/internal/connector/graph/betasdk/models/filter_clause.go new file mode 100644 index 000000000..ea4d2ecb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_clause.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterClause +type FilterClause 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 OdataType property + odataType *string + // Name of the operator to be applied to the source and target operands. Must be one of the supported operators. Supported operators can be discovered. + operatorName *string + // Name of source operand (the operand being tested). The source operand name must match one of the attribute names on the source object. + sourceOperandName *string + // Values that the source operand will be tested against. + targetOperand FilterOperandable +} +// NewFilterClause instantiates a new filterClause and sets the default values. +func NewFilterClause()(*FilterClause) { + m := &FilterClause{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFilterClauseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterClauseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterClause(), 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 *FilterClause) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterClause) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["operatorName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatorName(val) + } + return nil + } + res["sourceOperandName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceOperandName(val) + } + return nil + } + res["targetOperand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFilterOperandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetOperand(val.(FilterOperandable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FilterClause) GetOdataType()(*string) { + return m.odataType +} +// GetOperatorName gets the operatorName property value. Name of the operator to be applied to the source and target operands. Must be one of the supported operators. Supported operators can be discovered. +func (m *FilterClause) GetOperatorName()(*string) { + return m.operatorName +} +// GetSourceOperandName gets the sourceOperandName property value. Name of source operand (the operand being tested). The source operand name must match one of the attribute names on the source object. +func (m *FilterClause) GetSourceOperandName()(*string) { + return m.sourceOperandName +} +// GetTargetOperand gets the targetOperand property value. Values that the source operand will be tested against. +func (m *FilterClause) GetTargetOperand()(FilterOperandable) { + return m.targetOperand +} +// Serialize serializes information the current object +func (m *FilterClause) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatorName", m.GetOperatorName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceOperandName", m.GetSourceOperandName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("targetOperand", m.GetTargetOperand()) + 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 *FilterClause) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FilterClause) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperatorName sets the operatorName property value. Name of the operator to be applied to the source and target operands. Must be one of the supported operators. Supported operators can be discovered. +func (m *FilterClause) SetOperatorName(value *string)() { + m.operatorName = value +} +// SetSourceOperandName sets the sourceOperandName property value. Name of source operand (the operand being tested). The source operand name must match one of the attribute names on the source object. +func (m *FilterClause) SetSourceOperandName(value *string)() { + m.sourceOperandName = value +} +// SetTargetOperand sets the targetOperand property value. Values that the source operand will be tested against. +func (m *FilterClause) SetTargetOperand(value FilterOperandable)() { + m.targetOperand = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_clause_collection_response.go b/src/internal/connector/graph/betasdk/models/filter_clause_collection_response.go new file mode 100644 index 000000000..167087bfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_clause_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterClauseCollectionResponse +type FilterClauseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FilterClauseable +} +// NewFilterClauseCollectionResponse instantiates a new FilterClauseCollectionResponse and sets the default values. +func NewFilterClauseCollectionResponse()(*FilterClauseCollectionResponse) { + m := &FilterClauseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFilterClauseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterClauseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterClauseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterClauseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterClauseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterClauseable, len(val)) + for i, v := range val { + res[i] = v.(FilterClauseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FilterClauseCollectionResponse) GetValue()([]FilterClauseable) { + return m.value +} +// Serialize serializes information the current object +func (m *FilterClauseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FilterClauseCollectionResponse) SetValue(value []FilterClauseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_clause_collection_responseable.go b/src/internal/connector/graph/betasdk/models/filter_clause_collection_responseable.go new file mode 100644 index 000000000..4e4da39cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_clause_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterClauseCollectionResponseable +type FilterClauseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FilterClauseable) + SetValue(value []FilterClauseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_clauseable.go b/src/internal/connector/graph/betasdk/models/filter_clauseable.go new file mode 100644 index 000000000..75d518b1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_clauseable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterClauseable +type FilterClauseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOperatorName()(*string) + GetSourceOperandName()(*string) + GetTargetOperand()(FilterOperandable) + SetOdataType(value *string)() + SetOperatorName(value *string)() + SetSourceOperandName(value *string)() + SetTargetOperand(value FilterOperandable)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_group.go b/src/internal/connector/graph/betasdk/models/filter_group.go new file mode 100644 index 000000000..a9f12097e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_group.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterGroup +type FilterGroup struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Filter clauses (conditions) of this group. All clauses in a group must be satisfied in order for the filter group to evaluate to true. + clauses []FilterClauseable + // Human-readable name of the filter group. + name *string + // The OdataType property + odataType *string +} +// NewFilterGroup instantiates a new filterGroup and sets the default values. +func NewFilterGroup()(*FilterGroup) { + m := &FilterGroup{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFilterGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterGroup(), 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 *FilterGroup) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClauses gets the clauses property value. Filter clauses (conditions) of this group. All clauses in a group must be satisfied in order for the filter group to evaluate to true. +func (m *FilterGroup) GetClauses()([]FilterClauseable) { + return m.clauses +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["clauses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterClauseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterClauseable, len(val)) + for i, v := range val { + res[i] = v.(FilterClauseable) + } + m.SetClauses(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetName gets the name property value. Human-readable name of the filter group. +func (m *FilterGroup) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FilterGroup) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *FilterGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetClauses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClauses())) + for i, v := range m.GetClauses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("clauses", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *FilterGroup) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClauses sets the clauses property value. Filter clauses (conditions) of this group. All clauses in a group must be satisfied in order for the filter group to evaluate to true. +func (m *FilterGroup) SetClauses(value []FilterClauseable)() { + m.clauses = value +} +// SetName sets the name property value. Human-readable name of the filter group. +func (m *FilterGroup) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FilterGroup) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_group_collection_response.go b/src/internal/connector/graph/betasdk/models/filter_group_collection_response.go new file mode 100644 index 000000000..ad53b4727 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterGroupCollectionResponse +type FilterGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FilterGroupable +} +// NewFilterGroupCollectionResponse instantiates a new FilterGroupCollectionResponse and sets the default values. +func NewFilterGroupCollectionResponse()(*FilterGroupCollectionResponse) { + m := &FilterGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFilterGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterGroupable, len(val)) + for i, v := range val { + res[i] = v.(FilterGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FilterGroupCollectionResponse) GetValue()([]FilterGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *FilterGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FilterGroupCollectionResponse) SetValue(value []FilterGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/filter_group_collection_responseable.go new file mode 100644 index 000000000..3107bc57b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterGroupCollectionResponseable +type FilterGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FilterGroupable) + SetValue(value []FilterGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_groupable.go b/src/internal/connector/graph/betasdk/models/filter_groupable.go new file mode 100644 index 000000000..4c9993a99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_groupable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterGroupable +type FilterGroupable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClauses()([]FilterClauseable) + GetName()(*string) + GetOdataType()(*string) + SetClauses(value []FilterClauseable)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_mode.go b/src/internal/connector/graph/betasdk/models/filter_mode.go new file mode 100644 index 000000000..8e0371b7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_mode.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FilterMode int + +const ( + INCLUDE_FILTERMODE FilterMode = iota + EXCLUDE_FILTERMODE +) + +func (i FilterMode) String() string { + return []string{"include", "exclude"}[i] +} +func ParseFilterMode(v string) (interface{}, error) { + result := INCLUDE_FILTERMODE + switch v { + case "include": + result = INCLUDE_FILTERMODE + case "exclude": + result = EXCLUDE_FILTERMODE + default: + return 0, errors.New("Unknown FilterMode value: " + v) + } + return &result, nil +} +func SerializeFilterMode(values []FilterMode) []string { + 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/filter_operand.go b/src/internal/connector/graph/betasdk/models/filter_operand.go new file mode 100644 index 000000000..198c45e2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operand.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperand +type FilterOperand 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 OdataType property + odataType *string + // Collection of values. + values []string +} +// NewFilterOperand instantiates a new filterOperand and sets the default values. +func NewFilterOperand()(*FilterOperand) { + m := &FilterOperand{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFilterOperandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterOperandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterOperand(), 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 *FilterOperand) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterOperand) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FilterOperand) GetOdataType()(*string) { + return m.odataType +} +// GetValues gets the values property value. Collection of values. +func (m *FilterOperand) GetValues()([]string) { + return m.values +} +// Serialize serializes information the current object +func (m *FilterOperand) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + err := writer.WriteCollectionOfStringValues("values", m.GetValues()) + 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 *FilterOperand) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FilterOperand) SetOdataType(value *string)() { + m.odataType = value +} +// SetValues sets the values property value. Collection of values. +func (m *FilterOperand) SetValues(value []string)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_operandable.go b/src/internal/connector/graph/betasdk/models/filter_operandable.go new file mode 100644 index 000000000..e3c84c0f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operandable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperandable +type FilterOperandable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetValues()([]string) + SetOdataType(value *string)() + SetValues(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_operator_schema.go b/src/internal/connector/graph/betasdk/models/filter_operator_schema.go new file mode 100644 index 000000000..cdad37c85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operator_schema.go @@ -0,0 +1,118 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperatorSchema +type FilterOperatorSchema struct { + Entity + // The arity property + arity *ScopeOperatorType + // The multivaluedComparisonType property + multivaluedComparisonType *ScopeOperatorMultiValuedComparisonType + // Attribute types supported by the operator. Possible values are: Boolean, Binary, Reference, Integer, String. + supportedAttributeTypes []AttributeType +} +// NewFilterOperatorSchema instantiates a new FilterOperatorSchema and sets the default values. +func NewFilterOperatorSchema()(*FilterOperatorSchema) { + m := &FilterOperatorSchema{ + Entity: *NewEntity(), + } + return m +} +// CreateFilterOperatorSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterOperatorSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterOperatorSchema(), nil +} +// GetArity gets the arity property value. The arity property +func (m *FilterOperatorSchema) GetArity()(*ScopeOperatorType) { + return m.arity +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterOperatorSchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["arity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScopeOperatorType) + if err != nil { + return err + } + if val != nil { + m.SetArity(val.(*ScopeOperatorType)) + } + return nil + } + res["multivaluedComparisonType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScopeOperatorMultiValuedComparisonType) + if err != nil { + return err + } + if val != nil { + m.SetMultivaluedComparisonType(val.(*ScopeOperatorMultiValuedComparisonType)) + } + return nil + } + res["supportedAttributeTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseAttributeType) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeType, len(val)) + for i, v := range val { + res[i] = *(v.(*AttributeType)) + } + m.SetSupportedAttributeTypes(res) + } + return nil + } + return res +} +// GetMultivaluedComparisonType gets the multivaluedComparisonType property value. The multivaluedComparisonType property +func (m *FilterOperatorSchema) GetMultivaluedComparisonType()(*ScopeOperatorMultiValuedComparisonType) { + return m.multivaluedComparisonType +} +// GetSupportedAttributeTypes gets the supportedAttributeTypes property value. Attribute types supported by the operator. Possible values are: Boolean, Binary, Reference, Integer, String. +func (m *FilterOperatorSchema) GetSupportedAttributeTypes()([]AttributeType) { + return m.supportedAttributeTypes +} +// Serialize serializes information the current object +func (m *FilterOperatorSchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetArity() != nil { + cast := (*m.GetArity()).String() + err = writer.WriteStringValue("arity", &cast) + if err != nil { + return err + } + } + if m.GetMultivaluedComparisonType() != nil { + cast := (*m.GetMultivaluedComparisonType()).String() + err = writer.WriteStringValue("multivaluedComparisonType", &cast) + if err != nil { + return err + } + } + if m.GetSupportedAttributeTypes() != nil { + err = writer.WriteCollectionOfStringValues("supportedAttributeTypes", SerializeAttributeType(m.GetSupportedAttributeTypes())) + if err != nil { + return err + } + } + return nil +} +// SetArity sets the arity property value. The arity property +func (m *FilterOperatorSchema) SetArity(value *ScopeOperatorType)() { + m.arity = value +} +// SetMultivaluedComparisonType sets the multivaluedComparisonType property value. The multivaluedComparisonType property +func (m *FilterOperatorSchema) SetMultivaluedComparisonType(value *ScopeOperatorMultiValuedComparisonType)() { + m.multivaluedComparisonType = value +} +// SetSupportedAttributeTypes sets the supportedAttributeTypes property value. Attribute types supported by the operator. Possible values are: Boolean, Binary, Reference, Integer, String. +func (m *FilterOperatorSchema) SetSupportedAttributeTypes(value []AttributeType)() { + m.supportedAttributeTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_response.go new file mode 100644 index 000000000..4c3622c37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperatorSchemaCollectionResponse +type FilterOperatorSchemaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FilterOperatorSchemaable +} +// NewFilterOperatorSchemaCollectionResponse instantiates a new FilterOperatorSchemaCollectionResponse and sets the default values. +func NewFilterOperatorSchemaCollectionResponse()(*FilterOperatorSchemaCollectionResponse) { + m := &FilterOperatorSchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFilterOperatorSchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFilterOperatorSchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFilterOperatorSchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FilterOperatorSchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFilterOperatorSchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FilterOperatorSchemaable, len(val)) + for i, v := range val { + res[i] = v.(FilterOperatorSchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FilterOperatorSchemaCollectionResponse) GetValue()([]FilterOperatorSchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *FilterOperatorSchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FilterOperatorSchemaCollectionResponse) SetValue(value []FilterOperatorSchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_responseable.go new file mode 100644 index 000000000..4c01541d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operator_schema_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperatorSchemaCollectionResponseable +type FilterOperatorSchemaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FilterOperatorSchemaable) + SetValue(value []FilterOperatorSchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/filter_operator_schemaable.go b/src/internal/connector/graph/betasdk/models/filter_operator_schemaable.go new file mode 100644 index 000000000..3772ccf9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filter_operator_schemaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FilterOperatorSchemaable +type FilterOperatorSchemaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArity()(*ScopeOperatorType) + GetMultivaluedComparisonType()(*ScopeOperatorMultiValuedComparisonType) + GetSupportedAttributeTypes()([]AttributeType) + SetArity(value *ScopeOperatorType)() + SetMultivaluedComparisonType(value *ScopeOperatorMultiValuedComparisonType)() + SetSupportedAttributeTypes(value []AttributeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/filterable.go b/src/internal/connector/graph/betasdk/models/filterable.go new file mode 100644 index 000000000..825143932 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/filterable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Filterable +type Filterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategoryFilterGroups()([]FilterGroupable) + GetGroups()([]FilterGroupable) + GetInputFilterGroups()([]FilterGroupable) + GetOdataType()(*string) + SetCategoryFilterGroups(value []FilterGroupable)() + SetGroups(value []FilterGroupable)() + SetInputFilterGroups(value []FilterGroupable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/firewall_certificate_revocation_list_check_method_type.go b/src/internal/connector/graph/betasdk/models/firewall_certificate_revocation_list_check_method_type.go new file mode 100644 index 000000000..519075287 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/firewall_certificate_revocation_list_check_method_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FirewallCertificateRevocationListCheckMethodType int + +const ( + // No value configured by Intune, do not override the user-configured device default value + DEVICEDEFAULT_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE FirewallCertificateRevocationListCheckMethodType = iota + // Do not check certificate revocation list + NONE_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + // Attempt CRL check and allow a certificate only if the certificate is confirmed by the check + ATTEMPT_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + // Require a successful CRL check before allowing a certificate + REQUIRE_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE +) + +func (i FirewallCertificateRevocationListCheckMethodType) String() string { + return []string{"deviceDefault", "none", "attempt", "require"}[i] +} +func ParseFirewallCertificateRevocationListCheckMethodType(v string) (interface{}, error) { + result := DEVICEDEFAULT_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + case "none": + result = NONE_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + case "attempt": + result = ATTEMPT_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + case "require": + result = REQUIRE_FIREWALLCERTIFICATEREVOCATIONLISTCHECKMETHODTYPE + default: + return 0, errors.New("Unknown FirewallCertificateRevocationListCheckMethodType value: " + v) + } + return &result, nil +} +func SerializeFirewallCertificateRevocationListCheckMethodType(values []FirewallCertificateRevocationListCheckMethodType) []string { + 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/firewall_packet_queueing_method_type.go b/src/internal/connector/graph/betasdk/models/firewall_packet_queueing_method_type.go new file mode 100644 index 000000000..19376789c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/firewall_packet_queueing_method_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FirewallPacketQueueingMethodType int + +const ( + // No value configured by Intune, do not override the user-configured device default value + DEVICEDEFAULT_FIREWALLPACKETQUEUEINGMETHODTYPE FirewallPacketQueueingMethodType = iota + // Disable packet queuing + DISABLED_FIREWALLPACKETQUEUEINGMETHODTYPE + // Queue inbound encrypted packets + QUEUEINBOUND_FIREWALLPACKETQUEUEINGMETHODTYPE + // Queue decrypted outbound packets for forwarding + QUEUEOUTBOUND_FIREWALLPACKETQUEUEINGMETHODTYPE + // Queue both inbound and outbound packets + QUEUEBOTH_FIREWALLPACKETQUEUEINGMETHODTYPE +) + +func (i FirewallPacketQueueingMethodType) String() string { + return []string{"deviceDefault", "disabled", "queueInbound", "queueOutbound", "queueBoth"}[i] +} +func ParseFirewallPacketQueueingMethodType(v string) (interface{}, error) { + result := DEVICEDEFAULT_FIREWALLPACKETQUEUEINGMETHODTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_FIREWALLPACKETQUEUEINGMETHODTYPE + case "disabled": + result = DISABLED_FIREWALLPACKETQUEUEINGMETHODTYPE + case "queueInbound": + result = QUEUEINBOUND_FIREWALLPACKETQUEUEINGMETHODTYPE + case "queueOutbound": + result = QUEUEOUTBOUND_FIREWALLPACKETQUEUEINGMETHODTYPE + case "queueBoth": + result = QUEUEBOTH_FIREWALLPACKETQUEUEINGMETHODTYPE + default: + return 0, errors.New("Unknown FirewallPacketQueueingMethodType value: " + v) + } + return &result, nil +} +func SerializeFirewallPacketQueueingMethodType(values []FirewallPacketQueueingMethodType) []string { + 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/firewall_pre_shared_key_encoding_method_type.go b/src/internal/connector/graph/betasdk/models/firewall_pre_shared_key_encoding_method_type.go new file mode 100644 index 000000000..448b852c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/firewall_pre_shared_key_encoding_method_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FirewallPreSharedKeyEncodingMethodType int + +const ( + // No value configured by Intune, do not override the user-configured device default value + DEVICEDEFAULT_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE FirewallPreSharedKeyEncodingMethodType = iota + // Preshared key is not encoded. Instead, it is kept in its wide-character format + NONE_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE + // Encode the preshared key using UTF-8 + UTF8_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE +) + +func (i FirewallPreSharedKeyEncodingMethodType) String() string { + return []string{"deviceDefault", "none", "utF8"}[i] +} +func ParseFirewallPreSharedKeyEncodingMethodType(v string) (interface{}, error) { + result := DEVICEDEFAULT_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE + case "none": + result = NONE_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE + case "utF8": + result = UTF8_FIREWALLPRESHAREDKEYENCODINGMETHODTYPE + default: + return 0, errors.New("Unknown FirewallPreSharedKeyEncodingMethodType value: " + v) + } + return &result, nil +} +func SerializeFirewallPreSharedKeyEncodingMethodType(values []FirewallPreSharedKeyEncodingMethodType) []string { + 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/focus_activity_statistics.go b/src/internal/connector/graph/betasdk/models/focus_activity_statistics.go new file mode 100644 index 000000000..4bcf21457 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/focus_activity_statistics.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FocusActivityStatistics +type FocusActivityStatistics struct { + ActivityStatistics +} +// NewFocusActivityStatistics instantiates a new FocusActivityStatistics and sets the default values. +func NewFocusActivityStatistics()(*FocusActivityStatistics) { + m := &FocusActivityStatistics{ + ActivityStatistics: *NewActivityStatistics(), + } + odataTypeValue := "#microsoft.graph.focusActivityStatistics"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFocusActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFocusActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFocusActivityStatistics(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FocusActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ActivityStatistics.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *FocusActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ActivityStatistics.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_response.go new file mode 100644 index 000000000..0c52202ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FocusActivityStatisticsCollectionResponse +type FocusActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []FocusActivityStatisticsable +} +// NewFocusActivityStatisticsCollectionResponse instantiates a new FocusActivityStatisticsCollectionResponse and sets the default values. +func NewFocusActivityStatisticsCollectionResponse()(*FocusActivityStatisticsCollectionResponse) { + m := &FocusActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFocusActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFocusActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFocusActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FocusActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFocusActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FocusActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(FocusActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FocusActivityStatisticsCollectionResponse) GetValue()([]FocusActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *FocusActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FocusActivityStatisticsCollectionResponse) SetValue(value []FocusActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_responseable.go new file mode 100644 index 000000000..790ec6e69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/focus_activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FocusActivityStatisticsCollectionResponseable +type FocusActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FocusActivityStatisticsable) + SetValue(value []FocusActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/focus_activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/focus_activity_statisticsable.go new file mode 100644 index 000000000..04d5e4292 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/focus_activity_statisticsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FocusActivityStatisticsable +type FocusActivityStatisticsable interface { + ActivityStatisticsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/folder.go b/src/internal/connector/graph/betasdk/models/folder.go new file mode 100644 index 000000000..e6c0fafce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/folder.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Folder +type Folder struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Number of children contained immediately within this container. + childCount *int32 + // The OdataType property + odataType *string + // A collection of properties defining the recommended view for the folder. + view FolderViewable +} +// NewFolder instantiates a new folder and sets the default values. +func NewFolder()(*Folder) { + m := &Folder{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFolder(), 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 *Folder) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetChildCount gets the childCount property value. Number of children contained immediately within this container. +func (m *Folder) GetChildCount()(*int32) { + return m.childCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Folder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["childCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChildCount(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["view"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFolderViewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetView(val.(FolderViewable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Folder) GetOdataType()(*string) { + return m.odataType +} +// GetView gets the view property value. A collection of properties defining the recommended view for the folder. +func (m *Folder) GetView()(FolderViewable) { + return m.view +} +// Serialize serializes information the current object +func (m *Folder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("childCount", m.GetChildCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("view", m.GetView()) + 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 *Folder) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetChildCount sets the childCount property value. Number of children contained immediately within this container. +func (m *Folder) SetChildCount(value *int32)() { + m.childCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Folder) SetOdataType(value *string)() { + m.odataType = value +} +// SetView sets the view property value. A collection of properties defining the recommended view for the folder. +func (m *Folder) SetView(value FolderViewable)() { + m.view = value +} diff --git a/src/internal/connector/graph/betasdk/models/folder_protection_type.go b/src/internal/connector/graph/betasdk/models/folder_protection_type.go new file mode 100644 index 000000000..cbc31ca61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/folder_protection_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FolderProtectionType int + +const ( + // Device default value, no intent. + USERDEFINED_FOLDERPROTECTIONTYPE FolderProtectionType = iota + // Block functionality. + ENABLE_FOLDERPROTECTIONTYPE + // Allow functionality but generate logs. + AUDITMODE_FOLDERPROTECTIONTYPE + // Block untrusted apps from writing to disk sectors. + BLOCKDISKMODIFICATION_FOLDERPROTECTIONTYPE + // Generate logs when untrusted apps write to disk sectors. + AUDITDISKMODIFICATION_FOLDERPROTECTIONTYPE +) + +func (i FolderProtectionType) String() string { + return []string{"userDefined", "enable", "auditMode", "blockDiskModification", "auditDiskModification"}[i] +} +func ParseFolderProtectionType(v string) (interface{}, error) { + result := USERDEFINED_FOLDERPROTECTIONTYPE + switch v { + case "userDefined": + result = USERDEFINED_FOLDERPROTECTIONTYPE + case "enable": + result = ENABLE_FOLDERPROTECTIONTYPE + case "auditMode": + result = AUDITMODE_FOLDERPROTECTIONTYPE + case "blockDiskModification": + result = BLOCKDISKMODIFICATION_FOLDERPROTECTIONTYPE + case "auditDiskModification": + result = AUDITDISKMODIFICATION_FOLDERPROTECTIONTYPE + default: + return 0, errors.New("Unknown FolderProtectionType value: " + v) + } + return &result, nil +} +func SerializeFolderProtectionType(values []FolderProtectionType) []string { + 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/folder_view.go b/src/internal/connector/graph/betasdk/models/folder_view.go new file mode 100644 index 000000000..9eefba3bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/folder_view.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FolderView +type FolderView 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 OdataType property + odataType *string + // The method by which the folder should be sorted. + sortBy *string + // If true, indicates that items should be sorted in descending order. Otherwise, items should be sorted ascending. + sortOrder *string + // The type of view that should be used to represent the folder. + viewType *string +} +// NewFolderView instantiates a new folderView and sets the default values. +func NewFolderView()(*FolderView) { + m := &FolderView{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFolderViewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFolderViewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFolderView(), 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 *FolderView) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FolderView) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["sortBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSortBy(val) + } + return nil + } + res["sortOrder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSortOrder(val) + } + return nil + } + res["viewType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetViewType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FolderView) GetOdataType()(*string) { + return m.odataType +} +// GetSortBy gets the sortBy property value. The method by which the folder should be sorted. +func (m *FolderView) GetSortBy()(*string) { + return m.sortBy +} +// GetSortOrder gets the sortOrder property value. If true, indicates that items should be sorted in descending order. Otherwise, items should be sorted ascending. +func (m *FolderView) GetSortOrder()(*string) { + return m.sortOrder +} +// GetViewType gets the viewType property value. The type of view that should be used to represent the folder. +func (m *FolderView) GetViewType()(*string) { + return m.viewType +} +// Serialize serializes information the current object +func (m *FolderView) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sortBy", m.GetSortBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sortOrder", m.GetSortOrder()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("viewType", m.GetViewType()) + 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 *FolderView) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FolderView) SetOdataType(value *string)() { + m.odataType = value +} +// SetSortBy sets the sortBy property value. The method by which the folder should be sorted. +func (m *FolderView) SetSortBy(value *string)() { + m.sortBy = value +} +// SetSortOrder sets the sortOrder property value. If true, indicates that items should be sorted in descending order. Otherwise, items should be sorted ascending. +func (m *FolderView) SetSortOrder(value *string)() { + m.sortOrder = value +} +// SetViewType sets the viewType property value. The type of view that should be used to represent the folder. +func (m *FolderView) SetViewType(value *string)() { + m.viewType = value +} diff --git a/src/internal/connector/graph/betasdk/models/folder_viewable.go b/src/internal/connector/graph/betasdk/models/folder_viewable.go new file mode 100644 index 000000000..a753eef23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/folder_viewable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FolderViewable +type FolderViewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSortBy()(*string) + GetSortOrder()(*string) + GetViewType()(*string) + SetOdataType(value *string)() + SetSortBy(value *string)() + SetSortOrder(value *string)() + SetViewType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/folderable.go b/src/internal/connector/graph/betasdk/models/folderable.go new file mode 100644 index 000000000..262aa5f78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/folderable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Folderable +type Folderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildCount()(*int32) + GetOdataType()(*string) + GetView()(FolderViewable) + SetChildCount(value *int32)() + SetOdataType(value *string)() + SetView(value FolderViewable)() +} diff --git a/src/internal/connector/graph/betasdk/models/followup_flag.go b/src/internal/connector/graph/betasdk/models/followup_flag.go new file mode 100644 index 000000000..4fe59c7aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/followup_flag.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FollowupFlag +type FollowupFlag 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 date and time that the follow-up was finished. + completedDateTime DateTimeTimeZoneable + // The date and time that the follow up is to be finished. Note: To set the due date, you must also specify the startDateTime; otherwise, you will get a 400 Bad Request response. + dueDateTime DateTimeTimeZoneable + // The status for follow-up for an item. Possible values are notFlagged, complete, and flagged. + flagStatus *FollowupFlagStatus + // The OdataType property + odataType *string + // The date and time that the follow-up is to begin. + startDateTime DateTimeTimeZoneable +} +// NewFollowupFlag instantiates a new followupFlag and sets the default values. +func NewFollowupFlag()(*FollowupFlag) { + m := &FollowupFlag{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFollowupFlagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFollowupFlagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFollowupFlag(), 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 *FollowupFlag) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCompletedDateTime gets the completedDateTime property value. The date and time that the follow-up was finished. +func (m *FollowupFlag) GetCompletedDateTime()(DateTimeTimeZoneable) { + return m.completedDateTime +} +// GetDueDateTime gets the dueDateTime property value. The date and time that the follow up is to be finished. Note: To set the due date, you must also specify the startDateTime; otherwise, you will get a 400 Bad Request response. +func (m *FollowupFlag) GetDueDateTime()(DateTimeTimeZoneable) { + return m.dueDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FollowupFlag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["flagStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFollowupFlagStatus) + if err != nil { + return err + } + if val != nil { + m.SetFlagStatus(val.(*FollowupFlagStatus)) + } + 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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + return res +} +// GetFlagStatus gets the flagStatus property value. The status for follow-up for an item. Possible values are notFlagged, complete, and flagged. +func (m *FollowupFlag) GetFlagStatus()(*FollowupFlagStatus) { + return m.flagStatus +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FollowupFlag) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The date and time that the follow-up is to begin. +func (m *FollowupFlag) GetStartDateTime()(DateTimeTimeZoneable) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *FollowupFlag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + if m.GetFlagStatus() != nil { + cast := (*m.GetFlagStatus()).String() + err := writer.WriteStringValue("flagStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("startDateTime", m.GetStartDateTime()) + 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 *FollowupFlag) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCompletedDateTime sets the completedDateTime property value. The date and time that the follow-up was finished. +func (m *FollowupFlag) SetCompletedDateTime(value DateTimeTimeZoneable)() { + m.completedDateTime = value +} +// SetDueDateTime sets the dueDateTime property value. The date and time that the follow up is to be finished. Note: To set the due date, you must also specify the startDateTime; otherwise, you will get a 400 Bad Request response. +func (m *FollowupFlag) SetDueDateTime(value DateTimeTimeZoneable)() { + m.dueDateTime = value +} +// SetFlagStatus sets the flagStatus property value. The status for follow-up for an item. Possible values are notFlagged, complete, and flagged. +func (m *FollowupFlag) SetFlagStatus(value *FollowupFlagStatus)() { + m.flagStatus = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FollowupFlag) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The date and time that the follow-up is to begin. +func (m *FollowupFlag) SetStartDateTime(value DateTimeTimeZoneable)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/followup_flag_status.go b/src/internal/connector/graph/betasdk/models/followup_flag_status.go new file mode 100644 index 000000000..993204d04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/followup_flag_status.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FollowupFlagStatus int + +const ( + NOTFLAGGED_FOLLOWUPFLAGSTATUS FollowupFlagStatus = iota + COMPLETE_FOLLOWUPFLAGSTATUS + FLAGGED_FOLLOWUPFLAGSTATUS +) + +func (i FollowupFlagStatus) String() string { + return []string{"notFlagged", "complete", "flagged"}[i] +} +func ParseFollowupFlagStatus(v string) (interface{}, error) { + result := NOTFLAGGED_FOLLOWUPFLAGSTATUS + switch v { + case "notFlagged": + result = NOTFLAGGED_FOLLOWUPFLAGSTATUS + case "complete": + result = COMPLETE_FOLLOWUPFLAGSTATUS + case "flagged": + result = FLAGGED_FOLLOWUPFLAGSTATUS + default: + return 0, errors.New("Unknown FollowupFlagStatus value: " + v) + } + return &result, nil +} +func SerializeFollowupFlagStatus(values []FollowupFlagStatus) []string { + 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/followup_flagable.go b/src/internal/connector/graph/betasdk/models/followup_flagable.go new file mode 100644 index 000000000..5981c0c70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/followup_flagable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FollowupFlagable +type FollowupFlagable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(DateTimeTimeZoneable) + GetDueDateTime()(DateTimeTimeZoneable) + GetFlagStatus()(*FollowupFlagStatus) + GetOdataType()(*string) + GetStartDateTime()(DateTimeTimeZoneable) + SetCompletedDateTime(value DateTimeTimeZoneable)() + SetDueDateTime(value DateTimeTimeZoneable)() + SetFlagStatus(value *FollowupFlagStatus)() + SetOdataType(value *string)() + SetStartDateTime(value DateTimeTimeZoneable)() +} diff --git a/src/internal/connector/graph/betasdk/models/free_busy_status.go b/src/internal/connector/graph/betasdk/models/free_busy_status.go new file mode 100644 index 000000000..03ee2cbb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/free_busy_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FreeBusyStatus int + +const ( + UNKNOWN_FREEBUSYSTATUS FreeBusyStatus = iota + FREE_FREEBUSYSTATUS + TENTATIVE_FREEBUSYSTATUS + BUSY_FREEBUSYSTATUS + OOF_FREEBUSYSTATUS + WORKINGELSEWHERE_FREEBUSYSTATUS +) + +func (i FreeBusyStatus) String() string { + return []string{"unknown", "free", "tentative", "busy", "oof", "workingElsewhere"}[i] +} +func ParseFreeBusyStatus(v string) (interface{}, error) { + result := UNKNOWN_FREEBUSYSTATUS + switch v { + case "unknown": + result = UNKNOWN_FREEBUSYSTATUS + case "free": + result = FREE_FREEBUSYSTATUS + case "tentative": + result = TENTATIVE_FREEBUSYSTATUS + case "busy": + result = BUSY_FREEBUSYSTATUS + case "oof": + result = OOF_FREEBUSYSTATUS + case "workingElsewhere": + result = WORKINGELSEWHERE_FREEBUSYSTATUS + default: + return 0, errors.New("Unknown FreeBusyStatus value: " + v) + } + return &result, nil +} +func SerializeFreeBusyStatus(values []FreeBusyStatus) []string { + 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/general_ledger_entry.go b/src/internal/connector/graph/betasdk/models/general_ledger_entry.go new file mode 100644 index 000000000..beb36ba2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/general_ledger_entry.go @@ -0,0 +1,296 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeneralLedgerEntry provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GeneralLedgerEntry struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The accountNumber property + accountNumber *string + // The creditAmount property + creditAmount *float64 + // The debitAmount property + debitAmount *float64 + // The description property + description *string + // The documentNumber property + documentNumber *string + // The documentType property + documentType *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The postingDate property + postingDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewGeneralLedgerEntry instantiates a new generalLedgerEntry and sets the default values. +func NewGeneralLedgerEntry()(*GeneralLedgerEntry) { + m := &GeneralLedgerEntry{ + Entity: *NewEntity(), + } + return m +} +// CreateGeneralLedgerEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGeneralLedgerEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGeneralLedgerEntry(), nil +} +// GetAccount gets the account property value. The account property +func (m *GeneralLedgerEntry) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *GeneralLedgerEntry) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAccountNumber gets the accountNumber property value. The accountNumber property +func (m *GeneralLedgerEntry) GetAccountNumber()(*string) { + return m.accountNumber +} +// GetCreditAmount gets the creditAmount property value. The creditAmount property +func (m *GeneralLedgerEntry) GetCreditAmount()(*float64) { + return m.creditAmount +} +// GetDebitAmount gets the debitAmount property value. The debitAmount property +func (m *GeneralLedgerEntry) GetDebitAmount()(*float64) { + return m.debitAmount +} +// GetDescription gets the description property value. The description property +func (m *GeneralLedgerEntry) GetDescription()(*string) { + return m.description +} +// GetDocumentNumber gets the documentNumber property value. The documentNumber property +func (m *GeneralLedgerEntry) GetDocumentNumber()(*string) { + return m.documentNumber +} +// GetDocumentType gets the documentType property value. The documentType property +func (m *GeneralLedgerEntry) GetDocumentType()(*string) { + return m.documentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GeneralLedgerEntry) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["accountNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountNumber(val) + } + return nil + } + res["creditAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetCreditAmount(val) + } + return nil + } + res["debitAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDebitAmount(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["documentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentNumber(val) + } + return nil + } + res["documentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentType(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["postingDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetPostingDate(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *GeneralLedgerEntry) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPostingDate gets the postingDate property value. The postingDate property +func (m *GeneralLedgerEntry) GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.postingDate +} +// Serialize serializes information the current object +func (m *GeneralLedgerEntry) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accountNumber", m.GetAccountNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("creditAmount", m.GetCreditAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("debitAmount", m.GetDebitAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("documentNumber", m.GetDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("documentType", m.GetDocumentType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("postingDate", m.GetPostingDate()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *GeneralLedgerEntry) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *GeneralLedgerEntry) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAccountNumber sets the accountNumber property value. The accountNumber property +func (m *GeneralLedgerEntry) SetAccountNumber(value *string)() { + m.accountNumber = value +} +// SetCreditAmount sets the creditAmount property value. The creditAmount property +func (m *GeneralLedgerEntry) SetCreditAmount(value *float64)() { + m.creditAmount = value +} +// SetDebitAmount sets the debitAmount property value. The debitAmount property +func (m *GeneralLedgerEntry) SetDebitAmount(value *float64)() { + m.debitAmount = value +} +// SetDescription sets the description property value. The description property +func (m *GeneralLedgerEntry) SetDescription(value *string)() { + m.description = value +} +// SetDocumentNumber sets the documentNumber property value. The documentNumber property +func (m *GeneralLedgerEntry) SetDocumentNumber(value *string)() { + m.documentNumber = value +} +// SetDocumentType sets the documentType property value. The documentType property +func (m *GeneralLedgerEntry) SetDocumentType(value *string)() { + m.documentType = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *GeneralLedgerEntry) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPostingDate sets the postingDate property value. The postingDate property +func (m *GeneralLedgerEntry) SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.postingDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_response.go b/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_response.go new file mode 100644 index 000000000..b66a9e6dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeneralLedgerEntryCollectionResponse +type GeneralLedgerEntryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GeneralLedgerEntryable +} +// NewGeneralLedgerEntryCollectionResponse instantiates a new GeneralLedgerEntryCollectionResponse and sets the default values. +func NewGeneralLedgerEntryCollectionResponse()(*GeneralLedgerEntryCollectionResponse) { + m := &GeneralLedgerEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGeneralLedgerEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGeneralLedgerEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGeneralLedgerEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GeneralLedgerEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGeneralLedgerEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GeneralLedgerEntryable, len(val)) + for i, v := range val { + res[i] = v.(GeneralLedgerEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GeneralLedgerEntryCollectionResponse) GetValue()([]GeneralLedgerEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *GeneralLedgerEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GeneralLedgerEntryCollectionResponse) SetValue(value []GeneralLedgerEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_responseable.go b/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_responseable.go new file mode 100644 index 000000000..a8a7c6512 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/general_ledger_entry_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeneralLedgerEntryCollectionResponseable +type GeneralLedgerEntryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GeneralLedgerEntryable) + SetValue(value []GeneralLedgerEntryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/general_ledger_entryable.go b/src/internal/connector/graph/betasdk/models/general_ledger_entryable.go new file mode 100644 index 000000000..e61fb3e3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/general_ledger_entryable.go @@ -0,0 +1,33 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeneralLedgerEntryable +type GeneralLedgerEntryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAccountNumber()(*string) + GetCreditAmount()(*float64) + GetDebitAmount()(*float64) + GetDescription()(*string) + GetDocumentNumber()(*string) + GetDocumentType()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAccountNumber(value *string)() + SetCreditAmount(value *float64)() + SetDebitAmount(value *float64)() + SetDescription(value *string)() + SetDocumentNumber(value *string)() + SetDocumentType(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/generic_error.go b/src/internal/connector/graph/betasdk/models/generic_error.go new file mode 100644 index 000000000..4f8c9a32b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/generic_error.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GenericError +type GenericError 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 error code. + code *string + // The error message. + message *string + // The OdataType property + odataType *string +} +// NewGenericError instantiates a new genericError and sets the default values. +func NewGenericError()(*GenericError) { + m := &GenericError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGenericErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGenericErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.accessReviewError": + return NewAccessReviewError(), nil + } + } + } + } + return NewGenericError(), 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 *GenericError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The error code. +func (m *GenericError) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GenericError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. The error message. +func (m *GenericError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GenericError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GenericError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GenericError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The error code. +func (m *GenericError) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The error message. +func (m *GenericError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GenericError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/generic_error_collection_response.go b/src/internal/connector/graph/betasdk/models/generic_error_collection_response.go new file mode 100644 index 000000000..75a892196 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/generic_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GenericErrorCollectionResponse +type GenericErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GenericErrorable +} +// NewGenericErrorCollectionResponse instantiates a new GenericErrorCollectionResponse and sets the default values. +func NewGenericErrorCollectionResponse()(*GenericErrorCollectionResponse) { + m := &GenericErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGenericErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGenericErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGenericErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GenericErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGenericErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GenericErrorable, len(val)) + for i, v := range val { + res[i] = v.(GenericErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GenericErrorCollectionResponse) GetValue()([]GenericErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *GenericErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GenericErrorCollectionResponse) SetValue(value []GenericErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/generic_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/generic_error_collection_responseable.go new file mode 100644 index 000000000..ec01e6318 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/generic_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GenericErrorCollectionResponseable +type GenericErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GenericErrorable) + SetValue(value []GenericErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/generic_errorable.go b/src/internal/connector/graph/betasdk/models/generic_errorable.go new file mode 100644 index 000000000..399865e51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/generic_errorable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GenericErrorable +type GenericErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/geo_coordinates.go b/src/internal/connector/graph/betasdk/models/geo_coordinates.go new file mode 100644 index 000000000..a189c22f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/geo_coordinates.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeoCoordinates +type GeoCoordinates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Optional. The altitude (height), in feet, above sea level for the item. Read-only. + altitude *float64 + // Optional. The latitude, in decimal, for the item. Writable on OneDrive Personal. + latitude *float64 + // Optional. The longitude, in decimal, for the item. Writable on OneDrive Personal. + longitude *float64 + // The OdataType property + odataType *string +} +// NewGeoCoordinates instantiates a new geoCoordinates and sets the default values. +func NewGeoCoordinates()(*GeoCoordinates) { + m := &GeoCoordinates{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGeoCoordinatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGeoCoordinatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGeoCoordinates(), 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 *GeoCoordinates) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAltitude gets the altitude property value. Optional. The altitude (height), in feet, above sea level for the item. Read-only. +func (m *GeoCoordinates) GetAltitude()(*float64) { + return m.altitude +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GeoCoordinates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["altitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAltitude(val) + } + return nil + } + res["latitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLatitude(val) + } + return nil + } + res["longitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLongitude(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 + } + return res +} +// GetLatitude gets the latitude property value. Optional. The latitude, in decimal, for the item. Writable on OneDrive Personal. +func (m *GeoCoordinates) GetLatitude()(*float64) { + return m.latitude +} +// GetLongitude gets the longitude property value. Optional. The longitude, in decimal, for the item. Writable on OneDrive Personal. +func (m *GeoCoordinates) GetLongitude()(*float64) { + return m.longitude +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GeoCoordinates) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GeoCoordinates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("altitude", m.GetAltitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("latitude", m.GetLatitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("longitude", m.GetLongitude()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GeoCoordinates) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAltitude sets the altitude property value. Optional. The altitude (height), in feet, above sea level for the item. Read-only. +func (m *GeoCoordinates) SetAltitude(value *float64)() { + m.altitude = value +} +// SetLatitude sets the latitude property value. Optional. The latitude, in decimal, for the item. Writable on OneDrive Personal. +func (m *GeoCoordinates) SetLatitude(value *float64)() { + m.latitude = value +} +// SetLongitude sets the longitude property value. Optional. The longitude, in decimal, for the item. Writable on OneDrive Personal. +func (m *GeoCoordinates) SetLongitude(value *float64)() { + m.longitude = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GeoCoordinates) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/geo_coordinatesable.go b/src/internal/connector/graph/betasdk/models/geo_coordinatesable.go new file mode 100644 index 000000000..e09c27954 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/geo_coordinatesable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeoCoordinatesable +type GeoCoordinatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAltitude()(*float64) + GetLatitude()(*float64) + GetLongitude()(*float64) + GetOdataType()(*string) + SetAltitude(value *float64)() + SetLatitude(value *float64)() + SetLongitude(value *float64)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/geolocation_column.go b/src/internal/connector/graph/betasdk/models/geolocation_column.go new file mode 100644 index 000000000..b9ab366d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/geolocation_column.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeolocationColumn +type GeolocationColumn 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 OdataType property + odataType *string +} +// NewGeolocationColumn instantiates a new geolocationColumn and sets the default values. +func NewGeolocationColumn()(*GeolocationColumn) { + m := &GeolocationColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGeolocationColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGeolocationColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGeolocationColumn(), 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 *GeolocationColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GeolocationColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GeolocationColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GeolocationColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GeolocationColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GeolocationColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/geolocation_columnable.go b/src/internal/connector/graph/betasdk/models/geolocation_columnable.go new file mode 100644 index 000000000..8d7144ecb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/geolocation_columnable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GeolocationColumnable +type GeolocationColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/giphy_rating_type.go b/src/internal/connector/graph/betasdk/models/giphy_rating_type.go new file mode 100644 index 000000000..d632430f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/giphy_rating_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GiphyRatingType int + +const ( + STRICT_GIPHYRATINGTYPE GiphyRatingType = iota + MODERATE_GIPHYRATINGTYPE + UNKNOWNFUTUREVALUE_GIPHYRATINGTYPE +) + +func (i GiphyRatingType) String() string { + return []string{"strict", "moderate", "unknownFutureValue"}[i] +} +func ParseGiphyRatingType(v string) (interface{}, error) { + result := STRICT_GIPHYRATINGTYPE + switch v { + case "strict": + result = STRICT_GIPHYRATINGTYPE + case "moderate": + result = MODERATE_GIPHYRATINGTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_GIPHYRATINGTYPE + default: + return 0, errors.New("Unknown GiphyRatingType value: " + v) + } + return &result, nil +} +func SerializeGiphyRatingType(values []GiphyRatingType) []string { + 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/governance_criteria.go b/src/internal/connector/graph/betasdk/models/governance_criteria.go new file mode 100644 index 000000000..8bd61be5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_criteria.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceCriteria +type GovernanceCriteria 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 OdataType property + odataType *string +} +// NewGovernanceCriteria instantiates a new governanceCriteria and sets the default values. +func NewGovernanceCriteria()(*GovernanceCriteria) { + m := &GovernanceCriteria{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceCriteriaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceCriteriaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupMembershipGovernanceCriteria": + return NewGroupMembershipGovernanceCriteria(), nil + case "#microsoft.graph.roleMembershipGovernanceCriteria": + return NewRoleMembershipGovernanceCriteria(), nil + case "#microsoft.graph.userGovernanceCriteria": + return NewUserGovernanceCriteria(), nil + } + } + } + } + return NewGovernanceCriteria(), 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 *GovernanceCriteria) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceCriteria) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceCriteria) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GovernanceCriteria) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GovernanceCriteria) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceCriteria) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_criteria_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_criteria_collection_response.go new file mode 100644 index 000000000..ad96da706 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_criteria_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceCriteriaCollectionResponse +type GovernanceCriteriaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceCriteriaable +} +// NewGovernanceCriteriaCollectionResponse instantiates a new GovernanceCriteriaCollectionResponse and sets the default values. +func NewGovernanceCriteriaCollectionResponse()(*GovernanceCriteriaCollectionResponse) { + m := &GovernanceCriteriaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceCriteriaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceCriteriaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceCriteriaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceCriteriaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceCriteriaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceCriteriaable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceCriteriaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceCriteriaCollectionResponse) GetValue()([]GovernanceCriteriaable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceCriteriaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceCriteriaCollectionResponse) SetValue(value []GovernanceCriteriaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_criteria_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_criteria_collection_responseable.go new file mode 100644 index 000000000..c493d92ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_criteria_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceCriteriaCollectionResponseable +type GovernanceCriteriaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceCriteriaable) + SetValue(value []GovernanceCriteriaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_criteriaable.go b/src/internal/connector/graph/betasdk/models/governance_criteriaable.go new file mode 100644 index 000000000..be67a25fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_criteriaable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceCriteriaable +type GovernanceCriteriaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_insight.go b/src/internal/connector/graph/betasdk/models/governance_insight.go new file mode 100644 index 000000000..fb607866f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_insight.go @@ -0,0 +1,81 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceInsight provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GovernanceInsight struct { + Entity + // Indicates when the insight was created. + insightCreatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewGovernanceInsight instantiates a new governanceInsight and sets the default values. +func NewGovernanceInsight()(*GovernanceInsight) { + m := &GovernanceInsight{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceInsightFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceInsightFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.membershipOutlierInsight": + return NewMembershipOutlierInsight(), nil + case "#microsoft.graph.userSignInInsight": + return NewUserSignInInsight(), nil + } + } + } + } + return NewGovernanceInsight(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceInsight) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["insightCreatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetInsightCreatedDateTime(val) + } + return nil + } + return res +} +// GetInsightCreatedDateTime gets the insightCreatedDateTime property value. Indicates when the insight was created. +func (m *GovernanceInsight) GetInsightCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.insightCreatedDateTime +} +// Serialize serializes information the current object +func (m *GovernanceInsight) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("insightCreatedDateTime", m.GetInsightCreatedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetInsightCreatedDateTime sets the insightCreatedDateTime property value. Indicates when the insight was created. +func (m *GovernanceInsight) SetInsightCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.insightCreatedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_insight_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_insight_collection_response.go new file mode 100644 index 000000000..3c4ad9a0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_insight_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceInsightCollectionResponse +type GovernanceInsightCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceInsightable +} +// NewGovernanceInsightCollectionResponse instantiates a new GovernanceInsightCollectionResponse and sets the default values. +func NewGovernanceInsightCollectionResponse()(*GovernanceInsightCollectionResponse) { + m := &GovernanceInsightCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceInsightCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceInsightCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceInsightCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceInsightCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceInsightable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceInsightable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceInsightCollectionResponse) GetValue()([]GovernanceInsightable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceInsightCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceInsightCollectionResponse) SetValue(value []GovernanceInsightable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_insight_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_insight_collection_responseable.go new file mode 100644 index 000000000..77c9ef26e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_insight_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceInsightCollectionResponseable +type GovernanceInsightCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceInsightable) + SetValue(value []GovernanceInsightable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_insightable.go b/src/internal/connector/graph/betasdk/models/governance_insightable.go new file mode 100644 index 000000000..4d338e9ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_insightable.go @@ -0,0 +1,14 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceInsightable +type GovernanceInsightable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInsightCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetInsightCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_policy.go b/src/internal/connector/graph/betasdk/models/governance_notification_policy.go new file mode 100644 index 000000000..f59461bb6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_policy.go @@ -0,0 +1,135 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationPolicy +type GovernanceNotificationPolicy 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 enabledTemplateTypes property + enabledTemplateTypes []string + // The notificationTemplates property + notificationTemplates []GovernanceNotificationTemplateable + // The OdataType property + odataType *string +} +// NewGovernanceNotificationPolicy instantiates a new governanceNotificationPolicy and sets the default values. +func NewGovernanceNotificationPolicy()(*GovernanceNotificationPolicy) { + m := &GovernanceNotificationPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceNotificationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceNotificationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceNotificationPolicy(), 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 *GovernanceNotificationPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnabledTemplateTypes gets the enabledTemplateTypes property value. The enabledTemplateTypes property +func (m *GovernanceNotificationPolicy) GetEnabledTemplateTypes()([]string) { + return m.enabledTemplateTypes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceNotificationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabledTemplateTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnabledTemplateTypes(res) + } + return nil + } + res["notificationTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceNotificationTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceNotificationTemplateable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceNotificationTemplateable) + } + m.SetNotificationTemplates(res) + } + 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 + } + return res +} +// GetNotificationTemplates gets the notificationTemplates property value. The notificationTemplates property +func (m *GovernanceNotificationPolicy) GetNotificationTemplates()([]GovernanceNotificationTemplateable) { + return m.notificationTemplates +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceNotificationPolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GovernanceNotificationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEnabledTemplateTypes() != nil { + err := writer.WriteCollectionOfStringValues("enabledTemplateTypes", m.GetEnabledTemplateTypes()) + if err != nil { + return err + } + } + if m.GetNotificationTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotificationTemplates())) + for i, v := range m.GetNotificationTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("notificationTemplates", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GovernanceNotificationPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnabledTemplateTypes sets the enabledTemplateTypes property value. The enabledTemplateTypes property +func (m *GovernanceNotificationPolicy) SetEnabledTemplateTypes(value []string)() { + m.enabledTemplateTypes = value +} +// SetNotificationTemplates sets the notificationTemplates property value. The notificationTemplates property +func (m *GovernanceNotificationPolicy) SetNotificationTemplates(value []GovernanceNotificationTemplateable)() { + m.notificationTemplates = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceNotificationPolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_policyable.go b/src/internal/connector/graph/betasdk/models/governance_notification_policyable.go new file mode 100644 index 000000000..78e89538b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationPolicyable +type GovernanceNotificationPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabledTemplateTypes()([]string) + GetNotificationTemplates()([]GovernanceNotificationTemplateable) + GetOdataType()(*string) + SetEnabledTemplateTypes(value []string)() + SetNotificationTemplates(value []GovernanceNotificationTemplateable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_template.go b/src/internal/connector/graph/betasdk/models/governance_notification_template.go new file mode 100644 index 000000000..b3ccad581 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_template.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationTemplate +type GovernanceNotificationTemplate 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 culture property + culture *string + // The id property + id *string + // The OdataType property + odataType *string + // The source property + source *string + // The type property + type_escaped *string + // The version property + version *string +} +// NewGovernanceNotificationTemplate instantiates a new governanceNotificationTemplate and sets the default values. +func NewGovernanceNotificationTemplate()(*GovernanceNotificationTemplate) { + m := &GovernanceNotificationTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceNotificationTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceNotificationTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceNotificationTemplate(), 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 *GovernanceNotificationTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCulture gets the culture property value. The culture property +func (m *GovernanceNotificationTemplate) GetCulture()(*string) { + return m.culture +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceNotificationTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["culture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCulture(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *GovernanceNotificationTemplate) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceNotificationTemplate) GetOdataType()(*string) { + return m.odataType +} +// GetSource gets the source property value. The source property +func (m *GovernanceNotificationTemplate) GetSource()(*string) { + return m.source +} +// GetType gets the type property value. The type property +func (m *GovernanceNotificationTemplate) GetType()(*string) { + return m.type_escaped +} +// GetVersion gets the version property value. The version property +func (m *GovernanceNotificationTemplate) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *GovernanceNotificationTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("culture", m.GetCulture()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("version", m.GetVersion()) + 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 *GovernanceNotificationTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCulture sets the culture property value. The culture property +func (m *GovernanceNotificationTemplate) SetCulture(value *string)() { + m.culture = value +} +// SetId sets the id property value. The id property +func (m *GovernanceNotificationTemplate) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceNotificationTemplate) SetOdataType(value *string)() { + m.odataType = value +} +// SetSource sets the source property value. The source property +func (m *GovernanceNotificationTemplate) SetSource(value *string)() { + m.source = value +} +// SetType sets the type property value. The type property +func (m *GovernanceNotificationTemplate) SetType(value *string)() { + m.type_escaped = value +} +// SetVersion sets the version property value. The version property +func (m *GovernanceNotificationTemplate) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_response.go new file mode 100644 index 000000000..53c4153b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationTemplateCollectionResponse +type GovernanceNotificationTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceNotificationTemplateable +} +// NewGovernanceNotificationTemplateCollectionResponse instantiates a new GovernanceNotificationTemplateCollectionResponse and sets the default values. +func NewGovernanceNotificationTemplateCollectionResponse()(*GovernanceNotificationTemplateCollectionResponse) { + m := &GovernanceNotificationTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceNotificationTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceNotificationTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceNotificationTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceNotificationTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceNotificationTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceNotificationTemplateable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceNotificationTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceNotificationTemplateCollectionResponse) GetValue()([]GovernanceNotificationTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceNotificationTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceNotificationTemplateCollectionResponse) SetValue(value []GovernanceNotificationTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_responseable.go new file mode 100644 index 000000000..49d5e1567 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationTemplateCollectionResponseable +type GovernanceNotificationTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceNotificationTemplateable) + SetValue(value []GovernanceNotificationTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_notification_templateable.go b/src/internal/connector/graph/betasdk/models/governance_notification_templateable.go new file mode 100644 index 000000000..3e9ea0ad5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_notification_templateable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceNotificationTemplateable +type GovernanceNotificationTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCulture()(*string) + GetId()(*string) + GetOdataType()(*string) + GetSource()(*string) + GetType()(*string) + GetVersion()(*string) + SetCulture(value *string)() + SetId(value *string)() + SetOdataType(value *string)() + SetSource(value *string)() + SetType(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policy.go b/src/internal/connector/graph/betasdk/models/governance_policy.go new file mode 100644 index 000000000..242c3ca6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policy.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicy +type GovernancePolicy 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 decisionMakerCriteria property + decisionMakerCriteria []GovernanceCriteriaable + // The notificationPolicy property + notificationPolicy GovernanceNotificationPolicyable + // The OdataType property + odataType *string +} +// NewGovernancePolicy instantiates a new governancePolicy and sets the default values. +func NewGovernancePolicy()(*GovernancePolicy) { + m := &GovernancePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernancePolicy(), 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 *GovernancePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDecisionMakerCriteria gets the decisionMakerCriteria property value. The decisionMakerCriteria property +func (m *GovernancePolicy) GetDecisionMakerCriteria()([]GovernanceCriteriaable) { + return m.decisionMakerCriteria +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["decisionMakerCriteria"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceCriteriaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceCriteriaable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceCriteriaable) + } + m.SetDecisionMakerCriteria(res) + } + return nil + } + res["notificationPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceNotificationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotificationPolicy(val.(GovernanceNotificationPolicyable)) + } + 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 + } + return res +} +// GetNotificationPolicy gets the notificationPolicy property value. The notificationPolicy property +func (m *GovernancePolicy) GetNotificationPolicy()(GovernanceNotificationPolicyable) { + return m.notificationPolicy +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernancePolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GovernancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDecisionMakerCriteria() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDecisionMakerCriteria())) + for i, v := range m.GetDecisionMakerCriteria() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("decisionMakerCriteria", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("notificationPolicy", m.GetNotificationPolicy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GovernancePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDecisionMakerCriteria sets the decisionMakerCriteria property value. The decisionMakerCriteria property +func (m *GovernancePolicy) SetDecisionMakerCriteria(value []GovernanceCriteriaable)() { + m.decisionMakerCriteria = value +} +// SetNotificationPolicy sets the notificationPolicy property value. The notificationPolicy property +func (m *GovernancePolicy) SetNotificationPolicy(value GovernanceNotificationPolicyable)() { + m.notificationPolicy = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernancePolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policy_template.go b/src/internal/connector/graph/betasdk/models/governance_policy_template.go new file mode 100644 index 000000000..a102e2739 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policy_template.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicyTemplate provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GovernancePolicyTemplate struct { + Entity + // The displayName property + displayName *string + // The policy property + policy GovernancePolicyable + // The settings property + settings BusinessFlowSettingsable +} +// NewGovernancePolicyTemplate instantiates a new governancePolicyTemplate and sets the default values. +func NewGovernancePolicyTemplate()(*GovernancePolicyTemplate) { + m := &GovernancePolicyTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernancePolicyTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernancePolicyTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernancePolicyTemplate(), nil +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *GovernancePolicyTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernancePolicyTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicy(val.(GovernancePolicyable)) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBusinessFlowSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(BusinessFlowSettingsable)) + } + return nil + } + return res +} +// GetPolicy gets the policy property value. The policy property +func (m *GovernancePolicyTemplate) GetPolicy()(GovernancePolicyable) { + return m.policy +} +// GetSettings gets the settings property value. The settings property +func (m *GovernancePolicyTemplate) GetSettings()(BusinessFlowSettingsable) { + return m.settings +} +// Serialize serializes information the current object +func (m *GovernancePolicyTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("policy", m.GetPolicy()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *GovernancePolicyTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPolicy sets the policy property value. The policy property +func (m *GovernancePolicyTemplate) SetPolicy(value GovernancePolicyable)() { + m.policy = value +} +// SetSettings sets the settings property value. The settings property +func (m *GovernancePolicyTemplate) SetSettings(value BusinessFlowSettingsable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_response.go new file mode 100644 index 000000000..ee018f569 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicyTemplateCollectionResponse +type GovernancePolicyTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernancePolicyTemplateable +} +// NewGovernancePolicyTemplateCollectionResponse instantiates a new GovernancePolicyTemplateCollectionResponse and sets the default values. +func NewGovernancePolicyTemplateCollectionResponse()(*GovernancePolicyTemplateCollectionResponse) { + m := &GovernancePolicyTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernancePolicyTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernancePolicyTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernancePolicyTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernancePolicyTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernancePolicyTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernancePolicyTemplateable, len(val)) + for i, v := range val { + res[i] = v.(GovernancePolicyTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernancePolicyTemplateCollectionResponse) GetValue()([]GovernancePolicyTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernancePolicyTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernancePolicyTemplateCollectionResponse) SetValue(value []GovernancePolicyTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_responseable.go new file mode 100644 index 000000000..c0b38fe79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policy_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicyTemplateCollectionResponseable +type GovernancePolicyTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernancePolicyTemplateable) + SetValue(value []GovernancePolicyTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policy_templateable.go b/src/internal/connector/graph/betasdk/models/governance_policy_templateable.go new file mode 100644 index 000000000..40926b1de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policy_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicyTemplateable +type GovernancePolicyTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetPolicy()(GovernancePolicyable) + GetSettings()(BusinessFlowSettingsable) + SetDisplayName(value *string)() + SetPolicy(value GovernancePolicyable)() + SetSettings(value BusinessFlowSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_policyable.go b/src/internal/connector/graph/betasdk/models/governance_policyable.go new file mode 100644 index 000000000..ac0a0b9df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernancePolicyable +type GovernancePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecisionMakerCriteria()([]GovernanceCriteriaable) + GetNotificationPolicy()(GovernanceNotificationPolicyable) + GetOdataType()(*string) + SetDecisionMakerCriteria(value []GovernanceCriteriaable)() + SetNotificationPolicy(value GovernanceNotificationPolicyable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_resource.go b/src/internal/connector/graph/betasdk/models/governance_resource.go new file mode 100644 index 000000000..74af4dbee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_resource.go @@ -0,0 +1,353 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceResource +type GovernanceResource struct { + Entity + // The display name of the resource. + displayName *string + // The external id of the resource, representing its original id in the external system. For example, a subscription resource's external id can be '/subscriptions/c14ae696-5e0c-4e5d-88cc-bef6637737ac'. + externalId *string + // Read-only. The parent resource. for pimforazurerbac scenario, it can represent the subscription the resource belongs to. + parent GovernanceResourceable + // Represents the date time when the resource is registered in PIM. + registeredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The externalId of the resource's root scope that is registered in PIM. The root scope can be the parent, grandparent, or higher ancestor resources. + registeredRoot *string + // The collection of role assignment requests for the resource. + roleAssignmentRequests []GovernanceRoleAssignmentRequestable + // The collection of role assignments for the resource. + roleAssignments []GovernanceRoleAssignmentable + // The collection of role defintions for the resource. + roleDefinitions []GovernanceRoleDefinitionable + // The collection of role settings for the resource. + roleSettings []GovernanceRoleSettingable + // The status of a given resource. For example, it could represent whether the resource is locked or not (values: Active/Locked). Note: This property may be extended in the future to support more scenarios. + status *string + // Required. Resource type. For example, for Azure resources, the type could be 'Subscription', 'ResourceGroup', 'Microsoft.Sql/server', etc. + type_escaped *string +} +// NewGovernanceResource instantiates a new GovernanceResource and sets the default values. +func NewGovernanceResource()(*GovernanceResource) { + m := &GovernanceResource{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceResource(), nil +} +// GetDisplayName gets the displayName property value. The display name of the resource. +func (m *GovernanceResource) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. The external id of the resource, representing its original id in the external system. For example, a subscription resource's external id can be '/subscriptions/c14ae696-5e0c-4e5d-88cc-bef6637737ac'. +func (m *GovernanceResource) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(GovernanceResourceable)) + } + return nil + } + res["registeredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRegisteredDateTime(val) + } + return nil + } + res["registeredRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegisteredRoot(val) + } + return nil + } + res["roleAssignmentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentRequestable) + } + m.SetRoleAssignmentRequests(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["roleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleDefinitionable) + } + m.SetRoleDefinitions(res) + } + return nil + } + res["roleSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleSettingable) + } + m.SetRoleSettings(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetParent gets the parent property value. Read-only. The parent resource. for pimforazurerbac scenario, it can represent the subscription the resource belongs to. +func (m *GovernanceResource) GetParent()(GovernanceResourceable) { + return m.parent +} +// GetRegisteredDateTime gets the registeredDateTime property value. Represents the date time when the resource is registered in PIM. +func (m *GovernanceResource) GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.registeredDateTime +} +// GetRegisteredRoot gets the registeredRoot property value. The externalId of the resource's root scope that is registered in PIM. The root scope can be the parent, grandparent, or higher ancestor resources. +func (m *GovernanceResource) GetRegisteredRoot()(*string) { + return m.registeredRoot +} +// GetRoleAssignmentRequests gets the roleAssignmentRequests property value. The collection of role assignment requests for the resource. +func (m *GovernanceResource) GetRoleAssignmentRequests()([]GovernanceRoleAssignmentRequestable) { + return m.roleAssignmentRequests +} +// GetRoleAssignments gets the roleAssignments property value. The collection of role assignments for the resource. +func (m *GovernanceResource) GetRoleAssignments()([]GovernanceRoleAssignmentable) { + return m.roleAssignments +} +// GetRoleDefinitions gets the roleDefinitions property value. The collection of role defintions for the resource. +func (m *GovernanceResource) GetRoleDefinitions()([]GovernanceRoleDefinitionable) { + return m.roleDefinitions +} +// GetRoleSettings gets the roleSettings property value. The collection of role settings for the resource. +func (m *GovernanceResource) GetRoleSettings()([]GovernanceRoleSettingable) { + return m.roleSettings +} +// GetStatus gets the status property value. The status of a given resource. For example, it could represent whether the resource is locked or not (values: Active/Locked). Note: This property may be extended in the future to support more scenarios. +func (m *GovernanceResource) GetStatus()(*string) { + return m.status +} +// GetType gets the type property value. Required. Resource type. For example, for Azure resources, the type could be 'Subscription', 'ResourceGroup', 'Microsoft.Sql/server', etc. +func (m *GovernanceResource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *GovernanceResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("registeredDateTime", m.GetRegisteredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registeredRoot", m.GetRegisteredRoot()) + if err != nil { + return err + } + } + if m.GetRoleAssignmentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentRequests())) + for i, v := range m.GetRoleAssignmentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentRequests", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleDefinitions())) + for i, v := range m.GetRoleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleDefinitions", cast) + if err != nil { + return err + } + } + if m.GetRoleSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleSettings())) + for i, v := range m.GetRoleSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the resource. +func (m *GovernanceResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. The external id of the resource, representing its original id in the external system. For example, a subscription resource's external id can be '/subscriptions/c14ae696-5e0c-4e5d-88cc-bef6637737ac'. +func (m *GovernanceResource) SetExternalId(value *string)() { + m.externalId = value +} +// SetParent sets the parent property value. Read-only. The parent resource. for pimforazurerbac scenario, it can represent the subscription the resource belongs to. +func (m *GovernanceResource) SetParent(value GovernanceResourceable)() { + m.parent = value +} +// SetRegisteredDateTime sets the registeredDateTime property value. Represents the date time when the resource is registered in PIM. +func (m *GovernanceResource) SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.registeredDateTime = value +} +// SetRegisteredRoot sets the registeredRoot property value. The externalId of the resource's root scope that is registered in PIM. The root scope can be the parent, grandparent, or higher ancestor resources. +func (m *GovernanceResource) SetRegisteredRoot(value *string)() { + m.registeredRoot = value +} +// SetRoleAssignmentRequests sets the roleAssignmentRequests property value. The collection of role assignment requests for the resource. +func (m *GovernanceResource) SetRoleAssignmentRequests(value []GovernanceRoleAssignmentRequestable)() { + m.roleAssignmentRequests = value +} +// SetRoleAssignments sets the roleAssignments property value. The collection of role assignments for the resource. +func (m *GovernanceResource) SetRoleAssignments(value []GovernanceRoleAssignmentable)() { + m.roleAssignments = value +} +// SetRoleDefinitions sets the roleDefinitions property value. The collection of role defintions for the resource. +func (m *GovernanceResource) SetRoleDefinitions(value []GovernanceRoleDefinitionable)() { + m.roleDefinitions = value +} +// SetRoleSettings sets the roleSettings property value. The collection of role settings for the resource. +func (m *GovernanceResource) SetRoleSettings(value []GovernanceRoleSettingable)() { + m.roleSettings = value +} +// SetStatus sets the status property value. The status of a given resource. For example, it could represent whether the resource is locked or not (values: Active/Locked). Note: This property may be extended in the future to support more scenarios. +func (m *GovernanceResource) SetStatus(value *string)() { + m.status = value +} +// SetType sets the type property value. Required. Resource type. For example, for Azure resources, the type could be 'Subscription', 'ResourceGroup', 'Microsoft.Sql/server', etc. +func (m *GovernanceResource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_resource_collection_response.go new file mode 100644 index 000000000..54f1f5368 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceResourceCollectionResponse +type GovernanceResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceResourceable +} +// NewGovernanceResourceCollectionResponse instantiates a new GovernanceResourceCollectionResponse and sets the default values. +func NewGovernanceResourceCollectionResponse()(*GovernanceResourceCollectionResponse) { + m := &GovernanceResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceResourceable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceResourceCollectionResponse) GetValue()([]GovernanceResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceResourceCollectionResponse) SetValue(value []GovernanceResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_resource_collection_responseable.go new file mode 100644 index 000000000..3ef7396d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceResourceCollectionResponseable +type GovernanceResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceResourceable) + SetValue(value []GovernanceResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_resourceable.go b/src/internal/connector/graph/betasdk/models/governance_resourceable.go new file mode 100644 index 000000000..2a2b8c9fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_resourceable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceResourceable +type GovernanceResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetExternalId()(*string) + GetParent()(GovernanceResourceable) + GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRegisteredRoot()(*string) + GetRoleAssignmentRequests()([]GovernanceRoleAssignmentRequestable) + GetRoleAssignments()([]GovernanceRoleAssignmentable) + GetRoleDefinitions()([]GovernanceRoleDefinitionable) + GetRoleSettings()([]GovernanceRoleSettingable) + GetStatus()(*string) + GetType()(*string) + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetParent(value GovernanceResourceable)() + SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRegisteredRoot(value *string)() + SetRoleAssignmentRequests(value []GovernanceRoleAssignmentRequestable)() + SetRoleAssignments(value []GovernanceRoleAssignmentable)() + SetRoleDefinitions(value []GovernanceRoleDefinitionable)() + SetRoleSettings(value []GovernanceRoleSettingable)() + SetStatus(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment.go new file mode 100644 index 000000000..d41f124bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment.go @@ -0,0 +1,399 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GovernanceRoleAssignment struct { + Entity + // The state of the assignment. The value can be Eligible for eligible assignment or Active if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. + assignmentState *string + // For a non-permanent role assignment, this is the time when the role assignment will be expired. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The external ID the resource that is used to identify the role assignment in the provider. + externalId *string + // Read-only. If this is an active assignment and created due to activation on an eligible assignment, it represents the object of that eligible assignment; Otherwise, the value is null. + linkedEligibleRoleAssignment GovernanceRoleAssignmentable + // If this is an active assignment and created due to activation on an eligible assignment, it represents the ID of that eligible assignment; Otherwise, the value is null. + linkedEligibleRoleAssignmentId *string + // The type of member. The value can be: Inherited (if the role assignment is inherited from a parent resource scope), Group (if the role assignment is not inherited, but comes from the membership of a group assignment), or User (if the role assignment is neither inherited nor from a group assignment). + memberType *string + // Read-only. The resource associated with the role assignment. + resource GovernanceResourceable + // Required. The ID of the resource which the role assignment is associated with. + resourceId *string + // Read-only. The role definition associated with the role assignment. + roleDefinition GovernanceRoleDefinitionable + // Required. The ID of the role definition which the role assignment is associated with. + roleDefinitionId *string + // The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *string + // Read-only. The subject associated with the role assignment. + subject GovernanceSubjectable + // Required. The ID of the subject which the role assignment is associated with. + subjectId *string +} +// NewGovernanceRoleAssignment instantiates a new governanceRoleAssignment and sets the default values. +func NewGovernanceRoleAssignment()(*GovernanceRoleAssignment) { + m := &GovernanceRoleAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleAssignment(), nil +} +// GetAssignmentState gets the assignmentState property value. The state of the assignment. The value can be Eligible for eligible assignment or Active if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. +func (m *GovernanceRoleAssignment) GetAssignmentState()(*string) { + return m.assignmentState +} +// GetEndDateTime gets the endDateTime property value. For a non-permanent role assignment, this is the time when the role assignment will be expired. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignment) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetExternalId gets the externalId property value. The external ID the resource that is used to identify the role assignment in the provider. +func (m *GovernanceRoleAssignment) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentState(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["linkedEligibleRoleAssignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinkedEligibleRoleAssignment(val.(GovernanceRoleAssignmentable)) + } + return nil + } + res["linkedEligibleRoleAssignmentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLinkedEligibleRoleAssignmentId(val) + } + return nil + } + res["memberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMemberType(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(GovernanceResourceable)) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["roleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinition(val.(GovernanceRoleDefinitionable)) + } + return nil + } + res["roleDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinitionId(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubject(val.(GovernanceSubjectable)) + } + return nil + } + res["subjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectId(val) + } + return nil + } + return res +} +// GetLinkedEligibleRoleAssignment gets the linkedEligibleRoleAssignment property value. Read-only. If this is an active assignment and created due to activation on an eligible assignment, it represents the object of that eligible assignment; Otherwise, the value is null. +func (m *GovernanceRoleAssignment) GetLinkedEligibleRoleAssignment()(GovernanceRoleAssignmentable) { + return m.linkedEligibleRoleAssignment +} +// GetLinkedEligibleRoleAssignmentId gets the linkedEligibleRoleAssignmentId property value. If this is an active assignment and created due to activation on an eligible assignment, it represents the ID of that eligible assignment; Otherwise, the value is null. +func (m *GovernanceRoleAssignment) GetLinkedEligibleRoleAssignmentId()(*string) { + return m.linkedEligibleRoleAssignmentId +} +// GetMemberType gets the memberType property value. The type of member. The value can be: Inherited (if the role assignment is inherited from a parent resource scope), Group (if the role assignment is not inherited, but comes from the membership of a group assignment), or User (if the role assignment is neither inherited nor from a group assignment). +func (m *GovernanceRoleAssignment) GetMemberType()(*string) { + return m.memberType +} +// GetResource gets the resource property value. Read-only. The resource associated with the role assignment. +func (m *GovernanceRoleAssignment) GetResource()(GovernanceResourceable) { + return m.resource +} +// GetResourceId gets the resourceId property value. Required. The ID of the resource which the role assignment is associated with. +func (m *GovernanceRoleAssignment) GetResourceId()(*string) { + return m.resourceId +} +// GetRoleDefinition gets the roleDefinition property value. Read-only. The role definition associated with the role assignment. +func (m *GovernanceRoleAssignment) GetRoleDefinition()(GovernanceRoleDefinitionable) { + return m.roleDefinition +} +// GetRoleDefinitionId gets the roleDefinitionId property value. Required. The ID of the role definition which the role assignment is associated with. +func (m *GovernanceRoleAssignment) GetRoleDefinitionId()(*string) { + return m.roleDefinitionId +} +// GetStartDateTime gets the startDateTime property value. The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignment) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. The status property +func (m *GovernanceRoleAssignment) GetStatus()(*string) { + return m.status +} +// GetSubject gets the subject property value. Read-only. The subject associated with the role assignment. +func (m *GovernanceRoleAssignment) GetSubject()(GovernanceSubjectable) { + return m.subject +} +// GetSubjectId gets the subjectId property value. Required. The ID of the subject which the role assignment is associated with. +func (m *GovernanceRoleAssignment) GetSubjectId()(*string) { + return m.subjectId +} +// Serialize serializes information the current object +func (m *GovernanceRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignmentState", m.GetAssignmentState()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("linkedEligibleRoleAssignment", m.GetLinkedEligibleRoleAssignment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("linkedEligibleRoleAssignmentId", m.GetLinkedEligibleRoleAssignmentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("memberType", m.GetMemberType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleDefinition", m.GetRoleDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleDefinitionId", m.GetRoleDefinitionId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectId", m.GetSubjectId()) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentState sets the assignmentState property value. The state of the assignment. The value can be Eligible for eligible assignment or Active if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. +func (m *GovernanceRoleAssignment) SetAssignmentState(value *string)() { + m.assignmentState = value +} +// SetEndDateTime sets the endDateTime property value. For a non-permanent role assignment, this is the time when the role assignment will be expired. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignment) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetExternalId sets the externalId property value. The external ID the resource that is used to identify the role assignment in the provider. +func (m *GovernanceRoleAssignment) SetExternalId(value *string)() { + m.externalId = value +} +// SetLinkedEligibleRoleAssignment sets the linkedEligibleRoleAssignment property value. Read-only. If this is an active assignment and created due to activation on an eligible assignment, it represents the object of that eligible assignment; Otherwise, the value is null. +func (m *GovernanceRoleAssignment) SetLinkedEligibleRoleAssignment(value GovernanceRoleAssignmentable)() { + m.linkedEligibleRoleAssignment = value +} +// SetLinkedEligibleRoleAssignmentId sets the linkedEligibleRoleAssignmentId property value. If this is an active assignment and created due to activation on an eligible assignment, it represents the ID of that eligible assignment; Otherwise, the value is null. +func (m *GovernanceRoleAssignment) SetLinkedEligibleRoleAssignmentId(value *string)() { + m.linkedEligibleRoleAssignmentId = value +} +// SetMemberType sets the memberType property value. The type of member. The value can be: Inherited (if the role assignment is inherited from a parent resource scope), Group (if the role assignment is not inherited, but comes from the membership of a group assignment), or User (if the role assignment is neither inherited nor from a group assignment). +func (m *GovernanceRoleAssignment) SetMemberType(value *string)() { + m.memberType = value +} +// SetResource sets the resource property value. Read-only. The resource associated with the role assignment. +func (m *GovernanceRoleAssignment) SetResource(value GovernanceResourceable)() { + m.resource = value +} +// SetResourceId sets the resourceId property value. Required. The ID of the resource which the role assignment is associated with. +func (m *GovernanceRoleAssignment) SetResourceId(value *string)() { + m.resourceId = value +} +// SetRoleDefinition sets the roleDefinition property value. Read-only. The role definition associated with the role assignment. +func (m *GovernanceRoleAssignment) SetRoleDefinition(value GovernanceRoleDefinitionable)() { + m.roleDefinition = value +} +// SetRoleDefinitionId sets the roleDefinitionId property value. Required. The ID of the role definition which the role assignment is associated with. +func (m *GovernanceRoleAssignment) SetRoleDefinitionId(value *string)() { + m.roleDefinitionId = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignment) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *GovernanceRoleAssignment) SetStatus(value *string)() { + m.status = value +} +// SetSubject sets the subject property value. Read-only. The subject associated with the role assignment. +func (m *GovernanceRoleAssignment) SetSubject(value GovernanceSubjectable)() { + m.subject = value +} +// SetSubjectId sets the subjectId property value. Required. The ID of the subject which the role assignment is associated with. +func (m *GovernanceRoleAssignment) SetSubjectId(value *string)() { + m.subjectId = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_response.go new file mode 100644 index 000000000..c397c8661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentCollectionResponse +type GovernanceRoleAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceRoleAssignmentable +} +// NewGovernanceRoleAssignmentCollectionResponse instantiates a new GovernanceRoleAssignmentCollectionResponse and sets the default values. +func NewGovernanceRoleAssignmentCollectionResponse()(*GovernanceRoleAssignmentCollectionResponse) { + m := &GovernanceRoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceRoleAssignmentCollectionResponse) GetValue()([]GovernanceRoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceRoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceRoleAssignmentCollectionResponse) SetValue(value []GovernanceRoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_responseable.go new file mode 100644 index 000000000..7da80614d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentCollectionResponseable +type GovernanceRoleAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceRoleAssignmentable) + SetValue(value []GovernanceRoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_request.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request.go new file mode 100644 index 000000000..da60e1cee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request.go @@ -0,0 +1,373 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequest provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GovernanceRoleAssignmentRequest struct { + Entity + // Required. The state of the assignment. The possible values are: Eligible (for eligible assignment), Active (if it is directly assigned), Active (by administrators, or activated on an eligible assignment by the users). + assignmentState *string + // If this is a request for role activation, it represents the id of the eligible assignment being referred; Otherwise, the value is null. + linkedEligibleRoleAssignmentId *string + // A message provided by users and administrators when create the request about why it is needed. + reason *string + // Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + requestedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. The resource that the request aims to. + resource GovernanceResourceable + // Required. The unique identifier of the Azure resource that is associated with the role assignment request. Azure resources can include subscriptions, resource groups, virtual machines, and SQL databases. + resourceId *string + // Read-only. The role definition that the request aims to. + roleDefinition GovernanceRoleDefinitionable + // Required. The identifier of the Azure role definition that the role assignment request is associated with. + roleDefinitionId *string + // The schedule object of the role assignment request. + schedule GovernanceScheduleable + // The status of the role assignment request. + status GovernanceRoleAssignmentRequestStatusable + // Read-only. The user/group principal. + subject GovernanceSubjectable + // Required. The unique identifier of the principal or subject that the role assignment request is associated with. Principals can be users, groups, or service principals. + subjectId *string + // Required. Representing the type of the operation on the role assignment. The possible values are: AdminAdd , UserAdd , AdminUpdate , AdminRemove , UserRemove , UserExtend , AdminExtend , UserRenew , AdminRenew. + type_escaped *string +} +// NewGovernanceRoleAssignmentRequest instantiates a new governanceRoleAssignmentRequest and sets the default values. +func NewGovernanceRoleAssignmentRequest()(*GovernanceRoleAssignmentRequest) { + m := &GovernanceRoleAssignmentRequest{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceRoleAssignmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleAssignmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleAssignmentRequest(), nil +} +// GetAssignmentState gets the assignmentState property value. Required. The state of the assignment. The possible values are: Eligible (for eligible assignment), Active (if it is directly assigned), Active (by administrators, or activated on an eligible assignment by the users). +func (m *GovernanceRoleAssignmentRequest) GetAssignmentState()(*string) { + return m.assignmentState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleAssignmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentState(val) + } + return nil + } + res["linkedEligibleRoleAssignmentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLinkedEligibleRoleAssignmentId(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["requestedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedDateTime(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(GovernanceResourceable)) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["roleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinition(val.(GovernanceRoleDefinitionable)) + } + return nil + } + res["roleDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinitionId(val) + } + return nil + } + res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedule(val.(GovernanceScheduleable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleAssignmentRequestStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(GovernanceRoleAssignmentRequestStatusable)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubject(val.(GovernanceSubjectable)) + } + return nil + } + res["subjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetLinkedEligibleRoleAssignmentId gets the linkedEligibleRoleAssignmentId property value. If this is a request for role activation, it represents the id of the eligible assignment being referred; Otherwise, the value is null. +func (m *GovernanceRoleAssignmentRequest) GetLinkedEligibleRoleAssignmentId()(*string) { + return m.linkedEligibleRoleAssignmentId +} +// GetReason gets the reason property value. A message provided by users and administrators when create the request about why it is needed. +func (m *GovernanceRoleAssignmentRequest) GetReason()(*string) { + return m.reason +} +// GetRequestedDateTime gets the requestedDateTime property value. Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignmentRequest) GetRequestedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestedDateTime +} +// GetResource gets the resource property value. Read-only. The resource that the request aims to. +func (m *GovernanceRoleAssignmentRequest) GetResource()(GovernanceResourceable) { + return m.resource +} +// GetResourceId gets the resourceId property value. Required. The unique identifier of the Azure resource that is associated with the role assignment request. Azure resources can include subscriptions, resource groups, virtual machines, and SQL databases. +func (m *GovernanceRoleAssignmentRequest) GetResourceId()(*string) { + return m.resourceId +} +// GetRoleDefinition gets the roleDefinition property value. Read-only. The role definition that the request aims to. +func (m *GovernanceRoleAssignmentRequest) GetRoleDefinition()(GovernanceRoleDefinitionable) { + return m.roleDefinition +} +// GetRoleDefinitionId gets the roleDefinitionId property value. Required. The identifier of the Azure role definition that the role assignment request is associated with. +func (m *GovernanceRoleAssignmentRequest) GetRoleDefinitionId()(*string) { + return m.roleDefinitionId +} +// GetSchedule gets the schedule property value. The schedule object of the role assignment request. +func (m *GovernanceRoleAssignmentRequest) GetSchedule()(GovernanceScheduleable) { + return m.schedule +} +// GetStatus gets the status property value. The status of the role assignment request. +func (m *GovernanceRoleAssignmentRequest) GetStatus()(GovernanceRoleAssignmentRequestStatusable) { + return m.status +} +// GetSubject gets the subject property value. Read-only. The user/group principal. +func (m *GovernanceRoleAssignmentRequest) GetSubject()(GovernanceSubjectable) { + return m.subject +} +// GetSubjectId gets the subjectId property value. Required. The unique identifier of the principal or subject that the role assignment request is associated with. Principals can be users, groups, or service principals. +func (m *GovernanceRoleAssignmentRequest) GetSubjectId()(*string) { + return m.subjectId +} +// GetType gets the type property value. Required. Representing the type of the operation on the role assignment. The possible values are: AdminAdd , UserAdd , AdminUpdate , AdminRemove , UserRemove , UserExtend , AdminExtend , UserRenew , AdminRenew. +func (m *GovernanceRoleAssignmentRequest) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *GovernanceRoleAssignmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignmentState", m.GetAssignmentState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("linkedEligibleRoleAssignmentId", m.GetLinkedEligibleRoleAssignmentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestedDateTime", m.GetRequestedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleDefinition", m.GetRoleDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleDefinitionId", m.GetRoleDefinitionId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedule", m.GetSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectId", m.GetSubjectId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentState sets the assignmentState property value. Required. The state of the assignment. The possible values are: Eligible (for eligible assignment), Active (if it is directly assigned), Active (by administrators, or activated on an eligible assignment by the users). +func (m *GovernanceRoleAssignmentRequest) SetAssignmentState(value *string)() { + m.assignmentState = value +} +// SetLinkedEligibleRoleAssignmentId sets the linkedEligibleRoleAssignmentId property value. If this is a request for role activation, it represents the id of the eligible assignment being referred; Otherwise, the value is null. +func (m *GovernanceRoleAssignmentRequest) SetLinkedEligibleRoleAssignmentId(value *string)() { + m.linkedEligibleRoleAssignmentId = value +} +// SetReason sets the reason property value. A message provided by users and administrators when create the request about why it is needed. +func (m *GovernanceRoleAssignmentRequest) SetReason(value *string)() { + m.reason = value +} +// SetRequestedDateTime sets the requestedDateTime property value. Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleAssignmentRequest) SetRequestedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestedDateTime = value +} +// SetResource sets the resource property value. Read-only. The resource that the request aims to. +func (m *GovernanceRoleAssignmentRequest) SetResource(value GovernanceResourceable)() { + m.resource = value +} +// SetResourceId sets the resourceId property value. Required. The unique identifier of the Azure resource that is associated with the role assignment request. Azure resources can include subscriptions, resource groups, virtual machines, and SQL databases. +func (m *GovernanceRoleAssignmentRequest) SetResourceId(value *string)() { + m.resourceId = value +} +// SetRoleDefinition sets the roleDefinition property value. Read-only. The role definition that the request aims to. +func (m *GovernanceRoleAssignmentRequest) SetRoleDefinition(value GovernanceRoleDefinitionable)() { + m.roleDefinition = value +} +// SetRoleDefinitionId sets the roleDefinitionId property value. Required. The identifier of the Azure role definition that the role assignment request is associated with. +func (m *GovernanceRoleAssignmentRequest) SetRoleDefinitionId(value *string)() { + m.roleDefinitionId = value +} +// SetSchedule sets the schedule property value. The schedule object of the role assignment request. +func (m *GovernanceRoleAssignmentRequest) SetSchedule(value GovernanceScheduleable)() { + m.schedule = value +} +// SetStatus sets the status property value. The status of the role assignment request. +func (m *GovernanceRoleAssignmentRequest) SetStatus(value GovernanceRoleAssignmentRequestStatusable)() { + m.status = value +} +// SetSubject sets the subject property value. Read-only. The user/group principal. +func (m *GovernanceRoleAssignmentRequest) SetSubject(value GovernanceSubjectable)() { + m.subject = value +} +// SetSubjectId sets the subjectId property value. Required. The unique identifier of the principal or subject that the role assignment request is associated with. Principals can be users, groups, or service principals. +func (m *GovernanceRoleAssignmentRequest) SetSubjectId(value *string)() { + m.subjectId = value +} +// SetType sets the type property value. Required. Representing the type of the operation on the role assignment. The possible values are: AdminAdd , UserAdd , AdminUpdate , AdminRemove , UserRemove , UserExtend , AdminExtend , UserRenew , AdminRenew. +func (m *GovernanceRoleAssignmentRequest) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_response.go new file mode 100644 index 000000000..c3e938217 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequestCollectionResponse +type GovernanceRoleAssignmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceRoleAssignmentRequestable +} +// NewGovernanceRoleAssignmentRequestCollectionResponse instantiates a new GovernanceRoleAssignmentRequestCollectionResponse and sets the default values. +func NewGovernanceRoleAssignmentRequestCollectionResponse()(*GovernanceRoleAssignmentRequestCollectionResponse) { + m := &GovernanceRoleAssignmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceRoleAssignmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleAssignmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleAssignmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleAssignmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceRoleAssignmentRequestCollectionResponse) GetValue()([]GovernanceRoleAssignmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceRoleAssignmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceRoleAssignmentRequestCollectionResponse) SetValue(value []GovernanceRoleAssignmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_responseable.go new file mode 100644 index 000000000..7ba5d843f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequestCollectionResponseable +type GovernanceRoleAssignmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceRoleAssignmentRequestable) + SetValue(value []GovernanceRoleAssignmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_status.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_status.go new file mode 100644 index 000000000..85fdbbd6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_status.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequestStatus +type GovernanceRoleAssignmentRequestStatus 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 OdataType property + odataType *string + // The status of the role assignment request. The value can be InProgress or Closed. + status *string + // The details of the status of the role assignment request. It represents the evaluation results of different rules. + statusDetails []KeyValueable + // The sub status of the role assignment request. The values can be Accepted, PendingEvaluation, Granted, Denied, PendingProvisioning, Provisioned, PendingRevocation, Revoked, Canceled, Failed, PendingApprovalProvisioning, PendingApproval, FailedAsResourceIsLocked, PendingAdminDecision, AdminApproved, AdminDenied, TimedOut, and ProvisioningStarted. + subStatus *string +} +// NewGovernanceRoleAssignmentRequestStatus instantiates a new governanceRoleAssignmentRequestStatus and sets the default values. +func NewGovernanceRoleAssignmentRequestStatus()(*GovernanceRoleAssignmentRequestStatus) { + m := &GovernanceRoleAssignmentRequestStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceRoleAssignmentRequestStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleAssignmentRequestStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleAssignmentRequestStatus(), 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 *GovernanceRoleAssignmentRequestStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleAssignmentRequestStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetStatusDetails(res) + } + return nil + } + res["subStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubStatus(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceRoleAssignmentRequestStatus) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status of the role assignment request. The value can be InProgress or Closed. +func (m *GovernanceRoleAssignmentRequestStatus) GetStatus()(*string) { + return m.status +} +// GetStatusDetails gets the statusDetails property value. The details of the status of the role assignment request. It represents the evaluation results of different rules. +func (m *GovernanceRoleAssignmentRequestStatus) GetStatusDetails()([]KeyValueable) { + return m.statusDetails +} +// GetSubStatus gets the subStatus property value. The sub status of the role assignment request. The values can be Accepted, PendingEvaluation, Granted, Denied, PendingProvisioning, Provisioned, PendingRevocation, Revoked, Canceled, Failed, PendingApprovalProvisioning, PendingApproval, FailedAsResourceIsLocked, PendingAdminDecision, AdminApproved, AdminDenied, TimedOut, and ProvisioningStarted. +func (m *GovernanceRoleAssignmentRequestStatus) GetSubStatus()(*string) { + return m.subStatus +} +// Serialize serializes information the current object +func (m *GovernanceRoleAssignmentRequestStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + if m.GetStatusDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStatusDetails())) + for i, v := range m.GetStatusDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("statusDetails", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subStatus", m.GetSubStatus()) + 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 *GovernanceRoleAssignmentRequestStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceRoleAssignmentRequestStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status of the role assignment request. The value can be InProgress or Closed. +func (m *GovernanceRoleAssignmentRequestStatus) SetStatus(value *string)() { + m.status = value +} +// SetStatusDetails sets the statusDetails property value. The details of the status of the role assignment request. It represents the evaluation results of different rules. +func (m *GovernanceRoleAssignmentRequestStatus) SetStatusDetails(value []KeyValueable)() { + m.statusDetails = value +} +// SetSubStatus sets the subStatus property value. The sub status of the role assignment request. The values can be Accepted, PendingEvaluation, Granted, Denied, PendingProvisioning, Provisioned, PendingRevocation, Revoked, Canceled, Failed, PendingApprovalProvisioning, PendingApproval, FailedAsResourceIsLocked, PendingAdminDecision, AdminApproved, AdminDenied, TimedOut, and ProvisioningStarted. +func (m *GovernanceRoleAssignmentRequestStatus) SetSubStatus(value *string)() { + m.subStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_statusable.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_statusable.go new file mode 100644 index 000000000..839eb67a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_request_statusable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequestStatusable +type GovernanceRoleAssignmentRequestStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetStatus()(*string) + GetStatusDetails()([]KeyValueable) + GetSubStatus()(*string) + SetOdataType(value *string)() + SetStatus(value *string)() + SetStatusDetails(value []KeyValueable)() + SetSubStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignment_requestable.go b/src/internal/connector/graph/betasdk/models/governance_role_assignment_requestable.go new file mode 100644 index 000000000..48e33295f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignment_requestable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentRequestable +type GovernanceRoleAssignmentRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentState()(*string) + GetLinkedEligibleRoleAssignmentId()(*string) + GetReason()(*string) + GetRequestedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResource()(GovernanceResourceable) + GetResourceId()(*string) + GetRoleDefinition()(GovernanceRoleDefinitionable) + GetRoleDefinitionId()(*string) + GetSchedule()(GovernanceScheduleable) + GetStatus()(GovernanceRoleAssignmentRequestStatusable) + GetSubject()(GovernanceSubjectable) + GetSubjectId()(*string) + GetType()(*string) + SetAssignmentState(value *string)() + SetLinkedEligibleRoleAssignmentId(value *string)() + SetReason(value *string)() + SetRequestedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResource(value GovernanceResourceable)() + SetResourceId(value *string)() + SetRoleDefinition(value GovernanceRoleDefinitionable)() + SetRoleDefinitionId(value *string)() + SetSchedule(value GovernanceScheduleable)() + SetStatus(value GovernanceRoleAssignmentRequestStatusable)() + SetSubject(value GovernanceSubjectable)() + SetSubjectId(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_assignmentable.go b/src/internal/connector/graph/betasdk/models/governance_role_assignmentable.go new file mode 100644 index 000000000..3b88d18cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_assignmentable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleAssignmentable +type GovernanceRoleAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentState()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExternalId()(*string) + GetLinkedEligibleRoleAssignment()(GovernanceRoleAssignmentable) + GetLinkedEligibleRoleAssignmentId()(*string) + GetMemberType()(*string) + GetResource()(GovernanceResourceable) + GetResourceId()(*string) + GetRoleDefinition()(GovernanceRoleDefinitionable) + GetRoleDefinitionId()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + GetSubject()(GovernanceSubjectable) + GetSubjectId()(*string) + SetAssignmentState(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExternalId(value *string)() + SetLinkedEligibleRoleAssignment(value GovernanceRoleAssignmentable)() + SetLinkedEligibleRoleAssignmentId(value *string)() + SetMemberType(value *string)() + SetResource(value GovernanceResourceable)() + SetResourceId(value *string)() + SetRoleDefinition(value GovernanceRoleDefinitionable)() + SetRoleDefinitionId(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() + SetSubject(value GovernanceSubjectable)() + SetSubjectId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_definition.go b/src/internal/connector/graph/betasdk/models/governance_role_definition.go new file mode 100644 index 000000000..a144f7142 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_definition.go @@ -0,0 +1,190 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleDefinition +type GovernanceRoleDefinition struct { + Entity + // The display name of the role definition. + displayName *string + // The external id of the role definition. + externalId *string + // Read-only. The associated resource for the role definition. + resource GovernanceResourceable + // Required. The id of the resource associated with the role definition. + resourceId *string + // The associated role setting for the role definition. + roleSetting GovernanceRoleSettingable + // The templateId property + templateId *string +} +// NewGovernanceRoleDefinition instantiates a new governanceRoleDefinition and sets the default values. +func NewGovernanceRoleDefinition()(*GovernanceRoleDefinition) { + m := &GovernanceRoleDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceRoleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleDefinition(), nil +} +// GetDisplayName gets the displayName property value. The display name of the role definition. +func (m *GovernanceRoleDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. The external id of the role definition. +func (m *GovernanceRoleDefinition) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(GovernanceResourceable)) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["roleSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleSetting(val.(GovernanceRoleSettingable)) + } + return nil + } + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetResource gets the resource property value. Read-only. The associated resource for the role definition. +func (m *GovernanceRoleDefinition) GetResource()(GovernanceResourceable) { + return m.resource +} +// GetResourceId gets the resourceId property value. Required. The id of the resource associated with the role definition. +func (m *GovernanceRoleDefinition) GetResourceId()(*string) { + return m.resourceId +} +// GetRoleSetting gets the roleSetting property value. The associated role setting for the role definition. +func (m *GovernanceRoleDefinition) GetRoleSetting()(GovernanceRoleSettingable) { + return m.roleSetting +} +// GetTemplateId gets the templateId property value. The templateId property +func (m *GovernanceRoleDefinition) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *GovernanceRoleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleSetting", m.GetRoleSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the role definition. +func (m *GovernanceRoleDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. The external id of the role definition. +func (m *GovernanceRoleDefinition) SetExternalId(value *string)() { + m.externalId = value +} +// SetResource sets the resource property value. Read-only. The associated resource for the role definition. +func (m *GovernanceRoleDefinition) SetResource(value GovernanceResourceable)() { + m.resource = value +} +// SetResourceId sets the resourceId property value. Required. The id of the resource associated with the role definition. +func (m *GovernanceRoleDefinition) SetResourceId(value *string)() { + m.resourceId = value +} +// SetRoleSetting sets the roleSetting property value. The associated role setting for the role definition. +func (m *GovernanceRoleDefinition) SetRoleSetting(value GovernanceRoleSettingable)() { + m.roleSetting = value +} +// SetTemplateId sets the templateId property value. The templateId property +func (m *GovernanceRoleDefinition) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_response.go new file mode 100644 index 000000000..17d94a087 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleDefinitionCollectionResponse +type GovernanceRoleDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceRoleDefinitionable +} +// NewGovernanceRoleDefinitionCollectionResponse instantiates a new GovernanceRoleDefinitionCollectionResponse and sets the default values. +func NewGovernanceRoleDefinitionCollectionResponse()(*GovernanceRoleDefinitionCollectionResponse) { + m := &GovernanceRoleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceRoleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceRoleDefinitionCollectionResponse) GetValue()([]GovernanceRoleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceRoleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceRoleDefinitionCollectionResponse) SetValue(value []GovernanceRoleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_responseable.go new file mode 100644 index 000000000..3f3d4b766 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleDefinitionCollectionResponseable +type GovernanceRoleDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceRoleDefinitionable) + SetValue(value []GovernanceRoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_definitionable.go b/src/internal/connector/graph/betasdk/models/governance_role_definitionable.go new file mode 100644 index 000000000..f4168c72e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_definitionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleDefinitionable +type GovernanceRoleDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetExternalId()(*string) + GetResource()(GovernanceResourceable) + GetResourceId()(*string) + GetRoleSetting()(GovernanceRoleSettingable) + GetTemplateId()(*string) + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetResource(value GovernanceResourceable)() + SetResourceId(value *string)() + SetRoleSetting(value GovernanceRoleSettingable)() + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_setting.go b/src/internal/connector/graph/betasdk/models/governance_role_setting.go new file mode 100644 index 000000000..5d43f3275 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_setting.go @@ -0,0 +1,353 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleSetting +type GovernanceRoleSetting struct { + Entity + // The rule settings that are evaluated when an administrator tries to add an eligible role assignment. + adminEligibleSettings []GovernanceRuleSettingable + // The rule settings that are evaluated when an administrator tries to add a direct member role assignment. + adminMemberSettings []GovernanceRuleSettingable + // Read-only. Indicate if the roleSetting is a default roleSetting + isDefault *bool + // Read-only. The display name of the administrator who last updated the roleSetting. + lastUpdatedBy *string + // Read-only. The time when the role setting was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. The associated resource for this role setting. + resource GovernanceResourceable + // Required. The id of the resource that the role setting is associated with. + resourceId *string + // Read-only. The role definition that is enforced with this role setting. + roleDefinition GovernanceRoleDefinitionable + // Required. The id of the role definition that the role setting is associated with. + roleDefinitionId *string + // The rule settings that are evaluated when a user tries to add an eligible role assignment. The setting is not supported for now. + userEligibleSettings []GovernanceRuleSettingable + // The rule settings that are evaluated when a user tries to activate his role assignment. + userMemberSettings []GovernanceRuleSettingable +} +// NewGovernanceRoleSetting instantiates a new governanceRoleSetting and sets the default values. +func NewGovernanceRoleSetting()(*GovernanceRoleSetting) { + m := &GovernanceRoleSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceRoleSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleSetting(), nil +} +// GetAdminEligibleSettings gets the adminEligibleSettings property value. The rule settings that are evaluated when an administrator tries to add an eligible role assignment. +func (m *GovernanceRoleSetting) GetAdminEligibleSettings()([]GovernanceRuleSettingable) { + return m.adminEligibleSettings +} +// GetAdminMemberSettings gets the adminMemberSettings property value. The rule settings that are evaluated when an administrator tries to add a direct member role assignment. +func (m *GovernanceRoleSetting) GetAdminMemberSettings()([]GovernanceRuleSettingable) { + return m.adminMemberSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["adminEligibleSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRuleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRuleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRuleSettingable) + } + m.SetAdminEligibleSettings(res) + } + return nil + } + res["adminMemberSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRuleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRuleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRuleSettingable) + } + m.SetAdminMemberSettings(res) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["lastUpdatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedBy(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(GovernanceResourceable)) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["roleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinition(val.(GovernanceRoleDefinitionable)) + } + return nil + } + res["roleDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinitionId(val) + } + return nil + } + res["userEligibleSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRuleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRuleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRuleSettingable) + } + m.SetUserEligibleSettings(res) + } + return nil + } + res["userMemberSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRuleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRuleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRuleSettingable) + } + m.SetUserMemberSettings(res) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Read-only. Indicate if the roleSetting is a default roleSetting +func (m *GovernanceRoleSetting) GetIsDefault()(*bool) { + return m.isDefault +} +// GetLastUpdatedBy gets the lastUpdatedBy property value. Read-only. The display name of the administrator who last updated the roleSetting. +func (m *GovernanceRoleSetting) GetLastUpdatedBy()(*string) { + return m.lastUpdatedBy +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Read-only. The time when the role setting was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleSetting) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetResource gets the resource property value. Read-only. The associated resource for this role setting. +func (m *GovernanceRoleSetting) GetResource()(GovernanceResourceable) { + return m.resource +} +// GetResourceId gets the resourceId property value. Required. The id of the resource that the role setting is associated with. +func (m *GovernanceRoleSetting) GetResourceId()(*string) { + return m.resourceId +} +// GetRoleDefinition gets the roleDefinition property value. Read-only. The role definition that is enforced with this role setting. +func (m *GovernanceRoleSetting) GetRoleDefinition()(GovernanceRoleDefinitionable) { + return m.roleDefinition +} +// GetRoleDefinitionId gets the roleDefinitionId property value. Required. The id of the role definition that the role setting is associated with. +func (m *GovernanceRoleSetting) GetRoleDefinitionId()(*string) { + return m.roleDefinitionId +} +// GetUserEligibleSettings gets the userEligibleSettings property value. The rule settings that are evaluated when a user tries to add an eligible role assignment. The setting is not supported for now. +func (m *GovernanceRoleSetting) GetUserEligibleSettings()([]GovernanceRuleSettingable) { + return m.userEligibleSettings +} +// GetUserMemberSettings gets the userMemberSettings property value. The rule settings that are evaluated when a user tries to activate his role assignment. +func (m *GovernanceRoleSetting) GetUserMemberSettings()([]GovernanceRuleSettingable) { + return m.userMemberSettings +} +// Serialize serializes information the current object +func (m *GovernanceRoleSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdminEligibleSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdminEligibleSettings())) + for i, v := range m.GetAdminEligibleSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("adminEligibleSettings", cast) + if err != nil { + return err + } + } + if m.GetAdminMemberSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdminMemberSettings())) + for i, v := range m.GetAdminMemberSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("adminMemberSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastUpdatedBy", m.GetLastUpdatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleDefinition", m.GetRoleDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleDefinitionId", m.GetRoleDefinitionId()) + if err != nil { + return err + } + } + if m.GetUserEligibleSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserEligibleSettings())) + for i, v := range m.GetUserEligibleSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userEligibleSettings", cast) + if err != nil { + return err + } + } + if m.GetUserMemberSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserMemberSettings())) + for i, v := range m.GetUserMemberSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userMemberSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetAdminEligibleSettings sets the adminEligibleSettings property value. The rule settings that are evaluated when an administrator tries to add an eligible role assignment. +func (m *GovernanceRoleSetting) SetAdminEligibleSettings(value []GovernanceRuleSettingable)() { + m.adminEligibleSettings = value +} +// SetAdminMemberSettings sets the adminMemberSettings property value. The rule settings that are evaluated when an administrator tries to add a direct member role assignment. +func (m *GovernanceRoleSetting) SetAdminMemberSettings(value []GovernanceRuleSettingable)() { + m.adminMemberSettings = value +} +// SetIsDefault sets the isDefault property value. Read-only. Indicate if the roleSetting is a default roleSetting +func (m *GovernanceRoleSetting) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetLastUpdatedBy sets the lastUpdatedBy property value. Read-only. The display name of the administrator who last updated the roleSetting. +func (m *GovernanceRoleSetting) SetLastUpdatedBy(value *string)() { + m.lastUpdatedBy = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Read-only. The time when the role setting was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceRoleSetting) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetResource sets the resource property value. Read-only. The associated resource for this role setting. +func (m *GovernanceRoleSetting) SetResource(value GovernanceResourceable)() { + m.resource = value +} +// SetResourceId sets the resourceId property value. Required. The id of the resource that the role setting is associated with. +func (m *GovernanceRoleSetting) SetResourceId(value *string)() { + m.resourceId = value +} +// SetRoleDefinition sets the roleDefinition property value. Read-only. The role definition that is enforced with this role setting. +func (m *GovernanceRoleSetting) SetRoleDefinition(value GovernanceRoleDefinitionable)() { + m.roleDefinition = value +} +// SetRoleDefinitionId sets the roleDefinitionId property value. Required. The id of the role definition that the role setting is associated with. +func (m *GovernanceRoleSetting) SetRoleDefinitionId(value *string)() { + m.roleDefinitionId = value +} +// SetUserEligibleSettings sets the userEligibleSettings property value. The rule settings that are evaluated when a user tries to add an eligible role assignment. The setting is not supported for now. +func (m *GovernanceRoleSetting) SetUserEligibleSettings(value []GovernanceRuleSettingable)() { + m.userEligibleSettings = value +} +// SetUserMemberSettings sets the userMemberSettings property value. The rule settings that are evaluated when a user tries to activate his role assignment. +func (m *GovernanceRoleSetting) SetUserMemberSettings(value []GovernanceRuleSettingable)() { + m.userMemberSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_response.go new file mode 100644 index 000000000..2e58b19a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleSettingCollectionResponse +type GovernanceRoleSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceRoleSettingable +} +// NewGovernanceRoleSettingCollectionResponse instantiates a new GovernanceRoleSettingCollectionResponse and sets the default values. +func NewGovernanceRoleSettingCollectionResponse()(*GovernanceRoleSettingCollectionResponse) { + m := &GovernanceRoleSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceRoleSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRoleSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRoleSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRoleSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceRoleSettingCollectionResponse) GetValue()([]GovernanceRoleSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceRoleSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceRoleSettingCollectionResponse) SetValue(value []GovernanceRoleSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_responseable.go new file mode 100644 index 000000000..3152416a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleSettingCollectionResponseable +type GovernanceRoleSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceRoleSettingable) + SetValue(value []GovernanceRoleSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_role_settingable.go b/src/internal/connector/graph/betasdk/models/governance_role_settingable.go new file mode 100644 index 000000000..c25e691bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_role_settingable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRoleSettingable +type GovernanceRoleSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminEligibleSettings()([]GovernanceRuleSettingable) + GetAdminMemberSettings()([]GovernanceRuleSettingable) + GetIsDefault()(*bool) + GetLastUpdatedBy()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResource()(GovernanceResourceable) + GetResourceId()(*string) + GetRoleDefinition()(GovernanceRoleDefinitionable) + GetRoleDefinitionId()(*string) + GetUserEligibleSettings()([]GovernanceRuleSettingable) + GetUserMemberSettings()([]GovernanceRuleSettingable) + SetAdminEligibleSettings(value []GovernanceRuleSettingable)() + SetAdminMemberSettings(value []GovernanceRuleSettingable)() + SetIsDefault(value *bool)() + SetLastUpdatedBy(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResource(value GovernanceResourceable)() + SetResourceId(value *string)() + SetRoleDefinition(value GovernanceRoleDefinitionable)() + SetRoleDefinitionId(value *string)() + SetUserEligibleSettings(value []GovernanceRuleSettingable)() + SetUserMemberSettings(value []GovernanceRuleSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_rule_setting.go b/src/internal/connector/graph/betasdk/models/governance_rule_setting.go new file mode 100644 index 000000000..0d7b56f8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_rule_setting.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRuleSetting +type GovernanceRuleSetting 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 OdataType property + odataType *string + // The id of the rule. For example, ExpirationRule and MfaRule. + ruleIdentifier *string + // The settings of the rule. The value is a JSON string with a list of pairs in the format of Parameter_Name:Parameter_Value. For example, {'permanentAssignment':false,'maximumGrantPeriodInMinutes':129600} + setting *string +} +// NewGovernanceRuleSetting instantiates a new governanceRuleSetting and sets the default values. +func NewGovernanceRuleSetting()(*GovernanceRuleSetting) { + m := &GovernanceRuleSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceRuleSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRuleSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRuleSetting(), 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 *GovernanceRuleSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRuleSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["ruleIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleIdentifier(val) + } + return nil + } + res["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceRuleSetting) GetOdataType()(*string) { + return m.odataType +} +// GetRuleIdentifier gets the ruleIdentifier property value. The id of the rule. For example, ExpirationRule and MfaRule. +func (m *GovernanceRuleSetting) GetRuleIdentifier()(*string) { + return m.ruleIdentifier +} +// GetSetting gets the setting property value. The settings of the rule. The value is a JSON string with a list of pairs in the format of Parameter_Name:Parameter_Value. For example, {'permanentAssignment':false,'maximumGrantPeriodInMinutes':129600} +func (m *GovernanceRuleSetting) GetSetting()(*string) { + return m.setting +} +// Serialize serializes information the current object +func (m *GovernanceRuleSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ruleIdentifier", m.GetRuleIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("setting", m.GetSetting()) + 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 *GovernanceRuleSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceRuleSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetRuleIdentifier sets the ruleIdentifier property value. The id of the rule. For example, ExpirationRule and MfaRule. +func (m *GovernanceRuleSetting) SetRuleIdentifier(value *string)() { + m.ruleIdentifier = value +} +// SetSetting sets the setting property value. The settings of the rule. The value is a JSON string with a list of pairs in the format of Parameter_Name:Parameter_Value. For example, {'permanentAssignment':false,'maximumGrantPeriodInMinutes':129600} +func (m *GovernanceRuleSetting) SetSetting(value *string)() { + m.setting = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_response.go new file mode 100644 index 000000000..f7191e926 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRuleSettingCollectionResponse +type GovernanceRuleSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceRuleSettingable +} +// NewGovernanceRuleSettingCollectionResponse instantiates a new GovernanceRuleSettingCollectionResponse and sets the default values. +func NewGovernanceRuleSettingCollectionResponse()(*GovernanceRuleSettingCollectionResponse) { + m := &GovernanceRuleSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceRuleSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceRuleSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceRuleSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceRuleSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRuleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRuleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRuleSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceRuleSettingCollectionResponse) GetValue()([]GovernanceRuleSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceRuleSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceRuleSettingCollectionResponse) SetValue(value []GovernanceRuleSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_responseable.go new file mode 100644 index 000000000..f92815d74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_rule_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRuleSettingCollectionResponseable +type GovernanceRuleSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceRuleSettingable) + SetValue(value []GovernanceRuleSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_rule_settingable.go b/src/internal/connector/graph/betasdk/models/governance_rule_settingable.go new file mode 100644 index 000000000..ca070ef9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_rule_settingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceRuleSettingable +type GovernanceRuleSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRuleIdentifier()(*string) + GetSetting()(*string) + SetOdataType(value *string)() + SetRuleIdentifier(value *string)() + SetSetting(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_schedule.go b/src/internal/connector/graph/betasdk/models/governance_schedule.go new file mode 100644 index 000000000..fc11d0db4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_schedule.go @@ -0,0 +1,176 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceSchedule +type GovernanceSchedule 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 duration of a role assignment. It is in format of a TimeSpan. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The end time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Note: if the value is null, it indicates a permanent assignment. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The role assignment schedule type. Only Once is supported for now. + type_escaped *string +} +// NewGovernanceSchedule instantiates a new governanceSchedule and sets the default values. +func NewGovernanceSchedule()(*GovernanceSchedule) { + m := &GovernanceSchedule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGovernanceScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceSchedule(), 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 *GovernanceSchedule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDuration gets the duration property value. The duration of a role assignment. It is in format of a TimeSpan. +func (m *GovernanceSchedule) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetEndDateTime gets the endDateTime property value. The end time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Note: if the value is null, it indicates a permanent assignment. +func (m *GovernanceSchedule) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GovernanceSchedule) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceSchedule) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetType gets the type property value. The role assignment schedule type. Only Once is supported for now. +func (m *GovernanceSchedule) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *GovernanceSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteISODurationValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *GovernanceSchedule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDuration sets the duration property value. The duration of a role assignment. It is in format of a TimeSpan. +func (m *GovernanceSchedule) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetEndDateTime sets the endDateTime property value. The end time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Note: if the value is null, it indicates a permanent assignment. +func (m *GovernanceSchedule) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GovernanceSchedule) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the role assignment. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *GovernanceSchedule) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetType sets the type property value. The role assignment schedule type. Only Once is supported for now. +func (m *GovernanceSchedule) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_scheduleable.go b/src/internal/connector/graph/betasdk/models/governance_scheduleable.go new file mode 100644 index 000000000..416f294db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_scheduleable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceScheduleable +type GovernanceScheduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetType()(*string) + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_subject.go b/src/internal/connector/graph/betasdk/models/governance_subject.go new file mode 100644 index 000000000..89b670652 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_subject.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceSubject +type GovernanceSubject struct { + Entity + // The display name of the subject. + displayName *string + // The email address of the user subject. If the subject is in other types, it is empty. + email *string + // The principal name of the user subject. If the subject is in other types, it is empty. + principalName *string + // The type of the subject. The value can be User, Group, and ServicePrincipal. + type_escaped *string +} +// NewGovernanceSubject instantiates a new governanceSubject and sets the default values. +func NewGovernanceSubject()(*GovernanceSubject) { + m := &GovernanceSubject{ + Entity: *NewEntity(), + } + return m +} +// CreateGovernanceSubjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceSubjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceSubject(), nil +} +// GetDisplayName gets the displayName property value. The display name of the subject. +func (m *GovernanceSubject) GetDisplayName()(*string) { + return m.displayName +} +// GetEmail gets the email property value. The email address of the user subject. If the subject is in other types, it is empty. +func (m *GovernanceSubject) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceSubject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["principalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetPrincipalName gets the principalName property value. The principal name of the user subject. If the subject is in other types, it is empty. +func (m *GovernanceSubject) GetPrincipalName()(*string) { + return m.principalName +} +// GetType gets the type property value. The type of the subject. The value can be User, Group, and ServicePrincipal. +func (m *GovernanceSubject) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *GovernanceSubject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalName", m.GetPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the subject. +func (m *GovernanceSubject) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmail sets the email property value. The email address of the user subject. If the subject is in other types, it is empty. +func (m *GovernanceSubject) SetEmail(value *string)() { + m.email = value +} +// SetPrincipalName sets the principalName property value. The principal name of the user subject. If the subject is in other types, it is empty. +func (m *GovernanceSubject) SetPrincipalName(value *string)() { + m.principalName = value +} +// SetType sets the type property value. The type of the subject. The value can be User, Group, and ServicePrincipal. +func (m *GovernanceSubject) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_subject_collection_response.go b/src/internal/connector/graph/betasdk/models/governance_subject_collection_response.go new file mode 100644 index 000000000..bdd260dc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_subject_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceSubjectCollectionResponse +type GovernanceSubjectCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GovernanceSubjectable +} +// NewGovernanceSubjectCollectionResponse instantiates a new GovernanceSubjectCollectionResponse and sets the default values. +func NewGovernanceSubjectCollectionResponse()(*GovernanceSubjectCollectionResponse) { + m := &GovernanceSubjectCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGovernanceSubjectCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGovernanceSubjectCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGovernanceSubjectCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GovernanceSubjectCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceSubjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceSubjectable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceSubjectable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GovernanceSubjectCollectionResponse) GetValue()([]GovernanceSubjectable) { + return m.value +} +// Serialize serializes information the current object +func (m *GovernanceSubjectCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GovernanceSubjectCollectionResponse) SetValue(value []GovernanceSubjectable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/governance_subject_collection_responseable.go b/src/internal/connector/graph/betasdk/models/governance_subject_collection_responseable.go new file mode 100644 index 000000000..82e0a0ce5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_subject_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceSubjectCollectionResponseable +type GovernanceSubjectCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GovernanceSubjectable) + SetValue(value []GovernanceSubjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/governance_subjectable.go b/src/internal/connector/graph/betasdk/models/governance_subjectable.go new file mode 100644 index 000000000..c29536956 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/governance_subjectable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GovernanceSubjectable +type GovernanceSubjectable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetEmail()(*string) + GetPrincipalName()(*string) + GetType()(*string) + SetDisplayName(value *string)() + SetEmail(value *string)() + SetPrincipalName(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group.go b/src/internal/connector/graph/betasdk/models/group.go new file mode 100644 index 000000000..aea9c3d8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group.go @@ -0,0 +1,2278 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Group provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Group struct { + DirectoryObject + // The list of users or groups that are allowed to create post's or calendar events in this group. If this list is non-empty then only users or groups listed here are allowed to post. + acceptedSenders []DirectoryObjectable + // The accessType property + accessType *GroupAccessType + // Indicates if people external to the organization can send messages to the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + allowExternalSenders *bool + // Represents the app roles a group has been granted for an application. Supports $expand. + appRoleAssignments []AppRoleAssignmentable + // The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Returned only on $select. + assignedLabels []AssignedLabelable + // The licenses that are assigned to the group. Returned only on $select. Supports $filter (eq). Read-only. + assignedLicenses []AssignedLicenseable + // Indicates if new members added to the group will be auto-subscribed to receive email notifications. You can set this property in a PATCH request for the group; do not set it in the initial POST request that creates the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + autoSubscribeNewMembers *bool + // The group's calendar. Read-only. + calendar Calendarable + // The calendar view for the calendar. Read-only. + calendarView []Eventable + // Describes a classification for the group (such as low, medium or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). + classification *string + // The group's conversations. + conversations []Conversationable + // App ID of the app used to create the group. Can be null for some groups. Returned by default. Read-only. Supports $filter (eq, ne, not, in, startsWith). + createdByAppId *string + // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user (or application) that created the group. Note: This is not set if the user is an administrator. Read-only. + createdOnBehalfOf DirectoryObjectable + // An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. + description *string + // The display name for the group. Required. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. + displayName *string + // The group's default drive. Read-only. + drive Driveable + // The group's drives. Read-only. + drives []Driveable + // Endpoints for the group. Read-only. Nullable. + endpoints []Endpointable + // The group's events. + events []Eventable + // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of open extensions defined for the group. Read-only. Nullable. + extensions []Extensionable + // The collection of lifecycle policies for this group. Read-only. Nullable. + groupLifecyclePolicies []GroupLifecyclePolicyable + // Specifies the group type and its membership. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see groups overview.If the collection includes DynamicMembership, the group has dynamic membership; otherwise, membership is static. Returned by default. Supports $filter (eq, not). + groupTypes []string + // Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). Supports $filter (eq). + hasMembersWithLicenseErrors *bool + // true if the group is not displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + hideFromAddressLists *bool + // true if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web, false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + hideFromOutlookClients *bool + // Identifies the info segments assigned to the group. Returned by default. Supports $filter (eq, not, ge, le, startsWith). + infoCatalogs []string + // When a group is associated with a team, this property determines whether the team is in read-only mode. To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs. + isArchived *bool + // Indicates whether this group can be assigned to an Azure Active Directory role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group cannot be a dynamic group (that is, groupTypes cannot contain DynamicMembership). Only callers in Global Administrator and Privileged Role Administrator roles can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Azure AD role assignmentsUsing this feature requires a Azure AD Premium P1 license. Returned by default. Supports $filter (eq, ne, not). + isAssignableToRole *bool + // The isFavorite property + isFavorite *bool + // The isManagementRestricted property + isManagementRestricted *bool + // Indicates whether the signed-in user is subscribed to receive email conversations. Default value is true. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + isSubscribedByMail *bool + // Indicates status of the group license assignment to all members of the group. Possible values: QueuedForProcessing, ProcessingInProgress, and ProcessingComplete. Returned only on $select. Read-only. + licenseProcessingState LicenseProcessingStateable + // The SMTP address for the group, for example, 'serviceadmins@contoso.onmicrosoft.com'. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + mail *string + // Specifies whether the group is mail-enabled. Required. Returned by default. Supports $filter (eq, ne, not, and eq on null values). + mailEnabled *bool + // The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () / [] ' ; : <> , SPACE. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). + mailNickname *string + // Groups and administrative units that this group is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. + memberOf []DirectoryObjectable + // Direct members of this group, who can be users, devices, other groups, or service principals. Supports the List members, Add member, and Remove member operations. Nullable. Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=members($select=id,userPrincipalName,displayName). + members []DirectoryObjectable + // The rule that determines members for this group if the group is a dynamic group (groupTypes contains DynamicMembership). For more information about the syntax of the membership rule, see Membership Rules syntax. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). + membershipRule *string + // Indicates whether the dynamic membership processing is on or paused. Possible values are On or Paused. Returned by default. Supports $filter (eq, ne, not, in). + membershipRuleProcessingState *string + // Describes the processing status for rules-based dynamic groups. The property is null for non-rule based dynamic groups or if the dynamic group processing has been paused. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). Read-only. + membershipRuleProcessingStatus MembershipRuleProcessingStatusable + // A list of group members with license errors from this group-based license assignment. Read-only. + membersWithLicenseErrors []DirectoryObjectable + // The onenote property + onenote Onenoteable + // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. + onPremisesDomainName *string + // Indicates the last time at which the group was synced with the on-premises directory.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in). + onPremisesLastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. + onPremisesNetBiosName *string + // Errors when using Microsoft synchronization product during provisioning. Returned by default. Supports $filter (eq, not). + onPremisesProvisioningErrors []OnPremisesProvisioningErrorable + // Contains the on-premises SAM account name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). Read-only. + onPremisesSamAccountName *string + // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Supports $filter (eq including on null values). Read-only. + onPremisesSecurityIdentifier *string + // true if this group is synced from an on-premises directory; false if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter (eq, ne, not, in, and eq on null values). + onPremisesSyncEnabled *bool + // The organizationId property + organizationId *string + // The owners of the group who can be users or service principals. Nullable. If this property is not specified when creating a Microsoft 365 group, the calling user is automatically assigned as the group owner. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1); Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName). + owners []DirectoryObjectable + // The permissions that have been granted for a group to a specific application. Supports $expand. + permissionGrants []ResourceSpecificPermissionGrantable + // The group's profile photo. + photo ProfilePhotoable + // The profile photos owned by the group. Read-only. Nullable. + photos []ProfilePhotoable + // Selective Planner services available to the group. Read-only. Nullable. + planner PlannerGroupable + // The preferred data location for the Microsoft 365 group. By default, the group inherits the group creator's preferred data location. To set this property, the calling user must be assigned one of the following Azure AD roles: Global Administrator User Account Administrator Directory Writer Exchange Administrator SharePoint Administrator For more information about this property, see OneDrive Online Multi-Geo. Nullable. Returned by default. + preferredDataLocation *string + // The preferred language for a Microsoft 365 group. Should follow ISO 639-1 Code; for example en-US. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). + preferredLanguage *string + // Email addresses for the group that direct to the same group mailbox. For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. The any operator is required for filter expressions on multi-valued properties. Returned by default. Read-only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). + proxyAddresses []string + // The list of users or groups that are not allowed to create posts or calendar events in this group. Nullable + rejectedSenders []DirectoryObjectable + // Timestamp of when the group was last renewed. This cannot be modified directly and is only updated via the renew service action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. + renewedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the group behaviors that can be set for a Microsoft 365 group during creation. This can be set only as part of creation (POST). Possible values are AllowOnlyMembersToPost, HideGroupInOutlook, SubscribeNewGroupMembers, WelcomeEmailDisabled. For more information, see Set Microsoft 365 group behaviors and provisioning options. + resourceBehaviorOptions []string + // Specifies the group resources that are provisioned as part of Microsoft 365 group creation, that are not normally part of default group creation. Possible value is Team. For more information, see Set Microsoft 365 group behaviors and provisioning options. Returned by default. Supports $filter (eq, not, startsWith. + resourceProvisioningOptions []string + // Specifies whether the group is a security group. Required.Returned by default. Supports $filter (eq, ne, not, in). + securityEnabled *bool + // Security identifier of the group, used in Windows scenarios. Returned by default. + securityIdentifier *string + // Settings that can govern this group's behavior, like whether members can invite guest users to the group. Nullable. + settings []DirectorySettingable + // The list of SharePoint sites in this group. Access the default site with /sites/root. + sites []Siteable + // The team associated with this group. + team Teamable + // Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange or Red. Returned by default. + theme *string + // The group's conversation threads. Nullable. + threads []ConversationThreadable + // The groups that a group is a member of, either directly and through nested membership. Nullable. + transitiveMemberOf []DirectoryObjectable + // The direct and transitive members of a group. Nullable. + transitiveMembers []DirectoryObjectable + // Count of conversations that have been delivered one or more new posts since the signed-in user's last visit to the group. This property is the same as unseenCount. Returned only on $select. + unseenConversationsCount *int32 + // Count of conversations that have received new posts since the signed-in user last visited the group. This property is the same as unseenConversationsCount.Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). + unseenCount *int32 + // Count of new posts that have been delivered to the group's conversations since the signed-in user's last visit to the group. Returned only on $select. + unseenMessagesCount *int32 + // Specifies the group join policy and group content visibility for groups. Possible values are: Private, Public, or HiddenMembership. HiddenMembership can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation. If visibility value is not specified during group creation on Microsoft Graph, a security group is created as Private by default and Microsoft 365 group is Public. Groups assignable to roles are always Private. See group visibility options to learn more. Returned by default. Nullable. + visibility *string + // Specifies whether or not a group is configured to write back group object properties to on-premise Active Directory. These properties are used when group writeback is configured in the Azure AD Connect sync client. + writebackConfiguration GroupWritebackConfigurationable +} +// NewGroup instantiates a new group and sets the default values. +func NewGroup()(*Group) { + m := &Group{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.group"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroup(), nil +} +// GetAcceptedSenders gets the acceptedSenders property value. The list of users or groups that are allowed to create post's or calendar events in this group. If this list is non-empty then only users or groups listed here are allowed to post. +func (m *Group) GetAcceptedSenders()([]DirectoryObjectable) { + return m.acceptedSenders +} +// GetAccessType gets the accessType property value. The accessType property +func (m *Group) GetAccessType()(*GroupAccessType) { + return m.accessType +} +// GetAllowExternalSenders gets the allowExternalSenders property value. Indicates if people external to the organization can send messages to the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetAllowExternalSenders()(*bool) { + return m.allowExternalSenders +} +// GetAppRoleAssignments gets the appRoleAssignments property value. Represents the app roles a group has been granted for an application. Supports $expand. +func (m *Group) GetAppRoleAssignments()([]AppRoleAssignmentable) { + return m.appRoleAssignments +} +// GetAssignedLabels gets the assignedLabels property value. The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Returned only on $select. +func (m *Group) GetAssignedLabels()([]AssignedLabelable) { + return m.assignedLabels +} +// GetAssignedLicenses gets the assignedLicenses property value. The licenses that are assigned to the group. Returned only on $select. Supports $filter (eq). Read-only. +func (m *Group) GetAssignedLicenses()([]AssignedLicenseable) { + return m.assignedLicenses +} +// GetAutoSubscribeNewMembers gets the autoSubscribeNewMembers property value. Indicates if new members added to the group will be auto-subscribed to receive email notifications. You can set this property in a PATCH request for the group; do not set it in the initial POST request that creates the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetAutoSubscribeNewMembers()(*bool) { + return m.autoSubscribeNewMembers +} +// GetCalendar gets the calendar property value. The group's calendar. Read-only. +func (m *Group) GetCalendar()(Calendarable) { + return m.calendar +} +// GetCalendarView gets the calendarView property value. The calendar view for the calendar. Read-only. +func (m *Group) GetCalendarView()([]Eventable) { + return m.calendarView +} +// GetClassification gets the classification property value. Describes a classification for the group (such as low, medium or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). +func (m *Group) GetClassification()(*string) { + return m.classification +} +// GetConversations gets the conversations property value. The group's conversations. +func (m *Group) GetConversations()([]Conversationable) { + return m.conversations +} +// GetCreatedByAppId gets the createdByAppId property value. App ID of the app used to create the group. Can be null for some groups. Returned by default. Read-only. Supports $filter (eq, ne, not, in, startsWith). +func (m *Group) GetCreatedByAppId()(*string) { + return m.createdByAppId +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreatedOnBehalfOf gets the createdOnBehalfOf property value. The user (or application) that created the group. Note: This is not set if the user is an administrator. Read-only. +func (m *Group) GetCreatedOnBehalfOf()(DirectoryObjectable) { + return m.createdOnBehalfOf +} +// GetDescription gets the description property value. An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *Group) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the group. Required. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Group) GetDisplayName()(*string) { + return m.displayName +} +// GetDrive gets the drive property value. The group's default drive. Read-only. +func (m *Group) GetDrive()(Driveable) { + return m.drive +} +// GetDrives gets the drives property value. The group's drives. Read-only. +func (m *Group) GetDrives()([]Driveable) { + return m.drives +} +// GetEndpoints gets the endpoints property value. Endpoints for the group. Read-only. Nullable. +func (m *Group) GetEndpoints()([]Endpointable) { + return m.endpoints +} +// GetEvents gets the events property value. The group's events. +func (m *Group) GetEvents()([]Eventable) { + return m.events +} +// GetExpirationDateTime gets the expirationDateTime property value. Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the group. Read-only. Nullable. +func (m *Group) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Group) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["acceptedSenders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetAcceptedSenders(res) + } + return nil + } + res["accessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupAccessType) + if err != nil { + return err + } + if val != nil { + m.SetAccessType(val.(*GroupAccessType)) + } + return nil + } + res["allowExternalSenders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowExternalSenders(val) + } + return nil + } + res["appRoleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleAssignmentable) + } + m.SetAppRoleAssignments(res) + } + return nil + } + res["assignedLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedLabelable, len(val)) + for i, v := range val { + res[i] = v.(AssignedLabelable) + } + m.SetAssignedLabels(res) + } + return nil + } + res["assignedLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(AssignedLicenseable) + } + m.SetAssignedLicenses(res) + } + return nil + } + res["autoSubscribeNewMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoSubscribeNewMembers(val) + } + return nil + } + res["calendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCalendarFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCalendar(val.(Calendarable)) + } + return nil + } + res["calendarView"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetCalendarView(res) + } + return nil + } + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClassification(val) + } + return nil + } + res["conversations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Conversationable, len(val)) + for i, v := range val { + res[i] = v.(Conversationable) + } + m.SetConversations(res) + } + return nil + } + res["createdByAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByAppId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["createdOnBehalfOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedOnBehalfOf(val.(DirectoryObjectable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["drive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDrive(val.(Driveable)) + } + return nil + } + res["drives"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Driveable, len(val)) + for i, v := range val { + res[i] = v.(Driveable) + } + m.SetDrives(res) + } + return nil + } + res["endpoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Endpointable, len(val)) + for i, v := range val { + res[i] = v.(Endpointable) + } + m.SetEndpoints(res) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Eventable, len(val)) + for i, v := range val { + res[i] = v.(Eventable) + } + m.SetEvents(res) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["groupLifecyclePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupLifecyclePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupLifecyclePolicyable, len(val)) + for i, v := range val { + res[i] = v.(GroupLifecyclePolicyable) + } + m.SetGroupLifecyclePolicies(res) + } + return nil + } + res["groupTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGroupTypes(res) + } + return nil + } + res["hasMembersWithLicenseErrors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasMembersWithLicenseErrors(val) + } + return nil + } + res["hideFromAddressLists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideFromAddressLists(val) + } + return nil + } + res["hideFromOutlookClients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideFromOutlookClients(val) + } + return nil + } + res["infoCatalogs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetInfoCatalogs(res) + } + return nil + } + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } + res["isAssignableToRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAssignableToRole(val) + } + return nil + } + res["isFavorite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFavorite(val) + } + return nil + } + res["isManagementRestricted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsManagementRestricted(val) + } + return nil + } + res["isSubscribedByMail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSubscribedByMail(val) + } + return nil + } + res["licenseProcessingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLicenseProcessingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicenseProcessingState(val.(LicenseProcessingStateable)) + } + return nil + } + res["mail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMail(val) + } + return nil + } + res["mailEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMailEnabled(val) + } + return nil + } + res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNickname(val) + } + return nil + } + res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMemberOf(res) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMembers(res) + } + return nil + } + res["membershipRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembershipRule(val) + } + return nil + } + res["membershipRuleProcessingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMembershipRuleProcessingState(val) + } + return nil + } + res["membershipRuleProcessingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMembershipRuleProcessingStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMembershipRuleProcessingStatus(val.(MembershipRuleProcessingStatusable)) + } + return nil + } + res["membersWithLicenseErrors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMembersWithLicenseErrors(res) + } + return nil + } + res["onenote"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnenoteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnenote(val.(Onenoteable)) + } + return nil + } + res["onPremisesDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesDomainName(val) + } + return nil + } + res["onPremisesLastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesLastSyncDateTime(val) + } + return nil + } + res["onPremisesNetBiosName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesNetBiosName(val) + } + return nil + } + res["onPremisesProvisioningErrors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesProvisioningErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesProvisioningErrorable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesProvisioningErrorable) + } + m.SetOnPremisesProvisioningErrors(res) + } + return nil + } + res["onPremisesSamAccountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSamAccountName(val) + } + return nil + } + res["onPremisesSecurityIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSecurityIdentifier(val) + } + return nil + } + res["onPremisesSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSyncEnabled(val) + } + return nil + } + res["organizationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationId(val) + } + return nil + } + res["owners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetOwners(res) + } + return nil + } + res["permissionGrants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceSpecificPermissionGrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceSpecificPermissionGrantable, len(val)) + for i, v := range val { + res[i] = v.(ResourceSpecificPermissionGrantable) + } + m.SetPermissionGrants(res) + } + return nil + } + res["photo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProfilePhotoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPhoto(val.(ProfilePhotoable)) + } + return nil + } + res["photos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfilePhotoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfilePhotoable, len(val)) + for i, v := range val { + res[i] = v.(ProfilePhotoable) + } + m.SetPhotos(res) + } + return nil + } + res["planner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPlanner(val.(PlannerGroupable)) + } + return nil + } + res["preferredDataLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredDataLocation(val) + } + return nil + } + res["preferredLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredLanguage(val) + } + return nil + } + res["proxyAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetProxyAddresses(res) + } + return nil + } + res["rejectedSenders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetRejectedSenders(res) + } + return nil + } + res["renewedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRenewedDateTime(val) + } + return nil + } + res["resourceBehaviorOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetResourceBehaviorOptions(res) + } + return nil + } + res["resourceProvisioningOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetResourceProvisioningOptions(res) + } + return nil + } + res["securityEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityEnabled(val) + } + return nil + } + res["securityIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityIdentifier(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectorySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectorySettingable, len(val)) + for i, v := range val { + res[i] = v.(DirectorySettingable) + } + m.SetSettings(res) + } + return nil + } + res["sites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Siteable, len(val)) + for i, v := range val { + res[i] = v.(Siteable) + } + m.SetSites(res) + } + return nil + } + res["team"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTeamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeam(val.(Teamable)) + } + return nil + } + res["theme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTheme(val) + } + return nil + } + res["threads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationThreadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationThreadable, len(val)) + for i, v := range val { + res[i] = v.(ConversationThreadable) + } + m.SetThreads(res) + } + return nil + } + res["transitiveMemberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveMemberOf(res) + } + return nil + } + res["transitiveMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveMembers(res) + } + return nil + } + res["unseenConversationsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnseenConversationsCount(val) + } + return nil + } + res["unseenCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnseenCount(val) + } + return nil + } + res["unseenMessagesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnseenMessagesCount(val) + } + return nil + } + res["visibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibility(val) + } + return nil + } + res["writebackConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupWritebackConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWritebackConfiguration(val.(GroupWritebackConfigurationable)) + } + return nil + } + return res +} +// GetGroupLifecyclePolicies gets the groupLifecyclePolicies property value. The collection of lifecycle policies for this group. Read-only. Nullable. +func (m *Group) GetGroupLifecyclePolicies()([]GroupLifecyclePolicyable) { + return m.groupLifecyclePolicies +} +// GetGroupTypes gets the groupTypes property value. Specifies the group type and its membership. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see groups overview.If the collection includes DynamicMembership, the group has dynamic membership; otherwise, membership is static. Returned by default. Supports $filter (eq, not). +func (m *Group) GetGroupTypes()([]string) { + return m.groupTypes +} +// GetHasMembersWithLicenseErrors gets the hasMembersWithLicenseErrors property value. Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). Supports $filter (eq). +func (m *Group) GetHasMembersWithLicenseErrors()(*bool) { + return m.hasMembersWithLicenseErrors +} +// GetHideFromAddressLists gets the hideFromAddressLists property value. true if the group is not displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetHideFromAddressLists()(*bool) { + return m.hideFromAddressLists +} +// GetHideFromOutlookClients gets the hideFromOutlookClients property value. true if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web, false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetHideFromOutlookClients()(*bool) { + return m.hideFromOutlookClients +} +// GetInfoCatalogs gets the infoCatalogs property value. Identifies the info segments assigned to the group. Returned by default. Supports $filter (eq, not, ge, le, startsWith). +func (m *Group) GetInfoCatalogs()([]string) { + return m.infoCatalogs +} +// GetIsArchived gets the isArchived property value. When a group is associated with a team, this property determines whether the team is in read-only mode. To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs. +func (m *Group) GetIsArchived()(*bool) { + return m.isArchived +} +// GetIsAssignableToRole gets the isAssignableToRole property value. Indicates whether this group can be assigned to an Azure Active Directory role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group cannot be a dynamic group (that is, groupTypes cannot contain DynamicMembership). Only callers in Global Administrator and Privileged Role Administrator roles can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Azure AD role assignmentsUsing this feature requires a Azure AD Premium P1 license. Returned by default. Supports $filter (eq, ne, not). +func (m *Group) GetIsAssignableToRole()(*bool) { + return m.isAssignableToRole +} +// GetIsFavorite gets the isFavorite property value. The isFavorite property +func (m *Group) GetIsFavorite()(*bool) { + return m.isFavorite +} +// GetIsManagementRestricted gets the isManagementRestricted property value. The isManagementRestricted property +func (m *Group) GetIsManagementRestricted()(*bool) { + return m.isManagementRestricted +} +// GetIsSubscribedByMail gets the isSubscribedByMail property value. Indicates whether the signed-in user is subscribed to receive email conversations. Default value is true. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetIsSubscribedByMail()(*bool) { + return m.isSubscribedByMail +} +// GetLicenseProcessingState gets the licenseProcessingState property value. Indicates status of the group license assignment to all members of the group. Possible values: QueuedForProcessing, ProcessingInProgress, and ProcessingComplete. Returned only on $select. Read-only. +func (m *Group) GetLicenseProcessingState()(LicenseProcessingStateable) { + return m.licenseProcessingState +} +// GetMail gets the mail property value. The SMTP address for the group, for example, 'serviceadmins@contoso.onmicrosoft.com'. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). +func (m *Group) GetMail()(*string) { + return m.mail +} +// GetMailEnabled gets the mailEnabled property value. Specifies whether the group is mail-enabled. Required. Returned by default. Supports $filter (eq, ne, not, and eq on null values). +func (m *Group) GetMailEnabled()(*bool) { + return m.mailEnabled +} +// GetMailNickname gets the mailNickname property value. The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () / [] ' ; : <> , SPACE. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). +func (m *Group) GetMailNickname()(*string) { + return m.mailNickname +} +// GetMemberOf gets the memberOf property value. Groups and administrative units that this group is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. +func (m *Group) GetMemberOf()([]DirectoryObjectable) { + return m.memberOf +} +// GetMembers gets the members property value. Direct members of this group, who can be users, devices, other groups, or service principals. Supports the List members, Add member, and Remove member operations. Nullable. Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=members($select=id,userPrincipalName,displayName). +func (m *Group) GetMembers()([]DirectoryObjectable) { + return m.members +} +// GetMembershipRule gets the membershipRule property value. The rule that determines members for this group if the group is a dynamic group (groupTypes contains DynamicMembership). For more information about the syntax of the membership rule, see Membership Rules syntax. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). +func (m *Group) GetMembershipRule()(*string) { + return m.membershipRule +} +// GetMembershipRuleProcessingState gets the membershipRuleProcessingState property value. Indicates whether the dynamic membership processing is on or paused. Possible values are On or Paused. Returned by default. Supports $filter (eq, ne, not, in). +func (m *Group) GetMembershipRuleProcessingState()(*string) { + return m.membershipRuleProcessingState +} +// GetMembershipRuleProcessingStatus gets the membershipRuleProcessingStatus property value. Describes the processing status for rules-based dynamic groups. The property is null for non-rule based dynamic groups or if the dynamic group processing has been paused. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). Read-only. +func (m *Group) GetMembershipRuleProcessingStatus()(MembershipRuleProcessingStatusable) { + return m.membershipRuleProcessingStatus +} +// GetMembersWithLicenseErrors gets the membersWithLicenseErrors property value. A list of group members with license errors from this group-based license assignment. Read-only. +func (m *Group) GetMembersWithLicenseErrors()([]DirectoryObjectable) { + return m.membersWithLicenseErrors +} +// GetOnenote gets the onenote property value. The onenote property +func (m *Group) GetOnenote()(Onenoteable) { + return m.onenote +} +// GetOnPremisesDomainName gets the onPremisesDomainName property value. Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. +func (m *Group) GetOnPremisesDomainName()(*string) { + return m.onPremisesDomainName +} +// GetOnPremisesLastSyncDateTime gets the onPremisesLastSyncDateTime property value. Indicates the last time at which the group was synced with the on-premises directory.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in). +func (m *Group) GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onPremisesLastSyncDateTime +} +// GetOnPremisesNetBiosName gets the onPremisesNetBiosName property value. Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. +func (m *Group) GetOnPremisesNetBiosName()(*string) { + return m.onPremisesNetBiosName +} +// GetOnPremisesProvisioningErrors gets the onPremisesProvisioningErrors property value. Errors when using Microsoft synchronization product during provisioning. Returned by default. Supports $filter (eq, not). +func (m *Group) GetOnPremisesProvisioningErrors()([]OnPremisesProvisioningErrorable) { + return m.onPremisesProvisioningErrors +} +// GetOnPremisesSamAccountName gets the onPremisesSamAccountName property value. Contains the on-premises SAM account name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). Read-only. +func (m *Group) GetOnPremisesSamAccountName()(*string) { + return m.onPremisesSamAccountName +} +// GetOnPremisesSecurityIdentifier gets the onPremisesSecurityIdentifier property value. Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Supports $filter (eq including on null values). Read-only. +func (m *Group) GetOnPremisesSecurityIdentifier()(*string) { + return m.onPremisesSecurityIdentifier +} +// GetOnPremisesSyncEnabled gets the onPremisesSyncEnabled property value. true if this group is synced from an on-premises directory; false if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter (eq, ne, not, in, and eq on null values). +func (m *Group) GetOnPremisesSyncEnabled()(*bool) { + return m.onPremisesSyncEnabled +} +// GetOrganizationId gets the organizationId property value. The organizationId property +func (m *Group) GetOrganizationId()(*string) { + return m.organizationId +} +// GetOwners gets the owners property value. The owners of the group who can be users or service principals. Nullable. If this property is not specified when creating a Microsoft 365 group, the calling user is automatically assigned as the group owner. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1); Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName). +func (m *Group) GetOwners()([]DirectoryObjectable) { + return m.owners +} +// GetPermissionGrants gets the permissionGrants property value. The permissions that have been granted for a group to a specific application. Supports $expand. +func (m *Group) GetPermissionGrants()([]ResourceSpecificPermissionGrantable) { + return m.permissionGrants +} +// GetPhoto gets the photo property value. The group's profile photo. +func (m *Group) GetPhoto()(ProfilePhotoable) { + return m.photo +} +// GetPhotos gets the photos property value. The profile photos owned by the group. Read-only. Nullable. +func (m *Group) GetPhotos()([]ProfilePhotoable) { + return m.photos +} +// GetPlanner gets the planner property value. Selective Planner services available to the group. Read-only. Nullable. +func (m *Group) GetPlanner()(PlannerGroupable) { + return m.planner +} +// GetPreferredDataLocation gets the preferredDataLocation property value. The preferred data location for the Microsoft 365 group. By default, the group inherits the group creator's preferred data location. To set this property, the calling user must be assigned one of the following Azure AD roles: Global Administrator User Account Administrator Directory Writer Exchange Administrator SharePoint Administrator For more information about this property, see OneDrive Online Multi-Geo. Nullable. Returned by default. +func (m *Group) GetPreferredDataLocation()(*string) { + return m.preferredDataLocation +} +// GetPreferredLanguage gets the preferredLanguage property value. The preferred language for a Microsoft 365 group. Should follow ISO 639-1 Code; for example en-US. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). +func (m *Group) GetPreferredLanguage()(*string) { + return m.preferredLanguage +} +// GetProxyAddresses gets the proxyAddresses property value. Email addresses for the group that direct to the same group mailbox. For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. The any operator is required for filter expressions on multi-valued properties. Returned by default. Read-only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). +func (m *Group) GetProxyAddresses()([]string) { + return m.proxyAddresses +} +// GetRejectedSenders gets the rejectedSenders property value. The list of users or groups that are not allowed to create posts or calendar events in this group. Nullable +func (m *Group) GetRejectedSenders()([]DirectoryObjectable) { + return m.rejectedSenders +} +// GetRenewedDateTime gets the renewedDateTime property value. Timestamp of when the group was last renewed. This cannot be modified directly and is only updated via the renew service action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) GetRenewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.renewedDateTime +} +// GetResourceBehaviorOptions gets the resourceBehaviorOptions property value. Specifies the group behaviors that can be set for a Microsoft 365 group during creation. This can be set only as part of creation (POST). Possible values are AllowOnlyMembersToPost, HideGroupInOutlook, SubscribeNewGroupMembers, WelcomeEmailDisabled. For more information, see Set Microsoft 365 group behaviors and provisioning options. +func (m *Group) GetResourceBehaviorOptions()([]string) { + return m.resourceBehaviorOptions +} +// GetResourceProvisioningOptions gets the resourceProvisioningOptions property value. Specifies the group resources that are provisioned as part of Microsoft 365 group creation, that are not normally part of default group creation. Possible value is Team. For more information, see Set Microsoft 365 group behaviors and provisioning options. Returned by default. Supports $filter (eq, not, startsWith. +func (m *Group) GetResourceProvisioningOptions()([]string) { + return m.resourceProvisioningOptions +} +// GetSecurityEnabled gets the securityEnabled property value. Specifies whether the group is a security group. Required.Returned by default. Supports $filter (eq, ne, not, in). +func (m *Group) GetSecurityEnabled()(*bool) { + return m.securityEnabled +} +// GetSecurityIdentifier gets the securityIdentifier property value. Security identifier of the group, used in Windows scenarios. Returned by default. +func (m *Group) GetSecurityIdentifier()(*string) { + return m.securityIdentifier +} +// GetSettings gets the settings property value. Settings that can govern this group's behavior, like whether members can invite guest users to the group. Nullable. +func (m *Group) GetSettings()([]DirectorySettingable) { + return m.settings +} +// GetSites gets the sites property value. The list of SharePoint sites in this group. Access the default site with /sites/root. +func (m *Group) GetSites()([]Siteable) { + return m.sites +} +// GetTeam gets the team property value. The team associated with this group. +func (m *Group) GetTeam()(Teamable) { + return m.team +} +// GetTheme gets the theme property value. Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange or Red. Returned by default. +func (m *Group) GetTheme()(*string) { + return m.theme +} +// GetThreads gets the threads property value. The group's conversation threads. Nullable. +func (m *Group) GetThreads()([]ConversationThreadable) { + return m.threads +} +// GetTransitiveMemberOf gets the transitiveMemberOf property value. The groups that a group is a member of, either directly and through nested membership. Nullable. +func (m *Group) GetTransitiveMemberOf()([]DirectoryObjectable) { + return m.transitiveMemberOf +} +// GetTransitiveMembers gets the transitiveMembers property value. The direct and transitive members of a group. Nullable. +func (m *Group) GetTransitiveMembers()([]DirectoryObjectable) { + return m.transitiveMembers +} +// GetUnseenConversationsCount gets the unseenConversationsCount property value. Count of conversations that have been delivered one or more new posts since the signed-in user's last visit to the group. This property is the same as unseenCount. Returned only on $select. +func (m *Group) GetUnseenConversationsCount()(*int32) { + return m.unseenConversationsCount +} +// GetUnseenCount gets the unseenCount property value. Count of conversations that have received new posts since the signed-in user last visited the group. This property is the same as unseenConversationsCount.Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) GetUnseenCount()(*int32) { + return m.unseenCount +} +// GetUnseenMessagesCount gets the unseenMessagesCount property value. Count of new posts that have been delivered to the group's conversations since the signed-in user's last visit to the group. Returned only on $select. +func (m *Group) GetUnseenMessagesCount()(*int32) { + return m.unseenMessagesCount +} +// GetVisibility gets the visibility property value. Specifies the group join policy and group content visibility for groups. Possible values are: Private, Public, or HiddenMembership. HiddenMembership can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation. If visibility value is not specified during group creation on Microsoft Graph, a security group is created as Private by default and Microsoft 365 group is Public. Groups assignable to roles are always Private. See group visibility options to learn more. Returned by default. Nullable. +func (m *Group) GetVisibility()(*string) { + return m.visibility +} +// GetWritebackConfiguration gets the writebackConfiguration property value. Specifies whether or not a group is configured to write back group object properties to on-premise Active Directory. These properties are used when group writeback is configured in the Azure AD Connect sync client. +func (m *Group) GetWritebackConfiguration()(GroupWritebackConfigurationable) { + return m.writebackConfiguration +} +// Serialize serializes information the current object +func (m *Group) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + if m.GetAcceptedSenders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAcceptedSenders())) + for i, v := range m.GetAcceptedSenders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("acceptedSenders", cast) + if err != nil { + return err + } + } + if m.GetAccessType() != nil { + cast := (*m.GetAccessType()).String() + err = writer.WriteStringValue("accessType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowExternalSenders", m.GetAllowExternalSenders()) + if err != nil { + return err + } + } + if m.GetAppRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppRoleAssignments())) + for i, v := range m.GetAppRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appRoleAssignments", cast) + if err != nil { + return err + } + } + if m.GetAssignedLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLabels())) + for i, v := range m.GetAssignedLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedLabels", cast) + if err != nil { + return err + } + } + if m.GetAssignedLicenses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLicenses())) + for i, v := range m.GetAssignedLicenses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedLicenses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("autoSubscribeNewMembers", m.GetAutoSubscribeNewMembers()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("calendar", m.GetCalendar()) + if err != nil { + return err + } + } + if m.GetCalendarView() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCalendarView())) + for i, v := range m.GetCalendarView() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("calendarView", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("classification", m.GetClassification()) + if err != nil { + return err + } + } + if m.GetConversations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConversations())) + for i, v := range m.GetConversations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("conversations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByAppId", m.GetCreatedByAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdOnBehalfOf", m.GetCreatedOnBehalfOf()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("drive", m.GetDrive()) + if err != nil { + return err + } + } + if m.GetDrives() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDrives())) + for i, v := range m.GetDrives() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("drives", cast) + if err != nil { + return err + } + } + if m.GetEndpoints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEndpoints())) + for i, v := range m.GetEndpoints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("endpoints", cast) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvents())) + for i, v := range m.GetEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("events", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + if m.GetGroupLifecyclePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupLifecyclePolicies())) + for i, v := range m.GetGroupLifecyclePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupLifecyclePolicies", cast) + if err != nil { + return err + } + } + if m.GetGroupTypes() != nil { + err = writer.WriteCollectionOfStringValues("groupTypes", m.GetGroupTypes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasMembersWithLicenseErrors", m.GetHasMembersWithLicenseErrors()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hideFromAddressLists", m.GetHideFromAddressLists()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hideFromOutlookClients", m.GetHideFromOutlookClients()) + if err != nil { + return err + } + } + if m.GetInfoCatalogs() != nil { + err = writer.WriteCollectionOfStringValues("infoCatalogs", m.GetInfoCatalogs()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAssignableToRole", m.GetIsAssignableToRole()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFavorite", m.GetIsFavorite()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isManagementRestricted", m.GetIsManagementRestricted()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSubscribedByMail", m.GetIsSubscribedByMail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("licenseProcessingState", m.GetLicenseProcessingState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mail", m.GetMail()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("mailEnabled", m.GetMailEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mailNickname", m.GetMailNickname()) + if err != nil { + return err + } + } + if m.GetMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf())) + for i, v := range m.GetMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("memberOf", cast) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("membershipRule", m.GetMembershipRule()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("membershipRuleProcessingState", m.GetMembershipRuleProcessingState()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("membershipRuleProcessingStatus", m.GetMembershipRuleProcessingStatus()) + if err != nil { + return err + } + } + if m.GetMembersWithLicenseErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembersWithLicenseErrors())) + for i, v := range m.GetMembersWithLicenseErrors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("membersWithLicenseErrors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("onenote", m.GetOnenote()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesDomainName", m.GetOnPremisesDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("onPremisesLastSyncDateTime", m.GetOnPremisesLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesNetBiosName", m.GetOnPremisesNetBiosName()) + if err != nil { + return err + } + } + if m.GetOnPremisesProvisioningErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnPremisesProvisioningErrors())) + for i, v := range m.GetOnPremisesProvisioningErrors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesSamAccountName", m.GetOnPremisesSamAccountName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onPremisesSecurityIdentifier", m.GetOnPremisesSecurityIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onPremisesSyncEnabled", m.GetOnPremisesSyncEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("organizationId", m.GetOrganizationId()) + if err != nil { + return err + } + } + if m.GetOwners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOwners())) + for i, v := range m.GetOwners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("owners", cast) + if err != nil { + return err + } + } + if m.GetPermissionGrants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissionGrants())) + for i, v := range m.GetPermissionGrants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissionGrants", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("photo", m.GetPhoto()) + if err != nil { + return err + } + } + if m.GetPhotos() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhotos())) + for i, v := range m.GetPhotos() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("photos", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("planner", m.GetPlanner()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredDataLocation", m.GetPreferredDataLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredLanguage", m.GetPreferredLanguage()) + if err != nil { + return err + } + } + if m.GetProxyAddresses() != nil { + err = writer.WriteCollectionOfStringValues("proxyAddresses", m.GetProxyAddresses()) + if err != nil { + return err + } + } + if m.GetRejectedSenders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRejectedSenders())) + for i, v := range m.GetRejectedSenders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rejectedSenders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("renewedDateTime", m.GetRenewedDateTime()) + if err != nil { + return err + } + } + if m.GetResourceBehaviorOptions() != nil { + err = writer.WriteCollectionOfStringValues("resourceBehaviorOptions", m.GetResourceBehaviorOptions()) + if err != nil { + return err + } + } + if m.GetResourceProvisioningOptions() != nil { + err = writer.WriteCollectionOfStringValues("resourceProvisioningOptions", m.GetResourceProvisioningOptions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityEnabled", m.GetSecurityEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("securityIdentifier", m.GetSecurityIdentifier()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + if m.GetSites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSites())) + for i, v := range m.GetSites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sites", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("team", m.GetTeam()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("theme", m.GetTheme()) + if err != nil { + return err + } + } + if m.GetThreads() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetThreads())) + for i, v := range m.GetThreads() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("threads", cast) + if err != nil { + return err + } + } + if m.GetTransitiveMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMemberOf())) + for i, v := range m.GetTransitiveMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveMemberOf", cast) + if err != nil { + return err + } + } + if m.GetTransitiveMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMembers())) + for i, v := range m.GetTransitiveMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveMembers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unseenConversationsCount", m.GetUnseenConversationsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unseenCount", m.GetUnseenCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unseenMessagesCount", m.GetUnseenMessagesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("visibility", m.GetVisibility()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("writebackConfiguration", m.GetWritebackConfiguration()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptedSenders sets the acceptedSenders property value. The list of users or groups that are allowed to create post's or calendar events in this group. If this list is non-empty then only users or groups listed here are allowed to post. +func (m *Group) SetAcceptedSenders(value []DirectoryObjectable)() { + m.acceptedSenders = value +} +// SetAccessType sets the accessType property value. The accessType property +func (m *Group) SetAccessType(value *GroupAccessType)() { + m.accessType = value +} +// SetAllowExternalSenders sets the allowExternalSenders property value. Indicates if people external to the organization can send messages to the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetAllowExternalSenders(value *bool)() { + m.allowExternalSenders = value +} +// SetAppRoleAssignments sets the appRoleAssignments property value. Represents the app roles a group has been granted for an application. Supports $expand. +func (m *Group) SetAppRoleAssignments(value []AppRoleAssignmentable)() { + m.appRoleAssignments = value +} +// SetAssignedLabels sets the assignedLabels property value. The list of sensitivity label pairs (label ID, label name) associated with a Microsoft 365 group. Returned only on $select. +func (m *Group) SetAssignedLabels(value []AssignedLabelable)() { + m.assignedLabels = value +} +// SetAssignedLicenses sets the assignedLicenses property value. The licenses that are assigned to the group. Returned only on $select. Supports $filter (eq). Read-only. +func (m *Group) SetAssignedLicenses(value []AssignedLicenseable)() { + m.assignedLicenses = value +} +// SetAutoSubscribeNewMembers sets the autoSubscribeNewMembers property value. Indicates if new members added to the group will be auto-subscribed to receive email notifications. You can set this property in a PATCH request for the group; do not set it in the initial POST request that creates the group. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetAutoSubscribeNewMembers(value *bool)() { + m.autoSubscribeNewMembers = value +} +// SetCalendar sets the calendar property value. The group's calendar. Read-only. +func (m *Group) SetCalendar(value Calendarable)() { + m.calendar = value +} +// SetCalendarView sets the calendarView property value. The calendar view for the calendar. Read-only. +func (m *Group) SetCalendarView(value []Eventable)() { + m.calendarView = value +} +// SetClassification sets the classification property value. Describes a classification for the group (such as low, medium or high business impact). Valid values for this property are defined by creating a ClassificationList setting value, based on the template definition.Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). +func (m *Group) SetClassification(value *string)() { + m.classification = value +} +// SetConversations sets the conversations property value. The group's conversations. +func (m *Group) SetConversations(value []Conversationable)() { + m.conversations = value +} +// SetCreatedByAppId sets the createdByAppId property value. App ID of the app used to create the group. Can be null for some groups. Returned by default. Read-only. Supports $filter (eq, ne, not, in, startsWith). +func (m *Group) SetCreatedByAppId(value *string)() { + m.createdByAppId = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreatedOnBehalfOf sets the createdOnBehalfOf property value. The user (or application) that created the group. Note: This is not set if the user is an administrator. Read-only. +func (m *Group) SetCreatedOnBehalfOf(value DirectoryObjectable)() { + m.createdOnBehalfOf = value +} +// SetDescription sets the description property value. An optional description for the group. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *Group) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the group. Required. Maximum length is 256 characters. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *Group) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDrive sets the drive property value. The group's default drive. Read-only. +func (m *Group) SetDrive(value Driveable)() { + m.drive = value +} +// SetDrives sets the drives property value. The group's drives. Read-only. +func (m *Group) SetDrives(value []Driveable)() { + m.drives = value +} +// SetEndpoints sets the endpoints property value. Endpoints for the group. Read-only. Nullable. +func (m *Group) SetEndpoints(value []Endpointable)() { + m.endpoints = value +} +// SetEvents sets the events property value. The group's events. +func (m *Group) SetEvents(value []Eventable)() { + m.events = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the group. Read-only. Nullable. +func (m *Group) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetGroupLifecyclePolicies sets the groupLifecyclePolicies property value. The collection of lifecycle policies for this group. Read-only. Nullable. +func (m *Group) SetGroupLifecyclePolicies(value []GroupLifecyclePolicyable)() { + m.groupLifecyclePolicies = value +} +// SetGroupTypes sets the groupTypes property value. Specifies the group type and its membership. If the collection contains Unified, the group is a Microsoft 365 group; otherwise, it's either a security group or distribution group. For details, see groups overview.If the collection includes DynamicMembership, the group has dynamic membership; otherwise, membership is static. Returned by default. Supports $filter (eq, not). +func (m *Group) SetGroupTypes(value []string)() { + m.groupTypes = value +} +// SetHasMembersWithLicenseErrors sets the hasMembersWithLicenseErrors property value. Indicates whether there are members in this group that have license errors from its group-based license assignment. This property is never returned on a GET operation. You can use it as a $filter argument to get groups that have members with license errors (that is, filter for this property being true). Supports $filter (eq). +func (m *Group) SetHasMembersWithLicenseErrors(value *bool)() { + m.hasMembersWithLicenseErrors = value +} +// SetHideFromAddressLists sets the hideFromAddressLists property value. true if the group is not displayed in certain parts of the Outlook user interface: in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetHideFromAddressLists(value *bool)() { + m.hideFromAddressLists = value +} +// SetHideFromOutlookClients sets the hideFromOutlookClients property value. true if the group is not displayed in Outlook clients, such as Outlook for Windows and Outlook on the web, false otherwise. Default value is false. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetHideFromOutlookClients(value *bool)() { + m.hideFromOutlookClients = value +} +// SetInfoCatalogs sets the infoCatalogs property value. Identifies the info segments assigned to the group. Returned by default. Supports $filter (eq, not, ge, le, startsWith). +func (m *Group) SetInfoCatalogs(value []string)() { + m.infoCatalogs = value +} +// SetIsArchived sets the isArchived property value. When a group is associated with a team, this property determines whether the team is in read-only mode. To read this property, use the /group/{groupId}/team endpoint or the Get team API. To update this property, use the archiveTeam and unarchiveTeam APIs. +func (m *Group) SetIsArchived(value *bool)() { + m.isArchived = value +} +// SetIsAssignableToRole sets the isAssignableToRole property value. Indicates whether this group can be assigned to an Azure Active Directory role. Optional. This property can only be set while creating the group and is immutable. If set to true, the securityEnabled property must also be set to true, visibility must be Hidden, and the group cannot be a dynamic group (that is, groupTypes cannot contain DynamicMembership). Only callers in Global Administrator and Privileged Role Administrator roles can set this property. The caller must also be assigned the RoleManagement.ReadWrite.Directory permission to set this property or update the membership of such groups. For more, see Using a group to manage Azure AD role assignmentsUsing this feature requires a Azure AD Premium P1 license. Returned by default. Supports $filter (eq, ne, not). +func (m *Group) SetIsAssignableToRole(value *bool)() { + m.isAssignableToRole = value +} +// SetIsFavorite sets the isFavorite property value. The isFavorite property +func (m *Group) SetIsFavorite(value *bool)() { + m.isFavorite = value +} +// SetIsManagementRestricted sets the isManagementRestricted property value. The isManagementRestricted property +func (m *Group) SetIsManagementRestricted(value *bool)() { + m.isManagementRestricted = value +} +// SetIsSubscribedByMail sets the isSubscribedByMail property value. Indicates whether the signed-in user is subscribed to receive email conversations. Default value is true. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetIsSubscribedByMail(value *bool)() { + m.isSubscribedByMail = value +} +// SetLicenseProcessingState sets the licenseProcessingState property value. Indicates status of the group license assignment to all members of the group. Possible values: QueuedForProcessing, ProcessingInProgress, and ProcessingComplete. Returned only on $select. Read-only. +func (m *Group) SetLicenseProcessingState(value LicenseProcessingStateable)() { + m.licenseProcessingState = value +} +// SetMail sets the mail property value. The SMTP address for the group, for example, 'serviceadmins@contoso.onmicrosoft.com'. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). +func (m *Group) SetMail(value *string)() { + m.mail = value +} +// SetMailEnabled sets the mailEnabled property value. Specifies whether the group is mail-enabled. Required. Returned by default. Supports $filter (eq, ne, not, and eq on null values). +func (m *Group) SetMailEnabled(value *bool)() { + m.mailEnabled = value +} +// SetMailNickname sets the mailNickname property value. The mail alias for the group, unique for Microsoft 365 groups in the organization. Maximum length is 64 characters. This property can contain only characters in the ASCII character set 0 - 127 except the following: @ () / [] ' ; : <> , SPACE. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). +func (m *Group) SetMailNickname(value *string)() { + m.mailNickname = value +} +// SetMemberOf sets the memberOf property value. Groups and administrative units that this group is a member of. HTTP Methods: GET (supported for all groups). Read-only. Nullable. Supports $expand. +func (m *Group) SetMemberOf(value []DirectoryObjectable)() { + m.memberOf = value +} +// SetMembers sets the members property value. Direct members of this group, who can be users, devices, other groups, or service principals. Supports the List members, Add member, and Remove member operations. Nullable. Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=members($select=id,userPrincipalName,displayName). +func (m *Group) SetMembers(value []DirectoryObjectable)() { + m.members = value +} +// SetMembershipRule sets the membershipRule property value. The rule that determines members for this group if the group is a dynamic group (groupTypes contains DynamicMembership). For more information about the syntax of the membership rule, see Membership Rules syntax. Returned by default. Supports $filter (eq, ne, not, ge, le, startsWith). +func (m *Group) SetMembershipRule(value *string)() { + m.membershipRule = value +} +// SetMembershipRuleProcessingState sets the membershipRuleProcessingState property value. Indicates whether the dynamic membership processing is on or paused. Possible values are On or Paused. Returned by default. Supports $filter (eq, ne, not, in). +func (m *Group) SetMembershipRuleProcessingState(value *string)() { + m.membershipRuleProcessingState = value +} +// SetMembershipRuleProcessingStatus sets the membershipRuleProcessingStatus property value. Describes the processing status for rules-based dynamic groups. The property is null for non-rule based dynamic groups or if the dynamic group processing has been paused. Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). Read-only. +func (m *Group) SetMembershipRuleProcessingStatus(value MembershipRuleProcessingStatusable)() { + m.membershipRuleProcessingStatus = value +} +// SetMembersWithLicenseErrors sets the membersWithLicenseErrors property value. A list of group members with license errors from this group-based license assignment. Read-only. +func (m *Group) SetMembersWithLicenseErrors(value []DirectoryObjectable)() { + m.membersWithLicenseErrors = value +} +// SetOnenote sets the onenote property value. The onenote property +func (m *Group) SetOnenote(value Onenoteable)() { + m.onenote = value +} +// SetOnPremisesDomainName sets the onPremisesDomainName property value. Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. +func (m *Group) SetOnPremisesDomainName(value *string)() { + m.onPremisesDomainName = value +} +// SetOnPremisesLastSyncDateTime sets the onPremisesLastSyncDateTime property value. Indicates the last time at which the group was synced with the on-premises directory.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Read-only. Supports $filter (eq, ne, not, ge, le, in). +func (m *Group) SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onPremisesLastSyncDateTime = value +} +// SetOnPremisesNetBiosName sets the onPremisesNetBiosName property value. Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Read-only. +func (m *Group) SetOnPremisesNetBiosName(value *string)() { + m.onPremisesNetBiosName = value +} +// SetOnPremisesProvisioningErrors sets the onPremisesProvisioningErrors property value. Errors when using Microsoft synchronization product during provisioning. Returned by default. Supports $filter (eq, not). +func (m *Group) SetOnPremisesProvisioningErrors(value []OnPremisesProvisioningErrorable)() { + m.onPremisesProvisioningErrors = value +} +// SetOnPremisesSamAccountName sets the onPremisesSamAccountName property value. Contains the on-premises SAM account name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith). Read-only. +func (m *Group) SetOnPremisesSamAccountName(value *string)() { + m.onPremisesSamAccountName = value +} +// SetOnPremisesSecurityIdentifier sets the onPremisesSecurityIdentifier property value. Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Supports $filter (eq including on null values). Read-only. +func (m *Group) SetOnPremisesSecurityIdentifier(value *string)() { + m.onPremisesSecurityIdentifier = value +} +// SetOnPremisesSyncEnabled sets the onPremisesSyncEnabled property value. true if this group is synced from an on-premises directory; false if this group was originally synced from an on-premises directory but is no longer synced; null if this object has never been synced from an on-premises directory (default). Returned by default. Read-only. Supports $filter (eq, ne, not, in, and eq on null values). +func (m *Group) SetOnPremisesSyncEnabled(value *bool)() { + m.onPremisesSyncEnabled = value +} +// SetOrganizationId sets the organizationId property value. The organizationId property +func (m *Group) SetOrganizationId(value *string)() { + m.organizationId = value +} +// SetOwners sets the owners property value. The owners of the group who can be users or service principals. Nullable. If this property is not specified when creating a Microsoft 365 group, the calling user is automatically assigned as the group owner. Supports $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1); Supports $expand including nested $select. For example, /groups?$filter=startsWith(displayName,'Role')&$select=id,displayName&$expand=owners($select=id,userPrincipalName,displayName). +func (m *Group) SetOwners(value []DirectoryObjectable)() { + m.owners = value +} +// SetPermissionGrants sets the permissionGrants property value. The permissions that have been granted for a group to a specific application. Supports $expand. +func (m *Group) SetPermissionGrants(value []ResourceSpecificPermissionGrantable)() { + m.permissionGrants = value +} +// SetPhoto sets the photo property value. The group's profile photo. +func (m *Group) SetPhoto(value ProfilePhotoable)() { + m.photo = value +} +// SetPhotos sets the photos property value. The profile photos owned by the group. Read-only. Nullable. +func (m *Group) SetPhotos(value []ProfilePhotoable)() { + m.photos = value +} +// SetPlanner sets the planner property value. Selective Planner services available to the group. Read-only. Nullable. +func (m *Group) SetPlanner(value PlannerGroupable)() { + m.planner = value +} +// SetPreferredDataLocation sets the preferredDataLocation property value. The preferred data location for the Microsoft 365 group. By default, the group inherits the group creator's preferred data location. To set this property, the calling user must be assigned one of the following Azure AD roles: Global Administrator User Account Administrator Directory Writer Exchange Administrator SharePoint Administrator For more information about this property, see OneDrive Online Multi-Geo. Nullable. Returned by default. +func (m *Group) SetPreferredDataLocation(value *string)() { + m.preferredDataLocation = value +} +// SetPreferredLanguage sets the preferredLanguage property value. The preferred language for a Microsoft 365 group. Should follow ISO 639-1 Code; for example en-US. Returned by default. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values). +func (m *Group) SetPreferredLanguage(value *string)() { + m.preferredLanguage = value +} +// SetProxyAddresses sets the proxyAddresses property value. Email addresses for the group that direct to the same group mailbox. For example: ['SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com']. The any operator is required for filter expressions on multi-valued properties. Returned by default. Read-only. Not nullable. Supports $filter (eq, not, ge, le, startsWith, endsWith, /$count eq 0, /$count ne 0). +func (m *Group) SetProxyAddresses(value []string)() { + m.proxyAddresses = value +} +// SetRejectedSenders sets the rejectedSenders property value. The list of users or groups that are not allowed to create posts or calendar events in this group. Nullable +func (m *Group) SetRejectedSenders(value []DirectoryObjectable)() { + m.rejectedSenders = value +} +// SetRenewedDateTime sets the renewedDateTime property value. Timestamp of when the group was last renewed. This cannot be modified directly and is only updated via the renew service action. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Returned by default. Supports $filter (eq, ne, not, ge, le, in). Read-only. +func (m *Group) SetRenewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.renewedDateTime = value +} +// SetResourceBehaviorOptions sets the resourceBehaviorOptions property value. Specifies the group behaviors that can be set for a Microsoft 365 group during creation. This can be set only as part of creation (POST). Possible values are AllowOnlyMembersToPost, HideGroupInOutlook, SubscribeNewGroupMembers, WelcomeEmailDisabled. For more information, see Set Microsoft 365 group behaviors and provisioning options. +func (m *Group) SetResourceBehaviorOptions(value []string)() { + m.resourceBehaviorOptions = value +} +// SetResourceProvisioningOptions sets the resourceProvisioningOptions property value. Specifies the group resources that are provisioned as part of Microsoft 365 group creation, that are not normally part of default group creation. Possible value is Team. For more information, see Set Microsoft 365 group behaviors and provisioning options. Returned by default. Supports $filter (eq, not, startsWith. +func (m *Group) SetResourceProvisioningOptions(value []string)() { + m.resourceProvisioningOptions = value +} +// SetSecurityEnabled sets the securityEnabled property value. Specifies whether the group is a security group. Required.Returned by default. Supports $filter (eq, ne, not, in). +func (m *Group) SetSecurityEnabled(value *bool)() { + m.securityEnabled = value +} +// SetSecurityIdentifier sets the securityIdentifier property value. Security identifier of the group, used in Windows scenarios. Returned by default. +func (m *Group) SetSecurityIdentifier(value *string)() { + m.securityIdentifier = value +} +// SetSettings sets the settings property value. Settings that can govern this group's behavior, like whether members can invite guest users to the group. Nullable. +func (m *Group) SetSettings(value []DirectorySettingable)() { + m.settings = value +} +// SetSites sets the sites property value. The list of SharePoint sites in this group. Access the default site with /sites/root. +func (m *Group) SetSites(value []Siteable)() { + m.sites = value +} +// SetTeam sets the team property value. The team associated with this group. +func (m *Group) SetTeam(value Teamable)() { + m.team = value +} +// SetTheme sets the theme property value. Specifies a Microsoft 365 group's color theme. Possible values are Teal, Purple, Green, Blue, Pink, Orange or Red. Returned by default. +func (m *Group) SetTheme(value *string)() { + m.theme = value +} +// SetThreads sets the threads property value. The group's conversation threads. Nullable. +func (m *Group) SetThreads(value []ConversationThreadable)() { + m.threads = value +} +// SetTransitiveMemberOf sets the transitiveMemberOf property value. The groups that a group is a member of, either directly and through nested membership. Nullable. +func (m *Group) SetTransitiveMemberOf(value []DirectoryObjectable)() { + m.transitiveMemberOf = value +} +// SetTransitiveMembers sets the transitiveMembers property value. The direct and transitive members of a group. Nullable. +func (m *Group) SetTransitiveMembers(value []DirectoryObjectable)() { + m.transitiveMembers = value +} +// SetUnseenConversationsCount sets the unseenConversationsCount property value. Count of conversations that have been delivered one or more new posts since the signed-in user's last visit to the group. This property is the same as unseenCount. Returned only on $select. +func (m *Group) SetUnseenConversationsCount(value *int32)() { + m.unseenConversationsCount = value +} +// SetUnseenCount sets the unseenCount property value. Count of conversations that have received new posts since the signed-in user last visited the group. This property is the same as unseenConversationsCount.Returned only on $select. Supported only on the Get group API (GET /groups/{ID}). +func (m *Group) SetUnseenCount(value *int32)() { + m.unseenCount = value +} +// SetUnseenMessagesCount sets the unseenMessagesCount property value. Count of new posts that have been delivered to the group's conversations since the signed-in user's last visit to the group. Returned only on $select. +func (m *Group) SetUnseenMessagesCount(value *int32)() { + m.unseenMessagesCount = value +} +// SetVisibility sets the visibility property value. Specifies the group join policy and group content visibility for groups. Possible values are: Private, Public, or HiddenMembership. HiddenMembership can be set only for Microsoft 365 groups, when the groups are created. It can't be updated later. Other values of visibility can be updated after group creation. If visibility value is not specified during group creation on Microsoft Graph, a security group is created as Private by default and Microsoft 365 group is Public. Groups assignable to roles are always Private. See group visibility options to learn more. Returned by default. Nullable. +func (m *Group) SetVisibility(value *string)() { + m.visibility = value +} +// SetWritebackConfiguration sets the writebackConfiguration property value. Specifies whether or not a group is configured to write back group object properties to on-premise Active Directory. These properties are used when group writeback is configured in the Azure AD Connect sync client. +func (m *Group) SetWritebackConfiguration(value GroupWritebackConfigurationable)() { + m.writebackConfiguration = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_access_type.go b/src/internal/connector/graph/betasdk/models/group_access_type.go new file mode 100644 index 000000000..89f7a7e4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_access_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupAccessType int + +const ( + NONE_GROUPACCESSTYPE GroupAccessType = iota + PRIVATE_GROUPACCESSTYPE + SECRET_GROUPACCESSTYPE + PUBLIC_GROUPACCESSTYPE +) + +func (i GroupAccessType) String() string { + return []string{"none", "private", "secret", "public"}[i] +} +func ParseGroupAccessType(v string) (interface{}, error) { + result := NONE_GROUPACCESSTYPE + switch v { + case "none": + result = NONE_GROUPACCESSTYPE + case "private": + result = PRIVATE_GROUPACCESSTYPE + case "secret": + result = SECRET_GROUPACCESSTYPE + case "public": + result = PUBLIC_GROUPACCESSTYPE + default: + return 0, errors.New("Unknown GroupAccessType value: " + v) + } + return &result, nil +} +func SerializeGroupAccessType(values []GroupAccessType) []string { + 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/group_assignment_target.go b/src/internal/connector/graph/betasdk/models/group_assignment_target.go new file mode 100644 index 000000000..3ca99db26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_assignment_target.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupAssignmentTarget +type GroupAssignmentTarget struct { + DeviceAndAppManagementAssignmentTarget + // The group Id that is the target of the assignment. + groupId *string +} +// NewGroupAssignmentTarget instantiates a new GroupAssignmentTarget and sets the default values. +func NewGroupAssignmentTarget()(*GroupAssignmentTarget) { + m := &GroupAssignmentTarget{ + DeviceAndAppManagementAssignmentTarget: *NewDeviceAndAppManagementAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.groupAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.exclusionGroupAssignmentTarget": + return NewExclusionGroupAssignmentTarget(), nil + } + } + } + } + return NewGroupAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAndAppManagementAssignmentTarget.GetFieldDeserializers() + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The group Id that is the target of the assignment. +func (m *GroupAssignmentTarget) GetGroupId()(*string) { + return m.groupId +} +// Serialize serializes information the current object +func (m *GroupAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAndAppManagementAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetGroupId sets the groupId property value. The group Id that is the target of the assignment. +func (m *GroupAssignmentTarget) SetGroupId(value *string)() { + m.groupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/group_assignment_targetable.go new file mode 100644 index 000000000..e64665533 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_assignment_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupAssignmentTargetable +type GroupAssignmentTargetable interface { + DeviceAndAppManagementAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + SetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_collection_response.go b/src/internal/connector/graph/betasdk/models/group_collection_response.go new file mode 100644 index 000000000..4bf9cfcae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupCollectionResponse +type GroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Groupable +} +// NewGroupCollectionResponse instantiates a new GroupCollectionResponse and sets the default values. +func NewGroupCollectionResponse()(*GroupCollectionResponse) { + m := &GroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Groupable, len(val)) + for i, v := range val { + res[i] = v.(Groupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupCollectionResponse) GetValue()([]Groupable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupCollectionResponse) SetValue(value []Groupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_collection_responseable.go new file mode 100644 index 000000000..c72578c04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupCollectionResponseable +type GroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Groupable) + SetValue(value []Groupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_lifecycle_policy.go b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy.go new file mode 100644 index 000000000..81c659e6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupLifecyclePolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupLifecyclePolicy struct { + Entity + // List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon. + alternateNotificationEmails *string + // Number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. + groupLifetimeInDays *int32 + // The group type for which the expiration policy applies. Possible values are All, Selected or None. + managedGroupTypes *string +} +// NewGroupLifecyclePolicy instantiates a new groupLifecyclePolicy and sets the default values. +func NewGroupLifecyclePolicy()(*GroupLifecyclePolicy) { + m := &GroupLifecyclePolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupLifecyclePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupLifecyclePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupLifecyclePolicy(), nil +} +// GetAlternateNotificationEmails gets the alternateNotificationEmails property value. List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon. +func (m *GroupLifecyclePolicy) GetAlternateNotificationEmails()(*string) { + return m.alternateNotificationEmails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupLifecyclePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alternateNotificationEmails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateNotificationEmails(val) + } + return nil + } + res["groupLifetimeInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetGroupLifetimeInDays(val) + } + return nil + } + res["managedGroupTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedGroupTypes(val) + } + return nil + } + return res +} +// GetGroupLifetimeInDays gets the groupLifetimeInDays property value. Number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +func (m *GroupLifecyclePolicy) GetGroupLifetimeInDays()(*int32) { + return m.groupLifetimeInDays +} +// GetManagedGroupTypes gets the managedGroupTypes property value. The group type for which the expiration policy applies. Possible values are All, Selected or None. +func (m *GroupLifecyclePolicy) GetManagedGroupTypes()(*string) { + return m.managedGroupTypes +} +// Serialize serializes information the current object +func (m *GroupLifecyclePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("alternateNotificationEmails", m.GetAlternateNotificationEmails()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("groupLifetimeInDays", m.GetGroupLifetimeInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedGroupTypes", m.GetManagedGroupTypes()) + if err != nil { + return err + } + } + return nil +} +// SetAlternateNotificationEmails sets the alternateNotificationEmails property value. List of email address to send notifications for groups without owners. Multiple email address can be defined by separating email address with a semicolon. +func (m *GroupLifecyclePolicy) SetAlternateNotificationEmails(value *string)() { + m.alternateNotificationEmails = value +} +// SetGroupLifetimeInDays sets the groupLifetimeInDays property value. Number of days before a group expires and needs to be renewed. Once renewed, the group expiration is extended by the number of days defined. +func (m *GroupLifecyclePolicy) SetGroupLifetimeInDays(value *int32)() { + m.groupLifetimeInDays = value +} +// SetManagedGroupTypes sets the managedGroupTypes property value. The group type for which the expiration policy applies. Possible values are All, Selected or None. +func (m *GroupLifecyclePolicy) SetManagedGroupTypes(value *string)() { + m.managedGroupTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_response.go new file mode 100644 index 000000000..9b10bce09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupLifecyclePolicyCollectionResponse +type GroupLifecyclePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupLifecyclePolicyable +} +// NewGroupLifecyclePolicyCollectionResponse instantiates a new GroupLifecyclePolicyCollectionResponse and sets the default values. +func NewGroupLifecyclePolicyCollectionResponse()(*GroupLifecyclePolicyCollectionResponse) { + m := &GroupLifecyclePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupLifecyclePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupLifecyclePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupLifecyclePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupLifecyclePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupLifecyclePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupLifecyclePolicyable, len(val)) + for i, v := range val { + res[i] = v.(GroupLifecyclePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupLifecyclePolicyCollectionResponse) GetValue()([]GroupLifecyclePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupLifecyclePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupLifecyclePolicyCollectionResponse) SetValue(value []GroupLifecyclePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_responseable.go new file mode 100644 index 000000000..996d7b0ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_lifecycle_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupLifecyclePolicyCollectionResponseable +type GroupLifecyclePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupLifecyclePolicyable) + SetValue(value []GroupLifecyclePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_lifecycle_policyable.go b/src/internal/connector/graph/betasdk/models/group_lifecycle_policyable.go new file mode 100644 index 000000000..409bbef25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_lifecycle_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupLifecyclePolicyable +type GroupLifecyclePolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlternateNotificationEmails()(*string) + GetGroupLifetimeInDays()(*int32) + GetManagedGroupTypes()(*string) + SetAlternateNotificationEmails(value *string)() + SetGroupLifetimeInDays(value *int32)() + SetManagedGroupTypes(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_members.go b/src/internal/connector/graph/betasdk/models/group_members.go new file mode 100644 index 000000000..ceb129a30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_members.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupMembers +type GroupMembers struct { + UserSet + // The name of the group in Azure AD. Read only. + description *string + // The ID of the group in Azure AD. + id *string +} +// NewGroupMembers instantiates a new GroupMembers and sets the default values. +func NewGroupMembers()(*GroupMembers) { + m := &GroupMembers{ + UserSet: *NewUserSet(), + } + odataTypeValue := "#microsoft.graph.groupMembers"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupMembersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupMembersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupMembers(), nil +} +// GetDescription gets the description property value. The name of the group in Azure AD. Read only. +func (m *GroupMembers) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupMembers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserSet.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + return res +} +// GetId gets the id property value. The ID of the group in Azure AD. +func (m *GroupMembers) GetId()(*string) { + return m.id +} +// Serialize serializes information the current object +func (m *GroupMembers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserSet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The name of the group in Azure AD. Read only. +func (m *GroupMembers) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The ID of the group in Azure AD. +func (m *GroupMembers) SetId(value *string)() { + m.id = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_membersable.go b/src/internal/connector/graph/betasdk/models/group_membersable.go new file mode 100644 index 000000000..63edd0c9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_membersable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupMembersable +type GroupMembersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserSetable + GetDescription()(*string) + GetId()(*string) + SetDescription(value *string)() + SetId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_membership_governance_criteria.go b/src/internal/connector/graph/betasdk/models/group_membership_governance_criteria.go new file mode 100644 index 000000000..2f48ecc0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_membership_governance_criteria.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupMembershipGovernanceCriteria +type GroupMembershipGovernanceCriteria struct { + GovernanceCriteria + // The groupId property + groupId *string +} +// NewGroupMembershipGovernanceCriteria instantiates a new GroupMembershipGovernanceCriteria and sets the default values. +func NewGroupMembershipGovernanceCriteria()(*GroupMembershipGovernanceCriteria) { + m := &GroupMembershipGovernanceCriteria{ + GovernanceCriteria: *NewGovernanceCriteria(), + } + odataTypeValue := "#microsoft.graph.groupMembershipGovernanceCriteria"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupMembershipGovernanceCriteriaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupMembershipGovernanceCriteriaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupMembershipGovernanceCriteria(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupMembershipGovernanceCriteria) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GovernanceCriteria.GetFieldDeserializers() + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The groupId property +func (m *GroupMembershipGovernanceCriteria) GetGroupId()(*string) { + return m.groupId +} +// Serialize serializes information the current object +func (m *GroupMembershipGovernanceCriteria) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GovernanceCriteria.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetGroupId sets the groupId property value. The groupId property +func (m *GroupMembershipGovernanceCriteria) SetGroupId(value *string)() { + m.groupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_membership_governance_criteriaable.go b/src/internal/connector/graph/betasdk/models/group_membership_governance_criteriaable.go new file mode 100644 index 000000000..daa2de05d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_membership_governance_criteriaable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupMembershipGovernanceCriteriaable +type GroupMembershipGovernanceCriteriaable interface { + GovernanceCriteriaable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + SetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settings.go b/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settings.go new file mode 100644 index 000000000..2b2de2422 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settings.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPeerOutlierRecommendationInsightSettings +type GroupPeerOutlierRecommendationInsightSettings struct { + AccessReviewRecommendationInsightSetting +} +// NewGroupPeerOutlierRecommendationInsightSettings instantiates a new GroupPeerOutlierRecommendationInsightSettings and sets the default values. +func NewGroupPeerOutlierRecommendationInsightSettings()(*GroupPeerOutlierRecommendationInsightSettings) { + m := &GroupPeerOutlierRecommendationInsightSettings{ + AccessReviewRecommendationInsightSetting: *NewAccessReviewRecommendationInsightSetting(), + } + odataTypeValue := "#microsoft.graph.groupPeerOutlierRecommendationInsightSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPeerOutlierRecommendationInsightSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPeerOutlierRecommendationInsightSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPeerOutlierRecommendationInsightSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPeerOutlierRecommendationInsightSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewRecommendationInsightSetting.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *GroupPeerOutlierRecommendationInsightSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewRecommendationInsightSetting.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settingsable.go b/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settingsable.go new file mode 100644 index 000000000..0923b2834 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_peer_outlier_recommendation_insight_settingsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPeerOutlierRecommendationInsightSettingsable +type GroupPeerOutlierRecommendationInsightSettingsable interface { + AccessReviewRecommendationInsightSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_category.go b/src/internal/connector/graph/betasdk/models/group_policy_category.go new file mode 100644 index 000000000..c6b6e89ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_category.go @@ -0,0 +1,260 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyCategory the category entity stores the category of a group policy definition +type GroupPolicyCategory struct { + Entity + // The children categories + children []GroupPolicyCategoryable + // The id of the definition file the category came from + definitionFile GroupPolicyDefinitionFileable + // The immediate GroupPolicyDefinition children of the category + definitions []GroupPolicyDefinitionable + // The string id of the category's display name + displayName *string + // Category Ingestion source + ingestionSource *IngestionSource + // Defines if the category is a root category + isRoot *bool + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The parent category + parent GroupPolicyCategoryable +} +// NewGroupPolicyCategory instantiates a new groupPolicyCategory and sets the default values. +func NewGroupPolicyCategory()(*GroupPolicyCategory) { + m := &GroupPolicyCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyCategory(), nil +} +// GetChildren gets the children property value. The children categories +func (m *GroupPolicyCategory) GetChildren()([]GroupPolicyCategoryable) { + return m.children +} +// GetDefinitionFile gets the definitionFile property value. The id of the definition file the category came from +func (m *GroupPolicyCategory) GetDefinitionFile()(GroupPolicyDefinitionFileable) { + return m.definitionFile +} +// GetDefinitions gets the definitions property value. The immediate GroupPolicyDefinition children of the category +func (m *GroupPolicyCategory) GetDefinitions()([]GroupPolicyDefinitionable) { + return m.definitions +} +// GetDisplayName gets the displayName property value. The string id of the category's display name +func (m *GroupPolicyCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["children"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyCategoryable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyCategoryable) + } + m.SetChildren(res) + } + return nil + } + res["definitionFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinitionFile(val.(GroupPolicyDefinitionFileable)) + } + return nil + } + res["definitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionable) + } + m.SetDefinitions(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["ingestionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIngestionSource) + if err != nil { + return err + } + if val != nil { + m.SetIngestionSource(val.(*IngestionSource)) + } + return nil + } + res["isRoot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRoot(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(GroupPolicyCategoryable)) + } + return nil + } + return res +} +// GetIngestionSource gets the ingestionSource property value. Category Ingestion source +func (m *GroupPolicyCategory) GetIngestionSource()(*IngestionSource) { + return m.ingestionSource +} +// GetIsRoot gets the isRoot property value. Defines if the category is a root category +func (m *GroupPolicyCategory) GetIsRoot()(*bool) { + return m.isRoot +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyCategory) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetParent gets the parent property value. The parent category +func (m *GroupPolicyCategory) GetParent()(GroupPolicyCategoryable) { + return m.parent +} +// Serialize serializes information the current object +func (m *GroupPolicyCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetChildren() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildren())) + for i, v := range m.GetChildren() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("children", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definitionFile", m.GetDefinitionFile()) + if err != nil { + return err + } + } + if m.GetDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefinitions())) + for i, v := range m.GetDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("definitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIngestionSource() != nil { + cast := (*m.GetIngestionSource()).String() + err = writer.WriteStringValue("ingestionSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRoot", m.GetIsRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + return nil +} +// SetChildren sets the children property value. The children categories +func (m *GroupPolicyCategory) SetChildren(value []GroupPolicyCategoryable)() { + m.children = value +} +// SetDefinitionFile sets the definitionFile property value. The id of the definition file the category came from +func (m *GroupPolicyCategory) SetDefinitionFile(value GroupPolicyDefinitionFileable)() { + m.definitionFile = value +} +// SetDefinitions sets the definitions property value. The immediate GroupPolicyDefinition children of the category +func (m *GroupPolicyCategory) SetDefinitions(value []GroupPolicyDefinitionable)() { + m.definitions = value +} +// SetDisplayName sets the displayName property value. The string id of the category's display name +func (m *GroupPolicyCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIngestionSource sets the ingestionSource property value. Category Ingestion source +func (m *GroupPolicyCategory) SetIngestionSource(value *IngestionSource)() { + m.ingestionSource = value +} +// SetIsRoot sets the isRoot property value. Defines if the category is a root category +func (m *GroupPolicyCategory) SetIsRoot(value *bool)() { + m.isRoot = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyCategory) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetParent sets the parent property value. The parent category +func (m *GroupPolicyCategory) SetParent(value GroupPolicyCategoryable)() { + m.parent = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_category_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_category_collection_response.go new file mode 100644 index 000000000..b9850b3f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyCategoryCollectionResponse +type GroupPolicyCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyCategoryable +} +// NewGroupPolicyCategoryCollectionResponse instantiates a new GroupPolicyCategoryCollectionResponse and sets the default values. +func NewGroupPolicyCategoryCollectionResponse()(*GroupPolicyCategoryCollectionResponse) { + m := &GroupPolicyCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyCategoryable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyCategoryCollectionResponse) GetValue()([]GroupPolicyCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyCategoryCollectionResponse) SetValue(value []GroupPolicyCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_category_collection_responseable.go new file mode 100644 index 000000000..53f18879f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyCategoryCollectionResponseable +type GroupPolicyCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyCategoryable) + SetValue(value []GroupPolicyCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_categoryable.go b/src/internal/connector/graph/betasdk/models/group_policy_categoryable.go new file mode 100644 index 000000000..f5ab5a7a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_categoryable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyCategoryable +type GroupPolicyCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildren()([]GroupPolicyCategoryable) + GetDefinitionFile()(GroupPolicyDefinitionFileable) + GetDefinitions()([]GroupPolicyDefinitionable) + GetDisplayName()(*string) + GetIngestionSource()(*IngestionSource) + GetIsRoot()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetParent()(GroupPolicyCategoryable) + SetChildren(value []GroupPolicyCategoryable)() + SetDefinitionFile(value GroupPolicyDefinitionFileable)() + SetDefinitions(value []GroupPolicyDefinitionable)() + SetDisplayName(value *string)() + SetIngestionSource(value *IngestionSource)() + SetIsRoot(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetParent(value GroupPolicyCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration.go new file mode 100644 index 000000000..3adbd728f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration.go @@ -0,0 +1,264 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfiguration the group policy configuration entity contains the configured values for one or more group policy definitions. +type GroupPolicyConfiguration struct { + Entity + // The list of group assignments for the configuration. + assignments []GroupPolicyConfigurationAssignmentable + // The date and time the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The list of enabled or disabled group policy definition values for the configuration. + definitionValues []GroupPolicyDefinitionValueable + // User provided description for the resource object. + description *string + // User provided name for the resource object. + displayName *string + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Group Policy Configuration Ingestion Type + policyConfigurationIngestionType *GroupPolicyConfigurationIngestionType + // The list of scope tags for the configuration. + roleScopeTagIds []string +} +// NewGroupPolicyConfiguration instantiates a new groupPolicyConfiguration and sets the default values. +func NewGroupPolicyConfiguration()(*GroupPolicyConfiguration) { + m := &GroupPolicyConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyConfiguration(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the configuration. +func (m *GroupPolicyConfiguration) GetAssignments()([]GroupPolicyConfigurationAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefinitionValues gets the definitionValues property value. The list of enabled or disabled group policy definition values for the configuration. +func (m *GroupPolicyConfiguration) GetDefinitionValues()([]GroupPolicyDefinitionValueable) { + return m.definitionValues +} +// GetDescription gets the description property value. User provided description for the resource object. +func (m *GroupPolicyConfiguration) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. User provided name for the resource object. +func (m *GroupPolicyConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["definitionValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionValueable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionValueable) + } + m.SetDefinitionValues(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["policyConfigurationIngestionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyConfigurationIngestionType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyConfigurationIngestionType(val.(*GroupPolicyConfigurationIngestionType)) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPolicyConfigurationIngestionType gets the policyConfigurationIngestionType property value. Group Policy Configuration Ingestion Type +func (m *GroupPolicyConfiguration) GetPolicyConfigurationIngestionType()(*GroupPolicyConfigurationIngestionType) { + return m.policyConfigurationIngestionType +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// Serialize serializes information the current object +func (m *GroupPolicyConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDefinitionValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefinitionValues())) + for i, v := range m.GetDefinitionValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("definitionValues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPolicyConfigurationIngestionType() != nil { + cast := (*m.GetPolicyConfigurationIngestionType()).String() + err = writer.WriteStringValue("policyConfigurationIngestionType", &cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the configuration. +func (m *GroupPolicyConfiguration) SetAssignments(value []GroupPolicyConfigurationAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefinitionValues sets the definitionValues property value. The list of enabled or disabled group policy definition values for the configuration. +func (m *GroupPolicyConfiguration) SetDefinitionValues(value []GroupPolicyDefinitionValueable)() { + m.definitionValues = value +} +// SetDescription sets the description property value. User provided description for the resource object. +func (m *GroupPolicyConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. User provided name for the resource object. +func (m *GroupPolicyConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPolicyConfigurationIngestionType sets the policyConfigurationIngestionType property value. Group Policy Configuration Ingestion Type +func (m *GroupPolicyConfiguration) SetPolicyConfigurationIngestionType(value *GroupPolicyConfigurationIngestionType)() { + m.policyConfigurationIngestionType = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment.go new file mode 100644 index 000000000..ec68c31ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationAssignment the group policy configuration assignment entity assigns one or more AAD groups to a specific group policy configuration. +type GroupPolicyConfigurationAssignment struct { + Entity + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of groups targeted the group policy configuration. + target DeviceAndAppManagementAssignmentTargetable +} +// NewGroupPolicyConfigurationAssignment instantiates a new groupPolicyConfigurationAssignment and sets the default values. +func NewGroupPolicyConfigurationAssignment()(*GroupPolicyConfigurationAssignment) { + m := &GroupPolicyConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyConfigurationAssignment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetTarget gets the target property value. The type of groups targeted the group policy configuration. +func (m *GroupPolicyConfigurationAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *GroupPolicyConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyConfigurationAssignment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetTarget sets the target property value. The type of groups targeted the group policy configuration. +func (m *GroupPolicyConfigurationAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_response.go new file mode 100644 index 000000000..fc3fe03c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationAssignmentCollectionResponse +type GroupPolicyConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyConfigurationAssignmentable +} +// NewGroupPolicyConfigurationAssignmentCollectionResponse instantiates a new GroupPolicyConfigurationAssignmentCollectionResponse and sets the default values. +func NewGroupPolicyConfigurationAssignmentCollectionResponse()(*GroupPolicyConfigurationAssignmentCollectionResponse) { + m := &GroupPolicyConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyConfigurationAssignmentCollectionResponse) GetValue()([]GroupPolicyConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyConfigurationAssignmentCollectionResponse) SetValue(value []GroupPolicyConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..0babdb25b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationAssignmentCollectionResponseable +type GroupPolicyConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyConfigurationAssignmentable) + SetValue(value []GroupPolicyConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignmentable.go new file mode 100644 index 000000000..2a3ff6fee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_assignmentable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationAssignmentable +type GroupPolicyConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_response.go new file mode 100644 index 000000000..895ce8298 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationCollectionResponse +type GroupPolicyConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyConfigurationable +} +// NewGroupPolicyConfigurationCollectionResponse instantiates a new GroupPolicyConfigurationCollectionResponse and sets the default values. +func NewGroupPolicyConfigurationCollectionResponse()(*GroupPolicyConfigurationCollectionResponse) { + m := &GroupPolicyConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyConfigurationCollectionResponse) GetValue()([]GroupPolicyConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyConfigurationCollectionResponse) SetValue(value []GroupPolicyConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_responseable.go new file mode 100644 index 000000000..37b875bdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationCollectionResponseable +type GroupPolicyConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyConfigurationable) + SetValue(value []GroupPolicyConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_configuration_ingestion_type.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_ingestion_type.go new file mode 100644 index 000000000..ee3461400 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_ingestion_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyConfigurationIngestionType int + +const ( + // Unknown policy configuration ingestion type + UNKNOWN_GROUPPOLICYCONFIGURATIONINGESTIONTYPE GroupPolicyConfigurationIngestionType = iota + // Indicates policy created have definitions ingested by IT admin with sufficient permissions through custom ingestion process + CUSTOM_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + // Indicates policy created have definitions ingested through system ingestion process + BUILTIN_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + // Indicated atleast 1 tenant admin & system ingested definitions configured for this policy + MIXED_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + // Unknown future enum value + UNKNOWNFUTUREVALUE_GROUPPOLICYCONFIGURATIONINGESTIONTYPE +) + +func (i GroupPolicyConfigurationIngestionType) String() string { + return []string{"unknown", "custom", "builtIn", "mixed", "unknownFutureValue"}[i] +} +func ParseGroupPolicyConfigurationIngestionType(v string) (interface{}, error) { + result := UNKNOWN_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + switch v { + case "unknown": + result = UNKNOWN_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + case "custom": + result = CUSTOM_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + case "builtIn": + result = BUILTIN_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + case "mixed": + result = MIXED_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_GROUPPOLICYCONFIGURATIONINGESTIONTYPE + default: + return 0, errors.New("Unknown GroupPolicyConfigurationIngestionType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyConfigurationIngestionType(values []GroupPolicyConfigurationIngestionType) []string { + 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/group_policy_configuration_type.go b/src/internal/connector/graph/betasdk/models/group_policy_configuration_type.go new file mode 100644 index 000000000..8aa5c679d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configuration_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyConfigurationType int + +const ( + // The policy type does not tattoo the value, which means the value is removed allowing the original configuration value to be used. The policy type supercedes application configuration setting so the application is always aware of the value. The policy type prevents the user from modifying the value through the application's user interface. + POLICY_GROUPPOLICYCONFIGURATIONTYPE GroupPolicyConfigurationType = iota + // The preference type does tattoo the value, which means the value is not removed from the registry. The preference type will overwrite the user configured-value and does not retain the previous value. The preference type does not prevent the user from modifying the value through the application's user interface. + PREFERENCE_GROUPPOLICYCONFIGURATIONTYPE +) + +func (i GroupPolicyConfigurationType) String() string { + return []string{"policy", "preference"}[i] +} +func ParseGroupPolicyConfigurationType(v string) (interface{}, error) { + result := POLICY_GROUPPOLICYCONFIGURATIONTYPE + switch v { + case "policy": + result = POLICY_GROUPPOLICYCONFIGURATIONTYPE + case "preference": + result = PREFERENCE_GROUPPOLICYCONFIGURATIONTYPE + default: + return 0, errors.New("Unknown GroupPolicyConfigurationType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyConfigurationType(values []GroupPolicyConfigurationType) []string { + 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/group_policy_configurationable.go b/src/internal/connector/graph/betasdk/models/group_policy_configurationable.go new file mode 100644 index 000000000..8080b06d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_configurationable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyConfigurationable +type GroupPolicyConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]GroupPolicyConfigurationAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefinitionValues()([]GroupPolicyDefinitionValueable) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPolicyConfigurationIngestionType()(*GroupPolicyConfigurationIngestionType) + GetRoleScopeTagIds()([]string) + SetAssignments(value []GroupPolicyConfigurationAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefinitionValues(value []GroupPolicyDefinitionValueable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPolicyConfigurationIngestionType(value *GroupPolicyConfigurationIngestionType)() + SetRoleScopeTagIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition.go b/src/internal/connector/graph/betasdk/models/group_policy_definition.go new file mode 100644 index 000000000..eb2179a74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition.go @@ -0,0 +1,488 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinition the entity describes all of the information about a single group policy. +type GroupPolicyDefinition struct { + Entity + // The group policy category associated with the definition. + category GroupPolicyCategoryable + // The localized full category path for the policy. + categoryPath *string + // Group Policy Definition Class Type. + classType *GroupPolicyDefinitionClassType + // The group policy file associated with the definition. + definitionFile GroupPolicyDefinitionFileable + // The localized policy name. + displayName *string + // The localized explanation or help text associated with the policy. The default value is empty. + explainText *string + // The category id of the parent category + groupPolicyCategoryId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Signifies whether or not there are related definitions to this definition + hasRelatedDefinitions *bool + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Minimum required CSP version for device configuration in this definition + minDeviceCspVersion *string + // Minimum required CSP version for user configuration in this definition + minUserCspVersion *string + // Definition of the next version of this definition + nextVersionDefinition GroupPolicyDefinitionable + // Type of Group Policy File or Definition. + policyType *GroupPolicyType + // The group policy presentations associated with the definition. + presentations []GroupPolicyPresentationable + // Definition of the previous version of this definition + previousVersionDefinition GroupPolicyDefinitionable + // Localized string used to specify what operating system or application version is affected by the policy. + supportedOn *string + // Setting definition version + version *string +} +// NewGroupPolicyDefinition instantiates a new groupPolicyDefinition and sets the default values. +func NewGroupPolicyDefinition()(*GroupPolicyDefinition) { + m := &GroupPolicyDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyDefinition(), nil +} +// GetCategory gets the category property value. The group policy category associated with the definition. +func (m *GroupPolicyDefinition) GetCategory()(GroupPolicyCategoryable) { + return m.category +} +// GetCategoryPath gets the categoryPath property value. The localized full category path for the policy. +func (m *GroupPolicyDefinition) GetCategoryPath()(*string) { + return m.categoryPath +} +// GetClassType gets the classType property value. Group Policy Definition Class Type. +func (m *GroupPolicyDefinition) GetClassType()(*GroupPolicyDefinitionClassType) { + return m.classType +} +// GetDefinitionFile gets the definitionFile property value. The group policy file associated with the definition. +func (m *GroupPolicyDefinition) GetDefinitionFile()(GroupPolicyDefinitionFileable) { + return m.definitionFile +} +// GetDisplayName gets the displayName property value. The localized policy name. +func (m *GroupPolicyDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetExplainText gets the explainText property value. The localized explanation or help text associated with the policy. The default value is empty. +func (m *GroupPolicyDefinition) GetExplainText()(*string) { + return m.explainText +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(GroupPolicyCategoryable)) + } + return nil + } + res["categoryPath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategoryPath(val) + } + return nil + } + res["classType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyDefinitionClassType) + if err != nil { + return err + } + if val != nil { + m.SetClassType(val.(*GroupPolicyDefinitionClassType)) + } + return nil + } + res["definitionFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinitionFile(val.(GroupPolicyDefinitionFileable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["explainText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExplainText(val) + } + return nil + } + res["groupPolicyCategoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupPolicyCategoryId(val) + } + return nil + } + res["hasRelatedDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasRelatedDefinitions(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["minDeviceCspVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinDeviceCspVersion(val) + } + return nil + } + res["minUserCspVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinUserCspVersion(val) + } + return nil + } + res["nextVersionDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNextVersionDefinition(val.(GroupPolicyDefinitionable)) + } + return nil + } + res["policyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyType(val.(*GroupPolicyType)) + } + return nil + } + res["presentations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationable) + } + m.SetPresentations(res) + } + return nil + } + res["previousVersionDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreviousVersionDefinition(val.(GroupPolicyDefinitionable)) + } + return nil + } + res["supportedOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportedOn(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetGroupPolicyCategoryId gets the groupPolicyCategoryId property value. The category id of the parent category +func (m *GroupPolicyDefinition) GetGroupPolicyCategoryId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.groupPolicyCategoryId +} +// GetHasRelatedDefinitions gets the hasRelatedDefinitions property value. Signifies whether or not there are related definitions to this definition +func (m *GroupPolicyDefinition) GetHasRelatedDefinitions()(*bool) { + return m.hasRelatedDefinitions +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinition) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMinDeviceCspVersion gets the minDeviceCspVersion property value. Minimum required CSP version for device configuration in this definition +func (m *GroupPolicyDefinition) GetMinDeviceCspVersion()(*string) { + return m.minDeviceCspVersion +} +// GetMinUserCspVersion gets the minUserCspVersion property value. Minimum required CSP version for user configuration in this definition +func (m *GroupPolicyDefinition) GetMinUserCspVersion()(*string) { + return m.minUserCspVersion +} +// GetNextVersionDefinition gets the nextVersionDefinition property value. Definition of the next version of this definition +func (m *GroupPolicyDefinition) GetNextVersionDefinition()(GroupPolicyDefinitionable) { + return m.nextVersionDefinition +} +// GetPolicyType gets the policyType property value. Type of Group Policy File or Definition. +func (m *GroupPolicyDefinition) GetPolicyType()(*GroupPolicyType) { + return m.policyType +} +// GetPresentations gets the presentations property value. The group policy presentations associated with the definition. +func (m *GroupPolicyDefinition) GetPresentations()([]GroupPolicyPresentationable) { + return m.presentations +} +// GetPreviousVersionDefinition gets the previousVersionDefinition property value. Definition of the previous version of this definition +func (m *GroupPolicyDefinition) GetPreviousVersionDefinition()(GroupPolicyDefinitionable) { + return m.previousVersionDefinition +} +// GetSupportedOn gets the supportedOn property value. Localized string used to specify what operating system or application version is affected by the policy. +func (m *GroupPolicyDefinition) GetSupportedOn()(*string) { + return m.supportedOn +} +// GetVersion gets the version property value. Setting definition version +func (m *GroupPolicyDefinition) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("categoryPath", m.GetCategoryPath()) + if err != nil { + return err + } + } + if m.GetClassType() != nil { + cast := (*m.GetClassType()).String() + err = writer.WriteStringValue("classType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definitionFile", m.GetDefinitionFile()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("explainText", m.GetExplainText()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("groupPolicyCategoryId", m.GetGroupPolicyCategoryId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasRelatedDefinitions", m.GetHasRelatedDefinitions()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minDeviceCspVersion", m.GetMinDeviceCspVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minUserCspVersion", m.GetMinUserCspVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("nextVersionDefinition", m.GetNextVersionDefinition()) + if err != nil { + return err + } + } + if m.GetPolicyType() != nil { + cast := (*m.GetPolicyType()).String() + err = writer.WriteStringValue("policyType", &cast) + if err != nil { + return err + } + } + if m.GetPresentations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPresentations())) + for i, v := range m.GetPresentations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("presentations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("previousVersionDefinition", m.GetPreviousVersionDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("supportedOn", m.GetSupportedOn()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCategory sets the category property value. The group policy category associated with the definition. +func (m *GroupPolicyDefinition) SetCategory(value GroupPolicyCategoryable)() { + m.category = value +} +// SetCategoryPath sets the categoryPath property value. The localized full category path for the policy. +func (m *GroupPolicyDefinition) SetCategoryPath(value *string)() { + m.categoryPath = value +} +// SetClassType sets the classType property value. Group Policy Definition Class Type. +func (m *GroupPolicyDefinition) SetClassType(value *GroupPolicyDefinitionClassType)() { + m.classType = value +} +// SetDefinitionFile sets the definitionFile property value. The group policy file associated with the definition. +func (m *GroupPolicyDefinition) SetDefinitionFile(value GroupPolicyDefinitionFileable)() { + m.definitionFile = value +} +// SetDisplayName sets the displayName property value. The localized policy name. +func (m *GroupPolicyDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExplainText sets the explainText property value. The localized explanation or help text associated with the policy. The default value is empty. +func (m *GroupPolicyDefinition) SetExplainText(value *string)() { + m.explainText = value +} +// SetGroupPolicyCategoryId sets the groupPolicyCategoryId property value. The category id of the parent category +func (m *GroupPolicyDefinition) SetGroupPolicyCategoryId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.groupPolicyCategoryId = value +} +// SetHasRelatedDefinitions sets the hasRelatedDefinitions property value. Signifies whether or not there are related definitions to this definition +func (m *GroupPolicyDefinition) SetHasRelatedDefinitions(value *bool)() { + m.hasRelatedDefinitions = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinition) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMinDeviceCspVersion sets the minDeviceCspVersion property value. Minimum required CSP version for device configuration in this definition +func (m *GroupPolicyDefinition) SetMinDeviceCspVersion(value *string)() { + m.minDeviceCspVersion = value +} +// SetMinUserCspVersion sets the minUserCspVersion property value. Minimum required CSP version for user configuration in this definition +func (m *GroupPolicyDefinition) SetMinUserCspVersion(value *string)() { + m.minUserCspVersion = value +} +// SetNextVersionDefinition sets the nextVersionDefinition property value. Definition of the next version of this definition +func (m *GroupPolicyDefinition) SetNextVersionDefinition(value GroupPolicyDefinitionable)() { + m.nextVersionDefinition = value +} +// SetPolicyType sets the policyType property value. Type of Group Policy File or Definition. +func (m *GroupPolicyDefinition) SetPolicyType(value *GroupPolicyType)() { + m.policyType = value +} +// SetPresentations sets the presentations property value. The group policy presentations associated with the definition. +func (m *GroupPolicyDefinition) SetPresentations(value []GroupPolicyPresentationable)() { + m.presentations = value +} +// SetPreviousVersionDefinition sets the previousVersionDefinition property value. Definition of the previous version of this definition +func (m *GroupPolicyDefinition) SetPreviousVersionDefinition(value GroupPolicyDefinitionable)() { + m.previousVersionDefinition = value +} +// SetSupportedOn sets the supportedOn property value. Localized string used to specify what operating system or application version is affected by the policy. +func (m *GroupPolicyDefinition) SetSupportedOn(value *string)() { + m.supportedOn = value +} +// SetVersion sets the version property value. Setting definition version +func (m *GroupPolicyDefinition) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_class_type.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_class_type.go new file mode 100644 index 000000000..08a548788 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_class_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyDefinitionClassType int + +const ( + // Identifies placement of the policy setting under the user configuration node. + USER_GROUPPOLICYDEFINITIONCLASSTYPE GroupPolicyDefinitionClassType = iota + // Identifies placement of the policy setting under the computer configuration node. + MACHINE_GROUPPOLICYDEFINITIONCLASSTYPE +) + +func (i GroupPolicyDefinitionClassType) String() string { + return []string{"user", "machine"}[i] +} +func ParseGroupPolicyDefinitionClassType(v string) (interface{}, error) { + result := USER_GROUPPOLICYDEFINITIONCLASSTYPE + switch v { + case "user": + result = USER_GROUPPOLICYDEFINITIONCLASSTYPE + case "machine": + result = MACHINE_GROUPPOLICYDEFINITIONCLASSTYPE + default: + return 0, errors.New("Unknown GroupPolicyDefinitionClassType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyDefinitionClassType(values []GroupPolicyDefinitionClassType) []string { + 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/group_policy_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_collection_response.go new file mode 100644 index 000000000..a0f220796 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionCollectionResponse +type GroupPolicyDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyDefinitionable +} +// NewGroupPolicyDefinitionCollectionResponse instantiates a new GroupPolicyDefinitionCollectionResponse and sets the default values. +func NewGroupPolicyDefinitionCollectionResponse()(*GroupPolicyDefinitionCollectionResponse) { + m := &GroupPolicyDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyDefinitionCollectionResponse) GetValue()([]GroupPolicyDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyDefinitionCollectionResponse) SetValue(value []GroupPolicyDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_collection_responseable.go new file mode 100644 index 000000000..048dcd759 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionCollectionResponseable +type GroupPolicyDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyDefinitionable) + SetValue(value []GroupPolicyDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_file.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_file.go new file mode 100644 index 000000000..6a6728509 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_file.go @@ -0,0 +1,326 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionFile +type GroupPolicyDefinitionFile struct { + Entity + // The group policy definitions associated with the file. + definitions []GroupPolicyDefinitionable + // The localized description of the policy settings in the ADMX file. The default value is empty. + description *string + // The localized friendly name of the ADMX file. + displayName *string + // The file name of the ADMX file without the path. For example: edge.admx + fileName *string + // The supported language codes for the ADMX file. + languageCodes []string + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Type of Group Policy File or Definition. + policyType *GroupPolicyType + // The revision version associated with the file. + revision *string + // Specifies the URI used to identify the namespace within the ADMX file. + targetNamespace *string + // Specifies the logical name that refers to the namespace within the ADMX file. + targetPrefix *string +} +// NewGroupPolicyDefinitionFile instantiates a new groupPolicyDefinitionFile and sets the default values. +func NewGroupPolicyDefinitionFile()(*GroupPolicyDefinitionFile) { + m := &GroupPolicyDefinitionFile{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyDefinitionFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupPolicyUploadedDefinitionFile": + return NewGroupPolicyUploadedDefinitionFile(), nil + } + } + } + } + return NewGroupPolicyDefinitionFile(), nil +} +// GetDefinitions gets the definitions property value. The group policy definitions associated with the file. +func (m *GroupPolicyDefinitionFile) GetDefinitions()([]GroupPolicyDefinitionable) { + return m.definitions +} +// GetDescription gets the description property value. The localized description of the policy settings in the ADMX file. The default value is empty. +func (m *GroupPolicyDefinitionFile) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The localized friendly name of the ADMX file. +func (m *GroupPolicyDefinitionFile) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinitionFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["definitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionable) + } + m.SetDefinitions(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["languageCodes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetLanguageCodes(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["policyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetPolicyType(val.(*GroupPolicyType)) + } + return nil + } + res["revision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRevision(val) + } + return nil + } + res["targetNamespace"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetNamespace(val) + } + return nil + } + res["targetPrefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetPrefix(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. The file name of the ADMX file without the path. For example: edge.admx +func (m *GroupPolicyDefinitionFile) GetFileName()(*string) { + return m.fileName +} +// GetLanguageCodes gets the languageCodes property value. The supported language codes for the ADMX file. +func (m *GroupPolicyDefinitionFile) GetLanguageCodes()([]string) { + return m.languageCodes +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinitionFile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPolicyType gets the policyType property value. Type of Group Policy File or Definition. +func (m *GroupPolicyDefinitionFile) GetPolicyType()(*GroupPolicyType) { + return m.policyType +} +// GetRevision gets the revision property value. The revision version associated with the file. +func (m *GroupPolicyDefinitionFile) GetRevision()(*string) { + return m.revision +} +// GetTargetNamespace gets the targetNamespace property value. Specifies the URI used to identify the namespace within the ADMX file. +func (m *GroupPolicyDefinitionFile) GetTargetNamespace()(*string) { + return m.targetNamespace +} +// GetTargetPrefix gets the targetPrefix property value. Specifies the logical name that refers to the namespace within the ADMX file. +func (m *GroupPolicyDefinitionFile) GetTargetPrefix()(*string) { + return m.targetPrefix +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinitionFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDefinitions())) + for i, v := range m.GetDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("definitions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + if m.GetLanguageCodes() != nil { + err = writer.WriteCollectionOfStringValues("languageCodes", m.GetLanguageCodes()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPolicyType() != nil { + cast := (*m.GetPolicyType()).String() + err = writer.WriteStringValue("policyType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("revision", m.GetRevision()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetNamespace", m.GetTargetNamespace()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetPrefix", m.GetTargetPrefix()) + if err != nil { + return err + } + } + return nil +} +// SetDefinitions sets the definitions property value. The group policy definitions associated with the file. +func (m *GroupPolicyDefinitionFile) SetDefinitions(value []GroupPolicyDefinitionable)() { + m.definitions = value +} +// SetDescription sets the description property value. The localized description of the policy settings in the ADMX file. The default value is empty. +func (m *GroupPolicyDefinitionFile) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The localized friendly name of the ADMX file. +func (m *GroupPolicyDefinitionFile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFileName sets the fileName property value. The file name of the ADMX file without the path. For example: edge.admx +func (m *GroupPolicyDefinitionFile) SetFileName(value *string)() { + m.fileName = value +} +// SetLanguageCodes sets the languageCodes property value. The supported language codes for the ADMX file. +func (m *GroupPolicyDefinitionFile) SetLanguageCodes(value []string)() { + m.languageCodes = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinitionFile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPolicyType sets the policyType property value. Type of Group Policy File or Definition. +func (m *GroupPolicyDefinitionFile) SetPolicyType(value *GroupPolicyType)() { + m.policyType = value +} +// SetRevision sets the revision property value. The revision version associated with the file. +func (m *GroupPolicyDefinitionFile) SetRevision(value *string)() { + m.revision = value +} +// SetTargetNamespace sets the targetNamespace property value. Specifies the URI used to identify the namespace within the ADMX file. +func (m *GroupPolicyDefinitionFile) SetTargetNamespace(value *string)() { + m.targetNamespace = value +} +// SetTargetPrefix sets the targetPrefix property value. Specifies the logical name that refers to the namespace within the ADMX file. +func (m *GroupPolicyDefinitionFile) SetTargetPrefix(value *string)() { + m.targetPrefix = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_response.go new file mode 100644 index 000000000..ad5b8f787 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionFileCollectionResponse +type GroupPolicyDefinitionFileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyDefinitionFileable +} +// NewGroupPolicyDefinitionFileCollectionResponse instantiates a new GroupPolicyDefinitionFileCollectionResponse and sets the default values. +func NewGroupPolicyDefinitionFileCollectionResponse()(*GroupPolicyDefinitionFileCollectionResponse) { + m := &GroupPolicyDefinitionFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyDefinitionFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyDefinitionFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinitionFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyDefinitionFileCollectionResponse) GetValue()([]GroupPolicyDefinitionFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinitionFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyDefinitionFileCollectionResponse) SetValue(value []GroupPolicyDefinitionFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_responseable.go new file mode 100644 index 000000000..e64112c42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_file_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionFileCollectionResponseable +type GroupPolicyDefinitionFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyDefinitionFileable) + SetValue(value []GroupPolicyDefinitionFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_fileable.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_fileable.go new file mode 100644 index 000000000..f52d1cca4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_fileable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionFileable +type GroupPolicyDefinitionFileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefinitions()([]GroupPolicyDefinitionable) + GetDescription()(*string) + GetDisplayName()(*string) + GetFileName()(*string) + GetLanguageCodes()([]string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPolicyType()(*GroupPolicyType) + GetRevision()(*string) + GetTargetNamespace()(*string) + GetTargetPrefix()(*string) + SetDefinitions(value []GroupPolicyDefinitionable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetFileName(value *string)() + SetLanguageCodes(value []string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPolicyType(value *GroupPolicyType)() + SetRevision(value *string)() + SetTargetNamespace(value *string)() + SetTargetPrefix(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_value.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_value.go new file mode 100644 index 000000000..1bef8daad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_value.go @@ -0,0 +1,200 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionValue the definition value entity stores the value for a single group policy definition. +type GroupPolicyDefinitionValue struct { + Entity + // Group Policy Configuration Type + configurationType *GroupPolicyConfigurationType + // The date and time the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The associated group policy definition with the value. + definition GroupPolicyDefinitionable + // Enables or disables the associated group policy definition. + enabled *bool + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The associated group policy presentation values with the definition value. + presentationValues []GroupPolicyPresentationValueable +} +// NewGroupPolicyDefinitionValue instantiates a new groupPolicyDefinitionValue and sets the default values. +func NewGroupPolicyDefinitionValue()(*GroupPolicyDefinitionValue) { + m := &GroupPolicyDefinitionValue{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyDefinitionValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyDefinitionValue(), nil +} +// GetConfigurationType gets the configurationType property value. Group Policy Configuration Type +func (m *GroupPolicyDefinitionValue) GetConfigurationType()(*GroupPolicyConfigurationType) { + return m.configurationType +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyDefinitionValue) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefinition gets the definition property value. The associated group policy definition with the value. +func (m *GroupPolicyDefinitionValue) GetDefinition()(GroupPolicyDefinitionable) { + return m.definition +} +// GetEnabled gets the enabled property value. Enables or disables the associated group policy definition. +func (m *GroupPolicyDefinitionValue) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinitionValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyConfigurationType) + if err != nil { + return err + } + if val != nil { + m.SetConfigurationType(val.(*GroupPolicyConfigurationType)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["definition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinition(val.(GroupPolicyDefinitionable)) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["presentationValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueable) + } + m.SetPresentationValues(res) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinitionValue) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPresentationValues gets the presentationValues property value. The associated group policy presentation values with the definition value. +func (m *GroupPolicyDefinitionValue) GetPresentationValues()([]GroupPolicyPresentationValueable) { + return m.presentationValues +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinitionValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurationType() != nil { + cast := (*m.GetConfigurationType()).String() + err = writer.WriteStringValue("configurationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definition", m.GetDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPresentationValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPresentationValues())) + for i, v := range m.GetPresentationValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("presentationValues", cast) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationType sets the configurationType property value. Group Policy Configuration Type +func (m *GroupPolicyDefinitionValue) SetConfigurationType(value *GroupPolicyConfigurationType)() { + m.configurationType = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyDefinitionValue) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefinition sets the definition property value. The associated group policy definition with the value. +func (m *GroupPolicyDefinitionValue) SetDefinition(value GroupPolicyDefinitionable)() { + m.definition = value +} +// SetEnabled sets the enabled property value. Enables or disables the associated group policy definition. +func (m *GroupPolicyDefinitionValue) SetEnabled(value *bool)() { + m.enabled = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyDefinitionValue) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPresentationValues sets the presentationValues property value. The associated group policy presentation values with the definition value. +func (m *GroupPolicyDefinitionValue) SetPresentationValues(value []GroupPolicyPresentationValueable)() { + m.presentationValues = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_response.go new file mode 100644 index 000000000..649991ace --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionValueCollectionResponse +type GroupPolicyDefinitionValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyDefinitionValueable +} +// NewGroupPolicyDefinitionValueCollectionResponse instantiates a new GroupPolicyDefinitionValueCollectionResponse and sets the default values. +func NewGroupPolicyDefinitionValueCollectionResponse()(*GroupPolicyDefinitionValueCollectionResponse) { + m := &GroupPolicyDefinitionValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyDefinitionValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyDefinitionValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyDefinitionValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyDefinitionValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyDefinitionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyDefinitionValueable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyDefinitionValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyDefinitionValueCollectionResponse) GetValue()([]GroupPolicyDefinitionValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyDefinitionValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyDefinitionValueCollectionResponse) SetValue(value []GroupPolicyDefinitionValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_responseable.go new file mode 100644 index 000000000..3774694af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionValueCollectionResponseable +type GroupPolicyDefinitionValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyDefinitionValueable) + SetValue(value []GroupPolicyDefinitionValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definition_valueable.go b/src/internal/connector/graph/betasdk/models/group_policy_definition_valueable.go new file mode 100644 index 000000000..84c29bd55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definition_valueable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionValueable +type GroupPolicyDefinitionValueable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationType()(*GroupPolicyConfigurationType) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefinition()(GroupPolicyDefinitionable) + GetEnabled()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPresentationValues()([]GroupPolicyPresentationValueable) + SetConfigurationType(value *GroupPolicyConfigurationType)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefinition(value GroupPolicyDefinitionable)() + SetEnabled(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPresentationValues(value []GroupPolicyPresentationValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_definitionable.go b/src/internal/connector/graph/betasdk/models/group_policy_definitionable.go new file mode 100644 index 000000000..0e7b87876 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_definitionable.go @@ -0,0 +1,47 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyDefinitionable +type GroupPolicyDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(GroupPolicyCategoryable) + GetCategoryPath()(*string) + GetClassType()(*GroupPolicyDefinitionClassType) + GetDefinitionFile()(GroupPolicyDefinitionFileable) + GetDisplayName()(*string) + GetExplainText()(*string) + GetGroupPolicyCategoryId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetHasRelatedDefinitions()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMinDeviceCspVersion()(*string) + GetMinUserCspVersion()(*string) + GetNextVersionDefinition()(GroupPolicyDefinitionable) + GetPolicyType()(*GroupPolicyType) + GetPresentations()([]GroupPolicyPresentationable) + GetPreviousVersionDefinition()(GroupPolicyDefinitionable) + GetSupportedOn()(*string) + GetVersion()(*string) + SetCategory(value GroupPolicyCategoryable)() + SetCategoryPath(value *string)() + SetClassType(value *GroupPolicyDefinitionClassType)() + SetDefinitionFile(value GroupPolicyDefinitionFileable)() + SetDisplayName(value *string)() + SetExplainText(value *string)() + SetGroupPolicyCategoryId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetHasRelatedDefinitions(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMinDeviceCspVersion(value *string)() + SetMinUserCspVersion(value *string)() + SetNextVersionDefinition(value GroupPolicyDefinitionable)() + SetPolicyType(value *GroupPolicyType)() + SetPresentations(value []GroupPolicyPresentationable)() + SetPreviousVersionDefinition(value GroupPolicyDefinitionable)() + SetSupportedOn(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_migration_readiness.go b/src/internal/connector/graph/betasdk/models/group_policy_migration_readiness.go new file mode 100644 index 000000000..71d69819b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_migration_readiness.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyMigrationReadiness int + +const ( + // No Intune coverage + NONE_GROUPPOLICYMIGRATIONREADINESS GroupPolicyMigrationReadiness = iota + // Partial Intune coverage + PARTIAL_GROUPPOLICYMIGRATIONREADINESS + // Complete Intune coverage + COMPLETE_GROUPPOLICYMIGRATIONREADINESS + // Error when analyzing coverage + ERROR_GROUPPOLICYMIGRATIONREADINESS + // No Group Policy settings in GPO + NOTAPPLICABLE_GROUPPOLICYMIGRATIONREADINESS +) + +func (i GroupPolicyMigrationReadiness) String() string { + return []string{"none", "partial", "complete", "error", "notApplicable"}[i] +} +func ParseGroupPolicyMigrationReadiness(v string) (interface{}, error) { + result := NONE_GROUPPOLICYMIGRATIONREADINESS + switch v { + case "none": + result = NONE_GROUPPOLICYMIGRATIONREADINESS + case "partial": + result = PARTIAL_GROUPPOLICYMIGRATIONREADINESS + case "complete": + result = COMPLETE_GROUPPOLICYMIGRATIONREADINESS + case "error": + result = ERROR_GROUPPOLICYMIGRATIONREADINESS + case "notApplicable": + result = NOTAPPLICABLE_GROUPPOLICYMIGRATIONREADINESS + default: + return 0, errors.New("Unknown GroupPolicyMigrationReadiness value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyMigrationReadiness(values []GroupPolicyMigrationReadiness) []string { + 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/group_policy_migration_report.go b/src/internal/connector/graph/betasdk/models/group_policy_migration_report.go new file mode 100644 index 000000000..b90c2a6e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_migration_report.go @@ -0,0 +1,447 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyMigrationReport the Group Policy migration report. +type GroupPolicyMigrationReport struct { + Entity + // The date and time at which the GroupPolicyMigrationReport was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of Group Policy Object from the GPO Xml Content + displayName *string + // The date and time at which the GroupPolicyMigrationReport was created. + groupPolicyCreatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time at which the GroupPolicyMigrationReport was last modified. + groupPolicyLastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Group Policy Object GUID from GPO Xml content + groupPolicyObjectId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // A list of group policy settings to MDM/Intune mappings. + groupPolicySettingMappings []GroupPolicySettingMappingable + // The date and time at which the GroupPolicyMigrationReport was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates if the Group Policy Object file is covered and ready for Intune migration. + migrationReadiness *GroupPolicyMigrationReadiness + // The distinguished name of the OU. + ouDistinguishedName *string + // The list of scope tags for the configuration. + roleScopeTagIds []string + // The number of Group Policy Settings supported by Intune. + supportedSettingsCount *int32 + // The Percentage of Group Policy Settings supported by Intune. + supportedSettingsPercent *int32 + // The Targeted in AD property from GPO Xml Content + targetedInActiveDirectory *bool + // The total number of Group Policy Settings from GPO file. + totalSettingsCount *int32 + // A list of unsupported group policy extensions inside the Group Policy Object. + unsupportedGroupPolicyExtensions []UnsupportedGroupPolicyExtensionable +} +// NewGroupPolicyMigrationReport instantiates a new groupPolicyMigrationReport and sets the default values. +func NewGroupPolicyMigrationReport()(*GroupPolicyMigrationReport) { + m := &GroupPolicyMigrationReport{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyMigrationReportFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyMigrationReportFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyMigrationReport(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time at which the GroupPolicyMigrationReport was created. +func (m *GroupPolicyMigrationReport) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The name of Group Policy Object from the GPO Xml Content +func (m *GroupPolicyMigrationReport) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyMigrationReport) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["groupPolicyCreatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupPolicyCreatedDateTime(val) + } + return nil + } + res["groupPolicyLastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupPolicyLastModifiedDateTime(val) + } + return nil + } + res["groupPolicyObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupPolicyObjectId(val) + } + return nil + } + res["groupPolicySettingMappings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicySettingMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicySettingMappingable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicySettingMappingable) + } + m.SetGroupPolicySettingMappings(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["migrationReadiness"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyMigrationReadiness) + if err != nil { + return err + } + if val != nil { + m.SetMigrationReadiness(val.(*GroupPolicyMigrationReadiness)) + } + return nil + } + res["ouDistinguishedName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuDistinguishedName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["supportedSettingsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupportedSettingsCount(val) + } + return nil + } + res["supportedSettingsPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupportedSettingsPercent(val) + } + return nil + } + res["targetedInActiveDirectory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetedInActiveDirectory(val) + } + return nil + } + res["totalSettingsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSettingsCount(val) + } + return nil + } + res["unsupportedGroupPolicyExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnsupportedGroupPolicyExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnsupportedGroupPolicyExtensionable, len(val)) + for i, v := range val { + res[i] = v.(UnsupportedGroupPolicyExtensionable) + } + m.SetUnsupportedGroupPolicyExtensions(res) + } + return nil + } + return res +} +// GetGroupPolicyCreatedDateTime gets the groupPolicyCreatedDateTime property value. The date and time at which the GroupPolicyMigrationReport was created. +func (m *GroupPolicyMigrationReport) GetGroupPolicyCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.groupPolicyCreatedDateTime +} +// GetGroupPolicyLastModifiedDateTime gets the groupPolicyLastModifiedDateTime property value. The date and time at which the GroupPolicyMigrationReport was last modified. +func (m *GroupPolicyMigrationReport) GetGroupPolicyLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.groupPolicyLastModifiedDateTime +} +// GetGroupPolicyObjectId gets the groupPolicyObjectId property value. The Group Policy Object GUID from GPO Xml content +func (m *GroupPolicyMigrationReport) GetGroupPolicyObjectId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.groupPolicyObjectId +} +// GetGroupPolicySettingMappings gets the groupPolicySettingMappings property value. A list of group policy settings to MDM/Intune mappings. +func (m *GroupPolicyMigrationReport) GetGroupPolicySettingMappings()([]GroupPolicySettingMappingable) { + return m.groupPolicySettingMappings +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time at which the GroupPolicyMigrationReport was last modified. +func (m *GroupPolicyMigrationReport) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMigrationReadiness gets the migrationReadiness property value. Indicates if the Group Policy Object file is covered and ready for Intune migration. +func (m *GroupPolicyMigrationReport) GetMigrationReadiness()(*GroupPolicyMigrationReadiness) { + return m.migrationReadiness +} +// GetOuDistinguishedName gets the ouDistinguishedName property value. The distinguished name of the OU. +func (m *GroupPolicyMigrationReport) GetOuDistinguishedName()(*string) { + return m.ouDistinguishedName +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyMigrationReport) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSupportedSettingsCount gets the supportedSettingsCount property value. The number of Group Policy Settings supported by Intune. +func (m *GroupPolicyMigrationReport) GetSupportedSettingsCount()(*int32) { + return m.supportedSettingsCount +} +// GetSupportedSettingsPercent gets the supportedSettingsPercent property value. The Percentage of Group Policy Settings supported by Intune. +func (m *GroupPolicyMigrationReport) GetSupportedSettingsPercent()(*int32) { + return m.supportedSettingsPercent +} +// GetTargetedInActiveDirectory gets the targetedInActiveDirectory property value. The Targeted in AD property from GPO Xml Content +func (m *GroupPolicyMigrationReport) GetTargetedInActiveDirectory()(*bool) { + return m.targetedInActiveDirectory +} +// GetTotalSettingsCount gets the totalSettingsCount property value. The total number of Group Policy Settings from GPO file. +func (m *GroupPolicyMigrationReport) GetTotalSettingsCount()(*int32) { + return m.totalSettingsCount +} +// GetUnsupportedGroupPolicyExtensions gets the unsupportedGroupPolicyExtensions property value. A list of unsupported group policy extensions inside the Group Policy Object. +func (m *GroupPolicyMigrationReport) GetUnsupportedGroupPolicyExtensions()([]UnsupportedGroupPolicyExtensionable) { + return m.unsupportedGroupPolicyExtensions +} +// Serialize serializes information the current object +func (m *GroupPolicyMigrationReport) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("groupPolicyCreatedDateTime", m.GetGroupPolicyCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("groupPolicyLastModifiedDateTime", m.GetGroupPolicyLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("groupPolicyObjectId", m.GetGroupPolicyObjectId()) + if err != nil { + return err + } + } + if m.GetGroupPolicySettingMappings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicySettingMappings())) + for i, v := range m.GetGroupPolicySettingMappings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicySettingMappings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetMigrationReadiness() != nil { + cast := (*m.GetMigrationReadiness()).String() + err = writer.WriteStringValue("migrationReadiness", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ouDistinguishedName", m.GetOuDistinguishedName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("supportedSettingsCount", m.GetSupportedSettingsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("supportedSettingsPercent", m.GetSupportedSettingsPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("targetedInActiveDirectory", m.GetTargetedInActiveDirectory()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalSettingsCount", m.GetTotalSettingsCount()) + if err != nil { + return err + } + } + if m.GetUnsupportedGroupPolicyExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnsupportedGroupPolicyExtensions())) + for i, v := range m.GetUnsupportedGroupPolicyExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("unsupportedGroupPolicyExtensions", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time at which the GroupPolicyMigrationReport was created. +func (m *GroupPolicyMigrationReport) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The name of Group Policy Object from the GPO Xml Content +func (m *GroupPolicyMigrationReport) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGroupPolicyCreatedDateTime sets the groupPolicyCreatedDateTime property value. The date and time at which the GroupPolicyMigrationReport was created. +func (m *GroupPolicyMigrationReport) SetGroupPolicyCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.groupPolicyCreatedDateTime = value +} +// SetGroupPolicyLastModifiedDateTime sets the groupPolicyLastModifiedDateTime property value. The date and time at which the GroupPolicyMigrationReport was last modified. +func (m *GroupPolicyMigrationReport) SetGroupPolicyLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.groupPolicyLastModifiedDateTime = value +} +// SetGroupPolicyObjectId sets the groupPolicyObjectId property value. The Group Policy Object GUID from GPO Xml content +func (m *GroupPolicyMigrationReport) SetGroupPolicyObjectId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.groupPolicyObjectId = value +} +// SetGroupPolicySettingMappings sets the groupPolicySettingMappings property value. A list of group policy settings to MDM/Intune mappings. +func (m *GroupPolicyMigrationReport) SetGroupPolicySettingMappings(value []GroupPolicySettingMappingable)() { + m.groupPolicySettingMappings = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time at which the GroupPolicyMigrationReport was last modified. +func (m *GroupPolicyMigrationReport) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMigrationReadiness sets the migrationReadiness property value. Indicates if the Group Policy Object file is covered and ready for Intune migration. +func (m *GroupPolicyMigrationReport) SetMigrationReadiness(value *GroupPolicyMigrationReadiness)() { + m.migrationReadiness = value +} +// SetOuDistinguishedName sets the ouDistinguishedName property value. The distinguished name of the OU. +func (m *GroupPolicyMigrationReport) SetOuDistinguishedName(value *string)() { + m.ouDistinguishedName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyMigrationReport) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSupportedSettingsCount sets the supportedSettingsCount property value. The number of Group Policy Settings supported by Intune. +func (m *GroupPolicyMigrationReport) SetSupportedSettingsCount(value *int32)() { + m.supportedSettingsCount = value +} +// SetSupportedSettingsPercent sets the supportedSettingsPercent property value. The Percentage of Group Policy Settings supported by Intune. +func (m *GroupPolicyMigrationReport) SetSupportedSettingsPercent(value *int32)() { + m.supportedSettingsPercent = value +} +// SetTargetedInActiveDirectory sets the targetedInActiveDirectory property value. The Targeted in AD property from GPO Xml Content +func (m *GroupPolicyMigrationReport) SetTargetedInActiveDirectory(value *bool)() { + m.targetedInActiveDirectory = value +} +// SetTotalSettingsCount sets the totalSettingsCount property value. The total number of Group Policy Settings from GPO file. +func (m *GroupPolicyMigrationReport) SetTotalSettingsCount(value *int32)() { + m.totalSettingsCount = value +} +// SetUnsupportedGroupPolicyExtensions sets the unsupportedGroupPolicyExtensions property value. A list of unsupported group policy extensions inside the Group Policy Object. +func (m *GroupPolicyMigrationReport) SetUnsupportedGroupPolicyExtensions(value []UnsupportedGroupPolicyExtensionable)() { + m.unsupportedGroupPolicyExtensions = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_response.go new file mode 100644 index 000000000..2243fc3b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyMigrationReportCollectionResponse +type GroupPolicyMigrationReportCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyMigrationReportable +} +// NewGroupPolicyMigrationReportCollectionResponse instantiates a new GroupPolicyMigrationReportCollectionResponse and sets the default values. +func NewGroupPolicyMigrationReportCollectionResponse()(*GroupPolicyMigrationReportCollectionResponse) { + m := &GroupPolicyMigrationReportCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyMigrationReportCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyMigrationReportCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyMigrationReportCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyMigrationReportCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyMigrationReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyMigrationReportable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyMigrationReportable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyMigrationReportCollectionResponse) GetValue()([]GroupPolicyMigrationReportable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyMigrationReportCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyMigrationReportCollectionResponse) SetValue(value []GroupPolicyMigrationReportable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_responseable.go new file mode 100644 index 000000000..8972e1643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_migration_report_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyMigrationReportCollectionResponseable +type GroupPolicyMigrationReportCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyMigrationReportable) + SetValue(value []GroupPolicyMigrationReportable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_migration_reportable.go b/src/internal/connector/graph/betasdk/models/group_policy_migration_reportable.go new file mode 100644 index 000000000..bc3d1ea36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_migration_reportable.go @@ -0,0 +1,43 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyMigrationReportable +type GroupPolicyMigrationReportable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetGroupPolicyCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupPolicyLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupPolicyObjectId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetGroupPolicySettingMappings()([]GroupPolicySettingMappingable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMigrationReadiness()(*GroupPolicyMigrationReadiness) + GetOuDistinguishedName()(*string) + GetRoleScopeTagIds()([]string) + GetSupportedSettingsCount()(*int32) + GetSupportedSettingsPercent()(*int32) + GetTargetedInActiveDirectory()(*bool) + GetTotalSettingsCount()(*int32) + GetUnsupportedGroupPolicyExtensions()([]UnsupportedGroupPolicyExtensionable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetGroupPolicyCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupPolicyLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupPolicyObjectId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetGroupPolicySettingMappings(value []GroupPolicySettingMappingable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMigrationReadiness(value *GroupPolicyMigrationReadiness)() + SetOuDistinguishedName(value *string)() + SetRoleScopeTagIds(value []string)() + SetSupportedSettingsCount(value *int32)() + SetSupportedSettingsPercent(value *int32)() + SetTargetedInActiveDirectory(value *bool)() + SetTotalSettingsCount(value *int32)() + SetUnsupportedGroupPolicyExtensions(value []UnsupportedGroupPolicyExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_object_file.go b/src/internal/connector/graph/betasdk/models/group_policy_object_file.go new file mode 100644 index 000000000..dcedc6d68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_object_file.go @@ -0,0 +1,196 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyObjectFile the Group Policy Object file uploaded by admin. +type GroupPolicyObjectFile struct { + Entity + // The Group Policy Object file content. + content *string + // The date and time at which the GroupPolicy was first uploaded. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Group Policy Object GUID from GPO Xml content + groupPolicyObjectId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The date and time at which the GroupPolicyObjectFile was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The distinguished name of the OU. + ouDistinguishedName *string + // The list of scope tags for the configuration. + roleScopeTagIds []string +} +// NewGroupPolicyObjectFile instantiates a new groupPolicyObjectFile and sets the default values. +func NewGroupPolicyObjectFile()(*GroupPolicyObjectFile) { + m := &GroupPolicyObjectFile{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyObjectFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyObjectFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyObjectFile(), nil +} +// GetContent gets the content property value. The Group Policy Object file content. +func (m *GroupPolicyObjectFile) GetContent()(*string) { + return m.content +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time at which the GroupPolicy was first uploaded. +func (m *GroupPolicyObjectFile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyObjectFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["groupPolicyObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupPolicyObjectId(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["ouDistinguishedName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuDistinguishedName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + return res +} +// GetGroupPolicyObjectId gets the groupPolicyObjectId property value. The Group Policy Object GUID from GPO Xml content +func (m *GroupPolicyObjectFile) GetGroupPolicyObjectId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.groupPolicyObjectId +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time at which the GroupPolicyObjectFile was last modified. +func (m *GroupPolicyObjectFile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOuDistinguishedName gets the ouDistinguishedName property value. The distinguished name of the OU. +func (m *GroupPolicyObjectFile) GetOuDistinguishedName()(*string) { + return m.ouDistinguishedName +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyObjectFile) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// Serialize serializes information the current object +func (m *GroupPolicyObjectFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("groupPolicyObjectId", m.GetGroupPolicyObjectId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ouDistinguishedName", m.GetOuDistinguishedName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The Group Policy Object file content. +func (m *GroupPolicyObjectFile) SetContent(value *string)() { + m.content = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time at which the GroupPolicy was first uploaded. +func (m *GroupPolicyObjectFile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetGroupPolicyObjectId sets the groupPolicyObjectId property value. The Group Policy Object GUID from GPO Xml content +func (m *GroupPolicyObjectFile) SetGroupPolicyObjectId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.groupPolicyObjectId = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time at which the GroupPolicyObjectFile was last modified. +func (m *GroupPolicyObjectFile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOuDistinguishedName sets the ouDistinguishedName property value. The distinguished name of the OU. +func (m *GroupPolicyObjectFile) SetOuDistinguishedName(value *string)() { + m.ouDistinguishedName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. The list of scope tags for the configuration. +func (m *GroupPolicyObjectFile) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_response.go new file mode 100644 index 000000000..5bd888639 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyObjectFileCollectionResponse +type GroupPolicyObjectFileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyObjectFileable +} +// NewGroupPolicyObjectFileCollectionResponse instantiates a new GroupPolicyObjectFileCollectionResponse and sets the default values. +func NewGroupPolicyObjectFileCollectionResponse()(*GroupPolicyObjectFileCollectionResponse) { + m := &GroupPolicyObjectFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyObjectFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyObjectFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyObjectFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyObjectFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyObjectFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyObjectFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyObjectFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyObjectFileCollectionResponse) GetValue()([]GroupPolicyObjectFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyObjectFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyObjectFileCollectionResponse) SetValue(value []GroupPolicyObjectFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_responseable.go new file mode 100644 index 000000000..c4310d90c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_object_file_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyObjectFileCollectionResponseable +type GroupPolicyObjectFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyObjectFileable) + SetValue(value []GroupPolicyObjectFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_object_fileable.go b/src/internal/connector/graph/betasdk/models/group_policy_object_fileable.go new file mode 100644 index 000000000..59fd70d18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_object_fileable.go @@ -0,0 +1,25 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyObjectFileable +type GroupPolicyObjectFileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupPolicyObjectId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOuDistinguishedName()(*string) + GetRoleScopeTagIds()([]string) + SetContent(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupPolicyObjectId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOuDistinguishedName(value *string)() + SetRoleScopeTagIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_operation.go b/src/internal/connector/graph/betasdk/models/group_policy_operation.go new file mode 100644 index 000000000..42da3b701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operation.go @@ -0,0 +1,141 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyOperation the entity represents an group policy operation. +type GroupPolicyOperation struct { + Entity + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Type of Group Policy operation status. + operationStatus *GroupPolicyOperationStatus + // Type of Group Policy operation. + operationType *GroupPolicyOperationType + // The group policy operation status detail. + statusDetails *string +} +// NewGroupPolicyOperation instantiates a new groupPolicyOperation and sets the default values. +func NewGroupPolicyOperation()(*GroupPolicyOperation) { + m := &GroupPolicyOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["operationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetOperationStatus(val.(*GroupPolicyOperationStatus)) + } + return nil + } + res["operationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyOperationType) + if err != nil { + return err + } + if val != nil { + m.SetOperationType(val.(*GroupPolicyOperationType)) + } + return nil + } + res["statusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusDetails(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyOperation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOperationStatus gets the operationStatus property value. Type of Group Policy operation status. +func (m *GroupPolicyOperation) GetOperationStatus()(*GroupPolicyOperationStatus) { + return m.operationStatus +} +// GetOperationType gets the operationType property value. Type of Group Policy operation. +func (m *GroupPolicyOperation) GetOperationType()(*GroupPolicyOperationType) { + return m.operationType +} +// GetStatusDetails gets the statusDetails property value. The group policy operation status detail. +func (m *GroupPolicyOperation) GetStatusDetails()(*string) { + return m.statusDetails +} +// Serialize serializes information the current object +func (m *GroupPolicyOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetOperationStatus() != nil { + cast := (*m.GetOperationStatus()).String() + err = writer.WriteStringValue("operationStatus", &cast) + if err != nil { + return err + } + } + if m.GetOperationType() != nil { + cast := (*m.GetOperationType()).String() + err = writer.WriteStringValue("operationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("statusDetails", m.GetStatusDetails()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyOperation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOperationStatus sets the operationStatus property value. Type of Group Policy operation status. +func (m *GroupPolicyOperation) SetOperationStatus(value *GroupPolicyOperationStatus)() { + m.operationStatus = value +} +// SetOperationType sets the operationType property value. Type of Group Policy operation. +func (m *GroupPolicyOperation) SetOperationType(value *GroupPolicyOperationType)() { + m.operationType = value +} +// SetStatusDetails sets the statusDetails property value. The group policy operation status detail. +func (m *GroupPolicyOperation) SetStatusDetails(value *string)() { + m.statusDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_response.go new file mode 100644 index 000000000..7082ce73f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyOperationCollectionResponse +type GroupPolicyOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyOperationable +} +// NewGroupPolicyOperationCollectionResponse instantiates a new GroupPolicyOperationCollectionResponse and sets the default values. +func NewGroupPolicyOperationCollectionResponse()(*GroupPolicyOperationCollectionResponse) { + m := &GroupPolicyOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyOperationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyOperationCollectionResponse) GetValue()([]GroupPolicyOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyOperationCollectionResponse) SetValue(value []GroupPolicyOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_responseable.go new file mode 100644 index 000000000..a1b964ff2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyOperationCollectionResponseable +type GroupPolicyOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyOperationable) + SetValue(value []GroupPolicyOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_operation_status.go b/src/internal/connector/graph/betasdk/models/group_policy_operation_status.go new file mode 100644 index 000000000..409c33a23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operation_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyOperationStatus int + +const ( + // Group Policy unknown operation status. + UNKNOWN_GROUPPOLICYOPERATIONSTATUS GroupPolicyOperationStatus = iota + // Group Policy in progress operation status. + INPROGRESS_GROUPPOLICYOPERATIONSTATUS + // Group Policy successful operation status. + SUCCESS_GROUPPOLICYOPERATIONSTATUS + // Group Policy failed operation status. + FAILED_GROUPPOLICYOPERATIONSTATUS +) + +func (i GroupPolicyOperationStatus) String() string { + return []string{"unknown", "inProgress", "success", "failed"}[i] +} +func ParseGroupPolicyOperationStatus(v string) (interface{}, error) { + result := UNKNOWN_GROUPPOLICYOPERATIONSTATUS + switch v { + case "unknown": + result = UNKNOWN_GROUPPOLICYOPERATIONSTATUS + case "inProgress": + result = INPROGRESS_GROUPPOLICYOPERATIONSTATUS + case "success": + result = SUCCESS_GROUPPOLICYOPERATIONSTATUS + case "failed": + result = FAILED_GROUPPOLICYOPERATIONSTATUS + default: + return 0, errors.New("Unknown GroupPolicyOperationStatus value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyOperationStatus(values []GroupPolicyOperationStatus) []string { + 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/group_policy_operation_type.go b/src/internal/connector/graph/betasdk/models/group_policy_operation_type.go new file mode 100644 index 000000000..77847633e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operation_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyOperationType int + +const ( + // Group Policy invalid operation type. + NONE_GROUPPOLICYOPERATIONTYPE GroupPolicyOperationType = iota + // Group Policy upload operation type. + UPLOAD_GROUPPOLICYOPERATIONTYPE + // Group Policy upload new version operation type. + UPLOADNEWVERSION_GROUPPOLICYOPERATIONTYPE + // Group Policy add new language(ADML) files operation type. + ADDLANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + // Group Policy remove language(ADML) files operation type. + REMOVELANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + // Group Policy update language(ADML) files operation type. + UPDATELANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + // Group Policy remove uploaded file operation type. + REMOVE_GROUPPOLICYOPERATIONTYPE +) + +func (i GroupPolicyOperationType) String() string { + return []string{"none", "upload", "uploadNewVersion", "addLanguageFiles", "removeLanguageFiles", "updateLanguageFiles", "remove"}[i] +} +func ParseGroupPolicyOperationType(v string) (interface{}, error) { + result := NONE_GROUPPOLICYOPERATIONTYPE + switch v { + case "none": + result = NONE_GROUPPOLICYOPERATIONTYPE + case "upload": + result = UPLOAD_GROUPPOLICYOPERATIONTYPE + case "uploadNewVersion": + result = UPLOADNEWVERSION_GROUPPOLICYOPERATIONTYPE + case "addLanguageFiles": + result = ADDLANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + case "removeLanguageFiles": + result = REMOVELANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + case "updateLanguageFiles": + result = UPDATELANGUAGEFILES_GROUPPOLICYOPERATIONTYPE + case "remove": + result = REMOVE_GROUPPOLICYOPERATIONTYPE + default: + return 0, errors.New("Unknown GroupPolicyOperationType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyOperationType(values []GroupPolicyOperationType) []string { + 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/group_policy_operationable.go b/src/internal/connector/graph/betasdk/models/group_policy_operationable.go new file mode 100644 index 000000000..aba052967 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_operationable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyOperationable +type GroupPolicyOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOperationStatus()(*GroupPolicyOperationStatus) + GetOperationType()(*GroupPolicyOperationType) + GetStatusDetails()(*string) + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOperationStatus(value *GroupPolicyOperationStatus)() + SetOperationType(value *GroupPolicyOperationType)() + SetStatusDetails(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation.go new file mode 100644 index 000000000..edfc672c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation.go @@ -0,0 +1,149 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentation the base entity for the display presentation of any of the additional options in a group policy definition. +type GroupPolicyPresentation struct { + Entity + // The group policy definition associated with the presentation. + definition GroupPolicyDefinitionable + // Localized text label for any presentation entity. The default value is empty. + label *string + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewGroupPolicyPresentation instantiates a new groupPolicyPresentation and sets the default values. +func NewGroupPolicyPresentation()(*GroupPolicyPresentation) { + m := &GroupPolicyPresentation{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyPresentationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupPolicyPresentationCheckBox": + return NewGroupPolicyPresentationCheckBox(), nil + case "#microsoft.graph.groupPolicyPresentationComboBox": + return NewGroupPolicyPresentationComboBox(), nil + case "#microsoft.graph.groupPolicyPresentationDecimalTextBox": + return NewGroupPolicyPresentationDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationDropdownList": + return NewGroupPolicyPresentationDropdownList(), nil + case "#microsoft.graph.groupPolicyPresentationListBox": + return NewGroupPolicyPresentationListBox(), nil + case "#microsoft.graph.groupPolicyPresentationLongDecimalTextBox": + return NewGroupPolicyPresentationLongDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationMultiTextBox": + return NewGroupPolicyPresentationMultiTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationText": + return NewGroupPolicyPresentationText(), nil + case "#microsoft.graph.groupPolicyPresentationTextBox": + return NewGroupPolicyPresentationTextBox(), nil + case "#microsoft.graph.groupPolicyUploadedPresentation": + return NewGroupPolicyUploadedPresentation(), nil + } + } + } + } + return NewGroupPolicyPresentation(), nil +} +// GetDefinition gets the definition property value. The group policy definition associated with the presentation. +func (m *GroupPolicyPresentation) GetDefinition()(GroupPolicyDefinitionable) { + return m.definition +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["definition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinition(val.(GroupPolicyDefinitionable)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLabel gets the label property value. Localized text label for any presentation entity. The default value is empty. +func (m *GroupPolicyPresentation) GetLabel()(*string) { + return m.label +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyPresentation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("definition", m.GetDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDefinition sets the definition property value. The group policy definition associated with the presentation. +func (m *GroupPolicyPresentation) SetDefinition(value GroupPolicyDefinitionable)() { + m.definition = value +} +// SetLabel sets the label property value. Localized text label for any presentation entity. The default value is empty. +func (m *GroupPolicyPresentation) SetLabel(value *string)() { + m.label = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyPresentation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box.go new file mode 100644 index 000000000..18fe1b97c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCheckBox +type GroupPolicyPresentationCheckBox struct { + GroupPolicyUploadedPresentation + // Default value for the check box. The default value is false. + defaultChecked *bool +} +// NewGroupPolicyPresentationCheckBox instantiates a new GroupPolicyPresentationCheckBox and sets the default values. +func NewGroupPolicyPresentationCheckBox()(*GroupPolicyPresentationCheckBox) { + m := &GroupPolicyPresentationCheckBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationCheckBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationCheckBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationCheckBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationCheckBox(), nil +} +// GetDefaultChecked gets the defaultChecked property value. Default value for the check box. The default value is false. +func (m *GroupPolicyPresentationCheckBox) GetDefaultChecked()(*bool) { + return m.defaultChecked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationCheckBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultChecked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultChecked(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationCheckBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("defaultChecked", m.GetDefaultChecked()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultChecked sets the defaultChecked property value. Default value for the check box. The default value is false. +func (m *GroupPolicyPresentationCheckBox) SetDefaultChecked(value *bool)() { + m.defaultChecked = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_response.go new file mode 100644 index 000000000..a258faece --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCheckBoxCollectionResponse +type GroupPolicyPresentationCheckBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationCheckBoxable +} +// NewGroupPolicyPresentationCheckBoxCollectionResponse instantiates a new GroupPolicyPresentationCheckBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationCheckBoxCollectionResponse()(*GroupPolicyPresentationCheckBoxCollectionResponse) { + m := &GroupPolicyPresentationCheckBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationCheckBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationCheckBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationCheckBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationCheckBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationCheckBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationCheckBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationCheckBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationCheckBoxCollectionResponse) GetValue()([]GroupPolicyPresentationCheckBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationCheckBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationCheckBoxCollectionResponse) SetValue(value []GroupPolicyPresentationCheckBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_responseable.go new file mode 100644 index 000000000..a9f90ae84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCheckBoxCollectionResponseable +type GroupPolicyPresentationCheckBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationCheckBoxable) + SetValue(value []GroupPolicyPresentationCheckBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_boxable.go new file mode 100644 index 000000000..f7250da36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_check_boxable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCheckBoxable +type GroupPolicyPresentationCheckBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultChecked()(*bool) + SetDefaultChecked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_response.go new file mode 100644 index 000000000..f3934c15d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCollectionResponse +type GroupPolicyPresentationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationable +} +// NewGroupPolicyPresentationCollectionResponse instantiates a new GroupPolicyPresentationCollectionResponse and sets the default values. +func NewGroupPolicyPresentationCollectionResponse()(*GroupPolicyPresentationCollectionResponse) { + m := &GroupPolicyPresentationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationCollectionResponse) GetValue()([]GroupPolicyPresentationable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationCollectionResponse) SetValue(value []GroupPolicyPresentationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_responseable.go new file mode 100644 index 000000000..32dd735af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationCollectionResponseable +type GroupPolicyPresentationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationable) + SetValue(value []GroupPolicyPresentationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box.go new file mode 100644 index 000000000..cf0548578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box.go @@ -0,0 +1,144 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationComboBox +type GroupPolicyPresentationComboBox struct { + GroupPolicyUploadedPresentation + // Localized default string displayed in the combo box. The default value is empty. + defaultValue *string + // An unsigned integer that specifies the maximum number of text characters for the parameter. The default value is 1023. + maxLength *int64 + // Specifies whether a value must be specified for the parameter. The default value is false. + required *bool + // Localized strings listed in the drop-down list of the combo box. The default value is empty. + suggestions []string +} +// NewGroupPolicyPresentationComboBox instantiates a new GroupPolicyPresentationComboBox and sets the default values. +func NewGroupPolicyPresentationComboBox()(*GroupPolicyPresentationComboBox) { + m := &GroupPolicyPresentationComboBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationComboBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationComboBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationComboBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationComboBox(), nil +} +// GetDefaultValue gets the defaultValue property value. Localized default string displayed in the combo box. The default value is empty. +func (m *GroupPolicyPresentationComboBox) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationComboBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["maxLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxLength(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["suggestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSuggestions(res) + } + return nil + } + return res +} +// GetMaxLength gets the maxLength property value. An unsigned integer that specifies the maximum number of text characters for the parameter. The default value is 1023. +func (m *GroupPolicyPresentationComboBox) GetMaxLength()(*int64) { + return m.maxLength +} +// GetRequired gets the required property value. Specifies whether a value must be specified for the parameter. The default value is false. +func (m *GroupPolicyPresentationComboBox) GetRequired()(*bool) { + return m.required +} +// GetSuggestions gets the suggestions property value. Localized strings listed in the drop-down list of the combo box. The default value is empty. +func (m *GroupPolicyPresentationComboBox) GetSuggestions()([]string) { + return m.suggestions +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationComboBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maxLength", m.GetMaxLength()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + if m.GetSuggestions() != nil { + err = writer.WriteCollectionOfStringValues("suggestions", m.GetSuggestions()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. Localized default string displayed in the combo box. The default value is empty. +func (m *GroupPolicyPresentationComboBox) SetDefaultValue(value *string)() { + m.defaultValue = value +} +// SetMaxLength sets the maxLength property value. An unsigned integer that specifies the maximum number of text characters for the parameter. The default value is 1023. +func (m *GroupPolicyPresentationComboBox) SetMaxLength(value *int64)() { + m.maxLength = value +} +// SetRequired sets the required property value. Specifies whether a value must be specified for the parameter. The default value is false. +func (m *GroupPolicyPresentationComboBox) SetRequired(value *bool)() { + m.required = value +} +// SetSuggestions sets the suggestions property value. Localized strings listed in the drop-down list of the combo box. The default value is empty. +func (m *GroupPolicyPresentationComboBox) SetSuggestions(value []string)() { + m.suggestions = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_response.go new file mode 100644 index 000000000..db295fed0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationComboBoxCollectionResponse +type GroupPolicyPresentationComboBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationComboBoxable +} +// NewGroupPolicyPresentationComboBoxCollectionResponse instantiates a new GroupPolicyPresentationComboBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationComboBoxCollectionResponse()(*GroupPolicyPresentationComboBoxCollectionResponse) { + m := &GroupPolicyPresentationComboBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationComboBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationComboBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationComboBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationComboBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationComboBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationComboBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationComboBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationComboBoxCollectionResponse) GetValue()([]GroupPolicyPresentationComboBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationComboBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationComboBoxCollectionResponse) SetValue(value []GroupPolicyPresentationComboBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_responseable.go new file mode 100644 index 000000000..c86a10976 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationComboBoxCollectionResponseable +type GroupPolicyPresentationComboBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationComboBoxable) + SetValue(value []GroupPolicyPresentationComboBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_boxable.go new file mode 100644 index 000000000..393ab8469 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_combo_boxable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationComboBoxable +type GroupPolicyPresentationComboBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*string) + GetMaxLength()(*int64) + GetRequired()(*bool) + GetSuggestions()([]string) + SetDefaultValue(value *string)() + SetMaxLength(value *int64)() + SetRequired(value *bool)() + SetSuggestions(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box.go new file mode 100644 index 000000000..7d0740585 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDecimalTextBox +type GroupPolicyPresentationDecimalTextBox struct { + GroupPolicyUploadedPresentation + // An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. + defaultValue *int64 + // An unsigned integer that specifies the maximum allowed value. The default value is 9999. + maxValue *int64 + // An unsigned integer that specifies the minimum allowed value. The default value is 0. + minValue *int64 + // Requirement to enter a value in the parameter box. The default value is false. + required *bool + // If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. + spin *bool + // An unsigned integer that specifies the increment of change for the spin control. The default value is 1. + spinStep *int64 +} +// NewGroupPolicyPresentationDecimalTextBox instantiates a new GroupPolicyPresentationDecimalTextBox and sets the default values. +func NewGroupPolicyPresentationDecimalTextBox()(*GroupPolicyPresentationDecimalTextBox) { + m := &GroupPolicyPresentationDecimalTextBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationDecimalTextBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationDecimalTextBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDecimalTextBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDecimalTextBox(), nil +} +// GetDefaultValue gets the defaultValue property value. An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. +func (m *GroupPolicyPresentationDecimalTextBox) GetDefaultValue()(*int64) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDecimalTextBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["maxValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxValue(val) + } + return nil + } + res["minValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinValue(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["spin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSpin(val) + } + return nil + } + res["spinStep"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSpinStep(val) + } + return nil + } + return res +} +// GetMaxValue gets the maxValue property value. An unsigned integer that specifies the maximum allowed value. The default value is 9999. +func (m *GroupPolicyPresentationDecimalTextBox) GetMaxValue()(*int64) { + return m.maxValue +} +// GetMinValue gets the minValue property value. An unsigned integer that specifies the minimum allowed value. The default value is 0. +func (m *GroupPolicyPresentationDecimalTextBox) GetMinValue()(*int64) { + return m.minValue +} +// GetRequired gets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationDecimalTextBox) GetRequired()(*bool) { + return m.required +} +// GetSpin gets the spin property value. If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. +func (m *GroupPolicyPresentationDecimalTextBox) GetSpin()(*bool) { + return m.spin +} +// GetSpinStep gets the spinStep property value. An unsigned integer that specifies the increment of change for the spin control. The default value is 1. +func (m *GroupPolicyPresentationDecimalTextBox) GetSpinStep()(*int64) { + return m.spinStep +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDecimalTextBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maxValue", m.GetMaxValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("minValue", m.GetMinValue()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("spin", m.GetSpin()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("spinStep", m.GetSpinStep()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. +func (m *GroupPolicyPresentationDecimalTextBox) SetDefaultValue(value *int64)() { + m.defaultValue = value +} +// SetMaxValue sets the maxValue property value. An unsigned integer that specifies the maximum allowed value. The default value is 9999. +func (m *GroupPolicyPresentationDecimalTextBox) SetMaxValue(value *int64)() { + m.maxValue = value +} +// SetMinValue sets the minValue property value. An unsigned integer that specifies the minimum allowed value. The default value is 0. +func (m *GroupPolicyPresentationDecimalTextBox) SetMinValue(value *int64)() { + m.minValue = value +} +// SetRequired sets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationDecimalTextBox) SetRequired(value *bool)() { + m.required = value +} +// SetSpin sets the spin property value. If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. +func (m *GroupPolicyPresentationDecimalTextBox) SetSpin(value *bool)() { + m.spin = value +} +// SetSpinStep sets the spinStep property value. An unsigned integer that specifies the increment of change for the spin control. The default value is 1. +func (m *GroupPolicyPresentationDecimalTextBox) SetSpinStep(value *int64)() { + m.spinStep = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_response.go new file mode 100644 index 000000000..27712e867 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDecimalTextBoxCollectionResponse +type GroupPolicyPresentationDecimalTextBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationDecimalTextBoxable +} +// NewGroupPolicyPresentationDecimalTextBoxCollectionResponse instantiates a new GroupPolicyPresentationDecimalTextBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationDecimalTextBoxCollectionResponse()(*GroupPolicyPresentationDecimalTextBoxCollectionResponse) { + m := &GroupPolicyPresentationDecimalTextBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationDecimalTextBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDecimalTextBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDecimalTextBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDecimalTextBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationDecimalTextBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationDecimalTextBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationDecimalTextBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationDecimalTextBoxCollectionResponse) GetValue()([]GroupPolicyPresentationDecimalTextBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDecimalTextBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationDecimalTextBoxCollectionResponse) SetValue(value []GroupPolicyPresentationDecimalTextBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_responseable.go new file mode 100644 index 000000000..a383f8f86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDecimalTextBoxCollectionResponseable +type GroupPolicyPresentationDecimalTextBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationDecimalTextBoxable) + SetValue(value []GroupPolicyPresentationDecimalTextBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_boxable.go new file mode 100644 index 000000000..a2db71898 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_decimal_text_boxable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDecimalTextBoxable +type GroupPolicyPresentationDecimalTextBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*int64) + GetMaxValue()(*int64) + GetMinValue()(*int64) + GetRequired()(*bool) + GetSpin()(*bool) + GetSpinStep()(*int64) + SetDefaultValue(value *int64)() + SetMaxValue(value *int64)() + SetMinValue(value *int64)() + SetRequired(value *bool)() + SetSpin(value *bool)() + SetSpinStep(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list.go new file mode 100644 index 000000000..f13aeb2b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownList +type GroupPolicyPresentationDropdownList struct { + GroupPolicyUploadedPresentation + // Localized string value identifying the default choice of the list of items. + defaultItem GroupPolicyPresentationDropdownListItemable + // Represents a set of localized display names and their associated values. + items []GroupPolicyPresentationDropdownListItemable + // Requirement to enter a value in the parameter box. The default value is false. + required *bool +} +// NewGroupPolicyPresentationDropdownList instantiates a new GroupPolicyPresentationDropdownList and sets the default values. +func NewGroupPolicyPresentationDropdownList()(*GroupPolicyPresentationDropdownList) { + m := &GroupPolicyPresentationDropdownList{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationDropdownList"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationDropdownListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDropdownListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDropdownList(), nil +} +// GetDefaultItem gets the defaultItem property value. Localized string value identifying the default choice of the list of items. +func (m *GroupPolicyPresentationDropdownList) GetDefaultItem()(GroupPolicyPresentationDropdownListItemable) { + return m.defaultItem +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDropdownList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyPresentationDropdownListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultItem(val.(GroupPolicyPresentationDropdownListItemable)) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationDropdownListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationDropdownListItemable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationDropdownListItemable) + } + m.SetItems(res) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + return res +} +// GetItems gets the items property value. Represents a set of localized display names and their associated values. +func (m *GroupPolicyPresentationDropdownList) GetItems()([]GroupPolicyPresentationDropdownListItemable) { + return m.items +} +// GetRequired gets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationDropdownList) GetRequired()(*bool) { + return m.required +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDropdownList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("defaultItem", m.GetDefaultItem()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultItem sets the defaultItem property value. Localized string value identifying the default choice of the list of items. +func (m *GroupPolicyPresentationDropdownList) SetDefaultItem(value GroupPolicyPresentationDropdownListItemable)() { + m.defaultItem = value +} +// SetItems sets the items property value. Represents a set of localized display names and their associated values. +func (m *GroupPolicyPresentationDropdownList) SetItems(value []GroupPolicyPresentationDropdownListItemable)() { + m.items = value +} +// SetRequired sets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationDropdownList) SetRequired(value *bool)() { + m.required = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_response.go new file mode 100644 index 000000000..d9f631e33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListCollectionResponse +type GroupPolicyPresentationDropdownListCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationDropdownListable +} +// NewGroupPolicyPresentationDropdownListCollectionResponse instantiates a new GroupPolicyPresentationDropdownListCollectionResponse and sets the default values. +func NewGroupPolicyPresentationDropdownListCollectionResponse()(*GroupPolicyPresentationDropdownListCollectionResponse) { + m := &GroupPolicyPresentationDropdownListCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationDropdownListCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDropdownListCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDropdownListCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDropdownListCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationDropdownListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationDropdownListable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationDropdownListable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationDropdownListCollectionResponse) GetValue()([]GroupPolicyPresentationDropdownListable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDropdownListCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationDropdownListCollectionResponse) SetValue(value []GroupPolicyPresentationDropdownListable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_responseable.go new file mode 100644 index 000000000..29cc407c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListCollectionResponseable +type GroupPolicyPresentationDropdownListCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationDropdownListable) + SetValue(value []GroupPolicyPresentationDropdownListable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item.go new file mode 100644 index 000000000..c1a408e88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListItem +type GroupPolicyPresentationDropdownListItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Localized display name for the drop-down list item. + displayName *string + // The OdataType property + odataType *string + // Associated value for the drop-down list item + value *string +} +// NewGroupPolicyPresentationDropdownListItem instantiates a new groupPolicyPresentationDropdownListItem and sets the default values. +func NewGroupPolicyPresentationDropdownListItem()(*GroupPolicyPresentationDropdownListItem) { + m := &GroupPolicyPresentationDropdownListItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGroupPolicyPresentationDropdownListItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDropdownListItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDropdownListItem(), 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 *GroupPolicyPresentationDropdownListItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Localized display name for the drop-down list item. +func (m *GroupPolicyPresentationDropdownListItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDropdownListItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GroupPolicyPresentationDropdownListItem) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Associated value for the drop-down list item +func (m *GroupPolicyPresentationDropdownListItem) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDropdownListItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + 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 *GroupPolicyPresentationDropdownListItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Localized display name for the drop-down list item. +func (m *GroupPolicyPresentationDropdownListItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GroupPolicyPresentationDropdownListItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Associated value for the drop-down list item +func (m *GroupPolicyPresentationDropdownListItem) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_response.go new file mode 100644 index 000000000..b142ce379 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListItemCollectionResponse +type GroupPolicyPresentationDropdownListItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationDropdownListItemable +} +// NewGroupPolicyPresentationDropdownListItemCollectionResponse instantiates a new GroupPolicyPresentationDropdownListItemCollectionResponse and sets the default values. +func NewGroupPolicyPresentationDropdownListItemCollectionResponse()(*GroupPolicyPresentationDropdownListItemCollectionResponse) { + m := &GroupPolicyPresentationDropdownListItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationDropdownListItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationDropdownListItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationDropdownListItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationDropdownListItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationDropdownListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationDropdownListItemable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationDropdownListItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationDropdownListItemCollectionResponse) GetValue()([]GroupPolicyPresentationDropdownListItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationDropdownListItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationDropdownListItemCollectionResponse) SetValue(value []GroupPolicyPresentationDropdownListItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_responseable.go new file mode 100644 index 000000000..042d40450 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListItemCollectionResponseable +type GroupPolicyPresentationDropdownListItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationDropdownListItemable) + SetValue(value []GroupPolicyPresentationDropdownListItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_itemable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_itemable.go new file mode 100644 index 000000000..aacd8d331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_list_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListItemable +type GroupPolicyPresentationDropdownListItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_listable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_listable.go new file mode 100644 index 000000000..ed685f801 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_dropdown_listable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationDropdownListable +type GroupPolicyPresentationDropdownListable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultItem()(GroupPolicyPresentationDropdownListItemable) + GetItems()([]GroupPolicyPresentationDropdownListItemable) + GetRequired()(*bool) + SetDefaultItem(value GroupPolicyPresentationDropdownListItemable)() + SetItems(value []GroupPolicyPresentationDropdownListItemable)() + SetRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box.go new file mode 100644 index 000000000..a318e2928 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationListBox +type GroupPolicyPresentationListBox struct { + GroupPolicyUploadedPresentation + // If this option is specified true the user must specify the registry subkey value and the registry subkey name. The list box shows two columns, one for the name and one for the data. The default value is false. + explicitValue *bool + // Not yet documented + valuePrefix *string +} +// NewGroupPolicyPresentationListBox instantiates a new GroupPolicyPresentationListBox and sets the default values. +func NewGroupPolicyPresentationListBox()(*GroupPolicyPresentationListBox) { + m := &GroupPolicyPresentationListBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationListBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationListBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationListBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationListBox(), nil +} +// GetExplicitValue gets the explicitValue property value. If this option is specified true the user must specify the registry subkey value and the registry subkey name. The list box shows two columns, one for the name and one for the data. The default value is false. +func (m *GroupPolicyPresentationListBox) GetExplicitValue()(*bool) { + return m.explicitValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationListBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["explicitValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetExplicitValue(val) + } + return nil + } + res["valuePrefix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValuePrefix(val) + } + return nil + } + return res +} +// GetValuePrefix gets the valuePrefix property value. Not yet documented +func (m *GroupPolicyPresentationListBox) GetValuePrefix()(*string) { + return m.valuePrefix +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationListBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("explicitValue", m.GetExplicitValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("valuePrefix", m.GetValuePrefix()) + if err != nil { + return err + } + } + return nil +} +// SetExplicitValue sets the explicitValue property value. If this option is specified true the user must specify the registry subkey value and the registry subkey name. The list box shows two columns, one for the name and one for the data. The default value is false. +func (m *GroupPolicyPresentationListBox) SetExplicitValue(value *bool)() { + m.explicitValue = value +} +// SetValuePrefix sets the valuePrefix property value. Not yet documented +func (m *GroupPolicyPresentationListBox) SetValuePrefix(value *string)() { + m.valuePrefix = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_response.go new file mode 100644 index 000000000..0aa78c108 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationListBoxCollectionResponse +type GroupPolicyPresentationListBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationListBoxable +} +// NewGroupPolicyPresentationListBoxCollectionResponse instantiates a new GroupPolicyPresentationListBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationListBoxCollectionResponse()(*GroupPolicyPresentationListBoxCollectionResponse) { + m := &GroupPolicyPresentationListBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationListBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationListBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationListBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationListBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationListBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationListBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationListBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationListBoxCollectionResponse) GetValue()([]GroupPolicyPresentationListBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationListBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationListBoxCollectionResponse) SetValue(value []GroupPolicyPresentationListBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_responseable.go new file mode 100644 index 000000000..3bf2aa720 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationListBoxCollectionResponseable +type GroupPolicyPresentationListBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationListBoxable) + SetValue(value []GroupPolicyPresentationListBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_boxable.go new file mode 100644 index 000000000..761e6edda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_list_boxable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationListBoxable +type GroupPolicyPresentationListBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExplicitValue()(*bool) + GetValuePrefix()(*string) + SetExplicitValue(value *bool)() + SetValuePrefix(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box.go new file mode 100644 index 000000000..10656a7c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationLongDecimalTextBox +type GroupPolicyPresentationLongDecimalTextBox struct { + GroupPolicyUploadedPresentation + // An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. + defaultValue *int64 + // An unsigned long that specifies the maximum allowed value. The default value is 9999. + maxValue *int64 + // An unsigned long that specifies the minimum allowed value. The default value is 0. + minValue *int64 + // Requirement to enter a value in the parameter box. The default value is false. + required *bool + // If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. + spin *bool + // An unsigned integer that specifies the increment of change for the spin control. The default value is 1. + spinStep *int64 +} +// NewGroupPolicyPresentationLongDecimalTextBox instantiates a new GroupPolicyPresentationLongDecimalTextBox and sets the default values. +func NewGroupPolicyPresentationLongDecimalTextBox()(*GroupPolicyPresentationLongDecimalTextBox) { + m := &GroupPolicyPresentationLongDecimalTextBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationLongDecimalTextBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationLongDecimalTextBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationLongDecimalTextBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationLongDecimalTextBox(), nil +} +// GetDefaultValue gets the defaultValue property value. An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetDefaultValue()(*int64) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationLongDecimalTextBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["maxValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxValue(val) + } + return nil + } + res["minValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinValue(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + res["spin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSpin(val) + } + return nil + } + res["spinStep"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSpinStep(val) + } + return nil + } + return res +} +// GetMaxValue gets the maxValue property value. An unsigned long that specifies the maximum allowed value. The default value is 9999. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetMaxValue()(*int64) { + return m.maxValue +} +// GetMinValue gets the minValue property value. An unsigned long that specifies the minimum allowed value. The default value is 0. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetMinValue()(*int64) { + return m.minValue +} +// GetRequired gets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetRequired()(*bool) { + return m.required +} +// GetSpin gets the spin property value. If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetSpin()(*bool) { + return m.spin +} +// GetSpinStep gets the spinStep property value. An unsigned integer that specifies the increment of change for the spin control. The default value is 1. +func (m *GroupPolicyPresentationLongDecimalTextBox) GetSpinStep()(*int64) { + return m.spinStep +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationLongDecimalTextBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maxValue", m.GetMaxValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("minValue", m.GetMinValue()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("spin", m.GetSpin()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("spinStep", m.GetSpinStep()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. An unsigned integer that specifies the initial value for the decimal text box. The default value is 1. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetDefaultValue(value *int64)() { + m.defaultValue = value +} +// SetMaxValue sets the maxValue property value. An unsigned long that specifies the maximum allowed value. The default value is 9999. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetMaxValue(value *int64)() { + m.maxValue = value +} +// SetMinValue sets the minValue property value. An unsigned long that specifies the minimum allowed value. The default value is 0. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetMinValue(value *int64)() { + m.minValue = value +} +// SetRequired sets the required property value. Requirement to enter a value in the parameter box. The default value is false. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetRequired(value *bool)() { + m.required = value +} +// SetSpin sets the spin property value. If true, create a spin control; otherwise, create a text box for numeric entry. The default value is true. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetSpin(value *bool)() { + m.spin = value +} +// SetSpinStep sets the spinStep property value. An unsigned integer that specifies the increment of change for the spin control. The default value is 1. +func (m *GroupPolicyPresentationLongDecimalTextBox) SetSpinStep(value *int64)() { + m.spinStep = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_response.go new file mode 100644 index 000000000..553263dae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationLongDecimalTextBoxCollectionResponse +type GroupPolicyPresentationLongDecimalTextBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationLongDecimalTextBoxable +} +// NewGroupPolicyPresentationLongDecimalTextBoxCollectionResponse instantiates a new GroupPolicyPresentationLongDecimalTextBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationLongDecimalTextBoxCollectionResponse()(*GroupPolicyPresentationLongDecimalTextBoxCollectionResponse) { + m := &GroupPolicyPresentationLongDecimalTextBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationLongDecimalTextBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationLongDecimalTextBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationLongDecimalTextBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationLongDecimalTextBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationLongDecimalTextBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationLongDecimalTextBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationLongDecimalTextBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationLongDecimalTextBoxCollectionResponse) GetValue()([]GroupPolicyPresentationLongDecimalTextBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationLongDecimalTextBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationLongDecimalTextBoxCollectionResponse) SetValue(value []GroupPolicyPresentationLongDecimalTextBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_responseable.go new file mode 100644 index 000000000..c2e205346 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationLongDecimalTextBoxCollectionResponseable +type GroupPolicyPresentationLongDecimalTextBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationLongDecimalTextBoxable) + SetValue(value []GroupPolicyPresentationLongDecimalTextBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_boxable.go new file mode 100644 index 000000000..11ffb6497 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_long_decimal_text_boxable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationLongDecimalTextBoxable +type GroupPolicyPresentationLongDecimalTextBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*int64) + GetMaxValue()(*int64) + GetMinValue()(*int64) + GetRequired()(*bool) + GetSpin()(*bool) + GetSpinStep()(*int64) + SetDefaultValue(value *int64)() + SetMaxValue(value *int64)() + SetMinValue(value *int64)() + SetRequired(value *bool)() + SetSpin(value *bool)() + SetSpinStep(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box.go new file mode 100644 index 000000000..6ae1d562d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationMultiTextBox +type GroupPolicyPresentationMultiTextBox struct { + GroupPolicyUploadedPresentation + // An unsigned integer that specifies the maximum number of text characters. Default value is 1023. + maxLength *int64 + // An unsigned integer that specifies the maximum number of strings. Default value is 0. + maxStrings *int64 + // Requirement to enter a value in the text box. Default value is false. + required *bool +} +// NewGroupPolicyPresentationMultiTextBox instantiates a new GroupPolicyPresentationMultiTextBox and sets the default values. +func NewGroupPolicyPresentationMultiTextBox()(*GroupPolicyPresentationMultiTextBox) { + m := &GroupPolicyPresentationMultiTextBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationMultiTextBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationMultiTextBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationMultiTextBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationMultiTextBox(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationMultiTextBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["maxLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxLength(val) + } + return nil + } + res["maxStrings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxStrings(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + return res +} +// GetMaxLength gets the maxLength property value. An unsigned integer that specifies the maximum number of text characters. Default value is 1023. +func (m *GroupPolicyPresentationMultiTextBox) GetMaxLength()(*int64) { + return m.maxLength +} +// GetMaxStrings gets the maxStrings property value. An unsigned integer that specifies the maximum number of strings. Default value is 0. +func (m *GroupPolicyPresentationMultiTextBox) GetMaxStrings()(*int64) { + return m.maxStrings +} +// GetRequired gets the required property value. Requirement to enter a value in the text box. Default value is false. +func (m *GroupPolicyPresentationMultiTextBox) GetRequired()(*bool) { + return m.required +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationMultiTextBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("maxLength", m.GetMaxLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maxStrings", m.GetMaxStrings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + return nil +} +// SetMaxLength sets the maxLength property value. An unsigned integer that specifies the maximum number of text characters. Default value is 1023. +func (m *GroupPolicyPresentationMultiTextBox) SetMaxLength(value *int64)() { + m.maxLength = value +} +// SetMaxStrings sets the maxStrings property value. An unsigned integer that specifies the maximum number of strings. Default value is 0. +func (m *GroupPolicyPresentationMultiTextBox) SetMaxStrings(value *int64)() { + m.maxStrings = value +} +// SetRequired sets the required property value. Requirement to enter a value in the text box. Default value is false. +func (m *GroupPolicyPresentationMultiTextBox) SetRequired(value *bool)() { + m.required = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_response.go new file mode 100644 index 000000000..6b5c10c70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationMultiTextBoxCollectionResponse +type GroupPolicyPresentationMultiTextBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationMultiTextBoxable +} +// NewGroupPolicyPresentationMultiTextBoxCollectionResponse instantiates a new GroupPolicyPresentationMultiTextBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationMultiTextBoxCollectionResponse()(*GroupPolicyPresentationMultiTextBoxCollectionResponse) { + m := &GroupPolicyPresentationMultiTextBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationMultiTextBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationMultiTextBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationMultiTextBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationMultiTextBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationMultiTextBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationMultiTextBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationMultiTextBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationMultiTextBoxCollectionResponse) GetValue()([]GroupPolicyPresentationMultiTextBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationMultiTextBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationMultiTextBoxCollectionResponse) SetValue(value []GroupPolicyPresentationMultiTextBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_responseable.go new file mode 100644 index 000000000..d5e7f8d61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationMultiTextBoxCollectionResponseable +type GroupPolicyPresentationMultiTextBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationMultiTextBoxable) + SetValue(value []GroupPolicyPresentationMultiTextBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_boxable.go new file mode 100644 index 000000000..9d8de1917 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_multi_text_boxable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationMultiTextBoxable +type GroupPolicyPresentationMultiTextBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxLength()(*int64) + GetMaxStrings()(*int64) + GetRequired()(*bool) + SetMaxLength(value *int64)() + SetMaxStrings(value *int64)() + SetRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text.go new file mode 100644 index 000000000..4183410f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationText +type GroupPolicyPresentationText struct { + GroupPolicyUploadedPresentation +} +// NewGroupPolicyPresentationText instantiates a new GroupPolicyPresentationText and sets the default values. +func NewGroupPolicyPresentationText()(*GroupPolicyPresentationText) { + m := &GroupPolicyPresentationText{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationText"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationTextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationTextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationText(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationText) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationText) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box.go new file mode 100644 index 000000000..9334b4aa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextBox +type GroupPolicyPresentationTextBox struct { + GroupPolicyUploadedPresentation + // Localized default string displayed in the text box. The default value is empty. + defaultValue *string + // An unsigned integer that specifies the maximum number of text characters. Default value is 1023. + maxLength *int64 + // Requirement to enter a value in the text box. Default value is false. + required *bool +} +// NewGroupPolicyPresentationTextBox instantiates a new GroupPolicyPresentationTextBox and sets the default values. +func NewGroupPolicyPresentationTextBox()(*GroupPolicyPresentationTextBox) { + m := &GroupPolicyPresentationTextBox{ + GroupPolicyUploadedPresentation: *NewGroupPolicyUploadedPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyPresentationTextBox"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyPresentationTextBoxFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationTextBoxFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationTextBox(), nil +} +// GetDefaultValue gets the defaultValue property value. Localized default string displayed in the text box. The default value is empty. +func (m *GroupPolicyPresentationTextBox) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationTextBox) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyUploadedPresentation.GetFieldDeserializers() + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["maxLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxLength(val) + } + return nil + } + res["required"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequired(val) + } + return nil + } + return res +} +// GetMaxLength gets the maxLength property value. An unsigned integer that specifies the maximum number of text characters. Default value is 1023. +func (m *GroupPolicyPresentationTextBox) GetMaxLength()(*int64) { + return m.maxLength +} +// GetRequired gets the required property value. Requirement to enter a value in the text box. Default value is false. +func (m *GroupPolicyPresentationTextBox) GetRequired()(*bool) { + return m.required +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationTextBox) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyUploadedPresentation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("maxLength", m.GetMaxLength()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("required", m.GetRequired()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultValue sets the defaultValue property value. Localized default string displayed in the text box. The default value is empty. +func (m *GroupPolicyPresentationTextBox) SetDefaultValue(value *string)() { + m.defaultValue = value +} +// SetMaxLength sets the maxLength property value. An unsigned integer that specifies the maximum number of text characters. Default value is 1023. +func (m *GroupPolicyPresentationTextBox) SetMaxLength(value *int64)() { + m.maxLength = value +} +// SetRequired sets the required property value. Requirement to enter a value in the text box. Default value is false. +func (m *GroupPolicyPresentationTextBox) SetRequired(value *bool)() { + m.required = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_response.go new file mode 100644 index 000000000..51103df6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextBoxCollectionResponse +type GroupPolicyPresentationTextBoxCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationTextBoxable +} +// NewGroupPolicyPresentationTextBoxCollectionResponse instantiates a new GroupPolicyPresentationTextBoxCollectionResponse and sets the default values. +func NewGroupPolicyPresentationTextBoxCollectionResponse()(*GroupPolicyPresentationTextBoxCollectionResponse) { + m := &GroupPolicyPresentationTextBoxCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationTextBoxCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationTextBoxCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationTextBoxCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationTextBoxCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationTextBoxFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationTextBoxable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationTextBoxable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationTextBoxCollectionResponse) GetValue()([]GroupPolicyPresentationTextBoxable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationTextBoxCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationTextBoxCollectionResponse) SetValue(value []GroupPolicyPresentationTextBoxable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_responseable.go new file mode 100644 index 000000000..b3b4ed311 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_box_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextBoxCollectionResponseable +type GroupPolicyPresentationTextBoxCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationTextBoxable) + SetValue(value []GroupPolicyPresentationTextBoxable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_boxable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_boxable.go new file mode 100644 index 000000000..a2f97da86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_boxable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextBoxable +type GroupPolicyPresentationTextBoxable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*string) + GetMaxLength()(*int64) + GetRequired()(*bool) + SetDefaultValue(value *string)() + SetMaxLength(value *int64)() + SetRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_response.go new file mode 100644 index 000000000..f290a3ac6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextCollectionResponse +type GroupPolicyPresentationTextCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationTextable +} +// NewGroupPolicyPresentationTextCollectionResponse instantiates a new GroupPolicyPresentationTextCollectionResponse and sets the default values. +func NewGroupPolicyPresentationTextCollectionResponse()(*GroupPolicyPresentationTextCollectionResponse) { + m := &GroupPolicyPresentationTextCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationTextCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationTextCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationTextCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationTextCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationTextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationTextable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationTextable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationTextCollectionResponse) GetValue()([]GroupPolicyPresentationTextable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationTextCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationTextCollectionResponse) SetValue(value []GroupPolicyPresentationTextable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_responseable.go new file mode 100644 index 000000000..a67a0b044 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_text_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextCollectionResponseable +type GroupPolicyPresentationTextCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationTextable) + SetValue(value []GroupPolicyPresentationTextable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_textable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_textable.go new file mode 100644 index 000000000..4f91ff83b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_textable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationTextable +type GroupPolicyPresentationTextable interface { + GroupPolicyUploadedPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value.go new file mode 100644 index 000000000..63b2bb815 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value.go @@ -0,0 +1,167 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValue the base presentation value entity that stores the value for a single group policy presentation. +type GroupPolicyPresentationValue struct { + Entity + // The date and time the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The group policy definition value associated with the presentation value. + definitionValue GroupPolicyDefinitionValueable + // The date and time the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The group policy presentation associated with the presentation value. + presentation GroupPolicyPresentationable +} +// NewGroupPolicyPresentationValue instantiates a new groupPolicyPresentationValue and sets the default values. +func NewGroupPolicyPresentationValue()(*GroupPolicyPresentationValue) { + m := &GroupPolicyPresentationValue{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicyPresentationValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupPolicyPresentationValueBoolean": + return NewGroupPolicyPresentationValueBoolean(), nil + case "#microsoft.graph.groupPolicyPresentationValueDecimal": + return NewGroupPolicyPresentationValueDecimal(), nil + case "#microsoft.graph.groupPolicyPresentationValueList": + return NewGroupPolicyPresentationValueList(), nil + case "#microsoft.graph.groupPolicyPresentationValueLongDecimal": + return NewGroupPolicyPresentationValueLongDecimal(), nil + case "#microsoft.graph.groupPolicyPresentationValueMultiText": + return NewGroupPolicyPresentationValueMultiText(), nil + case "#microsoft.graph.groupPolicyPresentationValueText": + return NewGroupPolicyPresentationValueText(), nil + } + } + } + } + return NewGroupPolicyPresentationValue(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyPresentationValue) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefinitionValue gets the definitionValue property value. The group policy definition value associated with the presentation value. +func (m *GroupPolicyPresentationValue) GetDefinitionValue()(GroupPolicyDefinitionValueable) { + return m.definitionValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["definitionValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyDefinitionValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinitionValue(val.(GroupPolicyDefinitionValueable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["presentation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupPolicyPresentationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPresentation(val.(GroupPolicyPresentationable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the object was last modified. +func (m *GroupPolicyPresentationValue) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPresentation gets the presentation property value. The group policy presentation associated with the presentation value. +func (m *GroupPolicyPresentationValue) GetPresentation()(GroupPolicyPresentationable) { + return m.presentation +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definitionValue", m.GetDefinitionValue()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("presentation", m.GetPresentation()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the object was created. +func (m *GroupPolicyPresentationValue) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefinitionValue sets the definitionValue property value. The group policy definition value associated with the presentation value. +func (m *GroupPolicyPresentationValue) SetDefinitionValue(value GroupPolicyDefinitionValueable)() { + m.definitionValue = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the object was last modified. +func (m *GroupPolicyPresentationValue) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPresentation sets the presentation property value. The group policy presentation associated with the presentation value. +func (m *GroupPolicyPresentationValue) SetPresentation(value GroupPolicyPresentationable)() { + m.presentation = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean.go new file mode 100644 index 000000000..d16d3909d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueBoolean +type GroupPolicyPresentationValueBoolean struct { + GroupPolicyPresentationValue + // An boolean value for the associated presentation. + value *bool +} +// NewGroupPolicyPresentationValueBoolean instantiates a new GroupPolicyPresentationValueBoolean and sets the default values. +func NewGroupPolicyPresentationValueBoolean()(*GroupPolicyPresentationValueBoolean) { + m := &GroupPolicyPresentationValueBoolean{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueBooleanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueBooleanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueBoolean(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueBoolean) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. An boolean value for the associated presentation. +func (m *GroupPolicyPresentationValueBoolean) GetValue()(*bool) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueBoolean) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. An boolean value for the associated presentation. +func (m *GroupPolicyPresentationValueBoolean) SetValue(value *bool)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_response.go new file mode 100644 index 000000000..3dd6697f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueBooleanCollectionResponse +type GroupPolicyPresentationValueBooleanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueBooleanable +} +// NewGroupPolicyPresentationValueBooleanCollectionResponse instantiates a new GroupPolicyPresentationValueBooleanCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueBooleanCollectionResponse()(*GroupPolicyPresentationValueBooleanCollectionResponse) { + m := &GroupPolicyPresentationValueBooleanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueBooleanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueBooleanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueBooleanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueBooleanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueBooleanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueBooleanable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueBooleanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueBooleanCollectionResponse) GetValue()([]GroupPolicyPresentationValueBooleanable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueBooleanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueBooleanCollectionResponse) SetValue(value []GroupPolicyPresentationValueBooleanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_responseable.go new file mode 100644 index 000000000..9c22549ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_boolean_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueBooleanCollectionResponseable +type GroupPolicyPresentationValueBooleanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueBooleanable) + SetValue(value []GroupPolicyPresentationValueBooleanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_booleanable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_booleanable.go new file mode 100644 index 000000000..505fd4c5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_booleanable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueBooleanable +type GroupPolicyPresentationValueBooleanable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_response.go new file mode 100644 index 000000000..58e88cd6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueCollectionResponse +type GroupPolicyPresentationValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueable +} +// NewGroupPolicyPresentationValueCollectionResponse instantiates a new GroupPolicyPresentationValueCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueCollectionResponse()(*GroupPolicyPresentationValueCollectionResponse) { + m := &GroupPolicyPresentationValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueCollectionResponse) GetValue()([]GroupPolicyPresentationValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueCollectionResponse) SetValue(value []GroupPolicyPresentationValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_responseable.go new file mode 100644 index 000000000..6a5f55bfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueCollectionResponseable +type GroupPolicyPresentationValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueable) + SetValue(value []GroupPolicyPresentationValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal.go new file mode 100644 index 000000000..116a1c354 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueDecimal +type GroupPolicyPresentationValueDecimal struct { + GroupPolicyPresentationValue + // An unsigned integer value for the associated presentation. + value *int64 +} +// NewGroupPolicyPresentationValueDecimal instantiates a new GroupPolicyPresentationValueDecimal and sets the default values. +func NewGroupPolicyPresentationValueDecimal()(*GroupPolicyPresentationValueDecimal) { + m := &GroupPolicyPresentationValueDecimal{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueDecimalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueDecimalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueDecimal(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueDecimal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. An unsigned integer value for the associated presentation. +func (m *GroupPolicyPresentationValueDecimal) GetValue()(*int64) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueDecimal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. An unsigned integer value for the associated presentation. +func (m *GroupPolicyPresentationValueDecimal) SetValue(value *int64)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_response.go new file mode 100644 index 000000000..b8f3466ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueDecimalCollectionResponse +type GroupPolicyPresentationValueDecimalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueDecimalable +} +// NewGroupPolicyPresentationValueDecimalCollectionResponse instantiates a new GroupPolicyPresentationValueDecimalCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueDecimalCollectionResponse()(*GroupPolicyPresentationValueDecimalCollectionResponse) { + m := &GroupPolicyPresentationValueDecimalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueDecimalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueDecimalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueDecimalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueDecimalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueDecimalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueDecimalable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueDecimalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueDecimalCollectionResponse) GetValue()([]GroupPolicyPresentationValueDecimalable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueDecimalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueDecimalCollectionResponse) SetValue(value []GroupPolicyPresentationValueDecimalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_responseable.go new file mode 100644 index 000000000..cc876d7d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueDecimalCollectionResponseable +type GroupPolicyPresentationValueDecimalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueDecimalable) + SetValue(value []GroupPolicyPresentationValueDecimalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimalable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimalable.go new file mode 100644 index 000000000..2a199e73d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_decimalable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueDecimalable +type GroupPolicyPresentationValueDecimalable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*int64) + SetValue(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list.go new file mode 100644 index 000000000..5874fbf80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueList +type GroupPolicyPresentationValueList struct { + GroupPolicyPresentationValue + // A list of pairs for the associated presentation. + values []KeyValuePairable +} +// NewGroupPolicyPresentationValueList instantiates a new GroupPolicyPresentationValueList and sets the default values. +func NewGroupPolicyPresentationValueList()(*GroupPolicyPresentationValueList) { + m := &GroupPolicyPresentationValueList{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueList(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetValues gets the values property value. A list of pairs for the associated presentation. +func (m *GroupPolicyPresentationValueList) GetValues()([]KeyValuePairable) { + return m.values +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + if m.GetValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValues())) + for i, v := range m.GetValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("values", cast) + if err != nil { + return err + } + } + return nil +} +// SetValues sets the values property value. A list of pairs for the associated presentation. +func (m *GroupPolicyPresentationValueList) SetValues(value []KeyValuePairable)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_response.go new file mode 100644 index 000000000..7026dd286 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueListCollectionResponse +type GroupPolicyPresentationValueListCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueListable +} +// NewGroupPolicyPresentationValueListCollectionResponse instantiates a new GroupPolicyPresentationValueListCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueListCollectionResponse()(*GroupPolicyPresentationValueListCollectionResponse) { + m := &GroupPolicyPresentationValueListCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueListCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueListCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueListCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueListCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueListable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueListable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueListCollectionResponse) GetValue()([]GroupPolicyPresentationValueListable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueListCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueListCollectionResponse) SetValue(value []GroupPolicyPresentationValueListable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_responseable.go new file mode 100644 index 000000000..07ed1e236 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_list_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueListCollectionResponseable +type GroupPolicyPresentationValueListCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueListable) + SetValue(value []GroupPolicyPresentationValueListable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_listable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_listable.go new file mode 100644 index 000000000..cddc3a1ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_listable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueListable +type GroupPolicyPresentationValueListable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValues()([]KeyValuePairable) + SetValues(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal.go new file mode 100644 index 000000000..9250a7287 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueLongDecimal +type GroupPolicyPresentationValueLongDecimal struct { + GroupPolicyPresentationValue + // An unsigned long value for the associated presentation. + value *int64 +} +// NewGroupPolicyPresentationValueLongDecimal instantiates a new GroupPolicyPresentationValueLongDecimal and sets the default values. +func NewGroupPolicyPresentationValueLongDecimal()(*GroupPolicyPresentationValueLongDecimal) { + m := &GroupPolicyPresentationValueLongDecimal{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueLongDecimalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueLongDecimalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueLongDecimal(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueLongDecimal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. An unsigned long value for the associated presentation. +func (m *GroupPolicyPresentationValueLongDecimal) GetValue()(*int64) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueLongDecimal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. An unsigned long value for the associated presentation. +func (m *GroupPolicyPresentationValueLongDecimal) SetValue(value *int64)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_response.go new file mode 100644 index 000000000..f37fc40c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueLongDecimalCollectionResponse +type GroupPolicyPresentationValueLongDecimalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueLongDecimalable +} +// NewGroupPolicyPresentationValueLongDecimalCollectionResponse instantiates a new GroupPolicyPresentationValueLongDecimalCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueLongDecimalCollectionResponse()(*GroupPolicyPresentationValueLongDecimalCollectionResponse) { + m := &GroupPolicyPresentationValueLongDecimalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueLongDecimalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueLongDecimalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueLongDecimalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueLongDecimalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueLongDecimalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueLongDecimalable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueLongDecimalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueLongDecimalCollectionResponse) GetValue()([]GroupPolicyPresentationValueLongDecimalable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueLongDecimalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueLongDecimalCollectionResponse) SetValue(value []GroupPolicyPresentationValueLongDecimalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_responseable.go new file mode 100644 index 000000000..bd51d567e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueLongDecimalCollectionResponseable +type GroupPolicyPresentationValueLongDecimalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueLongDecimalable) + SetValue(value []GroupPolicyPresentationValueLongDecimalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimalable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimalable.go new file mode 100644 index 000000000..bd94a07d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_long_decimalable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueLongDecimalable +type GroupPolicyPresentationValueLongDecimalable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*int64) + SetValue(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text.go new file mode 100644 index 000000000..1223f8a99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueMultiText +type GroupPolicyPresentationValueMultiText struct { + GroupPolicyPresentationValue + // A collection of non-empty strings for the associated presentation. + values []string +} +// NewGroupPolicyPresentationValueMultiText instantiates a new GroupPolicyPresentationValueMultiText and sets the default values. +func NewGroupPolicyPresentationValueMultiText()(*GroupPolicyPresentationValueMultiText) { + m := &GroupPolicyPresentationValueMultiText{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueMultiTextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueMultiTextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueMultiText(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueMultiText) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + res["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetValues(res) + } + return nil + } + return res +} +// GetValues gets the values property value. A collection of non-empty strings for the associated presentation. +func (m *GroupPolicyPresentationValueMultiText) GetValues()([]string) { + return m.values +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueMultiText) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + if m.GetValues() != nil { + err = writer.WriteCollectionOfStringValues("values", m.GetValues()) + if err != nil { + return err + } + } + return nil +} +// SetValues sets the values property value. A collection of non-empty strings for the associated presentation. +func (m *GroupPolicyPresentationValueMultiText) SetValues(value []string)() { + m.values = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_response.go new file mode 100644 index 000000000..7dbda6b2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueMultiTextCollectionResponse +type GroupPolicyPresentationValueMultiTextCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueMultiTextable +} +// NewGroupPolicyPresentationValueMultiTextCollectionResponse instantiates a new GroupPolicyPresentationValueMultiTextCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueMultiTextCollectionResponse()(*GroupPolicyPresentationValueMultiTextCollectionResponse) { + m := &GroupPolicyPresentationValueMultiTextCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueMultiTextCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueMultiTextCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueMultiTextCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueMultiTextCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueMultiTextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueMultiTextable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueMultiTextable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueMultiTextCollectionResponse) GetValue()([]GroupPolicyPresentationValueMultiTextable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueMultiTextCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueMultiTextCollectionResponse) SetValue(value []GroupPolicyPresentationValueMultiTextable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_responseable.go new file mode 100644 index 000000000..a34bf5632 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_text_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueMultiTextCollectionResponseable +type GroupPolicyPresentationValueMultiTextCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueMultiTextable) + SetValue(value []GroupPolicyPresentationValueMultiTextable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_textable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_textable.go new file mode 100644 index 000000000..f270805ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_multi_textable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueMultiTextable +type GroupPolicyPresentationValueMultiTextable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValues()([]string) + SetValues(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text.go new file mode 100644 index 000000000..624105537 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueText +type GroupPolicyPresentationValueText struct { + GroupPolicyPresentationValue + // A string value for the associated presentation. + value *string +} +// NewGroupPolicyPresentationValueText instantiates a new GroupPolicyPresentationValueText and sets the default values. +func NewGroupPolicyPresentationValueText()(*GroupPolicyPresentationValueText) { + m := &GroupPolicyPresentationValueText{ + GroupPolicyPresentationValue: *NewGroupPolicyPresentationValue(), + } + return m +} +// CreateGroupPolicyPresentationValueTextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueTextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueText(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueText) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentationValue.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. A string value for the associated presentation. +func (m *GroupPolicyPresentationValueText) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueText) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentationValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. A string value for the associated presentation. +func (m *GroupPolicyPresentationValueText) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_response.go new file mode 100644 index 000000000..51521c91e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueTextCollectionResponse +type GroupPolicyPresentationValueTextCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyPresentationValueTextable +} +// NewGroupPolicyPresentationValueTextCollectionResponse instantiates a new GroupPolicyPresentationValueTextCollectionResponse and sets the default values. +func NewGroupPolicyPresentationValueTextCollectionResponse()(*GroupPolicyPresentationValueTextCollectionResponse) { + m := &GroupPolicyPresentationValueTextCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyPresentationValueTextCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyPresentationValueTextCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyPresentationValueTextCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyPresentationValueTextCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyPresentationValueTextFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyPresentationValueTextable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyPresentationValueTextable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyPresentationValueTextCollectionResponse) GetValue()([]GroupPolicyPresentationValueTextable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyPresentationValueTextCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyPresentationValueTextCollectionResponse) SetValue(value []GroupPolicyPresentationValueTextable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_responseable.go new file mode 100644 index 000000000..5f4d34b31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_text_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueTextCollectionResponseable +type GroupPolicyPresentationValueTextCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyPresentationValueTextable) + SetValue(value []GroupPolicyPresentationValueTextable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_textable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_textable.go new file mode 100644 index 000000000..9f020f7ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_value_textable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueTextable +type GroupPolicyPresentationValueTextable interface { + GroupPolicyPresentationValueable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentation_valueable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentation_valueable.go new file mode 100644 index 000000000..2c604cfd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentation_valueable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationValueable +type GroupPolicyPresentationValueable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefinitionValue()(GroupPolicyDefinitionValueable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPresentation()(GroupPolicyPresentationable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefinitionValue(value GroupPolicyDefinitionValueable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPresentation(value GroupPolicyPresentationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_presentationable.go b/src/internal/connector/graph/betasdk/models/group_policy_presentationable.go new file mode 100644 index 000000000..64dda3ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_presentationable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyPresentationable +type GroupPolicyPresentationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefinition()(GroupPolicyDefinitionable) + GetLabel()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDefinition(value GroupPolicyDefinitionable)() + SetLabel(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping.go new file mode 100644 index 000000000..31771b1fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping.go @@ -0,0 +1,565 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicySettingMapping the Group Policy setting to MDM/Intune mapping. +type GroupPolicySettingMapping struct { + Entity + // Admx Group Policy Id + admxSettingDefinitionId *string + // List of Child Ids of the group policy setting. + childIdList []string + // The Intune Setting Definition Id + intuneSettingDefinitionId *string + // The list of Intune Setting URIs this group policy setting maps to + intuneSettingUriList []string + // Indicates if the setting is supported by Intune or not + isMdmSupported *bool + // The CSP name this group policy setting maps to. + mdmCspName *string + // The minimum OS version this mdm setting supports. + mdmMinimumOSVersion *int32 + // The MDM CSP URI this group policy setting maps to. + mdmSettingUri *string + // Mdm Support Status of the setting. + mdmSupportedState *MdmSupportedState + // Parent Id of the group policy setting. + parentId *string + // The category the group policy setting is in. + settingCategory *string + // The display name of this group policy setting. + settingDisplayName *string + // The display value of this group policy setting. + settingDisplayValue *string + // The display value type of this group policy setting. + settingDisplayValueType *string + // The name of this group policy setting. + settingName *string + // Scope of the group policy setting. + settingScope *GroupPolicySettingScope + // Setting type of the group policy. + settingType *GroupPolicySettingType + // The value of this group policy setting. + settingValue *string + // The display units of this group policy setting value + settingValueDisplayUnits *string + // The value type of this group policy setting. + settingValueType *string +} +// NewGroupPolicySettingMapping instantiates a new groupPolicySettingMapping and sets the default values. +func NewGroupPolicySettingMapping()(*GroupPolicySettingMapping) { + m := &GroupPolicySettingMapping{ + Entity: *NewEntity(), + } + return m +} +// CreateGroupPolicySettingMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicySettingMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicySettingMapping(), nil +} +// GetAdmxSettingDefinitionId gets the admxSettingDefinitionId property value. Admx Group Policy Id +func (m *GroupPolicySettingMapping) GetAdmxSettingDefinitionId()(*string) { + return m.admxSettingDefinitionId +} +// GetChildIdList gets the childIdList property value. List of Child Ids of the group policy setting. +func (m *GroupPolicySettingMapping) GetChildIdList()([]string) { + return m.childIdList +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicySettingMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["admxSettingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdmxSettingDefinitionId(val) + } + return nil + } + res["childIdList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetChildIdList(res) + } + return nil + } + res["intuneSettingDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntuneSettingDefinitionId(val) + } + return nil + } + res["intuneSettingUriList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIntuneSettingUriList(res) + } + return nil + } + res["isMdmSupported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMdmSupported(val) + } + return nil + } + res["mdmCspName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdmCspName(val) + } + return nil + } + res["mdmMinimumOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMdmMinimumOSVersion(val) + } + return nil + } + res["mdmSettingUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdmSettingUri(val) + } + return nil + } + res["mdmSupportedState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMdmSupportedState) + if err != nil { + return err + } + if val != nil { + m.SetMdmSupportedState(val.(*MdmSupportedState)) + } + return nil + } + res["parentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentId(val) + } + return nil + } + res["settingCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingCategory(val) + } + return nil + } + res["settingDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDisplayName(val) + } + return nil + } + res["settingDisplayValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDisplayValue(val) + } + return nil + } + res["settingDisplayValueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingDisplayValueType(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["settingScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicySettingScope) + if err != nil { + return err + } + if val != nil { + m.SetSettingScope(val.(*GroupPolicySettingScope)) + } + return nil + } + res["settingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicySettingType) + if err != nil { + return err + } + if val != nil { + m.SetSettingType(val.(*GroupPolicySettingType)) + } + return nil + } + res["settingValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValue(val) + } + return nil + } + res["settingValueDisplayUnits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueDisplayUnits(val) + } + return nil + } + res["settingValueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingValueType(val) + } + return nil + } + return res +} +// GetIntuneSettingDefinitionId gets the intuneSettingDefinitionId property value. The Intune Setting Definition Id +func (m *GroupPolicySettingMapping) GetIntuneSettingDefinitionId()(*string) { + return m.intuneSettingDefinitionId +} +// GetIntuneSettingUriList gets the intuneSettingUriList property value. The list of Intune Setting URIs this group policy setting maps to +func (m *GroupPolicySettingMapping) GetIntuneSettingUriList()([]string) { + return m.intuneSettingUriList +} +// GetIsMdmSupported gets the isMdmSupported property value. Indicates if the setting is supported by Intune or not +func (m *GroupPolicySettingMapping) GetIsMdmSupported()(*bool) { + return m.isMdmSupported +} +// GetMdmCspName gets the mdmCspName property value. The CSP name this group policy setting maps to. +func (m *GroupPolicySettingMapping) GetMdmCspName()(*string) { + return m.mdmCspName +} +// GetMdmMinimumOSVersion gets the mdmMinimumOSVersion property value. The minimum OS version this mdm setting supports. +func (m *GroupPolicySettingMapping) GetMdmMinimumOSVersion()(*int32) { + return m.mdmMinimumOSVersion +} +// GetMdmSettingUri gets the mdmSettingUri property value. The MDM CSP URI this group policy setting maps to. +func (m *GroupPolicySettingMapping) GetMdmSettingUri()(*string) { + return m.mdmSettingUri +} +// GetMdmSupportedState gets the mdmSupportedState property value. Mdm Support Status of the setting. +func (m *GroupPolicySettingMapping) GetMdmSupportedState()(*MdmSupportedState) { + return m.mdmSupportedState +} +// GetParentId gets the parentId property value. Parent Id of the group policy setting. +func (m *GroupPolicySettingMapping) GetParentId()(*string) { + return m.parentId +} +// GetSettingCategory gets the settingCategory property value. The category the group policy setting is in. +func (m *GroupPolicySettingMapping) GetSettingCategory()(*string) { + return m.settingCategory +} +// GetSettingDisplayName gets the settingDisplayName property value. The display name of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingDisplayName()(*string) { + return m.settingDisplayName +} +// GetSettingDisplayValue gets the settingDisplayValue property value. The display value of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingDisplayValue()(*string) { + return m.settingDisplayValue +} +// GetSettingDisplayValueType gets the settingDisplayValueType property value. The display value type of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingDisplayValueType()(*string) { + return m.settingDisplayValueType +} +// GetSettingName gets the settingName property value. The name of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingName()(*string) { + return m.settingName +} +// GetSettingScope gets the settingScope property value. Scope of the group policy setting. +func (m *GroupPolicySettingMapping) GetSettingScope()(*GroupPolicySettingScope) { + return m.settingScope +} +// GetSettingType gets the settingType property value. Setting type of the group policy. +func (m *GroupPolicySettingMapping) GetSettingType()(*GroupPolicySettingType) { + return m.settingType +} +// GetSettingValue gets the settingValue property value. The value of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingValue()(*string) { + return m.settingValue +} +// GetSettingValueDisplayUnits gets the settingValueDisplayUnits property value. The display units of this group policy setting value +func (m *GroupPolicySettingMapping) GetSettingValueDisplayUnits()(*string) { + return m.settingValueDisplayUnits +} +// GetSettingValueType gets the settingValueType property value. The value type of this group policy setting. +func (m *GroupPolicySettingMapping) GetSettingValueType()(*string) { + return m.settingValueType +} +// Serialize serializes information the current object +func (m *GroupPolicySettingMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("admxSettingDefinitionId", m.GetAdmxSettingDefinitionId()) + if err != nil { + return err + } + } + if m.GetChildIdList() != nil { + err = writer.WriteCollectionOfStringValues("childIdList", m.GetChildIdList()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("intuneSettingDefinitionId", m.GetIntuneSettingDefinitionId()) + if err != nil { + return err + } + } + if m.GetIntuneSettingUriList() != nil { + err = writer.WriteCollectionOfStringValues("intuneSettingUriList", m.GetIntuneSettingUriList()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMdmSupported", m.GetIsMdmSupported()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdmCspName", m.GetMdmCspName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mdmMinimumOSVersion", m.GetMdmMinimumOSVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdmSettingUri", m.GetMdmSettingUri()) + if err != nil { + return err + } + } + if m.GetMdmSupportedState() != nil { + cast := (*m.GetMdmSupportedState()).String() + err = writer.WriteStringValue("mdmSupportedState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentId", m.GetParentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingCategory", m.GetSettingCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingDisplayName", m.GetSettingDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingDisplayValue", m.GetSettingDisplayValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingDisplayValueType", m.GetSettingDisplayValueType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetSettingScope() != nil { + cast := (*m.GetSettingScope()).String() + err = writer.WriteStringValue("settingScope", &cast) + if err != nil { + return err + } + } + if m.GetSettingType() != nil { + cast := (*m.GetSettingType()).String() + err = writer.WriteStringValue("settingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingValue", m.GetSettingValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingValueDisplayUnits", m.GetSettingValueDisplayUnits()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingValueType", m.GetSettingValueType()) + if err != nil { + return err + } + } + return nil +} +// SetAdmxSettingDefinitionId sets the admxSettingDefinitionId property value. Admx Group Policy Id +func (m *GroupPolicySettingMapping) SetAdmxSettingDefinitionId(value *string)() { + m.admxSettingDefinitionId = value +} +// SetChildIdList sets the childIdList property value. List of Child Ids of the group policy setting. +func (m *GroupPolicySettingMapping) SetChildIdList(value []string)() { + m.childIdList = value +} +// SetIntuneSettingDefinitionId sets the intuneSettingDefinitionId property value. The Intune Setting Definition Id +func (m *GroupPolicySettingMapping) SetIntuneSettingDefinitionId(value *string)() { + m.intuneSettingDefinitionId = value +} +// SetIntuneSettingUriList sets the intuneSettingUriList property value. The list of Intune Setting URIs this group policy setting maps to +func (m *GroupPolicySettingMapping) SetIntuneSettingUriList(value []string)() { + m.intuneSettingUriList = value +} +// SetIsMdmSupported sets the isMdmSupported property value. Indicates if the setting is supported by Intune or not +func (m *GroupPolicySettingMapping) SetIsMdmSupported(value *bool)() { + m.isMdmSupported = value +} +// SetMdmCspName sets the mdmCspName property value. The CSP name this group policy setting maps to. +func (m *GroupPolicySettingMapping) SetMdmCspName(value *string)() { + m.mdmCspName = value +} +// SetMdmMinimumOSVersion sets the mdmMinimumOSVersion property value. The minimum OS version this mdm setting supports. +func (m *GroupPolicySettingMapping) SetMdmMinimumOSVersion(value *int32)() { + m.mdmMinimumOSVersion = value +} +// SetMdmSettingUri sets the mdmSettingUri property value. The MDM CSP URI this group policy setting maps to. +func (m *GroupPolicySettingMapping) SetMdmSettingUri(value *string)() { + m.mdmSettingUri = value +} +// SetMdmSupportedState sets the mdmSupportedState property value. Mdm Support Status of the setting. +func (m *GroupPolicySettingMapping) SetMdmSupportedState(value *MdmSupportedState)() { + m.mdmSupportedState = value +} +// SetParentId sets the parentId property value. Parent Id of the group policy setting. +func (m *GroupPolicySettingMapping) SetParentId(value *string)() { + m.parentId = value +} +// SetSettingCategory sets the settingCategory property value. The category the group policy setting is in. +func (m *GroupPolicySettingMapping) SetSettingCategory(value *string)() { + m.settingCategory = value +} +// SetSettingDisplayName sets the settingDisplayName property value. The display name of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingDisplayName(value *string)() { + m.settingDisplayName = value +} +// SetSettingDisplayValue sets the settingDisplayValue property value. The display value of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingDisplayValue(value *string)() { + m.settingDisplayValue = value +} +// SetSettingDisplayValueType sets the settingDisplayValueType property value. The display value type of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingDisplayValueType(value *string)() { + m.settingDisplayValueType = value +} +// SetSettingName sets the settingName property value. The name of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingName(value *string)() { + m.settingName = value +} +// SetSettingScope sets the settingScope property value. Scope of the group policy setting. +func (m *GroupPolicySettingMapping) SetSettingScope(value *GroupPolicySettingScope)() { + m.settingScope = value +} +// SetSettingType sets the settingType property value. Setting type of the group policy. +func (m *GroupPolicySettingMapping) SetSettingType(value *GroupPolicySettingType)() { + m.settingType = value +} +// SetSettingValue sets the settingValue property value. The value of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingValue(value *string)() { + m.settingValue = value +} +// SetSettingValueDisplayUnits sets the settingValueDisplayUnits property value. The display units of this group policy setting value +func (m *GroupPolicySettingMapping) SetSettingValueDisplayUnits(value *string)() { + m.settingValueDisplayUnits = value +} +// SetSettingValueType sets the settingValueType property value. The value type of this group policy setting. +func (m *GroupPolicySettingMapping) SetSettingValueType(value *string)() { + m.settingValueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_response.go new file mode 100644 index 000000000..a22f876c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicySettingMappingCollectionResponse +type GroupPolicySettingMappingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicySettingMappingable +} +// NewGroupPolicySettingMappingCollectionResponse instantiates a new GroupPolicySettingMappingCollectionResponse and sets the default values. +func NewGroupPolicySettingMappingCollectionResponse()(*GroupPolicySettingMappingCollectionResponse) { + m := &GroupPolicySettingMappingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicySettingMappingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicySettingMappingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicySettingMappingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicySettingMappingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicySettingMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicySettingMappingable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicySettingMappingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicySettingMappingCollectionResponse) GetValue()([]GroupPolicySettingMappingable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicySettingMappingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicySettingMappingCollectionResponse) SetValue(value []GroupPolicySettingMappingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_responseable.go new file mode 100644 index 000000000..0da98f291 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_mapping_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicySettingMappingCollectionResponseable +type GroupPolicySettingMappingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicySettingMappingable) + SetValue(value []GroupPolicySettingMappingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_setting_mappingable.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_mappingable.go new file mode 100644 index 000000000..bdf1a5314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_mappingable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicySettingMappingable +type GroupPolicySettingMappingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdmxSettingDefinitionId()(*string) + GetChildIdList()([]string) + GetIntuneSettingDefinitionId()(*string) + GetIntuneSettingUriList()([]string) + GetIsMdmSupported()(*bool) + GetMdmCspName()(*string) + GetMdmMinimumOSVersion()(*int32) + GetMdmSettingUri()(*string) + GetMdmSupportedState()(*MdmSupportedState) + GetParentId()(*string) + GetSettingCategory()(*string) + GetSettingDisplayName()(*string) + GetSettingDisplayValue()(*string) + GetSettingDisplayValueType()(*string) + GetSettingName()(*string) + GetSettingScope()(*GroupPolicySettingScope) + GetSettingType()(*GroupPolicySettingType) + GetSettingValue()(*string) + GetSettingValueDisplayUnits()(*string) + GetSettingValueType()(*string) + SetAdmxSettingDefinitionId(value *string)() + SetChildIdList(value []string)() + SetIntuneSettingDefinitionId(value *string)() + SetIntuneSettingUriList(value []string)() + SetIsMdmSupported(value *bool)() + SetMdmCspName(value *string)() + SetMdmMinimumOSVersion(value *int32)() + SetMdmSettingUri(value *string)() + SetMdmSupportedState(value *MdmSupportedState)() + SetParentId(value *string)() + SetSettingCategory(value *string)() + SetSettingDisplayName(value *string)() + SetSettingDisplayValue(value *string)() + SetSettingDisplayValueType(value *string)() + SetSettingName(value *string)() + SetSettingScope(value *GroupPolicySettingScope)() + SetSettingType(value *GroupPolicySettingType)() + SetSettingValue(value *string)() + SetSettingValueDisplayUnits(value *string)() + SetSettingValueType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_setting_scope.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_scope.go new file mode 100644 index 000000000..2ab800268 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_scope.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicySettingScope int + +const ( + // Device scope unknown + UNKNOWN_GROUPPOLICYSETTINGSCOPE GroupPolicySettingScope = iota + // Device scope + DEVICE_GROUPPOLICYSETTINGSCOPE + // User scope + USER_GROUPPOLICYSETTINGSCOPE +) + +func (i GroupPolicySettingScope) String() string { + return []string{"unknown", "device", "user"}[i] +} +func ParseGroupPolicySettingScope(v string) (interface{}, error) { + result := UNKNOWN_GROUPPOLICYSETTINGSCOPE + switch v { + case "unknown": + result = UNKNOWN_GROUPPOLICYSETTINGSCOPE + case "device": + result = DEVICE_GROUPPOLICYSETTINGSCOPE + case "user": + result = USER_GROUPPOLICYSETTINGSCOPE + default: + return 0, errors.New("Unknown GroupPolicySettingScope value: " + v) + } + return &result, nil +} +func SerializeGroupPolicySettingScope(values []GroupPolicySettingScope) []string { + 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/group_policy_setting_type.go b/src/internal/connector/graph/betasdk/models/group_policy_setting_type.go new file mode 100644 index 000000000..6c309d0a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_setting_type.go @@ -0,0 +1,140 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicySettingType int + +const ( + // GroupPolicySettingType unknown + UNKNOWN_GROUPPOLICYSETTINGTYPE GroupPolicySettingType = iota + // Policy setting type + POLICY_GROUPPOLICYSETTINGTYPE + // Account setting type + ACCOUNT_GROUPPOLICYSETTINGTYPE + // SecurityOptions setting type + SECURITYOPTIONS_GROUPPOLICYSETTINGTYPE + // UserRightsAssignment setting type + USERRIGHTSASSIGNMENT_GROUPPOLICYSETTINGTYPE + // AuditSetting setting type + AUDITSETTING_GROUPPOLICYSETTINGTYPE + // WindowsFirewallSettings setting type + WINDOWSFIREWALLSETTINGS_GROUPPOLICYSETTINGTYPE + // AppLockerRuleCollection setting type + APPLOCKERRULECOLLECTION_GROUPPOLICYSETTINGTYPE + // DataSourcesSettings setting type + DATASOURCESSETTINGS_GROUPPOLICYSETTINGTYPE + // DevicesSettings setting type + DEVICESSETTINGS_GROUPPOLICYSETTINGTYPE + // DriveMapSettings setting type + DRIVEMAPSETTINGS_GROUPPOLICYSETTINGTYPE + // EnvironmentVariables setting type + ENVIRONMENTVARIABLES_GROUPPOLICYSETTINGTYPE + // FilesSettings setting type + FILESSETTINGS_GROUPPOLICYSETTINGTYPE + // FolderOptions setting type + FOLDEROPTIONS_GROUPPOLICYSETTINGTYPE + // Folders setting type + FOLDERS_GROUPPOLICYSETTINGTYPE + // IniFiles setting type + INIFILES_GROUPPOLICYSETTINGTYPE + // InternetOptions setting type + INTERNETOPTIONS_GROUPPOLICYSETTINGTYPE + // LocalUsersAndGroups setting type + LOCALUSERSANDGROUPS_GROUPPOLICYSETTINGTYPE + // NetworkOptions setting type + NETWORKOPTIONS_GROUPPOLICYSETTINGTYPE + // NetworkShares setting type + NETWORKSHARES_GROUPPOLICYSETTINGTYPE + // NTServices setting type + NTSERVICES_GROUPPOLICYSETTINGTYPE + // PowerOptions setting type + POWEROPTIONS_GROUPPOLICYSETTINGTYPE + // Printers setting type + PRINTERS_GROUPPOLICYSETTINGTYPE + // RegionalOptionsSettings setting type + REGIONALOPTIONSSETTINGS_GROUPPOLICYSETTINGTYPE + // RegistrySettings setting type + REGISTRYSETTINGS_GROUPPOLICYSETTINGTYPE + // ScheduledTasks setting type + SCHEDULEDTASKS_GROUPPOLICYSETTINGTYPE + // ShortcutSettings setting type + SHORTCUTSETTINGS_GROUPPOLICYSETTINGTYPE + // StartMenuSettings setting type + STARTMENUSETTINGS_GROUPPOLICYSETTINGTYPE +) + +func (i GroupPolicySettingType) String() string { + return []string{"unknown", "policy", "account", "securityOptions", "userRightsAssignment", "auditSetting", "windowsFirewallSettings", "appLockerRuleCollection", "dataSourcesSettings", "devicesSettings", "driveMapSettings", "environmentVariables", "filesSettings", "folderOptions", "folders", "iniFiles", "internetOptions", "localUsersAndGroups", "networkOptions", "networkShares", "ntServices", "powerOptions", "printers", "regionalOptionsSettings", "registrySettings", "scheduledTasks", "shortcutSettings", "startMenuSettings"}[i] +} +func ParseGroupPolicySettingType(v string) (interface{}, error) { + result := UNKNOWN_GROUPPOLICYSETTINGTYPE + switch v { + case "unknown": + result = UNKNOWN_GROUPPOLICYSETTINGTYPE + case "policy": + result = POLICY_GROUPPOLICYSETTINGTYPE + case "account": + result = ACCOUNT_GROUPPOLICYSETTINGTYPE + case "securityOptions": + result = SECURITYOPTIONS_GROUPPOLICYSETTINGTYPE + case "userRightsAssignment": + result = USERRIGHTSASSIGNMENT_GROUPPOLICYSETTINGTYPE + case "auditSetting": + result = AUDITSETTING_GROUPPOLICYSETTINGTYPE + case "windowsFirewallSettings": + result = WINDOWSFIREWALLSETTINGS_GROUPPOLICYSETTINGTYPE + case "appLockerRuleCollection": + result = APPLOCKERRULECOLLECTION_GROUPPOLICYSETTINGTYPE + case "dataSourcesSettings": + result = DATASOURCESSETTINGS_GROUPPOLICYSETTINGTYPE + case "devicesSettings": + result = DEVICESSETTINGS_GROUPPOLICYSETTINGTYPE + case "driveMapSettings": + result = DRIVEMAPSETTINGS_GROUPPOLICYSETTINGTYPE + case "environmentVariables": + result = ENVIRONMENTVARIABLES_GROUPPOLICYSETTINGTYPE + case "filesSettings": + result = FILESSETTINGS_GROUPPOLICYSETTINGTYPE + case "folderOptions": + result = FOLDEROPTIONS_GROUPPOLICYSETTINGTYPE + case "folders": + result = FOLDERS_GROUPPOLICYSETTINGTYPE + case "iniFiles": + result = INIFILES_GROUPPOLICYSETTINGTYPE + case "internetOptions": + result = INTERNETOPTIONS_GROUPPOLICYSETTINGTYPE + case "localUsersAndGroups": + result = LOCALUSERSANDGROUPS_GROUPPOLICYSETTINGTYPE + case "networkOptions": + result = NETWORKOPTIONS_GROUPPOLICYSETTINGTYPE + case "networkShares": + result = NETWORKSHARES_GROUPPOLICYSETTINGTYPE + case "ntServices": + result = NTSERVICES_GROUPPOLICYSETTINGTYPE + case "powerOptions": + result = POWEROPTIONS_GROUPPOLICYSETTINGTYPE + case "printers": + result = PRINTERS_GROUPPOLICYSETTINGTYPE + case "regionalOptionsSettings": + result = REGIONALOPTIONSSETTINGS_GROUPPOLICYSETTINGTYPE + case "registrySettings": + result = REGISTRYSETTINGS_GROUPPOLICYSETTINGTYPE + case "scheduledTasks": + result = SCHEDULEDTASKS_GROUPPOLICYSETTINGTYPE + case "shortcutSettings": + result = SHORTCUTSETTINGS_GROUPPOLICYSETTINGTYPE + case "startMenuSettings": + result = STARTMENUSETTINGS_GROUPPOLICYSETTINGTYPE + default: + return 0, errors.New("Unknown GroupPolicySettingType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicySettingType(values []GroupPolicySettingType) []string { + 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/group_policy_type.go b/src/internal/connector/graph/betasdk/models/group_policy_type.go new file mode 100644 index 000000000..54325ab5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyType int + +const ( + // Group Policy administrative templates built-in to the Policy configuration service provider (CSP). + ADMXBACKED_GROUPPOLICYTYPE GroupPolicyType = iota + // Group Policy administrative templates installed using the Policy configuration service provider (CSP). + ADMXINGESTED_GROUPPOLICYTYPE +) + +func (i GroupPolicyType) String() string { + return []string{"admxBacked", "admxIngested"}[i] +} +func ParseGroupPolicyType(v string) (interface{}, error) { + result := ADMXBACKED_GROUPPOLICYTYPE + switch v { + case "admxBacked": + result = ADMXBACKED_GROUPPOLICYTYPE + case "admxIngested": + result = ADMXINGESTED_GROUPPOLICYTYPE + default: + return 0, errors.New("Unknown GroupPolicyType value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyType(values []GroupPolicyType) []string { + 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/group_policy_uploaded_definition_file.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file.go new file mode 100644 index 000000000..093d2f017 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file.go @@ -0,0 +1,210 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedDefinitionFile +type GroupPolicyUploadedDefinitionFile struct { + GroupPolicyDefinitionFile + // The contents of the uploaded ADMX file. + content []byte + // The default language of the uploaded ADMX file. + defaultLanguageCode *string + // The list of operations on the uploaded ADMX file. + groupPolicyOperations []GroupPolicyOperationable + // The list of ADML files associated with the uploaded ADMX file. + groupPolicyUploadedLanguageFiles []GroupPolicyUploadedLanguageFileable + // Type of Group Policy uploaded definition file status. + status *GroupPolicyUploadedDefinitionFileStatus + // The uploaded time of the uploaded ADMX file. + uploadDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewGroupPolicyUploadedDefinitionFile instantiates a new GroupPolicyUploadedDefinitionFile and sets the default values. +func NewGroupPolicyUploadedDefinitionFile()(*GroupPolicyUploadedDefinitionFile) { + m := &GroupPolicyUploadedDefinitionFile{ + GroupPolicyDefinitionFile: *NewGroupPolicyDefinitionFile(), + } + odataTypeValue := "#microsoft.graph.groupPolicyUploadedDefinitionFile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyUploadedDefinitionFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedDefinitionFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyUploadedDefinitionFile(), nil +} +// GetContent gets the content property value. The contents of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) GetContent()([]byte) { + return m.content +} +// GetDefaultLanguageCode gets the defaultLanguageCode property value. The default language of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) GetDefaultLanguageCode()(*string) { + return m.defaultLanguageCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedDefinitionFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyDefinitionFile.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["defaultLanguageCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLanguageCode(val) + } + return nil + } + res["groupPolicyOperations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyOperationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyOperationable) + } + m.SetGroupPolicyOperations(res) + } + return nil + } + res["groupPolicyUploadedLanguageFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyUploadedLanguageFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyUploadedLanguageFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyUploadedLanguageFileable) + } + m.SetGroupPolicyUploadedLanguageFiles(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPolicyUploadedDefinitionFileStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*GroupPolicyUploadedDefinitionFileStatus)) + } + return nil + } + res["uploadDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadDateTime(val) + } + return nil + } + return res +} +// GetGroupPolicyOperations gets the groupPolicyOperations property value. The list of operations on the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) GetGroupPolicyOperations()([]GroupPolicyOperationable) { + return m.groupPolicyOperations +} +// GetGroupPolicyUploadedLanguageFiles gets the groupPolicyUploadedLanguageFiles property value. The list of ADML files associated with the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) GetGroupPolicyUploadedLanguageFiles()([]GroupPolicyUploadedLanguageFileable) { + return m.groupPolicyUploadedLanguageFiles +} +// GetStatus gets the status property value. Type of Group Policy uploaded definition file status. +func (m *GroupPolicyUploadedDefinitionFile) GetStatus()(*GroupPolicyUploadedDefinitionFileStatus) { + return m.status +} +// GetUploadDateTime gets the uploadDateTime property value. The uploaded time of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) GetUploadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.uploadDateTime +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedDefinitionFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyDefinitionFile.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultLanguageCode", m.GetDefaultLanguageCode()) + if err != nil { + return err + } + } + if m.GetGroupPolicyOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyOperations())) + for i, v := range m.GetGroupPolicyOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyOperations", cast) + if err != nil { + return err + } + } + if m.GetGroupPolicyUploadedLanguageFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupPolicyUploadedLanguageFiles())) + for i, v := range m.GetGroupPolicyUploadedLanguageFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupPolicyUploadedLanguageFiles", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("uploadDateTime", m.GetUploadDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The contents of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) SetContent(value []byte)() { + m.content = value +} +// SetDefaultLanguageCode sets the defaultLanguageCode property value. The default language of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) SetDefaultLanguageCode(value *string)() { + m.defaultLanguageCode = value +} +// SetGroupPolicyOperations sets the groupPolicyOperations property value. The list of operations on the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) SetGroupPolicyOperations(value []GroupPolicyOperationable)() { + m.groupPolicyOperations = value +} +// SetGroupPolicyUploadedLanguageFiles sets the groupPolicyUploadedLanguageFiles property value. The list of ADML files associated with the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) SetGroupPolicyUploadedLanguageFiles(value []GroupPolicyUploadedLanguageFileable)() { + m.groupPolicyUploadedLanguageFiles = value +} +// SetStatus sets the status property value. Type of Group Policy uploaded definition file status. +func (m *GroupPolicyUploadedDefinitionFile) SetStatus(value *GroupPolicyUploadedDefinitionFileStatus)() { + m.status = value +} +// SetUploadDateTime sets the uploadDateTime property value. The uploaded time of the uploaded ADMX file. +func (m *GroupPolicyUploadedDefinitionFile) SetUploadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.uploadDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_response.go new file mode 100644 index 000000000..0ba9b09a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedDefinitionFileCollectionResponse +type GroupPolicyUploadedDefinitionFileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyUploadedDefinitionFileable +} +// NewGroupPolicyUploadedDefinitionFileCollectionResponse instantiates a new GroupPolicyUploadedDefinitionFileCollectionResponse and sets the default values. +func NewGroupPolicyUploadedDefinitionFileCollectionResponse()(*GroupPolicyUploadedDefinitionFileCollectionResponse) { + m := &GroupPolicyUploadedDefinitionFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyUploadedDefinitionFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedDefinitionFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyUploadedDefinitionFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedDefinitionFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyUploadedDefinitionFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyUploadedDefinitionFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyUploadedDefinitionFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyUploadedDefinitionFileCollectionResponse) GetValue()([]GroupPolicyUploadedDefinitionFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedDefinitionFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyUploadedDefinitionFileCollectionResponse) SetValue(value []GroupPolicyUploadedDefinitionFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_responseable.go new file mode 100644 index 000000000..e40caa2fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedDefinitionFileCollectionResponseable +type GroupPolicyUploadedDefinitionFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyUploadedDefinitionFileable) + SetValue(value []GroupPolicyUploadedDefinitionFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_status.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_status.go new file mode 100644 index 000000000..a6dd0f609 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_file_status.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPolicyUploadedDefinitionFileStatus int + +const ( + // Group Policy uploaded definition file invalid upload status. + NONE_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS GroupPolicyUploadedDefinitionFileStatus = iota + // Group Policy uploaded definition file upload in progress. + UPLOADINPROGRESS_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + // Group Policy uploaded definition file available. + AVAILABLE_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + // Group Policy uploaded definition file assigned to policy. + ASSIGNED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + // Group Policy uploaded definition file removal in progress. + REMOVALINPROGRESS_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + // Group Policy uploaded definition file upload failed. + UPLOADFAILED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + // Group Policy uploaded definition file removal failed. + REMOVALFAILED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS +) + +func (i GroupPolicyUploadedDefinitionFileStatus) String() string { + return []string{"none", "uploadInProgress", "available", "assigned", "removalInProgress", "uploadFailed", "removalFailed"}[i] +} +func ParseGroupPolicyUploadedDefinitionFileStatus(v string) (interface{}, error) { + result := NONE_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + switch v { + case "none": + result = NONE_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "uploadInProgress": + result = UPLOADINPROGRESS_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "available": + result = AVAILABLE_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "assigned": + result = ASSIGNED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "removalInProgress": + result = REMOVALINPROGRESS_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "uploadFailed": + result = UPLOADFAILED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + case "removalFailed": + result = REMOVALFAILED_GROUPPOLICYUPLOADEDDEFINITIONFILESTATUS + default: + return 0, errors.New("Unknown GroupPolicyUploadedDefinitionFileStatus value: " + v) + } + return &result, nil +} +func SerializeGroupPolicyUploadedDefinitionFileStatus(values []GroupPolicyUploadedDefinitionFileStatus) []string { + 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/group_policy_uploaded_definition_fileable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_fileable.go new file mode 100644 index 000000000..39928519b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_definition_fileable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedDefinitionFileable +type GroupPolicyUploadedDefinitionFileable interface { + GroupPolicyDefinitionFileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetDefaultLanguageCode()(*string) + GetGroupPolicyOperations()([]GroupPolicyOperationable) + GetGroupPolicyUploadedLanguageFiles()([]GroupPolicyUploadedLanguageFileable) + GetStatus()(*GroupPolicyUploadedDefinitionFileStatus) + GetUploadDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetContent(value []byte)() + SetDefaultLanguageCode(value *string)() + SetGroupPolicyOperations(value []GroupPolicyOperationable)() + SetGroupPolicyUploadedLanguageFiles(value []GroupPolicyUploadedLanguageFileable)() + SetStatus(value *GroupPolicyUploadedDefinitionFileStatus)() + SetUploadDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file.go new file mode 100644 index 000000000..be1193661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file.go @@ -0,0 +1,202 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedLanguageFile the entity represents an ADML (Administrative Template language) XML file uploaded by Administrator. +type GroupPolicyUploadedLanguageFile 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 contents of the uploaded ADML file. + content []byte + // The file name of the uploaded ADML file. + fileName *string + // Key of the entity. + id *string + // The language code of the uploaded ADML file. + languageCode *string + // The date and time the entity was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewGroupPolicyUploadedLanguageFile instantiates a new groupPolicyUploadedLanguageFile and sets the default values. +func NewGroupPolicyUploadedLanguageFile()(*GroupPolicyUploadedLanguageFile) { + m := &GroupPolicyUploadedLanguageFile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGroupPolicyUploadedLanguageFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedLanguageFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyUploadedLanguageFile(), 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 *GroupPolicyUploadedLanguageFile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContent gets the content property value. The contents of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) GetContent()([]byte) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedLanguageFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["languageCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageCode(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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 + } + return res +} +// GetFileName gets the fileName property value. The file name of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) GetFileName()(*string) { + return m.fileName +} +// GetId gets the id property value. Key of the entity. +func (m *GroupPolicyUploadedLanguageFile) GetId()(*string) { + return m.id +} +// GetLanguageCode gets the languageCode property value. The language code of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) GetLanguageCode()(*string) { + return m.languageCode +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyUploadedLanguageFile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GroupPolicyUploadedLanguageFile) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedLanguageFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languageCode", m.GetLanguageCode()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GroupPolicyUploadedLanguageFile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContent sets the content property value. The contents of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) SetContent(value []byte)() { + m.content = value +} +// SetFileName sets the fileName property value. The file name of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) SetFileName(value *string)() { + m.fileName = value +} +// SetId sets the id property value. Key of the entity. +func (m *GroupPolicyUploadedLanguageFile) SetId(value *string)() { + m.id = value +} +// SetLanguageCode sets the languageCode property value. The language code of the uploaded ADML file. +func (m *GroupPolicyUploadedLanguageFile) SetLanguageCode(value *string)() { + m.languageCode = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the entity was last modified. +func (m *GroupPolicyUploadedLanguageFile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GroupPolicyUploadedLanguageFile) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_response.go new file mode 100644 index 000000000..24b837c8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedLanguageFileCollectionResponse +type GroupPolicyUploadedLanguageFileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyUploadedLanguageFileable +} +// NewGroupPolicyUploadedLanguageFileCollectionResponse instantiates a new GroupPolicyUploadedLanguageFileCollectionResponse and sets the default values. +func NewGroupPolicyUploadedLanguageFileCollectionResponse()(*GroupPolicyUploadedLanguageFileCollectionResponse) { + m := &GroupPolicyUploadedLanguageFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyUploadedLanguageFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedLanguageFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyUploadedLanguageFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedLanguageFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyUploadedLanguageFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyUploadedLanguageFileable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyUploadedLanguageFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyUploadedLanguageFileCollectionResponse) GetValue()([]GroupPolicyUploadedLanguageFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedLanguageFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyUploadedLanguageFileCollectionResponse) SetValue(value []GroupPolicyUploadedLanguageFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_responseable.go new file mode 100644 index 000000000..f19ca12ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_file_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedLanguageFileCollectionResponseable +type GroupPolicyUploadedLanguageFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyUploadedLanguageFileable) + SetValue(value []GroupPolicyUploadedLanguageFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_fileable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_fileable.go new file mode 100644 index 000000000..6d6b294c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_language_fileable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedLanguageFileable +type GroupPolicyUploadedLanguageFileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetFileName()(*string) + GetId()(*string) + GetLanguageCode()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetContent(value []byte)() + SetFileName(value *string)() + SetId(value *string)() + SetLanguageCode(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation.go new file mode 100644 index 000000000..1ebb28f64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedPresentation +type GroupPolicyUploadedPresentation struct { + GroupPolicyPresentation +} +// NewGroupPolicyUploadedPresentation instantiates a new GroupPolicyUploadedPresentation and sets the default values. +func NewGroupPolicyUploadedPresentation()(*GroupPolicyUploadedPresentation) { + m := &GroupPolicyUploadedPresentation{ + GroupPolicyPresentation: *NewGroupPolicyPresentation(), + } + odataTypeValue := "#microsoft.graph.groupPolicyUploadedPresentation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateGroupPolicyUploadedPresentationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedPresentationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.groupPolicyPresentationCheckBox": + return NewGroupPolicyPresentationCheckBox(), nil + case "#microsoft.graph.groupPolicyPresentationComboBox": + return NewGroupPolicyPresentationComboBox(), nil + case "#microsoft.graph.groupPolicyPresentationDecimalTextBox": + return NewGroupPolicyPresentationDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationDropdownList": + return NewGroupPolicyPresentationDropdownList(), nil + case "#microsoft.graph.groupPolicyPresentationListBox": + return NewGroupPolicyPresentationListBox(), nil + case "#microsoft.graph.groupPolicyPresentationLongDecimalTextBox": + return NewGroupPolicyPresentationLongDecimalTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationMultiTextBox": + return NewGroupPolicyPresentationMultiTextBox(), nil + case "#microsoft.graph.groupPolicyPresentationText": + return NewGroupPolicyPresentationText(), nil + case "#microsoft.graph.groupPolicyPresentationTextBox": + return NewGroupPolicyPresentationTextBox(), nil + } + } + } + } + return NewGroupPolicyUploadedPresentation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedPresentation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GroupPolicyPresentation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedPresentation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GroupPolicyPresentation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_response.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_response.go new file mode 100644 index 000000000..554331086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedPresentationCollectionResponse +type GroupPolicyUploadedPresentationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []GroupPolicyUploadedPresentationable +} +// NewGroupPolicyUploadedPresentationCollectionResponse instantiates a new GroupPolicyUploadedPresentationCollectionResponse and sets the default values. +func NewGroupPolicyUploadedPresentationCollectionResponse()(*GroupPolicyUploadedPresentationCollectionResponse) { + m := &GroupPolicyUploadedPresentationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateGroupPolicyUploadedPresentationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupPolicyUploadedPresentationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupPolicyUploadedPresentationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupPolicyUploadedPresentationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupPolicyUploadedPresentationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GroupPolicyUploadedPresentationable, len(val)) + for i, v := range val { + res[i] = v.(GroupPolicyUploadedPresentationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *GroupPolicyUploadedPresentationCollectionResponse) GetValue()([]GroupPolicyUploadedPresentationable) { + return m.value +} +// Serialize serializes information the current object +func (m *GroupPolicyUploadedPresentationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *GroupPolicyUploadedPresentationCollectionResponse) SetValue(value []GroupPolicyUploadedPresentationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_responseable.go new file mode 100644 index 000000000..e3c64ea86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedPresentationCollectionResponseable +type GroupPolicyUploadedPresentationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]GroupPolicyUploadedPresentationable) + SetValue(value []GroupPolicyUploadedPresentationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentationable.go b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentationable.go new file mode 100644 index 000000000..3b4dfa7d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_policy_uploaded_presentationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupPolicyUploadedPresentationable +type GroupPolicyUploadedPresentationable interface { + GroupPolicyPresentationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/group_privacy.go b/src/internal/connector/graph/betasdk/models/group_privacy.go new file mode 100644 index 000000000..6efa5abcc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_privacy.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupPrivacy int + +const ( + UNSPECIFIED_GROUPPRIVACY GroupPrivacy = iota + PUBLIC_GROUPPRIVACY + PRIVATE_GROUPPRIVACY + UNKNOWNFUTUREVALUE_GROUPPRIVACY +) + +func (i GroupPrivacy) String() string { + return []string{"unspecified", "public", "private", "unknownFutureValue"}[i] +} +func ParseGroupPrivacy(v string) (interface{}, error) { + result := UNSPECIFIED_GROUPPRIVACY + switch v { + case "unspecified": + result = UNSPECIFIED_GROUPPRIVACY + case "public": + result = PUBLIC_GROUPPRIVACY + case "private": + result = PRIVATE_GROUPPRIVACY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_GROUPPRIVACY + default: + return 0, errors.New("Unknown GroupPrivacy value: " + v) + } + return &result, nil +} +func SerializeGroupPrivacy(values []GroupPrivacy) []string { + 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/group_type.go b/src/internal/connector/graph/betasdk/models/group_type.go new file mode 100644 index 000000000..74b67e564 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type GroupType int + +const ( + UNIFIEDGROUPS_GROUPTYPE GroupType = iota + AZUREAD_GROUPTYPE + UNKNOWNFUTUREVALUE_GROUPTYPE +) + +func (i GroupType) String() string { + return []string{"unifiedGroups", "azureAD", "unknownFutureValue"}[i] +} +func ParseGroupType(v string) (interface{}, error) { + result := UNIFIEDGROUPS_GROUPTYPE + switch v { + case "unifiedGroups": + result = UNIFIEDGROUPS_GROUPTYPE + case "azureAD": + result = AZUREAD_GROUPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_GROUPTYPE + default: + return 0, errors.New("Unknown GroupType value: " + v) + } + return &result, nil +} +func SerializeGroupType(values []GroupType) []string { + 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/group_writeback_configuration.go b/src/internal/connector/graph/betasdk/models/group_writeback_configuration.go new file mode 100644 index 000000000..b640c9f3e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_writeback_configuration.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupWritebackConfiguration +type GroupWritebackConfiguration struct { + WritebackConfiguration + // Indicates the target on-premise group type the cloud object will be written back as. Nullable. The possible values are: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup.If the cloud group is a unified (Microsoft 365) group, this property can be one of the following: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup. Azure AD security groups can be written back as universalSecurityGroup. If isEnabled or the NewUnifiedGroupWritebackDefault group setting is true but this property is not explicitly configured: Microsoft 365 groups will be written back as universalDistributionGroup by defaultSecurity groups will be written back as universalSecurityGroup by default + onPremisesGroupType *string +} +// NewGroupWritebackConfiguration instantiates a new GroupWritebackConfiguration and sets the default values. +func NewGroupWritebackConfiguration()(*GroupWritebackConfiguration) { + m := &GroupWritebackConfiguration{ + WritebackConfiguration: *NewWritebackConfiguration(), + } + return m +} +// CreateGroupWritebackConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGroupWritebackConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGroupWritebackConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GroupWritebackConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WritebackConfiguration.GetFieldDeserializers() + res["onPremisesGroupType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesGroupType(val) + } + return nil + } + return res +} +// GetOnPremisesGroupType gets the onPremisesGroupType property value. Indicates the target on-premise group type the cloud object will be written back as. Nullable. The possible values are: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup.If the cloud group is a unified (Microsoft 365) group, this property can be one of the following: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup. Azure AD security groups can be written back as universalSecurityGroup. If isEnabled or the NewUnifiedGroupWritebackDefault group setting is true but this property is not explicitly configured: Microsoft 365 groups will be written back as universalDistributionGroup by defaultSecurity groups will be written back as universalSecurityGroup by default +func (m *GroupWritebackConfiguration) GetOnPremisesGroupType()(*string) { + return m.onPremisesGroupType +} +// Serialize serializes information the current object +func (m *GroupWritebackConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WritebackConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("onPremisesGroupType", m.GetOnPremisesGroupType()) + if err != nil { + return err + } + } + return nil +} +// SetOnPremisesGroupType sets the onPremisesGroupType property value. Indicates the target on-premise group type the cloud object will be written back as. Nullable. The possible values are: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup.If the cloud group is a unified (Microsoft 365) group, this property can be one of the following: universalDistributionGroup, universalSecurityGroup, universalMailEnabledSecurityGroup. Azure AD security groups can be written back as universalSecurityGroup. If isEnabled or the NewUnifiedGroupWritebackDefault group setting is true but this property is not explicitly configured: Microsoft 365 groups will be written back as universalDistributionGroup by defaultSecurity groups will be written back as universalSecurityGroup by default +func (m *GroupWritebackConfiguration) SetOnPremisesGroupType(value *string)() { + m.onPremisesGroupType = value +} diff --git a/src/internal/connector/graph/betasdk/models/group_writeback_configurationable.go b/src/internal/connector/graph/betasdk/models/group_writeback_configurationable.go new file mode 100644 index 000000000..f26b86fb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/group_writeback_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GroupWritebackConfigurationable +type GroupWritebackConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WritebackConfigurationable + GetOnPremisesGroupType()(*string) + SetOnPremisesGroupType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/groupable.go b/src/internal/connector/graph/betasdk/models/groupable.go new file mode 100644 index 000000000..62a63b1a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/groupable.go @@ -0,0 +1,168 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Groupable +type Groupable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptedSenders()([]DirectoryObjectable) + GetAccessType()(*GroupAccessType) + GetAllowExternalSenders()(*bool) + GetAppRoleAssignments()([]AppRoleAssignmentable) + GetAssignedLabels()([]AssignedLabelable) + GetAssignedLicenses()([]AssignedLicenseable) + GetAutoSubscribeNewMembers()(*bool) + GetCalendar()(Calendarable) + GetCalendarView()([]Eventable) + GetClassification()(*string) + GetConversations()([]Conversationable) + GetCreatedByAppId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedOnBehalfOf()(DirectoryObjectable) + GetDescription()(*string) + GetDisplayName()(*string) + GetDrive()(Driveable) + GetDrives()([]Driveable) + GetEndpoints()([]Endpointable) + GetEvents()([]Eventable) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExtensions()([]Extensionable) + GetGroupLifecyclePolicies()([]GroupLifecyclePolicyable) + GetGroupTypes()([]string) + GetHasMembersWithLicenseErrors()(*bool) + GetHideFromAddressLists()(*bool) + GetHideFromOutlookClients()(*bool) + GetInfoCatalogs()([]string) + GetIsArchived()(*bool) + GetIsAssignableToRole()(*bool) + GetIsFavorite()(*bool) + GetIsManagementRestricted()(*bool) + GetIsSubscribedByMail()(*bool) + GetLicenseProcessingState()(LicenseProcessingStateable) + GetMail()(*string) + GetMailEnabled()(*bool) + GetMailNickname()(*string) + GetMemberOf()([]DirectoryObjectable) + GetMembers()([]DirectoryObjectable) + GetMembershipRule()(*string) + GetMembershipRuleProcessingState()(*string) + GetMembershipRuleProcessingStatus()(MembershipRuleProcessingStatusable) + GetMembersWithLicenseErrors()([]DirectoryObjectable) + GetOnenote()(Onenoteable) + GetOnPremisesDomainName()(*string) + GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnPremisesNetBiosName()(*string) + GetOnPremisesProvisioningErrors()([]OnPremisesProvisioningErrorable) + GetOnPremisesSamAccountName()(*string) + GetOnPremisesSecurityIdentifier()(*string) + GetOnPremisesSyncEnabled()(*bool) + GetOrganizationId()(*string) + GetOwners()([]DirectoryObjectable) + GetPermissionGrants()([]ResourceSpecificPermissionGrantable) + GetPhoto()(ProfilePhotoable) + GetPhotos()([]ProfilePhotoable) + GetPlanner()(PlannerGroupable) + GetPreferredDataLocation()(*string) + GetPreferredLanguage()(*string) + GetProxyAddresses()([]string) + GetRejectedSenders()([]DirectoryObjectable) + GetRenewedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResourceBehaviorOptions()([]string) + GetResourceProvisioningOptions()([]string) + GetSecurityEnabled()(*bool) + GetSecurityIdentifier()(*string) + GetSettings()([]DirectorySettingable) + GetSites()([]Siteable) + GetTeam()(Teamable) + GetTheme()(*string) + GetThreads()([]ConversationThreadable) + GetTransitiveMemberOf()([]DirectoryObjectable) + GetTransitiveMembers()([]DirectoryObjectable) + GetUnseenConversationsCount()(*int32) + GetUnseenCount()(*int32) + GetUnseenMessagesCount()(*int32) + GetVisibility()(*string) + GetWritebackConfiguration()(GroupWritebackConfigurationable) + SetAcceptedSenders(value []DirectoryObjectable)() + SetAccessType(value *GroupAccessType)() + SetAllowExternalSenders(value *bool)() + SetAppRoleAssignments(value []AppRoleAssignmentable)() + SetAssignedLabels(value []AssignedLabelable)() + SetAssignedLicenses(value []AssignedLicenseable)() + SetAutoSubscribeNewMembers(value *bool)() + SetCalendar(value Calendarable)() + SetCalendarView(value []Eventable)() + SetClassification(value *string)() + SetConversations(value []Conversationable)() + SetCreatedByAppId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedOnBehalfOf(value DirectoryObjectable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetDrive(value Driveable)() + SetDrives(value []Driveable)() + SetEndpoints(value []Endpointable)() + SetEvents(value []Eventable)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExtensions(value []Extensionable)() + SetGroupLifecyclePolicies(value []GroupLifecyclePolicyable)() + SetGroupTypes(value []string)() + SetHasMembersWithLicenseErrors(value *bool)() + SetHideFromAddressLists(value *bool)() + SetHideFromOutlookClients(value *bool)() + SetInfoCatalogs(value []string)() + SetIsArchived(value *bool)() + SetIsAssignableToRole(value *bool)() + SetIsFavorite(value *bool)() + SetIsManagementRestricted(value *bool)() + SetIsSubscribedByMail(value *bool)() + SetLicenseProcessingState(value LicenseProcessingStateable)() + SetMail(value *string)() + SetMailEnabled(value *bool)() + SetMailNickname(value *string)() + SetMemberOf(value []DirectoryObjectable)() + SetMembers(value []DirectoryObjectable)() + SetMembershipRule(value *string)() + SetMembershipRuleProcessingState(value *string)() + SetMembershipRuleProcessingStatus(value MembershipRuleProcessingStatusable)() + SetMembersWithLicenseErrors(value []DirectoryObjectable)() + SetOnenote(value Onenoteable)() + SetOnPremisesDomainName(value *string)() + SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnPremisesNetBiosName(value *string)() + SetOnPremisesProvisioningErrors(value []OnPremisesProvisioningErrorable)() + SetOnPremisesSamAccountName(value *string)() + SetOnPremisesSecurityIdentifier(value *string)() + SetOnPremisesSyncEnabled(value *bool)() + SetOrganizationId(value *string)() + SetOwners(value []DirectoryObjectable)() + SetPermissionGrants(value []ResourceSpecificPermissionGrantable)() + SetPhoto(value ProfilePhotoable)() + SetPhotos(value []ProfilePhotoable)() + SetPlanner(value PlannerGroupable)() + SetPreferredDataLocation(value *string)() + SetPreferredLanguage(value *string)() + SetProxyAddresses(value []string)() + SetRejectedSenders(value []DirectoryObjectable)() + SetRenewedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResourceBehaviorOptions(value []string)() + SetResourceProvisioningOptions(value []string)() + SetSecurityEnabled(value *bool)() + SetSecurityIdentifier(value *string)() + SetSettings(value []DirectorySettingable)() + SetSites(value []Siteable)() + SetTeam(value Teamable)() + SetTheme(value *string)() + SetThreads(value []ConversationThreadable)() + SetTransitiveMemberOf(value []DirectoryObjectable)() + SetTransitiveMembers(value []DirectoryObjectable)() + SetUnseenConversationsCount(value *int32)() + SetUnseenCount(value *int32)() + SetUnseenMessagesCount(value *int32)() + SetVisibility(value *string)() + SetWritebackConfiguration(value GroupWritebackConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/hardware_information.go b/src/internal/connector/graph/betasdk/models/hardware_information.go new file mode 100644 index 000000000..39320f0a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hardware_information.go @@ -0,0 +1,1127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HardwareInformation hardware information of a given device. +type HardwareInformation 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 number of charge cycles the device’s current battery has gone through. Valid values 0 to 2147483647 + batteryChargeCycles *int32 + // The device’s current battery’s health percentage. Valid values 0 to 100 + batteryHealthPercentage *int32 + // The battery level, between 0.0 and 100, or null if the battery level cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 5.0 and later, and is available only when Device Information access right is obtained. Valid values 0 to 100 + batteryLevelPercentage *float64 + // The serial number of the device’s current battery + batterySerialNumber *string + // Cellular technology of the device + cellularTechnology *string + // Returns the fully qualified domain name of the device (if any). If the device is not domain-joined, it returns an empty string. + deviceFullQualifiedDomainName *string + // The deviceGuardLocalSystemAuthorityCredentialGuardState property + deviceGuardLocalSystemAuthorityCredentialGuardState *DeviceGuardLocalSystemAuthorityCredentialGuardState + // The deviceGuardVirtualizationBasedSecurityHardwareRequirementState property + deviceGuardVirtualizationBasedSecurityHardwareRequirementState *DeviceGuardVirtualizationBasedSecurityHardwareRequirementState + // The deviceGuardVirtualizationBasedSecurityState property + deviceGuardVirtualizationBasedSecurityState *DeviceGuardVirtualizationBasedSecurityState + // A standard error code indicating the last error, or 0 indicating no error (default). The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. Valid values 0 to 2147483647 + deviceLicensingLastErrorCode *int32 + // Error text message as a descripition for deviceLicensingLastErrorCode. The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. + deviceLicensingLastErrorDescription *string + // Indicates the device licensing status after Windows device based subscription has been enabled. + deviceLicensingStatus *DeviceLicensingStatus + // eSIM identifier + esimIdentifier *string + // Free storage space of the device. + freeStorageSpace *int64 + // IMEI + imei *string + // IPAddressV4 + ipAddressV4 *string + // Encryption status of the device + isEncrypted *bool + // Shared iPad + isSharedDevice *bool + // Supervised mode of the device + isSupervised *bool + // Manufacturer of the device + manufacturer *string + // MEID + meid *string + // Model of the device + model *string + // The OdataType property + odataType *string + // String that specifies the OS edition. + operatingSystemEdition *string + // Operating system language of the device + operatingSystemLanguage *string + // Int that specifies the Windows Operating System ProductType. More details here https://go.microsoft.com/fwlink/?linkid=2126950. Valid values 0 to 2147483647 + operatingSystemProductType *int32 + // Operating System Build Number on Android device + osBuildNumber *string + // Phone number of the device + phoneNumber *string + // The product name, e.g. iPad8,12 etc. The update frequency of this property is weekly. Note this property is currently supported only on iOS/MacOS devices, and is available only when Device Information access right is obtained. + productName *string + // The number of users currently on this device, or null (default) if the value of this property cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 13.4 and later, and is available only when Device Information access right is obtained. Valid values 0 to 2147483647 + residentUsersCount *int32 + // Serial number. + serialNumber *string + // All users on the shared Apple device + sharedDeviceCachedUsers []SharedAppleDeviceUserable + // SubnetAddress + subnetAddress *string + // Subscriber carrier of the device + subscriberCarrier *string + // BIOS version as reported by SMBIOS + systemManagementBIOSVersion *string + // Total storage space of the device. + totalStorageSpace *int64 + // The identifying information that uniquely names the TPM manufacturer + tpmManufacturer *string + // String that specifies the specification version. + tpmSpecificationVersion *string + // The version of the TPM, as specified by the manufacturer + tpmVersion *string + // WiFi MAC address of the device + wifiMac *string + // A list of wired IPv4 addresses. The update frequency (the maximum delay for the change of property value to be synchronized from the device to the cloud storage) of this property is daily. Note this property is currently supported only on devices running on Windows. + wiredIPv4Addresses []string +} +// NewHardwareInformation instantiates a new hardwareInformation and sets the default values. +func NewHardwareInformation()(*HardwareInformation) { + m := &HardwareInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHardwareInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHardwareInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHardwareInformation(), 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 *HardwareInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBatteryChargeCycles gets the batteryChargeCycles property value. The number of charge cycles the device’s current battery has gone through. Valid values 0 to 2147483647 +func (m *HardwareInformation) GetBatteryChargeCycles()(*int32) { + return m.batteryChargeCycles +} +// GetBatteryHealthPercentage gets the batteryHealthPercentage property value. The device’s current battery’s health percentage. Valid values 0 to 100 +func (m *HardwareInformation) GetBatteryHealthPercentage()(*int32) { + return m.batteryHealthPercentage +} +// GetBatteryLevelPercentage gets the batteryLevelPercentage property value. The battery level, between 0.0 and 100, or null if the battery level cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 5.0 and later, and is available only when Device Information access right is obtained. Valid values 0 to 100 +func (m *HardwareInformation) GetBatteryLevelPercentage()(*float64) { + return m.batteryLevelPercentage +} +// GetBatterySerialNumber gets the batterySerialNumber property value. The serial number of the device’s current battery +func (m *HardwareInformation) GetBatterySerialNumber()(*string) { + return m.batterySerialNumber +} +// GetCellularTechnology gets the cellularTechnology property value. Cellular technology of the device +func (m *HardwareInformation) GetCellularTechnology()(*string) { + return m.cellularTechnology +} +// GetDeviceFullQualifiedDomainName gets the deviceFullQualifiedDomainName property value. Returns the fully qualified domain name of the device (if any). If the device is not domain-joined, it returns an empty string. +func (m *HardwareInformation) GetDeviceFullQualifiedDomainName()(*string) { + return m.deviceFullQualifiedDomainName +} +// GetDeviceGuardLocalSystemAuthorityCredentialGuardState gets the deviceGuardLocalSystemAuthorityCredentialGuardState property value. The deviceGuardLocalSystemAuthorityCredentialGuardState property +func (m *HardwareInformation) GetDeviceGuardLocalSystemAuthorityCredentialGuardState()(*DeviceGuardLocalSystemAuthorityCredentialGuardState) { + return m.deviceGuardLocalSystemAuthorityCredentialGuardState +} +// GetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState gets the deviceGuardVirtualizationBasedSecurityHardwareRequirementState property value. The deviceGuardVirtualizationBasedSecurityHardwareRequirementState property +func (m *HardwareInformation) GetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState()(*DeviceGuardVirtualizationBasedSecurityHardwareRequirementState) { + return m.deviceGuardVirtualizationBasedSecurityHardwareRequirementState +} +// GetDeviceGuardVirtualizationBasedSecurityState gets the deviceGuardVirtualizationBasedSecurityState property value. The deviceGuardVirtualizationBasedSecurityState property +func (m *HardwareInformation) GetDeviceGuardVirtualizationBasedSecurityState()(*DeviceGuardVirtualizationBasedSecurityState) { + return m.deviceGuardVirtualizationBasedSecurityState +} +// GetDeviceLicensingLastErrorCode gets the deviceLicensingLastErrorCode property value. A standard error code indicating the last error, or 0 indicating no error (default). The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. Valid values 0 to 2147483647 +func (m *HardwareInformation) GetDeviceLicensingLastErrorCode()(*int32) { + return m.deviceLicensingLastErrorCode +} +// GetDeviceLicensingLastErrorDescription gets the deviceLicensingLastErrorDescription property value. Error text message as a descripition for deviceLicensingLastErrorCode. The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. +func (m *HardwareInformation) GetDeviceLicensingLastErrorDescription()(*string) { + return m.deviceLicensingLastErrorDescription +} +// GetDeviceLicensingStatus gets the deviceLicensingStatus property value. Indicates the device licensing status after Windows device based subscription has been enabled. +func (m *HardwareInformation) GetDeviceLicensingStatus()(*DeviceLicensingStatus) { + return m.deviceLicensingStatus +} +// GetEsimIdentifier gets the esimIdentifier property value. eSIM identifier +func (m *HardwareInformation) GetEsimIdentifier()(*string) { + return m.esimIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HardwareInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["batteryChargeCycles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBatteryChargeCycles(val) + } + return nil + } + res["batteryHealthPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBatteryHealthPercentage(val) + } + return nil + } + res["batteryLevelPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetBatteryLevelPercentage(val) + } + return nil + } + res["batterySerialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBatterySerialNumber(val) + } + return nil + } + res["cellularTechnology"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularTechnology(val) + } + return nil + } + res["deviceFullQualifiedDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceFullQualifiedDomainName(val) + } + return nil + } + res["deviceGuardLocalSystemAuthorityCredentialGuardState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceGuardLocalSystemAuthorityCredentialGuardState) + if err != nil { + return err + } + if val != nil { + m.SetDeviceGuardLocalSystemAuthorityCredentialGuardState(val.(*DeviceGuardLocalSystemAuthorityCredentialGuardState)) + } + return nil + } + res["deviceGuardVirtualizationBasedSecurityHardwareRequirementState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceGuardVirtualizationBasedSecurityHardwareRequirementState) + if err != nil { + return err + } + if val != nil { + m.SetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState(val.(*DeviceGuardVirtualizationBasedSecurityHardwareRequirementState)) + } + return nil + } + res["deviceGuardVirtualizationBasedSecurityState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceGuardVirtualizationBasedSecurityState) + if err != nil { + return err + } + if val != nil { + m.SetDeviceGuardVirtualizationBasedSecurityState(val.(*DeviceGuardVirtualizationBasedSecurityState)) + } + return nil + } + res["deviceLicensingLastErrorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceLicensingLastErrorCode(val) + } + return nil + } + res["deviceLicensingLastErrorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceLicensingLastErrorDescription(val) + } + return nil + } + res["deviceLicensingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceLicensingStatus) + if err != nil { + return err + } + if val != nil { + m.SetDeviceLicensingStatus(val.(*DeviceLicensingStatus)) + } + return nil + } + res["esimIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEsimIdentifier(val) + } + return nil + } + res["freeStorageSpace"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFreeStorageSpace(val) + } + return nil + } + res["imei"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImei(val) + } + return nil + } + res["ipAddressV4"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddressV4(val) + } + return nil + } + res["isEncrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEncrypted(val) + } + return nil + } + res["isSharedDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSharedDevice(val) + } + return nil + } + res["isSupervised"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSupervised(val) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["meid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMeid(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(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["operatingSystemEdition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemEdition(val) + } + return nil + } + res["operatingSystemLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemLanguage(val) + } + return nil + } + res["operatingSystemProductType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystemProductType(val) + } + return nil + } + res["osBuildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsBuildNumber(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["productName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProductName(val) + } + return nil + } + res["residentUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetResidentUsersCount(val) + } + return nil + } + res["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + res["sharedDeviceCachedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedAppleDeviceUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedAppleDeviceUserable, len(val)) + for i, v := range val { + res[i] = v.(SharedAppleDeviceUserable) + } + m.SetSharedDeviceCachedUsers(res) + } + return nil + } + res["subnetAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubnetAddress(val) + } + return nil + } + res["subscriberCarrier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriberCarrier(val) + } + return nil + } + res["systemManagementBIOSVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSystemManagementBIOSVersion(val) + } + return nil + } + res["totalStorageSpace"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalStorageSpace(val) + } + return nil + } + res["tpmManufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTpmManufacturer(val) + } + return nil + } + res["tpmSpecificationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTpmSpecificationVersion(val) + } + return nil + } + res["tpmVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTpmVersion(val) + } + return nil + } + res["wifiMac"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiMac(val) + } + return nil + } + res["wiredIPv4Addresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetWiredIPv4Addresses(res) + } + return nil + } + return res +} +// GetFreeStorageSpace gets the freeStorageSpace property value. Free storage space of the device. +func (m *HardwareInformation) GetFreeStorageSpace()(*int64) { + return m.freeStorageSpace +} +// GetImei gets the imei property value. IMEI +func (m *HardwareInformation) GetImei()(*string) { + return m.imei +} +// GetIpAddressV4 gets the ipAddressV4 property value. IPAddressV4 +func (m *HardwareInformation) GetIpAddressV4()(*string) { + return m.ipAddressV4 +} +// GetIsEncrypted gets the isEncrypted property value. Encryption status of the device +func (m *HardwareInformation) GetIsEncrypted()(*bool) { + return m.isEncrypted +} +// GetIsSharedDevice gets the isSharedDevice property value. Shared iPad +func (m *HardwareInformation) GetIsSharedDevice()(*bool) { + return m.isSharedDevice +} +// GetIsSupervised gets the isSupervised property value. Supervised mode of the device +func (m *HardwareInformation) GetIsSupervised()(*bool) { + return m.isSupervised +} +// GetManufacturer gets the manufacturer property value. Manufacturer of the device +func (m *HardwareInformation) GetManufacturer()(*string) { + return m.manufacturer +} +// GetMeid gets the meid property value. MEID +func (m *HardwareInformation) GetMeid()(*string) { + return m.meid +} +// GetModel gets the model property value. Model of the device +func (m *HardwareInformation) GetModel()(*string) { + return m.model +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *HardwareInformation) GetOdataType()(*string) { + return m.odataType +} +// GetOperatingSystemEdition gets the operatingSystemEdition property value. String that specifies the OS edition. +func (m *HardwareInformation) GetOperatingSystemEdition()(*string) { + return m.operatingSystemEdition +} +// GetOperatingSystemLanguage gets the operatingSystemLanguage property value. Operating system language of the device +func (m *HardwareInformation) GetOperatingSystemLanguage()(*string) { + return m.operatingSystemLanguage +} +// GetOperatingSystemProductType gets the operatingSystemProductType property value. Int that specifies the Windows Operating System ProductType. More details here https://go.microsoft.com/fwlink/?linkid=2126950. Valid values 0 to 2147483647 +func (m *HardwareInformation) GetOperatingSystemProductType()(*int32) { + return m.operatingSystemProductType +} +// GetOsBuildNumber gets the osBuildNumber property value. Operating System Build Number on Android device +func (m *HardwareInformation) GetOsBuildNumber()(*string) { + return m.osBuildNumber +} +// GetPhoneNumber gets the phoneNumber property value. Phone number of the device +func (m *HardwareInformation) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetProductName gets the productName property value. The product name, e.g. iPad8,12 etc. The update frequency of this property is weekly. Note this property is currently supported only on iOS/MacOS devices, and is available only when Device Information access right is obtained. +func (m *HardwareInformation) GetProductName()(*string) { + return m.productName +} +// GetResidentUsersCount gets the residentUsersCount property value. The number of users currently on this device, or null (default) if the value of this property cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 13.4 and later, and is available only when Device Information access right is obtained. Valid values 0 to 2147483647 +func (m *HardwareInformation) GetResidentUsersCount()(*int32) { + return m.residentUsersCount +} +// GetSerialNumber gets the serialNumber property value. Serial number. +func (m *HardwareInformation) GetSerialNumber()(*string) { + return m.serialNumber +} +// GetSharedDeviceCachedUsers gets the sharedDeviceCachedUsers property value. All users on the shared Apple device +func (m *HardwareInformation) GetSharedDeviceCachedUsers()([]SharedAppleDeviceUserable) { + return m.sharedDeviceCachedUsers +} +// GetSubnetAddress gets the subnetAddress property value. SubnetAddress +func (m *HardwareInformation) GetSubnetAddress()(*string) { + return m.subnetAddress +} +// GetSubscriberCarrier gets the subscriberCarrier property value. Subscriber carrier of the device +func (m *HardwareInformation) GetSubscriberCarrier()(*string) { + return m.subscriberCarrier +} +// GetSystemManagementBIOSVersion gets the systemManagementBIOSVersion property value. BIOS version as reported by SMBIOS +func (m *HardwareInformation) GetSystemManagementBIOSVersion()(*string) { + return m.systemManagementBIOSVersion +} +// GetTotalStorageSpace gets the totalStorageSpace property value. Total storage space of the device. +func (m *HardwareInformation) GetTotalStorageSpace()(*int64) { + return m.totalStorageSpace +} +// GetTpmManufacturer gets the tpmManufacturer property value. The identifying information that uniquely names the TPM manufacturer +func (m *HardwareInformation) GetTpmManufacturer()(*string) { + return m.tpmManufacturer +} +// GetTpmSpecificationVersion gets the tpmSpecificationVersion property value. String that specifies the specification version. +func (m *HardwareInformation) GetTpmSpecificationVersion()(*string) { + return m.tpmSpecificationVersion +} +// GetTpmVersion gets the tpmVersion property value. The version of the TPM, as specified by the manufacturer +func (m *HardwareInformation) GetTpmVersion()(*string) { + return m.tpmVersion +} +// GetWifiMac gets the wifiMac property value. WiFi MAC address of the device +func (m *HardwareInformation) GetWifiMac()(*string) { + return m.wifiMac +} +// GetWiredIPv4Addresses gets the wiredIPv4Addresses property value. A list of wired IPv4 addresses. The update frequency (the maximum delay for the change of property value to be synchronized from the device to the cloud storage) of this property is daily. Note this property is currently supported only on devices running on Windows. +func (m *HardwareInformation) GetWiredIPv4Addresses()([]string) { + return m.wiredIPv4Addresses +} +// Serialize serializes information the current object +func (m *HardwareInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("batteryChargeCycles", m.GetBatteryChargeCycles()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("batteryHealthPercentage", m.GetBatteryHealthPercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("batteryLevelPercentage", m.GetBatteryLevelPercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("batterySerialNumber", m.GetBatterySerialNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cellularTechnology", m.GetCellularTechnology()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceFullQualifiedDomainName", m.GetDeviceFullQualifiedDomainName()) + if err != nil { + return err + } + } + if m.GetDeviceGuardLocalSystemAuthorityCredentialGuardState() != nil { + cast := (*m.GetDeviceGuardLocalSystemAuthorityCredentialGuardState()).String() + err := writer.WriteStringValue("deviceGuardLocalSystemAuthorityCredentialGuardState", &cast) + if err != nil { + return err + } + } + if m.GetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState() != nil { + cast := (*m.GetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState()).String() + err := writer.WriteStringValue("deviceGuardVirtualizationBasedSecurityHardwareRequirementState", &cast) + if err != nil { + return err + } + } + if m.GetDeviceGuardVirtualizationBasedSecurityState() != nil { + cast := (*m.GetDeviceGuardVirtualizationBasedSecurityState()).String() + err := writer.WriteStringValue("deviceGuardVirtualizationBasedSecurityState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("deviceLicensingLastErrorCode", m.GetDeviceLicensingLastErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceLicensingLastErrorDescription", m.GetDeviceLicensingLastErrorDescription()) + if err != nil { + return err + } + } + if m.GetDeviceLicensingStatus() != nil { + cast := (*m.GetDeviceLicensingStatus()).String() + err := writer.WriteStringValue("deviceLicensingStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("esimIdentifier", m.GetEsimIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("freeStorageSpace", m.GetFreeStorageSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("imei", m.GetImei()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipAddressV4", m.GetIpAddressV4()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEncrypted", m.GetIsEncrypted()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSharedDevice", m.GetIsSharedDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSupervised", m.GetIsSupervised()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("meid", m.GetMeid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystemEdition", m.GetOperatingSystemEdition()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("operatingSystemLanguage", m.GetOperatingSystemLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("operatingSystemProductType", m.GetOperatingSystemProductType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("osBuildNumber", m.GetOsBuildNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("productName", m.GetProductName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("residentUsersCount", m.GetResidentUsersCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("serialNumber", m.GetSerialNumber()) + if err != nil { + return err + } + } + if m.GetSharedDeviceCachedUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharedDeviceCachedUsers())) + for i, v := range m.GetSharedDeviceCachedUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sharedDeviceCachedUsers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subnetAddress", m.GetSubnetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriberCarrier", m.GetSubscriberCarrier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("systemManagementBIOSVersion", m.GetSystemManagementBIOSVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("totalStorageSpace", m.GetTotalStorageSpace()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tpmManufacturer", m.GetTpmManufacturer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tpmSpecificationVersion", m.GetTpmSpecificationVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tpmVersion", m.GetTpmVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("wifiMac", m.GetWifiMac()) + if err != nil { + return err + } + } + if m.GetWiredIPv4Addresses() != nil { + err := writer.WriteCollectionOfStringValues("wiredIPv4Addresses", m.GetWiredIPv4Addresses()) + 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 *HardwareInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBatteryChargeCycles sets the batteryChargeCycles property value. The number of charge cycles the device’s current battery has gone through. Valid values 0 to 2147483647 +func (m *HardwareInformation) SetBatteryChargeCycles(value *int32)() { + m.batteryChargeCycles = value +} +// SetBatteryHealthPercentage sets the batteryHealthPercentage property value. The device’s current battery’s health percentage. Valid values 0 to 100 +func (m *HardwareInformation) SetBatteryHealthPercentage(value *int32)() { + m.batteryHealthPercentage = value +} +// SetBatteryLevelPercentage sets the batteryLevelPercentage property value. The battery level, between 0.0 and 100, or null if the battery level cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 5.0 and later, and is available only when Device Information access right is obtained. Valid values 0 to 100 +func (m *HardwareInformation) SetBatteryLevelPercentage(value *float64)() { + m.batteryLevelPercentage = value +} +// SetBatterySerialNumber sets the batterySerialNumber property value. The serial number of the device’s current battery +func (m *HardwareInformation) SetBatterySerialNumber(value *string)() { + m.batterySerialNumber = value +} +// SetCellularTechnology sets the cellularTechnology property value. Cellular technology of the device +func (m *HardwareInformation) SetCellularTechnology(value *string)() { + m.cellularTechnology = value +} +// SetDeviceFullQualifiedDomainName sets the deviceFullQualifiedDomainName property value. Returns the fully qualified domain name of the device (if any). If the device is not domain-joined, it returns an empty string. +func (m *HardwareInformation) SetDeviceFullQualifiedDomainName(value *string)() { + m.deviceFullQualifiedDomainName = value +} +// SetDeviceGuardLocalSystemAuthorityCredentialGuardState sets the deviceGuardLocalSystemAuthorityCredentialGuardState property value. The deviceGuardLocalSystemAuthorityCredentialGuardState property +func (m *HardwareInformation) SetDeviceGuardLocalSystemAuthorityCredentialGuardState(value *DeviceGuardLocalSystemAuthorityCredentialGuardState)() { + m.deviceGuardLocalSystemAuthorityCredentialGuardState = value +} +// SetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState sets the deviceGuardVirtualizationBasedSecurityHardwareRequirementState property value. The deviceGuardVirtualizationBasedSecurityHardwareRequirementState property +func (m *HardwareInformation) SetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState(value *DeviceGuardVirtualizationBasedSecurityHardwareRequirementState)() { + m.deviceGuardVirtualizationBasedSecurityHardwareRequirementState = value +} +// SetDeviceGuardVirtualizationBasedSecurityState sets the deviceGuardVirtualizationBasedSecurityState property value. The deviceGuardVirtualizationBasedSecurityState property +func (m *HardwareInformation) SetDeviceGuardVirtualizationBasedSecurityState(value *DeviceGuardVirtualizationBasedSecurityState)() { + m.deviceGuardVirtualizationBasedSecurityState = value +} +// SetDeviceLicensingLastErrorCode sets the deviceLicensingLastErrorCode property value. A standard error code indicating the last error, or 0 indicating no error (default). The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. Valid values 0 to 2147483647 +func (m *HardwareInformation) SetDeviceLicensingLastErrorCode(value *int32)() { + m.deviceLicensingLastErrorCode = value +} +// SetDeviceLicensingLastErrorDescription sets the deviceLicensingLastErrorDescription property value. Error text message as a descripition for deviceLicensingLastErrorCode. The update frequency of this property is daily. Note this property is currently supported only for Windows based Device based subscription licensing. +func (m *HardwareInformation) SetDeviceLicensingLastErrorDescription(value *string)() { + m.deviceLicensingLastErrorDescription = value +} +// SetDeviceLicensingStatus sets the deviceLicensingStatus property value. Indicates the device licensing status after Windows device based subscription has been enabled. +func (m *HardwareInformation) SetDeviceLicensingStatus(value *DeviceLicensingStatus)() { + m.deviceLicensingStatus = value +} +// SetEsimIdentifier sets the esimIdentifier property value. eSIM identifier +func (m *HardwareInformation) SetEsimIdentifier(value *string)() { + m.esimIdentifier = value +} +// SetFreeStorageSpace sets the freeStorageSpace property value. Free storage space of the device. +func (m *HardwareInformation) SetFreeStorageSpace(value *int64)() { + m.freeStorageSpace = value +} +// SetImei sets the imei property value. IMEI +func (m *HardwareInformation) SetImei(value *string)() { + m.imei = value +} +// SetIpAddressV4 sets the ipAddressV4 property value. IPAddressV4 +func (m *HardwareInformation) SetIpAddressV4(value *string)() { + m.ipAddressV4 = value +} +// SetIsEncrypted sets the isEncrypted property value. Encryption status of the device +func (m *HardwareInformation) SetIsEncrypted(value *bool)() { + m.isEncrypted = value +} +// SetIsSharedDevice sets the isSharedDevice property value. Shared iPad +func (m *HardwareInformation) SetIsSharedDevice(value *bool)() { + m.isSharedDevice = value +} +// SetIsSupervised sets the isSupervised property value. Supervised mode of the device +func (m *HardwareInformation) SetIsSupervised(value *bool)() { + m.isSupervised = value +} +// SetManufacturer sets the manufacturer property value. Manufacturer of the device +func (m *HardwareInformation) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetMeid sets the meid property value. MEID +func (m *HardwareInformation) SetMeid(value *string)() { + m.meid = value +} +// SetModel sets the model property value. Model of the device +func (m *HardwareInformation) SetModel(value *string)() { + m.model = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *HardwareInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOperatingSystemEdition sets the operatingSystemEdition property value. String that specifies the OS edition. +func (m *HardwareInformation) SetOperatingSystemEdition(value *string)() { + m.operatingSystemEdition = value +} +// SetOperatingSystemLanguage sets the operatingSystemLanguage property value. Operating system language of the device +func (m *HardwareInformation) SetOperatingSystemLanguage(value *string)() { + m.operatingSystemLanguage = value +} +// SetOperatingSystemProductType sets the operatingSystemProductType property value. Int that specifies the Windows Operating System ProductType. More details here https://go.microsoft.com/fwlink/?linkid=2126950. Valid values 0 to 2147483647 +func (m *HardwareInformation) SetOperatingSystemProductType(value *int32)() { + m.operatingSystemProductType = value +} +// SetOsBuildNumber sets the osBuildNumber property value. Operating System Build Number on Android device +func (m *HardwareInformation) SetOsBuildNumber(value *string)() { + m.osBuildNumber = value +} +// SetPhoneNumber sets the phoneNumber property value. Phone number of the device +func (m *HardwareInformation) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetProductName sets the productName property value. The product name, e.g. iPad8,12 etc. The update frequency of this property is weekly. Note this property is currently supported only on iOS/MacOS devices, and is available only when Device Information access right is obtained. +func (m *HardwareInformation) SetProductName(value *string)() { + m.productName = value +} +// SetResidentUsersCount sets the residentUsersCount property value. The number of users currently on this device, or null (default) if the value of this property cannot be determined. The update frequency of this property is per-checkin. Note this property is currently supported only on devices running iOS 13.4 and later, and is available only when Device Information access right is obtained. Valid values 0 to 2147483647 +func (m *HardwareInformation) SetResidentUsersCount(value *int32)() { + m.residentUsersCount = value +} +// SetSerialNumber sets the serialNumber property value. Serial number. +func (m *HardwareInformation) SetSerialNumber(value *string)() { + m.serialNumber = value +} +// SetSharedDeviceCachedUsers sets the sharedDeviceCachedUsers property value. All users on the shared Apple device +func (m *HardwareInformation) SetSharedDeviceCachedUsers(value []SharedAppleDeviceUserable)() { + m.sharedDeviceCachedUsers = value +} +// SetSubnetAddress sets the subnetAddress property value. SubnetAddress +func (m *HardwareInformation) SetSubnetAddress(value *string)() { + m.subnetAddress = value +} +// SetSubscriberCarrier sets the subscriberCarrier property value. Subscriber carrier of the device +func (m *HardwareInformation) SetSubscriberCarrier(value *string)() { + m.subscriberCarrier = value +} +// SetSystemManagementBIOSVersion sets the systemManagementBIOSVersion property value. BIOS version as reported by SMBIOS +func (m *HardwareInformation) SetSystemManagementBIOSVersion(value *string)() { + m.systemManagementBIOSVersion = value +} +// SetTotalStorageSpace sets the totalStorageSpace property value. Total storage space of the device. +func (m *HardwareInformation) SetTotalStorageSpace(value *int64)() { + m.totalStorageSpace = value +} +// SetTpmManufacturer sets the tpmManufacturer property value. The identifying information that uniquely names the TPM manufacturer +func (m *HardwareInformation) SetTpmManufacturer(value *string)() { + m.tpmManufacturer = value +} +// SetTpmSpecificationVersion sets the tpmSpecificationVersion property value. String that specifies the specification version. +func (m *HardwareInformation) SetTpmSpecificationVersion(value *string)() { + m.tpmSpecificationVersion = value +} +// SetTpmVersion sets the tpmVersion property value. The version of the TPM, as specified by the manufacturer +func (m *HardwareInformation) SetTpmVersion(value *string)() { + m.tpmVersion = value +} +// SetWifiMac sets the wifiMac property value. WiFi MAC address of the device +func (m *HardwareInformation) SetWifiMac(value *string)() { + m.wifiMac = value +} +// SetWiredIPv4Addresses sets the wiredIPv4Addresses property value. A list of wired IPv4 addresses. The update frequency (the maximum delay for the change of property value to be synchronized from the device to the cloud storage) of this property is daily. Note this property is currently supported only on devices running on Windows. +func (m *HardwareInformation) SetWiredIPv4Addresses(value []string)() { + m.wiredIPv4Addresses = value +} diff --git a/src/internal/connector/graph/betasdk/models/hardware_informationable.go b/src/internal/connector/graph/betasdk/models/hardware_informationable.go new file mode 100644 index 000000000..0e0297641 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hardware_informationable.go @@ -0,0 +1,93 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HardwareInformationable +type HardwareInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBatteryChargeCycles()(*int32) + GetBatteryHealthPercentage()(*int32) + GetBatteryLevelPercentage()(*float64) + GetBatterySerialNumber()(*string) + GetCellularTechnology()(*string) + GetDeviceFullQualifiedDomainName()(*string) + GetDeviceGuardLocalSystemAuthorityCredentialGuardState()(*DeviceGuardLocalSystemAuthorityCredentialGuardState) + GetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState()(*DeviceGuardVirtualizationBasedSecurityHardwareRequirementState) + GetDeviceGuardVirtualizationBasedSecurityState()(*DeviceGuardVirtualizationBasedSecurityState) + GetDeviceLicensingLastErrorCode()(*int32) + GetDeviceLicensingLastErrorDescription()(*string) + GetDeviceLicensingStatus()(*DeviceLicensingStatus) + GetEsimIdentifier()(*string) + GetFreeStorageSpace()(*int64) + GetImei()(*string) + GetIpAddressV4()(*string) + GetIsEncrypted()(*bool) + GetIsSharedDevice()(*bool) + GetIsSupervised()(*bool) + GetManufacturer()(*string) + GetMeid()(*string) + GetModel()(*string) + GetOdataType()(*string) + GetOperatingSystemEdition()(*string) + GetOperatingSystemLanguage()(*string) + GetOperatingSystemProductType()(*int32) + GetOsBuildNumber()(*string) + GetPhoneNumber()(*string) + GetProductName()(*string) + GetResidentUsersCount()(*int32) + GetSerialNumber()(*string) + GetSharedDeviceCachedUsers()([]SharedAppleDeviceUserable) + GetSubnetAddress()(*string) + GetSubscriberCarrier()(*string) + GetSystemManagementBIOSVersion()(*string) + GetTotalStorageSpace()(*int64) + GetTpmManufacturer()(*string) + GetTpmSpecificationVersion()(*string) + GetTpmVersion()(*string) + GetWifiMac()(*string) + GetWiredIPv4Addresses()([]string) + SetBatteryChargeCycles(value *int32)() + SetBatteryHealthPercentage(value *int32)() + SetBatteryLevelPercentage(value *float64)() + SetBatterySerialNumber(value *string)() + SetCellularTechnology(value *string)() + SetDeviceFullQualifiedDomainName(value *string)() + SetDeviceGuardLocalSystemAuthorityCredentialGuardState(value *DeviceGuardLocalSystemAuthorityCredentialGuardState)() + SetDeviceGuardVirtualizationBasedSecurityHardwareRequirementState(value *DeviceGuardVirtualizationBasedSecurityHardwareRequirementState)() + SetDeviceGuardVirtualizationBasedSecurityState(value *DeviceGuardVirtualizationBasedSecurityState)() + SetDeviceLicensingLastErrorCode(value *int32)() + SetDeviceLicensingLastErrorDescription(value *string)() + SetDeviceLicensingStatus(value *DeviceLicensingStatus)() + SetEsimIdentifier(value *string)() + SetFreeStorageSpace(value *int64)() + SetImei(value *string)() + SetIpAddressV4(value *string)() + SetIsEncrypted(value *bool)() + SetIsSharedDevice(value *bool)() + SetIsSupervised(value *bool)() + SetManufacturer(value *string)() + SetMeid(value *string)() + SetModel(value *string)() + SetOdataType(value *string)() + SetOperatingSystemEdition(value *string)() + SetOperatingSystemLanguage(value *string)() + SetOperatingSystemProductType(value *int32)() + SetOsBuildNumber(value *string)() + SetPhoneNumber(value *string)() + SetProductName(value *string)() + SetResidentUsersCount(value *int32)() + SetSerialNumber(value *string)() + SetSharedDeviceCachedUsers(value []SharedAppleDeviceUserable)() + SetSubnetAddress(value *string)() + SetSubscriberCarrier(value *string)() + SetSystemManagementBIOSVersion(value *string)() + SetTotalStorageSpace(value *int64)() + SetTpmManufacturer(value *string)() + SetTpmSpecificationVersion(value *string)() + SetTpmVersion(value *string)() + SetWifiMac(value *string)() + SetWiredIPv4Addresses(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/hash_algorithms.go b/src/internal/connector/graph/betasdk/models/hash_algorithms.go new file mode 100644 index 000000000..1365ff02e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hash_algorithms.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HashAlgorithms int + +const ( + // SHA-1 Hash Algorithm. + SHA1_HASHALGORITHMS HashAlgorithms = iota + // SHA-2 Hash Algorithm. + SHA2_HASHALGORITHMS +) + +func (i HashAlgorithms) String() string { + return []string{"sha1", "sha2"}[i] +} +func ParseHashAlgorithms(v string) (interface{}, error) { + result := SHA1_HASHALGORITHMS + switch v { + case "sha1": + result = SHA1_HASHALGORITHMS + case "sha2": + result = SHA2_HASHALGORITHMS + default: + return 0, errors.New("Unknown HashAlgorithms value: " + v) + } + return &result, nil +} +func SerializeHashAlgorithms(values []HashAlgorithms) []string { + 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/hashes.go b/src/internal/connector/graph/betasdk/models/hashes.go new file mode 100644 index 000000000..496227268 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hashes.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Hashes +type Hashes 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 CRC32 value of the file (if available). Read-only. + crc32Hash *string + // The OdataType property + odataType *string + // A proprietary hash of the file that can be used to determine if the contents of the file have changed (if available). Read-only. + quickXorHash *string + // SHA1 hash for the contents of the file (if available). Read-only. + sha1Hash *string + // SHA256 hash for the contents of the file (if available). Read-only. + sha256Hash *string +} +// NewHashes instantiates a new hashes and sets the default values. +func NewHashes()(*Hashes) { + m := &Hashes{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHashesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHashesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHashes(), 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 *Hashes) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCrc32Hash gets the crc32Hash property value. The CRC32 value of the file (if available). Read-only. +func (m *Hashes) GetCrc32Hash()(*string) { + return m.crc32Hash +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Hashes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["crc32Hash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCrc32Hash(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["quickXorHash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuickXorHash(val) + } + return nil + } + res["sha1Hash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha1Hash(val) + } + return nil + } + res["sha256Hash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha256Hash(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Hashes) GetOdataType()(*string) { + return m.odataType +} +// GetQuickXorHash gets the quickXorHash property value. A proprietary hash of the file that can be used to determine if the contents of the file have changed (if available). Read-only. +func (m *Hashes) GetQuickXorHash()(*string) { + return m.quickXorHash +} +// GetSha1Hash gets the sha1Hash property value. SHA1 hash for the contents of the file (if available). Read-only. +func (m *Hashes) GetSha1Hash()(*string) { + return m.sha1Hash +} +// GetSha256Hash gets the sha256Hash property value. SHA256 hash for the contents of the file (if available). Read-only. +func (m *Hashes) GetSha256Hash()(*string) { + return m.sha256Hash +} +// Serialize serializes information the current object +func (m *Hashes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("crc32Hash", m.GetCrc32Hash()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("quickXorHash", m.GetQuickXorHash()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha1Hash", m.GetSha1Hash()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha256Hash", m.GetSha256Hash()) + 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 *Hashes) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCrc32Hash sets the crc32Hash property value. The CRC32 value of the file (if available). Read-only. +func (m *Hashes) SetCrc32Hash(value *string)() { + m.crc32Hash = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Hashes) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuickXorHash sets the quickXorHash property value. A proprietary hash of the file that can be used to determine if the contents of the file have changed (if available). Read-only. +func (m *Hashes) SetQuickXorHash(value *string)() { + m.quickXorHash = value +} +// SetSha1Hash sets the sha1Hash property value. SHA1 hash for the contents of the file (if available). Read-only. +func (m *Hashes) SetSha1Hash(value *string)() { + m.sha1Hash = value +} +// SetSha256Hash sets the sha256Hash property value. SHA256 hash for the contents of the file (if available). Read-only. +func (m *Hashes) SetSha256Hash(value *string)() { + m.sha256Hash = value +} diff --git a/src/internal/connector/graph/betasdk/models/hashesable.go b/src/internal/connector/graph/betasdk/models/hashesable.go new file mode 100644 index 000000000..a12643112 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hashesable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Hashesable +type Hashesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCrc32Hash()(*string) + GetOdataType()(*string) + GetQuickXorHash()(*string) + GetSha1Hash()(*string) + GetSha256Hash()(*string) + SetCrc32Hash(value *string)() + SetOdataType(value *string)() + SetQuickXorHash(value *string)() + SetSha1Hash(value *string)() + SetSha256Hash(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/health_state.go b/src/internal/connector/graph/betasdk/models/health_state.go new file mode 100644 index 000000000..7d19f3bc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/health_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HealthState int + +const ( + // Unknown state. + UNKNOWN_HEALTHSTATE HealthState = iota + // Healthy state. + HEALTHY_HEALTHSTATE + // Unhealthy state. + UNHEALTHY_HEALTHSTATE +) + +func (i HealthState) String() string { + return []string{"unknown", "healthy", "unhealthy"}[i] +} +func ParseHealthState(v string) (interface{}, error) { + result := UNKNOWN_HEALTHSTATE + switch v { + case "unknown": + result = UNKNOWN_HEALTHSTATE + case "healthy": + result = HEALTHY_HEALTHSTATE + case "unhealthy": + result = UNHEALTHY_HEALTHSTATE + default: + return 0, errors.New("Unknown HealthState value: " + v) + } + return &result, nil +} +func SerializeHealthState(values []HealthState) []string { + 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/home_realm_discovery_policy.go b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy.go new file mode 100644 index 000000000..b4d2666e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HomeRealmDiscoveryPolicy +type HomeRealmDiscoveryPolicy struct { + StsPolicy +} +// NewHomeRealmDiscoveryPolicy instantiates a new HomeRealmDiscoveryPolicy and sets the default values. +func NewHomeRealmDiscoveryPolicy()(*HomeRealmDiscoveryPolicy) { + m := &HomeRealmDiscoveryPolicy{ + StsPolicy: *NewStsPolicy(), + } + odataTypeValue := "#microsoft.graph.homeRealmDiscoveryPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateHomeRealmDiscoveryPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHomeRealmDiscoveryPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHomeRealmDiscoveryPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HomeRealmDiscoveryPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.StsPolicy.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *HomeRealmDiscoveryPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.StsPolicy.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_response.go new file mode 100644 index 000000000..11f73ec4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HomeRealmDiscoveryPolicyCollectionResponse +type HomeRealmDiscoveryPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []HomeRealmDiscoveryPolicyable +} +// NewHomeRealmDiscoveryPolicyCollectionResponse instantiates a new HomeRealmDiscoveryPolicyCollectionResponse and sets the default values. +func NewHomeRealmDiscoveryPolicyCollectionResponse()(*HomeRealmDiscoveryPolicyCollectionResponse) { + m := &HomeRealmDiscoveryPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHomeRealmDiscoveryPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHomeRealmDiscoveryPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHomeRealmDiscoveryPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HomeRealmDiscoveryPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHomeRealmDiscoveryPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HomeRealmDiscoveryPolicyable, len(val)) + for i, v := range val { + res[i] = v.(HomeRealmDiscoveryPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HomeRealmDiscoveryPolicyCollectionResponse) GetValue()([]HomeRealmDiscoveryPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *HomeRealmDiscoveryPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HomeRealmDiscoveryPolicyCollectionResponse) SetValue(value []HomeRealmDiscoveryPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_responseable.go new file mode 100644 index 000000000..b5896f375 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HomeRealmDiscoveryPolicyCollectionResponseable +type HomeRealmDiscoveryPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HomeRealmDiscoveryPolicyable) + SetValue(value []HomeRealmDiscoveryPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/home_realm_discovery_policyable.go b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policyable.go new file mode 100644 index 000000000..962f9d6b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/home_realm_discovery_policyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HomeRealmDiscoveryPolicyable +type HomeRealmDiscoveryPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + StsPolicyable +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section.go b/src/internal/connector/graph/betasdk/models/horizontal_section.go new file mode 100644 index 000000000..69d1b65b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HorizontalSection struct { + Entity + // The set of vertical columns in this section. + columns []HorizontalSectionColumnable + // Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue. + emphasis *SectionEmphasisType + // Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue. + layout *HorizontalSectionLayoutType +} +// NewHorizontalSection instantiates a new horizontalSection and sets the default values. +func NewHorizontalSection()(*HorizontalSection) { + m := &HorizontalSection{ + Entity: *NewEntity(), + } + return m +} +// CreateHorizontalSectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHorizontalSectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHorizontalSection(), nil +} +// GetColumns gets the columns property value. The set of vertical columns in this section. +func (m *HorizontalSection) GetColumns()([]HorizontalSectionColumnable) { + return m.columns +} +// GetEmphasis gets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue. +func (m *HorizontalSection) GetEmphasis()(*SectionEmphasisType) { + return m.emphasis +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HorizontalSection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["columns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HorizontalSectionColumnable, len(val)) + for i, v := range val { + res[i] = v.(HorizontalSectionColumnable) + } + m.SetColumns(res) + } + return nil + } + res["emphasis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSectionEmphasisType) + if err != nil { + return err + } + if val != nil { + m.SetEmphasis(val.(*SectionEmphasisType)) + } + return nil + } + res["layout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHorizontalSectionLayoutType) + if err != nil { + return err + } + if val != nil { + m.SetLayout(val.(*HorizontalSectionLayoutType)) + } + return nil + } + return res +} +// GetLayout gets the layout property value. Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue. +func (m *HorizontalSection) GetLayout()(*HorizontalSectionLayoutType) { + return m.layout +} +// Serialize serializes information the current object +func (m *HorizontalSection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumns())) + for i, v := range m.GetColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columns", cast) + if err != nil { + return err + } + } + if m.GetEmphasis() != nil { + cast := (*m.GetEmphasis()).String() + err = writer.WriteStringValue("emphasis", &cast) + if err != nil { + return err + } + } + if m.GetLayout() != nil { + cast := (*m.GetLayout()).String() + err = writer.WriteStringValue("layout", &cast) + if err != nil { + return err + } + } + return nil +} +// SetColumns sets the columns property value. The set of vertical columns in this section. +func (m *HorizontalSection) SetColumns(value []HorizontalSectionColumnable)() { + m.columns = value +} +// SetEmphasis sets the emphasis property value. Enumeration value that indicates the emphasis of the section background. The possible values are: none, netural, soft, strong, unknownFutureValue. +func (m *HorizontalSection) SetEmphasis(value *SectionEmphasisType)() { + m.emphasis = value +} +// SetLayout sets the layout property value. Layout type of the section. The possible values are: none, oneColumn, twoColumns, threeColumns, oneThirdLeftColumn, oneThirdRightColumn, fullWidth, unknownFutureValue. +func (m *HorizontalSection) SetLayout(value *HorizontalSectionLayoutType)() { + m.layout = value +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_collection_response.go b/src/internal/connector/graph/betasdk/models/horizontal_section_collection_response.go new file mode 100644 index 000000000..1598b72ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionCollectionResponse +type HorizontalSectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []HorizontalSectionable +} +// NewHorizontalSectionCollectionResponse instantiates a new HorizontalSectionCollectionResponse and sets the default values. +func NewHorizontalSectionCollectionResponse()(*HorizontalSectionCollectionResponse) { + m := &HorizontalSectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHorizontalSectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHorizontalSectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHorizontalSectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HorizontalSectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HorizontalSectionable, len(val)) + for i, v := range val { + res[i] = v.(HorizontalSectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HorizontalSectionCollectionResponse) GetValue()([]HorizontalSectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *HorizontalSectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HorizontalSectionCollectionResponse) SetValue(value []HorizontalSectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_collection_responseable.go b/src/internal/connector/graph/betasdk/models/horizontal_section_collection_responseable.go new file mode 100644 index 000000000..b2d0dda03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionCollectionResponseable +type HorizontalSectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HorizontalSectionable) + SetValue(value []HorizontalSectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_column.go b/src/internal/connector/graph/betasdk/models/horizontal_section_column.go new file mode 100644 index 000000000..185bbebf4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_column.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionColumn provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HorizontalSectionColumn struct { + Entity + // The collection of WebParts in this column. + webparts []WebPartable + // Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section. + width *int32 +} +// NewHorizontalSectionColumn instantiates a new horizontalSectionColumn and sets the default values. +func NewHorizontalSectionColumn()(*HorizontalSectionColumn) { + m := &HorizontalSectionColumn{ + Entity: *NewEntity(), + } + return m +} +// CreateHorizontalSectionColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHorizontalSectionColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHorizontalSectionColumn(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HorizontalSectionColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["webparts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWebPartFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WebPartable, len(val)) + for i, v := range val { + res[i] = v.(WebPartable) + } + m.SetWebparts(res) + } + return nil + } + res["width"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWidth(val) + } + return nil + } + return res +} +// GetWebparts gets the webparts property value. The collection of WebParts in this column. +func (m *HorizontalSectionColumn) GetWebparts()([]WebPartable) { + return m.webparts +} +// GetWidth gets the width property value. Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section. +func (m *HorizontalSectionColumn) GetWidth()(*int32) { + return m.width +} +// Serialize serializes information the current object +func (m *HorizontalSectionColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetWebparts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebparts())) + for i, v := range m.GetWebparts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("webparts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("width", m.GetWidth()) + if err != nil { + return err + } + } + return nil +} +// SetWebparts sets the webparts property value. The collection of WebParts in this column. +func (m *HorizontalSectionColumn) SetWebparts(value []WebPartable)() { + m.webparts = value +} +// SetWidth sets the width property value. Width of the column. A horizontal section is divided into 12 grids. A column should have a value of 1-12 to represent its range spans. For example, there can be two columns both have a width of 6 in a section. +func (m *HorizontalSectionColumn) SetWidth(value *int32)() { + m.width = value +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_response.go b/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_response.go new file mode 100644 index 000000000..451640db9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionColumnCollectionResponse +type HorizontalSectionColumnCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []HorizontalSectionColumnable +} +// NewHorizontalSectionColumnCollectionResponse instantiates a new HorizontalSectionColumnCollectionResponse and sets the default values. +func NewHorizontalSectionColumnCollectionResponse()(*HorizontalSectionColumnCollectionResponse) { + m := &HorizontalSectionColumnCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHorizontalSectionColumnCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHorizontalSectionColumnCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHorizontalSectionColumnCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HorizontalSectionColumnCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHorizontalSectionColumnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HorizontalSectionColumnable, len(val)) + for i, v := range val { + res[i] = v.(HorizontalSectionColumnable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HorizontalSectionColumnCollectionResponse) GetValue()([]HorizontalSectionColumnable) { + return m.value +} +// Serialize serializes information the current object +func (m *HorizontalSectionColumnCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HorizontalSectionColumnCollectionResponse) SetValue(value []HorizontalSectionColumnable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_responseable.go b/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_responseable.go new file mode 100644 index 000000000..c3668c2ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_column_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionColumnCollectionResponseable +type HorizontalSectionColumnCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HorizontalSectionColumnable) + SetValue(value []HorizontalSectionColumnable)() +} diff --git a/src/internal/connector/graph/betasdk/models/horizontal_section_columnable.go b/src/internal/connector/graph/betasdk/models/horizontal_section_columnable.go new file mode 100644 index 000000000..f8765c6a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_columnable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionColumnable +type HorizontalSectionColumnable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWebparts()([]WebPartable) + GetWidth()(*int32) + SetWebparts(value []WebPartable)() + SetWidth(value *int32)() +} 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 new file mode 100644 index 000000000..5df4cc79d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_section_layout_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HorizontalSectionLayoutType int + +const ( + 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] +} +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 +} +func SerializeHorizontalSectionLayoutType(values []HorizontalSectionLayoutType) []string { + 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/horizontal_sectionable.go b/src/internal/connector/graph/betasdk/models/horizontal_sectionable.go new file mode 100644 index 000000000..b8fb8b9e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/horizontal_sectionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HorizontalSectionable +type HorizontalSectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumns()([]HorizontalSectionColumnable) + GetEmphasis()(*SectionEmphasisType) + GetLayout()(*HorizontalSectionLayoutType) + SetColumns(value []HorizontalSectionColumnable)() + SetEmphasis(value *SectionEmphasisType)() + SetLayout(value *HorizontalSectionLayoutType)() +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_profile.go b/src/internal/connector/graph/betasdk/models/host_security_profile.go new file mode 100644 index 000000000..481205c61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_profile.go @@ -0,0 +1,527 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type HostSecurityProfile struct { + Entity + // The azureSubscriptionId property + azureSubscriptionId *string + // The azureTenantId property + azureTenantId *string + // The firstSeenDateTime property + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The fqdn property + fqdn *string + // The isAzureAdJoined property + isAzureAdJoined *bool + // The isAzureAdRegistered property + isAzureAdRegistered *bool + // The isHybridAzureDomainJoined property + isHybridAzureDomainJoined *bool + // The lastSeenDateTime property + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The logonUsers property + logonUsers []LogonUserable + // The netBiosName property + netBiosName *string + // The networkInterfaces property + networkInterfaces []NetworkInterfaceable + // The os property + os *string + // The osVersion property + osVersion *string + // The parentHost property + parentHost *string + // The relatedHostIds property + relatedHostIds []string + // The riskScore property + riskScore *string + // The tags property + tags []string + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewHostSecurityProfile instantiates a new hostSecurityProfile and sets the default values. +func NewHostSecurityProfile()(*HostSecurityProfile) { + m := &HostSecurityProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateHostSecurityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHostSecurityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHostSecurityProfile(), nil +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *HostSecurityProfile) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *HostSecurityProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HostSecurityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["fqdn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFqdn(val) + } + return nil + } + res["isAzureAdJoined"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAzureAdJoined(val) + } + return nil + } + res["isAzureAdRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAzureAdRegistered(val) + } + return nil + } + res["isHybridAzureDomainJoined"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHybridAzureDomainJoined(val) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["logonUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLogonUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LogonUserable, len(val)) + for i, v := range val { + res[i] = v.(LogonUserable) + } + m.SetLogonUsers(res) + } + return nil + } + res["netBiosName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetBiosName(val) + } + return nil + } + res["networkInterfaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNetworkInterfaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NetworkInterfaceable, len(val)) + for i, v := range val { + res[i] = v.(NetworkInterfaceable) + } + m.SetNetworkInterfaces(res) + } + return nil + } + res["os"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOs(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["parentHost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentHost(val) + } + return nil + } + res["relatedHostIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRelatedHostIds(res) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *HostSecurityProfile) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetFqdn gets the fqdn property value. The fqdn property +func (m *HostSecurityProfile) GetFqdn()(*string) { + return m.fqdn +} +// GetIsAzureAdJoined gets the isAzureAdJoined property value. The isAzureAdJoined property +func (m *HostSecurityProfile) GetIsAzureAdJoined()(*bool) { + return m.isAzureAdJoined +} +// GetIsAzureAdRegistered gets the isAzureAdRegistered property value. The isAzureAdRegistered property +func (m *HostSecurityProfile) GetIsAzureAdRegistered()(*bool) { + return m.isAzureAdRegistered +} +// GetIsHybridAzureDomainJoined gets the isHybridAzureDomainJoined property value. The isHybridAzureDomainJoined property +func (m *HostSecurityProfile) GetIsHybridAzureDomainJoined()(*bool) { + return m.isHybridAzureDomainJoined +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *HostSecurityProfile) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetLogonUsers gets the logonUsers property value. The logonUsers property +func (m *HostSecurityProfile) GetLogonUsers()([]LogonUserable) { + return m.logonUsers +} +// GetNetBiosName gets the netBiosName property value. The netBiosName property +func (m *HostSecurityProfile) GetNetBiosName()(*string) { + return m.netBiosName +} +// GetNetworkInterfaces gets the networkInterfaces property value. The networkInterfaces property +func (m *HostSecurityProfile) GetNetworkInterfaces()([]NetworkInterfaceable) { + return m.networkInterfaces +} +// GetOs gets the os property value. The os property +func (m *HostSecurityProfile) GetOs()(*string) { + return m.os +} +// GetOsVersion gets the osVersion property value. The osVersion property +func (m *HostSecurityProfile) GetOsVersion()(*string) { + return m.osVersion +} +// GetParentHost gets the parentHost property value. The parentHost property +func (m *HostSecurityProfile) GetParentHost()(*string) { + return m.parentHost +} +// GetRelatedHostIds gets the relatedHostIds property value. The relatedHostIds property +func (m *HostSecurityProfile) GetRelatedHostIds()([]string) { + return m.relatedHostIds +} +// GetRiskScore gets the riskScore property value. The riskScore property +func (m *HostSecurityProfile) GetRiskScore()(*string) { + return m.riskScore +} +// GetTags gets the tags property value. The tags property +func (m *HostSecurityProfile) GetTags()([]string) { + return m.tags +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *HostSecurityProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *HostSecurityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fqdn", m.GetFqdn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAzureAdJoined", m.GetIsAzureAdJoined()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAzureAdRegistered", m.GetIsAzureAdRegistered()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isHybridAzureDomainJoined", m.GetIsHybridAzureDomainJoined()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + if m.GetLogonUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLogonUsers())) + for i, v := range m.GetLogonUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("logonUsers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("netBiosName", m.GetNetBiosName()) + if err != nil { + return err + } + } + if m.GetNetworkInterfaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNetworkInterfaces())) + for i, v := range m.GetNetworkInterfaces() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("networkInterfaces", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("os", m.GetOs()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentHost", m.GetParentHost()) + if err != nil { + return err + } + } + if m.GetRelatedHostIds() != nil { + err = writer.WriteCollectionOfStringValues("relatedHostIds", m.GetRelatedHostIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *HostSecurityProfile) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *HostSecurityProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *HostSecurityProfile) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetFqdn sets the fqdn property value. The fqdn property +func (m *HostSecurityProfile) SetFqdn(value *string)() { + m.fqdn = value +} +// SetIsAzureAdJoined sets the isAzureAdJoined property value. The isAzureAdJoined property +func (m *HostSecurityProfile) SetIsAzureAdJoined(value *bool)() { + m.isAzureAdJoined = value +} +// SetIsAzureAdRegistered sets the isAzureAdRegistered property value. The isAzureAdRegistered property +func (m *HostSecurityProfile) SetIsAzureAdRegistered(value *bool)() { + m.isAzureAdRegistered = value +} +// SetIsHybridAzureDomainJoined sets the isHybridAzureDomainJoined property value. The isHybridAzureDomainJoined property +func (m *HostSecurityProfile) SetIsHybridAzureDomainJoined(value *bool)() { + m.isHybridAzureDomainJoined = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *HostSecurityProfile) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetLogonUsers sets the logonUsers property value. The logonUsers property +func (m *HostSecurityProfile) SetLogonUsers(value []LogonUserable)() { + m.logonUsers = value +} +// SetNetBiosName sets the netBiosName property value. The netBiosName property +func (m *HostSecurityProfile) SetNetBiosName(value *string)() { + m.netBiosName = value +} +// SetNetworkInterfaces sets the networkInterfaces property value. The networkInterfaces property +func (m *HostSecurityProfile) SetNetworkInterfaces(value []NetworkInterfaceable)() { + m.networkInterfaces = value +} +// SetOs sets the os property value. The os property +func (m *HostSecurityProfile) SetOs(value *string)() { + m.os = value +} +// SetOsVersion sets the osVersion property value. The osVersion property +func (m *HostSecurityProfile) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetParentHost sets the parentHost property value. The parentHost property +func (m *HostSecurityProfile) SetParentHost(value *string)() { + m.parentHost = value +} +// SetRelatedHostIds sets the relatedHostIds property value. The relatedHostIds property +func (m *HostSecurityProfile) SetRelatedHostIds(value []string)() { + m.relatedHostIds = value +} +// SetRiskScore sets the riskScore property value. The riskScore property +func (m *HostSecurityProfile) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetTags sets the tags property value. The tags property +func (m *HostSecurityProfile) SetTags(value []string)() { + m.tags = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *HostSecurityProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/host_security_profile_collection_response.go new file mode 100644 index 000000000..a594c3f1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityProfileCollectionResponse +type HostSecurityProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []HostSecurityProfileable +} +// NewHostSecurityProfileCollectionResponse instantiates a new HostSecurityProfileCollectionResponse and sets the default values. +func NewHostSecurityProfileCollectionResponse()(*HostSecurityProfileCollectionResponse) { + m := &HostSecurityProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHostSecurityProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHostSecurityProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHostSecurityProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HostSecurityProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHostSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HostSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(HostSecurityProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HostSecurityProfileCollectionResponse) GetValue()([]HostSecurityProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *HostSecurityProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HostSecurityProfileCollectionResponse) SetValue(value []HostSecurityProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/host_security_profile_collection_responseable.go new file mode 100644 index 000000000..d10d3cc07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityProfileCollectionResponseable +type HostSecurityProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HostSecurityProfileable) + SetValue(value []HostSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_profileable.go b/src/internal/connector/graph/betasdk/models/host_security_profileable.go new file mode 100644 index 000000000..da6e9a6bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_profileable.go @@ -0,0 +1,48 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityProfileable +type HostSecurityProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFqdn()(*string) + GetIsAzureAdJoined()(*bool) + GetIsAzureAdRegistered()(*bool) + GetIsHybridAzureDomainJoined()(*bool) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLogonUsers()([]LogonUserable) + GetNetBiosName()(*string) + GetNetworkInterfaces()([]NetworkInterfaceable) + GetOs()(*string) + GetOsVersion()(*string) + GetParentHost()(*string) + GetRelatedHostIds()([]string) + GetRiskScore()(*string) + GetTags()([]string) + GetVendorInformation()(SecurityVendorInformationable) + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFqdn(value *string)() + SetIsAzureAdJoined(value *bool)() + SetIsAzureAdRegistered(value *bool)() + SetIsHybridAzureDomainJoined(value *bool)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLogonUsers(value []LogonUserable)() + SetNetBiosName(value *string)() + SetNetworkInterfaces(value []NetworkInterfaceable)() + SetOs(value *string)() + SetOsVersion(value *string)() + SetParentHost(value *string)() + SetRelatedHostIds(value []string)() + SetRiskScore(value *string)() + SetTags(value []string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_state.go b/src/internal/connector/graph/betasdk/models/host_security_state.go new file mode 100644 index 000000000..e74fa7c17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_state.go @@ -0,0 +1,305 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityState +type HostSecurityState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Host FQDN (Fully Qualified Domain Name) (for example, machine.company.com). + fqdn *string + // The isAzureAdJoined property + isAzureAdJoined *bool + // The isAzureAdRegistered property + isAzureAdRegistered *bool + // True if the host is domain joined to an on-premises Active Directory domain. + isHybridAzureDomainJoined *bool + // The local host name, without the DNS domain name. + netBiosName *string + // The OdataType property + odataType *string + // Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). + os *string + // Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert. + privateIpAddress *string + // Publicly routable IPv4 or IPv6 address (see RFC 1918) at time of the alert. + publicIpAddress *string + // Provider-generated/calculated risk score of the host. Recommended value range of 0-1, which equates to a percentage. + riskScore *string +} +// NewHostSecurityState instantiates a new hostSecurityState and sets the default values. +func NewHostSecurityState()(*HostSecurityState) { + m := &HostSecurityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHostSecurityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHostSecurityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHostSecurityState(), 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 *HostSecurityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HostSecurityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fqdn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFqdn(val) + } + return nil + } + res["isAzureAdJoined"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAzureAdJoined(val) + } + return nil + } + res["isAzureAdRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAzureAdRegistered(val) + } + return nil + } + res["isHybridAzureDomainJoined"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHybridAzureDomainJoined(val) + } + return nil + } + res["netBiosName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetBiosName(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["os"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOs(val) + } + return nil + } + res["privateIpAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivateIpAddress(val) + } + return nil + } + res["publicIpAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicIpAddress(val) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + return res +} +// GetFqdn gets the fqdn property value. Host FQDN (Fully Qualified Domain Name) (for example, machine.company.com). +func (m *HostSecurityState) GetFqdn()(*string) { + return m.fqdn +} +// GetIsAzureAdJoined gets the isAzureAdJoined property value. The isAzureAdJoined property +func (m *HostSecurityState) GetIsAzureAdJoined()(*bool) { + return m.isAzureAdJoined +} +// GetIsAzureAdRegistered gets the isAzureAdRegistered property value. The isAzureAdRegistered property +func (m *HostSecurityState) GetIsAzureAdRegistered()(*bool) { + return m.isAzureAdRegistered +} +// GetIsHybridAzureDomainJoined gets the isHybridAzureDomainJoined property value. True if the host is domain joined to an on-premises Active Directory domain. +func (m *HostSecurityState) GetIsHybridAzureDomainJoined()(*bool) { + return m.isHybridAzureDomainJoined +} +// GetNetBiosName gets the netBiosName property value. The local host name, without the DNS domain name. +func (m *HostSecurityState) GetNetBiosName()(*string) { + return m.netBiosName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *HostSecurityState) GetOdataType()(*string) { + return m.odataType +} +// GetOs gets the os property value. Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). +func (m *HostSecurityState) GetOs()(*string) { + return m.os +} +// GetPrivateIpAddress gets the privateIpAddress property value. Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert. +func (m *HostSecurityState) GetPrivateIpAddress()(*string) { + return m.privateIpAddress +} +// GetPublicIpAddress gets the publicIpAddress property value. Publicly routable IPv4 or IPv6 address (see RFC 1918) at time of the alert. +func (m *HostSecurityState) GetPublicIpAddress()(*string) { + return m.publicIpAddress +} +// GetRiskScore gets the riskScore property value. Provider-generated/calculated risk score of the host. Recommended value range of 0-1, which equates to a percentage. +func (m *HostSecurityState) GetRiskScore()(*string) { + return m.riskScore +} +// Serialize serializes information the current object +func (m *HostSecurityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fqdn", m.GetFqdn()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAzureAdJoined", m.GetIsAzureAdJoined()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAzureAdRegistered", m.GetIsAzureAdRegistered()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isHybridAzureDomainJoined", m.GetIsHybridAzureDomainJoined()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("netBiosName", m.GetNetBiosName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("os", m.GetOs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privateIpAddress", m.GetPrivateIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publicIpAddress", m.GetPublicIpAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("riskScore", m.GetRiskScore()) + 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 *HostSecurityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFqdn sets the fqdn property value. Host FQDN (Fully Qualified Domain Name) (for example, machine.company.com). +func (m *HostSecurityState) SetFqdn(value *string)() { + m.fqdn = value +} +// SetIsAzureAdJoined sets the isAzureAdJoined property value. The isAzureAdJoined property +func (m *HostSecurityState) SetIsAzureAdJoined(value *bool)() { + m.isAzureAdJoined = value +} +// SetIsAzureAdRegistered sets the isAzureAdRegistered property value. The isAzureAdRegistered property +func (m *HostSecurityState) SetIsAzureAdRegistered(value *bool)() { + m.isAzureAdRegistered = value +} +// SetIsHybridAzureDomainJoined sets the isHybridAzureDomainJoined property value. True if the host is domain joined to an on-premises Active Directory domain. +func (m *HostSecurityState) SetIsHybridAzureDomainJoined(value *bool)() { + m.isHybridAzureDomainJoined = value +} +// SetNetBiosName sets the netBiosName property value. The local host name, without the DNS domain name. +func (m *HostSecurityState) SetNetBiosName(value *string)() { + m.netBiosName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *HostSecurityState) SetOdataType(value *string)() { + m.odataType = value +} +// SetOs sets the os property value. Host Operating System. (For example, Windows10, MacOS, RHEL, etc.). +func (m *HostSecurityState) SetOs(value *string)() { + m.os = value +} +// SetPrivateIpAddress sets the privateIpAddress property value. Private (not routable) IPv4 or IPv6 address (see RFC 1918) at the time of the alert. +func (m *HostSecurityState) SetPrivateIpAddress(value *string)() { + m.privateIpAddress = value +} +// SetPublicIpAddress sets the publicIpAddress property value. Publicly routable IPv4 or IPv6 address (see RFC 1918) at time of the alert. +func (m *HostSecurityState) SetPublicIpAddress(value *string)() { + m.publicIpAddress = value +} +// SetRiskScore sets the riskScore property value. Provider-generated/calculated risk score of the host. Recommended value range of 0-1, which equates to a percentage. +func (m *HostSecurityState) SetRiskScore(value *string)() { + m.riskScore = value +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_state_collection_response.go b/src/internal/connector/graph/betasdk/models/host_security_state_collection_response.go new file mode 100644 index 000000000..ac06f28d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityStateCollectionResponse +type HostSecurityStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []HostSecurityStateable +} +// NewHostSecurityStateCollectionResponse instantiates a new HostSecurityStateCollectionResponse and sets the default values. +func NewHostSecurityStateCollectionResponse()(*HostSecurityStateCollectionResponse) { + m := &HostSecurityStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHostSecurityStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHostSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHostSecurityStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HostSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHostSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HostSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(HostSecurityStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HostSecurityStateCollectionResponse) GetValue()([]HostSecurityStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *HostSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HostSecurityStateCollectionResponse) SetValue(value []HostSecurityStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/host_security_state_collection_responseable.go new file mode 100644 index 000000000..0b1eacf02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityStateCollectionResponseable +type HostSecurityStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HostSecurityStateable) + SetValue(value []HostSecurityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/host_security_stateable.go b/src/internal/connector/graph/betasdk/models/host_security_stateable.go new file mode 100644 index 000000000..81b398256 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/host_security_stateable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HostSecurityStateable +type HostSecurityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFqdn()(*string) + GetIsAzureAdJoined()(*bool) + GetIsAzureAdRegistered()(*bool) + GetIsHybridAzureDomainJoined()(*bool) + GetNetBiosName()(*string) + GetOdataType()(*string) + GetOs()(*string) + GetPrivateIpAddress()(*string) + GetPublicIpAddress()(*string) + GetRiskScore()(*string) + SetFqdn(value *string)() + SetIsAzureAdJoined(value *bool)() + SetIsAzureAdRegistered(value *bool)() + SetIsHybridAzureDomainJoined(value *bool)() + SetNetBiosName(value *string)() + SetOdataType(value *string)() + SetOs(value *string)() + SetPrivateIpAddress(value *string)() + SetPublicIpAddress(value *string)() + SetRiskScore(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/http_request_endpoint.go b/src/internal/connector/graph/betasdk/models/http_request_endpoint.go new file mode 100644 index 000000000..92d721776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/http_request_endpoint.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HttpRequestEndpoint +type HttpRequestEndpoint struct { + CustomExtensionEndpointConfiguration + // The targetUrl property + targetUrl *string +} +// NewHttpRequestEndpoint instantiates a new HttpRequestEndpoint and sets the default values. +func NewHttpRequestEndpoint()(*HttpRequestEndpoint) { + m := &HttpRequestEndpoint{ + CustomExtensionEndpointConfiguration: *NewCustomExtensionEndpointConfiguration(), + } + odataTypeValue := "#microsoft.graph.httpRequestEndpoint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateHttpRequestEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHttpRequestEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHttpRequestEndpoint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HttpRequestEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionEndpointConfiguration.GetFieldDeserializers() + res["targetUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + return res +} +// GetTargetUrl gets the targetUrl property value. The targetUrl property +func (m *HttpRequestEndpoint) GetTargetUrl()(*string) { + return m.targetUrl +} +// Serialize serializes information the current object +func (m *HttpRequestEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionEndpointConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetUrl", m.GetTargetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetTargetUrl sets the targetUrl property value. The targetUrl property +func (m *HttpRequestEndpoint) SetTargetUrl(value *string)() { + m.targetUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/http_request_endpointable.go b/src/internal/connector/graph/betasdk/models/http_request_endpointable.go new file mode 100644 index 000000000..1c9f717e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/http_request_endpointable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HttpRequestEndpointable +type HttpRequestEndpointable interface { + CustomExtensionEndpointConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTargetUrl()(*string) + SetTargetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configuration.go b/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configuration.go new file mode 100644 index 000000000..88edefec4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configuration.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HybridAgentUpdaterConfiguration +type HybridAgentUpdaterConfiguration 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 if updater configuration will be skipped and the agent will receive an update when the next version of the agent is available. + allowUpdateConfigurationOverride *bool + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + deferUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The updateWindow property + updateWindow UpdateWindowable +} +// NewHybridAgentUpdaterConfiguration instantiates a new hybridAgentUpdaterConfiguration and sets the default values. +func NewHybridAgentUpdaterConfiguration()(*HybridAgentUpdaterConfiguration) { + m := &HybridAgentUpdaterConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHybridAgentUpdaterConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHybridAgentUpdaterConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHybridAgentUpdaterConfiguration(), 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 *HybridAgentUpdaterConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowUpdateConfigurationOverride gets the allowUpdateConfigurationOverride property value. Indicates if updater configuration will be skipped and the agent will receive an update when the next version of the agent is available. +func (m *HybridAgentUpdaterConfiguration) GetAllowUpdateConfigurationOverride()(*bool) { + return m.allowUpdateConfigurationOverride +} +// GetDeferUpdateDateTime gets the deferUpdateDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *HybridAgentUpdaterConfiguration) GetDeferUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deferUpdateDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HybridAgentUpdaterConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowUpdateConfigurationOverride"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUpdateConfigurationOverride(val) + } + return nil + } + res["deferUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeferUpdateDateTime(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["updateWindow"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUpdateWindowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUpdateWindow(val.(UpdateWindowable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *HybridAgentUpdaterConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetUpdateWindow gets the updateWindow property value. The updateWindow property +func (m *HybridAgentUpdaterConfiguration) GetUpdateWindow()(UpdateWindowable) { + return m.updateWindow +} +// Serialize serializes information the current object +func (m *HybridAgentUpdaterConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowUpdateConfigurationOverride", m.GetAllowUpdateConfigurationOverride()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("deferUpdateDateTime", m.GetDeferUpdateDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("updateWindow", m.GetUpdateWindow()) + 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 *HybridAgentUpdaterConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowUpdateConfigurationOverride sets the allowUpdateConfigurationOverride property value. Indicates if updater configuration will be skipped and the agent will receive an update when the next version of the agent is available. +func (m *HybridAgentUpdaterConfiguration) SetAllowUpdateConfigurationOverride(value *bool)() { + m.allowUpdateConfigurationOverride = value +} +// SetDeferUpdateDateTime sets the deferUpdateDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *HybridAgentUpdaterConfiguration) SetDeferUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deferUpdateDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *HybridAgentUpdaterConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetUpdateWindow sets the updateWindow property value. The updateWindow property +func (m *HybridAgentUpdaterConfiguration) SetUpdateWindow(value UpdateWindowable)() { + m.updateWindow = value +} diff --git a/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configurationable.go b/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configurationable.go new file mode 100644 index 000000000..02cabd1ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hybrid_agent_updater_configurationable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HybridAgentUpdaterConfigurationable +type HybridAgentUpdaterConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowUpdateConfigurationOverride()(*bool) + GetDeferUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetUpdateWindow()(UpdateWindowable) + SetAllowUpdateConfigurationOverride(value *bool)() + SetDeferUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetUpdateWindow(value UpdateWindowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_column.go b/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_column.go new file mode 100644 index 000000000..4f05b7ab5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_column.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HyperlinkOrPictureColumn +type HyperlinkOrPictureColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether the display format used for URL columns is an image or a hyperlink. + isPicture *bool + // The OdataType property + odataType *string +} +// NewHyperlinkOrPictureColumn instantiates a new hyperlinkOrPictureColumn and sets the default values. +func NewHyperlinkOrPictureColumn()(*HyperlinkOrPictureColumn) { + m := &HyperlinkOrPictureColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHyperlinkOrPictureColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHyperlinkOrPictureColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHyperlinkOrPictureColumn(), 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 *HyperlinkOrPictureColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HyperlinkOrPictureColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isPicture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPicture(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 + } + return res +} +// GetIsPicture gets the isPicture property value. Specifies whether the display format used for URL columns is an image or a hyperlink. +func (m *HyperlinkOrPictureColumn) GetIsPicture()(*bool) { + return m.isPicture +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *HyperlinkOrPictureColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *HyperlinkOrPictureColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isPicture", m.GetIsPicture()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *HyperlinkOrPictureColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsPicture sets the isPicture property value. Specifies whether the display format used for URL columns is an image or a hyperlink. +func (m *HyperlinkOrPictureColumn) SetIsPicture(value *bool)() { + m.isPicture = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *HyperlinkOrPictureColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_columnable.go b/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_columnable.go new file mode 100644 index 000000000..16c170775 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/hyperlink_or_picture_columnable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HyperlinkOrPictureColumnable +type HyperlinkOrPictureColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsPicture()(*bool) + GetOdataType()(*string) + SetIsPicture(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_cidr_range.go b/src/internal/connector/graph/betasdk/models/i_pv4_cidr_range.go new file mode 100644 index 000000000..b491338d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_cidr_range.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4CidrRange +type IPv4CidrRange struct { + IpRange + // IPv4 address in CIDR notation. Not nullable. + cidrAddress *string +} +// NewIPv4CidrRange instantiates a new IPv4CidrRange and sets the default values. +func NewIPv4CidrRange()(*IPv4CidrRange) { + m := &IPv4CidrRange{ + IpRange: *NewIpRange(), + } + odataTypeValue := "#microsoft.graph.iPv4CidrRange"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIPv4CidrRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIPv4CidrRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIPv4CidrRange(), nil +} +// GetCidrAddress gets the cidrAddress property value. IPv4 address in CIDR notation. Not nullable. +func (m *IPv4CidrRange) GetCidrAddress()(*string) { + return m.cidrAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IPv4CidrRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IpRange.GetFieldDeserializers() + res["cidrAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCidrAddress(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IPv4CidrRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IpRange.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cidrAddress", m.GetCidrAddress()) + if err != nil { + return err + } + } + return nil +} +// SetCidrAddress sets the cidrAddress property value. IPv4 address in CIDR notation. Not nullable. +func (m *IPv4CidrRange) SetCidrAddress(value *string)() { + m.cidrAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_cidr_rangeable.go b/src/internal/connector/graph/betasdk/models/i_pv4_cidr_rangeable.go new file mode 100644 index 000000000..0726c935e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_cidr_rangeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4CidrRangeable +type IPv4CidrRangeable interface { + IpRangeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCidrAddress()(*string) + SetCidrAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_range.go b/src/internal/connector/graph/betasdk/models/i_pv4_range.go new file mode 100644 index 000000000..39d426273 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_range.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4Range +type IPv4Range struct { + IpRange + // Lower address. + lowerAddress *string + // Upper address. + upperAddress *string +} +// NewIPv4Range instantiates a new IPv4Range and sets the default values. +func NewIPv4Range()(*IPv4Range) { + m := &IPv4Range{ + IpRange: *NewIpRange(), + } + odataTypeValue := "#microsoft.graph.iPv4Range"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIPv4RangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIPv4RangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIPv4Range(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IPv4Range) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IpRange.GetFieldDeserializers() + res["lowerAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLowerAddress(val) + } + return nil + } + res["upperAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpperAddress(val) + } + return nil + } + return res +} +// GetLowerAddress gets the lowerAddress property value. Lower address. +func (m *IPv4Range) GetLowerAddress()(*string) { + return m.lowerAddress +} +// GetUpperAddress gets the upperAddress property value. Upper address. +func (m *IPv4Range) GetUpperAddress()(*string) { + return m.upperAddress +} +// Serialize serializes information the current object +func (m *IPv4Range) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IpRange.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("lowerAddress", m.GetLowerAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("upperAddress", m.GetUpperAddress()) + if err != nil { + return err + } + } + return nil +} +// SetLowerAddress sets the lowerAddress property value. Lower address. +func (m *IPv4Range) SetLowerAddress(value *string)() { + m.lowerAddress = value +} +// SetUpperAddress sets the upperAddress property value. Upper address. +func (m *IPv4Range) SetUpperAddress(value *string)() { + m.upperAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_response.go b/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_response.go new file mode 100644 index 000000000..9e44f0c1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4RangeCollectionResponse +type IPv4RangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IPv4Rangeable +} +// NewIPv4RangeCollectionResponse instantiates a new IPv4RangeCollectionResponse and sets the default values. +func NewIPv4RangeCollectionResponse()(*IPv4RangeCollectionResponse) { + m := &IPv4RangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIPv4RangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIPv4RangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIPv4RangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IPv4RangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIPv4RangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IPv4Rangeable, len(val)) + for i, v := range val { + res[i] = v.(IPv4Rangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IPv4RangeCollectionResponse) GetValue()([]IPv4Rangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IPv4RangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IPv4RangeCollectionResponse) SetValue(value []IPv4Rangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_responseable.go new file mode 100644 index 000000000..8c81b9e8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4RangeCollectionResponseable +type IPv4RangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IPv4Rangeable) + SetValue(value []IPv4Rangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv4_rangeable.go b/src/internal/connector/graph/betasdk/models/i_pv4_rangeable.go new file mode 100644 index 000000000..1826e1f74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv4_rangeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv4Rangeable +type IPv4Rangeable interface { + IpRangeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLowerAddress()(*string) + GetUpperAddress()(*string) + SetLowerAddress(value *string)() + SetUpperAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv6_cidr_range.go b/src/internal/connector/graph/betasdk/models/i_pv6_cidr_range.go new file mode 100644 index 000000000..a7648dc30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv6_cidr_range.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv6CidrRange +type IPv6CidrRange struct { + IpRange + // IPv6 address in CIDR notation. Not nullable. + cidrAddress *string +} +// NewIPv6CidrRange instantiates a new IPv6CidrRange and sets the default values. +func NewIPv6CidrRange()(*IPv6CidrRange) { + m := &IPv6CidrRange{ + IpRange: *NewIpRange(), + } + odataTypeValue := "#microsoft.graph.iPv6CidrRange"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIPv6CidrRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIPv6CidrRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIPv6CidrRange(), nil +} +// GetCidrAddress gets the cidrAddress property value. IPv6 address in CIDR notation. Not nullable. +func (m *IPv6CidrRange) GetCidrAddress()(*string) { + return m.cidrAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IPv6CidrRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IpRange.GetFieldDeserializers() + res["cidrAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCidrAddress(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IPv6CidrRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IpRange.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cidrAddress", m.GetCidrAddress()) + if err != nil { + return err + } + } + return nil +} +// SetCidrAddress sets the cidrAddress property value. IPv6 address in CIDR notation. Not nullable. +func (m *IPv6CidrRange) SetCidrAddress(value *string)() { + m.cidrAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv6_cidr_rangeable.go b/src/internal/connector/graph/betasdk/models/i_pv6_cidr_rangeable.go new file mode 100644 index 000000000..6bf835555 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv6_cidr_rangeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv6CidrRangeable +type IPv6CidrRangeable interface { + IpRangeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCidrAddress()(*string) + SetCidrAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv6_range.go b/src/internal/connector/graph/betasdk/models/i_pv6_range.go new file mode 100644 index 000000000..81ae0bb4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv6_range.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv6Range +type IPv6Range struct { + IpRange + // Lower address. + lowerAddress *string + // Upper address. + upperAddress *string +} +// NewIPv6Range instantiates a new IPv6Range and sets the default values. +func NewIPv6Range()(*IPv6Range) { + m := &IPv6Range{ + IpRange: *NewIpRange(), + } + odataTypeValue := "#microsoft.graph.iPv6Range"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIPv6RangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIPv6RangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIPv6Range(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IPv6Range) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IpRange.GetFieldDeserializers() + res["lowerAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLowerAddress(val) + } + return nil + } + res["upperAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpperAddress(val) + } + return nil + } + return res +} +// GetLowerAddress gets the lowerAddress property value. Lower address. +func (m *IPv6Range) GetLowerAddress()(*string) { + return m.lowerAddress +} +// GetUpperAddress gets the upperAddress property value. Upper address. +func (m *IPv6Range) GetUpperAddress()(*string) { + return m.upperAddress +} +// Serialize serializes information the current object +func (m *IPv6Range) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IpRange.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("lowerAddress", m.GetLowerAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("upperAddress", m.GetUpperAddress()) + if err != nil { + return err + } + } + return nil +} +// SetLowerAddress sets the lowerAddress property value. Lower address. +func (m *IPv6Range) SetLowerAddress(value *string)() { + m.lowerAddress = value +} +// SetUpperAddress sets the upperAddress property value. Upper address. +func (m *IPv6Range) SetUpperAddress(value *string)() { + m.upperAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/i_pv6_rangeable.go b/src/internal/connector/graph/betasdk/models/i_pv6_rangeable.go new file mode 100644 index 000000000..25f9a0286 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_pv6_rangeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IPv6Rangeable +type IPv6Rangeable interface { + IpRangeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLowerAddress()(*string) + GetUpperAddress()(*string) + SetLowerAddress(value *string)() + SetUpperAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/i_tunes_pairing_mode.go b/src/internal/connector/graph/betasdk/models/i_tunes_pairing_mode.go new file mode 100644 index 000000000..14e37c0e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/i_tunes_pairing_mode.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ITunesPairingMode int + +const ( + // Pairing is not allowed + DISALLOW_ITUNESPAIRINGMODE ITunesPairingMode = iota + // Pairing allowed + ALLOW_ITUNESPAIRINGMODE + // Certificate required to pair with iTunes + REQUIRESCERTIFICATE_ITUNESPAIRINGMODE +) + +func (i ITunesPairingMode) String() string { + return []string{"disallow", "allow", "requiresCertificate"}[i] +} +func ParseITunesPairingMode(v string) (interface{}, error) { + result := DISALLOW_ITUNESPAIRINGMODE + switch v { + case "disallow": + result = DISALLOW_ITUNESPAIRINGMODE + case "allow": + result = ALLOW_ITUNESPAIRINGMODE + case "requiresCertificate": + result = REQUIRESCERTIFICATE_ITUNESPAIRINGMODE + default: + return 0, errors.New("Unknown ITunesPairingMode value: " + v) + } + return &result, nil +} +func SerializeITunesPairingMode(values []ITunesPairingMode) []string { + 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/identity.go b/src/internal/connector/graph/betasdk/models/identity.go new file mode 100644 index 000000000..ba396c2b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity.go @@ -0,0 +1,181 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Identity +type Identity 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 display name of the identity. Note that this might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. + displayName *string + // Unique identifier for the identity. + id *string + // The OdataType property + odataType *string +} +// NewIdentity instantiates a new identity and sets the default values. +func NewIdentity()(*Identity) { + m := &Identity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.auditUserIdentity": + return NewAuditUserIdentity(), nil + case "#microsoft.graph.azureCommunicationServicesUserIdentity": + return NewAzureCommunicationServicesUserIdentity(), nil + case "#microsoft.graph.communicationsApplicationIdentity": + return NewCommunicationsApplicationIdentity(), nil + case "#microsoft.graph.communicationsApplicationInstanceIdentity": + return NewCommunicationsApplicationInstanceIdentity(), nil + case "#microsoft.graph.communicationsEncryptedIdentity": + return NewCommunicationsEncryptedIdentity(), nil + case "#microsoft.graph.communicationsGuestIdentity": + return NewCommunicationsGuestIdentity(), nil + case "#microsoft.graph.communicationsPhoneIdentity": + return NewCommunicationsPhoneIdentity(), nil + case "#microsoft.graph.communicationsUserIdentity": + return NewCommunicationsUserIdentity(), nil + case "#microsoft.graph.emailIdentity": + return NewEmailIdentity(), nil + case "#microsoft.graph.initiator": + return NewInitiator(), nil + case "#microsoft.graph.programResource": + return NewProgramResource(), nil + case "#microsoft.graph.provisionedIdentity": + return NewProvisionedIdentity(), nil + case "#microsoft.graph.provisioningServicePrincipal": + return NewProvisioningServicePrincipal(), nil + case "#microsoft.graph.provisioningSystem": + return NewProvisioningSystem(), nil + case "#microsoft.graph.servicePrincipalIdentity": + return NewServicePrincipalIdentity(), nil + case "#microsoft.graph.sharePointIdentity": + return NewSharePointIdentity(), nil + case "#microsoft.graph.teamworkApplicationIdentity": + return NewTeamworkApplicationIdentity(), nil + case "#microsoft.graph.teamworkConversationIdentity": + return NewTeamworkConversationIdentity(), nil + case "#microsoft.graph.teamworkTagIdentity": + return NewTeamworkTagIdentity(), nil + case "#microsoft.graph.teamworkUserIdentity": + return NewTeamworkUserIdentity(), nil + case "#microsoft.graph.userIdentity": + return NewUserIdentity(), nil + } + } + } + } + return NewIdentity(), 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 *Identity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name of the identity. Note that this might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. +func (m *Identity) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Identity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. Unique identifier for the identity. +func (m *Identity) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Identity) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Identity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Identity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name of the identity. Note that this might not always be available or up to date. For example, if a user changes their display name, the API might show the new value in a future response, but the items associated with the user won't show up as having changed when using delta. +func (m *Identity) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. Unique identifier for the identity. +func (m *Identity) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Identity) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_api_connector.go b/src/internal/connector/graph/betasdk/models/identity_api_connector.go new file mode 100644 index 000000000..f27c7af45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_api_connector.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityApiConnector +type IdentityApiConnector struct { + Entity + // The object which describes the authentication configuration details for calling the API. Basic and PKCS 12 client certificate are supported. + authenticationConfiguration ApiAuthenticationConfigurationBaseable + // The name of the API connector. + displayName *string + // The URL of the API endpoint to call. + targetUrl *string +} +// NewIdentityApiConnector instantiates a new IdentityApiConnector and sets the default values. +func NewIdentityApiConnector()(*IdentityApiConnector) { + m := &IdentityApiConnector{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityApiConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityApiConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityApiConnector(), nil +} +// GetAuthenticationConfiguration gets the authenticationConfiguration property value. The object which describes the authentication configuration details for calling the API. Basic and PKCS 12 client certificate are supported. +func (m *IdentityApiConnector) GetAuthenticationConfiguration()(ApiAuthenticationConfigurationBaseable) { + return m.authenticationConfiguration +} +// GetDisplayName gets the displayName property value. The name of the API connector. +func (m *IdentityApiConnector) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityApiConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authenticationConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateApiAuthenticationConfigurationBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationConfiguration(val.(ApiAuthenticationConfigurationBaseable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["targetUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetUrl(val) + } + return nil + } + return res +} +// GetTargetUrl gets the targetUrl property value. The URL of the API endpoint to call. +func (m *IdentityApiConnector) GetTargetUrl()(*string) { + return m.targetUrl +} +// Serialize serializes information the current object +func (m *IdentityApiConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("authenticationConfiguration", m.GetAuthenticationConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetUrl", m.GetTargetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationConfiguration sets the authenticationConfiguration property value. The object which describes the authentication configuration details for calling the API. Basic and PKCS 12 client certificate are supported. +func (m *IdentityApiConnector) SetAuthenticationConfiguration(value ApiAuthenticationConfigurationBaseable)() { + m.authenticationConfiguration = value +} +// SetDisplayName sets the displayName property value. The name of the API connector. +func (m *IdentityApiConnector) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTargetUrl sets the targetUrl property value. The URL of the API endpoint to call. +func (m *IdentityApiConnector) SetTargetUrl(value *string)() { + m.targetUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_response.go new file mode 100644 index 000000000..aa3025a7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityApiConnectorCollectionResponse +type IdentityApiConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityApiConnectorable +} +// NewIdentityApiConnectorCollectionResponse instantiates a new IdentityApiConnectorCollectionResponse and sets the default values. +func NewIdentityApiConnectorCollectionResponse()(*IdentityApiConnectorCollectionResponse) { + m := &IdentityApiConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityApiConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityApiConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityApiConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityApiConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityApiConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityApiConnectorable, len(val)) + for i, v := range val { + res[i] = v.(IdentityApiConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityApiConnectorCollectionResponse) GetValue()([]IdentityApiConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityApiConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityApiConnectorCollectionResponse) SetValue(value []IdentityApiConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_responseable.go new file mode 100644 index 000000000..709ee8e87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_api_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityApiConnectorCollectionResponseable +type IdentityApiConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityApiConnectorable) + SetValue(value []IdentityApiConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_api_connectorable.go b/src/internal/connector/graph/betasdk/models/identity_api_connectorable.go new file mode 100644 index 000000000..808749bd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_api_connectorable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityApiConnectorable +type IdentityApiConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationConfiguration()(ApiAuthenticationConfigurationBaseable) + GetDisplayName()(*string) + GetTargetUrl()(*string) + SetAuthenticationConfiguration(value ApiAuthenticationConfigurationBaseable)() + SetDisplayName(value *string)() + SetTargetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute.go b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute.go new file mode 100644 index 000000000..abcff62df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityBuiltInUserFlowAttribute +type IdentityBuiltInUserFlowAttribute struct { + IdentityUserFlowAttribute +} +// NewIdentityBuiltInUserFlowAttribute instantiates a new IdentityBuiltInUserFlowAttribute and sets the default values. +func NewIdentityBuiltInUserFlowAttribute()(*IdentityBuiltInUserFlowAttribute) { + m := &IdentityBuiltInUserFlowAttribute{ + IdentityUserFlowAttribute: *NewIdentityUserFlowAttribute(), + } + odataTypeValue := "#microsoft.graph.identityBuiltInUserFlowAttribute"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIdentityBuiltInUserFlowAttributeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityBuiltInUserFlowAttributeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityBuiltInUserFlowAttribute(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityBuiltInUserFlowAttribute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityUserFlowAttribute.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IdentityBuiltInUserFlowAttribute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityUserFlowAttribute.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_response.go new file mode 100644 index 000000000..e1ec9720d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityBuiltInUserFlowAttributeCollectionResponse +type IdentityBuiltInUserFlowAttributeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityBuiltInUserFlowAttributeable +} +// NewIdentityBuiltInUserFlowAttributeCollectionResponse instantiates a new IdentityBuiltInUserFlowAttributeCollectionResponse and sets the default values. +func NewIdentityBuiltInUserFlowAttributeCollectionResponse()(*IdentityBuiltInUserFlowAttributeCollectionResponse) { + m := &IdentityBuiltInUserFlowAttributeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityBuiltInUserFlowAttributeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityBuiltInUserFlowAttributeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityBuiltInUserFlowAttributeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityBuiltInUserFlowAttributeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityBuiltInUserFlowAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityBuiltInUserFlowAttributeable, len(val)) + for i, v := range val { + res[i] = v.(IdentityBuiltInUserFlowAttributeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityBuiltInUserFlowAttributeCollectionResponse) GetValue()([]IdentityBuiltInUserFlowAttributeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityBuiltInUserFlowAttributeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityBuiltInUserFlowAttributeCollectionResponse) SetValue(value []IdentityBuiltInUserFlowAttributeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_responseable.go new file mode 100644 index 000000000..a49096c9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attribute_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityBuiltInUserFlowAttributeCollectionResponseable +type IdentityBuiltInUserFlowAttributeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityBuiltInUserFlowAttributeable) + SetValue(value []IdentityBuiltInUserFlowAttributeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attributeable.go b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attributeable.go new file mode 100644 index 000000000..09ac95e0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_built_in_user_flow_attributeable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityBuiltInUserFlowAttributeable +type IdentityBuiltInUserFlowAttributeable interface { + IdentityUserFlowAttributeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute.go b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute.go new file mode 100644 index 000000000..a33943a7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityCustomUserFlowAttribute +type IdentityCustomUserFlowAttribute struct { + IdentityUserFlowAttribute +} +// NewIdentityCustomUserFlowAttribute instantiates a new IdentityCustomUserFlowAttribute and sets the default values. +func NewIdentityCustomUserFlowAttribute()(*IdentityCustomUserFlowAttribute) { + m := &IdentityCustomUserFlowAttribute{ + IdentityUserFlowAttribute: *NewIdentityUserFlowAttribute(), + } + odataTypeValue := "#microsoft.graph.identityCustomUserFlowAttribute"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIdentityCustomUserFlowAttributeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityCustomUserFlowAttributeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityCustomUserFlowAttribute(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityCustomUserFlowAttribute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityUserFlowAttribute.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IdentityCustomUserFlowAttribute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityUserFlowAttribute.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_response.go new file mode 100644 index 000000000..18e920039 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityCustomUserFlowAttributeCollectionResponse +type IdentityCustomUserFlowAttributeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityCustomUserFlowAttributeable +} +// NewIdentityCustomUserFlowAttributeCollectionResponse instantiates a new IdentityCustomUserFlowAttributeCollectionResponse and sets the default values. +func NewIdentityCustomUserFlowAttributeCollectionResponse()(*IdentityCustomUserFlowAttributeCollectionResponse) { + m := &IdentityCustomUserFlowAttributeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityCustomUserFlowAttributeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityCustomUserFlowAttributeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityCustomUserFlowAttributeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityCustomUserFlowAttributeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityCustomUserFlowAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityCustomUserFlowAttributeable, len(val)) + for i, v := range val { + res[i] = v.(IdentityCustomUserFlowAttributeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityCustomUserFlowAttributeCollectionResponse) GetValue()([]IdentityCustomUserFlowAttributeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityCustomUserFlowAttributeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityCustomUserFlowAttributeCollectionResponse) SetValue(value []IdentityCustomUserFlowAttributeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_responseable.go new file mode 100644 index 000000000..81fd477be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attribute_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityCustomUserFlowAttributeCollectionResponseable +type IdentityCustomUserFlowAttributeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityCustomUserFlowAttributeable) + SetValue(value []IdentityCustomUserFlowAttributeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attributeable.go b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attributeable.go new file mode 100644 index 000000000..b43405d85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_custom_user_flow_attributeable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityCustomUserFlowAttributeable +type IdentityCustomUserFlowAttributeable interface { + IdentityUserFlowAttributeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider.go b/src/internal/connector/graph/betasdk/models/identity_provider.go new file mode 100644 index 000000000..b1f003bf3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider.go @@ -0,0 +1,156 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProvider provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityProvider struct { + Entity + // The client ID for the application obtained when registering the application with the identity provider. This is a required field. Required. Not nullable. + clientId *string + // The client secret for the application obtained when registering the application with the identity provider. This is write-only. A read operation will return ****. This is a required field. Required. Not nullable. + clientSecret *string + // The display name of the identity provider. Not nullable. + name *string + // The identity provider type is a required field. For B2B scenario: Google, Facebook. For B2C scenario: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo,QQ, WeChat, OpenIDConnect. Not nullable. + type_escaped *string +} +// NewIdentityProvider instantiates a new identityProvider and sets the default values. +func NewIdentityProvider()(*IdentityProvider) { + m := &IdentityProvider{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.openIdConnectProvider": + return NewOpenIdConnectProvider(), nil + } + } + } + } + return NewIdentityProvider(), nil +} +// GetClientId gets the clientId property value. The client ID for the application obtained when registering the application with the identity provider. This is a required field. Required. Not nullable. +func (m *IdentityProvider) GetClientId()(*string) { + return m.clientId +} +// GetClientSecret gets the clientSecret property value. The client secret for the application obtained when registering the application with the identity provider. This is write-only. A read operation will return ****. This is a required field. Required. Not nullable. +func (m *IdentityProvider) GetClientSecret()(*string) { + return m.clientSecret +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["clientSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetName gets the name property value. The display name of the identity provider. Not nullable. +func (m *IdentityProvider) GetName()(*string) { + return m.name +} +// GetType gets the type property value. The identity provider type is a required field. For B2B scenario: Google, Facebook. For B2C scenario: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo,QQ, WeChat, OpenIDConnect. Not nullable. +func (m *IdentityProvider) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *IdentityProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientSecret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetClientId sets the clientId property value. The client ID for the application obtained when registering the application with the identity provider. This is a required field. Required. Not nullable. +func (m *IdentityProvider) SetClientId(value *string)() { + m.clientId = value +} +// SetClientSecret sets the clientSecret property value. The client secret for the application obtained when registering the application with the identity provider. This is write-only. A read operation will return ****. This is a required field. Required. Not nullable. +func (m *IdentityProvider) SetClientSecret(value *string)() { + m.clientSecret = value +} +// SetName sets the name property value. The display name of the identity provider. Not nullable. +func (m *IdentityProvider) SetName(value *string)() { + m.name = value +} +// SetType sets the type property value. The identity provider type is a required field. For B2B scenario: Google, Facebook. For B2C scenario: Microsoft, Google, Amazon, LinkedIn, Facebook, GitHub, Twitter, Weibo,QQ, WeChat, OpenIDConnect. Not nullable. +func (m *IdentityProvider) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_base.go b/src/internal/connector/graph/betasdk/models/identity_provider_base.go new file mode 100644 index 000000000..fab72fe09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_base.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityProviderBase struct { + Entity + // The display name of the identity provider. + displayName *string +} +// NewIdentityProviderBase instantiates a new identityProviderBase and sets the default values. +func NewIdentityProviderBase()(*IdentityProviderBase) { + m := &IdentityProviderBase{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityProviderBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityProviderBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.appleManagedIdentityProvider": + return NewAppleManagedIdentityProvider(), nil + case "#microsoft.graph.builtInIdentityProvider": + return NewBuiltInIdentityProvider(), nil + case "#microsoft.graph.internalDomainFederation": + return NewInternalDomainFederation(), nil + case "#microsoft.graph.openIdConnectIdentityProvider": + return NewOpenIdConnectIdentityProvider(), nil + case "#microsoft.graph.samlOrWsFedExternalDomainFederation": + return NewSamlOrWsFedExternalDomainFederation(), nil + case "#microsoft.graph.samlOrWsFedProvider": + return NewSamlOrWsFedProvider(), nil + case "#microsoft.graph.socialIdentityProvider": + return NewSocialIdentityProvider(), nil + } + } + } + } + return NewIdentityProviderBase(), nil +} +// GetDisplayName gets the displayName property value. The display name of the identity provider. +func (m *IdentityProviderBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityProviderBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IdentityProviderBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the identity provider. +func (m *IdentityProviderBase) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_response.go new file mode 100644 index 000000000..17d32dd0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderBaseCollectionResponse +type IdentityProviderBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityProviderBaseable +} +// NewIdentityProviderBaseCollectionResponse instantiates a new IdentityProviderBaseCollectionResponse and sets the default values. +func NewIdentityProviderBaseCollectionResponse()(*IdentityProviderBaseCollectionResponse) { + m := &IdentityProviderBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityProviderBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityProviderBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityProviderBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityProviderBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderBaseable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityProviderBaseCollectionResponse) GetValue()([]IdentityProviderBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityProviderBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityProviderBaseCollectionResponse) SetValue(value []IdentityProviderBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_responseable.go new file mode 100644 index 000000000..139b3d4ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderBaseCollectionResponseable +type IdentityProviderBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityProviderBaseable) + SetValue(value []IdentityProviderBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_baseable.go b/src/internal/connector/graph/betasdk/models/identity_provider_baseable.go new file mode 100644 index 000000000..07570fc92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderBaseable +type IdentityProviderBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_provider_collection_response.go new file mode 100644 index 000000000..7856220e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderCollectionResponse +type IdentityProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityProviderable +} +// NewIdentityProviderCollectionResponse instantiates a new IdentityProviderCollectionResponse and sets the default values. +func NewIdentityProviderCollectionResponse()(*IdentityProviderCollectionResponse) { + m := &IdentityProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(IdentityProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityProviderCollectionResponse) GetValue()([]IdentityProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityProviderCollectionResponse) SetValue(value []IdentityProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_provider_collection_responseable.go new file mode 100644 index 000000000..a48ffd0af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderCollectionResponseable +type IdentityProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityProviderable) + SetValue(value []IdentityProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_provider_state.go b/src/internal/connector/graph/betasdk/models/identity_provider_state.go new file mode 100644 index 000000000..12c23c901 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_provider_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityProviderState int + +const ( + ENABLED_IDENTITYPROVIDERSTATE IdentityProviderState = iota + DISABLED_IDENTITYPROVIDERSTATE + UNKNOWNFUTUREVALUE_IDENTITYPROVIDERSTATE +) + +func (i IdentityProviderState) String() string { + return []string{"enabled", "disabled", "unknownFutureValue"}[i] +} +func ParseIdentityProviderState(v string) (interface{}, error) { + result := ENABLED_IDENTITYPROVIDERSTATE + switch v { + case "enabled": + result = ENABLED_IDENTITYPROVIDERSTATE + case "disabled": + result = DISABLED_IDENTITYPROVIDERSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IDENTITYPROVIDERSTATE + default: + return 0, errors.New("Unknown IdentityProviderState value: " + v) + } + return &result, nil +} +func SerializeIdentityProviderState(values []IdentityProviderState) []string { + 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/identity_providerable.go b/src/internal/connector/graph/betasdk/models/identity_providerable.go new file mode 100644 index 000000000..553e266db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_providerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityProviderable +type IdentityProviderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetClientSecret()(*string) + GetName()(*string) + GetType()(*string) + SetClientId(value *string)() + SetClientSecret(value *string)() + SetName(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy.go b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy.go new file mode 100644 index 000000000..40148d5b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySecurityDefaultsEnforcementPolicy +type IdentitySecurityDefaultsEnforcementPolicy struct { + PolicyBase + // If set to true, Azure Active Directory security defaults is enabled for the tenant. + isEnabled *bool +} +// NewIdentitySecurityDefaultsEnforcementPolicy instantiates a new IdentitySecurityDefaultsEnforcementPolicy and sets the default values. +func NewIdentitySecurityDefaultsEnforcementPolicy()(*IdentitySecurityDefaultsEnforcementPolicy) { + m := &IdentitySecurityDefaultsEnforcementPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIdentitySecurityDefaultsEnforcementPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySecurityDefaultsEnforcementPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentitySecurityDefaultsEnforcementPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySecurityDefaultsEnforcementPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. If set to true, Azure Active Directory security defaults is enabled for the tenant. +func (m *IdentitySecurityDefaultsEnforcementPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// Serialize serializes information the current object +func (m *IdentitySecurityDefaultsEnforcementPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetIsEnabled sets the isEnabled property value. If set to true, Azure Active Directory security defaults is enabled for the tenant. +func (m *IdentitySecurityDefaultsEnforcementPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_response.go new file mode 100644 index 000000000..2e1231ce7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySecurityDefaultsEnforcementPolicyCollectionResponse +type IdentitySecurityDefaultsEnforcementPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentitySecurityDefaultsEnforcementPolicyable +} +// NewIdentitySecurityDefaultsEnforcementPolicyCollectionResponse instantiates a new IdentitySecurityDefaultsEnforcementPolicyCollectionResponse and sets the default values. +func NewIdentitySecurityDefaultsEnforcementPolicyCollectionResponse()(*IdentitySecurityDefaultsEnforcementPolicyCollectionResponse) { + m := &IdentitySecurityDefaultsEnforcementPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentitySecurityDefaultsEnforcementPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySecurityDefaultsEnforcementPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentitySecurityDefaultsEnforcementPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySecurityDefaultsEnforcementPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySecurityDefaultsEnforcementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySecurityDefaultsEnforcementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySecurityDefaultsEnforcementPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentitySecurityDefaultsEnforcementPolicyCollectionResponse) GetValue()([]IdentitySecurityDefaultsEnforcementPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentitySecurityDefaultsEnforcementPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentitySecurityDefaultsEnforcementPolicyCollectionResponse) SetValue(value []IdentitySecurityDefaultsEnforcementPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_responseable.go new file mode 100644 index 000000000..cfa5d3cc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySecurityDefaultsEnforcementPolicyCollectionResponseable +type IdentitySecurityDefaultsEnforcementPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentitySecurityDefaultsEnforcementPolicyable) + SetValue(value []IdentitySecurityDefaultsEnforcementPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policyable.go b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policyable.go new file mode 100644 index 000000000..0d2734bf5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_security_defaults_enforcement_policyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySecurityDefaultsEnforcementPolicyable +type IdentitySecurityDefaultsEnforcementPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetIsEnabled()(*bool) + SetIsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_set.go b/src/internal/connector/graph/betasdk/models/identity_set.go new file mode 100644 index 000000000..cc24133e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_set.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySet +type IdentitySet struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Optional. The application associated with this action. + application Identityable + // Optional. The device associated with this action. + device Identityable + // The OdataType property + odataType *string + // Optional. The user associated with this action. + user Identityable +} +// NewIdentitySet instantiates a new identitySet and sets the default values. +func NewIdentitySet()(*IdentitySet) { + m := &IdentitySet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.chatMessageFromIdentitySet": + return NewChatMessageFromIdentitySet(), nil + case "#microsoft.graph.chatMessageMentionedIdentitySet": + return NewChatMessageMentionedIdentitySet(), nil + case "#microsoft.graph.chatMessageReactionIdentitySet": + return NewChatMessageReactionIdentitySet(), nil + case "#microsoft.graph.communicationsIdentitySet": + return NewCommunicationsIdentitySet(), nil + case "#microsoft.graph.sharePointIdentitySet": + return NewSharePointIdentitySet(), nil + } + } + } + } + return NewIdentitySet(), 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 *IdentitySet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplication gets the application property value. Optional. The application associated with this action. +func (m *IdentitySet) GetApplication()(Identityable) { + return m.application +} +// GetDevice gets the device property value. Optional. The device associated with this action. +func (m *IdentitySet) GetDevice()(Identityable) { + return m.device +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["application"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplication(val.(Identityable)) + } + return nil + } + res["device"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevice(val.(Identityable)) + } + 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["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(Identityable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IdentitySet) GetOdataType()(*string) { + return m.odataType +} +// GetUser gets the user property value. Optional. The user associated with this action. +func (m *IdentitySet) GetUser()(Identityable) { + return m.user +} +// Serialize serializes information the current object +func (m *IdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("application", m.GetApplication()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("device", m.GetDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *IdentitySet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplication sets the application property value. Optional. The application associated with this action. +func (m *IdentitySet) SetApplication(value Identityable)() { + m.application = value +} +// SetDevice sets the device property value. Optional. The device associated with this action. +func (m *IdentitySet) SetDevice(value Identityable)() { + m.device = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IdentitySet) SetOdataType(value *string)() { + m.odataType = value +} +// SetUser sets the user property value. Optional. The user associated with this action. +func (m *IdentitySet) SetUser(value Identityable)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_set_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_set_collection_response.go new file mode 100644 index 000000000..28c26e004 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySetCollectionResponse +type IdentitySetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentitySetable +} +// NewIdentitySetCollectionResponse instantiates a new IdentitySetCollectionResponse and sets the default values. +func NewIdentitySetCollectionResponse()(*IdentitySetCollectionResponse) { + m := &IdentitySetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentitySetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentitySetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentitySetCollectionResponse) GetValue()([]IdentitySetable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentitySetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentitySetCollectionResponse) SetValue(value []IdentitySetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_set_collection_responseable.go new file mode 100644 index 000000000..319b53c09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySetCollectionResponseable +type IdentitySetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentitySetable) + SetValue(value []IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_setable.go b/src/internal/connector/graph/betasdk/models/identity_setable.go new file mode 100644 index 000000000..d51626df0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_setable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySetable +type IdentitySetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplication()(Identityable) + GetDevice()(Identityable) + GetOdataType()(*string) + GetUser()(Identityable) + SetApplication(value Identityable)() + SetDevice(value Identityable)() + SetOdataType(value *string)() + SetUser(value Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_source.go b/src/internal/connector/graph/betasdk/models/identity_source.go new file mode 100644 index 000000000..6c749bfe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_source.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySource +type IdentitySource 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 OdataType property + odataType *string +} +// NewIdentitySource instantiates a new identitySource and sets the default values. +func NewIdentitySource()(*IdentitySource) { + m := &IdentitySource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdentitySourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.azureActiveDirectoryTenant": + return NewAzureActiveDirectoryTenant(), nil + case "#microsoft.graph.crossCloudAzureActiveDirectoryTenant": + return NewCrossCloudAzureActiveDirectoryTenant(), nil + case "#microsoft.graph.domainIdentitySource": + return NewDomainIdentitySource(), nil + case "#microsoft.graph.externalDomainFederation": + return NewExternalDomainFederation(), nil + } + } + } + } + return NewIdentitySource(), 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 *IdentitySource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IdentitySource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IdentitySource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IdentitySource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IdentitySource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_source_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_source_collection_response.go new file mode 100644 index 000000000..94381177d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_source_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySourceCollectionResponse +type IdentitySourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentitySourceable +} +// NewIdentitySourceCollectionResponse instantiates a new IdentitySourceCollectionResponse and sets the default values. +func NewIdentitySourceCollectionResponse()(*IdentitySourceCollectionResponse) { + m := &IdentitySourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentitySourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentitySourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySourceable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentitySourceCollectionResponse) GetValue()([]IdentitySourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentitySourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentitySourceCollectionResponse) SetValue(value []IdentitySourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_source_collection_responseable.go new file mode 100644 index 000000000..469b13899 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_source_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySourceCollectionResponseable +type IdentitySourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentitySourceable) + SetValue(value []IdentitySourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_source_type.go b/src/internal/connector/graph/betasdk/models/identity_source_type.go new file mode 100644 index 000000000..6ad07b095 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_source_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentitySourceType int + +const ( + AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE IdentitySourceType = iota + EXTERNAL_IDENTITYSOURCETYPE +) + +func (i IdentitySourceType) String() string { + return []string{"azureActiveDirectory", "external"}[i] +} +func ParseIdentitySourceType(v string) (interface{}, error) { + result := AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE + switch v { + case "azureActiveDirectory": + result = AZUREACTIVEDIRECTORY_IDENTITYSOURCETYPE + case "external": + result = EXTERNAL_IDENTITYSOURCETYPE + default: + return 0, errors.New("Unknown IdentitySourceType value: " + v) + } + return &result, nil +} +func SerializeIdentitySourceType(values []IdentitySourceType) []string { + 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/identity_sourceable.go b/src/internal/connector/graph/betasdk/models/identity_sourceable.go new file mode 100644 index 000000000..8b4f4bf93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_sourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySourceable +type IdentitySourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow.go b/src/internal/connector/graph/betasdk/models/identity_user_flow.go new file mode 100644 index 000000000..4b173cc5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow.go @@ -0,0 +1,107 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlow +type IdentityUserFlow struct { + Entity + // The userFlowType property + userFlowType *UserFlowType + // The userFlowTypeVersion property + userFlowTypeVersion *float32 +} +// NewIdentityUserFlow instantiates a new identityUserFlow and sets the default values. +func NewIdentityUserFlow()(*IdentityUserFlow) { + m := &IdentityUserFlow{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityUserFlowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.b2cIdentityUserFlow": + return NewB2cIdentityUserFlow(), nil + case "#microsoft.graph.b2xIdentityUserFlow": + return NewB2xIdentityUserFlow(), nil + } + } + } + } + return NewIdentityUserFlow(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["userFlowType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserFlowType) + if err != nil { + return err + } + if val != nil { + m.SetUserFlowType(val.(*UserFlowType)) + } + return nil + } + res["userFlowTypeVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetUserFlowTypeVersion(val) + } + return nil + } + return res +} +// GetUserFlowType gets the userFlowType property value. The userFlowType property +func (m *IdentityUserFlow) GetUserFlowType()(*UserFlowType) { + return m.userFlowType +} +// GetUserFlowTypeVersion gets the userFlowTypeVersion property value. The userFlowTypeVersion property +func (m *IdentityUserFlow) GetUserFlowTypeVersion()(*float32) { + return m.userFlowTypeVersion +} +// Serialize serializes information the current object +func (m *IdentityUserFlow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetUserFlowType() != nil { + cast := (*m.GetUserFlowType()).String() + err = writer.WriteStringValue("userFlowType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteFloat32Value("userFlowTypeVersion", m.GetUserFlowTypeVersion()) + if err != nil { + return err + } + } + return nil +} +// SetUserFlowType sets the userFlowType property value. The userFlowType property +func (m *IdentityUserFlow) SetUserFlowType(value *UserFlowType)() { + m.userFlowType = value +} +// SetUserFlowTypeVersion sets the userFlowTypeVersion property value. The userFlowTypeVersion property +func (m *IdentityUserFlow) SetUserFlowTypeVersion(value *float32)() { + m.userFlowTypeVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute.go new file mode 100644 index 000000000..0e7501198 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute.go @@ -0,0 +1,160 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttribute +type IdentityUserFlowAttribute struct { + Entity + // The dataType property + dataType *IdentityUserFlowAttributeDataType + // The description of the user flow attribute that's shown to the user at the time of sign-up. + description *string + // The display name of the user flow attribute. + displayName *string + // The userFlowAttributeType property + userFlowAttributeType *IdentityUserFlowAttributeType +} +// NewIdentityUserFlowAttribute instantiates a new identityUserFlowAttribute and sets the default values. +func NewIdentityUserFlowAttribute()(*IdentityUserFlowAttribute) { + m := &IdentityUserFlowAttribute{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityUserFlowAttributeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowAttributeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.identityBuiltInUserFlowAttribute": + return NewIdentityBuiltInUserFlowAttribute(), nil + case "#microsoft.graph.identityCustomUserFlowAttribute": + return NewIdentityCustomUserFlowAttribute(), nil + } + } + } + } + return NewIdentityUserFlowAttribute(), nil +} +// GetDataType gets the dataType property value. The dataType property +func (m *IdentityUserFlowAttribute) GetDataType()(*IdentityUserFlowAttributeDataType) { + return m.dataType +} +// GetDescription gets the description property value. The description of the user flow attribute that's shown to the user at the time of sign-up. +func (m *IdentityUserFlowAttribute) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the user flow attribute. +func (m *IdentityUserFlowAttribute) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlowAttribute) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["dataType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentityUserFlowAttributeDataType) + if err != nil { + return err + } + if val != nil { + m.SetDataType(val.(*IdentityUserFlowAttributeDataType)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["userFlowAttributeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentityUserFlowAttributeType) + if err != nil { + return err + } + if val != nil { + m.SetUserFlowAttributeType(val.(*IdentityUserFlowAttributeType)) + } + return nil + } + return res +} +// GetUserFlowAttributeType gets the userFlowAttributeType property value. The userFlowAttributeType property +func (m *IdentityUserFlowAttribute) GetUserFlowAttributeType()(*IdentityUserFlowAttributeType) { + return m.userFlowAttributeType +} +// Serialize serializes information the current object +func (m *IdentityUserFlowAttribute) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDataType() != nil { + cast := (*m.GetDataType()).String() + err = writer.WriteStringValue("dataType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetUserFlowAttributeType() != nil { + cast := (*m.GetUserFlowAttributeType()).String() + err = writer.WriteStringValue("userFlowAttributeType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDataType sets the dataType property value. The dataType property +func (m *IdentityUserFlowAttribute) SetDataType(value *IdentityUserFlowAttributeDataType)() { + m.dataType = value +} +// SetDescription sets the description property value. The description of the user flow attribute that's shown to the user at the time of sign-up. +func (m *IdentityUserFlowAttribute) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the user flow attribute. +func (m *IdentityUserFlowAttribute) SetDisplayName(value *string)() { + m.displayName = value +} +// SetUserFlowAttributeType sets the userFlowAttributeType property value. The userFlowAttributeType property +func (m *IdentityUserFlowAttribute) SetUserFlowAttributeType(value *IdentityUserFlowAttributeType)() { + m.userFlowAttributeType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment.go new file mode 100644 index 000000000..38393996b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment.go @@ -0,0 +1,199 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityUserFlowAttributeAssignment struct { + Entity + // The display name of the identityUserFlowAttribute within a user flow. + displayName *string + // Determines whether the identityUserFlowAttribute is optional. true means the user doesn't have to provide a value. false means the user cannot complete sign-up without providing a value. + isOptional *bool + // Determines whether the identityUserFlowAttribute requires verification. This is only used for verifying the user's phone number or email address. + requiresVerification *bool + // The user attribute that you want to add to your user flow. + userAttribute IdentityUserFlowAttributeable + // The input options for the user flow attribute. Only applicable when the userInputType is radioSingleSelect, dropdownSingleSelect, or checkboxMultiSelect. + userAttributeValues []UserAttributeValuesItemable + // The userInputType property + userInputType *IdentityUserFlowAttributeInputType +} +// NewIdentityUserFlowAttributeAssignment instantiates a new identityUserFlowAttributeAssignment and sets the default values. +func NewIdentityUserFlowAttributeAssignment()(*IdentityUserFlowAttributeAssignment) { + m := &IdentityUserFlowAttributeAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateIdentityUserFlowAttributeAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowAttributeAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityUserFlowAttributeAssignment(), nil +} +// GetDisplayName gets the displayName property value. The display name of the identityUserFlowAttribute within a user flow. +func (m *IdentityUserFlowAttributeAssignment) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlowAttributeAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isOptional"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOptional(val) + } + return nil + } + res["requiresVerification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiresVerification(val) + } + return nil + } + res["userAttribute"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityUserFlowAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserAttribute(val.(IdentityUserFlowAttributeable)) + } + return nil + } + res["userAttributeValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserAttributeValuesItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserAttributeValuesItemable, len(val)) + for i, v := range val { + res[i] = v.(UserAttributeValuesItemable) + } + m.SetUserAttributeValues(res) + } + return nil + } + res["userInputType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIdentityUserFlowAttributeInputType) + if err != nil { + return err + } + if val != nil { + m.SetUserInputType(val.(*IdentityUserFlowAttributeInputType)) + } + return nil + } + return res +} +// GetIsOptional gets the isOptional property value. Determines whether the identityUserFlowAttribute is optional. true means the user doesn't have to provide a value. false means the user cannot complete sign-up without providing a value. +func (m *IdentityUserFlowAttributeAssignment) GetIsOptional()(*bool) { + return m.isOptional +} +// GetRequiresVerification gets the requiresVerification property value. Determines whether the identityUserFlowAttribute requires verification. This is only used for verifying the user's phone number or email address. +func (m *IdentityUserFlowAttributeAssignment) GetRequiresVerification()(*bool) { + return m.requiresVerification +} +// GetUserAttribute gets the userAttribute property value. The user attribute that you want to add to your user flow. +func (m *IdentityUserFlowAttributeAssignment) GetUserAttribute()(IdentityUserFlowAttributeable) { + return m.userAttribute +} +// GetUserAttributeValues gets the userAttributeValues property value. The input options for the user flow attribute. Only applicable when the userInputType is radioSingleSelect, dropdownSingleSelect, or checkboxMultiSelect. +func (m *IdentityUserFlowAttributeAssignment) GetUserAttributeValues()([]UserAttributeValuesItemable) { + return m.userAttributeValues +} +// GetUserInputType gets the userInputType property value. The userInputType property +func (m *IdentityUserFlowAttributeAssignment) GetUserInputType()(*IdentityUserFlowAttributeInputType) { + return m.userInputType +} +// Serialize serializes information the current object +func (m *IdentityUserFlowAttributeAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOptional", m.GetIsOptional()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requiresVerification", m.GetRequiresVerification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userAttribute", m.GetUserAttribute()) + if err != nil { + return err + } + } + if m.GetUserAttributeValues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserAttributeValues())) + for i, v := range m.GetUserAttributeValues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userAttributeValues", cast) + if err != nil { + return err + } + } + if m.GetUserInputType() != nil { + cast := (*m.GetUserInputType()).String() + err = writer.WriteStringValue("userInputType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the identityUserFlowAttribute within a user flow. +func (m *IdentityUserFlowAttributeAssignment) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsOptional sets the isOptional property value. Determines whether the identityUserFlowAttribute is optional. true means the user doesn't have to provide a value. false means the user cannot complete sign-up without providing a value. +func (m *IdentityUserFlowAttributeAssignment) SetIsOptional(value *bool)() { + m.isOptional = value +} +// SetRequiresVerification sets the requiresVerification property value. Determines whether the identityUserFlowAttribute requires verification. This is only used for verifying the user's phone number or email address. +func (m *IdentityUserFlowAttributeAssignment) SetRequiresVerification(value *bool)() { + m.requiresVerification = value +} +// SetUserAttribute sets the userAttribute property value. The user attribute that you want to add to your user flow. +func (m *IdentityUserFlowAttributeAssignment) SetUserAttribute(value IdentityUserFlowAttributeable)() { + m.userAttribute = value +} +// SetUserAttributeValues sets the userAttributeValues property value. The input options for the user flow attribute. Only applicable when the userInputType is radioSingleSelect, dropdownSingleSelect, or checkboxMultiSelect. +func (m *IdentityUserFlowAttributeAssignment) SetUserAttributeValues(value []UserAttributeValuesItemable)() { + m.userAttributeValues = value +} +// SetUserInputType sets the userInputType property value. The userInputType property +func (m *IdentityUserFlowAttributeAssignment) SetUserInputType(value *IdentityUserFlowAttributeInputType)() { + m.userInputType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_response.go new file mode 100644 index 000000000..6b86ca466 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeAssignmentCollectionResponse +type IdentityUserFlowAttributeAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityUserFlowAttributeAssignmentable +} +// NewIdentityUserFlowAttributeAssignmentCollectionResponse instantiates a new IdentityUserFlowAttributeAssignmentCollectionResponse and sets the default values. +func NewIdentityUserFlowAttributeAssignmentCollectionResponse()(*IdentityUserFlowAttributeAssignmentCollectionResponse) { + m := &IdentityUserFlowAttributeAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityUserFlowAttributeAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowAttributeAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityUserFlowAttributeAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlowAttributeAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityUserFlowAttributeAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityUserFlowAttributeAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IdentityUserFlowAttributeAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityUserFlowAttributeAssignmentCollectionResponse) GetValue()([]IdentityUserFlowAttributeAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityUserFlowAttributeAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityUserFlowAttributeAssignmentCollectionResponse) SetValue(value []IdentityUserFlowAttributeAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_responseable.go new file mode 100644 index 000000000..2a1e50f40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeAssignmentCollectionResponseable +type IdentityUserFlowAttributeAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityUserFlowAttributeAssignmentable) + SetValue(value []IdentityUserFlowAttributeAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignmentable.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignmentable.go new file mode 100644 index 000000000..c3c7608e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_assignmentable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeAssignmentable +type IdentityUserFlowAttributeAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetIsOptional()(*bool) + GetRequiresVerification()(*bool) + GetUserAttribute()(IdentityUserFlowAttributeable) + GetUserAttributeValues()([]UserAttributeValuesItemable) + GetUserInputType()(*IdentityUserFlowAttributeInputType) + SetDisplayName(value *string)() + SetIsOptional(value *bool)() + SetRequiresVerification(value *bool)() + SetUserAttribute(value IdentityUserFlowAttributeable)() + SetUserAttributeValues(value []UserAttributeValuesItemable)() + SetUserInputType(value *IdentityUserFlowAttributeInputType)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_response.go new file mode 100644 index 000000000..4cfbf4f80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeCollectionResponse +type IdentityUserFlowAttributeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityUserFlowAttributeable +} +// NewIdentityUserFlowAttributeCollectionResponse instantiates a new IdentityUserFlowAttributeCollectionResponse and sets the default values. +func NewIdentityUserFlowAttributeCollectionResponse()(*IdentityUserFlowAttributeCollectionResponse) { + m := &IdentityUserFlowAttributeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityUserFlowAttributeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowAttributeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityUserFlowAttributeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlowAttributeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityUserFlowAttributeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityUserFlowAttributeable, len(val)) + for i, v := range val { + res[i] = v.(IdentityUserFlowAttributeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityUserFlowAttributeCollectionResponse) GetValue()([]IdentityUserFlowAttributeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityUserFlowAttributeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityUserFlowAttributeCollectionResponse) SetValue(value []IdentityUserFlowAttributeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_responseable.go new file mode 100644 index 000000000..c353a3006 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeCollectionResponseable +type IdentityUserFlowAttributeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityUserFlowAttributeable) + SetValue(value []IdentityUserFlowAttributeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_data_type.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_data_type.go new file mode 100644 index 000000000..b24043371 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_data_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityUserFlowAttributeDataType int + +const ( + STRING_IDENTITYUSERFLOWATTRIBUTEDATATYPE IdentityUserFlowAttributeDataType = iota + BOOLEAN_IDENTITYUSERFLOWATTRIBUTEDATATYPE + INT64_IDENTITYUSERFLOWATTRIBUTEDATATYPE + STRINGCOLLECTION_IDENTITYUSERFLOWATTRIBUTEDATATYPE + DATETIME_IDENTITYUSERFLOWATTRIBUTEDATATYPE + UNKNOWNFUTUREVALUE_IDENTITYUSERFLOWATTRIBUTEDATATYPE +) + +func (i IdentityUserFlowAttributeDataType) String() string { + return []string{"string", "boolean", "int64", "stringCollection", "dateTime", "unknownFutureValue"}[i] +} +func ParseIdentityUserFlowAttributeDataType(v string) (interface{}, error) { + result := STRING_IDENTITYUSERFLOWATTRIBUTEDATATYPE + switch v { + case "string": + result = STRING_IDENTITYUSERFLOWATTRIBUTEDATATYPE + case "boolean": + result = BOOLEAN_IDENTITYUSERFLOWATTRIBUTEDATATYPE + case "int64": + result = INT64_IDENTITYUSERFLOWATTRIBUTEDATATYPE + case "stringCollection": + result = STRINGCOLLECTION_IDENTITYUSERFLOWATTRIBUTEDATATYPE + case "dateTime": + result = DATETIME_IDENTITYUSERFLOWATTRIBUTEDATATYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IDENTITYUSERFLOWATTRIBUTEDATATYPE + default: + return 0, errors.New("Unknown IdentityUserFlowAttributeDataType value: " + v) + } + return &result, nil +} +func SerializeIdentityUserFlowAttributeDataType(values []IdentityUserFlowAttributeDataType) []string { + 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/identity_user_flow_attribute_input_type.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_input_type.go new file mode 100644 index 000000000..c7f9b1a81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_input_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityUserFlowAttributeInputType int + +const ( + TEXTBOX_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE IdentityUserFlowAttributeInputType = iota + DATETIMEDROPDOWN_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + RADIOSINGLESELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + DROPDOWNSINGLESELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + EMAILBOX_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + CHECKBOXMULTISELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE +) + +func (i IdentityUserFlowAttributeInputType) String() string { + return []string{"textBox", "dateTimeDropdown", "radioSingleSelect", "dropdownSingleSelect", "emailBox", "checkboxMultiSelect"}[i] +} +func ParseIdentityUserFlowAttributeInputType(v string) (interface{}, error) { + result := TEXTBOX_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + switch v { + case "textBox": + result = TEXTBOX_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + case "dateTimeDropdown": + result = DATETIMEDROPDOWN_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + case "radioSingleSelect": + result = RADIOSINGLESELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + case "dropdownSingleSelect": + result = DROPDOWNSINGLESELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + case "emailBox": + result = EMAILBOX_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + case "checkboxMultiSelect": + result = CHECKBOXMULTISELECT_IDENTITYUSERFLOWATTRIBUTEINPUTTYPE + default: + return 0, errors.New("Unknown IdentityUserFlowAttributeInputType value: " + v) + } + return &result, nil +} +func SerializeIdentityUserFlowAttributeInputType(values []IdentityUserFlowAttributeInputType) []string { + 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/identity_user_flow_attribute_type.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_type.go new file mode 100644 index 000000000..a3d4e2b87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attribute_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IdentityUserFlowAttributeType int + +const ( + BUILTIN_IDENTITYUSERFLOWATTRIBUTETYPE IdentityUserFlowAttributeType = iota + CUSTOM_IDENTITYUSERFLOWATTRIBUTETYPE + REQUIRED_IDENTITYUSERFLOWATTRIBUTETYPE + UNKNOWNFUTUREVALUE_IDENTITYUSERFLOWATTRIBUTETYPE +) + +func (i IdentityUserFlowAttributeType) String() string { + return []string{"builtIn", "custom", "required", "unknownFutureValue"}[i] +} +func ParseIdentityUserFlowAttributeType(v string) (interface{}, error) { + result := BUILTIN_IDENTITYUSERFLOWATTRIBUTETYPE + switch v { + case "builtIn": + result = BUILTIN_IDENTITYUSERFLOWATTRIBUTETYPE + case "custom": + result = CUSTOM_IDENTITYUSERFLOWATTRIBUTETYPE + case "required": + result = REQUIRED_IDENTITYUSERFLOWATTRIBUTETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_IDENTITYUSERFLOWATTRIBUTETYPE + default: + return 0, errors.New("Unknown IdentityUserFlowAttributeType value: " + v) + } + return &result, nil +} +func SerializeIdentityUserFlowAttributeType(values []IdentityUserFlowAttributeType) []string { + 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/identity_user_flow_attributeable.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_attributeable.go new file mode 100644 index 000000000..f7f52f2db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_attributeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowAttributeable +type IdentityUserFlowAttributeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataType()(*IdentityUserFlowAttributeDataType) + GetDescription()(*string) + GetDisplayName()(*string) + GetUserFlowAttributeType()(*IdentityUserFlowAttributeType) + SetDataType(value *IdentityUserFlowAttributeDataType)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetUserFlowAttributeType(value *IdentityUserFlowAttributeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_response.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_response.go new file mode 100644 index 000000000..ade4507c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowCollectionResponse +type IdentityUserFlowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IdentityUserFlowable +} +// NewIdentityUserFlowCollectionResponse instantiates a new IdentityUserFlowCollectionResponse and sets the default values. +func NewIdentityUserFlowCollectionResponse()(*IdentityUserFlowCollectionResponse) { + m := &IdentityUserFlowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIdentityUserFlowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityUserFlowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentityUserFlowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentityUserFlowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentityUserFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentityUserFlowable, len(val)) + for i, v := range val { + res[i] = v.(IdentityUserFlowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IdentityUserFlowCollectionResponse) GetValue()([]IdentityUserFlowable) { + return m.value +} +// Serialize serializes information the current object +func (m *IdentityUserFlowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IdentityUserFlowCollectionResponse) SetValue(value []IdentityUserFlowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_responseable.go new file mode 100644 index 000000000..5654a434e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flow_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowCollectionResponseable +type IdentityUserFlowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IdentityUserFlowable) + SetValue(value []IdentityUserFlowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identity_user_flowable.go b/src/internal/connector/graph/betasdk/models/identity_user_flowable.go new file mode 100644 index 000000000..9a26f863b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identity_user_flowable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentityUserFlowable +type IdentityUserFlowable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserFlowType()(*UserFlowType) + GetUserFlowTypeVersion()(*float32) + SetUserFlowType(value *UserFlowType)() + SetUserFlowTypeVersion(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identityable.go b/src/internal/connector/graph/betasdk/models/identityable.go new file mode 100644 index 000000000..fcf0bbc9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identityable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Identityable +type Identityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension.go new file mode 100644 index 000000000..04aa4dc1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension.go @@ -0,0 +1,168 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtension +type CustomTaskExtension struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomCalloutExtension + // The callback configuration for a custom extension. + callbackConfiguration ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable + // The unique identifier of the Azure AD user that created the custom task extension.Supports $filter(eq, ne) and $expand. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // When the custom task extension was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of the Azure AD user that modified the custom task extension last.Supports $filter(eq, ne) and $expand. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // When the custom extension was last modified.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewCustomTaskExtension instantiates a new CustomTaskExtension and sets the default values. +func NewCustomTaskExtension()(*CustomTaskExtension) { + m := &CustomTaskExtension{ + CustomCalloutExtension: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewCustomCalloutExtension(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.customTaskExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomTaskExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomTaskExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomTaskExtension(), nil +} +// GetCallbackConfiguration gets the callbackConfiguration property value. The callback configuration for a custom extension. +func (m *CustomTaskExtension) GetCallbackConfiguration()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable) { + return m.callbackConfiguration +} +// GetCreatedBy gets the createdBy property value. The unique identifier of the Azure AD user that created the custom task extension.Supports $filter(eq, ne) and $expand. +func (m *CustomTaskExtension) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. When the custom task extension was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *CustomTaskExtension) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomTaskExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomCalloutExtension.GetFieldDeserializers() + res["callbackConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateCustomExtensionCallbackConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCallbackConfiguration(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The unique identifier of the Azure AD user that modified the custom task extension last.Supports $filter(eq, ne) and $expand. +func (m *CustomTaskExtension) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. When the custom extension was last modified.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *CustomTaskExtension) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *CustomTaskExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomCalloutExtension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("callbackConfiguration", m.GetCallbackConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCallbackConfiguration sets the callbackConfiguration property value. The callback configuration for a custom extension. +func (m *CustomTaskExtension) SetCallbackConfiguration(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable)() { + m.callbackConfiguration = value +} +// SetCreatedBy sets the createdBy property value. The unique identifier of the Azure AD user that created the custom task extension.Supports $filter(eq, ne) and $expand. +func (m *CustomTaskExtension) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. When the custom task extension was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *CustomTaskExtension) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The unique identifier of the Azure AD user that modified the custom task extension last.Supports $filter(eq, ne) and $expand. +func (m *CustomTaskExtension) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. When the custom extension was last modified.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *CustomTaskExtension) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configuration.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configuration.go new file mode 100644 index 000000000..7974ff339 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configuration.go @@ -0,0 +1,37 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtensionCallbackConfiguration +type CustomTaskExtensionCallbackConfiguration struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfiguration +} +// NewCustomTaskExtensionCallbackConfiguration instantiates a new CustomTaskExtensionCallbackConfiguration and sets the default values. +func NewCustomTaskExtensionCallbackConfiguration()(*CustomTaskExtensionCallbackConfiguration) { + m := &CustomTaskExtensionCallbackConfiguration{ + CustomExtensionCallbackConfiguration: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewCustomExtensionCallbackConfiguration(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.customTaskExtensionCallbackConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomTaskExtensionCallbackConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomTaskExtensionCallbackConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomTaskExtensionCallbackConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionCallbackConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *CustomTaskExtensionCallbackConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionCallbackConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configurationable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configurationable.go new file mode 100644 index 000000000..5938a71ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_callback_configurationable.go @@ -0,0 +1,12 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtensionCallbackConfigurationable +type CustomTaskExtensionCallbackConfigurationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_response.go new file mode 100644 index 000000000..4690fc6ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtensionCollectionResponse +type CustomTaskExtensionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CustomTaskExtensionable +} +// NewCustomTaskExtensionCollectionResponse instantiates a new CustomTaskExtensionCollectionResponse and sets the default values. +func NewCustomTaskExtensionCollectionResponse()(*CustomTaskExtensionCollectionResponse) { + m := &CustomTaskExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCustomTaskExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomTaskExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomTaskExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomTaskExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomTaskExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomTaskExtensionable, len(val)) + for i, v := range val { + res[i] = v.(CustomTaskExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CustomTaskExtensionCollectionResponse) GetValue()([]CustomTaskExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CustomTaskExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CustomTaskExtensionCollectionResponse) SetValue(value []CustomTaskExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_responseable.go new file mode 100644 index 000000000..4f33ffb7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extension_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtensionCollectionResponseable +type CustomTaskExtensionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CustomTaskExtensionable) + SetValue(value []CustomTaskExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extensionable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extensionable.go new file mode 100644 index 000000000..7becf5fec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/custom_task_extensionable.go @@ -0,0 +1,23 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CustomTaskExtensionable +type CustomTaskExtensionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomCalloutExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCallbackConfiguration()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCallbackConfiguration(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CustomExtensionCallbackConfigurationable)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settings.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settings.go new file mode 100644 index 000000000..c45481635 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settings.go @@ -0,0 +1,61 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LifecycleManagementSettings provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LifecycleManagementSettings struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The interval in hours at which all workflows running in the tenant should be scheduled for execution. This interval has a minimum value of 1 and a maximum value of 24. The default value is 3 hours. + workflowScheduleIntervalInHours *int32 +} +// NewLifecycleManagementSettings instantiates a new lifecycleManagementSettings and sets the default values. +func NewLifecycleManagementSettings()(*LifecycleManagementSettings) { + m := &LifecycleManagementSettings{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateLifecycleManagementSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLifecycleManagementSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLifecycleManagementSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LifecycleManagementSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["workflowScheduleIntervalInHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowScheduleIntervalInHours(val) + } + return nil + } + return res +} +// GetWorkflowScheduleIntervalInHours gets the workflowScheduleIntervalInHours property value. The interval in hours at which all workflows running in the tenant should be scheduled for execution. This interval has a minimum value of 1 and a maximum value of 24. The default value is 3 hours. +func (m *LifecycleManagementSettings) GetWorkflowScheduleIntervalInHours()(*int32) { + return m.workflowScheduleIntervalInHours +} +// Serialize serializes information the current object +func (m *LifecycleManagementSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("workflowScheduleIntervalInHours", m.GetWorkflowScheduleIntervalInHours()) + if err != nil { + return err + } + } + return nil +} +// SetWorkflowScheduleIntervalInHours sets the workflowScheduleIntervalInHours property value. The interval in hours at which all workflows running in the tenant should be scheduled for execution. This interval has a minimum value of 1 and a maximum value of 24. The default value is 3 hours. +func (m *LifecycleManagementSettings) SetWorkflowScheduleIntervalInHours(value *int32)() { + m.workflowScheduleIntervalInHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settingsable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settingsable.go new file mode 100644 index 000000000..ac677615a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_management_settingsable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LifecycleManagementSettingsable +type LifecycleManagementSettingsable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetWorkflowScheduleIntervalInHours()(*int32) + SetWorkflowScheduleIntervalInHours(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_task_category.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_task_category.go new file mode 100644 index 000000000..acb490449 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_task_category.go @@ -0,0 +1,37 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LifecycleTaskCategory int + +const ( + JOINER_LIFECYCLETASKCATEGORY LifecycleTaskCategory = iota + LEAVER_LIFECYCLETASKCATEGORY + UNKNOWNFUTUREVALUE_LIFECYCLETASKCATEGORY +) + +func (i LifecycleTaskCategory) String() string { + return []string{"joiner", "leaver", "unknownFutureValue"}[i] +} +func ParseLifecycleTaskCategory(v string) (interface{}, error) { + result := JOINER_LIFECYCLETASKCATEGORY + switch v { + case "joiner": + result = JOINER_LIFECYCLETASKCATEGORY + case "leaver": + result = LEAVER_LIFECYCLETASKCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LIFECYCLETASKCATEGORY + default: + return 0, errors.New("Unknown LifecycleTaskCategory value: " + v) + } + return &result, nil +} +func SerializeLifecycleTaskCategory(values []LifecycleTaskCategory) []string { + 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/identitygovernance/lifecycle_workflow_category.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflow_category.go new file mode 100644 index 000000000..9cb071081 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflow_category.go @@ -0,0 +1,37 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LifecycleWorkflowCategory int + +const ( + JOINER_LIFECYCLEWORKFLOWCATEGORY LifecycleWorkflowCategory = iota + LEAVER_LIFECYCLEWORKFLOWCATEGORY + UNKNOWNFUTUREVALUE_LIFECYCLEWORKFLOWCATEGORY +) + +func (i LifecycleWorkflowCategory) String() string { + return []string{"joiner", "leaver", "unknownFutureValue"}[i] +} +func ParseLifecycleWorkflowCategory(v string) (interface{}, error) { + result := JOINER_LIFECYCLEWORKFLOWCATEGORY + switch v { + case "joiner": + result = JOINER_LIFECYCLEWORKFLOWCATEGORY + case "leaver": + result = LEAVER_LIFECYCLEWORKFLOWCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LIFECYCLEWORKFLOWCATEGORY + default: + return 0, errors.New("Unknown LifecycleWorkflowCategory value: " + v) + } + return &result, nil +} +func SerializeLifecycleWorkflowCategory(values []LifecycleWorkflowCategory) []string { + 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/identitygovernance/lifecycle_workflow_processing_status.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflow_processing_status.go new file mode 100644 index 000000000..469154d46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflow_processing_status.go @@ -0,0 +1,49 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LifecycleWorkflowProcessingStatus int + +const ( + QUEUED_LIFECYCLEWORKFLOWPROCESSINGSTATUS LifecycleWorkflowProcessingStatus = iota + INPROGRESS_LIFECYCLEWORKFLOWPROCESSINGSTATUS + COMPLETED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + COMPLETEDWITHERRORS_LIFECYCLEWORKFLOWPROCESSINGSTATUS + CANCELED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + FAILED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + UNKNOWNFUTUREVALUE_LIFECYCLEWORKFLOWPROCESSINGSTATUS +) + +func (i LifecycleWorkflowProcessingStatus) String() string { + return []string{"queued", "inProgress", "completed", "completedWithErrors", "canceled", "failed", "unknownFutureValue"}[i] +} +func ParseLifecycleWorkflowProcessingStatus(v string) (interface{}, error) { + result := QUEUED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + switch v { + case "queued": + result = QUEUED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "inProgress": + result = INPROGRESS_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "completed": + result = COMPLETED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "completedWithErrors": + result = COMPLETEDWITHERRORS_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "canceled": + result = CANCELED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "failed": + result = FAILED_LIFECYCLEWORKFLOWPROCESSINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LIFECYCLEWORKFLOWPROCESSINGSTATUS + default: + return 0, errors.New("Unknown LifecycleWorkflowProcessingStatus value: " + v) + } + return &result, nil +} +func SerializeLifecycleWorkflowProcessingStatus(values []LifecycleWorkflowProcessingStatus) []string { + 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/identitygovernance/lifecycle_workflows_container.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflows_container.go new file mode 100644 index 000000000..3702dc84a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflows_container.go @@ -0,0 +1,223 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LifecycleWorkflowsContainer +type LifecycleWorkflowsContainer struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The customTaskExtension instance. + customTaskExtensions []CustomTaskExtensionable + // Deleted workflows in your lifecycle workflows instance. + deletedItems ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable + // The settings property + settings LifecycleManagementSettingsable + // The definition of tasks within the lifecycle workflows instance. + taskDefinitions []TaskDefinitionable + // The workflows in the lifecycle workflows instance. + workflows []Workflowable + // The workflow templates in the lifecycle workflow instance. + workflowTemplates []WorkflowTemplateable +} +// NewLifecycleWorkflowsContainer instantiates a new LifecycleWorkflowsContainer and sets the default values. +func NewLifecycleWorkflowsContainer()(*LifecycleWorkflowsContainer) { + m := &LifecycleWorkflowsContainer{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateLifecycleWorkflowsContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLifecycleWorkflowsContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLifecycleWorkflowsContainer(), nil +} +// GetCustomTaskExtensions gets the customTaskExtensions property value. The customTaskExtension instance. +func (m *LifecycleWorkflowsContainer) GetCustomTaskExtensions()([]CustomTaskExtensionable) { + return m.customTaskExtensions +} +// GetDeletedItems gets the deletedItems property value. Deleted workflows in your lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) GetDeletedItems()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable) { + return m.deletedItems +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LifecycleWorkflowsContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["customTaskExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomTaskExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomTaskExtensionable, len(val)) + for i, v := range val { + res[i] = v.(CustomTaskExtensionable) + } + m.SetCustomTaskExtensions(res) + } + return nil + } + res["deletedItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateDeletedItemContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeletedItems(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable)) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLifecycleManagementSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(LifecycleManagementSettingsable)) + } + return nil + } + res["taskDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(TaskDefinitionable) + } + m.SetTaskDefinitions(res) + } + return nil + } + res["workflows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Workflowable, len(val)) + for i, v := range val { + res[i] = v.(Workflowable) + } + m.SetWorkflows(res) + } + return nil + } + res["workflowTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowTemplateable, len(val)) + for i, v := range val { + res[i] = v.(WorkflowTemplateable) + } + m.SetWorkflowTemplates(res) + } + return nil + } + return res +} +// GetSettings gets the settings property value. The settings property +func (m *LifecycleWorkflowsContainer) GetSettings()(LifecycleManagementSettingsable) { + return m.settings +} +// GetTaskDefinitions gets the taskDefinitions property value. The definition of tasks within the lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) GetTaskDefinitions()([]TaskDefinitionable) { + return m.taskDefinitions +} +// GetWorkflows gets the workflows property value. The workflows in the lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) GetWorkflows()([]Workflowable) { + return m.workflows +} +// GetWorkflowTemplates gets the workflowTemplates property value. The workflow templates in the lifecycle workflow instance. +func (m *LifecycleWorkflowsContainer) GetWorkflowTemplates()([]WorkflowTemplateable) { + return m.workflowTemplates +} +// Serialize serializes information the current object +func (m *LifecycleWorkflowsContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCustomTaskExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomTaskExtensions())) + for i, v := range m.GetCustomTaskExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customTaskExtensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deletedItems", m.GetDeletedItems()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetTaskDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskDefinitions())) + for i, v := range m.GetTaskDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskDefinitions", cast) + if err != nil { + return err + } + } + if m.GetWorkflows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflows())) + for i, v := range m.GetWorkflows() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workflows", cast) + if err != nil { + return err + } + } + if m.GetWorkflowTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkflowTemplates())) + for i, v := range m.GetWorkflowTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workflowTemplates", cast) + if err != nil { + return err + } + } + return nil +} +// SetCustomTaskExtensions sets the customTaskExtensions property value. The customTaskExtension instance. +func (m *LifecycleWorkflowsContainer) SetCustomTaskExtensions(value []CustomTaskExtensionable)() { + m.customTaskExtensions = value +} +// SetDeletedItems sets the deletedItems property value. Deleted workflows in your lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) SetDeletedItems(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable)() { + m.deletedItems = value +} +// SetSettings sets the settings property value. The settings property +func (m *LifecycleWorkflowsContainer) SetSettings(value LifecycleManagementSettingsable)() { + m.settings = value +} +// SetTaskDefinitions sets the taskDefinitions property value. The definition of tasks within the lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) SetTaskDefinitions(value []TaskDefinitionable)() { + m.taskDefinitions = value +} +// SetWorkflows sets the workflows property value. The workflows in the lifecycle workflows instance. +func (m *LifecycleWorkflowsContainer) SetWorkflows(value []Workflowable)() { + m.workflows = value +} +// SetWorkflowTemplates sets the workflowTemplates property value. The workflow templates in the lifecycle workflow instance. +func (m *LifecycleWorkflowsContainer) SetWorkflowTemplates(value []WorkflowTemplateable)() { + m.workflowTemplates = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflows_containerable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflows_containerable.go new file mode 100644 index 000000000..7b418e6e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/lifecycle_workflows_containerable.go @@ -0,0 +1,24 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LifecycleWorkflowsContainerable +type LifecycleWorkflowsContainerable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomTaskExtensions()([]CustomTaskExtensionable) + GetDeletedItems()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable) + GetSettings()(LifecycleManagementSettingsable) + GetTaskDefinitions()([]TaskDefinitionable) + GetWorkflows()([]Workflowable) + GetWorkflowTemplates()([]WorkflowTemplateable) + SetCustomTaskExtensions(value []CustomTaskExtensionable)() + SetDeletedItems(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DeletedItemContainerable)() + SetSettings(value LifecycleManagementSettingsable)() + SetTaskDefinitions(value []TaskDefinitionable)() + SetWorkflows(value []Workflowable)() + SetWorkflowTemplates(value []WorkflowTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_only.go b/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_only.go new file mode 100644 index 000000000..e43cc5f24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_only.go @@ -0,0 +1,36 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnDemandExecutionOnly +type OnDemandExecutionOnly struct { + WorkflowExecutionConditions +} +// NewOnDemandExecutionOnly instantiates a new OnDemandExecutionOnly and sets the default values. +func NewOnDemandExecutionOnly()(*OnDemandExecutionOnly) { + m := &OnDemandExecutionOnly{ + WorkflowExecutionConditions: *NewWorkflowExecutionConditions(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.onDemandExecutionOnly"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnDemandExecutionOnlyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnDemandExecutionOnlyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnDemandExecutionOnly(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnDemandExecutionOnly) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowExecutionConditions.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *OnDemandExecutionOnly) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowExecutionConditions.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_onlyable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_onlyable.go new file mode 100644 index 000000000..3dba25f50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/on_demand_execution_onlyable.go @@ -0,0 +1,11 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnDemandExecutionOnlyable +type OnDemandExecutionOnlyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowExecutionConditionsable +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/parameter.go b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter.go new file mode 100644 index 000000000..3b6438479 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter.go @@ -0,0 +1,154 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Parameter +type Parameter 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 name of the parameter. + name *string + // The OdataType property + odataType *string + // The values of the parameter. + values []string + // The valueType property + valueType *ValueType +} +// NewParameter instantiates a new parameter and sets the default values. +func NewParameter()(*Parameter) { + m := &Parameter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParameter(), 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 *Parameter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Parameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["values"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetValues(res) + } + return nil + } + res["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseValueType) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*ValueType)) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the parameter. +func (m *Parameter) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Parameter) GetOdataType()(*string) { + return m.odataType +} +// GetValues gets the values property value. The values of the parameter. +func (m *Parameter) GetValues()([]string) { + return m.values +} +// GetValueType gets the valueType property value. The valueType property +func (m *Parameter) GetValueType()(*ValueType) { + return m.valueType +} +// Serialize serializes information the current object +func (m *Parameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetValues() != nil { + err := writer.WriteCollectionOfStringValues("values", m.GetValues()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("valueType", &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 *Parameter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name of the parameter. +func (m *Parameter) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Parameter) SetOdataType(value *string)() { + m.odataType = value +} +// SetValues sets the values property value. The values of the parameter. +func (m *Parameter) SetValues(value []string)() { + m.values = value +} +// SetValueType sets the valueType property value. The valueType property +func (m *Parameter) SetValueType(value *ValueType)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_response.go new file mode 100644 index 000000000..5718cf028 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ParameterCollectionResponse +type ParameterCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Parameterable +} +// NewParameterCollectionResponse instantiates a new ParameterCollectionResponse and sets the default values. +func NewParameterCollectionResponse()(*ParameterCollectionResponse) { + m := &ParameterCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateParameterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParameterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParameterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParameterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Parameterable, len(val)) + for i, v := range val { + res[i] = v.(Parameterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ParameterCollectionResponse) GetValue()([]Parameterable) { + return m.value +} +// Serialize serializes information the current object +func (m *ParameterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ParameterCollectionResponse) SetValue(value []Parameterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_responseable.go new file mode 100644 index 000000000..19ce91b4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/parameter_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ParameterCollectionResponseable +type ParameterCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Parameterable) + SetValue(value []Parameterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/parameterable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/parameterable.go new file mode 100644 index 000000000..fb411e3e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/parameterable.go @@ -0,0 +1,19 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Parameterable +type Parameterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetValues()([]string) + GetValueType()(*ValueType) + SetName(value *string)() + SetOdataType(value *string)() + SetValues(value []string)() + SetValueType(value *ValueType)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_set.go b/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_set.go new file mode 100644 index 000000000..25a703648 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_set.go @@ -0,0 +1,63 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RuleBasedSubjectSet +type RuleBasedSubjectSet struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSet + // The rule for the subject set. Lifecycle Workflows supports a rich set of user properties for configuring the rules using $filter query expressions. For more information, see supported user and query parameters. + rule *string +} +// NewRuleBasedSubjectSet instantiates a new RuleBasedSubjectSet and sets the default values. +func NewRuleBasedSubjectSet()(*RuleBasedSubjectSet) { + m := &RuleBasedSubjectSet{ + SubjectSet: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewSubjectSet(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.ruleBasedSubjectSet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRuleBasedSubjectSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRuleBasedSubjectSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRuleBasedSubjectSet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RuleBasedSubjectSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SubjectSet.GetFieldDeserializers() + res["rule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRule(val) + } + return nil + } + return res +} +// GetRule gets the rule property value. The rule for the subject set. Lifecycle Workflows supports a rich set of user properties for configuring the rules using $filter query expressions. For more information, see supported user and query parameters. +func (m *RuleBasedSubjectSet) GetRule()(*string) { + return m.rule +} +// Serialize serializes information the current object +func (m *RuleBasedSubjectSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SubjectSet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("rule", m.GetRule()) + if err != nil { + return err + } + } + return nil +} +// SetRule sets the rule property value. The rule for the subject set. Lifecycle Workflows supports a rich set of user properties for configuring the rules using $filter query expressions. For more information, see supported user and query parameters. +func (m *RuleBasedSubjectSet) SetRule(value *string)() { + m.rule = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_setable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_setable.go new file mode 100644 index 000000000..3f6a69ae6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/rule_based_subject_setable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RuleBasedSubjectSetable +type RuleBasedSubjectSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable + GetRule()(*string) + SetRule(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/run.go b/src/internal/connector/graph/betasdk/models/identitygovernance/run.go new file mode 100644 index 000000000..a67d88fb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/run.go @@ -0,0 +1,418 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Run provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Run struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The date time that the run completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of tasks that failed in the run execution. + failedTasksCount *int32 + // The number of users that failed in the run execution. + failedUsersCount *int32 + // The datetime that the run was last updated.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The processingStatus property + processingStatus *LifecycleWorkflowProcessingStatus + // The date time that the run is scheduled to be executed for a workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + scheduledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date time that the run execution started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + startedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of successfully completed users in the run. + successfulUsersCount *int32 + // The related taskProcessingResults. + taskProcessingResults []TaskProcessingResultable + // The totalTasksCount property + totalTasksCount *int32 + // The total number of unprocessed tasks in the run execution. + totalUnprocessedTasksCount *int32 + // The total number of users in the workflow execution. + totalUsersCount *int32 + // The associated individual user execution. + userProcessingResults []UserProcessingResultable + // The workflowExecutionType property + workflowExecutionType *WorkflowExecutionType +} +// NewRun instantiates a new run and sets the default values. +func NewRun()(*Run) { + m := &Run{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateRunFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRunFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRun(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. The date time that the run completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetFailedTasksCount gets the failedTasksCount property value. The number of tasks that failed in the run execution. +func (m *Run) GetFailedTasksCount()(*int32) { + return m.failedTasksCount +} +// GetFailedUsersCount gets the failedUsersCount property value. The number of users that failed in the run execution. +func (m *Run) GetFailedUsersCount()(*int32) { + return m.failedUsersCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Run) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["failedTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedTasksCount(val) + } + return nil + } + res["failedUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUsersCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["processingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*LifecycleWorkflowProcessingStatus)) + } + return nil + } + res["scheduledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetScheduledDateTime(val) + } + return nil + } + res["startedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedDateTime(val) + } + return nil + } + res["successfulUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulUsersCount(val) + } + return nil + } + res["taskProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(TaskProcessingResultable) + } + m.SetTaskProcessingResults(res) + } + return nil + } + res["totalTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTasksCount(val) + } + return nil + } + res["totalUnprocessedTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUnprocessedTasksCount(val) + } + return nil + } + res["totalUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUsersCount(val) + } + return nil + } + res["userProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(UserProcessingResultable) + } + m.SetUserProcessingResults(res) + } + return nil + } + res["workflowExecutionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkflowExecutionType) + if err != nil { + return err + } + if val != nil { + m.SetWorkflowExecutionType(val.(*WorkflowExecutionType)) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The datetime that the run was last updated.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetProcessingStatus gets the processingStatus property value. The processingStatus property +func (m *Run) GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) { + return m.processingStatus +} +// GetScheduledDateTime gets the scheduledDateTime property value. The date time that the run is scheduled to be executed for a workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) GetScheduledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.scheduledDateTime +} +// GetStartedDateTime gets the startedDateTime property value. The date time that the run execution started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startedDateTime +} +// GetSuccessfulUsersCount gets the successfulUsersCount property value. The number of successfully completed users in the run. +func (m *Run) GetSuccessfulUsersCount()(*int32) { + return m.successfulUsersCount +} +// GetTaskProcessingResults gets the taskProcessingResults property value. The related taskProcessingResults. +func (m *Run) GetTaskProcessingResults()([]TaskProcessingResultable) { + return m.taskProcessingResults +} +// GetTotalTasksCount gets the totalTasksCount property value. The totalTasksCount property +func (m *Run) GetTotalTasksCount()(*int32) { + return m.totalTasksCount +} +// GetTotalUnprocessedTasksCount gets the totalUnprocessedTasksCount property value. The total number of unprocessed tasks in the run execution. +func (m *Run) GetTotalUnprocessedTasksCount()(*int32) { + return m.totalUnprocessedTasksCount +} +// GetTotalUsersCount gets the totalUsersCount property value. The total number of users in the workflow execution. +func (m *Run) GetTotalUsersCount()(*int32) { + return m.totalUsersCount +} +// GetUserProcessingResults gets the userProcessingResults property value. The associated individual user execution. +func (m *Run) GetUserProcessingResults()([]UserProcessingResultable) { + return m.userProcessingResults +} +// GetWorkflowExecutionType gets the workflowExecutionType property value. The workflowExecutionType property +func (m *Run) GetWorkflowExecutionType()(*WorkflowExecutionType) { + return m.workflowExecutionType +} +// Serialize serializes information the current object +func (m *Run) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedTasksCount", m.GetFailedTasksCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUsersCount", m.GetFailedUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err = writer.WriteStringValue("processingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("scheduledDateTime", m.GetScheduledDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startedDateTime", m.GetStartedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successfulUsersCount", m.GetSuccessfulUsersCount()) + if err != nil { + return err + } + } + if m.GetTaskProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskProcessingResults())) + for i, v := range m.GetTaskProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskProcessingResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalTasksCount", m.GetTotalTasksCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUnprocessedTasksCount", m.GetTotalUnprocessedTasksCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUsersCount", m.GetTotalUsersCount()) + if err != nil { + return err + } + } + if m.GetUserProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserProcessingResults())) + for i, v := range m.GetUserProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userProcessingResults", cast) + if err != nil { + return err + } + } + if m.GetWorkflowExecutionType() != nil { + cast := (*m.GetWorkflowExecutionType()).String() + err = writer.WriteStringValue("workflowExecutionType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. The date time that the run completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetFailedTasksCount sets the failedTasksCount property value. The number of tasks that failed in the run execution. +func (m *Run) SetFailedTasksCount(value *int32)() { + m.failedTasksCount = value +} +// SetFailedUsersCount sets the failedUsersCount property value. The number of users that failed in the run execution. +func (m *Run) SetFailedUsersCount(value *int32)() { + m.failedUsersCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The datetime that the run was last updated.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetProcessingStatus sets the processingStatus property value. The processingStatus property +func (m *Run) SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() { + m.processingStatus = value +} +// SetScheduledDateTime sets the scheduledDateTime property value. The date time that the run is scheduled to be executed for a workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) SetScheduledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.scheduledDateTime = value +} +// SetStartedDateTime sets the startedDateTime property value. The date time that the run execution started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Run) SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startedDateTime = value +} +// SetSuccessfulUsersCount sets the successfulUsersCount property value. The number of successfully completed users in the run. +func (m *Run) SetSuccessfulUsersCount(value *int32)() { + m.successfulUsersCount = value +} +// SetTaskProcessingResults sets the taskProcessingResults property value. The related taskProcessingResults. +func (m *Run) SetTaskProcessingResults(value []TaskProcessingResultable)() { + m.taskProcessingResults = value +} +// SetTotalTasksCount sets the totalTasksCount property value. The totalTasksCount property +func (m *Run) SetTotalTasksCount(value *int32)() { + m.totalTasksCount = value +} +// SetTotalUnprocessedTasksCount sets the totalUnprocessedTasksCount property value. The total number of unprocessed tasks in the run execution. +func (m *Run) SetTotalUnprocessedTasksCount(value *int32)() { + m.totalUnprocessedTasksCount = value +} +// SetTotalUsersCount sets the totalUsersCount property value. The total number of users in the workflow execution. +func (m *Run) SetTotalUsersCount(value *int32)() { + m.totalUsersCount = value +} +// SetUserProcessingResults sets the userProcessingResults property value. The associated individual user execution. +func (m *Run) SetUserProcessingResults(value []UserProcessingResultable)() { + m.userProcessingResults = value +} +// SetWorkflowExecutionType sets the workflowExecutionType property value. The workflowExecutionType property +func (m *Run) SetWorkflowExecutionType(value *WorkflowExecutionType)() { + m.workflowExecutionType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_response.go new file mode 100644 index 000000000..80af52e17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RunCollectionResponse +type RunCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Runable +} +// NewRunCollectionResponse instantiates a new RunCollectionResponse and sets the default values. +func NewRunCollectionResponse()(*RunCollectionResponse) { + m := &RunCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRunCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRunCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRunCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RunCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Runable, len(val)) + for i, v := range val { + res[i] = v.(Runable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RunCollectionResponse) GetValue()([]Runable) { + return m.value +} +// Serialize serializes information the current object +func (m *RunCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RunCollectionResponse) SetValue(value []Runable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_responseable.go new file mode 100644 index 000000000..49e31394e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/run_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RunCollectionResponseable +type RunCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Runable) + SetValue(value []Runable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/runable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/runable.go new file mode 100644 index 000000000..f31ca1982 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/runable.go @@ -0,0 +1,41 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Runable +type Runable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailedTasksCount()(*int32) + GetFailedUsersCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) + GetScheduledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSuccessfulUsersCount()(*int32) + GetTaskProcessingResults()([]TaskProcessingResultable) + GetTotalTasksCount()(*int32) + GetTotalUnprocessedTasksCount()(*int32) + GetTotalUsersCount()(*int32) + GetUserProcessingResults()([]UserProcessingResultable) + GetWorkflowExecutionType()(*WorkflowExecutionType) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailedTasksCount(value *int32)() + SetFailedUsersCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() + SetScheduledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSuccessfulUsersCount(value *int32)() + SetTaskProcessingResults(value []TaskProcessingResultable)() + SetTotalTasksCount(value *int32)() + SetTotalUnprocessedTasksCount(value *int32)() + SetTotalUsersCount(value *int32)() + SetUserProcessingResults(value []UserProcessingResultable)() + SetWorkflowExecutionType(value *WorkflowExecutionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task.go new file mode 100644 index 000000000..842c8ad15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task.go @@ -0,0 +1,286 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Task provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Task struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Arguments included within the task. For guidance to configure this property, see Configure the arguments for built-in Lifecycle Workflow tasks. Required. + arguments []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable + // The category property + category *LifecycleTaskCategory + // A boolean value that specifies whether, if this task fails, the workflow will stop, and subsequent tasks will not run. Optional. + continueOnError *bool + // A string that describes the purpose of the task for administrative use. Optional. + description *string + // A unique string that identifies the task. Required.Supports $filter(eq, ne) and orderBy. + displayName *string + // An integer that states in what order the task will run in a workflow.Supports $orderby. + executionSequence *int32 + // A boolean value that denotes whether the task is set to run or not. Optional.Supports $filter(eq, ne) and orderBy. + isEnabled *bool + // A unique template identifier for the task. For more information about the tasks that Lifecycle Workflows currently supports and their unique identifiers, see supported tasks. Required.Supports $filter(eq, ne). + taskDefinitionId *string + // The result of processing the task. + taskProcessingResults []TaskProcessingResultable +} +// NewTask instantiates a new task and sets the default values. +func NewTask()(*Task) { + m := &Task{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTask(), nil +} +// GetArguments gets the arguments property value. Arguments included within the task. For guidance to configure this property, see Configure the arguments for built-in Lifecycle Workflow tasks. Required. +func (m *Task) GetArguments()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable) { + return m.arguments +} +// GetCategory gets the category property value. The category property +func (m *Task) GetCategory()(*LifecycleTaskCategory) { + return m.category +} +// GetContinueOnError gets the continueOnError property value. A boolean value that specifies whether, if this task fails, the workflow will stop, and subsequent tasks will not run. Optional. +func (m *Task) GetContinueOnError()(*bool) { + return m.continueOnError +} +// GetDescription gets the description property value. A string that describes the purpose of the task for administrative use. Optional. +func (m *Task) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. A unique string that identifies the task. Required.Supports $filter(eq, ne) and orderBy. +func (m *Task) GetDisplayName()(*string) { + return m.displayName +} +// GetExecutionSequence gets the executionSequence property value. An integer that states in what order the task will run in a workflow.Supports $orderby. +func (m *Task) GetExecutionSequence()(*int32) { + return m.executionSequence +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Task) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["arguments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable) + } + m.SetArguments(res) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleTaskCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*LifecycleTaskCategory)) + } + return nil + } + res["continueOnError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContinueOnError(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["executionSequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetExecutionSequence(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["taskDefinitionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaskDefinitionId(val) + } + return nil + } + res["taskProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(TaskProcessingResultable) + } + m.SetTaskProcessingResults(res) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. A boolean value that denotes whether the task is set to run or not. Optional.Supports $filter(eq, ne) and orderBy. +func (m *Task) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetTaskDefinitionId gets the taskDefinitionId property value. A unique template identifier for the task. For more information about the tasks that Lifecycle Workflows currently supports and their unique identifiers, see supported tasks. Required.Supports $filter(eq, ne). +func (m *Task) GetTaskDefinitionId()(*string) { + return m.taskDefinitionId +} +// GetTaskProcessingResults gets the taskProcessingResults property value. The result of processing the task. +func (m *Task) GetTaskProcessingResults()([]TaskProcessingResultable) { + return m.taskProcessingResults +} +// Serialize serializes information the current object +func (m *Task) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetArguments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetArguments())) + for i, v := range m.GetArguments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("arguments", cast) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("continueOnError", m.GetContinueOnError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("executionSequence", m.GetExecutionSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taskDefinitionId", m.GetTaskDefinitionId()) + if err != nil { + return err + } + } + if m.GetTaskProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskProcessingResults())) + for i, v := range m.GetTaskProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskProcessingResults", cast) + if err != nil { + return err + } + } + return nil +} +// SetArguments sets the arguments property value. Arguments included within the task. For guidance to configure this property, see Configure the arguments for built-in Lifecycle Workflow tasks. Required. +func (m *Task) SetArguments(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable)() { + m.arguments = value +} +// SetCategory sets the category property value. The category property +func (m *Task) SetCategory(value *LifecycleTaskCategory)() { + m.category = value +} +// SetContinueOnError sets the continueOnError property value. A boolean value that specifies whether, if this task fails, the workflow will stop, and subsequent tasks will not run. Optional. +func (m *Task) SetContinueOnError(value *bool)() { + m.continueOnError = value +} +// SetDescription sets the description property value. A string that describes the purpose of the task for administrative use. Optional. +func (m *Task) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. A unique string that identifies the task. Required.Supports $filter(eq, ne) and orderBy. +func (m *Task) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExecutionSequence sets the executionSequence property value. An integer that states in what order the task will run in a workflow.Supports $orderby. +func (m *Task) SetExecutionSequence(value *int32)() { + m.executionSequence = value +} +// SetIsEnabled sets the isEnabled property value. A boolean value that denotes whether the task is set to run or not. Optional.Supports $filter(eq, ne) and orderBy. +func (m *Task) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetTaskDefinitionId sets the taskDefinitionId property value. A unique template identifier for the task. For more information about the tasks that Lifecycle Workflows currently supports and their unique identifiers, see supported tasks. Required.Supports $filter(eq, ne). +func (m *Task) SetTaskDefinitionId(value *string)() { + m.taskDefinitionId = value +} +// SetTaskProcessingResults sets the taskProcessingResults property value. The result of processing the task. +func (m *Task) SetTaskProcessingResults(value []TaskProcessingResultable)() { + m.taskProcessingResults = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_response.go new file mode 100644 index 000000000..ec2622da6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskCollectionResponse +type TaskCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Taskable +} +// NewTaskCollectionResponse instantiates a new TaskCollectionResponse and sets the default values. +func NewTaskCollectionResponse()(*TaskCollectionResponse) { + m := &TaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Taskable, len(val)) + for i, v := range val { + res[i] = v.(Taskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TaskCollectionResponse) GetValue()([]Taskable) { + return m.value +} +// Serialize serializes information the current object +func (m *TaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TaskCollectionResponse) SetValue(value []Taskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_responseable.go new file mode 100644 index 000000000..9b2cb42be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskCollectionResponseable +type TaskCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Taskable) + SetValue(value []Taskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition.go new file mode 100644 index 000000000..a0cff2238 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition.go @@ -0,0 +1,200 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TaskDefinition struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The category property + category *LifecycleTaskCategory + // The continueOnError property + continueOnError *bool + // The description of the taskDefinition. + description *string + // The display name of the taskDefinition.Supports $filter(eq, ne) and $orderby. + displayName *string + // The parameters that must be supplied when creating a workflow task object.Supports $filter(any). + parameters []Parameterable + // The version number of the taskDefinition. New records are pushed when we add support for new parameters.Supports $filter(ge, gt, le, lt, eq, ne) and $orderby. + version *int32 +} +// NewTaskDefinition instantiates a new taskDefinition and sets the default values. +func NewTaskDefinition()(*TaskDefinition) { + m := &TaskDefinition{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTaskDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskDefinition(), nil +} +// GetCategory gets the category property value. The category property +func (m *TaskDefinition) GetCategory()(*LifecycleTaskCategory) { + return m.category +} +// GetContinueOnError gets the continueOnError property value. The continueOnError property +func (m *TaskDefinition) GetContinueOnError()(*bool) { + return m.continueOnError +} +// GetDescription gets the description property value. The description of the taskDefinition. +func (m *TaskDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the taskDefinition.Supports $filter(eq, ne) and $orderby. +func (m *TaskDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleTaskCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*LifecycleTaskCategory)) + } + return nil + } + res["continueOnError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContinueOnError(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Parameterable, len(val)) + for i, v := range val { + res[i] = v.(Parameterable) + } + m.SetParameters(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetParameters gets the parameters property value. The parameters that must be supplied when creating a workflow task object.Supports $filter(any). +func (m *TaskDefinition) GetParameters()([]Parameterable) { + return m.parameters +} +// GetVersion gets the version property value. The version number of the taskDefinition. New records are pushed when we add support for new parameters.Supports $filter(ge, gt, le, lt, eq, ne) and $orderby. +func (m *TaskDefinition) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *TaskDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("continueOnError", m.GetContinueOnError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParameters())) + for i, v := range m.GetParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("parameters", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCategory sets the category property value. The category property +func (m *TaskDefinition) SetCategory(value *LifecycleTaskCategory)() { + m.category = value +} +// SetContinueOnError sets the continueOnError property value. The continueOnError property +func (m *TaskDefinition) SetContinueOnError(value *bool)() { + m.continueOnError = value +} +// SetDescription sets the description property value. The description of the taskDefinition. +func (m *TaskDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the taskDefinition.Supports $filter(eq, ne) and $orderby. +func (m *TaskDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetParameters sets the parameters property value. The parameters that must be supplied when creating a workflow task object.Supports $filter(any). +func (m *TaskDefinition) SetParameters(value []Parameterable)() { + m.parameters = value +} +// SetVersion sets the version property value. The version number of the taskDefinition. New records are pushed when we add support for new parameters.Supports $filter(ge, gt, le, lt, eq, ne) and $orderby. +func (m *TaskDefinition) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_response.go new file mode 100644 index 000000000..8ac8d3be1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskDefinitionCollectionResponse +type TaskDefinitionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TaskDefinitionable +} +// NewTaskDefinitionCollectionResponse instantiates a new TaskDefinitionCollectionResponse and sets the default values. +func NewTaskDefinitionCollectionResponse()(*TaskDefinitionCollectionResponse) { + m := &TaskDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTaskDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(TaskDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TaskDefinitionCollectionResponse) GetValue()([]TaskDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *TaskDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TaskDefinitionCollectionResponse) SetValue(value []TaskDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_responseable.go new file mode 100644 index 000000000..41ba39c6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definition_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskDefinitionCollectionResponseable +type TaskDefinitionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TaskDefinitionable) + SetValue(value []TaskDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_definitionable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definitionable.go new file mode 100644 index 000000000..0106e94d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_definitionable.go @@ -0,0 +1,24 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskDefinitionable +type TaskDefinitionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*LifecycleTaskCategory) + GetContinueOnError()(*bool) + GetDescription()(*string) + GetDisplayName()(*string) + GetParameters()([]Parameterable) + GetVersion()(*int32) + SetCategory(value *LifecycleTaskCategory)() + SetContinueOnError(value *bool)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetParameters(value []Parameterable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result.go new file mode 100644 index 000000000..36b7a7af0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result.go @@ -0,0 +1,219 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskProcessingResult provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TaskProcessingResult struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The date time when taskProcessingResult execution ended. Value is null if task execution is still in progress.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date time when the taskProcessingResult was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Describes why the taskProcessingResult has failed. + failureReason *string + // The processingStatus property + processingStatus *LifecycleWorkflowProcessingStatus + // The date time when taskProcessingResult execution started. Value is null if task execution has not yet started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + startedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The subject property + subject ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // The task property + task Taskable +} +// NewTaskProcessingResult instantiates a new taskProcessingResult and sets the default values. +func NewTaskProcessingResult()(*TaskProcessingResult) { + m := &TaskProcessingResult{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTaskProcessingResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskProcessingResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskProcessingResult(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. The date time when taskProcessingResult execution ended. Value is null if task execution is still in progress.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. The date time when the taskProcessingResult was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFailureReason gets the failureReason property value. Describes why the taskProcessingResult has failed. +func (m *TaskProcessingResult) GetFailureReason()(*string) { + return m.failureReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskProcessingResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["failureReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFailureReason(val) + } + return nil + } + res["processingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*LifecycleWorkflowProcessingStatus)) + } + return nil + } + res["startedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedDateTime(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubject(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["task"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTask(val.(Taskable)) + } + return nil + } + return res +} +// GetProcessingStatus gets the processingStatus property value. The processingStatus property +func (m *TaskProcessingResult) GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) { + return m.processingStatus +} +// GetStartedDateTime gets the startedDateTime property value. The date time when taskProcessingResult execution started. Value is null if task execution has not yet started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startedDateTime +} +// GetSubject gets the subject property value. The subject property +func (m *TaskProcessingResult) GetSubject()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.subject +} +// GetTask gets the task property value. The task property +func (m *TaskProcessingResult) GetTask()(Taskable) { + return m.task +} +// Serialize serializes information the current object +func (m *TaskProcessingResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("failureReason", m.GetFailureReason()) + if err != nil { + return err + } + } + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err = writer.WriteStringValue("processingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startedDateTime", m.GetStartedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("task", m.GetTask()) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. The date time when taskProcessingResult execution ended. Value is null if task execution is still in progress.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date time when the taskProcessingResult was created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetFailureReason sets the failureReason property value. Describes why the taskProcessingResult has failed. +func (m *TaskProcessingResult) SetFailureReason(value *string)() { + m.failureReason = value +} +// SetProcessingStatus sets the processingStatus property value. The processingStatus property +func (m *TaskProcessingResult) SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() { + m.processingStatus = value +} +// SetStartedDateTime sets the startedDateTime property value. The date time when taskProcessingResult execution started. Value is null if task execution has not yet started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskProcessingResult) SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startedDateTime = value +} +// SetSubject sets the subject property value. The subject property +func (m *TaskProcessingResult) SetSubject(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.subject = value +} +// SetTask sets the task property value. The task property +func (m *TaskProcessingResult) SetTask(value Taskable)() { + m.task = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_response.go new file mode 100644 index 000000000..4f3f22c83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskProcessingResultCollectionResponse +type TaskProcessingResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TaskProcessingResultable +} +// NewTaskProcessingResultCollectionResponse instantiates a new TaskProcessingResultCollectionResponse and sets the default values. +func NewTaskProcessingResultCollectionResponse()(*TaskProcessingResultCollectionResponse) { + m := &TaskProcessingResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTaskProcessingResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskProcessingResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskProcessingResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskProcessingResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(TaskProcessingResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TaskProcessingResultCollectionResponse) GetValue()([]TaskProcessingResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *TaskProcessingResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TaskProcessingResultCollectionResponse) SetValue(value []TaskProcessingResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_responseable.go new file mode 100644 index 000000000..59a40dc20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_result_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskProcessingResultCollectionResponseable +type TaskProcessingResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TaskProcessingResultable) + SetValue(value []TaskProcessingResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_resultable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_resultable.go new file mode 100644 index 000000000..42ca02ee3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_processing_resultable.go @@ -0,0 +1,27 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskProcessingResultable +type TaskProcessingResultable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailureReason()(*string) + GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) + GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubject()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetTask()(Taskable) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailureReason(value *string)() + SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() + SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubject(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetTask(value Taskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_report.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report.go new file mode 100644 index 000000000..162ce84fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report.go @@ -0,0 +1,357 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskReport provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TaskReport struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The date time that the associated run completed. Value is null if the run has not completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of users in the run execution for which the associated task failed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + failedUsersCount *int32 + // The date and time that the task report was last updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The processingStatus property + processingStatus *LifecycleWorkflowProcessingStatus + // The unique identifier of the associated run. + runId *string + // The date time that the associated run started. Value is null if the run has not started. + startedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of users in the run execution for which the associated task succeeded.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + successfulUsersCount *int32 + // The task property + task Taskable + // The taskDefinition property + taskDefinition TaskDefinitionable + // The related lifecycle workflow taskProcessingResults. + taskProcessingResults []TaskProcessingResultable + // The total number of users in the run execution for which the associated task was scheduled to execute.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + totalUsersCount *int32 + // The number of users in the run execution for which the associated task is queued, in progress, or canceled.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + unprocessedUsersCount *int32 +} +// NewTaskReport instantiates a new taskReport and sets the default values. +func NewTaskReport()(*TaskReport) { + m := &TaskReport{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTaskReportFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskReportFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskReport(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. The date time that the associated run completed. Value is null if the run has not completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetFailedUsersCount gets the failedUsersCount property value. The number of users in the run execution for which the associated task failed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) GetFailedUsersCount()(*int32) { + return m.failedUsersCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskReport) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["failedUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUsersCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["processingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*LifecycleWorkflowProcessingStatus)) + } + return nil + } + res["runId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRunId(val) + } + return nil + } + res["startedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedDateTime(val) + } + return nil + } + res["successfulUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulUsersCount(val) + } + return nil + } + res["task"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTask(val.(Taskable)) + } + return nil + } + res["taskDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTaskDefinition(val.(TaskDefinitionable)) + } + return nil + } + res["taskProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(TaskProcessingResultable) + } + m.SetTaskProcessingResults(res) + } + return nil + } + res["totalUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUsersCount(val) + } + return nil + } + res["unprocessedUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnprocessedUsersCount(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The date and time that the task report was last updated. +func (m *TaskReport) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetProcessingStatus gets the processingStatus property value. The processingStatus property +func (m *TaskReport) GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) { + return m.processingStatus +} +// GetRunId gets the runId property value. The unique identifier of the associated run. +func (m *TaskReport) GetRunId()(*string) { + return m.runId +} +// GetStartedDateTime gets the startedDateTime property value. The date time that the associated run started. Value is null if the run has not started. +func (m *TaskReport) GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startedDateTime +} +// GetSuccessfulUsersCount gets the successfulUsersCount property value. The number of users in the run execution for which the associated task succeeded.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) GetSuccessfulUsersCount()(*int32) { + return m.successfulUsersCount +} +// GetTask gets the task property value. The task property +func (m *TaskReport) GetTask()(Taskable) { + return m.task +} +// GetTaskDefinition gets the taskDefinition property value. The taskDefinition property +func (m *TaskReport) GetTaskDefinition()(TaskDefinitionable) { + return m.taskDefinition +} +// GetTaskProcessingResults gets the taskProcessingResults property value. The related lifecycle workflow taskProcessingResults. +func (m *TaskReport) GetTaskProcessingResults()([]TaskProcessingResultable) { + return m.taskProcessingResults +} +// GetTotalUsersCount gets the totalUsersCount property value. The total number of users in the run execution for which the associated task was scheduled to execute.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) GetTotalUsersCount()(*int32) { + return m.totalUsersCount +} +// GetUnprocessedUsersCount gets the unprocessedUsersCount property value. The number of users in the run execution for which the associated task is queued, in progress, or canceled.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) GetUnprocessedUsersCount()(*int32) { + return m.unprocessedUsersCount +} +// Serialize serializes information the current object +func (m *TaskReport) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUsersCount", m.GetFailedUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err = writer.WriteStringValue("processingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("runId", m.GetRunId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startedDateTime", m.GetStartedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successfulUsersCount", m.GetSuccessfulUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("task", m.GetTask()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("taskDefinition", m.GetTaskDefinition()) + if err != nil { + return err + } + } + if m.GetTaskProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskProcessingResults())) + for i, v := range m.GetTaskProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskProcessingResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUsersCount", m.GetTotalUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unprocessedUsersCount", m.GetUnprocessedUsersCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. The date time that the associated run completed. Value is null if the run has not completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetFailedUsersCount sets the failedUsersCount property value. The number of users in the run execution for which the associated task failed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) SetFailedUsersCount(value *int32)() { + m.failedUsersCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The date and time that the task report was last updated. +func (m *TaskReport) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetProcessingStatus sets the processingStatus property value. The processingStatus property +func (m *TaskReport) SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() { + m.processingStatus = value +} +// SetRunId sets the runId property value. The unique identifier of the associated run. +func (m *TaskReport) SetRunId(value *string)() { + m.runId = value +} +// SetStartedDateTime sets the startedDateTime property value. The date time that the associated run started. Value is null if the run has not started. +func (m *TaskReport) SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startedDateTime = value +} +// SetSuccessfulUsersCount sets the successfulUsersCount property value. The number of users in the run execution for which the associated task succeeded.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) SetSuccessfulUsersCount(value *int32)() { + m.successfulUsersCount = value +} +// SetTask sets the task property value. The task property +func (m *TaskReport) SetTask(value Taskable)() { + m.task = value +} +// SetTaskDefinition sets the taskDefinition property value. The taskDefinition property +func (m *TaskReport) SetTaskDefinition(value TaskDefinitionable)() { + m.taskDefinition = value +} +// SetTaskProcessingResults sets the taskProcessingResults property value. The related lifecycle workflow taskProcessingResults. +func (m *TaskReport) SetTaskProcessingResults(value []TaskProcessingResultable)() { + m.taskProcessingResults = value +} +// SetTotalUsersCount sets the totalUsersCount property value. The total number of users in the run execution for which the associated task was scheduled to execute.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) SetTotalUsersCount(value *int32)() { + m.totalUsersCount = value +} +// SetUnprocessedUsersCount sets the unprocessedUsersCount property value. The number of users in the run execution for which the associated task is queued, in progress, or canceled.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *TaskReport) SetUnprocessedUsersCount(value *int32)() { + m.unprocessedUsersCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_response.go new file mode 100644 index 000000000..f7525da35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskReportCollectionResponse +type TaskReportCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TaskReportable +} +// NewTaskReportCollectionResponse instantiates a new TaskReportCollectionResponse and sets the default values. +func NewTaskReportCollectionResponse()(*TaskReportCollectionResponse) { + m := &TaskReportCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTaskReportCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTaskReportCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTaskReportCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TaskReportCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskReportable, len(val)) + for i, v := range val { + res[i] = v.(TaskReportable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TaskReportCollectionResponse) GetValue()([]TaskReportable) { + return m.value +} +// Serialize serializes information the current object +func (m *TaskReportCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TaskReportCollectionResponse) SetValue(value []TaskReportable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_responseable.go new file mode 100644 index 000000000..f3ca7e5e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_report_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskReportCollectionResponseable +type TaskReportCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TaskReportable) + SetValue(value []TaskReportable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/task_reportable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/task_reportable.go new file mode 100644 index 000000000..4a7bb088e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/task_reportable.go @@ -0,0 +1,37 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TaskReportable +type TaskReportable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailedUsersCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) + GetRunId()(*string) + GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSuccessfulUsersCount()(*int32) + GetTask()(Taskable) + GetTaskDefinition()(TaskDefinitionable) + GetTaskProcessingResults()([]TaskProcessingResultable) + GetTotalUsersCount()(*int32) + GetUnprocessedUsersCount()(*int32) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailedUsersCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() + SetRunId(value *string)() + SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSuccessfulUsersCount(value *int32)() + SetTask(value Taskable)() + SetTaskDefinition(value TaskDefinitionable)() + SetTaskProcessingResults(value []TaskProcessingResultable)() + SetTotalUsersCount(value *int32)() + SetUnprocessedUsersCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/taskable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/taskable.go new file mode 100644 index 000000000..cc486f64e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/taskable.go @@ -0,0 +1,30 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Taskable +type Taskable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArguments()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable) + GetCategory()(*LifecycleTaskCategory) + GetContinueOnError()(*bool) + GetDescription()(*string) + GetDisplayName()(*string) + GetExecutionSequence()(*int32) + GetIsEnabled()(*bool) + GetTaskDefinitionId()(*string) + GetTaskProcessingResults()([]TaskProcessingResultable) + SetArguments(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.KeyValuePairable)() + SetCategory(value *LifecycleTaskCategory)() + SetContinueOnError(value *bool)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExecutionSequence(value *int32)() + SetIsEnabled(value *bool)() + SetTaskDefinitionId(value *string)() + SetTaskProcessingResults(value []TaskProcessingResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_trigger.go b/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_trigger.go new file mode 100644 index 000000000..8d7b22d4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_trigger.go @@ -0,0 +1,89 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimeBasedAttributeTrigger +type TimeBasedAttributeTrigger struct { + WorkflowExecutionTrigger + // How many days before or after the time-based attribute specified the workflow should trigger. For example, if the attribute is employeeHireDate and offsetInDays is -1, then the workflow should trigger one day before the employee hire date. The value can range between -60 and 60 days. + offsetInDays *int32 + // The timeBasedAttribute property + timeBasedAttribute *WorkflowTriggerTimeBasedAttribute +} +// NewTimeBasedAttributeTrigger instantiates a new TimeBasedAttributeTrigger and sets the default values. +func NewTimeBasedAttributeTrigger()(*TimeBasedAttributeTrigger) { + m := &TimeBasedAttributeTrigger{ + WorkflowExecutionTrigger: *NewWorkflowExecutionTrigger(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateTimeBasedAttributeTriggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTimeBasedAttributeTriggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTimeBasedAttributeTrigger(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TimeBasedAttributeTrigger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowExecutionTrigger.GetFieldDeserializers() + res["offsetInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffsetInDays(val) + } + return nil + } + res["timeBasedAttribute"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkflowTriggerTimeBasedAttribute) + if err != nil { + return err + } + if val != nil { + m.SetTimeBasedAttribute(val.(*WorkflowTriggerTimeBasedAttribute)) + } + return nil + } + return res +} +// GetOffsetInDays gets the offsetInDays property value. How many days before or after the time-based attribute specified the workflow should trigger. For example, if the attribute is employeeHireDate and offsetInDays is -1, then the workflow should trigger one day before the employee hire date. The value can range between -60 and 60 days. +func (m *TimeBasedAttributeTrigger) GetOffsetInDays()(*int32) { + return m.offsetInDays +} +// GetTimeBasedAttribute gets the timeBasedAttribute property value. The timeBasedAttribute property +func (m *TimeBasedAttributeTrigger) GetTimeBasedAttribute()(*WorkflowTriggerTimeBasedAttribute) { + return m.timeBasedAttribute +} +// Serialize serializes information the current object +func (m *TimeBasedAttributeTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowExecutionTrigger.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("offsetInDays", m.GetOffsetInDays()) + if err != nil { + return err + } + } + if m.GetTimeBasedAttribute() != nil { + cast := (*m.GetTimeBasedAttribute()).String() + err = writer.WriteStringValue("timeBasedAttribute", &cast) + if err != nil { + return err + } + } + return nil +} +// SetOffsetInDays sets the offsetInDays property value. How many days before or after the time-based attribute specified the workflow should trigger. For example, if the attribute is employeeHireDate and offsetInDays is -1, then the workflow should trigger one day before the employee hire date. The value can range between -60 and 60 days. +func (m *TimeBasedAttributeTrigger) SetOffsetInDays(value *int32)() { + m.offsetInDays = value +} +// SetTimeBasedAttribute sets the timeBasedAttribute property value. The timeBasedAttribute property +func (m *TimeBasedAttributeTrigger) SetTimeBasedAttribute(value *WorkflowTriggerTimeBasedAttribute)() { + m.timeBasedAttribute = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_triggerable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_triggerable.go new file mode 100644 index 000000000..a123d4023 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/time_based_attribute_triggerable.go @@ -0,0 +1,15 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TimeBasedAttributeTriggerable +type TimeBasedAttributeTriggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowExecutionTriggerable + GetOffsetInDays()(*int32) + GetTimeBasedAttribute()(*WorkflowTriggerTimeBasedAttribute) + SetOffsetInDays(value *int32)() + SetTimeBasedAttribute(value *WorkflowTriggerTimeBasedAttribute)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditions.go b/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditions.go new file mode 100644 index 000000000..23a3b2c65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditions.go @@ -0,0 +1,89 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggerAndScopeBasedConditions +type TriggerAndScopeBasedConditions struct { + WorkflowExecutionConditions + // Defines who the workflow runs for. + scope ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable + // What triggers a workflow to run. + trigger WorkflowExecutionTriggerable +} +// NewTriggerAndScopeBasedConditions instantiates a new TriggerAndScopeBasedConditions and sets the default values. +func NewTriggerAndScopeBasedConditions()(*TriggerAndScopeBasedConditions) { + m := &TriggerAndScopeBasedConditions{ + WorkflowExecutionConditions: *NewWorkflowExecutionConditions(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateTriggerAndScopeBasedConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTriggerAndScopeBasedConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTriggerAndScopeBasedConditions(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TriggerAndScopeBasedConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowExecutionConditions.GetFieldDeserializers() + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSubjectSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable)) + } + return nil + } + res["trigger"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowExecutionTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTrigger(val.(WorkflowExecutionTriggerable)) + } + return nil + } + return res +} +// GetScope gets the scope property value. Defines who the workflow runs for. +func (m *TriggerAndScopeBasedConditions) GetScope()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable) { + return m.scope +} +// GetTrigger gets the trigger property value. What triggers a workflow to run. +func (m *TriggerAndScopeBasedConditions) GetTrigger()(WorkflowExecutionTriggerable) { + return m.trigger +} +// Serialize serializes information the current object +func (m *TriggerAndScopeBasedConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowExecutionConditions.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("trigger", m.GetTrigger()) + if err != nil { + return err + } + } + return nil +} +// SetScope sets the scope property value. Defines who the workflow runs for. +func (m *TriggerAndScopeBasedConditions) SetScope(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable)() { + m.scope = value +} +// SetTrigger sets the trigger property value. What triggers a workflow to run. +func (m *TriggerAndScopeBasedConditions) SetTrigger(value WorkflowExecutionTriggerable)() { + m.trigger = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditionsable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditionsable.go new file mode 100644 index 000000000..5c10b0bf2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/trigger_and_scope_based_conditionsable.go @@ -0,0 +1,16 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggerAndScopeBasedConditionsable +type TriggerAndScopeBasedConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowExecutionConditionsable + GetScope()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable) + GetTrigger()(WorkflowExecutionTriggerable) + SetScope(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SubjectSetable)() + SetTrigger(value WorkflowExecutionTriggerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result.go b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result.go new file mode 100644 index 000000000..93d9ad45c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result.go @@ -0,0 +1,332 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserProcessingResult provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type UserProcessingResult struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The date time that the workflow execution for a user completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of tasks that failed in the workflow execution. + failedTasksCount *int32 + // The processingStatus property + processingStatus *LifecycleWorkflowProcessingStatus + // The date time that the workflow is scheduled to be executed for a user.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + scheduledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date time that the workflow execution started. Value is null if the workflow execution has not started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + startedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The subject property + subject ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // The associated individual task execution. + taskProcessingResults []TaskProcessingResultable + // The total number of tasks that in the workflow execution. + totalTasksCount *int32 + // The total number of unprocessed tasks for the workflow. + totalUnprocessedTasksCount *int32 + // The workflowExecutionType property + workflowExecutionType *WorkflowExecutionType + // The version of the workflow that was executed. + workflowVersion *int32 +} +// NewUserProcessingResult instantiates a new userProcessingResult and sets the default values. +func NewUserProcessingResult()(*UserProcessingResult) { + m := &UserProcessingResult{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateUserProcessingResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserProcessingResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserProcessingResult(), nil +} +// GetCompletedDateTime gets the completedDateTime property value. The date time that the workflow execution for a user completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetFailedTasksCount gets the failedTasksCount property value. The number of tasks that failed in the workflow execution. +func (m *UserProcessingResult) GetFailedTasksCount()(*int32) { + return m.failedTasksCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserProcessingResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["failedTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedTasksCount(val) + } + return nil + } + res["processingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*LifecycleWorkflowProcessingStatus)) + } + return nil + } + res["scheduledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetScheduledDateTime(val) + } + return nil + } + res["startedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartedDateTime(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSubject(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["taskProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(TaskProcessingResultable) + } + m.SetTaskProcessingResults(res) + } + return nil + } + res["totalTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTasksCount(val) + } + return nil + } + res["totalUnprocessedTasksCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUnprocessedTasksCount(val) + } + return nil + } + res["workflowExecutionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkflowExecutionType) + if err != nil { + return err + } + if val != nil { + m.SetWorkflowExecutionType(val.(*WorkflowExecutionType)) + } + return nil + } + res["workflowVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWorkflowVersion(val) + } + return nil + } + return res +} +// GetProcessingStatus gets the processingStatus property value. The processingStatus property +func (m *UserProcessingResult) GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) { + return m.processingStatus +} +// GetScheduledDateTime gets the scheduledDateTime property value. The date time that the workflow is scheduled to be executed for a user.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) GetScheduledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.scheduledDateTime +} +// GetStartedDateTime gets the startedDateTime property value. The date time that the workflow execution started. Value is null if the workflow execution has not started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startedDateTime +} +// GetSubject gets the subject property value. The subject property +func (m *UserProcessingResult) GetSubject()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.subject +} +// GetTaskProcessingResults gets the taskProcessingResults property value. The associated individual task execution. +func (m *UserProcessingResult) GetTaskProcessingResults()([]TaskProcessingResultable) { + return m.taskProcessingResults +} +// GetTotalTasksCount gets the totalTasksCount property value. The total number of tasks that in the workflow execution. +func (m *UserProcessingResult) GetTotalTasksCount()(*int32) { + return m.totalTasksCount +} +// GetTotalUnprocessedTasksCount gets the totalUnprocessedTasksCount property value. The total number of unprocessed tasks for the workflow. +func (m *UserProcessingResult) GetTotalUnprocessedTasksCount()(*int32) { + return m.totalUnprocessedTasksCount +} +// GetWorkflowExecutionType gets the workflowExecutionType property value. The workflowExecutionType property +func (m *UserProcessingResult) GetWorkflowExecutionType()(*WorkflowExecutionType) { + return m.workflowExecutionType +} +// GetWorkflowVersion gets the workflowVersion property value. The version of the workflow that was executed. +func (m *UserProcessingResult) GetWorkflowVersion()(*int32) { + return m.workflowVersion +} +// Serialize serializes information the current object +func (m *UserProcessingResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedTasksCount", m.GetFailedTasksCount()) + if err != nil { + return err + } + } + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err = writer.WriteStringValue("processingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("scheduledDateTime", m.GetScheduledDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startedDateTime", m.GetStartedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + if m.GetTaskProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskProcessingResults())) + for i, v := range m.GetTaskProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskProcessingResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalTasksCount", m.GetTotalTasksCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUnprocessedTasksCount", m.GetTotalUnprocessedTasksCount()) + if err != nil { + return err + } + } + if m.GetWorkflowExecutionType() != nil { + cast := (*m.GetWorkflowExecutionType()).String() + err = writer.WriteStringValue("workflowExecutionType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("workflowVersion", m.GetWorkflowVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCompletedDateTime sets the completedDateTime property value. The date time that the workflow execution for a user completed. Value is null if the workflow hasn't completed.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetFailedTasksCount sets the failedTasksCount property value. The number of tasks that failed in the workflow execution. +func (m *UserProcessingResult) SetFailedTasksCount(value *int32)() { + m.failedTasksCount = value +} +// SetProcessingStatus sets the processingStatus property value. The processingStatus property +func (m *UserProcessingResult) SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() { + m.processingStatus = value +} +// SetScheduledDateTime sets the scheduledDateTime property value. The date time that the workflow is scheduled to be executed for a user.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) SetScheduledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.scheduledDateTime = value +} +// SetStartedDateTime sets the startedDateTime property value. The date time that the workflow execution started. Value is null if the workflow execution has not started.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *UserProcessingResult) SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startedDateTime = value +} +// SetSubject sets the subject property value. The subject property +func (m *UserProcessingResult) SetSubject(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.subject = value +} +// SetTaskProcessingResults sets the taskProcessingResults property value. The associated individual task execution. +func (m *UserProcessingResult) SetTaskProcessingResults(value []TaskProcessingResultable)() { + m.taskProcessingResults = value +} +// SetTotalTasksCount sets the totalTasksCount property value. The total number of tasks that in the workflow execution. +func (m *UserProcessingResult) SetTotalTasksCount(value *int32)() { + m.totalTasksCount = value +} +// SetTotalUnprocessedTasksCount sets the totalUnprocessedTasksCount property value. The total number of unprocessed tasks for the workflow. +func (m *UserProcessingResult) SetTotalUnprocessedTasksCount(value *int32)() { + m.totalUnprocessedTasksCount = value +} +// SetWorkflowExecutionType sets the workflowExecutionType property value. The workflowExecutionType property +func (m *UserProcessingResult) SetWorkflowExecutionType(value *WorkflowExecutionType)() { + m.workflowExecutionType = value +} +// SetWorkflowVersion sets the workflowVersion property value. The version of the workflow that was executed. +func (m *UserProcessingResult) SetWorkflowVersion(value *int32)() { + m.workflowVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_response.go new file mode 100644 index 000000000..f1c6c9e46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserProcessingResultCollectionResponse +type UserProcessingResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UserProcessingResultable +} +// NewUserProcessingResultCollectionResponse instantiates a new UserProcessingResultCollectionResponse and sets the default values. +func NewUserProcessingResultCollectionResponse()(*UserProcessingResultCollectionResponse) { + m := &UserProcessingResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUserProcessingResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserProcessingResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserProcessingResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserProcessingResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(UserProcessingResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UserProcessingResultCollectionResponse) GetValue()([]UserProcessingResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *UserProcessingResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UserProcessingResultCollectionResponse) SetValue(value []UserProcessingResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_responseable.go new file mode 100644 index 000000000..7f6904e0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_result_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserProcessingResultCollectionResponseable +type UserProcessingResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UserProcessingResultable) + SetValue(value []UserProcessingResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_resultable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_resultable.go new file mode 100644 index 000000000..f42b3aa31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/user_processing_resultable.go @@ -0,0 +1,35 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserProcessingResultable +type UserProcessingResultable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFailedTasksCount()(*int32) + GetProcessingStatus()(*LifecycleWorkflowProcessingStatus) + GetScheduledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubject()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetTaskProcessingResults()([]TaskProcessingResultable) + GetTotalTasksCount()(*int32) + GetTotalUnprocessedTasksCount()(*int32) + GetWorkflowExecutionType()(*WorkflowExecutionType) + GetWorkflowVersion()(*int32) + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFailedTasksCount(value *int32)() + SetProcessingStatus(value *LifecycleWorkflowProcessingStatus)() + SetScheduledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubject(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetTaskProcessingResults(value []TaskProcessingResultable)() + SetTotalTasksCount(value *int32)() + SetTotalUnprocessedTasksCount(value *int32)() + SetWorkflowExecutionType(value *WorkflowExecutionType)() + SetWorkflowVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/value_type.go b/src/internal/connector/graph/betasdk/models/identitygovernance/value_type.go new file mode 100644 index 000000000..6c6da7499 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/value_type.go @@ -0,0 +1,43 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ValueType int + +const ( + ENUM_VALUETYPE ValueType = iota + STRING_VALUETYPE + INT_VALUETYPE + BOOL_VALUETYPE + UNKNOWNFUTUREVALUE_VALUETYPE +) + +func (i ValueType) String() string { + return []string{"enum", "string", "int", "bool", "unknownFutureValue"}[i] +} +func ParseValueType(v string) (interface{}, error) { + result := ENUM_VALUETYPE + switch v { + case "enum": + result = ENUM_VALUETYPE + case "string": + result = STRING_VALUETYPE + case "int": + result = INT_VALUETYPE + case "bool": + result = BOOL_VALUETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_VALUETYPE + default: + return 0, errors.New("Unknown ValueType value: " + v) + } + return &result, nil +} +func SerializeValueType(values []ValueType) []string { + 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/identitygovernance/workflow.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow.go new file mode 100644 index 000000000..5ed909d9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow.go @@ -0,0 +1,312 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Workflow +type Workflow struct { + WorkflowBase + // When the workflow was deleted.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The unique identifier of the Azure AD identity that last modified the workflow object. + executionScope []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // Identifier used for individually addressing a specific workflow.Supports $filter(eq, ne) and $orderby. + id *string + // The date time when the workflow is expected to run next based on the schedule interval, if there are any users matching the execution conditions. Supports $filter(lt,gt) and $orderBy. + nextScheduleRunDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The runs property + runs []Runable + // Represents the aggregation of task execution data for tasks within a workflow object. + taskReports []TaskReportable + // The userProcessingResults property + userProcessingResults []UserProcessingResultable + // The current version number of the workflow. Value is 1 when the workflow is first created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + version *int32 + // The workflow versions that are available. + versions []WorkflowVersionable +} +// NewWorkflow instantiates a new Workflow and sets the default values. +func NewWorkflow()(*Workflow) { + m := &Workflow{ + WorkflowBase: *NewWorkflowBase(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.workflow"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateWorkflowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflow(), nil +} +// GetDeletedDateTime gets the deletedDateTime property value. When the workflow was deleted.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Workflow) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetExecutionScope gets the executionScope property value. The unique identifier of the Azure AD identity that last modified the workflow object. +func (m *Workflow) GetExecutionScope()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.executionScope +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Workflow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowBase.GetFieldDeserializers() + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + res["executionScope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + } + m.SetExecutionScope(res) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["nextScheduleRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetNextScheduleRunDateTime(val) + } + return nil + } + res["runs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRunFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Runable, len(val)) + for i, v := range val { + res[i] = v.(Runable) + } + m.SetRuns(res) + } + return nil + } + res["taskReports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TaskReportable, len(val)) + for i, v := range val { + res[i] = v.(TaskReportable) + } + m.SetTaskReports(res) + } + return nil + } + res["userProcessingResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserProcessingResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserProcessingResultable, len(val)) + for i, v := range val { + res[i] = v.(UserProcessingResultable) + } + m.SetUserProcessingResults(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowVersionable, len(val)) + for i, v := range val { + res[i] = v.(WorkflowVersionable) + } + m.SetVersions(res) + } + return nil + } + return res +} +// GetId gets the id property value. Identifier used for individually addressing a specific workflow.Supports $filter(eq, ne) and $orderby. +func (m *Workflow) GetId()(*string) { + return m.id +} +// GetNextScheduleRunDateTime gets the nextScheduleRunDateTime property value. The date time when the workflow is expected to run next based on the schedule interval, if there are any users matching the execution conditions. Supports $filter(lt,gt) and $orderBy. +func (m *Workflow) GetNextScheduleRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.nextScheduleRunDateTime +} +// GetRuns gets the runs property value. The runs property +func (m *Workflow) GetRuns()([]Runable) { + return m.runs +} +// GetTaskReports gets the taskReports property value. Represents the aggregation of task execution data for tasks within a workflow object. +func (m *Workflow) GetTaskReports()([]TaskReportable) { + return m.taskReports +} +// GetUserProcessingResults gets the userProcessingResults property value. The userProcessingResults property +func (m *Workflow) GetUserProcessingResults()([]UserProcessingResultable) { + return m.userProcessingResults +} +// GetVersion gets the version property value. The current version number of the workflow. Value is 1 when the workflow is first created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Workflow) GetVersion()(*int32) { + return m.version +} +// GetVersions gets the versions property value. The workflow versions that are available. +func (m *Workflow) GetVersions()([]WorkflowVersionable) { + return m.versions +} +// Serialize serializes information the current object +func (m *Workflow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + if m.GetExecutionScope() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExecutionScope())) + for i, v := range m.GetExecutionScope() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("executionScope", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("nextScheduleRunDateTime", m.GetNextScheduleRunDateTime()) + if err != nil { + return err + } + } + if m.GetRuns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRuns())) + for i, v := range m.GetRuns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("runs", cast) + if err != nil { + return err + } + } + if m.GetTaskReports() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskReports())) + for i, v := range m.GetTaskReports() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskReports", cast) + if err != nil { + return err + } + } + if m.GetUserProcessingResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserProcessingResults())) + for i, v := range m.GetUserProcessingResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userProcessingResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + if m.GetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVersions())) + for i, v := range m.GetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("versions", cast) + if err != nil { + return err + } + } + return nil +} +// SetDeletedDateTime sets the deletedDateTime property value. When the workflow was deleted.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Workflow) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} +// SetExecutionScope sets the executionScope property value. The unique identifier of the Azure AD identity that last modified the workflow object. +func (m *Workflow) SetExecutionScope(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.executionScope = value +} +// SetId sets the id property value. Identifier used for individually addressing a specific workflow.Supports $filter(eq, ne) and $orderby. +func (m *Workflow) SetId(value *string)() { + m.id = value +} +// SetNextScheduleRunDateTime sets the nextScheduleRunDateTime property value. The date time when the workflow is expected to run next based on the schedule interval, if there are any users matching the execution conditions. Supports $filter(lt,gt) and $orderBy. +func (m *Workflow) SetNextScheduleRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.nextScheduleRunDateTime = value +} +// SetRuns sets the runs property value. The runs property +func (m *Workflow) SetRuns(value []Runable)() { + m.runs = value +} +// SetTaskReports sets the taskReports property value. Represents the aggregation of task execution data for tasks within a workflow object. +func (m *Workflow) SetTaskReports(value []TaskReportable)() { + m.taskReports = value +} +// SetUserProcessingResults sets the userProcessingResults property value. The userProcessingResults property +func (m *Workflow) SetUserProcessingResults(value []UserProcessingResultable)() { + m.userProcessingResults = value +} +// SetVersion sets the version property value. The current version number of the workflow. Value is 1 when the workflow is first created.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *Workflow) SetVersion(value *int32)() { + m.version = value +} +// SetVersions sets the versions property value. The workflow versions that are available. +func (m *Workflow) SetVersions(value []WorkflowVersionable)() { + m.versions = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_base.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_base.go new file mode 100644 index 000000000..488b05370 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_base.go @@ -0,0 +1,388 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowBase +type WorkflowBase 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 category property + category *LifecycleWorkflowCategory + // The user who created the workflow. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // When a workflow was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A string that describes the purpose of the workflow. + description *string + // A string to identify the workflow. + displayName *string + // Defines when and for who the workflow will run. + executionConditions WorkflowExecutionConditionsable + // Whether the workflow is enabled or disabled. If this setting is true, the workflow can be run on demand or on schedule when isSchedulingEnabled is true. + isEnabled *bool + // If true, the Lifecycle Workflow engine executes the workflow based on the schedule defined by tenant settings. Cannot be true for a disabled workflow (where isEnabled is false). + isSchedulingEnabled *bool + // The user who last modified the workflow. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable + // When the workflow was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The tasks in the workflow. + tasks []Taskable +} +// NewWorkflowBase instantiates a new workflowBase and sets the default values. +func NewWorkflowBase()(*WorkflowBase) { + m := &WorkflowBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkflowBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.identityGovernance.workflow": + return NewWorkflow(), nil + case "#microsoft.graph.identityGovernance.workflowVersion": + return NewWorkflowVersion(), nil + } + } + } + } + return NewWorkflowBase(), 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 *WorkflowBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. The category property +func (m *WorkflowBase) GetCategory()(*LifecycleWorkflowCategory) { + return m.category +} +// GetCreatedBy gets the createdBy property value. The user who created the workflow. +func (m *WorkflowBase) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. When a workflow was created. +func (m *WorkflowBase) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. A string that describes the purpose of the workflow. +func (m *WorkflowBase) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. A string to identify the workflow. +func (m *WorkflowBase) GetDisplayName()(*string) { + return m.displayName +} +// GetExecutionConditions gets the executionConditions property value. Defines when and for who the workflow will run. +func (m *WorkflowBase) GetExecutionConditions()(WorkflowExecutionConditionsable) { + return m.executionConditions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*LifecycleWorkflowCategory)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["executionConditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowExecutionConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExecutionConditions(val.(WorkflowExecutionConditionsable)) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["isSchedulingEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSchedulingEnabled(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Taskable, len(val)) + for i, v := range val { + res[i] = v.(Taskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Whether the workflow is enabled or disabled. If this setting is true, the workflow can be run on demand or on schedule when isSchedulingEnabled is true. +func (m *WorkflowBase) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetIsSchedulingEnabled gets the isSchedulingEnabled property value. If true, the Lifecycle Workflow engine executes the workflow based on the schedule defined by tenant settings. Cannot be true for a disabled workflow (where isEnabled is false). +func (m *WorkflowBase) GetIsSchedulingEnabled()(*bool) { + return m.isSchedulingEnabled +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the workflow. +func (m *WorkflowBase) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. When the workflow was last modified. +func (m *WorkflowBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkflowBase) GetOdataType()(*string) { + return m.odataType +} +// GetTasks gets the tasks property value. The tasks in the workflow. +func (m *WorkflowBase) GetTasks()([]Taskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *WorkflowBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err := writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("executionConditions", m.GetExecutionConditions()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSchedulingEnabled", m.GetIsSchedulingEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("tasks", 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 *WorkflowBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. The category property +func (m *WorkflowBase) SetCategory(value *LifecycleWorkflowCategory)() { + m.category = value +} +// SetCreatedBy sets the createdBy property value. The user who created the workflow. +func (m *WorkflowBase) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. When a workflow was created. +func (m *WorkflowBase) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. A string that describes the purpose of the workflow. +func (m *WorkflowBase) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. A string to identify the workflow. +func (m *WorkflowBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExecutionConditions sets the executionConditions property value. Defines when and for who the workflow will run. +func (m *WorkflowBase) SetExecutionConditions(value WorkflowExecutionConditionsable)() { + m.executionConditions = value +} +// SetIsEnabled sets the isEnabled property value. Whether the workflow is enabled or disabled. If this setting is true, the workflow can be run on demand or on schedule when isSchedulingEnabled is true. +func (m *WorkflowBase) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetIsSchedulingEnabled sets the isSchedulingEnabled property value. If true, the Lifecycle Workflow engine executes the workflow based on the schedule defined by tenant settings. Cannot be true for a disabled workflow (where isEnabled is false). +func (m *WorkflowBase) SetIsSchedulingEnabled(value *bool)() { + m.isSchedulingEnabled = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the workflow. +func (m *WorkflowBase) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. When the workflow was last modified. +func (m *WorkflowBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkflowBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetTasks sets the tasks property value. The tasks in the workflow. +func (m *WorkflowBase) SetTasks(value []Taskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_baseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_baseable.go new file mode 100644 index 000000000..8363102e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_baseable.go @@ -0,0 +1,37 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowBaseable +type WorkflowBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*LifecycleWorkflowCategory) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetExecutionConditions()(WorkflowExecutionConditionsable) + GetIsEnabled()(*bool) + GetIsSchedulingEnabled()(*bool) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetTasks()([]Taskable) + SetCategory(value *LifecycleWorkflowCategory)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExecutionConditions(value WorkflowExecutionConditionsable)() + SetIsEnabled(value *bool)() + SetIsSchedulingEnabled(value *bool)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetTasks(value []Taskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_response.go new file mode 100644 index 000000000..0cf826317 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowCollectionResponse +type WorkflowCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Workflowable +} +// NewWorkflowCollectionResponse instantiates a new WorkflowCollectionResponse and sets the default values. +func NewWorkflowCollectionResponse()(*WorkflowCollectionResponse) { + m := &WorkflowCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkflowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Workflowable, len(val)) + for i, v := range val { + res[i] = v.(Workflowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkflowCollectionResponse) GetValue()([]Workflowable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkflowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkflowCollectionResponse) SetValue(value []Workflowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_responseable.go new file mode 100644 index 000000000..8b1712230 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowCollectionResponseable +type WorkflowCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Workflowable) + SetValue(value []Workflowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditions.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditions.go new file mode 100644 index 000000000..816f90ecd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditions.go @@ -0,0 +1,91 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowExecutionConditions +type WorkflowExecutionConditions 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 OdataType property + odataType *string +} +// NewWorkflowExecutionConditions instantiates a new workflowExecutionConditions and sets the default values. +func NewWorkflowExecutionConditions()(*WorkflowExecutionConditions) { + m := &WorkflowExecutionConditions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkflowExecutionConditionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowExecutionConditionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.identityGovernance.onDemandExecutionOnly": + return NewOnDemandExecutionOnly(), nil + case "#microsoft.graph.identityGovernance.triggerAndScopeBasedConditions": + return NewTriggerAndScopeBasedConditions(), nil + } + } + } + } + return NewWorkflowExecutionConditions(), 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 *WorkflowExecutionConditions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowExecutionConditions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkflowExecutionConditions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *WorkflowExecutionConditions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *WorkflowExecutionConditions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkflowExecutionConditions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditionsable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditionsable.go new file mode 100644 index 000000000..607be66f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_conditionsable.go @@ -0,0 +1,13 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowExecutionConditionsable +type WorkflowExecutionConditionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_trigger.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_trigger.go new file mode 100644 index 000000000..54dba7068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_trigger.go @@ -0,0 +1,89 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowExecutionTrigger +type WorkflowExecutionTrigger 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 OdataType property + odataType *string +} +// NewWorkflowExecutionTrigger instantiates a new workflowExecutionTrigger and sets the default values. +func NewWorkflowExecutionTrigger()(*WorkflowExecutionTrigger) { + m := &WorkflowExecutionTrigger{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkflowExecutionTriggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowExecutionTriggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.identityGovernance.timeBasedAttributeTrigger": + return NewTimeBasedAttributeTrigger(), nil + } + } + } + } + return NewWorkflowExecutionTrigger(), 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 *WorkflowExecutionTrigger) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowExecutionTrigger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkflowExecutionTrigger) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *WorkflowExecutionTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *WorkflowExecutionTrigger) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkflowExecutionTrigger) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_triggerable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_triggerable.go new file mode 100644 index 000000000..1a4721432 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_triggerable.go @@ -0,0 +1,13 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowExecutionTriggerable +type WorkflowExecutionTriggerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_type.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_type.go new file mode 100644 index 000000000..49fedbcf2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_execution_type.go @@ -0,0 +1,37 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkflowExecutionType int + +const ( + SCHEDULED_WORKFLOWEXECUTIONTYPE WorkflowExecutionType = iota + ONDEMAND_WORKFLOWEXECUTIONTYPE + UNKNOWNFUTUREVALUE_WORKFLOWEXECUTIONTYPE +) + +func (i WorkflowExecutionType) String() string { + return []string{"scheduled", "onDemand", "unknownFutureValue"}[i] +} +func ParseWorkflowExecutionType(v string) (interface{}, error) { + result := SCHEDULED_WORKFLOWEXECUTIONTYPE + switch v { + case "scheduled": + result = SCHEDULED_WORKFLOWEXECUTIONTYPE + case "onDemand": + result = ONDEMAND_WORKFLOWEXECUTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WORKFLOWEXECUTIONTYPE + default: + return 0, errors.New("Unknown WorkflowExecutionType value: " + v) + } + return &result, nil +} +func SerializeWorkflowExecutionType(values []WorkflowExecutionType) []string { + 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/identitygovernance/workflow_template.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template.go new file mode 100644 index 000000000..06b6e61cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template.go @@ -0,0 +1,174 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowTemplate provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkflowTemplate struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The category property + category *LifecycleWorkflowCategory + // The description of the workflowTemplate. + description *string + // The display name of the workflowTemplate.Supports $filter(eq, ne) and $orderby. + displayName *string + // Conditions describing when to execute the workflow and the criteria to identify in-scope subject set. + executionConditions WorkflowExecutionConditionsable + // Represents the configured tasks to execute and their execution sequence within a workflow. This relationship is expanded by default. + tasks []Taskable +} +// NewWorkflowTemplate instantiates a new workflowTemplate and sets the default values. +func NewWorkflowTemplate()(*WorkflowTemplate) { + m := &WorkflowTemplate{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateWorkflowTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowTemplate(), nil +} +// GetCategory gets the category property value. The category property +func (m *WorkflowTemplate) GetCategory()(*LifecycleWorkflowCategory) { + return m.category +} +// GetDescription gets the description property value. The description of the workflowTemplate. +func (m *WorkflowTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name of the workflowTemplate.Supports $filter(eq, ne) and $orderby. +func (m *WorkflowTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetExecutionConditions gets the executionConditions property value. Conditions describing when to execute the workflow and the criteria to identify in-scope subject set. +func (m *WorkflowTemplate) GetExecutionConditions()(WorkflowExecutionConditionsable) { + return m.executionConditions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLifecycleWorkflowCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*LifecycleWorkflowCategory)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["executionConditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkflowExecutionConditionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExecutionConditions(val.(WorkflowExecutionConditionsable)) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Taskable, len(val)) + for i, v := range val { + res[i] = v.(Taskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetTasks gets the tasks property value. Represents the configured tasks to execute and their execution sequence within a workflow. This relationship is expanded by default. +func (m *WorkflowTemplate) GetTasks()([]Taskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *WorkflowTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("executionConditions", m.GetExecutionConditions()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetCategory sets the category property value. The category property +func (m *WorkflowTemplate) SetCategory(value *LifecycleWorkflowCategory)() { + m.category = value +} +// SetDescription sets the description property value. The description of the workflowTemplate. +func (m *WorkflowTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name of the workflowTemplate.Supports $filter(eq, ne) and $orderby. +func (m *WorkflowTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExecutionConditions sets the executionConditions property value. Conditions describing when to execute the workflow and the criteria to identify in-scope subject set. +func (m *WorkflowTemplate) SetExecutionConditions(value WorkflowExecutionConditionsable)() { + m.executionConditions = value +} +// SetTasks sets the tasks property value. Represents the configured tasks to execute and their execution sequence within a workflow. This relationship is expanded by default. +func (m *WorkflowTemplate) SetTasks(value []Taskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_response.go new file mode 100644 index 000000000..236fb10dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowTemplateCollectionResponse +type WorkflowTemplateCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WorkflowTemplateable +} +// NewWorkflowTemplateCollectionResponse instantiates a new WorkflowTemplateCollectionResponse and sets the default values. +func NewWorkflowTemplateCollectionResponse()(*WorkflowTemplateCollectionResponse) { + m := &WorkflowTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkflowTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowTemplateable, len(val)) + for i, v := range val { + res[i] = v.(WorkflowTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkflowTemplateCollectionResponse) GetValue()([]WorkflowTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkflowTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkflowTemplateCollectionResponse) SetValue(value []WorkflowTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_responseable.go new file mode 100644 index 000000000..298b4f300 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_template_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowTemplateCollectionResponseable +type WorkflowTemplateCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WorkflowTemplateable) + SetValue(value []WorkflowTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_templateable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_templateable.go new file mode 100644 index 000000000..2ba4951c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_templateable.go @@ -0,0 +1,22 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowTemplateable +type WorkflowTemplateable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*LifecycleWorkflowCategory) + GetDescription()(*string) + GetDisplayName()(*string) + GetExecutionConditions()(WorkflowExecutionConditionsable) + GetTasks()([]Taskable) + SetCategory(value *LifecycleWorkflowCategory)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetExecutionConditions(value WorkflowExecutionConditionsable)() + SetTasks(value []Taskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_trigger_time_based_attribute.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_trigger_time_based_attribute.go new file mode 100644 index 000000000..af73ee3ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_trigger_time_based_attribute.go @@ -0,0 +1,37 @@ +package identitygovernance +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkflowTriggerTimeBasedAttribute int + +const ( + EMPLOYEEHIREDATE_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE WorkflowTriggerTimeBasedAttribute = iota + EMPLOYEELEAVEDATETIME_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE + UNKNOWNFUTUREVALUE_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE +) + +func (i WorkflowTriggerTimeBasedAttribute) String() string { + return []string{"employeeHireDate", "employeeLeaveDateTime", "unknownFutureValue"}[i] +} +func ParseWorkflowTriggerTimeBasedAttribute(v string) (interface{}, error) { + result := EMPLOYEEHIREDATE_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE + switch v { + case "employeeHireDate": + result = EMPLOYEEHIREDATE_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE + case "employeeLeaveDateTime": + result = EMPLOYEELEAVEDATETIME_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WORKFLOWTRIGGERTIMEBASEDATTRIBUTE + default: + return 0, errors.New("Unknown WorkflowTriggerTimeBasedAttribute value: " + v) + } + return &result, nil +} +func SerializeWorkflowTriggerTimeBasedAttribute(values []WorkflowTriggerTimeBasedAttribute) []string { + 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/identitygovernance/workflow_version.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version.go new file mode 100644 index 000000000..c91428c0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version.go @@ -0,0 +1,62 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowVersion provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkflowVersion struct { + WorkflowBase + // The version of the workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. + versionNumber *int32 +} +// NewWorkflowVersion instantiates a new workflowVersion and sets the default values. +func NewWorkflowVersion()(*WorkflowVersion) { + m := &WorkflowVersion{ + WorkflowBase: *NewWorkflowBase(), + } + odataTypeValue := "#microsoft.graph.identityGovernance.workflowVersion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateWorkflowVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowVersion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WorkflowBase.GetFieldDeserializers() + res["versionNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersionNumber(val) + } + return nil + } + return res +} +// GetVersionNumber gets the versionNumber property value. The version of the workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *WorkflowVersion) GetVersionNumber()(*int32) { + return m.versionNumber +} +// Serialize serializes information the current object +func (m *WorkflowVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WorkflowBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("versionNumber", m.GetVersionNumber()) + if err != nil { + return err + } + } + return nil +} +// SetVersionNumber sets the versionNumber property value. The version of the workflow.Supports $filter(lt, le, gt, ge, eq, ne) and $orderby. +func (m *WorkflowVersion) SetVersionNumber(value *int32)() { + m.versionNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_response.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_response.go new file mode 100644 index 000000000..8bda60de0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_response.go @@ -0,0 +1,69 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowVersionCollectionResponse +type WorkflowVersionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WorkflowVersionable +} +// NewWorkflowVersionCollectionResponse instantiates a new WorkflowVersionCollectionResponse and sets the default values. +func NewWorkflowVersionCollectionResponse()(*WorkflowVersionCollectionResponse) { + m := &WorkflowVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkflowVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkflowVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkflowVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkflowVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkflowVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkflowVersionable, len(val)) + for i, v := range val { + res[i] = v.(WorkflowVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkflowVersionCollectionResponse) GetValue()([]WorkflowVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkflowVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkflowVersionCollectionResponse) SetValue(value []WorkflowVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_responseable.go new file mode 100644 index 000000000..b48576adc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_version_collection_responseable.go @@ -0,0 +1,14 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkflowVersionCollectionResponseable +type WorkflowVersionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WorkflowVersionable) + SetValue(value []WorkflowVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_versionable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_versionable.go new file mode 100644 index 000000000..6ee25cff9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflow_versionable.go @@ -0,0 +1,13 @@ +package identitygovernance + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkflowVersionable +type WorkflowVersionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowBaseable + GetVersionNumber()(*int32) + SetVersionNumber(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/identitygovernance/workflowable.go b/src/internal/connector/graph/betasdk/models/identitygovernance/workflowable.go new file mode 100644 index 000000000..068435531 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/identitygovernance/workflowable.go @@ -0,0 +1,31 @@ +package identitygovernance + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Workflowable +type Workflowable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WorkflowBaseable + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExecutionScope()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable) + GetId()(*string) + GetNextScheduleRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRuns()([]Runable) + GetTaskReports()([]TaskReportable) + GetUserProcessingResults()([]UserProcessingResultable) + GetVersion()(*int32) + GetVersions()([]WorkflowVersionable) + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExecutionScope(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Userable)() + SetId(value *string)() + SetNextScheduleRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRuns(value []Runable)() + SetTaskReports(value []TaskReportable)() + SetUserProcessingResults(value []UserProcessingResultable)() + SetVersion(value *int32)() + SetVersions(value []WorkflowVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/image.go b/src/internal/connector/graph/betasdk/models/image.go new file mode 100644 index 000000000..9f4776778 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/image.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Image +type Image struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Optional. Height of the image, in pixels. Read-only. + height *int32 + // The OdataType property + odataType *string + // Optional. Width of the image, in pixels. Read-only. + width *int32 +} +// NewImage instantiates a new image and sets the default values. +func NewImage()(*Image) { + m := &Image{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateImageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImage(), 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 *Image) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Image) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["height"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeight(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["width"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWidth(val) + } + return nil + } + return res +} +// GetHeight gets the height property value. Optional. Height of the image, in pixels. Read-only. +func (m *Image) GetHeight()(*int32) { + return m.height +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Image) GetOdataType()(*string) { + return m.odataType +} +// GetWidth gets the width property value. Optional. Width of the image, in pixels. Read-only. +func (m *Image) GetWidth()(*int32) { + return m.width +} +// Serialize serializes information the current object +func (m *Image) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("height", m.GetHeight()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("width", m.GetWidth()) + 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 *Image) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHeight sets the height property value. Optional. Height of the image, in pixels. Read-only. +func (m *Image) SetHeight(value *int32)() { + m.height = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Image) SetOdataType(value *string)() { + m.odataType = value +} +// SetWidth sets the width property value. Optional. Width of the image, in pixels. Read-only. +func (m *Image) SetWidth(value *int32)() { + m.width = value +} diff --git a/src/internal/connector/graph/betasdk/models/image_info.go b/src/internal/connector/graph/betasdk/models/image_info.go new file mode 100644 index 000000000..d2c830edf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/image_info.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImageInfo +type ImageInfo struct { + // Optional; parameter used to indicate the server is able to render image dynamically in response to parameterization. For example – a high contrast image + addImageQuery *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Optional; alt-text accessible content for the image + alternateText *string + // The alternativeText property + alternativeText *string + // Optional; URI that points to an icon which represents the application used to generate the activity + iconUrl *string + // The OdataType property + odataType *string +} +// NewImageInfo instantiates a new imageInfo and sets the default values. +func NewImageInfo()(*ImageInfo) { + m := &ImageInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateImageInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImageInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImageInfo(), nil +} +// GetAddImageQuery gets the addImageQuery property value. Optional; parameter used to indicate the server is able to render image dynamically in response to parameterization. For example – a high contrast image +func (m *ImageInfo) GetAddImageQuery()(*bool) { + return m.addImageQuery +} +// 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 *ImageInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlternateText gets the alternateText property value. Optional; alt-text accessible content for the image +func (m *ImageInfo) GetAlternateText()(*string) { + return m.alternateText +} +// GetAlternativeText gets the alternativeText property value. The alternativeText property +func (m *ImageInfo) GetAlternativeText()(*string) { + return m.alternativeText +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImageInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["addImageQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAddImageQuery(val) + } + return nil + } + res["alternateText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateText(val) + } + return nil + } + res["alternativeText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternativeText(val) + } + return nil + } + res["iconUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIconUrl(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 + } + return res +} +// GetIconUrl gets the iconUrl property value. Optional; URI that points to an icon which represents the application used to generate the activity +func (m *ImageInfo) GetIconUrl()(*string) { + return m.iconUrl +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ImageInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ImageInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("addImageQuery", m.GetAddImageQuery()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("alternateText", m.GetAlternateText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("alternativeText", m.GetAlternativeText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("iconUrl", m.GetIconUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAddImageQuery sets the addImageQuery property value. Optional; parameter used to indicate the server is able to render image dynamically in response to parameterization. For example – a high contrast image +func (m *ImageInfo) SetAddImageQuery(value *bool)() { + m.addImageQuery = value +} +// 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 *ImageInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlternateText sets the alternateText property value. Optional; alt-text accessible content for the image +func (m *ImageInfo) SetAlternateText(value *string)() { + m.alternateText = value +} +// SetAlternativeText sets the alternativeText property value. The alternativeText property +func (m *ImageInfo) SetAlternativeText(value *string)() { + m.alternativeText = value +} +// SetIconUrl sets the iconUrl property value. Optional; URI that points to an icon which represents the application used to generate the activity +func (m *ImageInfo) SetIconUrl(value *string)() { + m.iconUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ImageInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/image_infoable.go b/src/internal/connector/graph/betasdk/models/image_infoable.go new file mode 100644 index 000000000..a0e44ab75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/image_infoable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImageInfoable +type ImageInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddImageQuery()(*bool) + GetAlternateText()(*string) + GetAlternativeText()(*string) + GetIconUrl()(*string) + GetOdataType()(*string) + SetAddImageQuery(value *bool)() + SetAlternateText(value *string)() + SetAlternativeText(value *string)() + SetIconUrl(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/imageable.go b/src/internal/connector/graph/betasdk/models/imageable.go new file mode 100644 index 000000000..b7eba3478 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imageable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Imageable +type Imageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeight()(*int32) + GetOdataType()(*string) + GetWidth()(*int32) + SetHeight(value *int32)() + SetOdataType(value *string)() + SetWidth(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/impacted_resource.go b/src/internal/connector/graph/betasdk/models/impacted_resource.go new file mode 100644 index 000000000..4ce7433ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/impacted_resource.go @@ -0,0 +1,408 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImpactedResource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ImpactedResource struct { + Entity + // The addedDateTime property + addedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The additionalDetails property + additionalDetails []KeyValueable + // The apiUrl property + apiUrl *string + // The displayName property + displayName *string + // The lastModifiedBy property + lastModifiedBy *string + // The lastModifiedDateTime property + lastModifiedDateTime *string + // The owner property + owner *string + // The portalUrl property + portalUrl *string + // The postponeUntilDateTime property + postponeUntilDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The rank property + rank *int32 + // The recommendationId property + recommendationId *string + // The resourceType property + resourceType *string + // The status property + status *RecommendationStatus + // The subjectId property + subjectId *string +} +// NewImpactedResource instantiates a new impactedResource and sets the default values. +func NewImpactedResource()(*ImpactedResource) { + m := &ImpactedResource{ + Entity: *NewEntity(), + } + return m +} +// CreateImpactedResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImpactedResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImpactedResource(), nil +} +// GetAddedDateTime gets the addedDateTime property value. The addedDateTime property +func (m *ImpactedResource) GetAddedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.addedDateTime +} +// GetAdditionalDetails gets the additionalDetails property value. The additionalDetails property +func (m *ImpactedResource) GetAdditionalDetails()([]KeyValueable) { + return m.additionalDetails +} +// GetApiUrl gets the apiUrl property value. The apiUrl property +func (m *ImpactedResource) GetApiUrl()(*string) { + return m.apiUrl +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ImpactedResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImpactedResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["addedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAddedDateTime(val) + } + return nil + } + res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetAdditionalDetails(res) + } + return nil + } + res["apiUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApiUrl(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(val) + } + return nil + } + res["portalUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPortalUrl(val) + } + return nil + } + res["postponeUntilDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPostponeUntilDateTime(val) + } + return nil + } + res["rank"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRank(val) + } + return nil + } + res["recommendationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendationId(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecommendationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*RecommendationStatus)) + } + return nil + } + res["subjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectId(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *ImpactedResource) GetLastModifiedBy()(*string) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ImpactedResource) GetLastModifiedDateTime()(*string) { + return m.lastModifiedDateTime +} +// GetOwner gets the owner property value. The owner property +func (m *ImpactedResource) GetOwner()(*string) { + return m.owner +} +// GetPortalUrl gets the portalUrl property value. The portalUrl property +func (m *ImpactedResource) GetPortalUrl()(*string) { + return m.portalUrl +} +// GetPostponeUntilDateTime gets the postponeUntilDateTime property value. The postponeUntilDateTime property +func (m *ImpactedResource) GetPostponeUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.postponeUntilDateTime +} +// GetRank gets the rank property value. The rank property +func (m *ImpactedResource) GetRank()(*int32) { + return m.rank +} +// GetRecommendationId gets the recommendationId property value. The recommendationId property +func (m *ImpactedResource) GetRecommendationId()(*string) { + return m.recommendationId +} +// GetResourceType gets the resourceType property value. The resourceType property +func (m *ImpactedResource) GetResourceType()(*string) { + return m.resourceType +} +// GetStatus gets the status property value. The status property +func (m *ImpactedResource) GetStatus()(*RecommendationStatus) { + return m.status +} +// GetSubjectId gets the subjectId property value. The subjectId property +func (m *ImpactedResource) GetSubjectId()(*string) { + return m.subjectId +} +// Serialize serializes information the current object +func (m *ImpactedResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("addedDateTime", m.GetAddedDateTime()) + if err != nil { + return err + } + } + if m.GetAdditionalDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalDetails())) + for i, v := range m.GetAdditionalDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("apiUrl", m.GetApiUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("portalUrl", m.GetPortalUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("postponeUntilDateTime", m.GetPostponeUntilDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("rank", m.GetRank()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recommendationId", m.GetRecommendationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceType", m.GetResourceType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectId", m.GetSubjectId()) + if err != nil { + return err + } + } + return nil +} +// SetAddedDateTime sets the addedDateTime property value. The addedDateTime property +func (m *ImpactedResource) SetAddedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.addedDateTime = value +} +// SetAdditionalDetails sets the additionalDetails property value. The additionalDetails property +func (m *ImpactedResource) SetAdditionalDetails(value []KeyValueable)() { + m.additionalDetails = value +} +// SetApiUrl sets the apiUrl property value. The apiUrl property +func (m *ImpactedResource) SetApiUrl(value *string)() { + m.apiUrl = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ImpactedResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *ImpactedResource) SetLastModifiedBy(value *string)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ImpactedResource) SetLastModifiedDateTime(value *string)() { + m.lastModifiedDateTime = value +} +// SetOwner sets the owner property value. The owner property +func (m *ImpactedResource) SetOwner(value *string)() { + m.owner = value +} +// SetPortalUrl sets the portalUrl property value. The portalUrl property +func (m *ImpactedResource) SetPortalUrl(value *string)() { + m.portalUrl = value +} +// SetPostponeUntilDateTime sets the postponeUntilDateTime property value. The postponeUntilDateTime property +func (m *ImpactedResource) SetPostponeUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.postponeUntilDateTime = value +} +// SetRank sets the rank property value. The rank property +func (m *ImpactedResource) SetRank(value *int32)() { + m.rank = value +} +// SetRecommendationId sets the recommendationId property value. The recommendationId property +func (m *ImpactedResource) SetRecommendationId(value *string)() { + m.recommendationId = value +} +// SetResourceType sets the resourceType property value. The resourceType property +func (m *ImpactedResource) SetResourceType(value *string)() { + m.resourceType = value +} +// SetStatus sets the status property value. The status property +func (m *ImpactedResource) SetStatus(value *RecommendationStatus)() { + m.status = value +} +// SetSubjectId sets the subjectId property value. The subjectId property +func (m *ImpactedResource) SetSubjectId(value *string)() { + m.subjectId = value +} diff --git a/src/internal/connector/graph/betasdk/models/impacted_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/impacted_resource_collection_response.go new file mode 100644 index 000000000..85a72e244 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/impacted_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImpactedResourceCollectionResponse +type ImpactedResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImpactedResourceable +} +// NewImpactedResourceCollectionResponse instantiates a new ImpactedResourceCollectionResponse and sets the default values. +func NewImpactedResourceCollectionResponse()(*ImpactedResourceCollectionResponse) { + m := &ImpactedResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImpactedResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImpactedResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImpactedResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImpactedResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImpactedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImpactedResourceable, len(val)) + for i, v := range val { + res[i] = v.(ImpactedResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImpactedResourceCollectionResponse) GetValue()([]ImpactedResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImpactedResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImpactedResourceCollectionResponse) SetValue(value []ImpactedResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/impacted_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/impacted_resource_collection_responseable.go new file mode 100644 index 000000000..1cb37e416 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/impacted_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImpactedResourceCollectionResponseable +type ImpactedResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImpactedResourceable) + SetValue(value []ImpactedResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/impacted_resourceable.go b/src/internal/connector/graph/betasdk/models/impacted_resourceable.go new file mode 100644 index 000000000..0f79e137d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/impacted_resourceable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImpactedResourceable +type ImpactedResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAdditionalDetails()([]KeyValueable) + GetApiUrl()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(*string) + GetLastModifiedDateTime()(*string) + GetOwner()(*string) + GetPortalUrl()(*string) + GetPostponeUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRank()(*int32) + GetRecommendationId()(*string) + GetResourceType()(*string) + GetStatus()(*RecommendationStatus) + GetSubjectId()(*string) + SetAddedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAdditionalDetails(value []KeyValueable)() + SetApiUrl(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value *string)() + SetLastModifiedDateTime(value *string)() + SetOwner(value *string)() + SetPortalUrl(value *string)() + SetPostponeUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRank(value *int32)() + SetRecommendationId(value *string)() + SetResourceType(value *string)() + SetStatus(value *RecommendationStatus)() + SetSubjectId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/implicit_grant_settings.go b/src/internal/connector/graph/betasdk/models/implicit_grant_settings.go new file mode 100644 index 000000000..cf08277a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/implicit_grant_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImplicitGrantSettings +type ImplicitGrantSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether this web application can request an access token using the OAuth 2.0 implicit flow. + enableAccessTokenIssuance *bool + // Specifies whether this web application can request an ID token using the OAuth 2.0 implicit flow. + enableIdTokenIssuance *bool + // The OdataType property + odataType *string +} +// NewImplicitGrantSettings instantiates a new implicitGrantSettings and sets the default values. +func NewImplicitGrantSettings()(*ImplicitGrantSettings) { + m := &ImplicitGrantSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateImplicitGrantSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImplicitGrantSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImplicitGrantSettings(), 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 *ImplicitGrantSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnableAccessTokenIssuance gets the enableAccessTokenIssuance property value. Specifies whether this web application can request an access token using the OAuth 2.0 implicit flow. +func (m *ImplicitGrantSettings) GetEnableAccessTokenIssuance()(*bool) { + return m.enableAccessTokenIssuance +} +// GetEnableIdTokenIssuance gets the enableIdTokenIssuance property value. Specifies whether this web application can request an ID token using the OAuth 2.0 implicit flow. +func (m *ImplicitGrantSettings) GetEnableIdTokenIssuance()(*bool) { + return m.enableIdTokenIssuance +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImplicitGrantSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enableAccessTokenIssuance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableAccessTokenIssuance(val) + } + return nil + } + res["enableIdTokenIssuance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableIdTokenIssuance(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ImplicitGrantSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ImplicitGrantSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enableAccessTokenIssuance", m.GetEnableAccessTokenIssuance()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enableIdTokenIssuance", m.GetEnableIdTokenIssuance()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ImplicitGrantSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnableAccessTokenIssuance sets the enableAccessTokenIssuance property value. Specifies whether this web application can request an access token using the OAuth 2.0 implicit flow. +func (m *ImplicitGrantSettings) SetEnableAccessTokenIssuance(value *bool)() { + m.enableAccessTokenIssuance = value +} +// SetEnableIdTokenIssuance sets the enableIdTokenIssuance property value. Specifies whether this web application can request an ID token using the OAuth 2.0 implicit flow. +func (m *ImplicitGrantSettings) SetEnableIdTokenIssuance(value *bool)() { + m.enableIdTokenIssuance = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ImplicitGrantSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/implicit_grant_settingsable.go b/src/internal/connector/graph/betasdk/models/implicit_grant_settingsable.go new file mode 100644 index 000000000..7ac3c1302 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/implicit_grant_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImplicitGrantSettingsable +type ImplicitGrantSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnableAccessTokenIssuance()(*bool) + GetEnableIdTokenIssuance()(*bool) + GetOdataType()(*string) + SetEnableAccessTokenIssuance(value *bool)() + SetEnableIdTokenIssuance(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/importance.go b/src/internal/connector/graph/betasdk/models/importance.go new file mode 100644 index 000000000..2984f5798 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/importance.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Importance int + +const ( + LOW_IMPORTANCE Importance = iota + NORMAL_IMPORTANCE + HIGH_IMPORTANCE +) + +func (i Importance) String() string { + return []string{"low", "normal", "high"}[i] +} +func ParseImportance(v string) (interface{}, error) { + result := LOW_IMPORTANCE + switch v { + case "low": + result = LOW_IMPORTANCE + case "normal": + result = NORMAL_IMPORTANCE + case "high": + result = HIGH_IMPORTANCE + default: + return 0, errors.New("Unknown Importance value: " + v) + } + return &result, nil +} +func SerializeImportance(values []Importance) []string { + 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/imported_apple_device_identity.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity.go new file mode 100644 index 000000000..a472fa96c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity.go @@ -0,0 +1,342 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentity the importedAppleDeviceIdentity resource represents the imported device identity of an Apple device . +type ImportedAppleDeviceIdentity struct { + Entity + // Created Date Time of the device + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of the device + description *string + // The discoverySource property + discoverySource *DiscoverySource + // The enrollmentState property + enrollmentState *EnrollmentState + // Indicates if the device is deleted from Apple Business Manager + isDeleted *bool + // Indicates if the Apple device is supervised. More information is at: https://support.apple.com/en-us/HT202837 + isSupervised *bool + // Last Contacted Date Time of the device + lastContactedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The platform property + platform *Platform + // The time enrollment profile was assigned to the device + requestedEnrollmentProfileAssignmentDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Enrollment profile Id admin intends to apply to the device during next enrollment + requestedEnrollmentProfileId *string + // Device serial number + serialNumber *string +} +// NewImportedAppleDeviceIdentity instantiates a new importedAppleDeviceIdentity and sets the default values. +func NewImportedAppleDeviceIdentity()(*ImportedAppleDeviceIdentity) { + m := &ImportedAppleDeviceIdentity{ + Entity: *NewEntity(), + } + return m +} +// CreateImportedAppleDeviceIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedAppleDeviceIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.importedAppleDeviceIdentityResult": + return NewImportedAppleDeviceIdentityResult(), nil + } + } + } + } + return NewImportedAppleDeviceIdentity(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Created Date Time of the device +func (m *ImportedAppleDeviceIdentity) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of the device +func (m *ImportedAppleDeviceIdentity) GetDescription()(*string) { + return m.description +} +// GetDiscoverySource gets the discoverySource property value. The discoverySource property +func (m *ImportedAppleDeviceIdentity) GetDiscoverySource()(*DiscoverySource) { + return m.discoverySource +} +// GetEnrollmentState gets the enrollmentState property value. The enrollmentState property +func (m *ImportedAppleDeviceIdentity) GetEnrollmentState()(*EnrollmentState) { + return m.enrollmentState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedAppleDeviceIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discoverySource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDiscoverySource) + if err != nil { + return err + } + if val != nil { + m.SetDiscoverySource(val.(*DiscoverySource)) + } + return nil + } + res["enrollmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentState) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentState(val.(*EnrollmentState)) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["isSupervised"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSupervised(val) + } + return nil + } + res["lastContactedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastContactedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlatform) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*Platform)) + } + return nil + } + res["requestedEnrollmentProfileAssignmentDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedEnrollmentProfileAssignmentDateTime(val) + } + return nil + } + res["requestedEnrollmentProfileId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedEnrollmentProfileId(val) + } + return nil + } + res["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + return res +} +// GetIsDeleted gets the isDeleted property value. Indicates if the device is deleted from Apple Business Manager +func (m *ImportedAppleDeviceIdentity) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetIsSupervised gets the isSupervised property value. Indicates if the Apple device is supervised. More information is at: https://support.apple.com/en-us/HT202837 +func (m *ImportedAppleDeviceIdentity) GetIsSupervised()(*bool) { + return m.isSupervised +} +// GetLastContactedDateTime gets the lastContactedDateTime property value. Last Contacted Date Time of the device +func (m *ImportedAppleDeviceIdentity) GetLastContactedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastContactedDateTime +} +// GetPlatform gets the platform property value. The platform property +func (m *ImportedAppleDeviceIdentity) GetPlatform()(*Platform) { + return m.platform +} +// GetRequestedEnrollmentProfileAssignmentDateTime gets the requestedEnrollmentProfileAssignmentDateTime property value. The time enrollment profile was assigned to the device +func (m *ImportedAppleDeviceIdentity) GetRequestedEnrollmentProfileAssignmentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestedEnrollmentProfileAssignmentDateTime +} +// GetRequestedEnrollmentProfileId gets the requestedEnrollmentProfileId property value. Enrollment profile Id admin intends to apply to the device during next enrollment +func (m *ImportedAppleDeviceIdentity) GetRequestedEnrollmentProfileId()(*string) { + return m.requestedEnrollmentProfileId +} +// GetSerialNumber gets the serialNumber property value. Device serial number +func (m *ImportedAppleDeviceIdentity) GetSerialNumber()(*string) { + return m.serialNumber +} +// Serialize serializes information the current object +func (m *ImportedAppleDeviceIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDiscoverySource() != nil { + cast := (*m.GetDiscoverySource()).String() + err = writer.WriteStringValue("discoverySource", &cast) + if err != nil { + return err + } + } + if m.GetEnrollmentState() != nil { + cast := (*m.GetEnrollmentState()).String() + err = writer.WriteStringValue("enrollmentState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSupervised", m.GetIsSupervised()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastContactedDateTime", m.GetLastContactedDateTime()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestedEnrollmentProfileAssignmentDateTime", m.GetRequestedEnrollmentProfileAssignmentDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestedEnrollmentProfileId", m.GetRequestedEnrollmentProfileId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serialNumber", m.GetSerialNumber()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Created Date Time of the device +func (m *ImportedAppleDeviceIdentity) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of the device +func (m *ImportedAppleDeviceIdentity) SetDescription(value *string)() { + m.description = value +} +// SetDiscoverySource sets the discoverySource property value. The discoverySource property +func (m *ImportedAppleDeviceIdentity) SetDiscoverySource(value *DiscoverySource)() { + m.discoverySource = value +} +// SetEnrollmentState sets the enrollmentState property value. The enrollmentState property +func (m *ImportedAppleDeviceIdentity) SetEnrollmentState(value *EnrollmentState)() { + m.enrollmentState = value +} +// SetIsDeleted sets the isDeleted property value. Indicates if the device is deleted from Apple Business Manager +func (m *ImportedAppleDeviceIdentity) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetIsSupervised sets the isSupervised property value. Indicates if the Apple device is supervised. More information is at: https://support.apple.com/en-us/HT202837 +func (m *ImportedAppleDeviceIdentity) SetIsSupervised(value *bool)() { + m.isSupervised = value +} +// SetLastContactedDateTime sets the lastContactedDateTime property value. Last Contacted Date Time of the device +func (m *ImportedAppleDeviceIdentity) SetLastContactedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastContactedDateTime = value +} +// SetPlatform sets the platform property value. The platform property +func (m *ImportedAppleDeviceIdentity) SetPlatform(value *Platform)() { + m.platform = value +} +// SetRequestedEnrollmentProfileAssignmentDateTime sets the requestedEnrollmentProfileAssignmentDateTime property value. The time enrollment profile was assigned to the device +func (m *ImportedAppleDeviceIdentity) SetRequestedEnrollmentProfileAssignmentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestedEnrollmentProfileAssignmentDateTime = value +} +// SetRequestedEnrollmentProfileId sets the requestedEnrollmentProfileId property value. Enrollment profile Id admin intends to apply to the device during next enrollment +func (m *ImportedAppleDeviceIdentity) SetRequestedEnrollmentProfileId(value *string)() { + m.requestedEnrollmentProfileId = value +} +// SetSerialNumber sets the serialNumber property value. Device serial number +func (m *ImportedAppleDeviceIdentity) SetSerialNumber(value *string)() { + m.serialNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_response.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_response.go new file mode 100644 index 000000000..757a483c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityCollectionResponse +type ImportedAppleDeviceIdentityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImportedAppleDeviceIdentityable +} +// NewImportedAppleDeviceIdentityCollectionResponse instantiates a new ImportedAppleDeviceIdentityCollectionResponse and sets the default values. +func NewImportedAppleDeviceIdentityCollectionResponse()(*ImportedAppleDeviceIdentityCollectionResponse) { + m := &ImportedAppleDeviceIdentityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImportedAppleDeviceIdentityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedAppleDeviceIdentityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedAppleDeviceIdentityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedAppleDeviceIdentityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedAppleDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedAppleDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedAppleDeviceIdentityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImportedAppleDeviceIdentityCollectionResponse) GetValue()([]ImportedAppleDeviceIdentityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImportedAppleDeviceIdentityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImportedAppleDeviceIdentityCollectionResponse) SetValue(value []ImportedAppleDeviceIdentityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_responseable.go new file mode 100644 index 000000000..09179cbbb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityCollectionResponseable +type ImportedAppleDeviceIdentityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImportedAppleDeviceIdentityable) + SetValue(value []ImportedAppleDeviceIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result.go new file mode 100644 index 000000000..14285c5a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityResult +type ImportedAppleDeviceIdentityResult struct { + ImportedAppleDeviceIdentity + // Status of imported device identity + status *bool +} +// NewImportedAppleDeviceIdentityResult instantiates a new ImportedAppleDeviceIdentityResult and sets the default values. +func NewImportedAppleDeviceIdentityResult()(*ImportedAppleDeviceIdentityResult) { + m := &ImportedAppleDeviceIdentityResult{ + ImportedAppleDeviceIdentity: *NewImportedAppleDeviceIdentity(), + } + return m +} +// CreateImportedAppleDeviceIdentityResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedAppleDeviceIdentityResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedAppleDeviceIdentityResult(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedAppleDeviceIdentityResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ImportedAppleDeviceIdentity.GetFieldDeserializers() + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. Status of imported device identity +func (m *ImportedAppleDeviceIdentityResult) GetStatus()(*bool) { + return m.status +} +// Serialize serializes information the current object +func (m *ImportedAppleDeviceIdentityResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ImportedAppleDeviceIdentity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetStatus sets the status property value. Status of imported device identity +func (m *ImportedAppleDeviceIdentityResult) SetStatus(value *bool)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_response.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_response.go new file mode 100644 index 000000000..dd2ad3a4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityResultCollectionResponse +type ImportedAppleDeviceIdentityResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImportedAppleDeviceIdentityResultable +} +// NewImportedAppleDeviceIdentityResultCollectionResponse instantiates a new ImportedAppleDeviceIdentityResultCollectionResponse and sets the default values. +func NewImportedAppleDeviceIdentityResultCollectionResponse()(*ImportedAppleDeviceIdentityResultCollectionResponse) { + m := &ImportedAppleDeviceIdentityResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImportedAppleDeviceIdentityResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedAppleDeviceIdentityResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedAppleDeviceIdentityResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedAppleDeviceIdentityResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedAppleDeviceIdentityResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedAppleDeviceIdentityResultable, len(val)) + for i, v := range val { + res[i] = v.(ImportedAppleDeviceIdentityResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImportedAppleDeviceIdentityResultCollectionResponse) GetValue()([]ImportedAppleDeviceIdentityResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImportedAppleDeviceIdentityResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImportedAppleDeviceIdentityResultCollectionResponse) SetValue(value []ImportedAppleDeviceIdentityResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_responseable.go new file mode 100644 index 000000000..a7bd5102d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityResultCollectionResponseable +type ImportedAppleDeviceIdentityResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImportedAppleDeviceIdentityResultable) + SetValue(value []ImportedAppleDeviceIdentityResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_resultable.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_resultable.go new file mode 100644 index 000000000..db332c558 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identity_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityResultable +type ImportedAppleDeviceIdentityResultable interface { + ImportedAppleDeviceIdentityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*bool) + SetStatus(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_apple_device_identityable.go b/src/internal/connector/graph/betasdk/models/imported_apple_device_identityable.go new file mode 100644 index 000000000..18fe2685c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_apple_device_identityable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedAppleDeviceIdentityable +type ImportedAppleDeviceIdentityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDiscoverySource()(*DiscoverySource) + GetEnrollmentState()(*EnrollmentState) + GetIsDeleted()(*bool) + GetIsSupervised()(*bool) + GetLastContactedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*Platform) + GetRequestedEnrollmentProfileAssignmentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRequestedEnrollmentProfileId()(*string) + GetSerialNumber()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDiscoverySource(value *DiscoverySource)() + SetEnrollmentState(value *EnrollmentState)() + SetIsDeleted(value *bool)() + SetIsSupervised(value *bool)() + SetLastContactedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *Platform)() + SetRequestedEnrollmentProfileAssignmentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRequestedEnrollmentProfileId(value *string)() + SetSerialNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity.go b/src/internal/connector/graph/betasdk/models/imported_device_identity.go new file mode 100644 index 000000000..ba6336075 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity.go @@ -0,0 +1,264 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentity the importedDeviceIdentity resource represents a unique hardware identity of a device that has been pre-staged for pre-enrollment configuration. +type ImportedDeviceIdentity struct { + Entity + // Created Date Time of the device + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description of the device + description *string + // The enrollmentState property + enrollmentState *EnrollmentState + // Imported Device Identifier + importedDeviceIdentifier *string + // The importedDeviceIdentityType property + importedDeviceIdentityType *ImportedDeviceIdentityType + // Last Contacted Date Time of the device + lastContactedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Last Modified DateTime of the description + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The platform property + platform *Platform +} +// NewImportedDeviceIdentity instantiates a new importedDeviceIdentity and sets the default values. +func NewImportedDeviceIdentity()(*ImportedDeviceIdentity) { + m := &ImportedDeviceIdentity{ + Entity: *NewEntity(), + } + return m +} +// CreateImportedDeviceIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedDeviceIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.importedDeviceIdentityResult": + return NewImportedDeviceIdentityResult(), nil + } + } + } + } + return NewImportedDeviceIdentity(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Created Date Time of the device +func (m *ImportedDeviceIdentity) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description of the device +func (m *ImportedDeviceIdentity) GetDescription()(*string) { + return m.description +} +// GetEnrollmentState gets the enrollmentState property value. The enrollmentState property +func (m *ImportedDeviceIdentity) GetEnrollmentState()(*EnrollmentState) { + return m.enrollmentState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedDeviceIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["enrollmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentState) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentState(val.(*EnrollmentState)) + } + return nil + } + res["importedDeviceIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImportedDeviceIdentifier(val) + } + return nil + } + res["importedDeviceIdentityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportedDeviceIdentityType) + if err != nil { + return err + } + if val != nil { + m.SetImportedDeviceIdentityType(val.(*ImportedDeviceIdentityType)) + } + return nil + } + res["lastContactedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastContactedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlatform) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*Platform)) + } + return nil + } + return res +} +// GetImportedDeviceIdentifier gets the importedDeviceIdentifier property value. Imported Device Identifier +func (m *ImportedDeviceIdentity) GetImportedDeviceIdentifier()(*string) { + return m.importedDeviceIdentifier +} +// GetImportedDeviceIdentityType gets the importedDeviceIdentityType property value. The importedDeviceIdentityType property +func (m *ImportedDeviceIdentity) GetImportedDeviceIdentityType()(*ImportedDeviceIdentityType) { + return m.importedDeviceIdentityType +} +// GetLastContactedDateTime gets the lastContactedDateTime property value. Last Contacted Date Time of the device +func (m *ImportedDeviceIdentity) GetLastContactedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastContactedDateTime +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last Modified DateTime of the description +func (m *ImportedDeviceIdentity) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPlatform gets the platform property value. The platform property +func (m *ImportedDeviceIdentity) GetPlatform()(*Platform) { + return m.platform +} +// Serialize serializes information the current object +func (m *ImportedDeviceIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEnrollmentState() != nil { + cast := (*m.GetEnrollmentState()).String() + err = writer.WriteStringValue("enrollmentState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("importedDeviceIdentifier", m.GetImportedDeviceIdentifier()) + if err != nil { + return err + } + } + if m.GetImportedDeviceIdentityType() != nil { + cast := (*m.GetImportedDeviceIdentityType()).String() + err = writer.WriteStringValue("importedDeviceIdentityType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastContactedDateTime", m.GetLastContactedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Created Date Time of the device +func (m *ImportedDeviceIdentity) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description of the device +func (m *ImportedDeviceIdentity) SetDescription(value *string)() { + m.description = value +} +// SetEnrollmentState sets the enrollmentState property value. The enrollmentState property +func (m *ImportedDeviceIdentity) SetEnrollmentState(value *EnrollmentState)() { + m.enrollmentState = value +} +// SetImportedDeviceIdentifier sets the importedDeviceIdentifier property value. Imported Device Identifier +func (m *ImportedDeviceIdentity) SetImportedDeviceIdentifier(value *string)() { + m.importedDeviceIdentifier = value +} +// SetImportedDeviceIdentityType sets the importedDeviceIdentityType property value. The importedDeviceIdentityType property +func (m *ImportedDeviceIdentity) SetImportedDeviceIdentityType(value *ImportedDeviceIdentityType)() { + m.importedDeviceIdentityType = value +} +// SetLastContactedDateTime sets the lastContactedDateTime property value. Last Contacted Date Time of the device +func (m *ImportedDeviceIdentity) SetLastContactedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastContactedDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last Modified DateTime of the description +func (m *ImportedDeviceIdentity) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPlatform sets the platform property value. The platform property +func (m *ImportedDeviceIdentity) SetPlatform(value *Platform)() { + m.platform = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_response.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_response.go new file mode 100644 index 000000000..ef207c9dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityCollectionResponse +type ImportedDeviceIdentityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImportedDeviceIdentityable +} +// NewImportedDeviceIdentityCollectionResponse instantiates a new ImportedDeviceIdentityCollectionResponse and sets the default values. +func NewImportedDeviceIdentityCollectionResponse()(*ImportedDeviceIdentityCollectionResponse) { + m := &ImportedDeviceIdentityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImportedDeviceIdentityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedDeviceIdentityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedDeviceIdentityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedDeviceIdentityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedDeviceIdentityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImportedDeviceIdentityCollectionResponse) GetValue()([]ImportedDeviceIdentityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImportedDeviceIdentityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImportedDeviceIdentityCollectionResponse) SetValue(value []ImportedDeviceIdentityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_responseable.go new file mode 100644 index 000000000..7373aa4ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityCollectionResponseable +type ImportedDeviceIdentityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImportedDeviceIdentityable) + SetValue(value []ImportedDeviceIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_result.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_result.go new file mode 100644 index 000000000..059474080 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityResult +type ImportedDeviceIdentityResult struct { + ImportedDeviceIdentity + // Status of imported device identity + status *bool +} +// NewImportedDeviceIdentityResult instantiates a new ImportedDeviceIdentityResult and sets the default values. +func NewImportedDeviceIdentityResult()(*ImportedDeviceIdentityResult) { + m := &ImportedDeviceIdentityResult{ + ImportedDeviceIdentity: *NewImportedDeviceIdentity(), + } + return m +} +// CreateImportedDeviceIdentityResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedDeviceIdentityResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedDeviceIdentityResult(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedDeviceIdentityResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ImportedDeviceIdentity.GetFieldDeserializers() + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. Status of imported device identity +func (m *ImportedDeviceIdentityResult) GetStatus()(*bool) { + return m.status +} +// Serialize serializes information the current object +func (m *ImportedDeviceIdentityResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ImportedDeviceIdentity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetStatus sets the status property value. Status of imported device identity +func (m *ImportedDeviceIdentityResult) SetStatus(value *bool)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_response.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_response.go new file mode 100644 index 000000000..83446f2cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityResultCollectionResponse +type ImportedDeviceIdentityResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImportedDeviceIdentityResultable +} +// NewImportedDeviceIdentityResultCollectionResponse instantiates a new ImportedDeviceIdentityResultCollectionResponse and sets the default values. +func NewImportedDeviceIdentityResultCollectionResponse()(*ImportedDeviceIdentityResultCollectionResponse) { + m := &ImportedDeviceIdentityResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImportedDeviceIdentityResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedDeviceIdentityResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedDeviceIdentityResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedDeviceIdentityResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedDeviceIdentityResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedDeviceIdentityResultable, len(val)) + for i, v := range val { + res[i] = v.(ImportedDeviceIdentityResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImportedDeviceIdentityResultCollectionResponse) GetValue()([]ImportedDeviceIdentityResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImportedDeviceIdentityResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImportedDeviceIdentityResultCollectionResponse) SetValue(value []ImportedDeviceIdentityResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_responseable.go new file mode 100644 index 000000000..5b2e322e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityResultCollectionResponseable +type ImportedDeviceIdentityResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImportedDeviceIdentityResultable) + SetValue(value []ImportedDeviceIdentityResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_resultable.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_resultable.go new file mode 100644 index 000000000..f3685f266 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityResultable +type ImportedDeviceIdentityResultable interface { + ImportedDeviceIdentityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatus()(*bool) + SetStatus(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_device_identity_type.go b/src/internal/connector/graph/betasdk/models/imported_device_identity_type.go new file mode 100644 index 000000000..81330aae1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identity_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ImportedDeviceIdentityType int + +const ( + // Unknown value of importedDeviceIdentityType. + UNKNOWN_IMPORTEDDEVICEIDENTITYTYPE ImportedDeviceIdentityType = iota + // Device Identity is of type imei. + IMEI_IMPORTEDDEVICEIDENTITYTYPE + // Device Identity is of type serial number. + SERIALNUMBER_IMPORTEDDEVICEIDENTITYTYPE +) + +func (i ImportedDeviceIdentityType) String() string { + return []string{"unknown", "imei", "serialNumber"}[i] +} +func ParseImportedDeviceIdentityType(v string) (interface{}, error) { + result := UNKNOWN_IMPORTEDDEVICEIDENTITYTYPE + switch v { + case "unknown": + result = UNKNOWN_IMPORTEDDEVICEIDENTITYTYPE + case "imei": + result = IMEI_IMPORTEDDEVICEIDENTITYTYPE + case "serialNumber": + result = SERIALNUMBER_IMPORTEDDEVICEIDENTITYTYPE + default: + return 0, errors.New("Unknown ImportedDeviceIdentityType value: " + v) + } + return &result, nil +} +func SerializeImportedDeviceIdentityType(values []ImportedDeviceIdentityType) []string { + 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/imported_device_identityable.go b/src/internal/connector/graph/betasdk/models/imported_device_identityable.go new file mode 100644 index 000000000..0c90f59f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_device_identityable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedDeviceIdentityable +type ImportedDeviceIdentityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEnrollmentState()(*EnrollmentState) + GetImportedDeviceIdentifier()(*string) + GetImportedDeviceIdentityType()(*ImportedDeviceIdentityType) + GetLastContactedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*Platform) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEnrollmentState(value *EnrollmentState)() + SetImportedDeviceIdentifier(value *string)() + SetImportedDeviceIdentityType(value *ImportedDeviceIdentityType)() + SetLastContactedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *Platform)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity.go new file mode 100644 index 000000000..6b5735fb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity.go @@ -0,0 +1,216 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentity imported windows autopilot devices. +type ImportedWindowsAutopilotDeviceIdentity struct { + Entity + // UPN of the user the device will be assigned + assignedUserPrincipalName *string + // Group Tag of the Windows autopilot device. + groupTag *string + // Hardware Blob of the Windows autopilot device. + hardwareIdentifier []byte + // The Import Id of the Windows autopilot device. + importId *string + // Product Key of the Windows autopilot device. + productKey *string + // Serial number of the Windows autopilot device. + serialNumber *string + // Current state of the imported device. + state ImportedWindowsAutopilotDeviceIdentityStateable +} +// NewImportedWindowsAutopilotDeviceIdentity instantiates a new importedWindowsAutopilotDeviceIdentity and sets the default values. +func NewImportedWindowsAutopilotDeviceIdentity()(*ImportedWindowsAutopilotDeviceIdentity) { + m := &ImportedWindowsAutopilotDeviceIdentity{ + Entity: *NewEntity(), + } + return m +} +// CreateImportedWindowsAutopilotDeviceIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedWindowsAutopilotDeviceIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedWindowsAutopilotDeviceIdentity(), nil +} +// GetAssignedUserPrincipalName gets the assignedUserPrincipalName property value. UPN of the user the device will be assigned +func (m *ImportedWindowsAutopilotDeviceIdentity) GetAssignedUserPrincipalName()(*string) { + return m.assignedUserPrincipalName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedWindowsAutopilotDeviceIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignedUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedUserPrincipalName(val) + } + return nil + } + res["groupTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupTag(val) + } + return nil + } + res["hardwareIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetHardwareIdentifier(val) + } + return nil + } + res["importId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImportId(val) + } + return nil + } + res["productKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProductKey(val) + } + return nil + } + res["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateImportedWindowsAutopilotDeviceIdentityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(ImportedWindowsAutopilotDeviceIdentityStateable)) + } + return nil + } + return res +} +// GetGroupTag gets the groupTag property value. Group Tag of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetGroupTag()(*string) { + return m.groupTag +} +// GetHardwareIdentifier gets the hardwareIdentifier property value. Hardware Blob of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetHardwareIdentifier()([]byte) { + return m.hardwareIdentifier +} +// GetImportId gets the importId property value. The Import Id of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetImportId()(*string) { + return m.importId +} +// GetProductKey gets the productKey property value. Product Key of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetProductKey()(*string) { + return m.productKey +} +// GetSerialNumber gets the serialNumber property value. Serial number of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetSerialNumber()(*string) { + return m.serialNumber +} +// GetState gets the state property value. Current state of the imported device. +func (m *ImportedWindowsAutopilotDeviceIdentity) GetState()(ImportedWindowsAutopilotDeviceIdentityStateable) { + return m.state +} +// Serialize serializes information the current object +func (m *ImportedWindowsAutopilotDeviceIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedUserPrincipalName", m.GetAssignedUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupTag", m.GetGroupTag()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("hardwareIdentifier", m.GetHardwareIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("importId", m.GetImportId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("productKey", m.GetProductKey()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serialNumber", m.GetSerialNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("state", m.GetState()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedUserPrincipalName sets the assignedUserPrincipalName property value. UPN of the user the device will be assigned +func (m *ImportedWindowsAutopilotDeviceIdentity) SetAssignedUserPrincipalName(value *string)() { + m.assignedUserPrincipalName = value +} +// SetGroupTag sets the groupTag property value. Group Tag of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetGroupTag(value *string)() { + m.groupTag = value +} +// SetHardwareIdentifier sets the hardwareIdentifier property value. Hardware Blob of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetHardwareIdentifier(value []byte)() { + m.hardwareIdentifier = value +} +// SetImportId sets the importId property value. The Import Id of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetImportId(value *string)() { + m.importId = value +} +// SetProductKey sets the productKey property value. Product Key of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetProductKey(value *string)() { + m.productKey = value +} +// SetSerialNumber sets the serialNumber property value. Serial number of the Windows autopilot device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetSerialNumber(value *string)() { + m.serialNumber = value +} +// SetState sets the state property value. Current state of the imported device. +func (m *ImportedWindowsAutopilotDeviceIdentity) SetState(value ImportedWindowsAutopilotDeviceIdentityStateable)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_response.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_response.go new file mode 100644 index 000000000..519e1e725 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityCollectionResponse +type ImportedWindowsAutopilotDeviceIdentityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ImportedWindowsAutopilotDeviceIdentityable +} +// NewImportedWindowsAutopilotDeviceIdentityCollectionResponse instantiates a new ImportedWindowsAutopilotDeviceIdentityCollectionResponse and sets the default values. +func NewImportedWindowsAutopilotDeviceIdentityCollectionResponse()(*ImportedWindowsAutopilotDeviceIdentityCollectionResponse) { + m := &ImportedWindowsAutopilotDeviceIdentityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateImportedWindowsAutopilotDeviceIdentityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedWindowsAutopilotDeviceIdentityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedWindowsAutopilotDeviceIdentityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedWindowsAutopilotDeviceIdentityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedWindowsAutopilotDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedWindowsAutopilotDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedWindowsAutopilotDeviceIdentityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ImportedWindowsAutopilotDeviceIdentityCollectionResponse) GetValue()([]ImportedWindowsAutopilotDeviceIdentityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ImportedWindowsAutopilotDeviceIdentityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ImportedWindowsAutopilotDeviceIdentityCollectionResponse) SetValue(value []ImportedWindowsAutopilotDeviceIdentityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_responseable.go new file mode 100644 index 000000000..ef4a7a7fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityCollectionResponseable +type ImportedWindowsAutopilotDeviceIdentityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ImportedWindowsAutopilotDeviceIdentityable) + SetValue(value []ImportedWindowsAutopilotDeviceIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_import_status.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_import_status.go new file mode 100644 index 000000000..bea7c64e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_import_status.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ImportedWindowsAutopilotDeviceIdentityImportStatus int + +const ( + // Unknown status. + UNKNOWN_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS ImportedWindowsAutopilotDeviceIdentityImportStatus = iota + // Pending status. + PENDING_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + // Partial status. + PARTIAL_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + // Complete status. + COMPLETE_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + // Error status. + ERROR_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS +) + +func (i ImportedWindowsAutopilotDeviceIdentityImportStatus) String() string { + return []string{"unknown", "pending", "partial", "complete", "error"}[i] +} +func ParseImportedWindowsAutopilotDeviceIdentityImportStatus(v string) (interface{}, error) { + result := UNKNOWN_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + switch v { + case "unknown": + result = UNKNOWN_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + case "pending": + result = PENDING_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + case "partial": + result = PARTIAL_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + case "complete": + result = COMPLETE_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + case "error": + result = ERROR_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYIMPORTSTATUS + default: + return 0, errors.New("Unknown ImportedWindowsAutopilotDeviceIdentityImportStatus value: " + v) + } + return &result, nil +} +func SerializeImportedWindowsAutopilotDeviceIdentityImportStatus(values []ImportedWindowsAutopilotDeviceIdentityImportStatus) []string { + 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/imported_windows_autopilot_device_identity_state.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_state.go new file mode 100644 index 000000000..e68bb70e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_state.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityState +type ImportedWindowsAutopilotDeviceIdentityState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Device error code reported by Device Directory Service(DDS). + deviceErrorCode *int32 + // Device error name reported by Device Directory Service(DDS). + deviceErrorName *string + // The deviceImportStatus property + deviceImportStatus *ImportedWindowsAutopilotDeviceIdentityImportStatus + // Device Registration ID for successfully added device reported by Device Directory Service(DDS). + deviceRegistrationId *string + // The OdataType property + odataType *string +} +// NewImportedWindowsAutopilotDeviceIdentityState instantiates a new importedWindowsAutopilotDeviceIdentityState and sets the default values. +func NewImportedWindowsAutopilotDeviceIdentityState()(*ImportedWindowsAutopilotDeviceIdentityState) { + m := &ImportedWindowsAutopilotDeviceIdentityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateImportedWindowsAutopilotDeviceIdentityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedWindowsAutopilotDeviceIdentityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedWindowsAutopilotDeviceIdentityState(), 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 *ImportedWindowsAutopilotDeviceIdentityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceErrorCode gets the deviceErrorCode property value. Device error code reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetDeviceErrorCode()(*int32) { + return m.deviceErrorCode +} +// GetDeviceErrorName gets the deviceErrorName property value. Device error name reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetDeviceErrorName()(*string) { + return m.deviceErrorName +} +// GetDeviceImportStatus gets the deviceImportStatus property value. The deviceImportStatus property +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetDeviceImportStatus()(*ImportedWindowsAutopilotDeviceIdentityImportStatus) { + return m.deviceImportStatus +} +// GetDeviceRegistrationId gets the deviceRegistrationId property value. Device Registration ID for successfully added device reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetDeviceRegistrationId()(*string) { + return m.deviceRegistrationId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceErrorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceErrorCode(val) + } + return nil + } + res["deviceErrorName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceErrorName(val) + } + return nil + } + res["deviceImportStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportedWindowsAutopilotDeviceIdentityImportStatus) + if err != nil { + return err + } + if val != nil { + m.SetDeviceImportStatus(val.(*ImportedWindowsAutopilotDeviceIdentityImportStatus)) + } + return nil + } + res["deviceRegistrationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceRegistrationId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ImportedWindowsAutopilotDeviceIdentityState) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ImportedWindowsAutopilotDeviceIdentityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("deviceErrorCode", m.GetDeviceErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceErrorName", m.GetDeviceErrorName()) + if err != nil { + return err + } + } + if m.GetDeviceImportStatus() != nil { + cast := (*m.GetDeviceImportStatus()).String() + err := writer.WriteStringValue("deviceImportStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceRegistrationId", m.GetDeviceRegistrationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ImportedWindowsAutopilotDeviceIdentityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceErrorCode sets the deviceErrorCode property value. Device error code reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) SetDeviceErrorCode(value *int32)() { + m.deviceErrorCode = value +} +// SetDeviceErrorName sets the deviceErrorName property value. Device error name reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) SetDeviceErrorName(value *string)() { + m.deviceErrorName = value +} +// SetDeviceImportStatus sets the deviceImportStatus property value. The deviceImportStatus property +func (m *ImportedWindowsAutopilotDeviceIdentityState) SetDeviceImportStatus(value *ImportedWindowsAutopilotDeviceIdentityImportStatus)() { + m.deviceImportStatus = value +} +// SetDeviceRegistrationId sets the deviceRegistrationId property value. Device Registration ID for successfully added device reported by Device Directory Service(DDS). +func (m *ImportedWindowsAutopilotDeviceIdentityState) SetDeviceRegistrationId(value *string)() { + m.deviceRegistrationId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ImportedWindowsAutopilotDeviceIdentityState) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_stateable.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_stateable.go new file mode 100644 index 000000000..cf41cc91c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_stateable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityStateable +type ImportedWindowsAutopilotDeviceIdentityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceErrorCode()(*int32) + GetDeviceErrorName()(*string) + GetDeviceImportStatus()(*ImportedWindowsAutopilotDeviceIdentityImportStatus) + GetDeviceRegistrationId()(*string) + GetOdataType()(*string) + SetDeviceErrorCode(value *int32)() + SetDeviceErrorName(value *string)() + SetDeviceImportStatus(value *ImportedWindowsAutopilotDeviceIdentityImportStatus)() + SetDeviceRegistrationId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload.go new file mode 100644 index 000000000..e61fb0b9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload.go @@ -0,0 +1,122 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityUpload +type ImportedWindowsAutopilotDeviceIdentityUpload struct { + Entity + // DateTime when the entity is created. + createdDateTimeUtc *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Collection of all Autopilot devices as a part of this upload. + deviceIdentities []ImportedWindowsAutopilotDeviceIdentityable + // The status property + status *ImportedWindowsAutopilotDeviceIdentityUploadStatus +} +// NewImportedWindowsAutopilotDeviceIdentityUpload instantiates a new ImportedWindowsAutopilotDeviceIdentityUpload and sets the default values. +func NewImportedWindowsAutopilotDeviceIdentityUpload()(*ImportedWindowsAutopilotDeviceIdentityUpload) { + m := &ImportedWindowsAutopilotDeviceIdentityUpload{ + Entity: *NewEntity(), + } + return m +} +// CreateImportedWindowsAutopilotDeviceIdentityUploadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateImportedWindowsAutopilotDeviceIdentityUploadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewImportedWindowsAutopilotDeviceIdentityUpload(), nil +} +// GetCreatedDateTimeUtc gets the createdDateTimeUtc property value. DateTime when the entity is created. +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) GetCreatedDateTimeUtc()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTimeUtc +} +// GetDeviceIdentities gets the deviceIdentities property value. Collection of all Autopilot devices as a part of this upload. +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) GetDeviceIdentities()([]ImportedWindowsAutopilotDeviceIdentityable) { + return m.deviceIdentities +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTimeUtc"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTimeUtc(val) + } + return nil + } + res["deviceIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImportedWindowsAutopilotDeviceIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImportedWindowsAutopilotDeviceIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ImportedWindowsAutopilotDeviceIdentityable) + } + m.SetDeviceIdentities(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportedWindowsAutopilotDeviceIdentityUploadStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ImportedWindowsAutopilotDeviceIdentityUploadStatus)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) GetStatus()(*ImportedWindowsAutopilotDeviceIdentityUploadStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTimeUtc", m.GetCreatedDateTimeUtc()) + if err != nil { + return err + } + } + if m.GetDeviceIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceIdentities())) + for i, v := range m.GetDeviceIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceIdentities", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTimeUtc sets the createdDateTimeUtc property value. DateTime when the entity is created. +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) SetCreatedDateTimeUtc(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTimeUtc = value +} +// SetDeviceIdentities sets the deviceIdentities property value. Collection of all Autopilot devices as a part of this upload. +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) SetDeviceIdentities(value []ImportedWindowsAutopilotDeviceIdentityable)() { + m.deviceIdentities = value +} +// SetStatus sets the status property value. The status property +func (m *ImportedWindowsAutopilotDeviceIdentityUpload) SetStatus(value *ImportedWindowsAutopilotDeviceIdentityUploadStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload_status.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload_status.go new file mode 100644 index 000000000..2b1280fdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_upload_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ImportedWindowsAutopilotDeviceIdentityUploadStatus int + +const ( + // No upload status. + NOUPLOAD_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS ImportedWindowsAutopilotDeviceIdentityUploadStatus = iota + // Pending status. + PENDING_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + // Complete status. + COMPLETE_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + // Error status. + ERROR_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS +) + +func (i ImportedWindowsAutopilotDeviceIdentityUploadStatus) String() string { + return []string{"noUpload", "pending", "complete", "error"}[i] +} +func ParseImportedWindowsAutopilotDeviceIdentityUploadStatus(v string) (interface{}, error) { + result := NOUPLOAD_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + switch v { + case "noUpload": + result = NOUPLOAD_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + case "pending": + result = PENDING_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + case "complete": + result = COMPLETE_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + case "error": + result = ERROR_IMPORTEDWINDOWSAUTOPILOTDEVICEIDENTITYUPLOADSTATUS + default: + return 0, errors.New("Unknown ImportedWindowsAutopilotDeviceIdentityUploadStatus value: " + v) + } + return &result, nil +} +func SerializeImportedWindowsAutopilotDeviceIdentityUploadStatus(values []ImportedWindowsAutopilotDeviceIdentityUploadStatus) []string { + 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/imported_windows_autopilot_device_identity_uploadable.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_uploadable.go new file mode 100644 index 000000000..82e54b785 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identity_uploadable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityUploadable +type ImportedWindowsAutopilotDeviceIdentityUploadable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTimeUtc()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceIdentities()([]ImportedWindowsAutopilotDeviceIdentityable) + GetStatus()(*ImportedWindowsAutopilotDeviceIdentityUploadStatus) + SetCreatedDateTimeUtc(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceIdentities(value []ImportedWindowsAutopilotDeviceIdentityable)() + SetStatus(value *ImportedWindowsAutopilotDeviceIdentityUploadStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identityable.go b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identityable.go new file mode 100644 index 000000000..9b60823fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/imported_windows_autopilot_device_identityable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ImportedWindowsAutopilotDeviceIdentityable +type ImportedWindowsAutopilotDeviceIdentityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedUserPrincipalName()(*string) + GetGroupTag()(*string) + GetHardwareIdentifier()([]byte) + GetImportId()(*string) + GetProductKey()(*string) + GetSerialNumber()(*string) + GetState()(ImportedWindowsAutopilotDeviceIdentityStateable) + SetAssignedUserPrincipalName(value *string)() + SetGroupTag(value *string)() + SetHardwareIdentifier(value []byte)() + SetImportId(value *string)() + SetProductKey(value *string)() + SetSerialNumber(value *string)() + SetState(value ImportedWindowsAutopilotDeviceIdentityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configuration.go b/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configuration.go new file mode 100644 index 000000000..94c78d66e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configuration.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundOutboundPolicyConfiguration +type InboundOutboundPolicyConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines whether external users coming inbound are allowed. + inboundAllowed *bool + // The OdataType property + odataType *string + // Defines whether internal users are allowed to go outbound. + outboundAllowed *bool +} +// NewInboundOutboundPolicyConfiguration instantiates a new inboundOutboundPolicyConfiguration and sets the default values. +func NewInboundOutboundPolicyConfiguration()(*InboundOutboundPolicyConfiguration) { + m := &InboundOutboundPolicyConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInboundOutboundPolicyConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInboundOutboundPolicyConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInboundOutboundPolicyConfiguration(), 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 *InboundOutboundPolicyConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InboundOutboundPolicyConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["inboundAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInboundAllowed(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["outboundAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOutboundAllowed(val) + } + return nil + } + return res +} +// GetInboundAllowed gets the inboundAllowed property value. Defines whether external users coming inbound are allowed. +func (m *InboundOutboundPolicyConfiguration) GetInboundAllowed()(*bool) { + return m.inboundAllowed +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InboundOutboundPolicyConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetOutboundAllowed gets the outboundAllowed property value. Defines whether internal users are allowed to go outbound. +func (m *InboundOutboundPolicyConfiguration) GetOutboundAllowed()(*bool) { + return m.outboundAllowed +} +// Serialize serializes information the current object +func (m *InboundOutboundPolicyConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("inboundAllowed", m.GetInboundAllowed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("outboundAllowed", m.GetOutboundAllowed()) + 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 *InboundOutboundPolicyConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetInboundAllowed sets the inboundAllowed property value. Defines whether external users coming inbound are allowed. +func (m *InboundOutboundPolicyConfiguration) SetInboundAllowed(value *bool)() { + m.inboundAllowed = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InboundOutboundPolicyConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetOutboundAllowed sets the outboundAllowed property value. Defines whether internal users are allowed to go outbound. +func (m *InboundOutboundPolicyConfiguration) SetOutboundAllowed(value *bool)() { + m.outboundAllowed = value +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configurationable.go b/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configurationable.go new file mode 100644 index 000000000..7b586adbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_outbound_policy_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundOutboundPolicyConfigurationable +type InboundOutboundPolicyConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInboundAllowed()(*bool) + GetOdataType()(*string) + GetOutboundAllowed()(*bool) + SetInboundAllowed(value *bool)() + SetOdataType(value *string)() + SetOutboundAllowed(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile.go b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile.go new file mode 100644 index 000000000..587350bf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundSharedUserProfile +type InboundSharedUserProfile 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 displayName property + displayName *string + // The homeTenantId property + homeTenantId *string + // The OdataType property + odataType *string + // The userId property + userId *string + // The userPrincipalName property + userPrincipalName *string +} +// NewInboundSharedUserProfile instantiates a new inboundSharedUserProfile and sets the default values. +func NewInboundSharedUserProfile()(*InboundSharedUserProfile) { + m := &InboundSharedUserProfile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInboundSharedUserProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInboundSharedUserProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInboundSharedUserProfile(), 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 *InboundSharedUserProfile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *InboundSharedUserProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InboundSharedUserProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["homeTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomeTenantId(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["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetHomeTenantId gets the homeTenantId property value. The homeTenantId property +func (m *InboundSharedUserProfile) GetHomeTenantId()(*string) { + return m.homeTenantId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InboundSharedUserProfile) GetOdataType()(*string) { + return m.odataType +} +// GetUserId gets the userId property value. The userId property +func (m *InboundSharedUserProfile) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. The userPrincipalName property +func (m *InboundSharedUserProfile) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *InboundSharedUserProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("homeTenantId", m.GetHomeTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *InboundSharedUserProfile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *InboundSharedUserProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHomeTenantId sets the homeTenantId property value. The homeTenantId property +func (m *InboundSharedUserProfile) SetHomeTenantId(value *string)() { + m.homeTenantId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InboundSharedUserProfile) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserId sets the userId property value. The userId property +func (m *InboundSharedUserProfile) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The userPrincipalName property +func (m *InboundSharedUserProfile) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_response.go new file mode 100644 index 000000000..a2b798e2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundSharedUserProfileCollectionResponse +type InboundSharedUserProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InboundSharedUserProfileable +} +// NewInboundSharedUserProfileCollectionResponse instantiates a new InboundSharedUserProfileCollectionResponse and sets the default values. +func NewInboundSharedUserProfileCollectionResponse()(*InboundSharedUserProfileCollectionResponse) { + m := &InboundSharedUserProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInboundSharedUserProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInboundSharedUserProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInboundSharedUserProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InboundSharedUserProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInboundSharedUserProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InboundSharedUserProfileable, len(val)) + for i, v := range val { + res[i] = v.(InboundSharedUserProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InboundSharedUserProfileCollectionResponse) GetValue()([]InboundSharedUserProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *InboundSharedUserProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InboundSharedUserProfileCollectionResponse) SetValue(value []InboundSharedUserProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_responseable.go new file mode 100644 index 000000000..75c9e91d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundSharedUserProfileCollectionResponseable +type InboundSharedUserProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InboundSharedUserProfileable) + SetValue(value []InboundSharedUserProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/inbound_shared_user_profileable.go b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profileable.go new file mode 100644 index 000000000..35cb0021a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inbound_shared_user_profileable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InboundSharedUserProfileable +type InboundSharedUserProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetHomeTenantId()(*string) + GetOdataType()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + SetDisplayName(value *string)() + SetHomeTenantId(value *string)() + SetOdataType(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/include_all_account_target_content.go b/src/internal/connector/graph/betasdk/models/include_all_account_target_content.go new file mode 100644 index 000000000..79824a0e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/include_all_account_target_content.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncludeAllAccountTargetContent +type IncludeAllAccountTargetContent struct { + AccountTargetContent +} +// NewIncludeAllAccountTargetContent instantiates a new IncludeAllAccountTargetContent and sets the default values. +func NewIncludeAllAccountTargetContent()(*IncludeAllAccountTargetContent) { + m := &IncludeAllAccountTargetContent{ + AccountTargetContent: *NewAccountTargetContent(), + } + odataTypeValue := "#microsoft.graph.includeAllAccountTargetContent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIncludeAllAccountTargetContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncludeAllAccountTargetContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncludeAllAccountTargetContent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IncludeAllAccountTargetContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccountTargetContent.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IncludeAllAccountTargetContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccountTargetContent.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/include_all_account_target_contentable.go b/src/internal/connector/graph/betasdk/models/include_all_account_target_contentable.go new file mode 100644 index 000000000..a3404bd32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/include_all_account_target_contentable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncludeAllAccountTargetContentable +type IncludeAllAccountTargetContentable interface { + AccountTargetContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/incoming_call_options.go b/src/internal/connector/graph/betasdk/models/incoming_call_options.go new file mode 100644 index 000000000..8a2a8a66a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incoming_call_options.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncomingCallOptions +type IncomingCallOptions struct { + CallOptions +} +// NewIncomingCallOptions instantiates a new IncomingCallOptions and sets the default values. +func NewIncomingCallOptions()(*IncomingCallOptions) { + m := &IncomingCallOptions{ + CallOptions: *NewCallOptions(), + } + odataTypeValue := "#microsoft.graph.incomingCallOptions"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIncomingCallOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncomingCallOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncomingCallOptions(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IncomingCallOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CallOptions.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IncomingCallOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CallOptions.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/incoming_call_optionsable.go b/src/internal/connector/graph/betasdk/models/incoming_call_optionsable.go new file mode 100644 index 000000000..e02cb554e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incoming_call_optionsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncomingCallOptionsable +type IncomingCallOptionsable interface { + CallOptionsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/incoming_context.go b/src/internal/connector/graph/betasdk/models/incoming_context.go new file mode 100644 index 000000000..0b152347d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incoming_context.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncomingContext +type IncomingContext 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 id of the participant that is under observation. Read-only. + observedParticipantId *string + // The OdataType property + odataType *string + // The identity that the call is happening on behalf of. + onBehalfOf IdentitySetable + // The id of the participant that triggered the incoming call. Read-only. + sourceParticipantId *string + // The identity that transferred the call. + transferor IdentitySetable +} +// NewIncomingContext instantiates a new incomingContext and sets the default values. +func NewIncomingContext()(*IncomingContext) { + m := &IncomingContext{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIncomingContextFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncomingContextFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncomingContext(), 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 *IncomingContext) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IncomingContext) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["observedParticipantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObservedParticipantId(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["onBehalfOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOnBehalfOf(val.(IdentitySetable)) + } + return nil + } + res["sourceParticipantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceParticipantId(val) + } + return nil + } + res["transferor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTransferor(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetObservedParticipantId gets the observedParticipantId property value. The id of the participant that is under observation. Read-only. +func (m *IncomingContext) GetObservedParticipantId()(*string) { + return m.observedParticipantId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IncomingContext) GetOdataType()(*string) { + return m.odataType +} +// GetOnBehalfOf gets the onBehalfOf property value. The identity that the call is happening on behalf of. +func (m *IncomingContext) GetOnBehalfOf()(IdentitySetable) { + return m.onBehalfOf +} +// GetSourceParticipantId gets the sourceParticipantId property value. The id of the participant that triggered the incoming call. Read-only. +func (m *IncomingContext) GetSourceParticipantId()(*string) { + return m.sourceParticipantId +} +// GetTransferor gets the transferor property value. The identity that transferred the call. +func (m *IncomingContext) GetTransferor()(IdentitySetable) { + return m.transferor +} +// Serialize serializes information the current object +func (m *IncomingContext) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("observedParticipantId", m.GetObservedParticipantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("onBehalfOf", m.GetOnBehalfOf()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceParticipantId", m.GetSourceParticipantId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("transferor", m.GetTransferor()) + 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 *IncomingContext) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetObservedParticipantId sets the observedParticipantId property value. The id of the participant that is under observation. Read-only. +func (m *IncomingContext) SetObservedParticipantId(value *string)() { + m.observedParticipantId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IncomingContext) SetOdataType(value *string)() { + m.odataType = value +} +// SetOnBehalfOf sets the onBehalfOf property value. The identity that the call is happening on behalf of. +func (m *IncomingContext) SetOnBehalfOf(value IdentitySetable)() { + m.onBehalfOf = value +} +// SetSourceParticipantId sets the sourceParticipantId property value. The id of the participant that triggered the incoming call. Read-only. +func (m *IncomingContext) SetSourceParticipantId(value *string)() { + m.sourceParticipantId = value +} +// SetTransferor sets the transferor property value. The identity that transferred the call. +func (m *IncomingContext) SetTransferor(value IdentitySetable)() { + m.transferor = value +} diff --git a/src/internal/connector/graph/betasdk/models/incoming_contextable.go b/src/internal/connector/graph/betasdk/models/incoming_contextable.go new file mode 100644 index 000000000..781e82e73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incoming_contextable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncomingContextable +type IncomingContextable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetObservedParticipantId()(*string) + GetOdataType()(*string) + GetOnBehalfOf()(IdentitySetable) + GetSourceParticipantId()(*string) + GetTransferor()(IdentitySetable) + SetObservedParticipantId(value *string)() + SetOdataType(value *string)() + SetOnBehalfOf(value IdentitySetable)() + SetSourceParticipantId(value *string)() + SetTransferor(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/incoming_token_type.go b/src/internal/connector/graph/betasdk/models/incoming_token_type.go new file mode 100644 index 000000000..29242e7d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incoming_token_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IncomingTokenType int + +const ( + NONE_INCOMINGTOKENTYPE IncomingTokenType = iota + PRIMARYREFRESHTOKEN_INCOMINGTOKENTYPE + SAML11_INCOMINGTOKENTYPE + SAML20_INCOMINGTOKENTYPE + UNKNOWNFUTUREVALUE_INCOMINGTOKENTYPE + REMOTEDESKTOPTOKEN_INCOMINGTOKENTYPE +) + +func (i IncomingTokenType) String() string { + return []string{"none", "primaryRefreshToken", "saml11", "saml20", "unknownFutureValue", "remoteDesktopToken"}[i] +} +func ParseIncomingTokenType(v string) (interface{}, error) { + result := NONE_INCOMINGTOKENTYPE + switch v { + case "none": + result = NONE_INCOMINGTOKENTYPE + case "primaryRefreshToken": + result = PRIMARYREFRESHTOKEN_INCOMINGTOKENTYPE + case "saml11": + result = SAML11_INCOMINGTOKENTYPE + case "saml20": + result = SAML20_INCOMINGTOKENTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INCOMINGTOKENTYPE + case "remoteDesktopToken": + result = REMOTEDESKTOPTOKEN_INCOMINGTOKENTYPE + default: + return 0, errors.New("Unknown IncomingTokenType value: " + v) + } + return &result, nil +} +func SerializeIncomingTokenType(values []IncomingTokenType) []string { + 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/incomplete_data.go b/src/internal/connector/graph/betasdk/models/incomplete_data.go new file mode 100644 index 000000000..c6dbd1b51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incomplete_data.go @@ -0,0 +1,124 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncompleteData +type IncompleteData 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 service does not have source data before the specified time. + missingDataBeforeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Some data was not recorded due to excessive activity. + wasThrottled *bool +} +// NewIncompleteData instantiates a new incompleteData and sets the default values. +func NewIncompleteData()(*IncompleteData) { + m := &IncompleteData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIncompleteDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncompleteDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncompleteData(), 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 *IncompleteData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IncompleteData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["missingDataBeforeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMissingDataBeforeDateTime(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["wasThrottled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWasThrottled(val) + } + return nil + } + return res +} +// GetMissingDataBeforeDateTime gets the missingDataBeforeDateTime property value. The service does not have source data before the specified time. +func (m *IncompleteData) GetMissingDataBeforeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.missingDataBeforeDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IncompleteData) GetOdataType()(*string) { + return m.odataType +} +// GetWasThrottled gets the wasThrottled property value. Some data was not recorded due to excessive activity. +func (m *IncompleteData) GetWasThrottled()(*bool) { + return m.wasThrottled +} +// Serialize serializes information the current object +func (m *IncompleteData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("missingDataBeforeDateTime", m.GetMissingDataBeforeDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("wasThrottled", m.GetWasThrottled()) + 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 *IncompleteData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMissingDataBeforeDateTime sets the missingDataBeforeDateTime property value. The service does not have source data before the specified time. +func (m *IncompleteData) SetMissingDataBeforeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.missingDataBeforeDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IncompleteData) SetOdataType(value *string)() { + m.odataType = value +} +// SetWasThrottled sets the wasThrottled property value. Some data was not recorded due to excessive activity. +func (m *IncompleteData) SetWasThrottled(value *bool)() { + m.wasThrottled = value +} diff --git a/src/internal/connector/graph/betasdk/models/incomplete_dataable.go b/src/internal/connector/graph/betasdk/models/incomplete_dataable.go new file mode 100644 index 000000000..df9c4afaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/incomplete_dataable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IncompleteDataable +type IncompleteDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMissingDataBeforeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetWasThrottled()(*bool) + SetMissingDataBeforeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetWasThrottled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification.go b/src/internal/connector/graph/betasdk/models/inference_classification.go new file mode 100644 index 000000000..75b498055 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassification +type InferenceClassification struct { + Entity + // A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. + overrides []InferenceClassificationOverrideable +} +// NewInferenceClassification instantiates a new inferenceClassification and sets the default values. +func NewInferenceClassification()(*InferenceClassification) { + m := &InferenceClassification{ + Entity: *NewEntity(), + } + return m +} +// CreateInferenceClassificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInferenceClassificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInferenceClassification(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InferenceClassification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["overrides"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInferenceClassificationOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InferenceClassificationOverrideable, len(val)) + for i, v := range val { + res[i] = v.(InferenceClassificationOverrideable) + } + m.SetOverrides(res) + } + return nil + } + return res +} +// GetOverrides gets the overrides property value. A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. +func (m *InferenceClassification) GetOverrides()([]InferenceClassificationOverrideable) { + return m.overrides +} +// Serialize serializes information the current object +func (m *InferenceClassification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetOverrides() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOverrides())) + for i, v := range m.GetOverrides() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("overrides", cast) + if err != nil { + return err + } + } + return nil +} +// SetOverrides sets the overrides property value. A set of overrides for a user to always classify messages from specific senders in certain ways: focused, or other. Read-only. Nullable. +func (m *InferenceClassification) SetOverrides(value []InferenceClassificationOverrideable)() { + m.overrides = value +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification_override.go b/src/internal/connector/graph/betasdk/models/inference_classification_override.go new file mode 100644 index 000000000..4e26b5f22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification_override.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassificationOverride provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InferenceClassificationOverride struct { + Entity + // Specifies how incoming messages from a specific sender should always be classified as. Possible values are: focused, other. + classifyAs *InferenceClassificationType + // The email address information of the sender for whom the override is created. + senderEmailAddress EmailAddressable +} +// NewInferenceClassificationOverride instantiates a new inferenceClassificationOverride and sets the default values. +func NewInferenceClassificationOverride()(*InferenceClassificationOverride) { + m := &InferenceClassificationOverride{ + Entity: *NewEntity(), + } + return m +} +// CreateInferenceClassificationOverrideFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInferenceClassificationOverrideFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInferenceClassificationOverride(), nil +} +// GetClassifyAs gets the classifyAs property value. Specifies how incoming messages from a specific sender should always be classified as. Possible values are: focused, other. +func (m *InferenceClassificationOverride) GetClassifyAs()(*InferenceClassificationType) { + return m.classifyAs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InferenceClassificationOverride) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["classifyAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInferenceClassificationType) + if err != nil { + return err + } + if val != nil { + m.SetClassifyAs(val.(*InferenceClassificationType)) + } + return nil + } + res["senderEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSenderEmailAddress(val.(EmailAddressable)) + } + return nil + } + return res +} +// GetSenderEmailAddress gets the senderEmailAddress property value. The email address information of the sender for whom the override is created. +func (m *InferenceClassificationOverride) GetSenderEmailAddress()(EmailAddressable) { + return m.senderEmailAddress +} +// Serialize serializes information the current object +func (m *InferenceClassificationOverride) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClassifyAs() != nil { + cast := (*m.GetClassifyAs()).String() + err = writer.WriteStringValue("classifyAs", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("senderEmailAddress", m.GetSenderEmailAddress()) + if err != nil { + return err + } + } + return nil +} +// SetClassifyAs sets the classifyAs property value. Specifies how incoming messages from a specific sender should always be classified as. Possible values are: focused, other. +func (m *InferenceClassificationOverride) SetClassifyAs(value *InferenceClassificationType)() { + m.classifyAs = value +} +// SetSenderEmailAddress sets the senderEmailAddress property value. The email address information of the sender for whom the override is created. +func (m *InferenceClassificationOverride) SetSenderEmailAddress(value EmailAddressable)() { + m.senderEmailAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_response.go b/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_response.go new file mode 100644 index 000000000..5a5ee5954 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassificationOverrideCollectionResponse +type InferenceClassificationOverrideCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InferenceClassificationOverrideable +} +// NewInferenceClassificationOverrideCollectionResponse instantiates a new InferenceClassificationOverrideCollectionResponse and sets the default values. +func NewInferenceClassificationOverrideCollectionResponse()(*InferenceClassificationOverrideCollectionResponse) { + m := &InferenceClassificationOverrideCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInferenceClassificationOverrideCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInferenceClassificationOverrideCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInferenceClassificationOverrideCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InferenceClassificationOverrideCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInferenceClassificationOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InferenceClassificationOverrideable, len(val)) + for i, v := range val { + res[i] = v.(InferenceClassificationOverrideable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InferenceClassificationOverrideCollectionResponse) GetValue()([]InferenceClassificationOverrideable) { + return m.value +} +// Serialize serializes information the current object +func (m *InferenceClassificationOverrideCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InferenceClassificationOverrideCollectionResponse) SetValue(value []InferenceClassificationOverrideable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_responseable.go b/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_responseable.go new file mode 100644 index 000000000..b4b19e944 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification_override_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassificationOverrideCollectionResponseable +type InferenceClassificationOverrideCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InferenceClassificationOverrideable) + SetValue(value []InferenceClassificationOverrideable)() +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification_overrideable.go b/src/internal/connector/graph/betasdk/models/inference_classification_overrideable.go new file mode 100644 index 000000000..bca849cb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification_overrideable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassificationOverrideable +type InferenceClassificationOverrideable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassifyAs()(*InferenceClassificationType) + GetSenderEmailAddress()(EmailAddressable) + SetClassifyAs(value *InferenceClassificationType)() + SetSenderEmailAddress(value EmailAddressable)() +} diff --git a/src/internal/connector/graph/betasdk/models/inference_classification_type.go b/src/internal/connector/graph/betasdk/models/inference_classification_type.go new file mode 100644 index 000000000..b1e10cfd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classification_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InferenceClassificationType int + +const ( + FOCUSED_INFERENCECLASSIFICATIONTYPE InferenceClassificationType = iota + OTHER_INFERENCECLASSIFICATIONTYPE +) + +func (i InferenceClassificationType) String() string { + return []string{"focused", "other"}[i] +} +func ParseInferenceClassificationType(v string) (interface{}, error) { + result := FOCUSED_INFERENCECLASSIFICATIONTYPE + switch v { + case "focused": + result = FOCUSED_INFERENCECLASSIFICATIONTYPE + case "other": + result = OTHER_INFERENCECLASSIFICATIONTYPE + default: + return 0, errors.New("Unknown InferenceClassificationType value: " + v) + } + return &result, nil +} +func SerializeInferenceClassificationType(values []InferenceClassificationType) []string { + 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/inference_classificationable.go b/src/internal/connector/graph/betasdk/models/inference_classificationable.go new file mode 100644 index 000000000..bf268ccec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_classificationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceClassificationable +type InferenceClassificationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOverrides()([]InferenceClassificationOverrideable) + SetOverrides(value []InferenceClassificationOverrideable)() +} diff --git a/src/internal/connector/graph/betasdk/models/inference_data.go b/src/internal/connector/graph/betasdk/models/inference_data.go new file mode 100644 index 000000000..3640a1406 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_data.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceData +type InferenceData struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Confidence score reflecting the accuracy of the data inferred about the user. + confidenceScore *float64 + // The OdataType property + odataType *string + // Records if the user has confirmed this inference as being True or False. + userHasVerifiedAccuracy *bool +} +// NewInferenceData instantiates a new inferenceData and sets the default values. +func NewInferenceData()(*InferenceData) { + m := &InferenceData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInferenceDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInferenceDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInferenceData(), 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 *InferenceData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidenceScore gets the confidenceScore property value. Confidence score reflecting the accuracy of the data inferred about the user. +func (m *InferenceData) GetConfidenceScore()(*float64) { + return m.confidenceScore +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InferenceData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidenceScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidenceScore(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["userHasVerifiedAccuracy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserHasVerifiedAccuracy(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InferenceData) GetOdataType()(*string) { + return m.odataType +} +// GetUserHasVerifiedAccuracy gets the userHasVerifiedAccuracy property value. Records if the user has confirmed this inference as being True or False. +func (m *InferenceData) GetUserHasVerifiedAccuracy()(*bool) { + return m.userHasVerifiedAccuracy +} +// Serialize serializes information the current object +func (m *InferenceData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("confidenceScore", m.GetConfidenceScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("userHasVerifiedAccuracy", m.GetUserHasVerifiedAccuracy()) + 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 *InferenceData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidenceScore sets the confidenceScore property value. Confidence score reflecting the accuracy of the data inferred about the user. +func (m *InferenceData) SetConfidenceScore(value *float64)() { + m.confidenceScore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InferenceData) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserHasVerifiedAccuracy sets the userHasVerifiedAccuracy property value. Records if the user has confirmed this inference as being True or False. +func (m *InferenceData) SetUserHasVerifiedAccuracy(value *bool)() { + m.userHasVerifiedAccuracy = value +} diff --git a/src/internal/connector/graph/betasdk/models/inference_dataable.go b/src/internal/connector/graph/betasdk/models/inference_dataable.go new file mode 100644 index 000000000..815dfd2fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/inference_dataable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InferenceDataable +type InferenceDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidenceScore()(*float64) + GetOdataType()(*string) + GetUserHasVerifiedAccuracy()(*bool) + SetConfidenceScore(value *float64)() + SetOdataType(value *string)() + SetUserHasVerifiedAccuracy(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection.go b/src/internal/connector/graph/betasdk/models/information_protection.go new file mode 100644 index 000000000..da4f27dfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection.go @@ -0,0 +1,214 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtection +type InformationProtection struct { + Entity + // The bitlocker property + bitlocker Bitlockerable + // The dataLossPreventionPolicies property + dataLossPreventionPolicies []DataLossPreventionPolicyable + // The policy property + policy InformationProtectionPolicyable + // The sensitivityLabels property + sensitivityLabels []SensitivityLabelable + // The sensitivityPolicySettings property + sensitivityPolicySettings SensitivityPolicySettingsable + // The threatAssessmentRequests property + threatAssessmentRequests []ThreatAssessmentRequestable +} +// NewInformationProtection instantiates a new informationProtection and sets the default values. +func NewInformationProtection()(*InformationProtection) { + m := &InformationProtection{ + Entity: *NewEntity(), + } + return m +} +// CreateInformationProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtection(), nil +} +// GetBitlocker gets the bitlocker property value. The bitlocker property +func (m *InformationProtection) GetBitlocker()(Bitlockerable) { + return m.bitlocker +} +// GetDataLossPreventionPolicies gets the dataLossPreventionPolicies property value. The dataLossPreventionPolicies property +func (m *InformationProtection) GetDataLossPreventionPolicies()([]DataLossPreventionPolicyable) { + return m.dataLossPreventionPolicies +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["bitlocker"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBitlockerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBitlocker(val.(Bitlockerable)) + } + return nil + } + res["dataLossPreventionPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataLossPreventionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataLossPreventionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(DataLossPreventionPolicyable) + } + m.SetDataLossPreventionPolicies(res) + } + return nil + } + res["policy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationProtectionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPolicy(val.(InformationProtectionPolicyable)) + } + return nil + } + res["sensitivityLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetSensitivityLabels(res) + } + return nil + } + res["sensitivityPolicySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSensitivityPolicySettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSensitivityPolicySettings(val.(SensitivityPolicySettingsable)) + } + return nil + } + res["threatAssessmentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateThreatAssessmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ThreatAssessmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(ThreatAssessmentRequestable) + } + m.SetThreatAssessmentRequests(res) + } + return nil + } + return res +} +// GetPolicy gets the policy property value. The policy property +func (m *InformationProtection) GetPolicy()(InformationProtectionPolicyable) { + return m.policy +} +// GetSensitivityLabels gets the sensitivityLabels property value. The sensitivityLabels property +func (m *InformationProtection) GetSensitivityLabels()([]SensitivityLabelable) { + return m.sensitivityLabels +} +// GetSensitivityPolicySettings gets the sensitivityPolicySettings property value. The sensitivityPolicySettings property +func (m *InformationProtection) GetSensitivityPolicySettings()(SensitivityPolicySettingsable) { + return m.sensitivityPolicySettings +} +// GetThreatAssessmentRequests gets the threatAssessmentRequests property value. The threatAssessmentRequests property +func (m *InformationProtection) GetThreatAssessmentRequests()([]ThreatAssessmentRequestable) { + return m.threatAssessmentRequests +} +// Serialize serializes information the current object +func (m *InformationProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("bitlocker", m.GetBitlocker()) + if err != nil { + return err + } + } + if m.GetDataLossPreventionPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDataLossPreventionPolicies())) + for i, v := range m.GetDataLossPreventionPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dataLossPreventionPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("policy", m.GetPolicy()) + if err != nil { + return err + } + } + if m.GetSensitivityLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSensitivityLabels())) + for i, v := range m.GetSensitivityLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sensitivityLabels", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sensitivityPolicySettings", m.GetSensitivityPolicySettings()) + if err != nil { + return err + } + } + if m.GetThreatAssessmentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetThreatAssessmentRequests())) + for i, v := range m.GetThreatAssessmentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("threatAssessmentRequests", cast) + if err != nil { + return err + } + } + return nil +} +// SetBitlocker sets the bitlocker property value. The bitlocker property +func (m *InformationProtection) SetBitlocker(value Bitlockerable)() { + m.bitlocker = value +} +// SetDataLossPreventionPolicies sets the dataLossPreventionPolicies property value. The dataLossPreventionPolicies property +func (m *InformationProtection) SetDataLossPreventionPolicies(value []DataLossPreventionPolicyable)() { + m.dataLossPreventionPolicies = value +} +// SetPolicy sets the policy property value. The policy property +func (m *InformationProtection) SetPolicy(value InformationProtectionPolicyable)() { + m.policy = value +} +// SetSensitivityLabels sets the sensitivityLabels property value. The sensitivityLabels property +func (m *InformationProtection) SetSensitivityLabels(value []SensitivityLabelable)() { + m.sensitivityLabels = value +} +// SetSensitivityPolicySettings sets the sensitivityPolicySettings property value. The sensitivityPolicySettings property +func (m *InformationProtection) SetSensitivityPolicySettings(value SensitivityPolicySettingsable)() { + m.sensitivityPolicySettings = value +} +// SetThreatAssessmentRequests sets the threatAssessmentRequests property value. The threatAssessmentRequests property +func (m *InformationProtection) SetThreatAssessmentRequests(value []ThreatAssessmentRequestable)() { + m.threatAssessmentRequests = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_action.go b/src/internal/connector/graph/betasdk/models/information_protection_action.go new file mode 100644 index 000000000..1163c3e72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_action.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionAction +type InformationProtectionAction 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 OdataType property + odataType *string +} +// NewInformationProtectionAction instantiates a new informationProtectionAction and sets the default values. +func NewInformationProtectionAction()(*InformationProtectionAction) { + m := &InformationProtectionAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInformationProtectionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.addContentFooterAction": + return NewAddContentFooterAction(), nil + case "#microsoft.graph.addContentHeaderAction": + return NewAddContentHeaderAction(), nil + case "#microsoft.graph.addWatermarkAction": + return NewAddWatermarkAction(), nil + case "#microsoft.graph.applyLabelAction": + return NewApplyLabelAction(), nil + case "#microsoft.graph.customAction": + return NewCustomAction(), nil + case "#microsoft.graph.justifyAction": + return NewJustifyAction(), nil + case "#microsoft.graph.metadataAction": + return NewMetadataAction(), nil + case "#microsoft.graph.protectAdhocAction": + return NewProtectAdhocAction(), nil + case "#microsoft.graph.protectByTemplateAction": + return NewProtectByTemplateAction(), nil + case "#microsoft.graph.protectDoNotForwardAction": + return NewProtectDoNotForwardAction(), nil + case "#microsoft.graph.recommendLabelAction": + return NewRecommendLabelAction(), nil + case "#microsoft.graph.removeContentFooterAction": + return NewRemoveContentFooterAction(), nil + case "#microsoft.graph.removeContentHeaderAction": + return NewRemoveContentHeaderAction(), nil + case "#microsoft.graph.removeProtectionAction": + return NewRemoveProtectionAction(), nil + case "#microsoft.graph.removeWatermarkAction": + return NewRemoveWatermarkAction(), nil + } + } + } + } + return NewInformationProtectionAction(), 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 *InformationProtectionAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InformationProtectionAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *InformationProtectionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *InformationProtectionAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InformationProtectionAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_action_collection_response.go b/src/internal/connector/graph/betasdk/models/information_protection_action_collection_response.go new file mode 100644 index 000000000..3751ce058 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionActionCollectionResponse +type InformationProtectionActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InformationProtectionActionable +} +// NewInformationProtectionActionCollectionResponse instantiates a new InformationProtectionActionCollectionResponse and sets the default values. +func NewInformationProtectionActionCollectionResponse()(*InformationProtectionActionCollectionResponse) { + m := &InformationProtectionActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInformationProtectionActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InformationProtectionActionCollectionResponse) GetValue()([]InformationProtectionActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *InformationProtectionActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InformationProtectionActionCollectionResponse) SetValue(value []InformationProtectionActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/information_protection_action_collection_responseable.go new file mode 100644 index 000000000..a7d1f449b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionActionCollectionResponseable +type InformationProtectionActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InformationProtectionActionable) + SetValue(value []InformationProtectionActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_actionable.go b/src/internal/connector/graph/betasdk/models/information_protection_actionable.go new file mode 100644 index 000000000..d379165ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionActionable +type InformationProtectionActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_content_label.go b/src/internal/connector/graph/betasdk/models/information_protection_content_label.go new file mode 100644 index 000000000..6b746c48a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_content_label.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionContentLabel +type InformationProtectionContentLabel 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 assignmentMethod property + assignmentMethod *AssignmentMethod + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Details on the label that is currently applied to the file. + label LabelDetailsable + // The OdataType property + odataType *string +} +// NewInformationProtectionContentLabel instantiates a new informationProtectionContentLabel and sets the default values. +func NewInformationProtectionContentLabel()(*InformationProtectionContentLabel) { + m := &InformationProtectionContentLabel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInformationProtectionContentLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionContentLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionContentLabel(), 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 *InformationProtectionContentLabel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentMethod gets the assignmentMethod property value. The assignmentMethod property +func (m *InformationProtectionContentLabel) GetAssignmentMethod()(*AssignmentMethod) { + return m.assignmentMethod +} +// GetCreationDateTime gets the creationDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *InformationProtectionContentLabel) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionContentLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssignmentMethod) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentMethod(val.(*AssignmentMethod)) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLabelDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(LabelDetailsable)) + } + 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 + } + return res +} +// GetLabel gets the label property value. Details on the label that is currently applied to the file. +func (m *InformationProtectionContentLabel) GetLabel()(LabelDetailsable) { + return m.label +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InformationProtectionContentLabel) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *InformationProtectionContentLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentMethod() != nil { + cast := (*m.GetAssignmentMethod()).String() + err := writer.WriteStringValue("assignmentMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *InformationProtectionContentLabel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentMethod sets the assignmentMethod property value. The assignmentMethod property +func (m *InformationProtectionContentLabel) SetAssignmentMethod(value *AssignmentMethod)() { + m.assignmentMethod = value +} +// SetCreationDateTime sets the creationDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *InformationProtectionContentLabel) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetLabel sets the label property value. Details on the label that is currently applied to the file. +func (m *InformationProtectionContentLabel) SetLabel(value LabelDetailsable)() { + m.label = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InformationProtectionContentLabel) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_content_labelable.go b/src/internal/connector/graph/betasdk/models/information_protection_content_labelable.go new file mode 100644 index 000000000..f7b1c8291 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_content_labelable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionContentLabelable +type InformationProtectionContentLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentMethod()(*AssignmentMethod) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLabel()(LabelDetailsable) + GetOdataType()(*string) + SetAssignmentMethod(value *AssignmentMethod)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLabel(value LabelDetailsable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_label.go b/src/internal/connector/graph/betasdk/models/information_protection_label.go new file mode 100644 index 000000000..ac277cc78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_label.go @@ -0,0 +1,216 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionLabel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InformationProtectionLabel struct { + Entity + // The color that the UI should display for the label, if configured. + color *string + // The admin-defined description for the label. + description *string + // Indicates whether the label is active or not. Active labels should be hidden or disabled in UI. + isActive *bool + // The plaintext name of the label. + name *string + // The parent label associated with a child label. Null if label has no parent. + parent ParentLabelDetailsable + // The sensitivity value of the label, where lower is less sensitive. + sensitivity *int32 + // The tooltip that should be displayed for the label in a UI. + tooltip *string +} +// NewInformationProtectionLabel instantiates a new informationProtectionLabel and sets the default values. +func NewInformationProtectionLabel()(*InformationProtectionLabel) { + m := &InformationProtectionLabel{ + Entity: *NewEntity(), + } + return m +} +// CreateInformationProtectionLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionLabel(), nil +} +// GetColor gets the color property value. The color that the UI should display for the label, if configured. +func (m *InformationProtectionLabel) GetColor()(*string) { + return m.color +} +// GetDescription gets the description property value. The admin-defined description for the label. +func (m *InformationProtectionLabel) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParentLabelDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(ParentLabelDetailsable)) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val) + } + return nil + } + res["tooltip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTooltip(val) + } + return nil + } + return res +} +// GetIsActive gets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in UI. +func (m *InformationProtectionLabel) GetIsActive()(*bool) { + return m.isActive +} +// GetName gets the name property value. The plaintext name of the label. +func (m *InformationProtectionLabel) GetName()(*string) { + return m.name +} +// GetParent gets the parent property value. The parent label associated with a child label. Null if label has no parent. +func (m *InformationProtectionLabel) GetParent()(ParentLabelDetailsable) { + return m.parent +} +// GetSensitivity gets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *InformationProtectionLabel) GetSensitivity()(*int32) { + return m.sensitivity +} +// GetTooltip gets the tooltip property value. The tooltip that should be displayed for the label in a UI. +func (m *InformationProtectionLabel) GetTooltip()(*string) { + return m.tooltip +} +// Serialize serializes information the current object +func (m *InformationProtectionLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sensitivity", m.GetSensitivity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tooltip", m.GetTooltip()) + if err != nil { + return err + } + } + return nil +} +// SetColor sets the color property value. The color that the UI should display for the label, if configured. +func (m *InformationProtectionLabel) SetColor(value *string)() { + m.color = value +} +// SetDescription sets the description property value. The admin-defined description for the label. +func (m *InformationProtectionLabel) SetDescription(value *string)() { + m.description = value +} +// SetIsActive sets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in UI. +func (m *InformationProtectionLabel) SetIsActive(value *bool)() { + m.isActive = value +} +// SetName sets the name property value. The plaintext name of the label. +func (m *InformationProtectionLabel) SetName(value *string)() { + m.name = value +} +// SetParent sets the parent property value. The parent label associated with a child label. Null if label has no parent. +func (m *InformationProtectionLabel) SetParent(value ParentLabelDetailsable)() { + m.parent = value +} +// SetSensitivity sets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *InformationProtectionLabel) SetSensitivity(value *int32)() { + m.sensitivity = value +} +// SetTooltip sets the tooltip property value. The tooltip that should be displayed for the label in a UI. +func (m *InformationProtectionLabel) SetTooltip(value *string)() { + m.tooltip = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_label_collection_response.go b/src/internal/connector/graph/betasdk/models/information_protection_label_collection_response.go new file mode 100644 index 000000000..46a90e76e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_label_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionLabelCollectionResponse +type InformationProtectionLabelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InformationProtectionLabelable +} +// NewInformationProtectionLabelCollectionResponse instantiates a new InformationProtectionLabelCollectionResponse and sets the default values. +func NewInformationProtectionLabelCollectionResponse()(*InformationProtectionLabelCollectionResponse) { + m := &InformationProtectionLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInformationProtectionLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionLabelable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InformationProtectionLabelCollectionResponse) GetValue()([]InformationProtectionLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *InformationProtectionLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InformationProtectionLabelCollectionResponse) SetValue(value []InformationProtectionLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_label_collection_responseable.go b/src/internal/connector/graph/betasdk/models/information_protection_label_collection_responseable.go new file mode 100644 index 000000000..ed16ad9c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_label_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionLabelCollectionResponseable +type InformationProtectionLabelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InformationProtectionLabelable) + SetValue(value []InformationProtectionLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_labelable.go b/src/internal/connector/graph/betasdk/models/information_protection_labelable.go new file mode 100644 index 000000000..72e52d1a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_labelable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionLabelable +type InformationProtectionLabelable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDescription()(*string) + GetIsActive()(*bool) + GetName()(*string) + GetParent()(ParentLabelDetailsable) + GetSensitivity()(*int32) + GetTooltip()(*string) + SetColor(value *string)() + SetDescription(value *string)() + SetIsActive(value *bool)() + SetName(value *string)() + SetParent(value ParentLabelDetailsable)() + SetSensitivity(value *int32)() + SetTooltip(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_policy.go b/src/internal/connector/graph/betasdk/models/information_protection_policy.go new file mode 100644 index 000000000..a11f0198b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_policy.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionPolicy +type InformationProtectionPolicy struct { + Entity + // The labels property + labels []InformationProtectionLabelable +} +// NewInformationProtectionPolicy instantiates a new informationProtectionPolicy and sets the default values. +func NewInformationProtectionPolicy()(*InformationProtectionPolicy) { + m := &InformationProtectionPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateInformationProtectionPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionLabelable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionLabelable) + } + m.SetLabels(res) + } + return nil + } + return res +} +// GetLabels gets the labels property value. The labels property +func (m *InformationProtectionPolicy) GetLabels()([]InformationProtectionLabelable) { + return m.labels +} +// Serialize serializes information the current object +func (m *InformationProtectionPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabels())) + for i, v := range m.GetLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("labels", cast) + if err != nil { + return err + } + } + return nil +} +// SetLabels sets the labels property value. The labels property +func (m *InformationProtectionPolicy) SetLabels(value []InformationProtectionLabelable)() { + m.labels = value +} diff --git a/src/internal/connector/graph/betasdk/models/information_protection_policyable.go b/src/internal/connector/graph/betasdk/models/information_protection_policyable.go new file mode 100644 index 000000000..74b9af891 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protection_policyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionPolicyable +type InformationProtectionPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabels()([]InformationProtectionLabelable) + SetLabels(value []InformationProtectionLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/information_protectionable.go b/src/internal/connector/graph/betasdk/models/information_protectionable.go new file mode 100644 index 000000000..c7d291b88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/information_protectionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionable +type InformationProtectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBitlocker()(Bitlockerable) + GetDataLossPreventionPolicies()([]DataLossPreventionPolicyable) + GetPolicy()(InformationProtectionPolicyable) + GetSensitivityLabels()([]SensitivityLabelable) + GetSensitivityPolicySettings()(SensitivityPolicySettingsable) + GetThreatAssessmentRequests()([]ThreatAssessmentRequestable) + SetBitlocker(value Bitlockerable)() + SetDataLossPreventionPolicies(value []DataLossPreventionPolicyable)() + SetPolicy(value InformationProtectionPolicyable)() + SetSensitivityLabels(value []SensitivityLabelable)() + SetSensitivityPolicySettings(value SensitivityPolicySettingsable)() + SetThreatAssessmentRequests(value []ThreatAssessmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/informational_url.go b/src/internal/connector/graph/betasdk/models/informational_url.go new file mode 100644 index 000000000..552c0d8f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/informational_url.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationalUrl +type InformationalUrl struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // CDN URL to the application's logo, Read-only. + logoUrl *string + // Link to the application's marketing page. For example, https://www.contoso.com/app/marketing + marketingUrl *string + // The OdataType property + odataType *string + // Link to the application's privacy statement. For example, https://www.contoso.com/app/privacy + privacyStatementUrl *string + // Link to the application's support page. For example, https://www.contoso.com/app/support + supportUrl *string + // Link to the application's terms of service statement. For example, https://www.contoso.com/app/termsofservice + termsOfServiceUrl *string +} +// NewInformationalUrl instantiates a new informationalUrl and sets the default values. +func NewInformationalUrl()(*InformationalUrl) { + m := &InformationalUrl{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInformationalUrlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationalUrlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationalUrl(), 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 *InformationalUrl) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationalUrl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["logoUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogoUrl(val) + } + return nil + } + res["marketingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMarketingUrl(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["privacyStatementUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyStatementUrl(val) + } + return nil + } + res["supportUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportUrl(val) + } + return nil + } + res["termsOfServiceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsOfServiceUrl(val) + } + return nil + } + return res +} +// GetLogoUrl gets the logoUrl property value. CDN URL to the application's logo, Read-only. +func (m *InformationalUrl) GetLogoUrl()(*string) { + return m.logoUrl +} +// GetMarketingUrl gets the marketingUrl property value. Link to the application's marketing page. For example, https://www.contoso.com/app/marketing +func (m *InformationalUrl) GetMarketingUrl()(*string) { + return m.marketingUrl +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InformationalUrl) GetOdataType()(*string) { + return m.odataType +} +// GetPrivacyStatementUrl gets the privacyStatementUrl property value. Link to the application's privacy statement. For example, https://www.contoso.com/app/privacy +func (m *InformationalUrl) GetPrivacyStatementUrl()(*string) { + return m.privacyStatementUrl +} +// GetSupportUrl gets the supportUrl property value. Link to the application's support page. For example, https://www.contoso.com/app/support +func (m *InformationalUrl) GetSupportUrl()(*string) { + return m.supportUrl +} +// GetTermsOfServiceUrl gets the termsOfServiceUrl property value. Link to the application's terms of service statement. For example, https://www.contoso.com/app/termsofservice +func (m *InformationalUrl) GetTermsOfServiceUrl()(*string) { + return m.termsOfServiceUrl +} +// Serialize serializes information the current object +func (m *InformationalUrl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("logoUrl", m.GetLogoUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("marketingUrl", m.GetMarketingUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacyStatementUrl", m.GetPrivacyStatementUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("supportUrl", m.GetSupportUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("termsOfServiceUrl", m.GetTermsOfServiceUrl()) + 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 *InformationalUrl) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLogoUrl sets the logoUrl property value. CDN URL to the application's logo, Read-only. +func (m *InformationalUrl) SetLogoUrl(value *string)() { + m.logoUrl = value +} +// SetMarketingUrl sets the marketingUrl property value. Link to the application's marketing page. For example, https://www.contoso.com/app/marketing +func (m *InformationalUrl) SetMarketingUrl(value *string)() { + m.marketingUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InformationalUrl) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrivacyStatementUrl sets the privacyStatementUrl property value. Link to the application's privacy statement. For example, https://www.contoso.com/app/privacy +func (m *InformationalUrl) SetPrivacyStatementUrl(value *string)() { + m.privacyStatementUrl = value +} +// SetSupportUrl sets the supportUrl property value. Link to the application's support page. For example, https://www.contoso.com/app/support +func (m *InformationalUrl) SetSupportUrl(value *string)() { + m.supportUrl = value +} +// SetTermsOfServiceUrl sets the termsOfServiceUrl property value. Link to the application's terms of service statement. For example, https://www.contoso.com/app/termsofservice +func (m *InformationalUrl) SetTermsOfServiceUrl(value *string)() { + m.termsOfServiceUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/informational_urlable.go b/src/internal/connector/graph/betasdk/models/informational_urlable.go new file mode 100644 index 000000000..89fb4a757 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/informational_urlable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationalUrlable +type InformationalUrlable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLogoUrl()(*string) + GetMarketingUrl()(*string) + GetOdataType()(*string) + GetPrivacyStatementUrl()(*string) + GetSupportUrl()(*string) + GetTermsOfServiceUrl()(*string) + SetLogoUrl(value *string)() + SetMarketingUrl(value *string)() + SetOdataType(value *string)() + SetPrivacyStatementUrl(value *string)() + SetSupportUrl(value *string)() + SetTermsOfServiceUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/informational_urls.go b/src/internal/connector/graph/betasdk/models/informational_urls.go new file mode 100644 index 000000000..47d877a42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/informational_urls.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationalUrls +type InformationalUrls 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 appSignUpUrl property + appSignUpUrl *string + // The OdataType property + odataType *string + // The singleSignOnDocumentationUrl property + singleSignOnDocumentationUrl *string +} +// NewInformationalUrls instantiates a new informationalUrls and sets the default values. +func NewInformationalUrls()(*InformationalUrls) { + m := &InformationalUrls{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInformationalUrlsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationalUrlsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationalUrls(), 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 *InformationalUrls) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppSignUpUrl gets the appSignUpUrl property value. The appSignUpUrl property +func (m *InformationalUrls) GetAppSignUpUrl()(*string) { + return m.appSignUpUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationalUrls) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appSignUpUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppSignUpUrl(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["singleSignOnDocumentationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnDocumentationUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InformationalUrls) GetOdataType()(*string) { + return m.odataType +} +// GetSingleSignOnDocumentationUrl gets the singleSignOnDocumentationUrl property value. The singleSignOnDocumentationUrl property +func (m *InformationalUrls) GetSingleSignOnDocumentationUrl()(*string) { + return m.singleSignOnDocumentationUrl +} +// Serialize serializes information the current object +func (m *InformationalUrls) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appSignUpUrl", m.GetAppSignUpUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("singleSignOnDocumentationUrl", m.GetSingleSignOnDocumentationUrl()) + 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 *InformationalUrls) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppSignUpUrl sets the appSignUpUrl property value. The appSignUpUrl property +func (m *InformationalUrls) SetAppSignUpUrl(value *string)() { + m.appSignUpUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InformationalUrls) SetOdataType(value *string)() { + m.odataType = value +} +// SetSingleSignOnDocumentationUrl sets the singleSignOnDocumentationUrl property value. The singleSignOnDocumentationUrl property +func (m *InformationalUrls) SetSingleSignOnDocumentationUrl(value *string)() { + m.singleSignOnDocumentationUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/informational_urlsable.go b/src/internal/connector/graph/betasdk/models/informational_urlsable.go new file mode 100644 index 000000000..699fd47a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/informational_urlsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationalUrlsable +type InformationalUrlsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppSignUpUrl()(*string) + GetOdataType()(*string) + GetSingleSignOnDocumentationUrl()(*string) + SetAppSignUpUrl(value *string)() + SetOdataType(value *string)() + SetSingleSignOnDocumentationUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ingestion_source.go b/src/internal/connector/graph/betasdk/models/ingestion_source.go new file mode 100644 index 000000000..65f84fb2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ingestion_source.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IngestionSource int + +const ( + // Indicates unknown category + UNKNOWN_INGESTIONSOURCE IngestionSource = iota + // Indicates the category is ingested by IT admin with sufficient permissions through custom ingestion process + CUSTOM_INGESTIONSOURCE + // Indicates the category is ingested through system ingestion process + BUILTIN_INGESTIONSOURCE + // Unknown future enum value + UNKNOWNFUTUREVALUE_INGESTIONSOURCE +) + +func (i IngestionSource) String() string { + return []string{"unknown", "custom", "builtIn", "unknownFutureValue"}[i] +} +func ParseIngestionSource(v string) (interface{}, error) { + result := UNKNOWN_INGESTIONSOURCE + switch v { + case "unknown": + result = UNKNOWN_INGESTIONSOURCE + case "custom": + result = CUSTOM_INGESTIONSOURCE + case "builtIn": + result = BUILTIN_INGESTIONSOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INGESTIONSOURCE + default: + return 0, errors.New("Unknown IngestionSource value: " + v) + } + return &result, nil +} +func SerializeIngestionSource(values []IngestionSource) []string { + 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/initiator.go b/src/internal/connector/graph/betasdk/models/initiator.go new file mode 100644 index 000000000..7110764e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/initiator.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Initiator +type Initiator struct { + Identity + // Type of initiator. Possible values are: user, application, system, unknownFutureValue. + initiatorType *InitiatorType +} +// NewInitiator instantiates a new Initiator and sets the default values. +func NewInitiator()(*Initiator) { + m := &Initiator{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.initiator"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInitiatorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInitiatorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInitiator(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Initiator) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["initiatorType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInitiatorType) + if err != nil { + return err + } + if val != nil { + m.SetInitiatorType(val.(*InitiatorType)) + } + return nil + } + return res +} +// GetInitiatorType gets the initiatorType property value. Type of initiator. Possible values are: user, application, system, unknownFutureValue. +func (m *Initiator) GetInitiatorType()(*InitiatorType) { + return m.initiatorType +} +// Serialize serializes information the current object +func (m *Initiator) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + if m.GetInitiatorType() != nil { + cast := (*m.GetInitiatorType()).String() + err = writer.WriteStringValue("initiatorType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetInitiatorType sets the initiatorType property value. Type of initiator. Possible values are: user, application, system, unknownFutureValue. +func (m *Initiator) SetInitiatorType(value *InitiatorType)() { + m.initiatorType = value +} diff --git a/src/internal/connector/graph/betasdk/models/initiator_type.go b/src/internal/connector/graph/betasdk/models/initiator_type.go new file mode 100644 index 000000000..54a1e0440 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/initiator_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InitiatorType int + +const ( + USER_INITIATORTYPE InitiatorType = iota + APPLICATION_INITIATORTYPE + SYSTEM_INITIATORTYPE + UNKNOWNFUTUREVALUE_INITIATORTYPE +) + +func (i InitiatorType) String() string { + return []string{"user", "application", "system", "unknownFutureValue"}[i] +} +func ParseInitiatorType(v string) (interface{}, error) { + result := USER_INITIATORTYPE + switch v { + case "user": + result = USER_INITIATORTYPE + case "application": + result = APPLICATION_INITIATORTYPE + case "system": + result = SYSTEM_INITIATORTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INITIATORTYPE + default: + return 0, errors.New("Unknown InitiatorType value: " + v) + } + return &result, nil +} +func SerializeInitiatorType(values []InitiatorType) []string { + 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/initiatorable.go b/src/internal/connector/graph/betasdk/models/initiatorable.go new file mode 100644 index 000000000..8589a8e5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/initiatorable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Initiatorable +type Initiatorable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiatorType()(*InitiatorType) + SetInitiatorType(value *InitiatorType)() +} diff --git a/src/internal/connector/graph/betasdk/models/ink_access_setting.go b/src/internal/connector/graph/betasdk/models/ink_access_setting.go new file mode 100644 index 000000000..2fac49230 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ink_access_setting.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InkAccessSetting int + +const ( + // Not configured. + NOTCONFIGURED_INKACCESSSETTING InkAccessSetting = iota + // Enabled. + ENABLED_INKACCESSSETTING + // Disabled. + DISABLED_INKACCESSSETTING +) + +func (i InkAccessSetting) String() string { + return []string{"notConfigured", "enabled", "disabled"}[i] +} +func ParseInkAccessSetting(v string) (interface{}, error) { + result := NOTCONFIGURED_INKACCESSSETTING + switch v { + case "notConfigured": + result = NOTCONFIGURED_INKACCESSSETTING + case "enabled": + result = ENABLED_INKACCESSSETTING + case "disabled": + result = DISABLED_INKACCESSSETTING + default: + return 0, errors.New("Unknown InkAccessSetting value: " + v) + } + return &result, nil +} +func SerializeInkAccessSetting(values []InkAccessSetting) []string { + 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/insight_identity.go b/src/internal/connector/graph/betasdk/models/insight_identity.go new file mode 100644 index 000000000..3cc804b56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_identity.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightIdentity +type InsightIdentity 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 email address of the user who shared the item. + address *string + // The display name of the user who shared the item. + displayName *string + // The id of the user who shared the item. + id *string + // The OdataType property + odataType *string +} +// NewInsightIdentity instantiates a new insightIdentity and sets the default values. +func NewInsightIdentity()(*InsightIdentity) { + m := &InsightIdentity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInsightIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInsightIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInsightIdentity(), 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 *InsightIdentity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddress gets the address property value. The email address of the user who shared the item. +func (m *InsightIdentity) GetAddress()(*string) { + return m.address +} +// GetDisplayName gets the displayName property value. The display name of the user who shared the item. +func (m *InsightIdentity) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InsightIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddress(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The id of the user who shared the item. +func (m *InsightIdentity) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InsightIdentity) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *InsightIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *InsightIdentity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddress sets the address property value. The email address of the user who shared the item. +func (m *InsightIdentity) SetAddress(value *string)() { + m.address = value +} +// SetDisplayName sets the displayName property value. The display name of the user who shared the item. +func (m *InsightIdentity) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. The id of the user who shared the item. +func (m *InsightIdentity) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InsightIdentity) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/insight_identityable.go b/src/internal/connector/graph/betasdk/models/insight_identityable.go new file mode 100644 index 000000000..cf5e60ba2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_identityable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightIdentityable +type InsightIdentityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(*string) + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + SetAddress(value *string)() + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/insight_value_double.go b/src/internal/connector/graph/betasdk/models/insight_value_double.go new file mode 100644 index 000000000..1968c4c6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_value_double.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightValueDouble +type InsightValueDouble struct { + UserExperienceAnalyticsInsightValue + // Not yet documented + value *float64 +} +// NewInsightValueDouble instantiates a new InsightValueDouble and sets the default values. +func NewInsightValueDouble()(*InsightValueDouble) { + m := &InsightValueDouble{ + UserExperienceAnalyticsInsightValue: *NewUserExperienceAnalyticsInsightValue(), + } + odataTypeValue := "#microsoft.graph.insightValueDouble"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInsightValueDoubleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInsightValueDoubleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInsightValueDouble(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InsightValueDouble) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserExperienceAnalyticsInsightValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Not yet documented +func (m *InsightValueDouble) GetValue()(*float64) { + return m.value +} +// Serialize serializes information the current object +func (m *InsightValueDouble) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserExperienceAnalyticsInsightValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat64Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Not yet documented +func (m *InsightValueDouble) SetValue(value *float64)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/insight_value_doubleable.go b/src/internal/connector/graph/betasdk/models/insight_value_doubleable.go new file mode 100644 index 000000000..e47159393 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_value_doubleable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightValueDoubleable +type InsightValueDoubleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserExperienceAnalyticsInsightValueable + GetValue()(*float64) + SetValue(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/insight_value_int.go b/src/internal/connector/graph/betasdk/models/insight_value_int.go new file mode 100644 index 000000000..f33d3ea00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_value_int.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightValueInt +type InsightValueInt struct { + UserExperienceAnalyticsInsightValue + // Not yet documented + value *int32 +} +// NewInsightValueInt instantiates a new InsightValueInt and sets the default values. +func NewInsightValueInt()(*InsightValueInt) { + m := &InsightValueInt{ + UserExperienceAnalyticsInsightValue: *NewUserExperienceAnalyticsInsightValue(), + } + odataTypeValue := "#microsoft.graph.insightValueInt"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInsightValueIntFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInsightValueIntFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInsightValueInt(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InsightValueInt) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserExperienceAnalyticsInsightValue.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Not yet documented +func (m *InsightValueInt) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *InsightValueInt) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserExperienceAnalyticsInsightValue.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Not yet documented +func (m *InsightValueInt) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/insight_value_intable.go b/src/internal/connector/graph/betasdk/models/insight_value_intable.go new file mode 100644 index 000000000..641a826b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insight_value_intable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightValueIntable +type InsightValueIntable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserExperienceAnalyticsInsightValueable + GetValue()(*int32) + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/insights_settings.go b/src/internal/connector/graph/betasdk/models/insights_settings.go new file mode 100644 index 000000000..535a044b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insights_settings.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightsSettings +type InsightsSettings struct { + Entity + // The ID of an Azure Active Directory group, of which the specified type of insights are disabled for its members. Default is empty. Optional. + disabledForGroup *string + // true if the specified type of insights are enabled for the organization; false if the specified type of insights are disabled for all users without exceptions. Default is true. Optional. + isEnabledInOrganization *bool +} +// NewInsightsSettings instantiates a new insightsSettings and sets the default values. +func NewInsightsSettings()(*InsightsSettings) { + m := &InsightsSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateInsightsSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInsightsSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInsightsSettings(), nil +} +// GetDisabledForGroup gets the disabledForGroup property value. The ID of an Azure Active Directory group, of which the specified type of insights are disabled for its members. Default is empty. Optional. +func (m *InsightsSettings) GetDisabledForGroup()(*string) { + return m.disabledForGroup +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InsightsSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["disabledForGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabledForGroup(val) + } + return nil + } + res["isEnabledInOrganization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabledInOrganization(val) + } + return nil + } + return res +} +// GetIsEnabledInOrganization gets the isEnabledInOrganization property value. true if the specified type of insights are enabled for the organization; false if the specified type of insights are disabled for all users without exceptions. Default is true. Optional. +func (m *InsightsSettings) GetIsEnabledInOrganization()(*bool) { + return m.isEnabledInOrganization +} +// Serialize serializes information the current object +func (m *InsightsSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("disabledForGroup", m.GetDisabledForGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabledInOrganization", m.GetIsEnabledInOrganization()) + if err != nil { + return err + } + } + return nil +} +// SetDisabledForGroup sets the disabledForGroup property value. The ID of an Azure Active Directory group, of which the specified type of insights are disabled for its members. Default is empty. Optional. +func (m *InsightsSettings) SetDisabledForGroup(value *string)() { + m.disabledForGroup = value +} +// SetIsEnabledInOrganization sets the isEnabledInOrganization property value. true if the specified type of insights are enabled for the organization; false if the specified type of insights are disabled for all users without exceptions. Default is true. Optional. +func (m *InsightsSettings) SetIsEnabledInOrganization(value *bool)() { + m.isEnabledInOrganization = value +} diff --git a/src/internal/connector/graph/betasdk/models/insights_settingsable.go b/src/internal/connector/graph/betasdk/models/insights_settingsable.go new file mode 100644 index 000000000..7a7ff8542 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/insights_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InsightsSettingsable +type InsightsSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisabledForGroup()(*string) + GetIsEnabledInOrganization()(*bool) + SetDisabledForGroup(value *string)() + SetIsEnabledInOrganization(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/install_intent.go b/src/internal/connector/graph/betasdk/models/install_intent.go new file mode 100644 index 000000000..3d4831375 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/install_intent.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InstallIntent int + +const ( + // Available install intent. + AVAILABLE_INSTALLINTENT InstallIntent = iota + // Required install intent. + REQUIRED_INSTALLINTENT + // Uninstall install intent. + UNINSTALL_INSTALLINTENT + // Available without enrollment install intent. + AVAILABLEWITHOUTENROLLMENT_INSTALLINTENT +) + +func (i InstallIntent) String() string { + return []string{"available", "required", "uninstall", "availableWithoutEnrollment"}[i] +} +func ParseInstallIntent(v string) (interface{}, error) { + result := AVAILABLE_INSTALLINTENT + switch v { + case "available": + result = AVAILABLE_INSTALLINTENT + case "required": + result = REQUIRED_INSTALLINTENT + case "uninstall": + result = UNINSTALL_INSTALLINTENT + case "availableWithoutEnrollment": + result = AVAILABLEWITHOUTENROLLMENT_INSTALLINTENT + default: + return 0, errors.New("Unknown InstallIntent value: " + v) + } + return &result, nil +} +func SerializeInstallIntent(values []InstallIntent) []string { + 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/install_state.go b/src/internal/connector/graph/betasdk/models/install_state.go new file mode 100644 index 000000000..0a2a7b77f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/install_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InstallState int + +const ( + // Not Applicable. + NOTAPPLICABLE_INSTALLSTATE InstallState = iota + // Installed. + INSTALLED_INSTALLSTATE + // Failed. + FAILED_INSTALLSTATE + // Not Installed. + NOTINSTALLED_INSTALLSTATE + // Uninstall Failed. + UNINSTALLFAILED_INSTALLSTATE + // Unknown. + UNKNOWN_INSTALLSTATE +) + +func (i InstallState) String() string { + return []string{"notApplicable", "installed", "failed", "notInstalled", "uninstallFailed", "unknown"}[i] +} +func ParseInstallState(v string) (interface{}, error) { + result := NOTAPPLICABLE_INSTALLSTATE + switch v { + case "notApplicable": + result = NOTAPPLICABLE_INSTALLSTATE + case "installed": + result = INSTALLED_INSTALLSTATE + case "failed": + result = FAILED_INSTALLSTATE + case "notInstalled": + result = NOTINSTALLED_INSTALLSTATE + case "uninstallFailed": + result = UNINSTALLFAILED_INSTALLSTATE + case "unknown": + result = UNKNOWN_INSTALLSTATE + default: + return 0, errors.New("Unknown InstallState value: " + v) + } + return &result, nil +} +func SerializeInstallState(values []InstallState) []string { + 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/institution_data.go b/src/internal/connector/graph/betasdk/models/institution_data.go new file mode 100644 index 000000000..cf84be341 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/institution_data.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InstitutionData +type InstitutionData struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Short description of the institution the user studied at. + description *string + // Name of the institution the user studied at. + displayName *string + // Address or location of the institute. + location PhysicalAddressable + // The OdataType property + odataType *string + // Link to the institution or department homepage. + webUrl *string +} +// NewInstitutionData instantiates a new institutionData and sets the default values. +func NewInstitutionData()(*InstitutionData) { + m := &InstitutionData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInstitutionDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInstitutionDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInstitutionData(), 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 *InstitutionData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Short description of the institution the user studied at. +func (m *InstitutionData) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the institution the user studied at. +func (m *InstitutionData) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InstitutionData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(PhysicalAddressable)) + } + 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["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetLocation gets the location property value. Address or location of the institute. +func (m *InstitutionData) GetLocation()(PhysicalAddressable) { + return m.location +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InstitutionData) GetOdataType()(*string) { + return m.odataType +} +// GetWebUrl gets the webUrl property value. Link to the institution or department homepage. +func (m *InstitutionData) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *InstitutionData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *InstitutionData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Short description of the institution the user studied at. +func (m *InstitutionData) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the institution the user studied at. +func (m *InstitutionData) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLocation sets the location property value. Address or location of the institute. +func (m *InstitutionData) SetLocation(value PhysicalAddressable)() { + m.location = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InstitutionData) SetOdataType(value *string)() { + m.odataType = value +} +// SetWebUrl sets the webUrl property value. Link to the institution or department homepage. +func (m *InstitutionData) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/institution_dataable.go b/src/internal/connector/graph/betasdk/models/institution_dataable.go new file mode 100644 index 000000000..b17bd3c4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/institution_dataable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InstitutionDataable +type InstitutionDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetLocation()(PhysicalAddressable) + GetOdataType()(*string) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLocation(value PhysicalAddressable)() + SetOdataType(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/integer_range.go b/src/internal/connector/graph/betasdk/models/integer_range.go new file mode 100644 index 000000000..88ba6bb16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/integer_range.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntegerRange +type IntegerRange 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 inclusive upper bound of the integer range. + end *int64 + // The maximum property + maximum *int64 + // The minimum property + minimum *int64 + // The OdataType property + odataType *string + // The inclusive lower bound of the integer range. + start *int64 +} +// NewIntegerRange instantiates a new integerRange and sets the default values. +func NewIntegerRange()(*IntegerRange) { + m := &IntegerRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIntegerRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntegerRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntegerRange(), 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 *IntegerRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnd gets the end property value. The inclusive upper bound of the integer range. +func (m *IntegerRange) GetEnd()(*int64) { + return m.end +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntegerRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["end"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetEnd(val) + } + return nil + } + res["maximum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximum(val) + } + return nil + } + res["minimum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimum(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["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetStart(val) + } + return nil + } + return res +} +// GetMaximum gets the maximum property value. The maximum property +func (m *IntegerRange) GetMaximum()(*int64) { + return m.maximum +} +// GetMinimum gets the minimum property value. The minimum property +func (m *IntegerRange) GetMinimum()(*int64) { + return m.minimum +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IntegerRange) GetOdataType()(*string) { + return m.odataType +} +// GetStart gets the start property value. The inclusive lower bound of the integer range. +func (m *IntegerRange) GetStart()(*int64) { + return m.start +} +// Serialize serializes information the current object +func (m *IntegerRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("end", m.GetEnd()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("maximum", m.GetMaximum()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("minimum", m.GetMinimum()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("start", m.GetStart()) + 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 *IntegerRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnd sets the end property value. The inclusive upper bound of the integer range. +func (m *IntegerRange) SetEnd(value *int64)() { + m.end = value +} +// SetMaximum sets the maximum property value. The maximum property +func (m *IntegerRange) SetMaximum(value *int64)() { + m.maximum = value +} +// SetMinimum sets the minimum property value. The minimum property +func (m *IntegerRange) SetMinimum(value *int64)() { + m.minimum = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IntegerRange) SetOdataType(value *string)() { + m.odataType = value +} +// SetStart sets the start property value. The inclusive lower bound of the integer range. +func (m *IntegerRange) SetStart(value *int64)() { + m.start = value +} diff --git a/src/internal/connector/graph/betasdk/models/integer_range_collection_response.go b/src/internal/connector/graph/betasdk/models/integer_range_collection_response.go new file mode 100644 index 000000000..b3a1105e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/integer_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntegerRangeCollectionResponse +type IntegerRangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IntegerRangeable +} +// NewIntegerRangeCollectionResponse instantiates a new IntegerRangeCollectionResponse and sets the default values. +func NewIntegerRangeCollectionResponse()(*IntegerRangeCollectionResponse) { + m := &IntegerRangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIntegerRangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntegerRangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntegerRangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntegerRangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntegerRangeable, len(val)) + for i, v := range val { + res[i] = v.(IntegerRangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IntegerRangeCollectionResponse) GetValue()([]IntegerRangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IntegerRangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IntegerRangeCollectionResponse) SetValue(value []IntegerRangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/integer_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/integer_range_collection_responseable.go new file mode 100644 index 000000000..f222511bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/integer_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntegerRangeCollectionResponseable +type IntegerRangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IntegerRangeable) + SetValue(value []IntegerRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/integer_rangeable.go b/src/internal/connector/graph/betasdk/models/integer_rangeable.go new file mode 100644 index 000000000..8fa58e829 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/integer_rangeable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntegerRangeable +type IntegerRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnd()(*int64) + GetMaximum()(*int64) + GetMinimum()(*int64) + GetOdataType()(*string) + GetStart()(*int64) + SetEnd(value *int64)() + SetMaximum(value *int64)() + SetMinimum(value *int64)() + SetOdataType(value *string)() + SetStart(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/intended_purpose.go b/src/internal/connector/graph/betasdk/models/intended_purpose.go new file mode 100644 index 000000000..0c8e708e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intended_purpose.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IntendedPurpose int + +const ( + // Unassigned + UNASSIGNED_INTENDEDPURPOSE IntendedPurpose = iota + // SmimeEncryption + SMIMEENCRYPTION_INTENDEDPURPOSE + // SmimeSigning + SMIMESIGNING_INTENDEDPURPOSE + // VPN + VPN_INTENDEDPURPOSE + // Wifi + WIFI_INTENDEDPURPOSE +) + +func (i IntendedPurpose) String() string { + return []string{"unassigned", "smimeEncryption", "smimeSigning", "vpn", "wifi"}[i] +} +func ParseIntendedPurpose(v string) (interface{}, error) { + result := UNASSIGNED_INTENDEDPURPOSE + switch v { + case "unassigned": + result = UNASSIGNED_INTENDEDPURPOSE + case "smimeEncryption": + result = SMIMEENCRYPTION_INTENDEDPURPOSE + case "smimeSigning": + result = SMIMESIGNING_INTENDEDPURPOSE + case "vpn": + result = VPN_INTENDEDPURPOSE + case "wifi": + result = WIFI_INTENDEDPURPOSE + default: + return 0, errors.New("Unknown IntendedPurpose value: " + v) + } + return &result, nil +} +func SerializeIntendedPurpose(values []IntendedPurpose) []string { + 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/internal_domain_federation.go b/src/internal/connector/graph/betasdk/models/internal_domain_federation.go new file mode 100644 index 000000000..8ed5c3e6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_domain_federation.go @@ -0,0 +1,220 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalDomainFederation +type InternalDomainFederation struct { + SamlOrWsFedProvider + // URL of the endpoint used by active clients when authenticating with federated domains set up for single sign-on in Azure Active Directory (Azure AD). Corresponds to the ActiveLogOnUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. + activeSignInUri *string + // Determines whether Azure AD accepts the MFA performed by the federated IdP when a federated user accesses an application that is governed by a conditional access policy that requires MFA. The possible values are: acceptIfMfaDoneByFederatedIdp, enforceMfaByFederatedIdp, rejectMfaByFederatedIdp, unknownFutureValue. For more information, see federatedIdpMfaBehavior values. + federatedIdpMfaBehavior *FederatedIdpMfaBehavior + // If true, when SAML authentication requests are sent to the federated SAML IdP, Azure AD will sign those requests using the OrgID signing key. If false (default), the SAML authentication requests sent to the federated IdP are not signed. + isSignedAuthenticationRequestRequired *bool + // Fallback token signing certificate that is used to sign tokens when the primary signing certificate expires. Formatted as Base64 encoded strings of the public portion of the federated IdP's token signing certificate. Needs to be compatible with the X509Certificate2 class. Much like the signingCertificate, the nextSigningCertificate property is used if a rollover is required outside of the auto-rollover update, a new federation service is being set up, or if the new token signing certificate is not present in the federation properties after the federation service certificate has been updated. + nextSigningCertificate *string + // Sets the preferred behavior for the sign-in prompt. The possible values are: translateToFreshPasswordAuthentication, nativeSupport, disabled, unknownFutureValue. + promptLoginBehavior *PromptLoginBehavior + // Provides status and timestamp of the last update of the signing certificate. + signingCertificateUpdateStatus SigningCertificateUpdateStatusable + // URI that clients are redirected to when they sign out of Azure AD services. Corresponds to the LogOffUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. + signOutUri *string +} +// NewInternalDomainFederation instantiates a new InternalDomainFederation and sets the default values. +func NewInternalDomainFederation()(*InternalDomainFederation) { + m := &InternalDomainFederation{ + SamlOrWsFedProvider: *NewSamlOrWsFedProvider(), + } + odataTypeValue := "#microsoft.graph.internalDomainFederation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInternalDomainFederationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternalDomainFederationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternalDomainFederation(), nil +} +// GetActiveSignInUri gets the activeSignInUri property value. URL of the endpoint used by active clients when authenticating with federated domains set up for single sign-on in Azure Active Directory (Azure AD). Corresponds to the ActiveLogOnUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. +func (m *InternalDomainFederation) GetActiveSignInUri()(*string) { + return m.activeSignInUri +} +// GetFederatedIdpMfaBehavior gets the federatedIdpMfaBehavior property value. Determines whether Azure AD accepts the MFA performed by the federated IdP when a federated user accesses an application that is governed by a conditional access policy that requires MFA. The possible values are: acceptIfMfaDoneByFederatedIdp, enforceMfaByFederatedIdp, rejectMfaByFederatedIdp, unknownFutureValue. For more information, see federatedIdpMfaBehavior values. +func (m *InternalDomainFederation) GetFederatedIdpMfaBehavior()(*FederatedIdpMfaBehavior) { + return m.federatedIdpMfaBehavior +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternalDomainFederation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SamlOrWsFedProvider.GetFieldDeserializers() + res["activeSignInUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveSignInUri(val) + } + return nil + } + res["federatedIdpMfaBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFederatedIdpMfaBehavior) + if err != nil { + return err + } + if val != nil { + m.SetFederatedIdpMfaBehavior(val.(*FederatedIdpMfaBehavior)) + } + return nil + } + res["isSignedAuthenticationRequestRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSignedAuthenticationRequestRequired(val) + } + return nil + } + res["nextSigningCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNextSigningCertificate(val) + } + return nil + } + res["promptLoginBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePromptLoginBehavior) + if err != nil { + return err + } + if val != nil { + m.SetPromptLoginBehavior(val.(*PromptLoginBehavior)) + } + return nil + } + res["signingCertificateUpdateStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSigningCertificateUpdateStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSigningCertificateUpdateStatus(val.(SigningCertificateUpdateStatusable)) + } + return nil + } + res["signOutUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignOutUri(val) + } + return nil + } + return res +} +// GetIsSignedAuthenticationRequestRequired gets the isSignedAuthenticationRequestRequired property value. If true, when SAML authentication requests are sent to the federated SAML IdP, Azure AD will sign those requests using the OrgID signing key. If false (default), the SAML authentication requests sent to the federated IdP are not signed. +func (m *InternalDomainFederation) GetIsSignedAuthenticationRequestRequired()(*bool) { + return m.isSignedAuthenticationRequestRequired +} +// GetNextSigningCertificate gets the nextSigningCertificate property value. Fallback token signing certificate that is used to sign tokens when the primary signing certificate expires. Formatted as Base64 encoded strings of the public portion of the federated IdP's token signing certificate. Needs to be compatible with the X509Certificate2 class. Much like the signingCertificate, the nextSigningCertificate property is used if a rollover is required outside of the auto-rollover update, a new federation service is being set up, or if the new token signing certificate is not present in the federation properties after the federation service certificate has been updated. +func (m *InternalDomainFederation) GetNextSigningCertificate()(*string) { + return m.nextSigningCertificate +} +// GetPromptLoginBehavior gets the promptLoginBehavior property value. Sets the preferred behavior for the sign-in prompt. The possible values are: translateToFreshPasswordAuthentication, nativeSupport, disabled, unknownFutureValue. +func (m *InternalDomainFederation) GetPromptLoginBehavior()(*PromptLoginBehavior) { + return m.promptLoginBehavior +} +// GetSigningCertificateUpdateStatus gets the signingCertificateUpdateStatus property value. Provides status and timestamp of the last update of the signing certificate. +func (m *InternalDomainFederation) GetSigningCertificateUpdateStatus()(SigningCertificateUpdateStatusable) { + return m.signingCertificateUpdateStatus +} +// GetSignOutUri gets the signOutUri property value. URI that clients are redirected to when they sign out of Azure AD services. Corresponds to the LogOffUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. +func (m *InternalDomainFederation) GetSignOutUri()(*string) { + return m.signOutUri +} +// Serialize serializes information the current object +func (m *InternalDomainFederation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SamlOrWsFedProvider.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activeSignInUri", m.GetActiveSignInUri()) + if err != nil { + return err + } + } + if m.GetFederatedIdpMfaBehavior() != nil { + cast := (*m.GetFederatedIdpMfaBehavior()).String() + err = writer.WriteStringValue("federatedIdpMfaBehavior", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSignedAuthenticationRequestRequired", m.GetIsSignedAuthenticationRequestRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("nextSigningCertificate", m.GetNextSigningCertificate()) + if err != nil { + return err + } + } + if m.GetPromptLoginBehavior() != nil { + cast := (*m.GetPromptLoginBehavior()).String() + err = writer.WriteStringValue("promptLoginBehavior", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("signingCertificateUpdateStatus", m.GetSigningCertificateUpdateStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signOutUri", m.GetSignOutUri()) + if err != nil { + return err + } + } + return nil +} +// SetActiveSignInUri sets the activeSignInUri property value. URL of the endpoint used by active clients when authenticating with federated domains set up for single sign-on in Azure Active Directory (Azure AD). Corresponds to the ActiveLogOnUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. +func (m *InternalDomainFederation) SetActiveSignInUri(value *string)() { + m.activeSignInUri = value +} +// SetFederatedIdpMfaBehavior sets the federatedIdpMfaBehavior property value. Determines whether Azure AD accepts the MFA performed by the federated IdP when a federated user accesses an application that is governed by a conditional access policy that requires MFA. The possible values are: acceptIfMfaDoneByFederatedIdp, enforceMfaByFederatedIdp, rejectMfaByFederatedIdp, unknownFutureValue. For more information, see federatedIdpMfaBehavior values. +func (m *InternalDomainFederation) SetFederatedIdpMfaBehavior(value *FederatedIdpMfaBehavior)() { + m.federatedIdpMfaBehavior = value +} +// SetIsSignedAuthenticationRequestRequired sets the isSignedAuthenticationRequestRequired property value. If true, when SAML authentication requests are sent to the federated SAML IdP, Azure AD will sign those requests using the OrgID signing key. If false (default), the SAML authentication requests sent to the federated IdP are not signed. +func (m *InternalDomainFederation) SetIsSignedAuthenticationRequestRequired(value *bool)() { + m.isSignedAuthenticationRequestRequired = value +} +// SetNextSigningCertificate sets the nextSigningCertificate property value. Fallback token signing certificate that is used to sign tokens when the primary signing certificate expires. Formatted as Base64 encoded strings of the public portion of the federated IdP's token signing certificate. Needs to be compatible with the X509Certificate2 class. Much like the signingCertificate, the nextSigningCertificate property is used if a rollover is required outside of the auto-rollover update, a new federation service is being set up, or if the new token signing certificate is not present in the federation properties after the federation service certificate has been updated. +func (m *InternalDomainFederation) SetNextSigningCertificate(value *string)() { + m.nextSigningCertificate = value +} +// SetPromptLoginBehavior sets the promptLoginBehavior property value. Sets the preferred behavior for the sign-in prompt. The possible values are: translateToFreshPasswordAuthentication, nativeSupport, disabled, unknownFutureValue. +func (m *InternalDomainFederation) SetPromptLoginBehavior(value *PromptLoginBehavior)() { + m.promptLoginBehavior = value +} +// SetSigningCertificateUpdateStatus sets the signingCertificateUpdateStatus property value. Provides status and timestamp of the last update of the signing certificate. +func (m *InternalDomainFederation) SetSigningCertificateUpdateStatus(value SigningCertificateUpdateStatusable)() { + m.signingCertificateUpdateStatus = value +} +// SetSignOutUri sets the signOutUri property value. URI that clients are redirected to when they sign out of Azure AD services. Corresponds to the LogOffUri property of the Set-MsolDomainFederationSettings MSOnline v1 PowerShell cmdlet. +func (m *InternalDomainFederation) SetSignOutUri(value *string)() { + m.signOutUri = value +} diff --git a/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_response.go b/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_response.go new file mode 100644 index 000000000..d83308e79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalDomainFederationCollectionResponse +type InternalDomainFederationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InternalDomainFederationable +} +// NewInternalDomainFederationCollectionResponse instantiates a new InternalDomainFederationCollectionResponse and sets the default values. +func NewInternalDomainFederationCollectionResponse()(*InternalDomainFederationCollectionResponse) { + m := &InternalDomainFederationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInternalDomainFederationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternalDomainFederationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternalDomainFederationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternalDomainFederationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInternalDomainFederationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InternalDomainFederationable, len(val)) + for i, v := range val { + res[i] = v.(InternalDomainFederationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InternalDomainFederationCollectionResponse) GetValue()([]InternalDomainFederationable) { + return m.value +} +// Serialize serializes information the current object +func (m *InternalDomainFederationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InternalDomainFederationCollectionResponse) SetValue(value []InternalDomainFederationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_responseable.go new file mode 100644 index 000000000..23b006b6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_domain_federation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalDomainFederationCollectionResponseable +type InternalDomainFederationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InternalDomainFederationable) + SetValue(value []InternalDomainFederationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/internal_domain_federationable.go b/src/internal/connector/graph/betasdk/models/internal_domain_federationable.go new file mode 100644 index 000000000..6baf83c6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_domain_federationable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalDomainFederationable +type InternalDomainFederationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SamlOrWsFedProviderable + GetActiveSignInUri()(*string) + GetFederatedIdpMfaBehavior()(*FederatedIdpMfaBehavior) + GetIsSignedAuthenticationRequestRequired()(*bool) + GetNextSigningCertificate()(*string) + GetPromptLoginBehavior()(*PromptLoginBehavior) + GetSigningCertificateUpdateStatus()(SigningCertificateUpdateStatusable) + GetSignOutUri()(*string) + SetActiveSignInUri(value *string)() + SetFederatedIdpMfaBehavior(value *FederatedIdpMfaBehavior)() + SetIsSignedAuthenticationRequestRequired(value *bool)() + SetNextSigningCertificate(value *string)() + SetPromptLoginBehavior(value *PromptLoginBehavior)() + SetSigningCertificateUpdateStatus(value SigningCertificateUpdateStatusable)() + SetSignOutUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/internal_sponsors.go b/src/internal/connector/graph/betasdk/models/internal_sponsors.go new file mode 100644 index 000000000..0a20b2ca2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_sponsors.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalSponsors +type InternalSponsors struct { + UserSet +} +// NewInternalSponsors instantiates a new InternalSponsors and sets the default values. +func NewInternalSponsors()(*InternalSponsors) { + m := &InternalSponsors{ + UserSet: *NewUserSet(), + } + odataTypeValue := "#microsoft.graph.internalSponsors"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInternalSponsorsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternalSponsorsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternalSponsors(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternalSponsors) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserSet.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *InternalSponsors) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserSet.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/internal_sponsorsable.go b/src/internal/connector/graph/betasdk/models/internal_sponsorsable.go new file mode 100644 index 000000000..49fb1eff9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internal_sponsorsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternalSponsorsable +type InternalSponsorsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserSetable +} diff --git a/src/internal/connector/graph/betasdk/models/internet_explorer_message_setting.go b/src/internal/connector/graph/betasdk/models/internet_explorer_message_setting.go new file mode 100644 index 000000000..8886f7cb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_explorer_message_setting.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InternetExplorerMessageSetting int + +const ( + // Not configured. + NOTCONFIGURED_INTERNETEXPLORERMESSAGESETTING InternetExplorerMessageSetting = iota + // Disabled. + DISABLED_INTERNETEXPLORERMESSAGESETTING + // Enabled. + ENABLED_INTERNETEXPLORERMESSAGESETTING + // KeepGoing. + KEEPGOING_INTERNETEXPLORERMESSAGESETTING +) + +func (i InternetExplorerMessageSetting) String() string { + return []string{"notConfigured", "disabled", "enabled", "keepGoing"}[i] +} +func ParseInternetExplorerMessageSetting(v string) (interface{}, error) { + result := NOTCONFIGURED_INTERNETEXPLORERMESSAGESETTING + switch v { + case "notConfigured": + result = NOTCONFIGURED_INTERNETEXPLORERMESSAGESETTING + case "disabled": + result = DISABLED_INTERNETEXPLORERMESSAGESETTING + case "enabled": + result = ENABLED_INTERNETEXPLORERMESSAGESETTING + case "keepGoing": + result = KEEPGOING_INTERNETEXPLORERMESSAGESETTING + default: + return 0, errors.New("Unknown InternetExplorerMessageSetting value: " + v) + } + return &result, nil +} +func SerializeInternetExplorerMessageSetting(values []InternetExplorerMessageSetting) []string { + 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/internet_explorer_mode.go b/src/internal/connector/graph/betasdk/models/internet_explorer_mode.go new file mode 100644 index 000000000..42d71c0d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_explorer_mode.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetExplorerMode +type InternetExplorerMode struct { + Entity + // A collection of site lists to support Internet Explorer mode. + siteLists []BrowserSiteListable +} +// NewInternetExplorerMode instantiates a new internetExplorerMode and sets the default values. +func NewInternetExplorerMode()(*InternetExplorerMode) { + m := &InternetExplorerMode{ + Entity: *NewEntity(), + } + return m +} +// CreateInternetExplorerModeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternetExplorerModeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternetExplorerMode(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternetExplorerMode) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["siteLists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBrowserSiteListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]BrowserSiteListable, len(val)) + for i, v := range val { + res[i] = v.(BrowserSiteListable) + } + m.SetSiteLists(res) + } + return nil + } + return res +} +// GetSiteLists gets the siteLists property value. A collection of site lists to support Internet Explorer mode. +func (m *InternetExplorerMode) GetSiteLists()([]BrowserSiteListable) { + return m.siteLists +} +// Serialize serializes information the current object +func (m *InternetExplorerMode) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetSiteLists() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSiteLists())) + for i, v := range m.GetSiteLists() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("siteLists", cast) + if err != nil { + return err + } + } + return nil +} +// SetSiteLists sets the siteLists property value. A collection of site lists to support Internet Explorer mode. +func (m *InternetExplorerMode) SetSiteLists(value []BrowserSiteListable)() { + m.siteLists = value +} diff --git a/src/internal/connector/graph/betasdk/models/internet_explorer_modeable.go b/src/internal/connector/graph/betasdk/models/internet_explorer_modeable.go new file mode 100644 index 000000000..bd5b974ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_explorer_modeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetExplorerModeable +type InternetExplorerModeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSiteLists()([]BrowserSiteListable) + SetSiteLists(value []BrowserSiteListable)() +} diff --git a/src/internal/connector/graph/betasdk/models/internet_message_header.go b/src/internal/connector/graph/betasdk/models/internet_message_header.go new file mode 100644 index 000000000..9d7057f28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_message_header.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetMessageHeader +type InternetMessageHeader struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents the key in a key-value pair. + name *string + // The OdataType property + odataType *string + // The value in a key-value pair. + value *string +} +// NewInternetMessageHeader instantiates a new internetMessageHeader and sets the default values. +func NewInternetMessageHeader()(*InternetMessageHeader) { + m := &InternetMessageHeader{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInternetMessageHeaderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternetMessageHeaderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternetMessageHeader(), 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 *InternetMessageHeader) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternetMessageHeader) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 +} +// GetName gets the name property value. Represents the key in a key-value pair. +func (m *InternetMessageHeader) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InternetMessageHeader) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The value in a key-value pair. +func (m *InternetMessageHeader) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *InternetMessageHeader) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *InternetMessageHeader) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Represents the key in a key-value pair. +func (m *InternetMessageHeader) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InternetMessageHeader) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The value in a key-value pair. +func (m *InternetMessageHeader) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/internet_message_header_collection_response.go b/src/internal/connector/graph/betasdk/models/internet_message_header_collection_response.go new file mode 100644 index 000000000..a364999bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_message_header_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetMessageHeaderCollectionResponse +type InternetMessageHeaderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InternetMessageHeaderable +} +// NewInternetMessageHeaderCollectionResponse instantiates a new InternetMessageHeaderCollectionResponse and sets the default values. +func NewInternetMessageHeaderCollectionResponse()(*InternetMessageHeaderCollectionResponse) { + m := &InternetMessageHeaderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInternetMessageHeaderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInternetMessageHeaderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInternetMessageHeaderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InternetMessageHeaderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInternetMessageHeaderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InternetMessageHeaderable, len(val)) + for i, v := range val { + res[i] = v.(InternetMessageHeaderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InternetMessageHeaderCollectionResponse) GetValue()([]InternetMessageHeaderable) { + return m.value +} +// Serialize serializes information the current object +func (m *InternetMessageHeaderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InternetMessageHeaderCollectionResponse) SetValue(value []InternetMessageHeaderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/internet_message_header_collection_responseable.go b/src/internal/connector/graph/betasdk/models/internet_message_header_collection_responseable.go new file mode 100644 index 000000000..77a8092f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_message_header_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetMessageHeaderCollectionResponseable +type InternetMessageHeaderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InternetMessageHeaderable) + SetValue(value []InternetMessageHeaderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/internet_message_headerable.go b/src/internal/connector/graph/betasdk/models/internet_message_headerable.go new file mode 100644 index 000000000..b63b8c768 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_message_headerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InternetMessageHeaderable +type InternetMessageHeaderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/internet_site_security_level.go b/src/internal/connector/graph/betasdk/models/internet_site_security_level.go new file mode 100644 index 000000000..38bd4d66b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/internet_site_security_level.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type InternetSiteSecurityLevel int + +const ( + // User Defined, default value, no intent. + USERDEFINED_INTERNETSITESECURITYLEVEL InternetSiteSecurityLevel = iota + // Medium. + MEDIUM_INTERNETSITESECURITYLEVEL + // Medium-High. + MEDIUMHIGH_INTERNETSITESECURITYLEVEL + // High. + HIGH_INTERNETSITESECURITYLEVEL +) + +func (i InternetSiteSecurityLevel) String() string { + return []string{"userDefined", "medium", "mediumHigh", "high"}[i] +} +func ParseInternetSiteSecurityLevel(v string) (interface{}, error) { + result := USERDEFINED_INTERNETSITESECURITYLEVEL + switch v { + case "userDefined": + result = USERDEFINED_INTERNETSITESECURITYLEVEL + case "medium": + result = MEDIUM_INTERNETSITESECURITYLEVEL + case "mediumHigh": + result = MEDIUMHIGH_INTERNETSITESECURITYLEVEL + case "high": + result = HIGH_INTERNETSITESECURITYLEVEL + default: + return 0, errors.New("Unknown InternetSiteSecurityLevel value: " + v) + } + return &result, nil +} +func SerializeInternetSiteSecurityLevel(values []InternetSiteSecurityLevel) []string { + 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/intune_brand.go b/src/internal/connector/graph/betasdk/models/intune_brand.go new file mode 100644 index 000000000..facd577ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_brand.go @@ -0,0 +1,812 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrand intuneBrand contains data which is used in customizing the appearance of the Company Portal applications as well as the end user web portal. +type IntuneBrand struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Collection of blocked actions on the company portal as per platform and device ownership types. + companyPortalBlockedActions []CompanyPortalBlockedActionable + // Email address of the person/organization responsible for IT support. + contactITEmailAddress *string + // Name of the person/organization responsible for IT support. + contactITName *string + // Text comments regarding the person/organization responsible for IT support. + contactITNotes *string + // Phone number of the person/organization responsible for IT support. + contactITPhoneNumber *string + // The custom privacy message used to explain what the organization can see and do on managed devices. + customCanSeePrivacyMessage *string + // The custom privacy message used to explain what the organization can’t see or do on managed devices. + customCantSeePrivacyMessage *string + // The custom privacy message used to explain what the organization can’t see or do on managed devices. + customPrivacyMessage *string + // Logo image displayed in Company Portal apps which have a dark background behind the logo. + darkBackgroundLogo MimeContentable + // Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. + disableClientTelemetry *bool + // Company/organization name that is displayed to end users. + displayName *string + // Options available for enrollment flow customization + enrollmentAvailability *EnrollmentAvailabilityOptions + // Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. + isFactoryResetDisabled *bool + // Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. + isRemoveDeviceDisabled *bool + // Customized image displayed in Company Portal app landing page + landingPageCustomizedImage MimeContentable + // Logo image displayed in Company Portal apps which have a light background behind the logo. + lightBackgroundLogo MimeContentable + // The OdataType property + odataType *string + // Display name of the company/organization’s IT helpdesk site. + onlineSupportSiteName *string + // URL to the company/organization’s IT helpdesk site. + onlineSupportSiteUrl *string + // URL to the company/organization’s privacy policy. + privacyUrl *string + // List of scope tags assigned to the default branding profile + roleScopeTagIds []string + // Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate + sendDeviceOwnershipChangePushNotification *bool + // Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal + showAzureADEnterpriseApps *bool + // Boolean that indicates if ConfigurationManagerApps will be shown in Company Portal + showConfigurationManagerApps *bool + // Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. + showDisplayNameNextToLogo *bool + // Boolean that represents whether the administrator-supplied logo images are shown or not shown. + showLogo *bool + // Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. + showNameNextToLogo *bool + // Boolean that indicates if Office WebApps will be shown in Company Portal + showOfficeWebApps *bool + // Primary theme color used in the Company Portal applications and web portal. + themeColor RgbColorable +} +// NewIntuneBrand instantiates a new intuneBrand and sets the default values. +func NewIntuneBrand()(*IntuneBrand) { + m := &IntuneBrand{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIntuneBrandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntuneBrandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntuneBrand(), 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 *IntuneBrand) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCompanyPortalBlockedActions gets the companyPortalBlockedActions property value. Collection of blocked actions on the company portal as per platform and device ownership types. +func (m *IntuneBrand) GetCompanyPortalBlockedActions()([]CompanyPortalBlockedActionable) { + return m.companyPortalBlockedActions +} +// GetContactITEmailAddress gets the contactITEmailAddress property value. Email address of the person/organization responsible for IT support. +func (m *IntuneBrand) GetContactITEmailAddress()(*string) { + return m.contactITEmailAddress +} +// GetContactITName gets the contactITName property value. Name of the person/organization responsible for IT support. +func (m *IntuneBrand) GetContactITName()(*string) { + return m.contactITName +} +// GetContactITNotes gets the contactITNotes property value. Text comments regarding the person/organization responsible for IT support. +func (m *IntuneBrand) GetContactITNotes()(*string) { + return m.contactITNotes +} +// GetContactITPhoneNumber gets the contactITPhoneNumber property value. Phone number of the person/organization responsible for IT support. +func (m *IntuneBrand) GetContactITPhoneNumber()(*string) { + return m.contactITPhoneNumber +} +// GetCustomCanSeePrivacyMessage gets the customCanSeePrivacyMessage property value. The custom privacy message used to explain what the organization can see and do on managed devices. +func (m *IntuneBrand) GetCustomCanSeePrivacyMessage()(*string) { + return m.customCanSeePrivacyMessage +} +// GetCustomCantSeePrivacyMessage gets the customCantSeePrivacyMessage property value. The custom privacy message used to explain what the organization can’t see or do on managed devices. +func (m *IntuneBrand) GetCustomCantSeePrivacyMessage()(*string) { + return m.customCantSeePrivacyMessage +} +// GetCustomPrivacyMessage gets the customPrivacyMessage property value. The custom privacy message used to explain what the organization can’t see or do on managed devices. +func (m *IntuneBrand) GetCustomPrivacyMessage()(*string) { + return m.customPrivacyMessage +} +// GetDarkBackgroundLogo gets the darkBackgroundLogo property value. Logo image displayed in Company Portal apps which have a dark background behind the logo. +func (m *IntuneBrand) GetDarkBackgroundLogo()(MimeContentable) { + return m.darkBackgroundLogo +} +// GetDisableClientTelemetry gets the disableClientTelemetry property value. Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. +func (m *IntuneBrand) GetDisableClientTelemetry()(*bool) { + return m.disableClientTelemetry +} +// GetDisplayName gets the displayName property value. Company/organization name that is displayed to end users. +func (m *IntuneBrand) GetDisplayName()(*string) { + return m.displayName +} +// GetEnrollmentAvailability gets the enrollmentAvailability property value. Options available for enrollment flow customization +func (m *IntuneBrand) GetEnrollmentAvailability()(*EnrollmentAvailabilityOptions) { + return m.enrollmentAvailability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntuneBrand) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["companyPortalBlockedActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyPortalBlockedActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanyPortalBlockedActionable, len(val)) + for i, v := range val { + res[i] = v.(CompanyPortalBlockedActionable) + } + m.SetCompanyPortalBlockedActions(res) + } + return nil + } + res["contactITEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITEmailAddress(val) + } + return nil + } + res["contactITName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITName(val) + } + return nil + } + res["contactITNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITNotes(val) + } + return nil + } + res["contactITPhoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITPhoneNumber(val) + } + return nil + } + res["customCanSeePrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCanSeePrivacyMessage(val) + } + return nil + } + res["customCantSeePrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCantSeePrivacyMessage(val) + } + return nil + } + res["customPrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomPrivacyMessage(val) + } + return nil + } + res["darkBackgroundLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDarkBackgroundLogo(val.(MimeContentable)) + } + return nil + } + res["disableClientTelemetry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableClientTelemetry(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enrollmentAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentAvailabilityOptions) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentAvailability(val.(*EnrollmentAvailabilityOptions)) + } + return nil + } + res["isFactoryResetDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFactoryResetDisabled(val) + } + return nil + } + res["isRemoveDeviceDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemoveDeviceDisabled(val) + } + return nil + } + res["landingPageCustomizedImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLandingPageCustomizedImage(val.(MimeContentable)) + } + return nil + } + res["lightBackgroundLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLightBackgroundLogo(val.(MimeContentable)) + } + 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["onlineSupportSiteName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineSupportSiteName(val) + } + return nil + } + res["onlineSupportSiteUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineSupportSiteUrl(val) + } + return nil + } + res["privacyUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyUrl(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["sendDeviceOwnershipChangePushNotification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSendDeviceOwnershipChangePushNotification(val) + } + return nil + } + res["showAzureADEnterpriseApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowAzureADEnterpriseApps(val) + } + return nil + } + res["showConfigurationManagerApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowConfigurationManagerApps(val) + } + return nil + } + res["showDisplayNameNextToLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowDisplayNameNextToLogo(val) + } + return nil + } + res["showLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowLogo(val) + } + return nil + } + res["showNameNextToLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowNameNextToLogo(val) + } + return nil + } + res["showOfficeWebApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowOfficeWebApps(val) + } + return nil + } + res["themeColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRgbColorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThemeColor(val.(RgbColorable)) + } + return nil + } + return res +} +// GetIsFactoryResetDisabled gets the isFactoryResetDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. +func (m *IntuneBrand) GetIsFactoryResetDisabled()(*bool) { + return m.isFactoryResetDisabled +} +// GetIsRemoveDeviceDisabled gets the isRemoveDeviceDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. +func (m *IntuneBrand) GetIsRemoveDeviceDisabled()(*bool) { + return m.isRemoveDeviceDisabled +} +// GetLandingPageCustomizedImage gets the landingPageCustomizedImage property value. Customized image displayed in Company Portal app landing page +func (m *IntuneBrand) GetLandingPageCustomizedImage()(MimeContentable) { + return m.landingPageCustomizedImage +} +// GetLightBackgroundLogo gets the lightBackgroundLogo property value. Logo image displayed in Company Portal apps which have a light background behind the logo. +func (m *IntuneBrand) GetLightBackgroundLogo()(MimeContentable) { + return m.lightBackgroundLogo +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IntuneBrand) GetOdataType()(*string) { + return m.odataType +} +// GetOnlineSupportSiteName gets the onlineSupportSiteName property value. Display name of the company/organization’s IT helpdesk site. +func (m *IntuneBrand) GetOnlineSupportSiteName()(*string) { + return m.onlineSupportSiteName +} +// GetOnlineSupportSiteUrl gets the onlineSupportSiteUrl property value. URL to the company/organization’s IT helpdesk site. +func (m *IntuneBrand) GetOnlineSupportSiteUrl()(*string) { + return m.onlineSupportSiteUrl +} +// GetPrivacyUrl gets the privacyUrl property value. URL to the company/organization’s privacy policy. +func (m *IntuneBrand) GetPrivacyUrl()(*string) { + return m.privacyUrl +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of scope tags assigned to the default branding profile +func (m *IntuneBrand) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSendDeviceOwnershipChangePushNotification gets the sendDeviceOwnershipChangePushNotification property value. Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate +func (m *IntuneBrand) GetSendDeviceOwnershipChangePushNotification()(*bool) { + return m.sendDeviceOwnershipChangePushNotification +} +// GetShowAzureADEnterpriseApps gets the showAzureADEnterpriseApps property value. Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal +func (m *IntuneBrand) GetShowAzureADEnterpriseApps()(*bool) { + return m.showAzureADEnterpriseApps +} +// GetShowConfigurationManagerApps gets the showConfigurationManagerApps property value. Boolean that indicates if ConfigurationManagerApps will be shown in Company Portal +func (m *IntuneBrand) GetShowConfigurationManagerApps()(*bool) { + return m.showConfigurationManagerApps +} +// GetShowDisplayNameNextToLogo gets the showDisplayNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. +func (m *IntuneBrand) GetShowDisplayNameNextToLogo()(*bool) { + return m.showDisplayNameNextToLogo +} +// GetShowLogo gets the showLogo property value. Boolean that represents whether the administrator-supplied logo images are shown or not shown. +func (m *IntuneBrand) GetShowLogo()(*bool) { + return m.showLogo +} +// GetShowNameNextToLogo gets the showNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. +func (m *IntuneBrand) GetShowNameNextToLogo()(*bool) { + return m.showNameNextToLogo +} +// GetShowOfficeWebApps gets the showOfficeWebApps property value. Boolean that indicates if Office WebApps will be shown in Company Portal +func (m *IntuneBrand) GetShowOfficeWebApps()(*bool) { + return m.showOfficeWebApps +} +// GetThemeColor gets the themeColor property value. Primary theme color used in the Company Portal applications and web portal. +func (m *IntuneBrand) GetThemeColor()(RgbColorable) { + return m.themeColor +} +// Serialize serializes information the current object +func (m *IntuneBrand) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCompanyPortalBlockedActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompanyPortalBlockedActions())) + for i, v := range m.GetCompanyPortalBlockedActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("companyPortalBlockedActions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contactITEmailAddress", m.GetContactITEmailAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contactITName", m.GetContactITName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contactITNotes", m.GetContactITNotes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contactITPhoneNumber", m.GetContactITPhoneNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("customCanSeePrivacyMessage", m.GetCustomCanSeePrivacyMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("customCantSeePrivacyMessage", m.GetCustomCantSeePrivacyMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("customPrivacyMessage", m.GetCustomPrivacyMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("darkBackgroundLogo", m.GetDarkBackgroundLogo()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("disableClientTelemetry", m.GetDisableClientTelemetry()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEnrollmentAvailability() != nil { + cast := (*m.GetEnrollmentAvailability()).String() + err := writer.WriteStringValue("enrollmentAvailability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isFactoryResetDisabled", m.GetIsFactoryResetDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRemoveDeviceDisabled", m.GetIsRemoveDeviceDisabled()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("landingPageCustomizedImage", m.GetLandingPageCustomizedImage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lightBackgroundLogo", m.GetLightBackgroundLogo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("onlineSupportSiteName", m.GetOnlineSupportSiteName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("onlineSupportSiteUrl", m.GetOnlineSupportSiteUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("privacyUrl", m.GetPrivacyUrl()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err := writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sendDeviceOwnershipChangePushNotification", m.GetSendDeviceOwnershipChangePushNotification()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showAzureADEnterpriseApps", m.GetShowAzureADEnterpriseApps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showConfigurationManagerApps", m.GetShowConfigurationManagerApps()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showDisplayNameNextToLogo", m.GetShowDisplayNameNextToLogo()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showLogo", m.GetShowLogo()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showNameNextToLogo", m.GetShowNameNextToLogo()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showOfficeWebApps", m.GetShowOfficeWebApps()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("themeColor", m.GetThemeColor()) + 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 *IntuneBrand) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCompanyPortalBlockedActions sets the companyPortalBlockedActions property value. Collection of blocked actions on the company portal as per platform and device ownership types. +func (m *IntuneBrand) SetCompanyPortalBlockedActions(value []CompanyPortalBlockedActionable)() { + m.companyPortalBlockedActions = value +} +// SetContactITEmailAddress sets the contactITEmailAddress property value. Email address of the person/organization responsible for IT support. +func (m *IntuneBrand) SetContactITEmailAddress(value *string)() { + m.contactITEmailAddress = value +} +// SetContactITName sets the contactITName property value. Name of the person/organization responsible for IT support. +func (m *IntuneBrand) SetContactITName(value *string)() { + m.contactITName = value +} +// SetContactITNotes sets the contactITNotes property value. Text comments regarding the person/organization responsible for IT support. +func (m *IntuneBrand) SetContactITNotes(value *string)() { + m.contactITNotes = value +} +// SetContactITPhoneNumber sets the contactITPhoneNumber property value. Phone number of the person/organization responsible for IT support. +func (m *IntuneBrand) SetContactITPhoneNumber(value *string)() { + m.contactITPhoneNumber = value +} +// SetCustomCanSeePrivacyMessage sets the customCanSeePrivacyMessage property value. The custom privacy message used to explain what the organization can see and do on managed devices. +func (m *IntuneBrand) SetCustomCanSeePrivacyMessage(value *string)() { + m.customCanSeePrivacyMessage = value +} +// SetCustomCantSeePrivacyMessage sets the customCantSeePrivacyMessage property value. The custom privacy message used to explain what the organization can’t see or do on managed devices. +func (m *IntuneBrand) SetCustomCantSeePrivacyMessage(value *string)() { + m.customCantSeePrivacyMessage = value +} +// SetCustomPrivacyMessage sets the customPrivacyMessage property value. The custom privacy message used to explain what the organization can’t see or do on managed devices. +func (m *IntuneBrand) SetCustomPrivacyMessage(value *string)() { + m.customPrivacyMessage = value +} +// SetDarkBackgroundLogo sets the darkBackgroundLogo property value. Logo image displayed in Company Portal apps which have a dark background behind the logo. +func (m *IntuneBrand) SetDarkBackgroundLogo(value MimeContentable)() { + m.darkBackgroundLogo = value +} +// SetDisableClientTelemetry sets the disableClientTelemetry property value. Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. +func (m *IntuneBrand) SetDisableClientTelemetry(value *bool)() { + m.disableClientTelemetry = value +} +// SetDisplayName sets the displayName property value. Company/organization name that is displayed to end users. +func (m *IntuneBrand) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnrollmentAvailability sets the enrollmentAvailability property value. Options available for enrollment flow customization +func (m *IntuneBrand) SetEnrollmentAvailability(value *EnrollmentAvailabilityOptions)() { + m.enrollmentAvailability = value +} +// SetIsFactoryResetDisabled sets the isFactoryResetDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. +func (m *IntuneBrand) SetIsFactoryResetDisabled(value *bool)() { + m.isFactoryResetDisabled = value +} +// SetIsRemoveDeviceDisabled sets the isRemoveDeviceDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. +func (m *IntuneBrand) SetIsRemoveDeviceDisabled(value *bool)() { + m.isRemoveDeviceDisabled = value +} +// SetLandingPageCustomizedImage sets the landingPageCustomizedImage property value. Customized image displayed in Company Portal app landing page +func (m *IntuneBrand) SetLandingPageCustomizedImage(value MimeContentable)() { + m.landingPageCustomizedImage = value +} +// SetLightBackgroundLogo sets the lightBackgroundLogo property value. Logo image displayed in Company Portal apps which have a light background behind the logo. +func (m *IntuneBrand) SetLightBackgroundLogo(value MimeContentable)() { + m.lightBackgroundLogo = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IntuneBrand) SetOdataType(value *string)() { + m.odataType = value +} +// SetOnlineSupportSiteName sets the onlineSupportSiteName property value. Display name of the company/organization’s IT helpdesk site. +func (m *IntuneBrand) SetOnlineSupportSiteName(value *string)() { + m.onlineSupportSiteName = value +} +// SetOnlineSupportSiteUrl sets the onlineSupportSiteUrl property value. URL to the company/organization’s IT helpdesk site. +func (m *IntuneBrand) SetOnlineSupportSiteUrl(value *string)() { + m.onlineSupportSiteUrl = value +} +// SetPrivacyUrl sets the privacyUrl property value. URL to the company/organization’s privacy policy. +func (m *IntuneBrand) SetPrivacyUrl(value *string)() { + m.privacyUrl = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of scope tags assigned to the default branding profile +func (m *IntuneBrand) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSendDeviceOwnershipChangePushNotification sets the sendDeviceOwnershipChangePushNotification property value. Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate +func (m *IntuneBrand) SetSendDeviceOwnershipChangePushNotification(value *bool)() { + m.sendDeviceOwnershipChangePushNotification = value +} +// SetShowAzureADEnterpriseApps sets the showAzureADEnterpriseApps property value. Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal +func (m *IntuneBrand) SetShowAzureADEnterpriseApps(value *bool)() { + m.showAzureADEnterpriseApps = value +} +// SetShowConfigurationManagerApps sets the showConfigurationManagerApps property value. Boolean that indicates if ConfigurationManagerApps will be shown in Company Portal +func (m *IntuneBrand) SetShowConfigurationManagerApps(value *bool)() { + m.showConfigurationManagerApps = value +} +// SetShowDisplayNameNextToLogo sets the showDisplayNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. +func (m *IntuneBrand) SetShowDisplayNameNextToLogo(value *bool)() { + m.showDisplayNameNextToLogo = value +} +// SetShowLogo sets the showLogo property value. Boolean that represents whether the administrator-supplied logo images are shown or not shown. +func (m *IntuneBrand) SetShowLogo(value *bool)() { + m.showLogo = value +} +// SetShowNameNextToLogo sets the showNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image. +func (m *IntuneBrand) SetShowNameNextToLogo(value *bool)() { + m.showNameNextToLogo = value +} +// SetShowOfficeWebApps sets the showOfficeWebApps property value. Boolean that indicates if Office WebApps will be shown in Company Portal +func (m *IntuneBrand) SetShowOfficeWebApps(value *bool)() { + m.showOfficeWebApps = value +} +// SetThemeColor sets the themeColor property value. Primary theme color used in the Company Portal applications and web portal. +func (m *IntuneBrand) SetThemeColor(value RgbColorable)() { + m.themeColor = value +} diff --git a/src/internal/connector/graph/betasdk/models/intune_brandable.go b/src/internal/connector/graph/betasdk/models/intune_brandable.go new file mode 100644 index 000000000..3d8cd39f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_brandable.go @@ -0,0 +1,69 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandable +type IntuneBrandable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompanyPortalBlockedActions()([]CompanyPortalBlockedActionable) + GetContactITEmailAddress()(*string) + GetContactITName()(*string) + GetContactITNotes()(*string) + GetContactITPhoneNumber()(*string) + GetCustomCanSeePrivacyMessage()(*string) + GetCustomCantSeePrivacyMessage()(*string) + GetCustomPrivacyMessage()(*string) + GetDarkBackgroundLogo()(MimeContentable) + GetDisableClientTelemetry()(*bool) + GetDisplayName()(*string) + GetEnrollmentAvailability()(*EnrollmentAvailabilityOptions) + GetIsFactoryResetDisabled()(*bool) + GetIsRemoveDeviceDisabled()(*bool) + GetLandingPageCustomizedImage()(MimeContentable) + GetLightBackgroundLogo()(MimeContentable) + GetOdataType()(*string) + GetOnlineSupportSiteName()(*string) + GetOnlineSupportSiteUrl()(*string) + GetPrivacyUrl()(*string) + GetRoleScopeTagIds()([]string) + GetSendDeviceOwnershipChangePushNotification()(*bool) + GetShowAzureADEnterpriseApps()(*bool) + GetShowConfigurationManagerApps()(*bool) + GetShowDisplayNameNextToLogo()(*bool) + GetShowLogo()(*bool) + GetShowNameNextToLogo()(*bool) + GetShowOfficeWebApps()(*bool) + GetThemeColor()(RgbColorable) + SetCompanyPortalBlockedActions(value []CompanyPortalBlockedActionable)() + SetContactITEmailAddress(value *string)() + SetContactITName(value *string)() + SetContactITNotes(value *string)() + SetContactITPhoneNumber(value *string)() + SetCustomCanSeePrivacyMessage(value *string)() + SetCustomCantSeePrivacyMessage(value *string)() + SetCustomPrivacyMessage(value *string)() + SetDarkBackgroundLogo(value MimeContentable)() + SetDisableClientTelemetry(value *bool)() + SetDisplayName(value *string)() + SetEnrollmentAvailability(value *EnrollmentAvailabilityOptions)() + SetIsFactoryResetDisabled(value *bool)() + SetIsRemoveDeviceDisabled(value *bool)() + SetLandingPageCustomizedImage(value MimeContentable)() + SetLightBackgroundLogo(value MimeContentable)() + SetOdataType(value *string)() + SetOnlineSupportSiteName(value *string)() + SetOnlineSupportSiteUrl(value *string)() + SetPrivacyUrl(value *string)() + SetRoleScopeTagIds(value []string)() + SetSendDeviceOwnershipChangePushNotification(value *bool)() + SetShowAzureADEnterpriseApps(value *bool)() + SetShowConfigurationManagerApps(value *bool)() + SetShowDisplayNameNextToLogo(value *bool)() + SetShowLogo(value *bool)() + SetShowNameNextToLogo(value *bool)() + SetShowOfficeWebApps(value *bool)() + SetThemeColor(value RgbColorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile.go new file mode 100644 index 000000000..ae5f5104d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile.go @@ -0,0 +1,914 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfile this entity contains data which is used in customizing the tenant level appearance of the Company Portal applications as well as the end user web portal. +type IntuneBrandingProfile struct { + Entity + // The list of group assignments for the branding profile + assignments []IntuneBrandingProfileAssignmentable + // Collection of blocked actions on the company portal as per platform and device ownership types. + companyPortalBlockedActions []CompanyPortalBlockedActionable + // E-mail address of the person/organization responsible for IT support + contactITEmailAddress *string + // Name of the person/organization responsible for IT support + contactITName *string + // Text comments regarding the person/organization responsible for IT support + contactITNotes *string + // Phone number of the person/organization responsible for IT support + contactITPhoneNumber *string + // Time when the BrandingProfile was created + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Text comments regarding what the admin has access to on the device + customCanSeePrivacyMessage *string + // Text comments regarding what the admin doesn't have access to on the device + customCantSeePrivacyMessage *string + // Text comments regarding what the admin doesn't have access to on the device + customPrivacyMessage *string + // Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. + disableClientTelemetry *bool + // Company/organization name that is displayed to end users + displayName *string + // Options available for enrollment flow customization + enrollmentAvailability *EnrollmentAvailabilityOptions + // Boolean that represents whether the profile is used as default or not + isDefaultProfile *bool + // Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. + isFactoryResetDisabled *bool + // Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. + isRemoveDeviceDisabled *bool + // Customized image displayed in Company Portal apps landing page + landingPageCustomizedImage MimeContentable + // Time when the BrandingProfile was last modified + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Logo image displayed in Company Portal apps which have a light background behind the logo + lightBackgroundLogo MimeContentable + // Display name of the company/organization’s IT helpdesk site + onlineSupportSiteName *string + // URL to the company/organization’s IT helpdesk site + onlineSupportSiteUrl *string + // URL to the company/organization’s privacy policy + privacyUrl *string + // Description of the profile + profileDescription *string + // Name of the profile + profileName *string + // List of scope tags assigned to the branding profile + roleScopeTagIds []string + // Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate + sendDeviceOwnershipChangePushNotification *bool + // Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal + showAzureADEnterpriseApps *bool + // Boolean that indicates if Configuration Manager Apps will be shown in Company Portal + showConfigurationManagerApps *bool + // Boolean that represents whether the administrator-supplied display name will be shown next to the logo image or not + showDisplayNameNextToLogo *bool + // Boolean that represents whether the administrator-supplied logo images are shown or not + showLogo *bool + // Boolean that indicates if Office WebApps will be shown in Company Portal + showOfficeWebApps *bool + // Primary theme color used in the Company Portal applications and web portal + themeColor RgbColorable + // Logo image displayed in Company Portal apps which have a theme color background behind the logo + themeColorLogo MimeContentable +} +// NewIntuneBrandingProfile instantiates a new intuneBrandingProfile and sets the default values. +func NewIntuneBrandingProfile()(*IntuneBrandingProfile) { + m := &IntuneBrandingProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateIntuneBrandingProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntuneBrandingProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntuneBrandingProfile(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the branding profile +func (m *IntuneBrandingProfile) GetAssignments()([]IntuneBrandingProfileAssignmentable) { + return m.assignments +} +// GetCompanyPortalBlockedActions gets the companyPortalBlockedActions property value. Collection of blocked actions on the company portal as per platform and device ownership types. +func (m *IntuneBrandingProfile) GetCompanyPortalBlockedActions()([]CompanyPortalBlockedActionable) { + return m.companyPortalBlockedActions +} +// GetContactITEmailAddress gets the contactITEmailAddress property value. E-mail address of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) GetContactITEmailAddress()(*string) { + return m.contactITEmailAddress +} +// GetContactITName gets the contactITName property value. Name of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) GetContactITName()(*string) { + return m.contactITName +} +// GetContactITNotes gets the contactITNotes property value. Text comments regarding the person/organization responsible for IT support +func (m *IntuneBrandingProfile) GetContactITNotes()(*string) { + return m.contactITNotes +} +// GetContactITPhoneNumber gets the contactITPhoneNumber property value. Phone number of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) GetContactITPhoneNumber()(*string) { + return m.contactITPhoneNumber +} +// GetCreatedDateTime gets the createdDateTime property value. Time when the BrandingProfile was created +func (m *IntuneBrandingProfile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomCanSeePrivacyMessage gets the customCanSeePrivacyMessage property value. Text comments regarding what the admin has access to on the device +func (m *IntuneBrandingProfile) GetCustomCanSeePrivacyMessage()(*string) { + return m.customCanSeePrivacyMessage +} +// GetCustomCantSeePrivacyMessage gets the customCantSeePrivacyMessage property value. Text comments regarding what the admin doesn't have access to on the device +func (m *IntuneBrandingProfile) GetCustomCantSeePrivacyMessage()(*string) { + return m.customCantSeePrivacyMessage +} +// GetCustomPrivacyMessage gets the customPrivacyMessage property value. Text comments regarding what the admin doesn't have access to on the device +func (m *IntuneBrandingProfile) GetCustomPrivacyMessage()(*string) { + return m.customPrivacyMessage +} +// GetDisableClientTelemetry gets the disableClientTelemetry property value. Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. +func (m *IntuneBrandingProfile) GetDisableClientTelemetry()(*bool) { + return m.disableClientTelemetry +} +// GetDisplayName gets the displayName property value. Company/organization name that is displayed to end users +func (m *IntuneBrandingProfile) GetDisplayName()(*string) { + return m.displayName +} +// GetEnrollmentAvailability gets the enrollmentAvailability property value. Options available for enrollment flow customization +func (m *IntuneBrandingProfile) GetEnrollmentAvailability()(*EnrollmentAvailabilityOptions) { + return m.enrollmentAvailability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntuneBrandingProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntuneBrandingProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntuneBrandingProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IntuneBrandingProfileAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["companyPortalBlockedActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCompanyPortalBlockedActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CompanyPortalBlockedActionable, len(val)) + for i, v := range val { + res[i] = v.(CompanyPortalBlockedActionable) + } + m.SetCompanyPortalBlockedActions(res) + } + return nil + } + res["contactITEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITEmailAddress(val) + } + return nil + } + res["contactITName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITName(val) + } + return nil + } + res["contactITNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITNotes(val) + } + return nil + } + res["contactITPhoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactITPhoneNumber(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customCanSeePrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCanSeePrivacyMessage(val) + } + return nil + } + res["customCantSeePrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCantSeePrivacyMessage(val) + } + return nil + } + res["customPrivacyMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomPrivacyMessage(val) + } + return nil + } + res["disableClientTelemetry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableClientTelemetry(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enrollmentAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnrollmentAvailabilityOptions) + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentAvailability(val.(*EnrollmentAvailabilityOptions)) + } + return nil + } + res["isDefaultProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultProfile(val) + } + return nil + } + res["isFactoryResetDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFactoryResetDisabled(val) + } + return nil + } + res["isRemoveDeviceDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemoveDeviceDisabled(val) + } + return nil + } + res["landingPageCustomizedImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLandingPageCustomizedImage(val.(MimeContentable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lightBackgroundLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLightBackgroundLogo(val.(MimeContentable)) + } + return nil + } + res["onlineSupportSiteName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineSupportSiteName(val) + } + return nil + } + res["onlineSupportSiteUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnlineSupportSiteUrl(val) + } + return nil + } + res["privacyUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyUrl(val) + } + return nil + } + res["profileDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileDescription(val) + } + return nil + } + res["profileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfileName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["sendDeviceOwnershipChangePushNotification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSendDeviceOwnershipChangePushNotification(val) + } + return nil + } + res["showAzureADEnterpriseApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowAzureADEnterpriseApps(val) + } + return nil + } + res["showConfigurationManagerApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowConfigurationManagerApps(val) + } + return nil + } + res["showDisplayNameNextToLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowDisplayNameNextToLogo(val) + } + return nil + } + res["showLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowLogo(val) + } + return nil + } + res["showOfficeWebApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowOfficeWebApps(val) + } + return nil + } + res["themeColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRgbColorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThemeColor(val.(RgbColorable)) + } + return nil + } + res["themeColorLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetThemeColorLogo(val.(MimeContentable)) + } + return nil + } + return res +} +// GetIsDefaultProfile gets the isDefaultProfile property value. Boolean that represents whether the profile is used as default or not +func (m *IntuneBrandingProfile) GetIsDefaultProfile()(*bool) { + return m.isDefaultProfile +} +// GetIsFactoryResetDisabled gets the isFactoryResetDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. +func (m *IntuneBrandingProfile) GetIsFactoryResetDisabled()(*bool) { + return m.isFactoryResetDisabled +} +// GetIsRemoveDeviceDisabled gets the isRemoveDeviceDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. +func (m *IntuneBrandingProfile) GetIsRemoveDeviceDisabled()(*bool) { + return m.isRemoveDeviceDisabled +} +// GetLandingPageCustomizedImage gets the landingPageCustomizedImage property value. Customized image displayed in Company Portal apps landing page +func (m *IntuneBrandingProfile) GetLandingPageCustomizedImage()(MimeContentable) { + return m.landingPageCustomizedImage +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Time when the BrandingProfile was last modified +func (m *IntuneBrandingProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLightBackgroundLogo gets the lightBackgroundLogo property value. Logo image displayed in Company Portal apps which have a light background behind the logo +func (m *IntuneBrandingProfile) GetLightBackgroundLogo()(MimeContentable) { + return m.lightBackgroundLogo +} +// GetOnlineSupportSiteName gets the onlineSupportSiteName property value. Display name of the company/organization’s IT helpdesk site +func (m *IntuneBrandingProfile) GetOnlineSupportSiteName()(*string) { + return m.onlineSupportSiteName +} +// GetOnlineSupportSiteUrl gets the onlineSupportSiteUrl property value. URL to the company/organization’s IT helpdesk site +func (m *IntuneBrandingProfile) GetOnlineSupportSiteUrl()(*string) { + return m.onlineSupportSiteUrl +} +// GetPrivacyUrl gets the privacyUrl property value. URL to the company/organization’s privacy policy +func (m *IntuneBrandingProfile) GetPrivacyUrl()(*string) { + return m.privacyUrl +} +// GetProfileDescription gets the profileDescription property value. Description of the profile +func (m *IntuneBrandingProfile) GetProfileDescription()(*string) { + return m.profileDescription +} +// GetProfileName gets the profileName property value. Name of the profile +func (m *IntuneBrandingProfile) GetProfileName()(*string) { + return m.profileName +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of scope tags assigned to the branding profile +func (m *IntuneBrandingProfile) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSendDeviceOwnershipChangePushNotification gets the sendDeviceOwnershipChangePushNotification property value. Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate +func (m *IntuneBrandingProfile) GetSendDeviceOwnershipChangePushNotification()(*bool) { + return m.sendDeviceOwnershipChangePushNotification +} +// GetShowAzureADEnterpriseApps gets the showAzureADEnterpriseApps property value. Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal +func (m *IntuneBrandingProfile) GetShowAzureADEnterpriseApps()(*bool) { + return m.showAzureADEnterpriseApps +} +// GetShowConfigurationManagerApps gets the showConfigurationManagerApps property value. Boolean that indicates if Configuration Manager Apps will be shown in Company Portal +func (m *IntuneBrandingProfile) GetShowConfigurationManagerApps()(*bool) { + return m.showConfigurationManagerApps +} +// GetShowDisplayNameNextToLogo gets the showDisplayNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image or not +func (m *IntuneBrandingProfile) GetShowDisplayNameNextToLogo()(*bool) { + return m.showDisplayNameNextToLogo +} +// GetShowLogo gets the showLogo property value. Boolean that represents whether the administrator-supplied logo images are shown or not +func (m *IntuneBrandingProfile) GetShowLogo()(*bool) { + return m.showLogo +} +// GetShowOfficeWebApps gets the showOfficeWebApps property value. Boolean that indicates if Office WebApps will be shown in Company Portal +func (m *IntuneBrandingProfile) GetShowOfficeWebApps()(*bool) { + return m.showOfficeWebApps +} +// GetThemeColor gets the themeColor property value. Primary theme color used in the Company Portal applications and web portal +func (m *IntuneBrandingProfile) GetThemeColor()(RgbColorable) { + return m.themeColor +} +// GetThemeColorLogo gets the themeColorLogo property value. Logo image displayed in Company Portal apps which have a theme color background behind the logo +func (m *IntuneBrandingProfile) GetThemeColorLogo()(MimeContentable) { + return m.themeColorLogo +} +// Serialize serializes information the current object +func (m *IntuneBrandingProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetCompanyPortalBlockedActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompanyPortalBlockedActions())) + for i, v := range m.GetCompanyPortalBlockedActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("companyPortalBlockedActions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contactITEmailAddress", m.GetContactITEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contactITName", m.GetContactITName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contactITNotes", m.GetContactITNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contactITPhoneNumber", m.GetContactITPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customCanSeePrivacyMessage", m.GetCustomCanSeePrivacyMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customCantSeePrivacyMessage", m.GetCustomCantSeePrivacyMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customPrivacyMessage", m.GetCustomPrivacyMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableClientTelemetry", m.GetDisableClientTelemetry()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEnrollmentAvailability() != nil { + cast := (*m.GetEnrollmentAvailability()).String() + err = writer.WriteStringValue("enrollmentAvailability", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultProfile", m.GetIsDefaultProfile()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFactoryResetDisabled", m.GetIsFactoryResetDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRemoveDeviceDisabled", m.GetIsRemoveDeviceDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("landingPageCustomizedImage", m.GetLandingPageCustomizedImage()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lightBackgroundLogo", m.GetLightBackgroundLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onlineSupportSiteName", m.GetOnlineSupportSiteName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onlineSupportSiteUrl", m.GetOnlineSupportSiteUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("privacyUrl", m.GetPrivacyUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("profileDescription", m.GetProfileDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("profileName", m.GetProfileName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("sendDeviceOwnershipChangePushNotification", m.GetSendDeviceOwnershipChangePushNotification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showAzureADEnterpriseApps", m.GetShowAzureADEnterpriseApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showConfigurationManagerApps", m.GetShowConfigurationManagerApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showDisplayNameNextToLogo", m.GetShowDisplayNameNextToLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showLogo", m.GetShowLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("showOfficeWebApps", m.GetShowOfficeWebApps()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("themeColor", m.GetThemeColor()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("themeColorLogo", m.GetThemeColorLogo()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the branding profile +func (m *IntuneBrandingProfile) SetAssignments(value []IntuneBrandingProfileAssignmentable)() { + m.assignments = value +} +// SetCompanyPortalBlockedActions sets the companyPortalBlockedActions property value. Collection of blocked actions on the company portal as per platform and device ownership types. +func (m *IntuneBrandingProfile) SetCompanyPortalBlockedActions(value []CompanyPortalBlockedActionable)() { + m.companyPortalBlockedActions = value +} +// SetContactITEmailAddress sets the contactITEmailAddress property value. E-mail address of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) SetContactITEmailAddress(value *string)() { + m.contactITEmailAddress = value +} +// SetContactITName sets the contactITName property value. Name of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) SetContactITName(value *string)() { + m.contactITName = value +} +// SetContactITNotes sets the contactITNotes property value. Text comments regarding the person/organization responsible for IT support +func (m *IntuneBrandingProfile) SetContactITNotes(value *string)() { + m.contactITNotes = value +} +// SetContactITPhoneNumber sets the contactITPhoneNumber property value. Phone number of the person/organization responsible for IT support +func (m *IntuneBrandingProfile) SetContactITPhoneNumber(value *string)() { + m.contactITPhoneNumber = value +} +// SetCreatedDateTime sets the createdDateTime property value. Time when the BrandingProfile was created +func (m *IntuneBrandingProfile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomCanSeePrivacyMessage sets the customCanSeePrivacyMessage property value. Text comments regarding what the admin has access to on the device +func (m *IntuneBrandingProfile) SetCustomCanSeePrivacyMessage(value *string)() { + m.customCanSeePrivacyMessage = value +} +// SetCustomCantSeePrivacyMessage sets the customCantSeePrivacyMessage property value. Text comments regarding what the admin doesn't have access to on the device +func (m *IntuneBrandingProfile) SetCustomCantSeePrivacyMessage(value *string)() { + m.customCantSeePrivacyMessage = value +} +// SetCustomPrivacyMessage sets the customPrivacyMessage property value. Text comments regarding what the admin doesn't have access to on the device +func (m *IntuneBrandingProfile) SetCustomPrivacyMessage(value *string)() { + m.customPrivacyMessage = value +} +// SetDisableClientTelemetry sets the disableClientTelemetry property value. Applies to telemetry sent from all clients to the Intune service. When disabled, all proactive troubleshooting and issue warnings within the client are turned off, and telemetry settings appear inactive or hidden to the device user. +func (m *IntuneBrandingProfile) SetDisableClientTelemetry(value *bool)() { + m.disableClientTelemetry = value +} +// SetDisplayName sets the displayName property value. Company/organization name that is displayed to end users +func (m *IntuneBrandingProfile) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnrollmentAvailability sets the enrollmentAvailability property value. Options available for enrollment flow customization +func (m *IntuneBrandingProfile) SetEnrollmentAvailability(value *EnrollmentAvailabilityOptions)() { + m.enrollmentAvailability = value +} +// SetIsDefaultProfile sets the isDefaultProfile property value. Boolean that represents whether the profile is used as default or not +func (m *IntuneBrandingProfile) SetIsDefaultProfile(value *bool)() { + m.isDefaultProfile = value +} +// SetIsFactoryResetDisabled sets the isFactoryResetDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Factory Reset' action on corporate owned devices. +func (m *IntuneBrandingProfile) SetIsFactoryResetDisabled(value *bool)() { + m.isFactoryResetDisabled = value +} +// SetIsRemoveDeviceDisabled sets the isRemoveDeviceDisabled property value. Boolean that represents whether the adminsistrator has disabled the 'Remove Device' action on corporate owned devices. +func (m *IntuneBrandingProfile) SetIsRemoveDeviceDisabled(value *bool)() { + m.isRemoveDeviceDisabled = value +} +// SetLandingPageCustomizedImage sets the landingPageCustomizedImage property value. Customized image displayed in Company Portal apps landing page +func (m *IntuneBrandingProfile) SetLandingPageCustomizedImage(value MimeContentable)() { + m.landingPageCustomizedImage = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Time when the BrandingProfile was last modified +func (m *IntuneBrandingProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLightBackgroundLogo sets the lightBackgroundLogo property value. Logo image displayed in Company Portal apps which have a light background behind the logo +func (m *IntuneBrandingProfile) SetLightBackgroundLogo(value MimeContentable)() { + m.lightBackgroundLogo = value +} +// SetOnlineSupportSiteName sets the onlineSupportSiteName property value. Display name of the company/organization’s IT helpdesk site +func (m *IntuneBrandingProfile) SetOnlineSupportSiteName(value *string)() { + m.onlineSupportSiteName = value +} +// SetOnlineSupportSiteUrl sets the onlineSupportSiteUrl property value. URL to the company/organization’s IT helpdesk site +func (m *IntuneBrandingProfile) SetOnlineSupportSiteUrl(value *string)() { + m.onlineSupportSiteUrl = value +} +// SetPrivacyUrl sets the privacyUrl property value. URL to the company/organization’s privacy policy +func (m *IntuneBrandingProfile) SetPrivacyUrl(value *string)() { + m.privacyUrl = value +} +// SetProfileDescription sets the profileDescription property value. Description of the profile +func (m *IntuneBrandingProfile) SetProfileDescription(value *string)() { + m.profileDescription = value +} +// SetProfileName sets the profileName property value. Name of the profile +func (m *IntuneBrandingProfile) SetProfileName(value *string)() { + m.profileName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of scope tags assigned to the branding profile +func (m *IntuneBrandingProfile) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSendDeviceOwnershipChangePushNotification sets the sendDeviceOwnershipChangePushNotification property value. Boolean that indicates if a push notification is sent to users when their device ownership type changes from personal to corporate +func (m *IntuneBrandingProfile) SetSendDeviceOwnershipChangePushNotification(value *bool)() { + m.sendDeviceOwnershipChangePushNotification = value +} +// SetShowAzureADEnterpriseApps sets the showAzureADEnterpriseApps property value. Boolean that indicates if AzureAD Enterprise Apps will be shown in Company Portal +func (m *IntuneBrandingProfile) SetShowAzureADEnterpriseApps(value *bool)() { + m.showAzureADEnterpriseApps = value +} +// SetShowConfigurationManagerApps sets the showConfigurationManagerApps property value. Boolean that indicates if Configuration Manager Apps will be shown in Company Portal +func (m *IntuneBrandingProfile) SetShowConfigurationManagerApps(value *bool)() { + m.showConfigurationManagerApps = value +} +// SetShowDisplayNameNextToLogo sets the showDisplayNameNextToLogo property value. Boolean that represents whether the administrator-supplied display name will be shown next to the logo image or not +func (m *IntuneBrandingProfile) SetShowDisplayNameNextToLogo(value *bool)() { + m.showDisplayNameNextToLogo = value +} +// SetShowLogo sets the showLogo property value. Boolean that represents whether the administrator-supplied logo images are shown or not +func (m *IntuneBrandingProfile) SetShowLogo(value *bool)() { + m.showLogo = value +} +// SetShowOfficeWebApps sets the showOfficeWebApps property value. Boolean that indicates if Office WebApps will be shown in Company Portal +func (m *IntuneBrandingProfile) SetShowOfficeWebApps(value *bool)() { + m.showOfficeWebApps = value +} +// SetThemeColor sets the themeColor property value. Primary theme color used in the Company Portal applications and web portal +func (m *IntuneBrandingProfile) SetThemeColor(value RgbColorable)() { + m.themeColor = value +} +// SetThemeColorLogo sets the themeColorLogo property value. Logo image displayed in Company Portal apps which have a theme color background behind the logo +func (m *IntuneBrandingProfile) SetThemeColorLogo(value MimeContentable)() { + m.themeColorLogo = value +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment.go new file mode 100644 index 000000000..41bc771a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileAssignment this entity contains the properties used to assign a branding profile to a group. +type IntuneBrandingProfileAssignment struct { + Entity + // Assignment target that the branding profile is assigned to. + target DeviceAndAppManagementAssignmentTargetable +} +// NewIntuneBrandingProfileAssignment instantiates a new intuneBrandingProfileAssignment and sets the default values. +func NewIntuneBrandingProfileAssignment()(*IntuneBrandingProfileAssignment) { + m := &IntuneBrandingProfileAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateIntuneBrandingProfileAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntuneBrandingProfileAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntuneBrandingProfileAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntuneBrandingProfileAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. Assignment target that the branding profile is assigned to. +func (m *IntuneBrandingProfileAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *IntuneBrandingProfileAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. Assignment target that the branding profile is assigned to. +func (m *IntuneBrandingProfileAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_response.go new file mode 100644 index 000000000..97f0f0ddb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileAssignmentCollectionResponse +type IntuneBrandingProfileAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IntuneBrandingProfileAssignmentable +} +// NewIntuneBrandingProfileAssignmentCollectionResponse instantiates a new IntuneBrandingProfileAssignmentCollectionResponse and sets the default values. +func NewIntuneBrandingProfileAssignmentCollectionResponse()(*IntuneBrandingProfileAssignmentCollectionResponse) { + m := &IntuneBrandingProfileAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIntuneBrandingProfileAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntuneBrandingProfileAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntuneBrandingProfileAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntuneBrandingProfileAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntuneBrandingProfileAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntuneBrandingProfileAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IntuneBrandingProfileAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IntuneBrandingProfileAssignmentCollectionResponse) GetValue()([]IntuneBrandingProfileAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IntuneBrandingProfileAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IntuneBrandingProfileAssignmentCollectionResponse) SetValue(value []IntuneBrandingProfileAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_responseable.go new file mode 100644 index 000000000..3350ad98a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileAssignmentCollectionResponseable +type IntuneBrandingProfileAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IntuneBrandingProfileAssignmentable) + SetValue(value []IntuneBrandingProfileAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignmentable.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignmentable.go new file mode 100644 index 000000000..e1b6b9033 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileAssignmentable +type IntuneBrandingProfileAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_response.go new file mode 100644 index 000000000..0cf50b280 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileCollectionResponse +type IntuneBrandingProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IntuneBrandingProfileable +} +// NewIntuneBrandingProfileCollectionResponse instantiates a new IntuneBrandingProfileCollectionResponse and sets the default values. +func NewIntuneBrandingProfileCollectionResponse()(*IntuneBrandingProfileCollectionResponse) { + m := &IntuneBrandingProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIntuneBrandingProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIntuneBrandingProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIntuneBrandingProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IntuneBrandingProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntuneBrandingProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntuneBrandingProfileable, len(val)) + for i, v := range val { + res[i] = v.(IntuneBrandingProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IntuneBrandingProfileCollectionResponse) GetValue()([]IntuneBrandingProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IntuneBrandingProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IntuneBrandingProfileCollectionResponse) SetValue(value []IntuneBrandingProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_responseable.go new file mode 100644 index 000000000..f2c7c9f7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileCollectionResponseable +type IntuneBrandingProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IntuneBrandingProfileable) + SetValue(value []IntuneBrandingProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/intune_branding_profileable.go b/src/internal/connector/graph/betasdk/models/intune_branding_profileable.go new file mode 100644 index 000000000..dae0ce777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/intune_branding_profileable.go @@ -0,0 +1,78 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IntuneBrandingProfileable +type IntuneBrandingProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]IntuneBrandingProfileAssignmentable) + GetCompanyPortalBlockedActions()([]CompanyPortalBlockedActionable) + GetContactITEmailAddress()(*string) + GetContactITName()(*string) + GetContactITNotes()(*string) + GetContactITPhoneNumber()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomCanSeePrivacyMessage()(*string) + GetCustomCantSeePrivacyMessage()(*string) + GetCustomPrivacyMessage()(*string) + GetDisableClientTelemetry()(*bool) + GetDisplayName()(*string) + GetEnrollmentAvailability()(*EnrollmentAvailabilityOptions) + GetIsDefaultProfile()(*bool) + GetIsFactoryResetDisabled()(*bool) + GetIsRemoveDeviceDisabled()(*bool) + GetLandingPageCustomizedImage()(MimeContentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLightBackgroundLogo()(MimeContentable) + GetOnlineSupportSiteName()(*string) + GetOnlineSupportSiteUrl()(*string) + GetPrivacyUrl()(*string) + GetProfileDescription()(*string) + GetProfileName()(*string) + GetRoleScopeTagIds()([]string) + GetSendDeviceOwnershipChangePushNotification()(*bool) + GetShowAzureADEnterpriseApps()(*bool) + GetShowConfigurationManagerApps()(*bool) + GetShowDisplayNameNextToLogo()(*bool) + GetShowLogo()(*bool) + GetShowOfficeWebApps()(*bool) + GetThemeColor()(RgbColorable) + GetThemeColorLogo()(MimeContentable) + SetAssignments(value []IntuneBrandingProfileAssignmentable)() + SetCompanyPortalBlockedActions(value []CompanyPortalBlockedActionable)() + SetContactITEmailAddress(value *string)() + SetContactITName(value *string)() + SetContactITNotes(value *string)() + SetContactITPhoneNumber(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomCanSeePrivacyMessage(value *string)() + SetCustomCantSeePrivacyMessage(value *string)() + SetCustomPrivacyMessage(value *string)() + SetDisableClientTelemetry(value *bool)() + SetDisplayName(value *string)() + SetEnrollmentAvailability(value *EnrollmentAvailabilityOptions)() + SetIsDefaultProfile(value *bool)() + SetIsFactoryResetDisabled(value *bool)() + SetIsRemoveDeviceDisabled(value *bool)() + SetLandingPageCustomizedImage(value MimeContentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLightBackgroundLogo(value MimeContentable)() + SetOnlineSupportSiteName(value *string)() + SetOnlineSupportSiteUrl(value *string)() + SetPrivacyUrl(value *string)() + SetProfileDescription(value *string)() + SetProfileName(value *string)() + SetRoleScopeTagIds(value []string)() + SetSendDeviceOwnershipChangePushNotification(value *bool)() + SetShowAzureADEnterpriseApps(value *bool)() + SetShowConfigurationManagerApps(value *bool)() + SetShowDisplayNameNextToLogo(value *bool)() + SetShowLogo(value *bool)() + SetShowOfficeWebApps(value *bool)() + SetThemeColor(value RgbColorable)() + SetThemeColorLogo(value MimeContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/investigation_security_state.go b/src/internal/connector/graph/betasdk/models/investigation_security_state.go new file mode 100644 index 000000000..f5ef1eb39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/investigation_security_state.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvestigationSecurityState +type InvestigationSecurityState 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 name property + name *string + // The OdataType property + odataType *string + // The status property + status *string +} +// NewInvestigationSecurityState instantiates a new investigationSecurityState and sets the default values. +func NewInvestigationSecurityState()(*InvestigationSecurityState) { + m := &InvestigationSecurityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInvestigationSecurityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvestigationSecurityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvestigationSecurityState(), 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 *InvestigationSecurityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvestigationSecurityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *InvestigationSecurityState) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InvestigationSecurityState) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status property +func (m *InvestigationSecurityState) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *InvestigationSecurityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("status", m.GetStatus()) + 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 *InvestigationSecurityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *InvestigationSecurityState) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InvestigationSecurityState) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status property +func (m *InvestigationSecurityState) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_response.go b/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_response.go new file mode 100644 index 000000000..3c877b66f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvestigationSecurityStateCollectionResponse +type InvestigationSecurityStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InvestigationSecurityStateable +} +// NewInvestigationSecurityStateCollectionResponse instantiates a new InvestigationSecurityStateCollectionResponse and sets the default values. +func NewInvestigationSecurityStateCollectionResponse()(*InvestigationSecurityStateCollectionResponse) { + m := &InvestigationSecurityStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInvestigationSecurityStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvestigationSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvestigationSecurityStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvestigationSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvestigationSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvestigationSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(InvestigationSecurityStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InvestigationSecurityStateCollectionResponse) GetValue()([]InvestigationSecurityStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *InvestigationSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InvestigationSecurityStateCollectionResponse) SetValue(value []InvestigationSecurityStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_responseable.go new file mode 100644 index 000000000..5f24c2b6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/investigation_security_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvestigationSecurityStateCollectionResponseable +type InvestigationSecurityStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InvestigationSecurityStateable) + SetValue(value []InvestigationSecurityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/investigation_security_stateable.go b/src/internal/connector/graph/betasdk/models/investigation_security_stateable.go new file mode 100644 index 000000000..ef110b9a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/investigation_security_stateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvestigationSecurityStateable +type InvestigationSecurityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetStatus()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/invitation.go b/src/internal/connector/graph/betasdk/models/invitation.go new file mode 100644 index 000000000..5641a9d24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Invitation +type Invitation struct { + Entity + // The user created as part of the invitation creation. Read-Only + invitedUser Userable + // The display name of the user being invited. + invitedUserDisplayName *string + // The email address of the user being invited. Required. The following special characters are not permitted in the email address:Tilde (~)Exclamation point (!)At sign (@)Number sign (#)Dollar sign ($)Percent (%)Circumflex (^)Ampersand (&)Asterisk (*)Parentheses (( ))Hyphen (-)Plus sign (+)Equal sign (=)Brackets ([ ])Braces ({ })Backslash (/)Slash mark (/)Pipe (` + invitedUserEmailAddress *string + // Additional configuration for the message being sent to the invited user, including customizing message text, language and cc recipient list. + invitedUserMessageInfo InvitedUserMessageInfoable + // The userType of the user being invited. By default, this is Guest. You can invite as Member if you're are company administrator. The default is false. + invitedUserType *string + // The URL the user can use to redeem their invitation. Read-only. + inviteRedeemUrl *string + // The URL user should be redirected to once the invitation is redeemed. Required. + inviteRedirectUrl *string + // Reset the user's redemption status and reinvite a user while retaining their user identifier, group memberships, and app assignments. This property allows you to enable a user to sign-in using a different email address from the one in the previous invitation. For more information about using this property, see Reset redemption status for a guest user (Preview). + resetRedemption *bool + // Indicates whether an email should be sent to the user being invited. The default is false. + sendInvitationMessage *bool + // The status of the invitation. Possible values: PendingAcceptance, Completed, InProgress, and Error + status *string +} +// NewInvitation instantiates a new Invitation and sets the default values. +func NewInvitation()(*Invitation) { + m := &Invitation{ + Entity: *NewEntity(), + } + return m +} +// CreateInvitationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvitationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvitation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Invitation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["invitedUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvitedUser(val.(Userable)) + } + return nil + } + res["invitedUserDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitedUserDisplayName(val) + } + return nil + } + res["invitedUserEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitedUserEmailAddress(val) + } + return nil + } + res["invitedUserMessageInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInvitedUserMessageInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvitedUserMessageInfo(val.(InvitedUserMessageInfoable)) + } + return nil + } + res["invitedUserType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitedUserType(val) + } + return nil + } + res["inviteRedeemUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInviteRedeemUrl(val) + } + return nil + } + res["inviteRedirectUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInviteRedirectUrl(val) + } + return nil + } + res["resetRedemption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetResetRedemption(val) + } + return nil + } + res["sendInvitationMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSendInvitationMessage(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetInvitedUser gets the invitedUser property value. The user created as part of the invitation creation. Read-Only +func (m *Invitation) GetInvitedUser()(Userable) { + return m.invitedUser +} +// GetInvitedUserDisplayName gets the invitedUserDisplayName property value. The display name of the user being invited. +func (m *Invitation) GetInvitedUserDisplayName()(*string) { + return m.invitedUserDisplayName +} +// GetInvitedUserEmailAddress gets the invitedUserEmailAddress property value. The email address of the user being invited. Required. The following special characters are not permitted in the email address:Tilde (~)Exclamation point (!)At sign (@)Number sign (#)Dollar sign ($)Percent (%)Circumflex (^)Ampersand (&)Asterisk (*)Parentheses (( ))Hyphen (-)Plus sign (+)Equal sign (=)Brackets ([ ])Braces ({ })Backslash (/)Slash mark (/)Pipe (` +func (m *Invitation) GetInvitedUserEmailAddress()(*string) { + return m.invitedUserEmailAddress +} +// GetInvitedUserMessageInfo gets the invitedUserMessageInfo property value. Additional configuration for the message being sent to the invited user, including customizing message text, language and cc recipient list. +func (m *Invitation) GetInvitedUserMessageInfo()(InvitedUserMessageInfoable) { + return m.invitedUserMessageInfo +} +// GetInvitedUserType gets the invitedUserType property value. The userType of the user being invited. By default, this is Guest. You can invite as Member if you're are company administrator. The default is false. +func (m *Invitation) GetInvitedUserType()(*string) { + return m.invitedUserType +} +// GetInviteRedeemUrl gets the inviteRedeemUrl property value. The URL the user can use to redeem their invitation. Read-only. +func (m *Invitation) GetInviteRedeemUrl()(*string) { + return m.inviteRedeemUrl +} +// GetInviteRedirectUrl gets the inviteRedirectUrl property value. The URL user should be redirected to once the invitation is redeemed. Required. +func (m *Invitation) GetInviteRedirectUrl()(*string) { + return m.inviteRedirectUrl +} +// GetResetRedemption gets the resetRedemption property value. Reset the user's redemption status and reinvite a user while retaining their user identifier, group memberships, and app assignments. This property allows you to enable a user to sign-in using a different email address from the one in the previous invitation. For more information about using this property, see Reset redemption status for a guest user (Preview). +func (m *Invitation) GetResetRedemption()(*bool) { + return m.resetRedemption +} +// GetSendInvitationMessage gets the sendInvitationMessage property value. Indicates whether an email should be sent to the user being invited. The default is false. +func (m *Invitation) GetSendInvitationMessage()(*bool) { + return m.sendInvitationMessage +} +// GetStatus gets the status property value. The status of the invitation. Possible values: PendingAcceptance, Completed, InProgress, and Error +func (m *Invitation) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *Invitation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("invitedUser", m.GetInvitedUser()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invitedUserDisplayName", m.GetInvitedUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invitedUserEmailAddress", m.GetInvitedUserEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("invitedUserMessageInfo", m.GetInvitedUserMessageInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invitedUserType", m.GetInvitedUserType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("inviteRedeemUrl", m.GetInviteRedeemUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("inviteRedirectUrl", m.GetInviteRedirectUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("resetRedemption", m.GetResetRedemption()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("sendInvitationMessage", m.GetSendInvitationMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetInvitedUser sets the invitedUser property value. The user created as part of the invitation creation. Read-Only +func (m *Invitation) SetInvitedUser(value Userable)() { + m.invitedUser = value +} +// SetInvitedUserDisplayName sets the invitedUserDisplayName property value. The display name of the user being invited. +func (m *Invitation) SetInvitedUserDisplayName(value *string)() { + m.invitedUserDisplayName = value +} +// SetInvitedUserEmailAddress sets the invitedUserEmailAddress property value. The email address of the user being invited. Required. The following special characters are not permitted in the email address:Tilde (~)Exclamation point (!)At sign (@)Number sign (#)Dollar sign ($)Percent (%)Circumflex (^)Ampersand (&)Asterisk (*)Parentheses (( ))Hyphen (-)Plus sign (+)Equal sign (=)Brackets ([ ])Braces ({ })Backslash (/)Slash mark (/)Pipe (` +func (m *Invitation) SetInvitedUserEmailAddress(value *string)() { + m.invitedUserEmailAddress = value +} +// SetInvitedUserMessageInfo sets the invitedUserMessageInfo property value. Additional configuration for the message being sent to the invited user, including customizing message text, language and cc recipient list. +func (m *Invitation) SetInvitedUserMessageInfo(value InvitedUserMessageInfoable)() { + m.invitedUserMessageInfo = value +} +// SetInvitedUserType sets the invitedUserType property value. The userType of the user being invited. By default, this is Guest. You can invite as Member if you're are company administrator. The default is false. +func (m *Invitation) SetInvitedUserType(value *string)() { + m.invitedUserType = value +} +// SetInviteRedeemUrl sets the inviteRedeemUrl property value. The URL the user can use to redeem their invitation. Read-only. +func (m *Invitation) SetInviteRedeemUrl(value *string)() { + m.inviteRedeemUrl = value +} +// SetInviteRedirectUrl sets the inviteRedirectUrl property value. The URL user should be redirected to once the invitation is redeemed. Required. +func (m *Invitation) SetInviteRedirectUrl(value *string)() { + m.inviteRedirectUrl = value +} +// SetResetRedemption sets the resetRedemption property value. Reset the user's redemption status and reinvite a user while retaining their user identifier, group memberships, and app assignments. This property allows you to enable a user to sign-in using a different email address from the one in the previous invitation. For more information about using this property, see Reset redemption status for a guest user (Preview). +func (m *Invitation) SetResetRedemption(value *bool)() { + m.resetRedemption = value +} +// SetSendInvitationMessage sets the sendInvitationMessage property value. Indicates whether an email should be sent to the user being invited. The default is false. +func (m *Invitation) SetSendInvitationMessage(value *bool)() { + m.sendInvitationMessage = value +} +// SetStatus sets the status property value. The status of the invitation. Possible values: PendingAcceptance, Completed, InProgress, and Error +func (m *Invitation) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_collection_response.go b/src/internal/connector/graph/betasdk/models/invitation_collection_response.go new file mode 100644 index 000000000..1fd49cf23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationCollectionResponse +type InvitationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Invitationable +} +// NewInvitationCollectionResponse instantiates a new InvitationCollectionResponse and sets the default values. +func NewInvitationCollectionResponse()(*InvitationCollectionResponse) { + m := &InvitationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInvitationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvitationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvitationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvitationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvitationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Invitationable, len(val)) + for i, v := range val { + res[i] = v.(Invitationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InvitationCollectionResponse) GetValue()([]Invitationable) { + return m.value +} +// Serialize serializes information the current object +func (m *InvitationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InvitationCollectionResponse) SetValue(value []Invitationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/invitation_collection_responseable.go new file mode 100644 index 000000000..3b6605557 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationCollectionResponseable +type InvitationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Invitationable) + SetValue(value []Invitationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_participant_info.go b/src/internal/connector/graph/betasdk/models/invitation_participant_info.go new file mode 100644 index 000000000..a38ba476e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_participant_info.go @@ -0,0 +1,228 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationParticipantInfo +type InvitationParticipantInfo 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 type of endpoint. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. + endpointType *EndpointType + // Optional. Whether to hide the participant from the roster. + hidden *bool + // The identity property + identity IdentitySetable + // The OdataType property + odataType *string + // Optional. The ID of the target participant. + participantId *string + // Optional. Whether to remove them from the main mixer. + removeFromDefaultAudioRoutingGroup *bool + // Optional. The call which the target identity is currently a part of. For peer-to-peer case, the call will be dropped once the participant is added successfully. + replacesCallId *string +} +// NewInvitationParticipantInfo instantiates a new invitationParticipantInfo and sets the default values. +func NewInvitationParticipantInfo()(*InvitationParticipantInfo) { + m := &InvitationParticipantInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInvitationParticipantInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvitationParticipantInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvitationParticipantInfo(), 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 *InvitationParticipantInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndpointType gets the endpointType property value. The type of endpoint. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. +func (m *InvitationParticipantInfo) GetEndpointType()(*EndpointType) { + return m.endpointType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvitationParticipantInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endpointType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointType) + if err != nil { + return err + } + if val != nil { + m.SetEndpointType(val.(*EndpointType)) + } + return nil + } + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(val) + } + return nil + } + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentity(val.(IdentitySetable)) + } + 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["participantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParticipantId(val) + } + return nil + } + res["removeFromDefaultAudioRoutingGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoveFromDefaultAudioRoutingGroup(val) + } + return nil + } + res["replacesCallId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReplacesCallId(val) + } + return nil + } + return res +} +// GetHidden gets the hidden property value. Optional. Whether to hide the participant from the roster. +func (m *InvitationParticipantInfo) GetHidden()(*bool) { + return m.hidden +} +// GetIdentity gets the identity property value. The identity property +func (m *InvitationParticipantInfo) GetIdentity()(IdentitySetable) { + return m.identity +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InvitationParticipantInfo) GetOdataType()(*string) { + return m.odataType +} +// GetParticipantId gets the participantId property value. Optional. The ID of the target participant. +func (m *InvitationParticipantInfo) GetParticipantId()(*string) { + return m.participantId +} +// GetRemoveFromDefaultAudioRoutingGroup gets the removeFromDefaultAudioRoutingGroup property value. Optional. Whether to remove them from the main mixer. +func (m *InvitationParticipantInfo) GetRemoveFromDefaultAudioRoutingGroup()(*bool) { + return m.removeFromDefaultAudioRoutingGroup +} +// GetReplacesCallId gets the replacesCallId property value. Optional. The call which the target identity is currently a part of. For peer-to-peer case, the call will be dropped once the participant is added successfully. +func (m *InvitationParticipantInfo) GetReplacesCallId()(*string) { + return m.replacesCallId +} +// Serialize serializes information the current object +func (m *InvitationParticipantInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEndpointType() != nil { + cast := (*m.GetEndpointType()).String() + err := writer.WriteStringValue("endpointType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("participantId", m.GetParticipantId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("removeFromDefaultAudioRoutingGroup", m.GetRemoveFromDefaultAudioRoutingGroup()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("replacesCallId", m.GetReplacesCallId()) + 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 *InvitationParticipantInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndpointType sets the endpointType property value. The type of endpoint. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. +func (m *InvitationParticipantInfo) SetEndpointType(value *EndpointType)() { + m.endpointType = value +} +// SetHidden sets the hidden property value. Optional. Whether to hide the participant from the roster. +func (m *InvitationParticipantInfo) SetHidden(value *bool)() { + m.hidden = value +} +// SetIdentity sets the identity property value. The identity property +func (m *InvitationParticipantInfo) SetIdentity(value IdentitySetable)() { + m.identity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InvitationParticipantInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetParticipantId sets the participantId property value. Optional. The ID of the target participant. +func (m *InvitationParticipantInfo) SetParticipantId(value *string)() { + m.participantId = value +} +// SetRemoveFromDefaultAudioRoutingGroup sets the removeFromDefaultAudioRoutingGroup property value. Optional. Whether to remove them from the main mixer. +func (m *InvitationParticipantInfo) SetRemoveFromDefaultAudioRoutingGroup(value *bool)() { + m.removeFromDefaultAudioRoutingGroup = value +} +// SetReplacesCallId sets the replacesCallId property value. Optional. The call which the target identity is currently a part of. For peer-to-peer case, the call will be dropped once the participant is added successfully. +func (m *InvitationParticipantInfo) SetReplacesCallId(value *string)() { + m.replacesCallId = value +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_response.go b/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_response.go new file mode 100644 index 000000000..31a33f643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationParticipantInfoCollectionResponse +type InvitationParticipantInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InvitationParticipantInfoable +} +// NewInvitationParticipantInfoCollectionResponse instantiates a new InvitationParticipantInfoCollectionResponse and sets the default values. +func NewInvitationParticipantInfoCollectionResponse()(*InvitationParticipantInfoCollectionResponse) { + m := &InvitationParticipantInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInvitationParticipantInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvitationParticipantInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvitationParticipantInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvitationParticipantInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvitationParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvitationParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(InvitationParticipantInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InvitationParticipantInfoCollectionResponse) GetValue()([]InvitationParticipantInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *InvitationParticipantInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InvitationParticipantInfoCollectionResponse) SetValue(value []InvitationParticipantInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_responseable.go new file mode 100644 index 000000000..a26c8f9cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_participant_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationParticipantInfoCollectionResponseable +type InvitationParticipantInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InvitationParticipantInfoable) + SetValue(value []InvitationParticipantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/invitation_participant_infoable.go b/src/internal/connector/graph/betasdk/models/invitation_participant_infoable.go new file mode 100644 index 000000000..653329124 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitation_participant_infoable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitationParticipantInfoable +type InvitationParticipantInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndpointType()(*EndpointType) + GetHidden()(*bool) + GetIdentity()(IdentitySetable) + GetOdataType()(*string) + GetParticipantId()(*string) + GetRemoveFromDefaultAudioRoutingGroup()(*bool) + GetReplacesCallId()(*string) + SetEndpointType(value *EndpointType)() + SetHidden(value *bool)() + SetIdentity(value IdentitySetable)() + SetOdataType(value *string)() + SetParticipantId(value *string)() + SetRemoveFromDefaultAudioRoutingGroup(value *bool)() + SetReplacesCallId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/invitationable.go b/src/internal/connector/graph/betasdk/models/invitationable.go new file mode 100644 index 000000000..a8019dfd2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invitationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Invitationable +type Invitationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInvitedUser()(Userable) + GetInvitedUserDisplayName()(*string) + GetInvitedUserEmailAddress()(*string) + GetInvitedUserMessageInfo()(InvitedUserMessageInfoable) + GetInvitedUserType()(*string) + GetInviteRedeemUrl()(*string) + GetInviteRedirectUrl()(*string) + GetResetRedemption()(*bool) + GetSendInvitationMessage()(*bool) + GetStatus()(*string) + SetInvitedUser(value Userable)() + SetInvitedUserDisplayName(value *string)() + SetInvitedUserEmailAddress(value *string)() + SetInvitedUserMessageInfo(value InvitedUserMessageInfoable)() + SetInvitedUserType(value *string)() + SetInviteRedeemUrl(value *string)() + SetInviteRedirectUrl(value *string)() + SetResetRedemption(value *bool)() + SetSendInvitationMessage(value *bool)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/invite_participants_operation.go b/src/internal/connector/graph/betasdk/models/invite_participants_operation.go new file mode 100644 index 000000000..eb9ee9251 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invite_participants_operation.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InviteParticipantsOperation +type InviteParticipantsOperation struct { + CommsOperation + // The participants to invite. + participants []InvitationParticipantInfoable +} +// NewInviteParticipantsOperation instantiates a new InviteParticipantsOperation and sets the default values. +func NewInviteParticipantsOperation()(*InviteParticipantsOperation) { + m := &InviteParticipantsOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateInviteParticipantsOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInviteParticipantsOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInviteParticipantsOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InviteParticipantsOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvitationParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvitationParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(InvitationParticipantInfoable) + } + m.SetParticipants(res) + } + return nil + } + return res +} +// GetParticipants gets the participants property value. The participants to invite. +func (m *InviteParticipantsOperation) GetParticipants()([]InvitationParticipantInfoable) { + return m.participants +} +// Serialize serializes information the current object +func (m *InviteParticipantsOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + if m.GetParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParticipants())) + for i, v := range m.GetParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("participants", cast) + if err != nil { + return err + } + } + return nil +} +// SetParticipants sets the participants property value. The participants to invite. +func (m *InviteParticipantsOperation) SetParticipants(value []InvitationParticipantInfoable)() { + m.participants = value +} diff --git a/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_response.go new file mode 100644 index 000000000..ffab56bd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InviteParticipantsOperationCollectionResponse +type InviteParticipantsOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InviteParticipantsOperationable +} +// NewInviteParticipantsOperationCollectionResponse instantiates a new InviteParticipantsOperationCollectionResponse and sets the default values. +func NewInviteParticipantsOperationCollectionResponse()(*InviteParticipantsOperationCollectionResponse) { + m := &InviteParticipantsOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInviteParticipantsOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInviteParticipantsOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInviteParticipantsOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InviteParticipantsOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInviteParticipantsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InviteParticipantsOperationable, len(val)) + for i, v := range val { + res[i] = v.(InviteParticipantsOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InviteParticipantsOperationCollectionResponse) GetValue()([]InviteParticipantsOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *InviteParticipantsOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InviteParticipantsOperationCollectionResponse) SetValue(value []InviteParticipantsOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_responseable.go new file mode 100644 index 000000000..f53c699a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invite_participants_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InviteParticipantsOperationCollectionResponseable +type InviteParticipantsOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InviteParticipantsOperationable) + SetValue(value []InviteParticipantsOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/invite_participants_operationable.go b/src/internal/connector/graph/betasdk/models/invite_participants_operationable.go new file mode 100644 index 000000000..02ad07565 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invite_participants_operationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InviteParticipantsOperationable +type InviteParticipantsOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParticipants()([]InvitationParticipantInfoable) + SetParticipants(value []InvitationParticipantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/invited_user_message_info.go b/src/internal/connector/graph/betasdk/models/invited_user_message_info.go new file mode 100644 index 000000000..957ca1bac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invited_user_message_info.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitedUserMessageInfo +type InvitedUserMessageInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Additional recipients the invitation message should be sent to. Currently only 1 additional recipient is supported. + ccRecipients []Recipientable + // Customized message body you want to send if you don't want the default message. + customizedMessageBody *string + // The language you want to send the default message in. If the customizedMessageBody is specified, this property is ignored, and the message is sent using the customizedMessageBody. The language format should be in ISO 639. The default is en-US. + messageLanguage *string + // The OdataType property + odataType *string +} +// NewInvitedUserMessageInfo instantiates a new invitedUserMessageInfo and sets the default values. +func NewInvitedUserMessageInfo()(*InvitedUserMessageInfo) { + m := &InvitedUserMessageInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInvitedUserMessageInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvitedUserMessageInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvitedUserMessageInfo(), 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 *InvitedUserMessageInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCcRecipients gets the ccRecipients property value. Additional recipients the invitation message should be sent to. Currently only 1 additional recipient is supported. +func (m *InvitedUserMessageInfo) GetCcRecipients()([]Recipientable) { + return m.ccRecipients +} +// GetCustomizedMessageBody gets the customizedMessageBody property value. Customized message body you want to send if you don't want the default message. +func (m *InvitedUserMessageInfo) GetCustomizedMessageBody()(*string) { + return m.customizedMessageBody +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvitedUserMessageInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ccRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetCcRecipients(res) + } + return nil + } + res["customizedMessageBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomizedMessageBody(val) + } + return nil + } + res["messageLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageLanguage(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 + } + return res +} +// GetMessageLanguage gets the messageLanguage property value. The language you want to send the default message in. If the customizedMessageBody is specified, this property is ignored, and the message is sent using the customizedMessageBody. The language format should be in ISO 639. The default is en-US. +func (m *InvitedUserMessageInfo) GetMessageLanguage()(*string) { + return m.messageLanguage +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InvitedUserMessageInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *InvitedUserMessageInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCcRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCcRecipients())) + for i, v := range m.GetCcRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("ccRecipients", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("customizedMessageBody", m.GetCustomizedMessageBody()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("messageLanguage", m.GetMessageLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *InvitedUserMessageInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCcRecipients sets the ccRecipients property value. Additional recipients the invitation message should be sent to. Currently only 1 additional recipient is supported. +func (m *InvitedUserMessageInfo) SetCcRecipients(value []Recipientable)() { + m.ccRecipients = value +} +// SetCustomizedMessageBody sets the customizedMessageBody property value. Customized message body you want to send if you don't want the default message. +func (m *InvitedUserMessageInfo) SetCustomizedMessageBody(value *string)() { + m.customizedMessageBody = value +} +// SetMessageLanguage sets the messageLanguage property value. The language you want to send the default message in. If the customizedMessageBody is specified, this property is ignored, and the message is sent using the customizedMessageBody. The language format should be in ISO 639. The default is en-US. +func (m *InvitedUserMessageInfo) SetMessageLanguage(value *string)() { + m.messageLanguage = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InvitedUserMessageInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/invited_user_message_infoable.go b/src/internal/connector/graph/betasdk/models/invited_user_message_infoable.go new file mode 100644 index 000000000..edd01e329 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invited_user_message_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvitedUserMessageInfoable +type InvitedUserMessageInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCcRecipients()([]Recipientable) + GetCustomizedMessageBody()(*string) + GetMessageLanguage()(*string) + GetOdataType()(*string) + SetCcRecipients(value []Recipientable)() + SetCustomizedMessageBody(value *string)() + SetMessageLanguage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener.go b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener.go new file mode 100644 index 000000000..ea26756d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvokeUserFlowListener +type InvokeUserFlowListener struct { + AuthenticationListener + // The user flow that is invoked when this action executes. + userFlow B2xIdentityUserFlowable +} +// NewInvokeUserFlowListener instantiates a new InvokeUserFlowListener and sets the default values. +func NewInvokeUserFlowListener()(*InvokeUserFlowListener) { + m := &InvokeUserFlowListener{ + AuthenticationListener: *NewAuthenticationListener(), + } + odataTypeValue := "#microsoft.graph.invokeUserFlowListener"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateInvokeUserFlowListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvokeUserFlowListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvokeUserFlowListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvokeUserFlowListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationListener.GetFieldDeserializers() + res["userFlow"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateB2xIdentityUserFlowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserFlow(val.(B2xIdentityUserFlowable)) + } + return nil + } + return res +} +// GetUserFlow gets the userFlow property value. The user flow that is invoked when this action executes. +func (m *InvokeUserFlowListener) GetUserFlow()(B2xIdentityUserFlowable) { + return m.userFlow +} +// Serialize serializes information the current object +func (m *InvokeUserFlowListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationListener.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("userFlow", m.GetUserFlow()) + if err != nil { + return err + } + } + return nil +} +// SetUserFlow sets the userFlow property value. The user flow that is invoked when this action executes. +func (m *InvokeUserFlowListener) SetUserFlow(value B2xIdentityUserFlowable)() { + m.userFlow = value +} diff --git a/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_response.go b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_response.go new file mode 100644 index 000000000..74eb33791 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvokeUserFlowListenerCollectionResponse +type InvokeUserFlowListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []InvokeUserFlowListenerable +} +// NewInvokeUserFlowListenerCollectionResponse instantiates a new InvokeUserFlowListenerCollectionResponse and sets the default values. +func NewInvokeUserFlowListenerCollectionResponse()(*InvokeUserFlowListenerCollectionResponse) { + m := &InvokeUserFlowListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInvokeUserFlowListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInvokeUserFlowListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInvokeUserFlowListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InvokeUserFlowListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInvokeUserFlowListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InvokeUserFlowListenerable, len(val)) + for i, v := range val { + res[i] = v.(InvokeUserFlowListenerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InvokeUserFlowListenerCollectionResponse) GetValue()([]InvokeUserFlowListenerable) { + return m.value +} +// Serialize serializes information the current object +func (m *InvokeUserFlowListenerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InvokeUserFlowListenerCollectionResponse) SetValue(value []InvokeUserFlowListenerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_responseable.go b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_responseable.go new file mode 100644 index 000000000..baac537af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listener_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvokeUserFlowListenerCollectionResponseable +type InvokeUserFlowListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InvokeUserFlowListenerable) + SetValue(value []InvokeUserFlowListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/invoke_user_flow_listenerable.go b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listenerable.go new file mode 100644 index 000000000..9c7b60aef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/invoke_user_flow_listenerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InvokeUserFlowListenerable +type InvokeUserFlowListenerable interface { + AuthenticationListenerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserFlow()(B2xIdentityUserFlowable) + SetUserFlow(value B2xIdentityUserFlowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extension.go new file mode 100644 index 000000000..23e2be4fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extension.go @@ -0,0 +1,126 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosAzureAdSingleSignOnExtension +type IosAzureAdSingleSignOnExtension struct { + IosSingleSignOnExtension + // An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. + bundleIdAccessControlList []string + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Enables or disables shared device mode. + enableSharedDeviceMode *bool +} +// NewIosAzureAdSingleSignOnExtension instantiates a new IosAzureAdSingleSignOnExtension and sets the default values. +func NewIosAzureAdSingleSignOnExtension()(*IosAzureAdSingleSignOnExtension) { + m := &IosAzureAdSingleSignOnExtension{ + IosSingleSignOnExtension: *NewIosSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.iosAzureAdSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosAzureAdSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosAzureAdSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosAzureAdSingleSignOnExtension(), nil +} +// GetBundleIdAccessControlList gets the bundleIdAccessControlList property value. An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. +func (m *IosAzureAdSingleSignOnExtension) GetBundleIdAccessControlList()([]string) { + return m.bundleIdAccessControlList +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosAzureAdSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetEnableSharedDeviceMode gets the enableSharedDeviceMode property value. Enables or disables shared device mode. +func (m *IosAzureAdSingleSignOnExtension) GetEnableSharedDeviceMode()(*bool) { + return m.enableSharedDeviceMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosAzureAdSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosSingleSignOnExtension.GetFieldDeserializers() + res["bundleIdAccessControlList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBundleIdAccessControlList(res) + } + return nil + } + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["enableSharedDeviceMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSharedDeviceMode(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IosAzureAdSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetBundleIdAccessControlList() != nil { + err = writer.WriteCollectionOfStringValues("bundleIdAccessControlList", m.GetBundleIdAccessControlList()) + if err != nil { + return err + } + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSharedDeviceMode", m.GetEnableSharedDeviceMode()) + if err != nil { + return err + } + } + return nil +} +// SetBundleIdAccessControlList sets the bundleIdAccessControlList property value. An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. +func (m *IosAzureAdSingleSignOnExtension) SetBundleIdAccessControlList(value []string)() { + m.bundleIdAccessControlList = value +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosAzureAdSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetEnableSharedDeviceMode sets the enableSharedDeviceMode property value. Enables or disables shared device mode. +func (m *IosAzureAdSingleSignOnExtension) SetEnableSharedDeviceMode(value *bool)() { + m.enableSharedDeviceMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extensionable.go new file mode 100644 index 000000000..903fbe03b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_azure_ad_single_sign_on_extensionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosAzureAdSingleSignOnExtensionable +type IosAzureAdSingleSignOnExtensionable interface { + IosSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleIdAccessControlList()([]string) + GetConfigurations()([]KeyTypedValuePairable) + GetEnableSharedDeviceMode()(*bool) + SetBundleIdAccessControlList(value []string)() + SetConfigurations(value []KeyTypedValuePairable)() + SetEnableSharedDeviceMode(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_bookmark.go b/src/internal/connector/graph/betasdk/models/ios_bookmark.go new file mode 100644 index 000000000..2cc504cab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_bookmark.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosBookmark iOS URL bookmark +type IosBookmark 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 folder into which the bookmark should be added in Safari + bookmarkFolder *string + // The display name of the bookmark + displayName *string + // The OdataType property + odataType *string + // URL allowed to access + url *string +} +// NewIosBookmark instantiates a new iosBookmark and sets the default values. +func NewIosBookmark()(*IosBookmark) { + m := &IosBookmark{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosBookmarkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosBookmarkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosBookmark(), 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 *IosBookmark) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBookmarkFolder gets the bookmarkFolder property value. The folder into which the bookmark should be added in Safari +func (m *IosBookmark) GetBookmarkFolder()(*string) { + return m.bookmarkFolder +} +// GetDisplayName gets the displayName property value. The display name of the bookmark +func (m *IosBookmark) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosBookmark) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bookmarkFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBookmarkFolder(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosBookmark) GetOdataType()(*string) { + return m.odataType +} +// GetUrl gets the url property value. URL allowed to access +func (m *IosBookmark) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *IosBookmark) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bookmarkFolder", m.GetBookmarkFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *IosBookmark) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBookmarkFolder sets the bookmarkFolder property value. The folder into which the bookmark should be added in Safari +func (m *IosBookmark) SetBookmarkFolder(value *string)() { + m.bookmarkFolder = value +} +// SetDisplayName sets the displayName property value. The display name of the bookmark +func (m *IosBookmark) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosBookmark) SetOdataType(value *string)() { + m.odataType = value +} +// SetUrl sets the url property value. URL allowed to access +func (m *IosBookmark) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_response.go new file mode 100644 index 000000000..de8b00a54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosBookmarkCollectionResponse +type IosBookmarkCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosBookmarkable +} +// NewIosBookmarkCollectionResponse instantiates a new IosBookmarkCollectionResponse and sets the default values. +func NewIosBookmarkCollectionResponse()(*IosBookmarkCollectionResponse) { + m := &IosBookmarkCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosBookmarkCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosBookmarkCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosBookmarkCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosBookmarkCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosBookmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosBookmarkable, len(val)) + for i, v := range val { + res[i] = v.(IosBookmarkable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosBookmarkCollectionResponse) GetValue()([]IosBookmarkable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosBookmarkCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosBookmarkCollectionResponse) SetValue(value []IosBookmarkable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_responseable.go new file mode 100644 index 000000000..aeee0bc98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_bookmark_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosBookmarkCollectionResponseable +type IosBookmarkCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosBookmarkable) + SetValue(value []IosBookmarkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_bookmarkable.go b/src/internal/connector/graph/betasdk/models/ios_bookmarkable.go new file mode 100644 index 000000000..eb37013e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_bookmarkable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosBookmarkable +type IosBookmarkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBookmarkFolder()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + GetUrl()(*string) + SetBookmarkFolder(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile.go new file mode 100644 index 000000000..5d50bc28c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfile +type IosCertificateProfile struct { + DeviceConfiguration +} +// NewIosCertificateProfile instantiates a new iosCertificateProfile and sets the default values. +func NewIosCertificateProfile()(*IosCertificateProfile) { + m := &IosCertificateProfile{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosCertificateProfileBase": + return NewIosCertificateProfileBase(), nil + case "#microsoft.graph.iosImportedPFXCertificateProfile": + return NewIosImportedPFXCertificateProfile(), nil + case "#microsoft.graph.iosPkcsCertificateProfile": + return NewIosPkcsCertificateProfile(), nil + case "#microsoft.graph.iosScepCertificateProfile": + return NewIosScepCertificateProfile(), nil + } + } + } + } + return NewIosCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base.go new file mode 100644 index 000000000..61af67e4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base.go @@ -0,0 +1,189 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileBase +type IosCertificateProfileBase struct { + IosCertificateProfile + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Certificate Subject Alternative Name type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Subject Name Format Options for Apple devices. + subjectNameFormat *AppleSubjectNameFormat +} +// NewIosCertificateProfileBase instantiates a new IosCertificateProfileBase and sets the default values. +func NewIosCertificateProfileBase()(*IosCertificateProfileBase) { + m := &IosCertificateProfileBase{ + IosCertificateProfile: *NewIosCertificateProfile(), + } + odataTypeValue := "#microsoft.graph.iosCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosPkcsCertificateProfile": + return NewIosPkcsCertificateProfile(), nil + case "#microsoft.graph.iosScepCertificateProfile": + return NewIosScepCertificateProfile(), nil + } + } + } + } + return NewIosCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *IosCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *IosCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosCertificateProfile.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*AppleSubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *IosCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *IosCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Subject Name Format Options for Apple devices. +func (m *IosCertificateProfileBase) GetSubjectNameFormat()(*AppleSubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *IosCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosCertificateProfile.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *IosCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *IosCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *IosCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *IosCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Subject Name Format Options for Apple devices. +func (m *IosCertificateProfileBase) SetSubjectNameFormat(value *AppleSubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..d79472af7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileBaseCollectionResponse +type IosCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosCertificateProfileBaseable +} +// NewIosCertificateProfileBaseCollectionResponse instantiates a new IosCertificateProfileBaseCollectionResponse and sets the default values. +func NewIosCertificateProfileBaseCollectionResponse()(*IosCertificateProfileBaseCollectionResponse) { + m := &IosCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(IosCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosCertificateProfileBaseCollectionResponse) GetValue()([]IosCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosCertificateProfileBaseCollectionResponse) SetValue(value []IosCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..cd11efe54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileBaseCollectionResponseable +type IosCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosCertificateProfileBaseable) + SetValue(value []IosCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_baseable.go new file mode 100644 index 000000000..af2194974 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_baseable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileBaseable +type IosCertificateProfileBaseable interface { + IosCertificateProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetRenewalThresholdPercentage()(*int32) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*AppleSubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetRenewalThresholdPercentage(value *int32)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *AppleSubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_response.go new file mode 100644 index 000000000..027df4aea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileCollectionResponse +type IosCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosCertificateProfileable +} +// NewIosCertificateProfileCollectionResponse instantiates a new IosCertificateProfileCollectionResponse and sets the default values. +func NewIosCertificateProfileCollectionResponse()(*IosCertificateProfileCollectionResponse) { + m := &IosCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(IosCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosCertificateProfileCollectionResponse) GetValue()([]IosCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosCertificateProfileCollectionResponse) SetValue(value []IosCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..c580352ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileCollectionResponseable +type IosCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosCertificateProfileable) + SetValue(value []IosCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/ios_certificate_profileable.go new file mode 100644 index 000000000..bfc282b4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_certificate_profileable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCertificateProfileable +type IosCertificateProfileable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_compliance_policy.go b/src/internal/connector/graph/betasdk/models/ios_compliance_policy.go new file mode 100644 index 000000000..6ff240f87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_compliance_policy.go @@ -0,0 +1,541 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCompliancePolicy +type IosCompliancePolicy struct { + DeviceCompliancePolicy + // Device threat protection levels for the Device Threat Protection API. + advancedThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Require that devices have enabled device threat protection . + deviceThreatProtectionEnabled *bool + // Device threat protection levels for the Device Threat Protection API. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Indicates whether or not to require a managed email profile. + managedEmailProfileRequired *bool + // Maximum IOS build version. + osMaximumBuildVersion *string + // Maximum IOS version. + osMaximumVersion *string + // Minimum IOS build version. + osMinimumBuildVersion *string + // Minimum IOS version. + osMinimumVersion *string + // Indicates whether or not to block simple passcodes. + passcodeBlockSimple *bool + // Number of days before the passcode expires. Valid values 1 to 65535 + passcodeExpirationDays *int32 + // The number of character sets required in the password. + passcodeMinimumCharacterSetCount *int32 + // Minimum length of passcode. Valid values 4 to 14 + passcodeMinimumLength *int32 + // Minutes of inactivity before a passcode is required. + passcodeMinutesOfInactivityBeforeLock *int32 + // Minutes of inactivity before the screen times out. + passcodeMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous passcodes to block. Valid values 1 to 24 + passcodePreviousPasscodeBlockCount *int32 + // Indicates whether or not to require a passcode. + passcodeRequired *bool + // Possible values of required passwords. + passcodeRequiredType *RequiredPasswordType + // Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. + restrictedApps []AppListItemable + // Devices must not be jailbroken or rooted. + securityBlockJailbrokenDevices *bool +} +// NewIosCompliancePolicy instantiates a new IosCompliancePolicy and sets the default values. +func NewIosCompliancePolicy()(*IosCompliancePolicy) { + m := &IosCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.iosCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCompliancePolicy(), nil +} +// GetAdvancedThreatProtectionRequiredSecurityLevel gets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *IosCompliancePolicy) GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.advancedThreatProtectionRequiredSecurityLevel +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection . +func (m *IosCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *IosCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["advancedThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["managedEmailProfileRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedEmailProfileRequired(val) + } + return nil + } + res["osMaximumBuildVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumBuildVersion(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumBuildVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumBuildVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passcodeBlockSimple"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeBlockSimple(val) + } + return nil + } + res["passcodeExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeExpirationDays(val) + } + return nil + } + res["passcodeMinimumCharacterSetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinimumCharacterSetCount(val) + } + return nil + } + res["passcodeMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinimumLength(val) + } + return nil + } + res["passcodeMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passcodeMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passcodePreviousPasscodeBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodePreviousPasscodeBlockCount(val) + } + return nil + } + res["passcodeRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeRequired(val) + } + return nil + } + res["passcodeRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasscodeRequiredType(val.(*RequiredPasswordType)) + } + return nil + } + res["restrictedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetRestrictedApps(res) + } + return nil + } + res["securityBlockJailbrokenDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBlockJailbrokenDevices(val) + } + return nil + } + return res +} +// GetManagedEmailProfileRequired gets the managedEmailProfileRequired property value. Indicates whether or not to require a managed email profile. +func (m *IosCompliancePolicy) GetManagedEmailProfileRequired()(*bool) { + return m.managedEmailProfileRequired +} +// GetOsMaximumBuildVersion gets the osMaximumBuildVersion property value. Maximum IOS build version. +func (m *IosCompliancePolicy) GetOsMaximumBuildVersion()(*string) { + return m.osMaximumBuildVersion +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum IOS version. +func (m *IosCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumBuildVersion gets the osMinimumBuildVersion property value. Minimum IOS build version. +func (m *IosCompliancePolicy) GetOsMinimumBuildVersion()(*string) { + return m.osMinimumBuildVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum IOS version. +func (m *IosCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasscodeBlockSimple gets the passcodeBlockSimple property value. Indicates whether or not to block simple passcodes. +func (m *IosCompliancePolicy) GetPasscodeBlockSimple()(*bool) { + return m.passcodeBlockSimple +} +// GetPasscodeExpirationDays gets the passcodeExpirationDays property value. Number of days before the passcode expires. Valid values 1 to 65535 +func (m *IosCompliancePolicy) GetPasscodeExpirationDays()(*int32) { + return m.passcodeExpirationDays +} +// GetPasscodeMinimumCharacterSetCount gets the passcodeMinimumCharacterSetCount property value. The number of character sets required in the password. +func (m *IosCompliancePolicy) GetPasscodeMinimumCharacterSetCount()(*int32) { + return m.passcodeMinimumCharacterSetCount +} +// GetPasscodeMinimumLength gets the passcodeMinimumLength property value. Minimum length of passcode. Valid values 4 to 14 +func (m *IosCompliancePolicy) GetPasscodeMinimumLength()(*int32) { + return m.passcodeMinimumLength +} +// GetPasscodeMinutesOfInactivityBeforeLock gets the passcodeMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a passcode is required. +func (m *IosCompliancePolicy) GetPasscodeMinutesOfInactivityBeforeLock()(*int32) { + return m.passcodeMinutesOfInactivityBeforeLock +} +// GetPasscodeMinutesOfInactivityBeforeScreenTimeout gets the passcodeMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *IosCompliancePolicy) GetPasscodeMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passcodeMinutesOfInactivityBeforeScreenTimeout +} +// GetPasscodePreviousPasscodeBlockCount gets the passcodePreviousPasscodeBlockCount property value. Number of previous passcodes to block. Valid values 1 to 24 +func (m *IosCompliancePolicy) GetPasscodePreviousPasscodeBlockCount()(*int32) { + return m.passcodePreviousPasscodeBlockCount +} +// GetPasscodeRequired gets the passcodeRequired property value. Indicates whether or not to require a passcode. +func (m *IosCompliancePolicy) GetPasscodeRequired()(*bool) { + return m.passcodeRequired +} +// GetPasscodeRequiredType gets the passcodeRequiredType property value. Possible values of required passwords. +func (m *IosCompliancePolicy) GetPasscodeRequiredType()(*RequiredPasswordType) { + return m.passcodeRequiredType +} +// GetRestrictedApps gets the restrictedApps property value. Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. +func (m *IosCompliancePolicy) GetRestrictedApps()([]AppListItemable) { + return m.restrictedApps +} +// GetSecurityBlockJailbrokenDevices gets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *IosCompliancePolicy) GetSecurityBlockJailbrokenDevices()(*bool) { + return m.securityBlockJailbrokenDevices +} +// Serialize serializes information the current object +func (m *IosCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetAdvancedThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("advancedThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedEmailProfileRequired", m.GetManagedEmailProfileRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumBuildVersion", m.GetOsMaximumBuildVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumBuildVersion", m.GetOsMinimumBuildVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeBlockSimple", m.GetPasscodeBlockSimple()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeExpirationDays", m.GetPasscodeExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinimumCharacterSetCount", m.GetPasscodeMinimumCharacterSetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinimumLength", m.GetPasscodeMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinutesOfInactivityBeforeLock", m.GetPasscodeMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinutesOfInactivityBeforeScreenTimeout", m.GetPasscodeMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodePreviousPasscodeBlockCount", m.GetPasscodePreviousPasscodeBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeRequired", m.GetPasscodeRequired()) + if err != nil { + return err + } + } + if m.GetPasscodeRequiredType() != nil { + cast := (*m.GetPasscodeRequiredType()).String() + err = writer.WriteStringValue("passcodeRequiredType", &cast) + if err != nil { + return err + } + } + if m.GetRestrictedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRestrictedApps())) + for i, v := range m.GetRestrictedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("restrictedApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityBlockJailbrokenDevices", m.GetSecurityBlockJailbrokenDevices()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionRequiredSecurityLevel sets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *IosCompliancePolicy) SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.advancedThreatProtectionRequiredSecurityLevel = value +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection . +func (m *IosCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *IosCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetManagedEmailProfileRequired sets the managedEmailProfileRequired property value. Indicates whether or not to require a managed email profile. +func (m *IosCompliancePolicy) SetManagedEmailProfileRequired(value *bool)() { + m.managedEmailProfileRequired = value +} +// SetOsMaximumBuildVersion sets the osMaximumBuildVersion property value. Maximum IOS build version. +func (m *IosCompliancePolicy) SetOsMaximumBuildVersion(value *string)() { + m.osMaximumBuildVersion = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum IOS version. +func (m *IosCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumBuildVersion sets the osMinimumBuildVersion property value. Minimum IOS build version. +func (m *IosCompliancePolicy) SetOsMinimumBuildVersion(value *string)() { + m.osMinimumBuildVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum IOS version. +func (m *IosCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasscodeBlockSimple sets the passcodeBlockSimple property value. Indicates whether or not to block simple passcodes. +func (m *IosCompliancePolicy) SetPasscodeBlockSimple(value *bool)() { + m.passcodeBlockSimple = value +} +// SetPasscodeExpirationDays sets the passcodeExpirationDays property value. Number of days before the passcode expires. Valid values 1 to 65535 +func (m *IosCompliancePolicy) SetPasscodeExpirationDays(value *int32)() { + m.passcodeExpirationDays = value +} +// SetPasscodeMinimumCharacterSetCount sets the passcodeMinimumCharacterSetCount property value. The number of character sets required in the password. +func (m *IosCompliancePolicy) SetPasscodeMinimumCharacterSetCount(value *int32)() { + m.passcodeMinimumCharacterSetCount = value +} +// SetPasscodeMinimumLength sets the passcodeMinimumLength property value. Minimum length of passcode. Valid values 4 to 14 +func (m *IosCompliancePolicy) SetPasscodeMinimumLength(value *int32)() { + m.passcodeMinimumLength = value +} +// SetPasscodeMinutesOfInactivityBeforeLock sets the passcodeMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a passcode is required. +func (m *IosCompliancePolicy) SetPasscodeMinutesOfInactivityBeforeLock(value *int32)() { + m.passcodeMinutesOfInactivityBeforeLock = value +} +// SetPasscodeMinutesOfInactivityBeforeScreenTimeout sets the passcodeMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *IosCompliancePolicy) SetPasscodeMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passcodeMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasscodePreviousPasscodeBlockCount sets the passcodePreviousPasscodeBlockCount property value. Number of previous passcodes to block. Valid values 1 to 24 +func (m *IosCompliancePolicy) SetPasscodePreviousPasscodeBlockCount(value *int32)() { + m.passcodePreviousPasscodeBlockCount = value +} +// SetPasscodeRequired sets the passcodeRequired property value. Indicates whether or not to require a passcode. +func (m *IosCompliancePolicy) SetPasscodeRequired(value *bool)() { + m.passcodeRequired = value +} +// SetPasscodeRequiredType sets the passcodeRequiredType property value. Possible values of required passwords. +func (m *IosCompliancePolicy) SetPasscodeRequiredType(value *RequiredPasswordType)() { + m.passcodeRequiredType = value +} +// SetRestrictedApps sets the restrictedApps property value. Require the device to not have the specified apps installed. This collection can contain a maximum of 100 elements. +func (m *IosCompliancePolicy) SetRestrictedApps(value []AppListItemable)() { + m.restrictedApps = value +} +// SetSecurityBlockJailbrokenDevices sets the securityBlockJailbrokenDevices property value. Devices must not be jailbroken or rooted. +func (m *IosCompliancePolicy) SetSecurityBlockJailbrokenDevices(value *bool)() { + m.securityBlockJailbrokenDevices = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_response.go new file mode 100644 index 000000000..153f4e5a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCompliancePolicyCollectionResponse +type IosCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosCompliancePolicyable +} +// NewIosCompliancePolicyCollectionResponse instantiates a new IosCompliancePolicyCollectionResponse and sets the default values. +func NewIosCompliancePolicyCollectionResponse()(*IosCompliancePolicyCollectionResponse) { + m := &IosCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(IosCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosCompliancePolicyCollectionResponse) GetValue()([]IosCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosCompliancePolicyCollectionResponse) SetValue(value []IosCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..44e54bade --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCompliancePolicyCollectionResponseable +type IosCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosCompliancePolicyable) + SetValue(value []IosCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/ios_compliance_policyable.go new file mode 100644 index 000000000..ebb513363 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_compliance_policyable.go @@ -0,0 +1,49 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCompliancePolicyable +type IosCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetManagedEmailProfileRequired()(*bool) + GetOsMaximumBuildVersion()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumBuildVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasscodeBlockSimple()(*bool) + GetPasscodeExpirationDays()(*int32) + GetPasscodeMinimumCharacterSetCount()(*int32) + GetPasscodeMinimumLength()(*int32) + GetPasscodeMinutesOfInactivityBeforeLock()(*int32) + GetPasscodeMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasscodePreviousPasscodeBlockCount()(*int32) + GetPasscodeRequired()(*bool) + GetPasscodeRequiredType()(*RequiredPasswordType) + GetRestrictedApps()([]AppListItemable) + GetSecurityBlockJailbrokenDevices()(*bool) + SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetManagedEmailProfileRequired(value *bool)() + SetOsMaximumBuildVersion(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumBuildVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasscodeBlockSimple(value *bool)() + SetPasscodeExpirationDays(value *int32)() + SetPasscodeMinimumCharacterSetCount(value *int32)() + SetPasscodeMinimumLength(value *int32)() + SetPasscodeMinutesOfInactivityBeforeLock(value *int32)() + SetPasscodeMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasscodePreviousPasscodeBlockCount(value *int32)() + SetPasscodeRequired(value *bool)() + SetPasscodeRequiredType(value *RequiredPasswordType)() + SetRestrictedApps(value []AppListItemable)() + SetSecurityBlockJailbrokenDevices(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extension.go new file mode 100644 index 000000000..0b2e3ce5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extension.go @@ -0,0 +1,178 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCredentialSingleSignOnExtension +type IosCredentialSingleSignOnExtension struct { + IosSingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string +} +// NewIosCredentialSingleSignOnExtension instantiates a new IosCredentialSingleSignOnExtension and sets the default values. +func NewIosCredentialSingleSignOnExtension()(*IosCredentialSingleSignOnExtension) { + m := &IosCredentialSingleSignOnExtension{ + IosSingleSignOnExtension: *NewIosSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.iosCredentialSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosCredentialSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCredentialSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCredentialSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosCredentialSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *IosCredentialSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *IosCredentialSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCredentialSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosSingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *IosCredentialSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *IosCredentialSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *IosCredentialSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosCredentialSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *IosCredentialSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *IosCredentialSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *IosCredentialSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *IosCredentialSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extensionable.go new file mode 100644 index 000000000..f4651090f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_credential_single_sign_on_extensionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCredentialSingleSignOnExtensionable +type IosCredentialSingleSignOnExtensionable interface { + IosSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurations()([]KeyTypedValuePairable) + GetDomains()([]string) + GetExtensionIdentifier()(*string) + GetRealm()(*string) + GetTeamIdentifier()(*string) + SetConfigurations(value []KeyTypedValuePairable)() + SetDomains(value []string)() + SetExtensionIdentifier(value *string)() + SetRealm(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_custom_configuration.go b/src/internal/connector/graph/betasdk/models/ios_custom_configuration.go new file mode 100644 index 000000000..9ffb59e36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_custom_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCustomConfiguration +type IosCustomConfiguration struct { + DeviceConfiguration + // Payload. (UTF8 encoded byte array) + payload []byte + // Payload file name (.mobileconfig + payloadFileName *string + // Name that is displayed to the user. + payloadName *string +} +// NewIosCustomConfiguration instantiates a new IosCustomConfiguration and sets the default values. +func NewIosCustomConfiguration()(*IosCustomConfiguration) { + m := &IosCustomConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosCustomConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosCustomConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCustomConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCustomConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCustomConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["payloadFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadFileName(val) + } + return nil + } + res["payloadName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadName(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. Payload. (UTF8 encoded byte array) +func (m *IosCustomConfiguration) GetPayload()([]byte) { + return m.payload +} +// GetPayloadFileName gets the payloadFileName property value. Payload file name (.mobileconfig +func (m *IosCustomConfiguration) GetPayloadFileName()(*string) { + return m.payloadFileName +} +// GetPayloadName gets the payloadName property value. Name that is displayed to the user. +func (m *IosCustomConfiguration) GetPayloadName()(*string) { + return m.payloadName +} +// Serialize serializes information the current object +func (m *IosCustomConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadFileName", m.GetPayloadFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadName", m.GetPayloadName()) + if err != nil { + return err + } + } + return nil +} +// SetPayload sets the payload property value. Payload. (UTF8 encoded byte array) +func (m *IosCustomConfiguration) SetPayload(value []byte)() { + m.payload = value +} +// SetPayloadFileName sets the payloadFileName property value. Payload file name (.mobileconfig +func (m *IosCustomConfiguration) SetPayloadFileName(value *string)() { + m.payloadFileName = value +} +// SetPayloadName sets the payloadName property value. Name that is displayed to the user. +func (m *IosCustomConfiguration) SetPayloadName(value *string)() { + m.payloadName = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_response.go new file mode 100644 index 000000000..0c36fa8e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCustomConfigurationCollectionResponse +type IosCustomConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosCustomConfigurationable +} +// NewIosCustomConfigurationCollectionResponse instantiates a new IosCustomConfigurationCollectionResponse and sets the default values. +func NewIosCustomConfigurationCollectionResponse()(*IosCustomConfigurationCollectionResponse) { + m := &IosCustomConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosCustomConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosCustomConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosCustomConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosCustomConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosCustomConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosCustomConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosCustomConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosCustomConfigurationCollectionResponse) GetValue()([]IosCustomConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosCustomConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosCustomConfigurationCollectionResponse) SetValue(value []IosCustomConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_responseable.go new file mode 100644 index 000000000..04147aba6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_custom_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCustomConfigurationCollectionResponseable +type IosCustomConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosCustomConfigurationable) + SetValue(value []IosCustomConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_custom_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_custom_configurationable.go new file mode 100644 index 000000000..7a6ac9689 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_custom_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosCustomConfigurationable +type IosCustomConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayload()([]byte) + GetPayloadFileName()(*string) + GetPayloadName()(*string) + SetPayload(value []byte)() + SetPayloadFileName(value *string)() + SetPayloadName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration.go b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration.go new file mode 100644 index 000000000..7b114c2cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDerivedCredentialAuthenticationConfiguration +type IosDerivedCredentialAuthenticationConfiguration struct { + DeviceConfiguration + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable +} +// NewIosDerivedCredentialAuthenticationConfiguration instantiates a new IosDerivedCredentialAuthenticationConfiguration and sets the default values. +func NewIosDerivedCredentialAuthenticationConfiguration()(*IosDerivedCredentialAuthenticationConfiguration) { + m := &IosDerivedCredentialAuthenticationConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosDerivedCredentialAuthenticationConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosDerivedCredentialAuthenticationConfiguration(), nil +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosDerivedCredentialAuthenticationConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosDerivedCredentialAuthenticationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IosDerivedCredentialAuthenticationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + return nil +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosDerivedCredentialAuthenticationConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_response.go new file mode 100644 index 000000000..aa11e84d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDerivedCredentialAuthenticationConfigurationCollectionResponse +type IosDerivedCredentialAuthenticationConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosDerivedCredentialAuthenticationConfigurationable +} +// NewIosDerivedCredentialAuthenticationConfigurationCollectionResponse instantiates a new IosDerivedCredentialAuthenticationConfigurationCollectionResponse and sets the default values. +func NewIosDerivedCredentialAuthenticationConfigurationCollectionResponse()(*IosDerivedCredentialAuthenticationConfigurationCollectionResponse) { + m := &IosDerivedCredentialAuthenticationConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosDerivedCredentialAuthenticationConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosDerivedCredentialAuthenticationConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosDerivedCredentialAuthenticationConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosDerivedCredentialAuthenticationConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosDerivedCredentialAuthenticationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosDerivedCredentialAuthenticationConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosDerivedCredentialAuthenticationConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosDerivedCredentialAuthenticationConfigurationCollectionResponse) GetValue()([]IosDerivedCredentialAuthenticationConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosDerivedCredentialAuthenticationConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosDerivedCredentialAuthenticationConfigurationCollectionResponse) SetValue(value []IosDerivedCredentialAuthenticationConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_responseable.go new file mode 100644 index 000000000..fc3a4b2a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDerivedCredentialAuthenticationConfigurationCollectionResponseable +type IosDerivedCredentialAuthenticationConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosDerivedCredentialAuthenticationConfigurationable) + SetValue(value []IosDerivedCredentialAuthenticationConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configurationable.go new file mode 100644 index 000000000..a827f864b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_derived_credential_authentication_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDerivedCredentialAuthenticationConfigurationable +type IosDerivedCredentialAuthenticationConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_features_configuration.go b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration.go new file mode 100644 index 000000000..6c8d13b49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration.go @@ -0,0 +1,451 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceFeaturesConfiguration +type IosDeviceFeaturesConfiguration struct { + AppleDeviceFeaturesConfigurationBase + // Asset tag information for the device, displayed on the login window and lock screen. + assetTagTemplate *string + // Gets or sets iOS Web Content Filter settings, supervised mode only + contentFilterSettings IosWebContentFilterBaseable + // A list of app and folders to appear on the Home Screen Dock. This collection can contain a maximum of 500 elements. + homeScreenDockIcons []IosHomeScreenItemable + // Gets or sets the number of rows to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridWidth must be configured as well. + homeScreenGridHeight *int32 + // Gets or sets the number of columns to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridHeight must be configured as well. + homeScreenGridWidth *int32 + // A list of pages on the Home Screen. This collection can contain a maximum of 500 elements. + homeScreenPages []IosHomeScreenPageable + // Identity Certificate for the renewal of Kerberos ticket used in single sign-on settings. + identityCertificateForClientAuthentication IosCertificateProfileBaseable + // Gets or sets a single sign-on extension profile. + iosSingleSignOnExtension IosSingleSignOnExtensionable + // A footnote displayed on the login window and lock screen. Available in iOS 9.3.1 and later. + lockScreenFootnote *string + // Notification settings for each bundle id. Applicable to devices in supervised mode only (iOS 9.3 and later). This collection can contain a maximum of 500 elements. + notificationSettings []IosNotificationSettingsable + // Gets or sets a single sign-on extension profile. Deprecated: use IOSSingleSignOnExtension instead. + singleSignOnExtension SingleSignOnExtensionable + // PKINIT Certificate for the authentication with single sign-on extension settings. + singleSignOnExtensionPkinitCertificate IosCertificateProfileBaseable + // The Kerberos login settings that enable apps on receiving devices to authenticate smoothly. + singleSignOnSettings IosSingleSignOnSettingsable + // An enum type for wallpaper display location specifier. + wallpaperDisplayLocation *IosWallpaperDisplayLocation + // A wallpaper image must be in either PNG or JPEG format. It requires a supervised device with iOS 8 or later version. + wallpaperImage MimeContentable +} +// NewIosDeviceFeaturesConfiguration instantiates a new IosDeviceFeaturesConfiguration and sets the default values. +func NewIosDeviceFeaturesConfiguration()(*IosDeviceFeaturesConfiguration) { + m := &IosDeviceFeaturesConfiguration{ + AppleDeviceFeaturesConfigurationBase: *NewAppleDeviceFeaturesConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.iosDeviceFeaturesConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosDeviceFeaturesConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosDeviceFeaturesConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosDeviceFeaturesConfiguration(), nil +} +// GetAssetTagTemplate gets the assetTagTemplate property value. Asset tag information for the device, displayed on the login window and lock screen. +func (m *IosDeviceFeaturesConfiguration) GetAssetTagTemplate()(*string) { + return m.assetTagTemplate +} +// GetContentFilterSettings gets the contentFilterSettings property value. Gets or sets iOS Web Content Filter settings, supervised mode only +func (m *IosDeviceFeaturesConfiguration) GetContentFilterSettings()(IosWebContentFilterBaseable) { + return m.contentFilterSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosDeviceFeaturesConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppleDeviceFeaturesConfigurationBase.GetFieldDeserializers() + res["assetTagTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssetTagTemplate(val) + } + return nil + } + res["contentFilterSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosWebContentFilterBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContentFilterSettings(val.(IosWebContentFilterBaseable)) + } + return nil + } + res["homeScreenDockIcons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenItemable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenItemable) + } + m.SetHomeScreenDockIcons(res) + } + return nil + } + res["homeScreenGridHeight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHomeScreenGridHeight(val) + } + return nil + } + res["homeScreenGridWidth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHomeScreenGridWidth(val) + } + return nil + } + res["homeScreenPages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenPageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenPageable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenPageable) + } + m.SetHomeScreenPages(res) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(IosCertificateProfileBaseable)) + } + return nil + } + res["iosSingleSignOnExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosSingleSignOnExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIosSingleSignOnExtension(val.(IosSingleSignOnExtensionable)) + } + return nil + } + res["lockScreenFootnote"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLockScreenFootnote(val) + } + return nil + } + res["notificationSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosNotificationSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosNotificationSettingsable, len(val)) + for i, v := range val { + res[i] = v.(IosNotificationSettingsable) + } + m.SetNotificationSettings(res) + } + return nil + } + res["singleSignOnExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSingleSignOnExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnExtension(val.(SingleSignOnExtensionable)) + } + return nil + } + res["singleSignOnExtensionPkinitCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnExtensionPkinitCertificate(val.(IosCertificateProfileBaseable)) + } + return nil + } + res["singleSignOnSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosSingleSignOnSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnSettings(val.(IosSingleSignOnSettingsable)) + } + return nil + } + res["wallpaperDisplayLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosWallpaperDisplayLocation) + if err != nil { + return err + } + if val != nil { + m.SetWallpaperDisplayLocation(val.(*IosWallpaperDisplayLocation)) + } + return nil + } + res["wallpaperImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWallpaperImage(val.(MimeContentable)) + } + return nil + } + return res +} +// GetHomeScreenDockIcons gets the homeScreenDockIcons property value. A list of app and folders to appear on the Home Screen Dock. This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) GetHomeScreenDockIcons()([]IosHomeScreenItemable) { + return m.homeScreenDockIcons +} +// GetHomeScreenGridHeight gets the homeScreenGridHeight property value. Gets or sets the number of rows to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridWidth must be configured as well. +func (m *IosDeviceFeaturesConfiguration) GetHomeScreenGridHeight()(*int32) { + return m.homeScreenGridHeight +} +// GetHomeScreenGridWidth gets the homeScreenGridWidth property value. Gets or sets the number of columns to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridHeight must be configured as well. +func (m *IosDeviceFeaturesConfiguration) GetHomeScreenGridWidth()(*int32) { + return m.homeScreenGridWidth +} +// GetHomeScreenPages gets the homeScreenPages property value. A list of pages on the Home Screen. This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) GetHomeScreenPages()([]IosHomeScreenPageable) { + return m.homeScreenPages +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for the renewal of Kerberos ticket used in single sign-on settings. +func (m *IosDeviceFeaturesConfiguration) GetIdentityCertificateForClientAuthentication()(IosCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetIosSingleSignOnExtension gets the iosSingleSignOnExtension property value. Gets or sets a single sign-on extension profile. +func (m *IosDeviceFeaturesConfiguration) GetIosSingleSignOnExtension()(IosSingleSignOnExtensionable) { + return m.iosSingleSignOnExtension +} +// GetLockScreenFootnote gets the lockScreenFootnote property value. A footnote displayed on the login window and lock screen. Available in iOS 9.3.1 and later. +func (m *IosDeviceFeaturesConfiguration) GetLockScreenFootnote()(*string) { + return m.lockScreenFootnote +} +// GetNotificationSettings gets the notificationSettings property value. Notification settings for each bundle id. Applicable to devices in supervised mode only (iOS 9.3 and later). This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) GetNotificationSettings()([]IosNotificationSettingsable) { + return m.notificationSettings +} +// GetSingleSignOnExtension gets the singleSignOnExtension property value. Gets or sets a single sign-on extension profile. Deprecated: use IOSSingleSignOnExtension instead. +func (m *IosDeviceFeaturesConfiguration) GetSingleSignOnExtension()(SingleSignOnExtensionable) { + return m.singleSignOnExtension +} +// GetSingleSignOnExtensionPkinitCertificate gets the singleSignOnExtensionPkinitCertificate property value. PKINIT Certificate for the authentication with single sign-on extension settings. +func (m *IosDeviceFeaturesConfiguration) GetSingleSignOnExtensionPkinitCertificate()(IosCertificateProfileBaseable) { + return m.singleSignOnExtensionPkinitCertificate +} +// GetSingleSignOnSettings gets the singleSignOnSettings property value. The Kerberos login settings that enable apps on receiving devices to authenticate smoothly. +func (m *IosDeviceFeaturesConfiguration) GetSingleSignOnSettings()(IosSingleSignOnSettingsable) { + return m.singleSignOnSettings +} +// GetWallpaperDisplayLocation gets the wallpaperDisplayLocation property value. An enum type for wallpaper display location specifier. +func (m *IosDeviceFeaturesConfiguration) GetWallpaperDisplayLocation()(*IosWallpaperDisplayLocation) { + return m.wallpaperDisplayLocation +} +// GetWallpaperImage gets the wallpaperImage property value. A wallpaper image must be in either PNG or JPEG format. It requires a supervised device with iOS 8 or later version. +func (m *IosDeviceFeaturesConfiguration) GetWallpaperImage()(MimeContentable) { + return m.wallpaperImage +} +// Serialize serializes information the current object +func (m *IosDeviceFeaturesConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppleDeviceFeaturesConfigurationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assetTagTemplate", m.GetAssetTagTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contentFilterSettings", m.GetContentFilterSettings()) + if err != nil { + return err + } + } + if m.GetHomeScreenDockIcons() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHomeScreenDockIcons())) + for i, v := range m.GetHomeScreenDockIcons() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("homeScreenDockIcons", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("homeScreenGridHeight", m.GetHomeScreenGridHeight()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("homeScreenGridWidth", m.GetHomeScreenGridWidth()) + if err != nil { + return err + } + } + if m.GetHomeScreenPages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHomeScreenPages())) + for i, v := range m.GetHomeScreenPages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("homeScreenPages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("iosSingleSignOnExtension", m.GetIosSingleSignOnExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lockScreenFootnote", m.GetLockScreenFootnote()) + if err != nil { + return err + } + } + if m.GetNotificationSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotificationSettings())) + for i, v := range m.GetNotificationSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("notificationSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("singleSignOnExtension", m.GetSingleSignOnExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("singleSignOnExtensionPkinitCertificate", m.GetSingleSignOnExtensionPkinitCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("singleSignOnSettings", m.GetSingleSignOnSettings()) + if err != nil { + return err + } + } + if m.GetWallpaperDisplayLocation() != nil { + cast := (*m.GetWallpaperDisplayLocation()).String() + err = writer.WriteStringValue("wallpaperDisplayLocation", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("wallpaperImage", m.GetWallpaperImage()) + if err != nil { + return err + } + } + return nil +} +// SetAssetTagTemplate sets the assetTagTemplate property value. Asset tag information for the device, displayed on the login window and lock screen. +func (m *IosDeviceFeaturesConfiguration) SetAssetTagTemplate(value *string)() { + m.assetTagTemplate = value +} +// SetContentFilterSettings sets the contentFilterSettings property value. Gets or sets iOS Web Content Filter settings, supervised mode only +func (m *IosDeviceFeaturesConfiguration) SetContentFilterSettings(value IosWebContentFilterBaseable)() { + m.contentFilterSettings = value +} +// SetHomeScreenDockIcons sets the homeScreenDockIcons property value. A list of app and folders to appear on the Home Screen Dock. This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) SetHomeScreenDockIcons(value []IosHomeScreenItemable)() { + m.homeScreenDockIcons = value +} +// SetHomeScreenGridHeight sets the homeScreenGridHeight property value. Gets or sets the number of rows to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridWidth must be configured as well. +func (m *IosDeviceFeaturesConfiguration) SetHomeScreenGridHeight(value *int32)() { + m.homeScreenGridHeight = value +} +// SetHomeScreenGridWidth sets the homeScreenGridWidth property value. Gets or sets the number of columns to render when configuring iOS home screen layout settings. If this value is configured, homeScreenGridHeight must be configured as well. +func (m *IosDeviceFeaturesConfiguration) SetHomeScreenGridWidth(value *int32)() { + m.homeScreenGridWidth = value +} +// SetHomeScreenPages sets the homeScreenPages property value. A list of pages on the Home Screen. This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) SetHomeScreenPages(value []IosHomeScreenPageable)() { + m.homeScreenPages = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for the renewal of Kerberos ticket used in single sign-on settings. +func (m *IosDeviceFeaturesConfiguration) SetIdentityCertificateForClientAuthentication(value IosCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetIosSingleSignOnExtension sets the iosSingleSignOnExtension property value. Gets or sets a single sign-on extension profile. +func (m *IosDeviceFeaturesConfiguration) SetIosSingleSignOnExtension(value IosSingleSignOnExtensionable)() { + m.iosSingleSignOnExtension = value +} +// SetLockScreenFootnote sets the lockScreenFootnote property value. A footnote displayed on the login window and lock screen. Available in iOS 9.3.1 and later. +func (m *IosDeviceFeaturesConfiguration) SetLockScreenFootnote(value *string)() { + m.lockScreenFootnote = value +} +// SetNotificationSettings sets the notificationSettings property value. Notification settings for each bundle id. Applicable to devices in supervised mode only (iOS 9.3 and later). This collection can contain a maximum of 500 elements. +func (m *IosDeviceFeaturesConfiguration) SetNotificationSettings(value []IosNotificationSettingsable)() { + m.notificationSettings = value +} +// SetSingleSignOnExtension sets the singleSignOnExtension property value. Gets or sets a single sign-on extension profile. Deprecated: use IOSSingleSignOnExtension instead. +func (m *IosDeviceFeaturesConfiguration) SetSingleSignOnExtension(value SingleSignOnExtensionable)() { + m.singleSignOnExtension = value +} +// SetSingleSignOnExtensionPkinitCertificate sets the singleSignOnExtensionPkinitCertificate property value. PKINIT Certificate for the authentication with single sign-on extension settings. +func (m *IosDeviceFeaturesConfiguration) SetSingleSignOnExtensionPkinitCertificate(value IosCertificateProfileBaseable)() { + m.singleSignOnExtensionPkinitCertificate = value +} +// SetSingleSignOnSettings sets the singleSignOnSettings property value. The Kerberos login settings that enable apps on receiving devices to authenticate smoothly. +func (m *IosDeviceFeaturesConfiguration) SetSingleSignOnSettings(value IosSingleSignOnSettingsable)() { + m.singleSignOnSettings = value +} +// SetWallpaperDisplayLocation sets the wallpaperDisplayLocation property value. An enum type for wallpaper display location specifier. +func (m *IosDeviceFeaturesConfiguration) SetWallpaperDisplayLocation(value *IosWallpaperDisplayLocation)() { + m.wallpaperDisplayLocation = value +} +// SetWallpaperImage sets the wallpaperImage property value. A wallpaper image must be in either PNG or JPEG format. It requires a supervised device with iOS 8 or later version. +func (m *IosDeviceFeaturesConfiguration) SetWallpaperImage(value MimeContentable)() { + m.wallpaperImage = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_response.go new file mode 100644 index 000000000..e647a3eeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceFeaturesConfigurationCollectionResponse +type IosDeviceFeaturesConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosDeviceFeaturesConfigurationable +} +// NewIosDeviceFeaturesConfigurationCollectionResponse instantiates a new IosDeviceFeaturesConfigurationCollectionResponse and sets the default values. +func NewIosDeviceFeaturesConfigurationCollectionResponse()(*IosDeviceFeaturesConfigurationCollectionResponse) { + m := &IosDeviceFeaturesConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosDeviceFeaturesConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosDeviceFeaturesConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosDeviceFeaturesConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosDeviceFeaturesConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosDeviceFeaturesConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosDeviceFeaturesConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosDeviceFeaturesConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosDeviceFeaturesConfigurationCollectionResponse) GetValue()([]IosDeviceFeaturesConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosDeviceFeaturesConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosDeviceFeaturesConfigurationCollectionResponse) SetValue(value []IosDeviceFeaturesConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_responseable.go new file mode 100644 index 000000000..2d2192e08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_features_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceFeaturesConfigurationCollectionResponseable +type IosDeviceFeaturesConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosDeviceFeaturesConfigurationable) + SetValue(value []IosDeviceFeaturesConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_features_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_device_features_configurationable.go new file mode 100644 index 000000000..59ab882ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_features_configurationable.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceFeaturesConfigurationable +type IosDeviceFeaturesConfigurationable interface { + AppleDeviceFeaturesConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssetTagTemplate()(*string) + GetContentFilterSettings()(IosWebContentFilterBaseable) + GetHomeScreenDockIcons()([]IosHomeScreenItemable) + GetHomeScreenGridHeight()(*int32) + GetHomeScreenGridWidth()(*int32) + GetHomeScreenPages()([]IosHomeScreenPageable) + GetIdentityCertificateForClientAuthentication()(IosCertificateProfileBaseable) + GetIosSingleSignOnExtension()(IosSingleSignOnExtensionable) + GetLockScreenFootnote()(*string) + GetNotificationSettings()([]IosNotificationSettingsable) + GetSingleSignOnExtension()(SingleSignOnExtensionable) + GetSingleSignOnExtensionPkinitCertificate()(IosCertificateProfileBaseable) + GetSingleSignOnSettings()(IosSingleSignOnSettingsable) + GetWallpaperDisplayLocation()(*IosWallpaperDisplayLocation) + GetWallpaperImage()(MimeContentable) + SetAssetTagTemplate(value *string)() + SetContentFilterSettings(value IosWebContentFilterBaseable)() + SetHomeScreenDockIcons(value []IosHomeScreenItemable)() + SetHomeScreenGridHeight(value *int32)() + SetHomeScreenGridWidth(value *int32)() + SetHomeScreenPages(value []IosHomeScreenPageable)() + SetIdentityCertificateForClientAuthentication(value IosCertificateProfileBaseable)() + SetIosSingleSignOnExtension(value IosSingleSignOnExtensionable)() + SetLockScreenFootnote(value *string)() + SetNotificationSettings(value []IosNotificationSettingsable)() + SetSingleSignOnExtension(value SingleSignOnExtensionable)() + SetSingleSignOnExtensionPkinitCertificate(value IosCertificateProfileBaseable)() + SetSingleSignOnSettings(value IosSingleSignOnSettingsable)() + SetWallpaperDisplayLocation(value *IosWallpaperDisplayLocation)() + SetWallpaperImage(value MimeContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_type.go b/src/internal/connector/graph/betasdk/models/ios_device_type.go new file mode 100644 index 000000000..b89921ba3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_type.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceType contains properties of the possible iOS device types the mobile app can run on. +type IosDeviceType struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether the app should run on iPads. + iPad *bool + // Whether the app should run on iPhones and iPods. + iPhoneAndIPod *bool + // The OdataType property + odataType *string +} +// NewIosDeviceType instantiates a new iosDeviceType and sets the default values. +func NewIosDeviceType()(*IosDeviceType) { + m := &IosDeviceType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosDeviceTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosDeviceTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosDeviceType(), 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 *IosDeviceType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosDeviceType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["iPad"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIPad(val) + } + return nil + } + res["iPhoneAndIPod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIPhoneAndIPod(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 + } + return res +} +// GetIPad gets the iPad property value. Whether the app should run on iPads. +func (m *IosDeviceType) GetIPad()(*bool) { + return m.iPad +} +// GetIPhoneAndIPod gets the iPhoneAndIPod property value. Whether the app should run on iPhones and iPods. +func (m *IosDeviceType) GetIPhoneAndIPod()(*bool) { + return m.iPhoneAndIPod +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosDeviceType) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosDeviceType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("iPad", m.GetIPad()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("iPhoneAndIPod", m.GetIPhoneAndIPod()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosDeviceType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIPad sets the iPad property value. Whether the app should run on iPads. +func (m *IosDeviceType) SetIPad(value *bool)() { + m.iPad = value +} +// SetIPhoneAndIPod sets the iPhoneAndIPod property value. Whether the app should run on iPhones and iPods. +func (m *IosDeviceType) SetIPhoneAndIPod(value *bool)() { + m.iPhoneAndIPod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosDeviceType) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_device_typeable.go b/src/internal/connector/graph/betasdk/models/ios_device_typeable.go new file mode 100644 index 000000000..f2de09eda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_device_typeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosDeviceTypeable +type IosDeviceTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIPad()(*bool) + GetIPhoneAndIPod()(*bool) + GetOdataType()(*string) + SetIPad(value *bool)() + SetIPhoneAndIPod(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration.go b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration.go new file mode 100644 index 000000000..26e1589bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration.go @@ -0,0 +1,744 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEasEmailProfileConfiguration +type IosEasEmailProfileConfiguration struct { + EasEmailProfileConfigurationBase + // Account name. + accountName *string + // Authentication method for this Email profile. Possible values are: usernameAndPassword, certificate, derivedCredential. + authenticationMethod *EasAuthenticationMethod + // Indicates whether or not to block moving messages to other email accounts. + blockMovingMessagesToOtherEmailAccounts *bool + // Indicates whether or not to block sending email from third party apps. + blockSendingEmailFromThirdPartyApps *bool + // Indicates whether or not to block syncing recently used email addresses, for instance - when composing new email. + blockSyncingRecentlyUsedEmailAddresses *bool + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // Possible values for email sync duration. + durationOfEmailToSync *EmailSyncDuration + // Exchange data to sync. Possible values are: none, calendars, contacts, email, notes, reminders. + easServices *EasServices + // Allow users to change sync settings. + easServicesUserOverrideEnabled *bool + // Possible values for username source or email source. + emailAddressSource *UserEmailSource + // Encryption Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. + encryptionCertificateType *EmailCertificateType + // Exchange location that (URL) that the native mail app connects to. + hostName *string + // Identity certificate. + identityCertificate IosCertificateProfileBaseable + // Profile ID of the Per-App VPN policy to be used to access emails from the native Mail client + perAppVPNProfileId *string + // Indicates whether or not to use S/MIME certificate. + requireSmime *bool + // Indicates whether or not to use SSL. + requireSsl *bool + // Signing Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. + signingCertificateType *EmailCertificateType + // Indicates whether or not to allow unencrypted emails. + smimeEnablePerMessageSwitch *bool + // If set to true S/MIME encryption is enabled by default. + smimeEncryptByDefaultEnabled *bool + // If set to true, the user can toggle the encryption by default setting. + smimeEncryptByDefaultUserOverrideEnabled *bool + // S/MIME encryption certificate. + smimeEncryptionCertificate IosCertificateProfileable + // If set to true the user can select the S/MIME encryption identity. + smimeEncryptionCertificateUserOverrideEnabled *bool + // S/MIME signing certificate. + smimeSigningCertificate IosCertificateProfileable + // If set to true, the user can select the signing identity. + smimeSigningCertificateUserOverrideEnabled *bool + // If set to true S/MIME signing is enabled for this account + smimeSigningEnabled *bool + // If set to true, the user can toggle S/MIME signing on or off. + smimeSigningUserOverrideEnabled *bool + // Specifies whether the connection should use OAuth for authentication. + useOAuth *bool +} +// NewIosEasEmailProfileConfiguration instantiates a new IosEasEmailProfileConfiguration and sets the default values. +func NewIosEasEmailProfileConfiguration()(*IosEasEmailProfileConfiguration) { + m := &IosEasEmailProfileConfiguration{ + EasEmailProfileConfigurationBase: *NewEasEmailProfileConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.iosEasEmailProfileConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosEasEmailProfileConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEasEmailProfileConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEasEmailProfileConfiguration(), nil +} +// GetAccountName gets the accountName property value. Account name. +func (m *IosEasEmailProfileConfiguration) GetAccountName()(*string) { + return m.accountName +} +// GetAuthenticationMethod gets the authenticationMethod property value. Authentication method for this Email profile. Possible values are: usernameAndPassword, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) GetAuthenticationMethod()(*EasAuthenticationMethod) { + return m.authenticationMethod +} +// GetBlockMovingMessagesToOtherEmailAccounts gets the blockMovingMessagesToOtherEmailAccounts property value. Indicates whether or not to block moving messages to other email accounts. +func (m *IosEasEmailProfileConfiguration) GetBlockMovingMessagesToOtherEmailAccounts()(*bool) { + return m.blockMovingMessagesToOtherEmailAccounts +} +// GetBlockSendingEmailFromThirdPartyApps gets the blockSendingEmailFromThirdPartyApps property value. Indicates whether or not to block sending email from third party apps. +func (m *IosEasEmailProfileConfiguration) GetBlockSendingEmailFromThirdPartyApps()(*bool) { + return m.blockSendingEmailFromThirdPartyApps +} +// GetBlockSyncingRecentlyUsedEmailAddresses gets the blockSyncingRecentlyUsedEmailAddresses property value. Indicates whether or not to block syncing recently used email addresses, for instance - when composing new email. +func (m *IosEasEmailProfileConfiguration) GetBlockSyncingRecentlyUsedEmailAddresses()(*bool) { + return m.blockSyncingRecentlyUsedEmailAddresses +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosEasEmailProfileConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetDurationOfEmailToSync gets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *IosEasEmailProfileConfiguration) GetDurationOfEmailToSync()(*EmailSyncDuration) { + return m.durationOfEmailToSync +} +// GetEasServices gets the easServices property value. Exchange data to sync. Possible values are: none, calendars, contacts, email, notes, reminders. +func (m *IosEasEmailProfileConfiguration) GetEasServices()(*EasServices) { + return m.easServices +} +// GetEasServicesUserOverrideEnabled gets the easServicesUserOverrideEnabled property value. Allow users to change sync settings. +func (m *IosEasEmailProfileConfiguration) GetEasServicesUserOverrideEnabled()(*bool) { + return m.easServicesUserOverrideEnabled +} +// GetEmailAddressSource gets the emailAddressSource property value. Possible values for username source or email source. +func (m *IosEasEmailProfileConfiguration) GetEmailAddressSource()(*UserEmailSource) { + return m.emailAddressSource +} +// GetEncryptionCertificateType gets the encryptionCertificateType property value. Encryption Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) GetEncryptionCertificateType()(*EmailCertificateType) { + return m.encryptionCertificateType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEasEmailProfileConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EasEmailProfileConfigurationBase.GetFieldDeserializers() + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEasAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*EasAuthenticationMethod)) + } + return nil + } + res["blockMovingMessagesToOtherEmailAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockMovingMessagesToOtherEmailAccounts(val) + } + return nil + } + res["blockSendingEmailFromThirdPartyApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockSendingEmailFromThirdPartyApps(val) + } + return nil + } + res["blockSyncingRecentlyUsedEmailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockSyncingRecentlyUsedEmailAddresses(val) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["durationOfEmailToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailSyncDuration) + if err != nil { + return err + } + if val != nil { + m.SetDurationOfEmailToSync(val.(*EmailSyncDuration)) + } + return nil + } + res["easServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEasServices) + if err != nil { + return err + } + if val != nil { + m.SetEasServices(val.(*EasServices)) + } + return nil + } + res["easServicesUserOverrideEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEasServicesUserOverrideEnabled(val) + } + return nil + } + res["emailAddressSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserEmailSource) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddressSource(val.(*UserEmailSource)) + } + return nil + } + res["encryptionCertificateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailCertificateType) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionCertificateType(val.(*EmailCertificateType)) + } + return nil + } + res["hostName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHostName(val) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(IosCertificateProfileBaseable)) + } + return nil + } + res["perAppVPNProfileId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPerAppVPNProfileId(val) + } + return nil + } + res["requireSmime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSmime(val) + } + return nil + } + res["requireSsl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireSsl(val) + } + return nil + } + res["signingCertificateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailCertificateType) + if err != nil { + return err + } + if val != nil { + m.SetSigningCertificateType(val.(*EmailCertificateType)) + } + return nil + } + res["smimeEnablePerMessageSwitch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeEnablePerMessageSwitch(val) + } + return nil + } + res["smimeEncryptByDefaultEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeEncryptByDefaultEnabled(val) + } + return nil + } + res["smimeEncryptByDefaultUserOverrideEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeEncryptByDefaultUserOverrideEnabled(val) + } + return nil + } + res["smimeEncryptionCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSmimeEncryptionCertificate(val.(IosCertificateProfileable)) + } + return nil + } + res["smimeEncryptionCertificateUserOverrideEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeEncryptionCertificateUserOverrideEnabled(val) + } + return nil + } + res["smimeSigningCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSmimeSigningCertificate(val.(IosCertificateProfileable)) + } + return nil + } + res["smimeSigningCertificateUserOverrideEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeSigningCertificateUserOverrideEnabled(val) + } + return nil + } + res["smimeSigningEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeSigningEnabled(val) + } + return nil + } + res["smimeSigningUserOverrideEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSmimeSigningUserOverrideEnabled(val) + } + return nil + } + res["useOAuth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseOAuth(val) + } + return nil + } + return res +} +// GetHostName gets the hostName property value. Exchange location that (URL) that the native mail app connects to. +func (m *IosEasEmailProfileConfiguration) GetHostName()(*string) { + return m.hostName +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate. +func (m *IosEasEmailProfileConfiguration) GetIdentityCertificate()(IosCertificateProfileBaseable) { + return m.identityCertificate +} +// GetPerAppVPNProfileId gets the perAppVPNProfileId property value. Profile ID of the Per-App VPN policy to be used to access emails from the native Mail client +func (m *IosEasEmailProfileConfiguration) GetPerAppVPNProfileId()(*string) { + return m.perAppVPNProfileId +} +// GetRequireSmime gets the requireSmime property value. Indicates whether or not to use S/MIME certificate. +func (m *IosEasEmailProfileConfiguration) GetRequireSmime()(*bool) { + return m.requireSmime +} +// GetRequireSsl gets the requireSsl property value. Indicates whether or not to use SSL. +func (m *IosEasEmailProfileConfiguration) GetRequireSsl()(*bool) { + return m.requireSsl +} +// GetSigningCertificateType gets the signingCertificateType property value. Signing Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) GetSigningCertificateType()(*EmailCertificateType) { + return m.signingCertificateType +} +// GetSmimeEnablePerMessageSwitch gets the smimeEnablePerMessageSwitch property value. Indicates whether or not to allow unencrypted emails. +func (m *IosEasEmailProfileConfiguration) GetSmimeEnablePerMessageSwitch()(*bool) { + return m.smimeEnablePerMessageSwitch +} +// GetSmimeEncryptByDefaultEnabled gets the smimeEncryptByDefaultEnabled property value. If set to true S/MIME encryption is enabled by default. +func (m *IosEasEmailProfileConfiguration) GetSmimeEncryptByDefaultEnabled()(*bool) { + return m.smimeEncryptByDefaultEnabled +} +// GetSmimeEncryptByDefaultUserOverrideEnabled gets the smimeEncryptByDefaultUserOverrideEnabled property value. If set to true, the user can toggle the encryption by default setting. +func (m *IosEasEmailProfileConfiguration) GetSmimeEncryptByDefaultUserOverrideEnabled()(*bool) { + return m.smimeEncryptByDefaultUserOverrideEnabled +} +// GetSmimeEncryptionCertificate gets the smimeEncryptionCertificate property value. S/MIME encryption certificate. +func (m *IosEasEmailProfileConfiguration) GetSmimeEncryptionCertificate()(IosCertificateProfileable) { + return m.smimeEncryptionCertificate +} +// GetSmimeEncryptionCertificateUserOverrideEnabled gets the smimeEncryptionCertificateUserOverrideEnabled property value. If set to true the user can select the S/MIME encryption identity. +func (m *IosEasEmailProfileConfiguration) GetSmimeEncryptionCertificateUserOverrideEnabled()(*bool) { + return m.smimeEncryptionCertificateUserOverrideEnabled +} +// GetSmimeSigningCertificate gets the smimeSigningCertificate property value. S/MIME signing certificate. +func (m *IosEasEmailProfileConfiguration) GetSmimeSigningCertificate()(IosCertificateProfileable) { + return m.smimeSigningCertificate +} +// GetSmimeSigningCertificateUserOverrideEnabled gets the smimeSigningCertificateUserOverrideEnabled property value. If set to true, the user can select the signing identity. +func (m *IosEasEmailProfileConfiguration) GetSmimeSigningCertificateUserOverrideEnabled()(*bool) { + return m.smimeSigningCertificateUserOverrideEnabled +} +// GetSmimeSigningEnabled gets the smimeSigningEnabled property value. If set to true S/MIME signing is enabled for this account +func (m *IosEasEmailProfileConfiguration) GetSmimeSigningEnabled()(*bool) { + return m.smimeSigningEnabled +} +// GetSmimeSigningUserOverrideEnabled gets the smimeSigningUserOverrideEnabled property value. If set to true, the user can toggle S/MIME signing on or off. +func (m *IosEasEmailProfileConfiguration) GetSmimeSigningUserOverrideEnabled()(*bool) { + return m.smimeSigningUserOverrideEnabled +} +// GetUseOAuth gets the useOAuth property value. Specifies whether the connection should use OAuth for authentication. +func (m *IosEasEmailProfileConfiguration) GetUseOAuth()(*bool) { + return m.useOAuth +} +// Serialize serializes information the current object +func (m *IosEasEmailProfileConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EasEmailProfileConfigurationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockMovingMessagesToOtherEmailAccounts", m.GetBlockMovingMessagesToOtherEmailAccounts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockSendingEmailFromThirdPartyApps", m.GetBlockSendingEmailFromThirdPartyApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockSyncingRecentlyUsedEmailAddresses", m.GetBlockSyncingRecentlyUsedEmailAddresses()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + if m.GetDurationOfEmailToSync() != nil { + cast := (*m.GetDurationOfEmailToSync()).String() + err = writer.WriteStringValue("durationOfEmailToSync", &cast) + if err != nil { + return err + } + } + if m.GetEasServices() != nil { + cast := (*m.GetEasServices()).String() + err = writer.WriteStringValue("easServices", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("easServicesUserOverrideEnabled", m.GetEasServicesUserOverrideEnabled()) + if err != nil { + return err + } + } + if m.GetEmailAddressSource() != nil { + cast := (*m.GetEmailAddressSource()).String() + err = writer.WriteStringValue("emailAddressSource", &cast) + if err != nil { + return err + } + } + if m.GetEncryptionCertificateType() != nil { + cast := (*m.GetEncryptionCertificateType()).String() + err = writer.WriteStringValue("encryptionCertificateType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("hostName", m.GetHostName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("perAppVPNProfileId", m.GetPerAppVPNProfileId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSmime", m.GetRequireSmime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireSsl", m.GetRequireSsl()) + if err != nil { + return err + } + } + if m.GetSigningCertificateType() != nil { + cast := (*m.GetSigningCertificateType()).String() + err = writer.WriteStringValue("signingCertificateType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeEnablePerMessageSwitch", m.GetSmimeEnablePerMessageSwitch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeEncryptByDefaultEnabled", m.GetSmimeEncryptByDefaultEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeEncryptByDefaultUserOverrideEnabled", m.GetSmimeEncryptByDefaultUserOverrideEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("smimeEncryptionCertificate", m.GetSmimeEncryptionCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeEncryptionCertificateUserOverrideEnabled", m.GetSmimeEncryptionCertificateUserOverrideEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("smimeSigningCertificate", m.GetSmimeSigningCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeSigningCertificateUserOverrideEnabled", m.GetSmimeSigningCertificateUserOverrideEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeSigningEnabled", m.GetSmimeSigningEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("smimeSigningUserOverrideEnabled", m.GetSmimeSigningUserOverrideEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useOAuth", m.GetUseOAuth()) + if err != nil { + return err + } + } + return nil +} +// SetAccountName sets the accountName property value. Account name. +func (m *IosEasEmailProfileConfiguration) SetAccountName(value *string)() { + m.accountName = value +} +// SetAuthenticationMethod sets the authenticationMethod property value. Authentication method for this Email profile. Possible values are: usernameAndPassword, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) SetAuthenticationMethod(value *EasAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetBlockMovingMessagesToOtherEmailAccounts sets the blockMovingMessagesToOtherEmailAccounts property value. Indicates whether or not to block moving messages to other email accounts. +func (m *IosEasEmailProfileConfiguration) SetBlockMovingMessagesToOtherEmailAccounts(value *bool)() { + m.blockMovingMessagesToOtherEmailAccounts = value +} +// SetBlockSendingEmailFromThirdPartyApps sets the blockSendingEmailFromThirdPartyApps property value. Indicates whether or not to block sending email from third party apps. +func (m *IosEasEmailProfileConfiguration) SetBlockSendingEmailFromThirdPartyApps(value *bool)() { + m.blockSendingEmailFromThirdPartyApps = value +} +// SetBlockSyncingRecentlyUsedEmailAddresses sets the blockSyncingRecentlyUsedEmailAddresses property value. Indicates whether or not to block syncing recently used email addresses, for instance - when composing new email. +func (m *IosEasEmailProfileConfiguration) SetBlockSyncingRecentlyUsedEmailAddresses(value *bool)() { + m.blockSyncingRecentlyUsedEmailAddresses = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosEasEmailProfileConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetDurationOfEmailToSync sets the durationOfEmailToSync property value. Possible values for email sync duration. +func (m *IosEasEmailProfileConfiguration) SetDurationOfEmailToSync(value *EmailSyncDuration)() { + m.durationOfEmailToSync = value +} +// SetEasServices sets the easServices property value. Exchange data to sync. Possible values are: none, calendars, contacts, email, notes, reminders. +func (m *IosEasEmailProfileConfiguration) SetEasServices(value *EasServices)() { + m.easServices = value +} +// SetEasServicesUserOverrideEnabled sets the easServicesUserOverrideEnabled property value. Allow users to change sync settings. +func (m *IosEasEmailProfileConfiguration) SetEasServicesUserOverrideEnabled(value *bool)() { + m.easServicesUserOverrideEnabled = value +} +// SetEmailAddressSource sets the emailAddressSource property value. Possible values for username source or email source. +func (m *IosEasEmailProfileConfiguration) SetEmailAddressSource(value *UserEmailSource)() { + m.emailAddressSource = value +} +// SetEncryptionCertificateType sets the encryptionCertificateType property value. Encryption Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) SetEncryptionCertificateType(value *EmailCertificateType)() { + m.encryptionCertificateType = value +} +// SetHostName sets the hostName property value. Exchange location that (URL) that the native mail app connects to. +func (m *IosEasEmailProfileConfiguration) SetHostName(value *string)() { + m.hostName = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate. +func (m *IosEasEmailProfileConfiguration) SetIdentityCertificate(value IosCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetPerAppVPNProfileId sets the perAppVPNProfileId property value. Profile ID of the Per-App VPN policy to be used to access emails from the native Mail client +func (m *IosEasEmailProfileConfiguration) SetPerAppVPNProfileId(value *string)() { + m.perAppVPNProfileId = value +} +// SetRequireSmime sets the requireSmime property value. Indicates whether or not to use S/MIME certificate. +func (m *IosEasEmailProfileConfiguration) SetRequireSmime(value *bool)() { + m.requireSmime = value +} +// SetRequireSsl sets the requireSsl property value. Indicates whether or not to use SSL. +func (m *IosEasEmailProfileConfiguration) SetRequireSsl(value *bool)() { + m.requireSsl = value +} +// SetSigningCertificateType sets the signingCertificateType property value. Signing Certificate type for this Email profile. Possible values are: none, certificate, derivedCredential. +func (m *IosEasEmailProfileConfiguration) SetSigningCertificateType(value *EmailCertificateType)() { + m.signingCertificateType = value +} +// SetSmimeEnablePerMessageSwitch sets the smimeEnablePerMessageSwitch property value. Indicates whether or not to allow unencrypted emails. +func (m *IosEasEmailProfileConfiguration) SetSmimeEnablePerMessageSwitch(value *bool)() { + m.smimeEnablePerMessageSwitch = value +} +// SetSmimeEncryptByDefaultEnabled sets the smimeEncryptByDefaultEnabled property value. If set to true S/MIME encryption is enabled by default. +func (m *IosEasEmailProfileConfiguration) SetSmimeEncryptByDefaultEnabled(value *bool)() { + m.smimeEncryptByDefaultEnabled = value +} +// SetSmimeEncryptByDefaultUserOverrideEnabled sets the smimeEncryptByDefaultUserOverrideEnabled property value. If set to true, the user can toggle the encryption by default setting. +func (m *IosEasEmailProfileConfiguration) SetSmimeEncryptByDefaultUserOverrideEnabled(value *bool)() { + m.smimeEncryptByDefaultUserOverrideEnabled = value +} +// SetSmimeEncryptionCertificate sets the smimeEncryptionCertificate property value. S/MIME encryption certificate. +func (m *IosEasEmailProfileConfiguration) SetSmimeEncryptionCertificate(value IosCertificateProfileable)() { + m.smimeEncryptionCertificate = value +} +// SetSmimeEncryptionCertificateUserOverrideEnabled sets the smimeEncryptionCertificateUserOverrideEnabled property value. If set to true the user can select the S/MIME encryption identity. +func (m *IosEasEmailProfileConfiguration) SetSmimeEncryptionCertificateUserOverrideEnabled(value *bool)() { + m.smimeEncryptionCertificateUserOverrideEnabled = value +} +// SetSmimeSigningCertificate sets the smimeSigningCertificate property value. S/MIME signing certificate. +func (m *IosEasEmailProfileConfiguration) SetSmimeSigningCertificate(value IosCertificateProfileable)() { + m.smimeSigningCertificate = value +} +// SetSmimeSigningCertificateUserOverrideEnabled sets the smimeSigningCertificateUserOverrideEnabled property value. If set to true, the user can select the signing identity. +func (m *IosEasEmailProfileConfiguration) SetSmimeSigningCertificateUserOverrideEnabled(value *bool)() { + m.smimeSigningCertificateUserOverrideEnabled = value +} +// SetSmimeSigningEnabled sets the smimeSigningEnabled property value. If set to true S/MIME signing is enabled for this account +func (m *IosEasEmailProfileConfiguration) SetSmimeSigningEnabled(value *bool)() { + m.smimeSigningEnabled = value +} +// SetSmimeSigningUserOverrideEnabled sets the smimeSigningUserOverrideEnabled property value. If set to true, the user can toggle S/MIME signing on or off. +func (m *IosEasEmailProfileConfiguration) SetSmimeSigningUserOverrideEnabled(value *bool)() { + m.smimeSigningUserOverrideEnabled = value +} +// SetUseOAuth sets the useOAuth property value. Specifies whether the connection should use OAuth for authentication. +func (m *IosEasEmailProfileConfiguration) SetUseOAuth(value *bool)() { + m.useOAuth = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_response.go new file mode 100644 index 000000000..dfa728486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEasEmailProfileConfigurationCollectionResponse +type IosEasEmailProfileConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosEasEmailProfileConfigurationable +} +// NewIosEasEmailProfileConfigurationCollectionResponse instantiates a new IosEasEmailProfileConfigurationCollectionResponse and sets the default values. +func NewIosEasEmailProfileConfigurationCollectionResponse()(*IosEasEmailProfileConfigurationCollectionResponse) { + m := &IosEasEmailProfileConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosEasEmailProfileConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEasEmailProfileConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEasEmailProfileConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEasEmailProfileConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosEasEmailProfileConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosEasEmailProfileConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosEasEmailProfileConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosEasEmailProfileConfigurationCollectionResponse) GetValue()([]IosEasEmailProfileConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosEasEmailProfileConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosEasEmailProfileConfigurationCollectionResponse) SetValue(value []IosEasEmailProfileConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_responseable.go new file mode 100644 index 000000000..372f7969d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEasEmailProfileConfigurationCollectionResponseable +type IosEasEmailProfileConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosEasEmailProfileConfigurationable) + SetValue(value []IosEasEmailProfileConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configurationable.go new file mode 100644 index 000000000..4e76b57e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_eas_email_profile_configurationable.go @@ -0,0 +1,65 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEasEmailProfileConfigurationable +type IosEasEmailProfileConfigurationable interface { + EasEmailProfileConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountName()(*string) + GetAuthenticationMethod()(*EasAuthenticationMethod) + GetBlockMovingMessagesToOtherEmailAccounts()(*bool) + GetBlockSendingEmailFromThirdPartyApps()(*bool) + GetBlockSyncingRecentlyUsedEmailAddresses()(*bool) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetDurationOfEmailToSync()(*EmailSyncDuration) + GetEasServices()(*EasServices) + GetEasServicesUserOverrideEnabled()(*bool) + GetEmailAddressSource()(*UserEmailSource) + GetEncryptionCertificateType()(*EmailCertificateType) + GetHostName()(*string) + GetIdentityCertificate()(IosCertificateProfileBaseable) + GetPerAppVPNProfileId()(*string) + GetRequireSmime()(*bool) + GetRequireSsl()(*bool) + GetSigningCertificateType()(*EmailCertificateType) + GetSmimeEnablePerMessageSwitch()(*bool) + GetSmimeEncryptByDefaultEnabled()(*bool) + GetSmimeEncryptByDefaultUserOverrideEnabled()(*bool) + GetSmimeEncryptionCertificate()(IosCertificateProfileable) + GetSmimeEncryptionCertificateUserOverrideEnabled()(*bool) + GetSmimeSigningCertificate()(IosCertificateProfileable) + GetSmimeSigningCertificateUserOverrideEnabled()(*bool) + GetSmimeSigningEnabled()(*bool) + GetSmimeSigningUserOverrideEnabled()(*bool) + GetUseOAuth()(*bool) + SetAccountName(value *string)() + SetAuthenticationMethod(value *EasAuthenticationMethod)() + SetBlockMovingMessagesToOtherEmailAccounts(value *bool)() + SetBlockSendingEmailFromThirdPartyApps(value *bool)() + SetBlockSyncingRecentlyUsedEmailAddresses(value *bool)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetDurationOfEmailToSync(value *EmailSyncDuration)() + SetEasServices(value *EasServices)() + SetEasServicesUserOverrideEnabled(value *bool)() + SetEmailAddressSource(value *UserEmailSource)() + SetEncryptionCertificateType(value *EmailCertificateType)() + SetHostName(value *string)() + SetIdentityCertificate(value IosCertificateProfileBaseable)() + SetPerAppVPNProfileId(value *string)() + SetRequireSmime(value *bool)() + SetRequireSsl(value *bool)() + SetSigningCertificateType(value *EmailCertificateType)() + SetSmimeEnablePerMessageSwitch(value *bool)() + SetSmimeEncryptByDefaultEnabled(value *bool)() + SetSmimeEncryptByDefaultUserOverrideEnabled(value *bool)() + SetSmimeEncryptionCertificate(value IosCertificateProfileable)() + SetSmimeEncryptionCertificateUserOverrideEnabled(value *bool)() + SetSmimeSigningCertificate(value IosCertificateProfileable)() + SetSmimeSigningCertificateUserOverrideEnabled(value *bool)() + SetSmimeSigningEnabled(value *bool)() + SetSmimeSigningUserOverrideEnabled(value *bool)() + SetUseOAuth(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settings.go b/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settings.go new file mode 100644 index 000000000..2f6caf054 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settings.go @@ -0,0 +1,280 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduCertificateSettings trusted Root and PFX certificates for iOS EDU. +type IosEduCertificateSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // File name to display in UI. + certFileName *string + // PKCS Certificate Template Name. + certificateTemplateName *string + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // PKCS Certification Authority. + certificationAuthority *string + // PKCS Certification Authority Name. + certificationAuthorityName *string + // The OdataType property + odataType *string + // Certificate renewal threshold percentage. Valid values 1 to 99 + renewalThresholdPercentage *int32 + // Trusted Root Certificate. + trustedRootCertificate []byte +} +// NewIosEduCertificateSettings instantiates a new iosEduCertificateSettings and sets the default values. +func NewIosEduCertificateSettings()(*IosEduCertificateSettings) { + m := &IosEduCertificateSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosEduCertificateSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEduCertificateSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEduCertificateSettings(), 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 *IosEduCertificateSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *IosEduCertificateSettings) GetCertFileName()(*string) { + return m.certFileName +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name. +func (m *IosEduCertificateSettings) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *IosEduCertificateSettings) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *IosEduCertificateSettings) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority. +func (m *IosEduCertificateSettings) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name. +func (m *IosEduCertificateSettings) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEduCertificateSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(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["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosEduCertificateSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *IosEduCertificateSettings) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *IosEduCertificateSettings) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *IosEduCertificateSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err := writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + 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 *IosEduCertificateSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *IosEduCertificateSettings) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name. +func (m *IosEduCertificateSettings) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *IosEduCertificateSettings) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *IosEduCertificateSettings) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority. +func (m *IosEduCertificateSettings) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name. +func (m *IosEduCertificateSettings) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosEduCertificateSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. Valid values 1 to 99 +func (m *IosEduCertificateSettings) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *IosEduCertificateSettings) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settingsable.go new file mode 100644 index 000000000..44897cf75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_certificate_settingsable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduCertificateSettingsable +type IosEduCertificateSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetCertificateTemplateName()(*string) + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetOdataType()(*string) + GetRenewalThresholdPercentage()(*int32) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetCertificateTemplateName(value *string)() + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetOdataType(value *string)() + SetRenewalThresholdPercentage(value *int32)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration.go b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration.go new file mode 100644 index 000000000..dea40c3a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduDeviceConfiguration +type IosEduDeviceConfiguration struct { + DeviceConfiguration + // The Trusted Root and PFX certificates for Device + deviceCertificateSettings IosEduCertificateSettingsable + // The Trusted Root and PFX certificates for Student + studentCertificateSettings IosEduCertificateSettingsable + // Trusted Root and PFX certificates for iOS EDU. + teacherCertificateSettings IosEduCertificateSettingsable +} +// NewIosEduDeviceConfiguration instantiates a new IosEduDeviceConfiguration and sets the default values. +func NewIosEduDeviceConfiguration()(*IosEduDeviceConfiguration) { + m := &IosEduDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosEduDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosEduDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEduDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEduDeviceConfiguration(), nil +} +// GetDeviceCertificateSettings gets the deviceCertificateSettings property value. The Trusted Root and PFX certificates for Device +func (m *IosEduDeviceConfiguration) GetDeviceCertificateSettings()(IosEduCertificateSettingsable) { + return m.deviceCertificateSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEduDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["deviceCertificateSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosEduCertificateSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceCertificateSettings(val.(IosEduCertificateSettingsable)) + } + return nil + } + res["studentCertificateSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosEduCertificateSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStudentCertificateSettings(val.(IosEduCertificateSettingsable)) + } + return nil + } + res["teacherCertificateSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosEduCertificateSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeacherCertificateSettings(val.(IosEduCertificateSettingsable)) + } + return nil + } + return res +} +// GetStudentCertificateSettings gets the studentCertificateSettings property value. The Trusted Root and PFX certificates for Student +func (m *IosEduDeviceConfiguration) GetStudentCertificateSettings()(IosEduCertificateSettingsable) { + return m.studentCertificateSettings +} +// GetTeacherCertificateSettings gets the teacherCertificateSettings property value. Trusted Root and PFX certificates for iOS EDU. +func (m *IosEduDeviceConfiguration) GetTeacherCertificateSettings()(IosEduCertificateSettingsable) { + return m.teacherCertificateSettings +} +// Serialize serializes information the current object +func (m *IosEduDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("deviceCertificateSettings", m.GetDeviceCertificateSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("studentCertificateSettings", m.GetStudentCertificateSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("teacherCertificateSettings", m.GetTeacherCertificateSettings()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceCertificateSettings sets the deviceCertificateSettings property value. The Trusted Root and PFX certificates for Device +func (m *IosEduDeviceConfiguration) SetDeviceCertificateSettings(value IosEduCertificateSettingsable)() { + m.deviceCertificateSettings = value +} +// SetStudentCertificateSettings sets the studentCertificateSettings property value. The Trusted Root and PFX certificates for Student +func (m *IosEduDeviceConfiguration) SetStudentCertificateSettings(value IosEduCertificateSettingsable)() { + m.studentCertificateSettings = value +} +// SetTeacherCertificateSettings sets the teacherCertificateSettings property value. Trusted Root and PFX certificates for iOS EDU. +func (m *IosEduDeviceConfiguration) SetTeacherCertificateSettings(value IosEduCertificateSettingsable)() { + m.teacherCertificateSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_response.go new file mode 100644 index 000000000..9d3fa1074 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduDeviceConfigurationCollectionResponse +type IosEduDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosEduDeviceConfigurationable +} +// NewIosEduDeviceConfigurationCollectionResponse instantiates a new IosEduDeviceConfigurationCollectionResponse and sets the default values. +func NewIosEduDeviceConfigurationCollectionResponse()(*IosEduDeviceConfigurationCollectionResponse) { + m := &IosEduDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosEduDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEduDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEduDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEduDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosEduDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosEduDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosEduDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosEduDeviceConfigurationCollectionResponse) GetValue()([]IosEduDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosEduDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosEduDeviceConfigurationCollectionResponse) SetValue(value []IosEduDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_responseable.go new file mode 100644 index 000000000..6aa0046da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduDeviceConfigurationCollectionResponseable +type IosEduDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosEduDeviceConfigurationable) + SetValue(value []IosEduDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_edu_device_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_edu_device_configurationable.go new file mode 100644 index 000000000..550231720 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_edu_device_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEduDeviceConfigurationable +type IosEduDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceCertificateSettings()(IosEduCertificateSettingsable) + GetStudentCertificateSettings()(IosEduCertificateSettingsable) + GetTeacherCertificateSettings()(IosEduCertificateSettingsable) + SetDeviceCertificateSettings(value IosEduCertificateSettingsable)() + SetStudentCertificateSettings(value IosEduCertificateSettingsable)() + SetTeacherCertificateSettings(value IosEduCertificateSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_education_device_configuration.go b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration.go new file mode 100644 index 000000000..fba9e7fa9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEducationDeviceConfiguration +type IosEducationDeviceConfiguration struct { + DeviceConfiguration +} +// NewIosEducationDeviceConfiguration instantiates a new IosEducationDeviceConfiguration and sets the default values. +func NewIosEducationDeviceConfiguration()(*IosEducationDeviceConfiguration) { + m := &IosEducationDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosEducationDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosEducationDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEducationDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEducationDeviceConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEducationDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosEducationDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_response.go new file mode 100644 index 000000000..df7a2dbd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEducationDeviceConfigurationCollectionResponse +type IosEducationDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosEducationDeviceConfigurationable +} +// NewIosEducationDeviceConfigurationCollectionResponse instantiates a new IosEducationDeviceConfigurationCollectionResponse and sets the default values. +func NewIosEducationDeviceConfigurationCollectionResponse()(*IosEducationDeviceConfigurationCollectionResponse) { + m := &IosEducationDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosEducationDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEducationDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEducationDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEducationDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosEducationDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosEducationDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosEducationDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosEducationDeviceConfigurationCollectionResponse) GetValue()([]IosEducationDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosEducationDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosEducationDeviceConfigurationCollectionResponse) SetValue(value []IosEducationDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_responseable.go new file mode 100644 index 000000000..b3bf00943 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_education_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEducationDeviceConfigurationCollectionResponseable +type IosEducationDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosEducationDeviceConfigurationable) + SetValue(value []IosEducationDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_education_device_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_education_device_configurationable.go new file mode 100644 index 000000000..2e4de1ca7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_education_device_configurationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEducationDeviceConfigurationable +type IosEducationDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..59ae0c28f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration.go @@ -0,0 +1,338 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEnterpriseWiFiConfiguration +type IosEnterpriseWiFiConfiguration struct { + IosWiFiConfiguration + // Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. + eapFastConfiguration *EapFastConfiguration + // Extensible Authentication Protocol (EAP) configuration types. + eapType *EapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). + identityCertificateForClientAuthentication IosCertificateProfileBaseable + // Non-EAP Method for Authentication when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP - TTLS, EAP - FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. + outerIdentityPrivacyTemporaryValue *string + // Password format string used to build the password to connect to wifi + passwordFormatString *string + // Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. + rootCertificatesForServerValidation []IosTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string + // Username format string used to build the username to connect to wifi + usernameFormatString *string +} +// NewIosEnterpriseWiFiConfiguration instantiates a new IosEnterpriseWiFiConfiguration and sets the default values. +func NewIosEnterpriseWiFiConfiguration()(*IosEnterpriseWiFiConfiguration) { + m := &IosEnterpriseWiFiConfiguration{ + IosWiFiConfiguration: *NewIosWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *IosEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosEnterpriseWiFiConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetEapFastConfiguration gets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *IosEnterpriseWiFiConfiguration) GetEapFastConfiguration()(*EapFastConfiguration) { + return m.eapFastConfiguration +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *IosEnterpriseWiFiConfiguration) GetEapType()(*EapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["eapFastConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapFastConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetEapFastConfiguration(val.(*EapFastConfiguration)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*EapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(IosCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["passwordFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordFormatString(val) + } + return nil + } + res["rootCertificatesForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(IosTrustedRootCertificateable) + } + m.SetRootCertificatesForServerValidation(res) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + res["usernameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsernameFormatString(val) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *IosEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(IosCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *IosEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP - TTLS, EAP - FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. +func (m *IosEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetPasswordFormatString gets the passwordFormatString property value. Password format string used to build the password to connect to wifi +func (m *IosEnterpriseWiFiConfiguration) GetPasswordFormatString()(*string) { + return m.passwordFormatString +} +// GetRootCertificatesForServerValidation gets the rootCertificatesForServerValidation property value. Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. +func (m *IosEnterpriseWiFiConfiguration) GetRootCertificatesForServerValidation()([]IosTrustedRootCertificateable) { + return m.rootCertificatesForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *IosEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// GetUsernameFormatString gets the usernameFormatString property value. Username format string used to build the username to connect to wifi +func (m *IosEnterpriseWiFiConfiguration) GetUsernameFormatString()(*string) { + return m.usernameFormatString +} +// Serialize serializes information the current object +func (m *IosEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + if m.GetEapFastConfiguration() != nil { + cast := (*m.GetEapFastConfiguration()).String() + err = writer.WriteStringValue("eapFastConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordFormatString", m.GetPasswordFormatString()) + if err != nil { + return err + } + } + if m.GetRootCertificatesForServerValidation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRootCertificatesForServerValidation())) + for i, v := range m.GetRootCertificatesForServerValidation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rootCertificatesForServerValidation", cast) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("usernameFormatString", m.GetUsernameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *IosEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosEnterpriseWiFiConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetEapFastConfiguration sets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *IosEnterpriseWiFiConfiguration) SetEapFastConfiguration(value *EapFastConfiguration)() { + m.eapFastConfiguration = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *IosEnterpriseWiFiConfiguration) SetEapType(value *EapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *IosEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value IosCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *IosEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP - TTLS, EAP - FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. +func (m *IosEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetPasswordFormatString sets the passwordFormatString property value. Password format string used to build the password to connect to wifi +func (m *IosEnterpriseWiFiConfiguration) SetPasswordFormatString(value *string)() { + m.passwordFormatString = value +} +// SetRootCertificatesForServerValidation sets the rootCertificatesForServerValidation property value. Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. +func (m *IosEnterpriseWiFiConfiguration) SetRootCertificatesForServerValidation(value []IosTrustedRootCertificateable)() { + m.rootCertificatesForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users' devices when they connect to this Wi-Fi network. +func (m *IosEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} +// SetUsernameFormatString sets the usernameFormatString property value. Username format string used to build the username to connect to wifi +func (m *IosEnterpriseWiFiConfiguration) SetUsernameFormatString(value *string)() { + m.usernameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..cc0d21777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEnterpriseWiFiConfigurationCollectionResponse +type IosEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosEnterpriseWiFiConfigurationable +} +// NewIosEnterpriseWiFiConfigurationCollectionResponse instantiates a new IosEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewIosEnterpriseWiFiConfigurationCollectionResponse()(*IosEnterpriseWiFiConfigurationCollectionResponse) { + m := &IosEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]IosEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []IosEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..9f62176e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEnterpriseWiFiConfigurationCollectionResponseable +type IosEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosEnterpriseWiFiConfigurationable) + SetValue(value []IosEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..e86515b3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_enterprise_wi_fi_configurationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosEnterpriseWiFiConfigurationable +type IosEnterpriseWiFiConfigurationable interface { + IosWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetEapFastConfiguration()(*EapFastConfiguration) + GetEapType()(*EapType) + GetIdentityCertificateForClientAuthentication()(IosCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetPasswordFormatString()(*string) + GetRootCertificatesForServerValidation()([]IosTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + GetUsernameFormatString()(*string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetEapFastConfiguration(value *EapFastConfiguration)() + SetEapType(value *EapType)() + SetIdentityCertificateForClientAuthentication(value IosCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetPasswordFormatString(value *string)() + SetRootCertificatesForServerValidation(value []IosTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() + SetUsernameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration.go b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration.go new file mode 100644 index 000000000..714e2c4a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosExpeditedCheckinConfiguration +type IosExpeditedCheckinConfiguration struct { + AppleExpeditedCheckinConfigurationBase +} +// NewIosExpeditedCheckinConfiguration instantiates a new IosExpeditedCheckinConfiguration and sets the default values. +func NewIosExpeditedCheckinConfiguration()(*IosExpeditedCheckinConfiguration) { + m := &IosExpeditedCheckinConfiguration{ + AppleExpeditedCheckinConfigurationBase: *NewAppleExpeditedCheckinConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.iosExpeditedCheckinConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosExpeditedCheckinConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosExpeditedCheckinConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosExpeditedCheckinConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosExpeditedCheckinConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppleExpeditedCheckinConfigurationBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosExpeditedCheckinConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppleExpeditedCheckinConfigurationBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_response.go new file mode 100644 index 000000000..d50363b22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosExpeditedCheckinConfigurationCollectionResponse +type IosExpeditedCheckinConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosExpeditedCheckinConfigurationable +} +// NewIosExpeditedCheckinConfigurationCollectionResponse instantiates a new IosExpeditedCheckinConfigurationCollectionResponse and sets the default values. +func NewIosExpeditedCheckinConfigurationCollectionResponse()(*IosExpeditedCheckinConfigurationCollectionResponse) { + m := &IosExpeditedCheckinConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosExpeditedCheckinConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosExpeditedCheckinConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosExpeditedCheckinConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosExpeditedCheckinConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosExpeditedCheckinConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosExpeditedCheckinConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosExpeditedCheckinConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosExpeditedCheckinConfigurationCollectionResponse) GetValue()([]IosExpeditedCheckinConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosExpeditedCheckinConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosExpeditedCheckinConfigurationCollectionResponse) SetValue(value []IosExpeditedCheckinConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_responseable.go new file mode 100644 index 000000000..2351a6949 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosExpeditedCheckinConfigurationCollectionResponseable +type IosExpeditedCheckinConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosExpeditedCheckinConfigurationable) + SetValue(value []IosExpeditedCheckinConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configurationable.go new file mode 100644 index 000000000..eb3be9663 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_expedited_checkin_configurationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosExpeditedCheckinConfigurationable +type IosExpeditedCheckinConfigurationable interface { + AppleExpeditedCheckinConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration.go new file mode 100644 index 000000000..12a3bc661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration.go @@ -0,0 +1,4948 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosGeneralDeviceConfiguration +type IosGeneralDeviceConfiguration struct { + DeviceConfiguration + // Indicates whether or not to allow account modification when the device is in supervised mode. + accountBlockModification *bool + // Indicates whether or not to allow activation lock when the device is in the supervised mode. + activationLockAllowWhenSupervised *bool + // Indicates whether or not to allow AirDrop when the device is in supervised mode. + airDropBlocked *bool + // Indicates whether or not to cause AirDrop to be considered an unmanaged drop target (iOS 9.0 and later). + airDropForceUnmanagedDropTarget *bool + // Indicates whether or not to enforce all devices receiving AirPlay requests from this device to use a pairing password. + airPlayForcePairingPasswordForOutgoingRequests *bool + // Indicates whether or not keychain storage of username and password for Airprint is blocked (iOS 11.0 and later). + airPrintBlockCredentialsStorage *bool + // Indicates whether or not AirPrint is blocked (iOS 11.0 and later). + airPrintBlocked *bool + // Indicates whether or not iBeacon discovery of AirPrint printers is blocked. This prevents spurious AirPrint Bluetooth beacons from phishing for network traffic (iOS 11.0 and later). + airPrintBlockiBeaconDiscovery *bool + // Indicates if trusted certificates are required for TLS printing communication (iOS 11.0 and later). + airPrintForceTrustedTLS *bool + // Prevents a user from adding any App Clips and removes any existing App Clips on the device. + appClipsBlocked *bool + // Indicates whether or not to block the user from using News when the device is in supervised mode (iOS 9.0 and later). + appleNewsBlocked *bool + // Limits Apple personalized advertising when true. Available in iOS 14 and later. + applePersonalizedAdsBlocked *bool + // Indicates whether or not to allow Apple Watch pairing when the device is in supervised mode (iOS 9.0 and later). + appleWatchBlockPairing *bool + // Indicates whether or not to force a paired Apple Watch to use Wrist Detection (iOS 8.2 and later). + appleWatchForceWristDetection *bool + // Indicates if the removal of apps is allowed. + appRemovalBlocked *bool + // Gets or sets the list of iOS apps allowed to autonomously enter Single App Mode. Supervised only. iOS 7.0 and later. This collection can contain a maximum of 500 elements. + appsSingleAppModeList []AppListItemable + // Indicates whether or not to block the automatic downloading of apps purchased on other devices when the device is in supervised mode (iOS 9.0 and later). + appStoreBlockAutomaticDownloads *bool + // Indicates whether or not to block the user from using the App Store. Requires a supervised device for iOS 13 and later. + appStoreBlocked *bool + // Indicates whether or not to block the user from making in app purchases. + appStoreBlockInAppPurchases *bool + // Indicates whether or not to block the App Store app, not restricting installation through Host apps. Applies to supervised mode only (iOS 9.0 and later). + appStoreBlockUIAppInstallation *bool + // Indicates whether or not to require a password when using the app store. + appStoreRequirePassword *bool + // List of apps in the visibility list (either visible/launchable apps list or hidden/unlaunchable apps list, controlled by AppsVisibilityListType) (iOS 9.3 and later). This collection can contain a maximum of 10000 elements. + appsVisibilityList []AppListItemable + // Possible values of the compliance app list. + appsVisibilityListType *AppListType + // Indicates whether or not to force user authentication before autofilling passwords and credit card information in Safari and other apps on supervised devices. + autoFillForceAuthentication *bool + // Blocks users from unlocking their device with Apple Watch. Available for devices running iOS and iPadOS versions 14.5 and later. + autoUnlockBlocked *bool + // Indicates whether or not the removal of system apps from the device is blocked on a supervised device (iOS 11.0 and later). + blockSystemAppRemoval *bool + // Indicates whether or not to allow modification of Bluetooth settings when the device is in supervised mode (iOS 10.0 and later). + bluetoothBlockModification *bool + // Indicates whether or not to block the user from accessing the camera of the device. Requires a supervised device for iOS 13 and later. + cameraBlocked *bool + // Indicates whether or not to block data roaming. + cellularBlockDataRoaming *bool + // Indicates whether or not to block global background fetch while roaming. + cellularBlockGlobalBackgroundFetchWhileRoaming *bool + // Indicates whether or not to allow changes to cellular app data usage settings when the device is in supervised mode. + cellularBlockPerAppDataModification *bool + // Indicates whether or not to block Personal Hotspot. + cellularBlockPersonalHotspot *bool + // Indicates whether or not to block the user from modifying the personal hotspot setting (iOS 12.2 or later). + cellularBlockPersonalHotspotModification *bool + // Indicates whether or not to allow users to change the settings of the cellular plan on a supervised device. + cellularBlockPlanModification *bool + // Indicates whether or not to block voice roaming. + cellularBlockVoiceRoaming *bool + // Indicates whether or not to block untrusted TLS certificates. + certificatesBlockUntrustedTlsCertificates *bool + // Indicates whether or not to allow remote screen observation by Classroom app when the device is in supervised mode (iOS 9.3 and later). + classroomAppBlockRemoteScreenObservation *bool + // Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting when the device is in supervised mode. + classroomAppForceUnpromptedScreenObservation *bool + // Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student, when the device is in supervised mode. + classroomForceAutomaticallyJoinClasses *bool + // Indicates whether a student enrolled in an unmanaged course via Classroom will request permission from the teacher when attempting to leave the course (iOS 11.3 and later). + classroomForceRequestPermissionToLeaveClasses *bool + // Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Supervised only. + classroomForceUnpromptedAppAndDeviceLock *bool + // Possible values of the compliance app list. + compliantAppListType *AppListType + // List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. + compliantAppsList []AppListItemable + // Indicates whether or not to block the user from installing configuration profiles and certificates interactively when the device is in supervised mode. + configurationProfileBlockChanges *bool + // Indicates whether or not managed apps can write contacts to unmanaged contacts accounts (iOS 12.0 and later). + contactsAllowManagedToUnmanagedWrite *bool + // Indicates whether or not unmanaged apps can read from managed contacts accounts (iOS 12.0 or later). + contactsAllowUnmanagedToManagedRead *bool + // Indicates whether or not to block the continuous path keyboard when the device is supervised (iOS 13 or later). + continuousPathKeyboardBlocked *bool + // Indicates whether or not the Date and Time 'Set Automatically' feature is enabled and cannot be turned off by the user (iOS 12.0 and later). + dateAndTimeForceSetAutomatically *bool + // Indicates whether or not to block definition lookup when the device is in supervised mode (iOS 8.1.3 and later ). + definitionLookupBlocked *bool + // Indicates whether or not to allow the user to enables restrictions in the device settings when the device is in supervised mode. + deviceBlockEnableRestrictions *bool + // Indicates whether or not to allow the use of the 'Erase all content and settings' option on the device when the device is in supervised mode. + deviceBlockEraseContentAndSettings *bool + // Indicates whether or not to allow device name modification when the device is in supervised mode (iOS 9.0 and later). + deviceBlockNameModification *bool + // Indicates whether or not to block diagnostic data submission. + diagnosticDataBlockSubmission *bool + // Indicates whether or not to allow diagnostics submission settings modification when the device is in supervised mode (iOS 9.3.2 and later). + diagnosticDataBlockSubmissionModification *bool + // Indicates whether or not to block the user from viewing managed documents in unmanaged apps. + documentsBlockManagedDocumentsInUnmanagedApps *bool + // Indicates whether or not to block the user from viewing unmanaged documents in managed apps. + documentsBlockUnmanagedDocumentsInManagedApps *bool + // An email address lacking a suffix that matches any of these strings will be considered out-of-domain. + emailInDomainSuffixes []string + // Indicates whether or not to block the user from trusting an enterprise app. + enterpriseAppBlockTrust *bool + // [Deprecated] Configuring this setting and setting the value to 'true' has no effect on the device. + enterpriseAppBlockTrustModification *bool + // Indicates whether or not Enterprise book back up is blocked. + enterpriseBookBlockBackup *bool + // Indicates whether or not Enterprise book notes and highlights sync is blocked. + enterpriseBookBlockMetadataSync *bool + // Indicates whether or not to allow the addition or removal of cellular plans on the eSIM of a supervised device. + esimBlockModification *bool + // Indicates whether or not to block the user from using FaceTime. Requires a supervised device for iOS 13 and later. + faceTimeBlocked *bool + // Indicates if devices can access files or other resources on a network server using the Server Message Block (SMB) protocol. Available for devices running iOS and iPadOS, versions 13.0 and later. + filesNetworkDriveAccessBlocked *bool + // Indicates if sevices with access can connect to and open files on a USB drive. Available for devices running iOS and iPadOS, versions 13.0 and later. + filesUsbDriveAccessBlocked *bool + // Indicates whether or not to block Find My Device when the device is supervised (iOS 13 or later). + findMyDeviceInFindMyAppBlocked *bool + // Indicates whether or not to block changes to Find My Friends when the device is in supervised mode. + findMyFriendsBlocked *bool + // Indicates whether or not to block Find My Friends when the device is supervised (iOS 13 or later). + findMyFriendsInFindMyAppBlocked *bool + // Indicates whether or not to block the user from using Game Center when the device is in supervised mode. + gameCenterBlocked *bool + // Indicates whether or not to block the user from having friends in Game Center. Requires a supervised device for iOS 13 and later. + gamingBlockGameCenterFriends *bool + // Indicates whether or not to block the user from using multiplayer gaming. Requires a supervised device for iOS 13 and later. + gamingBlockMultiplayer *bool + // indicates whether or not to allow host pairing to control the devices an iOS device can pair with when the iOS device is in supervised mode. + hostPairingBlocked *bool + // Indicates whether or not to block the user from using the iBooks Store when the device is in supervised mode. + iBooksStoreBlocked *bool + // Indicates whether or not to block the user from downloading media from the iBookstore that has been tagged as erotica. + iBooksStoreBlockErotica *bool + // Indicates whether or not to block the user from continuing work they started on iOS device to another iOS or macOS device. + iCloudBlockActivityContinuation *bool + // Indicates whether or not to block iCloud backup. Requires a supervised device for iOS 13 and later. + iCloudBlockBackup *bool + // Indicates whether or not to block iCloud document sync. Requires a supervised device for iOS 13 and later. + iCloudBlockDocumentSync *bool + // Indicates whether or not to block Managed Apps Cloud Sync. + iCloudBlockManagedAppsSync *bool + // Indicates whether or not to block iCloud Photo Library. + iCloudBlockPhotoLibrary *bool + // Indicates whether or not to block iCloud Photo Stream Sync. + iCloudBlockPhotoStreamSync *bool + // Indicates whether or not to block Shared Photo Stream. + iCloudBlockSharedPhotoStream *bool + // iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running iOS 15 and later. + iCloudPrivateRelayBlocked *bool + // Indicates whether or not to require backups to iCloud be encrypted. + iCloudRequireEncryptedBackup *bool + // Indicates whether or not to block the iTunes app. Requires a supervised device for iOS 13 and later. + iTunesBlocked *bool + // Indicates whether or not to block the user from accessing explicit content in iTunes and the App Store. Requires a supervised device for iOS 13 and later. + iTunesBlockExplicitContent *bool + // Indicates whether or not to block Music service and revert Music app to classic mode when the device is in supervised mode (iOS 9.3 and later and macOS 10.12 and later). + iTunesBlockMusicService *bool + // Indicates whether or not to block the user from using iTunes Radio when the device is in supervised mode (iOS 9.3 and later). + iTunesBlockRadio *bool + // Indicates whether or not to block keyboard auto-correction when the device is in supervised mode (iOS 8.1.3 and later). + keyboardBlockAutoCorrect *bool + // Indicates whether or not to block the user from using dictation input when the device is in supervised mode. + keyboardBlockDictation *bool + // Indicates whether or not to block predictive keyboards when device is in supervised mode (iOS 8.1.3 and later). + keyboardBlockPredictive *bool + // Indicates whether or not to block keyboard shortcuts when the device is in supervised mode (iOS 9.0 and later). + keyboardBlockShortcuts *bool + // Indicates whether or not to block keyboard spell-checking when the device is in supervised mode (iOS 8.1.3 and later). + keyboardBlockSpellCheck *bool + // Indicates whether or not iCloud keychain synchronization is blocked. Requires a supervised device for iOS 13 and later. + keychainBlockCloudSync *bool + // Indicates whether or not to allow assistive speak while in kiosk mode. + kioskModeAllowAssistiveSpeak *bool + // Indicates whether or not to allow access to the Assistive Touch Settings while in kiosk mode. + kioskModeAllowAssistiveTouchSettings *bool + // Indicates whether or not to allow device auto lock while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockAutoLock instead. + kioskModeAllowAutoLock *bool + // Indicates whether or not to allow access to the Color Inversion Settings while in kiosk mode. + kioskModeAllowColorInversionSettings *bool + // Indicates whether or not to allow use of the ringer switch while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockRingerSwitch instead. + kioskModeAllowRingerSwitch *bool + // Indicates whether or not to allow screen rotation while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockScreenRotation instead. + kioskModeAllowScreenRotation *bool + // Indicates whether or not to allow use of the sleep button while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockSleepButton instead. + kioskModeAllowSleepButton *bool + // Indicates whether or not to allow use of the touchscreen while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockTouchscreen instead. + kioskModeAllowTouchscreen *bool + // Indicates whether or not to allow the user to toggle voice control in kiosk mode. + kioskModeAllowVoiceControlModification *bool + // Indicates whether or not to allow access to the voice over settings while in kiosk mode. + kioskModeAllowVoiceOverSettings *bool + // Indicates whether or not to allow use of the volume buttons while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockVolumeButtons instead. + kioskModeAllowVolumeButtons *bool + // Indicates whether or not to allow access to the zoom settings while in kiosk mode. + kioskModeAllowZoomSettings *bool + // URL in the app store to the app to use for kiosk mode. Use if KioskModeManagedAppId is not known. + kioskModeAppStoreUrl *string + // App source options for iOS kiosk mode. + kioskModeAppType *IosKioskModeAppType + // Indicates whether or not to block device auto lock while in kiosk mode. + kioskModeBlockAutoLock *bool + // Indicates whether or not to block use of the ringer switch while in kiosk mode. + kioskModeBlockRingerSwitch *bool + // Indicates whether or not to block screen rotation while in kiosk mode. + kioskModeBlockScreenRotation *bool + // Indicates whether or not to block use of the sleep button while in kiosk mode. + kioskModeBlockSleepButton *bool + // Indicates whether or not to block use of the touchscreen while in kiosk mode. + kioskModeBlockTouchscreen *bool + // Indicates whether or not to block the volume buttons while in Kiosk Mode. + kioskModeBlockVolumeButtons *bool + // ID for built-in apps to use for kiosk mode. Used when KioskModeManagedAppId and KioskModeAppStoreUrl are not set. + kioskModeBuiltInAppId *string + // Indicates whether or not to enable voice control in kiosk mode. + kioskModeEnableVoiceControl *bool + // Managed app id of the app to use for kiosk mode. If KioskModeManagedAppId is specified then KioskModeAppStoreUrl will be ignored. + kioskModeManagedAppId *string + // Indicates whether or not to require assistive touch while in kiosk mode. + kioskModeRequireAssistiveTouch *bool + // Indicates whether or not to require color inversion while in kiosk mode. + kioskModeRequireColorInversion *bool + // Indicates whether or not to require mono audio while in kiosk mode. + kioskModeRequireMonoAudio *bool + // Indicates whether or not to require voice over while in kiosk mode. + kioskModeRequireVoiceOver *bool + // Indicates whether or not to require zoom while in kiosk mode. + kioskModeRequireZoom *bool + // Indicates whether or not to block the user from using control center on the lock screen. + lockScreenBlockControlCenter *bool + // Indicates whether or not to block the user from using the notification view on the lock screen. + lockScreenBlockNotificationView *bool + // Indicates whether or not to block the user from using passbook when the device is locked. + lockScreenBlockPassbook *bool + // Indicates whether or not to block the user from using the Today View on the lock screen. + lockScreenBlockTodayView *bool + // Open-in management controls how people share data between unmanaged and managed apps. Setting this to true enforces copy/paste restrictions based on how you configured Block viewing corporate documents in unmanaged apps and Block viewing non-corporate documents in corporate apps. + managedPasteboardRequired *bool + // Apps rating as in media content + mediaContentRatingApps *RatingAppsType + // Media content rating settings for Australia + mediaContentRatingAustralia MediaContentRatingAustraliaable + // Media content rating settings for Canada + mediaContentRatingCanada MediaContentRatingCanadaable + // Media content rating settings for France + mediaContentRatingFrance MediaContentRatingFranceable + // Media content rating settings for Germany + mediaContentRatingGermany MediaContentRatingGermanyable + // Media content rating settings for Ireland + mediaContentRatingIreland MediaContentRatingIrelandable + // Media content rating settings for Japan + mediaContentRatingJapan MediaContentRatingJapanable + // Media content rating settings for New Zealand + mediaContentRatingNewZealand MediaContentRatingNewZealandable + // Media content rating settings for United Kingdom + mediaContentRatingUnitedKingdom MediaContentRatingUnitedKingdomable + // Media content rating settings for United States + mediaContentRatingUnitedStates MediaContentRatingUnitedStatesable + // Indicates whether or not to block the user from using the Messages app on the supervised device. + messagesBlocked *bool + // List of managed apps and the network rules that applies to them. This collection can contain a maximum of 1000 elements. + networkUsageRules []IosNetworkUsageRuleable + // Disable NFC to prevent devices from pairing with other NFC-enabled devices. Available for iOS/iPadOS devices running 14.2 and later. + nfcBlocked *bool + // Indicates whether or not to allow notifications settings modification (iOS 9.3 and later). + notificationsBlockSettingsModification *bool + // Disables connections to Siri servers so that users can’t use Siri to dictate text. Available for devices running iOS and iPadOS versions 14.5 and later. + onDeviceOnlyDictationForced *bool + // When set to TRUE, the setting disables connections to Siri servers so that users can’t use Siri to translate text. When set to FALSE, the setting allows connections to to Siri servers to users can use Siri to translate text. Available for devices running iOS and iPadOS versions 15.0 and later. + onDeviceOnlyTranslationForced *bool + // Block modification of registered Touch ID fingerprints when in supervised mode. + passcodeBlockFingerprintModification *bool + // Indicates whether or not to block fingerprint unlock. + passcodeBlockFingerprintUnlock *bool + // Indicates whether or not to allow passcode modification on the supervised device (iOS 9.0 and later). + passcodeBlockModification *bool + // Indicates whether or not to block simple passcodes. + passcodeBlockSimple *bool + // Number of days before the passcode expires. Valid values 1 to 65535 + passcodeExpirationDays *int32 + // Number of character sets a passcode must contain. Valid values 0 to 4 + passcodeMinimumCharacterSetCount *int32 + // Minimum length of passcode. Valid values 4 to 14 + passcodeMinimumLength *int32 + // Minutes of inactivity before a passcode is required. + passcodeMinutesOfInactivityBeforeLock *int32 + // Minutes of inactivity before the screen times out. + passcodeMinutesOfInactivityBeforeScreenTimeout *int32 + // Number of previous passcodes to block. Valid values 1 to 24 + passcodePreviousPasscodeBlockCount *int32 + // Indicates whether or not to require a passcode. + passcodeRequired *bool + // Possible values of required passwords. + passcodeRequiredType *RequiredPasswordType + // Number of sign in failures allowed before wiping the device. Valid values 2 to 11 + passcodeSignInFailureCountBeforeWipe *int32 + // Indicates whether or not to block sharing passwords with the AirDrop passwords feature iOS 12.0 and later). + passwordBlockAirDropSharing *bool + // Indicates if the AutoFill passwords feature is allowed (iOS 12.0 and later). + passwordBlockAutoFill *bool + // Indicates whether or not to block requesting passwords from nearby devices (iOS 12.0 and later). + passwordBlockProximityRequests *bool + // Indicates whether or not over-the-air PKI updates are blocked. Setting this restriction to false does not disable CRL and OCSP checks (iOS 7.0 and later). + pkiBlockOTAUpdates *bool + // Indicates whether or not to block the user from using podcasts on the supervised device (iOS 8.0 and later). + podcastsBlocked *bool + // Indicates if ad tracking is limited.(iOS 7.0 and later). + privacyForceLimitAdTracking *bool + // Indicates whether or not to enable the prompt to setup nearby devices with a supervised device. + proximityBlockSetupToNewDevice *bool + // Indicates whether or not to block the user from using Auto fill in Safari. Requires a supervised device for iOS 13 and later. + safariBlockAutofill *bool + // Indicates whether or not to block the user from using Safari. Requires a supervised device for iOS 13 and later. + safariBlocked *bool + // Indicates whether or not to block JavaScript in Safari. + safariBlockJavaScript *bool + // Indicates whether or not to block popups in Safari. + safariBlockPopups *bool + // Web Browser Cookie Settings. + safariCookieSettings *WebBrowserCookieSettings + // URLs matching the patterns listed here will be considered managed. + safariManagedDomains []string + // Users can save passwords in Safari only from URLs matching the patterns listed here. Applies to devices in supervised mode (iOS 9.3 and later). + safariPasswordAutoFillDomains []string + // Indicates whether or not to require fraud warning in Safari. + safariRequireFraudWarning *bool + // Indicates whether or not to block the user from taking Screenshots. + screenCaptureBlocked *bool + // Indicates whether or not to block temporary sessions on Shared iPads (iOS 13.4 or later). + sharedDeviceBlockTemporarySessions *bool + // Indicates whether or not to block the user from using Siri. + siriBlocked *bool + // Indicates whether or not to block the user from using Siri when locked. + siriBlockedWhenLocked *bool + // Indicates whether or not to block Siri from querying user-generated content when used on a supervised device. + siriBlockUserGeneratedContent *bool + // Indicates whether or not to prevent Siri from dictating, or speaking profane language on supervised device. + siriRequireProfanityFilter *bool + // Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 + softwareUpdatesEnforcedDelayInDays *int32 + // Indicates whether or not to delay user visibility of software updates when the device is in supervised mode. + softwareUpdatesForceDelayed *bool + // Indicates whether or not to block Spotlight search from returning internet results on supervised device. + spotlightBlockInternetResults *bool + // Allow users to boot devices into recovery mode with unpaired devices. Available for devices running iOS and iPadOS versions 14.5 and later. + unpairedExternalBootToRecoveryAllowed *bool + // Indicates if connecting to USB accessories while the device is locked is allowed (iOS 11.4.1 and later). + usbRestrictedModeBlocked *bool + // Indicates whether or not to block voice dialing. + voiceDialingBlocked *bool + // Indicates whether or not the creation of VPN configurations is blocked (iOS 11.0 and later). + vpnBlockCreation *bool + // Indicates whether or not to allow wallpaper modification on supervised device (iOS 9.0 and later) . + wallpaperBlockModification *bool + // Indicates whether or not to force the device to use only Wi-Fi networks from configuration profiles when the device is in supervised mode. Available for devices running iOS and iPadOS versions 14.4 and earlier. Devices running 14.5+ should use the setting, 'WiFiConnectToAllowedNetworksOnlyForced. + wiFiConnectOnlyToConfiguredNetworks *bool + // Require devices to use Wi-Fi networks set up via configuration profiles. Available for devices running iOS and iPadOS versions 14.5 and later. + wiFiConnectToAllowedNetworksOnlyForced *bool + // Indicates whether or not Wi-Fi remains on, even when device is in airplane mode. Available for devices running iOS and iPadOS, versions 13.0 and later. + wifiPowerOnForced *bool +} +// NewIosGeneralDeviceConfiguration instantiates a new IosGeneralDeviceConfiguration and sets the default values. +func NewIosGeneralDeviceConfiguration()(*IosGeneralDeviceConfiguration) { + m := &IosGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosGeneralDeviceConfiguration(), nil +} +// GetAccountBlockModification gets the accountBlockModification property value. Indicates whether or not to allow account modification when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetAccountBlockModification()(*bool) { + return m.accountBlockModification +} +// GetActivationLockAllowWhenSupervised gets the activationLockAllowWhenSupervised property value. Indicates whether or not to allow activation lock when the device is in the supervised mode. +func (m *IosGeneralDeviceConfiguration) GetActivationLockAllowWhenSupervised()(*bool) { + return m.activationLockAllowWhenSupervised +} +// GetAirDropBlocked gets the airDropBlocked property value. Indicates whether or not to allow AirDrop when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetAirDropBlocked()(*bool) { + return m.airDropBlocked +} +// GetAirDropForceUnmanagedDropTarget gets the airDropForceUnmanagedDropTarget property value. Indicates whether or not to cause AirDrop to be considered an unmanaged drop target (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAirDropForceUnmanagedDropTarget()(*bool) { + return m.airDropForceUnmanagedDropTarget +} +// GetAirPlayForcePairingPasswordForOutgoingRequests gets the airPlayForcePairingPasswordForOutgoingRequests property value. Indicates whether or not to enforce all devices receiving AirPlay requests from this device to use a pairing password. +func (m *IosGeneralDeviceConfiguration) GetAirPlayForcePairingPasswordForOutgoingRequests()(*bool) { + return m.airPlayForcePairingPasswordForOutgoingRequests +} +// GetAirPrintBlockCredentialsStorage gets the airPrintBlockCredentialsStorage property value. Indicates whether or not keychain storage of username and password for Airprint is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAirPrintBlockCredentialsStorage()(*bool) { + return m.airPrintBlockCredentialsStorage +} +// GetAirPrintBlocked gets the airPrintBlocked property value. Indicates whether or not AirPrint is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAirPrintBlocked()(*bool) { + return m.airPrintBlocked +} +// GetAirPrintBlockiBeaconDiscovery gets the airPrintBlockiBeaconDiscovery property value. Indicates whether or not iBeacon discovery of AirPrint printers is blocked. This prevents spurious AirPrint Bluetooth beacons from phishing for network traffic (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAirPrintBlockiBeaconDiscovery()(*bool) { + return m.airPrintBlockiBeaconDiscovery +} +// GetAirPrintForceTrustedTLS gets the airPrintForceTrustedTLS property value. Indicates if trusted certificates are required for TLS printing communication (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAirPrintForceTrustedTLS()(*bool) { + return m.airPrintForceTrustedTLS +} +// GetAppClipsBlocked gets the appClipsBlocked property value. Prevents a user from adding any App Clips and removes any existing App Clips on the device. +func (m *IosGeneralDeviceConfiguration) GetAppClipsBlocked()(*bool) { + return m.appClipsBlocked +} +// GetAppleNewsBlocked gets the appleNewsBlocked property value. Indicates whether or not to block the user from using News when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAppleNewsBlocked()(*bool) { + return m.appleNewsBlocked +} +// GetApplePersonalizedAdsBlocked gets the applePersonalizedAdsBlocked property value. Limits Apple personalized advertising when true. Available in iOS 14 and later. +func (m *IosGeneralDeviceConfiguration) GetApplePersonalizedAdsBlocked()(*bool) { + return m.applePersonalizedAdsBlocked +} +// GetAppleWatchBlockPairing gets the appleWatchBlockPairing property value. Indicates whether or not to allow Apple Watch pairing when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAppleWatchBlockPairing()(*bool) { + return m.appleWatchBlockPairing +} +// GetAppleWatchForceWristDetection gets the appleWatchForceWristDetection property value. Indicates whether or not to force a paired Apple Watch to use Wrist Detection (iOS 8.2 and later). +func (m *IosGeneralDeviceConfiguration) GetAppleWatchForceWristDetection()(*bool) { + return m.appleWatchForceWristDetection +} +// GetAppRemovalBlocked gets the appRemovalBlocked property value. Indicates if the removal of apps is allowed. +func (m *IosGeneralDeviceConfiguration) GetAppRemovalBlocked()(*bool) { + return m.appRemovalBlocked +} +// GetAppsSingleAppModeList gets the appsSingleAppModeList property value. Gets or sets the list of iOS apps allowed to autonomously enter Single App Mode. Supervised only. iOS 7.0 and later. This collection can contain a maximum of 500 elements. +func (m *IosGeneralDeviceConfiguration) GetAppsSingleAppModeList()([]AppListItemable) { + return m.appsSingleAppModeList +} +// GetAppStoreBlockAutomaticDownloads gets the appStoreBlockAutomaticDownloads property value. Indicates whether or not to block the automatic downloading of apps purchased on other devices when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAppStoreBlockAutomaticDownloads()(*bool) { + return m.appStoreBlockAutomaticDownloads +} +// GetAppStoreBlocked gets the appStoreBlocked property value. Indicates whether or not to block the user from using the App Store. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetAppStoreBlocked()(*bool) { + return m.appStoreBlocked +} +// GetAppStoreBlockInAppPurchases gets the appStoreBlockInAppPurchases property value. Indicates whether or not to block the user from making in app purchases. +func (m *IosGeneralDeviceConfiguration) GetAppStoreBlockInAppPurchases()(*bool) { + return m.appStoreBlockInAppPurchases +} +// GetAppStoreBlockUIAppInstallation gets the appStoreBlockUIAppInstallation property value. Indicates whether or not to block the App Store app, not restricting installation through Host apps. Applies to supervised mode only (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetAppStoreBlockUIAppInstallation()(*bool) { + return m.appStoreBlockUIAppInstallation +} +// GetAppStoreRequirePassword gets the appStoreRequirePassword property value. Indicates whether or not to require a password when using the app store. +func (m *IosGeneralDeviceConfiguration) GetAppStoreRequirePassword()(*bool) { + return m.appStoreRequirePassword +} +// GetAppsVisibilityList gets the appsVisibilityList property value. List of apps in the visibility list (either visible/launchable apps list or hidden/unlaunchable apps list, controlled by AppsVisibilityListType) (iOS 9.3 and later). This collection can contain a maximum of 10000 elements. +func (m *IosGeneralDeviceConfiguration) GetAppsVisibilityList()([]AppListItemable) { + return m.appsVisibilityList +} +// GetAppsVisibilityListType gets the appsVisibilityListType property value. Possible values of the compliance app list. +func (m *IosGeneralDeviceConfiguration) GetAppsVisibilityListType()(*AppListType) { + return m.appsVisibilityListType +} +// GetAutoFillForceAuthentication gets the autoFillForceAuthentication property value. Indicates whether or not to force user authentication before autofilling passwords and credit card information in Safari and other apps on supervised devices. +func (m *IosGeneralDeviceConfiguration) GetAutoFillForceAuthentication()(*bool) { + return m.autoFillForceAuthentication +} +// GetAutoUnlockBlocked gets the autoUnlockBlocked property value. Blocks users from unlocking their device with Apple Watch. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) GetAutoUnlockBlocked()(*bool) { + return m.autoUnlockBlocked +} +// GetBlockSystemAppRemoval gets the blockSystemAppRemoval property value. Indicates whether or not the removal of system apps from the device is blocked on a supervised device (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetBlockSystemAppRemoval()(*bool) { + return m.blockSystemAppRemoval +} +// GetBluetoothBlockModification gets the bluetoothBlockModification property value. Indicates whether or not to allow modification of Bluetooth settings when the device is in supervised mode (iOS 10.0 and later). +func (m *IosGeneralDeviceConfiguration) GetBluetoothBlockModification()(*bool) { + return m.bluetoothBlockModification +} +// GetCameraBlocked gets the cameraBlocked property value. Indicates whether or not to block the user from accessing the camera of the device. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetCameraBlocked()(*bool) { + return m.cameraBlocked +} +// GetCellularBlockDataRoaming gets the cellularBlockDataRoaming property value. Indicates whether or not to block data roaming. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockDataRoaming()(*bool) { + return m.cellularBlockDataRoaming +} +// GetCellularBlockGlobalBackgroundFetchWhileRoaming gets the cellularBlockGlobalBackgroundFetchWhileRoaming property value. Indicates whether or not to block global background fetch while roaming. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockGlobalBackgroundFetchWhileRoaming()(*bool) { + return m.cellularBlockGlobalBackgroundFetchWhileRoaming +} +// GetCellularBlockPerAppDataModification gets the cellularBlockPerAppDataModification property value. Indicates whether or not to allow changes to cellular app data usage settings when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockPerAppDataModification()(*bool) { + return m.cellularBlockPerAppDataModification +} +// GetCellularBlockPersonalHotspot gets the cellularBlockPersonalHotspot property value. Indicates whether or not to block Personal Hotspot. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockPersonalHotspot()(*bool) { + return m.cellularBlockPersonalHotspot +} +// GetCellularBlockPersonalHotspotModification gets the cellularBlockPersonalHotspotModification property value. Indicates whether or not to block the user from modifying the personal hotspot setting (iOS 12.2 or later). +func (m *IosGeneralDeviceConfiguration) GetCellularBlockPersonalHotspotModification()(*bool) { + return m.cellularBlockPersonalHotspotModification +} +// GetCellularBlockPlanModification gets the cellularBlockPlanModification property value. Indicates whether or not to allow users to change the settings of the cellular plan on a supervised device. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockPlanModification()(*bool) { + return m.cellularBlockPlanModification +} +// GetCellularBlockVoiceRoaming gets the cellularBlockVoiceRoaming property value. Indicates whether or not to block voice roaming. +func (m *IosGeneralDeviceConfiguration) GetCellularBlockVoiceRoaming()(*bool) { + return m.cellularBlockVoiceRoaming +} +// GetCertificatesBlockUntrustedTlsCertificates gets the certificatesBlockUntrustedTlsCertificates property value. Indicates whether or not to block untrusted TLS certificates. +func (m *IosGeneralDeviceConfiguration) GetCertificatesBlockUntrustedTlsCertificates()(*bool) { + return m.certificatesBlockUntrustedTlsCertificates +} +// GetClassroomAppBlockRemoteScreenObservation gets the classroomAppBlockRemoteScreenObservation property value. Indicates whether or not to allow remote screen observation by Classroom app when the device is in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) GetClassroomAppBlockRemoteScreenObservation()(*bool) { + return m.classroomAppBlockRemoteScreenObservation +} +// GetClassroomAppForceUnpromptedScreenObservation gets the classroomAppForceUnpromptedScreenObservation property value. Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetClassroomAppForceUnpromptedScreenObservation()(*bool) { + return m.classroomAppForceUnpromptedScreenObservation +} +// GetClassroomForceAutomaticallyJoinClasses gets the classroomForceAutomaticallyJoinClasses property value. Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student, when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetClassroomForceAutomaticallyJoinClasses()(*bool) { + return m.classroomForceAutomaticallyJoinClasses +} +// GetClassroomForceRequestPermissionToLeaveClasses gets the classroomForceRequestPermissionToLeaveClasses property value. Indicates whether a student enrolled in an unmanaged course via Classroom will request permission from the teacher when attempting to leave the course (iOS 11.3 and later). +func (m *IosGeneralDeviceConfiguration) GetClassroomForceRequestPermissionToLeaveClasses()(*bool) { + return m.classroomForceRequestPermissionToLeaveClasses +} +// GetClassroomForceUnpromptedAppAndDeviceLock gets the classroomForceUnpromptedAppAndDeviceLock property value. Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Supervised only. +func (m *IosGeneralDeviceConfiguration) GetClassroomForceUnpromptedAppAndDeviceLock()(*bool) { + return m.classroomForceUnpromptedAppAndDeviceLock +} +// GetCompliantAppListType gets the compliantAppListType property value. Possible values of the compliance app list. +func (m *IosGeneralDeviceConfiguration) GetCompliantAppListType()(*AppListType) { + return m.compliantAppListType +} +// GetCompliantAppsList gets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *IosGeneralDeviceConfiguration) GetCompliantAppsList()([]AppListItemable) { + return m.compliantAppsList +} +// GetConfigurationProfileBlockChanges gets the configurationProfileBlockChanges property value. Indicates whether or not to block the user from installing configuration profiles and certificates interactively when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetConfigurationProfileBlockChanges()(*bool) { + return m.configurationProfileBlockChanges +} +// GetContactsAllowManagedToUnmanagedWrite gets the contactsAllowManagedToUnmanagedWrite property value. Indicates whether or not managed apps can write contacts to unmanaged contacts accounts (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) GetContactsAllowManagedToUnmanagedWrite()(*bool) { + return m.contactsAllowManagedToUnmanagedWrite +} +// GetContactsAllowUnmanagedToManagedRead gets the contactsAllowUnmanagedToManagedRead property value. Indicates whether or not unmanaged apps can read from managed contacts accounts (iOS 12.0 or later). +func (m *IosGeneralDeviceConfiguration) GetContactsAllowUnmanagedToManagedRead()(*bool) { + return m.contactsAllowUnmanagedToManagedRead +} +// GetContinuousPathKeyboardBlocked gets the continuousPathKeyboardBlocked property value. Indicates whether or not to block the continuous path keyboard when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) GetContinuousPathKeyboardBlocked()(*bool) { + return m.continuousPathKeyboardBlocked +} +// GetDateAndTimeForceSetAutomatically gets the dateAndTimeForceSetAutomatically property value. Indicates whether or not the Date and Time 'Set Automatically' feature is enabled and cannot be turned off by the user (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) GetDateAndTimeForceSetAutomatically()(*bool) { + return m.dateAndTimeForceSetAutomatically +} +// GetDefinitionLookupBlocked gets the definitionLookupBlocked property value. Indicates whether or not to block definition lookup when the device is in supervised mode (iOS 8.1.3 and later ). +func (m *IosGeneralDeviceConfiguration) GetDefinitionLookupBlocked()(*bool) { + return m.definitionLookupBlocked +} +// GetDeviceBlockEnableRestrictions gets the deviceBlockEnableRestrictions property value. Indicates whether or not to allow the user to enables restrictions in the device settings when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetDeviceBlockEnableRestrictions()(*bool) { + return m.deviceBlockEnableRestrictions +} +// GetDeviceBlockEraseContentAndSettings gets the deviceBlockEraseContentAndSettings property value. Indicates whether or not to allow the use of the 'Erase all content and settings' option on the device when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetDeviceBlockEraseContentAndSettings()(*bool) { + return m.deviceBlockEraseContentAndSettings +} +// GetDeviceBlockNameModification gets the deviceBlockNameModification property value. Indicates whether or not to allow device name modification when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetDeviceBlockNameModification()(*bool) { + return m.deviceBlockNameModification +} +// GetDiagnosticDataBlockSubmission gets the diagnosticDataBlockSubmission property value. Indicates whether or not to block diagnostic data submission. +func (m *IosGeneralDeviceConfiguration) GetDiagnosticDataBlockSubmission()(*bool) { + return m.diagnosticDataBlockSubmission +} +// GetDiagnosticDataBlockSubmissionModification gets the diagnosticDataBlockSubmissionModification property value. Indicates whether or not to allow diagnostics submission settings modification when the device is in supervised mode (iOS 9.3.2 and later). +func (m *IosGeneralDeviceConfiguration) GetDiagnosticDataBlockSubmissionModification()(*bool) { + return m.diagnosticDataBlockSubmissionModification +} +// GetDocumentsBlockManagedDocumentsInUnmanagedApps gets the documentsBlockManagedDocumentsInUnmanagedApps property value. Indicates whether or not to block the user from viewing managed documents in unmanaged apps. +func (m *IosGeneralDeviceConfiguration) GetDocumentsBlockManagedDocumentsInUnmanagedApps()(*bool) { + return m.documentsBlockManagedDocumentsInUnmanagedApps +} +// GetDocumentsBlockUnmanagedDocumentsInManagedApps gets the documentsBlockUnmanagedDocumentsInManagedApps property value. Indicates whether or not to block the user from viewing unmanaged documents in managed apps. +func (m *IosGeneralDeviceConfiguration) GetDocumentsBlockUnmanagedDocumentsInManagedApps()(*bool) { + return m.documentsBlockUnmanagedDocumentsInManagedApps +} +// GetEmailInDomainSuffixes gets the emailInDomainSuffixes property value. An email address lacking a suffix that matches any of these strings will be considered out-of-domain. +func (m *IosGeneralDeviceConfiguration) GetEmailInDomainSuffixes()([]string) { + return m.emailInDomainSuffixes +} +// GetEnterpriseAppBlockTrust gets the enterpriseAppBlockTrust property value. Indicates whether or not to block the user from trusting an enterprise app. +func (m *IosGeneralDeviceConfiguration) GetEnterpriseAppBlockTrust()(*bool) { + return m.enterpriseAppBlockTrust +} +// GetEnterpriseAppBlockTrustModification gets the enterpriseAppBlockTrustModification property value. [Deprecated] Configuring this setting and setting the value to 'true' has no effect on the device. +func (m *IosGeneralDeviceConfiguration) GetEnterpriseAppBlockTrustModification()(*bool) { + return m.enterpriseAppBlockTrustModification +} +// GetEnterpriseBookBlockBackup gets the enterpriseBookBlockBackup property value. Indicates whether or not Enterprise book back up is blocked. +func (m *IosGeneralDeviceConfiguration) GetEnterpriseBookBlockBackup()(*bool) { + return m.enterpriseBookBlockBackup +} +// GetEnterpriseBookBlockMetadataSync gets the enterpriseBookBlockMetadataSync property value. Indicates whether or not Enterprise book notes and highlights sync is blocked. +func (m *IosGeneralDeviceConfiguration) GetEnterpriseBookBlockMetadataSync()(*bool) { + return m.enterpriseBookBlockMetadataSync +} +// GetEsimBlockModification gets the esimBlockModification property value. Indicates whether or not to allow the addition or removal of cellular plans on the eSIM of a supervised device. +func (m *IosGeneralDeviceConfiguration) GetEsimBlockModification()(*bool) { + return m.esimBlockModification +} +// GetFaceTimeBlocked gets the faceTimeBlocked property value. Indicates whether or not to block the user from using FaceTime. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetFaceTimeBlocked()(*bool) { + return m.faceTimeBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["accountBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountBlockModification(val) + } + return nil + } + res["activationLockAllowWhenSupervised"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetActivationLockAllowWhenSupervised(val) + } + return nil + } + res["airDropBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirDropBlocked(val) + } + return nil + } + res["airDropForceUnmanagedDropTarget"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirDropForceUnmanagedDropTarget(val) + } + return nil + } + res["airPlayForcePairingPasswordForOutgoingRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirPlayForcePairingPasswordForOutgoingRequests(val) + } + return nil + } + res["airPrintBlockCredentialsStorage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirPrintBlockCredentialsStorage(val) + } + return nil + } + res["airPrintBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirPrintBlocked(val) + } + return nil + } + res["airPrintBlockiBeaconDiscovery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirPrintBlockiBeaconDiscovery(val) + } + return nil + } + res["airPrintForceTrustedTLS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirPrintForceTrustedTLS(val) + } + return nil + } + res["appClipsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppClipsBlocked(val) + } + return nil + } + res["appleNewsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleNewsBlocked(val) + } + return nil + } + res["applePersonalizedAdsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplePersonalizedAdsBlocked(val) + } + return nil + } + res["appleWatchBlockPairing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleWatchBlockPairing(val) + } + return nil + } + res["appleWatchForceWristDetection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleWatchForceWristDetection(val) + } + return nil + } + res["appRemovalBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppRemovalBlocked(val) + } + return nil + } + res["appsSingleAppModeList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAppsSingleAppModeList(res) + } + return nil + } + res["appStoreBlockAutomaticDownloads"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreBlockAutomaticDownloads(val) + } + return nil + } + res["appStoreBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreBlocked(val) + } + return nil + } + res["appStoreBlockInAppPurchases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreBlockInAppPurchases(val) + } + return nil + } + res["appStoreBlockUIAppInstallation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreBlockUIAppInstallation(val) + } + return nil + } + res["appStoreRequirePassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreRequirePassword(val) + } + return nil + } + res["appsVisibilityList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAppsVisibilityList(res) + } + return nil + } + res["appsVisibilityListType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppListType) + if err != nil { + return err + } + if val != nil { + m.SetAppsVisibilityListType(val.(*AppListType)) + } + return nil + } + res["autoFillForceAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoFillForceAuthentication(val) + } + return nil + } + res["autoUnlockBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoUnlockBlocked(val) + } + return nil + } + res["blockSystemAppRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockSystemAppRemoval(val) + } + return nil + } + res["bluetoothBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBluetoothBlockModification(val) + } + return nil + } + res["cameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraBlocked(val) + } + return nil + } + res["cellularBlockDataRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockDataRoaming(val) + } + return nil + } + res["cellularBlockGlobalBackgroundFetchWhileRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockGlobalBackgroundFetchWhileRoaming(val) + } + return nil + } + res["cellularBlockPerAppDataModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockPerAppDataModification(val) + } + return nil + } + res["cellularBlockPersonalHotspot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockPersonalHotspot(val) + } + return nil + } + res["cellularBlockPersonalHotspotModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockPersonalHotspotModification(val) + } + return nil + } + res["cellularBlockPlanModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockPlanModification(val) + } + return nil + } + res["cellularBlockVoiceRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularBlockVoiceRoaming(val) + } + return nil + } + res["certificatesBlockUntrustedTlsCertificates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificatesBlockUntrustedTlsCertificates(val) + } + return nil + } + res["classroomAppBlockRemoteScreenObservation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomAppBlockRemoteScreenObservation(val) + } + return nil + } + res["classroomAppForceUnpromptedScreenObservation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomAppForceUnpromptedScreenObservation(val) + } + return nil + } + res["classroomForceAutomaticallyJoinClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceAutomaticallyJoinClasses(val) + } + return nil + } + res["classroomForceRequestPermissionToLeaveClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceRequestPermissionToLeaveClasses(val) + } + return nil + } + res["classroomForceUnpromptedAppAndDeviceLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceUnpromptedAppAndDeviceLock(val) + } + return nil + } + res["compliantAppListType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppListType) + if err != nil { + return err + } + if val != nil { + m.SetCompliantAppListType(val.(*AppListType)) + } + return nil + } + res["compliantAppsList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetCompliantAppsList(res) + } + return nil + } + res["configurationProfileBlockChanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationProfileBlockChanges(val) + } + return nil + } + res["contactsAllowManagedToUnmanagedWrite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContactsAllowManagedToUnmanagedWrite(val) + } + return nil + } + res["contactsAllowUnmanagedToManagedRead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContactsAllowUnmanagedToManagedRead(val) + } + return nil + } + res["continuousPathKeyboardBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContinuousPathKeyboardBlocked(val) + } + return nil + } + res["dateAndTimeForceSetAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDateAndTimeForceSetAutomatically(val) + } + return nil + } + res["definitionLookupBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefinitionLookupBlocked(val) + } + return nil + } + res["deviceBlockEnableRestrictions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceBlockEnableRestrictions(val) + } + return nil + } + res["deviceBlockEraseContentAndSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceBlockEraseContentAndSettings(val) + } + return nil + } + res["deviceBlockNameModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceBlockNameModification(val) + } + return nil + } + res["diagnosticDataBlockSubmission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiagnosticDataBlockSubmission(val) + } + return nil + } + res["diagnosticDataBlockSubmissionModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiagnosticDataBlockSubmissionModification(val) + } + return nil + } + res["documentsBlockManagedDocumentsInUnmanagedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentsBlockManagedDocumentsInUnmanagedApps(val) + } + return nil + } + res["documentsBlockUnmanagedDocumentsInManagedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentsBlockUnmanagedDocumentsInManagedApps(val) + } + return nil + } + res["emailInDomainSuffixes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEmailInDomainSuffixes(res) + } + return nil + } + res["enterpriseAppBlockTrust"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnterpriseAppBlockTrust(val) + } + return nil + } + res["enterpriseAppBlockTrustModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnterpriseAppBlockTrustModification(val) + } + return nil + } + res["enterpriseBookBlockBackup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnterpriseBookBlockBackup(val) + } + return nil + } + res["enterpriseBookBlockMetadataSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnterpriseBookBlockMetadataSync(val) + } + return nil + } + res["esimBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEsimBlockModification(val) + } + return nil + } + res["faceTimeBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFaceTimeBlocked(val) + } + return nil + } + res["filesNetworkDriveAccessBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFilesNetworkDriveAccessBlocked(val) + } + return nil + } + res["filesUsbDriveAccessBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFilesUsbDriveAccessBlocked(val) + } + return nil + } + res["findMyDeviceInFindMyAppBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFindMyDeviceInFindMyAppBlocked(val) + } + return nil + } + res["findMyFriendsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFindMyFriendsBlocked(val) + } + return nil + } + res["findMyFriendsInFindMyAppBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFindMyFriendsInFindMyAppBlocked(val) + } + return nil + } + res["gameCenterBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGameCenterBlocked(val) + } + return nil + } + res["gamingBlockGameCenterFriends"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGamingBlockGameCenterFriends(val) + } + return nil + } + res["gamingBlockMultiplayer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGamingBlockMultiplayer(val) + } + return nil + } + res["hostPairingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHostPairingBlocked(val) + } + return nil + } + res["iBooksStoreBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIBooksStoreBlocked(val) + } + return nil + } + res["iBooksStoreBlockErotica"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIBooksStoreBlockErotica(val) + } + return nil + } + res["iCloudBlockActivityContinuation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockActivityContinuation(val) + } + return nil + } + res["iCloudBlockBackup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockBackup(val) + } + return nil + } + res["iCloudBlockDocumentSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockDocumentSync(val) + } + return nil + } + res["iCloudBlockManagedAppsSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockManagedAppsSync(val) + } + return nil + } + res["iCloudBlockPhotoLibrary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockPhotoLibrary(val) + } + return nil + } + res["iCloudBlockPhotoStreamSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockPhotoStreamSync(val) + } + return nil + } + res["iCloudBlockSharedPhotoStream"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockSharedPhotoStream(val) + } + return nil + } + res["iCloudPrivateRelayBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudPrivateRelayBlocked(val) + } + return nil + } + res["iCloudRequireEncryptedBackup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudRequireEncryptedBackup(val) + } + return nil + } + res["iTunesBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlocked(val) + } + return nil + } + res["iTunesBlockExplicitContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlockExplicitContent(val) + } + return nil + } + res["iTunesBlockMusicService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlockMusicService(val) + } + return nil + } + res["iTunesBlockRadio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlockRadio(val) + } + return nil + } + res["keyboardBlockAutoCorrect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockAutoCorrect(val) + } + return nil + } + res["keyboardBlockDictation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockDictation(val) + } + return nil + } + res["keyboardBlockPredictive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockPredictive(val) + } + return nil + } + res["keyboardBlockShortcuts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockShortcuts(val) + } + return nil + } + res["keyboardBlockSpellCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockSpellCheck(val) + } + return nil + } + res["keychainBlockCloudSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeychainBlockCloudSync(val) + } + return nil + } + res["kioskModeAllowAssistiveSpeak"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowAssistiveSpeak(val) + } + return nil + } + res["kioskModeAllowAssistiveTouchSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowAssistiveTouchSettings(val) + } + return nil + } + res["kioskModeAllowAutoLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowAutoLock(val) + } + return nil + } + res["kioskModeAllowColorInversionSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowColorInversionSettings(val) + } + return nil + } + res["kioskModeAllowRingerSwitch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowRingerSwitch(val) + } + return nil + } + res["kioskModeAllowScreenRotation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowScreenRotation(val) + } + return nil + } + res["kioskModeAllowSleepButton"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowSleepButton(val) + } + return nil + } + res["kioskModeAllowTouchscreen"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowTouchscreen(val) + } + return nil + } + res["kioskModeAllowVoiceControlModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowVoiceControlModification(val) + } + return nil + } + res["kioskModeAllowVoiceOverSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowVoiceOverSettings(val) + } + return nil + } + res["kioskModeAllowVolumeButtons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowVolumeButtons(val) + } + return nil + } + res["kioskModeAllowZoomSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAllowZoomSettings(val) + } + return nil + } + res["kioskModeAppStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAppStoreUrl(val) + } + return nil + } + res["kioskModeAppType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosKioskModeAppType) + if err != nil { + return err + } + if val != nil { + m.SetKioskModeAppType(val.(*IosKioskModeAppType)) + } + return nil + } + res["kioskModeBlockAutoLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockAutoLock(val) + } + return nil + } + res["kioskModeBlockRingerSwitch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockRingerSwitch(val) + } + return nil + } + res["kioskModeBlockScreenRotation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockScreenRotation(val) + } + return nil + } + res["kioskModeBlockSleepButton"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockSleepButton(val) + } + return nil + } + res["kioskModeBlockTouchscreen"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockTouchscreen(val) + } + return nil + } + res["kioskModeBlockVolumeButtons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBlockVolumeButtons(val) + } + return nil + } + res["kioskModeBuiltInAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeBuiltInAppId(val) + } + return nil + } + res["kioskModeEnableVoiceControl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeEnableVoiceControl(val) + } + return nil + } + res["kioskModeManagedAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeManagedAppId(val) + } + return nil + } + res["kioskModeRequireAssistiveTouch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeRequireAssistiveTouch(val) + } + return nil + } + res["kioskModeRequireColorInversion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeRequireColorInversion(val) + } + return nil + } + res["kioskModeRequireMonoAudio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeRequireMonoAudio(val) + } + return nil + } + res["kioskModeRequireVoiceOver"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeRequireVoiceOver(val) + } + return nil + } + res["kioskModeRequireZoom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskModeRequireZoom(val) + } + return nil + } + res["lockScreenBlockControlCenter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockScreenBlockControlCenter(val) + } + return nil + } + res["lockScreenBlockNotificationView"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockScreenBlockNotificationView(val) + } + return nil + } + res["lockScreenBlockPassbook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockScreenBlockPassbook(val) + } + return nil + } + res["lockScreenBlockTodayView"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLockScreenBlockTodayView(val) + } + return nil + } + res["managedPasteboardRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedPasteboardRequired(val) + } + return nil + } + res["mediaContentRatingApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingAppsType) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingApps(val.(*RatingAppsType)) + } + return nil + } + res["mediaContentRatingAustralia"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingAustraliaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingAustralia(val.(MediaContentRatingAustraliaable)) + } + return nil + } + res["mediaContentRatingCanada"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingCanadaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingCanada(val.(MediaContentRatingCanadaable)) + } + return nil + } + res["mediaContentRatingFrance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingFranceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingFrance(val.(MediaContentRatingFranceable)) + } + return nil + } + res["mediaContentRatingGermany"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingGermanyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingGermany(val.(MediaContentRatingGermanyable)) + } + return nil + } + res["mediaContentRatingIreland"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingIrelandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingIreland(val.(MediaContentRatingIrelandable)) + } + return nil + } + res["mediaContentRatingJapan"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingJapanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingJapan(val.(MediaContentRatingJapanable)) + } + return nil + } + res["mediaContentRatingNewZealand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingNewZealandFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingNewZealand(val.(MediaContentRatingNewZealandable)) + } + return nil + } + res["mediaContentRatingUnitedKingdom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingUnitedKingdomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingUnitedKingdom(val.(MediaContentRatingUnitedKingdomable)) + } + return nil + } + res["mediaContentRatingUnitedStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaContentRatingUnitedStatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaContentRatingUnitedStates(val.(MediaContentRatingUnitedStatesable)) + } + return nil + } + res["messagesBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMessagesBlocked(val) + } + return nil + } + res["networkUsageRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosNetworkUsageRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosNetworkUsageRuleable, len(val)) + for i, v := range val { + res[i] = v.(IosNetworkUsageRuleable) + } + m.SetNetworkUsageRules(res) + } + return nil + } + res["nfcBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNfcBlocked(val) + } + return nil + } + res["notificationsBlockSettingsModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationsBlockSettingsModification(val) + } + return nil + } + res["onDeviceOnlyDictationForced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnDeviceOnlyDictationForced(val) + } + return nil + } + res["onDeviceOnlyTranslationForced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnDeviceOnlyTranslationForced(val) + } + return nil + } + res["passcodeBlockFingerprintModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeBlockFingerprintModification(val) + } + return nil + } + res["passcodeBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeBlockFingerprintUnlock(val) + } + return nil + } + res["passcodeBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeBlockModification(val) + } + return nil + } + res["passcodeBlockSimple"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeBlockSimple(val) + } + return nil + } + res["passcodeExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeExpirationDays(val) + } + return nil + } + res["passcodeMinimumCharacterSetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinimumCharacterSetCount(val) + } + return nil + } + res["passcodeMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinimumLength(val) + } + return nil + } + res["passcodeMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passcodeMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passcodePreviousPasscodeBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodePreviousPasscodeBlockCount(val) + } + return nil + } + res["passcodeRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeRequired(val) + } + return nil + } + res["passcodeRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasscodeRequiredType(val.(*RequiredPasswordType)) + } + return nil + } + res["passcodeSignInFailureCountBeforeWipe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasscodeSignInFailureCountBeforeWipe(val) + } + return nil + } + res["passwordBlockAirDropSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockAirDropSharing(val) + } + return nil + } + res["passwordBlockAutoFill"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockAutoFill(val) + } + return nil + } + res["passwordBlockProximityRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockProximityRequests(val) + } + return nil + } + res["pkiBlockOTAUpdates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPkiBlockOTAUpdates(val) + } + return nil + } + res["podcastsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPodcastsBlocked(val) + } + return nil + } + res["privacyForceLimitAdTracking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyForceLimitAdTracking(val) + } + return nil + } + res["proximityBlockSetupToNewDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProximityBlockSetupToNewDevice(val) + } + return nil + } + res["safariBlockAutofill"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariBlockAutofill(val) + } + return nil + } + res["safariBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariBlocked(val) + } + return nil + } + res["safariBlockJavaScript"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariBlockJavaScript(val) + } + return nil + } + res["safariBlockPopups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariBlockPopups(val) + } + return nil + } + res["safariCookieSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWebBrowserCookieSettings) + if err != nil { + return err + } + if val != nil { + m.SetSafariCookieSettings(val.(*WebBrowserCookieSettings)) + } + return nil + } + res["safariManagedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSafariManagedDomains(res) + } + return nil + } + res["safariPasswordAutoFillDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSafariPasswordAutoFillDomains(res) + } + return nil + } + res["safariRequireFraudWarning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariRequireFraudWarning(val) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["sharedDeviceBlockTemporarySessions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSharedDeviceBlockTemporarySessions(val) + } + return nil + } + res["siriBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriBlocked(val) + } + return nil + } + res["siriBlockedWhenLocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriBlockedWhenLocked(val) + } + return nil + } + res["siriBlockUserGeneratedContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriBlockUserGeneratedContent(val) + } + return nil + } + res["siriRequireProfanityFilter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSiriRequireProfanityFilter(val) + } + return nil + } + res["softwareUpdatesEnforcedDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdatesEnforcedDelayInDays(val) + } + return nil + } + res["softwareUpdatesForceDelayed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdatesForceDelayed(val) + } + return nil + } + res["spotlightBlockInternetResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSpotlightBlockInternetResults(val) + } + return nil + } + res["unpairedExternalBootToRecoveryAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnpairedExternalBootToRecoveryAllowed(val) + } + return nil + } + res["usbRestrictedModeBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUsbRestrictedModeBlocked(val) + } + return nil + } + res["voiceDialingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVoiceDialingBlocked(val) + } + return nil + } + res["vpnBlockCreation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnBlockCreation(val) + } + return nil + } + res["wallpaperBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWallpaperBlockModification(val) + } + return nil + } + res["wiFiConnectOnlyToConfiguredNetworks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWiFiConnectOnlyToConfiguredNetworks(val) + } + return nil + } + res["wiFiConnectToAllowedNetworksOnlyForced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWiFiConnectToAllowedNetworksOnlyForced(val) + } + return nil + } + res["wifiPowerOnForced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWifiPowerOnForced(val) + } + return nil + } + return res +} +// GetFilesNetworkDriveAccessBlocked gets the filesNetworkDriveAccessBlocked property value. Indicates if devices can access files or other resources on a network server using the Server Message Block (SMB) protocol. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) GetFilesNetworkDriveAccessBlocked()(*bool) { + return m.filesNetworkDriveAccessBlocked +} +// GetFilesUsbDriveAccessBlocked gets the filesUsbDriveAccessBlocked property value. Indicates if sevices with access can connect to and open files on a USB drive. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) GetFilesUsbDriveAccessBlocked()(*bool) { + return m.filesUsbDriveAccessBlocked +} +// GetFindMyDeviceInFindMyAppBlocked gets the findMyDeviceInFindMyAppBlocked property value. Indicates whether or not to block Find My Device when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) GetFindMyDeviceInFindMyAppBlocked()(*bool) { + return m.findMyDeviceInFindMyAppBlocked +} +// GetFindMyFriendsBlocked gets the findMyFriendsBlocked property value. Indicates whether or not to block changes to Find My Friends when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetFindMyFriendsBlocked()(*bool) { + return m.findMyFriendsBlocked +} +// GetFindMyFriendsInFindMyAppBlocked gets the findMyFriendsInFindMyAppBlocked property value. Indicates whether or not to block Find My Friends when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) GetFindMyFriendsInFindMyAppBlocked()(*bool) { + return m.findMyFriendsInFindMyAppBlocked +} +// GetGameCenterBlocked gets the gameCenterBlocked property value. Indicates whether or not to block the user from using Game Center when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetGameCenterBlocked()(*bool) { + return m.gameCenterBlocked +} +// GetGamingBlockGameCenterFriends gets the gamingBlockGameCenterFriends property value. Indicates whether or not to block the user from having friends in Game Center. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetGamingBlockGameCenterFriends()(*bool) { + return m.gamingBlockGameCenterFriends +} +// GetGamingBlockMultiplayer gets the gamingBlockMultiplayer property value. Indicates whether or not to block the user from using multiplayer gaming. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetGamingBlockMultiplayer()(*bool) { + return m.gamingBlockMultiplayer +} +// GetHostPairingBlocked gets the hostPairingBlocked property value. indicates whether or not to allow host pairing to control the devices an iOS device can pair with when the iOS device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetHostPairingBlocked()(*bool) { + return m.hostPairingBlocked +} +// GetIBooksStoreBlocked gets the iBooksStoreBlocked property value. Indicates whether or not to block the user from using the iBooks Store when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetIBooksStoreBlocked()(*bool) { + return m.iBooksStoreBlocked +} +// GetIBooksStoreBlockErotica gets the iBooksStoreBlockErotica property value. Indicates whether or not to block the user from downloading media from the iBookstore that has been tagged as erotica. +func (m *IosGeneralDeviceConfiguration) GetIBooksStoreBlockErotica()(*bool) { + return m.iBooksStoreBlockErotica +} +// GetICloudBlockActivityContinuation gets the iCloudBlockActivityContinuation property value. Indicates whether or not to block the user from continuing work they started on iOS device to another iOS or macOS device. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockActivityContinuation()(*bool) { + return m.iCloudBlockActivityContinuation +} +// GetICloudBlockBackup gets the iCloudBlockBackup property value. Indicates whether or not to block iCloud backup. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockBackup()(*bool) { + return m.iCloudBlockBackup +} +// GetICloudBlockDocumentSync gets the iCloudBlockDocumentSync property value. Indicates whether or not to block iCloud document sync. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockDocumentSync()(*bool) { + return m.iCloudBlockDocumentSync +} +// GetICloudBlockManagedAppsSync gets the iCloudBlockManagedAppsSync property value. Indicates whether or not to block Managed Apps Cloud Sync. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockManagedAppsSync()(*bool) { + return m.iCloudBlockManagedAppsSync +} +// GetICloudBlockPhotoLibrary gets the iCloudBlockPhotoLibrary property value. Indicates whether or not to block iCloud Photo Library. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockPhotoLibrary()(*bool) { + return m.iCloudBlockPhotoLibrary +} +// GetICloudBlockPhotoStreamSync gets the iCloudBlockPhotoStreamSync property value. Indicates whether or not to block iCloud Photo Stream Sync. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockPhotoStreamSync()(*bool) { + return m.iCloudBlockPhotoStreamSync +} +// GetICloudBlockSharedPhotoStream gets the iCloudBlockSharedPhotoStream property value. Indicates whether or not to block Shared Photo Stream. +func (m *IosGeneralDeviceConfiguration) GetICloudBlockSharedPhotoStream()(*bool) { + return m.iCloudBlockSharedPhotoStream +} +// GetICloudPrivateRelayBlocked gets the iCloudPrivateRelayBlocked property value. iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running iOS 15 and later. +func (m *IosGeneralDeviceConfiguration) GetICloudPrivateRelayBlocked()(*bool) { + return m.iCloudPrivateRelayBlocked +} +// GetICloudRequireEncryptedBackup gets the iCloudRequireEncryptedBackup property value. Indicates whether or not to require backups to iCloud be encrypted. +func (m *IosGeneralDeviceConfiguration) GetICloudRequireEncryptedBackup()(*bool) { + return m.iCloudRequireEncryptedBackup +} +// GetITunesBlocked gets the iTunesBlocked property value. Indicates whether or not to block the iTunes app. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetITunesBlocked()(*bool) { + return m.iTunesBlocked +} +// GetITunesBlockExplicitContent gets the iTunesBlockExplicitContent property value. Indicates whether or not to block the user from accessing explicit content in iTunes and the App Store. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetITunesBlockExplicitContent()(*bool) { + return m.iTunesBlockExplicitContent +} +// GetITunesBlockMusicService gets the iTunesBlockMusicService property value. Indicates whether or not to block Music service and revert Music app to classic mode when the device is in supervised mode (iOS 9.3 and later and macOS 10.12 and later). +func (m *IosGeneralDeviceConfiguration) GetITunesBlockMusicService()(*bool) { + return m.iTunesBlockMusicService +} +// GetITunesBlockRadio gets the iTunesBlockRadio property value. Indicates whether or not to block the user from using iTunes Radio when the device is in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) GetITunesBlockRadio()(*bool) { + return m.iTunesBlockRadio +} +// GetKeyboardBlockAutoCorrect gets the keyboardBlockAutoCorrect property value. Indicates whether or not to block keyboard auto-correction when the device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) GetKeyboardBlockAutoCorrect()(*bool) { + return m.keyboardBlockAutoCorrect +} +// GetKeyboardBlockDictation gets the keyboardBlockDictation property value. Indicates whether or not to block the user from using dictation input when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetKeyboardBlockDictation()(*bool) { + return m.keyboardBlockDictation +} +// GetKeyboardBlockPredictive gets the keyboardBlockPredictive property value. Indicates whether or not to block predictive keyboards when device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) GetKeyboardBlockPredictive()(*bool) { + return m.keyboardBlockPredictive +} +// GetKeyboardBlockShortcuts gets the keyboardBlockShortcuts property value. Indicates whether or not to block keyboard shortcuts when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetKeyboardBlockShortcuts()(*bool) { + return m.keyboardBlockShortcuts +} +// GetKeyboardBlockSpellCheck gets the keyboardBlockSpellCheck property value. Indicates whether or not to block keyboard spell-checking when the device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) GetKeyboardBlockSpellCheck()(*bool) { + return m.keyboardBlockSpellCheck +} +// GetKeychainBlockCloudSync gets the keychainBlockCloudSync property value. Indicates whether or not iCloud keychain synchronization is blocked. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetKeychainBlockCloudSync()(*bool) { + return m.keychainBlockCloudSync +} +// GetKioskModeAllowAssistiveSpeak gets the kioskModeAllowAssistiveSpeak property value. Indicates whether or not to allow assistive speak while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowAssistiveSpeak()(*bool) { + return m.kioskModeAllowAssistiveSpeak +} +// GetKioskModeAllowAssistiveTouchSettings gets the kioskModeAllowAssistiveTouchSettings property value. Indicates whether or not to allow access to the Assistive Touch Settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowAssistiveTouchSettings()(*bool) { + return m.kioskModeAllowAssistiveTouchSettings +} +// GetKioskModeAllowAutoLock gets the kioskModeAllowAutoLock property value. Indicates whether or not to allow device auto lock while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockAutoLock instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowAutoLock()(*bool) { + return m.kioskModeAllowAutoLock +} +// GetKioskModeAllowColorInversionSettings gets the kioskModeAllowColorInversionSettings property value. Indicates whether or not to allow access to the Color Inversion Settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowColorInversionSettings()(*bool) { + return m.kioskModeAllowColorInversionSettings +} +// GetKioskModeAllowRingerSwitch gets the kioskModeAllowRingerSwitch property value. Indicates whether or not to allow use of the ringer switch while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockRingerSwitch instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowRingerSwitch()(*bool) { + return m.kioskModeAllowRingerSwitch +} +// GetKioskModeAllowScreenRotation gets the kioskModeAllowScreenRotation property value. Indicates whether or not to allow screen rotation while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockScreenRotation instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowScreenRotation()(*bool) { + return m.kioskModeAllowScreenRotation +} +// GetKioskModeAllowSleepButton gets the kioskModeAllowSleepButton property value. Indicates whether or not to allow use of the sleep button while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockSleepButton instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowSleepButton()(*bool) { + return m.kioskModeAllowSleepButton +} +// GetKioskModeAllowTouchscreen gets the kioskModeAllowTouchscreen property value. Indicates whether or not to allow use of the touchscreen while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockTouchscreen instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowTouchscreen()(*bool) { + return m.kioskModeAllowTouchscreen +} +// GetKioskModeAllowVoiceControlModification gets the kioskModeAllowVoiceControlModification property value. Indicates whether or not to allow the user to toggle voice control in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowVoiceControlModification()(*bool) { + return m.kioskModeAllowVoiceControlModification +} +// GetKioskModeAllowVoiceOverSettings gets the kioskModeAllowVoiceOverSettings property value. Indicates whether or not to allow access to the voice over settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowVoiceOverSettings()(*bool) { + return m.kioskModeAllowVoiceOverSettings +} +// GetKioskModeAllowVolumeButtons gets the kioskModeAllowVolumeButtons property value. Indicates whether or not to allow use of the volume buttons while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockVolumeButtons instead. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowVolumeButtons()(*bool) { + return m.kioskModeAllowVolumeButtons +} +// GetKioskModeAllowZoomSettings gets the kioskModeAllowZoomSettings property value. Indicates whether or not to allow access to the zoom settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAllowZoomSettings()(*bool) { + return m.kioskModeAllowZoomSettings +} +// GetKioskModeAppStoreUrl gets the kioskModeAppStoreUrl property value. URL in the app store to the app to use for kiosk mode. Use if KioskModeManagedAppId is not known. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAppStoreUrl()(*string) { + return m.kioskModeAppStoreUrl +} +// GetKioskModeAppType gets the kioskModeAppType property value. App source options for iOS kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeAppType()(*IosKioskModeAppType) { + return m.kioskModeAppType +} +// GetKioskModeBlockAutoLock gets the kioskModeBlockAutoLock property value. Indicates whether or not to block device auto lock while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockAutoLock()(*bool) { + return m.kioskModeBlockAutoLock +} +// GetKioskModeBlockRingerSwitch gets the kioskModeBlockRingerSwitch property value. Indicates whether or not to block use of the ringer switch while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockRingerSwitch()(*bool) { + return m.kioskModeBlockRingerSwitch +} +// GetKioskModeBlockScreenRotation gets the kioskModeBlockScreenRotation property value. Indicates whether or not to block screen rotation while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockScreenRotation()(*bool) { + return m.kioskModeBlockScreenRotation +} +// GetKioskModeBlockSleepButton gets the kioskModeBlockSleepButton property value. Indicates whether or not to block use of the sleep button while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockSleepButton()(*bool) { + return m.kioskModeBlockSleepButton +} +// GetKioskModeBlockTouchscreen gets the kioskModeBlockTouchscreen property value. Indicates whether or not to block use of the touchscreen while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockTouchscreen()(*bool) { + return m.kioskModeBlockTouchscreen +} +// GetKioskModeBlockVolumeButtons gets the kioskModeBlockVolumeButtons property value. Indicates whether or not to block the volume buttons while in Kiosk Mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBlockVolumeButtons()(*bool) { + return m.kioskModeBlockVolumeButtons +} +// GetKioskModeBuiltInAppId gets the kioskModeBuiltInAppId property value. ID for built-in apps to use for kiosk mode. Used when KioskModeManagedAppId and KioskModeAppStoreUrl are not set. +func (m *IosGeneralDeviceConfiguration) GetKioskModeBuiltInAppId()(*string) { + return m.kioskModeBuiltInAppId +} +// GetKioskModeEnableVoiceControl gets the kioskModeEnableVoiceControl property value. Indicates whether or not to enable voice control in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeEnableVoiceControl()(*bool) { + return m.kioskModeEnableVoiceControl +} +// GetKioskModeManagedAppId gets the kioskModeManagedAppId property value. Managed app id of the app to use for kiosk mode. If KioskModeManagedAppId is specified then KioskModeAppStoreUrl will be ignored. +func (m *IosGeneralDeviceConfiguration) GetKioskModeManagedAppId()(*string) { + return m.kioskModeManagedAppId +} +// GetKioskModeRequireAssistiveTouch gets the kioskModeRequireAssistiveTouch property value. Indicates whether or not to require assistive touch while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeRequireAssistiveTouch()(*bool) { + return m.kioskModeRequireAssistiveTouch +} +// GetKioskModeRequireColorInversion gets the kioskModeRequireColorInversion property value. Indicates whether or not to require color inversion while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeRequireColorInversion()(*bool) { + return m.kioskModeRequireColorInversion +} +// GetKioskModeRequireMonoAudio gets the kioskModeRequireMonoAudio property value. Indicates whether or not to require mono audio while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeRequireMonoAudio()(*bool) { + return m.kioskModeRequireMonoAudio +} +// GetKioskModeRequireVoiceOver gets the kioskModeRequireVoiceOver property value. Indicates whether or not to require voice over while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeRequireVoiceOver()(*bool) { + return m.kioskModeRequireVoiceOver +} +// GetKioskModeRequireZoom gets the kioskModeRequireZoom property value. Indicates whether or not to require zoom while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) GetKioskModeRequireZoom()(*bool) { + return m.kioskModeRequireZoom +} +// GetLockScreenBlockControlCenter gets the lockScreenBlockControlCenter property value. Indicates whether or not to block the user from using control center on the lock screen. +func (m *IosGeneralDeviceConfiguration) GetLockScreenBlockControlCenter()(*bool) { + return m.lockScreenBlockControlCenter +} +// GetLockScreenBlockNotificationView gets the lockScreenBlockNotificationView property value. Indicates whether or not to block the user from using the notification view on the lock screen. +func (m *IosGeneralDeviceConfiguration) GetLockScreenBlockNotificationView()(*bool) { + return m.lockScreenBlockNotificationView +} +// GetLockScreenBlockPassbook gets the lockScreenBlockPassbook property value. Indicates whether or not to block the user from using passbook when the device is locked. +func (m *IosGeneralDeviceConfiguration) GetLockScreenBlockPassbook()(*bool) { + return m.lockScreenBlockPassbook +} +// GetLockScreenBlockTodayView gets the lockScreenBlockTodayView property value. Indicates whether or not to block the user from using the Today View on the lock screen. +func (m *IosGeneralDeviceConfiguration) GetLockScreenBlockTodayView()(*bool) { + return m.lockScreenBlockTodayView +} +// GetManagedPasteboardRequired gets the managedPasteboardRequired property value. Open-in management controls how people share data between unmanaged and managed apps. Setting this to true enforces copy/paste restrictions based on how you configured Block viewing corporate documents in unmanaged apps and Block viewing non-corporate documents in corporate apps. +func (m *IosGeneralDeviceConfiguration) GetManagedPasteboardRequired()(*bool) { + return m.managedPasteboardRequired +} +// GetMediaContentRatingApps gets the mediaContentRatingApps property value. Apps rating as in media content +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingApps()(*RatingAppsType) { + return m.mediaContentRatingApps +} +// GetMediaContentRatingAustralia gets the mediaContentRatingAustralia property value. Media content rating settings for Australia +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingAustralia()(MediaContentRatingAustraliaable) { + return m.mediaContentRatingAustralia +} +// GetMediaContentRatingCanada gets the mediaContentRatingCanada property value. Media content rating settings for Canada +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingCanada()(MediaContentRatingCanadaable) { + return m.mediaContentRatingCanada +} +// GetMediaContentRatingFrance gets the mediaContentRatingFrance property value. Media content rating settings for France +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingFrance()(MediaContentRatingFranceable) { + return m.mediaContentRatingFrance +} +// GetMediaContentRatingGermany gets the mediaContentRatingGermany property value. Media content rating settings for Germany +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingGermany()(MediaContentRatingGermanyable) { + return m.mediaContentRatingGermany +} +// GetMediaContentRatingIreland gets the mediaContentRatingIreland property value. Media content rating settings for Ireland +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingIreland()(MediaContentRatingIrelandable) { + return m.mediaContentRatingIreland +} +// GetMediaContentRatingJapan gets the mediaContentRatingJapan property value. Media content rating settings for Japan +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingJapan()(MediaContentRatingJapanable) { + return m.mediaContentRatingJapan +} +// GetMediaContentRatingNewZealand gets the mediaContentRatingNewZealand property value. Media content rating settings for New Zealand +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingNewZealand()(MediaContentRatingNewZealandable) { + return m.mediaContentRatingNewZealand +} +// GetMediaContentRatingUnitedKingdom gets the mediaContentRatingUnitedKingdom property value. Media content rating settings for United Kingdom +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingUnitedKingdom()(MediaContentRatingUnitedKingdomable) { + return m.mediaContentRatingUnitedKingdom +} +// GetMediaContentRatingUnitedStates gets the mediaContentRatingUnitedStates property value. Media content rating settings for United States +func (m *IosGeneralDeviceConfiguration) GetMediaContentRatingUnitedStates()(MediaContentRatingUnitedStatesable) { + return m.mediaContentRatingUnitedStates +} +// GetMessagesBlocked gets the messagesBlocked property value. Indicates whether or not to block the user from using the Messages app on the supervised device. +func (m *IosGeneralDeviceConfiguration) GetMessagesBlocked()(*bool) { + return m.messagesBlocked +} +// GetNetworkUsageRules gets the networkUsageRules property value. List of managed apps and the network rules that applies to them. This collection can contain a maximum of 1000 elements. +func (m *IosGeneralDeviceConfiguration) GetNetworkUsageRules()([]IosNetworkUsageRuleable) { + return m.networkUsageRules +} +// GetNfcBlocked gets the nfcBlocked property value. Disable NFC to prevent devices from pairing with other NFC-enabled devices. Available for iOS/iPadOS devices running 14.2 and later. +func (m *IosGeneralDeviceConfiguration) GetNfcBlocked()(*bool) { + return m.nfcBlocked +} +// GetNotificationsBlockSettingsModification gets the notificationsBlockSettingsModification property value. Indicates whether or not to allow notifications settings modification (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) GetNotificationsBlockSettingsModification()(*bool) { + return m.notificationsBlockSettingsModification +} +// GetOnDeviceOnlyDictationForced gets the onDeviceOnlyDictationForced property value. Disables connections to Siri servers so that users can’t use Siri to dictate text. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) GetOnDeviceOnlyDictationForced()(*bool) { + return m.onDeviceOnlyDictationForced +} +// GetOnDeviceOnlyTranslationForced gets the onDeviceOnlyTranslationForced property value. When set to TRUE, the setting disables connections to Siri servers so that users can’t use Siri to translate text. When set to FALSE, the setting allows connections to to Siri servers to users can use Siri to translate text. Available for devices running iOS and iPadOS versions 15.0 and later. +func (m *IosGeneralDeviceConfiguration) GetOnDeviceOnlyTranslationForced()(*bool) { + return m.onDeviceOnlyTranslationForced +} +// GetPasscodeBlockFingerprintModification gets the passcodeBlockFingerprintModification property value. Block modification of registered Touch ID fingerprints when in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetPasscodeBlockFingerprintModification()(*bool) { + return m.passcodeBlockFingerprintModification +} +// GetPasscodeBlockFingerprintUnlock gets the passcodeBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *IosGeneralDeviceConfiguration) GetPasscodeBlockFingerprintUnlock()(*bool) { + return m.passcodeBlockFingerprintUnlock +} +// GetPasscodeBlockModification gets the passcodeBlockModification property value. Indicates whether or not to allow passcode modification on the supervised device (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPasscodeBlockModification()(*bool) { + return m.passcodeBlockModification +} +// GetPasscodeBlockSimple gets the passcodeBlockSimple property value. Indicates whether or not to block simple passcodes. +func (m *IosGeneralDeviceConfiguration) GetPasscodeBlockSimple()(*bool) { + return m.passcodeBlockSimple +} +// GetPasscodeExpirationDays gets the passcodeExpirationDays property value. Number of days before the passcode expires. Valid values 1 to 65535 +func (m *IosGeneralDeviceConfiguration) GetPasscodeExpirationDays()(*int32) { + return m.passcodeExpirationDays +} +// GetPasscodeMinimumCharacterSetCount gets the passcodeMinimumCharacterSetCount property value. Number of character sets a passcode must contain. Valid values 0 to 4 +func (m *IosGeneralDeviceConfiguration) GetPasscodeMinimumCharacterSetCount()(*int32) { + return m.passcodeMinimumCharacterSetCount +} +// GetPasscodeMinimumLength gets the passcodeMinimumLength property value. Minimum length of passcode. Valid values 4 to 14 +func (m *IosGeneralDeviceConfiguration) GetPasscodeMinimumLength()(*int32) { + return m.passcodeMinimumLength +} +// GetPasscodeMinutesOfInactivityBeforeLock gets the passcodeMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a passcode is required. +func (m *IosGeneralDeviceConfiguration) GetPasscodeMinutesOfInactivityBeforeLock()(*int32) { + return m.passcodeMinutesOfInactivityBeforeLock +} +// GetPasscodeMinutesOfInactivityBeforeScreenTimeout gets the passcodeMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *IosGeneralDeviceConfiguration) GetPasscodeMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passcodeMinutesOfInactivityBeforeScreenTimeout +} +// GetPasscodePreviousPasscodeBlockCount gets the passcodePreviousPasscodeBlockCount property value. Number of previous passcodes to block. Valid values 1 to 24 +func (m *IosGeneralDeviceConfiguration) GetPasscodePreviousPasscodeBlockCount()(*int32) { + return m.passcodePreviousPasscodeBlockCount +} +// GetPasscodeRequired gets the passcodeRequired property value. Indicates whether or not to require a passcode. +func (m *IosGeneralDeviceConfiguration) GetPasscodeRequired()(*bool) { + return m.passcodeRequired +} +// GetPasscodeRequiredType gets the passcodeRequiredType property value. Possible values of required passwords. +func (m *IosGeneralDeviceConfiguration) GetPasscodeRequiredType()(*RequiredPasswordType) { + return m.passcodeRequiredType +} +// GetPasscodeSignInFailureCountBeforeWipe gets the passcodeSignInFailureCountBeforeWipe property value. Number of sign in failures allowed before wiping the device. Valid values 2 to 11 +func (m *IosGeneralDeviceConfiguration) GetPasscodeSignInFailureCountBeforeWipe()(*int32) { + return m.passcodeSignInFailureCountBeforeWipe +} +// GetPasswordBlockAirDropSharing gets the passwordBlockAirDropSharing property value. Indicates whether or not to block sharing passwords with the AirDrop passwords feature iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPasswordBlockAirDropSharing()(*bool) { + return m.passwordBlockAirDropSharing +} +// GetPasswordBlockAutoFill gets the passwordBlockAutoFill property value. Indicates if the AutoFill passwords feature is allowed (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPasswordBlockAutoFill()(*bool) { + return m.passwordBlockAutoFill +} +// GetPasswordBlockProximityRequests gets the passwordBlockProximityRequests property value. Indicates whether or not to block requesting passwords from nearby devices (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPasswordBlockProximityRequests()(*bool) { + return m.passwordBlockProximityRequests +} +// GetPkiBlockOTAUpdates gets the pkiBlockOTAUpdates property value. Indicates whether or not over-the-air PKI updates are blocked. Setting this restriction to false does not disable CRL and OCSP checks (iOS 7.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPkiBlockOTAUpdates()(*bool) { + return m.pkiBlockOTAUpdates +} +// GetPodcastsBlocked gets the podcastsBlocked property value. Indicates whether or not to block the user from using podcasts on the supervised device (iOS 8.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPodcastsBlocked()(*bool) { + return m.podcastsBlocked +} +// GetPrivacyForceLimitAdTracking gets the privacyForceLimitAdTracking property value. Indicates if ad tracking is limited.(iOS 7.0 and later). +func (m *IosGeneralDeviceConfiguration) GetPrivacyForceLimitAdTracking()(*bool) { + return m.privacyForceLimitAdTracking +} +// GetProximityBlockSetupToNewDevice gets the proximityBlockSetupToNewDevice property value. Indicates whether or not to enable the prompt to setup nearby devices with a supervised device. +func (m *IosGeneralDeviceConfiguration) GetProximityBlockSetupToNewDevice()(*bool) { + return m.proximityBlockSetupToNewDevice +} +// GetSafariBlockAutofill gets the safariBlockAutofill property value. Indicates whether or not to block the user from using Auto fill in Safari. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetSafariBlockAutofill()(*bool) { + return m.safariBlockAutofill +} +// GetSafariBlocked gets the safariBlocked property value. Indicates whether or not to block the user from using Safari. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) GetSafariBlocked()(*bool) { + return m.safariBlocked +} +// GetSafariBlockJavaScript gets the safariBlockJavaScript property value. Indicates whether or not to block JavaScript in Safari. +func (m *IosGeneralDeviceConfiguration) GetSafariBlockJavaScript()(*bool) { + return m.safariBlockJavaScript +} +// GetSafariBlockPopups gets the safariBlockPopups property value. Indicates whether or not to block popups in Safari. +func (m *IosGeneralDeviceConfiguration) GetSafariBlockPopups()(*bool) { + return m.safariBlockPopups +} +// GetSafariCookieSettings gets the safariCookieSettings property value. Web Browser Cookie Settings. +func (m *IosGeneralDeviceConfiguration) GetSafariCookieSettings()(*WebBrowserCookieSettings) { + return m.safariCookieSettings +} +// GetSafariManagedDomains gets the safariManagedDomains property value. URLs matching the patterns listed here will be considered managed. +func (m *IosGeneralDeviceConfiguration) GetSafariManagedDomains()([]string) { + return m.safariManagedDomains +} +// GetSafariPasswordAutoFillDomains gets the safariPasswordAutoFillDomains property value. Users can save passwords in Safari only from URLs matching the patterns listed here. Applies to devices in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) GetSafariPasswordAutoFillDomains()([]string) { + return m.safariPasswordAutoFillDomains +} +// GetSafariRequireFraudWarning gets the safariRequireFraudWarning property value. Indicates whether or not to require fraud warning in Safari. +func (m *IosGeneralDeviceConfiguration) GetSafariRequireFraudWarning()(*bool) { + return m.safariRequireFraudWarning +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether or not to block the user from taking Screenshots. +func (m *IosGeneralDeviceConfiguration) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetSharedDeviceBlockTemporarySessions gets the sharedDeviceBlockTemporarySessions property value. Indicates whether or not to block temporary sessions on Shared iPads (iOS 13.4 or later). +func (m *IosGeneralDeviceConfiguration) GetSharedDeviceBlockTemporarySessions()(*bool) { + return m.sharedDeviceBlockTemporarySessions +} +// GetSiriBlocked gets the siriBlocked property value. Indicates whether or not to block the user from using Siri. +func (m *IosGeneralDeviceConfiguration) GetSiriBlocked()(*bool) { + return m.siriBlocked +} +// GetSiriBlockedWhenLocked gets the siriBlockedWhenLocked property value. Indicates whether or not to block the user from using Siri when locked. +func (m *IosGeneralDeviceConfiguration) GetSiriBlockedWhenLocked()(*bool) { + return m.siriBlockedWhenLocked +} +// GetSiriBlockUserGeneratedContent gets the siriBlockUserGeneratedContent property value. Indicates whether or not to block Siri from querying user-generated content when used on a supervised device. +func (m *IosGeneralDeviceConfiguration) GetSiriBlockUserGeneratedContent()(*bool) { + return m.siriBlockUserGeneratedContent +} +// GetSiriRequireProfanityFilter gets the siriRequireProfanityFilter property value. Indicates whether or not to prevent Siri from dictating, or speaking profane language on supervised device. +func (m *IosGeneralDeviceConfiguration) GetSiriRequireProfanityFilter()(*bool) { + return m.siriRequireProfanityFilter +} +// GetSoftwareUpdatesEnforcedDelayInDays gets the softwareUpdatesEnforcedDelayInDays property value. Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 +func (m *IosGeneralDeviceConfiguration) GetSoftwareUpdatesEnforcedDelayInDays()(*int32) { + return m.softwareUpdatesEnforcedDelayInDays +} +// GetSoftwareUpdatesForceDelayed gets the softwareUpdatesForceDelayed property value. Indicates whether or not to delay user visibility of software updates when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) GetSoftwareUpdatesForceDelayed()(*bool) { + return m.softwareUpdatesForceDelayed +} +// GetSpotlightBlockInternetResults gets the spotlightBlockInternetResults property value. Indicates whether or not to block Spotlight search from returning internet results on supervised device. +func (m *IosGeneralDeviceConfiguration) GetSpotlightBlockInternetResults()(*bool) { + return m.spotlightBlockInternetResults +} +// GetUnpairedExternalBootToRecoveryAllowed gets the unpairedExternalBootToRecoveryAllowed property value. Allow users to boot devices into recovery mode with unpaired devices. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) GetUnpairedExternalBootToRecoveryAllowed()(*bool) { + return m.unpairedExternalBootToRecoveryAllowed +} +// GetUsbRestrictedModeBlocked gets the usbRestrictedModeBlocked property value. Indicates if connecting to USB accessories while the device is locked is allowed (iOS 11.4.1 and later). +func (m *IosGeneralDeviceConfiguration) GetUsbRestrictedModeBlocked()(*bool) { + return m.usbRestrictedModeBlocked +} +// GetVoiceDialingBlocked gets the voiceDialingBlocked property value. Indicates whether or not to block voice dialing. +func (m *IosGeneralDeviceConfiguration) GetVoiceDialingBlocked()(*bool) { + return m.voiceDialingBlocked +} +// GetVpnBlockCreation gets the vpnBlockCreation property value. Indicates whether or not the creation of VPN configurations is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) GetVpnBlockCreation()(*bool) { + return m.vpnBlockCreation +} +// GetWallpaperBlockModification gets the wallpaperBlockModification property value. Indicates whether or not to allow wallpaper modification on supervised device (iOS 9.0 and later) . +func (m *IosGeneralDeviceConfiguration) GetWallpaperBlockModification()(*bool) { + return m.wallpaperBlockModification +} +// GetWiFiConnectOnlyToConfiguredNetworks gets the wiFiConnectOnlyToConfiguredNetworks property value. Indicates whether or not to force the device to use only Wi-Fi networks from configuration profiles when the device is in supervised mode. Available for devices running iOS and iPadOS versions 14.4 and earlier. Devices running 14.5+ should use the setting, 'WiFiConnectToAllowedNetworksOnlyForced. +func (m *IosGeneralDeviceConfiguration) GetWiFiConnectOnlyToConfiguredNetworks()(*bool) { + return m.wiFiConnectOnlyToConfiguredNetworks +} +// GetWiFiConnectToAllowedNetworksOnlyForced gets the wiFiConnectToAllowedNetworksOnlyForced property value. Require devices to use Wi-Fi networks set up via configuration profiles. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) GetWiFiConnectToAllowedNetworksOnlyForced()(*bool) { + return m.wiFiConnectToAllowedNetworksOnlyForced +} +// GetWifiPowerOnForced gets the wifiPowerOnForced property value. Indicates whether or not Wi-Fi remains on, even when device is in airplane mode. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) GetWifiPowerOnForced()(*bool) { + return m.wifiPowerOnForced +} +// Serialize serializes information the current object +func (m *IosGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountBlockModification", m.GetAccountBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("activationLockAllowWhenSupervised", m.GetActivationLockAllowWhenSupervised()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airDropBlocked", m.GetAirDropBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airDropForceUnmanagedDropTarget", m.GetAirDropForceUnmanagedDropTarget()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airPlayForcePairingPasswordForOutgoingRequests", m.GetAirPlayForcePairingPasswordForOutgoingRequests()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airPrintBlockCredentialsStorage", m.GetAirPrintBlockCredentialsStorage()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airPrintBlocked", m.GetAirPrintBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airPrintBlockiBeaconDiscovery", m.GetAirPrintBlockiBeaconDiscovery()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airPrintForceTrustedTLS", m.GetAirPrintForceTrustedTLS()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appClipsBlocked", m.GetAppClipsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appleNewsBlocked", m.GetAppleNewsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("applePersonalizedAdsBlocked", m.GetApplePersonalizedAdsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appleWatchBlockPairing", m.GetAppleWatchBlockPairing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appleWatchForceWristDetection", m.GetAppleWatchForceWristDetection()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appRemovalBlocked", m.GetAppRemovalBlocked()) + if err != nil { + return err + } + } + if m.GetAppsSingleAppModeList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppsSingleAppModeList())) + for i, v := range m.GetAppsSingleAppModeList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appsSingleAppModeList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appStoreBlockAutomaticDownloads", m.GetAppStoreBlockAutomaticDownloads()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appStoreBlocked", m.GetAppStoreBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appStoreBlockInAppPurchases", m.GetAppStoreBlockInAppPurchases()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appStoreBlockUIAppInstallation", m.GetAppStoreBlockUIAppInstallation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appStoreRequirePassword", m.GetAppStoreRequirePassword()) + if err != nil { + return err + } + } + if m.GetAppsVisibilityList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppsVisibilityList())) + for i, v := range m.GetAppsVisibilityList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appsVisibilityList", cast) + if err != nil { + return err + } + } + if m.GetAppsVisibilityListType() != nil { + cast := (*m.GetAppsVisibilityListType()).String() + err = writer.WriteStringValue("appsVisibilityListType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("autoFillForceAuthentication", m.GetAutoFillForceAuthentication()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("autoUnlockBlocked", m.GetAutoUnlockBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockSystemAppRemoval", m.GetBlockSystemAppRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("bluetoothBlockModification", m.GetBluetoothBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cameraBlocked", m.GetCameraBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockDataRoaming", m.GetCellularBlockDataRoaming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockGlobalBackgroundFetchWhileRoaming", m.GetCellularBlockGlobalBackgroundFetchWhileRoaming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockPerAppDataModification", m.GetCellularBlockPerAppDataModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockPersonalHotspot", m.GetCellularBlockPersonalHotspot()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockPersonalHotspotModification", m.GetCellularBlockPersonalHotspotModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockPlanModification", m.GetCellularBlockPlanModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cellularBlockVoiceRoaming", m.GetCellularBlockVoiceRoaming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("certificatesBlockUntrustedTlsCertificates", m.GetCertificatesBlockUntrustedTlsCertificates()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomAppBlockRemoteScreenObservation", m.GetClassroomAppBlockRemoteScreenObservation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomAppForceUnpromptedScreenObservation", m.GetClassroomAppForceUnpromptedScreenObservation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceAutomaticallyJoinClasses", m.GetClassroomForceAutomaticallyJoinClasses()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceRequestPermissionToLeaveClasses", m.GetClassroomForceRequestPermissionToLeaveClasses()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceUnpromptedAppAndDeviceLock", m.GetClassroomForceUnpromptedAppAndDeviceLock()) + if err != nil { + return err + } + } + if m.GetCompliantAppListType() != nil { + cast := (*m.GetCompliantAppListType()).String() + err = writer.WriteStringValue("compliantAppListType", &cast) + if err != nil { + return err + } + } + if m.GetCompliantAppsList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompliantAppsList())) + for i, v := range m.GetCompliantAppsList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("compliantAppsList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("configurationProfileBlockChanges", m.GetConfigurationProfileBlockChanges()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contactsAllowManagedToUnmanagedWrite", m.GetContactsAllowManagedToUnmanagedWrite()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contactsAllowUnmanagedToManagedRead", m.GetContactsAllowUnmanagedToManagedRead()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("continuousPathKeyboardBlocked", m.GetContinuousPathKeyboardBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dateAndTimeForceSetAutomatically", m.GetDateAndTimeForceSetAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("definitionLookupBlocked", m.GetDefinitionLookupBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceBlockEnableRestrictions", m.GetDeviceBlockEnableRestrictions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceBlockEraseContentAndSettings", m.GetDeviceBlockEraseContentAndSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceBlockNameModification", m.GetDeviceBlockNameModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("diagnosticDataBlockSubmission", m.GetDiagnosticDataBlockSubmission()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("diagnosticDataBlockSubmissionModification", m.GetDiagnosticDataBlockSubmissionModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("documentsBlockManagedDocumentsInUnmanagedApps", m.GetDocumentsBlockManagedDocumentsInUnmanagedApps()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("documentsBlockUnmanagedDocumentsInManagedApps", m.GetDocumentsBlockUnmanagedDocumentsInManagedApps()) + if err != nil { + return err + } + } + if m.GetEmailInDomainSuffixes() != nil { + err = writer.WriteCollectionOfStringValues("emailInDomainSuffixes", m.GetEmailInDomainSuffixes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enterpriseAppBlockTrust", m.GetEnterpriseAppBlockTrust()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enterpriseAppBlockTrustModification", m.GetEnterpriseAppBlockTrustModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enterpriseBookBlockBackup", m.GetEnterpriseBookBlockBackup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enterpriseBookBlockMetadataSync", m.GetEnterpriseBookBlockMetadataSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("esimBlockModification", m.GetEsimBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("faceTimeBlocked", m.GetFaceTimeBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("filesNetworkDriveAccessBlocked", m.GetFilesNetworkDriveAccessBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("filesUsbDriveAccessBlocked", m.GetFilesUsbDriveAccessBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("findMyDeviceInFindMyAppBlocked", m.GetFindMyDeviceInFindMyAppBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("findMyFriendsBlocked", m.GetFindMyFriendsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("findMyFriendsInFindMyAppBlocked", m.GetFindMyFriendsInFindMyAppBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("gameCenterBlocked", m.GetGameCenterBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("gamingBlockGameCenterFriends", m.GetGamingBlockGameCenterFriends()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("gamingBlockMultiplayer", m.GetGamingBlockMultiplayer()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hostPairingBlocked", m.GetHostPairingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iBooksStoreBlocked", m.GetIBooksStoreBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iBooksStoreBlockErotica", m.GetIBooksStoreBlockErotica()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockActivityContinuation", m.GetICloudBlockActivityContinuation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockBackup", m.GetICloudBlockBackup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockDocumentSync", m.GetICloudBlockDocumentSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockManagedAppsSync", m.GetICloudBlockManagedAppsSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockPhotoLibrary", m.GetICloudBlockPhotoLibrary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockPhotoStreamSync", m.GetICloudBlockPhotoStreamSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockSharedPhotoStream", m.GetICloudBlockSharedPhotoStream()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudPrivateRelayBlocked", m.GetICloudPrivateRelayBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudRequireEncryptedBackup", m.GetICloudRequireEncryptedBackup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlocked", m.GetITunesBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlockExplicitContent", m.GetITunesBlockExplicitContent()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlockMusicService", m.GetITunesBlockMusicService()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlockRadio", m.GetITunesBlockRadio()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockAutoCorrect", m.GetKeyboardBlockAutoCorrect()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockDictation", m.GetKeyboardBlockDictation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockPredictive", m.GetKeyboardBlockPredictive()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockShortcuts", m.GetKeyboardBlockShortcuts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockSpellCheck", m.GetKeyboardBlockSpellCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keychainBlockCloudSync", m.GetKeychainBlockCloudSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowAssistiveSpeak", m.GetKioskModeAllowAssistiveSpeak()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowAssistiveTouchSettings", m.GetKioskModeAllowAssistiveTouchSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowAutoLock", m.GetKioskModeAllowAutoLock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowColorInversionSettings", m.GetKioskModeAllowColorInversionSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowRingerSwitch", m.GetKioskModeAllowRingerSwitch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowScreenRotation", m.GetKioskModeAllowScreenRotation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowSleepButton", m.GetKioskModeAllowSleepButton()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowTouchscreen", m.GetKioskModeAllowTouchscreen()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowVoiceControlModification", m.GetKioskModeAllowVoiceControlModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowVoiceOverSettings", m.GetKioskModeAllowVoiceOverSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowVolumeButtons", m.GetKioskModeAllowVolumeButtons()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeAllowZoomSettings", m.GetKioskModeAllowZoomSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeAppStoreUrl", m.GetKioskModeAppStoreUrl()) + if err != nil { + return err + } + } + if m.GetKioskModeAppType() != nil { + cast := (*m.GetKioskModeAppType()).String() + err = writer.WriteStringValue("kioskModeAppType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockAutoLock", m.GetKioskModeBlockAutoLock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockRingerSwitch", m.GetKioskModeBlockRingerSwitch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockScreenRotation", m.GetKioskModeBlockScreenRotation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockSleepButton", m.GetKioskModeBlockSleepButton()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockTouchscreen", m.GetKioskModeBlockTouchscreen()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeBlockVolumeButtons", m.GetKioskModeBlockVolumeButtons()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeBuiltInAppId", m.GetKioskModeBuiltInAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeEnableVoiceControl", m.GetKioskModeEnableVoiceControl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskModeManagedAppId", m.GetKioskModeManagedAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeRequireAssistiveTouch", m.GetKioskModeRequireAssistiveTouch()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeRequireColorInversion", m.GetKioskModeRequireColorInversion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeRequireMonoAudio", m.GetKioskModeRequireMonoAudio()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeRequireVoiceOver", m.GetKioskModeRequireVoiceOver()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kioskModeRequireZoom", m.GetKioskModeRequireZoom()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lockScreenBlockControlCenter", m.GetLockScreenBlockControlCenter()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lockScreenBlockNotificationView", m.GetLockScreenBlockNotificationView()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lockScreenBlockPassbook", m.GetLockScreenBlockPassbook()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lockScreenBlockTodayView", m.GetLockScreenBlockTodayView()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedPasteboardRequired", m.GetManagedPasteboardRequired()) + if err != nil { + return err + } + } + if m.GetMediaContentRatingApps() != nil { + cast := (*m.GetMediaContentRatingApps()).String() + err = writer.WriteStringValue("mediaContentRatingApps", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingAustralia", m.GetMediaContentRatingAustralia()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingCanada", m.GetMediaContentRatingCanada()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingFrance", m.GetMediaContentRatingFrance()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingGermany", m.GetMediaContentRatingGermany()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingIreland", m.GetMediaContentRatingIreland()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingJapan", m.GetMediaContentRatingJapan()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingNewZealand", m.GetMediaContentRatingNewZealand()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingUnitedKingdom", m.GetMediaContentRatingUnitedKingdom()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mediaContentRatingUnitedStates", m.GetMediaContentRatingUnitedStates()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("messagesBlocked", m.GetMessagesBlocked()) + if err != nil { + return err + } + } + if m.GetNetworkUsageRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNetworkUsageRules())) + for i, v := range m.GetNetworkUsageRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("networkUsageRules", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("nfcBlocked", m.GetNfcBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("notificationsBlockSettingsModification", m.GetNotificationsBlockSettingsModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onDeviceOnlyDictationForced", m.GetOnDeviceOnlyDictationForced()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onDeviceOnlyTranslationForced", m.GetOnDeviceOnlyTranslationForced()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeBlockFingerprintModification", m.GetPasscodeBlockFingerprintModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeBlockFingerprintUnlock", m.GetPasscodeBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeBlockModification", m.GetPasscodeBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeBlockSimple", m.GetPasscodeBlockSimple()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeExpirationDays", m.GetPasscodeExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinimumCharacterSetCount", m.GetPasscodeMinimumCharacterSetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinimumLength", m.GetPasscodeMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinutesOfInactivityBeforeLock", m.GetPasscodeMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeMinutesOfInactivityBeforeScreenTimeout", m.GetPasscodeMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodePreviousPasscodeBlockCount", m.GetPasscodePreviousPasscodeBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passcodeRequired", m.GetPasscodeRequired()) + if err != nil { + return err + } + } + if m.GetPasscodeRequiredType() != nil { + cast := (*m.GetPasscodeRequiredType()).String() + err = writer.WriteStringValue("passcodeRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passcodeSignInFailureCountBeforeWipe", m.GetPasscodeSignInFailureCountBeforeWipe()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockAirDropSharing", m.GetPasswordBlockAirDropSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockAutoFill", m.GetPasswordBlockAutoFill()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockProximityRequests", m.GetPasswordBlockProximityRequests()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pkiBlockOTAUpdates", m.GetPkiBlockOTAUpdates()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("podcastsBlocked", m.GetPodcastsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("privacyForceLimitAdTracking", m.GetPrivacyForceLimitAdTracking()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("proximityBlockSetupToNewDevice", m.GetProximityBlockSetupToNewDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariBlockAutofill", m.GetSafariBlockAutofill()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariBlocked", m.GetSafariBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariBlockJavaScript", m.GetSafariBlockJavaScript()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariBlockPopups", m.GetSafariBlockPopups()) + if err != nil { + return err + } + } + if m.GetSafariCookieSettings() != nil { + cast := (*m.GetSafariCookieSettings()).String() + err = writer.WriteStringValue("safariCookieSettings", &cast) + if err != nil { + return err + } + } + if m.GetSafariManagedDomains() != nil { + err = writer.WriteCollectionOfStringValues("safariManagedDomains", m.GetSafariManagedDomains()) + if err != nil { + return err + } + } + if m.GetSafariPasswordAutoFillDomains() != nil { + err = writer.WriteCollectionOfStringValues("safariPasswordAutoFillDomains", m.GetSafariPasswordAutoFillDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariRequireFraudWarning", m.GetSafariRequireFraudWarning()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("sharedDeviceBlockTemporarySessions", m.GetSharedDeviceBlockTemporarySessions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriBlocked", m.GetSiriBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriBlockedWhenLocked", m.GetSiriBlockedWhenLocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriBlockUserGeneratedContent", m.GetSiriBlockUserGeneratedContent()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("siriRequireProfanityFilter", m.GetSiriRequireProfanityFilter()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("softwareUpdatesEnforcedDelayInDays", m.GetSoftwareUpdatesEnforcedDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("softwareUpdatesForceDelayed", m.GetSoftwareUpdatesForceDelayed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("spotlightBlockInternetResults", m.GetSpotlightBlockInternetResults()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("unpairedExternalBootToRecoveryAllowed", m.GetUnpairedExternalBootToRecoveryAllowed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("usbRestrictedModeBlocked", m.GetUsbRestrictedModeBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("voiceDialingBlocked", m.GetVoiceDialingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("vpnBlockCreation", m.GetVpnBlockCreation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wallpaperBlockModification", m.GetWallpaperBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wiFiConnectOnlyToConfiguredNetworks", m.GetWiFiConnectOnlyToConfiguredNetworks()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wiFiConnectToAllowedNetworksOnlyForced", m.GetWiFiConnectToAllowedNetworksOnlyForced()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wifiPowerOnForced", m.GetWifiPowerOnForced()) + if err != nil { + return err + } + } + return nil +} +// SetAccountBlockModification sets the accountBlockModification property value. Indicates whether or not to allow account modification when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetAccountBlockModification(value *bool)() { + m.accountBlockModification = value +} +// SetActivationLockAllowWhenSupervised sets the activationLockAllowWhenSupervised property value. Indicates whether or not to allow activation lock when the device is in the supervised mode. +func (m *IosGeneralDeviceConfiguration) SetActivationLockAllowWhenSupervised(value *bool)() { + m.activationLockAllowWhenSupervised = value +} +// SetAirDropBlocked sets the airDropBlocked property value. Indicates whether or not to allow AirDrop when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetAirDropBlocked(value *bool)() { + m.airDropBlocked = value +} +// SetAirDropForceUnmanagedDropTarget sets the airDropForceUnmanagedDropTarget property value. Indicates whether or not to cause AirDrop to be considered an unmanaged drop target (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAirDropForceUnmanagedDropTarget(value *bool)() { + m.airDropForceUnmanagedDropTarget = value +} +// SetAirPlayForcePairingPasswordForOutgoingRequests sets the airPlayForcePairingPasswordForOutgoingRequests property value. Indicates whether or not to enforce all devices receiving AirPlay requests from this device to use a pairing password. +func (m *IosGeneralDeviceConfiguration) SetAirPlayForcePairingPasswordForOutgoingRequests(value *bool)() { + m.airPlayForcePairingPasswordForOutgoingRequests = value +} +// SetAirPrintBlockCredentialsStorage sets the airPrintBlockCredentialsStorage property value. Indicates whether or not keychain storage of username and password for Airprint is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAirPrintBlockCredentialsStorage(value *bool)() { + m.airPrintBlockCredentialsStorage = value +} +// SetAirPrintBlocked sets the airPrintBlocked property value. Indicates whether or not AirPrint is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAirPrintBlocked(value *bool)() { + m.airPrintBlocked = value +} +// SetAirPrintBlockiBeaconDiscovery sets the airPrintBlockiBeaconDiscovery property value. Indicates whether or not iBeacon discovery of AirPrint printers is blocked. This prevents spurious AirPrint Bluetooth beacons from phishing for network traffic (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAirPrintBlockiBeaconDiscovery(value *bool)() { + m.airPrintBlockiBeaconDiscovery = value +} +// SetAirPrintForceTrustedTLS sets the airPrintForceTrustedTLS property value. Indicates if trusted certificates are required for TLS printing communication (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAirPrintForceTrustedTLS(value *bool)() { + m.airPrintForceTrustedTLS = value +} +// SetAppClipsBlocked sets the appClipsBlocked property value. Prevents a user from adding any App Clips and removes any existing App Clips on the device. +func (m *IosGeneralDeviceConfiguration) SetAppClipsBlocked(value *bool)() { + m.appClipsBlocked = value +} +// SetAppleNewsBlocked sets the appleNewsBlocked property value. Indicates whether or not to block the user from using News when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAppleNewsBlocked(value *bool)() { + m.appleNewsBlocked = value +} +// SetApplePersonalizedAdsBlocked sets the applePersonalizedAdsBlocked property value. Limits Apple personalized advertising when true. Available in iOS 14 and later. +func (m *IosGeneralDeviceConfiguration) SetApplePersonalizedAdsBlocked(value *bool)() { + m.applePersonalizedAdsBlocked = value +} +// SetAppleWatchBlockPairing sets the appleWatchBlockPairing property value. Indicates whether or not to allow Apple Watch pairing when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAppleWatchBlockPairing(value *bool)() { + m.appleWatchBlockPairing = value +} +// SetAppleWatchForceWristDetection sets the appleWatchForceWristDetection property value. Indicates whether or not to force a paired Apple Watch to use Wrist Detection (iOS 8.2 and later). +func (m *IosGeneralDeviceConfiguration) SetAppleWatchForceWristDetection(value *bool)() { + m.appleWatchForceWristDetection = value +} +// SetAppRemovalBlocked sets the appRemovalBlocked property value. Indicates if the removal of apps is allowed. +func (m *IosGeneralDeviceConfiguration) SetAppRemovalBlocked(value *bool)() { + m.appRemovalBlocked = value +} +// SetAppsSingleAppModeList sets the appsSingleAppModeList property value. Gets or sets the list of iOS apps allowed to autonomously enter Single App Mode. Supervised only. iOS 7.0 and later. This collection can contain a maximum of 500 elements. +func (m *IosGeneralDeviceConfiguration) SetAppsSingleAppModeList(value []AppListItemable)() { + m.appsSingleAppModeList = value +} +// SetAppStoreBlockAutomaticDownloads sets the appStoreBlockAutomaticDownloads property value. Indicates whether or not to block the automatic downloading of apps purchased on other devices when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAppStoreBlockAutomaticDownloads(value *bool)() { + m.appStoreBlockAutomaticDownloads = value +} +// SetAppStoreBlocked sets the appStoreBlocked property value. Indicates whether or not to block the user from using the App Store. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetAppStoreBlocked(value *bool)() { + m.appStoreBlocked = value +} +// SetAppStoreBlockInAppPurchases sets the appStoreBlockInAppPurchases property value. Indicates whether or not to block the user from making in app purchases. +func (m *IosGeneralDeviceConfiguration) SetAppStoreBlockInAppPurchases(value *bool)() { + m.appStoreBlockInAppPurchases = value +} +// SetAppStoreBlockUIAppInstallation sets the appStoreBlockUIAppInstallation property value. Indicates whether or not to block the App Store app, not restricting installation through Host apps. Applies to supervised mode only (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetAppStoreBlockUIAppInstallation(value *bool)() { + m.appStoreBlockUIAppInstallation = value +} +// SetAppStoreRequirePassword sets the appStoreRequirePassword property value. Indicates whether or not to require a password when using the app store. +func (m *IosGeneralDeviceConfiguration) SetAppStoreRequirePassword(value *bool)() { + m.appStoreRequirePassword = value +} +// SetAppsVisibilityList sets the appsVisibilityList property value. List of apps in the visibility list (either visible/launchable apps list or hidden/unlaunchable apps list, controlled by AppsVisibilityListType) (iOS 9.3 and later). This collection can contain a maximum of 10000 elements. +func (m *IosGeneralDeviceConfiguration) SetAppsVisibilityList(value []AppListItemable)() { + m.appsVisibilityList = value +} +// SetAppsVisibilityListType sets the appsVisibilityListType property value. Possible values of the compliance app list. +func (m *IosGeneralDeviceConfiguration) SetAppsVisibilityListType(value *AppListType)() { + m.appsVisibilityListType = value +} +// SetAutoFillForceAuthentication sets the autoFillForceAuthentication property value. Indicates whether or not to force user authentication before autofilling passwords and credit card information in Safari and other apps on supervised devices. +func (m *IosGeneralDeviceConfiguration) SetAutoFillForceAuthentication(value *bool)() { + m.autoFillForceAuthentication = value +} +// SetAutoUnlockBlocked sets the autoUnlockBlocked property value. Blocks users from unlocking their device with Apple Watch. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) SetAutoUnlockBlocked(value *bool)() { + m.autoUnlockBlocked = value +} +// SetBlockSystemAppRemoval sets the blockSystemAppRemoval property value. Indicates whether or not the removal of system apps from the device is blocked on a supervised device (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetBlockSystemAppRemoval(value *bool)() { + m.blockSystemAppRemoval = value +} +// SetBluetoothBlockModification sets the bluetoothBlockModification property value. Indicates whether or not to allow modification of Bluetooth settings when the device is in supervised mode (iOS 10.0 and later). +func (m *IosGeneralDeviceConfiguration) SetBluetoothBlockModification(value *bool)() { + m.bluetoothBlockModification = value +} +// SetCameraBlocked sets the cameraBlocked property value. Indicates whether or not to block the user from accessing the camera of the device. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetCameraBlocked(value *bool)() { + m.cameraBlocked = value +} +// SetCellularBlockDataRoaming sets the cellularBlockDataRoaming property value. Indicates whether or not to block data roaming. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockDataRoaming(value *bool)() { + m.cellularBlockDataRoaming = value +} +// SetCellularBlockGlobalBackgroundFetchWhileRoaming sets the cellularBlockGlobalBackgroundFetchWhileRoaming property value. Indicates whether or not to block global background fetch while roaming. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockGlobalBackgroundFetchWhileRoaming(value *bool)() { + m.cellularBlockGlobalBackgroundFetchWhileRoaming = value +} +// SetCellularBlockPerAppDataModification sets the cellularBlockPerAppDataModification property value. Indicates whether or not to allow changes to cellular app data usage settings when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockPerAppDataModification(value *bool)() { + m.cellularBlockPerAppDataModification = value +} +// SetCellularBlockPersonalHotspot sets the cellularBlockPersonalHotspot property value. Indicates whether or not to block Personal Hotspot. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockPersonalHotspot(value *bool)() { + m.cellularBlockPersonalHotspot = value +} +// SetCellularBlockPersonalHotspotModification sets the cellularBlockPersonalHotspotModification property value. Indicates whether or not to block the user from modifying the personal hotspot setting (iOS 12.2 or later). +func (m *IosGeneralDeviceConfiguration) SetCellularBlockPersonalHotspotModification(value *bool)() { + m.cellularBlockPersonalHotspotModification = value +} +// SetCellularBlockPlanModification sets the cellularBlockPlanModification property value. Indicates whether or not to allow users to change the settings of the cellular plan on a supervised device. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockPlanModification(value *bool)() { + m.cellularBlockPlanModification = value +} +// SetCellularBlockVoiceRoaming sets the cellularBlockVoiceRoaming property value. Indicates whether or not to block voice roaming. +func (m *IosGeneralDeviceConfiguration) SetCellularBlockVoiceRoaming(value *bool)() { + m.cellularBlockVoiceRoaming = value +} +// SetCertificatesBlockUntrustedTlsCertificates sets the certificatesBlockUntrustedTlsCertificates property value. Indicates whether or not to block untrusted TLS certificates. +func (m *IosGeneralDeviceConfiguration) SetCertificatesBlockUntrustedTlsCertificates(value *bool)() { + m.certificatesBlockUntrustedTlsCertificates = value +} +// SetClassroomAppBlockRemoteScreenObservation sets the classroomAppBlockRemoteScreenObservation property value. Indicates whether or not to allow remote screen observation by Classroom app when the device is in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) SetClassroomAppBlockRemoteScreenObservation(value *bool)() { + m.classroomAppBlockRemoteScreenObservation = value +} +// SetClassroomAppForceUnpromptedScreenObservation sets the classroomAppForceUnpromptedScreenObservation property value. Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetClassroomAppForceUnpromptedScreenObservation(value *bool)() { + m.classroomAppForceUnpromptedScreenObservation = value +} +// SetClassroomForceAutomaticallyJoinClasses sets the classroomForceAutomaticallyJoinClasses property value. Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student, when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetClassroomForceAutomaticallyJoinClasses(value *bool)() { + m.classroomForceAutomaticallyJoinClasses = value +} +// SetClassroomForceRequestPermissionToLeaveClasses sets the classroomForceRequestPermissionToLeaveClasses property value. Indicates whether a student enrolled in an unmanaged course via Classroom will request permission from the teacher when attempting to leave the course (iOS 11.3 and later). +func (m *IosGeneralDeviceConfiguration) SetClassroomForceRequestPermissionToLeaveClasses(value *bool)() { + m.classroomForceRequestPermissionToLeaveClasses = value +} +// SetClassroomForceUnpromptedAppAndDeviceLock sets the classroomForceUnpromptedAppAndDeviceLock property value. Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Supervised only. +func (m *IosGeneralDeviceConfiguration) SetClassroomForceUnpromptedAppAndDeviceLock(value *bool)() { + m.classroomForceUnpromptedAppAndDeviceLock = value +} +// SetCompliantAppListType sets the compliantAppListType property value. Possible values of the compliance app list. +func (m *IosGeneralDeviceConfiguration) SetCompliantAppListType(value *AppListType)() { + m.compliantAppListType = value +} +// SetCompliantAppsList sets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *IosGeneralDeviceConfiguration) SetCompliantAppsList(value []AppListItemable)() { + m.compliantAppsList = value +} +// SetConfigurationProfileBlockChanges sets the configurationProfileBlockChanges property value. Indicates whether or not to block the user from installing configuration profiles and certificates interactively when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetConfigurationProfileBlockChanges(value *bool)() { + m.configurationProfileBlockChanges = value +} +// SetContactsAllowManagedToUnmanagedWrite sets the contactsAllowManagedToUnmanagedWrite property value. Indicates whether or not managed apps can write contacts to unmanaged contacts accounts (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) SetContactsAllowManagedToUnmanagedWrite(value *bool)() { + m.contactsAllowManagedToUnmanagedWrite = value +} +// SetContactsAllowUnmanagedToManagedRead sets the contactsAllowUnmanagedToManagedRead property value. Indicates whether or not unmanaged apps can read from managed contacts accounts (iOS 12.0 or later). +func (m *IosGeneralDeviceConfiguration) SetContactsAllowUnmanagedToManagedRead(value *bool)() { + m.contactsAllowUnmanagedToManagedRead = value +} +// SetContinuousPathKeyboardBlocked sets the continuousPathKeyboardBlocked property value. Indicates whether or not to block the continuous path keyboard when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) SetContinuousPathKeyboardBlocked(value *bool)() { + m.continuousPathKeyboardBlocked = value +} +// SetDateAndTimeForceSetAutomatically sets the dateAndTimeForceSetAutomatically property value. Indicates whether or not the Date and Time 'Set Automatically' feature is enabled and cannot be turned off by the user (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) SetDateAndTimeForceSetAutomatically(value *bool)() { + m.dateAndTimeForceSetAutomatically = value +} +// SetDefinitionLookupBlocked sets the definitionLookupBlocked property value. Indicates whether or not to block definition lookup when the device is in supervised mode (iOS 8.1.3 and later ). +func (m *IosGeneralDeviceConfiguration) SetDefinitionLookupBlocked(value *bool)() { + m.definitionLookupBlocked = value +} +// SetDeviceBlockEnableRestrictions sets the deviceBlockEnableRestrictions property value. Indicates whether or not to allow the user to enables restrictions in the device settings when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetDeviceBlockEnableRestrictions(value *bool)() { + m.deviceBlockEnableRestrictions = value +} +// SetDeviceBlockEraseContentAndSettings sets the deviceBlockEraseContentAndSettings property value. Indicates whether or not to allow the use of the 'Erase all content and settings' option on the device when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetDeviceBlockEraseContentAndSettings(value *bool)() { + m.deviceBlockEraseContentAndSettings = value +} +// SetDeviceBlockNameModification sets the deviceBlockNameModification property value. Indicates whether or not to allow device name modification when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetDeviceBlockNameModification(value *bool)() { + m.deviceBlockNameModification = value +} +// SetDiagnosticDataBlockSubmission sets the diagnosticDataBlockSubmission property value. Indicates whether or not to block diagnostic data submission. +func (m *IosGeneralDeviceConfiguration) SetDiagnosticDataBlockSubmission(value *bool)() { + m.diagnosticDataBlockSubmission = value +} +// SetDiagnosticDataBlockSubmissionModification sets the diagnosticDataBlockSubmissionModification property value. Indicates whether or not to allow diagnostics submission settings modification when the device is in supervised mode (iOS 9.3.2 and later). +func (m *IosGeneralDeviceConfiguration) SetDiagnosticDataBlockSubmissionModification(value *bool)() { + m.diagnosticDataBlockSubmissionModification = value +} +// SetDocumentsBlockManagedDocumentsInUnmanagedApps sets the documentsBlockManagedDocumentsInUnmanagedApps property value. Indicates whether or not to block the user from viewing managed documents in unmanaged apps. +func (m *IosGeneralDeviceConfiguration) SetDocumentsBlockManagedDocumentsInUnmanagedApps(value *bool)() { + m.documentsBlockManagedDocumentsInUnmanagedApps = value +} +// SetDocumentsBlockUnmanagedDocumentsInManagedApps sets the documentsBlockUnmanagedDocumentsInManagedApps property value. Indicates whether or not to block the user from viewing unmanaged documents in managed apps. +func (m *IosGeneralDeviceConfiguration) SetDocumentsBlockUnmanagedDocumentsInManagedApps(value *bool)() { + m.documentsBlockUnmanagedDocumentsInManagedApps = value +} +// SetEmailInDomainSuffixes sets the emailInDomainSuffixes property value. An email address lacking a suffix that matches any of these strings will be considered out-of-domain. +func (m *IosGeneralDeviceConfiguration) SetEmailInDomainSuffixes(value []string)() { + m.emailInDomainSuffixes = value +} +// SetEnterpriseAppBlockTrust sets the enterpriseAppBlockTrust property value. Indicates whether or not to block the user from trusting an enterprise app. +func (m *IosGeneralDeviceConfiguration) SetEnterpriseAppBlockTrust(value *bool)() { + m.enterpriseAppBlockTrust = value +} +// SetEnterpriseAppBlockTrustModification sets the enterpriseAppBlockTrustModification property value. [Deprecated] Configuring this setting and setting the value to 'true' has no effect on the device. +func (m *IosGeneralDeviceConfiguration) SetEnterpriseAppBlockTrustModification(value *bool)() { + m.enterpriseAppBlockTrustModification = value +} +// SetEnterpriseBookBlockBackup sets the enterpriseBookBlockBackup property value. Indicates whether or not Enterprise book back up is blocked. +func (m *IosGeneralDeviceConfiguration) SetEnterpriseBookBlockBackup(value *bool)() { + m.enterpriseBookBlockBackup = value +} +// SetEnterpriseBookBlockMetadataSync sets the enterpriseBookBlockMetadataSync property value. Indicates whether or not Enterprise book notes and highlights sync is blocked. +func (m *IosGeneralDeviceConfiguration) SetEnterpriseBookBlockMetadataSync(value *bool)() { + m.enterpriseBookBlockMetadataSync = value +} +// SetEsimBlockModification sets the esimBlockModification property value. Indicates whether or not to allow the addition or removal of cellular plans on the eSIM of a supervised device. +func (m *IosGeneralDeviceConfiguration) SetEsimBlockModification(value *bool)() { + m.esimBlockModification = value +} +// SetFaceTimeBlocked sets the faceTimeBlocked property value. Indicates whether or not to block the user from using FaceTime. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetFaceTimeBlocked(value *bool)() { + m.faceTimeBlocked = value +} +// SetFilesNetworkDriveAccessBlocked sets the filesNetworkDriveAccessBlocked property value. Indicates if devices can access files or other resources on a network server using the Server Message Block (SMB) protocol. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) SetFilesNetworkDriveAccessBlocked(value *bool)() { + m.filesNetworkDriveAccessBlocked = value +} +// SetFilesUsbDriveAccessBlocked sets the filesUsbDriveAccessBlocked property value. Indicates if sevices with access can connect to and open files on a USB drive. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) SetFilesUsbDriveAccessBlocked(value *bool)() { + m.filesUsbDriveAccessBlocked = value +} +// SetFindMyDeviceInFindMyAppBlocked sets the findMyDeviceInFindMyAppBlocked property value. Indicates whether or not to block Find My Device when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) SetFindMyDeviceInFindMyAppBlocked(value *bool)() { + m.findMyDeviceInFindMyAppBlocked = value +} +// SetFindMyFriendsBlocked sets the findMyFriendsBlocked property value. Indicates whether or not to block changes to Find My Friends when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetFindMyFriendsBlocked(value *bool)() { + m.findMyFriendsBlocked = value +} +// SetFindMyFriendsInFindMyAppBlocked sets the findMyFriendsInFindMyAppBlocked property value. Indicates whether or not to block Find My Friends when the device is supervised (iOS 13 or later). +func (m *IosGeneralDeviceConfiguration) SetFindMyFriendsInFindMyAppBlocked(value *bool)() { + m.findMyFriendsInFindMyAppBlocked = value +} +// SetGameCenterBlocked sets the gameCenterBlocked property value. Indicates whether or not to block the user from using Game Center when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetGameCenterBlocked(value *bool)() { + m.gameCenterBlocked = value +} +// SetGamingBlockGameCenterFriends sets the gamingBlockGameCenterFriends property value. Indicates whether or not to block the user from having friends in Game Center. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetGamingBlockGameCenterFriends(value *bool)() { + m.gamingBlockGameCenterFriends = value +} +// SetGamingBlockMultiplayer sets the gamingBlockMultiplayer property value. Indicates whether or not to block the user from using multiplayer gaming. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetGamingBlockMultiplayer(value *bool)() { + m.gamingBlockMultiplayer = value +} +// SetHostPairingBlocked sets the hostPairingBlocked property value. indicates whether or not to allow host pairing to control the devices an iOS device can pair with when the iOS device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetHostPairingBlocked(value *bool)() { + m.hostPairingBlocked = value +} +// SetIBooksStoreBlocked sets the iBooksStoreBlocked property value. Indicates whether or not to block the user from using the iBooks Store when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetIBooksStoreBlocked(value *bool)() { + m.iBooksStoreBlocked = value +} +// SetIBooksStoreBlockErotica sets the iBooksStoreBlockErotica property value. Indicates whether or not to block the user from downloading media from the iBookstore that has been tagged as erotica. +func (m *IosGeneralDeviceConfiguration) SetIBooksStoreBlockErotica(value *bool)() { + m.iBooksStoreBlockErotica = value +} +// SetICloudBlockActivityContinuation sets the iCloudBlockActivityContinuation property value. Indicates whether or not to block the user from continuing work they started on iOS device to another iOS or macOS device. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockActivityContinuation(value *bool)() { + m.iCloudBlockActivityContinuation = value +} +// SetICloudBlockBackup sets the iCloudBlockBackup property value. Indicates whether or not to block iCloud backup. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockBackup(value *bool)() { + m.iCloudBlockBackup = value +} +// SetICloudBlockDocumentSync sets the iCloudBlockDocumentSync property value. Indicates whether or not to block iCloud document sync. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockDocumentSync(value *bool)() { + m.iCloudBlockDocumentSync = value +} +// SetICloudBlockManagedAppsSync sets the iCloudBlockManagedAppsSync property value. Indicates whether or not to block Managed Apps Cloud Sync. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockManagedAppsSync(value *bool)() { + m.iCloudBlockManagedAppsSync = value +} +// SetICloudBlockPhotoLibrary sets the iCloudBlockPhotoLibrary property value. Indicates whether or not to block iCloud Photo Library. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockPhotoLibrary(value *bool)() { + m.iCloudBlockPhotoLibrary = value +} +// SetICloudBlockPhotoStreamSync sets the iCloudBlockPhotoStreamSync property value. Indicates whether or not to block iCloud Photo Stream Sync. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockPhotoStreamSync(value *bool)() { + m.iCloudBlockPhotoStreamSync = value +} +// SetICloudBlockSharedPhotoStream sets the iCloudBlockSharedPhotoStream property value. Indicates whether or not to block Shared Photo Stream. +func (m *IosGeneralDeviceConfiguration) SetICloudBlockSharedPhotoStream(value *bool)() { + m.iCloudBlockSharedPhotoStream = value +} +// SetICloudPrivateRelayBlocked sets the iCloudPrivateRelayBlocked property value. iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running iOS 15 and later. +func (m *IosGeneralDeviceConfiguration) SetICloudPrivateRelayBlocked(value *bool)() { + m.iCloudPrivateRelayBlocked = value +} +// SetICloudRequireEncryptedBackup sets the iCloudRequireEncryptedBackup property value. Indicates whether or not to require backups to iCloud be encrypted. +func (m *IosGeneralDeviceConfiguration) SetICloudRequireEncryptedBackup(value *bool)() { + m.iCloudRequireEncryptedBackup = value +} +// SetITunesBlocked sets the iTunesBlocked property value. Indicates whether or not to block the iTunes app. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetITunesBlocked(value *bool)() { + m.iTunesBlocked = value +} +// SetITunesBlockExplicitContent sets the iTunesBlockExplicitContent property value. Indicates whether or not to block the user from accessing explicit content in iTunes and the App Store. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetITunesBlockExplicitContent(value *bool)() { + m.iTunesBlockExplicitContent = value +} +// SetITunesBlockMusicService sets the iTunesBlockMusicService property value. Indicates whether or not to block Music service and revert Music app to classic mode when the device is in supervised mode (iOS 9.3 and later and macOS 10.12 and later). +func (m *IosGeneralDeviceConfiguration) SetITunesBlockMusicService(value *bool)() { + m.iTunesBlockMusicService = value +} +// SetITunesBlockRadio sets the iTunesBlockRadio property value. Indicates whether or not to block the user from using iTunes Radio when the device is in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) SetITunesBlockRadio(value *bool)() { + m.iTunesBlockRadio = value +} +// SetKeyboardBlockAutoCorrect sets the keyboardBlockAutoCorrect property value. Indicates whether or not to block keyboard auto-correction when the device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) SetKeyboardBlockAutoCorrect(value *bool)() { + m.keyboardBlockAutoCorrect = value +} +// SetKeyboardBlockDictation sets the keyboardBlockDictation property value. Indicates whether or not to block the user from using dictation input when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetKeyboardBlockDictation(value *bool)() { + m.keyboardBlockDictation = value +} +// SetKeyboardBlockPredictive sets the keyboardBlockPredictive property value. Indicates whether or not to block predictive keyboards when device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) SetKeyboardBlockPredictive(value *bool)() { + m.keyboardBlockPredictive = value +} +// SetKeyboardBlockShortcuts sets the keyboardBlockShortcuts property value. Indicates whether or not to block keyboard shortcuts when the device is in supervised mode (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetKeyboardBlockShortcuts(value *bool)() { + m.keyboardBlockShortcuts = value +} +// SetKeyboardBlockSpellCheck sets the keyboardBlockSpellCheck property value. Indicates whether or not to block keyboard spell-checking when the device is in supervised mode (iOS 8.1.3 and later). +func (m *IosGeneralDeviceConfiguration) SetKeyboardBlockSpellCheck(value *bool)() { + m.keyboardBlockSpellCheck = value +} +// SetKeychainBlockCloudSync sets the keychainBlockCloudSync property value. Indicates whether or not iCloud keychain synchronization is blocked. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetKeychainBlockCloudSync(value *bool)() { + m.keychainBlockCloudSync = value +} +// SetKioskModeAllowAssistiveSpeak sets the kioskModeAllowAssistiveSpeak property value. Indicates whether or not to allow assistive speak while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowAssistiveSpeak(value *bool)() { + m.kioskModeAllowAssistiveSpeak = value +} +// SetKioskModeAllowAssistiveTouchSettings sets the kioskModeAllowAssistiveTouchSettings property value. Indicates whether or not to allow access to the Assistive Touch Settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowAssistiveTouchSettings(value *bool)() { + m.kioskModeAllowAssistiveTouchSettings = value +} +// SetKioskModeAllowAutoLock sets the kioskModeAllowAutoLock property value. Indicates whether or not to allow device auto lock while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockAutoLock instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowAutoLock(value *bool)() { + m.kioskModeAllowAutoLock = value +} +// SetKioskModeAllowColorInversionSettings sets the kioskModeAllowColorInversionSettings property value. Indicates whether or not to allow access to the Color Inversion Settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowColorInversionSettings(value *bool)() { + m.kioskModeAllowColorInversionSettings = value +} +// SetKioskModeAllowRingerSwitch sets the kioskModeAllowRingerSwitch property value. Indicates whether or not to allow use of the ringer switch while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockRingerSwitch instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowRingerSwitch(value *bool)() { + m.kioskModeAllowRingerSwitch = value +} +// SetKioskModeAllowScreenRotation sets the kioskModeAllowScreenRotation property value. Indicates whether or not to allow screen rotation while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockScreenRotation instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowScreenRotation(value *bool)() { + m.kioskModeAllowScreenRotation = value +} +// SetKioskModeAllowSleepButton sets the kioskModeAllowSleepButton property value. Indicates whether or not to allow use of the sleep button while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockSleepButton instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowSleepButton(value *bool)() { + m.kioskModeAllowSleepButton = value +} +// SetKioskModeAllowTouchscreen sets the kioskModeAllowTouchscreen property value. Indicates whether or not to allow use of the touchscreen while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockTouchscreen instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowTouchscreen(value *bool)() { + m.kioskModeAllowTouchscreen = value +} +// SetKioskModeAllowVoiceControlModification sets the kioskModeAllowVoiceControlModification property value. Indicates whether or not to allow the user to toggle voice control in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowVoiceControlModification(value *bool)() { + m.kioskModeAllowVoiceControlModification = value +} +// SetKioskModeAllowVoiceOverSettings sets the kioskModeAllowVoiceOverSettings property value. Indicates whether or not to allow access to the voice over settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowVoiceOverSettings(value *bool)() { + m.kioskModeAllowVoiceOverSettings = value +} +// SetKioskModeAllowVolumeButtons sets the kioskModeAllowVolumeButtons property value. Indicates whether or not to allow use of the volume buttons while in kiosk mode. This property's functionality is redundant with the OS default and is deprecated. Use KioskModeBlockVolumeButtons instead. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowVolumeButtons(value *bool)() { + m.kioskModeAllowVolumeButtons = value +} +// SetKioskModeAllowZoomSettings sets the kioskModeAllowZoomSettings property value. Indicates whether or not to allow access to the zoom settings while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAllowZoomSettings(value *bool)() { + m.kioskModeAllowZoomSettings = value +} +// SetKioskModeAppStoreUrl sets the kioskModeAppStoreUrl property value. URL in the app store to the app to use for kiosk mode. Use if KioskModeManagedAppId is not known. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAppStoreUrl(value *string)() { + m.kioskModeAppStoreUrl = value +} +// SetKioskModeAppType sets the kioskModeAppType property value. App source options for iOS kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeAppType(value *IosKioskModeAppType)() { + m.kioskModeAppType = value +} +// SetKioskModeBlockAutoLock sets the kioskModeBlockAutoLock property value. Indicates whether or not to block device auto lock while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockAutoLock(value *bool)() { + m.kioskModeBlockAutoLock = value +} +// SetKioskModeBlockRingerSwitch sets the kioskModeBlockRingerSwitch property value. Indicates whether or not to block use of the ringer switch while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockRingerSwitch(value *bool)() { + m.kioskModeBlockRingerSwitch = value +} +// SetKioskModeBlockScreenRotation sets the kioskModeBlockScreenRotation property value. Indicates whether or not to block screen rotation while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockScreenRotation(value *bool)() { + m.kioskModeBlockScreenRotation = value +} +// SetKioskModeBlockSleepButton sets the kioskModeBlockSleepButton property value. Indicates whether or not to block use of the sleep button while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockSleepButton(value *bool)() { + m.kioskModeBlockSleepButton = value +} +// SetKioskModeBlockTouchscreen sets the kioskModeBlockTouchscreen property value. Indicates whether or not to block use of the touchscreen while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockTouchscreen(value *bool)() { + m.kioskModeBlockTouchscreen = value +} +// SetKioskModeBlockVolumeButtons sets the kioskModeBlockVolumeButtons property value. Indicates whether or not to block the volume buttons while in Kiosk Mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBlockVolumeButtons(value *bool)() { + m.kioskModeBlockVolumeButtons = value +} +// SetKioskModeBuiltInAppId sets the kioskModeBuiltInAppId property value. ID for built-in apps to use for kiosk mode. Used when KioskModeManagedAppId and KioskModeAppStoreUrl are not set. +func (m *IosGeneralDeviceConfiguration) SetKioskModeBuiltInAppId(value *string)() { + m.kioskModeBuiltInAppId = value +} +// SetKioskModeEnableVoiceControl sets the kioskModeEnableVoiceControl property value. Indicates whether or not to enable voice control in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeEnableVoiceControl(value *bool)() { + m.kioskModeEnableVoiceControl = value +} +// SetKioskModeManagedAppId sets the kioskModeManagedAppId property value. Managed app id of the app to use for kiosk mode. If KioskModeManagedAppId is specified then KioskModeAppStoreUrl will be ignored. +func (m *IosGeneralDeviceConfiguration) SetKioskModeManagedAppId(value *string)() { + m.kioskModeManagedAppId = value +} +// SetKioskModeRequireAssistiveTouch sets the kioskModeRequireAssistiveTouch property value. Indicates whether or not to require assistive touch while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeRequireAssistiveTouch(value *bool)() { + m.kioskModeRequireAssistiveTouch = value +} +// SetKioskModeRequireColorInversion sets the kioskModeRequireColorInversion property value. Indicates whether or not to require color inversion while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeRequireColorInversion(value *bool)() { + m.kioskModeRequireColorInversion = value +} +// SetKioskModeRequireMonoAudio sets the kioskModeRequireMonoAudio property value. Indicates whether or not to require mono audio while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeRequireMonoAudio(value *bool)() { + m.kioskModeRequireMonoAudio = value +} +// SetKioskModeRequireVoiceOver sets the kioskModeRequireVoiceOver property value. Indicates whether or not to require voice over while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeRequireVoiceOver(value *bool)() { + m.kioskModeRequireVoiceOver = value +} +// SetKioskModeRequireZoom sets the kioskModeRequireZoom property value. Indicates whether or not to require zoom while in kiosk mode. +func (m *IosGeneralDeviceConfiguration) SetKioskModeRequireZoom(value *bool)() { + m.kioskModeRequireZoom = value +} +// SetLockScreenBlockControlCenter sets the lockScreenBlockControlCenter property value. Indicates whether or not to block the user from using control center on the lock screen. +func (m *IosGeneralDeviceConfiguration) SetLockScreenBlockControlCenter(value *bool)() { + m.lockScreenBlockControlCenter = value +} +// SetLockScreenBlockNotificationView sets the lockScreenBlockNotificationView property value. Indicates whether or not to block the user from using the notification view on the lock screen. +func (m *IosGeneralDeviceConfiguration) SetLockScreenBlockNotificationView(value *bool)() { + m.lockScreenBlockNotificationView = value +} +// SetLockScreenBlockPassbook sets the lockScreenBlockPassbook property value. Indicates whether or not to block the user from using passbook when the device is locked. +func (m *IosGeneralDeviceConfiguration) SetLockScreenBlockPassbook(value *bool)() { + m.lockScreenBlockPassbook = value +} +// SetLockScreenBlockTodayView sets the lockScreenBlockTodayView property value. Indicates whether or not to block the user from using the Today View on the lock screen. +func (m *IosGeneralDeviceConfiguration) SetLockScreenBlockTodayView(value *bool)() { + m.lockScreenBlockTodayView = value +} +// SetManagedPasteboardRequired sets the managedPasteboardRequired property value. Open-in management controls how people share data between unmanaged and managed apps. Setting this to true enforces copy/paste restrictions based on how you configured Block viewing corporate documents in unmanaged apps and Block viewing non-corporate documents in corporate apps. +func (m *IosGeneralDeviceConfiguration) SetManagedPasteboardRequired(value *bool)() { + m.managedPasteboardRequired = value +} +// SetMediaContentRatingApps sets the mediaContentRatingApps property value. Apps rating as in media content +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingApps(value *RatingAppsType)() { + m.mediaContentRatingApps = value +} +// SetMediaContentRatingAustralia sets the mediaContentRatingAustralia property value. Media content rating settings for Australia +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingAustralia(value MediaContentRatingAustraliaable)() { + m.mediaContentRatingAustralia = value +} +// SetMediaContentRatingCanada sets the mediaContentRatingCanada property value. Media content rating settings for Canada +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingCanada(value MediaContentRatingCanadaable)() { + m.mediaContentRatingCanada = value +} +// SetMediaContentRatingFrance sets the mediaContentRatingFrance property value. Media content rating settings for France +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingFrance(value MediaContentRatingFranceable)() { + m.mediaContentRatingFrance = value +} +// SetMediaContentRatingGermany sets the mediaContentRatingGermany property value. Media content rating settings for Germany +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingGermany(value MediaContentRatingGermanyable)() { + m.mediaContentRatingGermany = value +} +// SetMediaContentRatingIreland sets the mediaContentRatingIreland property value. Media content rating settings for Ireland +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingIreland(value MediaContentRatingIrelandable)() { + m.mediaContentRatingIreland = value +} +// SetMediaContentRatingJapan sets the mediaContentRatingJapan property value. Media content rating settings for Japan +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingJapan(value MediaContentRatingJapanable)() { + m.mediaContentRatingJapan = value +} +// SetMediaContentRatingNewZealand sets the mediaContentRatingNewZealand property value. Media content rating settings for New Zealand +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingNewZealand(value MediaContentRatingNewZealandable)() { + m.mediaContentRatingNewZealand = value +} +// SetMediaContentRatingUnitedKingdom sets the mediaContentRatingUnitedKingdom property value. Media content rating settings for United Kingdom +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingUnitedKingdom(value MediaContentRatingUnitedKingdomable)() { + m.mediaContentRatingUnitedKingdom = value +} +// SetMediaContentRatingUnitedStates sets the mediaContentRatingUnitedStates property value. Media content rating settings for United States +func (m *IosGeneralDeviceConfiguration) SetMediaContentRatingUnitedStates(value MediaContentRatingUnitedStatesable)() { + m.mediaContentRatingUnitedStates = value +} +// SetMessagesBlocked sets the messagesBlocked property value. Indicates whether or not to block the user from using the Messages app on the supervised device. +func (m *IosGeneralDeviceConfiguration) SetMessagesBlocked(value *bool)() { + m.messagesBlocked = value +} +// SetNetworkUsageRules sets the networkUsageRules property value. List of managed apps and the network rules that applies to them. This collection can contain a maximum of 1000 elements. +func (m *IosGeneralDeviceConfiguration) SetNetworkUsageRules(value []IosNetworkUsageRuleable)() { + m.networkUsageRules = value +} +// SetNfcBlocked sets the nfcBlocked property value. Disable NFC to prevent devices from pairing with other NFC-enabled devices. Available for iOS/iPadOS devices running 14.2 and later. +func (m *IosGeneralDeviceConfiguration) SetNfcBlocked(value *bool)() { + m.nfcBlocked = value +} +// SetNotificationsBlockSettingsModification sets the notificationsBlockSettingsModification property value. Indicates whether or not to allow notifications settings modification (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) SetNotificationsBlockSettingsModification(value *bool)() { + m.notificationsBlockSettingsModification = value +} +// SetOnDeviceOnlyDictationForced sets the onDeviceOnlyDictationForced property value. Disables connections to Siri servers so that users can’t use Siri to dictate text. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) SetOnDeviceOnlyDictationForced(value *bool)() { + m.onDeviceOnlyDictationForced = value +} +// SetOnDeviceOnlyTranslationForced sets the onDeviceOnlyTranslationForced property value. When set to TRUE, the setting disables connections to Siri servers so that users can’t use Siri to translate text. When set to FALSE, the setting allows connections to to Siri servers to users can use Siri to translate text. Available for devices running iOS and iPadOS versions 15.0 and later. +func (m *IosGeneralDeviceConfiguration) SetOnDeviceOnlyTranslationForced(value *bool)() { + m.onDeviceOnlyTranslationForced = value +} +// SetPasscodeBlockFingerprintModification sets the passcodeBlockFingerprintModification property value. Block modification of registered Touch ID fingerprints when in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetPasscodeBlockFingerprintModification(value *bool)() { + m.passcodeBlockFingerprintModification = value +} +// SetPasscodeBlockFingerprintUnlock sets the passcodeBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *IosGeneralDeviceConfiguration) SetPasscodeBlockFingerprintUnlock(value *bool)() { + m.passcodeBlockFingerprintUnlock = value +} +// SetPasscodeBlockModification sets the passcodeBlockModification property value. Indicates whether or not to allow passcode modification on the supervised device (iOS 9.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPasscodeBlockModification(value *bool)() { + m.passcodeBlockModification = value +} +// SetPasscodeBlockSimple sets the passcodeBlockSimple property value. Indicates whether or not to block simple passcodes. +func (m *IosGeneralDeviceConfiguration) SetPasscodeBlockSimple(value *bool)() { + m.passcodeBlockSimple = value +} +// SetPasscodeExpirationDays sets the passcodeExpirationDays property value. Number of days before the passcode expires. Valid values 1 to 65535 +func (m *IosGeneralDeviceConfiguration) SetPasscodeExpirationDays(value *int32)() { + m.passcodeExpirationDays = value +} +// SetPasscodeMinimumCharacterSetCount sets the passcodeMinimumCharacterSetCount property value. Number of character sets a passcode must contain. Valid values 0 to 4 +func (m *IosGeneralDeviceConfiguration) SetPasscodeMinimumCharacterSetCount(value *int32)() { + m.passcodeMinimumCharacterSetCount = value +} +// SetPasscodeMinimumLength sets the passcodeMinimumLength property value. Minimum length of passcode. Valid values 4 to 14 +func (m *IosGeneralDeviceConfiguration) SetPasscodeMinimumLength(value *int32)() { + m.passcodeMinimumLength = value +} +// SetPasscodeMinutesOfInactivityBeforeLock sets the passcodeMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a passcode is required. +func (m *IosGeneralDeviceConfiguration) SetPasscodeMinutesOfInactivityBeforeLock(value *int32)() { + m.passcodeMinutesOfInactivityBeforeLock = value +} +// SetPasscodeMinutesOfInactivityBeforeScreenTimeout sets the passcodeMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity before the screen times out. +func (m *IosGeneralDeviceConfiguration) SetPasscodeMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passcodeMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasscodePreviousPasscodeBlockCount sets the passcodePreviousPasscodeBlockCount property value. Number of previous passcodes to block. Valid values 1 to 24 +func (m *IosGeneralDeviceConfiguration) SetPasscodePreviousPasscodeBlockCount(value *int32)() { + m.passcodePreviousPasscodeBlockCount = value +} +// SetPasscodeRequired sets the passcodeRequired property value. Indicates whether or not to require a passcode. +func (m *IosGeneralDeviceConfiguration) SetPasscodeRequired(value *bool)() { + m.passcodeRequired = value +} +// SetPasscodeRequiredType sets the passcodeRequiredType property value. Possible values of required passwords. +func (m *IosGeneralDeviceConfiguration) SetPasscodeRequiredType(value *RequiredPasswordType)() { + m.passcodeRequiredType = value +} +// SetPasscodeSignInFailureCountBeforeWipe sets the passcodeSignInFailureCountBeforeWipe property value. Number of sign in failures allowed before wiping the device. Valid values 2 to 11 +func (m *IosGeneralDeviceConfiguration) SetPasscodeSignInFailureCountBeforeWipe(value *int32)() { + m.passcodeSignInFailureCountBeforeWipe = value +} +// SetPasswordBlockAirDropSharing sets the passwordBlockAirDropSharing property value. Indicates whether or not to block sharing passwords with the AirDrop passwords feature iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPasswordBlockAirDropSharing(value *bool)() { + m.passwordBlockAirDropSharing = value +} +// SetPasswordBlockAutoFill sets the passwordBlockAutoFill property value. Indicates if the AutoFill passwords feature is allowed (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPasswordBlockAutoFill(value *bool)() { + m.passwordBlockAutoFill = value +} +// SetPasswordBlockProximityRequests sets the passwordBlockProximityRequests property value. Indicates whether or not to block requesting passwords from nearby devices (iOS 12.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPasswordBlockProximityRequests(value *bool)() { + m.passwordBlockProximityRequests = value +} +// SetPkiBlockOTAUpdates sets the pkiBlockOTAUpdates property value. Indicates whether or not over-the-air PKI updates are blocked. Setting this restriction to false does not disable CRL and OCSP checks (iOS 7.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPkiBlockOTAUpdates(value *bool)() { + m.pkiBlockOTAUpdates = value +} +// SetPodcastsBlocked sets the podcastsBlocked property value. Indicates whether or not to block the user from using podcasts on the supervised device (iOS 8.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPodcastsBlocked(value *bool)() { + m.podcastsBlocked = value +} +// SetPrivacyForceLimitAdTracking sets the privacyForceLimitAdTracking property value. Indicates if ad tracking is limited.(iOS 7.0 and later). +func (m *IosGeneralDeviceConfiguration) SetPrivacyForceLimitAdTracking(value *bool)() { + m.privacyForceLimitAdTracking = value +} +// SetProximityBlockSetupToNewDevice sets the proximityBlockSetupToNewDevice property value. Indicates whether or not to enable the prompt to setup nearby devices with a supervised device. +func (m *IosGeneralDeviceConfiguration) SetProximityBlockSetupToNewDevice(value *bool)() { + m.proximityBlockSetupToNewDevice = value +} +// SetSafariBlockAutofill sets the safariBlockAutofill property value. Indicates whether or not to block the user from using Auto fill in Safari. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetSafariBlockAutofill(value *bool)() { + m.safariBlockAutofill = value +} +// SetSafariBlocked sets the safariBlocked property value. Indicates whether or not to block the user from using Safari. Requires a supervised device for iOS 13 and later. +func (m *IosGeneralDeviceConfiguration) SetSafariBlocked(value *bool)() { + m.safariBlocked = value +} +// SetSafariBlockJavaScript sets the safariBlockJavaScript property value. Indicates whether or not to block JavaScript in Safari. +func (m *IosGeneralDeviceConfiguration) SetSafariBlockJavaScript(value *bool)() { + m.safariBlockJavaScript = value +} +// SetSafariBlockPopups sets the safariBlockPopups property value. Indicates whether or not to block popups in Safari. +func (m *IosGeneralDeviceConfiguration) SetSafariBlockPopups(value *bool)() { + m.safariBlockPopups = value +} +// SetSafariCookieSettings sets the safariCookieSettings property value. Web Browser Cookie Settings. +func (m *IosGeneralDeviceConfiguration) SetSafariCookieSettings(value *WebBrowserCookieSettings)() { + m.safariCookieSettings = value +} +// SetSafariManagedDomains sets the safariManagedDomains property value. URLs matching the patterns listed here will be considered managed. +func (m *IosGeneralDeviceConfiguration) SetSafariManagedDomains(value []string)() { + m.safariManagedDomains = value +} +// SetSafariPasswordAutoFillDomains sets the safariPasswordAutoFillDomains property value. Users can save passwords in Safari only from URLs matching the patterns listed here. Applies to devices in supervised mode (iOS 9.3 and later). +func (m *IosGeneralDeviceConfiguration) SetSafariPasswordAutoFillDomains(value []string)() { + m.safariPasswordAutoFillDomains = value +} +// SetSafariRequireFraudWarning sets the safariRequireFraudWarning property value. Indicates whether or not to require fraud warning in Safari. +func (m *IosGeneralDeviceConfiguration) SetSafariRequireFraudWarning(value *bool)() { + m.safariRequireFraudWarning = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether or not to block the user from taking Screenshots. +func (m *IosGeneralDeviceConfiguration) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetSharedDeviceBlockTemporarySessions sets the sharedDeviceBlockTemporarySessions property value. Indicates whether or not to block temporary sessions on Shared iPads (iOS 13.4 or later). +func (m *IosGeneralDeviceConfiguration) SetSharedDeviceBlockTemporarySessions(value *bool)() { + m.sharedDeviceBlockTemporarySessions = value +} +// SetSiriBlocked sets the siriBlocked property value. Indicates whether or not to block the user from using Siri. +func (m *IosGeneralDeviceConfiguration) SetSiriBlocked(value *bool)() { + m.siriBlocked = value +} +// SetSiriBlockedWhenLocked sets the siriBlockedWhenLocked property value. Indicates whether or not to block the user from using Siri when locked. +func (m *IosGeneralDeviceConfiguration) SetSiriBlockedWhenLocked(value *bool)() { + m.siriBlockedWhenLocked = value +} +// SetSiriBlockUserGeneratedContent sets the siriBlockUserGeneratedContent property value. Indicates whether or not to block Siri from querying user-generated content when used on a supervised device. +func (m *IosGeneralDeviceConfiguration) SetSiriBlockUserGeneratedContent(value *bool)() { + m.siriBlockUserGeneratedContent = value +} +// SetSiriRequireProfanityFilter sets the siriRequireProfanityFilter property value. Indicates whether or not to prevent Siri from dictating, or speaking profane language on supervised device. +func (m *IosGeneralDeviceConfiguration) SetSiriRequireProfanityFilter(value *bool)() { + m.siriRequireProfanityFilter = value +} +// SetSoftwareUpdatesEnforcedDelayInDays sets the softwareUpdatesEnforcedDelayInDays property value. Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 +func (m *IosGeneralDeviceConfiguration) SetSoftwareUpdatesEnforcedDelayInDays(value *int32)() { + m.softwareUpdatesEnforcedDelayInDays = value +} +// SetSoftwareUpdatesForceDelayed sets the softwareUpdatesForceDelayed property value. Indicates whether or not to delay user visibility of software updates when the device is in supervised mode. +func (m *IosGeneralDeviceConfiguration) SetSoftwareUpdatesForceDelayed(value *bool)() { + m.softwareUpdatesForceDelayed = value +} +// SetSpotlightBlockInternetResults sets the spotlightBlockInternetResults property value. Indicates whether or not to block Spotlight search from returning internet results on supervised device. +func (m *IosGeneralDeviceConfiguration) SetSpotlightBlockInternetResults(value *bool)() { + m.spotlightBlockInternetResults = value +} +// SetUnpairedExternalBootToRecoveryAllowed sets the unpairedExternalBootToRecoveryAllowed property value. Allow users to boot devices into recovery mode with unpaired devices. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) SetUnpairedExternalBootToRecoveryAllowed(value *bool)() { + m.unpairedExternalBootToRecoveryAllowed = value +} +// SetUsbRestrictedModeBlocked sets the usbRestrictedModeBlocked property value. Indicates if connecting to USB accessories while the device is locked is allowed (iOS 11.4.1 and later). +func (m *IosGeneralDeviceConfiguration) SetUsbRestrictedModeBlocked(value *bool)() { + m.usbRestrictedModeBlocked = value +} +// SetVoiceDialingBlocked sets the voiceDialingBlocked property value. Indicates whether or not to block voice dialing. +func (m *IosGeneralDeviceConfiguration) SetVoiceDialingBlocked(value *bool)() { + m.voiceDialingBlocked = value +} +// SetVpnBlockCreation sets the vpnBlockCreation property value. Indicates whether or not the creation of VPN configurations is blocked (iOS 11.0 and later). +func (m *IosGeneralDeviceConfiguration) SetVpnBlockCreation(value *bool)() { + m.vpnBlockCreation = value +} +// SetWallpaperBlockModification sets the wallpaperBlockModification property value. Indicates whether or not to allow wallpaper modification on supervised device (iOS 9.0 and later) . +func (m *IosGeneralDeviceConfiguration) SetWallpaperBlockModification(value *bool)() { + m.wallpaperBlockModification = value +} +// SetWiFiConnectOnlyToConfiguredNetworks sets the wiFiConnectOnlyToConfiguredNetworks property value. Indicates whether or not to force the device to use only Wi-Fi networks from configuration profiles when the device is in supervised mode. Available for devices running iOS and iPadOS versions 14.4 and earlier. Devices running 14.5+ should use the setting, 'WiFiConnectToAllowedNetworksOnlyForced. +func (m *IosGeneralDeviceConfiguration) SetWiFiConnectOnlyToConfiguredNetworks(value *bool)() { + m.wiFiConnectOnlyToConfiguredNetworks = value +} +// SetWiFiConnectToAllowedNetworksOnlyForced sets the wiFiConnectToAllowedNetworksOnlyForced property value. Require devices to use Wi-Fi networks set up via configuration profiles. Available for devices running iOS and iPadOS versions 14.5 and later. +func (m *IosGeneralDeviceConfiguration) SetWiFiConnectToAllowedNetworksOnlyForced(value *bool)() { + m.wiFiConnectToAllowedNetworksOnlyForced = value +} +// SetWifiPowerOnForced sets the wifiPowerOnForced property value. Indicates whether or not Wi-Fi remains on, even when device is in airplane mode. Available for devices running iOS and iPadOS, versions 13.0 and later. +func (m *IosGeneralDeviceConfiguration) SetWifiPowerOnForced(value *bool)() { + m.wifiPowerOnForced = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_response.go new file mode 100644 index 000000000..2957c33f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosGeneralDeviceConfigurationCollectionResponse +type IosGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosGeneralDeviceConfigurationable +} +// NewIosGeneralDeviceConfigurationCollectionResponse instantiates a new IosGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewIosGeneralDeviceConfigurationCollectionResponse()(*IosGeneralDeviceConfigurationCollectionResponse) { + m := &IosGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosGeneralDeviceConfigurationCollectionResponse) GetValue()([]IosGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosGeneralDeviceConfigurationCollectionResponse) SetValue(value []IosGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..bd8528d21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosGeneralDeviceConfigurationCollectionResponseable +type IosGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosGeneralDeviceConfigurationable) + SetValue(value []IosGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_general_device_configurationable.go new file mode 100644 index 000000000..0134a25b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_general_device_configurationable.go @@ -0,0 +1,385 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosGeneralDeviceConfigurationable +type IosGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountBlockModification()(*bool) + GetActivationLockAllowWhenSupervised()(*bool) + GetAirDropBlocked()(*bool) + GetAirDropForceUnmanagedDropTarget()(*bool) + GetAirPlayForcePairingPasswordForOutgoingRequests()(*bool) + GetAirPrintBlockCredentialsStorage()(*bool) + GetAirPrintBlocked()(*bool) + GetAirPrintBlockiBeaconDiscovery()(*bool) + GetAirPrintForceTrustedTLS()(*bool) + GetAppClipsBlocked()(*bool) + GetAppleNewsBlocked()(*bool) + GetApplePersonalizedAdsBlocked()(*bool) + GetAppleWatchBlockPairing()(*bool) + GetAppleWatchForceWristDetection()(*bool) + GetAppRemovalBlocked()(*bool) + GetAppsSingleAppModeList()([]AppListItemable) + GetAppStoreBlockAutomaticDownloads()(*bool) + GetAppStoreBlocked()(*bool) + GetAppStoreBlockInAppPurchases()(*bool) + GetAppStoreBlockUIAppInstallation()(*bool) + GetAppStoreRequirePassword()(*bool) + GetAppsVisibilityList()([]AppListItemable) + GetAppsVisibilityListType()(*AppListType) + GetAutoFillForceAuthentication()(*bool) + GetAutoUnlockBlocked()(*bool) + GetBlockSystemAppRemoval()(*bool) + GetBluetoothBlockModification()(*bool) + GetCameraBlocked()(*bool) + GetCellularBlockDataRoaming()(*bool) + GetCellularBlockGlobalBackgroundFetchWhileRoaming()(*bool) + GetCellularBlockPerAppDataModification()(*bool) + GetCellularBlockPersonalHotspot()(*bool) + GetCellularBlockPersonalHotspotModification()(*bool) + GetCellularBlockPlanModification()(*bool) + GetCellularBlockVoiceRoaming()(*bool) + GetCertificatesBlockUntrustedTlsCertificates()(*bool) + GetClassroomAppBlockRemoteScreenObservation()(*bool) + GetClassroomAppForceUnpromptedScreenObservation()(*bool) + GetClassroomForceAutomaticallyJoinClasses()(*bool) + GetClassroomForceRequestPermissionToLeaveClasses()(*bool) + GetClassroomForceUnpromptedAppAndDeviceLock()(*bool) + GetCompliantAppListType()(*AppListType) + GetCompliantAppsList()([]AppListItemable) + GetConfigurationProfileBlockChanges()(*bool) + GetContactsAllowManagedToUnmanagedWrite()(*bool) + GetContactsAllowUnmanagedToManagedRead()(*bool) + GetContinuousPathKeyboardBlocked()(*bool) + GetDateAndTimeForceSetAutomatically()(*bool) + GetDefinitionLookupBlocked()(*bool) + GetDeviceBlockEnableRestrictions()(*bool) + GetDeviceBlockEraseContentAndSettings()(*bool) + GetDeviceBlockNameModification()(*bool) + GetDiagnosticDataBlockSubmission()(*bool) + GetDiagnosticDataBlockSubmissionModification()(*bool) + GetDocumentsBlockManagedDocumentsInUnmanagedApps()(*bool) + GetDocumentsBlockUnmanagedDocumentsInManagedApps()(*bool) + GetEmailInDomainSuffixes()([]string) + GetEnterpriseAppBlockTrust()(*bool) + GetEnterpriseAppBlockTrustModification()(*bool) + GetEnterpriseBookBlockBackup()(*bool) + GetEnterpriseBookBlockMetadataSync()(*bool) + GetEsimBlockModification()(*bool) + GetFaceTimeBlocked()(*bool) + GetFilesNetworkDriveAccessBlocked()(*bool) + GetFilesUsbDriveAccessBlocked()(*bool) + GetFindMyDeviceInFindMyAppBlocked()(*bool) + GetFindMyFriendsBlocked()(*bool) + GetFindMyFriendsInFindMyAppBlocked()(*bool) + GetGameCenterBlocked()(*bool) + GetGamingBlockGameCenterFriends()(*bool) + GetGamingBlockMultiplayer()(*bool) + GetHostPairingBlocked()(*bool) + GetIBooksStoreBlocked()(*bool) + GetIBooksStoreBlockErotica()(*bool) + GetICloudBlockActivityContinuation()(*bool) + GetICloudBlockBackup()(*bool) + GetICloudBlockDocumentSync()(*bool) + GetICloudBlockManagedAppsSync()(*bool) + GetICloudBlockPhotoLibrary()(*bool) + GetICloudBlockPhotoStreamSync()(*bool) + GetICloudBlockSharedPhotoStream()(*bool) + GetICloudPrivateRelayBlocked()(*bool) + GetICloudRequireEncryptedBackup()(*bool) + GetITunesBlocked()(*bool) + GetITunesBlockExplicitContent()(*bool) + GetITunesBlockMusicService()(*bool) + GetITunesBlockRadio()(*bool) + GetKeyboardBlockAutoCorrect()(*bool) + GetKeyboardBlockDictation()(*bool) + GetKeyboardBlockPredictive()(*bool) + GetKeyboardBlockShortcuts()(*bool) + GetKeyboardBlockSpellCheck()(*bool) + GetKeychainBlockCloudSync()(*bool) + GetKioskModeAllowAssistiveSpeak()(*bool) + GetKioskModeAllowAssistiveTouchSettings()(*bool) + GetKioskModeAllowAutoLock()(*bool) + GetKioskModeAllowColorInversionSettings()(*bool) + GetKioskModeAllowRingerSwitch()(*bool) + GetKioskModeAllowScreenRotation()(*bool) + GetKioskModeAllowSleepButton()(*bool) + GetKioskModeAllowTouchscreen()(*bool) + GetKioskModeAllowVoiceControlModification()(*bool) + GetKioskModeAllowVoiceOverSettings()(*bool) + GetKioskModeAllowVolumeButtons()(*bool) + GetKioskModeAllowZoomSettings()(*bool) + GetKioskModeAppStoreUrl()(*string) + GetKioskModeAppType()(*IosKioskModeAppType) + GetKioskModeBlockAutoLock()(*bool) + GetKioskModeBlockRingerSwitch()(*bool) + GetKioskModeBlockScreenRotation()(*bool) + GetKioskModeBlockSleepButton()(*bool) + GetKioskModeBlockTouchscreen()(*bool) + GetKioskModeBlockVolumeButtons()(*bool) + GetKioskModeBuiltInAppId()(*string) + GetKioskModeEnableVoiceControl()(*bool) + GetKioskModeManagedAppId()(*string) + GetKioskModeRequireAssistiveTouch()(*bool) + GetKioskModeRequireColorInversion()(*bool) + GetKioskModeRequireMonoAudio()(*bool) + GetKioskModeRequireVoiceOver()(*bool) + GetKioskModeRequireZoom()(*bool) + GetLockScreenBlockControlCenter()(*bool) + GetLockScreenBlockNotificationView()(*bool) + GetLockScreenBlockPassbook()(*bool) + GetLockScreenBlockTodayView()(*bool) + GetManagedPasteboardRequired()(*bool) + GetMediaContentRatingApps()(*RatingAppsType) + GetMediaContentRatingAustralia()(MediaContentRatingAustraliaable) + GetMediaContentRatingCanada()(MediaContentRatingCanadaable) + GetMediaContentRatingFrance()(MediaContentRatingFranceable) + GetMediaContentRatingGermany()(MediaContentRatingGermanyable) + GetMediaContentRatingIreland()(MediaContentRatingIrelandable) + GetMediaContentRatingJapan()(MediaContentRatingJapanable) + GetMediaContentRatingNewZealand()(MediaContentRatingNewZealandable) + GetMediaContentRatingUnitedKingdom()(MediaContentRatingUnitedKingdomable) + GetMediaContentRatingUnitedStates()(MediaContentRatingUnitedStatesable) + GetMessagesBlocked()(*bool) + GetNetworkUsageRules()([]IosNetworkUsageRuleable) + GetNfcBlocked()(*bool) + GetNotificationsBlockSettingsModification()(*bool) + GetOnDeviceOnlyDictationForced()(*bool) + GetOnDeviceOnlyTranslationForced()(*bool) + GetPasscodeBlockFingerprintModification()(*bool) + GetPasscodeBlockFingerprintUnlock()(*bool) + GetPasscodeBlockModification()(*bool) + GetPasscodeBlockSimple()(*bool) + GetPasscodeExpirationDays()(*int32) + GetPasscodeMinimumCharacterSetCount()(*int32) + GetPasscodeMinimumLength()(*int32) + GetPasscodeMinutesOfInactivityBeforeLock()(*int32) + GetPasscodeMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasscodePreviousPasscodeBlockCount()(*int32) + GetPasscodeRequired()(*bool) + GetPasscodeRequiredType()(*RequiredPasswordType) + GetPasscodeSignInFailureCountBeforeWipe()(*int32) + GetPasswordBlockAirDropSharing()(*bool) + GetPasswordBlockAutoFill()(*bool) + GetPasswordBlockProximityRequests()(*bool) + GetPkiBlockOTAUpdates()(*bool) + GetPodcastsBlocked()(*bool) + GetPrivacyForceLimitAdTracking()(*bool) + GetProximityBlockSetupToNewDevice()(*bool) + GetSafariBlockAutofill()(*bool) + GetSafariBlocked()(*bool) + GetSafariBlockJavaScript()(*bool) + GetSafariBlockPopups()(*bool) + GetSafariCookieSettings()(*WebBrowserCookieSettings) + GetSafariManagedDomains()([]string) + GetSafariPasswordAutoFillDomains()([]string) + GetSafariRequireFraudWarning()(*bool) + GetScreenCaptureBlocked()(*bool) + GetSharedDeviceBlockTemporarySessions()(*bool) + GetSiriBlocked()(*bool) + GetSiriBlockedWhenLocked()(*bool) + GetSiriBlockUserGeneratedContent()(*bool) + GetSiriRequireProfanityFilter()(*bool) + GetSoftwareUpdatesEnforcedDelayInDays()(*int32) + GetSoftwareUpdatesForceDelayed()(*bool) + GetSpotlightBlockInternetResults()(*bool) + GetUnpairedExternalBootToRecoveryAllowed()(*bool) + GetUsbRestrictedModeBlocked()(*bool) + GetVoiceDialingBlocked()(*bool) + GetVpnBlockCreation()(*bool) + GetWallpaperBlockModification()(*bool) + GetWiFiConnectOnlyToConfiguredNetworks()(*bool) + GetWiFiConnectToAllowedNetworksOnlyForced()(*bool) + GetWifiPowerOnForced()(*bool) + SetAccountBlockModification(value *bool)() + SetActivationLockAllowWhenSupervised(value *bool)() + SetAirDropBlocked(value *bool)() + SetAirDropForceUnmanagedDropTarget(value *bool)() + SetAirPlayForcePairingPasswordForOutgoingRequests(value *bool)() + SetAirPrintBlockCredentialsStorage(value *bool)() + SetAirPrintBlocked(value *bool)() + SetAirPrintBlockiBeaconDiscovery(value *bool)() + SetAirPrintForceTrustedTLS(value *bool)() + SetAppClipsBlocked(value *bool)() + SetAppleNewsBlocked(value *bool)() + SetApplePersonalizedAdsBlocked(value *bool)() + SetAppleWatchBlockPairing(value *bool)() + SetAppleWatchForceWristDetection(value *bool)() + SetAppRemovalBlocked(value *bool)() + SetAppsSingleAppModeList(value []AppListItemable)() + SetAppStoreBlockAutomaticDownloads(value *bool)() + SetAppStoreBlocked(value *bool)() + SetAppStoreBlockInAppPurchases(value *bool)() + SetAppStoreBlockUIAppInstallation(value *bool)() + SetAppStoreRequirePassword(value *bool)() + SetAppsVisibilityList(value []AppListItemable)() + SetAppsVisibilityListType(value *AppListType)() + SetAutoFillForceAuthentication(value *bool)() + SetAutoUnlockBlocked(value *bool)() + SetBlockSystemAppRemoval(value *bool)() + SetBluetoothBlockModification(value *bool)() + SetCameraBlocked(value *bool)() + SetCellularBlockDataRoaming(value *bool)() + SetCellularBlockGlobalBackgroundFetchWhileRoaming(value *bool)() + SetCellularBlockPerAppDataModification(value *bool)() + SetCellularBlockPersonalHotspot(value *bool)() + SetCellularBlockPersonalHotspotModification(value *bool)() + SetCellularBlockPlanModification(value *bool)() + SetCellularBlockVoiceRoaming(value *bool)() + SetCertificatesBlockUntrustedTlsCertificates(value *bool)() + SetClassroomAppBlockRemoteScreenObservation(value *bool)() + SetClassroomAppForceUnpromptedScreenObservation(value *bool)() + SetClassroomForceAutomaticallyJoinClasses(value *bool)() + SetClassroomForceRequestPermissionToLeaveClasses(value *bool)() + SetClassroomForceUnpromptedAppAndDeviceLock(value *bool)() + SetCompliantAppListType(value *AppListType)() + SetCompliantAppsList(value []AppListItemable)() + SetConfigurationProfileBlockChanges(value *bool)() + SetContactsAllowManagedToUnmanagedWrite(value *bool)() + SetContactsAllowUnmanagedToManagedRead(value *bool)() + SetContinuousPathKeyboardBlocked(value *bool)() + SetDateAndTimeForceSetAutomatically(value *bool)() + SetDefinitionLookupBlocked(value *bool)() + SetDeviceBlockEnableRestrictions(value *bool)() + SetDeviceBlockEraseContentAndSettings(value *bool)() + SetDeviceBlockNameModification(value *bool)() + SetDiagnosticDataBlockSubmission(value *bool)() + SetDiagnosticDataBlockSubmissionModification(value *bool)() + SetDocumentsBlockManagedDocumentsInUnmanagedApps(value *bool)() + SetDocumentsBlockUnmanagedDocumentsInManagedApps(value *bool)() + SetEmailInDomainSuffixes(value []string)() + SetEnterpriseAppBlockTrust(value *bool)() + SetEnterpriseAppBlockTrustModification(value *bool)() + SetEnterpriseBookBlockBackup(value *bool)() + SetEnterpriseBookBlockMetadataSync(value *bool)() + SetEsimBlockModification(value *bool)() + SetFaceTimeBlocked(value *bool)() + SetFilesNetworkDriveAccessBlocked(value *bool)() + SetFilesUsbDriveAccessBlocked(value *bool)() + SetFindMyDeviceInFindMyAppBlocked(value *bool)() + SetFindMyFriendsBlocked(value *bool)() + SetFindMyFriendsInFindMyAppBlocked(value *bool)() + SetGameCenterBlocked(value *bool)() + SetGamingBlockGameCenterFriends(value *bool)() + SetGamingBlockMultiplayer(value *bool)() + SetHostPairingBlocked(value *bool)() + SetIBooksStoreBlocked(value *bool)() + SetIBooksStoreBlockErotica(value *bool)() + SetICloudBlockActivityContinuation(value *bool)() + SetICloudBlockBackup(value *bool)() + SetICloudBlockDocumentSync(value *bool)() + SetICloudBlockManagedAppsSync(value *bool)() + SetICloudBlockPhotoLibrary(value *bool)() + SetICloudBlockPhotoStreamSync(value *bool)() + SetICloudBlockSharedPhotoStream(value *bool)() + SetICloudPrivateRelayBlocked(value *bool)() + SetICloudRequireEncryptedBackup(value *bool)() + SetITunesBlocked(value *bool)() + SetITunesBlockExplicitContent(value *bool)() + SetITunesBlockMusicService(value *bool)() + SetITunesBlockRadio(value *bool)() + SetKeyboardBlockAutoCorrect(value *bool)() + SetKeyboardBlockDictation(value *bool)() + SetKeyboardBlockPredictive(value *bool)() + SetKeyboardBlockShortcuts(value *bool)() + SetKeyboardBlockSpellCheck(value *bool)() + SetKeychainBlockCloudSync(value *bool)() + SetKioskModeAllowAssistiveSpeak(value *bool)() + SetKioskModeAllowAssistiveTouchSettings(value *bool)() + SetKioskModeAllowAutoLock(value *bool)() + SetKioskModeAllowColorInversionSettings(value *bool)() + SetKioskModeAllowRingerSwitch(value *bool)() + SetKioskModeAllowScreenRotation(value *bool)() + SetKioskModeAllowSleepButton(value *bool)() + SetKioskModeAllowTouchscreen(value *bool)() + SetKioskModeAllowVoiceControlModification(value *bool)() + SetKioskModeAllowVoiceOverSettings(value *bool)() + SetKioskModeAllowVolumeButtons(value *bool)() + SetKioskModeAllowZoomSettings(value *bool)() + SetKioskModeAppStoreUrl(value *string)() + SetKioskModeAppType(value *IosKioskModeAppType)() + SetKioskModeBlockAutoLock(value *bool)() + SetKioskModeBlockRingerSwitch(value *bool)() + SetKioskModeBlockScreenRotation(value *bool)() + SetKioskModeBlockSleepButton(value *bool)() + SetKioskModeBlockTouchscreen(value *bool)() + SetKioskModeBlockVolumeButtons(value *bool)() + SetKioskModeBuiltInAppId(value *string)() + SetKioskModeEnableVoiceControl(value *bool)() + SetKioskModeManagedAppId(value *string)() + SetKioskModeRequireAssistiveTouch(value *bool)() + SetKioskModeRequireColorInversion(value *bool)() + SetKioskModeRequireMonoAudio(value *bool)() + SetKioskModeRequireVoiceOver(value *bool)() + SetKioskModeRequireZoom(value *bool)() + SetLockScreenBlockControlCenter(value *bool)() + SetLockScreenBlockNotificationView(value *bool)() + SetLockScreenBlockPassbook(value *bool)() + SetLockScreenBlockTodayView(value *bool)() + SetManagedPasteboardRequired(value *bool)() + SetMediaContentRatingApps(value *RatingAppsType)() + SetMediaContentRatingAustralia(value MediaContentRatingAustraliaable)() + SetMediaContentRatingCanada(value MediaContentRatingCanadaable)() + SetMediaContentRatingFrance(value MediaContentRatingFranceable)() + SetMediaContentRatingGermany(value MediaContentRatingGermanyable)() + SetMediaContentRatingIreland(value MediaContentRatingIrelandable)() + SetMediaContentRatingJapan(value MediaContentRatingJapanable)() + SetMediaContentRatingNewZealand(value MediaContentRatingNewZealandable)() + SetMediaContentRatingUnitedKingdom(value MediaContentRatingUnitedKingdomable)() + SetMediaContentRatingUnitedStates(value MediaContentRatingUnitedStatesable)() + SetMessagesBlocked(value *bool)() + SetNetworkUsageRules(value []IosNetworkUsageRuleable)() + SetNfcBlocked(value *bool)() + SetNotificationsBlockSettingsModification(value *bool)() + SetOnDeviceOnlyDictationForced(value *bool)() + SetOnDeviceOnlyTranslationForced(value *bool)() + SetPasscodeBlockFingerprintModification(value *bool)() + SetPasscodeBlockFingerprintUnlock(value *bool)() + SetPasscodeBlockModification(value *bool)() + SetPasscodeBlockSimple(value *bool)() + SetPasscodeExpirationDays(value *int32)() + SetPasscodeMinimumCharacterSetCount(value *int32)() + SetPasscodeMinimumLength(value *int32)() + SetPasscodeMinutesOfInactivityBeforeLock(value *int32)() + SetPasscodeMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasscodePreviousPasscodeBlockCount(value *int32)() + SetPasscodeRequired(value *bool)() + SetPasscodeRequiredType(value *RequiredPasswordType)() + SetPasscodeSignInFailureCountBeforeWipe(value *int32)() + SetPasswordBlockAirDropSharing(value *bool)() + SetPasswordBlockAutoFill(value *bool)() + SetPasswordBlockProximityRequests(value *bool)() + SetPkiBlockOTAUpdates(value *bool)() + SetPodcastsBlocked(value *bool)() + SetPrivacyForceLimitAdTracking(value *bool)() + SetProximityBlockSetupToNewDevice(value *bool)() + SetSafariBlockAutofill(value *bool)() + SetSafariBlocked(value *bool)() + SetSafariBlockJavaScript(value *bool)() + SetSafariBlockPopups(value *bool)() + SetSafariCookieSettings(value *WebBrowserCookieSettings)() + SetSafariManagedDomains(value []string)() + SetSafariPasswordAutoFillDomains(value []string)() + SetSafariRequireFraudWarning(value *bool)() + SetScreenCaptureBlocked(value *bool)() + SetSharedDeviceBlockTemporarySessions(value *bool)() + SetSiriBlocked(value *bool)() + SetSiriBlockedWhenLocked(value *bool)() + SetSiriBlockUserGeneratedContent(value *bool)() + SetSiriRequireProfanityFilter(value *bool)() + SetSoftwareUpdatesEnforcedDelayInDays(value *int32)() + SetSoftwareUpdatesForceDelayed(value *bool)() + SetSpotlightBlockInternetResults(value *bool)() + SetUnpairedExternalBootToRecoveryAllowed(value *bool)() + SetUsbRestrictedModeBlocked(value *bool)() + SetVoiceDialingBlocked(value *bool)() + SetVpnBlockCreation(value *bool)() + SetWallpaperBlockModification(value *bool)() + SetWiFiConnectOnlyToConfiguredNetworks(value *bool)() + SetWiFiConnectToAllowedNetworksOnlyForced(value *bool)() + SetWifiPowerOnForced(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_app.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_app.go new file mode 100644 index 000000000..d330654ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_app.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenApp +type IosHomeScreenApp struct { + IosHomeScreenItem + // BundleID of the app if isWebClip is false or the URL of a web clip if isWebClip is true. + bundleID *string + // When true, the bundle ID will be handled as a URL for a web clip. + isWebClip *bool +} +// NewIosHomeScreenApp instantiates a new IosHomeScreenApp and sets the default values. +func NewIosHomeScreenApp()(*IosHomeScreenApp) { + m := &IosHomeScreenApp{ + IosHomeScreenItem: *NewIosHomeScreenItem(), + } + odataTypeValue := "#microsoft.graph.iosHomeScreenApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosHomeScreenAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenApp(), nil +} +// GetBundleID gets the bundleID property value. BundleID of the app if isWebClip is false or the URL of a web clip if isWebClip is true. +func (m *IosHomeScreenApp) GetBundleID()(*string) { + return m.bundleID +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosHomeScreenItem.GetFieldDeserializers() + res["bundleID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleID(val) + } + return nil + } + res["isWebClip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsWebClip(val) + } + return nil + } + return res +} +// GetIsWebClip gets the isWebClip property value. When true, the bundle ID will be handled as a URL for a web clip. +func (m *IosHomeScreenApp) GetIsWebClip()(*bool) { + return m.isWebClip +} +// Serialize serializes information the current object +func (m *IosHomeScreenApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosHomeScreenItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("bundleID", m.GetBundleID()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isWebClip", m.GetIsWebClip()) + if err != nil { + return err + } + } + return nil +} +// SetBundleID sets the bundleID property value. BundleID of the app if isWebClip is false or the URL of a web clip if isWebClip is true. +func (m *IosHomeScreenApp) SetBundleID(value *string)() { + m.bundleID = value +} +// SetIsWebClip sets the isWebClip property value. When true, the bundle ID will be handled as a URL for a web clip. +func (m *IosHomeScreenApp) SetIsWebClip(value *bool)() { + m.isWebClip = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_response.go new file mode 100644 index 000000000..d8105c332 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenAppCollectionResponse +type IosHomeScreenAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosHomeScreenAppable +} +// NewIosHomeScreenAppCollectionResponse instantiates a new IosHomeScreenAppCollectionResponse and sets the default values. +func NewIosHomeScreenAppCollectionResponse()(*IosHomeScreenAppCollectionResponse) { + m := &IosHomeScreenAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosHomeScreenAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenAppable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosHomeScreenAppCollectionResponse) GetValue()([]IosHomeScreenAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosHomeScreenAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosHomeScreenAppCollectionResponse) SetValue(value []IosHomeScreenAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_responseable.go new file mode 100644 index 000000000..fdf2b58cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenAppCollectionResponseable +type IosHomeScreenAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosHomeScreenAppable) + SetValue(value []IosHomeScreenAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_appable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_appable.go new file mode 100644 index 000000000..e3dbf55d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_appable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenAppable +type IosHomeScreenAppable interface { + IosHomeScreenItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleID()(*string) + GetIsWebClip()(*bool) + SetBundleID(value *string)() + SetIsWebClip(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folder.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder.go new file mode 100644 index 000000000..1f73bc6b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolder +type IosHomeScreenFolder struct { + IosHomeScreenItem + // Pages of Home Screen Layout Icons which must be applications or web clips. This collection can contain a maximum of 500 elements. + pages []IosHomeScreenFolderPageable +} +// NewIosHomeScreenFolder instantiates a new IosHomeScreenFolder and sets the default values. +func NewIosHomeScreenFolder()(*IosHomeScreenFolder) { + m := &IosHomeScreenFolder{ + IosHomeScreenItem: *NewIosHomeScreenItem(), + } + odataTypeValue := "#microsoft.graph.iosHomeScreenFolder"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosHomeScreenFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenFolder(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosHomeScreenItem.GetFieldDeserializers() + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenFolderPageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenFolderPageable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenFolderPageable) + } + m.SetPages(res) + } + return nil + } + return res +} +// GetPages gets the pages property value. Pages of Home Screen Layout Icons which must be applications or web clips. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenFolder) GetPages()([]IosHomeScreenFolderPageable) { + return m.pages +} +// Serialize serializes information the current object +func (m *IosHomeScreenFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosHomeScreenItem.Serialize(writer) + if err != nil { + return err + } + if m.GetPages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPages())) + for i, v := range m.GetPages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("pages", cast) + if err != nil { + return err + } + } + return nil +} +// SetPages sets the pages property value. Pages of Home Screen Layout Icons which must be applications or web clips. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenFolder) SetPages(value []IosHomeScreenFolderPageable)() { + m.pages = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page.go new file mode 100644 index 000000000..ea1cb58bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolderPage a page for a folder containing apps and web clips on the Home Screen. +type IosHomeScreenFolderPage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A list of apps and web clips to appear on a page within a folder. This collection can contain a maximum of 500 elements. + apps []IosHomeScreenAppable + // Name of the folder page + displayName *string + // The OdataType property + odataType *string +} +// NewIosHomeScreenFolderPage instantiates a new iosHomeScreenFolderPage and sets the default values. +func NewIosHomeScreenFolderPage()(*IosHomeScreenFolderPage) { + m := &IosHomeScreenFolderPage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosHomeScreenFolderPageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenFolderPageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenFolderPage(), 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 *IosHomeScreenFolderPage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApps gets the apps property value. A list of apps and web clips to appear on a page within a folder. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenFolderPage) GetApps()([]IosHomeScreenAppable) { + return m.apps +} +// GetDisplayName gets the displayName property value. Name of the folder page +func (m *IosHomeScreenFolderPage) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenFolderPage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenAppable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenAppable) + } + m.SetApps(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosHomeScreenFolderPage) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosHomeScreenFolderPage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosHomeScreenFolderPage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApps sets the apps property value. A list of apps and web clips to appear on a page within a folder. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenFolderPage) SetApps(value []IosHomeScreenAppable)() { + m.apps = value +} +// SetDisplayName sets the displayName property value. Name of the folder page +func (m *IosHomeScreenFolderPage) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosHomeScreenFolderPage) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_response.go new file mode 100644 index 000000000..fe998ab93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolderPageCollectionResponse +type IosHomeScreenFolderPageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosHomeScreenFolderPageable +} +// NewIosHomeScreenFolderPageCollectionResponse instantiates a new IosHomeScreenFolderPageCollectionResponse and sets the default values. +func NewIosHomeScreenFolderPageCollectionResponse()(*IosHomeScreenFolderPageCollectionResponse) { + m := &IosHomeScreenFolderPageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosHomeScreenFolderPageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenFolderPageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenFolderPageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenFolderPageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenFolderPageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenFolderPageable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenFolderPageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosHomeScreenFolderPageCollectionResponse) GetValue()([]IosHomeScreenFolderPageable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosHomeScreenFolderPageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosHomeScreenFolderPageCollectionResponse) SetValue(value []IosHomeScreenFolderPageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_responseable.go new file mode 100644 index 000000000..1c2afb6f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_page_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolderPageCollectionResponseable +type IosHomeScreenFolderPageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosHomeScreenFolderPageable) + SetValue(value []IosHomeScreenFolderPageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_pageable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_pageable.go new file mode 100644 index 000000000..ae4478bf5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folder_pageable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolderPageable +type IosHomeScreenFolderPageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApps()([]IosHomeScreenAppable) + GetDisplayName()(*string) + GetOdataType()(*string) + SetApps(value []IosHomeScreenAppable)() + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_folderable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_folderable.go new file mode 100644 index 000000000..78c024848 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_folderable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenFolderable +type IosHomeScreenFolderable interface { + IosHomeScreenItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPages()([]IosHomeScreenFolderPageable) + SetPages(value []IosHomeScreenFolderPageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_item.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_item.go new file mode 100644 index 000000000..582daccd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_item.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenItem represents an item on the iOS Home Screen +type IosHomeScreenItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the app + displayName *string + // The OdataType property + odataType *string +} +// NewIosHomeScreenItem instantiates a new iosHomeScreenItem and sets the default values. +func NewIosHomeScreenItem()(*IosHomeScreenItem) { + m := &IosHomeScreenItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosHomeScreenItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosHomeScreenApp": + return NewIosHomeScreenApp(), nil + case "#microsoft.graph.iosHomeScreenFolder": + return NewIosHomeScreenFolder(), nil + } + } + } + } + return NewIosHomeScreenItem(), 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 *IosHomeScreenItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of the app +func (m *IosHomeScreenItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosHomeScreenItem) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosHomeScreenItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosHomeScreenItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of the app +func (m *IosHomeScreenItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosHomeScreenItem) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_response.go new file mode 100644 index 000000000..4e4baf2be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenItemCollectionResponse +type IosHomeScreenItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosHomeScreenItemable +} +// NewIosHomeScreenItemCollectionResponse instantiates a new IosHomeScreenItemCollectionResponse and sets the default values. +func NewIosHomeScreenItemCollectionResponse()(*IosHomeScreenItemCollectionResponse) { + m := &IosHomeScreenItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosHomeScreenItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenItemable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosHomeScreenItemCollectionResponse) GetValue()([]IosHomeScreenItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosHomeScreenItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosHomeScreenItemCollectionResponse) SetValue(value []IosHomeScreenItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_responseable.go new file mode 100644 index 000000000..600cdec6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenItemCollectionResponseable +type IosHomeScreenItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosHomeScreenItemable) + SetValue(value []IosHomeScreenItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_itemable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_itemable.go new file mode 100644 index 000000000..871888bab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_itemable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenItemable +type IosHomeScreenItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_page.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_page.go new file mode 100644 index 000000000..a28431f39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_page.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenPage a page containing apps, folders, and web clips on the Home Screen. +type IosHomeScreenPage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the page + displayName *string + // A list of apps, folders, and web clips to appear on a page. This collection can contain a maximum of 500 elements. + icons []IosHomeScreenItemable + // The OdataType property + odataType *string +} +// NewIosHomeScreenPage instantiates a new iosHomeScreenPage and sets the default values. +func NewIosHomeScreenPage()(*IosHomeScreenPage) { + m := &IosHomeScreenPage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosHomeScreenPageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenPageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenPage(), 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 *IosHomeScreenPage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of the page +func (m *IosHomeScreenPage) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenPage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["icons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenItemable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenItemable) + } + m.SetIcons(res) + } + 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 + } + return res +} +// GetIcons gets the icons property value. A list of apps, folders, and web clips to appear on a page. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenPage) GetIcons()([]IosHomeScreenItemable) { + return m.icons +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosHomeScreenPage) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosHomeScreenPage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIcons() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIcons())) + for i, v := range m.GetIcons() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("icons", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosHomeScreenPage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of the page +func (m *IosHomeScreenPage) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIcons sets the icons property value. A list of apps, folders, and web clips to appear on a page. This collection can contain a maximum of 500 elements. +func (m *IosHomeScreenPage) SetIcons(value []IosHomeScreenItemable)() { + m.icons = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosHomeScreenPage) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_response.go new file mode 100644 index 000000000..2c5ef044f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenPageCollectionResponse +type IosHomeScreenPageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosHomeScreenPageable +} +// NewIosHomeScreenPageCollectionResponse instantiates a new IosHomeScreenPageCollectionResponse and sets the default values. +func NewIosHomeScreenPageCollectionResponse()(*IosHomeScreenPageCollectionResponse) { + m := &IosHomeScreenPageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosHomeScreenPageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosHomeScreenPageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosHomeScreenPageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosHomeScreenPageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosHomeScreenPageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosHomeScreenPageable, len(val)) + for i, v := range val { + res[i] = v.(IosHomeScreenPageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosHomeScreenPageCollectionResponse) GetValue()([]IosHomeScreenPageable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosHomeScreenPageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosHomeScreenPageCollectionResponse) SetValue(value []IosHomeScreenPageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_responseable.go new file mode 100644 index 000000000..0a864911e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_page_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenPageCollectionResponseable +type IosHomeScreenPageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosHomeScreenPageable) + SetValue(value []IosHomeScreenPageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_home_screen_pageable.go b/src/internal/connector/graph/betasdk/models/ios_home_screen_pageable.go new file mode 100644 index 000000000..6c8405b0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_home_screen_pageable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosHomeScreenPageable +type IosHomeScreenPageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetIcons()([]IosHomeScreenItemable) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetIcons(value []IosHomeScreenItemable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile.go b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile.go new file mode 100644 index 000000000..f2e4a69af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosImportedPFXCertificateProfile +type IosImportedPFXCertificateProfile struct { + IosCertificateProfile + // PFX Import Options. + intendedPurpose *IntendedPurpose + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable +} +// NewIosImportedPFXCertificateProfile instantiates a new IosImportedPFXCertificateProfile and sets the default values. +func NewIosImportedPFXCertificateProfile()(*IosImportedPFXCertificateProfile) { + m := &IosImportedPFXCertificateProfile{ + IosCertificateProfile: *NewIosCertificateProfile(), + } + odataTypeValue := "#microsoft.graph.iosImportedPFXCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosImportedPFXCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosImportedPFXCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosImportedPFXCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosImportedPFXCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosCertificateProfile.GetFieldDeserializers() + res["intendedPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIntendedPurpose) + if err != nil { + return err + } + if val != nil { + m.SetIntendedPurpose(val.(*IntendedPurpose)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + return res +} +// GetIntendedPurpose gets the intendedPurpose property value. PFX Import Options. +func (m *IosImportedPFXCertificateProfile) GetIntendedPurpose()(*IntendedPurpose) { + return m.intendedPurpose +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosImportedPFXCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// Serialize serializes information the current object +func (m *IosImportedPFXCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosCertificateProfile.Serialize(writer) + if err != nil { + return err + } + if m.GetIntendedPurpose() != nil { + cast := (*m.GetIntendedPurpose()).String() + err = writer.WriteStringValue("intendedPurpose", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetIntendedPurpose sets the intendedPurpose property value. PFX Import Options. +func (m *IosImportedPFXCertificateProfile) SetIntendedPurpose(value *IntendedPurpose)() { + m.intendedPurpose = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosImportedPFXCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_response.go new file mode 100644 index 000000000..ff597d3da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosImportedPFXCertificateProfileCollectionResponse +type IosImportedPFXCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosImportedPFXCertificateProfileable +} +// NewIosImportedPFXCertificateProfileCollectionResponse instantiates a new IosImportedPFXCertificateProfileCollectionResponse and sets the default values. +func NewIosImportedPFXCertificateProfileCollectionResponse()(*IosImportedPFXCertificateProfileCollectionResponse) { + m := &IosImportedPFXCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosImportedPFXCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosImportedPFXCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosImportedPFXCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosImportedPFXCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(IosImportedPFXCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosImportedPFXCertificateProfileCollectionResponse) GetValue()([]IosImportedPFXCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosImportedPFXCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosImportedPFXCertificateProfileCollectionResponse) SetValue(value []IosImportedPFXCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..37bfcf25b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosImportedPFXCertificateProfileCollectionResponseable +type IosImportedPFXCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosImportedPFXCertificateProfileable) + SetValue(value []IosImportedPFXCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profileable.go new file mode 100644 index 000000000..8a29d0b8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_imported_p_f_x_certificate_profileable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosImportedPFXCertificateProfileable +type IosImportedPFXCertificateProfileable interface { + IosCertificateProfileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntendedPurpose()(*IntendedPurpose) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + SetIntendedPurpose(value *IntendedPurpose)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extension.go new file mode 100644 index 000000000..9ecaed2b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extension.go @@ -0,0 +1,646 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosKerberosSingleSignOnExtension +type IosKerberosSingleSignOnExtension struct { + IosSingleSignOnExtension + // Gets or sets the Active Directory site. + activeDirectorySiteCode *string + // Enables or disables whether the Kerberos extension can automatically determine its site name. + blockActiveDirectorySiteAutoDiscovery *bool + // Enables or disables Keychain usage. + blockAutomaticLogin *bool + // Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. + cacheName *string + // Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. + credentialBundleIdAccessControlList []string + // Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. + domainRealms []string + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. + isDefaultRealm *bool + // When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. + managedAppsInBundleIdACLIncluded *bool + // Enables or disables password changes. + passwordBlockModification *bool + // Gets or sets the URL that the user will be sent to when they initiate a password change. + passwordChangeUrl *string + // Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. + passwordEnableLocalSync *bool + // Overrides the default password expiration in days. For most domains, this value is calculated automatically. + passwordExpirationDays *int32 + // Gets or sets the number of days until the user is notified that their password will expire (default is 15). + passwordExpirationNotificationDays *int32 + // Gets or sets the minimum number of days until a user can change their password again. + passwordMinimumAgeDays *int32 + // Gets or sets the minimum length of a password. + passwordMinimumLength *int32 + // Gets or sets the number of previous passwords to block. + passwordPreviousPasswordBlockCount *int32 + // Enables or disables whether passwords must meet Active Directory's complexity requirements. + passwordRequireActiveDirectoryComplexity *bool + // Gets or sets a description of the password complexity requirements. + passwordRequirementsDescription *string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. + requireUserPresence *bool + // Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. + signInHelpText *string + // Gets or sets the principle user name to use for this profile. The realm name does not need to be included. + userPrincipalName *string +} +// NewIosKerberosSingleSignOnExtension instantiates a new IosKerberosSingleSignOnExtension and sets the default values. +func NewIosKerberosSingleSignOnExtension()(*IosKerberosSingleSignOnExtension) { + m := &IosKerberosSingleSignOnExtension{ + IosSingleSignOnExtension: *NewIosSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.iosKerberosSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosKerberosSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosKerberosSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosKerberosSingleSignOnExtension(), nil +} +// GetActiveDirectorySiteCode gets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *IosKerberosSingleSignOnExtension) GetActiveDirectorySiteCode()(*string) { + return m.activeDirectorySiteCode +} +// GetBlockActiveDirectorySiteAutoDiscovery gets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *IosKerberosSingleSignOnExtension) GetBlockActiveDirectorySiteAutoDiscovery()(*bool) { + return m.blockActiveDirectorySiteAutoDiscovery +} +// GetBlockAutomaticLogin gets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *IosKerberosSingleSignOnExtension) GetBlockAutomaticLogin()(*bool) { + return m.blockAutomaticLogin +} +// GetCacheName gets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *IosKerberosSingleSignOnExtension) GetCacheName()(*string) { + return m.cacheName +} +// GetCredentialBundleIdAccessControlList gets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *IosKerberosSingleSignOnExtension) GetCredentialBundleIdAccessControlList()([]string) { + return m.credentialBundleIdAccessControlList +} +// GetDomainRealms gets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *IosKerberosSingleSignOnExtension) GetDomainRealms()([]string) { + return m.domainRealms +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *IosKerberosSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosKerberosSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosSingleSignOnExtension.GetFieldDeserializers() + res["activeDirectorySiteCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveDirectorySiteCode(val) + } + return nil + } + res["blockActiveDirectorySiteAutoDiscovery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockActiveDirectorySiteAutoDiscovery(val) + } + return nil + } + res["blockAutomaticLogin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockAutomaticLogin(val) + } + return nil + } + res["cacheName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCacheName(val) + } + return nil + } + res["credentialBundleIdAccessControlList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCredentialBundleIdAccessControlList(res) + } + return nil + } + res["domainRealms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomainRealms(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["isDefaultRealm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultRealm(val) + } + return nil + } + res["managedAppsInBundleIdACLIncluded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedAppsInBundleIdACLIncluded(val) + } + return nil + } + res["passwordBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockModification(val) + } + return nil + } + res["passwordChangeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordChangeUrl(val) + } + return nil + } + res["passwordEnableLocalSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordEnableLocalSync(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordExpirationNotificationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationNotificationDays(val) + } + return nil + } + res["passwordMinimumAgeDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumAgeDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequireActiveDirectoryComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequireActiveDirectoryComplexity(val) + } + return nil + } + res["passwordRequirementsDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequirementsDescription(val) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["requireUserPresence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireUserPresence(val) + } + return nil + } + res["signInHelpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInHelpText(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetIsDefaultRealm gets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *IosKerberosSingleSignOnExtension) GetIsDefaultRealm()(*bool) { + return m.isDefaultRealm +} +// GetManagedAppsInBundleIdACLIncluded gets the managedAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. +func (m *IosKerberosSingleSignOnExtension) GetManagedAppsInBundleIdACLIncluded()(*bool) { + return m.managedAppsInBundleIdACLIncluded +} +// GetPasswordBlockModification gets the passwordBlockModification property value. Enables or disables password changes. +func (m *IosKerberosSingleSignOnExtension) GetPasswordBlockModification()(*bool) { + return m.passwordBlockModification +} +// GetPasswordChangeUrl gets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *IosKerberosSingleSignOnExtension) GetPasswordChangeUrl()(*string) { + return m.passwordChangeUrl +} +// GetPasswordEnableLocalSync gets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *IosKerberosSingleSignOnExtension) GetPasswordEnableLocalSync()(*bool) { + return m.passwordEnableLocalSync +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *IosKerberosSingleSignOnExtension) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordExpirationNotificationDays gets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *IosKerberosSingleSignOnExtension) GetPasswordExpirationNotificationDays()(*int32) { + return m.passwordExpirationNotificationDays +} +// GetPasswordMinimumAgeDays gets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *IosKerberosSingleSignOnExtension) GetPasswordMinimumAgeDays()(*int32) { + return m.passwordMinimumAgeDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *IosKerberosSingleSignOnExtension) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *IosKerberosSingleSignOnExtension) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequireActiveDirectoryComplexity gets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *IosKerberosSingleSignOnExtension) GetPasswordRequireActiveDirectoryComplexity()(*bool) { + return m.passwordRequireActiveDirectoryComplexity +} +// GetPasswordRequirementsDescription gets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *IosKerberosSingleSignOnExtension) GetPasswordRequirementsDescription()(*string) { + return m.passwordRequirementsDescription +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *IosKerberosSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetRequireUserPresence gets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *IosKerberosSingleSignOnExtension) GetRequireUserPresence()(*bool) { + return m.requireUserPresence +} +// GetSignInHelpText gets the signInHelpText property value. Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. +func (m *IosKerberosSingleSignOnExtension) GetSignInHelpText()(*string) { + return m.signInHelpText +} +// GetUserPrincipalName gets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *IosKerberosSingleSignOnExtension) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *IosKerberosSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activeDirectorySiteCode", m.GetActiveDirectorySiteCode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", m.GetBlockActiveDirectorySiteAutoDiscovery()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockAutomaticLogin", m.GetBlockAutomaticLogin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cacheName", m.GetCacheName()) + if err != nil { + return err + } + } + if m.GetCredentialBundleIdAccessControlList() != nil { + err = writer.WriteCollectionOfStringValues("credentialBundleIdAccessControlList", m.GetCredentialBundleIdAccessControlList()) + if err != nil { + return err + } + } + if m.GetDomainRealms() != nil { + err = writer.WriteCollectionOfStringValues("domainRealms", m.GetDomainRealms()) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultRealm", m.GetIsDefaultRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedAppsInBundleIdACLIncluded", m.GetManagedAppsInBundleIdACLIncluded()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockModification", m.GetPasswordBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordChangeUrl", m.GetPasswordChangeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordEnableLocalSync", m.GetPasswordEnableLocalSync()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationNotificationDays", m.GetPasswordExpirationNotificationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumAgeDays", m.GetPasswordMinimumAgeDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequireActiveDirectoryComplexity", m.GetPasswordRequireActiveDirectoryComplexity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordRequirementsDescription", m.GetPasswordRequirementsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireUserPresence", m.GetRequireUserPresence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signInHelpText", m.GetSignInHelpText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetActiveDirectorySiteCode sets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *IosKerberosSingleSignOnExtension) SetActiveDirectorySiteCode(value *string)() { + m.activeDirectorySiteCode = value +} +// SetBlockActiveDirectorySiteAutoDiscovery sets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *IosKerberosSingleSignOnExtension) SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() { + m.blockActiveDirectorySiteAutoDiscovery = value +} +// SetBlockAutomaticLogin sets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *IosKerberosSingleSignOnExtension) SetBlockAutomaticLogin(value *bool)() { + m.blockAutomaticLogin = value +} +// SetCacheName sets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *IosKerberosSingleSignOnExtension) SetCacheName(value *string)() { + m.cacheName = value +} +// SetCredentialBundleIdAccessControlList sets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *IosKerberosSingleSignOnExtension) SetCredentialBundleIdAccessControlList(value []string)() { + m.credentialBundleIdAccessControlList = value +} +// SetDomainRealms sets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *IosKerberosSingleSignOnExtension) SetDomainRealms(value []string)() { + m.domainRealms = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *IosKerberosSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetIsDefaultRealm sets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *IosKerberosSingleSignOnExtension) SetIsDefaultRealm(value *bool)() { + m.isDefaultRealm = value +} +// SetManagedAppsInBundleIdACLIncluded sets the managedAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. +func (m *IosKerberosSingleSignOnExtension) SetManagedAppsInBundleIdACLIncluded(value *bool)() { + m.managedAppsInBundleIdACLIncluded = value +} +// SetPasswordBlockModification sets the passwordBlockModification property value. Enables or disables password changes. +func (m *IosKerberosSingleSignOnExtension) SetPasswordBlockModification(value *bool)() { + m.passwordBlockModification = value +} +// SetPasswordChangeUrl sets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *IosKerberosSingleSignOnExtension) SetPasswordChangeUrl(value *string)() { + m.passwordChangeUrl = value +} +// SetPasswordEnableLocalSync sets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *IosKerberosSingleSignOnExtension) SetPasswordEnableLocalSync(value *bool)() { + m.passwordEnableLocalSync = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *IosKerberosSingleSignOnExtension) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordExpirationNotificationDays sets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *IosKerberosSingleSignOnExtension) SetPasswordExpirationNotificationDays(value *int32)() { + m.passwordExpirationNotificationDays = value +} +// SetPasswordMinimumAgeDays sets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *IosKerberosSingleSignOnExtension) SetPasswordMinimumAgeDays(value *int32)() { + m.passwordMinimumAgeDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *IosKerberosSingleSignOnExtension) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *IosKerberosSingleSignOnExtension) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequireActiveDirectoryComplexity sets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *IosKerberosSingleSignOnExtension) SetPasswordRequireActiveDirectoryComplexity(value *bool)() { + m.passwordRequireActiveDirectoryComplexity = value +} +// SetPasswordRequirementsDescription sets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *IosKerberosSingleSignOnExtension) SetPasswordRequirementsDescription(value *string)() { + m.passwordRequirementsDescription = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *IosKerberosSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetRequireUserPresence sets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *IosKerberosSingleSignOnExtension) SetRequireUserPresence(value *bool)() { + m.requireUserPresence = value +} +// SetSignInHelpText sets the signInHelpText property value. Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. +func (m *IosKerberosSingleSignOnExtension) SetSignInHelpText(value *string)() { + m.signInHelpText = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *IosKerberosSingleSignOnExtension) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extensionable.go new file mode 100644 index 000000000..97daf49c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_kerberos_single_sign_on_extensionable.go @@ -0,0 +1,57 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosKerberosSingleSignOnExtensionable +type IosKerberosSingleSignOnExtensionable interface { + IosSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveDirectorySiteCode()(*string) + GetBlockActiveDirectorySiteAutoDiscovery()(*bool) + GetBlockAutomaticLogin()(*bool) + GetCacheName()(*string) + GetCredentialBundleIdAccessControlList()([]string) + GetDomainRealms()([]string) + GetDomains()([]string) + GetIsDefaultRealm()(*bool) + GetManagedAppsInBundleIdACLIncluded()(*bool) + GetPasswordBlockModification()(*bool) + GetPasswordChangeUrl()(*string) + GetPasswordEnableLocalSync()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordExpirationNotificationDays()(*int32) + GetPasswordMinimumAgeDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequireActiveDirectoryComplexity()(*bool) + GetPasswordRequirementsDescription()(*string) + GetRealm()(*string) + GetRequireUserPresence()(*bool) + GetSignInHelpText()(*string) + GetUserPrincipalName()(*string) + SetActiveDirectorySiteCode(value *string)() + SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() + SetBlockAutomaticLogin(value *bool)() + SetCacheName(value *string)() + SetCredentialBundleIdAccessControlList(value []string)() + SetDomainRealms(value []string)() + SetDomains(value []string)() + SetIsDefaultRealm(value *bool)() + SetManagedAppsInBundleIdACLIncluded(value *bool)() + SetPasswordBlockModification(value *bool)() + SetPasswordChangeUrl(value *string)() + SetPasswordEnableLocalSync(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordExpirationNotificationDays(value *int32)() + SetPasswordMinimumAgeDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequireActiveDirectoryComplexity(value *bool)() + SetPasswordRequirementsDescription(value *string)() + SetRealm(value *string)() + SetRequireUserPresence(value *bool)() + SetSignInHelpText(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_kiosk_mode_app_type.go b/src/internal/connector/graph/betasdk/models/ios_kiosk_mode_app_type.go new file mode 100644 index 000000000..d343df797 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_kiosk_mode_app_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosKioskModeAppType int + +const ( + // Device default value, no intent. + NOTCONFIGURED_IOSKIOSKMODEAPPTYPE IosKioskModeAppType = iota + // The app to be run comes from the app store. + APPSTOREAPP_IOSKIOSKMODEAPPTYPE + // The app to be run is built into the device. + MANAGEDAPP_IOSKIOSKMODEAPPTYPE + // The app to be run is a managed app. + BUILTINAPP_IOSKIOSKMODEAPPTYPE +) + +func (i IosKioskModeAppType) String() string { + return []string{"notConfigured", "appStoreApp", "managedApp", "builtInApp"}[i] +} +func ParseIosKioskModeAppType(v string) (interface{}, error) { + result := NOTCONFIGURED_IOSKIOSKMODEAPPTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_IOSKIOSKMODEAPPTYPE + case "appStoreApp": + result = APPSTOREAPP_IOSKIOSKMODEAPPTYPE + case "managedApp": + result = MANAGEDAPP_IOSKIOSKMODEAPPTYPE + case "builtInApp": + result = BUILTINAPP_IOSKIOSKMODEAPPTYPE + default: + return 0, errors.New("Unknown IosKioskModeAppType value: " + v) + } + return &result, nil +} +func SerializeIosKioskModeAppType(values []IosKioskModeAppType) []string { + 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/ios_lob_app.go b/src/internal/connector/graph/betasdk/models/ios_lob_app.go new file mode 100644 index 000000000..4932fc75a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobApp +type IosLobApp struct { + MobileLobApp + // Contains properties of the possible iOS device types the mobile app can run on. + applicableDeviceType IosDeviceTypeable + // The build number of iOS Line of Business (LoB) app. + buildNumber *string + // The Identity Name. + bundleId *string + // The expiration time. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem IosMinimumOperatingSystemable + // The version number of iOS Line of Business (LoB) app. + versionNumber *string +} +// NewIosLobApp instantiates a new IosLobApp and sets the default values. +func NewIosLobApp()(*IosLobApp) { + m := &IosLobApp{ + MobileLobApp: *NewMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.iosLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobApp(), nil +} +// GetApplicableDeviceType gets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *IosLobApp) GetApplicableDeviceType()(IosDeviceTypeable) { + return m.applicableDeviceType +} +// GetBuildNumber gets the buildNumber property value. The build number of iOS Line of Business (LoB) app. +func (m *IosLobApp) GetBuildNumber()(*string) { + return m.buildNumber +} +// GetBundleId gets the bundleId property value. The Identity Name. +func (m *IosLobApp) GetBundleId()(*string) { + return m.bundleId +} +// GetExpirationDateTime gets the expirationDateTime property value. The expiration time. +func (m *IosLobApp) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileLobApp.GetFieldDeserializers() + res["applicableDeviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicableDeviceType(val.(IosDeviceTypeable)) + } + return nil + } + res["buildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuildNumber(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(IosMinimumOperatingSystemable)) + } + return nil + } + res["versionNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionNumber(val) + } + return nil + } + return res +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *IosLobApp) GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetVersionNumber gets the versionNumber property value. The version number of iOS Line of Business (LoB) app. +func (m *IosLobApp) GetVersionNumber()(*string) { + return m.versionNumber +} +// Serialize serializes information the current object +func (m *IosLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicableDeviceType", m.GetApplicableDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("buildNumber", m.GetBuildNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionNumber", m.GetVersionNumber()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableDeviceType sets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *IosLobApp) SetApplicableDeviceType(value IosDeviceTypeable)() { + m.applicableDeviceType = value +} +// SetBuildNumber sets the buildNumber property value. The build number of iOS Line of Business (LoB) app. +func (m *IosLobApp) SetBuildNumber(value *string)() { + m.buildNumber = value +} +// SetBundleId sets the bundleId property value. The Identity Name. +func (m *IosLobApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expiration time. +func (m *IosLobApp) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *IosLobApp) SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetVersionNumber sets the versionNumber property value. The version number of iOS Line of Business (LoB) app. +func (m *IosLobApp) SetVersionNumber(value *string)() { + m.versionNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settings.go new file mode 100644 index 000000000..7e753f327 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settings.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppAssignmentSettings +type IosLobAppAssignmentSettings struct { + MobileAppAssignmentSettings + // When TRUE, indicates that the app can be uninstalled by the user. When FALSE, indicates that the app cannot be uninstalled by the user. By default, this property is set to null which internally is treated as TRUE. + isRemovable *bool + // Whether or not to uninstall the app when device is removed from Intune. + uninstallOnDeviceRemoval *bool + // The VPN Configuration Id to apply for this app. + vpnConfigurationId *string +} +// NewIosLobAppAssignmentSettings instantiates a new IosLobAppAssignmentSettings and sets the default values. +func NewIosLobAppAssignmentSettings()(*IosLobAppAssignmentSettings) { + m := &IosLobAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.iosLobAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosLobAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["isRemovable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemovable(val) + } + return nil + } + res["uninstallOnDeviceRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUninstallOnDeviceRemoval(val) + } + return nil + } + res["vpnConfigurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnConfigurationId(val) + } + return nil + } + return res +} +// GetIsRemovable gets the isRemovable property value. When TRUE, indicates that the app can be uninstalled by the user. When FALSE, indicates that the app cannot be uninstalled by the user. By default, this property is set to null which internally is treated as TRUE. +func (m *IosLobAppAssignmentSettings) GetIsRemovable()(*bool) { + return m.isRemovable +} +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosLobAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { + return m.uninstallOnDeviceRemoval +} +// GetVpnConfigurationId gets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosLobAppAssignmentSettings) GetVpnConfigurationId()(*string) { + return m.vpnConfigurationId +} +// Serialize serializes information the current object +func (m *IosLobAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isRemovable", m.GetIsRemovable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("uninstallOnDeviceRemoval", m.GetUninstallOnDeviceRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnConfigurationId", m.GetVpnConfigurationId()) + if err != nil { + return err + } + } + return nil +} +// SetIsRemovable sets the isRemovable property value. When TRUE, indicates that the app can be uninstalled by the user. When FALSE, indicates that the app cannot be uninstalled by the user. By default, this property is set to null which internally is treated as TRUE. +func (m *IosLobAppAssignmentSettings) SetIsRemovable(value *bool)() { + m.isRemovable = value +} +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosLobAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { + m.uninstallOnDeviceRemoval = value +} +// SetVpnConfigurationId sets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosLobAppAssignmentSettings) SetVpnConfigurationId(value *string)() { + m.vpnConfigurationId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settingsable.go new file mode 100644 index 000000000..424272854 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_assignment_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppAssignmentSettingsable +type IosLobAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRemovable()(*bool) + GetUninstallOnDeviceRemoval()(*bool) + GetVpnConfigurationId()(*string) + SetIsRemovable(value *bool)() + SetUninstallOnDeviceRemoval(value *bool)() + SetVpnConfigurationId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_response.go new file mode 100644 index 000000000..a4993538d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppCollectionResponse +type IosLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosLobAppable +} +// NewIosLobAppCollectionResponse instantiates a new IosLobAppCollectionResponse and sets the default values. +func NewIosLobAppCollectionResponse()(*IosLobAppCollectionResponse) { + m := &IosLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosLobAppCollectionResponse) GetValue()([]IosLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosLobAppCollectionResponse) SetValue(value []IosLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_responseable.go new file mode 100644 index 000000000..121d52adf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppCollectionResponseable +type IosLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosLobAppable) + SetValue(value []IosLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration.go new file mode 100644 index 000000000..c1bcccddc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration.go @@ -0,0 +1,409 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfiguration this topic provides descriptions of the declared methods, properties and relationships exposed by the iOS Lob App Provisioning Configuration resource. +type IosLobAppProvisioningConfiguration struct { + Entity + // The associated group assignments for IosLobAppProvisioningConfiguration. + assignments []IosLobAppProvisioningConfigurationAssignmentable + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the Device Configuration. + description *string + // The list of device installation states for this mobile app configuration. + deviceStatuses []ManagedDeviceMobileAppConfigurationDeviceStatusable + // Admin provided name of the device configuration. + displayName *string + // Optional profile expiration date and time. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The associated group assignments. + groupAssignments []MobileAppProvisioningConfigGroupAssignmentable + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Payload. (UTF8 encoded byte array) + payload []byte + // Payload file name (.mobileprovision + payloadFileName *string + // List of Scope Tags for this iOS LOB app provisioning configuration entity. + roleScopeTagIds []string + // The list of user installation states for this mobile app configuration. + userStatuses []ManagedDeviceMobileAppConfigurationUserStatusable + // Version of the device configuration. + version *int32 +} +// NewIosLobAppProvisioningConfiguration instantiates a new iosLobAppProvisioningConfiguration and sets the default values. +func NewIosLobAppProvisioningConfiguration()(*IosLobAppProvisioningConfiguration) { + m := &IosLobAppProvisioningConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateIosLobAppProvisioningConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfiguration(), nil +} +// GetAssignments gets the assignments property value. The associated group assignments for IosLobAppProvisioningConfiguration. +func (m *IosLobAppProvisioningConfiguration) GetAssignments()([]IosLobAppProvisioningConfigurationAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *IosLobAppProvisioningConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the Device Configuration. +func (m *IosLobAppProvisioningConfiguration) GetDescription()(*string) { + return m.description +} +// GetDeviceStatuses gets the deviceStatuses property value. The list of device installation states for this mobile app configuration. +func (m *IosLobAppProvisioningConfiguration) GetDeviceStatuses()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) { + return m.deviceStatuses +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *IosLobAppProvisioningConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetExpirationDateTime gets the expirationDateTime property value. Optional profile expiration date and time. +func (m *IosLobAppProvisioningConfiguration) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppProvisioningConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppProvisioningConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppProvisioningConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationDeviceStatusable) + } + m.SetDeviceStatuses(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["groupAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppProvisioningConfigGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppProvisioningConfigGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppProvisioningConfigGroupAssignmentable) + } + m.SetGroupAssignments(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["payloadFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadFileName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["userStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationUserStatusable) + } + m.SetUserStatuses(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetGroupAssignments gets the groupAssignments property value. The associated group assignments. +func (m *IosLobAppProvisioningConfiguration) GetGroupAssignments()([]MobileAppProvisioningConfigGroupAssignmentable) { + return m.groupAssignments +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *IosLobAppProvisioningConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPayload gets the payload property value. Payload. (UTF8 encoded byte array) +func (m *IosLobAppProvisioningConfiguration) GetPayload()([]byte) { + return m.payload +} +// GetPayloadFileName gets the payloadFileName property value. Payload file name (.mobileprovision +func (m *IosLobAppProvisioningConfiguration) GetPayloadFileName()(*string) { + return m.payloadFileName +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this iOS LOB app provisioning configuration entity. +func (m *IosLobAppProvisioningConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetUserStatuses gets the userStatuses property value. The list of user installation states for this mobile app configuration. +func (m *IosLobAppProvisioningConfiguration) GetUserStatuses()([]ManagedDeviceMobileAppConfigurationUserStatusable) { + return m.userStatuses +} +// GetVersion gets the version property value. Version of the device configuration. +func (m *IosLobAppProvisioningConfiguration) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStatuses())) + for i, v := range m.GetDeviceStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + if m.GetGroupAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGroupAssignments())) + for i, v := range m.GetGroupAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("groupAssignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadFileName", m.GetPayloadFileName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetUserStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStatuses())) + for i, v := range m.GetUserStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The associated group assignments for IosLobAppProvisioningConfiguration. +func (m *IosLobAppProvisioningConfiguration) SetAssignments(value []IosLobAppProvisioningConfigurationAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *IosLobAppProvisioningConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the Device Configuration. +func (m *IosLobAppProvisioningConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDeviceStatuses sets the deviceStatuses property value. The list of device installation states for this mobile app configuration. +func (m *IosLobAppProvisioningConfiguration) SetDeviceStatuses(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() { + m.deviceStatuses = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *IosLobAppProvisioningConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Optional profile expiration date and time. +func (m *IosLobAppProvisioningConfiguration) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetGroupAssignments sets the groupAssignments property value. The associated group assignments. +func (m *IosLobAppProvisioningConfiguration) SetGroupAssignments(value []MobileAppProvisioningConfigGroupAssignmentable)() { + m.groupAssignments = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *IosLobAppProvisioningConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPayload sets the payload property value. Payload. (UTF8 encoded byte array) +func (m *IosLobAppProvisioningConfiguration) SetPayload(value []byte)() { + m.payload = value +} +// SetPayloadFileName sets the payloadFileName property value. Payload file name (.mobileprovision +func (m *IosLobAppProvisioningConfiguration) SetPayloadFileName(value *string)() { + m.payloadFileName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this iOS LOB app provisioning configuration entity. +func (m *IosLobAppProvisioningConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetUserStatuses sets the userStatuses property value. The list of user installation states for this mobile app configuration. +func (m *IosLobAppProvisioningConfiguration) SetUserStatuses(value []ManagedDeviceMobileAppConfigurationUserStatusable)() { + m.userStatuses = value +} +// SetVersion sets the version property value. Version of the device configuration. +func (m *IosLobAppProvisioningConfiguration) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment.go new file mode 100644 index 000000000..f24bdbf51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationAssignment a class containing the properties used for Group Assignment of an iOS LOB App Provisioning and Configuration. +type IosLobAppProvisioningConfigurationAssignment struct { + Entity + // The target group assignment defined by the admin. + target DeviceAndAppManagementAssignmentTargetable +} +// NewIosLobAppProvisioningConfigurationAssignment instantiates a new iosLobAppProvisioningConfigurationAssignment and sets the default values. +func NewIosLobAppProvisioningConfigurationAssignment()(*IosLobAppProvisioningConfigurationAssignment) { + m := &IosLobAppProvisioningConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateIosLobAppProvisioningConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The target group assignment defined by the admin. +func (m *IosLobAppProvisioningConfigurationAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The target group assignment defined by the admin. +func (m *IosLobAppProvisioningConfigurationAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_response.go new file mode 100644 index 000000000..259209e52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationAssignmentCollectionResponse +type IosLobAppProvisioningConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosLobAppProvisioningConfigurationAssignmentable +} +// NewIosLobAppProvisioningConfigurationAssignmentCollectionResponse instantiates a new IosLobAppProvisioningConfigurationAssignmentCollectionResponse and sets the default values. +func NewIosLobAppProvisioningConfigurationAssignmentCollectionResponse()(*IosLobAppProvisioningConfigurationAssignmentCollectionResponse) { + m := &IosLobAppProvisioningConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosLobAppProvisioningConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppProvisioningConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppProvisioningConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppProvisioningConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationAssignmentCollectionResponse) GetValue()([]IosLobAppProvisioningConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationAssignmentCollectionResponse) SetValue(value []IosLobAppProvisioningConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..836ff96d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationAssignmentCollectionResponseable +type IosLobAppProvisioningConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosLobAppProvisioningConfigurationAssignmentable) + SetValue(value []IosLobAppProvisioningConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignmentable.go new file mode 100644 index 000000000..0021ae946 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationAssignmentable +type IosLobAppProvisioningConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_response.go new file mode 100644 index 000000000..2ca586aa9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationCollectionResponse +type IosLobAppProvisioningConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosLobAppProvisioningConfigurationable +} +// NewIosLobAppProvisioningConfigurationCollectionResponse instantiates a new IosLobAppProvisioningConfigurationCollectionResponse and sets the default values. +func NewIosLobAppProvisioningConfigurationCollectionResponse()(*IosLobAppProvisioningConfigurationCollectionResponse) { + m := &IosLobAppProvisioningConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosLobAppProvisioningConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppProvisioningConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppProvisioningConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppProvisioningConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationCollectionResponse) GetValue()([]IosLobAppProvisioningConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationCollectionResponse) SetValue(value []IosLobAppProvisioningConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_responseable.go new file mode 100644 index 000000000..49b16e4d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationCollectionResponseable +type IosLobAppProvisioningConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosLobAppProvisioningConfigurationable) + SetValue(value []IosLobAppProvisioningConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item.go new file mode 100644 index 000000000..593476f82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationPolicySetItem +type IosLobAppProvisioningConfigurationPolicySetItem struct { + PolicySetItem +} +// NewIosLobAppProvisioningConfigurationPolicySetItem instantiates a new IosLobAppProvisioningConfigurationPolicySetItem and sets the default values. +func NewIosLobAppProvisioningConfigurationPolicySetItem()(*IosLobAppProvisioningConfigurationPolicySetItem) { + m := &IosLobAppProvisioningConfigurationPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.iosLobAppProvisioningConfigurationPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosLobAppProvisioningConfigurationPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfigurationPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfigurationPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfigurationPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_response.go new file mode 100644 index 000000000..5ccc257d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse +type IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosLobAppProvisioningConfigurationPolicySetItemable +} +// NewIosLobAppProvisioningConfigurationPolicySetItemCollectionResponse instantiates a new IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse and sets the default values. +func NewIosLobAppProvisioningConfigurationPolicySetItemCollectionResponse()(*IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse) { + m := &IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosLobAppProvisioningConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosLobAppProvisioningConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosLobAppProvisioningConfigurationPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosLobAppProvisioningConfigurationPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosLobAppProvisioningConfigurationPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(IosLobAppProvisioningConfigurationPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse) GetValue()([]IosLobAppProvisioningConfigurationPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosLobAppProvisioningConfigurationPolicySetItemCollectionResponse) SetValue(value []IosLobAppProvisioningConfigurationPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..7d7b61139 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationPolicySetItemCollectionResponseable +type IosLobAppProvisioningConfigurationPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosLobAppProvisioningConfigurationPolicySetItemable) + SetValue(value []IosLobAppProvisioningConfigurationPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_itemable.go new file mode 100644 index 000000000..3f7f044f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configuration_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationPolicySetItemable +type IosLobAppProvisioningConfigurationPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configurationable.go new file mode 100644 index 000000000..66bd64275 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_app_provisioning_configurationable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppProvisioningConfigurationable +type IosLobAppProvisioningConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]IosLobAppProvisioningConfigurationAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceStatuses()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) + GetDisplayName()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupAssignments()([]MobileAppProvisioningConfigGroupAssignmentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPayload()([]byte) + GetPayloadFileName()(*string) + GetRoleScopeTagIds()([]string) + GetUserStatuses()([]ManagedDeviceMobileAppConfigurationUserStatusable) + GetVersion()(*int32) + SetAssignments(value []IosLobAppProvisioningConfigurationAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceStatuses(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() + SetDisplayName(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupAssignments(value []MobileAppProvisioningConfigGroupAssignmentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPayload(value []byte)() + SetPayloadFileName(value *string)() + SetRoleScopeTagIds(value []string)() + SetUserStatuses(value []ManagedDeviceMobileAppConfigurationUserStatusable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_lob_appable.go b/src/internal/connector/graph/betasdk/models/ios_lob_appable.go new file mode 100644 index 000000000..a809708b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_lob_appable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosLobAppable +type IosLobAppable interface { + MobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableDeviceType()(IosDeviceTypeable) + GetBuildNumber()(*string) + GetBundleId()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) + GetVersionNumber()(*string) + SetApplicableDeviceType(value IosDeviceTypeable)() + SetBuildNumber(value *string)() + SetBundleId(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() + SetVersionNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_protection.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection.go new file mode 100644 index 000000000..0ac5f9e8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection.go @@ -0,0 +1,556 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppProtection +type IosManagedAppProtection struct { + TargetedManagedAppProtection + // Semicolon seperated list of device models allowed, as a string, for the managed app to work. + allowedIosDeviceModels *string + // An admin initiated action to be applied on a managed app. + appActionIfIosDeviceModelNotAllowed *ManagedAppRemediationAction + // Represents the level to which app data is encrypted for managed apps + appDataEncryptionType *ManagedAppDataEncryptionType + // List of apps to which the policy is deployed. + apps []ManagedMobileAppable + // A custom browser protocol to open weblink on iOS. + customBrowserProtocol *string + // Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. + customDialerAppProtocol *string + // Count of apps to which the current policy is deployed. + deployedAppCount *int32 + // Navigation property to deployment summary of the configuration. + deploymentSummary ManagedAppPolicyDeploymentSummaryable + // Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. + disableProtectionOfManagedOutboundOpenInData *bool + // Apps in this list will be exempt from the policy and will be able to receive data from managed apps. + exemptedAppProtocols []KeyValuePairable + // A list of custom urls that are allowed to invocate an unmanaged app + exemptedUniversalLinks []string + // Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. + faceIdBlocked *bool + // Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. + filterOpenInToOnlyManagedApps *bool + // A list of custom urls that are allowed to invocate a managed app + managedUniversalLinks []string + // Versions less than the specified version will block the managed app from accessing company data. + minimumRequiredSdkVersion *string + // Versions less than the specified version will result in warning message on the managed app from accessing company data. + minimumWarningSdkVersion *string + // Versions less than the specified version will block the managed app from accessing company data. + minimumWipeSdkVersion *string + // Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. + protectInboundDataFromUnknownSources *bool + // Defines if third party keyboards are allowed while accessing a managed app + thirdPartyKeyboardsBlocked *bool +} +// NewIosManagedAppProtection instantiates a new IosManagedAppProtection and sets the default values. +func NewIosManagedAppProtection()(*IosManagedAppProtection) { + m := &IosManagedAppProtection{ + TargetedManagedAppProtection: *NewTargetedManagedAppProtection(), + } + odataTypeValue := "#microsoft.graph.iosManagedAppProtection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosManagedAppProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosManagedAppProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosManagedAppProtection(), nil +} +// GetAllowedIosDeviceModels gets the allowedIosDeviceModels property value. Semicolon seperated list of device models allowed, as a string, for the managed app to work. +func (m *IosManagedAppProtection) GetAllowedIosDeviceModels()(*string) { + return m.allowedIosDeviceModels +} +// GetAppActionIfIosDeviceModelNotAllowed gets the appActionIfIosDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *IosManagedAppProtection) GetAppActionIfIosDeviceModelNotAllowed()(*ManagedAppRemediationAction) { + return m.appActionIfIosDeviceModelNotAllowed +} +// GetAppDataEncryptionType gets the appDataEncryptionType property value. Represents the level to which app data is encrypted for managed apps +func (m *IosManagedAppProtection) GetAppDataEncryptionType()(*ManagedAppDataEncryptionType) { + return m.appDataEncryptionType +} +// GetApps gets the apps property value. List of apps to which the policy is deployed. +func (m *IosManagedAppProtection) GetApps()([]ManagedMobileAppable) { + return m.apps +} +// GetCustomBrowserProtocol gets the customBrowserProtocol property value. A custom browser protocol to open weblink on iOS. +func (m *IosManagedAppProtection) GetCustomBrowserProtocol()(*string) { + return m.customBrowserProtocol +} +// GetCustomDialerAppProtocol gets the customDialerAppProtocol property value. Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. +func (m *IosManagedAppProtection) GetCustomDialerAppProtocol()(*string) { + return m.customDialerAppProtocol +} +// GetDeployedAppCount gets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *IosManagedAppProtection) GetDeployedAppCount()(*int32) { + return m.deployedAppCount +} +// GetDeploymentSummary gets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *IosManagedAppProtection) GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) { + return m.deploymentSummary +} +// GetDisableProtectionOfManagedOutboundOpenInData gets the disableProtectionOfManagedOutboundOpenInData property value. Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. +func (m *IosManagedAppProtection) GetDisableProtectionOfManagedOutboundOpenInData()(*bool) { + return m.disableProtectionOfManagedOutboundOpenInData +} +// GetExemptedAppProtocols gets the exemptedAppProtocols property value. Apps in this list will be exempt from the policy and will be able to receive data from managed apps. +func (m *IosManagedAppProtection) GetExemptedAppProtocols()([]KeyValuePairable) { + return m.exemptedAppProtocols +} +// GetExemptedUniversalLinks gets the exemptedUniversalLinks property value. A list of custom urls that are allowed to invocate an unmanaged app +func (m *IosManagedAppProtection) GetExemptedUniversalLinks()([]string) { + return m.exemptedUniversalLinks +} +// GetFaceIdBlocked gets the faceIdBlocked property value. Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. +func (m *IosManagedAppProtection) GetFaceIdBlocked()(*bool) { + return m.faceIdBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosManagedAppProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TargetedManagedAppProtection.GetFieldDeserializers() + res["allowedIosDeviceModels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowedIosDeviceModels(val) + } + return nil + } + res["appActionIfIosDeviceModelNotAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfIosDeviceModelNotAllowed(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appDataEncryptionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppDataEncryptionType) + if err != nil { + return err + } + if val != nil { + m.SetAppDataEncryptionType(val.(*ManagedAppDataEncryptionType)) + } + return nil + } + res["apps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedMobileAppable) + } + m.SetApps(res) + } + return nil + } + res["customBrowserProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomBrowserProtocol(val) + } + return nil + } + res["customDialerAppProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomDialerAppProtocol(val) + } + return nil + } + res["deployedAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeployedAppCount(val) + } + return nil + } + res["deploymentSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedAppPolicyDeploymentSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentSummary(val.(ManagedAppPolicyDeploymentSummaryable)) + } + return nil + } + res["disableProtectionOfManagedOutboundOpenInData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableProtectionOfManagedOutboundOpenInData(val) + } + return nil + } + res["exemptedAppProtocols"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetExemptedAppProtocols(res) + } + return nil + } + res["exemptedUniversalLinks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExemptedUniversalLinks(res) + } + return nil + } + res["faceIdBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFaceIdBlocked(val) + } + return nil + } + res["filterOpenInToOnlyManagedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFilterOpenInToOnlyManagedApps(val) + } + return nil + } + res["managedUniversalLinks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetManagedUniversalLinks(res) + } + return nil + } + res["minimumRequiredSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredSdkVersion(val) + } + return nil + } + res["minimumWarningSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningSdkVersion(val) + } + return nil + } + res["minimumWipeSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeSdkVersion(val) + } + return nil + } + res["protectInboundDataFromUnknownSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetProtectInboundDataFromUnknownSources(val) + } + return nil + } + res["thirdPartyKeyboardsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetThirdPartyKeyboardsBlocked(val) + } + return nil + } + return res +} +// GetFilterOpenInToOnlyManagedApps gets the filterOpenInToOnlyManagedApps property value. Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. +func (m *IosManagedAppProtection) GetFilterOpenInToOnlyManagedApps()(*bool) { + return m.filterOpenInToOnlyManagedApps +} +// GetManagedUniversalLinks gets the managedUniversalLinks property value. A list of custom urls that are allowed to invocate a managed app +func (m *IosManagedAppProtection) GetManagedUniversalLinks()([]string) { + return m.managedUniversalLinks +} +// GetMinimumRequiredSdkVersion gets the minimumRequiredSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *IosManagedAppProtection) GetMinimumRequiredSdkVersion()(*string) { + return m.minimumRequiredSdkVersion +} +// GetMinimumWarningSdkVersion gets the minimumWarningSdkVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. +func (m *IosManagedAppProtection) GetMinimumWarningSdkVersion()(*string) { + return m.minimumWarningSdkVersion +} +// GetMinimumWipeSdkVersion gets the minimumWipeSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *IosManagedAppProtection) GetMinimumWipeSdkVersion()(*string) { + return m.minimumWipeSdkVersion +} +// GetProtectInboundDataFromUnknownSources gets the protectInboundDataFromUnknownSources property value. Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. +func (m *IosManagedAppProtection) GetProtectInboundDataFromUnknownSources()(*bool) { + return m.protectInboundDataFromUnknownSources +} +// GetThirdPartyKeyboardsBlocked gets the thirdPartyKeyboardsBlocked property value. Defines if third party keyboards are allowed while accessing a managed app +func (m *IosManagedAppProtection) GetThirdPartyKeyboardsBlocked()(*bool) { + return m.thirdPartyKeyboardsBlocked +} +// Serialize serializes information the current object +func (m *IosManagedAppProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TargetedManagedAppProtection.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("allowedIosDeviceModels", m.GetAllowedIosDeviceModels()) + if err != nil { + return err + } + } + if m.GetAppActionIfIosDeviceModelNotAllowed() != nil { + cast := (*m.GetAppActionIfIosDeviceModelNotAllowed()).String() + err = writer.WriteStringValue("appActionIfIosDeviceModelNotAllowed", &cast) + if err != nil { + return err + } + } + if m.GetAppDataEncryptionType() != nil { + cast := (*m.GetAppDataEncryptionType()).String() + err = writer.WriteStringValue("appDataEncryptionType", &cast) + if err != nil { + return err + } + } + if m.GetApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApps())) + for i, v := range m.GetApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("apps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customBrowserProtocol", m.GetCustomBrowserProtocol()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customDialerAppProtocol", m.GetCustomDialerAppProtocol()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("deployedAppCount", m.GetDeployedAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deploymentSummary", m.GetDeploymentSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableProtectionOfManagedOutboundOpenInData", m.GetDisableProtectionOfManagedOutboundOpenInData()) + if err != nil { + return err + } + } + if m.GetExemptedAppProtocols() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExemptedAppProtocols())) + for i, v := range m.GetExemptedAppProtocols() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("exemptedAppProtocols", cast) + if err != nil { + return err + } + } + if m.GetExemptedUniversalLinks() != nil { + err = writer.WriteCollectionOfStringValues("exemptedUniversalLinks", m.GetExemptedUniversalLinks()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("faceIdBlocked", m.GetFaceIdBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("filterOpenInToOnlyManagedApps", m.GetFilterOpenInToOnlyManagedApps()) + if err != nil { + return err + } + } + if m.GetManagedUniversalLinks() != nil { + err = writer.WriteCollectionOfStringValues("managedUniversalLinks", m.GetManagedUniversalLinks()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredSdkVersion", m.GetMinimumRequiredSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningSdkVersion", m.GetMinimumWarningSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeSdkVersion", m.GetMinimumWipeSdkVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("protectInboundDataFromUnknownSources", m.GetProtectInboundDataFromUnknownSources()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("thirdPartyKeyboardsBlocked", m.GetThirdPartyKeyboardsBlocked()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedIosDeviceModels sets the allowedIosDeviceModels property value. Semicolon seperated list of device models allowed, as a string, for the managed app to work. +func (m *IosManagedAppProtection) SetAllowedIosDeviceModels(value *string)() { + m.allowedIosDeviceModels = value +} +// SetAppActionIfIosDeviceModelNotAllowed sets the appActionIfIosDeviceModelNotAllowed property value. An admin initiated action to be applied on a managed app. +func (m *IosManagedAppProtection) SetAppActionIfIosDeviceModelNotAllowed(value *ManagedAppRemediationAction)() { + m.appActionIfIosDeviceModelNotAllowed = value +} +// SetAppDataEncryptionType sets the appDataEncryptionType property value. Represents the level to which app data is encrypted for managed apps +func (m *IosManagedAppProtection) SetAppDataEncryptionType(value *ManagedAppDataEncryptionType)() { + m.appDataEncryptionType = value +} +// SetApps sets the apps property value. List of apps to which the policy is deployed. +func (m *IosManagedAppProtection) SetApps(value []ManagedMobileAppable)() { + m.apps = value +} +// SetCustomBrowserProtocol sets the customBrowserProtocol property value. A custom browser protocol to open weblink on iOS. +func (m *IosManagedAppProtection) SetCustomBrowserProtocol(value *string)() { + m.customBrowserProtocol = value +} +// SetCustomDialerAppProtocol sets the customDialerAppProtocol property value. Protocol of a custom dialer app to click-to-open a phone number on iOS, for example, skype:. +func (m *IosManagedAppProtection) SetCustomDialerAppProtocol(value *string)() { + m.customDialerAppProtocol = value +} +// SetDeployedAppCount sets the deployedAppCount property value. Count of apps to which the current policy is deployed. +func (m *IosManagedAppProtection) SetDeployedAppCount(value *int32)() { + m.deployedAppCount = value +} +// SetDeploymentSummary sets the deploymentSummary property value. Navigation property to deployment summary of the configuration. +func (m *IosManagedAppProtection) SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() { + m.deploymentSummary = value +} +// SetDisableProtectionOfManagedOutboundOpenInData sets the disableProtectionOfManagedOutboundOpenInData property value. Disable protection of data transferred to other apps through IOS OpenIn option. This setting is only allowed to be True when AllowedOutboundDataTransferDestinations is set to ManagedApps. +func (m *IosManagedAppProtection) SetDisableProtectionOfManagedOutboundOpenInData(value *bool)() { + m.disableProtectionOfManagedOutboundOpenInData = value +} +// SetExemptedAppProtocols sets the exemptedAppProtocols property value. Apps in this list will be exempt from the policy and will be able to receive data from managed apps. +func (m *IosManagedAppProtection) SetExemptedAppProtocols(value []KeyValuePairable)() { + m.exemptedAppProtocols = value +} +// SetExemptedUniversalLinks sets the exemptedUniversalLinks property value. A list of custom urls that are allowed to invocate an unmanaged app +func (m *IosManagedAppProtection) SetExemptedUniversalLinks(value []string)() { + m.exemptedUniversalLinks = value +} +// SetFaceIdBlocked sets the faceIdBlocked property value. Indicates whether use of the FaceID is allowed in place of a pin if PinRequired is set to True. +func (m *IosManagedAppProtection) SetFaceIdBlocked(value *bool)() { + m.faceIdBlocked = value +} +// SetFilterOpenInToOnlyManagedApps sets the filterOpenInToOnlyManagedApps property value. Defines if open-in operation is supported from the managed app to the filesharing locations selected. This setting only applies when AllowedOutboundDataTransferDestinations is set to ManagedApps and DisableProtectionOfManagedOutboundOpenInData is set to False. +func (m *IosManagedAppProtection) SetFilterOpenInToOnlyManagedApps(value *bool)() { + m.filterOpenInToOnlyManagedApps = value +} +// SetManagedUniversalLinks sets the managedUniversalLinks property value. A list of custom urls that are allowed to invocate a managed app +func (m *IosManagedAppProtection) SetManagedUniversalLinks(value []string)() { + m.managedUniversalLinks = value +} +// SetMinimumRequiredSdkVersion sets the minimumRequiredSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *IosManagedAppProtection) SetMinimumRequiredSdkVersion(value *string)() { + m.minimumRequiredSdkVersion = value +} +// SetMinimumWarningSdkVersion sets the minimumWarningSdkVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. +func (m *IosManagedAppProtection) SetMinimumWarningSdkVersion(value *string)() { + m.minimumWarningSdkVersion = value +} +// SetMinimumWipeSdkVersion sets the minimumWipeSdkVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *IosManagedAppProtection) SetMinimumWipeSdkVersion(value *string)() { + m.minimumWipeSdkVersion = value +} +// SetProtectInboundDataFromUnknownSources sets the protectInboundDataFromUnknownSources property value. Protect incoming data from unknown source. This setting is only allowed to be True when AllowedInboundDataTransferSources is set to AllApps. +func (m *IosManagedAppProtection) SetProtectInboundDataFromUnknownSources(value *bool)() { + m.protectInboundDataFromUnknownSources = value +} +// SetThirdPartyKeyboardsBlocked sets the thirdPartyKeyboardsBlocked property value. Defines if third party keyboards are allowed while accessing a managed app +func (m *IosManagedAppProtection) SetThirdPartyKeyboardsBlocked(value *bool)() { + m.thirdPartyKeyboardsBlocked = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_response.go new file mode 100644 index 000000000..15eca3e65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppProtectionCollectionResponse +type IosManagedAppProtectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosManagedAppProtectionable +} +// NewIosManagedAppProtectionCollectionResponse instantiates a new IosManagedAppProtectionCollectionResponse and sets the default values. +func NewIosManagedAppProtectionCollectionResponse()(*IosManagedAppProtectionCollectionResponse) { + m := &IosManagedAppProtectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosManagedAppProtectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosManagedAppProtectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosManagedAppProtectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosManagedAppProtectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(IosManagedAppProtectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosManagedAppProtectionCollectionResponse) GetValue()([]IosManagedAppProtectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosManagedAppProtectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosManagedAppProtectionCollectionResponse) SetValue(value []IosManagedAppProtectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_responseable.go new file mode 100644 index 000000000..4c52d9fc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_protection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppProtectionCollectionResponseable +type IosManagedAppProtectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosManagedAppProtectionable) + SetValue(value []IosManagedAppProtectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_protectionable.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_protectionable.go new file mode 100644 index 000000000..22a032bcb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_protectionable.go @@ -0,0 +1,49 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppProtectionable +type IosManagedAppProtectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TargetedManagedAppProtectionable + GetAllowedIosDeviceModels()(*string) + GetAppActionIfIosDeviceModelNotAllowed()(*ManagedAppRemediationAction) + GetAppDataEncryptionType()(*ManagedAppDataEncryptionType) + GetApps()([]ManagedMobileAppable) + GetCustomBrowserProtocol()(*string) + GetCustomDialerAppProtocol()(*string) + GetDeployedAppCount()(*int32) + GetDeploymentSummary()(ManagedAppPolicyDeploymentSummaryable) + GetDisableProtectionOfManagedOutboundOpenInData()(*bool) + GetExemptedAppProtocols()([]KeyValuePairable) + GetExemptedUniversalLinks()([]string) + GetFaceIdBlocked()(*bool) + GetFilterOpenInToOnlyManagedApps()(*bool) + GetManagedUniversalLinks()([]string) + GetMinimumRequiredSdkVersion()(*string) + GetMinimumWarningSdkVersion()(*string) + GetMinimumWipeSdkVersion()(*string) + GetProtectInboundDataFromUnknownSources()(*bool) + GetThirdPartyKeyboardsBlocked()(*bool) + SetAllowedIosDeviceModels(value *string)() + SetAppActionIfIosDeviceModelNotAllowed(value *ManagedAppRemediationAction)() + SetAppDataEncryptionType(value *ManagedAppDataEncryptionType)() + SetApps(value []ManagedMobileAppable)() + SetCustomBrowserProtocol(value *string)() + SetCustomDialerAppProtocol(value *string)() + SetDeployedAppCount(value *int32)() + SetDeploymentSummary(value ManagedAppPolicyDeploymentSummaryable)() + SetDisableProtectionOfManagedOutboundOpenInData(value *bool)() + SetExemptedAppProtocols(value []KeyValuePairable)() + SetExemptedUniversalLinks(value []string)() + SetFaceIdBlocked(value *bool)() + SetFilterOpenInToOnlyManagedApps(value *bool)() + SetManagedUniversalLinks(value []string)() + SetMinimumRequiredSdkVersion(value *string)() + SetMinimumWarningSdkVersion(value *string)() + SetMinimumWipeSdkVersion(value *string)() + SetProtectInboundDataFromUnknownSources(value *bool)() + SetThirdPartyKeyboardsBlocked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_registration.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration.go new file mode 100644 index 000000000..ecbe346b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppRegistration +type IosManagedAppRegistration struct { + ManagedAppRegistration +} +// NewIosManagedAppRegistration instantiates a new IosManagedAppRegistration and sets the default values. +func NewIosManagedAppRegistration()(*IosManagedAppRegistration) { + m := &IosManagedAppRegistration{ + ManagedAppRegistration: *NewManagedAppRegistration(), + } + odataTypeValue := "#microsoft.graph.iosManagedAppRegistration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosManagedAppRegistrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosManagedAppRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosManagedAppRegistration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosManagedAppRegistration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppRegistration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosManagedAppRegistration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppRegistration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_response.go new file mode 100644 index 000000000..055971c67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppRegistrationCollectionResponse +type IosManagedAppRegistrationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosManagedAppRegistrationable +} +// NewIosManagedAppRegistrationCollectionResponse instantiates a new IosManagedAppRegistrationCollectionResponse and sets the default values. +func NewIosManagedAppRegistrationCollectionResponse()(*IosManagedAppRegistrationCollectionResponse) { + m := &IosManagedAppRegistrationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosManagedAppRegistrationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosManagedAppRegistrationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosManagedAppRegistrationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosManagedAppRegistrationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosManagedAppRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosManagedAppRegistrationable, len(val)) + for i, v := range val { + res[i] = v.(IosManagedAppRegistrationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosManagedAppRegistrationCollectionResponse) GetValue()([]IosManagedAppRegistrationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosManagedAppRegistrationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosManagedAppRegistrationCollectionResponse) SetValue(value []IosManagedAppRegistrationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_responseable.go new file mode 100644 index 000000000..9d6566b70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_registration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppRegistrationCollectionResponseable +type IosManagedAppRegistrationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosManagedAppRegistrationable) + SetValue(value []IosManagedAppRegistrationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_managed_app_registrationable.go b/src/internal/connector/graph/betasdk/models/ios_managed_app_registrationable.go new file mode 100644 index 000000000..0b877982d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_managed_app_registrationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosManagedAppRegistrationable +type IosManagedAppRegistrationable interface { + ManagedAppRegistrationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_minimum_operating_system.go b/src/internal/connector/graph/betasdk/models/ios_minimum_operating_system.go new file mode 100644 index 000000000..8f9ee7097 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_minimum_operating_system.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMinimumOperatingSystem contains properties of the minimum operating system required for an iOS mobile app. +type IosMinimumOperatingSystem 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 OdataType property + odataType *string + // When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v10_0 *bool + // When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v11_0 *bool + // When TRUE, only Version 12.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v12_0 *bool + // When TRUE, only Version 13.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v13_0 *bool + // When TRUE, only Version 14.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v14_0 *bool + // When TRUE, only Version 15.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v15_0 *bool + // When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v8_0 *bool + // When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. + v9_0 *bool +} +// NewIosMinimumOperatingSystem instantiates a new iosMinimumOperatingSystem and sets the default values. +func NewIosMinimumOperatingSystem()(*IosMinimumOperatingSystem) { + m := &IosMinimumOperatingSystem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosMinimumOperatingSystemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosMinimumOperatingSystemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosMinimumOperatingSystem(), 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 *IosMinimumOperatingSystem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosMinimumOperatingSystem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["v10_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_0(val) + } + return nil + } + res["v11_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV11_0(val) + } + return nil + } + res["v12_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV12_0(val) + } + return nil + } + res["v13_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV13_0(val) + } + return nil + } + res["v14_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV14_0(val) + } + return nil + } + res["v15_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV15_0(val) + } + return nil + } + res["v8_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV8_0(val) + } + return nil + } + res["v9_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV9_0(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosMinimumOperatingSystem) GetOdataType()(*string) { + return m.odataType +} +// GetV10_0 gets the v10_0 property value. When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV10_0()(*bool) { + return m.v10_0 +} +// GetV11_0 gets the v11_0 property value. When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV11_0()(*bool) { + return m.v11_0 +} +// GetV12_0 gets the v12_0 property value. When TRUE, only Version 12.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV12_0()(*bool) { + return m.v12_0 +} +// GetV13_0 gets the v13_0 property value. When TRUE, only Version 13.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV13_0()(*bool) { + return m.v13_0 +} +// GetV14_0 gets the v14_0 property value. When TRUE, only Version 14.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV14_0()(*bool) { + return m.v14_0 +} +// GetV15_0 gets the v15_0 property value. When TRUE, only Version 15.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV15_0()(*bool) { + return m.v15_0 +} +// GetV8_0 gets the v8_0 property value. When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV8_0()(*bool) { + return m.v8_0 +} +// GetV9_0 gets the v9_0 property value. When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) GetV9_0()(*bool) { + return m.v9_0 +} +// Serialize serializes information the current object +func (m *IosMinimumOperatingSystem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_0", m.GetV10_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v11_0", m.GetV11_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v12_0", m.GetV12_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v13_0", m.GetV13_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v14_0", m.GetV14_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v15_0", m.GetV15_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v8_0", m.GetV8_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v9_0", m.GetV9_0()) + 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 *IosMinimumOperatingSystem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosMinimumOperatingSystem) SetOdataType(value *string)() { + m.odataType = value +} +// SetV10_0 sets the v10_0 property value. When TRUE, only Version 10.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV10_0(value *bool)() { + m.v10_0 = value +} +// SetV11_0 sets the v11_0 property value. When TRUE, only Version 11.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV11_0(value *bool)() { + m.v11_0 = value +} +// SetV12_0 sets the v12_0 property value. When TRUE, only Version 12.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV12_0(value *bool)() { + m.v12_0 = value +} +// SetV13_0 sets the v13_0 property value. When TRUE, only Version 13.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV13_0(value *bool)() { + m.v13_0 = value +} +// SetV14_0 sets the v14_0 property value. When TRUE, only Version 14.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV14_0(value *bool)() { + m.v14_0 = value +} +// SetV15_0 sets the v15_0 property value. When TRUE, only Version 15.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV15_0(value *bool)() { + m.v15_0 = value +} +// SetV8_0 sets the v8_0 property value. When TRUE, only Version 8.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV8_0(value *bool)() { + m.v8_0 = value +} +// SetV9_0 sets the v9_0 property value. When TRUE, only Version 9.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE. +func (m *IosMinimumOperatingSystem) SetV9_0(value *bool)() { + m.v9_0 = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_minimum_operating_systemable.go b/src/internal/connector/graph/betasdk/models/ios_minimum_operating_systemable.go new file mode 100644 index 000000000..b8e86bcaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_minimum_operating_systemable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMinimumOperatingSystemable +type IosMinimumOperatingSystemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetV10_0()(*bool) + GetV11_0()(*bool) + GetV12_0()(*bool) + GetV13_0()(*bool) + GetV14_0()(*bool) + GetV15_0()(*bool) + GetV8_0()(*bool) + GetV9_0()(*bool) + SetOdataType(value *string)() + SetV10_0(value *bool)() + SetV11_0(value *bool)() + SetV12_0(value *bool)() + SetV13_0(value *bool)() + SetV14_0(value *bool)() + SetV15_0(value *bool)() + SetV8_0(value *bool)() + SetV9_0(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration.go new file mode 100644 index 000000000..4bccaef32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppConfiguration +type IosMobileAppConfiguration struct { + ManagedDeviceMobileAppConfiguration + // mdm app configuration Base64 binary. + encodedSettingXml []byte + // app configuration setting items. + settings []AppConfigurationSettingItemable +} +// NewIosMobileAppConfiguration instantiates a new IosMobileAppConfiguration and sets the default values. +func NewIosMobileAppConfiguration()(*IosMobileAppConfiguration) { + m := &IosMobileAppConfiguration{ + ManagedDeviceMobileAppConfiguration: *NewManagedDeviceMobileAppConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosMobileAppConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosMobileAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosMobileAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosMobileAppConfiguration(), nil +} +// GetEncodedSettingXml gets the encodedSettingXml property value. mdm app configuration Base64 binary. +func (m *IosMobileAppConfiguration) GetEncodedSettingXml()([]byte) { + return m.encodedSettingXml +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosMobileAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedDeviceMobileAppConfiguration.GetFieldDeserializers() + res["encodedSettingXml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetEncodedSettingXml(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppConfigurationSettingItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppConfigurationSettingItemable, len(val)) + for i, v := range val { + res[i] = v.(AppConfigurationSettingItemable) + } + m.SetSettings(res) + } + return nil + } + return res +} +// GetSettings gets the settings property value. app configuration setting items. +func (m *IosMobileAppConfiguration) GetSettings()([]AppConfigurationSettingItemable) { + return m.settings +} +// Serialize serializes information the current object +func (m *IosMobileAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedDeviceMobileAppConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("encodedSettingXml", m.GetEncodedSettingXml()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + return nil +} +// SetEncodedSettingXml sets the encodedSettingXml property value. mdm app configuration Base64 binary. +func (m *IosMobileAppConfiguration) SetEncodedSettingXml(value []byte)() { + m.encodedSettingXml = value +} +// SetSettings sets the settings property value. app configuration setting items. +func (m *IosMobileAppConfiguration) SetSettings(value []AppConfigurationSettingItemable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_response.go new file mode 100644 index 000000000..12e2df777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppConfigurationCollectionResponse +type IosMobileAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosMobileAppConfigurationable +} +// NewIosMobileAppConfigurationCollectionResponse instantiates a new IosMobileAppConfigurationCollectionResponse and sets the default values. +func NewIosMobileAppConfigurationCollectionResponse()(*IosMobileAppConfigurationCollectionResponse) { + m := &IosMobileAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosMobileAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosMobileAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosMobileAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosMobileAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosMobileAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosMobileAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosMobileAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosMobileAppConfigurationCollectionResponse) GetValue()([]IosMobileAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosMobileAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosMobileAppConfigurationCollectionResponse) SetValue(value []IosMobileAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_responseable.go new file mode 100644 index 000000000..14d1d06ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppConfigurationCollectionResponseable +type IosMobileAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosMobileAppConfigurationable) + SetValue(value []IosMobileAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configurationable.go new file mode 100644 index 000000000..decfe31cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppConfigurationable +type IosMobileAppConfigurationable interface { + ManagedDeviceMobileAppConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEncodedSettingXml()([]byte) + GetSettings()([]AppConfigurationSettingItemable) + SetEncodedSettingXml(value []byte)() + SetSettings(value []AppConfigurationSettingItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifier.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifier.go new file mode 100644 index 000000000..0ef46d221 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifier.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppIdentifier +type IosMobileAppIdentifier struct { + MobileAppIdentifier + // The identifier for an app, as specified in the app store. + bundleId *string +} +// NewIosMobileAppIdentifier instantiates a new IosMobileAppIdentifier and sets the default values. +func NewIosMobileAppIdentifier()(*IosMobileAppIdentifier) { + m := &IosMobileAppIdentifier{ + MobileAppIdentifier: *NewMobileAppIdentifier(), + } + odataTypeValue := "#microsoft.graph.iosMobileAppIdentifier"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosMobileAppIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosMobileAppIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosMobileAppIdentifier(), nil +} +// GetBundleId gets the bundleId property value. The identifier for an app, as specified in the app store. +func (m *IosMobileAppIdentifier) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosMobileAppIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppIdentifier.GetFieldDeserializers() + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IosMobileAppIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppIdentifier.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + return nil +} +// SetBundleId sets the bundleId property value. The identifier for an app, as specified in the app store. +func (m *IosMobileAppIdentifier) SetBundleId(value *string)() { + m.bundleId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifierable.go b/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifierable.go new file mode 100644 index 000000000..ef2db308f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_mobile_app_identifierable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosMobileAppIdentifierable +type IosMobileAppIdentifierable interface { + MobileAppIdentifierable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + SetBundleId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_network_usage_rule.go b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule.go new file mode 100644 index 000000000..70833251f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNetworkUsageRule network Usage Rules allow enterprises to specify how managed apps use networks, such as cellular data networks. +type IosNetworkUsageRule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If set to true, corresponding managed apps will not be allowed to use cellular data at any time. + cellularDataBlocked *bool + // If set to true, corresponding managed apps will not be allowed to use cellular data when roaming. + cellularDataBlockWhenRoaming *bool + // Information about the managed apps that this rule is going to apply to. This collection can contain a maximum of 500 elements. + managedApps []AppListItemable + // The OdataType property + odataType *string +} +// NewIosNetworkUsageRule instantiates a new iosNetworkUsageRule and sets the default values. +func NewIosNetworkUsageRule()(*IosNetworkUsageRule) { + m := &IosNetworkUsageRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosNetworkUsageRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosNetworkUsageRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosNetworkUsageRule(), 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 *IosNetworkUsageRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCellularDataBlocked gets the cellularDataBlocked property value. If set to true, corresponding managed apps will not be allowed to use cellular data at any time. +func (m *IosNetworkUsageRule) GetCellularDataBlocked()(*bool) { + return m.cellularDataBlocked +} +// GetCellularDataBlockWhenRoaming gets the cellularDataBlockWhenRoaming property value. If set to true, corresponding managed apps will not be allowed to use cellular data when roaming. +func (m *IosNetworkUsageRule) GetCellularDataBlockWhenRoaming()(*bool) { + return m.cellularDataBlockWhenRoaming +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosNetworkUsageRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cellularDataBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularDataBlocked(val) + } + return nil + } + res["cellularDataBlockWhenRoaming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCellularDataBlockWhenRoaming(val) + } + return nil + } + res["managedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetManagedApps(res) + } + 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 + } + return res +} +// GetManagedApps gets the managedApps property value. Information about the managed apps that this rule is going to apply to. This collection can contain a maximum of 500 elements. +func (m *IosNetworkUsageRule) GetManagedApps()([]AppListItemable) { + return m.managedApps +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosNetworkUsageRule) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosNetworkUsageRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("cellularDataBlocked", m.GetCellularDataBlocked()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("cellularDataBlockWhenRoaming", m.GetCellularDataBlockWhenRoaming()) + if err != nil { + return err + } + } + if m.GetManagedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedApps())) + for i, v := range m.GetManagedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("managedApps", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosNetworkUsageRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCellularDataBlocked sets the cellularDataBlocked property value. If set to true, corresponding managed apps will not be allowed to use cellular data at any time. +func (m *IosNetworkUsageRule) SetCellularDataBlocked(value *bool)() { + m.cellularDataBlocked = value +} +// SetCellularDataBlockWhenRoaming sets the cellularDataBlockWhenRoaming property value. If set to true, corresponding managed apps will not be allowed to use cellular data when roaming. +func (m *IosNetworkUsageRule) SetCellularDataBlockWhenRoaming(value *bool)() { + m.cellularDataBlockWhenRoaming = value +} +// SetManagedApps sets the managedApps property value. Information about the managed apps that this rule is going to apply to. This collection can contain a maximum of 500 elements. +func (m *IosNetworkUsageRule) SetManagedApps(value []AppListItemable)() { + m.managedApps = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosNetworkUsageRule) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_response.go new file mode 100644 index 000000000..46a431ebd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNetworkUsageRuleCollectionResponse +type IosNetworkUsageRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosNetworkUsageRuleable +} +// NewIosNetworkUsageRuleCollectionResponse instantiates a new IosNetworkUsageRuleCollectionResponse and sets the default values. +func NewIosNetworkUsageRuleCollectionResponse()(*IosNetworkUsageRuleCollectionResponse) { + m := &IosNetworkUsageRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosNetworkUsageRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosNetworkUsageRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosNetworkUsageRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosNetworkUsageRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosNetworkUsageRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosNetworkUsageRuleable, len(val)) + for i, v := range val { + res[i] = v.(IosNetworkUsageRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosNetworkUsageRuleCollectionResponse) GetValue()([]IosNetworkUsageRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosNetworkUsageRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosNetworkUsageRuleCollectionResponse) SetValue(value []IosNetworkUsageRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_responseable.go new file mode 100644 index 000000000..c09efb3c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_network_usage_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNetworkUsageRuleCollectionResponseable +type IosNetworkUsageRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosNetworkUsageRuleable) + SetValue(value []IosNetworkUsageRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_network_usage_ruleable.go b/src/internal/connector/graph/betasdk/models/ios_network_usage_ruleable.go new file mode 100644 index 000000000..5290f3b04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_network_usage_ruleable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNetworkUsageRuleable +type IosNetworkUsageRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCellularDataBlocked()(*bool) + GetCellularDataBlockWhenRoaming()(*bool) + GetManagedApps()([]AppListItemable) + GetOdataType()(*string) + SetCellularDataBlocked(value *bool)() + SetCellularDataBlockWhenRoaming(value *bool)() + SetManagedApps(value []AppListItemable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_notification_alert_type.go b/src/internal/connector/graph/betasdk/models/ios_notification_alert_type.go new file mode 100644 index 000000000..bf2eec411 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_alert_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosNotificationAlertType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE IosNotificationAlertType = iota + // Banner. + BANNER_IOSNOTIFICATIONALERTTYPE + // Modal. + MODAL_IOSNOTIFICATIONALERTTYPE + // None. + NONE_IOSNOTIFICATIONALERTTYPE +) + +func (i IosNotificationAlertType) String() string { + return []string{"deviceDefault", "banner", "modal", "none"}[i] +} +func ParseIosNotificationAlertType(v string) (interface{}, error) { + result := DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_IOSNOTIFICATIONALERTTYPE + case "banner": + result = BANNER_IOSNOTIFICATIONALERTTYPE + case "modal": + result = MODAL_IOSNOTIFICATIONALERTTYPE + case "none": + result = NONE_IOSNOTIFICATIONALERTTYPE + default: + return 0, errors.New("Unknown IosNotificationAlertType value: " + v) + } + return &result, nil +} +func SerializeIosNotificationAlertType(values []IosNotificationAlertType) []string { + 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/ios_notification_preview_visibility.go b/src/internal/connector/graph/betasdk/models/ios_notification_preview_visibility.go new file mode 100644 index 000000000..0e32fcd11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_preview_visibility.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosNotificationPreviewVisibility int + +const ( + // Notification preview settings will not be overwritten. + NOTCONFIGURED_IOSNOTIFICATIONPREVIEWVISIBILITY IosNotificationPreviewVisibility = iota + // Always show notification previews. + ALWAYSSHOW_IOSNOTIFICATIONPREVIEWVISIBILITY + // Only show notification previews when the device is unlocked. + HIDEWHENLOCKED_IOSNOTIFICATIONPREVIEWVISIBILITY + // Never show notification previews. + NEVERSHOW_IOSNOTIFICATIONPREVIEWVISIBILITY +) + +func (i IosNotificationPreviewVisibility) String() string { + return []string{"notConfigured", "alwaysShow", "hideWhenLocked", "neverShow"}[i] +} +func ParseIosNotificationPreviewVisibility(v string) (interface{}, error) { + result := NOTCONFIGURED_IOSNOTIFICATIONPREVIEWVISIBILITY + switch v { + case "notConfigured": + result = NOTCONFIGURED_IOSNOTIFICATIONPREVIEWVISIBILITY + case "alwaysShow": + result = ALWAYSSHOW_IOSNOTIFICATIONPREVIEWVISIBILITY + case "hideWhenLocked": + result = HIDEWHENLOCKED_IOSNOTIFICATIONPREVIEWVISIBILITY + case "neverShow": + result = NEVERSHOW_IOSNOTIFICATIONPREVIEWVISIBILITY + default: + return 0, errors.New("Unknown IosNotificationPreviewVisibility value: " + v) + } + return &result, nil +} +func SerializeIosNotificationPreviewVisibility(values []IosNotificationPreviewVisibility) []string { + 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/ios_notification_settings.go b/src/internal/connector/graph/betasdk/models/ios_notification_settings.go new file mode 100644 index 000000000..b4f6757dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_settings.go @@ -0,0 +1,333 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNotificationSettings an item describing notification setting. +type IosNotificationSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Notification Settings Alert Type. + alertType *IosNotificationAlertType + // Application name to be associated with the bundleID. + appName *string + // Indicates whether badges are allowed for this app. + badgesEnabled *bool + // Bundle id of app to which to apply these notification settings. + bundleID *string + // Indicates whether notifications are allowed for this app. + enabled *bool + // The OdataType property + odataType *string + // Determines when notification previews are visible on an iOS device. Previews can include things like text (from Messages and Mail) and invitation details (from Calendar). When configured, it will override the user's defined preview settings. + previewVisibility *IosNotificationPreviewVisibility + // Publisher to be associated with the bundleID. + publisher *string + // Indicates whether notifications can be shown in notification center. + showInNotificationCenter *bool + // Indicates whether notifications can be shown on the lock screen. + showOnLockScreen *bool + // Indicates whether sounds are allowed for this app. + soundsEnabled *bool +} +// NewIosNotificationSettings instantiates a new iosNotificationSettings and sets the default values. +func NewIosNotificationSettings()(*IosNotificationSettings) { + m := &IosNotificationSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosNotificationSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosNotificationSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosNotificationSettings(), 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 *IosNotificationSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlertType gets the alertType property value. Notification Settings Alert Type. +func (m *IosNotificationSettings) GetAlertType()(*IosNotificationAlertType) { + return m.alertType +} +// GetAppName gets the appName property value. Application name to be associated with the bundleID. +func (m *IosNotificationSettings) GetAppName()(*string) { + return m.appName +} +// GetBadgesEnabled gets the badgesEnabled property value. Indicates whether badges are allowed for this app. +func (m *IosNotificationSettings) GetBadgesEnabled()(*bool) { + return m.badgesEnabled +} +// GetBundleID gets the bundleID property value. Bundle id of app to which to apply these notification settings. +func (m *IosNotificationSettings) GetBundleID()(*string) { + return m.bundleID +} +// GetEnabled gets the enabled property value. Indicates whether notifications are allowed for this app. +func (m *IosNotificationSettings) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosNotificationSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alertType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosNotificationAlertType) + if err != nil { + return err + } + if val != nil { + m.SetAlertType(val.(*IosNotificationAlertType)) + } + return nil + } + res["appName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppName(val) + } + return nil + } + res["badgesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBadgesEnabled(val) + } + return nil + } + res["bundleID"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleID(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(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["previewVisibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosNotificationPreviewVisibility) + if err != nil { + return err + } + if val != nil { + m.SetPreviewVisibility(val.(*IosNotificationPreviewVisibility)) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["showInNotificationCenter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowInNotificationCenter(val) + } + return nil + } + res["showOnLockScreen"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShowOnLockScreen(val) + } + return nil + } + res["soundsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSoundsEnabled(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosNotificationSettings) GetOdataType()(*string) { + return m.odataType +} +// GetPreviewVisibility gets the previewVisibility property value. Determines when notification previews are visible on an iOS device. Previews can include things like text (from Messages and Mail) and invitation details (from Calendar). When configured, it will override the user's defined preview settings. +func (m *IosNotificationSettings) GetPreviewVisibility()(*IosNotificationPreviewVisibility) { + return m.previewVisibility +} +// GetPublisher gets the publisher property value. Publisher to be associated with the bundleID. +func (m *IosNotificationSettings) GetPublisher()(*string) { + return m.publisher +} +// GetShowInNotificationCenter gets the showInNotificationCenter property value. Indicates whether notifications can be shown in notification center. +func (m *IosNotificationSettings) GetShowInNotificationCenter()(*bool) { + return m.showInNotificationCenter +} +// GetShowOnLockScreen gets the showOnLockScreen property value. Indicates whether notifications can be shown on the lock screen. +func (m *IosNotificationSettings) GetShowOnLockScreen()(*bool) { + return m.showOnLockScreen +} +// GetSoundsEnabled gets the soundsEnabled property value. Indicates whether sounds are allowed for this app. +func (m *IosNotificationSettings) GetSoundsEnabled()(*bool) { + return m.soundsEnabled +} +// Serialize serializes information the current object +func (m *IosNotificationSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAlertType() != nil { + cast := (*m.GetAlertType()).String() + err := writer.WriteStringValue("alertType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("appName", m.GetAppName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("badgesEnabled", m.GetBadgesEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bundleID", m.GetBundleID()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPreviewVisibility() != nil { + cast := (*m.GetPreviewVisibility()).String() + err := writer.WriteStringValue("previewVisibility", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showInNotificationCenter", m.GetShowInNotificationCenter()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("showOnLockScreen", m.GetShowOnLockScreen()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("soundsEnabled", m.GetSoundsEnabled()) + 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 *IosNotificationSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlertType sets the alertType property value. Notification Settings Alert Type. +func (m *IosNotificationSettings) SetAlertType(value *IosNotificationAlertType)() { + m.alertType = value +} +// SetAppName sets the appName property value. Application name to be associated with the bundleID. +func (m *IosNotificationSettings) SetAppName(value *string)() { + m.appName = value +} +// SetBadgesEnabled sets the badgesEnabled property value. Indicates whether badges are allowed for this app. +func (m *IosNotificationSettings) SetBadgesEnabled(value *bool)() { + m.badgesEnabled = value +} +// SetBundleID sets the bundleID property value. Bundle id of app to which to apply these notification settings. +func (m *IosNotificationSettings) SetBundleID(value *string)() { + m.bundleID = value +} +// SetEnabled sets the enabled property value. Indicates whether notifications are allowed for this app. +func (m *IosNotificationSettings) SetEnabled(value *bool)() { + m.enabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosNotificationSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetPreviewVisibility sets the previewVisibility property value. Determines when notification previews are visible on an iOS device. Previews can include things like text (from Messages and Mail) and invitation details (from Calendar). When configured, it will override the user's defined preview settings. +func (m *IosNotificationSettings) SetPreviewVisibility(value *IosNotificationPreviewVisibility)() { + m.previewVisibility = value +} +// SetPublisher sets the publisher property value. Publisher to be associated with the bundleID. +func (m *IosNotificationSettings) SetPublisher(value *string)() { + m.publisher = value +} +// SetShowInNotificationCenter sets the showInNotificationCenter property value. Indicates whether notifications can be shown in notification center. +func (m *IosNotificationSettings) SetShowInNotificationCenter(value *bool)() { + m.showInNotificationCenter = value +} +// SetShowOnLockScreen sets the showOnLockScreen property value. Indicates whether notifications can be shown on the lock screen. +func (m *IosNotificationSettings) SetShowOnLockScreen(value *bool)() { + m.showOnLockScreen = value +} +// SetSoundsEnabled sets the soundsEnabled property value. Indicates whether sounds are allowed for this app. +func (m *IosNotificationSettings) SetSoundsEnabled(value *bool)() { + m.soundsEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_response.go new file mode 100644 index 000000000..af015f86e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNotificationSettingsCollectionResponse +type IosNotificationSettingsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosNotificationSettingsable +} +// NewIosNotificationSettingsCollectionResponse instantiates a new IosNotificationSettingsCollectionResponse and sets the default values. +func NewIosNotificationSettingsCollectionResponse()(*IosNotificationSettingsCollectionResponse) { + m := &IosNotificationSettingsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosNotificationSettingsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosNotificationSettingsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosNotificationSettingsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosNotificationSettingsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosNotificationSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosNotificationSettingsable, len(val)) + for i, v := range val { + res[i] = v.(IosNotificationSettingsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosNotificationSettingsCollectionResponse) GetValue()([]IosNotificationSettingsable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosNotificationSettingsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosNotificationSettingsCollectionResponse) SetValue(value []IosNotificationSettingsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_responseable.go new file mode 100644 index 000000000..63bf54e1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_settings_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNotificationSettingsCollectionResponseable +type IosNotificationSettingsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosNotificationSettingsable) + SetValue(value []IosNotificationSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_notification_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_notification_settingsable.go new file mode 100644 index 000000000..5e8f8f294 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_notification_settingsable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosNotificationSettingsable +type IosNotificationSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertType()(*IosNotificationAlertType) + GetAppName()(*string) + GetBadgesEnabled()(*bool) + GetBundleID()(*string) + GetEnabled()(*bool) + GetOdataType()(*string) + GetPreviewVisibility()(*IosNotificationPreviewVisibility) + GetPublisher()(*string) + GetShowInNotificationCenter()(*bool) + GetShowOnLockScreen()(*bool) + GetSoundsEnabled()(*bool) + SetAlertType(value *IosNotificationAlertType)() + SetAppName(value *string)() + SetBadgesEnabled(value *bool)() + SetBundleID(value *string)() + SetEnabled(value *bool)() + SetOdataType(value *string)() + SetPreviewVisibility(value *IosNotificationPreviewVisibility)() + SetPublisher(value *string)() + SetShowInNotificationCenter(value *bool)() + SetShowOnLockScreen(value *bool)() + SetSoundsEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile.go new file mode 100644 index 000000000..3fb2760b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosPkcsCertificateProfile +type IosPkcsCertificateProfile struct { + IosCertificateProfileBase + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // PKCS Certificate Template Name. + certificateTemplateName *string + // PKCS Certification Authority. + certificationAuthority *string + // PKCS Certification Authority Name. + certificationAuthorityName *string + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewIosPkcsCertificateProfile instantiates a new IosPkcsCertificateProfile and sets the default values. +func NewIosPkcsCertificateProfile()(*IosPkcsCertificateProfile) { + m := &IosPkcsCertificateProfile{ + IosCertificateProfileBase: *NewIosCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.iosPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosPkcsCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *IosPkcsCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS Certificate Template Name. +func (m *IosPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS Certification Authority. +func (m *IosPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS Certification Authority Name. +func (m *IosPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *IosPkcsCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *IosPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *IosPkcsCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *IosPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *IosPkcsCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS Certificate Template Name. +func (m *IosPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS Certification Authority. +func (m *IosPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS Certification Authority Name. +func (m *IosPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *IosPkcsCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *IosPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *IosPkcsCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..417606cde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosPkcsCertificateProfileCollectionResponse +type IosPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosPkcsCertificateProfileable +} +// NewIosPkcsCertificateProfileCollectionResponse instantiates a new IosPkcsCertificateProfileCollectionResponse and sets the default values. +func NewIosPkcsCertificateProfileCollectionResponse()(*IosPkcsCertificateProfileCollectionResponse) { + m := &IosPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(IosPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosPkcsCertificateProfileCollectionResponse) GetValue()([]IosPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosPkcsCertificateProfileCollectionResponse) SetValue(value []IosPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..db3331503 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosPkcsCertificateProfileCollectionResponseable +type IosPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosPkcsCertificateProfileable) + SetValue(value []IosPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profileable.go new file mode 100644 index 000000000..43e532551 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_pkcs_certificate_profileable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosPkcsCertificateProfileable +type IosPkcsCertificateProfileable interface { + IosCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extension.go new file mode 100644 index 000000000..190a99723 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extension.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosRedirectSingleSignOnExtension +type IosRedirectSingleSignOnExtension struct { + IosSingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string + // One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. + urlPrefixes []string +} +// NewIosRedirectSingleSignOnExtension instantiates a new IosRedirectSingleSignOnExtension and sets the default values. +func NewIosRedirectSingleSignOnExtension()(*IosRedirectSingleSignOnExtension) { + m := &IosRedirectSingleSignOnExtension{ + IosSingleSignOnExtension: *NewIosSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.iosRedirectSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosRedirectSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosRedirectSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosRedirectSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosRedirectSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *IosRedirectSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosRedirectSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosSingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + res["urlPrefixes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUrlPrefixes(res) + } + return nil + } + return res +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *IosRedirectSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// GetUrlPrefixes gets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *IosRedirectSingleSignOnExtension) GetUrlPrefixes()([]string) { + return m.urlPrefixes +} +// Serialize serializes information the current object +func (m *IosRedirectSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + if m.GetUrlPrefixes() != nil { + err = writer.WriteCollectionOfStringValues("urlPrefixes", m.GetUrlPrefixes()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *IosRedirectSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *IosRedirectSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *IosRedirectSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} +// SetUrlPrefixes sets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *IosRedirectSingleSignOnExtension) SetUrlPrefixes(value []string)() { + m.urlPrefixes = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extensionable.go new file mode 100644 index 000000000..57a1706fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_redirect_single_sign_on_extensionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosRedirectSingleSignOnExtensionable +type IosRedirectSingleSignOnExtensionable interface { + IosSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurations()([]KeyTypedValuePairable) + GetExtensionIdentifier()(*string) + GetTeamIdentifier()(*string) + GetUrlPrefixes()([]string) + SetConfigurations(value []KeyTypedValuePairable)() + SetExtensionIdentifier(value *string)() + SetTeamIdentifier(value *string)() + SetUrlPrefixes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile.go new file mode 100644 index 000000000..d428b373b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile.go @@ -0,0 +1,327 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosScepCertificateProfile +type IosScepCertificateProfile struct { + IosCertificateProfileBase + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. The OnPremisesUserPrincipalName variable is support as well as others documented here: https://go.microsoft.com/fwlink/?LinkId=2027630. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Trusted Root Certificate. + rootCertificate IosTrustedRootCertificateable + // SCEP Server Url(s). + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewIosScepCertificateProfile instantiates a new IosScepCertificateProfile and sets the default values. +func NewIosScepCertificateProfile()(*IosScepCertificateProfile) { + m := &IosScepCertificateProfile{ + IosCertificateProfileBase: *NewIosCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.iosScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosScepCertificateProfile(), nil +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *IosScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. The OnPremisesUserPrincipalName variable is support as well as others documented here: https://go.microsoft.com/fwlink/?LinkId=2027630. This collection can contain a maximum of 500 elements. +func (m *IosScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *IosScepCertificateProfile) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosCertificateProfileBase.GetFieldDeserializers() + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(IosTrustedRootCertificateable)) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *IosScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *IosScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *IosScepCertificateProfile) GetRootCertificate()(IosTrustedRootCertificateable) { + return m.rootCertificate +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s). +func (m *IosScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *IosScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *IosScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *IosScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *IosScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. The OnPremisesUserPrincipalName variable is support as well as others documented here: https://go.microsoft.com/fwlink/?LinkId=2027630. This collection can contain a maximum of 500 elements. +func (m *IosScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *IosScepCertificateProfile) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *IosScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *IosScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *IosScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *IosScepCertificateProfile) SetRootCertificate(value IosTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s). +func (m *IosScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *IosScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *IosScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..a3be7d0cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosScepCertificateProfileCollectionResponse +type IosScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosScepCertificateProfileable +} +// NewIosScepCertificateProfileCollectionResponse instantiates a new IosScepCertificateProfileCollectionResponse and sets the default values. +func NewIosScepCertificateProfileCollectionResponse()(*IosScepCertificateProfileCollectionResponse) { + m := &IosScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(IosScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosScepCertificateProfileCollectionResponse) GetValue()([]IosScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosScepCertificateProfileCollectionResponse) SetValue(value []IosScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..ce71e7a30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosScepCertificateProfileCollectionResponseable +type IosScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosScepCertificateProfileable) + SetValue(value []IosScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profileable.go new file mode 100644 index 000000000..464d88993 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_scep_certificate_profileable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosScepCertificateProfileable +type IosScepCertificateProfileable interface { + IosCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetRootCertificate()(IosTrustedRootCertificateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetRootCertificate(value IosTrustedRootCertificateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extension.go new file mode 100644 index 000000000..bba639932 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extension.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosSingleSignOnExtension +type IosSingleSignOnExtension struct { + SingleSignOnExtension +} +// NewIosSingleSignOnExtension instantiates a new IosSingleSignOnExtension and sets the default values. +func NewIosSingleSignOnExtension()(*IosSingleSignOnExtension) { + m := &IosSingleSignOnExtension{ + SingleSignOnExtension: *NewSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.iosSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosAzureAdSingleSignOnExtension": + return NewIosAzureAdSingleSignOnExtension(), nil + case "#microsoft.graph.iosCredentialSingleSignOnExtension": + return NewIosCredentialSingleSignOnExtension(), nil + case "#microsoft.graph.iosKerberosSingleSignOnExtension": + return NewIosKerberosSingleSignOnExtension(), nil + case "#microsoft.graph.iosRedirectSingleSignOnExtension": + return NewIosRedirectSingleSignOnExtension(), nil + } + } + } + } + return NewIosSingleSignOnExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SingleSignOnExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extensionable.go new file mode 100644 index 000000000..5fdd8f0e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_extensionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosSingleSignOnExtensionable +type IosSingleSignOnExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SingleSignOnExtensionable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settings.go b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settings.go new file mode 100644 index 000000000..6d7be862d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settings.go @@ -0,0 +1,213 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosSingleSignOnSettings iOS Kerberos authentication settings for single sign-on +type IosSingleSignOnSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // List of app identifiers that are allowed to use this login. If this field is omitted, the login applies to all applications on the device. This collection can contain a maximum of 500 elements. + allowedAppsList []AppListItemable + // List of HTTP URLs that must be matched in order to use this login. With iOS 9.0 or later, a wildcard characters may be used. + allowedUrls []string + // The display name of login settings shown on the receiving device. + displayName *string + // A Kerberos principal name. If not provided, the user is prompted for one during profile installation. + kerberosPrincipalName *string + // A Kerberos realm name. Case sensitive. + kerberosRealm *string + // The OdataType property + odataType *string +} +// NewIosSingleSignOnSettings instantiates a new iosSingleSignOnSettings and sets the default values. +func NewIosSingleSignOnSettings()(*IosSingleSignOnSettings) { + m := &IosSingleSignOnSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosSingleSignOnSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosSingleSignOnSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosSingleSignOnSettings(), 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 *IosSingleSignOnSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedAppsList gets the allowedAppsList property value. List of app identifiers that are allowed to use this login. If this field is omitted, the login applies to all applications on the device. This collection can contain a maximum of 500 elements. +func (m *IosSingleSignOnSettings) GetAllowedAppsList()([]AppListItemable) { + return m.allowedAppsList +} +// GetAllowedUrls gets the allowedUrls property value. List of HTTP URLs that must be matched in order to use this login. With iOS 9.0 or later, a wildcard characters may be used. +func (m *IosSingleSignOnSettings) GetAllowedUrls()([]string) { + return m.allowedUrls +} +// GetDisplayName gets the displayName property value. The display name of login settings shown on the receiving device. +func (m *IosSingleSignOnSettings) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosSingleSignOnSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedAppsList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetAllowedAppsList(res) + } + return nil + } + res["allowedUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedUrls(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["kerberosPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKerberosPrincipalName(val) + } + return nil + } + res["kerberosRealm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKerberosRealm(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 + } + return res +} +// GetKerberosPrincipalName gets the kerberosPrincipalName property value. A Kerberos principal name. If not provided, the user is prompted for one during profile installation. +func (m *IosSingleSignOnSettings) GetKerberosPrincipalName()(*string) { + return m.kerberosPrincipalName +} +// GetKerberosRealm gets the kerberosRealm property value. A Kerberos realm name. Case sensitive. +func (m *IosSingleSignOnSettings) GetKerberosRealm()(*string) { + return m.kerberosRealm +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosSingleSignOnSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosSingleSignOnSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedAppsList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedAppsList())) + for i, v := range m.GetAllowedAppsList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("allowedAppsList", cast) + if err != nil { + return err + } + } + if m.GetAllowedUrls() != nil { + err := writer.WriteCollectionOfStringValues("allowedUrls", m.GetAllowedUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("kerberosPrincipalName", m.GetKerberosPrincipalName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("kerberosRealm", m.GetKerberosRealm()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosSingleSignOnSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedAppsList sets the allowedAppsList property value. List of app identifiers that are allowed to use this login. If this field is omitted, the login applies to all applications on the device. This collection can contain a maximum of 500 elements. +func (m *IosSingleSignOnSettings) SetAllowedAppsList(value []AppListItemable)() { + m.allowedAppsList = value +} +// SetAllowedUrls sets the allowedUrls property value. List of HTTP URLs that must be matched in order to use this login. With iOS 9.0 or later, a wildcard characters may be used. +func (m *IosSingleSignOnSettings) SetAllowedUrls(value []string)() { + m.allowedUrls = value +} +// SetDisplayName sets the displayName property value. The display name of login settings shown on the receiving device. +func (m *IosSingleSignOnSettings) SetDisplayName(value *string)() { + m.displayName = value +} +// SetKerberosPrincipalName sets the kerberosPrincipalName property value. A Kerberos principal name. If not provided, the user is prompted for one during profile installation. +func (m *IosSingleSignOnSettings) SetKerberosPrincipalName(value *string)() { + m.kerberosPrincipalName = value +} +// SetKerberosRealm sets the kerberosRealm property value. A Kerberos realm name. Case sensitive. +func (m *IosSingleSignOnSettings) SetKerberosRealm(value *string)() { + m.kerberosRealm = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosSingleSignOnSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settingsable.go new file mode 100644 index 000000000..fb361bf6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_single_sign_on_settingsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosSingleSignOnSettingsable +type IosSingleSignOnSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAppsList()([]AppListItemable) + GetAllowedUrls()([]string) + GetDisplayName()(*string) + GetKerberosPrincipalName()(*string) + GetKerberosRealm()(*string) + GetOdataType()(*string) + SetAllowedAppsList(value []AppListItemable)() + SetAllowedUrls(value []string)() + SetDisplayName(value *string)() + SetKerberosPrincipalName(value *string)() + SetKerberosRealm(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_software_update_schedule_type.go b/src/internal/connector/graph/betasdk/models/ios_software_update_schedule_type.go new file mode 100644 index 000000000..045baf290 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_software_update_schedule_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosSoftwareUpdateScheduleType int + +const ( + // Update outside of active hours. + UPDATEOUTSIDEOFACTIVEHOURS_IOSSOFTWAREUPDATESCHEDULETYPE IosSoftwareUpdateScheduleType = iota + // Always update. + ALWAYSUPDATE_IOSSOFTWAREUPDATESCHEDULETYPE + // Update during time windows. + UPDATEDURINGTIMEWINDOWS_IOSSOFTWAREUPDATESCHEDULETYPE + // Update outside of time windows. + UPDATEOUTSIDEOFTIMEWINDOWS_IOSSOFTWAREUPDATESCHEDULETYPE +) + +func (i IosSoftwareUpdateScheduleType) String() string { + return []string{"updateOutsideOfActiveHours", "alwaysUpdate", "updateDuringTimeWindows", "updateOutsideOfTimeWindows"}[i] +} +func ParseIosSoftwareUpdateScheduleType(v string) (interface{}, error) { + result := UPDATEOUTSIDEOFACTIVEHOURS_IOSSOFTWAREUPDATESCHEDULETYPE + switch v { + case "updateOutsideOfActiveHours": + result = UPDATEOUTSIDEOFACTIVEHOURS_IOSSOFTWAREUPDATESCHEDULETYPE + case "alwaysUpdate": + result = ALWAYSUPDATE_IOSSOFTWAREUPDATESCHEDULETYPE + case "updateDuringTimeWindows": + result = UPDATEDURINGTIMEWINDOWS_IOSSOFTWAREUPDATESCHEDULETYPE + case "updateOutsideOfTimeWindows": + result = UPDATEOUTSIDEOFTIMEWINDOWS_IOSSOFTWAREUPDATESCHEDULETYPE + default: + return 0, errors.New("Unknown IosSoftwareUpdateScheduleType value: " + v) + } + return &result, nil +} +func SerializeIosSoftwareUpdateScheduleType(values []IosSoftwareUpdateScheduleType) []string { + 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/ios_store_app.go b/src/internal/connector/graph/betasdk/models/ios_store_app.go new file mode 100644 index 000000000..32e6d4b47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_app.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreApp +type IosStoreApp struct { + MobileApp + // Contains properties of the possible iOS device types the mobile app can run on. + applicableDeviceType IosDeviceTypeable + // The Apple App Store URL + appStoreUrl *string + // The Identity Name. + bundleId *string + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem IosMinimumOperatingSystemable +} +// NewIosStoreApp instantiates a new IosStoreApp and sets the default values. +func NewIosStoreApp()(*IosStoreApp) { + m := &IosStoreApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.iosStoreApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosStoreAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosStoreAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosStoreApp(), nil +} +// GetApplicableDeviceType gets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *IosStoreApp) GetApplicableDeviceType()(IosDeviceTypeable) { + return m.applicableDeviceType +} +// GetAppStoreUrl gets the appStoreUrl property value. The Apple App Store URL +func (m *IosStoreApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetBundleId gets the bundleId property value. The Identity Name. +func (m *IosStoreApp) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosStoreApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["applicableDeviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicableDeviceType(val.(IosDeviceTypeable)) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(IosMinimumOperatingSystemable)) + } + return nil + } + return res +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *IosStoreApp) GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// Serialize serializes information the current object +func (m *IosStoreApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicableDeviceType", m.GetApplicableDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableDeviceType sets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *IosStoreApp) SetApplicableDeviceType(value IosDeviceTypeable)() { + m.applicableDeviceType = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Apple App Store URL +func (m *IosStoreApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetBundleId sets the bundleId property value. The Identity Name. +func (m *IosStoreApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *IosStoreApp) SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settings.go new file mode 100644 index 000000000..f19c1784a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settings.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreAppAssignmentSettings +type IosStoreAppAssignmentSettings struct { + MobileAppAssignmentSettings + // Whether or not the app can be removed by the user. + isRemovable *bool + // Whether or not to uninstall the app when device is removed from Intune. + uninstallOnDeviceRemoval *bool + // The VPN Configuration Id to apply for this app. + vpnConfigurationId *string +} +// NewIosStoreAppAssignmentSettings instantiates a new IosStoreAppAssignmentSettings and sets the default values. +func NewIosStoreAppAssignmentSettings()(*IosStoreAppAssignmentSettings) { + m := &IosStoreAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.iosStoreAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosStoreAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosStoreAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosStoreAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosStoreAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["isRemovable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemovable(val) + } + return nil + } + res["uninstallOnDeviceRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUninstallOnDeviceRemoval(val) + } + return nil + } + res["vpnConfigurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnConfigurationId(val) + } + return nil + } + return res +} +// GetIsRemovable gets the isRemovable property value. Whether or not the app can be removed by the user. +func (m *IosStoreAppAssignmentSettings) GetIsRemovable()(*bool) { + return m.isRemovable +} +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosStoreAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { + return m.uninstallOnDeviceRemoval +} +// GetVpnConfigurationId gets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosStoreAppAssignmentSettings) GetVpnConfigurationId()(*string) { + return m.vpnConfigurationId +} +// Serialize serializes information the current object +func (m *IosStoreAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isRemovable", m.GetIsRemovable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("uninstallOnDeviceRemoval", m.GetUninstallOnDeviceRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnConfigurationId", m.GetVpnConfigurationId()) + if err != nil { + return err + } + } + return nil +} +// SetIsRemovable sets the isRemovable property value. Whether or not the app can be removed by the user. +func (m *IosStoreAppAssignmentSettings) SetIsRemovable(value *bool)() { + m.isRemovable = value +} +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosStoreAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { + m.uninstallOnDeviceRemoval = value +} +// SetVpnConfigurationId sets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosStoreAppAssignmentSettings) SetVpnConfigurationId(value *string)() { + m.vpnConfigurationId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settingsable.go new file mode 100644 index 000000000..b293005d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_app_assignment_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreAppAssignmentSettingsable +type IosStoreAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRemovable()(*bool) + GetUninstallOnDeviceRemoval()(*bool) + GetVpnConfigurationId()(*string) + SetIsRemovable(value *bool)() + SetUninstallOnDeviceRemoval(value *bool)() + SetVpnConfigurationId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_store_app_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_store_app_collection_response.go new file mode 100644 index 000000000..3c07e6b7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreAppCollectionResponse +type IosStoreAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosStoreAppable +} +// NewIosStoreAppCollectionResponse instantiates a new IosStoreAppCollectionResponse and sets the default values. +func NewIosStoreAppCollectionResponse()(*IosStoreAppCollectionResponse) { + m := &IosStoreAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosStoreAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosStoreAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosStoreAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosStoreAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosStoreAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosStoreAppable, len(val)) + for i, v := range val { + res[i] = v.(IosStoreAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosStoreAppCollectionResponse) GetValue()([]IosStoreAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosStoreAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosStoreAppCollectionResponse) SetValue(value []IosStoreAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_store_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_store_app_collection_responseable.go new file mode 100644 index 000000000..474761c3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreAppCollectionResponseable +type IosStoreAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosStoreAppable) + SetValue(value []IosStoreAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_store_appable.go b/src/internal/connector/graph/betasdk/models/ios_store_appable.go new file mode 100644 index 000000000..47f595d69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_store_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosStoreAppable +type IosStoreAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableDeviceType()(IosDeviceTypeable) + GetAppStoreUrl()(*string) + GetBundleId()(*string) + GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) + SetApplicableDeviceType(value IosDeviceTypeable)() + SetAppStoreUrl(value *string)() + SetBundleId(value *string)() + SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate.go new file mode 100644 index 000000000..a3d976121 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosTrustedRootCertificate +type IosTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate. + trustedRootCertificate []byte +} +// NewIosTrustedRootCertificate instantiates a new iosTrustedRootCertificate and sets the default values. +func NewIosTrustedRootCertificate()(*IosTrustedRootCertificate) { + m := &IosTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *IosTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *IosTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *IosTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *IosTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *IosTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..073301679 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosTrustedRootCertificateCollectionResponse +type IosTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosTrustedRootCertificateable +} +// NewIosTrustedRootCertificateCollectionResponse instantiates a new IosTrustedRootCertificateCollectionResponse and sets the default values. +func NewIosTrustedRootCertificateCollectionResponse()(*IosTrustedRootCertificateCollectionResponse) { + m := &IosTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(IosTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosTrustedRootCertificateCollectionResponse) GetValue()([]IosTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosTrustedRootCertificateCollectionResponse) SetValue(value []IosTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..282f6b457 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosTrustedRootCertificateCollectionResponseable +type IosTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosTrustedRootCertificateable) + SetValue(value []IosTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificateable.go new file mode 100644 index 000000000..188fe38f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosTrustedRootCertificateable +type IosTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_configuration.go b/src/internal/connector/graph/betasdk/models/ios_update_configuration.go new file mode 100644 index 000000000..213ff430f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_configuration.go @@ -0,0 +1,283 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateConfiguration +type IosUpdateConfiguration struct { + DeviceConfiguration + // Active Hours End (active hours mean the time window when updates install should not happen) + activeHoursEnd *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // Active Hours Start (active hours mean the time window when updates install should not happen) + activeHoursStart *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // If update schedule type is set to use time window scheduling, custom time windows when updates will be scheduled. This collection can contain a maximum of 20 elements. + customUpdateTimeWindows []CustomUpdateTimeWindowable + // If left unspecified, devices will update to the latest version of the OS. + desiredOsVersion *string + // Days before software updates are visible to iOS devices ranging from 0 to 90 inclusive + enforcedSoftwareUpdateDelayInDays *int32 + // Is setting enabled in UI + isEnabled *bool + // Days in week for which active hours are configured. This collection can contain a maximum of 7 elements. + scheduledInstallDays []DayOfWeek + // Update schedule type for iOS software updates. + updateScheduleType *IosSoftwareUpdateScheduleType + // UTC Time Offset indicated in minutes + utcTimeOffsetInMinutes *int32 +} +// NewIosUpdateConfiguration instantiates a new IosUpdateConfiguration and sets the default values. +func NewIosUpdateConfiguration()(*IosUpdateConfiguration) { + m := &IosUpdateConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosUpdateConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosUpdateConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosUpdateConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosUpdateConfiguration(), nil +} +// GetActiveHoursEnd gets the activeHoursEnd property value. Active Hours End (active hours mean the time window when updates install should not happen) +func (m *IosUpdateConfiguration) GetActiveHoursEnd()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.activeHoursEnd +} +// GetActiveHoursStart gets the activeHoursStart property value. Active Hours Start (active hours mean the time window when updates install should not happen) +func (m *IosUpdateConfiguration) GetActiveHoursStart()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.activeHoursStart +} +// GetCustomUpdateTimeWindows gets the customUpdateTimeWindows property value. If update schedule type is set to use time window scheduling, custom time windows when updates will be scheduled. This collection can contain a maximum of 20 elements. +func (m *IosUpdateConfiguration) GetCustomUpdateTimeWindows()([]CustomUpdateTimeWindowable) { + return m.customUpdateTimeWindows +} +// GetDesiredOsVersion gets the desiredOsVersion property value. If left unspecified, devices will update to the latest version of the OS. +func (m *IosUpdateConfiguration) GetDesiredOsVersion()(*string) { + return m.desiredOsVersion +} +// GetEnforcedSoftwareUpdateDelayInDays gets the enforcedSoftwareUpdateDelayInDays property value. Days before software updates are visible to iOS devices ranging from 0 to 90 inclusive +func (m *IosUpdateConfiguration) GetEnforcedSoftwareUpdateDelayInDays()(*int32) { + return m.enforcedSoftwareUpdateDelayInDays +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosUpdateConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["activeHoursEnd"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveHoursEnd(val) + } + return nil + } + res["activeHoursStart"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveHoursStart(val) + } + return nil + } + res["customUpdateTimeWindows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomUpdateTimeWindowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomUpdateTimeWindowable, len(val)) + for i, v := range val { + res[i] = v.(CustomUpdateTimeWindowable) + } + m.SetCustomUpdateTimeWindows(res) + } + return nil + } + res["desiredOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDesiredOsVersion(val) + } + return nil + } + res["enforcedSoftwareUpdateDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnforcedSoftwareUpdateDelayInDays(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["scheduledInstallDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + res := make([]DayOfWeek, len(val)) + for i, v := range val { + res[i] = *(v.(*DayOfWeek)) + } + m.SetScheduledInstallDays(res) + } + return nil + } + res["updateScheduleType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosSoftwareUpdateScheduleType) + if err != nil { + return err + } + if val != nil { + m.SetUpdateScheduleType(val.(*IosSoftwareUpdateScheduleType)) + } + return nil + } + res["utcTimeOffsetInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUtcTimeOffsetInMinutes(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Is setting enabled in UI +func (m *IosUpdateConfiguration) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetScheduledInstallDays gets the scheduledInstallDays property value. Days in week for which active hours are configured. This collection can contain a maximum of 7 elements. +func (m *IosUpdateConfiguration) GetScheduledInstallDays()([]DayOfWeek) { + return m.scheduledInstallDays +} +// GetUpdateScheduleType gets the updateScheduleType property value. Update schedule type for iOS software updates. +func (m *IosUpdateConfiguration) GetUpdateScheduleType()(*IosSoftwareUpdateScheduleType) { + return m.updateScheduleType +} +// GetUtcTimeOffsetInMinutes gets the utcTimeOffsetInMinutes property value. UTC Time Offset indicated in minutes +func (m *IosUpdateConfiguration) GetUtcTimeOffsetInMinutes()(*int32) { + return m.utcTimeOffsetInMinutes +} +// Serialize serializes information the current object +func (m *IosUpdateConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeOnlyValue("activeHoursEnd", m.GetActiveHoursEnd()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeOnlyValue("activeHoursStart", m.GetActiveHoursStart()) + if err != nil { + return err + } + } + if m.GetCustomUpdateTimeWindows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomUpdateTimeWindows())) + for i, v := range m.GetCustomUpdateTimeWindows() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customUpdateTimeWindows", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("desiredOsVersion", m.GetDesiredOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("enforcedSoftwareUpdateDelayInDays", m.GetEnforcedSoftwareUpdateDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + if m.GetScheduledInstallDays() != nil { + err = writer.WriteCollectionOfStringValues("scheduledInstallDays", SerializeDayOfWeek(m.GetScheduledInstallDays())) + if err != nil { + return err + } + } + if m.GetUpdateScheduleType() != nil { + cast := (*m.GetUpdateScheduleType()).String() + err = writer.WriteStringValue("updateScheduleType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("utcTimeOffsetInMinutes", m.GetUtcTimeOffsetInMinutes()) + if err != nil { + return err + } + } + return nil +} +// SetActiveHoursEnd sets the activeHoursEnd property value. Active Hours End (active hours mean the time window when updates install should not happen) +func (m *IosUpdateConfiguration) SetActiveHoursEnd(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.activeHoursEnd = value +} +// SetActiveHoursStart sets the activeHoursStart property value. Active Hours Start (active hours mean the time window when updates install should not happen) +func (m *IosUpdateConfiguration) SetActiveHoursStart(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.activeHoursStart = value +} +// SetCustomUpdateTimeWindows sets the customUpdateTimeWindows property value. If update schedule type is set to use time window scheduling, custom time windows when updates will be scheduled. This collection can contain a maximum of 20 elements. +func (m *IosUpdateConfiguration) SetCustomUpdateTimeWindows(value []CustomUpdateTimeWindowable)() { + m.customUpdateTimeWindows = value +} +// SetDesiredOsVersion sets the desiredOsVersion property value. If left unspecified, devices will update to the latest version of the OS. +func (m *IosUpdateConfiguration) SetDesiredOsVersion(value *string)() { + m.desiredOsVersion = value +} +// SetEnforcedSoftwareUpdateDelayInDays sets the enforcedSoftwareUpdateDelayInDays property value. Days before software updates are visible to iOS devices ranging from 0 to 90 inclusive +func (m *IosUpdateConfiguration) SetEnforcedSoftwareUpdateDelayInDays(value *int32)() { + m.enforcedSoftwareUpdateDelayInDays = value +} +// SetIsEnabled sets the isEnabled property value. Is setting enabled in UI +func (m *IosUpdateConfiguration) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetScheduledInstallDays sets the scheduledInstallDays property value. Days in week for which active hours are configured. This collection can contain a maximum of 7 elements. +func (m *IosUpdateConfiguration) SetScheduledInstallDays(value []DayOfWeek)() { + m.scheduledInstallDays = value +} +// SetUpdateScheduleType sets the updateScheduleType property value. Update schedule type for iOS software updates. +func (m *IosUpdateConfiguration) SetUpdateScheduleType(value *IosSoftwareUpdateScheduleType)() { + m.updateScheduleType = value +} +// SetUtcTimeOffsetInMinutes sets the utcTimeOffsetInMinutes property value. UTC Time Offset indicated in minutes +func (m *IosUpdateConfiguration) SetUtcTimeOffsetInMinutes(value *int32)() { + m.utcTimeOffsetInMinutes = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_response.go new file mode 100644 index 000000000..e12265e2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateConfigurationCollectionResponse +type IosUpdateConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosUpdateConfigurationable +} +// NewIosUpdateConfigurationCollectionResponse instantiates a new IosUpdateConfigurationCollectionResponse and sets the default values. +func NewIosUpdateConfigurationCollectionResponse()(*IosUpdateConfigurationCollectionResponse) { + m := &IosUpdateConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosUpdateConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosUpdateConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosUpdateConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosUpdateConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosUpdateConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosUpdateConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosUpdateConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosUpdateConfigurationCollectionResponse) GetValue()([]IosUpdateConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosUpdateConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosUpdateConfigurationCollectionResponse) SetValue(value []IosUpdateConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_responseable.go new file mode 100644 index 000000000..be69c6113 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateConfigurationCollectionResponseable +type IosUpdateConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosUpdateConfigurationable) + SetValue(value []IosUpdateConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_update_configurationable.go new file mode 100644 index 000000000..736f57888 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_configurationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateConfigurationable +type IosUpdateConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveHoursEnd()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetActiveHoursStart()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetCustomUpdateTimeWindows()([]CustomUpdateTimeWindowable) + GetDesiredOsVersion()(*string) + GetEnforcedSoftwareUpdateDelayInDays()(*int32) + GetIsEnabled()(*bool) + GetScheduledInstallDays()([]DayOfWeek) + GetUpdateScheduleType()(*IosSoftwareUpdateScheduleType) + GetUtcTimeOffsetInMinutes()(*int32) + SetActiveHoursEnd(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetActiveHoursStart(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetCustomUpdateTimeWindows(value []CustomUpdateTimeWindowable)() + SetDesiredOsVersion(value *string)() + SetEnforcedSoftwareUpdateDelayInDays(value *int32)() + SetIsEnabled(value *bool)() + SetScheduledInstallDays(value []DayOfWeek)() + SetUpdateScheduleType(value *IosSoftwareUpdateScheduleType)() + SetUtcTimeOffsetInMinutes(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_device_status.go b/src/internal/connector/graph/betasdk/models/ios_update_device_status.go new file mode 100644 index 000000000..06a3f11d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_device_status.go @@ -0,0 +1,349 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateDeviceStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosUpdateDeviceStatus struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name of the DevicePolicyStatus. + deviceDisplayName *string + // The device id that is being reported. + deviceId *string + // The device model that is being reported + deviceModel *string + // The installStatus property + installStatus *IosUpdatesInstallStatus + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The device version that is being reported. + osVersion *string + // Platform of the device that is being reported + platform *int32 + // The status property + status *ComplianceStatus + // The User id that is being reported. + userId *string + // The User Name that is being reported + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewIosUpdateDeviceStatus instantiates a new iosUpdateDeviceStatus and sets the default values. +func NewIosUpdateDeviceStatus()(*IosUpdateDeviceStatus) { + m := &IosUpdateDeviceStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateIosUpdateDeviceStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosUpdateDeviceStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosUpdateDeviceStatus(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *IosUpdateDeviceStatus) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *IosUpdateDeviceStatus) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceId gets the deviceId property value. The device id that is being reported. +func (m *IosUpdateDeviceStatus) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *IosUpdateDeviceStatus) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosUpdateDeviceStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["installStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIosUpdatesInstallStatus) + if err != nil { + return err + } + if val != nil { + m.SetInstallStatus(val.(*IosUpdatesInstallStatus)) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetInstallStatus gets the installStatus property value. The installStatus property +func (m *IosUpdateDeviceStatus) GetInstallStatus()(*IosUpdatesInstallStatus) { + return m.installStatus +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *IosUpdateDeviceStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetOsVersion gets the osVersion property value. The device version that is being reported. +func (m *IosUpdateDeviceStatus) GetOsVersion()(*string) { + return m.osVersion +} +// GetPlatform gets the platform property value. Platform of the device that is being reported +func (m *IosUpdateDeviceStatus) GetPlatform()(*int32) { + return m.platform +} +// GetStatus gets the status property value. The status property +func (m *IosUpdateDeviceStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserId gets the userId property value. The User id that is being reported. +func (m *IosUpdateDeviceStatus) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *IosUpdateDeviceStatus) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *IosUpdateDeviceStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *IosUpdateDeviceStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + if m.GetInstallStatus() != nil { + cast := (*m.GetInstallStatus()).String() + err = writer.WriteStringValue("installStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("platform", m.GetPlatform()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *IosUpdateDeviceStatus) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *IosUpdateDeviceStatus) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceId sets the deviceId property value. The device id that is being reported. +func (m *IosUpdateDeviceStatus) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *IosUpdateDeviceStatus) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetInstallStatus sets the installStatus property value. The installStatus property +func (m *IosUpdateDeviceStatus) SetInstallStatus(value *IosUpdatesInstallStatus)() { + m.installStatus = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *IosUpdateDeviceStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetOsVersion sets the osVersion property value. The device version that is being reported. +func (m *IosUpdateDeviceStatus) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetPlatform sets the platform property value. Platform of the device that is being reported +func (m *IosUpdateDeviceStatus) SetPlatform(value *int32)() { + m.platform = value +} +// SetStatus sets the status property value. The status property +func (m *IosUpdateDeviceStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserId sets the userId property value. The User id that is being reported. +func (m *IosUpdateDeviceStatus) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *IosUpdateDeviceStatus) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *IosUpdateDeviceStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_response.go new file mode 100644 index 000000000..ae6c3c710 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateDeviceStatusCollectionResponse +type IosUpdateDeviceStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosUpdateDeviceStatusable +} +// NewIosUpdateDeviceStatusCollectionResponse instantiates a new IosUpdateDeviceStatusCollectionResponse and sets the default values. +func NewIosUpdateDeviceStatusCollectionResponse()(*IosUpdateDeviceStatusCollectionResponse) { + m := &IosUpdateDeviceStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosUpdateDeviceStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosUpdateDeviceStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosUpdateDeviceStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosUpdateDeviceStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosUpdateDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosUpdateDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(IosUpdateDeviceStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosUpdateDeviceStatusCollectionResponse) GetValue()([]IosUpdateDeviceStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosUpdateDeviceStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosUpdateDeviceStatusCollectionResponse) SetValue(value []IosUpdateDeviceStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_responseable.go new file mode 100644 index 000000000..e5aa46a29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_device_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateDeviceStatusCollectionResponseable +type IosUpdateDeviceStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosUpdateDeviceStatusable) + SetValue(value []IosUpdateDeviceStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_update_device_statusable.go b/src/internal/connector/graph/betasdk/models/ios_update_device_statusable.go new file mode 100644 index 000000000..a3c5e04e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_update_device_statusable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosUpdateDeviceStatusable +type IosUpdateDeviceStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceDisplayName()(*string) + GetDeviceId()(*string) + GetDeviceModel()(*string) + GetInstallStatus()(*IosUpdatesInstallStatus) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOsVersion()(*string) + GetPlatform()(*int32) + GetStatus()(*ComplianceStatus) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceDisplayName(value *string)() + SetDeviceId(value *string)() + SetDeviceModel(value *string)() + SetInstallStatus(value *IosUpdatesInstallStatus)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOsVersion(value *string)() + SetPlatform(value *int32)() + SetStatus(value *ComplianceStatus)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_updates_install_status.go b/src/internal/connector/graph/betasdk/models/ios_updates_install_status.go new file mode 100644 index 000000000..6b76222b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_updates_install_status.go @@ -0,0 +1,94 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosUpdatesInstallStatus int + +const ( + UPDATESCANFAILED_IOSUPDATESINSTALLSTATUS IosUpdatesInstallStatus = iota + DEVICEOSHIGHERTHANDESIREDOSVERSION_IOSUPDATESINSTALLSTATUS + UPDATEERROR_IOSUPDATESINSTALLSTATUS + SHAREDDEVICEUSERLOGGEDINERROR_IOSUPDATESINSTALLSTATUS + NOTSUPPORTEDOPERATION_IOSUPDATESINSTALLSTATUS + INSTALLFAILED_IOSUPDATESINSTALLSTATUS + INSTALLPHONECALLINPROGRESS_IOSUPDATESINSTALLSTATUS + INSTALLINSUFFICIENTPOWER_IOSUPDATESINSTALLSTATUS + INSTALLINSUFFICIENTSPACE_IOSUPDATESINSTALLSTATUS + INSTALLING_IOSUPDATESINSTALLSTATUS + DOWNLOADINSUFFICIENTNETWORK_IOSUPDATESINSTALLSTATUS + DOWNLOADINSUFFICIENTPOWER_IOSUPDATESINSTALLSTATUS + DOWNLOADINSUFFICIENTSPACE_IOSUPDATESINSTALLSTATUS + DOWNLOADREQUIRESCOMPUTER_IOSUPDATESINSTALLSTATUS + DOWNLOADFAILED_IOSUPDATESINSTALLSTATUS + DOWNLOADING_IOSUPDATESINSTALLSTATUS + TIMEOUT_IOSUPDATESINSTALLSTATUS + MDMCLIENTCRASHED_IOSUPDATESINSTALLSTATUS + SUCCESS_IOSUPDATESINSTALLSTATUS + AVAILABLE_IOSUPDATESINSTALLSTATUS + IDLE_IOSUPDATESINSTALLSTATUS + UNKNOWN_IOSUPDATESINSTALLSTATUS +) + +func (i IosUpdatesInstallStatus) String() string { + return []string{"updateScanFailed", "deviceOsHigherThanDesiredOsVersion", "updateError", "sharedDeviceUserLoggedInError", "notSupportedOperation", "installFailed", "installPhoneCallInProgress", "installInsufficientPower", "installInsufficientSpace", "installing", "downloadInsufficientNetwork", "downloadInsufficientPower", "downloadInsufficientSpace", "downloadRequiresComputer", "downloadFailed", "downloading", "timeout", "mdmClientCrashed", "success", "available", "idle", "unknown"}[i] +} +func ParseIosUpdatesInstallStatus(v string) (interface{}, error) { + result := UPDATESCANFAILED_IOSUPDATESINSTALLSTATUS + switch v { + case "updateScanFailed": + result = UPDATESCANFAILED_IOSUPDATESINSTALLSTATUS + case "deviceOsHigherThanDesiredOsVersion": + result = DEVICEOSHIGHERTHANDESIREDOSVERSION_IOSUPDATESINSTALLSTATUS + case "updateError": + result = UPDATEERROR_IOSUPDATESINSTALLSTATUS + case "sharedDeviceUserLoggedInError": + result = SHAREDDEVICEUSERLOGGEDINERROR_IOSUPDATESINSTALLSTATUS + case "notSupportedOperation": + result = NOTSUPPORTEDOPERATION_IOSUPDATESINSTALLSTATUS + case "installFailed": + result = INSTALLFAILED_IOSUPDATESINSTALLSTATUS + case "installPhoneCallInProgress": + result = INSTALLPHONECALLINPROGRESS_IOSUPDATESINSTALLSTATUS + case "installInsufficientPower": + result = INSTALLINSUFFICIENTPOWER_IOSUPDATESINSTALLSTATUS + case "installInsufficientSpace": + result = INSTALLINSUFFICIENTSPACE_IOSUPDATESINSTALLSTATUS + case "installing": + result = INSTALLING_IOSUPDATESINSTALLSTATUS + case "downloadInsufficientNetwork": + result = DOWNLOADINSUFFICIENTNETWORK_IOSUPDATESINSTALLSTATUS + case "downloadInsufficientPower": + result = DOWNLOADINSUFFICIENTPOWER_IOSUPDATESINSTALLSTATUS + case "downloadInsufficientSpace": + result = DOWNLOADINSUFFICIENTSPACE_IOSUPDATESINSTALLSTATUS + case "downloadRequiresComputer": + result = DOWNLOADREQUIRESCOMPUTER_IOSUPDATESINSTALLSTATUS + case "downloadFailed": + result = DOWNLOADFAILED_IOSUPDATESINSTALLSTATUS + case "downloading": + result = DOWNLOADING_IOSUPDATESINSTALLSTATUS + case "timeout": + result = TIMEOUT_IOSUPDATESINSTALLSTATUS + case "mdmClientCrashed": + result = MDMCLIENTCRASHED_IOSUPDATESINSTALLSTATUS + case "success": + result = SUCCESS_IOSUPDATESINSTALLSTATUS + case "available": + result = AVAILABLE_IOSUPDATESINSTALLSTATUS + case "idle": + result = IDLE_IOSUPDATESINSTALLSTATUS + case "unknown": + result = UNKNOWN_IOSUPDATESINSTALLSTATUS + default: + return 0, errors.New("Unknown IosUpdatesInstallStatus value: " + v) + } + return &result, nil +} +func SerializeIosUpdatesInstallStatus(values []IosUpdatesInstallStatus) []string { + 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/ios_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration.go new file mode 100644 index 000000000..c85df1a5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration.go @@ -0,0 +1,274 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnConfiguration +type IosVpnConfiguration struct { + AppleVpnConfiguration + // Zscaler only. Zscaler cloud which the user is assigned to. + cloudName *string + // Tenant level settings for the Derived Credentials to be used for authentication. + derivedCredentialSettings DeviceManagementDerivedCredentialSettingsable + // Zscaler only. List of network addresses which are not sent through the Zscaler cloud. + excludeList []string + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate IosCertificateProfileBaseable + // Microsoft Tunnel site ID. + microsoftTunnelSiteId *string + // Zscaler only. Blocks network traffic until the user signs into Zscaler app. 'True' means traffic is blocked. + strictEnforcement *bool + // Targeted mobile apps. This collection can contain a maximum of 500 elements. + targetedMobileApps []AppListItemable + // Zscaler only. Enter a static domain to pre-populate the login field with in the Zscaler app. If this is left empty, the user's Azure Active Directory domain will be used instead. + userDomain *string +} +// NewIosVpnConfiguration instantiates a new IosVpnConfiguration and sets the default values. +func NewIosVpnConfiguration()(*IosVpnConfiguration) { + m := &IosVpnConfiguration{ + AppleVpnConfiguration: *NewAppleVpnConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosikEv2VpnConfiguration": + return NewIosikEv2VpnConfiguration(), nil + } + } + } + } + return NewIosVpnConfiguration(), nil +} +// GetCloudName gets the cloudName property value. Zscaler only. Zscaler cloud which the user is assigned to. +func (m *IosVpnConfiguration) GetCloudName()(*string) { + return m.cloudName +} +// GetDerivedCredentialSettings gets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosVpnConfiguration) GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) { + return m.derivedCredentialSettings +} +// GetExcludeList gets the excludeList property value. Zscaler only. List of network addresses which are not sent through the Zscaler cloud. +func (m *IosVpnConfiguration) GetExcludeList()([]string) { + return m.excludeList +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppleVpnConfiguration.GetFieldDeserializers() + res["cloudName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudName(val) + } + return nil + } + res["derivedCredentialSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementDerivedCredentialSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDerivedCredentialSettings(val.(DeviceManagementDerivedCredentialSettingsable)) + } + return nil + } + res["excludeList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeList(res) + } + return nil + } + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(IosCertificateProfileBaseable)) + } + return nil + } + res["microsoftTunnelSiteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftTunnelSiteId(val) + } + return nil + } + res["strictEnforcement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStrictEnforcement(val) + } + return nil + } + res["targetedMobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetTargetedMobileApps(res) + } + return nil + } + res["userDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDomain(val) + } + return nil + } + return res +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *IosVpnConfiguration) GetIdentityCertificate()(IosCertificateProfileBaseable) { + return m.identityCertificate +} +// GetMicrosoftTunnelSiteId gets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *IosVpnConfiguration) GetMicrosoftTunnelSiteId()(*string) { + return m.microsoftTunnelSiteId +} +// GetStrictEnforcement gets the strictEnforcement property value. Zscaler only. Blocks network traffic until the user signs into Zscaler app. 'True' means traffic is blocked. +func (m *IosVpnConfiguration) GetStrictEnforcement()(*bool) { + return m.strictEnforcement +} +// GetTargetedMobileApps gets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *IosVpnConfiguration) GetTargetedMobileApps()([]AppListItemable) { + return m.targetedMobileApps +} +// GetUserDomain gets the userDomain property value. Zscaler only. Enter a static domain to pre-populate the login field with in the Zscaler app. If this is left empty, the user's Azure Active Directory domain will be used instead. +func (m *IosVpnConfiguration) GetUserDomain()(*string) { + return m.userDomain +} +// Serialize serializes information the current object +func (m *IosVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppleVpnConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cloudName", m.GetCloudName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("derivedCredentialSettings", m.GetDerivedCredentialSettings()) + if err != nil { + return err + } + } + if m.GetExcludeList() != nil { + err = writer.WriteCollectionOfStringValues("excludeList", m.GetExcludeList()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("microsoftTunnelSiteId", m.GetMicrosoftTunnelSiteId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("strictEnforcement", m.GetStrictEnforcement()) + if err != nil { + return err + } + } + if m.GetTargetedMobileApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedMobileApps())) + for i, v := range m.GetTargetedMobileApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedMobileApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDomain", m.GetUserDomain()) + if err != nil { + return err + } + } + return nil +} +// SetCloudName sets the cloudName property value. Zscaler only. Zscaler cloud which the user is assigned to. +func (m *IosVpnConfiguration) SetCloudName(value *string)() { + m.cloudName = value +} +// SetDerivedCredentialSettings sets the derivedCredentialSettings property value. Tenant level settings for the Derived Credentials to be used for authentication. +func (m *IosVpnConfiguration) SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() { + m.derivedCredentialSettings = value +} +// SetExcludeList sets the excludeList property value. Zscaler only. List of network addresses which are not sent through the Zscaler cloud. +func (m *IosVpnConfiguration) SetExcludeList(value []string)() { + m.excludeList = value +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *IosVpnConfiguration) SetIdentityCertificate(value IosCertificateProfileBaseable)() { + m.identityCertificate = value +} +// SetMicrosoftTunnelSiteId sets the microsoftTunnelSiteId property value. Microsoft Tunnel site ID. +func (m *IosVpnConfiguration) SetMicrosoftTunnelSiteId(value *string)() { + m.microsoftTunnelSiteId = value +} +// SetStrictEnforcement sets the strictEnforcement property value. Zscaler only. Blocks network traffic until the user signs into Zscaler app. 'True' means traffic is blocked. +func (m *IosVpnConfiguration) SetStrictEnforcement(value *bool)() { + m.strictEnforcement = value +} +// SetTargetedMobileApps sets the targetedMobileApps property value. Targeted mobile apps. This collection can contain a maximum of 500 elements. +func (m *IosVpnConfiguration) SetTargetedMobileApps(value []AppListItemable)() { + m.targetedMobileApps = value +} +// SetUserDomain sets the userDomain property value. Zscaler only. Enter a static domain to pre-populate the login field with in the Zscaler app. If this is left empty, the user's Azure Active Directory domain will be used instead. +func (m *IosVpnConfiguration) SetUserDomain(value *string)() { + m.userDomain = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_response.go new file mode 100644 index 000000000..3ac9cbb52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnConfigurationCollectionResponse +type IosVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVpnConfigurationable +} +// NewIosVpnConfigurationCollectionResponse instantiates a new IosVpnConfigurationCollectionResponse and sets the default values. +func NewIosVpnConfigurationCollectionResponse()(*IosVpnConfigurationCollectionResponse) { + m := &IosVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVpnConfigurationCollectionResponse) GetValue()([]IosVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVpnConfigurationCollectionResponse) SetValue(value []IosVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..17bb5727f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnConfigurationCollectionResponseable +type IosVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVpnConfigurationable) + SetValue(value []IosVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_vpn_configurationable.go new file mode 100644 index 000000000..21b5d2cde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_configurationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnConfigurationable +type IosVpnConfigurationable interface { + AppleVpnConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudName()(*string) + GetDerivedCredentialSettings()(DeviceManagementDerivedCredentialSettingsable) + GetExcludeList()([]string) + GetIdentityCertificate()(IosCertificateProfileBaseable) + GetMicrosoftTunnelSiteId()(*string) + GetStrictEnforcement()(*bool) + GetTargetedMobileApps()([]AppListItemable) + GetUserDomain()(*string) + SetCloudName(value *string)() + SetDerivedCredentialSettings(value DeviceManagementDerivedCredentialSettingsable)() + SetExcludeList(value []string)() + SetIdentityCertificate(value IosCertificateProfileBaseable)() + SetMicrosoftTunnelSiteId(value *string)() + SetStrictEnforcement(value *bool)() + SetTargetedMobileApps(value []AppListItemable)() + SetUserDomain(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parameters.go b/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parameters.go new file mode 100644 index 000000000..0b9dc2c9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parameters.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnSecurityAssociationParameters vPN Security Association Parameters +type IosVpnSecurityAssociationParameters struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Lifetime (minutes) + lifetimeInMinutes *int32 + // The OdataType property + odataType *string + // Diffie-Hellman Group + securityDiffieHellmanGroup *int32 + // Encryption algorithm. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. + securityEncryptionAlgorithm *VpnEncryptionAlgorithmType + // Integrity algorithm. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. + securityIntegrityAlgorithm *VpnIntegrityAlgorithmType +} +// NewIosVpnSecurityAssociationParameters instantiates a new iosVpnSecurityAssociationParameters and sets the default values. +func NewIosVpnSecurityAssociationParameters()(*IosVpnSecurityAssociationParameters) { + m := &IosVpnSecurityAssociationParameters{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosVpnSecurityAssociationParametersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVpnSecurityAssociationParametersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVpnSecurityAssociationParameters(), 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 *IosVpnSecurityAssociationParameters) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVpnSecurityAssociationParameters) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lifetimeInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLifetimeInMinutes(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["securityDiffieHellmanGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDiffieHellmanGroup(val) + } + return nil + } + res["securityEncryptionAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnEncryptionAlgorithmType) + if err != nil { + return err + } + if val != nil { + m.SetSecurityEncryptionAlgorithm(val.(*VpnEncryptionAlgorithmType)) + } + return nil + } + res["securityIntegrityAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnIntegrityAlgorithmType) + if err != nil { + return err + } + if val != nil { + m.SetSecurityIntegrityAlgorithm(val.(*VpnIntegrityAlgorithmType)) + } + return nil + } + return res +} +// GetLifetimeInMinutes gets the lifetimeInMinutes property value. Lifetime (minutes) +func (m *IosVpnSecurityAssociationParameters) GetLifetimeInMinutes()(*int32) { + return m.lifetimeInMinutes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosVpnSecurityAssociationParameters) GetOdataType()(*string) { + return m.odataType +} +// GetSecurityDiffieHellmanGroup gets the securityDiffieHellmanGroup property value. Diffie-Hellman Group +func (m *IosVpnSecurityAssociationParameters) GetSecurityDiffieHellmanGroup()(*int32) { + return m.securityDiffieHellmanGroup +} +// GetSecurityEncryptionAlgorithm gets the securityEncryptionAlgorithm property value. Encryption algorithm. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *IosVpnSecurityAssociationParameters) GetSecurityEncryptionAlgorithm()(*VpnEncryptionAlgorithmType) { + return m.securityEncryptionAlgorithm +} +// GetSecurityIntegrityAlgorithm gets the securityIntegrityAlgorithm property value. Integrity algorithm. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. +func (m *IosVpnSecurityAssociationParameters) GetSecurityIntegrityAlgorithm()(*VpnIntegrityAlgorithmType) { + return m.securityIntegrityAlgorithm +} +// Serialize serializes information the current object +func (m *IosVpnSecurityAssociationParameters) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("lifetimeInMinutes", m.GetLifetimeInMinutes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("securityDiffieHellmanGroup", m.GetSecurityDiffieHellmanGroup()) + if err != nil { + return err + } + } + if m.GetSecurityEncryptionAlgorithm() != nil { + cast := (*m.GetSecurityEncryptionAlgorithm()).String() + err := writer.WriteStringValue("securityEncryptionAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetSecurityIntegrityAlgorithm() != nil { + cast := (*m.GetSecurityIntegrityAlgorithm()).String() + err := writer.WriteStringValue("securityIntegrityAlgorithm", &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 *IosVpnSecurityAssociationParameters) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLifetimeInMinutes sets the lifetimeInMinutes property value. Lifetime (minutes) +func (m *IosVpnSecurityAssociationParameters) SetLifetimeInMinutes(value *int32)() { + m.lifetimeInMinutes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosVpnSecurityAssociationParameters) SetOdataType(value *string)() { + m.odataType = value +} +// SetSecurityDiffieHellmanGroup sets the securityDiffieHellmanGroup property value. Diffie-Hellman Group +func (m *IosVpnSecurityAssociationParameters) SetSecurityDiffieHellmanGroup(value *int32)() { + m.securityDiffieHellmanGroup = value +} +// SetSecurityEncryptionAlgorithm sets the securityEncryptionAlgorithm property value. Encryption algorithm. Possible values are: aes256, des, tripleDes, aes128, aes128Gcm, aes256Gcm, aes192, aes192Gcm, chaCha20Poly1305. +func (m *IosVpnSecurityAssociationParameters) SetSecurityEncryptionAlgorithm(value *VpnEncryptionAlgorithmType)() { + m.securityEncryptionAlgorithm = value +} +// SetSecurityIntegrityAlgorithm sets the securityIntegrityAlgorithm property value. Integrity algorithm. Possible values are: sha2_256, sha1_96, sha1_160, sha2_384, sha2_512, md5. +func (m *IosVpnSecurityAssociationParameters) SetSecurityIntegrityAlgorithm(value *VpnIntegrityAlgorithmType)() { + m.securityIntegrityAlgorithm = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parametersable.go b/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parametersable.go new file mode 100644 index 000000000..1930fa5d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpn_security_association_parametersable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVpnSecurityAssociationParametersable +type IosVpnSecurityAssociationParametersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLifetimeInMinutes()(*int32) + GetOdataType()(*string) + GetSecurityDiffieHellmanGroup()(*int32) + GetSecurityEncryptionAlgorithm()(*VpnEncryptionAlgorithmType) + GetSecurityIntegrityAlgorithm()(*VpnIntegrityAlgorithmType) + SetLifetimeInMinutes(value *int32)() + SetOdataType(value *string)() + SetSecurityDiffieHellmanGroup(value *int32)() + SetSecurityEncryptionAlgorithm(value *VpnEncryptionAlgorithmType)() + SetSecurityIntegrityAlgorithm(value *VpnIntegrityAlgorithmType)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app.go new file mode 100644 index 000000000..cbc98f329 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app.go @@ -0,0 +1,392 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppApp +type IosVppApp struct { + MobileApp + // The applicable iOS Device Type. + applicableDeviceType IosDeviceTypeable + // The store URL. + appStoreUrl *string + // The licenses assigned to this app. + assignedLicenses []IosVppAppAssignedLicenseable + // The Identity Name. + bundleId *string + // The supported License Type. + licensingType VppLicensingTypeable + // The VPP application release date and time. + releaseDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Results of revoke license actions on this app. + revokeLicenseActionResults []IosVppAppRevokeLicensesActionResultable + // The total number of VPP licenses. + totalLicenseCount *int32 + // The number of VPP licenses in use. + usedLicenseCount *int32 + // Possible types of an Apple Volume Purchase Program token. + vppTokenAccountType *VppTokenAccountType + // The Apple Id associated with the given Apple Volume Purchase Program Token. + vppTokenAppleId *string + // Identifier of the VPP token associated with this app. + vppTokenId *string + // The organization associated with the Apple Volume Purchase Program Token + vppTokenOrganizationName *string +} +// NewIosVppApp instantiates a new IosVppApp and sets the default values. +func NewIosVppApp()(*IosVppApp) { + m := &IosVppApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.iosVppApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosVppAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppApp(), nil +} +// GetApplicableDeviceType gets the applicableDeviceType property value. The applicable iOS Device Type. +func (m *IosVppApp) GetApplicableDeviceType()(IosDeviceTypeable) { + return m.applicableDeviceType +} +// GetAppStoreUrl gets the appStoreUrl property value. The store URL. +func (m *IosVppApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetAssignedLicenses gets the assignedLicenses property value. The licenses assigned to this app. +func (m *IosVppApp) GetAssignedLicenses()([]IosVppAppAssignedLicenseable) { + return m.assignedLicenses +} +// GetBundleId gets the bundleId property value. The Identity Name. +func (m *IosVppApp) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["applicableDeviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicableDeviceType(val.(IosDeviceTypeable)) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["assignedLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppAssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppAssignedLicenseable) + } + m.SetAssignedLicenses(res) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["licensingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVppLicensingTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicensingType(val.(VppLicensingTypeable)) + } + return nil + } + res["releaseDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReleaseDateTime(val) + } + return nil + } + res["revokeLicenseActionResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppRevokeLicensesActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppRevokeLicensesActionResultable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppRevokeLicensesActionResultable) + } + m.SetRevokeLicenseActionResults(res) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + res["vppTokenAccountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVppTokenAccountType) + if err != nil { + return err + } + if val != nil { + m.SetVppTokenAccountType(val.(*VppTokenAccountType)) + } + return nil + } + res["vppTokenAppleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenAppleId(val) + } + return nil + } + res["vppTokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenId(val) + } + return nil + } + res["vppTokenOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenOrganizationName(val) + } + return nil + } + return res +} +// GetLicensingType gets the licensingType property value. The supported License Type. +func (m *IosVppApp) GetLicensingType()(VppLicensingTypeable) { + return m.licensingType +} +// GetReleaseDateTime gets the releaseDateTime property value. The VPP application release date and time. +func (m *IosVppApp) GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releaseDateTime +} +// GetRevokeLicenseActionResults gets the revokeLicenseActionResults property value. Results of revoke license actions on this app. +func (m *IosVppApp) GetRevokeLicenseActionResults()([]IosVppAppRevokeLicensesActionResultable) { + return m.revokeLicenseActionResults +} +// GetTotalLicenseCount gets the totalLicenseCount property value. The total number of VPP licenses. +func (m *IosVppApp) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *IosVppApp) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// GetVppTokenAccountType gets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. +func (m *IosVppApp) GetVppTokenAccountType()(*VppTokenAccountType) { + return m.vppTokenAccountType +} +// GetVppTokenAppleId gets the vppTokenAppleId property value. The Apple Id associated with the given Apple Volume Purchase Program Token. +func (m *IosVppApp) GetVppTokenAppleId()(*string) { + return m.vppTokenAppleId +} +// GetVppTokenId gets the vppTokenId property value. Identifier of the VPP token associated with this app. +func (m *IosVppApp) GetVppTokenId()(*string) { + return m.vppTokenId +} +// GetVppTokenOrganizationName gets the vppTokenOrganizationName property value. The organization associated with the Apple Volume Purchase Program Token +func (m *IosVppApp) GetVppTokenOrganizationName()(*string) { + return m.vppTokenOrganizationName +} +// Serialize serializes information the current object +func (m *IosVppApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicableDeviceType", m.GetApplicableDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + if m.GetAssignedLicenses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLicenses())) + for i, v := range m.GetAssignedLicenses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedLicenses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("licensingType", m.GetLicensingType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("releaseDateTime", m.GetReleaseDateTime()) + if err != nil { + return err + } + } + if m.GetRevokeLicenseActionResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRevokeLicenseActionResults())) + for i, v := range m.GetRevokeLicenseActionResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("revokeLicenseActionResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + if m.GetVppTokenAccountType() != nil { + cast := (*m.GetVppTokenAccountType()).String() + err = writer.WriteStringValue("vppTokenAccountType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenAppleId", m.GetVppTokenAppleId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenId", m.GetVppTokenId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenOrganizationName", m.GetVppTokenOrganizationName()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableDeviceType sets the applicableDeviceType property value. The applicable iOS Device Type. +func (m *IosVppApp) SetApplicableDeviceType(value IosDeviceTypeable)() { + m.applicableDeviceType = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The store URL. +func (m *IosVppApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetAssignedLicenses sets the assignedLicenses property value. The licenses assigned to this app. +func (m *IosVppApp) SetAssignedLicenses(value []IosVppAppAssignedLicenseable)() { + m.assignedLicenses = value +} +// SetBundleId sets the bundleId property value. The Identity Name. +func (m *IosVppApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetLicensingType sets the licensingType property value. The supported License Type. +func (m *IosVppApp) SetLicensingType(value VppLicensingTypeable)() { + m.licensingType = value +} +// SetReleaseDateTime sets the releaseDateTime property value. The VPP application release date and time. +func (m *IosVppApp) SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releaseDateTime = value +} +// SetRevokeLicenseActionResults sets the revokeLicenseActionResults property value. Results of revoke license actions on this app. +func (m *IosVppApp) SetRevokeLicenseActionResults(value []IosVppAppRevokeLicensesActionResultable)() { + m.revokeLicenseActionResults = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. The total number of VPP licenses. +func (m *IosVppApp) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *IosVppApp) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} +// SetVppTokenAccountType sets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. +func (m *IosVppApp) SetVppTokenAccountType(value *VppTokenAccountType)() { + m.vppTokenAccountType = value +} +// SetVppTokenAppleId sets the vppTokenAppleId property value. The Apple Id associated with the given Apple Volume Purchase Program Token. +func (m *IosVppApp) SetVppTokenAppleId(value *string)() { + m.vppTokenAppleId = value +} +// SetVppTokenId sets the vppTokenId property value. Identifier of the VPP token associated with this app. +func (m *IosVppApp) SetVppTokenId(value *string)() { + m.vppTokenId = value +} +// SetVppTokenOrganizationName sets the vppTokenOrganizationName property value. The organization associated with the Apple Volume Purchase Program Token +func (m *IosVppApp) SetVppTokenOrganizationName(value *string)() { + m.vppTokenOrganizationName = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license.go new file mode 100644 index 000000000..4bd28fb9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedDeviceLicense +type IosVppAppAssignedDeviceLicense struct { + IosVppAppAssignedLicense + // The device name. + deviceName *string + // The managed device ID. + managedDeviceId *string +} +// NewIosVppAppAssignedDeviceLicense instantiates a new IosVppAppAssignedDeviceLicense and sets the default values. +func NewIosVppAppAssignedDeviceLicense()(*IosVppAppAssignedDeviceLicense) { + m := &IosVppAppAssignedDeviceLicense{ + IosVppAppAssignedLicense: *NewIosVppAppAssignedLicense(), + } + return m +} +// CreateIosVppAppAssignedDeviceLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedDeviceLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedDeviceLicense(), nil +} +// GetDeviceName gets the deviceName property value. The device name. +func (m *IosVppAppAssignedDeviceLicense) GetDeviceName()(*string) { + return m.deviceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedDeviceLicense) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosVppAppAssignedLicense.GetFieldDeserializers() + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + return res +} +// GetManagedDeviceId gets the managedDeviceId property value. The managed device ID. +func (m *IosVppAppAssignedDeviceLicense) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedDeviceLicense) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosVppAppAssignedLicense.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceName sets the deviceName property value. The device name. +func (m *IosVppAppAssignedDeviceLicense) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The managed device ID. +func (m *IosVppAppAssignedDeviceLicense) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_response.go new file mode 100644 index 000000000..66c929098 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedDeviceLicenseCollectionResponse +type IosVppAppAssignedDeviceLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppAppAssignedDeviceLicenseable +} +// NewIosVppAppAssignedDeviceLicenseCollectionResponse instantiates a new IosVppAppAssignedDeviceLicenseCollectionResponse and sets the default values. +func NewIosVppAppAssignedDeviceLicenseCollectionResponse()(*IosVppAppAssignedDeviceLicenseCollectionResponse) { + m := &IosVppAppAssignedDeviceLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppAssignedDeviceLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedDeviceLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedDeviceLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedDeviceLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppAssignedDeviceLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppAssignedDeviceLicenseable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppAssignedDeviceLicenseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppAssignedDeviceLicenseCollectionResponse) GetValue()([]IosVppAppAssignedDeviceLicenseable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedDeviceLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppAssignedDeviceLicenseCollectionResponse) SetValue(value []IosVppAppAssignedDeviceLicenseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_responseable.go new file mode 100644 index 000000000..7f7445943 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_license_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedDeviceLicenseCollectionResponseable +type IosVppAppAssignedDeviceLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppAssignedDeviceLicenseable) + SetValue(value []IosVppAppAssignedDeviceLicenseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_licenseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_licenseable.go new file mode 100644 index 000000000..07463ff8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_device_licenseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedDeviceLicenseable +type IosVppAppAssignedDeviceLicenseable interface { + IosVppAppAssignedLicenseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceName()(*string) + GetManagedDeviceId()(*string) + SetDeviceName(value *string)() + SetManagedDeviceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license.go new file mode 100644 index 000000000..0e04bdde4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license.go @@ -0,0 +1,158 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedLicense iOS Volume Purchase Program license assignment. This class does not support Create, Delete, or Update. +type IosVppAppAssignedLicense struct { + Entity + // The user email address. + userEmailAddress *string + // The user ID. + userId *string + // The user name. + userName *string + // The user principal name. + userPrincipalName *string +} +// NewIosVppAppAssignedLicense instantiates a new iosVppAppAssignedLicense and sets the default values. +func NewIosVppAppAssignedLicense()(*IosVppAppAssignedLicense) { + m := &IosVppAppAssignedLicense{ + Entity: *NewEntity(), + } + return m +} +// CreateIosVppAppAssignedLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosVppAppAssignedDeviceLicense": + return NewIosVppAppAssignedDeviceLicense(), nil + case "#microsoft.graph.iosVppAppAssignedUserLicense": + return NewIosVppAppAssignedUserLicense(), nil + } + } + } + } + return NewIosVppAppAssignedLicense(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedLicense) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["userEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmailAddress(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserEmailAddress gets the userEmailAddress property value. The user email address. +func (m *IosVppAppAssignedLicense) GetUserEmailAddress()(*string) { + return m.userEmailAddress +} +// GetUserId gets the userId property value. The user ID. +func (m *IosVppAppAssignedLicense) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. The user name. +func (m *IosVppAppAssignedLicense) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name. +func (m *IosVppAppAssignedLicense) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedLicense) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userEmailAddress", m.GetUserEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetUserEmailAddress sets the userEmailAddress property value. The user email address. +func (m *IosVppAppAssignedLicense) SetUserEmailAddress(value *string)() { + m.userEmailAddress = value +} +// SetUserId sets the userId property value. The user ID. +func (m *IosVppAppAssignedLicense) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. The user name. +func (m *IosVppAppAssignedLicense) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name. +func (m *IosVppAppAssignedLicense) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_response.go new file mode 100644 index 000000000..1e7294e96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedLicenseCollectionResponse +type IosVppAppAssignedLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppAppAssignedLicenseable +} +// NewIosVppAppAssignedLicenseCollectionResponse instantiates a new IosVppAppAssignedLicenseCollectionResponse and sets the default values. +func NewIosVppAppAssignedLicenseCollectionResponse()(*IosVppAppAssignedLicenseCollectionResponse) { + m := &IosVppAppAssignedLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppAssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppAssignedLicenseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppAssignedLicenseCollectionResponse) GetValue()([]IosVppAppAssignedLicenseable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppAssignedLicenseCollectionResponse) SetValue(value []IosVppAppAssignedLicenseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_responseable.go new file mode 100644 index 000000000..0afeedd30 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_license_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedLicenseCollectionResponseable +type IosVppAppAssignedLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppAssignedLicenseable) + SetValue(value []IosVppAppAssignedLicenseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_licenseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_licenseable.go new file mode 100644 index 000000000..f8f20fd81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_licenseable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedLicenseable +type IosVppAppAssignedLicenseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserEmailAddress()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetUserEmailAddress(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license.go new file mode 100644 index 000000000..c799597f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedUserLicense +type IosVppAppAssignedUserLicense struct { + IosVppAppAssignedLicense +} +// NewIosVppAppAssignedUserLicense instantiates a new IosVppAppAssignedUserLicense and sets the default values. +func NewIosVppAppAssignedUserLicense()(*IosVppAppAssignedUserLicense) { + m := &IosVppAppAssignedUserLicense{ + IosVppAppAssignedLicense: *NewIosVppAppAssignedLicense(), + } + return m +} +// CreateIosVppAppAssignedUserLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedUserLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedUserLicense(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedUserLicense) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosVppAppAssignedLicense.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedUserLicense) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosVppAppAssignedLicense.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_response.go new file mode 100644 index 000000000..94b7089c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedUserLicenseCollectionResponse +type IosVppAppAssignedUserLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppAppAssignedUserLicenseable +} +// NewIosVppAppAssignedUserLicenseCollectionResponse instantiates a new IosVppAppAssignedUserLicenseCollectionResponse and sets the default values. +func NewIosVppAppAssignedUserLicenseCollectionResponse()(*IosVppAppAssignedUserLicenseCollectionResponse) { + m := &IosVppAppAssignedUserLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppAssignedUserLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignedUserLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignedUserLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignedUserLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppAssignedUserLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppAssignedUserLicenseable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppAssignedUserLicenseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppAssignedUserLicenseCollectionResponse) GetValue()([]IosVppAppAssignedUserLicenseable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppAppAssignedUserLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppAssignedUserLicenseCollectionResponse) SetValue(value []IosVppAppAssignedUserLicenseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_responseable.go new file mode 100644 index 000000000..cfc923029 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_license_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedUserLicenseCollectionResponseable +type IosVppAppAssignedUserLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppAssignedUserLicenseable) + SetValue(value []IosVppAppAssignedUserLicenseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_licenseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_licenseable.go new file mode 100644 index 000000000..414bd818d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assigned_user_licenseable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignedUserLicenseable +type IosVppAppAssignedUserLicenseable interface { + IosVppAppAssignedLicenseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settings.go new file mode 100644 index 000000000..c14f3bce4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settings.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignmentSettings +type IosVppAppAssignmentSettings struct { + MobileAppAssignmentSettings + // Whether or not the app can be removed by the user. + isRemovable *bool + // Whether or not to uninstall the app when device is removed from Intune. + uninstallOnDeviceRemoval *bool + // Whether or not to use device licensing. + useDeviceLicensing *bool + // The VPN Configuration Id to apply for this app. + vpnConfigurationId *string +} +// NewIosVppAppAssignmentSettings instantiates a new IosVppAppAssignmentSettings and sets the default values. +func NewIosVppAppAssignmentSettings()(*IosVppAppAssignmentSettings) { + m := &IosVppAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.iosVppAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosVppAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["isRemovable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRemovable(val) + } + return nil + } + res["uninstallOnDeviceRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUninstallOnDeviceRemoval(val) + } + return nil + } + res["useDeviceLicensing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseDeviceLicensing(val) + } + return nil + } + res["vpnConfigurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVpnConfigurationId(val) + } + return nil + } + return res +} +// GetIsRemovable gets the isRemovable property value. Whether or not the app can be removed by the user. +func (m *IosVppAppAssignmentSettings) GetIsRemovable()(*bool) { + return m.isRemovable +} +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosVppAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { + return m.uninstallOnDeviceRemoval +} +// GetUseDeviceLicensing gets the useDeviceLicensing property value. Whether or not to use device licensing. +func (m *IosVppAppAssignmentSettings) GetUseDeviceLicensing()(*bool) { + return m.useDeviceLicensing +} +// GetVpnConfigurationId gets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosVppAppAssignmentSettings) GetVpnConfigurationId()(*string) { + return m.vpnConfigurationId +} +// Serialize serializes information the current object +func (m *IosVppAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isRemovable", m.GetIsRemovable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("uninstallOnDeviceRemoval", m.GetUninstallOnDeviceRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useDeviceLicensing", m.GetUseDeviceLicensing()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vpnConfigurationId", m.GetVpnConfigurationId()) + if err != nil { + return err + } + } + return nil +} +// SetIsRemovable sets the isRemovable property value. Whether or not the app can be removed by the user. +func (m *IosVppAppAssignmentSettings) SetIsRemovable(value *bool)() { + m.isRemovable = value +} +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *IosVppAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { + m.uninstallOnDeviceRemoval = value +} +// SetUseDeviceLicensing sets the useDeviceLicensing property value. Whether or not to use device licensing. +func (m *IosVppAppAssignmentSettings) SetUseDeviceLicensing(value *bool)() { + m.useDeviceLicensing = value +} +// SetVpnConfigurationId sets the vpnConfigurationId property value. The VPN Configuration Id to apply for this app. +func (m *IosVppAppAssignmentSettings) SetVpnConfigurationId(value *string)() { + m.vpnConfigurationId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settingsable.go new file mode 100644 index 000000000..bceff652f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_assignment_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppAssignmentSettingsable +type IosVppAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRemovable()(*bool) + GetUninstallOnDeviceRemoval()(*bool) + GetUseDeviceLicensing()(*bool) + GetVpnConfigurationId()(*string) + SetIsRemovable(value *bool)() + SetUninstallOnDeviceRemoval(value *bool)() + SetUseDeviceLicensing(value *bool)() + SetVpnConfigurationId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_response.go new file mode 100644 index 000000000..f93813481 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppCollectionResponse +type IosVppAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppAppable +} +// NewIosVppAppCollectionResponse instantiates a new IosVppAppCollectionResponse and sets the default values. +func NewIosVppAppCollectionResponse()(*IosVppAppCollectionResponse) { + m := &IosVppAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppCollectionResponse) GetValue()([]IosVppAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppCollectionResponse) SetValue(value []IosVppAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_responseable.go new file mode 100644 index 000000000..302422991 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppCollectionResponseable +type IosVppAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppable) + SetValue(value []IosVppAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result.go new file mode 100644 index 000000000..d6fb750cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result.go @@ -0,0 +1,308 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppRevokeLicensesActionResult defines results for actions on iOS Vpp Apps, contains inherited properties for ActionResult. +type IosVppAppRevokeLicensesActionResult struct { + // Possible types of reasons for an Apple Volume Purchase Program token action failure. + actionFailureReason *VppTokenActionFailureReason + // Action name + actionName *string + // The actionState property + actionState *ActionState + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A count of the number of licenses for which revoke failed. + failedLicensesCount *int32 + // Time the action state was last updated + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DeviceId associated with the action. + managedDeviceId *string + // The OdataType property + odataType *string + // Time the action was initiated + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A count of the number of licenses for which revoke was attempted. + totalLicensesCount *int32 + // UserId associated with the action. + userId *string +} +// NewIosVppAppRevokeLicensesActionResult instantiates a new iosVppAppRevokeLicensesActionResult and sets the default values. +func NewIosVppAppRevokeLicensesActionResult()(*IosVppAppRevokeLicensesActionResult) { + m := &IosVppAppRevokeLicensesActionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosVppAppRevokeLicensesActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppRevokeLicensesActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppRevokeLicensesActionResult(), nil +} +// GetActionFailureReason gets the actionFailureReason property value. Possible types of reasons for an Apple Volume Purchase Program token action failure. +func (m *IosVppAppRevokeLicensesActionResult) GetActionFailureReason()(*VppTokenActionFailureReason) { + return m.actionFailureReason +} +// GetActionName gets the actionName property value. Action name +func (m *IosVppAppRevokeLicensesActionResult) GetActionName()(*string) { + return m.actionName +} +// GetActionState gets the actionState property value. The actionState property +func (m *IosVppAppRevokeLicensesActionResult) GetActionState()(*ActionState) { + return m.actionState +} +// 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 *IosVppAppRevokeLicensesActionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFailedLicensesCount gets the failedLicensesCount property value. A count of the number of licenses for which revoke failed. +func (m *IosVppAppRevokeLicensesActionResult) GetFailedLicensesCount()(*int32) { + return m.failedLicensesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppRevokeLicensesActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionFailureReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVppTokenActionFailureReason) + if err != nil { + return err + } + if val != nil { + m.SetActionFailureReason(val.(*VppTokenActionFailureReason)) + } + return nil + } + res["actionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionName(val) + } + return nil + } + res["actionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionState) + if err != nil { + return err + } + if val != nil { + m.SetActionState(val.(*ActionState)) + } + return nil + } + res["failedLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedLicensesCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["totalLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicensesCount(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *IosVppAppRevokeLicensesActionResult) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. DeviceId associated with the action. +func (m *IosVppAppRevokeLicensesActionResult) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosVppAppRevokeLicensesActionResult) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. Time the action was initiated +func (m *IosVppAppRevokeLicensesActionResult) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetTotalLicensesCount gets the totalLicensesCount property value. A count of the number of licenses for which revoke was attempted. +func (m *IosVppAppRevokeLicensesActionResult) GetTotalLicensesCount()(*int32) { + return m.totalLicensesCount +} +// GetUserId gets the userId property value. UserId associated with the action. +func (m *IosVppAppRevokeLicensesActionResult) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *IosVppAppRevokeLicensesActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActionFailureReason() != nil { + cast := (*m.GetActionFailureReason()).String() + err := writer.WriteStringValue("actionFailureReason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actionName", m.GetActionName()) + if err != nil { + return err + } + } + if m.GetActionState() != nil { + cast := (*m.GetActionState()).String() + err := writer.WriteStringValue("actionState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("failedLicensesCount", m.GetFailedLicensesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalLicensesCount", m.GetTotalLicensesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionFailureReason sets the actionFailureReason property value. Possible types of reasons for an Apple Volume Purchase Program token action failure. +func (m *IosVppAppRevokeLicensesActionResult) SetActionFailureReason(value *VppTokenActionFailureReason)() { + m.actionFailureReason = value +} +// SetActionName sets the actionName property value. Action name +func (m *IosVppAppRevokeLicensesActionResult) SetActionName(value *string)() { + m.actionName = value +} +// SetActionState sets the actionState property value. The actionState property +func (m *IosVppAppRevokeLicensesActionResult) SetActionState(value *ActionState)() { + m.actionState = value +} +// 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 *IosVppAppRevokeLicensesActionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFailedLicensesCount sets the failedLicensesCount property value. A count of the number of licenses for which revoke failed. +func (m *IosVppAppRevokeLicensesActionResult) SetFailedLicensesCount(value *int32)() { + m.failedLicensesCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *IosVppAppRevokeLicensesActionResult) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. DeviceId associated with the action. +func (m *IosVppAppRevokeLicensesActionResult) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosVppAppRevokeLicensesActionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. Time the action was initiated +func (m *IosVppAppRevokeLicensesActionResult) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetTotalLicensesCount sets the totalLicensesCount property value. A count of the number of licenses for which revoke was attempted. +func (m *IosVppAppRevokeLicensesActionResult) SetTotalLicensesCount(value *int32)() { + m.totalLicensesCount = value +} +// SetUserId sets the userId property value. UserId associated with the action. +func (m *IosVppAppRevokeLicensesActionResult) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_response.go new file mode 100644 index 000000000..3a911a8cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppRevokeLicensesActionResultCollectionResponse +type IosVppAppRevokeLicensesActionResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppAppRevokeLicensesActionResultable +} +// NewIosVppAppRevokeLicensesActionResultCollectionResponse instantiates a new IosVppAppRevokeLicensesActionResultCollectionResponse and sets the default values. +func NewIosVppAppRevokeLicensesActionResultCollectionResponse()(*IosVppAppRevokeLicensesActionResultCollectionResponse) { + m := &IosVppAppRevokeLicensesActionResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppAppRevokeLicensesActionResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppAppRevokeLicensesActionResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppAppRevokeLicensesActionResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppAppRevokeLicensesActionResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppAppRevokeLicensesActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppAppRevokeLicensesActionResultable, len(val)) + for i, v := range val { + res[i] = v.(IosVppAppRevokeLicensesActionResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppAppRevokeLicensesActionResultCollectionResponse) GetValue()([]IosVppAppRevokeLicensesActionResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppAppRevokeLicensesActionResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppAppRevokeLicensesActionResultCollectionResponse) SetValue(value []IosVppAppRevokeLicensesActionResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_responseable.go new file mode 100644 index 000000000..111f97b54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppRevokeLicensesActionResultCollectionResponseable +type IosVppAppRevokeLicensesActionResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppAppRevokeLicensesActionResultable) + SetValue(value []IosVppAppRevokeLicensesActionResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_resultable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_resultable.go new file mode 100644 index 000000000..4cf9cbe8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_app_revoke_licenses_action_resultable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppRevokeLicensesActionResultable +type IosVppAppRevokeLicensesActionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionFailureReason()(*VppTokenActionFailureReason) + GetActionName()(*string) + GetActionState()(*ActionState) + GetFailedLicensesCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTotalLicensesCount()(*int32) + GetUserId()(*string) + SetActionFailureReason(value *VppTokenActionFailureReason)() + SetActionName(value *string)() + SetActionState(value *ActionState)() + SetFailedLicensesCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTotalLicensesCount(value *int32)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_appable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_appable.go new file mode 100644 index 000000000..be81ba8c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_appable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppAppable +type IosVppAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableDeviceType()(IosDeviceTypeable) + GetAppStoreUrl()(*string) + GetAssignedLicenses()([]IosVppAppAssignedLicenseable) + GetBundleId()(*string) + GetLicensingType()(VppLicensingTypeable) + GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRevokeLicenseActionResults()([]IosVppAppRevokeLicensesActionResultable) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + GetVppTokenAccountType()(*VppTokenAccountType) + GetVppTokenAppleId()(*string) + GetVppTokenId()(*string) + GetVppTokenOrganizationName()(*string) + SetApplicableDeviceType(value IosDeviceTypeable)() + SetAppStoreUrl(value *string)() + SetAssignedLicenses(value []IosVppAppAssignedLicenseable)() + SetBundleId(value *string)() + SetLicensingType(value VppLicensingTypeable)() + SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRevokeLicenseActionResults(value []IosVppAppRevokeLicensesActionResultable)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() + SetVppTokenAccountType(value *VppTokenAccountType)() + SetVppTokenAppleId(value *string)() + SetVppTokenId(value *string)() + SetVppTokenOrganizationName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book.go new file mode 100644 index 000000000..c0dc5f288 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book.go @@ -0,0 +1,279 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBook +type IosVppEBook struct { + ManagedEBook + // The Apple ID associated with Vpp token. + appleId *string + // Genres. + genres []string + // Language. + language *string + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Seller. + seller *string + // Total license count. + totalLicenseCount *int32 + // Used license count. + usedLicenseCount *int32 + // The Vpp token's organization name. + vppOrganizationName *string + // The Vpp token ID. + vppTokenId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewIosVppEBook instantiates a new IosVppEBook and sets the default values. +func NewIosVppEBook()(*IosVppEBook) { + m := &IosVppEBook{ + ManagedEBook: *NewManagedEBook(), + } + odataTypeValue := "#microsoft.graph.iosVppEBook"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosVppEBookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppEBookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppEBook(), nil +} +// GetAppleId gets the appleId property value. The Apple ID associated with Vpp token. +func (m *IosVppEBook) GetAppleId()(*string) { + return m.appleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppEBook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedEBook.GetFieldDeserializers() + res["appleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleId(val) + } + return nil + } + res["genres"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGenres(res) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["seller"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSeller(val) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + res["vppOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppOrganizationName(val) + } + return nil + } + res["vppTokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenId(val) + } + return nil + } + return res +} +// GetGenres gets the genres property value. Genres. +func (m *IosVppEBook) GetGenres()([]string) { + return m.genres +} +// GetLanguage gets the language property value. Language. +func (m *IosVppEBook) GetLanguage()(*string) { + return m.language +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *IosVppEBook) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSeller gets the seller property value. Seller. +func (m *IosVppEBook) GetSeller()(*string) { + return m.seller +} +// GetTotalLicenseCount gets the totalLicenseCount property value. Total license count. +func (m *IosVppEBook) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. Used license count. +func (m *IosVppEBook) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// GetVppOrganizationName gets the vppOrganizationName property value. The Vpp token's organization name. +func (m *IosVppEBook) GetVppOrganizationName()(*string) { + return m.vppOrganizationName +} +// GetVppTokenId gets the vppTokenId property value. The Vpp token ID. +func (m *IosVppEBook) GetVppTokenId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.vppTokenId +} +// Serialize serializes information the current object +func (m *IosVppEBook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedEBook.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appleId", m.GetAppleId()) + if err != nil { + return err + } + } + if m.GetGenres() != nil { + err = writer.WriteCollectionOfStringValues("genres", m.GetGenres()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("seller", m.GetSeller()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppOrganizationName", m.GetVppOrganizationName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("vppTokenId", m.GetVppTokenId()) + if err != nil { + return err + } + } + return nil +} +// SetAppleId sets the appleId property value. The Apple ID associated with Vpp token. +func (m *IosVppEBook) SetAppleId(value *string)() { + m.appleId = value +} +// SetGenres sets the genres property value. Genres. +func (m *IosVppEBook) SetGenres(value []string)() { + m.genres = value +} +// SetLanguage sets the language property value. Language. +func (m *IosVppEBook) SetLanguage(value *string)() { + m.language = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *IosVppEBook) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSeller sets the seller property value. Seller. +func (m *IosVppEBook) SetSeller(value *string)() { + m.seller = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. Total license count. +func (m *IosVppEBook) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. Used license count. +func (m *IosVppEBook) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} +// SetVppOrganizationName sets the vppOrganizationName property value. The Vpp token's organization name. +func (m *IosVppEBook) SetVppOrganizationName(value *string)() { + m.vppOrganizationName = value +} +// SetVppTokenId sets the vppTokenId property value. The Vpp token ID. +func (m *IosVppEBook) SetVppTokenId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.vppTokenId = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment.go new file mode 100644 index 000000000..20a49a298 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookAssignment +type IosVppEBookAssignment struct { + ManagedEBookAssignment +} +// NewIosVppEBookAssignment instantiates a new IosVppEBookAssignment and sets the default values. +func NewIosVppEBookAssignment()(*IosVppEBookAssignment) { + m := &IosVppEBookAssignment{ + ManagedEBookAssignment: *NewManagedEBookAssignment(), + } + return m +} +// CreateIosVppEBookAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppEBookAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppEBookAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppEBookAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedEBookAssignment.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *IosVppEBookAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedEBookAssignment.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_response.go new file mode 100644 index 000000000..dd61d8968 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookAssignmentCollectionResponse +type IosVppEBookAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppEBookAssignmentable +} +// NewIosVppEBookAssignmentCollectionResponse instantiates a new IosVppEBookAssignmentCollectionResponse and sets the default values. +func NewIosVppEBookAssignmentCollectionResponse()(*IosVppEBookAssignmentCollectionResponse) { + m := &IosVppEBookAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppEBookAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppEBookAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppEBookAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppEBookAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppEBookAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppEBookAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(IosVppEBookAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppEBookAssignmentCollectionResponse) GetValue()([]IosVppEBookAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppEBookAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppEBookAssignmentCollectionResponse) SetValue(value []IosVppEBookAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_responseable.go new file mode 100644 index 000000000..6d003f5ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookAssignmentCollectionResponseable +type IosVppEBookAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppEBookAssignmentable) + SetValue(value []IosVppEBookAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignmentable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignmentable.go new file mode 100644 index 000000000..dcdd28904 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_assignmentable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookAssignmentable +type IosVppEBookAssignmentable interface { + ManagedEBookAssignmentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_response.go new file mode 100644 index 000000000..71c610db2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookCollectionResponse +type IosVppEBookCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosVppEBookable +} +// NewIosVppEBookCollectionResponse instantiates a new IosVppEBookCollectionResponse and sets the default values. +func NewIosVppEBookCollectionResponse()(*IosVppEBookCollectionResponse) { + m := &IosVppEBookCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosVppEBookCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosVppEBookCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosVppEBookCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosVppEBookCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosVppEBookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosVppEBookable, len(val)) + for i, v := range val { + res[i] = v.(IosVppEBookable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosVppEBookCollectionResponse) GetValue()([]IosVppEBookable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosVppEBookCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosVppEBookCollectionResponse) SetValue(value []IosVppEBookable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_responseable.go new file mode 100644 index 000000000..29cef46d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_book_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookCollectionResponseable +type IosVppEBookCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosVppEBookable) + SetValue(value []IosVppEBookable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_vpp_e_bookable.go b/src/internal/connector/graph/betasdk/models/ios_vpp_e_bookable.go new file mode 100644 index 000000000..a1b5a6f83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_vpp_e_bookable.go @@ -0,0 +1,30 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosVppEBookable +type IosVppEBookable interface { + ManagedEBookable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppleId()(*string) + GetGenres()([]string) + GetLanguage()(*string) + GetRoleScopeTagIds()([]string) + GetSeller()(*string) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + GetVppOrganizationName()(*string) + GetVppTokenId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetAppleId(value *string)() + SetGenres(value []string)() + SetLanguage(value *string)() + SetRoleScopeTagIds(value []string)() + SetSeller(value *string)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() + SetVppOrganizationName(value *string)() + SetVppTokenId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_wallpaper_display_location.go b/src/internal/connector/graph/betasdk/models/ios_wallpaper_display_location.go new file mode 100644 index 000000000..e622ed320 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_wallpaper_display_location.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IosWallpaperDisplayLocation int + +const ( + // No location specified for wallpaper display. + NOTCONFIGURED_IOSWALLPAPERDISPLAYLOCATION IosWallpaperDisplayLocation = iota + // A configured wallpaper image is displayed on Lock screen. + LOCKSCREEN_IOSWALLPAPERDISPLAYLOCATION + // A configured wallpaper image is displayed on Home (icon list) screen. + HOMESCREEN_IOSWALLPAPERDISPLAYLOCATION + // A configured wallpaper image is displayed on Lock screen and Home screen. + LOCKANDHOMESCREENS_IOSWALLPAPERDISPLAYLOCATION +) + +func (i IosWallpaperDisplayLocation) String() string { + return []string{"notConfigured", "lockScreen", "homeScreen", "lockAndHomeScreens"}[i] +} +func ParseIosWallpaperDisplayLocation(v string) (interface{}, error) { + result := NOTCONFIGURED_IOSWALLPAPERDISPLAYLOCATION + switch v { + case "notConfigured": + result = NOTCONFIGURED_IOSWALLPAPERDISPLAYLOCATION + case "lockScreen": + result = LOCKSCREEN_IOSWALLPAPERDISPLAYLOCATION + case "homeScreen": + result = HOMESCREEN_IOSWALLPAPERDISPLAYLOCATION + case "lockAndHomeScreens": + result = LOCKANDHOMESCREENS_IOSWALLPAPERDISPLAYLOCATION + default: + return 0, errors.New("Unknown IosWallpaperDisplayLocation value: " + v) + } + return &result, nil +} +func SerializeIosWallpaperDisplayLocation(values []IosWallpaperDisplayLocation) []string { + 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/ios_web_content_filter_auto_filter.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_auto_filter.go new file mode 100644 index 000000000..9759c3ef6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_auto_filter.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterAutoFilter +type IosWebContentFilterAutoFilter struct { + IosWebContentFilterBase + // Additional URLs allowed for access + allowedUrls []string + // Additional URLs blocked for access + blockedUrls []string +} +// NewIosWebContentFilterAutoFilter instantiates a new IosWebContentFilterAutoFilter and sets the default values. +func NewIosWebContentFilterAutoFilter()(*IosWebContentFilterAutoFilter) { + m := &IosWebContentFilterAutoFilter{ + IosWebContentFilterBase: *NewIosWebContentFilterBase(), + } + odataTypeValue := "#microsoft.graph.iosWebContentFilterAutoFilter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosWebContentFilterAutoFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosWebContentFilterAutoFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosWebContentFilterAutoFilter(), nil +} +// GetAllowedUrls gets the allowedUrls property value. Additional URLs allowed for access +func (m *IosWebContentFilterAutoFilter) GetAllowedUrls()([]string) { + return m.allowedUrls +} +// GetBlockedUrls gets the blockedUrls property value. Additional URLs blocked for access +func (m *IosWebContentFilterAutoFilter) GetBlockedUrls()([]string) { + return m.blockedUrls +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosWebContentFilterAutoFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosWebContentFilterBase.GetFieldDeserializers() + res["allowedUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedUrls(res) + } + return nil + } + res["blockedUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBlockedUrls(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IosWebContentFilterAutoFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosWebContentFilterBase.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedUrls() != nil { + err = writer.WriteCollectionOfStringValues("allowedUrls", m.GetAllowedUrls()) + if err != nil { + return err + } + } + if m.GetBlockedUrls() != nil { + err = writer.WriteCollectionOfStringValues("blockedUrls", m.GetBlockedUrls()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedUrls sets the allowedUrls property value. Additional URLs allowed for access +func (m *IosWebContentFilterAutoFilter) SetAllowedUrls(value []string)() { + m.allowedUrls = value +} +// SetBlockedUrls sets the blockedUrls property value. Additional URLs blocked for access +func (m *IosWebContentFilterAutoFilter) SetBlockedUrls(value []string)() { + m.blockedUrls = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_web_content_filter_auto_filterable.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_auto_filterable.go new file mode 100644 index 000000000..fab2a8b25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_auto_filterable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterAutoFilterable +type IosWebContentFilterAutoFilterable interface { + IosWebContentFilterBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedUrls()([]string) + GetBlockedUrls()([]string) + SetAllowedUrls(value []string)() + SetBlockedUrls(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_web_content_filter_base.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_base.go new file mode 100644 index 000000000..6c66261e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_base.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterBase represents an iOS Web Content Filter setting base type. An empty and abstract base. Caller should use one of derived types for configurations. +type IosWebContentFilterBase 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 OdataType property + odataType *string +} +// NewIosWebContentFilterBase instantiates a new iosWebContentFilterBase and sets the default values. +func NewIosWebContentFilterBase()(*IosWebContentFilterBase) { + m := &IosWebContentFilterBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIosWebContentFilterBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosWebContentFilterBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosWebContentFilterAutoFilter": + return NewIosWebContentFilterAutoFilter(), nil + case "#microsoft.graph.iosWebContentFilterSpecificWebsitesAccess": + return NewIosWebContentFilterSpecificWebsitesAccess(), nil + } + } + } + } + return NewIosWebContentFilterBase(), 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 *IosWebContentFilterBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosWebContentFilterBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IosWebContentFilterBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IosWebContentFilterBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IosWebContentFilterBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IosWebContentFilterBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_web_content_filter_baseable.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_baseable.go new file mode 100644 index 000000000..77ac6c733 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterBaseable +type IosWebContentFilterBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_access.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_access.go new file mode 100644 index 000000000..ddd4ed2fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_access.go @@ -0,0 +1,104 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterSpecificWebsitesAccess +type IosWebContentFilterSpecificWebsitesAccess struct { + IosWebContentFilterBase + // URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. + specificWebsitesOnly []IosBookmarkable + // URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. + websiteList []IosBookmarkable +} +// NewIosWebContentFilterSpecificWebsitesAccess instantiates a new IosWebContentFilterSpecificWebsitesAccess and sets the default values. +func NewIosWebContentFilterSpecificWebsitesAccess()(*IosWebContentFilterSpecificWebsitesAccess) { + m := &IosWebContentFilterSpecificWebsitesAccess{ + IosWebContentFilterBase: *NewIosWebContentFilterBase(), + } + odataTypeValue := "#microsoft.graph.iosWebContentFilterSpecificWebsitesAccess"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosWebContentFilterSpecificWebsitesAccessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosWebContentFilterSpecificWebsitesAccessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosWebContentFilterSpecificWebsitesAccess(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosWebContentFilterSpecificWebsitesAccess) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosWebContentFilterBase.GetFieldDeserializers() + res["specificWebsitesOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosBookmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosBookmarkable, len(val)) + for i, v := range val { + res[i] = v.(IosBookmarkable) + } + m.SetSpecificWebsitesOnly(res) + } + return nil + } + res["websiteList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosBookmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosBookmarkable, len(val)) + for i, v := range val { + res[i] = v.(IosBookmarkable) + } + m.SetWebsiteList(res) + } + return nil + } + return res +} +// GetSpecificWebsitesOnly gets the specificWebsitesOnly property value. URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. +func (m *IosWebContentFilterSpecificWebsitesAccess) GetSpecificWebsitesOnly()([]IosBookmarkable) { + return m.specificWebsitesOnly +} +// GetWebsiteList gets the websiteList property value. URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. +func (m *IosWebContentFilterSpecificWebsitesAccess) GetWebsiteList()([]IosBookmarkable) { + return m.websiteList +} +// Serialize serializes information the current object +func (m *IosWebContentFilterSpecificWebsitesAccess) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosWebContentFilterBase.Serialize(writer) + if err != nil { + return err + } + if m.GetSpecificWebsitesOnly() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSpecificWebsitesOnly())) + for i, v := range m.GetSpecificWebsitesOnly() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("specificWebsitesOnly", cast) + if err != nil { + return err + } + } + if m.GetWebsiteList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebsiteList())) + for i, v := range m.GetWebsiteList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("websiteList", cast) + if err != nil { + return err + } + } + return nil +} +// SetSpecificWebsitesOnly sets the specificWebsitesOnly property value. URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. +func (m *IosWebContentFilterSpecificWebsitesAccess) SetSpecificWebsitesOnly(value []IosBookmarkable)() { + m.specificWebsitesOnly = value +} +// SetWebsiteList sets the websiteList property value. URL bookmarks which will be installed into built-in browser and user is only allowed to access websites through bookmarks. This collection can contain a maximum of 500 elements. +func (m *IosWebContentFilterSpecificWebsitesAccess) SetWebsiteList(value []IosBookmarkable)() { + m.websiteList = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_accessable.go b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_accessable.go new file mode 100644 index 000000000..b58fd220f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_web_content_filter_specific_websites_accessable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWebContentFilterSpecificWebsitesAccessable +type IosWebContentFilterSpecificWebsitesAccessable interface { + IosWebContentFilterBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSpecificWebsitesOnly()([]IosBookmarkable) + GetWebsiteList()([]IosBookmarkable) + SetSpecificWebsitesOnly(value []IosBookmarkable)() + SetWebsiteList(value []IosBookmarkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration.go new file mode 100644 index 000000000..684b2b3e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration.go @@ -0,0 +1,342 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWiFiConfiguration +type IosWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // If set to true, forces devices connecting using this Wi-Fi profile to present their actual Wi-Fi MAC address instead of a random MAC address. Applies to iOS 14 and later. + disableMacAddressRandomization *bool + // Network Name + networkName *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKey *string + // URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. + proxyAutomaticConfigurationUrl *string + // IP Address or DNS hostname of the proxy server when manual configuration is selected. + proxyManualAddress *string + // Port of the proxy server when manual configuration is selected. + proxyManualPort *int32 + // Wi-Fi Proxy Settings. + proxySettings *WiFiProxySetting + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types. + wiFiSecurityType *WiFiSecurityType +} +// NewIosWiFiConfiguration instantiates a new IosWiFiConfiguration and sets the default values. +func NewIosWiFiConfiguration()(*IosWiFiConfiguration) { + m := &IosWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosEnterpriseWiFiConfiguration": + return NewIosEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewIosWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *IosWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *IosWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetDisableMacAddressRandomization gets the disableMacAddressRandomization property value. If set to true, forces devices connecting using this Wi-Fi profile to present their actual Wi-Fi MAC address instead of a random MAC address. Applies to iOS 14 and later. +func (m *IosWiFiConfiguration) GetDisableMacAddressRandomization()(*bool) { + return m.disableMacAddressRandomization +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["disableMacAddressRandomization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableMacAddressRandomization(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["preSharedKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKey(val) + } + return nil + } + res["proxyAutomaticConfigurationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyAutomaticConfigurationUrl(val) + } + return nil + } + res["proxyManualAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualAddress(val) + } + return nil + } + res["proxyManualPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualPort(val) + } + return nil + } + res["proxySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiProxySetting) + if err != nil { + return err + } + if val != nil { + m.SetProxySettings(val.(*WiFiProxySetting)) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*WiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *IosWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetPreSharedKey gets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *IosWiFiConfiguration) GetPreSharedKey()(*string) { + return m.preSharedKey +} +// GetProxyAutomaticConfigurationUrl gets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *IosWiFiConfiguration) GetProxyAutomaticConfigurationUrl()(*string) { + return m.proxyAutomaticConfigurationUrl +} +// GetProxyManualAddress gets the proxyManualAddress property value. IP Address or DNS hostname of the proxy server when manual configuration is selected. +func (m *IosWiFiConfiguration) GetProxyManualAddress()(*string) { + return m.proxyManualAddress +} +// GetProxyManualPort gets the proxyManualPort property value. Port of the proxy server when manual configuration is selected. +func (m *IosWiFiConfiguration) GetProxyManualPort()(*int32) { + return m.proxyManualPort +} +// GetProxySettings gets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *IosWiFiConfiguration) GetProxySettings()(*WiFiProxySetting) { + return m.proxySettings +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *IosWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types. +func (m *IosWiFiConfiguration) GetWiFiSecurityType()(*WiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *IosWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableMacAddressRandomization", m.GetDisableMacAddressRandomization()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preSharedKey", m.GetPreSharedKey()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyAutomaticConfigurationUrl", m.GetProxyAutomaticConfigurationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyManualAddress", m.GetProxyManualAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("proxyManualPort", m.GetProxyManualPort()) + if err != nil { + return err + } + } + if m.GetProxySettings() != nil { + cast := (*m.GetProxySettings()).String() + err = writer.WriteStringValue("proxySettings", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *IosWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *IosWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetDisableMacAddressRandomization sets the disableMacAddressRandomization property value. If set to true, forces devices connecting using this Wi-Fi profile to present their actual Wi-Fi MAC address instead of a random MAC address. Applies to iOS 14 and later. +func (m *IosWiFiConfiguration) SetDisableMacAddressRandomization(value *bool)() { + m.disableMacAddressRandomization = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *IosWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetPreSharedKey sets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *IosWiFiConfiguration) SetPreSharedKey(value *string)() { + m.preSharedKey = value +} +// SetProxyAutomaticConfigurationUrl sets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *IosWiFiConfiguration) SetProxyAutomaticConfigurationUrl(value *string)() { + m.proxyAutomaticConfigurationUrl = value +} +// SetProxyManualAddress sets the proxyManualAddress property value. IP Address or DNS hostname of the proxy server when manual configuration is selected. +func (m *IosWiFiConfiguration) SetProxyManualAddress(value *string)() { + m.proxyManualAddress = value +} +// SetProxyManualPort sets the proxyManualPort property value. Port of the proxy server when manual configuration is selected. +func (m *IosWiFiConfiguration) SetProxyManualPort(value *int32)() { + m.proxyManualPort = value +} +// SetProxySettings sets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *IosWiFiConfiguration) SetProxySettings(value *WiFiProxySetting)() { + m.proxySettings = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *IosWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types. +func (m *IosWiFiConfiguration) SetWiFiSecurityType(value *WiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..e342d3e8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWiFiConfigurationCollectionResponse +type IosWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosWiFiConfigurationable +} +// NewIosWiFiConfigurationCollectionResponse instantiates a new IosWiFiConfigurationCollectionResponse and sets the default values. +func NewIosWiFiConfigurationCollectionResponse()(*IosWiFiConfigurationCollectionResponse) { + m := &IosWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosWiFiConfigurationCollectionResponse) GetValue()([]IosWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosWiFiConfigurationCollectionResponse) SetValue(value []IosWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..a51de22c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWiFiConfigurationCollectionResponseable +type IosWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosWiFiConfigurationable) + SetValue(value []IosWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ios_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configurationable.go new file mode 100644 index 000000000..e0b6d5e67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ios_wi_fi_configurationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosWiFiConfigurationable +type IosWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetDisableMacAddressRandomization()(*bool) + GetNetworkName()(*string) + GetPreSharedKey()(*string) + GetProxyAutomaticConfigurationUrl()(*string) + GetProxyManualAddress()(*string) + GetProxyManualPort()(*int32) + GetProxySettings()(*WiFiProxySetting) + GetSsid()(*string) + GetWiFiSecurityType()(*WiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetDisableMacAddressRandomization(value *bool)() + SetNetworkName(value *string)() + SetPreSharedKey(value *string)() + SetProxyAutomaticConfigurationUrl(value *string)() + SetProxyManualAddress(value *string)() + SetProxyManualPort(value *int32)() + SetProxySettings(value *WiFiProxySetting)() + SetSsid(value *string)() + SetWiFiSecurityType(value *WiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip.go b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip.go new file mode 100644 index 000000000..aebdf2681 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosiPadOSWebClip +type IosiPadOSWebClip struct { + MobileApp + // The web app URL. + appUrl *string + // Whether or not to use managed browser. When true, the app will be required to be opened in an Intune-protected browser. When false, the app will not be required to be opened in an Intune-protected browser. + useManagedBrowser *bool +} +// NewIosiPadOSWebClip instantiates a new IosiPadOSWebClip and sets the default values. +func NewIosiPadOSWebClip()(*IosiPadOSWebClip) { + m := &IosiPadOSWebClip{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.iosiPadOSWebClip"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosiPadOSWebClipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosiPadOSWebClipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosiPadOSWebClip(), nil +} +// GetAppUrl gets the appUrl property value. The web app URL. +func (m *IosiPadOSWebClip) GetAppUrl()(*string) { + return m.appUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosiPadOSWebClip) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppUrl(val) + } + return nil + } + res["useManagedBrowser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseManagedBrowser(val) + } + return nil + } + return res +} +// GetUseManagedBrowser gets the useManagedBrowser property value. Whether or not to use managed browser. When true, the app will be required to be opened in an Intune-protected browser. When false, the app will not be required to be opened in an Intune-protected browser. +func (m *IosiPadOSWebClip) GetUseManagedBrowser()(*bool) { + return m.useManagedBrowser +} +// Serialize serializes information the current object +func (m *IosiPadOSWebClip) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appUrl", m.GetAppUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useManagedBrowser", m.GetUseManagedBrowser()) + if err != nil { + return err + } + } + return nil +} +// SetAppUrl sets the appUrl property value. The web app URL. +func (m *IosiPadOSWebClip) SetAppUrl(value *string)() { + m.appUrl = value +} +// SetUseManagedBrowser sets the useManagedBrowser property value. Whether or not to use managed browser. When true, the app will be required to be opened in an Intune-protected browser. When false, the app will not be required to be opened in an Intune-protected browser. +func (m *IosiPadOSWebClip) SetUseManagedBrowser(value *bool)() { + m.useManagedBrowser = value +} diff --git a/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_response.go b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_response.go new file mode 100644 index 000000000..d33bbd2d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosiPadOSWebClipCollectionResponse +type IosiPadOSWebClipCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosiPadOSWebClipable +} +// NewIosiPadOSWebClipCollectionResponse instantiates a new IosiPadOSWebClipCollectionResponse and sets the default values. +func NewIosiPadOSWebClipCollectionResponse()(*IosiPadOSWebClipCollectionResponse) { + m := &IosiPadOSWebClipCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosiPadOSWebClipCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosiPadOSWebClipCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosiPadOSWebClipCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosiPadOSWebClipCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosiPadOSWebClipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosiPadOSWebClipable, len(val)) + for i, v := range val { + res[i] = v.(IosiPadOSWebClipable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosiPadOSWebClipCollectionResponse) GetValue()([]IosiPadOSWebClipable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosiPadOSWebClipCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosiPadOSWebClipCollectionResponse) SetValue(value []IosiPadOSWebClipable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_responseable.go b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_responseable.go new file mode 100644 index 000000000..ea44ab7d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clip_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosiPadOSWebClipCollectionResponseable +type IosiPadOSWebClipCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosiPadOSWebClipable) + SetValue(value []IosiPadOSWebClipable)() +} diff --git a/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clipable.go b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clipable.go new file mode 100644 index 000000000..bf030c3c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosi_pad_o_s_web_clipable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosiPadOSWebClipable +type IosiPadOSWebClipable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppUrl()(*string) + GetUseManagedBrowser()(*bool) + SetAppUrl(value *string)() + SetUseManagedBrowser(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration.go new file mode 100644 index 000000000..b0d14d2c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration.go @@ -0,0 +1,638 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosikEv2VpnConfiguration +type IosikEv2VpnConfiguration struct { + IosVpnConfiguration + // Allows the use of child security association parameters by setting all parameters to the device's default unless explicitly specified. + allowDefaultChildSecurityAssociationParameters *bool + // Allows the use of security association parameters by setting all parameters to the device's default unless explicitly specified. + allowDefaultSecurityAssociationParameters *bool + // AlwaysOn Configuration + alwaysOnConfiguration AppleVpnAlwaysOnConfigurationable + // Child Security Association Parameters + childSecurityAssociationParameters IosVpnSecurityAssociationParametersable + // The type of VPN client authentication type + clientAuthenticationType *VpnClientAuthenticationType + // Determine how often to check if a peer connection is still active. . Possible values are: medium, none, low, high. + deadPeerDetectionRate *VpnDeadPeerDetectionRate + // Disable MOBIKE + disableMobilityAndMultihoming *bool + // Disable Redirect + disableRedirect *bool + // Determines if Always on VPN is enabled + enableAlwaysOnConfiguration *bool + // Enables a best-effort revocation check; server response timeouts will not cause it to fail + enableCertificateRevocationCheck *bool + // Enables EAP only authentication + enableEAP *bool + // Enable Perfect Forward Secrecy (PFS). + enablePerfectForwardSecrecy *bool + // Enable Use Internal Subnet Attributes. + enableUseInternalSubnetAttributes *bool + // The type of VPN local identifier + localIdentifier *VpnLocalIdentifier + // Maximum transmission unit. Valid values 1280 to 1400 + mtuSizeInBytes *int32 + // Address of the IKEv2 server. Must be a FQDN, UserFQDN, network address, or ASN1DN + remoteIdentifier *string + // Security Association Parameters + securityAssociationParameters IosVpnSecurityAssociationParametersable + // Common name of the IKEv2 Server Certificate used in Server Authentication + serverCertificateCommonName *string + // Issuer Common name of the IKEv2 Server Certificate issuer used in Authentication + serverCertificateIssuerCommonName *string + // The type of certificate the VPN server will present to the VPN client for authentication. Possible values are: rsa, ecdsa256, ecdsa384, ecdsa521. + serverCertificateType *VpnServerCertificateType + // Used when Shared Secret Authentication is selected + sharedSecret *string + // The maximum TLS version to be used with EAP-TLS authentication + tlsMaximumVersion *string + // The minimum TLS version to be used with EAP-TLS authentication + tlsMinimumVersion *string +} +// NewIosikEv2VpnConfiguration instantiates a new IosikEv2VpnConfiguration and sets the default values. +func NewIosikEv2VpnConfiguration()(*IosikEv2VpnConfiguration) { + m := &IosikEv2VpnConfiguration{ + IosVpnConfiguration: *NewIosVpnConfiguration(), + } + odataTypeValue := "#microsoft.graph.iosikEv2VpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIosikEv2VpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosikEv2VpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosikEv2VpnConfiguration(), nil +} +// GetAllowDefaultChildSecurityAssociationParameters gets the allowDefaultChildSecurityAssociationParameters property value. Allows the use of child security association parameters by setting all parameters to the device's default unless explicitly specified. +func (m *IosikEv2VpnConfiguration) GetAllowDefaultChildSecurityAssociationParameters()(*bool) { + return m.allowDefaultChildSecurityAssociationParameters +} +// GetAllowDefaultSecurityAssociationParameters gets the allowDefaultSecurityAssociationParameters property value. Allows the use of security association parameters by setting all parameters to the device's default unless explicitly specified. +func (m *IosikEv2VpnConfiguration) GetAllowDefaultSecurityAssociationParameters()(*bool) { + return m.allowDefaultSecurityAssociationParameters +} +// GetAlwaysOnConfiguration gets the alwaysOnConfiguration property value. AlwaysOn Configuration +func (m *IosikEv2VpnConfiguration) GetAlwaysOnConfiguration()(AppleVpnAlwaysOnConfigurationable) { + return m.alwaysOnConfiguration +} +// GetChildSecurityAssociationParameters gets the childSecurityAssociationParameters property value. Child Security Association Parameters +func (m *IosikEv2VpnConfiguration) GetChildSecurityAssociationParameters()(IosVpnSecurityAssociationParametersable) { + return m.childSecurityAssociationParameters +} +// GetClientAuthenticationType gets the clientAuthenticationType property value. The type of VPN client authentication type +func (m *IosikEv2VpnConfiguration) GetClientAuthenticationType()(*VpnClientAuthenticationType) { + return m.clientAuthenticationType +} +// GetDeadPeerDetectionRate gets the deadPeerDetectionRate property value. Determine how often to check if a peer connection is still active. . Possible values are: medium, none, low, high. +func (m *IosikEv2VpnConfiguration) GetDeadPeerDetectionRate()(*VpnDeadPeerDetectionRate) { + return m.deadPeerDetectionRate +} +// GetDisableMobilityAndMultihoming gets the disableMobilityAndMultihoming property value. Disable MOBIKE +func (m *IosikEv2VpnConfiguration) GetDisableMobilityAndMultihoming()(*bool) { + return m.disableMobilityAndMultihoming +} +// GetDisableRedirect gets the disableRedirect property value. Disable Redirect +func (m *IosikEv2VpnConfiguration) GetDisableRedirect()(*bool) { + return m.disableRedirect +} +// GetEnableAlwaysOnConfiguration gets the enableAlwaysOnConfiguration property value. Determines if Always on VPN is enabled +func (m *IosikEv2VpnConfiguration) GetEnableAlwaysOnConfiguration()(*bool) { + return m.enableAlwaysOnConfiguration +} +// GetEnableCertificateRevocationCheck gets the enableCertificateRevocationCheck property value. Enables a best-effort revocation check; server response timeouts will not cause it to fail +func (m *IosikEv2VpnConfiguration) GetEnableCertificateRevocationCheck()(*bool) { + return m.enableCertificateRevocationCheck +} +// GetEnableEAP gets the enableEAP property value. Enables EAP only authentication +func (m *IosikEv2VpnConfiguration) GetEnableEAP()(*bool) { + return m.enableEAP +} +// GetEnablePerfectForwardSecrecy gets the enablePerfectForwardSecrecy property value. Enable Perfect Forward Secrecy (PFS). +func (m *IosikEv2VpnConfiguration) GetEnablePerfectForwardSecrecy()(*bool) { + return m.enablePerfectForwardSecrecy +} +// GetEnableUseInternalSubnetAttributes gets the enableUseInternalSubnetAttributes property value. Enable Use Internal Subnet Attributes. +func (m *IosikEv2VpnConfiguration) GetEnableUseInternalSubnetAttributes()(*bool) { + return m.enableUseInternalSubnetAttributes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosikEv2VpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IosVpnConfiguration.GetFieldDeserializers() + res["allowDefaultChildSecurityAssociationParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowDefaultChildSecurityAssociationParameters(val) + } + return nil + } + res["allowDefaultSecurityAssociationParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowDefaultSecurityAssociationParameters(val) + } + return nil + } + res["alwaysOnConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppleVpnAlwaysOnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlwaysOnConfiguration(val.(AppleVpnAlwaysOnConfigurationable)) + } + return nil + } + res["childSecurityAssociationParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosVpnSecurityAssociationParametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChildSecurityAssociationParameters(val.(IosVpnSecurityAssociationParametersable)) + } + return nil + } + res["clientAuthenticationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnClientAuthenticationType) + if err != nil { + return err + } + if val != nil { + m.SetClientAuthenticationType(val.(*VpnClientAuthenticationType)) + } + return nil + } + res["deadPeerDetectionRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnDeadPeerDetectionRate) + if err != nil { + return err + } + if val != nil { + m.SetDeadPeerDetectionRate(val.(*VpnDeadPeerDetectionRate)) + } + return nil + } + res["disableMobilityAndMultihoming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableMobilityAndMultihoming(val) + } + return nil + } + res["disableRedirect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableRedirect(val) + } + return nil + } + res["enableAlwaysOnConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableAlwaysOnConfiguration(val) + } + return nil + } + res["enableCertificateRevocationCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableCertificateRevocationCheck(val) + } + return nil + } + res["enableEAP"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableEAP(val) + } + return nil + } + res["enablePerfectForwardSecrecy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnablePerfectForwardSecrecy(val) + } + return nil + } + res["enableUseInternalSubnetAttributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableUseInternalSubnetAttributes(val) + } + return nil + } + res["localIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnLocalIdentifier) + if err != nil { + return err + } + if val != nil { + m.SetLocalIdentifier(val.(*VpnLocalIdentifier)) + } + return nil + } + res["mtuSizeInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMtuSizeInBytes(val) + } + return nil + } + res["remoteIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteIdentifier(val) + } + return nil + } + res["securityAssociationParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosVpnSecurityAssociationParametersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurityAssociationParameters(val.(IosVpnSecurityAssociationParametersable)) + } + return nil + } + res["serverCertificateCommonName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerCertificateCommonName(val) + } + return nil + } + res["serverCertificateIssuerCommonName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerCertificateIssuerCommonName(val) + } + return nil + } + res["serverCertificateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVpnServerCertificateType) + if err != nil { + return err + } + if val != nil { + m.SetServerCertificateType(val.(*VpnServerCertificateType)) + } + return nil + } + res["sharedSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSharedSecret(val) + } + return nil + } + res["tlsMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTlsMaximumVersion(val) + } + return nil + } + res["tlsMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTlsMinimumVersion(val) + } + return nil + } + return res +} +// GetLocalIdentifier gets the localIdentifier property value. The type of VPN local identifier +func (m *IosikEv2VpnConfiguration) GetLocalIdentifier()(*VpnLocalIdentifier) { + return m.localIdentifier +} +// GetMtuSizeInBytes gets the mtuSizeInBytes property value. Maximum transmission unit. Valid values 1280 to 1400 +func (m *IosikEv2VpnConfiguration) GetMtuSizeInBytes()(*int32) { + return m.mtuSizeInBytes +} +// GetRemoteIdentifier gets the remoteIdentifier property value. Address of the IKEv2 server. Must be a FQDN, UserFQDN, network address, or ASN1DN +func (m *IosikEv2VpnConfiguration) GetRemoteIdentifier()(*string) { + return m.remoteIdentifier +} +// GetSecurityAssociationParameters gets the securityAssociationParameters property value. Security Association Parameters +func (m *IosikEv2VpnConfiguration) GetSecurityAssociationParameters()(IosVpnSecurityAssociationParametersable) { + return m.securityAssociationParameters +} +// GetServerCertificateCommonName gets the serverCertificateCommonName property value. Common name of the IKEv2 Server Certificate used in Server Authentication +func (m *IosikEv2VpnConfiguration) GetServerCertificateCommonName()(*string) { + return m.serverCertificateCommonName +} +// GetServerCertificateIssuerCommonName gets the serverCertificateIssuerCommonName property value. Issuer Common name of the IKEv2 Server Certificate issuer used in Authentication +func (m *IosikEv2VpnConfiguration) GetServerCertificateIssuerCommonName()(*string) { + return m.serverCertificateIssuerCommonName +} +// GetServerCertificateType gets the serverCertificateType property value. The type of certificate the VPN server will present to the VPN client for authentication. Possible values are: rsa, ecdsa256, ecdsa384, ecdsa521. +func (m *IosikEv2VpnConfiguration) GetServerCertificateType()(*VpnServerCertificateType) { + return m.serverCertificateType +} +// GetSharedSecret gets the sharedSecret property value. Used when Shared Secret Authentication is selected +func (m *IosikEv2VpnConfiguration) GetSharedSecret()(*string) { + return m.sharedSecret +} +// GetTlsMaximumVersion gets the tlsMaximumVersion property value. The maximum TLS version to be used with EAP-TLS authentication +func (m *IosikEv2VpnConfiguration) GetTlsMaximumVersion()(*string) { + return m.tlsMaximumVersion +} +// GetTlsMinimumVersion gets the tlsMinimumVersion property value. The minimum TLS version to be used with EAP-TLS authentication +func (m *IosikEv2VpnConfiguration) GetTlsMinimumVersion()(*string) { + return m.tlsMinimumVersion +} +// Serialize serializes information the current object +func (m *IosikEv2VpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IosVpnConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowDefaultChildSecurityAssociationParameters", m.GetAllowDefaultChildSecurityAssociationParameters()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowDefaultSecurityAssociationParameters", m.GetAllowDefaultSecurityAssociationParameters()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("alwaysOnConfiguration", m.GetAlwaysOnConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("childSecurityAssociationParameters", m.GetChildSecurityAssociationParameters()) + if err != nil { + return err + } + } + if m.GetClientAuthenticationType() != nil { + cast := (*m.GetClientAuthenticationType()).String() + err = writer.WriteStringValue("clientAuthenticationType", &cast) + if err != nil { + return err + } + } + if m.GetDeadPeerDetectionRate() != nil { + cast := (*m.GetDeadPeerDetectionRate()).String() + err = writer.WriteStringValue("deadPeerDetectionRate", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableMobilityAndMultihoming", m.GetDisableMobilityAndMultihoming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableRedirect", m.GetDisableRedirect()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableAlwaysOnConfiguration", m.GetEnableAlwaysOnConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableCertificateRevocationCheck", m.GetEnableCertificateRevocationCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableEAP", m.GetEnableEAP()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enablePerfectForwardSecrecy", m.GetEnablePerfectForwardSecrecy()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableUseInternalSubnetAttributes", m.GetEnableUseInternalSubnetAttributes()) + if err != nil { + return err + } + } + if m.GetLocalIdentifier() != nil { + cast := (*m.GetLocalIdentifier()).String() + err = writer.WriteStringValue("localIdentifier", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mtuSizeInBytes", m.GetMtuSizeInBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remoteIdentifier", m.GetRemoteIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("securityAssociationParameters", m.GetSecurityAssociationParameters()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serverCertificateCommonName", m.GetServerCertificateCommonName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serverCertificateIssuerCommonName", m.GetServerCertificateIssuerCommonName()) + if err != nil { + return err + } + } + if m.GetServerCertificateType() != nil { + cast := (*m.GetServerCertificateType()).String() + err = writer.WriteStringValue("serverCertificateType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sharedSecret", m.GetSharedSecret()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tlsMaximumVersion", m.GetTlsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tlsMinimumVersion", m.GetTlsMinimumVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAllowDefaultChildSecurityAssociationParameters sets the allowDefaultChildSecurityAssociationParameters property value. Allows the use of child security association parameters by setting all parameters to the device's default unless explicitly specified. +func (m *IosikEv2VpnConfiguration) SetAllowDefaultChildSecurityAssociationParameters(value *bool)() { + m.allowDefaultChildSecurityAssociationParameters = value +} +// SetAllowDefaultSecurityAssociationParameters sets the allowDefaultSecurityAssociationParameters property value. Allows the use of security association parameters by setting all parameters to the device's default unless explicitly specified. +func (m *IosikEv2VpnConfiguration) SetAllowDefaultSecurityAssociationParameters(value *bool)() { + m.allowDefaultSecurityAssociationParameters = value +} +// SetAlwaysOnConfiguration sets the alwaysOnConfiguration property value. AlwaysOn Configuration +func (m *IosikEv2VpnConfiguration) SetAlwaysOnConfiguration(value AppleVpnAlwaysOnConfigurationable)() { + m.alwaysOnConfiguration = value +} +// SetChildSecurityAssociationParameters sets the childSecurityAssociationParameters property value. Child Security Association Parameters +func (m *IosikEv2VpnConfiguration) SetChildSecurityAssociationParameters(value IosVpnSecurityAssociationParametersable)() { + m.childSecurityAssociationParameters = value +} +// SetClientAuthenticationType sets the clientAuthenticationType property value. The type of VPN client authentication type +func (m *IosikEv2VpnConfiguration) SetClientAuthenticationType(value *VpnClientAuthenticationType)() { + m.clientAuthenticationType = value +} +// SetDeadPeerDetectionRate sets the deadPeerDetectionRate property value. Determine how often to check if a peer connection is still active. . Possible values are: medium, none, low, high. +func (m *IosikEv2VpnConfiguration) SetDeadPeerDetectionRate(value *VpnDeadPeerDetectionRate)() { + m.deadPeerDetectionRate = value +} +// SetDisableMobilityAndMultihoming sets the disableMobilityAndMultihoming property value. Disable MOBIKE +func (m *IosikEv2VpnConfiguration) SetDisableMobilityAndMultihoming(value *bool)() { + m.disableMobilityAndMultihoming = value +} +// SetDisableRedirect sets the disableRedirect property value. Disable Redirect +func (m *IosikEv2VpnConfiguration) SetDisableRedirect(value *bool)() { + m.disableRedirect = value +} +// SetEnableAlwaysOnConfiguration sets the enableAlwaysOnConfiguration property value. Determines if Always on VPN is enabled +func (m *IosikEv2VpnConfiguration) SetEnableAlwaysOnConfiguration(value *bool)() { + m.enableAlwaysOnConfiguration = value +} +// SetEnableCertificateRevocationCheck sets the enableCertificateRevocationCheck property value. Enables a best-effort revocation check; server response timeouts will not cause it to fail +func (m *IosikEv2VpnConfiguration) SetEnableCertificateRevocationCheck(value *bool)() { + m.enableCertificateRevocationCheck = value +} +// SetEnableEAP sets the enableEAP property value. Enables EAP only authentication +func (m *IosikEv2VpnConfiguration) SetEnableEAP(value *bool)() { + m.enableEAP = value +} +// SetEnablePerfectForwardSecrecy sets the enablePerfectForwardSecrecy property value. Enable Perfect Forward Secrecy (PFS). +func (m *IosikEv2VpnConfiguration) SetEnablePerfectForwardSecrecy(value *bool)() { + m.enablePerfectForwardSecrecy = value +} +// SetEnableUseInternalSubnetAttributes sets the enableUseInternalSubnetAttributes property value. Enable Use Internal Subnet Attributes. +func (m *IosikEv2VpnConfiguration) SetEnableUseInternalSubnetAttributes(value *bool)() { + m.enableUseInternalSubnetAttributes = value +} +// SetLocalIdentifier sets the localIdentifier property value. The type of VPN local identifier +func (m *IosikEv2VpnConfiguration) SetLocalIdentifier(value *VpnLocalIdentifier)() { + m.localIdentifier = value +} +// SetMtuSizeInBytes sets the mtuSizeInBytes property value. Maximum transmission unit. Valid values 1280 to 1400 +func (m *IosikEv2VpnConfiguration) SetMtuSizeInBytes(value *int32)() { + m.mtuSizeInBytes = value +} +// SetRemoteIdentifier sets the remoteIdentifier property value. Address of the IKEv2 server. Must be a FQDN, UserFQDN, network address, or ASN1DN +func (m *IosikEv2VpnConfiguration) SetRemoteIdentifier(value *string)() { + m.remoteIdentifier = value +} +// SetSecurityAssociationParameters sets the securityAssociationParameters property value. Security Association Parameters +func (m *IosikEv2VpnConfiguration) SetSecurityAssociationParameters(value IosVpnSecurityAssociationParametersable)() { + m.securityAssociationParameters = value +} +// SetServerCertificateCommonName sets the serverCertificateCommonName property value. Common name of the IKEv2 Server Certificate used in Server Authentication +func (m *IosikEv2VpnConfiguration) SetServerCertificateCommonName(value *string)() { + m.serverCertificateCommonName = value +} +// SetServerCertificateIssuerCommonName sets the serverCertificateIssuerCommonName property value. Issuer Common name of the IKEv2 Server Certificate issuer used in Authentication +func (m *IosikEv2VpnConfiguration) SetServerCertificateIssuerCommonName(value *string)() { + m.serverCertificateIssuerCommonName = value +} +// SetServerCertificateType sets the serverCertificateType property value. The type of certificate the VPN server will present to the VPN client for authentication. Possible values are: rsa, ecdsa256, ecdsa384, ecdsa521. +func (m *IosikEv2VpnConfiguration) SetServerCertificateType(value *VpnServerCertificateType)() { + m.serverCertificateType = value +} +// SetSharedSecret sets the sharedSecret property value. Used when Shared Secret Authentication is selected +func (m *IosikEv2VpnConfiguration) SetSharedSecret(value *string)() { + m.sharedSecret = value +} +// SetTlsMaximumVersion sets the tlsMaximumVersion property value. The maximum TLS version to be used with EAP-TLS authentication +func (m *IosikEv2VpnConfiguration) SetTlsMaximumVersion(value *string)() { + m.tlsMaximumVersion = value +} +// SetTlsMinimumVersion sets the tlsMinimumVersion property value. The minimum TLS version to be used with EAP-TLS authentication +func (m *IosikEv2VpnConfiguration) SetTlsMinimumVersion(value *string)() { + m.tlsMinimumVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_response.go new file mode 100644 index 000000000..0c8f53af5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosikEv2VpnConfigurationCollectionResponse +type IosikEv2VpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IosikEv2VpnConfigurationable +} +// NewIosikEv2VpnConfigurationCollectionResponse instantiates a new IosikEv2VpnConfigurationCollectionResponse and sets the default values. +func NewIosikEv2VpnConfigurationCollectionResponse()(*IosikEv2VpnConfigurationCollectionResponse) { + m := &IosikEv2VpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIosikEv2VpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIosikEv2VpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIosikEv2VpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IosikEv2VpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIosikEv2VpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IosikEv2VpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(IosikEv2VpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IosikEv2VpnConfigurationCollectionResponse) GetValue()([]IosikEv2VpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IosikEv2VpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IosikEv2VpnConfigurationCollectionResponse) SetValue(value []IosikEv2VpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..e68711e02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosikEv2VpnConfigurationCollectionResponseable +type IosikEv2VpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IosikEv2VpnConfigurationable) + SetValue(value []IosikEv2VpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configurationable.go new file mode 100644 index 000000000..8110a3753 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/iosik_ev2_vpn_configurationable.go @@ -0,0 +1,57 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IosikEv2VpnConfigurationable +type IosikEv2VpnConfigurationable interface { + IosVpnConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowDefaultChildSecurityAssociationParameters()(*bool) + GetAllowDefaultSecurityAssociationParameters()(*bool) + GetAlwaysOnConfiguration()(AppleVpnAlwaysOnConfigurationable) + GetChildSecurityAssociationParameters()(IosVpnSecurityAssociationParametersable) + GetClientAuthenticationType()(*VpnClientAuthenticationType) + GetDeadPeerDetectionRate()(*VpnDeadPeerDetectionRate) + GetDisableMobilityAndMultihoming()(*bool) + GetDisableRedirect()(*bool) + GetEnableAlwaysOnConfiguration()(*bool) + GetEnableCertificateRevocationCheck()(*bool) + GetEnableEAP()(*bool) + GetEnablePerfectForwardSecrecy()(*bool) + GetEnableUseInternalSubnetAttributes()(*bool) + GetLocalIdentifier()(*VpnLocalIdentifier) + GetMtuSizeInBytes()(*int32) + GetRemoteIdentifier()(*string) + GetSecurityAssociationParameters()(IosVpnSecurityAssociationParametersable) + GetServerCertificateCommonName()(*string) + GetServerCertificateIssuerCommonName()(*string) + GetServerCertificateType()(*VpnServerCertificateType) + GetSharedSecret()(*string) + GetTlsMaximumVersion()(*string) + GetTlsMinimumVersion()(*string) + SetAllowDefaultChildSecurityAssociationParameters(value *bool)() + SetAllowDefaultSecurityAssociationParameters(value *bool)() + SetAlwaysOnConfiguration(value AppleVpnAlwaysOnConfigurationable)() + SetChildSecurityAssociationParameters(value IosVpnSecurityAssociationParametersable)() + SetClientAuthenticationType(value *VpnClientAuthenticationType)() + SetDeadPeerDetectionRate(value *VpnDeadPeerDetectionRate)() + SetDisableMobilityAndMultihoming(value *bool)() + SetDisableRedirect(value *bool)() + SetEnableAlwaysOnConfiguration(value *bool)() + SetEnableCertificateRevocationCheck(value *bool)() + SetEnableEAP(value *bool)() + SetEnablePerfectForwardSecrecy(value *bool)() + SetEnableUseInternalSubnetAttributes(value *bool)() + SetLocalIdentifier(value *VpnLocalIdentifier)() + SetMtuSizeInBytes(value *int32)() + SetRemoteIdentifier(value *string)() + SetSecurityAssociationParameters(value IosVpnSecurityAssociationParametersable)() + SetServerCertificateCommonName(value *string)() + SetServerCertificateIssuerCommonName(value *string)() + SetServerCertificateType(value *VpnServerCertificateType)() + SetSharedSecret(value *string)() + SetTlsMaximumVersion(value *string)() + SetTlsMinimumVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_application_segment.go b/src/internal/connector/graph/betasdk/models/ip_application_segment.go new file mode 100644 index 000000000..d538b4411 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_application_segment.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpApplicationSegment +type IpApplicationSegment struct { + ApplicationSegment + // The destinationHost property + destinationHost *string + // The port property + port *int32 +} +// NewIpApplicationSegment instantiates a new IpApplicationSegment and sets the default values. +func NewIpApplicationSegment()(*IpApplicationSegment) { + m := &IpApplicationSegment{ + ApplicationSegment: *NewApplicationSegment(), + } + odataTypeValue := "#microsoft.graph.ipApplicationSegment"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIpApplicationSegmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpApplicationSegmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpApplicationSegment(), nil +} +// GetDestinationHost gets the destinationHost property value. The destinationHost property +func (m *IpApplicationSegment) GetDestinationHost()(*string) { + return m.destinationHost +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpApplicationSegment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ApplicationSegment.GetFieldDeserializers() + res["destinationHost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationHost(val) + } + return nil + } + res["port"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPort(val) + } + return nil + } + return res +} +// GetPort gets the port property value. The port property +func (m *IpApplicationSegment) GetPort()(*int32) { + return m.port +} +// Serialize serializes information the current object +func (m *IpApplicationSegment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ApplicationSegment.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("destinationHost", m.GetDestinationHost()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("port", m.GetPort()) + if err != nil { + return err + } + } + return nil +} +// SetDestinationHost sets the destinationHost property value. The destinationHost property +func (m *IpApplicationSegment) SetDestinationHost(value *string)() { + m.destinationHost = value +} +// SetPort sets the port property value. The port property +func (m *IpApplicationSegment) SetPort(value *int32)() { + m.port = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_response.go new file mode 100644 index 000000000..4f493b4ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpApplicationSegmentCollectionResponse +type IpApplicationSegmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpApplicationSegmentable +} +// NewIpApplicationSegmentCollectionResponse instantiates a new IpApplicationSegmentCollectionResponse and sets the default values. +func NewIpApplicationSegmentCollectionResponse()(*IpApplicationSegmentCollectionResponse) { + m := &IpApplicationSegmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpApplicationSegmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpApplicationSegmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpApplicationSegmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpApplicationSegmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpApplicationSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpApplicationSegmentable, len(val)) + for i, v := range val { + res[i] = v.(IpApplicationSegmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpApplicationSegmentCollectionResponse) GetValue()([]IpApplicationSegmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpApplicationSegmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpApplicationSegmentCollectionResponse) SetValue(value []IpApplicationSegmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_responseable.go new file mode 100644 index 000000000..a18973f31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_application_segment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpApplicationSegmentCollectionResponseable +type IpApplicationSegmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpApplicationSegmentable) + SetValue(value []IpApplicationSegmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_application_segmentable.go b/src/internal/connector/graph/betasdk/models/ip_application_segmentable.go new file mode 100644 index 000000000..036eb5644 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_application_segmentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpApplicationSegmentable +type IpApplicationSegmentable interface { + ApplicationSegmentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDestinationHost()(*string) + GetPort()(*int32) + SetDestinationHost(value *string)() + SetPort(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_category.go b/src/internal/connector/graph/betasdk/models/ip_category.go new file mode 100644 index 000000000..e1d8ff269 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_category.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpCategory +type IpCategory 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 description property + description *string + // The name property + name *string + // The OdataType property + odataType *string + // The vendor property + vendor_escaped *string +} +// NewIpCategory instantiates a new ipCategory and sets the default values. +func NewIpCategory()(*IpCategory) { + m := &IpCategory{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIpCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpCategory(), 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 *IpCategory) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +func (m *IpCategory) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *IpCategory) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IpCategory) GetOdataType()(*string) { + return m.odataType +} +// GetVendor gets the vendor property value. The vendor property +func (m *IpCategory) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *IpCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *IpCategory) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *IpCategory) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name property +func (m *IpCategory) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IpCategory) SetOdataType(value *string)() { + m.odataType = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *IpCategory) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_category_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_category_collection_response.go new file mode 100644 index 000000000..dae596f11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpCategoryCollectionResponse +type IpCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpCategoryable +} +// NewIpCategoryCollectionResponse instantiates a new IpCategoryCollectionResponse and sets the default values. +func NewIpCategoryCollectionResponse()(*IpCategoryCollectionResponse) { + m := &IpCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpCategoryable, len(val)) + for i, v := range val { + res[i] = v.(IpCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpCategoryCollectionResponse) GetValue()([]IpCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpCategoryCollectionResponse) SetValue(value []IpCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_category_collection_responseable.go new file mode 100644 index 000000000..6d3d0415f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpCategoryCollectionResponseable +type IpCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpCategoryable) + SetValue(value []IpCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_categoryable.go b/src/internal/connector/graph/betasdk/models/ip_categoryable.go new file mode 100644 index 000000000..308e7421e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_categoryable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpCategoryable +type IpCategoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetOdataType()(*string) + GetVendor()(*string) + SetDescription(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_named_location.go b/src/internal/connector/graph/betasdk/models/ip_named_location.go new file mode 100644 index 000000000..8b7e2dabe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_named_location.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpNamedLocation +type IpNamedLocation struct { + NamedLocation + // List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. Required. + ipRanges []IpRangeable + // true if this location is explicitly trusted. Optional. Default value is false. + isTrusted *bool +} +// NewIpNamedLocation instantiates a new IpNamedLocation and sets the default values. +func NewIpNamedLocation()(*IpNamedLocation) { + m := &IpNamedLocation{ + NamedLocation: *NewNamedLocation(), + } + return m +} +// CreateIpNamedLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpNamedLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpNamedLocation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpNamedLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.NamedLocation.GetFieldDeserializers() + res["ipRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetIpRanges(res) + } + return nil + } + res["isTrusted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTrusted(val) + } + return nil + } + return res +} +// GetIpRanges gets the ipRanges property value. List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. Required. +func (m *IpNamedLocation) GetIpRanges()([]IpRangeable) { + return m.ipRanges +} +// GetIsTrusted gets the isTrusted property value. true if this location is explicitly trusted. Optional. Default value is false. +func (m *IpNamedLocation) GetIsTrusted()(*bool) { + return m.isTrusted +} +// Serialize serializes information the current object +func (m *IpNamedLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.NamedLocation.Serialize(writer) + if err != nil { + return err + } + if m.GetIpRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIpRanges())) + for i, v := range m.GetIpRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ipRanges", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTrusted", m.GetIsTrusted()) + if err != nil { + return err + } + } + return nil +} +// SetIpRanges sets the ipRanges property value. List of IP address ranges in IPv4 CIDR format (e.g. 1.2.3.4/32) or any allowable IPv6 format from IETF RFC596. Required. +func (m *IpNamedLocation) SetIpRanges(value []IpRangeable)() { + m.ipRanges = value +} +// SetIsTrusted sets the isTrusted property value. true if this location is explicitly trusted. Optional. Default value is false. +func (m *IpNamedLocation) SetIsTrusted(value *bool)() { + m.isTrusted = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_named_location_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_named_location_collection_response.go new file mode 100644 index 000000000..91cdb7de8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_named_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpNamedLocationCollectionResponse +type IpNamedLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpNamedLocationable +} +// NewIpNamedLocationCollectionResponse instantiates a new IpNamedLocationCollectionResponse and sets the default values. +func NewIpNamedLocationCollectionResponse()(*IpNamedLocationCollectionResponse) { + m := &IpNamedLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpNamedLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpNamedLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpNamedLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpNamedLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpNamedLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpNamedLocationable, len(val)) + for i, v := range val { + res[i] = v.(IpNamedLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpNamedLocationCollectionResponse) GetValue()([]IpNamedLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpNamedLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpNamedLocationCollectionResponse) SetValue(value []IpNamedLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_named_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_named_location_collection_responseable.go new file mode 100644 index 000000000..14a0066e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_named_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpNamedLocationCollectionResponseable +type IpNamedLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpNamedLocationable) + SetValue(value []IpNamedLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_named_locationable.go b/src/internal/connector/graph/betasdk/models/ip_named_locationable.go new file mode 100644 index 000000000..be31d2fad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_named_locationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpNamedLocationable +type IpNamedLocationable interface { + NamedLocationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIpRanges()([]IpRangeable) + GetIsTrusted()(*bool) + SetIpRanges(value []IpRangeable)() + SetIsTrusted(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_range.go b/src/internal/connector/graph/betasdk/models/ip_range.go new file mode 100644 index 000000000..428613785 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_range.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpRange +type IpRange 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 OdataType property + odataType *string +} +// NewIpRange instantiates a new ipRange and sets the default values. +func NewIpRange()(*IpRange) { + m := &IpRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIpRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iPv4CidrRange": + return NewIPv4CidrRange(), nil + case "#microsoft.graph.iPv4Range": + return NewIPv4Range(), nil + case "#microsoft.graph.iPv6CidrRange": + return NewIPv6CidrRange(), nil + case "#microsoft.graph.iPv6Range": + return NewIPv6Range(), nil + } + } + } + } + return NewIpRange(), 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 *IpRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IpRange) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *IpRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *IpRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IpRange) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_range_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_range_collection_response.go new file mode 100644 index 000000000..082a554ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpRangeCollectionResponse +type IpRangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpRangeable +} +// NewIpRangeCollectionResponse instantiates a new IpRangeCollectionResponse and sets the default values. +func NewIpRangeCollectionResponse()(*IpRangeCollectionResponse) { + m := &IpRangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpRangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpRangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpRangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpRangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpRangeCollectionResponse) GetValue()([]IpRangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpRangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpRangeCollectionResponse) SetValue(value []IpRangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_range_collection_responseable.go new file mode 100644 index 000000000..7d37f75eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpRangeCollectionResponseable +type IpRangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpRangeable) + SetValue(value []IpRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_rangeable.go b/src/internal/connector/graph/betasdk/models/ip_rangeable.go new file mode 100644 index 000000000..4e85b9df2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_rangeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpRangeable +type IpRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_reference_data.go b/src/internal/connector/graph/betasdk/models/ip_reference_data.go new file mode 100644 index 000000000..5990af79c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_reference_data.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpReferenceData +type IpReferenceData 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 asn property + asn *int64 + // The city property + city *string + // The countryOrRegionCode property + countryOrRegionCode *string + // The OdataType property + odataType *string + // The organization property + organization *string + // The state property + state *string + // The vendor property + vendor_escaped *string +} +// NewIpReferenceData instantiates a new ipReferenceData and sets the default values. +func NewIpReferenceData()(*IpReferenceData) { + m := &IpReferenceData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIpReferenceDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpReferenceDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpReferenceData(), 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 *IpReferenceData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAsn gets the asn property value. The asn property +func (m *IpReferenceData) GetAsn()(*int64) { + return m.asn +} +// GetCity gets the city property value. The city property +func (m *IpReferenceData) GetCity()(*string) { + return m.city +} +// GetCountryOrRegionCode gets the countryOrRegionCode property value. The countryOrRegionCode property +func (m *IpReferenceData) GetCountryOrRegionCode()(*string) { + return m.countryOrRegionCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpReferenceData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["asn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetAsn(val) + } + return nil + } + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryOrRegionCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryOrRegionCode(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["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganization(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IpReferenceData) GetOdataType()(*string) { + return m.odataType +} +// GetOrganization gets the organization property value. The organization property +func (m *IpReferenceData) GetOrganization()(*string) { + return m.organization +} +// GetState gets the state property value. The state property +func (m *IpReferenceData) GetState()(*string) { + return m.state +} +// GetVendor gets the vendor property value. The vendor property +func (m *IpReferenceData) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *IpReferenceData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("asn", m.GetAsn()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("countryOrRegionCode", m.GetCountryOrRegionCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *IpReferenceData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAsn sets the asn property value. The asn property +func (m *IpReferenceData) SetAsn(value *int64)() { + m.asn = value +} +// SetCity sets the city property value. The city property +func (m *IpReferenceData) SetCity(value *string)() { + m.city = value +} +// SetCountryOrRegionCode sets the countryOrRegionCode property value. The countryOrRegionCode property +func (m *IpReferenceData) SetCountryOrRegionCode(value *string)() { + m.countryOrRegionCode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IpReferenceData) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrganization sets the organization property value. The organization property +func (m *IpReferenceData) SetOrganization(value *string)() { + m.organization = value +} +// SetState sets the state property value. The state property +func (m *IpReferenceData) SetState(value *string)() { + m.state = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *IpReferenceData) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_response.go new file mode 100644 index 000000000..dd5094406 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpReferenceDataCollectionResponse +type IpReferenceDataCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpReferenceDataable +} +// NewIpReferenceDataCollectionResponse instantiates a new IpReferenceDataCollectionResponse and sets the default values. +func NewIpReferenceDataCollectionResponse()(*IpReferenceDataCollectionResponse) { + m := &IpReferenceDataCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpReferenceDataCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpReferenceDataCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpReferenceDataCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpReferenceDataCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpReferenceDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpReferenceDataable, len(val)) + for i, v := range val { + res[i] = v.(IpReferenceDataable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpReferenceDataCollectionResponse) GetValue()([]IpReferenceDataable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpReferenceDataCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpReferenceDataCollectionResponse) SetValue(value []IpReferenceDataable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_responseable.go new file mode 100644 index 000000000..662ccac41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_reference_data_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpReferenceDataCollectionResponseable +type IpReferenceDataCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpReferenceDataable) + SetValue(value []IpReferenceDataable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_reference_dataable.go b/src/internal/connector/graph/betasdk/models/ip_reference_dataable.go new file mode 100644 index 000000000..b3a41b8a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_reference_dataable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpReferenceDataable +type IpReferenceDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAsn()(*int64) + GetCity()(*string) + GetCountryOrRegionCode()(*string) + GetOdataType()(*string) + GetOrganization()(*string) + GetState()(*string) + GetVendor()(*string) + SetAsn(value *int64)() + SetCity(value *string)() + SetCountryOrRegionCode(value *string)() + SetOdataType(value *string)() + SetOrganization(value *string)() + SetState(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_security_profile.go b/src/internal/connector/graph/betasdk/models/ip_security_profile.go new file mode 100644 index 000000000..4e2c0f486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_security_profile.go @@ -0,0 +1,397 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSecurityProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IpSecurityProfile struct { + Entity + // The activityGroupNames property + activityGroupNames []string + // The address property + address *string + // The azureSubscriptionId property + azureSubscriptionId *string + // The azureTenantId property + azureTenantId *string + // The countHits property + countHits *int32 + // The countHosts property + countHosts *int32 + // The firstSeenDateTime property + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The ipCategories property + ipCategories []IpCategoryable + // The ipReferenceData property + ipReferenceData []IpReferenceDataable + // The lastSeenDateTime property + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The riskScore property + riskScore *string + // The tags property + tags []string + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewIpSecurityProfile instantiates a new ipSecurityProfile and sets the default values. +func NewIpSecurityProfile()(*IpSecurityProfile) { + m := &IpSecurityProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateIpSecurityProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpSecurityProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpSecurityProfile(), nil +} +// GetActivityGroupNames gets the activityGroupNames property value. The activityGroupNames property +func (m *IpSecurityProfile) GetActivityGroupNames()([]string) { + return m.activityGroupNames +} +// GetAddress gets the address property value. The address property +func (m *IpSecurityProfile) GetAddress()(*string) { + return m.address +} +// GetAzureSubscriptionId gets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *IpSecurityProfile) GetAzureSubscriptionId()(*string) { + return m.azureSubscriptionId +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *IpSecurityProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetCountHits gets the countHits property value. The countHits property +func (m *IpSecurityProfile) GetCountHits()(*int32) { + return m.countHits +} +// GetCountHosts gets the countHosts property value. The countHosts property +func (m *IpSecurityProfile) GetCountHosts()(*int32) { + return m.countHosts +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpSecurityProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activityGroupNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetActivityGroupNames(res) + } + return nil + } + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddress(val) + } + return nil + } + res["azureSubscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureSubscriptionId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["countHits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCountHits(val) + } + return nil + } + res["countHosts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCountHosts(val) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["ipCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpCategoryable, len(val)) + for i, v := range val { + res[i] = v.(IpCategoryable) + } + m.SetIpCategories(res) + } + return nil + } + res["ipReferenceData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpReferenceDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpReferenceDataable, len(val)) + for i, v := range val { + res[i] = v.(IpReferenceDataable) + } + m.SetIpReferenceData(res) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *IpSecurityProfile) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetIpCategories gets the ipCategories property value. The ipCategories property +func (m *IpSecurityProfile) GetIpCategories()([]IpCategoryable) { + return m.ipCategories +} +// GetIpReferenceData gets the ipReferenceData property value. The ipReferenceData property +func (m *IpSecurityProfile) GetIpReferenceData()([]IpReferenceDataable) { + return m.ipReferenceData +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *IpSecurityProfile) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetRiskScore gets the riskScore property value. The riskScore property +func (m *IpSecurityProfile) GetRiskScore()(*string) { + return m.riskScore +} +// GetTags gets the tags property value. The tags property +func (m *IpSecurityProfile) GetTags()([]string) { + return m.tags +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *IpSecurityProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *IpSecurityProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivityGroupNames() != nil { + err = writer.WriteCollectionOfStringValues("activityGroupNames", m.GetActivityGroupNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureSubscriptionId", m.GetAzureSubscriptionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("countHits", m.GetCountHits()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("countHosts", m.GetCountHosts()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + if m.GetIpCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIpCategories())) + for i, v := range m.GetIpCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ipCategories", cast) + if err != nil { + return err + } + } + if m.GetIpReferenceData() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIpReferenceData())) + for i, v := range m.GetIpReferenceData() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ipReferenceData", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetActivityGroupNames sets the activityGroupNames property value. The activityGroupNames property +func (m *IpSecurityProfile) SetActivityGroupNames(value []string)() { + m.activityGroupNames = value +} +// SetAddress sets the address property value. The address property +func (m *IpSecurityProfile) SetAddress(value *string)() { + m.address = value +} +// SetAzureSubscriptionId sets the azureSubscriptionId property value. The azureSubscriptionId property +func (m *IpSecurityProfile) SetAzureSubscriptionId(value *string)() { + m.azureSubscriptionId = value +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *IpSecurityProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetCountHits sets the countHits property value. The countHits property +func (m *IpSecurityProfile) SetCountHits(value *int32)() { + m.countHits = value +} +// SetCountHosts sets the countHosts property value. The countHosts property +func (m *IpSecurityProfile) SetCountHosts(value *int32)() { + m.countHosts = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. The firstSeenDateTime property +func (m *IpSecurityProfile) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetIpCategories sets the ipCategories property value. The ipCategories property +func (m *IpSecurityProfile) SetIpCategories(value []IpCategoryable)() { + m.ipCategories = value +} +// SetIpReferenceData sets the ipReferenceData property value. The ipReferenceData property +func (m *IpSecurityProfile) SetIpReferenceData(value []IpReferenceDataable)() { + m.ipReferenceData = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. The lastSeenDateTime property +func (m *IpSecurityProfile) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetRiskScore sets the riskScore property value. The riskScore property +func (m *IpSecurityProfile) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetTags sets the tags property value. The tags property +func (m *IpSecurityProfile) SetTags(value []string)() { + m.tags = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *IpSecurityProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_response.go new file mode 100644 index 000000000..8a1314964 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSecurityProfileCollectionResponse +type IpSecurityProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []IpSecurityProfileable +} +// NewIpSecurityProfileCollectionResponse instantiates a new IpSecurityProfileCollectionResponse and sets the default values. +func NewIpSecurityProfileCollectionResponse()(*IpSecurityProfileCollectionResponse) { + m := &IpSecurityProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIpSecurityProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpSecurityProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpSecurityProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpSecurityProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(IpSecurityProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IpSecurityProfileCollectionResponse) GetValue()([]IpSecurityProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *IpSecurityProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IpSecurityProfileCollectionResponse) SetValue(value []IpSecurityProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_responseable.go new file mode 100644 index 000000000..668795a99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_security_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSecurityProfileCollectionResponseable +type IpSecurityProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]IpSecurityProfileable) + SetValue(value []IpSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_security_profileable.go b/src/internal/connector/graph/betasdk/models/ip_security_profileable.go new file mode 100644 index 000000000..9d54afbb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_security_profileable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSecurityProfileable +type IpSecurityProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivityGroupNames()([]string) + GetAddress()(*string) + GetAzureSubscriptionId()(*string) + GetAzureTenantId()(*string) + GetCountHits()(*int32) + GetCountHosts()(*int32) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIpCategories()([]IpCategoryable) + GetIpReferenceData()([]IpReferenceDataable) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRiskScore()(*string) + GetTags()([]string) + GetVendorInformation()(SecurityVendorInformationable) + SetActivityGroupNames(value []string)() + SetAddress(value *string)() + SetAzureSubscriptionId(value *string)() + SetAzureTenantId(value *string)() + SetCountHits(value *int32)() + SetCountHosts(value *int32)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIpCategories(value []IpCategoryable)() + SetIpReferenceData(value []IpReferenceDataable)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRiskScore(value *string)() + SetTags(value []string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ip_segment_configuration.go b/src/internal/connector/graph/betasdk/models/ip_segment_configuration.go new file mode 100644 index 000000000..70fc015ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_segment_configuration.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSegmentConfiguration +type IpSegmentConfiguration struct { + SegmentConfiguration + // The applicationSegments property + applicationSegments []IpApplicationSegmentable +} +// NewIpSegmentConfiguration instantiates a new IpSegmentConfiguration and sets the default values. +func NewIpSegmentConfiguration()(*IpSegmentConfiguration) { + m := &IpSegmentConfiguration{ + SegmentConfiguration: *NewSegmentConfiguration(), + } + odataTypeValue := "#microsoft.graph.ipSegmentConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateIpSegmentConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpSegmentConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpSegmentConfiguration(), nil +} +// GetApplicationSegments gets the applicationSegments property value. The applicationSegments property +func (m *IpSegmentConfiguration) GetApplicationSegments()([]IpApplicationSegmentable) { + return m.applicationSegments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpSegmentConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SegmentConfiguration.GetFieldDeserializers() + res["applicationSegments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpApplicationSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpApplicationSegmentable, len(val)) + for i, v := range val { + res[i] = v.(IpApplicationSegmentable) + } + m.SetApplicationSegments(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *IpSegmentConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SegmentConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicationSegments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApplicationSegments())) + for i, v := range m.GetApplicationSegments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("applicationSegments", cast) + if err != nil { + return err + } + } + return nil +} +// SetApplicationSegments sets the applicationSegments property value. The applicationSegments property +func (m *IpSegmentConfiguration) SetApplicationSegments(value []IpApplicationSegmentable)() { + m.applicationSegments = value +} diff --git a/src/internal/connector/graph/betasdk/models/ip_segment_configurationable.go b/src/internal/connector/graph/betasdk/models/ip_segment_configurationable.go new file mode 100644 index 000000000..3f69aa796 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ip_segment_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpSegmentConfigurationable +type IpSegmentConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SegmentConfigurationable + GetApplicationSegments()([]IpApplicationSegmentable) + SetApplicationSegments(value []IpApplicationSegmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item.go b/src/internal/connector/graph/betasdk/models/item.go new file mode 100644 index 000000000..1b0bbff7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item.go @@ -0,0 +1,486 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Item provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Item struct { + Entity + // The baseUnitOfMeasureId property + baseUnitOfMeasureId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The blocked property + blocked *bool + // The displayName property + displayName *string + // The gtin property + gtin *string + // The inventory property + inventory *float64 + // The itemCategory property + itemCategory ItemCategoryable + // The itemCategoryCode property + itemCategoryCode *string + // The itemCategoryId property + itemCategoryId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The picture property + picture []Pictureable + // The priceIncludesTax property + priceIncludesTax *bool + // The taxGroupCode property + taxGroupCode *string + // The taxGroupId property + taxGroupId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The type property + type_escaped *string + // The unitCost property + unitCost *float64 + // The unitPrice property + unitPrice *float64 +} +// NewItem instantiates a new item and sets the default values. +func NewItem()(*Item) { + m := &Item{ + Entity: *NewEntity(), + } + return m +} +// CreateItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItem(), nil +} +// GetBaseUnitOfMeasureId gets the baseUnitOfMeasureId property value. The baseUnitOfMeasureId property +func (m *Item) GetBaseUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.baseUnitOfMeasureId +} +// GetBlocked gets the blocked property value. The blocked property +func (m *Item) GetBlocked()(*bool) { + return m.blocked +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Item) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Item) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["baseUnitOfMeasureId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseUnitOfMeasureId(val) + } + return nil + } + res["blocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlocked(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["gtin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGtin(val) + } + return nil + } + res["inventory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInventory(val) + } + return nil + } + res["itemCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItemCategory(val.(ItemCategoryable)) + } + return nil + } + res["itemCategoryCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemCategoryCode(val) + } + return nil + } + res["itemCategoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemCategoryId(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["picture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePictureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pictureable, len(val)) + for i, v := range val { + res[i] = v.(Pictureable) + } + m.SetPicture(res) + } + return nil + } + res["priceIncludesTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPriceIncludesTax(val) + } + return nil + } + res["taxGroupCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxGroupCode(val) + } + return nil + } + res["taxGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxGroupId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["unitCost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitCost(val) + } + return nil + } + res["unitPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitPrice(val) + } + return nil + } + return res +} +// GetGtin gets the gtin property value. The gtin property +func (m *Item) GetGtin()(*string) { + return m.gtin +} +// GetInventory gets the inventory property value. The inventory property +func (m *Item) GetInventory()(*float64) { + return m.inventory +} +// GetItemCategory gets the itemCategory property value. The itemCategory property +func (m *Item) GetItemCategory()(ItemCategoryable) { + return m.itemCategory +} +// GetItemCategoryCode gets the itemCategoryCode property value. The itemCategoryCode property +func (m *Item) GetItemCategoryCode()(*string) { + return m.itemCategoryCode +} +// GetItemCategoryId gets the itemCategoryId property value. The itemCategoryId property +func (m *Item) GetItemCategoryId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemCategoryId +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Item) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *Item) GetNumber()(*string) { + return m.number +} +// GetPicture gets the picture property value. The picture property +func (m *Item) GetPicture()([]Pictureable) { + return m.picture +} +// GetPriceIncludesTax gets the priceIncludesTax property value. The priceIncludesTax property +func (m *Item) GetPriceIncludesTax()(*bool) { + return m.priceIncludesTax +} +// GetTaxGroupCode gets the taxGroupCode property value. The taxGroupCode property +func (m *Item) GetTaxGroupCode()(*string) { + return m.taxGroupCode +} +// GetTaxGroupId gets the taxGroupId property value. The taxGroupId property +func (m *Item) GetTaxGroupId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.taxGroupId +} +// GetType gets the type property value. The type property +func (m *Item) GetType()(*string) { + return m.type_escaped +} +// GetUnitCost gets the unitCost property value. The unitCost property +func (m *Item) GetUnitCost()(*float64) { + return m.unitCost +} +// GetUnitPrice gets the unitPrice property value. The unitPrice property +func (m *Item) GetUnitPrice()(*float64) { + return m.unitPrice +} +// Serialize serializes information the current object +func (m *Item) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteUUIDValue("baseUnitOfMeasureId", m.GetBaseUnitOfMeasureId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blocked", m.GetBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("gtin", m.GetGtin()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("inventory", m.GetInventory()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("itemCategory", m.GetItemCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("itemCategoryCode", m.GetItemCategoryCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemCategoryId", m.GetItemCategoryId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + if m.GetPicture() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPicture())) + for i, v := range m.GetPicture() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("picture", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("priceIncludesTax", m.GetPriceIncludesTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxGroupCode", m.GetTaxGroupCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("taxGroupId", m.GetTaxGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitCost", m.GetUnitCost()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitPrice", m.GetUnitPrice()) + if err != nil { + return err + } + } + return nil +} +// SetBaseUnitOfMeasureId sets the baseUnitOfMeasureId property value. The baseUnitOfMeasureId property +func (m *Item) SetBaseUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.baseUnitOfMeasureId = value +} +// SetBlocked sets the blocked property value. The blocked property +func (m *Item) SetBlocked(value *bool)() { + m.blocked = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Item) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGtin sets the gtin property value. The gtin property +func (m *Item) SetGtin(value *string)() { + m.gtin = value +} +// SetInventory sets the inventory property value. The inventory property +func (m *Item) SetInventory(value *float64)() { + m.inventory = value +} +// SetItemCategory sets the itemCategory property value. The itemCategory property +func (m *Item) SetItemCategory(value ItemCategoryable)() { + m.itemCategory = value +} +// SetItemCategoryCode sets the itemCategoryCode property value. The itemCategoryCode property +func (m *Item) SetItemCategoryCode(value *string)() { + m.itemCategoryCode = value +} +// SetItemCategoryId sets the itemCategoryId property value. The itemCategoryId property +func (m *Item) SetItemCategoryId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemCategoryId = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Item) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *Item) SetNumber(value *string)() { + m.number = value +} +// SetPicture sets the picture property value. The picture property +func (m *Item) SetPicture(value []Pictureable)() { + m.picture = value +} +// SetPriceIncludesTax sets the priceIncludesTax property value. The priceIncludesTax property +func (m *Item) SetPriceIncludesTax(value *bool)() { + m.priceIncludesTax = value +} +// SetTaxGroupCode sets the taxGroupCode property value. The taxGroupCode property +func (m *Item) SetTaxGroupCode(value *string)() { + m.taxGroupCode = value +} +// SetTaxGroupId sets the taxGroupId property value. The taxGroupId property +func (m *Item) SetTaxGroupId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.taxGroupId = value +} +// SetType sets the type property value. The type property +func (m *Item) SetType(value *string)() { + m.type_escaped = value +} +// SetUnitCost sets the unitCost property value. The unitCost property +func (m *Item) SetUnitCost(value *float64)() { + m.unitCost = value +} +// SetUnitPrice sets the unitPrice property value. The unitPrice property +func (m *Item) SetUnitPrice(value *float64)() { + m.unitPrice = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_action_set.go b/src/internal/connector/graph/betasdk/models/item_action_set.go new file mode 100644 index 000000000..ae1bc8285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_action_set.go @@ -0,0 +1,331 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActionSet +type ItemActionSet struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A comment was added to the item. + comment CommentActionable + // An item was created. + create CreateActionable + // An item was deleted. + delete DeleteActionable + // An item was edited. + edit EditActionable + // A user was mentioned in the item. + mention MentionActionable + // An item was moved. + move MoveActionable + // The OdataType property + odataType *string + // An item was renamed. + rename RenameActionable + // An item was restored. + restore RestoreActionable + // An item was shared. + share ShareActionable + // An item was versioned. + version VersionActionable +} +// NewItemActionSet instantiates a new itemActionSet and sets the default values. +func NewItemActionSet()(*ItemActionSet) { + m := &ItemActionSet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateItemActionSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActionSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionSet(), 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 *ItemActionSet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetComment gets the comment property value. A comment was added to the item. +func (m *ItemActionSet) GetComment()(CommentActionable) { + return m.comment +} +// GetCreate gets the create property value. An item was created. +func (m *ItemActionSet) GetCreate()(CreateActionable) { + return m.create +} +// GetDelete gets the delete property value. An item was deleted. +func (m *ItemActionSet) GetDelete()(DeleteActionable) { + return m.delete +} +// GetEdit gets the edit property value. An item was edited. +func (m *ItemActionSet) GetEdit()(EditActionable) { + return m.edit +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActionSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCommentActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetComment(val.(CommentActionable)) + } + return nil + } + res["create"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCreateActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreate(val.(CreateActionable)) + } + return nil + } + res["delete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeleteActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDelete(val.(DeleteActionable)) + } + return nil + } + res["edit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEditActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEdit(val.(EditActionable)) + } + return nil + } + res["mention"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMentionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMention(val.(MentionActionable)) + } + return nil + } + res["move"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMoveActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMove(val.(MoveActionable)) + } + 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["rename"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRenameActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRename(val.(RenameActionable)) + } + return nil + } + res["restore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRestoreActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestore(val.(RestoreActionable)) + } + return nil + } + res["share"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateShareActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShare(val.(ShareActionable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVersionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVersion(val.(VersionActionable)) + } + return nil + } + return res +} +// GetMention gets the mention property value. A user was mentioned in the item. +func (m *ItemActionSet) GetMention()(MentionActionable) { + return m.mention +} +// GetMove gets the move property value. An item was moved. +func (m *ItemActionSet) GetMove()(MoveActionable) { + return m.move +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ItemActionSet) GetOdataType()(*string) { + return m.odataType +} +// GetRename gets the rename property value. An item was renamed. +func (m *ItemActionSet) GetRename()(RenameActionable) { + return m.rename +} +// GetRestore gets the restore property value. An item was restored. +func (m *ItemActionSet) GetRestore()(RestoreActionable) { + return m.restore +} +// GetShare gets the share property value. An item was shared. +func (m *ItemActionSet) GetShare()(ShareActionable) { + return m.share +} +// GetVersion gets the version property value. An item was versioned. +func (m *ItemActionSet) GetVersion()(VersionActionable) { + return m.version +} +// Serialize serializes information the current object +func (m *ItemActionSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("create", m.GetCreate()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("delete", m.GetDelete()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("edit", m.GetEdit()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("mention", m.GetMention()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("move", m.GetMove()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("rename", m.GetRename()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("restore", m.GetRestore()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("share", m.GetShare()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("version", m.GetVersion()) + 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 *ItemActionSet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetComment sets the comment property value. A comment was added to the item. +func (m *ItemActionSet) SetComment(value CommentActionable)() { + m.comment = value +} +// SetCreate sets the create property value. An item was created. +func (m *ItemActionSet) SetCreate(value CreateActionable)() { + m.create = value +} +// SetDelete sets the delete property value. An item was deleted. +func (m *ItemActionSet) SetDelete(value DeleteActionable)() { + m.delete = value +} +// SetEdit sets the edit property value. An item was edited. +func (m *ItemActionSet) SetEdit(value EditActionable)() { + m.edit = value +} +// SetMention sets the mention property value. A user was mentioned in the item. +func (m *ItemActionSet) SetMention(value MentionActionable)() { + m.mention = value +} +// SetMove sets the move property value. An item was moved. +func (m *ItemActionSet) SetMove(value MoveActionable)() { + m.move = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ItemActionSet) SetOdataType(value *string)() { + m.odataType = value +} +// SetRename sets the rename property value. An item was renamed. +func (m *ItemActionSet) SetRename(value RenameActionable)() { + m.rename = value +} +// SetRestore sets the restore property value. An item was restored. +func (m *ItemActionSet) SetRestore(value RestoreActionable)() { + m.restore = value +} +// SetShare sets the share property value. An item was shared. +func (m *ItemActionSet) SetShare(value ShareActionable)() { + m.share = value +} +// SetVersion sets the version property value. An item was versioned. +func (m *ItemActionSet) SetVersion(value VersionActionable)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_action_setable.go b/src/internal/connector/graph/betasdk/models/item_action_setable.go new file mode 100644 index 000000000..1aa563d6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_action_setable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActionSetable +type ItemActionSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(CommentActionable) + GetCreate()(CreateActionable) + GetDelete()(DeleteActionable) + GetEdit()(EditActionable) + GetMention()(MentionActionable) + GetMove()(MoveActionable) + GetOdataType()(*string) + GetRename()(RenameActionable) + GetRestore()(RestoreActionable) + GetShare()(ShareActionable) + GetVersion()(VersionActionable) + SetComment(value CommentActionable)() + SetCreate(value CreateActionable)() + SetDelete(value DeleteActionable)() + SetEdit(value EditActionable)() + SetMention(value MentionActionable)() + SetMove(value MoveActionable)() + SetOdataType(value *string)() + SetRename(value RenameActionable)() + SetRestore(value RestoreActionable)() + SetShare(value ShareActionable)() + SetVersion(value VersionActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_action_stat.go b/src/internal/connector/graph/betasdk/models/item_action_stat.go new file mode 100644 index 000000000..c0b93132c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_action_stat.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActionStat +type ItemActionStat struct { + // The number of times the action took place. Read-only. + actionCount *int32 + // The number of distinct actors that performed the action. Read-only. + actorCount *int32 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The OdataType property + odataType *string +} +// NewItemActionStat instantiates a new itemActionStat and sets the default values. +func NewItemActionStat()(*ItemActionStat) { + m := &ItemActionStat{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateItemActionStatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActionStatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActionStat(), nil +} +// GetActionCount gets the actionCount property value. The number of times the action took place. Read-only. +func (m *ItemActionStat) GetActionCount()(*int32) { + return m.actionCount +} +// GetActorCount gets the actorCount property value. The number of distinct actors that performed the action. Read-only. +func (m *ItemActionStat) GetActorCount()(*int32) { + return m.actorCount +} +// 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 *ItemActionStat) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActionStat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActionCount(val) + } + return nil + } + res["actorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActorCount(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ItemActionStat) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ItemActionStat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("actionCount", m.GetActionCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("actorCount", m.GetActorCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionCount sets the actionCount property value. The number of times the action took place. Read-only. +func (m *ItemActionStat) SetActionCount(value *int32)() { + m.actionCount = value +} +// SetActorCount sets the actorCount property value. The number of distinct actors that performed the action. Read-only. +func (m *ItemActionStat) SetActorCount(value *int32)() { + m.actorCount = value +} +// 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 *ItemActionStat) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ItemActionStat) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_action_statable.go b/src/internal/connector/graph/betasdk/models/item_action_statable.go new file mode 100644 index 000000000..18618feab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_action_statable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActionStatable +type ItemActionStatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionCount()(*int32) + GetActorCount()(*int32) + GetOdataType()(*string) + SetActionCount(value *int32)() + SetActorCount(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity.go b/src/internal/connector/graph/betasdk/models/item_activity.go new file mode 100644 index 000000000..cb9961880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivity provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ItemActivity struct { + Entity + // An item was accessed. + access AccessActionable + // The activityDateTime property + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Identity of who performed the action. Read-only. + actor IdentitySetable + // Exposes the driveItem that was the target of this activity. + driveItem DriveItemable +} +// NewItemActivity instantiates a new itemActivity and sets the default values. +func NewItemActivity()(*ItemActivity) { + m := &ItemActivity{ + Entity: *NewEntity(), + } + return m +} +// CreateItemActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivity(), nil +} +// GetAccess gets the access property value. An item was accessed. +func (m *ItemActivity) GetAccess()(AccessActionable) { + return m.access +} +// GetActivityDateTime gets the activityDateTime property value. The activityDateTime property +func (m *ItemActivity) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetActor gets the actor property value. Identity of who performed the action. Read-only. +func (m *ItemActivity) GetActor()(IdentitySetable) { + return m.actor +} +// GetDriveItem gets the driveItem property value. Exposes the driveItem that was the target of this activity. +func (m *ItemActivity) GetDriveItem()(DriveItemable) { + return m.driveItem +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccessActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccess(val.(AccessActionable)) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(IdentitySetable)) + } + return nil + } + res["driveItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDriveItem(val.(DriveItemable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ItemActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("access", m.GetAccess()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("driveItem", m.GetDriveItem()) + if err != nil { + return err + } + } + return nil +} +// SetAccess sets the access property value. An item was accessed. +func (m *ItemActivity) SetAccess(value AccessActionable)() { + m.access = value +} +// SetActivityDateTime sets the activityDateTime property value. The activityDateTime property +func (m *ItemActivity) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetActor sets the actor property value. Identity of who performed the action. Read-only. +func (m *ItemActivity) SetActor(value IdentitySetable)() { + m.actor = value +} +// SetDriveItem sets the driveItem property value. Exposes the driveItem that was the target of this activity. +func (m *ItemActivity) SetDriveItem(value DriveItemable)() { + m.driveItem = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_collection_response.go b/src/internal/connector/graph/betasdk/models/item_activity_collection_response.go new file mode 100644 index 000000000..2e50a05e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityCollectionResponse +type ItemActivityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemActivityable +} +// NewItemActivityCollectionResponse instantiates a new ItemActivityCollectionResponse and sets the default values. +func NewItemActivityCollectionResponse()(*ItemActivityCollectionResponse) { + m := &ItemActivityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemActivityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemActivityCollectionResponse) GetValue()([]ItemActivityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemActivityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemActivityCollectionResponse) SetValue(value []ItemActivityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_activity_collection_responseable.go new file mode 100644 index 000000000..dba542952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityCollectionResponseable +type ItemActivityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemActivityable) + SetValue(value []ItemActivityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_o_l_d.go b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d.go new file mode 100644 index 000000000..240716123 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityOLD provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ItemActivityOLD struct { + Entity + // The action property + action ItemActionSetable + // The actor property + actor IdentitySetable + // The driveItem property + driveItem DriveItemable + // The listItem property + listItem ListItemable + // The times property + times ItemActivityTimeSetable +} +// NewItemActivityOLD instantiates a new itemActivityOLD and sets the default values. +func NewItemActivityOLD()(*ItemActivityOLD) { + m := &ItemActivityOLD{ + Entity: *NewEntity(), + } + return m +} +// CreateItemActivityOLDFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityOLDFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityOLD(), nil +} +// GetAction gets the action property value. The action property +func (m *ItemActivityOLD) GetAction()(ItemActionSetable) { + return m.action +} +// GetActor gets the actor property value. The actor property +func (m *ItemActivityOLD) GetActor()(IdentitySetable) { + return m.actor +} +// GetDriveItem gets the driveItem property value. The driveItem property +func (m *ItemActivityOLD) GetDriveItem()(DriveItemable) { + return m.driveItem +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityOLD) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(ItemActionSetable)) + } + return nil + } + res["actor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActor(val.(IdentitySetable)) + } + return nil + } + res["driveItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDriveItem(val.(DriveItemable)) + } + return nil + } + res["listItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetListItem(val.(ListItemable)) + } + return nil + } + res["times"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActivityTimeSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTimes(val.(ItemActivityTimeSetable)) + } + return nil + } + return res +} +// GetListItem gets the listItem property value. The listItem property +func (m *ItemActivityOLD) GetListItem()(ListItemable) { + return m.listItem +} +// GetTimes gets the times property value. The times property +func (m *ItemActivityOLD) GetTimes()(ItemActivityTimeSetable) { + return m.times +} +// Serialize serializes information the current object +func (m *ItemActivityOLD) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("actor", m.GetActor()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("driveItem", m.GetDriveItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("listItem", m.GetListItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("times", m.GetTimes()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *ItemActivityOLD) SetAction(value ItemActionSetable)() { + m.action = value +} +// SetActor sets the actor property value. The actor property +func (m *ItemActivityOLD) SetActor(value IdentitySetable)() { + m.actor = value +} +// SetDriveItem sets the driveItem property value. The driveItem property +func (m *ItemActivityOLD) SetDriveItem(value DriveItemable)() { + m.driveItem = value +} +// SetListItem sets the listItem property value. The listItem property +func (m *ItemActivityOLD) SetListItem(value ListItemable)() { + m.listItem = value +} +// SetTimes sets the times property value. The times property +func (m *ItemActivityOLD) SetTimes(value ItemActivityTimeSetable)() { + m.times = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_response.go b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_response.go new file mode 100644 index 000000000..dffea925f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityOLDCollectionResponse +type ItemActivityOLDCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemActivityOLDable +} +// NewItemActivityOLDCollectionResponse instantiates a new ItemActivityOLDCollectionResponse and sets the default values. +func NewItemActivityOLDCollectionResponse()(*ItemActivityOLDCollectionResponse) { + m := &ItemActivityOLDCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemActivityOLDCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityOLDCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityOLDCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityOLDCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityOLDFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityOLDable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityOLDable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemActivityOLDCollectionResponse) GetValue()([]ItemActivityOLDable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemActivityOLDCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemActivityOLDCollectionResponse) SetValue(value []ItemActivityOLDable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_responseable.go new file mode 100644 index 000000000..140107a8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_o_l_d_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityOLDCollectionResponseable +type ItemActivityOLDCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemActivityOLDable) + SetValue(value []ItemActivityOLDable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_o_l_dable.go b/src/internal/connector/graph/betasdk/models/item_activity_o_l_dable.go new file mode 100644 index 000000000..3cc0b89a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_o_l_dable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityOLDable +type ItemActivityOLDable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(ItemActionSetable) + GetActor()(IdentitySetable) + GetDriveItem()(DriveItemable) + GetListItem()(ListItemable) + GetTimes()(ItemActivityTimeSetable) + SetAction(value ItemActionSetable)() + SetActor(value IdentitySetable)() + SetDriveItem(value DriveItemable)() + SetListItem(value ListItemable)() + SetTimes(value ItemActivityTimeSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_stat.go b/src/internal/connector/graph/betasdk/models/item_activity_stat.go new file mode 100644 index 000000000..bebe6b323 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_stat.go @@ -0,0 +1,303 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityStat +type ItemActivityStat struct { + Entity + // Statistics about the access actions in this interval. Read-only. + access ItemActionStatable + // Exposes the itemActivities represented in this itemActivityStat resource. + activities []ItemActivityable + // Statistics about the create actions in this interval. Read-only. + create ItemActionStatable + // Statistics about the delete actions in this interval. Read-only. + delete ItemActionStatable + // Statistics about the edit actions in this interval. Read-only. + edit ItemActionStatable + // When the interval ends. Read-only. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates that the statistics in this interval are based on incomplete data. Read-only. + incompleteData IncompleteDataable + // Indicates whether the item is 'trending.' Read-only. + isTrending *bool + // Statistics about the move actions in this interval. Read-only. + move ItemActionStatable + // When the interval starts. Read-only. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewItemActivityStat instantiates a new itemActivityStat and sets the default values. +func NewItemActivityStat()(*ItemActivityStat) { + m := &ItemActivityStat{ + Entity: *NewEntity(), + } + return m +} +// CreateItemActivityStatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityStatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityStat(), nil +} +// GetAccess gets the access property value. Statistics about the access actions in this interval. Read-only. +func (m *ItemActivityStat) GetAccess()(ItemActionStatable) { + return m.access +} +// GetActivities gets the activities property value. Exposes the itemActivities represented in this itemActivityStat resource. +func (m *ItemActivityStat) GetActivities()([]ItemActivityable) { + return m.activities +} +// GetCreate gets the create property value. Statistics about the create actions in this interval. Read-only. +func (m *ItemActivityStat) GetCreate()(ItemActionStatable) { + return m.create +} +// GetDelete gets the delete property value. Statistics about the delete actions in this interval. Read-only. +func (m *ItemActivityStat) GetDelete()(ItemActionStatable) { + return m.delete +} +// GetEdit gets the edit property value. Statistics about the edit actions in this interval. Read-only. +func (m *ItemActivityStat) GetEdit()(ItemActionStatable) { + return m.edit +} +// GetEndDateTime gets the endDateTime property value. When the interval ends. Read-only. +func (m *ItemActivityStat) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityStat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["access"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccess(val.(ItemActionStatable)) + } + return nil + } + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityable) + } + m.SetActivities(res) + } + return nil + } + res["create"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreate(val.(ItemActionStatable)) + } + return nil + } + res["delete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDelete(val.(ItemActionStatable)) + } + return nil + } + res["edit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEdit(val.(ItemActionStatable)) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["incompleteData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIncompleteDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIncompleteData(val.(IncompleteDataable)) + } + return nil + } + res["isTrending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTrending(val) + } + return nil + } + res["move"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActionStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMove(val.(ItemActionStatable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetIncompleteData gets the incompleteData property value. Indicates that the statistics in this interval are based on incomplete data. Read-only. +func (m *ItemActivityStat) GetIncompleteData()(IncompleteDataable) { + return m.incompleteData +} +// GetIsTrending gets the isTrending property value. Indicates whether the item is 'trending.' Read-only. +func (m *ItemActivityStat) GetIsTrending()(*bool) { + return m.isTrending +} +// GetMove gets the move property value. Statistics about the move actions in this interval. Read-only. +func (m *ItemActivityStat) GetMove()(ItemActionStatable) { + return m.move +} +// GetStartDateTime gets the startDateTime property value. When the interval starts. Read-only. +func (m *ItemActivityStat) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *ItemActivityStat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("access", m.GetAccess()) + if err != nil { + return err + } + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("create", m.GetCreate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("delete", m.GetDelete()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("edit", m.GetEdit()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("incompleteData", m.GetIncompleteData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isTrending", m.GetIsTrending()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("move", m.GetMove()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccess sets the access property value. Statistics about the access actions in this interval. Read-only. +func (m *ItemActivityStat) SetAccess(value ItemActionStatable)() { + m.access = value +} +// SetActivities sets the activities property value. Exposes the itemActivities represented in this itemActivityStat resource. +func (m *ItemActivityStat) SetActivities(value []ItemActivityable)() { + m.activities = value +} +// SetCreate sets the create property value. Statistics about the create actions in this interval. Read-only. +func (m *ItemActivityStat) SetCreate(value ItemActionStatable)() { + m.create = value +} +// SetDelete sets the delete property value. Statistics about the delete actions in this interval. Read-only. +func (m *ItemActivityStat) SetDelete(value ItemActionStatable)() { + m.delete = value +} +// SetEdit sets the edit property value. Statistics about the edit actions in this interval. Read-only. +func (m *ItemActivityStat) SetEdit(value ItemActionStatable)() { + m.edit = value +} +// SetEndDateTime sets the endDateTime property value. When the interval ends. Read-only. +func (m *ItemActivityStat) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetIncompleteData sets the incompleteData property value. Indicates that the statistics in this interval are based on incomplete data. Read-only. +func (m *ItemActivityStat) SetIncompleteData(value IncompleteDataable)() { + m.incompleteData = value +} +// SetIsTrending sets the isTrending property value. Indicates whether the item is 'trending.' Read-only. +func (m *ItemActivityStat) SetIsTrending(value *bool)() { + m.isTrending = value +} +// SetMove sets the move property value. Statistics about the move actions in this interval. Read-only. +func (m *ItemActivityStat) SetMove(value ItemActionStatable)() { + m.move = value +} +// SetStartDateTime sets the startDateTime property value. When the interval starts. Read-only. +func (m *ItemActivityStat) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_response.go b/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_response.go new file mode 100644 index 000000000..c49a597e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityStatCollectionResponse +type ItemActivityStatCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemActivityStatable +} +// NewItemActivityStatCollectionResponse instantiates a new ItemActivityStatCollectionResponse and sets the default values. +func NewItemActivityStatCollectionResponse()(*ItemActivityStatCollectionResponse) { + m := &ItemActivityStatCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemActivityStatCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityStatCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityStatCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityStatCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityStatable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityStatable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemActivityStatCollectionResponse) GetValue()([]ItemActivityStatable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemActivityStatCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemActivityStatCollectionResponse) SetValue(value []ItemActivityStatable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_responseable.go new file mode 100644 index 000000000..1b464a208 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_stat_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityStatCollectionResponseable +type ItemActivityStatCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemActivityStatable) + SetValue(value []ItemActivityStatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_statable.go b/src/internal/connector/graph/betasdk/models/item_activity_statable.go new file mode 100644 index 000000000..446ca2118 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_statable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityStatable +type ItemActivityStatable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccess()(ItemActionStatable) + GetActivities()([]ItemActivityable) + GetCreate()(ItemActionStatable) + GetDelete()(ItemActionStatable) + GetEdit()(ItemActionStatable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIncompleteData()(IncompleteDataable) + GetIsTrending()(*bool) + GetMove()(ItemActionStatable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccess(value ItemActionStatable)() + SetActivities(value []ItemActivityable)() + SetCreate(value ItemActionStatable)() + SetDelete(value ItemActionStatable)() + SetEdit(value ItemActionStatable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIncompleteData(value IncompleteDataable)() + SetIsTrending(value *bool)() + SetMove(value ItemActionStatable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_time_set.go b/src/internal/connector/graph/betasdk/models/item_activity_time_set.go new file mode 100644 index 000000000..5ae39fa33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_time_set.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityTimeSet +type ItemActivityTimeSet 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 lastRecordedDateTime property + lastRecordedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the activity was observed to take place. + observedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // When the observation was recorded on the service. + recordedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewItemActivityTimeSet instantiates a new itemActivityTimeSet and sets the default values. +func NewItemActivityTimeSet()(*ItemActivityTimeSet) { + m := &ItemActivityTimeSet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateItemActivityTimeSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemActivityTimeSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemActivityTimeSet(), 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 *ItemActivityTimeSet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemActivityTimeSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastRecordedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRecordedDateTime(val) + } + return nil + } + res["observedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetObservedDateTime(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["recordedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordedDateTime(val) + } + return nil + } + return res +} +// GetLastRecordedDateTime gets the lastRecordedDateTime property value. The lastRecordedDateTime property +func (m *ItemActivityTimeSet) GetLastRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRecordedDateTime +} +// GetObservedDateTime gets the observedDateTime property value. When the activity was observed to take place. +func (m *ItemActivityTimeSet) GetObservedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.observedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ItemActivityTimeSet) GetOdataType()(*string) { + return m.odataType +} +// GetRecordedDateTime gets the recordedDateTime property value. When the observation was recorded on the service. +func (m *ItemActivityTimeSet) GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.recordedDateTime +} +// Serialize serializes information the current object +func (m *ItemActivityTimeSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastRecordedDateTime", m.GetLastRecordedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("observedDateTime", m.GetObservedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("recordedDateTime", m.GetRecordedDateTime()) + 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 *ItemActivityTimeSet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastRecordedDateTime sets the lastRecordedDateTime property value. The lastRecordedDateTime property +func (m *ItemActivityTimeSet) SetLastRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRecordedDateTime = value +} +// SetObservedDateTime sets the observedDateTime property value. When the activity was observed to take place. +func (m *ItemActivityTimeSet) SetObservedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.observedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ItemActivityTimeSet) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecordedDateTime sets the recordedDateTime property value. When the observation was recorded on the service. +func (m *ItemActivityTimeSet) SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.recordedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_activity_time_setable.go b/src/internal/connector/graph/betasdk/models/item_activity_time_setable.go new file mode 100644 index 000000000..ac2503eff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activity_time_setable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityTimeSetable +type ItemActivityTimeSetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetObservedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetRecordedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetLastRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetObservedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetRecordedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_activityable.go b/src/internal/connector/graph/betasdk/models/item_activityable.go new file mode 100644 index 000000000..51dc5f013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_activityable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemActivityable +type ItemActivityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccess()(AccessActionable) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetActor()(IdentitySetable) + GetDriveItem()(DriveItemable) + SetAccess(value AccessActionable)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetActor(value IdentitySetable)() + SetDriveItem(value DriveItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_address.go b/src/internal/connector/graph/betasdk/models/item_address.go new file mode 100644 index 000000000..81b36968e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_address.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAddress +type ItemAddress struct { + ItemFacet + // The detail property + detail PhysicalAddressable + // Friendly name the user has assigned to this address. + displayName *string + // The geocoordinates of the address. + geoCoordinates GeoCoordinatesable +} +// NewItemAddress instantiates a new ItemAddress and sets the default values. +func NewItemAddress()(*ItemAddress) { + m := &ItemAddress{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.itemAddress"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemAddressFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemAddressFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAddress(), nil +} +// GetDetail gets the detail property value. The detail property +func (m *ItemAddress) GetDetail()(PhysicalAddressable) { + return m.detail +} +// GetDisplayName gets the displayName property value. Friendly name the user has assigned to this address. +func (m *ItemAddress) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemAddress) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(PhysicalAddressable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["geoCoordinates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGeoCoordinatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGeoCoordinates(val.(GeoCoordinatesable)) + } + return nil + } + return res +} +// GetGeoCoordinates gets the geoCoordinates property value. The geocoordinates of the address. +func (m *ItemAddress) GetGeoCoordinates()(GeoCoordinatesable) { + return m.geoCoordinates +} +// Serialize serializes information the current object +func (m *ItemAddress) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("geoCoordinates", m.GetGeoCoordinates()) + if err != nil { + return err + } + } + return nil +} +// SetDetail sets the detail property value. The detail property +func (m *ItemAddress) SetDetail(value PhysicalAddressable)() { + m.detail = value +} +// SetDisplayName sets the displayName property value. Friendly name the user has assigned to this address. +func (m *ItemAddress) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGeoCoordinates sets the geoCoordinates property value. The geocoordinates of the address. +func (m *ItemAddress) SetGeoCoordinates(value GeoCoordinatesable)() { + m.geoCoordinates = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_address_collection_response.go b/src/internal/connector/graph/betasdk/models/item_address_collection_response.go new file mode 100644 index 000000000..9d65f94a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_address_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAddressCollectionResponse +type ItemAddressCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemAddressable +} +// NewItemAddressCollectionResponse instantiates a new ItemAddressCollectionResponse and sets the default values. +func NewItemAddressCollectionResponse()(*ItemAddressCollectionResponse) { + m := &ItemAddressCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemAddressCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemAddressCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAddressCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemAddressCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAddressable, len(val)) + for i, v := range val { + res[i] = v.(ItemAddressable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemAddressCollectionResponse) GetValue()([]ItemAddressable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemAddressCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemAddressCollectionResponse) SetValue(value []ItemAddressable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_address_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_address_collection_responseable.go new file mode 100644 index 000000000..9956c1d11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_address_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAddressCollectionResponseable +type ItemAddressCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemAddressable) + SetValue(value []ItemAddressable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_addressable.go b/src/internal/connector/graph/betasdk/models/item_addressable.go new file mode 100644 index 000000000..3818475cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_addressable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAddressable +type ItemAddressable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(PhysicalAddressable) + GetDisplayName()(*string) + GetGeoCoordinates()(GeoCoordinatesable) + SetDetail(value PhysicalAddressable)() + SetDisplayName(value *string)() + SetGeoCoordinates(value GeoCoordinatesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_analytics.go b/src/internal/connector/graph/betasdk/models/item_analytics.go new file mode 100644 index 000000000..070dcd19c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_analytics.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAnalytics +type ItemAnalytics struct { + Entity + // The allTime property + allTime ItemActivityStatable + // The itemActivityStats property + itemActivityStats []ItemActivityStatable + // The lastSevenDays property + lastSevenDays ItemActivityStatable +} +// NewItemAnalytics instantiates a new itemAnalytics and sets the default values. +func NewItemAnalytics()(*ItemAnalytics) { + m := &ItemAnalytics{ + Entity: *NewEntity(), + } + return m +} +// CreateItemAnalyticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemAnalyticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAnalytics(), nil +} +// GetAllTime gets the allTime property value. The allTime property +func (m *ItemAnalytics) GetAllTime()(ItemActivityStatable) { + return m.allTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemAnalytics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActivityStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAllTime(val.(ItemActivityStatable)) + } + return nil + } + res["itemActivityStats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityStatable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityStatable) + } + m.SetItemActivityStats(res) + } + return nil + } + res["lastSevenDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemActivityStatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastSevenDays(val.(ItemActivityStatable)) + } + return nil + } + return res +} +// GetItemActivityStats gets the itemActivityStats property value. The itemActivityStats property +func (m *ItemAnalytics) GetItemActivityStats()([]ItemActivityStatable) { + return m.itemActivityStats +} +// GetLastSevenDays gets the lastSevenDays property value. The lastSevenDays property +func (m *ItemAnalytics) GetLastSevenDays()(ItemActivityStatable) { + return m.lastSevenDays +} +// Serialize serializes information the current object +func (m *ItemAnalytics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("allTime", m.GetAllTime()) + if err != nil { + return err + } + } + if m.GetItemActivityStats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItemActivityStats())) + for i, v := range m.GetItemActivityStats() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("itemActivityStats", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastSevenDays", m.GetLastSevenDays()) + if err != nil { + return err + } + } + return nil +} +// SetAllTime sets the allTime property value. The allTime property +func (m *ItemAnalytics) SetAllTime(value ItemActivityStatable)() { + m.allTime = value +} +// SetItemActivityStats sets the itemActivityStats property value. The itemActivityStats property +func (m *ItemAnalytics) SetItemActivityStats(value []ItemActivityStatable)() { + m.itemActivityStats = value +} +// SetLastSevenDays sets the lastSevenDays property value. The lastSevenDays property +func (m *ItemAnalytics) SetLastSevenDays(value ItemActivityStatable)() { + m.lastSevenDays = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_analyticsable.go b/src/internal/connector/graph/betasdk/models/item_analyticsable.go new file mode 100644 index 000000000..8308b336a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_analyticsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAnalyticsable +type ItemAnalyticsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllTime()(ItemActivityStatable) + GetItemActivityStats()([]ItemActivityStatable) + GetLastSevenDays()(ItemActivityStatable) + SetAllTime(value ItemActivityStatable)() + SetItemActivityStats(value []ItemActivityStatable)() + SetLastSevenDays(value ItemActivityStatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_attachment.go b/src/internal/connector/graph/betasdk/models/item_attachment.go new file mode 100644 index 000000000..2b120a934 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_attachment.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttachment +type ItemAttachment struct { + Attachment + // The attached contact, message or event. Navigation property. + item OutlookItemable +} +// NewItemAttachment instantiates a new ItemAttachment and sets the default values. +func NewItemAttachment()(*ItemAttachment) { + m := &ItemAttachment{ + Attachment: *NewAttachment(), + } + odataTypeValue := "#microsoft.graph.itemAttachment"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttachment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Attachment.GetFieldDeserializers() + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOutlookItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(OutlookItemable)) + } + return nil + } + return res +} +// GetItem gets the item property value. The attached contact, message or event. Navigation property. +func (m *ItemAttachment) GetItem()(OutlookItemable) { + return m.item +} +// Serialize serializes information the current object +func (m *ItemAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Attachment.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + return nil +} +// SetItem sets the item property value. The attached contact, message or event. Navigation property. +func (m *ItemAttachment) SetItem(value OutlookItemable)() { + m.item = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/item_attachment_collection_response.go new file mode 100644 index 000000000..43cca9ad1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttachmentCollectionResponse +type ItemAttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemAttachmentable +} +// NewItemAttachmentCollectionResponse instantiates a new ItemAttachmentCollectionResponse and sets the default values. +func NewItemAttachmentCollectionResponse()(*ItemAttachmentCollectionResponse) { + m := &ItemAttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemAttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ItemAttachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemAttachmentCollectionResponse) GetValue()([]ItemAttachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemAttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemAttachmentCollectionResponse) SetValue(value []ItemAttachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_attachment_collection_responseable.go new file mode 100644 index 000000000..abc2a8aa4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttachmentCollectionResponseable +type ItemAttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemAttachmentable) + SetValue(value []ItemAttachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_attachmentable.go b/src/internal/connector/graph/betasdk/models/item_attachmentable.go new file mode 100644 index 000000000..0c43f2601 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_attachmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemAttachmentable +type ItemAttachmentable interface { + Attachmentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetItem()(OutlookItemable) + SetItem(value OutlookItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_body.go b/src/internal/connector/graph/betasdk/models/item_body.go new file mode 100644 index 000000000..8372669cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_body.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemBody +type ItemBody 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 content of the item. + content *string + // The type of the content. Possible values are text and html. + contentType *BodyType + // The OdataType property + odataType *string +} +// NewItemBody instantiates a new itemBody and sets the default values. +func NewItemBody()(*ItemBody) { + m := &ItemBody{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateItemBodyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemBodyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemBody(), 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 *ItemBody) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContent gets the content property value. The content of the item. +func (m *ItemBody) GetContent()(*string) { + return m.content +} +// GetContentType gets the contentType property value. The type of the content. Possible values are text and html. +func (m *ItemBody) GetContentType()(*BodyType) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemBody) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBodyType) + if err != nil { + return err + } + if val != nil { + m.SetContentType(val.(*BodyType)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ItemBody) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ItemBody) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + if m.GetContentType() != nil { + cast := (*m.GetContentType()).String() + err := writer.WriteStringValue("contentType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ItemBody) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContent sets the content property value. The content of the item. +func (m *ItemBody) SetContent(value *string)() { + m.content = value +} +// SetContentType sets the contentType property value. The type of the content. Possible values are text and html. +func (m *ItemBody) SetContentType(value *BodyType)() { + m.contentType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ItemBody) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_bodyable.go b/src/internal/connector/graph/betasdk/models/item_bodyable.go new file mode 100644 index 000000000..209f83173 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_bodyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemBodyable +type ItemBodyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(*string) + GetContentType()(*BodyType) + GetOdataType()(*string) + SetContent(value *string)() + SetContentType(value *BodyType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_category.go b/src/internal/connector/graph/betasdk/models/item_category.go new file mode 100644 index 000000000..becd3dc1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_category.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCategory provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ItemCategory struct { + Entity + // The code property + code *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewItemCategory instantiates a new itemCategory and sets the default values. +func NewItemCategory()(*ItemCategory) { + m := &ItemCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateItemCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCategory(), nil +} +// GetCode gets the code property value. The code property +func (m *ItemCategory) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ItemCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ItemCategory) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *ItemCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCode sets the code property value. The code property +func (m *ItemCategory) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ItemCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ItemCategory) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_category_collection_response.go b/src/internal/connector/graph/betasdk/models/item_category_collection_response.go new file mode 100644 index 000000000..60b99eaeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCategoryCollectionResponse +type ItemCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemCategoryable +} +// NewItemCategoryCollectionResponse instantiates a new ItemCategoryCollectionResponse and sets the default values. +func NewItemCategoryCollectionResponse()(*ItemCategoryCollectionResponse) { + m := &ItemCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ItemCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemCategoryCollectionResponse) GetValue()([]ItemCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemCategoryCollectionResponse) SetValue(value []ItemCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_category_collection_responseable.go new file mode 100644 index 000000000..c81268828 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCategoryCollectionResponseable +type ItemCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemCategoryable) + SetValue(value []ItemCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_categoryable.go b/src/internal/connector/graph/betasdk/models/item_categoryable.go new file mode 100644 index 000000000..41faca22b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_categoryable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCategoryable +type ItemCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCode(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_collection_response.go b/src/internal/connector/graph/betasdk/models/item_collection_response.go new file mode 100644 index 000000000..777e2e4e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCollectionResponse +type ItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Itemable +} +// NewItemCollectionResponse instantiates a new ItemCollectionResponse and sets the default values. +func NewItemCollectionResponse()(*ItemCollectionResponse) { + m := &ItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Itemable, len(val)) + for i, v := range val { + res[i] = v.(Itemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemCollectionResponse) GetValue()([]Itemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemCollectionResponse) SetValue(value []Itemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_collection_responseable.go new file mode 100644 index 000000000..1c42fd95e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemCollectionResponseable +type ItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Itemable) + SetValue(value []Itemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_email.go b/src/internal/connector/graph/betasdk/models/item_email.go new file mode 100644 index 000000000..a38015348 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_email.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemEmail +type ItemEmail struct { + ItemFacet + // The email address itself. + address *string + // The name or label a user has associated with a particular email address. + displayName *string + // The type property + type_escaped *EmailType +} +// NewItemEmail instantiates a new ItemEmail and sets the default values. +func NewItemEmail()(*ItemEmail) { + m := &ItemEmail{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.itemEmail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemEmailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemEmailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemEmail(), nil +} +// GetAddress gets the address property value. The email address itself. +func (m *ItemEmail) GetAddress()(*string) { + return m.address +} +// GetDisplayName gets the displayName property value. The name or label a user has associated with a particular email address. +func (m *ItemEmail) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemEmail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddress(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEmailType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*EmailType)) + } + return nil + } + return res +} +// GetType gets the type property value. The type property +func (m *ItemEmail) GetType()(*EmailType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ItemEmail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The email address itself. +func (m *ItemEmail) SetAddress(value *string)() { + m.address = value +} +// SetDisplayName sets the displayName property value. The name or label a user has associated with a particular email address. +func (m *ItemEmail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetType sets the type property value. The type property +func (m *ItemEmail) SetType(value *EmailType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_email_collection_response.go b/src/internal/connector/graph/betasdk/models/item_email_collection_response.go new file mode 100644 index 000000000..4f3bb75eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_email_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemEmailCollectionResponse +type ItemEmailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemEmailable +} +// NewItemEmailCollectionResponse instantiates a new ItemEmailCollectionResponse and sets the default values. +func NewItemEmailCollectionResponse()(*ItemEmailCollectionResponse) { + m := &ItemEmailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemEmailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemEmailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemEmailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemEmailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemEmailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemEmailable, len(val)) + for i, v := range val { + res[i] = v.(ItemEmailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemEmailCollectionResponse) GetValue()([]ItemEmailable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemEmailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemEmailCollectionResponse) SetValue(value []ItemEmailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_email_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_email_collection_responseable.go new file mode 100644 index 000000000..4ba2b4b3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_email_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemEmailCollectionResponseable +type ItemEmailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemEmailable) + SetValue(value []ItemEmailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_emailable.go b/src/internal/connector/graph/betasdk/models/item_emailable.go new file mode 100644 index 000000000..d7b6dd338 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_emailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemEmailable +type ItemEmailable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(*string) + GetDisplayName()(*string) + GetType()(*EmailType) + SetAddress(value *string)() + SetDisplayName(value *string)() + SetType(value *EmailType)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_facet.go b/src/internal/connector/graph/betasdk/models/item_facet.go new file mode 100644 index 000000000..6b2343789 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_facet.go @@ -0,0 +1,300 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemFacet provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ItemFacet struct { + Entity + // The audiences that are able to see the values contained within the associated entity. Possible values are: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue. + allowedAudiences *AllowedAudiences + // The createdBy property + createdBy IdentitySetable + // Provides the dateTimeOffset for when the entity was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains inference detail if the entity is inferred by the creating or modifying application. + inference InferenceDataable + // The isSearchable property + isSearchable *bool + // The lastModifiedBy property + lastModifiedBy IdentitySetable + // Provides the dateTimeOffset for when the entity was created. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Where the values within an entity originated if synced from another service. + source PersonDataSourcesable +} +// NewItemFacet instantiates a new itemFacet and sets the default values. +func NewItemFacet()(*ItemFacet) { + m := &ItemFacet{ + Entity: *NewEntity(), + } + return m +} +// CreateItemFacetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemFacetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.educationalActivity": + return NewEducationalActivity(), nil + case "#microsoft.graph.itemAddress": + return NewItemAddress(), nil + case "#microsoft.graph.itemEmail": + return NewItemEmail(), nil + case "#microsoft.graph.itemPatent": + return NewItemPatent(), nil + case "#microsoft.graph.itemPhone": + return NewItemPhone(), nil + case "#microsoft.graph.itemPublication": + return NewItemPublication(), nil + case "#microsoft.graph.languageProficiency": + return NewLanguageProficiency(), nil + case "#microsoft.graph.personAnnotation": + return NewPersonAnnotation(), nil + case "#microsoft.graph.personAnnualEvent": + return NewPersonAnnualEvent(), nil + case "#microsoft.graph.personAward": + return NewPersonAward(), nil + case "#microsoft.graph.personCertification": + return NewPersonCertification(), nil + case "#microsoft.graph.personInterest": + return NewPersonInterest(), nil + case "#microsoft.graph.personName": + return NewPersonName(), nil + case "#microsoft.graph.personResponsibility": + return NewPersonResponsibility(), nil + case "#microsoft.graph.personWebsite": + return NewPersonWebsite(), nil + case "#microsoft.graph.projectParticipation": + return NewProjectParticipation(), nil + case "#microsoft.graph.skillProficiency": + return NewSkillProficiency(), nil + case "#microsoft.graph.userAccountInformation": + return NewUserAccountInformation(), nil + case "#microsoft.graph.webAccount": + return NewWebAccount(), nil + case "#microsoft.graph.workPosition": + return NewWorkPosition(), nil + } + } + } + } + return NewItemFacet(), nil +} +// GetAllowedAudiences gets the allowedAudiences property value. The audiences that are able to see the values contained within the associated entity. Possible values are: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue. +func (m *ItemFacet) GetAllowedAudiences()(*AllowedAudiences) { + return m.allowedAudiences +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *ItemFacet) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Provides the dateTimeOffset for when the entity was created. +func (m *ItemFacet) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemFacet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedAudiences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAllowedAudiences) + if err != nil { + return err + } + if val != nil { + m.SetAllowedAudiences(val.(*AllowedAudiences)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["inference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInferenceDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInference(val.(InferenceDataable)) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePersonDataSourcesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(PersonDataSourcesable)) + } + return nil + } + return res +} +// GetInference gets the inference property value. Contains inference detail if the entity is inferred by the creating or modifying application. +func (m *ItemFacet) GetInference()(InferenceDataable) { + return m.inference +} +// GetIsSearchable gets the isSearchable property value. The isSearchable property +func (m *ItemFacet) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *ItemFacet) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Provides the dateTimeOffset for when the entity was created. +func (m *ItemFacet) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetSource gets the source property value. Where the values within an entity originated if synced from another service. +func (m *ItemFacet) GetSource()(PersonDataSourcesable) { + return m.source +} +// Serialize serializes information the current object +func (m *ItemFacet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedAudiences() != nil { + cast := (*m.GetAllowedAudiences()).String() + err = writer.WriteStringValue("allowedAudiences", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inference", m.GetInference()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("source", m.GetSource()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedAudiences sets the allowedAudiences property value. The audiences that are able to see the values contained within the associated entity. Possible values are: me, family, contacts, groupMembers, organization, federatedOrganizations, everyone, unknownFutureValue. +func (m *ItemFacet) SetAllowedAudiences(value *AllowedAudiences)() { + m.allowedAudiences = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *ItemFacet) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Provides the dateTimeOffset for when the entity was created. +func (m *ItemFacet) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetInference sets the inference property value. Contains inference detail if the entity is inferred by the creating or modifying application. +func (m *ItemFacet) SetInference(value InferenceDataable)() { + m.inference = value +} +// SetIsSearchable sets the isSearchable property value. The isSearchable property +func (m *ItemFacet) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *ItemFacet) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Provides the dateTimeOffset for when the entity was created. +func (m *ItemFacet) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetSource sets the source property value. Where the values within an entity originated if synced from another service. +func (m *ItemFacet) SetSource(value PersonDataSourcesable)() { + m.source = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_facetable.go b/src/internal/connector/graph/betasdk/models/item_facetable.go new file mode 100644 index 000000000..9d419b578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_facetable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemFacetable +type ItemFacetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedAudiences()(*AllowedAudiences) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInference()(InferenceDataable) + GetIsSearchable()(*bool) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSource()(PersonDataSourcesable) + SetAllowedAudiences(value *AllowedAudiences)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInference(value InferenceDataable)() + SetIsSearchable(value *bool)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSource(value PersonDataSourcesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_insights.go b/src/internal/connector/graph/betasdk/models/item_insights.go new file mode 100644 index 000000000..7db98553f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_insights.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemInsights +type ItemInsights struct { + OfficeGraphInsights +} +// NewItemInsights instantiates a new ItemInsights and sets the default values. +func NewItemInsights()(*ItemInsights) { + m := &ItemInsights{ + OfficeGraphInsights: *NewOfficeGraphInsights(), + } + return m +} +// CreateItemInsightsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemInsightsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemInsights(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemInsights) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OfficeGraphInsights.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ItemInsights) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OfficeGraphInsights.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/item_insightsable.go b/src/internal/connector/graph/betasdk/models/item_insightsable.go new file mode 100644 index 000000000..b5063cd9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_insightsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemInsightsable +type ItemInsightsable interface { + OfficeGraphInsightsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/item_patent.go b/src/internal/connector/graph/betasdk/models/item_patent.go new file mode 100644 index 000000000..595193c75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_patent.go @@ -0,0 +1,218 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPatent +type ItemPatent struct { + ItemFacet + // Descpription of the patent or filing. + description *string + // Title of the patent or filing. + displayName *string + // Indicates the patent is pending. + isPending *bool + // The date that the patent was granted. + issuedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Authority which granted the patent. + issuingAuthority *string + // The patent number. + number *string + // URL referencing the patent or filing. + webUrl *string +} +// NewItemPatent instantiates a new ItemPatent and sets the default values. +func NewItemPatent()(*ItemPatent) { + m := &ItemPatent{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.itemPatent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemPatentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPatentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPatent(), nil +} +// GetDescription gets the description property value. Descpription of the patent or filing. +func (m *ItemPatent) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Title of the patent or filing. +func (m *ItemPatent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPatent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isPending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPending(val) + } + return nil + } + res["issuedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuedDate(val) + } + return nil + } + res["issuingAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuingAuthority(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetIsPending gets the isPending property value. Indicates the patent is pending. +func (m *ItemPatent) GetIsPending()(*bool) { + return m.isPending +} +// GetIssuedDate gets the issuedDate property value. The date that the patent was granted. +func (m *ItemPatent) GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.issuedDate +} +// GetIssuingAuthority gets the issuingAuthority property value. Authority which granted the patent. +func (m *ItemPatent) GetIssuingAuthority()(*string) { + return m.issuingAuthority +} +// GetNumber gets the number property value. The patent number. +func (m *ItemPatent) GetNumber()(*string) { + return m.number +} +// GetWebUrl gets the webUrl property value. URL referencing the patent or filing. +func (m *ItemPatent) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *ItemPatent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPending", m.GetIsPending()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("issuedDate", m.GetIssuedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuingAuthority", m.GetIssuingAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Descpription of the patent or filing. +func (m *ItemPatent) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Title of the patent or filing. +func (m *ItemPatent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsPending sets the isPending property value. Indicates the patent is pending. +func (m *ItemPatent) SetIsPending(value *bool)() { + m.isPending = value +} +// SetIssuedDate sets the issuedDate property value. The date that the patent was granted. +func (m *ItemPatent) SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.issuedDate = value +} +// SetIssuingAuthority sets the issuingAuthority property value. Authority which granted the patent. +func (m *ItemPatent) SetIssuingAuthority(value *string)() { + m.issuingAuthority = value +} +// SetNumber sets the number property value. The patent number. +func (m *ItemPatent) SetNumber(value *string)() { + m.number = value +} +// SetWebUrl sets the webUrl property value. URL referencing the patent or filing. +func (m *ItemPatent) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_patent_collection_response.go b/src/internal/connector/graph/betasdk/models/item_patent_collection_response.go new file mode 100644 index 000000000..809516138 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_patent_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPatentCollectionResponse +type ItemPatentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemPatentable +} +// NewItemPatentCollectionResponse instantiates a new ItemPatentCollectionResponse and sets the default values. +func NewItemPatentCollectionResponse()(*ItemPatentCollectionResponse) { + m := &ItemPatentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemPatentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPatentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPatentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPatentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPatentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPatentable, len(val)) + for i, v := range val { + res[i] = v.(ItemPatentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemPatentCollectionResponse) GetValue()([]ItemPatentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemPatentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemPatentCollectionResponse) SetValue(value []ItemPatentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_patent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_patent_collection_responseable.go new file mode 100644 index 000000000..2b8e567a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_patent_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPatentCollectionResponseable +type ItemPatentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemPatentable) + SetValue(value []ItemPatentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_patentable.go b/src/internal/connector/graph/betasdk/models/item_patentable.go new file mode 100644 index 000000000..5101f6c7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_patentable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPatentable +type ItemPatentable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIsPending()(*bool) + GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetIssuingAuthority()(*string) + GetNumber()(*string) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsPending(value *bool)() + SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetIssuingAuthority(value *string)() + SetNumber(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_phone.go b/src/internal/connector/graph/betasdk/models/item_phone.go new file mode 100644 index 000000000..d8aa984ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_phone.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPhone +type ItemPhone struct { + ItemFacet + // Friendly name the user has assigned this phone number. + displayName *string + // Phone number provided by the user. + number *string + // The type property + type_escaped *PhoneType +} +// NewItemPhone instantiates a new ItemPhone and sets the default values. +func NewItemPhone()(*ItemPhone) { + m := &ItemPhone{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.itemPhone"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemPhoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPhoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPhone(), nil +} +// GetDisplayName gets the displayName property value. Friendly name the user has assigned this phone number. +func (m *ItemPhone) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPhone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePhoneType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PhoneType)) + } + return nil + } + return res +} +// GetNumber gets the number property value. Phone number provided by the user. +func (m *ItemPhone) GetNumber()(*string) { + return m.number +} +// GetType gets the type property value. The type property +func (m *ItemPhone) GetType()(*PhoneType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ItemPhone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Friendly name the user has assigned this phone number. +func (m *ItemPhone) SetDisplayName(value *string)() { + m.displayName = value +} +// SetNumber sets the number property value. Phone number provided by the user. +func (m *ItemPhone) SetNumber(value *string)() { + m.number = value +} +// SetType sets the type property value. The type property +func (m *ItemPhone) SetType(value *PhoneType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_phone_collection_response.go b/src/internal/connector/graph/betasdk/models/item_phone_collection_response.go new file mode 100644 index 000000000..1cccf8b54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_phone_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPhoneCollectionResponse +type ItemPhoneCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemPhoneable +} +// NewItemPhoneCollectionResponse instantiates a new ItemPhoneCollectionResponse and sets the default values. +func NewItemPhoneCollectionResponse()(*ItemPhoneCollectionResponse) { + m := &ItemPhoneCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemPhoneCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPhoneCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPhoneCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPhoneCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPhoneable, len(val)) + for i, v := range val { + res[i] = v.(ItemPhoneable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemPhoneCollectionResponse) GetValue()([]ItemPhoneable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemPhoneCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemPhoneCollectionResponse) SetValue(value []ItemPhoneable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_phone_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_phone_collection_responseable.go new file mode 100644 index 000000000..c2f9c9c23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_phone_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPhoneCollectionResponseable +type ItemPhoneCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemPhoneable) + SetValue(value []ItemPhoneable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_phoneable.go b/src/internal/connector/graph/betasdk/models/item_phoneable.go new file mode 100644 index 000000000..528df1d8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_phoneable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPhoneable +type ItemPhoneable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetNumber()(*string) + GetType()(*PhoneType) + SetDisplayName(value *string)() + SetNumber(value *string)() + SetType(value *PhoneType)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_publication.go b/src/internal/connector/graph/betasdk/models/item_publication.go new file mode 100644 index 000000000..2e5b0456e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_publication.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPublication +type ItemPublication struct { + ItemFacet + // Description of the publication. + description *string + // Title of the publication. + displayName *string + // The date that the publication was published. + publishedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Publication or publisher for the publication. + publisher *string + // URL referencing a thumbnail of the publication. + thumbnailUrl *string + // URL referencing the publication. + webUrl *string +} +// NewItemPublication instantiates a new ItemPublication and sets the default values. +func NewItemPublication()(*ItemPublication) { + m := &ItemPublication{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.itemPublication"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateItemPublicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPublicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPublication(), nil +} +// GetDescription gets the description property value. Description of the publication. +func (m *ItemPublication) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Title of the publication. +func (m *ItemPublication) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPublication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["publishedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDate(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetPublishedDate gets the publishedDate property value. The date that the publication was published. +func (m *ItemPublication) GetPublishedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.publishedDate +} +// GetPublisher gets the publisher property value. Publication or publisher for the publication. +func (m *ItemPublication) GetPublisher()(*string) { + return m.publisher +} +// GetThumbnailUrl gets the thumbnailUrl property value. URL referencing a thumbnail of the publication. +func (m *ItemPublication) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. URL referencing the publication. +func (m *ItemPublication) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *ItemPublication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("publishedDate", m.GetPublishedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the publication. +func (m *ItemPublication) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Title of the publication. +func (m *ItemPublication) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPublishedDate sets the publishedDate property value. The date that the publication was published. +func (m *ItemPublication) SetPublishedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.publishedDate = value +} +// SetPublisher sets the publisher property value. Publication or publisher for the publication. +func (m *ItemPublication) SetPublisher(value *string)() { + m.publisher = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. URL referencing a thumbnail of the publication. +func (m *ItemPublication) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. URL referencing the publication. +func (m *ItemPublication) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_publication_collection_response.go b/src/internal/connector/graph/betasdk/models/item_publication_collection_response.go new file mode 100644 index 000000000..1353b767b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_publication_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPublicationCollectionResponse +type ItemPublicationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ItemPublicationable +} +// NewItemPublicationCollectionResponse instantiates a new ItemPublicationCollectionResponse and sets the default values. +func NewItemPublicationCollectionResponse()(*ItemPublicationCollectionResponse) { + m := &ItemPublicationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateItemPublicationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemPublicationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemPublicationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemPublicationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPublicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPublicationable, len(val)) + for i, v := range val { + res[i] = v.(ItemPublicationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ItemPublicationCollectionResponse) GetValue()([]ItemPublicationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ItemPublicationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ItemPublicationCollectionResponse) SetValue(value []ItemPublicationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_publication_collection_responseable.go b/src/internal/connector/graph/betasdk/models/item_publication_collection_responseable.go new file mode 100644 index 000000000..cafa7fee9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_publication_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPublicationCollectionResponseable +type ItemPublicationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ItemPublicationable) + SetValue(value []ItemPublicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_publicationable.go b/src/internal/connector/graph/betasdk/models/item_publicationable.go new file mode 100644 index 000000000..7da40bcc1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_publicationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemPublicationable +type ItemPublicationable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetPublishedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetPublisher()(*string) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetPublishedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetPublisher(value *string)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/item_reference.go b/src/internal/connector/graph/betasdk/models/item_reference.go new file mode 100644 index 000000000..03455288c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_reference.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemReference +type ItemReference struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Unique identifier of the drive instance that contains the item. Read-only. + driveId *string + // Identifies the type of drive. See [drive][] resource for values. + driveType *string + // Unique identifier of the item in the drive. Read-only. + id *string + // The name of the item being referenced. Read-only. + name *string + // The OdataType property + odataType *string + // Path that can be used to navigate to the item. Read-only. + path *string + // A unique identifier for a shared resource that can be accessed via the [Shares][] API. + shareId *string + // Returns identifiers useful for SharePoint REST compatibility. Read-only. + sharepointIds SharepointIdsable + // For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. + siteId *string +} +// NewItemReference instantiates a new itemReference and sets the default values. +func NewItemReference()(*ItemReference) { + m := &ItemReference{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateItemReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateItemReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewItemReference(), 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 *ItemReference) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDriveId gets the driveId property value. Unique identifier of the drive instance that contains the item. Read-only. +func (m *ItemReference) GetDriveId()(*string) { + return m.driveId +} +// GetDriveType gets the driveType property value. Identifies the type of drive. See [drive][] resource for values. +func (m *ItemReference) GetDriveType()(*string) { + return m.driveType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ItemReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["driveId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDriveId(val) + } + return nil + } + res["driveType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDriveType(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["shareId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShareId(val) + } + return nil + } + res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharepointIds(val.(SharepointIdsable)) + } + return nil + } + res["siteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteId(val) + } + return nil + } + return res +} +// GetId gets the id property value. Unique identifier of the item in the drive. Read-only. +func (m *ItemReference) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name of the item being referenced. Read-only. +func (m *ItemReference) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ItemReference) GetOdataType()(*string) { + return m.odataType +} +// GetPath gets the path property value. Path that can be used to navigate to the item. Read-only. +func (m *ItemReference) GetPath()(*string) { + return m.path +} +// GetShareId gets the shareId property value. A unique identifier for a shared resource that can be accessed via the [Shares][] API. +func (m *ItemReference) GetShareId()(*string) { + return m.shareId +} +// GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *ItemReference) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetSiteId gets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. +func (m *ItemReference) GetSiteId()(*string) { + return m.siteId +} +// Serialize serializes information the current object +func (m *ItemReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("driveId", m.GetDriveId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("driveType", m.GetDriveType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("shareId", m.GetShareId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("siteId", m.GetSiteId()) + 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 *ItemReference) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDriveId sets the driveId property value. Unique identifier of the drive instance that contains the item. Read-only. +func (m *ItemReference) SetDriveId(value *string)() { + m.driveId = value +} +// SetDriveType sets the driveType property value. Identifies the type of drive. See [drive][] resource for values. +func (m *ItemReference) SetDriveType(value *string)() { + m.driveType = value +} +// SetId sets the id property value. Unique identifier of the item in the drive. Read-only. +func (m *ItemReference) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name of the item being referenced. Read-only. +func (m *ItemReference) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ItemReference) SetOdataType(value *string)() { + m.odataType = value +} +// SetPath sets the path property value. Path that can be used to navigate to the item. Read-only. +func (m *ItemReference) SetPath(value *string)() { + m.path = value +} +// SetShareId sets the shareId property value. A unique identifier for a shared resource that can be accessed via the [Shares][] API. +func (m *ItemReference) SetShareId(value *string)() { + m.shareId = value +} +// SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *ItemReference) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetSiteId sets the siteId property value. For OneDrive for Business and SharePoint, this property represents the ID of the site that contains the parent document library of the driveItem resource. The value is the same as the id property of that [site][] resource. It is an opaque string that consists of three identifiers of the site. For OneDrive, this property is not populated. +func (m *ItemReference) SetSiteId(value *string)() { + m.siteId = value +} diff --git a/src/internal/connector/graph/betasdk/models/item_referenceable.go b/src/internal/connector/graph/betasdk/models/item_referenceable.go new file mode 100644 index 000000000..6fa56bf92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/item_referenceable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ItemReferenceable +type ItemReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDriveId()(*string) + GetDriveType()(*string) + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + GetPath()(*string) + GetShareId()(*string) + GetSharepointIds()(SharepointIdsable) + GetSiteId()(*string) + SetDriveId(value *string)() + SetDriveType(value *string)() + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetPath(value *string)() + SetShareId(value *string)() + SetSharepointIds(value SharepointIdsable)() + SetSiteId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/itemable.go b/src/internal/connector/graph/betasdk/models/itemable.go new file mode 100644 index 000000000..e4842360b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/itemable.go @@ -0,0 +1,47 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Itemable +type Itemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBlocked()(*bool) + GetDisplayName()(*string) + GetGtin()(*string) + GetInventory()(*float64) + GetItemCategory()(ItemCategoryable) + GetItemCategoryCode()(*string) + GetItemCategoryId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetPicture()([]Pictureable) + GetPriceIncludesTax()(*bool) + GetTaxGroupCode()(*string) + GetTaxGroupId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetType()(*string) + GetUnitCost()(*float64) + GetUnitPrice()(*float64) + SetBaseUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBlocked(value *bool)() + SetDisplayName(value *string)() + SetGtin(value *string)() + SetInventory(value *float64)() + SetItemCategory(value ItemCategoryable)() + SetItemCategoryCode(value *string)() + SetItemCategoryId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetPicture(value []Pictureable)() + SetPriceIncludesTax(value *bool)() + SetTaxGroupCode(value *string)() + SetTaxGroupId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetType(value *string)() + SetUnitCost(value *float64)() + SetUnitPrice(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/job_response_base.go b/src/internal/connector/graph/betasdk/models/job_response_base.go new file mode 100644 index 000000000..ac33b7263 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/job_response_base.go @@ -0,0 +1,239 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JobResponseBase +type JobResponseBase struct { + Entity + // The creationDateTime property + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The endDateTime property + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The error property + error ClassificationErrorable + // The startDateTime property + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *string + // The tenantId property + tenantId *string + // The type property + type_escaped *string +} +// NewJobResponseBase instantiates a new JobResponseBase and sets the default values. +func NewJobResponseBase()(*JobResponseBase) { + m := &JobResponseBase{ + Entity: *NewEntity(), + } + return m +} +// CreateJobResponseBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJobResponseBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.classificationJobResponse": + return NewClassificationJobResponse(), nil + case "#microsoft.graph.dlpEvaluatePoliciesJobResponse": + return NewDlpEvaluatePoliciesJobResponse(), nil + case "#microsoft.graph.evaluateLabelJobResponse": + return NewEvaluateLabelJobResponse(), nil + } + } + } + } + return NewJobResponseBase(), nil +} +// GetCreationDateTime gets the creationDateTime property value. The creationDateTime property +func (m *JobResponseBase) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *JobResponseBase) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetError gets the error property value. The error property +func (m *JobResponseBase) GetError()(ClassificationErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JobResponseBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClassificationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ClassificationErrorable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *JobResponseBase) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. The status property +func (m *JobResponseBase) GetStatus()(*string) { + return m.status +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *JobResponseBase) GetTenantId()(*string) { + return m.tenantId +} +// GetType gets the type property value. The type property +func (m *JobResponseBase) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *JobResponseBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetCreationDateTime sets the creationDateTime property value. The creationDateTime property +func (m *JobResponseBase) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *JobResponseBase) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetError sets the error property value. The error property +func (m *JobResponseBase) SetError(value ClassificationErrorable)() { + m.error = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *JobResponseBase) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *JobResponseBase) SetStatus(value *string)() { + m.status = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *JobResponseBase) SetTenantId(value *string)() { + m.tenantId = value +} +// SetType sets the type property value. The type property +func (m *JobResponseBase) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/job_response_base_collection_response.go b/src/internal/connector/graph/betasdk/models/job_response_base_collection_response.go new file mode 100644 index 000000000..ab957f2ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/job_response_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JobResponseBaseCollectionResponse +type JobResponseBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []JobResponseBaseable +} +// NewJobResponseBaseCollectionResponse instantiates a new JobResponseBaseCollectionResponse and sets the default values. +func NewJobResponseBaseCollectionResponse()(*JobResponseBaseCollectionResponse) { + m := &JobResponseBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateJobResponseBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJobResponseBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJobResponseBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JobResponseBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJobResponseBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JobResponseBaseable, len(val)) + for i, v := range val { + res[i] = v.(JobResponseBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *JobResponseBaseCollectionResponse) GetValue()([]JobResponseBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *JobResponseBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *JobResponseBaseCollectionResponse) SetValue(value []JobResponseBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/job_response_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/job_response_base_collection_responseable.go new file mode 100644 index 000000000..2f9d50faf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/job_response_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JobResponseBaseCollectionResponseable +type JobResponseBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]JobResponseBaseable) + SetValue(value []JobResponseBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/job_response_baseable.go b/src/internal/connector/graph/betasdk/models/job_response_baseable.go new file mode 100644 index 000000000..7dd027d09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/job_response_baseable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JobResponseBaseable +type JobResponseBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetError()(ClassificationErrorable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*string) + GetTenantId()(*string) + GetType()(*string) + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetError(value ClassificationErrorable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *string)() + SetTenantId(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_info.go b/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_info.go new file mode 100644 index 000000000..d46e482aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_info.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JoinMeetingIdMeetingInfo +type JoinMeetingIdMeetingInfo struct { + MeetingInfo + // The ID used to join the meeting. + joinMeetingId *string + // The passcode used to join the meeting. Optional. + passcode *string +} +// NewJoinMeetingIdMeetingInfo instantiates a new JoinMeetingIdMeetingInfo and sets the default values. +func NewJoinMeetingIdMeetingInfo()(*JoinMeetingIdMeetingInfo) { + m := &JoinMeetingIdMeetingInfo{ + MeetingInfo: *NewMeetingInfo(), + } + odataTypeValue := "#microsoft.graph.joinMeetingIdMeetingInfo"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateJoinMeetingIdMeetingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJoinMeetingIdMeetingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJoinMeetingIdMeetingInfo(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JoinMeetingIdMeetingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingInfo.GetFieldDeserializers() + res["joinMeetingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinMeetingId(val) + } + return nil + } + res["passcode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscode(val) + } + return nil + } + return res +} +// GetJoinMeetingId gets the joinMeetingId property value. The ID used to join the meeting. +func (m *JoinMeetingIdMeetingInfo) GetJoinMeetingId()(*string) { + return m.joinMeetingId +} +// GetPasscode gets the passcode property value. The passcode used to join the meeting. Optional. +func (m *JoinMeetingIdMeetingInfo) GetPasscode()(*string) { + return m.passcode +} +// Serialize serializes information the current object +func (m *JoinMeetingIdMeetingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingInfo.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("joinMeetingId", m.GetJoinMeetingId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passcode", m.GetPasscode()) + if err != nil { + return err + } + } + return nil +} +// SetJoinMeetingId sets the joinMeetingId property value. The ID used to join the meeting. +func (m *JoinMeetingIdMeetingInfo) SetJoinMeetingId(value *string)() { + m.joinMeetingId = value +} +// SetPasscode sets the passcode property value. The passcode used to join the meeting. Optional. +func (m *JoinMeetingIdMeetingInfo) SetPasscode(value *string)() { + m.passcode = value +} diff --git a/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_infoable.go b/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_infoable.go new file mode 100644 index 000000000..40fd96d09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/join_meeting_id_meeting_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JoinMeetingIdMeetingInfoable +type JoinMeetingIdMeetingInfoable interface { + MeetingInfoable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJoinMeetingId()(*string) + GetPasscode()(*string) + SetJoinMeetingId(value *string)() + SetPasscode(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/join_meeting_id_settings.go b/src/internal/connector/graph/betasdk/models/join_meeting_id_settings.go new file mode 100644 index 000000000..720211f60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/join_meeting_id_settings.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JoinMeetingIdSettings +type JoinMeetingIdSettings 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 whether a passcode is required to join a meeting when using joinMeetingId. Optional. + isPasscodeRequired *bool + // The meeting ID to be used to join a meeting. Optional. Read-only. + joinMeetingId *string + // The OdataType property + odataType *string + // The passcode to join a meeting. Optional. Read-only. + passcode *string +} +// NewJoinMeetingIdSettings instantiates a new joinMeetingIdSettings and sets the default values. +func NewJoinMeetingIdSettings()(*JoinMeetingIdSettings) { + m := &JoinMeetingIdSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateJoinMeetingIdSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJoinMeetingIdSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJoinMeetingIdSettings(), 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 *JoinMeetingIdSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JoinMeetingIdSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isPasscodeRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPasscodeRequired(val) + } + return nil + } + res["joinMeetingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinMeetingId(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["passcode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscode(val) + } + return nil + } + return res +} +// GetIsPasscodeRequired gets the isPasscodeRequired property value. Indicates whether a passcode is required to join a meeting when using joinMeetingId. Optional. +func (m *JoinMeetingIdSettings) GetIsPasscodeRequired()(*bool) { + return m.isPasscodeRequired +} +// GetJoinMeetingId gets the joinMeetingId property value. The meeting ID to be used to join a meeting. Optional. Read-only. +func (m *JoinMeetingIdSettings) GetJoinMeetingId()(*string) { + return m.joinMeetingId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *JoinMeetingIdSettings) GetOdataType()(*string) { + return m.odataType +} +// GetPasscode gets the passcode property value. The passcode to join a meeting. Optional. Read-only. +func (m *JoinMeetingIdSettings) GetPasscode()(*string) { + return m.passcode +} +// Serialize serializes information the current object +func (m *JoinMeetingIdSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isPasscodeRequired", m.GetIsPasscodeRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("joinMeetingId", m.GetJoinMeetingId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("passcode", m.GetPasscode()) + 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 *JoinMeetingIdSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsPasscodeRequired sets the isPasscodeRequired property value. Indicates whether a passcode is required to join a meeting when using joinMeetingId. Optional. +func (m *JoinMeetingIdSettings) SetIsPasscodeRequired(value *bool)() { + m.isPasscodeRequired = value +} +// SetJoinMeetingId sets the joinMeetingId property value. The meeting ID to be used to join a meeting. Optional. Read-only. +func (m *JoinMeetingIdSettings) SetJoinMeetingId(value *string)() { + m.joinMeetingId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *JoinMeetingIdSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetPasscode sets the passcode property value. The passcode to join a meeting. Optional. Read-only. +func (m *JoinMeetingIdSettings) SetPasscode(value *string)() { + m.passcode = value +} diff --git a/src/internal/connector/graph/betasdk/models/join_meeting_id_settingsable.go b/src/internal/connector/graph/betasdk/models/join_meeting_id_settingsable.go new file mode 100644 index 000000000..2f611d05f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/join_meeting_id_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JoinMeetingIdSettingsable +type JoinMeetingIdSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsPasscodeRequired()(*bool) + GetJoinMeetingId()(*string) + GetOdataType()(*string) + GetPasscode()(*string) + SetIsPasscodeRequired(value *bool)() + SetJoinMeetingId(value *string)() + SetOdataType(value *string)() + SetPasscode(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/join_type.go b/src/internal/connector/graph/betasdk/models/join_type.go new file mode 100644 index 000000000..3c6dc9bf3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/join_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type JoinType int + +const ( + // Unknown enrollment join type. + UNKNOWN_JOINTYPE JoinType = iota + // The device is joined by Azure AD. + AZUREADJOINED_JOINTYPE + // The device is registered by Azure AD. + AZUREADREGISTERED_JOINTYPE + // The device is joined by hybrid Azure AD. + HYBRIDAZUREADJOINED_JOINTYPE +) + +func (i JoinType) String() string { + return []string{"unknown", "azureADJoined", "azureADRegistered", "hybridAzureADJoined"}[i] +} +func ParseJoinType(v string) (interface{}, error) { + result := UNKNOWN_JOINTYPE + switch v { + case "unknown": + result = UNKNOWN_JOINTYPE + case "azureADJoined": + result = AZUREADJOINED_JOINTYPE + case "azureADRegistered": + result = AZUREADREGISTERED_JOINTYPE + case "hybridAzureADJoined": + result = HYBRIDAZUREADJOINED_JOINTYPE + default: + return 0, errors.New("Unknown JoinType value: " + v) + } + return &result, nil +} +func SerializeJoinType(values []JoinType) []string { + 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/journal.go b/src/internal/connector/graph/betasdk/models/journal.go new file mode 100644 index 000000000..3c4c90cf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal.go @@ -0,0 +1,226 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Journal provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Journal struct { + Entity + // The account property + account Accountable + // The balancingAccountId property + balancingAccountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The balancingAccountNumber property + balancingAccountNumber *string + // The code property + code *string + // The displayName property + displayName *string + // The journalLines property + journalLines []JournalLineable + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewJournal instantiates a new journal and sets the default values. +func NewJournal()(*Journal) { + m := &Journal{ + Entity: *NewEntity(), + } + return m +} +// CreateJournalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJournalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJournal(), nil +} +// GetAccount gets the account property value. The account property +func (m *Journal) GetAccount()(Accountable) { + return m.account +} +// GetBalancingAccountId gets the balancingAccountId property value. The balancingAccountId property +func (m *Journal) GetBalancingAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.balancingAccountId +} +// GetBalancingAccountNumber gets the balancingAccountNumber property value. The balancingAccountNumber property +func (m *Journal) GetBalancingAccountNumber()(*string) { + return m.balancingAccountNumber +} +// GetCode gets the code property value. The code property +func (m *Journal) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Journal) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Journal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["balancingAccountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBalancingAccountId(val) + } + return nil + } + res["balancingAccountNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBalancingAccountNumber(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["journalLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJournalLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JournalLineable, len(val)) + for i, v := range val { + res[i] = v.(JournalLineable) + } + m.SetJournalLines(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetJournalLines gets the journalLines property value. The journalLines property +func (m *Journal) GetJournalLines()([]JournalLineable) { + return m.journalLines +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Journal) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *Journal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("balancingAccountId", m.GetBalancingAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("balancingAccountNumber", m.GetBalancingAccountNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetJournalLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJournalLines())) + for i, v := range m.GetJournalLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("journalLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *Journal) SetAccount(value Accountable)() { + m.account = value +} +// SetBalancingAccountId sets the balancingAccountId property value. The balancingAccountId property +func (m *Journal) SetBalancingAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.balancingAccountId = value +} +// SetBalancingAccountNumber sets the balancingAccountNumber property value. The balancingAccountNumber property +func (m *Journal) SetBalancingAccountNumber(value *string)() { + m.balancingAccountNumber = value +} +// SetCode sets the code property value. The code property +func (m *Journal) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Journal) SetDisplayName(value *string)() { + m.displayName = value +} +// SetJournalLines sets the journalLines property value. The journalLines property +func (m *Journal) SetJournalLines(value []JournalLineable)() { + m.journalLines = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Journal) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/journal_collection_response.go b/src/internal/connector/graph/betasdk/models/journal_collection_response.go new file mode 100644 index 000000000..d19205c36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalCollectionResponse +type JournalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Journalable +} +// NewJournalCollectionResponse instantiates a new JournalCollectionResponse and sets the default values. +func NewJournalCollectionResponse()(*JournalCollectionResponse) { + m := &JournalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateJournalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJournalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJournalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JournalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJournalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Journalable, len(val)) + for i, v := range val { + res[i] = v.(Journalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *JournalCollectionResponse) GetValue()([]Journalable) { + return m.value +} +// Serialize serializes information the current object +func (m *JournalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *JournalCollectionResponse) SetValue(value []Journalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/journal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/journal_collection_responseable.go new file mode 100644 index 000000000..f74a1f980 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalCollectionResponseable +type JournalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Journalable) + SetValue(value []Journalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/journal_line.go b/src/internal/connector/graph/betasdk/models/journal_line.go new file mode 100644 index 000000000..c386c9fff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_line.go @@ -0,0 +1,348 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type JournalLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The accountNumber property + accountNumber *string + // The amount property + amount *float64 + // The comment property + comment *string + // The description property + description *string + // The documentNumber property + documentNumber *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The journalDisplayName property + journalDisplayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lineNumber property + lineNumber *int32 + // The postingDate property + postingDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewJournalLine instantiates a new journalLine and sets the default values. +func NewJournalLine()(*JournalLine) { + m := &JournalLine{ + Entity: *NewEntity(), + } + return m +} +// CreateJournalLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJournalLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJournalLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *JournalLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *JournalLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAccountNumber gets the accountNumber property value. The accountNumber property +func (m *JournalLine) GetAccountNumber()(*string) { + return m.accountNumber +} +// GetAmount gets the amount property value. The amount property +func (m *JournalLine) GetAmount()(*float64) { + return m.amount +} +// GetComment gets the comment property value. The comment property +func (m *JournalLine) GetComment()(*string) { + return m.comment +} +// GetDescription gets the description property value. The description property +func (m *JournalLine) GetDescription()(*string) { + return m.description +} +// GetDocumentNumber gets the documentNumber property value. The documentNumber property +func (m *JournalLine) GetDocumentNumber()(*string) { + return m.documentNumber +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *JournalLine) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JournalLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["accountNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountNumber(val) + } + return nil + } + res["amount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmount(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["documentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentNumber(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["journalDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJournalDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lineNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLineNumber(val) + } + return nil + } + res["postingDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetPostingDate(val) + } + return nil + } + return res +} +// GetJournalDisplayName gets the journalDisplayName property value. The journalDisplayName property +func (m *JournalLine) GetJournalDisplayName()(*string) { + return m.journalDisplayName +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *JournalLine) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLineNumber gets the lineNumber property value. The lineNumber property +func (m *JournalLine) GetLineNumber()(*int32) { + return m.lineNumber +} +// GetPostingDate gets the postingDate property value. The postingDate property +func (m *JournalLine) GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.postingDate +} +// Serialize serializes information the current object +func (m *JournalLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("accountNumber", m.GetAccountNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amount", m.GetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("documentNumber", m.GetDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("journalDisplayName", m.GetJournalDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("lineNumber", m.GetLineNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("postingDate", m.GetPostingDate()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *JournalLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *JournalLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAccountNumber sets the accountNumber property value. The accountNumber property +func (m *JournalLine) SetAccountNumber(value *string)() { + m.accountNumber = value +} +// SetAmount sets the amount property value. The amount property +func (m *JournalLine) SetAmount(value *float64)() { + m.amount = value +} +// SetComment sets the comment property value. The comment property +func (m *JournalLine) SetComment(value *string)() { + m.comment = value +} +// SetDescription sets the description property value. The description property +func (m *JournalLine) SetDescription(value *string)() { + m.description = value +} +// SetDocumentNumber sets the documentNumber property value. The documentNumber property +func (m *JournalLine) SetDocumentNumber(value *string)() { + m.documentNumber = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *JournalLine) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetJournalDisplayName sets the journalDisplayName property value. The journalDisplayName property +func (m *JournalLine) SetJournalDisplayName(value *string)() { + m.journalDisplayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *JournalLine) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLineNumber sets the lineNumber property value. The lineNumber property +func (m *JournalLine) SetLineNumber(value *int32)() { + m.lineNumber = value +} +// SetPostingDate sets the postingDate property value. The postingDate property +func (m *JournalLine) SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.postingDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/journal_line_collection_response.go b/src/internal/connector/graph/betasdk/models/journal_line_collection_response.go new file mode 100644 index 000000000..6b2db6de8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalLineCollectionResponse +type JournalLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []JournalLineable +} +// NewJournalLineCollectionResponse instantiates a new JournalLineCollectionResponse and sets the default values. +func NewJournalLineCollectionResponse()(*JournalLineCollectionResponse) { + m := &JournalLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateJournalLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJournalLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJournalLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JournalLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateJournalLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]JournalLineable, len(val)) + for i, v := range val { + res[i] = v.(JournalLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *JournalLineCollectionResponse) GetValue()([]JournalLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *JournalLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *JournalLineCollectionResponse) SetValue(value []JournalLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/journal_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/journal_line_collection_responseable.go new file mode 100644 index 000000000..d78f14640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalLineCollectionResponseable +type JournalLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]JournalLineable) + SetValue(value []JournalLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/journal_lineable.go b/src/internal/connector/graph/betasdk/models/journal_lineable.go new file mode 100644 index 000000000..c9d1ad682 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journal_lineable.go @@ -0,0 +1,37 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JournalLineable +type JournalLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAccountNumber()(*string) + GetAmount()(*float64) + GetComment()(*string) + GetDescription()(*string) + GetDocumentNumber()(*string) + GetExternalDocumentNumber()(*string) + GetJournalDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLineNumber()(*int32) + GetPostingDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAccountNumber(value *string)() + SetAmount(value *float64)() + SetComment(value *string)() + SetDescription(value *string)() + SetDocumentNumber(value *string)() + SetExternalDocumentNumber(value *string)() + SetJournalDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLineNumber(value *int32)() + SetPostingDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/journalable.go b/src/internal/connector/graph/betasdk/models/journalable.go new file mode 100644 index 000000000..b45c7a86d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/journalable.go @@ -0,0 +1,27 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Journalable +type Journalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetBalancingAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBalancingAccountNumber()(*string) + GetCode()(*string) + GetDisplayName()(*string) + GetJournalLines()([]JournalLineable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAccount(value Accountable)() + SetBalancingAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBalancingAccountNumber(value *string)() + SetCode(value *string)() + SetDisplayName(value *string)() + SetJournalLines(value []JournalLineable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/json.go b/src/internal/connector/graph/betasdk/models/json.go new file mode 100644 index 000000000..67977f2b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/json.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Json +type Json 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 OdataType property + odataType *string +} +// NewJson instantiates a new Json and sets the default values. +func NewJson()(*Json) { + m := &Json{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateJsonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJsonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJson(), 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 *Json) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Json) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Json) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Json) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Json) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Json) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/jsonable.go b/src/internal/connector/graph/betasdk/models/jsonable.go new file mode 100644 index 000000000..5c4b95b86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/jsonable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Jsonable +type Jsonable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/justify_action.go b/src/internal/connector/graph/betasdk/models/justify_action.go new file mode 100644 index 000000000..b4ce1c98a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/justify_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JustifyAction +type JustifyAction struct { + InformationProtectionAction +} +// NewJustifyAction instantiates a new JustifyAction and sets the default values. +func NewJustifyAction()(*JustifyAction) { + m := &JustifyAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.justifyAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateJustifyActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJustifyActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJustifyAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JustifyAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *JustifyAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/justify_actionable.go b/src/internal/connector/graph/betasdk/models/justify_actionable.go new file mode 100644 index 000000000..72c306d07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/justify_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JustifyActionable +type JustifyActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/kerberos_sign_on_mapping_attribute_type.go b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_mapping_attribute_type.go new file mode 100644 index 000000000..ce122db7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_mapping_attribute_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KerberosSignOnMappingAttributeType int + +const ( + USERPRINCIPALNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE KerberosSignOnMappingAttributeType = iota + ONPREMISESUSERPRINCIPALNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + USERPRINCIPALUSERNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + ONPREMISESUSERPRINCIPALUSERNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + ONPREMISESSAMACCOUNTNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE +) + +func (i KerberosSignOnMappingAttributeType) String() string { + return []string{"userPrincipalName", "onPremisesUserPrincipalName", "userPrincipalUsername", "onPremisesUserPrincipalUsername", "onPremisesSAMAccountName"}[i] +} +func ParseKerberosSignOnMappingAttributeType(v string) (interface{}, error) { + result := USERPRINCIPALNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + switch v { + case "userPrincipalName": + result = USERPRINCIPALNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + case "onPremisesUserPrincipalName": + result = ONPREMISESUSERPRINCIPALNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + case "userPrincipalUsername": + result = USERPRINCIPALUSERNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + case "onPremisesUserPrincipalUsername": + result = ONPREMISESUSERPRINCIPALUSERNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + case "onPremisesSAMAccountName": + result = ONPREMISESSAMACCOUNTNAME_KERBEROSSIGNONMAPPINGATTRIBUTETYPE + default: + return 0, errors.New("Unknown KerberosSignOnMappingAttributeType value: " + v) + } + return &result, nil +} +func SerializeKerberosSignOnMappingAttributeType(values []KerberosSignOnMappingAttributeType) []string { + 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/kerberos_sign_on_settings.go b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_settings.go new file mode 100644 index 000000000..ded083c1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_settings.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KerberosSignOnSettings +type KerberosSignOnSettings 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 Internal Application SPN of the application server. This SPN needs to be in the list of services to which the connector can present delegated credentials. + kerberosServicePrincipalName *string + // The Delegated Login Identity for the connector to use on behalf of your users. For more information, see Working with different on-premises and cloud identities . Possible values are: userPrincipalName, onPremisesUserPrincipalName, userPrincipalUsername, onPremisesUserPrincipalUsername, onPremisesSAMAccountName. + kerberosSignOnMappingAttributeType *KerberosSignOnMappingAttributeType + // The OdataType property + odataType *string +} +// NewKerberosSignOnSettings instantiates a new kerberosSignOnSettings and sets the default values. +func NewKerberosSignOnSettings()(*KerberosSignOnSettings) { + m := &KerberosSignOnSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKerberosSignOnSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKerberosSignOnSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKerberosSignOnSettings(), 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 *KerberosSignOnSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KerberosSignOnSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["kerberosServicePrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKerberosServicePrincipalName(val) + } + return nil + } + res["kerberosSignOnMappingAttributeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKerberosSignOnMappingAttributeType) + if err != nil { + return err + } + if val != nil { + m.SetKerberosSignOnMappingAttributeType(val.(*KerberosSignOnMappingAttributeType)) + } + 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 + } + return res +} +// GetKerberosServicePrincipalName gets the kerberosServicePrincipalName property value. The Internal Application SPN of the application server. This SPN needs to be in the list of services to which the connector can present delegated credentials. +func (m *KerberosSignOnSettings) GetKerberosServicePrincipalName()(*string) { + return m.kerberosServicePrincipalName +} +// GetKerberosSignOnMappingAttributeType gets the kerberosSignOnMappingAttributeType property value. The Delegated Login Identity for the connector to use on behalf of your users. For more information, see Working with different on-premises and cloud identities . Possible values are: userPrincipalName, onPremisesUserPrincipalName, userPrincipalUsername, onPremisesUserPrincipalUsername, onPremisesSAMAccountName. +func (m *KerberosSignOnSettings) GetKerberosSignOnMappingAttributeType()(*KerberosSignOnMappingAttributeType) { + return m.kerberosSignOnMappingAttributeType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KerberosSignOnSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *KerberosSignOnSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("kerberosServicePrincipalName", m.GetKerberosServicePrincipalName()) + if err != nil { + return err + } + } + if m.GetKerberosSignOnMappingAttributeType() != nil { + cast := (*m.GetKerberosSignOnMappingAttributeType()).String() + err := writer.WriteStringValue("kerberosSignOnMappingAttributeType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *KerberosSignOnSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKerberosServicePrincipalName sets the kerberosServicePrincipalName property value. The Internal Application SPN of the application server. This SPN needs to be in the list of services to which the connector can present delegated credentials. +func (m *KerberosSignOnSettings) SetKerberosServicePrincipalName(value *string)() { + m.kerberosServicePrincipalName = value +} +// SetKerberosSignOnMappingAttributeType sets the kerberosSignOnMappingAttributeType property value. The Delegated Login Identity for the connector to use on behalf of your users. For more information, see Working with different on-premises and cloud identities . Possible values are: userPrincipalName, onPremisesUserPrincipalName, userPrincipalUsername, onPremisesUserPrincipalUsername, onPremisesSAMAccountName. +func (m *KerberosSignOnSettings) SetKerberosSignOnMappingAttributeType(value *KerberosSignOnMappingAttributeType)() { + m.kerberosSignOnMappingAttributeType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KerberosSignOnSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/kerberos_sign_on_settingsable.go b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_settingsable.go new file mode 100644 index 000000000..3a7c9b783 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kerberos_sign_on_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KerberosSignOnSettingsable +type KerberosSignOnSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKerberosServicePrincipalName()(*string) + GetKerberosSignOnMappingAttributeType()(*KerberosSignOnMappingAttributeType) + GetOdataType()(*string) + SetKerberosServicePrincipalName(value *string)() + SetKerberosSignOnMappingAttributeType(value *KerberosSignOnMappingAttributeType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extension.go new file mode 100644 index 000000000..65b229495 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extension.go @@ -0,0 +1,594 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KerberosSingleSignOnExtension +type KerberosSingleSignOnExtension struct { + SingleSignOnExtension + // Gets or sets the Active Directory site. + activeDirectorySiteCode *string + // Enables or disables whether the Kerberos extension can automatically determine its site name. + blockActiveDirectorySiteAutoDiscovery *bool + // Enables or disables Keychain usage. + blockAutomaticLogin *bool + // Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. + cacheName *string + // Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. + credentialBundleIdAccessControlList []string + // Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. + domainRealms []string + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. + isDefaultRealm *bool + // Enables or disables password changes. + passwordBlockModification *bool + // Gets or sets the URL that the user will be sent to when they initiate a password change. + passwordChangeUrl *string + // Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. + passwordEnableLocalSync *bool + // Overrides the default password expiration in days. For most domains, this value is calculated automatically. + passwordExpirationDays *int32 + // Gets or sets the number of days until the user is notified that their password will expire (default is 15). + passwordExpirationNotificationDays *int32 + // Gets or sets the minimum number of days until a user can change their password again. + passwordMinimumAgeDays *int32 + // Gets or sets the minimum length of a password. + passwordMinimumLength *int32 + // Gets or sets the number of previous passwords to block. + passwordPreviousPasswordBlockCount *int32 + // Enables or disables whether passwords must meet Active Directory's complexity requirements. + passwordRequireActiveDirectoryComplexity *bool + // Gets or sets a description of the password complexity requirements. + passwordRequirementsDescription *string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. + requireUserPresence *bool + // Gets or sets the principle user name to use for this profile. The realm name does not need to be included. + userPrincipalName *string +} +// NewKerberosSingleSignOnExtension instantiates a new KerberosSingleSignOnExtension and sets the default values. +func NewKerberosSingleSignOnExtension()(*KerberosSingleSignOnExtension) { + m := &KerberosSingleSignOnExtension{ + SingleSignOnExtension: *NewSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.kerberosSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateKerberosSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKerberosSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKerberosSingleSignOnExtension(), nil +} +// GetActiveDirectorySiteCode gets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *KerberosSingleSignOnExtension) GetActiveDirectorySiteCode()(*string) { + return m.activeDirectorySiteCode +} +// GetBlockActiveDirectorySiteAutoDiscovery gets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *KerberosSingleSignOnExtension) GetBlockActiveDirectorySiteAutoDiscovery()(*bool) { + return m.blockActiveDirectorySiteAutoDiscovery +} +// GetBlockAutomaticLogin gets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *KerberosSingleSignOnExtension) GetBlockAutomaticLogin()(*bool) { + return m.blockAutomaticLogin +} +// GetCacheName gets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *KerberosSingleSignOnExtension) GetCacheName()(*string) { + return m.cacheName +} +// GetCredentialBundleIdAccessControlList gets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *KerberosSingleSignOnExtension) GetCredentialBundleIdAccessControlList()([]string) { + return m.credentialBundleIdAccessControlList +} +// GetDomainRealms gets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *KerberosSingleSignOnExtension) GetDomainRealms()([]string) { + return m.domainRealms +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *KerberosSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KerberosSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SingleSignOnExtension.GetFieldDeserializers() + res["activeDirectorySiteCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveDirectorySiteCode(val) + } + return nil + } + res["blockActiveDirectorySiteAutoDiscovery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockActiveDirectorySiteAutoDiscovery(val) + } + return nil + } + res["blockAutomaticLogin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockAutomaticLogin(val) + } + return nil + } + res["cacheName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCacheName(val) + } + return nil + } + res["credentialBundleIdAccessControlList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCredentialBundleIdAccessControlList(res) + } + return nil + } + res["domainRealms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomainRealms(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["isDefaultRealm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultRealm(val) + } + return nil + } + res["passwordBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockModification(val) + } + return nil + } + res["passwordChangeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordChangeUrl(val) + } + return nil + } + res["passwordEnableLocalSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordEnableLocalSync(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordExpirationNotificationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationNotificationDays(val) + } + return nil + } + res["passwordMinimumAgeDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumAgeDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequireActiveDirectoryComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequireActiveDirectoryComplexity(val) + } + return nil + } + res["passwordRequirementsDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequirementsDescription(val) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["requireUserPresence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireUserPresence(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetIsDefaultRealm gets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *KerberosSingleSignOnExtension) GetIsDefaultRealm()(*bool) { + return m.isDefaultRealm +} +// GetPasswordBlockModification gets the passwordBlockModification property value. Enables or disables password changes. +func (m *KerberosSingleSignOnExtension) GetPasswordBlockModification()(*bool) { + return m.passwordBlockModification +} +// GetPasswordChangeUrl gets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *KerberosSingleSignOnExtension) GetPasswordChangeUrl()(*string) { + return m.passwordChangeUrl +} +// GetPasswordEnableLocalSync gets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *KerberosSingleSignOnExtension) GetPasswordEnableLocalSync()(*bool) { + return m.passwordEnableLocalSync +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *KerberosSingleSignOnExtension) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordExpirationNotificationDays gets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *KerberosSingleSignOnExtension) GetPasswordExpirationNotificationDays()(*int32) { + return m.passwordExpirationNotificationDays +} +// GetPasswordMinimumAgeDays gets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *KerberosSingleSignOnExtension) GetPasswordMinimumAgeDays()(*int32) { + return m.passwordMinimumAgeDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *KerberosSingleSignOnExtension) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *KerberosSingleSignOnExtension) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequireActiveDirectoryComplexity gets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *KerberosSingleSignOnExtension) GetPasswordRequireActiveDirectoryComplexity()(*bool) { + return m.passwordRequireActiveDirectoryComplexity +} +// GetPasswordRequirementsDescription gets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *KerberosSingleSignOnExtension) GetPasswordRequirementsDescription()(*string) { + return m.passwordRequirementsDescription +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *KerberosSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetRequireUserPresence gets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *KerberosSingleSignOnExtension) GetRequireUserPresence()(*bool) { + return m.requireUserPresence +} +// GetUserPrincipalName gets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *KerberosSingleSignOnExtension) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *KerberosSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activeDirectorySiteCode", m.GetActiveDirectorySiteCode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", m.GetBlockActiveDirectorySiteAutoDiscovery()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockAutomaticLogin", m.GetBlockAutomaticLogin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cacheName", m.GetCacheName()) + if err != nil { + return err + } + } + if m.GetCredentialBundleIdAccessControlList() != nil { + err = writer.WriteCollectionOfStringValues("credentialBundleIdAccessControlList", m.GetCredentialBundleIdAccessControlList()) + if err != nil { + return err + } + } + if m.GetDomainRealms() != nil { + err = writer.WriteCollectionOfStringValues("domainRealms", m.GetDomainRealms()) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultRealm", m.GetIsDefaultRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockModification", m.GetPasswordBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordChangeUrl", m.GetPasswordChangeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordEnableLocalSync", m.GetPasswordEnableLocalSync()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationNotificationDays", m.GetPasswordExpirationNotificationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumAgeDays", m.GetPasswordMinimumAgeDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequireActiveDirectoryComplexity", m.GetPasswordRequireActiveDirectoryComplexity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordRequirementsDescription", m.GetPasswordRequirementsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireUserPresence", m.GetRequireUserPresence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetActiveDirectorySiteCode sets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *KerberosSingleSignOnExtension) SetActiveDirectorySiteCode(value *string)() { + m.activeDirectorySiteCode = value +} +// SetBlockActiveDirectorySiteAutoDiscovery sets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *KerberosSingleSignOnExtension) SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() { + m.blockActiveDirectorySiteAutoDiscovery = value +} +// SetBlockAutomaticLogin sets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *KerberosSingleSignOnExtension) SetBlockAutomaticLogin(value *bool)() { + m.blockAutomaticLogin = value +} +// SetCacheName sets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *KerberosSingleSignOnExtension) SetCacheName(value *string)() { + m.cacheName = value +} +// SetCredentialBundleIdAccessControlList sets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *KerberosSingleSignOnExtension) SetCredentialBundleIdAccessControlList(value []string)() { + m.credentialBundleIdAccessControlList = value +} +// SetDomainRealms sets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *KerberosSingleSignOnExtension) SetDomainRealms(value []string)() { + m.domainRealms = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *KerberosSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetIsDefaultRealm sets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *KerberosSingleSignOnExtension) SetIsDefaultRealm(value *bool)() { + m.isDefaultRealm = value +} +// SetPasswordBlockModification sets the passwordBlockModification property value. Enables or disables password changes. +func (m *KerberosSingleSignOnExtension) SetPasswordBlockModification(value *bool)() { + m.passwordBlockModification = value +} +// SetPasswordChangeUrl sets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *KerberosSingleSignOnExtension) SetPasswordChangeUrl(value *string)() { + m.passwordChangeUrl = value +} +// SetPasswordEnableLocalSync sets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *KerberosSingleSignOnExtension) SetPasswordEnableLocalSync(value *bool)() { + m.passwordEnableLocalSync = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *KerberosSingleSignOnExtension) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordExpirationNotificationDays sets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *KerberosSingleSignOnExtension) SetPasswordExpirationNotificationDays(value *int32)() { + m.passwordExpirationNotificationDays = value +} +// SetPasswordMinimumAgeDays sets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *KerberosSingleSignOnExtension) SetPasswordMinimumAgeDays(value *int32)() { + m.passwordMinimumAgeDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *KerberosSingleSignOnExtension) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *KerberosSingleSignOnExtension) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequireActiveDirectoryComplexity sets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *KerberosSingleSignOnExtension) SetPasswordRequireActiveDirectoryComplexity(value *bool)() { + m.passwordRequireActiveDirectoryComplexity = value +} +// SetPasswordRequirementsDescription sets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *KerberosSingleSignOnExtension) SetPasswordRequirementsDescription(value *string)() { + m.passwordRequirementsDescription = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *KerberosSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetRequireUserPresence sets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *KerberosSingleSignOnExtension) SetRequireUserPresence(value *bool)() { + m.requireUserPresence = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *KerberosSingleSignOnExtension) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extensionable.go new file mode 100644 index 000000000..38207bca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kerberos_single_sign_on_extensionable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KerberosSingleSignOnExtensionable +type KerberosSingleSignOnExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SingleSignOnExtensionable + GetActiveDirectorySiteCode()(*string) + GetBlockActiveDirectorySiteAutoDiscovery()(*bool) + GetBlockAutomaticLogin()(*bool) + GetCacheName()(*string) + GetCredentialBundleIdAccessControlList()([]string) + GetDomainRealms()([]string) + GetDomains()([]string) + GetIsDefaultRealm()(*bool) + GetPasswordBlockModification()(*bool) + GetPasswordChangeUrl()(*string) + GetPasswordEnableLocalSync()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordExpirationNotificationDays()(*int32) + GetPasswordMinimumAgeDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequireActiveDirectoryComplexity()(*bool) + GetPasswordRequirementsDescription()(*string) + GetRealm()(*string) + GetRequireUserPresence()(*bool) + GetUserPrincipalName()(*string) + SetActiveDirectorySiteCode(value *string)() + SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() + SetBlockAutomaticLogin(value *bool)() + SetCacheName(value *string)() + SetCredentialBundleIdAccessControlList(value []string)() + SetDomainRealms(value []string)() + SetDomains(value []string)() + SetIsDefaultRealm(value *bool)() + SetPasswordBlockModification(value *bool)() + SetPasswordChangeUrl(value *string)() + SetPasswordEnableLocalSync(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordExpirationNotificationDays(value *int32)() + SetPasswordMinimumAgeDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequireActiveDirectoryComplexity(value *bool)() + SetPasswordRequirementsDescription(value *string)() + SetRealm(value *string)() + SetRequireUserPresence(value *bool)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_boolean_value_pair.go b/src/internal/connector/graph/betasdk/models/key_boolean_value_pair.go new file mode 100644 index 000000000..5b1fe6255 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_boolean_value_pair.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyBooleanValuePair +type KeyBooleanValuePair struct { + KeyTypedValuePair + // The Boolean value of the key-value pair. + value *bool +} +// NewKeyBooleanValuePair instantiates a new KeyBooleanValuePair and sets the default values. +func NewKeyBooleanValuePair()(*KeyBooleanValuePair) { + m := &KeyBooleanValuePair{ + KeyTypedValuePair: *NewKeyTypedValuePair(), + } + odataTypeValue := "#microsoft.graph.keyBooleanValuePair"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateKeyBooleanValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyBooleanValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyBooleanValuePair(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyBooleanValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.KeyTypedValuePair.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The Boolean value of the key-value pair. +func (m *KeyBooleanValuePair) GetValue()(*bool) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyBooleanValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.KeyTypedValuePair.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The Boolean value of the key-value pair. +func (m *KeyBooleanValuePair) SetValue(value *bool)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_boolean_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_boolean_value_pairable.go new file mode 100644 index 000000000..b0ee2ddf0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_boolean_value_pairable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyBooleanValuePairable +type KeyBooleanValuePairable interface { + KeyTypedValuePairable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential.go b/src/internal/connector/graph/betasdk/models/key_credential.go new file mode 100644 index 000000000..8f7008951 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential.go @@ -0,0 +1,281 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredential +type KeyCredential struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A 40-character binary type that can be used to identify the credential. Optional. When not provided in the payload, defaults to the thumbprint of the certificate. + customKeyIdentifier []byte + // Friendly name for the key. Optional. + displayName *string + // The date and time at which the credential expires. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Value for the key credential. Should be a Base64 encoded value. Returned only on $select for a single object, that is, GET applications/{applicationId}?$select=keyCredentials or GET servicePrincipals/{servicePrincipalId}?$select=keyCredentials; otherwise, it is always null. + key []byte + // The unique identifier for the key. + keyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // The date and time at which the credential becomes valid.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of key credential; for example, Symmetric, AsymmetricX509Cert. + type_escaped *string + // A string that describes the purpose for which the key can be used; for example, Verify. + usage *string +} +// NewKeyCredential instantiates a new keyCredential and sets the default values. +func NewKeyCredential()(*KeyCredential) { + m := &KeyCredential{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyCredentialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyCredentialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyCredential(), 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 *KeyCredential) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCustomKeyIdentifier gets the customKeyIdentifier property value. A 40-character binary type that can be used to identify the credential. Optional. When not provided in the payload, defaults to the thumbprint of the certificate. +func (m *KeyCredential) GetCustomKeyIdentifier()([]byte) { + return m.customKeyIdentifier +} +// GetDisplayName gets the displayName property value. Friendly name for the key. Optional. +func (m *KeyCredential) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDateTime gets the endDateTime property value. The date and time at which the credential expires. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *KeyCredential) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyCredential) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["customKeyIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomKeyIdentifier(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["key"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetKey(val) + } + return nil + } + res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["usage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsage(val) + } + return nil + } + return res +} +// GetKey gets the key property value. Value for the key credential. Should be a Base64 encoded value. Returned only on $select for a single object, that is, GET applications/{applicationId}?$select=keyCredentials or GET servicePrincipals/{servicePrincipalId}?$select=keyCredentials; otherwise, it is always null. +func (m *KeyCredential) GetKey()([]byte) { + return m.key +} +// GetKeyId gets the keyId property value. The unique identifier for the key. +func (m *KeyCredential) GetKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.keyId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyCredential) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The date and time at which the credential becomes valid.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *KeyCredential) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetType gets the type property value. The type of key credential; for example, Symmetric, AsymmetricX509Cert. +func (m *KeyCredential) GetType()(*string) { + return m.type_escaped +} +// GetUsage gets the usage property value. A string that describes the purpose for which the key can be used; for example, Verify. +func (m *KeyCredential) GetUsage()(*string) { + return m.usage +} +// Serialize serializes information the current object +func (m *KeyCredential) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("customKeyIdentifier", m.GetCustomKeyIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("key", m.GetKey()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("keyId", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("usage", m.GetUsage()) + 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 *KeyCredential) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCustomKeyIdentifier sets the customKeyIdentifier property value. A 40-character binary type that can be used to identify the credential. Optional. When not provided in the payload, defaults to the thumbprint of the certificate. +func (m *KeyCredential) SetCustomKeyIdentifier(value []byte)() { + m.customKeyIdentifier = value +} +// SetDisplayName sets the displayName property value. Friendly name for the key. Optional. +func (m *KeyCredential) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDateTime sets the endDateTime property value. The date and time at which the credential expires. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *KeyCredential) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetKey sets the key property value. Value for the key credential. Should be a Base64 encoded value. Returned only on $select for a single object, that is, GET applications/{applicationId}?$select=keyCredentials or GET servicePrincipals/{servicePrincipalId}?$select=keyCredentials; otherwise, it is always null. +func (m *KeyCredential) SetKey(value []byte)() { + m.key = value +} +// SetKeyId sets the keyId property value. The unique identifier for the key. +func (m *KeyCredential) SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.keyId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyCredential) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The date and time at which the credential becomes valid.The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *KeyCredential) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetType sets the type property value. The type of key credential; for example, Symmetric, AsymmetricX509Cert. +func (m *KeyCredential) SetType(value *string)() { + m.type_escaped = value +} +// SetUsage sets the usage property value. A string that describes the purpose for which the key can be used; for example, Verify. +func (m *KeyCredential) SetUsage(value *string)() { + m.usage = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_collection_response.go b/src/internal/connector/graph/betasdk/models/key_credential_collection_response.go new file mode 100644 index 000000000..b0847084a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialCollectionResponse +type KeyCredentialCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []KeyCredentialable +} +// NewKeyCredentialCollectionResponse instantiates a new KeyCredentialCollectionResponse and sets the default values. +func NewKeyCredentialCollectionResponse()(*KeyCredentialCollectionResponse) { + m := &KeyCredentialCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyCredentialCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyCredentialCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyCredentialCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyCredentialCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyCredentialable, len(val)) + for i, v := range val { + res[i] = v.(KeyCredentialable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyCredentialCollectionResponse) GetValue()([]KeyCredentialable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyCredentialCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyCredentialCollectionResponse) SetValue(value []KeyCredentialable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_collection_responseable.go b/src/internal/connector/graph/betasdk/models/key_credential_collection_responseable.go new file mode 100644 index 000000000..8c496c83a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialCollectionResponseable +type KeyCredentialCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyCredentialable) + SetValue(value []KeyCredentialable)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_configuration.go b/src/internal/connector/graph/betasdk/models/key_credential_configuration.go new file mode 100644 index 000000000..d7abc5ee0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_configuration.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialConfiguration +type KeyCredentialConfiguration 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 maxLifetime property + maxLifetime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The OdataType property + odataType *string + // Timestamp when the policy is enforced for all apps created on or after the specified date. For existing applications, the enforcement date would be back dated. To apply to all applications regardless of their creation date, this property would be null. Nullable. + restrictForAppsCreatedAfterDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of restriction being applied. Possible values are asymmetricKeyLifetime, unknownFutureValue. Each value of restrictionType can be used only once per policy. + restrictionType *AppKeyCredentialRestrictionType +} +// NewKeyCredentialConfiguration instantiates a new keyCredentialConfiguration and sets the default values. +func NewKeyCredentialConfiguration()(*KeyCredentialConfiguration) { + m := &KeyCredentialConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyCredentialConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyCredentialConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyCredentialConfiguration(), 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 *KeyCredentialConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyCredentialConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maxLifetime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxLifetime(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["restrictForAppsCreatedAfterDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictForAppsCreatedAfterDateTime(val) + } + return nil + } + res["restrictionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppKeyCredentialRestrictionType) + if err != nil { + return err + } + if val != nil { + m.SetRestrictionType(val.(*AppKeyCredentialRestrictionType)) + } + return nil + } + return res +} +// GetMaxLifetime gets the maxLifetime property value. The maxLifetime property +func (m *KeyCredentialConfiguration) GetMaxLifetime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxLifetime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyCredentialConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetRestrictForAppsCreatedAfterDateTime gets the restrictForAppsCreatedAfterDateTime property value. Timestamp when the policy is enforced for all apps created on or after the specified date. For existing applications, the enforcement date would be back dated. To apply to all applications regardless of their creation date, this property would be null. Nullable. +func (m *KeyCredentialConfiguration) GetRestrictForAppsCreatedAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.restrictForAppsCreatedAfterDateTime +} +// GetRestrictionType gets the restrictionType property value. The type of restriction being applied. Possible values are asymmetricKeyLifetime, unknownFutureValue. Each value of restrictionType can be used only once per policy. +func (m *KeyCredentialConfiguration) GetRestrictionType()(*AppKeyCredentialRestrictionType) { + return m.restrictionType +} +// Serialize serializes information the current object +func (m *KeyCredentialConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteISODurationValue("maxLifetime", m.GetMaxLifetime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("restrictForAppsCreatedAfterDateTime", m.GetRestrictForAppsCreatedAfterDateTime()) + if err != nil { + return err + } + } + if m.GetRestrictionType() != nil { + cast := (*m.GetRestrictionType()).String() + err := writer.WriteStringValue("restrictionType", &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 *KeyCredentialConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaxLifetime sets the maxLifetime property value. The maxLifetime property +func (m *KeyCredentialConfiguration) SetMaxLifetime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxLifetime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyCredentialConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetRestrictForAppsCreatedAfterDateTime sets the restrictForAppsCreatedAfterDateTime property value. Timestamp when the policy is enforced for all apps created on or after the specified date. For existing applications, the enforcement date would be back dated. To apply to all applications regardless of their creation date, this property would be null. Nullable. +func (m *KeyCredentialConfiguration) SetRestrictForAppsCreatedAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.restrictForAppsCreatedAfterDateTime = value +} +// SetRestrictionType sets the restrictionType property value. The type of restriction being applied. Possible values are asymmetricKeyLifetime, unknownFutureValue. Each value of restrictionType can be used only once per policy. +func (m *KeyCredentialConfiguration) SetRestrictionType(value *AppKeyCredentialRestrictionType)() { + m.restrictionType = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_response.go new file mode 100644 index 000000000..b35442fbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialConfigurationCollectionResponse +type KeyCredentialConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []KeyCredentialConfigurationable +} +// NewKeyCredentialConfigurationCollectionResponse instantiates a new KeyCredentialConfigurationCollectionResponse and sets the default values. +func NewKeyCredentialConfigurationCollectionResponse()(*KeyCredentialConfigurationCollectionResponse) { + m := &KeyCredentialConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyCredentialConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyCredentialConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyCredentialConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyCredentialConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyCredentialConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyCredentialConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(KeyCredentialConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyCredentialConfigurationCollectionResponse) GetValue()([]KeyCredentialConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyCredentialConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyCredentialConfigurationCollectionResponse) SetValue(value []KeyCredentialConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_responseable.go new file mode 100644 index 000000000..411ee78a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialConfigurationCollectionResponseable +type KeyCredentialConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyCredentialConfigurationable) + SetValue(value []KeyCredentialConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_credential_configurationable.go b/src/internal/connector/graph/betasdk/models/key_credential_configurationable.go new file mode 100644 index 000000000..7bb4bda70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credential_configurationable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialConfigurationable +type KeyCredentialConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxLifetime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOdataType()(*string) + GetRestrictForAppsCreatedAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRestrictionType()(*AppKeyCredentialRestrictionType) + SetMaxLifetime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOdataType(value *string)() + SetRestrictForAppsCreatedAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRestrictionType(value *AppKeyCredentialRestrictionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_credentialable.go b/src/internal/connector/graph/betasdk/models/key_credentialable.go new file mode 100644 index 000000000..d469947b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_credentialable.go @@ -0,0 +1,31 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyCredentialable +type KeyCredentialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomKeyIdentifier()([]byte) + GetDisplayName()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetKey()([]byte) + GetKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetType()(*string) + GetUsage()(*string) + SetCustomKeyIdentifier(value []byte)() + SetDisplayName(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetKey(value []byte)() + SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetType(value *string)() + SetUsage(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_integer_value_pair.go b/src/internal/connector/graph/betasdk/models/key_integer_value_pair.go new file mode 100644 index 000000000..2e308968b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_integer_value_pair.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyIntegerValuePair +type KeyIntegerValuePair struct { + KeyTypedValuePair + // The integer value of the key-value pair. + value *int32 +} +// NewKeyIntegerValuePair instantiates a new KeyIntegerValuePair and sets the default values. +func NewKeyIntegerValuePair()(*KeyIntegerValuePair) { + m := &KeyIntegerValuePair{ + KeyTypedValuePair: *NewKeyTypedValuePair(), + } + odataTypeValue := "#microsoft.graph.keyIntegerValuePair"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateKeyIntegerValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyIntegerValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyIntegerValuePair(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyIntegerValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.KeyTypedValuePair.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The integer value of the key-value pair. +func (m *KeyIntegerValuePair) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyIntegerValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.KeyTypedValuePair.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The integer value of the key-value pair. +func (m *KeyIntegerValuePair) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_integer_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_integer_value_pairable.go new file mode 100644 index 000000000..6e3bcf4c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_integer_value_pairable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyIntegerValuePairable +type KeyIntegerValuePairable interface { + KeyTypedValuePairable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*int32) + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_real_value_pair.go b/src/internal/connector/graph/betasdk/models/key_real_value_pair.go new file mode 100644 index 000000000..f54df1e24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_real_value_pair.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyRealValuePair +type KeyRealValuePair struct { + KeyTypedValuePair + // The real (floating-point) value of the key-value pair. + value *float64 +} +// NewKeyRealValuePair instantiates a new KeyRealValuePair and sets the default values. +func NewKeyRealValuePair()(*KeyRealValuePair) { + m := &KeyRealValuePair{ + KeyTypedValuePair: *NewKeyTypedValuePair(), + } + odataTypeValue := "#microsoft.graph.keyRealValuePair"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateKeyRealValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyRealValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyRealValuePair(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyRealValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.KeyTypedValuePair.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. The real (floating-point) value of the key-value pair. +func (m *KeyRealValuePair) GetValue()(*float64) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyRealValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.KeyTypedValuePair.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat64Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The real (floating-point) value of the key-value pair. +func (m *KeyRealValuePair) SetValue(value *float64)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_real_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_real_value_pairable.go new file mode 100644 index 000000000..66de02fff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_real_value_pairable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyRealValuePairable +type KeyRealValuePairable interface { + KeyTypedValuePairable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*float64) + SetValue(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_size.go b/src/internal/connector/graph/betasdk/models/key_size.go new file mode 100644 index 000000000..71b52a74c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_size.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KeySize int + +const ( + // 1024 Bits. + SIZE1024_KEYSIZE KeySize = iota + // 2048 Bits. + SIZE2048_KEYSIZE + // 4096 Bits. + SIZE4096_KEYSIZE +) + +func (i KeySize) String() string { + return []string{"size1024", "size2048", "size4096"}[i] +} +func ParseKeySize(v string) (interface{}, error) { + result := SIZE1024_KEYSIZE + switch v { + case "size1024": + result = SIZE1024_KEYSIZE + case "size2048": + result = SIZE2048_KEYSIZE + case "size4096": + result = SIZE4096_KEYSIZE + default: + return 0, errors.New("Unknown KeySize value: " + v) + } + return &result, nil +} +func SerializeKeySize(values []KeySize) []string { + 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/key_storage_provider_option.go b/src/internal/connector/graph/betasdk/models/key_storage_provider_option.go new file mode 100644 index 000000000..a1c2328dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_storage_provider_option.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KeyStorageProviderOption int + +const ( + // Import to Trusted Platform Module (TPM) KSP if present, otherwise import to Software KSP. + USETPMKSPOTHERWISEUSESOFTWAREKSP_KEYSTORAGEPROVIDEROPTION KeyStorageProviderOption = iota + // Import to Trusted Platform Module (TPM) KSP if present, otherwise fail. + USETPMKSPOTHERWISEFAIL_KEYSTORAGEPROVIDEROPTION + // Import to Passport for work KSP if available, otherwise fail. + USEPASSPORTFORWORKKSPOTHERWISEFAIL_KEYSTORAGEPROVIDEROPTION + // Import to Software KSP. + USESOFTWAREKSP_KEYSTORAGEPROVIDEROPTION +) + +func (i KeyStorageProviderOption) String() string { + return []string{"useTpmKspOtherwiseUseSoftwareKsp", "useTpmKspOtherwiseFail", "usePassportForWorkKspOtherwiseFail", "useSoftwareKsp"}[i] +} +func ParseKeyStorageProviderOption(v string) (interface{}, error) { + result := USETPMKSPOTHERWISEUSESOFTWAREKSP_KEYSTORAGEPROVIDEROPTION + switch v { + case "useTpmKspOtherwiseUseSoftwareKsp": + result = USETPMKSPOTHERWISEUSESOFTWAREKSP_KEYSTORAGEPROVIDEROPTION + case "useTpmKspOtherwiseFail": + result = USETPMKSPOTHERWISEFAIL_KEYSTORAGEPROVIDEROPTION + case "usePassportForWorkKspOtherwiseFail": + result = USEPASSPORTFORWORKKSPOTHERWISEFAIL_KEYSTORAGEPROVIDEROPTION + case "useSoftwareKsp": + result = USESOFTWAREKSP_KEYSTORAGEPROVIDEROPTION + default: + return 0, errors.New("Unknown KeyStorageProviderOption value: " + v) + } + return &result, nil +} +func SerializeKeyStorageProviderOption(values []KeyStorageProviderOption) []string { + 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/key_string_value_pair.go b/src/internal/connector/graph/betasdk/models/key_string_value_pair.go new file mode 100644 index 000000000..5f9fd762d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_string_value_pair.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyStringValuePair +type KeyStringValuePair struct { + KeyTypedValuePair + // The string value of the key-value pair. + value *string +} +// NewKeyStringValuePair instantiates a new KeyStringValuePair and sets the default values. +func NewKeyStringValuePair()(*KeyStringValuePair) { + m := &KeyStringValuePair{ + KeyTypedValuePair: *NewKeyTypedValuePair(), + } + odataTypeValue := "#microsoft.graph.keyStringValuePair"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateKeyStringValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyStringValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyStringValuePair(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyStringValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.KeyTypedValuePair.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. The string value of the key-value pair. +func (m *KeyStringValuePair) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyStringValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.KeyTypedValuePair.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The string value of the key-value pair. +func (m *KeyStringValuePair) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_string_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_string_value_pairable.go new file mode 100644 index 000000000..c7cac85cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_string_value_pairable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyStringValuePairable +type KeyStringValuePairable interface { + KeyTypedValuePairable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_typed_value_pair.go b/src/internal/connector/graph/betasdk/models/key_typed_value_pair.go new file mode 100644 index 000000000..54a828127 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_typed_value_pair.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyTypedValuePair a key-value pair with a string key and a typed value. +type KeyTypedValuePair 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 string key of the key-value pair. + key *string + // The OdataType property + odataType *string +} +// NewKeyTypedValuePair instantiates a new keyTypedValuePair and sets the default values. +func NewKeyTypedValuePair()(*KeyTypedValuePair) { + m := &KeyTypedValuePair{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyTypedValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyTypedValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.keyBooleanValuePair": + return NewKeyBooleanValuePair(), nil + case "#microsoft.graph.keyIntegerValuePair": + return NewKeyIntegerValuePair(), nil + case "#microsoft.graph.keyRealValuePair": + return NewKeyRealValuePair(), nil + case "#microsoft.graph.keyStringValuePair": + return NewKeyStringValuePair(), nil + } + } + } + } + return NewKeyTypedValuePair(), 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 *KeyTypedValuePair) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyTypedValuePair) 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 + } + return res +} +// GetKey gets the key property value. The string key of the key-value pair. +func (m *KeyTypedValuePair) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyTypedValuePair) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *KeyTypedValuePair) 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.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 *KeyTypedValuePair) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKey sets the key property value. The string key of the key-value pair. +func (m *KeyTypedValuePair) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyTypedValuePair) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_response.go b/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_response.go new file mode 100644 index 000000000..0a1a58e62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyTypedValuePairCollectionResponse +type KeyTypedValuePairCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []KeyTypedValuePairable +} +// NewKeyTypedValuePairCollectionResponse instantiates a new KeyTypedValuePairCollectionResponse and sets the default values. +func NewKeyTypedValuePairCollectionResponse()(*KeyTypedValuePairCollectionResponse) { + m := &KeyTypedValuePairCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyTypedValuePairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyTypedValuePairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyTypedValuePairCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyTypedValuePairCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyTypedValuePairCollectionResponse) GetValue()([]KeyTypedValuePairable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyTypedValuePairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyTypedValuePairCollectionResponse) SetValue(value []KeyTypedValuePairable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_responseable.go b/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_responseable.go new file mode 100644 index 000000000..f762e92cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_typed_value_pair_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyTypedValuePairCollectionResponseable +type KeyTypedValuePairCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyTypedValuePairable) + SetValue(value []KeyTypedValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_typed_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_typed_value_pairable.go new file mode 100644 index 000000000..1eaedb89b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_typed_value_pairable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyTypedValuePairable +type KeyTypedValuePairable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetOdataType()(*string) + SetKey(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_usages.go b/src/internal/connector/graph/betasdk/models/key_usages.go new file mode 100644 index 000000000..ed73026a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_usages.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KeyUsages int + +const ( + // Key Encipherment Usage. + KEYENCIPHERMENT_KEYUSAGES KeyUsages = iota + // Digital Signature Usage. + DIGITALSIGNATURE_KEYUSAGES +) + +func (i KeyUsages) String() string { + return []string{"keyEncipherment", "digitalSignature"}[i] +} +func ParseKeyUsages(v string) (interface{}, error) { + result := KEYENCIPHERMENT_KEYUSAGES + switch v { + case "keyEncipherment": + result = KEYENCIPHERMENT_KEYUSAGES + case "digitalSignature": + result = DIGITALSIGNATURE_KEYUSAGES + default: + return 0, errors.New("Unknown KeyUsages value: " + v) + } + return &result, nil +} +func SerializeKeyUsages(values []KeyUsages) []string { + 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/key_value.go b/src/internal/connector/graph/betasdk/models/key_value.go new file mode 100644 index 000000000..7071191d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValue +type KeyValue 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. + key *string + // The OdataType property + odataType *string + // Value. + value *string +} +// NewKeyValue instantiates a new keyValue and sets the default values. +func NewKeyValue()(*KeyValue) { + m := &KeyValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValue(), 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 *KeyValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValue) 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. +func (m *KeyValue) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyValue) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value. +func (m *KeyValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValue) 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 *KeyValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKey sets the key property value. Key. +func (m *KeyValue) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value. +func (m *KeyValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_collection_response.go b/src/internal/connector/graph/betasdk/models/key_value_collection_response.go new file mode 100644 index 000000000..aea1b6af0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValueCollectionResponse +type KeyValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []KeyValueable +} +// NewKeyValueCollectionResponse instantiates a new KeyValueCollectionResponse and sets the default values. +func NewKeyValueCollectionResponse()(*KeyValueCollectionResponse) { + m := &KeyValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyValueCollectionResponse) GetValue()([]KeyValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyValueCollectionResponse) SetValue(value []KeyValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/key_value_collection_responseable.go new file mode 100644 index 000000000..d82c8d7dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValueCollectionResponseable +type KeyValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyValueable) + SetValue(value []KeyValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_pair.go b/src/internal/connector/graph/betasdk/models/key_value_pair.go new file mode 100644 index 000000000..cfc4585a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_pair.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePair +type KeyValuePair struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name for this key-value pair. For more information about possible names for each resource type that uses this configuration, see keyValuePair names and values. + name *string + // The OdataType property + odataType *string + // Value for this key-value pair. For more information about possible values for each resource type that uses this configuration, see keyValuePair names and values. + value *string +} +// NewKeyValuePair instantiates a new keyValuePair and sets the default values. +func NewKeyValuePair()(*KeyValuePair) { + m := &KeyValuePair{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValuePair(), 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 *KeyValuePair) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 +} +// GetName gets the name property value. Name for this key-value pair. For more information about possible names for each resource type that uses this configuration, see keyValuePair names and values. +func (m *KeyValuePair) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyValuePair) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value for this key-value pair. For more information about possible values for each resource type that uses this configuration, see keyValuePair names and values. +func (m *KeyValuePair) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *KeyValuePair) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name for this key-value pair. For more information about possible names for each resource type that uses this configuration, see keyValuePair names and values. +func (m *KeyValuePair) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyValuePair) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value for this key-value pair. For more information about possible values for each resource type that uses this configuration, see keyValuePair names and values. +func (m *KeyValuePair) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_pair_collection_response.go b/src/internal/connector/graph/betasdk/models/key_value_pair_collection_response.go new file mode 100644 index 000000000..0a1156fbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_pair_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePairCollectionResponse +type KeyValuePairCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []KeyValuePairable +} +// NewKeyValuePairCollectionResponse instantiates a new KeyValuePairCollectionResponse and sets the default values. +func NewKeyValuePairCollectionResponse()(*KeyValuePairCollectionResponse) { + m := &KeyValuePairCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyValuePairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValuePairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValuePairCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValuePairCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyValuePairCollectionResponse) GetValue()([]KeyValuePairable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValuePairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyValuePairCollectionResponse) SetValue(value []KeyValuePairable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_pair_collection_responseable.go b/src/internal/connector/graph/betasdk/models/key_value_pair_collection_responseable.go new file mode 100644 index 000000000..d0f63c3d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_pair_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePairCollectionResponseable +type KeyValuePairCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyValuePairable) + SetValue(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_value_pairable.go b/src/internal/connector/graph/betasdk/models/key_value_pairable.go new file mode 100644 index 000000000..9169be251 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_value_pairable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePairable +type KeyValuePairable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/key_valueable.go b/src/internal/connector/graph/betasdk/models/key_valueable.go new file mode 100644 index 000000000..9ea0ebc7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/key_valueable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValueable +type KeyValueable interface { + 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/kiosk_mode_managed_home_screen_pin_complexity.go b/src/internal/connector/graph/betasdk/models/kiosk_mode_managed_home_screen_pin_complexity.go new file mode 100644 index 000000000..1f41b4e95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kiosk_mode_managed_home_screen_pin_complexity.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KioskModeManagedHomeScreenPinComplexity int + +const ( + // Not configured. + NOTCONFIGURED_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY KioskModeManagedHomeScreenPinComplexity = iota + // Numeric values only. + SIMPLE_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY + // Alphanumerical value. + COMPLEX_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY +) + +func (i KioskModeManagedHomeScreenPinComplexity) String() string { + return []string{"notConfigured", "simple", "complex"}[i] +} +func ParseKioskModeManagedHomeScreenPinComplexity(v string) (interface{}, error) { + result := NOTCONFIGURED_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY + switch v { + case "notConfigured": + result = NOTCONFIGURED_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY + case "simple": + result = SIMPLE_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY + case "complex": + result = COMPLEX_KIOSKMODEMANAGEDHOMESCREENPINCOMPLEXITY + default: + return 0, errors.New("Unknown KioskModeManagedHomeScreenPinComplexity value: " + v) + } + return &result, nil +} +func SerializeKioskModeManagedHomeScreenPinComplexity(values []KioskModeManagedHomeScreenPinComplexity) []string { + 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/kiosk_mode_type.go b/src/internal/connector/graph/betasdk/models/kiosk_mode_type.go new file mode 100644 index 000000000..18c9f1049 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/kiosk_mode_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type KioskModeType int + +const ( + // Not configured + NOTCONFIGURED_KIOSKMODETYPE KioskModeType = iota + // Run in single-app mode + SINGLEAPPMODE_KIOSKMODETYPE + // Run in multi-app mode + MULTIAPPMODE_KIOSKMODETYPE +) + +func (i KioskModeType) String() string { + return []string{"notConfigured", "singleAppMode", "multiAppMode"}[i] +} +func ParseKioskModeType(v string) (interface{}, error) { + result := NOTCONFIGURED_KIOSKMODETYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_KIOSKMODETYPE + case "singleAppMode": + result = SINGLEAPPMODE_KIOSKMODETYPE + case "multiAppMode": + result = MULTIAPPMODE_KIOSKMODETYPE + default: + return 0, errors.New("Unknown KioskModeType value: " + v) + } + return &result, nil +} +func SerializeKioskModeType(values []KioskModeType) []string { + 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/label.go b/src/internal/connector/graph/betasdk/models/label.go new file mode 100644 index 000000000..f9c801671 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Label int + +const ( + TITLE_LABEL Label = iota + URL_LABEL + CREATEDBY_LABEL + LASTMODIFIEDBY_LABEL + AUTHORS_LABEL + CREATEDDATETIME_LABEL + LASTMODIFIEDDATETIME_LABEL + FILENAME_LABEL + FILEEXTENSION_LABEL +) + +func (i Label) String() string { + return []string{"title", "url", "createdBy", "lastModifiedBy", "authors", "createdDateTime", "lastModifiedDateTime", "fileName", "fileExtension"}[i] +} +func ParseLabel(v string) (interface{}, error) { + result := TITLE_LABEL + switch v { + case "title": + result = TITLE_LABEL + case "url": + result = URL_LABEL + case "createdBy": + result = CREATEDBY_LABEL + case "lastModifiedBy": + result = LASTMODIFIEDBY_LABEL + case "authors": + result = AUTHORS_LABEL + case "createdDateTime": + result = CREATEDDATETIME_LABEL + case "lastModifiedDateTime": + result = LASTMODIFIEDDATETIME_LABEL + case "fileName": + result = FILENAME_LABEL + case "fileExtension": + result = FILEEXTENSION_LABEL + default: + return 0, errors.New("Unknown Label value: " + v) + } + return &result, nil +} +func SerializeLabel(values []Label) []string { + 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/label_action_base.go b/src/internal/connector/graph/betasdk/models/label_action_base.go new file mode 100644 index 000000000..2fc085c08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_action_base.go @@ -0,0 +1,133 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelActionBase +type LabelActionBase 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 name property + name *string + // The OdataType property + odataType *string +} +// NewLabelActionBase instantiates a new labelActionBase and sets the default values. +func NewLabelActionBase()(*LabelActionBase) { + m := &LabelActionBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLabelActionBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelActionBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.addFooter": + return NewAddFooter(), nil + case "#microsoft.graph.addHeader": + return NewAddHeader(), nil + case "#microsoft.graph.addWatermark": + return NewAddWatermark(), nil + case "#microsoft.graph.encryptContent": + return NewEncryptContent(), nil + case "#microsoft.graph.encryptWithTemplate": + return NewEncryptWithTemplate(), nil + case "#microsoft.graph.encryptWithUserDefinedRights": + return NewEncryptWithUserDefinedRights(), nil + case "#microsoft.graph.markContent": + return NewMarkContent(), nil + case "#microsoft.graph.protectGroup": + return NewProtectGroup(), nil + case "#microsoft.graph.protectOnlineMeetingAction": + return NewProtectOnlineMeetingAction(), nil + case "#microsoft.graph.protectSite": + return NewProtectSite(), nil + } + } + } + } + return NewLabelActionBase(), 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 *LabelActionBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelActionBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetName gets the name property value. The name property +func (m *LabelActionBase) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LabelActionBase) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LabelActionBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LabelActionBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name property +func (m *LabelActionBase) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LabelActionBase) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/label_action_base_collection_response.go b/src/internal/connector/graph/betasdk/models/label_action_base_collection_response.go new file mode 100644 index 000000000..2532b19ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_action_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelActionBaseCollectionResponse +type LabelActionBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LabelActionBaseable +} +// NewLabelActionBaseCollectionResponse instantiates a new LabelActionBaseCollectionResponse and sets the default values. +func NewLabelActionBaseCollectionResponse()(*LabelActionBaseCollectionResponse) { + m := &LabelActionBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLabelActionBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelActionBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelActionBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelActionBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelActionBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LabelActionBaseable, len(val)) + for i, v := range val { + res[i] = v.(LabelActionBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LabelActionBaseCollectionResponse) GetValue()([]LabelActionBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *LabelActionBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LabelActionBaseCollectionResponse) SetValue(value []LabelActionBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/label_action_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/label_action_base_collection_responseable.go new file mode 100644 index 000000000..b37e67f6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_action_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelActionBaseCollectionResponseable +type LabelActionBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LabelActionBaseable) + SetValue(value []LabelActionBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/label_action_baseable.go b/src/internal/connector/graph/betasdk/models/label_action_baseable.go new file mode 100644 index 000000000..4868350c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_action_baseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelActionBaseable +type LabelActionBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/label_details.go b/src/internal/connector/graph/betasdk/models/label_details.go new file mode 100644 index 000000000..5824a43ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_details.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelDetails +type LabelDetails struct { + ParentLabelDetails +} +// NewLabelDetails instantiates a new LabelDetails and sets the default values. +func NewLabelDetails()(*LabelDetails) { + m := &LabelDetails{ + ParentLabelDetails: *NewParentLabelDetails(), + } + odataTypeValue := "#microsoft.graph.labelDetails"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateLabelDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelDetails(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ParentLabelDetails.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *LabelDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ParentLabelDetails.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/label_detailsable.go b/src/internal/connector/graph/betasdk/models/label_detailsable.go new file mode 100644 index 000000000..29ecaff55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_detailsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelDetailsable +type LabelDetailsable interface { + ParentLabelDetailsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/label_policy.go b/src/internal/connector/graph/betasdk/models/label_policy.go new file mode 100644 index 000000000..0d1a86c60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_policy.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelPolicy +type LabelPolicy 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 id property + id *string + // The name property + name *string + // The OdataType property + odataType *string +} +// NewLabelPolicy instantiates a new labelPolicy and sets the default values. +func NewLabelPolicy()(*LabelPolicy) { + m := &LabelPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLabelPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelPolicy(), 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 *LabelPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetId gets the id property value. The id property +func (m *LabelPolicy) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name property +func (m *LabelPolicy) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LabelPolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LabelPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LabelPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *LabelPolicy) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *LabelPolicy) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LabelPolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/label_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/label_policy_collection_response.go new file mode 100644 index 000000000..0772fee3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelPolicyCollectionResponse +type LabelPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LabelPolicyable +} +// NewLabelPolicyCollectionResponse instantiates a new LabelPolicyCollectionResponse and sets the default values. +func NewLabelPolicyCollectionResponse()(*LabelPolicyCollectionResponse) { + m := &LabelPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLabelPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LabelPolicyable, len(val)) + for i, v := range val { + res[i] = v.(LabelPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LabelPolicyCollectionResponse) GetValue()([]LabelPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *LabelPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LabelPolicyCollectionResponse) SetValue(value []LabelPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/label_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/label_policy_collection_responseable.go new file mode 100644 index 000000000..4fa274e3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelPolicyCollectionResponseable +type LabelPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LabelPolicyable) + SetValue(value []LabelPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/label_policyable.go b/src/internal/connector/graph/betasdk/models/label_policyable.go new file mode 100644 index 000000000..4bb4999f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/label_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelPolicyable +type LabelPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/labeling_options.go b/src/internal/connector/graph/betasdk/models/labeling_options.go new file mode 100644 index 000000000..059a778bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/labeling_options.go @@ -0,0 +1,184 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelingOptions +type LabelingOptions 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 assignmentMethod property + assignmentMethod *AssignmentMethod + // The downgrade justification object that indicates if downgrade was justified and, if so, the reason. + downgradeJustification DowngradeJustificationable + // Extended properties will be parsed and returned in the standard MIP labeled metadata format as part of the label information. + extendedProperties []KeyValuePairable + // The GUID of the label that should be applied to the information. + labelId *string + // The OdataType property + odataType *string +} +// NewLabelingOptions instantiates a new labelingOptions and sets the default values. +func NewLabelingOptions()(*LabelingOptions) { + m := &LabelingOptions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLabelingOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelingOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelingOptions(), 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 *LabelingOptions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentMethod gets the assignmentMethod property value. The assignmentMethod property +func (m *LabelingOptions) GetAssignmentMethod()(*AssignmentMethod) { + return m.assignmentMethod +} +// GetDowngradeJustification gets the downgradeJustification property value. The downgrade justification object that indicates if downgrade was justified and, if so, the reason. +func (m *LabelingOptions) GetDowngradeJustification()(DowngradeJustificationable) { + return m.downgradeJustification +} +// GetExtendedProperties gets the extendedProperties property value. Extended properties will be parsed and returned in the standard MIP labeled metadata format as part of the label information. +func (m *LabelingOptions) GetExtendedProperties()([]KeyValuePairable) { + return m.extendedProperties +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelingOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssignmentMethod) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentMethod(val.(*AssignmentMethod)) + } + return nil + } + res["downgradeJustification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDowngradeJustificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDowngradeJustification(val.(DowngradeJustificationable)) + } + return nil + } + res["extendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetExtendedProperties(res) + } + return nil + } + res["labelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelId(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 + } + return res +} +// GetLabelId gets the labelId property value. The GUID of the label that should be applied to the information. +func (m *LabelingOptions) GetLabelId()(*string) { + return m.labelId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LabelingOptions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LabelingOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentMethod() != nil { + cast := (*m.GetAssignmentMethod()).String() + err := writer.WriteStringValue("assignmentMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("downgradeJustification", m.GetDowngradeJustification()) + if err != nil { + return err + } + } + if m.GetExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedProperties())) + for i, v := range m.GetExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("extendedProperties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("labelId", m.GetLabelId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LabelingOptions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentMethod sets the assignmentMethod property value. The assignmentMethod property +func (m *LabelingOptions) SetAssignmentMethod(value *AssignmentMethod)() { + m.assignmentMethod = value +} +// SetDowngradeJustification sets the downgradeJustification property value. The downgrade justification object that indicates if downgrade was justified and, if so, the reason. +func (m *LabelingOptions) SetDowngradeJustification(value DowngradeJustificationable)() { + m.downgradeJustification = value +} +// SetExtendedProperties sets the extendedProperties property value. Extended properties will be parsed and returned in the standard MIP labeled metadata format as part of the label information. +func (m *LabelingOptions) SetExtendedProperties(value []KeyValuePairable)() { + m.extendedProperties = value +} +// SetLabelId sets the labelId property value. The GUID of the label that should be applied to the information. +func (m *LabelingOptions) SetLabelId(value *string)() { + m.labelId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LabelingOptions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/labeling_optionsable.go b/src/internal/connector/graph/betasdk/models/labeling_optionsable.go new file mode 100644 index 000000000..b77eccacd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/labeling_optionsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LabelingOptionsable +type LabelingOptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentMethod()(*AssignmentMethod) + GetDowngradeJustification()(DowngradeJustificationable) + GetExtendedProperties()([]KeyValuePairable) + GetLabelId()(*string) + GetOdataType()(*string) + SetAssignmentMethod(value *AssignmentMethod)() + SetDowngradeJustification(value DowngradeJustificationable)() + SetExtendedProperties(value []KeyValuePairable)() + SetLabelId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/lan_manager_authentication_level.go b/src/internal/connector/graph/betasdk/models/lan_manager_authentication_level.go new file mode 100644 index 000000000..f16090697 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lan_manager_authentication_level.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LanManagerAuthenticationLevel int + +const ( + // Send LM & NTLM responses + LMANDNLTM_LANMANAGERAUTHENTICATIONLEVEL LanManagerAuthenticationLevel = iota + // Send LM & NTLM-use NTLMv2 session security if negotiated + LMNTLMANDNTLMV2_LANMANAGERAUTHENTICATIONLEVEL + // Send LM & NTLM responses only + LMANDNTLMONLY_LANMANAGERAUTHENTICATIONLEVEL + // Send LM & NTLMv2 responses only + LMANDNTLMV2_LANMANAGERAUTHENTICATIONLEVEL + // Send LM & NTLMv2 responses only. Refuse LM + LMNTLMV2ANDNOTLM_LANMANAGERAUTHENTICATIONLEVEL + // Send LM & NTLMv2 responses only. Refuse LM & NTLM + LMNTLMV2ANDNOTLMORNTM_LANMANAGERAUTHENTICATIONLEVEL +) + +func (i LanManagerAuthenticationLevel) String() string { + return []string{"lmAndNltm", "lmNtlmAndNtlmV2", "lmAndNtlmOnly", "lmAndNtlmV2", "lmNtlmV2AndNotLm", "lmNtlmV2AndNotLmOrNtm"}[i] +} +func ParseLanManagerAuthenticationLevel(v string) (interface{}, error) { + result := LMANDNLTM_LANMANAGERAUTHENTICATIONLEVEL + switch v { + case "lmAndNltm": + result = LMANDNLTM_LANMANAGERAUTHENTICATIONLEVEL + case "lmNtlmAndNtlmV2": + result = LMNTLMANDNTLMV2_LANMANAGERAUTHENTICATIONLEVEL + case "lmAndNtlmOnly": + result = LMANDNTLMONLY_LANMANAGERAUTHENTICATIONLEVEL + case "lmAndNtlmV2": + result = LMANDNTLMV2_LANMANAGERAUTHENTICATIONLEVEL + case "lmNtlmV2AndNotLm": + result = LMNTLMV2ANDNOTLM_LANMANAGERAUTHENTICATIONLEVEL + case "lmNtlmV2AndNotLmOrNtm": + result = LMNTLMV2ANDNOTLMORNTM_LANMANAGERAUTHENTICATIONLEVEL + default: + return 0, errors.New("Unknown LanManagerAuthenticationLevel value: " + v) + } + return &result, nil +} +func SerializeLanManagerAuthenticationLevel(values []LanManagerAuthenticationLevel) []string { + 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/language_proficiency.go b/src/internal/connector/graph/betasdk/models/language_proficiency.go new file mode 100644 index 000000000..ce1425bc9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/language_proficiency.go @@ -0,0 +1,222 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LanguageProficiency +type LanguageProficiency struct { + ItemFacet + // Contains the long-form name for the language. + displayName *string + // The proficiency property + proficiency *LanguageProficiencyLevel + // Represents the users reading comprehension for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. + reading *LanguageProficiencyLevel + // Represents the users spoken proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. + spoken *LanguageProficiencyLevel + // Contains the four-character BCP47 name for the language (en-US, no-NB, en-AU). + tag *string + // The thumbnailUrl property + thumbnailUrl *string + // Represents the users written proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. + written *LanguageProficiencyLevel +} +// NewLanguageProficiency instantiates a new LanguageProficiency and sets the default values. +func NewLanguageProficiency()(*LanguageProficiency) { + m := &LanguageProficiency{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.languageProficiency"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateLanguageProficiencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLanguageProficiencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLanguageProficiency(), nil +} +// GetDisplayName gets the displayName property value. Contains the long-form name for the language. +func (m *LanguageProficiency) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LanguageProficiency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["proficiency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLanguageProficiencyLevel) + if err != nil { + return err + } + if val != nil { + m.SetProficiency(val.(*LanguageProficiencyLevel)) + } + return nil + } + res["reading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLanguageProficiencyLevel) + if err != nil { + return err + } + if val != nil { + m.SetReading(val.(*LanguageProficiencyLevel)) + } + return nil + } + res["spoken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLanguageProficiencyLevel) + if err != nil { + return err + } + if val != nil { + m.SetSpoken(val.(*LanguageProficiencyLevel)) + } + return nil + } + res["tag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTag(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["written"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLanguageProficiencyLevel) + if err != nil { + return err + } + if val != nil { + m.SetWritten(val.(*LanguageProficiencyLevel)) + } + return nil + } + return res +} +// GetProficiency gets the proficiency property value. The proficiency property +func (m *LanguageProficiency) GetProficiency()(*LanguageProficiencyLevel) { + return m.proficiency +} +// GetReading gets the reading property value. Represents the users reading comprehension for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) GetReading()(*LanguageProficiencyLevel) { + return m.reading +} +// GetSpoken gets the spoken property value. Represents the users spoken proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) GetSpoken()(*LanguageProficiencyLevel) { + return m.spoken +} +// GetTag gets the tag property value. Contains the four-character BCP47 name for the language (en-US, no-NB, en-AU). +func (m *LanguageProficiency) GetTag()(*string) { + return m.tag +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *LanguageProficiency) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWritten gets the written property value. Represents the users written proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) GetWritten()(*LanguageProficiencyLevel) { + return m.written +} +// Serialize serializes information the current object +func (m *LanguageProficiency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetProficiency() != nil { + cast := (*m.GetProficiency()).String() + err = writer.WriteStringValue("proficiency", &cast) + if err != nil { + return err + } + } + if m.GetReading() != nil { + cast := (*m.GetReading()).String() + err = writer.WriteStringValue("reading", &cast) + if err != nil { + return err + } + } + if m.GetSpoken() != nil { + cast := (*m.GetSpoken()).String() + err = writer.WriteStringValue("spoken", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tag", m.GetTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + if m.GetWritten() != nil { + cast := (*m.GetWritten()).String() + err = writer.WriteStringValue("written", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Contains the long-form name for the language. +func (m *LanguageProficiency) SetDisplayName(value *string)() { + m.displayName = value +} +// SetProficiency sets the proficiency property value. The proficiency property +func (m *LanguageProficiency) SetProficiency(value *LanguageProficiencyLevel)() { + m.proficiency = value +} +// SetReading sets the reading property value. Represents the users reading comprehension for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) SetReading(value *LanguageProficiencyLevel)() { + m.reading = value +} +// SetSpoken sets the spoken property value. Represents the users spoken proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) SetSpoken(value *LanguageProficiencyLevel)() { + m.spoken = value +} +// SetTag sets the tag property value. Contains the four-character BCP47 name for the language (en-US, no-NB, en-AU). +func (m *LanguageProficiency) SetTag(value *string)() { + m.tag = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *LanguageProficiency) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWritten sets the written property value. Represents the users written proficiency for the language represented by the object. Possible values are: elementary, conversational, limitedWorking, professionalWorking, fullProfessional, nativeOrBilingual, unknownFutureValue. +func (m *LanguageProficiency) SetWritten(value *LanguageProficiencyLevel)() { + m.written = value +} diff --git a/src/internal/connector/graph/betasdk/models/language_proficiency_collection_response.go b/src/internal/connector/graph/betasdk/models/language_proficiency_collection_response.go new file mode 100644 index 000000000..02df63481 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/language_proficiency_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LanguageProficiencyCollectionResponse +type LanguageProficiencyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LanguageProficiencyable +} +// NewLanguageProficiencyCollectionResponse instantiates a new LanguageProficiencyCollectionResponse and sets the default values. +func NewLanguageProficiencyCollectionResponse()(*LanguageProficiencyCollectionResponse) { + m := &LanguageProficiencyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLanguageProficiencyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLanguageProficiencyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLanguageProficiencyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LanguageProficiencyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLanguageProficiencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LanguageProficiencyable, len(val)) + for i, v := range val { + res[i] = v.(LanguageProficiencyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LanguageProficiencyCollectionResponse) GetValue()([]LanguageProficiencyable) { + return m.value +} +// Serialize serializes information the current object +func (m *LanguageProficiencyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LanguageProficiencyCollectionResponse) SetValue(value []LanguageProficiencyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/language_proficiency_collection_responseable.go b/src/internal/connector/graph/betasdk/models/language_proficiency_collection_responseable.go new file mode 100644 index 000000000..3c3d7bd4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/language_proficiency_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LanguageProficiencyCollectionResponseable +type LanguageProficiencyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LanguageProficiencyable) + SetValue(value []LanguageProficiencyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/language_proficiency_level.go b/src/internal/connector/graph/betasdk/models/language_proficiency_level.go new file mode 100644 index 000000000..42e5abcd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/language_proficiency_level.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LanguageProficiencyLevel int + +const ( + ELEMENTARY_LANGUAGEPROFICIENCYLEVEL LanguageProficiencyLevel = iota + CONVERSATIONAL_LANGUAGEPROFICIENCYLEVEL + LIMITEDWORKING_LANGUAGEPROFICIENCYLEVEL + PROFESSIONALWORKING_LANGUAGEPROFICIENCYLEVEL + FULLPROFESSIONAL_LANGUAGEPROFICIENCYLEVEL + NATIVEORBILINGUAL_LANGUAGEPROFICIENCYLEVEL + UNKNOWNFUTUREVALUE_LANGUAGEPROFICIENCYLEVEL +) + +func (i LanguageProficiencyLevel) String() string { + return []string{"elementary", "conversational", "limitedWorking", "professionalWorking", "fullProfessional", "nativeOrBilingual", "unknownFutureValue"}[i] +} +func ParseLanguageProficiencyLevel(v string) (interface{}, error) { + result := ELEMENTARY_LANGUAGEPROFICIENCYLEVEL + switch v { + case "elementary": + result = ELEMENTARY_LANGUAGEPROFICIENCYLEVEL + case "conversational": + result = CONVERSATIONAL_LANGUAGEPROFICIENCYLEVEL + case "limitedWorking": + result = LIMITEDWORKING_LANGUAGEPROFICIENCYLEVEL + case "professionalWorking": + result = PROFESSIONALWORKING_LANGUAGEPROFICIENCYLEVEL + case "fullProfessional": + result = FULLPROFESSIONAL_LANGUAGEPROFICIENCYLEVEL + case "nativeOrBilingual": + result = NATIVEORBILINGUAL_LANGUAGEPROFICIENCYLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LANGUAGEPROFICIENCYLEVEL + default: + return 0, errors.New("Unknown LanguageProficiencyLevel value: " + v) + } + return &result, nil +} +func SerializeLanguageProficiencyLevel(values []LanguageProficiencyLevel) []string { + 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/language_proficiencyable.go b/src/internal/connector/graph/betasdk/models/language_proficiencyable.go new file mode 100644 index 000000000..ed4583375 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/language_proficiencyable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LanguageProficiencyable +type LanguageProficiencyable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetProficiency()(*LanguageProficiencyLevel) + GetReading()(*LanguageProficiencyLevel) + GetSpoken()(*LanguageProficiencyLevel) + GetTag()(*string) + GetThumbnailUrl()(*string) + GetWritten()(*LanguageProficiencyLevel) + SetDisplayName(value *string)() + SetProficiency(value *LanguageProficiencyLevel)() + SetReading(value *LanguageProficiencyLevel)() + SetSpoken(value *LanguageProficiencyLevel)() + SetTag(value *string)() + SetThumbnailUrl(value *string)() + SetWritten(value *LanguageProficiencyLevel)() +} diff --git a/src/internal/connector/graph/betasdk/models/layout_template_type.go b/src/internal/connector/graph/betasdk/models/layout_template_type.go new file mode 100644 index 000000000..f8bde4bea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/layout_template_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LayoutTemplateType int + +const ( + DEFAULT_ESCAPED_LAYOUTTEMPLATETYPE LayoutTemplateType = iota + VERTICALSPLIT_LAYOUTTEMPLATETYPE + UNKNOWNFUTUREVALUE_LAYOUTTEMPLATETYPE +) + +func (i LayoutTemplateType) String() string { + return []string{"default", "verticalSplit", "unknownFutureValue"}[i] +} +func ParseLayoutTemplateType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_LAYOUTTEMPLATETYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_LAYOUTTEMPLATETYPE + case "verticalSplit": + result = VERTICALSPLIT_LAYOUTTEMPLATETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LAYOUTTEMPLATETYPE + default: + return 0, errors.New("Unknown LayoutTemplateType value: " + v) + } + return &result, nil +} +func SerializeLayoutTemplateType(values []LayoutTemplateType) []string { + 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/learning_content.go b/src/internal/connector/graph/betasdk/models/learning_content.go new file mode 100644 index 000000000..733338c56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_content.go @@ -0,0 +1,515 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningContent provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LearningContent struct { + Entity + // Keywords, topics, and other tags associated with the learning content. Optional. + additionalTags []string + // The content web URL for the learning content. Required. + contentWebUrl *string + // The authors, creators, or contributors of the learning content. Optional. + contributors []string + // The date when the learning content was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description or summary for the learning content. Optional. + description *string + // The duration of the learning content in seconds. The value is represented in ISO 8601 format for durations. Optional. + duration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Unique external content ID for the learning content. Required. + externalId *string + // The format of the learning content. For example, Course, Video, Book, Book Summary, Audiobook Summary. Optional. + format *string + // Indicates whether the content is active or not. Inactive content will not show up in the UI. The default value is true. Optional. + isActive *bool + // Indicates whether the learning content requires the user to sign-in on the learning provider platform or not. The default value is false. Optional. + isPremium *bool + // Indicates whether the learning content is searchable or not. The default value is true. Optional. + isSearchable *bool + // The language of the learning content, for example, en-us or fr-fr. Required. + languageTag *string + // The date when the learning content was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of pages of the learning content, for example, 9. Optional. + numberOfPages *int32 + // The skills tags associated with the learning content. Optional. + skillTags []string + // The source name of the learning content, such as LinkedIn Learning or Coursera. Optional. + sourceName *string + // The URL of learning content thumbnail image. Optional. + thumbnailWebUrl *string + // The title of the learning content. Required. + title *string +} +// NewLearningContent instantiates a new learningContent and sets the default values. +func NewLearningContent()(*LearningContent) { + m := &LearningContent{ + Entity: *NewEntity(), + } + return m +} +// CreateLearningContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLearningContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLearningContent(), nil +} +// GetAdditionalTags gets the additionalTags property value. Keywords, topics, and other tags associated with the learning content. Optional. +func (m *LearningContent) GetAdditionalTags()([]string) { + return m.additionalTags +} +// GetContentWebUrl gets the contentWebUrl property value. The content web URL for the learning content. Required. +func (m *LearningContent) GetContentWebUrl()(*string) { + return m.contentWebUrl +} +// GetContributors gets the contributors property value. The authors, creators, or contributors of the learning content. Optional. +func (m *LearningContent) GetContributors()([]string) { + return m.contributors +} +// GetCreatedDateTime gets the createdDateTime property value. The date when the learning content was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *LearningContent) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description or summary for the learning content. Optional. +func (m *LearningContent) GetDescription()(*string) { + return m.description +} +// GetDuration gets the duration property value. The duration of the learning content in seconds. The value is represented in ISO 8601 format for durations. Optional. +func (m *LearningContent) GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.duration +} +// GetExternalId gets the externalId property value. Unique external content ID for the learning content. Required. +func (m *LearningContent) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LearningContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdditionalTags(res) + } + return nil + } + res["contentWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentWebUrl(val) + } + return nil + } + res["contributors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetContributors(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["format"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFormat(val) + } + return nil + } + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["isPremium"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPremium(val) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + 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["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["numberOfPages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfPages(val) + } + return nil + } + res["skillTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSkillTags(res) + } + return nil + } + res["sourceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceName(val) + } + return nil + } + res["thumbnailWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailWebUrl(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetFormat gets the format property value. The format of the learning content. For example, Course, Video, Book, Book Summary, Audiobook Summary. Optional. +func (m *LearningContent) GetFormat()(*string) { + return m.format +} +// GetIsActive gets the isActive property value. Indicates whether the content is active or not. Inactive content will not show up in the UI. The default value is true. Optional. +func (m *LearningContent) GetIsActive()(*bool) { + return m.isActive +} +// GetIsPremium gets the isPremium property value. Indicates whether the learning content requires the user to sign-in on the learning provider platform or not. The default value is false. Optional. +func (m *LearningContent) GetIsPremium()(*bool) { + return m.isPremium +} +// GetIsSearchable gets the isSearchable property value. Indicates whether the learning content is searchable or not. The default value is true. Optional. +func (m *LearningContent) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetLanguageTag gets the languageTag property value. The language of the learning content, for example, en-us or fr-fr. Required. +func (m *LearningContent) GetLanguageTag()(*string) { + return m.languageTag +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date when the learning content was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *LearningContent) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumberOfPages gets the numberOfPages property value. The number of pages of the learning content, for example, 9. Optional. +func (m *LearningContent) GetNumberOfPages()(*int32) { + return m.numberOfPages +} +// GetSkillTags gets the skillTags property value. The skills tags associated with the learning content. Optional. +func (m *LearningContent) GetSkillTags()([]string) { + return m.skillTags +} +// GetSourceName gets the sourceName property value. The source name of the learning content, such as LinkedIn Learning or Coursera. Optional. +func (m *LearningContent) GetSourceName()(*string) { + return m.sourceName +} +// GetThumbnailWebUrl gets the thumbnailWebUrl property value. The URL of learning content thumbnail image. Optional. +func (m *LearningContent) GetThumbnailWebUrl()(*string) { + return m.thumbnailWebUrl +} +// GetTitle gets the title property value. The title of the learning content. Required. +func (m *LearningContent) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *LearningContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdditionalTags() != nil { + err = writer.WriteCollectionOfStringValues("additionalTags", m.GetAdditionalTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentWebUrl", m.GetContentWebUrl()) + if err != nil { + return err + } + } + if m.GetContributors() != nil { + err = writer.WriteCollectionOfStringValues("contributors", m.GetContributors()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("format", m.GetFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isPremium", m.GetIsPremium()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfPages", m.GetNumberOfPages()) + if err != nil { + return err + } + } + if m.GetSkillTags() != nil { + err = writer.WriteCollectionOfStringValues("skillTags", m.GetSkillTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceName", m.GetSourceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailWebUrl", m.GetThumbnailWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalTags sets the additionalTags property value. Keywords, topics, and other tags associated with the learning content. Optional. +func (m *LearningContent) SetAdditionalTags(value []string)() { + m.additionalTags = value +} +// SetContentWebUrl sets the contentWebUrl property value. The content web URL for the learning content. Required. +func (m *LearningContent) SetContentWebUrl(value *string)() { + m.contentWebUrl = value +} +// SetContributors sets the contributors property value. The authors, creators, or contributors of the learning content. Optional. +func (m *LearningContent) SetContributors(value []string)() { + m.contributors = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date when the learning content was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *LearningContent) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description or summary for the learning content. Optional. +func (m *LearningContent) SetDescription(value *string)() { + m.description = value +} +// SetDuration sets the duration property value. The duration of the learning content in seconds. The value is represented in ISO 8601 format for durations. Optional. +func (m *LearningContent) SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.duration = value +} +// SetExternalId sets the externalId property value. Unique external content ID for the learning content. Required. +func (m *LearningContent) SetExternalId(value *string)() { + m.externalId = value +} +// SetFormat sets the format property value. The format of the learning content. For example, Course, Video, Book, Book Summary, Audiobook Summary. Optional. +func (m *LearningContent) SetFormat(value *string)() { + m.format = value +} +// SetIsActive sets the isActive property value. Indicates whether the content is active or not. Inactive content will not show up in the UI. The default value is true. Optional. +func (m *LearningContent) SetIsActive(value *bool)() { + m.isActive = value +} +// SetIsPremium sets the isPremium property value. Indicates whether the learning content requires the user to sign-in on the learning provider platform or not. The default value is false. Optional. +func (m *LearningContent) SetIsPremium(value *bool)() { + m.isPremium = value +} +// SetIsSearchable sets the isSearchable property value. Indicates whether the learning content is searchable or not. The default value is true. Optional. +func (m *LearningContent) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetLanguageTag sets the languageTag property value. The language of the learning content, for example, en-us or fr-fr. Required. +func (m *LearningContent) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date when the learning content was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *LearningContent) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumberOfPages sets the numberOfPages property value. The number of pages of the learning content, for example, 9. Optional. +func (m *LearningContent) SetNumberOfPages(value *int32)() { + m.numberOfPages = value +} +// SetSkillTags sets the skillTags property value. The skills tags associated with the learning content. Optional. +func (m *LearningContent) SetSkillTags(value []string)() { + m.skillTags = value +} +// SetSourceName sets the sourceName property value. The source name of the learning content, such as LinkedIn Learning or Coursera. Optional. +func (m *LearningContent) SetSourceName(value *string)() { + m.sourceName = value +} +// SetThumbnailWebUrl sets the thumbnailWebUrl property value. The URL of learning content thumbnail image. Optional. +func (m *LearningContent) SetThumbnailWebUrl(value *string)() { + m.thumbnailWebUrl = value +} +// SetTitle sets the title property value. The title of the learning content. Required. +func (m *LearningContent) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/learning_content_collection_response.go b/src/internal/connector/graph/betasdk/models/learning_content_collection_response.go new file mode 100644 index 000000000..ab5fc1068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningContentCollectionResponse +type LearningContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LearningContentable +} +// NewLearningContentCollectionResponse instantiates a new LearningContentCollectionResponse and sets the default values. +func NewLearningContentCollectionResponse()(*LearningContentCollectionResponse) { + m := &LearningContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLearningContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLearningContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLearningContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LearningContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLearningContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LearningContentable, len(val)) + for i, v := range val { + res[i] = v.(LearningContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LearningContentCollectionResponse) GetValue()([]LearningContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *LearningContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LearningContentCollectionResponse) SetValue(value []LearningContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/learning_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/learning_content_collection_responseable.go new file mode 100644 index 000000000..bb3a9b6ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningContentCollectionResponseable +type LearningContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LearningContentable) + SetValue(value []LearningContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/learning_contentable.go b/src/internal/connector/graph/betasdk/models/learning_contentable.go new file mode 100644 index 000000000..ed4992aeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_contentable.go @@ -0,0 +1,48 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningContentable +type LearningContentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalTags()([]string) + GetContentWebUrl()(*string) + GetContributors()([]string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetExternalId()(*string) + GetFormat()(*string) + GetIsActive()(*bool) + GetIsPremium()(*bool) + GetIsSearchable()(*bool) + GetLanguageTag()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumberOfPages()(*int32) + GetSkillTags()([]string) + GetSourceName()(*string) + GetThumbnailWebUrl()(*string) + GetTitle()(*string) + SetAdditionalTags(value []string)() + SetContentWebUrl(value *string)() + SetContributors(value []string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetExternalId(value *string)() + SetFormat(value *string)() + SetIsActive(value *bool)() + SetIsPremium(value *bool)() + SetIsSearchable(value *bool)() + SetLanguageTag(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumberOfPages(value *int32)() + SetSkillTags(value []string)() + SetSourceName(value *string)() + SetThumbnailWebUrl(value *string)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/learning_provider.go b/src/internal/connector/graph/betasdk/models/learning_provider.go new file mode 100644 index 000000000..00342c112 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_provider.go @@ -0,0 +1,250 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningProvider +type LearningProvider struct { + Entity + // The display name that appears in Viva Learning. Required. + displayName *string + // The state of the provider. Optional. + isEnabled *bool + // Learning catalog items for the provider. + learningContents []LearningContentable + // Authentication URL to access the courses for the provider. Optional. + loginWebUrl *string + // The long logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. + longLogoWebUrlForDarkTheme *string + // The long logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. + longLogoWebUrlForLightTheme *string + // The square logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. + squareLogoWebUrlForDarkTheme *string + // The square logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. + squareLogoWebUrlForLightTheme *string +} +// NewLearningProvider instantiates a new LearningProvider and sets the default values. +func NewLearningProvider()(*LearningProvider) { + m := &LearningProvider{ + Entity: *NewEntity(), + } + return m +} +// CreateLearningProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLearningProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLearningProvider(), nil +} +// GetDisplayName gets the displayName property value. The display name that appears in Viva Learning. Required. +func (m *LearningProvider) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LearningProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["learningContents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLearningContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LearningContentable, len(val)) + for i, v := range val { + res[i] = v.(LearningContentable) + } + m.SetLearningContents(res) + } + return nil + } + res["loginWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoginWebUrl(val) + } + return nil + } + res["longLogoWebUrlForDarkTheme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLongLogoWebUrlForDarkTheme(val) + } + return nil + } + res["longLogoWebUrlForLightTheme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLongLogoWebUrlForLightTheme(val) + } + return nil + } + res["squareLogoWebUrlForDarkTheme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogoWebUrlForDarkTheme(val) + } + return nil + } + res["squareLogoWebUrlForLightTheme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogoWebUrlForLightTheme(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. The state of the provider. Optional. +func (m *LearningProvider) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetLearningContents gets the learningContents property value. Learning catalog items for the provider. +func (m *LearningProvider) GetLearningContents()([]LearningContentable) { + return m.learningContents +} +// GetLoginWebUrl gets the loginWebUrl property value. Authentication URL to access the courses for the provider. Optional. +func (m *LearningProvider) GetLoginWebUrl()(*string) { + return m.loginWebUrl +} +// GetLongLogoWebUrlForDarkTheme gets the longLogoWebUrlForDarkTheme property value. The long logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) GetLongLogoWebUrlForDarkTheme()(*string) { + return m.longLogoWebUrlForDarkTheme +} +// GetLongLogoWebUrlForLightTheme gets the longLogoWebUrlForLightTheme property value. The long logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) GetLongLogoWebUrlForLightTheme()(*string) { + return m.longLogoWebUrlForLightTheme +} +// GetSquareLogoWebUrlForDarkTheme gets the squareLogoWebUrlForDarkTheme property value. The square logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) GetSquareLogoWebUrlForDarkTheme()(*string) { + return m.squareLogoWebUrlForDarkTheme +} +// GetSquareLogoWebUrlForLightTheme gets the squareLogoWebUrlForLightTheme property value. The square logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) GetSquareLogoWebUrlForLightTheme()(*string) { + return m.squareLogoWebUrlForLightTheme +} +// Serialize serializes information the current object +func (m *LearningProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + if m.GetLearningContents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLearningContents())) + for i, v := range m.GetLearningContents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("learningContents", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("loginWebUrl", m.GetLoginWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("longLogoWebUrlForDarkTheme", m.GetLongLogoWebUrlForDarkTheme()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("longLogoWebUrlForLightTheme", m.GetLongLogoWebUrlForLightTheme()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("squareLogoWebUrlForDarkTheme", m.GetSquareLogoWebUrlForDarkTheme()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("squareLogoWebUrlForLightTheme", m.GetSquareLogoWebUrlForLightTheme()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name that appears in Viva Learning. Required. +func (m *LearningProvider) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsEnabled sets the isEnabled property value. The state of the provider. Optional. +func (m *LearningProvider) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetLearningContents sets the learningContents property value. Learning catalog items for the provider. +func (m *LearningProvider) SetLearningContents(value []LearningContentable)() { + m.learningContents = value +} +// SetLoginWebUrl sets the loginWebUrl property value. Authentication URL to access the courses for the provider. Optional. +func (m *LearningProvider) SetLoginWebUrl(value *string)() { + m.loginWebUrl = value +} +// SetLongLogoWebUrlForDarkTheme sets the longLogoWebUrlForDarkTheme property value. The long logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) SetLongLogoWebUrlForDarkTheme(value *string)() { + m.longLogoWebUrlForDarkTheme = value +} +// SetLongLogoWebUrlForLightTheme sets the longLogoWebUrlForLightTheme property value. The long logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) SetLongLogoWebUrlForLightTheme(value *string)() { + m.longLogoWebUrlForLightTheme = value +} +// SetSquareLogoWebUrlForDarkTheme sets the squareLogoWebUrlForDarkTheme property value. The square logo URL for the dark mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) SetSquareLogoWebUrlForDarkTheme(value *string)() { + m.squareLogoWebUrlForDarkTheme = value +} +// SetSquareLogoWebUrlForLightTheme sets the squareLogoWebUrlForLightTheme property value. The square logo URL for the light mode, which needs to be a publicly accessible image. This image would be saved to the Blob storage of Viva Learning for rendering within the Viva Learning app. Required. +func (m *LearningProvider) SetSquareLogoWebUrlForLightTheme(value *string)() { + m.squareLogoWebUrlForLightTheme = value +} diff --git a/src/internal/connector/graph/betasdk/models/learning_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/learning_provider_collection_response.go new file mode 100644 index 000000000..a2f78fc75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningProviderCollectionResponse +type LearningProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LearningProviderable +} +// NewLearningProviderCollectionResponse instantiates a new LearningProviderCollectionResponse and sets the default values. +func NewLearningProviderCollectionResponse()(*LearningProviderCollectionResponse) { + m := &LearningProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLearningProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLearningProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLearningProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LearningProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLearningProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LearningProviderable, len(val)) + for i, v := range val { + res[i] = v.(LearningProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LearningProviderCollectionResponse) GetValue()([]LearningProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *LearningProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LearningProviderCollectionResponse) SetValue(value []LearningProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/learning_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/learning_provider_collection_responseable.go new file mode 100644 index 000000000..26fcbb467 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningProviderCollectionResponseable +type LearningProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LearningProviderable) + SetValue(value []LearningProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/learning_providerable.go b/src/internal/connector/graph/betasdk/models/learning_providerable.go new file mode 100644 index 000000000..08896a878 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/learning_providerable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LearningProviderable +type LearningProviderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetIsEnabled()(*bool) + GetLearningContents()([]LearningContentable) + GetLoginWebUrl()(*string) + GetLongLogoWebUrlForDarkTheme()(*string) + GetLongLogoWebUrlForLightTheme()(*string) + GetSquareLogoWebUrlForDarkTheme()(*string) + GetSquareLogoWebUrlForLightTheme()(*string) + SetDisplayName(value *string)() + SetIsEnabled(value *bool)() + SetLearningContents(value []LearningContentable)() + SetLoginWebUrl(value *string)() + SetLongLogoWebUrlForDarkTheme(value *string)() + SetLongLogoWebUrlForLightTheme(value *string)() + SetSquareLogoWebUrlForDarkTheme(value *string)() + SetSquareLogoWebUrlForLightTheme(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_assignment_state.go b/src/internal/connector/graph/betasdk/models/license_assignment_state.go new file mode 100644 index 000000000..e5d0022ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_assignment_state.go @@ -0,0 +1,233 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseAssignmentState +type LicenseAssignmentState 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 whether the license is directly-assigned or inherited from a group. If directly-assigned, this field is null; if inherited through a group membership, this field contains the ID of the group. Read-Only. + assignedByGroup *string + // The service plans that are disabled in this assignment. Read-Only. + disabledPlans []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // License assignment failure error. If the license is assigned successfully, this field will be Null. Read-Only. The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation, ProhibitedInUsageLocationViolation, UniquenessViolation, and Other. For more information on how to identify and resolve license assignment errors see here. + error *string + // The timestamp when the state of the license assignment was last updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The unique identifier for the SKU. Read-Only. + skuId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Indicate the current state of this assignment. Read-Only. The possible values are Active, ActiveWithError, Disabled, and Error. + state *string +} +// NewLicenseAssignmentState instantiates a new licenseAssignmentState and sets the default values. +func NewLicenseAssignmentState()(*LicenseAssignmentState) { + m := &LicenseAssignmentState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLicenseAssignmentStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseAssignmentStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseAssignmentState(), 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 *LicenseAssignmentState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignedByGroup gets the assignedByGroup property value. Indicates whether the license is directly-assigned or inherited from a group. If directly-assigned, this field is null; if inherited through a group membership, this field contains the ID of the group. Read-Only. +func (m *LicenseAssignmentState) GetAssignedByGroup()(*string) { + return m.assignedByGroup +} +// GetDisabledPlans gets the disabledPlans property value. The service plans that are disabled in this assignment. Read-Only. +func (m *LicenseAssignmentState) GetDisabledPlans()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.disabledPlans +} +// GetError gets the error property value. License assignment failure error. If the license is assigned successfully, this field will be Null. Read-Only. The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation, ProhibitedInUsageLocationViolation, UniquenessViolation, and Other. For more information on how to identify and resolve license assignment errors see here. +func (m *LicenseAssignmentState) GetError()(*string) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseAssignmentState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignedByGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedByGroup(val) + } + return nil + } + res["disabledPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetDisabledPlans(res) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetError(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(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["skuId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The timestamp when the state of the license assignment was last updated. +func (m *LicenseAssignmentState) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LicenseAssignmentState) GetOdataType()(*string) { + return m.odataType +} +// GetSkuId gets the skuId property value. The unique identifier for the SKU. Read-Only. +func (m *LicenseAssignmentState) GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.skuId +} +// GetState gets the state property value. Indicate the current state of this assignment. Read-Only. The possible values are Active, ActiveWithError, Disabled, and Error. +func (m *LicenseAssignmentState) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *LicenseAssignmentState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignedByGroup", m.GetAssignedByGroup()) + if err != nil { + return err + } + } + if m.GetDisabledPlans() != nil { + err := writer.WriteCollectionOfUUIDValues("disabledPlans", m.GetDisabledPlans()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("skuId", m.GetSkuId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *LicenseAssignmentState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignedByGroup sets the assignedByGroup property value. Indicates whether the license is directly-assigned or inherited from a group. If directly-assigned, this field is null; if inherited through a group membership, this field contains the ID of the group. Read-Only. +func (m *LicenseAssignmentState) SetAssignedByGroup(value *string)() { + m.assignedByGroup = value +} +// SetDisabledPlans sets the disabledPlans property value. The service plans that are disabled in this assignment. Read-Only. +func (m *LicenseAssignmentState) SetDisabledPlans(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.disabledPlans = value +} +// SetError sets the error property value. License assignment failure error. If the license is assigned successfully, this field will be Null. Read-Only. The possible values are CountViolation, MutuallyExclusiveViolation, DependencyViolation, ProhibitedInUsageLocationViolation, UniquenessViolation, and Other. For more information on how to identify and resolve license assignment errors see here. +func (m *LicenseAssignmentState) SetError(value *string)() { + m.error = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The timestamp when the state of the license assignment was last updated. +func (m *LicenseAssignmentState) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LicenseAssignmentState) SetOdataType(value *string)() { + m.odataType = value +} +// SetSkuId sets the skuId property value. The unique identifier for the SKU. Read-Only. +func (m *LicenseAssignmentState) SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.skuId = value +} +// SetState sets the state property value. Indicate the current state of this assignment. Read-Only. The possible values are Active, ActiveWithError, Disabled, and Error. +func (m *LicenseAssignmentState) SetState(value *string)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_response.go b/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_response.go new file mode 100644 index 000000000..8e5513f01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseAssignmentStateCollectionResponse +type LicenseAssignmentStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LicenseAssignmentStateable +} +// NewLicenseAssignmentStateCollectionResponse instantiates a new LicenseAssignmentStateCollectionResponse and sets the default values. +func NewLicenseAssignmentStateCollectionResponse()(*LicenseAssignmentStateCollectionResponse) { + m := &LicenseAssignmentStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLicenseAssignmentStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseAssignmentStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseAssignmentStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseAssignmentStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLicenseAssignmentStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LicenseAssignmentStateable, len(val)) + for i, v := range val { + res[i] = v.(LicenseAssignmentStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LicenseAssignmentStateCollectionResponse) GetValue()([]LicenseAssignmentStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *LicenseAssignmentStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LicenseAssignmentStateCollectionResponse) SetValue(value []LicenseAssignmentStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_responseable.go new file mode 100644 index 000000000..cd2917534 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_assignment_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseAssignmentStateCollectionResponseable +type LicenseAssignmentStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LicenseAssignmentStateable) + SetValue(value []LicenseAssignmentStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_assignment_stateable.go b/src/internal/connector/graph/betasdk/models/license_assignment_stateable.go new file mode 100644 index 000000000..47b6c7b8a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_assignment_stateable.go @@ -0,0 +1,27 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseAssignmentStateable +type LicenseAssignmentStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedByGroup()(*string) + GetDisabledPlans()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetError()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetState()(*string) + SetAssignedByGroup(value *string)() + SetDisabledPlans(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetError(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_details.go b/src/internal/connector/graph/betasdk/models/license_details.go new file mode 100644 index 000000000..ca53c1148 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_details.go @@ -0,0 +1,121 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseDetails provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LicenseDetails struct { + Entity + // Information about the service plans assigned with the license. Read-only, Not nullable + servicePlans []ServicePlanInfoable + // Unique identifier (GUID) for the service SKU. Equal to the skuId property on the related SubscribedSku object. Read-only + skuId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Unique SKU display name. Equal to the skuPartNumber on the related SubscribedSku object; for example: 'AAD_Premium'. Read-only + skuPartNumber *string +} +// NewLicenseDetails instantiates a new licenseDetails and sets the default values. +func NewLicenseDetails()(*LicenseDetails) { + m := &LicenseDetails{ + Entity: *NewEntity(), + } + return m +} +// CreateLicenseDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseDetails(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["servicePlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePlanInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePlanInfoable, len(val)) + for i, v := range val { + res[i] = v.(ServicePlanInfoable) + } + m.SetServicePlans(res) + } + return nil + } + res["skuId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuId(val) + } + return nil + } + res["skuPartNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuPartNumber(val) + } + return nil + } + return res +} +// GetServicePlans gets the servicePlans property value. Information about the service plans assigned with the license. Read-only, Not nullable +func (m *LicenseDetails) GetServicePlans()([]ServicePlanInfoable) { + return m.servicePlans +} +// GetSkuId gets the skuId property value. Unique identifier (GUID) for the service SKU. Equal to the skuId property on the related SubscribedSku object. Read-only +func (m *LicenseDetails) GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.skuId +} +// GetSkuPartNumber gets the skuPartNumber property value. Unique SKU display name. Equal to the skuPartNumber on the related SubscribedSku object; for example: 'AAD_Premium'. Read-only +func (m *LicenseDetails) GetSkuPartNumber()(*string) { + return m.skuPartNumber +} +// Serialize serializes information the current object +func (m *LicenseDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetServicePlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetServicePlans())) + for i, v := range m.GetServicePlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("servicePlans", cast) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("skuId", m.GetSkuId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("skuPartNumber", m.GetSkuPartNumber()) + if err != nil { + return err + } + } + return nil +} +// SetServicePlans sets the servicePlans property value. Information about the service plans assigned with the license. Read-only, Not nullable +func (m *LicenseDetails) SetServicePlans(value []ServicePlanInfoable)() { + m.servicePlans = value +} +// SetSkuId sets the skuId property value. Unique identifier (GUID) for the service SKU. Equal to the skuId property on the related SubscribedSku object. Read-only +func (m *LicenseDetails) SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.skuId = value +} +// SetSkuPartNumber sets the skuPartNumber property value. Unique SKU display name. Equal to the skuPartNumber on the related SubscribedSku object; for example: 'AAD_Premium'. Read-only +func (m *LicenseDetails) SetSkuPartNumber(value *string)() { + m.skuPartNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_details_collection_response.go b/src/internal/connector/graph/betasdk/models/license_details_collection_response.go new file mode 100644 index 000000000..0aa90b2ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseDetailsCollectionResponse +type LicenseDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LicenseDetailsable +} +// NewLicenseDetailsCollectionResponse instantiates a new LicenseDetailsCollectionResponse and sets the default values. +func NewLicenseDetailsCollectionResponse()(*LicenseDetailsCollectionResponse) { + m := &LicenseDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLicenseDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLicenseDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LicenseDetailsable, len(val)) + for i, v := range val { + res[i] = v.(LicenseDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LicenseDetailsCollectionResponse) GetValue()([]LicenseDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *LicenseDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LicenseDetailsCollectionResponse) SetValue(value []LicenseDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/license_details_collection_responseable.go new file mode 100644 index 000000000..d75f6355e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseDetailsCollectionResponseable +type LicenseDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LicenseDetailsable) + SetValue(value []LicenseDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_detailsable.go b/src/internal/connector/graph/betasdk/models/license_detailsable.go new file mode 100644 index 000000000..0a0c0b63c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_detailsable.go @@ -0,0 +1,18 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseDetailsable +type LicenseDetailsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetServicePlans()([]ServicePlanInfoable) + GetSkuId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetSkuPartNumber()(*string) + SetServicePlans(value []ServicePlanInfoable)() + SetSkuId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetSkuPartNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_processing_state.go b/src/internal/connector/graph/betasdk/models/license_processing_state.go new file mode 100644 index 000000000..cdcb4e26a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_processing_state.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseProcessingState +type LicenseProcessingState 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 OdataType property + odataType *string + // The state property + state *string +} +// NewLicenseProcessingState instantiates a new licenseProcessingState and sets the default values. +func NewLicenseProcessingState()(*LicenseProcessingState) { + m := &LicenseProcessingState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLicenseProcessingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseProcessingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseProcessingState(), 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 *LicenseProcessingState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseProcessingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LicenseProcessingState) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *LicenseProcessingState) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *LicenseProcessingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + 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 *LicenseProcessingState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LicenseProcessingState) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *LicenseProcessingState) SetState(value *string)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_processing_stateable.go b/src/internal/connector/graph/betasdk/models/license_processing_stateable.go new file mode 100644 index 000000000..a8639341a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_processing_stateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseProcessingStateable +type LicenseProcessingStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetState()(*string) + SetOdataType(value *string)() + SetState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/license_units_detail.go b/src/internal/connector/graph/betasdk/models/license_units_detail.go new file mode 100644 index 000000000..74727503b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_units_detail.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseUnitsDetail +type LicenseUnitsDetail 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 number of units that are enabled for the active subscription of the service SKU. + enabled *int32 + // The OdataType property + odataType *string + // The number of units that are suspended because the subscription of the service SKU has been cancelled. The units cannot be assigned but can still be reactivated before they are deleted. + suspended *int32 + // The number of units that are in warning status. When the subscription of the service SKU has expired, the customer has a grace period to renew their subscription before it is cancelled (moved to a suspended state). + warning *int32 +} +// NewLicenseUnitsDetail instantiates a new licenseUnitsDetail and sets the default values. +func NewLicenseUnitsDetail()(*LicenseUnitsDetail) { + m := &LicenseUnitsDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLicenseUnitsDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLicenseUnitsDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLicenseUnitsDetail(), 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 *LicenseUnitsDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The number of units that are enabled for the active subscription of the service SKU. +func (m *LicenseUnitsDetail) GetEnabled()(*int32) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LicenseUnitsDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(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["suspended"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuspended(val) + } + return nil + } + res["warning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWarning(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LicenseUnitsDetail) GetOdataType()(*string) { + return m.odataType +} +// GetSuspended gets the suspended property value. The number of units that are suspended because the subscription of the service SKU has been cancelled. The units cannot be assigned but can still be reactivated before they are deleted. +func (m *LicenseUnitsDetail) GetSuspended()(*int32) { + return m.suspended +} +// GetWarning gets the warning property value. The number of units that are in warning status. When the subscription of the service SKU has expired, the customer has a grace period to renew their subscription before it is cancelled (moved to a suspended state). +func (m *LicenseUnitsDetail) GetWarning()(*int32) { + return m.warning +} +// Serialize serializes information the current object +func (m *LicenseUnitsDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("suspended", m.GetSuspended()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("warning", m.GetWarning()) + 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 *LicenseUnitsDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The number of units that are enabled for the active subscription of the service SKU. +func (m *LicenseUnitsDetail) SetEnabled(value *int32)() { + m.enabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LicenseUnitsDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetSuspended sets the suspended property value. The number of units that are suspended because the subscription of the service SKU has been cancelled. The units cannot be assigned but can still be reactivated before they are deleted. +func (m *LicenseUnitsDetail) SetSuspended(value *int32)() { + m.suspended = value +} +// SetWarning sets the warning property value. The number of units that are in warning status. When the subscription of the service SKU has expired, the customer has a grace period to renew their subscription before it is cancelled (moved to a suspended state). +func (m *LicenseUnitsDetail) SetWarning(value *int32)() { + m.warning = value +} diff --git a/src/internal/connector/graph/betasdk/models/license_units_detailable.go b/src/internal/connector/graph/betasdk/models/license_units_detailable.go new file mode 100644 index 000000000..2bc07105a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/license_units_detailable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LicenseUnitsDetailable +type LicenseUnitsDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*int32) + GetOdataType()(*string) + GetSuspended()(*int32) + GetWarning()(*int32) + SetEnabled(value *int32)() + SetOdataType(value *string)() + SetSuspended(value *int32)() + SetWarning(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/lifecycle_event_type.go b/src/internal/connector/graph/betasdk/models/lifecycle_event_type.go new file mode 100644 index 000000000..088eb526d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lifecycle_event_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type LifecycleEventType int + +const ( + MISSED_LIFECYCLEEVENTTYPE LifecycleEventType = iota + SUBSCRIPTIONREMOVED_LIFECYCLEEVENTTYPE + REAUTHORIZATIONREQUIRED_LIFECYCLEEVENTTYPE +) + +func (i LifecycleEventType) String() string { + return []string{"missed", "subscriptionRemoved", "reauthorizationRequired"}[i] +} +func ParseLifecycleEventType(v string) (interface{}, error) { + result := MISSED_LIFECYCLEEVENTTYPE + switch v { + case "missed": + result = MISSED_LIFECYCLEEVENTTYPE + case "subscriptionRemoved": + result = SUBSCRIPTIONREMOVED_LIFECYCLEEVENTTYPE + case "reauthorizationRequired": + result = REAUTHORIZATIONREQUIRED_LIFECYCLEEVENTTYPE + default: + return 0, errors.New("Unknown LifecycleEventType value: " + v) + } + return &result, nil +} +func SerializeLifecycleEventType(values []LifecycleEventType) []string { + 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/linked_resource.go b/src/internal/connector/graph/betasdk/models/linked_resource.go new file mode 100644 index 000000000..4164c374c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/linked_resource.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LinkedResource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LinkedResource struct { + Entity + // Field indicating the app name of the source that is sending the linkedResource. + applicationName *string + // Field indicating the title of the linkedResource. + displayName *string + // Id of the object that is associated with this task on the third-party/partner system. + externalId *string + // Deep link to the linkedResource. + webUrl *string +} +// NewLinkedResource instantiates a new linkedResource and sets the default values. +func NewLinkedResource()(*LinkedResource) { + m := &LinkedResource{ + Entity: *NewEntity(), + } + return m +} +// CreateLinkedResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLinkedResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLinkedResource(), nil +} +// GetApplicationName gets the applicationName property value. Field indicating the app name of the source that is sending the linkedResource. +func (m *LinkedResource) GetApplicationName()(*string) { + return m.applicationName +} +// GetDisplayName gets the displayName property value. Field indicating the title of the linkedResource. +func (m *LinkedResource) GetDisplayName()(*string) { + return m.displayName +} +// GetExternalId gets the externalId property value. Id of the object that is associated with this task on the third-party/partner system. +func (m *LinkedResource) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LinkedResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applicationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationName(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetWebUrl gets the webUrl property value. Deep link to the linkedResource. +func (m *LinkedResource) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *LinkedResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("applicationName", m.GetApplicationName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetApplicationName sets the applicationName property value. Field indicating the app name of the source that is sending the linkedResource. +func (m *LinkedResource) SetApplicationName(value *string)() { + m.applicationName = value +} +// SetDisplayName sets the displayName property value. Field indicating the title of the linkedResource. +func (m *LinkedResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExternalId sets the externalId property value. Id of the object that is associated with this task on the third-party/partner system. +func (m *LinkedResource) SetExternalId(value *string)() { + m.externalId = value +} +// SetWebUrl sets the webUrl property value. Deep link to the linkedResource. +func (m *LinkedResource) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/linked_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/linked_resource_collection_response.go new file mode 100644 index 000000000..d9e5be5d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/linked_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LinkedResourceCollectionResponse +type LinkedResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LinkedResourceable +} +// NewLinkedResourceCollectionResponse instantiates a new LinkedResourceCollectionResponse and sets the default values. +func NewLinkedResourceCollectionResponse()(*LinkedResourceCollectionResponse) { + m := &LinkedResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLinkedResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLinkedResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLinkedResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LinkedResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLinkedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LinkedResourceable, len(val)) + for i, v := range val { + res[i] = v.(LinkedResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LinkedResourceCollectionResponse) GetValue()([]LinkedResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *LinkedResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LinkedResourceCollectionResponse) SetValue(value []LinkedResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/linked_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/linked_resource_collection_responseable.go new file mode 100644 index 000000000..9acd42b49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/linked_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LinkedResourceCollectionResponseable +type LinkedResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LinkedResourceable) + SetValue(value []LinkedResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/linked_resourceable.go b/src/internal/connector/graph/betasdk/models/linked_resourceable.go new file mode 100644 index 000000000..e3ee2504f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/linked_resourceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LinkedResourceable +type LinkedResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationName()(*string) + GetDisplayName()(*string) + GetExternalId()(*string) + GetWebUrl()(*string) + SetApplicationName(value *string)() + SetDisplayName(value *string)() + SetExternalId(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/list.go b/src/internal/connector/graph/betasdk/models/list.go new file mode 100644 index 000000000..ba2209cf0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list.go @@ -0,0 +1,370 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// List +type List struct { + BaseItem + // The recent activities that took place within this list. + activities []ItemActivityOLDable + // The columns property + columns []ColumnDefinitionable + // The contentTypes property + contentTypes []ContentTypeable + // The displayable title of the list. + displayName *string + // Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. + drive Driveable + // All items contained in the list. + items []ListItemable + // Provides additional details about the list. + list ListInfoable + // The collection of long running operations for the list. + operations []RichLongRunningOperationable + // The sharepointIds property + sharepointIds SharepointIdsable + // The set of subscriptions on the list. + subscriptions []Subscriptionable + // If present, indicates that this is a system-managed list. Read-only. + system SystemFacetable +} +// NewList instantiates a new list and sets the default values. +func NewList()(*List) { + m := &List{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.list"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewList(), nil +} +// GetActivities gets the activities property value. The recent activities that took place within this list. +func (m *List) GetActivities()([]ItemActivityOLDable) { + return m.activities +} +// GetColumns gets the columns property value. The columns property +func (m *List) GetColumns()([]ColumnDefinitionable) { + return m.columns +} +// GetContentTypes gets the contentTypes property value. The contentTypes property +func (m *List) GetContentTypes()([]ContentTypeable) { + return m.contentTypes +} +// GetDisplayName gets the displayName property value. The displayable title of the list. +func (m *List) GetDisplayName()(*string) { + return m.displayName +} +// GetDrive gets the drive property value. Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. +func (m *List) GetDrive()(Driveable) { + return m.drive +} +// GetFieldDeserializers the deserialization information for the current model +func (m *List) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityOLDFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityOLDable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityOLDable) + } + m.SetActivities(res) + } + return nil + } + res["columns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateColumnDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ColumnDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ColumnDefinitionable) + } + m.SetColumns(res) + } + return nil + } + res["contentTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateContentTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ContentTypeable, len(val)) + for i, v := range val { + res[i] = v.(ContentTypeable) + } + m.SetContentTypes(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["drive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDrive(val.(Driveable)) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ListItemable, len(val)) + for i, v := range val { + res[i] = v.(ListItemable) + } + m.SetItems(res) + } + return nil + } + res["list"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetList(val.(ListInfoable)) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRichLongRunningOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RichLongRunningOperationable, len(val)) + for i, v := range val { + res[i] = v.(RichLongRunningOperationable) + } + m.SetOperations(res) + } + return nil + } + res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharepointIds(val.(SharepointIdsable)) + } + return nil + } + res["subscriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSubscriptionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Subscriptionable, len(val)) + for i, v := range val { + res[i] = v.(Subscriptionable) + } + m.SetSubscriptions(res) + } + return nil + } + res["system"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSystemFacetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSystem(val.(SystemFacetable)) + } + return nil + } + return res +} +// GetItems gets the items property value. All items contained in the list. +func (m *List) GetItems()([]ListItemable) { + return m.items +} +// GetList gets the list property value. Provides additional details about the list. +func (m *List) GetList()(ListInfoable) { + return m.list +} +// GetOperations gets the operations property value. The collection of long running operations for the list. +func (m *List) GetOperations()([]RichLongRunningOperationable) { + return m.operations +} +// GetSharepointIds gets the sharepointIds property value. The sharepointIds property +func (m *List) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetSubscriptions gets the subscriptions property value. The set of subscriptions on the list. +func (m *List) GetSubscriptions()([]Subscriptionable) { + return m.subscriptions +} +// GetSystem gets the system property value. If present, indicates that this is a system-managed list. Read-only. +func (m *List) GetSystem()(SystemFacetable) { + return m.system +} +// Serialize serializes information the current object +func (m *List) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + if m.GetColumns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColumns())) + for i, v := range m.GetColumns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("columns", cast) + if err != nil { + return err + } + } + if m.GetContentTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentTypes())) + for i, v := range m.GetContentTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentTypes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("drive", m.GetDrive()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("list", m.GetList()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + if m.GetSubscriptions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubscriptions())) + for i, v := range m.GetSubscriptions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("subscriptions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("system", m.GetSystem()) + if err != nil { + return err + } + } + return nil +} +// SetActivities sets the activities property value. The recent activities that took place within this list. +func (m *List) SetActivities(value []ItemActivityOLDable)() { + m.activities = value +} +// SetColumns sets the columns property value. The columns property +func (m *List) SetColumns(value []ColumnDefinitionable)() { + m.columns = value +} +// SetContentTypes sets the contentTypes property value. The contentTypes property +func (m *List) SetContentTypes(value []ContentTypeable)() { + m.contentTypes = value +} +// SetDisplayName sets the displayName property value. The displayable title of the list. +func (m *List) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDrive sets the drive property value. Only present on document libraries. Allows access to the list as a [drive][] resource with [driveItems][driveItem]. +func (m *List) SetDrive(value Driveable)() { + m.drive = value +} +// SetItems sets the items property value. All items contained in the list. +func (m *List) SetItems(value []ListItemable)() { + m.items = value +} +// SetList sets the list property value. Provides additional details about the list. +func (m *List) SetList(value ListInfoable)() { + m.list = value +} +// SetOperations sets the operations property value. The collection of long running operations for the list. +func (m *List) SetOperations(value []RichLongRunningOperationable)() { + m.operations = value +} +// SetSharepointIds sets the sharepointIds property value. The sharepointIds property +func (m *List) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetSubscriptions sets the subscriptions property value. The set of subscriptions on the list. +func (m *List) SetSubscriptions(value []Subscriptionable)() { + m.subscriptions = value +} +// SetSystem sets the system property value. If present, indicates that this is a system-managed list. Read-only. +func (m *List) SetSystem(value SystemFacetable)() { + m.system = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_collection_response.go b/src/internal/connector/graph/betasdk/models/list_collection_response.go new file mode 100644 index 000000000..58a8e211c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListCollectionResponse +type ListCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Listable +} +// NewListCollectionResponse instantiates a new ListCollectionResponse and sets the default values. +func NewListCollectionResponse()(*ListCollectionResponse) { + m := &ListCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateListCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewListCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Listable, len(val)) + for i, v := range val { + res[i] = v.(Listable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ListCollectionResponse) GetValue()([]Listable) { + return m.value +} +// Serialize serializes information the current object +func (m *ListCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ListCollectionResponse) SetValue(value []Listable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_collection_responseable.go b/src/internal/connector/graph/betasdk/models/list_collection_responseable.go new file mode 100644 index 000000000..6e7c779d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListCollectionResponseable +type ListCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Listable) + SetValue(value []Listable)() +} diff --git a/src/internal/connector/graph/betasdk/models/list_info.go b/src/internal/connector/graph/betasdk/models/list_info.go new file mode 100644 index 000000000..526c1035b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_info.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListInfo +type ListInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If true, indicates that content types are enabled for this list. + contentTypesEnabled *bool + // If true, indicates that the list is not normally visible in the SharePoint user experience. + hidden *bool + // The OdataType property + odataType *string + // An enumerated value that represents the base list template used in creating the list. Possible values include documentLibrary, genericList, task, survey, announcements, contacts, and more. + template *string +} +// NewListInfo instantiates a new listInfo and sets the default values. +func NewListInfo()(*ListInfo) { + m := &ListInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateListInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewListInfo(), 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 *ListInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContentTypesEnabled gets the contentTypesEnabled property value. If true, indicates that content types are enabled for this list. +func (m *ListInfo) GetContentTypesEnabled()(*bool) { + return m.contentTypesEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contentTypesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentTypesEnabled(val) + } + return nil + } + res["hidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidden(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["template"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplate(val) + } + return nil + } + return res +} +// GetHidden gets the hidden property value. If true, indicates that the list is not normally visible in the SharePoint user experience. +func (m *ListInfo) GetHidden()(*bool) { + return m.hidden +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ListInfo) GetOdataType()(*string) { + return m.odataType +} +// GetTemplate gets the template property value. An enumerated value that represents the base list template used in creating the list. Possible values include documentLibrary, genericList, task, survey, announcements, contacts, and more. +func (m *ListInfo) GetTemplate()(*string) { + return m.template +} +// Serialize serializes information the current object +func (m *ListInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("contentTypesEnabled", m.GetContentTypesEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hidden", m.GetHidden()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("template", m.GetTemplate()) + 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 *ListInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContentTypesEnabled sets the contentTypesEnabled property value. If true, indicates that content types are enabled for this list. +func (m *ListInfo) SetContentTypesEnabled(value *bool)() { + m.contentTypesEnabled = value +} +// SetHidden sets the hidden property value. If true, indicates that the list is not normally visible in the SharePoint user experience. +func (m *ListInfo) SetHidden(value *bool)() { + m.hidden = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ListInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetTemplate sets the template property value. An enumerated value that represents the base list template used in creating the list. Possible values include documentLibrary, genericList, task, survey, announcements, contacts, and more. +func (m *ListInfo) SetTemplate(value *string)() { + m.template = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_infoable.go b/src/internal/connector/graph/betasdk/models/list_infoable.go new file mode 100644 index 000000000..889d3fe98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListInfoable +type ListInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentTypesEnabled()(*bool) + GetHidden()(*bool) + GetOdataType()(*string) + GetTemplate()(*string) + SetContentTypesEnabled(value *bool)() + SetHidden(value *bool)() + SetOdataType(value *string)() + SetTemplate(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/list_item.go b/src/internal/connector/graph/betasdk/models/list_item.go new file mode 100644 index 000000000..fdbf69f98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItem +type ListItem struct { + BaseItem + // The list of recent activities that took place on this item. + activities []ItemActivityOLDable + // Analytics about the view activities that took place on this item. + analytics ItemAnalyticsable + // The content type of this list item + contentType ContentTypeInfoable + // The deleted property + deleted Deletedable + // Version information for a document set version created by a user. + documentSetVersions []DocumentSetVersionable + // For document libraries, the driveItem relationship exposes the listItem as a [driveItem][] + driveItem DriveItemable + // The values of the columns set on this list item. + fields FieldValueSetable + // Returns identifiers useful for SharePoint REST compatibility. Read-only. + sharepointIds SharepointIdsable + // The list of previous versions of the list item. + versions []ListItemVersionable +} +// NewListItem instantiates a new listItem and sets the default values. +func NewListItem()(*ListItem) { + m := &ListItem{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.listItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateListItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewListItem(), nil +} +// GetActivities gets the activities property value. The list of recent activities that took place on this item. +func (m *ListItem) GetActivities()([]ItemActivityOLDable) { + return m.activities +} +// GetAnalytics gets the analytics property value. Analytics about the view activities that took place on this item. +func (m *ListItem) GetAnalytics()(ItemAnalyticsable) { + return m.analytics +} +// GetContentType gets the contentType property value. The content type of this list item +func (m *ListItem) GetContentType()(ContentTypeInfoable) { + return m.contentType +} +// GetDeleted gets the deleted property value. The deleted property +func (m *ListItem) GetDeleted()(Deletedable) { + return m.deleted +} +// GetDocumentSetVersions gets the documentSetVersions property value. Version information for a document set version created by a user. +func (m *ListItem) GetDocumentSetVersions()([]DocumentSetVersionable) { + return m.documentSetVersions +} +// GetDriveItem gets the driveItem property value. For document libraries, the driveItem relationship exposes the listItem as a [driveItem][] +func (m *ListItem) GetDriveItem()(DriveItemable) { + return m.driveItem +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["activities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemActivityOLDFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemActivityOLDable, len(val)) + for i, v := range val { + res[i] = v.(ItemActivityOLDable) + } + m.SetActivities(res) + } + return nil + } + res["analytics"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemAnalyticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAnalytics(val.(ItemAnalyticsable)) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateContentTypeInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContentType(val.(ContentTypeInfoable)) + } + return nil + } + res["deleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeletedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeleted(val.(Deletedable)) + } + return nil + } + res["documentSetVersions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentSetVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentSetVersionable, len(val)) + for i, v := range val { + res[i] = v.(DocumentSetVersionable) + } + m.SetDocumentSetVersions(res) + } + return nil + } + res["driveItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDriveItem(val.(DriveItemable)) + } + return nil + } + res["fields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFieldValueSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFields(val.(FieldValueSetable)) + } + return nil + } + res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharepointIds(val.(SharepointIdsable)) + } + return nil + } + res["versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateListItemVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ListItemVersionable, len(val)) + for i, v := range val { + res[i] = v.(ListItemVersionable) + } + m.SetVersions(res) + } + return nil + } + return res +} +// GetFields gets the fields property value. The values of the columns set on this list item. +func (m *ListItem) GetFields()(FieldValueSetable) { + return m.fields +} +// GetSharepointIds gets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *ListItem) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetVersions gets the versions property value. The list of previous versions of the list item. +func (m *ListItem) GetVersions()([]ListItemVersionable) { + return m.versions +} +// Serialize serializes information the current object +func (m *ListItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + if m.GetActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActivities())) + for i, v := range m.GetActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("activities", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("analytics", m.GetAnalytics()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deleted", m.GetDeleted()) + if err != nil { + return err + } + } + if m.GetDocumentSetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDocumentSetVersions())) + for i, v := range m.GetDocumentSetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("documentSetVersions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("driveItem", m.GetDriveItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("fields", m.GetFields()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + if m.GetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVersions())) + for i, v := range m.GetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("versions", cast) + if err != nil { + return err + } + } + return nil +} +// SetActivities sets the activities property value. The list of recent activities that took place on this item. +func (m *ListItem) SetActivities(value []ItemActivityOLDable)() { + m.activities = value +} +// SetAnalytics sets the analytics property value. Analytics about the view activities that took place on this item. +func (m *ListItem) SetAnalytics(value ItemAnalyticsable)() { + m.analytics = value +} +// SetContentType sets the contentType property value. The content type of this list item +func (m *ListItem) SetContentType(value ContentTypeInfoable)() { + m.contentType = value +} +// SetDeleted sets the deleted property value. The deleted property +func (m *ListItem) SetDeleted(value Deletedable)() { + m.deleted = value +} +// SetDocumentSetVersions sets the documentSetVersions property value. Version information for a document set version created by a user. +func (m *ListItem) SetDocumentSetVersions(value []DocumentSetVersionable)() { + m.documentSetVersions = value +} +// SetDriveItem sets the driveItem property value. For document libraries, the driveItem relationship exposes the listItem as a [driveItem][] +func (m *ListItem) SetDriveItem(value DriveItemable)() { + m.driveItem = value +} +// SetFields sets the fields property value. The values of the columns set on this list item. +func (m *ListItem) SetFields(value FieldValueSetable)() { + m.fields = value +} +// SetSharepointIds sets the sharepointIds property value. Returns identifiers useful for SharePoint REST compatibility. Read-only. +func (m *ListItem) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetVersions sets the versions property value. The list of previous versions of the list item. +func (m *ListItem) SetVersions(value []ListItemVersionable)() { + m.versions = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_collection_response.go b/src/internal/connector/graph/betasdk/models/list_item_collection_response.go new file mode 100644 index 000000000..f1da2e0d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemCollectionResponse +type ListItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ListItemable +} +// NewListItemCollectionResponse instantiates a new ListItemCollectionResponse and sets the default values. +func NewListItemCollectionResponse()(*ListItemCollectionResponse) { + m := &ListItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateListItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewListItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ListItemable, len(val)) + for i, v := range val { + res[i] = v.(ListItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ListItemCollectionResponse) GetValue()([]ListItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ListItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ListItemCollectionResponse) SetValue(value []ListItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/list_item_collection_responseable.go new file mode 100644 index 000000000..f0090b514 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemCollectionResponseable +type ListItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ListItemable) + SetValue(value []ListItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_version.go b/src/internal/connector/graph/betasdk/models/list_item_version.go new file mode 100644 index 000000000..728a3a06d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_version.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemVersion +type ListItemVersion struct { + BaseItemVersion + // A collection of the fields and values for this version of the list item. + fields FieldValueSetable +} +// NewListItemVersion instantiates a new ListItemVersion and sets the default values. +func NewListItemVersion()(*ListItemVersion) { + m := &ListItemVersion{ + BaseItemVersion: *NewBaseItemVersion(), + } + odataTypeValue := "#microsoft.graph.listItemVersion"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateListItemVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListItemVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.documentSetVersion": + return NewDocumentSetVersion(), nil + } + } + } + } + return NewListItemVersion(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListItemVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItemVersion.GetFieldDeserializers() + res["fields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFieldValueSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFields(val.(FieldValueSetable)) + } + return nil + } + return res +} +// GetFields gets the fields property value. A collection of the fields and values for this version of the list item. +func (m *ListItemVersion) GetFields()(FieldValueSetable) { + return m.fields +} +// Serialize serializes information the current object +func (m *ListItemVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItemVersion.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("fields", m.GetFields()) + if err != nil { + return err + } + } + return nil +} +// SetFields sets the fields property value. A collection of the fields and values for this version of the list item. +func (m *ListItemVersion) SetFields(value FieldValueSetable)() { + m.fields = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_version_collection_response.go b/src/internal/connector/graph/betasdk/models/list_item_version_collection_response.go new file mode 100644 index 000000000..c3ac93472 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_version_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemVersionCollectionResponse +type ListItemVersionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ListItemVersionable +} +// NewListItemVersionCollectionResponse instantiates a new ListItemVersionCollectionResponse and sets the default values. +func NewListItemVersionCollectionResponse()(*ListItemVersionCollectionResponse) { + m := &ListItemVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateListItemVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateListItemVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewListItemVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ListItemVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateListItemVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ListItemVersionable, len(val)) + for i, v := range val { + res[i] = v.(ListItemVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ListItemVersionCollectionResponse) GetValue()([]ListItemVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ListItemVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ListItemVersionCollectionResponse) SetValue(value []ListItemVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/list_item_version_collection_responseable.go new file mode 100644 index 000000000..baeed97c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_version_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemVersionCollectionResponseable +type ListItemVersionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ListItemVersionable) + SetValue(value []ListItemVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/list_item_versionable.go b/src/internal/connector/graph/betasdk/models/list_item_versionable.go new file mode 100644 index 000000000..bb6e7a640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_item_versionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemVersionable +type ListItemVersionable interface { + BaseItemVersionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFields()(FieldValueSetable) + SetFields(value FieldValueSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/list_itemable.go b/src/internal/connector/graph/betasdk/models/list_itemable.go new file mode 100644 index 000000000..1db7aacdb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/list_itemable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ListItemable +type ListItemable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivities()([]ItemActivityOLDable) + GetAnalytics()(ItemAnalyticsable) + GetContentType()(ContentTypeInfoable) + GetDeleted()(Deletedable) + GetDocumentSetVersions()([]DocumentSetVersionable) + GetDriveItem()(DriveItemable) + GetFields()(FieldValueSetable) + GetSharepointIds()(SharepointIdsable) + GetVersions()([]ListItemVersionable) + SetActivities(value []ItemActivityOLDable)() + SetAnalytics(value ItemAnalyticsable)() + SetContentType(value ContentTypeInfoable)() + SetDeleted(value Deletedable)() + SetDocumentSetVersions(value []DocumentSetVersionable)() + SetDriveItem(value DriveItemable)() + SetFields(value FieldValueSetable)() + SetSharepointIds(value SharepointIdsable)() + SetVersions(value []ListItemVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/listable.go b/src/internal/connector/graph/betasdk/models/listable.go new file mode 100644 index 000000000..7aa979efb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/listable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Listable +type Listable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivities()([]ItemActivityOLDable) + GetColumns()([]ColumnDefinitionable) + GetContentTypes()([]ContentTypeable) + GetDisplayName()(*string) + GetDrive()(Driveable) + GetItems()([]ListItemable) + GetList()(ListInfoable) + GetOperations()([]RichLongRunningOperationable) + GetSharepointIds()(SharepointIdsable) + GetSubscriptions()([]Subscriptionable) + GetSystem()(SystemFacetable) + SetActivities(value []ItemActivityOLDable)() + SetColumns(value []ColumnDefinitionable)() + SetContentTypes(value []ContentTypeable)() + SetDisplayName(value *string)() + SetDrive(value Driveable)() + SetItems(value []ListItemable)() + SetList(value ListInfoable)() + SetOperations(value []RichLongRunningOperationable)() + SetSharepointIds(value SharepointIdsable)() + SetSubscriptions(value []Subscriptionable)() + SetSystem(value SystemFacetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/lobby_bypass_scope.go b/src/internal/connector/graph/betasdk/models/lobby_bypass_scope.go new file mode 100644 index 000000000..9e36c7583 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lobby_bypass_scope.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LobbyBypassScope int + +const ( + ORGANIZER_LOBBYBYPASSSCOPE LobbyBypassScope = iota + ORGANIZATION_LOBBYBYPASSSCOPE + ORGANIZATIONANDFEDERATED_LOBBYBYPASSSCOPE + EVERYONE_LOBBYBYPASSSCOPE + UNKNOWNFUTUREVALUE_LOBBYBYPASSSCOPE + INVITED_LOBBYBYPASSSCOPE + ORGANIZATIONEXCLUDINGGUESTS_LOBBYBYPASSSCOPE +) + +func (i LobbyBypassScope) String() string { + return []string{"organizer", "organization", "organizationAndFederated", "everyone", "unknownFutureValue", "invited", "organizationExcludingGuests"}[i] +} +func ParseLobbyBypassScope(v string) (interface{}, error) { + result := ORGANIZER_LOBBYBYPASSSCOPE + switch v { + case "organizer": + result = ORGANIZER_LOBBYBYPASSSCOPE + case "organization": + result = ORGANIZATION_LOBBYBYPASSSCOPE + case "organizationAndFederated": + result = ORGANIZATIONANDFEDERATED_LOBBYBYPASSSCOPE + case "everyone": + result = EVERYONE_LOBBYBYPASSSCOPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LOBBYBYPASSSCOPE + case "invited": + result = INVITED_LOBBYBYPASSSCOPE + case "organizationExcludingGuests": + result = ORGANIZATIONEXCLUDINGGUESTS_LOBBYBYPASSSCOPE + default: + return 0, errors.New("Unknown LobbyBypassScope value: " + v) + } + return &result, nil +} +func SerializeLobbyBypassScope(values []LobbyBypassScope) []string { + 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/lobby_bypass_settings.go b/src/internal/connector/graph/betasdk/models/lobby_bypass_settings.go new file mode 100644 index 000000000..040d9df3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lobby_bypass_settings.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LobbyBypassSettings +type LobbyBypassSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether or not to always let dial-in callers bypass the lobby. Optional. + isDialInBypassEnabled *bool + // The OdataType property + odataType *string + // Specifies the type of participants that are automatically admitted into a meeting, bypassing the lobby. Optional. + scope *LobbyBypassScope +} +// NewLobbyBypassSettings instantiates a new lobbyBypassSettings and sets the default values. +func NewLobbyBypassSettings()(*LobbyBypassSettings) { + m := &LobbyBypassSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLobbyBypassSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLobbyBypassSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLobbyBypassSettings(), 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 *LobbyBypassSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LobbyBypassSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isDialInBypassEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDialInBypassEnabled(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["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLobbyBypassScope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*LobbyBypassScope)) + } + return nil + } + return res +} +// GetIsDialInBypassEnabled gets the isDialInBypassEnabled property value. Specifies whether or not to always let dial-in callers bypass the lobby. Optional. +func (m *LobbyBypassSettings) GetIsDialInBypassEnabled()(*bool) { + return m.isDialInBypassEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LobbyBypassSettings) GetOdataType()(*string) { + return m.odataType +} +// GetScope gets the scope property value. Specifies the type of participants that are automatically admitted into a meeting, bypassing the lobby. Optional. +func (m *LobbyBypassSettings) GetScope()(*LobbyBypassScope) { + return m.scope +} +// Serialize serializes information the current object +func (m *LobbyBypassSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isDialInBypassEnabled", m.GetIsDialInBypassEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetScope() != nil { + cast := (*m.GetScope()).String() + err := writer.WriteStringValue("scope", &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 *LobbyBypassSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsDialInBypassEnabled sets the isDialInBypassEnabled property value. Specifies whether or not to always let dial-in callers bypass the lobby. Optional. +func (m *LobbyBypassSettings) SetIsDialInBypassEnabled(value *bool)() { + m.isDialInBypassEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LobbyBypassSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetScope sets the scope property value. Specifies the type of participants that are automatically admitted into a meeting, bypassing the lobby. Optional. +func (m *LobbyBypassSettings) SetScope(value *LobbyBypassScope)() { + m.scope = value +} diff --git a/src/internal/connector/graph/betasdk/models/lobby_bypass_settingsable.go b/src/internal/connector/graph/betasdk/models/lobby_bypass_settingsable.go new file mode 100644 index 000000000..7893a5598 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lobby_bypass_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LobbyBypassSettingsable +type LobbyBypassSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDialInBypassEnabled()(*bool) + GetOdataType()(*string) + GetScope()(*LobbyBypassScope) + SetIsDialInBypassEnabled(value *bool)() + SetOdataType(value *string)() + SetScope(value *LobbyBypassScope)() +} diff --git a/src/internal/connector/graph/betasdk/models/local_security_options_administrator_elevation_prompt_behavior_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_administrator_elevation_prompt_behavior_type.go new file mode 100644 index 000000000..294bf7450 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_administrator_elevation_prompt_behavior_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsAdministratorElevationPromptBehaviorType int + +const ( + // Not Configured + NOTCONFIGURED_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE LocalSecurityOptionsAdministratorElevationPromptBehaviorType = iota + // Elevate without prompting. + ELEVATEWITHOUTPROMPTING_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + // Prompt for credentials on the secure desktop + PROMPTFORCREDENTIALSONTHESECUREDESKTOP_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + // Prompt for consent on the secure desktop + PROMPTFORCONSENTONTHESECUREDESKTOP_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + // Prompt for credentials + PROMPTFORCREDENTIALS_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + // Prompt for consent + PROMPTFORCONSENT_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + // Prompt for consent for non-Windows binaries + PROMPTFORCONSENTFORNONWINDOWSBINARIES_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE +) + +func (i LocalSecurityOptionsAdministratorElevationPromptBehaviorType) String() string { + return []string{"notConfigured", "elevateWithoutPrompting", "promptForCredentialsOnTheSecureDesktop", "promptForConsentOnTheSecureDesktop", "promptForCredentials", "promptForConsent", "promptForConsentForNonWindowsBinaries"}[i] +} +func ParseLocalSecurityOptionsAdministratorElevationPromptBehaviorType(v string) (interface{}, error) { + result := NOTCONFIGURED_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "elevateWithoutPrompting": + result = ELEVATEWITHOUTPROMPTING_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "promptForCredentialsOnTheSecureDesktop": + result = PROMPTFORCREDENTIALSONTHESECUREDESKTOP_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "promptForConsentOnTheSecureDesktop": + result = PROMPTFORCONSENTONTHESECUREDESKTOP_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "promptForCredentials": + result = PROMPTFORCREDENTIALS_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "promptForConsent": + result = PROMPTFORCONSENT_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + case "promptForConsentForNonWindowsBinaries": + result = PROMPTFORCONSENTFORNONWINDOWSBINARIES_LOCALSECURITYOPTIONSADMINISTRATORELEVATIONPROMPTBEHAVIORTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsAdministratorElevationPromptBehaviorType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsAdministratorElevationPromptBehaviorType(values []LocalSecurityOptionsAdministratorElevationPromptBehaviorType) []string { + 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/local_security_options_format_and_eject_of_removable_media_allowed_user_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_format_and_eject_of_removable_media_allowed_user_type.go new file mode 100644 index 000000000..e121a4e6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_format_and_eject_of_removable_media_allowed_user_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType int + +const ( + // Not Configured + NOTCONFIGURED_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE LocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType = iota + // Administrators + ADMINISTRATORS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + // Administrators and Power Users + ADMINISTRATORSANDPOWERUSERS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + // Administrators and Interactive Users + ADMINISTRATORSANDINTERACTIVEUSERS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE +) + +func (i LocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType) String() string { + return []string{"notConfigured", "administrators", "administratorsAndPowerUsers", "administratorsAndInteractiveUsers"}[i] +} +func ParseLocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType(v string) (interface{}, error) { + result := NOTCONFIGURED_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + case "administrators": + result = ADMINISTRATORS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + case "administratorsAndPowerUsers": + result = ADMINISTRATORSANDPOWERUSERS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + case "administratorsAndInteractiveUsers": + result = ADMINISTRATORSANDINTERACTIVEUSERS_LOCALSECURITYOPTIONSFORMATANDEJECTOFREMOVABLEMEDIAALLOWEDUSERTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType(values []LocalSecurityOptionsFormatAndEjectOfRemovableMediaAllowedUserType) []string { + 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/local_security_options_information_displayed_on_lock_screen_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_information_displayed_on_lock_screen_type.go new file mode 100644 index 000000000..55c93c615 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_information_displayed_on_lock_screen_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsInformationDisplayedOnLockScreenType int + +const ( + // Not Configured + NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE LocalSecurityOptionsInformationDisplayedOnLockScreenType = iota + // User display name, domain and user names + ADMINISTRATORS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + // User display name only + ADMINISTRATORSANDPOWERUSERS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + // Do not display user information + ADMINISTRATORSANDINTERACTIVEUSERS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE +) + +func (i LocalSecurityOptionsInformationDisplayedOnLockScreenType) String() string { + return []string{"notConfigured", "administrators", "administratorsAndPowerUsers", "administratorsAndInteractiveUsers"}[i] +} +func ParseLocalSecurityOptionsInformationDisplayedOnLockScreenType(v string) (interface{}, error) { + result := NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + case "administrators": + result = ADMINISTRATORS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + case "administratorsAndPowerUsers": + result = ADMINISTRATORSANDPOWERUSERS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + case "administratorsAndInteractiveUsers": + result = ADMINISTRATORSANDINTERACTIVEUSERS_LOCALSECURITYOPTIONSINFORMATIONDISPLAYEDONLOCKSCREENTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsInformationDisplayedOnLockScreenType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsInformationDisplayedOnLockScreenType(values []LocalSecurityOptionsInformationDisplayedOnLockScreenType) []string { + 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/local_security_options_information_shown_on_lock_screen_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_information_shown_on_lock_screen_type.go new file mode 100644 index 000000000..edc474442 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_information_shown_on_lock_screen_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsInformationShownOnLockScreenType int + +const ( + // Not Configured + NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE LocalSecurityOptionsInformationShownOnLockScreenType = iota + // User display name, domain and user names + USERDISPLAYNAMEDOMAINUSER_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + // User display name only + USERDISPLAYNAMEONLY_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + // Do not display user information + DONOTDISPLAYUSER_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE +) + +func (i LocalSecurityOptionsInformationShownOnLockScreenType) String() string { + return []string{"notConfigured", "userDisplayNameDomainUser", "userDisplayNameOnly", "doNotDisplayUser"}[i] +} +func ParseLocalSecurityOptionsInformationShownOnLockScreenType(v string) (interface{}, error) { + result := NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + case "userDisplayNameDomainUser": + result = USERDISPLAYNAMEDOMAINUSER_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + case "userDisplayNameOnly": + result = USERDISPLAYNAMEONLY_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + case "doNotDisplayUser": + result = DONOTDISPLAYUSER_LOCALSECURITYOPTIONSINFORMATIONSHOWNONLOCKSCREENTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsInformationShownOnLockScreenType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsInformationShownOnLockScreenType(values []LocalSecurityOptionsInformationShownOnLockScreenType) []string { + 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/local_security_options_minimum_session_security.go b/src/internal/connector/graph/betasdk/models/local_security_options_minimum_session_security.go new file mode 100644 index 000000000..10e746063 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_minimum_session_security.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsMinimumSessionSecurity int + +const ( + // Send LM & NTLM responses + NONE_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY LocalSecurityOptionsMinimumSessionSecurity = iota + // Send LM & NTLM-use NTLMv2 session security if negotiated + REQUIRENTMLV2SESSIONSECURITY_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + // Send LM & NTLM responses only + REQUIRE128BITENCRYPTION_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + // Send LM & NTLMv2 responses only + NTLMV2AND128BITENCRYPTION_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY +) + +func (i LocalSecurityOptionsMinimumSessionSecurity) String() string { + return []string{"none", "requireNtmlV2SessionSecurity", "require128BitEncryption", "ntlmV2And128BitEncryption"}[i] +} +func ParseLocalSecurityOptionsMinimumSessionSecurity(v string) (interface{}, error) { + result := NONE_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + switch v { + case "none": + result = NONE_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + case "requireNtmlV2SessionSecurity": + result = REQUIRENTMLV2SESSIONSECURITY_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + case "require128BitEncryption": + result = REQUIRE128BITENCRYPTION_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + case "ntlmV2And128BitEncryption": + result = NTLMV2AND128BITENCRYPTION_LOCALSECURITYOPTIONSMINIMUMSESSIONSECURITY + default: + return 0, errors.New("Unknown LocalSecurityOptionsMinimumSessionSecurity value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsMinimumSessionSecurity(values []LocalSecurityOptionsMinimumSessionSecurity) []string { + 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/local_security_options_smart_card_removal_behavior_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_smart_card_removal_behavior_type.go new file mode 100644 index 000000000..3a027868d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_smart_card_removal_behavior_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsSmartCardRemovalBehaviorType int + +const ( + // No Action + NOACTION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE LocalSecurityOptionsSmartCardRemovalBehaviorType = iota + // Lock Workstation + LOCKWORKSTATION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + // Force Logoff + FORCELOGOFF_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + // Disconnect if a remote Remote Desktop Services session + DISCONNECTREMOTEDESKTOPSESSION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE +) + +func (i LocalSecurityOptionsSmartCardRemovalBehaviorType) String() string { + return []string{"noAction", "lockWorkstation", "forceLogoff", "disconnectRemoteDesktopSession"}[i] +} +func ParseLocalSecurityOptionsSmartCardRemovalBehaviorType(v string) (interface{}, error) { + result := NOACTION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + switch v { + case "noAction": + result = NOACTION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + case "lockWorkstation": + result = LOCKWORKSTATION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + case "forceLogoff": + result = FORCELOGOFF_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + case "disconnectRemoteDesktopSession": + result = DISCONNECTREMOTEDESKTOPSESSION_LOCALSECURITYOPTIONSSMARTCARDREMOVALBEHAVIORTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsSmartCardRemovalBehaviorType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsSmartCardRemovalBehaviorType(values []LocalSecurityOptionsSmartCardRemovalBehaviorType) []string { + 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/local_security_options_standard_user_elevation_prompt_behavior_type.go b/src/internal/connector/graph/betasdk/models/local_security_options_standard_user_elevation_prompt_behavior_type.go new file mode 100644 index 000000000..663c73030 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/local_security_options_standard_user_elevation_prompt_behavior_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocalSecurityOptionsStandardUserElevationPromptBehaviorType int + +const ( + // Not Configured + NOTCONFIGURED_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE LocalSecurityOptionsStandardUserElevationPromptBehaviorType = iota + // Automatically deny elevation requests + AUTOMATICALLYDENYELEVATIONREQUESTS_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + // Prompt for credentials on the secure desktop + PROMPTFORCREDENTIALSONTHESECUREDESKTOP_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + // Prompt for credentials + PROMPTFORCREDENTIALS_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE +) + +func (i LocalSecurityOptionsStandardUserElevationPromptBehaviorType) String() string { + return []string{"notConfigured", "automaticallyDenyElevationRequests", "promptForCredentialsOnTheSecureDesktop", "promptForCredentials"}[i] +} +func ParseLocalSecurityOptionsStandardUserElevationPromptBehaviorType(v string) (interface{}, error) { + result := NOTCONFIGURED_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + case "automaticallyDenyElevationRequests": + result = AUTOMATICALLYDENYELEVATIONREQUESTS_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + case "promptForCredentialsOnTheSecureDesktop": + result = PROMPTFORCREDENTIALSONTHESECUREDESKTOP_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + case "promptForCredentials": + result = PROMPTFORCREDENTIALS_LOCALSECURITYOPTIONSSTANDARDUSERELEVATIONPROMPTBEHAVIORTYPE + default: + return 0, errors.New("Unknown LocalSecurityOptionsStandardUserElevationPromptBehaviorType value: " + v) + } + return &result, nil +} +func SerializeLocalSecurityOptionsStandardUserElevationPromptBehaviorType(values []LocalSecurityOptionsStandardUserElevationPromptBehaviorType) []string { + 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/locale_info.go b/src/internal/connector/graph/betasdk/models/locale_info.go new file mode 100644 index 000000000..19271ba3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locale_info.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocaleInfo +type LocaleInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A name representing the user's locale in natural language, for example, 'English (United States)'. + displayName *string + // A locale representation for the user, which includes the user's preferred language and country/region. For example, 'en-us'. The language component follows 2-letter codes as defined in ISO 639-1, and the country component follows 2-letter codes as defined in ISO 3166-1 alpha-2. + locale *string + // The OdataType property + odataType *string +} +// NewLocaleInfo instantiates a new localeInfo and sets the default values. +func NewLocaleInfo()(*LocaleInfo) { + m := &LocaleInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLocaleInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocaleInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocaleInfo(), 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 *LocaleInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. A name representing the user's locale in natural language, for example, 'English (United States)'. +func (m *LocaleInfo) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocaleInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(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 + } + return res +} +// GetLocale gets the locale property value. A locale representation for the user, which includes the user's preferred language and country/region. For example, 'en-us'. The language component follows 2-letter codes as defined in ISO 639-1, and the country component follows 2-letter codes as defined in ISO 3166-1 alpha-2. +func (m *LocaleInfo) GetLocale()(*string) { + return m.locale +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LocaleInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LocaleInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LocaleInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. A name representing the user's locale in natural language, for example, 'English (United States)'. +func (m *LocaleInfo) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLocale sets the locale property value. A locale representation for the user, which includes the user's preferred language and country/region. For example, 'en-us'. The language component follows 2-letter codes as defined in ISO 639-1, and the country component follows 2-letter codes as defined in ISO 3166-1 alpha-2. +func (m *LocaleInfo) SetLocale(value *string)() { + m.locale = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LocaleInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/locale_info_collection_response.go b/src/internal/connector/graph/betasdk/models/locale_info_collection_response.go new file mode 100644 index 000000000..fe7a895cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locale_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocaleInfoCollectionResponse +type LocaleInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LocaleInfoable +} +// NewLocaleInfoCollectionResponse instantiates a new LocaleInfoCollectionResponse and sets the default values. +func NewLocaleInfoCollectionResponse()(*LocaleInfoCollectionResponse) { + m := &LocaleInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocaleInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocaleInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocaleInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocaleInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocaleInfoable, len(val)) + for i, v := range val { + res[i] = v.(LocaleInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocaleInfoCollectionResponse) GetValue()([]LocaleInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocaleInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocaleInfoCollectionResponse) SetValue(value []LocaleInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/locale_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/locale_info_collection_responseable.go new file mode 100644 index 000000000..2aa44abb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locale_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocaleInfoCollectionResponseable +type LocaleInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocaleInfoable) + SetValue(value []LocaleInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/locale_infoable.go b/src/internal/connector/graph/betasdk/models/locale_infoable.go new file mode 100644 index 000000000..caa4d1bb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locale_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocaleInfoable +type LocaleInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLocale()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetLocale(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/localized_notification_message.go b/src/internal/connector/graph/betasdk/models/localized_notification_message.go new file mode 100644 index 000000000..778bb7f68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/localized_notification_message.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedNotificationMessage the text content of a Notification Message Template for the specified locale. +type LocalizedNotificationMessage struct { + Entity + // Flag to indicate whether or not this is the default locale for language fallback. This flag can only be set. To unset, set this property to true on another Localized Notification Message. + isDefault *bool + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Locale for which this message is destined. + locale *string + // The Message Template content. + messageTemplate *string + // The Message Template Subject. + subject *string +} +// NewLocalizedNotificationMessage instantiates a new localizedNotificationMessage and sets the default values. +func NewLocalizedNotificationMessage()(*LocalizedNotificationMessage) { + m := &LocalizedNotificationMessage{ + Entity: *NewEntity(), + } + return m +} +// CreateLocalizedNotificationMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedNotificationMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedNotificationMessage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedNotificationMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["locale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocale(val) + } + return nil + } + res["messageTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageTemplate(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Flag to indicate whether or not this is the default locale for language fallback. This flag can only be set. To unset, set this property to true on another Localized Notification Message. +func (m *LocalizedNotificationMessage) GetIsDefault()(*bool) { + return m.isDefault +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *LocalizedNotificationMessage) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLocale gets the locale property value. The Locale for which this message is destined. +func (m *LocalizedNotificationMessage) GetLocale()(*string) { + return m.locale +} +// GetMessageTemplate gets the messageTemplate property value. The Message Template content. +func (m *LocalizedNotificationMessage) GetMessageTemplate()(*string) { + return m.messageTemplate +} +// GetSubject gets the subject property value. The Message Template Subject. +func (m *LocalizedNotificationMessage) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *LocalizedNotificationMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("locale", m.GetLocale()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("messageTemplate", m.GetMessageTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetIsDefault sets the isDefault property value. Flag to indicate whether or not this is the default locale for language fallback. This flag can only be set. To unset, set this property to true on another Localized Notification Message. +func (m *LocalizedNotificationMessage) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *LocalizedNotificationMessage) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLocale sets the locale property value. The Locale for which this message is destined. +func (m *LocalizedNotificationMessage) SetLocale(value *string)() { + m.locale = value +} +// SetMessageTemplate sets the messageTemplate property value. The Message Template content. +func (m *LocalizedNotificationMessage) SetMessageTemplate(value *string)() { + m.messageTemplate = value +} +// SetSubject sets the subject property value. The Message Template Subject. +func (m *LocalizedNotificationMessage) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_response.go b/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_response.go new file mode 100644 index 000000000..5422dc113 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedNotificationMessageCollectionResponse +type LocalizedNotificationMessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LocalizedNotificationMessageable +} +// NewLocalizedNotificationMessageCollectionResponse instantiates a new LocalizedNotificationMessageCollectionResponse and sets the default values. +func NewLocalizedNotificationMessageCollectionResponse()(*LocalizedNotificationMessageCollectionResponse) { + m := &LocalizedNotificationMessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocalizedNotificationMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocalizedNotificationMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocalizedNotificationMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocalizedNotificationMessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedNotificationMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedNotificationMessageable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedNotificationMessageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocalizedNotificationMessageCollectionResponse) GetValue()([]LocalizedNotificationMessageable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocalizedNotificationMessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocalizedNotificationMessageCollectionResponse) SetValue(value []LocalizedNotificationMessageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_responseable.go new file mode 100644 index 000000000..43d5ff625 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/localized_notification_message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedNotificationMessageCollectionResponseable +type LocalizedNotificationMessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocalizedNotificationMessageable) + SetValue(value []LocalizedNotificationMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/localized_notification_messageable.go b/src/internal/connector/graph/betasdk/models/localized_notification_messageable.go new file mode 100644 index 000000000..42c5b7c37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/localized_notification_messageable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocalizedNotificationMessageable +type LocalizedNotificationMessageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDefault()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocale()(*string) + GetMessageTemplate()(*string) + GetSubject()(*string) + SetIsDefault(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocale(value *string)() + SetMessageTemplate(value *string)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/locate_device_action_result.go b/src/internal/connector/graph/betasdk/models/locate_device_action_result.go new file mode 100644 index 000000000..4a1961243 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locate_device_action_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocateDeviceActionResult +type LocateDeviceActionResult struct { + DeviceActionResult + // device location + deviceLocation DeviceGeoLocationable +} +// NewLocateDeviceActionResult instantiates a new LocateDeviceActionResult and sets the default values. +func NewLocateDeviceActionResult()(*LocateDeviceActionResult) { + m := &LocateDeviceActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateLocateDeviceActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocateDeviceActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocateDeviceActionResult(), nil +} +// GetDeviceLocation gets the deviceLocation property value. device location +func (m *LocateDeviceActionResult) GetDeviceLocation()(DeviceGeoLocationable) { + return m.deviceLocation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocateDeviceActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["deviceLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceGeoLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceLocation(val.(DeviceGeoLocationable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *LocateDeviceActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("deviceLocation", m.GetDeviceLocation()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceLocation sets the deviceLocation property value. device location +func (m *LocateDeviceActionResult) SetDeviceLocation(value DeviceGeoLocationable)() { + m.deviceLocation = value +} diff --git a/src/internal/connector/graph/betasdk/models/locate_device_action_resultable.go b/src/internal/connector/graph/betasdk/models/locate_device_action_resultable.go new file mode 100644 index 000000000..49ce3ed0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locate_device_action_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocateDeviceActionResultable +type LocateDeviceActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceLocation()(DeviceGeoLocationable) + SetDeviceLocation(value DeviceGeoLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/location.go b/src/internal/connector/graph/betasdk/models/location.go new file mode 100644 index 000000000..a104dc46c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location.go @@ -0,0 +1,299 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Location +type Location 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 street address of the location. + address PhysicalAddressable + // The geographic coordinates and elevation of the location. + coordinates OutlookGeoCoordinatesable + // The name associated with the location. + displayName *string + // Optional email address of the location. + locationEmailAddress *string + // The type of location. Possible values are: default, conferenceRoom, homeAddress, businessAddress,geoCoordinates, streetAddress, hotel, restaurant, localBusiness, postalAddress. Read-only. + locationType *LocationType + // Optional URI representing the location. + locationUri *string + // The OdataType property + odataType *string + // For internal use only. + uniqueId *string + // For internal use only. + uniqueIdType *LocationUniqueIdType +} +// NewLocation instantiates a new location and sets the default values. +func NewLocation()(*Location) { + m := &Location{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.locationConstraintItem": + return NewLocationConstraintItem(), nil + } + } + } + } + return NewLocation(), 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 *Location) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddress gets the address property value. The street address of the location. +func (m *Location) GetAddress()(PhysicalAddressable) { + return m.address +} +// GetCoordinates gets the coordinates property value. The geographic coordinates and elevation of the location. +func (m *Location) GetCoordinates()(OutlookGeoCoordinatesable) { + return m.coordinates +} +// GetDisplayName gets the displayName property value. The name associated with the location. +func (m *Location) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Location) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PhysicalAddressable)) + } + return nil + } + res["coordinates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOutlookGeoCoordinatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCoordinates(val.(OutlookGeoCoordinatesable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["locationEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationEmailAddress(val) + } + return nil + } + res["locationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLocationType) + if err != nil { + return err + } + if val != nil { + m.SetLocationType(val.(*LocationType)) + } + return nil + } + res["locationUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocationUri(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["uniqueId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUniqueId(val) + } + return nil + } + res["uniqueIdType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLocationUniqueIdType) + if err != nil { + return err + } + if val != nil { + m.SetUniqueIdType(val.(*LocationUniqueIdType)) + } + return nil + } + return res +} +// GetLocationEmailAddress gets the locationEmailAddress property value. Optional email address of the location. +func (m *Location) GetLocationEmailAddress()(*string) { + return m.locationEmailAddress +} +// GetLocationType gets the locationType property value. The type of location. Possible values are: default, conferenceRoom, homeAddress, businessAddress,geoCoordinates, streetAddress, hotel, restaurant, localBusiness, postalAddress. Read-only. +func (m *Location) GetLocationType()(*LocationType) { + return m.locationType +} +// GetLocationUri gets the locationUri property value. Optional URI representing the location. +func (m *Location) GetLocationUri()(*string) { + return m.locationUri +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Location) GetOdataType()(*string) { + return m.odataType +} +// GetUniqueId gets the uniqueId property value. For internal use only. +func (m *Location) GetUniqueId()(*string) { + return m.uniqueId +} +// GetUniqueIdType gets the uniqueIdType property value. For internal use only. +func (m *Location) GetUniqueIdType()(*LocationUniqueIdType) { + return m.uniqueIdType +} +// Serialize serializes information the current object +func (m *Location) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("coordinates", m.GetCoordinates()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("locationEmailAddress", m.GetLocationEmailAddress()) + if err != nil { + return err + } + } + if m.GetLocationType() != nil { + cast := (*m.GetLocationType()).String() + err := writer.WriteStringValue("locationType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("locationUri", m.GetLocationUri()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("uniqueId", m.GetUniqueId()) + if err != nil { + return err + } + } + if m.GetUniqueIdType() != nil { + cast := (*m.GetUniqueIdType()).String() + err := writer.WriteStringValue("uniqueIdType", &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 *Location) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddress sets the address property value. The street address of the location. +func (m *Location) SetAddress(value PhysicalAddressable)() { + m.address = value +} +// SetCoordinates sets the coordinates property value. The geographic coordinates and elevation of the location. +func (m *Location) SetCoordinates(value OutlookGeoCoordinatesable)() { + m.coordinates = value +} +// SetDisplayName sets the displayName property value. The name associated with the location. +func (m *Location) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLocationEmailAddress sets the locationEmailAddress property value. Optional email address of the location. +func (m *Location) SetLocationEmailAddress(value *string)() { + m.locationEmailAddress = value +} +// SetLocationType sets the locationType property value. The type of location. Possible values are: default, conferenceRoom, homeAddress, businessAddress,geoCoordinates, streetAddress, hotel, restaurant, localBusiness, postalAddress. Read-only. +func (m *Location) SetLocationType(value *LocationType)() { + m.locationType = value +} +// SetLocationUri sets the locationUri property value. Optional URI representing the location. +func (m *Location) SetLocationUri(value *string)() { + m.locationUri = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Location) SetOdataType(value *string)() { + m.odataType = value +} +// SetUniqueId sets the uniqueId property value. For internal use only. +func (m *Location) SetUniqueId(value *string)() { + m.uniqueId = value +} +// SetUniqueIdType sets the uniqueIdType property value. For internal use only. +func (m *Location) SetUniqueIdType(value *LocationUniqueIdType)() { + m.uniqueIdType = value +} diff --git a/src/internal/connector/graph/betasdk/models/location_collection_response.go b/src/internal/connector/graph/betasdk/models/location_collection_response.go new file mode 100644 index 000000000..24aa33f35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationCollectionResponse +type LocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Locationable +} +// NewLocationCollectionResponse instantiates a new LocationCollectionResponse and sets the default values. +func NewLocationCollectionResponse()(*LocationCollectionResponse) { + m := &LocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Locationable, len(val)) + for i, v := range val { + res[i] = v.(Locationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocationCollectionResponse) GetValue()([]Locationable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocationCollectionResponse) SetValue(value []Locationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/location_collection_responseable.go new file mode 100644 index 000000000..ddd428390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationCollectionResponseable +type LocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Locationable) + SetValue(value []Locationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/location_constraint_item.go b/src/internal/connector/graph/betasdk/models/location_constraint_item.go new file mode 100644 index 000000000..e64f0a1ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_constraint_item.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationConstraintItem +type LocationConstraintItem struct { + Location + // If set to true and the specified resource is busy, findMeetingTimes looks for another resource that is free. If set to false and the specified resource is busy, findMeetingTimes returns the resource best ranked in the user's cache without checking if it's free. Default is true. + resolveAvailability *bool +} +// NewLocationConstraintItem instantiates a new LocationConstraintItem and sets the default values. +func NewLocationConstraintItem()(*LocationConstraintItem) { + m := &LocationConstraintItem{ + Location: *NewLocation(), + } + odataTypeValue := "#microsoft.graph.locationConstraintItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateLocationConstraintItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocationConstraintItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocationConstraintItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocationConstraintItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Location.GetFieldDeserializers() + res["resolveAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetResolveAvailability(val) + } + return nil + } + return res +} +// GetResolveAvailability gets the resolveAvailability property value. If set to true and the specified resource is busy, findMeetingTimes looks for another resource that is free. If set to false and the specified resource is busy, findMeetingTimes returns the resource best ranked in the user's cache without checking if it's free. Default is true. +func (m *LocationConstraintItem) GetResolveAvailability()(*bool) { + return m.resolveAvailability +} +// Serialize serializes information the current object +func (m *LocationConstraintItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Location.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("resolveAvailability", m.GetResolveAvailability()) + if err != nil { + return err + } + } + return nil +} +// SetResolveAvailability sets the resolveAvailability property value. If set to true and the specified resource is busy, findMeetingTimes looks for another resource that is free. If set to false and the specified resource is busy, findMeetingTimes returns the resource best ranked in the user's cache without checking if it's free. Default is true. +func (m *LocationConstraintItem) SetResolveAvailability(value *bool)() { + m.resolveAvailability = value +} diff --git a/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_response.go b/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_response.go new file mode 100644 index 000000000..4ed272783 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationConstraintItemCollectionResponse +type LocationConstraintItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LocationConstraintItemable +} +// NewLocationConstraintItemCollectionResponse instantiates a new LocationConstraintItemCollectionResponse and sets the default values. +func NewLocationConstraintItemCollectionResponse()(*LocationConstraintItemCollectionResponse) { + m := &LocationConstraintItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLocationConstraintItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLocationConstraintItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLocationConstraintItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LocationConstraintItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocationConstraintItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocationConstraintItemable, len(val)) + for i, v := range val { + res[i] = v.(LocationConstraintItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LocationConstraintItemCollectionResponse) GetValue()([]LocationConstraintItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *LocationConstraintItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LocationConstraintItemCollectionResponse) SetValue(value []LocationConstraintItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_responseable.go new file mode 100644 index 000000000..fc294b03c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_constraint_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationConstraintItemCollectionResponseable +type LocationConstraintItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LocationConstraintItemable) + SetValue(value []LocationConstraintItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/location_constraint_itemable.go b/src/internal/connector/graph/betasdk/models/location_constraint_itemable.go new file mode 100644 index 000000000..60bf1ae03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_constraint_itemable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LocationConstraintItemable +type LocationConstraintItemable interface { + Locationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResolveAvailability()(*bool) + SetResolveAvailability(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/location_type.go b/src/internal/connector/graph/betasdk/models/location_type.go new file mode 100644 index 000000000..3b9473e16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_type.go @@ -0,0 +1,58 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocationType int + +const ( + DEFAULT_ESCAPED_LOCATIONTYPE LocationType = iota + CONFERENCEROOM_LOCATIONTYPE + HOMEADDRESS_LOCATIONTYPE + BUSINESSADDRESS_LOCATIONTYPE + GEOCOORDINATES_LOCATIONTYPE + STREETADDRESS_LOCATIONTYPE + HOTEL_LOCATIONTYPE + RESTAURANT_LOCATIONTYPE + LOCALBUSINESS_LOCATIONTYPE + POSTALADDRESS_LOCATIONTYPE +) + +func (i LocationType) String() string { + return []string{"default", "conferenceRoom", "homeAddress", "businessAddress", "geoCoordinates", "streetAddress", "hotel", "restaurant", "localBusiness", "postalAddress"}[i] +} +func ParseLocationType(v string) (interface{}, error) { + result := DEFAULT_ESCAPED_LOCATIONTYPE + switch v { + case "default": + result = DEFAULT_ESCAPED_LOCATIONTYPE + case "conferenceRoom": + result = CONFERENCEROOM_LOCATIONTYPE + case "homeAddress": + result = HOMEADDRESS_LOCATIONTYPE + case "businessAddress": + result = BUSINESSADDRESS_LOCATIONTYPE + case "geoCoordinates": + result = GEOCOORDINATES_LOCATIONTYPE + case "streetAddress": + result = STREETADDRESS_LOCATIONTYPE + case "hotel": + result = HOTEL_LOCATIONTYPE + case "restaurant": + result = RESTAURANT_LOCATIONTYPE + case "localBusiness": + result = LOCALBUSINESS_LOCATIONTYPE + case "postalAddress": + result = POSTALADDRESS_LOCATIONTYPE + default: + return 0, errors.New("Unknown LocationType value: " + v) + } + return &result, nil +} +func SerializeLocationType(values []LocationType) []string { + 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/location_unique_id_type.go b/src/internal/connector/graph/betasdk/models/location_unique_id_type.go new file mode 100644 index 000000000..c2f8016de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/location_unique_id_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LocationUniqueIdType int + +const ( + UNKNOWN_LOCATIONUNIQUEIDTYPE LocationUniqueIdType = iota + LOCATIONSTORE_LOCATIONUNIQUEIDTYPE + DIRECTORY_LOCATIONUNIQUEIDTYPE + PRIVATE_LOCATIONUNIQUEIDTYPE + BING_LOCATIONUNIQUEIDTYPE +) + +func (i LocationUniqueIdType) String() string { + return []string{"unknown", "locationStore", "directory", "private", "bing"}[i] +} +func ParseLocationUniqueIdType(v string) (interface{}, error) { + result := UNKNOWN_LOCATIONUNIQUEIDTYPE + switch v { + case "unknown": + result = UNKNOWN_LOCATIONUNIQUEIDTYPE + case "locationStore": + result = LOCATIONSTORE_LOCATIONUNIQUEIDTYPE + case "directory": + result = DIRECTORY_LOCATIONUNIQUEIDTYPE + case "private": + result = PRIVATE_LOCATIONUNIQUEIDTYPE + case "bing": + result = BING_LOCATIONUNIQUEIDTYPE + default: + return 0, errors.New("Unknown LocationUniqueIdType value: " + v) + } + return &result, nil +} +func SerializeLocationUniqueIdType(values []LocationUniqueIdType) []string { + 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/locationable.go b/src/internal/connector/graph/betasdk/models/locationable.go new file mode 100644 index 000000000..a1e107396 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/locationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Locationable +type Locationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PhysicalAddressable) + GetCoordinates()(OutlookGeoCoordinatesable) + GetDisplayName()(*string) + GetLocationEmailAddress()(*string) + GetLocationType()(*LocationType) + GetLocationUri()(*string) + GetOdataType()(*string) + GetUniqueId()(*string) + GetUniqueIdType()(*LocationUniqueIdType) + SetAddress(value PhysicalAddressable)() + SetCoordinates(value OutlookGeoCoordinatesable)() + SetDisplayName(value *string)() + SetLocationEmailAddress(value *string)() + SetLocationType(value *LocationType)() + SetLocationUri(value *string)() + SetOdataType(value *string)() + SetUniqueId(value *string)() + SetUniqueIdType(value *LocationUniqueIdType)() +} diff --git a/src/internal/connector/graph/betasdk/models/logged_on_user.go b/src/internal/connector/graph/betasdk/models/logged_on_user.go new file mode 100644 index 000000000..c77391b31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logged_on_user.go @@ -0,0 +1,124 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUser logged On User +type LoggedOnUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Date time when user logs on + lastLogOnDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // User id + userId *string +} +// NewLoggedOnUser instantiates a new loggedOnUser and sets the default values. +func NewLoggedOnUser()(*LoggedOnUser) { + m := &LoggedOnUser{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLoggedOnUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoggedOnUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoggedOnUser(), 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 *LoggedOnUser) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoggedOnUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastLogOnDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastLogOnDateTime(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["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetLastLogOnDateTime gets the lastLogOnDateTime property value. Date time when user logs on +func (m *LoggedOnUser) GetLastLogOnDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastLogOnDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LoggedOnUser) GetOdataType()(*string) { + return m.odataType +} +// GetUserId gets the userId property value. User id +func (m *LoggedOnUser) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *LoggedOnUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastLogOnDateTime", m.GetLastLogOnDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + 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 *LoggedOnUser) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastLogOnDateTime sets the lastLogOnDateTime property value. Date time when user logs on +func (m *LoggedOnUser) SetLastLogOnDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastLogOnDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LoggedOnUser) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserId sets the userId property value. User id +func (m *LoggedOnUser) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/logged_on_user_collection_response.go b/src/internal/connector/graph/betasdk/models/logged_on_user_collection_response.go new file mode 100644 index 000000000..a75bd12be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logged_on_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUserCollectionResponse +type LoggedOnUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LoggedOnUserable +} +// NewLoggedOnUserCollectionResponse instantiates a new LoggedOnUserCollectionResponse and sets the default values. +func NewLoggedOnUserCollectionResponse()(*LoggedOnUserCollectionResponse) { + m := &LoggedOnUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLoggedOnUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoggedOnUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoggedOnUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoggedOnUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLoggedOnUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LoggedOnUserable, len(val)) + for i, v := range val { + res[i] = v.(LoggedOnUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LoggedOnUserCollectionResponse) GetValue()([]LoggedOnUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *LoggedOnUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LoggedOnUserCollectionResponse) SetValue(value []LoggedOnUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/logged_on_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/logged_on_user_collection_responseable.go new file mode 100644 index 000000000..5082cf2c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logged_on_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUserCollectionResponseable +type LoggedOnUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LoggedOnUserable) + SetValue(value []LoggedOnUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/logged_on_userable.go b/src/internal/connector/graph/betasdk/models/logged_on_userable.go new file mode 100644 index 000000000..7bf356e1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logged_on_userable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUserable +type LoggedOnUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastLogOnDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetUserId()(*string) + SetLastLogOnDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configuration.go b/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configuration.go new file mode 100644 index 000000000..93822bdb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogicAppTriggerEndpointConfiguration +type LogicAppTriggerEndpointConfiguration struct { + CustomExtensionEndpointConfiguration + // The name of the logic app. + logicAppWorkflowName *string + // The Azure resource group name for the logic app. + resourceGroupName *string + // Identifier of the Azure subscription for the logic app. + subscriptionId *string +} +// NewLogicAppTriggerEndpointConfiguration instantiates a new LogicAppTriggerEndpointConfiguration and sets the default values. +func NewLogicAppTriggerEndpointConfiguration()(*LogicAppTriggerEndpointConfiguration) { + m := &LogicAppTriggerEndpointConfiguration{ + CustomExtensionEndpointConfiguration: *NewCustomExtensionEndpointConfiguration(), + } + odataTypeValue := "#microsoft.graph.logicAppTriggerEndpointConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateLogicAppTriggerEndpointConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLogicAppTriggerEndpointConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLogicAppTriggerEndpointConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LogicAppTriggerEndpointConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomExtensionEndpointConfiguration.GetFieldDeserializers() + res["logicAppWorkflowName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogicAppWorkflowName(val) + } + return nil + } + res["resourceGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceGroupName(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + return res +} +// GetLogicAppWorkflowName gets the logicAppWorkflowName property value. The name of the logic app. +func (m *LogicAppTriggerEndpointConfiguration) GetLogicAppWorkflowName()(*string) { + return m.logicAppWorkflowName +} +// GetResourceGroupName gets the resourceGroupName property value. The Azure resource group name for the logic app. +func (m *LogicAppTriggerEndpointConfiguration) GetResourceGroupName()(*string) { + return m.resourceGroupName +} +// GetSubscriptionId gets the subscriptionId property value. Identifier of the Azure subscription for the logic app. +func (m *LogicAppTriggerEndpointConfiguration) GetSubscriptionId()(*string) { + return m.subscriptionId +} +// Serialize serializes information the current object +func (m *LogicAppTriggerEndpointConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomExtensionEndpointConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("logicAppWorkflowName", m.GetLogicAppWorkflowName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceGroupName", m.GetResourceGroupName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + return nil +} +// SetLogicAppWorkflowName sets the logicAppWorkflowName property value. The name of the logic app. +func (m *LogicAppTriggerEndpointConfiguration) SetLogicAppWorkflowName(value *string)() { + m.logicAppWorkflowName = value +} +// SetResourceGroupName sets the resourceGroupName property value. The Azure resource group name for the logic app. +func (m *LogicAppTriggerEndpointConfiguration) SetResourceGroupName(value *string)() { + m.resourceGroupName = value +} +// SetSubscriptionId sets the subscriptionId property value. Identifier of the Azure subscription for the logic app. +func (m *LogicAppTriggerEndpointConfiguration) SetSubscriptionId(value *string)() { + m.subscriptionId = value +} diff --git a/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configurationable.go b/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configurationable.go new file mode 100644 index 000000000..7a06a757c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logic_app_trigger_endpoint_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogicAppTriggerEndpointConfigurationable +type LogicAppTriggerEndpointConfigurationable interface { + CustomExtensionEndpointConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLogicAppWorkflowName()(*string) + GetResourceGroupName()(*string) + GetSubscriptionId()(*string) + SetLogicAppWorkflowName(value *string)() + SetResourceGroupName(value *string)() + SetSubscriptionId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/login_page_layout_configuration.go b/src/internal/connector/graph/betasdk/models/login_page_layout_configuration.go new file mode 100644 index 000000000..c98bae904 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/login_page_layout_configuration.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoginPageLayoutConfiguration +type LoginPageLayoutConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Option to show the footer on the sign-in page. + isFooterShown *bool + // Option to show the header on the sign-in page. + isHeaderShown *bool + // Represents the layout template to be displayed on the login page for a tenant. The possible values are default - Represents the default Microsoft layout with a centered lightbox. verticalSplit - Represents a layout with a backgound on the left side and a full-height lightbox to the right. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. + layoutTemplateType *LayoutTemplateType + // The OdataType property + odataType *string +} +// NewLoginPageLayoutConfiguration instantiates a new loginPageLayoutConfiguration and sets the default values. +func NewLoginPageLayoutConfiguration()(*LoginPageLayoutConfiguration) { + m := &LoginPageLayoutConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLoginPageLayoutConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoginPageLayoutConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoginPageLayoutConfiguration(), 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 *LoginPageLayoutConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoginPageLayoutConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isFooterShown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFooterShown(val) + } + return nil + } + res["isHeaderShown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHeaderShown(val) + } + return nil + } + res["layoutTemplateType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLayoutTemplateType) + if err != nil { + return err + } + if val != nil { + m.SetLayoutTemplateType(val.(*LayoutTemplateType)) + } + 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 + } + return res +} +// GetIsFooterShown gets the isFooterShown property value. Option to show the footer on the sign-in page. +func (m *LoginPageLayoutConfiguration) GetIsFooterShown()(*bool) { + return m.isFooterShown +} +// GetIsHeaderShown gets the isHeaderShown property value. Option to show the header on the sign-in page. +func (m *LoginPageLayoutConfiguration) GetIsHeaderShown()(*bool) { + return m.isHeaderShown +} +// GetLayoutTemplateType gets the layoutTemplateType property value. Represents the layout template to be displayed on the login page for a tenant. The possible values are default - Represents the default Microsoft layout with a centered lightbox. verticalSplit - Represents a layout with a backgound on the left side and a full-height lightbox to the right. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. +func (m *LoginPageLayoutConfiguration) GetLayoutTemplateType()(*LayoutTemplateType) { + return m.layoutTemplateType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LoginPageLayoutConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LoginPageLayoutConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isFooterShown", m.GetIsFooterShown()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isHeaderShown", m.GetIsHeaderShown()) + if err != nil { + return err + } + } + if m.GetLayoutTemplateType() != nil { + cast := (*m.GetLayoutTemplateType()).String() + err := writer.WriteStringValue("layoutTemplateType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LoginPageLayoutConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsFooterShown sets the isFooterShown property value. Option to show the footer on the sign-in page. +func (m *LoginPageLayoutConfiguration) SetIsFooterShown(value *bool)() { + m.isFooterShown = value +} +// SetIsHeaderShown sets the isHeaderShown property value. Option to show the header on the sign-in page. +func (m *LoginPageLayoutConfiguration) SetIsHeaderShown(value *bool)() { + m.isHeaderShown = value +} +// SetLayoutTemplateType sets the layoutTemplateType property value. Represents the layout template to be displayed on the login page for a tenant. The possible values are default - Represents the default Microsoft layout with a centered lightbox. verticalSplit - Represents a layout with a backgound on the left side and a full-height lightbox to the right. unknownFutureValue - Evolvable enumeration sentinel value. Do not use. +func (m *LoginPageLayoutConfiguration) SetLayoutTemplateType(value *LayoutTemplateType)() { + m.layoutTemplateType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LoginPageLayoutConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/login_page_layout_configurationable.go b/src/internal/connector/graph/betasdk/models/login_page_layout_configurationable.go new file mode 100644 index 000000000..227f239b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/login_page_layout_configurationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoginPageLayoutConfigurationable +type LoginPageLayoutConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsFooterShown()(*bool) + GetIsHeaderShown()(*bool) + GetLayoutTemplateType()(*LayoutTemplateType) + GetOdataType()(*string) + SetIsFooterShown(value *bool)() + SetIsHeaderShown(value *bool)() + SetLayoutTemplateType(value *LayoutTemplateType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settings.go b/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settings.go new file mode 100644 index 000000000..889419d74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settings.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoginPageTextVisibilitySettings +type LoginPageTextVisibilitySettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Option to hide the self-service password reset (SSPR) hyperlinks such as 'Can't access your account?', 'Forgot my password' and 'Reset it now' on the sign-in form. + hideAccountResetCredentials *bool + // Option to hide the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in form. + hideCannotAccessYourAccount *bool + // Option to hide the self-service password reset (SSPR) 'Forgot my password' hyperlink on the sign-in form. + hideForgotMyPassword *bool + // Option to hide the 'Privacy & Cookies' hyperlink in the footer. + hidePrivacyAndCookies *bool + // Option to hide the self-service password reset (SSPR) 'reset it now' hyperlink on the sign-in form. + hideResetItNow *bool + // Option to hide the 'Terms of Use' hyperlink in the footer. + hideTermsOfUse *bool + // The OdataType property + odataType *string +} +// NewLoginPageTextVisibilitySettings instantiates a new loginPageTextVisibilitySettings and sets the default values. +func NewLoginPageTextVisibilitySettings()(*LoginPageTextVisibilitySettings) { + m := &LoginPageTextVisibilitySettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLoginPageTextVisibilitySettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoginPageTextVisibilitySettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoginPageTextVisibilitySettings(), 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 *LoginPageTextVisibilitySettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoginPageTextVisibilitySettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hideAccountResetCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideAccountResetCredentials(val) + } + return nil + } + res["hideCannotAccessYourAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideCannotAccessYourAccount(val) + } + return nil + } + res["hideForgotMyPassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideForgotMyPassword(val) + } + return nil + } + res["hidePrivacyAndCookies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidePrivacyAndCookies(val) + } + return nil + } + res["hideResetItNow"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideResetItNow(val) + } + return nil + } + res["hideTermsOfUse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideTermsOfUse(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 + } + return res +} +// GetHideAccountResetCredentials gets the hideAccountResetCredentials property value. Option to hide the self-service password reset (SSPR) hyperlinks such as 'Can't access your account?', 'Forgot my password' and 'Reset it now' on the sign-in form. +func (m *LoginPageTextVisibilitySettings) GetHideAccountResetCredentials()(*bool) { + return m.hideAccountResetCredentials +} +// GetHideCannotAccessYourAccount gets the hideCannotAccessYourAccount property value. Option to hide the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) GetHideCannotAccessYourAccount()(*bool) { + return m.hideCannotAccessYourAccount +} +// GetHideForgotMyPassword gets the hideForgotMyPassword property value. Option to hide the self-service password reset (SSPR) 'Forgot my password' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) GetHideForgotMyPassword()(*bool) { + return m.hideForgotMyPassword +} +// GetHidePrivacyAndCookies gets the hidePrivacyAndCookies property value. Option to hide the 'Privacy & Cookies' hyperlink in the footer. +func (m *LoginPageTextVisibilitySettings) GetHidePrivacyAndCookies()(*bool) { + return m.hidePrivacyAndCookies +} +// GetHideResetItNow gets the hideResetItNow property value. Option to hide the self-service password reset (SSPR) 'reset it now' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) GetHideResetItNow()(*bool) { + return m.hideResetItNow +} +// GetHideTermsOfUse gets the hideTermsOfUse property value. Option to hide the 'Terms of Use' hyperlink in the footer. +func (m *LoginPageTextVisibilitySettings) GetHideTermsOfUse()(*bool) { + return m.hideTermsOfUse +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LoginPageTextVisibilitySettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LoginPageTextVisibilitySettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("hideAccountResetCredentials", m.GetHideAccountResetCredentials()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideCannotAccessYourAccount", m.GetHideCannotAccessYourAccount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideForgotMyPassword", m.GetHideForgotMyPassword()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hidePrivacyAndCookies", m.GetHidePrivacyAndCookies()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideResetItNow", m.GetHideResetItNow()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideTermsOfUse", m.GetHideTermsOfUse()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *LoginPageTextVisibilitySettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHideAccountResetCredentials sets the hideAccountResetCredentials property value. Option to hide the self-service password reset (SSPR) hyperlinks such as 'Can't access your account?', 'Forgot my password' and 'Reset it now' on the sign-in form. +func (m *LoginPageTextVisibilitySettings) SetHideAccountResetCredentials(value *bool)() { + m.hideAccountResetCredentials = value +} +// SetHideCannotAccessYourAccount sets the hideCannotAccessYourAccount property value. Option to hide the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) SetHideCannotAccessYourAccount(value *bool)() { + m.hideCannotAccessYourAccount = value +} +// SetHideForgotMyPassword sets the hideForgotMyPassword property value. Option to hide the self-service password reset (SSPR) 'Forgot my password' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) SetHideForgotMyPassword(value *bool)() { + m.hideForgotMyPassword = value +} +// SetHidePrivacyAndCookies sets the hidePrivacyAndCookies property value. Option to hide the 'Privacy & Cookies' hyperlink in the footer. +func (m *LoginPageTextVisibilitySettings) SetHidePrivacyAndCookies(value *bool)() { + m.hidePrivacyAndCookies = value +} +// SetHideResetItNow sets the hideResetItNow property value. Option to hide the self-service password reset (SSPR) 'reset it now' hyperlink on the sign-in form. +func (m *LoginPageTextVisibilitySettings) SetHideResetItNow(value *bool)() { + m.hideResetItNow = value +} +// SetHideTermsOfUse sets the hideTermsOfUse property value. Option to hide the 'Terms of Use' hyperlink in the footer. +func (m *LoginPageTextVisibilitySettings) SetHideTermsOfUse(value *bool)() { + m.hideTermsOfUse = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LoginPageTextVisibilitySettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settingsable.go b/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settingsable.go new file mode 100644 index 000000000..f5ccad630 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/login_page_text_visibility_settingsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoginPageTextVisibilitySettingsable +type LoginPageTextVisibilitySettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHideAccountResetCredentials()(*bool) + GetHideCannotAccessYourAccount()(*bool) + GetHideForgotMyPassword()(*bool) + GetHidePrivacyAndCookies()(*bool) + GetHideResetItNow()(*bool) + GetHideTermsOfUse()(*bool) + GetOdataType()(*string) + SetHideAccountResetCredentials(value *bool)() + SetHideCannotAccessYourAccount(value *bool)() + SetHideForgotMyPassword(value *bool)() + SetHidePrivacyAndCookies(value *bool)() + SetHideResetItNow(value *bool)() + SetHideTermsOfUse(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/logon_type.go b/src/internal/connector/graph/betasdk/models/logon_type.go new file mode 100644 index 000000000..263db518c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logon_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LogonType int + +const ( + UNKNOWN_LOGONTYPE LogonType = iota + INTERACTIVE_LOGONTYPE + REMOTEINTERACTIVE_LOGONTYPE + NETWORK_LOGONTYPE + BATCH_LOGONTYPE + SERVICE_LOGONTYPE + UNKNOWNFUTUREVALUE_LOGONTYPE +) + +func (i LogonType) String() string { + return []string{"unknown", "interactive", "remoteInteractive", "network", "batch", "service", "unknownFutureValue"}[i] +} +func ParseLogonType(v string) (interface{}, error) { + result := UNKNOWN_LOGONTYPE + switch v { + case "unknown": + result = UNKNOWN_LOGONTYPE + case "interactive": + result = INTERACTIVE_LOGONTYPE + case "remoteInteractive": + result = REMOTEINTERACTIVE_LOGONTYPE + case "network": + result = NETWORK_LOGONTYPE + case "batch": + result = BATCH_LOGONTYPE + case "service": + result = SERVICE_LOGONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LOGONTYPE + default: + return 0, errors.New("Unknown LogonType value: " + v) + } + return &result, nil +} +func SerializeLogonType(values []LogonType) []string { + 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/logon_user.go b/src/internal/connector/graph/betasdk/models/logon_user.go new file mode 100644 index 000000000..0245d1850 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logon_user.go @@ -0,0 +1,259 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogonUser +type LogonUser struct { + // Domain of user account used to logon. + accountDomain *string + // Account name of user account used to logon. + accountName *string + // User Account type, per Windows definition. Possible values are: unknown, standard, power, administrator. + accountType *UserAccountSecurityType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // DateTime at which the earliest logon by this user account occurred (provider-determined period). The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DateTime at which the latest logon by this user account occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // User logon ID. + logonId *string + // Collection of the logon types observed for the logged on user from when first to last seen. Possible values are: unknown, interactive, remoteInteractive, network, batch, service. + logonTypes []LogonType + // The OdataType property + odataType *string +} +// NewLogonUser instantiates a new logonUser and sets the default values. +func NewLogonUser()(*LogonUser) { + m := &LogonUser{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLogonUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLogonUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLogonUser(), nil +} +// GetAccountDomain gets the accountDomain property value. Domain of user account used to logon. +func (m *LogonUser) GetAccountDomain()(*string) { + return m.accountDomain +} +// GetAccountName gets the accountName property value. Account name of user account used to logon. +func (m *LogonUser) GetAccountName()(*string) { + return m.accountName +} +// GetAccountType gets the accountType property value. User Account type, per Windows definition. Possible values are: unknown, standard, power, administrator. +func (m *LogonUser) GetAccountType()(*UserAccountSecurityType) { + return m.accountType +} +// 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 *LogonUser) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LogonUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accountDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountDomain(val) + } + return nil + } + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["accountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserAccountSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetAccountType(val.(*UserAccountSecurityType)) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["logonId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogonId(val) + } + return nil + } + res["logonTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseLogonType) + if err != nil { + return err + } + if val != nil { + res := make([]LogonType, len(val)) + for i, v := range val { + res[i] = *(v.(*LogonType)) + } + m.SetLogonTypes(res) + } + 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 + } + return res +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. DateTime at which the earliest logon by this user account occurred (provider-determined period). The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LogonUser) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. DateTime at which the latest logon by this user account occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LogonUser) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetLogonId gets the logonId property value. User logon ID. +func (m *LogonUser) GetLogonId()(*string) { + return m.logonId +} +// GetLogonTypes gets the logonTypes property value. Collection of the logon types observed for the logged on user from when first to last seen. Possible values are: unknown, interactive, remoteInteractive, network, batch, service. +func (m *LogonUser) GetLogonTypes()([]LogonType) { + return m.logonTypes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LogonUser) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LogonUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accountDomain", m.GetAccountDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + if m.GetAccountType() != nil { + cast := (*m.GetAccountType()).String() + err := writer.WriteStringValue("accountType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("logonId", m.GetLogonId()) + if err != nil { + return err + } + } + if m.GetLogonTypes() != nil { + err := writer.WriteCollectionOfStringValues("logonTypes", SerializeLogonType(m.GetLogonTypes())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountDomain sets the accountDomain property value. Domain of user account used to logon. +func (m *LogonUser) SetAccountDomain(value *string)() { + m.accountDomain = value +} +// SetAccountName sets the accountName property value. Account name of user account used to logon. +func (m *LogonUser) SetAccountName(value *string)() { + m.accountName = value +} +// SetAccountType sets the accountType property value. User Account type, per Windows definition. Possible values are: unknown, standard, power, administrator. +func (m *LogonUser) SetAccountType(value *UserAccountSecurityType)() { + m.accountType = value +} +// 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 *LogonUser) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. DateTime at which the earliest logon by this user account occurred (provider-determined period). The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LogonUser) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. DateTime at which the latest logon by this user account occurred. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LogonUser) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetLogonId sets the logonId property value. User logon ID. +func (m *LogonUser) SetLogonId(value *string)() { + m.logonId = value +} +// SetLogonTypes sets the logonTypes property value. Collection of the logon types observed for the logged on user from when first to last seen. Possible values are: unknown, interactive, remoteInteractive, network, batch, service. +func (m *LogonUser) SetLogonTypes(value []LogonType)() { + m.logonTypes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LogonUser) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/logon_user_collection_response.go b/src/internal/connector/graph/betasdk/models/logon_user_collection_response.go new file mode 100644 index 000000000..dcd858499 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logon_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogonUserCollectionResponse +type LogonUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LogonUserable +} +// NewLogonUserCollectionResponse instantiates a new LogonUserCollectionResponse and sets the default values. +func NewLogonUserCollectionResponse()(*LogonUserCollectionResponse) { + m := &LogonUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLogonUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLogonUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLogonUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LogonUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLogonUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LogonUserable, len(val)) + for i, v := range val { + res[i] = v.(LogonUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LogonUserCollectionResponse) GetValue()([]LogonUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *LogonUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LogonUserCollectionResponse) SetValue(value []LogonUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/logon_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/logon_user_collection_responseable.go new file mode 100644 index 000000000..9802d1d77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logon_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogonUserCollectionResponseable +type LogonUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LogonUserable) + SetValue(value []LogonUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/logon_userable.go b/src/internal/connector/graph/betasdk/models/logon_userable.go new file mode 100644 index 000000000..f92d93494 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/logon_userable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LogonUserable +type LogonUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountDomain()(*string) + GetAccountName()(*string) + GetAccountType()(*UserAccountSecurityType) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLogonId()(*string) + GetLogonTypes()([]LogonType) + GetOdataType()(*string) + SetAccountDomain(value *string)() + SetAccountName(value *string)() + SetAccountType(value *UserAccountSecurityType)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLogonId(value *string)() + SetLogonTypes(value []LogonType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/long_running_operation.go b/src/internal/connector/graph/betasdk/models/long_running_operation.go new file mode 100644 index 000000000..59bb4dc43 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/long_running_operation.go @@ -0,0 +1,186 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LongRunningOperation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LongRunningOperation struct { + Entity + // The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // URI of the resource that the operation is performed on. + resourceLocation *string + // The status of the operation. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. + status *LongRunningOperationStatus + // Details about the status of the operation. + statusDetail *string +} +// NewLongRunningOperation instantiates a new longRunningOperation and sets the default values. +func NewLongRunningOperation()(*LongRunningOperation) { + m := &LongRunningOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateLongRunningOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLongRunningOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.attackSimulationOperation": + return NewAttackSimulationOperation(), nil + case "#microsoft.graph.richLongRunningOperation": + return NewRichLongRunningOperation(), nil + } + } + } + } + return NewLongRunningOperation(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LongRunningOperation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LongRunningOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["resourceLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceLocation(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLongRunningOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*LongRunningOperationStatus)) + } + return nil + } + res["statusDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusDetail(val) + } + return nil + } + return res +} +// GetLastActionDateTime gets the lastActionDateTime property value. The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LongRunningOperation) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetResourceLocation gets the resourceLocation property value. URI of the resource that the operation is performed on. +func (m *LongRunningOperation) GetResourceLocation()(*string) { + return m.resourceLocation +} +// GetStatus gets the status property value. The status of the operation. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. +func (m *LongRunningOperation) GetStatus()(*LongRunningOperationStatus) { + return m.status +} +// GetStatusDetail gets the statusDetail property value. Details about the status of the operation. +func (m *LongRunningOperation) GetStatusDetail()(*string) { + return m.statusDetail +} +// Serialize serializes information the current object +func (m *LongRunningOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceLocation", m.GetResourceLocation()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("statusDetail", m.GetStatusDetail()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The start time of the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LongRunningOperation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The time of the last action in the operation. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *LongRunningOperation) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetResourceLocation sets the resourceLocation property value. URI of the resource that the operation is performed on. +func (m *LongRunningOperation) SetResourceLocation(value *string)() { + m.resourceLocation = value +} +// SetStatus sets the status property value. The status of the operation. The possible values are: notStarted, running, succeeded, failed, unknownFutureValue. +func (m *LongRunningOperation) SetStatus(value *LongRunningOperationStatus)() { + m.status = value +} +// SetStatusDetail sets the statusDetail property value. Details about the status of the operation. +func (m *LongRunningOperation) SetStatusDetail(value *string)() { + m.statusDetail = value +} diff --git a/src/internal/connector/graph/betasdk/models/long_running_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/long_running_operation_collection_response.go new file mode 100644 index 000000000..4ae93dcee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/long_running_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LongRunningOperationCollectionResponse +type LongRunningOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LongRunningOperationable +} +// NewLongRunningOperationCollectionResponse instantiates a new LongRunningOperationCollectionResponse and sets the default values. +func NewLongRunningOperationCollectionResponse()(*LongRunningOperationCollectionResponse) { + m := &LongRunningOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLongRunningOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLongRunningOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLongRunningOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LongRunningOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLongRunningOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LongRunningOperationable, len(val)) + for i, v := range val { + res[i] = v.(LongRunningOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LongRunningOperationCollectionResponse) GetValue()([]LongRunningOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *LongRunningOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LongRunningOperationCollectionResponse) SetValue(value []LongRunningOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/long_running_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/long_running_operation_collection_responseable.go new file mode 100644 index 000000000..9df5af299 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/long_running_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LongRunningOperationCollectionResponseable +type LongRunningOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LongRunningOperationable) + SetValue(value []LongRunningOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/long_running_operation_status.go b/src/internal/connector/graph/betasdk/models/long_running_operation_status.go new file mode 100644 index 000000000..c3b8e196a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/long_running_operation_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LongRunningOperationStatus int + +const ( + NOTSTARTED_LONGRUNNINGOPERATIONSTATUS LongRunningOperationStatus = iota + RUNNING_LONGRUNNINGOPERATIONSTATUS + SUCCEEDED_LONGRUNNINGOPERATIONSTATUS + FAILED_LONGRUNNINGOPERATIONSTATUS + UNKNOWNFUTUREVALUE_LONGRUNNINGOPERATIONSTATUS +) + +func (i LongRunningOperationStatus) String() string { + return []string{"notStarted", "running", "succeeded", "failed", "unknownFutureValue"}[i] +} +func ParseLongRunningOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_LONGRUNNINGOPERATIONSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_LONGRUNNINGOPERATIONSTATUS + case "running": + result = RUNNING_LONGRUNNINGOPERATIONSTATUS + case "succeeded": + result = SUCCEEDED_LONGRUNNINGOPERATIONSTATUS + case "failed": + result = FAILED_LONGRUNNINGOPERATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LONGRUNNINGOPERATIONSTATUS + default: + return 0, errors.New("Unknown LongRunningOperationStatus value: " + v) + } + return &result, nil +} +func SerializeLongRunningOperationStatus(values []LongRunningOperationStatus) []string { + 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/long_running_operationable.go b/src/internal/connector/graph/betasdk/models/long_running_operationable.go new file mode 100644 index 000000000..4dd755343 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/long_running_operationable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LongRunningOperationable +type LongRunningOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResourceLocation()(*string) + GetStatus()(*LongRunningOperationStatus) + GetStatusDetail()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResourceLocation(value *string)() + SetStatus(value *LongRunningOperationStatus)() + SetStatusDetail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_column.go b/src/internal/connector/graph/betasdk/models/lookup_column.go new file mode 100644 index 000000000..6b7b1fc1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_column.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupColumn +type LookupColumn 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 whether multiple values can be selected from the source. + allowMultipleValues *bool + // Indicates whether values in the column should be able to exceed the standard limit of 255 characters. + allowUnlimitedLength *bool + // The name of the lookup source column. + columnName *string + // The unique identifier of the lookup source list. + listId *string + // The OdataType property + odataType *string + // If specified, this column is a secondary lookup, pulling an additional field from the list item looked up by the primary lookup. Use the list item looked up by the primary as the source for the column named here. + primaryLookupColumnId *string +} +// NewLookupColumn instantiates a new lookupColumn and sets the default values. +func NewLookupColumn()(*LookupColumn) { + m := &LookupColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLookupColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLookupColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLookupColumn(), 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 *LookupColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowMultipleValues gets the allowMultipleValues property value. Indicates whether multiple values can be selected from the source. +func (m *LookupColumn) GetAllowMultipleValues()(*bool) { + return m.allowMultipleValues +} +// GetAllowUnlimitedLength gets the allowUnlimitedLength property value. Indicates whether values in the column should be able to exceed the standard limit of 255 characters. +func (m *LookupColumn) GetAllowUnlimitedLength()(*bool) { + return m.allowUnlimitedLength +} +// GetColumnName gets the columnName property value. The name of the lookup source column. +func (m *LookupColumn) GetColumnName()(*string) { + return m.columnName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LookupColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowMultipleValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMultipleValues(val) + } + return nil + } + res["allowUnlimitedLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowUnlimitedLength(val) + } + return nil + } + res["columnName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnName(val) + } + return nil + } + res["listId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetListId(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["primaryLookupColumnId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryLookupColumnId(val) + } + return nil + } + return res +} +// GetListId gets the listId property value. The unique identifier of the lookup source list. +func (m *LookupColumn) GetListId()(*string) { + return m.listId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LookupColumn) GetOdataType()(*string) { + return m.odataType +} +// GetPrimaryLookupColumnId gets the primaryLookupColumnId property value. If specified, this column is a secondary lookup, pulling an additional field from the list item looked up by the primary lookup. Use the list item looked up by the primary as the source for the column named here. +func (m *LookupColumn) GetPrimaryLookupColumnId()(*string) { + return m.primaryLookupColumnId +} +// Serialize serializes information the current object +func (m *LookupColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowMultipleValues", m.GetAllowMultipleValues()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowUnlimitedLength", m.GetAllowUnlimitedLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("columnName", m.GetColumnName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("listId", m.GetListId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("primaryLookupColumnId", m.GetPrimaryLookupColumnId()) + 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 *LookupColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowMultipleValues sets the allowMultipleValues property value. Indicates whether multiple values can be selected from the source. +func (m *LookupColumn) SetAllowMultipleValues(value *bool)() { + m.allowMultipleValues = value +} +// SetAllowUnlimitedLength sets the allowUnlimitedLength property value. Indicates whether values in the column should be able to exceed the standard limit of 255 characters. +func (m *LookupColumn) SetAllowUnlimitedLength(value *bool)() { + m.allowUnlimitedLength = value +} +// SetColumnName sets the columnName property value. The name of the lookup source column. +func (m *LookupColumn) SetColumnName(value *string)() { + m.columnName = value +} +// SetListId sets the listId property value. The unique identifier of the lookup source list. +func (m *LookupColumn) SetListId(value *string)() { + m.listId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LookupColumn) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrimaryLookupColumnId sets the primaryLookupColumnId property value. If specified, this column is a secondary lookup, pulling an additional field from the list item looked up by the primary lookup. Use the list item looked up by the primary as the source for the column named here. +func (m *LookupColumn) SetPrimaryLookupColumnId(value *string)() { + m.primaryLookupColumnId = value +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_columnable.go b/src/internal/connector/graph/betasdk/models/lookup_columnable.go new file mode 100644 index 000000000..241a5cc2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_columnable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupColumnable +type LookupColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowMultipleValues()(*bool) + GetAllowUnlimitedLength()(*bool) + GetColumnName()(*string) + GetListId()(*string) + GetOdataType()(*string) + GetPrimaryLookupColumnId()(*string) + SetAllowMultipleValues(value *bool)() + SetAllowUnlimitedLength(value *bool)() + SetColumnName(value *string)() + SetListId(value *string)() + SetOdataType(value *string)() + SetPrimaryLookupColumnId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_result_row.go b/src/internal/connector/graph/betasdk/models/lookup_result_row.go new file mode 100644 index 000000000..19bd72bd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_result_row.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupResultRow provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LookupResultRow struct { + Entity + // The row property + row *string +} +// NewLookupResultRow instantiates a new lookupResultRow and sets the default values. +func NewLookupResultRow()(*LookupResultRow) { + m := &LookupResultRow{ + Entity: *NewEntity(), + } + return m +} +// CreateLookupResultRowFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLookupResultRowFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLookupResultRow(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LookupResultRow) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["row"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRow(val) + } + return nil + } + return res +} +// GetRow gets the row property value. The row property +func (m *LookupResultRow) GetRow()(*string) { + return m.row +} +// Serialize serializes information the current object +func (m *LookupResultRow) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("row", m.GetRow()) + if err != nil { + return err + } + } + return nil +} +// SetRow sets the row property value. The row property +func (m *LookupResultRow) SetRow(value *string)() { + m.row = value +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_response.go b/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_response.go new file mode 100644 index 000000000..286e44883 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupResultRowCollectionResponse +type LookupResultRowCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []LookupResultRowable +} +// NewLookupResultRowCollectionResponse instantiates a new LookupResultRowCollectionResponse and sets the default values. +func NewLookupResultRowCollectionResponse()(*LookupResultRowCollectionResponse) { + m := &LookupResultRowCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLookupResultRowCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLookupResultRowCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLookupResultRowCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LookupResultRowCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLookupResultRowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LookupResultRowable, len(val)) + for i, v := range val { + res[i] = v.(LookupResultRowable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LookupResultRowCollectionResponse) GetValue()([]LookupResultRowable) { + return m.value +} +// Serialize serializes information the current object +func (m *LookupResultRowCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LookupResultRowCollectionResponse) SetValue(value []LookupResultRowable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_responseable.go b/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_responseable.go new file mode 100644 index 000000000..2ce9ad5e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_result_row_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupResultRowCollectionResponseable +type LookupResultRowCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LookupResultRowable) + SetValue(value []LookupResultRowable)() +} diff --git a/src/internal/connector/graph/betasdk/models/lookup_result_rowable.go b/src/internal/connector/graph/betasdk/models/lookup_result_rowable.go new file mode 100644 index 000000000..e33e0204d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lookup_result_rowable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LookupResultRowable +type LookupResultRowable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRow()(*string) + SetRow(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/lost_mode_state.go b/src/internal/connector/graph/betasdk/models/lost_mode_state.go new file mode 100644 index 000000000..8458573b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/lost_mode_state.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LostModeState int + +const ( + // Lost mode is disabled. + DISABLED_LOSTMODESTATE LostModeState = iota + // Lost mode is enabled. + ENABLED_LOSTMODESTATE +) + +func (i LostModeState) String() string { + return []string{"disabled", "enabled"}[i] +} +func ParseLostModeState(v string) (interface{}, error) { + result := DISABLED_LOSTMODESTATE + switch v { + case "disabled": + result = DISABLED_LOSTMODESTATE + case "enabled": + result = ENABLED_LOSTMODESTATE + default: + return 0, errors.New("Unknown LostModeState value: " + v) + } + return &result, nil +} +func SerializeLostModeState(values []LostModeState) []string { + 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/mac_app_identifier.go b/src/internal/connector/graph/betasdk/models/mac_app_identifier.go new file mode 100644 index 000000000..a19006e80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_app_identifier.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacAppIdentifier +type MacAppIdentifier struct { + MobileAppIdentifier + // The identifier for an app, as specified in the app store. + bundleId *string +} +// NewMacAppIdentifier instantiates a new MacAppIdentifier and sets the default values. +func NewMacAppIdentifier()(*MacAppIdentifier) { + m := &MacAppIdentifier{ + MobileAppIdentifier: *NewMobileAppIdentifier(), + } + odataTypeValue := "#microsoft.graph.macAppIdentifier"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacAppIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacAppIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacAppIdentifier(), nil +} +// GetBundleId gets the bundleId property value. The identifier for an app, as specified in the app store. +func (m *MacAppIdentifier) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacAppIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppIdentifier.GetFieldDeserializers() + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MacAppIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppIdentifier.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + return nil +} +// SetBundleId sets the bundleId property value. The identifier for an app, as specified in the app store. +func (m *MacAppIdentifier) SetBundleId(value *string)() { + m.bundleId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_app_identifierable.go b/src/internal/connector/graph/betasdk/models/mac_app_identifierable.go new file mode 100644 index 000000000..31e36f7ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_app_identifierable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacAppIdentifierable +type MacAppIdentifierable interface { + MobileAppIdentifierable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + SetBundleId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver.go b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver.go new file mode 100644 index 000000000..4ff69e87d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAppleEventReceiver represents a process that can receive an Apple Event notification. +type MacOSAppleEventReceiver struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Allow or block this app from receiving Apple events. + allowed *bool + // Code requirement for the app or binary that receives the Apple Event. + codeRequirement *string + // Bundle ID of the app or file path of the process or executable that receives the Apple Event. + identifier *string + // Process identifier types for MacOS Privacy Preferences + identifierType *MacOSProcessIdentifierType + // The OdataType property + odataType *string +} +// NewMacOSAppleEventReceiver instantiates a new macOSAppleEventReceiver and sets the default values. +func NewMacOSAppleEventReceiver()(*MacOSAppleEventReceiver) { + m := &MacOSAppleEventReceiver{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSAppleEventReceiverFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSAppleEventReceiverFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSAppleEventReceiver(), 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 *MacOSAppleEventReceiver) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowed gets the allowed property value. Allow or block this app from receiving Apple events. +func (m *MacOSAppleEventReceiver) GetAllowed()(*bool) { + return m.allowed +} +// GetCodeRequirement gets the codeRequirement property value. Code requirement for the app or binary that receives the Apple Event. +func (m *MacOSAppleEventReceiver) GetCodeRequirement()(*string) { + return m.codeRequirement +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSAppleEventReceiver) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowed(val) + } + return nil + } + res["codeRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeRequirement(val) + } + return nil + } + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + res["identifierType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSProcessIdentifierType) + if err != nil { + return err + } + if val != nil { + m.SetIdentifierType(val.(*MacOSProcessIdentifierType)) + } + 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 + } + return res +} +// GetIdentifier gets the identifier property value. Bundle ID of the app or file path of the process or executable that receives the Apple Event. +func (m *MacOSAppleEventReceiver) GetIdentifier()(*string) { + return m.identifier +} +// GetIdentifierType gets the identifierType property value. Process identifier types for MacOS Privacy Preferences +func (m *MacOSAppleEventReceiver) GetIdentifierType()(*MacOSProcessIdentifierType) { + return m.identifierType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSAppleEventReceiver) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MacOSAppleEventReceiver) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowed", m.GetAllowed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("codeRequirement", m.GetCodeRequirement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("identifier", m.GetIdentifier()) + if err != nil { + return err + } + } + if m.GetIdentifierType() != nil { + cast := (*m.GetIdentifierType()).String() + err := writer.WriteStringValue("identifierType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MacOSAppleEventReceiver) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowed sets the allowed property value. Allow or block this app from receiving Apple events. +func (m *MacOSAppleEventReceiver) SetAllowed(value *bool)() { + m.allowed = value +} +// SetCodeRequirement sets the codeRequirement property value. Code requirement for the app or binary that receives the Apple Event. +func (m *MacOSAppleEventReceiver) SetCodeRequirement(value *string)() { + m.codeRequirement = value +} +// SetIdentifier sets the identifier property value. Bundle ID of the app or file path of the process or executable that receives the Apple Event. +func (m *MacOSAppleEventReceiver) SetIdentifier(value *string)() { + m.identifier = value +} +// SetIdentifierType sets the identifierType property value. Process identifier types for MacOS Privacy Preferences +func (m *MacOSAppleEventReceiver) SetIdentifierType(value *MacOSProcessIdentifierType)() { + m.identifierType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSAppleEventReceiver) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_response.go new file mode 100644 index 000000000..4d76460f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAppleEventReceiverCollectionResponse +type MacOSAppleEventReceiverCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSAppleEventReceiverable +} +// NewMacOSAppleEventReceiverCollectionResponse instantiates a new MacOSAppleEventReceiverCollectionResponse and sets the default values. +func NewMacOSAppleEventReceiverCollectionResponse()(*MacOSAppleEventReceiverCollectionResponse) { + m := &MacOSAppleEventReceiverCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSAppleEventReceiverCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSAppleEventReceiverCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSAppleEventReceiverCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSAppleEventReceiverCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSAppleEventReceiverFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSAppleEventReceiverable, len(val)) + for i, v := range val { + res[i] = v.(MacOSAppleEventReceiverable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSAppleEventReceiverCollectionResponse) GetValue()([]MacOSAppleEventReceiverable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSAppleEventReceiverCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSAppleEventReceiverCollectionResponse) SetValue(value []MacOSAppleEventReceiverable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_responseable.go new file mode 100644 index 000000000..83f5b738f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiver_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAppleEventReceiverCollectionResponseable +type MacOSAppleEventReceiverCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSAppleEventReceiverable) + SetValue(value []MacOSAppleEventReceiverable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiverable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiverable.go new file mode 100644 index 000000000..1a144737d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_apple_event_receiverable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAppleEventReceiverable +type MacOSAppleEventReceiverable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowed()(*bool) + GetCodeRequirement()(*string) + GetIdentifier()(*string) + GetIdentifierType()(*MacOSProcessIdentifierType) + GetOdataType()(*string) + SetAllowed(value *bool)() + SetCodeRequirement(value *string)() + SetIdentifier(value *string)() + SetIdentifierType(value *MacOSProcessIdentifierType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item.go b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item.go new file mode 100644 index 000000000..698eac496 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item.go @@ -0,0 +1,153 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAssociatedDomainsItem a mapping of application identifiers to associated domains. +type MacOSAssociatedDomainsItem 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 application identifier of the app to associate domains with. + applicationIdentifier *string + // Determines whether data should be downloaded directly or via a CDN. + directDownloadsEnabled *bool + // The list of domains to associate. + domains []string + // The OdataType property + odataType *string +} +// NewMacOSAssociatedDomainsItem instantiates a new macOSAssociatedDomainsItem and sets the default values. +func NewMacOSAssociatedDomainsItem()(*MacOSAssociatedDomainsItem) { + m := &MacOSAssociatedDomainsItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSAssociatedDomainsItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSAssociatedDomainsItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSAssociatedDomainsItem(), 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 *MacOSAssociatedDomainsItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationIdentifier gets the applicationIdentifier property value. The application identifier of the app to associate domains with. +func (m *MacOSAssociatedDomainsItem) GetApplicationIdentifier()(*string) { + return m.applicationIdentifier +} +// GetDirectDownloadsEnabled gets the directDownloadsEnabled property value. Determines whether data should be downloaded directly or via a CDN. +func (m *MacOSAssociatedDomainsItem) GetDirectDownloadsEnabled()(*bool) { + return m.directDownloadsEnabled +} +// GetDomains gets the domains property value. The list of domains to associate. +func (m *MacOSAssociatedDomainsItem) GetDomains()([]string) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSAssociatedDomainsItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationIdentifier(val) + } + return nil + } + res["directDownloadsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDirectDownloadsEnabled(val) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSAssociatedDomainsItem) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MacOSAssociatedDomainsItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationIdentifier", m.GetApplicationIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("directDownloadsEnabled", m.GetDirectDownloadsEnabled()) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err := writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MacOSAssociatedDomainsItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationIdentifier sets the applicationIdentifier property value. The application identifier of the app to associate domains with. +func (m *MacOSAssociatedDomainsItem) SetApplicationIdentifier(value *string)() { + m.applicationIdentifier = value +} +// SetDirectDownloadsEnabled sets the directDownloadsEnabled property value. Determines whether data should be downloaded directly or via a CDN. +func (m *MacOSAssociatedDomainsItem) SetDirectDownloadsEnabled(value *bool)() { + m.directDownloadsEnabled = value +} +// SetDomains sets the domains property value. The list of domains to associate. +func (m *MacOSAssociatedDomainsItem) SetDomains(value []string)() { + m.domains = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSAssociatedDomainsItem) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_response.go new file mode 100644 index 000000000..de7963e5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAssociatedDomainsItemCollectionResponse +type MacOSAssociatedDomainsItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSAssociatedDomainsItemable +} +// NewMacOSAssociatedDomainsItemCollectionResponse instantiates a new MacOSAssociatedDomainsItemCollectionResponse and sets the default values. +func NewMacOSAssociatedDomainsItemCollectionResponse()(*MacOSAssociatedDomainsItemCollectionResponse) { + m := &MacOSAssociatedDomainsItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSAssociatedDomainsItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSAssociatedDomainsItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSAssociatedDomainsItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSAssociatedDomainsItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSAssociatedDomainsItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSAssociatedDomainsItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSAssociatedDomainsItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSAssociatedDomainsItemCollectionResponse) GetValue()([]MacOSAssociatedDomainsItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSAssociatedDomainsItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSAssociatedDomainsItemCollectionResponse) SetValue(value []MacOSAssociatedDomainsItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_responseable.go new file mode 100644 index 000000000..f4b599324 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAssociatedDomainsItemCollectionResponseable +type MacOSAssociatedDomainsItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSAssociatedDomainsItemable) + SetValue(value []MacOSAssociatedDomainsItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_itemable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_itemable.go new file mode 100644 index 000000000..29aef3013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_associated_domains_itemable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAssociatedDomainsItemable +type MacOSAssociatedDomainsItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationIdentifier()(*string) + GetDirectDownloadsEnabled()(*bool) + GetDomains()([]string) + GetOdataType()(*string) + SetApplicationIdentifier(value *string)() + SetDirectDownloadsEnabled(value *bool)() + SetDomains(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extension.go new file mode 100644 index 000000000..ff46ca855 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extension.go @@ -0,0 +1,126 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAzureAdSingleSignOnExtension +type MacOSAzureAdSingleSignOnExtension struct { + MacOSSingleSignOnExtension + // An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. + bundleIdAccessControlList []string + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Enables or disables shared device mode. + enableSharedDeviceMode *bool +} +// NewMacOSAzureAdSingleSignOnExtension instantiates a new MacOSAzureAdSingleSignOnExtension and sets the default values. +func NewMacOSAzureAdSingleSignOnExtension()(*MacOSAzureAdSingleSignOnExtension) { + m := &MacOSAzureAdSingleSignOnExtension{ + MacOSSingleSignOnExtension: *NewMacOSSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.macOSAzureAdSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSAzureAdSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSAzureAdSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSAzureAdSingleSignOnExtension(), nil +} +// GetBundleIdAccessControlList gets the bundleIdAccessControlList property value. An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. +func (m *MacOSAzureAdSingleSignOnExtension) GetBundleIdAccessControlList()([]string) { + return m.bundleIdAccessControlList +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSAzureAdSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetEnableSharedDeviceMode gets the enableSharedDeviceMode property value. Enables or disables shared device mode. +func (m *MacOSAzureAdSingleSignOnExtension) GetEnableSharedDeviceMode()(*bool) { + return m.enableSharedDeviceMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSAzureAdSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSSingleSignOnExtension.GetFieldDeserializers() + res["bundleIdAccessControlList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBundleIdAccessControlList(res) + } + return nil + } + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["enableSharedDeviceMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableSharedDeviceMode(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MacOSAzureAdSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetBundleIdAccessControlList() != nil { + err = writer.WriteCollectionOfStringValues("bundleIdAccessControlList", m.GetBundleIdAccessControlList()) + if err != nil { + return err + } + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enableSharedDeviceMode", m.GetEnableSharedDeviceMode()) + if err != nil { + return err + } + } + return nil +} +// SetBundleIdAccessControlList sets the bundleIdAccessControlList property value. An optional list of additional bundle IDs allowed to use the AAD extension for single sign-on. +func (m *MacOSAzureAdSingleSignOnExtension) SetBundleIdAccessControlList(value []string)() { + m.bundleIdAccessControlList = value +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSAzureAdSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetEnableSharedDeviceMode sets the enableSharedDeviceMode property value. Enables or disables shared device mode. +func (m *MacOSAzureAdSingleSignOnExtension) SetEnableSharedDeviceMode(value *bool)() { + m.enableSharedDeviceMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extensionable.go new file mode 100644 index 000000000..090e97c95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_azure_ad_single_sign_on_extensionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSAzureAdSingleSignOnExtensionable +type MacOSAzureAdSingleSignOnExtensionable interface { + MacOSSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleIdAccessControlList()([]string) + GetConfigurations()([]KeyTypedValuePairable) + GetEnableSharedDeviceMode()(*bool) + SetBundleIdAccessControlList(value []string)() + SetConfigurations(value []KeyTypedValuePairable)() + SetEnableSharedDeviceMode(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base.go b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base.go new file mode 100644 index 000000000..d5c935faa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base.go @@ -0,0 +1,191 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCertificateProfileBase +type MacOSCertificateProfileBase struct { + DeviceConfiguration + // Certificate Validity Period Options. + certificateValidityPeriodScale *CertificateValidityPeriodScale + // Value for the Certificate Validity Period. + certificateValidityPeriodValue *int32 + // Certificate renewal threshold percentage. + renewalThresholdPercentage *int32 + // Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. + subjectAlternativeNameType *SubjectAlternativeNameType + // Subject Name Format Options for Apple devices. + subjectNameFormat *AppleSubjectNameFormat +} +// NewMacOSCertificateProfileBase instantiates a new macOSCertificateProfileBase and sets the default values. +func NewMacOSCertificateProfileBase()(*MacOSCertificateProfileBase) { + m := &MacOSCertificateProfileBase{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSCertificateProfileBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSCertificateProfileBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCertificateProfileBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.macOSImportedPFXCertificateProfile": + return NewMacOSImportedPFXCertificateProfile(), nil + case "#microsoft.graph.macOSPkcsCertificateProfile": + return NewMacOSPkcsCertificateProfile(), nil + case "#microsoft.graph.macOSScepCertificateProfile": + return NewMacOSScepCertificateProfile(), nil + } + } + } + } + return NewMacOSCertificateProfileBase(), nil +} +// GetCertificateValidityPeriodScale gets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *MacOSCertificateProfileBase) GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodScale +} +// GetCertificateValidityPeriodValue gets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *MacOSCertificateProfileBase) GetCertificateValidityPeriodValue()(*int32) { + return m.certificateValidityPeriodValue +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCertificateProfileBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certificateValidityPeriodScale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodScale(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["certificateValidityPeriodValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodValue(val) + } + return nil + } + res["renewalThresholdPercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRenewalThresholdPercentage(val) + } + return nil + } + res["subjectAlternativeNameType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameType(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["subjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormat(val.(*AppleSubjectNameFormat)) + } + return nil + } + return res +} +// GetRenewalThresholdPercentage gets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. +func (m *MacOSCertificateProfileBase) GetRenewalThresholdPercentage()(*int32) { + return m.renewalThresholdPercentage +} +// GetSubjectAlternativeNameType gets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *MacOSCertificateProfileBase) GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) { + return m.subjectAlternativeNameType +} +// GetSubjectNameFormat gets the subjectNameFormat property value. Subject Name Format Options for Apple devices. +func (m *MacOSCertificateProfileBase) GetSubjectNameFormat()(*AppleSubjectNameFormat) { + return m.subjectNameFormat +} +// Serialize serializes information the current object +func (m *MacOSCertificateProfileBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetCertificateValidityPeriodScale() != nil { + cast := (*m.GetCertificateValidityPeriodScale()).String() + err = writer.WriteStringValue("certificateValidityPeriodScale", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriodValue", m.GetCertificateValidityPeriodValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("renewalThresholdPercentage", m.GetRenewalThresholdPercentage()) + if err != nil { + return err + } + } + if m.GetSubjectAlternativeNameType() != nil { + cast := (*m.GetSubjectAlternativeNameType()).String() + err = writer.WriteStringValue("subjectAlternativeNameType", &cast) + if err != nil { + return err + } + } + if m.GetSubjectNameFormat() != nil { + cast := (*m.GetSubjectNameFormat()).String() + err = writer.WriteStringValue("subjectNameFormat", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCertificateValidityPeriodScale sets the certificateValidityPeriodScale property value. Certificate Validity Period Options. +func (m *MacOSCertificateProfileBase) SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodScale = value +} +// SetCertificateValidityPeriodValue sets the certificateValidityPeriodValue property value. Value for the Certificate Validity Period. +func (m *MacOSCertificateProfileBase) SetCertificateValidityPeriodValue(value *int32)() { + m.certificateValidityPeriodValue = value +} +// SetRenewalThresholdPercentage sets the renewalThresholdPercentage property value. Certificate renewal threshold percentage. +func (m *MacOSCertificateProfileBase) SetRenewalThresholdPercentage(value *int32)() { + m.renewalThresholdPercentage = value +} +// SetSubjectAlternativeNameType sets the subjectAlternativeNameType property value. Certificate Subject Alternative Name Type. Possible values are: none, emailAddress, userPrincipalName, customAzureADAttribute, domainNameService, universalResourceIdentifier. +func (m *MacOSCertificateProfileBase) SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() { + m.subjectAlternativeNameType = value +} +// SetSubjectNameFormat sets the subjectNameFormat property value. Subject Name Format Options for Apple devices. +func (m *MacOSCertificateProfileBase) SetSubjectNameFormat(value *AppleSubjectNameFormat)() { + m.subjectNameFormat = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_response.go new file mode 100644 index 000000000..933bc937a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCertificateProfileBaseCollectionResponse +type MacOSCertificateProfileBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSCertificateProfileBaseable +} +// NewMacOSCertificateProfileBaseCollectionResponse instantiates a new MacOSCertificateProfileBaseCollectionResponse and sets the default values. +func NewMacOSCertificateProfileBaseCollectionResponse()(*MacOSCertificateProfileBaseCollectionResponse) { + m := &MacOSCertificateProfileBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSCertificateProfileBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCertificateProfileBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCertificateProfileBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCertificateProfileBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSCertificateProfileBaseable, len(val)) + for i, v := range val { + res[i] = v.(MacOSCertificateProfileBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSCertificateProfileBaseCollectionResponse) GetValue()([]MacOSCertificateProfileBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSCertificateProfileBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSCertificateProfileBaseCollectionResponse) SetValue(value []MacOSCertificateProfileBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_responseable.go new file mode 100644 index 000000000..00cbd08d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCertificateProfileBaseCollectionResponseable +type MacOSCertificateProfileBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSCertificateProfileBaseable) + SetValue(value []MacOSCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_baseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_baseable.go new file mode 100644 index 000000000..44beaaaa1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_certificate_profile_baseable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCertificateProfileBaseable +type MacOSCertificateProfileBaseable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateValidityPeriodScale()(*CertificateValidityPeriodScale) + GetCertificateValidityPeriodValue()(*int32) + GetRenewalThresholdPercentage()(*int32) + GetSubjectAlternativeNameType()(*SubjectAlternativeNameType) + GetSubjectNameFormat()(*AppleSubjectNameFormat) + SetCertificateValidityPeriodScale(value *CertificateValidityPeriodScale)() + SetCertificateValidityPeriodValue(value *int32)() + SetRenewalThresholdPercentage(value *int32)() + SetSubjectAlternativeNameType(value *SubjectAlternativeNameType)() + SetSubjectNameFormat(value *AppleSubjectNameFormat)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy.go b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy.go new file mode 100644 index 000000000..fc1547490 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy.go @@ -0,0 +1,586 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCompliancePolicy +type MacOSCompliancePolicy struct { + DeviceCompliancePolicy + // Device threat protection levels for the Device Threat Protection API. + advancedThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Require that devices have enabled device threat protection. + deviceThreatProtectionEnabled *bool + // Device threat protection levels for the Device Threat Protection API. + deviceThreatProtectionRequiredSecurityLevel *DeviceThreatProtectionLevel + // Corresponds to the 'Block all incoming connections' option. + firewallBlockAllIncoming *bool + // Whether the firewall should be enabled or not. + firewallEnabled *bool + // Corresponds to 'Enable stealth mode.' + firewallEnableStealthMode *bool + // App source options for macOS Gatekeeper. + gatekeeperAllowedAppSource *MacOSGatekeeperAppSources + // Maximum MacOS build version. + osMaximumBuildVersion *string + // Maximum MacOS version. + osMaximumVersion *string + // Minimum MacOS build version. + osMinimumBuildVersion *string + // Minimum MacOS version. + osMinimumVersion *string + // Indicates whether or not to block simple passwords. + passwordBlockSimple *bool + // Number of days before the password expires. Valid values 1 to 65535 + passwordExpirationDays *int32 + // The number of character sets required in the password. + passwordMinimumCharacterSetCount *int32 + // Minimum length of password. Valid values 4 to 14 + passwordMinimumLength *int32 + // Minutes of inactivity before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Number of previous passwords to block. Valid values 1 to 24 + passwordPreviousPasswordBlockCount *int32 + // Whether or not to require a password. + passwordRequired *bool + // Possible values of required passwords. + passwordRequiredType *RequiredPasswordType + // Require encryption on Mac OS devices. + storageRequireEncryption *bool + // Require that devices have enabled system integrity protection. + systemIntegrityProtectionEnabled *bool +} +// NewMacOSCompliancePolicy instantiates a new MacOSCompliancePolicy and sets the default values. +func NewMacOSCompliancePolicy()(*MacOSCompliancePolicy) { + m := &MacOSCompliancePolicy{ + DeviceCompliancePolicy: *NewDeviceCompliancePolicy(), + } + odataTypeValue := "#microsoft.graph.macOSCompliancePolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSCompliancePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCompliancePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCompliancePolicy(), nil +} +// GetAdvancedThreatProtectionRequiredSecurityLevel gets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *MacOSCompliancePolicy) GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.advancedThreatProtectionRequiredSecurityLevel +} +// GetDeviceThreatProtectionEnabled gets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *MacOSCompliancePolicy) GetDeviceThreatProtectionEnabled()(*bool) { + return m.deviceThreatProtectionEnabled +} +// GetDeviceThreatProtectionRequiredSecurityLevel gets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *MacOSCompliancePolicy) GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) { + return m.deviceThreatProtectionRequiredSecurityLevel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCompliancePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceCompliancePolicy.GetFieldDeserializers() + res["advancedThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["deviceThreatProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionEnabled(val) + } + return nil + } + res["deviceThreatProtectionRequiredSecurityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceThreatProtectionLevel) + if err != nil { + return err + } + if val != nil { + m.SetDeviceThreatProtectionRequiredSecurityLevel(val.(*DeviceThreatProtectionLevel)) + } + return nil + } + res["firewallBlockAllIncoming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallBlockAllIncoming(val) + } + return nil + } + res["firewallEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallEnabled(val) + } + return nil + } + res["firewallEnableStealthMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallEnableStealthMode(val) + } + return nil + } + res["gatekeeperAllowedAppSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSGatekeeperAppSources) + if err != nil { + return err + } + if val != nil { + m.SetGatekeeperAllowedAppSource(val.(*MacOSGatekeeperAppSources)) + } + return nil + } + res["osMaximumBuildVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumBuildVersion(val) + } + return nil + } + res["osMaximumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMaximumVersion(val) + } + return nil + } + res["osMinimumBuildVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumBuildVersion(val) + } + return nil + } + res["osMinimumVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsMinimumVersion(val) + } + return nil + } + res["passwordBlockSimple"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockSimple(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMinimumCharacterSetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumCharacterSetCount(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*RequiredPasswordType)) + } + return nil + } + res["storageRequireEncryption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStorageRequireEncryption(val) + } + return nil + } + res["systemIntegrityProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSystemIntegrityProtectionEnabled(val) + } + return nil + } + return res +} +// GetFirewallBlockAllIncoming gets the firewallBlockAllIncoming property value. Corresponds to the 'Block all incoming connections' option. +func (m *MacOSCompliancePolicy) GetFirewallBlockAllIncoming()(*bool) { + return m.firewallBlockAllIncoming +} +// GetFirewallEnabled gets the firewallEnabled property value. Whether the firewall should be enabled or not. +func (m *MacOSCompliancePolicy) GetFirewallEnabled()(*bool) { + return m.firewallEnabled +} +// GetFirewallEnableStealthMode gets the firewallEnableStealthMode property value. Corresponds to 'Enable stealth mode.' +func (m *MacOSCompliancePolicy) GetFirewallEnableStealthMode()(*bool) { + return m.firewallEnableStealthMode +} +// GetGatekeeperAllowedAppSource gets the gatekeeperAllowedAppSource property value. App source options for macOS Gatekeeper. +func (m *MacOSCompliancePolicy) GetGatekeeperAllowedAppSource()(*MacOSGatekeeperAppSources) { + return m.gatekeeperAllowedAppSource +} +// GetOsMaximumBuildVersion gets the osMaximumBuildVersion property value. Maximum MacOS build version. +func (m *MacOSCompliancePolicy) GetOsMaximumBuildVersion()(*string) { + return m.osMaximumBuildVersion +} +// GetOsMaximumVersion gets the osMaximumVersion property value. Maximum MacOS version. +func (m *MacOSCompliancePolicy) GetOsMaximumVersion()(*string) { + return m.osMaximumVersion +} +// GetOsMinimumBuildVersion gets the osMinimumBuildVersion property value. Minimum MacOS build version. +func (m *MacOSCompliancePolicy) GetOsMinimumBuildVersion()(*string) { + return m.osMinimumBuildVersion +} +// GetOsMinimumVersion gets the osMinimumVersion property value. Minimum MacOS version. +func (m *MacOSCompliancePolicy) GetOsMinimumVersion()(*string) { + return m.osMinimumVersion +} +// GetPasswordBlockSimple gets the passwordBlockSimple property value. Indicates whether or not to block simple passwords. +func (m *MacOSCompliancePolicy) GetPasswordBlockSimple()(*bool) { + return m.passwordBlockSimple +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 65535 +func (m *MacOSCompliancePolicy) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMinimumCharacterSetCount gets the passwordMinimumCharacterSetCount property value. The number of character sets required in the password. +func (m *MacOSCompliancePolicy) GetPasswordMinimumCharacterSetCount()(*int32) { + return m.passwordMinimumCharacterSetCount +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum length of password. Valid values 4 to 14 +func (m *MacOSCompliancePolicy) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *MacOSCompliancePolicy) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *MacOSCompliancePolicy) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Whether or not to require a password. +func (m *MacOSCompliancePolicy) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Possible values of required passwords. +func (m *MacOSCompliancePolicy) GetPasswordRequiredType()(*RequiredPasswordType) { + return m.passwordRequiredType +} +// GetStorageRequireEncryption gets the storageRequireEncryption property value. Require encryption on Mac OS devices. +func (m *MacOSCompliancePolicy) GetStorageRequireEncryption()(*bool) { + return m.storageRequireEncryption +} +// GetSystemIntegrityProtectionEnabled gets the systemIntegrityProtectionEnabled property value. Require that devices have enabled system integrity protection. +func (m *MacOSCompliancePolicy) GetSystemIntegrityProtectionEnabled()(*bool) { + return m.systemIntegrityProtectionEnabled +} +// Serialize serializes information the current object +func (m *MacOSCompliancePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceCompliancePolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetAdvancedThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("advancedThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceThreatProtectionEnabled", m.GetDeviceThreatProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetDeviceThreatProtectionRequiredSecurityLevel() != nil { + cast := (*m.GetDeviceThreatProtectionRequiredSecurityLevel()).String() + err = writer.WriteStringValue("deviceThreatProtectionRequiredSecurityLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallBlockAllIncoming", m.GetFirewallBlockAllIncoming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallEnabled", m.GetFirewallEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallEnableStealthMode", m.GetFirewallEnableStealthMode()) + if err != nil { + return err + } + } + if m.GetGatekeeperAllowedAppSource() != nil { + cast := (*m.GetGatekeeperAllowedAppSource()).String() + err = writer.WriteStringValue("gatekeeperAllowedAppSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumBuildVersion", m.GetOsMaximumBuildVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMaximumVersion", m.GetOsMaximumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumBuildVersion", m.GetOsMinimumBuildVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osMinimumVersion", m.GetOsMinimumVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockSimple", m.GetPasswordBlockSimple()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumCharacterSetCount", m.GetPasswordMinimumCharacterSetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("storageRequireEncryption", m.GetStorageRequireEncryption()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("systemIntegrityProtectionEnabled", m.GetSystemIntegrityProtectionEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionRequiredSecurityLevel sets the advancedThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *MacOSCompliancePolicy) SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.advancedThreatProtectionRequiredSecurityLevel = value +} +// SetDeviceThreatProtectionEnabled sets the deviceThreatProtectionEnabled property value. Require that devices have enabled device threat protection. +func (m *MacOSCompliancePolicy) SetDeviceThreatProtectionEnabled(value *bool)() { + m.deviceThreatProtectionEnabled = value +} +// SetDeviceThreatProtectionRequiredSecurityLevel sets the deviceThreatProtectionRequiredSecurityLevel property value. Device threat protection levels for the Device Threat Protection API. +func (m *MacOSCompliancePolicy) SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() { + m.deviceThreatProtectionRequiredSecurityLevel = value +} +// SetFirewallBlockAllIncoming sets the firewallBlockAllIncoming property value. Corresponds to the 'Block all incoming connections' option. +func (m *MacOSCompliancePolicy) SetFirewallBlockAllIncoming(value *bool)() { + m.firewallBlockAllIncoming = value +} +// SetFirewallEnabled sets the firewallEnabled property value. Whether the firewall should be enabled or not. +func (m *MacOSCompliancePolicy) SetFirewallEnabled(value *bool)() { + m.firewallEnabled = value +} +// SetFirewallEnableStealthMode sets the firewallEnableStealthMode property value. Corresponds to 'Enable stealth mode.' +func (m *MacOSCompliancePolicy) SetFirewallEnableStealthMode(value *bool)() { + m.firewallEnableStealthMode = value +} +// SetGatekeeperAllowedAppSource sets the gatekeeperAllowedAppSource property value. App source options for macOS Gatekeeper. +func (m *MacOSCompliancePolicy) SetGatekeeperAllowedAppSource(value *MacOSGatekeeperAppSources)() { + m.gatekeeperAllowedAppSource = value +} +// SetOsMaximumBuildVersion sets the osMaximumBuildVersion property value. Maximum MacOS build version. +func (m *MacOSCompliancePolicy) SetOsMaximumBuildVersion(value *string)() { + m.osMaximumBuildVersion = value +} +// SetOsMaximumVersion sets the osMaximumVersion property value. Maximum MacOS version. +func (m *MacOSCompliancePolicy) SetOsMaximumVersion(value *string)() { + m.osMaximumVersion = value +} +// SetOsMinimumBuildVersion sets the osMinimumBuildVersion property value. Minimum MacOS build version. +func (m *MacOSCompliancePolicy) SetOsMinimumBuildVersion(value *string)() { + m.osMinimumBuildVersion = value +} +// SetOsMinimumVersion sets the osMinimumVersion property value. Minimum MacOS version. +func (m *MacOSCompliancePolicy) SetOsMinimumVersion(value *string)() { + m.osMinimumVersion = value +} +// SetPasswordBlockSimple sets the passwordBlockSimple property value. Indicates whether or not to block simple passwords. +func (m *MacOSCompliancePolicy) SetPasswordBlockSimple(value *bool)() { + m.passwordBlockSimple = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. Valid values 1 to 65535 +func (m *MacOSCompliancePolicy) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMinimumCharacterSetCount sets the passwordMinimumCharacterSetCount property value. The number of character sets required in the password. +func (m *MacOSCompliancePolicy) SetPasswordMinimumCharacterSetCount(value *int32)() { + m.passwordMinimumCharacterSetCount = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum length of password. Valid values 4 to 14 +func (m *MacOSCompliancePolicy) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity before a password is required. +func (m *MacOSCompliancePolicy) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. Valid values 1 to 24 +func (m *MacOSCompliancePolicy) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Whether or not to require a password. +func (m *MacOSCompliancePolicy) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Possible values of required passwords. +func (m *MacOSCompliancePolicy) SetPasswordRequiredType(value *RequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetStorageRequireEncryption sets the storageRequireEncryption property value. Require encryption on Mac OS devices. +func (m *MacOSCompliancePolicy) SetStorageRequireEncryption(value *bool)() { + m.storageRequireEncryption = value +} +// SetSystemIntegrityProtectionEnabled sets the systemIntegrityProtectionEnabled property value. Require that devices have enabled system integrity protection. +func (m *MacOSCompliancePolicy) SetSystemIntegrityProtectionEnabled(value *bool)() { + m.systemIntegrityProtectionEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_response.go new file mode 100644 index 000000000..4397ec63c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCompliancePolicyCollectionResponse +type MacOSCompliancePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSCompliancePolicyable +} +// NewMacOSCompliancePolicyCollectionResponse instantiates a new MacOSCompliancePolicyCollectionResponse and sets the default values. +func NewMacOSCompliancePolicyCollectionResponse()(*MacOSCompliancePolicyCollectionResponse) { + m := &MacOSCompliancePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSCompliancePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCompliancePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCompliancePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCompliancePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSCompliancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSCompliancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(MacOSCompliancePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSCompliancePolicyCollectionResponse) GetValue()([]MacOSCompliancePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSCompliancePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSCompliancePolicyCollectionResponse) SetValue(value []MacOSCompliancePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_responseable.go new file mode 100644 index 000000000..97c76b26e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCompliancePolicyCollectionResponseable +type MacOSCompliancePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSCompliancePolicyable) + SetValue(value []MacOSCompliancePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policyable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policyable.go new file mode 100644 index 000000000..b1d8d6e3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_compliance_policyable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCompliancePolicyable +type MacOSCompliancePolicyable interface { + DeviceCompliancePolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetDeviceThreatProtectionEnabled()(*bool) + GetDeviceThreatProtectionRequiredSecurityLevel()(*DeviceThreatProtectionLevel) + GetFirewallBlockAllIncoming()(*bool) + GetFirewallEnabled()(*bool) + GetFirewallEnableStealthMode()(*bool) + GetGatekeeperAllowedAppSource()(*MacOSGatekeeperAppSources) + GetOsMaximumBuildVersion()(*string) + GetOsMaximumVersion()(*string) + GetOsMinimumBuildVersion()(*string) + GetOsMinimumVersion()(*string) + GetPasswordBlockSimple()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordMinimumCharacterSetCount()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*RequiredPasswordType) + GetStorageRequireEncryption()(*bool) + GetSystemIntegrityProtectionEnabled()(*bool) + SetAdvancedThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetDeviceThreatProtectionEnabled(value *bool)() + SetDeviceThreatProtectionRequiredSecurityLevel(value *DeviceThreatProtectionLevel)() + SetFirewallBlockAllIncoming(value *bool)() + SetFirewallEnabled(value *bool)() + SetFirewallEnableStealthMode(value *bool)() + SetGatekeeperAllowedAppSource(value *MacOSGatekeeperAppSources)() + SetOsMaximumBuildVersion(value *string)() + SetOsMaximumVersion(value *string)() + SetOsMinimumBuildVersion(value *string)() + SetOsMinimumVersion(value *string)() + SetPasswordBlockSimple(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMinimumCharacterSetCount(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *RequiredPasswordType)() + SetStorageRequireEncryption(value *bool)() + SetSystemIntegrityProtectionEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_client_policy.go b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_client_policy.go new file mode 100644 index 000000000..be2716889 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_client_policy.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSContentCachingClientPolicy int + +const ( + // Defaults to clients in local network. + NOTCONFIGURED_MACOSCONTENTCACHINGCLIENTPOLICY MacOSContentCachingClientPolicy = iota + // Content caches will provide content to devices only in their immediate local network. + CLIENTSINLOCALNETWORK_MACOSCONTENTCACHINGCLIENTPOLICY + // Content caches will provide content to devices that share the same public IP address. + CLIENTSWITHSAMEPUBLICIPADDRESS_MACOSCONTENTCACHINGCLIENTPOLICY + // Content caches will provide content to devices in contentCachingClientListenRanges. + CLIENTSINCUSTOMLOCALNETWORKS_MACOSCONTENTCACHINGCLIENTPOLICY + // Content caches will provide content to devices in contentCachingClientListenRanges, contentCachingPeerListenRanges, and contentCachingParents. + CLIENTSINCUSTOMLOCALNETWORKSWITHFALLBACK_MACOSCONTENTCACHINGCLIENTPOLICY +) + +func (i MacOSContentCachingClientPolicy) String() string { + return []string{"notConfigured", "clientsInLocalNetwork", "clientsWithSamePublicIpAddress", "clientsInCustomLocalNetworks", "clientsInCustomLocalNetworksWithFallback"}[i] +} +func ParseMacOSContentCachingClientPolicy(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSCONTENTCACHINGCLIENTPOLICY + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSCONTENTCACHINGCLIENTPOLICY + case "clientsInLocalNetwork": + result = CLIENTSINLOCALNETWORK_MACOSCONTENTCACHINGCLIENTPOLICY + case "clientsWithSamePublicIpAddress": + result = CLIENTSWITHSAMEPUBLICIPADDRESS_MACOSCONTENTCACHINGCLIENTPOLICY + case "clientsInCustomLocalNetworks": + result = CLIENTSINCUSTOMLOCALNETWORKS_MACOSCONTENTCACHINGCLIENTPOLICY + case "clientsInCustomLocalNetworksWithFallback": + result = CLIENTSINCUSTOMLOCALNETWORKSWITHFALLBACK_MACOSCONTENTCACHINGCLIENTPOLICY + default: + return 0, errors.New("Unknown MacOSContentCachingClientPolicy value: " + v) + } + return &result, nil +} +func SerializeMacOSContentCachingClientPolicy(values []MacOSContentCachingClientPolicy) []string { + 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/mac_o_s_content_caching_parent_selection_policy.go b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_parent_selection_policy.go new file mode 100644 index 000000000..6d3c1c498 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_parent_selection_policy.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSContentCachingParentSelectionPolicy int + +const ( + // Defaults to round-robin strategy. + NOTCONFIGURED_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY MacOSContentCachingParentSelectionPolicy = iota + // Rotate through the parents in order. Use this policy for load balancing. + ROUNDROBIN_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + // Always use the first available parent in the Parents list. Use this policy to designate permanent primary, secondary, and subsequent parents. + FIRSTAVAILABLE_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + // Hash the path part of the requested URL so that the same parent is always used for the same URL. This is useful for maximizing the size of the combined caches of the parents. + URLPATHHASH_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + // Choose a parent at random. Use this policy for load balancing. + RANDOM_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + // Use the first available parent that is available in the Parents list until it becomes unavailable, then advance to the next one. Use this policy for designating floating primary, secondary, and subsequent parents. + STICKYAVAILABLE_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY +) + +func (i MacOSContentCachingParentSelectionPolicy) String() string { + return []string{"notConfigured", "roundRobin", "firstAvailable", "urlPathHash", "random", "stickyAvailable"}[i] +} +func ParseMacOSContentCachingParentSelectionPolicy(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + case "roundRobin": + result = ROUNDROBIN_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + case "firstAvailable": + result = FIRSTAVAILABLE_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + case "urlPathHash": + result = URLPATHHASH_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + case "random": + result = RANDOM_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + case "stickyAvailable": + result = STICKYAVAILABLE_MACOSCONTENTCACHINGPARENTSELECTIONPOLICY + default: + return 0, errors.New("Unknown MacOSContentCachingParentSelectionPolicy value: " + v) + } + return &result, nil +} +func SerializeMacOSContentCachingParentSelectionPolicy(values []MacOSContentCachingParentSelectionPolicy) []string { + 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/mac_o_s_content_caching_peer_policy.go b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_peer_policy.go new file mode 100644 index 000000000..150075fe7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_peer_policy.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSContentCachingPeerPolicy int + +const ( + // Defaults to peers in local network. + NOTCONFIGURED_MACOSCONTENTCACHINGPEERPOLICY MacOSContentCachingPeerPolicy = iota + // Content caches will only peer with caches in their immediate local network. + PEERSINLOCALNETWORK_MACOSCONTENTCACHINGPEERPOLICY + // Content caches will only peer with caches that share the same public IP address. + PEERSWITHSAMEPUBLICIPADDRESS_MACOSCONTENTCACHINGPEERPOLICY + // Content caches will use contentCachingPeerFilterRanges and contentCachingPeerListenRanges to determine which caches to peer with. + PEERSINCUSTOMLOCALNETWORKS_MACOSCONTENTCACHINGPEERPOLICY +) + +func (i MacOSContentCachingPeerPolicy) String() string { + return []string{"notConfigured", "peersInLocalNetwork", "peersWithSamePublicIpAddress", "peersInCustomLocalNetworks"}[i] +} +func ParseMacOSContentCachingPeerPolicy(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSCONTENTCACHINGPEERPOLICY + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSCONTENTCACHINGPEERPOLICY + case "peersInLocalNetwork": + result = PEERSINLOCALNETWORK_MACOSCONTENTCACHINGPEERPOLICY + case "peersWithSamePublicIpAddress": + result = PEERSWITHSAMEPUBLICIPADDRESS_MACOSCONTENTCACHINGPEERPOLICY + case "peersInCustomLocalNetworks": + result = PEERSINCUSTOMLOCALNETWORKS_MACOSCONTENTCACHINGPEERPOLICY + default: + return 0, errors.New("Unknown MacOSContentCachingPeerPolicy value: " + v) + } + return &result, nil +} +func SerializeMacOSContentCachingPeerPolicy(values []MacOSContentCachingPeerPolicy) []string { + 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/mac_o_s_content_caching_type.go b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_type.go new file mode 100644 index 000000000..62c27a22a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_content_caching_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSContentCachingType int + +const ( + // Default. Both user iCloud data and non-iCloud data will be cached. + NOTCONFIGURED_MACOSCONTENTCACHINGTYPE MacOSContentCachingType = iota + // Allow Apple's content caching service to cache user iCloud data. + USERCONTENTONLY_MACOSCONTENTCACHINGTYPE + // Allow Apple's content caching service to cache non-iCloud data (e.g. app and software updates). + SHAREDCONTENTONLY_MACOSCONTENTCACHINGTYPE +) + +func (i MacOSContentCachingType) String() string { + return []string{"notConfigured", "userContentOnly", "sharedContentOnly"}[i] +} +func ParseMacOSContentCachingType(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSCONTENTCACHINGTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSCONTENTCACHINGTYPE + case "userContentOnly": + result = USERCONTENTONLY_MACOSCONTENTCACHINGTYPE + case "sharedContentOnly": + result = SHAREDCONTENTONLY_MACOSCONTENTCACHINGTYPE + default: + return 0, errors.New("Unknown MacOSContentCachingType value: " + v) + } + return &result, nil +} +func SerializeMacOSContentCachingType(values []MacOSContentCachingType) []string { + 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/mac_o_s_credential_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_credential_single_sign_on_extension.go new file mode 100644 index 000000000..673c00bd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_credential_single_sign_on_extension.go @@ -0,0 +1,178 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCredentialSingleSignOnExtension +type MacOSCredentialSingleSignOnExtension struct { + MacOSSingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string +} +// NewMacOSCredentialSingleSignOnExtension instantiates a new MacOSCredentialSingleSignOnExtension and sets the default values. +func NewMacOSCredentialSingleSignOnExtension()(*MacOSCredentialSingleSignOnExtension) { + m := &MacOSCredentialSingleSignOnExtension{ + MacOSSingleSignOnExtension: *NewMacOSSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.macOSCredentialSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSCredentialSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCredentialSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCredentialSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSCredentialSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *MacOSCredentialSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSCredentialSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCredentialSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSSingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *MacOSCredentialSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSCredentialSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *MacOSCredentialSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSCredentialSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *MacOSCredentialSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSCredentialSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *MacOSCredentialSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSCredentialSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_credential_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_credential_single_sign_on_extensionable.go new file mode 100644 index 000000000..a883d0f8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_credential_single_sign_on_extensionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCredentialSingleSignOnExtensionable +type MacOSCredentialSingleSignOnExtensionable interface { + MacOSSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurations()([]KeyTypedValuePairable) + GetDomains()([]string) + GetExtensionIdentifier()(*string) + GetRealm()(*string) + GetTeamIdentifier()(*string) + SetConfigurations(value []KeyTypedValuePairable)() + SetDomains(value []string)() + SetExtensionIdentifier(value *string)() + SetRealm(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration.go new file mode 100644 index 000000000..8a2fd272e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomAppConfiguration +type MacOSCustomAppConfiguration struct { + DeviceConfiguration + // Bundle id for targeting. + bundleId *string + // Configuration xml. (UTF8 encoded byte array) + configurationXml []byte + // Configuration file name (.plist + fileName *string +} +// NewMacOSCustomAppConfiguration instantiates a new MacOSCustomAppConfiguration and sets the default values. +func NewMacOSCustomAppConfiguration()(*MacOSCustomAppConfiguration) { + m := &MacOSCustomAppConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSCustomAppConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSCustomAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCustomAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCustomAppConfiguration(), nil +} +// GetBundleId gets the bundleId property value. Bundle id for targeting. +func (m *MacOSCustomAppConfiguration) GetBundleId()(*string) { + return m.bundleId +} +// GetConfigurationXml gets the configurationXml property value. Configuration xml. (UTF8 encoded byte array) +func (m *MacOSCustomAppConfiguration) GetConfigurationXml()([]byte) { + return m.configurationXml +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCustomAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["configurationXml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationXml(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. Configuration file name (.plist +func (m *MacOSCustomAppConfiguration) GetFileName()(*string) { + return m.fileName +} +// Serialize serializes information the current object +func (m *MacOSCustomAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("configurationXml", m.GetConfigurationXml()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + return nil +} +// SetBundleId sets the bundleId property value. Bundle id for targeting. +func (m *MacOSCustomAppConfiguration) SetBundleId(value *string)() { + m.bundleId = value +} +// SetConfigurationXml sets the configurationXml property value. Configuration xml. (UTF8 encoded byte array) +func (m *MacOSCustomAppConfiguration) SetConfigurationXml(value []byte)() { + m.configurationXml = value +} +// SetFileName sets the fileName property value. Configuration file name (.plist +func (m *MacOSCustomAppConfiguration) SetFileName(value *string)() { + m.fileName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_response.go new file mode 100644 index 000000000..365097be8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomAppConfigurationCollectionResponse +type MacOSCustomAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSCustomAppConfigurationable +} +// NewMacOSCustomAppConfigurationCollectionResponse instantiates a new MacOSCustomAppConfigurationCollectionResponse and sets the default values. +func NewMacOSCustomAppConfigurationCollectionResponse()(*MacOSCustomAppConfigurationCollectionResponse) { + m := &MacOSCustomAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSCustomAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCustomAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCustomAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCustomAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSCustomAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSCustomAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSCustomAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSCustomAppConfigurationCollectionResponse) GetValue()([]MacOSCustomAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSCustomAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSCustomAppConfigurationCollectionResponse) SetValue(value []MacOSCustomAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_responseable.go new file mode 100644 index 000000000..04ffe6092 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomAppConfigurationCollectionResponseable +type MacOSCustomAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSCustomAppConfigurationable) + SetValue(value []MacOSCustomAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configurationable.go new file mode 100644 index 000000000..f088f4e25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_app_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomAppConfigurationable +type MacOSCustomAppConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + GetConfigurationXml()([]byte) + GetFileName()(*string) + SetBundleId(value *string)() + SetConfigurationXml(value []byte)() + SetFileName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration.go new file mode 100644 index 000000000..7c12beb75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration.go @@ -0,0 +1,141 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomConfiguration +type MacOSCustomConfiguration struct { + DeviceConfiguration + // Indicates the channel used to deploy the configuration profile. Available choices are DeviceChannel, UserChannel + deploymentChannel *AppleDeploymentChannel + // Payload. (UTF8 encoded byte array) + payload []byte + // Payload file name (.mobileconfig + payloadFileName *string + // Name that is displayed to the user. + payloadName *string +} +// NewMacOSCustomConfiguration instantiates a new MacOSCustomConfiguration and sets the default values. +func NewMacOSCustomConfiguration()(*MacOSCustomConfiguration) { + m := &MacOSCustomConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSCustomConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSCustomConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCustomConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCustomConfiguration(), nil +} +// GetDeploymentChannel gets the deploymentChannel property value. Indicates the channel used to deploy the configuration profile. Available choices are DeviceChannel, UserChannel +func (m *MacOSCustomConfiguration) GetDeploymentChannel()(*AppleDeploymentChannel) { + return m.deploymentChannel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCustomConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["deploymentChannel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppleDeploymentChannel) + if err != nil { + return err + } + if val != nil { + m.SetDeploymentChannel(val.(*AppleDeploymentChannel)) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPayload(val) + } + return nil + } + res["payloadFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadFileName(val) + } + return nil + } + res["payloadName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadName(val) + } + return nil + } + return res +} +// GetPayload gets the payload property value. Payload. (UTF8 encoded byte array) +func (m *MacOSCustomConfiguration) GetPayload()([]byte) { + return m.payload +} +// GetPayloadFileName gets the payloadFileName property value. Payload file name (.mobileconfig +func (m *MacOSCustomConfiguration) GetPayloadFileName()(*string) { + return m.payloadFileName +} +// GetPayloadName gets the payloadName property value. Name that is displayed to the user. +func (m *MacOSCustomConfiguration) GetPayloadName()(*string) { + return m.payloadName +} +// Serialize serializes information the current object +func (m *MacOSCustomConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetDeploymentChannel() != nil { + cast := (*m.GetDeploymentChannel()).String() + err = writer.WriteStringValue("deploymentChannel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadFileName", m.GetPayloadFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadName", m.GetPayloadName()) + if err != nil { + return err + } + } + return nil +} +// SetDeploymentChannel sets the deploymentChannel property value. Indicates the channel used to deploy the configuration profile. Available choices are DeviceChannel, UserChannel +func (m *MacOSCustomConfiguration) SetDeploymentChannel(value *AppleDeploymentChannel)() { + m.deploymentChannel = value +} +// SetPayload sets the payload property value. Payload. (UTF8 encoded byte array) +func (m *MacOSCustomConfiguration) SetPayload(value []byte)() { + m.payload = value +} +// SetPayloadFileName sets the payloadFileName property value. Payload file name (.mobileconfig +func (m *MacOSCustomConfiguration) SetPayloadFileName(value *string)() { + m.payloadFileName = value +} +// SetPayloadName sets the payloadName property value. Name that is displayed to the user. +func (m *MacOSCustomConfiguration) SetPayloadName(value *string)() { + m.payloadName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_response.go new file mode 100644 index 000000000..327b50a43 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomConfigurationCollectionResponse +type MacOSCustomConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSCustomConfigurationable +} +// NewMacOSCustomConfigurationCollectionResponse instantiates a new MacOSCustomConfigurationCollectionResponse and sets the default values. +func NewMacOSCustomConfigurationCollectionResponse()(*MacOSCustomConfigurationCollectionResponse) { + m := &MacOSCustomConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSCustomConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSCustomConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSCustomConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSCustomConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSCustomConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSCustomConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSCustomConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSCustomConfigurationCollectionResponse) GetValue()([]MacOSCustomConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSCustomConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSCustomConfigurationCollectionResponse) SetValue(value []MacOSCustomConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_responseable.go new file mode 100644 index 000000000..35ff6cd75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomConfigurationCollectionResponseable +type MacOSCustomConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSCustomConfigurationable) + SetValue(value []MacOSCustomConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configurationable.go new file mode 100644 index 000000000..cdae7edc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_custom_configurationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSCustomConfigurationable +type MacOSCustomConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeploymentChannel()(*AppleDeploymentChannel) + GetPayload()([]byte) + GetPayloadFileName()(*string) + GetPayloadName()(*string) + SetDeploymentChannel(value *AppleDeploymentChannel)() + SetPayload(value []byte)() + SetPayloadFileName(value *string)() + SetPayloadName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration.go new file mode 100644 index 000000000..acc783337 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration.go @@ -0,0 +1,1192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDeviceFeaturesConfiguration +type MacOSDeviceFeaturesConfiguration struct { + AppleDeviceFeaturesConfigurationBase + // Whether to show admin host information on the login window. + adminShowHostInfo *bool + // Gets or sets a list that maps apps to their associated domains. Application identifiers must be unique. This collection can contain a maximum of 500 elements. + appAssociatedDomains []MacOSAssociatedDomainsItemable + // DEPRECATED: use appAssociatedDomains instead. Gets or sets a list that maps apps to their associated domains. The key should match the app's ID, and the value should be a string in the form of 'service:domain' where domain is a fully qualified hostname (e.g. webcredentials:example.com). This collection can contain a maximum of 500 elements. + associatedDomains []KeyValuePairable + // Whether to show the name and password dialog or a list of users on the login window. + authorizedUsersListHidden *bool + // Whether to hide admin users in the authorized users list on the login window. + authorizedUsersListHideAdminUsers *bool + // Whether to show only network and system users in the authorized users list on the login window. + authorizedUsersListHideLocalUsers *bool + // Whether to hide mobile users in the authorized users list on the login window. + authorizedUsersListHideMobileAccounts *bool + // Whether to show network users in the authorized users list on the login window. + authorizedUsersListIncludeNetworkUsers *bool + // Whether to show other users in the authorized users list on the login window. + authorizedUsersListShowOtherManagedUsers *bool + // List of applications, files, folders, and other items to launch when the user logs in. This collection can contain a maximum of 500 elements. + autoLaunchItems []MacOSLaunchItemable + // Whether the Other user will disregard use of the console special user name. + consoleAccessDisabled *bool + // Prevents content caches from purging content to free up disk space for other apps. + contentCachingBlockDeletion *bool + // A list of custom IP ranges content caches will use to listen for clients. This collection can contain a maximum of 500 elements. + contentCachingClientListenRanges []IpRangeable + // Determines which clients a content cache will serve. + contentCachingClientPolicy *MacOSContentCachingClientPolicy + // The path to the directory used to store cached content. The value must be (or end with) /Library/Application Support/Apple/AssetCache/Data + contentCachingDataPath *string + // Disables internet connection sharing. + contentCachingDisableConnectionSharing *bool + // Enables content caching and prevents it from being disabled by the user. + contentCachingEnabled *bool + // Forces internet connection sharing. contentCachingDisableConnectionSharing overrides this setting. + contentCachingForceConnectionSharing *bool + // Prevent the device from sleeping if content caching is enabled. + contentCachingKeepAwake *bool + // Enables logging of IP addresses and ports of clients that request cached content. + contentCachingLogClientIdentities *bool + // The maximum number of bytes of disk space that will be used for the content cache. A value of 0 (default) indicates unlimited disk space. + contentCachingMaxSizeBytes *int64 + // A list of IP addresses representing parent content caches. + contentCachingParents []string + // Determines how content caches select a parent cache. + contentCachingParentSelectionPolicy *MacOSContentCachingParentSelectionPolicy + // A list of custom IP ranges content caches will use to query for content from peers caches. This collection can contain a maximum of 500 elements. + contentCachingPeerFilterRanges []IpRangeable + // A list of custom IP ranges content caches will use to listen for peer caches. This collection can contain a maximum of 500 elements. + contentCachingPeerListenRanges []IpRangeable + // Determines which content caches other content caches will peer with. + contentCachingPeerPolicy *MacOSContentCachingPeerPolicy + // Sets the port used for content caching. If the value is 0, a random available port will be selected. Valid values 0 to 65535 + contentCachingPort *int32 + // A list of custom IP ranges that Apple's content caching service should use to match clients to content caches. This collection can contain a maximum of 500 elements. + contentCachingPublicRanges []IpRangeable + // Display content caching alerts as system notifications. + contentCachingShowAlerts *bool + // Indicates the type of content allowed to be cached by Apple's content caching service. + contentCachingType *MacOSContentCachingType + // Custom text to be displayed on the login window. + loginWindowText *string + // Whether the Log Out menu item on the login window will be disabled while the user is logged in. + logOutDisabledWhileLoggedIn *bool + // Gets or sets a single sign-on extension profile. + macOSSingleSignOnExtension MacOSSingleSignOnExtensionable + // Whether the Power Off menu item on the login window will be disabled while the user is logged in. + powerOffDisabledWhileLoggedIn *bool + // Whether to hide the Restart button item on the login window. + restartDisabled *bool + // Whether the Restart menu item on the login window will be disabled while the user is logged in. + restartDisabledWhileLoggedIn *bool + // Whether to disable the immediate screen lock functions. + screenLockDisableImmediate *bool + // Whether to hide the Shut Down button item on the login window. + shutDownDisabled *bool + // Whether the Shut Down menu item on the login window will be disabled while the user is logged in. + shutDownDisabledWhileLoggedIn *bool + // Gets or sets a single sign-on extension profile. Deprecated: use MacOSSingleSignOnExtension instead. + singleSignOnExtension SingleSignOnExtensionable + // PKINIT Certificate for the authentication with single sign-on extensions. + singleSignOnExtensionPkinitCertificate MacOSCertificateProfileBaseable + // Whether to hide the Sleep menu item on the login window. + sleepDisabled *bool +} +// NewMacOSDeviceFeaturesConfiguration instantiates a new MacOSDeviceFeaturesConfiguration and sets the default values. +func NewMacOSDeviceFeaturesConfiguration()(*MacOSDeviceFeaturesConfiguration) { + m := &MacOSDeviceFeaturesConfiguration{ + AppleDeviceFeaturesConfigurationBase: *NewAppleDeviceFeaturesConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.macOSDeviceFeaturesConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSDeviceFeaturesConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSDeviceFeaturesConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSDeviceFeaturesConfiguration(), nil +} +// GetAdminShowHostInfo gets the adminShowHostInfo property value. Whether to show admin host information on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAdminShowHostInfo()(*bool) { + return m.adminShowHostInfo +} +// GetAppAssociatedDomains gets the appAssociatedDomains property value. Gets or sets a list that maps apps to their associated domains. Application identifiers must be unique. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetAppAssociatedDomains()([]MacOSAssociatedDomainsItemable) { + return m.appAssociatedDomains +} +// GetAssociatedDomains gets the associatedDomains property value. DEPRECATED: use appAssociatedDomains instead. Gets or sets a list that maps apps to their associated domains. The key should match the app's ID, and the value should be a string in the form of 'service:domain' where domain is a fully qualified hostname (e.g. webcredentials:example.com). This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetAssociatedDomains()([]KeyValuePairable) { + return m.associatedDomains +} +// GetAuthorizedUsersListHidden gets the authorizedUsersListHidden property value. Whether to show the name and password dialog or a list of users on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListHidden()(*bool) { + return m.authorizedUsersListHidden +} +// GetAuthorizedUsersListHideAdminUsers gets the authorizedUsersListHideAdminUsers property value. Whether to hide admin users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListHideAdminUsers()(*bool) { + return m.authorizedUsersListHideAdminUsers +} +// GetAuthorizedUsersListHideLocalUsers gets the authorizedUsersListHideLocalUsers property value. Whether to show only network and system users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListHideLocalUsers()(*bool) { + return m.authorizedUsersListHideLocalUsers +} +// GetAuthorizedUsersListHideMobileAccounts gets the authorizedUsersListHideMobileAccounts property value. Whether to hide mobile users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListHideMobileAccounts()(*bool) { + return m.authorizedUsersListHideMobileAccounts +} +// GetAuthorizedUsersListIncludeNetworkUsers gets the authorizedUsersListIncludeNetworkUsers property value. Whether to show network users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListIncludeNetworkUsers()(*bool) { + return m.authorizedUsersListIncludeNetworkUsers +} +// GetAuthorizedUsersListShowOtherManagedUsers gets the authorizedUsersListShowOtherManagedUsers property value. Whether to show other users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetAuthorizedUsersListShowOtherManagedUsers()(*bool) { + return m.authorizedUsersListShowOtherManagedUsers +} +// GetAutoLaunchItems gets the autoLaunchItems property value. List of applications, files, folders, and other items to launch when the user logs in. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetAutoLaunchItems()([]MacOSLaunchItemable) { + return m.autoLaunchItems +} +// GetConsoleAccessDisabled gets the consoleAccessDisabled property value. Whether the Other user will disregard use of the console special user name. +func (m *MacOSDeviceFeaturesConfiguration) GetConsoleAccessDisabled()(*bool) { + return m.consoleAccessDisabled +} +// GetContentCachingBlockDeletion gets the contentCachingBlockDeletion property value. Prevents content caches from purging content to free up disk space for other apps. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingBlockDeletion()(*bool) { + return m.contentCachingBlockDeletion +} +// GetContentCachingClientListenRanges gets the contentCachingClientListenRanges property value. A list of custom IP ranges content caches will use to listen for clients. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingClientListenRanges()([]IpRangeable) { + return m.contentCachingClientListenRanges +} +// GetContentCachingClientPolicy gets the contentCachingClientPolicy property value. Determines which clients a content cache will serve. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingClientPolicy()(*MacOSContentCachingClientPolicy) { + return m.contentCachingClientPolicy +} +// GetContentCachingDataPath gets the contentCachingDataPath property value. The path to the directory used to store cached content. The value must be (or end with) /Library/Application Support/Apple/AssetCache/Data +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingDataPath()(*string) { + return m.contentCachingDataPath +} +// GetContentCachingDisableConnectionSharing gets the contentCachingDisableConnectionSharing property value. Disables internet connection sharing. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingDisableConnectionSharing()(*bool) { + return m.contentCachingDisableConnectionSharing +} +// GetContentCachingEnabled gets the contentCachingEnabled property value. Enables content caching and prevents it from being disabled by the user. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingEnabled()(*bool) { + return m.contentCachingEnabled +} +// GetContentCachingForceConnectionSharing gets the contentCachingForceConnectionSharing property value. Forces internet connection sharing. contentCachingDisableConnectionSharing overrides this setting. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingForceConnectionSharing()(*bool) { + return m.contentCachingForceConnectionSharing +} +// GetContentCachingKeepAwake gets the contentCachingKeepAwake property value. Prevent the device from sleeping if content caching is enabled. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingKeepAwake()(*bool) { + return m.contentCachingKeepAwake +} +// GetContentCachingLogClientIdentities gets the contentCachingLogClientIdentities property value. Enables logging of IP addresses and ports of clients that request cached content. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingLogClientIdentities()(*bool) { + return m.contentCachingLogClientIdentities +} +// GetContentCachingMaxSizeBytes gets the contentCachingMaxSizeBytes property value. The maximum number of bytes of disk space that will be used for the content cache. A value of 0 (default) indicates unlimited disk space. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingMaxSizeBytes()(*int64) { + return m.contentCachingMaxSizeBytes +} +// GetContentCachingParents gets the contentCachingParents property value. A list of IP addresses representing parent content caches. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingParents()([]string) { + return m.contentCachingParents +} +// GetContentCachingParentSelectionPolicy gets the contentCachingParentSelectionPolicy property value. Determines how content caches select a parent cache. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingParentSelectionPolicy()(*MacOSContentCachingParentSelectionPolicy) { + return m.contentCachingParentSelectionPolicy +} +// GetContentCachingPeerFilterRanges gets the contentCachingPeerFilterRanges property value. A list of custom IP ranges content caches will use to query for content from peers caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingPeerFilterRanges()([]IpRangeable) { + return m.contentCachingPeerFilterRanges +} +// GetContentCachingPeerListenRanges gets the contentCachingPeerListenRanges property value. A list of custom IP ranges content caches will use to listen for peer caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingPeerListenRanges()([]IpRangeable) { + return m.contentCachingPeerListenRanges +} +// GetContentCachingPeerPolicy gets the contentCachingPeerPolicy property value. Determines which content caches other content caches will peer with. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingPeerPolicy()(*MacOSContentCachingPeerPolicy) { + return m.contentCachingPeerPolicy +} +// GetContentCachingPort gets the contentCachingPort property value. Sets the port used for content caching. If the value is 0, a random available port will be selected. Valid values 0 to 65535 +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingPort()(*int32) { + return m.contentCachingPort +} +// GetContentCachingPublicRanges gets the contentCachingPublicRanges property value. A list of custom IP ranges that Apple's content caching service should use to match clients to content caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingPublicRanges()([]IpRangeable) { + return m.contentCachingPublicRanges +} +// GetContentCachingShowAlerts gets the contentCachingShowAlerts property value. Display content caching alerts as system notifications. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingShowAlerts()(*bool) { + return m.contentCachingShowAlerts +} +// GetContentCachingType gets the contentCachingType property value. Indicates the type of content allowed to be cached by Apple's content caching service. +func (m *MacOSDeviceFeaturesConfiguration) GetContentCachingType()(*MacOSContentCachingType) { + return m.contentCachingType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSDeviceFeaturesConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppleDeviceFeaturesConfigurationBase.GetFieldDeserializers() + res["adminShowHostInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAdminShowHostInfo(val) + } + return nil + } + res["appAssociatedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSAssociatedDomainsItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSAssociatedDomainsItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSAssociatedDomainsItemable) + } + m.SetAppAssociatedDomains(res) + } + return nil + } + res["associatedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetAssociatedDomains(res) + } + return nil + } + res["authorizedUsersListHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListHidden(val) + } + return nil + } + res["authorizedUsersListHideAdminUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListHideAdminUsers(val) + } + return nil + } + res["authorizedUsersListHideLocalUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListHideLocalUsers(val) + } + return nil + } + res["authorizedUsersListHideMobileAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListHideMobileAccounts(val) + } + return nil + } + res["authorizedUsersListIncludeNetworkUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListIncludeNetworkUsers(val) + } + return nil + } + res["authorizedUsersListShowOtherManagedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthorizedUsersListShowOtherManagedUsers(val) + } + return nil + } + res["autoLaunchItems"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSLaunchItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSLaunchItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSLaunchItemable) + } + m.SetAutoLaunchItems(res) + } + return nil + } + res["consoleAccessDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConsoleAccessDisabled(val) + } + return nil + } + res["contentCachingBlockDeletion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingBlockDeletion(val) + } + return nil + } + res["contentCachingClientListenRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetContentCachingClientListenRanges(res) + } + return nil + } + res["contentCachingClientPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSContentCachingClientPolicy) + if err != nil { + return err + } + if val != nil { + m.SetContentCachingClientPolicy(val.(*MacOSContentCachingClientPolicy)) + } + return nil + } + res["contentCachingDataPath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingDataPath(val) + } + return nil + } + res["contentCachingDisableConnectionSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingDisableConnectionSharing(val) + } + return nil + } + res["contentCachingEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingEnabled(val) + } + return nil + } + res["contentCachingForceConnectionSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingForceConnectionSharing(val) + } + return nil + } + res["contentCachingKeepAwake"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingKeepAwake(val) + } + return nil + } + res["contentCachingLogClientIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingLogClientIdentities(val) + } + return nil + } + res["contentCachingMaxSizeBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingMaxSizeBytes(val) + } + return nil + } + res["contentCachingParents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetContentCachingParents(res) + } + return nil + } + res["contentCachingParentSelectionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSContentCachingParentSelectionPolicy) + if err != nil { + return err + } + if val != nil { + m.SetContentCachingParentSelectionPolicy(val.(*MacOSContentCachingParentSelectionPolicy)) + } + return nil + } + res["contentCachingPeerFilterRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetContentCachingPeerFilterRanges(res) + } + return nil + } + res["contentCachingPeerListenRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetContentCachingPeerListenRanges(res) + } + return nil + } + res["contentCachingPeerPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSContentCachingPeerPolicy) + if err != nil { + return err + } + if val != nil { + m.SetContentCachingPeerPolicy(val.(*MacOSContentCachingPeerPolicy)) + } + return nil + } + res["contentCachingPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingPort(val) + } + return nil + } + res["contentCachingPublicRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpRangeable, len(val)) + for i, v := range val { + res[i] = v.(IpRangeable) + } + m.SetContentCachingPublicRanges(res) + } + return nil + } + res["contentCachingShowAlerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingShowAlerts(val) + } + return nil + } + res["contentCachingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSContentCachingType) + if err != nil { + return err + } + if val != nil { + m.SetContentCachingType(val.(*MacOSContentCachingType)) + } + return nil + } + res["loginWindowText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoginWindowText(val) + } + return nil + } + res["logOutDisabledWhileLoggedIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLogOutDisabledWhileLoggedIn(val) + } + return nil + } + res["macOSSingleSignOnExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSSingleSignOnExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMacOSSingleSignOnExtension(val.(MacOSSingleSignOnExtensionable)) + } + return nil + } + res["powerOffDisabledWhileLoggedIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPowerOffDisabledWhileLoggedIn(val) + } + return nil + } + res["restartDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestartDisabled(val) + } + return nil + } + res["restartDisabledWhileLoggedIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRestartDisabledWhileLoggedIn(val) + } + return nil + } + res["screenLockDisableImmediate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenLockDisableImmediate(val) + } + return nil + } + res["shutDownDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShutDownDisabled(val) + } + return nil + } + res["shutDownDisabledWhileLoggedIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShutDownDisabledWhileLoggedIn(val) + } + return nil + } + res["singleSignOnExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSingleSignOnExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnExtension(val.(SingleSignOnExtensionable)) + } + return nil + } + res["singleSignOnExtensionPkinitCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnExtensionPkinitCertificate(val.(MacOSCertificateProfileBaseable)) + } + return nil + } + res["sleepDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSleepDisabled(val) + } + return nil + } + return res +} +// GetLoginWindowText gets the loginWindowText property value. Custom text to be displayed on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetLoginWindowText()(*string) { + return m.loginWindowText +} +// GetLogOutDisabledWhileLoggedIn gets the logOutDisabledWhileLoggedIn property value. Whether the Log Out menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) GetLogOutDisabledWhileLoggedIn()(*bool) { + return m.logOutDisabledWhileLoggedIn +} +// GetMacOSSingleSignOnExtension gets the macOSSingleSignOnExtension property value. Gets or sets a single sign-on extension profile. +func (m *MacOSDeviceFeaturesConfiguration) GetMacOSSingleSignOnExtension()(MacOSSingleSignOnExtensionable) { + return m.macOSSingleSignOnExtension +} +// GetPowerOffDisabledWhileLoggedIn gets the powerOffDisabledWhileLoggedIn property value. Whether the Power Off menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) GetPowerOffDisabledWhileLoggedIn()(*bool) { + return m.powerOffDisabledWhileLoggedIn +} +// GetRestartDisabled gets the restartDisabled property value. Whether to hide the Restart button item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetRestartDisabled()(*bool) { + return m.restartDisabled +} +// GetRestartDisabledWhileLoggedIn gets the restartDisabledWhileLoggedIn property value. Whether the Restart menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) GetRestartDisabledWhileLoggedIn()(*bool) { + return m.restartDisabledWhileLoggedIn +} +// GetScreenLockDisableImmediate gets the screenLockDisableImmediate property value. Whether to disable the immediate screen lock functions. +func (m *MacOSDeviceFeaturesConfiguration) GetScreenLockDisableImmediate()(*bool) { + return m.screenLockDisableImmediate +} +// GetShutDownDisabled gets the shutDownDisabled property value. Whether to hide the Shut Down button item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetShutDownDisabled()(*bool) { + return m.shutDownDisabled +} +// GetShutDownDisabledWhileLoggedIn gets the shutDownDisabledWhileLoggedIn property value. Whether the Shut Down menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) GetShutDownDisabledWhileLoggedIn()(*bool) { + return m.shutDownDisabledWhileLoggedIn +} +// GetSingleSignOnExtension gets the singleSignOnExtension property value. Gets or sets a single sign-on extension profile. Deprecated: use MacOSSingleSignOnExtension instead. +func (m *MacOSDeviceFeaturesConfiguration) GetSingleSignOnExtension()(SingleSignOnExtensionable) { + return m.singleSignOnExtension +} +// GetSingleSignOnExtensionPkinitCertificate gets the singleSignOnExtensionPkinitCertificate property value. PKINIT Certificate for the authentication with single sign-on extensions. +func (m *MacOSDeviceFeaturesConfiguration) GetSingleSignOnExtensionPkinitCertificate()(MacOSCertificateProfileBaseable) { + return m.singleSignOnExtensionPkinitCertificate +} +// GetSleepDisabled gets the sleepDisabled property value. Whether to hide the Sleep menu item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) GetSleepDisabled()(*bool) { + return m.sleepDisabled +} +// Serialize serializes information the current object +func (m *MacOSDeviceFeaturesConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppleDeviceFeaturesConfigurationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("adminShowHostInfo", m.GetAdminShowHostInfo()) + if err != nil { + return err + } + } + if m.GetAppAssociatedDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppAssociatedDomains())) + for i, v := range m.GetAppAssociatedDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appAssociatedDomains", cast) + if err != nil { + return err + } + } + if m.GetAssociatedDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssociatedDomains())) + for i, v := range m.GetAssociatedDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("associatedDomains", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListHidden", m.GetAuthorizedUsersListHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListHideAdminUsers", m.GetAuthorizedUsersListHideAdminUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListHideLocalUsers", m.GetAuthorizedUsersListHideLocalUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListHideMobileAccounts", m.GetAuthorizedUsersListHideMobileAccounts()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListIncludeNetworkUsers", m.GetAuthorizedUsersListIncludeNetworkUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("authorizedUsersListShowOtherManagedUsers", m.GetAuthorizedUsersListShowOtherManagedUsers()) + if err != nil { + return err + } + } + if m.GetAutoLaunchItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAutoLaunchItems())) + for i, v := range m.GetAutoLaunchItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("autoLaunchItems", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("consoleAccessDisabled", m.GetConsoleAccessDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingBlockDeletion", m.GetContentCachingBlockDeletion()) + if err != nil { + return err + } + } + if m.GetContentCachingClientListenRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentCachingClientListenRanges())) + for i, v := range m.GetContentCachingClientListenRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentCachingClientListenRanges", cast) + if err != nil { + return err + } + } + if m.GetContentCachingClientPolicy() != nil { + cast := (*m.GetContentCachingClientPolicy()).String() + err = writer.WriteStringValue("contentCachingClientPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentCachingDataPath", m.GetContentCachingDataPath()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingDisableConnectionSharing", m.GetContentCachingDisableConnectionSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingEnabled", m.GetContentCachingEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingForceConnectionSharing", m.GetContentCachingForceConnectionSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingKeepAwake", m.GetContentCachingKeepAwake()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingLogClientIdentities", m.GetContentCachingLogClientIdentities()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("contentCachingMaxSizeBytes", m.GetContentCachingMaxSizeBytes()) + if err != nil { + return err + } + } + if m.GetContentCachingParents() != nil { + err = writer.WriteCollectionOfStringValues("contentCachingParents", m.GetContentCachingParents()) + if err != nil { + return err + } + } + if m.GetContentCachingParentSelectionPolicy() != nil { + cast := (*m.GetContentCachingParentSelectionPolicy()).String() + err = writer.WriteStringValue("contentCachingParentSelectionPolicy", &cast) + if err != nil { + return err + } + } + if m.GetContentCachingPeerFilterRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentCachingPeerFilterRanges())) + for i, v := range m.GetContentCachingPeerFilterRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentCachingPeerFilterRanges", cast) + if err != nil { + return err + } + } + if m.GetContentCachingPeerListenRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentCachingPeerListenRanges())) + for i, v := range m.GetContentCachingPeerListenRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentCachingPeerListenRanges", cast) + if err != nil { + return err + } + } + if m.GetContentCachingPeerPolicy() != nil { + cast := (*m.GetContentCachingPeerPolicy()).String() + err = writer.WriteStringValue("contentCachingPeerPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("contentCachingPort", m.GetContentCachingPort()) + if err != nil { + return err + } + } + if m.GetContentCachingPublicRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentCachingPublicRanges())) + for i, v := range m.GetContentCachingPublicRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentCachingPublicRanges", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingShowAlerts", m.GetContentCachingShowAlerts()) + if err != nil { + return err + } + } + if m.GetContentCachingType() != nil { + cast := (*m.GetContentCachingType()).String() + err = writer.WriteStringValue("contentCachingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("loginWindowText", m.GetLoginWindowText()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("logOutDisabledWhileLoggedIn", m.GetLogOutDisabledWhileLoggedIn()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("macOSSingleSignOnExtension", m.GetMacOSSingleSignOnExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("powerOffDisabledWhileLoggedIn", m.GetPowerOffDisabledWhileLoggedIn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restartDisabled", m.GetRestartDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("restartDisabledWhileLoggedIn", m.GetRestartDisabledWhileLoggedIn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenLockDisableImmediate", m.GetScreenLockDisableImmediate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("shutDownDisabled", m.GetShutDownDisabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("shutDownDisabledWhileLoggedIn", m.GetShutDownDisabledWhileLoggedIn()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("singleSignOnExtension", m.GetSingleSignOnExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("singleSignOnExtensionPkinitCertificate", m.GetSingleSignOnExtensionPkinitCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("sleepDisabled", m.GetSleepDisabled()) + if err != nil { + return err + } + } + return nil +} +// SetAdminShowHostInfo sets the adminShowHostInfo property value. Whether to show admin host information on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAdminShowHostInfo(value *bool)() { + m.adminShowHostInfo = value +} +// SetAppAssociatedDomains sets the appAssociatedDomains property value. Gets or sets a list that maps apps to their associated domains. Application identifiers must be unique. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetAppAssociatedDomains(value []MacOSAssociatedDomainsItemable)() { + m.appAssociatedDomains = value +} +// SetAssociatedDomains sets the associatedDomains property value. DEPRECATED: use appAssociatedDomains instead. Gets or sets a list that maps apps to their associated domains. The key should match the app's ID, and the value should be a string in the form of 'service:domain' where domain is a fully qualified hostname (e.g. webcredentials:example.com). This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetAssociatedDomains(value []KeyValuePairable)() { + m.associatedDomains = value +} +// SetAuthorizedUsersListHidden sets the authorizedUsersListHidden property value. Whether to show the name and password dialog or a list of users on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListHidden(value *bool)() { + m.authorizedUsersListHidden = value +} +// SetAuthorizedUsersListHideAdminUsers sets the authorizedUsersListHideAdminUsers property value. Whether to hide admin users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListHideAdminUsers(value *bool)() { + m.authorizedUsersListHideAdminUsers = value +} +// SetAuthorizedUsersListHideLocalUsers sets the authorizedUsersListHideLocalUsers property value. Whether to show only network and system users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListHideLocalUsers(value *bool)() { + m.authorizedUsersListHideLocalUsers = value +} +// SetAuthorizedUsersListHideMobileAccounts sets the authorizedUsersListHideMobileAccounts property value. Whether to hide mobile users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListHideMobileAccounts(value *bool)() { + m.authorizedUsersListHideMobileAccounts = value +} +// SetAuthorizedUsersListIncludeNetworkUsers sets the authorizedUsersListIncludeNetworkUsers property value. Whether to show network users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListIncludeNetworkUsers(value *bool)() { + m.authorizedUsersListIncludeNetworkUsers = value +} +// SetAuthorizedUsersListShowOtherManagedUsers sets the authorizedUsersListShowOtherManagedUsers property value. Whether to show other users in the authorized users list on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetAuthorizedUsersListShowOtherManagedUsers(value *bool)() { + m.authorizedUsersListShowOtherManagedUsers = value +} +// SetAutoLaunchItems sets the autoLaunchItems property value. List of applications, files, folders, and other items to launch when the user logs in. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetAutoLaunchItems(value []MacOSLaunchItemable)() { + m.autoLaunchItems = value +} +// SetConsoleAccessDisabled sets the consoleAccessDisabled property value. Whether the Other user will disregard use of the console special user name. +func (m *MacOSDeviceFeaturesConfiguration) SetConsoleAccessDisabled(value *bool)() { + m.consoleAccessDisabled = value +} +// SetContentCachingBlockDeletion sets the contentCachingBlockDeletion property value. Prevents content caches from purging content to free up disk space for other apps. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingBlockDeletion(value *bool)() { + m.contentCachingBlockDeletion = value +} +// SetContentCachingClientListenRanges sets the contentCachingClientListenRanges property value. A list of custom IP ranges content caches will use to listen for clients. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingClientListenRanges(value []IpRangeable)() { + m.contentCachingClientListenRanges = value +} +// SetContentCachingClientPolicy sets the contentCachingClientPolicy property value. Determines which clients a content cache will serve. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingClientPolicy(value *MacOSContentCachingClientPolicy)() { + m.contentCachingClientPolicy = value +} +// SetContentCachingDataPath sets the contentCachingDataPath property value. The path to the directory used to store cached content. The value must be (or end with) /Library/Application Support/Apple/AssetCache/Data +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingDataPath(value *string)() { + m.contentCachingDataPath = value +} +// SetContentCachingDisableConnectionSharing sets the contentCachingDisableConnectionSharing property value. Disables internet connection sharing. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingDisableConnectionSharing(value *bool)() { + m.contentCachingDisableConnectionSharing = value +} +// SetContentCachingEnabled sets the contentCachingEnabled property value. Enables content caching and prevents it from being disabled by the user. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingEnabled(value *bool)() { + m.contentCachingEnabled = value +} +// SetContentCachingForceConnectionSharing sets the contentCachingForceConnectionSharing property value. Forces internet connection sharing. contentCachingDisableConnectionSharing overrides this setting. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingForceConnectionSharing(value *bool)() { + m.contentCachingForceConnectionSharing = value +} +// SetContentCachingKeepAwake sets the contentCachingKeepAwake property value. Prevent the device from sleeping if content caching is enabled. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingKeepAwake(value *bool)() { + m.contentCachingKeepAwake = value +} +// SetContentCachingLogClientIdentities sets the contentCachingLogClientIdentities property value. Enables logging of IP addresses and ports of clients that request cached content. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingLogClientIdentities(value *bool)() { + m.contentCachingLogClientIdentities = value +} +// SetContentCachingMaxSizeBytes sets the contentCachingMaxSizeBytes property value. The maximum number of bytes of disk space that will be used for the content cache. A value of 0 (default) indicates unlimited disk space. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingMaxSizeBytes(value *int64)() { + m.contentCachingMaxSizeBytes = value +} +// SetContentCachingParents sets the contentCachingParents property value. A list of IP addresses representing parent content caches. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingParents(value []string)() { + m.contentCachingParents = value +} +// SetContentCachingParentSelectionPolicy sets the contentCachingParentSelectionPolicy property value. Determines how content caches select a parent cache. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingParentSelectionPolicy(value *MacOSContentCachingParentSelectionPolicy)() { + m.contentCachingParentSelectionPolicy = value +} +// SetContentCachingPeerFilterRanges sets the contentCachingPeerFilterRanges property value. A list of custom IP ranges content caches will use to query for content from peers caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingPeerFilterRanges(value []IpRangeable)() { + m.contentCachingPeerFilterRanges = value +} +// SetContentCachingPeerListenRanges sets the contentCachingPeerListenRanges property value. A list of custom IP ranges content caches will use to listen for peer caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingPeerListenRanges(value []IpRangeable)() { + m.contentCachingPeerListenRanges = value +} +// SetContentCachingPeerPolicy sets the contentCachingPeerPolicy property value. Determines which content caches other content caches will peer with. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingPeerPolicy(value *MacOSContentCachingPeerPolicy)() { + m.contentCachingPeerPolicy = value +} +// SetContentCachingPort sets the contentCachingPort property value. Sets the port used for content caching. If the value is 0, a random available port will be selected. Valid values 0 to 65535 +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingPort(value *int32)() { + m.contentCachingPort = value +} +// SetContentCachingPublicRanges sets the contentCachingPublicRanges property value. A list of custom IP ranges that Apple's content caching service should use to match clients to content caches. This collection can contain a maximum of 500 elements. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingPublicRanges(value []IpRangeable)() { + m.contentCachingPublicRanges = value +} +// SetContentCachingShowAlerts sets the contentCachingShowAlerts property value. Display content caching alerts as system notifications. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingShowAlerts(value *bool)() { + m.contentCachingShowAlerts = value +} +// SetContentCachingType sets the contentCachingType property value. Indicates the type of content allowed to be cached by Apple's content caching service. +func (m *MacOSDeviceFeaturesConfiguration) SetContentCachingType(value *MacOSContentCachingType)() { + m.contentCachingType = value +} +// SetLoginWindowText sets the loginWindowText property value. Custom text to be displayed on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetLoginWindowText(value *string)() { + m.loginWindowText = value +} +// SetLogOutDisabledWhileLoggedIn sets the logOutDisabledWhileLoggedIn property value. Whether the Log Out menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) SetLogOutDisabledWhileLoggedIn(value *bool)() { + m.logOutDisabledWhileLoggedIn = value +} +// SetMacOSSingleSignOnExtension sets the macOSSingleSignOnExtension property value. Gets or sets a single sign-on extension profile. +func (m *MacOSDeviceFeaturesConfiguration) SetMacOSSingleSignOnExtension(value MacOSSingleSignOnExtensionable)() { + m.macOSSingleSignOnExtension = value +} +// SetPowerOffDisabledWhileLoggedIn sets the powerOffDisabledWhileLoggedIn property value. Whether the Power Off menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) SetPowerOffDisabledWhileLoggedIn(value *bool)() { + m.powerOffDisabledWhileLoggedIn = value +} +// SetRestartDisabled sets the restartDisabled property value. Whether to hide the Restart button item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetRestartDisabled(value *bool)() { + m.restartDisabled = value +} +// SetRestartDisabledWhileLoggedIn sets the restartDisabledWhileLoggedIn property value. Whether the Restart menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) SetRestartDisabledWhileLoggedIn(value *bool)() { + m.restartDisabledWhileLoggedIn = value +} +// SetScreenLockDisableImmediate sets the screenLockDisableImmediate property value. Whether to disable the immediate screen lock functions. +func (m *MacOSDeviceFeaturesConfiguration) SetScreenLockDisableImmediate(value *bool)() { + m.screenLockDisableImmediate = value +} +// SetShutDownDisabled sets the shutDownDisabled property value. Whether to hide the Shut Down button item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetShutDownDisabled(value *bool)() { + m.shutDownDisabled = value +} +// SetShutDownDisabledWhileLoggedIn sets the shutDownDisabledWhileLoggedIn property value. Whether the Shut Down menu item on the login window will be disabled while the user is logged in. +func (m *MacOSDeviceFeaturesConfiguration) SetShutDownDisabledWhileLoggedIn(value *bool)() { + m.shutDownDisabledWhileLoggedIn = value +} +// SetSingleSignOnExtension sets the singleSignOnExtension property value. Gets or sets a single sign-on extension profile. Deprecated: use MacOSSingleSignOnExtension instead. +func (m *MacOSDeviceFeaturesConfiguration) SetSingleSignOnExtension(value SingleSignOnExtensionable)() { + m.singleSignOnExtension = value +} +// SetSingleSignOnExtensionPkinitCertificate sets the singleSignOnExtensionPkinitCertificate property value. PKINIT Certificate for the authentication with single sign-on extensions. +func (m *MacOSDeviceFeaturesConfiguration) SetSingleSignOnExtensionPkinitCertificate(value MacOSCertificateProfileBaseable)() { + m.singleSignOnExtensionPkinitCertificate = value +} +// SetSleepDisabled sets the sleepDisabled property value. Whether to hide the Sleep menu item on the login window. +func (m *MacOSDeviceFeaturesConfiguration) SetSleepDisabled(value *bool)() { + m.sleepDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_response.go new file mode 100644 index 000000000..aee04220d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDeviceFeaturesConfigurationCollectionResponse +type MacOSDeviceFeaturesConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSDeviceFeaturesConfigurationable +} +// NewMacOSDeviceFeaturesConfigurationCollectionResponse instantiates a new MacOSDeviceFeaturesConfigurationCollectionResponse and sets the default values. +func NewMacOSDeviceFeaturesConfigurationCollectionResponse()(*MacOSDeviceFeaturesConfigurationCollectionResponse) { + m := &MacOSDeviceFeaturesConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSDeviceFeaturesConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSDeviceFeaturesConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSDeviceFeaturesConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSDeviceFeaturesConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSDeviceFeaturesConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSDeviceFeaturesConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSDeviceFeaturesConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSDeviceFeaturesConfigurationCollectionResponse) GetValue()([]MacOSDeviceFeaturesConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSDeviceFeaturesConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSDeviceFeaturesConfigurationCollectionResponse) SetValue(value []MacOSDeviceFeaturesConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_responseable.go new file mode 100644 index 000000000..4f61b3cd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDeviceFeaturesConfigurationCollectionResponseable +type MacOSDeviceFeaturesConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSDeviceFeaturesConfigurationable) + SetValue(value []MacOSDeviceFeaturesConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configurationable.go new file mode 100644 index 000000000..b42119b4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_device_features_configurationable.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDeviceFeaturesConfigurationable +type MacOSDeviceFeaturesConfigurationable interface { + AppleDeviceFeaturesConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminShowHostInfo()(*bool) + GetAppAssociatedDomains()([]MacOSAssociatedDomainsItemable) + GetAssociatedDomains()([]KeyValuePairable) + GetAuthorizedUsersListHidden()(*bool) + GetAuthorizedUsersListHideAdminUsers()(*bool) + GetAuthorizedUsersListHideLocalUsers()(*bool) + GetAuthorizedUsersListHideMobileAccounts()(*bool) + GetAuthorizedUsersListIncludeNetworkUsers()(*bool) + GetAuthorizedUsersListShowOtherManagedUsers()(*bool) + GetAutoLaunchItems()([]MacOSLaunchItemable) + GetConsoleAccessDisabled()(*bool) + GetContentCachingBlockDeletion()(*bool) + GetContentCachingClientListenRanges()([]IpRangeable) + GetContentCachingClientPolicy()(*MacOSContentCachingClientPolicy) + GetContentCachingDataPath()(*string) + GetContentCachingDisableConnectionSharing()(*bool) + GetContentCachingEnabled()(*bool) + GetContentCachingForceConnectionSharing()(*bool) + GetContentCachingKeepAwake()(*bool) + GetContentCachingLogClientIdentities()(*bool) + GetContentCachingMaxSizeBytes()(*int64) + GetContentCachingParents()([]string) + GetContentCachingParentSelectionPolicy()(*MacOSContentCachingParentSelectionPolicy) + GetContentCachingPeerFilterRanges()([]IpRangeable) + GetContentCachingPeerListenRanges()([]IpRangeable) + GetContentCachingPeerPolicy()(*MacOSContentCachingPeerPolicy) + GetContentCachingPort()(*int32) + GetContentCachingPublicRanges()([]IpRangeable) + GetContentCachingShowAlerts()(*bool) + GetContentCachingType()(*MacOSContentCachingType) + GetLoginWindowText()(*string) + GetLogOutDisabledWhileLoggedIn()(*bool) + GetMacOSSingleSignOnExtension()(MacOSSingleSignOnExtensionable) + GetPowerOffDisabledWhileLoggedIn()(*bool) + GetRestartDisabled()(*bool) + GetRestartDisabledWhileLoggedIn()(*bool) + GetScreenLockDisableImmediate()(*bool) + GetShutDownDisabled()(*bool) + GetShutDownDisabledWhileLoggedIn()(*bool) + GetSingleSignOnExtension()(SingleSignOnExtensionable) + GetSingleSignOnExtensionPkinitCertificate()(MacOSCertificateProfileBaseable) + GetSleepDisabled()(*bool) + SetAdminShowHostInfo(value *bool)() + SetAppAssociatedDomains(value []MacOSAssociatedDomainsItemable)() + SetAssociatedDomains(value []KeyValuePairable)() + SetAuthorizedUsersListHidden(value *bool)() + SetAuthorizedUsersListHideAdminUsers(value *bool)() + SetAuthorizedUsersListHideLocalUsers(value *bool)() + SetAuthorizedUsersListHideMobileAccounts(value *bool)() + SetAuthorizedUsersListIncludeNetworkUsers(value *bool)() + SetAuthorizedUsersListShowOtherManagedUsers(value *bool)() + SetAutoLaunchItems(value []MacOSLaunchItemable)() + SetConsoleAccessDisabled(value *bool)() + SetContentCachingBlockDeletion(value *bool)() + SetContentCachingClientListenRanges(value []IpRangeable)() + SetContentCachingClientPolicy(value *MacOSContentCachingClientPolicy)() + SetContentCachingDataPath(value *string)() + SetContentCachingDisableConnectionSharing(value *bool)() + SetContentCachingEnabled(value *bool)() + SetContentCachingForceConnectionSharing(value *bool)() + SetContentCachingKeepAwake(value *bool)() + SetContentCachingLogClientIdentities(value *bool)() + SetContentCachingMaxSizeBytes(value *int64)() + SetContentCachingParents(value []string)() + SetContentCachingParentSelectionPolicy(value *MacOSContentCachingParentSelectionPolicy)() + SetContentCachingPeerFilterRanges(value []IpRangeable)() + SetContentCachingPeerListenRanges(value []IpRangeable)() + SetContentCachingPeerPolicy(value *MacOSContentCachingPeerPolicy)() + SetContentCachingPort(value *int32)() + SetContentCachingPublicRanges(value []IpRangeable)() + SetContentCachingShowAlerts(value *bool)() + SetContentCachingType(value *MacOSContentCachingType)() + SetLoginWindowText(value *string)() + SetLogOutDisabledWhileLoggedIn(value *bool)() + SetMacOSSingleSignOnExtension(value MacOSSingleSignOnExtensionable)() + SetPowerOffDisabledWhileLoggedIn(value *bool)() + SetRestartDisabled(value *bool)() + SetRestartDisabledWhileLoggedIn(value *bool)() + SetScreenLockDisableImmediate(value *bool)() + SetShutDownDisabled(value *bool)() + SetShutDownDisabledWhileLoggedIn(value *bool)() + SetSingleSignOnExtension(value SingleSignOnExtensionable)() + SetSingleSignOnExtensionPkinitCertificate(value MacOSCertificateProfileBaseable)() + SetSleepDisabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app.go new file mode 100644 index 000000000..f70b1a543 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app.go @@ -0,0 +1,174 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDmgApp +type MacOSDmgApp struct { + MobileLobApp + // A value indicating whether the app's version will be used to detect the app after it is installed on a device. Set this to true for apps that use a self-update feature. Set this to false to install the app when it is not already installed on the device, or if the deploying app's version number does not match the version that's already installed on the device. + ignoreVersionDetection *bool + // The list of apps expected to be installed by the DMG. + includedApps []MacOSIncludedAppable + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem MacOSMinimumOperatingSystemable + // The primary CFBundleIdentifier of the DMG. + primaryBundleId *string + // The primary CFBundleVersion of the DMG. + primaryBundleVersion *string +} +// NewMacOSDmgApp instantiates a new MacOSDmgApp and sets the default values. +func NewMacOSDmgApp()(*MacOSDmgApp) { + m := &MacOSDmgApp{ + MobileLobApp: *NewMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.macOSDmgApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSDmgAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSDmgAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSDmgApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSDmgApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileLobApp.GetFieldDeserializers() + res["ignoreVersionDetection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnoreVersionDetection(val) + } + return nil + } + res["includedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSIncludedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSIncludedAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSIncludedAppable) + } + m.SetIncludedApps(res) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(MacOSMinimumOperatingSystemable)) + } + return nil + } + res["primaryBundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryBundleId(val) + } + return nil + } + res["primaryBundleVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryBundleVersion(val) + } + return nil + } + return res +} +// GetIgnoreVersionDetection gets the ignoreVersionDetection property value. A value indicating whether the app's version will be used to detect the app after it is installed on a device. Set this to true for apps that use a self-update feature. Set this to false to install the app when it is not already installed on the device, or if the deploying app's version number does not match the version that's already installed on the device. +func (m *MacOSDmgApp) GetIgnoreVersionDetection()(*bool) { + return m.ignoreVersionDetection +} +// GetIncludedApps gets the includedApps property value. The list of apps expected to be installed by the DMG. +func (m *MacOSDmgApp) GetIncludedApps()([]MacOSIncludedAppable) { + return m.includedApps +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *MacOSDmgApp) GetMinimumSupportedOperatingSystem()(MacOSMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetPrimaryBundleId gets the primaryBundleId property value. The primary CFBundleIdentifier of the DMG. +func (m *MacOSDmgApp) GetPrimaryBundleId()(*string) { + return m.primaryBundleId +} +// GetPrimaryBundleVersion gets the primaryBundleVersion property value. The primary CFBundleVersion of the DMG. +func (m *MacOSDmgApp) GetPrimaryBundleVersion()(*string) { + return m.primaryBundleVersion +} +// Serialize serializes information the current object +func (m *MacOSDmgApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("ignoreVersionDetection", m.GetIgnoreVersionDetection()) + if err != nil { + return err + } + } + if m.GetIncludedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludedApps())) + for i, v := range m.GetIncludedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includedApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryBundleId", m.GetPrimaryBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryBundleVersion", m.GetPrimaryBundleVersion()) + if err != nil { + return err + } + } + return nil +} +// SetIgnoreVersionDetection sets the ignoreVersionDetection property value. A value indicating whether the app's version will be used to detect the app after it is installed on a device. Set this to true for apps that use a self-update feature. Set this to false to install the app when it is not already installed on the device, or if the deploying app's version number does not match the version that's already installed on the device. +func (m *MacOSDmgApp) SetIgnoreVersionDetection(value *bool)() { + m.ignoreVersionDetection = value +} +// SetIncludedApps sets the includedApps property value. The list of apps expected to be installed by the DMG. +func (m *MacOSDmgApp) SetIncludedApps(value []MacOSIncludedAppable)() { + m.includedApps = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *MacOSDmgApp) SetMinimumSupportedOperatingSystem(value MacOSMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetPrimaryBundleId sets the primaryBundleId property value. The primary CFBundleIdentifier of the DMG. +func (m *MacOSDmgApp) SetPrimaryBundleId(value *string)() { + m.primaryBundleId = value +} +// SetPrimaryBundleVersion sets the primaryBundleVersion property value. The primary CFBundleVersion of the DMG. +func (m *MacOSDmgApp) SetPrimaryBundleVersion(value *string)() { + m.primaryBundleVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_response.go new file mode 100644 index 000000000..31621426e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDmgAppCollectionResponse +type MacOSDmgAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSDmgAppable +} +// NewMacOSDmgAppCollectionResponse instantiates a new MacOSDmgAppCollectionResponse and sets the default values. +func NewMacOSDmgAppCollectionResponse()(*MacOSDmgAppCollectionResponse) { + m := &MacOSDmgAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSDmgAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSDmgAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSDmgAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSDmgAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSDmgAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSDmgAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSDmgAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSDmgAppCollectionResponse) GetValue()([]MacOSDmgAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSDmgAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSDmgAppCollectionResponse) SetValue(value []MacOSDmgAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_responseable.go new file mode 100644 index 000000000..e71128d10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDmgAppCollectionResponseable +type MacOSDmgAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSDmgAppable) + SetValue(value []MacOSDmgAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_appable.go new file mode 100644 index 000000000..329d02460 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_dmg_appable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSDmgAppable +type MacOSDmgAppable interface { + MobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIgnoreVersionDetection()(*bool) + GetIncludedApps()([]MacOSIncludedAppable) + GetMinimumSupportedOperatingSystem()(MacOSMinimumOperatingSystemable) + GetPrimaryBundleId()(*string) + GetPrimaryBundleVersion()(*string) + SetIgnoreVersionDetection(value *bool)() + SetIncludedApps(value []MacOSIncludedAppable)() + SetMinimumSupportedOperatingSystem(value MacOSMinimumOperatingSystemable)() + SetPrimaryBundleId(value *string)() + SetPrimaryBundleVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration.go new file mode 100644 index 000000000..3e550be07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration.go @@ -0,0 +1,690 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEndpointProtectionConfiguration +type MacOSEndpointProtectionConfiguration struct { + DeviceConfiguration + // Possible values of a property + advancedThreatProtectionAutomaticSampleSubmission *Enablement + // Possible values of a property + advancedThreatProtectionCloudDelivered *Enablement + // Possible values of a property + advancedThreatProtectionDiagnosticDataCollection *Enablement + // A list of file extensions to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. + advancedThreatProtectionExcludedExtensions []string + // A list of paths to files to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. + advancedThreatProtectionExcludedFiles []string + // A list of paths to folders to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. + advancedThreatProtectionExcludedFolders []string + // A list of process names to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. + advancedThreatProtectionExcludedProcesses []string + // Possible values of a property + advancedThreatProtectionRealTime *Enablement + // Optional. If set to true, the user can defer the enabling of FileVault until they sign out. + fileVaultAllowDeferralUntilSignOut *bool + // Optional. When using the Defer option, if set to true, the user is not prompted to enable FileVault at sign-out. + fileVaultDisablePromptAtSignOut *bool + // Whether FileVault should be enabled or not. + fileVaultEnabled *bool + // Optional. A hidden personal recovery key does not appear on the user's screen during FileVault encryption, reducing the risk of it ending up in the wrong hands. + fileVaultHidePersonalRecoveryKey *bool + // Required if selected recovery key type(s) include InstitutionalRecoveryKey. The DER Encoded certificate file used to set an institutional recovery key. + fileVaultInstitutionalRecoveryKeyCertificate []byte + // File name of the institutional recovery key certificate to display in UI. (.der). + fileVaultInstitutionalRecoveryKeyCertificateFileName *string + // Optional. When using the Defer option, this is the maximum number of times the user can ignore prompts to enable FileVault before FileVault will be required for the user to sign in. If set to -1, it will always prompt to enable FileVault until FileVault is enabled, though it will allow the user to bypass enabling FileVault. Setting this to 0 will disable the feature. + fileVaultNumberOfTimesUserCanIgnore *int32 + // Required if selected recovery key type(s) include PersonalRecoveryKey. A short message displayed to the user that explains how they can retrieve their personal recovery key. + fileVaultPersonalRecoveryKeyHelpMessage *string + // Optional. If selected recovery key type(s) include PersonalRecoveryKey, the frequency to rotate that key, in months. + fileVaultPersonalRecoveryKeyRotationInMonths *int32 + // Recovery key types for macOS FileVault + fileVaultSelectedRecoveryKeyTypes *MacOSFileVaultRecoveryKeyTypes + // List of applications with firewall settings. Firewall settings for applications not on this list are determined by the user. This collection can contain a maximum of 500 elements. + firewallApplications []MacOSFirewallApplicationable + // Corresponds to the 'Block all incoming connections' option. + firewallBlockAllIncoming *bool + // Whether the firewall should be enabled or not. + firewallEnabled *bool + // Corresponds to 'Enable stealth mode.' + firewallEnableStealthMode *bool + // App source options for macOS Gatekeeper. + gatekeeperAllowedAppSource *MacOSGatekeeperAppSources + // If set to true, the user override for Gatekeeper will be disabled. + gatekeeperBlockOverride *bool +} +// NewMacOSEndpointProtectionConfiguration instantiates a new MacOSEndpointProtectionConfiguration and sets the default values. +func NewMacOSEndpointProtectionConfiguration()(*MacOSEndpointProtectionConfiguration) { + m := &MacOSEndpointProtectionConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSEndpointProtectionConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSEndpointProtectionConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSEndpointProtectionConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSEndpointProtectionConfiguration(), nil +} +// GetAdvancedThreatProtectionAutomaticSampleSubmission gets the advancedThreatProtectionAutomaticSampleSubmission property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionAutomaticSampleSubmission()(*Enablement) { + return m.advancedThreatProtectionAutomaticSampleSubmission +} +// GetAdvancedThreatProtectionCloudDelivered gets the advancedThreatProtectionCloudDelivered property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionCloudDelivered()(*Enablement) { + return m.advancedThreatProtectionCloudDelivered +} +// GetAdvancedThreatProtectionDiagnosticDataCollection gets the advancedThreatProtectionDiagnosticDataCollection property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionDiagnosticDataCollection()(*Enablement) { + return m.advancedThreatProtectionDiagnosticDataCollection +} +// GetAdvancedThreatProtectionExcludedExtensions gets the advancedThreatProtectionExcludedExtensions property value. A list of file extensions to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionExcludedExtensions()([]string) { + return m.advancedThreatProtectionExcludedExtensions +} +// GetAdvancedThreatProtectionExcludedFiles gets the advancedThreatProtectionExcludedFiles property value. A list of paths to files to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionExcludedFiles()([]string) { + return m.advancedThreatProtectionExcludedFiles +} +// GetAdvancedThreatProtectionExcludedFolders gets the advancedThreatProtectionExcludedFolders property value. A list of paths to folders to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionExcludedFolders()([]string) { + return m.advancedThreatProtectionExcludedFolders +} +// GetAdvancedThreatProtectionExcludedProcesses gets the advancedThreatProtectionExcludedProcesses property value. A list of process names to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionExcludedProcesses()([]string) { + return m.advancedThreatProtectionExcludedProcesses +} +// GetAdvancedThreatProtectionRealTime gets the advancedThreatProtectionRealTime property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) GetAdvancedThreatProtectionRealTime()(*Enablement) { + return m.advancedThreatProtectionRealTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSEndpointProtectionConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["advancedThreatProtectionAutomaticSampleSubmission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionAutomaticSampleSubmission(val.(*Enablement)) + } + return nil + } + res["advancedThreatProtectionCloudDelivered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionCloudDelivered(val.(*Enablement)) + } + return nil + } + res["advancedThreatProtectionDiagnosticDataCollection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionDiagnosticDataCollection(val.(*Enablement)) + } + return nil + } + res["advancedThreatProtectionExcludedExtensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdvancedThreatProtectionExcludedExtensions(res) + } + return nil + } + res["advancedThreatProtectionExcludedFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdvancedThreatProtectionExcludedFiles(res) + } + return nil + } + res["advancedThreatProtectionExcludedFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdvancedThreatProtectionExcludedFolders(res) + } + return nil + } + res["advancedThreatProtectionExcludedProcesses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdvancedThreatProtectionExcludedProcesses(res) + } + return nil + } + res["advancedThreatProtectionRealTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedThreatProtectionRealTime(val.(*Enablement)) + } + return nil + } + res["fileVaultAllowDeferralUntilSignOut"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultAllowDeferralUntilSignOut(val) + } + return nil + } + res["fileVaultDisablePromptAtSignOut"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultDisablePromptAtSignOut(val) + } + return nil + } + res["fileVaultEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultEnabled(val) + } + return nil + } + res["fileVaultHidePersonalRecoveryKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultHidePersonalRecoveryKey(val) + } + return nil + } + res["fileVaultInstitutionalRecoveryKeyCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultInstitutionalRecoveryKeyCertificate(val) + } + return nil + } + res["fileVaultInstitutionalRecoveryKeyCertificateFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultInstitutionalRecoveryKeyCertificateFileName(val) + } + return nil + } + res["fileVaultNumberOfTimesUserCanIgnore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultNumberOfTimesUserCanIgnore(val) + } + return nil + } + res["fileVaultPersonalRecoveryKeyHelpMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultPersonalRecoveryKeyHelpMessage(val) + } + return nil + } + res["fileVaultPersonalRecoveryKeyRotationInMonths"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFileVaultPersonalRecoveryKeyRotationInMonths(val) + } + return nil + } + res["fileVaultSelectedRecoveryKeyTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSFileVaultRecoveryKeyTypes) + if err != nil { + return err + } + if val != nil { + m.SetFileVaultSelectedRecoveryKeyTypes(val.(*MacOSFileVaultRecoveryKeyTypes)) + } + return nil + } + res["firewallApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSFirewallApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSFirewallApplicationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSFirewallApplicationable) + } + m.SetFirewallApplications(res) + } + return nil + } + res["firewallBlockAllIncoming"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallBlockAllIncoming(val) + } + return nil + } + res["firewallEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallEnabled(val) + } + return nil + } + res["firewallEnableStealthMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFirewallEnableStealthMode(val) + } + return nil + } + res["gatekeeperAllowedAppSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSGatekeeperAppSources) + if err != nil { + return err + } + if val != nil { + m.SetGatekeeperAllowedAppSource(val.(*MacOSGatekeeperAppSources)) + } + return nil + } + res["gatekeeperBlockOverride"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGatekeeperBlockOverride(val) + } + return nil + } + return res +} +// GetFileVaultAllowDeferralUntilSignOut gets the fileVaultAllowDeferralUntilSignOut property value. Optional. If set to true, the user can defer the enabling of FileVault until they sign out. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultAllowDeferralUntilSignOut()(*bool) { + return m.fileVaultAllowDeferralUntilSignOut +} +// GetFileVaultDisablePromptAtSignOut gets the fileVaultDisablePromptAtSignOut property value. Optional. When using the Defer option, if set to true, the user is not prompted to enable FileVault at sign-out. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultDisablePromptAtSignOut()(*bool) { + return m.fileVaultDisablePromptAtSignOut +} +// GetFileVaultEnabled gets the fileVaultEnabled property value. Whether FileVault should be enabled or not. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultEnabled()(*bool) { + return m.fileVaultEnabled +} +// GetFileVaultHidePersonalRecoveryKey gets the fileVaultHidePersonalRecoveryKey property value. Optional. A hidden personal recovery key does not appear on the user's screen during FileVault encryption, reducing the risk of it ending up in the wrong hands. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultHidePersonalRecoveryKey()(*bool) { + return m.fileVaultHidePersonalRecoveryKey +} +// GetFileVaultInstitutionalRecoveryKeyCertificate gets the fileVaultInstitutionalRecoveryKeyCertificate property value. Required if selected recovery key type(s) include InstitutionalRecoveryKey. The DER Encoded certificate file used to set an institutional recovery key. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultInstitutionalRecoveryKeyCertificate()([]byte) { + return m.fileVaultInstitutionalRecoveryKeyCertificate +} +// GetFileVaultInstitutionalRecoveryKeyCertificateFileName gets the fileVaultInstitutionalRecoveryKeyCertificateFileName property value. File name of the institutional recovery key certificate to display in UI. (.der). +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultInstitutionalRecoveryKeyCertificateFileName()(*string) { + return m.fileVaultInstitutionalRecoveryKeyCertificateFileName +} +// GetFileVaultNumberOfTimesUserCanIgnore gets the fileVaultNumberOfTimesUserCanIgnore property value. Optional. When using the Defer option, this is the maximum number of times the user can ignore prompts to enable FileVault before FileVault will be required for the user to sign in. If set to -1, it will always prompt to enable FileVault until FileVault is enabled, though it will allow the user to bypass enabling FileVault. Setting this to 0 will disable the feature. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultNumberOfTimesUserCanIgnore()(*int32) { + return m.fileVaultNumberOfTimesUserCanIgnore +} +// GetFileVaultPersonalRecoveryKeyHelpMessage gets the fileVaultPersonalRecoveryKeyHelpMessage property value. Required if selected recovery key type(s) include PersonalRecoveryKey. A short message displayed to the user that explains how they can retrieve their personal recovery key. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultPersonalRecoveryKeyHelpMessage()(*string) { + return m.fileVaultPersonalRecoveryKeyHelpMessage +} +// GetFileVaultPersonalRecoveryKeyRotationInMonths gets the fileVaultPersonalRecoveryKeyRotationInMonths property value. Optional. If selected recovery key type(s) include PersonalRecoveryKey, the frequency to rotate that key, in months. +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultPersonalRecoveryKeyRotationInMonths()(*int32) { + return m.fileVaultPersonalRecoveryKeyRotationInMonths +} +// GetFileVaultSelectedRecoveryKeyTypes gets the fileVaultSelectedRecoveryKeyTypes property value. Recovery key types for macOS FileVault +func (m *MacOSEndpointProtectionConfiguration) GetFileVaultSelectedRecoveryKeyTypes()(*MacOSFileVaultRecoveryKeyTypes) { + return m.fileVaultSelectedRecoveryKeyTypes +} +// GetFirewallApplications gets the firewallApplications property value. List of applications with firewall settings. Firewall settings for applications not on this list are determined by the user. This collection can contain a maximum of 500 elements. +func (m *MacOSEndpointProtectionConfiguration) GetFirewallApplications()([]MacOSFirewallApplicationable) { + return m.firewallApplications +} +// GetFirewallBlockAllIncoming gets the firewallBlockAllIncoming property value. Corresponds to the 'Block all incoming connections' option. +func (m *MacOSEndpointProtectionConfiguration) GetFirewallBlockAllIncoming()(*bool) { + return m.firewallBlockAllIncoming +} +// GetFirewallEnabled gets the firewallEnabled property value. Whether the firewall should be enabled or not. +func (m *MacOSEndpointProtectionConfiguration) GetFirewallEnabled()(*bool) { + return m.firewallEnabled +} +// GetFirewallEnableStealthMode gets the firewallEnableStealthMode property value. Corresponds to 'Enable stealth mode.' +func (m *MacOSEndpointProtectionConfiguration) GetFirewallEnableStealthMode()(*bool) { + return m.firewallEnableStealthMode +} +// GetGatekeeperAllowedAppSource gets the gatekeeperAllowedAppSource property value. App source options for macOS Gatekeeper. +func (m *MacOSEndpointProtectionConfiguration) GetGatekeeperAllowedAppSource()(*MacOSGatekeeperAppSources) { + return m.gatekeeperAllowedAppSource +} +// GetGatekeeperBlockOverride gets the gatekeeperBlockOverride property value. If set to true, the user override for Gatekeeper will be disabled. +func (m *MacOSEndpointProtectionConfiguration) GetGatekeeperBlockOverride()(*bool) { + return m.gatekeeperBlockOverride +} +// Serialize serializes information the current object +func (m *MacOSEndpointProtectionConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedThreatProtectionAutomaticSampleSubmission() != nil { + cast := (*m.GetAdvancedThreatProtectionAutomaticSampleSubmission()).String() + err = writer.WriteStringValue("advancedThreatProtectionAutomaticSampleSubmission", &cast) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionCloudDelivered() != nil { + cast := (*m.GetAdvancedThreatProtectionCloudDelivered()).String() + err = writer.WriteStringValue("advancedThreatProtectionCloudDelivered", &cast) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionDiagnosticDataCollection() != nil { + cast := (*m.GetAdvancedThreatProtectionDiagnosticDataCollection()).String() + err = writer.WriteStringValue("advancedThreatProtectionDiagnosticDataCollection", &cast) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionExcludedExtensions() != nil { + err = writer.WriteCollectionOfStringValues("advancedThreatProtectionExcludedExtensions", m.GetAdvancedThreatProtectionExcludedExtensions()) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionExcludedFiles() != nil { + err = writer.WriteCollectionOfStringValues("advancedThreatProtectionExcludedFiles", m.GetAdvancedThreatProtectionExcludedFiles()) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionExcludedFolders() != nil { + err = writer.WriteCollectionOfStringValues("advancedThreatProtectionExcludedFolders", m.GetAdvancedThreatProtectionExcludedFolders()) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionExcludedProcesses() != nil { + err = writer.WriteCollectionOfStringValues("advancedThreatProtectionExcludedProcesses", m.GetAdvancedThreatProtectionExcludedProcesses()) + if err != nil { + return err + } + } + if m.GetAdvancedThreatProtectionRealTime() != nil { + cast := (*m.GetAdvancedThreatProtectionRealTime()).String() + err = writer.WriteStringValue("advancedThreatProtectionRealTime", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fileVaultAllowDeferralUntilSignOut", m.GetFileVaultAllowDeferralUntilSignOut()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fileVaultDisablePromptAtSignOut", m.GetFileVaultDisablePromptAtSignOut()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fileVaultEnabled", m.GetFileVaultEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fileVaultHidePersonalRecoveryKey", m.GetFileVaultHidePersonalRecoveryKey()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("fileVaultInstitutionalRecoveryKeyCertificate", m.GetFileVaultInstitutionalRecoveryKeyCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileVaultInstitutionalRecoveryKeyCertificateFileName", m.GetFileVaultInstitutionalRecoveryKeyCertificateFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fileVaultNumberOfTimesUserCanIgnore", m.GetFileVaultNumberOfTimesUserCanIgnore()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileVaultPersonalRecoveryKeyHelpMessage", m.GetFileVaultPersonalRecoveryKeyHelpMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fileVaultPersonalRecoveryKeyRotationInMonths", m.GetFileVaultPersonalRecoveryKeyRotationInMonths()) + if err != nil { + return err + } + } + if m.GetFileVaultSelectedRecoveryKeyTypes() != nil { + cast := (*m.GetFileVaultSelectedRecoveryKeyTypes()).String() + err = writer.WriteStringValue("fileVaultSelectedRecoveryKeyTypes", &cast) + if err != nil { + return err + } + } + if m.GetFirewallApplications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFirewallApplications())) + for i, v := range m.GetFirewallApplications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("firewallApplications", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallBlockAllIncoming", m.GetFirewallBlockAllIncoming()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallEnabled", m.GetFirewallEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("firewallEnableStealthMode", m.GetFirewallEnableStealthMode()) + if err != nil { + return err + } + } + if m.GetGatekeeperAllowedAppSource() != nil { + cast := (*m.GetGatekeeperAllowedAppSource()).String() + err = writer.WriteStringValue("gatekeeperAllowedAppSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("gatekeeperBlockOverride", m.GetGatekeeperBlockOverride()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedThreatProtectionAutomaticSampleSubmission sets the advancedThreatProtectionAutomaticSampleSubmission property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionAutomaticSampleSubmission(value *Enablement)() { + m.advancedThreatProtectionAutomaticSampleSubmission = value +} +// SetAdvancedThreatProtectionCloudDelivered sets the advancedThreatProtectionCloudDelivered property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionCloudDelivered(value *Enablement)() { + m.advancedThreatProtectionCloudDelivered = value +} +// SetAdvancedThreatProtectionDiagnosticDataCollection sets the advancedThreatProtectionDiagnosticDataCollection property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionDiagnosticDataCollection(value *Enablement)() { + m.advancedThreatProtectionDiagnosticDataCollection = value +} +// SetAdvancedThreatProtectionExcludedExtensions sets the advancedThreatProtectionExcludedExtensions property value. A list of file extensions to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionExcludedExtensions(value []string)() { + m.advancedThreatProtectionExcludedExtensions = value +} +// SetAdvancedThreatProtectionExcludedFiles sets the advancedThreatProtectionExcludedFiles property value. A list of paths to files to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionExcludedFiles(value []string)() { + m.advancedThreatProtectionExcludedFiles = value +} +// SetAdvancedThreatProtectionExcludedFolders sets the advancedThreatProtectionExcludedFolders property value. A list of paths to folders to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionExcludedFolders(value []string)() { + m.advancedThreatProtectionExcludedFolders = value +} +// SetAdvancedThreatProtectionExcludedProcesses sets the advancedThreatProtectionExcludedProcesses property value. A list of process names to exclude from antivirus scanning for Microsoft Defender Advanced Threat Protection on macOS. +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionExcludedProcesses(value []string)() { + m.advancedThreatProtectionExcludedProcesses = value +} +// SetAdvancedThreatProtectionRealTime sets the advancedThreatProtectionRealTime property value. Possible values of a property +func (m *MacOSEndpointProtectionConfiguration) SetAdvancedThreatProtectionRealTime(value *Enablement)() { + m.advancedThreatProtectionRealTime = value +} +// SetFileVaultAllowDeferralUntilSignOut sets the fileVaultAllowDeferralUntilSignOut property value. Optional. If set to true, the user can defer the enabling of FileVault until they sign out. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultAllowDeferralUntilSignOut(value *bool)() { + m.fileVaultAllowDeferralUntilSignOut = value +} +// SetFileVaultDisablePromptAtSignOut sets the fileVaultDisablePromptAtSignOut property value. Optional. When using the Defer option, if set to true, the user is not prompted to enable FileVault at sign-out. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultDisablePromptAtSignOut(value *bool)() { + m.fileVaultDisablePromptAtSignOut = value +} +// SetFileVaultEnabled sets the fileVaultEnabled property value. Whether FileVault should be enabled or not. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultEnabled(value *bool)() { + m.fileVaultEnabled = value +} +// SetFileVaultHidePersonalRecoveryKey sets the fileVaultHidePersonalRecoveryKey property value. Optional. A hidden personal recovery key does not appear on the user's screen during FileVault encryption, reducing the risk of it ending up in the wrong hands. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultHidePersonalRecoveryKey(value *bool)() { + m.fileVaultHidePersonalRecoveryKey = value +} +// SetFileVaultInstitutionalRecoveryKeyCertificate sets the fileVaultInstitutionalRecoveryKeyCertificate property value. Required if selected recovery key type(s) include InstitutionalRecoveryKey. The DER Encoded certificate file used to set an institutional recovery key. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultInstitutionalRecoveryKeyCertificate(value []byte)() { + m.fileVaultInstitutionalRecoveryKeyCertificate = value +} +// SetFileVaultInstitutionalRecoveryKeyCertificateFileName sets the fileVaultInstitutionalRecoveryKeyCertificateFileName property value. File name of the institutional recovery key certificate to display in UI. (.der). +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultInstitutionalRecoveryKeyCertificateFileName(value *string)() { + m.fileVaultInstitutionalRecoveryKeyCertificateFileName = value +} +// SetFileVaultNumberOfTimesUserCanIgnore sets the fileVaultNumberOfTimesUserCanIgnore property value. Optional. When using the Defer option, this is the maximum number of times the user can ignore prompts to enable FileVault before FileVault will be required for the user to sign in. If set to -1, it will always prompt to enable FileVault until FileVault is enabled, though it will allow the user to bypass enabling FileVault. Setting this to 0 will disable the feature. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultNumberOfTimesUserCanIgnore(value *int32)() { + m.fileVaultNumberOfTimesUserCanIgnore = value +} +// SetFileVaultPersonalRecoveryKeyHelpMessage sets the fileVaultPersonalRecoveryKeyHelpMessage property value. Required if selected recovery key type(s) include PersonalRecoveryKey. A short message displayed to the user that explains how they can retrieve their personal recovery key. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultPersonalRecoveryKeyHelpMessage(value *string)() { + m.fileVaultPersonalRecoveryKeyHelpMessage = value +} +// SetFileVaultPersonalRecoveryKeyRotationInMonths sets the fileVaultPersonalRecoveryKeyRotationInMonths property value. Optional. If selected recovery key type(s) include PersonalRecoveryKey, the frequency to rotate that key, in months. +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultPersonalRecoveryKeyRotationInMonths(value *int32)() { + m.fileVaultPersonalRecoveryKeyRotationInMonths = value +} +// SetFileVaultSelectedRecoveryKeyTypes sets the fileVaultSelectedRecoveryKeyTypes property value. Recovery key types for macOS FileVault +func (m *MacOSEndpointProtectionConfiguration) SetFileVaultSelectedRecoveryKeyTypes(value *MacOSFileVaultRecoveryKeyTypes)() { + m.fileVaultSelectedRecoveryKeyTypes = value +} +// SetFirewallApplications sets the firewallApplications property value. List of applications with firewall settings. Firewall settings for applications not on this list are determined by the user. This collection can contain a maximum of 500 elements. +func (m *MacOSEndpointProtectionConfiguration) SetFirewallApplications(value []MacOSFirewallApplicationable)() { + m.firewallApplications = value +} +// SetFirewallBlockAllIncoming sets the firewallBlockAllIncoming property value. Corresponds to the 'Block all incoming connections' option. +func (m *MacOSEndpointProtectionConfiguration) SetFirewallBlockAllIncoming(value *bool)() { + m.firewallBlockAllIncoming = value +} +// SetFirewallEnabled sets the firewallEnabled property value. Whether the firewall should be enabled or not. +func (m *MacOSEndpointProtectionConfiguration) SetFirewallEnabled(value *bool)() { + m.firewallEnabled = value +} +// SetFirewallEnableStealthMode sets the firewallEnableStealthMode property value. Corresponds to 'Enable stealth mode.' +func (m *MacOSEndpointProtectionConfiguration) SetFirewallEnableStealthMode(value *bool)() { + m.firewallEnableStealthMode = value +} +// SetGatekeeperAllowedAppSource sets the gatekeeperAllowedAppSource property value. App source options for macOS Gatekeeper. +func (m *MacOSEndpointProtectionConfiguration) SetGatekeeperAllowedAppSource(value *MacOSGatekeeperAppSources)() { + m.gatekeeperAllowedAppSource = value +} +// SetGatekeeperBlockOverride sets the gatekeeperBlockOverride property value. If set to true, the user override for Gatekeeper will be disabled. +func (m *MacOSEndpointProtectionConfiguration) SetGatekeeperBlockOverride(value *bool)() { + m.gatekeeperBlockOverride = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_response.go new file mode 100644 index 000000000..cd93cebee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEndpointProtectionConfigurationCollectionResponse +type MacOSEndpointProtectionConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSEndpointProtectionConfigurationable +} +// NewMacOSEndpointProtectionConfigurationCollectionResponse instantiates a new MacOSEndpointProtectionConfigurationCollectionResponse and sets the default values. +func NewMacOSEndpointProtectionConfigurationCollectionResponse()(*MacOSEndpointProtectionConfigurationCollectionResponse) { + m := &MacOSEndpointProtectionConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSEndpointProtectionConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSEndpointProtectionConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSEndpointProtectionConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSEndpointProtectionConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSEndpointProtectionConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSEndpointProtectionConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSEndpointProtectionConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSEndpointProtectionConfigurationCollectionResponse) GetValue()([]MacOSEndpointProtectionConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSEndpointProtectionConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSEndpointProtectionConfigurationCollectionResponse) SetValue(value []MacOSEndpointProtectionConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_responseable.go new file mode 100644 index 000000000..32ed6c159 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEndpointProtectionConfigurationCollectionResponseable +type MacOSEndpointProtectionConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSEndpointProtectionConfigurationable) + SetValue(value []MacOSEndpointProtectionConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configurationable.go new file mode 100644 index 000000000..4880cbb9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_endpoint_protection_configurationable.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEndpointProtectionConfigurationable +type MacOSEndpointProtectionConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedThreatProtectionAutomaticSampleSubmission()(*Enablement) + GetAdvancedThreatProtectionCloudDelivered()(*Enablement) + GetAdvancedThreatProtectionDiagnosticDataCollection()(*Enablement) + GetAdvancedThreatProtectionExcludedExtensions()([]string) + GetAdvancedThreatProtectionExcludedFiles()([]string) + GetAdvancedThreatProtectionExcludedFolders()([]string) + GetAdvancedThreatProtectionExcludedProcesses()([]string) + GetAdvancedThreatProtectionRealTime()(*Enablement) + GetFileVaultAllowDeferralUntilSignOut()(*bool) + GetFileVaultDisablePromptAtSignOut()(*bool) + GetFileVaultEnabled()(*bool) + GetFileVaultHidePersonalRecoveryKey()(*bool) + GetFileVaultInstitutionalRecoveryKeyCertificate()([]byte) + GetFileVaultInstitutionalRecoveryKeyCertificateFileName()(*string) + GetFileVaultNumberOfTimesUserCanIgnore()(*int32) + GetFileVaultPersonalRecoveryKeyHelpMessage()(*string) + GetFileVaultPersonalRecoveryKeyRotationInMonths()(*int32) + GetFileVaultSelectedRecoveryKeyTypes()(*MacOSFileVaultRecoveryKeyTypes) + GetFirewallApplications()([]MacOSFirewallApplicationable) + GetFirewallBlockAllIncoming()(*bool) + GetFirewallEnabled()(*bool) + GetFirewallEnableStealthMode()(*bool) + GetGatekeeperAllowedAppSource()(*MacOSGatekeeperAppSources) + GetGatekeeperBlockOverride()(*bool) + SetAdvancedThreatProtectionAutomaticSampleSubmission(value *Enablement)() + SetAdvancedThreatProtectionCloudDelivered(value *Enablement)() + SetAdvancedThreatProtectionDiagnosticDataCollection(value *Enablement)() + SetAdvancedThreatProtectionExcludedExtensions(value []string)() + SetAdvancedThreatProtectionExcludedFiles(value []string)() + SetAdvancedThreatProtectionExcludedFolders(value []string)() + SetAdvancedThreatProtectionExcludedProcesses(value []string)() + SetAdvancedThreatProtectionRealTime(value *Enablement)() + SetFileVaultAllowDeferralUntilSignOut(value *bool)() + SetFileVaultDisablePromptAtSignOut(value *bool)() + SetFileVaultEnabled(value *bool)() + SetFileVaultHidePersonalRecoveryKey(value *bool)() + SetFileVaultInstitutionalRecoveryKeyCertificate(value []byte)() + SetFileVaultInstitutionalRecoveryKeyCertificateFileName(value *string)() + SetFileVaultNumberOfTimesUserCanIgnore(value *int32)() + SetFileVaultPersonalRecoveryKeyHelpMessage(value *string)() + SetFileVaultPersonalRecoveryKeyRotationInMonths(value *int32)() + SetFileVaultSelectedRecoveryKeyTypes(value *MacOSFileVaultRecoveryKeyTypes)() + SetFirewallApplications(value []MacOSFirewallApplicationable)() + SetFirewallBlockAllIncoming(value *bool)() + SetFirewallEnabled(value *bool)() + SetFirewallEnableStealthMode(value *bool)() + SetGatekeeperAllowedAppSource(value *MacOSGatekeeperAppSources)() + SetGatekeeperBlockOverride(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration.go new file mode 100644 index 000000000..45cf6304b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration.go @@ -0,0 +1,286 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEnterpriseWiFiConfiguration +type MacOSEnterpriseWiFiConfiguration struct { + MacOSWiFiConfiguration + // Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. + eapFastConfiguration *EapFastConfiguration + // Extensible Authentication Protocol (EAP) configuration types. + eapType *EapType + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). + identityCertificateForClientAuthentication MacOSCertificateProfileBaseable + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + innerAuthenticationProtocolForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. + outerIdentityPrivacyTemporaryValue *string + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. + rootCertificateForServerValidation MacOSTrustedRootCertificateable + // Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. + rootCertificatesForServerValidation []MacOSTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this Wi-Fi network. + trustedServerCertificateNames []string +} +// NewMacOSEnterpriseWiFiConfiguration instantiates a new MacOSEnterpriseWiFiConfiguration and sets the default values. +func NewMacOSEnterpriseWiFiConfiguration()(*MacOSEnterpriseWiFiConfiguration) { + m := &MacOSEnterpriseWiFiConfiguration{ + MacOSWiFiConfiguration: *NewMacOSWiFiConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSEnterpriseWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSEnterpriseWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSEnterpriseWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSEnterpriseWiFiConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *MacOSEnterpriseWiFiConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapFastConfiguration gets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *MacOSEnterpriseWiFiConfiguration) GetEapFastConfiguration()(*EapFastConfiguration) { + return m.eapFastConfiguration +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *MacOSEnterpriseWiFiConfiguration) GetEapType()(*EapType) { + return m.eapType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSEnterpriseWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSWiFiConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapFastConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapFastConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetEapFastConfiguration(val.(*EapFastConfiguration)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*EapType)) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(MacOSCertificateProfileBaseable)) + } + return nil + } + res["innerAuthenticationProtocolForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetInnerAuthenticationProtocolForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["outerIdentityPrivacyTemporaryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOuterIdentityPrivacyTemporaryValue(val) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(MacOSTrustedRootCertificateable)) + } + return nil + } + res["rootCertificatesForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(MacOSTrustedRootCertificateable) + } + m.SetRootCertificatesForServerValidation(res) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *MacOSEnterpriseWiFiConfiguration) GetIdentityCertificateForClientAuthentication()(MacOSCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetInnerAuthenticationProtocolForEapTtls gets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *MacOSEnterpriseWiFiConfiguration) GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.innerAuthenticationProtocolForEapTtls +} +// GetOuterIdentityPrivacyTemporaryValue gets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. +func (m *MacOSEnterpriseWiFiConfiguration) GetOuterIdentityPrivacyTemporaryValue()(*string) { + return m.outerIdentityPrivacyTemporaryValue +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. +func (m *MacOSEnterpriseWiFiConfiguration) GetRootCertificateForServerValidation()(MacOSTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetRootCertificatesForServerValidation gets the rootCertificatesForServerValidation property value. Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. +func (m *MacOSEnterpriseWiFiConfiguration) GetRootCertificatesForServerValidation()([]MacOSTrustedRootCertificateable) { + return m.rootCertificatesForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this Wi-Fi network. +func (m *MacOSEnterpriseWiFiConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *MacOSEnterpriseWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSWiFiConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapFastConfiguration() != nil { + cast := (*m.GetEapFastConfiguration()).String() + err = writer.WriteStringValue("eapFastConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetInnerAuthenticationProtocolForEapTtls() != nil { + cast := (*m.GetInnerAuthenticationProtocolForEapTtls()).String() + err = writer.WriteStringValue("innerAuthenticationProtocolForEapTtls", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outerIdentityPrivacyTemporaryValue", m.GetOuterIdentityPrivacyTemporaryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetRootCertificatesForServerValidation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRootCertificatesForServerValidation())) + for i, v := range m.GetRootCertificatesForServerValidation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rootCertificatesForServerValidation", cast) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *MacOSEnterpriseWiFiConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapFastConfiguration sets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *MacOSEnterpriseWiFiConfiguration) SetEapFastConfiguration(value *EapFastConfiguration)() { + m.eapFastConfiguration = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *MacOSEnterpriseWiFiConfiguration) SetEapType(value *EapType)() { + m.eapType = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *MacOSEnterpriseWiFiConfiguration) SetIdentityCertificateForClientAuthentication(value MacOSCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetInnerAuthenticationProtocolForEapTtls sets the innerAuthenticationProtocolForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *MacOSEnterpriseWiFiConfiguration) SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.innerAuthenticationProtocolForEapTtls = value +} +// SetOuterIdentityPrivacyTemporaryValue sets the outerIdentityPrivacyTemporaryValue property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this Wi-Fi connection using their real username is displayed as 'anonymous'. +func (m *MacOSEnterpriseWiFiConfiguration) SetOuterIdentityPrivacyTemporaryValue(value *string)() { + m.outerIdentityPrivacyTemporaryValue = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. +func (m *MacOSEnterpriseWiFiConfiguration) SetRootCertificateForServerValidation(value MacOSTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetRootCertificatesForServerValidation sets the rootCertificatesForServerValidation property value. Trusted Root Certificates for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. If you provide this value you do not need to provide trustedServerCertificateNames, and vice versa. This collection can contain a maximum of 500 elements. +func (m *MacOSEnterpriseWiFiConfiguration) SetRootCertificatesForServerValidation(value []MacOSTrustedRootCertificateable)() { + m.rootCertificatesForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this Wi-Fi network. +func (m *MacOSEnterpriseWiFiConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..c367bb37b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEnterpriseWiFiConfigurationCollectionResponse +type MacOSEnterpriseWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSEnterpriseWiFiConfigurationable +} +// NewMacOSEnterpriseWiFiConfigurationCollectionResponse instantiates a new MacOSEnterpriseWiFiConfigurationCollectionResponse and sets the default values. +func NewMacOSEnterpriseWiFiConfigurationCollectionResponse()(*MacOSEnterpriseWiFiConfigurationCollectionResponse) { + m := &MacOSEnterpriseWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSEnterpriseWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSEnterpriseWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSEnterpriseWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSEnterpriseWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSEnterpriseWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSEnterpriseWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSEnterpriseWiFiConfigurationCollectionResponse) GetValue()([]MacOSEnterpriseWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSEnterpriseWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSEnterpriseWiFiConfigurationCollectionResponse) SetValue(value []MacOSEnterpriseWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..ee4355773 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEnterpriseWiFiConfigurationCollectionResponseable +type MacOSEnterpriseWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSEnterpriseWiFiConfigurationable) + SetValue(value []MacOSEnterpriseWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configurationable.go new file mode 100644 index 000000000..c626b3e77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_enterprise_wi_fi_configurationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSEnterpriseWiFiConfigurationable +type MacOSEnterpriseWiFiConfigurationable interface { + MacOSWiFiConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapFastConfiguration()(*EapFastConfiguration) + GetEapType()(*EapType) + GetIdentityCertificateForClientAuthentication()(MacOSCertificateProfileBaseable) + GetInnerAuthenticationProtocolForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetOuterIdentityPrivacyTemporaryValue()(*string) + GetRootCertificateForServerValidation()(MacOSTrustedRootCertificateable) + GetRootCertificatesForServerValidation()([]MacOSTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapFastConfiguration(value *EapFastConfiguration)() + SetEapType(value *EapType)() + SetIdentityCertificateForClientAuthentication(value MacOSCertificateProfileBaseable)() + SetInnerAuthenticationProtocolForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetOuterIdentityPrivacyTemporaryValue(value *string)() + SetRootCertificateForServerValidation(value MacOSTrustedRootCertificateable)() + SetRootCertificatesForServerValidation(value []MacOSTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration.go new file mode 100644 index 000000000..434eceb5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration.go @@ -0,0 +1,250 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSExtensionsConfiguration +type MacOSExtensionsConfiguration struct { + DeviceConfiguration + // All kernel extensions validly signed by the team identifiers in this list will be allowed to load. + kernelExtensionAllowedTeamIdentifiers []string + // If set to true, users can approve additional kernel extensions not explicitly allowed by configurations profiles. + kernelExtensionOverridesAllowed *bool + // A list of kernel extensions that will be allowed to load. . This collection can contain a maximum of 500 elements. + kernelExtensionsAllowed []MacOSKernelExtensionable + // Gets or sets a list of allowed macOS system extensions. This collection can contain a maximum of 500 elements. + systemExtensionsAllowed []MacOSSystemExtensionable + // Gets or sets a list of allowed team identifiers. Any system extension signed with any of the specified team identifiers will be approved. + systemExtensionsAllowedTeamIdentifiers []string + // Gets or sets a list of allowed macOS system extension types. This collection can contain a maximum of 500 elements. + systemExtensionsAllowedTypes []MacOSSystemExtensionTypeMappingable + // Gets or sets whether to allow the user to approve additional system extensions not explicitly allowed by configuration profiles. + systemExtensionsBlockOverride *bool +} +// NewMacOSExtensionsConfiguration instantiates a new MacOSExtensionsConfiguration and sets the default values. +func NewMacOSExtensionsConfiguration()(*MacOSExtensionsConfiguration) { + m := &MacOSExtensionsConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSExtensionsConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSExtensionsConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSExtensionsConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSExtensionsConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSExtensionsConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["kernelExtensionAllowedTeamIdentifiers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKernelExtensionAllowedTeamIdentifiers(res) + } + return nil + } + res["kernelExtensionOverridesAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKernelExtensionOverridesAllowed(val) + } + return nil + } + res["kernelExtensionsAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSKernelExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSKernelExtensionable, len(val)) + for i, v := range val { + res[i] = v.(MacOSKernelExtensionable) + } + m.SetKernelExtensionsAllowed(res) + } + return nil + } + res["systemExtensionsAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSystemExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSystemExtensionable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSystemExtensionable) + } + m.SetSystemExtensionsAllowed(res) + } + return nil + } + res["systemExtensionsAllowedTeamIdentifiers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSystemExtensionsAllowedTeamIdentifiers(res) + } + return nil + } + res["systemExtensionsAllowedTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSystemExtensionTypeMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSystemExtensionTypeMappingable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSystemExtensionTypeMappingable) + } + m.SetSystemExtensionsAllowedTypes(res) + } + return nil + } + res["systemExtensionsBlockOverride"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSystemExtensionsBlockOverride(val) + } + return nil + } + return res +} +// GetKernelExtensionAllowedTeamIdentifiers gets the kernelExtensionAllowedTeamIdentifiers property value. All kernel extensions validly signed by the team identifiers in this list will be allowed to load. +func (m *MacOSExtensionsConfiguration) GetKernelExtensionAllowedTeamIdentifiers()([]string) { + return m.kernelExtensionAllowedTeamIdentifiers +} +// GetKernelExtensionOverridesAllowed gets the kernelExtensionOverridesAllowed property value. If set to true, users can approve additional kernel extensions not explicitly allowed by configurations profiles. +func (m *MacOSExtensionsConfiguration) GetKernelExtensionOverridesAllowed()(*bool) { + return m.kernelExtensionOverridesAllowed +} +// GetKernelExtensionsAllowed gets the kernelExtensionsAllowed property value. A list of kernel extensions that will be allowed to load. . This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) GetKernelExtensionsAllowed()([]MacOSKernelExtensionable) { + return m.kernelExtensionsAllowed +} +// GetSystemExtensionsAllowed gets the systemExtensionsAllowed property value. Gets or sets a list of allowed macOS system extensions. This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) GetSystemExtensionsAllowed()([]MacOSSystemExtensionable) { + return m.systemExtensionsAllowed +} +// GetSystemExtensionsAllowedTeamIdentifiers gets the systemExtensionsAllowedTeamIdentifiers property value. Gets or sets a list of allowed team identifiers. Any system extension signed with any of the specified team identifiers will be approved. +func (m *MacOSExtensionsConfiguration) GetSystemExtensionsAllowedTeamIdentifiers()([]string) { + return m.systemExtensionsAllowedTeamIdentifiers +} +// GetSystemExtensionsAllowedTypes gets the systemExtensionsAllowedTypes property value. Gets or sets a list of allowed macOS system extension types. This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) GetSystemExtensionsAllowedTypes()([]MacOSSystemExtensionTypeMappingable) { + return m.systemExtensionsAllowedTypes +} +// GetSystemExtensionsBlockOverride gets the systemExtensionsBlockOverride property value. Gets or sets whether to allow the user to approve additional system extensions not explicitly allowed by configuration profiles. +func (m *MacOSExtensionsConfiguration) GetSystemExtensionsBlockOverride()(*bool) { + return m.systemExtensionsBlockOverride +} +// Serialize serializes information the current object +func (m *MacOSExtensionsConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetKernelExtensionAllowedTeamIdentifiers() != nil { + err = writer.WriteCollectionOfStringValues("kernelExtensionAllowedTeamIdentifiers", m.GetKernelExtensionAllowedTeamIdentifiers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kernelExtensionOverridesAllowed", m.GetKernelExtensionOverridesAllowed()) + if err != nil { + return err + } + } + if m.GetKernelExtensionsAllowed() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKernelExtensionsAllowed())) + for i, v := range m.GetKernelExtensionsAllowed() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("kernelExtensionsAllowed", cast) + if err != nil { + return err + } + } + if m.GetSystemExtensionsAllowed() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSystemExtensionsAllowed())) + for i, v := range m.GetSystemExtensionsAllowed() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("systemExtensionsAllowed", cast) + if err != nil { + return err + } + } + if m.GetSystemExtensionsAllowedTeamIdentifiers() != nil { + err = writer.WriteCollectionOfStringValues("systemExtensionsAllowedTeamIdentifiers", m.GetSystemExtensionsAllowedTeamIdentifiers()) + if err != nil { + return err + } + } + if m.GetSystemExtensionsAllowedTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSystemExtensionsAllowedTypes())) + for i, v := range m.GetSystemExtensionsAllowedTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("systemExtensionsAllowedTypes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("systemExtensionsBlockOverride", m.GetSystemExtensionsBlockOverride()) + if err != nil { + return err + } + } + return nil +} +// SetKernelExtensionAllowedTeamIdentifiers sets the kernelExtensionAllowedTeamIdentifiers property value. All kernel extensions validly signed by the team identifiers in this list will be allowed to load. +func (m *MacOSExtensionsConfiguration) SetKernelExtensionAllowedTeamIdentifiers(value []string)() { + m.kernelExtensionAllowedTeamIdentifiers = value +} +// SetKernelExtensionOverridesAllowed sets the kernelExtensionOverridesAllowed property value. If set to true, users can approve additional kernel extensions not explicitly allowed by configurations profiles. +func (m *MacOSExtensionsConfiguration) SetKernelExtensionOverridesAllowed(value *bool)() { + m.kernelExtensionOverridesAllowed = value +} +// SetKernelExtensionsAllowed sets the kernelExtensionsAllowed property value. A list of kernel extensions that will be allowed to load. . This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) SetKernelExtensionsAllowed(value []MacOSKernelExtensionable)() { + m.kernelExtensionsAllowed = value +} +// SetSystemExtensionsAllowed sets the systemExtensionsAllowed property value. Gets or sets a list of allowed macOS system extensions. This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) SetSystemExtensionsAllowed(value []MacOSSystemExtensionable)() { + m.systemExtensionsAllowed = value +} +// SetSystemExtensionsAllowedTeamIdentifiers sets the systemExtensionsAllowedTeamIdentifiers property value. Gets or sets a list of allowed team identifiers. Any system extension signed with any of the specified team identifiers will be approved. +func (m *MacOSExtensionsConfiguration) SetSystemExtensionsAllowedTeamIdentifiers(value []string)() { + m.systemExtensionsAllowedTeamIdentifiers = value +} +// SetSystemExtensionsAllowedTypes sets the systemExtensionsAllowedTypes property value. Gets or sets a list of allowed macOS system extension types. This collection can contain a maximum of 500 elements. +func (m *MacOSExtensionsConfiguration) SetSystemExtensionsAllowedTypes(value []MacOSSystemExtensionTypeMappingable)() { + m.systemExtensionsAllowedTypes = value +} +// SetSystemExtensionsBlockOverride sets the systemExtensionsBlockOverride property value. Gets or sets whether to allow the user to approve additional system extensions not explicitly allowed by configuration profiles. +func (m *MacOSExtensionsConfiguration) SetSystemExtensionsBlockOverride(value *bool)() { + m.systemExtensionsBlockOverride = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_response.go new file mode 100644 index 000000000..a9c8bf33f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSExtensionsConfigurationCollectionResponse +type MacOSExtensionsConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSExtensionsConfigurationable +} +// NewMacOSExtensionsConfigurationCollectionResponse instantiates a new MacOSExtensionsConfigurationCollectionResponse and sets the default values. +func NewMacOSExtensionsConfigurationCollectionResponse()(*MacOSExtensionsConfigurationCollectionResponse) { + m := &MacOSExtensionsConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSExtensionsConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSExtensionsConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSExtensionsConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSExtensionsConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSExtensionsConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSExtensionsConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSExtensionsConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSExtensionsConfigurationCollectionResponse) GetValue()([]MacOSExtensionsConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSExtensionsConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSExtensionsConfigurationCollectionResponse) SetValue(value []MacOSExtensionsConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_responseable.go new file mode 100644 index 000000000..b121dfd9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSExtensionsConfigurationCollectionResponseable +type MacOSExtensionsConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSExtensionsConfigurationable) + SetValue(value []MacOSExtensionsConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configurationable.go new file mode 100644 index 000000000..0231a5dfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_extensions_configurationable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSExtensionsConfigurationable +type MacOSExtensionsConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKernelExtensionAllowedTeamIdentifiers()([]string) + GetKernelExtensionOverridesAllowed()(*bool) + GetKernelExtensionsAllowed()([]MacOSKernelExtensionable) + GetSystemExtensionsAllowed()([]MacOSSystemExtensionable) + GetSystemExtensionsAllowedTeamIdentifiers()([]string) + GetSystemExtensionsAllowedTypes()([]MacOSSystemExtensionTypeMappingable) + GetSystemExtensionsBlockOverride()(*bool) + SetKernelExtensionAllowedTeamIdentifiers(value []string)() + SetKernelExtensionOverridesAllowed(value *bool)() + SetKernelExtensionsAllowed(value []MacOSKernelExtensionable)() + SetSystemExtensionsAllowed(value []MacOSSystemExtensionable)() + SetSystemExtensionsAllowedTeamIdentifiers(value []string)() + SetSystemExtensionsAllowedTypes(value []MacOSSystemExtensionTypeMappingable)() + SetSystemExtensionsBlockOverride(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_file_vault_recovery_key_types.go b/src/internal/connector/graph/betasdk/models/mac_o_s_file_vault_recovery_key_types.go new file mode 100644 index 000000000..eae3006b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_file_vault_recovery_key_types.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSFileVaultRecoveryKeyTypes int + +const ( + // Device default value, no intent. + NOTCONFIGURED_MACOSFILEVAULTRECOVERYKEYTYPES MacOSFileVaultRecoveryKeyTypes = iota + // An institutional recovery key is like a “master” recovery key that can be used to unlock any device whose password has been lost. + INSTITUTIONALRECOVERYKEY_MACOSFILEVAULTRECOVERYKEYTYPES + // A personal recovery key is a unique code that can be used to unlock the user’s device, even if the password to the device is lost. + PERSONALRECOVERYKEY_MACOSFILEVAULTRECOVERYKEYTYPES +) + +func (i MacOSFileVaultRecoveryKeyTypes) String() string { + return []string{"notConfigured", "institutionalRecoveryKey", "personalRecoveryKey"}[i] +} +func ParseMacOSFileVaultRecoveryKeyTypes(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSFILEVAULTRECOVERYKEYTYPES + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSFILEVAULTRECOVERYKEYTYPES + case "institutionalRecoveryKey": + result = INSTITUTIONALRECOVERYKEY_MACOSFILEVAULTRECOVERYKEYTYPES + case "personalRecoveryKey": + result = PERSONALRECOVERYKEY_MACOSFILEVAULTRECOVERYKEYTYPES + default: + return 0, errors.New("Unknown MacOSFileVaultRecoveryKeyTypes value: " + v) + } + return &result, nil +} +func SerializeMacOSFileVaultRecoveryKeyTypes(values []MacOSFileVaultRecoveryKeyTypes) []string { + 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/mac_o_s_firewall_application.go b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application.go new file mode 100644 index 000000000..a745c4d45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSFirewallApplication represents an app in the list of macOS firewall applications +type MacOSFirewallApplication struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether or not incoming connections are allowed. + allowsIncomingConnections *bool + // BundleId of the application. + bundleId *string + // The OdataType property + odataType *string +} +// NewMacOSFirewallApplication instantiates a new macOSFirewallApplication and sets the default values. +func NewMacOSFirewallApplication()(*MacOSFirewallApplication) { + m := &MacOSFirewallApplication{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSFirewallApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSFirewallApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSFirewallApplication(), 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 *MacOSFirewallApplication) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowsIncomingConnections gets the allowsIncomingConnections property value. Whether or not incoming connections are allowed. +func (m *MacOSFirewallApplication) GetAllowsIncomingConnections()(*bool) { + return m.allowsIncomingConnections +} +// GetBundleId gets the bundleId property value. BundleId of the application. +func (m *MacOSFirewallApplication) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSFirewallApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowsIncomingConnections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowsIncomingConnections(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSFirewallApplication) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MacOSFirewallApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowsIncomingConnections", m.GetAllowsIncomingConnections()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MacOSFirewallApplication) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowsIncomingConnections sets the allowsIncomingConnections property value. Whether or not incoming connections are allowed. +func (m *MacOSFirewallApplication) SetAllowsIncomingConnections(value *bool)() { + m.allowsIncomingConnections = value +} +// SetBundleId sets the bundleId property value. BundleId of the application. +func (m *MacOSFirewallApplication) SetBundleId(value *string)() { + m.bundleId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSFirewallApplication) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_response.go new file mode 100644 index 000000000..04ceda99b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSFirewallApplicationCollectionResponse +type MacOSFirewallApplicationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSFirewallApplicationable +} +// NewMacOSFirewallApplicationCollectionResponse instantiates a new MacOSFirewallApplicationCollectionResponse and sets the default values. +func NewMacOSFirewallApplicationCollectionResponse()(*MacOSFirewallApplicationCollectionResponse) { + m := &MacOSFirewallApplicationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSFirewallApplicationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSFirewallApplicationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSFirewallApplicationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSFirewallApplicationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSFirewallApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSFirewallApplicationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSFirewallApplicationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSFirewallApplicationCollectionResponse) GetValue()([]MacOSFirewallApplicationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSFirewallApplicationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSFirewallApplicationCollectionResponse) SetValue(value []MacOSFirewallApplicationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_responseable.go new file mode 100644 index 000000000..b67e28043 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_application_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSFirewallApplicationCollectionResponseable +type MacOSFirewallApplicationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSFirewallApplicationable) + SetValue(value []MacOSFirewallApplicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_applicationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_applicationable.go new file mode 100644 index 000000000..473202c98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_firewall_applicationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSFirewallApplicationable +type MacOSFirewallApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowsIncomingConnections()(*bool) + GetBundleId()(*string) + GetOdataType()(*string) + SetAllowsIncomingConnections(value *bool)() + SetBundleId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_gatekeeper_app_sources.go b/src/internal/connector/graph/betasdk/models/mac_o_s_gatekeeper_app_sources.go new file mode 100644 index 000000000..d7fcd5ab9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_gatekeeper_app_sources.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSGatekeeperAppSources int + +const ( + // Device default value, no intent. + NOTCONFIGURED_MACOSGATEKEEPERAPPSOURCES MacOSGatekeeperAppSources = iota + // Only apps from the Mac AppStore can be run. + MACAPPSTORE_MACOSGATEKEEPERAPPSOURCES + // Only apps from the Mac AppStore and identified developers can be run. + MACAPPSTOREANDIDENTIFIEDDEVELOPERS_MACOSGATEKEEPERAPPSOURCES + // Apps from anywhere can be run. + ANYWHERE_MACOSGATEKEEPERAPPSOURCES +) + +func (i MacOSGatekeeperAppSources) String() string { + return []string{"notConfigured", "macAppStore", "macAppStoreAndIdentifiedDevelopers", "anywhere"}[i] +} +func ParseMacOSGatekeeperAppSources(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSGATEKEEPERAPPSOURCES + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSGATEKEEPERAPPSOURCES + case "macAppStore": + result = MACAPPSTORE_MACOSGATEKEEPERAPPSOURCES + case "macAppStoreAndIdentifiedDevelopers": + result = MACAPPSTOREANDIDENTIFIEDDEVELOPERS_MACOSGATEKEEPERAPPSOURCES + case "anywhere": + result = ANYWHERE_MACOSGATEKEEPERAPPSOURCES + default: + return 0, errors.New("Unknown MacOSGatekeeperAppSources value: " + v) + } + return &result, nil +} +func SerializeMacOSGatekeeperAppSources(values []MacOSGatekeeperAppSources) []string { + 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/mac_o_s_general_device_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration.go new file mode 100644 index 000000000..04614ac56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration.go @@ -0,0 +1,1593 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSGeneralDeviceConfiguration +type MacOSGeneralDeviceConfiguration struct { + DeviceConfiguration + // Yes prevents users from adding friends to Game Center. Available for devices running macOS versions 10.13 and later. + addingGameCenterFriendsBlocked *bool + // Indicates whether or not to allow AirDrop. + airDropBlocked *bool + // Indicates whether or to block users from unlocking their Mac with Apple Watch. + appleWatchBlockAutoUnlock *bool + // Indicates whether or not to block the user from accessing the camera of the device. + cameraBlocked *bool + // Indicates whether or not to allow remote screen observation by Classroom app. Requires MDM enrollment via Apple School Manager or Apple Business Manager. + classroomAppBlockRemoteScreenObservation *bool + // Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting. Requires MDM enrollment via Apple School Manager or Apple Business Manager. + classroomAppForceUnpromptedScreenObservation *bool + // Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. + classroomForceAutomaticallyJoinClasses *bool + // Indicates whether a student enrolled in an unmanaged course via Classroom will be required to request permission from the teacher when attempting to leave the course. Requires MDM enrollment via Apple School Manager or Apple Business Manager. + classroomForceRequestPermissionToLeaveClasses *bool + // Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. + classroomForceUnpromptedAppAndDeviceLock *bool + // Possible values of the compliance app list. + compliantAppListType *AppListType + // List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. + compliantAppsList []AppListItemable + // Indicates whether or not to allow content caching. + contentCachingBlocked *bool + // Indicates whether or not to block definition lookup. + definitionLookupBlocked *bool + // An email address lacking a suffix that matches any of these strings will be considered out-of-domain. + emailInDomainSuffixes []string + // TRUE disables the reset option on supervised devices. FALSE enables the reset option on supervised devices. Available for devices running macOS versions 12.0 and later. + eraseContentAndSettingsBlocked *bool + // Yes disables Game Center, and the Game Center icon is removed from the Home screen. Available for devices running macOS versions 10.13 and later. + gameCenterBlocked *bool + // Indicates whether or not to block the user from continuing work that they started on a MacOS device on another iOS or MacOS device (MacOS 10.15 or later). + iCloudBlockActivityContinuation *bool + // Indicates whether or not to block iCloud from syncing contacts. + iCloudBlockAddressBook *bool + // Indicates whether or not to block iCloud from syncing bookmarks. + iCloudBlockBookmarks *bool + // Indicates whether or not to block iCloud from syncing calendars. + iCloudBlockCalendar *bool + // Indicates whether or not to block iCloud document sync. + iCloudBlockDocumentSync *bool + // Indicates whether or not to block iCloud from syncing mail. + iCloudBlockMail *bool + // Indicates whether or not to block iCloud from syncing notes. + iCloudBlockNotes *bool + // Indicates whether or not to block iCloud Photo Library. + iCloudBlockPhotoLibrary *bool + // Indicates whether or not to block iCloud from syncing reminders. + iCloudBlockReminders *bool + // When TRUE the synchronization of cloud desktop and documents is blocked. When FALSE, synchronization of the cloud desktop and documents are allowed. Available for devices running macOS 10.12.4 and later. + iCloudDesktopAndDocumentsBlocked *bool + // iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running macOS 12 and later. + iCloudPrivateRelayBlocked *bool + // Indicates whether or not to block files from being transferred using iTunes. + iTunesBlockFileSharing *bool + // Indicates whether or not to block Music service and revert Music app to classic mode. + iTunesBlockMusicService *bool + // Indicates whether or not to block the user from using dictation input. + keyboardBlockDictation *bool + // Indicates whether or not iCloud keychain synchronization is blocked (macOS 10.12 and later). + keychainBlockCloudSync *bool + // TRUE prevents multiplayer gaming when using Game Center. FALSE allows multiplayer gaming when using Game Center. Available for devices running macOS versions 10.13 and later. + multiplayerGamingBlocked *bool + // Indicates whether or not to block sharing passwords with the AirDrop passwords feature. + passwordBlockAirDropSharing *bool + // Indicates whether or not to block the AutoFill Passwords feature. + passwordBlockAutoFill *bool + // Indicates whether or not to block fingerprint unlock. + passwordBlockFingerprintUnlock *bool + // Indicates whether or not to allow passcode modification. + passwordBlockModification *bool + // Indicates whether or not to block requesting passwords from nearby devices. + passwordBlockProximityRequests *bool + // Block simple passwords. + passwordBlockSimple *bool + // Number of days before the password expires. + passwordExpirationDays *int32 + // The number of allowed failed attempts to enter the passcode at the device's lock screen. Valid values 2 to 11 + passwordMaximumAttemptCount *int32 + // Number of character sets a password must contain. Valid values 0 to 4 + passwordMinimumCharacterSetCount *int32 + // Minimum length of passwords. + passwordMinimumLength *int32 + // Minutes of inactivity required before a password is required. + passwordMinutesOfInactivityBeforeLock *int32 + // Minutes of inactivity required before the screen times out. + passwordMinutesOfInactivityBeforeScreenTimeout *int32 + // The number of minutes before the login is reset after the maximum number of unsuccessful login attempts is reached. + passwordMinutesUntilFailedLoginReset *int32 + // Number of previous passwords to block. + passwordPreviousPasswordBlockCount *int32 + // Whether or not to require a password. + passwordRequired *bool + // Possible values of required passwords. + passwordRequiredType *RequiredPasswordType + // List of privacy preference policy controls. This collection can contain a maximum of 10000 elements. + privacyAccessControls []MacOSPrivacyAccessControlItemable + // Indicates whether or not to block the user from using Auto fill in Safari. + safariBlockAutofill *bool + // Indicates whether or not to block the user from taking Screenshots. + screenCaptureBlocked *bool + // Specify the number of days (1-90) to delay visibility of major OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 + softwareUpdateMajorOSDeferredInstallDelayInDays *int32 + // Specify the number of days (1-90) to delay visibility of minor OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 + softwareUpdateMinorOSDeferredInstallDelayInDays *int32 + // Specify the number of days (1-90) to delay visibility of non-OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 + softwareUpdateNonOSDeferredInstallDelayInDays *int32 + // Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 + softwareUpdatesEnforcedDelayInDays *int32 + // Indicates whether or not to block Spotlight from returning any results from an Internet search. + spotlightBlockInternetResults *bool + // Maximum hours after which the user must enter their password to unlock the device instead of using Touch ID. Available for devices running macOS 12 and later. Valid values 0 to 2147483647 + touchIdTimeoutInHours *int32 + // Determines whether to delay OS and/or app updates for macOS. Possible values are: none, delayOSUpdateVisibility, delayAppUpdateVisibility, unknownFutureValue, delayMajorOsUpdateVisibility. + updateDelayPolicy *MacOSSoftwareUpdateDelayPolicy + // TRUE prevents the wallpaper from being changed. FALSE allows the wallpaper to be changed. Available for devices running macOS versions 10.13 and later. + wallpaperModificationBlocked *bool +} +// NewMacOSGeneralDeviceConfiguration instantiates a new MacOSGeneralDeviceConfiguration and sets the default values. +func NewMacOSGeneralDeviceConfiguration()(*MacOSGeneralDeviceConfiguration) { + m := &MacOSGeneralDeviceConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSGeneralDeviceConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSGeneralDeviceConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSGeneralDeviceConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSGeneralDeviceConfiguration(), nil +} +// GetAddingGameCenterFriendsBlocked gets the addingGameCenterFriendsBlocked property value. Yes prevents users from adding friends to Game Center. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) GetAddingGameCenterFriendsBlocked()(*bool) { + return m.addingGameCenterFriendsBlocked +} +// GetAirDropBlocked gets the airDropBlocked property value. Indicates whether or not to allow AirDrop. +func (m *MacOSGeneralDeviceConfiguration) GetAirDropBlocked()(*bool) { + return m.airDropBlocked +} +// GetAppleWatchBlockAutoUnlock gets the appleWatchBlockAutoUnlock property value. Indicates whether or to block users from unlocking their Mac with Apple Watch. +func (m *MacOSGeneralDeviceConfiguration) GetAppleWatchBlockAutoUnlock()(*bool) { + return m.appleWatchBlockAutoUnlock +} +// GetCameraBlocked gets the cameraBlocked property value. Indicates whether or not to block the user from accessing the camera of the device. +func (m *MacOSGeneralDeviceConfiguration) GetCameraBlocked()(*bool) { + return m.cameraBlocked +} +// GetClassroomAppBlockRemoteScreenObservation gets the classroomAppBlockRemoteScreenObservation property value. Indicates whether or not to allow remote screen observation by Classroom app. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) GetClassroomAppBlockRemoteScreenObservation()(*bool) { + return m.classroomAppBlockRemoteScreenObservation +} +// GetClassroomAppForceUnpromptedScreenObservation gets the classroomAppForceUnpromptedScreenObservation property value. Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) GetClassroomAppForceUnpromptedScreenObservation()(*bool) { + return m.classroomAppForceUnpromptedScreenObservation +} +// GetClassroomForceAutomaticallyJoinClasses gets the classroomForceAutomaticallyJoinClasses property value. Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) GetClassroomForceAutomaticallyJoinClasses()(*bool) { + return m.classroomForceAutomaticallyJoinClasses +} +// GetClassroomForceRequestPermissionToLeaveClasses gets the classroomForceRequestPermissionToLeaveClasses property value. Indicates whether a student enrolled in an unmanaged course via Classroom will be required to request permission from the teacher when attempting to leave the course. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) GetClassroomForceRequestPermissionToLeaveClasses()(*bool) { + return m.classroomForceRequestPermissionToLeaveClasses +} +// GetClassroomForceUnpromptedAppAndDeviceLock gets the classroomForceUnpromptedAppAndDeviceLock property value. Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) GetClassroomForceUnpromptedAppAndDeviceLock()(*bool) { + return m.classroomForceUnpromptedAppAndDeviceLock +} +// GetCompliantAppListType gets the compliantAppListType property value. Possible values of the compliance app list. +func (m *MacOSGeneralDeviceConfiguration) GetCompliantAppListType()(*AppListType) { + return m.compliantAppListType +} +// GetCompliantAppsList gets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *MacOSGeneralDeviceConfiguration) GetCompliantAppsList()([]AppListItemable) { + return m.compliantAppsList +} +// GetContentCachingBlocked gets the contentCachingBlocked property value. Indicates whether or not to allow content caching. +func (m *MacOSGeneralDeviceConfiguration) GetContentCachingBlocked()(*bool) { + return m.contentCachingBlocked +} +// GetDefinitionLookupBlocked gets the definitionLookupBlocked property value. Indicates whether or not to block definition lookup. +func (m *MacOSGeneralDeviceConfiguration) GetDefinitionLookupBlocked()(*bool) { + return m.definitionLookupBlocked +} +// GetEmailInDomainSuffixes gets the emailInDomainSuffixes property value. An email address lacking a suffix that matches any of these strings will be considered out-of-domain. +func (m *MacOSGeneralDeviceConfiguration) GetEmailInDomainSuffixes()([]string) { + return m.emailInDomainSuffixes +} +// GetEraseContentAndSettingsBlocked gets the eraseContentAndSettingsBlocked property value. TRUE disables the reset option on supervised devices. FALSE enables the reset option on supervised devices. Available for devices running macOS versions 12.0 and later. +func (m *MacOSGeneralDeviceConfiguration) GetEraseContentAndSettingsBlocked()(*bool) { + return m.eraseContentAndSettingsBlocked +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSGeneralDeviceConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["addingGameCenterFriendsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAddingGameCenterFriendsBlocked(val) + } + return nil + } + res["airDropBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAirDropBlocked(val) + } + return nil + } + res["appleWatchBlockAutoUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppleWatchBlockAutoUnlock(val) + } + return nil + } + res["cameraBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraBlocked(val) + } + return nil + } + res["classroomAppBlockRemoteScreenObservation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomAppBlockRemoteScreenObservation(val) + } + return nil + } + res["classroomAppForceUnpromptedScreenObservation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomAppForceUnpromptedScreenObservation(val) + } + return nil + } + res["classroomForceAutomaticallyJoinClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceAutomaticallyJoinClasses(val) + } + return nil + } + res["classroomForceRequestPermissionToLeaveClasses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceRequestPermissionToLeaveClasses(val) + } + return nil + } + res["classroomForceUnpromptedAppAndDeviceLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClassroomForceUnpromptedAppAndDeviceLock(val) + } + return nil + } + res["compliantAppListType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppListType) + if err != nil { + return err + } + if val != nil { + m.SetCompliantAppListType(val.(*AppListType)) + } + return nil + } + res["compliantAppsList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppListItemable, len(val)) + for i, v := range val { + res[i] = v.(AppListItemable) + } + m.SetCompliantAppsList(res) + } + return nil + } + res["contentCachingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContentCachingBlocked(val) + } + return nil + } + res["definitionLookupBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDefinitionLookupBlocked(val) + } + return nil + } + res["emailInDomainSuffixes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEmailInDomainSuffixes(res) + } + return nil + } + res["eraseContentAndSettingsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEraseContentAndSettingsBlocked(val) + } + return nil + } + res["gameCenterBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGameCenterBlocked(val) + } + return nil + } + res["iCloudBlockActivityContinuation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockActivityContinuation(val) + } + return nil + } + res["iCloudBlockAddressBook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockAddressBook(val) + } + return nil + } + res["iCloudBlockBookmarks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockBookmarks(val) + } + return nil + } + res["iCloudBlockCalendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockCalendar(val) + } + return nil + } + res["iCloudBlockDocumentSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockDocumentSync(val) + } + return nil + } + res["iCloudBlockMail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockMail(val) + } + return nil + } + res["iCloudBlockNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockNotes(val) + } + return nil + } + res["iCloudBlockPhotoLibrary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockPhotoLibrary(val) + } + return nil + } + res["iCloudBlockReminders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudBlockReminders(val) + } + return nil + } + res["iCloudDesktopAndDocumentsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudDesktopAndDocumentsBlocked(val) + } + return nil + } + res["iCloudPrivateRelayBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetICloudPrivateRelayBlocked(val) + } + return nil + } + res["iTunesBlockFileSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlockFileSharing(val) + } + return nil + } + res["iTunesBlockMusicService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetITunesBlockMusicService(val) + } + return nil + } + res["keyboardBlockDictation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyboardBlockDictation(val) + } + return nil + } + res["keychainBlockCloudSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKeychainBlockCloudSync(val) + } + return nil + } + res["multiplayerGamingBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMultiplayerGamingBlocked(val) + } + return nil + } + res["passwordBlockAirDropSharing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockAirDropSharing(val) + } + return nil + } + res["passwordBlockAutoFill"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockAutoFill(val) + } + return nil + } + res["passwordBlockFingerprintUnlock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockFingerprintUnlock(val) + } + return nil + } + res["passwordBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockModification(val) + } + return nil + } + res["passwordBlockProximityRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockProximityRequests(val) + } + return nil + } + res["passwordBlockSimple"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockSimple(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordMaximumAttemptCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMaximumAttemptCount(val) + } + return nil + } + res["passwordMinimumCharacterSetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumCharacterSetCount(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeLock"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeLock(val) + } + return nil + } + res["passwordMinutesOfInactivityBeforeScreenTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesOfInactivityBeforeScreenTimeout(val) + } + return nil + } + res["passwordMinutesUntilFailedLoginReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinutesUntilFailedLoginReset(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequired(val) + } + return nil + } + res["passwordRequiredType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRequiredPasswordType) + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequiredType(val.(*RequiredPasswordType)) + } + return nil + } + res["privacyAccessControls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSPrivacyAccessControlItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSPrivacyAccessControlItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSPrivacyAccessControlItemable) + } + m.SetPrivacyAccessControls(res) + } + return nil + } + res["safariBlockAutofill"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSafariBlockAutofill(val) + } + return nil + } + res["screenCaptureBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetScreenCaptureBlocked(val) + } + return nil + } + res["softwareUpdateMajorOSDeferredInstallDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdateMajorOSDeferredInstallDelayInDays(val) + } + return nil + } + res["softwareUpdateMinorOSDeferredInstallDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdateMinorOSDeferredInstallDelayInDays(val) + } + return nil + } + res["softwareUpdateNonOSDeferredInstallDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdateNonOSDeferredInstallDelayInDays(val) + } + return nil + } + res["softwareUpdatesEnforcedDelayInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSoftwareUpdatesEnforcedDelayInDays(val) + } + return nil + } + res["spotlightBlockInternetResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSpotlightBlockInternetResults(val) + } + return nil + } + res["touchIdTimeoutInHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTouchIdTimeoutInHours(val) + } + return nil + } + res["updateDelayPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateDelayPolicy) + if err != nil { + return err + } + if val != nil { + m.SetUpdateDelayPolicy(val.(*MacOSSoftwareUpdateDelayPolicy)) + } + return nil + } + res["wallpaperModificationBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWallpaperModificationBlocked(val) + } + return nil + } + return res +} +// GetGameCenterBlocked gets the gameCenterBlocked property value. Yes disables Game Center, and the Game Center icon is removed from the Home screen. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) GetGameCenterBlocked()(*bool) { + return m.gameCenterBlocked +} +// GetICloudBlockActivityContinuation gets the iCloudBlockActivityContinuation property value. Indicates whether or not to block the user from continuing work that they started on a MacOS device on another iOS or MacOS device (MacOS 10.15 or later). +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockActivityContinuation()(*bool) { + return m.iCloudBlockActivityContinuation +} +// GetICloudBlockAddressBook gets the iCloudBlockAddressBook property value. Indicates whether or not to block iCloud from syncing contacts. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockAddressBook()(*bool) { + return m.iCloudBlockAddressBook +} +// GetICloudBlockBookmarks gets the iCloudBlockBookmarks property value. Indicates whether or not to block iCloud from syncing bookmarks. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockBookmarks()(*bool) { + return m.iCloudBlockBookmarks +} +// GetICloudBlockCalendar gets the iCloudBlockCalendar property value. Indicates whether or not to block iCloud from syncing calendars. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockCalendar()(*bool) { + return m.iCloudBlockCalendar +} +// GetICloudBlockDocumentSync gets the iCloudBlockDocumentSync property value. Indicates whether or not to block iCloud document sync. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockDocumentSync()(*bool) { + return m.iCloudBlockDocumentSync +} +// GetICloudBlockMail gets the iCloudBlockMail property value. Indicates whether or not to block iCloud from syncing mail. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockMail()(*bool) { + return m.iCloudBlockMail +} +// GetICloudBlockNotes gets the iCloudBlockNotes property value. Indicates whether or not to block iCloud from syncing notes. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockNotes()(*bool) { + return m.iCloudBlockNotes +} +// GetICloudBlockPhotoLibrary gets the iCloudBlockPhotoLibrary property value. Indicates whether or not to block iCloud Photo Library. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockPhotoLibrary()(*bool) { + return m.iCloudBlockPhotoLibrary +} +// GetICloudBlockReminders gets the iCloudBlockReminders property value. Indicates whether or not to block iCloud from syncing reminders. +func (m *MacOSGeneralDeviceConfiguration) GetICloudBlockReminders()(*bool) { + return m.iCloudBlockReminders +} +// GetICloudDesktopAndDocumentsBlocked gets the iCloudDesktopAndDocumentsBlocked property value. When TRUE the synchronization of cloud desktop and documents is blocked. When FALSE, synchronization of the cloud desktop and documents are allowed. Available for devices running macOS 10.12.4 and later. +func (m *MacOSGeneralDeviceConfiguration) GetICloudDesktopAndDocumentsBlocked()(*bool) { + return m.iCloudDesktopAndDocumentsBlocked +} +// GetICloudPrivateRelayBlocked gets the iCloudPrivateRelayBlocked property value. iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running macOS 12 and later. +func (m *MacOSGeneralDeviceConfiguration) GetICloudPrivateRelayBlocked()(*bool) { + return m.iCloudPrivateRelayBlocked +} +// GetITunesBlockFileSharing gets the iTunesBlockFileSharing property value. Indicates whether or not to block files from being transferred using iTunes. +func (m *MacOSGeneralDeviceConfiguration) GetITunesBlockFileSharing()(*bool) { + return m.iTunesBlockFileSharing +} +// GetITunesBlockMusicService gets the iTunesBlockMusicService property value. Indicates whether or not to block Music service and revert Music app to classic mode. +func (m *MacOSGeneralDeviceConfiguration) GetITunesBlockMusicService()(*bool) { + return m.iTunesBlockMusicService +} +// GetKeyboardBlockDictation gets the keyboardBlockDictation property value. Indicates whether or not to block the user from using dictation input. +func (m *MacOSGeneralDeviceConfiguration) GetKeyboardBlockDictation()(*bool) { + return m.keyboardBlockDictation +} +// GetKeychainBlockCloudSync gets the keychainBlockCloudSync property value. Indicates whether or not iCloud keychain synchronization is blocked (macOS 10.12 and later). +func (m *MacOSGeneralDeviceConfiguration) GetKeychainBlockCloudSync()(*bool) { + return m.keychainBlockCloudSync +} +// GetMultiplayerGamingBlocked gets the multiplayerGamingBlocked property value. TRUE prevents multiplayer gaming when using Game Center. FALSE allows multiplayer gaming when using Game Center. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) GetMultiplayerGamingBlocked()(*bool) { + return m.multiplayerGamingBlocked +} +// GetPasswordBlockAirDropSharing gets the passwordBlockAirDropSharing property value. Indicates whether or not to block sharing passwords with the AirDrop passwords feature. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockAirDropSharing()(*bool) { + return m.passwordBlockAirDropSharing +} +// GetPasswordBlockAutoFill gets the passwordBlockAutoFill property value. Indicates whether or not to block the AutoFill Passwords feature. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockAutoFill()(*bool) { + return m.passwordBlockAutoFill +} +// GetPasswordBlockFingerprintUnlock gets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockFingerprintUnlock()(*bool) { + return m.passwordBlockFingerprintUnlock +} +// GetPasswordBlockModification gets the passwordBlockModification property value. Indicates whether or not to allow passcode modification. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockModification()(*bool) { + return m.passwordBlockModification +} +// GetPasswordBlockProximityRequests gets the passwordBlockProximityRequests property value. Indicates whether or not to block requesting passwords from nearby devices. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockProximityRequests()(*bool) { + return m.passwordBlockProximityRequests +} +// GetPasswordBlockSimple gets the passwordBlockSimple property value. Block simple passwords. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordBlockSimple()(*bool) { + return m.passwordBlockSimple +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Number of days before the password expires. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordMaximumAttemptCount gets the passwordMaximumAttemptCount property value. The number of allowed failed attempts to enter the passcode at the device's lock screen. Valid values 2 to 11 +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMaximumAttemptCount()(*int32) { + return m.passwordMaximumAttemptCount +} +// GetPasswordMinimumCharacterSetCount gets the passwordMinimumCharacterSetCount property value. Number of character sets a password must contain. Valid values 0 to 4 +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMinimumCharacterSetCount()(*int32) { + return m.passwordMinimumCharacterSetCount +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Minimum length of passwords. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordMinutesOfInactivityBeforeLock gets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity required before a password is required. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeLock()(*int32) { + return m.passwordMinutesOfInactivityBeforeLock +} +// GetPasswordMinutesOfInactivityBeforeScreenTimeout gets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity required before the screen times out. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) { + return m.passwordMinutesOfInactivityBeforeScreenTimeout +} +// GetPasswordMinutesUntilFailedLoginReset gets the passwordMinutesUntilFailedLoginReset property value. The number of minutes before the login is reset after the maximum number of unsuccessful login attempts is reached. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordMinutesUntilFailedLoginReset()(*int32) { + return m.passwordMinutesUntilFailedLoginReset +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequired gets the passwordRequired property value. Whether or not to require a password. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordRequired()(*bool) { + return m.passwordRequired +} +// GetPasswordRequiredType gets the passwordRequiredType property value. Possible values of required passwords. +func (m *MacOSGeneralDeviceConfiguration) GetPasswordRequiredType()(*RequiredPasswordType) { + return m.passwordRequiredType +} +// GetPrivacyAccessControls gets the privacyAccessControls property value. List of privacy preference policy controls. This collection can contain a maximum of 10000 elements. +func (m *MacOSGeneralDeviceConfiguration) GetPrivacyAccessControls()([]MacOSPrivacyAccessControlItemable) { + return m.privacyAccessControls +} +// GetSafariBlockAutofill gets the safariBlockAutofill property value. Indicates whether or not to block the user from using Auto fill in Safari. +func (m *MacOSGeneralDeviceConfiguration) GetSafariBlockAutofill()(*bool) { + return m.safariBlockAutofill +} +// GetScreenCaptureBlocked gets the screenCaptureBlocked property value. Indicates whether or not to block the user from taking Screenshots. +func (m *MacOSGeneralDeviceConfiguration) GetScreenCaptureBlocked()(*bool) { + return m.screenCaptureBlocked +} +// GetSoftwareUpdateMajorOSDeferredInstallDelayInDays gets the softwareUpdateMajorOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of major OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) GetSoftwareUpdateMajorOSDeferredInstallDelayInDays()(*int32) { + return m.softwareUpdateMajorOSDeferredInstallDelayInDays +} +// GetSoftwareUpdateMinorOSDeferredInstallDelayInDays gets the softwareUpdateMinorOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of minor OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) GetSoftwareUpdateMinorOSDeferredInstallDelayInDays()(*int32) { + return m.softwareUpdateMinorOSDeferredInstallDelayInDays +} +// GetSoftwareUpdateNonOSDeferredInstallDelayInDays gets the softwareUpdateNonOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of non-OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) GetSoftwareUpdateNonOSDeferredInstallDelayInDays()(*int32) { + return m.softwareUpdateNonOSDeferredInstallDelayInDays +} +// GetSoftwareUpdatesEnforcedDelayInDays gets the softwareUpdatesEnforcedDelayInDays property value. Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) GetSoftwareUpdatesEnforcedDelayInDays()(*int32) { + return m.softwareUpdatesEnforcedDelayInDays +} +// GetSpotlightBlockInternetResults gets the spotlightBlockInternetResults property value. Indicates whether or not to block Spotlight from returning any results from an Internet search. +func (m *MacOSGeneralDeviceConfiguration) GetSpotlightBlockInternetResults()(*bool) { + return m.spotlightBlockInternetResults +} +// GetTouchIdTimeoutInHours gets the touchIdTimeoutInHours property value. Maximum hours after which the user must enter their password to unlock the device instead of using Touch ID. Available for devices running macOS 12 and later. Valid values 0 to 2147483647 +func (m *MacOSGeneralDeviceConfiguration) GetTouchIdTimeoutInHours()(*int32) { + return m.touchIdTimeoutInHours +} +// GetUpdateDelayPolicy gets the updateDelayPolicy property value. Determines whether to delay OS and/or app updates for macOS. Possible values are: none, delayOSUpdateVisibility, delayAppUpdateVisibility, unknownFutureValue, delayMajorOsUpdateVisibility. +func (m *MacOSGeneralDeviceConfiguration) GetUpdateDelayPolicy()(*MacOSSoftwareUpdateDelayPolicy) { + return m.updateDelayPolicy +} +// GetWallpaperModificationBlocked gets the wallpaperModificationBlocked property value. TRUE prevents the wallpaper from being changed. FALSE allows the wallpaper to be changed. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) GetWallpaperModificationBlocked()(*bool) { + return m.wallpaperModificationBlocked +} +// Serialize serializes information the current object +func (m *MacOSGeneralDeviceConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("addingGameCenterFriendsBlocked", m.GetAddingGameCenterFriendsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("airDropBlocked", m.GetAirDropBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appleWatchBlockAutoUnlock", m.GetAppleWatchBlockAutoUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("cameraBlocked", m.GetCameraBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomAppBlockRemoteScreenObservation", m.GetClassroomAppBlockRemoteScreenObservation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomAppForceUnpromptedScreenObservation", m.GetClassroomAppForceUnpromptedScreenObservation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceAutomaticallyJoinClasses", m.GetClassroomForceAutomaticallyJoinClasses()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceRequestPermissionToLeaveClasses", m.GetClassroomForceRequestPermissionToLeaveClasses()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("classroomForceUnpromptedAppAndDeviceLock", m.GetClassroomForceUnpromptedAppAndDeviceLock()) + if err != nil { + return err + } + } + if m.GetCompliantAppListType() != nil { + cast := (*m.GetCompliantAppListType()).String() + err = writer.WriteStringValue("compliantAppListType", &cast) + if err != nil { + return err + } + } + if m.GetCompliantAppsList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCompliantAppsList())) + for i, v := range m.GetCompliantAppsList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("compliantAppsList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contentCachingBlocked", m.GetContentCachingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("definitionLookupBlocked", m.GetDefinitionLookupBlocked()) + if err != nil { + return err + } + } + if m.GetEmailInDomainSuffixes() != nil { + err = writer.WriteCollectionOfStringValues("emailInDomainSuffixes", m.GetEmailInDomainSuffixes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("eraseContentAndSettingsBlocked", m.GetEraseContentAndSettingsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("gameCenterBlocked", m.GetGameCenterBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockActivityContinuation", m.GetICloudBlockActivityContinuation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockAddressBook", m.GetICloudBlockAddressBook()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockBookmarks", m.GetICloudBlockBookmarks()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockCalendar", m.GetICloudBlockCalendar()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockDocumentSync", m.GetICloudBlockDocumentSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockMail", m.GetICloudBlockMail()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockNotes", m.GetICloudBlockNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockPhotoLibrary", m.GetICloudBlockPhotoLibrary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudBlockReminders", m.GetICloudBlockReminders()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudDesktopAndDocumentsBlocked", m.GetICloudDesktopAndDocumentsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iCloudPrivateRelayBlocked", m.GetICloudPrivateRelayBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlockFileSharing", m.GetITunesBlockFileSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iTunesBlockMusicService", m.GetITunesBlockMusicService()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keyboardBlockDictation", m.GetKeyboardBlockDictation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("keychainBlockCloudSync", m.GetKeychainBlockCloudSync()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("multiplayerGamingBlocked", m.GetMultiplayerGamingBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockAirDropSharing", m.GetPasswordBlockAirDropSharing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockAutoFill", m.GetPasswordBlockAutoFill()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockFingerprintUnlock", m.GetPasswordBlockFingerprintUnlock()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockModification", m.GetPasswordBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockProximityRequests", m.GetPasswordBlockProximityRequests()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockSimple", m.GetPasswordBlockSimple()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMaximumAttemptCount", m.GetPasswordMaximumAttemptCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumCharacterSetCount", m.GetPasswordMinimumCharacterSetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeLock", m.GetPasswordMinutesOfInactivityBeforeLock()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesOfInactivityBeforeScreenTimeout", m.GetPasswordMinutesOfInactivityBeforeScreenTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinutesUntilFailedLoginReset", m.GetPasswordMinutesUntilFailedLoginReset()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequired", m.GetPasswordRequired()) + if err != nil { + return err + } + } + if m.GetPasswordRequiredType() != nil { + cast := (*m.GetPasswordRequiredType()).String() + err = writer.WriteStringValue("passwordRequiredType", &cast) + if err != nil { + return err + } + } + if m.GetPrivacyAccessControls() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPrivacyAccessControls())) + for i, v := range m.GetPrivacyAccessControls() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("privacyAccessControls", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("safariBlockAutofill", m.GetSafariBlockAutofill()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("screenCaptureBlocked", m.GetScreenCaptureBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("softwareUpdateMajorOSDeferredInstallDelayInDays", m.GetSoftwareUpdateMajorOSDeferredInstallDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("softwareUpdateMinorOSDeferredInstallDelayInDays", m.GetSoftwareUpdateMinorOSDeferredInstallDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("softwareUpdateNonOSDeferredInstallDelayInDays", m.GetSoftwareUpdateNonOSDeferredInstallDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("softwareUpdatesEnforcedDelayInDays", m.GetSoftwareUpdatesEnforcedDelayInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("spotlightBlockInternetResults", m.GetSpotlightBlockInternetResults()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("touchIdTimeoutInHours", m.GetTouchIdTimeoutInHours()) + if err != nil { + return err + } + } + if m.GetUpdateDelayPolicy() != nil { + cast := (*m.GetUpdateDelayPolicy()).String() + err = writer.WriteStringValue("updateDelayPolicy", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("wallpaperModificationBlocked", m.GetWallpaperModificationBlocked()) + if err != nil { + return err + } + } + return nil +} +// SetAddingGameCenterFriendsBlocked sets the addingGameCenterFriendsBlocked property value. Yes prevents users from adding friends to Game Center. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) SetAddingGameCenterFriendsBlocked(value *bool)() { + m.addingGameCenterFriendsBlocked = value +} +// SetAirDropBlocked sets the airDropBlocked property value. Indicates whether or not to allow AirDrop. +func (m *MacOSGeneralDeviceConfiguration) SetAirDropBlocked(value *bool)() { + m.airDropBlocked = value +} +// SetAppleWatchBlockAutoUnlock sets the appleWatchBlockAutoUnlock property value. Indicates whether or to block users from unlocking their Mac with Apple Watch. +func (m *MacOSGeneralDeviceConfiguration) SetAppleWatchBlockAutoUnlock(value *bool)() { + m.appleWatchBlockAutoUnlock = value +} +// SetCameraBlocked sets the cameraBlocked property value. Indicates whether or not to block the user from accessing the camera of the device. +func (m *MacOSGeneralDeviceConfiguration) SetCameraBlocked(value *bool)() { + m.cameraBlocked = value +} +// SetClassroomAppBlockRemoteScreenObservation sets the classroomAppBlockRemoteScreenObservation property value. Indicates whether or not to allow remote screen observation by Classroom app. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) SetClassroomAppBlockRemoteScreenObservation(value *bool)() { + m.classroomAppBlockRemoteScreenObservation = value +} +// SetClassroomAppForceUnpromptedScreenObservation sets the classroomAppForceUnpromptedScreenObservation property value. Indicates whether or not to automatically give permission to the teacher of a managed course on the Classroom app to view a student's screen without prompting. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) SetClassroomAppForceUnpromptedScreenObservation(value *bool)() { + m.classroomAppForceUnpromptedScreenObservation = value +} +// SetClassroomForceAutomaticallyJoinClasses sets the classroomForceAutomaticallyJoinClasses property value. Indicates whether or not to automatically give permission to the teacher's requests, without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) SetClassroomForceAutomaticallyJoinClasses(value *bool)() { + m.classroomForceAutomaticallyJoinClasses = value +} +// SetClassroomForceRequestPermissionToLeaveClasses sets the classroomForceRequestPermissionToLeaveClasses property value. Indicates whether a student enrolled in an unmanaged course via Classroom will be required to request permission from the teacher when attempting to leave the course. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) SetClassroomForceRequestPermissionToLeaveClasses(value *bool)() { + m.classroomForceRequestPermissionToLeaveClasses = value +} +// SetClassroomForceUnpromptedAppAndDeviceLock sets the classroomForceUnpromptedAppAndDeviceLock property value. Indicates whether or not to allow the teacher to lock apps or the device without prompting the student. Requires MDM enrollment via Apple School Manager or Apple Business Manager. +func (m *MacOSGeneralDeviceConfiguration) SetClassroomForceUnpromptedAppAndDeviceLock(value *bool)() { + m.classroomForceUnpromptedAppAndDeviceLock = value +} +// SetCompliantAppListType sets the compliantAppListType property value. Possible values of the compliance app list. +func (m *MacOSGeneralDeviceConfiguration) SetCompliantAppListType(value *AppListType)() { + m.compliantAppListType = value +} +// SetCompliantAppsList sets the compliantAppsList property value. List of apps in the compliance (either allow list or block list, controlled by CompliantAppListType). This collection can contain a maximum of 10000 elements. +func (m *MacOSGeneralDeviceConfiguration) SetCompliantAppsList(value []AppListItemable)() { + m.compliantAppsList = value +} +// SetContentCachingBlocked sets the contentCachingBlocked property value. Indicates whether or not to allow content caching. +func (m *MacOSGeneralDeviceConfiguration) SetContentCachingBlocked(value *bool)() { + m.contentCachingBlocked = value +} +// SetDefinitionLookupBlocked sets the definitionLookupBlocked property value. Indicates whether or not to block definition lookup. +func (m *MacOSGeneralDeviceConfiguration) SetDefinitionLookupBlocked(value *bool)() { + m.definitionLookupBlocked = value +} +// SetEmailInDomainSuffixes sets the emailInDomainSuffixes property value. An email address lacking a suffix that matches any of these strings will be considered out-of-domain. +func (m *MacOSGeneralDeviceConfiguration) SetEmailInDomainSuffixes(value []string)() { + m.emailInDomainSuffixes = value +} +// SetEraseContentAndSettingsBlocked sets the eraseContentAndSettingsBlocked property value. TRUE disables the reset option on supervised devices. FALSE enables the reset option on supervised devices. Available for devices running macOS versions 12.0 and later. +func (m *MacOSGeneralDeviceConfiguration) SetEraseContentAndSettingsBlocked(value *bool)() { + m.eraseContentAndSettingsBlocked = value +} +// SetGameCenterBlocked sets the gameCenterBlocked property value. Yes disables Game Center, and the Game Center icon is removed from the Home screen. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) SetGameCenterBlocked(value *bool)() { + m.gameCenterBlocked = value +} +// SetICloudBlockActivityContinuation sets the iCloudBlockActivityContinuation property value. Indicates whether or not to block the user from continuing work that they started on a MacOS device on another iOS or MacOS device (MacOS 10.15 or later). +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockActivityContinuation(value *bool)() { + m.iCloudBlockActivityContinuation = value +} +// SetICloudBlockAddressBook sets the iCloudBlockAddressBook property value. Indicates whether or not to block iCloud from syncing contacts. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockAddressBook(value *bool)() { + m.iCloudBlockAddressBook = value +} +// SetICloudBlockBookmarks sets the iCloudBlockBookmarks property value. Indicates whether or not to block iCloud from syncing bookmarks. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockBookmarks(value *bool)() { + m.iCloudBlockBookmarks = value +} +// SetICloudBlockCalendar sets the iCloudBlockCalendar property value. Indicates whether or not to block iCloud from syncing calendars. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockCalendar(value *bool)() { + m.iCloudBlockCalendar = value +} +// SetICloudBlockDocumentSync sets the iCloudBlockDocumentSync property value. Indicates whether or not to block iCloud document sync. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockDocumentSync(value *bool)() { + m.iCloudBlockDocumentSync = value +} +// SetICloudBlockMail sets the iCloudBlockMail property value. Indicates whether or not to block iCloud from syncing mail. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockMail(value *bool)() { + m.iCloudBlockMail = value +} +// SetICloudBlockNotes sets the iCloudBlockNotes property value. Indicates whether or not to block iCloud from syncing notes. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockNotes(value *bool)() { + m.iCloudBlockNotes = value +} +// SetICloudBlockPhotoLibrary sets the iCloudBlockPhotoLibrary property value. Indicates whether or not to block iCloud Photo Library. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockPhotoLibrary(value *bool)() { + m.iCloudBlockPhotoLibrary = value +} +// SetICloudBlockReminders sets the iCloudBlockReminders property value. Indicates whether or not to block iCloud from syncing reminders. +func (m *MacOSGeneralDeviceConfiguration) SetICloudBlockReminders(value *bool)() { + m.iCloudBlockReminders = value +} +// SetICloudDesktopAndDocumentsBlocked sets the iCloudDesktopAndDocumentsBlocked property value. When TRUE the synchronization of cloud desktop and documents is blocked. When FALSE, synchronization of the cloud desktop and documents are allowed. Available for devices running macOS 10.12.4 and later. +func (m *MacOSGeneralDeviceConfiguration) SetICloudDesktopAndDocumentsBlocked(value *bool)() { + m.iCloudDesktopAndDocumentsBlocked = value +} +// SetICloudPrivateRelayBlocked sets the iCloudPrivateRelayBlocked property value. iCloud private relay is an iCloud+ service that prevents networks and servers from monitoring a person's activity across the internet. By blocking iCloud private relay, Apple will not encrypt the traffic leaving the device. Available for devices running macOS 12 and later. +func (m *MacOSGeneralDeviceConfiguration) SetICloudPrivateRelayBlocked(value *bool)() { + m.iCloudPrivateRelayBlocked = value +} +// SetITunesBlockFileSharing sets the iTunesBlockFileSharing property value. Indicates whether or not to block files from being transferred using iTunes. +func (m *MacOSGeneralDeviceConfiguration) SetITunesBlockFileSharing(value *bool)() { + m.iTunesBlockFileSharing = value +} +// SetITunesBlockMusicService sets the iTunesBlockMusicService property value. Indicates whether or not to block Music service and revert Music app to classic mode. +func (m *MacOSGeneralDeviceConfiguration) SetITunesBlockMusicService(value *bool)() { + m.iTunesBlockMusicService = value +} +// SetKeyboardBlockDictation sets the keyboardBlockDictation property value. Indicates whether or not to block the user from using dictation input. +func (m *MacOSGeneralDeviceConfiguration) SetKeyboardBlockDictation(value *bool)() { + m.keyboardBlockDictation = value +} +// SetKeychainBlockCloudSync sets the keychainBlockCloudSync property value. Indicates whether or not iCloud keychain synchronization is blocked (macOS 10.12 and later). +func (m *MacOSGeneralDeviceConfiguration) SetKeychainBlockCloudSync(value *bool)() { + m.keychainBlockCloudSync = value +} +// SetMultiplayerGamingBlocked sets the multiplayerGamingBlocked property value. TRUE prevents multiplayer gaming when using Game Center. FALSE allows multiplayer gaming when using Game Center. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) SetMultiplayerGamingBlocked(value *bool)() { + m.multiplayerGamingBlocked = value +} +// SetPasswordBlockAirDropSharing sets the passwordBlockAirDropSharing property value. Indicates whether or not to block sharing passwords with the AirDrop passwords feature. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockAirDropSharing(value *bool)() { + m.passwordBlockAirDropSharing = value +} +// SetPasswordBlockAutoFill sets the passwordBlockAutoFill property value. Indicates whether or not to block the AutoFill Passwords feature. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockAutoFill(value *bool)() { + m.passwordBlockAutoFill = value +} +// SetPasswordBlockFingerprintUnlock sets the passwordBlockFingerprintUnlock property value. Indicates whether or not to block fingerprint unlock. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockFingerprintUnlock(value *bool)() { + m.passwordBlockFingerprintUnlock = value +} +// SetPasswordBlockModification sets the passwordBlockModification property value. Indicates whether or not to allow passcode modification. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockModification(value *bool)() { + m.passwordBlockModification = value +} +// SetPasswordBlockProximityRequests sets the passwordBlockProximityRequests property value. Indicates whether or not to block requesting passwords from nearby devices. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockProximityRequests(value *bool)() { + m.passwordBlockProximityRequests = value +} +// SetPasswordBlockSimple sets the passwordBlockSimple property value. Block simple passwords. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordBlockSimple(value *bool)() { + m.passwordBlockSimple = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Number of days before the password expires. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordMaximumAttemptCount sets the passwordMaximumAttemptCount property value. The number of allowed failed attempts to enter the passcode at the device's lock screen. Valid values 2 to 11 +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMaximumAttemptCount(value *int32)() { + m.passwordMaximumAttemptCount = value +} +// SetPasswordMinimumCharacterSetCount sets the passwordMinimumCharacterSetCount property value. Number of character sets a password must contain. Valid values 0 to 4 +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMinimumCharacterSetCount(value *int32)() { + m.passwordMinimumCharacterSetCount = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Minimum length of passwords. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordMinutesOfInactivityBeforeLock sets the passwordMinutesOfInactivityBeforeLock property value. Minutes of inactivity required before a password is required. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeLock(value *int32)() { + m.passwordMinutesOfInactivityBeforeLock = value +} +// SetPasswordMinutesOfInactivityBeforeScreenTimeout sets the passwordMinutesOfInactivityBeforeScreenTimeout property value. Minutes of inactivity required before the screen times out. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() { + m.passwordMinutesOfInactivityBeforeScreenTimeout = value +} +// SetPasswordMinutesUntilFailedLoginReset sets the passwordMinutesUntilFailedLoginReset property value. The number of minutes before the login is reset after the maximum number of unsuccessful login attempts is reached. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordMinutesUntilFailedLoginReset(value *int32)() { + m.passwordMinutesUntilFailedLoginReset = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Number of previous passwords to block. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequired sets the passwordRequired property value. Whether or not to require a password. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordRequired(value *bool)() { + m.passwordRequired = value +} +// SetPasswordRequiredType sets the passwordRequiredType property value. Possible values of required passwords. +func (m *MacOSGeneralDeviceConfiguration) SetPasswordRequiredType(value *RequiredPasswordType)() { + m.passwordRequiredType = value +} +// SetPrivacyAccessControls sets the privacyAccessControls property value. List of privacy preference policy controls. This collection can contain a maximum of 10000 elements. +func (m *MacOSGeneralDeviceConfiguration) SetPrivacyAccessControls(value []MacOSPrivacyAccessControlItemable)() { + m.privacyAccessControls = value +} +// SetSafariBlockAutofill sets the safariBlockAutofill property value. Indicates whether or not to block the user from using Auto fill in Safari. +func (m *MacOSGeneralDeviceConfiguration) SetSafariBlockAutofill(value *bool)() { + m.safariBlockAutofill = value +} +// SetScreenCaptureBlocked sets the screenCaptureBlocked property value. Indicates whether or not to block the user from taking Screenshots. +func (m *MacOSGeneralDeviceConfiguration) SetScreenCaptureBlocked(value *bool)() { + m.screenCaptureBlocked = value +} +// SetSoftwareUpdateMajorOSDeferredInstallDelayInDays sets the softwareUpdateMajorOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of major OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) SetSoftwareUpdateMajorOSDeferredInstallDelayInDays(value *int32)() { + m.softwareUpdateMajorOSDeferredInstallDelayInDays = value +} +// SetSoftwareUpdateMinorOSDeferredInstallDelayInDays sets the softwareUpdateMinorOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of minor OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) SetSoftwareUpdateMinorOSDeferredInstallDelayInDays(value *int32)() { + m.softwareUpdateMinorOSDeferredInstallDelayInDays = value +} +// SetSoftwareUpdateNonOSDeferredInstallDelayInDays sets the softwareUpdateNonOSDeferredInstallDelayInDays property value. Specify the number of days (1-90) to delay visibility of non-OS software updates. Available for devices running macOS versions 11.3 and later. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) SetSoftwareUpdateNonOSDeferredInstallDelayInDays(value *int32)() { + m.softwareUpdateNonOSDeferredInstallDelayInDays = value +} +// SetSoftwareUpdatesEnforcedDelayInDays sets the softwareUpdatesEnforcedDelayInDays property value. Sets how many days a software update will be delyed for a supervised device. Valid values 0 to 90 +func (m *MacOSGeneralDeviceConfiguration) SetSoftwareUpdatesEnforcedDelayInDays(value *int32)() { + m.softwareUpdatesEnforcedDelayInDays = value +} +// SetSpotlightBlockInternetResults sets the spotlightBlockInternetResults property value. Indicates whether or not to block Spotlight from returning any results from an Internet search. +func (m *MacOSGeneralDeviceConfiguration) SetSpotlightBlockInternetResults(value *bool)() { + m.spotlightBlockInternetResults = value +} +// SetTouchIdTimeoutInHours sets the touchIdTimeoutInHours property value. Maximum hours after which the user must enter their password to unlock the device instead of using Touch ID. Available for devices running macOS 12 and later. Valid values 0 to 2147483647 +func (m *MacOSGeneralDeviceConfiguration) SetTouchIdTimeoutInHours(value *int32)() { + m.touchIdTimeoutInHours = value +} +// SetUpdateDelayPolicy sets the updateDelayPolicy property value. Determines whether to delay OS and/or app updates for macOS. Possible values are: none, delayOSUpdateVisibility, delayAppUpdateVisibility, unknownFutureValue, delayMajorOsUpdateVisibility. +func (m *MacOSGeneralDeviceConfiguration) SetUpdateDelayPolicy(value *MacOSSoftwareUpdateDelayPolicy)() { + m.updateDelayPolicy = value +} +// SetWallpaperModificationBlocked sets the wallpaperModificationBlocked property value. TRUE prevents the wallpaper from being changed. FALSE allows the wallpaper to be changed. Available for devices running macOS versions 10.13 and later. +func (m *MacOSGeneralDeviceConfiguration) SetWallpaperModificationBlocked(value *bool)() { + m.wallpaperModificationBlocked = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_response.go new file mode 100644 index 000000000..cb9bd66b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSGeneralDeviceConfigurationCollectionResponse +type MacOSGeneralDeviceConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSGeneralDeviceConfigurationable +} +// NewMacOSGeneralDeviceConfigurationCollectionResponse instantiates a new MacOSGeneralDeviceConfigurationCollectionResponse and sets the default values. +func NewMacOSGeneralDeviceConfigurationCollectionResponse()(*MacOSGeneralDeviceConfigurationCollectionResponse) { + m := &MacOSGeneralDeviceConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSGeneralDeviceConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSGeneralDeviceConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSGeneralDeviceConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSGeneralDeviceConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSGeneralDeviceConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSGeneralDeviceConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSGeneralDeviceConfigurationCollectionResponse) GetValue()([]MacOSGeneralDeviceConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSGeneralDeviceConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSGeneralDeviceConfigurationCollectionResponse) SetValue(value []MacOSGeneralDeviceConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_responseable.go new file mode 100644 index 000000000..b4fbb7434 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSGeneralDeviceConfigurationCollectionResponseable +type MacOSGeneralDeviceConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSGeneralDeviceConfigurationable) + SetValue(value []MacOSGeneralDeviceConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configurationable.go new file mode 100644 index 000000000..27172dca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_general_device_configurationable.go @@ -0,0 +1,129 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSGeneralDeviceConfigurationable +type MacOSGeneralDeviceConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddingGameCenterFriendsBlocked()(*bool) + GetAirDropBlocked()(*bool) + GetAppleWatchBlockAutoUnlock()(*bool) + GetCameraBlocked()(*bool) + GetClassroomAppBlockRemoteScreenObservation()(*bool) + GetClassroomAppForceUnpromptedScreenObservation()(*bool) + GetClassroomForceAutomaticallyJoinClasses()(*bool) + GetClassroomForceRequestPermissionToLeaveClasses()(*bool) + GetClassroomForceUnpromptedAppAndDeviceLock()(*bool) + GetCompliantAppListType()(*AppListType) + GetCompliantAppsList()([]AppListItemable) + GetContentCachingBlocked()(*bool) + GetDefinitionLookupBlocked()(*bool) + GetEmailInDomainSuffixes()([]string) + GetEraseContentAndSettingsBlocked()(*bool) + GetGameCenterBlocked()(*bool) + GetICloudBlockActivityContinuation()(*bool) + GetICloudBlockAddressBook()(*bool) + GetICloudBlockBookmarks()(*bool) + GetICloudBlockCalendar()(*bool) + GetICloudBlockDocumentSync()(*bool) + GetICloudBlockMail()(*bool) + GetICloudBlockNotes()(*bool) + GetICloudBlockPhotoLibrary()(*bool) + GetICloudBlockReminders()(*bool) + GetICloudDesktopAndDocumentsBlocked()(*bool) + GetICloudPrivateRelayBlocked()(*bool) + GetITunesBlockFileSharing()(*bool) + GetITunesBlockMusicService()(*bool) + GetKeyboardBlockDictation()(*bool) + GetKeychainBlockCloudSync()(*bool) + GetMultiplayerGamingBlocked()(*bool) + GetPasswordBlockAirDropSharing()(*bool) + GetPasswordBlockAutoFill()(*bool) + GetPasswordBlockFingerprintUnlock()(*bool) + GetPasswordBlockModification()(*bool) + GetPasswordBlockProximityRequests()(*bool) + GetPasswordBlockSimple()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordMaximumAttemptCount()(*int32) + GetPasswordMinimumCharacterSetCount()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordMinutesOfInactivityBeforeLock()(*int32) + GetPasswordMinutesOfInactivityBeforeScreenTimeout()(*int32) + GetPasswordMinutesUntilFailedLoginReset()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequired()(*bool) + GetPasswordRequiredType()(*RequiredPasswordType) + GetPrivacyAccessControls()([]MacOSPrivacyAccessControlItemable) + GetSafariBlockAutofill()(*bool) + GetScreenCaptureBlocked()(*bool) + GetSoftwareUpdateMajorOSDeferredInstallDelayInDays()(*int32) + GetSoftwareUpdateMinorOSDeferredInstallDelayInDays()(*int32) + GetSoftwareUpdateNonOSDeferredInstallDelayInDays()(*int32) + GetSoftwareUpdatesEnforcedDelayInDays()(*int32) + GetSpotlightBlockInternetResults()(*bool) + GetTouchIdTimeoutInHours()(*int32) + GetUpdateDelayPolicy()(*MacOSSoftwareUpdateDelayPolicy) + GetWallpaperModificationBlocked()(*bool) + SetAddingGameCenterFriendsBlocked(value *bool)() + SetAirDropBlocked(value *bool)() + SetAppleWatchBlockAutoUnlock(value *bool)() + SetCameraBlocked(value *bool)() + SetClassroomAppBlockRemoteScreenObservation(value *bool)() + SetClassroomAppForceUnpromptedScreenObservation(value *bool)() + SetClassroomForceAutomaticallyJoinClasses(value *bool)() + SetClassroomForceRequestPermissionToLeaveClasses(value *bool)() + SetClassroomForceUnpromptedAppAndDeviceLock(value *bool)() + SetCompliantAppListType(value *AppListType)() + SetCompliantAppsList(value []AppListItemable)() + SetContentCachingBlocked(value *bool)() + SetDefinitionLookupBlocked(value *bool)() + SetEmailInDomainSuffixes(value []string)() + SetEraseContentAndSettingsBlocked(value *bool)() + SetGameCenterBlocked(value *bool)() + SetICloudBlockActivityContinuation(value *bool)() + SetICloudBlockAddressBook(value *bool)() + SetICloudBlockBookmarks(value *bool)() + SetICloudBlockCalendar(value *bool)() + SetICloudBlockDocumentSync(value *bool)() + SetICloudBlockMail(value *bool)() + SetICloudBlockNotes(value *bool)() + SetICloudBlockPhotoLibrary(value *bool)() + SetICloudBlockReminders(value *bool)() + SetICloudDesktopAndDocumentsBlocked(value *bool)() + SetICloudPrivateRelayBlocked(value *bool)() + SetITunesBlockFileSharing(value *bool)() + SetITunesBlockMusicService(value *bool)() + SetKeyboardBlockDictation(value *bool)() + SetKeychainBlockCloudSync(value *bool)() + SetMultiplayerGamingBlocked(value *bool)() + SetPasswordBlockAirDropSharing(value *bool)() + SetPasswordBlockAutoFill(value *bool)() + SetPasswordBlockFingerprintUnlock(value *bool)() + SetPasswordBlockModification(value *bool)() + SetPasswordBlockProximityRequests(value *bool)() + SetPasswordBlockSimple(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordMaximumAttemptCount(value *int32)() + SetPasswordMinimumCharacterSetCount(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordMinutesOfInactivityBeforeLock(value *int32)() + SetPasswordMinutesOfInactivityBeforeScreenTimeout(value *int32)() + SetPasswordMinutesUntilFailedLoginReset(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequired(value *bool)() + SetPasswordRequiredType(value *RequiredPasswordType)() + SetPrivacyAccessControls(value []MacOSPrivacyAccessControlItemable)() + SetSafariBlockAutofill(value *bool)() + SetScreenCaptureBlocked(value *bool)() + SetSoftwareUpdateMajorOSDeferredInstallDelayInDays(value *int32)() + SetSoftwareUpdateMinorOSDeferredInstallDelayInDays(value *int32)() + SetSoftwareUpdateNonOSDeferredInstallDelayInDays(value *int32)() + SetSoftwareUpdatesEnforcedDelayInDays(value *int32)() + SetSpotlightBlockInternetResults(value *bool)() + SetTouchIdTimeoutInHours(value *int32)() + SetUpdateDelayPolicy(value *MacOSSoftwareUpdateDelayPolicy)() + SetWallpaperModificationBlocked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile.go b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile.go new file mode 100644 index 000000000..4e7eca0ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSImportedPFXCertificateProfile +type MacOSImportedPFXCertificateProfile struct { + MacOSCertificateProfileBase + // PFX Import Options. + intendedPurpose *IntendedPurpose + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable +} +// NewMacOSImportedPFXCertificateProfile instantiates a new MacOSImportedPFXCertificateProfile and sets the default values. +func NewMacOSImportedPFXCertificateProfile()(*MacOSImportedPFXCertificateProfile) { + m := &MacOSImportedPFXCertificateProfile{ + MacOSCertificateProfileBase: *NewMacOSCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.macOSImportedPFXCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSImportedPFXCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSImportedPFXCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSImportedPFXCertificateProfile(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSImportedPFXCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSCertificateProfileBase.GetFieldDeserializers() + res["intendedPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIntendedPurpose) + if err != nil { + return err + } + if val != nil { + m.SetIntendedPurpose(val.(*IntendedPurpose)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + return res +} +// GetIntendedPurpose gets the intendedPurpose property value. PFX Import Options. +func (m *MacOSImportedPFXCertificateProfile) GetIntendedPurpose()(*IntendedPurpose) { + return m.intendedPurpose +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSImportedPFXCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// Serialize serializes information the current object +func (m *MacOSImportedPFXCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + if m.GetIntendedPurpose() != nil { + cast := (*m.GetIntendedPurpose()).String() + err = writer.WriteStringValue("intendedPurpose", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetIntendedPurpose sets the intendedPurpose property value. PFX Import Options. +func (m *MacOSImportedPFXCertificateProfile) SetIntendedPurpose(value *IntendedPurpose)() { + m.intendedPurpose = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSImportedPFXCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_response.go new file mode 100644 index 000000000..abe49b3ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSImportedPFXCertificateProfileCollectionResponse +type MacOSImportedPFXCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSImportedPFXCertificateProfileable +} +// NewMacOSImportedPFXCertificateProfileCollectionResponse instantiates a new MacOSImportedPFXCertificateProfileCollectionResponse and sets the default values. +func NewMacOSImportedPFXCertificateProfileCollectionResponse()(*MacOSImportedPFXCertificateProfileCollectionResponse) { + m := &MacOSImportedPFXCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSImportedPFXCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSImportedPFXCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSImportedPFXCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSImportedPFXCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSImportedPFXCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(MacOSImportedPFXCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSImportedPFXCertificateProfileCollectionResponse) GetValue()([]MacOSImportedPFXCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSImportedPFXCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSImportedPFXCertificateProfileCollectionResponse) SetValue(value []MacOSImportedPFXCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..5e254c6ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSImportedPFXCertificateProfileCollectionResponseable +type MacOSImportedPFXCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSImportedPFXCertificateProfileable) + SetValue(value []MacOSImportedPFXCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profileable.go new file mode 100644 index 000000000..d2eafe2ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_imported_p_f_x_certificate_profileable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSImportedPFXCertificateProfileable +type MacOSImportedPFXCertificateProfileable interface { + MacOSCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntendedPurpose()(*IntendedPurpose) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + SetIntendedPurpose(value *IntendedPurpose)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_included_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app.go new file mode 100644 index 000000000..e8be66f8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSIncludedApp contains properties of an included .app in a MacOS app. +type MacOSIncludedApp 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 CFBundleIdentifier. + bundleId *string + // The CFBundleVersion. + bundleVersion *string + // The OdataType property + odataType *string +} +// NewMacOSIncludedApp instantiates a new macOSIncludedApp and sets the default values. +func NewMacOSIncludedApp()(*MacOSIncludedApp) { + m := &MacOSIncludedApp{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSIncludedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSIncludedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSIncludedApp(), 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 *MacOSIncludedApp) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBundleId gets the bundleId property value. The CFBundleIdentifier. +func (m *MacOSIncludedApp) GetBundleId()(*string) { + return m.bundleId +} +// GetBundleVersion gets the bundleVersion property value. The CFBundleVersion. +func (m *MacOSIncludedApp) GetBundleVersion()(*string) { + return m.bundleVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSIncludedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["bundleVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleVersion(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSIncludedApp) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MacOSIncludedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bundleVersion", m.GetBundleVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MacOSIncludedApp) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBundleId sets the bundleId property value. The CFBundleIdentifier. +func (m *MacOSIncludedApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetBundleVersion sets the bundleVersion property value. The CFBundleVersion. +func (m *MacOSIncludedApp) SetBundleVersion(value *string)() { + m.bundleVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSIncludedApp) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_response.go new file mode 100644 index 000000000..6a98febce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSIncludedAppCollectionResponse +type MacOSIncludedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSIncludedAppable +} +// NewMacOSIncludedAppCollectionResponse instantiates a new MacOSIncludedAppCollectionResponse and sets the default values. +func NewMacOSIncludedAppCollectionResponse()(*MacOSIncludedAppCollectionResponse) { + m := &MacOSIncludedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSIncludedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSIncludedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSIncludedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSIncludedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSIncludedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSIncludedAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSIncludedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSIncludedAppCollectionResponse) GetValue()([]MacOSIncludedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSIncludedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSIncludedAppCollectionResponse) SetValue(value []MacOSIncludedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_responseable.go new file mode 100644 index 000000000..99b763316 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_included_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSIncludedAppCollectionResponseable +type MacOSIncludedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSIncludedAppable) + SetValue(value []MacOSIncludedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_included_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_included_appable.go new file mode 100644 index 000000000..ee8c8f58f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_included_appable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSIncludedAppable +type MacOSIncludedAppable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + GetBundleVersion()(*string) + GetOdataType()(*string) + SetBundleId(value *string)() + SetBundleVersion(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extension.go new file mode 100644 index 000000000..7c968c9e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extension.go @@ -0,0 +1,832 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKerberosSingleSignOnExtension +type MacOSKerberosSingleSignOnExtension struct { + MacOSSingleSignOnExtension + // Gets or sets the Active Directory site. + activeDirectorySiteCode *string + // Enables or disables whether the Kerberos extension can automatically determine its site name. + blockActiveDirectorySiteAutoDiscovery *bool + // Enables or disables Keychain usage. + blockAutomaticLogin *bool + // Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. + cacheName *string + // Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. + credentialBundleIdAccessControlList []string + // When set to True, the credential is requested on the next matching Kerberos challenge or network state change. When the credential is expired or missing, a new credential is created. Available for devices running macOS versions 12 and later. + credentialsCacheMonitored *bool + // Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. + domainRealms []string + // Gets or sets a list of hosts or domain names for which the app extension performs SSO. + domains []string + // When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. + isDefaultRealm *bool + // When set to True, the Kerberos extension allows any apps entered with the app bundle ID, managed apps, and standard Kerberos utilities, such as TicketViewer and klist, to access and use the credential. Available for devices running macOS versions 12 and later. + kerberosAppsInBundleIdACLIncluded *bool + // When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. + managedAppsInBundleIdACLIncluded *bool + // Select how other processes use the Kerberos Extension credential. + modeCredentialUsed *string + // Enables or disables password changes. + passwordBlockModification *bool + // Gets or sets the URL that the user will be sent to when they initiate a password change. + passwordChangeUrl *string + // Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. + passwordEnableLocalSync *bool + // Overrides the default password expiration in days. For most domains, this value is calculated automatically. + passwordExpirationDays *int32 + // Gets or sets the number of days until the user is notified that their password will expire (default is 15). + passwordExpirationNotificationDays *int32 + // Gets or sets the minimum number of days until a user can change their password again. + passwordMinimumAgeDays *int32 + // Gets or sets the minimum length of a password. + passwordMinimumLength *int32 + // Gets or sets the number of previous passwords to block. + passwordPreviousPasswordBlockCount *int32 + // Enables or disables whether passwords must meet Active Directory's complexity requirements. + passwordRequireActiveDirectoryComplexity *bool + // Gets or sets a description of the password complexity requirements. + passwordRequirementsDescription *string + // Add creates an ordered list of preferred Key Distribution Centers (KDCs) to use for Kerberos traffic. This list is used when the servers are not discoverable using DNS. When the servers are discoverable, the list is used for both connectivity checks, and used first for Kerberos traffic. If the servers don’t respond, then the device uses DNS discovery. Delete removes an existing list, and devices use DNS discovery. Available for devices running macOS versions 12 and later. + preferredKDCs []string + // Gets or sets the case-sensitive realm name for this profile. + realm *string + // Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. + requireUserPresence *bool + // Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. + signInHelpText *string + // When set to True, LDAP connections are required to use Transport Layer Security (TLS). Available for devices running macOS versions 11 and later. + tlsForLDAPRequired *bool + // This label replaces the user name shown in the Kerberos extension. You can enter a name to match the name of your company or organization. Available for devices running macOS versions 11 and later. + usernameLabelCustom *string + // Gets or sets the principle user name to use for this profile. The realm name does not need to be included. + userPrincipalName *string + // When set to True, the user isn’t prompted to set up the Kerberos extension until the extension is enabled by the admin, or a Kerberos challenge is received. Available for devices running macOS versions 11 and later. + userSetupDelayed *bool +} +// NewMacOSKerberosSingleSignOnExtension instantiates a new MacOSKerberosSingleSignOnExtension and sets the default values. +func NewMacOSKerberosSingleSignOnExtension()(*MacOSKerberosSingleSignOnExtension) { + m := &MacOSKerberosSingleSignOnExtension{ + MacOSSingleSignOnExtension: *NewMacOSSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.macOSKerberosSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSKerberosSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSKerberosSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSKerberosSingleSignOnExtension(), nil +} +// GetActiveDirectorySiteCode gets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *MacOSKerberosSingleSignOnExtension) GetActiveDirectorySiteCode()(*string) { + return m.activeDirectorySiteCode +} +// GetBlockActiveDirectorySiteAutoDiscovery gets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *MacOSKerberosSingleSignOnExtension) GetBlockActiveDirectorySiteAutoDiscovery()(*bool) { + return m.blockActiveDirectorySiteAutoDiscovery +} +// GetBlockAutomaticLogin gets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *MacOSKerberosSingleSignOnExtension) GetBlockAutomaticLogin()(*bool) { + return m.blockAutomaticLogin +} +// GetCacheName gets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *MacOSKerberosSingleSignOnExtension) GetCacheName()(*string) { + return m.cacheName +} +// GetCredentialBundleIdAccessControlList gets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *MacOSKerberosSingleSignOnExtension) GetCredentialBundleIdAccessControlList()([]string) { + return m.credentialBundleIdAccessControlList +} +// GetCredentialsCacheMonitored gets the credentialsCacheMonitored property value. When set to True, the credential is requested on the next matching Kerberos challenge or network state change. When the credential is expired or missing, a new credential is created. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetCredentialsCacheMonitored()(*bool) { + return m.credentialsCacheMonitored +} +// GetDomainRealms gets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *MacOSKerberosSingleSignOnExtension) GetDomainRealms()([]string) { + return m.domainRealms +} +// GetDomains gets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *MacOSKerberosSingleSignOnExtension) GetDomains()([]string) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSKerberosSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSSingleSignOnExtension.GetFieldDeserializers() + res["activeDirectorySiteCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActiveDirectorySiteCode(val) + } + return nil + } + res["blockActiveDirectorySiteAutoDiscovery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockActiveDirectorySiteAutoDiscovery(val) + } + return nil + } + res["blockAutomaticLogin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockAutomaticLogin(val) + } + return nil + } + res["cacheName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCacheName(val) + } + return nil + } + res["credentialBundleIdAccessControlList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCredentialBundleIdAccessControlList(res) + } + return nil + } + res["credentialsCacheMonitored"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialsCacheMonitored(val) + } + return nil + } + res["domainRealms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomainRealms(res) + } + return nil + } + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDomains(res) + } + return nil + } + res["isDefaultRealm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultRealm(val) + } + return nil + } + res["kerberosAppsInBundleIdACLIncluded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetKerberosAppsInBundleIdACLIncluded(val) + } + return nil + } + res["managedAppsInBundleIdACLIncluded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedAppsInBundleIdACLIncluded(val) + } + return nil + } + res["modeCredentialUsed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModeCredentialUsed(val) + } + return nil + } + res["passwordBlockModification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordBlockModification(val) + } + return nil + } + res["passwordChangeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordChangeUrl(val) + } + return nil + } + res["passwordEnableLocalSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordEnableLocalSync(val) + } + return nil + } + res["passwordExpirationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationDays(val) + } + return nil + } + res["passwordExpirationNotificationDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordExpirationNotificationDays(val) + } + return nil + } + res["passwordMinimumAgeDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumAgeDays(val) + } + return nil + } + res["passwordMinimumLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordMinimumLength(val) + } + return nil + } + res["passwordPreviousPasswordBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPasswordPreviousPasswordBlockCount(val) + } + return nil + } + res["passwordRequireActiveDirectoryComplexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequireActiveDirectoryComplexity(val) + } + return nil + } + res["passwordRequirementsDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordRequirementsDescription(val) + } + return nil + } + res["preferredKDCs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPreferredKDCs(res) + } + return nil + } + res["realm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRealm(val) + } + return nil + } + res["requireUserPresence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireUserPresence(val) + } + return nil + } + res["signInHelpText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInHelpText(val) + } + return nil + } + res["tlsForLDAPRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTlsForLDAPRequired(val) + } + return nil + } + res["usernameLabelCustom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsernameLabelCustom(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["userSetupDelayed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserSetupDelayed(val) + } + return nil + } + return res +} +// GetIsDefaultRealm gets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *MacOSKerberosSingleSignOnExtension) GetIsDefaultRealm()(*bool) { + return m.isDefaultRealm +} +// GetKerberosAppsInBundleIdACLIncluded gets the kerberosAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows any apps entered with the app bundle ID, managed apps, and standard Kerberos utilities, such as TicketViewer and klist, to access and use the credential. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetKerberosAppsInBundleIdACLIncluded()(*bool) { + return m.kerberosAppsInBundleIdACLIncluded +} +// GetManagedAppsInBundleIdACLIncluded gets the managedAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetManagedAppsInBundleIdACLIncluded()(*bool) { + return m.managedAppsInBundleIdACLIncluded +} +// GetModeCredentialUsed gets the modeCredentialUsed property value. Select how other processes use the Kerberos Extension credential. +func (m *MacOSKerberosSingleSignOnExtension) GetModeCredentialUsed()(*string) { + return m.modeCredentialUsed +} +// GetPasswordBlockModification gets the passwordBlockModification property value. Enables or disables password changes. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordBlockModification()(*bool) { + return m.passwordBlockModification +} +// GetPasswordChangeUrl gets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordChangeUrl()(*string) { + return m.passwordChangeUrl +} +// GetPasswordEnableLocalSync gets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordEnableLocalSync()(*bool) { + return m.passwordEnableLocalSync +} +// GetPasswordExpirationDays gets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordExpirationDays()(*int32) { + return m.passwordExpirationDays +} +// GetPasswordExpirationNotificationDays gets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordExpirationNotificationDays()(*int32) { + return m.passwordExpirationNotificationDays +} +// GetPasswordMinimumAgeDays gets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordMinimumAgeDays()(*int32) { + return m.passwordMinimumAgeDays +} +// GetPasswordMinimumLength gets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordMinimumLength()(*int32) { + return m.passwordMinimumLength +} +// GetPasswordPreviousPasswordBlockCount gets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordPreviousPasswordBlockCount()(*int32) { + return m.passwordPreviousPasswordBlockCount +} +// GetPasswordRequireActiveDirectoryComplexity gets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordRequireActiveDirectoryComplexity()(*bool) { + return m.passwordRequireActiveDirectoryComplexity +} +// GetPasswordRequirementsDescription gets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *MacOSKerberosSingleSignOnExtension) GetPasswordRequirementsDescription()(*string) { + return m.passwordRequirementsDescription +} +// GetPreferredKDCs gets the preferredKDCs property value. Add creates an ordered list of preferred Key Distribution Centers (KDCs) to use for Kerberos traffic. This list is used when the servers are not discoverable using DNS. When the servers are discoverable, the list is used for both connectivity checks, and used first for Kerberos traffic. If the servers don’t respond, then the device uses DNS discovery. Delete removes an existing list, and devices use DNS discovery. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetPreferredKDCs()([]string) { + return m.preferredKDCs +} +// GetRealm gets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *MacOSKerberosSingleSignOnExtension) GetRealm()(*string) { + return m.realm +} +// GetRequireUserPresence gets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *MacOSKerberosSingleSignOnExtension) GetRequireUserPresence()(*bool) { + return m.requireUserPresence +} +// GetSignInHelpText gets the signInHelpText property value. Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetSignInHelpText()(*string) { + return m.signInHelpText +} +// GetTlsForLDAPRequired gets the tlsForLDAPRequired property value. When set to True, LDAP connections are required to use Transport Layer Security (TLS). Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetTlsForLDAPRequired()(*bool) { + return m.tlsForLDAPRequired +} +// GetUsernameLabelCustom gets the usernameLabelCustom property value. This label replaces the user name shown in the Kerberos extension. You can enter a name to match the name of your company or organization. Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetUsernameLabelCustom()(*string) { + return m.usernameLabelCustom +} +// GetUserPrincipalName gets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *MacOSKerberosSingleSignOnExtension) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUserSetupDelayed gets the userSetupDelayed property value. When set to True, the user isn’t prompted to set up the Kerberos extension until the extension is enabled by the admin, or a Kerberos challenge is received. Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) GetUserSetupDelayed()(*bool) { + return m.userSetupDelayed +} +// Serialize serializes information the current object +func (m *MacOSKerberosSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activeDirectorySiteCode", m.GetActiveDirectorySiteCode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockActiveDirectorySiteAutoDiscovery", m.GetBlockActiveDirectorySiteAutoDiscovery()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockAutomaticLogin", m.GetBlockAutomaticLogin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cacheName", m.GetCacheName()) + if err != nil { + return err + } + } + if m.GetCredentialBundleIdAccessControlList() != nil { + err = writer.WriteCollectionOfStringValues("credentialBundleIdAccessControlList", m.GetCredentialBundleIdAccessControlList()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("credentialsCacheMonitored", m.GetCredentialsCacheMonitored()) + if err != nil { + return err + } + } + if m.GetDomainRealms() != nil { + err = writer.WriteCollectionOfStringValues("domainRealms", m.GetDomainRealms()) + if err != nil { + return err + } + } + if m.GetDomains() != nil { + err = writer.WriteCollectionOfStringValues("domains", m.GetDomains()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultRealm", m.GetIsDefaultRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("kerberosAppsInBundleIdACLIncluded", m.GetKerberosAppsInBundleIdACLIncluded()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedAppsInBundleIdACLIncluded", m.GetManagedAppsInBundleIdACLIncluded()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modeCredentialUsed", m.GetModeCredentialUsed()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordBlockModification", m.GetPasswordBlockModification()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordChangeUrl", m.GetPasswordChangeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordEnableLocalSync", m.GetPasswordEnableLocalSync()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationDays", m.GetPasswordExpirationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordExpirationNotificationDays", m.GetPasswordExpirationNotificationDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumAgeDays", m.GetPasswordMinimumAgeDays()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordMinimumLength", m.GetPasswordMinimumLength()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("passwordPreviousPasswordBlockCount", m.GetPasswordPreviousPasswordBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("passwordRequireActiveDirectoryComplexity", m.GetPasswordRequireActiveDirectoryComplexity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passwordRequirementsDescription", m.GetPasswordRequirementsDescription()) + if err != nil { + return err + } + } + if m.GetPreferredKDCs() != nil { + err = writer.WriteCollectionOfStringValues("preferredKDCs", m.GetPreferredKDCs()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("realm", m.GetRealm()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requireUserPresence", m.GetRequireUserPresence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signInHelpText", m.GetSignInHelpText()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("tlsForLDAPRequired", m.GetTlsForLDAPRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("usernameLabelCustom", m.GetUsernameLabelCustom()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("userSetupDelayed", m.GetUserSetupDelayed()) + if err != nil { + return err + } + } + return nil +} +// SetActiveDirectorySiteCode sets the activeDirectorySiteCode property value. Gets or sets the Active Directory site. +func (m *MacOSKerberosSingleSignOnExtension) SetActiveDirectorySiteCode(value *string)() { + m.activeDirectorySiteCode = value +} +// SetBlockActiveDirectorySiteAutoDiscovery sets the blockActiveDirectorySiteAutoDiscovery property value. Enables or disables whether the Kerberos extension can automatically determine its site name. +func (m *MacOSKerberosSingleSignOnExtension) SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() { + m.blockActiveDirectorySiteAutoDiscovery = value +} +// SetBlockAutomaticLogin sets the blockAutomaticLogin property value. Enables or disables Keychain usage. +func (m *MacOSKerberosSingleSignOnExtension) SetBlockAutomaticLogin(value *bool)() { + m.blockAutomaticLogin = value +} +// SetCacheName sets the cacheName property value. Gets or sets the Generic Security Services name of the Kerberos cache to use for this profile. +func (m *MacOSKerberosSingleSignOnExtension) SetCacheName(value *string)() { + m.cacheName = value +} +// SetCredentialBundleIdAccessControlList sets the credentialBundleIdAccessControlList property value. Gets or sets a list of app Bundle IDs allowed to access the Kerberos Ticket Granting Ticket. +func (m *MacOSKerberosSingleSignOnExtension) SetCredentialBundleIdAccessControlList(value []string)() { + m.credentialBundleIdAccessControlList = value +} +// SetCredentialsCacheMonitored sets the credentialsCacheMonitored property value. When set to True, the credential is requested on the next matching Kerberos challenge or network state change. When the credential is expired or missing, a new credential is created. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetCredentialsCacheMonitored(value *bool)() { + m.credentialsCacheMonitored = value +} +// SetDomainRealms sets the domainRealms property value. Gets or sets a list of realms for custom domain-realm mapping. Realms are case sensitive. +func (m *MacOSKerberosSingleSignOnExtension) SetDomainRealms(value []string)() { + m.domainRealms = value +} +// SetDomains sets the domains property value. Gets or sets a list of hosts or domain names for which the app extension performs SSO. +func (m *MacOSKerberosSingleSignOnExtension) SetDomains(value []string)() { + m.domains = value +} +// SetIsDefaultRealm sets the isDefaultRealm property value. When true, this profile's realm will be selected as the default. Necessary if multiple Kerberos-type profiles are configured. +func (m *MacOSKerberosSingleSignOnExtension) SetIsDefaultRealm(value *bool)() { + m.isDefaultRealm = value +} +// SetKerberosAppsInBundleIdACLIncluded sets the kerberosAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows any apps entered with the app bundle ID, managed apps, and standard Kerberos utilities, such as TicketViewer and klist, to access and use the credential. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetKerberosAppsInBundleIdACLIncluded(value *bool)() { + m.kerberosAppsInBundleIdACLIncluded = value +} +// SetManagedAppsInBundleIdACLIncluded sets the managedAppsInBundleIdACLIncluded property value. When set to True, the Kerberos extension allows managed apps, and any apps entered with the app bundle ID to access the credential. When set to False, the Kerberos extension allows all apps to access the credential. Available for devices running iOS and iPadOS versions 14 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetManagedAppsInBundleIdACLIncluded(value *bool)() { + m.managedAppsInBundleIdACLIncluded = value +} +// SetModeCredentialUsed sets the modeCredentialUsed property value. Select how other processes use the Kerberos Extension credential. +func (m *MacOSKerberosSingleSignOnExtension) SetModeCredentialUsed(value *string)() { + m.modeCredentialUsed = value +} +// SetPasswordBlockModification sets the passwordBlockModification property value. Enables or disables password changes. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordBlockModification(value *bool)() { + m.passwordBlockModification = value +} +// SetPasswordChangeUrl sets the passwordChangeUrl property value. Gets or sets the URL that the user will be sent to when they initiate a password change. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordChangeUrl(value *string)() { + m.passwordChangeUrl = value +} +// SetPasswordEnableLocalSync sets the passwordEnableLocalSync property value. Enables or disables password syncing. This won't affect users logged in with a mobile account on macOS. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordEnableLocalSync(value *bool)() { + m.passwordEnableLocalSync = value +} +// SetPasswordExpirationDays sets the passwordExpirationDays property value. Overrides the default password expiration in days. For most domains, this value is calculated automatically. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordExpirationDays(value *int32)() { + m.passwordExpirationDays = value +} +// SetPasswordExpirationNotificationDays sets the passwordExpirationNotificationDays property value. Gets or sets the number of days until the user is notified that their password will expire (default is 15). +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordExpirationNotificationDays(value *int32)() { + m.passwordExpirationNotificationDays = value +} +// SetPasswordMinimumAgeDays sets the passwordMinimumAgeDays property value. Gets or sets the minimum number of days until a user can change their password again. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordMinimumAgeDays(value *int32)() { + m.passwordMinimumAgeDays = value +} +// SetPasswordMinimumLength sets the passwordMinimumLength property value. Gets or sets the minimum length of a password. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordMinimumLength(value *int32)() { + m.passwordMinimumLength = value +} +// SetPasswordPreviousPasswordBlockCount sets the passwordPreviousPasswordBlockCount property value. Gets or sets the number of previous passwords to block. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordPreviousPasswordBlockCount(value *int32)() { + m.passwordPreviousPasswordBlockCount = value +} +// SetPasswordRequireActiveDirectoryComplexity sets the passwordRequireActiveDirectoryComplexity property value. Enables or disables whether passwords must meet Active Directory's complexity requirements. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordRequireActiveDirectoryComplexity(value *bool)() { + m.passwordRequireActiveDirectoryComplexity = value +} +// SetPasswordRequirementsDescription sets the passwordRequirementsDescription property value. Gets or sets a description of the password complexity requirements. +func (m *MacOSKerberosSingleSignOnExtension) SetPasswordRequirementsDescription(value *string)() { + m.passwordRequirementsDescription = value +} +// SetPreferredKDCs sets the preferredKDCs property value. Add creates an ordered list of preferred Key Distribution Centers (KDCs) to use for Kerberos traffic. This list is used when the servers are not discoverable using DNS. When the servers are discoverable, the list is used for both connectivity checks, and used first for Kerberos traffic. If the servers don’t respond, then the device uses DNS discovery. Delete removes an existing list, and devices use DNS discovery. Available for devices running macOS versions 12 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetPreferredKDCs(value []string)() { + m.preferredKDCs = value +} +// SetRealm sets the realm property value. Gets or sets the case-sensitive realm name for this profile. +func (m *MacOSKerberosSingleSignOnExtension) SetRealm(value *string)() { + m.realm = value +} +// SetRequireUserPresence sets the requireUserPresence property value. Gets or sets whether to require authentication via Touch ID, Face ID, or a passcode to access the keychain entry. +func (m *MacOSKerberosSingleSignOnExtension) SetRequireUserPresence(value *bool)() { + m.requireUserPresence = value +} +// SetSignInHelpText sets the signInHelpText property value. Text displayed to the user at the Kerberos sign in window. Available for devices running iOS and iPadOS versions 14 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetSignInHelpText(value *string)() { + m.signInHelpText = value +} +// SetTlsForLDAPRequired sets the tlsForLDAPRequired property value. When set to True, LDAP connections are required to use Transport Layer Security (TLS). Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetTlsForLDAPRequired(value *bool)() { + m.tlsForLDAPRequired = value +} +// SetUsernameLabelCustom sets the usernameLabelCustom property value. This label replaces the user name shown in the Kerberos extension. You can enter a name to match the name of your company or organization. Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetUsernameLabelCustom(value *string)() { + m.usernameLabelCustom = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Gets or sets the principle user name to use for this profile. The realm name does not need to be included. +func (m *MacOSKerberosSingleSignOnExtension) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUserSetupDelayed sets the userSetupDelayed property value. When set to True, the user isn’t prompted to set up the Kerberos extension until the extension is enabled by the admin, or a Kerberos challenge is received. Available for devices running macOS versions 11 and later. +func (m *MacOSKerberosSingleSignOnExtension) SetUserSetupDelayed(value *bool)() { + m.userSetupDelayed = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extensionable.go new file mode 100644 index 000000000..987f27ca3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kerberos_single_sign_on_extensionable.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKerberosSingleSignOnExtensionable +type MacOSKerberosSingleSignOnExtensionable interface { + MacOSSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveDirectorySiteCode()(*string) + GetBlockActiveDirectorySiteAutoDiscovery()(*bool) + GetBlockAutomaticLogin()(*bool) + GetCacheName()(*string) + GetCredentialBundleIdAccessControlList()([]string) + GetCredentialsCacheMonitored()(*bool) + GetDomainRealms()([]string) + GetDomains()([]string) + GetIsDefaultRealm()(*bool) + GetKerberosAppsInBundleIdACLIncluded()(*bool) + GetManagedAppsInBundleIdACLIncluded()(*bool) + GetModeCredentialUsed()(*string) + GetPasswordBlockModification()(*bool) + GetPasswordChangeUrl()(*string) + GetPasswordEnableLocalSync()(*bool) + GetPasswordExpirationDays()(*int32) + GetPasswordExpirationNotificationDays()(*int32) + GetPasswordMinimumAgeDays()(*int32) + GetPasswordMinimumLength()(*int32) + GetPasswordPreviousPasswordBlockCount()(*int32) + GetPasswordRequireActiveDirectoryComplexity()(*bool) + GetPasswordRequirementsDescription()(*string) + GetPreferredKDCs()([]string) + GetRealm()(*string) + GetRequireUserPresence()(*bool) + GetSignInHelpText()(*string) + GetTlsForLDAPRequired()(*bool) + GetUsernameLabelCustom()(*string) + GetUserPrincipalName()(*string) + GetUserSetupDelayed()(*bool) + SetActiveDirectorySiteCode(value *string)() + SetBlockActiveDirectorySiteAutoDiscovery(value *bool)() + SetBlockAutomaticLogin(value *bool)() + SetCacheName(value *string)() + SetCredentialBundleIdAccessControlList(value []string)() + SetCredentialsCacheMonitored(value *bool)() + SetDomainRealms(value []string)() + SetDomains(value []string)() + SetIsDefaultRealm(value *bool)() + SetKerberosAppsInBundleIdACLIncluded(value *bool)() + SetManagedAppsInBundleIdACLIncluded(value *bool)() + SetModeCredentialUsed(value *string)() + SetPasswordBlockModification(value *bool)() + SetPasswordChangeUrl(value *string)() + SetPasswordEnableLocalSync(value *bool)() + SetPasswordExpirationDays(value *int32)() + SetPasswordExpirationNotificationDays(value *int32)() + SetPasswordMinimumAgeDays(value *int32)() + SetPasswordMinimumLength(value *int32)() + SetPasswordPreviousPasswordBlockCount(value *int32)() + SetPasswordRequireActiveDirectoryComplexity(value *bool)() + SetPasswordRequirementsDescription(value *string)() + SetPreferredKDCs(value []string)() + SetRealm(value *string)() + SetRequireUserPresence(value *bool)() + SetSignInHelpText(value *string)() + SetTlsForLDAPRequired(value *bool)() + SetUsernameLabelCustom(value *string)() + SetUserPrincipalName(value *string)() + SetUserSetupDelayed(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension.go new file mode 100644 index 000000000..fce7a54ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKernelExtension represents a specific macOS kernel extension. A macOS kernel extension can be described by its team identifier plus its bundle identifier. +type MacOSKernelExtension struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Bundle ID of the kernel extension. + bundleId *string + // The OdataType property + odataType *string + // The team identifier that was used to sign the kernel extension. + teamIdentifier *string +} +// NewMacOSKernelExtension instantiates a new macOSKernelExtension and sets the default values. +func NewMacOSKernelExtension()(*MacOSKernelExtension) { + m := &MacOSKernelExtension{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSKernelExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSKernelExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSKernelExtension(), 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 *MacOSKernelExtension) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBundleId gets the bundleId property value. Bundle ID of the kernel extension. +func (m *MacOSKernelExtension) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSKernelExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(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["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSKernelExtension) GetOdataType()(*string) { + return m.odataType +} +// GetTeamIdentifier gets the teamIdentifier property value. The team identifier that was used to sign the kernel extension. +func (m *MacOSKernelExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *MacOSKernelExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + 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 *MacOSKernelExtension) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBundleId sets the bundleId property value. Bundle ID of the kernel extension. +func (m *MacOSKernelExtension) SetBundleId(value *string)() { + m.bundleId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSKernelExtension) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamIdentifier sets the teamIdentifier property value. The team identifier that was used to sign the kernel extension. +func (m *MacOSKernelExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_response.go new file mode 100644 index 000000000..260006993 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKernelExtensionCollectionResponse +type MacOSKernelExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSKernelExtensionable +} +// NewMacOSKernelExtensionCollectionResponse instantiates a new MacOSKernelExtensionCollectionResponse and sets the default values. +func NewMacOSKernelExtensionCollectionResponse()(*MacOSKernelExtensionCollectionResponse) { + m := &MacOSKernelExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSKernelExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSKernelExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSKernelExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSKernelExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSKernelExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSKernelExtensionable, len(val)) + for i, v := range val { + res[i] = v.(MacOSKernelExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSKernelExtensionCollectionResponse) GetValue()([]MacOSKernelExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSKernelExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSKernelExtensionCollectionResponse) SetValue(value []MacOSKernelExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_responseable.go new file mode 100644 index 000000000..1ccec445b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKernelExtensionCollectionResponseable +type MacOSKernelExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSKernelExtensionable) + SetValue(value []MacOSKernelExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extensionable.go new file mode 100644 index 000000000..5a1058d2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_kernel_extensionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSKernelExtensionable +type MacOSKernelExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + GetOdataType()(*string) + GetTeamIdentifier()(*string) + SetBundleId(value *string)() + SetOdataType(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item.go b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item.go new file mode 100644 index 000000000..5203976f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLaunchItem represents an app in the list of macOS launch items +type MacOSLaunchItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether or not to hide the item from the Users and Groups List. + hide *bool + // The OdataType property + odataType *string + // Path to the launch item. + path *string +} +// NewMacOSLaunchItem instantiates a new macOSLaunchItem and sets the default values. +func NewMacOSLaunchItem()(*MacOSLaunchItem) { + m := &MacOSLaunchItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSLaunchItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLaunchItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLaunchItem(), 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 *MacOSLaunchItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLaunchItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hide"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHide(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["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + return res +} +// GetHide gets the hide property value. Whether or not to hide the item from the Users and Groups List. +func (m *MacOSLaunchItem) GetHide()(*bool) { + return m.hide +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSLaunchItem) GetOdataType()(*string) { + return m.odataType +} +// GetPath gets the path property value. Path to the launch item. +func (m *MacOSLaunchItem) GetPath()(*string) { + return m.path +} +// Serialize serializes information the current object +func (m *MacOSLaunchItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("hide", m.GetHide()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + 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 *MacOSLaunchItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHide sets the hide property value. Whether or not to hide the item from the Users and Groups List. +func (m *MacOSLaunchItem) SetHide(value *bool)() { + m.hide = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSLaunchItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetPath sets the path property value. Path to the launch item. +func (m *MacOSLaunchItem) SetPath(value *string)() { + m.path = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_response.go new file mode 100644 index 000000000..5ab4352bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLaunchItemCollectionResponse +type MacOSLaunchItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSLaunchItemable +} +// NewMacOSLaunchItemCollectionResponse instantiates a new MacOSLaunchItemCollectionResponse and sets the default values. +func NewMacOSLaunchItemCollectionResponse()(*MacOSLaunchItemCollectionResponse) { + m := &MacOSLaunchItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSLaunchItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLaunchItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLaunchItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLaunchItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSLaunchItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSLaunchItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSLaunchItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSLaunchItemCollectionResponse) GetValue()([]MacOSLaunchItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSLaunchItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSLaunchItemCollectionResponse) SetValue(value []MacOSLaunchItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_responseable.go new file mode 100644 index 000000000..e0342dc71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLaunchItemCollectionResponseable +type MacOSLaunchItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSLaunchItemable) + SetValue(value []MacOSLaunchItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_launch_itemable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_itemable.go new file mode 100644 index 000000000..bac081541 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_launch_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLaunchItemable +type MacOSLaunchItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHide()(*bool) + GetOdataType()(*string) + GetPath()(*string) + SetHide(value *bool)() + SetOdataType(value *string)() + SetPath(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app.go new file mode 100644 index 000000000..f8e8be9c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app.go @@ -0,0 +1,308 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobApp +type MacOSLobApp struct { + MobileLobApp + // The build number of the package. This should match the package CFBundleShortVersionString of the .pkg file. + buildNumber *string + // The primary bundleId of the package. + bundleId *string + // List of ComplexType macOSLobChildApp objects. Represents the apps expected to be installed by the package. + childApps []MacOSLobChildAppable + // The identity version. This property is being deprecated in 2211(November 2022). + identityVersion *string + // When TRUE, indicates that the app's version will NOT be used to detect if the app is installed on a device. When FALSE, indicates that the app's version will be used to detect if the app is installed on a device. Set this to true for apps that use a self update feature. + ignoreVersionDetection *bool + // When TRUE, indicates that the app will be installed as managed (requires macOS 11.0 and other managed package restrictions). When FALSE, indicates that the app will be installed as unmanaged. + installAsManaged *bool + // The MD5 hash codes. This is empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. + md5Hash []string + // The chunk size for MD5 hash. This is '0' or empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. + md5HashChunkSize *int32 + // ComplexType macOSMinimumOperatingSystem that indicates the minimum operating system applicable for the application. + minimumSupportedOperatingSystem MacOSMinimumOperatingSystemable + // The version number of the package. This should match the package CFBundleVersion in the packageinfo file. + versionNumber *string +} +// NewMacOSLobApp instantiates a new MacOSLobApp and sets the default values. +func NewMacOSLobApp()(*MacOSLobApp) { + m := &MacOSLobApp{ + MobileLobApp: *NewMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.macOSLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLobApp(), nil +} +// GetBuildNumber gets the buildNumber property value. The build number of the package. This should match the package CFBundleShortVersionString of the .pkg file. +func (m *MacOSLobApp) GetBuildNumber()(*string) { + return m.buildNumber +} +// GetBundleId gets the bundleId property value. The primary bundleId of the package. +func (m *MacOSLobApp) GetBundleId()(*string) { + return m.bundleId +} +// GetChildApps gets the childApps property value. List of ComplexType macOSLobChildApp objects. Represents the apps expected to be installed by the package. +func (m *MacOSLobApp) GetChildApps()([]MacOSLobChildAppable) { + return m.childApps +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileLobApp.GetFieldDeserializers() + res["buildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuildNumber(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["childApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSLobChildAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSLobChildAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSLobChildAppable) + } + m.SetChildApps(res) + } + return nil + } + res["identityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityVersion(val) + } + return nil + } + res["ignoreVersionDetection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnoreVersionDetection(val) + } + return nil + } + res["installAsManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetInstallAsManaged(val) + } + return nil + } + res["md5Hash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMd5Hash(res) + } + return nil + } + res["md5HashChunkSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMd5HashChunkSize(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(MacOSMinimumOperatingSystemable)) + } + return nil + } + res["versionNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionNumber(val) + } + return nil + } + return res +} +// GetIdentityVersion gets the identityVersion property value. The identity version. This property is being deprecated in 2211(November 2022). +func (m *MacOSLobApp) GetIdentityVersion()(*string) { + return m.identityVersion +} +// GetIgnoreVersionDetection gets the ignoreVersionDetection property value. When TRUE, indicates that the app's version will NOT be used to detect if the app is installed on a device. When FALSE, indicates that the app's version will be used to detect if the app is installed on a device. Set this to true for apps that use a self update feature. +func (m *MacOSLobApp) GetIgnoreVersionDetection()(*bool) { + return m.ignoreVersionDetection +} +// GetInstallAsManaged gets the installAsManaged property value. When TRUE, indicates that the app will be installed as managed (requires macOS 11.0 and other managed package restrictions). When FALSE, indicates that the app will be installed as unmanaged. +func (m *MacOSLobApp) GetInstallAsManaged()(*bool) { + return m.installAsManaged +} +// GetMd5Hash gets the md5Hash property value. The MD5 hash codes. This is empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. +func (m *MacOSLobApp) GetMd5Hash()([]string) { + return m.md5Hash +} +// GetMd5HashChunkSize gets the md5HashChunkSize property value. The chunk size for MD5 hash. This is '0' or empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. +func (m *MacOSLobApp) GetMd5HashChunkSize()(*int32) { + return m.md5HashChunkSize +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. ComplexType macOSMinimumOperatingSystem that indicates the minimum operating system applicable for the application. +func (m *MacOSLobApp) GetMinimumSupportedOperatingSystem()(MacOSMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetVersionNumber gets the versionNumber property value. The version number of the package. This should match the package CFBundleVersion in the packageinfo file. +func (m *MacOSLobApp) GetVersionNumber()(*string) { + return m.versionNumber +} +// Serialize serializes information the current object +func (m *MacOSLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("buildNumber", m.GetBuildNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + if m.GetChildApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildApps())) + for i, v := range m.GetChildApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("childApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identityVersion", m.GetIdentityVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("ignoreVersionDetection", m.GetIgnoreVersionDetection()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("installAsManaged", m.GetInstallAsManaged()) + if err != nil { + return err + } + } + if m.GetMd5Hash() != nil { + err = writer.WriteCollectionOfStringValues("md5Hash", m.GetMd5Hash()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("md5HashChunkSize", m.GetMd5HashChunkSize()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionNumber", m.GetVersionNumber()) + if err != nil { + return err + } + } + return nil +} +// SetBuildNumber sets the buildNumber property value. The build number of the package. This should match the package CFBundleShortVersionString of the .pkg file. +func (m *MacOSLobApp) SetBuildNumber(value *string)() { + m.buildNumber = value +} +// SetBundleId sets the bundleId property value. The primary bundleId of the package. +func (m *MacOSLobApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetChildApps sets the childApps property value. List of ComplexType macOSLobChildApp objects. Represents the apps expected to be installed by the package. +func (m *MacOSLobApp) SetChildApps(value []MacOSLobChildAppable)() { + m.childApps = value +} +// SetIdentityVersion sets the identityVersion property value. The identity version. This property is being deprecated in 2211(November 2022). +func (m *MacOSLobApp) SetIdentityVersion(value *string)() { + m.identityVersion = value +} +// SetIgnoreVersionDetection sets the ignoreVersionDetection property value. When TRUE, indicates that the app's version will NOT be used to detect if the app is installed on a device. When FALSE, indicates that the app's version will be used to detect if the app is installed on a device. Set this to true for apps that use a self update feature. +func (m *MacOSLobApp) SetIgnoreVersionDetection(value *bool)() { + m.ignoreVersionDetection = value +} +// SetInstallAsManaged sets the installAsManaged property value. When TRUE, indicates that the app will be installed as managed (requires macOS 11.0 and other managed package restrictions). When FALSE, indicates that the app will be installed as unmanaged. +func (m *MacOSLobApp) SetInstallAsManaged(value *bool)() { + m.installAsManaged = value +} +// SetMd5Hash sets the md5Hash property value. The MD5 hash codes. This is empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. +func (m *MacOSLobApp) SetMd5Hash(value []string)() { + m.md5Hash = value +} +// SetMd5HashChunkSize sets the md5HashChunkSize property value. The chunk size for MD5 hash. This is '0' or empty if the package was uploaded directly. If the Intune App Wrapping Tool is used to create a .intunemac, this value can be found inside the Detection.xml file. +func (m *MacOSLobApp) SetMd5HashChunkSize(value *int32)() { + m.md5HashChunkSize = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. ComplexType macOSMinimumOperatingSystem that indicates the minimum operating system applicable for the application. +func (m *MacOSLobApp) SetMinimumSupportedOperatingSystem(value MacOSMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetVersionNumber sets the versionNumber property value. The version number of the package. This should match the package CFBundleVersion in the packageinfo file. +func (m *MacOSLobApp) SetVersionNumber(value *string)() { + m.versionNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_response.go new file mode 100644 index 000000000..f8d2e2f2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobAppCollectionResponse +type MacOSLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSLobAppable +} +// NewMacOSLobAppCollectionResponse instantiates a new MacOSLobAppCollectionResponse and sets the default values. +func NewMacOSLobAppCollectionResponse()(*MacOSLobAppCollectionResponse) { + m := &MacOSLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSLobAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSLobAppCollectionResponse) GetValue()([]MacOSLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSLobAppCollectionResponse) SetValue(value []MacOSLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_responseable.go new file mode 100644 index 000000000..3646c3661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobAppCollectionResponseable +type MacOSLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSLobAppable) + SetValue(value []MacOSLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_appable.go new file mode 100644 index 000000000..a48837fa9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_appable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobAppable +type MacOSLobAppable interface { + MobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuildNumber()(*string) + GetBundleId()(*string) + GetChildApps()([]MacOSLobChildAppable) + GetIdentityVersion()(*string) + GetIgnoreVersionDetection()(*bool) + GetInstallAsManaged()(*bool) + GetMd5Hash()([]string) + GetMd5HashChunkSize()(*int32) + GetMinimumSupportedOperatingSystem()(MacOSMinimumOperatingSystemable) + GetVersionNumber()(*string) + SetBuildNumber(value *string)() + SetBundleId(value *string)() + SetChildApps(value []MacOSLobChildAppable)() + SetIdentityVersion(value *string)() + SetIgnoreVersionDetection(value *bool)() + SetInstallAsManaged(value *bool)() + SetMd5Hash(value []string)() + SetMd5HashChunkSize(value *int32)() + SetMinimumSupportedOperatingSystem(value MacOSMinimumOperatingSystemable)() + SetVersionNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app.go new file mode 100644 index 000000000..4d3d85a4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobChildApp contains properties of a macOS .app in the package +type MacOSLobChildApp 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 build number of the app. + buildNumber *string + // The bundleId of the app. + bundleId *string + // The OdataType property + odataType *string + // The version number of the app. + versionNumber *string +} +// NewMacOSLobChildApp instantiates a new macOSLobChildApp and sets the default values. +func NewMacOSLobChildApp()(*MacOSLobChildApp) { + m := &MacOSLobChildApp{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSLobChildAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLobChildAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLobChildApp(), 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 *MacOSLobChildApp) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBuildNumber gets the buildNumber property value. The build number of the app. +func (m *MacOSLobChildApp) GetBuildNumber()(*string) { + return m.buildNumber +} +// GetBundleId gets the bundleId property value. The bundleId of the app. +func (m *MacOSLobChildApp) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLobChildApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["buildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuildNumber(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(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["versionNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionNumber(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSLobChildApp) GetOdataType()(*string) { + return m.odataType +} +// GetVersionNumber gets the versionNumber property value. The version number of the app. +func (m *MacOSLobChildApp) GetVersionNumber()(*string) { + return m.versionNumber +} +// Serialize serializes information the current object +func (m *MacOSLobChildApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("buildNumber", m.GetBuildNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("versionNumber", m.GetVersionNumber()) + 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 *MacOSLobChildApp) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBuildNumber sets the buildNumber property value. The build number of the app. +func (m *MacOSLobChildApp) SetBuildNumber(value *string)() { + m.buildNumber = value +} +// SetBundleId sets the bundleId property value. The bundleId of the app. +func (m *MacOSLobChildApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSLobChildApp) SetOdataType(value *string)() { + m.odataType = value +} +// SetVersionNumber sets the versionNumber property value. The version number of the app. +func (m *MacOSLobChildApp) SetVersionNumber(value *string)() { + m.versionNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_response.go new file mode 100644 index 000000000..739260a6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobChildAppCollectionResponse +type MacOSLobChildAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSLobChildAppable +} +// NewMacOSLobChildAppCollectionResponse instantiates a new MacOSLobChildAppCollectionResponse and sets the default values. +func NewMacOSLobChildAppCollectionResponse()(*MacOSLobChildAppCollectionResponse) { + m := &MacOSLobChildAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSLobChildAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSLobChildAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSLobChildAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSLobChildAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSLobChildAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSLobChildAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSLobChildAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSLobChildAppCollectionResponse) GetValue()([]MacOSLobChildAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSLobChildAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSLobChildAppCollectionResponse) SetValue(value []MacOSLobChildAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_responseable.go new file mode 100644 index 000000000..7a1e9c701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobChildAppCollectionResponseable +type MacOSLobChildAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSLobChildAppable) + SetValue(value []MacOSLobChildAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_appable.go new file mode 100644 index 000000000..9b3569b47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_lob_child_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSLobChildAppable +type MacOSLobChildAppable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuildNumber()(*string) + GetBundleId()(*string) + GetOdataType()(*string) + GetVersionNumber()(*string) + SetBuildNumber(value *string)() + SetBundleId(value *string)() + SetOdataType(value *string)() + SetVersionNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app.go new file mode 100644 index 000000000..367772676 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMdatpApp +type MacOSMdatpApp struct { + MobileApp +} +// NewMacOSMdatpApp instantiates a new MacOSMdatpApp and sets the default values. +func NewMacOSMdatpApp()(*MacOSMdatpApp) { + m := &MacOSMdatpApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.macOSMdatpApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSMdatpAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMdatpAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMdatpApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMdatpApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MacOSMdatpApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_response.go new file mode 100644 index 000000000..8c1a7e98e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMdatpAppCollectionResponse +type MacOSMdatpAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSMdatpAppable +} +// NewMacOSMdatpAppCollectionResponse instantiates a new MacOSMdatpAppCollectionResponse and sets the default values. +func NewMacOSMdatpAppCollectionResponse()(*MacOSMdatpAppCollectionResponse) { + m := &MacOSMdatpAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSMdatpAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMdatpAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMdatpAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMdatpAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSMdatpAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSMdatpAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSMdatpAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSMdatpAppCollectionResponse) GetValue()([]MacOSMdatpAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSMdatpAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSMdatpAppCollectionResponse) SetValue(value []MacOSMdatpAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_responseable.go new file mode 100644 index 000000000..110a1245a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMdatpAppCollectionResponseable +type MacOSMdatpAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSMdatpAppable) + SetValue(value []MacOSMdatpAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_appable.go new file mode 100644 index 000000000..a28fa1650 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_mdatp_appable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMdatpAppable +type MacOSMdatpAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app.go new file mode 100644 index 000000000..0564d94be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftDefenderApp +type MacOSMicrosoftDefenderApp struct { + MobileApp +} +// NewMacOSMicrosoftDefenderApp instantiates a new MacOSMicrosoftDefenderApp and sets the default values. +func NewMacOSMicrosoftDefenderApp()(*MacOSMicrosoftDefenderApp) { + m := &MacOSMicrosoftDefenderApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.macOSMicrosoftDefenderApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSMicrosoftDefenderAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMicrosoftDefenderAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMicrosoftDefenderApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMicrosoftDefenderApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MacOSMicrosoftDefenderApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_response.go new file mode 100644 index 000000000..9ec7699e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftDefenderAppCollectionResponse +type MacOSMicrosoftDefenderAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSMicrosoftDefenderAppable +} +// NewMacOSMicrosoftDefenderAppCollectionResponse instantiates a new MacOSMicrosoftDefenderAppCollectionResponse and sets the default values. +func NewMacOSMicrosoftDefenderAppCollectionResponse()(*MacOSMicrosoftDefenderAppCollectionResponse) { + m := &MacOSMicrosoftDefenderAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSMicrosoftDefenderAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMicrosoftDefenderAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMicrosoftDefenderAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMicrosoftDefenderAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSMicrosoftDefenderAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSMicrosoftDefenderAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSMicrosoftDefenderAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSMicrosoftDefenderAppCollectionResponse) GetValue()([]MacOSMicrosoftDefenderAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSMicrosoftDefenderAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSMicrosoftDefenderAppCollectionResponse) SetValue(value []MacOSMicrosoftDefenderAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_responseable.go new file mode 100644 index 000000000..6dd924da0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftDefenderAppCollectionResponseable +type MacOSMicrosoftDefenderAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSMicrosoftDefenderAppable) + SetValue(value []MacOSMicrosoftDefenderAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_appable.go new file mode 100644 index 000000000..7b1150ac9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_defender_appable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftDefenderAppable +type MacOSMicrosoftDefenderAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app.go new file mode 100644 index 000000000..c3697dd04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftEdgeApp +type MacOSMicrosoftEdgeApp struct { + MobileApp + // The enum to specify the channels for Microsoft Edge apps. + channel *MicrosoftEdgeChannel +} +// NewMacOSMicrosoftEdgeApp instantiates a new MacOSMicrosoftEdgeApp and sets the default values. +func NewMacOSMicrosoftEdgeApp()(*MacOSMicrosoftEdgeApp) { + m := &MacOSMicrosoftEdgeApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.macOSMicrosoftEdgeApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSMicrosoftEdgeAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMicrosoftEdgeAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMicrosoftEdgeApp(), nil +} +// GetChannel gets the channel property value. The enum to specify the channels for Microsoft Edge apps. +func (m *MacOSMicrosoftEdgeApp) GetChannel()(*MicrosoftEdgeChannel) { + return m.channel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMicrosoftEdgeApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["channel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftEdgeChannel) + if err != nil { + return err + } + if val != nil { + m.SetChannel(val.(*MicrosoftEdgeChannel)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MacOSMicrosoftEdgeApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + if m.GetChannel() != nil { + cast := (*m.GetChannel()).String() + err = writer.WriteStringValue("channel", &cast) + if err != nil { + return err + } + } + return nil +} +// SetChannel sets the channel property value. The enum to specify the channels for Microsoft Edge apps. +func (m *MacOSMicrosoftEdgeApp) SetChannel(value *MicrosoftEdgeChannel)() { + m.channel = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_response.go new file mode 100644 index 000000000..897679cd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftEdgeAppCollectionResponse +type MacOSMicrosoftEdgeAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSMicrosoftEdgeAppable +} +// NewMacOSMicrosoftEdgeAppCollectionResponse instantiates a new MacOSMicrosoftEdgeAppCollectionResponse and sets the default values. +func NewMacOSMicrosoftEdgeAppCollectionResponse()(*MacOSMicrosoftEdgeAppCollectionResponse) { + m := &MacOSMicrosoftEdgeAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSMicrosoftEdgeAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMicrosoftEdgeAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMicrosoftEdgeAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMicrosoftEdgeAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSMicrosoftEdgeAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSMicrosoftEdgeAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSMicrosoftEdgeAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSMicrosoftEdgeAppCollectionResponse) GetValue()([]MacOSMicrosoftEdgeAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSMicrosoftEdgeAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSMicrosoftEdgeAppCollectionResponse) SetValue(value []MacOSMicrosoftEdgeAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_responseable.go new file mode 100644 index 000000000..e68ae0c96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftEdgeAppCollectionResponseable +type MacOSMicrosoftEdgeAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSMicrosoftEdgeAppable) + SetValue(value []MacOSMicrosoftEdgeAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_appable.go new file mode 100644 index 000000000..c52942a1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_microsoft_edge_appable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMicrosoftEdgeAppable +type MacOSMicrosoftEdgeAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChannel()(*MicrosoftEdgeChannel) + SetChannel(value *MicrosoftEdgeChannel)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_system.go b/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_system.go new file mode 100644 index 000000000..e1aff129b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_system.go @@ -0,0 +1,383 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMinimumOperatingSystem the minimum operating system required for a macOS app. +type MacOSMinimumOperatingSystem 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 OdataType property + odataType *string + // When TRUE, indicates OS X 10.10 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_10 *bool + // When TRUE, indicates OS X 10.11 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_11 *bool + // When TRUE, indicates macOS 10.12 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_12 *bool + // When TRUE, indicates macOS 10.13 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_13 *bool + // When TRUE, indicates macOS 10.14 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_14 *bool + // When TRUE, indicates macOS 10.15 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_15 *bool + // When TRUE, indicates Mac OS X 10.7 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_7 *bool + // When TRUE, indicates OS X 10.8 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_8 *bool + // When TRUE, indicates OS X 10.9 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v10_9 *bool + // When TRUE, indicates macOS 11.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v11_0 *bool + // When TRUE, indicates macOS 12.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v12_0 *bool + // When TRUE, indicates macOS 13.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. + v13_0 *bool +} +// NewMacOSMinimumOperatingSystem instantiates a new macOSMinimumOperatingSystem and sets the default values. +func NewMacOSMinimumOperatingSystem()(*MacOSMinimumOperatingSystem) { + m := &MacOSMinimumOperatingSystem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSMinimumOperatingSystemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSMinimumOperatingSystemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSMinimumOperatingSystem(), 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 *MacOSMinimumOperatingSystem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSMinimumOperatingSystem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["v10_10"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_10(val) + } + return nil + } + res["v10_11"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_11(val) + } + return nil + } + res["v10_12"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_12(val) + } + return nil + } + res["v10_13"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_13(val) + } + return nil + } + res["v10_14"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_14(val) + } + return nil + } + res["v10_15"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_15(val) + } + return nil + } + res["v10_7"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_7(val) + } + return nil + } + res["v10_8"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_8(val) + } + return nil + } + res["v10_9"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV10_9(val) + } + return nil + } + res["v11_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV11_0(val) + } + return nil + } + res["v12_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV12_0(val) + } + return nil + } + res["v13_0"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetV13_0(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSMinimumOperatingSystem) GetOdataType()(*string) { + return m.odataType +} +// GetV10_10 gets the v10_10 property value. When TRUE, indicates OS X 10.10 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_10()(*bool) { + return m.v10_10 +} +// GetV10_11 gets the v10_11 property value. When TRUE, indicates OS X 10.11 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_11()(*bool) { + return m.v10_11 +} +// GetV10_12 gets the v10_12 property value. When TRUE, indicates macOS 10.12 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_12()(*bool) { + return m.v10_12 +} +// GetV10_13 gets the v10_13 property value. When TRUE, indicates macOS 10.13 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_13()(*bool) { + return m.v10_13 +} +// GetV10_14 gets the v10_14 property value. When TRUE, indicates macOS 10.14 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_14()(*bool) { + return m.v10_14 +} +// GetV10_15 gets the v10_15 property value. When TRUE, indicates macOS 10.15 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_15()(*bool) { + return m.v10_15 +} +// GetV10_7 gets the v10_7 property value. When TRUE, indicates Mac OS X 10.7 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_7()(*bool) { + return m.v10_7 +} +// GetV10_8 gets the v10_8 property value. When TRUE, indicates OS X 10.8 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_8()(*bool) { + return m.v10_8 +} +// GetV10_9 gets the v10_9 property value. When TRUE, indicates OS X 10.9 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV10_9()(*bool) { + return m.v10_9 +} +// GetV11_0 gets the v11_0 property value. When TRUE, indicates macOS 11.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV11_0()(*bool) { + return m.v11_0 +} +// GetV12_0 gets the v12_0 property value. When TRUE, indicates macOS 12.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV12_0()(*bool) { + return m.v12_0 +} +// GetV13_0 gets the v13_0 property value. When TRUE, indicates macOS 13.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) GetV13_0()(*bool) { + return m.v13_0 +} +// Serialize serializes information the current object +func (m *MacOSMinimumOperatingSystem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_10", m.GetV10_10()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_11", m.GetV10_11()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_12", m.GetV10_12()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_13", m.GetV10_13()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_14", m.GetV10_14()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_15", m.GetV10_15()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_7", m.GetV10_7()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_8", m.GetV10_8()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v10_9", m.GetV10_9()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v11_0", m.GetV11_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v12_0", m.GetV12_0()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("v13_0", m.GetV13_0()) + 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 *MacOSMinimumOperatingSystem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSMinimumOperatingSystem) SetOdataType(value *string)() { + m.odataType = value +} +// SetV10_10 sets the v10_10 property value. When TRUE, indicates OS X 10.10 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_10(value *bool)() { + m.v10_10 = value +} +// SetV10_11 sets the v10_11 property value. When TRUE, indicates OS X 10.11 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_11(value *bool)() { + m.v10_11 = value +} +// SetV10_12 sets the v10_12 property value. When TRUE, indicates macOS 10.12 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_12(value *bool)() { + m.v10_12 = value +} +// SetV10_13 sets the v10_13 property value. When TRUE, indicates macOS 10.13 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_13(value *bool)() { + m.v10_13 = value +} +// SetV10_14 sets the v10_14 property value. When TRUE, indicates macOS 10.14 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_14(value *bool)() { + m.v10_14 = value +} +// SetV10_15 sets the v10_15 property value. When TRUE, indicates macOS 10.15 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_15(value *bool)() { + m.v10_15 = value +} +// SetV10_7 sets the v10_7 property value. When TRUE, indicates Mac OS X 10.7 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_7(value *bool)() { + m.v10_7 = value +} +// SetV10_8 sets the v10_8 property value. When TRUE, indicates OS X 10.8 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_8(value *bool)() { + m.v10_8 = value +} +// SetV10_9 sets the v10_9 property value. When TRUE, indicates OS X 10.9 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV10_9(value *bool)() { + m.v10_9 = value +} +// SetV11_0 sets the v11_0 property value. When TRUE, indicates macOS 11.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV11_0(value *bool)() { + m.v11_0 = value +} +// SetV12_0 sets the v12_0 property value. When TRUE, indicates macOS 12.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV12_0(value *bool)() { + m.v12_0 = value +} +// SetV13_0 sets the v13_0 property value. When TRUE, indicates macOS 13.0 or later is required to install the app. When FALSE, indicates some other OS version is the minimum OS to install the app. Default value is FALSE. +func (m *MacOSMinimumOperatingSystem) SetV13_0(value *bool)() { + m.v13_0 = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_systemable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_systemable.go new file mode 100644 index 000000000..e42513bd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_minimum_operating_systemable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSMinimumOperatingSystemable +type MacOSMinimumOperatingSystemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetV10_10()(*bool) + GetV10_11()(*bool) + GetV10_12()(*bool) + GetV10_13()(*bool) + GetV10_14()(*bool) + GetV10_15()(*bool) + GetV10_7()(*bool) + GetV10_8()(*bool) + GetV10_9()(*bool) + GetV11_0()(*bool) + GetV12_0()(*bool) + GetV13_0()(*bool) + SetOdataType(value *string)() + SetV10_10(value *bool)() + SetV10_11(value *bool)() + SetV10_12(value *bool)() + SetV10_13(value *bool)() + SetV10_14(value *bool)() + SetV10_15(value *bool)() + SetV10_7(value *bool)() + SetV10_8(value *bool)() + SetV10_9(value *bool)() + SetV11_0(value *bool)() + SetV12_0(value *bool)() + SetV13_0(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app.go b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app.go new file mode 100644 index 000000000..3bba4a893 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSOfficeSuiteApp +type MacOSOfficeSuiteApp struct { + MobileApp +} +// NewMacOSOfficeSuiteApp instantiates a new MacOSOfficeSuiteApp and sets the default values. +func NewMacOSOfficeSuiteApp()(*MacOSOfficeSuiteApp) { + m := &MacOSOfficeSuiteApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.macOSOfficeSuiteApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSOfficeSuiteAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSOfficeSuiteAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSOfficeSuiteApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSOfficeSuiteApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MacOSOfficeSuiteApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_response.go new file mode 100644 index 000000000..6ddb79e1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSOfficeSuiteAppCollectionResponse +type MacOSOfficeSuiteAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSOfficeSuiteAppable +} +// NewMacOSOfficeSuiteAppCollectionResponse instantiates a new MacOSOfficeSuiteAppCollectionResponse and sets the default values. +func NewMacOSOfficeSuiteAppCollectionResponse()(*MacOSOfficeSuiteAppCollectionResponse) { + m := &MacOSOfficeSuiteAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSOfficeSuiteAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSOfficeSuiteAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSOfficeSuiteAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSOfficeSuiteAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSOfficeSuiteAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSOfficeSuiteAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOSOfficeSuiteAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSOfficeSuiteAppCollectionResponse) GetValue()([]MacOSOfficeSuiteAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSOfficeSuiteAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSOfficeSuiteAppCollectionResponse) SetValue(value []MacOSOfficeSuiteAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_responseable.go new file mode 100644 index 000000000..ff9893d8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSOfficeSuiteAppCollectionResponseable +type MacOSOfficeSuiteAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSOfficeSuiteAppable) + SetValue(value []MacOSOfficeSuiteAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_appable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_appable.go new file mode 100644 index 000000000..e16860a11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_office_suite_appable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSOfficeSuiteAppable +type MacOSOfficeSuiteAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile.go b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile.go new file mode 100644 index 000000000..3ac02dfa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile.go @@ -0,0 +1,287 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPkcsCertificateProfile +type MacOSPkcsCertificateProfile struct { + MacOSCertificateProfileBase + // AllowAllAppsAccess setting + allowAllAppsAccess *bool + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // PKCS certificate template name. + certificateTemplateName *string + // PKCS certification authority FQDN. + certificationAuthority *string + // PKCS certification authority Name. + certificationAuthorityName *string + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Format string that defines the subject alternative name. + subjectAlternativeNameFormatString *string + // Format string that defines the subject name. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewMacOSPkcsCertificateProfile instantiates a new MacOSPkcsCertificateProfile and sets the default values. +func NewMacOSPkcsCertificateProfile()(*MacOSPkcsCertificateProfile) { + m := &MacOSPkcsCertificateProfile{ + MacOSCertificateProfileBase: *NewMacOSCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.macOSPkcsCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSPkcsCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSPkcsCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSPkcsCertificateProfile(), nil +} +// GetAllowAllAppsAccess gets the allowAllAppsAccess property value. AllowAllAppsAccess setting +func (m *MacOSPkcsCertificateProfile) GetAllowAllAppsAccess()(*bool) { + return m.allowAllAppsAccess +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *MacOSPkcsCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCertificateTemplateName gets the certificateTemplateName property value. PKCS certificate template name. +func (m *MacOSPkcsCertificateProfile) GetCertificateTemplateName()(*string) { + return m.certificateTemplateName +} +// GetCertificationAuthority gets the certificationAuthority property value. PKCS certification authority FQDN. +func (m *MacOSPkcsCertificateProfile) GetCertificationAuthority()(*string) { + return m.certificationAuthority +} +// GetCertificationAuthorityName gets the certificationAuthorityName property value. PKCS certification authority Name. +func (m *MacOSPkcsCertificateProfile) GetCertificationAuthorityName()(*string) { + return m.certificationAuthorityName +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *MacOSPkcsCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSPkcsCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSCertificateProfileBase.GetFieldDeserializers() + res["allowAllAppsAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAllAppsAccess(val) + } + return nil + } + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["certificateTemplateName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateTemplateName(val) + } + return nil + } + res["certificationAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthority(val) + } + return nil + } + res["certificationAuthorityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationAuthorityName(val) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSPkcsCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Format string that defines the subject alternative name. +func (m *MacOSPkcsCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Format string that defines the subject name. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *MacOSPkcsCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *MacOSPkcsCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowAllAppsAccess", m.GetAllowAllAppsAccess()) + if err != nil { + return err + } + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateTemplateName", m.GetCertificateTemplateName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthority", m.GetCertificationAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificationAuthorityName", m.GetCertificationAuthorityName()) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAllAppsAccess sets the allowAllAppsAccess property value. AllowAllAppsAccess setting +func (m *MacOSPkcsCertificateProfile) SetAllowAllAppsAccess(value *bool)() { + m.allowAllAppsAccess = value +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *MacOSPkcsCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCertificateTemplateName sets the certificateTemplateName property value. PKCS certificate template name. +func (m *MacOSPkcsCertificateProfile) SetCertificateTemplateName(value *string)() { + m.certificateTemplateName = value +} +// SetCertificationAuthority sets the certificationAuthority property value. PKCS certification authority FQDN. +func (m *MacOSPkcsCertificateProfile) SetCertificationAuthority(value *string)() { + m.certificationAuthority = value +} +// SetCertificationAuthorityName sets the certificationAuthorityName property value. PKCS certification authority Name. +func (m *MacOSPkcsCertificateProfile) SetCertificationAuthorityName(value *string)() { + m.certificationAuthorityName = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *MacOSPkcsCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSPkcsCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Format string that defines the subject alternative name. +func (m *MacOSPkcsCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Format string that defines the subject name. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *MacOSPkcsCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_response.go new file mode 100644 index 000000000..78ec64a5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPkcsCertificateProfileCollectionResponse +type MacOSPkcsCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSPkcsCertificateProfileable +} +// NewMacOSPkcsCertificateProfileCollectionResponse instantiates a new MacOSPkcsCertificateProfileCollectionResponse and sets the default values. +func NewMacOSPkcsCertificateProfileCollectionResponse()(*MacOSPkcsCertificateProfileCollectionResponse) { + m := &MacOSPkcsCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSPkcsCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSPkcsCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSPkcsCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSPkcsCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSPkcsCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSPkcsCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(MacOSPkcsCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSPkcsCertificateProfileCollectionResponse) GetValue()([]MacOSPkcsCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSPkcsCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSPkcsCertificateProfileCollectionResponse) SetValue(value []MacOSPkcsCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..c4a063462 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPkcsCertificateProfileCollectionResponseable +type MacOSPkcsCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSPkcsCertificateProfileable) + SetValue(value []MacOSPkcsCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profileable.go new file mode 100644 index 000000000..9f6ddfee7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_pkcs_certificate_profileable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPkcsCertificateProfileable +type MacOSPkcsCertificateProfileable interface { + MacOSCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAllAppsAccess()(*bool) + GetCertificateStore()(*CertificateStore) + GetCertificateTemplateName()(*string) + GetCertificationAuthority()(*string) + GetCertificationAuthorityName()(*string) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetAllowAllAppsAccess(value *bool)() + SetCertificateStore(value *CertificateStore)() + SetCertificateTemplateName(value *string)() + SetCertificationAuthority(value *string)() + SetCertificationAuthorityName(value *string)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item.go b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item.go new file mode 100644 index 000000000..5f481f83c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item.go @@ -0,0 +1,772 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPrivacyAccessControlItem represents per-process privacy preferences. +type MacOSPrivacyAccessControlItem struct { + // Possible values of a property + accessibility *Enablement + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Possible values of a property + addressBook *Enablement + // Allow or deny the app or process to send a restricted Apple event to another app or process. You will need to know the identifier, identifier type, and code requirement of the receiving app or process. This collection can contain a maximum of 500 elements. + appleEventsAllowedReceivers []MacOSAppleEventReceiverable + // Block access to camera app. + blockCamera *bool + // Block the app or process from listening to events from input devices such as mouse, keyboard, and trackpad.Requires macOS 10.15 or later. + blockListenEvent *bool + // Block access to microphone. + blockMicrophone *bool + // Block app from capturing contents of system display. Requires macOS 10.15 or later. + blockScreenCapture *bool + // Possible values of a property + calendar *Enablement + // Enter the code requirement, which can be obtained with the command 'codesign –display -r –' in the Terminal app. Include everything after '=>'. + codeRequirement *string + // The display name of the app, process, or executable. + displayName *string + // Possible values of a property + fileProviderPresence *Enablement + // The bundle ID or path of the app, process, or executable. + identifier *string + // Process identifier types for MacOS Privacy Preferences + identifierType *MacOSProcessIdentifierType + // Possible values of a property + mediaLibrary *Enablement + // The OdataType property + odataType *string + // Possible values of a property + photos *Enablement + // Possible values of a property + postEvent *Enablement + // Possible values of a property + reminders *Enablement + // Possible values of a property + speechRecognition *Enablement + // Statically validates the code requirement. Use this setting if the process invalidates its dynamic code signature. + staticCodeValidation *bool + // Possible values of a property + systemPolicyAllFiles *Enablement + // Possible values of a property + systemPolicyDesktopFolder *Enablement + // Possible values of a property + systemPolicyDocumentsFolder *Enablement + // Possible values of a property + systemPolicyDownloadsFolder *Enablement + // Possible values of a property + systemPolicyNetworkVolumes *Enablement + // Possible values of a property + systemPolicyRemovableVolumes *Enablement + // Possible values of a property + systemPolicySystemAdminFiles *Enablement +} +// NewMacOSPrivacyAccessControlItem instantiates a new macOSPrivacyAccessControlItem and sets the default values. +func NewMacOSPrivacyAccessControlItem()(*MacOSPrivacyAccessControlItem) { + m := &MacOSPrivacyAccessControlItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSPrivacyAccessControlItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSPrivacyAccessControlItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSPrivacyAccessControlItem(), nil +} +// GetAccessibility gets the accessibility property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetAccessibility()(*Enablement) { + return m.accessibility +} +// 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 *MacOSPrivacyAccessControlItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddressBook gets the addressBook property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetAddressBook()(*Enablement) { + return m.addressBook +} +// GetAppleEventsAllowedReceivers gets the appleEventsAllowedReceivers property value. Allow or deny the app or process to send a restricted Apple event to another app or process. You will need to know the identifier, identifier type, and code requirement of the receiving app or process. This collection can contain a maximum of 500 elements. +func (m *MacOSPrivacyAccessControlItem) GetAppleEventsAllowedReceivers()([]MacOSAppleEventReceiverable) { + return m.appleEventsAllowedReceivers +} +// GetBlockCamera gets the blockCamera property value. Block access to camera app. +func (m *MacOSPrivacyAccessControlItem) GetBlockCamera()(*bool) { + return m.blockCamera +} +// GetBlockListenEvent gets the blockListenEvent property value. Block the app or process from listening to events from input devices such as mouse, keyboard, and trackpad.Requires macOS 10.15 or later. +func (m *MacOSPrivacyAccessControlItem) GetBlockListenEvent()(*bool) { + return m.blockListenEvent +} +// GetBlockMicrophone gets the blockMicrophone property value. Block access to microphone. +func (m *MacOSPrivacyAccessControlItem) GetBlockMicrophone()(*bool) { + return m.blockMicrophone +} +// GetBlockScreenCapture gets the blockScreenCapture property value. Block app from capturing contents of system display. Requires macOS 10.15 or later. +func (m *MacOSPrivacyAccessControlItem) GetBlockScreenCapture()(*bool) { + return m.blockScreenCapture +} +// GetCalendar gets the calendar property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetCalendar()(*Enablement) { + return m.calendar +} +// GetCodeRequirement gets the codeRequirement property value. Enter the code requirement, which can be obtained with the command 'codesign –display -r –' in the Terminal app. Include everything after '=>'. +func (m *MacOSPrivacyAccessControlItem) GetCodeRequirement()(*string) { + return m.codeRequirement +} +// GetDisplayName gets the displayName property value. The display name of the app, process, or executable. +func (m *MacOSPrivacyAccessControlItem) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSPrivacyAccessControlItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessibility"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAccessibility(val.(*Enablement)) + } + return nil + } + res["addressBook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetAddressBook(val.(*Enablement)) + } + return nil + } + res["appleEventsAllowedReceivers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSAppleEventReceiverFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSAppleEventReceiverable, len(val)) + for i, v := range val { + res[i] = v.(MacOSAppleEventReceiverable) + } + m.SetAppleEventsAllowedReceivers(res) + } + return nil + } + res["blockCamera"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockCamera(val) + } + return nil + } + res["blockListenEvent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockListenEvent(val) + } + return nil + } + res["blockMicrophone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockMicrophone(val) + } + return nil + } + res["blockScreenCapture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockScreenCapture(val) + } + return nil + } + res["calendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetCalendar(val.(*Enablement)) + } + return nil + } + res["codeRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCodeRequirement(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fileProviderPresence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetFileProviderPresence(val.(*Enablement)) + } + return nil + } + res["identifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentifier(val) + } + return nil + } + res["identifierType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSProcessIdentifierType) + if err != nil { + return err + } + if val != nil { + m.SetIdentifierType(val.(*MacOSProcessIdentifierType)) + } + return nil + } + res["mediaLibrary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetMediaLibrary(val.(*Enablement)) + } + 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["photos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetPhotos(val.(*Enablement)) + } + return nil + } + res["postEvent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetPostEvent(val.(*Enablement)) + } + return nil + } + res["reminders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetReminders(val.(*Enablement)) + } + return nil + } + res["speechRecognition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSpeechRecognition(val.(*Enablement)) + } + return nil + } + res["staticCodeValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStaticCodeValidation(val) + } + return nil + } + res["systemPolicyAllFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyAllFiles(val.(*Enablement)) + } + return nil + } + res["systemPolicyDesktopFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyDesktopFolder(val.(*Enablement)) + } + return nil + } + res["systemPolicyDocumentsFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyDocumentsFolder(val.(*Enablement)) + } + return nil + } + res["systemPolicyDownloadsFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyDownloadsFolder(val.(*Enablement)) + } + return nil + } + res["systemPolicyNetworkVolumes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyNetworkVolumes(val.(*Enablement)) + } + return nil + } + res["systemPolicyRemovableVolumes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicyRemovableVolumes(val.(*Enablement)) + } + return nil + } + res["systemPolicySystemAdminFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSystemPolicySystemAdminFiles(val.(*Enablement)) + } + return nil + } + return res +} +// GetFileProviderPresence gets the fileProviderPresence property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetFileProviderPresence()(*Enablement) { + return m.fileProviderPresence +} +// GetIdentifier gets the identifier property value. The bundle ID or path of the app, process, or executable. +func (m *MacOSPrivacyAccessControlItem) GetIdentifier()(*string) { + return m.identifier +} +// GetIdentifierType gets the identifierType property value. Process identifier types for MacOS Privacy Preferences +func (m *MacOSPrivacyAccessControlItem) GetIdentifierType()(*MacOSProcessIdentifierType) { + return m.identifierType +} +// GetMediaLibrary gets the mediaLibrary property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetMediaLibrary()(*Enablement) { + return m.mediaLibrary +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSPrivacyAccessControlItem) GetOdataType()(*string) { + return m.odataType +} +// GetPhotos gets the photos property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetPhotos()(*Enablement) { + return m.photos +} +// GetPostEvent gets the postEvent property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetPostEvent()(*Enablement) { + return m.postEvent +} +// GetReminders gets the reminders property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetReminders()(*Enablement) { + return m.reminders +} +// GetSpeechRecognition gets the speechRecognition property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSpeechRecognition()(*Enablement) { + return m.speechRecognition +} +// GetStaticCodeValidation gets the staticCodeValidation property value. Statically validates the code requirement. Use this setting if the process invalidates its dynamic code signature. +func (m *MacOSPrivacyAccessControlItem) GetStaticCodeValidation()(*bool) { + return m.staticCodeValidation +} +// GetSystemPolicyAllFiles gets the systemPolicyAllFiles property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyAllFiles()(*Enablement) { + return m.systemPolicyAllFiles +} +// GetSystemPolicyDesktopFolder gets the systemPolicyDesktopFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyDesktopFolder()(*Enablement) { + return m.systemPolicyDesktopFolder +} +// GetSystemPolicyDocumentsFolder gets the systemPolicyDocumentsFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyDocumentsFolder()(*Enablement) { + return m.systemPolicyDocumentsFolder +} +// GetSystemPolicyDownloadsFolder gets the systemPolicyDownloadsFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyDownloadsFolder()(*Enablement) { + return m.systemPolicyDownloadsFolder +} +// GetSystemPolicyNetworkVolumes gets the systemPolicyNetworkVolumes property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyNetworkVolumes()(*Enablement) { + return m.systemPolicyNetworkVolumes +} +// GetSystemPolicyRemovableVolumes gets the systemPolicyRemovableVolumes property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicyRemovableVolumes()(*Enablement) { + return m.systemPolicyRemovableVolumes +} +// GetSystemPolicySystemAdminFiles gets the systemPolicySystemAdminFiles property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) GetSystemPolicySystemAdminFiles()(*Enablement) { + return m.systemPolicySystemAdminFiles +} +// Serialize serializes information the current object +func (m *MacOSPrivacyAccessControlItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessibility() != nil { + cast := (*m.GetAccessibility()).String() + err := writer.WriteStringValue("accessibility", &cast) + if err != nil { + return err + } + } + if m.GetAddressBook() != nil { + cast := (*m.GetAddressBook()).String() + err := writer.WriteStringValue("addressBook", &cast) + if err != nil { + return err + } + } + if m.GetAppleEventsAllowedReceivers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppleEventsAllowedReceivers())) + for i, v := range m.GetAppleEventsAllowedReceivers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("appleEventsAllowedReceivers", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("blockCamera", m.GetBlockCamera()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("blockListenEvent", m.GetBlockListenEvent()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("blockMicrophone", m.GetBlockMicrophone()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("blockScreenCapture", m.GetBlockScreenCapture()) + if err != nil { + return err + } + } + if m.GetCalendar() != nil { + cast := (*m.GetCalendar()).String() + err := writer.WriteStringValue("calendar", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("codeRequirement", m.GetCodeRequirement()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetFileProviderPresence() != nil { + cast := (*m.GetFileProviderPresence()).String() + err := writer.WriteStringValue("fileProviderPresence", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("identifier", m.GetIdentifier()) + if err != nil { + return err + } + } + if m.GetIdentifierType() != nil { + cast := (*m.GetIdentifierType()).String() + err := writer.WriteStringValue("identifierType", &cast) + if err != nil { + return err + } + } + if m.GetMediaLibrary() != nil { + cast := (*m.GetMediaLibrary()).String() + err := writer.WriteStringValue("mediaLibrary", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPhotos() != nil { + cast := (*m.GetPhotos()).String() + err := writer.WriteStringValue("photos", &cast) + if err != nil { + return err + } + } + if m.GetPostEvent() != nil { + cast := (*m.GetPostEvent()).String() + err := writer.WriteStringValue("postEvent", &cast) + if err != nil { + return err + } + } + if m.GetReminders() != nil { + cast := (*m.GetReminders()).String() + err := writer.WriteStringValue("reminders", &cast) + if err != nil { + return err + } + } + if m.GetSpeechRecognition() != nil { + cast := (*m.GetSpeechRecognition()).String() + err := writer.WriteStringValue("speechRecognition", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("staticCodeValidation", m.GetStaticCodeValidation()) + if err != nil { + return err + } + } + if m.GetSystemPolicyAllFiles() != nil { + cast := (*m.GetSystemPolicyAllFiles()).String() + err := writer.WriteStringValue("systemPolicyAllFiles", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicyDesktopFolder() != nil { + cast := (*m.GetSystemPolicyDesktopFolder()).String() + err := writer.WriteStringValue("systemPolicyDesktopFolder", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicyDocumentsFolder() != nil { + cast := (*m.GetSystemPolicyDocumentsFolder()).String() + err := writer.WriteStringValue("systemPolicyDocumentsFolder", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicyDownloadsFolder() != nil { + cast := (*m.GetSystemPolicyDownloadsFolder()).String() + err := writer.WriteStringValue("systemPolicyDownloadsFolder", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicyNetworkVolumes() != nil { + cast := (*m.GetSystemPolicyNetworkVolumes()).String() + err := writer.WriteStringValue("systemPolicyNetworkVolumes", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicyRemovableVolumes() != nil { + cast := (*m.GetSystemPolicyRemovableVolumes()).String() + err := writer.WriteStringValue("systemPolicyRemovableVolumes", &cast) + if err != nil { + return err + } + } + if m.GetSystemPolicySystemAdminFiles() != nil { + cast := (*m.GetSystemPolicySystemAdminFiles()).String() + err := writer.WriteStringValue("systemPolicySystemAdminFiles", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessibility sets the accessibility property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetAccessibility(value *Enablement)() { + m.accessibility = value +} +// 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 *MacOSPrivacyAccessControlItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddressBook sets the addressBook property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetAddressBook(value *Enablement)() { + m.addressBook = value +} +// SetAppleEventsAllowedReceivers sets the appleEventsAllowedReceivers property value. Allow or deny the app or process to send a restricted Apple event to another app or process. You will need to know the identifier, identifier type, and code requirement of the receiving app or process. This collection can contain a maximum of 500 elements. +func (m *MacOSPrivacyAccessControlItem) SetAppleEventsAllowedReceivers(value []MacOSAppleEventReceiverable)() { + m.appleEventsAllowedReceivers = value +} +// SetBlockCamera sets the blockCamera property value. Block access to camera app. +func (m *MacOSPrivacyAccessControlItem) SetBlockCamera(value *bool)() { + m.blockCamera = value +} +// SetBlockListenEvent sets the blockListenEvent property value. Block the app or process from listening to events from input devices such as mouse, keyboard, and trackpad.Requires macOS 10.15 or later. +func (m *MacOSPrivacyAccessControlItem) SetBlockListenEvent(value *bool)() { + m.blockListenEvent = value +} +// SetBlockMicrophone sets the blockMicrophone property value. Block access to microphone. +func (m *MacOSPrivacyAccessControlItem) SetBlockMicrophone(value *bool)() { + m.blockMicrophone = value +} +// SetBlockScreenCapture sets the blockScreenCapture property value. Block app from capturing contents of system display. Requires macOS 10.15 or later. +func (m *MacOSPrivacyAccessControlItem) SetBlockScreenCapture(value *bool)() { + m.blockScreenCapture = value +} +// SetCalendar sets the calendar property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetCalendar(value *Enablement)() { + m.calendar = value +} +// SetCodeRequirement sets the codeRequirement property value. Enter the code requirement, which can be obtained with the command 'codesign –display -r –' in the Terminal app. Include everything after '=>'. +func (m *MacOSPrivacyAccessControlItem) SetCodeRequirement(value *string)() { + m.codeRequirement = value +} +// SetDisplayName sets the displayName property value. The display name of the app, process, or executable. +func (m *MacOSPrivacyAccessControlItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFileProviderPresence sets the fileProviderPresence property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetFileProviderPresence(value *Enablement)() { + m.fileProviderPresence = value +} +// SetIdentifier sets the identifier property value. The bundle ID or path of the app, process, or executable. +func (m *MacOSPrivacyAccessControlItem) SetIdentifier(value *string)() { + m.identifier = value +} +// SetIdentifierType sets the identifierType property value. Process identifier types for MacOS Privacy Preferences +func (m *MacOSPrivacyAccessControlItem) SetIdentifierType(value *MacOSProcessIdentifierType)() { + m.identifierType = value +} +// SetMediaLibrary sets the mediaLibrary property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetMediaLibrary(value *Enablement)() { + m.mediaLibrary = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSPrivacyAccessControlItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetPhotos sets the photos property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetPhotos(value *Enablement)() { + m.photos = value +} +// SetPostEvent sets the postEvent property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetPostEvent(value *Enablement)() { + m.postEvent = value +} +// SetReminders sets the reminders property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetReminders(value *Enablement)() { + m.reminders = value +} +// SetSpeechRecognition sets the speechRecognition property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSpeechRecognition(value *Enablement)() { + m.speechRecognition = value +} +// SetStaticCodeValidation sets the staticCodeValidation property value. Statically validates the code requirement. Use this setting if the process invalidates its dynamic code signature. +func (m *MacOSPrivacyAccessControlItem) SetStaticCodeValidation(value *bool)() { + m.staticCodeValidation = value +} +// SetSystemPolicyAllFiles sets the systemPolicyAllFiles property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyAllFiles(value *Enablement)() { + m.systemPolicyAllFiles = value +} +// SetSystemPolicyDesktopFolder sets the systemPolicyDesktopFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyDesktopFolder(value *Enablement)() { + m.systemPolicyDesktopFolder = value +} +// SetSystemPolicyDocumentsFolder sets the systemPolicyDocumentsFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyDocumentsFolder(value *Enablement)() { + m.systemPolicyDocumentsFolder = value +} +// SetSystemPolicyDownloadsFolder sets the systemPolicyDownloadsFolder property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyDownloadsFolder(value *Enablement)() { + m.systemPolicyDownloadsFolder = value +} +// SetSystemPolicyNetworkVolumes sets the systemPolicyNetworkVolumes property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyNetworkVolumes(value *Enablement)() { + m.systemPolicyNetworkVolumes = value +} +// SetSystemPolicyRemovableVolumes sets the systemPolicyRemovableVolumes property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicyRemovableVolumes(value *Enablement)() { + m.systemPolicyRemovableVolumes = value +} +// SetSystemPolicySystemAdminFiles sets the systemPolicySystemAdminFiles property value. Possible values of a property +func (m *MacOSPrivacyAccessControlItem) SetSystemPolicySystemAdminFiles(value *Enablement)() { + m.systemPolicySystemAdminFiles = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_response.go new file mode 100644 index 000000000..e921981cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPrivacyAccessControlItemCollectionResponse +type MacOSPrivacyAccessControlItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSPrivacyAccessControlItemable +} +// NewMacOSPrivacyAccessControlItemCollectionResponse instantiates a new MacOSPrivacyAccessControlItemCollectionResponse and sets the default values. +func NewMacOSPrivacyAccessControlItemCollectionResponse()(*MacOSPrivacyAccessControlItemCollectionResponse) { + m := &MacOSPrivacyAccessControlItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSPrivacyAccessControlItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSPrivacyAccessControlItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSPrivacyAccessControlItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSPrivacyAccessControlItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSPrivacyAccessControlItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSPrivacyAccessControlItemable, len(val)) + for i, v := range val { + res[i] = v.(MacOSPrivacyAccessControlItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSPrivacyAccessControlItemCollectionResponse) GetValue()([]MacOSPrivacyAccessControlItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSPrivacyAccessControlItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSPrivacyAccessControlItemCollectionResponse) SetValue(value []MacOSPrivacyAccessControlItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_responseable.go new file mode 100644 index 000000000..577e88903 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPrivacyAccessControlItemCollectionResponseable +type MacOSPrivacyAccessControlItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSPrivacyAccessControlItemable) + SetValue(value []MacOSPrivacyAccessControlItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_itemable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_itemable.go new file mode 100644 index 000000000..4834902e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_privacy_access_control_itemable.go @@ -0,0 +1,65 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSPrivacyAccessControlItemable +type MacOSPrivacyAccessControlItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessibility()(*Enablement) + GetAddressBook()(*Enablement) + GetAppleEventsAllowedReceivers()([]MacOSAppleEventReceiverable) + GetBlockCamera()(*bool) + GetBlockListenEvent()(*bool) + GetBlockMicrophone()(*bool) + GetBlockScreenCapture()(*bool) + GetCalendar()(*Enablement) + GetCodeRequirement()(*string) + GetDisplayName()(*string) + GetFileProviderPresence()(*Enablement) + GetIdentifier()(*string) + GetIdentifierType()(*MacOSProcessIdentifierType) + GetMediaLibrary()(*Enablement) + GetOdataType()(*string) + GetPhotos()(*Enablement) + GetPostEvent()(*Enablement) + GetReminders()(*Enablement) + GetSpeechRecognition()(*Enablement) + GetStaticCodeValidation()(*bool) + GetSystemPolicyAllFiles()(*Enablement) + GetSystemPolicyDesktopFolder()(*Enablement) + GetSystemPolicyDocumentsFolder()(*Enablement) + GetSystemPolicyDownloadsFolder()(*Enablement) + GetSystemPolicyNetworkVolumes()(*Enablement) + GetSystemPolicyRemovableVolumes()(*Enablement) + GetSystemPolicySystemAdminFiles()(*Enablement) + SetAccessibility(value *Enablement)() + SetAddressBook(value *Enablement)() + SetAppleEventsAllowedReceivers(value []MacOSAppleEventReceiverable)() + SetBlockCamera(value *bool)() + SetBlockListenEvent(value *bool)() + SetBlockMicrophone(value *bool)() + SetBlockScreenCapture(value *bool)() + SetCalendar(value *Enablement)() + SetCodeRequirement(value *string)() + SetDisplayName(value *string)() + SetFileProviderPresence(value *Enablement)() + SetIdentifier(value *string)() + SetIdentifierType(value *MacOSProcessIdentifierType)() + SetMediaLibrary(value *Enablement)() + SetOdataType(value *string)() + SetPhotos(value *Enablement)() + SetPostEvent(value *Enablement)() + SetReminders(value *Enablement)() + SetSpeechRecognition(value *Enablement)() + SetStaticCodeValidation(value *bool)() + SetSystemPolicyAllFiles(value *Enablement)() + SetSystemPolicyDesktopFolder(value *Enablement)() + SetSystemPolicyDocumentsFolder(value *Enablement)() + SetSystemPolicyDownloadsFolder(value *Enablement)() + SetSystemPolicyNetworkVolumes(value *Enablement)() + SetSystemPolicyRemovableVolumes(value *Enablement)() + SetSystemPolicySystemAdminFiles(value *Enablement)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_process_identifier_type.go b/src/internal/connector/graph/betasdk/models/mac_o_s_process_identifier_type.go new file mode 100644 index 000000000..ce37eac10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_process_identifier_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSProcessIdentifierType int + +const ( + // Indicates an app with a bundle ID. + BUNDLEID_MACOSPROCESSIDENTIFIERTYPE MacOSProcessIdentifierType = iota + // Indicates a file path for a process. + PATH_MACOSPROCESSIDENTIFIERTYPE +) + +func (i MacOSProcessIdentifierType) String() string { + return []string{"bundleID", "path"}[i] +} +func ParseMacOSProcessIdentifierType(v string) (interface{}, error) { + result := BUNDLEID_MACOSPROCESSIDENTIFIERTYPE + switch v { + case "bundleID": + result = BUNDLEID_MACOSPROCESSIDENTIFIERTYPE + case "path": + result = PATH_MACOSPROCESSIDENTIFIERTYPE + default: + return 0, errors.New("Unknown MacOSProcessIdentifierType value: " + v) + } + return &result, nil +} +func SerializeMacOSProcessIdentifierType(values []MacOSProcessIdentifierType) []string { + 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/mac_o_s_redirect_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_redirect_single_sign_on_extension.go new file mode 100644 index 000000000..8a211a0ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_redirect_single_sign_on_extension.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSRedirectSingleSignOnExtension +type MacOSRedirectSingleSignOnExtension struct { + MacOSSingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string + // One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. + urlPrefixes []string +} +// NewMacOSRedirectSingleSignOnExtension instantiates a new MacOSRedirectSingleSignOnExtension and sets the default values. +func NewMacOSRedirectSingleSignOnExtension()(*MacOSRedirectSingleSignOnExtension) { + m := &MacOSRedirectSingleSignOnExtension{ + MacOSSingleSignOnExtension: *NewMacOSSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.macOSRedirectSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSRedirectSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSRedirectSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSRedirectSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSRedirectSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSRedirectSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSRedirectSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSSingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + res["urlPrefixes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUrlPrefixes(res) + } + return nil + } + return res +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSRedirectSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// GetUrlPrefixes gets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *MacOSRedirectSingleSignOnExtension) GetUrlPrefixes()([]string) { + return m.urlPrefixes +} +// Serialize serializes information the current object +func (m *MacOSRedirectSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSSingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + if m.GetUrlPrefixes() != nil { + err = writer.WriteCollectionOfStringValues("urlPrefixes", m.GetUrlPrefixes()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *MacOSRedirectSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSRedirectSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *MacOSRedirectSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} +// SetUrlPrefixes sets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *MacOSRedirectSingleSignOnExtension) SetUrlPrefixes(value []string)() { + m.urlPrefixes = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_redirect_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_redirect_single_sign_on_extensionable.go new file mode 100644 index 000000000..d33f776d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_redirect_single_sign_on_extensionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSRedirectSingleSignOnExtensionable +type MacOSRedirectSingleSignOnExtensionable interface { + MacOSSingleSignOnExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurations()([]KeyTypedValuePairable) + GetExtensionIdentifier()(*string) + GetTeamIdentifier()(*string) + GetUrlPrefixes()([]string) + SetConfigurations(value []KeyTypedValuePairable)() + SetExtensionIdentifier(value *string)() + SetTeamIdentifier(value *string)() + SetUrlPrefixes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile.go b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile.go new file mode 100644 index 000000000..20baff7db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile.go @@ -0,0 +1,380 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSScepCertificateProfile +type MacOSScepCertificateProfile struct { + MacOSCertificateProfileBase + // AllowAllAppsAccess setting + allowAllAppsAccess *bool + // Target store certificate. Possible values are: user, machine. + certificateStore *CertificateStore + // Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. + customSubjectAlternativeNames []CustomSubjectAlternativeNameable + // Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. + extendedKeyUsages []ExtendedKeyUsageable + // SCEP Hash Algorithm. Possible values are: sha1, sha2. + hashAlgorithm *HashAlgorithms + // Key Size Options. + keySize *KeySize + // Key Usage Options. + keyUsage *KeyUsages + // Certificate state for devices. This collection can contain a maximum of 2147483647 elements. + managedDeviceCertificateStates []ManagedDeviceCertificateStateable + // Trusted Root Certificate. + rootCertificate MacOSTrustedRootCertificateable + // SCEP Server Url(s). + scepServerUrls []string + // Custom String that defines the AAD Attribute. + subjectAlternativeNameFormatString *string + // Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US + subjectNameFormatString *string +} +// NewMacOSScepCertificateProfile instantiates a new MacOSScepCertificateProfile and sets the default values. +func NewMacOSScepCertificateProfile()(*MacOSScepCertificateProfile) { + m := &MacOSScepCertificateProfile{ + MacOSCertificateProfileBase: *NewMacOSCertificateProfileBase(), + } + odataTypeValue := "#microsoft.graph.macOSScepCertificateProfile"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSScepCertificateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSScepCertificateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSScepCertificateProfile(), nil +} +// GetAllowAllAppsAccess gets the allowAllAppsAccess property value. AllowAllAppsAccess setting +func (m *MacOSScepCertificateProfile) GetAllowAllAppsAccess()(*bool) { + return m.allowAllAppsAccess +} +// GetCertificateStore gets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *MacOSScepCertificateProfile) GetCertificateStore()(*CertificateStore) { + return m.certificateStore +} +// GetCustomSubjectAlternativeNames gets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *MacOSScepCertificateProfile) GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) { + return m.customSubjectAlternativeNames +} +// GetExtendedKeyUsages gets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *MacOSScepCertificateProfile) GetExtendedKeyUsages()([]ExtendedKeyUsageable) { + return m.extendedKeyUsages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSScepCertificateProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MacOSCertificateProfileBase.GetFieldDeserializers() + res["allowAllAppsAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAllAppsAccess(val) + } + return nil + } + res["certificateStore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateStore) + if err != nil { + return err + } + if val != nil { + m.SetCertificateStore(val.(*CertificateStore)) + } + return nil + } + res["customSubjectAlternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomSubjectAlternativeNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomSubjectAlternativeNameable, len(val)) + for i, v := range val { + res[i] = v.(CustomSubjectAlternativeNameable) + } + m.SetCustomSubjectAlternativeNames(res) + } + return nil + } + res["extendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtendedKeyUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtendedKeyUsageable, len(val)) + for i, v := range val { + res[i] = v.(ExtendedKeyUsageable) + } + m.SetExtendedKeyUsages(res) + } + return nil + } + res["hashAlgorithm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseHashAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetHashAlgorithm(val.(*HashAlgorithms)) + } + return nil + } + res["keySize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeySize) + if err != nil { + return err + } + if val != nil { + m.SetKeySize(val.(*KeySize)) + } + return nil + } + res["keyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["managedDeviceCertificateStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetManagedDeviceCertificateStates(res) + } + return nil + } + res["rootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificate(val.(MacOSTrustedRootCertificateable)) + } + return nil + } + res["scepServerUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScepServerUrls(res) + } + return nil + } + res["subjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectAlternativeNameFormatString(val) + } + return nil + } + res["subjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectNameFormatString(val) + } + return nil + } + return res +} +// GetHashAlgorithm gets the hashAlgorithm property value. SCEP Hash Algorithm. Possible values are: sha1, sha2. +func (m *MacOSScepCertificateProfile) GetHashAlgorithm()(*HashAlgorithms) { + return m.hashAlgorithm +} +// GetKeySize gets the keySize property value. Key Size Options. +func (m *MacOSScepCertificateProfile) GetKeySize()(*KeySize) { + return m.keySize +} +// GetKeyUsage gets the keyUsage property value. Key Usage Options. +func (m *MacOSScepCertificateProfile) GetKeyUsage()(*KeyUsages) { + return m.keyUsage +} +// GetManagedDeviceCertificateStates gets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSScepCertificateProfile) GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) { + return m.managedDeviceCertificateStates +} +// GetRootCertificate gets the rootCertificate property value. Trusted Root Certificate. +func (m *MacOSScepCertificateProfile) GetRootCertificate()(MacOSTrustedRootCertificateable) { + return m.rootCertificate +} +// GetScepServerUrls gets the scepServerUrls property value. SCEP Server Url(s). +func (m *MacOSScepCertificateProfile) GetScepServerUrls()([]string) { + return m.scepServerUrls +} +// GetSubjectAlternativeNameFormatString gets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *MacOSScepCertificateProfile) GetSubjectAlternativeNameFormatString()(*string) { + return m.subjectAlternativeNameFormatString +} +// GetSubjectNameFormatString gets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *MacOSScepCertificateProfile) GetSubjectNameFormatString()(*string) { + return m.subjectNameFormatString +} +// Serialize serializes information the current object +func (m *MacOSScepCertificateProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MacOSCertificateProfileBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowAllAppsAccess", m.GetAllowAllAppsAccess()) + if err != nil { + return err + } + } + if m.GetCertificateStore() != nil { + cast := (*m.GetCertificateStore()).String() + err = writer.WriteStringValue("certificateStore", &cast) + if err != nil { + return err + } + } + if m.GetCustomSubjectAlternativeNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSubjectAlternativeNames())) + for i, v := range m.GetCustomSubjectAlternativeNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSubjectAlternativeNames", cast) + if err != nil { + return err + } + } + if m.GetExtendedKeyUsages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtendedKeyUsages())) + for i, v := range m.GetExtendedKeyUsages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extendedKeyUsages", cast) + if err != nil { + return err + } + } + if m.GetHashAlgorithm() != nil { + cast := (*m.GetHashAlgorithm()).String() + err = writer.WriteStringValue("hashAlgorithm", &cast) + if err != nil { + return err + } + } + if m.GetKeySize() != nil { + cast := (*m.GetKeySize()).String() + err = writer.WriteStringValue("keySize", &cast) + if err != nil { + return err + } + } + if m.GetKeyUsage() != nil { + cast := (*m.GetKeyUsage()).String() + err = writer.WriteStringValue("keyUsage", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCertificateStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCertificateStates())) + for i, v := range m.GetManagedDeviceCertificateStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCertificateStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificate", m.GetRootCertificate()) + if err != nil { + return err + } + } + if m.GetScepServerUrls() != nil { + err = writer.WriteCollectionOfStringValues("scepServerUrls", m.GetScepServerUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectAlternativeNameFormatString", m.GetSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectNameFormatString", m.GetSubjectNameFormatString()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAllAppsAccess sets the allowAllAppsAccess property value. AllowAllAppsAccess setting +func (m *MacOSScepCertificateProfile) SetAllowAllAppsAccess(value *bool)() { + m.allowAllAppsAccess = value +} +// SetCertificateStore sets the certificateStore property value. Target store certificate. Possible values are: user, machine. +func (m *MacOSScepCertificateProfile) SetCertificateStore(value *CertificateStore)() { + m.certificateStore = value +} +// SetCustomSubjectAlternativeNames sets the customSubjectAlternativeNames property value. Custom Subject Alternative Name Settings. This collection can contain a maximum of 500 elements. +func (m *MacOSScepCertificateProfile) SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() { + m.customSubjectAlternativeNames = value +} +// SetExtendedKeyUsages sets the extendedKeyUsages property value. Extended Key Usage (EKU) settings. This collection can contain a maximum of 500 elements. +func (m *MacOSScepCertificateProfile) SetExtendedKeyUsages(value []ExtendedKeyUsageable)() { + m.extendedKeyUsages = value +} +// SetHashAlgorithm sets the hashAlgorithm property value. SCEP Hash Algorithm. Possible values are: sha1, sha2. +func (m *MacOSScepCertificateProfile) SetHashAlgorithm(value *HashAlgorithms)() { + m.hashAlgorithm = value +} +// SetKeySize sets the keySize property value. Key Size Options. +func (m *MacOSScepCertificateProfile) SetKeySize(value *KeySize)() { + m.keySize = value +} +// SetKeyUsage sets the keyUsage property value. Key Usage Options. +func (m *MacOSScepCertificateProfile) SetKeyUsage(value *KeyUsages)() { + m.keyUsage = value +} +// SetManagedDeviceCertificateStates sets the managedDeviceCertificateStates property value. Certificate state for devices. This collection can contain a maximum of 2147483647 elements. +func (m *MacOSScepCertificateProfile) SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() { + m.managedDeviceCertificateStates = value +} +// SetRootCertificate sets the rootCertificate property value. Trusted Root Certificate. +func (m *MacOSScepCertificateProfile) SetRootCertificate(value MacOSTrustedRootCertificateable)() { + m.rootCertificate = value +} +// SetScepServerUrls sets the scepServerUrls property value. SCEP Server Url(s). +func (m *MacOSScepCertificateProfile) SetScepServerUrls(value []string)() { + m.scepServerUrls = value +} +// SetSubjectAlternativeNameFormatString sets the subjectAlternativeNameFormatString property value. Custom String that defines the AAD Attribute. +func (m *MacOSScepCertificateProfile) SetSubjectAlternativeNameFormatString(value *string)() { + m.subjectAlternativeNameFormatString = value +} +// SetSubjectNameFormatString sets the subjectNameFormatString property value. Custom format to use with SubjectNameFormat = Custom. Example: CN={{EmailAddress}},E={{EmailAddress}},OU=Enterprise Users,O=Contoso Corporation,L=Redmond,ST=WA,C=US +func (m *MacOSScepCertificateProfile) SetSubjectNameFormatString(value *string)() { + m.subjectNameFormatString = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_response.go new file mode 100644 index 000000000..449efe445 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSScepCertificateProfileCollectionResponse +type MacOSScepCertificateProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSScepCertificateProfileable +} +// NewMacOSScepCertificateProfileCollectionResponse instantiates a new MacOSScepCertificateProfileCollectionResponse and sets the default values. +func NewMacOSScepCertificateProfileCollectionResponse()(*MacOSScepCertificateProfileCollectionResponse) { + m := &MacOSScepCertificateProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSScepCertificateProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSScepCertificateProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSScepCertificateProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSScepCertificateProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSScepCertificateProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSScepCertificateProfileable, len(val)) + for i, v := range val { + res[i] = v.(MacOSScepCertificateProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSScepCertificateProfileCollectionResponse) GetValue()([]MacOSScepCertificateProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSScepCertificateProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSScepCertificateProfileCollectionResponse) SetValue(value []MacOSScepCertificateProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_responseable.go new file mode 100644 index 000000000..9fc3cbfe4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSScepCertificateProfileCollectionResponseable +type MacOSScepCertificateProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSScepCertificateProfileable) + SetValue(value []MacOSScepCertificateProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profileable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profileable.go new file mode 100644 index 000000000..15fe7d767 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_scep_certificate_profileable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSScepCertificateProfileable +type MacOSScepCertificateProfileable interface { + MacOSCertificateProfileBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAllAppsAccess()(*bool) + GetCertificateStore()(*CertificateStore) + GetCustomSubjectAlternativeNames()([]CustomSubjectAlternativeNameable) + GetExtendedKeyUsages()([]ExtendedKeyUsageable) + GetHashAlgorithm()(*HashAlgorithms) + GetKeySize()(*KeySize) + GetKeyUsage()(*KeyUsages) + GetManagedDeviceCertificateStates()([]ManagedDeviceCertificateStateable) + GetRootCertificate()(MacOSTrustedRootCertificateable) + GetScepServerUrls()([]string) + GetSubjectAlternativeNameFormatString()(*string) + GetSubjectNameFormatString()(*string) + SetAllowAllAppsAccess(value *bool)() + SetCertificateStore(value *CertificateStore)() + SetCustomSubjectAlternativeNames(value []CustomSubjectAlternativeNameable)() + SetExtendedKeyUsages(value []ExtendedKeyUsageable)() + SetHashAlgorithm(value *HashAlgorithms)() + SetKeySize(value *KeySize)() + SetKeyUsage(value *KeyUsages)() + SetManagedDeviceCertificateStates(value []ManagedDeviceCertificateStateable)() + SetRootCertificate(value MacOSTrustedRootCertificateable)() + SetScepServerUrls(value []string)() + SetSubjectAlternativeNameFormatString(value *string)() + SetSubjectNameFormatString(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extension.go new file mode 100644 index 000000000..0692ae87d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extension.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSingleSignOnExtension +type MacOSSingleSignOnExtension struct { + SingleSignOnExtension +} +// NewMacOSSingleSignOnExtension instantiates a new MacOSSingleSignOnExtension and sets the default values. +func NewMacOSSingleSignOnExtension()(*MacOSSingleSignOnExtension) { + m := &MacOSSingleSignOnExtension{ + SingleSignOnExtension: *NewSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.macOSSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.macOSAzureAdSingleSignOnExtension": + return NewMacOSAzureAdSingleSignOnExtension(), nil + case "#microsoft.graph.macOSCredentialSingleSignOnExtension": + return NewMacOSCredentialSingleSignOnExtension(), nil + case "#microsoft.graph.macOSKerberosSingleSignOnExtension": + return NewMacOSKerberosSingleSignOnExtension(), nil + case "#microsoft.graph.macOSRedirectSingleSignOnExtension": + return NewMacOSRedirectSingleSignOnExtension(), nil + } + } + } + } + return NewMacOSSingleSignOnExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SingleSignOnExtension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MacOSSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extensionable.go new file mode 100644 index 000000000..b23cea9ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_single_sign_on_extensionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSingleSignOnExtensionable +type MacOSSingleSignOnExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SingleSignOnExtensionable +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary.go new file mode 100644 index 000000000..e6526c880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary.go @@ -0,0 +1,329 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateAccountSummary macOS software update account summary report for a device and user +type MacOSSoftwareUpdateAccountSummary struct { + Entity + // Summary of the updates by category. + categorySummaries []MacOSSoftwareUpdateCategorySummaryable + // The device ID. + deviceId *string + // The device name. + deviceName *string + // The name of the report + displayName *string + // Number of failed updates on the device. + failedUpdateCount *int32 + // Last date time the report for this device was updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OS version. + osVersion *string + // Number of successful updates on the device. + successfulUpdateCount *int32 + // Number of total updates on the device. + totalUpdateCount *int32 + // The user ID. + userId *string + // The user principal name + userPrincipalName *string +} +// NewMacOSSoftwareUpdateAccountSummary instantiates a new macOSSoftwareUpdateAccountSummary and sets the default values. +func NewMacOSSoftwareUpdateAccountSummary()(*MacOSSoftwareUpdateAccountSummary) { + m := &MacOSSoftwareUpdateAccountSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateMacOSSoftwareUpdateAccountSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateAccountSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateAccountSummary(), nil +} +// GetCategorySummaries gets the categorySummaries property value. Summary of the updates by category. +func (m *MacOSSoftwareUpdateAccountSummary) GetCategorySummaries()([]MacOSSoftwareUpdateCategorySummaryable) { + return m.categorySummaries +} +// GetDeviceId gets the deviceId property value. The device ID. +func (m *MacOSSoftwareUpdateAccountSummary) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceName gets the deviceName property value. The device name. +func (m *MacOSSoftwareUpdateAccountSummary) GetDeviceName()(*string) { + return m.deviceName +} +// GetDisplayName gets the displayName property value. The name of the report +func (m *MacOSSoftwareUpdateAccountSummary) GetDisplayName()(*string) { + return m.displayName +} +// GetFailedUpdateCount gets the failedUpdateCount property value. Number of failed updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) GetFailedUpdateCount()(*int32) { + return m.failedUpdateCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateAccountSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["categorySummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateCategorySummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateCategorySummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateCategorySummaryable) + } + m.SetCategorySummaries(res) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["failedUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUpdateCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["successfulUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulUpdateCount(val) + } + return nil + } + res["totalUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUpdateCount(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Last date time the report for this device was updated. +func (m *MacOSSoftwareUpdateAccountSummary) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetOsVersion gets the osVersion property value. The OS version. +func (m *MacOSSoftwareUpdateAccountSummary) GetOsVersion()(*string) { + return m.osVersion +} +// GetSuccessfulUpdateCount gets the successfulUpdateCount property value. Number of successful updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) GetSuccessfulUpdateCount()(*int32) { + return m.successfulUpdateCount +} +// GetTotalUpdateCount gets the totalUpdateCount property value. Number of total updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) GetTotalUpdateCount()(*int32) { + return m.totalUpdateCount +} +// GetUserId gets the userId property value. The user ID. +func (m *MacOSSoftwareUpdateAccountSummary) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name +func (m *MacOSSoftwareUpdateAccountSummary) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateAccountSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategorySummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategorySummaries())) + for i, v := range m.GetCategorySummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categorySummaries", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUpdateCount", m.GetFailedUpdateCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successfulUpdateCount", m.GetSuccessfulUpdateCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUpdateCount", m.GetTotalUpdateCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetCategorySummaries sets the categorySummaries property value. Summary of the updates by category. +func (m *MacOSSoftwareUpdateAccountSummary) SetCategorySummaries(value []MacOSSoftwareUpdateCategorySummaryable)() { + m.categorySummaries = value +} +// SetDeviceId sets the deviceId property value. The device ID. +func (m *MacOSSoftwareUpdateAccountSummary) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceName sets the deviceName property value. The device name. +func (m *MacOSSoftwareUpdateAccountSummary) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDisplayName sets the displayName property value. The name of the report +func (m *MacOSSoftwareUpdateAccountSummary) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFailedUpdateCount sets the failedUpdateCount property value. Number of failed updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) SetFailedUpdateCount(value *int32)() { + m.failedUpdateCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Last date time the report for this device was updated. +func (m *MacOSSoftwareUpdateAccountSummary) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetOsVersion sets the osVersion property value. The OS version. +func (m *MacOSSoftwareUpdateAccountSummary) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetSuccessfulUpdateCount sets the successfulUpdateCount property value. Number of successful updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) SetSuccessfulUpdateCount(value *int32)() { + m.successfulUpdateCount = value +} +// SetTotalUpdateCount sets the totalUpdateCount property value. Number of total updates on the device. +func (m *MacOSSoftwareUpdateAccountSummary) SetTotalUpdateCount(value *int32)() { + m.totalUpdateCount = value +} +// SetUserId sets the userId property value. The user ID. +func (m *MacOSSoftwareUpdateAccountSummary) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name +func (m *MacOSSoftwareUpdateAccountSummary) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_response.go new file mode 100644 index 000000000..c70b300cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateAccountSummaryCollectionResponse +type MacOSSoftwareUpdateAccountSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSoftwareUpdateAccountSummaryable +} +// NewMacOSSoftwareUpdateAccountSummaryCollectionResponse instantiates a new MacOSSoftwareUpdateAccountSummaryCollectionResponse and sets the default values. +func NewMacOSSoftwareUpdateAccountSummaryCollectionResponse()(*MacOSSoftwareUpdateAccountSummaryCollectionResponse) { + m := &MacOSSoftwareUpdateAccountSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSoftwareUpdateAccountSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateAccountSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateAccountSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateAccountSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateAccountSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateAccountSummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateAccountSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSoftwareUpdateAccountSummaryCollectionResponse) GetValue()([]MacOSSoftwareUpdateAccountSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateAccountSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSoftwareUpdateAccountSummaryCollectionResponse) SetValue(value []MacOSSoftwareUpdateAccountSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_responseable.go new file mode 100644 index 000000000..40fd16d16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateAccountSummaryCollectionResponseable +type MacOSSoftwareUpdateAccountSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSoftwareUpdateAccountSummaryable) + SetValue(value []MacOSSoftwareUpdateAccountSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summaryable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summaryable.go new file mode 100644 index 000000000..013f663fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_account_summaryable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateAccountSummaryable +type MacOSSoftwareUpdateAccountSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategorySummaries()([]MacOSSoftwareUpdateCategorySummaryable) + GetDeviceId()(*string) + GetDeviceName()(*string) + GetDisplayName()(*string) + GetFailedUpdateCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOsVersion()(*string) + GetSuccessfulUpdateCount()(*int32) + GetTotalUpdateCount()(*int32) + GetUserId()(*string) + GetUserPrincipalName()(*string) + SetCategorySummaries(value []MacOSSoftwareUpdateCategorySummaryable)() + SetDeviceId(value *string)() + SetDeviceName(value *string)() + SetDisplayName(value *string)() + SetFailedUpdateCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOsVersion(value *string)() + SetSuccessfulUpdateCount(value *int32)() + SetTotalUpdateCount(value *int32)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_behavior.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_behavior.go new file mode 100644 index 000000000..a88d3d791 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_behavior.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSoftwareUpdateBehavior int + +const ( + // Not configured. + NOTCONFIGURED_MACOSSOFTWAREUPDATEBEHAVIOR MacOSSoftwareUpdateBehavior = iota + // Download and/or install the software update, depending on the current device state. + DEFAULT_ESCAPED_MACOSSOFTWAREUPDATEBEHAVIOR + // Download the software update without installing it. + DOWNLOADONLY_MACOSSOFTWAREUPDATEBEHAVIOR + // Install an already downloaded software update. + INSTALLASAP_MACOSSOFTWAREUPDATEBEHAVIOR + // Download the software update and notify the user via the App Store. + NOTIFYONLY_MACOSSOFTWAREUPDATEBEHAVIOR + // Download the software update and install it at a later time. + INSTALLLATER_MACOSSOFTWAREUPDATEBEHAVIOR +) + +func (i MacOSSoftwareUpdateBehavior) String() string { + return []string{"notConfigured", "default", "downloadOnly", "installASAP", "notifyOnly", "installLater"}[i] +} +func ParseMacOSSoftwareUpdateBehavior(v string) (interface{}, error) { + result := NOTCONFIGURED_MACOSSOFTWAREUPDATEBEHAVIOR + switch v { + case "notConfigured": + result = NOTCONFIGURED_MACOSSOFTWAREUPDATEBEHAVIOR + case "default": + result = DEFAULT_ESCAPED_MACOSSOFTWAREUPDATEBEHAVIOR + case "downloadOnly": + result = DOWNLOADONLY_MACOSSOFTWAREUPDATEBEHAVIOR + case "installASAP": + result = INSTALLASAP_MACOSSOFTWAREUPDATEBEHAVIOR + case "notifyOnly": + result = NOTIFYONLY_MACOSSOFTWAREUPDATEBEHAVIOR + case "installLater": + result = INSTALLLATER_MACOSSOFTWAREUPDATEBEHAVIOR + default: + return 0, errors.New("Unknown MacOSSoftwareUpdateBehavior value: " + v) + } + return &result, nil +} +func SerializeMacOSSoftwareUpdateBehavior(values []MacOSSoftwareUpdateBehavior) []string { + 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/mac_o_s_software_update_category.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category.go new file mode 100644 index 000000000..7c587b465 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSoftwareUpdateCategory int + +const ( + // A critical update + CRITICAL_MACOSSOFTWAREUPDATECATEGORY MacOSSoftwareUpdateCategory = iota + // A configuration data file update + CONFIGURATIONDATAFILE_MACOSSOFTWAREUPDATECATEGORY + // A firmware update + FIRMWARE_MACOSSOFTWAREUPDATECATEGORY + // All other update types + OTHER_MACOSSOFTWAREUPDATECATEGORY +) + +func (i MacOSSoftwareUpdateCategory) String() string { + return []string{"critical", "configurationDataFile", "firmware", "other"}[i] +} +func ParseMacOSSoftwareUpdateCategory(v string) (interface{}, error) { + result := CRITICAL_MACOSSOFTWAREUPDATECATEGORY + switch v { + case "critical": + result = CRITICAL_MACOSSOFTWAREUPDATECATEGORY + case "configurationDataFile": + result = CONFIGURATIONDATAFILE_MACOSSOFTWAREUPDATECATEGORY + case "firmware": + result = FIRMWARE_MACOSSOFTWAREUPDATECATEGORY + case "other": + result = OTHER_MACOSSOFTWAREUPDATECATEGORY + default: + return 0, errors.New("Unknown MacOSSoftwareUpdateCategory value: " + v) + } + return &result, nil +} +func SerializeMacOSSoftwareUpdateCategory(values []MacOSSoftwareUpdateCategory) []string { + 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/mac_o_s_software_update_category_summary.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary.go new file mode 100644 index 000000000..b4f0ba1c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary.go @@ -0,0 +1,278 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateCategorySummary macOS software update category summary report for a device and user +type MacOSSoftwareUpdateCategorySummary struct { + Entity + // The device ID. + deviceId *string + // The name of the report + displayName *string + // Number of failed updates on the device + failedUpdateCount *int32 + // Last date time the report for this device was updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of successful updates on the device + successfulUpdateCount *int32 + // Number of total updates on the device + totalUpdateCount *int32 + // MacOS Software Update Category + updateCategory *MacOSSoftwareUpdateCategory + // Summary of the update states. + updateStateSummaries []MacOSSoftwareUpdateStateSummaryable + // The user ID. + userId *string +} +// NewMacOSSoftwareUpdateCategorySummary instantiates a new macOSSoftwareUpdateCategorySummary and sets the default values. +func NewMacOSSoftwareUpdateCategorySummary()(*MacOSSoftwareUpdateCategorySummary) { + m := &MacOSSoftwareUpdateCategorySummary{ + Entity: *NewEntity(), + } + return m +} +// CreateMacOSSoftwareUpdateCategorySummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateCategorySummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateCategorySummary(), nil +} +// GetDeviceId gets the deviceId property value. The device ID. +func (m *MacOSSoftwareUpdateCategorySummary) GetDeviceId()(*string) { + return m.deviceId +} +// GetDisplayName gets the displayName property value. The name of the report +func (m *MacOSSoftwareUpdateCategorySummary) GetDisplayName()(*string) { + return m.displayName +} +// GetFailedUpdateCount gets the failedUpdateCount property value. Number of failed updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) GetFailedUpdateCount()(*int32) { + return m.failedUpdateCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateCategorySummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["failedUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUpdateCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["successfulUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulUpdateCount(val) + } + return nil + } + res["totalUpdateCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUpdateCount(val) + } + return nil + } + res["updateCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateCategory) + if err != nil { + return err + } + if val != nil { + m.SetUpdateCategory(val.(*MacOSSoftwareUpdateCategory)) + } + return nil + } + res["updateStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateStateSummaryable) + } + m.SetUpdateStateSummaries(res) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Last date time the report for this device was updated. +func (m *MacOSSoftwareUpdateCategorySummary) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetSuccessfulUpdateCount gets the successfulUpdateCount property value. Number of successful updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) GetSuccessfulUpdateCount()(*int32) { + return m.successfulUpdateCount +} +// GetTotalUpdateCount gets the totalUpdateCount property value. Number of total updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) GetTotalUpdateCount()(*int32) { + return m.totalUpdateCount +} +// GetUpdateCategory gets the updateCategory property value. MacOS Software Update Category +func (m *MacOSSoftwareUpdateCategorySummary) GetUpdateCategory()(*MacOSSoftwareUpdateCategory) { + return m.updateCategory +} +// GetUpdateStateSummaries gets the updateStateSummaries property value. Summary of the update states. +func (m *MacOSSoftwareUpdateCategorySummary) GetUpdateStateSummaries()([]MacOSSoftwareUpdateStateSummaryable) { + return m.updateStateSummaries +} +// GetUserId gets the userId property value. The user ID. +func (m *MacOSSoftwareUpdateCategorySummary) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateCategorySummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUpdateCount", m.GetFailedUpdateCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successfulUpdateCount", m.GetSuccessfulUpdateCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUpdateCount", m.GetTotalUpdateCount()) + if err != nil { + return err + } + } + if m.GetUpdateCategory() != nil { + cast := (*m.GetUpdateCategory()).String() + err = writer.WriteStringValue("updateCategory", &cast) + if err != nil { + return err + } + } + if m.GetUpdateStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUpdateStateSummaries())) + for i, v := range m.GetUpdateStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("updateStateSummaries", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceId sets the deviceId property value. The device ID. +func (m *MacOSSoftwareUpdateCategorySummary) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDisplayName sets the displayName property value. The name of the report +func (m *MacOSSoftwareUpdateCategorySummary) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFailedUpdateCount sets the failedUpdateCount property value. Number of failed updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) SetFailedUpdateCount(value *int32)() { + m.failedUpdateCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Last date time the report for this device was updated. +func (m *MacOSSoftwareUpdateCategorySummary) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetSuccessfulUpdateCount sets the successfulUpdateCount property value. Number of successful updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) SetSuccessfulUpdateCount(value *int32)() { + m.successfulUpdateCount = value +} +// SetTotalUpdateCount sets the totalUpdateCount property value. Number of total updates on the device +func (m *MacOSSoftwareUpdateCategorySummary) SetTotalUpdateCount(value *int32)() { + m.totalUpdateCount = value +} +// SetUpdateCategory sets the updateCategory property value. MacOS Software Update Category +func (m *MacOSSoftwareUpdateCategorySummary) SetUpdateCategory(value *MacOSSoftwareUpdateCategory)() { + m.updateCategory = value +} +// SetUpdateStateSummaries sets the updateStateSummaries property value. Summary of the update states. +func (m *MacOSSoftwareUpdateCategorySummary) SetUpdateStateSummaries(value []MacOSSoftwareUpdateStateSummaryable)() { + m.updateStateSummaries = value +} +// SetUserId sets the userId property value. The user ID. +func (m *MacOSSoftwareUpdateCategorySummary) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_response.go new file mode 100644 index 000000000..5d37901c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateCategorySummaryCollectionResponse +type MacOSSoftwareUpdateCategorySummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSoftwareUpdateCategorySummaryable +} +// NewMacOSSoftwareUpdateCategorySummaryCollectionResponse instantiates a new MacOSSoftwareUpdateCategorySummaryCollectionResponse and sets the default values. +func NewMacOSSoftwareUpdateCategorySummaryCollectionResponse()(*MacOSSoftwareUpdateCategorySummaryCollectionResponse) { + m := &MacOSSoftwareUpdateCategorySummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSoftwareUpdateCategorySummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateCategorySummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateCategorySummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateCategorySummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateCategorySummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateCategorySummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateCategorySummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSoftwareUpdateCategorySummaryCollectionResponse) GetValue()([]MacOSSoftwareUpdateCategorySummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateCategorySummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSoftwareUpdateCategorySummaryCollectionResponse) SetValue(value []MacOSSoftwareUpdateCategorySummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_responseable.go new file mode 100644 index 000000000..07076861b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateCategorySummaryCollectionResponseable +type MacOSSoftwareUpdateCategorySummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSoftwareUpdateCategorySummaryable) + SetValue(value []MacOSSoftwareUpdateCategorySummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summaryable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summaryable.go new file mode 100644 index 000000000..fd6b12ebc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_category_summaryable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateCategorySummaryable +type MacOSSoftwareUpdateCategorySummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceId()(*string) + GetDisplayName()(*string) + GetFailedUpdateCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSuccessfulUpdateCount()(*int32) + GetTotalUpdateCount()(*int32) + GetUpdateCategory()(*MacOSSoftwareUpdateCategory) + GetUpdateStateSummaries()([]MacOSSoftwareUpdateStateSummaryable) + GetUserId()(*string) + SetDeviceId(value *string)() + SetDisplayName(value *string)() + SetFailedUpdateCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSuccessfulUpdateCount(value *int32)() + SetTotalUpdateCount(value *int32)() + SetUpdateCategory(value *MacOSSoftwareUpdateCategory)() + SetUpdateStateSummaries(value []MacOSSoftwareUpdateStateSummaryable)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration.go new file mode 100644 index 000000000..ac1191714 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration.go @@ -0,0 +1,231 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateConfiguration +type MacOSSoftwareUpdateConfiguration struct { + DeviceConfiguration + // Update behavior options for macOS software updates. + allOtherUpdateBehavior *MacOSSoftwareUpdateBehavior + // Update behavior options for macOS software updates. + configDataUpdateBehavior *MacOSSoftwareUpdateBehavior + // Update behavior options for macOS software updates. + criticalUpdateBehavior *MacOSSoftwareUpdateBehavior + // Custom Time windows when updates will be allowed or blocked. This collection can contain a maximum of 20 elements. + customUpdateTimeWindows []CustomUpdateTimeWindowable + // Update behavior options for macOS software updates. + firmwareUpdateBehavior *MacOSSoftwareUpdateBehavior + // Update schedule type for macOS software updates. + updateScheduleType *MacOSSoftwareUpdateScheduleType + // Minutes indicating UTC offset for each update time window + updateTimeWindowUtcOffsetInMinutes *int32 +} +// NewMacOSSoftwareUpdateConfiguration instantiates a new MacOSSoftwareUpdateConfiguration and sets the default values. +func NewMacOSSoftwareUpdateConfiguration()(*MacOSSoftwareUpdateConfiguration) { + m := &MacOSSoftwareUpdateConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSSoftwareUpdateConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSSoftwareUpdateConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateConfiguration(), nil +} +// GetAllOtherUpdateBehavior gets the allOtherUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) GetAllOtherUpdateBehavior()(*MacOSSoftwareUpdateBehavior) { + return m.allOtherUpdateBehavior +} +// GetConfigDataUpdateBehavior gets the configDataUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) GetConfigDataUpdateBehavior()(*MacOSSoftwareUpdateBehavior) { + return m.configDataUpdateBehavior +} +// GetCriticalUpdateBehavior gets the criticalUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) GetCriticalUpdateBehavior()(*MacOSSoftwareUpdateBehavior) { + return m.criticalUpdateBehavior +} +// GetCustomUpdateTimeWindows gets the customUpdateTimeWindows property value. Custom Time windows when updates will be allowed or blocked. This collection can contain a maximum of 20 elements. +func (m *MacOSSoftwareUpdateConfiguration) GetCustomUpdateTimeWindows()([]CustomUpdateTimeWindowable) { + return m.customUpdateTimeWindows +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["allOtherUpdateBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateBehavior) + if err != nil { + return err + } + if val != nil { + m.SetAllOtherUpdateBehavior(val.(*MacOSSoftwareUpdateBehavior)) + } + return nil + } + res["configDataUpdateBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateBehavior) + if err != nil { + return err + } + if val != nil { + m.SetConfigDataUpdateBehavior(val.(*MacOSSoftwareUpdateBehavior)) + } + return nil + } + res["criticalUpdateBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateBehavior) + if err != nil { + return err + } + if val != nil { + m.SetCriticalUpdateBehavior(val.(*MacOSSoftwareUpdateBehavior)) + } + return nil + } + res["customUpdateTimeWindows"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomUpdateTimeWindowFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomUpdateTimeWindowable, len(val)) + for i, v := range val { + res[i] = v.(CustomUpdateTimeWindowable) + } + m.SetCustomUpdateTimeWindows(res) + } + return nil + } + res["firmwareUpdateBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateBehavior) + if err != nil { + return err + } + if val != nil { + m.SetFirmwareUpdateBehavior(val.(*MacOSSoftwareUpdateBehavior)) + } + return nil + } + res["updateScheduleType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateScheduleType) + if err != nil { + return err + } + if val != nil { + m.SetUpdateScheduleType(val.(*MacOSSoftwareUpdateScheduleType)) + } + return nil + } + res["updateTimeWindowUtcOffsetInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUpdateTimeWindowUtcOffsetInMinutes(val) + } + return nil + } + return res +} +// GetFirmwareUpdateBehavior gets the firmwareUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) GetFirmwareUpdateBehavior()(*MacOSSoftwareUpdateBehavior) { + return m.firmwareUpdateBehavior +} +// GetUpdateScheduleType gets the updateScheduleType property value. Update schedule type for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) GetUpdateScheduleType()(*MacOSSoftwareUpdateScheduleType) { + return m.updateScheduleType +} +// GetUpdateTimeWindowUtcOffsetInMinutes gets the updateTimeWindowUtcOffsetInMinutes property value. Minutes indicating UTC offset for each update time window +func (m *MacOSSoftwareUpdateConfiguration) GetUpdateTimeWindowUtcOffsetInMinutes()(*int32) { + return m.updateTimeWindowUtcOffsetInMinutes +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAllOtherUpdateBehavior() != nil { + cast := (*m.GetAllOtherUpdateBehavior()).String() + err = writer.WriteStringValue("allOtherUpdateBehavior", &cast) + if err != nil { + return err + } + } + if m.GetConfigDataUpdateBehavior() != nil { + cast := (*m.GetConfigDataUpdateBehavior()).String() + err = writer.WriteStringValue("configDataUpdateBehavior", &cast) + if err != nil { + return err + } + } + if m.GetCriticalUpdateBehavior() != nil { + cast := (*m.GetCriticalUpdateBehavior()).String() + err = writer.WriteStringValue("criticalUpdateBehavior", &cast) + if err != nil { + return err + } + } + if m.GetCustomUpdateTimeWindows() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomUpdateTimeWindows())) + for i, v := range m.GetCustomUpdateTimeWindows() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customUpdateTimeWindows", cast) + if err != nil { + return err + } + } + if m.GetFirmwareUpdateBehavior() != nil { + cast := (*m.GetFirmwareUpdateBehavior()).String() + err = writer.WriteStringValue("firmwareUpdateBehavior", &cast) + if err != nil { + return err + } + } + if m.GetUpdateScheduleType() != nil { + cast := (*m.GetUpdateScheduleType()).String() + err = writer.WriteStringValue("updateScheduleType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("updateTimeWindowUtcOffsetInMinutes", m.GetUpdateTimeWindowUtcOffsetInMinutes()) + if err != nil { + return err + } + } + return nil +} +// SetAllOtherUpdateBehavior sets the allOtherUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) SetAllOtherUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() { + m.allOtherUpdateBehavior = value +} +// SetConfigDataUpdateBehavior sets the configDataUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) SetConfigDataUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() { + m.configDataUpdateBehavior = value +} +// SetCriticalUpdateBehavior sets the criticalUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) SetCriticalUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() { + m.criticalUpdateBehavior = value +} +// SetCustomUpdateTimeWindows sets the customUpdateTimeWindows property value. Custom Time windows when updates will be allowed or blocked. This collection can contain a maximum of 20 elements. +func (m *MacOSSoftwareUpdateConfiguration) SetCustomUpdateTimeWindows(value []CustomUpdateTimeWindowable)() { + m.customUpdateTimeWindows = value +} +// SetFirmwareUpdateBehavior sets the firmwareUpdateBehavior property value. Update behavior options for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) SetFirmwareUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() { + m.firmwareUpdateBehavior = value +} +// SetUpdateScheduleType sets the updateScheduleType property value. Update schedule type for macOS software updates. +func (m *MacOSSoftwareUpdateConfiguration) SetUpdateScheduleType(value *MacOSSoftwareUpdateScheduleType)() { + m.updateScheduleType = value +} +// SetUpdateTimeWindowUtcOffsetInMinutes sets the updateTimeWindowUtcOffsetInMinutes property value. Minutes indicating UTC offset for each update time window +func (m *MacOSSoftwareUpdateConfiguration) SetUpdateTimeWindowUtcOffsetInMinutes(value *int32)() { + m.updateTimeWindowUtcOffsetInMinutes = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_response.go new file mode 100644 index 000000000..a457a4346 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateConfigurationCollectionResponse +type MacOSSoftwareUpdateConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSoftwareUpdateConfigurationable +} +// NewMacOSSoftwareUpdateConfigurationCollectionResponse instantiates a new MacOSSoftwareUpdateConfigurationCollectionResponse and sets the default values. +func NewMacOSSoftwareUpdateConfigurationCollectionResponse()(*MacOSSoftwareUpdateConfigurationCollectionResponse) { + m := &MacOSSoftwareUpdateConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSoftwareUpdateConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSoftwareUpdateConfigurationCollectionResponse) GetValue()([]MacOSSoftwareUpdateConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSoftwareUpdateConfigurationCollectionResponse) SetValue(value []MacOSSoftwareUpdateConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_responseable.go new file mode 100644 index 000000000..f23f336c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateConfigurationCollectionResponseable +type MacOSSoftwareUpdateConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSoftwareUpdateConfigurationable) + SetValue(value []MacOSSoftwareUpdateConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configurationable.go new file mode 100644 index 000000000..d85f97f50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_configurationable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateConfigurationable +type MacOSSoftwareUpdateConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllOtherUpdateBehavior()(*MacOSSoftwareUpdateBehavior) + GetConfigDataUpdateBehavior()(*MacOSSoftwareUpdateBehavior) + GetCriticalUpdateBehavior()(*MacOSSoftwareUpdateBehavior) + GetCustomUpdateTimeWindows()([]CustomUpdateTimeWindowable) + GetFirmwareUpdateBehavior()(*MacOSSoftwareUpdateBehavior) + GetUpdateScheduleType()(*MacOSSoftwareUpdateScheduleType) + GetUpdateTimeWindowUtcOffsetInMinutes()(*int32) + SetAllOtherUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() + SetConfigDataUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() + SetCriticalUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() + SetCustomUpdateTimeWindows(value []CustomUpdateTimeWindowable)() + SetFirmwareUpdateBehavior(value *MacOSSoftwareUpdateBehavior)() + SetUpdateScheduleType(value *MacOSSoftwareUpdateScheduleType)() + SetUpdateTimeWindowUtcOffsetInMinutes(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_delay_policy.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_delay_policy.go new file mode 100644 index 000000000..3d33a10d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_delay_policy.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSoftwareUpdateDelayPolicy int + +const ( + // Software update delays will not be enforced. + NONE_MACOSSOFTWAREUPDATEDELAYPOLICY MacOSSoftwareUpdateDelayPolicy = iota + // Force delays for OS software updates. + DELAYOSUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY + // Force delays for app software updates. + DELAYAPPUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY + // Sentinel member for cases where the client cannot handle the new enum values. + UNKNOWNFUTUREVALUE_MACOSSOFTWAREUPDATEDELAYPOLICY + // Force delays for major OS software updates. + DELAYMAJOROSUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY +) + +func (i MacOSSoftwareUpdateDelayPolicy) String() string { + return []string{"none", "delayOSUpdateVisibility", "delayAppUpdateVisibility", "unknownFutureValue", "delayMajorOsUpdateVisibility"}[i] +} +func ParseMacOSSoftwareUpdateDelayPolicy(v string) (interface{}, error) { + result := NONE_MACOSSOFTWAREUPDATEDELAYPOLICY + switch v { + case "none": + result = NONE_MACOSSOFTWAREUPDATEDELAYPOLICY + case "delayOSUpdateVisibility": + result = DELAYOSUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY + case "delayAppUpdateVisibility": + result = DELAYAPPUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MACOSSOFTWAREUPDATEDELAYPOLICY + case "delayMajorOsUpdateVisibility": + result = DELAYMAJOROSUPDATEVISIBILITY_MACOSSOFTWAREUPDATEDELAYPOLICY + default: + return 0, errors.New("Unknown MacOSSoftwareUpdateDelayPolicy value: " + v) + } + return &result, nil +} +func SerializeMacOSSoftwareUpdateDelayPolicy(values []MacOSSoftwareUpdateDelayPolicy) []string { + 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/mac_o_s_software_update_schedule_type.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_schedule_type.go new file mode 100644 index 000000000..ce401c562 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_schedule_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSoftwareUpdateScheduleType int + +const ( + // Always update. + ALWAYSUPDATE_MACOSSOFTWAREUPDATESCHEDULETYPE MacOSSoftwareUpdateScheduleType = iota + // Update during time windows. + UPDATEDURINGTIMEWINDOWS_MACOSSOFTWAREUPDATESCHEDULETYPE + // Update outside of time windows. + UPDATEOUTSIDEOFTIMEWINDOWS_MACOSSOFTWAREUPDATESCHEDULETYPE +) + +func (i MacOSSoftwareUpdateScheduleType) String() string { + return []string{"alwaysUpdate", "updateDuringTimeWindows", "updateOutsideOfTimeWindows"}[i] +} +func ParseMacOSSoftwareUpdateScheduleType(v string) (interface{}, error) { + result := ALWAYSUPDATE_MACOSSOFTWAREUPDATESCHEDULETYPE + switch v { + case "alwaysUpdate": + result = ALWAYSUPDATE_MACOSSOFTWAREUPDATESCHEDULETYPE + case "updateDuringTimeWindows": + result = UPDATEDURINGTIMEWINDOWS_MACOSSOFTWAREUPDATESCHEDULETYPE + case "updateOutsideOfTimeWindows": + result = UPDATEOUTSIDEOFTIMEWINDOWS_MACOSSOFTWAREUPDATESCHEDULETYPE + default: + return 0, errors.New("Unknown MacOSSoftwareUpdateScheduleType value: " + v) + } + return &result, nil +} +func SerializeMacOSSoftwareUpdateScheduleType(values []MacOSSoftwareUpdateScheduleType) []string { + 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/mac_o_s_software_update_state.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state.go new file mode 100644 index 000000000..c3d973f22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state.go @@ -0,0 +1,88 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSoftwareUpdateState int + +const ( + // The software update successfully installed + SUCCESS_MACOSSOFTWAREUPDATESTATE MacOSSoftwareUpdateState = iota + // The software update is being downloaded + DOWNLOADING_MACOSSOFTWAREUPDATESTATE + // The software update has been downloaded + DOWNLOADED_MACOSSOFTWAREUPDATESTATE + // The software update is being installed + INSTALLING_MACOSSOFTWAREUPDATESTATE + // No action is being taken on this software update + IDLE_MACOSSOFTWAREUPDATESTATE + // The software update is available on the device + AVAILABLE_MACOSSOFTWAREUPDATESTATE + // The software update has been scheduled on the device + SCHEDULED_MACOSSOFTWAREUPDATESTATE + // The software update download has failed + DOWNLOADFAILED_MACOSSOFTWAREUPDATESTATE + // There is not enough space to download the update + DOWNLOADINSUFFICIENTSPACE_MACOSSOFTWAREUPDATESTATE + // There is not enough power to download the update + DOWNLOADINSUFFICIENTPOWER_MACOSSOFTWAREUPDATESTATE + // There is insufficient network capacity to download the update + DOWNLOADINSUFFICIENTNETWORK_MACOSSOFTWAREUPDATESTATE + // There is not enough space to install the update + INSTALLINSUFFICIENTSPACE_MACOSSOFTWAREUPDATESTATE + // There is not enough power to install the update + INSTALLINSUFFICIENTPOWER_MACOSSOFTWAREUPDATESTATE + // Installation has failed for an unspecified reason + INSTALLFAILED_MACOSSOFTWAREUPDATESTATE + // The schedule update command has failed for an unspecified reason + COMMANDFAILED_MACOSSOFTWAREUPDATESTATE +) + +func (i MacOSSoftwareUpdateState) String() string { + return []string{"success", "downloading", "downloaded", "installing", "idle", "available", "scheduled", "downloadFailed", "downloadInsufficientSpace", "downloadInsufficientPower", "downloadInsufficientNetwork", "installInsufficientSpace", "installInsufficientPower", "installFailed", "commandFailed"}[i] +} +func ParseMacOSSoftwareUpdateState(v string) (interface{}, error) { + result := SUCCESS_MACOSSOFTWAREUPDATESTATE + switch v { + case "success": + result = SUCCESS_MACOSSOFTWAREUPDATESTATE + case "downloading": + result = DOWNLOADING_MACOSSOFTWAREUPDATESTATE + case "downloaded": + result = DOWNLOADED_MACOSSOFTWAREUPDATESTATE + case "installing": + result = INSTALLING_MACOSSOFTWAREUPDATESTATE + case "idle": + result = IDLE_MACOSSOFTWAREUPDATESTATE + case "available": + result = AVAILABLE_MACOSSOFTWAREUPDATESTATE + case "scheduled": + result = SCHEDULED_MACOSSOFTWAREUPDATESTATE + case "downloadFailed": + result = DOWNLOADFAILED_MACOSSOFTWAREUPDATESTATE + case "downloadInsufficientSpace": + result = DOWNLOADINSUFFICIENTSPACE_MACOSSOFTWAREUPDATESTATE + case "downloadInsufficientPower": + result = DOWNLOADINSUFFICIENTPOWER_MACOSSOFTWAREUPDATESTATE + case "downloadInsufficientNetwork": + result = DOWNLOADINSUFFICIENTNETWORK_MACOSSOFTWAREUPDATESTATE + case "installInsufficientSpace": + result = INSTALLINSUFFICIENTSPACE_MACOSSOFTWAREUPDATESTATE + case "installInsufficientPower": + result = INSTALLINSUFFICIENTPOWER_MACOSSOFTWAREUPDATESTATE + case "installFailed": + result = INSTALLFAILED_MACOSSOFTWAREUPDATESTATE + case "commandFailed": + result = COMMANDFAILED_MACOSSOFTWAREUPDATESTATE + default: + return 0, errors.New("Unknown MacOSSoftwareUpdateState value: " + v) + } + return &result, nil +} +func SerializeMacOSSoftwareUpdateState(values []MacOSSoftwareUpdateState) []string { + 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/mac_o_s_software_update_state_summary.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary.go new file mode 100644 index 000000000..3f447a254 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateStateSummary macOS software update state summary for a device and user +type MacOSSoftwareUpdateStateSummary struct { + Entity + // Human readable name of the software update + displayName *string + // Last date time the report for this device and product key was updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Product key of the software update. + productKey *string + // MacOS Software Update State + state *MacOSSoftwareUpdateState + // MacOS Software Update Category + updateCategory *MacOSSoftwareUpdateCategory + // Version of the software update + updateVersion *string +} +// NewMacOSSoftwareUpdateStateSummary instantiates a new macOSSoftwareUpdateStateSummary and sets the default values. +func NewMacOSSoftwareUpdateStateSummary()(*MacOSSoftwareUpdateStateSummary) { + m := &MacOSSoftwareUpdateStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateMacOSSoftwareUpdateStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateStateSummary(), nil +} +// GetDisplayName gets the displayName property value. Human readable name of the software update +func (m *MacOSSoftwareUpdateStateSummary) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["productKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProductKey(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*MacOSSoftwareUpdateState)) + } + return nil + } + res["updateCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSoftwareUpdateCategory) + if err != nil { + return err + } + if val != nil { + m.SetUpdateCategory(val.(*MacOSSoftwareUpdateCategory)) + } + return nil + } + res["updateVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdateVersion(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Last date time the report for this device and product key was updated. +func (m *MacOSSoftwareUpdateStateSummary) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetProductKey gets the productKey property value. Product key of the software update. +func (m *MacOSSoftwareUpdateStateSummary) GetProductKey()(*string) { + return m.productKey +} +// GetState gets the state property value. MacOS Software Update State +func (m *MacOSSoftwareUpdateStateSummary) GetState()(*MacOSSoftwareUpdateState) { + return m.state +} +// GetUpdateCategory gets the updateCategory property value. MacOS Software Update Category +func (m *MacOSSoftwareUpdateStateSummary) GetUpdateCategory()(*MacOSSoftwareUpdateCategory) { + return m.updateCategory +} +// GetUpdateVersion gets the updateVersion property value. Version of the software update +func (m *MacOSSoftwareUpdateStateSummary) GetUpdateVersion()(*string) { + return m.updateVersion +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("productKey", m.GetProductKey()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetUpdateCategory() != nil { + cast := (*m.GetUpdateCategory()).String() + err = writer.WriteStringValue("updateCategory", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("updateVersion", m.GetUpdateVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Human readable name of the software update +func (m *MacOSSoftwareUpdateStateSummary) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Last date time the report for this device and product key was updated. +func (m *MacOSSoftwareUpdateStateSummary) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetProductKey sets the productKey property value. Product key of the software update. +func (m *MacOSSoftwareUpdateStateSummary) SetProductKey(value *string)() { + m.productKey = value +} +// SetState sets the state property value. MacOS Software Update State +func (m *MacOSSoftwareUpdateStateSummary) SetState(value *MacOSSoftwareUpdateState)() { + m.state = value +} +// SetUpdateCategory sets the updateCategory property value. MacOS Software Update Category +func (m *MacOSSoftwareUpdateStateSummary) SetUpdateCategory(value *MacOSSoftwareUpdateCategory)() { + m.updateCategory = value +} +// SetUpdateVersion sets the updateVersion property value. Version of the software update +func (m *MacOSSoftwareUpdateStateSummary) SetUpdateVersion(value *string)() { + m.updateVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_response.go new file mode 100644 index 000000000..f2257c920 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateStateSummaryCollectionResponse +type MacOSSoftwareUpdateStateSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSoftwareUpdateStateSummaryable +} +// NewMacOSSoftwareUpdateStateSummaryCollectionResponse instantiates a new MacOSSoftwareUpdateStateSummaryCollectionResponse and sets the default values. +func NewMacOSSoftwareUpdateStateSummaryCollectionResponse()(*MacOSSoftwareUpdateStateSummaryCollectionResponse) { + m := &MacOSSoftwareUpdateStateSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSoftwareUpdateStateSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSoftwareUpdateStateSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSoftwareUpdateStateSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSoftwareUpdateStateSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSoftwareUpdateStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSoftwareUpdateStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSoftwareUpdateStateSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSoftwareUpdateStateSummaryCollectionResponse) GetValue()([]MacOSSoftwareUpdateStateSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSoftwareUpdateStateSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSoftwareUpdateStateSummaryCollectionResponse) SetValue(value []MacOSSoftwareUpdateStateSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_responseable.go new file mode 100644 index 000000000..df2f30313 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateStateSummaryCollectionResponseable +type MacOSSoftwareUpdateStateSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSoftwareUpdateStateSummaryable) + SetValue(value []MacOSSoftwareUpdateStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summaryable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summaryable.go new file mode 100644 index 000000000..2a95f7c17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_software_update_state_summaryable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSoftwareUpdateStateSummaryable +type MacOSSoftwareUpdateStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProductKey()(*string) + GetState()(*MacOSSoftwareUpdateState) + GetUpdateCategory()(*MacOSSoftwareUpdateCategory) + GetUpdateVersion()(*string) + SetDisplayName(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProductKey(value *string)() + SetState(value *MacOSSoftwareUpdateState)() + SetUpdateCategory(value *MacOSSoftwareUpdateCategory)() + SetUpdateVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension.go new file mode 100644 index 000000000..4591204ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtension represents a specific macOS system extension. +type MacOSSystemExtension struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Gets or sets the bundle identifier of the system extension. + bundleId *string + // The OdataType property + odataType *string + // Gets or sets the team identifier that was used to sign the system extension. + teamIdentifier *string +} +// NewMacOSSystemExtension instantiates a new macOSSystemExtension and sets the default values. +func NewMacOSSystemExtension()(*MacOSSystemExtension) { + m := &MacOSSystemExtension{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSSystemExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSystemExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSystemExtension(), 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 *MacOSSystemExtension) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBundleId gets the bundleId property value. Gets or sets the bundle identifier of the system extension. +func (m *MacOSSystemExtension) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSystemExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(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["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSSystemExtension) GetOdataType()(*string) { + return m.odataType +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team identifier that was used to sign the system extension. +func (m *MacOSSystemExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *MacOSSystemExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + 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 *MacOSSystemExtension) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBundleId sets the bundleId property value. Gets or sets the bundle identifier of the system extension. +func (m *MacOSSystemExtension) SetBundleId(value *string)() { + m.bundleId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSSystemExtension) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team identifier that was used to sign the system extension. +func (m *MacOSSystemExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_response.go new file mode 100644 index 000000000..4c9273095 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionCollectionResponse +type MacOSSystemExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSystemExtensionable +} +// NewMacOSSystemExtensionCollectionResponse instantiates a new MacOSSystemExtensionCollectionResponse and sets the default values. +func NewMacOSSystemExtensionCollectionResponse()(*MacOSSystemExtensionCollectionResponse) { + m := &MacOSSystemExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSystemExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSystemExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSystemExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSystemExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSystemExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSystemExtensionable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSystemExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSystemExtensionCollectionResponse) GetValue()([]MacOSSystemExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSystemExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSystemExtensionCollectionResponse) SetValue(value []MacOSSystemExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_responseable.go new file mode 100644 index 000000000..adb634bb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionCollectionResponseable +type MacOSSystemExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSystemExtensionable) + SetValue(value []MacOSSystemExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type.go new file mode 100644 index 000000000..678beeb6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MacOSSystemExtensionType int + +const ( + // Enables driver extensions. + DRIVEREXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE MacOSSystemExtensionType = iota + // Enables network extensions. + NETWORKEXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE + // Enables endpoint security extensions. + ENDPOINTSECURITYEXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE +) + +func (i MacOSSystemExtensionType) String() string { + return []string{"driverExtensionsAllowed", "networkExtensionsAllowed", "endpointSecurityExtensionsAllowed"}[i] +} +func ParseMacOSSystemExtensionType(v string) (interface{}, error) { + result := DRIVEREXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE + switch v { + case "driverExtensionsAllowed": + result = DRIVEREXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE + case "networkExtensionsAllowed": + result = NETWORKEXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE + case "endpointSecurityExtensionsAllowed": + result = ENDPOINTSECURITYEXTENSIONSALLOWED_MACOSSYSTEMEXTENSIONTYPE + default: + return 0, errors.New("Unknown MacOSSystemExtensionType value: " + v) + } + return &result, nil +} +func SerializeMacOSSystemExtensionType(values []MacOSSystemExtensionType) []string { + 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/mac_o_s_system_extension_type_mapping.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping.go new file mode 100644 index 000000000..59713d0a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionTypeMapping represents a mapping between team identifiers for macOS system extensions and system extension types. +type MacOSSystemExtensionTypeMapping struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Flag enum representing the allowed macOS system extension types. + allowedTypes *MacOSSystemExtensionType + // The OdataType property + odataType *string + // Gets or sets the team identifier used to sign the system extension. + teamIdentifier *string +} +// NewMacOSSystemExtensionTypeMapping instantiates a new macOSSystemExtensionTypeMapping and sets the default values. +func NewMacOSSystemExtensionTypeMapping()(*MacOSSystemExtensionTypeMapping) { + m := &MacOSSystemExtensionTypeMapping{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOSSystemExtensionTypeMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSystemExtensionTypeMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSystemExtensionTypeMapping(), 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 *MacOSSystemExtensionTypeMapping) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedTypes gets the allowedTypes property value. Flag enum representing the allowed macOS system extension types. +func (m *MacOSSystemExtensionTypeMapping) GetAllowedTypes()(*MacOSSystemExtensionType) { + return m.allowedTypes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSystemExtensionTypeMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMacOSSystemExtensionType) + if err != nil { + return err + } + if val != nil { + m.SetAllowedTypes(val.(*MacOSSystemExtensionType)) + } + 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["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOSSystemExtensionTypeMapping) GetOdataType()(*string) { + return m.odataType +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team identifier used to sign the system extension. +func (m *MacOSSystemExtensionTypeMapping) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// Serialize serializes information the current object +func (m *MacOSSystemExtensionTypeMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedTypes() != nil { + cast := (*m.GetAllowedTypes()).String() + err := writer.WriteStringValue("allowedTypes", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + 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 *MacOSSystemExtensionTypeMapping) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedTypes sets the allowedTypes property value. Flag enum representing the allowed macOS system extension types. +func (m *MacOSSystemExtensionTypeMapping) SetAllowedTypes(value *MacOSSystemExtensionType)() { + m.allowedTypes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOSSystemExtensionTypeMapping) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team identifier used to sign the system extension. +func (m *MacOSSystemExtensionTypeMapping) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_response.go new file mode 100644 index 000000000..485827208 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionTypeMappingCollectionResponse +type MacOSSystemExtensionTypeMappingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSSystemExtensionTypeMappingable +} +// NewMacOSSystemExtensionTypeMappingCollectionResponse instantiates a new MacOSSystemExtensionTypeMappingCollectionResponse and sets the default values. +func NewMacOSSystemExtensionTypeMappingCollectionResponse()(*MacOSSystemExtensionTypeMappingCollectionResponse) { + m := &MacOSSystemExtensionTypeMappingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSSystemExtensionTypeMappingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSSystemExtensionTypeMappingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSSystemExtensionTypeMappingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSSystemExtensionTypeMappingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSSystemExtensionTypeMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSSystemExtensionTypeMappingable, len(val)) + for i, v := range val { + res[i] = v.(MacOSSystemExtensionTypeMappingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSSystemExtensionTypeMappingCollectionResponse) GetValue()([]MacOSSystemExtensionTypeMappingable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSSystemExtensionTypeMappingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSSystemExtensionTypeMappingCollectionResponse) SetValue(value []MacOSSystemExtensionTypeMappingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_responseable.go new file mode 100644 index 000000000..3e6805b0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mapping_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionTypeMappingCollectionResponseable +type MacOSSystemExtensionTypeMappingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSSystemExtensionTypeMappingable) + SetValue(value []MacOSSystemExtensionTypeMappingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mappingable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mappingable.go new file mode 100644 index 000000000..159558e3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extension_type_mappingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionTypeMappingable +type MacOSSystemExtensionTypeMappingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedTypes()(*MacOSSystemExtensionType) + GetOdataType()(*string) + GetTeamIdentifier()(*string) + SetAllowedTypes(value *MacOSSystemExtensionType)() + SetOdataType(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_system_extensionable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extensionable.go new file mode 100644 index 000000000..a412fed64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_system_extensionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSSystemExtensionable +type MacOSSystemExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBundleId()(*string) + GetOdataType()(*string) + GetTeamIdentifier()(*string) + SetBundleId(value *string)() + SetOdataType(value *string)() + SetTeamIdentifier(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate.go b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate.go new file mode 100644 index 000000000..efc387666 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSTrustedRootCertificate +type MacOSTrustedRootCertificate struct { + DeviceConfiguration + // File name to display in UI. + certFileName *string + // Trusted Root Certificate. + trustedRootCertificate []byte +} +// NewMacOSTrustedRootCertificate instantiates a new macOSTrustedRootCertificate and sets the default values. +func NewMacOSTrustedRootCertificate()(*MacOSTrustedRootCertificate) { + m := &MacOSTrustedRootCertificate{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSTrustedRootCertificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSTrustedRootCertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSTrustedRootCertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSTrustedRootCertificate(), nil +} +// GetCertFileName gets the certFileName property value. File name to display in UI. +func (m *MacOSTrustedRootCertificate) GetCertFileName()(*string) { + return m.certFileName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSTrustedRootCertificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["certFileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertFileName(val) + } + return nil + } + res["trustedRootCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetTrustedRootCertificate(val) + } + return nil + } + return res +} +// GetTrustedRootCertificate gets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *MacOSTrustedRootCertificate) GetTrustedRootCertificate()([]byte) { + return m.trustedRootCertificate +} +// Serialize serializes information the current object +func (m *MacOSTrustedRootCertificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certFileName", m.GetCertFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("trustedRootCertificate", m.GetTrustedRootCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetCertFileName sets the certFileName property value. File name to display in UI. +func (m *MacOSTrustedRootCertificate) SetCertFileName(value *string)() { + m.certFileName = value +} +// SetTrustedRootCertificate sets the trustedRootCertificate property value. Trusted Root Certificate. +func (m *MacOSTrustedRootCertificate) SetTrustedRootCertificate(value []byte)() { + m.trustedRootCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_response.go new file mode 100644 index 000000000..3f492669f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSTrustedRootCertificateCollectionResponse +type MacOSTrustedRootCertificateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSTrustedRootCertificateable +} +// NewMacOSTrustedRootCertificateCollectionResponse instantiates a new MacOSTrustedRootCertificateCollectionResponse and sets the default values. +func NewMacOSTrustedRootCertificateCollectionResponse()(*MacOSTrustedRootCertificateCollectionResponse) { + m := &MacOSTrustedRootCertificateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSTrustedRootCertificateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSTrustedRootCertificateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSTrustedRootCertificateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSTrustedRootCertificateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSTrustedRootCertificateable, len(val)) + for i, v := range val { + res[i] = v.(MacOSTrustedRootCertificateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSTrustedRootCertificateCollectionResponse) GetValue()([]MacOSTrustedRootCertificateable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSTrustedRootCertificateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSTrustedRootCertificateCollectionResponse) SetValue(value []MacOSTrustedRootCertificateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_responseable.go new file mode 100644 index 000000000..72e892ae6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificate_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSTrustedRootCertificateCollectionResponseable +type MacOSTrustedRootCertificateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSTrustedRootCertificateable) + SetValue(value []MacOSTrustedRootCertificateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificateable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificateable.go new file mode 100644 index 000000000..8e8000acd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_trusted_root_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSTrustedRootCertificateable +type MacOSTrustedRootCertificateable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertFileName()(*string) + GetTrustedRootCertificate()([]byte) + SetCertFileName(value *string)() + SetTrustedRootCertificate(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration.go new file mode 100644 index 000000000..21817eacd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSVpnConfiguration +type MacOSVpnConfiguration struct { + AppleVpnConfiguration + // Identity certificate for client authentication when authentication method is certificate. + identityCertificate MacOSCertificateProfileBaseable +} +// NewMacOSVpnConfiguration instantiates a new MacOSVpnConfiguration and sets the default values. +func NewMacOSVpnConfiguration()(*MacOSVpnConfiguration) { + m := &MacOSVpnConfiguration{ + AppleVpnConfiguration: *NewAppleVpnConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSVpnConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSVpnConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSVpnConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSVpnConfiguration(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSVpnConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AppleVpnConfiguration.GetFieldDeserializers() + res["identityCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificate(val.(MacOSCertificateProfileBaseable)) + } + return nil + } + return res +} +// GetIdentityCertificate gets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *MacOSVpnConfiguration) GetIdentityCertificate()(MacOSCertificateProfileBaseable) { + return m.identityCertificate +} +// Serialize serializes information the current object +func (m *MacOSVpnConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AppleVpnConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("identityCertificate", m.GetIdentityCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetIdentityCertificate sets the identityCertificate property value. Identity certificate for client authentication when authentication method is certificate. +func (m *MacOSVpnConfiguration) SetIdentityCertificate(value MacOSCertificateProfileBaseable)() { + m.identityCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_response.go new file mode 100644 index 000000000..84a4237d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSVpnConfigurationCollectionResponse +type MacOSVpnConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSVpnConfigurationable +} +// NewMacOSVpnConfigurationCollectionResponse instantiates a new MacOSVpnConfigurationCollectionResponse and sets the default values. +func NewMacOSVpnConfigurationCollectionResponse()(*MacOSVpnConfigurationCollectionResponse) { + m := &MacOSVpnConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSVpnConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSVpnConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSVpnConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSVpnConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSVpnConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSVpnConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSVpnConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSVpnConfigurationCollectionResponse) GetValue()([]MacOSVpnConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSVpnConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSVpnConfigurationCollectionResponse) SetValue(value []MacOSVpnConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_responseable.go new file mode 100644 index 000000000..c39da451c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSVpnConfigurationCollectionResponseable +type MacOSVpnConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSVpnConfigurationable) + SetValue(value []MacOSVpnConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configurationable.go new file mode 100644 index 000000000..224379e61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_vpn_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSVpnConfigurationable +type MacOSVpnConfigurationable interface { + AppleVpnConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityCertificate()(MacOSCertificateProfileBaseable) + SetIdentityCertificate(value MacOSCertificateProfileBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration.go new file mode 100644 index 000000000..a22eacc46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration.go @@ -0,0 +1,316 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiFiConfiguration +type MacOSWiFiConfiguration struct { + DeviceConfiguration + // Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. + connectAutomatically *bool + // Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. + connectWhenNetworkNameIsHidden *bool + // Network Name + networkName *string + // This is the pre-shared key for WPA Personal Wi-Fi network. + preSharedKey *string + // URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. + proxyAutomaticConfigurationUrl *string + // IP Address or DNS hostname of the proxy server when manual configuration is selected. + proxyManualAddress *string + // Port of the proxy server when manual configuration is selected. + proxyManualPort *int32 + // Wi-Fi Proxy Settings. + proxySettings *WiFiProxySetting + // This is the name of the Wi-Fi network that is broadcast to all devices. + ssid *string + // Wi-Fi Security Types. + wiFiSecurityType *WiFiSecurityType +} +// NewMacOSWiFiConfiguration instantiates a new MacOSWiFiConfiguration and sets the default values. +func NewMacOSWiFiConfiguration()(*MacOSWiFiConfiguration) { + m := &MacOSWiFiConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSWiFiConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSWiFiConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSWiFiConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.macOSEnterpriseWiFiConfiguration": + return NewMacOSEnterpriseWiFiConfiguration(), nil + } + } + } + } + return NewMacOSWiFiConfiguration(), nil +} +// GetConnectAutomatically gets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *MacOSWiFiConfiguration) GetConnectAutomatically()(*bool) { + return m.connectAutomatically +} +// GetConnectWhenNetworkNameIsHidden gets the connectWhenNetworkNameIsHidden property value. Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *MacOSWiFiConfiguration) GetConnectWhenNetworkNameIsHidden()(*bool) { + return m.connectWhenNetworkNameIsHidden +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSWiFiConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["connectAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectAutomatically(val) + } + return nil + } + res["connectWhenNetworkNameIsHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectWhenNetworkNameIsHidden(val) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["preSharedKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreSharedKey(val) + } + return nil + } + res["proxyAutomaticConfigurationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyAutomaticConfigurationUrl(val) + } + return nil + } + res["proxyManualAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualAddress(val) + } + return nil + } + res["proxyManualPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProxyManualPort(val) + } + return nil + } + res["proxySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiProxySetting) + if err != nil { + return err + } + if val != nil { + m.SetProxySettings(val.(*WiFiProxySetting)) + } + return nil + } + res["ssid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSsid(val) + } + return nil + } + res["wiFiSecurityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiSecurityType) + if err != nil { + return err + } + if val != nil { + m.SetWiFiSecurityType(val.(*WiFiSecurityType)) + } + return nil + } + return res +} +// GetNetworkName gets the networkName property value. Network Name +func (m *MacOSWiFiConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetPreSharedKey gets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *MacOSWiFiConfiguration) GetPreSharedKey()(*string) { + return m.preSharedKey +} +// GetProxyAutomaticConfigurationUrl gets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *MacOSWiFiConfiguration) GetProxyAutomaticConfigurationUrl()(*string) { + return m.proxyAutomaticConfigurationUrl +} +// GetProxyManualAddress gets the proxyManualAddress property value. IP Address or DNS hostname of the proxy server when manual configuration is selected. +func (m *MacOSWiFiConfiguration) GetProxyManualAddress()(*string) { + return m.proxyManualAddress +} +// GetProxyManualPort gets the proxyManualPort property value. Port of the proxy server when manual configuration is selected. +func (m *MacOSWiFiConfiguration) GetProxyManualPort()(*int32) { + return m.proxyManualPort +} +// GetProxySettings gets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *MacOSWiFiConfiguration) GetProxySettings()(*WiFiProxySetting) { + return m.proxySettings +} +// GetSsid gets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *MacOSWiFiConfiguration) GetSsid()(*string) { + return m.ssid +} +// GetWiFiSecurityType gets the wiFiSecurityType property value. Wi-Fi Security Types. +func (m *MacOSWiFiConfiguration) GetWiFiSecurityType()(*WiFiSecurityType) { + return m.wiFiSecurityType +} +// Serialize serializes information the current object +func (m *MacOSWiFiConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("connectAutomatically", m.GetConnectAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("connectWhenNetworkNameIsHidden", m.GetConnectWhenNetworkNameIsHidden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preSharedKey", m.GetPreSharedKey()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyAutomaticConfigurationUrl", m.GetProxyAutomaticConfigurationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("proxyManualAddress", m.GetProxyManualAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("proxyManualPort", m.GetProxyManualPort()) + if err != nil { + return err + } + } + if m.GetProxySettings() != nil { + cast := (*m.GetProxySettings()).String() + err = writer.WriteStringValue("proxySettings", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ssid", m.GetSsid()) + if err != nil { + return err + } + } + if m.GetWiFiSecurityType() != nil { + cast := (*m.GetWiFiSecurityType()).String() + err = writer.WriteStringValue("wiFiSecurityType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectAutomatically sets the connectAutomatically property value. Connect automatically when this network is in range. Setting this to true will skip the user prompt and automatically connect the device to Wi-Fi network. +func (m *MacOSWiFiConfiguration) SetConnectAutomatically(value *bool)() { + m.connectAutomatically = value +} +// SetConnectWhenNetworkNameIsHidden sets the connectWhenNetworkNameIsHidden property value. Connect when the network is not broadcasting its name (SSID). When set to true, this profile forces the device to connect to a network that doesn't broadcast its SSID to all devices. +func (m *MacOSWiFiConfiguration) SetConnectWhenNetworkNameIsHidden(value *bool)() { + m.connectWhenNetworkNameIsHidden = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *MacOSWiFiConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetPreSharedKey sets the preSharedKey property value. This is the pre-shared key for WPA Personal Wi-Fi network. +func (m *MacOSWiFiConfiguration) SetPreSharedKey(value *string)() { + m.preSharedKey = value +} +// SetProxyAutomaticConfigurationUrl sets the proxyAutomaticConfigurationUrl property value. URL of the proxy server automatic configuration script when automatic configuration is selected. This URL is typically the location of PAC (Proxy Auto Configuration) file. +func (m *MacOSWiFiConfiguration) SetProxyAutomaticConfigurationUrl(value *string)() { + m.proxyAutomaticConfigurationUrl = value +} +// SetProxyManualAddress sets the proxyManualAddress property value. IP Address or DNS hostname of the proxy server when manual configuration is selected. +func (m *MacOSWiFiConfiguration) SetProxyManualAddress(value *string)() { + m.proxyManualAddress = value +} +// SetProxyManualPort sets the proxyManualPort property value. Port of the proxy server when manual configuration is selected. +func (m *MacOSWiFiConfiguration) SetProxyManualPort(value *int32)() { + m.proxyManualPort = value +} +// SetProxySettings sets the proxySettings property value. Wi-Fi Proxy Settings. +func (m *MacOSWiFiConfiguration) SetProxySettings(value *WiFiProxySetting)() { + m.proxySettings = value +} +// SetSsid sets the ssid property value. This is the name of the Wi-Fi network that is broadcast to all devices. +func (m *MacOSWiFiConfiguration) SetSsid(value *string)() { + m.ssid = value +} +// SetWiFiSecurityType sets the wiFiSecurityType property value. Wi-Fi Security Types. +func (m *MacOSWiFiConfiguration) SetWiFiSecurityType(value *WiFiSecurityType)() { + m.wiFiSecurityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_response.go new file mode 100644 index 000000000..41f392d2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiFiConfigurationCollectionResponse +type MacOSWiFiConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSWiFiConfigurationable +} +// NewMacOSWiFiConfigurationCollectionResponse instantiates a new MacOSWiFiConfigurationCollectionResponse and sets the default values. +func NewMacOSWiFiConfigurationCollectionResponse()(*MacOSWiFiConfigurationCollectionResponse) { + m := &MacOSWiFiConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSWiFiConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSWiFiConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSWiFiConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSWiFiConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSWiFiConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSWiFiConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSWiFiConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSWiFiConfigurationCollectionResponse) GetValue()([]MacOSWiFiConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSWiFiConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSWiFiConfigurationCollectionResponse) SetValue(value []MacOSWiFiConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_responseable.go new file mode 100644 index 000000000..e9d62ded3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiFiConfigurationCollectionResponseable +type MacOSWiFiConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSWiFiConfigurationable) + SetValue(value []MacOSWiFiConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configurationable.go new file mode 100644 index 000000000..d00fc0618 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wi_fi_configurationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiFiConfigurationable +type MacOSWiFiConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectAutomatically()(*bool) + GetConnectWhenNetworkNameIsHidden()(*bool) + GetNetworkName()(*string) + GetPreSharedKey()(*string) + GetProxyAutomaticConfigurationUrl()(*string) + GetProxyManualAddress()(*string) + GetProxyManualPort()(*int32) + GetProxySettings()(*WiFiProxySetting) + GetSsid()(*string) + GetWiFiSecurityType()(*WiFiSecurityType) + SetConnectAutomatically(value *bool)() + SetConnectWhenNetworkNameIsHidden(value *bool)() + SetNetworkName(value *string)() + SetPreSharedKey(value *string)() + SetProxyAutomaticConfigurationUrl(value *string)() + SetProxyManualAddress(value *string)() + SetProxyManualPort(value *int32)() + SetProxySettings(value *WiFiProxySetting)() + SetSsid(value *string)() + SetWiFiSecurityType(value *WiFiSecurityType)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration.go new file mode 100644 index 000000000..433c173c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration.go @@ -0,0 +1,305 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiredNetworkConfiguration +type MacOSWiredNetworkConfiguration struct { + DeviceConfiguration + // Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. + authenticationMethod *WiFiAuthenticationMethod + // EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. + eapFastConfiguration *EapFastConfiguration + // Extensible Authentication Protocol (EAP) configuration types. + eapType *EapType + // Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this wired network using their real username is displayed as 'anonymous'. + enableOuterIdentityPrivacy *string + // Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). + identityCertificateForClientAuthentication MacOSCertificateProfileBaseable + // Apple network interface type. + networkInterface *WiredNetworkInterface + // Network Name + networkName *string + // Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. + nonEapAuthenticationMethodForEapTtls *NonEapAuthenticationMethodForEapTtlsType + // Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. + rootCertificateForServerValidation MacOSTrustedRootCertificateable + // Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this wired network. + trustedServerCertificateNames []string +} +// NewMacOSWiredNetworkConfiguration instantiates a new MacOSWiredNetworkConfiguration and sets the default values. +func NewMacOSWiredNetworkConfiguration()(*MacOSWiredNetworkConfiguration) { + m := &MacOSWiredNetworkConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.macOSWiredNetworkConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOSWiredNetworkConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSWiredNetworkConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSWiredNetworkConfiguration(), nil +} +// GetAuthenticationMethod gets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *MacOSWiredNetworkConfiguration) GetAuthenticationMethod()(*WiFiAuthenticationMethod) { + return m.authenticationMethod +} +// GetEapFastConfiguration gets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *MacOSWiredNetworkConfiguration) GetEapFastConfiguration()(*EapFastConfiguration) { + return m.eapFastConfiguration +} +// GetEapType gets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *MacOSWiredNetworkConfiguration) GetEapType()(*EapType) { + return m.eapType +} +// GetEnableOuterIdentityPrivacy gets the enableOuterIdentityPrivacy property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this wired network using their real username is displayed as 'anonymous'. +func (m *MacOSWiredNetworkConfiguration) GetEnableOuterIdentityPrivacy()(*string) { + return m.enableOuterIdentityPrivacy +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSWiredNetworkConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["authenticationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiFiAuthenticationMethod) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethod(val.(*WiFiAuthenticationMethod)) + } + return nil + } + res["eapFastConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapFastConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetEapFastConfiguration(val.(*EapFastConfiguration)) + } + return nil + } + res["eapType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEapType) + if err != nil { + return err + } + if val != nil { + m.SetEapType(val.(*EapType)) + } + return nil + } + res["enableOuterIdentityPrivacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnableOuterIdentityPrivacy(val) + } + return nil + } + res["identityCertificateForClientAuthentication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSCertificateProfileBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentityCertificateForClientAuthentication(val.(MacOSCertificateProfileBaseable)) + } + return nil + } + res["networkInterface"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWiredNetworkInterface) + if err != nil { + return err + } + if val != nil { + m.SetNetworkInterface(val.(*WiredNetworkInterface)) + } + return nil + } + res["networkName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkName(val) + } + return nil + } + res["nonEapAuthenticationMethodForEapTtls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNonEapAuthenticationMethodForEapTtlsType) + if err != nil { + return err + } + if val != nil { + m.SetNonEapAuthenticationMethodForEapTtls(val.(*NonEapAuthenticationMethodForEapTtlsType)) + } + return nil + } + res["rootCertificateForServerValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMacOSTrustedRootCertificateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRootCertificateForServerValidation(val.(MacOSTrustedRootCertificateable)) + } + return nil + } + res["trustedServerCertificateNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTrustedServerCertificateNames(res) + } + return nil + } + return res +} +// GetIdentityCertificateForClientAuthentication gets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *MacOSWiredNetworkConfiguration) GetIdentityCertificateForClientAuthentication()(MacOSCertificateProfileBaseable) { + return m.identityCertificateForClientAuthentication +} +// GetNetworkInterface gets the networkInterface property value. Apple network interface type. +func (m *MacOSWiredNetworkConfiguration) GetNetworkInterface()(*WiredNetworkInterface) { + return m.networkInterface +} +// GetNetworkName gets the networkName property value. Network Name +func (m *MacOSWiredNetworkConfiguration) GetNetworkName()(*string) { + return m.networkName +} +// GetNonEapAuthenticationMethodForEapTtls gets the nonEapAuthenticationMethodForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *MacOSWiredNetworkConfiguration) GetNonEapAuthenticationMethodForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) { + return m.nonEapAuthenticationMethodForEapTtls +} +// GetRootCertificateForServerValidation gets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. +func (m *MacOSWiredNetworkConfiguration) GetRootCertificateForServerValidation()(MacOSTrustedRootCertificateable) { + return m.rootCertificateForServerValidation +} +// GetTrustedServerCertificateNames gets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this wired network. +func (m *MacOSWiredNetworkConfiguration) GetTrustedServerCertificateNames()([]string) { + return m.trustedServerCertificateNames +} +// Serialize serializes information the current object +func (m *MacOSWiredNetworkConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMethod() != nil { + cast := (*m.GetAuthenticationMethod()).String() + err = writer.WriteStringValue("authenticationMethod", &cast) + if err != nil { + return err + } + } + if m.GetEapFastConfiguration() != nil { + cast := (*m.GetEapFastConfiguration()).String() + err = writer.WriteStringValue("eapFastConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetEapType() != nil { + cast := (*m.GetEapType()).String() + err = writer.WriteStringValue("eapType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("enableOuterIdentityPrivacy", m.GetEnableOuterIdentityPrivacy()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("identityCertificateForClientAuthentication", m.GetIdentityCertificateForClientAuthentication()) + if err != nil { + return err + } + } + if m.GetNetworkInterface() != nil { + cast := (*m.GetNetworkInterface()).String() + err = writer.WriteStringValue("networkInterface", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkName", m.GetNetworkName()) + if err != nil { + return err + } + } + if m.GetNonEapAuthenticationMethodForEapTtls() != nil { + cast := (*m.GetNonEapAuthenticationMethodForEapTtls()).String() + err = writer.WriteStringValue("nonEapAuthenticationMethodForEapTtls", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("rootCertificateForServerValidation", m.GetRootCertificateForServerValidation()) + if err != nil { + return err + } + } + if m.GetTrustedServerCertificateNames() != nil { + err = writer.WriteCollectionOfStringValues("trustedServerCertificateNames", m.GetTrustedServerCertificateNames()) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMethod sets the authenticationMethod property value. Authentication Method when EAP Type is configured to PEAP or EAP-TTLS. Possible values are: certificate, usernameAndPassword, derivedCredential. +func (m *MacOSWiredNetworkConfiguration) SetAuthenticationMethod(value *WiFiAuthenticationMethod)() { + m.authenticationMethod = value +} +// SetEapFastConfiguration sets the eapFastConfiguration property value. EAP-FAST Configuration Option when EAP-FAST is the selected EAP Type. Possible values are: noProtectedAccessCredential, useProtectedAccessCredential, useProtectedAccessCredentialAndProvision, useProtectedAccessCredentialAndProvisionAnonymously. +func (m *MacOSWiredNetworkConfiguration) SetEapFastConfiguration(value *EapFastConfiguration)() { + m.eapFastConfiguration = value +} +// SetEapType sets the eapType property value. Extensible Authentication Protocol (EAP) configuration types. +func (m *MacOSWiredNetworkConfiguration) SetEapType(value *EapType)() { + m.eapType = value +} +// SetEnableOuterIdentityPrivacy sets the enableOuterIdentityPrivacy property value. Enable identity privacy (Outer Identity) when EAP Type is configured to EAP-TTLS, EAP-FAST or PEAP. This property masks usernames with the text you enter. For example, if you use 'anonymous', each user that authenticates with this wired network using their real username is displayed as 'anonymous'. +func (m *MacOSWiredNetworkConfiguration) SetEnableOuterIdentityPrivacy(value *string)() { + m.enableOuterIdentityPrivacy = value +} +// SetIdentityCertificateForClientAuthentication sets the identityCertificateForClientAuthentication property value. Identity Certificate for client authentication when EAP Type is configured to EAP-TLS, EAP-TTLS (with Certificate Authentication), or PEAP (with Certificate Authentication). +func (m *MacOSWiredNetworkConfiguration) SetIdentityCertificateForClientAuthentication(value MacOSCertificateProfileBaseable)() { + m.identityCertificateForClientAuthentication = value +} +// SetNetworkInterface sets the networkInterface property value. Apple network interface type. +func (m *MacOSWiredNetworkConfiguration) SetNetworkInterface(value *WiredNetworkInterface)() { + m.networkInterface = value +} +// SetNetworkName sets the networkName property value. Network Name +func (m *MacOSWiredNetworkConfiguration) SetNetworkName(value *string)() { + m.networkName = value +} +// SetNonEapAuthenticationMethodForEapTtls sets the nonEapAuthenticationMethodForEapTtls property value. Non-EAP Method for Authentication (Inner Identity) when EAP Type is EAP-TTLS and Authenticationmethod is Username and Password. Possible values are: unencryptedPassword, challengeHandshakeAuthenticationProtocol, microsoftChap, microsoftChapVersionTwo. +func (m *MacOSWiredNetworkConfiguration) SetNonEapAuthenticationMethodForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() { + m.nonEapAuthenticationMethodForEapTtls = value +} +// SetRootCertificateForServerValidation sets the rootCertificateForServerValidation property value. Trusted Root Certificate for Server Validation when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. +func (m *MacOSWiredNetworkConfiguration) SetRootCertificateForServerValidation(value MacOSTrustedRootCertificateable)() { + m.rootCertificateForServerValidation = value +} +// SetTrustedServerCertificateNames sets the trustedServerCertificateNames property value. Trusted server certificate names when EAP Type is configured to EAP-TLS/TTLS/FAST or PEAP. This is the common name used in the certificates issued by your trusted certificate authority (CA). If you provide this information, you can bypass the dynamic trust dialog that is displayed on end users devices when they connect to this wired network. +func (m *MacOSWiredNetworkConfiguration) SetTrustedServerCertificateNames(value []string)() { + m.trustedServerCertificateNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_response.go new file mode 100644 index 000000000..3584bd084 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiredNetworkConfigurationCollectionResponse +type MacOSWiredNetworkConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOSWiredNetworkConfigurationable +} +// NewMacOSWiredNetworkConfigurationCollectionResponse instantiates a new MacOSWiredNetworkConfigurationCollectionResponse and sets the default values. +func NewMacOSWiredNetworkConfigurationCollectionResponse()(*MacOSWiredNetworkConfigurationCollectionResponse) { + m := &MacOSWiredNetworkConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOSWiredNetworkConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOSWiredNetworkConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOSWiredNetworkConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOSWiredNetworkConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOSWiredNetworkConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOSWiredNetworkConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MacOSWiredNetworkConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOSWiredNetworkConfigurationCollectionResponse) GetValue()([]MacOSWiredNetworkConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOSWiredNetworkConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOSWiredNetworkConfigurationCollectionResponse) SetValue(value []MacOSWiredNetworkConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_responseable.go new file mode 100644 index 000000000..2219a78fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiredNetworkConfigurationCollectionResponseable +type MacOSWiredNetworkConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOSWiredNetworkConfigurationable) + SetValue(value []MacOSWiredNetworkConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configurationable.go b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configurationable.go new file mode 100644 index 000000000..d37ffd6f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_o_s_wired_network_configurationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOSWiredNetworkConfigurationable +type MacOSWiredNetworkConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethod()(*WiFiAuthenticationMethod) + GetEapFastConfiguration()(*EapFastConfiguration) + GetEapType()(*EapType) + GetEnableOuterIdentityPrivacy()(*string) + GetIdentityCertificateForClientAuthentication()(MacOSCertificateProfileBaseable) + GetNetworkInterface()(*WiredNetworkInterface) + GetNetworkName()(*string) + GetNonEapAuthenticationMethodForEapTtls()(*NonEapAuthenticationMethodForEapTtlsType) + GetRootCertificateForServerValidation()(MacOSTrustedRootCertificateable) + GetTrustedServerCertificateNames()([]string) + SetAuthenticationMethod(value *WiFiAuthenticationMethod)() + SetEapFastConfiguration(value *EapFastConfiguration)() + SetEapType(value *EapType)() + SetEnableOuterIdentityPrivacy(value *string)() + SetIdentityCertificateForClientAuthentication(value MacOSCertificateProfileBaseable)() + SetNetworkInterface(value *WiredNetworkInterface)() + SetNetworkName(value *string)() + SetNonEapAuthenticationMethodForEapTtls(value *NonEapAuthenticationMethodForEapTtlsType)() + SetRootCertificateForServerValidation(value MacOSTrustedRootCertificateable)() + SetTrustedServerCertificateNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settings.go new file mode 100644 index 000000000..02f0e7360 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settings.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsLobAppAssignmentSettings +type MacOsLobAppAssignmentSettings struct { + MobileAppAssignmentSettings + // Whether or not to uninstall the app when device is removed from Intune. + uninstallOnDeviceRemoval *bool +} +// NewMacOsLobAppAssignmentSettings instantiates a new MacOsLobAppAssignmentSettings and sets the default values. +func NewMacOsLobAppAssignmentSettings()(*MacOsLobAppAssignmentSettings) { + m := &MacOsLobAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.macOsLobAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOsLobAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsLobAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsLobAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsLobAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["uninstallOnDeviceRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUninstallOnDeviceRemoval(val) + } + return nil + } + return res +} +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *MacOsLobAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { + return m.uninstallOnDeviceRemoval +} +// Serialize serializes information the current object +func (m *MacOsLobAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("uninstallOnDeviceRemoval", m.GetUninstallOnDeviceRemoval()) + if err != nil { + return err + } + } + return nil +} +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *MacOsLobAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { + m.uninstallOnDeviceRemoval = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settingsable.go new file mode 100644 index 000000000..c1622d172 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_lob_app_assignment_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsLobAppAssignmentSettingsable +type MacOsLobAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUninstallOnDeviceRemoval()(*bool) + SetUninstallOnDeviceRemoval(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app.go new file mode 100644 index 000000000..1785ab7e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app.go @@ -0,0 +1,366 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppApp +type MacOsVppApp struct { + MobileApp + // The store URL. + appStoreUrl *string + // The licenses assigned to this app. + assignedLicenses []MacOsVppAppAssignedLicenseable + // The Identity Name. + bundleId *string + // The supported License Type. + licensingType VppLicensingTypeable + // The VPP application release date and time. + releaseDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Results of revoke license actions on this app. + revokeLicenseActionResults []MacOsVppAppRevokeLicensesActionResultable + // The total number of VPP licenses. + totalLicenseCount *int32 + // The number of VPP licenses in use. + usedLicenseCount *int32 + // Possible types of an Apple Volume Purchase Program token. + vppTokenAccountType *VppTokenAccountType + // The Apple Id associated with the given Apple Volume Purchase Program Token. + vppTokenAppleId *string + // Identifier of the VPP token associated with this app. + vppTokenId *string + // The organization associated with the Apple Volume Purchase Program Token + vppTokenOrganizationName *string +} +// NewMacOsVppApp instantiates a new MacOsVppApp and sets the default values. +func NewMacOsVppApp()(*MacOsVppApp) { + m := &MacOsVppApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.macOsVppApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOsVppAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppApp(), nil +} +// GetAppStoreUrl gets the appStoreUrl property value. The store URL. +func (m *MacOsVppApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetAssignedLicenses gets the assignedLicenses property value. The licenses assigned to this app. +func (m *MacOsVppApp) GetAssignedLicenses()([]MacOsVppAppAssignedLicenseable) { + return m.assignedLicenses +} +// GetBundleId gets the bundleId property value. The Identity Name. +func (m *MacOsVppApp) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["assignedLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOsVppAppAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOsVppAppAssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(MacOsVppAppAssignedLicenseable) + } + m.SetAssignedLicenses(res) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["licensingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVppLicensingTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicensingType(val.(VppLicensingTypeable)) + } + return nil + } + res["releaseDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReleaseDateTime(val) + } + return nil + } + res["revokeLicenseActionResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOsVppAppRevokeLicensesActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOsVppAppRevokeLicensesActionResultable, len(val)) + for i, v := range val { + res[i] = v.(MacOsVppAppRevokeLicensesActionResultable) + } + m.SetRevokeLicenseActionResults(res) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + res["vppTokenAccountType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVppTokenAccountType) + if err != nil { + return err + } + if val != nil { + m.SetVppTokenAccountType(val.(*VppTokenAccountType)) + } + return nil + } + res["vppTokenAppleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenAppleId(val) + } + return nil + } + res["vppTokenId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenId(val) + } + return nil + } + res["vppTokenOrganizationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVppTokenOrganizationName(val) + } + return nil + } + return res +} +// GetLicensingType gets the licensingType property value. The supported License Type. +func (m *MacOsVppApp) GetLicensingType()(VppLicensingTypeable) { + return m.licensingType +} +// GetReleaseDateTime gets the releaseDateTime property value. The VPP application release date and time. +func (m *MacOsVppApp) GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releaseDateTime +} +// GetRevokeLicenseActionResults gets the revokeLicenseActionResults property value. Results of revoke license actions on this app. +func (m *MacOsVppApp) GetRevokeLicenseActionResults()([]MacOsVppAppRevokeLicensesActionResultable) { + return m.revokeLicenseActionResults +} +// GetTotalLicenseCount gets the totalLicenseCount property value. The total number of VPP licenses. +func (m *MacOsVppApp) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *MacOsVppApp) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// GetVppTokenAccountType gets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. +func (m *MacOsVppApp) GetVppTokenAccountType()(*VppTokenAccountType) { + return m.vppTokenAccountType +} +// GetVppTokenAppleId gets the vppTokenAppleId property value. The Apple Id associated with the given Apple Volume Purchase Program Token. +func (m *MacOsVppApp) GetVppTokenAppleId()(*string) { + return m.vppTokenAppleId +} +// GetVppTokenId gets the vppTokenId property value. Identifier of the VPP token associated with this app. +func (m *MacOsVppApp) GetVppTokenId()(*string) { + return m.vppTokenId +} +// GetVppTokenOrganizationName gets the vppTokenOrganizationName property value. The organization associated with the Apple Volume Purchase Program Token +func (m *MacOsVppApp) GetVppTokenOrganizationName()(*string) { + return m.vppTokenOrganizationName +} +// Serialize serializes information the current object +func (m *MacOsVppApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + if m.GetAssignedLicenses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedLicenses())) + for i, v := range m.GetAssignedLicenses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedLicenses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("licensingType", m.GetLicensingType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("releaseDateTime", m.GetReleaseDateTime()) + if err != nil { + return err + } + } + if m.GetRevokeLicenseActionResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRevokeLicenseActionResults())) + for i, v := range m.GetRevokeLicenseActionResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("revokeLicenseActionResults", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + if m.GetVppTokenAccountType() != nil { + cast := (*m.GetVppTokenAccountType()).String() + err = writer.WriteStringValue("vppTokenAccountType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenAppleId", m.GetVppTokenAppleId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenId", m.GetVppTokenId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vppTokenOrganizationName", m.GetVppTokenOrganizationName()) + if err != nil { + return err + } + } + return nil +} +// SetAppStoreUrl sets the appStoreUrl property value. The store URL. +func (m *MacOsVppApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetAssignedLicenses sets the assignedLicenses property value. The licenses assigned to this app. +func (m *MacOsVppApp) SetAssignedLicenses(value []MacOsVppAppAssignedLicenseable)() { + m.assignedLicenses = value +} +// SetBundleId sets the bundleId property value. The Identity Name. +func (m *MacOsVppApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetLicensingType sets the licensingType property value. The supported License Type. +func (m *MacOsVppApp) SetLicensingType(value VppLicensingTypeable)() { + m.licensingType = value +} +// SetReleaseDateTime sets the releaseDateTime property value. The VPP application release date and time. +func (m *MacOsVppApp) SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releaseDateTime = value +} +// SetRevokeLicenseActionResults sets the revokeLicenseActionResults property value. Results of revoke license actions on this app. +func (m *MacOsVppApp) SetRevokeLicenseActionResults(value []MacOsVppAppRevokeLicensesActionResultable)() { + m.revokeLicenseActionResults = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. The total number of VPP licenses. +func (m *MacOsVppApp) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. The number of VPP licenses in use. +func (m *MacOsVppApp) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} +// SetVppTokenAccountType sets the vppTokenAccountType property value. Possible types of an Apple Volume Purchase Program token. +func (m *MacOsVppApp) SetVppTokenAccountType(value *VppTokenAccountType)() { + m.vppTokenAccountType = value +} +// SetVppTokenAppleId sets the vppTokenAppleId property value. The Apple Id associated with the given Apple Volume Purchase Program Token. +func (m *MacOsVppApp) SetVppTokenAppleId(value *string)() { + m.vppTokenAppleId = value +} +// SetVppTokenId sets the vppTokenId property value. Identifier of the VPP token associated with this app. +func (m *MacOsVppApp) SetVppTokenId(value *string)() { + m.vppTokenId = value +} +// SetVppTokenOrganizationName sets the vppTokenOrganizationName property value. The organization associated with the Apple Volume Purchase Program Token +func (m *MacOsVppApp) SetVppTokenOrganizationName(value *string)() { + m.vppTokenOrganizationName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license.go new file mode 100644 index 000000000..5f7cc97d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignedLicense macOS Volume Purchase Program license assignment. This class does not support Create, Delete, or Update. +type MacOsVppAppAssignedLicense struct { + Entity + // The user email address. + userEmailAddress *string + // The user ID. + userId *string + // The user name. + userName *string + // The user principal name. + userPrincipalName *string +} +// NewMacOsVppAppAssignedLicense instantiates a new macOsVppAppAssignedLicense and sets the default values. +func NewMacOsVppAppAssignedLicense()(*MacOsVppAppAssignedLicense) { + m := &MacOsVppAppAssignedLicense{ + Entity: *NewEntity(), + } + return m +} +// CreateMacOsVppAppAssignedLicenseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppAssignedLicenseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppAssignedLicense(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppAssignedLicense) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["userEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmailAddress(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserEmailAddress gets the userEmailAddress property value. The user email address. +func (m *MacOsVppAppAssignedLicense) GetUserEmailAddress()(*string) { + return m.userEmailAddress +} +// GetUserId gets the userId property value. The user ID. +func (m *MacOsVppAppAssignedLicense) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. The user name. +func (m *MacOsVppAppAssignedLicense) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name. +func (m *MacOsVppAppAssignedLicense) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *MacOsVppAppAssignedLicense) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userEmailAddress", m.GetUserEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetUserEmailAddress sets the userEmailAddress property value. The user email address. +func (m *MacOsVppAppAssignedLicense) SetUserEmailAddress(value *string)() { + m.userEmailAddress = value +} +// SetUserId sets the userId property value. The user ID. +func (m *MacOsVppAppAssignedLicense) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. The user name. +func (m *MacOsVppAppAssignedLicense) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name. +func (m *MacOsVppAppAssignedLicense) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_response.go new file mode 100644 index 000000000..6793e2901 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignedLicenseCollectionResponse +type MacOsVppAppAssignedLicenseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOsVppAppAssignedLicenseable +} +// NewMacOsVppAppAssignedLicenseCollectionResponse instantiates a new MacOsVppAppAssignedLicenseCollectionResponse and sets the default values. +func NewMacOsVppAppAssignedLicenseCollectionResponse()(*MacOsVppAppAssignedLicenseCollectionResponse) { + m := &MacOsVppAppAssignedLicenseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOsVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppAssignedLicenseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppAssignedLicenseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppAssignedLicenseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOsVppAppAssignedLicenseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOsVppAppAssignedLicenseable, len(val)) + for i, v := range val { + res[i] = v.(MacOsVppAppAssignedLicenseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOsVppAppAssignedLicenseCollectionResponse) GetValue()([]MacOsVppAppAssignedLicenseable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOsVppAppAssignedLicenseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOsVppAppAssignedLicenseCollectionResponse) SetValue(value []MacOsVppAppAssignedLicenseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_responseable.go new file mode 100644 index 000000000..e8cb96f02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_license_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignedLicenseCollectionResponseable +type MacOsVppAppAssignedLicenseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOsVppAppAssignedLicenseable) + SetValue(value []MacOsVppAppAssignedLicenseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_licenseable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_licenseable.go new file mode 100644 index 000000000..5225893de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assigned_licenseable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignedLicenseable +type MacOsVppAppAssignedLicenseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserEmailAddress()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetUserEmailAddress(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settings.go new file mode 100644 index 000000000..af4a1a486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settings.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignmentSettings +type MacOsVppAppAssignmentSettings struct { + MobileAppAssignmentSettings + // Whether or not to uninstall the app when device is removed from Intune. + uninstallOnDeviceRemoval *bool + // Whether or not to use device licensing. + useDeviceLicensing *bool +} +// NewMacOsVppAppAssignmentSettings instantiates a new MacOsVppAppAssignmentSettings and sets the default values. +func NewMacOsVppAppAssignmentSettings()(*MacOsVppAppAssignmentSettings) { + m := &MacOsVppAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.macOsVppAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMacOsVppAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["uninstallOnDeviceRemoval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUninstallOnDeviceRemoval(val) + } + return nil + } + res["useDeviceLicensing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseDeviceLicensing(val) + } + return nil + } + return res +} +// GetUninstallOnDeviceRemoval gets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *MacOsVppAppAssignmentSettings) GetUninstallOnDeviceRemoval()(*bool) { + return m.uninstallOnDeviceRemoval +} +// GetUseDeviceLicensing gets the useDeviceLicensing property value. Whether or not to use device licensing. +func (m *MacOsVppAppAssignmentSettings) GetUseDeviceLicensing()(*bool) { + return m.useDeviceLicensing +} +// Serialize serializes information the current object +func (m *MacOsVppAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("uninstallOnDeviceRemoval", m.GetUninstallOnDeviceRemoval()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useDeviceLicensing", m.GetUseDeviceLicensing()) + if err != nil { + return err + } + } + return nil +} +// SetUninstallOnDeviceRemoval sets the uninstallOnDeviceRemoval property value. Whether or not to uninstall the app when device is removed from Intune. +func (m *MacOsVppAppAssignmentSettings) SetUninstallOnDeviceRemoval(value *bool)() { + m.uninstallOnDeviceRemoval = value +} +// SetUseDeviceLicensing sets the useDeviceLicensing property value. Whether or not to use device licensing. +func (m *MacOsVppAppAssignmentSettings) SetUseDeviceLicensing(value *bool)() { + m.useDeviceLicensing = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settingsable.go new file mode 100644 index 000000000..d49a35cb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_assignment_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppAssignmentSettingsable +type MacOsVppAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUninstallOnDeviceRemoval()(*bool) + GetUseDeviceLicensing()(*bool) + SetUninstallOnDeviceRemoval(value *bool)() + SetUseDeviceLicensing(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_response.go new file mode 100644 index 000000000..6ffbd95c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppCollectionResponse +type MacOsVppAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOsVppAppable +} +// NewMacOsVppAppCollectionResponse instantiates a new MacOsVppAppCollectionResponse and sets the default values. +func NewMacOsVppAppCollectionResponse()(*MacOsVppAppCollectionResponse) { + m := &MacOsVppAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOsVppAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOsVppAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOsVppAppable, len(val)) + for i, v := range val { + res[i] = v.(MacOsVppAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOsVppAppCollectionResponse) GetValue()([]MacOsVppAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOsVppAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOsVppAppCollectionResponse) SetValue(value []MacOsVppAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_responseable.go new file mode 100644 index 000000000..ec6ab2948 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppCollectionResponseable +type MacOsVppAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOsVppAppable) + SetValue(value []MacOsVppAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result.go new file mode 100644 index 000000000..f92b63cf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result.go @@ -0,0 +1,308 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppRevokeLicensesActionResult defines results for actions on MacOS Vpp Apps, contains inherited properties for ActionResult. +type MacOsVppAppRevokeLicensesActionResult struct { + // Possible types of reasons for an Apple Volume Purchase Program token action failure. + actionFailureReason *VppTokenActionFailureReason + // Action name + actionName *string + // The actionState property + actionState *ActionState + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A count of the number of licenses for which revoke failed. + failedLicensesCount *int32 + // Time the action state was last updated + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DeviceId associated with the action. + managedDeviceId *string + // The OdataType property + odataType *string + // Time the action was initiated + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A count of the number of licenses for which revoke was attempted. + totalLicensesCount *int32 + // UserId associated with the action. + userId *string +} +// NewMacOsVppAppRevokeLicensesActionResult instantiates a new macOsVppAppRevokeLicensesActionResult and sets the default values. +func NewMacOsVppAppRevokeLicensesActionResult()(*MacOsVppAppRevokeLicensesActionResult) { + m := &MacOsVppAppRevokeLicensesActionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMacOsVppAppRevokeLicensesActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppRevokeLicensesActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppRevokeLicensesActionResult(), nil +} +// GetActionFailureReason gets the actionFailureReason property value. Possible types of reasons for an Apple Volume Purchase Program token action failure. +func (m *MacOsVppAppRevokeLicensesActionResult) GetActionFailureReason()(*VppTokenActionFailureReason) { + return m.actionFailureReason +} +// GetActionName gets the actionName property value. Action name +func (m *MacOsVppAppRevokeLicensesActionResult) GetActionName()(*string) { + return m.actionName +} +// GetActionState gets the actionState property value. The actionState property +func (m *MacOsVppAppRevokeLicensesActionResult) GetActionState()(*ActionState) { + return m.actionState +} +// 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 *MacOsVppAppRevokeLicensesActionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFailedLicensesCount gets the failedLicensesCount property value. A count of the number of licenses for which revoke failed. +func (m *MacOsVppAppRevokeLicensesActionResult) GetFailedLicensesCount()(*int32) { + return m.failedLicensesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppRevokeLicensesActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionFailureReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVppTokenActionFailureReason) + if err != nil { + return err + } + if val != nil { + m.SetActionFailureReason(val.(*VppTokenActionFailureReason)) + } + return nil + } + res["actionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionName(val) + } + return nil + } + res["actionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionState) + if err != nil { + return err + } + if val != nil { + m.SetActionState(val.(*ActionState)) + } + return nil + } + res["failedLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedLicensesCount(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["totalLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicensesCount(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *MacOsVppAppRevokeLicensesActionResult) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. DeviceId associated with the action. +func (m *MacOsVppAppRevokeLicensesActionResult) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MacOsVppAppRevokeLicensesActionResult) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. Time the action was initiated +func (m *MacOsVppAppRevokeLicensesActionResult) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetTotalLicensesCount gets the totalLicensesCount property value. A count of the number of licenses for which revoke was attempted. +func (m *MacOsVppAppRevokeLicensesActionResult) GetTotalLicensesCount()(*int32) { + return m.totalLicensesCount +} +// GetUserId gets the userId property value. UserId associated with the action. +func (m *MacOsVppAppRevokeLicensesActionResult) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *MacOsVppAppRevokeLicensesActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActionFailureReason() != nil { + cast := (*m.GetActionFailureReason()).String() + err := writer.WriteStringValue("actionFailureReason", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("actionName", m.GetActionName()) + if err != nil { + return err + } + } + if m.GetActionState() != nil { + cast := (*m.GetActionState()).String() + err := writer.WriteStringValue("actionState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("failedLicensesCount", m.GetFailedLicensesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("totalLicensesCount", m.GetTotalLicensesCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionFailureReason sets the actionFailureReason property value. Possible types of reasons for an Apple Volume Purchase Program token action failure. +func (m *MacOsVppAppRevokeLicensesActionResult) SetActionFailureReason(value *VppTokenActionFailureReason)() { + m.actionFailureReason = value +} +// SetActionName sets the actionName property value. Action name +func (m *MacOsVppAppRevokeLicensesActionResult) SetActionName(value *string)() { + m.actionName = value +} +// SetActionState sets the actionState property value. The actionState property +func (m *MacOsVppAppRevokeLicensesActionResult) SetActionState(value *ActionState)() { + m.actionState = value +} +// 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 *MacOsVppAppRevokeLicensesActionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFailedLicensesCount sets the failedLicensesCount property value. A count of the number of licenses for which revoke failed. +func (m *MacOsVppAppRevokeLicensesActionResult) SetFailedLicensesCount(value *int32)() { + m.failedLicensesCount = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Time the action state was last updated +func (m *MacOsVppAppRevokeLicensesActionResult) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. DeviceId associated with the action. +func (m *MacOsVppAppRevokeLicensesActionResult) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MacOsVppAppRevokeLicensesActionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. Time the action was initiated +func (m *MacOsVppAppRevokeLicensesActionResult) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetTotalLicensesCount sets the totalLicensesCount property value. A count of the number of licenses for which revoke was attempted. +func (m *MacOsVppAppRevokeLicensesActionResult) SetTotalLicensesCount(value *int32)() { + m.totalLicensesCount = value +} +// SetUserId sets the userId property value. UserId associated with the action. +func (m *MacOsVppAppRevokeLicensesActionResult) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_response.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_response.go new file mode 100644 index 000000000..1ff08d7a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppRevokeLicensesActionResultCollectionResponse +type MacOsVppAppRevokeLicensesActionResultCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MacOsVppAppRevokeLicensesActionResultable +} +// NewMacOsVppAppRevokeLicensesActionResultCollectionResponse instantiates a new MacOsVppAppRevokeLicensesActionResultCollectionResponse and sets the default values. +func NewMacOsVppAppRevokeLicensesActionResultCollectionResponse()(*MacOsVppAppRevokeLicensesActionResultCollectionResponse) { + m := &MacOsVppAppRevokeLicensesActionResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMacOsVppAppRevokeLicensesActionResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMacOsVppAppRevokeLicensesActionResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMacOsVppAppRevokeLicensesActionResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MacOsVppAppRevokeLicensesActionResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMacOsVppAppRevokeLicensesActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MacOsVppAppRevokeLicensesActionResultable, len(val)) + for i, v := range val { + res[i] = v.(MacOsVppAppRevokeLicensesActionResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MacOsVppAppRevokeLicensesActionResultCollectionResponse) GetValue()([]MacOsVppAppRevokeLicensesActionResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *MacOsVppAppRevokeLicensesActionResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MacOsVppAppRevokeLicensesActionResultCollectionResponse) SetValue(value []MacOsVppAppRevokeLicensesActionResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_responseable.go new file mode 100644 index 000000000..5ad828749 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_result_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppRevokeLicensesActionResultCollectionResponseable +type MacOsVppAppRevokeLicensesActionResultCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MacOsVppAppRevokeLicensesActionResultable) + SetValue(value []MacOsVppAppRevokeLicensesActionResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_resultable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_resultable.go new file mode 100644 index 000000000..e0ba53020 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_app_revoke_licenses_action_resultable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppRevokeLicensesActionResultable +type MacOsVppAppRevokeLicensesActionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionFailureReason()(*VppTokenActionFailureReason) + GetActionName()(*string) + GetActionState()(*ActionState) + GetFailedLicensesCount()(*int32) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTotalLicensesCount()(*int32) + GetUserId()(*string) + SetActionFailureReason(value *VppTokenActionFailureReason)() + SetActionName(value *string)() + SetActionState(value *ActionState)() + SetFailedLicensesCount(value *int32)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTotalLicensesCount(value *int32)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mac_os_vpp_appable.go b/src/internal/connector/graph/betasdk/models/mac_os_vpp_appable.go new file mode 100644 index 000000000..eece63280 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mac_os_vpp_appable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MacOsVppAppable +type MacOsVppAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppStoreUrl()(*string) + GetAssignedLicenses()([]MacOsVppAppAssignedLicenseable) + GetBundleId()(*string) + GetLicensingType()(VppLicensingTypeable) + GetReleaseDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRevokeLicenseActionResults()([]MacOsVppAppRevokeLicensesActionResultable) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + GetVppTokenAccountType()(*VppTokenAccountType) + GetVppTokenAppleId()(*string) + GetVppTokenId()(*string) + GetVppTokenOrganizationName()(*string) + SetAppStoreUrl(value *string)() + SetAssignedLicenses(value []MacOsVppAppAssignedLicenseable)() + SetBundleId(value *string)() + SetLicensingType(value VppLicensingTypeable)() + SetReleaseDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRevokeLicenseActionResults(value []MacOsVppAppRevokeLicensesActionResultable)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() + SetVppTokenAccountType(value *VppTokenAccountType)() + SetVppTokenAppleId(value *string)() + SetVppTokenId(value *string)() + SetVppTokenOrganizationName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_content.go b/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_content.go new file mode 100644 index 000000000..c365cd5bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_content.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MachineLearningDetectedSensitiveContent +type MachineLearningDetectedSensitiveContent struct { + DetectedSensitiveContent + // The matchTolerance property + matchTolerance *MlClassificationMatchTolerance + // The modelVersion property + modelVersion *string +} +// NewMachineLearningDetectedSensitiveContent instantiates a new MachineLearningDetectedSensitiveContent and sets the default values. +func NewMachineLearningDetectedSensitiveContent()(*MachineLearningDetectedSensitiveContent) { + m := &MachineLearningDetectedSensitiveContent{ + DetectedSensitiveContent: *NewDetectedSensitiveContent(), + } + return m +} +// CreateMachineLearningDetectedSensitiveContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMachineLearningDetectedSensitiveContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMachineLearningDetectedSensitiveContent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MachineLearningDetectedSensitiveContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DetectedSensitiveContent.GetFieldDeserializers() + res["matchTolerance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMlClassificationMatchTolerance) + if err != nil { + return err + } + if val != nil { + m.SetMatchTolerance(val.(*MlClassificationMatchTolerance)) + } + return nil + } + res["modelVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModelVersion(val) + } + return nil + } + return res +} +// GetMatchTolerance gets the matchTolerance property value. The matchTolerance property +func (m *MachineLearningDetectedSensitiveContent) GetMatchTolerance()(*MlClassificationMatchTolerance) { + return m.matchTolerance +} +// GetModelVersion gets the modelVersion property value. The modelVersion property +func (m *MachineLearningDetectedSensitiveContent) GetModelVersion()(*string) { + return m.modelVersion +} +// Serialize serializes information the current object +func (m *MachineLearningDetectedSensitiveContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DetectedSensitiveContent.Serialize(writer) + if err != nil { + return err + } + if m.GetMatchTolerance() != nil { + cast := (*m.GetMatchTolerance()).String() + err = writer.WriteStringValue("matchTolerance", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("modelVersion", m.GetModelVersion()) + if err != nil { + return err + } + } + return nil +} +// SetMatchTolerance sets the matchTolerance property value. The matchTolerance property +func (m *MachineLearningDetectedSensitiveContent) SetMatchTolerance(value *MlClassificationMatchTolerance)() { + m.matchTolerance = value +} +// SetModelVersion sets the modelVersion property value. The modelVersion property +func (m *MachineLearningDetectedSensitiveContent) SetModelVersion(value *string)() { + m.modelVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_contentable.go b/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_contentable.go new file mode 100644 index 000000000..ca0cd98d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/machine_learning_detected_sensitive_contentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MachineLearningDetectedSensitiveContentable +type MachineLearningDetectedSensitiveContentable interface { + DetectedSensitiveContentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMatchTolerance()(*MlClassificationMatchTolerance) + GetModelVersion()(*string) + SetMatchTolerance(value *MlClassificationMatchTolerance)() + SetModelVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_assessment_request.go b/src/internal/connector/graph/betasdk/models/mail_assessment_request.go new file mode 100644 index 000000000..ec33eb647 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_assessment_request.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailAssessmentRequest +type MailAssessmentRequest struct { + ThreatAssessmentRequest + // The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. + destinationRoutingReason *MailDestinationRoutingReason + // The resource URI of the mail message for assessment. + messageUri *string + // The mail recipient whose policies are used to assess the mail. + recipientEmail *string +} +// NewMailAssessmentRequest instantiates a new MailAssessmentRequest and sets the default values. +func NewMailAssessmentRequest()(*MailAssessmentRequest) { + m := &MailAssessmentRequest{ + ThreatAssessmentRequest: *NewThreatAssessmentRequest(), + } + odataTypeValue := "#microsoft.graph.mailAssessmentRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMailAssessmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailAssessmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailAssessmentRequest(), nil +} +// GetDestinationRoutingReason gets the destinationRoutingReason property value. The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. +func (m *MailAssessmentRequest) GetDestinationRoutingReason()(*MailDestinationRoutingReason) { + return m.destinationRoutingReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailAssessmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatAssessmentRequest.GetFieldDeserializers() + res["destinationRoutingReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMailDestinationRoutingReason) + if err != nil { + return err + } + if val != nil { + m.SetDestinationRoutingReason(val.(*MailDestinationRoutingReason)) + } + return nil + } + res["messageUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageUri(val) + } + return nil + } + res["recipientEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientEmail(val) + } + return nil + } + return res +} +// GetMessageUri gets the messageUri property value. The resource URI of the mail message for assessment. +func (m *MailAssessmentRequest) GetMessageUri()(*string) { + return m.messageUri +} +// GetRecipientEmail gets the recipientEmail property value. The mail recipient whose policies are used to assess the mail. +func (m *MailAssessmentRequest) GetRecipientEmail()(*string) { + return m.recipientEmail +} +// Serialize serializes information the current object +func (m *MailAssessmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatAssessmentRequest.Serialize(writer) + if err != nil { + return err + } + if m.GetDestinationRoutingReason() != nil { + cast := (*m.GetDestinationRoutingReason()).String() + err = writer.WriteStringValue("destinationRoutingReason", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("messageUri", m.GetMessageUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientEmail", m.GetRecipientEmail()) + if err != nil { + return err + } + } + return nil +} +// SetDestinationRoutingReason sets the destinationRoutingReason property value. The reason for mail routed to its destination. Possible values are: none, mailFlowRule, safeSender, blockedSender, advancedSpamFiltering, domainAllowList, domainBlockList, notInAddressBook, firstTimeSender, autoPurgeToInbox, autoPurgeToJunk, autoPurgeToDeleted, outbound, notJunk, junk. +func (m *MailAssessmentRequest) SetDestinationRoutingReason(value *MailDestinationRoutingReason)() { + m.destinationRoutingReason = value +} +// SetMessageUri sets the messageUri property value. The resource URI of the mail message for assessment. +func (m *MailAssessmentRequest) SetMessageUri(value *string)() { + m.messageUri = value +} +// SetRecipientEmail sets the recipientEmail property value. The mail recipient whose policies are used to assess the mail. +func (m *MailAssessmentRequest) SetRecipientEmail(value *string)() { + m.recipientEmail = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_response.go new file mode 100644 index 000000000..73ec6dc6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailAssessmentRequestCollectionResponse +type MailAssessmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MailAssessmentRequestable +} +// NewMailAssessmentRequestCollectionResponse instantiates a new MailAssessmentRequestCollectionResponse and sets the default values. +func NewMailAssessmentRequestCollectionResponse()(*MailAssessmentRequestCollectionResponse) { + m := &MailAssessmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMailAssessmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailAssessmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailAssessmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailAssessmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMailAssessmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MailAssessmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(MailAssessmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MailAssessmentRequestCollectionResponse) GetValue()([]MailAssessmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *MailAssessmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MailAssessmentRequestCollectionResponse) SetValue(value []MailAssessmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_responseable.go new file mode 100644 index 000000000..ef2c0f407 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_assessment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailAssessmentRequestCollectionResponseable +type MailAssessmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MailAssessmentRequestable) + SetValue(value []MailAssessmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_assessment_requestable.go b/src/internal/connector/graph/betasdk/models/mail_assessment_requestable.go new file mode 100644 index 000000000..88079fd26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_assessment_requestable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailAssessmentRequestable +type MailAssessmentRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatAssessmentRequestable + GetDestinationRoutingReason()(*MailDestinationRoutingReason) + GetMessageUri()(*string) + GetRecipientEmail()(*string) + SetDestinationRoutingReason(value *MailDestinationRoutingReason)() + SetMessageUri(value *string)() + SetRecipientEmail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_destination_routing_reason.go b/src/internal/connector/graph/betasdk/models/mail_destination_routing_reason.go new file mode 100644 index 000000000..75dc53a99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_destination_routing_reason.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MailDestinationRoutingReason int + +const ( + NONE_MAILDESTINATIONROUTINGREASON MailDestinationRoutingReason = iota + MAILFLOWRULE_MAILDESTINATIONROUTINGREASON + SAFESENDER_MAILDESTINATIONROUTINGREASON + BLOCKEDSENDER_MAILDESTINATIONROUTINGREASON + ADVANCEDSPAMFILTERING_MAILDESTINATIONROUTINGREASON + DOMAINALLOWLIST_MAILDESTINATIONROUTINGREASON + DOMAINBLOCKLIST_MAILDESTINATIONROUTINGREASON + NOTINADDRESSBOOK_MAILDESTINATIONROUTINGREASON + FIRSTTIMESENDER_MAILDESTINATIONROUTINGREASON + AUTOPURGETOINBOX_MAILDESTINATIONROUTINGREASON + AUTOPURGETOJUNK_MAILDESTINATIONROUTINGREASON + AUTOPURGETODELETED_MAILDESTINATIONROUTINGREASON + OUTBOUND_MAILDESTINATIONROUTINGREASON + NOTJUNK_MAILDESTINATIONROUTINGREASON + JUNK_MAILDESTINATIONROUTINGREASON + UNKNOWNFUTUREVALUE_MAILDESTINATIONROUTINGREASON +) + +func (i MailDestinationRoutingReason) String() string { + return []string{"none", "mailFlowRule", "safeSender", "blockedSender", "advancedSpamFiltering", "domainAllowList", "domainBlockList", "notInAddressBook", "firstTimeSender", "autoPurgeToInbox", "autoPurgeToJunk", "autoPurgeToDeleted", "outbound", "notJunk", "junk", "unknownFutureValue"}[i] +} +func ParseMailDestinationRoutingReason(v string) (interface{}, error) { + result := NONE_MAILDESTINATIONROUTINGREASON + switch v { + case "none": + result = NONE_MAILDESTINATIONROUTINGREASON + case "mailFlowRule": + result = MAILFLOWRULE_MAILDESTINATIONROUTINGREASON + case "safeSender": + result = SAFESENDER_MAILDESTINATIONROUTINGREASON + case "blockedSender": + result = BLOCKEDSENDER_MAILDESTINATIONROUTINGREASON + case "advancedSpamFiltering": + result = ADVANCEDSPAMFILTERING_MAILDESTINATIONROUTINGREASON + case "domainAllowList": + result = DOMAINALLOWLIST_MAILDESTINATIONROUTINGREASON + case "domainBlockList": + result = DOMAINBLOCKLIST_MAILDESTINATIONROUTINGREASON + case "notInAddressBook": + result = NOTINADDRESSBOOK_MAILDESTINATIONROUTINGREASON + case "firstTimeSender": + result = FIRSTTIMESENDER_MAILDESTINATIONROUTINGREASON + case "autoPurgeToInbox": + result = AUTOPURGETOINBOX_MAILDESTINATIONROUTINGREASON + case "autoPurgeToJunk": + result = AUTOPURGETOJUNK_MAILDESTINATIONROUTINGREASON + case "autoPurgeToDeleted": + result = AUTOPURGETODELETED_MAILDESTINATIONROUTINGREASON + case "outbound": + result = OUTBOUND_MAILDESTINATIONROUTINGREASON + case "notJunk": + result = NOTJUNK_MAILDESTINATIONROUTINGREASON + case "junk": + result = JUNK_MAILDESTINATIONROUTINGREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MAILDESTINATIONROUTINGREASON + default: + return 0, errors.New("Unknown MailDestinationRoutingReason value: " + v) + } + return &result, nil +} +func SerializeMailDestinationRoutingReason(values []MailDestinationRoutingReason) []string { + 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/mail_folder.go b/src/internal/connector/graph/betasdk/models/mail_folder.go new file mode 100644 index 000000000..9b22d98c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_folder.go @@ -0,0 +1,438 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailFolder provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MailFolder struct { + Entity + // The number of immediate child mailFolders in the current mailFolder. + childFolderCount *int32 + // The collection of child folders in the mailFolder. + childFolders []MailFolderable + // The mailFolder's display name. + displayName *string + // Indicates whether the mailFolder is hidden. This property can be set only when creating the folder. Find more information in Hidden mail folders. + isHidden *bool + // The collection of rules that apply to the user's Inbox folder. + messageRules []MessageRuleable + // The collection of messages in the mailFolder. + messages []Messageable + // The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The unique identifier for the mailFolder's parent mailFolder. + parentFolderId *string + // The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The number of items in the mailFolder. + totalItemCount *int32 + // The number of items in the mailFolder marked as unread. + unreadItemCount *int32 + // The userConfigurations property + userConfigurations []UserConfigurationable + // The well-known folder name for the folder. The possible values are listed above. This property is only set for default folders created by Outlook. For other folders, this property is null. + wellKnownName *string +} +// NewMailFolder instantiates a new mailFolder and sets the default values. +func NewMailFolder()(*MailFolder) { + m := &MailFolder{ + Entity: *NewEntity(), + } + return m +} +// CreateMailFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.mailSearchFolder": + return NewMailSearchFolder(), nil + } + } + } + } + return NewMailFolder(), nil +} +// GetChildFolderCount gets the childFolderCount property value. The number of immediate child mailFolders in the current mailFolder. +func (m *MailFolder) GetChildFolderCount()(*int32) { + return m.childFolderCount +} +// GetChildFolders gets the childFolders property value. The collection of child folders in the mailFolder. +func (m *MailFolder) GetChildFolders()([]MailFolderable) { + return m.childFolders +} +// GetDisplayName gets the displayName property value. The mailFolder's display name. +func (m *MailFolder) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["childFolderCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChildFolderCount(val) + } + return nil + } + res["childFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMailFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MailFolderable, len(val)) + for i, v := range val { + res[i] = v.(MailFolderable) + } + m.SetChildFolders(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isHidden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHidden(val) + } + return nil + } + res["messageRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageRuleable, len(val)) + for i, v := range val { + res[i] = v.(MessageRuleable) + } + m.SetMessageRules(res) + } + return nil + } + res["messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Messageable, len(val)) + for i, v := range val { + res[i] = v.(Messageable) + } + m.SetMessages(res) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["parentFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentFolderId(val) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["totalItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalItemCount(val) + } + return nil + } + res["unreadItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnreadItemCount(val) + } + return nil + } + res["userConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(UserConfigurationable) + } + m.SetUserConfigurations(res) + } + return nil + } + res["wellKnownName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWellKnownName(val) + } + return nil + } + return res +} +// GetIsHidden gets the isHidden property value. Indicates whether the mailFolder is hidden. This property can be set only when creating the folder. Find more information in Hidden mail folders. +func (m *MailFolder) GetIsHidden()(*bool) { + return m.isHidden +} +// GetMessageRules gets the messageRules property value. The collection of rules that apply to the user's Inbox folder. +func (m *MailFolder) GetMessageRules()([]MessageRuleable) { + return m.messageRules +} +// GetMessages gets the messages property value. The collection of messages in the mailFolder. +func (m *MailFolder) GetMessages()([]Messageable) { + return m.messages +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. +func (m *MailFolder) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetParentFolderId gets the parentFolderId property value. The unique identifier for the mailFolder's parent mailFolder. +func (m *MailFolder) GetParentFolderId()(*string) { + return m.parentFolderId +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. +func (m *MailFolder) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetTotalItemCount gets the totalItemCount property value. The number of items in the mailFolder. +func (m *MailFolder) GetTotalItemCount()(*int32) { + return m.totalItemCount +} +// GetUnreadItemCount gets the unreadItemCount property value. The number of items in the mailFolder marked as unread. +func (m *MailFolder) GetUnreadItemCount()(*int32) { + return m.unreadItemCount +} +// GetUserConfigurations gets the userConfigurations property value. The userConfigurations property +func (m *MailFolder) GetUserConfigurations()([]UserConfigurationable) { + return m.userConfigurations +} +// GetWellKnownName gets the wellKnownName property value. The well-known folder name for the folder. The possible values are listed above. This property is only set for default folders created by Outlook. For other folders, this property is null. +func (m *MailFolder) GetWellKnownName()(*string) { + return m.wellKnownName +} +// Serialize serializes information the current object +func (m *MailFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("childFolderCount", m.GetChildFolderCount()) + if err != nil { + return err + } + } + if m.GetChildFolders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildFolders())) + for i, v := range m.GetChildFolders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("childFolders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isHidden", m.GetIsHidden()) + if err != nil { + return err + } + } + if m.GetMessageRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessageRules())) + for i, v := range m.GetMessageRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messageRules", cast) + if err != nil { + return err + } + } + if m.GetMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessages())) + for i, v := range m.GetMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messages", cast) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentFolderId", m.GetParentFolderId()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalItemCount", m.GetTotalItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unreadItemCount", m.GetUnreadItemCount()) + if err != nil { + return err + } + } + if m.GetUserConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserConfigurations())) + for i, v := range m.GetUserConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userConfigurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("wellKnownName", m.GetWellKnownName()) + if err != nil { + return err + } + } + return nil +} +// SetChildFolderCount sets the childFolderCount property value. The number of immediate child mailFolders in the current mailFolder. +func (m *MailFolder) SetChildFolderCount(value *int32)() { + m.childFolderCount = value +} +// SetChildFolders sets the childFolders property value. The collection of child folders in the mailFolder. +func (m *MailFolder) SetChildFolders(value []MailFolderable)() { + m.childFolders = value +} +// SetDisplayName sets the displayName property value. The mailFolder's display name. +func (m *MailFolder) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsHidden sets the isHidden property value. Indicates whether the mailFolder is hidden. This property can be set only when creating the folder. Find more information in Hidden mail folders. +func (m *MailFolder) SetIsHidden(value *bool)() { + m.isHidden = value +} +// SetMessageRules sets the messageRules property value. The collection of rules that apply to the user's Inbox folder. +func (m *MailFolder) SetMessageRules(value []MessageRuleable)() { + m.messageRules = value +} +// SetMessages sets the messages property value. The collection of messages in the mailFolder. +func (m *MailFolder) SetMessages(value []Messageable)() { + m.messages = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the mailFolder. Read-only. Nullable. +func (m *MailFolder) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetParentFolderId sets the parentFolderId property value. The unique identifier for the mailFolder's parent mailFolder. +func (m *MailFolder) SetParentFolderId(value *string)() { + m.parentFolderId = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the mailFolder. Read-only. Nullable. +func (m *MailFolder) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetTotalItemCount sets the totalItemCount property value. The number of items in the mailFolder. +func (m *MailFolder) SetTotalItemCount(value *int32)() { + m.totalItemCount = value +} +// SetUnreadItemCount sets the unreadItemCount property value. The number of items in the mailFolder marked as unread. +func (m *MailFolder) SetUnreadItemCount(value *int32)() { + m.unreadItemCount = value +} +// SetUserConfigurations sets the userConfigurations property value. The userConfigurations property +func (m *MailFolder) SetUserConfigurations(value []UserConfigurationable)() { + m.userConfigurations = value +} +// SetWellKnownName sets the wellKnownName property value. The well-known folder name for the folder. The possible values are listed above. This property is only set for default folders created by Outlook. For other folders, this property is null. +func (m *MailFolder) SetWellKnownName(value *string)() { + m.wellKnownName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_folder_collection_response.go b/src/internal/connector/graph/betasdk/models/mail_folder_collection_response.go new file mode 100644 index 000000000..f3dcedd88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_folder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailFolderCollectionResponse +type MailFolderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MailFolderable +} +// NewMailFolderCollectionResponse instantiates a new MailFolderCollectionResponse and sets the default values. +func NewMailFolderCollectionResponse()(*MailFolderCollectionResponse) { + m := &MailFolderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMailFolderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailFolderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailFolderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailFolderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMailFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MailFolderable, len(val)) + for i, v := range val { + res[i] = v.(MailFolderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MailFolderCollectionResponse) GetValue()([]MailFolderable) { + return m.value +} +// Serialize serializes information the current object +func (m *MailFolderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MailFolderCollectionResponse) SetValue(value []MailFolderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_folder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mail_folder_collection_responseable.go new file mode 100644 index 000000000..77634660e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_folder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailFolderCollectionResponseable +type MailFolderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MailFolderable) + SetValue(value []MailFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_folderable.go b/src/internal/connector/graph/betasdk/models/mail_folderable.go new file mode 100644 index 000000000..9fd67967c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_folderable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailFolderable +type MailFolderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChildFolderCount()(*int32) + GetChildFolders()([]MailFolderable) + GetDisplayName()(*string) + GetIsHidden()(*bool) + GetMessageRules()([]MessageRuleable) + GetMessages()([]Messageable) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetParentFolderId()(*string) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetTotalItemCount()(*int32) + GetUnreadItemCount()(*int32) + GetUserConfigurations()([]UserConfigurationable) + GetWellKnownName()(*string) + SetChildFolderCount(value *int32)() + SetChildFolders(value []MailFolderable)() + SetDisplayName(value *string)() + SetIsHidden(value *bool)() + SetMessageRules(value []MessageRuleable)() + SetMessages(value []Messageable)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetParentFolderId(value *string)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetTotalItemCount(value *int32)() + SetUnreadItemCount(value *int32)() + SetUserConfigurations(value []UserConfigurationable)() + SetWellKnownName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_search_folder.go b/src/internal/connector/graph/betasdk/models/mail_search_folder.go new file mode 100644 index 000000000..070959bb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_search_folder.go @@ -0,0 +1,144 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailSearchFolder +type MailSearchFolder struct { + MailFolder + // The OData query to filter the messages. + filterQuery *string + // Indicates how the mailbox folder hierarchy should be traversed in the search. true means that a deep search should be done to include child folders in the hierarchy of each folder explicitly specified in sourceFolderIds. false means a shallow search of only each of the folders explicitly specified in sourceFolderIds. + includeNestedFolders *bool + // Indicates whether a search folder is editable using REST APIs. + isSupported *bool + // The mailbox folders that should be mined. + sourceFolderIds []string +} +// NewMailSearchFolder instantiates a new MailSearchFolder and sets the default values. +func NewMailSearchFolder()(*MailSearchFolder) { + m := &MailSearchFolder{ + MailFolder: *NewMailFolder(), + } + odataTypeValue := "#microsoft.graph.mailSearchFolder"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMailSearchFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailSearchFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailSearchFolder(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailSearchFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MailFolder.GetFieldDeserializers() + res["filterQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilterQuery(val) + } + return nil + } + res["includeNestedFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeNestedFolders(val) + } + return nil + } + res["isSupported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSupported(val) + } + return nil + } + res["sourceFolderIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSourceFolderIds(res) + } + return nil + } + return res +} +// GetFilterQuery gets the filterQuery property value. The OData query to filter the messages. +func (m *MailSearchFolder) GetFilterQuery()(*string) { + return m.filterQuery +} +// GetIncludeNestedFolders gets the includeNestedFolders property value. Indicates how the mailbox folder hierarchy should be traversed in the search. true means that a deep search should be done to include child folders in the hierarchy of each folder explicitly specified in sourceFolderIds. false means a shallow search of only each of the folders explicitly specified in sourceFolderIds. +func (m *MailSearchFolder) GetIncludeNestedFolders()(*bool) { + return m.includeNestedFolders +} +// GetIsSupported gets the isSupported property value. Indicates whether a search folder is editable using REST APIs. +func (m *MailSearchFolder) GetIsSupported()(*bool) { + return m.isSupported +} +// GetSourceFolderIds gets the sourceFolderIds property value. The mailbox folders that should be mined. +func (m *MailSearchFolder) GetSourceFolderIds()([]string) { + return m.sourceFolderIds +} +// Serialize serializes information the current object +func (m *MailSearchFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MailFolder.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("filterQuery", m.GetFilterQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("includeNestedFolders", m.GetIncludeNestedFolders()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSupported", m.GetIsSupported()) + if err != nil { + return err + } + } + if m.GetSourceFolderIds() != nil { + err = writer.WriteCollectionOfStringValues("sourceFolderIds", m.GetSourceFolderIds()) + if err != nil { + return err + } + } + return nil +} +// SetFilterQuery sets the filterQuery property value. The OData query to filter the messages. +func (m *MailSearchFolder) SetFilterQuery(value *string)() { + m.filterQuery = value +} +// SetIncludeNestedFolders sets the includeNestedFolders property value. Indicates how the mailbox folder hierarchy should be traversed in the search. true means that a deep search should be done to include child folders in the hierarchy of each folder explicitly specified in sourceFolderIds. false means a shallow search of only each of the folders explicitly specified in sourceFolderIds. +func (m *MailSearchFolder) SetIncludeNestedFolders(value *bool)() { + m.includeNestedFolders = value +} +// SetIsSupported sets the isSupported property value. Indicates whether a search folder is editable using REST APIs. +func (m *MailSearchFolder) SetIsSupported(value *bool)() { + m.isSupported = value +} +// SetSourceFolderIds sets the sourceFolderIds property value. The mailbox folders that should be mined. +func (m *MailSearchFolder) SetSourceFolderIds(value []string)() { + m.sourceFolderIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_response.go b/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_response.go new file mode 100644 index 000000000..7d6d16586 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailSearchFolderCollectionResponse +type MailSearchFolderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MailSearchFolderable +} +// NewMailSearchFolderCollectionResponse instantiates a new MailSearchFolderCollectionResponse and sets the default values. +func NewMailSearchFolderCollectionResponse()(*MailSearchFolderCollectionResponse) { + m := &MailSearchFolderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMailSearchFolderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailSearchFolderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailSearchFolderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailSearchFolderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMailSearchFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MailSearchFolderable, len(val)) + for i, v := range val { + res[i] = v.(MailSearchFolderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MailSearchFolderCollectionResponse) GetValue()([]MailSearchFolderable) { + return m.value +} +// Serialize serializes information the current object +func (m *MailSearchFolderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MailSearchFolderCollectionResponse) SetValue(value []MailSearchFolderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_responseable.go new file mode 100644 index 000000000..09a487236 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_search_folder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailSearchFolderCollectionResponseable +type MailSearchFolderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MailSearchFolderable) + SetValue(value []MailSearchFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mail_search_folderable.go b/src/internal/connector/graph/betasdk/models/mail_search_folderable.go new file mode 100644 index 000000000..aa20ca7c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mail_search_folderable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailSearchFolderable +type MailSearchFolderable interface { + MailFolderable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFilterQuery()(*string) + GetIncludeNestedFolders()(*bool) + GetIsSupported()(*bool) + GetSourceFolderIds()([]string) + SetFilterQuery(value *string)() + SetIncludeNestedFolders(value *bool)() + SetIsSupported(value *bool)() + SetSourceFolderIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mailbox_recipient_type.go b/src/internal/connector/graph/betasdk/models/mailbox_recipient_type.go new file mode 100644 index 000000000..b989e777b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mailbox_recipient_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MailboxRecipientType int + +const ( + UNKNOWN_MAILBOXRECIPIENTTYPE MailboxRecipientType = iota + USER_MAILBOXRECIPIENTTYPE + LINKED_MAILBOXRECIPIENTTYPE + SHARED_MAILBOXRECIPIENTTYPE + ROOM_MAILBOXRECIPIENTTYPE + EQUIPMENT_MAILBOXRECIPIENTTYPE + OTHERS_MAILBOXRECIPIENTTYPE +) + +func (i MailboxRecipientType) String() string { + return []string{"unknown", "user", "linked", "shared", "room", "equipment", "others"}[i] +} +func ParseMailboxRecipientType(v string) (interface{}, error) { + result := UNKNOWN_MAILBOXRECIPIENTTYPE + switch v { + case "unknown": + result = UNKNOWN_MAILBOXRECIPIENTTYPE + case "user": + result = USER_MAILBOXRECIPIENTTYPE + case "linked": + result = LINKED_MAILBOXRECIPIENTTYPE + case "shared": + result = SHARED_MAILBOXRECIPIENTTYPE + case "room": + result = ROOM_MAILBOXRECIPIENTTYPE + case "equipment": + result = EQUIPMENT_MAILBOXRECIPIENTTYPE + case "others": + result = OTHERS_MAILBOXRECIPIENTTYPE + default: + return 0, errors.New("Unknown MailboxRecipientType value: " + v) + } + return &result, nil +} +func SerializeMailboxRecipientType(values []MailboxRecipientType) []string { + 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/mailbox_settings.go b/src/internal/connector/graph/betasdk/models/mailbox_settings.go new file mode 100644 index 000000000..3cf18a0f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mailbox_settings.go @@ -0,0 +1,334 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailboxSettings +type MailboxSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Folder ID of an archive folder for the user. Read only. + archiveFolder *string + // Configuration settings to automatically notify the sender of an incoming email with a message from the signed-in user. + automaticRepliesSetting AutomaticRepliesSettingable + // The date format for the user's mailbox. + dateFormat *string + // If the user has a calendar delegate, this specifies whether the delegate, mailbox owner, or both receive meeting messages and meeting responses. Possible values are: sendToDelegateAndInformationToPrincipal, sendToDelegateAndPrincipal, sendToDelegateOnly. The default is sendToDelegateOnly. + delegateMeetingMessageDeliveryOptions *DelegateMeetingMessageDeliveryOptions + // The locale information for the user, including the preferred language and country/region. + language LocaleInfoable + // The OdataType property + odataType *string + // The time format for the user's mailbox. + timeFormat *string + // The default time zone for the user's mailbox. + timeZone *string + // The purpose of the mailbox. Used to differentiate a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Read only. + userPurpose *UserPurpose + // The userPurposeV2 property + userPurposeV2 *MailboxRecipientType + // The days of the week and hours in a specific time zone that the user works. + workingHours WorkingHoursable +} +// NewMailboxSettings instantiates a new mailboxSettings and sets the default values. +func NewMailboxSettings()(*MailboxSettings) { + m := &MailboxSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMailboxSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailboxSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailboxSettings(), 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 *MailboxSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetArchiveFolder gets the archiveFolder property value. Folder ID of an archive folder for the user. Read only. +func (m *MailboxSettings) GetArchiveFolder()(*string) { + return m.archiveFolder +} +// GetAutomaticRepliesSetting gets the automaticRepliesSetting property value. Configuration settings to automatically notify the sender of an incoming email with a message from the signed-in user. +func (m *MailboxSettings) GetAutomaticRepliesSetting()(AutomaticRepliesSettingable) { + return m.automaticRepliesSetting +} +// GetDateFormat gets the dateFormat property value. The date format for the user's mailbox. +func (m *MailboxSettings) GetDateFormat()(*string) { + return m.dateFormat +} +// GetDelegateMeetingMessageDeliveryOptions gets the delegateMeetingMessageDeliveryOptions property value. If the user has a calendar delegate, this specifies whether the delegate, mailbox owner, or both receive meeting messages and meeting responses. Possible values are: sendToDelegateAndInformationToPrincipal, sendToDelegateAndPrincipal, sendToDelegateOnly. The default is sendToDelegateOnly. +func (m *MailboxSettings) GetDelegateMeetingMessageDeliveryOptions()(*DelegateMeetingMessageDeliveryOptions) { + return m.delegateMeetingMessageDeliveryOptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailboxSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["archiveFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetArchiveFolder(val) + } + return nil + } + res["automaticRepliesSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAutomaticRepliesSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutomaticRepliesSetting(val.(AutomaticRepliesSettingable)) + } + return nil + } + res["dateFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDateFormat(val) + } + return nil + } + res["delegateMeetingMessageDeliveryOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegateMeetingMessageDeliveryOptions) + if err != nil { + return err + } + if val != nil { + m.SetDelegateMeetingMessageDeliveryOptions(val.(*DelegateMeetingMessageDeliveryOptions)) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val.(LocaleInfoable)) + } + 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["timeFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeFormat(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 + } + res["userPurpose"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserPurpose) + if err != nil { + return err + } + if val != nil { + m.SetUserPurpose(val.(*UserPurpose)) + } + return nil + } + res["userPurposeV2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMailboxRecipientType) + if err != nil { + return err + } + if val != nil { + m.SetUserPurposeV2(val.(*MailboxRecipientType)) + } + return nil + } + res["workingHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWorkingHoursFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWorkingHours(val.(WorkingHoursable)) + } + return nil + } + return res +} +// GetLanguage gets the language property value. The locale information for the user, including the preferred language and country/region. +func (m *MailboxSettings) GetLanguage()(LocaleInfoable) { + return m.language +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MailboxSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTimeFormat gets the timeFormat property value. The time format for the user's mailbox. +func (m *MailboxSettings) GetTimeFormat()(*string) { + return m.timeFormat +} +// GetTimeZone gets the timeZone property value. The default time zone for the user's mailbox. +func (m *MailboxSettings) GetTimeZone()(*string) { + return m.timeZone +} +// GetUserPurpose gets the userPurpose property value. The purpose of the mailbox. Used to differentiate a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Read only. +func (m *MailboxSettings) GetUserPurpose()(*UserPurpose) { + return m.userPurpose +} +// GetUserPurposeV2 gets the userPurposeV2 property value. The userPurposeV2 property +func (m *MailboxSettings) GetUserPurposeV2()(*MailboxRecipientType) { + return m.userPurposeV2 +} +// GetWorkingHours gets the workingHours property value. The days of the week and hours in a specific time zone that the user works. +func (m *MailboxSettings) GetWorkingHours()(WorkingHoursable) { + return m.workingHours +} +// Serialize serializes information the current object +func (m *MailboxSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("archiveFolder", m.GetArchiveFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("automaticRepliesSetting", m.GetAutomaticRepliesSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("dateFormat", m.GetDateFormat()) + if err != nil { + return err + } + } + if m.GetDelegateMeetingMessageDeliveryOptions() != nil { + cast := (*m.GetDelegateMeetingMessageDeliveryOptions()).String() + err := writer.WriteStringValue("delegateMeetingMessageDeliveryOptions", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeFormat", m.GetTimeFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("timeZone", m.GetTimeZone()) + if err != nil { + return err + } + } + if m.GetUserPurpose() != nil { + cast := (*m.GetUserPurpose()).String() + err := writer.WriteStringValue("userPurpose", &cast) + if err != nil { + return err + } + } + if m.GetUserPurposeV2() != nil { + cast := (*m.GetUserPurposeV2()).String() + err := writer.WriteStringValue("userPurposeV2", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("workingHours", m.GetWorkingHours()) + 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 *MailboxSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetArchiveFolder sets the archiveFolder property value. Folder ID of an archive folder for the user. Read only. +func (m *MailboxSettings) SetArchiveFolder(value *string)() { + m.archiveFolder = value +} +// SetAutomaticRepliesSetting sets the automaticRepliesSetting property value. Configuration settings to automatically notify the sender of an incoming email with a message from the signed-in user. +func (m *MailboxSettings) SetAutomaticRepliesSetting(value AutomaticRepliesSettingable)() { + m.automaticRepliesSetting = value +} +// SetDateFormat sets the dateFormat property value. The date format for the user's mailbox. +func (m *MailboxSettings) SetDateFormat(value *string)() { + m.dateFormat = value +} +// SetDelegateMeetingMessageDeliveryOptions sets the delegateMeetingMessageDeliveryOptions property value. If the user has a calendar delegate, this specifies whether the delegate, mailbox owner, or both receive meeting messages and meeting responses. Possible values are: sendToDelegateAndInformationToPrincipal, sendToDelegateAndPrincipal, sendToDelegateOnly. The default is sendToDelegateOnly. +func (m *MailboxSettings) SetDelegateMeetingMessageDeliveryOptions(value *DelegateMeetingMessageDeliveryOptions)() { + m.delegateMeetingMessageDeliveryOptions = value +} +// SetLanguage sets the language property value. The locale information for the user, including the preferred language and country/region. +func (m *MailboxSettings) SetLanguage(value LocaleInfoable)() { + m.language = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MailboxSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeFormat sets the timeFormat property value. The time format for the user's mailbox. +func (m *MailboxSettings) SetTimeFormat(value *string)() { + m.timeFormat = value +} +// SetTimeZone sets the timeZone property value. The default time zone for the user's mailbox. +func (m *MailboxSettings) SetTimeZone(value *string)() { + m.timeZone = value +} +// SetUserPurpose sets the userPurpose property value. The purpose of the mailbox. Used to differentiate a mailbox for a single user from a shared mailbox and equipment mailbox in Exchange Online. Read only. +func (m *MailboxSettings) SetUserPurpose(value *UserPurpose)() { + m.userPurpose = value +} +// SetUserPurposeV2 sets the userPurposeV2 property value. The userPurposeV2 property +func (m *MailboxSettings) SetUserPurposeV2(value *MailboxRecipientType)() { + m.userPurposeV2 = value +} +// SetWorkingHours sets the workingHours property value. The days of the week and hours in a specific time zone that the user works. +func (m *MailboxSettings) SetWorkingHours(value WorkingHoursable)() { + m.workingHours = value +} diff --git a/src/internal/connector/graph/betasdk/models/mailbox_settingsable.go b/src/internal/connector/graph/betasdk/models/mailbox_settingsable.go new file mode 100644 index 000000000..d898b98a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mailbox_settingsable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailboxSettingsable +type MailboxSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetArchiveFolder()(*string) + GetAutomaticRepliesSetting()(AutomaticRepliesSettingable) + GetDateFormat()(*string) + GetDelegateMeetingMessageDeliveryOptions()(*DelegateMeetingMessageDeliveryOptions) + GetLanguage()(LocaleInfoable) + GetOdataType()(*string) + GetTimeFormat()(*string) + GetTimeZone()(*string) + GetUserPurpose()(*UserPurpose) + GetUserPurposeV2()(*MailboxRecipientType) + GetWorkingHours()(WorkingHoursable) + SetArchiveFolder(value *string)() + SetAutomaticRepliesSetting(value AutomaticRepliesSettingable)() + SetDateFormat(value *string)() + SetDelegateMeetingMessageDeliveryOptions(value *DelegateMeetingMessageDeliveryOptions)() + SetLanguage(value LocaleInfoable)() + SetOdataType(value *string)() + SetTimeFormat(value *string)() + SetTimeZone(value *string)() + SetUserPurpose(value *UserPurpose)() + SetUserPurposeV2(value *MailboxRecipientType)() + SetWorkingHours(value WorkingHoursable)() +} diff --git a/src/internal/connector/graph/betasdk/models/malware.go b/src/internal/connector/graph/betasdk/models/malware.go new file mode 100644 index 000000000..487b889d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Malware +type Malware struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Contains the virus details for the malware facet. + description *string + // The OdataType property + odataType *string +} +// NewMalware instantiates a new malware and sets the default values. +func NewMalware()(*Malware) { + m := &Malware{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMalwareFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMalwareFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMalware(), 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 *Malware) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Contains the virus details for the malware facet. +func (m *Malware) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Malware) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Malware) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Malware) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Malware) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Contains the virus details for the malware facet. +func (m *Malware) SetDescription(value *string)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Malware) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state.go b/src/internal/connector/graph/betasdk/models/malware_state.go new file mode 100644 index 000000000..cfc69f4ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareState +type MalwareState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Provider-generated malware category (for example, trojan, ransomware, etc.). + category *string + // Provider-generated malware family (for example, 'wannacry', 'notpetya', etc.). + family *string + // Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H). + name *string + // The OdataType property + odataType *string + // Provider-determined severity of this malware. + severity *string + // Indicates whether the detected file (malware/vulnerability) was running at the time of detection or was detected at rest on the disk. + wasRunning *bool +} +// NewMalwareState instantiates a new malwareState and sets the default values. +func NewMalwareState()(*MalwareState) { + m := &MalwareState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMalwareStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMalwareStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMalwareState(), 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 *MalwareState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. Provider-generated malware category (for example, trojan, ransomware, etc.). +func (m *MalwareState) GetCategory()(*string) { + return m.category +} +// GetFamily gets the family property value. Provider-generated malware family (for example, 'wannacry', 'notpetya', etc.). +func (m *MalwareState) GetFamily()(*string) { + return m.family +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MalwareState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["family"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFamily(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val) + } + return nil + } + res["wasRunning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWasRunning(val) + } + return nil + } + return res +} +// GetName gets the name property value. Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H). +func (m *MalwareState) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MalwareState) GetOdataType()(*string) { + return m.odataType +} +// GetSeverity gets the severity property value. Provider-determined severity of this malware. +func (m *MalwareState) GetSeverity()(*string) { + return m.severity +} +// GetWasRunning gets the wasRunning property value. Indicates whether the detected file (malware/vulnerability) was running at the time of detection or was detected at rest on the disk. +func (m *MalwareState) GetWasRunning()(*bool) { + return m.wasRunning +} +// Serialize serializes information the current object +func (m *MalwareState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("family", m.GetFamily()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("severity", m.GetSeverity()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("wasRunning", m.GetWasRunning()) + 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 *MalwareState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. Provider-generated malware category (for example, trojan, ransomware, etc.). +func (m *MalwareState) SetCategory(value *string)() { + m.category = value +} +// SetFamily sets the family property value. Provider-generated malware family (for example, 'wannacry', 'notpetya', etc.). +func (m *MalwareState) SetFamily(value *string)() { + m.family = value +} +// SetName sets the name property value. Provider-generated malware variant name (for example, Trojan:Win32/Powessere.H). +func (m *MalwareState) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MalwareState) SetOdataType(value *string)() { + m.odataType = value +} +// SetSeverity sets the severity property value. Provider-determined severity of this malware. +func (m *MalwareState) SetSeverity(value *string)() { + m.severity = value +} +// SetWasRunning sets the wasRunning property value. Indicates whether the detected file (malware/vulnerability) was running at the time of detection or was detected at rest on the disk. +func (m *MalwareState) SetWasRunning(value *bool)() { + m.wasRunning = value +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_collection_response.go b/src/internal/connector/graph/betasdk/models/malware_state_collection_response.go new file mode 100644 index 000000000..cc70b834d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateCollectionResponse +type MalwareStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MalwareStateable +} +// NewMalwareStateCollectionResponse instantiates a new MalwareStateCollectionResponse and sets the default values. +func NewMalwareStateCollectionResponse()(*MalwareStateCollectionResponse) { + m := &MalwareStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMalwareStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMalwareStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMalwareStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MalwareStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMalwareStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MalwareStateable, len(val)) + for i, v := range val { + res[i] = v.(MalwareStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MalwareStateCollectionResponse) GetValue()([]MalwareStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *MalwareStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MalwareStateCollectionResponse) SetValue(value []MalwareStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/malware_state_collection_responseable.go new file mode 100644 index 000000000..946c3212c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateCollectionResponseable +type MalwareStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MalwareStateable) + SetValue(value []MalwareStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device.go b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device.go new file mode 100644 index 000000000..18c20d5d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateForWindowsDevice malware state for a windows device +type MalwareStateForWindowsDevice struct { + Entity + // Number of times the malware is detected + detectionCount *int32 + // Device name + deviceName *string + // Execution status of the malware like blocked/executing etc. Possible values are: unknown, blocked, allowed, running, notRunning. + executionState *WindowsMalwareExecutionState + // Initial detection datetime of the malware + initialDetectionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last time this particular threat was changed + lastStateChangeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Threat status of the malware like cleaned/quarantined/allowed etc. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. + threatState *WindowsMalwareThreatState +} +// NewMalwareStateForWindowsDevice instantiates a new malwareStateForWindowsDevice and sets the default values. +func NewMalwareStateForWindowsDevice()(*MalwareStateForWindowsDevice) { + m := &MalwareStateForWindowsDevice{ + Entity: *NewEntity(), + } + return m +} +// CreateMalwareStateForWindowsDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMalwareStateForWindowsDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMalwareStateForWindowsDevice(), nil +} +// GetDetectionCount gets the detectionCount property value. Number of times the malware is detected +func (m *MalwareStateForWindowsDevice) GetDetectionCount()(*int32) { + return m.detectionCount +} +// GetDeviceName gets the deviceName property value. Device name +func (m *MalwareStateForWindowsDevice) GetDeviceName()(*string) { + return m.deviceName +} +// GetExecutionState gets the executionState property value. Execution status of the malware like blocked/executing etc. Possible values are: unknown, blocked, allowed, running, notRunning. +func (m *MalwareStateForWindowsDevice) GetExecutionState()(*WindowsMalwareExecutionState) { + return m.executionState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MalwareStateForWindowsDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["detectionCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionCount(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["executionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsMalwareExecutionState) + if err != nil { + return err + } + if val != nil { + m.SetExecutionState(val.(*WindowsMalwareExecutionState)) + } + return nil + } + res["initialDetectionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetInitialDetectionDateTime(val) + } + return nil + } + res["lastStateChangeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStateChangeDateTime(val) + } + return nil + } + res["threatState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsMalwareThreatState) + if err != nil { + return err + } + if val != nil { + m.SetThreatState(val.(*WindowsMalwareThreatState)) + } + return nil + } + return res +} +// GetInitialDetectionDateTime gets the initialDetectionDateTime property value. Initial detection datetime of the malware +func (m *MalwareStateForWindowsDevice) GetInitialDetectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.initialDetectionDateTime +} +// GetLastStateChangeDateTime gets the lastStateChangeDateTime property value. The last time this particular threat was changed +func (m *MalwareStateForWindowsDevice) GetLastStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStateChangeDateTime +} +// GetThreatState gets the threatState property value. Threat status of the malware like cleaned/quarantined/allowed etc. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. +func (m *MalwareStateForWindowsDevice) GetThreatState()(*WindowsMalwareThreatState) { + return m.threatState +} +// Serialize serializes information the current object +func (m *MalwareStateForWindowsDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("detectionCount", m.GetDetectionCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + if m.GetExecutionState() != nil { + cast := (*m.GetExecutionState()).String() + err = writer.WriteStringValue("executionState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("initialDetectionDateTime", m.GetInitialDetectionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStateChangeDateTime", m.GetLastStateChangeDateTime()) + if err != nil { + return err + } + } + if m.GetThreatState() != nil { + cast := (*m.GetThreatState()).String() + err = writer.WriteStringValue("threatState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDetectionCount sets the detectionCount property value. Number of times the malware is detected +func (m *MalwareStateForWindowsDevice) SetDetectionCount(value *int32)() { + m.detectionCount = value +} +// SetDeviceName sets the deviceName property value. Device name +func (m *MalwareStateForWindowsDevice) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetExecutionState sets the executionState property value. Execution status of the malware like blocked/executing etc. Possible values are: unknown, blocked, allowed, running, notRunning. +func (m *MalwareStateForWindowsDevice) SetExecutionState(value *WindowsMalwareExecutionState)() { + m.executionState = value +} +// SetInitialDetectionDateTime sets the initialDetectionDateTime property value. Initial detection datetime of the malware +func (m *MalwareStateForWindowsDevice) SetInitialDetectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.initialDetectionDateTime = value +} +// SetLastStateChangeDateTime sets the lastStateChangeDateTime property value. The last time this particular threat was changed +func (m *MalwareStateForWindowsDevice) SetLastStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStateChangeDateTime = value +} +// SetThreatState sets the threatState property value. Threat status of the malware like cleaned/quarantined/allowed etc. Possible values are: active, actionFailed, manualStepsRequired, fullScanRequired, rebootRequired, remediatedWithNonCriticalFailures, quarantined, removed, cleaned, allowed, noStatusCleared. +func (m *MalwareStateForWindowsDevice) SetThreatState(value *WindowsMalwareThreatState)() { + m.threatState = value +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_response.go b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_response.go new file mode 100644 index 000000000..b94a1eac5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateForWindowsDeviceCollectionResponse +type MalwareStateForWindowsDeviceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MalwareStateForWindowsDeviceable +} +// NewMalwareStateForWindowsDeviceCollectionResponse instantiates a new MalwareStateForWindowsDeviceCollectionResponse and sets the default values. +func NewMalwareStateForWindowsDeviceCollectionResponse()(*MalwareStateForWindowsDeviceCollectionResponse) { + m := &MalwareStateForWindowsDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMalwareStateForWindowsDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMalwareStateForWindowsDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMalwareStateForWindowsDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MalwareStateForWindowsDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMalwareStateForWindowsDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MalwareStateForWindowsDeviceable, len(val)) + for i, v := range val { + res[i] = v.(MalwareStateForWindowsDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MalwareStateForWindowsDeviceCollectionResponse) GetValue()([]MalwareStateForWindowsDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *MalwareStateForWindowsDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MalwareStateForWindowsDeviceCollectionResponse) SetValue(value []MalwareStateForWindowsDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_responseable.go new file mode 100644 index 000000000..e66df2aa7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_device_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateForWindowsDeviceCollectionResponseable +type MalwareStateForWindowsDeviceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MalwareStateForWindowsDeviceable) + SetValue(value []MalwareStateForWindowsDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/malware_state_for_windows_deviceable.go b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_deviceable.go new file mode 100644 index 000000000..fcef7d11d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_state_for_windows_deviceable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateForWindowsDeviceable +type MalwareStateForWindowsDeviceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionCount()(*int32) + GetDeviceName()(*string) + GetExecutionState()(*WindowsMalwareExecutionState) + GetInitialDetectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetThreatState()(*WindowsMalwareThreatState) + SetDetectionCount(value *int32)() + SetDeviceName(value *string)() + SetExecutionState(value *WindowsMalwareExecutionState)() + SetInitialDetectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetThreatState(value *WindowsMalwareThreatState)() +} diff --git a/src/internal/connector/graph/betasdk/models/malware_stateable.go b/src/internal/connector/graph/betasdk/models/malware_stateable.go new file mode 100644 index 000000000..75b634a86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malware_stateable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MalwareStateable +type MalwareStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*string) + GetFamily()(*string) + GetName()(*string) + GetOdataType()(*string) + GetSeverity()(*string) + GetWasRunning()(*bool) + SetCategory(value *string)() + SetFamily(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetSeverity(value *string)() + SetWasRunning(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/malwareable.go b/src/internal/connector/graph/betasdk/models/malwareable.go new file mode 100644 index 000000000..bcd6243a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/malwareable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Malwareable +type Malwareable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetOdataType()(*string) + SetDescription(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state.go b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state.go new file mode 100644 index 000000000..3305b0370 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state.go @@ -0,0 +1,348 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAllDeviceCertificateState provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAllDeviceCertificateState struct { + Entity + // Certificate expiry date + certificateExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Enhanced Key Usage + certificateExtendedKeyUsages *string + // Issuance date + certificateIssuanceDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Issuer + certificateIssuerName *string + // Key Usage + certificateKeyUsages *int32 + // Certificate Revocation Status. + certificateRevokeStatus *CertificateRevocationStatus + // The time the revoke status was last changed + certificateRevokeStatusLastChangeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Serial number + certificateSerialNumber *string + // Certificate subject name + certificateSubjectName *string + // Thumbprint + certificateThumbprint *string + // Device display name + managedDeviceDisplayName *string + // User principal name + userPrincipalName *string +} +// NewManagedAllDeviceCertificateState instantiates a new managedAllDeviceCertificateState and sets the default values. +func NewManagedAllDeviceCertificateState()(*ManagedAllDeviceCertificateState) { + m := &ManagedAllDeviceCertificateState{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAllDeviceCertificateStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAllDeviceCertificateStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAllDeviceCertificateState(), nil +} +// GetCertificateExpirationDateTime gets the certificateExpirationDateTime property value. Certificate expiry date +func (m *ManagedAllDeviceCertificateState) GetCertificateExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateExpirationDateTime +} +// GetCertificateExtendedKeyUsages gets the certificateExtendedKeyUsages property value. Enhanced Key Usage +func (m *ManagedAllDeviceCertificateState) GetCertificateExtendedKeyUsages()(*string) { + return m.certificateExtendedKeyUsages +} +// GetCertificateIssuanceDateTime gets the certificateIssuanceDateTime property value. Issuance date +func (m *ManagedAllDeviceCertificateState) GetCertificateIssuanceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateIssuanceDateTime +} +// GetCertificateIssuerName gets the certificateIssuerName property value. Issuer +func (m *ManagedAllDeviceCertificateState) GetCertificateIssuerName()(*string) { + return m.certificateIssuerName +} +// GetCertificateKeyUsages gets the certificateKeyUsages property value. Key Usage +func (m *ManagedAllDeviceCertificateState) GetCertificateKeyUsages()(*int32) { + return m.certificateKeyUsages +} +// GetCertificateRevokeStatus gets the certificateRevokeStatus property value. Certificate Revocation Status. +func (m *ManagedAllDeviceCertificateState) GetCertificateRevokeStatus()(*CertificateRevocationStatus) { + return m.certificateRevokeStatus +} +// GetCertificateRevokeStatusLastChangeDateTime gets the certificateRevokeStatusLastChangeDateTime property value. The time the revoke status was last changed +func (m *ManagedAllDeviceCertificateState) GetCertificateRevokeStatusLastChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateRevokeStatusLastChangeDateTime +} +// GetCertificateSerialNumber gets the certificateSerialNumber property value. Serial number +func (m *ManagedAllDeviceCertificateState) GetCertificateSerialNumber()(*string) { + return m.certificateSerialNumber +} +// GetCertificateSubjectName gets the certificateSubjectName property value. Certificate subject name +func (m *ManagedAllDeviceCertificateState) GetCertificateSubjectName()(*string) { + return m.certificateSubjectName +} +// GetCertificateThumbprint gets the certificateThumbprint property value. Thumbprint +func (m *ManagedAllDeviceCertificateState) GetCertificateThumbprint()(*string) { + return m.certificateThumbprint +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAllDeviceCertificateState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["certificateExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateExpirationDateTime(val) + } + return nil + } + res["certificateExtendedKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateExtendedKeyUsages(val) + } + return nil + } + res["certificateIssuanceDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateIssuanceDateTime(val) + } + return nil + } + res["certificateIssuerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateIssuerName(val) + } + return nil + } + res["certificateKeyUsages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateKeyUsages(val) + } + return nil + } + res["certificateRevokeStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateRevocationStatus) + if err != nil { + return err + } + if val != nil { + m.SetCertificateRevokeStatus(val.(*CertificateRevocationStatus)) + } + return nil + } + res["certificateRevokeStatusLastChangeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateRevokeStatusLastChangeDateTime(val) + } + return nil + } + res["certificateSerialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSerialNumber(val) + } + return nil + } + res["certificateSubjectName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSubjectName(val) + } + return nil + } + res["certificateThumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateThumbprint(val) + } + return nil + } + res["managedDeviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetManagedDeviceDisplayName gets the managedDeviceDisplayName property value. Device display name +func (m *ManagedAllDeviceCertificateState) GetManagedDeviceDisplayName()(*string) { + return m.managedDeviceDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. User principal name +func (m *ManagedAllDeviceCertificateState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *ManagedAllDeviceCertificateState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("certificateExpirationDateTime", m.GetCertificateExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateExtendedKeyUsages", m.GetCertificateExtendedKeyUsages()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("certificateIssuanceDateTime", m.GetCertificateIssuanceDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateIssuerName", m.GetCertificateIssuerName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateKeyUsages", m.GetCertificateKeyUsages()) + if err != nil { + return err + } + } + if m.GetCertificateRevokeStatus() != nil { + cast := (*m.GetCertificateRevokeStatus()).String() + err = writer.WriteStringValue("certificateRevokeStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("certificateRevokeStatusLastChangeDateTime", m.GetCertificateRevokeStatusLastChangeDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateSerialNumber", m.GetCertificateSerialNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateSubjectName", m.GetCertificateSubjectName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateThumbprint", m.GetCertificateThumbprint()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceDisplayName", m.GetManagedDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateExpirationDateTime sets the certificateExpirationDateTime property value. Certificate expiry date +func (m *ManagedAllDeviceCertificateState) SetCertificateExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateExpirationDateTime = value +} +// SetCertificateExtendedKeyUsages sets the certificateExtendedKeyUsages property value. Enhanced Key Usage +func (m *ManagedAllDeviceCertificateState) SetCertificateExtendedKeyUsages(value *string)() { + m.certificateExtendedKeyUsages = value +} +// SetCertificateIssuanceDateTime sets the certificateIssuanceDateTime property value. Issuance date +func (m *ManagedAllDeviceCertificateState) SetCertificateIssuanceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateIssuanceDateTime = value +} +// SetCertificateIssuerName sets the certificateIssuerName property value. Issuer +func (m *ManagedAllDeviceCertificateState) SetCertificateIssuerName(value *string)() { + m.certificateIssuerName = value +} +// SetCertificateKeyUsages sets the certificateKeyUsages property value. Key Usage +func (m *ManagedAllDeviceCertificateState) SetCertificateKeyUsages(value *int32)() { + m.certificateKeyUsages = value +} +// SetCertificateRevokeStatus sets the certificateRevokeStatus property value. Certificate Revocation Status. +func (m *ManagedAllDeviceCertificateState) SetCertificateRevokeStatus(value *CertificateRevocationStatus)() { + m.certificateRevokeStatus = value +} +// SetCertificateRevokeStatusLastChangeDateTime sets the certificateRevokeStatusLastChangeDateTime property value. The time the revoke status was last changed +func (m *ManagedAllDeviceCertificateState) SetCertificateRevokeStatusLastChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateRevokeStatusLastChangeDateTime = value +} +// SetCertificateSerialNumber sets the certificateSerialNumber property value. Serial number +func (m *ManagedAllDeviceCertificateState) SetCertificateSerialNumber(value *string)() { + m.certificateSerialNumber = value +} +// SetCertificateSubjectName sets the certificateSubjectName property value. Certificate subject name +func (m *ManagedAllDeviceCertificateState) SetCertificateSubjectName(value *string)() { + m.certificateSubjectName = value +} +// SetCertificateThumbprint sets the certificateThumbprint property value. Thumbprint +func (m *ManagedAllDeviceCertificateState) SetCertificateThumbprint(value *string)() { + m.certificateThumbprint = value +} +// SetManagedDeviceDisplayName sets the managedDeviceDisplayName property value. Device display name +func (m *ManagedAllDeviceCertificateState) SetManagedDeviceDisplayName(value *string)() { + m.managedDeviceDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User principal name +func (m *ManagedAllDeviceCertificateState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_response.go new file mode 100644 index 000000000..61b8e27cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAllDeviceCertificateStateCollectionResponse +type ManagedAllDeviceCertificateStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAllDeviceCertificateStateable +} +// NewManagedAllDeviceCertificateStateCollectionResponse instantiates a new ManagedAllDeviceCertificateStateCollectionResponse and sets the default values. +func NewManagedAllDeviceCertificateStateCollectionResponse()(*ManagedAllDeviceCertificateStateCollectionResponse) { + m := &ManagedAllDeviceCertificateStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAllDeviceCertificateStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAllDeviceCertificateStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAllDeviceCertificateStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAllDeviceCertificateStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAllDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAllDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAllDeviceCertificateStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAllDeviceCertificateStateCollectionResponse) GetValue()([]ManagedAllDeviceCertificateStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAllDeviceCertificateStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAllDeviceCertificateStateCollectionResponse) SetValue(value []ManagedAllDeviceCertificateStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_responseable.go new file mode 100644 index 000000000..a331af130 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAllDeviceCertificateStateCollectionResponseable +type ManagedAllDeviceCertificateStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAllDeviceCertificateStateable) + SetValue(value []ManagedAllDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_stateable.go b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_stateable.go new file mode 100644 index 000000000..1f978d725 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_all_device_certificate_stateable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAllDeviceCertificateStateable +type ManagedAllDeviceCertificateStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateExtendedKeyUsages()(*string) + GetCertificateIssuanceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateIssuerName()(*string) + GetCertificateKeyUsages()(*int32) + GetCertificateRevokeStatus()(*CertificateRevocationStatus) + GetCertificateRevokeStatusLastChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateSerialNumber()(*string) + GetCertificateSubjectName()(*string) + GetCertificateThumbprint()(*string) + GetManagedDeviceDisplayName()(*string) + GetUserPrincipalName()(*string) + SetCertificateExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateExtendedKeyUsages(value *string)() + SetCertificateIssuanceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateIssuerName(value *string)() + SetCertificateKeyUsages(value *int32)() + SetCertificateRevokeStatus(value *CertificateRevocationStatus)() + SetCertificateRevokeStatusLastChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateSerialNumber(value *string)() + SetCertificateSubjectName(value *string)() + SetCertificateThumbprint(value *string)() + SetManagedDeviceDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_lob_app.go b/src/internal/connector/graph/betasdk/models/managed_android_lob_app.go new file mode 100644 index 000000000..1328b1fb2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_lob_app.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidLobApp +type ManagedAndroidLobApp struct { + ManagedMobileLobApp + // The Identity Name. + identityName *string + // The identity version. + identityVersion *string + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem AndroidMinimumOperatingSystemable + // The package identifier. + packageId *string + // The version code of managed Android Line of Business (LoB) app. + versionCode *string + // The version name of managed Android Line of Business (LoB) app. + versionName *string +} +// NewManagedAndroidLobApp instantiates a new ManagedAndroidLobApp and sets the default values. +func NewManagedAndroidLobApp()(*ManagedAndroidLobApp) { + m := &ManagedAndroidLobApp{ + ManagedMobileLobApp: *NewManagedMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.managedAndroidLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAndroidLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAndroidLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAndroidLobApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAndroidLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedMobileLobApp.GetFieldDeserializers() + res["identityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityName(val) + } + return nil + } + res["identityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityVersion(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(AndroidMinimumOperatingSystemable)) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + res["versionCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionCode(val) + } + return nil + } + res["versionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionName(val) + } + return nil + } + return res +} +// GetIdentityName gets the identityName property value. The Identity Name. +func (m *ManagedAndroidLobApp) GetIdentityName()(*string) { + return m.identityName +} +// GetIdentityVersion gets the identityVersion property value. The identity version. +func (m *ManagedAndroidLobApp) GetIdentityVersion()(*string) { + return m.identityVersion +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *ManagedAndroidLobApp) GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetPackageId gets the packageId property value. The package identifier. +func (m *ManagedAndroidLobApp) GetPackageId()(*string) { + return m.packageId +} +// GetVersionCode gets the versionCode property value. The version code of managed Android Line of Business (LoB) app. +func (m *ManagedAndroidLobApp) GetVersionCode()(*string) { + return m.versionCode +} +// GetVersionName gets the versionName property value. The version name of managed Android Line of Business (LoB) app. +func (m *ManagedAndroidLobApp) GetVersionName()(*string) { + return m.versionName +} +// Serialize serializes information the current object +func (m *ManagedAndroidLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedMobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("identityName", m.GetIdentityName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identityVersion", m.GetIdentityVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionCode", m.GetVersionCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionName", m.GetVersionName()) + if err != nil { + return err + } + } + return nil +} +// SetIdentityName sets the identityName property value. The Identity Name. +func (m *ManagedAndroidLobApp) SetIdentityName(value *string)() { + m.identityName = value +} +// SetIdentityVersion sets the identityVersion property value. The identity version. +func (m *ManagedAndroidLobApp) SetIdentityVersion(value *string)() { + m.identityVersion = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *ManagedAndroidLobApp) SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetPackageId sets the packageId property value. The package identifier. +func (m *ManagedAndroidLobApp) SetPackageId(value *string)() { + m.packageId = value +} +// SetVersionCode sets the versionCode property value. The version code of managed Android Line of Business (LoB) app. +func (m *ManagedAndroidLobApp) SetVersionCode(value *string)() { + m.versionCode = value +} +// SetVersionName sets the versionName property value. The version name of managed Android Line of Business (LoB) app. +func (m *ManagedAndroidLobApp) SetVersionName(value *string)() { + m.versionName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_response.go new file mode 100644 index 000000000..0f5da4dfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidLobAppCollectionResponse +type ManagedAndroidLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAndroidLobAppable +} +// NewManagedAndroidLobAppCollectionResponse instantiates a new ManagedAndroidLobAppCollectionResponse and sets the default values. +func NewManagedAndroidLobAppCollectionResponse()(*ManagedAndroidLobAppCollectionResponse) { + m := &ManagedAndroidLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAndroidLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAndroidLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAndroidLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAndroidLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAndroidLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAndroidLobAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAndroidLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAndroidLobAppCollectionResponse) GetValue()([]ManagedAndroidLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAndroidLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAndroidLobAppCollectionResponse) SetValue(value []ManagedAndroidLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_responseable.go new file mode 100644 index 000000000..e882b12aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidLobAppCollectionResponseable +type ManagedAndroidLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAndroidLobAppable) + SetValue(value []ManagedAndroidLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_lob_appable.go b/src/internal/connector/graph/betasdk/models/managed_android_lob_appable.go new file mode 100644 index 000000000..4df86cdc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_lob_appable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidLobAppable +type ManagedAndroidLobAppable interface { + ManagedMobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentityName()(*string) + GetIdentityVersion()(*string) + GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) + GetPackageId()(*string) + GetVersionCode()(*string) + GetVersionName()(*string) + SetIdentityName(value *string)() + SetIdentityVersion(value *string)() + SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() + SetPackageId(value *string)() + SetVersionCode(value *string)() + SetVersionName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_store_app.go b/src/internal/connector/graph/betasdk/models/managed_android_store_app.go new file mode 100644 index 000000000..c3cda5e4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_store_app.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidStoreApp +type ManagedAndroidStoreApp struct { + ManagedApp + // The Android AppStoreUrl. + appStoreUrl *string + // Contains properties for the minimum operating system required for an Android mobile app. + minimumSupportedOperatingSystem AndroidMinimumOperatingSystemable + // The app's package ID. + packageId *string +} +// NewManagedAndroidStoreApp instantiates a new ManagedAndroidStoreApp and sets the default values. +func NewManagedAndroidStoreApp()(*ManagedAndroidStoreApp) { + m := &ManagedAndroidStoreApp{ + ManagedApp: *NewManagedApp(), + } + odataTypeValue := "#microsoft.graph.managedAndroidStoreApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAndroidStoreAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAndroidStoreAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAndroidStoreApp(), nil +} +// GetAppStoreUrl gets the appStoreUrl property value. The Android AppStoreUrl. +func (m *ManagedAndroidStoreApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAndroidStoreApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedApp.GetFieldDeserializers() + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAndroidMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(AndroidMinimumOperatingSystemable)) + } + return nil + } + res["packageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageId(val) + } + return nil + } + return res +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. Contains properties for the minimum operating system required for an Android mobile app. +func (m *ManagedAndroidStoreApp) GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetPackageId gets the packageId property value. The app's package ID. +func (m *ManagedAndroidStoreApp) GetPackageId()(*string) { + return m.packageId +} +// Serialize serializes information the current object +func (m *ManagedAndroidStoreApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageId", m.GetPackageId()) + if err != nil { + return err + } + } + return nil +} +// SetAppStoreUrl sets the appStoreUrl property value. The Android AppStoreUrl. +func (m *ManagedAndroidStoreApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. Contains properties for the minimum operating system required for an Android mobile app. +func (m *ManagedAndroidStoreApp) SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetPackageId sets the packageId property value. The app's package ID. +func (m *ManagedAndroidStoreApp) SetPackageId(value *string)() { + m.packageId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_response.go new file mode 100644 index 000000000..f9dd8a654 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidStoreAppCollectionResponse +type ManagedAndroidStoreAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAndroidStoreAppable +} +// NewManagedAndroidStoreAppCollectionResponse instantiates a new ManagedAndroidStoreAppCollectionResponse and sets the default values. +func NewManagedAndroidStoreAppCollectionResponse()(*ManagedAndroidStoreAppCollectionResponse) { + m := &ManagedAndroidStoreAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAndroidStoreAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAndroidStoreAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAndroidStoreAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAndroidStoreAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAndroidStoreAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAndroidStoreAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAndroidStoreAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAndroidStoreAppCollectionResponse) GetValue()([]ManagedAndroidStoreAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAndroidStoreAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAndroidStoreAppCollectionResponse) SetValue(value []ManagedAndroidStoreAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_responseable.go new file mode 100644 index 000000000..0c86fa36a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_store_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidStoreAppCollectionResponseable +type ManagedAndroidStoreAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAndroidStoreAppable) + SetValue(value []ManagedAndroidStoreAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_android_store_appable.go b/src/internal/connector/graph/betasdk/models/managed_android_store_appable.go new file mode 100644 index 000000000..b90795cd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_android_store_appable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAndroidStoreAppable +type ManagedAndroidStoreAppable interface { + ManagedAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppStoreUrl()(*string) + GetMinimumSupportedOperatingSystem()(AndroidMinimumOperatingSystemable) + GetPackageId()(*string) + SetAppStoreUrl(value *string)() + SetMinimumSupportedOperatingSystem(value AndroidMinimumOperatingSystemable)() + SetPackageId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app.go b/src/internal/connector/graph/betasdk/models/managed_app.go new file mode 100644 index 000000000..a6dc3f535 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedApp +type ManagedApp struct { + MobileApp + // A managed (MAM) application's availability. + appAvailability *ManagedAppAvailability + // The Application's version. + version *string +} +// NewManagedApp instantiates a new ManagedApp and sets the default values. +func NewManagedApp()(*ManagedApp) { + m := &ManagedApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.managedApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.managedAndroidLobApp": + return NewManagedAndroidLobApp(), nil + case "#microsoft.graph.managedAndroidStoreApp": + return NewManagedAndroidStoreApp(), nil + case "#microsoft.graph.managedIOSLobApp": + return NewManagedIOSLobApp(), nil + case "#microsoft.graph.managedIOSStoreApp": + return NewManagedIOSStoreApp(), nil + case "#microsoft.graph.managedMobileLobApp": + return NewManagedMobileLobApp(), nil + } + } + } + } + return NewManagedApp(), nil +} +// GetAppAvailability gets the appAvailability property value. A managed (MAM) application's availability. +func (m *ManagedApp) GetAppAvailability()(*ManagedAppAvailability) { + return m.appAvailability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["appAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppAvailability) + if err != nil { + return err + } + if val != nil { + m.SetAppAvailability(val.(*ManagedAppAvailability)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetVersion gets the version property value. The Application's version. +func (m *ManagedApp) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + if m.GetAppAvailability() != nil { + cast := (*m.GetAppAvailability()).String() + err = writer.WriteStringValue("appAvailability", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAppAvailability sets the appAvailability property value. A managed (MAM) application's availability. +func (m *ManagedApp) SetAppAvailability(value *ManagedAppAvailability)() { + m.appAvailability = value +} +// SetVersion sets the version property value. The Application's version. +func (m *ManagedApp) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_availability.go b/src/internal/connector/graph/betasdk/models/managed_app_availability.go new file mode 100644 index 000000000..27deee428 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_availability.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppAvailability int + +const ( + // A globally available app to all tenants. + GLOBAL_MANAGEDAPPAVAILABILITY ManagedAppAvailability = iota + // A line of business apps private to an organization. + LINEOFBUSINESS_MANAGEDAPPAVAILABILITY +) + +func (i ManagedAppAvailability) String() string { + return []string{"global", "lineOfBusiness"}[i] +} +func ParseManagedAppAvailability(v string) (interface{}, error) { + result := GLOBAL_MANAGEDAPPAVAILABILITY + switch v { + case "global": + result = GLOBAL_MANAGEDAPPAVAILABILITY + case "lineOfBusiness": + result = LINEOFBUSINESS_MANAGEDAPPAVAILABILITY + default: + return 0, errors.New("Unknown ManagedAppAvailability value: " + v) + } + return &result, nil +} +func SerializeManagedAppAvailability(values []ManagedAppAvailability) []string { + 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/managed_app_clipboard_sharing_level.go b/src/internal/connector/graph/betasdk/models/managed_app_clipboard_sharing_level.go new file mode 100644 index 000000000..3391b7f6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_clipboard_sharing_level.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppClipboardSharingLevel int + +const ( + // Sharing is allowed between all apps, managed or not + ALLAPPS_MANAGEDAPPCLIPBOARDSHARINGLEVEL ManagedAppClipboardSharingLevel = iota + // Sharing is allowed between all managed apps with paste in enabled + MANAGEDAPPSWITHPASTEIN_MANAGEDAPPCLIPBOARDSHARINGLEVEL + // Sharing is allowed between all managed apps + MANAGEDAPPS_MANAGEDAPPCLIPBOARDSHARINGLEVEL + // Sharing between apps is disabled + BLOCKED_MANAGEDAPPCLIPBOARDSHARINGLEVEL +) + +func (i ManagedAppClipboardSharingLevel) String() string { + return []string{"allApps", "managedAppsWithPasteIn", "managedApps", "blocked"}[i] +} +func ParseManagedAppClipboardSharingLevel(v string) (interface{}, error) { + result := ALLAPPS_MANAGEDAPPCLIPBOARDSHARINGLEVEL + switch v { + case "allApps": + result = ALLAPPS_MANAGEDAPPCLIPBOARDSHARINGLEVEL + case "managedAppsWithPasteIn": + result = MANAGEDAPPSWITHPASTEIN_MANAGEDAPPCLIPBOARDSHARINGLEVEL + case "managedApps": + result = MANAGEDAPPS_MANAGEDAPPCLIPBOARDSHARINGLEVEL + case "blocked": + result = BLOCKED_MANAGEDAPPCLIPBOARDSHARINGLEVEL + default: + return 0, errors.New("Unknown ManagedAppClipboardSharingLevel value: " + v) + } + return &result, nil +} +func SerializeManagedAppClipboardSharingLevel(values []ManagedAppClipboardSharingLevel) []string { + 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/managed_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_collection_response.go new file mode 100644 index 000000000..ed9a3614d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppCollectionResponse +type ManagedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppable +} +// NewManagedAppCollectionResponse instantiates a new ManagedAppCollectionResponse and sets the default values. +func NewManagedAppCollectionResponse()(*ManagedAppCollectionResponse) { + m := &ManagedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppCollectionResponse) GetValue()([]ManagedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppCollectionResponse) SetValue(value []ManagedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_collection_responseable.go new file mode 100644 index 000000000..2def5664b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppCollectionResponseable +type ManagedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppable) + SetValue(value []ManagedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_configuration.go b/src/internal/connector/graph/betasdk/models/managed_app_configuration.go new file mode 100644 index 000000000..9aea4c3e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_configuration.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppConfiguration +type ManagedAppConfiguration struct { + ManagedAppPolicy + // A set of string key and string value pairs to be sent to apps for users to whom the configuration is scoped, unalterned by this service + customSettings []KeyValuePairable +} +// NewManagedAppConfiguration instantiates a new ManagedAppConfiguration and sets the default values. +func NewManagedAppConfiguration()(*ManagedAppConfiguration) { + m := &ManagedAppConfiguration{ + ManagedAppPolicy: *NewManagedAppPolicy(), + } + odataTypeValue := "#microsoft.graph.managedAppConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.targetedManagedAppConfiguration": + return NewTargetedManagedAppConfiguration(), nil + } + } + } + } + return NewManagedAppConfiguration(), nil +} +// GetCustomSettings gets the customSettings property value. A set of string key and string value pairs to be sent to apps for users to whom the configuration is scoped, unalterned by this service +func (m *ManagedAppConfiguration) GetCustomSettings()([]KeyValuePairable) { + return m.customSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppPolicy.GetFieldDeserializers() + res["customSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetCustomSettings(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ManagedAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppPolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetCustomSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomSettings())) + for i, v := range m.GetCustomSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetCustomSettings sets the customSettings property value. A set of string key and string value pairs to be sent to apps for users to whom the configuration is scoped, unalterned by this service +func (m *ManagedAppConfiguration) SetCustomSettings(value []KeyValuePairable)() { + m.customSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_response.go new file mode 100644 index 000000000..5e5a79a8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppConfigurationCollectionResponse +type ManagedAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppConfigurationable +} +// NewManagedAppConfigurationCollectionResponse instantiates a new ManagedAppConfigurationCollectionResponse and sets the default values. +func NewManagedAppConfigurationCollectionResponse()(*ManagedAppConfigurationCollectionResponse) { + m := &ManagedAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppConfigurationCollectionResponse) GetValue()([]ManagedAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppConfigurationCollectionResponse) SetValue(value []ManagedAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_responseable.go new file mode 100644 index 000000000..b74d30457 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppConfigurationCollectionResponseable +type ManagedAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppConfigurationable) + SetValue(value []ManagedAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_configurationable.go b/src/internal/connector/graph/betasdk/models/managed_app_configurationable.go new file mode 100644 index 000000000..8f60ec899 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppConfigurationable +type ManagedAppConfigurationable interface { + ManagedAppPolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomSettings()([]KeyValuePairable) + SetCustomSettings(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_data_encryption_type.go b/src/internal/connector/graph/betasdk/models/managed_app_data_encryption_type.go new file mode 100644 index 000000000..793880793 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_data_encryption_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppDataEncryptionType int + +const ( + // App data is encrypted based on the default settings on the device. + USEDEVICESETTINGS_MANAGEDAPPDATAENCRYPTIONTYPE ManagedAppDataEncryptionType = iota + // App data is encrypted when the device is restarted. + AFTERDEVICERESTART_MANAGEDAPPDATAENCRYPTIONTYPE + // App data associated with this policy is encrypted when the device is locked, except data in files that are open + WHENDEVICELOCKEDEXCEPTOPENFILES_MANAGEDAPPDATAENCRYPTIONTYPE + // App data associated with this policy is encrypted when the device is locked + WHENDEVICELOCKED_MANAGEDAPPDATAENCRYPTIONTYPE +) + +func (i ManagedAppDataEncryptionType) String() string { + return []string{"useDeviceSettings", "afterDeviceRestart", "whenDeviceLockedExceptOpenFiles", "whenDeviceLocked"}[i] +} +func ParseManagedAppDataEncryptionType(v string) (interface{}, error) { + result := USEDEVICESETTINGS_MANAGEDAPPDATAENCRYPTIONTYPE + switch v { + case "useDeviceSettings": + result = USEDEVICESETTINGS_MANAGEDAPPDATAENCRYPTIONTYPE + case "afterDeviceRestart": + result = AFTERDEVICERESTART_MANAGEDAPPDATAENCRYPTIONTYPE + case "whenDeviceLockedExceptOpenFiles": + result = WHENDEVICELOCKEDEXCEPTOPENFILES_MANAGEDAPPDATAENCRYPTIONTYPE + case "whenDeviceLocked": + result = WHENDEVICELOCKED_MANAGEDAPPDATAENCRYPTIONTYPE + default: + return 0, errors.New("Unknown ManagedAppDataEncryptionType value: " + v) + } + return &result, nil +} +func SerializeManagedAppDataEncryptionType(values []ManagedAppDataEncryptionType) []string { + 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/managed_app_data_ingestion_location.go b/src/internal/connector/graph/betasdk/models/managed_app_data_ingestion_location.go new file mode 100644 index 000000000..35a632802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_data_ingestion_location.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppDataIngestionLocation int + +const ( + // OneDrive for business + ONEDRIVEFORBUSINESS_MANAGEDAPPDATAINGESTIONLOCATION ManagedAppDataIngestionLocation = iota + // SharePoint Online + SHAREPOINT_MANAGEDAPPDATAINGESTIONLOCATION + // The device's camera + CAMERA_MANAGEDAPPDATAINGESTIONLOCATION + // The device's photo library + PHOTOLIBRARY_MANAGEDAPPDATAINGESTIONLOCATION +) + +func (i ManagedAppDataIngestionLocation) String() string { + return []string{"oneDriveForBusiness", "sharePoint", "camera", "photoLibrary"}[i] +} +func ParseManagedAppDataIngestionLocation(v string) (interface{}, error) { + result := ONEDRIVEFORBUSINESS_MANAGEDAPPDATAINGESTIONLOCATION + switch v { + case "oneDriveForBusiness": + result = ONEDRIVEFORBUSINESS_MANAGEDAPPDATAINGESTIONLOCATION + case "sharePoint": + result = SHAREPOINT_MANAGEDAPPDATAINGESTIONLOCATION + case "camera": + result = CAMERA_MANAGEDAPPDATAINGESTIONLOCATION + case "photoLibrary": + result = PHOTOLIBRARY_MANAGEDAPPDATAINGESTIONLOCATION + default: + return 0, errors.New("Unknown ManagedAppDataIngestionLocation value: " + v) + } + return &result, nil +} +func SerializeManagedAppDataIngestionLocation(values []ManagedAppDataIngestionLocation) []string { + 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/managed_app_data_storage_location.go b/src/internal/connector/graph/betasdk/models/managed_app_data_storage_location.go new file mode 100644 index 000000000..276dcbfc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_data_storage_location.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppDataStorageLocation int + +const ( + // OneDrive for business + ONEDRIVEFORBUSINESS_MANAGEDAPPDATASTORAGELOCATION ManagedAppDataStorageLocation = iota + // SharePoint + SHAREPOINT_MANAGEDAPPDATASTORAGELOCATION + // Box + BOX_MANAGEDAPPDATASTORAGELOCATION + // Local storage on the device + LOCALSTORAGE_MANAGEDAPPDATASTORAGELOCATION + // The device's photo library + PHOTOLIBRARY_MANAGEDAPPDATASTORAGELOCATION +) + +func (i ManagedAppDataStorageLocation) String() string { + return []string{"oneDriveForBusiness", "sharePoint", "box", "localStorage", "photoLibrary"}[i] +} +func ParseManagedAppDataStorageLocation(v string) (interface{}, error) { + result := ONEDRIVEFORBUSINESS_MANAGEDAPPDATASTORAGELOCATION + switch v { + case "oneDriveForBusiness": + result = ONEDRIVEFORBUSINESS_MANAGEDAPPDATASTORAGELOCATION + case "sharePoint": + result = SHAREPOINT_MANAGEDAPPDATASTORAGELOCATION + case "box": + result = BOX_MANAGEDAPPDATASTORAGELOCATION + case "localStorage": + result = LOCALSTORAGE_MANAGEDAPPDATASTORAGELOCATION + case "photoLibrary": + result = PHOTOLIBRARY_MANAGEDAPPDATASTORAGELOCATION + default: + return 0, errors.New("Unknown ManagedAppDataStorageLocation value: " + v) + } + return &result, nil +} +func SerializeManagedAppDataStorageLocation(values []ManagedAppDataStorageLocation) []string { + 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/managed_app_data_transfer_level.go b/src/internal/connector/graph/betasdk/models/managed_app_data_transfer_level.go new file mode 100644 index 000000000..847067a71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_data_transfer_level.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppDataTransferLevel int + +const ( + // All apps. + ALLAPPS_MANAGEDAPPDATATRANSFERLEVEL ManagedAppDataTransferLevel = iota + // Managed apps. + MANAGEDAPPS_MANAGEDAPPDATATRANSFERLEVEL + // No apps. + NONE_MANAGEDAPPDATATRANSFERLEVEL +) + +func (i ManagedAppDataTransferLevel) String() string { + return []string{"allApps", "managedApps", "none"}[i] +} +func ParseManagedAppDataTransferLevel(v string) (interface{}, error) { + result := ALLAPPS_MANAGEDAPPDATATRANSFERLEVEL + switch v { + case "allApps": + result = ALLAPPS_MANAGEDAPPDATATRANSFERLEVEL + case "managedApps": + result = MANAGEDAPPS_MANAGEDAPPDATATRANSFERLEVEL + case "none": + result = NONE_MANAGEDAPPDATATRANSFERLEVEL + default: + return 0, errors.New("Unknown ManagedAppDataTransferLevel value: " + v) + } + return &result, nil +} +func SerializeManagedAppDataTransferLevel(values []ManagedAppDataTransferLevel) []string { + 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/managed_app_device_threat_level.go b/src/internal/connector/graph/betasdk/models/managed_app_device_threat_level.go new file mode 100644 index 000000000..93edf9de9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_device_threat_level.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppDeviceThreatLevel int + +const ( + // Value not configured + NOTCONFIGURED_MANAGEDAPPDEVICETHREATLEVEL ManagedAppDeviceThreatLevel = iota + // Device needs to have no threat + SECURED_MANAGEDAPPDEVICETHREATLEVEL + // Device needs to have a low threat. + LOW_MANAGEDAPPDEVICETHREATLEVEL + // Device needs to have not more than medium threat. + MEDIUM_MANAGEDAPPDEVICETHREATLEVEL + // Device needs to have not more than high threat + HIGH_MANAGEDAPPDEVICETHREATLEVEL +) + +func (i ManagedAppDeviceThreatLevel) String() string { + return []string{"notConfigured", "secured", "low", "medium", "high"}[i] +} +func ParseManagedAppDeviceThreatLevel(v string) (interface{}, error) { + result := NOTCONFIGURED_MANAGEDAPPDEVICETHREATLEVEL + switch v { + case "notConfigured": + result = NOTCONFIGURED_MANAGEDAPPDEVICETHREATLEVEL + case "secured": + result = SECURED_MANAGEDAPPDEVICETHREATLEVEL + case "low": + result = LOW_MANAGEDAPPDEVICETHREATLEVEL + case "medium": + result = MEDIUM_MANAGEDAPPDEVICETHREATLEVEL + case "high": + result = HIGH_MANAGEDAPPDEVICETHREATLEVEL + default: + return 0, errors.New("Unknown ManagedAppDeviceThreatLevel value: " + v) + } + return &result, nil +} +func SerializeManagedAppDeviceThreatLevel(values []ManagedAppDeviceThreatLevel) []string { + 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/managed_app_flagged_reason.go b/src/internal/connector/graph/betasdk/models/managed_app_flagged_reason.go new file mode 100644 index 000000000..2d7b6a33c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_flagged_reason.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppFlaggedReason int + +const ( + // No issue. + NONE_MANAGEDAPPFLAGGEDREASON ManagedAppFlaggedReason = iota + // The app registration is running on a rooted/unlocked device. + ROOTEDDEVICE_MANAGEDAPPFLAGGEDREASON + // The app registration is running on an Android device on which the bootloader is unlocked. + ANDROIDBOOTLOADERUNLOCKED_MANAGEDAPPFLAGGEDREASON + // The app registration is running on an Android device on which the factory ROM has been modified. + ANDROIDFACTORYROMMODIFIED_MANAGEDAPPFLAGGEDREASON +) + +func (i ManagedAppFlaggedReason) String() string { + return []string{"none", "rootedDevice", "androidBootloaderUnlocked", "androidFactoryRomModified"}[i] +} +func ParseManagedAppFlaggedReason(v string) (interface{}, error) { + result := NONE_MANAGEDAPPFLAGGEDREASON + switch v { + case "none": + result = NONE_MANAGEDAPPFLAGGEDREASON + case "rootedDevice": + result = ROOTEDDEVICE_MANAGEDAPPFLAGGEDREASON + case "androidBootloaderUnlocked": + result = ANDROIDBOOTLOADERUNLOCKED_MANAGEDAPPFLAGGEDREASON + case "androidFactoryRomModified": + result = ANDROIDFACTORYROMMODIFIED_MANAGEDAPPFLAGGEDREASON + default: + return 0, errors.New("Unknown ManagedAppFlaggedReason value: " + v) + } + return &result, nil +} +func SerializeManagedAppFlaggedReason(values []ManagedAppFlaggedReason) []string { + 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/managed_app_notification_restriction.go b/src/internal/connector/graph/betasdk/models/managed_app_notification_restriction.go new file mode 100644 index 000000000..86d1f9b59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_notification_restriction.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppNotificationRestriction int + +const ( + // Share all notifications. + ALLOW_MANAGEDAPPNOTIFICATIONRESTRICTION ManagedAppNotificationRestriction = iota + // Do not share Orgnizational data in notifications. + BLOCKORGANIZATIONALDATA_MANAGEDAPPNOTIFICATIONRESTRICTION + // Do not share notifications. + BLOCK_MANAGEDAPPNOTIFICATIONRESTRICTION +) + +func (i ManagedAppNotificationRestriction) String() string { + return []string{"allow", "blockOrganizationalData", "block"}[i] +} +func ParseManagedAppNotificationRestriction(v string) (interface{}, error) { + result := ALLOW_MANAGEDAPPNOTIFICATIONRESTRICTION + switch v { + case "allow": + result = ALLOW_MANAGEDAPPNOTIFICATIONRESTRICTION + case "blockOrganizationalData": + result = BLOCKORGANIZATIONALDATA_MANAGEDAPPNOTIFICATIONRESTRICTION + case "block": + result = BLOCK_MANAGEDAPPNOTIFICATIONRESTRICTION + default: + return 0, errors.New("Unknown ManagedAppNotificationRestriction value: " + v) + } + return &result, nil +} +func SerializeManagedAppNotificationRestriction(values []ManagedAppNotificationRestriction) []string { + 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/managed_app_operation.go b/src/internal/connector/graph/betasdk/models/managed_app_operation.go new file mode 100644 index 000000000..14d0bdd3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_operation.go @@ -0,0 +1,139 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppOperation represents an operation applied against an app registration. +type ManagedAppOperation struct { + Entity + // The operation name. + displayName *string + // The last time the app operation was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The current state of the operation + state *string + // Version of the entity. + version *string +} +// NewManagedAppOperation instantiates a new managedAppOperation and sets the default values. +func NewManagedAppOperation()(*ManagedAppOperation) { + m := &ManagedAppOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAppOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppOperation(), nil +} +// GetDisplayName gets the displayName property value. The operation name. +func (m *ManagedAppOperation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last time the app operation was modified. +func (m *ManagedAppOperation) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetState gets the state property value. The current state of the operation +func (m *ManagedAppOperation) GetState()(*string) { + return m.state +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedAppOperation) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedAppOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The operation name. +func (m *ManagedAppOperation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last time the app operation was modified. +func (m *ManagedAppOperation) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetState sets the state property value. The current state of the operation +func (m *ManagedAppOperation) SetState(value *string)() { + m.state = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedAppOperation) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_response.go new file mode 100644 index 000000000..ab11875d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppOperationCollectionResponse +type ManagedAppOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppOperationable +} +// NewManagedAppOperationCollectionResponse instantiates a new ManagedAppOperationCollectionResponse and sets the default values. +func NewManagedAppOperationCollectionResponse()(*ManagedAppOperationCollectionResponse) { + m := &ManagedAppOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppOperationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppOperationCollectionResponse) GetValue()([]ManagedAppOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppOperationCollectionResponse) SetValue(value []ManagedAppOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_responseable.go new file mode 100644 index 000000000..729225b0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppOperationCollectionResponseable +type ManagedAppOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppOperationable) + SetValue(value []ManagedAppOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_operationable.go b/src/internal/connector/graph/betasdk/models/managed_app_operationable.go new file mode 100644 index 000000000..cc5897f38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_operationable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppOperationable +type ManagedAppOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetState()(*string) + GetVersion()(*string) + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetState(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_phone_number_redirect_level.go b/src/internal/connector/graph/betasdk/models/managed_app_phone_number_redirect_level.go new file mode 100644 index 000000000..eb17109ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_phone_number_redirect_level.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppPhoneNumberRedirectLevel int + +const ( + // Sharing is allowed to all apps. + ALLAPPS_MANAGEDAPPPHONENUMBERREDIRECTLEVEL ManagedAppPhoneNumberRedirectLevel = iota + // Sharing is allowed to all managed apps. + MANAGEDAPPS_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + // Sharing is allowed to a custom app. + CUSTOMAPP_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + // Sharing between apps is blocked. + BLOCKED_MANAGEDAPPPHONENUMBERREDIRECTLEVEL +) + +func (i ManagedAppPhoneNumberRedirectLevel) String() string { + return []string{"allApps", "managedApps", "customApp", "blocked"}[i] +} +func ParseManagedAppPhoneNumberRedirectLevel(v string) (interface{}, error) { + result := ALLAPPS_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + switch v { + case "allApps": + result = ALLAPPS_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + case "managedApps": + result = MANAGEDAPPS_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + case "customApp": + result = CUSTOMAPP_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + case "blocked": + result = BLOCKED_MANAGEDAPPPHONENUMBERREDIRECTLEVEL + default: + return 0, errors.New("Unknown ManagedAppPhoneNumberRedirectLevel value: " + v) + } + return &result, nil +} +func SerializeManagedAppPhoneNumberRedirectLevel(values []ManagedAppPhoneNumberRedirectLevel) []string { + 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/managed_app_pin_character_set.go b/src/internal/connector/graph/betasdk/models/managed_app_pin_character_set.go new file mode 100644 index 000000000..60cb258cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_pin_character_set.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppPinCharacterSet int + +const ( + // Numeric characters + NUMERIC_MANAGEDAPPPINCHARACTERSET ManagedAppPinCharacterSet = iota + // Alphanumeric and symbolic characters + ALPHANUMERICANDSYMBOL_MANAGEDAPPPINCHARACTERSET +) + +func (i ManagedAppPinCharacterSet) String() string { + return []string{"numeric", "alphanumericAndSymbol"}[i] +} +func ParseManagedAppPinCharacterSet(v string) (interface{}, error) { + result := NUMERIC_MANAGEDAPPPINCHARACTERSET + switch v { + case "numeric": + result = NUMERIC_MANAGEDAPPPINCHARACTERSET + case "alphanumericAndSymbol": + result = ALPHANUMERICANDSYMBOL_MANAGEDAPPPINCHARACTERSET + default: + return 0, errors.New("Unknown ManagedAppPinCharacterSet value: " + v) + } + return &result, nil +} +func SerializeManagedAppPinCharacterSet(values []ManagedAppPinCharacterSet) []string { + 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/managed_app_policy.go b/src/internal/connector/graph/betasdk/models/managed_app_policy.go new file mode 100644 index 000000000..089035250 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy.go @@ -0,0 +1,233 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicy the ManagedAppPolicy resource represents a base type for platform specific policies. +type ManagedAppPolicy struct { + Entity + // The date and time the policy was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The policy's description. + description *string + // Policy display name. + displayName *string + // Last time the policy was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // Version of the entity. + version *string +} +// NewManagedAppPolicy instantiates a new managedAppPolicy and sets the default values. +func NewManagedAppPolicy()(*ManagedAppPolicy) { + m := &ManagedAppPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAppPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidManagedAppProtection": + return NewAndroidManagedAppProtection(), nil + case "#microsoft.graph.defaultManagedAppProtection": + return NewDefaultManagedAppProtection(), nil + case "#microsoft.graph.iosManagedAppProtection": + return NewIosManagedAppProtection(), nil + case "#microsoft.graph.managedAppConfiguration": + return NewManagedAppConfiguration(), nil + case "#microsoft.graph.managedAppProtection": + return NewManagedAppProtection(), nil + case "#microsoft.graph.mdmWindowsInformationProtectionPolicy": + return NewMdmWindowsInformationProtectionPolicy(), nil + case "#microsoft.graph.targetedManagedAppConfiguration": + return NewTargetedManagedAppConfiguration(), nil + case "#microsoft.graph.targetedManagedAppProtection": + return NewTargetedManagedAppProtection(), nil + case "#microsoft.graph.windowsInformationProtection": + return NewWindowsInformationProtection(), nil + case "#microsoft.graph.windowsInformationProtectionPolicy": + return NewWindowsInformationProtectionPolicy(), nil + case "#microsoft.graph.windowsManagedAppProtection": + return NewWindowsManagedAppProtection(), nil + } + } + } + } + return NewManagedAppPolicy(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the policy was created. +func (m *ManagedAppPolicy) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The policy's description. +func (m *ManagedAppPolicy) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Policy display name. +func (m *ManagedAppPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last time the policy was modified. +func (m *ManagedAppPolicy) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *ManagedAppPolicy) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedAppPolicy) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedAppPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the policy was created. +func (m *ManagedAppPolicy) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The policy's description. +func (m *ManagedAppPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Policy display name. +func (m *ManagedAppPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last time the policy was modified. +func (m *ManagedAppPolicy) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *ManagedAppPolicy) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedAppPolicy) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_response.go new file mode 100644 index 000000000..787ed28b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyCollectionResponse +type ManagedAppPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppPolicyable +} +// NewManagedAppPolicyCollectionResponse instantiates a new ManagedAppPolicyCollectionResponse and sets the default values. +func NewManagedAppPolicyCollectionResponse()(*ManagedAppPolicyCollectionResponse) { + m := &ManagedAppPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppPolicyCollectionResponse) GetValue()([]ManagedAppPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppPolicyCollectionResponse) SetValue(value []ManagedAppPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_responseable.go new file mode 100644 index 000000000..449a7a306 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyCollectionResponseable +type ManagedAppPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppPolicyable) + SetValue(value []ManagedAppPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary.go new file mode 100644 index 000000000..7f8dd7537 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary.go @@ -0,0 +1,173 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummary +type ManagedAppPolicyDeploymentSummary struct { + Entity + // Not yet documented + configurationDeployedUserCount *int32 + // Not yet documented + configurationDeploymentSummaryPerApp []ManagedAppPolicyDeploymentSummaryPerAppable + // Not yet documented + displayName *string + // Not yet documented + lastRefreshTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Version of the entity. + version *string +} +// NewManagedAppPolicyDeploymentSummary instantiates a new managedAppPolicyDeploymentSummary and sets the default values. +func NewManagedAppPolicyDeploymentSummary()(*ManagedAppPolicyDeploymentSummary) { + m := &ManagedAppPolicyDeploymentSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAppPolicyDeploymentSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppPolicyDeploymentSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppPolicyDeploymentSummary(), nil +} +// GetConfigurationDeployedUserCount gets the configurationDeployedUserCount property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) GetConfigurationDeployedUserCount()(*int32) { + return m.configurationDeployedUserCount +} +// GetConfigurationDeploymentSummaryPerApp gets the configurationDeploymentSummaryPerApp property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) GetConfigurationDeploymentSummaryPerApp()([]ManagedAppPolicyDeploymentSummaryPerAppable) { + return m.configurationDeploymentSummaryPerApp +} +// GetDisplayName gets the displayName property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppPolicyDeploymentSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationDeployedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationDeployedUserCount(val) + } + return nil + } + res["configurationDeploymentSummaryPerApp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyDeploymentSummaryPerAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyDeploymentSummaryPerAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyDeploymentSummaryPerAppable) + } + m.SetConfigurationDeploymentSummaryPerApp(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastRefreshTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshTime(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastRefreshTime gets the lastRefreshTime property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) GetLastRefreshTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshTime +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedAppPolicyDeploymentSummary) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedAppPolicyDeploymentSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationDeployedUserCount", m.GetConfigurationDeployedUserCount()) + if err != nil { + return err + } + } + if m.GetConfigurationDeploymentSummaryPerApp() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurationDeploymentSummaryPerApp())) + for i, v := range m.GetConfigurationDeploymentSummaryPerApp() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurationDeploymentSummaryPerApp", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshTime", m.GetLastRefreshTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationDeployedUserCount sets the configurationDeployedUserCount property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) SetConfigurationDeployedUserCount(value *int32)() { + m.configurationDeployedUserCount = value +} +// SetConfigurationDeploymentSummaryPerApp sets the configurationDeploymentSummaryPerApp property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) SetConfigurationDeploymentSummaryPerApp(value []ManagedAppPolicyDeploymentSummaryPerAppable)() { + m.configurationDeploymentSummaryPerApp = value +} +// SetDisplayName sets the displayName property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastRefreshTime sets the lastRefreshTime property value. Not yet documented +func (m *ManagedAppPolicyDeploymentSummary) SetLastRefreshTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshTime = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedAppPolicyDeploymentSummary) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app.go new file mode 100644 index 000000000..bccfb0bb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummaryPerApp represents policy deployment summary per app. +type ManagedAppPolicyDeploymentSummaryPerApp struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Number of users the policy is applied. + configurationAppliedUserCount *int32 + // Deployment of an app. + mobileAppIdentifier MobileAppIdentifierable + // The OdataType property + odataType *string +} +// NewManagedAppPolicyDeploymentSummaryPerApp instantiates a new managedAppPolicyDeploymentSummaryPerApp and sets the default values. +func NewManagedAppPolicyDeploymentSummaryPerApp()(*ManagedAppPolicyDeploymentSummaryPerApp) { + m := &ManagedAppPolicyDeploymentSummaryPerApp{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagedAppPolicyDeploymentSummaryPerAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppPolicyDeploymentSummaryPerAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppPolicyDeploymentSummaryPerApp(), 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 *ManagedAppPolicyDeploymentSummaryPerApp) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfigurationAppliedUserCount gets the configurationAppliedUserCount property value. Number of users the policy is applied. +func (m *ManagedAppPolicyDeploymentSummaryPerApp) GetConfigurationAppliedUserCount()(*int32) { + return m.configurationAppliedUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppPolicyDeploymentSummaryPerApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["configurationAppliedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationAppliedUserCount(val) + } + return nil + } + res["mobileAppIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMobileAppIdentifier(val.(MobileAppIdentifierable)) + } + 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 + } + return res +} +// GetMobileAppIdentifier gets the mobileAppIdentifier property value. Deployment of an app. +func (m *ManagedAppPolicyDeploymentSummaryPerApp) GetMobileAppIdentifier()(MobileAppIdentifierable) { + return m.mobileAppIdentifier +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagedAppPolicyDeploymentSummaryPerApp) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagedAppPolicyDeploymentSummaryPerApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("configurationAppliedUserCount", m.GetConfigurationAppliedUserCount()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("mobileAppIdentifier", m.GetMobileAppIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagedAppPolicyDeploymentSummaryPerApp) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfigurationAppliedUserCount sets the configurationAppliedUserCount property value. Number of users the policy is applied. +func (m *ManagedAppPolicyDeploymentSummaryPerApp) SetConfigurationAppliedUserCount(value *int32)() { + m.configurationAppliedUserCount = value +} +// SetMobileAppIdentifier sets the mobileAppIdentifier property value. Deployment of an app. +func (m *ManagedAppPolicyDeploymentSummaryPerApp) SetMobileAppIdentifier(value MobileAppIdentifierable)() { + m.mobileAppIdentifier = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagedAppPolicyDeploymentSummaryPerApp) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_response.go new file mode 100644 index 000000000..14bea638c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse +type ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppPolicyDeploymentSummaryPerAppable +} +// NewManagedAppPolicyDeploymentSummaryPerAppCollectionResponse instantiates a new ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse and sets the default values. +func NewManagedAppPolicyDeploymentSummaryPerAppCollectionResponse()(*ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse) { + m := &ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppPolicyDeploymentSummaryPerAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppPolicyDeploymentSummaryPerAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppPolicyDeploymentSummaryPerAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyDeploymentSummaryPerAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyDeploymentSummaryPerAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyDeploymentSummaryPerAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse) GetValue()([]ManagedAppPolicyDeploymentSummaryPerAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppPolicyDeploymentSummaryPerAppCollectionResponse) SetValue(value []ManagedAppPolicyDeploymentSummaryPerAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_responseable.go new file mode 100644 index 000000000..55623f283 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummaryPerAppCollectionResponseable +type ManagedAppPolicyDeploymentSummaryPerAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppPolicyDeploymentSummaryPerAppable) + SetValue(value []ManagedAppPolicyDeploymentSummaryPerAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_appable.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_appable.go new file mode 100644 index 000000000..a6c107b33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summary_per_appable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummaryPerAppable +type ManagedAppPolicyDeploymentSummaryPerAppable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationAppliedUserCount()(*int32) + GetMobileAppIdentifier()(MobileAppIdentifierable) + GetOdataType()(*string) + SetConfigurationAppliedUserCount(value *int32)() + SetMobileAppIdentifier(value MobileAppIdentifierable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summaryable.go b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summaryable.go new file mode 100644 index 000000000..cbdf6d9c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policy_deployment_summaryable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyDeploymentSummaryable +type ManagedAppPolicyDeploymentSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationDeployedUserCount()(*int32) + GetConfigurationDeploymentSummaryPerApp()([]ManagedAppPolicyDeploymentSummaryPerAppable) + GetDisplayName()(*string) + GetLastRefreshTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetVersion()(*string) + SetConfigurationDeployedUserCount(value *int32)() + SetConfigurationDeploymentSummaryPerApp(value []ManagedAppPolicyDeploymentSummaryPerAppable)() + SetDisplayName(value *string)() + SetLastRefreshTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_policyable.go b/src/internal/connector/graph/betasdk/models/managed_app_policyable.go new file mode 100644 index 000000000..6056cf340 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_policyable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppPolicyable +type ManagedAppPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetVersion()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection.go b/src/internal/connector/graph/betasdk/models/managed_app_protection.go new file mode 100644 index 000000000..faf455824 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection.go @@ -0,0 +1,1277 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtection +type ManagedAppProtection struct { + ManagedAppPolicy + // Data storage locations where a user may store managed data. + allowedDataIngestionLocations []ManagedAppDataIngestionLocation + // Data storage locations where a user may store managed data. + allowedDataStorageLocations []ManagedAppDataStorageLocation + // Data can be transferred from/to these classes of apps + allowedInboundDataTransferSources *ManagedAppDataTransferLevel + // Specify the number of characters that may be cut or copied from Org data and accounts to any application. This setting overrides the AllowedOutboundClipboardSharingLevel restriction. Default value of '0' means no exception is allowed. + allowedOutboundClipboardSharingExceptionLength *int32 + // Represents the level to which the device's clipboard may be shared between apps + allowedOutboundClipboardSharingLevel *ManagedAppClipboardSharingLevel + // Data can be transferred from/to these classes of apps + allowedOutboundDataTransferDestinations *ManagedAppDataTransferLevel + // An admin initiated action to be applied on a managed app. + appActionIfDeviceComplianceRequired *ManagedAppRemediationAction + // An admin initiated action to be applied on a managed app. + appActionIfMaximumPinRetriesExceeded *ManagedAppRemediationAction + // If set, it will specify what action to take in the case where the user is unable to checkin because their authentication token is invalid. This happens when the user is deleted or disabled in AAD. Possible values are: block, wipe, warn. + appActionIfUnableToAuthenticateUser *ManagedAppRemediationAction + // Indicates whether a user can bring data into org documents. + blockDataIngestionIntoOrganizationDocuments *bool + // Indicates whether contacts can be synced to the user's device. + contactSyncBlocked *bool + // Indicates whether the backup of a managed app's data is blocked. + dataBackupBlocked *bool + // Indicates whether device compliance is required. + deviceComplianceRequired *bool + // The classes of apps that are allowed to click-to-open a phone number, for making phone calls or sending text messages. + dialerRestrictionLevel *ManagedAppPhoneNumberRedirectLevel + // Indicates whether use of the app pin is required if the device pin is set. + disableAppPinIfDevicePinIsSet *bool + // Indicates whether use of the fingerprint reader is allowed in place of a pin if PinRequired is set to True. + fingerprintBlocked *bool + // A grace period before blocking app access during off clock hours. + gracePeriodToBlockAppsDuringOffClockHours *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Type of managed browser + managedBrowser *ManagedBrowserType + // Indicates whether internet links should be opened in the managed browser app, or any custom browser specified by CustomBrowserProtocol (for iOS) or CustomBrowserPackageId/CustomBrowserDisplayName (for Android) + managedBrowserToOpenLinksRequired *bool + // The maxium threat level allowed for an app to be compliant. + maximumAllowedDeviceThreatLevel *ManagedAppDeviceThreatLevel + // Maximum number of incorrect pin retry attempts before the managed app is either blocked or wiped. + maximumPinRetries *int32 + // Versions bigger than the specified version will block the managed app from accessing company data. + maximumRequiredOsVersion *string + // Versions bigger than the specified version will block the managed app from accessing company data. + maximumWarningOsVersion *string + // Versions bigger than the specified version will block the managed app from accessing company data. + maximumWipeOsVersion *string + // Minimum pin length required for an app-level pin if PinRequired is set to True + minimumPinLength *int32 + // Versions less than the specified version will block the managed app from accessing company data. + minimumRequiredAppVersion *string + // Versions less than the specified version will block the managed app from accessing company data. + minimumRequiredOsVersion *string + // Versions less than the specified version will result in warning message on the managed app. + minimumWarningAppVersion *string + // Versions less than the specified version will result in warning message on the managed app from accessing company data. + minimumWarningOsVersion *string + // Versions less than or equal to the specified version will wipe the managed app and the associated company data. + minimumWipeAppVersion *string + // Versions less than or equal to the specified version will wipe the managed app and the associated company data. + minimumWipeOsVersion *string + // Indicates how to prioritize which Mobile Threat Defense (MTD) partner is enabled for a given platform, when more than one is enabled. An app can only be actively using a single Mobile Threat Defense partner. When NULL, Microsoft Defender will be given preference. Otherwise setting the value to defenderOverThirdPartyPartner or thirdPartyPartnerOverDefender will make explicit which partner to prioritize. Possible values are: null, defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender and unknownFutureValue. Default value is null. Possible values are: defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender, unknownFutureValue. + mobileThreatDefensePartnerPriority *MobileThreatDefensePartnerPriority + // An admin initiated action to be applied on a managed app. + mobileThreatDefenseRemediationAction *ManagedAppRemediationAction + // Restrict managed app notification + notificationRestriction *ManagedAppNotificationRestriction + // Indicates whether organizational credentials are required for app use. + organizationalCredentialsRequired *bool + // TimePeriod before the all-level pin must be reset if PinRequired is set to True. + periodBeforePinReset *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The period after which access is checked when the device is not connected to the internet. + periodOfflineBeforeAccessCheck *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The amount of time an app is allowed to remain disconnected from the internet before all managed data it is wiped. + periodOfflineBeforeWipeIsEnforced *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The period after which access is checked when the device is connected to the internet. + periodOnlineBeforeAccessCheck *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Character set which is to be used for a user's app PIN + pinCharacterSet *ManagedAppPinCharacterSet + // Indicates whether an app-level pin is required. + pinRequired *bool + // Timeout in minutes for an app pin instead of non biometrics passcode + pinRequiredInsteadOfBiometricTimeout *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Requires a pin to be unique from the number specified in this property. + previousPinBlockCount *int32 + // Indicates whether printing is allowed from managed apps. + printBlocked *bool + // Indicates whether users may use the 'Save As' menu item to save a copy of protected files. + saveAsBlocked *bool + // Indicates whether simplePin is blocked. + simplePinBlocked *bool +} +// NewManagedAppProtection instantiates a new ManagedAppProtection and sets the default values. +func NewManagedAppProtection()(*ManagedAppProtection) { + m := &ManagedAppProtection{ + ManagedAppPolicy: *NewManagedAppPolicy(), + } + odataTypeValue := "#microsoft.graph.managedAppProtection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAppProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidManagedAppProtection": + return NewAndroidManagedAppProtection(), nil + case "#microsoft.graph.defaultManagedAppProtection": + return NewDefaultManagedAppProtection(), nil + case "#microsoft.graph.iosManagedAppProtection": + return NewIosManagedAppProtection(), nil + case "#microsoft.graph.targetedManagedAppProtection": + return NewTargetedManagedAppProtection(), nil + } + } + } + } + return NewManagedAppProtection(), nil +} +// GetAllowedDataIngestionLocations gets the allowedDataIngestionLocations property value. Data storage locations where a user may store managed data. +func (m *ManagedAppProtection) GetAllowedDataIngestionLocations()([]ManagedAppDataIngestionLocation) { + return m.allowedDataIngestionLocations +} +// GetAllowedDataStorageLocations gets the allowedDataStorageLocations property value. Data storage locations where a user may store managed data. +func (m *ManagedAppProtection) GetAllowedDataStorageLocations()([]ManagedAppDataStorageLocation) { + return m.allowedDataStorageLocations +} +// GetAllowedInboundDataTransferSources gets the allowedInboundDataTransferSources property value. Data can be transferred from/to these classes of apps +func (m *ManagedAppProtection) GetAllowedInboundDataTransferSources()(*ManagedAppDataTransferLevel) { + return m.allowedInboundDataTransferSources +} +// GetAllowedOutboundClipboardSharingExceptionLength gets the allowedOutboundClipboardSharingExceptionLength property value. Specify the number of characters that may be cut or copied from Org data and accounts to any application. This setting overrides the AllowedOutboundClipboardSharingLevel restriction. Default value of '0' means no exception is allowed. +func (m *ManagedAppProtection) GetAllowedOutboundClipboardSharingExceptionLength()(*int32) { + return m.allowedOutboundClipboardSharingExceptionLength +} +// GetAllowedOutboundClipboardSharingLevel gets the allowedOutboundClipboardSharingLevel property value. Represents the level to which the device's clipboard may be shared between apps +func (m *ManagedAppProtection) GetAllowedOutboundClipboardSharingLevel()(*ManagedAppClipboardSharingLevel) { + return m.allowedOutboundClipboardSharingLevel +} +// GetAllowedOutboundDataTransferDestinations gets the allowedOutboundDataTransferDestinations property value. Data can be transferred from/to these classes of apps +func (m *ManagedAppProtection) GetAllowedOutboundDataTransferDestinations()(*ManagedAppDataTransferLevel) { + return m.allowedOutboundDataTransferDestinations +} +// GetAppActionIfDeviceComplianceRequired gets the appActionIfDeviceComplianceRequired property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) GetAppActionIfDeviceComplianceRequired()(*ManagedAppRemediationAction) { + return m.appActionIfDeviceComplianceRequired +} +// GetAppActionIfMaximumPinRetriesExceeded gets the appActionIfMaximumPinRetriesExceeded property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) GetAppActionIfMaximumPinRetriesExceeded()(*ManagedAppRemediationAction) { + return m.appActionIfMaximumPinRetriesExceeded +} +// GetAppActionIfUnableToAuthenticateUser gets the appActionIfUnableToAuthenticateUser property value. If set, it will specify what action to take in the case where the user is unable to checkin because their authentication token is invalid. This happens when the user is deleted or disabled in AAD. Possible values are: block, wipe, warn. +func (m *ManagedAppProtection) GetAppActionIfUnableToAuthenticateUser()(*ManagedAppRemediationAction) { + return m.appActionIfUnableToAuthenticateUser +} +// GetBlockDataIngestionIntoOrganizationDocuments gets the blockDataIngestionIntoOrganizationDocuments property value. Indicates whether a user can bring data into org documents. +func (m *ManagedAppProtection) GetBlockDataIngestionIntoOrganizationDocuments()(*bool) { + return m.blockDataIngestionIntoOrganizationDocuments +} +// GetContactSyncBlocked gets the contactSyncBlocked property value. Indicates whether contacts can be synced to the user's device. +func (m *ManagedAppProtection) GetContactSyncBlocked()(*bool) { + return m.contactSyncBlocked +} +// GetDataBackupBlocked gets the dataBackupBlocked property value. Indicates whether the backup of a managed app's data is blocked. +func (m *ManagedAppProtection) GetDataBackupBlocked()(*bool) { + return m.dataBackupBlocked +} +// GetDeviceComplianceRequired gets the deviceComplianceRequired property value. Indicates whether device compliance is required. +func (m *ManagedAppProtection) GetDeviceComplianceRequired()(*bool) { + return m.deviceComplianceRequired +} +// GetDialerRestrictionLevel gets the dialerRestrictionLevel property value. The classes of apps that are allowed to click-to-open a phone number, for making phone calls or sending text messages. +func (m *ManagedAppProtection) GetDialerRestrictionLevel()(*ManagedAppPhoneNumberRedirectLevel) { + return m.dialerRestrictionLevel +} +// GetDisableAppPinIfDevicePinIsSet gets the disableAppPinIfDevicePinIsSet property value. Indicates whether use of the app pin is required if the device pin is set. +func (m *ManagedAppProtection) GetDisableAppPinIfDevicePinIsSet()(*bool) { + return m.disableAppPinIfDevicePinIsSet +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppPolicy.GetFieldDeserializers() + res["allowedDataIngestionLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseManagedAppDataIngestionLocation) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppDataIngestionLocation, len(val)) + for i, v := range val { + res[i] = *(v.(*ManagedAppDataIngestionLocation)) + } + m.SetAllowedDataIngestionLocations(res) + } + return nil + } + res["allowedDataStorageLocations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseManagedAppDataStorageLocation) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppDataStorageLocation, len(val)) + for i, v := range val { + res[i] = *(v.(*ManagedAppDataStorageLocation)) + } + m.SetAllowedDataStorageLocations(res) + } + return nil + } + res["allowedInboundDataTransferSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppDataTransferLevel) + if err != nil { + return err + } + if val != nil { + m.SetAllowedInboundDataTransferSources(val.(*ManagedAppDataTransferLevel)) + } + return nil + } + res["allowedOutboundClipboardSharingExceptionLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAllowedOutboundClipboardSharingExceptionLength(val) + } + return nil + } + res["allowedOutboundClipboardSharingLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppClipboardSharingLevel) + if err != nil { + return err + } + if val != nil { + m.SetAllowedOutboundClipboardSharingLevel(val.(*ManagedAppClipboardSharingLevel)) + } + return nil + } + res["allowedOutboundDataTransferDestinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppDataTransferLevel) + if err != nil { + return err + } + if val != nil { + m.SetAllowedOutboundDataTransferDestinations(val.(*ManagedAppDataTransferLevel)) + } + return nil + } + res["appActionIfDeviceComplianceRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfDeviceComplianceRequired(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfMaximumPinRetriesExceeded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfMaximumPinRetriesExceeded(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["appActionIfUnableToAuthenticateUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetAppActionIfUnableToAuthenticateUser(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["blockDataIngestionIntoOrganizationDocuments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockDataIngestionIntoOrganizationDocuments(val) + } + return nil + } + res["contactSyncBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetContactSyncBlocked(val) + } + return nil + } + res["dataBackupBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDataBackupBlocked(val) + } + return nil + } + res["deviceComplianceRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceComplianceRequired(val) + } + return nil + } + res["dialerRestrictionLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppPhoneNumberRedirectLevel) + if err != nil { + return err + } + if val != nil { + m.SetDialerRestrictionLevel(val.(*ManagedAppPhoneNumberRedirectLevel)) + } + return nil + } + res["disableAppPinIfDevicePinIsSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableAppPinIfDevicePinIsSet(val) + } + return nil + } + res["fingerprintBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFingerprintBlocked(val) + } + return nil + } + res["gracePeriodToBlockAppsDuringOffClockHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetGracePeriodToBlockAppsDuringOffClockHours(val) + } + return nil + } + res["managedBrowser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedBrowserType) + if err != nil { + return err + } + if val != nil { + m.SetManagedBrowser(val.(*ManagedBrowserType)) + } + return nil + } + res["managedBrowserToOpenLinksRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedBrowserToOpenLinksRequired(val) + } + return nil + } + res["maximumAllowedDeviceThreatLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppDeviceThreatLevel) + if err != nil { + return err + } + if val != nil { + m.SetMaximumAllowedDeviceThreatLevel(val.(*ManagedAppDeviceThreatLevel)) + } + return nil + } + res["maximumPinRetries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximumPinRetries(val) + } + return nil + } + res["maximumRequiredOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumRequiredOsVersion(val) + } + return nil + } + res["maximumWarningOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumWarningOsVersion(val) + } + return nil + } + res["maximumWipeOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumWipeOsVersion(val) + } + return nil + } + res["minimumPinLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimumPinLength(val) + } + return nil + } + res["minimumRequiredAppVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredAppVersion(val) + } + return nil + } + res["minimumRequiredOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumRequiredOsVersion(val) + } + return nil + } + res["minimumWarningAppVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningAppVersion(val) + } + return nil + } + res["minimumWarningOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWarningOsVersion(val) + } + return nil + } + res["minimumWipeAppVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeAppVersion(val) + } + return nil + } + res["minimumWipeOsVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumWipeOsVersion(val) + } + return nil + } + res["mobileThreatDefensePartnerPriority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileThreatDefensePartnerPriority) + if err != nil { + return err + } + if val != nil { + m.SetMobileThreatDefensePartnerPriority(val.(*MobileThreatDefensePartnerPriority)) + } + return nil + } + res["mobileThreatDefenseRemediationAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppRemediationAction) + if err != nil { + return err + } + if val != nil { + m.SetMobileThreatDefenseRemediationAction(val.(*ManagedAppRemediationAction)) + } + return nil + } + res["notificationRestriction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppNotificationRestriction) + if err != nil { + return err + } + if val != nil { + m.SetNotificationRestriction(val.(*ManagedAppNotificationRestriction)) + } + return nil + } + res["organizationalCredentialsRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganizationalCredentialsRequired(val) + } + return nil + } + res["periodBeforePinReset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodBeforePinReset(val) + } + return nil + } + res["periodOfflineBeforeAccessCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodOfflineBeforeAccessCheck(val) + } + return nil + } + res["periodOfflineBeforeWipeIsEnforced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodOfflineBeforeWipeIsEnforced(val) + } + return nil + } + res["periodOnlineBeforeAccessCheck"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPeriodOnlineBeforeAccessCheck(val) + } + return nil + } + res["pinCharacterSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedAppPinCharacterSet) + if err != nil { + return err + } + if val != nil { + m.SetPinCharacterSet(val.(*ManagedAppPinCharacterSet)) + } + return nil + } + res["pinRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPinRequired(val) + } + return nil + } + res["pinRequiredInsteadOfBiometricTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetPinRequiredInsteadOfBiometricTimeout(val) + } + return nil + } + res["previousPinBlockCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPreviousPinBlockCount(val) + } + return nil + } + res["printBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPrintBlocked(val) + } + return nil + } + res["saveAsBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSaveAsBlocked(val) + } + return nil + } + res["simplePinBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSimplePinBlocked(val) + } + return nil + } + return res +} +// GetFingerprintBlocked gets the fingerprintBlocked property value. Indicates whether use of the fingerprint reader is allowed in place of a pin if PinRequired is set to True. +func (m *ManagedAppProtection) GetFingerprintBlocked()(*bool) { + return m.fingerprintBlocked +} +// GetGracePeriodToBlockAppsDuringOffClockHours gets the gracePeriodToBlockAppsDuringOffClockHours property value. A grace period before blocking app access during off clock hours. +func (m *ManagedAppProtection) GetGracePeriodToBlockAppsDuringOffClockHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.gracePeriodToBlockAppsDuringOffClockHours +} +// GetManagedBrowser gets the managedBrowser property value. Type of managed browser +func (m *ManagedAppProtection) GetManagedBrowser()(*ManagedBrowserType) { + return m.managedBrowser +} +// GetManagedBrowserToOpenLinksRequired gets the managedBrowserToOpenLinksRequired property value. Indicates whether internet links should be opened in the managed browser app, or any custom browser specified by CustomBrowserProtocol (for iOS) or CustomBrowserPackageId/CustomBrowserDisplayName (for Android) +func (m *ManagedAppProtection) GetManagedBrowserToOpenLinksRequired()(*bool) { + return m.managedBrowserToOpenLinksRequired +} +// GetMaximumAllowedDeviceThreatLevel gets the maximumAllowedDeviceThreatLevel property value. The maxium threat level allowed for an app to be compliant. +func (m *ManagedAppProtection) GetMaximumAllowedDeviceThreatLevel()(*ManagedAppDeviceThreatLevel) { + return m.maximumAllowedDeviceThreatLevel +} +// GetMaximumPinRetries gets the maximumPinRetries property value. Maximum number of incorrect pin retry attempts before the managed app is either blocked or wiped. +func (m *ManagedAppProtection) GetMaximumPinRetries()(*int32) { + return m.maximumPinRetries +} +// GetMaximumRequiredOsVersion gets the maximumRequiredOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) GetMaximumRequiredOsVersion()(*string) { + return m.maximumRequiredOsVersion +} +// GetMaximumWarningOsVersion gets the maximumWarningOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) GetMaximumWarningOsVersion()(*string) { + return m.maximumWarningOsVersion +} +// GetMaximumWipeOsVersion gets the maximumWipeOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) GetMaximumWipeOsVersion()(*string) { + return m.maximumWipeOsVersion +} +// GetMinimumPinLength gets the minimumPinLength property value. Minimum pin length required for an app-level pin if PinRequired is set to True +func (m *ManagedAppProtection) GetMinimumPinLength()(*int32) { + return m.minimumPinLength +} +// GetMinimumRequiredAppVersion gets the minimumRequiredAppVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) GetMinimumRequiredAppVersion()(*string) { + return m.minimumRequiredAppVersion +} +// GetMinimumRequiredOsVersion gets the minimumRequiredOsVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) GetMinimumRequiredOsVersion()(*string) { + return m.minimumRequiredOsVersion +} +// GetMinimumWarningAppVersion gets the minimumWarningAppVersion property value. Versions less than the specified version will result in warning message on the managed app. +func (m *ManagedAppProtection) GetMinimumWarningAppVersion()(*string) { + return m.minimumWarningAppVersion +} +// GetMinimumWarningOsVersion gets the minimumWarningOsVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. +func (m *ManagedAppProtection) GetMinimumWarningOsVersion()(*string) { + return m.minimumWarningOsVersion +} +// GetMinimumWipeAppVersion gets the minimumWipeAppVersion property value. Versions less than or equal to the specified version will wipe the managed app and the associated company data. +func (m *ManagedAppProtection) GetMinimumWipeAppVersion()(*string) { + return m.minimumWipeAppVersion +} +// GetMinimumWipeOsVersion gets the minimumWipeOsVersion property value. Versions less than or equal to the specified version will wipe the managed app and the associated company data. +func (m *ManagedAppProtection) GetMinimumWipeOsVersion()(*string) { + return m.minimumWipeOsVersion +} +// GetMobileThreatDefensePartnerPriority gets the mobileThreatDefensePartnerPriority property value. Indicates how to prioritize which Mobile Threat Defense (MTD) partner is enabled for a given platform, when more than one is enabled. An app can only be actively using a single Mobile Threat Defense partner. When NULL, Microsoft Defender will be given preference. Otherwise setting the value to defenderOverThirdPartyPartner or thirdPartyPartnerOverDefender will make explicit which partner to prioritize. Possible values are: null, defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender and unknownFutureValue. Default value is null. Possible values are: defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender, unknownFutureValue. +func (m *ManagedAppProtection) GetMobileThreatDefensePartnerPriority()(*MobileThreatDefensePartnerPriority) { + return m.mobileThreatDefensePartnerPriority +} +// GetMobileThreatDefenseRemediationAction gets the mobileThreatDefenseRemediationAction property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) GetMobileThreatDefenseRemediationAction()(*ManagedAppRemediationAction) { + return m.mobileThreatDefenseRemediationAction +} +// GetNotificationRestriction gets the notificationRestriction property value. Restrict managed app notification +func (m *ManagedAppProtection) GetNotificationRestriction()(*ManagedAppNotificationRestriction) { + return m.notificationRestriction +} +// GetOrganizationalCredentialsRequired gets the organizationalCredentialsRequired property value. Indicates whether organizational credentials are required for app use. +func (m *ManagedAppProtection) GetOrganizationalCredentialsRequired()(*bool) { + return m.organizationalCredentialsRequired +} +// GetPeriodBeforePinReset gets the periodBeforePinReset property value. TimePeriod before the all-level pin must be reset if PinRequired is set to True. +func (m *ManagedAppProtection) GetPeriodBeforePinReset()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.periodBeforePinReset +} +// GetPeriodOfflineBeforeAccessCheck gets the periodOfflineBeforeAccessCheck property value. The period after which access is checked when the device is not connected to the internet. +func (m *ManagedAppProtection) GetPeriodOfflineBeforeAccessCheck()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.periodOfflineBeforeAccessCheck +} +// GetPeriodOfflineBeforeWipeIsEnforced gets the periodOfflineBeforeWipeIsEnforced property value. The amount of time an app is allowed to remain disconnected from the internet before all managed data it is wiped. +func (m *ManagedAppProtection) GetPeriodOfflineBeforeWipeIsEnforced()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.periodOfflineBeforeWipeIsEnforced +} +// GetPeriodOnlineBeforeAccessCheck gets the periodOnlineBeforeAccessCheck property value. The period after which access is checked when the device is connected to the internet. +func (m *ManagedAppProtection) GetPeriodOnlineBeforeAccessCheck()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.periodOnlineBeforeAccessCheck +} +// GetPinCharacterSet gets the pinCharacterSet property value. Character set which is to be used for a user's app PIN +func (m *ManagedAppProtection) GetPinCharacterSet()(*ManagedAppPinCharacterSet) { + return m.pinCharacterSet +} +// GetPinRequired gets the pinRequired property value. Indicates whether an app-level pin is required. +func (m *ManagedAppProtection) GetPinRequired()(*bool) { + return m.pinRequired +} +// GetPinRequiredInsteadOfBiometricTimeout gets the pinRequiredInsteadOfBiometricTimeout property value. Timeout in minutes for an app pin instead of non biometrics passcode +func (m *ManagedAppProtection) GetPinRequiredInsteadOfBiometricTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.pinRequiredInsteadOfBiometricTimeout +} +// GetPreviousPinBlockCount gets the previousPinBlockCount property value. Requires a pin to be unique from the number specified in this property. +func (m *ManagedAppProtection) GetPreviousPinBlockCount()(*int32) { + return m.previousPinBlockCount +} +// GetPrintBlocked gets the printBlocked property value. Indicates whether printing is allowed from managed apps. +func (m *ManagedAppProtection) GetPrintBlocked()(*bool) { + return m.printBlocked +} +// GetSaveAsBlocked gets the saveAsBlocked property value. Indicates whether users may use the 'Save As' menu item to save a copy of protected files. +func (m *ManagedAppProtection) GetSaveAsBlocked()(*bool) { + return m.saveAsBlocked +} +// GetSimplePinBlocked gets the simplePinBlocked property value. Indicates whether simplePin is blocked. +func (m *ManagedAppProtection) GetSimplePinBlocked()(*bool) { + return m.simplePinBlocked +} +// Serialize serializes information the current object +func (m *ManagedAppProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppPolicy.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedDataIngestionLocations() != nil { + err = writer.WriteCollectionOfStringValues("allowedDataIngestionLocations", SerializeManagedAppDataIngestionLocation(m.GetAllowedDataIngestionLocations())) + if err != nil { + return err + } + } + if m.GetAllowedDataStorageLocations() != nil { + err = writer.WriteCollectionOfStringValues("allowedDataStorageLocations", SerializeManagedAppDataStorageLocation(m.GetAllowedDataStorageLocations())) + if err != nil { + return err + } + } + if m.GetAllowedInboundDataTransferSources() != nil { + cast := (*m.GetAllowedInboundDataTransferSources()).String() + err = writer.WriteStringValue("allowedInboundDataTransferSources", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("allowedOutboundClipboardSharingExceptionLength", m.GetAllowedOutboundClipboardSharingExceptionLength()) + if err != nil { + return err + } + } + if m.GetAllowedOutboundClipboardSharingLevel() != nil { + cast := (*m.GetAllowedOutboundClipboardSharingLevel()).String() + err = writer.WriteStringValue("allowedOutboundClipboardSharingLevel", &cast) + if err != nil { + return err + } + } + if m.GetAllowedOutboundDataTransferDestinations() != nil { + cast := (*m.GetAllowedOutboundDataTransferDestinations()).String() + err = writer.WriteStringValue("allowedOutboundDataTransferDestinations", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfDeviceComplianceRequired() != nil { + cast := (*m.GetAppActionIfDeviceComplianceRequired()).String() + err = writer.WriteStringValue("appActionIfDeviceComplianceRequired", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfMaximumPinRetriesExceeded() != nil { + cast := (*m.GetAppActionIfMaximumPinRetriesExceeded()).String() + err = writer.WriteStringValue("appActionIfMaximumPinRetriesExceeded", &cast) + if err != nil { + return err + } + } + if m.GetAppActionIfUnableToAuthenticateUser() != nil { + cast := (*m.GetAppActionIfUnableToAuthenticateUser()).String() + err = writer.WriteStringValue("appActionIfUnableToAuthenticateUser", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockDataIngestionIntoOrganizationDocuments", m.GetBlockDataIngestionIntoOrganizationDocuments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("contactSyncBlocked", m.GetContactSyncBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("dataBackupBlocked", m.GetDataBackupBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceComplianceRequired", m.GetDeviceComplianceRequired()) + if err != nil { + return err + } + } + if m.GetDialerRestrictionLevel() != nil { + cast := (*m.GetDialerRestrictionLevel()).String() + err = writer.WriteStringValue("dialerRestrictionLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableAppPinIfDevicePinIsSet", m.GetDisableAppPinIfDevicePinIsSet()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fingerprintBlocked", m.GetFingerprintBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("gracePeriodToBlockAppsDuringOffClockHours", m.GetGracePeriodToBlockAppsDuringOffClockHours()) + if err != nil { + return err + } + } + if m.GetManagedBrowser() != nil { + cast := (*m.GetManagedBrowser()).String() + err = writer.WriteStringValue("managedBrowser", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("managedBrowserToOpenLinksRequired", m.GetManagedBrowserToOpenLinksRequired()) + if err != nil { + return err + } + } + if m.GetMaximumAllowedDeviceThreatLevel() != nil { + cast := (*m.GetMaximumAllowedDeviceThreatLevel()).String() + err = writer.WriteStringValue("maximumAllowedDeviceThreatLevel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("maximumPinRetries", m.GetMaximumPinRetries()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("maximumRequiredOsVersion", m.GetMaximumRequiredOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("maximumWarningOsVersion", m.GetMaximumWarningOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("maximumWipeOsVersion", m.GetMaximumWipeOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("minimumPinLength", m.GetMinimumPinLength()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredAppVersion", m.GetMinimumRequiredAppVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumRequiredOsVersion", m.GetMinimumRequiredOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningAppVersion", m.GetMinimumWarningAppVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWarningOsVersion", m.GetMinimumWarningOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeAppVersion", m.GetMinimumWipeAppVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("minimumWipeOsVersion", m.GetMinimumWipeOsVersion()) + if err != nil { + return err + } + } + if m.GetMobileThreatDefensePartnerPriority() != nil { + cast := (*m.GetMobileThreatDefensePartnerPriority()).String() + err = writer.WriteStringValue("mobileThreatDefensePartnerPriority", &cast) + if err != nil { + return err + } + } + if m.GetMobileThreatDefenseRemediationAction() != nil { + cast := (*m.GetMobileThreatDefenseRemediationAction()).String() + err = writer.WriteStringValue("mobileThreatDefenseRemediationAction", &cast) + if err != nil { + return err + } + } + if m.GetNotificationRestriction() != nil { + cast := (*m.GetNotificationRestriction()).String() + err = writer.WriteStringValue("notificationRestriction", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("organizationalCredentialsRequired", m.GetOrganizationalCredentialsRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("periodBeforePinReset", m.GetPeriodBeforePinReset()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("periodOfflineBeforeAccessCheck", m.GetPeriodOfflineBeforeAccessCheck()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("periodOfflineBeforeWipeIsEnforced", m.GetPeriodOfflineBeforeWipeIsEnforced()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("periodOnlineBeforeAccessCheck", m.GetPeriodOnlineBeforeAccessCheck()) + if err != nil { + return err + } + } + if m.GetPinCharacterSet() != nil { + cast := (*m.GetPinCharacterSet()).String() + err = writer.WriteStringValue("pinCharacterSet", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pinRequired", m.GetPinRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("pinRequiredInsteadOfBiometricTimeout", m.GetPinRequiredInsteadOfBiometricTimeout()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("previousPinBlockCount", m.GetPreviousPinBlockCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("printBlocked", m.GetPrintBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("saveAsBlocked", m.GetSaveAsBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("simplePinBlocked", m.GetSimplePinBlocked()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedDataIngestionLocations sets the allowedDataIngestionLocations property value. Data storage locations where a user may store managed data. +func (m *ManagedAppProtection) SetAllowedDataIngestionLocations(value []ManagedAppDataIngestionLocation)() { + m.allowedDataIngestionLocations = value +} +// SetAllowedDataStorageLocations sets the allowedDataStorageLocations property value. Data storage locations where a user may store managed data. +func (m *ManagedAppProtection) SetAllowedDataStorageLocations(value []ManagedAppDataStorageLocation)() { + m.allowedDataStorageLocations = value +} +// SetAllowedInboundDataTransferSources sets the allowedInboundDataTransferSources property value. Data can be transferred from/to these classes of apps +func (m *ManagedAppProtection) SetAllowedInboundDataTransferSources(value *ManagedAppDataTransferLevel)() { + m.allowedInboundDataTransferSources = value +} +// SetAllowedOutboundClipboardSharingExceptionLength sets the allowedOutboundClipboardSharingExceptionLength property value. Specify the number of characters that may be cut or copied from Org data and accounts to any application. This setting overrides the AllowedOutboundClipboardSharingLevel restriction. Default value of '0' means no exception is allowed. +func (m *ManagedAppProtection) SetAllowedOutboundClipboardSharingExceptionLength(value *int32)() { + m.allowedOutboundClipboardSharingExceptionLength = value +} +// SetAllowedOutboundClipboardSharingLevel sets the allowedOutboundClipboardSharingLevel property value. Represents the level to which the device's clipboard may be shared between apps +func (m *ManagedAppProtection) SetAllowedOutboundClipboardSharingLevel(value *ManagedAppClipboardSharingLevel)() { + m.allowedOutboundClipboardSharingLevel = value +} +// SetAllowedOutboundDataTransferDestinations sets the allowedOutboundDataTransferDestinations property value. Data can be transferred from/to these classes of apps +func (m *ManagedAppProtection) SetAllowedOutboundDataTransferDestinations(value *ManagedAppDataTransferLevel)() { + m.allowedOutboundDataTransferDestinations = value +} +// SetAppActionIfDeviceComplianceRequired sets the appActionIfDeviceComplianceRequired property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) SetAppActionIfDeviceComplianceRequired(value *ManagedAppRemediationAction)() { + m.appActionIfDeviceComplianceRequired = value +} +// SetAppActionIfMaximumPinRetriesExceeded sets the appActionIfMaximumPinRetriesExceeded property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) SetAppActionIfMaximumPinRetriesExceeded(value *ManagedAppRemediationAction)() { + m.appActionIfMaximumPinRetriesExceeded = value +} +// SetAppActionIfUnableToAuthenticateUser sets the appActionIfUnableToAuthenticateUser property value. If set, it will specify what action to take in the case where the user is unable to checkin because their authentication token is invalid. This happens when the user is deleted or disabled in AAD. Possible values are: block, wipe, warn. +func (m *ManagedAppProtection) SetAppActionIfUnableToAuthenticateUser(value *ManagedAppRemediationAction)() { + m.appActionIfUnableToAuthenticateUser = value +} +// SetBlockDataIngestionIntoOrganizationDocuments sets the blockDataIngestionIntoOrganizationDocuments property value. Indicates whether a user can bring data into org documents. +func (m *ManagedAppProtection) SetBlockDataIngestionIntoOrganizationDocuments(value *bool)() { + m.blockDataIngestionIntoOrganizationDocuments = value +} +// SetContactSyncBlocked sets the contactSyncBlocked property value. Indicates whether contacts can be synced to the user's device. +func (m *ManagedAppProtection) SetContactSyncBlocked(value *bool)() { + m.contactSyncBlocked = value +} +// SetDataBackupBlocked sets the dataBackupBlocked property value. Indicates whether the backup of a managed app's data is blocked. +func (m *ManagedAppProtection) SetDataBackupBlocked(value *bool)() { + m.dataBackupBlocked = value +} +// SetDeviceComplianceRequired sets the deviceComplianceRequired property value. Indicates whether device compliance is required. +func (m *ManagedAppProtection) SetDeviceComplianceRequired(value *bool)() { + m.deviceComplianceRequired = value +} +// SetDialerRestrictionLevel sets the dialerRestrictionLevel property value. The classes of apps that are allowed to click-to-open a phone number, for making phone calls or sending text messages. +func (m *ManagedAppProtection) SetDialerRestrictionLevel(value *ManagedAppPhoneNumberRedirectLevel)() { + m.dialerRestrictionLevel = value +} +// SetDisableAppPinIfDevicePinIsSet sets the disableAppPinIfDevicePinIsSet property value. Indicates whether use of the app pin is required if the device pin is set. +func (m *ManagedAppProtection) SetDisableAppPinIfDevicePinIsSet(value *bool)() { + m.disableAppPinIfDevicePinIsSet = value +} +// SetFingerprintBlocked sets the fingerprintBlocked property value. Indicates whether use of the fingerprint reader is allowed in place of a pin if PinRequired is set to True. +func (m *ManagedAppProtection) SetFingerprintBlocked(value *bool)() { + m.fingerprintBlocked = value +} +// SetGracePeriodToBlockAppsDuringOffClockHours sets the gracePeriodToBlockAppsDuringOffClockHours property value. A grace period before blocking app access during off clock hours. +func (m *ManagedAppProtection) SetGracePeriodToBlockAppsDuringOffClockHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.gracePeriodToBlockAppsDuringOffClockHours = value +} +// SetManagedBrowser sets the managedBrowser property value. Type of managed browser +func (m *ManagedAppProtection) SetManagedBrowser(value *ManagedBrowserType)() { + m.managedBrowser = value +} +// SetManagedBrowserToOpenLinksRequired sets the managedBrowserToOpenLinksRequired property value. Indicates whether internet links should be opened in the managed browser app, or any custom browser specified by CustomBrowserProtocol (for iOS) or CustomBrowserPackageId/CustomBrowserDisplayName (for Android) +func (m *ManagedAppProtection) SetManagedBrowserToOpenLinksRequired(value *bool)() { + m.managedBrowserToOpenLinksRequired = value +} +// SetMaximumAllowedDeviceThreatLevel sets the maximumAllowedDeviceThreatLevel property value. The maxium threat level allowed for an app to be compliant. +func (m *ManagedAppProtection) SetMaximumAllowedDeviceThreatLevel(value *ManagedAppDeviceThreatLevel)() { + m.maximumAllowedDeviceThreatLevel = value +} +// SetMaximumPinRetries sets the maximumPinRetries property value. Maximum number of incorrect pin retry attempts before the managed app is either blocked or wiped. +func (m *ManagedAppProtection) SetMaximumPinRetries(value *int32)() { + m.maximumPinRetries = value +} +// SetMaximumRequiredOsVersion sets the maximumRequiredOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) SetMaximumRequiredOsVersion(value *string)() { + m.maximumRequiredOsVersion = value +} +// SetMaximumWarningOsVersion sets the maximumWarningOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) SetMaximumWarningOsVersion(value *string)() { + m.maximumWarningOsVersion = value +} +// SetMaximumWipeOsVersion sets the maximumWipeOsVersion property value. Versions bigger than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) SetMaximumWipeOsVersion(value *string)() { + m.maximumWipeOsVersion = value +} +// SetMinimumPinLength sets the minimumPinLength property value. Minimum pin length required for an app-level pin if PinRequired is set to True +func (m *ManagedAppProtection) SetMinimumPinLength(value *int32)() { + m.minimumPinLength = value +} +// SetMinimumRequiredAppVersion sets the minimumRequiredAppVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) SetMinimumRequiredAppVersion(value *string)() { + m.minimumRequiredAppVersion = value +} +// SetMinimumRequiredOsVersion sets the minimumRequiredOsVersion property value. Versions less than the specified version will block the managed app from accessing company data. +func (m *ManagedAppProtection) SetMinimumRequiredOsVersion(value *string)() { + m.minimumRequiredOsVersion = value +} +// SetMinimumWarningAppVersion sets the minimumWarningAppVersion property value. Versions less than the specified version will result in warning message on the managed app. +func (m *ManagedAppProtection) SetMinimumWarningAppVersion(value *string)() { + m.minimumWarningAppVersion = value +} +// SetMinimumWarningOsVersion sets the minimumWarningOsVersion property value. Versions less than the specified version will result in warning message on the managed app from accessing company data. +func (m *ManagedAppProtection) SetMinimumWarningOsVersion(value *string)() { + m.minimumWarningOsVersion = value +} +// SetMinimumWipeAppVersion sets the minimumWipeAppVersion property value. Versions less than or equal to the specified version will wipe the managed app and the associated company data. +func (m *ManagedAppProtection) SetMinimumWipeAppVersion(value *string)() { + m.minimumWipeAppVersion = value +} +// SetMinimumWipeOsVersion sets the minimumWipeOsVersion property value. Versions less than or equal to the specified version will wipe the managed app and the associated company data. +func (m *ManagedAppProtection) SetMinimumWipeOsVersion(value *string)() { + m.minimumWipeOsVersion = value +} +// SetMobileThreatDefensePartnerPriority sets the mobileThreatDefensePartnerPriority property value. Indicates how to prioritize which Mobile Threat Defense (MTD) partner is enabled for a given platform, when more than one is enabled. An app can only be actively using a single Mobile Threat Defense partner. When NULL, Microsoft Defender will be given preference. Otherwise setting the value to defenderOverThirdPartyPartner or thirdPartyPartnerOverDefender will make explicit which partner to prioritize. Possible values are: null, defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender and unknownFutureValue. Default value is null. Possible values are: defenderOverThirdPartyPartner, thirdPartyPartnerOverDefender, unknownFutureValue. +func (m *ManagedAppProtection) SetMobileThreatDefensePartnerPriority(value *MobileThreatDefensePartnerPriority)() { + m.mobileThreatDefensePartnerPriority = value +} +// SetMobileThreatDefenseRemediationAction sets the mobileThreatDefenseRemediationAction property value. An admin initiated action to be applied on a managed app. +func (m *ManagedAppProtection) SetMobileThreatDefenseRemediationAction(value *ManagedAppRemediationAction)() { + m.mobileThreatDefenseRemediationAction = value +} +// SetNotificationRestriction sets the notificationRestriction property value. Restrict managed app notification +func (m *ManagedAppProtection) SetNotificationRestriction(value *ManagedAppNotificationRestriction)() { + m.notificationRestriction = value +} +// SetOrganizationalCredentialsRequired sets the organizationalCredentialsRequired property value. Indicates whether organizational credentials are required for app use. +func (m *ManagedAppProtection) SetOrganizationalCredentialsRequired(value *bool)() { + m.organizationalCredentialsRequired = value +} +// SetPeriodBeforePinReset sets the periodBeforePinReset property value. TimePeriod before the all-level pin must be reset if PinRequired is set to True. +func (m *ManagedAppProtection) SetPeriodBeforePinReset(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.periodBeforePinReset = value +} +// SetPeriodOfflineBeforeAccessCheck sets the periodOfflineBeforeAccessCheck property value. The period after which access is checked when the device is not connected to the internet. +func (m *ManagedAppProtection) SetPeriodOfflineBeforeAccessCheck(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.periodOfflineBeforeAccessCheck = value +} +// SetPeriodOfflineBeforeWipeIsEnforced sets the periodOfflineBeforeWipeIsEnforced property value. The amount of time an app is allowed to remain disconnected from the internet before all managed data it is wiped. +func (m *ManagedAppProtection) SetPeriodOfflineBeforeWipeIsEnforced(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.periodOfflineBeforeWipeIsEnforced = value +} +// SetPeriodOnlineBeforeAccessCheck sets the periodOnlineBeforeAccessCheck property value. The period after which access is checked when the device is connected to the internet. +func (m *ManagedAppProtection) SetPeriodOnlineBeforeAccessCheck(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.periodOnlineBeforeAccessCheck = value +} +// SetPinCharacterSet sets the pinCharacterSet property value. Character set which is to be used for a user's app PIN +func (m *ManagedAppProtection) SetPinCharacterSet(value *ManagedAppPinCharacterSet)() { + m.pinCharacterSet = value +} +// SetPinRequired sets the pinRequired property value. Indicates whether an app-level pin is required. +func (m *ManagedAppProtection) SetPinRequired(value *bool)() { + m.pinRequired = value +} +// SetPinRequiredInsteadOfBiometricTimeout sets the pinRequiredInsteadOfBiometricTimeout property value. Timeout in minutes for an app pin instead of non biometrics passcode +func (m *ManagedAppProtection) SetPinRequiredInsteadOfBiometricTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.pinRequiredInsteadOfBiometricTimeout = value +} +// SetPreviousPinBlockCount sets the previousPinBlockCount property value. Requires a pin to be unique from the number specified in this property. +func (m *ManagedAppProtection) SetPreviousPinBlockCount(value *int32)() { + m.previousPinBlockCount = value +} +// SetPrintBlocked sets the printBlocked property value. Indicates whether printing is allowed from managed apps. +func (m *ManagedAppProtection) SetPrintBlocked(value *bool)() { + m.printBlocked = value +} +// SetSaveAsBlocked sets the saveAsBlocked property value. Indicates whether users may use the 'Save As' menu item to save a copy of protected files. +func (m *ManagedAppProtection) SetSaveAsBlocked(value *bool)() { + m.saveAsBlocked = value +} +// SetSimplePinBlocked sets the simplePinBlocked property value. Indicates whether simplePin is blocked. +func (m *ManagedAppProtection) SetSimplePinBlocked(value *bool)() { + m.simplePinBlocked = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_response.go new file mode 100644 index 000000000..b9c80cd23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionCollectionResponse +type ManagedAppProtectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppProtectionable +} +// NewManagedAppProtectionCollectionResponse instantiates a new ManagedAppProtectionCollectionResponse and sets the default values. +func NewManagedAppProtectionCollectionResponse()(*ManagedAppProtectionCollectionResponse) { + m := &ManagedAppProtectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppProtectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppProtectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppProtectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppProtectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppProtectionable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppProtectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppProtectionCollectionResponse) GetValue()([]ManagedAppProtectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppProtectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppProtectionCollectionResponse) SetValue(value []ManagedAppProtectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_responseable.go new file mode 100644 index 000000000..f1e9e19f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionCollectionResponseable +type ManagedAppProtectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppProtectionable) + SetValue(value []ManagedAppProtectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item.go new file mode 100644 index 000000000..e41f62256 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionPolicySetItem +type ManagedAppProtectionPolicySetItem struct { + PolicySetItem + // TargetedAppManagementLevels of the ManagedAppPolicySetItem. + targetedAppManagementLevels *string +} +// NewManagedAppProtectionPolicySetItem instantiates a new ManagedAppProtectionPolicySetItem and sets the default values. +func NewManagedAppProtectionPolicySetItem()(*ManagedAppProtectionPolicySetItem) { + m := &ManagedAppProtectionPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.managedAppProtectionPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAppProtectionPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppProtectionPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppProtectionPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppProtectionPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + res["targetedAppManagementLevels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetedAppManagementLevels(val) + } + return nil + } + return res +} +// GetTargetedAppManagementLevels gets the targetedAppManagementLevels property value. TargetedAppManagementLevels of the ManagedAppPolicySetItem. +func (m *ManagedAppProtectionPolicySetItem) GetTargetedAppManagementLevels()(*string) { + return m.targetedAppManagementLevels +} +// Serialize serializes information the current object +func (m *ManagedAppProtectionPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetedAppManagementLevels", m.GetTargetedAppManagementLevels()) + if err != nil { + return err + } + } + return nil +} +// SetTargetedAppManagementLevels sets the targetedAppManagementLevels property value. TargetedAppManagementLevels of the ManagedAppPolicySetItem. +func (m *ManagedAppProtectionPolicySetItem) SetTargetedAppManagementLevels(value *string)() { + m.targetedAppManagementLevels = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_response.go new file mode 100644 index 000000000..1a1cc19dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionPolicySetItemCollectionResponse +type ManagedAppProtectionPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppProtectionPolicySetItemable +} +// NewManagedAppProtectionPolicySetItemCollectionResponse instantiates a new ManagedAppProtectionPolicySetItemCollectionResponse and sets the default values. +func NewManagedAppProtectionPolicySetItemCollectionResponse()(*ManagedAppProtectionPolicySetItemCollectionResponse) { + m := &ManagedAppProtectionPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppProtectionPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppProtectionPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppProtectionPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppProtectionPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppProtectionPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppProtectionPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppProtectionPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppProtectionPolicySetItemCollectionResponse) GetValue()([]ManagedAppProtectionPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppProtectionPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppProtectionPolicySetItemCollectionResponse) SetValue(value []ManagedAppProtectionPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..257160057 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionPolicySetItemCollectionResponseable +type ManagedAppProtectionPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppProtectionPolicySetItemable) + SetValue(value []ManagedAppProtectionPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_itemable.go new file mode 100644 index 000000000..61aa41934 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protection_policy_set_itemable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionPolicySetItemable +type ManagedAppProtectionPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable + GetTargetedAppManagementLevels()(*string) + SetTargetedAppManagementLevels(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_protectionable.go b/src/internal/connector/graph/betasdk/models/managed_app_protectionable.go new file mode 100644 index 000000000..2b92d43d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_protectionable.go @@ -0,0 +1,103 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppProtectionable +type ManagedAppProtectionable interface { + ManagedAppPolicyable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedDataIngestionLocations()([]ManagedAppDataIngestionLocation) + GetAllowedDataStorageLocations()([]ManagedAppDataStorageLocation) + GetAllowedInboundDataTransferSources()(*ManagedAppDataTransferLevel) + GetAllowedOutboundClipboardSharingExceptionLength()(*int32) + GetAllowedOutboundClipboardSharingLevel()(*ManagedAppClipboardSharingLevel) + GetAllowedOutboundDataTransferDestinations()(*ManagedAppDataTransferLevel) + GetAppActionIfDeviceComplianceRequired()(*ManagedAppRemediationAction) + GetAppActionIfMaximumPinRetriesExceeded()(*ManagedAppRemediationAction) + GetAppActionIfUnableToAuthenticateUser()(*ManagedAppRemediationAction) + GetBlockDataIngestionIntoOrganizationDocuments()(*bool) + GetContactSyncBlocked()(*bool) + GetDataBackupBlocked()(*bool) + GetDeviceComplianceRequired()(*bool) + GetDialerRestrictionLevel()(*ManagedAppPhoneNumberRedirectLevel) + GetDisableAppPinIfDevicePinIsSet()(*bool) + GetFingerprintBlocked()(*bool) + GetGracePeriodToBlockAppsDuringOffClockHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetManagedBrowser()(*ManagedBrowserType) + GetManagedBrowserToOpenLinksRequired()(*bool) + GetMaximumAllowedDeviceThreatLevel()(*ManagedAppDeviceThreatLevel) + GetMaximumPinRetries()(*int32) + GetMaximumRequiredOsVersion()(*string) + GetMaximumWarningOsVersion()(*string) + GetMaximumWipeOsVersion()(*string) + GetMinimumPinLength()(*int32) + GetMinimumRequiredAppVersion()(*string) + GetMinimumRequiredOsVersion()(*string) + GetMinimumWarningAppVersion()(*string) + GetMinimumWarningOsVersion()(*string) + GetMinimumWipeAppVersion()(*string) + GetMinimumWipeOsVersion()(*string) + GetMobileThreatDefensePartnerPriority()(*MobileThreatDefensePartnerPriority) + GetMobileThreatDefenseRemediationAction()(*ManagedAppRemediationAction) + GetNotificationRestriction()(*ManagedAppNotificationRestriction) + GetOrganizationalCredentialsRequired()(*bool) + GetPeriodBeforePinReset()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPeriodOfflineBeforeAccessCheck()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPeriodOfflineBeforeWipeIsEnforced()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPeriodOnlineBeforeAccessCheck()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPinCharacterSet()(*ManagedAppPinCharacterSet) + GetPinRequired()(*bool) + GetPinRequiredInsteadOfBiometricTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetPreviousPinBlockCount()(*int32) + GetPrintBlocked()(*bool) + GetSaveAsBlocked()(*bool) + GetSimplePinBlocked()(*bool) + SetAllowedDataIngestionLocations(value []ManagedAppDataIngestionLocation)() + SetAllowedDataStorageLocations(value []ManagedAppDataStorageLocation)() + SetAllowedInboundDataTransferSources(value *ManagedAppDataTransferLevel)() + SetAllowedOutboundClipboardSharingExceptionLength(value *int32)() + SetAllowedOutboundClipboardSharingLevel(value *ManagedAppClipboardSharingLevel)() + SetAllowedOutboundDataTransferDestinations(value *ManagedAppDataTransferLevel)() + SetAppActionIfDeviceComplianceRequired(value *ManagedAppRemediationAction)() + SetAppActionIfMaximumPinRetriesExceeded(value *ManagedAppRemediationAction)() + SetAppActionIfUnableToAuthenticateUser(value *ManagedAppRemediationAction)() + SetBlockDataIngestionIntoOrganizationDocuments(value *bool)() + SetContactSyncBlocked(value *bool)() + SetDataBackupBlocked(value *bool)() + SetDeviceComplianceRequired(value *bool)() + SetDialerRestrictionLevel(value *ManagedAppPhoneNumberRedirectLevel)() + SetDisableAppPinIfDevicePinIsSet(value *bool)() + SetFingerprintBlocked(value *bool)() + SetGracePeriodToBlockAppsDuringOffClockHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetManagedBrowser(value *ManagedBrowserType)() + SetManagedBrowserToOpenLinksRequired(value *bool)() + SetMaximumAllowedDeviceThreatLevel(value *ManagedAppDeviceThreatLevel)() + SetMaximumPinRetries(value *int32)() + SetMaximumRequiredOsVersion(value *string)() + SetMaximumWarningOsVersion(value *string)() + SetMaximumWipeOsVersion(value *string)() + SetMinimumPinLength(value *int32)() + SetMinimumRequiredAppVersion(value *string)() + SetMinimumRequiredOsVersion(value *string)() + SetMinimumWarningAppVersion(value *string)() + SetMinimumWarningOsVersion(value *string)() + SetMinimumWipeAppVersion(value *string)() + SetMinimumWipeOsVersion(value *string)() + SetMobileThreatDefensePartnerPriority(value *MobileThreatDefensePartnerPriority)() + SetMobileThreatDefenseRemediationAction(value *ManagedAppRemediationAction)() + SetNotificationRestriction(value *ManagedAppNotificationRestriction)() + SetOrganizationalCredentialsRequired(value *bool)() + SetPeriodBeforePinReset(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPeriodOfflineBeforeAccessCheck(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPeriodOfflineBeforeWipeIsEnforced(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPeriodOnlineBeforeAccessCheck(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPinCharacterSet(value *ManagedAppPinCharacterSet)() + SetPinRequired(value *bool)() + SetPinRequiredInsteadOfBiometricTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetPreviousPinBlockCount(value *int32)() + SetPrintBlocked(value *bool)() + SetSaveAsBlocked(value *bool)() + SetSimplePinBlocked(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_registration.go b/src/internal/connector/graph/betasdk/models/managed_app_registration.go new file mode 100644 index 000000000..f937f605d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_registration.go @@ -0,0 +1,577 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppRegistration the ManagedAppEntity is the base entity type for all other entity types under app management workflow. +type ManagedAppRegistration struct { + Entity + // The app package Identifier + appIdentifier MobileAppIdentifierable + // App version + applicationVersion *string + // Zero or more policys already applied on the registered app when it last synchronized with managment service. + appliedPolicies []ManagedAppPolicyable + // The Azure Active Directory Device identifier of the host device. Value could be empty even when the host device is Azure Active Directory registered. + azureADDeviceId *string + // Date and time of creation + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The device manufacturer for the current app registration + deviceManufacturer *string + // The device model for the current app registration + deviceModel *string + // Host device name + deviceName *string + // App management SDK generated tag, which helps relate apps hosted on the same device. Not guaranteed to relate apps in all conditions. + deviceTag *string + // Host device type + deviceType *string + // Zero or more reasons an app registration is flagged. E.g. app running on rooted device + flaggedReasons []ManagedAppFlaggedReason + // Zero or more policies admin intended for the app as of now. + intendedPolicies []ManagedAppPolicyable + // Date and time of last the app synced with management service. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Managed Device identifier of the host device. Value could be empty even when the host device is managed. + managedDeviceId *string + // App management SDK version + managementSdkVersion *string + // Zero or more long running operations triggered on the app registration. + operations []ManagedAppOperationable + // Operating System version + platformVersion *string + // The user Id to who this app registration belongs. + userId *string + // Version of the entity. + version *string +} +// NewManagedAppRegistration instantiates a new managedAppRegistration and sets the default values. +func NewManagedAppRegistration()(*ManagedAppRegistration) { + m := &ManagedAppRegistration{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAppRegistrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidManagedAppRegistration": + return NewAndroidManagedAppRegistration(), nil + case "#microsoft.graph.iosManagedAppRegistration": + return NewIosManagedAppRegistration(), nil + } + } + } + } + return NewManagedAppRegistration(), nil +} +// GetAppIdentifier gets the appIdentifier property value. The app package Identifier +func (m *ManagedAppRegistration) GetAppIdentifier()(MobileAppIdentifierable) { + return m.appIdentifier +} +// GetApplicationVersion gets the applicationVersion property value. App version +func (m *ManagedAppRegistration) GetApplicationVersion()(*string) { + return m.applicationVersion +} +// GetAppliedPolicies gets the appliedPolicies property value. Zero or more policys already applied on the registered app when it last synchronized with managment service. +func (m *ManagedAppRegistration) GetAppliedPolicies()([]ManagedAppPolicyable) { + return m.appliedPolicies +} +// GetAzureADDeviceId gets the azureADDeviceId property value. The Azure Active Directory Device identifier of the host device. Value could be empty even when the host device is Azure Active Directory registered. +func (m *ManagedAppRegistration) GetAzureADDeviceId()(*string) { + return m.azureADDeviceId +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of creation +func (m *ManagedAppRegistration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeviceManufacturer gets the deviceManufacturer property value. The device manufacturer for the current app registration +func (m *ManagedAppRegistration) GetDeviceManufacturer()(*string) { + return m.deviceManufacturer +} +// GetDeviceModel gets the deviceModel property value. The device model for the current app registration +func (m *ManagedAppRegistration) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetDeviceName gets the deviceName property value. Host device name +func (m *ManagedAppRegistration) GetDeviceName()(*string) { + return m.deviceName +} +// GetDeviceTag gets the deviceTag property value. App management SDK generated tag, which helps relate apps hosted on the same device. Not guaranteed to relate apps in all conditions. +func (m *ManagedAppRegistration) GetDeviceTag()(*string) { + return m.deviceTag +} +// GetDeviceType gets the deviceType property value. Host device type +func (m *ManagedAppRegistration) GetDeviceType()(*string) { + return m.deviceType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppRegistration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppIdentifier(val.(MobileAppIdentifierable)) + } + return nil + } + res["applicationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationVersion(val) + } + return nil + } + res["appliedPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyable) + } + m.SetAppliedPolicies(res) + } + return nil + } + res["azureADDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureADDeviceId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deviceManufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceManufacturer(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["deviceTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceTag(val) + } + return nil + } + res["deviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceType(val) + } + return nil + } + res["flaggedReasons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseManagedAppFlaggedReason) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppFlaggedReason, len(val)) + for i, v := range val { + res[i] = *(v.(*ManagedAppFlaggedReason)) + } + m.SetFlaggedReasons(res) + } + return nil + } + res["intendedPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppPolicyable) + } + m.SetIntendedPolicies(res) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managementSdkVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementSdkVersion(val) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppOperationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppOperationable) + } + m.SetOperations(res) + } + return nil + } + res["platformVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatformVersion(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetFlaggedReasons gets the flaggedReasons property value. Zero or more reasons an app registration is flagged. E.g. app running on rooted device +func (m *ManagedAppRegistration) GetFlaggedReasons()([]ManagedAppFlaggedReason) { + return m.flaggedReasons +} +// GetIntendedPolicies gets the intendedPolicies property value. Zero or more policies admin intended for the app as of now. +func (m *ManagedAppRegistration) GetIntendedPolicies()([]ManagedAppPolicyable) { + return m.intendedPolicies +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Date and time of last the app synced with management service. +func (m *ManagedAppRegistration) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. The Managed Device identifier of the host device. Value could be empty even when the host device is managed. +func (m *ManagedAppRegistration) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagementSdkVersion gets the managementSdkVersion property value. App management SDK version +func (m *ManagedAppRegistration) GetManagementSdkVersion()(*string) { + return m.managementSdkVersion +} +// GetOperations gets the operations property value. Zero or more long running operations triggered on the app registration. +func (m *ManagedAppRegistration) GetOperations()([]ManagedAppOperationable) { + return m.operations +} +// GetPlatformVersion gets the platformVersion property value. Operating System version +func (m *ManagedAppRegistration) GetPlatformVersion()(*string) { + return m.platformVersion +} +// GetUserId gets the userId property value. The user Id to who this app registration belongs. +func (m *ManagedAppRegistration) GetUserId()(*string) { + return m.userId +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedAppRegistration) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedAppRegistration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("appIdentifier", m.GetAppIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("applicationVersion", m.GetApplicationVersion()) + if err != nil { + return err + } + } + if m.GetAppliedPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppliedPolicies())) + for i, v := range m.GetAppliedPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appliedPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureADDeviceId", m.GetAzureADDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceManufacturer", m.GetDeviceManufacturer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceTag", m.GetDeviceTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceType", m.GetDeviceType()) + if err != nil { + return err + } + } + if m.GetFlaggedReasons() != nil { + err = writer.WriteCollectionOfStringValues("flaggedReasons", SerializeManagedAppFlaggedReason(m.GetFlaggedReasons())) + if err != nil { + return err + } + } + if m.GetIntendedPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIntendedPolicies())) + for i, v := range m.GetIntendedPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("intendedPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementSdkVersion", m.GetManagementSdkVersion()) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("platformVersion", m.GetPlatformVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAppIdentifier sets the appIdentifier property value. The app package Identifier +func (m *ManagedAppRegistration) SetAppIdentifier(value MobileAppIdentifierable)() { + m.appIdentifier = value +} +// SetApplicationVersion sets the applicationVersion property value. App version +func (m *ManagedAppRegistration) SetApplicationVersion(value *string)() { + m.applicationVersion = value +} +// SetAppliedPolicies sets the appliedPolicies property value. Zero or more policys already applied on the registered app when it last synchronized with managment service. +func (m *ManagedAppRegistration) SetAppliedPolicies(value []ManagedAppPolicyable)() { + m.appliedPolicies = value +} +// SetAzureADDeviceId sets the azureADDeviceId property value. The Azure Active Directory Device identifier of the host device. Value could be empty even when the host device is Azure Active Directory registered. +func (m *ManagedAppRegistration) SetAzureADDeviceId(value *string)() { + m.azureADDeviceId = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of creation +func (m *ManagedAppRegistration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeviceManufacturer sets the deviceManufacturer property value. The device manufacturer for the current app registration +func (m *ManagedAppRegistration) SetDeviceManufacturer(value *string)() { + m.deviceManufacturer = value +} +// SetDeviceModel sets the deviceModel property value. The device model for the current app registration +func (m *ManagedAppRegistration) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetDeviceName sets the deviceName property value. Host device name +func (m *ManagedAppRegistration) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDeviceTag sets the deviceTag property value. App management SDK generated tag, which helps relate apps hosted on the same device. Not guaranteed to relate apps in all conditions. +func (m *ManagedAppRegistration) SetDeviceTag(value *string)() { + m.deviceTag = value +} +// SetDeviceType sets the deviceType property value. Host device type +func (m *ManagedAppRegistration) SetDeviceType(value *string)() { + m.deviceType = value +} +// SetFlaggedReasons sets the flaggedReasons property value. Zero or more reasons an app registration is flagged. E.g. app running on rooted device +func (m *ManagedAppRegistration) SetFlaggedReasons(value []ManagedAppFlaggedReason)() { + m.flaggedReasons = value +} +// SetIntendedPolicies sets the intendedPolicies property value. Zero or more policies admin intended for the app as of now. +func (m *ManagedAppRegistration) SetIntendedPolicies(value []ManagedAppPolicyable)() { + m.intendedPolicies = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Date and time of last the app synced with management service. +func (m *ManagedAppRegistration) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The Managed Device identifier of the host device. Value could be empty even when the host device is managed. +func (m *ManagedAppRegistration) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagementSdkVersion sets the managementSdkVersion property value. App management SDK version +func (m *ManagedAppRegistration) SetManagementSdkVersion(value *string)() { + m.managementSdkVersion = value +} +// SetOperations sets the operations property value. Zero or more long running operations triggered on the app registration. +func (m *ManagedAppRegistration) SetOperations(value []ManagedAppOperationable)() { + m.operations = value +} +// SetPlatformVersion sets the platformVersion property value. Operating System version +func (m *ManagedAppRegistration) SetPlatformVersion(value *string)() { + m.platformVersion = value +} +// SetUserId sets the userId property value. The user Id to who this app registration belongs. +func (m *ManagedAppRegistration) SetUserId(value *string)() { + m.userId = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedAppRegistration) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_response.go new file mode 100644 index 000000000..2be8b894b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppRegistrationCollectionResponse +type ManagedAppRegistrationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppRegistrationable +} +// NewManagedAppRegistrationCollectionResponse instantiates a new ManagedAppRegistrationCollectionResponse and sets the default values. +func NewManagedAppRegistrationCollectionResponse()(*ManagedAppRegistrationCollectionResponse) { + m := &ManagedAppRegistrationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppRegistrationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppRegistrationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppRegistrationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppRegistrationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppRegistrationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppRegistrationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppRegistrationCollectionResponse) GetValue()([]ManagedAppRegistrationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppRegistrationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppRegistrationCollectionResponse) SetValue(value []ManagedAppRegistrationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_responseable.go new file mode 100644 index 000000000..3373ccf50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_registration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppRegistrationCollectionResponseable +type ManagedAppRegistrationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppRegistrationable) + SetValue(value []ManagedAppRegistrationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_registrationable.go b/src/internal/connector/graph/betasdk/models/managed_app_registrationable.go new file mode 100644 index 000000000..0629d522c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_registrationable.go @@ -0,0 +1,50 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppRegistrationable +type ManagedAppRegistrationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppIdentifier()(MobileAppIdentifierable) + GetApplicationVersion()(*string) + GetAppliedPolicies()([]ManagedAppPolicyable) + GetAzureADDeviceId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceManufacturer()(*string) + GetDeviceModel()(*string) + GetDeviceName()(*string) + GetDeviceTag()(*string) + GetDeviceType()(*string) + GetFlaggedReasons()([]ManagedAppFlaggedReason) + GetIntendedPolicies()([]ManagedAppPolicyable) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetManagementSdkVersion()(*string) + GetOperations()([]ManagedAppOperationable) + GetPlatformVersion()(*string) + GetUserId()(*string) + GetVersion()(*string) + SetAppIdentifier(value MobileAppIdentifierable)() + SetApplicationVersion(value *string)() + SetAppliedPolicies(value []ManagedAppPolicyable)() + SetAzureADDeviceId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceManufacturer(value *string)() + SetDeviceModel(value *string)() + SetDeviceName(value *string)() + SetDeviceTag(value *string)() + SetDeviceType(value *string)() + SetFlaggedReasons(value []ManagedAppFlaggedReason)() + SetIntendedPolicies(value []ManagedAppPolicyable)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetManagementSdkVersion(value *string)() + SetOperations(value []ManagedAppOperationable)() + SetPlatformVersion(value *string)() + SetUserId(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_remediation_action.go b/src/internal/connector/graph/betasdk/models/managed_app_remediation_action.go new file mode 100644 index 000000000..68b59b3c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_remediation_action.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedAppRemediationAction int + +const ( + // app and the corresponding company data to be blocked + BLOCK_MANAGEDAPPREMEDIATIONACTION ManagedAppRemediationAction = iota + // app and the corresponding company data to be wiped + WIPE_MANAGEDAPPREMEDIATIONACTION + // app and the corresponding user to be warned + WARN_MANAGEDAPPREMEDIATIONACTION +) + +func (i ManagedAppRemediationAction) String() string { + return []string{"block", "wipe", "warn"}[i] +} +func ParseManagedAppRemediationAction(v string) (interface{}, error) { + result := BLOCK_MANAGEDAPPREMEDIATIONACTION + switch v { + case "block": + result = BLOCK_MANAGEDAPPREMEDIATIONACTION + case "wipe": + result = WIPE_MANAGEDAPPREMEDIATIONACTION + case "warn": + result = WARN_MANAGEDAPPREMEDIATIONACTION + default: + return 0, errors.New("Unknown ManagedAppRemediationAction value: " + v) + } + return &result, nil +} +func SerializeManagedAppRemediationAction(values []ManagedAppRemediationAction) []string { + 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/managed_app_status.go b/src/internal/connector/graph/betasdk/models/managed_app_status.go new file mode 100644 index 000000000..17289c314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status.go @@ -0,0 +1,104 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatus represents app protection and configuration status for the organization. +type ManagedAppStatus struct { + Entity + // Friendly name of the status report. + displayName *string + // Version of the entity. + version *string +} +// NewManagedAppStatus instantiates a new managedAppStatus and sets the default values. +func NewManagedAppStatus()(*ManagedAppStatus) { + m := &ManagedAppStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedAppStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.managedAppStatusRaw": + return NewManagedAppStatusRaw(), nil + } + } + } + } + return NewManagedAppStatus(), nil +} +// GetDisplayName gets the displayName property value. Friendly name of the status report. +func (m *ManagedAppStatus) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedAppStatus) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedAppStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Friendly name of the status report. +func (m *ManagedAppStatus) SetDisplayName(value *string)() { + m.displayName = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedAppStatus) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_status_collection_response.go new file mode 100644 index 000000000..515dbd99e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusCollectionResponse +type ManagedAppStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppStatusable +} +// NewManagedAppStatusCollectionResponse instantiates a new ManagedAppStatusCollectionResponse and sets the default values. +func NewManagedAppStatusCollectionResponse()(*ManagedAppStatusCollectionResponse) { + m := &ManagedAppStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppStatusCollectionResponse) GetValue()([]ManagedAppStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppStatusCollectionResponse) SetValue(value []ManagedAppStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_status_collection_responseable.go new file mode 100644 index 000000000..b44720951 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusCollectionResponseable +type ManagedAppStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppStatusable) + SetValue(value []ManagedAppStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_raw.go b/src/internal/connector/graph/betasdk/models/managed_app_status_raw.go new file mode 100644 index 000000000..790ffdcc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_raw.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusRaw +type ManagedAppStatusRaw struct { + ManagedAppStatus + // Status report content. + content Jsonable +} +// NewManagedAppStatusRaw instantiates a new ManagedAppStatusRaw and sets the default values. +func NewManagedAppStatusRaw()(*ManagedAppStatusRaw) { + m := &ManagedAppStatusRaw{ + ManagedAppStatus: *NewManagedAppStatus(), + } + odataTypeValue := "#microsoft.graph.managedAppStatusRaw"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedAppStatusRawFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppStatusRawFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppStatusRaw(), nil +} +// GetContent gets the content property value. Status report content. +func (m *ManagedAppStatusRaw) GetContent()(Jsonable) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppStatusRaw) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedAppStatus.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateJsonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(Jsonable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ManagedAppStatusRaw) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedAppStatus.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("content", m.GetContent()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. Status report content. +func (m *ManagedAppStatusRaw) SetContent(value Jsonable)() { + m.content = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_response.go new file mode 100644 index 000000000..488590ac9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusRawCollectionResponse +type ManagedAppStatusRawCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedAppStatusRawable +} +// NewManagedAppStatusRawCollectionResponse instantiates a new ManagedAppStatusRawCollectionResponse and sets the default values. +func NewManagedAppStatusRawCollectionResponse()(*ManagedAppStatusRawCollectionResponse) { + m := &ManagedAppStatusRawCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedAppStatusRawCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedAppStatusRawCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedAppStatusRawCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedAppStatusRawCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedAppStatusRawFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedAppStatusRawable, len(val)) + for i, v := range val { + res[i] = v.(ManagedAppStatusRawable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedAppStatusRawCollectionResponse) GetValue()([]ManagedAppStatusRawable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedAppStatusRawCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedAppStatusRawCollectionResponse) SetValue(value []ManagedAppStatusRawable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_responseable.go new file mode 100644 index 000000000..14782777c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_raw_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusRawCollectionResponseable +type ManagedAppStatusRawCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedAppStatusRawable) + SetValue(value []ManagedAppStatusRawable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_status_rawable.go b/src/internal/connector/graph/betasdk/models/managed_app_status_rawable.go new file mode 100644 index 000000000..44fdb05d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_status_rawable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusRawable +type ManagedAppStatusRawable interface { + ManagedAppStatusable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()(Jsonable) + SetContent(value Jsonable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_app_statusable.go b/src/internal/connector/graph/betasdk/models/managed_app_statusable.go new file mode 100644 index 000000000..b8dae1a2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_app_statusable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppStatusable +type ManagedAppStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetVersion()(*string) + SetDisplayName(value *string)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_appable.go b/src/internal/connector/graph/betasdk/models/managed_appable.go new file mode 100644 index 000000000..96a2f305a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_appable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedAppable +type ManagedAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppAvailability()(*ManagedAppAvailability) + GetVersion()(*string) + SetAppAvailability(value *ManagedAppAvailability)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_browser_type.go b/src/internal/connector/graph/betasdk/models/managed_browser_type.go new file mode 100644 index 000000000..a4381971c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_browser_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedBrowserType int + +const ( + // Not configured + NOTCONFIGURED_MANAGEDBROWSERTYPE ManagedBrowserType = iota + // Microsoft Edge + MICROSOFTEDGE_MANAGEDBROWSERTYPE +) + +func (i ManagedBrowserType) String() string { + return []string{"notConfigured", "microsoftEdge"}[i] +} +func ParseManagedBrowserType(v string) (interface{}, error) { + result := NOTCONFIGURED_MANAGEDBROWSERTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_MANAGEDBROWSERTYPE + case "microsoftEdge": + result = MICROSOFTEDGE_MANAGEDBROWSERTYPE + default: + return 0, errors.New("Unknown ManagedBrowserType value: " + v) + } + return &result, nil +} +func SerializeManagedBrowserType(values []ManagedBrowserType) []string { + 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/managed_device.go b/src/internal/connector/graph/betasdk/models/managed_device.go new file mode 100644 index 000000000..49a35d91a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device.go @@ -0,0 +1,2191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDevice devices that are managed or pre-enrolled through Intune +type ManagedDevice struct { + Entity + // Whether the device is Azure Active Directory registered. This property is read-only. + aadRegistered *bool + // The code that allows the Activation Lock on managed device to be bypassed. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity in LIST call. Individual GET call with select query options is needed to retrieve actual values. Supports: $select. $Search is not supported. Read-only. This property is read-only. + activationLockBypassCode *string + // Android security patch level. This property is read-only. + androidSecurityPatchLevel *string + // Managed device mobile app configuration states for this device. + assignmentFilterEvaluationStatusDetails []AssignmentFilterEvaluationStatusDetailsable + // Reports if the managed device is enrolled via auto-pilot. This property is read-only. + autopilotEnrolled *bool + // The unique identifier for the Azure Active Directory device. Read only. This property is read-only. + azureActiveDirectoryDeviceId *string + // The unique identifier for the Azure Active Directory device. Read only. This property is read-only. + azureADDeviceId *string + // Whether the device is Azure Active Directory registered. This property is read-only. + azureADRegistered *bool + // Reports if the managed device has an escrowed Bootstrap Token. This is only for macOS devices. To get, include BootstrapTokenEscrowed in the select clause and query with a device id. If FALSE, no bootstrap token is escrowed. If TRUE, the device has escrowed a bootstrap token with Intune. This property is read-only. + bootstrapTokenEscrowed *bool + // Chassis type. + chassisType *ChassisType + // List of properties of the ChromeOS Device. + chromeOSDeviceInfo []ChromeOSDevicePropertyable + // The cloudPcRemoteActionResults property + cloudPcRemoteActionResults []CloudPcRemoteActionResultable + // The DateTime when device compliance grace period expires. This property is read-only. + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Compliance state. + complianceState *ComplianceState + // ConfigrMgr client enabled features. This property is read-only. + configurationManagerClientEnabledFeatures ConfigurationManagerClientEnabledFeaturesable + // Configuration manager client health state, valid only for devices managed by MDM/ConfigMgr Agent + configurationManagerClientHealthState ConfigurationManagerClientHealthStateable + // Configuration manager client information, valid only for devices managed, duel-managed or tri-managed by ConfigMgr Agent + configurationManagerClientInformation ConfigurationManagerClientInformationable + // All applications currently installed on the device + detectedApps []DetectedAppable + // List of ComplexType deviceActionResult objects. This property is read-only. + deviceActionResults []DeviceActionResultable + // Device category + deviceCategory DeviceCategoryable + // Device category display name. This property is read-only. + deviceCategoryDisplayName *string + // Device compliance policy states for this device. + deviceCompliancePolicyStates []DeviceCompliancePolicyStateable + // Device configuration states for this device. + deviceConfigurationStates []DeviceConfigurationStateable + // Possible ways of adding a mobile device to management. + deviceEnrollmentType *DeviceEnrollmentType + // Indicates whether the device is DFCI managed. When TRUE the device is DFCI managed. When FALSE, the device is not DFCI managed. The default value is FALSE. + deviceFirmwareConfigurationInterfaceManaged *bool + // The device health attestation state. This property is read-only. + deviceHealthAttestationState DeviceHealthAttestationStateable + // Name of the device. This property is read-only. + deviceName *string + // Device registration status. + deviceRegistrationState *DeviceRegistrationState + // Device type. + deviceType *DeviceType + // Whether the device is Exchange ActiveSync activated. This property is read-only. + easActivated *bool + // Exchange ActivationSync activation time of the device. This property is read-only. + easActivationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Exchange ActiveSync Id of the device. This property is read-only. + easDeviceId *string + // Email(s) for the user associated with the device. This property is read-only. + emailAddress *string + // Enrollment time of the device. This property is read-only. + enrolledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the enrollment profile assigned to the device. Default value is empty string, indicating no enrollment profile was assgined. This property is read-only. + enrollmentProfileName *string + // Ethernet MAC. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity. Individual get call with select query options is needed to retrieve actual values. Example: deviceManagement/managedDevices({managedDeviceId})?$select=ethernetMacAddress Supports: $select. $Search is not supported. Read-only. This property is read-only. + ethernetMacAddress *string + // Device Exchange Access State. + exchangeAccessState *DeviceManagementExchangeAccessState + // Device Exchange Access State Reason. + exchangeAccessStateReason *DeviceManagementExchangeAccessStateReason + // Last time the device contacted Exchange. This property is read-only. + exchangeLastSuccessfulSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Free Storage in Bytes. Default value is 0. Read-only. This property is read-only. + freeStorageSpaceInBytes *int64 + // The hardward details for the device. Includes information such as storage space, manufacturer, serial number, etc. Return default value in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. + hardwareInformation HardwareInformationable + // Integrated Circuit Card Identifier, it is A SIM card's unique identification number. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. + iccid *string + // IMEI. This property is read-only. + imei *string + // Device encryption status. This property is read-only. + isEncrypted *bool + // Device supervised status. This property is read-only. + isSupervised *bool + // whether the device is jail broken or rooted. This property is read-only. + jailBroken *string + // Device enrollment join type. + joinType *JoinType + // The date and time that the device last completed a successful sync with Intune. This property is read-only. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of log collection requests + logCollectionRequests []DeviceLogCollectionResponseable + // State of lost mode, indicating if lost mode is enabled or disabled + lostModeState *LostModeState + // Managed device mobile app configuration states for this device. + managedDeviceMobileAppConfigurationStates []ManagedDeviceMobileAppConfigurationStateable + // Automatically generated name to identify a device. Can be overwritten to a user friendly name. + managedDeviceName *string + // Owner type of device. + managedDeviceOwnerType *ManagedDeviceOwnerType + // Management agent type. + managementAgent *ManagementAgentType + // Reports device management certificate expiration date. This property is read-only. + managementCertificateExpirationDate *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device management features. + managementFeatures *ManagedDeviceManagementFeatures + // Management state of device in Microsoft Intune. + managementState *ManagementState + // Manufacturer of the device. This property is read-only. + manufacturer *string + // MEID. This property is read-only. + meid *string + // Model of the device. This property is read-only. + model *string + // Notes on the device created by IT Admin. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. + notes *string + // Operating system of the device. Windows, iOS, etc. This property is read-only. + operatingSystem *string + // Operating system version of the device. This property is read-only. + osVersion *string + // Owner type of device. + ownerType *OwnerType + // Available health states for the Device Health API + partnerReportedThreatState *ManagedDevicePartnerReportedHealthState + // Phone number of the device. This property is read-only. + phoneNumber *string + // Total Memory in Bytes. Return default value 0 in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. Default value is 0. Read-only. This property is read-only. + physicalMemoryInBytes *int64 + // Reports the DateTime the preferMdmOverGroupPolicy setting was set. When set, the Intune MDM settings will override Group Policy settings if there is a conflict. Read Only. This property is read-only. + preferMdmOverGroupPolicyAppliedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Processor architecture + processorArchitecture *ManagedDeviceArchitecture + // An error string that identifies issues when creating Remote Assistance session objects. This property is read-only. + remoteAssistanceSessionErrorDetails *string + // Url that allows a Remote Assistance session to be established with the device. This property is read-only. + remoteAssistanceSessionUrl *string + // Reports if the managed iOS device is user approval enrollment. This property is read-only. + requireUserEnrollmentApproval *bool + // Indicates the time after when a device will be auto retired because of scheduled action. This property is read-only. + retireAfterDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tag IDs for this Device instance. + roleScopeTagIds []string + // Security baseline states for this device. + securityBaselineStates []SecurityBaselineStateable + // SerialNumber. This property is read-only. + serialNumber *string + // Device sku family + skuFamily *string + // Device sku number, see also: https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo. Valid values 0 to 2147483647. This property is read-only. + skuNumber *int32 + // Specification version. This property is read-only. + specificationVersion *string + // Subscriber Carrier. This property is read-only. + subscriberCarrier *string + // Total Storage in Bytes. This property is read-only. + totalStorageSpaceInBytes *int64 + // Unique Device Identifier for iOS and macOS devices. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. + udid *string + // User display name. This property is read-only. + userDisplayName *string + // Unique Identifier for the user associated with the device. This property is read-only. + userId *string + // Device user principal name. This property is read-only. + userPrincipalName *string + // The primary users associated with the managed device. + users []Userable + // Indicates the last logged on users of a device. This property is read-only. + usersLoggedOn []LoggedOnUserable + // Wi-Fi MAC. This property is read-only. + wiFiMacAddress *string + // Count of active malware for this windows device. This property is read-only. + windowsActiveMalwareCount *int32 + // The device protection status. This property is read-only. + windowsProtectionState WindowsProtectionStateable + // Count of remediated malware for this windows device. This property is read-only. + windowsRemediatedMalwareCount *int32 +} +// NewManagedDevice instantiates a new managedDevice and sets the default values. +func NewManagedDevice()(*ManagedDevice) { + m := &ManagedDevice{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsManagedDevice": + return NewWindowsManagedDevice(), nil + } + } + } + } + return NewManagedDevice(), nil +} +// GetAadRegistered gets the aadRegistered property value. Whether the device is Azure Active Directory registered. This property is read-only. +func (m *ManagedDevice) GetAadRegistered()(*bool) { + return m.aadRegistered +} +// GetActivationLockBypassCode gets the activationLockBypassCode property value. The code that allows the Activation Lock on managed device to be bypassed. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity in LIST call. Individual GET call with select query options is needed to retrieve actual values. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) GetActivationLockBypassCode()(*string) { + return m.activationLockBypassCode +} +// GetAndroidSecurityPatchLevel gets the androidSecurityPatchLevel property value. Android security patch level. This property is read-only. +func (m *ManagedDevice) GetAndroidSecurityPatchLevel()(*string) { + return m.androidSecurityPatchLevel +} +// GetAssignmentFilterEvaluationStatusDetails gets the assignmentFilterEvaluationStatusDetails property value. Managed device mobile app configuration states for this device. +func (m *ManagedDevice) GetAssignmentFilterEvaluationStatusDetails()([]AssignmentFilterEvaluationStatusDetailsable) { + return m.assignmentFilterEvaluationStatusDetails +} +// GetAutopilotEnrolled gets the autopilotEnrolled property value. Reports if the managed device is enrolled via auto-pilot. This property is read-only. +func (m *ManagedDevice) GetAutopilotEnrolled()(*bool) { + return m.autopilotEnrolled +} +// GetAzureActiveDirectoryDeviceId gets the azureActiveDirectoryDeviceId property value. The unique identifier for the Azure Active Directory device. Read only. This property is read-only. +func (m *ManagedDevice) GetAzureActiveDirectoryDeviceId()(*string) { + return m.azureActiveDirectoryDeviceId +} +// GetAzureADDeviceId gets the azureADDeviceId property value. The unique identifier for the Azure Active Directory device. Read only. This property is read-only. +func (m *ManagedDevice) GetAzureADDeviceId()(*string) { + return m.azureADDeviceId +} +// GetAzureADRegistered gets the azureADRegistered property value. Whether the device is Azure Active Directory registered. This property is read-only. +func (m *ManagedDevice) GetAzureADRegistered()(*bool) { + return m.azureADRegistered +} +// GetBootstrapTokenEscrowed gets the bootstrapTokenEscrowed property value. Reports if the managed device has an escrowed Bootstrap Token. This is only for macOS devices. To get, include BootstrapTokenEscrowed in the select clause and query with a device id. If FALSE, no bootstrap token is escrowed. If TRUE, the device has escrowed a bootstrap token with Intune. This property is read-only. +func (m *ManagedDevice) GetBootstrapTokenEscrowed()(*bool) { + return m.bootstrapTokenEscrowed +} +// GetChassisType gets the chassisType property value. Chassis type. +func (m *ManagedDevice) GetChassisType()(*ChassisType) { + return m.chassisType +} +// GetChromeOSDeviceInfo gets the chromeOSDeviceInfo property value. List of properties of the ChromeOS Device. +func (m *ManagedDevice) GetChromeOSDeviceInfo()([]ChromeOSDevicePropertyable) { + return m.chromeOSDeviceInfo +} +// GetCloudPcRemoteActionResults gets the cloudPcRemoteActionResults property value. The cloudPcRemoteActionResults property +func (m *ManagedDevice) GetCloudPcRemoteActionResults()([]CloudPcRemoteActionResultable) { + return m.cloudPcRemoteActionResults +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires. This property is read-only. +func (m *ManagedDevice) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetComplianceState gets the complianceState property value. Compliance state. +func (m *ManagedDevice) GetComplianceState()(*ComplianceState) { + return m.complianceState +} +// GetConfigurationManagerClientEnabledFeatures gets the configurationManagerClientEnabledFeatures property value. ConfigrMgr client enabled features. This property is read-only. +func (m *ManagedDevice) GetConfigurationManagerClientEnabledFeatures()(ConfigurationManagerClientEnabledFeaturesable) { + return m.configurationManagerClientEnabledFeatures +} +// GetConfigurationManagerClientHealthState gets the configurationManagerClientHealthState property value. Configuration manager client health state, valid only for devices managed by MDM/ConfigMgr Agent +func (m *ManagedDevice) GetConfigurationManagerClientHealthState()(ConfigurationManagerClientHealthStateable) { + return m.configurationManagerClientHealthState +} +// GetConfigurationManagerClientInformation gets the configurationManagerClientInformation property value. Configuration manager client information, valid only for devices managed, duel-managed or tri-managed by ConfigMgr Agent +func (m *ManagedDevice) GetConfigurationManagerClientInformation()(ConfigurationManagerClientInformationable) { + return m.configurationManagerClientInformation +} +// GetDetectedApps gets the detectedApps property value. All applications currently installed on the device +func (m *ManagedDevice) GetDetectedApps()([]DetectedAppable) { + return m.detectedApps +} +// GetDeviceActionResults gets the deviceActionResults property value. List of ComplexType deviceActionResult objects. This property is read-only. +func (m *ManagedDevice) GetDeviceActionResults()([]DeviceActionResultable) { + return m.deviceActionResults +} +// GetDeviceCategory gets the deviceCategory property value. Device category +func (m *ManagedDevice) GetDeviceCategory()(DeviceCategoryable) { + return m.deviceCategory +} +// GetDeviceCategoryDisplayName gets the deviceCategoryDisplayName property value. Device category display name. This property is read-only. +func (m *ManagedDevice) GetDeviceCategoryDisplayName()(*string) { + return m.deviceCategoryDisplayName +} +// GetDeviceCompliancePolicyStates gets the deviceCompliancePolicyStates property value. Device compliance policy states for this device. +func (m *ManagedDevice) GetDeviceCompliancePolicyStates()([]DeviceCompliancePolicyStateable) { + return m.deviceCompliancePolicyStates +} +// GetDeviceConfigurationStates gets the deviceConfigurationStates property value. Device configuration states for this device. +func (m *ManagedDevice) GetDeviceConfigurationStates()([]DeviceConfigurationStateable) { + return m.deviceConfigurationStates +} +// GetDeviceEnrollmentType gets the deviceEnrollmentType property value. Possible ways of adding a mobile device to management. +func (m *ManagedDevice) GetDeviceEnrollmentType()(*DeviceEnrollmentType) { + return m.deviceEnrollmentType +} +// GetDeviceFirmwareConfigurationInterfaceManaged gets the deviceFirmwareConfigurationInterfaceManaged property value. Indicates whether the device is DFCI managed. When TRUE the device is DFCI managed. When FALSE, the device is not DFCI managed. The default value is FALSE. +func (m *ManagedDevice) GetDeviceFirmwareConfigurationInterfaceManaged()(*bool) { + return m.deviceFirmwareConfigurationInterfaceManaged +} +// GetDeviceHealthAttestationState gets the deviceHealthAttestationState property value. The device health attestation state. This property is read-only. +func (m *ManagedDevice) GetDeviceHealthAttestationState()(DeviceHealthAttestationStateable) { + return m.deviceHealthAttestationState +} +// GetDeviceName gets the deviceName property value. Name of the device. This property is read-only. +func (m *ManagedDevice) GetDeviceName()(*string) { + return m.deviceName +} +// GetDeviceRegistrationState gets the deviceRegistrationState property value. Device registration status. +func (m *ManagedDevice) GetDeviceRegistrationState()(*DeviceRegistrationState) { + return m.deviceRegistrationState +} +// GetDeviceType gets the deviceType property value. Device type. +func (m *ManagedDevice) GetDeviceType()(*DeviceType) { + return m.deviceType +} +// GetEasActivated gets the easActivated property value. Whether the device is Exchange ActiveSync activated. This property is read-only. +func (m *ManagedDevice) GetEasActivated()(*bool) { + return m.easActivated +} +// GetEasActivationDateTime gets the easActivationDateTime property value. Exchange ActivationSync activation time of the device. This property is read-only. +func (m *ManagedDevice) GetEasActivationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.easActivationDateTime +} +// GetEasDeviceId gets the easDeviceId property value. Exchange ActiveSync Id of the device. This property is read-only. +func (m *ManagedDevice) GetEasDeviceId()(*string) { + return m.easDeviceId +} +// GetEmailAddress gets the emailAddress property value. Email(s) for the user associated with the device. This property is read-only. +func (m *ManagedDevice) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetEnrolledDateTime gets the enrolledDateTime property value. Enrollment time of the device. This property is read-only. +func (m *ManagedDevice) GetEnrolledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.enrolledDateTime +} +// GetEnrollmentProfileName gets the enrollmentProfileName property value. Name of the enrollment profile assigned to the device. Default value is empty string, indicating no enrollment profile was assgined. This property is read-only. +func (m *ManagedDevice) GetEnrollmentProfileName()(*string) { + return m.enrollmentProfileName +} +// GetEthernetMacAddress gets the ethernetMacAddress property value. Ethernet MAC. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity. Individual get call with select query options is needed to retrieve actual values. Example: deviceManagement/managedDevices({managedDeviceId})?$select=ethernetMacAddress Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) GetEthernetMacAddress()(*string) { + return m.ethernetMacAddress +} +// GetExchangeAccessState gets the exchangeAccessState property value. Device Exchange Access State. +func (m *ManagedDevice) GetExchangeAccessState()(*DeviceManagementExchangeAccessState) { + return m.exchangeAccessState +} +// GetExchangeAccessStateReason gets the exchangeAccessStateReason property value. Device Exchange Access State Reason. +func (m *ManagedDevice) GetExchangeAccessStateReason()(*DeviceManagementExchangeAccessStateReason) { + return m.exchangeAccessStateReason +} +// GetExchangeLastSuccessfulSyncDateTime gets the exchangeLastSuccessfulSyncDateTime property value. Last time the device contacted Exchange. This property is read-only. +func (m *ManagedDevice) GetExchangeLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.exchangeLastSuccessfulSyncDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["aadRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAadRegistered(val) + } + return nil + } + res["activationLockBypassCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivationLockBypassCode(val) + } + return nil + } + res["androidSecurityPatchLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidSecurityPatchLevel(val) + } + return nil + } + res["assignmentFilterEvaluationStatusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignmentFilterEvaluationStatusDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignmentFilterEvaluationStatusDetailsable, len(val)) + for i, v := range val { + res[i] = v.(AssignmentFilterEvaluationStatusDetailsable) + } + m.SetAssignmentFilterEvaluationStatusDetails(res) + } + return nil + } + res["autopilotEnrolled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutopilotEnrolled(val) + } + return nil + } + res["azureActiveDirectoryDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureActiveDirectoryDeviceId(val) + } + return nil + } + res["azureADDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureADDeviceId(val) + } + return nil + } + res["azureADRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureADRegistered(val) + } + return nil + } + res["bootstrapTokenEscrowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBootstrapTokenEscrowed(val) + } + return nil + } + res["chassisType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChassisType) + if err != nil { + return err + } + if val != nil { + m.SetChassisType(val.(*ChassisType)) + } + return nil + } + res["chromeOSDeviceInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateChromeOSDevicePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ChromeOSDevicePropertyable, len(val)) + for i, v := range val { + res[i] = v.(ChromeOSDevicePropertyable) + } + m.SetChromeOSDeviceInfo(res) + } + return nil + } + res["cloudPcRemoteActionResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcRemoteActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcRemoteActionResultable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcRemoteActionResultable) + } + m.SetCloudPcRemoteActionResults(res) + } + return nil + } + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["complianceState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceState) + if err != nil { + return err + } + if val != nil { + m.SetComplianceState(val.(*ComplianceState)) + } + return nil + } + res["configurationManagerClientEnabledFeatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationManagerClientEnabledFeaturesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfigurationManagerClientEnabledFeatures(val.(ConfigurationManagerClientEnabledFeaturesable)) + } + return nil + } + res["configurationManagerClientHealthState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationManagerClientHealthStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfigurationManagerClientHealthState(val.(ConfigurationManagerClientHealthStateable)) + } + return nil + } + res["configurationManagerClientInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateConfigurationManagerClientInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfigurationManagerClientInformation(val.(ConfigurationManagerClientInformationable)) + } + return nil + } + res["detectedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDetectedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DetectedAppable, len(val)) + for i, v := range val { + res[i] = v.(DetectedAppable) + } + m.SetDetectedApps(res) + } + return nil + } + res["deviceActionResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceActionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceActionResultable, len(val)) + for i, v := range val { + res[i] = v.(DeviceActionResultable) + } + m.SetDeviceActionResults(res) + } + return nil + } + res["deviceCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceCategory(val.(DeviceCategoryable)) + } + return nil + } + res["deviceCategoryDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCategoryDisplayName(val) + } + return nil + } + res["deviceCompliancePolicyStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicyStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicyStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicyStateable) + } + m.SetDeviceCompliancePolicyStates(res) + } + return nil + } + res["deviceConfigurationStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceConfigurationStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceConfigurationStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceConfigurationStateable) + } + m.SetDeviceConfigurationStates(res) + } + return nil + } + res["deviceEnrollmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceEnrollmentType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceEnrollmentType(val.(*DeviceEnrollmentType)) + } + return nil + } + res["deviceFirmwareConfigurationInterfaceManaged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceFirmwareConfigurationInterfaceManaged(val) + } + return nil + } + res["deviceHealthAttestationState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceHealthAttestationStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceHealthAttestationState(val.(DeviceHealthAttestationStateable)) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["deviceRegistrationState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceRegistrationState) + if err != nil { + return err + } + if val != nil { + m.SetDeviceRegistrationState(val.(*DeviceRegistrationState)) + } + return nil + } + res["deviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceType(val.(*DeviceType)) + } + return nil + } + res["easActivated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEasActivated(val) + } + return nil + } + res["easActivationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEasActivationDateTime(val) + } + return nil + } + res["easDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEasDeviceId(val) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["enrolledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledDateTime(val) + } + return nil + } + res["enrollmentProfileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrollmentProfileName(val) + } + return nil + } + res["ethernetMacAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEthernetMacAddress(val) + } + return nil + } + res["exchangeAccessState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeAccessState) + if err != nil { + return err + } + if val != nil { + m.SetExchangeAccessState(val.(*DeviceManagementExchangeAccessState)) + } + return nil + } + res["exchangeAccessStateReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceManagementExchangeAccessStateReason) + if err != nil { + return err + } + if val != nil { + m.SetExchangeAccessStateReason(val.(*DeviceManagementExchangeAccessStateReason)) + } + return nil + } + res["exchangeLastSuccessfulSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExchangeLastSuccessfulSyncDateTime(val) + } + return nil + } + res["freeStorageSpaceInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFreeStorageSpaceInBytes(val) + } + return nil + } + res["hardwareInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHardwareInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHardwareInformation(val.(HardwareInformationable)) + } + return nil + } + res["iccid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIccid(val) + } + return nil + } + res["imei"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImei(val) + } + return nil + } + res["isEncrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEncrypted(val) + } + return nil + } + res["isSupervised"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSupervised(val) + } + return nil + } + res["jailBroken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJailBroken(val) + } + return nil + } + res["joinType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseJoinType) + if err != nil { + return err + } + if val != nil { + m.SetJoinType(val.(*JoinType)) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["logCollectionRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceLogCollectionResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceLogCollectionResponseable, len(val)) + for i, v := range val { + res[i] = v.(DeviceLogCollectionResponseable) + } + m.SetLogCollectionRequests(res) + } + return nil + } + res["lostModeState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLostModeState) + if err != nil { + return err + } + if val != nil { + m.SetLostModeState(val.(*LostModeState)) + } + return nil + } + res["managedDeviceMobileAppConfigurationStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationStateable) + } + m.SetManagedDeviceMobileAppConfigurationStates(res) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["managedDeviceOwnerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedDeviceOwnerType) + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceOwnerType(val.(*ManagedDeviceOwnerType)) + } + return nil + } + res["managementAgent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementAgentType) + if err != nil { + return err + } + if val != nil { + m.SetManagementAgent(val.(*ManagementAgentType)) + } + return nil + } + res["managementCertificateExpirationDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementCertificateExpirationDate(val) + } + return nil + } + res["managementFeatures"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedDeviceManagementFeatures) + if err != nil { + return err + } + if val != nil { + m.SetManagementFeatures(val.(*ManagedDeviceManagementFeatures)) + } + return nil + } + res["managementState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementState) + if err != nil { + return err + } + if val != nil { + m.SetManagementState(val.(*ManagementState)) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["meid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMeid(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOwnerType) + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val.(*OwnerType)) + } + return nil + } + res["partnerReportedThreatState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedDevicePartnerReportedHealthState) + if err != nil { + return err + } + if val != nil { + m.SetPartnerReportedThreatState(val.(*ManagedDevicePartnerReportedHealthState)) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["physicalMemoryInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPhysicalMemoryInBytes(val) + } + return nil + } + res["preferMdmOverGroupPolicyAppliedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferMdmOverGroupPolicyAppliedDateTime(val) + } + return nil + } + res["processorArchitecture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagedDeviceArchitecture) + if err != nil { + return err + } + if val != nil { + m.SetProcessorArchitecture(val.(*ManagedDeviceArchitecture)) + } + return nil + } + res["remoteAssistanceSessionErrorDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteAssistanceSessionErrorDetails(val) + } + return nil + } + res["remoteAssistanceSessionUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoteAssistanceSessionUrl(val) + } + return nil + } + res["requireUserEnrollmentApproval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequireUserEnrollmentApproval(val) + } + return nil + } + res["retireAfterDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRetireAfterDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["securityBaselineStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineStateable) + } + m.SetSecurityBaselineStates(res) + } + return nil + } + res["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + res["skuFamily"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSkuFamily(val) + } + return nil + } + res["skuNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSkuNumber(val) + } + return nil + } + res["specificationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSpecificationVersion(val) + } + return nil + } + res["subscriberCarrier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriberCarrier(val) + } + return nil + } + res["totalStorageSpaceInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalStorageSpaceInBytes(val) + } + return nil + } + res["udid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUdid(val) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["users"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Userable, len(val)) + for i, v := range val { + res[i] = v.(Userable) + } + m.SetUsers(res) + } + return nil + } + res["usersLoggedOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLoggedOnUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LoggedOnUserable, len(val)) + for i, v := range val { + res[i] = v.(LoggedOnUserable) + } + m.SetUsersLoggedOn(res) + } + return nil + } + res["wiFiMacAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWiFiMacAddress(val) + } + return nil + } + res["windowsActiveMalwareCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindowsActiveMalwareCount(val) + } + return nil + } + res["windowsProtectionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWindowsProtectionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWindowsProtectionState(val.(WindowsProtectionStateable)) + } + return nil + } + res["windowsRemediatedMalwareCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWindowsRemediatedMalwareCount(val) + } + return nil + } + return res +} +// GetFreeStorageSpaceInBytes gets the freeStorageSpaceInBytes property value. Free Storage in Bytes. Default value is 0. Read-only. This property is read-only. +func (m *ManagedDevice) GetFreeStorageSpaceInBytes()(*int64) { + return m.freeStorageSpaceInBytes +} +// GetHardwareInformation gets the hardwareInformation property value. The hardward details for the device. Includes information such as storage space, manufacturer, serial number, etc. Return default value in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) GetHardwareInformation()(HardwareInformationable) { + return m.hardwareInformation +} +// GetIccid gets the iccid property value. Integrated Circuit Card Identifier, it is A SIM card's unique identification number. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) GetIccid()(*string) { + return m.iccid +} +// GetImei gets the imei property value. IMEI. This property is read-only. +func (m *ManagedDevice) GetImei()(*string) { + return m.imei +} +// GetIsEncrypted gets the isEncrypted property value. Device encryption status. This property is read-only. +func (m *ManagedDevice) GetIsEncrypted()(*bool) { + return m.isEncrypted +} +// GetIsSupervised gets the isSupervised property value. Device supervised status. This property is read-only. +func (m *ManagedDevice) GetIsSupervised()(*bool) { + return m.isSupervised +} +// GetJailBroken gets the jailBroken property value. whether the device is jail broken or rooted. This property is read-only. +func (m *ManagedDevice) GetJailBroken()(*string) { + return m.jailBroken +} +// GetJoinType gets the joinType property value. Device enrollment join type. +func (m *ManagedDevice) GetJoinType()(*JoinType) { + return m.joinType +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The date and time that the device last completed a successful sync with Intune. This property is read-only. +func (m *ManagedDevice) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetLogCollectionRequests gets the logCollectionRequests property value. List of log collection requests +func (m *ManagedDevice) GetLogCollectionRequests()([]DeviceLogCollectionResponseable) { + return m.logCollectionRequests +} +// GetLostModeState gets the lostModeState property value. State of lost mode, indicating if lost mode is enabled or disabled +func (m *ManagedDevice) GetLostModeState()(*LostModeState) { + return m.lostModeState +} +// GetManagedDeviceMobileAppConfigurationStates gets the managedDeviceMobileAppConfigurationStates property value. Managed device mobile app configuration states for this device. +func (m *ManagedDevice) GetManagedDeviceMobileAppConfigurationStates()([]ManagedDeviceMobileAppConfigurationStateable) { + return m.managedDeviceMobileAppConfigurationStates +} +// GetManagedDeviceName gets the managedDeviceName property value. Automatically generated name to identify a device. Can be overwritten to a user friendly name. +func (m *ManagedDevice) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetManagedDeviceOwnerType gets the managedDeviceOwnerType property value. Owner type of device. +func (m *ManagedDevice) GetManagedDeviceOwnerType()(*ManagedDeviceOwnerType) { + return m.managedDeviceOwnerType +} +// GetManagementAgent gets the managementAgent property value. Management agent type. +func (m *ManagedDevice) GetManagementAgent()(*ManagementAgentType) { + return m.managementAgent +} +// GetManagementCertificateExpirationDate gets the managementCertificateExpirationDate property value. Reports device management certificate expiration date. This property is read-only. +func (m *ManagedDevice) GetManagementCertificateExpirationDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.managementCertificateExpirationDate +} +// GetManagementFeatures gets the managementFeatures property value. Device management features. +func (m *ManagedDevice) GetManagementFeatures()(*ManagedDeviceManagementFeatures) { + return m.managementFeatures +} +// GetManagementState gets the managementState property value. Management state of device in Microsoft Intune. +func (m *ManagedDevice) GetManagementState()(*ManagementState) { + return m.managementState +} +// GetManufacturer gets the manufacturer property value. Manufacturer of the device. This property is read-only. +func (m *ManagedDevice) GetManufacturer()(*string) { + return m.manufacturer +} +// GetMeid gets the meid property value. MEID. This property is read-only. +func (m *ManagedDevice) GetMeid()(*string) { + return m.meid +} +// GetModel gets the model property value. Model of the device. This property is read-only. +func (m *ManagedDevice) GetModel()(*string) { + return m.model +} +// GetNotes gets the notes property value. Notes on the device created by IT Admin. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. +func (m *ManagedDevice) GetNotes()(*string) { + return m.notes +} +// GetOperatingSystem gets the operatingSystem property value. Operating system of the device. Windows, iOS, etc. This property is read-only. +func (m *ManagedDevice) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetOsVersion gets the osVersion property value. Operating system version of the device. This property is read-only. +func (m *ManagedDevice) GetOsVersion()(*string) { + return m.osVersion +} +// GetOwnerType gets the ownerType property value. Owner type of device. +func (m *ManagedDevice) GetOwnerType()(*OwnerType) { + return m.ownerType +} +// GetPartnerReportedThreatState gets the partnerReportedThreatState property value. Available health states for the Device Health API +func (m *ManagedDevice) GetPartnerReportedThreatState()(*ManagedDevicePartnerReportedHealthState) { + return m.partnerReportedThreatState +} +// GetPhoneNumber gets the phoneNumber property value. Phone number of the device. This property is read-only. +func (m *ManagedDevice) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPhysicalMemoryInBytes gets the physicalMemoryInBytes property value. Total Memory in Bytes. Return default value 0 in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. Default value is 0. Read-only. This property is read-only. +func (m *ManagedDevice) GetPhysicalMemoryInBytes()(*int64) { + return m.physicalMemoryInBytes +} +// GetPreferMdmOverGroupPolicyAppliedDateTime gets the preferMdmOverGroupPolicyAppliedDateTime property value. Reports the DateTime the preferMdmOverGroupPolicy setting was set. When set, the Intune MDM settings will override Group Policy settings if there is a conflict. Read Only. This property is read-only. +func (m *ManagedDevice) GetPreferMdmOverGroupPolicyAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.preferMdmOverGroupPolicyAppliedDateTime +} +// GetProcessorArchitecture gets the processorArchitecture property value. Processor architecture +func (m *ManagedDevice) GetProcessorArchitecture()(*ManagedDeviceArchitecture) { + return m.processorArchitecture +} +// GetRemoteAssistanceSessionErrorDetails gets the remoteAssistanceSessionErrorDetails property value. An error string that identifies issues when creating Remote Assistance session objects. This property is read-only. +func (m *ManagedDevice) GetRemoteAssistanceSessionErrorDetails()(*string) { + return m.remoteAssistanceSessionErrorDetails +} +// GetRemoteAssistanceSessionUrl gets the remoteAssistanceSessionUrl property value. Url that allows a Remote Assistance session to be established with the device. This property is read-only. +func (m *ManagedDevice) GetRemoteAssistanceSessionUrl()(*string) { + return m.remoteAssistanceSessionUrl +} +// GetRequireUserEnrollmentApproval gets the requireUserEnrollmentApproval property value. Reports if the managed iOS device is user approval enrollment. This property is read-only. +func (m *ManagedDevice) GetRequireUserEnrollmentApproval()(*bool) { + return m.requireUserEnrollmentApproval +} +// GetRetireAfterDateTime gets the retireAfterDateTime property value. Indicates the time after when a device will be auto retired because of scheduled action. This property is read-only. +func (m *ManagedDevice) GetRetireAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.retireAfterDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tag IDs for this Device instance. +func (m *ManagedDevice) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSecurityBaselineStates gets the securityBaselineStates property value. Security baseline states for this device. +func (m *ManagedDevice) GetSecurityBaselineStates()([]SecurityBaselineStateable) { + return m.securityBaselineStates +} +// GetSerialNumber gets the serialNumber property value. SerialNumber. This property is read-only. +func (m *ManagedDevice) GetSerialNumber()(*string) { + return m.serialNumber +} +// GetSkuFamily gets the skuFamily property value. Device sku family +func (m *ManagedDevice) GetSkuFamily()(*string) { + return m.skuFamily +} +// GetSkuNumber gets the skuNumber property value. Device sku number, see also: https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo. Valid values 0 to 2147483647. This property is read-only. +func (m *ManagedDevice) GetSkuNumber()(*int32) { + return m.skuNumber +} +// GetSpecificationVersion gets the specificationVersion property value. Specification version. This property is read-only. +func (m *ManagedDevice) GetSpecificationVersion()(*string) { + return m.specificationVersion +} +// GetSubscriberCarrier gets the subscriberCarrier property value. Subscriber Carrier. This property is read-only. +func (m *ManagedDevice) GetSubscriberCarrier()(*string) { + return m.subscriberCarrier +} +// GetTotalStorageSpaceInBytes gets the totalStorageSpaceInBytes property value. Total Storage in Bytes. This property is read-only. +func (m *ManagedDevice) GetTotalStorageSpaceInBytes()(*int64) { + return m.totalStorageSpaceInBytes +} +// GetUdid gets the udid property value. Unique Device Identifier for iOS and macOS devices. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) GetUdid()(*string) { + return m.udid +} +// GetUserDisplayName gets the userDisplayName property value. User display name. This property is read-only. +func (m *ManagedDevice) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserId gets the userId property value. Unique Identifier for the user associated with the device. This property is read-only. +func (m *ManagedDevice) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. Device user principal name. This property is read-only. +func (m *ManagedDevice) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUsers gets the users property value. The primary users associated with the managed device. +func (m *ManagedDevice) GetUsers()([]Userable) { + return m.users +} +// GetUsersLoggedOn gets the usersLoggedOn property value. Indicates the last logged on users of a device. This property is read-only. +func (m *ManagedDevice) GetUsersLoggedOn()([]LoggedOnUserable) { + return m.usersLoggedOn +} +// GetWiFiMacAddress gets the wiFiMacAddress property value. Wi-Fi MAC. This property is read-only. +func (m *ManagedDevice) GetWiFiMacAddress()(*string) { + return m.wiFiMacAddress +} +// GetWindowsActiveMalwareCount gets the windowsActiveMalwareCount property value. Count of active malware for this windows device. This property is read-only. +func (m *ManagedDevice) GetWindowsActiveMalwareCount()(*int32) { + return m.windowsActiveMalwareCount +} +// GetWindowsProtectionState gets the windowsProtectionState property value. The device protection status. This property is read-only. +func (m *ManagedDevice) GetWindowsProtectionState()(WindowsProtectionStateable) { + return m.windowsProtectionState +} +// GetWindowsRemediatedMalwareCount gets the windowsRemediatedMalwareCount property value. Count of remediated malware for this windows device. This property is read-only. +func (m *ManagedDevice) GetWindowsRemediatedMalwareCount()(*int32) { + return m.windowsRemediatedMalwareCount +} +// Serialize serializes information the current object +func (m *ManagedDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignmentFilterEvaluationStatusDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentFilterEvaluationStatusDetails())) + for i, v := range m.GetAssignmentFilterEvaluationStatusDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentFilterEvaluationStatusDetails", cast) + if err != nil { + return err + } + } + if m.GetChassisType() != nil { + cast := (*m.GetChassisType()).String() + err = writer.WriteStringValue("chassisType", &cast) + if err != nil { + return err + } + } + if m.GetChromeOSDeviceInfo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChromeOSDeviceInfo())) + for i, v := range m.GetChromeOSDeviceInfo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("chromeOSDeviceInfo", cast) + if err != nil { + return err + } + } + if m.GetCloudPcRemoteActionResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudPcRemoteActionResults())) + for i, v := range m.GetCloudPcRemoteActionResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudPcRemoteActionResults", cast) + if err != nil { + return err + } + } + if m.GetComplianceState() != nil { + cast := (*m.GetComplianceState()).String() + err = writer.WriteStringValue("complianceState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("configurationManagerClientHealthState", m.GetConfigurationManagerClientHealthState()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("configurationManagerClientInformation", m.GetConfigurationManagerClientInformation()) + if err != nil { + return err + } + } + if m.GetDetectedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetectedApps())) + for i, v := range m.GetDetectedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("detectedApps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceCategory", m.GetDeviceCategory()) + if err != nil { + return err + } + } + if m.GetDeviceCompliancePolicyStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCompliancePolicyStates())) + for i, v := range m.GetDeviceCompliancePolicyStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCompliancePolicyStates", cast) + if err != nil { + return err + } + } + if m.GetDeviceConfigurationStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceConfigurationStates())) + for i, v := range m.GetDeviceConfigurationStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceConfigurationStates", cast) + if err != nil { + return err + } + } + if m.GetDeviceEnrollmentType() != nil { + cast := (*m.GetDeviceEnrollmentType()).String() + err = writer.WriteStringValue("deviceEnrollmentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceFirmwareConfigurationInterfaceManaged", m.GetDeviceFirmwareConfigurationInterfaceManaged()) + if err != nil { + return err + } + } + if m.GetDeviceRegistrationState() != nil { + cast := (*m.GetDeviceRegistrationState()).String() + err = writer.WriteStringValue("deviceRegistrationState", &cast) + if err != nil { + return err + } + } + if m.GetDeviceType() != nil { + cast := (*m.GetDeviceType()).String() + err = writer.WriteStringValue("deviceType", &cast) + if err != nil { + return err + } + } + if m.GetExchangeAccessState() != nil { + cast := (*m.GetExchangeAccessState()).String() + err = writer.WriteStringValue("exchangeAccessState", &cast) + if err != nil { + return err + } + } + if m.GetExchangeAccessStateReason() != nil { + cast := (*m.GetExchangeAccessStateReason()).String() + err = writer.WriteStringValue("exchangeAccessStateReason", &cast) + if err != nil { + return err + } + } + if m.GetJoinType() != nil { + cast := (*m.GetJoinType()).String() + err = writer.WriteStringValue("joinType", &cast) + if err != nil { + return err + } + } + if m.GetLogCollectionRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLogCollectionRequests())) + for i, v := range m.GetLogCollectionRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("logCollectionRequests", cast) + if err != nil { + return err + } + } + if m.GetLostModeState() != nil { + cast := (*m.GetLostModeState()).String() + err = writer.WriteStringValue("lostModeState", &cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceMobileAppConfigurationStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceMobileAppConfigurationStates())) + for i, v := range m.GetManagedDeviceMobileAppConfigurationStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceMobileAppConfigurationStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + if m.GetManagedDeviceOwnerType() != nil { + cast := (*m.GetManagedDeviceOwnerType()).String() + err = writer.WriteStringValue("managedDeviceOwnerType", &cast) + if err != nil { + return err + } + } + if m.GetManagementAgent() != nil { + cast := (*m.GetManagementAgent()).String() + err = writer.WriteStringValue("managementAgent", &cast) + if err != nil { + return err + } + } + if m.GetManagementFeatures() != nil { + cast := (*m.GetManagementFeatures()).String() + err = writer.WriteStringValue("managementFeatures", &cast) + if err != nil { + return err + } + } + if m.GetManagementState() != nil { + cast := (*m.GetManagementState()).String() + err = writer.WriteStringValue("managementState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + if m.GetOwnerType() != nil { + cast := (*m.GetOwnerType()).String() + err = writer.WriteStringValue("ownerType", &cast) + if err != nil { + return err + } + } + if m.GetPartnerReportedThreatState() != nil { + cast := (*m.GetPartnerReportedThreatState()).String() + err = writer.WriteStringValue("partnerReportedThreatState", &cast) + if err != nil { + return err + } + } + if m.GetProcessorArchitecture() != nil { + cast := (*m.GetProcessorArchitecture()).String() + err = writer.WriteStringValue("processorArchitecture", &cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetSecurityBaselineStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecurityBaselineStates())) + for i, v := range m.GetSecurityBaselineStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("securityBaselineStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("skuFamily", m.GetSkuFamily()) + if err != nil { + return err + } + } + if m.GetUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsers())) + for i, v := range m.GetUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("users", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("windowsProtectionState", m.GetWindowsProtectionState()) + if err != nil { + return err + } + } + return nil +} +// SetAadRegistered sets the aadRegistered property value. Whether the device is Azure Active Directory registered. This property is read-only. +func (m *ManagedDevice) SetAadRegistered(value *bool)() { + m.aadRegistered = value +} +// SetActivationLockBypassCode sets the activationLockBypassCode property value. The code that allows the Activation Lock on managed device to be bypassed. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity in LIST call. Individual GET call with select query options is needed to retrieve actual values. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) SetActivationLockBypassCode(value *string)() { + m.activationLockBypassCode = value +} +// SetAndroidSecurityPatchLevel sets the androidSecurityPatchLevel property value. Android security patch level. This property is read-only. +func (m *ManagedDevice) SetAndroidSecurityPatchLevel(value *string)() { + m.androidSecurityPatchLevel = value +} +// SetAssignmentFilterEvaluationStatusDetails sets the assignmentFilterEvaluationStatusDetails property value. Managed device mobile app configuration states for this device. +func (m *ManagedDevice) SetAssignmentFilterEvaluationStatusDetails(value []AssignmentFilterEvaluationStatusDetailsable)() { + m.assignmentFilterEvaluationStatusDetails = value +} +// SetAutopilotEnrolled sets the autopilotEnrolled property value. Reports if the managed device is enrolled via auto-pilot. This property is read-only. +func (m *ManagedDevice) SetAutopilotEnrolled(value *bool)() { + m.autopilotEnrolled = value +} +// SetAzureActiveDirectoryDeviceId sets the azureActiveDirectoryDeviceId property value. The unique identifier for the Azure Active Directory device. Read only. This property is read-only. +func (m *ManagedDevice) SetAzureActiveDirectoryDeviceId(value *string)() { + m.azureActiveDirectoryDeviceId = value +} +// SetAzureADDeviceId sets the azureADDeviceId property value. The unique identifier for the Azure Active Directory device. Read only. This property is read-only. +func (m *ManagedDevice) SetAzureADDeviceId(value *string)() { + m.azureADDeviceId = value +} +// SetAzureADRegistered sets the azureADRegistered property value. Whether the device is Azure Active Directory registered. This property is read-only. +func (m *ManagedDevice) SetAzureADRegistered(value *bool)() { + m.azureADRegistered = value +} +// SetBootstrapTokenEscrowed sets the bootstrapTokenEscrowed property value. Reports if the managed device has an escrowed Bootstrap Token. This is only for macOS devices. To get, include BootstrapTokenEscrowed in the select clause and query with a device id. If FALSE, no bootstrap token is escrowed. If TRUE, the device has escrowed a bootstrap token with Intune. This property is read-only. +func (m *ManagedDevice) SetBootstrapTokenEscrowed(value *bool)() { + m.bootstrapTokenEscrowed = value +} +// SetChassisType sets the chassisType property value. Chassis type. +func (m *ManagedDevice) SetChassisType(value *ChassisType)() { + m.chassisType = value +} +// SetChromeOSDeviceInfo sets the chromeOSDeviceInfo property value. List of properties of the ChromeOS Device. +func (m *ManagedDevice) SetChromeOSDeviceInfo(value []ChromeOSDevicePropertyable)() { + m.chromeOSDeviceInfo = value +} +// SetCloudPcRemoteActionResults sets the cloudPcRemoteActionResults property value. The cloudPcRemoteActionResults property +func (m *ManagedDevice) SetCloudPcRemoteActionResults(value []CloudPcRemoteActionResultable)() { + m.cloudPcRemoteActionResults = value +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires. This property is read-only. +func (m *ManagedDevice) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetComplianceState sets the complianceState property value. Compliance state. +func (m *ManagedDevice) SetComplianceState(value *ComplianceState)() { + m.complianceState = value +} +// SetConfigurationManagerClientEnabledFeatures sets the configurationManagerClientEnabledFeatures property value. ConfigrMgr client enabled features. This property is read-only. +func (m *ManagedDevice) SetConfigurationManagerClientEnabledFeatures(value ConfigurationManagerClientEnabledFeaturesable)() { + m.configurationManagerClientEnabledFeatures = value +} +// SetConfigurationManagerClientHealthState sets the configurationManagerClientHealthState property value. Configuration manager client health state, valid only for devices managed by MDM/ConfigMgr Agent +func (m *ManagedDevice) SetConfigurationManagerClientHealthState(value ConfigurationManagerClientHealthStateable)() { + m.configurationManagerClientHealthState = value +} +// SetConfigurationManagerClientInformation sets the configurationManagerClientInformation property value. Configuration manager client information, valid only for devices managed, duel-managed or tri-managed by ConfigMgr Agent +func (m *ManagedDevice) SetConfigurationManagerClientInformation(value ConfigurationManagerClientInformationable)() { + m.configurationManagerClientInformation = value +} +// SetDetectedApps sets the detectedApps property value. All applications currently installed on the device +func (m *ManagedDevice) SetDetectedApps(value []DetectedAppable)() { + m.detectedApps = value +} +// SetDeviceActionResults sets the deviceActionResults property value. List of ComplexType deviceActionResult objects. This property is read-only. +func (m *ManagedDevice) SetDeviceActionResults(value []DeviceActionResultable)() { + m.deviceActionResults = value +} +// SetDeviceCategory sets the deviceCategory property value. Device category +func (m *ManagedDevice) SetDeviceCategory(value DeviceCategoryable)() { + m.deviceCategory = value +} +// SetDeviceCategoryDisplayName sets the deviceCategoryDisplayName property value. Device category display name. This property is read-only. +func (m *ManagedDevice) SetDeviceCategoryDisplayName(value *string)() { + m.deviceCategoryDisplayName = value +} +// SetDeviceCompliancePolicyStates sets the deviceCompliancePolicyStates property value. Device compliance policy states for this device. +func (m *ManagedDevice) SetDeviceCompliancePolicyStates(value []DeviceCompliancePolicyStateable)() { + m.deviceCompliancePolicyStates = value +} +// SetDeviceConfigurationStates sets the deviceConfigurationStates property value. Device configuration states for this device. +func (m *ManagedDevice) SetDeviceConfigurationStates(value []DeviceConfigurationStateable)() { + m.deviceConfigurationStates = value +} +// SetDeviceEnrollmentType sets the deviceEnrollmentType property value. Possible ways of adding a mobile device to management. +func (m *ManagedDevice) SetDeviceEnrollmentType(value *DeviceEnrollmentType)() { + m.deviceEnrollmentType = value +} +// SetDeviceFirmwareConfigurationInterfaceManaged sets the deviceFirmwareConfigurationInterfaceManaged property value. Indicates whether the device is DFCI managed. When TRUE the device is DFCI managed. When FALSE, the device is not DFCI managed. The default value is FALSE. +func (m *ManagedDevice) SetDeviceFirmwareConfigurationInterfaceManaged(value *bool)() { + m.deviceFirmwareConfigurationInterfaceManaged = value +} +// SetDeviceHealthAttestationState sets the deviceHealthAttestationState property value. The device health attestation state. This property is read-only. +func (m *ManagedDevice) SetDeviceHealthAttestationState(value DeviceHealthAttestationStateable)() { + m.deviceHealthAttestationState = value +} +// SetDeviceName sets the deviceName property value. Name of the device. This property is read-only. +func (m *ManagedDevice) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDeviceRegistrationState sets the deviceRegistrationState property value. Device registration status. +func (m *ManagedDevice) SetDeviceRegistrationState(value *DeviceRegistrationState)() { + m.deviceRegistrationState = value +} +// SetDeviceType sets the deviceType property value. Device type. +func (m *ManagedDevice) SetDeviceType(value *DeviceType)() { + m.deviceType = value +} +// SetEasActivated sets the easActivated property value. Whether the device is Exchange ActiveSync activated. This property is read-only. +func (m *ManagedDevice) SetEasActivated(value *bool)() { + m.easActivated = value +} +// SetEasActivationDateTime sets the easActivationDateTime property value. Exchange ActivationSync activation time of the device. This property is read-only. +func (m *ManagedDevice) SetEasActivationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.easActivationDateTime = value +} +// SetEasDeviceId sets the easDeviceId property value. Exchange ActiveSync Id of the device. This property is read-only. +func (m *ManagedDevice) SetEasDeviceId(value *string)() { + m.easDeviceId = value +} +// SetEmailAddress sets the emailAddress property value. Email(s) for the user associated with the device. This property is read-only. +func (m *ManagedDevice) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetEnrolledDateTime sets the enrolledDateTime property value. Enrollment time of the device. This property is read-only. +func (m *ManagedDevice) SetEnrolledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.enrolledDateTime = value +} +// SetEnrollmentProfileName sets the enrollmentProfileName property value. Name of the enrollment profile assigned to the device. Default value is empty string, indicating no enrollment profile was assgined. This property is read-only. +func (m *ManagedDevice) SetEnrollmentProfileName(value *string)() { + m.enrollmentProfileName = value +} +// SetEthernetMacAddress sets the ethernetMacAddress property value. Ethernet MAC. Default, is Null (Non-Default property) for this property when returned as part of managedDevice entity. Individual get call with select query options is needed to retrieve actual values. Example: deviceManagement/managedDevices({managedDeviceId})?$select=ethernetMacAddress Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) SetEthernetMacAddress(value *string)() { + m.ethernetMacAddress = value +} +// SetExchangeAccessState sets the exchangeAccessState property value. Device Exchange Access State. +func (m *ManagedDevice) SetExchangeAccessState(value *DeviceManagementExchangeAccessState)() { + m.exchangeAccessState = value +} +// SetExchangeAccessStateReason sets the exchangeAccessStateReason property value. Device Exchange Access State Reason. +func (m *ManagedDevice) SetExchangeAccessStateReason(value *DeviceManagementExchangeAccessStateReason)() { + m.exchangeAccessStateReason = value +} +// SetExchangeLastSuccessfulSyncDateTime sets the exchangeLastSuccessfulSyncDateTime property value. Last time the device contacted Exchange. This property is read-only. +func (m *ManagedDevice) SetExchangeLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.exchangeLastSuccessfulSyncDateTime = value +} +// SetFreeStorageSpaceInBytes sets the freeStorageSpaceInBytes property value. Free Storage in Bytes. Default value is 0. Read-only. This property is read-only. +func (m *ManagedDevice) SetFreeStorageSpaceInBytes(value *int64)() { + m.freeStorageSpaceInBytes = value +} +// SetHardwareInformation sets the hardwareInformation property value. The hardward details for the device. Includes information such as storage space, manufacturer, serial number, etc. Return default value in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) SetHardwareInformation(value HardwareInformationable)() { + m.hardwareInformation = value +} +// SetIccid sets the iccid property value. Integrated Circuit Card Identifier, it is A SIM card's unique identification number. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) SetIccid(value *string)() { + m.iccid = value +} +// SetImei sets the imei property value. IMEI. This property is read-only. +func (m *ManagedDevice) SetImei(value *string)() { + m.imei = value +} +// SetIsEncrypted sets the isEncrypted property value. Device encryption status. This property is read-only. +func (m *ManagedDevice) SetIsEncrypted(value *bool)() { + m.isEncrypted = value +} +// SetIsSupervised sets the isSupervised property value. Device supervised status. This property is read-only. +func (m *ManagedDevice) SetIsSupervised(value *bool)() { + m.isSupervised = value +} +// SetJailBroken sets the jailBroken property value. whether the device is jail broken or rooted. This property is read-only. +func (m *ManagedDevice) SetJailBroken(value *string)() { + m.jailBroken = value +} +// SetJoinType sets the joinType property value. Device enrollment join type. +func (m *ManagedDevice) SetJoinType(value *JoinType)() { + m.joinType = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The date and time that the device last completed a successful sync with Intune. This property is read-only. +func (m *ManagedDevice) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetLogCollectionRequests sets the logCollectionRequests property value. List of log collection requests +func (m *ManagedDevice) SetLogCollectionRequests(value []DeviceLogCollectionResponseable)() { + m.logCollectionRequests = value +} +// SetLostModeState sets the lostModeState property value. State of lost mode, indicating if lost mode is enabled or disabled +func (m *ManagedDevice) SetLostModeState(value *LostModeState)() { + m.lostModeState = value +} +// SetManagedDeviceMobileAppConfigurationStates sets the managedDeviceMobileAppConfigurationStates property value. Managed device mobile app configuration states for this device. +func (m *ManagedDevice) SetManagedDeviceMobileAppConfigurationStates(value []ManagedDeviceMobileAppConfigurationStateable)() { + m.managedDeviceMobileAppConfigurationStates = value +} +// SetManagedDeviceName sets the managedDeviceName property value. Automatically generated name to identify a device. Can be overwritten to a user friendly name. +func (m *ManagedDevice) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetManagedDeviceOwnerType sets the managedDeviceOwnerType property value. Owner type of device. +func (m *ManagedDevice) SetManagedDeviceOwnerType(value *ManagedDeviceOwnerType)() { + m.managedDeviceOwnerType = value +} +// SetManagementAgent sets the managementAgent property value. Management agent type. +func (m *ManagedDevice) SetManagementAgent(value *ManagementAgentType)() { + m.managementAgent = value +} +// SetManagementCertificateExpirationDate sets the managementCertificateExpirationDate property value. Reports device management certificate expiration date. This property is read-only. +func (m *ManagedDevice) SetManagementCertificateExpirationDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.managementCertificateExpirationDate = value +} +// SetManagementFeatures sets the managementFeatures property value. Device management features. +func (m *ManagedDevice) SetManagementFeatures(value *ManagedDeviceManagementFeatures)() { + m.managementFeatures = value +} +// SetManagementState sets the managementState property value. Management state of device in Microsoft Intune. +func (m *ManagedDevice) SetManagementState(value *ManagementState)() { + m.managementState = value +} +// SetManufacturer sets the manufacturer property value. Manufacturer of the device. This property is read-only. +func (m *ManagedDevice) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetMeid sets the meid property value. MEID. This property is read-only. +func (m *ManagedDevice) SetMeid(value *string)() { + m.meid = value +} +// SetModel sets the model property value. Model of the device. This property is read-only. +func (m *ManagedDevice) SetModel(value *string)() { + m.model = value +} +// SetNotes sets the notes property value. Notes on the device created by IT Admin. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. +func (m *ManagedDevice) SetNotes(value *string)() { + m.notes = value +} +// SetOperatingSystem sets the operatingSystem property value. Operating system of the device. Windows, iOS, etc. This property is read-only. +func (m *ManagedDevice) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetOsVersion sets the osVersion property value. Operating system version of the device. This property is read-only. +func (m *ManagedDevice) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetOwnerType sets the ownerType property value. Owner type of device. +func (m *ManagedDevice) SetOwnerType(value *OwnerType)() { + m.ownerType = value +} +// SetPartnerReportedThreatState sets the partnerReportedThreatState property value. Available health states for the Device Health API +func (m *ManagedDevice) SetPartnerReportedThreatState(value *ManagedDevicePartnerReportedHealthState)() { + m.partnerReportedThreatState = value +} +// SetPhoneNumber sets the phoneNumber property value. Phone number of the device. This property is read-only. +func (m *ManagedDevice) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPhysicalMemoryInBytes sets the physicalMemoryInBytes property value. Total Memory in Bytes. Return default value 0 in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. Default value is 0. Read-only. This property is read-only. +func (m *ManagedDevice) SetPhysicalMemoryInBytes(value *int64)() { + m.physicalMemoryInBytes = value +} +// SetPreferMdmOverGroupPolicyAppliedDateTime sets the preferMdmOverGroupPolicyAppliedDateTime property value. Reports the DateTime the preferMdmOverGroupPolicy setting was set. When set, the Intune MDM settings will override Group Policy settings if there is a conflict. Read Only. This property is read-only. +func (m *ManagedDevice) SetPreferMdmOverGroupPolicyAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.preferMdmOverGroupPolicyAppliedDateTime = value +} +// SetProcessorArchitecture sets the processorArchitecture property value. Processor architecture +func (m *ManagedDevice) SetProcessorArchitecture(value *ManagedDeviceArchitecture)() { + m.processorArchitecture = value +} +// SetRemoteAssistanceSessionErrorDetails sets the remoteAssistanceSessionErrorDetails property value. An error string that identifies issues when creating Remote Assistance session objects. This property is read-only. +func (m *ManagedDevice) SetRemoteAssistanceSessionErrorDetails(value *string)() { + m.remoteAssistanceSessionErrorDetails = value +} +// SetRemoteAssistanceSessionUrl sets the remoteAssistanceSessionUrl property value. Url that allows a Remote Assistance session to be established with the device. This property is read-only. +func (m *ManagedDevice) SetRemoteAssistanceSessionUrl(value *string)() { + m.remoteAssistanceSessionUrl = value +} +// SetRequireUserEnrollmentApproval sets the requireUserEnrollmentApproval property value. Reports if the managed iOS device is user approval enrollment. This property is read-only. +func (m *ManagedDevice) SetRequireUserEnrollmentApproval(value *bool)() { + m.requireUserEnrollmentApproval = value +} +// SetRetireAfterDateTime sets the retireAfterDateTime property value. Indicates the time after when a device will be auto retired because of scheduled action. This property is read-only. +func (m *ManagedDevice) SetRetireAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.retireAfterDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tag IDs for this Device instance. +func (m *ManagedDevice) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSecurityBaselineStates sets the securityBaselineStates property value. Security baseline states for this device. +func (m *ManagedDevice) SetSecurityBaselineStates(value []SecurityBaselineStateable)() { + m.securityBaselineStates = value +} +// SetSerialNumber sets the serialNumber property value. SerialNumber. This property is read-only. +func (m *ManagedDevice) SetSerialNumber(value *string)() { + m.serialNumber = value +} +// SetSkuFamily sets the skuFamily property value. Device sku family +func (m *ManagedDevice) SetSkuFamily(value *string)() { + m.skuFamily = value +} +// SetSkuNumber sets the skuNumber property value. Device sku number, see also: https://learn.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getproductinfo. Valid values 0 to 2147483647. This property is read-only. +func (m *ManagedDevice) SetSkuNumber(value *int32)() { + m.skuNumber = value +} +// SetSpecificationVersion sets the specificationVersion property value. Specification version. This property is read-only. +func (m *ManagedDevice) SetSpecificationVersion(value *string)() { + m.specificationVersion = value +} +// SetSubscriberCarrier sets the subscriberCarrier property value. Subscriber Carrier. This property is read-only. +func (m *ManagedDevice) SetSubscriberCarrier(value *string)() { + m.subscriberCarrier = value +} +// SetTotalStorageSpaceInBytes sets the totalStorageSpaceInBytes property value. Total Storage in Bytes. This property is read-only. +func (m *ManagedDevice) SetTotalStorageSpaceInBytes(value *int64)() { + m.totalStorageSpaceInBytes = value +} +// SetUdid sets the udid property value. Unique Device Identifier for iOS and macOS devices. Return default value null in LIST managedDevices. Real value only returned in singel device GET call with device id and included in select parameter. Supports: $select. $Search is not supported. Read-only. This property is read-only. +func (m *ManagedDevice) SetUdid(value *string)() { + m.udid = value +} +// SetUserDisplayName sets the userDisplayName property value. User display name. This property is read-only. +func (m *ManagedDevice) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserId sets the userId property value. Unique Identifier for the user associated with the device. This property is read-only. +func (m *ManagedDevice) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Device user principal name. This property is read-only. +func (m *ManagedDevice) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUsers sets the users property value. The primary users associated with the managed device. +func (m *ManagedDevice) SetUsers(value []Userable)() { + m.users = value +} +// SetUsersLoggedOn sets the usersLoggedOn property value. Indicates the last logged on users of a device. This property is read-only. +func (m *ManagedDevice) SetUsersLoggedOn(value []LoggedOnUserable)() { + m.usersLoggedOn = value +} +// SetWiFiMacAddress sets the wiFiMacAddress property value. Wi-Fi MAC. This property is read-only. +func (m *ManagedDevice) SetWiFiMacAddress(value *string)() { + m.wiFiMacAddress = value +} +// SetWindowsActiveMalwareCount sets the windowsActiveMalwareCount property value. Count of active malware for this windows device. This property is read-only. +func (m *ManagedDevice) SetWindowsActiveMalwareCount(value *int32)() { + m.windowsActiveMalwareCount = value +} +// SetWindowsProtectionState sets the windowsProtectionState property value. The device protection status. This property is read-only. +func (m *ManagedDevice) SetWindowsProtectionState(value WindowsProtectionStateable)() { + m.windowsProtectionState = value +} +// SetWindowsRemediatedMalwareCount sets the windowsRemediatedMalwareCount property value. Count of remediated malware for this windows device. This property is read-only. +func (m *ManagedDevice) SetWindowsRemediatedMalwareCount(value *int32)() { + m.windowsRemediatedMalwareCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_architecture.go b/src/internal/connector/graph/betasdk/models/managed_device_architecture.go new file mode 100644 index 000000000..25d27992e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_architecture.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceArchitecture int + +const ( + // Unknown architecture + UNKNOWN_MANAGEDDEVICEARCHITECTURE ManagedDeviceArchitecture = iota + // X86 + X86_MANAGEDDEVICEARCHITECTURE + // X64 + X64_MANAGEDDEVICEARCHITECTURE + // ARM + ARM_MANAGEDDEVICEARCHITECTURE + // ARM64 + ARM64_MANAGEDDEVICEARCHITECTURE +) + +func (i ManagedDeviceArchitecture) String() string { + return []string{"unknown", "x86", "x64", "arm", "arM64"}[i] +} +func ParseManagedDeviceArchitecture(v string) (interface{}, error) { + result := UNKNOWN_MANAGEDDEVICEARCHITECTURE + switch v { + case "unknown": + result = UNKNOWN_MANAGEDDEVICEARCHITECTURE + case "x86": + result = X86_MANAGEDDEVICEARCHITECTURE + case "x64": + result = X64_MANAGEDDEVICEARCHITECTURE + case "arm": + result = ARM_MANAGEDDEVICEARCHITECTURE + case "arM64": + result = ARM64_MANAGEDDEVICEARCHITECTURE + default: + return 0, errors.New("Unknown ManagedDeviceArchitecture value: " + v) + } + return &result, nil +} +func SerializeManagedDeviceArchitecture(values []ManagedDeviceArchitecture) []string { + 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/managed_device_certificate_state.go b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state.go new file mode 100644 index 000000000..c82e99c96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state.go @@ -0,0 +1,667 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCertificateState provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceCertificateState struct { + Entity + // Extended key usage + certificateEnhancedKeyUsage *string + // Error code + certificateErrorCode *int32 + // Certificate expiry date + certificateExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Issuance date + certificateIssuanceDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Certificate Issuance State Options. + certificateIssuanceState *CertificateIssuanceStates + // Issuer + certificateIssuer *string + // Key length + certificateKeyLength *int32 + // Key Storage Provider (KSP) Import Options. + certificateKeyStorageProvider *KeyStorageProviderOption + // Key Usage Options. + certificateKeyUsage *KeyUsages + // Last certificate issuance state change + certificateLastIssuanceStateChangedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Certificate profile display name + certificateProfileDisplayName *string + // Certificate Revocation Status. + certificateRevokeStatus *CertificateRevocationStatus + // Serial number + certificateSerialNumber *string + // Subject Alternative Name Options. + certificateSubjectAlternativeNameFormat *SubjectAlternativeNameType + // Subject alternative name format string for custom formats + certificateSubjectAlternativeNameFormatString *string + // Subject Name Format Options. + certificateSubjectNameFormat *SubjectNameFormat + // Subject name format string for custom subject name formats + certificateSubjectNameFormatString *string + // Thumbprint + certificateThumbprint *string + // Validity period + certificateValidityPeriod *int32 + // Certificate Validity Period Options. + certificateValidityPeriodUnits *CertificateValidityPeriodScale + // Device display name + deviceDisplayName *string + // Supported platform types. + devicePlatform *DevicePlatformType + // Last certificate issuance state change + lastCertificateStateChangeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // User display name + userDisplayName *string +} +// NewManagedDeviceCertificateState instantiates a new managedDeviceCertificateState and sets the default values. +func NewManagedDeviceCertificateState()(*ManagedDeviceCertificateState) { + m := &ManagedDeviceCertificateState{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceCertificateStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceCertificateStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceCertificateState(), nil +} +// GetCertificateEnhancedKeyUsage gets the certificateEnhancedKeyUsage property value. Extended key usage +func (m *ManagedDeviceCertificateState) GetCertificateEnhancedKeyUsage()(*string) { + return m.certificateEnhancedKeyUsage +} +// GetCertificateErrorCode gets the certificateErrorCode property value. Error code +func (m *ManagedDeviceCertificateState) GetCertificateErrorCode()(*int32) { + return m.certificateErrorCode +} +// GetCertificateExpirationDateTime gets the certificateExpirationDateTime property value. Certificate expiry date +func (m *ManagedDeviceCertificateState) GetCertificateExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateExpirationDateTime +} +// GetCertificateIssuanceDateTime gets the certificateIssuanceDateTime property value. Issuance date +func (m *ManagedDeviceCertificateState) GetCertificateIssuanceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateIssuanceDateTime +} +// GetCertificateIssuanceState gets the certificateIssuanceState property value. Certificate Issuance State Options. +func (m *ManagedDeviceCertificateState) GetCertificateIssuanceState()(*CertificateIssuanceStates) { + return m.certificateIssuanceState +} +// GetCertificateIssuer gets the certificateIssuer property value. Issuer +func (m *ManagedDeviceCertificateState) GetCertificateIssuer()(*string) { + return m.certificateIssuer +} +// GetCertificateKeyLength gets the certificateKeyLength property value. Key length +func (m *ManagedDeviceCertificateState) GetCertificateKeyLength()(*int32) { + return m.certificateKeyLength +} +// GetCertificateKeyStorageProvider gets the certificateKeyStorageProvider property value. Key Storage Provider (KSP) Import Options. +func (m *ManagedDeviceCertificateState) GetCertificateKeyStorageProvider()(*KeyStorageProviderOption) { + return m.certificateKeyStorageProvider +} +// GetCertificateKeyUsage gets the certificateKeyUsage property value. Key Usage Options. +func (m *ManagedDeviceCertificateState) GetCertificateKeyUsage()(*KeyUsages) { + return m.certificateKeyUsage +} +// GetCertificateLastIssuanceStateChangedDateTime gets the certificateLastIssuanceStateChangedDateTime property value. Last certificate issuance state change +func (m *ManagedDeviceCertificateState) GetCertificateLastIssuanceStateChangedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.certificateLastIssuanceStateChangedDateTime +} +// GetCertificateProfileDisplayName gets the certificateProfileDisplayName property value. Certificate profile display name +func (m *ManagedDeviceCertificateState) GetCertificateProfileDisplayName()(*string) { + return m.certificateProfileDisplayName +} +// GetCertificateRevokeStatus gets the certificateRevokeStatus property value. Certificate Revocation Status. +func (m *ManagedDeviceCertificateState) GetCertificateRevokeStatus()(*CertificateRevocationStatus) { + return m.certificateRevokeStatus +} +// GetCertificateSerialNumber gets the certificateSerialNumber property value. Serial number +func (m *ManagedDeviceCertificateState) GetCertificateSerialNumber()(*string) { + return m.certificateSerialNumber +} +// GetCertificateSubjectAlternativeNameFormat gets the certificateSubjectAlternativeNameFormat property value. Subject Alternative Name Options. +func (m *ManagedDeviceCertificateState) GetCertificateSubjectAlternativeNameFormat()(*SubjectAlternativeNameType) { + return m.certificateSubjectAlternativeNameFormat +} +// GetCertificateSubjectAlternativeNameFormatString gets the certificateSubjectAlternativeNameFormatString property value. Subject alternative name format string for custom formats +func (m *ManagedDeviceCertificateState) GetCertificateSubjectAlternativeNameFormatString()(*string) { + return m.certificateSubjectAlternativeNameFormatString +} +// GetCertificateSubjectNameFormat gets the certificateSubjectNameFormat property value. Subject Name Format Options. +func (m *ManagedDeviceCertificateState) GetCertificateSubjectNameFormat()(*SubjectNameFormat) { + return m.certificateSubjectNameFormat +} +// GetCertificateSubjectNameFormatString gets the certificateSubjectNameFormatString property value. Subject name format string for custom subject name formats +func (m *ManagedDeviceCertificateState) GetCertificateSubjectNameFormatString()(*string) { + return m.certificateSubjectNameFormatString +} +// GetCertificateThumbprint gets the certificateThumbprint property value. Thumbprint +func (m *ManagedDeviceCertificateState) GetCertificateThumbprint()(*string) { + return m.certificateThumbprint +} +// GetCertificateValidityPeriod gets the certificateValidityPeriod property value. Validity period +func (m *ManagedDeviceCertificateState) GetCertificateValidityPeriod()(*int32) { + return m.certificateValidityPeriod +} +// GetCertificateValidityPeriodUnits gets the certificateValidityPeriodUnits property value. Certificate Validity Period Options. +func (m *ManagedDeviceCertificateState) GetCertificateValidityPeriodUnits()(*CertificateValidityPeriodScale) { + return m.certificateValidityPeriodUnits +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device display name +func (m *ManagedDeviceCertificateState) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDevicePlatform gets the devicePlatform property value. Supported platform types. +func (m *ManagedDeviceCertificateState) GetDevicePlatform()(*DevicePlatformType) { + return m.devicePlatform +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceCertificateState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["certificateEnhancedKeyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateEnhancedKeyUsage(val) + } + return nil + } + res["certificateErrorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateErrorCode(val) + } + return nil + } + res["certificateExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateExpirationDateTime(val) + } + return nil + } + res["certificateIssuanceDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateIssuanceDateTime(val) + } + return nil + } + res["certificateIssuanceState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateIssuanceStates) + if err != nil { + return err + } + if val != nil { + m.SetCertificateIssuanceState(val.(*CertificateIssuanceStates)) + } + return nil + } + res["certificateIssuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateIssuer(val) + } + return nil + } + res["certificateKeyLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateKeyLength(val) + } + return nil + } + res["certificateKeyStorageProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyStorageProviderOption) + if err != nil { + return err + } + if val != nil { + m.SetCertificateKeyStorageProvider(val.(*KeyStorageProviderOption)) + } + return nil + } + res["certificateKeyUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseKeyUsages) + if err != nil { + return err + } + if val != nil { + m.SetCertificateKeyUsage(val.(*KeyUsages)) + } + return nil + } + res["certificateLastIssuanceStateChangedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateLastIssuanceStateChangedDateTime(val) + } + return nil + } + res["certificateProfileDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateProfileDisplayName(val) + } + return nil + } + res["certificateRevokeStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateRevocationStatus) + if err != nil { + return err + } + if val != nil { + m.SetCertificateRevokeStatus(val.(*CertificateRevocationStatus)) + } + return nil + } + res["certificateSerialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSerialNumber(val) + } + return nil + } + res["certificateSubjectAlternativeNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectAlternativeNameType) + if err != nil { + return err + } + if val != nil { + m.SetCertificateSubjectAlternativeNameFormat(val.(*SubjectAlternativeNameType)) + } + return nil + } + res["certificateSubjectAlternativeNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSubjectAlternativeNameFormatString(val) + } + return nil + } + res["certificateSubjectNameFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubjectNameFormat) + if err != nil { + return err + } + if val != nil { + m.SetCertificateSubjectNameFormat(val.(*SubjectNameFormat)) + } + return nil + } + res["certificateSubjectNameFormatString"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateSubjectNameFormatString(val) + } + return nil + } + res["certificateThumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificateThumbprint(val) + } + return nil + } + res["certificateValidityPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriod(val) + } + return nil + } + res["certificateValidityPeriodUnits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCertificateValidityPeriodScale) + if err != nil { + return err + } + if val != nil { + m.SetCertificateValidityPeriodUnits(val.(*CertificateValidityPeriodScale)) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["devicePlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetDevicePlatform(val.(*DevicePlatformType)) + } + return nil + } + res["lastCertificateStateChangeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCertificateStateChangeDateTime(val) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + return res +} +// GetLastCertificateStateChangeDateTime gets the lastCertificateStateChangeDateTime property value. Last certificate issuance state change +func (m *ManagedDeviceCertificateState) GetLastCertificateStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCertificateStateChangeDateTime +} +// GetUserDisplayName gets the userDisplayName property value. User display name +func (m *ManagedDeviceCertificateState) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// Serialize serializes information the current object +func (m *ManagedDeviceCertificateState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificateEnhancedKeyUsage", m.GetCertificateEnhancedKeyUsage()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateErrorCode", m.GetCertificateErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("certificateExpirationDateTime", m.GetCertificateExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("certificateIssuanceDateTime", m.GetCertificateIssuanceDateTime()) + if err != nil { + return err + } + } + if m.GetCertificateIssuanceState() != nil { + cast := (*m.GetCertificateIssuanceState()).String() + err = writer.WriteStringValue("certificateIssuanceState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateIssuer", m.GetCertificateIssuer()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateKeyLength", m.GetCertificateKeyLength()) + if err != nil { + return err + } + } + if m.GetCertificateKeyStorageProvider() != nil { + cast := (*m.GetCertificateKeyStorageProvider()).String() + err = writer.WriteStringValue("certificateKeyStorageProvider", &cast) + if err != nil { + return err + } + } + if m.GetCertificateKeyUsage() != nil { + cast := (*m.GetCertificateKeyUsage()).String() + err = writer.WriteStringValue("certificateKeyUsage", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("certificateLastIssuanceStateChangedDateTime", m.GetCertificateLastIssuanceStateChangedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateProfileDisplayName", m.GetCertificateProfileDisplayName()) + if err != nil { + return err + } + } + if m.GetCertificateRevokeStatus() != nil { + cast := (*m.GetCertificateRevokeStatus()).String() + err = writer.WriteStringValue("certificateRevokeStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateSerialNumber", m.GetCertificateSerialNumber()) + if err != nil { + return err + } + } + if m.GetCertificateSubjectAlternativeNameFormat() != nil { + cast := (*m.GetCertificateSubjectAlternativeNameFormat()).String() + err = writer.WriteStringValue("certificateSubjectAlternativeNameFormat", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateSubjectAlternativeNameFormatString", m.GetCertificateSubjectAlternativeNameFormatString()) + if err != nil { + return err + } + } + if m.GetCertificateSubjectNameFormat() != nil { + cast := (*m.GetCertificateSubjectNameFormat()).String() + err = writer.WriteStringValue("certificateSubjectNameFormat", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateSubjectNameFormatString", m.GetCertificateSubjectNameFormatString()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("certificateThumbprint", m.GetCertificateThumbprint()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("certificateValidityPeriod", m.GetCertificateValidityPeriod()) + if err != nil { + return err + } + } + if m.GetCertificateValidityPeriodUnits() != nil { + cast := (*m.GetCertificateValidityPeriodUnits()).String() + err = writer.WriteStringValue("certificateValidityPeriodUnits", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + if m.GetDevicePlatform() != nil { + cast := (*m.GetDevicePlatform()).String() + err = writer.WriteStringValue("devicePlatform", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastCertificateStateChangeDateTime", m.GetLastCertificateStateChangeDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetCertificateEnhancedKeyUsage sets the certificateEnhancedKeyUsage property value. Extended key usage +func (m *ManagedDeviceCertificateState) SetCertificateEnhancedKeyUsage(value *string)() { + m.certificateEnhancedKeyUsage = value +} +// SetCertificateErrorCode sets the certificateErrorCode property value. Error code +func (m *ManagedDeviceCertificateState) SetCertificateErrorCode(value *int32)() { + m.certificateErrorCode = value +} +// SetCertificateExpirationDateTime sets the certificateExpirationDateTime property value. Certificate expiry date +func (m *ManagedDeviceCertificateState) SetCertificateExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateExpirationDateTime = value +} +// SetCertificateIssuanceDateTime sets the certificateIssuanceDateTime property value. Issuance date +func (m *ManagedDeviceCertificateState) SetCertificateIssuanceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateIssuanceDateTime = value +} +// SetCertificateIssuanceState sets the certificateIssuanceState property value. Certificate Issuance State Options. +func (m *ManagedDeviceCertificateState) SetCertificateIssuanceState(value *CertificateIssuanceStates)() { + m.certificateIssuanceState = value +} +// SetCertificateIssuer sets the certificateIssuer property value. Issuer +func (m *ManagedDeviceCertificateState) SetCertificateIssuer(value *string)() { + m.certificateIssuer = value +} +// SetCertificateKeyLength sets the certificateKeyLength property value. Key length +func (m *ManagedDeviceCertificateState) SetCertificateKeyLength(value *int32)() { + m.certificateKeyLength = value +} +// SetCertificateKeyStorageProvider sets the certificateKeyStorageProvider property value. Key Storage Provider (KSP) Import Options. +func (m *ManagedDeviceCertificateState) SetCertificateKeyStorageProvider(value *KeyStorageProviderOption)() { + m.certificateKeyStorageProvider = value +} +// SetCertificateKeyUsage sets the certificateKeyUsage property value. Key Usage Options. +func (m *ManagedDeviceCertificateState) SetCertificateKeyUsage(value *KeyUsages)() { + m.certificateKeyUsage = value +} +// SetCertificateLastIssuanceStateChangedDateTime sets the certificateLastIssuanceStateChangedDateTime property value. Last certificate issuance state change +func (m *ManagedDeviceCertificateState) SetCertificateLastIssuanceStateChangedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.certificateLastIssuanceStateChangedDateTime = value +} +// SetCertificateProfileDisplayName sets the certificateProfileDisplayName property value. Certificate profile display name +func (m *ManagedDeviceCertificateState) SetCertificateProfileDisplayName(value *string)() { + m.certificateProfileDisplayName = value +} +// SetCertificateRevokeStatus sets the certificateRevokeStatus property value. Certificate Revocation Status. +func (m *ManagedDeviceCertificateState) SetCertificateRevokeStatus(value *CertificateRevocationStatus)() { + m.certificateRevokeStatus = value +} +// SetCertificateSerialNumber sets the certificateSerialNumber property value. Serial number +func (m *ManagedDeviceCertificateState) SetCertificateSerialNumber(value *string)() { + m.certificateSerialNumber = value +} +// SetCertificateSubjectAlternativeNameFormat sets the certificateSubjectAlternativeNameFormat property value. Subject Alternative Name Options. +func (m *ManagedDeviceCertificateState) SetCertificateSubjectAlternativeNameFormat(value *SubjectAlternativeNameType)() { + m.certificateSubjectAlternativeNameFormat = value +} +// SetCertificateSubjectAlternativeNameFormatString sets the certificateSubjectAlternativeNameFormatString property value. Subject alternative name format string for custom formats +func (m *ManagedDeviceCertificateState) SetCertificateSubjectAlternativeNameFormatString(value *string)() { + m.certificateSubjectAlternativeNameFormatString = value +} +// SetCertificateSubjectNameFormat sets the certificateSubjectNameFormat property value. Subject Name Format Options. +func (m *ManagedDeviceCertificateState) SetCertificateSubjectNameFormat(value *SubjectNameFormat)() { + m.certificateSubjectNameFormat = value +} +// SetCertificateSubjectNameFormatString sets the certificateSubjectNameFormatString property value. Subject name format string for custom subject name formats +func (m *ManagedDeviceCertificateState) SetCertificateSubjectNameFormatString(value *string)() { + m.certificateSubjectNameFormatString = value +} +// SetCertificateThumbprint sets the certificateThumbprint property value. Thumbprint +func (m *ManagedDeviceCertificateState) SetCertificateThumbprint(value *string)() { + m.certificateThumbprint = value +} +// SetCertificateValidityPeriod sets the certificateValidityPeriod property value. Validity period +func (m *ManagedDeviceCertificateState) SetCertificateValidityPeriod(value *int32)() { + m.certificateValidityPeriod = value +} +// SetCertificateValidityPeriodUnits sets the certificateValidityPeriodUnits property value. Certificate Validity Period Options. +func (m *ManagedDeviceCertificateState) SetCertificateValidityPeriodUnits(value *CertificateValidityPeriodScale)() { + m.certificateValidityPeriodUnits = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device display name +func (m *ManagedDeviceCertificateState) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDevicePlatform sets the devicePlatform property value. Supported platform types. +func (m *ManagedDeviceCertificateState) SetDevicePlatform(value *DevicePlatformType)() { + m.devicePlatform = value +} +// SetLastCertificateStateChangeDateTime sets the lastCertificateStateChangeDateTime property value. Last certificate issuance state change +func (m *ManagedDeviceCertificateState) SetLastCertificateStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCertificateStateChangeDateTime = value +} +// SetUserDisplayName sets the userDisplayName property value. User display name +func (m *ManagedDeviceCertificateState) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_response.go new file mode 100644 index 000000000..917ab2b07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCertificateStateCollectionResponse +type ManagedDeviceCertificateStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceCertificateStateable +} +// NewManagedDeviceCertificateStateCollectionResponse instantiates a new ManagedDeviceCertificateStateCollectionResponse and sets the default values. +func NewManagedDeviceCertificateStateCollectionResponse()(*ManagedDeviceCertificateStateCollectionResponse) { + m := &ManagedDeviceCertificateStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceCertificateStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceCertificateStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceCertificateStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceCertificateStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceCertificateStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceCertificateStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceCertificateStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceCertificateStateCollectionResponse) GetValue()([]ManagedDeviceCertificateStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceCertificateStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceCertificateStateCollectionResponse) SetValue(value []ManagedDeviceCertificateStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_responseable.go new file mode 100644 index 000000000..3728c964c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_certificate_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCertificateStateCollectionResponseable +type ManagedDeviceCertificateStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceCertificateStateable) + SetValue(value []ManagedDeviceCertificateStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_certificate_stateable.go b/src/internal/connector/graph/betasdk/models/managed_device_certificate_stateable.go new file mode 100644 index 000000000..18ad31993 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_certificate_stateable.go @@ -0,0 +1,60 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCertificateStateable +type ManagedDeviceCertificateStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificateEnhancedKeyUsage()(*string) + GetCertificateErrorCode()(*int32) + GetCertificateExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateIssuanceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateIssuanceState()(*CertificateIssuanceStates) + GetCertificateIssuer()(*string) + GetCertificateKeyLength()(*int32) + GetCertificateKeyStorageProvider()(*KeyStorageProviderOption) + GetCertificateKeyUsage()(*KeyUsages) + GetCertificateLastIssuanceStateChangedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCertificateProfileDisplayName()(*string) + GetCertificateRevokeStatus()(*CertificateRevocationStatus) + GetCertificateSerialNumber()(*string) + GetCertificateSubjectAlternativeNameFormat()(*SubjectAlternativeNameType) + GetCertificateSubjectAlternativeNameFormatString()(*string) + GetCertificateSubjectNameFormat()(*SubjectNameFormat) + GetCertificateSubjectNameFormatString()(*string) + GetCertificateThumbprint()(*string) + GetCertificateValidityPeriod()(*int32) + GetCertificateValidityPeriodUnits()(*CertificateValidityPeriodScale) + GetDeviceDisplayName()(*string) + GetDevicePlatform()(*DevicePlatformType) + GetLastCertificateStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUserDisplayName()(*string) + SetCertificateEnhancedKeyUsage(value *string)() + SetCertificateErrorCode(value *int32)() + SetCertificateExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateIssuanceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateIssuanceState(value *CertificateIssuanceStates)() + SetCertificateIssuer(value *string)() + SetCertificateKeyLength(value *int32)() + SetCertificateKeyStorageProvider(value *KeyStorageProviderOption)() + SetCertificateKeyUsage(value *KeyUsages)() + SetCertificateLastIssuanceStateChangedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCertificateProfileDisplayName(value *string)() + SetCertificateRevokeStatus(value *CertificateRevocationStatus)() + SetCertificateSerialNumber(value *string)() + SetCertificateSubjectAlternativeNameFormat(value *SubjectAlternativeNameType)() + SetCertificateSubjectAlternativeNameFormatString(value *string)() + SetCertificateSubjectNameFormat(value *SubjectNameFormat)() + SetCertificateSubjectNameFormatString(value *string)() + SetCertificateThumbprint(value *string)() + SetCertificateValidityPeriod(value *int32)() + SetCertificateValidityPeriodUnits(value *CertificateValidityPeriodScale)() + SetDeviceDisplayName(value *string)() + SetDevicePlatform(value *DevicePlatformType)() + SetLastCertificateStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUserDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settings.go b/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settings.go new file mode 100644 index 000000000..585981928 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settings.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCleanupSettings define the rule when the admin wants the devices to be cleaned up. +type ManagedDeviceCleanupSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Number of days when the device has not contacted Intune. + deviceInactivityBeforeRetirementInDays *string + // The OdataType property + odataType *string +} +// NewManagedDeviceCleanupSettings instantiates a new managedDeviceCleanupSettings and sets the default values. +func NewManagedDeviceCleanupSettings()(*ManagedDeviceCleanupSettings) { + m := &ManagedDeviceCleanupSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagedDeviceCleanupSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceCleanupSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceCleanupSettings(), 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 *ManagedDeviceCleanupSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceInactivityBeforeRetirementInDays gets the deviceInactivityBeforeRetirementInDays property value. Number of days when the device has not contacted Intune. +func (m *ManagedDeviceCleanupSettings) GetDeviceInactivityBeforeRetirementInDays()(*string) { + return m.deviceInactivityBeforeRetirementInDays +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceCleanupSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceInactivityBeforeRetirementInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceInactivityBeforeRetirementInDays(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagedDeviceCleanupSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagedDeviceCleanupSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("deviceInactivityBeforeRetirementInDays", m.GetDeviceInactivityBeforeRetirementInDays()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagedDeviceCleanupSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceInactivityBeforeRetirementInDays sets the deviceInactivityBeforeRetirementInDays property value. Number of days when the device has not contacted Intune. +func (m *ManagedDeviceCleanupSettings) SetDeviceInactivityBeforeRetirementInDays(value *string)() { + m.deviceInactivityBeforeRetirementInDays = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagedDeviceCleanupSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settingsable.go b/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settingsable.go new file mode 100644 index 000000000..11c93b052 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_cleanup_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCleanupSettingsable +type ManagedDeviceCleanupSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceInactivityBeforeRetirementInDays()(*string) + GetOdataType()(*string) + SetDeviceInactivityBeforeRetirementInDays(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_collection_response.go new file mode 100644 index 000000000..5b7fb94ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCollectionResponse +type ManagedDeviceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceable +} +// NewManagedDeviceCollectionResponse instantiates a new ManagedDeviceCollectionResponse and sets the default values. +func NewManagedDeviceCollectionResponse()(*ManagedDeviceCollectionResponse) { + m := &ManagedDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceCollectionResponse) GetValue()([]ManagedDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceCollectionResponse) SetValue(value []ManagedDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_collection_responseable.go new file mode 100644 index 000000000..0b30c855d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceCollectionResponseable +type ManagedDeviceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceable) + SetValue(value []ManagedDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_encryption_state.go b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state.go new file mode 100644 index 000000000..88530052e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state.go @@ -0,0 +1,334 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceEncryptionState encryption report per device +type ManagedDeviceEncryptionState struct { + Entity + // Advanced BitLocker State. Possible values are: success, noUserConsent, osVolumeUnprotected, osVolumeTpmRequired, osVolumeTpmOnlyRequired, osVolumeTpmPinRequired, osVolumeTpmStartupKeyRequired, osVolumeTpmPinStartupKeyRequired, osVolumeEncryptionMethodMismatch, recoveryKeyBackupFailed, fixedDriveNotEncrypted, fixedDriveEncryptionMethodMismatch, loggedOnUserNonAdmin, windowsRecoveryEnvironmentNotConfigured, tpmNotAvailable, tpmNotReady, networkError. + advancedBitLockerStates *AdvancedBitLockerState + // Device name + deviceName *string + // Device type. + deviceType *DeviceTypes + // The encryptionPolicySettingState property + encryptionPolicySettingState *ComplianceStatus + // Encryption readiness state + encryptionReadinessState *EncryptionReadinessState + // Encryption state + encryptionState *EncryptionState + // FileVault State. Possible values are: success, driveEncryptedByUser, userDeferredEncryption, escrowNotEnabled. + fileVaultStates *FileVaultState + // Operating system version of the device + osVersion *string + // Policy Details + policyDetails []EncryptionReportPolicyDetailsable + // Device TPM Version + tpmSpecificationVersion *string + // User name + userPrincipalName *string +} +// NewManagedDeviceEncryptionState instantiates a new managedDeviceEncryptionState and sets the default values. +func NewManagedDeviceEncryptionState()(*ManagedDeviceEncryptionState) { + m := &ManagedDeviceEncryptionState{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceEncryptionStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceEncryptionStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceEncryptionState(), nil +} +// GetAdvancedBitLockerStates gets the advancedBitLockerStates property value. Advanced BitLocker State. Possible values are: success, noUserConsent, osVolumeUnprotected, osVolumeTpmRequired, osVolumeTpmOnlyRequired, osVolumeTpmPinRequired, osVolumeTpmStartupKeyRequired, osVolumeTpmPinStartupKeyRequired, osVolumeEncryptionMethodMismatch, recoveryKeyBackupFailed, fixedDriveNotEncrypted, fixedDriveEncryptionMethodMismatch, loggedOnUserNonAdmin, windowsRecoveryEnvironmentNotConfigured, tpmNotAvailable, tpmNotReady, networkError. +func (m *ManagedDeviceEncryptionState) GetAdvancedBitLockerStates()(*AdvancedBitLockerState) { + return m.advancedBitLockerStates +} +// GetDeviceName gets the deviceName property value. Device name +func (m *ManagedDeviceEncryptionState) GetDeviceName()(*string) { + return m.deviceName +} +// GetDeviceType gets the deviceType property value. Device type. +func (m *ManagedDeviceEncryptionState) GetDeviceType()(*DeviceTypes) { + return m.deviceType +} +// GetEncryptionPolicySettingState gets the encryptionPolicySettingState property value. The encryptionPolicySettingState property +func (m *ManagedDeviceEncryptionState) GetEncryptionPolicySettingState()(*ComplianceStatus) { + return m.encryptionPolicySettingState +} +// GetEncryptionReadinessState gets the encryptionReadinessState property value. Encryption readiness state +func (m *ManagedDeviceEncryptionState) GetEncryptionReadinessState()(*EncryptionReadinessState) { + return m.encryptionReadinessState +} +// GetEncryptionState gets the encryptionState property value. Encryption state +func (m *ManagedDeviceEncryptionState) GetEncryptionState()(*EncryptionState) { + return m.encryptionState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceEncryptionState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["advancedBitLockerStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAdvancedBitLockerState) + if err != nil { + return err + } + if val != nil { + m.SetAdvancedBitLockerStates(val.(*AdvancedBitLockerState)) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["deviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceTypes) + if err != nil { + return err + } + if val != nil { + m.SetDeviceType(val.(*DeviceTypes)) + } + return nil + } + res["encryptionPolicySettingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionPolicySettingState(val.(*ComplianceStatus)) + } + return nil + } + res["encryptionReadinessState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEncryptionReadinessState) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionReadinessState(val.(*EncryptionReadinessState)) + } + return nil + } + res["encryptionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEncryptionState) + if err != nil { + return err + } + if val != nil { + m.SetEncryptionState(val.(*EncryptionState)) + } + return nil + } + res["fileVaultStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFileVaultState) + if err != nil { + return err + } + if val != nil { + m.SetFileVaultStates(val.(*FileVaultState)) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["policyDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEncryptionReportPolicyDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EncryptionReportPolicyDetailsable, len(val)) + for i, v := range val { + res[i] = v.(EncryptionReportPolicyDetailsable) + } + m.SetPolicyDetails(res) + } + return nil + } + res["tpmSpecificationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTpmSpecificationVersion(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetFileVaultStates gets the fileVaultStates property value. FileVault State. Possible values are: success, driveEncryptedByUser, userDeferredEncryption, escrowNotEnabled. +func (m *ManagedDeviceEncryptionState) GetFileVaultStates()(*FileVaultState) { + return m.fileVaultStates +} +// GetOsVersion gets the osVersion property value. Operating system version of the device +func (m *ManagedDeviceEncryptionState) GetOsVersion()(*string) { + return m.osVersion +} +// GetPolicyDetails gets the policyDetails property value. Policy Details +func (m *ManagedDeviceEncryptionState) GetPolicyDetails()([]EncryptionReportPolicyDetailsable) { + return m.policyDetails +} +// GetTpmSpecificationVersion gets the tpmSpecificationVersion property value. Device TPM Version +func (m *ManagedDeviceEncryptionState) GetTpmSpecificationVersion()(*string) { + return m.tpmSpecificationVersion +} +// GetUserPrincipalName gets the userPrincipalName property value. User name +func (m *ManagedDeviceEncryptionState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *ManagedDeviceEncryptionState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedBitLockerStates() != nil { + cast := (*m.GetAdvancedBitLockerStates()).String() + err = writer.WriteStringValue("advancedBitLockerStates", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + if m.GetDeviceType() != nil { + cast := (*m.GetDeviceType()).String() + err = writer.WriteStringValue("deviceType", &cast) + if err != nil { + return err + } + } + if m.GetEncryptionPolicySettingState() != nil { + cast := (*m.GetEncryptionPolicySettingState()).String() + err = writer.WriteStringValue("encryptionPolicySettingState", &cast) + if err != nil { + return err + } + } + if m.GetEncryptionReadinessState() != nil { + cast := (*m.GetEncryptionReadinessState()).String() + err = writer.WriteStringValue("encryptionReadinessState", &cast) + if err != nil { + return err + } + } + if m.GetEncryptionState() != nil { + cast := (*m.GetEncryptionState()).String() + err = writer.WriteStringValue("encryptionState", &cast) + if err != nil { + return err + } + } + if m.GetFileVaultStates() != nil { + cast := (*m.GetFileVaultStates()).String() + err = writer.WriteStringValue("fileVaultStates", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + if m.GetPolicyDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPolicyDetails())) + for i, v := range m.GetPolicyDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("policyDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tpmSpecificationVersion", m.GetTpmSpecificationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedBitLockerStates sets the advancedBitLockerStates property value. Advanced BitLocker State. Possible values are: success, noUserConsent, osVolumeUnprotected, osVolumeTpmRequired, osVolumeTpmOnlyRequired, osVolumeTpmPinRequired, osVolumeTpmStartupKeyRequired, osVolumeTpmPinStartupKeyRequired, osVolumeEncryptionMethodMismatch, recoveryKeyBackupFailed, fixedDriveNotEncrypted, fixedDriveEncryptionMethodMismatch, loggedOnUserNonAdmin, windowsRecoveryEnvironmentNotConfigured, tpmNotAvailable, tpmNotReady, networkError. +func (m *ManagedDeviceEncryptionState) SetAdvancedBitLockerStates(value *AdvancedBitLockerState)() { + m.advancedBitLockerStates = value +} +// SetDeviceName sets the deviceName property value. Device name +func (m *ManagedDeviceEncryptionState) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDeviceType sets the deviceType property value. Device type. +func (m *ManagedDeviceEncryptionState) SetDeviceType(value *DeviceTypes)() { + m.deviceType = value +} +// SetEncryptionPolicySettingState sets the encryptionPolicySettingState property value. The encryptionPolicySettingState property +func (m *ManagedDeviceEncryptionState) SetEncryptionPolicySettingState(value *ComplianceStatus)() { + m.encryptionPolicySettingState = value +} +// SetEncryptionReadinessState sets the encryptionReadinessState property value. Encryption readiness state +func (m *ManagedDeviceEncryptionState) SetEncryptionReadinessState(value *EncryptionReadinessState)() { + m.encryptionReadinessState = value +} +// SetEncryptionState sets the encryptionState property value. Encryption state +func (m *ManagedDeviceEncryptionState) SetEncryptionState(value *EncryptionState)() { + m.encryptionState = value +} +// SetFileVaultStates sets the fileVaultStates property value. FileVault State. Possible values are: success, driveEncryptedByUser, userDeferredEncryption, escrowNotEnabled. +func (m *ManagedDeviceEncryptionState) SetFileVaultStates(value *FileVaultState)() { + m.fileVaultStates = value +} +// SetOsVersion sets the osVersion property value. Operating system version of the device +func (m *ManagedDeviceEncryptionState) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetPolicyDetails sets the policyDetails property value. Policy Details +func (m *ManagedDeviceEncryptionState) SetPolicyDetails(value []EncryptionReportPolicyDetailsable)() { + m.policyDetails = value +} +// SetTpmSpecificationVersion sets the tpmSpecificationVersion property value. Device TPM Version +func (m *ManagedDeviceEncryptionState) SetTpmSpecificationVersion(value *string)() { + m.tpmSpecificationVersion = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User name +func (m *ManagedDeviceEncryptionState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_response.go new file mode 100644 index 000000000..9e986f194 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceEncryptionStateCollectionResponse +type ManagedDeviceEncryptionStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceEncryptionStateable +} +// NewManagedDeviceEncryptionStateCollectionResponse instantiates a new ManagedDeviceEncryptionStateCollectionResponse and sets the default values. +func NewManagedDeviceEncryptionStateCollectionResponse()(*ManagedDeviceEncryptionStateCollectionResponse) { + m := &ManagedDeviceEncryptionStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceEncryptionStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceEncryptionStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceEncryptionStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceEncryptionStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceEncryptionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceEncryptionStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceEncryptionStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceEncryptionStateCollectionResponse) GetValue()([]ManagedDeviceEncryptionStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceEncryptionStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceEncryptionStateCollectionResponse) SetValue(value []ManagedDeviceEncryptionStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_responseable.go new file mode 100644 index 000000000..ddf1efe79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_encryption_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceEncryptionStateCollectionResponseable +type ManagedDeviceEncryptionStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceEncryptionStateable) + SetValue(value []ManagedDeviceEncryptionStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_encryption_stateable.go b/src/internal/connector/graph/betasdk/models/managed_device_encryption_stateable.go new file mode 100644 index 000000000..3c6d67097 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_encryption_stateable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceEncryptionStateable +type ManagedDeviceEncryptionStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedBitLockerStates()(*AdvancedBitLockerState) + GetDeviceName()(*string) + GetDeviceType()(*DeviceTypes) + GetEncryptionPolicySettingState()(*ComplianceStatus) + GetEncryptionReadinessState()(*EncryptionReadinessState) + GetEncryptionState()(*EncryptionState) + GetFileVaultStates()(*FileVaultState) + GetOsVersion()(*string) + GetPolicyDetails()([]EncryptionReportPolicyDetailsable) + GetTpmSpecificationVersion()(*string) + GetUserPrincipalName()(*string) + SetAdvancedBitLockerStates(value *AdvancedBitLockerState)() + SetDeviceName(value *string)() + SetDeviceType(value *DeviceTypes)() + SetEncryptionPolicySettingState(value *ComplianceStatus)() + SetEncryptionReadinessState(value *EncryptionReadinessState)() + SetEncryptionState(value *EncryptionState)() + SetFileVaultStates(value *FileVaultState)() + SetOsVersion(value *string)() + SetPolicyDetails(value []EncryptionReportPolicyDetailsable)() + SetTpmSpecificationVersion(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_management_features.go b/src/internal/connector/graph/betasdk/models/managed_device_management_features.go new file mode 100644 index 000000000..5a6c96740 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_management_features.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceManagementFeatures int + +const ( + // Unknown device management features. + NONE_MANAGEDDEVICEMANAGEMENTFEATURES ManagedDeviceManagementFeatures = iota + // Microsoft Managed Desktop + MICROSOFTMANAGEDDESKTOP_MANAGEDDEVICEMANAGEMENTFEATURES +) + +func (i ManagedDeviceManagementFeatures) String() string { + return []string{"none", "microsoftManagedDesktop"}[i] +} +func ParseManagedDeviceManagementFeatures(v string) (interface{}, error) { + result := NONE_MANAGEDDEVICEMANAGEMENTFEATURES + switch v { + case "none": + result = NONE_MANAGEDDEVICEMANAGEMENTFEATURES + case "microsoftManagedDesktop": + result = MICROSOFTMANAGEDDESKTOP_MANAGEDDEVICEMANAGEMENTFEATURES + default: + return 0, errors.New("Unknown ManagedDeviceManagementFeatures value: " + v) + } + return &result, nil +} +func SerializeManagedDeviceManagementFeatures(values []ManagedDeviceManagementFeatures) []string { + 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/managed_device_mobile_app_configuration.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration.go new file mode 100644 index 000000000..b70ac9fb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration.go @@ -0,0 +1,401 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfiguration +type ManagedDeviceMobileAppConfiguration struct { + Entity + // The list of group assignemenets for app configration. + assignments []ManagedDeviceMobileAppConfigurationAssignmentable + // DateTime the object was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Admin provided description of the Device Configuration. + description *string + // List of ManagedDeviceMobileAppConfigurationDeviceStatus. + deviceStatuses []ManagedDeviceMobileAppConfigurationDeviceStatusable + // App configuration device status summary. + deviceStatusSummary ManagedDeviceMobileAppConfigurationDeviceSummaryable + // Admin provided name of the device configuration. + displayName *string + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of Scope Tags for this App configuration entity. + roleScopeTagIds []string + // the associated app. + targetedMobileApps []string + // List of ManagedDeviceMobileAppConfigurationUserStatus. + userStatuses []ManagedDeviceMobileAppConfigurationUserStatusable + // App configuration user status summary. + userStatusSummary ManagedDeviceMobileAppConfigurationUserSummaryable + // Version of the device configuration. + version *int32 +} +// NewManagedDeviceMobileAppConfiguration instantiates a new ManagedDeviceMobileAppConfiguration and sets the default values. +func NewManagedDeviceMobileAppConfiguration()(*ManagedDeviceMobileAppConfiguration) { + m := &ManagedDeviceMobileAppConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkMobileAppConfiguration": + return NewAndroidForWorkMobileAppConfiguration(), nil + case "#microsoft.graph.androidManagedStoreAppConfiguration": + return NewAndroidManagedStoreAppConfiguration(), nil + case "#microsoft.graph.iosMobileAppConfiguration": + return NewIosMobileAppConfiguration(), nil + } + } + } + } + return NewManagedDeviceMobileAppConfiguration(), nil +} +// GetAssignments gets the assignments property value. The list of group assignemenets for app configration. +func (m *ManagedDeviceMobileAppConfiguration) GetAssignments()([]ManagedDeviceMobileAppConfigurationAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. DateTime the object was created. +func (m *ManagedDeviceMobileAppConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Admin provided description of the Device Configuration. +func (m *ManagedDeviceMobileAppConfiguration) GetDescription()(*string) { + return m.description +} +// GetDeviceStatuses gets the deviceStatuses property value. List of ManagedDeviceMobileAppConfigurationDeviceStatus. +func (m *ManagedDeviceMobileAppConfiguration) GetDeviceStatuses()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) { + return m.deviceStatuses +} +// GetDeviceStatusSummary gets the deviceStatusSummary property value. App configuration device status summary. +func (m *ManagedDeviceMobileAppConfiguration) GetDeviceStatusSummary()(ManagedDeviceMobileAppConfigurationDeviceSummaryable) { + return m.deviceStatusSummary +} +// GetDisplayName gets the displayName property value. Admin provided name of the device configuration. +func (m *ManagedDeviceMobileAppConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationDeviceStatusable) + } + m.SetDeviceStatuses(res) + } + return nil + } + res["deviceStatusSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceMobileAppConfigurationDeviceSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStatusSummary(val.(ManagedDeviceMobileAppConfigurationDeviceSummaryable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["targetedMobileApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetedMobileApps(res) + } + return nil + } + res["userStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationUserStatusable) + } + m.SetUserStatuses(res) + } + return nil + } + res["userStatusSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceMobileAppConfigurationUserSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserStatusSummary(val.(ManagedDeviceMobileAppConfigurationUserSummaryable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *ManagedDeviceMobileAppConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this App configuration entity. +func (m *ManagedDeviceMobileAppConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetTargetedMobileApps gets the targetedMobileApps property value. the associated app. +func (m *ManagedDeviceMobileAppConfiguration) GetTargetedMobileApps()([]string) { + return m.targetedMobileApps +} +// GetUserStatuses gets the userStatuses property value. List of ManagedDeviceMobileAppConfigurationUserStatus. +func (m *ManagedDeviceMobileAppConfiguration) GetUserStatuses()([]ManagedDeviceMobileAppConfigurationUserStatusable) { + return m.userStatuses +} +// GetUserStatusSummary gets the userStatusSummary property value. App configuration user status summary. +func (m *ManagedDeviceMobileAppConfiguration) GetUserStatusSummary()(ManagedDeviceMobileAppConfigurationUserSummaryable) { + return m.userStatusSummary +} +// GetVersion gets the version property value. Version of the device configuration. +func (m *ManagedDeviceMobileAppConfiguration) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStatuses())) + for i, v := range m.GetDeviceStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceStatusSummary", m.GetDeviceStatusSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetTargetedMobileApps() != nil { + err = writer.WriteCollectionOfStringValues("targetedMobileApps", m.GetTargetedMobileApps()) + if err != nil { + return err + } + } + if m.GetUserStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStatuses())) + for i, v := range m.GetUserStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userStatusSummary", m.GetUserStatusSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignemenets for app configration. +func (m *ManagedDeviceMobileAppConfiguration) SetAssignments(value []ManagedDeviceMobileAppConfigurationAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. DateTime the object was created. +func (m *ManagedDeviceMobileAppConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Admin provided description of the Device Configuration. +func (m *ManagedDeviceMobileAppConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDeviceStatuses sets the deviceStatuses property value. List of ManagedDeviceMobileAppConfigurationDeviceStatus. +func (m *ManagedDeviceMobileAppConfiguration) SetDeviceStatuses(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() { + m.deviceStatuses = value +} +// SetDeviceStatusSummary sets the deviceStatusSummary property value. App configuration device status summary. +func (m *ManagedDeviceMobileAppConfiguration) SetDeviceStatusSummary(value ManagedDeviceMobileAppConfigurationDeviceSummaryable)() { + m.deviceStatusSummary = value +} +// SetDisplayName sets the displayName property value. Admin provided name of the device configuration. +func (m *ManagedDeviceMobileAppConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *ManagedDeviceMobileAppConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this App configuration entity. +func (m *ManagedDeviceMobileAppConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetTargetedMobileApps sets the targetedMobileApps property value. the associated app. +func (m *ManagedDeviceMobileAppConfiguration) SetTargetedMobileApps(value []string)() { + m.targetedMobileApps = value +} +// SetUserStatuses sets the userStatuses property value. List of ManagedDeviceMobileAppConfigurationUserStatus. +func (m *ManagedDeviceMobileAppConfiguration) SetUserStatuses(value []ManagedDeviceMobileAppConfigurationUserStatusable)() { + m.userStatuses = value +} +// SetUserStatusSummary sets the userStatusSummary property value. App configuration user status summary. +func (m *ManagedDeviceMobileAppConfiguration) SetUserStatusSummary(value ManagedDeviceMobileAppConfigurationUserSummaryable)() { + m.userStatusSummary = value +} +// SetVersion sets the version property value. Version of the device configuration. +func (m *ManagedDeviceMobileAppConfiguration) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment.go new file mode 100644 index 000000000..cd84f3814 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationAssignment contains the properties used to assign an MDM app configuration to a group. +type ManagedDeviceMobileAppConfigurationAssignment struct { + Entity + // Assignment target that the T&C policy is assigned to. + target DeviceAndAppManagementAssignmentTargetable +} +// NewManagedDeviceMobileAppConfigurationAssignment instantiates a new managedDeviceMobileAppConfigurationAssignment and sets the default values. +func NewManagedDeviceMobileAppConfigurationAssignment()(*ManagedDeviceMobileAppConfigurationAssignment) { + m := &ManagedDeviceMobileAppConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. Assignment target that the T&C policy is assigned to. +func (m *ManagedDeviceMobileAppConfigurationAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. Assignment target that the T&C policy is assigned to. +func (m *ManagedDeviceMobileAppConfigurationAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_response.go new file mode 100644 index 000000000..dc23612a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse +type ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationAssignmentable +} +// NewManagedDeviceMobileAppConfigurationAssignmentCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationAssignmentCollectionResponse()(*ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationAssignmentCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..46406b39e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationAssignmentCollectionResponseable +type ManagedDeviceMobileAppConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationAssignmentable) + SetValue(value []ManagedDeviceMobileAppConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignmentable.go new file mode 100644 index 000000000..8374878b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationAssignmentable +type ManagedDeviceMobileAppConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_response.go new file mode 100644 index 000000000..81262d14a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationCollectionResponse +type ManagedDeviceMobileAppConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationable +} +// NewManagedDeviceMobileAppConfigurationCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationCollectionResponse()(*ManagedDeviceMobileAppConfigurationCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_responseable.go new file mode 100644 index 000000000..a311abebe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationCollectionResponseable +type ManagedDeviceMobileAppConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationable) + SetValue(value []ManagedDeviceMobileAppConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status.go new file mode 100644 index 000000000..85c492000 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status.go @@ -0,0 +1,244 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceStatus contains properties, inherited properties and actions for an MDM mobile app configuration status for a device. +type ManagedDeviceMobileAppConfigurationDeviceStatus struct { + Entity + // The DateTime when device compliance grace period expires + complianceGracePeriodExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name of the DevicePolicyStatus. + deviceDisplayName *string + // The device model that is being reported + deviceModel *string + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Platform of the device that is being reported + platform *int32 + // The status property + status *ComplianceStatus + // The User Name that is being reported + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewManagedDeviceMobileAppConfigurationDeviceStatus instantiates a new managedDeviceMobileAppConfigurationDeviceStatus and sets the default values. +func NewManagedDeviceMobileAppConfigurationDeviceStatus()(*ManagedDeviceMobileAppConfigurationDeviceStatus) { + m := &ManagedDeviceMobileAppConfigurationDeviceStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationDeviceStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationDeviceStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationDeviceStatus(), nil +} +// GetComplianceGracePeriodExpirationDateTime gets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.complianceGracePeriodExpirationDateTime +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceModel gets the deviceModel property value. The device model that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetDeviceModel()(*string) { + return m.deviceModel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceGracePeriodExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceGracePeriodExpirationDateTime(val) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceModel(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetPlatform gets the platform property value. Platform of the device that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetPlatform()(*int32) { + return m.platform +} +// GetStatus gets the status property value. The status property +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserName gets the userName property value. The User Name that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("complianceGracePeriodExpirationDateTime", m.GetComplianceGracePeriodExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceModel", m.GetDeviceModel()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("platform", m.GetPlatform()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceGracePeriodExpirationDateTime sets the complianceGracePeriodExpirationDateTime property value. The DateTime when device compliance grace period expires +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.complianceGracePeriodExpirationDateTime = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Device name of the DevicePolicyStatus. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceModel sets the deviceModel property value. The device model that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetDeviceModel(value *string)() { + m.deviceModel = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetPlatform sets the platform property value. Platform of the device that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetPlatform(value *int32)() { + m.platform = value +} +// SetStatus sets the status property value. The status property +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserName sets the userName property value. The User Name that is being reported +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationDeviceStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_response.go new file mode 100644 index 000000000..8ecdc0bc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse +type ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationDeviceStatusable +} +// NewManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse()(*ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationDeviceStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationDeviceStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationDeviceStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_responseable.go new file mode 100644 index 000000000..714297651 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponseable +type ManagedDeviceMobileAppConfigurationDeviceStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) + SetValue(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_statusable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_statusable.go new file mode 100644 index 000000000..3cfb0997f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_statusable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceStatusable +type ManagedDeviceMobileAppConfigurationDeviceStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceDisplayName()(*string) + GetDeviceModel()(*string) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPlatform()(*int32) + GetStatus()(*ComplianceStatus) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceDisplayName(value *string)() + SetDeviceModel(value *string)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPlatform(value *int32)() + SetStatus(value *ComplianceStatus)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summary.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summary.go new file mode 100644 index 000000000..f88f83e4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summary.go @@ -0,0 +1,269 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceSummary +type ManagedDeviceMobileAppConfigurationDeviceSummary struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of devices in conflict + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of failed devices + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable devices + notApplicableCount *int32 + // Number of not applicable devices due to mismatch platform and policy + notApplicablePlatformCount *int32 + // Number of pending devices + pendingCount *int32 + // Number of succeeded devices + successCount *int32 +} +// NewManagedDeviceMobileAppConfigurationDeviceSummary instantiates a new managedDeviceMobileAppConfigurationDeviceSummary and sets the default values. +func NewManagedDeviceMobileAppConfigurationDeviceSummary()(*ManagedDeviceMobileAppConfigurationDeviceSummary) { + m := &ManagedDeviceMobileAppConfigurationDeviceSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationDeviceSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationDeviceSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationDeviceSummary(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of devices in conflict +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["notApplicablePlatformCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicablePlatformCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetNotApplicablePlatformCount gets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetNotApplicablePlatformCount()(*int32) { + return m.notApplicablePlatformCount +} +// GetPendingCount gets the pendingCount property value. Number of pending devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicablePlatformCount", m.GetNotApplicablePlatformCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of devices in conflict +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetNotApplicablePlatformCount sets the notApplicablePlatformCount property value. Number of not applicable devices due to mismatch platform and policy +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetNotApplicablePlatformCount(value *int32)() { + m.notApplicablePlatformCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded devices +func (m *ManagedDeviceMobileAppConfigurationDeviceSummary) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summaryable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summaryable.go new file mode 100644 index 000000000..4d2777784 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_device_summaryable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationDeviceSummaryable +type ManagedDeviceMobileAppConfigurationDeviceSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetNotApplicablePlatformCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetNotApplicablePlatformCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item.go new file mode 100644 index 000000000..117216523 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationPolicySetItem +type ManagedDeviceMobileAppConfigurationPolicySetItem struct { + PolicySetItem +} +// NewManagedDeviceMobileAppConfigurationPolicySetItem instantiates a new ManagedDeviceMobileAppConfigurationPolicySetItem and sets the default values. +func NewManagedDeviceMobileAppConfigurationPolicySetItem()(*ManagedDeviceMobileAppConfigurationPolicySetItem) { + m := &ManagedDeviceMobileAppConfigurationPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.managedDeviceMobileAppConfigurationPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedDeviceMobileAppConfigurationPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_response.go new file mode 100644 index 000000000..f9dc1faec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse +type ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationPolicySetItemable +} +// NewManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse()(*ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..92d79507a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponseable +type ManagedDeviceMobileAppConfigurationPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationPolicySetItemable) + SetValue(value []ManagedDeviceMobileAppConfigurationPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_itemable.go new file mode 100644 index 000000000..8da17d616 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationPolicySetItemable +type ManagedDeviceMobileAppConfigurationPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state.go new file mode 100644 index 000000000..6ddf44226 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state.go @@ -0,0 +1,418 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationSettingState managed Device Mobile App Configuration Setting State for a given device. +type ManagedDeviceMobileAppConfigurationSettingState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Current value of setting on device + currentValue *string + // Error code for the setting + errorCode *int64 + // Error description + errorDescription *string + // Name of setting instance that is being reported. + instanceDisplayName *string + // The OdataType property + odataType *string + // The setting that is being reported + setting *string + // SettingInstanceId + settingInstanceId *string + // Localized/user friendly setting name that is being reported + settingName *string + // Contributing policies + sources []SettingSourceable + // The state property + state *ComplianceStatus + // UserEmail + userEmail *string + // UserId + userId *string + // UserName + userName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewManagedDeviceMobileAppConfigurationSettingState instantiates a new managedDeviceMobileAppConfigurationSettingState and sets the default values. +func NewManagedDeviceMobileAppConfigurationSettingState()(*ManagedDeviceMobileAppConfigurationSettingState) { + m := &ManagedDeviceMobileAppConfigurationSettingState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagedDeviceMobileAppConfigurationSettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationSettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationSettingState(), 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 *ManagedDeviceMobileAppConfigurationSettingState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCurrentValue gets the currentValue property value. Current value of setting on device +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetCurrentValue()(*string) { + return m.currentValue +} +// GetErrorCode gets the errorCode property value. Error code for the setting +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetErrorCode()(*int64) { + return m.errorCode +} +// GetErrorDescription gets the errorDescription property value. Error description +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetErrorDescription()(*string) { + return m.errorDescription +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["currentValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrentValue(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["errorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorDescription(val) + } + return nil + } + res["instanceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstanceDisplayName(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["setting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSetting(val) + } + return nil + } + res["settingInstanceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingInstanceId(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["sources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetSources(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserEmail(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetInstanceDisplayName gets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetInstanceDisplayName()(*string) { + return m.instanceDisplayName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetOdataType()(*string) { + return m.odataType +} +// GetSetting gets the setting property value. The setting that is being reported +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetSetting()(*string) { + return m.setting +} +// GetSettingInstanceId gets the settingInstanceId property value. SettingInstanceId +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetSettingInstanceId()(*string) { + return m.settingInstanceId +} +// GetSettingName gets the settingName property value. Localized/user friendly setting name that is being reported +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetSettingName()(*string) { + return m.settingName +} +// GetSources gets the sources property value. Contributing policies +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetSources()([]SettingSourceable) { + return m.sources +} +// GetState gets the state property value. The state property +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserEmail gets the userEmail property value. UserEmail +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetUserEmail()(*string) { + return m.userEmail +} +// GetUserId gets the userId property value. UserId +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. UserName +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationSettingState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationSettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("currentValue", m.GetCurrentValue()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("errorDescription", m.GetErrorDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("instanceDisplayName", m.GetInstanceDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("setting", m.GetSetting()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingInstanceId", m.GetSettingInstanceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSources())) + for i, v := range m.GetSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sources", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userEmail", m.GetUserEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *ManagedDeviceMobileAppConfigurationSettingState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCurrentValue sets the currentValue property value. Current value of setting on device +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetCurrentValue(value *string)() { + m.currentValue = value +} +// SetErrorCode sets the errorCode property value. Error code for the setting +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetErrorCode(value *int64)() { + m.errorCode = value +} +// SetErrorDescription sets the errorDescription property value. Error description +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetErrorDescription(value *string)() { + m.errorDescription = value +} +// SetInstanceDisplayName sets the instanceDisplayName property value. Name of setting instance that is being reported. +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetInstanceDisplayName(value *string)() { + m.instanceDisplayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetOdataType(value *string)() { + m.odataType = value +} +// SetSetting sets the setting property value. The setting that is being reported +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetSetting(value *string)() { + m.setting = value +} +// SetSettingInstanceId sets the settingInstanceId property value. SettingInstanceId +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetSettingInstanceId(value *string)() { + m.settingInstanceId = value +} +// SetSettingName sets the settingName property value. Localized/user friendly setting name that is being reported +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetSources sets the sources property value. Contributing policies +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetSources(value []SettingSourceable)() { + m.sources = value +} +// SetState sets the state property value. The state property +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserEmail sets the userEmail property value. UserEmail +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetUserEmail(value *string)() { + m.userEmail = value +} +// SetUserId sets the userId property value. UserId +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. UserName +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationSettingState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_response.go new file mode 100644 index 000000000..03f634ce1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse +type ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationSettingStateable +} +// NewManagedDeviceMobileAppConfigurationSettingStateCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationSettingStateCollectionResponse()(*ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationSettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationSettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationSettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationSettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationSettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationSettingStateCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationSettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_responseable.go new file mode 100644 index 000000000..d4bcad88e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationSettingStateCollectionResponseable +type ManagedDeviceMobileAppConfigurationSettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationSettingStateable) + SetValue(value []ManagedDeviceMobileAppConfigurationSettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_stateable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_stateable.go new file mode 100644 index 000000000..21ffd219c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_setting_stateable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationSettingStateable +type ManagedDeviceMobileAppConfigurationSettingStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCurrentValue()(*string) + GetErrorCode()(*int64) + GetErrorDescription()(*string) + GetInstanceDisplayName()(*string) + GetOdataType()(*string) + GetSetting()(*string) + GetSettingInstanceId()(*string) + GetSettingName()(*string) + GetSources()([]SettingSourceable) + GetState()(*ComplianceStatus) + GetUserEmail()(*string) + GetUserId()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetCurrentValue(value *string)() + SetErrorCode(value *int64)() + SetErrorDescription(value *string)() + SetInstanceDisplayName(value *string)() + SetOdataType(value *string)() + SetSetting(value *string)() + SetSettingInstanceId(value *string)() + SetSettingName(value *string)() + SetSources(value []SettingSourceable)() + SetState(value *ComplianceStatus)() + SetUserEmail(value *string)() + SetUserId(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state.go new file mode 100644 index 000000000..81e661af9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationState managed Device Mobile App Configuration State for a given device. +type ManagedDeviceMobileAppConfigurationState struct { + Entity + // The name of the policy for this policyBase + displayName *string + // Supported platform types for policies. + platformType *PolicyPlatformType + // Count of how many setting a policy holds + settingCount *int32 + // The settingStates property + settingStates []ManagedDeviceMobileAppConfigurationSettingStateable + // The state property + state *ComplianceStatus + // User unique identifier, must be Guid + userId *string + // User Principal Name + userPrincipalName *string + // The version of the policy + version *int32 +} +// NewManagedDeviceMobileAppConfigurationState instantiates a new managedDeviceMobileAppConfigurationState and sets the default values. +func NewManagedDeviceMobileAppConfigurationState()(*ManagedDeviceMobileAppConfigurationState) { + m := &ManagedDeviceMobileAppConfigurationState{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationState(), nil +} +// GetDisplayName gets the displayName property value. The name of the policy for this policyBase +func (m *ManagedDeviceMobileAppConfigurationState) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["settingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSettingCount(val) + } + return nil + } + res["settingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationSettingStateable) + } + m.SetSettingStates(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ComplianceStatus)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *ManagedDeviceMobileAppConfigurationState) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetSettingCount gets the settingCount property value. Count of how many setting a policy holds +func (m *ManagedDeviceMobileAppConfigurationState) GetSettingCount()(*int32) { + return m.settingCount +} +// GetSettingStates gets the settingStates property value. The settingStates property +func (m *ManagedDeviceMobileAppConfigurationState) GetSettingStates()([]ManagedDeviceMobileAppConfigurationSettingStateable) { + return m.settingStates +} +// GetState gets the state property value. The state property +func (m *ManagedDeviceMobileAppConfigurationState) GetState()(*ComplianceStatus) { + return m.state +} +// GetUserId gets the userId property value. User unique identifier, must be Guid +func (m *ManagedDeviceMobileAppConfigurationState) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *ManagedDeviceMobileAppConfigurationState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetVersion gets the version property value. The version of the policy +func (m *ManagedDeviceMobileAppConfigurationState) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("settingCount", m.GetSettingCount()) + if err != nil { + return err + } + } + if m.GetSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingStates())) + for i, v := range m.GetSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingStates", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the policy for this policyBase +func (m *ManagedDeviceMobileAppConfigurationState) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *ManagedDeviceMobileAppConfigurationState) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetSettingCount sets the settingCount property value. Count of how many setting a policy holds +func (m *ManagedDeviceMobileAppConfigurationState) SetSettingCount(value *int32)() { + m.settingCount = value +} +// SetSettingStates sets the settingStates property value. The settingStates property +func (m *ManagedDeviceMobileAppConfigurationState) SetSettingStates(value []ManagedDeviceMobileAppConfigurationSettingStateable)() { + m.settingStates = value +} +// SetState sets the state property value. The state property +func (m *ManagedDeviceMobileAppConfigurationState) SetState(value *ComplianceStatus)() { + m.state = value +} +// SetUserId sets the userId property value. User unique identifier, must be Guid +func (m *ManagedDeviceMobileAppConfigurationState) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *ManagedDeviceMobileAppConfigurationState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetVersion sets the version property value. The version of the policy +func (m *ManagedDeviceMobileAppConfigurationState) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_response.go new file mode 100644 index 000000000..89650fe6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationStateCollectionResponse +type ManagedDeviceMobileAppConfigurationStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationStateable +} +// NewManagedDeviceMobileAppConfigurationStateCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationStateCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationStateCollectionResponse()(*ManagedDeviceMobileAppConfigurationStateCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationStateable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationStateCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationStateCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_responseable.go new file mode 100644 index 000000000..8bacb39f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationStateCollectionResponseable +type ManagedDeviceMobileAppConfigurationStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationStateable) + SetValue(value []ManagedDeviceMobileAppConfigurationStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_stateable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_stateable.go new file mode 100644 index 000000000..2f9872935 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_stateable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationStateable +type ManagedDeviceMobileAppConfigurationStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetPlatformType()(*PolicyPlatformType) + GetSettingCount()(*int32) + GetSettingStates()([]ManagedDeviceMobileAppConfigurationSettingStateable) + GetState()(*ComplianceStatus) + GetUserId()(*string) + GetUserPrincipalName()(*string) + GetVersion()(*int32) + SetDisplayName(value *string)() + SetPlatformType(value *PolicyPlatformType)() + SetSettingCount(value *int32)() + SetSettingStates(value []ManagedDeviceMobileAppConfigurationSettingStateable)() + SetState(value *ComplianceStatus)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status.go new file mode 100644 index 000000000..451eaa83f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserStatus contains properties, inherited properties and actions for an MDM mobile app configuration status for a user. +type ManagedDeviceMobileAppConfigurationUserStatus struct { + Entity + // Devices count for that user. + devicesCount *int32 + // Last modified date time of the policy report. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *ComplianceStatus + // User name of the DevicePolicyStatus. + userDisplayName *string + // UserPrincipalName. + userPrincipalName *string +} +// NewManagedDeviceMobileAppConfigurationUserStatus instantiates a new managedDeviceMobileAppConfigurationUserStatus and sets the default values. +func NewManagedDeviceMobileAppConfigurationUserStatus()(*ManagedDeviceMobileAppConfigurationUserStatus) { + m := &ManagedDeviceMobileAppConfigurationUserStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationUserStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationUserStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationUserStatus(), nil +} +// GetDevicesCount gets the devicesCount property value. Devices count for that user. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetDevicesCount()(*int32) { + return m.devicesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["devicesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDevicesCount(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseComplianceStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ComplianceStatus)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetStatus gets the status property value. The status property +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetStatus()(*ComplianceStatus) { + return m.status +} +// GetUserDisplayName gets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationUserStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("devicesCount", m.GetDevicesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDevicesCount sets the devicesCount property value. Devices count for that user. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) SetDevicesCount(value *int32)() { + m.devicesCount = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *ManagedDeviceMobileAppConfigurationUserStatus) SetStatus(value *ComplianceStatus)() { + m.status = value +} +// SetUserDisplayName sets the userDisplayName property value. User name of the DevicePolicyStatus. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. UserPrincipalName. +func (m *ManagedDeviceMobileAppConfigurationUserStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_response.go new file mode 100644 index 000000000..cce8c24c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse +type ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceMobileAppConfigurationUserStatusable +} +// NewManagedDeviceMobileAppConfigurationUserStatusCollectionResponse instantiates a new ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse and sets the default values. +func NewManagedDeviceMobileAppConfigurationUserStatusCollectionResponse()(*ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse) { + m := &ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationUserStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationUserStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationUserStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceMobileAppConfigurationUserStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceMobileAppConfigurationUserStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceMobileAppConfigurationUserStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse) GetValue()([]ManagedDeviceMobileAppConfigurationUserStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceMobileAppConfigurationUserStatusCollectionResponse) SetValue(value []ManagedDeviceMobileAppConfigurationUserStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_responseable.go new file mode 100644 index 000000000..93801c71a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserStatusCollectionResponseable +type ManagedDeviceMobileAppConfigurationUserStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceMobileAppConfigurationUserStatusable) + SetValue(value []ManagedDeviceMobileAppConfigurationUserStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_statusable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_statusable.go new file mode 100644 index 000000000..224cb119c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_statusable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserStatusable +type ManagedDeviceMobileAppConfigurationUserStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDevicesCount()(*int32) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*ComplianceStatus) + GetUserDisplayName()(*string) + GetUserPrincipalName()(*string) + SetDevicesCount(value *int32)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *ComplianceStatus)() + SetUserDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summary.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summary.go new file mode 100644 index 000000000..c24b2871b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summary.go @@ -0,0 +1,243 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserSummary +type ManagedDeviceMobileAppConfigurationUserSummary struct { + Entity + // Version of the policy for that overview + configurationVersion *int32 + // Number of users in conflict + conflictCount *int32 + // Number of error Users + errorCount *int32 + // Number of failed Users + failedCount *int32 + // Last update time + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Number of not applicable users + notApplicableCount *int32 + // Number of pending Users + pendingCount *int32 + // Number of succeeded Users + successCount *int32 +} +// NewManagedDeviceMobileAppConfigurationUserSummary instantiates a new managedDeviceMobileAppConfigurationUserSummary and sets the default values. +func NewManagedDeviceMobileAppConfigurationUserSummary()(*ManagedDeviceMobileAppConfigurationUserSummary) { + m := &ManagedDeviceMobileAppConfigurationUserSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceMobileAppConfigurationUserSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceMobileAppConfigurationUserSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceMobileAppConfigurationUserSummary(), nil +} +// GetConfigurationVersion gets the configurationVersion property value. Version of the policy for that overview +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetConfigurationVersion()(*int32) { + return m.configurationVersion +} +// GetConflictCount gets the conflictCount property value. Number of users in conflict +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFailedCount gets the failedCount property value. Number of failed Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetFailedCount()(*int32) { + return m.failedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configurationVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigurationVersion(val) + } + return nil + } + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["failedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["pendingCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingCount(val) + } + return nil + } + res["successCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessCount(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Last update time +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetPendingCount gets the pendingCount property value. Number of pending Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetPendingCount()(*int32) { + return m.pendingCount +} +// GetSuccessCount gets the successCount property value. Number of succeeded Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) GetSuccessCount()(*int32) { + return m.successCount +} +// Serialize serializes information the current object +func (m *ManagedDeviceMobileAppConfigurationUserSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("configurationVersion", m.GetConfigurationVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedCount", m.GetFailedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingCount", m.GetPendingCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("successCount", m.GetSuccessCount()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurationVersion sets the configurationVersion property value. Version of the policy for that overview +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetConfigurationVersion(value *int32)() { + m.configurationVersion = value +} +// SetConflictCount sets the conflictCount property value. Number of users in conflict +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetFailedCount sets the failedCount property value. Number of failed Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetFailedCount(value *int32)() { + m.failedCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Last update time +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetPendingCount sets the pendingCount property value. Number of pending Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetPendingCount(value *int32)() { + m.pendingCount = value +} +// SetSuccessCount sets the successCount property value. Number of succeeded Users +func (m *ManagedDeviceMobileAppConfigurationUserSummary) SetSuccessCount(value *int32)() { + m.successCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summaryable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summaryable.go new file mode 100644 index 000000000..b3102420b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configuration_user_summaryable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationUserSummaryable +type ManagedDeviceMobileAppConfigurationUserSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfigurationVersion()(*int32) + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetFailedCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableCount()(*int32) + GetPendingCount()(*int32) + GetSuccessCount()(*int32) + SetConfigurationVersion(value *int32)() + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetFailedCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableCount(value *int32)() + SetPendingCount(value *int32)() + SetSuccessCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configurationable.go b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configurationable.go new file mode 100644 index 000000000..76c4ca273 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_mobile_app_configurationable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceMobileAppConfigurationable +type ManagedDeviceMobileAppConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]ManagedDeviceMobileAppConfigurationAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceStatuses()([]ManagedDeviceMobileAppConfigurationDeviceStatusable) + GetDeviceStatusSummary()(ManagedDeviceMobileAppConfigurationDeviceSummaryable) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetTargetedMobileApps()([]string) + GetUserStatuses()([]ManagedDeviceMobileAppConfigurationUserStatusable) + GetUserStatusSummary()(ManagedDeviceMobileAppConfigurationUserSummaryable) + GetVersion()(*int32) + SetAssignments(value []ManagedDeviceMobileAppConfigurationAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceStatuses(value []ManagedDeviceMobileAppConfigurationDeviceStatusable)() + SetDeviceStatusSummary(value ManagedDeviceMobileAppConfigurationDeviceSummaryable)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetTargetedMobileApps(value []string)() + SetUserStatuses(value []ManagedDeviceMobileAppConfigurationUserStatusable)() + SetUserStatusSummary(value ManagedDeviceMobileAppConfigurationUserSummaryable)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturers.go b/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturers.go new file mode 100644 index 000000000..11fc966fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturers.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceModelsAndManufacturers models and Manufactures meatadata for managed devices in the account +type ManagedDeviceModelsAndManufacturers struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // List of Manufactures for managed devices in the account + deviceManufacturers []string + // List of Models for managed devices in the account + deviceModels []string + // The OdataType property + odataType *string +} +// NewManagedDeviceModelsAndManufacturers instantiates a new managedDeviceModelsAndManufacturers and sets the default values. +func NewManagedDeviceModelsAndManufacturers()(*ManagedDeviceModelsAndManufacturers) { + m := &ManagedDeviceModelsAndManufacturers{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagedDeviceModelsAndManufacturersFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceModelsAndManufacturersFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceModelsAndManufacturers(), 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 *ManagedDeviceModelsAndManufacturers) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceManufacturers gets the deviceManufacturers property value. List of Manufactures for managed devices in the account +func (m *ManagedDeviceModelsAndManufacturers) GetDeviceManufacturers()([]string) { + return m.deviceManufacturers +} +// GetDeviceModels gets the deviceModels property value. List of Models for managed devices in the account +func (m *ManagedDeviceModelsAndManufacturers) GetDeviceModels()([]string) { + return m.deviceModels +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceModelsAndManufacturers) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceManufacturers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDeviceManufacturers(res) + } + return nil + } + res["deviceModels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDeviceModels(res) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagedDeviceModelsAndManufacturers) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagedDeviceModelsAndManufacturers) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDeviceManufacturers() != nil { + err := writer.WriteCollectionOfStringValues("deviceManufacturers", m.GetDeviceManufacturers()) + if err != nil { + return err + } + } + if m.GetDeviceModels() != nil { + err := writer.WriteCollectionOfStringValues("deviceModels", m.GetDeviceModels()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagedDeviceModelsAndManufacturers) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceManufacturers sets the deviceManufacturers property value. List of Manufactures for managed devices in the account +func (m *ManagedDeviceModelsAndManufacturers) SetDeviceManufacturers(value []string)() { + m.deviceManufacturers = value +} +// SetDeviceModels sets the deviceModels property value. List of Models for managed devices in the account +func (m *ManagedDeviceModelsAndManufacturers) SetDeviceModels(value []string)() { + m.deviceModels = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagedDeviceModelsAndManufacturers) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturersable.go b/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturersable.go new file mode 100644 index 000000000..974cf58ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_models_and_manufacturersable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceModelsAndManufacturersable +type ManagedDeviceModelsAndManufacturersable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceManufacturers()([]string) + GetDeviceModels()([]string) + GetOdataType()(*string) + SetDeviceManufacturers(value []string)() + SetDeviceModels(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_overview.go b/src/internal/connector/graph/betasdk/models/managed_device_overview.go new file mode 100644 index 000000000..8ebe1d166 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_overview.go @@ -0,0 +1,217 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceOverview +type ManagedDeviceOverview struct { + Entity + // Distribution of Exchange Access State in Intune + deviceExchangeAccessStateSummary DeviceExchangeAccessStateSummaryable + // Device operating system summary. + deviceOperatingSystemSummary DeviceOperatingSystemSummaryable + // The number of devices enrolled in both MDM and EAS + dualEnrolledDeviceCount *int32 + // Total enrolled device count. Does not include PC devices managed via Intune PC Agent + enrolledDeviceCount *int32 + // Last modified date time of device overview + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Models and Manufactures meatadata for managed devices in the account + managedDeviceModelsAndManufacturers ManagedDeviceModelsAndManufacturersable + // The number of devices enrolled in MDM + mdmEnrolledCount *int32 +} +// NewManagedDeviceOverview instantiates a new managedDeviceOverview and sets the default values. +func NewManagedDeviceOverview()(*ManagedDeviceOverview) { + m := &ManagedDeviceOverview{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedDeviceOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceOverview(), nil +} +// GetDeviceExchangeAccessStateSummary gets the deviceExchangeAccessStateSummary property value. Distribution of Exchange Access State in Intune +func (m *ManagedDeviceOverview) GetDeviceExchangeAccessStateSummary()(DeviceExchangeAccessStateSummaryable) { + return m.deviceExchangeAccessStateSummary +} +// GetDeviceOperatingSystemSummary gets the deviceOperatingSystemSummary property value. Device operating system summary. +func (m *ManagedDeviceOverview) GetDeviceOperatingSystemSummary()(DeviceOperatingSystemSummaryable) { + return m.deviceOperatingSystemSummary +} +// GetDualEnrolledDeviceCount gets the dualEnrolledDeviceCount property value. The number of devices enrolled in both MDM and EAS +func (m *ManagedDeviceOverview) GetDualEnrolledDeviceCount()(*int32) { + return m.dualEnrolledDeviceCount +} +// GetEnrolledDeviceCount gets the enrolledDeviceCount property value. Total enrolled device count. Does not include PC devices managed via Intune PC Agent +func (m *ManagedDeviceOverview) GetEnrolledDeviceCount()(*int32) { + return m.enrolledDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceExchangeAccessStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceExchangeAccessStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceExchangeAccessStateSummary(val.(DeviceExchangeAccessStateSummaryable)) + } + return nil + } + res["deviceOperatingSystemSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceOperatingSystemSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceOperatingSystemSummary(val.(DeviceOperatingSystemSummaryable)) + } + return nil + } + res["dualEnrolledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDualEnrolledDeviceCount(val) + } + return nil + } + res["enrolledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledDeviceCount(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["managedDeviceModelsAndManufacturers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedDeviceModelsAndManufacturersFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceModelsAndManufacturers(val.(ManagedDeviceModelsAndManufacturersable)) + } + return nil + } + res["mdmEnrolledCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMdmEnrolledCount(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified date time of device overview +func (m *ManagedDeviceOverview) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetManagedDeviceModelsAndManufacturers gets the managedDeviceModelsAndManufacturers property value. Models and Manufactures meatadata for managed devices in the account +func (m *ManagedDeviceOverview) GetManagedDeviceModelsAndManufacturers()(ManagedDeviceModelsAndManufacturersable) { + return m.managedDeviceModelsAndManufacturers +} +// GetMdmEnrolledCount gets the mdmEnrolledCount property value. The number of devices enrolled in MDM +func (m *ManagedDeviceOverview) GetMdmEnrolledCount()(*int32) { + return m.mdmEnrolledCount +} +// Serialize serializes information the current object +func (m *ManagedDeviceOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("deviceExchangeAccessStateSummary", m.GetDeviceExchangeAccessStateSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceOperatingSystemSummary", m.GetDeviceOperatingSystemSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dualEnrolledDeviceCount", m.GetDualEnrolledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("enrolledDeviceCount", m.GetEnrolledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managedDeviceModelsAndManufacturers", m.GetManagedDeviceModelsAndManufacturers()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mdmEnrolledCount", m.GetMdmEnrolledCount()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceExchangeAccessStateSummary sets the deviceExchangeAccessStateSummary property value. Distribution of Exchange Access State in Intune +func (m *ManagedDeviceOverview) SetDeviceExchangeAccessStateSummary(value DeviceExchangeAccessStateSummaryable)() { + m.deviceExchangeAccessStateSummary = value +} +// SetDeviceOperatingSystemSummary sets the deviceOperatingSystemSummary property value. Device operating system summary. +func (m *ManagedDeviceOverview) SetDeviceOperatingSystemSummary(value DeviceOperatingSystemSummaryable)() { + m.deviceOperatingSystemSummary = value +} +// SetDualEnrolledDeviceCount sets the dualEnrolledDeviceCount property value. The number of devices enrolled in both MDM and EAS +func (m *ManagedDeviceOverview) SetDualEnrolledDeviceCount(value *int32)() { + m.dualEnrolledDeviceCount = value +} +// SetEnrolledDeviceCount sets the enrolledDeviceCount property value. Total enrolled device count. Does not include PC devices managed via Intune PC Agent +func (m *ManagedDeviceOverview) SetEnrolledDeviceCount(value *int32)() { + m.enrolledDeviceCount = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified date time of device overview +func (m *ManagedDeviceOverview) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetManagedDeviceModelsAndManufacturers sets the managedDeviceModelsAndManufacturers property value. Models and Manufactures meatadata for managed devices in the account +func (m *ManagedDeviceOverview) SetManagedDeviceModelsAndManufacturers(value ManagedDeviceModelsAndManufacturersable)() { + m.managedDeviceModelsAndManufacturers = value +} +// SetMdmEnrolledCount sets the mdmEnrolledCount property value. The number of devices enrolled in MDM +func (m *ManagedDeviceOverview) SetMdmEnrolledCount(value *int32)() { + m.mdmEnrolledCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_overviewable.go b/src/internal/connector/graph/betasdk/models/managed_device_overviewable.go new file mode 100644 index 000000000..997ea2f2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_overviewable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceOverviewable +type ManagedDeviceOverviewable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceExchangeAccessStateSummary()(DeviceExchangeAccessStateSummaryable) + GetDeviceOperatingSystemSummary()(DeviceOperatingSystemSummaryable) + GetDualEnrolledDeviceCount()(*int32) + GetEnrolledDeviceCount()(*int32) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceModelsAndManufacturers()(ManagedDeviceModelsAndManufacturersable) + GetMdmEnrolledCount()(*int32) + SetDeviceExchangeAccessStateSummary(value DeviceExchangeAccessStateSummaryable)() + SetDeviceOperatingSystemSummary(value DeviceOperatingSystemSummaryable)() + SetDualEnrolledDeviceCount(value *int32)() + SetEnrolledDeviceCount(value *int32)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceModelsAndManufacturers(value ManagedDeviceModelsAndManufacturersable)() + SetMdmEnrolledCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_owner_type.go b/src/internal/connector/graph/betasdk/models/managed_device_owner_type.go new file mode 100644 index 000000000..2e9856f34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_owner_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceOwnerType int + +const ( + // Unknown. + UNKNOWN_MANAGEDDEVICEOWNERTYPE ManagedDeviceOwnerType = iota + // Owned by company. + COMPANY_MANAGEDDEVICEOWNERTYPE + // Owned by person. + PERSONAL_MANAGEDDEVICEOWNERTYPE +) + +func (i ManagedDeviceOwnerType) String() string { + return []string{"unknown", "company", "personal"}[i] +} +func ParseManagedDeviceOwnerType(v string) (interface{}, error) { + result := UNKNOWN_MANAGEDDEVICEOWNERTYPE + switch v { + case "unknown": + result = UNKNOWN_MANAGEDDEVICEOWNERTYPE + case "company": + result = COMPANY_MANAGEDDEVICEOWNERTYPE + case "personal": + result = PERSONAL_MANAGEDDEVICEOWNERTYPE + default: + return 0, errors.New("Unknown ManagedDeviceOwnerType value: " + v) + } + return &result, nil +} +func SerializeManagedDeviceOwnerType(values []ManagedDeviceOwnerType) []string { + 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/managed_device_partner_reported_health_state.go b/src/internal/connector/graph/betasdk/models/managed_device_partner_reported_health_state.go new file mode 100644 index 000000000..8bc65b542 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_partner_reported_health_state.go @@ -0,0 +1,68 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDevicePartnerReportedHealthState int + +const ( + // Device health state is not yet reported + UNKNOWN_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE ManagedDevicePartnerReportedHealthState = iota + // Device has been activated by a mobile threat defense partner, but has not yet reported health. + ACTIVATED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device has been deactivated by a mobile threat defense partner. The device health is not known. + DEACTIVATED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered secured by the mobile threat defense partner. + SECURED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered low threat by the mobile threat defense partner. + LOWSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered medium threat by the mobile threat defense partner. + MEDIUMSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered high threat by the mobile threat defense partner. + HIGHSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered unresponsive by the mobile threat defense partner. The device health is not known. + UNRESPONSIVE_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered compromised by the Threat Defense partner. This means the device has an active Threat or Risk which cannot be easily remediated by the end user and the user should contact their IT Admin. + COMPROMISED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + // Device is considered misconfigured with the Threat Defense partner. This means the device is missing a required profile or configuration for the Threat Defense Partner to function properly and is thus threat or risk analysis is not able to complete. + MISCONFIGURED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE +) + +func (i ManagedDevicePartnerReportedHealthState) String() string { + return []string{"unknown", "activated", "deactivated", "secured", "lowSeverity", "mediumSeverity", "highSeverity", "unresponsive", "compromised", "misconfigured"}[i] +} +func ParseManagedDevicePartnerReportedHealthState(v string) (interface{}, error) { + result := UNKNOWN_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + switch v { + case "unknown": + result = UNKNOWN_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "activated": + result = ACTIVATED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "deactivated": + result = DEACTIVATED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "secured": + result = SECURED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "lowSeverity": + result = LOWSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "mediumSeverity": + result = MEDIUMSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "highSeverity": + result = HIGHSEVERITY_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "unresponsive": + result = UNRESPONSIVE_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "compromised": + result = COMPROMISED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + case "misconfigured": + result = MISCONFIGURED_MANAGEDDEVICEPARTNERREPORTEDHEALTHSTATE + default: + return 0, errors.New("Unknown ManagedDevicePartnerReportedHealthState value: " + v) + } + return &result, nil +} +func SerializeManagedDevicePartnerReportedHealthState(values []ManagedDevicePartnerReportedHealthState) []string { + 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/managed_device_reported_app.go b/src/internal/connector/graph/betasdk/models/managed_device_reported_app.go new file mode 100644 index 000000000..a7c2f91e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_reported_app.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceReportedApp application data for reporting +type ManagedDeviceReportedApp 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 application or bundle identifier of the application + appId *string + // The OdataType property + odataType *string +} +// NewManagedDeviceReportedApp instantiates a new managedDeviceReportedApp and sets the default values. +func NewManagedDeviceReportedApp()(*ManagedDeviceReportedApp) { + m := &ManagedDeviceReportedApp{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagedDeviceReportedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceReportedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceReportedApp(), 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 *ManagedDeviceReportedApp) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The application or bundle identifier of the application +func (m *ManagedDeviceReportedApp) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceReportedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagedDeviceReportedApp) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagedDeviceReportedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagedDeviceReportedApp) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The application or bundle identifier of the application +func (m *ManagedDeviceReportedApp) SetAppId(value *string)() { + m.appId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagedDeviceReportedApp) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_response.go new file mode 100644 index 000000000..eb2a0833f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceReportedAppCollectionResponse +type ManagedDeviceReportedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceReportedAppable +} +// NewManagedDeviceReportedAppCollectionResponse instantiates a new ManagedDeviceReportedAppCollectionResponse and sets the default values. +func NewManagedDeviceReportedAppCollectionResponse()(*ManagedDeviceReportedAppCollectionResponse) { + m := &ManagedDeviceReportedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceReportedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceReportedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceReportedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceReportedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceReportedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceReportedAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceReportedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceReportedAppCollectionResponse) GetValue()([]ManagedDeviceReportedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceReportedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceReportedAppCollectionResponse) SetValue(value []ManagedDeviceReportedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_responseable.go new file mode 100644 index 000000000..74148b2f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_reported_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceReportedAppCollectionResponseable +type ManagedDeviceReportedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceReportedAppable) + SetValue(value []ManagedDeviceReportedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_device_reported_appable.go b/src/internal/connector/graph/betasdk/models/managed_device_reported_appable.go new file mode 100644 index 000000000..84c37daa3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_device_reported_appable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceReportedAppable +type ManagedDeviceReportedAppable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetOdataType()(*string) + SetAppId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_deviceable.go b/src/internal/connector/graph/betasdk/models/managed_deviceable.go new file mode 100644 index 000000000..0efda5f79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_deviceable.go @@ -0,0 +1,194 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedDeviceable +type ManagedDeviceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAadRegistered()(*bool) + GetActivationLockBypassCode()(*string) + GetAndroidSecurityPatchLevel()(*string) + GetAssignmentFilterEvaluationStatusDetails()([]AssignmentFilterEvaluationStatusDetailsable) + GetAutopilotEnrolled()(*bool) + GetAzureActiveDirectoryDeviceId()(*string) + GetAzureADDeviceId()(*string) + GetAzureADRegistered()(*bool) + GetBootstrapTokenEscrowed()(*bool) + GetChassisType()(*ChassisType) + GetChromeOSDeviceInfo()([]ChromeOSDevicePropertyable) + GetCloudPcRemoteActionResults()([]CloudPcRemoteActionResultable) + GetComplianceGracePeriodExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetComplianceState()(*ComplianceState) + GetConfigurationManagerClientEnabledFeatures()(ConfigurationManagerClientEnabledFeaturesable) + GetConfigurationManagerClientHealthState()(ConfigurationManagerClientHealthStateable) + GetConfigurationManagerClientInformation()(ConfigurationManagerClientInformationable) + GetDetectedApps()([]DetectedAppable) + GetDeviceActionResults()([]DeviceActionResultable) + GetDeviceCategory()(DeviceCategoryable) + GetDeviceCategoryDisplayName()(*string) + GetDeviceCompliancePolicyStates()([]DeviceCompliancePolicyStateable) + GetDeviceConfigurationStates()([]DeviceConfigurationStateable) + GetDeviceEnrollmentType()(*DeviceEnrollmentType) + GetDeviceFirmwareConfigurationInterfaceManaged()(*bool) + GetDeviceHealthAttestationState()(DeviceHealthAttestationStateable) + GetDeviceName()(*string) + GetDeviceRegistrationState()(*DeviceRegistrationState) + GetDeviceType()(*DeviceType) + GetEasActivated()(*bool) + GetEasActivationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEasDeviceId()(*string) + GetEmailAddress()(*string) + GetEnrolledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEnrollmentProfileName()(*string) + GetEthernetMacAddress()(*string) + GetExchangeAccessState()(*DeviceManagementExchangeAccessState) + GetExchangeAccessStateReason()(*DeviceManagementExchangeAccessStateReason) + GetExchangeLastSuccessfulSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFreeStorageSpaceInBytes()(*int64) + GetHardwareInformation()(HardwareInformationable) + GetIccid()(*string) + GetImei()(*string) + GetIsEncrypted()(*bool) + GetIsSupervised()(*bool) + GetJailBroken()(*string) + GetJoinType()(*JoinType) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLogCollectionRequests()([]DeviceLogCollectionResponseable) + GetLostModeState()(*LostModeState) + GetManagedDeviceMobileAppConfigurationStates()([]ManagedDeviceMobileAppConfigurationStateable) + GetManagedDeviceName()(*string) + GetManagedDeviceOwnerType()(*ManagedDeviceOwnerType) + GetManagementAgent()(*ManagementAgentType) + GetManagementCertificateExpirationDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementFeatures()(*ManagedDeviceManagementFeatures) + GetManagementState()(*ManagementState) + GetManufacturer()(*string) + GetMeid()(*string) + GetModel()(*string) + GetNotes()(*string) + GetOperatingSystem()(*string) + GetOsVersion()(*string) + GetOwnerType()(*OwnerType) + GetPartnerReportedThreatState()(*ManagedDevicePartnerReportedHealthState) + GetPhoneNumber()(*string) + GetPhysicalMemoryInBytes()(*int64) + GetPreferMdmOverGroupPolicyAppliedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProcessorArchitecture()(*ManagedDeviceArchitecture) + GetRemoteAssistanceSessionErrorDetails()(*string) + GetRemoteAssistanceSessionUrl()(*string) + GetRequireUserEnrollmentApproval()(*bool) + GetRetireAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTagIds()([]string) + GetSecurityBaselineStates()([]SecurityBaselineStateable) + GetSerialNumber()(*string) + GetSkuFamily()(*string) + GetSkuNumber()(*int32) + GetSpecificationVersion()(*string) + GetSubscriberCarrier()(*string) + GetTotalStorageSpaceInBytes()(*int64) + GetUdid()(*string) + GetUserDisplayName()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + GetUsers()([]Userable) + GetUsersLoggedOn()([]LoggedOnUserable) + GetWiFiMacAddress()(*string) + GetWindowsActiveMalwareCount()(*int32) + GetWindowsProtectionState()(WindowsProtectionStateable) + GetWindowsRemediatedMalwareCount()(*int32) + SetAadRegistered(value *bool)() + SetActivationLockBypassCode(value *string)() + SetAndroidSecurityPatchLevel(value *string)() + SetAssignmentFilterEvaluationStatusDetails(value []AssignmentFilterEvaluationStatusDetailsable)() + SetAutopilotEnrolled(value *bool)() + SetAzureActiveDirectoryDeviceId(value *string)() + SetAzureADDeviceId(value *string)() + SetAzureADRegistered(value *bool)() + SetBootstrapTokenEscrowed(value *bool)() + SetChassisType(value *ChassisType)() + SetChromeOSDeviceInfo(value []ChromeOSDevicePropertyable)() + SetCloudPcRemoteActionResults(value []CloudPcRemoteActionResultable)() + SetComplianceGracePeriodExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetComplianceState(value *ComplianceState)() + SetConfigurationManagerClientEnabledFeatures(value ConfigurationManagerClientEnabledFeaturesable)() + SetConfigurationManagerClientHealthState(value ConfigurationManagerClientHealthStateable)() + SetConfigurationManagerClientInformation(value ConfigurationManagerClientInformationable)() + SetDetectedApps(value []DetectedAppable)() + SetDeviceActionResults(value []DeviceActionResultable)() + SetDeviceCategory(value DeviceCategoryable)() + SetDeviceCategoryDisplayName(value *string)() + SetDeviceCompliancePolicyStates(value []DeviceCompliancePolicyStateable)() + SetDeviceConfigurationStates(value []DeviceConfigurationStateable)() + SetDeviceEnrollmentType(value *DeviceEnrollmentType)() + SetDeviceFirmwareConfigurationInterfaceManaged(value *bool)() + SetDeviceHealthAttestationState(value DeviceHealthAttestationStateable)() + SetDeviceName(value *string)() + SetDeviceRegistrationState(value *DeviceRegistrationState)() + SetDeviceType(value *DeviceType)() + SetEasActivated(value *bool)() + SetEasActivationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEasDeviceId(value *string)() + SetEmailAddress(value *string)() + SetEnrolledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEnrollmentProfileName(value *string)() + SetEthernetMacAddress(value *string)() + SetExchangeAccessState(value *DeviceManagementExchangeAccessState)() + SetExchangeAccessStateReason(value *DeviceManagementExchangeAccessStateReason)() + SetExchangeLastSuccessfulSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFreeStorageSpaceInBytes(value *int64)() + SetHardwareInformation(value HardwareInformationable)() + SetIccid(value *string)() + SetImei(value *string)() + SetIsEncrypted(value *bool)() + SetIsSupervised(value *bool)() + SetJailBroken(value *string)() + SetJoinType(value *JoinType)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLogCollectionRequests(value []DeviceLogCollectionResponseable)() + SetLostModeState(value *LostModeState)() + SetManagedDeviceMobileAppConfigurationStates(value []ManagedDeviceMobileAppConfigurationStateable)() + SetManagedDeviceName(value *string)() + SetManagedDeviceOwnerType(value *ManagedDeviceOwnerType)() + SetManagementAgent(value *ManagementAgentType)() + SetManagementCertificateExpirationDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementFeatures(value *ManagedDeviceManagementFeatures)() + SetManagementState(value *ManagementState)() + SetManufacturer(value *string)() + SetMeid(value *string)() + SetModel(value *string)() + SetNotes(value *string)() + SetOperatingSystem(value *string)() + SetOsVersion(value *string)() + SetOwnerType(value *OwnerType)() + SetPartnerReportedThreatState(value *ManagedDevicePartnerReportedHealthState)() + SetPhoneNumber(value *string)() + SetPhysicalMemoryInBytes(value *int64)() + SetPreferMdmOverGroupPolicyAppliedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProcessorArchitecture(value *ManagedDeviceArchitecture)() + SetRemoteAssistanceSessionErrorDetails(value *string)() + SetRemoteAssistanceSessionUrl(value *string)() + SetRequireUserEnrollmentApproval(value *bool)() + SetRetireAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTagIds(value []string)() + SetSecurityBaselineStates(value []SecurityBaselineStateable)() + SetSerialNumber(value *string)() + SetSkuFamily(value *string)() + SetSkuNumber(value *int32)() + SetSpecificationVersion(value *string)() + SetSubscriberCarrier(value *string)() + SetTotalStorageSpaceInBytes(value *int64)() + SetUdid(value *string)() + SetUserDisplayName(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() + SetUsers(value []Userable)() + SetUsersLoggedOn(value []LoggedOnUserable)() + SetWiFiMacAddress(value *string)() + SetWindowsActiveMalwareCount(value *int32)() + SetWindowsProtectionState(value WindowsProtectionStateable)() + SetWindowsRemediatedMalwareCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book.go b/src/internal/connector/graph/betasdk/models/managed_e_book.go new file mode 100644 index 000000000..d50974377 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book.go @@ -0,0 +1,449 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBook an abstract class containing the base properties for Managed eBook. +type ManagedEBook struct { + Entity + // The list of assignments for this eBook. + assignments []ManagedEBookAssignmentable + // The list of categories for this eBook. + categories []ManagedEBookCategoryable + // The date and time when the eBook file was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description. + description *string + // The list of installation states for this eBook. + deviceStates []DeviceInstallStateable + // Name of the eBook. + displayName *string + // The more information Url. + informationUrl *string + // Mobile App Install Summary. + installSummary EBookInstallSummaryable + // Book cover. + largeCover MimeContentable + // The date and time when the eBook was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The privacy statement Url. + privacyInformationUrl *string + // The date and time when the eBook was published. + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Publisher. + publisher *string + // The list of installation states for this eBook. + userStateSummary []UserInstallStateSummaryable +} +// NewManagedEBook instantiates a new managedEBook and sets the default values. +func NewManagedEBook()(*ManagedEBook) { + m := &ManagedEBook{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedEBookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosVppEBook": + return NewIosVppEBook(), nil + } + } + } + } + return NewManagedEBook(), nil +} +// GetAssignments gets the assignments property value. The list of assignments for this eBook. +func (m *ManagedEBook) GetAssignments()([]ManagedEBookAssignmentable) { + return m.assignments +} +// GetCategories gets the categories property value. The list of categories for this eBook. +func (m *ManagedEBook) GetCategories()([]ManagedEBookCategoryable) { + return m.categories +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the eBook file was created. +func (m *ManagedEBook) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description. +func (m *ManagedEBook) GetDescription()(*string) { + return m.description +} +// GetDeviceStates gets the deviceStates property value. The list of installation states for this eBook. +func (m *ManagedEBook) GetDeviceStates()([]DeviceInstallStateable) { + return m.deviceStates +} +// GetDisplayName gets the displayName property value. Name of the eBook. +func (m *ManagedEBook) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["deviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceInstallStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceInstallStateable, len(val)) + for i, v := range val { + res[i] = v.(DeviceInstallStateable) + } + m.SetDeviceStates(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["informationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInformationUrl(val) + } + return nil + } + res["installSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEBookInstallSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstallSummary(val.(EBookInstallSummaryable)) + } + return nil + } + res["largeCover"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLargeCover(val.(MimeContentable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["privacyInformationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyInformationUrl(val) + } + return nil + } + res["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["userStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserInstallStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserInstallStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(UserInstallStateSummaryable) + } + m.SetUserStateSummary(res) + } + return nil + } + return res +} +// GetInformationUrl gets the informationUrl property value. The more information Url. +func (m *ManagedEBook) GetInformationUrl()(*string) { + return m.informationUrl +} +// GetInstallSummary gets the installSummary property value. Mobile App Install Summary. +func (m *ManagedEBook) GetInstallSummary()(EBookInstallSummaryable) { + return m.installSummary +} +// GetLargeCover gets the largeCover property value. Book cover. +func (m *ManagedEBook) GetLargeCover()(MimeContentable) { + return m.largeCover +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the eBook was last modified. +func (m *ManagedEBook) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPrivacyInformationUrl gets the privacyInformationUrl property value. The privacy statement Url. +func (m *ManagedEBook) GetPrivacyInformationUrl()(*string) { + return m.privacyInformationUrl +} +// GetPublishedDateTime gets the publishedDateTime property value. The date and time when the eBook was published. +func (m *ManagedEBook) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// GetPublisher gets the publisher property value. Publisher. +func (m *ManagedEBook) GetPublisher()(*string) { + return m.publisher +} +// GetUserStateSummary gets the userStateSummary property value. The list of installation states for this eBook. +func (m *ManagedEBook) GetUserStateSummary()([]UserInstallStateSummaryable) { + return m.userStateSummary +} +// Serialize serializes information the current object +func (m *ManagedEBook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDeviceStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStates())) + for i, v := range m.GetDeviceStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("informationUrl", m.GetInformationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("installSummary", m.GetInstallSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("largeCover", m.GetLargeCover()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("privacyInformationUrl", m.GetPrivacyInformationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + if m.GetUserStateSummary() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStateSummary())) + for i, v := range m.GetUserStateSummary() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStateSummary", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of assignments for this eBook. +func (m *ManagedEBook) SetAssignments(value []ManagedEBookAssignmentable)() { + m.assignments = value +} +// SetCategories sets the categories property value. The list of categories for this eBook. +func (m *ManagedEBook) SetCategories(value []ManagedEBookCategoryable)() { + m.categories = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the eBook file was created. +func (m *ManagedEBook) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description. +func (m *ManagedEBook) SetDescription(value *string)() { + m.description = value +} +// SetDeviceStates sets the deviceStates property value. The list of installation states for this eBook. +func (m *ManagedEBook) SetDeviceStates(value []DeviceInstallStateable)() { + m.deviceStates = value +} +// SetDisplayName sets the displayName property value. Name of the eBook. +func (m *ManagedEBook) SetDisplayName(value *string)() { + m.displayName = value +} +// SetInformationUrl sets the informationUrl property value. The more information Url. +func (m *ManagedEBook) SetInformationUrl(value *string)() { + m.informationUrl = value +} +// SetInstallSummary sets the installSummary property value. Mobile App Install Summary. +func (m *ManagedEBook) SetInstallSummary(value EBookInstallSummaryable)() { + m.installSummary = value +} +// SetLargeCover sets the largeCover property value. Book cover. +func (m *ManagedEBook) SetLargeCover(value MimeContentable)() { + m.largeCover = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the eBook was last modified. +func (m *ManagedEBook) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPrivacyInformationUrl sets the privacyInformationUrl property value. The privacy statement Url. +func (m *ManagedEBook) SetPrivacyInformationUrl(value *string)() { + m.privacyInformationUrl = value +} +// SetPublishedDateTime sets the publishedDateTime property value. The date and time when the eBook was published. +func (m *ManagedEBook) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} +// SetPublisher sets the publisher property value. Publisher. +func (m *ManagedEBook) SetPublisher(value *string)() { + m.publisher = value +} +// SetUserStateSummary sets the userStateSummary property value. The list of installation states for this eBook. +func (m *ManagedEBook) SetUserStateSummary(value []UserInstallStateSummaryable)() { + m.userStateSummary = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_assignment.go b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment.go new file mode 100644 index 000000000..0f172b73e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookAssignment contains properties used to assign a eBook to a group. +type ManagedEBookAssignment struct { + Entity + // Possible values for the install intent chosen by the admin. + installIntent *InstallIntent + // The assignment target for eBook. + target DeviceAndAppManagementAssignmentTargetable +} +// NewManagedEBookAssignment instantiates a new managedEBookAssignment and sets the default values. +func NewManagedEBookAssignment()(*ManagedEBookAssignment) { + m := &ManagedEBookAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedEBookAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.iosVppEBookAssignment": + return NewIosVppEBookAssignment(), nil + } + } + } + } + return NewManagedEBookAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBookAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["installIntent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallIntent) + if err != nil { + return err + } + if val != nil { + m.SetInstallIntent(val.(*InstallIntent)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetInstallIntent gets the installIntent property value. Possible values for the install intent chosen by the admin. +func (m *ManagedEBookAssignment) GetInstallIntent()(*InstallIntent) { + return m.installIntent +} +// GetTarget gets the target property value. The assignment target for eBook. +func (m *ManagedEBookAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *ManagedEBookAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetInstallIntent() != nil { + cast := (*m.GetInstallIntent()).String() + err = writer.WriteStringValue("installIntent", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetInstallIntent sets the installIntent property value. Possible values for the install intent chosen by the admin. +func (m *ManagedEBookAssignment) SetInstallIntent(value *InstallIntent)() { + m.installIntent = value +} +// SetTarget sets the target property value. The assignment target for eBook. +func (m *ManagedEBookAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_response.go new file mode 100644 index 000000000..a9400d42a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookAssignmentCollectionResponse +type ManagedEBookAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedEBookAssignmentable +} +// NewManagedEBookAssignmentCollectionResponse instantiates a new ManagedEBookAssignmentCollectionResponse and sets the default values. +func NewManagedEBookAssignmentCollectionResponse()(*ManagedEBookAssignmentCollectionResponse) { + m := &ManagedEBookAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedEBookAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedEBookAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBookAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedEBookAssignmentCollectionResponse) GetValue()([]ManagedEBookAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedEBookAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedEBookAssignmentCollectionResponse) SetValue(value []ManagedEBookAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_responseable.go new file mode 100644 index 000000000..5097cabb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookAssignmentCollectionResponseable +type ManagedEBookAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedEBookAssignmentable) + SetValue(value []ManagedEBookAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_assignmentable.go b/src/internal/connector/graph/betasdk/models/managed_e_book_assignmentable.go new file mode 100644 index 000000000..b43753d58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_assignmentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookAssignmentable +type ManagedEBookAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInstallIntent()(*InstallIntent) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetInstallIntent(value *InstallIntent)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_category.go b/src/internal/connector/graph/betasdk/models/managed_e_book_category.go new file mode 100644 index 000000000..e06a9cd35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_category.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCategory contains properties for a single Intune eBook category. +type ManagedEBookCategory struct { + Entity + // The name of the eBook category. + displayName *string + // The date and time the ManagedEBookCategory was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewManagedEBookCategory instantiates a new managedEBookCategory and sets the default values. +func NewManagedEBookCategory()(*ManagedEBookCategory) { + m := &ManagedEBookCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedEBookCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedEBookCategory(), nil +} +// GetDisplayName gets the displayName property value. The name of the eBook category. +func (m *ManagedEBookCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBookCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the ManagedEBookCategory was last modified. +func (m *ManagedEBookCategory) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *ManagedEBookCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the eBook category. +func (m *ManagedEBookCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the ManagedEBookCategory was last modified. +func (m *ManagedEBookCategory) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_response.go new file mode 100644 index 000000000..517b74cfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCategoryCollectionResponse +type ManagedEBookCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedEBookCategoryable +} +// NewManagedEBookCategoryCollectionResponse instantiates a new ManagedEBookCategoryCollectionResponse and sets the default values. +func NewManagedEBookCategoryCollectionResponse()(*ManagedEBookCategoryCollectionResponse) { + m := &ManagedEBookCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedEBookCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedEBookCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBookCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedEBookCategoryCollectionResponse) GetValue()([]ManagedEBookCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedEBookCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedEBookCategoryCollectionResponse) SetValue(value []ManagedEBookCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_responseable.go new file mode 100644 index 000000000..f72abab4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCategoryCollectionResponseable +type ManagedEBookCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedEBookCategoryable) + SetValue(value []ManagedEBookCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_categoryable.go b/src/internal/connector/graph/betasdk/models/managed_e_book_categoryable.go new file mode 100644 index 000000000..4816cabb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_categoryable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCategoryable +type ManagedEBookCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_e_book_collection_response.go new file mode 100644 index 000000000..d937043f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCollectionResponse +type ManagedEBookCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedEBookable +} +// NewManagedEBookCollectionResponse instantiates a new ManagedEBookCollectionResponse and sets the default values. +func NewManagedEBookCollectionResponse()(*ManagedEBookCollectionResponse) { + m := &ManagedEBookCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedEBookCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedEBookCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedEBookCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedEBookCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedEBookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedEBookable, len(val)) + for i, v := range val { + res[i] = v.(ManagedEBookable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedEBookCollectionResponse) GetValue()([]ManagedEBookable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedEBookCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedEBookCollectionResponse) SetValue(value []ManagedEBookable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_book_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_e_book_collection_responseable.go new file mode 100644 index 000000000..35c898016 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_book_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookCollectionResponseable +type ManagedEBookCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedEBookable) + SetValue(value []ManagedEBookable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_e_bookable.go b/src/internal/connector/graph/betasdk/models/managed_e_bookable.go new file mode 100644 index 000000000..a1b9b7db3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_e_bookable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedEBookable +type ManagedEBookable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]ManagedEBookAssignmentable) + GetCategories()([]ManagedEBookCategoryable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDeviceStates()([]DeviceInstallStateable) + GetDisplayName()(*string) + GetInformationUrl()(*string) + GetInstallSummary()(EBookInstallSummaryable) + GetLargeCover()(MimeContentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPrivacyInformationUrl()(*string) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPublisher()(*string) + GetUserStateSummary()([]UserInstallStateSummaryable) + SetAssignments(value []ManagedEBookAssignmentable)() + SetCategories(value []ManagedEBookCategoryable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDeviceStates(value []DeviceInstallStateable)() + SetDisplayName(value *string)() + SetInformationUrl(value *string)() + SetInstallSummary(value EBookInstallSummaryable)() + SetLargeCover(value MimeContentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPrivacyInformationUrl(value *string)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPublisher(value *string)() + SetUserStateSummary(value []UserInstallStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app.go new file mode 100644 index 000000000..e1e75b015 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app.go @@ -0,0 +1,219 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSLobApp +type ManagedIOSLobApp struct { + ManagedMobileLobApp + // Contains properties of the possible iOS device types the mobile app can run on. + applicableDeviceType IosDeviceTypeable + // The build number of managed iOS Line of Business (LoB) app. + buildNumber *string + // The Identity Name. + bundleId *string + // The expiration time. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The identity version. + identityVersion *string + // The value for the minimum applicable operating system. + minimumSupportedOperatingSystem IosMinimumOperatingSystemable + // The version number of managed iOS Line of Business (LoB) app. + versionNumber *string +} +// NewManagedIOSLobApp instantiates a new ManagedIOSLobApp and sets the default values. +func NewManagedIOSLobApp()(*ManagedIOSLobApp) { + m := &ManagedIOSLobApp{ + ManagedMobileLobApp: *NewManagedMobileLobApp(), + } + odataTypeValue := "#microsoft.graph.managedIOSLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedIOSLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedIOSLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedIOSLobApp(), nil +} +// GetApplicableDeviceType gets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *ManagedIOSLobApp) GetApplicableDeviceType()(IosDeviceTypeable) { + return m.applicableDeviceType +} +// GetBuildNumber gets the buildNumber property value. The build number of managed iOS Line of Business (LoB) app. +func (m *ManagedIOSLobApp) GetBuildNumber()(*string) { + return m.buildNumber +} +// GetBundleId gets the bundleId property value. The Identity Name. +func (m *ManagedIOSLobApp) GetBundleId()(*string) { + return m.bundleId +} +// GetExpirationDateTime gets the expirationDateTime property value. The expiration time. +func (m *ManagedIOSLobApp) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedIOSLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedMobileLobApp.GetFieldDeserializers() + res["applicableDeviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicableDeviceType(val.(IosDeviceTypeable)) + } + return nil + } + res["buildNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuildNumber(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["identityVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityVersion(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(IosMinimumOperatingSystemable)) + } + return nil + } + res["versionNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionNumber(val) + } + return nil + } + return res +} +// GetIdentityVersion gets the identityVersion property value. The identity version. +func (m *ManagedIOSLobApp) GetIdentityVersion()(*string) { + return m.identityVersion +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *ManagedIOSLobApp) GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// GetVersionNumber gets the versionNumber property value. The version number of managed iOS Line of Business (LoB) app. +func (m *ManagedIOSLobApp) GetVersionNumber()(*string) { + return m.versionNumber +} +// Serialize serializes information the current object +func (m *ManagedIOSLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedMobileLobApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicableDeviceType", m.GetApplicableDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("buildNumber", m.GetBuildNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identityVersion", m.GetIdentityVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionNumber", m.GetVersionNumber()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableDeviceType sets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *ManagedIOSLobApp) SetApplicableDeviceType(value IosDeviceTypeable)() { + m.applicableDeviceType = value +} +// SetBuildNumber sets the buildNumber property value. The build number of managed iOS Line of Business (LoB) app. +func (m *ManagedIOSLobApp) SetBuildNumber(value *string)() { + m.buildNumber = value +} +// SetBundleId sets the bundleId property value. The Identity Name. +func (m *ManagedIOSLobApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetExpirationDateTime sets the expirationDateTime property value. The expiration time. +func (m *ManagedIOSLobApp) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIdentityVersion sets the identityVersion property value. The identity version. +func (m *ManagedIOSLobApp) SetIdentityVersion(value *string)() { + m.identityVersion = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. The value for the minimum applicable operating system. +func (m *ManagedIOSLobApp) SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} +// SetVersionNumber sets the versionNumber property value. The version number of managed iOS Line of Business (LoB) app. +func (m *ManagedIOSLobApp) SetVersionNumber(value *string)() { + m.versionNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_response.go new file mode 100644 index 000000000..04083f5ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSLobAppCollectionResponse +type ManagedIOSLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedIOSLobAppable +} +// NewManagedIOSLobAppCollectionResponse instantiates a new ManagedIOSLobAppCollectionResponse and sets the default values. +func NewManagedIOSLobAppCollectionResponse()(*ManagedIOSLobAppCollectionResponse) { + m := &ManagedIOSLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedIOSLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedIOSLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedIOSLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedIOSLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedIOSLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedIOSLobAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedIOSLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedIOSLobAppCollectionResponse) GetValue()([]ManagedIOSLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedIOSLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedIOSLobAppCollectionResponse) SetValue(value []ManagedIOSLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_responseable.go new file mode 100644 index 000000000..18b9cf5f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSLobAppCollectionResponseable +type ManagedIOSLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedIOSLobAppable) + SetValue(value []ManagedIOSLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_appable.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_appable.go new file mode 100644 index 000000000..ef3fa4378 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_lob_appable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSLobAppable +type ManagedIOSLobAppable interface { + ManagedMobileLobAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableDeviceType()(IosDeviceTypeable) + GetBuildNumber()(*string) + GetBundleId()(*string) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIdentityVersion()(*string) + GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) + GetVersionNumber()(*string) + SetApplicableDeviceType(value IosDeviceTypeable)() + SetBuildNumber(value *string)() + SetBundleId(value *string)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIdentityVersion(value *string)() + SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() + SetVersionNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app.go new file mode 100644 index 000000000..c25e7cec0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSStoreApp +type ManagedIOSStoreApp struct { + ManagedApp + // Contains properties of the possible iOS device types the mobile app can run on. + applicableDeviceType IosDeviceTypeable + // The Apple AppStoreUrl. + appStoreUrl *string + // The app's Bundle ID. + bundleId *string + // Contains properties of the minimum operating system required for an iOS mobile app. + minimumSupportedOperatingSystem IosMinimumOperatingSystemable +} +// NewManagedIOSStoreApp instantiates a new ManagedIOSStoreApp and sets the default values. +func NewManagedIOSStoreApp()(*ManagedIOSStoreApp) { + m := &ManagedIOSStoreApp{ + ManagedApp: *NewManagedApp(), + } + odataTypeValue := "#microsoft.graph.managedIOSStoreApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedIOSStoreAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedIOSStoreAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedIOSStoreApp(), nil +} +// GetApplicableDeviceType gets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *ManagedIOSStoreApp) GetApplicableDeviceType()(IosDeviceTypeable) { + return m.applicableDeviceType +} +// GetAppStoreUrl gets the appStoreUrl property value. The Apple AppStoreUrl. +func (m *ManagedIOSStoreApp) GetAppStoreUrl()(*string) { + return m.appStoreUrl +} +// GetBundleId gets the bundleId property value. The app's Bundle ID. +func (m *ManagedIOSStoreApp) GetBundleId()(*string) { + return m.bundleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedIOSStoreApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedApp.GetFieldDeserializers() + res["applicableDeviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplicableDeviceType(val.(IosDeviceTypeable)) + } + return nil + } + res["appStoreUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppStoreUrl(val) + } + return nil + } + res["bundleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBundleId(val) + } + return nil + } + res["minimumSupportedOperatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIosMinimumOperatingSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMinimumSupportedOperatingSystem(val.(IosMinimumOperatingSystemable)) + } + return nil + } + return res +} +// GetMinimumSupportedOperatingSystem gets the minimumSupportedOperatingSystem property value. Contains properties of the minimum operating system required for an iOS mobile app. +func (m *ManagedIOSStoreApp) GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) { + return m.minimumSupportedOperatingSystem +} +// Serialize serializes information the current object +func (m *ManagedIOSStoreApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("applicableDeviceType", m.GetApplicableDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appStoreUrl", m.GetAppStoreUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bundleId", m.GetBundleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("minimumSupportedOperatingSystem", m.GetMinimumSupportedOperatingSystem()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableDeviceType sets the applicableDeviceType property value. Contains properties of the possible iOS device types the mobile app can run on. +func (m *ManagedIOSStoreApp) SetApplicableDeviceType(value IosDeviceTypeable)() { + m.applicableDeviceType = value +} +// SetAppStoreUrl sets the appStoreUrl property value. The Apple AppStoreUrl. +func (m *ManagedIOSStoreApp) SetAppStoreUrl(value *string)() { + m.appStoreUrl = value +} +// SetBundleId sets the bundleId property value. The app's Bundle ID. +func (m *ManagedIOSStoreApp) SetBundleId(value *string)() { + m.bundleId = value +} +// SetMinimumSupportedOperatingSystem sets the minimumSupportedOperatingSystem property value. Contains properties of the minimum operating system required for an iOS mobile app. +func (m *ManagedIOSStoreApp) SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() { + m.minimumSupportedOperatingSystem = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_response.go new file mode 100644 index 000000000..4c4a77ecc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSStoreAppCollectionResponse +type ManagedIOSStoreAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedIOSStoreAppable +} +// NewManagedIOSStoreAppCollectionResponse instantiates a new ManagedIOSStoreAppCollectionResponse and sets the default values. +func NewManagedIOSStoreAppCollectionResponse()(*ManagedIOSStoreAppCollectionResponse) { + m := &ManagedIOSStoreAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedIOSStoreAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedIOSStoreAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedIOSStoreAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedIOSStoreAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedIOSStoreAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedIOSStoreAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedIOSStoreAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedIOSStoreAppCollectionResponse) GetValue()([]ManagedIOSStoreAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedIOSStoreAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedIOSStoreAppCollectionResponse) SetValue(value []ManagedIOSStoreAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_responseable.go new file mode 100644 index 000000000..3f93c3a59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSStoreAppCollectionResponseable +type ManagedIOSStoreAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedIOSStoreAppable) + SetValue(value []ManagedIOSStoreAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_appable.go b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_appable.go new file mode 100644 index 000000000..02a8e8fd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_i_o_s_store_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedIOSStoreAppable +type ManagedIOSStoreAppable interface { + ManagedAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableDeviceType()(IosDeviceTypeable) + GetAppStoreUrl()(*string) + GetBundleId()(*string) + GetMinimumSupportedOperatingSystem()(IosMinimumOperatingSystemable) + SetApplicableDeviceType(value IosDeviceTypeable)() + SetAppStoreUrl(value *string)() + SetBundleId(value *string)() + SetMinimumSupportedOperatingSystem(value IosMinimumOperatingSystemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_installer_status.go b/src/internal/connector/graph/betasdk/models/managed_installer_status.go new file mode 100644 index 000000000..c714df6ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_installer_status.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedInstallerStatus int + +const ( + // Managed Installer is Disabled + DISABLED_MANAGEDINSTALLERSTATUS ManagedInstallerStatus = iota + // Managed Installer is Enabled + ENABLED_MANAGEDINSTALLERSTATUS +) + +func (i ManagedInstallerStatus) String() string { + return []string{"disabled", "enabled"}[i] +} +func ParseManagedInstallerStatus(v string) (interface{}, error) { + result := DISABLED_MANAGEDINSTALLERSTATUS + switch v { + case "disabled": + result = DISABLED_MANAGEDINSTALLERSTATUS + case "enabled": + result = ENABLED_MANAGEDINSTALLERSTATUS + default: + return 0, errors.New("Unknown ManagedInstallerStatus value: " + v) + } + return &result, nil +} +func SerializeManagedInstallerStatus(values []ManagedInstallerStatus) []string { + 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/managed_mobile_app.go b/src/internal/connector/graph/betasdk/models/managed_mobile_app.go new file mode 100644 index 000000000..026614b76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_app.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileApp the identifier for the deployment an app. +type ManagedMobileApp struct { + Entity + // The identifier for an app with it's operating system type. + mobileAppIdentifier MobileAppIdentifierable + // Version of the entity. + version *string +} +// NewManagedMobileApp instantiates a new managedMobileApp and sets the default values. +func NewManagedMobileApp()(*ManagedMobileApp) { + m := &ManagedMobileApp{ + Entity: *NewEntity(), + } + return m +} +// CreateManagedMobileAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedMobileAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedMobileApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedMobileApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["mobileAppIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppIdentifierFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMobileAppIdentifier(val.(MobileAppIdentifierable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetMobileAppIdentifier gets the mobileAppIdentifier property value. The identifier for an app with it's operating system type. +func (m *ManagedMobileApp) GetMobileAppIdentifier()(MobileAppIdentifierable) { + return m.mobileAppIdentifier +} +// GetVersion gets the version property value. Version of the entity. +func (m *ManagedMobileApp) GetVersion()(*string) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagedMobileApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("mobileAppIdentifier", m.GetMobileAppIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + return nil +} +// SetMobileAppIdentifier sets the mobileAppIdentifier property value. The identifier for an app with it's operating system type. +func (m *ManagedMobileApp) SetMobileAppIdentifier(value MobileAppIdentifierable)() { + m.mobileAppIdentifier = value +} +// SetVersion sets the version property value. Version of the entity. +func (m *ManagedMobileApp) SetVersion(value *string)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_response.go new file mode 100644 index 000000000..1363b273c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileAppCollectionResponse +type ManagedMobileAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedMobileAppable +} +// NewManagedMobileAppCollectionResponse instantiates a new ManagedMobileAppCollectionResponse and sets the default values. +func NewManagedMobileAppCollectionResponse()(*ManagedMobileAppCollectionResponse) { + m := &ManagedMobileAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedMobileAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedMobileAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedMobileAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedMobileAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedMobileAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedMobileAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedMobileAppCollectionResponse) GetValue()([]ManagedMobileAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedMobileAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedMobileAppCollectionResponse) SetValue(value []ManagedMobileAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_responseable.go new file mode 100644 index 000000000..94789b331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileAppCollectionResponseable +type ManagedMobileAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedMobileAppable) + SetValue(value []ManagedMobileAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_appable.go b/src/internal/connector/graph/betasdk/models/managed_mobile_appable.go new file mode 100644 index 000000000..4a11920f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_appable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileAppable +type ManagedMobileAppable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMobileAppIdentifier()(MobileAppIdentifierable) + GetVersion()(*string) + SetMobileAppIdentifier(value MobileAppIdentifierable)() + SetVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app.go b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app.go new file mode 100644 index 000000000..64c1b7a89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileLobApp +type ManagedMobileLobApp struct { + ManagedApp + // The internal committed content version. + committedContentVersion *string + // The list of content versions for this app. + contentVersions []MobileAppContentable + // The name of the main Lob application file. + fileName *string + // The total size, including all uploaded files. + size *int64 +} +// NewManagedMobileLobApp instantiates a new ManagedMobileLobApp and sets the default values. +func NewManagedMobileLobApp()(*ManagedMobileLobApp) { + m := &ManagedMobileLobApp{ + ManagedApp: *NewManagedApp(), + } + odataTypeValue := "#microsoft.graph.managedMobileLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateManagedMobileLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedMobileLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.managedAndroidLobApp": + return NewManagedAndroidLobApp(), nil + case "#microsoft.graph.managedIOSLobApp": + return NewManagedIOSLobApp(), nil + } + } + } + } + return NewManagedMobileLobApp(), nil +} +// GetCommittedContentVersion gets the committedContentVersion property value. The internal committed content version. +func (m *ManagedMobileLobApp) GetCommittedContentVersion()(*string) { + return m.committedContentVersion +} +// GetContentVersions gets the contentVersions property value. The list of content versions for this app. +func (m *ManagedMobileLobApp) GetContentVersions()([]MobileAppContentable) { + return m.contentVersions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedMobileLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ManagedApp.GetFieldDeserializers() + res["committedContentVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommittedContentVersion(val) + } + return nil + } + res["contentVersions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppContentable) + } + m.SetContentVersions(res) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. The name of the main Lob application file. +func (m *ManagedMobileLobApp) GetFileName()(*string) { + return m.fileName +} +// GetSize gets the size property value. The total size, including all uploaded files. +func (m *ManagedMobileLobApp) GetSize()(*int64) { + return m.size +} +// Serialize serializes information the current object +func (m *ManagedMobileLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ManagedApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("committedContentVersion", m.GetCommittedContentVersion()) + if err != nil { + return err + } + } + if m.GetContentVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentVersions())) + for i, v := range m.GetContentVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentVersions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetCommittedContentVersion sets the committedContentVersion property value. The internal committed content version. +func (m *ManagedMobileLobApp) SetCommittedContentVersion(value *string)() { + m.committedContentVersion = value +} +// SetContentVersions sets the contentVersions property value. The list of content versions for this app. +func (m *ManagedMobileLobApp) SetContentVersions(value []MobileAppContentable)() { + m.contentVersions = value +} +// SetFileName sets the fileName property value. The name of the main Lob application file. +func (m *ManagedMobileLobApp) SetFileName(value *string)() { + m.fileName = value +} +// SetSize sets the size property value. The total size, including all uploaded files. +func (m *ManagedMobileLobApp) SetSize(value *int64)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_response.go new file mode 100644 index 000000000..a1091f279 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileLobAppCollectionResponse +type ManagedMobileLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagedMobileLobAppable +} +// NewManagedMobileLobAppCollectionResponse instantiates a new ManagedMobileLobAppCollectionResponse and sets the default values. +func NewManagedMobileLobAppCollectionResponse()(*ManagedMobileLobAppCollectionResponse) { + m := &ManagedMobileLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedMobileLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedMobileLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedMobileLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedMobileLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedMobileLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedMobileLobAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedMobileLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedMobileLobAppCollectionResponse) GetValue()([]ManagedMobileLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedMobileLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedMobileLobAppCollectionResponse) SetValue(value []ManagedMobileLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_responseable.go new file mode 100644 index 000000000..0aa3b03ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileLobAppCollectionResponseable +type ManagedMobileLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedMobileLobAppable) + SetValue(value []ManagedMobileLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managed_mobile_lob_appable.go b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_appable.go new file mode 100644 index 000000000..1c76b1303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managed_mobile_lob_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagedMobileLobAppable +type ManagedMobileLobAppable interface { + ManagedAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommittedContentVersion()(*string) + GetContentVersions()([]MobileAppContentable) + GetFileName()(*string) + GetSize()(*int64) + SetCommittedContentVersion(value *string)() + SetContentVersions(value []MobileAppContentable)() + SetFileName(value *string)() + SetSize(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance.go b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance.go new file mode 100644 index 000000000..448f2f5ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance.go @@ -0,0 +1,322 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AggregatedPolicyCompliance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AggregatedPolicyCompliance struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Identifier for the device compliance policy. Optional. Read-only. + compliancePolicyId *string + // Name of the device compliance policy. Optional. Read-only. + compliancePolicyName *string + // Platform for the device compliance policy. Possible values are: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, androidAOSP, all. Optional. Read-only. + compliancePolicyPlatform *string + // The type of compliance policy. Optional. Read-only. + compliancePolicyType *string + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of devices that are in a compliant status. Optional. Read-only. + numberOfCompliantDevices *int64 + // The number of devices that are in an error status. Optional. Read-only. + numberOfErrorDevices *int64 + // The number of device that are in a non-compliant status. Optional. Read-only. + numberOfNonCompliantDevices *int64 + // The date and time the device policy was last modified. Optional. Read-only. + policyModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string +} +// NewAggregatedPolicyCompliance instantiates a new aggregatedPolicyCompliance and sets the default values. +func NewAggregatedPolicyCompliance()(*AggregatedPolicyCompliance) { + m := &AggregatedPolicyCompliance{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateAggregatedPolicyComplianceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAggregatedPolicyComplianceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAggregatedPolicyCompliance(), nil +} +// GetCompliancePolicyId gets the compliancePolicyId property value. Identifier for the device compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetCompliancePolicyId()(*string) { + return m.compliancePolicyId +} +// GetCompliancePolicyName gets the compliancePolicyName property value. Name of the device compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetCompliancePolicyName()(*string) { + return m.compliancePolicyName +} +// GetCompliancePolicyPlatform gets the compliancePolicyPlatform property value. Platform for the device compliance policy. Possible values are: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, androidAOSP, all. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetCompliancePolicyPlatform()(*string) { + return m.compliancePolicyPlatform +} +// GetCompliancePolicyType gets the compliancePolicyType property value. The type of compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetCompliancePolicyType()(*string) { + return m.compliancePolicyType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AggregatedPolicyCompliance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliancePolicyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompliancePolicyId(val) + } + return nil + } + res["compliancePolicyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompliancePolicyName(val) + } + return nil + } + res["compliancePolicyPlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompliancePolicyPlatform(val) + } + return nil + } + res["compliancePolicyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompliancePolicyType(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["numberOfCompliantDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCompliantDevices(val) + } + return nil + } + res["numberOfErrorDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfErrorDevices(val) + } + return nil + } + res["numberOfNonCompliantDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfNonCompliantDevices(val) + } + return nil + } + res["policyModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyModifiedDateTime(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetNumberOfCompliantDevices gets the numberOfCompliantDevices property value. The number of devices that are in a compliant status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetNumberOfCompliantDevices()(*int64) { + return m.numberOfCompliantDevices +} +// GetNumberOfErrorDevices gets the numberOfErrorDevices property value. The number of devices that are in an error status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetNumberOfErrorDevices()(*int64) { + return m.numberOfErrorDevices +} +// GetNumberOfNonCompliantDevices gets the numberOfNonCompliantDevices property value. The number of device that are in a non-compliant status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetNumberOfNonCompliantDevices()(*int64) { + return m.numberOfNonCompliantDevices +} +// GetPolicyModifiedDateTime gets the policyModifiedDateTime property value. The date and time the device policy was last modified. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetPolicyModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.policyModifiedDateTime +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *AggregatedPolicyCompliance) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *AggregatedPolicyCompliance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("compliancePolicyId", m.GetCompliancePolicyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("compliancePolicyName", m.GetCompliancePolicyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("compliancePolicyPlatform", m.GetCompliancePolicyPlatform()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("compliancePolicyType", m.GetCompliancePolicyType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("numberOfCompliantDevices", m.GetNumberOfCompliantDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("numberOfErrorDevices", m.GetNumberOfErrorDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("numberOfNonCompliantDevices", m.GetNumberOfNonCompliantDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("policyModifiedDateTime", m.GetPolicyModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetCompliancePolicyId sets the compliancePolicyId property value. Identifier for the device compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetCompliancePolicyId(value *string)() { + m.compliancePolicyId = value +} +// SetCompliancePolicyName sets the compliancePolicyName property value. Name of the device compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetCompliancePolicyName(value *string)() { + m.compliancePolicyName = value +} +// SetCompliancePolicyPlatform sets the compliancePolicyPlatform property value. Platform for the device compliance policy. Possible values are: android, androidForWork, iOS, macOS, windowsPhone81, windows81AndLater, windows10AndLater, androidWorkProfile, androidAOSP, all. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetCompliancePolicyPlatform(value *string)() { + m.compliancePolicyPlatform = value +} +// SetCompliancePolicyType sets the compliancePolicyType property value. The type of compliance policy. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetCompliancePolicyType(value *string)() { + m.compliancePolicyType = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetNumberOfCompliantDevices sets the numberOfCompliantDevices property value. The number of devices that are in a compliant status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetNumberOfCompliantDevices(value *int64)() { + m.numberOfCompliantDevices = value +} +// SetNumberOfErrorDevices sets the numberOfErrorDevices property value. The number of devices that are in an error status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetNumberOfErrorDevices(value *int64)() { + m.numberOfErrorDevices = value +} +// SetNumberOfNonCompliantDevices sets the numberOfNonCompliantDevices property value. The number of device that are in a non-compliant status. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetNumberOfNonCompliantDevices(value *int64)() { + m.numberOfNonCompliantDevices = value +} +// SetPolicyModifiedDateTime sets the policyModifiedDateTime property value. The date and time the device policy was last modified. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetPolicyModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.policyModifiedDateTime = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *AggregatedPolicyCompliance) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_response.go new file mode 100644 index 000000000..3a6c777e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AggregatedPolicyComplianceCollectionResponse +type AggregatedPolicyComplianceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AggregatedPolicyComplianceable +} +// NewAggregatedPolicyComplianceCollectionResponse instantiates a new AggregatedPolicyComplianceCollectionResponse and sets the default values. +func NewAggregatedPolicyComplianceCollectionResponse()(*AggregatedPolicyComplianceCollectionResponse) { + m := &AggregatedPolicyComplianceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAggregatedPolicyComplianceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAggregatedPolicyComplianceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAggregatedPolicyComplianceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AggregatedPolicyComplianceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAggregatedPolicyComplianceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AggregatedPolicyComplianceable, len(val)) + for i, v := range val { + res[i] = v.(AggregatedPolicyComplianceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AggregatedPolicyComplianceCollectionResponse) GetValue()([]AggregatedPolicyComplianceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AggregatedPolicyComplianceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AggregatedPolicyComplianceCollectionResponse) SetValue(value []AggregatedPolicyComplianceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_responseable.go new file mode 100644 index 000000000..e9ee61091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_compliance_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AggregatedPolicyComplianceCollectionResponseable +type AggregatedPolicyComplianceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AggregatedPolicyComplianceable) + SetValue(value []AggregatedPolicyComplianceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_complianceable.go b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_complianceable.go new file mode 100644 index 000000000..308e730ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/aggregated_policy_complianceable.go @@ -0,0 +1,35 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AggregatedPolicyComplianceable +type AggregatedPolicyComplianceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliancePolicyId()(*string) + GetCompliancePolicyName()(*string) + GetCompliancePolicyPlatform()(*string) + GetCompliancePolicyType()(*string) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumberOfCompliantDevices()(*int64) + GetNumberOfErrorDevices()(*int64) + GetNumberOfNonCompliantDevices()(*int64) + GetPolicyModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetCompliancePolicyId(value *string)() + SetCompliancePolicyName(value *string)() + SetCompliancePolicyPlatform(value *string)() + SetCompliancePolicyType(value *string)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumberOfCompliantDevices(value *int64)() + SetNumberOfErrorDevices(value *int64)() + SetNumberOfNonCompliantDevices(value *int64)() + SetPolicyModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_data.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data.go new file mode 100644 index 000000000..4c9ae561c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertData +type AlertData 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 displayName property + displayName *string + // The OdataType property + odataType *string +} +// NewAlertData instantiates a new alertData and sets the default values. +func NewAlertData()(*AlertData) { + m := &AlertData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertData(), 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 *AlertData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *AlertData) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertData) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *AlertData) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertData) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string.go new file mode 100644 index 000000000..991e9e118 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDataReferenceString +type AlertDataReferenceString 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 displayName property + displayName *string + // The OdataType property + odataType *string +} +// NewAlertDataReferenceString instantiates a new alertDataReferenceString and sets the default values. +func NewAlertDataReferenceString()(*AlertDataReferenceString) { + m := &AlertDataReferenceString{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertDataReferenceStringFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertDataReferenceStringFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertDataReferenceString(), 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 *AlertDataReferenceString) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *AlertDataReferenceString) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertDataReferenceString) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertDataReferenceString) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertDataReferenceString) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertDataReferenceString) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *AlertDataReferenceString) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertDataReferenceString) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_response.go new file mode 100644 index 000000000..c56094563 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertDataReferenceStringCollectionResponse +type AlertDataReferenceStringCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AlertDataReferenceStringable +} +// NewAlertDataReferenceStringCollectionResponse instantiates a new AlertDataReferenceStringCollectionResponse and sets the default values. +func NewAlertDataReferenceStringCollectionResponse()(*AlertDataReferenceStringCollectionResponse) { + m := &AlertDataReferenceStringCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertDataReferenceStringCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertDataReferenceStringCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertDataReferenceStringCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertDataReferenceStringCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertDataReferenceStringFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertDataReferenceStringable, len(val)) + for i, v := range val { + res[i] = v.(AlertDataReferenceStringable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertDataReferenceStringCollectionResponse) GetValue()([]AlertDataReferenceStringable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertDataReferenceStringCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertDataReferenceStringCollectionResponse) SetValue(value []AlertDataReferenceStringable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_responseable.go new file mode 100644 index 000000000..ab0f81c61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_string_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertDataReferenceStringCollectionResponseable +type AlertDataReferenceStringCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertDataReferenceStringable) + SetValue(value []AlertDataReferenceStringable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_stringable.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_stringable.go new file mode 100644 index 000000000..1e1505a21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_data_reference_stringable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDataReferenceStringable +type AlertDataReferenceStringable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_dataable.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_dataable.go new file mode 100644 index 000000000..3465fb88f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_dataable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertDataable +type AlertDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_content.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_content.go new file mode 100644 index 000000000..d178e5cc6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_content.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertLogContent +type AlertLogContent 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 displayName property + displayName *string + // The OdataType property + odataType *string +} +// NewAlertLogContent instantiates a new alertLogContent and sets the default values. +func NewAlertLogContent()(*AlertLogContent) { + m := &AlertLogContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertLogContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertLogContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertLogContent(), 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 *AlertLogContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *AlertLogContent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertLogContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertLogContent) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertLogContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertLogContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *AlertLogContent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertLogContent) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_contentable.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_contentable.go new file mode 100644 index 000000000..054ac218d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_log_contentable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertLogContentable +type AlertLogContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_template.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_template.go new file mode 100644 index 000000000..bd70f27da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_template.go @@ -0,0 +1,98 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertRuleDefinitionTemplate +type AlertRuleDefinitionTemplate 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 defaultSeverity property + defaultSeverity *AlertSeverity + // The OdataType property + odataType *string +} +// NewAlertRuleDefinitionTemplate instantiates a new alertRuleDefinitionTemplate and sets the default values. +func NewAlertRuleDefinitionTemplate()(*AlertRuleDefinitionTemplate) { + m := &AlertRuleDefinitionTemplate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertRuleDefinitionTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertRuleDefinitionTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertRuleDefinitionTemplate(), 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 *AlertRuleDefinitionTemplate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultSeverity gets the defaultSeverity property value. The defaultSeverity property +func (m *AlertRuleDefinitionTemplate) GetDefaultSeverity()(*AlertSeverity) { + return m.defaultSeverity +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertRuleDefinitionTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetDefaultSeverity(val.(*AlertSeverity)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertRuleDefinitionTemplate) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertRuleDefinitionTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDefaultSeverity() != nil { + cast := (*m.GetDefaultSeverity()).String() + err := writer.WriteStringValue("defaultSeverity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertRuleDefinitionTemplate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultSeverity sets the defaultSeverity property value. The defaultSeverity property +func (m *AlertRuleDefinitionTemplate) SetDefaultSeverity(value *AlertSeverity)() { + m.defaultSeverity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertRuleDefinitionTemplate) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_templateable.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_templateable.go new file mode 100644 index 000000000..b989d33b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_rule_definition_templateable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertRuleDefinitionTemplateable +type AlertRuleDefinitionTemplateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultSeverity()(*AlertSeverity) + GetOdataType()(*string) + SetDefaultSeverity(value *AlertSeverity)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/alert_severity.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_severity.go new file mode 100644 index 000000000..e22e5c781 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_severity.go @@ -0,0 +1,46 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertSeverity int + +const ( + UNKNOWN_ALERTSEVERITY AlertSeverity = iota + INFORMATIONAL_ALERTSEVERITY + LOW_ALERTSEVERITY + MEDIUM_ALERTSEVERITY + HIGH_ALERTSEVERITY + UNKNOWNFUTUREVALUE_ALERTSEVERITY +) + +func (i AlertSeverity) String() string { + return []string{"unknown", "informational", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParseAlertSeverity(v string) (interface{}, error) { + result := UNKNOWN_ALERTSEVERITY + switch v { + case "unknown": + result = UNKNOWN_ALERTSEVERITY + case "informational": + result = INFORMATIONAL_ALERTSEVERITY + case "low": + result = LOW_ALERTSEVERITY + case "medium": + result = MEDIUM_ALERTSEVERITY + case "high": + result = HIGH_ALERTSEVERITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSEVERITY + default: + return 0, errors.New("Unknown AlertSeverity value: " + v) + } + return &result, nil +} +func SerializeAlertSeverity(values []AlertSeverity) []string { + 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/managedtenants/alert_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/alert_status.go new file mode 100644 index 000000000..868f97471 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/alert_status.go @@ -0,0 +1,46 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertStatus int + +const ( + UNKNOWN_ALERTSTATUS AlertStatus = iota + NEWALERT_ALERTSTATUS + INPROGRESS_ALERTSTATUS + RESOLVED_ALERTSTATUS + DISMISSED_ALERTSTATUS + UNKNOWNFUTUREVALUE_ALERTSTATUS +) + +func (i AlertStatus) String() string { + return []string{"unknown", "newAlert", "inProgress", "resolved", "dismissed", "unknownFutureValue"}[i] +} +func ParseAlertStatus(v string) (interface{}, error) { + result := UNKNOWN_ALERTSTATUS + switch v { + case "unknown": + result = UNKNOWN_ALERTSTATUS + case "newAlert": + result = NEWALERT_ALERTSTATUS + case "inProgress": + result = INPROGRESS_ALERTSTATUS + case "resolved": + result = RESOLVED_ALERTSTATUS + case "dismissed": + result = DISMISSED_ALERTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSTATUS + default: + return 0, errors.New("Unknown AlertStatus value: " + v) + } + return &result, nil +} +func SerializeAlertStatus(values []AlertStatus) []string { + 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/managedtenants/audit_event.go b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event.go new file mode 100644 index 000000000..e0acd8e48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event.go @@ -0,0 +1,374 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AuditEvent provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AuditEvent struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // A string which uniquely represents the operation that occurred. Required. Read-only. + activity *string + // The time when the activity ocurred. Required. Read-only. + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The identifier of the activity request that made the audit event. Required. Read-only. + activityId *string + // A category which represents a logical grouping of activities. Required. Read-only. + category *string + // The HTTP verb that was used when making the API request. Required. Read-only. + httpVerb *string + // The identifier of the app that was used to make the request. Required. Read-only. + initiatedByAppId *string + // The UPN of the user who initiated the activity. Required. Read-only. + initiatedByUpn *string + // The identifier of the user who initiated the activity. Required. Read-only. + initiatedByUserId *string + // The IP address of where the activity was initiated. This may be an IPv4 or IPv6 address. Required. Read-only. + ipAddress *string + // The raw HTTP request body. Some sensitive information may be removed. + requestBody *string + // The raw HTTP request URL. Required. Read-only. + requestUrl *string + // The collection of Azure Active Directory tenant identifiers for the managed tenants that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. + tenantIds *string + // The collection of tenant names that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. + tenantNames *string +} +// NewAuditEvent instantiates a new auditEvent and sets the default values. +func NewAuditEvent()(*AuditEvent) { + m := &AuditEvent{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateAuditEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditEvent(), nil +} +// GetActivity gets the activity property value. A string which uniquely represents the operation that occurred. Required. Read-only. +func (m *AuditEvent) GetActivity()(*string) { + return m.activity +} +// GetActivityDateTime gets the activityDateTime property value. The time when the activity ocurred. Required. Read-only. +func (m *AuditEvent) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetActivityId gets the activityId property value. The identifier of the activity request that made the audit event. Required. Read-only. +func (m *AuditEvent) GetActivityId()(*string) { + return m.activityId +} +// GetCategory gets the category property value. A category which represents a logical grouping of activities. Required. Read-only. +func (m *AuditEvent) GetCategory()(*string) { + return m.category +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivity(val) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["activityId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityId(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["httpVerb"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHttpVerb(val) + } + return nil + } + res["initiatedByAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedByAppId(val) + } + return nil + } + res["initiatedByUpn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedByUpn(val) + } + return nil + } + res["initiatedByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedByUserId(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(val) + } + return nil + } + res["requestBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestBody(val) + } + return nil + } + res["requestUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestUrl(val) + } + return nil + } + res["tenantIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantIds(val) + } + return nil + } + res["tenantNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantNames(val) + } + return nil + } + return res +} +// GetHttpVerb gets the httpVerb property value. The HTTP verb that was used when making the API request. Required. Read-only. +func (m *AuditEvent) GetHttpVerb()(*string) { + return m.httpVerb +} +// GetInitiatedByAppId gets the initiatedByAppId property value. The identifier of the app that was used to make the request. Required. Read-only. +func (m *AuditEvent) GetInitiatedByAppId()(*string) { + return m.initiatedByAppId +} +// GetInitiatedByUpn gets the initiatedByUpn property value. The UPN of the user who initiated the activity. Required. Read-only. +func (m *AuditEvent) GetInitiatedByUpn()(*string) { + return m.initiatedByUpn +} +// GetInitiatedByUserId gets the initiatedByUserId property value. The identifier of the user who initiated the activity. Required. Read-only. +func (m *AuditEvent) GetInitiatedByUserId()(*string) { + return m.initiatedByUserId +} +// GetIpAddress gets the ipAddress property value. The IP address of where the activity was initiated. This may be an IPv4 or IPv6 address. Required. Read-only. +func (m *AuditEvent) GetIpAddress()(*string) { + return m.ipAddress +} +// GetRequestBody gets the requestBody property value. The raw HTTP request body. Some sensitive information may be removed. +func (m *AuditEvent) GetRequestBody()(*string) { + return m.requestBody +} +// GetRequestUrl gets the requestUrl property value. The raw HTTP request URL. Required. Read-only. +func (m *AuditEvent) GetRequestUrl()(*string) { + return m.requestUrl +} +// GetTenantIds gets the tenantIds property value. The collection of Azure Active Directory tenant identifiers for the managed tenants that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. +func (m *AuditEvent) GetTenantIds()(*string) { + return m.tenantIds +} +// GetTenantNames gets the tenantNames property value. The collection of tenant names that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. +func (m *AuditEvent) GetTenantNames()(*string) { + return m.tenantNames +} +// Serialize serializes information the current object +func (m *AuditEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("activityId", m.GetActivityId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("httpVerb", m.GetHttpVerb()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedByAppId", m.GetInitiatedByAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedByUpn", m.GetInitiatedByUpn()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedByUserId", m.GetInitiatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestBody", m.GetRequestBody()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestUrl", m.GetRequestUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantIds", m.GetTenantIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantNames", m.GetTenantNames()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. A string which uniquely represents the operation that occurred. Required. Read-only. +func (m *AuditEvent) SetActivity(value *string)() { + m.activity = value +} +// SetActivityDateTime sets the activityDateTime property value. The time when the activity ocurred. Required. Read-only. +func (m *AuditEvent) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetActivityId sets the activityId property value. The identifier of the activity request that made the audit event. Required. Read-only. +func (m *AuditEvent) SetActivityId(value *string)() { + m.activityId = value +} +// SetCategory sets the category property value. A category which represents a logical grouping of activities. Required. Read-only. +func (m *AuditEvent) SetCategory(value *string)() { + m.category = value +} +// SetHttpVerb sets the httpVerb property value. The HTTP verb that was used when making the API request. Required. Read-only. +func (m *AuditEvent) SetHttpVerb(value *string)() { + m.httpVerb = value +} +// SetInitiatedByAppId sets the initiatedByAppId property value. The identifier of the app that was used to make the request. Required. Read-only. +func (m *AuditEvent) SetInitiatedByAppId(value *string)() { + m.initiatedByAppId = value +} +// SetInitiatedByUpn sets the initiatedByUpn property value. The UPN of the user who initiated the activity. Required. Read-only. +func (m *AuditEvent) SetInitiatedByUpn(value *string)() { + m.initiatedByUpn = value +} +// SetInitiatedByUserId sets the initiatedByUserId property value. The identifier of the user who initiated the activity. Required. Read-only. +func (m *AuditEvent) SetInitiatedByUserId(value *string)() { + m.initiatedByUserId = value +} +// SetIpAddress sets the ipAddress property value. The IP address of where the activity was initiated. This may be an IPv4 or IPv6 address. Required. Read-only. +func (m *AuditEvent) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetRequestBody sets the requestBody property value. The raw HTTP request body. Some sensitive information may be removed. +func (m *AuditEvent) SetRequestBody(value *string)() { + m.requestBody = value +} +// SetRequestUrl sets the requestUrl property value. The raw HTTP request URL. Required. Read-only. +func (m *AuditEvent) SetRequestUrl(value *string)() { + m.requestUrl = value +} +// SetTenantIds sets the tenantIds property value. The collection of Azure Active Directory tenant identifiers for the managed tenants that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. +func (m *AuditEvent) SetTenantIds(value *string)() { + m.tenantIds = value +} +// SetTenantNames sets the tenantNames property value. The collection of tenant names that were impacted by this change. This is formatted as a list of comma-separated values. Required. Read-only. +func (m *AuditEvent) SetTenantNames(value *string)() { + m.tenantNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_response.go new file mode 100644 index 000000000..b3ebc34e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AuditEventCollectionResponse +type AuditEventCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AuditEventable +} +// NewAuditEventCollectionResponse instantiates a new AuditEventCollectionResponse and sets the default values. +func NewAuditEventCollectionResponse()(*AuditEventCollectionResponse) { + m := &AuditEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAuditEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAuditEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAuditEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AuditEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditEventable, len(val)) + for i, v := range val { + res[i] = v.(AuditEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AuditEventCollectionResponse) GetValue()([]AuditEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *AuditEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AuditEventCollectionResponse) SetValue(value []AuditEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_responseable.go new file mode 100644 index 000000000..4e3526a8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/audit_event_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AuditEventCollectionResponseable +type AuditEventCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AuditEventable) + SetValue(value []AuditEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/audit_eventable.go b/src/internal/connector/graph/betasdk/models/managedtenants/audit_eventable.go new file mode 100644 index 000000000..cc18b5d95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/audit_eventable.go @@ -0,0 +1,39 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AuditEventable +type AuditEventable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*string) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetActivityId()(*string) + GetCategory()(*string) + GetHttpVerb()(*string) + GetInitiatedByAppId()(*string) + GetInitiatedByUpn()(*string) + GetInitiatedByUserId()(*string) + GetIpAddress()(*string) + GetRequestBody()(*string) + GetRequestUrl()(*string) + GetTenantIds()(*string) + GetTenantNames()(*string) + SetActivity(value *string)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetActivityId(value *string)() + SetCategory(value *string)() + SetHttpVerb(value *string)() + SetInitiatedByAppId(value *string)() + SetInitiatedByUpn(value *string)() + SetInitiatedByUserId(value *string)() + SetIpAddress(value *string)() + SetRequestBody(value *string)() + SetRequestUrl(value *string)() + SetTenantIds(value *string)() + SetTenantNames(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection.go new file mode 100644 index 000000000..c4e558ecc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection.go @@ -0,0 +1,166 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcConnection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcConnection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The display name of the cloud PC connection. Required. Read-only. + displayName *string + // The health status of the cloud PC connection. Possible values are: pending, running, passed, failed, unknownFutureValue. Required. Read-only. + healthCheckStatus *string + // Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name for the managed tenant. Required. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. + tenantId *string +} +// NewCloudPcConnection instantiates a new cloudPcConnection and sets the default values. +func NewCloudPcConnection()(*CloudPcConnection) { + m := &CloudPcConnection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCloudPcConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcConnection(), nil +} +// GetDisplayName gets the displayName property value. The display name of the cloud PC connection. Required. Read-only. +func (m *CloudPcConnection) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["healthCheckStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHealthCheckStatus(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetHealthCheckStatus gets the healthCheckStatus property value. The health status of the cloud PC connection. Possible values are: pending, running, passed, failed, unknownFutureValue. Required. Read-only. +func (m *CloudPcConnection) GetHealthCheckStatus()(*string) { + return m.healthCheckStatus +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. +func (m *CloudPcConnection) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CloudPcConnection) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CloudPcConnection) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *CloudPcConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("healthCheckStatus", m.GetHealthCheckStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the cloud PC connection. Required. Read-only. +func (m *CloudPcConnection) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHealthCheckStatus sets the healthCheckStatus property value. The health status of the cloud PC connection. Possible values are: pending, running, passed, failed, unknownFutureValue. Required. Read-only. +func (m *CloudPcConnection) SetHealthCheckStatus(value *string)() { + m.healthCheckStatus = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. +func (m *CloudPcConnection) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CloudPcConnection) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CloudPcConnection) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_response.go new file mode 100644 index 000000000..fc9381252 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcConnectionCollectionResponse +type CloudPcConnectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CloudPcConnectionable +} +// NewCloudPcConnectionCollectionResponse instantiates a new CloudPcConnectionCollectionResponse and sets the default values. +func NewCloudPcConnectionCollectionResponse()(*CloudPcConnectionCollectionResponse) { + m := &CloudPcConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcConnectionable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcConnectionCollectionResponse) GetValue()([]CloudPcConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcConnectionCollectionResponse) SetValue(value []CloudPcConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_responseable.go new file mode 100644 index 000000000..89eb1f413 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connection_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcConnectionCollectionResponseable +type CloudPcConnectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcConnectionable) + SetValue(value []CloudPcConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connectionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connectionable.go new file mode 100644 index 000000000..8ce1e2313 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_connectionable.go @@ -0,0 +1,23 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcConnectionable +type CloudPcConnectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetHealthCheckStatus()(*string) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetDisplayName(value *string)() + SetHealthCheckStatus(value *string)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device.go new file mode 100644 index 000000000..965e9cf41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device.go @@ -0,0 +1,348 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcDevice provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcDevice struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The status of the cloud PC. Possible values are: notProvisioned, provisioning, provisioned, upgrading, inGracePeriod, deprovisioning, failed. Required. Read-only. + cloudPcStatus *string + // The specification of the cloud PC device. Required. Read-only. + deviceSpecification *string + // The display name of the cloud PC device. Required. Read-only. + displayName *string + // Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managed device identifier of the cloud PC device. Optional. Read-only. + managedDeviceId *string + // The managed device display name of the cloud PC device. Optional. Read-only. + managedDeviceName *string + // The provisioning policy identifier for the cloud PC device. Required. Read-only. + provisioningPolicyId *string + // The service plan name of the cloud PC device. Required. Read-only. + servicePlanName *string + // The service plan type of the cloud PC device. Required. Read-only. + servicePlanType *string + // The display name for the managed tenant. Required. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. + tenantId *string + // The user principal name (UPN) of the user assigned to the cloud PC device. Required. Read-only. + userPrincipalName *string +} +// NewCloudPcDevice instantiates a new cloudPcDevice and sets the default values. +func NewCloudPcDevice()(*CloudPcDevice) { + m := &CloudPcDevice{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCloudPcDeviceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDeviceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDevice(), nil +} +// GetCloudPcStatus gets the cloudPcStatus property value. The status of the cloud PC. Possible values are: notProvisioned, provisioning, provisioned, upgrading, inGracePeriod, deprovisioning, failed. Required. Read-only. +func (m *CloudPcDevice) GetCloudPcStatus()(*string) { + return m.cloudPcStatus +} +// GetDeviceSpecification gets the deviceSpecification property value. The specification of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetDeviceSpecification()(*string) { + return m.deviceSpecification +} +// GetDisplayName gets the displayName property value. The display name of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDevice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["cloudPcStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudPcStatus(val) + } + return nil + } + res["deviceSpecification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceSpecification(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["provisioningPolicyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningPolicyId(val) + } + return nil + } + res["servicePlanName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanName(val) + } + return nil + } + res["servicePlanType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanType(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. +func (m *CloudPcDevice) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. The managed device identifier of the cloud PC device. Optional. Read-only. +func (m *CloudPcDevice) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagedDeviceName gets the managedDeviceName property value. The managed device display name of the cloud PC device. Optional. Read-only. +func (m *CloudPcDevice) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetProvisioningPolicyId gets the provisioningPolicyId property value. The provisioning policy identifier for the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetProvisioningPolicyId()(*string) { + return m.provisioningPolicyId +} +// GetServicePlanName gets the servicePlanName property value. The service plan name of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetServicePlanName()(*string) { + return m.servicePlanName +} +// GetServicePlanType gets the servicePlanType property value. The service plan type of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetServicePlanType()(*string) { + return m.servicePlanType +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CloudPcDevice) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CloudPcDevice) GetTenantId()(*string) { + return m.tenantId +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user assigned to the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *CloudPcDevice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("cloudPcStatus", m.GetCloudPcStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceSpecification", m.GetDeviceSpecification()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("provisioningPolicyId", m.GetProvisioningPolicyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePlanName", m.GetServicePlanName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePlanType", m.GetServicePlanType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetCloudPcStatus sets the cloudPcStatus property value. The status of the cloud PC. Possible values are: notProvisioned, provisioning, provisioned, upgrading, inGracePeriod, deprovisioning, failed. Required. Read-only. +func (m *CloudPcDevice) SetCloudPcStatus(value *string)() { + m.cloudPcStatus = value +} +// SetDeviceSpecification sets the deviceSpecification property value. The specification of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetDeviceSpecification(value *string)() { + m.deviceSpecification = value +} +// SetDisplayName sets the displayName property value. The display name of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Required. Read-only. +func (m *CloudPcDevice) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The managed device identifier of the cloud PC device. Optional. Read-only. +func (m *CloudPcDevice) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagedDeviceName sets the managedDeviceName property value. The managed device display name of the cloud PC device. Optional. Read-only. +func (m *CloudPcDevice) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetProvisioningPolicyId sets the provisioningPolicyId property value. The provisioning policy identifier for the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetProvisioningPolicyId(value *string)() { + m.provisioningPolicyId = value +} +// SetServicePlanName sets the servicePlanName property value. The service plan name of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetServicePlanName(value *string)() { + m.servicePlanName = value +} +// SetServicePlanType sets the servicePlanType property value. The service plan type of the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetServicePlanType(value *string)() { + m.servicePlanType = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CloudPcDevice) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CloudPcDevice) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the user assigned to the cloud PC device. Required. Read-only. +func (m *CloudPcDevice) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_response.go new file mode 100644 index 000000000..486e0ae0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcDeviceCollectionResponse +type CloudPcDeviceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CloudPcDeviceable +} +// NewCloudPcDeviceCollectionResponse instantiates a new CloudPcDeviceCollectionResponse and sets the default values. +func NewCloudPcDeviceCollectionResponse()(*CloudPcDeviceCollectionResponse) { + m := &CloudPcDeviceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcDeviceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcDeviceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcDeviceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcDeviceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcDeviceable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcDeviceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcDeviceCollectionResponse) GetValue()([]CloudPcDeviceable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcDeviceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcDeviceCollectionResponse) SetValue(value []CloudPcDeviceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_responseable.go new file mode 100644 index 000000000..5cc703422 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_device_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcDeviceCollectionResponseable +type CloudPcDeviceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcDeviceable) + SetValue(value []CloudPcDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_deviceable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_deviceable.go new file mode 100644 index 000000000..93d5a4316 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_deviceable.go @@ -0,0 +1,37 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcDeviceable +type CloudPcDeviceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudPcStatus()(*string) + GetDeviceSpecification()(*string) + GetDisplayName()(*string) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetManagedDeviceName()(*string) + GetProvisioningPolicyId()(*string) + GetServicePlanName()(*string) + GetServicePlanType()(*string) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + GetUserPrincipalName()(*string) + SetCloudPcStatus(value *string)() + SetDeviceSpecification(value *string)() + SetDisplayName(value *string)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetManagedDeviceName(value *string)() + SetProvisioningPolicyId(value *string)() + SetServicePlanName(value *string)() + SetServicePlanType(value *string)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview.go new file mode 100644 index 000000000..cefc16fd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview.go @@ -0,0 +1,556 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcOverview provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CloudPcOverview struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of cloud PC connections that have a status of failed. Optional. Read-only. + numberOfCloudPcConnectionStatusFailed *int32 + // The number of cloud PC connections that have a status of passed. Optional. Read-only. + numberOfCloudPcConnectionStatusPassed *int32 + // The number of cloud PC connections that have a status of pending. Optional. Read-only. + numberOfCloudPcConnectionStatusPending *int32 + // The number of cloud PC connections that have a status of running. Optional. Read-only. + numberOfCloudPcConnectionStatusRunning *int32 + // The number of cloud PC connections that have a status of unknownFutureValue. Optional. Read-only. + numberOfCloudPcConnectionStatusUnkownFutureValue *int32 + // The number of cloud PCs that have a status of deprovisioning. Optional. Read-only. + numberOfCloudPcStatusDeprovisioning *int32 + // The number of cloud PCs that have a status of failed. Optional. Read-only. + numberOfCloudPcStatusFailed *int32 + // The number of cloud PCs that have a status of inGracePeriod. Optional. Read-only. + numberOfCloudPcStatusInGracePeriod *int32 + // The number of cloud PCs that have a status of notProvisioned. Optional. Read-only. + numberOfCloudPcStatusNotProvisioned *int32 + // The number of cloud PCs that have a status of provisioned. Optional. Read-only. + numberOfCloudPcStatusProvisioned *int32 + // The number of cloud PCs that have a status of provisioning. Optional. Read-only. + numberOfCloudPcStatusProvisioning *int32 + // The number of cloud PCs that have a status of unknown. Optional. Read-only. + numberOfCloudPcStatusUnknown *int32 + // The number of cloud PCs that have a status of upgrading. Optional. Read-only. + numberOfCloudPcStatusUpgrading *int32 + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The tenantId property + tenantId *string + // The total number of cloud PC devices that have the Business SKU. Optional. Read-only. + totalBusinessLicenses *int32 + // The total number of cloud PC connection statuses for the given managed tenant. Optional. Read-only. + totalCloudPcConnectionStatus *int32 + // The total number of cloud PC statues for the given managed tenant. Optional. Read-only. + totalCloudPcStatus *int32 + // The total number of cloud PC devices that have the Enterprise SKU. Optional. Read-only. + totalEnterpriseLicenses *int32 +} +// NewCloudPcOverview instantiates a new cloudPcOverview and sets the default values. +func NewCloudPcOverview()(*CloudPcOverview) { + m := &CloudPcOverview{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCloudPcOverviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOverviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOverview(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOverview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["numberOfCloudPcConnectionStatusFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcConnectionStatusFailed(val) + } + return nil + } + res["numberOfCloudPcConnectionStatusPassed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcConnectionStatusPassed(val) + } + return nil + } + res["numberOfCloudPcConnectionStatusPending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcConnectionStatusPending(val) + } + return nil + } + res["numberOfCloudPcConnectionStatusRunning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcConnectionStatusRunning(val) + } + return nil + } + res["numberOfCloudPcConnectionStatusUnkownFutureValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcConnectionStatusUnkownFutureValue(val) + } + return nil + } + res["numberOfCloudPcStatusDeprovisioning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusDeprovisioning(val) + } + return nil + } + res["numberOfCloudPcStatusFailed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusFailed(val) + } + return nil + } + res["numberOfCloudPcStatusInGracePeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusInGracePeriod(val) + } + return nil + } + res["numberOfCloudPcStatusNotProvisioned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusNotProvisioned(val) + } + return nil + } + res["numberOfCloudPcStatusProvisioned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusProvisioned(val) + } + return nil + } + res["numberOfCloudPcStatusProvisioning"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusProvisioning(val) + } + return nil + } + res["numberOfCloudPcStatusUnknown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusUnknown(val) + } + return nil + } + res["numberOfCloudPcStatusUpgrading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfCloudPcStatusUpgrading(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["totalBusinessLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalBusinessLicenses(val) + } + return nil + } + res["totalCloudPcConnectionStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCloudPcConnectionStatus(val) + } + return nil + } + res["totalCloudPcStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalCloudPcStatus(val) + } + return nil + } + res["totalEnterpriseLicenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalEnterpriseLicenses(val) + } + return nil + } + return res +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *CloudPcOverview) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetNumberOfCloudPcConnectionStatusFailed gets the numberOfCloudPcConnectionStatusFailed property value. The number of cloud PC connections that have a status of failed. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcConnectionStatusFailed()(*int32) { + return m.numberOfCloudPcConnectionStatusFailed +} +// GetNumberOfCloudPcConnectionStatusPassed gets the numberOfCloudPcConnectionStatusPassed property value. The number of cloud PC connections that have a status of passed. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcConnectionStatusPassed()(*int32) { + return m.numberOfCloudPcConnectionStatusPassed +} +// GetNumberOfCloudPcConnectionStatusPending gets the numberOfCloudPcConnectionStatusPending property value. The number of cloud PC connections that have a status of pending. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcConnectionStatusPending()(*int32) { + return m.numberOfCloudPcConnectionStatusPending +} +// GetNumberOfCloudPcConnectionStatusRunning gets the numberOfCloudPcConnectionStatusRunning property value. The number of cloud PC connections that have a status of running. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcConnectionStatusRunning()(*int32) { + return m.numberOfCloudPcConnectionStatusRunning +} +// GetNumberOfCloudPcConnectionStatusUnkownFutureValue gets the numberOfCloudPcConnectionStatusUnkownFutureValue property value. The number of cloud PC connections that have a status of unknownFutureValue. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcConnectionStatusUnkownFutureValue()(*int32) { + return m.numberOfCloudPcConnectionStatusUnkownFutureValue +} +// GetNumberOfCloudPcStatusDeprovisioning gets the numberOfCloudPcStatusDeprovisioning property value. The number of cloud PCs that have a status of deprovisioning. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusDeprovisioning()(*int32) { + return m.numberOfCloudPcStatusDeprovisioning +} +// GetNumberOfCloudPcStatusFailed gets the numberOfCloudPcStatusFailed property value. The number of cloud PCs that have a status of failed. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusFailed()(*int32) { + return m.numberOfCloudPcStatusFailed +} +// GetNumberOfCloudPcStatusInGracePeriod gets the numberOfCloudPcStatusInGracePeriod property value. The number of cloud PCs that have a status of inGracePeriod. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusInGracePeriod()(*int32) { + return m.numberOfCloudPcStatusInGracePeriod +} +// GetNumberOfCloudPcStatusNotProvisioned gets the numberOfCloudPcStatusNotProvisioned property value. The number of cloud PCs that have a status of notProvisioned. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusNotProvisioned()(*int32) { + return m.numberOfCloudPcStatusNotProvisioned +} +// GetNumberOfCloudPcStatusProvisioned gets the numberOfCloudPcStatusProvisioned property value. The number of cloud PCs that have a status of provisioned. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusProvisioned()(*int32) { + return m.numberOfCloudPcStatusProvisioned +} +// GetNumberOfCloudPcStatusProvisioning gets the numberOfCloudPcStatusProvisioning property value. The number of cloud PCs that have a status of provisioning. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusProvisioning()(*int32) { + return m.numberOfCloudPcStatusProvisioning +} +// GetNumberOfCloudPcStatusUnknown gets the numberOfCloudPcStatusUnknown property value. The number of cloud PCs that have a status of unknown. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusUnknown()(*int32) { + return m.numberOfCloudPcStatusUnknown +} +// GetNumberOfCloudPcStatusUpgrading gets the numberOfCloudPcStatusUpgrading property value. The number of cloud PCs that have a status of upgrading. Optional. Read-only. +func (m *CloudPcOverview) GetNumberOfCloudPcStatusUpgrading()(*int32) { + return m.numberOfCloudPcStatusUpgrading +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *CloudPcOverview) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *CloudPcOverview) GetTenantId()(*string) { + return m.tenantId +} +// GetTotalBusinessLicenses gets the totalBusinessLicenses property value. The total number of cloud PC devices that have the Business SKU. Optional. Read-only. +func (m *CloudPcOverview) GetTotalBusinessLicenses()(*int32) { + return m.totalBusinessLicenses +} +// GetTotalCloudPcConnectionStatus gets the totalCloudPcConnectionStatus property value. The total number of cloud PC connection statuses for the given managed tenant. Optional. Read-only. +func (m *CloudPcOverview) GetTotalCloudPcConnectionStatus()(*int32) { + return m.totalCloudPcConnectionStatus +} +// GetTotalCloudPcStatus gets the totalCloudPcStatus property value. The total number of cloud PC statues for the given managed tenant. Optional. Read-only. +func (m *CloudPcOverview) GetTotalCloudPcStatus()(*int32) { + return m.totalCloudPcStatus +} +// GetTotalEnterpriseLicenses gets the totalEnterpriseLicenses property value. The total number of cloud PC devices that have the Enterprise SKU. Optional. Read-only. +func (m *CloudPcOverview) GetTotalEnterpriseLicenses()(*int32) { + return m.totalEnterpriseLicenses +} +// Serialize serializes information the current object +func (m *CloudPcOverview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcConnectionStatusFailed", m.GetNumberOfCloudPcConnectionStatusFailed()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcConnectionStatusPassed", m.GetNumberOfCloudPcConnectionStatusPassed()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcConnectionStatusPending", m.GetNumberOfCloudPcConnectionStatusPending()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcConnectionStatusRunning", m.GetNumberOfCloudPcConnectionStatusRunning()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcConnectionStatusUnkownFutureValue", m.GetNumberOfCloudPcConnectionStatusUnkownFutureValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusDeprovisioning", m.GetNumberOfCloudPcStatusDeprovisioning()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusFailed", m.GetNumberOfCloudPcStatusFailed()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusInGracePeriod", m.GetNumberOfCloudPcStatusInGracePeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusNotProvisioned", m.GetNumberOfCloudPcStatusNotProvisioned()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusProvisioned", m.GetNumberOfCloudPcStatusProvisioned()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusProvisioning", m.GetNumberOfCloudPcStatusProvisioning()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusUnknown", m.GetNumberOfCloudPcStatusUnknown()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("numberOfCloudPcStatusUpgrading", m.GetNumberOfCloudPcStatusUpgrading()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalBusinessLicenses", m.GetTotalBusinessLicenses()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalCloudPcConnectionStatus", m.GetTotalCloudPcConnectionStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalCloudPcStatus", m.GetTotalCloudPcStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalEnterpriseLicenses", m.GetTotalEnterpriseLicenses()) + if err != nil { + return err + } + } + return nil +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *CloudPcOverview) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetNumberOfCloudPcConnectionStatusFailed sets the numberOfCloudPcConnectionStatusFailed property value. The number of cloud PC connections that have a status of failed. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcConnectionStatusFailed(value *int32)() { + m.numberOfCloudPcConnectionStatusFailed = value +} +// SetNumberOfCloudPcConnectionStatusPassed sets the numberOfCloudPcConnectionStatusPassed property value. The number of cloud PC connections that have a status of passed. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcConnectionStatusPassed(value *int32)() { + m.numberOfCloudPcConnectionStatusPassed = value +} +// SetNumberOfCloudPcConnectionStatusPending sets the numberOfCloudPcConnectionStatusPending property value. The number of cloud PC connections that have a status of pending. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcConnectionStatusPending(value *int32)() { + m.numberOfCloudPcConnectionStatusPending = value +} +// SetNumberOfCloudPcConnectionStatusRunning sets the numberOfCloudPcConnectionStatusRunning property value. The number of cloud PC connections that have a status of running. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcConnectionStatusRunning(value *int32)() { + m.numberOfCloudPcConnectionStatusRunning = value +} +// SetNumberOfCloudPcConnectionStatusUnkownFutureValue sets the numberOfCloudPcConnectionStatusUnkownFutureValue property value. The number of cloud PC connections that have a status of unknownFutureValue. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcConnectionStatusUnkownFutureValue(value *int32)() { + m.numberOfCloudPcConnectionStatusUnkownFutureValue = value +} +// SetNumberOfCloudPcStatusDeprovisioning sets the numberOfCloudPcStatusDeprovisioning property value. The number of cloud PCs that have a status of deprovisioning. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusDeprovisioning(value *int32)() { + m.numberOfCloudPcStatusDeprovisioning = value +} +// SetNumberOfCloudPcStatusFailed sets the numberOfCloudPcStatusFailed property value. The number of cloud PCs that have a status of failed. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusFailed(value *int32)() { + m.numberOfCloudPcStatusFailed = value +} +// SetNumberOfCloudPcStatusInGracePeriod sets the numberOfCloudPcStatusInGracePeriod property value. The number of cloud PCs that have a status of inGracePeriod. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusInGracePeriod(value *int32)() { + m.numberOfCloudPcStatusInGracePeriod = value +} +// SetNumberOfCloudPcStatusNotProvisioned sets the numberOfCloudPcStatusNotProvisioned property value. The number of cloud PCs that have a status of notProvisioned. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusNotProvisioned(value *int32)() { + m.numberOfCloudPcStatusNotProvisioned = value +} +// SetNumberOfCloudPcStatusProvisioned sets the numberOfCloudPcStatusProvisioned property value. The number of cloud PCs that have a status of provisioned. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusProvisioned(value *int32)() { + m.numberOfCloudPcStatusProvisioned = value +} +// SetNumberOfCloudPcStatusProvisioning sets the numberOfCloudPcStatusProvisioning property value. The number of cloud PCs that have a status of provisioning. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusProvisioning(value *int32)() { + m.numberOfCloudPcStatusProvisioning = value +} +// SetNumberOfCloudPcStatusUnknown sets the numberOfCloudPcStatusUnknown property value. The number of cloud PCs that have a status of unknown. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusUnknown(value *int32)() { + m.numberOfCloudPcStatusUnknown = value +} +// SetNumberOfCloudPcStatusUpgrading sets the numberOfCloudPcStatusUpgrading property value. The number of cloud PCs that have a status of upgrading. Optional. Read-only. +func (m *CloudPcOverview) SetNumberOfCloudPcStatusUpgrading(value *int32)() { + m.numberOfCloudPcStatusUpgrading = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *CloudPcOverview) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *CloudPcOverview) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTotalBusinessLicenses sets the totalBusinessLicenses property value. The total number of cloud PC devices that have the Business SKU. Optional. Read-only. +func (m *CloudPcOverview) SetTotalBusinessLicenses(value *int32)() { + m.totalBusinessLicenses = value +} +// SetTotalCloudPcConnectionStatus sets the totalCloudPcConnectionStatus property value. The total number of cloud PC connection statuses for the given managed tenant. Optional. Read-only. +func (m *CloudPcOverview) SetTotalCloudPcConnectionStatus(value *int32)() { + m.totalCloudPcConnectionStatus = value +} +// SetTotalCloudPcStatus sets the totalCloudPcStatus property value. The total number of cloud PC statues for the given managed tenant. Optional. Read-only. +func (m *CloudPcOverview) SetTotalCloudPcStatus(value *int32)() { + m.totalCloudPcStatus = value +} +// SetTotalEnterpriseLicenses sets the totalEnterpriseLicenses property value. The total number of cloud PC devices that have the Enterprise SKU. Optional. Read-only. +func (m *CloudPcOverview) SetTotalEnterpriseLicenses(value *int32)() { + m.totalEnterpriseLicenses = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_response.go new file mode 100644 index 000000000..0c87ee6a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcOverviewCollectionResponse +type CloudPcOverviewCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CloudPcOverviewable +} +// NewCloudPcOverviewCollectionResponse instantiates a new CloudPcOverviewCollectionResponse and sets the default values. +func NewCloudPcOverviewCollectionResponse()(*CloudPcOverviewCollectionResponse) { + m := &CloudPcOverviewCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCloudPcOverviewCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudPcOverviewCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudPcOverviewCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudPcOverviewCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOverviewable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcOverviewable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CloudPcOverviewCollectionResponse) GetValue()([]CloudPcOverviewable) { + return m.value +} +// Serialize serializes information the current object +func (m *CloudPcOverviewCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CloudPcOverviewCollectionResponse) SetValue(value []CloudPcOverviewable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_responseable.go new file mode 100644 index 000000000..92936932c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overview_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcOverviewCollectionResponseable +type CloudPcOverviewCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CloudPcOverviewable) + SetValue(value []CloudPcOverviewable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overviewable.go b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overviewable.go new file mode 100644 index 000000000..2af4cb7e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/cloud_pc_overviewable.go @@ -0,0 +1,53 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CloudPcOverviewable +type CloudPcOverviewable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumberOfCloudPcConnectionStatusFailed()(*int32) + GetNumberOfCloudPcConnectionStatusPassed()(*int32) + GetNumberOfCloudPcConnectionStatusPending()(*int32) + GetNumberOfCloudPcConnectionStatusRunning()(*int32) + GetNumberOfCloudPcConnectionStatusUnkownFutureValue()(*int32) + GetNumberOfCloudPcStatusDeprovisioning()(*int32) + GetNumberOfCloudPcStatusFailed()(*int32) + GetNumberOfCloudPcStatusInGracePeriod()(*int32) + GetNumberOfCloudPcStatusNotProvisioned()(*int32) + GetNumberOfCloudPcStatusProvisioned()(*int32) + GetNumberOfCloudPcStatusProvisioning()(*int32) + GetNumberOfCloudPcStatusUnknown()(*int32) + GetNumberOfCloudPcStatusUpgrading()(*int32) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + GetTotalBusinessLicenses()(*int32) + GetTotalCloudPcConnectionStatus()(*int32) + GetTotalCloudPcStatus()(*int32) + GetTotalEnterpriseLicenses()(*int32) + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumberOfCloudPcConnectionStatusFailed(value *int32)() + SetNumberOfCloudPcConnectionStatusPassed(value *int32)() + SetNumberOfCloudPcConnectionStatusPending(value *int32)() + SetNumberOfCloudPcConnectionStatusRunning(value *int32)() + SetNumberOfCloudPcConnectionStatusUnkownFutureValue(value *int32)() + SetNumberOfCloudPcStatusDeprovisioning(value *int32)() + SetNumberOfCloudPcStatusFailed(value *int32)() + SetNumberOfCloudPcStatusInGracePeriod(value *int32)() + SetNumberOfCloudPcStatusNotProvisioned(value *int32)() + SetNumberOfCloudPcStatusProvisioned(value *int32)() + SetNumberOfCloudPcStatusProvisioning(value *int32)() + SetNumberOfCloudPcStatusUnknown(value *int32)() + SetNumberOfCloudPcStatusUpgrading(value *int32)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() + SetTotalBusinessLicenses(value *int32)() + SetTotalCloudPcConnectionStatus(value *int32)() + SetTotalCloudPcStatus(value *int32)() + SetTotalEnterpriseLicenses(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage.go b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage.go new file mode 100644 index 000000000..2254bc751 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage.go @@ -0,0 +1,140 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConditionalAccessPolicyCoverage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ConditionalAccessPolicyCoverage struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The state for the conditional access policy. Possible values are: enabled, disabled, enabledForReportingButNotEnforced. Required. Read-only. + conditionalAccessPolicyState *string + // The date and time the conditional access policy was last modified. Required. Read-only. + latestPolicyModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A flag indicating whether the conditional access policy requires device compliance. Required. Read-only. + requiresDeviceCompliance *bool + // The display name for the managed tenant. Required. Read-only. + tenantDisplayName *string +} +// NewConditionalAccessPolicyCoverage instantiates a new conditionalAccessPolicyCoverage and sets the default values. +func NewConditionalAccessPolicyCoverage()(*ConditionalAccessPolicyCoverage) { + m := &ConditionalAccessPolicyCoverage{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateConditionalAccessPolicyCoverageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPolicyCoverageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPolicyCoverage(), nil +} +// GetConditionalAccessPolicyState gets the conditionalAccessPolicyState property value. The state for the conditional access policy. Possible values are: enabled, disabled, enabledForReportingButNotEnforced. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) GetConditionalAccessPolicyState()(*string) { + return m.conditionalAccessPolicyState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPolicyCoverage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conditionalAccessPolicyState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConditionalAccessPolicyState(val) + } + return nil + } + res["latestPolicyModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLatestPolicyModifiedDateTime(val) + } + return nil + } + res["requiresDeviceCompliance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRequiresDeviceCompliance(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + return res +} +// GetLatestPolicyModifiedDateTime gets the latestPolicyModifiedDateTime property value. The date and time the conditional access policy was last modified. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) GetLatestPolicyModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.latestPolicyModifiedDateTime +} +// GetRequiresDeviceCompliance gets the requiresDeviceCompliance property value. A flag indicating whether the conditional access policy requires device compliance. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) GetRequiresDeviceCompliance()(*bool) { + return m.requiresDeviceCompliance +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// Serialize serializes information the current object +func (m *ConditionalAccessPolicyCoverage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("conditionalAccessPolicyState", m.GetConditionalAccessPolicyState()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("latestPolicyModifiedDateTime", m.GetLatestPolicyModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("requiresDeviceCompliance", m.GetRequiresDeviceCompliance()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetConditionalAccessPolicyState sets the conditionalAccessPolicyState property value. The state for the conditional access policy. Possible values are: enabled, disabled, enabledForReportingButNotEnforced. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) SetConditionalAccessPolicyState(value *string)() { + m.conditionalAccessPolicyState = value +} +// SetLatestPolicyModifiedDateTime sets the latestPolicyModifiedDateTime property value. The date and time the conditional access policy was last modified. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) SetLatestPolicyModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.latestPolicyModifiedDateTime = value +} +// SetRequiresDeviceCompliance sets the requiresDeviceCompliance property value. A flag indicating whether the conditional access policy requires device compliance. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) SetRequiresDeviceCompliance(value *bool)() { + m.requiresDeviceCompliance = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *ConditionalAccessPolicyCoverage) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_response.go new file mode 100644 index 000000000..aa09b1074 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConditionalAccessPolicyCoverageCollectionResponse +type ConditionalAccessPolicyCoverageCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ConditionalAccessPolicyCoverageable +} +// NewConditionalAccessPolicyCoverageCollectionResponse instantiates a new ConditionalAccessPolicyCoverageCollectionResponse and sets the default values. +func NewConditionalAccessPolicyCoverageCollectionResponse()(*ConditionalAccessPolicyCoverageCollectionResponse) { + m := &ConditionalAccessPolicyCoverageCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateConditionalAccessPolicyCoverageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateConditionalAccessPolicyCoverageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewConditionalAccessPolicyCoverageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ConditionalAccessPolicyCoverageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessPolicyCoverageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessPolicyCoverageable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessPolicyCoverageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ConditionalAccessPolicyCoverageCollectionResponse) GetValue()([]ConditionalAccessPolicyCoverageable) { + return m.value +} +// Serialize serializes information the current object +func (m *ConditionalAccessPolicyCoverageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ConditionalAccessPolicyCoverageCollectionResponse) SetValue(value []ConditionalAccessPolicyCoverageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_responseable.go new file mode 100644 index 000000000..00535a40f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverage_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConditionalAccessPolicyCoverageCollectionResponseable +type ConditionalAccessPolicyCoverageCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ConditionalAccessPolicyCoverageable) + SetValue(value []ConditionalAccessPolicyCoverageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverageable.go b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverageable.go new file mode 100644 index 000000000..b46fb7a78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/conditional_access_policy_coverageable.go @@ -0,0 +1,21 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ConditionalAccessPolicyCoverageable +type ConditionalAccessPolicyCoverageable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConditionalAccessPolicyState()(*string) + GetLatestPolicyModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRequiresDeviceCompliance()(*bool) + GetTenantDisplayName()(*string) + SetConditionalAccessPolicyState(value *string)() + SetLatestPolicyModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRequiresDeviceCompliance(value *bool)() + SetTenantDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary.go b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary.go new file mode 100644 index 000000000..1f3068584 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary.go @@ -0,0 +1,322 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CredentialUserRegistrationsSummary provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CredentialUserRegistrationsSummary struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of users that are capable of performing multi-factor authentication or self service password reset. Optional. Read-only. + mfaAndSsprCapableUserCount *int32 + // The state of a conditional access policy that enforces multi-factor authentication. Optional. Read-only. + mfaConditionalAccessPolicyState *string + // The number of users in the multi-factor authentication exclusion security group (Microsoft 365 Lighthouse - MFA exclusions). Optional. Read-only. + mfaExcludedUserCount *int32 + // The number of users registered for multi-factor authentication. Optional. Read-only. + mfaRegisteredUserCount *int32 + // A flag indicating whether Identity Security Defaults is enabled. Optional. Read-only. + securityDefaultsEnabled *bool + // The number of users enabled for self service password reset. Optional. Read-only. + ssprEnabledUserCount *int32 + // The number of users registered for self service password reset. Optional. Read-only. + ssprRegisteredUserCount *int32 + // The display name for the managed tenant. Required. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. + tenantId *string + // The total number of users in the given managed tenant. Optional. Read-only. + totalUserCount *int32 +} +// NewCredentialUserRegistrationsSummary instantiates a new credentialUserRegistrationsSummary and sets the default values. +func NewCredentialUserRegistrationsSummary()(*CredentialUserRegistrationsSummary) { + m := &CredentialUserRegistrationsSummary{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCredentialUserRegistrationsSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUserRegistrationsSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUserRegistrationsSummary(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUserRegistrationsSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["mfaAndSsprCapableUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMfaAndSsprCapableUserCount(val) + } + return nil + } + res["mfaConditionalAccessPolicyState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMfaConditionalAccessPolicyState(val) + } + return nil + } + res["mfaExcludedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMfaExcludedUserCount(val) + } + return nil + } + res["mfaRegisteredUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMfaRegisteredUserCount(val) + } + return nil + } + res["securityDefaultsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityDefaultsEnabled(val) + } + return nil + } + res["ssprEnabledUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSsprEnabledUserCount(val) + } + return nil + } + res["ssprRegisteredUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSsprRegisteredUserCount(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["totalUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalUserCount(val) + } + return nil + } + return res +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetMfaAndSsprCapableUserCount gets the mfaAndSsprCapableUserCount property value. The number of users that are capable of performing multi-factor authentication or self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetMfaAndSsprCapableUserCount()(*int32) { + return m.mfaAndSsprCapableUserCount +} +// GetMfaConditionalAccessPolicyState gets the mfaConditionalAccessPolicyState property value. The state of a conditional access policy that enforces multi-factor authentication. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetMfaConditionalAccessPolicyState()(*string) { + return m.mfaConditionalAccessPolicyState +} +// GetMfaExcludedUserCount gets the mfaExcludedUserCount property value. The number of users in the multi-factor authentication exclusion security group (Microsoft 365 Lighthouse - MFA exclusions). Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetMfaExcludedUserCount()(*int32) { + return m.mfaExcludedUserCount +} +// GetMfaRegisteredUserCount gets the mfaRegisteredUserCount property value. The number of users registered for multi-factor authentication. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetMfaRegisteredUserCount()(*int32) { + return m.mfaRegisteredUserCount +} +// GetSecurityDefaultsEnabled gets the securityDefaultsEnabled property value. A flag indicating whether Identity Security Defaults is enabled. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetSecurityDefaultsEnabled()(*bool) { + return m.securityDefaultsEnabled +} +// GetSsprEnabledUserCount gets the ssprEnabledUserCount property value. The number of users enabled for self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetSsprEnabledUserCount()(*int32) { + return m.ssprEnabledUserCount +} +// GetSsprRegisteredUserCount gets the ssprRegisteredUserCount property value. The number of users registered for self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetSsprRegisteredUserCount()(*int32) { + return m.ssprRegisteredUserCount +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CredentialUserRegistrationsSummary) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CredentialUserRegistrationsSummary) GetTenantId()(*string) { + return m.tenantId +} +// GetTotalUserCount gets the totalUserCount property value. The total number of users in the given managed tenant. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) GetTotalUserCount()(*int32) { + return m.totalUserCount +} +// Serialize serializes information the current object +func (m *CredentialUserRegistrationsSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mfaAndSsprCapableUserCount", m.GetMfaAndSsprCapableUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mfaConditionalAccessPolicyState", m.GetMfaConditionalAccessPolicyState()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mfaExcludedUserCount", m.GetMfaExcludedUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mfaRegisteredUserCount", m.GetMfaRegisteredUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("securityDefaultsEnabled", m.GetSecurityDefaultsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ssprEnabledUserCount", m.GetSsprEnabledUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ssprRegisteredUserCount", m.GetSsprRegisteredUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalUserCount", m.GetTotalUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetMfaAndSsprCapableUserCount sets the mfaAndSsprCapableUserCount property value. The number of users that are capable of performing multi-factor authentication or self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetMfaAndSsprCapableUserCount(value *int32)() { + m.mfaAndSsprCapableUserCount = value +} +// SetMfaConditionalAccessPolicyState sets the mfaConditionalAccessPolicyState property value. The state of a conditional access policy that enforces multi-factor authentication. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetMfaConditionalAccessPolicyState(value *string)() { + m.mfaConditionalAccessPolicyState = value +} +// SetMfaExcludedUserCount sets the mfaExcludedUserCount property value. The number of users in the multi-factor authentication exclusion security group (Microsoft 365 Lighthouse - MFA exclusions). Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetMfaExcludedUserCount(value *int32)() { + m.mfaExcludedUserCount = value +} +// SetMfaRegisteredUserCount sets the mfaRegisteredUserCount property value. The number of users registered for multi-factor authentication. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetMfaRegisteredUserCount(value *int32)() { + m.mfaRegisteredUserCount = value +} +// SetSecurityDefaultsEnabled sets the securityDefaultsEnabled property value. A flag indicating whether Identity Security Defaults is enabled. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetSecurityDefaultsEnabled(value *bool)() { + m.securityDefaultsEnabled = value +} +// SetSsprEnabledUserCount sets the ssprEnabledUserCount property value. The number of users enabled for self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetSsprEnabledUserCount(value *int32)() { + m.ssprEnabledUserCount = value +} +// SetSsprRegisteredUserCount sets the ssprRegisteredUserCount property value. The number of users registered for self service password reset. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetSsprRegisteredUserCount(value *int32)() { + m.ssprRegisteredUserCount = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *CredentialUserRegistrationsSummary) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *CredentialUserRegistrationsSummary) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTotalUserCount sets the totalUserCount property value. The total number of users in the given managed tenant. Optional. Read-only. +func (m *CredentialUserRegistrationsSummary) SetTotalUserCount(value *int32)() { + m.totalUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_response.go new file mode 100644 index 000000000..661ac2f39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CredentialUserRegistrationsSummaryCollectionResponse +type CredentialUserRegistrationsSummaryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CredentialUserRegistrationsSummaryable +} +// NewCredentialUserRegistrationsSummaryCollectionResponse instantiates a new CredentialUserRegistrationsSummaryCollectionResponse and sets the default values. +func NewCredentialUserRegistrationsSummaryCollectionResponse()(*CredentialUserRegistrationsSummaryCollectionResponse) { + m := &CredentialUserRegistrationsSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCredentialUserRegistrationsSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCredentialUserRegistrationsSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCredentialUserRegistrationsSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CredentialUserRegistrationsSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCredentialUserRegistrationsSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CredentialUserRegistrationsSummaryable, len(val)) + for i, v := range val { + res[i] = v.(CredentialUserRegistrationsSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CredentialUserRegistrationsSummaryCollectionResponse) GetValue()([]CredentialUserRegistrationsSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *CredentialUserRegistrationsSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CredentialUserRegistrationsSummaryCollectionResponse) SetValue(value []CredentialUserRegistrationsSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_responseable.go new file mode 100644 index 000000000..219f6f945 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summary_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CredentialUserRegistrationsSummaryCollectionResponseable +type CredentialUserRegistrationsSummaryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CredentialUserRegistrationsSummaryable) + SetValue(value []CredentialUserRegistrationsSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summaryable.go b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summaryable.go new file mode 100644 index 000000000..9464b85f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/credential_user_registrations_summaryable.go @@ -0,0 +1,35 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CredentialUserRegistrationsSummaryable +type CredentialUserRegistrationsSummaryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMfaAndSsprCapableUserCount()(*int32) + GetMfaConditionalAccessPolicyState()(*string) + GetMfaExcludedUserCount()(*int32) + GetMfaRegisteredUserCount()(*int32) + GetSecurityDefaultsEnabled()(*bool) + GetSsprEnabledUserCount()(*int32) + GetSsprRegisteredUserCount()(*int32) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + GetTotalUserCount()(*int32) + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMfaAndSsprCapableUserCount(value *int32)() + SetMfaConditionalAccessPolicyState(value *string)() + SetMfaExcludedUserCount(value *int32)() + SetMfaRegisteredUserCount(value *int32)() + SetSecurityDefaultsEnabled(value *bool)() + SetSsprEnabledUserCount(value *int32)() + SetSsprRegisteredUserCount(value *int32)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() + SetTotalUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/delegated_privilege_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/delegated_privilege_status.go new file mode 100644 index 000000000..8f3b95fa2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/delegated_privilege_status.go @@ -0,0 +1,43 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DelegatedPrivilegeStatus int + +const ( + NONE_DELEGATEDPRIVILEGESTATUS DelegatedPrivilegeStatus = iota + DELEGATEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS + UNKNOWNFUTUREVALUE_DELEGATEDPRIVILEGESTATUS + GRANULARDELEGATEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS + DELEGATEDANDGRANULARDELEGETEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS +) + +func (i DelegatedPrivilegeStatus) String() string { + return []string{"none", "delegatedAdminPrivileges", "unknownFutureValue", "granularDelegatedAdminPrivileges", "delegatedAndGranularDelegetedAdminPrivileges"}[i] +} +func ParseDelegatedPrivilegeStatus(v string) (interface{}, error) { + result := NONE_DELEGATEDPRIVILEGESTATUS + switch v { + case "none": + result = NONE_DELEGATEDPRIVILEGESTATUS + case "delegatedAdminPrivileges": + result = DELEGATEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DELEGATEDPRIVILEGESTATUS + case "granularDelegatedAdminPrivileges": + result = GRANULARDELEGATEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS + case "delegatedAndGranularDelegetedAdminPrivileges": + result = DELEGATEDANDGRANULARDELEGETEDADMINPRIVILEGES_DELEGATEDPRIVILEGESTATUS + default: + return 0, errors.New("Unknown DelegatedPrivilegeStatus value: " + v) + } + return &result, nil +} +func SerializeDelegatedPrivilegeStatus(values []DelegatedPrivilegeStatus) []string { + 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/managedtenants/device_compliance_policy_setting_state_summary.go b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary.go new file mode 100644 index 000000000..ec3f1d378 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary.go @@ -0,0 +1,374 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeviceCompliancePolicySettingStateSummary provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceCompliancePolicySettingStateSummary struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The number of devices in a conflict state. Optional. Read-only. + conflictDeviceCount *int32 + // The number of devices in an error state. Optional. Read-only. + errorDeviceCount *int32 + // The number of devices in a failed state. Optional. Read-only. + failedDeviceCount *int32 + // The identifer for the Microsoft Intune account. Required. Read-only. + intuneAccountId *string + // The identifier for the Intune setting. Optional. Read-only. + intuneSettingId *string + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of devices in a not applicable state. Optional. Read-only. + notApplicableDeviceCount *int32 + // The number of devices in a pending state. Optional. Read-only. + pendingDeviceCount *int32 + // The type for the device compliance policy. Optional. Read-only. + policyType *string + // The name for the setting within the device compliance policy. Optional. Read-only. + settingName *string + // The number of devices in a succeeded state. Optional. Read-only. + succeededDeviceCount *int32 + // The display name for the managed tenant. Required. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. + tenantId *string +} +// NewDeviceCompliancePolicySettingStateSummary instantiates a new deviceCompliancePolicySettingStateSummary and sets the default values. +func NewDeviceCompliancePolicySettingStateSummary()(*DeviceCompliancePolicySettingStateSummary) { + m := &DeviceCompliancePolicySettingStateSummary{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingStateSummary(), nil +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. The number of devices in a conflict state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetErrorDeviceCount gets the errorDeviceCount property value. The number of devices in an error state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFailedDeviceCount gets the failedDeviceCount property value. The number of devices in a failed state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetFailedDeviceCount()(*int32) { + return m.failedDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["failedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedDeviceCount(val) + } + return nil + } + res["intuneAccountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntuneAccountId(val) + } + return nil + } + res["intuneSettingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIntuneSettingId(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["pendingDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingDeviceCount(val) + } + return nil + } + res["policyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyType(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["succeededDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSucceededDeviceCount(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetIntuneAccountId gets the intuneAccountId property value. The identifer for the Microsoft Intune account. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetIntuneAccountId()(*string) { + return m.intuneAccountId +} +// GetIntuneSettingId gets the intuneSettingId property value. The identifier for the Intune setting. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetIntuneSettingId()(*string) { + return m.intuneSettingId +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. The number of devices in a not applicable state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetPendingDeviceCount gets the pendingDeviceCount property value. The number of devices in a pending state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetPendingDeviceCount()(*int32) { + return m.pendingDeviceCount +} +// GetPolicyType gets the policyType property value. The type for the device compliance policy. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetPolicyType()(*string) { + return m.policyType +} +// GetSettingName gets the settingName property value. The name for the setting within the device compliance policy. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetSettingName()(*string) { + return m.settingName +} +// GetSucceededDeviceCount gets the succeededDeviceCount property value. The number of devices in a succeeded state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetSucceededDeviceCount()(*int32) { + return m.succeededDeviceCount +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedDeviceCount", m.GetFailedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("intuneAccountId", m.GetIntuneAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("intuneSettingId", m.GetIntuneSettingId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingDeviceCount", m.GetPendingDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("policyType", m.GetPolicyType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("succeededDeviceCount", m.GetSucceededDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. The number of devices in a conflict state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. The number of devices in an error state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetFailedDeviceCount sets the failedDeviceCount property value. The number of devices in a failed state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetFailedDeviceCount(value *int32)() { + m.failedDeviceCount = value +} +// SetIntuneAccountId sets the intuneAccountId property value. The identifer for the Microsoft Intune account. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetIntuneAccountId(value *string)() { + m.intuneAccountId = value +} +// SetIntuneSettingId sets the intuneSettingId property value. The identifier for the Intune setting. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetIntuneSettingId(value *string)() { + m.intuneSettingId = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. The number of devices in a not applicable state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetPendingDeviceCount sets the pendingDeviceCount property value. The number of devices in a pending state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetPendingDeviceCount(value *int32)() { + m.pendingDeviceCount = value +} +// SetPolicyType sets the policyType property value. The type for the device compliance policy. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetPolicyType(value *string)() { + m.policyType = value +} +// SetSettingName sets the settingName property value. The name for the setting within the device compliance policy. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetSettingName(value *string)() { + m.settingName = value +} +// SetSucceededDeviceCount sets the succeededDeviceCount property value. The number of devices in a succeeded state. Optional. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetSucceededDeviceCount(value *int32)() { + m.succeededDeviceCount = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *DeviceCompliancePolicySettingStateSummary) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_response.go new file mode 100644 index 000000000..ba4f1ace2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeviceCompliancePolicySettingStateSummaryCollectionResponse +type DeviceCompliancePolicySettingStateSummaryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DeviceCompliancePolicySettingStateSummaryable +} +// NewDeviceCompliancePolicySettingStateSummaryCollectionResponse instantiates a new DeviceCompliancePolicySettingStateSummaryCollectionResponse and sets the default values. +func NewDeviceCompliancePolicySettingStateSummaryCollectionResponse()(*DeviceCompliancePolicySettingStateSummaryCollectionResponse) { + m := &DeviceCompliancePolicySettingStateSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDeviceCompliancePolicySettingStateSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceCompliancePolicySettingStateSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceCompliancePolicySettingStateSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) GetValue()([]DeviceCompliancePolicySettingStateSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DeviceCompliancePolicySettingStateSummaryCollectionResponse) SetValue(value []DeviceCompliancePolicySettingStateSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_responseable.go new file mode 100644 index 000000000..3ef7036e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summary_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeviceCompliancePolicySettingStateSummaryCollectionResponseable +type DeviceCompliancePolicySettingStateSummaryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DeviceCompliancePolicySettingStateSummaryable) + SetValue(value []DeviceCompliancePolicySettingStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summaryable.go b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summaryable.go new file mode 100644 index 000000000..257b7cf14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/device_compliance_policy_setting_state_summaryable.go @@ -0,0 +1,39 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DeviceCompliancePolicySettingStateSummaryable +type DeviceCompliancePolicySettingStateSummaryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConflictDeviceCount()(*int32) + GetErrorDeviceCount()(*int32) + GetFailedDeviceCount()(*int32) + GetIntuneAccountId()(*string) + GetIntuneSettingId()(*string) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotApplicableDeviceCount()(*int32) + GetPendingDeviceCount()(*int32) + GetPolicyType()(*string) + GetSettingName()(*string) + GetSucceededDeviceCount()(*int32) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetConflictDeviceCount(value *int32)() + SetErrorDeviceCount(value *int32)() + SetFailedDeviceCount(value *int32)() + SetIntuneAccountId(value *string)() + SetIntuneSettingId(value *string)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotApplicableDeviceCount(value *int32)() + SetPendingDeviceCount(value *int32)() + SetPolicyType(value *string)() + SetSettingName(value *string)() + SetSucceededDeviceCount(value *int32)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/email.go b/src/internal/connector/graph/betasdk/models/managedtenants/email.go new file mode 100644 index 000000000..0a596bb89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/email.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Email +type Email 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 emailAddress property + emailAddress *string + // The OdataType property + odataType *string +} +// NewEmail instantiates a new email and sets the default values. +func NewEmail()(*Email) { + m := &Email{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEmailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmail(), 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 *Email) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEmailAddress gets the emailAddress property value. The emailAddress property +func (m *Email) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Email) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Email) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Email) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Email) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEmailAddress sets the emailAddress property value. The emailAddress property +func (m *Email) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Email) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_response.go new file mode 100644 index 000000000..f37837462 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailCollectionResponse +type EmailCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Emailable +} +// NewEmailCollectionResponse instantiates a new EmailCollectionResponse and sets the default values. +func NewEmailCollectionResponse()(*EmailCollectionResponse) { + m := &EmailCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Emailable, len(val)) + for i, v := range val { + res[i] = v.(Emailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailCollectionResponse) GetValue()([]Emailable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailCollectionResponse) SetValue(value []Emailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_responseable.go new file mode 100644 index 000000000..90f69923d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/email_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailCollectionResponseable +type EmailCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Emailable) + SetValue(value []Emailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/emailable.go b/src/internal/connector/graph/betasdk/models/managedtenants/emailable.go new file mode 100644 index 000000000..0318b29da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/emailable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Emailable +type Emailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailAddress()(*string) + GetOdataType()(*string) + SetEmailAddress(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_details.go b/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_details.go new file mode 100644 index 000000000..c91622467 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_details.go @@ -0,0 +1,123 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GraphAPIErrorDetails +type GraphAPIErrorDetails 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 code property + code *string + // The message property + message *string + // The OdataType property + odataType *string +} +// NewGraphAPIErrorDetails instantiates a new graphAPIErrorDetails and sets the default values. +func NewGraphAPIErrorDetails()(*GraphAPIErrorDetails) { + m := &GraphAPIErrorDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateGraphAPIErrorDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateGraphAPIErrorDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewGraphAPIErrorDetails(), 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 *GraphAPIErrorDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The code property +func (m *GraphAPIErrorDetails) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *GraphAPIErrorDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. The message property +func (m *GraphAPIErrorDetails) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *GraphAPIErrorDetails) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *GraphAPIErrorDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *GraphAPIErrorDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *GraphAPIErrorDetails) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The message property +func (m *GraphAPIErrorDetails) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *GraphAPIErrorDetails) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_detailsable.go b/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_detailsable.go new file mode 100644 index 000000000..64bee3afc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/graph_a_p_i_error_detailsable.go @@ -0,0 +1,17 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// GraphAPIErrorDetailsable +type GraphAPIErrorDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance.go new file mode 100644 index 000000000..940629708 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance.go @@ -0,0 +1,400 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceCompliance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceCompliance struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Compliance state of the device. This property is read-only. Possible values are: unknown, compliant, noncompliant, conflict, error, inGracePeriod, configManager. Optional. Read-only. + complianceStatus *string + // Platform of the device. This property is read-only. Possible values are: desktop, windowsRT, winMO6, nokia, windowsPhone, mac, winCE, winEmbedded, iPhone, iPad, iPod, android, iSocConsumer, unix, macMDM, holoLens, surfaceHub, androidForWork, androidEnterprise, windows10x, androidnGMS, chromeOS, linux, blackberry, palm, unknown, cloudPC. Optional. Read-only. + deviceType *string + // The date and time when the grace period will expire. Optional. Read-only. + inGracePeriodUntilDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time that the device last completed a successful sync with Microsoft Endpoint Manager. Optional. Read-only. + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The identifier for the managed device in Microsoft Endpoint Manager. Optional. Read-only. + managedDeviceId *string + // The display name for the managed device. Optional. Read-only. + managedDeviceName *string + // The manufacture for the device. Optional. Read-only. + manufacturer *string + // The model for the device. Optional. Read-only. + model *string + // The description of the operating system for the managed device. Optional. Read-only. + osDescription *string + // The version of the operating system for the managed device. Optional. Read-only. + osVersion *string + // The type of owner for the managed device. Optional. Read-only. + ownerType *string + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string +} +// NewManagedDeviceCompliance instantiates a new managedDeviceCompliance and sets the default values. +func NewManagedDeviceCompliance()(*ManagedDeviceCompliance) { + m := &ManagedDeviceCompliance{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedDeviceComplianceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceComplianceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceCompliance(), nil +} +// GetComplianceStatus gets the complianceStatus property value. Compliance state of the device. This property is read-only. Possible values are: unknown, compliant, noncompliant, conflict, error, inGracePeriod, configManager. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetComplianceStatus()(*string) { + return m.complianceStatus +} +// GetDeviceType gets the deviceType property value. Platform of the device. This property is read-only. Possible values are: desktop, windowsRT, winMO6, nokia, windowsPhone, mac, winCE, winEmbedded, iPhone, iPad, iPod, android, iSocConsumer, unix, macMDM, holoLens, surfaceHub, androidForWork, androidEnterprise, windows10x, androidnGMS, chromeOS, linux, blackberry, palm, unknown, cloudPC. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetDeviceType()(*string) { + return m.deviceType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceCompliance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["complianceStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceStatus(val) + } + return nil + } + res["deviceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceType(val) + } + return nil + } + res["inGracePeriodUntilDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetInGracePeriodUntilDateTime(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + res["osDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsDescription(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["ownerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerType(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetInGracePeriodUntilDateTime gets the inGracePeriodUntilDateTime property value. The date and time when the grace period will expire. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetInGracePeriodUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.inGracePeriodUntilDateTime +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. The date and time that the device last completed a successful sync with Microsoft Endpoint Manager. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. The identifier for the managed device in Microsoft Endpoint Manager. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagedDeviceName gets the managedDeviceName property value. The display name for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetManufacturer gets the manufacturer property value. The manufacture for the device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetManufacturer()(*string) { + return m.manufacturer +} +// GetModel gets the model property value. The model for the device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetModel()(*string) { + return m.model +} +// GetOsDescription gets the osDescription property value. The description of the operating system for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetOsDescription()(*string) { + return m.osDescription +} +// GetOsVersion gets the osVersion property value. The version of the operating system for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetOsVersion()(*string) { + return m.osVersion +} +// GetOwnerType gets the ownerType property value. The type of owner for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetOwnerType()(*string) { + return m.ownerType +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceCompliance) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ManagedDeviceCompliance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("complianceStatus", m.GetComplianceStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceType", m.GetDeviceType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("inGracePeriodUntilDateTime", m.GetInGracePeriodUntilDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osDescription", m.GetOsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerType", m.GetOwnerType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetComplianceStatus sets the complianceStatus property value. Compliance state of the device. This property is read-only. Possible values are: unknown, compliant, noncompliant, conflict, error, inGracePeriod, configManager. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetComplianceStatus(value *string)() { + m.complianceStatus = value +} +// SetDeviceType sets the deviceType property value. Platform of the device. This property is read-only. Possible values are: desktop, windowsRT, winMO6, nokia, windowsPhone, mac, winCE, winEmbedded, iPhone, iPad, iPod, android, iSocConsumer, unix, macMDM, holoLens, surfaceHub, androidForWork, androidEnterprise, windows10x, androidnGMS, chromeOS, linux, blackberry, palm, unknown, cloudPC. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetDeviceType(value *string)() { + m.deviceType = value +} +// SetInGracePeriodUntilDateTime sets the inGracePeriodUntilDateTime property value. The date and time when the grace period will expire. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetInGracePeriodUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.inGracePeriodUntilDateTime = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. The date and time that the device last completed a successful sync with Microsoft Endpoint Manager. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The identifier for the managed device in Microsoft Endpoint Manager. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagedDeviceName sets the managedDeviceName property value. The display name for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetManufacturer sets the manufacturer property value. The manufacture for the device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetModel sets the model property value. The model for the device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetModel(value *string)() { + m.model = value +} +// SetOsDescription sets the osDescription property value. The description of the operating system for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetOsDescription(value *string)() { + m.osDescription = value +} +// SetOsVersion sets the osVersion property value. The version of the operating system for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetOwnerType sets the ownerType property value. The type of owner for the managed device. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetOwnerType(value *string)() { + m.ownerType = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceCompliance) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_response.go new file mode 100644 index 000000000..81d98cfac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceCollectionResponse +type ManagedDeviceComplianceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceComplianceable +} +// NewManagedDeviceComplianceCollectionResponse instantiates a new ManagedDeviceComplianceCollectionResponse and sets the default values. +func NewManagedDeviceComplianceCollectionResponse()(*ManagedDeviceComplianceCollectionResponse) { + m := &ManagedDeviceComplianceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceComplianceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceComplianceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceComplianceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceComplianceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceComplianceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceComplianceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceComplianceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceComplianceCollectionResponse) GetValue()([]ManagedDeviceComplianceable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceComplianceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceComplianceCollectionResponse) SetValue(value []ManagedDeviceComplianceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_responseable.go new file mode 100644 index 000000000..eb7c16a40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceCollectionResponseable +type ManagedDeviceComplianceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceComplianceable) + SetValue(value []ManagedDeviceComplianceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend.go new file mode 100644 index 000000000..3b483f508 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend.go @@ -0,0 +1,269 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceTrend provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedDeviceComplianceTrend struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The number of devices with a compliant status. Required. Read-only. + compliantDeviceCount *int32 + // The number of devices manged by Configuration Manager. Required. Read-only. + configManagerDeviceCount *int32 + // The date and time compliance snapshot was performed. Required. Read-only. + countDateTime *string + // The number of devices with an error status. Required. Read-only. + errorDeviceCount *int32 + // The number of devices that are in a grace period status. Required. Read-only. + inGracePeriodDeviceCount *int32 + // The number of devices that are in a non-compliant status. Required. Read-only. + noncompliantDeviceCount *int32 + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string + // The number of devices in an unknown status. Required. Read-only. + unknownDeviceCount *int32 +} +// NewManagedDeviceComplianceTrend instantiates a new managedDeviceComplianceTrend and sets the default values. +func NewManagedDeviceComplianceTrend()(*ManagedDeviceComplianceTrend) { + m := &ManagedDeviceComplianceTrend{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedDeviceComplianceTrendFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceComplianceTrendFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceComplianceTrend(), nil +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. The number of devices with a compliant status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConfigManagerDeviceCount gets the configManagerDeviceCount property value. The number of devices manged by Configuration Manager. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetConfigManagerDeviceCount()(*int32) { + return m.configManagerDeviceCount +} +// GetCountDateTime gets the countDateTime property value. The date and time compliance snapshot was performed. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetCountDateTime()(*string) { + return m.countDateTime +} +// GetErrorDeviceCount gets the errorDeviceCount property value. The number of devices with an error status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceComplianceTrend) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["configManagerDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfigManagerDeviceCount(val) + } + return nil + } + res["countDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountDateTime(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["inGracePeriodDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInGracePeriodDeviceCount(val) + } + return nil + } + res["noncompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNoncompliantDeviceCount(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetInGracePeriodDeviceCount gets the inGracePeriodDeviceCount property value. The number of devices that are in a grace period status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetInGracePeriodDeviceCount()(*int32) { + return m.inGracePeriodDeviceCount +} +// GetNoncompliantDeviceCount gets the noncompliantDeviceCount property value. The number of devices that are in a non-compliant status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetNoncompliantDeviceCount()(*int32) { + return m.noncompliantDeviceCount +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceComplianceTrend) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceComplianceTrend) GetTenantId()(*string) { + return m.tenantId +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. The number of devices in an unknown status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *ManagedDeviceComplianceTrend) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("configManagerDeviceCount", m.GetConfigManagerDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("countDateTime", m.GetCountDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("inGracePeriodDeviceCount", m.GetInGracePeriodDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("noncompliantDeviceCount", m.GetNoncompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. The number of devices with a compliant status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConfigManagerDeviceCount sets the configManagerDeviceCount property value. The number of devices manged by Configuration Manager. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetConfigManagerDeviceCount(value *int32)() { + m.configManagerDeviceCount = value +} +// SetCountDateTime sets the countDateTime property value. The date and time compliance snapshot was performed. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetCountDateTime(value *string)() { + m.countDateTime = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. The number of devices with an error status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetInGracePeriodDeviceCount sets the inGracePeriodDeviceCount property value. The number of devices that are in a grace period status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetInGracePeriodDeviceCount(value *int32)() { + m.inGracePeriodDeviceCount = value +} +// SetNoncompliantDeviceCount sets the noncompliantDeviceCount property value. The number of devices that are in a non-compliant status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetNoncompliantDeviceCount(value *int32)() { + m.noncompliantDeviceCount = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceComplianceTrend) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *ManagedDeviceComplianceTrend) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. The number of devices in an unknown status. Required. Read-only. +func (m *ManagedDeviceComplianceTrend) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_response.go new file mode 100644 index 000000000..188b14aaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceTrendCollectionResponse +type ManagedDeviceComplianceTrendCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedDeviceComplianceTrendable +} +// NewManagedDeviceComplianceTrendCollectionResponse instantiates a new ManagedDeviceComplianceTrendCollectionResponse and sets the default values. +func NewManagedDeviceComplianceTrendCollectionResponse()(*ManagedDeviceComplianceTrendCollectionResponse) { + m := &ManagedDeviceComplianceTrendCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedDeviceComplianceTrendCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedDeviceComplianceTrendCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedDeviceComplianceTrendCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedDeviceComplianceTrendCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceComplianceTrendFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceComplianceTrendable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceComplianceTrendable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedDeviceComplianceTrendCollectionResponse) GetValue()([]ManagedDeviceComplianceTrendable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedDeviceComplianceTrendCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedDeviceComplianceTrendCollectionResponse) SetValue(value []ManagedDeviceComplianceTrendable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_responseable.go new file mode 100644 index 000000000..6576677db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trend_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceTrendCollectionResponseable +type ManagedDeviceComplianceTrendCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedDeviceComplianceTrendable) + SetValue(value []ManagedDeviceComplianceTrendable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trendable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trendable.go new file mode 100644 index 000000000..9c096bd64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_compliance_trendable.go @@ -0,0 +1,30 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceTrendable +type ManagedDeviceComplianceTrendable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantDeviceCount()(*int32) + GetConfigManagerDeviceCount()(*int32) + GetCountDateTime()(*string) + GetErrorDeviceCount()(*int32) + GetInGracePeriodDeviceCount()(*int32) + GetNoncompliantDeviceCount()(*int32) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + GetUnknownDeviceCount()(*int32) + SetCompliantDeviceCount(value *int32)() + SetConfigManagerDeviceCount(value *int32)() + SetCountDateTime(value *string)() + SetErrorDeviceCount(value *int32)() + SetInGracePeriodDeviceCount(value *int32)() + SetNoncompliantDeviceCount(value *int32)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_complianceable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_complianceable.go new file mode 100644 index 000000000..8ee7ece35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_device_complianceable.go @@ -0,0 +1,41 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedDeviceComplianceable +type ManagedDeviceComplianceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComplianceStatus()(*string) + GetDeviceType()(*string) + GetInGracePeriodUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetManagedDeviceName()(*string) + GetManufacturer()(*string) + GetModel()(*string) + GetOsDescription()(*string) + GetOsVersion()(*string) + GetOwnerType()(*string) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetComplianceStatus(value *string)() + SetDeviceType(value *string)() + SetInGracePeriodUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetManagedDeviceName(value *string)() + SetManufacturer(value *string)() + SetModel(value *string)() + SetOsDescription(value *string)() + SetOsVersion(value *string)() + SetOwnerType(value *string)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant.go new file mode 100644 index 000000000..a8ecfa922 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant.go @@ -0,0 +1,1191 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenant +type ManagedTenant struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Aggregate view of device compliance policies across managed tenants. + aggregatedPolicyCompliances []AggregatedPolicyComplianceable + // The collection of audit events across managed tenants. + auditEvents []AuditEventable + // The collection of cloud PC connections across managed tenants. + cloudPcConnections []CloudPcConnectionable + // The collection of cloud PC devices across managed tenants. + cloudPcDevices []CloudPcDeviceable + // Overview of cloud PC information across managed tenants. + cloudPcsOverview []CloudPcOverviewable + // Aggregate view of conditional access policy coverage across managed tenants. + conditionalAccessPolicyCoverages []ConditionalAccessPolicyCoverageable + // Summary information for user registration for multi-factor authentication and self service password reset across managed tenants. + credentialUserRegistrationsSummaries []CredentialUserRegistrationsSummaryable + // Summary information for device compliance policy setting states across managed tenants. + deviceCompliancePolicySettingStateSummaries []DeviceCompliancePolicySettingStateSummaryable + // The collection of compliance for managed devices across managed tenants. + managedDeviceCompliances []ManagedDeviceComplianceable + // Trend insights for device compliance across managed tenants. + managedDeviceComplianceTrends []ManagedDeviceComplianceTrendable + // The managedTenantAlertLogs property + managedTenantAlertLogs []ManagedTenantAlertLogable + // The managedTenantAlertRuleDefinitions property + managedTenantAlertRuleDefinitions []ManagedTenantAlertRuleDefinitionable + // The managedTenantAlertRules property + managedTenantAlertRules []ManagedTenantAlertRuleable + // The managedTenantAlerts property + managedTenantAlerts []ManagedTenantAlertable + // The managedTenantApiNotifications property + managedTenantApiNotifications []ManagedTenantApiNotificationable + // The managedTenantEmailNotifications property + managedTenantEmailNotifications []ManagedTenantEmailNotificationable + // The managedTenantTicketingEndpoints property + managedTenantTicketingEndpoints []ManagedTenantTicketingEndpointable + // The collection of baseline management actions across managed tenants. + managementActions []ManagementActionable + // The tenant level status of management actions across managed tenants. + managementActionTenantDeploymentStatuses []ManagementActionTenantDeploymentStatusable + // The collection of baseline management intents across managed tenants. + managementIntents []ManagementIntentable + // The managementTemplateCollections property + managementTemplateCollections []ManagementTemplateCollectionable + // The managementTemplateCollectionTenantSummaries property + managementTemplateCollectionTenantSummaries []ManagementTemplateCollectionTenantSummaryable + // The collection of baseline management templates across managed tenants. + managementTemplates []ManagementTemplateable + // The managementTemplateSteps property + managementTemplateSteps []ManagementTemplateStepable + // The managementTemplateStepTenantSummaries property + managementTemplateStepTenantSummaries []ManagementTemplateStepTenantSummaryable + // The managementTemplateStepVersions property + managementTemplateStepVersions []ManagementTemplateStepVersionable + // The collection of role assignments to a signed-in user for a managed tenant. + myRoles []MyRoleable + // The collection of a logical grouping of managed tenants used by the multi-tenant management platform. + tenantGroups []TenantGroupable + // The collection of tenants associated with the managing entity. + tenants []Tenantable + // The collection of tenant level customized information across managed tenants. + tenantsCustomizedInformation []TenantCustomizedInformationable + // The collection tenant level detailed information across managed tenants. + tenantsDetailedInformation []TenantDetailedInformationable + // The collection of tenant tags across managed tenants. + tenantTags []TenantTagable + // The state of malware for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. + windowsDeviceMalwareStates []WindowsDeviceMalwareStateable + // The protection state for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. + windowsProtectionStates []WindowsProtectionStateable +} +// NewManagedTenant instantiates a new ManagedTenant and sets the default values. +func NewManagedTenant()(*ManagedTenant) { + m := &ManagedTenant{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenant(), nil +} +// GetAggregatedPolicyCompliances gets the aggregatedPolicyCompliances property value. Aggregate view of device compliance policies across managed tenants. +func (m *ManagedTenant) GetAggregatedPolicyCompliances()([]AggregatedPolicyComplianceable) { + return m.aggregatedPolicyCompliances +} +// GetAuditEvents gets the auditEvents property value. The collection of audit events across managed tenants. +func (m *ManagedTenant) GetAuditEvents()([]AuditEventable) { + return m.auditEvents +} +// GetCloudPcConnections gets the cloudPcConnections property value. The collection of cloud PC connections across managed tenants. +func (m *ManagedTenant) GetCloudPcConnections()([]CloudPcConnectionable) { + return m.cloudPcConnections +} +// GetCloudPcDevices gets the cloudPcDevices property value. The collection of cloud PC devices across managed tenants. +func (m *ManagedTenant) GetCloudPcDevices()([]CloudPcDeviceable) { + return m.cloudPcDevices +} +// GetCloudPcsOverview gets the cloudPcsOverview property value. Overview of cloud PC information across managed tenants. +func (m *ManagedTenant) GetCloudPcsOverview()([]CloudPcOverviewable) { + return m.cloudPcsOverview +} +// GetConditionalAccessPolicyCoverages gets the conditionalAccessPolicyCoverages property value. Aggregate view of conditional access policy coverage across managed tenants. +func (m *ManagedTenant) GetConditionalAccessPolicyCoverages()([]ConditionalAccessPolicyCoverageable) { + return m.conditionalAccessPolicyCoverages +} +// GetCredentialUserRegistrationsSummaries gets the credentialUserRegistrationsSummaries property value. Summary information for user registration for multi-factor authentication and self service password reset across managed tenants. +func (m *ManagedTenant) GetCredentialUserRegistrationsSummaries()([]CredentialUserRegistrationsSummaryable) { + return m.credentialUserRegistrationsSummaries +} +// GetDeviceCompliancePolicySettingStateSummaries gets the deviceCompliancePolicySettingStateSummaries property value. Summary information for device compliance policy setting states across managed tenants. +func (m *ManagedTenant) GetDeviceCompliancePolicySettingStateSummaries()([]DeviceCompliancePolicySettingStateSummaryable) { + return m.deviceCompliancePolicySettingStateSummaries +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["aggregatedPolicyCompliances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAggregatedPolicyComplianceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AggregatedPolicyComplianceable, len(val)) + for i, v := range val { + res[i] = v.(AggregatedPolicyComplianceable) + } + m.SetAggregatedPolicyCompliances(res) + } + return nil + } + res["auditEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAuditEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AuditEventable, len(val)) + for i, v := range val { + res[i] = v.(AuditEventable) + } + m.SetAuditEvents(res) + } + return nil + } + res["cloudPcConnections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcConnectionable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcConnectionable) + } + m.SetCloudPcConnections(res) + } + return nil + } + res["cloudPcDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcDeviceable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcDeviceable) + } + m.SetCloudPcDevices(res) + } + return nil + } + res["cloudPcsOverview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudPcOverviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudPcOverviewable, len(val)) + for i, v := range val { + res[i] = v.(CloudPcOverviewable) + } + m.SetCloudPcsOverview(res) + } + return nil + } + res["conditionalAccessPolicyCoverages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConditionalAccessPolicyCoverageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConditionalAccessPolicyCoverageable, len(val)) + for i, v := range val { + res[i] = v.(ConditionalAccessPolicyCoverageable) + } + m.SetConditionalAccessPolicyCoverages(res) + } + return nil + } + res["credentialUserRegistrationsSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCredentialUserRegistrationsSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CredentialUserRegistrationsSummaryable, len(val)) + for i, v := range val { + res[i] = v.(CredentialUserRegistrationsSummaryable) + } + m.SetCredentialUserRegistrationsSummaries(res) + } + return nil + } + res["deviceCompliancePolicySettingStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDeviceCompliancePolicySettingStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DeviceCompliancePolicySettingStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(DeviceCompliancePolicySettingStateSummaryable) + } + m.SetDeviceCompliancePolicySettingStateSummaries(res) + } + return nil + } + res["managedDeviceCompliances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceComplianceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceComplianceable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceComplianceable) + } + m.SetManagedDeviceCompliances(res) + } + return nil + } + res["managedDeviceComplianceTrends"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceComplianceTrendFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceComplianceTrendable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceComplianceTrendable) + } + m.SetManagedDeviceComplianceTrends(res) + } + return nil + } + res["managedTenantAlertLogs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertLogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertLogable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertLogable) + } + m.SetManagedTenantAlertLogs(res) + } + return nil + } + res["managedTenantAlertRuleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertRuleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertRuleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertRuleDefinitionable) + } + m.SetManagedTenantAlertRuleDefinitions(res) + } + return nil + } + res["managedTenantAlertRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertRuleable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertRuleable) + } + m.SetManagedTenantAlertRules(res) + } + return nil + } + res["managedTenantAlerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertable) + } + m.SetManagedTenantAlerts(res) + } + return nil + } + res["managedTenantApiNotifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantApiNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantApiNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantApiNotificationable) + } + m.SetManagedTenantApiNotifications(res) + } + return nil + } + res["managedTenantEmailNotifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantEmailNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantEmailNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantEmailNotificationable) + } + m.SetManagedTenantEmailNotifications(res) + } + return nil + } + res["managedTenantTicketingEndpoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantTicketingEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantTicketingEndpointable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantTicketingEndpointable) + } + m.SetManagedTenantTicketingEndpoints(res) + } + return nil + } + res["managementActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionable) + } + m.SetManagementActions(res) + } + return nil + } + res["managementActionTenantDeploymentStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionTenantDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionTenantDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionTenantDeploymentStatusable) + } + m.SetManagementActionTenantDeploymentStatuses(res) + } + return nil + } + res["managementIntents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementIntentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementIntentable, len(val)) + for i, v := range val { + res[i] = v.(ManagementIntentable) + } + m.SetManagementIntents(res) + } + return nil + } + res["managementTemplateCollections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateCollectionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateCollectionable) + } + m.SetManagementTemplateCollections(res) + } + return nil + } + res["managementTemplateCollectionTenantSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateCollectionTenantSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateCollectionTenantSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateCollectionTenantSummaryable) + } + m.SetManagementTemplateCollectionTenantSummaries(res) + } + return nil + } + res["managementTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateable) + } + m.SetManagementTemplates(res) + } + return nil + } + res["managementTemplateSteps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepable) + } + m.SetManagementTemplateSteps(res) + } + return nil + } + res["managementTemplateStepTenantSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepTenantSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepTenantSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepTenantSummaryable) + } + m.SetManagementTemplateStepTenantSummaries(res) + } + return nil + } + res["managementTemplateStepVersions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepVersionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepVersionable) + } + m.SetManagementTemplateStepVersions(res) + } + return nil + } + res["myRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMyRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MyRoleable, len(val)) + for i, v := range val { + res[i] = v.(MyRoleable) + } + m.SetMyRoles(res) + } + return nil + } + res["tenantGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantGroupable, len(val)) + for i, v := range val { + res[i] = v.(TenantGroupable) + } + m.SetTenantGroups(res) + } + return nil + } + res["tenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Tenantable, len(val)) + for i, v := range val { + res[i] = v.(Tenantable) + } + m.SetTenants(res) + } + return nil + } + res["tenantsCustomizedInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantCustomizedInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantCustomizedInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantCustomizedInformationable) + } + m.SetTenantsCustomizedInformation(res) + } + return nil + } + res["tenantsDetailedInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantDetailedInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantDetailedInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantDetailedInformationable) + } + m.SetTenantsDetailedInformation(res) + } + return nil + } + res["tenantTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantTagable, len(val)) + for i, v := range val { + res[i] = v.(TenantTagable) + } + m.SetTenantTags(res) + } + return nil + } + res["windowsDeviceMalwareStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsDeviceMalwareStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsDeviceMalwareStateable, len(val)) + for i, v := range val { + res[i] = v.(WindowsDeviceMalwareStateable) + } + m.SetWindowsDeviceMalwareStates(res) + } + return nil + } + res["windowsProtectionStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsProtectionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsProtectionStateable, len(val)) + for i, v := range val { + res[i] = v.(WindowsProtectionStateable) + } + m.SetWindowsProtectionStates(res) + } + return nil + } + return res +} +// GetManagedDeviceCompliances gets the managedDeviceCompliances property value. The collection of compliance for managed devices across managed tenants. +func (m *ManagedTenant) GetManagedDeviceCompliances()([]ManagedDeviceComplianceable) { + return m.managedDeviceCompliances +} +// GetManagedDeviceComplianceTrends gets the managedDeviceComplianceTrends property value. Trend insights for device compliance across managed tenants. +func (m *ManagedTenant) GetManagedDeviceComplianceTrends()([]ManagedDeviceComplianceTrendable) { + return m.managedDeviceComplianceTrends +} +// GetManagedTenantAlertLogs gets the managedTenantAlertLogs property value. The managedTenantAlertLogs property +func (m *ManagedTenant) GetManagedTenantAlertLogs()([]ManagedTenantAlertLogable) { + return m.managedTenantAlertLogs +} +// GetManagedTenantAlertRuleDefinitions gets the managedTenantAlertRuleDefinitions property value. The managedTenantAlertRuleDefinitions property +func (m *ManagedTenant) GetManagedTenantAlertRuleDefinitions()([]ManagedTenantAlertRuleDefinitionable) { + return m.managedTenantAlertRuleDefinitions +} +// GetManagedTenantAlertRules gets the managedTenantAlertRules property value. The managedTenantAlertRules property +func (m *ManagedTenant) GetManagedTenantAlertRules()([]ManagedTenantAlertRuleable) { + return m.managedTenantAlertRules +} +// GetManagedTenantAlerts gets the managedTenantAlerts property value. The managedTenantAlerts property +func (m *ManagedTenant) GetManagedTenantAlerts()([]ManagedTenantAlertable) { + return m.managedTenantAlerts +} +// GetManagedTenantApiNotifications gets the managedTenantApiNotifications property value. The managedTenantApiNotifications property +func (m *ManagedTenant) GetManagedTenantApiNotifications()([]ManagedTenantApiNotificationable) { + return m.managedTenantApiNotifications +} +// GetManagedTenantEmailNotifications gets the managedTenantEmailNotifications property value. The managedTenantEmailNotifications property +func (m *ManagedTenant) GetManagedTenantEmailNotifications()([]ManagedTenantEmailNotificationable) { + return m.managedTenantEmailNotifications +} +// GetManagedTenantTicketingEndpoints gets the managedTenantTicketingEndpoints property value. The managedTenantTicketingEndpoints property +func (m *ManagedTenant) GetManagedTenantTicketingEndpoints()([]ManagedTenantTicketingEndpointable) { + return m.managedTenantTicketingEndpoints +} +// GetManagementActions gets the managementActions property value. The collection of baseline management actions across managed tenants. +func (m *ManagedTenant) GetManagementActions()([]ManagementActionable) { + return m.managementActions +} +// GetManagementActionTenantDeploymentStatuses gets the managementActionTenantDeploymentStatuses property value. The tenant level status of management actions across managed tenants. +func (m *ManagedTenant) GetManagementActionTenantDeploymentStatuses()([]ManagementActionTenantDeploymentStatusable) { + return m.managementActionTenantDeploymentStatuses +} +// GetManagementIntents gets the managementIntents property value. The collection of baseline management intents across managed tenants. +func (m *ManagedTenant) GetManagementIntents()([]ManagementIntentable) { + return m.managementIntents +} +// GetManagementTemplateCollections gets the managementTemplateCollections property value. The managementTemplateCollections property +func (m *ManagedTenant) GetManagementTemplateCollections()([]ManagementTemplateCollectionable) { + return m.managementTemplateCollections +} +// GetManagementTemplateCollectionTenantSummaries gets the managementTemplateCollectionTenantSummaries property value. The managementTemplateCollectionTenantSummaries property +func (m *ManagedTenant) GetManagementTemplateCollectionTenantSummaries()([]ManagementTemplateCollectionTenantSummaryable) { + return m.managementTemplateCollectionTenantSummaries +} +// GetManagementTemplates gets the managementTemplates property value. The collection of baseline management templates across managed tenants. +func (m *ManagedTenant) GetManagementTemplates()([]ManagementTemplateable) { + return m.managementTemplates +} +// GetManagementTemplateSteps gets the managementTemplateSteps property value. The managementTemplateSteps property +func (m *ManagedTenant) GetManagementTemplateSteps()([]ManagementTemplateStepable) { + return m.managementTemplateSteps +} +// GetManagementTemplateStepTenantSummaries gets the managementTemplateStepTenantSummaries property value. The managementTemplateStepTenantSummaries property +func (m *ManagedTenant) GetManagementTemplateStepTenantSummaries()([]ManagementTemplateStepTenantSummaryable) { + return m.managementTemplateStepTenantSummaries +} +// GetManagementTemplateStepVersions gets the managementTemplateStepVersions property value. The managementTemplateStepVersions property +func (m *ManagedTenant) GetManagementTemplateStepVersions()([]ManagementTemplateStepVersionable) { + return m.managementTemplateStepVersions +} +// GetMyRoles gets the myRoles property value. The collection of role assignments to a signed-in user for a managed tenant. +func (m *ManagedTenant) GetMyRoles()([]MyRoleable) { + return m.myRoles +} +// GetTenantGroups gets the tenantGroups property value. The collection of a logical grouping of managed tenants used by the multi-tenant management platform. +func (m *ManagedTenant) GetTenantGroups()([]TenantGroupable) { + return m.tenantGroups +} +// GetTenants gets the tenants property value. The collection of tenants associated with the managing entity. +func (m *ManagedTenant) GetTenants()([]Tenantable) { + return m.tenants +} +// GetTenantsCustomizedInformation gets the tenantsCustomizedInformation property value. The collection of tenant level customized information across managed tenants. +func (m *ManagedTenant) GetTenantsCustomizedInformation()([]TenantCustomizedInformationable) { + return m.tenantsCustomizedInformation +} +// GetTenantsDetailedInformation gets the tenantsDetailedInformation property value. The collection tenant level detailed information across managed tenants. +func (m *ManagedTenant) GetTenantsDetailedInformation()([]TenantDetailedInformationable) { + return m.tenantsDetailedInformation +} +// GetTenantTags gets the tenantTags property value. The collection of tenant tags across managed tenants. +func (m *ManagedTenant) GetTenantTags()([]TenantTagable) { + return m.tenantTags +} +// GetWindowsDeviceMalwareStates gets the windowsDeviceMalwareStates property value. The state of malware for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. +func (m *ManagedTenant) GetWindowsDeviceMalwareStates()([]WindowsDeviceMalwareStateable) { + return m.windowsDeviceMalwareStates +} +// GetWindowsProtectionStates gets the windowsProtectionStates property value. The protection state for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. +func (m *ManagedTenant) GetWindowsProtectionStates()([]WindowsProtectionStateable) { + return m.windowsProtectionStates +} +// Serialize serializes information the current object +func (m *ManagedTenant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAggregatedPolicyCompliances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAggregatedPolicyCompliances())) + for i, v := range m.GetAggregatedPolicyCompliances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("aggregatedPolicyCompliances", cast) + if err != nil { + return err + } + } + if m.GetAuditEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuditEvents())) + for i, v := range m.GetAuditEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("auditEvents", cast) + if err != nil { + return err + } + } + if m.GetCloudPcConnections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudPcConnections())) + for i, v := range m.GetCloudPcConnections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudPcConnections", cast) + if err != nil { + return err + } + } + if m.GetCloudPcDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudPcDevices())) + for i, v := range m.GetCloudPcDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudPcDevices", cast) + if err != nil { + return err + } + } + if m.GetCloudPcsOverview() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudPcsOverview())) + for i, v := range m.GetCloudPcsOverview() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudPcsOverview", cast) + if err != nil { + return err + } + } + if m.GetConditionalAccessPolicyCoverages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConditionalAccessPolicyCoverages())) + for i, v := range m.GetConditionalAccessPolicyCoverages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("conditionalAccessPolicyCoverages", cast) + if err != nil { + return err + } + } + if m.GetCredentialUserRegistrationsSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCredentialUserRegistrationsSummaries())) + for i, v := range m.GetCredentialUserRegistrationsSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("credentialUserRegistrationsSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceCompliancePolicySettingStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceCompliancePolicySettingStateSummaries())) + for i, v := range m.GetDeviceCompliancePolicySettingStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceCompliancePolicySettingStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceCompliances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceCompliances())) + for i, v := range m.GetManagedDeviceCompliances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceCompliances", cast) + if err != nil { + return err + } + } + if m.GetManagedDeviceComplianceTrends() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDeviceComplianceTrends())) + for i, v := range m.GetManagedDeviceComplianceTrends() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDeviceComplianceTrends", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantAlertLogs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantAlertLogs())) + for i, v := range m.GetManagedTenantAlertLogs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantAlertLogs", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantAlertRuleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantAlertRuleDefinitions())) + for i, v := range m.GetManagedTenantAlertRuleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantAlertRuleDefinitions", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantAlertRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantAlertRules())) + for i, v := range m.GetManagedTenantAlertRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantAlertRules", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantAlerts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantAlerts())) + for i, v := range m.GetManagedTenantAlerts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantAlerts", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantApiNotifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantApiNotifications())) + for i, v := range m.GetManagedTenantApiNotifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantApiNotifications", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantEmailNotifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantEmailNotifications())) + for i, v := range m.GetManagedTenantEmailNotifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantEmailNotifications", cast) + if err != nil { + return err + } + } + if m.GetManagedTenantTicketingEndpoints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedTenantTicketingEndpoints())) + for i, v := range m.GetManagedTenantTicketingEndpoints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedTenantTicketingEndpoints", cast) + if err != nil { + return err + } + } + if m.GetManagementActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementActions())) + for i, v := range m.GetManagementActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementActions", cast) + if err != nil { + return err + } + } + if m.GetManagementActionTenantDeploymentStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementActionTenantDeploymentStatuses())) + for i, v := range m.GetManagementActionTenantDeploymentStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementActionTenantDeploymentStatuses", cast) + if err != nil { + return err + } + } + if m.GetManagementIntents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementIntents())) + for i, v := range m.GetManagementIntents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementIntents", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateCollections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateCollections())) + for i, v := range m.GetManagementTemplateCollections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateCollections", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateCollectionTenantSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateCollectionTenantSummaries())) + for i, v := range m.GetManagementTemplateCollectionTenantSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateCollectionTenantSummaries", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplates())) + for i, v := range m.GetManagementTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplates", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateSteps())) + for i, v := range m.GetManagementTemplateSteps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateSteps", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateStepTenantSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateStepTenantSummaries())) + for i, v := range m.GetManagementTemplateStepTenantSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateStepTenantSummaries", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateStepVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateStepVersions())) + for i, v := range m.GetManagementTemplateStepVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateStepVersions", cast) + if err != nil { + return err + } + } + if m.GetMyRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMyRoles())) + for i, v := range m.GetMyRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("myRoles", cast) + if err != nil { + return err + } + } + if m.GetTenantGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenantGroups())) + for i, v := range m.GetTenantGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenantGroups", cast) + if err != nil { + return err + } + } + if m.GetTenants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenants())) + for i, v := range m.GetTenants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenants", cast) + if err != nil { + return err + } + } + if m.GetTenantsCustomizedInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenantsCustomizedInformation())) + for i, v := range m.GetTenantsCustomizedInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenantsCustomizedInformation", cast) + if err != nil { + return err + } + } + if m.GetTenantsDetailedInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenantsDetailedInformation())) + for i, v := range m.GetTenantsDetailedInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenantsDetailedInformation", cast) + if err != nil { + return err + } + } + if m.GetTenantTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenantTags())) + for i, v := range m.GetTenantTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenantTags", cast) + if err != nil { + return err + } + } + if m.GetWindowsDeviceMalwareStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsDeviceMalwareStates())) + for i, v := range m.GetWindowsDeviceMalwareStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsDeviceMalwareStates", cast) + if err != nil { + return err + } + } + if m.GetWindowsProtectionStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWindowsProtectionStates())) + for i, v := range m.GetWindowsProtectionStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("windowsProtectionStates", cast) + if err != nil { + return err + } + } + return nil +} +// SetAggregatedPolicyCompliances sets the aggregatedPolicyCompliances property value. Aggregate view of device compliance policies across managed tenants. +func (m *ManagedTenant) SetAggregatedPolicyCompliances(value []AggregatedPolicyComplianceable)() { + m.aggregatedPolicyCompliances = value +} +// SetAuditEvents sets the auditEvents property value. The collection of audit events across managed tenants. +func (m *ManagedTenant) SetAuditEvents(value []AuditEventable)() { + m.auditEvents = value +} +// SetCloudPcConnections sets the cloudPcConnections property value. The collection of cloud PC connections across managed tenants. +func (m *ManagedTenant) SetCloudPcConnections(value []CloudPcConnectionable)() { + m.cloudPcConnections = value +} +// SetCloudPcDevices sets the cloudPcDevices property value. The collection of cloud PC devices across managed tenants. +func (m *ManagedTenant) SetCloudPcDevices(value []CloudPcDeviceable)() { + m.cloudPcDevices = value +} +// SetCloudPcsOverview sets the cloudPcsOverview property value. Overview of cloud PC information across managed tenants. +func (m *ManagedTenant) SetCloudPcsOverview(value []CloudPcOverviewable)() { + m.cloudPcsOverview = value +} +// SetConditionalAccessPolicyCoverages sets the conditionalAccessPolicyCoverages property value. Aggregate view of conditional access policy coverage across managed tenants. +func (m *ManagedTenant) SetConditionalAccessPolicyCoverages(value []ConditionalAccessPolicyCoverageable)() { + m.conditionalAccessPolicyCoverages = value +} +// SetCredentialUserRegistrationsSummaries sets the credentialUserRegistrationsSummaries property value. Summary information for user registration for multi-factor authentication and self service password reset across managed tenants. +func (m *ManagedTenant) SetCredentialUserRegistrationsSummaries(value []CredentialUserRegistrationsSummaryable)() { + m.credentialUserRegistrationsSummaries = value +} +// SetDeviceCompliancePolicySettingStateSummaries sets the deviceCompliancePolicySettingStateSummaries property value. Summary information for device compliance policy setting states across managed tenants. +func (m *ManagedTenant) SetDeviceCompliancePolicySettingStateSummaries(value []DeviceCompliancePolicySettingStateSummaryable)() { + m.deviceCompliancePolicySettingStateSummaries = value +} +// SetManagedDeviceCompliances sets the managedDeviceCompliances property value. The collection of compliance for managed devices across managed tenants. +func (m *ManagedTenant) SetManagedDeviceCompliances(value []ManagedDeviceComplianceable)() { + m.managedDeviceCompliances = value +} +// SetManagedDeviceComplianceTrends sets the managedDeviceComplianceTrends property value. Trend insights for device compliance across managed tenants. +func (m *ManagedTenant) SetManagedDeviceComplianceTrends(value []ManagedDeviceComplianceTrendable)() { + m.managedDeviceComplianceTrends = value +} +// SetManagedTenantAlertLogs sets the managedTenantAlertLogs property value. The managedTenantAlertLogs property +func (m *ManagedTenant) SetManagedTenantAlertLogs(value []ManagedTenantAlertLogable)() { + m.managedTenantAlertLogs = value +} +// SetManagedTenantAlertRuleDefinitions sets the managedTenantAlertRuleDefinitions property value. The managedTenantAlertRuleDefinitions property +func (m *ManagedTenant) SetManagedTenantAlertRuleDefinitions(value []ManagedTenantAlertRuleDefinitionable)() { + m.managedTenantAlertRuleDefinitions = value +} +// SetManagedTenantAlertRules sets the managedTenantAlertRules property value. The managedTenantAlertRules property +func (m *ManagedTenant) SetManagedTenantAlertRules(value []ManagedTenantAlertRuleable)() { + m.managedTenantAlertRules = value +} +// SetManagedTenantAlerts sets the managedTenantAlerts property value. The managedTenantAlerts property +func (m *ManagedTenant) SetManagedTenantAlerts(value []ManagedTenantAlertable)() { + m.managedTenantAlerts = value +} +// SetManagedTenantApiNotifications sets the managedTenantApiNotifications property value. The managedTenantApiNotifications property +func (m *ManagedTenant) SetManagedTenantApiNotifications(value []ManagedTenantApiNotificationable)() { + m.managedTenantApiNotifications = value +} +// SetManagedTenantEmailNotifications sets the managedTenantEmailNotifications property value. The managedTenantEmailNotifications property +func (m *ManagedTenant) SetManagedTenantEmailNotifications(value []ManagedTenantEmailNotificationable)() { + m.managedTenantEmailNotifications = value +} +// SetManagedTenantTicketingEndpoints sets the managedTenantTicketingEndpoints property value. The managedTenantTicketingEndpoints property +func (m *ManagedTenant) SetManagedTenantTicketingEndpoints(value []ManagedTenantTicketingEndpointable)() { + m.managedTenantTicketingEndpoints = value +} +// SetManagementActions sets the managementActions property value. The collection of baseline management actions across managed tenants. +func (m *ManagedTenant) SetManagementActions(value []ManagementActionable)() { + m.managementActions = value +} +// SetManagementActionTenantDeploymentStatuses sets the managementActionTenantDeploymentStatuses property value. The tenant level status of management actions across managed tenants. +func (m *ManagedTenant) SetManagementActionTenantDeploymentStatuses(value []ManagementActionTenantDeploymentStatusable)() { + m.managementActionTenantDeploymentStatuses = value +} +// SetManagementIntents sets the managementIntents property value. The collection of baseline management intents across managed tenants. +func (m *ManagedTenant) SetManagementIntents(value []ManagementIntentable)() { + m.managementIntents = value +} +// SetManagementTemplateCollections sets the managementTemplateCollections property value. The managementTemplateCollections property +func (m *ManagedTenant) SetManagementTemplateCollections(value []ManagementTemplateCollectionable)() { + m.managementTemplateCollections = value +} +// SetManagementTemplateCollectionTenantSummaries sets the managementTemplateCollectionTenantSummaries property value. The managementTemplateCollectionTenantSummaries property +func (m *ManagedTenant) SetManagementTemplateCollectionTenantSummaries(value []ManagementTemplateCollectionTenantSummaryable)() { + m.managementTemplateCollectionTenantSummaries = value +} +// SetManagementTemplates sets the managementTemplates property value. The collection of baseline management templates across managed tenants. +func (m *ManagedTenant) SetManagementTemplates(value []ManagementTemplateable)() { + m.managementTemplates = value +} +// SetManagementTemplateSteps sets the managementTemplateSteps property value. The managementTemplateSteps property +func (m *ManagedTenant) SetManagementTemplateSteps(value []ManagementTemplateStepable)() { + m.managementTemplateSteps = value +} +// SetManagementTemplateStepTenantSummaries sets the managementTemplateStepTenantSummaries property value. The managementTemplateStepTenantSummaries property +func (m *ManagedTenant) SetManagementTemplateStepTenantSummaries(value []ManagementTemplateStepTenantSummaryable)() { + m.managementTemplateStepTenantSummaries = value +} +// SetManagementTemplateStepVersions sets the managementTemplateStepVersions property value. The managementTemplateStepVersions property +func (m *ManagedTenant) SetManagementTemplateStepVersions(value []ManagementTemplateStepVersionable)() { + m.managementTemplateStepVersions = value +} +// SetMyRoles sets the myRoles property value. The collection of role assignments to a signed-in user for a managed tenant. +func (m *ManagedTenant) SetMyRoles(value []MyRoleable)() { + m.myRoles = value +} +// SetTenantGroups sets the tenantGroups property value. The collection of a logical grouping of managed tenants used by the multi-tenant management platform. +func (m *ManagedTenant) SetTenantGroups(value []TenantGroupable)() { + m.tenantGroups = value +} +// SetTenants sets the tenants property value. The collection of tenants associated with the managing entity. +func (m *ManagedTenant) SetTenants(value []Tenantable)() { + m.tenants = value +} +// SetTenantsCustomizedInformation sets the tenantsCustomizedInformation property value. The collection of tenant level customized information across managed tenants. +func (m *ManagedTenant) SetTenantsCustomizedInformation(value []TenantCustomizedInformationable)() { + m.tenantsCustomizedInformation = value +} +// SetTenantsDetailedInformation sets the tenantsDetailedInformation property value. The collection tenant level detailed information across managed tenants. +func (m *ManagedTenant) SetTenantsDetailedInformation(value []TenantDetailedInformationable)() { + m.tenantsDetailedInformation = value +} +// SetTenantTags sets the tenantTags property value. The collection of tenant tags across managed tenants. +func (m *ManagedTenant) SetTenantTags(value []TenantTagable)() { + m.tenantTags = value +} +// SetWindowsDeviceMalwareStates sets the windowsDeviceMalwareStates property value. The state of malware for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. +func (m *ManagedTenant) SetWindowsDeviceMalwareStates(value []WindowsDeviceMalwareStateable)() { + m.windowsDeviceMalwareStates = value +} +// SetWindowsProtectionStates sets the windowsProtectionStates property value. The protection state for Windows devices, registered with Microsoft Endpoint Manager, across managed tenants. +func (m *ManagedTenant) SetWindowsProtectionStates(value []WindowsProtectionStateable)() { + m.windowsProtectionStates = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert.go new file mode 100644 index 000000000..72f59c3e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert.go @@ -0,0 +1,564 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlert +type ManagedTenantAlert struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alertData property + alertData AlertDataable + // The alertDataReferenceStrings property + alertDataReferenceStrings []AlertDataReferenceStringable + // The alertLogs property + alertLogs []ManagedTenantAlertLogable + // The alertRule property + alertRule ManagedTenantAlertRuleable + // The alertRuleDisplayName property + alertRuleDisplayName *string + // The apiNotifications property + apiNotifications []ManagedTenantApiNotificationable + // The assignedToUserId property + assignedToUserId *string + // The correlationCount property + correlationCount *int32 + // The correlationId property + correlationId *string + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The emailNotifications property + emailNotifications []ManagedTenantEmailNotificationable + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The message property + message *string + // The severity property + severity *AlertSeverity + // The status property + status *AlertStatus + // The tenantId property + tenantId *string + // The title property + title *string +} +// NewManagedTenantAlert instantiates a new managedTenantAlert and sets the default values. +func NewManagedTenantAlert()(*ManagedTenantAlert) { + m := &ManagedTenantAlert{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlert(), nil +} +// GetAlertData gets the alertData property value. The alertData property +func (m *ManagedTenantAlert) GetAlertData()(AlertDataable) { + return m.alertData +} +// GetAlertDataReferenceStrings gets the alertDataReferenceStrings property value. The alertDataReferenceStrings property +func (m *ManagedTenantAlert) GetAlertDataReferenceStrings()([]AlertDataReferenceStringable) { + return m.alertDataReferenceStrings +} +// GetAlertLogs gets the alertLogs property value. The alertLogs property +func (m *ManagedTenantAlert) GetAlertLogs()([]ManagedTenantAlertLogable) { + return m.alertLogs +} +// GetAlertRule gets the alertRule property value. The alertRule property +func (m *ManagedTenantAlert) GetAlertRule()(ManagedTenantAlertRuleable) { + return m.alertRule +} +// GetAlertRuleDisplayName gets the alertRuleDisplayName property value. The alertRuleDisplayName property +func (m *ManagedTenantAlert) GetAlertRuleDisplayName()(*string) { + return m.alertRuleDisplayName +} +// GetApiNotifications gets the apiNotifications property value. The apiNotifications property +func (m *ManagedTenantAlert) GetApiNotifications()([]ManagedTenantApiNotificationable) { + return m.apiNotifications +} +// GetAssignedToUserId gets the assignedToUserId property value. The assignedToUserId property +func (m *ManagedTenantAlert) GetAssignedToUserId()(*string) { + return m.assignedToUserId +} +// GetCorrelationCount gets the correlationCount property value. The correlationCount property +func (m *ManagedTenantAlert) GetCorrelationCount()(*int32) { + return m.correlationCount +} +// GetCorrelationId gets the correlationId property value. The correlationId property +func (m *ManagedTenantAlert) GetCorrelationId()(*string) { + return m.correlationId +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlert) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlert) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetEmailNotifications gets the emailNotifications property value. The emailNotifications property +func (m *ManagedTenantAlert) GetEmailNotifications()([]ManagedTenantEmailNotificationable) { + return m.emailNotifications +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertDataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlertData(val.(AlertDataable)) + } + return nil + } + res["alertDataReferenceStrings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertDataReferenceStringFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertDataReferenceStringable, len(val)) + for i, v := range val { + res[i] = v.(AlertDataReferenceStringable) + } + m.SetAlertDataReferenceStrings(res) + } + return nil + } + res["alertLogs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertLogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertLogable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertLogable) + } + m.SetAlertLogs(res) + } + return nil + } + res["alertRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedTenantAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlertRule(val.(ManagedTenantAlertRuleable)) + } + return nil + } + res["alertRuleDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlertRuleDisplayName(val) + } + return nil + } + res["apiNotifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantApiNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantApiNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantApiNotificationable) + } + m.SetApiNotifications(res) + } + return nil + } + res["assignedToUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedToUserId(val) + } + return nil + } + res["correlationCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationCount(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["emailNotifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantEmailNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantEmailNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantEmailNotificationable) + } + m.SetEmailNotifications(res) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*AlertSeverity)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AlertStatus)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlert) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlert) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetMessage gets the message property value. The message property +func (m *ManagedTenantAlert) GetMessage()(*string) { + return m.message +} +// GetSeverity gets the severity property value. The severity property +func (m *ManagedTenantAlert) GetSeverity()(*AlertSeverity) { + return m.severity +} +// GetStatus gets the status property value. The status property +func (m *ManagedTenantAlert) GetStatus()(*AlertStatus) { + return m.status +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *ManagedTenantAlert) GetTenantId()(*string) { + return m.tenantId +} +// GetTitle gets the title property value. The title property +func (m *ManagedTenantAlert) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ManagedTenantAlert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("alertData", m.GetAlertData()) + if err != nil { + return err + } + } + if m.GetAlertDataReferenceStrings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertDataReferenceStrings())) + for i, v := range m.GetAlertDataReferenceStrings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertDataReferenceStrings", cast) + if err != nil { + return err + } + } + if m.GetAlertLogs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertLogs())) + for i, v := range m.GetAlertLogs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertLogs", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("alertRule", m.GetAlertRule()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("alertRuleDisplayName", m.GetAlertRuleDisplayName()) + if err != nil { + return err + } + } + if m.GetApiNotifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApiNotifications())) + for i, v := range m.GetApiNotifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("apiNotifications", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignedToUserId", m.GetAssignedToUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("correlationCount", m.GetCorrelationCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetEmailNotifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailNotifications())) + for i, v := range m.GetEmailNotifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailNotifications", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetAlertData sets the alertData property value. The alertData property +func (m *ManagedTenantAlert) SetAlertData(value AlertDataable)() { + m.alertData = value +} +// SetAlertDataReferenceStrings sets the alertDataReferenceStrings property value. The alertDataReferenceStrings property +func (m *ManagedTenantAlert) SetAlertDataReferenceStrings(value []AlertDataReferenceStringable)() { + m.alertDataReferenceStrings = value +} +// SetAlertLogs sets the alertLogs property value. The alertLogs property +func (m *ManagedTenantAlert) SetAlertLogs(value []ManagedTenantAlertLogable)() { + m.alertLogs = value +} +// SetAlertRule sets the alertRule property value. The alertRule property +func (m *ManagedTenantAlert) SetAlertRule(value ManagedTenantAlertRuleable)() { + m.alertRule = value +} +// SetAlertRuleDisplayName sets the alertRuleDisplayName property value. The alertRuleDisplayName property +func (m *ManagedTenantAlert) SetAlertRuleDisplayName(value *string)() { + m.alertRuleDisplayName = value +} +// SetApiNotifications sets the apiNotifications property value. The apiNotifications property +func (m *ManagedTenantAlert) SetApiNotifications(value []ManagedTenantApiNotificationable)() { + m.apiNotifications = value +} +// SetAssignedToUserId sets the assignedToUserId property value. The assignedToUserId property +func (m *ManagedTenantAlert) SetAssignedToUserId(value *string)() { + m.assignedToUserId = value +} +// SetCorrelationCount sets the correlationCount property value. The correlationCount property +func (m *ManagedTenantAlert) SetCorrelationCount(value *int32)() { + m.correlationCount = value +} +// SetCorrelationId sets the correlationId property value. The correlationId property +func (m *ManagedTenantAlert) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlert) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlert) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetEmailNotifications sets the emailNotifications property value. The emailNotifications property +func (m *ManagedTenantAlert) SetEmailNotifications(value []ManagedTenantEmailNotificationable)() { + m.emailNotifications = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlert) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlert) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetMessage sets the message property value. The message property +func (m *ManagedTenantAlert) SetMessage(value *string)() { + m.message = value +} +// SetSeverity sets the severity property value. The severity property +func (m *ManagedTenantAlert) SetSeverity(value *AlertSeverity)() { + m.severity = value +} +// SetStatus sets the status property value. The status property +func (m *ManagedTenantAlert) SetStatus(value *AlertStatus)() { + m.status = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *ManagedTenantAlert) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTitle sets the title property value. The title property +func (m *ManagedTenantAlert) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_response.go new file mode 100644 index 000000000..df9962e08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertCollectionResponse +type ManagedTenantAlertCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantAlertable +} +// NewManagedTenantAlertCollectionResponse instantiates a new ManagedTenantAlertCollectionResponse and sets the default values. +func NewManagedTenantAlertCollectionResponse()(*ManagedTenantAlertCollectionResponse) { + m := &ManagedTenantAlertCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantAlertCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantAlertCollectionResponse) GetValue()([]ManagedTenantAlertable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantAlertCollectionResponse) SetValue(value []ManagedTenantAlertable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_responseable.go new file mode 100644 index 000000000..a7733c5ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertCollectionResponseable +type ManagedTenantAlertCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantAlertable) + SetValue(value []ManagedTenantAlertable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log.go new file mode 100644 index 000000000..0e88e6895 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log.go @@ -0,0 +1,192 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertLog provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedTenantAlertLog struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alert property + alert ManagedTenantAlertable + // The content property + content AlertLogContentable + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewManagedTenantAlertLog instantiates a new managedTenantAlertLog and sets the default values. +func NewManagedTenantAlertLog()(*ManagedTenantAlertLog) { + m := &ManagedTenantAlertLog{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantAlertLogFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertLogFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertLog(), nil +} +// GetAlert gets the alert property value. The alert property +func (m *ManagedTenantAlertLog) GetAlert()(ManagedTenantAlertable) { + return m.alert +} +// GetContent gets the content property value. The content property +func (m *ManagedTenantAlertLog) GetContent()(AlertLogContentable) { + return m.content +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertLog) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertLog) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertLog) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alert"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlert(val.(ManagedTenantAlertable)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertLogContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContent(val.(AlertLogContentable)) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertLog) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertLog) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertLog) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("alert", m.GetAlert()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAlert sets the alert property value. The alert property +func (m *ManagedTenantAlertLog) SetAlert(value ManagedTenantAlertable)() { + m.alert = value +} +// SetContent sets the content property value. The content property +func (m *ManagedTenantAlertLog) SetContent(value AlertLogContentable)() { + m.content = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertLog) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertLog) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertLog) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertLog) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_response.go new file mode 100644 index 000000000..b069b592a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertLogCollectionResponse +type ManagedTenantAlertLogCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantAlertLogable +} +// NewManagedTenantAlertLogCollectionResponse instantiates a new ManagedTenantAlertLogCollectionResponse and sets the default values. +func NewManagedTenantAlertLogCollectionResponse()(*ManagedTenantAlertLogCollectionResponse) { + m := &ManagedTenantAlertLogCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantAlertLogCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertLogCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertLogCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertLogCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertLogFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertLogable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertLogable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantAlertLogCollectionResponse) GetValue()([]ManagedTenantAlertLogable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertLogCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantAlertLogCollectionResponse) SetValue(value []ManagedTenantAlertLogable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_responseable.go new file mode 100644 index 000000000..d850b41ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_log_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertLogCollectionResponseable +type ManagedTenantAlertLogCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantAlertLogable) + SetValue(value []ManagedTenantAlertLogable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_logable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_logable.go new file mode 100644 index 000000000..b08915bc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_logable.go @@ -0,0 +1,25 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertLogable +type ManagedTenantAlertLogable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlert()(ManagedTenantAlertable) + GetContent()(AlertLogContentable) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAlert(value ManagedTenantAlertable)() + SetContent(value AlertLogContentable)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule.go new file mode 100644 index 000000000..a450a2e47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule.go @@ -0,0 +1,452 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRule +type ManagedTenantAlertRule struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alertDisplayName property + alertDisplayName *string + // The alerts property + alerts []ManagedTenantAlertable + // The alertTTL property + alertTTL *int32 + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastRunDateTime property + lastRunDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The notificationFinalDestinations property + notificationFinalDestinations *NotificationDestination + // The ruleDefinition property + ruleDefinition ManagedTenantAlertRuleDefinitionable + // The severity property + severity *AlertSeverity + // The targets property + targets []NotificationTargetable + // The tenantIds property + tenantIds []TenantInfoable +} +// NewManagedTenantAlertRule instantiates a new managedTenantAlertRule and sets the default values. +func NewManagedTenantAlertRule()(*ManagedTenantAlertRule) { + m := &ManagedTenantAlertRule{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantAlertRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertRule(), nil +} +// GetAlertDisplayName gets the alertDisplayName property value. The alertDisplayName property +func (m *ManagedTenantAlertRule) GetAlertDisplayName()(*string) { + return m.alertDisplayName +} +// GetAlerts gets the alerts property value. The alerts property +func (m *ManagedTenantAlertRule) GetAlerts()([]ManagedTenantAlertable) { + return m.alerts +} +// GetAlertTTL gets the alertTTL property value. The alertTTL property +func (m *ManagedTenantAlertRule) GetAlertTTL()(*int32) { + return m.alertTTL +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertRule) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertRule) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *ManagedTenantAlertRule) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ManagedTenantAlertRule) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlertDisplayName(val) + } + return nil + } + res["alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertable) + } + m.SetAlerts(res) + } + return nil + } + res["alertTTL"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAlertTTL(val) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["lastRunDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRunDateTime(val) + } + return nil + } + res["notificationFinalDestinations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNotificationDestination) + if err != nil { + return err + } + if val != nil { + m.SetNotificationFinalDestinations(val.(*NotificationDestination)) + } + return nil + } + res["ruleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedTenantAlertRuleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRuleDefinition(val.(ManagedTenantAlertRuleDefinitionable)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*AlertSeverity)) + } + return nil + } + res["targets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationTargetable, len(val)) + for i, v := range val { + res[i] = v.(NotificationTargetable) + } + m.SetTargets(res) + } + return nil + } + res["tenantIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantInfoable, len(val)) + for i, v := range val { + res[i] = v.(TenantInfoable) + } + m.SetTenantIds(res) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertRule) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertRule) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetLastRunDateTime gets the lastRunDateTime property value. The lastRunDateTime property +func (m *ManagedTenantAlertRule) GetLastRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRunDateTime +} +// GetNotificationFinalDestinations gets the notificationFinalDestinations property value. The notificationFinalDestinations property +func (m *ManagedTenantAlertRule) GetNotificationFinalDestinations()(*NotificationDestination) { + return m.notificationFinalDestinations +} +// GetRuleDefinition gets the ruleDefinition property value. The ruleDefinition property +func (m *ManagedTenantAlertRule) GetRuleDefinition()(ManagedTenantAlertRuleDefinitionable) { + return m.ruleDefinition +} +// GetSeverity gets the severity property value. The severity property +func (m *ManagedTenantAlertRule) GetSeverity()(*AlertSeverity) { + return m.severity +} +// GetTargets gets the targets property value. The targets property +func (m *ManagedTenantAlertRule) GetTargets()([]NotificationTargetable) { + return m.targets +} +// GetTenantIds gets the tenantIds property value. The tenantIds property +func (m *ManagedTenantAlertRule) GetTenantIds()([]TenantInfoable) { + return m.tenantIds +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("alertDisplayName", m.GetAlertDisplayName()) + if err != nil { + return err + } + } + if m.GetAlerts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlerts())) + for i, v := range m.GetAlerts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alerts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("alertTTL", m.GetAlertTTL()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRunDateTime", m.GetLastRunDateTime()) + if err != nil { + return err + } + } + if m.GetNotificationFinalDestinations() != nil { + cast := (*m.GetNotificationFinalDestinations()).String() + err = writer.WriteStringValue("notificationFinalDestinations", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("ruleDefinition", m.GetRuleDefinition()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargets())) + for i, v := range m.GetTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targets", cast) + if err != nil { + return err + } + } + if m.GetTenantIds() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenantIds())) + for i, v := range m.GetTenantIds() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenantIds", cast) + if err != nil { + return err + } + } + return nil +} +// SetAlertDisplayName sets the alertDisplayName property value. The alertDisplayName property +func (m *ManagedTenantAlertRule) SetAlertDisplayName(value *string)() { + m.alertDisplayName = value +} +// SetAlerts sets the alerts property value. The alerts property +func (m *ManagedTenantAlertRule) SetAlerts(value []ManagedTenantAlertable)() { + m.alerts = value +} +// SetAlertTTL sets the alertTTL property value. The alertTTL property +func (m *ManagedTenantAlertRule) SetAlertTTL(value *int32)() { + m.alertTTL = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertRule) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertRule) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *ManagedTenantAlertRule) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ManagedTenantAlertRule) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertRule) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertRule) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetLastRunDateTime sets the lastRunDateTime property value. The lastRunDateTime property +func (m *ManagedTenantAlertRule) SetLastRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRunDateTime = value +} +// SetNotificationFinalDestinations sets the notificationFinalDestinations property value. The notificationFinalDestinations property +func (m *ManagedTenantAlertRule) SetNotificationFinalDestinations(value *NotificationDestination)() { + m.notificationFinalDestinations = value +} +// SetRuleDefinition sets the ruleDefinition property value. The ruleDefinition property +func (m *ManagedTenantAlertRule) SetRuleDefinition(value ManagedTenantAlertRuleDefinitionable)() { + m.ruleDefinition = value +} +// SetSeverity sets the severity property value. The severity property +func (m *ManagedTenantAlertRule) SetSeverity(value *AlertSeverity)() { + m.severity = value +} +// SetTargets sets the targets property value. The targets property +func (m *ManagedTenantAlertRule) SetTargets(value []NotificationTargetable)() { + m.targets = value +} +// SetTenantIds sets the tenantIds property value. The tenantIds property +func (m *ManagedTenantAlertRule) SetTenantIds(value []TenantInfoable)() { + m.tenantIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_response.go new file mode 100644 index 000000000..031880241 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleCollectionResponse +type ManagedTenantAlertRuleCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantAlertRuleable +} +// NewManagedTenantAlertRuleCollectionResponse instantiates a new ManagedTenantAlertRuleCollectionResponse and sets the default values. +func NewManagedTenantAlertRuleCollectionResponse()(*ManagedTenantAlertRuleCollectionResponse) { + m := &ManagedTenantAlertRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantAlertRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertRuleable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantAlertRuleCollectionResponse) GetValue()([]ManagedTenantAlertRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantAlertRuleCollectionResponse) SetValue(value []ManagedTenantAlertRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_responseable.go new file mode 100644 index 000000000..31548c6f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleCollectionResponseable +type ManagedTenantAlertRuleCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantAlertRuleable) + SetValue(value []ManagedTenantAlertRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition.go new file mode 100644 index 000000000..ee3b70b17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition.go @@ -0,0 +1,226 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleDefinition +type ManagedTenantAlertRuleDefinition struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alertRules property + alertRules []ManagedTenantAlertRuleable + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The definitionTemplate property + definitionTemplate AlertRuleDefinitionTemplateable + // The displayName property + displayName *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewManagedTenantAlertRuleDefinition instantiates a new managedTenantAlertRuleDefinition and sets the default values. +func NewManagedTenantAlertRuleDefinition()(*ManagedTenantAlertRuleDefinition) { + m := &ManagedTenantAlertRuleDefinition{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantAlertRuleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertRuleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertRuleDefinition(), nil +} +// GetAlertRules gets the alertRules property value. The alertRules property +func (m *ManagedTenantAlertRuleDefinition) GetAlertRules()([]ManagedTenantAlertRuleable) { + return m.alertRules +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertRuleDefinition) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertRuleDefinition) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefinitionTemplate gets the definitionTemplate property value. The definitionTemplate property +func (m *ManagedTenantAlertRuleDefinition) GetDefinitionTemplate()(AlertRuleDefinitionTemplateable) { + return m.definitionTemplate +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ManagedTenantAlertRuleDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertRuleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alertRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertRuleable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertRuleable) + } + m.SetAlertRules(res) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["definitionTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAlertRuleDefinitionTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinitionTemplate(val.(AlertRuleDefinitionTemplateable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertRuleDefinition) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertRuleDefinition) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertRuleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAlertRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlertRules())) + for i, v := range m.GetAlertRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alertRules", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("definitionTemplate", m.GetDefinitionTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAlertRules sets the alertRules property value. The alertRules property +func (m *ManagedTenantAlertRuleDefinition) SetAlertRules(value []ManagedTenantAlertRuleable)() { + m.alertRules = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantAlertRuleDefinition) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantAlertRuleDefinition) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefinitionTemplate sets the definitionTemplate property value. The definitionTemplate property +func (m *ManagedTenantAlertRuleDefinition) SetDefinitionTemplate(value AlertRuleDefinitionTemplateable)() { + m.definitionTemplate = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ManagedTenantAlertRuleDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantAlertRuleDefinition) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantAlertRuleDefinition) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_response.go new file mode 100644 index 000000000..78639dacb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleDefinitionCollectionResponse +type ManagedTenantAlertRuleDefinitionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantAlertRuleDefinitionable +} +// NewManagedTenantAlertRuleDefinitionCollectionResponse instantiates a new ManagedTenantAlertRuleDefinitionCollectionResponse and sets the default values. +func NewManagedTenantAlertRuleDefinitionCollectionResponse()(*ManagedTenantAlertRuleDefinitionCollectionResponse) { + m := &ManagedTenantAlertRuleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantAlertRuleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantAlertRuleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantAlertRuleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantAlertRuleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantAlertRuleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantAlertRuleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantAlertRuleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantAlertRuleDefinitionCollectionResponse) GetValue()([]ManagedTenantAlertRuleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantAlertRuleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantAlertRuleDefinitionCollectionResponse) SetValue(value []ManagedTenantAlertRuleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_responseable.go new file mode 100644 index 000000000..22bbdec81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definition_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleDefinitionCollectionResponseable +type ManagedTenantAlertRuleDefinitionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantAlertRuleDefinitionable) + SetValue(value []ManagedTenantAlertRuleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definitionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definitionable.go new file mode 100644 index 000000000..33b8412c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_rule_definitionable.go @@ -0,0 +1,27 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleDefinitionable +type ManagedTenantAlertRuleDefinitionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertRules()([]ManagedTenantAlertRuleable) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefinitionTemplate()(AlertRuleDefinitionTemplateable) + GetDisplayName()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAlertRules(value []ManagedTenantAlertRuleable)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefinitionTemplate(value AlertRuleDefinitionTemplateable)() + SetDisplayName(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_ruleable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_ruleable.go new file mode 100644 index 000000000..cf48f5458 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alert_ruleable.go @@ -0,0 +1,43 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertRuleable +type ManagedTenantAlertRuleable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertDisplayName()(*string) + GetAlerts()([]ManagedTenantAlertable) + GetAlertTTL()(*int32) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastRunDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotificationFinalDestinations()(*NotificationDestination) + GetRuleDefinition()(ManagedTenantAlertRuleDefinitionable) + GetSeverity()(*AlertSeverity) + GetTargets()([]NotificationTargetable) + GetTenantIds()([]TenantInfoable) + SetAlertDisplayName(value *string)() + SetAlerts(value []ManagedTenantAlertable)() + SetAlertTTL(value *int32)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastRunDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotificationFinalDestinations(value *NotificationDestination)() + SetRuleDefinition(value ManagedTenantAlertRuleDefinitionable)() + SetSeverity(value *AlertSeverity)() + SetTargets(value []NotificationTargetable)() + SetTenantIds(value []TenantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alertable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alertable.go new file mode 100644 index 000000000..3c2ee5bff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_alertable.go @@ -0,0 +1,51 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantAlertable +type ManagedTenantAlertable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertData()(AlertDataable) + GetAlertDataReferenceStrings()([]AlertDataReferenceStringable) + GetAlertLogs()([]ManagedTenantAlertLogable) + GetAlertRule()(ManagedTenantAlertRuleable) + GetAlertRuleDisplayName()(*string) + GetApiNotifications()([]ManagedTenantApiNotificationable) + GetAssignedToUserId()(*string) + GetCorrelationCount()(*int32) + GetCorrelationId()(*string) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmailNotifications()([]ManagedTenantEmailNotificationable) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) + GetSeverity()(*AlertSeverity) + GetStatus()(*AlertStatus) + GetTenantId()(*string) + GetTitle()(*string) + SetAlertData(value AlertDataable)() + SetAlertDataReferenceStrings(value []AlertDataReferenceStringable)() + SetAlertLogs(value []ManagedTenantAlertLogable)() + SetAlertRule(value ManagedTenantAlertRuleable)() + SetAlertRuleDisplayName(value *string)() + SetApiNotifications(value []ManagedTenantApiNotificationable)() + SetAssignedToUserId(value *string)() + SetCorrelationCount(value *int32)() + SetCorrelationId(value *string)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmailNotifications(value []ManagedTenantEmailNotificationable)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() + SetSeverity(value *AlertSeverity)() + SetStatus(value *AlertStatus)() + SetTenantId(value *string)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification.go new file mode 100644 index 000000000..99d229b5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification.go @@ -0,0 +1,270 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantApiNotification provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedTenantApiNotification struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alert property + alert ManagedTenantAlertable + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The isAcknowledged property + isAcknowledged *bool + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The message property + message *string + // The title property + title *string + // The userId property + userId *string +} +// NewManagedTenantApiNotification instantiates a new managedTenantApiNotification and sets the default values. +func NewManagedTenantApiNotification()(*ManagedTenantApiNotification) { + m := &ManagedTenantApiNotification{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantApiNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantApiNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantApiNotification(), nil +} +// GetAlert gets the alert property value. The alert property +func (m *ManagedTenantApiNotification) GetAlert()(ManagedTenantAlertable) { + return m.alert +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantApiNotification) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantApiNotification) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantApiNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alert"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlert(val.(ManagedTenantAlertable)) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["isAcknowledged"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAcknowledged(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetIsAcknowledged gets the isAcknowledged property value. The isAcknowledged property +func (m *ManagedTenantApiNotification) GetIsAcknowledged()(*bool) { + return m.isAcknowledged +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantApiNotification) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantApiNotification) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetMessage gets the message property value. The message property +func (m *ManagedTenantApiNotification) GetMessage()(*string) { + return m.message +} +// GetTitle gets the title property value. The title property +func (m *ManagedTenantApiNotification) GetTitle()(*string) { + return m.title +} +// GetUserId gets the userId property value. The userId property +func (m *ManagedTenantApiNotification) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *ManagedTenantApiNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("alert", m.GetAlert()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAcknowledged", m.GetIsAcknowledged()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetAlert sets the alert property value. The alert property +func (m *ManagedTenantApiNotification) SetAlert(value ManagedTenantAlertable)() { + m.alert = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantApiNotification) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantApiNotification) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetIsAcknowledged sets the isAcknowledged property value. The isAcknowledged property +func (m *ManagedTenantApiNotification) SetIsAcknowledged(value *bool)() { + m.isAcknowledged = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantApiNotification) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantApiNotification) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetMessage sets the message property value. The message property +func (m *ManagedTenantApiNotification) SetMessage(value *string)() { + m.message = value +} +// SetTitle sets the title property value. The title property +func (m *ManagedTenantApiNotification) SetTitle(value *string)() { + m.title = value +} +// SetUserId sets the userId property value. The userId property +func (m *ManagedTenantApiNotification) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_response.go new file mode 100644 index 000000000..89266be51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantApiNotificationCollectionResponse +type ManagedTenantApiNotificationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantApiNotificationable +} +// NewManagedTenantApiNotificationCollectionResponse instantiates a new ManagedTenantApiNotificationCollectionResponse and sets the default values. +func NewManagedTenantApiNotificationCollectionResponse()(*ManagedTenantApiNotificationCollectionResponse) { + m := &ManagedTenantApiNotificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantApiNotificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantApiNotificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantApiNotificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantApiNotificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantApiNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantApiNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantApiNotificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantApiNotificationCollectionResponse) GetValue()([]ManagedTenantApiNotificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantApiNotificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantApiNotificationCollectionResponse) SetValue(value []ManagedTenantApiNotificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_responseable.go new file mode 100644 index 000000000..4da8e9f80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notification_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantApiNotificationCollectionResponseable +type ManagedTenantApiNotificationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantApiNotificationable) + SetValue(value []ManagedTenantApiNotificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notificationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notificationable.go new file mode 100644 index 000000000..977a4e042 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_api_notificationable.go @@ -0,0 +1,31 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantApiNotificationable +type ManagedTenantApiNotificationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlert()(ManagedTenantAlertable) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsAcknowledged()(*bool) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessage()(*string) + GetTitle()(*string) + GetUserId()(*string) + SetAlert(value ManagedTenantAlertable)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsAcknowledged(value *bool)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessage(value *string)() + SetTitle(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification.go new file mode 100644 index 000000000..ea41d4838 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification.go @@ -0,0 +1,252 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantEmailNotification provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedTenantEmailNotification struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The alert property + alert ManagedTenantAlertable + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The emailAddresses property + emailAddresses []Emailable + // The emailBody property + emailBody *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The subject property + subject *string +} +// NewManagedTenantEmailNotification instantiates a new managedTenantEmailNotification and sets the default values. +func NewManagedTenantEmailNotification()(*ManagedTenantEmailNotification) { + m := &ManagedTenantEmailNotification{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantEmailNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantEmailNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantEmailNotification(), nil +} +// GetAlert gets the alert property value. The alert property +func (m *ManagedTenantEmailNotification) GetAlert()(ManagedTenantAlertable) { + return m.alert +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantEmailNotification) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantEmailNotification) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetEmailAddresses gets the emailAddresses property value. The emailAddresses property +func (m *ManagedTenantEmailNotification) GetEmailAddresses()([]Emailable) { + return m.emailAddresses +} +// GetEmailBody gets the emailBody property value. The emailBody property +func (m *ManagedTenantEmailNotification) GetEmailBody()(*string) { + return m.emailBody +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantEmailNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alert"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagedTenantAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAlert(val.(ManagedTenantAlertable)) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["emailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Emailable, len(val)) + for i, v := range val { + res[i] = v.(Emailable) + } + m.SetEmailAddresses(res) + } + return nil + } + res["emailBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailBody(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantEmailNotification) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantEmailNotification) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetSubject gets the subject property value. The subject property +func (m *ManagedTenantEmailNotification) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *ManagedTenantEmailNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("alert", m.GetAlert()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetEmailAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailAddresses())) + for i, v := range m.GetEmailAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailAddresses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailBody", m.GetEmailBody()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetAlert sets the alert property value. The alert property +func (m *ManagedTenantEmailNotification) SetAlert(value ManagedTenantAlertable)() { + m.alert = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantEmailNotification) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantEmailNotification) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetEmailAddresses sets the emailAddresses property value. The emailAddresses property +func (m *ManagedTenantEmailNotification) SetEmailAddresses(value []Emailable)() { + m.emailAddresses = value +} +// SetEmailBody sets the emailBody property value. The emailBody property +func (m *ManagedTenantEmailNotification) SetEmailBody(value *string)() { + m.emailBody = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantEmailNotification) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantEmailNotification) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetSubject sets the subject property value. The subject property +func (m *ManagedTenantEmailNotification) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_response.go new file mode 100644 index 000000000..582087867 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantEmailNotificationCollectionResponse +type ManagedTenantEmailNotificationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantEmailNotificationable +} +// NewManagedTenantEmailNotificationCollectionResponse instantiates a new ManagedTenantEmailNotificationCollectionResponse and sets the default values. +func NewManagedTenantEmailNotificationCollectionResponse()(*ManagedTenantEmailNotificationCollectionResponse) { + m := &ManagedTenantEmailNotificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantEmailNotificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantEmailNotificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantEmailNotificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantEmailNotificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantEmailNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantEmailNotificationable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantEmailNotificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantEmailNotificationCollectionResponse) GetValue()([]ManagedTenantEmailNotificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantEmailNotificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantEmailNotificationCollectionResponse) SetValue(value []ManagedTenantEmailNotificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_responseable.go new file mode 100644 index 000000000..992e36a76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notification_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantEmailNotificationCollectionResponseable +type ManagedTenantEmailNotificationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantEmailNotificationable) + SetValue(value []ManagedTenantEmailNotificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notificationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notificationable.go new file mode 100644 index 000000000..ae94e231a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_email_notificationable.go @@ -0,0 +1,29 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantEmailNotificationable +type ManagedTenantEmailNotificationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlert()(ManagedTenantAlertable) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmailAddresses()([]Emailable) + GetEmailBody()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubject()(*string) + SetAlert(value ManagedTenantAlertable)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmailAddresses(value []Emailable)() + SetEmailBody(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint.go new file mode 100644 index 000000000..dad932766 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint.go @@ -0,0 +1,218 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantTicketingEndpoint provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagedTenantTicketingEndpoint struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The displayName property + displayName *string + // The emailAddress property + emailAddress *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The phoneNumber property + phoneNumber *string +} +// NewManagedTenantTicketingEndpoint instantiates a new managedTenantTicketingEndpoint and sets the default values. +func NewManagedTenantTicketingEndpoint()(*ManagedTenantTicketingEndpoint) { + m := &ManagedTenantTicketingEndpoint{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagedTenantTicketingEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantTicketingEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantTicketingEndpoint(), nil +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantTicketingEndpoint) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantTicketingEndpoint) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ManagedTenantTicketingEndpoint) GetDisplayName()(*string) { + return m.displayName +} +// GetEmailAddress gets the emailAddress property value. The emailAddress property +func (m *ManagedTenantTicketingEndpoint) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantTicketingEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantTicketingEndpoint) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantTicketingEndpoint) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *ManagedTenantTicketingEndpoint) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// Serialize serializes information the current object +func (m *ManagedTenantTicketingEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagedTenantTicketingEndpoint) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagedTenantTicketingEndpoint) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ManagedTenantTicketingEndpoint) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmailAddress sets the emailAddress property value. The emailAddress property +func (m *ManagedTenantTicketingEndpoint) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagedTenantTicketingEndpoint) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagedTenantTicketingEndpoint) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *ManagedTenantTicketingEndpoint) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_response.go new file mode 100644 index 000000000..cc2e03d88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantTicketingEndpointCollectionResponse +type ManagedTenantTicketingEndpointCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagedTenantTicketingEndpointable +} +// NewManagedTenantTicketingEndpointCollectionResponse instantiates a new ManagedTenantTicketingEndpointCollectionResponse and sets the default values. +func NewManagedTenantTicketingEndpointCollectionResponse()(*ManagedTenantTicketingEndpointCollectionResponse) { + m := &ManagedTenantTicketingEndpointCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagedTenantTicketingEndpointCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagedTenantTicketingEndpointCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagedTenantTicketingEndpointCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagedTenantTicketingEndpointCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedTenantTicketingEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedTenantTicketingEndpointable, len(val)) + for i, v := range val { + res[i] = v.(ManagedTenantTicketingEndpointable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagedTenantTicketingEndpointCollectionResponse) GetValue()([]ManagedTenantTicketingEndpointable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagedTenantTicketingEndpointCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagedTenantTicketingEndpointCollectionResponse) SetValue(value []ManagedTenantTicketingEndpointable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_responseable.go new file mode 100644 index 000000000..e51919afd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpoint_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantTicketingEndpointCollectionResponseable +type ManagedTenantTicketingEndpointCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagedTenantTicketingEndpointable) + SetValue(value []ManagedTenantTicketingEndpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpointable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpointable.go new file mode 100644 index 000000000..ff3e7808e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenant_ticketing_endpointable.go @@ -0,0 +1,27 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantTicketingEndpointable +type ManagedTenantTicketingEndpointable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetEmailAddress()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPhoneNumber()(*string) + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetEmailAddress(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPhoneNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenantable.go b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenantable.go new file mode 100644 index 000000000..f77aa63f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/managed_tenantable.go @@ -0,0 +1,80 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagedTenantable +type ManagedTenantable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregatedPolicyCompliances()([]AggregatedPolicyComplianceable) + GetAuditEvents()([]AuditEventable) + GetCloudPcConnections()([]CloudPcConnectionable) + GetCloudPcDevices()([]CloudPcDeviceable) + GetCloudPcsOverview()([]CloudPcOverviewable) + GetConditionalAccessPolicyCoverages()([]ConditionalAccessPolicyCoverageable) + GetCredentialUserRegistrationsSummaries()([]CredentialUserRegistrationsSummaryable) + GetDeviceCompliancePolicySettingStateSummaries()([]DeviceCompliancePolicySettingStateSummaryable) + GetManagedDeviceCompliances()([]ManagedDeviceComplianceable) + GetManagedDeviceComplianceTrends()([]ManagedDeviceComplianceTrendable) + GetManagedTenantAlertLogs()([]ManagedTenantAlertLogable) + GetManagedTenantAlertRuleDefinitions()([]ManagedTenantAlertRuleDefinitionable) + GetManagedTenantAlertRules()([]ManagedTenantAlertRuleable) + GetManagedTenantAlerts()([]ManagedTenantAlertable) + GetManagedTenantApiNotifications()([]ManagedTenantApiNotificationable) + GetManagedTenantEmailNotifications()([]ManagedTenantEmailNotificationable) + GetManagedTenantTicketingEndpoints()([]ManagedTenantTicketingEndpointable) + GetManagementActions()([]ManagementActionable) + GetManagementActionTenantDeploymentStatuses()([]ManagementActionTenantDeploymentStatusable) + GetManagementIntents()([]ManagementIntentable) + GetManagementTemplateCollections()([]ManagementTemplateCollectionable) + GetManagementTemplateCollectionTenantSummaries()([]ManagementTemplateCollectionTenantSummaryable) + GetManagementTemplates()([]ManagementTemplateable) + GetManagementTemplateSteps()([]ManagementTemplateStepable) + GetManagementTemplateStepTenantSummaries()([]ManagementTemplateStepTenantSummaryable) + GetManagementTemplateStepVersions()([]ManagementTemplateStepVersionable) + GetMyRoles()([]MyRoleable) + GetTenantGroups()([]TenantGroupable) + GetTenants()([]Tenantable) + GetTenantsCustomizedInformation()([]TenantCustomizedInformationable) + GetTenantsDetailedInformation()([]TenantDetailedInformationable) + GetTenantTags()([]TenantTagable) + GetWindowsDeviceMalwareStates()([]WindowsDeviceMalwareStateable) + GetWindowsProtectionStates()([]WindowsProtectionStateable) + SetAggregatedPolicyCompliances(value []AggregatedPolicyComplianceable)() + SetAuditEvents(value []AuditEventable)() + SetCloudPcConnections(value []CloudPcConnectionable)() + SetCloudPcDevices(value []CloudPcDeviceable)() + SetCloudPcsOverview(value []CloudPcOverviewable)() + SetConditionalAccessPolicyCoverages(value []ConditionalAccessPolicyCoverageable)() + SetCredentialUserRegistrationsSummaries(value []CredentialUserRegistrationsSummaryable)() + SetDeviceCompliancePolicySettingStateSummaries(value []DeviceCompliancePolicySettingStateSummaryable)() + SetManagedDeviceCompliances(value []ManagedDeviceComplianceable)() + SetManagedDeviceComplianceTrends(value []ManagedDeviceComplianceTrendable)() + SetManagedTenantAlertLogs(value []ManagedTenantAlertLogable)() + SetManagedTenantAlertRuleDefinitions(value []ManagedTenantAlertRuleDefinitionable)() + SetManagedTenantAlertRules(value []ManagedTenantAlertRuleable)() + SetManagedTenantAlerts(value []ManagedTenantAlertable)() + SetManagedTenantApiNotifications(value []ManagedTenantApiNotificationable)() + SetManagedTenantEmailNotifications(value []ManagedTenantEmailNotificationable)() + SetManagedTenantTicketingEndpoints(value []ManagedTenantTicketingEndpointable)() + SetManagementActions(value []ManagementActionable)() + SetManagementActionTenantDeploymentStatuses(value []ManagementActionTenantDeploymentStatusable)() + SetManagementIntents(value []ManagementIntentable)() + SetManagementTemplateCollections(value []ManagementTemplateCollectionable)() + SetManagementTemplateCollectionTenantSummaries(value []ManagementTemplateCollectionTenantSummaryable)() + SetManagementTemplates(value []ManagementTemplateable)() + SetManagementTemplateSteps(value []ManagementTemplateStepable)() + SetManagementTemplateStepTenantSummaries(value []ManagementTemplateStepTenantSummaryable)() + SetManagementTemplateStepVersions(value []ManagementTemplateStepVersionable)() + SetMyRoles(value []MyRoleable)() + SetTenantGroups(value []TenantGroupable)() + SetTenants(value []Tenantable)() + SetTenantsCustomizedInformation(value []TenantCustomizedInformationable)() + SetTenantsDetailedInformation(value []TenantDetailedInformationable)() + SetTenantTags(value []TenantTagable)() + SetWindowsDeviceMalwareStates(value []WindowsDeviceMalwareStateable)() + SetWindowsProtectionStates(value []WindowsProtectionStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action.go new file mode 100644 index 000000000..19f961a88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action.go @@ -0,0 +1,200 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementAction provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementAction struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The category property + category *ManagementCategory + // The description for the management action. Optional. Read-only. + description *string + // The display name for the management action. Optional. Read-only. + displayName *string + // The reference for the management template used to generate the management action. Required. Read-only. + referenceTemplateId *string + // The referenceTemplateVersion property + referenceTemplateVersion *int32 + // The collection of workload actions associated with the management action. Required. Read-only. + workloadActions []WorkloadActionable +} +// NewManagementAction instantiates a new managementAction and sets the default values. +func NewManagementAction()(*ManagementAction) { + m := &ManagementAction{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementAction(), nil +} +// GetCategory gets the category property value. The category property +func (m *ManagementAction) GetCategory()(*ManagementCategory) { + return m.category +} +// GetDescription gets the description property value. The description for the management action. Optional. Read-only. +func (m *ManagementAction) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the management action. Optional. Read-only. +func (m *ManagementAction) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*ManagementCategory)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["referenceTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceTemplateId(val) + } + return nil + } + res["referenceTemplateVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReferenceTemplateVersion(val) + } + return nil + } + res["workloadActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadActionable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadActionable) + } + m.SetWorkloadActions(res) + } + return nil + } + return res +} +// GetReferenceTemplateId gets the referenceTemplateId property value. The reference for the management template used to generate the management action. Required. Read-only. +func (m *ManagementAction) GetReferenceTemplateId()(*string) { + return m.referenceTemplateId +} +// GetReferenceTemplateVersion gets the referenceTemplateVersion property value. The referenceTemplateVersion property +func (m *ManagementAction) GetReferenceTemplateVersion()(*int32) { + return m.referenceTemplateVersion +} +// GetWorkloadActions gets the workloadActions property value. The collection of workload actions associated with the management action. Required. Read-only. +func (m *ManagementAction) GetWorkloadActions()([]WorkloadActionable) { + return m.workloadActions +} +// Serialize serializes information the current object +func (m *ManagementAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("referenceTemplateId", m.GetReferenceTemplateId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("referenceTemplateVersion", m.GetReferenceTemplateVersion()) + if err != nil { + return err + } + } + if m.GetWorkloadActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkloadActions())) + for i, v := range m.GetWorkloadActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workloadActions", cast) + if err != nil { + return err + } + } + return nil +} +// SetCategory sets the category property value. The category property +func (m *ManagementAction) SetCategory(value *ManagementCategory)() { + m.category = value +} +// SetDescription sets the description property value. The description for the management action. Optional. Read-only. +func (m *ManagementAction) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the management action. Optional. Read-only. +func (m *ManagementAction) SetDisplayName(value *string)() { + m.displayName = value +} +// SetReferenceTemplateId sets the referenceTemplateId property value. The reference for the management template used to generate the management action. Required. Read-only. +func (m *ManagementAction) SetReferenceTemplateId(value *string)() { + m.referenceTemplateId = value +} +// SetReferenceTemplateVersion sets the referenceTemplateVersion property value. The referenceTemplateVersion property +func (m *ManagementAction) SetReferenceTemplateVersion(value *int32)() { + m.referenceTemplateVersion = value +} +// SetWorkloadActions sets the workloadActions property value. The collection of workload actions associated with the management action. Required. Read-only. +func (m *ManagementAction) SetWorkloadActions(value []WorkloadActionable)() { + m.workloadActions = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_response.go new file mode 100644 index 000000000..98a175ec6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionCollectionResponse +type ManagementActionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementActionable +} +// NewManagementActionCollectionResponse instantiates a new ManagementActionCollectionResponse and sets the default values. +func NewManagementActionCollectionResponse()(*ManagementActionCollectionResponse) { + m := &ManagementActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementActionCollectionResponse) GetValue()([]ManagementActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementActionCollectionResponse) SetValue(value []ManagementActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_responseable.go new file mode 100644 index 000000000..04682f6b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionCollectionResponseable +type ManagementActionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementActionable) + SetValue(value []ManagementActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status.go new file mode 100644 index 000000000..c6a4bd151 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status.go @@ -0,0 +1,210 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementActionDeploymentStatus +type ManagementActionDeploymentStatus 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 identifier for the management action. Required. Read-only. + managementActionId *string + // The management template identifier that was used to generate the management action. Required. Read-only. + managementTemplateId *string + // The managementTemplateVersion property + managementTemplateVersion *int32 + // The OdataType property + odataType *string + // The status property + status *ManagementActionStatus + // The collection of workload action deployment statues for the given management action. Optional. + workloadActionDeploymentStatuses []WorkloadActionDeploymentStatusable +} +// NewManagementActionDeploymentStatus instantiates a new managementActionDeploymentStatus and sets the default values. +func NewManagementActionDeploymentStatus()(*ManagementActionDeploymentStatus) { + m := &ManagementActionDeploymentStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagementActionDeploymentStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionDeploymentStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionDeploymentStatus(), 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 *ManagementActionDeploymentStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionDeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["managementActionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementActionId(val) + } + return nil + } + res["managementTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateId(val) + } + return nil + } + res["managementTemplateVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateVersion(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementActionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ManagementActionStatus)) + } + return nil + } + res["workloadActionDeploymentStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadActionDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadActionDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadActionDeploymentStatusable) + } + m.SetWorkloadActionDeploymentStatuses(res) + } + return nil + } + return res +} +// GetManagementActionId gets the managementActionId property value. The identifier for the management action. Required. Read-only. +func (m *ManagementActionDeploymentStatus) GetManagementActionId()(*string) { + return m.managementActionId +} +// GetManagementTemplateId gets the managementTemplateId property value. The management template identifier that was used to generate the management action. Required. Read-only. +func (m *ManagementActionDeploymentStatus) GetManagementTemplateId()(*string) { + return m.managementTemplateId +} +// GetManagementTemplateVersion gets the managementTemplateVersion property value. The managementTemplateVersion property +func (m *ManagementActionDeploymentStatus) GetManagementTemplateVersion()(*int32) { + return m.managementTemplateVersion +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagementActionDeploymentStatus) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status property +func (m *ManagementActionDeploymentStatus) GetStatus()(*ManagementActionStatus) { + return m.status +} +// GetWorkloadActionDeploymentStatuses gets the workloadActionDeploymentStatuses property value. The collection of workload action deployment statues for the given management action. Optional. +func (m *ManagementActionDeploymentStatus) GetWorkloadActionDeploymentStatuses()([]WorkloadActionDeploymentStatusable) { + return m.workloadActionDeploymentStatuses +} +// Serialize serializes information the current object +func (m *ManagementActionDeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("managementActionId", m.GetManagementActionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managementTemplateId", m.GetManagementTemplateId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("managementTemplateVersion", m.GetManagementTemplateVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetWorkloadActionDeploymentStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkloadActionDeploymentStatuses())) + for i, v := range m.GetWorkloadActionDeploymentStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("workloadActionDeploymentStatuses", 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 *ManagementActionDeploymentStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetManagementActionId sets the managementActionId property value. The identifier for the management action. Required. Read-only. +func (m *ManagementActionDeploymentStatus) SetManagementActionId(value *string)() { + m.managementActionId = value +} +// SetManagementTemplateId sets the managementTemplateId property value. The management template identifier that was used to generate the management action. Required. Read-only. +func (m *ManagementActionDeploymentStatus) SetManagementTemplateId(value *string)() { + m.managementTemplateId = value +} +// SetManagementTemplateVersion sets the managementTemplateVersion property value. The managementTemplateVersion property +func (m *ManagementActionDeploymentStatus) SetManagementTemplateVersion(value *int32)() { + m.managementTemplateVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagementActionDeploymentStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status property +func (m *ManagementActionDeploymentStatus) SetStatus(value *ManagementActionStatus)() { + m.status = value +} +// SetWorkloadActionDeploymentStatuses sets the workloadActionDeploymentStatuses property value. The collection of workload action deployment statues for the given management action. Optional. +func (m *ManagementActionDeploymentStatus) SetWorkloadActionDeploymentStatuses(value []WorkloadActionDeploymentStatusable)() { + m.workloadActionDeploymentStatuses = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_response.go new file mode 100644 index 000000000..b0c85dbde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionDeploymentStatusCollectionResponse +type ManagementActionDeploymentStatusCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementActionDeploymentStatusable +} +// NewManagementActionDeploymentStatusCollectionResponse instantiates a new ManagementActionDeploymentStatusCollectionResponse and sets the default values. +func NewManagementActionDeploymentStatusCollectionResponse()(*ManagementActionDeploymentStatusCollectionResponse) { + m := &ManagementActionDeploymentStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementActionDeploymentStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionDeploymentStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionDeploymentStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionDeploymentStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionDeploymentStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementActionDeploymentStatusCollectionResponse) GetValue()([]ManagementActionDeploymentStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementActionDeploymentStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementActionDeploymentStatusCollectionResponse) SetValue(value []ManagementActionDeploymentStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_responseable.go new file mode 100644 index 000000000..47998cc16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_status_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionDeploymentStatusCollectionResponseable +type ManagementActionDeploymentStatusCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementActionDeploymentStatusable) + SetValue(value []ManagementActionDeploymentStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_statusable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_statusable.go new file mode 100644 index 000000000..4d7a1d868 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_deployment_statusable.go @@ -0,0 +1,23 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementActionDeploymentStatusable +type ManagementActionDeploymentStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManagementActionId()(*string) + GetManagementTemplateId()(*string) + GetManagementTemplateVersion()(*int32) + GetOdataType()(*string) + GetStatus()(*ManagementActionStatus) + GetWorkloadActionDeploymentStatuses()([]WorkloadActionDeploymentStatusable) + SetManagementActionId(value *string)() + SetManagementTemplateId(value *string)() + SetManagementTemplateVersion(value *int32)() + SetOdataType(value *string)() + SetStatus(value *ManagementActionStatus)() + SetWorkloadActionDeploymentStatuses(value []WorkloadActionDeploymentStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info.go new file mode 100644 index 000000000..5369e53c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info.go @@ -0,0 +1,149 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementActionInfo +type ManagementActionInfo 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 identifier for the management action. Required. Read-only. + managementActionId *string + // The identifier for the management template. Required. Read-only. + managementTemplateId *string + // The managementTemplateVersion property + managementTemplateVersion *int32 + // The OdataType property + odataType *string +} +// NewManagementActionInfo instantiates a new managementActionInfo and sets the default values. +func NewManagementActionInfo()(*ManagementActionInfo) { + m := &ManagementActionInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagementActionInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionInfo(), 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 *ManagementActionInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["managementActionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementActionId(val) + } + return nil + } + res["managementTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateId(val) + } + return nil + } + res["managementTemplateVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateVersion(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 + } + return res +} +// GetManagementActionId gets the managementActionId property value. The identifier for the management action. Required. Read-only. +func (m *ManagementActionInfo) GetManagementActionId()(*string) { + return m.managementActionId +} +// GetManagementTemplateId gets the managementTemplateId property value. The identifier for the management template. Required. Read-only. +func (m *ManagementActionInfo) GetManagementTemplateId()(*string) { + return m.managementTemplateId +} +// GetManagementTemplateVersion gets the managementTemplateVersion property value. The managementTemplateVersion property +func (m *ManagementActionInfo) GetManagementTemplateVersion()(*int32) { + return m.managementTemplateVersion +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagementActionInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagementActionInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("managementActionId", m.GetManagementActionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managementTemplateId", m.GetManagementTemplateId()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("managementTemplateVersion", m.GetManagementTemplateVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagementActionInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetManagementActionId sets the managementActionId property value. The identifier for the management action. Required. Read-only. +func (m *ManagementActionInfo) SetManagementActionId(value *string)() { + m.managementActionId = value +} +// SetManagementTemplateId sets the managementTemplateId property value. The identifier for the management template. Required. Read-only. +func (m *ManagementActionInfo) SetManagementTemplateId(value *string)() { + m.managementTemplateId = value +} +// SetManagementTemplateVersion sets the managementTemplateVersion property value. The managementTemplateVersion property +func (m *ManagementActionInfo) SetManagementTemplateVersion(value *int32)() { + m.managementTemplateVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagementActionInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_response.go new file mode 100644 index 000000000..e20e17be8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionInfoCollectionResponse +type ManagementActionInfoCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementActionInfoable +} +// NewManagementActionInfoCollectionResponse instantiates a new ManagementActionInfoCollectionResponse and sets the default values. +func NewManagementActionInfoCollectionResponse()(*ManagementActionInfoCollectionResponse) { + m := &ManagementActionInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementActionInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementActionInfoCollectionResponse) GetValue()([]ManagementActionInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementActionInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementActionInfoCollectionResponse) SetValue(value []ManagementActionInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_responseable.go new file mode 100644 index 000000000..e37520383 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_info_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionInfoCollectionResponseable +type ManagementActionInfoCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementActionInfoable) + SetValue(value []ManagementActionInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_infoable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_infoable.go new file mode 100644 index 000000000..a38f607ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_infoable.go @@ -0,0 +1,19 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementActionInfoable +type ManagementActionInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManagementActionId()(*string) + GetManagementTemplateId()(*string) + GetManagementTemplateVersion()(*int32) + GetOdataType()(*string) + SetManagementActionId(value *string)() + SetManagementTemplateId(value *string)() + SetManagementTemplateVersion(value *int32)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_status.go new file mode 100644 index 000000000..58570560f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_status.go @@ -0,0 +1,58 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementActionStatus int + +const ( + TOADDRESS_MANAGEMENTACTIONSTATUS ManagementActionStatus = iota + COMPLETED_MANAGEMENTACTIONSTATUS + ERROR_MANAGEMENTACTIONSTATUS + TIMEOUT_MANAGEMENTACTIONSTATUS + INPROGRESS_MANAGEMENTACTIONSTATUS + PLANNED_MANAGEMENTACTIONSTATUS + RESOLVEDBY3RDPARTY_MANAGEMENTACTIONSTATUS + RESOLVEDTHROUGHALTERNATEMITIGATION_MANAGEMENTACTIONSTATUS + RISKACCEPTED_MANAGEMENTACTIONSTATUS + UNKNOWNFUTUREVALUE_MANAGEMENTACTIONSTATUS +) + +func (i ManagementActionStatus) String() string { + return []string{"toAddress", "completed", "error", "timeOut", "inProgress", "planned", "resolvedBy3rdParty", "resolvedThroughAlternateMitigation", "riskAccepted", "unknownFutureValue"}[i] +} +func ParseManagementActionStatus(v string) (interface{}, error) { + result := TOADDRESS_MANAGEMENTACTIONSTATUS + switch v { + case "toAddress": + result = TOADDRESS_MANAGEMENTACTIONSTATUS + case "completed": + result = COMPLETED_MANAGEMENTACTIONSTATUS + case "error": + result = ERROR_MANAGEMENTACTIONSTATUS + case "timeOut": + result = TIMEOUT_MANAGEMENTACTIONSTATUS + case "inProgress": + result = INPROGRESS_MANAGEMENTACTIONSTATUS + case "planned": + result = PLANNED_MANAGEMENTACTIONSTATUS + case "resolvedBy3rdParty": + result = RESOLVEDBY3RDPARTY_MANAGEMENTACTIONSTATUS + case "resolvedThroughAlternateMitigation": + result = RESOLVEDTHROUGHALTERNATEMITIGATION_MANAGEMENTACTIONSTATUS + case "riskAccepted": + result = RISKACCEPTED_MANAGEMENTACTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MANAGEMENTACTIONSTATUS + default: + return 0, errors.New("Unknown ManagementActionStatus value: " + v) + } + return &result, nil +} +func SerializeManagementActionStatus(values []ManagementActionStatus) []string { + 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/managedtenants/management_action_tenant_deployment_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status.go new file mode 100644 index 000000000..e2efee5a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status.go @@ -0,0 +1,121 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionTenantDeploymentStatus provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementActionTenantDeploymentStatus struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The collection of deployment status for each instance of a management action. Optional. + statuses []ManagementActionDeploymentStatusable + // The identifier for the tenant group that is associated with the management action. Required. Read-only. + tenantGroupId *string + // The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. + tenantId *string +} +// NewManagementActionTenantDeploymentStatus instantiates a new managementActionTenantDeploymentStatus and sets the default values. +func NewManagementActionTenantDeploymentStatus()(*ManagementActionTenantDeploymentStatus) { + m := &ManagementActionTenantDeploymentStatus{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementActionTenantDeploymentStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionTenantDeploymentStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionTenantDeploymentStatus(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionTenantDeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["statuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionDeploymentStatusable) + } + m.SetStatuses(res) + } + return nil + } + res["tenantGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantGroupId(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetStatuses gets the statuses property value. The collection of deployment status for each instance of a management action. Optional. +func (m *ManagementActionTenantDeploymentStatus) GetStatuses()([]ManagementActionDeploymentStatusable) { + return m.statuses +} +// GetTenantGroupId gets the tenantGroupId property value. The identifier for the tenant group that is associated with the management action. Required. Read-only. +func (m *ManagementActionTenantDeploymentStatus) GetTenantGroupId()(*string) { + return m.tenantGroupId +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *ManagementActionTenantDeploymentStatus) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ManagementActionTenantDeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStatuses())) + for i, v := range m.GetStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("statuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantGroupId", m.GetTenantGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetStatuses sets the statuses property value. The collection of deployment status for each instance of a management action. Optional. +func (m *ManagementActionTenantDeploymentStatus) SetStatuses(value []ManagementActionDeploymentStatusable)() { + m.statuses = value +} +// SetTenantGroupId sets the tenantGroupId property value. The identifier for the tenant group that is associated with the management action. Required. Read-only. +func (m *ManagementActionTenantDeploymentStatus) SetTenantGroupId(value *string)() { + m.tenantGroupId = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Required. Read-only. +func (m *ManagementActionTenantDeploymentStatus) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_response.go new file mode 100644 index 000000000..19552cca5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionTenantDeploymentStatusCollectionResponse +type ManagementActionTenantDeploymentStatusCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementActionTenantDeploymentStatusable +} +// NewManagementActionTenantDeploymentStatusCollectionResponse instantiates a new ManagementActionTenantDeploymentStatusCollectionResponse and sets the default values. +func NewManagementActionTenantDeploymentStatusCollectionResponse()(*ManagementActionTenantDeploymentStatusCollectionResponse) { + m := &ManagementActionTenantDeploymentStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementActionTenantDeploymentStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementActionTenantDeploymentStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementActionTenantDeploymentStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementActionTenantDeploymentStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionTenantDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionTenantDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionTenantDeploymentStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementActionTenantDeploymentStatusCollectionResponse) GetValue()([]ManagementActionTenantDeploymentStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementActionTenantDeploymentStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementActionTenantDeploymentStatusCollectionResponse) SetValue(value []ManagementActionTenantDeploymentStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_responseable.go new file mode 100644 index 000000000..e910b9336 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_status_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionTenantDeploymentStatusCollectionResponseable +type ManagementActionTenantDeploymentStatusCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementActionTenantDeploymentStatusable) + SetValue(value []ManagementActionTenantDeploymentStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_statusable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_statusable.go new file mode 100644 index 000000000..6e3f9bf58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_action_tenant_deployment_statusable.go @@ -0,0 +1,18 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionTenantDeploymentStatusable +type ManagementActionTenantDeploymentStatusable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetStatuses()([]ManagementActionDeploymentStatusable) + GetTenantGroupId()(*string) + GetTenantId()(*string) + SetStatuses(value []ManagementActionDeploymentStatusable)() + SetTenantGroupId(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_actionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_actionable.go new file mode 100644 index 000000000..0976c85ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_actionable.go @@ -0,0 +1,24 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementActionable +type ManagementActionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*ManagementCategory) + GetDescription()(*string) + GetDisplayName()(*string) + GetReferenceTemplateId()(*string) + GetReferenceTemplateVersion()(*int32) + GetWorkloadActions()([]WorkloadActionable) + SetCategory(value *ManagementCategory)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetReferenceTemplateId(value *string)() + SetReferenceTemplateVersion(value *int32)() + SetWorkloadActions(value []WorkloadActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_category.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_category.go new file mode 100644 index 000000000..720c2a539 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_category.go @@ -0,0 +1,43 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementCategory int + +const ( + CUSTOM_MANAGEMENTCATEGORY ManagementCategory = iota + DEVICES_MANAGEMENTCATEGORY + IDENTITY_MANAGEMENTCATEGORY + DATA_MANAGEMENTCATEGORY + UNKNOWNFUTUREVALUE_MANAGEMENTCATEGORY +) + +func (i ManagementCategory) String() string { + return []string{"custom", "devices", "identity", "data", "unknownFutureValue"}[i] +} +func ParseManagementCategory(v string) (interface{}, error) { + result := CUSTOM_MANAGEMENTCATEGORY + switch v { + case "custom": + result = CUSTOM_MANAGEMENTCATEGORY + case "devices": + result = DEVICES_MANAGEMENTCATEGORY + case "identity": + result = IDENTITY_MANAGEMENTCATEGORY + case "data": + result = DATA_MANAGEMENTCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MANAGEMENTCATEGORY + default: + return 0, errors.New("Unknown ManagementCategory value: " + v) + } + return &result, nil +} +func SerializeManagementCategory(values []ManagementCategory) []string { + 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/managedtenants/management_intent.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent.go new file mode 100644 index 000000000..a5d23829c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent.go @@ -0,0 +1,121 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntent provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementIntent struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The display name for the management intent. Optional. Read-only. + displayName *string + // A flag indicating whether the management intent is global. Required. Read-only. + isGlobal *bool + // The collection of management templates associated with the management intent. Optional. Read-only. + managementTemplates []ManagementTemplateDetailedInfoable +} +// NewManagementIntent instantiates a new managementIntent and sets the default values. +func NewManagementIntent()(*ManagementIntent) { + m := &ManagementIntent{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementIntentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementIntentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementIntent(), nil +} +// GetDisplayName gets the displayName property value. The display name for the management intent. Optional. Read-only. +func (m *ManagementIntent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementIntent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isGlobal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsGlobal(val) + } + return nil + } + res["managementTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateDetailedInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateDetailedInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateDetailedInfoable) + } + m.SetManagementTemplates(res) + } + return nil + } + return res +} +// GetIsGlobal gets the isGlobal property value. A flag indicating whether the management intent is global. Required. Read-only. +func (m *ManagementIntent) GetIsGlobal()(*bool) { + return m.isGlobal +} +// GetManagementTemplates gets the managementTemplates property value. The collection of management templates associated with the management intent. Optional. Read-only. +func (m *ManagementIntent) GetManagementTemplates()([]ManagementTemplateDetailedInfoable) { + return m.managementTemplates +} +// Serialize serializes information the current object +func (m *ManagementIntent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isGlobal", m.GetIsGlobal()) + if err != nil { + return err + } + } + if m.GetManagementTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplates())) + for i, v := range m.GetManagementTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplates", cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name for the management intent. Optional. Read-only. +func (m *ManagementIntent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsGlobal sets the isGlobal property value. A flag indicating whether the management intent is global. Required. Read-only. +func (m *ManagementIntent) SetIsGlobal(value *bool)() { + m.isGlobal = value +} +// SetManagementTemplates sets the managementTemplates property value. The collection of management templates associated with the management intent. Optional. Read-only. +func (m *ManagementIntent) SetManagementTemplates(value []ManagementTemplateDetailedInfoable)() { + m.managementTemplates = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_response.go new file mode 100644 index 000000000..2b07ee05d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntentCollectionResponse +type ManagementIntentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementIntentable +} +// NewManagementIntentCollectionResponse instantiates a new ManagementIntentCollectionResponse and sets the default values. +func NewManagementIntentCollectionResponse()(*ManagementIntentCollectionResponse) { + m := &ManagementIntentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementIntentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementIntentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementIntentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementIntentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementIntentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementIntentable, len(val)) + for i, v := range val { + res[i] = v.(ManagementIntentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementIntentCollectionResponse) GetValue()([]ManagementIntentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementIntentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementIntentCollectionResponse) SetValue(value []ManagementIntentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_responseable.go new file mode 100644 index 000000000..24e2c4f39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntentCollectionResponseable +type ManagementIntentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementIntentable) + SetValue(value []ManagementIntentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info.go new file mode 100644 index 000000000..bb3717be1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info.go @@ -0,0 +1,157 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementIntentInfo +type ManagementIntentInfo 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 display name for the management intent. Optional. Read-only. + managementIntentDisplayName *string + // The identifier for the management intent. Required. Read-only. + managementIntentId *string + // The collection of management template information associated with the management intent. Optional. Read-only. + managementTemplates []ManagementTemplateDetailedInfoable + // The OdataType property + odataType *string +} +// NewManagementIntentInfo instantiates a new managementIntentInfo and sets the default values. +func NewManagementIntentInfo()(*ManagementIntentInfo) { + m := &ManagementIntentInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagementIntentInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementIntentInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementIntentInfo(), 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 *ManagementIntentInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementIntentInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["managementIntentDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementIntentDisplayName(val) + } + return nil + } + res["managementIntentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementIntentId(val) + } + return nil + } + res["managementTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateDetailedInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateDetailedInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateDetailedInfoable) + } + m.SetManagementTemplates(res) + } + 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 + } + return res +} +// GetManagementIntentDisplayName gets the managementIntentDisplayName property value. The display name for the management intent. Optional. Read-only. +func (m *ManagementIntentInfo) GetManagementIntentDisplayName()(*string) { + return m.managementIntentDisplayName +} +// GetManagementIntentId gets the managementIntentId property value. The identifier for the management intent. Required. Read-only. +func (m *ManagementIntentInfo) GetManagementIntentId()(*string) { + return m.managementIntentId +} +// GetManagementTemplates gets the managementTemplates property value. The collection of management template information associated with the management intent. Optional. Read-only. +func (m *ManagementIntentInfo) GetManagementTemplates()([]ManagementTemplateDetailedInfoable) { + return m.managementTemplates +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagementIntentInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ManagementIntentInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("managementIntentDisplayName", m.GetManagementIntentDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managementIntentId", m.GetManagementIntentId()) + if err != nil { + return err + } + } + if m.GetManagementTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplates())) + for i, v := range m.GetManagementTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("managementTemplates", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ManagementIntentInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetManagementIntentDisplayName sets the managementIntentDisplayName property value. The display name for the management intent. Optional. Read-only. +func (m *ManagementIntentInfo) SetManagementIntentDisplayName(value *string)() { + m.managementIntentDisplayName = value +} +// SetManagementIntentId sets the managementIntentId property value. The identifier for the management intent. Required. Read-only. +func (m *ManagementIntentInfo) SetManagementIntentId(value *string)() { + m.managementIntentId = value +} +// SetManagementTemplates sets the managementTemplates property value. The collection of management template information associated with the management intent. Optional. Read-only. +func (m *ManagementIntentInfo) SetManagementTemplates(value []ManagementTemplateDetailedInfoable)() { + m.managementTemplates = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagementIntentInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_response.go new file mode 100644 index 000000000..0f621b88b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntentInfoCollectionResponse +type ManagementIntentInfoCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementIntentInfoable +} +// NewManagementIntentInfoCollectionResponse instantiates a new ManagementIntentInfoCollectionResponse and sets the default values. +func NewManagementIntentInfoCollectionResponse()(*ManagementIntentInfoCollectionResponse) { + m := &ManagementIntentInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementIntentInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementIntentInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementIntentInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementIntentInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementIntentInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementIntentInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementIntentInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementIntentInfoCollectionResponse) GetValue()([]ManagementIntentInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementIntentInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementIntentInfoCollectionResponse) SetValue(value []ManagementIntentInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_responseable.go new file mode 100644 index 000000000..d10f2e74b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_info_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntentInfoCollectionResponseable +type ManagementIntentInfoCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementIntentInfoable) + SetValue(value []ManagementIntentInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_infoable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_infoable.go new file mode 100644 index 000000000..5a14ced01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intent_infoable.go @@ -0,0 +1,19 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementIntentInfoable +type ManagementIntentInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManagementIntentDisplayName()(*string) + GetManagementIntentId()(*string) + GetManagementTemplates()([]ManagementTemplateDetailedInfoable) + GetOdataType()(*string) + SetManagementIntentDisplayName(value *string)() + SetManagementIntentId(value *string)() + SetManagementTemplates(value []ManagementTemplateDetailedInfoable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_intentable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_intentable.go new file mode 100644 index 000000000..f69e257b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_intentable.go @@ -0,0 +1,18 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementIntentable +type ManagementIntentable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetIsGlobal()(*bool) + GetManagementTemplates()([]ManagementTemplateDetailedInfoable) + SetDisplayName(value *string)() + SetIsGlobal(value *bool)() + SetManagementTemplates(value []ManagementTemplateDetailedInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_parameter_value_type.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_parameter_value_type.go new file mode 100644 index 000000000..eb698637d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_parameter_value_type.go @@ -0,0 +1,55 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementParameterValueType int + +const ( + STRING_MANAGEMENTPARAMETERVALUETYPE ManagementParameterValueType = iota + INTEGER_MANAGEMENTPARAMETERVALUETYPE + BOOLEAN_MANAGEMENTPARAMETERVALUETYPE + GUID_MANAGEMENTPARAMETERVALUETYPE + STRINGCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + INTEGERCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + BOOLEANCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + GUIDCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + UNKNOWNFUTUREVALUE_MANAGEMENTPARAMETERVALUETYPE +) + +func (i ManagementParameterValueType) String() string { + return []string{"string", "integer", "boolean", "guid", "stringCollection", "integerCollection", "booleanCollection", "guidCollection", "unknownFutureValue"}[i] +} +func ParseManagementParameterValueType(v string) (interface{}, error) { + result := STRING_MANAGEMENTPARAMETERVALUETYPE + switch v { + case "string": + result = STRING_MANAGEMENTPARAMETERVALUETYPE + case "integer": + result = INTEGER_MANAGEMENTPARAMETERVALUETYPE + case "boolean": + result = BOOLEAN_MANAGEMENTPARAMETERVALUETYPE + case "guid": + result = GUID_MANAGEMENTPARAMETERVALUETYPE + case "stringCollection": + result = STRINGCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + case "integerCollection": + result = INTEGERCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + case "booleanCollection": + result = BOOLEANCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + case "guidCollection": + result = GUIDCOLLECTION_MANAGEMENTPARAMETERVALUETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MANAGEMENTPARAMETERVALUETYPE + default: + return 0, errors.New("Unknown ManagementParameterValueType value: " + v) + } + return &result, nil +} +func SerializeManagementParameterValueType(values []ManagementParameterValueType) []string { + 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/managedtenants/management_provider.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_provider.go new file mode 100644 index 000000000..f5865121a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_provider.go @@ -0,0 +1,43 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementProvider int + +const ( + MICROSOFT_MANAGEMENTPROVIDER ManagementProvider = iota + COMMUNITY_MANAGEMENTPROVIDER + INDIRECTPROVIDER_MANAGEMENTPROVIDER + SELF_MANAGEMENTPROVIDER + UNKNOWNFUTUREVALUE_MANAGEMENTPROVIDER +) + +func (i ManagementProvider) String() string { + return []string{"microsoft", "community", "indirectProvider", "self", "unknownFutureValue"}[i] +} +func ParseManagementProvider(v string) (interface{}, error) { + result := MICROSOFT_MANAGEMENTPROVIDER + switch v { + case "microsoft": + result = MICROSOFT_MANAGEMENTPROVIDER + case "community": + result = COMMUNITY_MANAGEMENTPROVIDER + case "indirectProvider": + result = INDIRECTPROVIDER_MANAGEMENTPROVIDER + case "self": + result = SELF_MANAGEMENTPROVIDER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MANAGEMENTPROVIDER + default: + return 0, errors.New("Unknown ManagementProvider value: " + v) + } + return &result, nil +} +func SerializeManagementProvider(values []ManagementProvider) []string { + 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/managedtenants/management_template.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template.go new file mode 100644 index 000000000..33a5c23e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template.go @@ -0,0 +1,494 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplate provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplate struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The management category for the management template. Possible values are: custom, devices, identity, unknownFutureValue. Required. Read-only. + category *ManagementCategory + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description for the management template. Optional. Read-only. + description *string + // The display name for the management template. Required. Read-only. + displayName *string + // The informationLinks property + informationLinks []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managementTemplateCollections property + managementTemplateCollections []ManagementTemplateCollectionable + // The managementTemplateSteps property + managementTemplateSteps []ManagementTemplateStepable + // The collection of parameters used by the management template. Optional. Read-only. + parameters []TemplateParameterable + // The priority property + priority *int32 + // The provider property + provider *ManagementProvider + // The userImpact property + userImpact *string + // The version property + version *int32 + // The collection of workload actions associated with the management template. Optional. Read-only. + workloadActions []WorkloadActionable +} +// NewManagementTemplate instantiates a new managementTemplate and sets the default values. +func NewManagementTemplate()(*ManagementTemplate) { + m := &ManagementTemplate{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplate(), nil +} +// GetCategory gets the category property value. The management category for the management template. Possible values are: custom, devices, identity, unknownFutureValue. Required. Read-only. +func (m *ManagementTemplate) GetCategory()(*ManagementCategory) { + return m.category +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplate) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplate) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description for the management template. Optional. Read-only. +func (m *ManagementTemplate) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the management template. Required. Read-only. +func (m *ManagementTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*ManagementCategory)) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["informationLinks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateActionUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable, len(val)) + for i, v := range val { + res[i] = v.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable) + } + m.SetInformationLinks(res) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["managementTemplateCollections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateCollectionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateCollectionable) + } + m.SetManagementTemplateCollections(res) + } + return nil + } + res["managementTemplateSteps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepable) + } + m.SetManagementTemplateSteps(res) + } + return nil + } + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTemplateParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TemplateParameterable, len(val)) + for i, v := range val { + res[i] = v.(TemplateParameterable) + } + m.SetParameters(res) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementProvider) + if err != nil { + return err + } + if val != nil { + m.SetProvider(val.(*ManagementProvider)) + } + return nil + } + res["userImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserImpact(val) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["workloadActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadActionable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadActionable) + } + m.SetWorkloadActions(res) + } + return nil + } + return res +} +// GetInformationLinks gets the informationLinks property value. The informationLinks property +func (m *ManagementTemplate) GetInformationLinks()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable) { + return m.informationLinks +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplate) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplate) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetManagementTemplateCollections gets the managementTemplateCollections property value. The managementTemplateCollections property +func (m *ManagementTemplate) GetManagementTemplateCollections()([]ManagementTemplateCollectionable) { + return m.managementTemplateCollections +} +// GetManagementTemplateSteps gets the managementTemplateSteps property value. The managementTemplateSteps property +func (m *ManagementTemplate) GetManagementTemplateSteps()([]ManagementTemplateStepable) { + return m.managementTemplateSteps +} +// GetParameters gets the parameters property value. The collection of parameters used by the management template. Optional. Read-only. +func (m *ManagementTemplate) GetParameters()([]TemplateParameterable) { + return m.parameters +} +// GetPriority gets the priority property value. The priority property +func (m *ManagementTemplate) GetPriority()(*int32) { + return m.priority +} +// GetProvider gets the provider property value. The provider property +func (m *ManagementTemplate) GetProvider()(*ManagementProvider) { + return m.provider +} +// GetUserImpact gets the userImpact property value. The userImpact property +func (m *ManagementTemplate) GetUserImpact()(*string) { + return m.userImpact +} +// GetVersion gets the version property value. The version property +func (m *ManagementTemplate) GetVersion()(*int32) { + return m.version +} +// GetWorkloadActions gets the workloadActions property value. The collection of workload actions associated with the management template. Optional. Read-only. +func (m *ManagementTemplate) GetWorkloadActions()([]WorkloadActionable) { + return m.workloadActions +} +// Serialize serializes information the current object +func (m *ManagementTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetInformationLinks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInformationLinks())) + for i, v := range m.GetInformationLinks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("informationLinks", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + if m.GetManagementTemplateCollections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateCollections())) + for i, v := range m.GetManagementTemplateCollections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateCollections", cast) + if err != nil { + return err + } + } + if m.GetManagementTemplateSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplateSteps())) + for i, v := range m.GetManagementTemplateSteps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplateSteps", cast) + if err != nil { + return err + } + } + if m.GetParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParameters())) + for i, v := range m.GetParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("parameters", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + if m.GetProvider() != nil { + cast := (*m.GetProvider()).String() + err = writer.WriteStringValue("provider", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userImpact", m.GetUserImpact()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + if m.GetWorkloadActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkloadActions())) + for i, v := range m.GetWorkloadActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workloadActions", cast) + if err != nil { + return err + } + } + return nil +} +// SetCategory sets the category property value. The management category for the management template. Possible values are: custom, devices, identity, unknownFutureValue. Required. Read-only. +func (m *ManagementTemplate) SetCategory(value *ManagementCategory)() { + m.category = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplate) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplate) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description for the management template. Optional. Read-only. +func (m *ManagementTemplate) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the management template. Required. Read-only. +func (m *ManagementTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetInformationLinks sets the informationLinks property value. The informationLinks property +func (m *ManagementTemplate) SetInformationLinks(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable)() { + m.informationLinks = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplate) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplate) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetManagementTemplateCollections sets the managementTemplateCollections property value. The managementTemplateCollections property +func (m *ManagementTemplate) SetManagementTemplateCollections(value []ManagementTemplateCollectionable)() { + m.managementTemplateCollections = value +} +// SetManagementTemplateSteps sets the managementTemplateSteps property value. The managementTemplateSteps property +func (m *ManagementTemplate) SetManagementTemplateSteps(value []ManagementTemplateStepable)() { + m.managementTemplateSteps = value +} +// SetParameters sets the parameters property value. The collection of parameters used by the management template. Optional. Read-only. +func (m *ManagementTemplate) SetParameters(value []TemplateParameterable)() { + m.parameters = value +} +// SetPriority sets the priority property value. The priority property +func (m *ManagementTemplate) SetPriority(value *int32)() { + m.priority = value +} +// SetProvider sets the provider property value. The provider property +func (m *ManagementTemplate) SetProvider(value *ManagementProvider)() { + m.provider = value +} +// SetUserImpact sets the userImpact property value. The userImpact property +func (m *ManagementTemplate) SetUserImpact(value *string)() { + m.userImpact = value +} +// SetVersion sets the version property value. The version property +func (m *ManagementTemplate) SetVersion(value *int32)() { + m.version = value +} +// SetWorkloadActions sets the workloadActions property value. The collection of workload actions associated with the management template. Optional. Read-only. +func (m *ManagementTemplate) SetWorkloadActions(value []WorkloadActionable)() { + m.workloadActions = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection.go new file mode 100644 index 000000000..dea5f38e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection.go @@ -0,0 +1,226 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateCollection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managementTemplates property + managementTemplates []ManagementTemplateable +} +// NewManagementTemplateCollection instantiates a new managementTemplateCollection and sets the default values. +func NewManagementTemplateCollection()(*ManagementTemplateCollection) { + m := &ManagementTemplateCollection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateCollection(), nil +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateCollection) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateCollection) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *ManagementTemplateCollection) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ManagementTemplateCollection) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["managementTemplates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateable) + } + m.SetManagementTemplates(res) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateCollection) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateCollection) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetManagementTemplates gets the managementTemplates property value. The managementTemplates property +func (m *ManagementTemplateCollection) GetManagementTemplates()([]ManagementTemplateable) { + return m.managementTemplates +} +// Serialize serializes information the current object +func (m *ManagementTemplateCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + if m.GetManagementTemplates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementTemplates())) + for i, v := range m.GetManagementTemplates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementTemplates", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateCollection) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateCollection) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *ManagementTemplateCollection) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ManagementTemplateCollection) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateCollection) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateCollection) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetManagementTemplates sets the managementTemplates property value. The managementTemplates property +func (m *ManagementTemplateCollection) SetManagementTemplates(value []ManagementTemplateable)() { + m.managementTemplates = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_response.go new file mode 100644 index 000000000..1336c422f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionCollectionResponse +type ManagementTemplateCollectionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateCollectionable +} +// NewManagementTemplateCollectionCollectionResponse instantiates a new ManagementTemplateCollectionCollectionResponse and sets the default values. +func NewManagementTemplateCollectionCollectionResponse()(*ManagementTemplateCollectionCollectionResponse) { + m := &ManagementTemplateCollectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateCollectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateCollectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateCollectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateCollectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateCollectionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateCollectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateCollectionCollectionResponse) GetValue()([]ManagementTemplateCollectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateCollectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateCollectionCollectionResponse) SetValue(value []ManagementTemplateCollectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_responseable.go new file mode 100644 index 000000000..d5e3a4bc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionCollectionResponseable +type ManagementTemplateCollectionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateCollectionable) + SetValue(value []ManagementTemplateCollectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_response.go new file mode 100644 index 000000000..c3fb2edee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionResponse +type ManagementTemplateCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateable +} +// NewManagementTemplateCollectionResponse instantiates a new ManagementTemplateCollectionResponse and sets the default values. +func NewManagementTemplateCollectionResponse()(*ManagementTemplateCollectionResponse) { + m := &ManagementTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateCollectionResponse) GetValue()([]ManagementTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateCollectionResponse) SetValue(value []ManagementTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_responseable.go new file mode 100644 index 000000000..cdedc1905 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionResponseable +type ManagementTemplateCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateable) + SetValue(value []ManagementTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary.go new file mode 100644 index 000000000..a6e5f7013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary.go @@ -0,0 +1,452 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionTenantSummary provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateCollectionTenantSummary struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The completeStepsCount property + completeStepsCount *int32 + // The completeUsersCount property + completeUsersCount *int32 + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The dismissedStepsCount property + dismissedStepsCount *int32 + // The excludedUsersCount property + excludedUsersCount *int32 + // The excludedUsersDistinctCount property + excludedUsersDistinctCount *int32 + // The incompleteStepsCount property + incompleteStepsCount *int32 + // The incompleteUsersCount property + incompleteUsersCount *int32 + // The ineligibleStepsCount property + ineligibleStepsCount *int32 + // The isComplete property + isComplete *bool + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managementTemplateCollectionDisplayName property + managementTemplateCollectionDisplayName *string + // The managementTemplateCollectionId property + managementTemplateCollectionId *string + // The tenantId property + tenantId *string +} +// NewManagementTemplateCollectionTenantSummary instantiates a new managementTemplateCollectionTenantSummary and sets the default values. +func NewManagementTemplateCollectionTenantSummary()(*ManagementTemplateCollectionTenantSummary) { + m := &ManagementTemplateCollectionTenantSummary{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateCollectionTenantSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateCollectionTenantSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateCollectionTenantSummary(), nil +} +// GetCompleteStepsCount gets the completeStepsCount property value. The completeStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) GetCompleteStepsCount()(*int32) { + return m.completeStepsCount +} +// GetCompleteUsersCount gets the completeUsersCount property value. The completeUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) GetCompleteUsersCount()(*int32) { + return m.completeUsersCount +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateCollectionTenantSummary) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateCollectionTenantSummary) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDismissedStepsCount gets the dismissedStepsCount property value. The dismissedStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) GetDismissedStepsCount()(*int32) { + return m.dismissedStepsCount +} +// GetExcludedUsersCount gets the excludedUsersCount property value. The excludedUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) GetExcludedUsersCount()(*int32) { + return m.excludedUsersCount +} +// GetExcludedUsersDistinctCount gets the excludedUsersDistinctCount property value. The excludedUsersDistinctCount property +func (m *ManagementTemplateCollectionTenantSummary) GetExcludedUsersDistinctCount()(*int32) { + return m.excludedUsersDistinctCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateCollectionTenantSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["completeStepsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleteStepsCount(val) + } + return nil + } + res["completeUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompleteUsersCount(val) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["dismissedStepsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDismissedStepsCount(val) + } + return nil + } + res["excludedUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetExcludedUsersCount(val) + } + return nil + } + res["excludedUsersDistinctCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetExcludedUsersDistinctCount(val) + } + return nil + } + res["incompleteStepsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteStepsCount(val) + } + return nil + } + res["incompleteUsersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteUsersCount(val) + } + return nil + } + res["ineligibleStepsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIneligibleStepsCount(val) + } + return nil + } + res["isComplete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsComplete(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["managementTemplateCollectionDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateCollectionDisplayName(val) + } + return nil + } + res["managementTemplateCollectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateCollectionId(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetIncompleteStepsCount gets the incompleteStepsCount property value. The incompleteStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) GetIncompleteStepsCount()(*int32) { + return m.incompleteStepsCount +} +// GetIncompleteUsersCount gets the incompleteUsersCount property value. The incompleteUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) GetIncompleteUsersCount()(*int32) { + return m.incompleteUsersCount +} +// GetIneligibleStepsCount gets the ineligibleStepsCount property value. The ineligibleStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) GetIneligibleStepsCount()(*int32) { + return m.ineligibleStepsCount +} +// GetIsComplete gets the isComplete property value. The isComplete property +func (m *ManagementTemplateCollectionTenantSummary) GetIsComplete()(*bool) { + return m.isComplete +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateCollectionTenantSummary) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateCollectionTenantSummary) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetManagementTemplateCollectionDisplayName gets the managementTemplateCollectionDisplayName property value. The managementTemplateCollectionDisplayName property +func (m *ManagementTemplateCollectionTenantSummary) GetManagementTemplateCollectionDisplayName()(*string) { + return m.managementTemplateCollectionDisplayName +} +// GetManagementTemplateCollectionId gets the managementTemplateCollectionId property value. The managementTemplateCollectionId property +func (m *ManagementTemplateCollectionTenantSummary) GetManagementTemplateCollectionId()(*string) { + return m.managementTemplateCollectionId +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *ManagementTemplateCollectionTenantSummary) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ManagementTemplateCollectionTenantSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("completeStepsCount", m.GetCompleteStepsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("completeUsersCount", m.GetCompleteUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dismissedStepsCount", m.GetDismissedStepsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("excludedUsersCount", m.GetExcludedUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("excludedUsersDistinctCount", m.GetExcludedUsersDistinctCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("incompleteStepsCount", m.GetIncompleteStepsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("incompleteUsersCount", m.GetIncompleteUsersCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ineligibleStepsCount", m.GetIneligibleStepsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isComplete", m.GetIsComplete()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateCollectionDisplayName", m.GetManagementTemplateCollectionDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateCollectionId", m.GetManagementTemplateCollectionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetCompleteStepsCount sets the completeStepsCount property value. The completeStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) SetCompleteStepsCount(value *int32)() { + m.completeStepsCount = value +} +// SetCompleteUsersCount sets the completeUsersCount property value. The completeUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) SetCompleteUsersCount(value *int32)() { + m.completeUsersCount = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateCollectionTenantSummary) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateCollectionTenantSummary) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDismissedStepsCount sets the dismissedStepsCount property value. The dismissedStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) SetDismissedStepsCount(value *int32)() { + m.dismissedStepsCount = value +} +// SetExcludedUsersCount sets the excludedUsersCount property value. The excludedUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) SetExcludedUsersCount(value *int32)() { + m.excludedUsersCount = value +} +// SetExcludedUsersDistinctCount sets the excludedUsersDistinctCount property value. The excludedUsersDistinctCount property +func (m *ManagementTemplateCollectionTenantSummary) SetExcludedUsersDistinctCount(value *int32)() { + m.excludedUsersDistinctCount = value +} +// SetIncompleteStepsCount sets the incompleteStepsCount property value. The incompleteStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) SetIncompleteStepsCount(value *int32)() { + m.incompleteStepsCount = value +} +// SetIncompleteUsersCount sets the incompleteUsersCount property value. The incompleteUsersCount property +func (m *ManagementTemplateCollectionTenantSummary) SetIncompleteUsersCount(value *int32)() { + m.incompleteUsersCount = value +} +// SetIneligibleStepsCount sets the ineligibleStepsCount property value. The ineligibleStepsCount property +func (m *ManagementTemplateCollectionTenantSummary) SetIneligibleStepsCount(value *int32)() { + m.ineligibleStepsCount = value +} +// SetIsComplete sets the isComplete property value. The isComplete property +func (m *ManagementTemplateCollectionTenantSummary) SetIsComplete(value *bool)() { + m.isComplete = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateCollectionTenantSummary) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateCollectionTenantSummary) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetManagementTemplateCollectionDisplayName sets the managementTemplateCollectionDisplayName property value. The managementTemplateCollectionDisplayName property +func (m *ManagementTemplateCollectionTenantSummary) SetManagementTemplateCollectionDisplayName(value *string)() { + m.managementTemplateCollectionDisplayName = value +} +// SetManagementTemplateCollectionId sets the managementTemplateCollectionId property value. The managementTemplateCollectionId property +func (m *ManagementTemplateCollectionTenantSummary) SetManagementTemplateCollectionId(value *string)() { + m.managementTemplateCollectionId = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *ManagementTemplateCollectionTenantSummary) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_response.go new file mode 100644 index 000000000..ade960c59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionTenantSummaryCollectionResponse +type ManagementTemplateCollectionTenantSummaryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateCollectionTenantSummaryable +} +// NewManagementTemplateCollectionTenantSummaryCollectionResponse instantiates a new ManagementTemplateCollectionTenantSummaryCollectionResponse and sets the default values. +func NewManagementTemplateCollectionTenantSummaryCollectionResponse()(*ManagementTemplateCollectionTenantSummaryCollectionResponse) { + m := &ManagementTemplateCollectionTenantSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateCollectionTenantSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateCollectionTenantSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateCollectionTenantSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateCollectionTenantSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateCollectionTenantSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateCollectionTenantSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateCollectionTenantSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateCollectionTenantSummaryCollectionResponse) GetValue()([]ManagementTemplateCollectionTenantSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateCollectionTenantSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateCollectionTenantSummaryCollectionResponse) SetValue(value []ManagementTemplateCollectionTenantSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_responseable.go new file mode 100644 index 000000000..d7fe54aec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summary_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionTenantSummaryCollectionResponseable +type ManagementTemplateCollectionTenantSummaryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateCollectionTenantSummaryable) + SetValue(value []ManagementTemplateCollectionTenantSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summaryable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summaryable.go new file mode 100644 index 000000000..710120995 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collection_tenant_summaryable.go @@ -0,0 +1,45 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionTenantSummaryable +type ManagementTemplateCollectionTenantSummaryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompleteStepsCount()(*int32) + GetCompleteUsersCount()(*int32) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedStepsCount()(*int32) + GetExcludedUsersCount()(*int32) + GetExcludedUsersDistinctCount()(*int32) + GetIncompleteStepsCount()(*int32) + GetIncompleteUsersCount()(*int32) + GetIneligibleStepsCount()(*int32) + GetIsComplete()(*bool) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementTemplateCollectionDisplayName()(*string) + GetManagementTemplateCollectionId()(*string) + GetTenantId()(*string) + SetCompleteStepsCount(value *int32)() + SetCompleteUsersCount(value *int32)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedStepsCount(value *int32)() + SetExcludedUsersCount(value *int32)() + SetExcludedUsersDistinctCount(value *int32)() + SetIncompleteStepsCount(value *int32)() + SetIncompleteUsersCount(value *int32)() + SetIneligibleStepsCount(value *int32)() + SetIsComplete(value *bool)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementTemplateCollectionDisplayName(value *string)() + SetManagementTemplateCollectionId(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collectionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collectionable.go new file mode 100644 index 000000000..87a1077d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_collectionable.go @@ -0,0 +1,27 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateCollectionable +type ManagementTemplateCollectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementTemplates()([]ManagementTemplateable) + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementTemplates(value []ManagementTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_deployment_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_deployment_status.go new file mode 100644 index 000000000..09b16e56c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_deployment_status.go @@ -0,0 +1,46 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateDeploymentStatus int + +const ( + UNKNOWN_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS ManagementTemplateDeploymentStatus = iota + INPROGRESS_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + COMPLETED_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + FAILED_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + INELIGIBLE_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + UNKNOWNFUTUREVALUE_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS +) + +func (i ManagementTemplateDeploymentStatus) String() string { + return []string{"unknown", "inProgress", "completed", "failed", "ineligible", "unknownFutureValue"}[i] +} +func ParseManagementTemplateDeploymentStatus(v string) (interface{}, error) { + result := UNKNOWN_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + switch v { + case "unknown": + result = UNKNOWN_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + case "inProgress": + result = INPROGRESS_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + case "completed": + result = COMPLETED_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + case "failed": + result = FAILED_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + case "ineligible": + result = INELIGIBLE_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MANAGEMENTTEMPLATEDEPLOYMENTSTATUS + default: + return 0, errors.New("Unknown ManagementTemplateDeploymentStatus value: " + v) + } + return &result, nil +} +func SerializeManagementTemplateDeploymentStatus(values []ManagementTemplateDeploymentStatus) []string { + 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/managedtenants/management_template_detailed_info.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info.go new file mode 100644 index 000000000..6ecbe2f96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info.go @@ -0,0 +1,176 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementTemplateDetailedInfo +type ManagementTemplateDetailedInfo 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 category property + category *ManagementCategory + // The display name for the management template. Required. Read-only. + displayName *string + // The unique identifier for the management template. Required. Read-only. + managementTemplateId *string + // The OdataType property + odataType *string + // The version property + version *int32 +} +// NewManagementTemplateDetailedInfo instantiates a new managementTemplateDetailedInfo and sets the default values. +func NewManagementTemplateDetailedInfo()(*ManagementTemplateDetailedInfo) { + m := &ManagementTemplateDetailedInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagementTemplateDetailedInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateDetailedInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateDetailedInfo(), 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 *ManagementTemplateDetailedInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. The category property +func (m *ManagementTemplateDetailedInfo) GetCategory()(*ManagementCategory) { + return m.category +} +// GetDisplayName gets the displayName property value. The display name for the management template. Required. Read-only. +func (m *ManagementTemplateDetailedInfo) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateDetailedInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*ManagementCategory)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["managementTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateId(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["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + return res +} +// GetManagementTemplateId gets the managementTemplateId property value. The unique identifier for the management template. Required. Read-only. +func (m *ManagementTemplateDetailedInfo) GetManagementTemplateId()(*string) { + return m.managementTemplateId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagementTemplateDetailedInfo) GetOdataType()(*string) { + return m.odataType +} +// GetVersion gets the version property value. The version property +func (m *ManagementTemplateDetailedInfo) GetVersion()(*int32) { + return m.version +} +// Serialize serializes information the current object +func (m *ManagementTemplateDetailedInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err := writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("managementTemplateId", m.GetManagementTemplateId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("version", m.GetVersion()) + 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 *ManagementTemplateDetailedInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. The category property +func (m *ManagementTemplateDetailedInfo) SetCategory(value *ManagementCategory)() { + m.category = value +} +// SetDisplayName sets the displayName property value. The display name for the management template. Required. Read-only. +func (m *ManagementTemplateDetailedInfo) SetDisplayName(value *string)() { + m.displayName = value +} +// SetManagementTemplateId sets the managementTemplateId property value. The unique identifier for the management template. Required. Read-only. +func (m *ManagementTemplateDetailedInfo) SetManagementTemplateId(value *string)() { + m.managementTemplateId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagementTemplateDetailedInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetVersion sets the version property value. The version property +func (m *ManagementTemplateDetailedInfo) SetVersion(value *int32)() { + m.version = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_response.go new file mode 100644 index 000000000..f31964291 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateDetailedInfoCollectionResponse +type ManagementTemplateDetailedInfoCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateDetailedInfoable +} +// NewManagementTemplateDetailedInfoCollectionResponse instantiates a new ManagementTemplateDetailedInfoCollectionResponse and sets the default values. +func NewManagementTemplateDetailedInfoCollectionResponse()(*ManagementTemplateDetailedInfoCollectionResponse) { + m := &ManagementTemplateDetailedInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateDetailedInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateDetailedInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateDetailedInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateDetailedInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateDetailedInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateDetailedInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateDetailedInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateDetailedInfoCollectionResponse) GetValue()([]ManagementTemplateDetailedInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateDetailedInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateDetailedInfoCollectionResponse) SetValue(value []ManagementTemplateDetailedInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_responseable.go new file mode 100644 index 000000000..e333846c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_info_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateDetailedInfoCollectionResponseable +type ManagementTemplateDetailedInfoCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateDetailedInfoable) + SetValue(value []ManagementTemplateDetailedInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_infoable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_infoable.go new file mode 100644 index 000000000..9c2c3e43e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_detailed_infoable.go @@ -0,0 +1,21 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementTemplateDetailedInfoable +type ManagementTemplateDetailedInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*ManagementCategory) + GetDisplayName()(*string) + GetManagementTemplateId()(*string) + GetOdataType()(*string) + GetVersion()(*int32) + SetCategory(value *ManagementCategory)() + SetDisplayName(value *string)() + SetManagementTemplateId(value *string)() + SetOdataType(value *string)() + SetVersion(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step.go new file mode 100644 index 000000000..8a6ab8561 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step.go @@ -0,0 +1,357 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStep provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateStep struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The acceptedVersion property + acceptedVersion ManagementTemplateStepVersionable + // The category property + category *ManagementCategory + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managementTemplate property + managementTemplate ManagementTemplateable + // The portalLink property + portalLink ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable + // The priority property + priority *int32 + // The versions property + versions []ManagementTemplateStepVersionable +} +// NewManagementTemplateStep instantiates a new managementTemplateStep and sets the default values. +func NewManagementTemplateStep()(*ManagementTemplateStep) { + m := &ManagementTemplateStep{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateStepFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStep(), nil +} +// GetAcceptedVersion gets the acceptedVersion property value. The acceptedVersion property +func (m *ManagementTemplateStep) GetAcceptedVersion()(ManagementTemplateStepVersionable) { + return m.acceptedVersion +} +// GetCategory gets the category property value. The category property +func (m *ManagementTemplateStep) GetCategory()(*ManagementCategory) { + return m.category +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStep) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStep) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *ManagementTemplateStep) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ManagementTemplateStep) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStep) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acceptedVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagementTemplateStepVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAcceptedVersion(val.(ManagementTemplateStepVersionable)) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*ManagementCategory)) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["managementTemplate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagementTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplate(val.(ManagementTemplateable)) + } + return nil + } + res["portalLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateActionUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPortalLink(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable)) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["versions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepVersionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepVersionable) + } + m.SetVersions(res) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStep) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStep) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetManagementTemplate gets the managementTemplate property value. The managementTemplate property +func (m *ManagementTemplateStep) GetManagementTemplate()(ManagementTemplateable) { + return m.managementTemplate +} +// GetPortalLink gets the portalLink property value. The portalLink property +func (m *ManagementTemplateStep) GetPortalLink()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable) { + return m.portalLink +} +// GetPriority gets the priority property value. The priority property +func (m *ManagementTemplateStep) GetPriority()(*int32) { + return m.priority +} +// GetVersions gets the versions property value. The versions property +func (m *ManagementTemplateStep) GetVersions()([]ManagementTemplateStepVersionable) { + return m.versions +} +// Serialize serializes information the current object +func (m *ManagementTemplateStep) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("acceptedVersion", m.GetAcceptedVersion()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("managementTemplate", m.GetManagementTemplate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("portalLink", m.GetPortalLink()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + if m.GetVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVersions())) + for i, v := range m.GetVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("versions", cast) + if err != nil { + return err + } + } + return nil +} +// SetAcceptedVersion sets the acceptedVersion property value. The acceptedVersion property +func (m *ManagementTemplateStep) SetAcceptedVersion(value ManagementTemplateStepVersionable)() { + m.acceptedVersion = value +} +// SetCategory sets the category property value. The category property +func (m *ManagementTemplateStep) SetCategory(value *ManagementCategory)() { + m.category = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStep) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStep) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *ManagementTemplateStep) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ManagementTemplateStep) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStep) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStep) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetManagementTemplate sets the managementTemplate property value. The managementTemplate property +func (m *ManagementTemplateStep) SetManagementTemplate(value ManagementTemplateable)() { + m.managementTemplate = value +} +// SetPortalLink sets the portalLink property value. The portalLink property +func (m *ManagementTemplateStep) SetPortalLink(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable)() { + m.portalLink = value +} +// SetPriority sets the priority property value. The priority property +func (m *ManagementTemplateStep) SetPriority(value *int32)() { + m.priority = value +} +// SetVersions sets the versions property value. The versions property +func (m *ManagementTemplateStep) SetVersions(value []ManagementTemplateStepVersionable)() { + m.versions = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_response.go new file mode 100644 index 000000000..7de55df2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepCollectionResponse +type ManagementTemplateStepCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateStepable +} +// NewManagementTemplateStepCollectionResponse instantiates a new ManagementTemplateStepCollectionResponse and sets the default values. +func NewManagementTemplateStepCollectionResponse()(*ManagementTemplateStepCollectionResponse) { + m := &ManagementTemplateStepCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateStepCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateStepCollectionResponse) GetValue()([]ManagementTemplateStepable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateStepCollectionResponse) SetValue(value []ManagementTemplateStepable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_responseable.go new file mode 100644 index 000000000..667bb7f85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepCollectionResponseable +type ManagementTemplateStepCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateStepable) + SetValue(value []ManagementTemplateStepable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment.go new file mode 100644 index 000000000..6b659279d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment.go @@ -0,0 +1,245 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepDeployment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateStepDeployment struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The error property + error GraphAPIErrorDetailsable + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *ManagementTemplateDeploymentStatus + // The templateStepVersion property + templateStepVersion ManagementTemplateStepVersionable + // The tenantId property + tenantId *string +} +// NewManagementTemplateStepDeployment instantiates a new managementTemplateStepDeployment and sets the default values. +func NewManagementTemplateStepDeployment()(*ManagementTemplateStepDeployment) { + m := &ManagementTemplateStepDeployment{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateStepDeploymentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepDeploymentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepDeployment(), nil +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepDeployment) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepDeployment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetError gets the error property value. The error property +func (m *ManagementTemplateStepDeployment) GetError()(GraphAPIErrorDetailsable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepDeployment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGraphAPIErrorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(GraphAPIErrorDetailsable)) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementTemplateDeploymentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ManagementTemplateDeploymentStatus)) + } + return nil + } + res["templateStepVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagementTemplateStepVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTemplateStepVersion(val.(ManagementTemplateStepVersionable)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepDeployment) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepDeployment) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetStatus gets the status property value. The status property +func (m *ManagementTemplateStepDeployment) GetStatus()(*ManagementTemplateDeploymentStatus) { + return m.status +} +// GetTemplateStepVersion gets the templateStepVersion property value. The templateStepVersion property +func (m *ManagementTemplateStepDeployment) GetTemplateStepVersion()(ManagementTemplateStepVersionable) { + return m.templateStepVersion +} +// GetTenantId gets the tenantId property value. The tenantId property +func (m *ManagementTemplateStepDeployment) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepDeployment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("templateStepVersion", m.GetTemplateStepVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepDeployment) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepDeployment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetError sets the error property value. The error property +func (m *ManagementTemplateStepDeployment) SetError(value GraphAPIErrorDetailsable)() { + m.error = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepDeployment) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepDeployment) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *ManagementTemplateStepDeployment) SetStatus(value *ManagementTemplateDeploymentStatus)() { + m.status = value +} +// SetTemplateStepVersion sets the templateStepVersion property value. The templateStepVersion property +func (m *ManagementTemplateStepDeployment) SetTemplateStepVersion(value ManagementTemplateStepVersionable)() { + m.templateStepVersion = value +} +// SetTenantId sets the tenantId property value. The tenantId property +func (m *ManagementTemplateStepDeployment) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_response.go new file mode 100644 index 000000000..91b53bd01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepDeploymentCollectionResponse +type ManagementTemplateStepDeploymentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateStepDeploymentable +} +// NewManagementTemplateStepDeploymentCollectionResponse instantiates a new ManagementTemplateStepDeploymentCollectionResponse and sets the default values. +func NewManagementTemplateStepDeploymentCollectionResponse()(*ManagementTemplateStepDeploymentCollectionResponse) { + m := &ManagementTemplateStepDeploymentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateStepDeploymentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepDeploymentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepDeploymentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepDeploymentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepDeploymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepDeploymentable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepDeploymentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateStepDeploymentCollectionResponse) GetValue()([]ManagementTemplateStepDeploymentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepDeploymentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateStepDeploymentCollectionResponse) SetValue(value []ManagementTemplateStepDeploymentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_responseable.go new file mode 100644 index 000000000..9f8991929 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deployment_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepDeploymentCollectionResponseable +type ManagementTemplateStepDeploymentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateStepDeploymentable) + SetValue(value []ManagementTemplateStepDeploymentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deploymentable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deploymentable.go new file mode 100644 index 000000000..ed30bb71e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_deploymentable.go @@ -0,0 +1,29 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepDeploymentable +type ManagementTemplateStepDeploymentable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetError()(GraphAPIErrorDetailsable) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*ManagementTemplateDeploymentStatus) + GetTemplateStepVersion()(ManagementTemplateStepVersionable) + GetTenantId()(*string) + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetError(value GraphAPIErrorDetailsable)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *ManagementTemplateDeploymentStatus)() + SetTemplateStepVersion(value ManagementTemplateStepVersionable)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary.go new file mode 100644 index 000000000..a7303b3fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary.go @@ -0,0 +1,426 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepTenantSummary provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementTemplateStepTenantSummary struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The assignedTenantsCount property + assignedTenantsCount *int32 + // The compliantTenantsCount property + compliantTenantsCount *int32 + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The dismissedTenantsCount property + dismissedTenantsCount *int32 + // The ineligibleTenantsCount property + ineligibleTenantsCount *int32 + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managementTemplateCollectionDisplayName property + managementTemplateCollectionDisplayName *string + // The managementTemplateCollectionId property + managementTemplateCollectionId *string + // The managementTemplateDisplayName property + managementTemplateDisplayName *string + // The managementTemplateId property + managementTemplateId *string + // The managementTemplateStepDisplayName property + managementTemplateStepDisplayName *string + // The managementTemplateStepId property + managementTemplateStepId *string + // The notCompliantTenantsCount property + notCompliantTenantsCount *int32 +} +// NewManagementTemplateStepTenantSummary instantiates a new managementTemplateStepTenantSummary and sets the default values. +func NewManagementTemplateStepTenantSummary()(*ManagementTemplateStepTenantSummary) { + m := &ManagementTemplateStepTenantSummary{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateStepTenantSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepTenantSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepTenantSummary(), nil +} +// GetAssignedTenantsCount gets the assignedTenantsCount property value. The assignedTenantsCount property +func (m *ManagementTemplateStepTenantSummary) GetAssignedTenantsCount()(*int32) { + return m.assignedTenantsCount +} +// GetCompliantTenantsCount gets the compliantTenantsCount property value. The compliantTenantsCount property +func (m *ManagementTemplateStepTenantSummary) GetCompliantTenantsCount()(*int32) { + return m.compliantTenantsCount +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepTenantSummary) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepTenantSummary) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDismissedTenantsCount gets the dismissedTenantsCount property value. The dismissedTenantsCount property +func (m *ManagementTemplateStepTenantSummary) GetDismissedTenantsCount()(*int32) { + return m.dismissedTenantsCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepTenantSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignedTenantsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTenantsCount(val) + } + return nil + } + res["compliantTenantsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantTenantsCount(val) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["dismissedTenantsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDismissedTenantsCount(val) + } + return nil + } + res["ineligibleTenantsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIneligibleTenantsCount(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["managementTemplateCollectionDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateCollectionDisplayName(val) + } + return nil + } + res["managementTemplateCollectionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateCollectionId(val) + } + return nil + } + res["managementTemplateDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateDisplayName(val) + } + return nil + } + res["managementTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateId(val) + } + return nil + } + res["managementTemplateStepDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateStepDisplayName(val) + } + return nil + } + res["managementTemplateStepId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagementTemplateStepId(val) + } + return nil + } + res["notCompliantTenantsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotCompliantTenantsCount(val) + } + return nil + } + return res +} +// GetIneligibleTenantsCount gets the ineligibleTenantsCount property value. The ineligibleTenantsCount property +func (m *ManagementTemplateStepTenantSummary) GetIneligibleTenantsCount()(*int32) { + return m.ineligibleTenantsCount +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepTenantSummary) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepTenantSummary) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetManagementTemplateCollectionDisplayName gets the managementTemplateCollectionDisplayName property value. The managementTemplateCollectionDisplayName property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateCollectionDisplayName()(*string) { + return m.managementTemplateCollectionDisplayName +} +// GetManagementTemplateCollectionId gets the managementTemplateCollectionId property value. The managementTemplateCollectionId property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateCollectionId()(*string) { + return m.managementTemplateCollectionId +} +// GetManagementTemplateDisplayName gets the managementTemplateDisplayName property value. The managementTemplateDisplayName property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateDisplayName()(*string) { + return m.managementTemplateDisplayName +} +// GetManagementTemplateId gets the managementTemplateId property value. The managementTemplateId property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateId()(*string) { + return m.managementTemplateId +} +// GetManagementTemplateStepDisplayName gets the managementTemplateStepDisplayName property value. The managementTemplateStepDisplayName property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateStepDisplayName()(*string) { + return m.managementTemplateStepDisplayName +} +// GetManagementTemplateStepId gets the managementTemplateStepId property value. The managementTemplateStepId property +func (m *ManagementTemplateStepTenantSummary) GetManagementTemplateStepId()(*string) { + return m.managementTemplateStepId +} +// GetNotCompliantTenantsCount gets the notCompliantTenantsCount property value. The notCompliantTenantsCount property +func (m *ManagementTemplateStepTenantSummary) GetNotCompliantTenantsCount()(*int32) { + return m.notCompliantTenantsCount +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepTenantSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("assignedTenantsCount", m.GetAssignedTenantsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("compliantTenantsCount", m.GetCompliantTenantsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dismissedTenantsCount", m.GetDismissedTenantsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("ineligibleTenantsCount", m.GetIneligibleTenantsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateCollectionDisplayName", m.GetManagementTemplateCollectionDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateCollectionId", m.GetManagementTemplateCollectionId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateDisplayName", m.GetManagementTemplateDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateId", m.GetManagementTemplateId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateStepDisplayName", m.GetManagementTemplateStepDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managementTemplateStepId", m.GetManagementTemplateStepId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notCompliantTenantsCount", m.GetNotCompliantTenantsCount()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTenantsCount sets the assignedTenantsCount property value. The assignedTenantsCount property +func (m *ManagementTemplateStepTenantSummary) SetAssignedTenantsCount(value *int32)() { + m.assignedTenantsCount = value +} +// SetCompliantTenantsCount sets the compliantTenantsCount property value. The compliantTenantsCount property +func (m *ManagementTemplateStepTenantSummary) SetCompliantTenantsCount(value *int32)() { + m.compliantTenantsCount = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepTenantSummary) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepTenantSummary) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDismissedTenantsCount sets the dismissedTenantsCount property value. The dismissedTenantsCount property +func (m *ManagementTemplateStepTenantSummary) SetDismissedTenantsCount(value *int32)() { + m.dismissedTenantsCount = value +} +// SetIneligibleTenantsCount sets the ineligibleTenantsCount property value. The ineligibleTenantsCount property +func (m *ManagementTemplateStepTenantSummary) SetIneligibleTenantsCount(value *int32)() { + m.ineligibleTenantsCount = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepTenantSummary) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepTenantSummary) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetManagementTemplateCollectionDisplayName sets the managementTemplateCollectionDisplayName property value. The managementTemplateCollectionDisplayName property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateCollectionDisplayName(value *string)() { + m.managementTemplateCollectionDisplayName = value +} +// SetManagementTemplateCollectionId sets the managementTemplateCollectionId property value. The managementTemplateCollectionId property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateCollectionId(value *string)() { + m.managementTemplateCollectionId = value +} +// SetManagementTemplateDisplayName sets the managementTemplateDisplayName property value. The managementTemplateDisplayName property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateDisplayName(value *string)() { + m.managementTemplateDisplayName = value +} +// SetManagementTemplateId sets the managementTemplateId property value. The managementTemplateId property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateId(value *string)() { + m.managementTemplateId = value +} +// SetManagementTemplateStepDisplayName sets the managementTemplateStepDisplayName property value. The managementTemplateStepDisplayName property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateStepDisplayName(value *string)() { + m.managementTemplateStepDisplayName = value +} +// SetManagementTemplateStepId sets the managementTemplateStepId property value. The managementTemplateStepId property +func (m *ManagementTemplateStepTenantSummary) SetManagementTemplateStepId(value *string)() { + m.managementTemplateStepId = value +} +// SetNotCompliantTenantsCount sets the notCompliantTenantsCount property value. The notCompliantTenantsCount property +func (m *ManagementTemplateStepTenantSummary) SetNotCompliantTenantsCount(value *int32)() { + m.notCompliantTenantsCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_response.go new file mode 100644 index 000000000..9372eb767 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepTenantSummaryCollectionResponse +type ManagementTemplateStepTenantSummaryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateStepTenantSummaryable +} +// NewManagementTemplateStepTenantSummaryCollectionResponse instantiates a new ManagementTemplateStepTenantSummaryCollectionResponse and sets the default values. +func NewManagementTemplateStepTenantSummaryCollectionResponse()(*ManagementTemplateStepTenantSummaryCollectionResponse) { + m := &ManagementTemplateStepTenantSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateStepTenantSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepTenantSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepTenantSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepTenantSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepTenantSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepTenantSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepTenantSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateStepTenantSummaryCollectionResponse) GetValue()([]ManagementTemplateStepTenantSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepTenantSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateStepTenantSummaryCollectionResponse) SetValue(value []ManagementTemplateStepTenantSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_responseable.go new file mode 100644 index 000000000..f8793aa23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summary_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepTenantSummaryCollectionResponseable +type ManagementTemplateStepTenantSummaryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateStepTenantSummaryable) + SetValue(value []ManagementTemplateStepTenantSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summaryable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summaryable.go new file mode 100644 index 000000000..c5fa0e4e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_tenant_summaryable.go @@ -0,0 +1,43 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepTenantSummaryable +type ManagementTemplateStepTenantSummaryable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTenantsCount()(*int32) + GetCompliantTenantsCount()(*int32) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDismissedTenantsCount()(*int32) + GetIneligibleTenantsCount()(*int32) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementTemplateCollectionDisplayName()(*string) + GetManagementTemplateCollectionId()(*string) + GetManagementTemplateDisplayName()(*string) + GetManagementTemplateId()(*string) + GetManagementTemplateStepDisplayName()(*string) + GetManagementTemplateStepId()(*string) + GetNotCompliantTenantsCount()(*int32) + SetAssignedTenantsCount(value *int32)() + SetCompliantTenantsCount(value *int32)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDismissedTenantsCount(value *int32)() + SetIneligibleTenantsCount(value *int32)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementTemplateCollectionDisplayName(value *string)() + SetManagementTemplateCollectionId(value *string)() + SetManagementTemplateDisplayName(value *string)() + SetManagementTemplateId(value *string)() + SetManagementTemplateStepDisplayName(value *string)() + SetManagementTemplateStepId(value *string)() + SetNotCompliantTenantsCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version.go new file mode 100644 index 000000000..4d1ad1072 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version.go @@ -0,0 +1,330 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepVersion +type ManagementTemplateStepVersion struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The acceptedFor property + acceptedFor ManagementTemplateStepable + // The contentMarkdown property + contentMarkdown *string + // The createdByUserId property + createdByUserId *string + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The deployments property + deployments []ManagementTemplateStepDeploymentable + // The lastActionByUserId property + lastActionByUserId *string + // The lastActionDateTime property + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name property + name *string + // The templateStep property + templateStep ManagementTemplateStepable + // The version property + version *int32 + // The versionInformation property + versionInformation *string +} +// NewManagementTemplateStepVersion instantiates a new managementTemplateStepVersion and sets the default values. +func NewManagementTemplateStepVersion()(*ManagementTemplateStepVersion) { + m := &ManagementTemplateStepVersion{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateManagementTemplateStepVersionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepVersionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepVersion(), nil +} +// GetAcceptedFor gets the acceptedFor property value. The acceptedFor property +func (m *ManagementTemplateStepVersion) GetAcceptedFor()(ManagementTemplateStepable) { + return m.acceptedFor +} +// GetContentMarkdown gets the contentMarkdown property value. The contentMarkdown property +func (m *ManagementTemplateStepVersion) GetContentMarkdown()(*string) { + return m.contentMarkdown +} +// GetCreatedByUserId gets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepVersion) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepVersion) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeployments gets the deployments property value. The deployments property +func (m *ManagementTemplateStepVersion) GetDeployments()([]ManagementTemplateStepDeploymentable) { + return m.deployments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepVersion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acceptedFor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagementTemplateStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAcceptedFor(val.(ManagementTemplateStepable)) + } + return nil + } + res["contentMarkdown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentMarkdown(val) + } + return nil + } + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deployments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepDeploymentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepDeploymentable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepDeploymentable) + } + m.SetDeployments(res) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["templateStep"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateManagementTemplateStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTemplateStep(val.(ManagementTemplateStepable)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["versionInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersionInformation(val) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepVersion) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepVersion) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetName gets the name property value. The name property +func (m *ManagementTemplateStepVersion) GetName()(*string) { + return m.name +} +// GetTemplateStep gets the templateStep property value. The templateStep property +func (m *ManagementTemplateStepVersion) GetTemplateStep()(ManagementTemplateStepable) { + return m.templateStep +} +// GetVersion gets the version property value. The version property +func (m *ManagementTemplateStepVersion) GetVersion()(*int32) { + return m.version +} +// GetVersionInformation gets the versionInformation property value. The versionInformation property +func (m *ManagementTemplateStepVersion) GetVersionInformation()(*string) { + return m.versionInformation +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepVersion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("acceptedFor", m.GetAcceptedFor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentMarkdown", m.GetContentMarkdown()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDeployments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeployments())) + for i, v := range m.GetDeployments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deployments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("templateStep", m.GetTemplateStep()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("version", m.GetVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("versionInformation", m.GetVersionInformation()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptedFor sets the acceptedFor property value. The acceptedFor property +func (m *ManagementTemplateStepVersion) SetAcceptedFor(value ManagementTemplateStepable)() { + m.acceptedFor = value +} +// SetContentMarkdown sets the contentMarkdown property value. The contentMarkdown property +func (m *ManagementTemplateStepVersion) SetContentMarkdown(value *string)() { + m.contentMarkdown = value +} +// SetCreatedByUserId sets the createdByUserId property value. The createdByUserId property +func (m *ManagementTemplateStepVersion) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *ManagementTemplateStepVersion) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeployments sets the deployments property value. The deployments property +func (m *ManagementTemplateStepVersion) SetDeployments(value []ManagementTemplateStepDeploymentable)() { + m.deployments = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The lastActionByUserId property +func (m *ManagementTemplateStepVersion) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The lastActionDateTime property +func (m *ManagementTemplateStepVersion) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetName sets the name property value. The name property +func (m *ManagementTemplateStepVersion) SetName(value *string)() { + m.name = value +} +// SetTemplateStep sets the templateStep property value. The templateStep property +func (m *ManagementTemplateStepVersion) SetTemplateStep(value ManagementTemplateStepable)() { + m.templateStep = value +} +// SetVersion sets the version property value. The version property +func (m *ManagementTemplateStepVersion) SetVersion(value *int32)() { + m.version = value +} +// SetVersionInformation sets the versionInformation property value. The versionInformation property +func (m *ManagementTemplateStepVersion) SetVersionInformation(value *string)() { + m.versionInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_response.go new file mode 100644 index 000000000..b2ac7efcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepVersionCollectionResponse +type ManagementTemplateStepVersionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []ManagementTemplateStepVersionable +} +// NewManagementTemplateStepVersionCollectionResponse instantiates a new ManagementTemplateStepVersionCollectionResponse and sets the default values. +func NewManagementTemplateStepVersionCollectionResponse()(*ManagementTemplateStepVersionCollectionResponse) { + m := &ManagementTemplateStepVersionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementTemplateStepVersionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementTemplateStepVersionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementTemplateStepVersionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementTemplateStepVersionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementTemplateStepVersionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementTemplateStepVersionable, len(val)) + for i, v := range val { + res[i] = v.(ManagementTemplateStepVersionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementTemplateStepVersionCollectionResponse) GetValue()([]ManagementTemplateStepVersionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementTemplateStepVersionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementTemplateStepVersionCollectionResponse) SetValue(value []ManagementTemplateStepVersionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_responseable.go new file mode 100644 index 000000000..b8b9b4d65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_version_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepVersionCollectionResponseable +type ManagementTemplateStepVersionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementTemplateStepVersionable) + SetValue(value []ManagementTemplateStepVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_versionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_versionable.go new file mode 100644 index 000000000..cd9db611a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_step_versionable.go @@ -0,0 +1,35 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepVersionable +type ManagementTemplateStepVersionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptedFor()(ManagementTemplateStepable) + GetContentMarkdown()(*string) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeployments()([]ManagementTemplateStepDeploymentable) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetTemplateStep()(ManagementTemplateStepable) + GetVersion()(*int32) + GetVersionInformation()(*string) + SetAcceptedFor(value ManagementTemplateStepable)() + SetContentMarkdown(value *string)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeployments(value []ManagementTemplateStepDeploymentable)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetTemplateStep(value ManagementTemplateStepable)() + SetVersion(value *int32)() + SetVersionInformation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_template_stepable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_stepable.go new file mode 100644 index 000000000..1b0abdf45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_template_stepable.go @@ -0,0 +1,37 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateStepable +type ManagementTemplateStepable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptedVersion()(ManagementTemplateStepVersionable) + GetCategory()(*ManagementCategory) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementTemplate()(ManagementTemplateable) + GetPortalLink()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable) + GetPriority()(*int32) + GetVersions()([]ManagementTemplateStepVersionable) + SetAcceptedVersion(value ManagementTemplateStepVersionable)() + SetCategory(value *ManagementCategory)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementTemplate(value ManagementTemplateable)() + SetPortalLink(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable)() + SetPriority(value *int32)() + SetVersions(value []ManagementTemplateStepVersionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/management_templateable.go b/src/internal/connector/graph/betasdk/models/managedtenants/management_templateable.go new file mode 100644 index 000000000..a3d709fc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/management_templateable.go @@ -0,0 +1,45 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ManagementTemplateable +type ManagementTemplateable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*ManagementCategory) + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetInformationLinks()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagementTemplateCollections()([]ManagementTemplateCollectionable) + GetManagementTemplateSteps()([]ManagementTemplateStepable) + GetParameters()([]TemplateParameterable) + GetPriority()(*int32) + GetProvider()(*ManagementProvider) + GetUserImpact()(*string) + GetVersion()(*int32) + GetWorkloadActions()([]WorkloadActionable) + SetCategory(value *ManagementCategory)() + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetInformationLinks(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ActionUrlable)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagementTemplateCollections(value []ManagementTemplateCollectionable)() + SetManagementTemplateSteps(value []ManagementTemplateStepable)() + SetParameters(value []TemplateParameterable)() + SetPriority(value *int32)() + SetProvider(value *ManagementProvider)() + SetUserImpact(value *string)() + SetVersion(value *int32)() + SetWorkloadActions(value []WorkloadActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/my_role.go b/src/internal/connector/graph/betasdk/models/managedtenants/my_role.go new file mode 100644 index 000000000..720b2b93a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/my_role.go @@ -0,0 +1,131 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MyRole +type MyRole struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A collection of role assignments for the managed tenant. + assignments []RoleAssignmentable + // The OdataType property + odataType *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string +} +// NewMyRole instantiates a new myRole and sets the default values. +func NewMyRole()(*MyRole) { + m := &MyRole{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMyRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMyRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMyRole(), 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 *MyRole) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignments gets the assignments property value. A collection of role assignments for the managed tenant. +func (m *MyRole) GetAssignments()([]RoleAssignmentable) { + return m.assignments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MyRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleAssignmentable) + } + m.SetAssignments(res) + } + 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["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MyRole) GetOdataType()(*string) { + return m.odataType +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *MyRole) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *MyRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + 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 *MyRole) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignments sets the assignments property value. A collection of role assignments for the managed tenant. +func (m *MyRole) SetAssignments(value []RoleAssignmentable)() { + m.assignments = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MyRole) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *MyRole) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_response.go new file mode 100644 index 000000000..79806344f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MyRoleCollectionResponse +type MyRoleCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []MyRoleable +} +// NewMyRoleCollectionResponse instantiates a new MyRoleCollectionResponse and sets the default values. +func NewMyRoleCollectionResponse()(*MyRoleCollectionResponse) { + m := &MyRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMyRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMyRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMyRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MyRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMyRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MyRoleable, len(val)) + for i, v := range val { + res[i] = v.(MyRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MyRoleCollectionResponse) GetValue()([]MyRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *MyRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MyRoleCollectionResponse) SetValue(value []MyRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_responseable.go new file mode 100644 index 000000000..d7310e2c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/my_role_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// MyRoleCollectionResponseable +type MyRoleCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MyRoleable) + SetValue(value []MyRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/my_roleable.go b/src/internal/connector/graph/betasdk/models/managedtenants/my_roleable.go new file mode 100644 index 000000000..d6306c3a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/my_roleable.go @@ -0,0 +1,17 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MyRoleable +type MyRoleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]RoleAssignmentable) + GetOdataType()(*string) + GetTenantId()(*string) + SetAssignments(value []RoleAssignmentable)() + SetOdataType(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/notification_destination.go b/src/internal/connector/graph/betasdk/models/managedtenants/notification_destination.go new file mode 100644 index 000000000..35cfd5f41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/notification_destination.go @@ -0,0 +1,43 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NotificationDestination int + +const ( + NONE_NOTIFICATIONDESTINATION NotificationDestination = iota + API_NOTIFICATIONDESTINATION + EMAIL_NOTIFICATIONDESTINATION + SMS_NOTIFICATIONDESTINATION + UNKNOWNFUTUREVALUE_NOTIFICATIONDESTINATION +) + +func (i NotificationDestination) String() string { + return []string{"none", "api", "email", "sms", "unknownFutureValue"}[i] +} +func ParseNotificationDestination(v string) (interface{}, error) { + result := NONE_NOTIFICATIONDESTINATION + switch v { + case "none": + result = NONE_NOTIFICATIONDESTINATION + case "api": + result = API_NOTIFICATIONDESTINATION + case "email": + result = EMAIL_NOTIFICATIONDESTINATION + case "sms": + result = SMS_NOTIFICATIONDESTINATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_NOTIFICATIONDESTINATION + default: + return 0, errors.New("Unknown NotificationDestination value: " + v) + } + return &result, nil +} +func SerializeNotificationDestination(values []NotificationDestination) []string { + 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/managedtenants/notification_target.go b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target.go new file mode 100644 index 000000000..91138c67f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationTarget +type NotificationTarget 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 displayName property + displayName *string + // The OdataType property + odataType *string +} +// NewNotificationTarget instantiates a new notificationTarget and sets the default values. +func NewNotificationTarget()(*NotificationTarget) { + m := &NotificationTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNotificationTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationTarget(), 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 *NotificationTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *NotificationTarget) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NotificationTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *NotificationTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *NotificationTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *NotificationTarget) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NotificationTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_response.go new file mode 100644 index 000000000..945d37d80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationTargetCollectionResponse +type NotificationTargetCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []NotificationTargetable +} +// NewNotificationTargetCollectionResponse instantiates a new NotificationTargetCollectionResponse and sets the default values. +func NewNotificationTargetCollectionResponse()(*NotificationTargetCollectionResponse) { + m := &NotificationTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotificationTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationTargetable, len(val)) + for i, v := range val { + res[i] = v.(NotificationTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotificationTargetCollectionResponse) GetValue()([]NotificationTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotificationTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotificationTargetCollectionResponse) SetValue(value []NotificationTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_responseable.go new file mode 100644 index 000000000..c8219c7c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/notification_target_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// NotificationTargetCollectionResponseable +type NotificationTargetCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NotificationTargetable) + SetValue(value []NotificationTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/notification_targetable.go b/src/internal/connector/graph/betasdk/models/managedtenants/notification_targetable.go new file mode 100644 index 000000000..df5e5c218 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/notification_targetable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationTargetable +type NotificationTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment.go new file mode 100644 index 000000000..d876a924b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment.go @@ -0,0 +1,132 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignment +type RoleAssignment 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 type of the admin relationship(s) associated with the role assignment. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. + assignmentType *DelegatedPrivilegeStatus + // The OdataType property + odataType *string + // The collection of roles assigned. + roles []RoleDefinitionable +} +// NewRoleAssignment instantiates a new roleAssignment and sets the default values. +func NewRoleAssignment()(*RoleAssignment) { + m := &RoleAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleAssignment(), 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 *RoleAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentType gets the assignmentType property value. The type of the admin relationship(s) associated with the role assignment. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. +func (m *RoleAssignment) GetAssignmentType()(*DelegatedPrivilegeStatus) { + return m.assignmentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedPrivilegeStatus) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentType(val.(*DelegatedPrivilegeStatus)) + } + 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["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(RoleDefinitionable) + } + m.SetRoles(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RoleAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetRoles gets the roles property value. The collection of roles assigned. +func (m *RoleAssignment) GetRoles()([]RoleDefinitionable) { + return m.roles +} +// Serialize serializes information the current object +func (m *RoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentType() != nil { + cast := (*m.GetAssignmentType()).String() + err := writer.WriteStringValue("assignmentType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoles())) + for i, v := range m.GetRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("roles", 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 *RoleAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentType sets the assignmentType property value. The type of the admin relationship(s) associated with the role assignment. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. +func (m *RoleAssignment) SetAssignmentType(value *DelegatedPrivilegeStatus)() { + m.assignmentType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RoleAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoles sets the roles property value. The collection of roles assigned. +func (m *RoleAssignment) SetRoles(value []RoleDefinitionable)() { + m.roles = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_response.go new file mode 100644 index 000000000..2341da2a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RoleAssignmentCollectionResponse +type RoleAssignmentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []RoleAssignmentable +} +// NewRoleAssignmentCollectionResponse instantiates a new RoleAssignmentCollectionResponse and sets the default values. +func NewRoleAssignmentCollectionResponse()(*RoleAssignmentCollectionResponse) { + m := &RoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleAssignmentCollectionResponse) GetValue()([]RoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleAssignmentCollectionResponse) SetValue(value []RoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_responseable.go new file mode 100644 index 000000000..ddd92063f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignment_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RoleAssignmentCollectionResponseable +type RoleAssignmentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleAssignmentable) + SetValue(value []RoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_assignmentable.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignmentable.go new file mode 100644 index 000000000..fc1153023 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_assignmentable.go @@ -0,0 +1,17 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignmentable +type RoleAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentType()(*DelegatedPrivilegeStatus) + GetOdataType()(*string) + GetRoles()([]RoleDefinitionable) + SetAssignmentType(value *DelegatedPrivilegeStatus)() + SetOdataType(value *string)() + SetRoles(value []RoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_definition.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition.go new file mode 100644 index 000000000..fd471691c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition.go @@ -0,0 +1,149 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinition +type RoleDefinition 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 description for the role. + description *string + // The display name for the role assignment. + displayName *string + // The OdataType property + odataType *string + // The unique identifier for the template. + templateId *string +} +// NewRoleDefinition instantiates a new roleDefinition and sets the default values. +func NewRoleDefinition()(*RoleDefinition) { + m := &RoleDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRoleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleDefinition(), 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 *RoleDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description for the role. +func (m *RoleDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the role assignment. +func (m *RoleDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RoleDefinition) GetOdataType()(*string) { + return m.odataType +} +// GetTemplateId gets the templateId property value. The unique identifier for the template. +func (m *RoleDefinition) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *RoleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("templateId", m.GetTemplateId()) + 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 *RoleDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description for the role. +func (m *RoleDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the role assignment. +func (m *RoleDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RoleDefinition) SetOdataType(value *string)() { + m.odataType = value +} +// SetTemplateId sets the templateId property value. The unique identifier for the template. +func (m *RoleDefinition) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_response.go new file mode 100644 index 000000000..c02bee67a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RoleDefinitionCollectionResponse +type RoleDefinitionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []RoleDefinitionable +} +// NewRoleDefinitionCollectionResponse instantiates a new RoleDefinitionCollectionResponse and sets the default values. +func NewRoleDefinitionCollectionResponse()(*RoleDefinitionCollectionResponse) { + m := &RoleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(RoleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleDefinitionCollectionResponse) GetValue()([]RoleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleDefinitionCollectionResponse) SetValue(value []RoleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_responseable.go new file mode 100644 index 000000000..8ffd23eb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_definition_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RoleDefinitionCollectionResponseable +type RoleDefinitionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleDefinitionable) + SetValue(value []RoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/role_definitionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/role_definitionable.go new file mode 100644 index 000000000..2194ca03e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/role_definitionable.go @@ -0,0 +1,19 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinitionable +type RoleDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + GetTemplateId()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/setting.go b/src/internal/connector/graph/betasdk/models/managedtenants/setting.go new file mode 100644 index 000000000..7023a728b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/setting.go @@ -0,0 +1,202 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Setting +type Setting 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 display name for the setting. Required. Read-only. + displayName *string + // The value for the setting serialized as string of JSON. Required. Read-only. + jsonValue *string + // The OdataType property + odataType *string + // A flag indicating whether the setting can be override existing configurations when applied. Required. Read-only. + overwriteAllowed *bool + // The settingId property + settingId *string + // The valueType property + valueType *ManagementParameterValueType +} +// NewSetting instantiates a new setting and sets the default values. +func NewSetting()(*Setting) { + m := &Setting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSetting(), 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 *Setting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name for the setting. Required. Read-only. +func (m *Setting) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Setting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["jsonValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJsonValue(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["overwriteAllowed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOverwriteAllowed(val) + } + return nil + } + res["settingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingId(val) + } + return nil + } + res["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementParameterValueType) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*ManagementParameterValueType)) + } + return nil + } + return res +} +// GetJsonValue gets the jsonValue property value. The value for the setting serialized as string of JSON. Required. Read-only. +func (m *Setting) GetJsonValue()(*string) { + return m.jsonValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Setting) GetOdataType()(*string) { + return m.odataType +} +// GetOverwriteAllowed gets the overwriteAllowed property value. A flag indicating whether the setting can be override existing configurations when applied. Required. Read-only. +func (m *Setting) GetOverwriteAllowed()(*bool) { + return m.overwriteAllowed +} +// GetSettingId gets the settingId property value. The settingId property +func (m *Setting) GetSettingId()(*string) { + return m.settingId +} +// GetValueType gets the valueType property value. The valueType property +func (m *Setting) GetValueType()(*ManagementParameterValueType) { + return m.valueType +} +// Serialize serializes information the current object +func (m *Setting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("jsonValue", m.GetJsonValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("overwriteAllowed", m.GetOverwriteAllowed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("settingId", m.GetSettingId()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("valueType", &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 *Setting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name for the setting. Required. Read-only. +func (m *Setting) SetDisplayName(value *string)() { + m.displayName = value +} +// SetJsonValue sets the jsonValue property value. The value for the setting serialized as string of JSON. Required. Read-only. +func (m *Setting) SetJsonValue(value *string)() { + m.jsonValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Setting) SetOdataType(value *string)() { + m.odataType = value +} +// SetOverwriteAllowed sets the overwriteAllowed property value. A flag indicating whether the setting can be override existing configurations when applied. Required. Read-only. +func (m *Setting) SetOverwriteAllowed(value *bool)() { + m.overwriteAllowed = value +} +// SetSettingId sets the settingId property value. The settingId property +func (m *Setting) SetSettingId(value *string)() { + m.settingId = value +} +// SetValueType sets the valueType property value. The valueType property +func (m *Setting) SetValueType(value *ManagementParameterValueType)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_response.go new file mode 100644 index 000000000..929678383 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SettingCollectionResponse +type SettingCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Settingable +} +// NewSettingCollectionResponse instantiates a new SettingCollectionResponse and sets the default values. +func NewSettingCollectionResponse()(*SettingCollectionResponse) { + m := &SettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Settingable, len(val)) + for i, v := range val { + res[i] = v.(Settingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SettingCollectionResponse) GetValue()([]Settingable) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SettingCollectionResponse) SetValue(value []Settingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_responseable.go new file mode 100644 index 000000000..ef96d62fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/setting_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SettingCollectionResponseable +type SettingCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Settingable) + SetValue(value []Settingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/settingable.go b/src/internal/connector/graph/betasdk/models/managedtenants/settingable.go new file mode 100644 index 000000000..738ece2b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/settingable.go @@ -0,0 +1,23 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Settingable +type Settingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetJsonValue()(*string) + GetOdataType()(*string) + GetOverwriteAllowed()(*bool) + GetSettingId()(*string) + GetValueType()(*ManagementParameterValueType) + SetDisplayName(value *string)() + SetJsonValue(value *string)() + SetOdataType(value *string)() + SetOverwriteAllowed(value *bool)() + SetSettingId(value *string)() + SetValueType(value *ManagementParameterValueType)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter.go b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter.go new file mode 100644 index 000000000..1ee088e26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter.go @@ -0,0 +1,202 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TemplateParameter +type TemplateParameter 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 description for the template parameter. Optional. Read-only. + description *string + // The display name for the template parameter. Required. Read-only. + displayName *string + // The allowed values for the template parameter represented by a serialized string of JSON. Optional. Read-only. + jsonAllowedValues *string + // The default value for the template parameter represented by a serialized string of JSON. Required. Read-only. + jsonDefaultValue *string + // The OdataType property + odataType *string + // The valueType property + valueType *ManagementParameterValueType +} +// NewTemplateParameter instantiates a new templateParameter and sets the default values. +func NewTemplateParameter()(*TemplateParameter) { + m := &TemplateParameter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTemplateParameterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTemplateParameterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTemplateParameter(), 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 *TemplateParameter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description for the template parameter. Optional. Read-only. +func (m *TemplateParameter) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the template parameter. Required. Read-only. +func (m *TemplateParameter) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TemplateParameter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["jsonAllowedValues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJsonAllowedValues(val) + } + return nil + } + res["jsonDefaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJsonDefaultValue(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["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseManagementParameterValueType) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*ManagementParameterValueType)) + } + return nil + } + return res +} +// GetJsonAllowedValues gets the jsonAllowedValues property value. The allowed values for the template parameter represented by a serialized string of JSON. Optional. Read-only. +func (m *TemplateParameter) GetJsonAllowedValues()(*string) { + return m.jsonAllowedValues +} +// GetJsonDefaultValue gets the jsonDefaultValue property value. The default value for the template parameter represented by a serialized string of JSON. Required. Read-only. +func (m *TemplateParameter) GetJsonDefaultValue()(*string) { + return m.jsonDefaultValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TemplateParameter) GetOdataType()(*string) { + return m.odataType +} +// GetValueType gets the valueType property value. The valueType property +func (m *TemplateParameter) GetValueType()(*ManagementParameterValueType) { + return m.valueType +} +// Serialize serializes information the current object +func (m *TemplateParameter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("jsonAllowedValues", m.GetJsonAllowedValues()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("jsonDefaultValue", m.GetJsonDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("valueType", &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 *TemplateParameter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description for the template parameter. Optional. Read-only. +func (m *TemplateParameter) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the template parameter. Required. Read-only. +func (m *TemplateParameter) SetDisplayName(value *string)() { + m.displayName = value +} +// SetJsonAllowedValues sets the jsonAllowedValues property value. The allowed values for the template parameter represented by a serialized string of JSON. Optional. Read-only. +func (m *TemplateParameter) SetJsonAllowedValues(value *string)() { + m.jsonAllowedValues = value +} +// SetJsonDefaultValue sets the jsonDefaultValue property value. The default value for the template parameter represented by a serialized string of JSON. Required. Read-only. +func (m *TemplateParameter) SetJsonDefaultValue(value *string)() { + m.jsonDefaultValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TemplateParameter) SetOdataType(value *string)() { + m.odataType = value +} +// SetValueType sets the valueType property value. The valueType property +func (m *TemplateParameter) SetValueType(value *ManagementParameterValueType)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_response.go new file mode 100644 index 000000000..eade23f02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TemplateParameterCollectionResponse +type TemplateParameterCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TemplateParameterable +} +// NewTemplateParameterCollectionResponse instantiates a new TemplateParameterCollectionResponse and sets the default values. +func NewTemplateParameterCollectionResponse()(*TemplateParameterCollectionResponse) { + m := &TemplateParameterCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTemplateParameterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTemplateParameterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTemplateParameterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TemplateParameterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTemplateParameterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TemplateParameterable, len(val)) + for i, v := range val { + res[i] = v.(TemplateParameterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TemplateParameterCollectionResponse) GetValue()([]TemplateParameterable) { + return m.value +} +// Serialize serializes information the current object +func (m *TemplateParameterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TemplateParameterCollectionResponse) SetValue(value []TemplateParameterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_responseable.go new file mode 100644 index 000000000..0e15587cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameter_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TemplateParameterCollectionResponseable +type TemplateParameterCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TemplateParameterable) + SetValue(value []TemplateParameterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/template_parameterable.go b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameterable.go new file mode 100644 index 000000000..41068819e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/template_parameterable.go @@ -0,0 +1,23 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TemplateParameterable +type TemplateParameterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetJsonAllowedValues()(*string) + GetJsonDefaultValue()(*string) + GetOdataType()(*string) + GetValueType()(*ManagementParameterValueType) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetJsonAllowedValues(value *string)() + SetJsonDefaultValue(value *string)() + SetOdataType(value *string)() + SetValueType(value *ManagementParameterValueType)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant.go new file mode 100644 index 000000000..c35d125a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant.go @@ -0,0 +1,192 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tenant provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Tenant struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The relationship details for the tenant with the managing entity. + contract TenantContractable + // The date and time the tenant was created in the multi-tenant management platform. Optional. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name for the tenant. Required. Read-only. + displayName *string + // The date and time the tenant was last updated within the multi-tenant management platform. Optional. Read-only. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string + // The onboarding status information for the tenant. Optional. Read-only. + tenantStatusInformation TenantStatusInformationable +} +// NewTenant instantiates a new tenant and sets the default values. +func NewTenant()(*Tenant) { + m := &Tenant{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTenantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenant(), nil +} +// GetContract gets the contract property value. The relationship details for the tenant with the managing entity. +func (m *Tenant) GetContract()(TenantContractable) { + return m.contract +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the tenant was created in the multi-tenant management platform. Optional. Read-only. +func (m *Tenant) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The display name for the tenant. Required. Read-only. +func (m *Tenant) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Tenant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contract"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTenantContractFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContract(val.(TenantContractable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["tenantStatusInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTenantStatusInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTenantStatusInformation(val.(TenantStatusInformationable)) + } + return nil + } + return res +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. The date and time the tenant was last updated within the multi-tenant management platform. Optional. Read-only. +func (m *Tenant) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *Tenant) GetTenantId()(*string) { + return m.tenantId +} +// GetTenantStatusInformation gets the tenantStatusInformation property value. The onboarding status information for the tenant. Optional. Read-only. +func (m *Tenant) GetTenantStatusInformation()(TenantStatusInformationable) { + return m.tenantStatusInformation +} +// Serialize serializes information the current object +func (m *Tenant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("contract", m.GetContract()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("tenantStatusInformation", m.GetTenantStatusInformation()) + if err != nil { + return err + } + } + return nil +} +// SetContract sets the contract property value. The relationship details for the tenant with the managing entity. +func (m *Tenant) SetContract(value TenantContractable)() { + m.contract = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the tenant was created in the multi-tenant management platform. Optional. Read-only. +func (m *Tenant) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The display name for the tenant. Required. Read-only. +func (m *Tenant) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. The date and time the tenant was last updated within the multi-tenant management platform. Optional. Read-only. +func (m *Tenant) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *Tenant) SetTenantId(value *string)() { + m.tenantId = value +} +// SetTenantStatusInformation sets the tenantStatusInformation property value. The onboarding status information for the tenant. Optional. Read-only. +func (m *Tenant) SetTenantStatusInformation(value TenantStatusInformationable)() { + m.tenantStatusInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_response.go new file mode 100644 index 000000000..b7f176754 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCollectionResponse +type TenantCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Tenantable +} +// NewTenantCollectionResponse instantiates a new TenantCollectionResponse and sets the default values. +func NewTenantCollectionResponse()(*TenantCollectionResponse) { + m := &TenantCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Tenantable, len(val)) + for i, v := range val { + res[i] = v.(Tenantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantCollectionResponse) GetValue()([]Tenantable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantCollectionResponse) SetValue(value []Tenantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_responseable.go new file mode 100644 index 000000000..66c2f156a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCollectionResponseable +type TenantCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Tenantable) + SetValue(value []Tenantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information.go new file mode 100644 index 000000000..abf613254 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information.go @@ -0,0 +1,201 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantContactInformation +type TenantContactInformation 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 email address for the contact. Optional + email *string + // The name for the contact. Required. + name *string + // The notes associated with the contact. Optional + notes *string + // The OdataType property + odataType *string + // The phone number for the contact. Optional. + phone *string + // The title for the contact. Required. + title *string +} +// NewTenantContactInformation instantiates a new tenantContactInformation and sets the default values. +func NewTenantContactInformation()(*TenantContactInformation) { + m := &TenantContactInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantContactInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantContactInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantContactInformation(), 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 *TenantContactInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEmail gets the email property value. The email address for the contact. Optional +func (m *TenantContactInformation) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantContactInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(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["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhone(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name for the contact. Required. +func (m *TenantContactInformation) GetName()(*string) { + return m.name +} +// GetNotes gets the notes property value. The notes associated with the contact. Optional +func (m *TenantContactInformation) GetNotes()(*string) { + return m.notes +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantContactInformation) GetOdataType()(*string) { + return m.odataType +} +// GetPhone gets the phone property value. The phone number for the contact. Optional. +func (m *TenantContactInformation) GetPhone()(*string) { + return m.phone +} +// GetTitle gets the title property value. The title for the contact. Required. +func (m *TenantContactInformation) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *TenantContactInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + 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 *TenantContactInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEmail sets the email property value. The email address for the contact. Optional +func (m *TenantContactInformation) SetEmail(value *string)() { + m.email = value +} +// SetName sets the name property value. The name for the contact. Required. +func (m *TenantContactInformation) SetName(value *string)() { + m.name = value +} +// SetNotes sets the notes property value. The notes associated with the contact. Optional +func (m *TenantContactInformation) SetNotes(value *string)() { + m.notes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantContactInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetPhone sets the phone property value. The phone number for the contact. Optional. +func (m *TenantContactInformation) SetPhone(value *string)() { + m.phone = value +} +// SetTitle sets the title property value. The title for the contact. Required. +func (m *TenantContactInformation) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_response.go new file mode 100644 index 000000000..2fd012f11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantContactInformationCollectionResponse +type TenantContactInformationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantContactInformationable +} +// NewTenantContactInformationCollectionResponse instantiates a new TenantContactInformationCollectionResponse and sets the default values. +func NewTenantContactInformationCollectionResponse()(*TenantContactInformationCollectionResponse) { + m := &TenantContactInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantContactInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantContactInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantContactInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantContactInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantContactInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantContactInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantContactInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantContactInformationCollectionResponse) GetValue()([]TenantContactInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantContactInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantContactInformationCollectionResponse) SetValue(value []TenantContactInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_responseable.go new file mode 100644 index 000000000..35f5628be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_information_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantContactInformationCollectionResponseable +type TenantContactInformationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantContactInformationable) + SetValue(value []TenantContactInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_informationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_informationable.go new file mode 100644 index 000000000..b01c53a64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contact_informationable.go @@ -0,0 +1,23 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantContactInformationable +type TenantContactInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetName()(*string) + GetNotes()(*string) + GetOdataType()(*string) + GetPhone()(*string) + GetTitle()(*string) + SetEmail(value *string)() + SetName(value *string)() + SetNotes(value *string)() + SetOdataType(value *string)() + SetPhone(value *string)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contract.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contract.go new file mode 100644 index 000000000..8e595879d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contract.go @@ -0,0 +1,149 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantContract +type TenantContract 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 type of relationship that exists between the managing entity and tenant. Optional. Read-only. + contractType *int32 + // The default domain name for the tenant. Required. Read-only. + defaultDomainName *string + // The display name for the tenant. Optional. Read-only. + displayName *string + // The OdataType property + odataType *string +} +// NewTenantContract instantiates a new tenantContract and sets the default values. +func NewTenantContract()(*TenantContract) { + m := &TenantContract{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantContractFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantContractFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantContract(), 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 *TenantContract) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContractType gets the contractType property value. The type of relationship that exists between the managing entity and tenant. Optional. Read-only. +func (m *TenantContract) GetContractType()(*int32) { + return m.contractType +} +// GetDefaultDomainName gets the defaultDomainName property value. The default domain name for the tenant. Required. Read-only. +func (m *TenantContract) GetDefaultDomainName()(*string) { + return m.defaultDomainName +} +// GetDisplayName gets the displayName property value. The display name for the tenant. Optional. Read-only. +func (m *TenantContract) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantContract) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contractType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetContractType(val) + } + return nil + } + res["defaultDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDomainName(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantContract) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *TenantContract) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("contractType", m.GetContractType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultDomainName", m.GetDefaultDomainName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *TenantContract) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContractType sets the contractType property value. The type of relationship that exists between the managing entity and tenant. Optional. Read-only. +func (m *TenantContract) SetContractType(value *int32)() { + m.contractType = value +} +// SetDefaultDomainName sets the defaultDomainName property value. The default domain name for the tenant. Required. Read-only. +func (m *TenantContract) SetDefaultDomainName(value *string)() { + m.defaultDomainName = value +} +// SetDisplayName sets the displayName property value. The display name for the tenant. Optional. Read-only. +func (m *TenantContract) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantContract) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contractable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contractable.go new file mode 100644 index 000000000..c80e26d7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_contractable.go @@ -0,0 +1,19 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantContractable +type TenantContractable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContractType()(*int32) + GetDefaultDomainName()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + SetContractType(value *int32)() + SetDefaultDomainName(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information.go new file mode 100644 index 000000000..db406fcd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information.go @@ -0,0 +1,147 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCustomizedInformation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantCustomizedInformation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The collection of contacts for the managed tenant. Optional. + contacts []TenantContactInformationable + // The display name for the managed tenant. Required. Read-only. + displayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string + // The website for the managed tenant. Required. + website *string +} +// NewTenantCustomizedInformation instantiates a new tenantCustomizedInformation and sets the default values. +func NewTenantCustomizedInformation()(*TenantCustomizedInformation) { + m := &TenantCustomizedInformation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTenantCustomizedInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantCustomizedInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantCustomizedInformation(), nil +} +// GetContacts gets the contacts property value. The collection of contacts for the managed tenant. Optional. +func (m *TenantCustomizedInformation) GetContacts()([]TenantContactInformationable) { + return m.contacts +} +// GetDisplayName gets the displayName property value. The display name for the managed tenant. Required. Read-only. +func (m *TenantCustomizedInformation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantCustomizedInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contacts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantContactInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantContactInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantContactInformationable) + } + m.SetContacts(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["website"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebsite(val) + } + return nil + } + return res +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *TenantCustomizedInformation) GetTenantId()(*string) { + return m.tenantId +} +// GetWebsite gets the website property value. The website for the managed tenant. Required. +func (m *TenantCustomizedInformation) GetWebsite()(*string) { + return m.website +} +// Serialize serializes information the current object +func (m *TenantCustomizedInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetContacts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContacts())) + for i, v := range m.GetContacts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contacts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("website", m.GetWebsite()) + if err != nil { + return err + } + } + return nil +} +// SetContacts sets the contacts property value. The collection of contacts for the managed tenant. Optional. +func (m *TenantCustomizedInformation) SetContacts(value []TenantContactInformationable)() { + m.contacts = value +} +// SetDisplayName sets the displayName property value. The display name for the managed tenant. Required. Read-only. +func (m *TenantCustomizedInformation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *TenantCustomizedInformation) SetTenantId(value *string)() { + m.tenantId = value +} +// SetWebsite sets the website property value. The website for the managed tenant. Required. +func (m *TenantCustomizedInformation) SetWebsite(value *string)() { + m.website = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_response.go new file mode 100644 index 000000000..faa0cd746 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCustomizedInformationCollectionResponse +type TenantCustomizedInformationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantCustomizedInformationable +} +// NewTenantCustomizedInformationCollectionResponse instantiates a new TenantCustomizedInformationCollectionResponse and sets the default values. +func NewTenantCustomizedInformationCollectionResponse()(*TenantCustomizedInformationCollectionResponse) { + m := &TenantCustomizedInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantCustomizedInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantCustomizedInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantCustomizedInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantCustomizedInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantCustomizedInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantCustomizedInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantCustomizedInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantCustomizedInformationCollectionResponse) GetValue()([]TenantCustomizedInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantCustomizedInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantCustomizedInformationCollectionResponse) SetValue(value []TenantCustomizedInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_responseable.go new file mode 100644 index 000000000..d14469698 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_information_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCustomizedInformationCollectionResponseable +type TenantCustomizedInformationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantCustomizedInformationable) + SetValue(value []TenantCustomizedInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_informationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_informationable.go new file mode 100644 index 000000000..28b03e004 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_customized_informationable.go @@ -0,0 +1,20 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantCustomizedInformationable +type TenantCustomizedInformationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContacts()([]TenantContactInformationable) + GetDisplayName()(*string) + GetTenantId()(*string) + GetWebsite()(*string) + SetContacts(value []TenantContactInformationable)() + SetDisplayName(value *string)() + SetTenantId(value *string)() + SetWebsite(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information.go new file mode 100644 index 000000000..80d54bf4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information.go @@ -0,0 +1,295 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantDetailedInformation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantDetailedInformation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The city where the managed tenant is located. Optional. Read-only. + city *string + // The code for the country where the managed tenant is located. Optional. Read-only. + countryCode *string + // The name for the country where the managed tenant is located. Optional. Read-only. + countryName *string + // The default domain name for the managed tenant. Optional. Read-only. + defaultDomainName *string + // The display name for the managed tenant. + displayName *string + // The business industry associated with the managed tenant. Optional. Read-only. + industryName *string + // The region where the managed tenant is located. Optional. Read-only. + region *string + // The business segment associated with the managed tenant. Optional. Read-only. + segmentName *string + // The Azure Active Directory tenant identifier for the managed tenant. + tenantId *string + // The vertical associated with the managed tenant. Optional. Read-only. + verticalName *string +} +// NewTenantDetailedInformation instantiates a new tenantDetailedInformation and sets the default values. +func NewTenantDetailedInformation()(*TenantDetailedInformation) { + m := &TenantDetailedInformation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTenantDetailedInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantDetailedInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantDetailedInformation(), nil +} +// GetCity gets the city property value. The city where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) GetCity()(*string) { + return m.city +} +// GetCountryCode gets the countryCode property value. The code for the country where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) GetCountryCode()(*string) { + return m.countryCode +} +// GetCountryName gets the countryName property value. The name for the country where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) GetCountryName()(*string) { + return m.countryName +} +// GetDefaultDomainName gets the defaultDomainName property value. The default domain name for the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) GetDefaultDomainName()(*string) { + return m.defaultDomainName +} +// GetDisplayName gets the displayName property value. The display name for the managed tenant. +func (m *TenantDetailedInformation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantDetailedInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryCode(val) + } + return nil + } + res["countryName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryName(val) + } + return nil + } + res["defaultDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDomainName(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["industryName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIndustryName(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } + res["segmentName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSegmentName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["verticalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVerticalName(val) + } + return nil + } + return res +} +// GetIndustryName gets the industryName property value. The business industry associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) GetIndustryName()(*string) { + return m.industryName +} +// GetRegion gets the region property value. The region where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) GetRegion()(*string) { + return m.region +} +// GetSegmentName gets the segmentName property value. The business segment associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) GetSegmentName()(*string) { + return m.segmentName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. +func (m *TenantDetailedInformation) GetTenantId()(*string) { + return m.tenantId +} +// GetVerticalName gets the verticalName property value. The vertical associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) GetVerticalName()(*string) { + return m.verticalName +} +// Serialize serializes information the current object +func (m *TenantDetailedInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("countryCode", m.GetCountryCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("countryName", m.GetCountryName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultDomainName", m.GetDefaultDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("industryName", m.GetIndustryName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("region", m.GetRegion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("segmentName", m.GetSegmentName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("verticalName", m.GetVerticalName()) + if err != nil { + return err + } + } + return nil +} +// SetCity sets the city property value. The city where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) SetCity(value *string)() { + m.city = value +} +// SetCountryCode sets the countryCode property value. The code for the country where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) SetCountryCode(value *string)() { + m.countryCode = value +} +// SetCountryName sets the countryName property value. The name for the country where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) SetCountryName(value *string)() { + m.countryName = value +} +// SetDefaultDomainName sets the defaultDomainName property value. The default domain name for the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) SetDefaultDomainName(value *string)() { + m.defaultDomainName = value +} +// SetDisplayName sets the displayName property value. The display name for the managed tenant. +func (m *TenantDetailedInformation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIndustryName sets the industryName property value. The business industry associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) SetIndustryName(value *string)() { + m.industryName = value +} +// SetRegion sets the region property value. The region where the managed tenant is located. Optional. Read-only. +func (m *TenantDetailedInformation) SetRegion(value *string)() { + m.region = value +} +// SetSegmentName sets the segmentName property value. The business segment associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) SetSegmentName(value *string)() { + m.segmentName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. +func (m *TenantDetailedInformation) SetTenantId(value *string)() { + m.tenantId = value +} +// SetVerticalName sets the verticalName property value. The vertical associated with the managed tenant. Optional. Read-only. +func (m *TenantDetailedInformation) SetVerticalName(value *string)() { + m.verticalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_response.go new file mode 100644 index 000000000..3af953434 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantDetailedInformationCollectionResponse +type TenantDetailedInformationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantDetailedInformationable +} +// NewTenantDetailedInformationCollectionResponse instantiates a new TenantDetailedInformationCollectionResponse and sets the default values. +func NewTenantDetailedInformationCollectionResponse()(*TenantDetailedInformationCollectionResponse) { + m := &TenantDetailedInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantDetailedInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantDetailedInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantDetailedInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantDetailedInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantDetailedInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantDetailedInformationable, len(val)) + for i, v := range val { + res[i] = v.(TenantDetailedInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantDetailedInformationCollectionResponse) GetValue()([]TenantDetailedInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantDetailedInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantDetailedInformationCollectionResponse) SetValue(value []TenantDetailedInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_responseable.go new file mode 100644 index 000000000..fbacd5240 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_information_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantDetailedInformationCollectionResponseable +type TenantDetailedInformationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantDetailedInformationable) + SetValue(value []TenantDetailedInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_informationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_informationable.go new file mode 100644 index 000000000..d459d9ccd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_detailed_informationable.go @@ -0,0 +1,32 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantDetailedInformationable +type TenantDetailedInformationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCity()(*string) + GetCountryCode()(*string) + GetCountryName()(*string) + GetDefaultDomainName()(*string) + GetDisplayName()(*string) + GetIndustryName()(*string) + GetRegion()(*string) + GetSegmentName()(*string) + GetTenantId()(*string) + GetVerticalName()(*string) + SetCity(value *string)() + SetCountryCode(value *string)() + SetCountryName(value *string)() + SetDefaultDomainName(value *string)() + SetDisplayName(value *string)() + SetIndustryName(value *string)() + SetRegion(value *string)() + SetSegmentName(value *string)() + SetTenantId(value *string)() + SetVerticalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group.go new file mode 100644 index 000000000..e8f32707d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group.go @@ -0,0 +1,185 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantGroup struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // A flag indicating whether all managed tenant are included in the tenant group. Required. Read-only. + allTenantsIncluded *bool + // The display name for the tenant group. Optional. Read-only. + displayName *string + // The collection of management action associated with the tenant group. Optional. Read-only. + managementActions []ManagementActionInfoable + // The collection of management intents associated with the tenant group. Optional. Read-only. + managementIntents []ManagementIntentInfoable + // The collection of managed tenant identifiers include in the tenant group. Optional. Read-only. + tenantIds []string +} +// NewTenantGroup instantiates a new tenantGroup and sets the default values. +func NewTenantGroup()(*TenantGroup) { + m := &TenantGroup{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTenantGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantGroup(), nil +} +// GetAllTenantsIncluded gets the allTenantsIncluded property value. A flag indicating whether all managed tenant are included in the tenant group. Required. Read-only. +func (m *TenantGroup) GetAllTenantsIncluded()(*bool) { + return m.allTenantsIncluded +} +// GetDisplayName gets the displayName property value. The display name for the tenant group. Optional. Read-only. +func (m *TenantGroup) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allTenantsIncluded"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllTenantsIncluded(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["managementActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementActionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementActionInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementActionInfoable) + } + m.SetManagementActions(res) + } + return nil + } + res["managementIntents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementIntentInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementIntentInfoable, len(val)) + for i, v := range val { + res[i] = v.(ManagementIntentInfoable) + } + m.SetManagementIntents(res) + } + return nil + } + res["tenantIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTenantIds(res) + } + return nil + } + return res +} +// GetManagementActions gets the managementActions property value. The collection of management action associated with the tenant group. Optional. Read-only. +func (m *TenantGroup) GetManagementActions()([]ManagementActionInfoable) { + return m.managementActions +} +// GetManagementIntents gets the managementIntents property value. The collection of management intents associated with the tenant group. Optional. Read-only. +func (m *TenantGroup) GetManagementIntents()([]ManagementIntentInfoable) { + return m.managementIntents +} +// GetTenantIds gets the tenantIds property value. The collection of managed tenant identifiers include in the tenant group. Optional. Read-only. +func (m *TenantGroup) GetTenantIds()([]string) { + return m.tenantIds +} +// Serialize serializes information the current object +func (m *TenantGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allTenantsIncluded", m.GetAllTenantsIncluded()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetManagementActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementActions())) + for i, v := range m.GetManagementActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementActions", cast) + if err != nil { + return err + } + } + if m.GetManagementIntents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagementIntents())) + for i, v := range m.GetManagementIntents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managementIntents", cast) + if err != nil { + return err + } + } + if m.GetTenantIds() != nil { + err = writer.WriteCollectionOfStringValues("tenantIds", m.GetTenantIds()) + if err != nil { + return err + } + } + return nil +} +// SetAllTenantsIncluded sets the allTenantsIncluded property value. A flag indicating whether all managed tenant are included in the tenant group. Required. Read-only. +func (m *TenantGroup) SetAllTenantsIncluded(value *bool)() { + m.allTenantsIncluded = value +} +// SetDisplayName sets the displayName property value. The display name for the tenant group. Optional. Read-only. +func (m *TenantGroup) SetDisplayName(value *string)() { + m.displayName = value +} +// SetManagementActions sets the managementActions property value. The collection of management action associated with the tenant group. Optional. Read-only. +func (m *TenantGroup) SetManagementActions(value []ManagementActionInfoable)() { + m.managementActions = value +} +// SetManagementIntents sets the managementIntents property value. The collection of management intents associated with the tenant group. Optional. Read-only. +func (m *TenantGroup) SetManagementIntents(value []ManagementIntentInfoable)() { + m.managementIntents = value +} +// SetTenantIds sets the tenantIds property value. The collection of managed tenant identifiers include in the tenant group. Optional. Read-only. +func (m *TenantGroup) SetTenantIds(value []string)() { + m.tenantIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_response.go new file mode 100644 index 000000000..b0b962cce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantGroupCollectionResponse +type TenantGroupCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantGroupable +} +// NewTenantGroupCollectionResponse instantiates a new TenantGroupCollectionResponse and sets the default values. +func NewTenantGroupCollectionResponse()(*TenantGroupCollectionResponse) { + m := &TenantGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantGroupable, len(val)) + for i, v := range val { + res[i] = v.(TenantGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantGroupCollectionResponse) GetValue()([]TenantGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantGroupCollectionResponse) SetValue(value []TenantGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_responseable.go new file mode 100644 index 000000000..ed4bcab21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_group_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantGroupCollectionResponseable +type TenantGroupCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantGroupable) + SetValue(value []TenantGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_groupable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_groupable.go new file mode 100644 index 000000000..deb12b346 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_groupable.go @@ -0,0 +1,22 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantGroupable +type TenantGroupable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllTenantsIncluded()(*bool) + GetDisplayName()(*string) + GetManagementActions()([]ManagementActionInfoable) + GetManagementIntents()([]ManagementIntentInfoable) + GetTenantIds()([]string) + SetAllTenantsIncluded(value *bool)() + SetDisplayName(value *string)() + SetManagementActions(value []ManagementActionInfoable)() + SetManagementIntents(value []ManagementIntentInfoable)() + SetTenantIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info.go new file mode 100644 index 000000000..6e87fc1ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info.go @@ -0,0 +1,97 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantInfo +type TenantInfo 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 OdataType property + odataType *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. + tenantId *string +} +// NewTenantInfo instantiates a new tenantInfo and sets the default values. +func NewTenantInfo()(*TenantInfo) { + m := &TenantInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantInfo(), 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 *TenantInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantInfo) GetOdataType()(*string) { + return m.odataType +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. +func (m *TenantInfo) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *TenantInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + 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 *TenantInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. +func (m *TenantInfo) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_response.go new file mode 100644 index 000000000..e2fa92d7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantInfoCollectionResponse +type TenantInfoCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantInfoable +} +// NewTenantInfoCollectionResponse instantiates a new TenantInfoCollectionResponse and sets the default values. +func NewTenantInfoCollectionResponse()(*TenantInfoCollectionResponse) { + m := &TenantInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantInfoable, len(val)) + for i, v := range val { + res[i] = v.(TenantInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantInfoCollectionResponse) GetValue()([]TenantInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantInfoCollectionResponse) SetValue(value []TenantInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_responseable.go new file mode 100644 index 000000000..22cae0c6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_info_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantInfoCollectionResponseable +type TenantInfoCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantInfoable) + SetValue(value []TenantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_infoable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_infoable.go new file mode 100644 index 000000000..63da8a225 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_infoable.go @@ -0,0 +1,15 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantInfoable +type TenantInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTenantId()(*string) + SetOdataType(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_onboarding_eligibility_reason.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_onboarding_eligibility_reason.go new file mode 100644 index 000000000..c9b7df42f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_onboarding_eligibility_reason.go @@ -0,0 +1,46 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantOnboardingEligibilityReason int + +const ( + NONE_TENANTONBOARDINGELIGIBILITYREASON TenantOnboardingEligibilityReason = iota + CONTRACTTYPE_TENANTONBOARDINGELIGIBILITYREASON + DELEGATEDADMINPRIVILEGES_TENANTONBOARDINGELIGIBILITYREASON + USERSCOUNT_TENANTONBOARDINGELIGIBILITYREASON + LICENSE_TENANTONBOARDINGELIGIBILITYREASON + UNKNOWNFUTUREVALUE_TENANTONBOARDINGELIGIBILITYREASON +) + +func (i TenantOnboardingEligibilityReason) String() string { + return []string{"none", "contractType", "delegatedAdminPrivileges", "usersCount", "license", "unknownFutureValue"}[i] +} +func ParseTenantOnboardingEligibilityReason(v string) (interface{}, error) { + result := NONE_TENANTONBOARDINGELIGIBILITYREASON + switch v { + case "none": + result = NONE_TENANTONBOARDINGELIGIBILITYREASON + case "contractType": + result = CONTRACTTYPE_TENANTONBOARDINGELIGIBILITYREASON + case "delegatedAdminPrivileges": + result = DELEGATEDADMINPRIVILEGES_TENANTONBOARDINGELIGIBILITYREASON + case "usersCount": + result = USERSCOUNT_TENANTONBOARDINGELIGIBILITYREASON + case "license": + result = LICENSE_TENANTONBOARDINGELIGIBILITYREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TENANTONBOARDINGELIGIBILITYREASON + default: + return 0, errors.New("Unknown TenantOnboardingEligibilityReason value: " + v) + } + return &result, nil +} +func SerializeTenantOnboardingEligibilityReason(values []TenantOnboardingEligibilityReason) []string { + 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/managedtenants/tenant_onboarding_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_onboarding_status.go new file mode 100644 index 000000000..e2648d901 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_onboarding_status.go @@ -0,0 +1,43 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantOnboardingStatus int + +const ( + INELIGIBLE_TENANTONBOARDINGSTATUS TenantOnboardingStatus = iota + INPROCESS_TENANTONBOARDINGSTATUS + ACTIVE_TENANTONBOARDINGSTATUS + INACTIVE_TENANTONBOARDINGSTATUS + UNKNOWNFUTUREVALUE_TENANTONBOARDINGSTATUS +) + +func (i TenantOnboardingStatus) String() string { + return []string{"ineligible", "inProcess", "active", "inactive", "unknownFutureValue"}[i] +} +func ParseTenantOnboardingStatus(v string) (interface{}, error) { + result := INELIGIBLE_TENANTONBOARDINGSTATUS + switch v { + case "ineligible": + result = INELIGIBLE_TENANTONBOARDINGSTATUS + case "inProcess": + result = INPROCESS_TENANTONBOARDINGSTATUS + case "active": + result = ACTIVE_TENANTONBOARDINGSTATUS + case "inactive": + result = INACTIVE_TENANTONBOARDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TENANTONBOARDINGSTATUS + default: + return 0, errors.New("Unknown TenantOnboardingStatus value: " + v) + } + return &result, nil +} +func SerializeTenantOnboardingStatus(values []TenantOnboardingStatus) []string { + 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/managedtenants/tenant_status_information.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_status_information.go new file mode 100644 index 000000000..0cd30ffd5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_status_information.go @@ -0,0 +1,317 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantStatusInformation +type TenantStatusInformation 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 status of the delegated admin privilege relationship between the managing entity and the managed tenant. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. Optional. Read-only. + delegatedPrivilegeStatus *DelegatedPrivilegeStatus + // The date and time the delegated admin privileges status was updated. Optional. Read-only. + lastDelegatedPrivilegeRefreshDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The identifier for the account that offboarded the managed tenant. Optional. Read-only. + offboardedByUserId *string + // The date and time when the managed tenant was offboarded. Optional. Read-only. + offboardedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The identifier for the account that onboarded the managed tenant. Optional. Read-only. + onboardedByUserId *string + // The date and time when the managed tenant was onboarded. Optional. Read-only. + onboardedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The onboarding status for the managed tenant.. Possible values are: ineligible, inProcess, active, inactive, unknownFutureValue. Optional. Read-only. + onboardingStatus *TenantOnboardingStatus + // Organization's onboarding eligibility reason in Microsoft 365 Lighthouse.. Possible values are: none, contractType, delegatedAdminPrivileges,usersCount,license and unknownFutureValue. Optional. Read-only. + tenantOnboardingEligibilityReason *TenantOnboardingEligibilityReason + // The collection of workload statues for the managed tenant. Optional. Read-only. + workloadStatuses []WorkloadStatusable +} +// NewTenantStatusInformation instantiates a new tenantStatusInformation and sets the default values. +func NewTenantStatusInformation()(*TenantStatusInformation) { + m := &TenantStatusInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantStatusInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantStatusInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantStatusInformation(), 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 *TenantStatusInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDelegatedPrivilegeStatus gets the delegatedPrivilegeStatus property value. The status of the delegated admin privilege relationship between the managing entity and the managed tenant. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. Optional. Read-only. +func (m *TenantStatusInformation) GetDelegatedPrivilegeStatus()(*DelegatedPrivilegeStatus) { + return m.delegatedPrivilegeStatus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantStatusInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["delegatedPrivilegeStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDelegatedPrivilegeStatus) + if err != nil { + return err + } + if val != nil { + m.SetDelegatedPrivilegeStatus(val.(*DelegatedPrivilegeStatus)) + } + return nil + } + res["lastDelegatedPrivilegeRefreshDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastDelegatedPrivilegeRefreshDateTime(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["offboardedByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOffboardedByUserId(val) + } + return nil + } + res["offboardedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOffboardedDateTime(val) + } + return nil + } + res["onboardedByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnboardedByUserId(val) + } + return nil + } + res["onboardedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnboardedDateTime(val) + } + return nil + } + res["onboardingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTenantOnboardingStatus) + if err != nil { + return err + } + if val != nil { + m.SetOnboardingStatus(val.(*TenantOnboardingStatus)) + } + return nil + } + res["tenantOnboardingEligibilityReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTenantOnboardingEligibilityReason) + if err != nil { + return err + } + if val != nil { + m.SetTenantOnboardingEligibilityReason(val.(*TenantOnboardingEligibilityReason)) + } + return nil + } + res["workloadStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadStatusable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadStatusable) + } + m.SetWorkloadStatuses(res) + } + return nil + } + return res +} +// GetLastDelegatedPrivilegeRefreshDateTime gets the lastDelegatedPrivilegeRefreshDateTime property value. The date and time the delegated admin privileges status was updated. Optional. Read-only. +func (m *TenantStatusInformation) GetLastDelegatedPrivilegeRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastDelegatedPrivilegeRefreshDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantStatusInformation) GetOdataType()(*string) { + return m.odataType +} +// GetOffboardedByUserId gets the offboardedByUserId property value. The identifier for the account that offboarded the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) GetOffboardedByUserId()(*string) { + return m.offboardedByUserId +} +// GetOffboardedDateTime gets the offboardedDateTime property value. The date and time when the managed tenant was offboarded. Optional. Read-only. +func (m *TenantStatusInformation) GetOffboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.offboardedDateTime +} +// GetOnboardedByUserId gets the onboardedByUserId property value. The identifier for the account that onboarded the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) GetOnboardedByUserId()(*string) { + return m.onboardedByUserId +} +// GetOnboardedDateTime gets the onboardedDateTime property value. The date and time when the managed tenant was onboarded. Optional. Read-only. +func (m *TenantStatusInformation) GetOnboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onboardedDateTime +} +// GetOnboardingStatus gets the onboardingStatus property value. The onboarding status for the managed tenant.. Possible values are: ineligible, inProcess, active, inactive, unknownFutureValue. Optional. Read-only. +func (m *TenantStatusInformation) GetOnboardingStatus()(*TenantOnboardingStatus) { + return m.onboardingStatus +} +// GetTenantOnboardingEligibilityReason gets the tenantOnboardingEligibilityReason property value. Organization's onboarding eligibility reason in Microsoft 365 Lighthouse.. Possible values are: none, contractType, delegatedAdminPrivileges,usersCount,license and unknownFutureValue. Optional. Read-only. +func (m *TenantStatusInformation) GetTenantOnboardingEligibilityReason()(*TenantOnboardingEligibilityReason) { + return m.tenantOnboardingEligibilityReason +} +// GetWorkloadStatuses gets the workloadStatuses property value. The collection of workload statues for the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) GetWorkloadStatuses()([]WorkloadStatusable) { + return m.workloadStatuses +} +// Serialize serializes information the current object +func (m *TenantStatusInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDelegatedPrivilegeStatus() != nil { + cast := (*m.GetDelegatedPrivilegeStatus()).String() + err := writer.WriteStringValue("delegatedPrivilegeStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastDelegatedPrivilegeRefreshDateTime", m.GetLastDelegatedPrivilegeRefreshDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("offboardedByUserId", m.GetOffboardedByUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("offboardedDateTime", m.GetOffboardedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("onboardedByUserId", m.GetOnboardedByUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("onboardedDateTime", m.GetOnboardedDateTime()) + if err != nil { + return err + } + } + if m.GetOnboardingStatus() != nil { + cast := (*m.GetOnboardingStatus()).String() + err := writer.WriteStringValue("onboardingStatus", &cast) + if err != nil { + return err + } + } + if m.GetTenantOnboardingEligibilityReason() != nil { + cast := (*m.GetTenantOnboardingEligibilityReason()).String() + err := writer.WriteStringValue("tenantOnboardingEligibilityReason", &cast) + if err != nil { + return err + } + } + if m.GetWorkloadStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkloadStatuses())) + for i, v := range m.GetWorkloadStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("workloadStatuses", 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 *TenantStatusInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDelegatedPrivilegeStatus sets the delegatedPrivilegeStatus property value. The status of the delegated admin privilege relationship between the managing entity and the managed tenant. Possible values are: none, delegatedAdminPrivileges, unknownFutureValue, granularDelegatedAdminPrivileges, delegatedAndGranularDelegetedAdminPrivileges. Note that you must use the Prefer: include-unknown-enum-members request header to get the following values from this evolvable enum: granularDelegatedAdminPrivileges , delegatedAndGranularDelegetedAdminPrivileges. Optional. Read-only. +func (m *TenantStatusInformation) SetDelegatedPrivilegeStatus(value *DelegatedPrivilegeStatus)() { + m.delegatedPrivilegeStatus = value +} +// SetLastDelegatedPrivilegeRefreshDateTime sets the lastDelegatedPrivilegeRefreshDateTime property value. The date and time the delegated admin privileges status was updated. Optional. Read-only. +func (m *TenantStatusInformation) SetLastDelegatedPrivilegeRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastDelegatedPrivilegeRefreshDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantStatusInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffboardedByUserId sets the offboardedByUserId property value. The identifier for the account that offboarded the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) SetOffboardedByUserId(value *string)() { + m.offboardedByUserId = value +} +// SetOffboardedDateTime sets the offboardedDateTime property value. The date and time when the managed tenant was offboarded. Optional. Read-only. +func (m *TenantStatusInformation) SetOffboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.offboardedDateTime = value +} +// SetOnboardedByUserId sets the onboardedByUserId property value. The identifier for the account that onboarded the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) SetOnboardedByUserId(value *string)() { + m.onboardedByUserId = value +} +// SetOnboardedDateTime sets the onboardedDateTime property value. The date and time when the managed tenant was onboarded. Optional. Read-only. +func (m *TenantStatusInformation) SetOnboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onboardedDateTime = value +} +// SetOnboardingStatus sets the onboardingStatus property value. The onboarding status for the managed tenant.. Possible values are: ineligible, inProcess, active, inactive, unknownFutureValue. Optional. Read-only. +func (m *TenantStatusInformation) SetOnboardingStatus(value *TenantOnboardingStatus)() { + m.onboardingStatus = value +} +// SetTenantOnboardingEligibilityReason sets the tenantOnboardingEligibilityReason property value. Organization's onboarding eligibility reason in Microsoft 365 Lighthouse.. Possible values are: none, contractType, delegatedAdminPrivileges,usersCount,license and unknownFutureValue. Optional. Read-only. +func (m *TenantStatusInformation) SetTenantOnboardingEligibilityReason(value *TenantOnboardingEligibilityReason)() { + m.tenantOnboardingEligibilityReason = value +} +// SetWorkloadStatuses sets the workloadStatuses property value. The collection of workload statues for the managed tenant. Optional. Read-only. +func (m *TenantStatusInformation) SetWorkloadStatuses(value []WorkloadStatusable)() { + m.workloadStatuses = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_status_informationable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_status_informationable.go new file mode 100644 index 000000000..96b66ff01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_status_informationable.go @@ -0,0 +1,32 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantStatusInformationable +type TenantStatusInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDelegatedPrivilegeStatus()(*DelegatedPrivilegeStatus) + GetLastDelegatedPrivilegeRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetOffboardedByUserId()(*string) + GetOffboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardedByUserId()(*string) + GetOnboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardingStatus()(*TenantOnboardingStatus) + GetTenantOnboardingEligibilityReason()(*TenantOnboardingEligibilityReason) + GetWorkloadStatuses()([]WorkloadStatusable) + SetDelegatedPrivilegeStatus(value *DelegatedPrivilegeStatus)() + SetLastDelegatedPrivilegeRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetOffboardedByUserId(value *string)() + SetOffboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardedByUserId(value *string)() + SetOnboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardingStatus(value *TenantOnboardingStatus)() + SetTenantOnboardingEligibilityReason(value *TenantOnboardingEligibilityReason)() + SetWorkloadStatuses(value []WorkloadStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag.go new file mode 100644 index 000000000..b1588626d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag.go @@ -0,0 +1,252 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantTag provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantTag struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The identifier for the account that created the tenant tag. Required. Read-only. + createdByUserId *string + // The date and time when the tenant tag was created. Required. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time when the tenant tag was deleted. Required. Read-only. + deletedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description for the tenant tag. Optional. Read-only. + description *string + // The display name for the tenant tag. Required. Read-only. + displayName *string + // The identifier for the account that lasted on the tenant tag. Optional. Read-only. + lastActionByUserId *string + // The date and time the last action was performed against the tenant tag. Optional. Read-only. + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of managed tenants associated with the tenant tag. Optional. + tenants []TenantInfoable +} +// NewTenantTag instantiates a new tenantTag and sets the default values. +func NewTenantTag()(*TenantTag) { + m := &TenantTag{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTenantTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantTag(), nil +} +// GetCreatedByUserId gets the createdByUserId property value. The identifier for the account that created the tenant tag. Required. Read-only. +func (m *TenantTag) GetCreatedByUserId()(*string) { + return m.createdByUserId +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the tenant tag was created. Required. Read-only. +func (m *TenantTag) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeletedDateTime gets the deletedDateTime property value. The date and time when the tenant tag was deleted. Required. Read-only. +func (m *TenantTag) GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deletedDateTime +} +// GetDescription gets the description property value. The description for the tenant tag. Optional. Read-only. +func (m *TenantTag) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the tenant tag. Required. Read-only. +func (m *TenantTag) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantTag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByUserId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deletedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastActionByUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionByUserId(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["tenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantInfoable, len(val)) + for i, v := range val { + res[i] = v.(TenantInfoable) + } + m.SetTenants(res) + } + return nil + } + return res +} +// GetLastActionByUserId gets the lastActionByUserId property value. The identifier for the account that lasted on the tenant tag. Optional. Read-only. +func (m *TenantTag) GetLastActionByUserId()(*string) { + return m.lastActionByUserId +} +// GetLastActionDateTime gets the lastActionDateTime property value. The date and time the last action was performed against the tenant tag. Optional. Read-only. +func (m *TenantTag) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetTenants gets the tenants property value. The collection of managed tenants associated with the tenant tag. Optional. +func (m *TenantTag) GetTenants()([]TenantInfoable) { + return m.tenants +} +// Serialize serializes information the current object +func (m *TenantTag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("createdByUserId", m.GetCreatedByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("deletedDateTime", m.GetDeletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastActionByUserId", m.GetLastActionByUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + if m.GetTenants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenants())) + for i, v := range m.GetTenants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tenants", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedByUserId sets the createdByUserId property value. The identifier for the account that created the tenant tag. Required. Read-only. +func (m *TenantTag) SetCreatedByUserId(value *string)() { + m.createdByUserId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the tenant tag was created. Required. Read-only. +func (m *TenantTag) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeletedDateTime sets the deletedDateTime property value. The date and time when the tenant tag was deleted. Required. Read-only. +func (m *TenantTag) SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deletedDateTime = value +} +// SetDescription sets the description property value. The description for the tenant tag. Optional. Read-only. +func (m *TenantTag) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the tenant tag. Required. Read-only. +func (m *TenantTag) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastActionByUserId sets the lastActionByUserId property value. The identifier for the account that lasted on the tenant tag. Optional. Read-only. +func (m *TenantTag) SetLastActionByUserId(value *string)() { + m.lastActionByUserId = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The date and time the last action was performed against the tenant tag. Optional. Read-only. +func (m *TenantTag) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetTenants sets the tenants property value. The collection of managed tenants associated with the tenant tag. Optional. +func (m *TenantTag) SetTenants(value []TenantInfoable)() { + m.tenants = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_response.go new file mode 100644 index 000000000..d85099ecc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantTagCollectionResponse +type TenantTagCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantTagable +} +// NewTenantTagCollectionResponse instantiates a new TenantTagCollectionResponse and sets the default values. +func NewTenantTagCollectionResponse()(*TenantTagCollectionResponse) { + m := &TenantTagCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantTagCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantTagCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantTagCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantTagCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantTagable, len(val)) + for i, v := range val { + res[i] = v.(TenantTagable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantTagCollectionResponse) GetValue()([]TenantTagable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantTagCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantTagCollectionResponse) SetValue(value []TenantTagable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_responseable.go new file mode 100644 index 000000000..22a0a34d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tag_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantTagCollectionResponseable +type TenantTagCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantTagable) + SetValue(value []TenantTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tagable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tagable.go new file mode 100644 index 000000000..fe112cb0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenant_tagable.go @@ -0,0 +1,29 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantTagable +type TenantTagable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedByUserId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastActionByUserId()(*string) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTenants()([]TenantInfoable) + SetCreatedByUserId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastActionByUserId(value *string)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTenants(value []TenantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/tenantable.go b/src/internal/connector/graph/betasdk/models/managedtenants/tenantable.go new file mode 100644 index 000000000..415acaf20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/tenantable.go @@ -0,0 +1,25 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tenantable +type Tenantable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContract()(TenantContractable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTenantId()(*string) + GetTenantStatusInformation()(TenantStatusInformationable) + SetContract(value TenantContractable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTenantId(value *string)() + SetTenantStatusInformation(value TenantStatusInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state.go new file mode 100644 index 000000000..0b6019f8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state.go @@ -0,0 +1,452 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsDeviceMalwareState provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WindowsDeviceMalwareState struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The additional information URL for the discovered malware. Optional. Read-only. + additionalInformationUrl *string + // The number of times the piece of malware has been detected. Optional. Read-only. + detectionCount *int32 + // A flag indicating whether the device has been deleted. Optional. Read-only. + deviceDeleted *bool + // The date and time the piece of malware was initially detected. Optional. Read-only. + initialDetectionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time the malware state was last changed. Optional. Read-only. + lastStateChangeDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The category for the detected malware. Optional. Read-only. + malwareCategory *string + // The display name for the detected malware. Optional. Read-only. + malwareDisplayName *string + // The execution state for the detected malware. Optional. Read-only. + malwareExecutionState *string + // The unique identifier for the detected malware. Optional. Read-only. + malwareId *string + // The severity for the detected malware. Optional. Read-only. + malwareSeverity *string + // The threat state for the detected malware. Optional. Read-only. + malwareThreatState *string + // The identifier for the managed device where the malware was detected. Optional. Read-only. + managedDeviceId *string + // The display name for the managed device where the malware was detected. Optional. Read-only. + managedDeviceName *string + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string +} +// NewWindowsDeviceMalwareState instantiates a new windowsDeviceMalwareState and sets the default values. +func NewWindowsDeviceMalwareState()(*WindowsDeviceMalwareState) { + m := &WindowsDeviceMalwareState{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateWindowsDeviceMalwareStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsDeviceMalwareStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindowsDeviceMalwareState(), nil +} +// GetAdditionalInformationUrl gets the additionalInformationUrl property value. The additional information URL for the discovered malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetAdditionalInformationUrl()(*string) { + return m.additionalInformationUrl +} +// GetDetectionCount gets the detectionCount property value. The number of times the piece of malware has been detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetDetectionCount()(*int32) { + return m.detectionCount +} +// GetDeviceDeleted gets the deviceDeleted property value. A flag indicating whether the device has been deleted. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetDeviceDeleted()(*bool) { + return m.deviceDeleted +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsDeviceMalwareState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalInformationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInformationUrl(val) + } + return nil + } + res["detectionCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDetectionCount(val) + } + return nil + } + res["deviceDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDeleted(val) + } + return nil + } + res["initialDetectionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetInitialDetectionDateTime(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["lastStateChangeDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStateChangeDateTime(val) + } + return nil + } + res["malwareCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareCategory(val) + } + return nil + } + res["malwareDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareDisplayName(val) + } + return nil + } + res["malwareExecutionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareExecutionState(val) + } + return nil + } + res["malwareId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareId(val) + } + return nil + } + res["malwareSeverity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareSeverity(val) + } + return nil + } + res["malwareThreatState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareThreatState(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetInitialDetectionDateTime gets the initialDetectionDateTime property value. The date and time the piece of malware was initially detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetInitialDetectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.initialDetectionDateTime +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetLastStateChangeDateTime gets the lastStateChangeDateTime property value. The date and time the malware state was last changed. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetLastStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStateChangeDateTime +} +// GetMalwareCategory gets the malwareCategory property value. The category for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareCategory()(*string) { + return m.malwareCategory +} +// GetMalwareDisplayName gets the malwareDisplayName property value. The display name for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareDisplayName()(*string) { + return m.malwareDisplayName +} +// GetMalwareExecutionState gets the malwareExecutionState property value. The execution state for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareExecutionState()(*string) { + return m.malwareExecutionState +} +// GetMalwareId gets the malwareId property value. The unique identifier for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareId()(*string) { + return m.malwareId +} +// GetMalwareSeverity gets the malwareSeverity property value. The severity for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareSeverity()(*string) { + return m.malwareSeverity +} +// GetMalwareThreatState gets the malwareThreatState property value. The threat state for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetMalwareThreatState()(*string) { + return m.malwareThreatState +} +// GetManagedDeviceId gets the managedDeviceId property value. The identifier for the managed device where the malware was detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagedDeviceName gets the managedDeviceName property value. The display name for the managed device where the malware was detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *WindowsDeviceMalwareState) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *WindowsDeviceMalwareState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("additionalInformationUrl", m.GetAdditionalInformationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("detectionCount", m.GetDetectionCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceDeleted", m.GetDeviceDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("initialDetectionDateTime", m.GetInitialDetectionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStateChangeDateTime", m.GetLastStateChangeDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareCategory", m.GetMalwareCategory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareDisplayName", m.GetMalwareDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareExecutionState", m.GetMalwareExecutionState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareId", m.GetMalwareId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareSeverity", m.GetMalwareSeverity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("malwareThreatState", m.GetMalwareThreatState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalInformationUrl sets the additionalInformationUrl property value. The additional information URL for the discovered malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetAdditionalInformationUrl(value *string)() { + m.additionalInformationUrl = value +} +// SetDetectionCount sets the detectionCount property value. The number of times the piece of malware has been detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetDetectionCount(value *int32)() { + m.detectionCount = value +} +// SetDeviceDeleted sets the deviceDeleted property value. A flag indicating whether the device has been deleted. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetDeviceDeleted(value *bool)() { + m.deviceDeleted = value +} +// SetInitialDetectionDateTime sets the initialDetectionDateTime property value. The date and time the piece of malware was initially detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetInitialDetectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.initialDetectionDateTime = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetLastStateChangeDateTime sets the lastStateChangeDateTime property value. The date and time the malware state was last changed. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetLastStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStateChangeDateTime = value +} +// SetMalwareCategory sets the malwareCategory property value. The category for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareCategory(value *string)() { + m.malwareCategory = value +} +// SetMalwareDisplayName sets the malwareDisplayName property value. The display name for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareDisplayName(value *string)() { + m.malwareDisplayName = value +} +// SetMalwareExecutionState sets the malwareExecutionState property value. The execution state for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareExecutionState(value *string)() { + m.malwareExecutionState = value +} +// SetMalwareId sets the malwareId property value. The unique identifier for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareId(value *string)() { + m.malwareId = value +} +// SetMalwareSeverity sets the malwareSeverity property value. The severity for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareSeverity(value *string)() { + m.malwareSeverity = value +} +// SetMalwareThreatState sets the malwareThreatState property value. The threat state for the detected malware. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetMalwareThreatState(value *string)() { + m.malwareThreatState = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The identifier for the managed device where the malware was detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagedDeviceName sets the managedDeviceName property value. The display name for the managed device where the malware was detected. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *WindowsDeviceMalwareState) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_response.go new file mode 100644 index 000000000..d05e59478 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsDeviceMalwareStateCollectionResponse +type WindowsDeviceMalwareStateCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WindowsDeviceMalwareStateable +} +// NewWindowsDeviceMalwareStateCollectionResponse instantiates a new WindowsDeviceMalwareStateCollectionResponse and sets the default values. +func NewWindowsDeviceMalwareStateCollectionResponse()(*WindowsDeviceMalwareStateCollectionResponse) { + m := &WindowsDeviceMalwareStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWindowsDeviceMalwareStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsDeviceMalwareStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindowsDeviceMalwareStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsDeviceMalwareStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsDeviceMalwareStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsDeviceMalwareStateable, len(val)) + for i, v := range val { + res[i] = v.(WindowsDeviceMalwareStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WindowsDeviceMalwareStateCollectionResponse) GetValue()([]WindowsDeviceMalwareStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *WindowsDeviceMalwareStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WindowsDeviceMalwareStateCollectionResponse) SetValue(value []WindowsDeviceMalwareStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_responseable.go new file mode 100644 index 000000000..e98482249 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_state_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsDeviceMalwareStateCollectionResponseable +type WindowsDeviceMalwareStateCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WindowsDeviceMalwareStateable) + SetValue(value []WindowsDeviceMalwareStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_stateable.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_stateable.go new file mode 100644 index 000000000..cede594f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_device_malware_stateable.go @@ -0,0 +1,45 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsDeviceMalwareStateable +type WindowsDeviceMalwareStateable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformationUrl()(*string) + GetDetectionCount()(*int32) + GetDeviceDeleted()(*bool) + GetInitialDetectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastStateChangeDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMalwareCategory()(*string) + GetMalwareDisplayName()(*string) + GetMalwareExecutionState()(*string) + GetMalwareId()(*string) + GetMalwareSeverity()(*string) + GetMalwareThreatState()(*string) + GetManagedDeviceId()(*string) + GetManagedDeviceName()(*string) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetAdditionalInformationUrl(value *string)() + SetDetectionCount(value *int32)() + SetDeviceDeleted(value *bool)() + SetInitialDetectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastStateChangeDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMalwareCategory(value *string)() + SetMalwareDisplayName(value *string)() + SetMalwareExecutionState(value *string)() + SetMalwareId(value *string)() + SetMalwareSeverity(value *string)() + SetMalwareThreatState(value *string)() + SetManagedDeviceId(value *string)() + SetManagedDeviceName(value *string)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state.go new file mode 100644 index 000000000..9f9f9f8f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state.go @@ -0,0 +1,686 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsProtectionState provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WindowsProtectionState struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The anti-malware version for the managed device. Optional. Read-only. + antiMalwareVersion *string + // A flag indicating whether attention is required for the managed device. Optional. Read-only. + attentionRequired *bool + // A flag indicating whether the managed device has been deleted. Optional. Read-only. + deviceDeleted *bool + // The date and time the device property has been refreshed. Optional. Read-only. + devicePropertyRefreshDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The anti-virus engine version for the managed device. Optional. Read-only. + engineVersion *string + // A flag indicating whether quick scan is overdue for the managed device. Optional. Read-only. + fullScanOverdue *bool + // A flag indicating whether full scan is overdue for the managed device. Optional. Read-only. + fullScanRequired *bool + // The date and time a full scan was completed. Optional. Read-only. + lastFullScanDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The version anti-malware version used to perform the last full scan. Optional. Read-only. + lastFullScanSignatureVersion *string + // The date and time a quick scan was completed. Optional. Read-only. + lastQuickScanDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The version anti-malware version used to perform the last full scan. Optional. Read-only. + lastQuickScanSignatureVersion *string + // Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. + lastRefreshedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time the protection state was last reported for the managed device. Optional. Read-only. + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A flag indicating whether malware protection is enabled for the managed device. Optional. Read-only. + malwareProtectionEnabled *bool + // The health state for the managed device. Optional. Read-only. + managedDeviceHealthState *string + // The unique identifier for the managed device. Optional. Read-only. + managedDeviceId *string + // The display name for the managed device. Optional. Read-only. + managedDeviceName *string + // A flag indicating whether the network inspection system is enabled. Optional. Read-only. + networkInspectionSystemEnabled *bool + // A flag indicating weather a quick scan is overdue. Optional. Read-only. + quickScanOverdue *bool + // A flag indicating whether real time protection is enabled. Optional. Read-only. + realTimeProtectionEnabled *bool + // A flag indicating whether a reboot is required. Optional. Read-only. + rebootRequired *bool + // A flag indicating whether an signature update is overdue. Optional. Read-only. + signatureUpdateOverdue *bool + // The signature version for the managed device. Optional. Read-only. + signatureVersion *string + // The display name for the managed tenant. Optional. Read-only. + tenantDisplayName *string + // The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. + tenantId *string +} +// NewWindowsProtectionState instantiates a new windowsProtectionState and sets the default values. +func NewWindowsProtectionState()(*WindowsProtectionState) { + m := &WindowsProtectionState{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateWindowsProtectionStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsProtectionStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindowsProtectionState(), nil +} +// GetAntiMalwareVersion gets the antiMalwareVersion property value. The anti-malware version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetAntiMalwareVersion()(*string) { + return m.antiMalwareVersion +} +// GetAttentionRequired gets the attentionRequired property value. A flag indicating whether attention is required for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetAttentionRequired()(*bool) { + return m.attentionRequired +} +// GetDeviceDeleted gets the deviceDeleted property value. A flag indicating whether the managed device has been deleted. Optional. Read-only. +func (m *WindowsProtectionState) GetDeviceDeleted()(*bool) { + return m.deviceDeleted +} +// GetDevicePropertyRefreshDateTime gets the devicePropertyRefreshDateTime property value. The date and time the device property has been refreshed. Optional. Read-only. +func (m *WindowsProtectionState) GetDevicePropertyRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.devicePropertyRefreshDateTime +} +// GetEngineVersion gets the engineVersion property value. The anti-virus engine version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetEngineVersion()(*string) { + return m.engineVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsProtectionState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["antiMalwareVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAntiMalwareVersion(val) + } + return nil + } + res["attentionRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAttentionRequired(val) + } + return nil + } + res["deviceDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDeleted(val) + } + return nil + } + res["devicePropertyRefreshDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDevicePropertyRefreshDateTime(val) + } + return nil + } + res["engineVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEngineVersion(val) + } + return nil + } + res["fullScanOverdue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFullScanOverdue(val) + } + return nil + } + res["fullScanRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFullScanRequired(val) + } + return nil + } + res["lastFullScanDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastFullScanDateTime(val) + } + return nil + } + res["lastFullScanSignatureVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastFullScanSignatureVersion(val) + } + return nil + } + res["lastQuickScanDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastQuickScanDateTime(val) + } + return nil + } + res["lastQuickScanSignatureVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastQuickScanSignatureVersion(val) + } + return nil + } + res["lastRefreshedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastRefreshedDateTime(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["malwareProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMalwareProtectionEnabled(val) + } + return nil + } + res["managedDeviceHealthState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceHealthState(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["managedDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceName(val) + } + return nil + } + res["networkInspectionSystemEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkInspectionSystemEnabled(val) + } + return nil + } + res["quickScanOverdue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetQuickScanOverdue(val) + } + return nil + } + res["realTimeProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRealTimeProtectionEnabled(val) + } + return nil + } + res["rebootRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRebootRequired(val) + } + return nil + } + res["signatureUpdateOverdue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSignatureUpdateOverdue(val) + } + return nil + } + res["signatureVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignatureVersion(val) + } + return nil + } + res["tenantDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantDisplayName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetFullScanOverdue gets the fullScanOverdue property value. A flag indicating whether quick scan is overdue for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetFullScanOverdue()(*bool) { + return m.fullScanOverdue +} +// GetFullScanRequired gets the fullScanRequired property value. A flag indicating whether full scan is overdue for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetFullScanRequired()(*bool) { + return m.fullScanRequired +} +// GetLastFullScanDateTime gets the lastFullScanDateTime property value. The date and time a full scan was completed. Optional. Read-only. +func (m *WindowsProtectionState) GetLastFullScanDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastFullScanDateTime +} +// GetLastFullScanSignatureVersion gets the lastFullScanSignatureVersion property value. The version anti-malware version used to perform the last full scan. Optional. Read-only. +func (m *WindowsProtectionState) GetLastFullScanSignatureVersion()(*string) { + return m.lastFullScanSignatureVersion +} +// GetLastQuickScanDateTime gets the lastQuickScanDateTime property value. The date and time a quick scan was completed. Optional. Read-only. +func (m *WindowsProtectionState) GetLastQuickScanDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastQuickScanDateTime +} +// GetLastQuickScanSignatureVersion gets the lastQuickScanSignatureVersion property value. The version anti-malware version used to perform the last full scan. Optional. Read-only. +func (m *WindowsProtectionState) GetLastQuickScanSignatureVersion()(*string) { + return m.lastQuickScanSignatureVersion +} +// GetLastRefreshedDateTime gets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *WindowsProtectionState) GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastRefreshedDateTime +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. The date and time the protection state was last reported for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetMalwareProtectionEnabled gets the malwareProtectionEnabled property value. A flag indicating whether malware protection is enabled for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetMalwareProtectionEnabled()(*bool) { + return m.malwareProtectionEnabled +} +// GetManagedDeviceHealthState gets the managedDeviceHealthState property value. The health state for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetManagedDeviceHealthState()(*string) { + return m.managedDeviceHealthState +} +// GetManagedDeviceId gets the managedDeviceId property value. The unique identifier for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetManagedDeviceName gets the managedDeviceName property value. The display name for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetManagedDeviceName()(*string) { + return m.managedDeviceName +} +// GetNetworkInspectionSystemEnabled gets the networkInspectionSystemEnabled property value. A flag indicating whether the network inspection system is enabled. Optional. Read-only. +func (m *WindowsProtectionState) GetNetworkInspectionSystemEnabled()(*bool) { + return m.networkInspectionSystemEnabled +} +// GetQuickScanOverdue gets the quickScanOverdue property value. A flag indicating weather a quick scan is overdue. Optional. Read-only. +func (m *WindowsProtectionState) GetQuickScanOverdue()(*bool) { + return m.quickScanOverdue +} +// GetRealTimeProtectionEnabled gets the realTimeProtectionEnabled property value. A flag indicating whether real time protection is enabled. Optional. Read-only. +func (m *WindowsProtectionState) GetRealTimeProtectionEnabled()(*bool) { + return m.realTimeProtectionEnabled +} +// GetRebootRequired gets the rebootRequired property value. A flag indicating whether a reboot is required. Optional. Read-only. +func (m *WindowsProtectionState) GetRebootRequired()(*bool) { + return m.rebootRequired +} +// GetSignatureUpdateOverdue gets the signatureUpdateOverdue property value. A flag indicating whether an signature update is overdue. Optional. Read-only. +func (m *WindowsProtectionState) GetSignatureUpdateOverdue()(*bool) { + return m.signatureUpdateOverdue +} +// GetSignatureVersion gets the signatureVersion property value. The signature version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) GetSignatureVersion()(*string) { + return m.signatureVersion +} +// GetTenantDisplayName gets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *WindowsProtectionState) GetTenantDisplayName()(*string) { + return m.tenantDisplayName +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *WindowsProtectionState) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *WindowsProtectionState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("antiMalwareVersion", m.GetAntiMalwareVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("attentionRequired", m.GetAttentionRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deviceDeleted", m.GetDeviceDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("devicePropertyRefreshDateTime", m.GetDevicePropertyRefreshDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("engineVersion", m.GetEngineVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fullScanOverdue", m.GetFullScanOverdue()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fullScanRequired", m.GetFullScanRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastFullScanDateTime", m.GetLastFullScanDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastFullScanSignatureVersion", m.GetLastFullScanSignatureVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastQuickScanDateTime", m.GetLastQuickScanDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastQuickScanSignatureVersion", m.GetLastQuickScanSignatureVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastRefreshedDateTime", m.GetLastRefreshedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("malwareProtectionEnabled", m.GetMalwareProtectionEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceHealthState", m.GetManagedDeviceHealthState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceName", m.GetManagedDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("networkInspectionSystemEnabled", m.GetNetworkInspectionSystemEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("quickScanOverdue", m.GetQuickScanOverdue()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("realTimeProtectionEnabled", m.GetRealTimeProtectionEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("rebootRequired", m.GetRebootRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("signatureUpdateOverdue", m.GetSignatureUpdateOverdue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signatureVersion", m.GetSignatureVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantDisplayName", m.GetTenantDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetAntiMalwareVersion sets the antiMalwareVersion property value. The anti-malware version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetAntiMalwareVersion(value *string)() { + m.antiMalwareVersion = value +} +// SetAttentionRequired sets the attentionRequired property value. A flag indicating whether attention is required for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetAttentionRequired(value *bool)() { + m.attentionRequired = value +} +// SetDeviceDeleted sets the deviceDeleted property value. A flag indicating whether the managed device has been deleted. Optional. Read-only. +func (m *WindowsProtectionState) SetDeviceDeleted(value *bool)() { + m.deviceDeleted = value +} +// SetDevicePropertyRefreshDateTime sets the devicePropertyRefreshDateTime property value. The date and time the device property has been refreshed. Optional. Read-only. +func (m *WindowsProtectionState) SetDevicePropertyRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.devicePropertyRefreshDateTime = value +} +// SetEngineVersion sets the engineVersion property value. The anti-virus engine version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetEngineVersion(value *string)() { + m.engineVersion = value +} +// SetFullScanOverdue sets the fullScanOverdue property value. A flag indicating whether quick scan is overdue for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetFullScanOverdue(value *bool)() { + m.fullScanOverdue = value +} +// SetFullScanRequired sets the fullScanRequired property value. A flag indicating whether full scan is overdue for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetFullScanRequired(value *bool)() { + m.fullScanRequired = value +} +// SetLastFullScanDateTime sets the lastFullScanDateTime property value. The date and time a full scan was completed. Optional. Read-only. +func (m *WindowsProtectionState) SetLastFullScanDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastFullScanDateTime = value +} +// SetLastFullScanSignatureVersion sets the lastFullScanSignatureVersion property value. The version anti-malware version used to perform the last full scan. Optional. Read-only. +func (m *WindowsProtectionState) SetLastFullScanSignatureVersion(value *string)() { + m.lastFullScanSignatureVersion = value +} +// SetLastQuickScanDateTime sets the lastQuickScanDateTime property value. The date and time a quick scan was completed. Optional. Read-only. +func (m *WindowsProtectionState) SetLastQuickScanDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastQuickScanDateTime = value +} +// SetLastQuickScanSignatureVersion sets the lastQuickScanSignatureVersion property value. The version anti-malware version used to perform the last full scan. Optional. Read-only. +func (m *WindowsProtectionState) SetLastQuickScanSignatureVersion(value *string)() { + m.lastQuickScanSignatureVersion = value +} +// SetLastRefreshedDateTime sets the lastRefreshedDateTime property value. Date and time the entity was last updated in the multi-tenant management platform. Optional. Read-only. +func (m *WindowsProtectionState) SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastRefreshedDateTime = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. The date and time the protection state was last reported for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetMalwareProtectionEnabled sets the malwareProtectionEnabled property value. A flag indicating whether malware protection is enabled for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetMalwareProtectionEnabled(value *bool)() { + m.malwareProtectionEnabled = value +} +// SetManagedDeviceHealthState sets the managedDeviceHealthState property value. The health state for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetManagedDeviceHealthState(value *string)() { + m.managedDeviceHealthState = value +} +// SetManagedDeviceId sets the managedDeviceId property value. The unique identifier for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetManagedDeviceName sets the managedDeviceName property value. The display name for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetManagedDeviceName(value *string)() { + m.managedDeviceName = value +} +// SetNetworkInspectionSystemEnabled sets the networkInspectionSystemEnabled property value. A flag indicating whether the network inspection system is enabled. Optional. Read-only. +func (m *WindowsProtectionState) SetNetworkInspectionSystemEnabled(value *bool)() { + m.networkInspectionSystemEnabled = value +} +// SetQuickScanOverdue sets the quickScanOverdue property value. A flag indicating weather a quick scan is overdue. Optional. Read-only. +func (m *WindowsProtectionState) SetQuickScanOverdue(value *bool)() { + m.quickScanOverdue = value +} +// SetRealTimeProtectionEnabled sets the realTimeProtectionEnabled property value. A flag indicating whether real time protection is enabled. Optional. Read-only. +func (m *WindowsProtectionState) SetRealTimeProtectionEnabled(value *bool)() { + m.realTimeProtectionEnabled = value +} +// SetRebootRequired sets the rebootRequired property value. A flag indicating whether a reboot is required. Optional. Read-only. +func (m *WindowsProtectionState) SetRebootRequired(value *bool)() { + m.rebootRequired = value +} +// SetSignatureUpdateOverdue sets the signatureUpdateOverdue property value. A flag indicating whether an signature update is overdue. Optional. Read-only. +func (m *WindowsProtectionState) SetSignatureUpdateOverdue(value *bool)() { + m.signatureUpdateOverdue = value +} +// SetSignatureVersion sets the signatureVersion property value. The signature version for the managed device. Optional. Read-only. +func (m *WindowsProtectionState) SetSignatureVersion(value *string)() { + m.signatureVersion = value +} +// SetTenantDisplayName sets the tenantDisplayName property value. The display name for the managed tenant. Optional. Read-only. +func (m *WindowsProtectionState) SetTenantDisplayName(value *string)() { + m.tenantDisplayName = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant identifier for the managed tenant. Optional. Read-only. +func (m *WindowsProtectionState) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_response.go new file mode 100644 index 000000000..821817029 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsProtectionStateCollectionResponse +type WindowsProtectionStateCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WindowsProtectionStateable +} +// NewWindowsProtectionStateCollectionResponse instantiates a new WindowsProtectionStateCollectionResponse and sets the default values. +func NewWindowsProtectionStateCollectionResponse()(*WindowsProtectionStateCollectionResponse) { + m := &WindowsProtectionStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWindowsProtectionStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWindowsProtectionStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWindowsProtectionStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WindowsProtectionStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWindowsProtectionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WindowsProtectionStateable, len(val)) + for i, v := range val { + res[i] = v.(WindowsProtectionStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WindowsProtectionStateCollectionResponse) GetValue()([]WindowsProtectionStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *WindowsProtectionStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WindowsProtectionStateCollectionResponse) SetValue(value []WindowsProtectionStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_responseable.go new file mode 100644 index 000000000..082ee9eea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_state_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsProtectionStateCollectionResponseable +type WindowsProtectionStateCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WindowsProtectionStateable) + SetValue(value []WindowsProtectionStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_stateable.go b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_stateable.go new file mode 100644 index 000000000..d5356eb51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/windows_protection_stateable.go @@ -0,0 +1,63 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WindowsProtectionStateable +type WindowsProtectionStateable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAntiMalwareVersion()(*string) + GetAttentionRequired()(*bool) + GetDeviceDeleted()(*bool) + GetDevicePropertyRefreshDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEngineVersion()(*string) + GetFullScanOverdue()(*bool) + GetFullScanRequired()(*bool) + GetLastFullScanDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastFullScanSignatureVersion()(*string) + GetLastQuickScanDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastQuickScanSignatureVersion()(*string) + GetLastRefreshedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMalwareProtectionEnabled()(*bool) + GetManagedDeviceHealthState()(*string) + GetManagedDeviceId()(*string) + GetManagedDeviceName()(*string) + GetNetworkInspectionSystemEnabled()(*bool) + GetQuickScanOverdue()(*bool) + GetRealTimeProtectionEnabled()(*bool) + GetRebootRequired()(*bool) + GetSignatureUpdateOverdue()(*bool) + GetSignatureVersion()(*string) + GetTenantDisplayName()(*string) + GetTenantId()(*string) + SetAntiMalwareVersion(value *string)() + SetAttentionRequired(value *bool)() + SetDeviceDeleted(value *bool)() + SetDevicePropertyRefreshDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEngineVersion(value *string)() + SetFullScanOverdue(value *bool)() + SetFullScanRequired(value *bool)() + SetLastFullScanDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastFullScanSignatureVersion(value *string)() + SetLastQuickScanDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastQuickScanSignatureVersion(value *string)() + SetLastRefreshedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMalwareProtectionEnabled(value *bool)() + SetManagedDeviceHealthState(value *string)() + SetManagedDeviceId(value *string)() + SetManagedDeviceName(value *string)() + SetNetworkInspectionSystemEnabled(value *bool)() + SetQuickScanOverdue(value *bool)() + SetRealTimeProtectionEnabled(value *bool)() + SetRebootRequired(value *bool)() + SetSignatureUpdateOverdue(value *bool)() + SetSignatureVersion(value *string)() + SetTenantDisplayName(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action.go new file mode 100644 index 000000000..1b490ef83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action.go @@ -0,0 +1,266 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkloadAction +type WorkloadAction struct { + // The unique identifier for the workload action. Required. Read-only. + actionId *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 category for the workload action. Possible values are: automated, manual, unknownFutureValue. Optional. Read-only. + category *WorkloadActionCategory + // The description for the workload action. Optional. Read-only. + description *string + // The display name for the workload action. Optional. Read-only. + displayName *string + // The licenses property + licenses []string + // The OdataType property + odataType *string + // The service associated with workload action. Optional. Read-only. + service *string + // The collection of settings associated with the workload action. Optional. Read-only. + settings []Settingable +} +// NewWorkloadAction instantiates a new workloadAction and sets the default values. +func NewWorkloadAction()(*WorkloadAction) { + m := &WorkloadAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkloadActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadAction(), nil +} +// GetActionId gets the actionId property value. The unique identifier for the workload action. Required. Read-only. +func (m *WorkloadAction) GetActionId()(*string) { + return m.actionId +} +// 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 *WorkloadAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. The category for the workload action. Possible values are: automated, manual, unknownFutureValue. Optional. Read-only. +func (m *WorkloadAction) GetCategory()(*WorkloadActionCategory) { + return m.category +} +// GetDescription gets the description property value. The description for the workload action. Optional. Read-only. +func (m *WorkloadAction) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the workload action. Optional. Read-only. +func (m *WorkloadAction) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionId(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkloadActionCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*WorkloadActionCategory)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["licenses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetLicenses(res) + } + 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["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Settingable, len(val)) + for i, v := range val { + res[i] = v.(Settingable) + } + m.SetSettings(res) + } + return nil + } + return res +} +// GetLicenses gets the licenses property value. The licenses property +func (m *WorkloadAction) GetLicenses()([]string) { + return m.licenses +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkloadAction) GetOdataType()(*string) { + return m.odataType +} +// GetService gets the service property value. The service associated with workload action. Optional. Read-only. +func (m *WorkloadAction) GetService()(*string) { + return m.service +} +// GetSettings gets the settings property value. The collection of settings associated with the workload action. Optional. Read-only. +func (m *WorkloadAction) GetSettings()([]Settingable) { + return m.settings +} +// Serialize serializes information the current object +func (m *WorkloadAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actionId", m.GetActionId()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err := writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetLicenses() != nil { + err := writer.WriteCollectionOfStringValues("licenses", m.GetLicenses()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + if m.GetSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettings())) + for i, v := range m.GetSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("settings", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionId sets the actionId property value. The unique identifier for the workload action. Required. Read-only. +func (m *WorkloadAction) SetActionId(value *string)() { + m.actionId = value +} +// 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 *WorkloadAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. The category for the workload action. Possible values are: automated, manual, unknownFutureValue. Optional. Read-only. +func (m *WorkloadAction) SetCategory(value *WorkloadActionCategory)() { + m.category = value +} +// SetDescription sets the description property value. The description for the workload action. Optional. Read-only. +func (m *WorkloadAction) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the workload action. Optional. Read-only. +func (m *WorkloadAction) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLicenses sets the licenses property value. The licenses property +func (m *WorkloadAction) SetLicenses(value []string)() { + m.licenses = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkloadAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetService sets the service property value. The service associated with workload action. Optional. Read-only. +func (m *WorkloadAction) SetService(value *string)() { + m.service = value +} +// SetSettings sets the settings property value. The collection of settings associated with the workload action. Optional. Read-only. +func (m *WorkloadAction) SetSettings(value []Settingable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_category.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_category.go new file mode 100644 index 000000000..abc5a3482 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_category.go @@ -0,0 +1,37 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkloadActionCategory int + +const ( + AUTOMATED_WORKLOADACTIONCATEGORY WorkloadActionCategory = iota + MANUAL_WORKLOADACTIONCATEGORY + UNKNOWNFUTUREVALUE_WORKLOADACTIONCATEGORY +) + +func (i WorkloadActionCategory) String() string { + return []string{"automated", "manual", "unknownFutureValue"}[i] +} +func ParseWorkloadActionCategory(v string) (interface{}, error) { + result := AUTOMATED_WORKLOADACTIONCATEGORY + switch v { + case "automated": + result = AUTOMATED_WORKLOADACTIONCATEGORY + case "manual": + result = MANUAL_WORKLOADACTIONCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WORKLOADACTIONCATEGORY + default: + return 0, errors.New("Unknown WorkloadActionCategory value: " + v) + } + return &result, nil +} +func SerializeWorkloadActionCategory(values []WorkloadActionCategory) []string { + 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/managedtenants/workload_action_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_collection_response.go new file mode 100644 index 000000000..35af07add --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionCollectionResponse +type WorkloadActionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WorkloadActionable +} +// NewWorkloadActionCollectionResponse instantiates a new WorkloadActionCollectionResponse and sets the default values. +func NewWorkloadActionCollectionResponse()(*WorkloadActionCollectionResponse) { + m := &WorkloadActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkloadActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadActionable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkloadActionCollectionResponse) GetValue()([]WorkloadActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkloadActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkloadActionCollectionResponse) SetValue(value []WorkloadActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_collection_responseable.go new file mode 100644 index 000000000..20a172ffd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionCollectionResponseable +type WorkloadActionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WorkloadActionable) + SetValue(value []WorkloadActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status.go new file mode 100644 index 000000000..2bb6ea00f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status.go @@ -0,0 +1,290 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionDeploymentStatus +type WorkloadActionDeploymentStatus struct { + // The unique identifier for the workload action. Required. Read-only. + actionId *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 identifier of any policy that was created by applying the workload action. Optional. Read-only. + deployedPolicyId *string + // The detailed information for exceptions that occur when deploying the workload action. Optional. Required. + error ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable + // The excludeGroups property + excludeGroups []string + // The includeAllUsers property + includeAllUsers *bool + // The includeGroups property + includeGroups []string + // The date and time the workload action was last deployed. Optional. + lastDeploymentDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The status property + status *WorkloadActionStatus +} +// NewWorkloadActionDeploymentStatus instantiates a new workloadActionDeploymentStatus and sets the default values. +func NewWorkloadActionDeploymentStatus()(*WorkloadActionDeploymentStatus) { + m := &WorkloadActionDeploymentStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkloadActionDeploymentStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadActionDeploymentStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadActionDeploymentStatus(), nil +} +// GetActionId gets the actionId property value. The unique identifier for the workload action. Required. Read-only. +func (m *WorkloadActionDeploymentStatus) GetActionId()(*string) { + return m.actionId +} +// 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 *WorkloadActionDeploymentStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeployedPolicyId gets the deployedPolicyId property value. The identifier of any policy that was created by applying the workload action. Optional. Read-only. +func (m *WorkloadActionDeploymentStatus) GetDeployedPolicyId()(*string) { + return m.deployedPolicyId +} +// GetError gets the error property value. The detailed information for exceptions that occur when deploying the workload action. Optional. Required. +func (m *WorkloadActionDeploymentStatus) GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable) { + return m.error +} +// GetExcludeGroups gets the excludeGroups property value. The excludeGroups property +func (m *WorkloadActionDeploymentStatus) GetExcludeGroups()([]string) { + return m.excludeGroups +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadActionDeploymentStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionId(val) + } + return nil + } + res["deployedPolicyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeployedPolicyId(val) + } + return nil + } + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateGenericErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable)) + } + return nil + } + res["excludeGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetExcludeGroups(res) + } + return nil + } + res["includeAllUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIncludeAllUsers(val) + } + return nil + } + res["includeGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetIncludeGroups(res) + } + return nil + } + res["lastDeploymentDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastDeploymentDateTime(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkloadActionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*WorkloadActionStatus)) + } + return nil + } + return res +} +// GetIncludeAllUsers gets the includeAllUsers property value. The includeAllUsers property +func (m *WorkloadActionDeploymentStatus) GetIncludeAllUsers()(*bool) { + return m.includeAllUsers +} +// GetIncludeGroups gets the includeGroups property value. The includeGroups property +func (m *WorkloadActionDeploymentStatus) GetIncludeGroups()([]string) { + return m.includeGroups +} +// GetLastDeploymentDateTime gets the lastDeploymentDateTime property value. The date and time the workload action was last deployed. Optional. +func (m *WorkloadActionDeploymentStatus) GetLastDeploymentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastDeploymentDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkloadActionDeploymentStatus) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status property +func (m *WorkloadActionDeploymentStatus) GetStatus()(*WorkloadActionStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *WorkloadActionDeploymentStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actionId", m.GetActionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deployedPolicyId", m.GetDeployedPolicyId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + if m.GetExcludeGroups() != nil { + err := writer.WriteCollectionOfStringValues("excludeGroups", m.GetExcludeGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("includeAllUsers", m.GetIncludeAllUsers()) + if err != nil { + return err + } + } + if m.GetIncludeGroups() != nil { + err := writer.WriteCollectionOfStringValues("includeGroups", m.GetIncludeGroups()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastDeploymentDateTime", m.GetLastDeploymentDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionId sets the actionId property value. The unique identifier for the workload action. Required. Read-only. +func (m *WorkloadActionDeploymentStatus) SetActionId(value *string)() { + m.actionId = value +} +// 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 *WorkloadActionDeploymentStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeployedPolicyId sets the deployedPolicyId property value. The identifier of any policy that was created by applying the workload action. Optional. Read-only. +func (m *WorkloadActionDeploymentStatus) SetDeployedPolicyId(value *string)() { + m.deployedPolicyId = value +} +// SetError sets the error property value. The detailed information for exceptions that occur when deploying the workload action. Optional. Required. +func (m *WorkloadActionDeploymentStatus) SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable)() { + m.error = value +} +// SetExcludeGroups sets the excludeGroups property value. The excludeGroups property +func (m *WorkloadActionDeploymentStatus) SetExcludeGroups(value []string)() { + m.excludeGroups = value +} +// SetIncludeAllUsers sets the includeAllUsers property value. The includeAllUsers property +func (m *WorkloadActionDeploymentStatus) SetIncludeAllUsers(value *bool)() { + m.includeAllUsers = value +} +// SetIncludeGroups sets the includeGroups property value. The includeGroups property +func (m *WorkloadActionDeploymentStatus) SetIncludeGroups(value []string)() { + m.includeGroups = value +} +// SetLastDeploymentDateTime sets the lastDeploymentDateTime property value. The date and time the workload action was last deployed. Optional. +func (m *WorkloadActionDeploymentStatus) SetLastDeploymentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastDeploymentDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkloadActionDeploymentStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status property +func (m *WorkloadActionDeploymentStatus) SetStatus(value *WorkloadActionStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_response.go new file mode 100644 index 000000000..6b9597c51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionDeploymentStatusCollectionResponse +type WorkloadActionDeploymentStatusCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WorkloadActionDeploymentStatusable +} +// NewWorkloadActionDeploymentStatusCollectionResponse instantiates a new WorkloadActionDeploymentStatusCollectionResponse and sets the default values. +func NewWorkloadActionDeploymentStatusCollectionResponse()(*WorkloadActionDeploymentStatusCollectionResponse) { + m := &WorkloadActionDeploymentStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkloadActionDeploymentStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadActionDeploymentStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadActionDeploymentStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadActionDeploymentStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadActionDeploymentStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadActionDeploymentStatusable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadActionDeploymentStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkloadActionDeploymentStatusCollectionResponse) GetValue()([]WorkloadActionDeploymentStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkloadActionDeploymentStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkloadActionDeploymentStatusCollectionResponse) SetValue(value []WorkloadActionDeploymentStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_responseable.go new file mode 100644 index 000000000..9e8cc66bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_status_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionDeploymentStatusCollectionResponseable +type WorkloadActionDeploymentStatusCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WorkloadActionDeploymentStatusable) + SetValue(value []WorkloadActionDeploymentStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_statusable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_statusable.go new file mode 100644 index 000000000..e8c5de25f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_deployment_statusable.go @@ -0,0 +1,31 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadActionDeploymentStatusable +type WorkloadActionDeploymentStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionId()(*string) + GetDeployedPolicyId()(*string) + GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable) + GetExcludeGroups()([]string) + GetIncludeAllUsers()(*bool) + GetIncludeGroups()([]string) + GetLastDeploymentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStatus()(*WorkloadActionStatus) + SetActionId(value *string)() + SetDeployedPolicyId(value *string)() + SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.GenericErrorable)() + SetExcludeGroups(value []string)() + SetIncludeAllUsers(value *bool)() + SetIncludeGroups(value []string)() + SetLastDeploymentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStatus(value *WorkloadActionStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_status.go new file mode 100644 index 000000000..25c47411c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_action_status.go @@ -0,0 +1,46 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkloadActionStatus int + +const ( + TOADDRESS_WORKLOADACTIONSTATUS WorkloadActionStatus = iota + COMPLETED_WORKLOADACTIONSTATUS + ERROR_WORKLOADACTIONSTATUS + TIMEOUT_WORKLOADACTIONSTATUS + INPROGRESS_WORKLOADACTIONSTATUS + UNKNOWNFUTUREVALUE_WORKLOADACTIONSTATUS +) + +func (i WorkloadActionStatus) String() string { + return []string{"toAddress", "completed", "error", "timeOut", "inProgress", "unknownFutureValue"}[i] +} +func ParseWorkloadActionStatus(v string) (interface{}, error) { + result := TOADDRESS_WORKLOADACTIONSTATUS + switch v { + case "toAddress": + result = TOADDRESS_WORKLOADACTIONSTATUS + case "completed": + result = COMPLETED_WORKLOADACTIONSTATUS + case "error": + result = ERROR_WORKLOADACTIONSTATUS + case "timeOut": + result = TIMEOUT_WORKLOADACTIONSTATUS + case "inProgress": + result = INPROGRESS_WORKLOADACTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WORKLOADACTIONSTATUS + default: + return 0, errors.New("Unknown WorkloadActionStatus value: " + v) + } + return &result, nil +} +func SerializeWorkloadActionStatus(values []WorkloadActionStatus) []string { + 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/managedtenants/workload_actionable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_actionable.go new file mode 100644 index 000000000..e5c2964e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_actionable.go @@ -0,0 +1,27 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkloadActionable +type WorkloadActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionId()(*string) + GetCategory()(*WorkloadActionCategory) + GetDescription()(*string) + GetDisplayName()(*string) + GetLicenses()([]string) + GetOdataType()(*string) + GetService()(*string) + GetSettings()([]Settingable) + SetActionId(value *string)() + SetCategory(value *WorkloadActionCategory)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLicenses(value []string)() + SetOdataType(value *string)() + SetService(value *string)() + SetSettings(value []Settingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_onboarding_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_onboarding_status.go new file mode 100644 index 000000000..545fe08cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_onboarding_status.go @@ -0,0 +1,37 @@ +package managedtenants +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type WorkloadOnboardingStatus int + +const ( + NOTONBOARDED_WORKLOADONBOARDINGSTATUS WorkloadOnboardingStatus = iota + ONBOARDED_WORKLOADONBOARDINGSTATUS + UNKNOWNFUTUREVALUE_WORKLOADONBOARDINGSTATUS +) + +func (i WorkloadOnboardingStatus) String() string { + return []string{"notOnboarded", "onboarded", "unknownFutureValue"}[i] +} +func ParseWorkloadOnboardingStatus(v string) (interface{}, error) { + result := NOTONBOARDED_WORKLOADONBOARDINGSTATUS + switch v { + case "notOnboarded": + result = NOTONBOARDED_WORKLOADONBOARDINGSTATUS + case "onboarded": + result = ONBOARDED_WORKLOADONBOARDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_WORKLOADONBOARDINGSTATUS + default: + return 0, errors.New("Unknown WorkloadOnboardingStatus value: " + v) + } + return &result, nil +} +func SerializeWorkloadOnboardingStatus(values []WorkloadOnboardingStatus) []string { + 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/managedtenants/workload_status.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status.go new file mode 100644 index 000000000..e9832fee1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status.go @@ -0,0 +1,177 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkloadStatus +type WorkloadStatus 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 display name for the workload. Required. Read-only. + displayName *string + // The OdataType property + odataType *string + // The date and time the workload was offboarded. Optional. Read-only. + offboardedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The date and time the workload was onboarded. Optional. Read-only. + onboardedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The onboardingStatus property + onboardingStatus *WorkloadOnboardingStatus +} +// NewWorkloadStatus instantiates a new workloadStatus and sets the default values. +func NewWorkloadStatus()(*WorkloadStatus) { + m := &WorkloadStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateWorkloadStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadStatus(), 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 *WorkloadStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The display name for the workload. Required. Read-only. +func (m *WorkloadStatus) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["offboardedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOffboardedDateTime(val) + } + return nil + } + res["onboardedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnboardedDateTime(val) + } + return nil + } + res["onboardingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWorkloadOnboardingStatus) + if err != nil { + return err + } + if val != nil { + m.SetOnboardingStatus(val.(*WorkloadOnboardingStatus)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *WorkloadStatus) GetOdataType()(*string) { + return m.odataType +} +// GetOffboardedDateTime gets the offboardedDateTime property value. The date and time the workload was offboarded. Optional. Read-only. +func (m *WorkloadStatus) GetOffboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.offboardedDateTime +} +// GetOnboardedDateTime gets the onboardedDateTime property value. The date and time the workload was onboarded. Optional. Read-only. +func (m *WorkloadStatus) GetOnboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onboardedDateTime +} +// GetOnboardingStatus gets the onboardingStatus property value. The onboardingStatus property +func (m *WorkloadStatus) GetOnboardingStatus()(*WorkloadOnboardingStatus) { + return m.onboardingStatus +} +// Serialize serializes information the current object +func (m *WorkloadStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("offboardedDateTime", m.GetOffboardedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("onboardedDateTime", m.GetOnboardedDateTime()) + if err != nil { + return err + } + } + if m.GetOnboardingStatus() != nil { + cast := (*m.GetOnboardingStatus()).String() + err := writer.WriteStringValue("onboardingStatus", &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 *WorkloadStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The display name for the workload. Required. Read-only. +func (m *WorkloadStatus) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *WorkloadStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffboardedDateTime sets the offboardedDateTime property value. The date and time the workload was offboarded. Optional. Read-only. +func (m *WorkloadStatus) SetOffboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.offboardedDateTime = value +} +// SetOnboardedDateTime sets the onboardedDateTime property value. The date and time the workload was onboarded. Optional. Read-only. +func (m *WorkloadStatus) SetOnboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onboardedDateTime = value +} +// SetOnboardingStatus sets the onboardingStatus property value. The onboardingStatus property +func (m *WorkloadStatus) SetOnboardingStatus(value *WorkloadOnboardingStatus)() { + m.onboardingStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_response.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_response.go new file mode 100644 index 000000000..7d6f2fd7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_response.go @@ -0,0 +1,69 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadStatusCollectionResponse +type WorkloadStatusCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []WorkloadStatusable +} +// NewWorkloadStatusCollectionResponse instantiates a new WorkloadStatusCollectionResponse and sets the default values. +func NewWorkloadStatusCollectionResponse()(*WorkloadStatusCollectionResponse) { + m := &WorkloadStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateWorkloadStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateWorkloadStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewWorkloadStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *WorkloadStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkloadStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkloadStatusable, len(val)) + for i, v := range val { + res[i] = v.(WorkloadStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *WorkloadStatusCollectionResponse) GetValue()([]WorkloadStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *WorkloadStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *WorkloadStatusCollectionResponse) SetValue(value []WorkloadStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_responseable.go new file mode 100644 index 000000000..2be194b61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_status_collection_responseable.go @@ -0,0 +1,14 @@ +package managedtenants + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// WorkloadStatusCollectionResponseable +type WorkloadStatusCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]WorkloadStatusable) + SetValue(value []WorkloadStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/managedtenants/workload_statusable.go b/src/internal/connector/graph/betasdk/models/managedtenants/workload_statusable.go new file mode 100644 index 000000000..ee4cde167 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/managedtenants/workload_statusable.go @@ -0,0 +1,22 @@ +package managedtenants + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// WorkloadStatusable +type WorkloadStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetOffboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardingStatus()(*WorkloadOnboardingStatus) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetOffboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardingStatus(value *WorkloadOnboardingStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/management_agent_type.go b/src/internal/connector/graph/betasdk/models/management_agent_type.go new file mode 100644 index 000000000..1aba20aa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_agent_type.go @@ -0,0 +1,83 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementAgentType int + +const ( + // The device is managed by Exchange server. + EAS_MANAGEMENTAGENTTYPE ManagementAgentType = iota + // The device is managed by Intune MDM. + MDM_MANAGEMENTAGENTTYPE + // The device is managed by both Exchange server and Intune MDM. + EASMDM_MANAGEMENTAGENTTYPE + // Intune client managed. + INTUNECLIENT_MANAGEMENTAGENTTYPE + // The device is EAS and Intune client dual managed. + EASINTUNECLIENT_MANAGEMENTAGENTTYPE + // The device is managed by Configuration Manager. + CONFIGURATIONMANAGERCLIENT_MANAGEMENTAGENTTYPE + // The device is managed by Configuration Manager and MDM. + CONFIGURATIONMANAGERCLIENTMDM_MANAGEMENTAGENTTYPE + // The device is managed by Configuration Manager, MDM and Eas. + CONFIGURATIONMANAGERCLIENTMDMEAS_MANAGEMENTAGENTTYPE + // Unknown management agent type. + UNKNOWN_MANAGEMENTAGENTTYPE + // The device attributes are fetched from Jamf. + JAMF_MANAGEMENTAGENTTYPE + // The device is managed by Google's CloudDPC. + GOOGLECLOUDDEVICEPOLICYCONTROLLER_MANAGEMENTAGENTTYPE + // This device is managed by Microsoft 365 through Intune. + MICROSOFT365MANAGEDMDM_MANAGEMENTAGENTTYPE + MSSENSE_MANAGEMENTAGENTTYPE + // This device is managed by Intune's MDM for AOSP (Android Open Source Project) devices + INTUNEAOSP_MANAGEMENTAGENTTYPE +) + +func (i ManagementAgentType) String() string { + return []string{"eas", "mdm", "easMdm", "intuneClient", "easIntuneClient", "configurationManagerClient", "configurationManagerClientMdm", "configurationManagerClientMdmEas", "unknown", "jamf", "googleCloudDevicePolicyController", "microsoft365ManagedMdm", "msSense", "intuneAosp"}[i] +} +func ParseManagementAgentType(v string) (interface{}, error) { + result := EAS_MANAGEMENTAGENTTYPE + switch v { + case "eas": + result = EAS_MANAGEMENTAGENTTYPE + case "mdm": + result = MDM_MANAGEMENTAGENTTYPE + case "easMdm": + result = EASMDM_MANAGEMENTAGENTTYPE + case "intuneClient": + result = INTUNECLIENT_MANAGEMENTAGENTTYPE + case "easIntuneClient": + result = EASINTUNECLIENT_MANAGEMENTAGENTTYPE + case "configurationManagerClient": + result = CONFIGURATIONMANAGERCLIENT_MANAGEMENTAGENTTYPE + case "configurationManagerClientMdm": + result = CONFIGURATIONMANAGERCLIENTMDM_MANAGEMENTAGENTTYPE + case "configurationManagerClientMdmEas": + result = CONFIGURATIONMANAGERCLIENTMDMEAS_MANAGEMENTAGENTTYPE + case "unknown": + result = UNKNOWN_MANAGEMENTAGENTTYPE + case "jamf": + result = JAMF_MANAGEMENTAGENTTYPE + case "googleCloudDevicePolicyController": + result = GOOGLECLOUDDEVICEPOLICYCONTROLLER_MANAGEMENTAGENTTYPE + case "microsoft365ManagedMdm": + result = MICROSOFT365MANAGEDMDM_MANAGEMENTAGENTTYPE + case "msSense": + result = MSSENSE_MANAGEMENTAGENTTYPE + case "intuneAosp": + result = INTUNEAOSP_MANAGEMENTAGENTTYPE + default: + return 0, errors.New("Unknown ManagementAgentType value: " + v) + } + return &result, nil +} +func SerializeManagementAgentType(values []ManagementAgentType) []string { + 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/management_certificate_with_thumbprint.go b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint.go new file mode 100644 index 000000000..7320044f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementCertificateWithThumbprint +type ManagementCertificateWithThumbprint 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 Base 64 encoded management certificate + certificate *string + // The OdataType property + odataType *string + // The thumbprint of the management certificate + thumbprint *string +} +// NewManagementCertificateWithThumbprint instantiates a new managementCertificateWithThumbprint and sets the default values. +func NewManagementCertificateWithThumbprint()(*ManagementCertificateWithThumbprint) { + m := &ManagementCertificateWithThumbprint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateManagementCertificateWithThumbprintFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementCertificateWithThumbprintFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementCertificateWithThumbprint(), 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 *ManagementCertificateWithThumbprint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCertificate gets the certificate property value. The Base 64 encoded management certificate +func (m *ManagementCertificateWithThumbprint) GetCertificate()(*string) { + return m.certificate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementCertificateWithThumbprint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["certificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificate(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["thumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbprint(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ManagementCertificateWithThumbprint) GetOdataType()(*string) { + return m.odataType +} +// GetThumbprint gets the thumbprint property value. The thumbprint of the management certificate +func (m *ManagementCertificateWithThumbprint) GetThumbprint()(*string) { + return m.thumbprint +} +// Serialize serializes information the current object +func (m *ManagementCertificateWithThumbprint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("certificate", m.GetCertificate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("thumbprint", m.GetThumbprint()) + 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 *ManagementCertificateWithThumbprint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCertificate sets the certificate property value. The Base 64 encoded management certificate +func (m *ManagementCertificateWithThumbprint) SetCertificate(value *string)() { + m.certificate = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ManagementCertificateWithThumbprint) SetOdataType(value *string)() { + m.odataType = value +} +// SetThumbprint sets the thumbprint property value. The thumbprint of the management certificate +func (m *ManagementCertificateWithThumbprint) SetThumbprint(value *string)() { + m.thumbprint = value +} diff --git a/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_response.go b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_response.go new file mode 100644 index 000000000..27bc07327 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementCertificateWithThumbprintCollectionResponse +type ManagementCertificateWithThumbprintCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ManagementCertificateWithThumbprintable +} +// NewManagementCertificateWithThumbprintCollectionResponse instantiates a new ManagementCertificateWithThumbprintCollectionResponse and sets the default values. +func NewManagementCertificateWithThumbprintCollectionResponse()(*ManagementCertificateWithThumbprintCollectionResponse) { + m := &ManagementCertificateWithThumbprintCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateManagementCertificateWithThumbprintCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateManagementCertificateWithThumbprintCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewManagementCertificateWithThumbprintCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ManagementCertificateWithThumbprintCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagementCertificateWithThumbprintFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagementCertificateWithThumbprintable, len(val)) + for i, v := range val { + res[i] = v.(ManagementCertificateWithThumbprintable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ManagementCertificateWithThumbprintCollectionResponse) GetValue()([]ManagementCertificateWithThumbprintable) { + return m.value +} +// Serialize serializes information the current object +func (m *ManagementCertificateWithThumbprintCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ManagementCertificateWithThumbprintCollectionResponse) SetValue(value []ManagementCertificateWithThumbprintable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_responseable.go b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_responseable.go new file mode 100644 index 000000000..94379bfac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprint_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementCertificateWithThumbprintCollectionResponseable +type ManagementCertificateWithThumbprintCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ManagementCertificateWithThumbprintable) + SetValue(value []ManagementCertificateWithThumbprintable)() +} diff --git a/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprintable.go b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprintable.go new file mode 100644 index 000000000..25ba8a9fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_certificate_with_thumbprintable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ManagementCertificateWithThumbprintable +type ManagementCertificateWithThumbprintable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificate()(*string) + GetOdataType()(*string) + GetThumbprint()(*string) + SetCertificate(value *string)() + SetOdataType(value *string)() + SetThumbprint(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/management_state.go b/src/internal/connector/graph/betasdk/models/management_state.go new file mode 100644 index 000000000..767c3c4b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/management_state.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ManagementState int + +const ( + // The device is under management + MANAGED_MANAGEMENTSTATE ManagementState = iota + // A retire command is occuring on the device and in the process of unenrolling from management + RETIREPENDING_MANAGEMENTSTATE + // Retire command failed on the device + RETIREFAILED_MANAGEMENTSTATE + // A wipe command is occuring on the device and in the process of unenrolling from management + WIPEPENDING_MANAGEMENTSTATE + // Wipe command failed on the device + WIPEFAILED_MANAGEMENTSTATE + // The device is unhealthy. + UNHEALTHY_MANAGEMENTSTATE + // A delete command is occuring on the device + DELETEPENDING_MANAGEMENTSTATE + // A retire command was issued for the device + RETIREISSUED_MANAGEMENTSTATE + // A wipe command was issued for the device + WIPEISSUED_MANAGEMENTSTATE + // A wipe command for this device has been canceled + WIPECANCELED_MANAGEMENTSTATE + // A retire command for this device has been canceled + RETIRECANCELED_MANAGEMENTSTATE + // The device is discovered but not fully enrolled. + DISCOVERED_MANAGEMENTSTATE +) + +func (i ManagementState) String() string { + return []string{"managed", "retirePending", "retireFailed", "wipePending", "wipeFailed", "unhealthy", "deletePending", "retireIssued", "wipeIssued", "wipeCanceled", "retireCanceled", "discovered"}[i] +} +func ParseManagementState(v string) (interface{}, error) { + result := MANAGED_MANAGEMENTSTATE + switch v { + case "managed": + result = MANAGED_MANAGEMENTSTATE + case "retirePending": + result = RETIREPENDING_MANAGEMENTSTATE + case "retireFailed": + result = RETIREFAILED_MANAGEMENTSTATE + case "wipePending": + result = WIPEPENDING_MANAGEMENTSTATE + case "wipeFailed": + result = WIPEFAILED_MANAGEMENTSTATE + case "unhealthy": + result = UNHEALTHY_MANAGEMENTSTATE + case "deletePending": + result = DELETEPENDING_MANAGEMENTSTATE + case "retireIssued": + result = RETIREISSUED_MANAGEMENTSTATE + case "wipeIssued": + result = WIPEISSUED_MANAGEMENTSTATE + case "wipeCanceled": + result = WIPECANCELED_MANAGEMENTSTATE + case "retireCanceled": + result = RETIRECANCELED_MANAGEMENTSTATE + case "discovered": + result = DISCOVERED_MANAGEMENTSTATE + default: + return 0, errors.New("Unknown ManagementState value: " + v) + } + return &result, nil +} +func SerializeManagementState(values []ManagementState) []string { + 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/mark_content.go b/src/internal/connector/graph/betasdk/models/mark_content.go new file mode 100644 index 000000000..ce6c737c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mark_content.go @@ -0,0 +1,136 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MarkContent +type MarkContent struct { + LabelActionBase + // The fontColor property + fontColor *string + // The fontSize property + fontSize *int64 + // The text property + text *string +} +// NewMarkContent instantiates a new MarkContent and sets the default values. +func NewMarkContent()(*MarkContent) { + m := &MarkContent{ + LabelActionBase: *NewLabelActionBase(), + } + odataTypeValue := "#microsoft.graph.markContent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMarkContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMarkContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.addFooter": + return NewAddFooter(), nil + case "#microsoft.graph.addHeader": + return NewAddHeader(), nil + case "#microsoft.graph.addWatermark": + return NewAddWatermark(), nil + } + } + } + } + return NewMarkContent(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MarkContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LabelActionBase.GetFieldDeserializers() + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. The fontColor property +func (m *MarkContent) GetFontColor()(*string) { + return m.fontColor +} +// GetFontSize gets the fontSize property value. The fontSize property +func (m *MarkContent) GetFontSize()(*int64) { + return m.fontSize +} +// GetText gets the text property value. The text property +func (m *MarkContent) GetText()(*string) { + return m.text +} +// Serialize serializes information the current object +func (m *MarkContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LabelActionBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + return nil +} +// SetFontColor sets the fontColor property value. The fontColor property +func (m *MarkContent) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontSize sets the fontSize property value. The fontSize property +func (m *MarkContent) SetFontSize(value *int64)() { + m.fontSize = value +} +// SetText sets the text property value. The text property +func (m *MarkContent) SetText(value *string)() { + m.text = value +} diff --git a/src/internal/connector/graph/betasdk/models/mark_contentable.go b/src/internal/connector/graph/betasdk/models/mark_contentable.go new file mode 100644 index 000000000..65783e802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mark_contentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MarkContentable +type MarkContentable interface { + LabelActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFontColor()(*string) + GetFontSize()(*int64) + GetText()(*string) + SetFontColor(value *string)() + SetFontSize(value *int64)() + SetText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/match_location.go b/src/internal/connector/graph/betasdk/models/match_location.go new file mode 100644 index 000000000..8e51944cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/match_location.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchLocation +type MatchLocation 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 length property + length *int32 + // The OdataType property + odataType *string + // The offset property + offset *int32 +} +// NewMatchLocation instantiates a new matchLocation and sets the default values. +func NewMatchLocation()(*MatchLocation) { + m := &MatchLocation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMatchLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMatchLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMatchLocation(), 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 *MatchLocation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MatchLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + return res +} +// GetLength gets the length property value. The length property +func (m *MatchLocation) GetLength()(*int32) { + return m.length +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MatchLocation) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. The offset property +func (m *MatchLocation) GetOffset()(*int32) { + return m.offset +} +// Serialize serializes information the current object +func (m *MatchLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("offset", m.GetOffset()) + 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 *MatchLocation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLength sets the length property value. The length property +func (m *MatchLocation) SetLength(value *int32)() { + m.length = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MatchLocation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. The offset property +func (m *MatchLocation) SetOffset(value *int32)() { + m.offset = value +} diff --git a/src/internal/connector/graph/betasdk/models/match_location_collection_response.go b/src/internal/connector/graph/betasdk/models/match_location_collection_response.go new file mode 100644 index 000000000..93f3a72d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/match_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchLocationCollectionResponse +type MatchLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MatchLocationable +} +// NewMatchLocationCollectionResponse instantiates a new MatchLocationCollectionResponse and sets the default values. +func NewMatchLocationCollectionResponse()(*MatchLocationCollectionResponse) { + m := &MatchLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMatchLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMatchLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMatchLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MatchLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMatchLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MatchLocationable, len(val)) + for i, v := range val { + res[i] = v.(MatchLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MatchLocationCollectionResponse) GetValue()([]MatchLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MatchLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MatchLocationCollectionResponse) SetValue(value []MatchLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/match_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/match_location_collection_responseable.go new file mode 100644 index 000000000..02d2950fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/match_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchLocationCollectionResponseable +type MatchLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MatchLocationable) + SetValue(value []MatchLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/match_locationable.go b/src/internal/connector/graph/betasdk/models/match_locationable.go new file mode 100644 index 000000000..ff7197465 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/match_locationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchLocationable +type MatchLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLength()(*int32) + GetOdataType()(*string) + GetOffset()(*int32) + SetLength(value *int32)() + SetOdataType(value *string)() + SetOffset(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/matching_dlp_rule.go b/src/internal/connector/graph/betasdk/models/matching_dlp_rule.go new file mode 100644 index 000000000..dadc32dfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_dlp_rule.go @@ -0,0 +1,288 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingDlpRule +type MatchingDlpRule struct { + // The actions property + actions []DlpActionInfoable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The isMostRestrictive property + isMostRestrictive *bool + // The OdataType property + odataType *string + // The policyId property + policyId *string + // The policyName property + policyName *string + // The priority property + priority *int32 + // The ruleId property + ruleId *string + // The ruleMode property + ruleMode *RuleMode + // The ruleName property + ruleName *string +} +// NewMatchingDlpRule instantiates a new matchingDlpRule and sets the default values. +func NewMatchingDlpRule()(*MatchingDlpRule) { + m := &MatchingDlpRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMatchingDlpRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMatchingDlpRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMatchingDlpRule(), nil +} +// GetActions gets the actions property value. The actions property +func (m *MatchingDlpRule) GetActions()([]DlpActionInfoable) { + return m.actions +} +// 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 *MatchingDlpRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MatchingDlpRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDlpActionInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DlpActionInfoable, len(val)) + for i, v := range val { + res[i] = v.(DlpActionInfoable) + } + m.SetActions(res) + } + return nil + } + res["isMostRestrictive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMostRestrictive(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["policyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyId(val) + } + return nil + } + res["policyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["ruleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleId(val) + } + return nil + } + res["ruleMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRuleMode) + if err != nil { + return err + } + if val != nil { + m.SetRuleMode(val.(*RuleMode)) + } + return nil + } + res["ruleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRuleName(val) + } + return nil + } + return res +} +// GetIsMostRestrictive gets the isMostRestrictive property value. The isMostRestrictive property +func (m *MatchingDlpRule) GetIsMostRestrictive()(*bool) { + return m.isMostRestrictive +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MatchingDlpRule) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyId gets the policyId property value. The policyId property +func (m *MatchingDlpRule) GetPolicyId()(*string) { + return m.policyId +} +// GetPolicyName gets the policyName property value. The policyName property +func (m *MatchingDlpRule) GetPolicyName()(*string) { + return m.policyName +} +// GetPriority gets the priority property value. The priority property +func (m *MatchingDlpRule) GetPriority()(*int32) { + return m.priority +} +// GetRuleId gets the ruleId property value. The ruleId property +func (m *MatchingDlpRule) GetRuleId()(*string) { + return m.ruleId +} +// GetRuleMode gets the ruleMode property value. The ruleMode property +func (m *MatchingDlpRule) GetRuleMode()(*RuleMode) { + return m.ruleMode +} +// GetRuleName gets the ruleName property value. The ruleName property +func (m *MatchingDlpRule) GetRuleName()(*string) { + return m.ruleName +} +// Serialize serializes information the current object +func (m *MatchingDlpRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActions())) + for i, v := range m.GetActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("actions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isMostRestrictive", m.GetIsMostRestrictive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyId", m.GetPolicyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyName", m.GetPolicyName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ruleId", m.GetRuleId()) + if err != nil { + return err + } + } + if m.GetRuleMode() != nil { + cast := (*m.GetRuleMode()).String() + err := writer.WriteStringValue("ruleMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ruleName", m.GetRuleName()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The actions property +func (m *MatchingDlpRule) SetActions(value []DlpActionInfoable)() { + m.actions = value +} +// 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 *MatchingDlpRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsMostRestrictive sets the isMostRestrictive property value. The isMostRestrictive property +func (m *MatchingDlpRule) SetIsMostRestrictive(value *bool)() { + m.isMostRestrictive = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MatchingDlpRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyId sets the policyId property value. The policyId property +func (m *MatchingDlpRule) SetPolicyId(value *string)() { + m.policyId = value +} +// SetPolicyName sets the policyName property value. The policyName property +func (m *MatchingDlpRule) SetPolicyName(value *string)() { + m.policyName = value +} +// SetPriority sets the priority property value. The priority property +func (m *MatchingDlpRule) SetPriority(value *int32)() { + m.priority = value +} +// SetRuleId sets the ruleId property value. The ruleId property +func (m *MatchingDlpRule) SetRuleId(value *string)() { + m.ruleId = value +} +// SetRuleMode sets the ruleMode property value. The ruleMode property +func (m *MatchingDlpRule) SetRuleMode(value *RuleMode)() { + m.ruleMode = value +} +// SetRuleName sets the ruleName property value. The ruleName property +func (m *MatchingDlpRule) SetRuleName(value *string)() { + m.ruleName = value +} diff --git a/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_response.go new file mode 100644 index 000000000..c4093a33a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingDlpRuleCollectionResponse +type MatchingDlpRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MatchingDlpRuleable +} +// NewMatchingDlpRuleCollectionResponse instantiates a new MatchingDlpRuleCollectionResponse and sets the default values. +func NewMatchingDlpRuleCollectionResponse()(*MatchingDlpRuleCollectionResponse) { + m := &MatchingDlpRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMatchingDlpRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMatchingDlpRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMatchingDlpRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MatchingDlpRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMatchingDlpRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MatchingDlpRuleable, len(val)) + for i, v := range val { + res[i] = v.(MatchingDlpRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MatchingDlpRuleCollectionResponse) GetValue()([]MatchingDlpRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *MatchingDlpRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MatchingDlpRuleCollectionResponse) SetValue(value []MatchingDlpRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_responseable.go new file mode 100644 index 000000000..d3f166308 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_dlp_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingDlpRuleCollectionResponseable +type MatchingDlpRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MatchingDlpRuleable) + SetValue(value []MatchingDlpRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/matching_dlp_ruleable.go b/src/internal/connector/graph/betasdk/models/matching_dlp_ruleable.go new file mode 100644 index 000000000..b05ea4a85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_dlp_ruleable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingDlpRuleable +type MatchingDlpRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]DlpActionInfoable) + GetIsMostRestrictive()(*bool) + GetOdataType()(*string) + GetPolicyId()(*string) + GetPolicyName()(*string) + GetPriority()(*int32) + GetRuleId()(*string) + GetRuleMode()(*RuleMode) + GetRuleName()(*string) + SetActions(value []DlpActionInfoable)() + SetIsMostRestrictive(value *bool)() + SetOdataType(value *string)() + SetPolicyId(value *string)() + SetPolicyName(value *string)() + SetPriority(value *int32)() + SetRuleId(value *string)() + SetRuleMode(value *RuleMode)() + SetRuleName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/matching_label.go b/src/internal/connector/graph/betasdk/models/matching_label.go new file mode 100644 index 000000000..62ff6c7f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_label.go @@ -0,0 +1,340 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingLabel +type MatchingLabel 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 applicationMode property + applicationMode *ApplicationMode + // The description property + description *string + // The displayName property + displayName *string + // The id property + id *string + // The isEndpointProtectionEnabled property + isEndpointProtectionEnabled *bool + // The labelActions property + labelActions []LabelActionBaseable + // The name property + name *string + // The OdataType property + odataType *string + // The policyTip property + policyTip *string + // The priority property + priority *int32 + // The toolTip property + toolTip *string +} +// NewMatchingLabel instantiates a new matchingLabel and sets the default values. +func NewMatchingLabel()(*MatchingLabel) { + m := &MatchingLabel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMatchingLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMatchingLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMatchingLabel(), 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 *MatchingLabel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationMode gets the applicationMode property value. The applicationMode property +func (m *MatchingLabel) GetApplicationMode()(*ApplicationMode) { + return m.applicationMode +} +// GetDescription gets the description property value. The description property +func (m *MatchingLabel) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *MatchingLabel) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MatchingLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseApplicationMode) + if err != nil { + return err + } + if val != nil { + m.SetApplicationMode(val.(*ApplicationMode)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isEndpointProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEndpointProtectionEnabled(val) + } + return nil + } + res["labelActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelActionBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LabelActionBaseable, len(val)) + for i, v := range val { + res[i] = v.(LabelActionBaseable) + } + m.SetLabelActions(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["policyTip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyTip(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["toolTip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToolTip(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *MatchingLabel) GetId()(*string) { + return m.id +} +// GetIsEndpointProtectionEnabled gets the isEndpointProtectionEnabled property value. The isEndpointProtectionEnabled property +func (m *MatchingLabel) GetIsEndpointProtectionEnabled()(*bool) { + return m.isEndpointProtectionEnabled +} +// GetLabelActions gets the labelActions property value. The labelActions property +func (m *MatchingLabel) GetLabelActions()([]LabelActionBaseable) { + return m.labelActions +} +// GetName gets the name property value. The name property +func (m *MatchingLabel) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MatchingLabel) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyTip gets the policyTip property value. The policyTip property +func (m *MatchingLabel) GetPolicyTip()(*string) { + return m.policyTip +} +// GetPriority gets the priority property value. The priority property +func (m *MatchingLabel) GetPriority()(*int32) { + return m.priority +} +// GetToolTip gets the toolTip property value. The toolTip property +func (m *MatchingLabel) GetToolTip()(*string) { + return m.toolTip +} +// Serialize serializes information the current object +func (m *MatchingLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetApplicationMode() != nil { + cast := (*m.GetApplicationMode()).String() + err := writer.WriteStringValue("applicationMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEndpointProtectionEnabled", m.GetIsEndpointProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetLabelActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabelActions())) + for i, v := range m.GetLabelActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("labelActions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyTip", m.GetPolicyTip()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("toolTip", m.GetToolTip()) + 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 *MatchingLabel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationMode sets the applicationMode property value. The applicationMode property +func (m *MatchingLabel) SetApplicationMode(value *ApplicationMode)() { + m.applicationMode = value +} +// SetDescription sets the description property value. The description property +func (m *MatchingLabel) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *MatchingLabel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. The id property +func (m *MatchingLabel) SetId(value *string)() { + m.id = value +} +// SetIsEndpointProtectionEnabled sets the isEndpointProtectionEnabled property value. The isEndpointProtectionEnabled property +func (m *MatchingLabel) SetIsEndpointProtectionEnabled(value *bool)() { + m.isEndpointProtectionEnabled = value +} +// SetLabelActions sets the labelActions property value. The labelActions property +func (m *MatchingLabel) SetLabelActions(value []LabelActionBaseable)() { + m.labelActions = value +} +// SetName sets the name property value. The name property +func (m *MatchingLabel) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MatchingLabel) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyTip sets the policyTip property value. The policyTip property +func (m *MatchingLabel) SetPolicyTip(value *string)() { + m.policyTip = value +} +// SetPriority sets the priority property value. The priority property +func (m *MatchingLabel) SetPriority(value *int32)() { + m.priority = value +} +// SetToolTip sets the toolTip property value. The toolTip property +func (m *MatchingLabel) SetToolTip(value *string)() { + m.toolTip = value +} diff --git a/src/internal/connector/graph/betasdk/models/matching_labelable.go b/src/internal/connector/graph/betasdk/models/matching_labelable.go new file mode 100644 index 000000000..b945fbd09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/matching_labelable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MatchingLabelable +type MatchingLabelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationMode()(*ApplicationMode) + GetDescription()(*string) + GetDisplayName()(*string) + GetId()(*string) + GetIsEndpointProtectionEnabled()(*bool) + GetLabelActions()([]LabelActionBaseable) + GetName()(*string) + GetOdataType()(*string) + GetPolicyTip()(*string) + GetPriority()(*int32) + GetToolTip()(*string) + SetApplicationMode(value *ApplicationMode)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetId(value *string)() + SetIsEndpointProtectionEnabled(value *bool)() + SetLabelActions(value []LabelActionBaseable)() + SetName(value *string)() + SetOdataType(value *string)() + SetPolicyTip(value *string)() + SetPriority(value *int32)() + SetToolTip(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_app_config_key_type.go b/src/internal/connector/graph/betasdk/models/mdm_app_config_key_type.go new file mode 100644 index 000000000..b4aa90785 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_app_config_key_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MdmAppConfigKeyType int + +const ( + STRINGTYPE_MDMAPPCONFIGKEYTYPE MdmAppConfigKeyType = iota + INTEGERTYPE_MDMAPPCONFIGKEYTYPE + REALTYPE_MDMAPPCONFIGKEYTYPE + BOOLEANTYPE_MDMAPPCONFIGKEYTYPE + TOKENTYPE_MDMAPPCONFIGKEYTYPE +) + +func (i MdmAppConfigKeyType) String() string { + return []string{"stringType", "integerType", "realType", "booleanType", "tokenType"}[i] +} +func ParseMdmAppConfigKeyType(v string) (interface{}, error) { + result := STRINGTYPE_MDMAPPCONFIGKEYTYPE + switch v { + case "stringType": + result = STRINGTYPE_MDMAPPCONFIGKEYTYPE + case "integerType": + result = INTEGERTYPE_MDMAPPCONFIGKEYTYPE + case "realType": + result = REALTYPE_MDMAPPCONFIGKEYTYPE + case "booleanType": + result = BOOLEANTYPE_MDMAPPCONFIGKEYTYPE + case "tokenType": + result = TOKENTYPE_MDMAPPCONFIGKEYTYPE + default: + return 0, errors.New("Unknown MdmAppConfigKeyType value: " + v) + } + return &result, nil +} +func SerializeMdmAppConfigKeyType(values []MdmAppConfigKeyType) []string { + 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/mdm_authority.go b/src/internal/connector/graph/betasdk/models/mdm_authority.go new file mode 100644 index 000000000..494cc9372 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_authority.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MdmAuthority int + +const ( + // Unknown + UNKNOWN_MDMAUTHORITY MdmAuthority = iota + // Intune + INTUNE_MDMAUTHORITY + // SCCM + SCCM_MDMAUTHORITY + // Office365 + OFFICE365_MDMAUTHORITY +) + +func (i MdmAuthority) String() string { + return []string{"unknown", "intune", "sccm", "office365"}[i] +} +func ParseMdmAuthority(v string) (interface{}, error) { + result := UNKNOWN_MDMAUTHORITY + switch v { + case "unknown": + result = UNKNOWN_MDMAUTHORITY + case "intune": + result = INTUNE_MDMAUTHORITY + case "sccm": + result = SCCM_MDMAUTHORITY + case "office365": + result = OFFICE365_MDMAUTHORITY + default: + return 0, errors.New("Unknown MdmAuthority value: " + v) + } + return &result, nil +} +func SerializeMdmAuthority(values []MdmAuthority) []string { + 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/mdm_supported_state.go b/src/internal/connector/graph/betasdk/models/mdm_supported_state.go new file mode 100644 index 000000000..115d66846 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_supported_state.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MdmSupportedState int + +const ( + // Mdm support status of the setting is not known. + UNKNOWN_MDMSUPPORTEDSTATE MdmSupportedState = iota + // Setting is supported. + SUPPORTED_MDMSUPPORTEDSTATE + // Setting is unsupported. + UNSUPPORTED_MDMSUPPORTEDSTATE + // Setting is depcrecated. + DEPRECATED_MDMSUPPORTEDSTATE +) + +func (i MdmSupportedState) String() string { + return []string{"unknown", "supported", "unsupported", "deprecated"}[i] +} +func ParseMdmSupportedState(v string) (interface{}, error) { + result := UNKNOWN_MDMSUPPORTEDSTATE + switch v { + case "unknown": + result = UNKNOWN_MDMSUPPORTEDSTATE + case "supported": + result = SUPPORTED_MDMSUPPORTEDSTATE + case "unsupported": + result = UNSUPPORTED_MDMSUPPORTEDSTATE + case "deprecated": + result = DEPRECATED_MDMSUPPORTEDSTATE + default: + return 0, errors.New("Unknown MdmSupportedState value: " + v) + } + return &result, nil +} +func SerializeMdmSupportedState(values []MdmSupportedState) []string { + 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/mdm_windows_information_protection_policy.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy.go new file mode 100644 index 000000000..75be84b4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicy +type MdmWindowsInformationProtectionPolicy struct { + WindowsInformationProtection +} +// NewMdmWindowsInformationProtectionPolicy instantiates a new MdmWindowsInformationProtectionPolicy and sets the default values. +func NewMdmWindowsInformationProtectionPolicy()(*MdmWindowsInformationProtectionPolicy) { + m := &MdmWindowsInformationProtectionPolicy{ + WindowsInformationProtection: *NewWindowsInformationProtection(), + } + odataTypeValue := "#microsoft.graph.mdmWindowsInformationProtectionPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMdmWindowsInformationProtectionPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMdmWindowsInformationProtectionPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMdmWindowsInformationProtectionPolicy(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MdmWindowsInformationProtectionPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.WindowsInformationProtection.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MdmWindowsInformationProtectionPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.WindowsInformationProtection.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_response.go new file mode 100644 index 000000000..7cbb7a5dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyCollectionResponse +type MdmWindowsInformationProtectionPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MdmWindowsInformationProtectionPolicyable +} +// NewMdmWindowsInformationProtectionPolicyCollectionResponse instantiates a new MdmWindowsInformationProtectionPolicyCollectionResponse and sets the default values. +func NewMdmWindowsInformationProtectionPolicyCollectionResponse()(*MdmWindowsInformationProtectionPolicyCollectionResponse) { + m := &MdmWindowsInformationProtectionPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMdmWindowsInformationProtectionPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMdmWindowsInformationProtectionPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMdmWindowsInformationProtectionPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MdmWindowsInformationProtectionPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMdmWindowsInformationProtectionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MdmWindowsInformationProtectionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(MdmWindowsInformationProtectionPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MdmWindowsInformationProtectionPolicyCollectionResponse) GetValue()([]MdmWindowsInformationProtectionPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *MdmWindowsInformationProtectionPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MdmWindowsInformationProtectionPolicyCollectionResponse) SetValue(value []MdmWindowsInformationProtectionPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_responseable.go new file mode 100644 index 000000000..1c93bed4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyCollectionResponseable +type MdmWindowsInformationProtectionPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MdmWindowsInformationProtectionPolicyable) + SetValue(value []MdmWindowsInformationProtectionPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item.go new file mode 100644 index 000000000..fa8ce5b2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyPolicySetItem +type MdmWindowsInformationProtectionPolicyPolicySetItem struct { + PolicySetItem +} +// NewMdmWindowsInformationProtectionPolicyPolicySetItem instantiates a new MdmWindowsInformationProtectionPolicyPolicySetItem and sets the default values. +func NewMdmWindowsInformationProtectionPolicyPolicySetItem()(*MdmWindowsInformationProtectionPolicyPolicySetItem) { + m := &MdmWindowsInformationProtectionPolicyPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.mdmWindowsInformationProtectionPolicyPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMdmWindowsInformationProtectionPolicyPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMdmWindowsInformationProtectionPolicyPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMdmWindowsInformationProtectionPolicyPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MdmWindowsInformationProtectionPolicyPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MdmWindowsInformationProtectionPolicyPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_response.go new file mode 100644 index 000000000..4a81f5723 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse +type MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MdmWindowsInformationProtectionPolicyPolicySetItemable +} +// NewMdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse instantiates a new MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse and sets the default values. +func NewMdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse()(*MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse) { + m := &MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMdmWindowsInformationProtectionPolicyPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MdmWindowsInformationProtectionPolicyPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(MdmWindowsInformationProtectionPolicyPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse) GetValue()([]MdmWindowsInformationProtectionPolicyPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponse) SetValue(value []MdmWindowsInformationProtectionPolicyPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..82da09917 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponseable +type MdmWindowsInformationProtectionPolicyPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MdmWindowsInformationProtectionPolicyPolicySetItemable) + SetValue(value []MdmWindowsInformationProtectionPolicyPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_itemable.go new file mode 100644 index 000000000..a2629f710 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policy_policy_set_itemable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyPolicySetItemable +type MdmWindowsInformationProtectionPolicyPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable +} diff --git a/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policyable.go b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policyable.go new file mode 100644 index 000000000..82895b80b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mdm_windows_information_protection_policyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MdmWindowsInformationProtectionPolicyable +type MdmWindowsInformationProtectionPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + WindowsInformationProtectionable +} diff --git a/src/internal/connector/graph/betasdk/models/media.go b/src/internal/connector/graph/betasdk/models/media.go new file mode 100644 index 000000000..c311d5b68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Media +type Media struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If a file has a transcript, this setting controls if the closed captions / transcription for the media file should be shown to people during viewing. Read-Write. + isTranscriptionShown *bool + // Information about the source of media. Read-only. + mediaSource MediaSourceable + // The OdataType property + odataType *string +} +// NewMedia instantiates a new media and sets the default values. +func NewMedia()(*Media) { + m := &Media{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMedia(), 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 *Media) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Media) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isTranscriptionShown"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTranscriptionShown(val) + } + return nil + } + res["mediaSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMediaSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMediaSource(val.(MediaSourceable)) + } + 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 + } + return res +} +// GetIsTranscriptionShown gets the isTranscriptionShown property value. If a file has a transcript, this setting controls if the closed captions / transcription for the media file should be shown to people during viewing. Read-Write. +func (m *Media) GetIsTranscriptionShown()(*bool) { + return m.isTranscriptionShown +} +// GetMediaSource gets the mediaSource property value. Information about the source of media. Read-only. +func (m *Media) GetMediaSource()(MediaSourceable) { + return m.mediaSource +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Media) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Media) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isTranscriptionShown", m.GetIsTranscriptionShown()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("mediaSource", m.GetMediaSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Media) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsTranscriptionShown sets the isTranscriptionShown property value. If a file has a transcript, this setting controls if the closed captions / transcription for the media file should be shown to people during viewing. Read-Write. +func (m *Media) SetIsTranscriptionShown(value *bool)() { + m.isTranscriptionShown = value +} +// SetMediaSource sets the mediaSource property value. Information about the source of media. Read-only. +func (m *Media) SetMediaSource(value MediaSourceable)() { + m.mediaSource = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Media) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_config.go b/src/internal/connector/graph/betasdk/models/media_config.go new file mode 100644 index 000000000..3f9886617 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_config.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaConfig +type MediaConfig 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 OdataType property + odataType *string + // The removeFromDefaultAudioGroup property + removeFromDefaultAudioGroup *bool +} +// NewMediaConfig instantiates a new mediaConfig and sets the default values. +func NewMediaConfig()(*MediaConfig) { + m := &MediaConfig{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.appHostedMediaConfig": + return NewAppHostedMediaConfig(), nil + case "#microsoft.graph.serviceHostedMediaConfig": + return NewServiceHostedMediaConfig(), nil + } + } + } + } + return NewMediaConfig(), 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 *MediaConfig) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaConfig) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["removeFromDefaultAudioGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRemoveFromDefaultAudioGroup(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaConfig) GetOdataType()(*string) { + return m.odataType +} +// GetRemoveFromDefaultAudioGroup gets the removeFromDefaultAudioGroup property value. The removeFromDefaultAudioGroup property +func (m *MediaConfig) GetRemoveFromDefaultAudioGroup()(*bool) { + return m.removeFromDefaultAudioGroup +} +// Serialize serializes information the current object +func (m *MediaConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("removeFromDefaultAudioGroup", m.GetRemoveFromDefaultAudioGroup()) + 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 *MediaConfig) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaConfig) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemoveFromDefaultAudioGroup sets the removeFromDefaultAudioGroup property value. The removeFromDefaultAudioGroup property +func (m *MediaConfig) SetRemoveFromDefaultAudioGroup(value *bool)() { + m.removeFromDefaultAudioGroup = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_configable.go b/src/internal/connector/graph/betasdk/models/media_configable.go new file mode 100644 index 000000000..32bcf6faf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_configable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaConfigable +type MediaConfigable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRemoveFromDefaultAudioGroup()(*bool) + SetOdataType(value *string)() + SetRemoveFromDefaultAudioGroup(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_australia.go b/src/internal/connector/graph/betasdk/models/media_content_rating_australia.go new file mode 100644 index 000000000..706e9fac2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_australia.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingAustralia +type MediaContentRatingAustralia struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in Australia + movieRating *RatingAustraliaMoviesType + // The OdataType property + odataType *string + // TV content rating labels in Australia + tvRating *RatingAustraliaTelevisionType +} +// NewMediaContentRatingAustralia instantiates a new mediaContentRatingAustralia and sets the default values. +func NewMediaContentRatingAustralia()(*MediaContentRatingAustralia) { + m := &MediaContentRatingAustralia{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingAustraliaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingAustraliaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingAustralia(), 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 *MediaContentRatingAustralia) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingAustralia) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingAustraliaMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingAustraliaMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingAustraliaTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingAustraliaTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in Australia +func (m *MediaContentRatingAustralia) GetMovieRating()(*RatingAustraliaMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingAustralia) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in Australia +func (m *MediaContentRatingAustralia) GetTvRating()(*RatingAustraliaTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingAustralia) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingAustralia) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in Australia +func (m *MediaContentRatingAustralia) SetMovieRating(value *RatingAustraliaMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingAustralia) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in Australia +func (m *MediaContentRatingAustralia) SetTvRating(value *RatingAustraliaTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_australiaable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_australiaable.go new file mode 100644 index 000000000..da757dc96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_australiaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingAustraliaable +type MediaContentRatingAustraliaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingAustraliaMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingAustraliaTelevisionType) + SetMovieRating(value *RatingAustraliaMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingAustraliaTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_canada.go b/src/internal/connector/graph/betasdk/models/media_content_rating_canada.go new file mode 100644 index 000000000..d97abd4d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_canada.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingCanada +type MediaContentRatingCanada struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in Canada + movieRating *RatingCanadaMoviesType + // The OdataType property + odataType *string + // TV content rating labels in Canada + tvRating *RatingCanadaTelevisionType +} +// NewMediaContentRatingCanada instantiates a new mediaContentRatingCanada and sets the default values. +func NewMediaContentRatingCanada()(*MediaContentRatingCanada) { + m := &MediaContentRatingCanada{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingCanadaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingCanadaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingCanada(), 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 *MediaContentRatingCanada) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingCanada) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingCanadaMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingCanadaMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingCanadaTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingCanadaTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in Canada +func (m *MediaContentRatingCanada) GetMovieRating()(*RatingCanadaMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingCanada) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in Canada +func (m *MediaContentRatingCanada) GetTvRating()(*RatingCanadaTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingCanada) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingCanada) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in Canada +func (m *MediaContentRatingCanada) SetMovieRating(value *RatingCanadaMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingCanada) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in Canada +func (m *MediaContentRatingCanada) SetTvRating(value *RatingCanadaTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_canadaable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_canadaable.go new file mode 100644 index 000000000..0629de1e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_canadaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingCanadaable +type MediaContentRatingCanadaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingCanadaMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingCanadaTelevisionType) + SetMovieRating(value *RatingCanadaMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingCanadaTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_france.go b/src/internal/connector/graph/betasdk/models/media_content_rating_france.go new file mode 100644 index 000000000..f2bbeafd1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_france.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingFrance +type MediaContentRatingFrance struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in France + movieRating *RatingFranceMoviesType + // The OdataType property + odataType *string + // TV content rating labels in France + tvRating *RatingFranceTelevisionType +} +// NewMediaContentRatingFrance instantiates a new mediaContentRatingFrance and sets the default values. +func NewMediaContentRatingFrance()(*MediaContentRatingFrance) { + m := &MediaContentRatingFrance{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingFranceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingFranceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingFrance(), 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 *MediaContentRatingFrance) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingFrance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingFranceMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingFranceMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingFranceTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingFranceTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in France +func (m *MediaContentRatingFrance) GetMovieRating()(*RatingFranceMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingFrance) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in France +func (m *MediaContentRatingFrance) GetTvRating()(*RatingFranceTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingFrance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingFrance) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in France +func (m *MediaContentRatingFrance) SetMovieRating(value *RatingFranceMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingFrance) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in France +func (m *MediaContentRatingFrance) SetTvRating(value *RatingFranceTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_franceable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_franceable.go new file mode 100644 index 000000000..af990683d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_franceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingFranceable +type MediaContentRatingFranceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingFranceMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingFranceTelevisionType) + SetMovieRating(value *RatingFranceMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingFranceTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_germany.go b/src/internal/connector/graph/betasdk/models/media_content_rating_germany.go new file mode 100644 index 000000000..c3432781a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_germany.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingGermany +type MediaContentRatingGermany struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in Germany + movieRating *RatingGermanyMoviesType + // The OdataType property + odataType *string + // TV content rating labels in Germany + tvRating *RatingGermanyTelevisionType +} +// NewMediaContentRatingGermany instantiates a new mediaContentRatingGermany and sets the default values. +func NewMediaContentRatingGermany()(*MediaContentRatingGermany) { + m := &MediaContentRatingGermany{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingGermanyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingGermanyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingGermany(), 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 *MediaContentRatingGermany) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingGermany) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingGermanyMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingGermanyMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingGermanyTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingGermanyTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in Germany +func (m *MediaContentRatingGermany) GetMovieRating()(*RatingGermanyMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingGermany) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in Germany +func (m *MediaContentRatingGermany) GetTvRating()(*RatingGermanyTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingGermany) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingGermany) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in Germany +func (m *MediaContentRatingGermany) SetMovieRating(value *RatingGermanyMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingGermany) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in Germany +func (m *MediaContentRatingGermany) SetTvRating(value *RatingGermanyTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_germanyable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_germanyable.go new file mode 100644 index 000000000..931fd38c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_germanyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingGermanyable +type MediaContentRatingGermanyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingGermanyMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingGermanyTelevisionType) + SetMovieRating(value *RatingGermanyMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingGermanyTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_ireland.go b/src/internal/connector/graph/betasdk/models/media_content_rating_ireland.go new file mode 100644 index 000000000..7f4807f06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_ireland.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingIreland +type MediaContentRatingIreland struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in Ireland + movieRating *RatingIrelandMoviesType + // The OdataType property + odataType *string + // TV content rating labels in Ireland + tvRating *RatingIrelandTelevisionType +} +// NewMediaContentRatingIreland instantiates a new mediaContentRatingIreland and sets the default values. +func NewMediaContentRatingIreland()(*MediaContentRatingIreland) { + m := &MediaContentRatingIreland{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingIrelandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingIrelandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingIreland(), 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 *MediaContentRatingIreland) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingIreland) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingIrelandMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingIrelandMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingIrelandTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingIrelandTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in Ireland +func (m *MediaContentRatingIreland) GetMovieRating()(*RatingIrelandMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingIreland) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in Ireland +func (m *MediaContentRatingIreland) GetTvRating()(*RatingIrelandTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingIreland) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingIreland) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in Ireland +func (m *MediaContentRatingIreland) SetMovieRating(value *RatingIrelandMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingIreland) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in Ireland +func (m *MediaContentRatingIreland) SetTvRating(value *RatingIrelandTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_irelandable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_irelandable.go new file mode 100644 index 000000000..8dab8573a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_irelandable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingIrelandable +type MediaContentRatingIrelandable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingIrelandMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingIrelandTelevisionType) + SetMovieRating(value *RatingIrelandMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingIrelandTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_japan.go b/src/internal/connector/graph/betasdk/models/media_content_rating_japan.go new file mode 100644 index 000000000..1e7ac4f65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_japan.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingJapan +type MediaContentRatingJapan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in Japan + movieRating *RatingJapanMoviesType + // The OdataType property + odataType *string + // TV content rating labels in Japan + tvRating *RatingJapanTelevisionType +} +// NewMediaContentRatingJapan instantiates a new mediaContentRatingJapan and sets the default values. +func NewMediaContentRatingJapan()(*MediaContentRatingJapan) { + m := &MediaContentRatingJapan{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingJapanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingJapanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingJapan(), 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 *MediaContentRatingJapan) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingJapan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingJapanMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingJapanMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingJapanTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingJapanTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in Japan +func (m *MediaContentRatingJapan) GetMovieRating()(*RatingJapanMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingJapan) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in Japan +func (m *MediaContentRatingJapan) GetTvRating()(*RatingJapanTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingJapan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingJapan) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in Japan +func (m *MediaContentRatingJapan) SetMovieRating(value *RatingJapanMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingJapan) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in Japan +func (m *MediaContentRatingJapan) SetTvRating(value *RatingJapanTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_japanable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_japanable.go new file mode 100644 index 000000000..909635fb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_japanable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingJapanable +type MediaContentRatingJapanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingJapanMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingJapanTelevisionType) + SetMovieRating(value *RatingJapanMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingJapanTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealand.go b/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealand.go new file mode 100644 index 000000000..fb18bd338 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealand.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingNewZealand +type MediaContentRatingNewZealand struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in New Zealand + movieRating *RatingNewZealandMoviesType + // The OdataType property + odataType *string + // TV content rating labels in New Zealand + tvRating *RatingNewZealandTelevisionType +} +// NewMediaContentRatingNewZealand instantiates a new mediaContentRatingNewZealand and sets the default values. +func NewMediaContentRatingNewZealand()(*MediaContentRatingNewZealand) { + m := &MediaContentRatingNewZealand{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingNewZealandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingNewZealandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingNewZealand(), 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 *MediaContentRatingNewZealand) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingNewZealand) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingNewZealandMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingNewZealandMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingNewZealandTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingNewZealandTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in New Zealand +func (m *MediaContentRatingNewZealand) GetMovieRating()(*RatingNewZealandMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingNewZealand) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in New Zealand +func (m *MediaContentRatingNewZealand) GetTvRating()(*RatingNewZealandTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingNewZealand) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingNewZealand) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in New Zealand +func (m *MediaContentRatingNewZealand) SetMovieRating(value *RatingNewZealandMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingNewZealand) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in New Zealand +func (m *MediaContentRatingNewZealand) SetTvRating(value *RatingNewZealandTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealandable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealandable.go new file mode 100644 index 000000000..5ddf70ff8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_new_zealandable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingNewZealandable +type MediaContentRatingNewZealandable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingNewZealandMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingNewZealandTelevisionType) + SetMovieRating(value *RatingNewZealandMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingNewZealandTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdom.go b/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdom.go new file mode 100644 index 000000000..7859f5a8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdom.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingUnitedKingdom +type MediaContentRatingUnitedKingdom struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in United Kingdom + movieRating *RatingUnitedKingdomMoviesType + // The OdataType property + odataType *string + // TV content rating labels in United Kingdom + tvRating *RatingUnitedKingdomTelevisionType +} +// NewMediaContentRatingUnitedKingdom instantiates a new mediaContentRatingUnitedKingdom and sets the default values. +func NewMediaContentRatingUnitedKingdom()(*MediaContentRatingUnitedKingdom) { + m := &MediaContentRatingUnitedKingdom{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingUnitedKingdomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingUnitedKingdomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingUnitedKingdom(), 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 *MediaContentRatingUnitedKingdom) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingUnitedKingdom) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingUnitedKingdomMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingUnitedKingdomMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingUnitedKingdomTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingUnitedKingdomTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in United Kingdom +func (m *MediaContentRatingUnitedKingdom) GetMovieRating()(*RatingUnitedKingdomMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingUnitedKingdom) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in United Kingdom +func (m *MediaContentRatingUnitedKingdom) GetTvRating()(*RatingUnitedKingdomTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingUnitedKingdom) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingUnitedKingdom) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in United Kingdom +func (m *MediaContentRatingUnitedKingdom) SetMovieRating(value *RatingUnitedKingdomMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingUnitedKingdom) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in United Kingdom +func (m *MediaContentRatingUnitedKingdom) SetTvRating(value *RatingUnitedKingdomTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdomable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdomable.go new file mode 100644 index 000000000..dd7df4751 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_united_kingdomable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingUnitedKingdomable +type MediaContentRatingUnitedKingdomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingUnitedKingdomMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingUnitedKingdomTelevisionType) + SetMovieRating(value *RatingUnitedKingdomMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingUnitedKingdomTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_united_states.go b/src/internal/connector/graph/betasdk/models/media_content_rating_united_states.go new file mode 100644 index 000000000..3c09dac78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_united_states.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingUnitedStates +type MediaContentRatingUnitedStates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Movies rating labels in United States + movieRating *RatingUnitedStatesMoviesType + // The OdataType property + odataType *string + // TV content rating labels in United States + tvRating *RatingUnitedStatesTelevisionType +} +// NewMediaContentRatingUnitedStates instantiates a new mediaContentRatingUnitedStates and sets the default values. +func NewMediaContentRatingUnitedStates()(*MediaContentRatingUnitedStates) { + m := &MediaContentRatingUnitedStates{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaContentRatingUnitedStatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaContentRatingUnitedStatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaContentRatingUnitedStates(), 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 *MediaContentRatingUnitedStates) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaContentRatingUnitedStates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["movieRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingUnitedStatesMoviesType) + if err != nil { + return err + } + if val != nil { + m.SetMovieRating(val.(*RatingUnitedStatesMoviesType)) + } + 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["tvRating"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRatingUnitedStatesTelevisionType) + if err != nil { + return err + } + if val != nil { + m.SetTvRating(val.(*RatingUnitedStatesTelevisionType)) + } + return nil + } + return res +} +// GetMovieRating gets the movieRating property value. Movies rating labels in United States +func (m *MediaContentRatingUnitedStates) GetMovieRating()(*RatingUnitedStatesMoviesType) { + return m.movieRating +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaContentRatingUnitedStates) GetOdataType()(*string) { + return m.odataType +} +// GetTvRating gets the tvRating property value. TV content rating labels in United States +func (m *MediaContentRatingUnitedStates) GetTvRating()(*RatingUnitedStatesTelevisionType) { + return m.tvRating +} +// Serialize serializes information the current object +func (m *MediaContentRatingUnitedStates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMovieRating() != nil { + cast := (*m.GetMovieRating()).String() + err := writer.WriteStringValue("movieRating", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTvRating() != nil { + cast := (*m.GetTvRating()).String() + err := writer.WriteStringValue("tvRating", &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 *MediaContentRatingUnitedStates) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMovieRating sets the movieRating property value. Movies rating labels in United States +func (m *MediaContentRatingUnitedStates) SetMovieRating(value *RatingUnitedStatesMoviesType)() { + m.movieRating = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaContentRatingUnitedStates) SetOdataType(value *string)() { + m.odataType = value +} +// SetTvRating sets the tvRating property value. TV content rating labels in United States +func (m *MediaContentRatingUnitedStates) SetTvRating(value *RatingUnitedStatesTelevisionType)() { + m.tvRating = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_content_rating_united_statesable.go b/src/internal/connector/graph/betasdk/models/media_content_rating_united_statesable.go new file mode 100644 index 000000000..9a3ae0ad6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_content_rating_united_statesable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaContentRatingUnitedStatesable +type MediaContentRatingUnitedStatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMovieRating()(*RatingUnitedStatesMoviesType) + GetOdataType()(*string) + GetTvRating()(*RatingUnitedStatesTelevisionType) + SetMovieRating(value *RatingUnitedStatesMoviesType)() + SetOdataType(value *string)() + SetTvRating(value *RatingUnitedStatesTelevisionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_direction.go b/src/internal/connector/graph/betasdk/models/media_direction.go new file mode 100644 index 000000000..7a002f808 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_direction.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MediaDirection int + +const ( + INACTIVE_MEDIADIRECTION MediaDirection = iota + SENDONLY_MEDIADIRECTION + RECEIVEONLY_MEDIADIRECTION + SENDRECEIVE_MEDIADIRECTION +) + +func (i MediaDirection) String() string { + return []string{"inactive", "sendOnly", "receiveOnly", "sendReceive"}[i] +} +func ParseMediaDirection(v string) (interface{}, error) { + result := INACTIVE_MEDIADIRECTION + switch v { + case "inactive": + result = INACTIVE_MEDIADIRECTION + case "sendOnly": + result = SENDONLY_MEDIADIRECTION + case "receiveOnly": + result = RECEIVEONLY_MEDIADIRECTION + case "sendReceive": + result = SENDRECEIVE_MEDIADIRECTION + default: + return 0, errors.New("Unknown MediaDirection value: " + v) + } + return &result, nil +} +func SerializeMediaDirection(values []MediaDirection) []string { + 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/media_info.go b/src/internal/connector/graph/betasdk/models/media_info.go new file mode 100644 index 000000000..9eaf4c599 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_info.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaInfo +type MediaInfo 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 OdataType property + odataType *string + // Optional, used to uniquely identity the resource. If passed the prompt uri will be cached against this resourceId as key. + resourceId *string + // Path to the prompt to be played. Currently only Wave file (.wav) format, single-channel, 16-bit samples with a 16,000 (16KHz) sampling rate is only supported. + uri *string +} +// NewMediaInfo instantiates a new mediaInfo and sets the default values. +func NewMediaInfo()(*MediaInfo) { + m := &MediaInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaInfo(), 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 *MediaInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaInfo) GetOdataType()(*string) { + return m.odataType +} +// GetResourceId gets the resourceId property value. Optional, used to uniquely identity the resource. If passed the prompt uri will be cached against this resourceId as key. +func (m *MediaInfo) GetResourceId()(*string) { + return m.resourceId +} +// GetUri gets the uri property value. Path to the prompt to be played. Currently only Wave file (.wav) format, single-channel, 16-bit samples with a 16,000 (16KHz) sampling rate is only supported. +func (m *MediaInfo) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *MediaInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("uri", m.GetUri()) + 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 *MediaInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceId sets the resourceId property value. Optional, used to uniquely identity the resource. If passed the prompt uri will be cached against this resourceId as key. +func (m *MediaInfo) SetResourceId(value *string)() { + m.resourceId = value +} +// SetUri sets the uri property value. Path to the prompt to be played. Currently only Wave file (.wav) format, single-channel, 16-bit samples with a 16,000 (16KHz) sampling rate is only supported. +func (m *MediaInfo) SetUri(value *string)() { + m.uri = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_info_collection_response.go b/src/internal/connector/graph/betasdk/models/media_info_collection_response.go new file mode 100644 index 000000000..869730590 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaInfoCollectionResponse +type MediaInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MediaInfoable +} +// NewMediaInfoCollectionResponse instantiates a new MediaInfoCollectionResponse and sets the default values. +func NewMediaInfoCollectionResponse()(*MediaInfoCollectionResponse) { + m := &MediaInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMediaInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaInfoable, len(val)) + for i, v := range val { + res[i] = v.(MediaInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MediaInfoCollectionResponse) GetValue()([]MediaInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *MediaInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MediaInfoCollectionResponse) SetValue(value []MediaInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/media_info_collection_responseable.go new file mode 100644 index 000000000..03a71996f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaInfoCollectionResponseable +type MediaInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MediaInfoable) + SetValue(value []MediaInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_infoable.go b/src/internal/connector/graph/betasdk/models/media_infoable.go new file mode 100644 index 000000000..32bc67460 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaInfoable +type MediaInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetResourceId()(*string) + GetUri()(*string) + SetOdataType(value *string)() + SetResourceId(value *string)() + SetUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_source.go b/src/internal/connector/graph/betasdk/models/media_source.go new file mode 100644 index 000000000..9d46dec52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_source.go @@ -0,0 +1,98 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaSource +type MediaSource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enumeration value that indicates the media content category. + contentCategory *MediaSourceContentCategory + // The OdataType property + odataType *string +} +// NewMediaSource instantiates a new mediaSource and sets the default values. +func NewMediaSource()(*MediaSource) { + m := &MediaSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaSource(), 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 *MediaSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContentCategory gets the contentCategory property value. Enumeration value that indicates the media content category. +func (m *MediaSource) GetContentCategory()(*MediaSourceContentCategory) { + return m.contentCategory +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contentCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMediaSourceContentCategory) + if err != nil { + return err + } + if val != nil { + m.SetContentCategory(val.(*MediaSourceContentCategory)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaSource) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MediaSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContentCategory() != nil { + cast := (*m.GetContentCategory()).String() + err := writer.WriteStringValue("contentCategory", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MediaSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContentCategory sets the contentCategory property value. Enumeration value that indicates the media content category. +func (m *MediaSource) SetContentCategory(value *MediaSourceContentCategory)() { + m.contentCategory = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaSource) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_source_content_category.go b/src/internal/connector/graph/betasdk/models/media_source_content_category.go new file mode 100644 index 000000000..badcf59f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_source_content_category.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MediaSourceContentCategory int + +const ( + MEETING_MEDIASOURCECONTENTCATEGORY MediaSourceContentCategory = iota + LIVESTREAM_MEDIASOURCECONTENTCATEGORY + PRESENTATION_MEDIASOURCECONTENTCATEGORY + SCREENRECORDING_MEDIASOURCECONTENTCATEGORY + UNKNOWNFUTUREVALUE_MEDIASOURCECONTENTCATEGORY +) + +func (i MediaSourceContentCategory) String() string { + return []string{"meeting", "liveStream", "presentation", "screenRecording", "unknownFutureValue"}[i] +} +func ParseMediaSourceContentCategory(v string) (interface{}, error) { + result := MEETING_MEDIASOURCECONTENTCATEGORY + switch v { + case "meeting": + result = MEETING_MEDIASOURCECONTENTCATEGORY + case "liveStream": + result = LIVESTREAM_MEDIASOURCECONTENTCATEGORY + case "presentation": + result = PRESENTATION_MEDIASOURCECONTENTCATEGORY + case "screenRecording": + result = SCREENRECORDING_MEDIASOURCECONTENTCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MEDIASOURCECONTENTCATEGORY + default: + return 0, errors.New("Unknown MediaSourceContentCategory value: " + v) + } + return &result, nil +} +func SerializeMediaSourceContentCategory(values []MediaSourceContentCategory) []string { + 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/media_sourceable.go b/src/internal/connector/graph/betasdk/models/media_sourceable.go new file mode 100644 index 000000000..36ec187e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_sourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaSourceable +type MediaSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentCategory()(*MediaSourceContentCategory) + GetOdataType()(*string) + SetContentCategory(value *MediaSourceContentCategory)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_state.go b/src/internal/connector/graph/betasdk/models/media_state.go new file mode 100644 index 000000000..5b85b772e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_state.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MediaState int + +const ( + ACTIVE_MEDIASTATE MediaState = iota + INACTIVE_MEDIASTATE + UNKNOWNFUTUREVALUE_MEDIASTATE +) + +func (i MediaState) String() string { + return []string{"active", "inactive", "unknownFutureValue"}[i] +} +func ParseMediaState(v string) (interface{}, error) { + result := ACTIVE_MEDIASTATE + switch v { + case "active": + result = ACTIVE_MEDIASTATE + case "inactive": + result = INACTIVE_MEDIASTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MEDIASTATE + default: + return 0, errors.New("Unknown MediaState value: " + v) + } + return &result, nil +} +func SerializeMediaState(values []MediaState) []string { + 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/media_stream.go b/src/internal/connector/graph/betasdk/models/media_stream.go new file mode 100644 index 000000000..d5cbe93d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_stream.go @@ -0,0 +1,203 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStream +type MediaStream 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 direction property + direction *MediaDirection + // The media stream label. + label *string + // The mediaType property + mediaType *Modality + // The OdataType property + odataType *string + // Indicates whether the media is muted by the server. + serverMuted *bool + // The source ID. + sourceId *string +} +// NewMediaStream instantiates a new mediaStream and sets the default values. +func NewMediaStream()(*MediaStream) { + m := &MediaStream{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMediaStreamFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaStreamFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaStream(), 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 *MediaStream) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDirection gets the direction property value. The direction property +func (m *MediaStream) GetDirection()(*MediaDirection) { + return m.direction +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaStream) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["direction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMediaDirection) + if err != nil { + return err + } + if val != nil { + m.SetDirection(val.(*MediaDirection)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseModality) + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val.(*Modality)) + } + 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["serverMuted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetServerMuted(val) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + return res +} +// GetLabel gets the label property value. The media stream label. +func (m *MediaStream) GetLabel()(*string) { + return m.label +} +// GetMediaType gets the mediaType property value. The mediaType property +func (m *MediaStream) GetMediaType()(*Modality) { + return m.mediaType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MediaStream) GetOdataType()(*string) { + return m.odataType +} +// GetServerMuted gets the serverMuted property value. Indicates whether the media is muted by the server. +func (m *MediaStream) GetServerMuted()(*bool) { + return m.serverMuted +} +// GetSourceId gets the sourceId property value. The source ID. +func (m *MediaStream) GetSourceId()(*string) { + return m.sourceId +} +// Serialize serializes information the current object +func (m *MediaStream) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDirection() != nil { + cast := (*m.GetDirection()).String() + err := writer.WriteStringValue("direction", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + if m.GetMediaType() != nil { + cast := (*m.GetMediaType()).String() + err := writer.WriteStringValue("mediaType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("serverMuted", m.GetServerMuted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceId", m.GetSourceId()) + 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 *MediaStream) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDirection sets the direction property value. The direction property +func (m *MediaStream) SetDirection(value *MediaDirection)() { + m.direction = value +} +// SetLabel sets the label property value. The media stream label. +func (m *MediaStream) SetLabel(value *string)() { + m.label = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *MediaStream) SetMediaType(value *Modality)() { + m.mediaType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MediaStream) SetOdataType(value *string)() { + m.odataType = value +} +// SetServerMuted sets the serverMuted property value. Indicates whether the media is muted by the server. +func (m *MediaStream) SetServerMuted(value *bool)() { + m.serverMuted = value +} +// SetSourceId sets the sourceId property value. The source ID. +func (m *MediaStream) SetSourceId(value *string)() { + m.sourceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_stream_collection_response.go b/src/internal/connector/graph/betasdk/models/media_stream_collection_response.go new file mode 100644 index 000000000..0efa0e576 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_stream_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStreamCollectionResponse +type MediaStreamCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MediaStreamable +} +// NewMediaStreamCollectionResponse instantiates a new MediaStreamCollectionResponse and sets the default values. +func NewMediaStreamCollectionResponse()(*MediaStreamCollectionResponse) { + m := &MediaStreamCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMediaStreamCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMediaStreamCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMediaStreamCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MediaStreamCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaStreamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaStreamable, len(val)) + for i, v := range val { + res[i] = v.(MediaStreamable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MediaStreamCollectionResponse) GetValue()([]MediaStreamable) { + return m.value +} +// Serialize serializes information the current object +func (m *MediaStreamCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MediaStreamCollectionResponse) SetValue(value []MediaStreamable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/media_stream_collection_responseable.go b/src/internal/connector/graph/betasdk/models/media_stream_collection_responseable.go new file mode 100644 index 000000000..9162be102 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_stream_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStreamCollectionResponseable +type MediaStreamCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MediaStreamable) + SetValue(value []MediaStreamable)() +} diff --git a/src/internal/connector/graph/betasdk/models/media_streamable.go b/src/internal/connector/graph/betasdk/models/media_streamable.go new file mode 100644 index 000000000..57ae4a8b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/media_streamable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MediaStreamable +type MediaStreamable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDirection()(*MediaDirection) + GetLabel()(*string) + GetMediaType()(*Modality) + GetOdataType()(*string) + GetServerMuted()(*bool) + GetSourceId()(*string) + SetDirection(value *MediaDirection)() + SetLabel(value *string)() + SetMediaType(value *Modality)() + SetOdataType(value *string)() + SetServerMuted(value *bool)() + SetSourceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mediaable.go b/src/internal/connector/graph/betasdk/models/mediaable.go new file mode 100644 index 000000000..91db08671 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mediaable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Mediaable +type Mediaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsTranscriptionShown()(*bool) + GetMediaSource()(MediaSourceable) + GetOdataType()(*string) + SetIsTranscriptionShown(value *bool)() + SetMediaSource(value MediaSourceable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_activity_statistics.go b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics.go new file mode 100644 index 000000000..afb52e261 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingActivityStatistics +type MeetingActivityStatistics struct { + ActivityStatistics + // Time spent on meetings outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. + afterHours *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Time spent in conflicting meetings (meetings that overlap with other meetings that the person accepted and where the person’s status is set to Busy). The value is represented in ISO 8601 format for durations. + conflicting *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Time spent in long meetings (more than an hour in duration). The value is represented in ISO 8601 format for durations. + long *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Time spent in meetings where the person was multitasking (read/sent more than a minimum number of emails and/or sent more than a minimum number of messages in Teams or in Skype for Business). The value is represented in ISO 8601 format for durations. + multitasking *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Time spent in meetings organized by the user. The value is represented in ISO 8601 format for durations. + organized *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Time spent on recurring meetings. The value is represented in ISO 8601 format for durations. + recurring *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewMeetingActivityStatistics instantiates a new MeetingActivityStatistics and sets the default values. +func NewMeetingActivityStatistics()(*MeetingActivityStatistics) { + m := &MeetingActivityStatistics{ + ActivityStatistics: *NewActivityStatistics(), + } + odataTypeValue := "#microsoft.graph.meetingActivityStatistics"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMeetingActivityStatisticsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingActivityStatisticsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingActivityStatistics(), nil +} +// GetAfterHours gets the afterHours property value. Time spent on meetings outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.afterHours +} +// GetConflicting gets the conflicting property value. Time spent in conflicting meetings (meetings that overlap with other meetings that the person accepted and where the person’s status is set to Busy). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetConflicting()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.conflicting +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingActivityStatistics) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ActivityStatistics.GetFieldDeserializers() + res["afterHours"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAfterHours(val) + } + return nil + } + res["conflicting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetConflicting(val) + } + return nil + } + res["long"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetLong(val) + } + return nil + } + res["multitasking"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMultitasking(val) + } + return nil + } + res["organized"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetOrganized(val) + } + return nil + } + res["recurring"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetRecurring(val) + } + return nil + } + return res +} +// GetLong gets the long property value. Time spent in long meetings (more than an hour in duration). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetLong()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.long +} +// GetMultitasking gets the multitasking property value. Time spent in meetings where the person was multitasking (read/sent more than a minimum number of emails and/or sent more than a minimum number of messages in Teams or in Skype for Business). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetMultitasking()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.multitasking +} +// GetOrganized gets the organized property value. Time spent in meetings organized by the user. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetOrganized()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.organized +} +// GetRecurring gets the recurring property value. Time spent on recurring meetings. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) GetRecurring()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.recurring +} +// Serialize serializes information the current object +func (m *MeetingActivityStatistics) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ActivityStatistics.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("afterHours", m.GetAfterHours()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("conflicting", m.GetConflicting()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("long", m.GetLong()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("multitasking", m.GetMultitasking()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("organized", m.GetOrganized()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("recurring", m.GetRecurring()) + if err != nil { + return err + } + } + return nil +} +// SetAfterHours sets the afterHours property value. Time spent on meetings outside of working hours, which is based on the user's Outlook calendar setting for work hours. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.afterHours = value +} +// SetConflicting sets the conflicting property value. Time spent in conflicting meetings (meetings that overlap with other meetings that the person accepted and where the person’s status is set to Busy). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetConflicting(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.conflicting = value +} +// SetLong sets the long property value. Time spent in long meetings (more than an hour in duration). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetLong(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.long = value +} +// SetMultitasking sets the multitasking property value. Time spent in meetings where the person was multitasking (read/sent more than a minimum number of emails and/or sent more than a minimum number of messages in Teams or in Skype for Business). The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetMultitasking(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.multitasking = value +} +// SetOrganized sets the organized property value. Time spent in meetings organized by the user. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetOrganized(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.organized = value +} +// SetRecurring sets the recurring property value. Time spent on recurring meetings. The value is represented in ISO 8601 format for durations. +func (m *MeetingActivityStatistics) SetRecurring(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.recurring = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_response.go new file mode 100644 index 000000000..c035609d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingActivityStatisticsCollectionResponse +type MeetingActivityStatisticsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingActivityStatisticsable +} +// NewMeetingActivityStatisticsCollectionResponse instantiates a new MeetingActivityStatisticsCollectionResponse and sets the default values. +func NewMeetingActivityStatisticsCollectionResponse()(*MeetingActivityStatisticsCollectionResponse) { + m := &MeetingActivityStatisticsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingActivityStatisticsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingActivityStatisticsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingActivityStatisticsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingActivityStatisticsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingActivityStatisticsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingActivityStatisticsable, len(val)) + for i, v := range val { + res[i] = v.(MeetingActivityStatisticsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingActivityStatisticsCollectionResponse) GetValue()([]MeetingActivityStatisticsable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingActivityStatisticsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingActivityStatisticsCollectionResponse) SetValue(value []MeetingActivityStatisticsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_responseable.go new file mode 100644 index 000000000..5f0f53340 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_activity_statistics_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingActivityStatisticsCollectionResponseable +type MeetingActivityStatisticsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingActivityStatisticsable) + SetValue(value []MeetingActivityStatisticsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_activity_statisticsable.go b/src/internal/connector/graph/betasdk/models/meeting_activity_statisticsable.go new file mode 100644 index 000000000..33fc051c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_activity_statisticsable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingActivityStatisticsable +type MeetingActivityStatisticsable interface { + ActivityStatisticsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAfterHours()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetConflicting()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetLong()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetMultitasking()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOrganized()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetRecurring()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAfterHours(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetConflicting(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetLong(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetMultitasking(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOrganized(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetRecurring(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_attendance_report.go b/src/internal/connector/graph/betasdk/models/meeting_attendance_report.go new file mode 100644 index 000000000..98e6546e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_attendance_report.go @@ -0,0 +1,147 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingAttendanceReport provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingAttendanceReport struct { + Entity + // List of attendance records of an attendance report. Read-only. + attendanceRecords []AttendanceRecordable + // UTC time when the meeting ended. Read-only. + meetingEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // UTC time when the meeting started. Read-only. + meetingStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Total number of participants. Read-only. + totalParticipantCount *int32 +} +// NewMeetingAttendanceReport instantiates a new meetingAttendanceReport and sets the default values. +func NewMeetingAttendanceReport()(*MeetingAttendanceReport) { + m := &MeetingAttendanceReport{ + Entity: *NewEntity(), + } + return m +} +// CreateMeetingAttendanceReportFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingAttendanceReportFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingAttendanceReport(), nil +} +// GetAttendanceRecords gets the attendanceRecords property value. List of attendance records of an attendance report. Read-only. +func (m *MeetingAttendanceReport) GetAttendanceRecords()([]AttendanceRecordable) { + return m.attendanceRecords +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingAttendanceReport) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["attendanceRecords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendanceRecordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendanceRecordable, len(val)) + for i, v := range val { + res[i] = v.(AttendanceRecordable) + } + m.SetAttendanceRecords(res) + } + return nil + } + res["meetingEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMeetingEndDateTime(val) + } + return nil + } + res["meetingStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMeetingStartDateTime(val) + } + return nil + } + res["totalParticipantCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalParticipantCount(val) + } + return nil + } + return res +} +// GetMeetingEndDateTime gets the meetingEndDateTime property value. UTC time when the meeting ended. Read-only. +func (m *MeetingAttendanceReport) GetMeetingEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.meetingEndDateTime +} +// GetMeetingStartDateTime gets the meetingStartDateTime property value. UTC time when the meeting started. Read-only. +func (m *MeetingAttendanceReport) GetMeetingStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.meetingStartDateTime +} +// GetTotalParticipantCount gets the totalParticipantCount property value. Total number of participants. Read-only. +func (m *MeetingAttendanceReport) GetTotalParticipantCount()(*int32) { + return m.totalParticipantCount +} +// Serialize serializes information the current object +func (m *MeetingAttendanceReport) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAttendanceRecords() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendanceRecords())) + for i, v := range m.GetAttendanceRecords() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attendanceRecords", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("meetingEndDateTime", m.GetMeetingEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("meetingStartDateTime", m.GetMeetingStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalParticipantCount", m.GetTotalParticipantCount()) + if err != nil { + return err + } + } + return nil +} +// SetAttendanceRecords sets the attendanceRecords property value. List of attendance records of an attendance report. Read-only. +func (m *MeetingAttendanceReport) SetAttendanceRecords(value []AttendanceRecordable)() { + m.attendanceRecords = value +} +// SetMeetingEndDateTime sets the meetingEndDateTime property value. UTC time when the meeting ended. Read-only. +func (m *MeetingAttendanceReport) SetMeetingEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.meetingEndDateTime = value +} +// SetMeetingStartDateTime sets the meetingStartDateTime property value. UTC time when the meeting started. Read-only. +func (m *MeetingAttendanceReport) SetMeetingStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.meetingStartDateTime = value +} +// SetTotalParticipantCount sets the totalParticipantCount property value. Total number of participants. Read-only. +func (m *MeetingAttendanceReport) SetTotalParticipantCount(value *int32)() { + m.totalParticipantCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_response.go new file mode 100644 index 000000000..8d2776b31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingAttendanceReportCollectionResponse +type MeetingAttendanceReportCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingAttendanceReportable +} +// NewMeetingAttendanceReportCollectionResponse instantiates a new MeetingAttendanceReportCollectionResponse and sets the default values. +func NewMeetingAttendanceReportCollectionResponse()(*MeetingAttendanceReportCollectionResponse) { + m := &MeetingAttendanceReportCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingAttendanceReportCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingAttendanceReportCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingAttendanceReportCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingAttendanceReportCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingAttendanceReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingAttendanceReportable, len(val)) + for i, v := range val { + res[i] = v.(MeetingAttendanceReportable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingAttendanceReportCollectionResponse) GetValue()([]MeetingAttendanceReportable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingAttendanceReportCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingAttendanceReportCollectionResponse) SetValue(value []MeetingAttendanceReportable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_responseable.go new file mode 100644 index 000000000..124210fd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_attendance_report_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingAttendanceReportCollectionResponseable +type MeetingAttendanceReportCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingAttendanceReportable) + SetValue(value []MeetingAttendanceReportable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_attendance_reportable.go b/src/internal/connector/graph/betasdk/models/meeting_attendance_reportable.go new file mode 100644 index 000000000..a4b1c0860 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_attendance_reportable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingAttendanceReportable +type MeetingAttendanceReportable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendanceRecords()([]AttendanceRecordable) + GetMeetingEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMeetingStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTotalParticipantCount()(*int32) + SetAttendanceRecords(value []AttendanceRecordable)() + SetMeetingEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMeetingStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTotalParticipantCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_audience.go b/src/internal/connector/graph/betasdk/models/meeting_audience.go new file mode 100644 index 000000000..de8206ea6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_audience.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingAudience int + +const ( + EVERYONE_MEETINGAUDIENCE MeetingAudience = iota + ORGANIZATION_MEETINGAUDIENCE + UNKNOWNFUTUREVALUE_MEETINGAUDIENCE +) + +func (i MeetingAudience) String() string { + return []string{"everyone", "organization", "unknownFutureValue"}[i] +} +func ParseMeetingAudience(v string) (interface{}, error) { + result := EVERYONE_MEETINGAUDIENCE + switch v { + case "everyone": + result = EVERYONE_MEETINGAUDIENCE + case "organization": + result = ORGANIZATION_MEETINGAUDIENCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MEETINGAUDIENCE + default: + return 0, errors.New("Unknown MeetingAudience value: " + v) + } + return &result, nil +} +func SerializeMeetingAudience(values []MeetingAudience) []string { + 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/meeting_capabilities.go b/src/internal/connector/graph/betasdk/models/meeting_capabilities.go new file mode 100644 index 000000000..ad089d10c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_capabilities.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingCapabilities int + +const ( + QUESTIONANDANSWER_MEETINGCAPABILITIES MeetingCapabilities = iota + UNKNOWNFUTUREVALUE_MEETINGCAPABILITIES +) + +func (i MeetingCapabilities) String() string { + return []string{"questionAndAnswer", "unknownFutureValue"}[i] +} +func ParseMeetingCapabilities(v string) (interface{}, error) { + result := QUESTIONANDANSWER_MEETINGCAPABILITIES + switch v { + case "questionAndAnswer": + result = QUESTIONANDANSWER_MEETINGCAPABILITIES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MEETINGCAPABILITIES + default: + return 0, errors.New("Unknown MeetingCapabilities value: " + v) + } + return &result, nil +} +func SerializeMeetingCapabilities(values []MeetingCapabilities) []string { + 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/meeting_capability.go b/src/internal/connector/graph/betasdk/models/meeting_capability.go new file mode 100644 index 000000000..a5ef48e20 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_capability.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingCapability +type MeetingCapability 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 whether anonymous users dialout is allowed in a meeting. + allowAnonymousUsersToDialOut *bool + // Indicates whether anonymous users are allowed to start a meeting. + allowAnonymousUsersToStartMeeting *bool + // The autoAdmittedUsers property + autoAdmittedUsers *AutoAdmittedUsersType + // The OdataType property + odataType *string +} +// NewMeetingCapability instantiates a new meetingCapability and sets the default values. +func NewMeetingCapability()(*MeetingCapability) { + m := &MeetingCapability{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingCapabilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingCapabilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingCapability(), 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 *MeetingCapability) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowAnonymousUsersToDialOut gets the allowAnonymousUsersToDialOut property value. Indicates whether anonymous users dialout is allowed in a meeting. +func (m *MeetingCapability) GetAllowAnonymousUsersToDialOut()(*bool) { + return m.allowAnonymousUsersToDialOut +} +// GetAllowAnonymousUsersToStartMeeting gets the allowAnonymousUsersToStartMeeting property value. Indicates whether anonymous users are allowed to start a meeting. +func (m *MeetingCapability) GetAllowAnonymousUsersToStartMeeting()(*bool) { + return m.allowAnonymousUsersToStartMeeting +} +// GetAutoAdmittedUsers gets the autoAdmittedUsers property value. The autoAdmittedUsers property +func (m *MeetingCapability) GetAutoAdmittedUsers()(*AutoAdmittedUsersType) { + return m.autoAdmittedUsers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingCapability) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowAnonymousUsersToDialOut"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAnonymousUsersToDialOut(val) + } + return nil + } + res["allowAnonymousUsersToStartMeeting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAnonymousUsersToStartMeeting(val) + } + return nil + } + res["autoAdmittedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAutoAdmittedUsersType) + if err != nil { + return err + } + if val != nil { + m.SetAutoAdmittedUsers(val.(*AutoAdmittedUsersType)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingCapability) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MeetingCapability) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowAnonymousUsersToDialOut", m.GetAllowAnonymousUsersToDialOut()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("allowAnonymousUsersToStartMeeting", m.GetAllowAnonymousUsersToStartMeeting()) + if err != nil { + return err + } + } + if m.GetAutoAdmittedUsers() != nil { + cast := (*m.GetAutoAdmittedUsers()).String() + err := writer.WriteStringValue("autoAdmittedUsers", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MeetingCapability) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowAnonymousUsersToDialOut sets the allowAnonymousUsersToDialOut property value. Indicates whether anonymous users dialout is allowed in a meeting. +func (m *MeetingCapability) SetAllowAnonymousUsersToDialOut(value *bool)() { + m.allowAnonymousUsersToDialOut = value +} +// SetAllowAnonymousUsersToStartMeeting sets the allowAnonymousUsersToStartMeeting property value. Indicates whether anonymous users are allowed to start a meeting. +func (m *MeetingCapability) SetAllowAnonymousUsersToStartMeeting(value *bool)() { + m.allowAnonymousUsersToStartMeeting = value +} +// SetAutoAdmittedUsers sets the autoAdmittedUsers property value. The autoAdmittedUsers property +func (m *MeetingCapability) SetAutoAdmittedUsers(value *AutoAdmittedUsersType)() { + m.autoAdmittedUsers = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingCapability) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_capabilityable.go b/src/internal/connector/graph/betasdk/models/meeting_capabilityable.go new file mode 100644 index 000000000..74132cef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_capabilityable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingCapabilityable +type MeetingCapabilityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAnonymousUsersToDialOut()(*bool) + GetAllowAnonymousUsersToStartMeeting()(*bool) + GetAutoAdmittedUsers()(*AutoAdmittedUsersType) + GetOdataType()(*string) + SetAllowAnonymousUsersToDialOut(value *bool)() + SetAllowAnonymousUsersToStartMeeting(value *bool)() + SetAutoAdmittedUsers(value *AutoAdmittedUsersType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_info.go b/src/internal/connector/graph/betasdk/models/meeting_info.go new file mode 100644 index 000000000..e2fda4f92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_info.go @@ -0,0 +1,119 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingInfo +type MeetingInfo 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 allowConversationWithoutHost property + allowConversationWithoutHost *bool + // The OdataType property + odataType *string +} +// NewMeetingInfo instantiates a new meetingInfo and sets the default values. +func NewMeetingInfo()(*MeetingInfo) { + m := &MeetingInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.joinMeetingIdMeetingInfo": + return NewJoinMeetingIdMeetingInfo(), nil + case "#microsoft.graph.organizerMeetingInfo": + return NewOrganizerMeetingInfo(), nil + case "#microsoft.graph.tokenMeetingInfo": + return NewTokenMeetingInfo(), nil + } + } + } + } + return NewMeetingInfo(), 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 *MeetingInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowConversationWithoutHost gets the allowConversationWithoutHost property value. The allowConversationWithoutHost property +func (m *MeetingInfo) GetAllowConversationWithoutHost()(*bool) { + return m.allowConversationWithoutHost +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowConversationWithoutHost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowConversationWithoutHost(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MeetingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowConversationWithoutHost", m.GetAllowConversationWithoutHost()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MeetingInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowConversationWithoutHost sets the allowConversationWithoutHost property value. The allowConversationWithoutHost property +func (m *MeetingInfo) SetAllowConversationWithoutHost(value *bool)() { + m.allowConversationWithoutHost = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_infoable.go b/src/internal/connector/graph/betasdk/models/meeting_infoable.go new file mode 100644 index 000000000..dc5fa149c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingInfoable +type MeetingInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowConversationWithoutHost()(*bool) + GetOdataType()(*string) + SetAllowConversationWithoutHost(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_message_type.go b/src/internal/connector/graph/betasdk/models/meeting_message_type.go new file mode 100644 index 000000000..87259ce27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_message_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingMessageType int + +const ( + NONE_MEETINGMESSAGETYPE MeetingMessageType = iota + MEETINGREQUEST_MEETINGMESSAGETYPE + MEETINGCANCELLED_MEETINGMESSAGETYPE + MEETINGACCEPTED_MEETINGMESSAGETYPE + MEETINGTENTATIVELYACCEPTED_MEETINGMESSAGETYPE + MEETINGDECLINED_MEETINGMESSAGETYPE +) + +func (i MeetingMessageType) String() string { + return []string{"none", "meetingRequest", "meetingCancelled", "meetingAccepted", "meetingTentativelyAccepted", "meetingDeclined"}[i] +} +func ParseMeetingMessageType(v string) (interface{}, error) { + result := NONE_MEETINGMESSAGETYPE + switch v { + case "none": + result = NONE_MEETINGMESSAGETYPE + case "meetingRequest": + result = MEETINGREQUEST_MEETINGMESSAGETYPE + case "meetingCancelled": + result = MEETINGCANCELLED_MEETINGMESSAGETYPE + case "meetingAccepted": + result = MEETINGACCEPTED_MEETINGMESSAGETYPE + case "meetingTentativelyAccepted": + result = MEETINGTENTATIVELYACCEPTED_MEETINGMESSAGETYPE + case "meetingDeclined": + result = MEETINGDECLINED_MEETINGMESSAGETYPE + default: + return 0, errors.New("Unknown MeetingMessageType value: " + v) + } + return &result, nil +} +func SerializeMeetingMessageType(values []MeetingMessageType) []string { + 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/meeting_participant_info.go b/src/internal/connector/graph/betasdk/models/meeting_participant_info.go new file mode 100644 index 000000000..4b35e8b74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participant_info.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipantInfo +type MeetingParticipantInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identity information of the participant. Only the user property is used for onlineMeeting participants. + identity IdentitySetable + // The OdataType property + odataType *string + // Specifies the participant's role in the meeting. + role *OnlineMeetingRole + // User principal name of the participant. + upn *string +} +// NewMeetingParticipantInfo instantiates a new meetingParticipantInfo and sets the default values. +func NewMeetingParticipantInfo()(*MeetingParticipantInfo) { + m := &MeetingParticipantInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingParticipantInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingParticipantInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingParticipantInfo(), 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 *MeetingParticipantInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingParticipantInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentity(val.(IdentitySetable)) + } + 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["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingRole) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*OnlineMeetingRole)) + } + return nil + } + res["upn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpn(val) + } + return nil + } + return res +} +// GetIdentity gets the identity property value. Identity information of the participant. Only the user property is used for onlineMeeting participants. +func (m *MeetingParticipantInfo) GetIdentity()(IdentitySetable) { + return m.identity +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingParticipantInfo) GetOdataType()(*string) { + return m.odataType +} +// GetRole gets the role property value. Specifies the participant's role in the meeting. +func (m *MeetingParticipantInfo) GetRole()(*OnlineMeetingRole) { + return m.role +} +// GetUpn gets the upn property value. User principal name of the participant. +func (m *MeetingParticipantInfo) GetUpn()(*string) { + return m.upn +} +// Serialize serializes information the current object +func (m *MeetingParticipantInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err := writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("upn", m.GetUpn()) + 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 *MeetingParticipantInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdentity sets the identity property value. Identity information of the participant. Only the user property is used for onlineMeeting participants. +func (m *MeetingParticipantInfo) SetIdentity(value IdentitySetable)() { + m.identity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingParticipantInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetRole sets the role property value. Specifies the participant's role in the meeting. +func (m *MeetingParticipantInfo) SetRole(value *OnlineMeetingRole)() { + m.role = value +} +// SetUpn sets the upn property value. User principal name of the participant. +func (m *MeetingParticipantInfo) SetUpn(value *string)() { + m.upn = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_response.go new file mode 100644 index 000000000..748d0927a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipantInfoCollectionResponse +type MeetingParticipantInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingParticipantInfoable +} +// NewMeetingParticipantInfoCollectionResponse instantiates a new MeetingParticipantInfoCollectionResponse and sets the default values. +func NewMeetingParticipantInfoCollectionResponse()(*MeetingParticipantInfoCollectionResponse) { + m := &MeetingParticipantInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingParticipantInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingParticipantInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingParticipantInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingParticipantInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(MeetingParticipantInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingParticipantInfoCollectionResponse) GetValue()([]MeetingParticipantInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingParticipantInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingParticipantInfoCollectionResponse) SetValue(value []MeetingParticipantInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_responseable.go new file mode 100644 index 000000000..e5863e708 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participant_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipantInfoCollectionResponseable +type MeetingParticipantInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingParticipantInfoable) + SetValue(value []MeetingParticipantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_participant_infoable.go b/src/internal/connector/graph/betasdk/models/meeting_participant_infoable.go new file mode 100644 index 000000000..cd59b2afd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participant_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipantInfoable +type MeetingParticipantInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIdentity()(IdentitySetable) + GetOdataType()(*string) + GetRole()(*OnlineMeetingRole) + GetUpn()(*string) + SetIdentity(value IdentitySetable)() + SetOdataType(value *string)() + SetRole(value *OnlineMeetingRole)() + SetUpn(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_participants.go b/src/internal/connector/graph/betasdk/models/meeting_participants.go new file mode 100644 index 000000000..c4d56ca7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participants.go @@ -0,0 +1,199 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipants +type MeetingParticipants struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Information of the meeting attendees. + attendees []MeetingParticipantInfoable + // The contributors property + contributors []MeetingParticipantInfoable + // The OdataType property + odataType *string + // Information of the meeting organizer. + organizer MeetingParticipantInfoable + // The producers property + producers []MeetingParticipantInfoable +} +// NewMeetingParticipants instantiates a new meetingParticipants and sets the default values. +func NewMeetingParticipants()(*MeetingParticipants) { + m := &MeetingParticipants{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingParticipantsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingParticipantsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingParticipants(), 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 *MeetingParticipants) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttendees gets the attendees property value. Information of the meeting attendees. +func (m *MeetingParticipants) GetAttendees()([]MeetingParticipantInfoable) { + return m.attendees +} +// GetContributors gets the contributors property value. The contributors property +func (m *MeetingParticipants) GetContributors()([]MeetingParticipantInfoable) { + return m.contributors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingParticipants) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attendees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(MeetingParticipantInfoable) + } + m.SetAttendees(res) + } + return nil + } + res["contributors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(MeetingParticipantInfoable) + } + m.SetContributors(res) + } + 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["organizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganizer(val.(MeetingParticipantInfoable)) + } + return nil + } + res["producers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingParticipantInfoable, len(val)) + for i, v := range val { + res[i] = v.(MeetingParticipantInfoable) + } + m.SetProducers(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingParticipants) GetOdataType()(*string) { + return m.odataType +} +// GetOrganizer gets the organizer property value. Information of the meeting organizer. +func (m *MeetingParticipants) GetOrganizer()(MeetingParticipantInfoable) { + return m.organizer +} +// GetProducers gets the producers property value. The producers property +func (m *MeetingParticipants) GetProducers()([]MeetingParticipantInfoable) { + return m.producers +} +// Serialize serializes information the current object +func (m *MeetingParticipants) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttendees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendees())) + for i, v := range m.GetAttendees() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("attendees", cast) + if err != nil { + return err + } + } + if m.GetContributors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContributors())) + for i, v := range m.GetContributors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("contributors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("organizer", m.GetOrganizer()) + if err != nil { + return err + } + } + if m.GetProducers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProducers())) + for i, v := range m.GetProducers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("producers", 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 *MeetingParticipants) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttendees sets the attendees property value. Information of the meeting attendees. +func (m *MeetingParticipants) SetAttendees(value []MeetingParticipantInfoable)() { + m.attendees = value +} +// SetContributors sets the contributors property value. The contributors property +func (m *MeetingParticipants) SetContributors(value []MeetingParticipantInfoable)() { + m.contributors = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingParticipants) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrganizer sets the organizer property value. Information of the meeting organizer. +func (m *MeetingParticipants) SetOrganizer(value MeetingParticipantInfoable)() { + m.organizer = value +} +// SetProducers sets the producers property value. The producers property +func (m *MeetingParticipants) SetProducers(value []MeetingParticipantInfoable)() { + m.producers = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_participantsable.go b/src/internal/connector/graph/betasdk/models/meeting_participantsable.go new file mode 100644 index 000000000..7af711574 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_participantsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingParticipantsable +type MeetingParticipantsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendees()([]MeetingParticipantInfoable) + GetContributors()([]MeetingParticipantInfoable) + GetOdataType()(*string) + GetOrganizer()(MeetingParticipantInfoable) + GetProducers()([]MeetingParticipantInfoable) + SetAttendees(value []MeetingParticipantInfoable)() + SetContributors(value []MeetingParticipantInfoable)() + SetOdataType(value *string)() + SetOrganizer(value MeetingParticipantInfoable)() + SetProducers(value []MeetingParticipantInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detail.go b/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detail.go new file mode 100644 index 000000000..8e8f78b19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detail.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingPolicyUpdatedEventMessageDetail +type MeetingPolicyUpdatedEventMessageDetail struct { + EventMessageDetail + // Initiator of the event. + initiator IdentitySetable + // Represents whether the meeting chat is enabled or not. + meetingChatEnabled *bool + // Unique identifier of the meeting chat. + meetingChatId *string +} +// NewMeetingPolicyUpdatedEventMessageDetail instantiates a new MeetingPolicyUpdatedEventMessageDetail and sets the default values. +func NewMeetingPolicyUpdatedEventMessageDetail()(*MeetingPolicyUpdatedEventMessageDetail) { + m := &MeetingPolicyUpdatedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.meetingPolicyUpdatedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMeetingPolicyUpdatedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingPolicyUpdatedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingPolicyUpdatedEventMessageDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingPolicyUpdatedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["meetingChatEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMeetingChatEnabled(val) + } + return nil + } + res["meetingChatId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMeetingChatId(val) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MeetingPolicyUpdatedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMeetingChatEnabled gets the meetingChatEnabled property value. Represents whether the meeting chat is enabled or not. +func (m *MeetingPolicyUpdatedEventMessageDetail) GetMeetingChatEnabled()(*bool) { + return m.meetingChatEnabled +} +// GetMeetingChatId gets the meetingChatId property value. Unique identifier of the meeting chat. +func (m *MeetingPolicyUpdatedEventMessageDetail) GetMeetingChatId()(*string) { + return m.meetingChatId +} +// Serialize serializes information the current object +func (m *MeetingPolicyUpdatedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("meetingChatEnabled", m.GetMeetingChatEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("meetingChatId", m.GetMeetingChatId()) + if err != nil { + return err + } + } + return nil +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MeetingPolicyUpdatedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMeetingChatEnabled sets the meetingChatEnabled property value. Represents whether the meeting chat is enabled or not. +func (m *MeetingPolicyUpdatedEventMessageDetail) SetMeetingChatEnabled(value *bool)() { + m.meetingChatEnabled = value +} +// SetMeetingChatId sets the meetingChatId property value. Unique identifier of the meeting chat. +func (m *MeetingPolicyUpdatedEventMessageDetail) SetMeetingChatId(value *string)() { + m.meetingChatId = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detailable.go new file mode 100644 index 000000000..ee9d33523 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_policy_updated_event_message_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingPolicyUpdatedEventMessageDetailable +type MeetingPolicyUpdatedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiator()(IdentitySetable) + GetMeetingChatEnabled()(*bool) + GetMeetingChatId()(*string) + SetInitiator(value IdentitySetable)() + SetMeetingChatEnabled(value *bool)() + SetMeetingChatId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant.go b/src/internal/connector/graph/betasdk/models/meeting_registrant.go new file mode 100644 index 000000000..0da206983 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant.go @@ -0,0 +1,202 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrant +type MeetingRegistrant struct { + MeetingRegistrantBase + // The registrant's answer to custom questions. + customQuestionAnswers []CustomQuestionAnswerable + // The email address of the registrant. + email *string + // The first name of the registrant. + firstName *string + // The last name of the registrant. + lastName *string + // Time in UTC when the registrant registers for the meeting. Read-only. + registrationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The registration status of the registrant. Read-only. + status *MeetingRegistrantStatus +} +// NewMeetingRegistrant instantiates a new MeetingRegistrant and sets the default values. +func NewMeetingRegistrant()(*MeetingRegistrant) { + m := &MeetingRegistrant{ + MeetingRegistrantBase: *NewMeetingRegistrantBase(), + } + odataTypeValue := "#microsoft.graph.meetingRegistrant"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMeetingRegistrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistrant(), nil +} +// GetCustomQuestionAnswers gets the customQuestionAnswers property value. The registrant's answer to custom questions. +func (m *MeetingRegistrant) GetCustomQuestionAnswers()([]CustomQuestionAnswerable) { + return m.customQuestionAnswers +} +// GetEmail gets the email property value. The email address of the registrant. +func (m *MeetingRegistrant) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingRegistrantBase.GetFieldDeserializers() + res["customQuestionAnswers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCustomQuestionAnswerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CustomQuestionAnswerable, len(val)) + for i, v := range val { + res[i] = v.(CustomQuestionAnswerable) + } + m.SetCustomQuestionAnswers(res) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["firstName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstName(val) + } + return nil + } + res["lastName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastName(val) + } + return nil + } + res["registrationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistrationDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMeetingRegistrantStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*MeetingRegistrantStatus)) + } + return nil + } + return res +} +// GetFirstName gets the firstName property value. The first name of the registrant. +func (m *MeetingRegistrant) GetFirstName()(*string) { + return m.firstName +} +// GetLastName gets the lastName property value. The last name of the registrant. +func (m *MeetingRegistrant) GetLastName()(*string) { + return m.lastName +} +// GetRegistrationDateTime gets the registrationDateTime property value. Time in UTC when the registrant registers for the meeting. Read-only. +func (m *MeetingRegistrant) GetRegistrationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.registrationDateTime +} +// GetStatus gets the status property value. The registration status of the registrant. Read-only. +func (m *MeetingRegistrant) GetStatus()(*MeetingRegistrantStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *MeetingRegistrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingRegistrantBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCustomQuestionAnswers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestionAnswers())) + for i, v := range m.GetCustomQuestionAnswers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customQuestionAnswers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("firstName", m.GetFirstName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastName", m.GetLastName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("registrationDateTime", m.GetRegistrationDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCustomQuestionAnswers sets the customQuestionAnswers property value. The registrant's answer to custom questions. +func (m *MeetingRegistrant) SetCustomQuestionAnswers(value []CustomQuestionAnswerable)() { + m.customQuestionAnswers = value +} +// SetEmail sets the email property value. The email address of the registrant. +func (m *MeetingRegistrant) SetEmail(value *string)() { + m.email = value +} +// SetFirstName sets the firstName property value. The first name of the registrant. +func (m *MeetingRegistrant) SetFirstName(value *string)() { + m.firstName = value +} +// SetLastName sets the lastName property value. The last name of the registrant. +func (m *MeetingRegistrant) SetLastName(value *string)() { + m.lastName = value +} +// SetRegistrationDateTime sets the registrationDateTime property value. Time in UTC when the registrant registers for the meeting. Read-only. +func (m *MeetingRegistrant) SetRegistrationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.registrationDateTime = value +} +// SetStatus sets the status property value. The registration status of the registrant. Read-only. +func (m *MeetingRegistrant) SetStatus(value *MeetingRegistrantStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_base.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_base.go new file mode 100644 index 000000000..2a1e435a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_base.go @@ -0,0 +1,80 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingRegistrantBase struct { + Entity + // A unique web URL for the registrant to join the meeting. Read-only. + joinWebUrl *string +} +// NewMeetingRegistrantBase instantiates a new meetingRegistrantBase and sets the default values. +func NewMeetingRegistrantBase()(*MeetingRegistrantBase) { + m := &MeetingRegistrantBase{ + Entity: *NewEntity(), + } + return m +} +// CreateMeetingRegistrantBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrantBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.externalMeetingRegistrant": + return NewExternalMeetingRegistrant(), nil + case "#microsoft.graph.meetingRegistrant": + return NewMeetingRegistrant(), nil + } + } + } + } + return NewMeetingRegistrantBase(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrantBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["joinWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinWebUrl(val) + } + return nil + } + return res +} +// GetJoinWebUrl gets the joinWebUrl property value. A unique web URL for the registrant to join the meeting. Read-only. +func (m *MeetingRegistrantBase) GetJoinWebUrl()(*string) { + return m.joinWebUrl +} +// Serialize serializes information the current object +func (m *MeetingRegistrantBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("joinWebUrl", m.GetJoinWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetJoinWebUrl sets the joinWebUrl property value. A unique web URL for the registrant to join the meeting. Read-only. +func (m *MeetingRegistrantBase) SetJoinWebUrl(value *string)() { + m.joinWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_response.go new file mode 100644 index 000000000..65f413cc0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantBaseCollectionResponse +type MeetingRegistrantBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingRegistrantBaseable +} +// NewMeetingRegistrantBaseCollectionResponse instantiates a new MeetingRegistrantBaseCollectionResponse and sets the default values. +func NewMeetingRegistrantBaseCollectionResponse()(*MeetingRegistrantBaseCollectionResponse) { + m := &MeetingRegistrantBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingRegistrantBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrantBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistrantBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrantBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingRegistrantBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingRegistrantBaseable, len(val)) + for i, v := range val { + res[i] = v.(MeetingRegistrantBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingRegistrantBaseCollectionResponse) GetValue()([]MeetingRegistrantBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingRegistrantBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingRegistrantBaseCollectionResponse) SetValue(value []MeetingRegistrantBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_responseable.go new file mode 100644 index 000000000..a9102c6d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantBaseCollectionResponseable +type MeetingRegistrantBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingRegistrantBaseable) + SetValue(value []MeetingRegistrantBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_baseable.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_baseable.go new file mode 100644 index 000000000..0de88e444 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_baseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantBaseable +type MeetingRegistrantBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetJoinWebUrl()(*string) + SetJoinWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_response.go new file mode 100644 index 000000000..7157153ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantCollectionResponse +type MeetingRegistrantCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingRegistrantable +} +// NewMeetingRegistrantCollectionResponse instantiates a new MeetingRegistrantCollectionResponse and sets the default values. +func NewMeetingRegistrantCollectionResponse()(*MeetingRegistrantCollectionResponse) { + m := &MeetingRegistrantCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingRegistrantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistrantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingRegistrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingRegistrantable, len(val)) + for i, v := range val { + res[i] = v.(MeetingRegistrantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingRegistrantCollectionResponse) GetValue()([]MeetingRegistrantable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingRegistrantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingRegistrantCollectionResponse) SetValue(value []MeetingRegistrantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_responseable.go new file mode 100644 index 000000000..58bcfe869 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantCollectionResponseable +type MeetingRegistrantCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingRegistrantable) + SetValue(value []MeetingRegistrantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrant_status.go b/src/internal/connector/graph/betasdk/models/meeting_registrant_status.go new file mode 100644 index 000000000..37eb4c811 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrant_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingRegistrantStatus int + +const ( + REGISTERED_MEETINGREGISTRANTSTATUS MeetingRegistrantStatus = iota + CANCELED_MEETINGREGISTRANTSTATUS + PROCESSING_MEETINGREGISTRANTSTATUS + UNKNOWNFUTUREVALUE_MEETINGREGISTRANTSTATUS +) + +func (i MeetingRegistrantStatus) String() string { + return []string{"registered", "canceled", "processing", "unknownFutureValue"}[i] +} +func ParseMeetingRegistrantStatus(v string) (interface{}, error) { + result := REGISTERED_MEETINGREGISTRANTSTATUS + switch v { + case "registered": + result = REGISTERED_MEETINGREGISTRANTSTATUS + case "canceled": + result = CANCELED_MEETINGREGISTRANTSTATUS + case "processing": + result = PROCESSING_MEETINGREGISTRANTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MEETINGREGISTRANTSTATUS + default: + return 0, errors.New("Unknown MeetingRegistrantStatus value: " + v) + } + return &result, nil +} +func SerializeMeetingRegistrantStatus(values []MeetingRegistrantStatus) []string { + 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/meeting_registrantable.go b/src/internal/connector/graph/betasdk/models/meeting_registrantable.go new file mode 100644 index 000000000..610bcad06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrantable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrantable +type MeetingRegistrantable interface { + MeetingRegistrantBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomQuestionAnswers()([]CustomQuestionAnswerable) + GetEmail()(*string) + GetFirstName()(*string) + GetLastName()(*string) + GetRegistrationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*MeetingRegistrantStatus) + SetCustomQuestionAnswers(value []CustomQuestionAnswerable)() + SetEmail(value *string)() + SetFirstName(value *string)() + SetLastName(value *string)() + SetRegistrationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *MeetingRegistrantStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration.go b/src/internal/connector/graph/betasdk/models/meeting_registration.go new file mode 100644 index 000000000..8fcb075cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration.go @@ -0,0 +1,261 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistration +type MeetingRegistration struct { + MeetingRegistrationBase + // Custom registration questions. + customQuestions []MeetingRegistrationQuestionable + // The description of the meeting. + description *string + // The meeting end time in UTC. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number of times the registration page has been visited. Read-only. + registrationPageViewCount *int32 + // The URL of the registration page. Read-only. + registrationPageWebUrl *string + // The meeting speaker's information. + speakers []MeetingSpeakerable + // The meeting start time in UTC. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The subject of the meeting. + subject *string +} +// NewMeetingRegistration instantiates a new MeetingRegistration and sets the default values. +func NewMeetingRegistration()(*MeetingRegistration) { + m := &MeetingRegistration{ + MeetingRegistrationBase: *NewMeetingRegistrationBase(), + } + odataTypeValue := "#microsoft.graph.meetingRegistration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMeetingRegistrationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistration(), nil +} +// GetCustomQuestions gets the customQuestions property value. Custom registration questions. +func (m *MeetingRegistration) GetCustomQuestions()([]MeetingRegistrationQuestionable) { + return m.customQuestions +} +// GetDescription gets the description property value. The description of the meeting. +func (m *MeetingRegistration) GetDescription()(*string) { + return m.description +} +// GetEndDateTime gets the endDateTime property value. The meeting end time in UTC. +func (m *MeetingRegistration) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingRegistrationBase.GetFieldDeserializers() + res["customQuestions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingRegistrationQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingRegistrationQuestionable, len(val)) + for i, v := range val { + res[i] = v.(MeetingRegistrationQuestionable) + } + m.SetCustomQuestions(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["registrationPageViewCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRegistrationPageViewCount(val) + } + return nil + } + res["registrationPageWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistrationPageWebUrl(val) + } + return nil + } + res["speakers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingSpeakerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingSpeakerable, len(val)) + for i, v := range val { + res[i] = v.(MeetingSpeakerable) + } + m.SetSpeakers(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetRegistrationPageViewCount gets the registrationPageViewCount property value. The number of times the registration page has been visited. Read-only. +func (m *MeetingRegistration) GetRegistrationPageViewCount()(*int32) { + return m.registrationPageViewCount +} +// GetRegistrationPageWebUrl gets the registrationPageWebUrl property value. The URL of the registration page. Read-only. +func (m *MeetingRegistration) GetRegistrationPageWebUrl()(*string) { + return m.registrationPageWebUrl +} +// GetSpeakers gets the speakers property value. The meeting speaker's information. +func (m *MeetingRegistration) GetSpeakers()([]MeetingSpeakerable) { + return m.speakers +} +// GetStartDateTime gets the startDateTime property value. The meeting start time in UTC. +func (m *MeetingRegistration) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetSubject gets the subject property value. The subject of the meeting. +func (m *MeetingRegistration) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *MeetingRegistration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingRegistrationBase.Serialize(writer) + if err != nil { + return err + } + if m.GetCustomQuestions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomQuestions())) + for i, v := range m.GetCustomQuestions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("customQuestions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("registrationPageViewCount", m.GetRegistrationPageViewCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registrationPageWebUrl", m.GetRegistrationPageWebUrl()) + if err != nil { + return err + } + } + if m.GetSpeakers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSpeakers())) + for i, v := range m.GetSpeakers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("speakers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetCustomQuestions sets the customQuestions property value. Custom registration questions. +func (m *MeetingRegistration) SetCustomQuestions(value []MeetingRegistrationQuestionable)() { + m.customQuestions = value +} +// SetDescription sets the description property value. The description of the meeting. +func (m *MeetingRegistration) SetDescription(value *string)() { + m.description = value +} +// SetEndDateTime sets the endDateTime property value. The meeting end time in UTC. +func (m *MeetingRegistration) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetRegistrationPageViewCount sets the registrationPageViewCount property value. The number of times the registration page has been visited. Read-only. +func (m *MeetingRegistration) SetRegistrationPageViewCount(value *int32)() { + m.registrationPageViewCount = value +} +// SetRegistrationPageWebUrl sets the registrationPageWebUrl property value. The URL of the registration page. Read-only. +func (m *MeetingRegistration) SetRegistrationPageWebUrl(value *string)() { + m.registrationPageWebUrl = value +} +// SetSpeakers sets the speakers property value. The meeting speaker's information. +func (m *MeetingRegistration) SetSpeakers(value []MeetingSpeakerable)() { + m.speakers = value +} +// SetStartDateTime sets the startDateTime property value. The meeting start time in UTC. +func (m *MeetingRegistration) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetSubject sets the subject property value. The subject of the meeting. +func (m *MeetingRegistration) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_base.go b/src/internal/connector/graph/betasdk/models/meeting_registration_base.go new file mode 100644 index 000000000..7a53ac87b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_base.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationBase +type MeetingRegistrationBase struct { + Entity + // Specifies who can register for the meeting. + allowedRegistrant *MeetingAudience + // Registrants of the online meeting. + registrants []MeetingRegistrantBaseable +} +// NewMeetingRegistrationBase instantiates a new meetingRegistrationBase and sets the default values. +func NewMeetingRegistrationBase()(*MeetingRegistrationBase) { + m := &MeetingRegistrationBase{ + Entity: *NewEntity(), + } + return m +} +// CreateMeetingRegistrationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.externalMeetingRegistration": + return NewExternalMeetingRegistration(), nil + case "#microsoft.graph.meetingRegistration": + return NewMeetingRegistration(), nil + } + } + } + } + return NewMeetingRegistrationBase(), nil +} +// GetAllowedRegistrant gets the allowedRegistrant property value. Specifies who can register for the meeting. +func (m *MeetingRegistrationBase) GetAllowedRegistrant()(*MeetingAudience) { + return m.allowedRegistrant +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowedRegistrant"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMeetingAudience) + if err != nil { + return err + } + if val != nil { + m.SetAllowedRegistrant(val.(*MeetingAudience)) + } + return nil + } + res["registrants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingRegistrantBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingRegistrantBaseable, len(val)) + for i, v := range val { + res[i] = v.(MeetingRegistrantBaseable) + } + m.SetRegistrants(res) + } + return nil + } + return res +} +// GetRegistrants gets the registrants property value. Registrants of the online meeting. +func (m *MeetingRegistrationBase) GetRegistrants()([]MeetingRegistrantBaseable) { + return m.registrants +} +// Serialize serializes information the current object +func (m *MeetingRegistrationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedRegistrant() != nil { + cast := (*m.GetAllowedRegistrant()).String() + err = writer.WriteStringValue("allowedRegistrant", &cast) + if err != nil { + return err + } + } + if m.GetRegistrants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRegistrants())) + for i, v := range m.GetRegistrants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("registrants", cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowedRegistrant sets the allowedRegistrant property value. Specifies who can register for the meeting. +func (m *MeetingRegistrationBase) SetAllowedRegistrant(value *MeetingAudience)() { + m.allowedRegistrant = value +} +// SetRegistrants sets the registrants property value. Registrants of the online meeting. +func (m *MeetingRegistrationBase) SetRegistrants(value []MeetingRegistrantBaseable)() { + m.registrants = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_baseable.go b/src/internal/connector/graph/betasdk/models/meeting_registration_baseable.go new file mode 100644 index 000000000..d4c898452 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_baseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationBaseable +type MeetingRegistrationBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedRegistrant()(*MeetingAudience) + GetRegistrants()([]MeetingRegistrantBaseable) + SetAllowedRegistrant(value *MeetingAudience)() + SetRegistrants(value []MeetingRegistrantBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_question.go b/src/internal/connector/graph/betasdk/models/meeting_registration_question.go new file mode 100644 index 000000000..ea3821191 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_question.go @@ -0,0 +1,143 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationQuestion provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeetingRegistrationQuestion struct { + Entity + // Answer input type of the custom registration question. + answerInputType *AnswerInputType + // Answer options when answerInputType is radioButton. + answerOptions []string + // Display name of the custom registration question. + displayName *string + // Indicates whether the question is required. Default value is false. + isRequired *bool +} +// NewMeetingRegistrationQuestion instantiates a new meetingRegistrationQuestion and sets the default values. +func NewMeetingRegistrationQuestion()(*MeetingRegistrationQuestion) { + m := &MeetingRegistrationQuestion{ + Entity: *NewEntity(), + } + return m +} +// CreateMeetingRegistrationQuestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrationQuestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistrationQuestion(), nil +} +// GetAnswerInputType gets the answerInputType property value. Answer input type of the custom registration question. +func (m *MeetingRegistrationQuestion) GetAnswerInputType()(*AnswerInputType) { + return m.answerInputType +} +// GetAnswerOptions gets the answerOptions property value. Answer options when answerInputType is radioButton. +func (m *MeetingRegistrationQuestion) GetAnswerOptions()([]string) { + return m.answerOptions +} +// GetDisplayName gets the displayName property value. Display name of the custom registration question. +func (m *MeetingRegistrationQuestion) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrationQuestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["answerInputType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerInputType) + if err != nil { + return err + } + if val != nil { + m.SetAnswerInputType(val.(*AnswerInputType)) + } + return nil + } + res["answerOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAnswerOptions(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRequired(val) + } + return nil + } + return res +} +// GetIsRequired gets the isRequired property value. Indicates whether the question is required. Default value is false. +func (m *MeetingRegistrationQuestion) GetIsRequired()(*bool) { + return m.isRequired +} +// Serialize serializes information the current object +func (m *MeetingRegistrationQuestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAnswerInputType() != nil { + cast := (*m.GetAnswerInputType()).String() + err = writer.WriteStringValue("answerInputType", &cast) + if err != nil { + return err + } + } + if m.GetAnswerOptions() != nil { + err = writer.WriteCollectionOfStringValues("answerOptions", m.GetAnswerOptions()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRequired", m.GetIsRequired()) + if err != nil { + return err + } + } + return nil +} +// SetAnswerInputType sets the answerInputType property value. Answer input type of the custom registration question. +func (m *MeetingRegistrationQuestion) SetAnswerInputType(value *AnswerInputType)() { + m.answerInputType = value +} +// SetAnswerOptions sets the answerOptions property value. Answer options when answerInputType is radioButton. +func (m *MeetingRegistrationQuestion) SetAnswerOptions(value []string)() { + m.answerOptions = value +} +// SetDisplayName sets the displayName property value. Display name of the custom registration question. +func (m *MeetingRegistrationQuestion) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsRequired sets the isRequired property value. Indicates whether the question is required. Default value is false. +func (m *MeetingRegistrationQuestion) SetIsRequired(value *bool)() { + m.isRequired = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_response.go new file mode 100644 index 000000000..b791c940f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationQuestionCollectionResponse +type MeetingRegistrationQuestionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingRegistrationQuestionable +} +// NewMeetingRegistrationQuestionCollectionResponse instantiates a new MeetingRegistrationQuestionCollectionResponse and sets the default values. +func NewMeetingRegistrationQuestionCollectionResponse()(*MeetingRegistrationQuestionCollectionResponse) { + m := &MeetingRegistrationQuestionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingRegistrationQuestionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingRegistrationQuestionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingRegistrationQuestionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingRegistrationQuestionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingRegistrationQuestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingRegistrationQuestionable, len(val)) + for i, v := range val { + res[i] = v.(MeetingRegistrationQuestionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingRegistrationQuestionCollectionResponse) GetValue()([]MeetingRegistrationQuestionable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingRegistrationQuestionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingRegistrationQuestionCollectionResponse) SetValue(value []MeetingRegistrationQuestionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_responseable.go new file mode 100644 index 000000000..740cd3156 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_question_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationQuestionCollectionResponseable +type MeetingRegistrationQuestionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingRegistrationQuestionable) + SetValue(value []MeetingRegistrationQuestionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registration_questionable.go b/src/internal/connector/graph/betasdk/models/meeting_registration_questionable.go new file mode 100644 index 000000000..30e84d942 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registration_questionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationQuestionable +type MeetingRegistrationQuestionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnswerInputType()(*AnswerInputType) + GetAnswerOptions()([]string) + GetDisplayName()(*string) + GetIsRequired()(*bool) + SetAnswerInputType(value *AnswerInputType)() + SetAnswerOptions(value []string)() + SetDisplayName(value *string)() + SetIsRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_registrationable.go b/src/internal/connector/graph/betasdk/models/meeting_registrationable.go new file mode 100644 index 000000000..e07ec6fe9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_registrationable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingRegistrationable +type MeetingRegistrationable interface { + MeetingRegistrationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomQuestions()([]MeetingRegistrationQuestionable) + GetDescription()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRegistrationPageViewCount()(*int32) + GetRegistrationPageWebUrl()(*string) + GetSpeakers()([]MeetingSpeakerable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubject()(*string) + SetCustomQuestions(value []MeetingRegistrationQuestionable)() + SetDescription(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRegistrationPageViewCount(value *int32)() + SetRegistrationPageWebUrl(value *string)() + SetSpeakers(value []MeetingSpeakerable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_speaker.go b/src/internal/connector/graph/betasdk/models/meeting_speaker.go new file mode 100644 index 000000000..0aa0494ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_speaker.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingSpeaker +type MeetingSpeaker struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Bio of the speaker. + bio *string + // Display name of the speaker. + displayName *string + // The OdataType property + odataType *string +} +// NewMeetingSpeaker instantiates a new meetingSpeaker and sets the default values. +func NewMeetingSpeaker()(*MeetingSpeaker) { + m := &MeetingSpeaker{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingSpeakerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingSpeakerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingSpeaker(), 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 *MeetingSpeaker) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBio gets the bio property value. Bio of the speaker. +func (m *MeetingSpeaker) GetBio()(*string) { + return m.bio +} +// GetDisplayName gets the displayName property value. Display name of the speaker. +func (m *MeetingSpeaker) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingSpeaker) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bio"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBio(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingSpeaker) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MeetingSpeaker) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("bio", m.GetBio()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MeetingSpeaker) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBio sets the bio property value. Bio of the speaker. +func (m *MeetingSpeaker) SetBio(value *string)() { + m.bio = value +} +// SetDisplayName sets the displayName property value. Display name of the speaker. +func (m *MeetingSpeaker) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingSpeaker) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_response.go new file mode 100644 index 000000000..89ae741e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingSpeakerCollectionResponse +type MeetingSpeakerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingSpeakerable +} +// NewMeetingSpeakerCollectionResponse instantiates a new MeetingSpeakerCollectionResponse and sets the default values. +func NewMeetingSpeakerCollectionResponse()(*MeetingSpeakerCollectionResponse) { + m := &MeetingSpeakerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingSpeakerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingSpeakerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingSpeakerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingSpeakerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingSpeakerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingSpeakerable, len(val)) + for i, v := range val { + res[i] = v.(MeetingSpeakerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingSpeakerCollectionResponse) GetValue()([]MeetingSpeakerable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingSpeakerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingSpeakerCollectionResponse) SetValue(value []MeetingSpeakerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_responseable.go new file mode 100644 index 000000000..d06cdd403 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_speaker_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingSpeakerCollectionResponseable +type MeetingSpeakerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingSpeakerable) + SetValue(value []MeetingSpeakerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_speakerable.go b/src/internal/connector/graph/betasdk/models/meeting_speakerable.go new file mode 100644 index 000000000..ab28a21b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_speakerable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingSpeakerable +type MeetingSpeakerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBio()(*string) + GetDisplayName()(*string) + GetOdataType()(*string) + SetBio(value *string)() + SetDisplayName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_time_suggestion.go b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion.go new file mode 100644 index 000000000..5eb0f05e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion.go @@ -0,0 +1,270 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingTimeSuggestion +type MeetingTimeSuggestion struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // An array that shows the availability status of each attendee for this meeting suggestion. + attendeeAvailability []AttendeeAvailabilityable + // A percentage that represents the likelhood of all the attendees attending. + confidence *float64 + // An array that specifies the name and geographic location of each meeting location for this meeting suggestion. + locations []Locationable + // A time period suggested for the meeting. + meetingTimeSlot TimeSlotable + // The OdataType property + odataType *string + // Order of meeting time suggestions sorted by their computed confidence value from high to low, then by chronology if there are suggestions with the same confidence. + order *int32 + // Availability of the meeting organizer for this meeting suggestion. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. + organizerAvailability *FreeBusyStatus + // Reason for suggesting the meeting time. + suggestionReason *string +} +// NewMeetingTimeSuggestion instantiates a new meetingTimeSuggestion and sets the default values. +func NewMeetingTimeSuggestion()(*MeetingTimeSuggestion) { + m := &MeetingTimeSuggestion{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMeetingTimeSuggestionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingTimeSuggestionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingTimeSuggestion(), 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 *MeetingTimeSuggestion) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttendeeAvailability gets the attendeeAvailability property value. An array that shows the availability status of each attendee for this meeting suggestion. +func (m *MeetingTimeSuggestion) GetAttendeeAvailability()([]AttendeeAvailabilityable) { + return m.attendeeAvailability +} +// GetConfidence gets the confidence property value. A percentage that represents the likelhood of all the attendees attending. +func (m *MeetingTimeSuggestion) GetConfidence()(*float64) { + return m.confidence +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingTimeSuggestion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attendeeAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttendeeAvailabilityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttendeeAvailabilityable, len(val)) + for i, v := range val { + res[i] = v.(AttendeeAvailabilityable) + } + m.SetAttendeeAvailability(res) + } + return nil + } + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["locations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Locationable, len(val)) + for i, v := range val { + res[i] = v.(Locationable) + } + m.SetLocations(res) + } + return nil + } + res["meetingTimeSlot"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimeSlotFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingTimeSlot(val.(TimeSlotable)) + } + 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["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrder(val) + } + return nil + } + res["organizerAvailability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFreeBusyStatus) + if err != nil { + return err + } + if val != nil { + m.SetOrganizerAvailability(val.(*FreeBusyStatus)) + } + return nil + } + res["suggestionReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSuggestionReason(val) + } + return nil + } + return res +} +// GetLocations gets the locations property value. An array that specifies the name and geographic location of each meeting location for this meeting suggestion. +func (m *MeetingTimeSuggestion) GetLocations()([]Locationable) { + return m.locations +} +// GetMeetingTimeSlot gets the meetingTimeSlot property value. A time period suggested for the meeting. +func (m *MeetingTimeSuggestion) GetMeetingTimeSlot()(TimeSlotable) { + return m.meetingTimeSlot +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MeetingTimeSuggestion) GetOdataType()(*string) { + return m.odataType +} +// GetOrder gets the order property value. Order of meeting time suggestions sorted by their computed confidence value from high to low, then by chronology if there are suggestions with the same confidence. +func (m *MeetingTimeSuggestion) GetOrder()(*int32) { + return m.order +} +// GetOrganizerAvailability gets the organizerAvailability property value. Availability of the meeting organizer for this meeting suggestion. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *MeetingTimeSuggestion) GetOrganizerAvailability()(*FreeBusyStatus) { + return m.organizerAvailability +} +// GetSuggestionReason gets the suggestionReason property value. Reason for suggesting the meeting time. +func (m *MeetingTimeSuggestion) GetSuggestionReason()(*string) { + return m.suggestionReason +} +// Serialize serializes information the current object +func (m *MeetingTimeSuggestion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttendeeAvailability() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendeeAvailability())) + for i, v := range m.GetAttendeeAvailability() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("attendeeAvailability", cast) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + if m.GetLocations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocations())) + for i, v := range m.GetLocations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("locations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("meetingTimeSlot", m.GetMeetingTimeSlot()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("order", m.GetOrder()) + if err != nil { + return err + } + } + if m.GetOrganizerAvailability() != nil { + cast := (*m.GetOrganizerAvailability()).String() + err := writer.WriteStringValue("organizerAvailability", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("suggestionReason", m.GetSuggestionReason()) + 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 *MeetingTimeSuggestion) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttendeeAvailability sets the attendeeAvailability property value. An array that shows the availability status of each attendee for this meeting suggestion. +func (m *MeetingTimeSuggestion) SetAttendeeAvailability(value []AttendeeAvailabilityable)() { + m.attendeeAvailability = value +} +// SetConfidence sets the confidence property value. A percentage that represents the likelhood of all the attendees attending. +func (m *MeetingTimeSuggestion) SetConfidence(value *float64)() { + m.confidence = value +} +// SetLocations sets the locations property value. An array that specifies the name and geographic location of each meeting location for this meeting suggestion. +func (m *MeetingTimeSuggestion) SetLocations(value []Locationable)() { + m.locations = value +} +// SetMeetingTimeSlot sets the meetingTimeSlot property value. A time period suggested for the meeting. +func (m *MeetingTimeSuggestion) SetMeetingTimeSlot(value TimeSlotable)() { + m.meetingTimeSlot = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MeetingTimeSuggestion) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrder sets the order property value. Order of meeting time suggestions sorted by their computed confidence value from high to low, then by chronology if there are suggestions with the same confidence. +func (m *MeetingTimeSuggestion) SetOrder(value *int32)() { + m.order = value +} +// SetOrganizerAvailability sets the organizerAvailability property value. Availability of the meeting organizer for this meeting suggestion. Possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *MeetingTimeSuggestion) SetOrganizerAvailability(value *FreeBusyStatus)() { + m.organizerAvailability = value +} +// SetSuggestionReason sets the suggestionReason property value. Reason for suggesting the meeting time. +func (m *MeetingTimeSuggestion) SetSuggestionReason(value *string)() { + m.suggestionReason = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_response.go b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_response.go new file mode 100644 index 000000000..8c2ccb944 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingTimeSuggestionCollectionResponse +type MeetingTimeSuggestionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MeetingTimeSuggestionable +} +// NewMeetingTimeSuggestionCollectionResponse instantiates a new MeetingTimeSuggestionCollectionResponse and sets the default values. +func NewMeetingTimeSuggestionCollectionResponse()(*MeetingTimeSuggestionCollectionResponse) { + m := &MeetingTimeSuggestionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMeetingTimeSuggestionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMeetingTimeSuggestionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMeetingTimeSuggestionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MeetingTimeSuggestionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingTimeSuggestionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingTimeSuggestionable, len(val)) + for i, v := range val { + res[i] = v.(MeetingTimeSuggestionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MeetingTimeSuggestionCollectionResponse) GetValue()([]MeetingTimeSuggestionable) { + return m.value +} +// Serialize serializes information the current object +func (m *MeetingTimeSuggestionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MeetingTimeSuggestionCollectionResponse) SetValue(value []MeetingTimeSuggestionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_responseable.go new file mode 100644 index 000000000..74af01589 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_time_suggestion_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingTimeSuggestionCollectionResponseable +type MeetingTimeSuggestionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MeetingTimeSuggestionable) + SetValue(value []MeetingTimeSuggestionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meeting_time_suggestionable.go b/src/internal/connector/graph/betasdk/models/meeting_time_suggestionable.go new file mode 100644 index 000000000..6178a8b83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meeting_time_suggestionable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MeetingTimeSuggestionable +type MeetingTimeSuggestionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttendeeAvailability()([]AttendeeAvailabilityable) + GetConfidence()(*float64) + GetLocations()([]Locationable) + GetMeetingTimeSlot()(TimeSlotable) + GetOdataType()(*string) + GetOrder()(*int32) + GetOrganizerAvailability()(*FreeBusyStatus) + GetSuggestionReason()(*string) + SetAttendeeAvailability(value []AttendeeAvailabilityable)() + SetConfidence(value *float64)() + SetLocations(value []Locationable)() + SetMeetingTimeSlot(value TimeSlotable)() + SetOdataType(value *string)() + SetOrder(value *int32)() + SetOrganizerAvailability(value *FreeBusyStatus)() + SetSuggestionReason(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/members_added_event_message_detail.go b/src/internal/connector/graph/betasdk/models/members_added_event_message_detail.go new file mode 100644 index 000000000..a8695c765 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_added_event_message_detail.go @@ -0,0 +1,123 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersAddedEventMessageDetail +type MembersAddedEventMessageDetail struct { + EventMessageDetail + // Initiator of the event. + initiator IdentitySetable + // List of members added. + members []TeamworkUserIdentityable + // The timestamp denoting how far back a conversation's history is shared with the conversation members. + visibleHistoryStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewMembersAddedEventMessageDetail instantiates a new MembersAddedEventMessageDetail and sets the default values. +func NewMembersAddedEventMessageDetail()(*MembersAddedEventMessageDetail) { + m := &MembersAddedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.membersAddedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMembersAddedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembersAddedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembersAddedEventMessageDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembersAddedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamworkUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamworkUserIdentityable, len(val)) + for i, v := range val { + res[i] = v.(TeamworkUserIdentityable) + } + m.SetMembers(res) + } + return nil + } + res["visibleHistoryStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetVisibleHistoryStartDateTime(val) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MembersAddedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMembers gets the members property value. List of members added. +func (m *MembersAddedEventMessageDetail) GetMembers()([]TeamworkUserIdentityable) { + return m.members +} +// GetVisibleHistoryStartDateTime gets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation's history is shared with the conversation members. +func (m *MembersAddedEventMessageDetail) GetVisibleHistoryStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.visibleHistoryStartDateTime +} +// Serialize serializes information the current object +func (m *MembersAddedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("visibleHistoryStartDateTime", m.GetVisibleHistoryStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MembersAddedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMembers sets the members property value. List of members added. +func (m *MembersAddedEventMessageDetail) SetMembers(value []TeamworkUserIdentityable)() { + m.members = value +} +// SetVisibleHistoryStartDateTime sets the visibleHistoryStartDateTime property value. The timestamp denoting how far back a conversation's history is shared with the conversation members. +func (m *MembersAddedEventMessageDetail) SetVisibleHistoryStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.visibleHistoryStartDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/members_added_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/members_added_event_message_detailable.go new file mode 100644 index 000000000..2f2c428bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_added_event_message_detailable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersAddedEventMessageDetailable +type MembersAddedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiator()(IdentitySetable) + GetMembers()([]TeamworkUserIdentityable) + GetVisibleHistoryStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetInitiator(value IdentitySetable)() + SetMembers(value []TeamworkUserIdentityable)() + SetVisibleHistoryStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detail.go b/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detail.go new file mode 100644 index 000000000..04d4b0ccf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detail.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersDeletedEventMessageDetail +type MembersDeletedEventMessageDetail struct { + EventMessageDetail + // Initiator of the event. + initiator IdentitySetable + // List of members deleted. + members []TeamworkUserIdentityable +} +// NewMembersDeletedEventMessageDetail instantiates a new MembersDeletedEventMessageDetail and sets the default values. +func NewMembersDeletedEventMessageDetail()(*MembersDeletedEventMessageDetail) { + m := &MembersDeletedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.membersDeletedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMembersDeletedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembersDeletedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembersDeletedEventMessageDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembersDeletedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamworkUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamworkUserIdentityable, len(val)) + for i, v := range val { + res[i] = v.(TeamworkUserIdentityable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MembersDeletedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMembers gets the members property value. List of members deleted. +func (m *MembersDeletedEventMessageDetail) GetMembers()([]TeamworkUserIdentityable) { + return m.members +} +// Serialize serializes information the current object +func (m *MembersDeletedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + return nil +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MembersDeletedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMembers sets the members property value. List of members deleted. +func (m *MembersDeletedEventMessageDetail) SetMembers(value []TeamworkUserIdentityable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detailable.go new file mode 100644 index 000000000..16ffcb9b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_deleted_event_message_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersDeletedEventMessageDetailable +type MembersDeletedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiator()(IdentitySetable) + GetMembers()([]TeamworkUserIdentityable) + SetInitiator(value IdentitySetable)() + SetMembers(value []TeamworkUserIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/members_joined_event_message_detail.go b/src/internal/connector/graph/betasdk/models/members_joined_event_message_detail.go new file mode 100644 index 000000000..0f8543164 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_joined_event_message_detail.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersJoinedEventMessageDetail +type MembersJoinedEventMessageDetail struct { + EventMessageDetail + // Initiator of the event. + initiator IdentitySetable + // List of members who joined the chat. + members []TeamworkUserIdentityable +} +// NewMembersJoinedEventMessageDetail instantiates a new MembersJoinedEventMessageDetail and sets the default values. +func NewMembersJoinedEventMessageDetail()(*MembersJoinedEventMessageDetail) { + m := &MembersJoinedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.membersJoinedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMembersJoinedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembersJoinedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembersJoinedEventMessageDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembersJoinedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamworkUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamworkUserIdentityable, len(val)) + for i, v := range val { + res[i] = v.(TeamworkUserIdentityable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MembersJoinedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMembers gets the members property value. List of members who joined the chat. +func (m *MembersJoinedEventMessageDetail) GetMembers()([]TeamworkUserIdentityable) { + return m.members +} +// Serialize serializes information the current object +func (m *MembersJoinedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + return nil +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MembersJoinedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMembers sets the members property value. List of members who joined the chat. +func (m *MembersJoinedEventMessageDetail) SetMembers(value []TeamworkUserIdentityable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betasdk/models/members_joined_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/members_joined_event_message_detailable.go new file mode 100644 index 000000000..663fa486a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_joined_event_message_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersJoinedEventMessageDetailable +type MembersJoinedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiator()(IdentitySetable) + GetMembers()([]TeamworkUserIdentityable) + SetInitiator(value IdentitySetable)() + SetMembers(value []TeamworkUserIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/members_left_event_message_detail.go b/src/internal/connector/graph/betasdk/models/members_left_event_message_detail.go new file mode 100644 index 000000000..f1c934437 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_left_event_message_detail.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersLeftEventMessageDetail +type MembersLeftEventMessageDetail struct { + EventMessageDetail + // Initiator of the event. + initiator IdentitySetable + // List of members who left the chat. + members []TeamworkUserIdentityable +} +// NewMembersLeftEventMessageDetail instantiates a new MembersLeftEventMessageDetail and sets the default values. +func NewMembersLeftEventMessageDetail()(*MembersLeftEventMessageDetail) { + m := &MembersLeftEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.membersLeftEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMembersLeftEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembersLeftEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembersLeftEventMessageDetail(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembersLeftEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTeamworkUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TeamworkUserIdentityable, len(val)) + for i, v := range val { + res[i] = v.(TeamworkUserIdentityable) + } + m.SetMembers(res) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MembersLeftEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetMembers gets the members property value. List of members who left the chat. +func (m *MembersLeftEventMessageDetail) GetMembers()([]TeamworkUserIdentityable) { + return m.members +} +// Serialize serializes information the current object +func (m *MembersLeftEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + return nil +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MembersLeftEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetMembers sets the members property value. List of members who left the chat. +func (m *MembersLeftEventMessageDetail) SetMembers(value []TeamworkUserIdentityable)() { + m.members = value +} diff --git a/src/internal/connector/graph/betasdk/models/members_left_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/members_left_event_message_detailable.go new file mode 100644 index 000000000..fd3d7ac21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/members_left_event_message_detailable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembersLeftEventMessageDetailable +type MembersLeftEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiator()(IdentitySetable) + GetMembers()([]TeamworkUserIdentityable) + SetInitiator(value IdentitySetable)() + SetMembers(value []TeamworkUserIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/membership_outlier_insight.go b/src/internal/connector/graph/betasdk/models/membership_outlier_insight.go new file mode 100644 index 000000000..034b1d511 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_outlier_insight.go @@ -0,0 +1,194 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipOutlierInsight +type MembershipOutlierInsight struct { + GovernanceInsight + // Navigation link to the container directory object. For example, to a group. + container DirectoryObjectable + // Indicates the identifier of the container, for example, a group ID. + containerId *string + // Navigation link to a member object. For example, to a user. + member DirectoryObjectable + // Indicates the identifier of the user. + memberId *string + // The outlierContainerType property + outlierContainerType *OutlierContainerType + // The outlierMemberType property + outlierMemberType *OutlierMemberType +} +// NewMembershipOutlierInsight instantiates a new MembershipOutlierInsight and sets the default values. +func NewMembershipOutlierInsight()(*MembershipOutlierInsight) { + m := &MembershipOutlierInsight{ + GovernanceInsight: *NewGovernanceInsight(), + } + odataTypeValue := "#microsoft.graph.membershipOutlierInsight"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMembershipOutlierInsightFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembershipOutlierInsightFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembershipOutlierInsight(), nil +} +// GetContainer gets the container property value. Navigation link to the container directory object. For example, to a group. +func (m *MembershipOutlierInsight) GetContainer()(DirectoryObjectable) { + return m.container +} +// GetContainerId gets the containerId property value. Indicates the identifier of the container, for example, a group ID. +func (m *MembershipOutlierInsight) GetContainerId()(*string) { + return m.containerId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembershipOutlierInsight) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GovernanceInsight.GetFieldDeserializers() + res["container"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContainer(val.(DirectoryObjectable)) + } + return nil + } + res["containerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContainerId(val) + } + return nil + } + res["member"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMember(val.(DirectoryObjectable)) + } + return nil + } + res["memberId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMemberId(val) + } + return nil + } + res["outlierContainerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOutlierContainerType) + if err != nil { + return err + } + if val != nil { + m.SetOutlierContainerType(val.(*OutlierContainerType)) + } + return nil + } + res["outlierMemberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOutlierMemberType) + if err != nil { + return err + } + if val != nil { + m.SetOutlierMemberType(val.(*OutlierMemberType)) + } + return nil + } + return res +} +// GetMember gets the member property value. Navigation link to a member object. For example, to a user. +func (m *MembershipOutlierInsight) GetMember()(DirectoryObjectable) { + return m.member +} +// GetMemberId gets the memberId property value. Indicates the identifier of the user. +func (m *MembershipOutlierInsight) GetMemberId()(*string) { + return m.memberId +} +// GetOutlierContainerType gets the outlierContainerType property value. The outlierContainerType property +func (m *MembershipOutlierInsight) GetOutlierContainerType()(*OutlierContainerType) { + return m.outlierContainerType +} +// GetOutlierMemberType gets the outlierMemberType property value. The outlierMemberType property +func (m *MembershipOutlierInsight) GetOutlierMemberType()(*OutlierMemberType) { + return m.outlierMemberType +} +// Serialize serializes information the current object +func (m *MembershipOutlierInsight) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GovernanceInsight.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("container", m.GetContainer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("containerId", m.GetContainerId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("member", m.GetMember()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("memberId", m.GetMemberId()) + if err != nil { + return err + } + } + if m.GetOutlierContainerType() != nil { + cast := (*m.GetOutlierContainerType()).String() + err = writer.WriteStringValue("outlierContainerType", &cast) + if err != nil { + return err + } + } + if m.GetOutlierMemberType() != nil { + cast := (*m.GetOutlierMemberType()).String() + err = writer.WriteStringValue("outlierMemberType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetContainer sets the container property value. Navigation link to the container directory object. For example, to a group. +func (m *MembershipOutlierInsight) SetContainer(value DirectoryObjectable)() { + m.container = value +} +// SetContainerId sets the containerId property value. Indicates the identifier of the container, for example, a group ID. +func (m *MembershipOutlierInsight) SetContainerId(value *string)() { + m.containerId = value +} +// SetMember sets the member property value. Navigation link to a member object. For example, to a user. +func (m *MembershipOutlierInsight) SetMember(value DirectoryObjectable)() { + m.member = value +} +// SetMemberId sets the memberId property value. Indicates the identifier of the user. +func (m *MembershipOutlierInsight) SetMemberId(value *string)() { + m.memberId = value +} +// SetOutlierContainerType sets the outlierContainerType property value. The outlierContainerType property +func (m *MembershipOutlierInsight) SetOutlierContainerType(value *OutlierContainerType)() { + m.outlierContainerType = value +} +// SetOutlierMemberType sets the outlierMemberType property value. The outlierMemberType property +func (m *MembershipOutlierInsight) SetOutlierMemberType(value *OutlierMemberType)() { + m.outlierMemberType = value +} diff --git a/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_response.go b/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_response.go new file mode 100644 index 000000000..86e738239 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipOutlierInsightCollectionResponse +type MembershipOutlierInsightCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MembershipOutlierInsightable +} +// NewMembershipOutlierInsightCollectionResponse instantiates a new MembershipOutlierInsightCollectionResponse and sets the default values. +func NewMembershipOutlierInsightCollectionResponse()(*MembershipOutlierInsightCollectionResponse) { + m := &MembershipOutlierInsightCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMembershipOutlierInsightCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembershipOutlierInsightCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembershipOutlierInsightCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembershipOutlierInsightCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMembershipOutlierInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MembershipOutlierInsightable, len(val)) + for i, v := range val { + res[i] = v.(MembershipOutlierInsightable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MembershipOutlierInsightCollectionResponse) GetValue()([]MembershipOutlierInsightable) { + return m.value +} +// Serialize serializes information the current object +func (m *MembershipOutlierInsightCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MembershipOutlierInsightCollectionResponse) SetValue(value []MembershipOutlierInsightable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_responseable.go b/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_responseable.go new file mode 100644 index 000000000..be2884352 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_outlier_insight_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipOutlierInsightCollectionResponseable +type MembershipOutlierInsightCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MembershipOutlierInsightable) + SetValue(value []MembershipOutlierInsightable)() +} diff --git a/src/internal/connector/graph/betasdk/models/membership_outlier_insightable.go b/src/internal/connector/graph/betasdk/models/membership_outlier_insightable.go new file mode 100644 index 000000000..223b3afc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_outlier_insightable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipOutlierInsightable +type MembershipOutlierInsightable interface { + GovernanceInsightable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainer()(DirectoryObjectable) + GetContainerId()(*string) + GetMember()(DirectoryObjectable) + GetMemberId()(*string) + GetOutlierContainerType()(*OutlierContainerType) + GetOutlierMemberType()(*OutlierMemberType) + SetContainer(value DirectoryObjectable)() + SetContainerId(value *string)() + SetMember(value DirectoryObjectable)() + SetMemberId(value *string)() + SetOutlierContainerType(value *OutlierContainerType)() + SetOutlierMemberType(value *OutlierMemberType)() +} diff --git a/src/internal/connector/graph/betasdk/models/membership_rule_processing_status.go b/src/internal/connector/graph/betasdk/models/membership_rule_processing_status.go new file mode 100644 index 000000000..7691d2b94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_rule_processing_status.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipRuleProcessingStatus +type MembershipRuleProcessingStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Detailed error message if dynamic group processing ran into an error. Optional. Read-only. + errorMessage *string + // Most recent date and time when membership of a dynamic group was updated. Optional. Read-only. + lastMembershipUpdated *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Current status of a dynamic group processing. Possible values are: NotStarted, Running, Succeeded, Failed, and UnknownFutureValue. Required. Read-only. + status *MembershipRuleProcessingStatusDetails +} +// NewMembershipRuleProcessingStatus instantiates a new membershipRuleProcessingStatus and sets the default values. +func NewMembershipRuleProcessingStatus()(*MembershipRuleProcessingStatus) { + m := &MembershipRuleProcessingStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMembershipRuleProcessingStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMembershipRuleProcessingStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMembershipRuleProcessingStatus(), 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 *MembershipRuleProcessingStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetErrorMessage gets the errorMessage property value. Detailed error message if dynamic group processing ran into an error. Optional. Read-only. +func (m *MembershipRuleProcessingStatus) GetErrorMessage()(*string) { + return m.errorMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MembershipRuleProcessingStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["errorMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(val) + } + return nil + } + res["lastMembershipUpdated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastMembershipUpdated(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMembershipRuleProcessingStatusDetails) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*MembershipRuleProcessingStatusDetails)) + } + return nil + } + return res +} +// GetLastMembershipUpdated gets the lastMembershipUpdated property value. Most recent date and time when membership of a dynamic group was updated. Optional. Read-only. +func (m *MembershipRuleProcessingStatus) GetLastMembershipUpdated()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastMembershipUpdated +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MembershipRuleProcessingStatus) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Current status of a dynamic group processing. Possible values are: NotStarted, Running, Succeeded, Failed, and UnknownFutureValue. Required. Read-only. +func (m *MembershipRuleProcessingStatus) GetStatus()(*MembershipRuleProcessingStatusDetails) { + return m.status +} +// Serialize serializes information the current object +func (m *MembershipRuleProcessingStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("errorMessage", m.GetErrorMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastMembershipUpdated", m.GetLastMembershipUpdated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *MembershipRuleProcessingStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetErrorMessage sets the errorMessage property value. Detailed error message if dynamic group processing ran into an error. Optional. Read-only. +func (m *MembershipRuleProcessingStatus) SetErrorMessage(value *string)() { + m.errorMessage = value +} +// SetLastMembershipUpdated sets the lastMembershipUpdated property value. Most recent date and time when membership of a dynamic group was updated. Optional. Read-only. +func (m *MembershipRuleProcessingStatus) SetLastMembershipUpdated(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastMembershipUpdated = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MembershipRuleProcessingStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Current status of a dynamic group processing. Possible values are: NotStarted, Running, Succeeded, Failed, and UnknownFutureValue. Required. Read-only. +func (m *MembershipRuleProcessingStatus) SetStatus(value *MembershipRuleProcessingStatusDetails)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/membership_rule_processing_status_details.go b/src/internal/connector/graph/betasdk/models/membership_rule_processing_status_details.go new file mode 100644 index 000000000..8861dc132 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_rule_processing_status_details.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MembershipRuleProcessingStatusDetails int + +const ( + NOTSTARTED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS MembershipRuleProcessingStatusDetails = iota + RUNNING_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + FAILED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + SUCCEEDED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + UNSUPPORTEDFUTUREVALUE_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS +) + +func (i MembershipRuleProcessingStatusDetails) String() string { + return []string{"NotStarted", "Running", "Failed", "Succeeded", "UnsupportedFutureValue"}[i] +} +func ParseMembershipRuleProcessingStatusDetails(v string) (interface{}, error) { + result := NOTSTARTED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + switch v { + case "NotStarted": + result = NOTSTARTED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + case "Running": + result = RUNNING_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + case "Failed": + result = FAILED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + case "Succeeded": + result = SUCCEEDED_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + case "UnsupportedFutureValue": + result = UNSUPPORTEDFUTUREVALUE_MEMBERSHIPRULEPROCESSINGSTATUSDETAILS + default: + return 0, errors.New("Unknown MembershipRuleProcessingStatusDetails value: " + v) + } + return &result, nil +} +func SerializeMembershipRuleProcessingStatusDetails(values []MembershipRuleProcessingStatusDetails) []string { + 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/membership_rule_processing_statusable.go b/src/internal/connector/graph/betasdk/models/membership_rule_processing_statusable.go new file mode 100644 index 000000000..31a992955 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/membership_rule_processing_statusable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MembershipRuleProcessingStatusable +type MembershipRuleProcessingStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorMessage()(*string) + GetLastMembershipUpdated()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStatus()(*MembershipRuleProcessingStatusDetails) + SetErrorMessage(value *string)() + SetLastMembershipUpdated(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStatus(value *MembershipRuleProcessingStatusDetails)() +} diff --git a/src/internal/connector/graph/betasdk/models/mention.go b/src/internal/connector/graph/betasdk/models/mention.go new file mode 100644 index 000000000..9147a0089 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mention.go @@ -0,0 +1,243 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Mention provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Mention struct { + Entity + // The name of the application where the mention is created. Optional. Not used and defaulted as null for message. + application *string + // A unique identifier that represents a parent of the resource instance. Optional. Not used and defaulted as null for message. + clientReference *string + // The email information of the user who made the mention. + createdBy EmailAddressable + // The date and time that the mention is created on the client. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A deep web link to the context of the mention in the resource instance. Optional. Not used and defaulted as null for message. + deepLink *string + // The mentioned property + mentioned EmailAddressable + // Optional. Not used and defaulted as null for message. To get the mentions in a message, see the bodyPreview property of the message instead. + mentionText *string + // The date and time that the mention is created on the server. Optional. Not used and defaulted as null for message. + serverCreatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewMention instantiates a new mention and sets the default values. +func NewMention()(*Mention) { + m := &Mention{ + Entity: *NewEntity(), + } + return m +} +// CreateMentionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMentionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMention(), nil +} +// GetApplication gets the application property value. The name of the application where the mention is created. Optional. Not used and defaulted as null for message. +func (m *Mention) GetApplication()(*string) { + return m.application +} +// GetClientReference gets the clientReference property value. A unique identifier that represents a parent of the resource instance. Optional. Not used and defaulted as null for message. +func (m *Mention) GetClientReference()(*string) { + return m.clientReference +} +// GetCreatedBy gets the createdBy property value. The email information of the user who made the mention. +func (m *Mention) GetCreatedBy()(EmailAddressable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time that the mention is created on the client. +func (m *Mention) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDeepLink gets the deepLink property value. A deep web link to the context of the mention in the resource instance. Optional. Not used and defaulted as null for message. +func (m *Mention) GetDeepLink()(*string) { + return m.deepLink +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Mention) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["application"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplication(val) + } + return nil + } + res["clientReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientReference(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(EmailAddressable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["deepLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeepLink(val) + } + return nil + } + res["mentioned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMentioned(val.(EmailAddressable)) + } + return nil + } + res["mentionText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMentionText(val) + } + return nil + } + res["serverCreatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetServerCreatedDateTime(val) + } + return nil + } + return res +} +// GetMentioned gets the mentioned property value. The mentioned property +func (m *Mention) GetMentioned()(EmailAddressable) { + return m.mentioned +} +// GetMentionText gets the mentionText property value. Optional. Not used and defaulted as null for message. To get the mentions in a message, see the bodyPreview property of the message instead. +func (m *Mention) GetMentionText()(*string) { + return m.mentionText +} +// GetServerCreatedDateTime gets the serverCreatedDateTime property value. The date and time that the mention is created on the server. Optional. Not used and defaulted as null for message. +func (m *Mention) GetServerCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.serverCreatedDateTime +} +// Serialize serializes information the current object +func (m *Mention) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("application", m.GetApplication()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientReference", m.GetClientReference()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deepLink", m.GetDeepLink()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mentioned", m.GetMentioned()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mentionText", m.GetMentionText()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("serverCreatedDateTime", m.GetServerCreatedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetApplication sets the application property value. The name of the application where the mention is created. Optional. Not used and defaulted as null for message. +func (m *Mention) SetApplication(value *string)() { + m.application = value +} +// SetClientReference sets the clientReference property value. A unique identifier that represents a parent of the resource instance. Optional. Not used and defaulted as null for message. +func (m *Mention) SetClientReference(value *string)() { + m.clientReference = value +} +// SetCreatedBy sets the createdBy property value. The email information of the user who made the mention. +func (m *Mention) SetCreatedBy(value EmailAddressable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time that the mention is created on the client. +func (m *Mention) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDeepLink sets the deepLink property value. A deep web link to the context of the mention in the resource instance. Optional. Not used and defaulted as null for message. +func (m *Mention) SetDeepLink(value *string)() { + m.deepLink = value +} +// SetMentioned sets the mentioned property value. The mentioned property +func (m *Mention) SetMentioned(value EmailAddressable)() { + m.mentioned = value +} +// SetMentionText sets the mentionText property value. Optional. Not used and defaulted as null for message. To get the mentions in a message, see the bodyPreview property of the message instead. +func (m *Mention) SetMentionText(value *string)() { + m.mentionText = value +} +// SetServerCreatedDateTime sets the serverCreatedDateTime property value. The date and time that the mention is created on the server. Optional. Not used and defaulted as null for message. +func (m *Mention) SetServerCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.serverCreatedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/mention_action.go b/src/internal/connector/graph/betasdk/models/mention_action.go new file mode 100644 index 000000000..c938e0b22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mention_action.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionAction +type MentionAction 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 identities of the users mentioned in this action. + mentionees []IdentitySetable + // The OdataType property + odataType *string +} +// NewMentionAction instantiates a new mentionAction and sets the default values. +func NewMentionAction()(*MentionAction) { + m := &MentionAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMentionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMentionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMentionAction(), 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 *MentionAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MentionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["mentionees"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySetable) + } + m.SetMentionees(res) + } + 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 + } + return res +} +// GetMentionees gets the mentionees property value. The identities of the users mentioned in this action. +func (m *MentionAction) GetMentionees()([]IdentitySetable) { + return m.mentionees +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MentionAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MentionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetMentionees() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMentionees())) + for i, v := range m.GetMentionees() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("mentionees", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MentionAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMentionees sets the mentionees property value. The identities of the users mentioned in this action. +func (m *MentionAction) SetMentionees(value []IdentitySetable)() { + m.mentionees = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MentionAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mention_actionable.go b/src/internal/connector/graph/betasdk/models/mention_actionable.go new file mode 100644 index 000000000..05483081d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mention_actionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionActionable +type MentionActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMentionees()([]IdentitySetable) + GetOdataType()(*string) + SetMentionees(value []IdentitySetable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mention_collection_response.go b/src/internal/connector/graph/betasdk/models/mention_collection_response.go new file mode 100644 index 000000000..b7b3f6992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mention_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionCollectionResponse +type MentionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Mentionable +} +// NewMentionCollectionResponse instantiates a new MentionCollectionResponse and sets the default values. +func NewMentionCollectionResponse()(*MentionCollectionResponse) { + m := &MentionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMentionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMentionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMentionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MentionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMentionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Mentionable, len(val)) + for i, v := range val { + res[i] = v.(Mentionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MentionCollectionResponse) GetValue()([]Mentionable) { + return m.value +} +// Serialize serializes information the current object +func (m *MentionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MentionCollectionResponse) SetValue(value []Mentionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mention_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mention_collection_responseable.go new file mode 100644 index 000000000..89ec159ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mention_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionCollectionResponseable +type MentionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Mentionable) + SetValue(value []Mentionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mentionable.go b/src/internal/connector/graph/betasdk/models/mentionable.go new file mode 100644 index 000000000..27cdda3c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mentionable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Mentionable +type Mentionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplication()(*string) + GetClientReference()(*string) + GetCreatedBy()(EmailAddressable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeepLink()(*string) + GetMentioned()(EmailAddressable) + GetMentionText()(*string) + GetServerCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetApplication(value *string)() + SetClientReference(value *string)() + SetCreatedBy(value EmailAddressable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeepLink(value *string)() + SetMentioned(value EmailAddressable)() + SetMentionText(value *string)() + SetServerCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/mentions_preview.go b/src/internal/connector/graph/betasdk/models/mentions_preview.go new file mode 100644 index 000000000..662029164 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mentions_preview.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionsPreview +type MentionsPreview struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // True if the signed-in user is mentioned in the parent resource instance. Read-only. Supports filter. + isMentioned *bool + // The OdataType property + odataType *string +} +// NewMentionsPreview instantiates a new mentionsPreview and sets the default values. +func NewMentionsPreview()(*MentionsPreview) { + m := &MentionsPreview{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMentionsPreviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMentionsPreviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMentionsPreview(), 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 *MentionsPreview) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MentionsPreview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isMentioned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMentioned(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 + } + return res +} +// GetIsMentioned gets the isMentioned property value. True if the signed-in user is mentioned in the parent resource instance. Read-only. Supports filter. +func (m *MentionsPreview) GetIsMentioned()(*bool) { + return m.isMentioned +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MentionsPreview) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MentionsPreview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isMentioned", m.GetIsMentioned()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MentionsPreview) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsMentioned sets the isMentioned property value. True if the signed-in user is mentioned in the parent resource instance. Read-only. Supports filter. +func (m *MentionsPreview) SetIsMentioned(value *bool)() { + m.isMentioned = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MentionsPreview) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mentions_previewable.go b/src/internal/connector/graph/betasdk/models/mentions_previewable.go new file mode 100644 index 000000000..941275e8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mentions_previewable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MentionsPreviewable +type MentionsPreviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsMentioned()(*bool) + GetOdataType()(*string) + SetIsMentioned(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/message.go b/src/internal/connector/graph/betasdk/models/message.go new file mode 100644 index 000000000..22c58ae27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message.go @@ -0,0 +1,1031 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Message +type Message struct { + OutlookItem + // The fileAttachment and itemAttachment attachments for the message. + attachments []Attachmentable + // The Bcc: recipients for the message. + bccRecipients []Recipientable + // The body of the message. It can be in HTML or text format. Find out about safe HTML in a message body. + body ItemBodyable + // The first 255 characters of the message body. It is in text format. If the message contains instances of mention, this property would contain a concatenation of these mentions as well. + bodyPreview *string + // The Cc: recipients for the message. + ccRecipients []Recipientable + // The ID of the conversation the email belongs to. + conversationId *string + // Indicates the position of the message within the conversation. + conversationIndex []byte + // The collection of open extensions defined for the message. Nullable. + extensions []Extensionable + // The flag value that indicates the status, start date, due date, or completion date for the message. + flag FollowupFlagable + // The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message. + from Recipientable + // Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as . + hasAttachments *bool + // The importance property + importance *Importance + // The inferenceClassification property + inferenceClassification *InferenceClassificationType + // The internetMessageHeaders property + internetMessageHeaders []InternetMessageHeaderable + // The internetMessageId property + internetMessageId *string + // The isDeliveryReceiptRequested property + isDeliveryReceiptRequested *bool + // The isDraft property + isDraft *bool + // The isRead property + isRead *bool + // The isReadReceiptRequested property + isReadReceiptRequested *bool + // A collection of mentions in the message, ordered by the createdDateTime from the newest to the oldest. By default, a GET /messages does not return this property unless you apply $expand on the property. + mentions []Mentionable + // The mentionsPreview property + mentionsPreview MentionsPreviewable + // The collection of multi-value extended properties defined for the message. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The parentFolderId property + parentFolderId *string + // The receivedDateTime property + receivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The replyTo property + replyTo []Recipientable + // The sender property + sender Recipientable + // The sentDateTime property + sentDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The collection of single-value extended properties defined for the message. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The subject property + subject *string + // The toRecipients property + toRecipients []Recipientable + // The uniqueBody property + uniqueBody ItemBodyable + // The unsubscribeData property + unsubscribeData []string + // The unsubscribeEnabled property + unsubscribeEnabled *bool + // The webLink property + webLink *string +} +// NewMessage instantiates a new Message and sets the default values. +func NewMessage()(*Message) { + m := &Message{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.message"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.calendarSharingMessage": + return NewCalendarSharingMessage(), nil + case "#microsoft.graph.eventMessage": + return NewEventMessage(), nil + case "#microsoft.graph.eventMessageRequest": + return NewEventMessageRequest(), nil + case "#microsoft.graph.eventMessageResponse": + return NewEventMessageResponse(), nil + } + } + } + } + return NewMessage(), nil +} +// GetAttachments gets the attachments property value. The fileAttachment and itemAttachment attachments for the message. +func (m *Message) GetAttachments()([]Attachmentable) { + return m.attachments +} +// GetBccRecipients gets the bccRecipients property value. The Bcc: recipients for the message. +func (m *Message) GetBccRecipients()([]Recipientable) { + return m.bccRecipients +} +// GetBody gets the body property value. The body of the message. It can be in HTML or text format. Find out about safe HTML in a message body. +func (m *Message) GetBody()(ItemBodyable) { + return m.body +} +// GetBodyPreview gets the bodyPreview property value. The first 255 characters of the message body. It is in text format. If the message contains instances of mention, this property would contain a concatenation of these mentions as well. +func (m *Message) GetBodyPreview()(*string) { + return m.bodyPreview +} +// GetCcRecipients gets the ccRecipients property value. The Cc: recipients for the message. +func (m *Message) GetCcRecipients()([]Recipientable) { + return m.ccRecipients +} +// GetConversationId gets the conversationId property value. The ID of the conversation the email belongs to. +func (m *Message) GetConversationId()(*string) { + return m.conversationId +} +// GetConversationIndex gets the conversationIndex property value. Indicates the position of the message within the conversation. +func (m *Message) GetConversationIndex()([]byte) { + return m.conversationIndex +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the message. Nullable. +func (m *Message) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Message) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["bccRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetBccRecipients(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["bodyPreview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBodyPreview(val) + } + return nil + } + res["ccRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetCcRecipients(res) + } + return nil + } + res["conversationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConversationId(val) + } + return nil + } + res["conversationIndex"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetConversationIndex(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["flag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFollowupFlagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFlag(val.(FollowupFlagable)) + } + return nil + } + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFrom(val.(Recipientable)) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*Importance)) + } + return nil + } + res["inferenceClassification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInferenceClassificationType) + if err != nil { + return err + } + if val != nil { + m.SetInferenceClassification(val.(*InferenceClassificationType)) + } + return nil + } + res["internetMessageHeaders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInternetMessageHeaderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InternetMessageHeaderable, len(val)) + for i, v := range val { + res[i] = v.(InternetMessageHeaderable) + } + m.SetInternetMessageHeaders(res) + } + return nil + } + res["internetMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternetMessageId(val) + } + return nil + } + res["isDeliveryReceiptRequested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeliveryReceiptRequested(val) + } + return nil + } + res["isDraft"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDraft(val) + } + return nil + } + res["isRead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRead(val) + } + return nil + } + res["isReadReceiptRequested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReadReceiptRequested(val) + } + return nil + } + res["mentions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMentionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Mentionable, len(val)) + for i, v := range val { + res[i] = v.(Mentionable) + } + m.SetMentions(res) + } + return nil + } + res["mentionsPreview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMentionsPreviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMentionsPreview(val.(MentionsPreviewable)) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["parentFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentFolderId(val) + } + return nil + } + res["receivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTime(val) + } + return nil + } + res["replyTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetReplyTo(res) + } + return nil + } + res["sender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSender(val.(Recipientable)) + } + return nil + } + res["sentDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSentDateTime(val) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["toRecipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetToRecipients(res) + } + return nil + } + res["uniqueBody"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUniqueBody(val.(ItemBodyable)) + } + return nil + } + res["unsubscribeData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUnsubscribeData(res) + } + return nil + } + res["unsubscribeEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnsubscribeEnabled(val) + } + return nil + } + res["webLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebLink(val) + } + return nil + } + return res +} +// GetFlag gets the flag property value. The flag value that indicates the status, start date, due date, or completion date for the message. +func (m *Message) GetFlag()(FollowupFlagable) { + return m.flag +} +// GetFrom gets the from property value. The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message. +func (m *Message) GetFrom()(Recipientable) { + return m.from +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as . +func (m *Message) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetImportance gets the importance property value. The importance property +func (m *Message) GetImportance()(*Importance) { + return m.importance +} +// GetInferenceClassification gets the inferenceClassification property value. The inferenceClassification property +func (m *Message) GetInferenceClassification()(*InferenceClassificationType) { + return m.inferenceClassification +} +// GetInternetMessageHeaders gets the internetMessageHeaders property value. The internetMessageHeaders property +func (m *Message) GetInternetMessageHeaders()([]InternetMessageHeaderable) { + return m.internetMessageHeaders +} +// GetInternetMessageId gets the internetMessageId property value. The internetMessageId property +func (m *Message) GetInternetMessageId()(*string) { + return m.internetMessageId +} +// GetIsDeliveryReceiptRequested gets the isDeliveryReceiptRequested property value. The isDeliveryReceiptRequested property +func (m *Message) GetIsDeliveryReceiptRequested()(*bool) { + return m.isDeliveryReceiptRequested +} +// GetIsDraft gets the isDraft property value. The isDraft property +func (m *Message) GetIsDraft()(*bool) { + return m.isDraft +} +// GetIsRead gets the isRead property value. The isRead property +func (m *Message) GetIsRead()(*bool) { + return m.isRead +} +// GetIsReadReceiptRequested gets the isReadReceiptRequested property value. The isReadReceiptRequested property +func (m *Message) GetIsReadReceiptRequested()(*bool) { + return m.isReadReceiptRequested +} +// GetMentions gets the mentions property value. A collection of mentions in the message, ordered by the createdDateTime from the newest to the oldest. By default, a GET /messages does not return this property unless you apply $expand on the property. +func (m *Message) GetMentions()([]Mentionable) { + return m.mentions +} +// GetMentionsPreview gets the mentionsPreview property value. The mentionsPreview property +func (m *Message) GetMentionsPreview()(MentionsPreviewable) { + return m.mentionsPreview +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the message. Nullable. +func (m *Message) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetParentFolderId gets the parentFolderId property value. The parentFolderId property +func (m *Message) GetParentFolderId()(*string) { + return m.parentFolderId +} +// GetReceivedDateTime gets the receivedDateTime property value. The receivedDateTime property +func (m *Message) GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTime +} +// GetReplyTo gets the replyTo property value. The replyTo property +func (m *Message) GetReplyTo()([]Recipientable) { + return m.replyTo +} +// GetSender gets the sender property value. The sender property +func (m *Message) GetSender()(Recipientable) { + return m.sender +} +// GetSentDateTime gets the sentDateTime property value. The sentDateTime property +func (m *Message) GetSentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.sentDateTime +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the message. Nullable. +func (m *Message) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetSubject gets the subject property value. The subject property +func (m *Message) GetSubject()(*string) { + return m.subject +} +// GetToRecipients gets the toRecipients property value. The toRecipients property +func (m *Message) GetToRecipients()([]Recipientable) { + return m.toRecipients +} +// GetUniqueBody gets the uniqueBody property value. The uniqueBody property +func (m *Message) GetUniqueBody()(ItemBodyable) { + return m.uniqueBody +} +// GetUnsubscribeData gets the unsubscribeData property value. The unsubscribeData property +func (m *Message) GetUnsubscribeData()([]string) { + return m.unsubscribeData +} +// GetUnsubscribeEnabled gets the unsubscribeEnabled property value. The unsubscribeEnabled property +func (m *Message) GetUnsubscribeEnabled()(*bool) { + return m.unsubscribeEnabled +} +// GetWebLink gets the webLink property value. The webLink property +func (m *Message) GetWebLink()(*string) { + return m.webLink +} +// Serialize serializes information the current object +func (m *Message) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + if m.GetBccRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBccRecipients())) + for i, v := range m.GetBccRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("bccRecipients", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bodyPreview", m.GetBodyPreview()) + if err != nil { + return err + } + } + if m.GetCcRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCcRecipients())) + for i, v := range m.GetCcRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ccRecipients", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conversationId", m.GetConversationId()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("conversationIndex", m.GetConversationIndex()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("flag", m.GetFlag()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err = writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + if m.GetInferenceClassification() != nil { + cast := (*m.GetInferenceClassification()).String() + err = writer.WriteStringValue("inferenceClassification", &cast) + if err != nil { + return err + } + } + if m.GetInternetMessageHeaders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInternetMessageHeaders())) + for i, v := range m.GetInternetMessageHeaders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("internetMessageHeaders", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("internetMessageId", m.GetInternetMessageId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeliveryReceiptRequested", m.GetIsDeliveryReceiptRequested()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDraft", m.GetIsDraft()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isRead", m.GetIsRead()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReadReceiptRequested", m.GetIsReadReceiptRequested()) + if err != nil { + return err + } + } + if m.GetMentions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMentions())) + for i, v := range m.GetMentions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mentions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("mentionsPreview", m.GetMentionsPreview()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentFolderId", m.GetParentFolderId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTime", m.GetReceivedDateTime()) + if err != nil { + return err + } + } + if m.GetReplyTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReplyTo())) + for i, v := range m.GetReplyTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("replyTo", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sender", m.GetSender()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("sentDateTime", m.GetSentDateTime()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + if m.GetToRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetToRecipients())) + for i, v := range m.GetToRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("toRecipients", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("uniqueBody", m.GetUniqueBody()) + if err != nil { + return err + } + } + if m.GetUnsubscribeData() != nil { + err = writer.WriteCollectionOfStringValues("unsubscribeData", m.GetUnsubscribeData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("unsubscribeEnabled", m.GetUnsubscribeEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webLink", m.GetWebLink()) + if err != nil { + return err + } + } + return nil +} +// SetAttachments sets the attachments property value. The fileAttachment and itemAttachment attachments for the message. +func (m *Message) SetAttachments(value []Attachmentable)() { + m.attachments = value +} +// SetBccRecipients sets the bccRecipients property value. The Bcc: recipients for the message. +func (m *Message) SetBccRecipients(value []Recipientable)() { + m.bccRecipients = value +} +// SetBody sets the body property value. The body of the message. It can be in HTML or text format. Find out about safe HTML in a message body. +func (m *Message) SetBody(value ItemBodyable)() { + m.body = value +} +// SetBodyPreview sets the bodyPreview property value. The first 255 characters of the message body. It is in text format. If the message contains instances of mention, this property would contain a concatenation of these mentions as well. +func (m *Message) SetBodyPreview(value *string)() { + m.bodyPreview = value +} +// SetCcRecipients sets the ccRecipients property value. The Cc: recipients for the message. +func (m *Message) SetCcRecipients(value []Recipientable)() { + m.ccRecipients = value +} +// SetConversationId sets the conversationId property value. The ID of the conversation the email belongs to. +func (m *Message) SetConversationId(value *string)() { + m.conversationId = value +} +// SetConversationIndex sets the conversationIndex property value. Indicates the position of the message within the conversation. +func (m *Message) SetConversationIndex(value []byte)() { + m.conversationIndex = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the message. Nullable. +func (m *Message) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetFlag sets the flag property value. The flag value that indicates the status, start date, due date, or completion date for the message. +func (m *Message) SetFlag(value FollowupFlagable)() { + m.flag = value +} +// SetFrom sets the from property value. The owner of the mailbox from which the message is sent. In most cases, this value is the same as the sender property, except for sharing or delegation scenarios. The value must correspond to the actual mailbox used. Find out more about setting the from and sender properties of a message. +func (m *Message) SetFrom(value Recipientable)() { + m.from = value +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether the message has attachments. This property doesn't include inline attachments, so if a message contains only inline attachments, this property is false. To verify the existence of inline attachments, parse the body property to look for a src attribute, such as . +func (m *Message) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetImportance sets the importance property value. The importance property +func (m *Message) SetImportance(value *Importance)() { + m.importance = value +} +// SetInferenceClassification sets the inferenceClassification property value. The inferenceClassification property +func (m *Message) SetInferenceClassification(value *InferenceClassificationType)() { + m.inferenceClassification = value +} +// SetInternetMessageHeaders sets the internetMessageHeaders property value. The internetMessageHeaders property +func (m *Message) SetInternetMessageHeaders(value []InternetMessageHeaderable)() { + m.internetMessageHeaders = value +} +// SetInternetMessageId sets the internetMessageId property value. The internetMessageId property +func (m *Message) SetInternetMessageId(value *string)() { + m.internetMessageId = value +} +// SetIsDeliveryReceiptRequested sets the isDeliveryReceiptRequested property value. The isDeliveryReceiptRequested property +func (m *Message) SetIsDeliveryReceiptRequested(value *bool)() { + m.isDeliveryReceiptRequested = value +} +// SetIsDraft sets the isDraft property value. The isDraft property +func (m *Message) SetIsDraft(value *bool)() { + m.isDraft = value +} +// SetIsRead sets the isRead property value. The isRead property +func (m *Message) SetIsRead(value *bool)() { + m.isRead = value +} +// SetIsReadReceiptRequested sets the isReadReceiptRequested property value. The isReadReceiptRequested property +func (m *Message) SetIsReadReceiptRequested(value *bool)() { + m.isReadReceiptRequested = value +} +// SetMentions sets the mentions property value. A collection of mentions in the message, ordered by the createdDateTime from the newest to the oldest. By default, a GET /messages does not return this property unless you apply $expand on the property. +func (m *Message) SetMentions(value []Mentionable)() { + m.mentions = value +} +// SetMentionsPreview sets the mentionsPreview property value. The mentionsPreview property +func (m *Message) SetMentionsPreview(value MentionsPreviewable)() { + m.mentionsPreview = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the message. Nullable. +func (m *Message) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetParentFolderId sets the parentFolderId property value. The parentFolderId property +func (m *Message) SetParentFolderId(value *string)() { + m.parentFolderId = value +} +// SetReceivedDateTime sets the receivedDateTime property value. The receivedDateTime property +func (m *Message) SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTime = value +} +// SetReplyTo sets the replyTo property value. The replyTo property +func (m *Message) SetReplyTo(value []Recipientable)() { + m.replyTo = value +} +// SetSender sets the sender property value. The sender property +func (m *Message) SetSender(value Recipientable)() { + m.sender = value +} +// SetSentDateTime sets the sentDateTime property value. The sentDateTime property +func (m *Message) SetSentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.sentDateTime = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the message. Nullable. +func (m *Message) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetSubject sets the subject property value. The subject property +func (m *Message) SetSubject(value *string)() { + m.subject = value +} +// SetToRecipients sets the toRecipients property value. The toRecipients property +func (m *Message) SetToRecipients(value []Recipientable)() { + m.toRecipients = value +} +// SetUniqueBody sets the uniqueBody property value. The uniqueBody property +func (m *Message) SetUniqueBody(value ItemBodyable)() { + m.uniqueBody = value +} +// SetUnsubscribeData sets the unsubscribeData property value. The unsubscribeData property +func (m *Message) SetUnsubscribeData(value []string)() { + m.unsubscribeData = value +} +// SetUnsubscribeEnabled sets the unsubscribeEnabled property value. The unsubscribeEnabled property +func (m *Message) SetUnsubscribeEnabled(value *bool)() { + m.unsubscribeEnabled = value +} +// SetWebLink sets the webLink property value. The webLink property +func (m *Message) SetWebLink(value *string)() { + m.webLink = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_action_flag.go b/src/internal/connector/graph/betasdk/models/message_action_flag.go new file mode 100644 index 000000000..4cf998e39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_action_flag.go @@ -0,0 +1,61 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MessageActionFlag int + +const ( + ANY_MESSAGEACTIONFLAG MessageActionFlag = iota + CALL_MESSAGEACTIONFLAG + DONOTFORWARD_MESSAGEACTIONFLAG + FOLLOWUP_MESSAGEACTIONFLAG + FYI_MESSAGEACTIONFLAG + FORWARD_MESSAGEACTIONFLAG + NORESPONSENECESSARY_MESSAGEACTIONFLAG + READ_MESSAGEACTIONFLAG + REPLY_MESSAGEACTIONFLAG + REPLYTOALL_MESSAGEACTIONFLAG + REVIEW_MESSAGEACTIONFLAG +) + +func (i MessageActionFlag) String() string { + return []string{"any", "call", "doNotForward", "followUp", "fyi", "forward", "noResponseNecessary", "read", "reply", "replyToAll", "review"}[i] +} +func ParseMessageActionFlag(v string) (interface{}, error) { + result := ANY_MESSAGEACTIONFLAG + switch v { + case "any": + result = ANY_MESSAGEACTIONFLAG + case "call": + result = CALL_MESSAGEACTIONFLAG + case "doNotForward": + result = DONOTFORWARD_MESSAGEACTIONFLAG + case "followUp": + result = FOLLOWUP_MESSAGEACTIONFLAG + case "fyi": + result = FYI_MESSAGEACTIONFLAG + case "forward": + result = FORWARD_MESSAGEACTIONFLAG + case "noResponseNecessary": + result = NORESPONSENECESSARY_MESSAGEACTIONFLAG + case "read": + result = READ_MESSAGEACTIONFLAG + case "reply": + result = REPLY_MESSAGEACTIONFLAG + case "replyToAll": + result = REPLYTOALL_MESSAGEACTIONFLAG + case "review": + result = REVIEW_MESSAGEACTIONFLAG + default: + return 0, errors.New("Unknown MessageActionFlag value: " + v) + } + return &result, nil +} +func SerializeMessageActionFlag(values []MessageActionFlag) []string { + 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/message_collection_response.go b/src/internal/connector/graph/betasdk/models/message_collection_response.go new file mode 100644 index 000000000..bada80ee5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageCollectionResponse +type MessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Messageable +} +// NewMessageCollectionResponse instantiates a new MessageCollectionResponse and sets the default values. +func NewMessageCollectionResponse()(*MessageCollectionResponse) { + m := &MessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Messageable, len(val)) + for i, v := range val { + res[i] = v.(Messageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageCollectionResponse) GetValue()([]Messageable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageCollectionResponse) SetValue(value []Messageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_collection_responseable.go new file mode 100644 index 000000000..9f3d63c24 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageCollectionResponseable +type MessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Messageable) + SetValue(value []Messageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_event.go b/src/internal/connector/graph/betasdk/models/message_event.go new file mode 100644 index 000000000..db2fb64f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_event.go @@ -0,0 +1,114 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageEvent +type MessageEvent struct { + Entity + // The dateTime property + dateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The eventType property + eventType *MessageEventType +} +// NewMessageEvent instantiates a new MessageEvent and sets the default values. +func NewMessageEvent()(*MessageEvent) { + m := &MessageEvent{ + Entity: *NewEntity(), + } + return m +} +// CreateMessageEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageEvent(), nil +} +// GetDateTime gets the dateTime property value. The dateTime property +func (m *MessageEvent) GetDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dateTime +} +// GetDescription gets the description property value. The description property +func (m *MessageEvent) GetDescription()(*string) { + return m.description +} +// GetEventType gets the eventType property value. The eventType property +func (m *MessageEvent) GetEventType()(*MessageEventType) { + return m.eventType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["dateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["eventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMessageEventType) + if err != nil { + return err + } + if val != nil { + m.SetEventType(val.(*MessageEventType)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MessageEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("dateTime", m.GetDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetEventType() != nil { + cast := (*m.GetEventType()).String() + err = writer.WriteStringValue("eventType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDateTime sets the dateTime property value. The dateTime property +func (m *MessageEvent) SetDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dateTime = value +} +// SetDescription sets the description property value. The description property +func (m *MessageEvent) SetDescription(value *string)() { + m.description = value +} +// SetEventType sets the eventType property value. The eventType property +func (m *MessageEvent) SetEventType(value *MessageEventType)() { + m.eventType = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_event_collection_response.go b/src/internal/connector/graph/betasdk/models/message_event_collection_response.go new file mode 100644 index 000000000..ba32db47c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageEventCollectionResponse +type MessageEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MessageEventable +} +// NewMessageEventCollectionResponse instantiates a new MessageEventCollectionResponse and sets the default values. +func NewMessageEventCollectionResponse()(*MessageEventCollectionResponse) { + m := &MessageEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageEventable, len(val)) + for i, v := range val { + res[i] = v.(MessageEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageEventCollectionResponse) GetValue()([]MessageEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageEventCollectionResponse) SetValue(value []MessageEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_event_collection_responseable.go new file mode 100644 index 000000000..f21574654 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageEventCollectionResponseable +type MessageEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MessageEventable) + SetValue(value []MessageEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_event_type.go b/src/internal/connector/graph/betasdk/models/message_event_type.go new file mode 100644 index 000000000..cb6b10ff0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_event_type.go @@ -0,0 +1,94 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MessageEventType int + +const ( + RECEIVED_MESSAGEEVENTTYPE MessageEventType = iota + SENT_MESSAGEEVENTTYPE + DELIVERED_MESSAGEEVENTTYPE + FAILED_MESSAGEEVENTTYPE + PROCESSINGFAILED_MESSAGEEVENTTYPE + DISTRIBUTIONGROUPEXPANDED_MESSAGEEVENTTYPE + SUBMITTED_MESSAGEEVENTTYPE + DELAYED_MESSAGEEVENTTYPE + REDIRECTED_MESSAGEEVENTTYPE + RESOLVED_MESSAGEEVENTTYPE + DROPPED_MESSAGEEVENTTYPE + RECIPIENTSADDED_MESSAGEEVENTTYPE + MALWAREDETECTED_MESSAGEEVENTTYPE + MALWAREDETECTEDINMESSAGE_MESSAGEEVENTTYPE + MALWAREDETECTEDINATTACHMENT_MESSAGEEVENTTYPE + TTZAPPED_MESSAGEEVENTTYPE + TTDELIVERED_MESSAGEEVENTTYPE + SPAMDETECTED_MESSAGEEVENTTYPE + TRANSPORTRULETRIGGERED_MESSAGEEVENTTYPE + DLPRULETRIGGERED_MESSAGEEVENTTYPE + JOURNALED_MESSAGEEVENTTYPE + UNKNOWNFUTUREVALUE_MESSAGEEVENTTYPE +) + +func (i MessageEventType) String() string { + return []string{"received", "sent", "delivered", "failed", "processingFailed", "distributionGroupExpanded", "submitted", "delayed", "redirected", "resolved", "dropped", "recipientsAdded", "malwareDetected", "malwareDetectedInMessage", "malwareDetectedInAttachment", "ttZapped", "ttDelivered", "spamDetected", "transportRuleTriggered", "dlpRuleTriggered", "journaled", "unknownFutureValue"}[i] +} +func ParseMessageEventType(v string) (interface{}, error) { + result := RECEIVED_MESSAGEEVENTTYPE + switch v { + case "received": + result = RECEIVED_MESSAGEEVENTTYPE + case "sent": + result = SENT_MESSAGEEVENTTYPE + case "delivered": + result = DELIVERED_MESSAGEEVENTTYPE + case "failed": + result = FAILED_MESSAGEEVENTTYPE + case "processingFailed": + result = PROCESSINGFAILED_MESSAGEEVENTTYPE + case "distributionGroupExpanded": + result = DISTRIBUTIONGROUPEXPANDED_MESSAGEEVENTTYPE + case "submitted": + result = SUBMITTED_MESSAGEEVENTTYPE + case "delayed": + result = DELAYED_MESSAGEEVENTTYPE + case "redirected": + result = REDIRECTED_MESSAGEEVENTTYPE + case "resolved": + result = RESOLVED_MESSAGEEVENTTYPE + case "dropped": + result = DROPPED_MESSAGEEVENTTYPE + case "recipientsAdded": + result = RECIPIENTSADDED_MESSAGEEVENTTYPE + case "malwareDetected": + result = MALWAREDETECTED_MESSAGEEVENTTYPE + case "malwareDetectedInMessage": + result = MALWAREDETECTEDINMESSAGE_MESSAGEEVENTTYPE + case "malwareDetectedInAttachment": + result = MALWAREDETECTEDINATTACHMENT_MESSAGEEVENTTYPE + case "ttZapped": + result = TTZAPPED_MESSAGEEVENTTYPE + case "ttDelivered": + result = TTDELIVERED_MESSAGEEVENTTYPE + case "spamDetected": + result = SPAMDETECTED_MESSAGEEVENTTYPE + case "transportRuleTriggered": + result = TRANSPORTRULETRIGGERED_MESSAGEEVENTTYPE + case "dlpRuleTriggered": + result = DLPRULETRIGGERED_MESSAGEEVENTTYPE + case "journaled": + result = JOURNALED_MESSAGEEVENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MESSAGEEVENTTYPE + default: + return 0, errors.New("Unknown MessageEventType value: " + v) + } + return &result, nil +} +func SerializeMessageEventType(values []MessageEventType) []string { + 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/message_eventable.go b/src/internal/connector/graph/betasdk/models/message_eventable.go new file mode 100644 index 000000000..01d88431e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_eventable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageEventable +type MessageEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetEventType()(*MessageEventType) + SetDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetEventType(value *MessageEventType)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detail.go b/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detail.go new file mode 100644 index 000000000..503edbdea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detail.go @@ -0,0 +1,89 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessagePinnedEventMessageDetail +type MessagePinnedEventMessageDetail struct { + EventMessageDetail + // Date and time when the event occurred. + eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Initiator of the event. + initiator IdentitySetable +} +// NewMessagePinnedEventMessageDetail instantiates a new MessagePinnedEventMessageDetail and sets the default values. +func NewMessagePinnedEventMessageDetail()(*MessagePinnedEventMessageDetail) { + m := &MessagePinnedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.messagePinnedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMessagePinnedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessagePinnedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessagePinnedEventMessageDetail(), nil +} +// GetEventDateTime gets the eventDateTime property value. Date and time when the event occurred. +func (m *MessagePinnedEventMessageDetail) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessagePinnedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["eventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventDateTime(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MessagePinnedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *MessagePinnedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetEventDateTime sets the eventDateTime property value. Date and time when the event occurred. +func (m *MessagePinnedEventMessageDetail) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventDateTime = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MessagePinnedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detailable.go new file mode 100644 index 000000000..243543ccf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_pinned_event_message_detailable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessagePinnedEventMessageDetailable +type MessagePinnedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInitiator()(IdentitySetable) + SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_recipient.go b/src/internal/connector/graph/betasdk/models/message_recipient.go new file mode 100644 index 000000000..8406dfd42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_recipient.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRecipient +type MessageRecipient struct { + Entity + // The deliveryStatus property + deliveryStatus *MessageStatus + // The events property + events []MessageEventable + // The recipientEmail property + recipientEmail *string +} +// NewMessageRecipient instantiates a new MessageRecipient and sets the default values. +func NewMessageRecipient()(*MessageRecipient) { + m := &MessageRecipient{ + Entity: *NewEntity(), + } + return m +} +// CreateMessageRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRecipient(), nil +} +// GetDeliveryStatus gets the deliveryStatus property value. The deliveryStatus property +func (m *MessageRecipient) GetDeliveryStatus()(*MessageStatus) { + return m.deliveryStatus +} +// GetEvents gets the events property value. The events property +func (m *MessageRecipient) GetEvents()([]MessageEventable) { + return m.events +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRecipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deliveryStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMessageStatus) + if err != nil { + return err + } + if val != nil { + m.SetDeliveryStatus(val.(*MessageStatus)) + } + return nil + } + res["events"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageEventable, len(val)) + for i, v := range val { + res[i] = v.(MessageEventable) + } + m.SetEvents(res) + } + return nil + } + res["recipientEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientEmail(val) + } + return nil + } + return res +} +// GetRecipientEmail gets the recipientEmail property value. The recipientEmail property +func (m *MessageRecipient) GetRecipientEmail()(*string) { + return m.recipientEmail +} +// Serialize serializes information the current object +func (m *MessageRecipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDeliveryStatus() != nil { + cast := (*m.GetDeliveryStatus()).String() + err = writer.WriteStringValue("deliveryStatus", &cast) + if err != nil { + return err + } + } + if m.GetEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvents())) + for i, v := range m.GetEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("events", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientEmail", m.GetRecipientEmail()) + if err != nil { + return err + } + } + return nil +} +// SetDeliveryStatus sets the deliveryStatus property value. The deliveryStatus property +func (m *MessageRecipient) SetDeliveryStatus(value *MessageStatus)() { + m.deliveryStatus = value +} +// SetEvents sets the events property value. The events property +func (m *MessageRecipient) SetEvents(value []MessageEventable)() { + m.events = value +} +// SetRecipientEmail sets the recipientEmail property value. The recipientEmail property +func (m *MessageRecipient) SetRecipientEmail(value *string)() { + m.recipientEmail = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_recipient_collection_response.go b/src/internal/connector/graph/betasdk/models/message_recipient_collection_response.go new file mode 100644 index 000000000..2d3932d06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_recipient_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRecipientCollectionResponse +type MessageRecipientCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MessageRecipientable +} +// NewMessageRecipientCollectionResponse instantiates a new MessageRecipientCollectionResponse and sets the default values. +func NewMessageRecipientCollectionResponse()(*MessageRecipientCollectionResponse) { + m := &MessageRecipientCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageRecipientCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRecipientCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRecipientCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRecipientCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageRecipientable, len(val)) + for i, v := range val { + res[i] = v.(MessageRecipientable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageRecipientCollectionResponse) GetValue()([]MessageRecipientable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageRecipientCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageRecipientCollectionResponse) SetValue(value []MessageRecipientable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_recipient_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_recipient_collection_responseable.go new file mode 100644 index 000000000..834e96bfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_recipient_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRecipientCollectionResponseable +type MessageRecipientCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MessageRecipientable) + SetValue(value []MessageRecipientable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_recipientable.go b/src/internal/connector/graph/betasdk/models/message_recipientable.go new file mode 100644 index 000000000..fd51e5a80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_recipientable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRecipientable +type MessageRecipientable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeliveryStatus()(*MessageStatus) + GetEvents()([]MessageEventable) + GetRecipientEmail()(*string) + SetDeliveryStatus(value *MessageStatus)() + SetEvents(value []MessageEventable)() + SetRecipientEmail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule.go b/src/internal/connector/graph/betasdk/models/message_rule.go new file mode 100644 index 000000000..5a97387c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule.go @@ -0,0 +1,242 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRule provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MessageRule struct { + Entity + // Actions to be taken on a message when the corresponding conditions are fulfilled. + actions MessageRuleActionsable + // Conditions that when fulfilled, will trigger the corresponding actions for that rule. + conditions MessageRulePredicatesable + // The display name of the rule. + displayName *string + // Exception conditions for the rule. + exceptions MessageRulePredicatesable + // Indicates whether the rule is in an error condition. Read-only. + hasError *bool + // Indicates whether the rule is enabled to be applied to messages. + isEnabled *bool + // Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API. + isReadOnly *bool + // Indicates the order in which the rule is executed, among other rules. + sequence *int32 +} +// NewMessageRule instantiates a new messageRule and sets the default values. +func NewMessageRule()(*MessageRule) { + m := &MessageRule{ + Entity: *NewEntity(), + } + return m +} +// CreateMessageRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRule(), nil +} +// GetActions gets the actions property value. Actions to be taken on a message when the corresponding conditions are fulfilled. +func (m *MessageRule) GetActions()(MessageRuleActionsable) { + return m.actions +} +// GetConditions gets the conditions property value. Conditions that when fulfilled, will trigger the corresponding actions for that rule. +func (m *MessageRule) GetConditions()(MessageRulePredicatesable) { + return m.conditions +} +// GetDisplayName gets the displayName property value. The display name of the rule. +func (m *MessageRule) GetDisplayName()(*string) { + return m.displayName +} +// GetExceptions gets the exceptions property value. Exception conditions for the rule. +func (m *MessageRule) GetExceptions()(MessageRulePredicatesable) { + return m.exceptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMessageRuleActionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActions(val.(MessageRuleActionsable)) + } + return nil + } + res["conditions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMessageRulePredicatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConditions(val.(MessageRulePredicatesable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["exceptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMessageRulePredicatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExceptions(val.(MessageRulePredicatesable)) + } + return nil + } + res["hasError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasError(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["isReadOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReadOnly(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + return res +} +// GetHasError gets the hasError property value. Indicates whether the rule is in an error condition. Read-only. +func (m *MessageRule) GetHasError()(*bool) { + return m.hasError +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the rule is enabled to be applied to messages. +func (m *MessageRule) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetIsReadOnly gets the isReadOnly property value. Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API. +func (m *MessageRule) GetIsReadOnly()(*bool) { + return m.isReadOnly +} +// GetSequence gets the sequence property value. Indicates the order in which the rule is executed, among other rules. +func (m *MessageRule) GetSequence()(*int32) { + return m.sequence +} +// Serialize serializes information the current object +func (m *MessageRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("actions", m.GetActions()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("conditions", m.GetConditions()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("exceptions", m.GetExceptions()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasError", m.GetHasError()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReadOnly", m.GetIsReadOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. Actions to be taken on a message when the corresponding conditions are fulfilled. +func (m *MessageRule) SetActions(value MessageRuleActionsable)() { + m.actions = value +} +// SetConditions sets the conditions property value. Conditions that when fulfilled, will trigger the corresponding actions for that rule. +func (m *MessageRule) SetConditions(value MessageRulePredicatesable)() { + m.conditions = value +} +// SetDisplayName sets the displayName property value. The display name of the rule. +func (m *MessageRule) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExceptions sets the exceptions property value. Exception conditions for the rule. +func (m *MessageRule) SetExceptions(value MessageRulePredicatesable)() { + m.exceptions = value +} +// SetHasError sets the hasError property value. Indicates whether the rule is in an error condition. Read-only. +func (m *MessageRule) SetHasError(value *bool)() { + m.hasError = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the rule is enabled to be applied to messages. +func (m *MessageRule) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetIsReadOnly sets the isReadOnly property value. Indicates if the rule is read-only and cannot be modified or deleted by the rules REST API. +func (m *MessageRule) SetIsReadOnly(value *bool)() { + m.isReadOnly = value +} +// SetSequence sets the sequence property value. Indicates the order in which the rule is executed, among other rules. +func (m *MessageRule) SetSequence(value *int32)() { + m.sequence = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_actions.go b/src/internal/connector/graph/betasdk/models/message_rule_actions.go new file mode 100644 index 000000000..9d99f5659 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_actions.go @@ -0,0 +1,386 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRuleActions +type MessageRuleActions struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A list of categories to be assigned to a message. + assignCategories []string + // The ID of a folder that a message is to be copied to. + copyToFolder *string + // Indicates whether a message should be moved to the Deleted Items folder. + delete *bool + // The email addresses of the recipients to which a message should be forwarded as an attachment. + forwardAsAttachmentTo []Recipientable + // The email addresses of the recipients to which a message should be forwarded. + forwardTo []Recipientable + // Indicates whether a message should be marked as read. + markAsRead *bool + // Sets the importance of the message, which can be: low, normal, high. + markImportance *Importance + // The ID of the folder that a message will be moved to. + moveToFolder *string + // The OdataType property + odataType *string + // Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder. + permanentDelete *bool + // The email address to which a message should be redirected. + redirectTo []Recipientable + // Indicates whether subsequent rules should be evaluated. + stopProcessingRules *bool +} +// NewMessageRuleActions instantiates a new messageRuleActions and sets the default values. +func NewMessageRuleActions()(*MessageRuleActions) { + m := &MessageRuleActions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMessageRuleActionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRuleActionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRuleActions(), 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 *MessageRuleActions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignCategories gets the assignCategories property value. A list of categories to be assigned to a message. +func (m *MessageRuleActions) GetAssignCategories()([]string) { + return m.assignCategories +} +// GetCopyToFolder gets the copyToFolder property value. The ID of a folder that a message is to be copied to. +func (m *MessageRuleActions) GetCopyToFolder()(*string) { + return m.copyToFolder +} +// GetDelete gets the delete property value. Indicates whether a message should be moved to the Deleted Items folder. +func (m *MessageRuleActions) GetDelete()(*bool) { + return m.delete +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRuleActions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAssignCategories(res) + } + return nil + } + res["copyToFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCopyToFolder(val) + } + return nil + } + res["delete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDelete(val) + } + return nil + } + res["forwardAsAttachmentTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetForwardAsAttachmentTo(res) + } + return nil + } + res["forwardTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetForwardTo(res) + } + return nil + } + res["markAsRead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMarkAsRead(val) + } + return nil + } + res["markImportance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetMarkImportance(val.(*Importance)) + } + return nil + } + res["moveToFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMoveToFolder(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["permanentDelete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPermanentDelete(val) + } + return nil + } + res["redirectTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetRedirectTo(res) + } + return nil + } + res["stopProcessingRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetStopProcessingRules(val) + } + return nil + } + return res +} +// GetForwardAsAttachmentTo gets the forwardAsAttachmentTo property value. The email addresses of the recipients to which a message should be forwarded as an attachment. +func (m *MessageRuleActions) GetForwardAsAttachmentTo()([]Recipientable) { + return m.forwardAsAttachmentTo +} +// GetForwardTo gets the forwardTo property value. The email addresses of the recipients to which a message should be forwarded. +func (m *MessageRuleActions) GetForwardTo()([]Recipientable) { + return m.forwardTo +} +// GetMarkAsRead gets the markAsRead property value. Indicates whether a message should be marked as read. +func (m *MessageRuleActions) GetMarkAsRead()(*bool) { + return m.markAsRead +} +// GetMarkImportance gets the markImportance property value. Sets the importance of the message, which can be: low, normal, high. +func (m *MessageRuleActions) GetMarkImportance()(*Importance) { + return m.markImportance +} +// GetMoveToFolder gets the moveToFolder property value. The ID of the folder that a message will be moved to. +func (m *MessageRuleActions) GetMoveToFolder()(*string) { + return m.moveToFolder +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MessageRuleActions) GetOdataType()(*string) { + return m.odataType +} +// GetPermanentDelete gets the permanentDelete property value. Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder. +func (m *MessageRuleActions) GetPermanentDelete()(*bool) { + return m.permanentDelete +} +// GetRedirectTo gets the redirectTo property value. The email address to which a message should be redirected. +func (m *MessageRuleActions) GetRedirectTo()([]Recipientable) { + return m.redirectTo +} +// GetStopProcessingRules gets the stopProcessingRules property value. Indicates whether subsequent rules should be evaluated. +func (m *MessageRuleActions) GetStopProcessingRules()(*bool) { + return m.stopProcessingRules +} +// Serialize serializes information the current object +func (m *MessageRuleActions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignCategories() != nil { + err := writer.WriteCollectionOfStringValues("assignCategories", m.GetAssignCategories()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("copyToFolder", m.GetCopyToFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("delete", m.GetDelete()) + if err != nil { + return err + } + } + if m.GetForwardAsAttachmentTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetForwardAsAttachmentTo())) + for i, v := range m.GetForwardAsAttachmentTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("forwardAsAttachmentTo", cast) + if err != nil { + return err + } + } + if m.GetForwardTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetForwardTo())) + for i, v := range m.GetForwardTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("forwardTo", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("markAsRead", m.GetMarkAsRead()) + if err != nil { + return err + } + } + if m.GetMarkImportance() != nil { + cast := (*m.GetMarkImportance()).String() + err := writer.WriteStringValue("markImportance", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("moveToFolder", m.GetMoveToFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("permanentDelete", m.GetPermanentDelete()) + if err != nil { + return err + } + } + if m.GetRedirectTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRedirectTo())) + for i, v := range m.GetRedirectTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("redirectTo", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("stopProcessingRules", m.GetStopProcessingRules()) + 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 *MessageRuleActions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignCategories sets the assignCategories property value. A list of categories to be assigned to a message. +func (m *MessageRuleActions) SetAssignCategories(value []string)() { + m.assignCategories = value +} +// SetCopyToFolder sets the copyToFolder property value. The ID of a folder that a message is to be copied to. +func (m *MessageRuleActions) SetCopyToFolder(value *string)() { + m.copyToFolder = value +} +// SetDelete sets the delete property value. Indicates whether a message should be moved to the Deleted Items folder. +func (m *MessageRuleActions) SetDelete(value *bool)() { + m.delete = value +} +// SetForwardAsAttachmentTo sets the forwardAsAttachmentTo property value. The email addresses of the recipients to which a message should be forwarded as an attachment. +func (m *MessageRuleActions) SetForwardAsAttachmentTo(value []Recipientable)() { + m.forwardAsAttachmentTo = value +} +// SetForwardTo sets the forwardTo property value. The email addresses of the recipients to which a message should be forwarded. +func (m *MessageRuleActions) SetForwardTo(value []Recipientable)() { + m.forwardTo = value +} +// SetMarkAsRead sets the markAsRead property value. Indicates whether a message should be marked as read. +func (m *MessageRuleActions) SetMarkAsRead(value *bool)() { + m.markAsRead = value +} +// SetMarkImportance sets the markImportance property value. Sets the importance of the message, which can be: low, normal, high. +func (m *MessageRuleActions) SetMarkImportance(value *Importance)() { + m.markImportance = value +} +// SetMoveToFolder sets the moveToFolder property value. The ID of the folder that a message will be moved to. +func (m *MessageRuleActions) SetMoveToFolder(value *string)() { + m.moveToFolder = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MessageRuleActions) SetOdataType(value *string)() { + m.odataType = value +} +// SetPermanentDelete sets the permanentDelete property value. Indicates whether a message should be permanently deleted and not saved to the Deleted Items folder. +func (m *MessageRuleActions) SetPermanentDelete(value *bool)() { + m.permanentDelete = value +} +// SetRedirectTo sets the redirectTo property value. The email address to which a message should be redirected. +func (m *MessageRuleActions) SetRedirectTo(value []Recipientable)() { + m.redirectTo = value +} +// SetStopProcessingRules sets the stopProcessingRules property value. Indicates whether subsequent rules should be evaluated. +func (m *MessageRuleActions) SetStopProcessingRules(value *bool)() { + m.stopProcessingRules = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_actionsable.go b/src/internal/connector/graph/betasdk/models/message_rule_actionsable.go new file mode 100644 index 000000000..04175978c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_actionsable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRuleActionsable +type MessageRuleActionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignCategories()([]string) + GetCopyToFolder()(*string) + GetDelete()(*bool) + GetForwardAsAttachmentTo()([]Recipientable) + GetForwardTo()([]Recipientable) + GetMarkAsRead()(*bool) + GetMarkImportance()(*Importance) + GetMoveToFolder()(*string) + GetOdataType()(*string) + GetPermanentDelete()(*bool) + GetRedirectTo()([]Recipientable) + GetStopProcessingRules()(*bool) + SetAssignCategories(value []string)() + SetCopyToFolder(value *string)() + SetDelete(value *bool)() + SetForwardAsAttachmentTo(value []Recipientable)() + SetForwardTo(value []Recipientable)() + SetMarkAsRead(value *bool)() + SetMarkImportance(value *Importance)() + SetMoveToFolder(value *string)() + SetOdataType(value *string)() + SetPermanentDelete(value *bool)() + SetRedirectTo(value []Recipientable)() + SetStopProcessingRules(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/message_rule_collection_response.go new file mode 100644 index 000000000..f14045298 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRuleCollectionResponse +type MessageRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MessageRuleable +} +// NewMessageRuleCollectionResponse instantiates a new MessageRuleCollectionResponse and sets the default values. +func NewMessageRuleCollectionResponse()(*MessageRuleCollectionResponse) { + m := &MessageRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageRuleable, len(val)) + for i, v := range val { + res[i] = v.(MessageRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageRuleCollectionResponse) GetValue()([]MessageRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageRuleCollectionResponse) SetValue(value []MessageRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_rule_collection_responseable.go new file mode 100644 index 000000000..4925d3ec3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRuleCollectionResponseable +type MessageRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MessageRuleable) + SetValue(value []MessageRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_predicates.go b/src/internal/connector/graph/betasdk/models/message_rule_predicates.go new file mode 100644 index 000000000..31af3962b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_predicates.go @@ -0,0 +1,898 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRulePredicates +type MessageRulePredicates struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply. + bodyContains []string + // Represents the strings that should appear in the body or subject of an incoming message in order for the condition or exception to apply. + bodyOrSubjectContains []string + // Represents the categories that an incoming message should be labeled with in order for the condition or exception to apply. + categories []string + // Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply. + fromAddresses []Recipientable + // Indicates whether an incoming message must have attachments in order for the condition or exception to apply. + hasAttachments *bool + // Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply. + headerContains []string + // The importance that is stamped on an incoming message in order for the condition or exception to apply: low, normal, high. + importance *Importance + // Indicates whether an incoming message must be an approval request in order for the condition or exception to apply. + isApprovalRequest *bool + // Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply. + isAutomaticForward *bool + // Indicates whether an incoming message must be an auto reply in order for the condition or exception to apply. + isAutomaticReply *bool + // Indicates whether an incoming message must be encrypted in order for the condition or exception to apply. + isEncrypted *bool + // Indicates whether an incoming message must be a meeting request in order for the condition or exception to apply. + isMeetingRequest *bool + // Indicates whether an incoming message must be a meeting response in order for the condition or exception to apply. + isMeetingResponse *bool + // Indicates whether an incoming message must be a non-delivery report in order for the condition or exception to apply. + isNonDeliveryReport *bool + // Indicates whether an incoming message must be permission controlled (RMS-protected) in order for the condition or exception to apply. + isPermissionControlled *bool + // Indicates whether an incoming message must be a read receipt in order for the condition or exception to apply. + isReadReceipt *bool + // Indicates whether an incoming message must be S/MIME-signed in order for the condition or exception to apply. + isSigned *bool + // Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply. + isVoicemail *bool + // Represents the flag-for-action value that appears on an incoming message in order for the condition or exception to apply. The possible values are: any, call, doNotForward, followUp, fyi, forward, noResponseNecessary, read, reply, replyToAll, review. + messageActionFlag *MessageActionFlag + // Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply. + notSentToMe *bool + // The OdataType property + odataType *string + // Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply. + recipientContains []string + // Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply. + senderContains []string + // Represents the sensitivity level that must be stamped on an incoming message in order for the condition or exception to apply. The possible values are: normal, personal, private, confidential. + sensitivity *Sensitivity + // Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply. + sentCcMe *bool + // Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply. + sentOnlyToMe *bool + // Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply. + sentToAddresses []Recipientable + // Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply. + sentToMe *bool + // Indicates whether the owner of the mailbox must be in either a toRecipients or ccRecipients property of an incoming message in order for the condition or exception to apply. + sentToOrCcMe *bool + // Represents the strings that appear in the subject of an incoming message in order for the condition or exception to apply. + subjectContains []string + // Represents the minimum and maximum sizes (in kilobytes) that an incoming message must fall in between in order for the condition or exception to apply. + withinSizeRange SizeRangeable +} +// NewMessageRulePredicates instantiates a new messageRulePredicates and sets the default values. +func NewMessageRulePredicates()(*MessageRulePredicates) { + m := &MessageRulePredicates{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMessageRulePredicatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageRulePredicatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageRulePredicates(), 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 *MessageRulePredicates) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBodyContains gets the bodyContains property value. Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetBodyContains()([]string) { + return m.bodyContains +} +// GetBodyOrSubjectContains gets the bodyOrSubjectContains property value. Represents the strings that should appear in the body or subject of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetBodyOrSubjectContains()([]string) { + return m.bodyOrSubjectContains +} +// GetCategories gets the categories property value. Represents the categories that an incoming message should be labeled with in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetCategories()([]string) { + return m.categories +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageRulePredicates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bodyContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBodyContains(res) + } + return nil + } + res["bodyOrSubjectContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBodyOrSubjectContains(res) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["fromAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetFromAddresses(res) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["headerContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetHeaderContains(res) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*Importance)) + } + return nil + } + res["isApprovalRequest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsApprovalRequest(val) + } + return nil + } + res["isAutomaticForward"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAutomaticForward(val) + } + return nil + } + res["isAutomaticReply"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAutomaticReply(val) + } + return nil + } + res["isEncrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEncrypted(val) + } + return nil + } + res["isMeetingRequest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMeetingRequest(val) + } + return nil + } + res["isMeetingResponse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMeetingResponse(val) + } + return nil + } + res["isNonDeliveryReport"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsNonDeliveryReport(val) + } + return nil + } + res["isPermissionControlled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPermissionControlled(val) + } + return nil + } + res["isReadReceipt"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReadReceipt(val) + } + return nil + } + res["isSigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSigned(val) + } + return nil + } + res["isVoicemail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsVoicemail(val) + } + return nil + } + res["messageActionFlag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMessageActionFlag) + if err != nil { + return err + } + if val != nil { + m.SetMessageActionFlag(val.(*MessageActionFlag)) + } + return nil + } + res["notSentToMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNotSentToMe(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["recipientContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRecipientContains(res) + } + return nil + } + res["senderContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSenderContains(res) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivity) + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val.(*Sensitivity)) + } + return nil + } + res["sentCcMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSentCcMe(val) + } + return nil + } + res["sentOnlyToMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSentOnlyToMe(val) + } + return nil + } + res["sentToAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetSentToAddresses(res) + } + return nil + } + res["sentToMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSentToMe(val) + } + return nil + } + res["sentToOrCcMe"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSentToOrCcMe(val) + } + return nil + } + res["subjectContains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSubjectContains(res) + } + return nil + } + res["withinSizeRange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSizeRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWithinSizeRange(val.(SizeRangeable)) + } + return nil + } + return res +} +// GetFromAddresses gets the fromAddresses property value. Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetFromAddresses()([]Recipientable) { + return m.fromAddresses +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether an incoming message must have attachments in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetHeaderContains gets the headerContains property value. Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetHeaderContains()([]string) { + return m.headerContains +} +// GetImportance gets the importance property value. The importance that is stamped on an incoming message in order for the condition or exception to apply: low, normal, high. +func (m *MessageRulePredicates) GetImportance()(*Importance) { + return m.importance +} +// GetIsApprovalRequest gets the isApprovalRequest property value. Indicates whether an incoming message must be an approval request in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsApprovalRequest()(*bool) { + return m.isApprovalRequest +} +// GetIsAutomaticForward gets the isAutomaticForward property value. Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsAutomaticForward()(*bool) { + return m.isAutomaticForward +} +// GetIsAutomaticReply gets the isAutomaticReply property value. Indicates whether an incoming message must be an auto reply in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsAutomaticReply()(*bool) { + return m.isAutomaticReply +} +// GetIsEncrypted gets the isEncrypted property value. Indicates whether an incoming message must be encrypted in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsEncrypted()(*bool) { + return m.isEncrypted +} +// GetIsMeetingRequest gets the isMeetingRequest property value. Indicates whether an incoming message must be a meeting request in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsMeetingRequest()(*bool) { + return m.isMeetingRequest +} +// GetIsMeetingResponse gets the isMeetingResponse property value. Indicates whether an incoming message must be a meeting response in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsMeetingResponse()(*bool) { + return m.isMeetingResponse +} +// GetIsNonDeliveryReport gets the isNonDeliveryReport property value. Indicates whether an incoming message must be a non-delivery report in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsNonDeliveryReport()(*bool) { + return m.isNonDeliveryReport +} +// GetIsPermissionControlled gets the isPermissionControlled property value. Indicates whether an incoming message must be permission controlled (RMS-protected) in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsPermissionControlled()(*bool) { + return m.isPermissionControlled +} +// GetIsReadReceipt gets the isReadReceipt property value. Indicates whether an incoming message must be a read receipt in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsReadReceipt()(*bool) { + return m.isReadReceipt +} +// GetIsSigned gets the isSigned property value. Indicates whether an incoming message must be S/MIME-signed in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsSigned()(*bool) { + return m.isSigned +} +// GetIsVoicemail gets the isVoicemail property value. Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetIsVoicemail()(*bool) { + return m.isVoicemail +} +// GetMessageActionFlag gets the messageActionFlag property value. Represents the flag-for-action value that appears on an incoming message in order for the condition or exception to apply. The possible values are: any, call, doNotForward, followUp, fyi, forward, noResponseNecessary, read, reply, replyToAll, review. +func (m *MessageRulePredicates) GetMessageActionFlag()(*MessageActionFlag) { + return m.messageActionFlag +} +// GetNotSentToMe gets the notSentToMe property value. Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetNotSentToMe()(*bool) { + return m.notSentToMe +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MessageRulePredicates) GetOdataType()(*string) { + return m.odataType +} +// GetRecipientContains gets the recipientContains property value. Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetRecipientContains()([]string) { + return m.recipientContains +} +// GetSenderContains gets the senderContains property value. Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSenderContains()([]string) { + return m.senderContains +} +// GetSensitivity gets the sensitivity property value. Represents the sensitivity level that must be stamped on an incoming message in order for the condition or exception to apply. The possible values are: normal, personal, private, confidential. +func (m *MessageRulePredicates) GetSensitivity()(*Sensitivity) { + return m.sensitivity +} +// GetSentCcMe gets the sentCcMe property value. Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSentCcMe()(*bool) { + return m.sentCcMe +} +// GetSentOnlyToMe gets the sentOnlyToMe property value. Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSentOnlyToMe()(*bool) { + return m.sentOnlyToMe +} +// GetSentToAddresses gets the sentToAddresses property value. Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSentToAddresses()([]Recipientable) { + return m.sentToAddresses +} +// GetSentToMe gets the sentToMe property value. Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSentToMe()(*bool) { + return m.sentToMe +} +// GetSentToOrCcMe gets the sentToOrCcMe property value. Indicates whether the owner of the mailbox must be in either a toRecipients or ccRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSentToOrCcMe()(*bool) { + return m.sentToOrCcMe +} +// GetSubjectContains gets the subjectContains property value. Represents the strings that appear in the subject of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetSubjectContains()([]string) { + return m.subjectContains +} +// GetWithinSizeRange gets the withinSizeRange property value. Represents the minimum and maximum sizes (in kilobytes) that an incoming message must fall in between in order for the condition or exception to apply. +func (m *MessageRulePredicates) GetWithinSizeRange()(SizeRangeable) { + return m.withinSizeRange +} +// Serialize serializes information the current object +func (m *MessageRulePredicates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBodyContains() != nil { + err := writer.WriteCollectionOfStringValues("bodyContains", m.GetBodyContains()) + if err != nil { + return err + } + } + if m.GetBodyOrSubjectContains() != nil { + err := writer.WriteCollectionOfStringValues("bodyOrSubjectContains", m.GetBodyOrSubjectContains()) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + err := writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + if m.GetFromAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFromAddresses())) + for i, v := range m.GetFromAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("fromAddresses", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + if m.GetHeaderContains() != nil { + err := writer.WriteCollectionOfStringValues("headerContains", m.GetHeaderContains()) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err := writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isApprovalRequest", m.GetIsApprovalRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAutomaticForward", m.GetIsAutomaticForward()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAutomaticReply", m.GetIsAutomaticReply()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEncrypted", m.GetIsEncrypted()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isMeetingRequest", m.GetIsMeetingRequest()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isMeetingResponse", m.GetIsMeetingResponse()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isNonDeliveryReport", m.GetIsNonDeliveryReport()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPermissionControlled", m.GetIsPermissionControlled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isReadReceipt", m.GetIsReadReceipt()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSigned", m.GetIsSigned()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isVoicemail", m.GetIsVoicemail()) + if err != nil { + return err + } + } + if m.GetMessageActionFlag() != nil { + cast := (*m.GetMessageActionFlag()).String() + err := writer.WriteStringValue("messageActionFlag", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("notSentToMe", m.GetNotSentToMe()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecipientContains() != nil { + err := writer.WriteCollectionOfStringValues("recipientContains", m.GetRecipientContains()) + if err != nil { + return err + } + } + if m.GetSenderContains() != nil { + err := writer.WriteCollectionOfStringValues("senderContains", m.GetSenderContains()) + if err != nil { + return err + } + } + if m.GetSensitivity() != nil { + cast := (*m.GetSensitivity()).String() + err := writer.WriteStringValue("sensitivity", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sentCcMe", m.GetSentCcMe()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sentOnlyToMe", m.GetSentOnlyToMe()) + if err != nil { + return err + } + } + if m.GetSentToAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSentToAddresses())) + for i, v := range m.GetSentToAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("sentToAddresses", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sentToMe", m.GetSentToMe()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("sentToOrCcMe", m.GetSentToOrCcMe()) + if err != nil { + return err + } + } + if m.GetSubjectContains() != nil { + err := writer.WriteCollectionOfStringValues("subjectContains", m.GetSubjectContains()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("withinSizeRange", m.GetWithinSizeRange()) + 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 *MessageRulePredicates) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBodyContains sets the bodyContains property value. Represents the strings that should appear in the body of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetBodyContains(value []string)() { + m.bodyContains = value +} +// SetBodyOrSubjectContains sets the bodyOrSubjectContains property value. Represents the strings that should appear in the body or subject of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetBodyOrSubjectContains(value []string)() { + m.bodyOrSubjectContains = value +} +// SetCategories sets the categories property value. Represents the categories that an incoming message should be labeled with in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetCategories(value []string)() { + m.categories = value +} +// SetFromAddresses sets the fromAddresses property value. Represents the specific sender email addresses of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetFromAddresses(value []Recipientable)() { + m.fromAddresses = value +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether an incoming message must have attachments in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetHeaderContains sets the headerContains property value. Represents the strings that appear in the headers of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetHeaderContains(value []string)() { + m.headerContains = value +} +// SetImportance sets the importance property value. The importance that is stamped on an incoming message in order for the condition or exception to apply: low, normal, high. +func (m *MessageRulePredicates) SetImportance(value *Importance)() { + m.importance = value +} +// SetIsApprovalRequest sets the isApprovalRequest property value. Indicates whether an incoming message must be an approval request in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsApprovalRequest(value *bool)() { + m.isApprovalRequest = value +} +// SetIsAutomaticForward sets the isAutomaticForward property value. Indicates whether an incoming message must be automatically forwarded in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsAutomaticForward(value *bool)() { + m.isAutomaticForward = value +} +// SetIsAutomaticReply sets the isAutomaticReply property value. Indicates whether an incoming message must be an auto reply in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsAutomaticReply(value *bool)() { + m.isAutomaticReply = value +} +// SetIsEncrypted sets the isEncrypted property value. Indicates whether an incoming message must be encrypted in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsEncrypted(value *bool)() { + m.isEncrypted = value +} +// SetIsMeetingRequest sets the isMeetingRequest property value. Indicates whether an incoming message must be a meeting request in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsMeetingRequest(value *bool)() { + m.isMeetingRequest = value +} +// SetIsMeetingResponse sets the isMeetingResponse property value. Indicates whether an incoming message must be a meeting response in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsMeetingResponse(value *bool)() { + m.isMeetingResponse = value +} +// SetIsNonDeliveryReport sets the isNonDeliveryReport property value. Indicates whether an incoming message must be a non-delivery report in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsNonDeliveryReport(value *bool)() { + m.isNonDeliveryReport = value +} +// SetIsPermissionControlled sets the isPermissionControlled property value. Indicates whether an incoming message must be permission controlled (RMS-protected) in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsPermissionControlled(value *bool)() { + m.isPermissionControlled = value +} +// SetIsReadReceipt sets the isReadReceipt property value. Indicates whether an incoming message must be a read receipt in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsReadReceipt(value *bool)() { + m.isReadReceipt = value +} +// SetIsSigned sets the isSigned property value. Indicates whether an incoming message must be S/MIME-signed in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsSigned(value *bool)() { + m.isSigned = value +} +// SetIsVoicemail sets the isVoicemail property value. Indicates whether an incoming message must be a voice mail in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetIsVoicemail(value *bool)() { + m.isVoicemail = value +} +// SetMessageActionFlag sets the messageActionFlag property value. Represents the flag-for-action value that appears on an incoming message in order for the condition or exception to apply. The possible values are: any, call, doNotForward, followUp, fyi, forward, noResponseNecessary, read, reply, replyToAll, review. +func (m *MessageRulePredicates) SetMessageActionFlag(value *MessageActionFlag)() { + m.messageActionFlag = value +} +// SetNotSentToMe sets the notSentToMe property value. Indicates whether the owner of the mailbox must not be a recipient of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetNotSentToMe(value *bool)() { + m.notSentToMe = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MessageRulePredicates) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecipientContains sets the recipientContains property value. Represents the strings that appear in either the toRecipients or ccRecipients properties of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetRecipientContains(value []string)() { + m.recipientContains = value +} +// SetSenderContains sets the senderContains property value. Represents the strings that appear in the from property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSenderContains(value []string)() { + m.senderContains = value +} +// SetSensitivity sets the sensitivity property value. Represents the sensitivity level that must be stamped on an incoming message in order for the condition or exception to apply. The possible values are: normal, personal, private, confidential. +func (m *MessageRulePredicates) SetSensitivity(value *Sensitivity)() { + m.sensitivity = value +} +// SetSentCcMe sets the sentCcMe property value. Indicates whether the owner of the mailbox must be in the ccRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSentCcMe(value *bool)() { + m.sentCcMe = value +} +// SetSentOnlyToMe sets the sentOnlyToMe property value. Indicates whether the owner of the mailbox must be the only recipient in an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSentOnlyToMe(value *bool)() { + m.sentOnlyToMe = value +} +// SetSentToAddresses sets the sentToAddresses property value. Represents the email addresses that an incoming message must have been sent to in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSentToAddresses(value []Recipientable)() { + m.sentToAddresses = value +} +// SetSentToMe sets the sentToMe property value. Indicates whether the owner of the mailbox must be in the toRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSentToMe(value *bool)() { + m.sentToMe = value +} +// SetSentToOrCcMe sets the sentToOrCcMe property value. Indicates whether the owner of the mailbox must be in either a toRecipients or ccRecipients property of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSentToOrCcMe(value *bool)() { + m.sentToOrCcMe = value +} +// SetSubjectContains sets the subjectContains property value. Represents the strings that appear in the subject of an incoming message in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetSubjectContains(value []string)() { + m.subjectContains = value +} +// SetWithinSizeRange sets the withinSizeRange property value. Represents the minimum and maximum sizes (in kilobytes) that an incoming message must fall in between in order for the condition or exception to apply. +func (m *MessageRulePredicates) SetWithinSizeRange(value SizeRangeable)() { + m.withinSizeRange = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_rule_predicatesable.go b/src/internal/connector/graph/betasdk/models/message_rule_predicatesable.go new file mode 100644 index 000000000..c8cae9bcc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_rule_predicatesable.go @@ -0,0 +1,73 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRulePredicatesable +type MessageRulePredicatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBodyContains()([]string) + GetBodyOrSubjectContains()([]string) + GetCategories()([]string) + GetFromAddresses()([]Recipientable) + GetHasAttachments()(*bool) + GetHeaderContains()([]string) + GetImportance()(*Importance) + GetIsApprovalRequest()(*bool) + GetIsAutomaticForward()(*bool) + GetIsAutomaticReply()(*bool) + GetIsEncrypted()(*bool) + GetIsMeetingRequest()(*bool) + GetIsMeetingResponse()(*bool) + GetIsNonDeliveryReport()(*bool) + GetIsPermissionControlled()(*bool) + GetIsReadReceipt()(*bool) + GetIsSigned()(*bool) + GetIsVoicemail()(*bool) + GetMessageActionFlag()(*MessageActionFlag) + GetNotSentToMe()(*bool) + GetOdataType()(*string) + GetRecipientContains()([]string) + GetSenderContains()([]string) + GetSensitivity()(*Sensitivity) + GetSentCcMe()(*bool) + GetSentOnlyToMe()(*bool) + GetSentToAddresses()([]Recipientable) + GetSentToMe()(*bool) + GetSentToOrCcMe()(*bool) + GetSubjectContains()([]string) + GetWithinSizeRange()(SizeRangeable) + SetBodyContains(value []string)() + SetBodyOrSubjectContains(value []string)() + SetCategories(value []string)() + SetFromAddresses(value []Recipientable)() + SetHasAttachments(value *bool)() + SetHeaderContains(value []string)() + SetImportance(value *Importance)() + SetIsApprovalRequest(value *bool)() + SetIsAutomaticForward(value *bool)() + SetIsAutomaticReply(value *bool)() + SetIsEncrypted(value *bool)() + SetIsMeetingRequest(value *bool)() + SetIsMeetingResponse(value *bool)() + SetIsNonDeliveryReport(value *bool)() + SetIsPermissionControlled(value *bool)() + SetIsReadReceipt(value *bool)() + SetIsSigned(value *bool)() + SetIsVoicemail(value *bool)() + SetMessageActionFlag(value *MessageActionFlag)() + SetNotSentToMe(value *bool)() + SetOdataType(value *string)() + SetRecipientContains(value []string)() + SetSenderContains(value []string)() + SetSensitivity(value *Sensitivity)() + SetSentCcMe(value *bool)() + SetSentOnlyToMe(value *bool)() + SetSentToAddresses(value []Recipientable)() + SetSentToMe(value *bool)() + SetSentToOrCcMe(value *bool)() + SetSubjectContains(value []string)() + SetWithinSizeRange(value SizeRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_ruleable.go b/src/internal/connector/graph/betasdk/models/message_ruleable.go new file mode 100644 index 000000000..ece1531fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_ruleable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageRuleable +type MessageRuleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()(MessageRuleActionsable) + GetConditions()(MessageRulePredicatesable) + GetDisplayName()(*string) + GetExceptions()(MessageRulePredicatesable) + GetHasError()(*bool) + GetIsEnabled()(*bool) + GetIsReadOnly()(*bool) + GetSequence()(*int32) + SetActions(value MessageRuleActionsable)() + SetConditions(value MessageRulePredicatesable)() + SetDisplayName(value *string)() + SetExceptions(value MessageRulePredicatesable)() + SetHasError(value *bool)() + SetIsEnabled(value *bool)() + SetIsReadOnly(value *bool)() + SetSequence(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_security_state.go b/src/internal/connector/graph/betasdk/models/message_security_state.go new file mode 100644 index 000000000..b0deb27c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_security_state.go @@ -0,0 +1,306 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageSecurityState +type MessageSecurityState 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 connectingIP property + connectingIP *string + // The deliveryAction property + deliveryAction *string + // The deliveryLocation property + deliveryLocation *string + // The directionality property + directionality *string + // The internetMessageId property + internetMessageId *string + // The messageFingerprint property + messageFingerprint *string + // The messageReceivedDateTime property + messageReceivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The messageSubject property + messageSubject *string + // The networkMessageId property + networkMessageId *string + // The OdataType property + odataType *string +} +// NewMessageSecurityState instantiates a new messageSecurityState and sets the default values. +func NewMessageSecurityState()(*MessageSecurityState) { + m := &MessageSecurityState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMessageSecurityStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageSecurityStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageSecurityState(), 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 *MessageSecurityState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConnectingIP gets the connectingIP property value. The connectingIP property +func (m *MessageSecurityState) GetConnectingIP()(*string) { + return m.connectingIP +} +// GetDeliveryAction gets the deliveryAction property value. The deliveryAction property +func (m *MessageSecurityState) GetDeliveryAction()(*string) { + return m.deliveryAction +} +// GetDeliveryLocation gets the deliveryLocation property value. The deliveryLocation property +func (m *MessageSecurityState) GetDeliveryLocation()(*string) { + return m.deliveryLocation +} +// GetDirectionality gets the directionality property value. The directionality property +func (m *MessageSecurityState) GetDirectionality()(*string) { + return m.directionality +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageSecurityState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["connectingIP"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectingIP(val) + } + return nil + } + res["deliveryAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveryAction(val) + } + return nil + } + res["deliveryLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveryLocation(val) + } + return nil + } + res["directionality"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDirectionality(val) + } + return nil + } + res["internetMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternetMessageId(val) + } + return nil + } + res["messageFingerprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageFingerprint(val) + } + return nil + } + res["messageReceivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageReceivedDateTime(val) + } + return nil + } + res["messageSubject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageSubject(val) + } + return nil + } + res["networkMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkMessageId(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 + } + return res +} +// GetInternetMessageId gets the internetMessageId property value. The internetMessageId property +func (m *MessageSecurityState) GetInternetMessageId()(*string) { + return m.internetMessageId +} +// GetMessageFingerprint gets the messageFingerprint property value. The messageFingerprint property +func (m *MessageSecurityState) GetMessageFingerprint()(*string) { + return m.messageFingerprint +} +// GetMessageReceivedDateTime gets the messageReceivedDateTime property value. The messageReceivedDateTime property +func (m *MessageSecurityState) GetMessageReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.messageReceivedDateTime +} +// GetMessageSubject gets the messageSubject property value. The messageSubject property +func (m *MessageSecurityState) GetMessageSubject()(*string) { + return m.messageSubject +} +// GetNetworkMessageId gets the networkMessageId property value. The networkMessageId property +func (m *MessageSecurityState) GetNetworkMessageId()(*string) { + return m.networkMessageId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MessageSecurityState) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MessageSecurityState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("connectingIP", m.GetConnectingIP()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deliveryAction", m.GetDeliveryAction()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deliveryLocation", m.GetDeliveryLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("directionality", m.GetDirectionality()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("internetMessageId", m.GetInternetMessageId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("messageFingerprint", m.GetMessageFingerprint()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("messageReceivedDateTime", m.GetMessageReceivedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("messageSubject", m.GetMessageSubject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("networkMessageId", m.GetNetworkMessageId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MessageSecurityState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConnectingIP sets the connectingIP property value. The connectingIP property +func (m *MessageSecurityState) SetConnectingIP(value *string)() { + m.connectingIP = value +} +// SetDeliveryAction sets the deliveryAction property value. The deliveryAction property +func (m *MessageSecurityState) SetDeliveryAction(value *string)() { + m.deliveryAction = value +} +// SetDeliveryLocation sets the deliveryLocation property value. The deliveryLocation property +func (m *MessageSecurityState) SetDeliveryLocation(value *string)() { + m.deliveryLocation = value +} +// SetDirectionality sets the directionality property value. The directionality property +func (m *MessageSecurityState) SetDirectionality(value *string)() { + m.directionality = value +} +// SetInternetMessageId sets the internetMessageId property value. The internetMessageId property +func (m *MessageSecurityState) SetInternetMessageId(value *string)() { + m.internetMessageId = value +} +// SetMessageFingerprint sets the messageFingerprint property value. The messageFingerprint property +func (m *MessageSecurityState) SetMessageFingerprint(value *string)() { + m.messageFingerprint = value +} +// SetMessageReceivedDateTime sets the messageReceivedDateTime property value. The messageReceivedDateTime property +func (m *MessageSecurityState) SetMessageReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.messageReceivedDateTime = value +} +// SetMessageSubject sets the messageSubject property value. The messageSubject property +func (m *MessageSecurityState) SetMessageSubject(value *string)() { + m.messageSubject = value +} +// SetNetworkMessageId sets the networkMessageId property value. The networkMessageId property +func (m *MessageSecurityState) SetNetworkMessageId(value *string)() { + m.networkMessageId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MessageSecurityState) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_security_state_collection_response.go b/src/internal/connector/graph/betasdk/models/message_security_state_collection_response.go new file mode 100644 index 000000000..faa48afa0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_security_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageSecurityStateCollectionResponse +type MessageSecurityStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MessageSecurityStateable +} +// NewMessageSecurityStateCollectionResponse instantiates a new MessageSecurityStateCollectionResponse and sets the default values. +func NewMessageSecurityStateCollectionResponse()(*MessageSecurityStateCollectionResponse) { + m := &MessageSecurityStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageSecurityStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageSecurityStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageSecurityStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageSecurityStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageSecurityStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageSecurityStateable, len(val)) + for i, v := range val { + res[i] = v.(MessageSecurityStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageSecurityStateCollectionResponse) GetValue()([]MessageSecurityStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageSecurityStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageSecurityStateCollectionResponse) SetValue(value []MessageSecurityStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_security_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_security_state_collection_responseable.go new file mode 100644 index 000000000..27372e69b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_security_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageSecurityStateCollectionResponseable +type MessageSecurityStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MessageSecurityStateable) + SetValue(value []MessageSecurityStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_security_stateable.go b/src/internal/connector/graph/betasdk/models/message_security_stateable.go new file mode 100644 index 000000000..d99af54e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_security_stateable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageSecurityStateable +type MessageSecurityStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectingIP()(*string) + GetDeliveryAction()(*string) + GetDeliveryLocation()(*string) + GetDirectionality()(*string) + GetInternetMessageId()(*string) + GetMessageFingerprint()(*string) + GetMessageReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMessageSubject()(*string) + GetNetworkMessageId()(*string) + GetOdataType()(*string) + SetConnectingIP(value *string)() + SetDeliveryAction(value *string)() + SetDeliveryLocation(value *string)() + SetDirectionality(value *string)() + SetInternetMessageId(value *string)() + SetMessageFingerprint(value *string)() + SetMessageReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMessageSubject(value *string)() + SetNetworkMessageId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_status.go b/src/internal/connector/graph/betasdk/models/message_status.go new file mode 100644 index 000000000..5a428c209 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_status.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MessageStatus int + +const ( + GETTINGSTATUS_MESSAGESTATUS MessageStatus = iota + PENDING_MESSAGESTATUS + FAILED_MESSAGESTATUS + DELIVERED_MESSAGESTATUS + EXPANDED_MESSAGESTATUS + QUARANTINED_MESSAGESTATUS + FILTEREDASSPAM_MESSAGESTATUS + UNKNOWNFUTUREVALUE_MESSAGESTATUS +) + +func (i MessageStatus) String() string { + return []string{"gettingStatus", "pending", "failed", "delivered", "expanded", "quarantined", "filteredAsSpam", "unknownFutureValue"}[i] +} +func ParseMessageStatus(v string) (interface{}, error) { + result := GETTINGSTATUS_MESSAGESTATUS + switch v { + case "gettingStatus": + result = GETTINGSTATUS_MESSAGESTATUS + case "pending": + result = PENDING_MESSAGESTATUS + case "failed": + result = FAILED_MESSAGESTATUS + case "delivered": + result = DELIVERED_MESSAGESTATUS + case "expanded": + result = EXPANDED_MESSAGESTATUS + case "quarantined": + result = QUARANTINED_MESSAGESTATUS + case "filteredAsSpam": + result = FILTEREDASSPAM_MESSAGESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MESSAGESTATUS + default: + return 0, errors.New("Unknown MessageStatus value: " + v) + } + return &result, nil +} +func SerializeMessageStatus(values []MessageStatus) []string { + 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/message_trace.go b/src/internal/connector/graph/betasdk/models/message_trace.go new file mode 100644 index 000000000..ba56d72cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_trace.go @@ -0,0 +1,251 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageTrace +type MessageTrace struct { + Entity + // The destinationIPAddress property + destinationIPAddress *string + // The messageId property + messageId *string + // The receivedDateTime property + receivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The recipients property + recipients []MessageRecipientable + // The senderEmail property + senderEmail *string + // The size property + size *int32 + // The sourceIPAddress property + sourceIPAddress *string + // The subject property + subject *string +} +// NewMessageTrace instantiates a new MessageTrace and sets the default values. +func NewMessageTrace()(*MessageTrace) { + m := &MessageTrace{ + Entity: *NewEntity(), + } + return m +} +// CreateMessageTraceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageTraceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageTrace(), nil +} +// GetDestinationIPAddress gets the destinationIPAddress property value. The destinationIPAddress property +func (m *MessageTrace) GetDestinationIPAddress()(*string) { + return m.destinationIPAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageTrace) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["destinationIPAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationIPAddress(val) + } + return nil + } + res["messageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageId(val) + } + return nil + } + res["receivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTime(val) + } + return nil + } + res["recipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageRecipientable, len(val)) + for i, v := range val { + res[i] = v.(MessageRecipientable) + } + m.SetRecipients(res) + } + return nil + } + res["senderEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderEmail(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["sourceIPAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceIPAddress(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetMessageId gets the messageId property value. The messageId property +func (m *MessageTrace) GetMessageId()(*string) { + return m.messageId +} +// GetReceivedDateTime gets the receivedDateTime property value. The receivedDateTime property +func (m *MessageTrace) GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTime +} +// GetRecipients gets the recipients property value. The recipients property +func (m *MessageTrace) GetRecipients()([]MessageRecipientable) { + return m.recipients +} +// GetSenderEmail gets the senderEmail property value. The senderEmail property +func (m *MessageTrace) GetSenderEmail()(*string) { + return m.senderEmail +} +// GetSize gets the size property value. The size property +func (m *MessageTrace) GetSize()(*int32) { + return m.size +} +// GetSourceIPAddress gets the sourceIPAddress property value. The sourceIPAddress property +func (m *MessageTrace) GetSourceIPAddress()(*string) { + return m.sourceIPAddress +} +// GetSubject gets the subject property value. The subject property +func (m *MessageTrace) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *MessageTrace) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("destinationIPAddress", m.GetDestinationIPAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("messageId", m.GetMessageId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTime", m.GetReceivedDateTime()) + if err != nil { + return err + } + } + if m.GetRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecipients())) + for i, v := range m.GetRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("recipients", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("senderEmail", m.GetSenderEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceIPAddress", m.GetSourceIPAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetDestinationIPAddress sets the destinationIPAddress property value. The destinationIPAddress property +func (m *MessageTrace) SetDestinationIPAddress(value *string)() { + m.destinationIPAddress = value +} +// SetMessageId sets the messageId property value. The messageId property +func (m *MessageTrace) SetMessageId(value *string)() { + m.messageId = value +} +// SetReceivedDateTime sets the receivedDateTime property value. The receivedDateTime property +func (m *MessageTrace) SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTime = value +} +// SetRecipients sets the recipients property value. The recipients property +func (m *MessageTrace) SetRecipients(value []MessageRecipientable)() { + m.recipients = value +} +// SetSenderEmail sets the senderEmail property value. The senderEmail property +func (m *MessageTrace) SetSenderEmail(value *string)() { + m.senderEmail = value +} +// SetSize sets the size property value. The size property +func (m *MessageTrace) SetSize(value *int32)() { + m.size = value +} +// SetSourceIPAddress sets the sourceIPAddress property value. The sourceIPAddress property +func (m *MessageTrace) SetSourceIPAddress(value *string)() { + m.sourceIPAddress = value +} +// SetSubject sets the subject property value. The subject property +func (m *MessageTrace) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_trace_collection_response.go b/src/internal/connector/graph/betasdk/models/message_trace_collection_response.go new file mode 100644 index 000000000..39ef8424c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_trace_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageTraceCollectionResponse +type MessageTraceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MessageTraceable +} +// NewMessageTraceCollectionResponse instantiates a new MessageTraceCollectionResponse and sets the default values. +func NewMessageTraceCollectionResponse()(*MessageTraceCollectionResponse) { + m := &MessageTraceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMessageTraceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageTraceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageTraceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageTraceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMessageTraceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MessageTraceable, len(val)) + for i, v := range val { + res[i] = v.(MessageTraceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MessageTraceCollectionResponse) GetValue()([]MessageTraceable) { + return m.value +} +// Serialize serializes information the current object +func (m *MessageTraceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MessageTraceCollectionResponse) SetValue(value []MessageTraceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_trace_collection_responseable.go b/src/internal/connector/graph/betasdk/models/message_trace_collection_responseable.go new file mode 100644 index 000000000..a54f4bb78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_trace_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageTraceCollectionResponseable +type MessageTraceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MessageTraceable) + SetValue(value []MessageTraceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_traceable.go b/src/internal/connector/graph/betasdk/models/message_traceable.go new file mode 100644 index 000000000..16e99f64b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_traceable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageTraceable +type MessageTraceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDestinationIPAddress()(*string) + GetMessageId()(*string) + GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecipients()([]MessageRecipientable) + GetSenderEmail()(*string) + GetSize()(*int32) + GetSourceIPAddress()(*string) + GetSubject()(*string) + SetDestinationIPAddress(value *string)() + SetMessageId(value *string)() + SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecipients(value []MessageRecipientable)() + SetSenderEmail(value *string)() + SetSize(value *int32)() + SetSourceIPAddress(value *string)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detail.go b/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detail.go new file mode 100644 index 000000000..45968fe12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detail.go @@ -0,0 +1,89 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageUnpinnedEventMessageDetail +type MessageUnpinnedEventMessageDetail struct { + EventMessageDetail + // Date and time when the event occurred. + eventDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Initiator of the event. + initiator IdentitySetable +} +// NewMessageUnpinnedEventMessageDetail instantiates a new MessageUnpinnedEventMessageDetail and sets the default values. +func NewMessageUnpinnedEventMessageDetail()(*MessageUnpinnedEventMessageDetail) { + m := &MessageUnpinnedEventMessageDetail{ + EventMessageDetail: *NewEventMessageDetail(), + } + odataTypeValue := "#microsoft.graph.messageUnpinnedEventMessageDetail"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMessageUnpinnedEventMessageDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMessageUnpinnedEventMessageDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMessageUnpinnedEventMessageDetail(), nil +} +// GetEventDateTime gets the eventDateTime property value. Date and time when the event occurred. +func (m *MessageUnpinnedEventMessageDetail) GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MessageUnpinnedEventMessageDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EventMessageDetail.GetFieldDeserializers() + res["eventDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventDateTime(val) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetInitiator gets the initiator property value. Initiator of the event. +func (m *MessageUnpinnedEventMessageDetail) GetInitiator()(IdentitySetable) { + return m.initiator +} +// Serialize serializes information the current object +func (m *MessageUnpinnedEventMessageDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EventMessageDetail.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("eventDateTime", m.GetEventDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + return nil +} +// SetEventDateTime sets the eventDateTime property value. Date and time when the event occurred. +func (m *MessageUnpinnedEventMessageDetail) SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventDateTime = value +} +// SetInitiator sets the initiator property value. Initiator of the event. +func (m *MessageUnpinnedEventMessageDetail) SetInitiator(value IdentitySetable)() { + m.initiator = value +} diff --git a/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detailable.go b/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detailable.go new file mode 100644 index 000000000..512882434 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/message_unpinned_event_message_detailable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MessageUnpinnedEventMessageDetailable +type MessageUnpinnedEventMessageDetailable interface { + EventMessageDetailable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEventDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInitiator()(IdentitySetable) + SetEventDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInitiator(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/messageable.go b/src/internal/connector/graph/betasdk/models/messageable.go new file mode 100644 index 000000000..bc4126fd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/messageable.go @@ -0,0 +1,80 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Messageable +type Messageable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttachments()([]Attachmentable) + GetBccRecipients()([]Recipientable) + GetBody()(ItemBodyable) + GetBodyPreview()(*string) + GetCcRecipients()([]Recipientable) + GetConversationId()(*string) + GetConversationIndex()([]byte) + GetExtensions()([]Extensionable) + GetFlag()(FollowupFlagable) + GetFrom()(Recipientable) + GetHasAttachments()(*bool) + GetImportance()(*Importance) + GetInferenceClassification()(*InferenceClassificationType) + GetInternetMessageHeaders()([]InternetMessageHeaderable) + GetInternetMessageId()(*string) + GetIsDeliveryReceiptRequested()(*bool) + GetIsDraft()(*bool) + GetIsRead()(*bool) + GetIsReadReceiptRequested()(*bool) + GetMentions()([]Mentionable) + GetMentionsPreview()(MentionsPreviewable) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetParentFolderId()(*string) + GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReplyTo()([]Recipientable) + GetSender()(Recipientable) + GetSentDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetSubject()(*string) + GetToRecipients()([]Recipientable) + GetUniqueBody()(ItemBodyable) + GetUnsubscribeData()([]string) + GetUnsubscribeEnabled()(*bool) + GetWebLink()(*string) + SetAttachments(value []Attachmentable)() + SetBccRecipients(value []Recipientable)() + SetBody(value ItemBodyable)() + SetBodyPreview(value *string)() + SetCcRecipients(value []Recipientable)() + SetConversationId(value *string)() + SetConversationIndex(value []byte)() + SetExtensions(value []Extensionable)() + SetFlag(value FollowupFlagable)() + SetFrom(value Recipientable)() + SetHasAttachments(value *bool)() + SetImportance(value *Importance)() + SetInferenceClassification(value *InferenceClassificationType)() + SetInternetMessageHeaders(value []InternetMessageHeaderable)() + SetInternetMessageId(value *string)() + SetIsDeliveryReceiptRequested(value *bool)() + SetIsDraft(value *bool)() + SetIsRead(value *bool)() + SetIsReadReceiptRequested(value *bool)() + SetMentions(value []Mentionable)() + SetMentionsPreview(value MentionsPreviewable)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetParentFolderId(value *string)() + SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReplyTo(value []Recipientable)() + SetSender(value Recipientable)() + SetSentDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetSubject(value *string)() + SetToRecipients(value []Recipientable)() + SetUniqueBody(value ItemBodyable)() + SetUnsubscribeData(value []string)() + SetUnsubscribeEnabled(value *bool)() + SetWebLink(value *string)() +} 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 new file mode 100644 index 000000000..e7df06165 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// 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 +} +// NewMetaDataKeyStringPair instantiates a new metaDataKeyStringPair and sets the default values. +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 +} +// 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 +} +// 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 +} +// GetKey gets the key property value. Key of the meta data. +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 +} +// GetValue gets the value property value. Value of the meta data. +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 +} +// 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 +} +// SetKey sets the key property value. Key of the meta data. +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 +} +// SetValue sets the value property value. Value of the meta data. +func (m *MetaDataKeyStringPair) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_response.go b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_response.go new file mode 100644 index 000000000..1d22b8c9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyStringPairCollectionResponse +type MetaDataKeyStringPairCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MetaDataKeyStringPairable +} +// NewMetaDataKeyStringPairCollectionResponse instantiates a new MetaDataKeyStringPairCollectionResponse and sets the default values. +func NewMetaDataKeyStringPairCollectionResponse()(*MetaDataKeyStringPairCollectionResponse) { + m := &MetaDataKeyStringPairCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMetaDataKeyStringPairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetaDataKeyStringPairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetaDataKeyStringPairCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetaDataKeyStringPairCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MetaDataKeyStringPairCollectionResponse) GetValue()([]MetaDataKeyStringPairable) { + return m.value +} +// Serialize serializes information the current object +func (m *MetaDataKeyStringPairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MetaDataKeyStringPairCollectionResponse) SetValue(value []MetaDataKeyStringPairable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_responseable.go new file mode 100644 index 000000000..6668fa3cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pair_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyStringPairCollectionResponseable +type MetaDataKeyStringPairCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MetaDataKeyStringPairable) + SetValue(value []MetaDataKeyStringPairable)() +} 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 new file mode 100644 index 000000000..49908469e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_string_pairable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyStringPairable +type MetaDataKeyStringPairable interface { + 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/meta_data_key_value_pair.go b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair.go new file mode 100644 index 000000000..9de6d605d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyValuePair +type MetaDataKeyValuePair 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 metadata. + key *string + // The OdataType property + odataType *string + // Value of the metadata. Should be an object. + value Jsonable +} +// NewMetaDataKeyValuePair instantiates a new metaDataKeyValuePair and sets the default values. +func NewMetaDataKeyValuePair()(*MetaDataKeyValuePair) { + m := &MetaDataKeyValuePair{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMetaDataKeyValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetaDataKeyValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetaDataKeyValuePair(), 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 *MetaDataKeyValuePair) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetaDataKeyValuePair) 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.GetObjectValue(CreateJsonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetValue(val.(Jsonable)) + } + return nil + } + return res +} +// GetKey gets the key property value. Key of the metadata. +func (m *MetaDataKeyValuePair) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MetaDataKeyValuePair) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value of the metadata. Should be an object. +func (m *MetaDataKeyValuePair) GetValue()(Jsonable) { + return m.value +} +// Serialize serializes information the current object +func (m *MetaDataKeyValuePair) 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.WriteObjectValue("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 *MetaDataKeyValuePair) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKey sets the key property value. Key of the metadata. +func (m *MetaDataKeyValuePair) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MetaDataKeyValuePair) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value of the metadata. Should be an object. +func (m *MetaDataKeyValuePair) SetValue(value Jsonable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_response.go b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_response.go new file mode 100644 index 000000000..2f541a17c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyValuePairCollectionResponse +type MetaDataKeyValuePairCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MetaDataKeyValuePairable +} +// NewMetaDataKeyValuePairCollectionResponse instantiates a new MetaDataKeyValuePairCollectionResponse and sets the default values. +func NewMetaDataKeyValuePairCollectionResponse()(*MetaDataKeyValuePairCollectionResponse) { + m := &MetaDataKeyValuePairCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMetaDataKeyValuePairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetaDataKeyValuePairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetaDataKeyValuePairCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetaDataKeyValuePairCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyValuePairable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MetaDataKeyValuePairCollectionResponse) GetValue()([]MetaDataKeyValuePairable) { + return m.value +} +// Serialize serializes information the current object +func (m *MetaDataKeyValuePairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MetaDataKeyValuePairCollectionResponse) SetValue(value []MetaDataKeyValuePairable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_responseable.go b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_responseable.go new file mode 100644 index 000000000..e28a5bb26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pair_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyValuePairCollectionResponseable +type MetaDataKeyValuePairCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MetaDataKeyValuePairable) + SetValue(value []MetaDataKeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/meta_data_key_value_pairable.go b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pairable.go new file mode 100644 index 000000000..0a21437e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/meta_data_key_value_pairable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetaDataKeyValuePairable +type MetaDataKeyValuePairable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKey()(*string) + GetOdataType()(*string) + GetValue()(Jsonable) + SetKey(value *string)() + SetOdataType(value *string)() + SetValue(value Jsonable)() +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_action.go b/src/internal/connector/graph/betasdk/models/metadata_action.go new file mode 100644 index 000000000..cd8a03dfa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_action.go @@ -0,0 +1,100 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataAction +type MetadataAction struct { + InformationProtectionAction + // A collection of key value pairs that should be added to the file. + metadataToAdd []KeyValuePairable + // A collection of strings that indicate which keys to remove from the file metadata. + metadataToRemove []string +} +// NewMetadataAction instantiates a new MetadataAction and sets the default values. +func NewMetadataAction()(*MetadataAction) { + m := &MetadataAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.metadataAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMetadataActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetadataActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetadataAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetadataAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["metadataToAdd"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetMetadataToAdd(res) + } + return nil + } + res["metadataToRemove"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMetadataToRemove(res) + } + return nil + } + return res +} +// GetMetadataToAdd gets the metadataToAdd property value. A collection of key value pairs that should be added to the file. +func (m *MetadataAction) GetMetadataToAdd()([]KeyValuePairable) { + return m.metadataToAdd +} +// GetMetadataToRemove gets the metadataToRemove property value. A collection of strings that indicate which keys to remove from the file metadata. +func (m *MetadataAction) GetMetadataToRemove()([]string) { + return m.metadataToRemove +} +// Serialize serializes information the current object +func (m *MetadataAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetMetadataToAdd() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadataToAdd())) + for i, v := range m.GetMetadataToAdd() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("metadataToAdd", cast) + if err != nil { + return err + } + } + if m.GetMetadataToRemove() != nil { + err = writer.WriteCollectionOfStringValues("metadataToRemove", m.GetMetadataToRemove()) + if err != nil { + return err + } + } + return nil +} +// SetMetadataToAdd sets the metadataToAdd property value. A collection of key value pairs that should be added to the file. +func (m *MetadataAction) SetMetadataToAdd(value []KeyValuePairable)() { + m.metadataToAdd = value +} +// SetMetadataToRemove sets the metadataToRemove property value. A collection of strings that indicate which keys to remove from the file metadata. +func (m *MetadataAction) SetMetadataToRemove(value []string)() { + m.metadataToRemove = value +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_actionable.go b/src/internal/connector/graph/betasdk/models/metadata_actionable.go new file mode 100644 index 000000000..ecbb19774 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_actionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataActionable +type MetadataActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMetadataToAdd()([]KeyValuePairable) + GetMetadataToRemove()([]string) + SetMetadataToAdd(value []KeyValuePairable)() + SetMetadataToRemove(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_entry.go b/src/internal/connector/graph/betasdk/models/metadata_entry.go new file mode 100644 index 000000000..f45abec68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_entry.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataEntry +type MetadataEntry struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the metadata property. + key *string + // The OdataType property + odataType *string + // Value of the metadata property. + value *string +} +// NewMetadataEntry instantiates a new metadataEntry and sets the default values. +func NewMetadataEntry()(*MetadataEntry) { + m := &MetadataEntry{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMetadataEntryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetadataEntryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetadataEntry(), 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 *MetadataEntry) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetadataEntry) 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. Name of the metadata property. +func (m *MetadataEntry) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MetadataEntry) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value of the metadata property. +func (m *MetadataEntry) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *MetadataEntry) 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 *MetadataEntry) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKey sets the key property value. Name of the metadata property. +func (m *MetadataEntry) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MetadataEntry) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value of the metadata property. +func (m *MetadataEntry) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_entry_collection_response.go b/src/internal/connector/graph/betasdk/models/metadata_entry_collection_response.go new file mode 100644 index 000000000..8a01a0b7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_entry_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataEntryCollectionResponse +type MetadataEntryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MetadataEntryable +} +// NewMetadataEntryCollectionResponse instantiates a new MetadataEntryCollectionResponse and sets the default values. +func NewMetadataEntryCollectionResponse()(*MetadataEntryCollectionResponse) { + m := &MetadataEntryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMetadataEntryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetadataEntryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetadataEntryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetadataEntryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetadataEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetadataEntryable, len(val)) + for i, v := range val { + res[i] = v.(MetadataEntryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MetadataEntryCollectionResponse) GetValue()([]MetadataEntryable) { + return m.value +} +// Serialize serializes information the current object +func (m *MetadataEntryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MetadataEntryCollectionResponse) SetValue(value []MetadataEntryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_entry_collection_responseable.go b/src/internal/connector/graph/betasdk/models/metadata_entry_collection_responseable.go new file mode 100644 index 000000000..24bae3b34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_entry_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataEntryCollectionResponseable +type MetadataEntryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MetadataEntryable) + SetValue(value []MetadataEntryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/metadata_entryable.go b/src/internal/connector/graph/betasdk/models/metadata_entryable.go new file mode 100644 index 000000000..cb7493bba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metadata_entryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataEntryable +type MetadataEntryable interface { + 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/metered_connection_limit_type.go b/src/internal/connector/graph/betasdk/models/metered_connection_limit_type.go new file mode 100644 index 000000000..ced961d2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/metered_connection_limit_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MeteredConnectionLimitType int + +const ( + // Unrestricted + UNRESTRICTED_METEREDCONNECTIONLIMITTYPE MeteredConnectionLimitType = iota + // Fixed + FIXED_METEREDCONNECTIONLIMITTYPE + // Variable + VARIABLE_METEREDCONNECTIONLIMITTYPE +) + +func (i MeteredConnectionLimitType) String() string { + return []string{"unrestricted", "fixed", "variable"}[i] +} +func ParseMeteredConnectionLimitType(v string) (interface{}, error) { + result := UNRESTRICTED_METEREDCONNECTIONLIMITTYPE + switch v { + case "unrestricted": + result = UNRESTRICTED_METEREDCONNECTIONLIMITTYPE + case "fixed": + result = FIXED_METEREDCONNECTIONLIMITTYPE + case "variable": + result = VARIABLE_METEREDCONNECTIONLIMITTYPE + default: + return 0, errors.New("Unknown MeteredConnectionLimitType value: " + v) + } + return &result, nil +} +func SerializeMeteredConnectionLimitType(values []MeteredConnectionLimitType) []string { + 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/mfa_detail.go b/src/internal/connector/graph/betasdk/models/mfa_detail.go new file mode 100644 index 000000000..add5e0a36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mfa_detail.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MfaDetail +type MfaDetail 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 MFA auth detail for the corresponding Sign-in activity when the MFA Required is 'Yes'. + authDetail *string + // Indicates the MFA Auth methods (SMS, Phone, Authenticator App are some of the value) for the corresponding sign-in activity when the MFA Required field is 'Yes'. + authMethod *string + // The OdataType property + odataType *string +} +// NewMfaDetail instantiates a new mfaDetail and sets the default values. +func NewMfaDetail()(*MfaDetail) { + m := &MfaDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMfaDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMfaDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMfaDetail(), 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 *MfaDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthDetail gets the authDetail property value. Indicates the MFA auth detail for the corresponding Sign-in activity when the MFA Required is 'Yes'. +func (m *MfaDetail) GetAuthDetail()(*string) { + return m.authDetail +} +// GetAuthMethod gets the authMethod property value. Indicates the MFA Auth methods (SMS, Phone, Authenticator App are some of the value) for the corresponding sign-in activity when the MFA Required field is 'Yes'. +func (m *MfaDetail) GetAuthMethod()(*string) { + return m.authMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MfaDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthDetail(val) + } + return nil + } + res["authMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAuthMethod(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MfaDetail) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MfaDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("authDetail", m.GetAuthDetail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("authMethod", m.GetAuthMethod()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MfaDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthDetail sets the authDetail property value. Indicates the MFA auth detail for the corresponding Sign-in activity when the MFA Required is 'Yes'. +func (m *MfaDetail) SetAuthDetail(value *string)() { + m.authDetail = value +} +// SetAuthMethod sets the authMethod property value. Indicates the MFA Auth methods (SMS, Phone, Authenticator App are some of the value) for the corresponding sign-in activity when the MFA Required field is 'Yes'. +func (m *MfaDetail) SetAuthMethod(value *string)() { + m.authMethod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MfaDetail) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mfa_detailable.go b/src/internal/connector/graph/betasdk/models/mfa_detailable.go new file mode 100644 index 000000000..e1e1f443c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mfa_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MfaDetailable +type MfaDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthDetail()(*string) + GetAuthMethod()(*string) + GetOdataType()(*string) + SetAuthDetail(value *string)() + SetAuthMethod(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member.go b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member.go new file mode 100644 index 000000000..981667f03 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAccountUserConversationMember +type MicrosoftAccountUserConversationMember struct { + ConversationMember + // ID of the user. + userId *string +} +// NewMicrosoftAccountUserConversationMember instantiates a new MicrosoftAccountUserConversationMember and sets the default values. +func NewMicrosoftAccountUserConversationMember()(*MicrosoftAccountUserConversationMember) { + m := &MicrosoftAccountUserConversationMember{ + ConversationMember: *NewConversationMember(), + } + odataTypeValue := "#microsoft.graph.microsoftAccountUserConversationMember"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftAccountUserConversationMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAccountUserConversationMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAccountUserConversationMember(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAccountUserConversationMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConversationMember.GetFieldDeserializers() + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetUserId gets the userId property value. ID of the user. +func (m *MicrosoftAccountUserConversationMember) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *MicrosoftAccountUserConversationMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConversationMember.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetUserId sets the userId property value. ID of the user. +func (m *MicrosoftAccountUserConversationMember) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_response.go new file mode 100644 index 000000000..ea0812825 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAccountUserConversationMemberCollectionResponse +type MicrosoftAccountUserConversationMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftAccountUserConversationMemberable +} +// NewMicrosoftAccountUserConversationMemberCollectionResponse instantiates a new MicrosoftAccountUserConversationMemberCollectionResponse and sets the default values. +func NewMicrosoftAccountUserConversationMemberCollectionResponse()(*MicrosoftAccountUserConversationMemberCollectionResponse) { + m := &MicrosoftAccountUserConversationMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftAccountUserConversationMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAccountUserConversationMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAccountUserConversationMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAccountUserConversationMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAccountUserConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAccountUserConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAccountUserConversationMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftAccountUserConversationMemberCollectionResponse) GetValue()([]MicrosoftAccountUserConversationMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftAccountUserConversationMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftAccountUserConversationMemberCollectionResponse) SetValue(value []MicrosoftAccountUserConversationMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_responseable.go new file mode 100644 index 000000000..99e3404ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAccountUserConversationMemberCollectionResponseable +type MicrosoftAccountUserConversationMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftAccountUserConversationMemberable) + SetValue(value []MicrosoftAccountUserConversationMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_memberable.go b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_memberable.go new file mode 100644 index 000000000..8bfc2cbcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_account_user_conversation_memberable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAccountUserConversationMemberable +type MicrosoftAccountUserConversationMemberable interface { + ConversationMemberable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserId()(*string) + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settings.go b/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settings.go new file mode 100644 index 000000000..5d1e8c172 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settings.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftApplicationDataAccessSettings +type MicrosoftApplicationDataAccessSettings struct { + Entity + // The ID of an Azure Active Directory (Azure AD) security group for which the members are allowed to access Microsoft 365 data using only Microsoft 365 apps, but not other Microsoft apps such as Edge. This is only applicable if isEnabledForAllMicrosoftApplications is set to true. + disabledForGroup *string + // When set to true, all users in the organization can access in a Microsoft app any Microsoft 365 data that the user has been authorized to access. The Microsoft app can be a Microsoft 365 app (for example, Excel, Outlook) or non-Microsoft 365 app (for example, Edge). The default is true. It is possible to disable this access for a subset of users in an Azure AD security group, by specifying the group in the disabledForGroup property. When set to false, all users can access authorized Microsoft 365 data only in a Microsoft 365 app. + isEnabledForAllMicrosoftApplications *bool +} +// NewMicrosoftApplicationDataAccessSettings instantiates a new microsoftApplicationDataAccessSettings and sets the default values. +func NewMicrosoftApplicationDataAccessSettings()(*MicrosoftApplicationDataAccessSettings) { + m := &MicrosoftApplicationDataAccessSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftApplicationDataAccessSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftApplicationDataAccessSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftApplicationDataAccessSettings(), nil +} +// GetDisabledForGroup gets the disabledForGroup property value. The ID of an Azure Active Directory (Azure AD) security group for which the members are allowed to access Microsoft 365 data using only Microsoft 365 apps, but not other Microsoft apps such as Edge. This is only applicable if isEnabledForAllMicrosoftApplications is set to true. +func (m *MicrosoftApplicationDataAccessSettings) GetDisabledForGroup()(*string) { + return m.disabledForGroup +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftApplicationDataAccessSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["disabledForGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabledForGroup(val) + } + return nil + } + res["isEnabledForAllMicrosoftApplications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabledForAllMicrosoftApplications(val) + } + return nil + } + return res +} +// GetIsEnabledForAllMicrosoftApplications gets the isEnabledForAllMicrosoftApplications property value. When set to true, all users in the organization can access in a Microsoft app any Microsoft 365 data that the user has been authorized to access. The Microsoft app can be a Microsoft 365 app (for example, Excel, Outlook) or non-Microsoft 365 app (for example, Edge). The default is true. It is possible to disable this access for a subset of users in an Azure AD security group, by specifying the group in the disabledForGroup property. When set to false, all users can access authorized Microsoft 365 data only in a Microsoft 365 app. +func (m *MicrosoftApplicationDataAccessSettings) GetIsEnabledForAllMicrosoftApplications()(*bool) { + return m.isEnabledForAllMicrosoftApplications +} +// Serialize serializes information the current object +func (m *MicrosoftApplicationDataAccessSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("disabledForGroup", m.GetDisabledForGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabledForAllMicrosoftApplications", m.GetIsEnabledForAllMicrosoftApplications()) + if err != nil { + return err + } + } + return nil +} +// SetDisabledForGroup sets the disabledForGroup property value. The ID of an Azure Active Directory (Azure AD) security group for which the members are allowed to access Microsoft 365 data using only Microsoft 365 apps, but not other Microsoft apps such as Edge. This is only applicable if isEnabledForAllMicrosoftApplications is set to true. +func (m *MicrosoftApplicationDataAccessSettings) SetDisabledForGroup(value *string)() { + m.disabledForGroup = value +} +// SetIsEnabledForAllMicrosoftApplications sets the isEnabledForAllMicrosoftApplications property value. When set to true, all users in the organization can access in a Microsoft app any Microsoft 365 data that the user has been authorized to access. The Microsoft app can be a Microsoft 365 app (for example, Excel, Outlook) or non-Microsoft 365 app (for example, Edge). The default is true. It is possible to disable this access for a subset of users in an Azure AD security group, by specifying the group in the disabledForGroup property. When set to false, all users can access authorized Microsoft 365 data only in a Microsoft 365 app. +func (m *MicrosoftApplicationDataAccessSettings) SetIsEnabledForAllMicrosoftApplications(value *bool)() { + m.isEnabledForAllMicrosoftApplications = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settingsable.go b/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settingsable.go new file mode 100644 index 000000000..f533fc656 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_application_data_access_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftApplicationDataAccessSettingsable +type MicrosoftApplicationDataAccessSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisabledForGroup()(*string) + GetIsEnabledForAllMicrosoftApplications()(*bool) + SetDisabledForGroup(value *string)() + SetIsEnabledForAllMicrosoftApplications(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method.go new file mode 100644 index 000000000..402a18279 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method.go @@ -0,0 +1,167 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethod +type MicrosoftAuthenticatorAuthenticationMethod struct { + AuthenticationMethod + // The date and time that this app was registered. This property is null if the device is not registered for passwordless Phone Sign-In. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. + device Deviceable + // Tags containing app metadata. + deviceTag *string + // The name of the device on which this app is registered. + displayName *string + // Numerical version of this instance of the Authenticator app. + phoneAppVersion *string +} +// NewMicrosoftAuthenticatorAuthenticationMethod instantiates a new MicrosoftAuthenticatorAuthenticationMethod and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethod()(*MicrosoftAuthenticatorAuthenticationMethod) { + m := &MicrosoftAuthenticatorAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.microsoftAuthenticatorAuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethod(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time that this app was registered. This property is null if the device is not registered for passwordless Phone Sign-In. +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDevice gets the device property value. The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetDevice()(Deviceable) { + return m.device +} +// GetDeviceTag gets the deviceTag property value. Tags containing app metadata. +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetDeviceTag()(*string) { + return m.deviceTag +} +// GetDisplayName gets the displayName property value. The name of the device on which this app is registered. +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["device"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevice(val.(Deviceable)) + } + return nil + } + res["deviceTag"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceTag(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["phoneAppVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneAppVersion(val) + } + return nil + } + return res +} +// GetPhoneAppVersion gets the phoneAppVersion property value. Numerical version of this instance of the Authenticator app. +func (m *MicrosoftAuthenticatorAuthenticationMethod) GetPhoneAppVersion()(*string) { + return m.phoneAppVersion +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("device", m.GetDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceTag", m.GetDeviceTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneAppVersion", m.GetPhoneAppVersion()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time that this app was registered. This property is null if the device is not registered for passwordless Phone Sign-In. +func (m *MicrosoftAuthenticatorAuthenticationMethod) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDevice sets the device property value. The registered device on which Microsoft Authenticator resides. This property is null if the device is not registered for passwordless Phone Sign-In. +func (m *MicrosoftAuthenticatorAuthenticationMethod) SetDevice(value Deviceable)() { + m.device = value +} +// SetDeviceTag sets the deviceTag property value. Tags containing app metadata. +func (m *MicrosoftAuthenticatorAuthenticationMethod) SetDeviceTag(value *string)() { + m.deviceTag = value +} +// SetDisplayName sets the displayName property value. The name of the device on which this app is registered. +func (m *MicrosoftAuthenticatorAuthenticationMethod) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPhoneAppVersion sets the phoneAppVersion property value. Numerical version of this instance of the Authenticator app. +func (m *MicrosoftAuthenticatorAuthenticationMethod) SetPhoneAppVersion(value *string)() { + m.phoneAppVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_response.go new file mode 100644 index 000000000..28e05a40f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodCollectionResponse +type MicrosoftAuthenticatorAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftAuthenticatorAuthenticationMethodable +} +// NewMicrosoftAuthenticatorAuthenticationMethodCollectionResponse instantiates a new MicrosoftAuthenticatorAuthenticationMethodCollectionResponse and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethodCollectionResponse()(*MicrosoftAuthenticatorAuthenticationMethodCollectionResponse) { + m := &MicrosoftAuthenticatorAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAuthenticatorAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAuthenticatorAuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodCollectionResponse) GetValue()([]MicrosoftAuthenticatorAuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodCollectionResponse) SetValue(value []MicrosoftAuthenticatorAuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_responseable.go new file mode 100644 index 000000000..e6c2b6a67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodCollectionResponseable +type MicrosoftAuthenticatorAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftAuthenticatorAuthenticationMethodable) + SetValue(value []MicrosoftAuthenticatorAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration.go new file mode 100644 index 000000000..06c2b0a56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration.go @@ -0,0 +1,122 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodConfiguration +type MicrosoftAuthenticatorAuthenticationMethodConfiguration struct { + AuthenticationMethodConfiguration + // A collection of Microsoft Authenticator settings such as number matching and location context, and whether they are enabled for all users or specific users only. + featureSettings MicrosoftAuthenticatorFeatureSettingsable + // A collection of groups that are enabled to use the authentication method. Expanded by default. + includeTargets []MicrosoftAuthenticatorAuthenticationMethodTargetable + // true if users can use the OTP code generated by the Microsoft Authenticator app, false otherwise. + isSoftwareOathEnabled *bool +} +// NewMicrosoftAuthenticatorAuthenticationMethodConfiguration instantiates a new MicrosoftAuthenticatorAuthenticationMethodConfiguration and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethodConfiguration()(*MicrosoftAuthenticatorAuthenticationMethodConfiguration) { + m := &MicrosoftAuthenticatorAuthenticationMethodConfiguration{ + AuthenticationMethodConfiguration: *NewAuthenticationMethodConfiguration(), + } + odataTypeValue := "#microsoft.graph.microsoftAuthenticatorAuthenticationMethodConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethodConfiguration(), nil +} +// GetFeatureSettings gets the featureSettings property value. A collection of Microsoft Authenticator settings such as number matching and location context, and whether they are enabled for all users or specific users only. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) GetFeatureSettings()(MicrosoftAuthenticatorFeatureSettingsable) { + return m.featureSettings +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethodConfiguration.GetFieldDeserializers() + res["featureSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMicrosoftAuthenticatorFeatureSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeatureSettings(val.(MicrosoftAuthenticatorFeatureSettingsable)) + } + return nil + } + res["includeTargets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAuthenticatorAuthenticationMethodTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAuthenticatorAuthenticationMethodTargetable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAuthenticatorAuthenticationMethodTargetable) + } + m.SetIncludeTargets(res) + } + return nil + } + res["isSoftwareOathEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSoftwareOathEnabled(val) + } + return nil + } + return res +} +// GetIncludeTargets gets the includeTargets property value. A collection of groups that are enabled to use the authentication method. Expanded by default. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) GetIncludeTargets()([]MicrosoftAuthenticatorAuthenticationMethodTargetable) { + return m.includeTargets +} +// GetIsSoftwareOathEnabled gets the isSoftwareOathEnabled property value. true if users can use the OTP code generated by the Microsoft Authenticator app, false otherwise. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) GetIsSoftwareOathEnabled()(*bool) { + return m.isSoftwareOathEnabled +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethodConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("featureSettings", m.GetFeatureSettings()) + if err != nil { + return err + } + } + if m.GetIncludeTargets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludeTargets())) + for i, v := range m.GetIncludeTargets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includeTargets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSoftwareOathEnabled", m.GetIsSoftwareOathEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetFeatureSettings sets the featureSettings property value. A collection of Microsoft Authenticator settings such as number matching and location context, and whether they are enabled for all users or specific users only. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) SetFeatureSettings(value MicrosoftAuthenticatorFeatureSettingsable)() { + m.featureSettings = value +} +// SetIncludeTargets sets the includeTargets property value. A collection of groups that are enabled to use the authentication method. Expanded by default. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) SetIncludeTargets(value []MicrosoftAuthenticatorAuthenticationMethodTargetable)() { + m.includeTargets = value +} +// SetIsSoftwareOathEnabled sets the isSoftwareOathEnabled property value. true if users can use the OTP code generated by the Microsoft Authenticator app, false otherwise. +func (m *MicrosoftAuthenticatorAuthenticationMethodConfiguration) SetIsSoftwareOathEnabled(value *bool)() { + m.isSoftwareOathEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_response.go new file mode 100644 index 000000000..5e50662d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse +type MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftAuthenticatorAuthenticationMethodConfigurationable +} +// NewMicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse instantiates a new MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse()(*MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse) { + m := &MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAuthenticatorAuthenticationMethodConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAuthenticatorAuthenticationMethodConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAuthenticatorAuthenticationMethodConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse) GetValue()([]MicrosoftAuthenticatorAuthenticationMethodConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponse) SetValue(value []MicrosoftAuthenticatorAuthenticationMethodConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_responseable.go new file mode 100644 index 000000000..2cb80883e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponseable +type MicrosoftAuthenticatorAuthenticationMethodConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftAuthenticatorAuthenticationMethodConfigurationable) + SetValue(value []MicrosoftAuthenticatorAuthenticationMethodConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configurationable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configurationable.go new file mode 100644 index 000000000..7c77eec47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_configurationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodConfigurationable +type MicrosoftAuthenticatorAuthenticationMethodConfigurationable interface { + AuthenticationMethodConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeatureSettings()(MicrosoftAuthenticatorFeatureSettingsable) + GetIncludeTargets()([]MicrosoftAuthenticatorAuthenticationMethodTargetable) + GetIsSoftwareOathEnabled()(*bool) + SetFeatureSettings(value MicrosoftAuthenticatorFeatureSettingsable)() + SetIncludeTargets(value []MicrosoftAuthenticatorAuthenticationMethodTargetable)() + SetIsSoftwareOathEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target.go new file mode 100644 index 000000000..dc53f2b39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodTarget +type MicrosoftAuthenticatorAuthenticationMethodTarget struct { + AuthenticationMethodTarget + // The authenticationMode property + authenticationMode *MicrosoftAuthenticatorAuthenticationMode +} +// NewMicrosoftAuthenticatorAuthenticationMethodTarget instantiates a new MicrosoftAuthenticatorAuthenticationMethodTarget and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethodTarget()(*MicrosoftAuthenticatorAuthenticationMethodTarget) { + m := &MicrosoftAuthenticatorAuthenticationMethodTarget{ + AuthenticationMethodTarget: *NewAuthenticationMethodTarget(), + } + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethodTarget(), nil +} +// GetAuthenticationMode gets the authenticationMode property value. The authenticationMode property +func (m *MicrosoftAuthenticatorAuthenticationMethodTarget) GetAuthenticationMode()(*MicrosoftAuthenticatorAuthenticationMode) { + return m.authenticationMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethodTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethodTarget.GetFieldDeserializers() + res["authenticationMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftAuthenticatorAuthenticationMode) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMode(val.(*MicrosoftAuthenticatorAuthenticationMode)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethodTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethodTarget.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthenticationMode() != nil { + cast := (*m.GetAuthenticationMode()).String() + err = writer.WriteStringValue("authenticationMode", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAuthenticationMode sets the authenticationMode property value. The authenticationMode property +func (m *MicrosoftAuthenticatorAuthenticationMethodTarget) SetAuthenticationMode(value *MicrosoftAuthenticatorAuthenticationMode)() { + m.authenticationMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_response.go new file mode 100644 index 000000000..ebb5d6be2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse +type MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftAuthenticatorAuthenticationMethodTargetable +} +// NewMicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse instantiates a new MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse and sets the default values. +func NewMicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse()(*MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse) { + m := &MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftAuthenticatorAuthenticationMethodTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftAuthenticatorAuthenticationMethodTargetable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftAuthenticatorAuthenticationMethodTargetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse) GetValue()([]MicrosoftAuthenticatorAuthenticationMethodTargetable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponse) SetValue(value []MicrosoftAuthenticatorAuthenticationMethodTargetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_responseable.go new file mode 100644 index 000000000..639be40b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_target_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponseable +type MicrosoftAuthenticatorAuthenticationMethodTargetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftAuthenticatorAuthenticationMethodTargetable) + SetValue(value []MicrosoftAuthenticatorAuthenticationMethodTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_targetable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_targetable.go new file mode 100644 index 000000000..2ed19fd28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_method_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodTargetable +type MicrosoftAuthenticatorAuthenticationMethodTargetable interface { + AuthenticationMethodTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMode()(*MicrosoftAuthenticatorAuthenticationMode) + SetAuthenticationMode(value *MicrosoftAuthenticatorAuthenticationMode)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_methodable.go new file mode 100644 index 000000000..b9a9115c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_methodable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorAuthenticationMethodable +type MicrosoftAuthenticatorAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDevice()(Deviceable) + GetDeviceTag()(*string) + GetDisplayName()(*string) + GetPhoneAppVersion()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDevice(value Deviceable)() + SetDeviceTag(value *string)() + SetDisplayName(value *string)() + SetPhoneAppVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_mode.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_mode.go new file mode 100644 index 000000000..a6ab8bd1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_authentication_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftAuthenticatorAuthenticationMode int + +const ( + DEVICEBASEDPUSH_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE MicrosoftAuthenticatorAuthenticationMode = iota + PUSH_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE + ANY_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE +) + +func (i MicrosoftAuthenticatorAuthenticationMode) String() string { + return []string{"deviceBasedPush", "push", "any"}[i] +} +func ParseMicrosoftAuthenticatorAuthenticationMode(v string) (interface{}, error) { + result := DEVICEBASEDPUSH_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE + switch v { + case "deviceBasedPush": + result = DEVICEBASEDPUSH_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE + case "push": + result = PUSH_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE + case "any": + result = ANY_MICROSOFTAUTHENTICATORAUTHENTICATIONMODE + default: + return 0, errors.New("Unknown MicrosoftAuthenticatorAuthenticationMode value: " + v) + } + return &result, nil +} +func SerializeMicrosoftAuthenticatorAuthenticationMode(values []MicrosoftAuthenticatorAuthenticationMode) []string { + 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/microsoft_authenticator_feature_settings.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_feature_settings.go new file mode 100644 index 000000000..43941c489 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_feature_settings.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorFeatureSettings +type MicrosoftAuthenticatorFeatureSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Determines whether the user's Authenticator app will show them the client app they are signing into. + displayAppInformationRequiredState AuthenticationMethodFeatureConfigurationable + // Determines whether the user's Authenticator app will show them the geographic location of where the authentication request originated from. + displayLocationInformationRequiredState AuthenticationMethodFeatureConfigurationable + // Specifies whether the user needs to enter a number in the Authenticator app from the login screen to complete their login. Value is ignored for phone sign-in notifications. + numberMatchingRequiredState AuthenticationMethodFeatureConfigurationable + // The OdataType property + odataType *string +} +// NewMicrosoftAuthenticatorFeatureSettings instantiates a new microsoftAuthenticatorFeatureSettings and sets the default values. +func NewMicrosoftAuthenticatorFeatureSettings()(*MicrosoftAuthenticatorFeatureSettings) { + m := &MicrosoftAuthenticatorFeatureSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMicrosoftAuthenticatorFeatureSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftAuthenticatorFeatureSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftAuthenticatorFeatureSettings(), 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 *MicrosoftAuthenticatorFeatureSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayAppInformationRequiredState gets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app will show them the client app they are signing into. +func (m *MicrosoftAuthenticatorFeatureSettings) GetDisplayAppInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) { + return m.displayAppInformationRequiredState +} +// GetDisplayLocationInformationRequiredState gets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app will show them the geographic location of where the authentication request originated from. +func (m *MicrosoftAuthenticatorFeatureSettings) GetDisplayLocationInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) { + return m.displayLocationInformationRequiredState +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftAuthenticatorFeatureSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayAppInformationRequiredState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationMethodFeatureConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDisplayAppInformationRequiredState(val.(AuthenticationMethodFeatureConfigurationable)) + } + return nil + } + res["displayLocationInformationRequiredState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationMethodFeatureConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDisplayLocationInformationRequiredState(val.(AuthenticationMethodFeatureConfigurationable)) + } + return nil + } + res["numberMatchingRequiredState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationMethodFeatureConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNumberMatchingRequiredState(val.(AuthenticationMethodFeatureConfigurationable)) + } + 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 + } + return res +} +// GetNumberMatchingRequiredState gets the numberMatchingRequiredState property value. Specifies whether the user needs to enter a number in the Authenticator app from the login screen to complete their login. Value is ignored for phone sign-in notifications. +func (m *MicrosoftAuthenticatorFeatureSettings) GetNumberMatchingRequiredState()(AuthenticationMethodFeatureConfigurationable) { + return m.numberMatchingRequiredState +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MicrosoftAuthenticatorFeatureSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MicrosoftAuthenticatorFeatureSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("displayAppInformationRequiredState", m.GetDisplayAppInformationRequiredState()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("displayLocationInformationRequiredState", m.GetDisplayLocationInformationRequiredState()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("numberMatchingRequiredState", m.GetNumberMatchingRequiredState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MicrosoftAuthenticatorFeatureSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayAppInformationRequiredState sets the displayAppInformationRequiredState property value. Determines whether the user's Authenticator app will show them the client app they are signing into. +func (m *MicrosoftAuthenticatorFeatureSettings) SetDisplayAppInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() { + m.displayAppInformationRequiredState = value +} +// SetDisplayLocationInformationRequiredState sets the displayLocationInformationRequiredState property value. Determines whether the user's Authenticator app will show them the geographic location of where the authentication request originated from. +func (m *MicrosoftAuthenticatorFeatureSettings) SetDisplayLocationInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() { + m.displayLocationInformationRequiredState = value +} +// SetNumberMatchingRequiredState sets the numberMatchingRequiredState property value. Specifies whether the user needs to enter a number in the Authenticator app from the login screen to complete their login. Value is ignored for phone sign-in notifications. +func (m *MicrosoftAuthenticatorFeatureSettings) SetNumberMatchingRequiredState(value AuthenticationMethodFeatureConfigurationable)() { + m.numberMatchingRequiredState = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MicrosoftAuthenticatorFeatureSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_authenticator_feature_settingsable.go b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_feature_settingsable.go new file mode 100644 index 000000000..77ef31622 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_authenticator_feature_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftAuthenticatorFeatureSettingsable +type MicrosoftAuthenticatorFeatureSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayAppInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) + GetDisplayLocationInformationRequiredState()(AuthenticationMethodFeatureConfigurationable) + GetNumberMatchingRequiredState()(AuthenticationMethodFeatureConfigurationable) + GetOdataType()(*string) + SetDisplayAppInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() + SetDisplayLocationInformationRequiredState(value AuthenticationMethodFeatureConfigurationable)() + SetNumberMatchingRequiredState(value AuthenticationMethodFeatureConfigurationable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_edge_channel.go b/src/internal/connector/graph/betasdk/models/microsoft_edge_channel.go new file mode 100644 index 000000000..4407cf0c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_edge_channel.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftEdgeChannel int + +const ( + // The Dev Channel is intended to help you plan and develop with the latest capabilities of Microsoft Edge. + DEV_MICROSOFTEDGECHANNEL MicrosoftEdgeChannel = iota + // The Beta Channel is intended for production deployment to a representative sample set of users. New features ship about every 4 weeks. Security and quality updates ship as needed. + BETA_MICROSOFTEDGECHANNEL + // The Stable Channel is intended for broad deployment within organizations, and it's the channel that most users should be on. New features ship about every 4 weeks. Security and quality updates ship as needed. + STABLE_MICROSOFTEDGECHANNEL + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_MICROSOFTEDGECHANNEL +) + +func (i MicrosoftEdgeChannel) String() string { + return []string{"dev", "beta", "stable", "unknownFutureValue"}[i] +} +func ParseMicrosoftEdgeChannel(v string) (interface{}, error) { + result := DEV_MICROSOFTEDGECHANNEL + switch v { + case "dev": + result = DEV_MICROSOFTEDGECHANNEL + case "beta": + result = BETA_MICROSOFTEDGECHANNEL + case "stable": + result = STABLE_MICROSOFTEDGECHANNEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MICROSOFTEDGECHANNEL + default: + return 0, errors.New("Unknown MicrosoftEdgeChannel value: " + v) + } + return &result, nil +} +func SerializeMicrosoftEdgeChannel(values []MicrosoftEdgeChannel) []string { + 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/microsoft_launcher_dock_presence.go b/src/internal/connector/graph/betasdk/models/microsoft_launcher_dock_presence.go new file mode 100644 index 000000000..084f03b5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_launcher_dock_presence.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftLauncherDockPresence int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_MICROSOFTLAUNCHERDOCKPRESENCE MicrosoftLauncherDockPresence = iota + // Indicates the device's dock will be displayed on the device. + SHOW_MICROSOFTLAUNCHERDOCKPRESENCE + // Indicates the device's dock will be hidden on the device, but the user can access the dock by dragging the handler on the bottom of the screen. + HIDE_MICROSOFTLAUNCHERDOCKPRESENCE + // Indicates the device's dock will be disabled on the device. + DISABLED_MICROSOFTLAUNCHERDOCKPRESENCE +) + +func (i MicrosoftLauncherDockPresence) String() string { + return []string{"notConfigured", "show", "hide", "disabled"}[i] +} +func ParseMicrosoftLauncherDockPresence(v string) (interface{}, error) { + result := NOTCONFIGURED_MICROSOFTLAUNCHERDOCKPRESENCE + switch v { + case "notConfigured": + result = NOTCONFIGURED_MICROSOFTLAUNCHERDOCKPRESENCE + case "show": + result = SHOW_MICROSOFTLAUNCHERDOCKPRESENCE + case "hide": + result = HIDE_MICROSOFTLAUNCHERDOCKPRESENCE + case "disabled": + result = DISABLED_MICROSOFTLAUNCHERDOCKPRESENCE + default: + return 0, errors.New("Unknown MicrosoftLauncherDockPresence value: " + v) + } + return &result, nil +} +func SerializeMicrosoftLauncherDockPresence(values []MicrosoftLauncherDockPresence) []string { + 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/microsoft_launcher_search_bar_placement.go b/src/internal/connector/graph/betasdk/models/microsoft_launcher_search_bar_placement.go new file mode 100644 index 000000000..6d2552847 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_launcher_search_bar_placement.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftLauncherSearchBarPlacement int + +const ( + // Not configured; this value is ignored. + NOTCONFIGURED_MICROSOFTLAUNCHERSEARCHBARPLACEMENT MicrosoftLauncherSearchBarPlacement = iota + // Indicates that the search bar will be displayed on the top of the device. + TOP_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + // Indicates that the search bar will be displayed on the bottom of the device. + BOTTOM_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + // Indicates that the search bar will be hidden on the device. + HIDE_MICROSOFTLAUNCHERSEARCHBARPLACEMENT +) + +func (i MicrosoftLauncherSearchBarPlacement) String() string { + return []string{"notConfigured", "top", "bottom", "hide"}[i] +} +func ParseMicrosoftLauncherSearchBarPlacement(v string) (interface{}, error) { + result := NOTCONFIGURED_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + switch v { + case "notConfigured": + result = NOTCONFIGURED_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + case "top": + result = TOP_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + case "bottom": + result = BOTTOM_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + case "hide": + result = HIDE_MICROSOFTLAUNCHERSEARCHBARPLACEMENT + default: + return 0, errors.New("Unknown MicrosoftLauncherSearchBarPlacement value: " + v) + } + return &result, nil +} +func SerializeMicrosoftLauncherSearchBarPlacement(values []MicrosoftLauncherSearchBarPlacement) []string { + 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/microsoft_managed_desktop.go b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktop.go new file mode 100644 index 000000000..02ce7932e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktop.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftManagedDesktop +type MicrosoftManagedDesktop 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 OdataType property + odataType *string + // The name of the Microsoft Managed Desktop profile that the Windows 365 Cloud PC is associated with. + profile *string + // Indicates whether the provisioning policy enables Microsoft Managed Desktop. It indicates the type of plan under which the device is managed if the provisioning policy is enabled. Possible values are: notManaged, premiumManaged, standardManaged, starterManaged, unknownFutureValue. + type_escaped *MicrosoftManagedDesktopType +} +// NewMicrosoftManagedDesktop instantiates a new microsoftManagedDesktop and sets the default values. +func NewMicrosoftManagedDesktop()(*MicrosoftManagedDesktop) { + m := &MicrosoftManagedDesktop{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMicrosoftManagedDesktopFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftManagedDesktopFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftManagedDesktop(), 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 *MicrosoftManagedDesktop) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftManagedDesktop) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["profile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfile(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftManagedDesktopType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*MicrosoftManagedDesktopType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MicrosoftManagedDesktop) GetOdataType()(*string) { + return m.odataType +} +// GetProfile gets the profile property value. The name of the Microsoft Managed Desktop profile that the Windows 365 Cloud PC is associated with. +func (m *MicrosoftManagedDesktop) GetProfile()(*string) { + return m.profile +} +// GetType gets the type property value. Indicates whether the provisioning policy enables Microsoft Managed Desktop. It indicates the type of plan under which the device is managed if the provisioning policy is enabled. Possible values are: notManaged, premiumManaged, standardManaged, starterManaged, unknownFutureValue. +func (m *MicrosoftManagedDesktop) GetType()(*MicrosoftManagedDesktopType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *MicrosoftManagedDesktop) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("profile", m.GetProfile()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *MicrosoftManagedDesktop) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MicrosoftManagedDesktop) SetOdataType(value *string)() { + m.odataType = value +} +// SetProfile sets the profile property value. The name of the Microsoft Managed Desktop profile that the Windows 365 Cloud PC is associated with. +func (m *MicrosoftManagedDesktop) SetProfile(value *string)() { + m.profile = value +} +// SetType sets the type property value. Indicates whether the provisioning policy enables Microsoft Managed Desktop. It indicates the type of plan under which the device is managed if the provisioning policy is enabled. Possible values are: notManaged, premiumManaged, standardManaged, starterManaged, unknownFutureValue. +func (m *MicrosoftManagedDesktop) SetType(value *MicrosoftManagedDesktopType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_managed_desktop_type.go b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktop_type.go new file mode 100644 index 000000000..c5cef188f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktop_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftManagedDesktopType int + +const ( + NOTMANAGED_MICROSOFTMANAGEDDESKTOPTYPE MicrosoftManagedDesktopType = iota + PREMIUMMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + STANDARDMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + STARTERMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + UNKNOWNFUTUREVALUE_MICROSOFTMANAGEDDESKTOPTYPE +) + +func (i MicrosoftManagedDesktopType) String() string { + return []string{"notManaged", "premiumManaged", "standardManaged", "starterManaged", "unknownFutureValue"}[i] +} +func ParseMicrosoftManagedDesktopType(v string) (interface{}, error) { + result := NOTMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + switch v { + case "notManaged": + result = NOTMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + case "premiumManaged": + result = PREMIUMMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + case "standardManaged": + result = STANDARDMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + case "starterManaged": + result = STARTERMANAGED_MICROSOFTMANAGEDDESKTOPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MICROSOFTMANAGEDDESKTOPTYPE + default: + return 0, errors.New("Unknown MicrosoftManagedDesktopType value: " + v) + } + return &result, nil +} +func SerializeMicrosoftManagedDesktopType(values []MicrosoftManagedDesktopType) []string { + 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/microsoft_managed_desktopable.go b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktopable.go new file mode 100644 index 000000000..84ad7173f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_managed_desktopable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftManagedDesktopable +type MicrosoftManagedDesktopable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetProfile()(*string) + GetType()(*MicrosoftManagedDesktopType) + SetOdataType(value *string)() + SetProfile(value *string)() + SetType(value *MicrosoftManagedDesktopType)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app.go new file mode 100644 index 000000000..b8c1f11a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessApp +type MicrosoftStoreForBusinessApp struct { + MobileApp + // The collection of contained apps in a mobileApp acting as a package. + containedApps []MobileContainedAppable + // The licenseType property + licenseType *MicrosoftStoreForBusinessLicenseType + // The supported License Type. + licensingType VppLicensingTypeable + // The app package identifier + packageIdentityName *string + // The app product key + productKey *string + // The total number of Microsoft Store for Business licenses. + totalLicenseCount *int32 + // The number of Microsoft Store for Business licenses in use. + usedLicenseCount *int32 +} +// NewMicrosoftStoreForBusinessApp instantiates a new MicrosoftStoreForBusinessApp and sets the default values. +func NewMicrosoftStoreForBusinessApp()(*MicrosoftStoreForBusinessApp) { + m := &MicrosoftStoreForBusinessApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.microsoftStoreForBusinessApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftStoreForBusinessAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftStoreForBusinessAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftStoreForBusinessApp(), nil +} +// GetContainedApps gets the containedApps property value. The collection of contained apps in a mobileApp acting as a package. +func (m *MicrosoftStoreForBusinessApp) GetContainedApps()([]MobileContainedAppable) { + return m.containedApps +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftStoreForBusinessApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["containedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileContainedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileContainedAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileContainedAppable) + } + m.SetContainedApps(res) + } + return nil + } + res["licenseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftStoreForBusinessLicenseType) + if err != nil { + return err + } + if val != nil { + m.SetLicenseType(val.(*MicrosoftStoreForBusinessLicenseType)) + } + return nil + } + res["licensingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVppLicensingTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLicensingType(val.(VppLicensingTypeable)) + } + return nil + } + res["packageIdentityName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPackageIdentityName(val) + } + return nil + } + res["productKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProductKey(val) + } + return nil + } + res["totalLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicenseCount(val) + } + return nil + } + res["usedLicenseCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsedLicenseCount(val) + } + return nil + } + return res +} +// GetLicenseType gets the licenseType property value. The licenseType property +func (m *MicrosoftStoreForBusinessApp) GetLicenseType()(*MicrosoftStoreForBusinessLicenseType) { + return m.licenseType +} +// GetLicensingType gets the licensingType property value. The supported License Type. +func (m *MicrosoftStoreForBusinessApp) GetLicensingType()(VppLicensingTypeable) { + return m.licensingType +} +// GetPackageIdentityName gets the packageIdentityName property value. The app package identifier +func (m *MicrosoftStoreForBusinessApp) GetPackageIdentityName()(*string) { + return m.packageIdentityName +} +// GetProductKey gets the productKey property value. The app product key +func (m *MicrosoftStoreForBusinessApp) GetProductKey()(*string) { + return m.productKey +} +// GetTotalLicenseCount gets the totalLicenseCount property value. The total number of Microsoft Store for Business licenses. +func (m *MicrosoftStoreForBusinessApp) GetTotalLicenseCount()(*int32) { + return m.totalLicenseCount +} +// GetUsedLicenseCount gets the usedLicenseCount property value. The number of Microsoft Store for Business licenses in use. +func (m *MicrosoftStoreForBusinessApp) GetUsedLicenseCount()(*int32) { + return m.usedLicenseCount +} +// Serialize serializes information the current object +func (m *MicrosoftStoreForBusinessApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + if m.GetContainedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContainedApps())) + for i, v := range m.GetContainedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("containedApps", cast) + if err != nil { + return err + } + } + if m.GetLicenseType() != nil { + cast := (*m.GetLicenseType()).String() + err = writer.WriteStringValue("licenseType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("licensingType", m.GetLicensingType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("packageIdentityName", m.GetPackageIdentityName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("productKey", m.GetProductKey()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicenseCount", m.GetTotalLicenseCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usedLicenseCount", m.GetUsedLicenseCount()) + if err != nil { + return err + } + } + return nil +} +// SetContainedApps sets the containedApps property value. The collection of contained apps in a mobileApp acting as a package. +func (m *MicrosoftStoreForBusinessApp) SetContainedApps(value []MobileContainedAppable)() { + m.containedApps = value +} +// SetLicenseType sets the licenseType property value. The licenseType property +func (m *MicrosoftStoreForBusinessApp) SetLicenseType(value *MicrosoftStoreForBusinessLicenseType)() { + m.licenseType = value +} +// SetLicensingType sets the licensingType property value. The supported License Type. +func (m *MicrosoftStoreForBusinessApp) SetLicensingType(value VppLicensingTypeable)() { + m.licensingType = value +} +// SetPackageIdentityName sets the packageIdentityName property value. The app package identifier +func (m *MicrosoftStoreForBusinessApp) SetPackageIdentityName(value *string)() { + m.packageIdentityName = value +} +// SetProductKey sets the productKey property value. The app product key +func (m *MicrosoftStoreForBusinessApp) SetProductKey(value *string)() { + m.productKey = value +} +// SetTotalLicenseCount sets the totalLicenseCount property value. The total number of Microsoft Store for Business licenses. +func (m *MicrosoftStoreForBusinessApp) SetTotalLicenseCount(value *int32)() { + m.totalLicenseCount = value +} +// SetUsedLicenseCount sets the usedLicenseCount property value. The number of Microsoft Store for Business licenses in use. +func (m *MicrosoftStoreForBusinessApp) SetUsedLicenseCount(value *int32)() { + m.usedLicenseCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settings.go new file mode 100644 index 000000000..60f727b7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settings.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessAppAssignmentSettings +type MicrosoftStoreForBusinessAppAssignmentSettings struct { + MobileAppAssignmentSettings + // Whether or not to use device execution context for Microsoft Store for Business mobile app. + useDeviceContext *bool +} +// NewMicrosoftStoreForBusinessAppAssignmentSettings instantiates a new MicrosoftStoreForBusinessAppAssignmentSettings and sets the default values. +func NewMicrosoftStoreForBusinessAppAssignmentSettings()(*MicrosoftStoreForBusinessAppAssignmentSettings) { + m := &MicrosoftStoreForBusinessAppAssignmentSettings{ + MobileAppAssignmentSettings: *NewMobileAppAssignmentSettings(), + } + odataTypeValue := "#microsoft.graph.microsoftStoreForBusinessAppAssignmentSettings"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftStoreForBusinessAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftStoreForBusinessAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftStoreForBusinessAppAssignmentSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftStoreForBusinessAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppAssignmentSettings.GetFieldDeserializers() + res["useDeviceContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseDeviceContext(val) + } + return nil + } + return res +} +// GetUseDeviceContext gets the useDeviceContext property value. Whether or not to use device execution context for Microsoft Store for Business mobile app. +func (m *MicrosoftStoreForBusinessAppAssignmentSettings) GetUseDeviceContext()(*bool) { + return m.useDeviceContext +} +// Serialize serializes information the current object +func (m *MicrosoftStoreForBusinessAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppAssignmentSettings.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("useDeviceContext", m.GetUseDeviceContext()) + if err != nil { + return err + } + } + return nil +} +// SetUseDeviceContext sets the useDeviceContext property value. Whether or not to use device execution context for Microsoft Store for Business mobile app. +func (m *MicrosoftStoreForBusinessAppAssignmentSettings) SetUseDeviceContext(value *bool)() { + m.useDeviceContext = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settingsable.go new file mode 100644 index 000000000..833592244 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_assignment_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessAppAssignmentSettingsable +type MicrosoftStoreForBusinessAppAssignmentSettingsable interface { + MobileAppAssignmentSettingsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUseDeviceContext()(*bool) + SetUseDeviceContext(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_response.go new file mode 100644 index 000000000..0eecef3a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessAppCollectionResponse +type MicrosoftStoreForBusinessAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftStoreForBusinessAppable +} +// NewMicrosoftStoreForBusinessAppCollectionResponse instantiates a new MicrosoftStoreForBusinessAppCollectionResponse and sets the default values. +func NewMicrosoftStoreForBusinessAppCollectionResponse()(*MicrosoftStoreForBusinessAppCollectionResponse) { + m := &MicrosoftStoreForBusinessAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftStoreForBusinessAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftStoreForBusinessAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftStoreForBusinessAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftStoreForBusinessAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftStoreForBusinessAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftStoreForBusinessAppable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftStoreForBusinessAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftStoreForBusinessAppCollectionResponse) GetValue()([]MicrosoftStoreForBusinessAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftStoreForBusinessAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftStoreForBusinessAppCollectionResponse) SetValue(value []MicrosoftStoreForBusinessAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_responseable.go new file mode 100644 index 000000000..c601642a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessAppCollectionResponseable +type MicrosoftStoreForBusinessAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftStoreForBusinessAppable) + SetValue(value []MicrosoftStoreForBusinessAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_appable.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_appable.go new file mode 100644 index 000000000..8e1908ad3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_appable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessAppable +type MicrosoftStoreForBusinessAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainedApps()([]MobileContainedAppable) + GetLicenseType()(*MicrosoftStoreForBusinessLicenseType) + GetLicensingType()(VppLicensingTypeable) + GetPackageIdentityName()(*string) + GetProductKey()(*string) + GetTotalLicenseCount()(*int32) + GetUsedLicenseCount()(*int32) + SetContainedApps(value []MobileContainedAppable)() + SetLicenseType(value *MicrosoftStoreForBusinessLicenseType)() + SetLicensingType(value VppLicensingTypeable)() + SetPackageIdentityName(value *string)() + SetProductKey(value *string)() + SetTotalLicenseCount(value *int32)() + SetUsedLicenseCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app.go new file mode 100644 index 000000000..bad214ab7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessContainedApp +type MicrosoftStoreForBusinessContainedApp struct { + MobileContainedApp + // The app user model ID of the contained app of a MicrosoftStoreForBusinessApp. + appUserModelId *string +} +// NewMicrosoftStoreForBusinessContainedApp instantiates a new MicrosoftStoreForBusinessContainedApp and sets the default values. +func NewMicrosoftStoreForBusinessContainedApp()(*MicrosoftStoreForBusinessContainedApp) { + m := &MicrosoftStoreForBusinessContainedApp{ + MobileContainedApp: *NewMobileContainedApp(), + } + odataTypeValue := "#microsoft.graph.microsoftStoreForBusinessContainedApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMicrosoftStoreForBusinessContainedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftStoreForBusinessContainedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftStoreForBusinessContainedApp(), nil +} +// GetAppUserModelId gets the appUserModelId property value. The app user model ID of the contained app of a MicrosoftStoreForBusinessApp. +func (m *MicrosoftStoreForBusinessContainedApp) GetAppUserModelId()(*string) { + return m.appUserModelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftStoreForBusinessContainedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileContainedApp.GetFieldDeserializers() + res["appUserModelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppUserModelId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MicrosoftStoreForBusinessContainedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileContainedApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appUserModelId", m.GetAppUserModelId()) + if err != nil { + return err + } + } + return nil +} +// SetAppUserModelId sets the appUserModelId property value. The app user model ID of the contained app of a MicrosoftStoreForBusinessApp. +func (m *MicrosoftStoreForBusinessContainedApp) SetAppUserModelId(value *string)() { + m.appUserModelId = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_response.go new file mode 100644 index 000000000..d917e6390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessContainedAppCollectionResponse +type MicrosoftStoreForBusinessContainedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftStoreForBusinessContainedAppable +} +// NewMicrosoftStoreForBusinessContainedAppCollectionResponse instantiates a new MicrosoftStoreForBusinessContainedAppCollectionResponse and sets the default values. +func NewMicrosoftStoreForBusinessContainedAppCollectionResponse()(*MicrosoftStoreForBusinessContainedAppCollectionResponse) { + m := &MicrosoftStoreForBusinessContainedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftStoreForBusinessContainedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftStoreForBusinessContainedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftStoreForBusinessContainedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftStoreForBusinessContainedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftStoreForBusinessContainedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftStoreForBusinessContainedAppable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftStoreForBusinessContainedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftStoreForBusinessContainedAppCollectionResponse) GetValue()([]MicrosoftStoreForBusinessContainedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftStoreForBusinessContainedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftStoreForBusinessContainedAppCollectionResponse) SetValue(value []MicrosoftStoreForBusinessContainedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_responseable.go new file mode 100644 index 000000000..16b622901 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessContainedAppCollectionResponseable +type MicrosoftStoreForBusinessContainedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftStoreForBusinessContainedAppable) + SetValue(value []MicrosoftStoreForBusinessContainedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_appable.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_appable.go new file mode 100644 index 000000000..a5737f0e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_contained_appable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftStoreForBusinessContainedAppable +type MicrosoftStoreForBusinessContainedAppable interface { + MobileContainedAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppUserModelId()(*string) + SetAppUserModelId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_license_type.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_license_type.go new file mode 100644 index 000000000..ce8c29d5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_license_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftStoreForBusinessLicenseType int + +const ( + OFFLINE_MICROSOFTSTOREFORBUSINESSLICENSETYPE MicrosoftStoreForBusinessLicenseType = iota + ONLINE_MICROSOFTSTOREFORBUSINESSLICENSETYPE +) + +func (i MicrosoftStoreForBusinessLicenseType) String() string { + return []string{"offline", "online"}[i] +} +func ParseMicrosoftStoreForBusinessLicenseType(v string) (interface{}, error) { + result := OFFLINE_MICROSOFTSTOREFORBUSINESSLICENSETYPE + switch v { + case "offline": + result = OFFLINE_MICROSOFTSTOREFORBUSINESSLICENSETYPE + case "online": + result = ONLINE_MICROSOFTSTOREFORBUSINESSLICENSETYPE + default: + return 0, errors.New("Unknown MicrosoftStoreForBusinessLicenseType value: " + v) + } + return &result, nil +} +func SerializeMicrosoftStoreForBusinessLicenseType(values []MicrosoftStoreForBusinessLicenseType) []string { + 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/microsoft_store_for_business_portal_selection_options.go b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_portal_selection_options.go new file mode 100644 index 000000000..96fc19fe6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_store_for_business_portal_selection_options.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftStoreForBusinessPortalSelectionOptions int + +const ( + // This option is not available for the account + NONE_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS MicrosoftStoreForBusinessPortalSelectionOptions = iota + // Intune Company Portal only. + COMPANYPORTAL_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS + // MSFB Private store only. + PRIVATESTORE_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS +) + +func (i MicrosoftStoreForBusinessPortalSelectionOptions) String() string { + return []string{"none", "companyPortal", "privateStore"}[i] +} +func ParseMicrosoftStoreForBusinessPortalSelectionOptions(v string) (interface{}, error) { + result := NONE_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS + switch v { + case "none": + result = NONE_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS + case "companyPortal": + result = COMPANYPORTAL_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS + case "privateStore": + result = PRIVATESTORE_MICROSOFTSTOREFORBUSINESSPORTALSELECTIONOPTIONS + default: + return 0, errors.New("Unknown MicrosoftStoreForBusinessPortalSelectionOptions value: " + v) + } + return &result, nil +} +func SerializeMicrosoftStoreForBusinessPortalSelectionOptions(values []MicrosoftStoreForBusinessPortalSelectionOptions) []string { + 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/microsoft_tunnel_configuration.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration.go new file mode 100644 index 000000000..bcbcd3951 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration.go @@ -0,0 +1,461 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelConfiguration entity that represents a collection of Microsoft Tunnel settings +type MicrosoftTunnelConfiguration struct { + Entity + // Additional settings that may be applied to the server + advancedSettings []KeyValuePairable + // The Default Domain appendix that will be used by the clients + defaultDomainSuffix *string + // The configuration's description (optional) + description *string + // When DisableUdpConnections is set, the clients and VPN server will not use DTLS connections to transfer data. + disableUdpConnections *bool + // The display name for the server configuration. This property is required when a server is created. + displayName *string + // The DNS servers that will be used by the clients + dnsServers []string + // When the configuration was last updated + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The port that both TCP and UPD will listen over on the server + listenPort *int32 + // The subnet that will be used to allocate virtual address for the clients + network *string + // List of Scope Tags for this Entity instance + roleScopeTagIds []string + // Subsets of the routes that will not be routed by the server + routeExcludes []string + // The routes that will be routed by the server + routeIncludes []string + // Subsets of the routes that will not be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteExcludes'. + routesExclude []string + // The routes that will be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteIncludes'. + routesInclude []string + // The domains that will be resolved using the provided dns servers + splitDNS []string +} +// NewMicrosoftTunnelConfiguration instantiates a new microsoftTunnelConfiguration and sets the default values. +func NewMicrosoftTunnelConfiguration()(*MicrosoftTunnelConfiguration) { + m := &MicrosoftTunnelConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftTunnelConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelConfiguration(), nil +} +// GetAdvancedSettings gets the advancedSettings property value. Additional settings that may be applied to the server +func (m *MicrosoftTunnelConfiguration) GetAdvancedSettings()([]KeyValuePairable) { + return m.advancedSettings +} +// GetDefaultDomainSuffix gets the defaultDomainSuffix property value. The Default Domain appendix that will be used by the clients +func (m *MicrosoftTunnelConfiguration) GetDefaultDomainSuffix()(*string) { + return m.defaultDomainSuffix +} +// GetDescription gets the description property value. The configuration's description (optional) +func (m *MicrosoftTunnelConfiguration) GetDescription()(*string) { + return m.description +} +// GetDisableUdpConnections gets the disableUdpConnections property value. When DisableUdpConnections is set, the clients and VPN server will not use DTLS connections to transfer data. +func (m *MicrosoftTunnelConfiguration) GetDisableUdpConnections()(*bool) { + return m.disableUdpConnections +} +// GetDisplayName gets the displayName property value. The display name for the server configuration. This property is required when a server is created. +func (m *MicrosoftTunnelConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetDnsServers gets the dnsServers property value. The DNS servers that will be used by the clients +func (m *MicrosoftTunnelConfiguration) GetDnsServers()([]string) { + return m.dnsServers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["advancedSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetAdvancedSettings(res) + } + return nil + } + res["defaultDomainSuffix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultDomainSuffix(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disableUdpConnections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableUdpConnections(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["dnsServers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDnsServers(res) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["listenPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetListenPort(val) + } + return nil + } + res["network"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetwork(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["routeExcludes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRouteExcludes(res) + } + return nil + } + res["routeIncludes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRouteIncludes(res) + } + return nil + } + res["routesExclude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoutesExclude(res) + } + return nil + } + res["routesInclude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoutesInclude(res) + } + return nil + } + res["splitDNS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSplitDNS(res) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. When the configuration was last updated +func (m *MicrosoftTunnelConfiguration) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetListenPort gets the listenPort property value. The port that both TCP and UPD will listen over on the server +func (m *MicrosoftTunnelConfiguration) GetListenPort()(*int32) { + return m.listenPort +} +// GetNetwork gets the network property value. The subnet that will be used to allocate virtual address for the clients +func (m *MicrosoftTunnelConfiguration) GetNetwork()(*string) { + return m.network +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance +func (m *MicrosoftTunnelConfiguration) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetRouteExcludes gets the routeExcludes property value. Subsets of the routes that will not be routed by the server +func (m *MicrosoftTunnelConfiguration) GetRouteExcludes()([]string) { + return m.routeExcludes +} +// GetRouteIncludes gets the routeIncludes property value. The routes that will be routed by the server +func (m *MicrosoftTunnelConfiguration) GetRouteIncludes()([]string) { + return m.routeIncludes +} +// GetRoutesExclude gets the routesExclude property value. Subsets of the routes that will not be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteExcludes'. +func (m *MicrosoftTunnelConfiguration) GetRoutesExclude()([]string) { + return m.routesExclude +} +// GetRoutesInclude gets the routesInclude property value. The routes that will be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteIncludes'. +func (m *MicrosoftTunnelConfiguration) GetRoutesInclude()([]string) { + return m.routesInclude +} +// GetSplitDNS gets the splitDNS property value. The domains that will be resolved using the provided dns servers +func (m *MicrosoftTunnelConfiguration) GetSplitDNS()([]string) { + return m.splitDNS +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAdvancedSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdvancedSettings())) + for i, v := range m.GetAdvancedSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("advancedSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultDomainSuffix", m.GetDefaultDomainSuffix()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableUdpConnections", m.GetDisableUdpConnections()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetDnsServers() != nil { + err = writer.WriteCollectionOfStringValues("dnsServers", m.GetDnsServers()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("listenPort", m.GetListenPort()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("network", m.GetNetwork()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetRouteExcludes() != nil { + err = writer.WriteCollectionOfStringValues("routeExcludes", m.GetRouteExcludes()) + if err != nil { + return err + } + } + if m.GetRouteIncludes() != nil { + err = writer.WriteCollectionOfStringValues("routeIncludes", m.GetRouteIncludes()) + if err != nil { + return err + } + } + if m.GetRoutesExclude() != nil { + err = writer.WriteCollectionOfStringValues("routesExclude", m.GetRoutesExclude()) + if err != nil { + return err + } + } + if m.GetRoutesInclude() != nil { + err = writer.WriteCollectionOfStringValues("routesInclude", m.GetRoutesInclude()) + if err != nil { + return err + } + } + if m.GetSplitDNS() != nil { + err = writer.WriteCollectionOfStringValues("splitDNS", m.GetSplitDNS()) + if err != nil { + return err + } + } + return nil +} +// SetAdvancedSettings sets the advancedSettings property value. Additional settings that may be applied to the server +func (m *MicrosoftTunnelConfiguration) SetAdvancedSettings(value []KeyValuePairable)() { + m.advancedSettings = value +} +// SetDefaultDomainSuffix sets the defaultDomainSuffix property value. The Default Domain appendix that will be used by the clients +func (m *MicrosoftTunnelConfiguration) SetDefaultDomainSuffix(value *string)() { + m.defaultDomainSuffix = value +} +// SetDescription sets the description property value. The configuration's description (optional) +func (m *MicrosoftTunnelConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDisableUdpConnections sets the disableUdpConnections property value. When DisableUdpConnections is set, the clients and VPN server will not use DTLS connections to transfer data. +func (m *MicrosoftTunnelConfiguration) SetDisableUdpConnections(value *bool)() { + m.disableUdpConnections = value +} +// SetDisplayName sets the displayName property value. The display name for the server configuration. This property is required when a server is created. +func (m *MicrosoftTunnelConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDnsServers sets the dnsServers property value. The DNS servers that will be used by the clients +func (m *MicrosoftTunnelConfiguration) SetDnsServers(value []string)() { + m.dnsServers = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. When the configuration was last updated +func (m *MicrosoftTunnelConfiguration) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetListenPort sets the listenPort property value. The port that both TCP and UPD will listen over on the server +func (m *MicrosoftTunnelConfiguration) SetListenPort(value *int32)() { + m.listenPort = value +} +// SetNetwork sets the network property value. The subnet that will be used to allocate virtual address for the clients +func (m *MicrosoftTunnelConfiguration) SetNetwork(value *string)() { + m.network = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance +func (m *MicrosoftTunnelConfiguration) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetRouteExcludes sets the routeExcludes property value. Subsets of the routes that will not be routed by the server +func (m *MicrosoftTunnelConfiguration) SetRouteExcludes(value []string)() { + m.routeExcludes = value +} +// SetRouteIncludes sets the routeIncludes property value. The routes that will be routed by the server +func (m *MicrosoftTunnelConfiguration) SetRouteIncludes(value []string)() { + m.routeIncludes = value +} +// SetRoutesExclude sets the routesExclude property value. Subsets of the routes that will not be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteExcludes'. +func (m *MicrosoftTunnelConfiguration) SetRoutesExclude(value []string)() { + m.routesExclude = value +} +// SetRoutesInclude sets the routesInclude property value. The routes that will be routed by the server. This property is going to be deprecated with the option of using the new property, 'RouteIncludes'. +func (m *MicrosoftTunnelConfiguration) SetRoutesInclude(value []string)() { + m.routesInclude = value +} +// SetSplitDNS sets the splitDNS property value. The domains that will be resolved using the provided dns servers +func (m *MicrosoftTunnelConfiguration) SetSplitDNS(value []string)() { + m.splitDNS = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_response.go new file mode 100644 index 000000000..07675856f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelConfigurationCollectionResponse +type MicrosoftTunnelConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftTunnelConfigurationable +} +// NewMicrosoftTunnelConfigurationCollectionResponse instantiates a new MicrosoftTunnelConfigurationCollectionResponse and sets the default values. +func NewMicrosoftTunnelConfigurationCollectionResponse()(*MicrosoftTunnelConfigurationCollectionResponse) { + m := &MicrosoftTunnelConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftTunnelConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftTunnelConfigurationCollectionResponse) GetValue()([]MicrosoftTunnelConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftTunnelConfigurationCollectionResponse) SetValue(value []MicrosoftTunnelConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_responseable.go new file mode 100644 index 000000000..5321b09a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelConfigurationCollectionResponseable +type MicrosoftTunnelConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftTunnelConfigurationable) + SetValue(value []MicrosoftTunnelConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configurationable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configurationable.go new file mode 100644 index 000000000..28c0a73fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_configurationable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelConfigurationable +type MicrosoftTunnelConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdvancedSettings()([]KeyValuePairable) + GetDefaultDomainSuffix()(*string) + GetDescription()(*string) + GetDisableUdpConnections()(*bool) + GetDisplayName()(*string) + GetDnsServers()([]string) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetListenPort()(*int32) + GetNetwork()(*string) + GetRoleScopeTagIds()([]string) + GetRouteExcludes()([]string) + GetRouteIncludes()([]string) + GetRoutesExclude()([]string) + GetRoutesInclude()([]string) + GetSplitDNS()([]string) + SetAdvancedSettings(value []KeyValuePairable)() + SetDefaultDomainSuffix(value *string)() + SetDescription(value *string)() + SetDisableUdpConnections(value *bool)() + SetDisplayName(value *string)() + SetDnsServers(value []string)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetListenPort(value *int32)() + SetNetwork(value *string)() + SetRoleScopeTagIds(value []string)() + SetRouteExcludes(value []string)() + SetRouteIncludes(value []string)() + SetRoutesExclude(value []string)() + SetRoutesInclude(value []string)() + SetSplitDNS(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold.go new file mode 100644 index 000000000..04fa92068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelHealthThreshold entity that represents the health thresholds of a health metric +type MicrosoftTunnelHealthThreshold struct { + Entity + // The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. Read-only. + defaultHealthyThreshold *int64 + // The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency unhealthy > 20ms, health metrics can be customized. Read-only. + defaultUnhealthyThreshold *int64 + // The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. + healthyThreshold *int64 + // The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency Unhealthy > 20ms, health metrics can be customized. + unhealthyThreshold *int64 +} +// NewMicrosoftTunnelHealthThreshold instantiates a new microsoftTunnelHealthThreshold and sets the default values. +func NewMicrosoftTunnelHealthThreshold()(*MicrosoftTunnelHealthThreshold) { + m := &MicrosoftTunnelHealthThreshold{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftTunnelHealthThresholdFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelHealthThresholdFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelHealthThreshold(), nil +} +// GetDefaultHealthyThreshold gets the defaultHealthyThreshold property value. The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. Read-only. +func (m *MicrosoftTunnelHealthThreshold) GetDefaultHealthyThreshold()(*int64) { + return m.defaultHealthyThreshold +} +// GetDefaultUnhealthyThreshold gets the defaultUnhealthyThreshold property value. The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency unhealthy > 20ms, health metrics can be customized. Read-only. +func (m *MicrosoftTunnelHealthThreshold) GetDefaultUnhealthyThreshold()(*int64) { + return m.defaultUnhealthyThreshold +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelHealthThreshold) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["defaultHealthyThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultHealthyThreshold(val) + } + return nil + } + res["defaultUnhealthyThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDefaultUnhealthyThreshold(val) + } + return nil + } + res["healthyThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetHealthyThreshold(val) + } + return nil + } + res["unhealthyThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnhealthyThreshold(val) + } + return nil + } + return res +} +// GetHealthyThreshold gets the healthyThreshold property value. The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. +func (m *MicrosoftTunnelHealthThreshold) GetHealthyThreshold()(*int64) { + return m.healthyThreshold +} +// GetUnhealthyThreshold gets the unhealthyThreshold property value. The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency Unhealthy > 20ms, health metrics can be customized. +func (m *MicrosoftTunnelHealthThreshold) GetUnhealthyThreshold()(*int64) { + return m.unhealthyThreshold +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelHealthThreshold) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("defaultHealthyThreshold", m.GetDefaultHealthyThreshold()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("defaultUnhealthyThreshold", m.GetDefaultUnhealthyThreshold()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("healthyThreshold", m.GetHealthyThreshold()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("unhealthyThreshold", m.GetUnhealthyThreshold()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultHealthyThreshold sets the defaultHealthyThreshold property value. The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. Read-only. +func (m *MicrosoftTunnelHealthThreshold) SetDefaultHealthyThreshold(value *int64)() { + m.defaultHealthyThreshold = value +} +// SetDefaultUnhealthyThreshold sets the defaultUnhealthyThreshold property value. The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency unhealthy > 20ms, health metrics can be customized. Read-only. +func (m *MicrosoftTunnelHealthThreshold) SetDefaultUnhealthyThreshold(value *int64)() { + m.defaultUnhealthyThreshold = value +} +// SetHealthyThreshold sets the healthyThreshold property value. The threshold for being healthy based on default health status metrics: CPU usage healthy < 50%, Memory usage healthy < 50%, Disk space healthy > 5GB, Latency healthy < 10ms, health metrics can be customized. +func (m *MicrosoftTunnelHealthThreshold) SetHealthyThreshold(value *int64)() { + m.healthyThreshold = value +} +// SetUnhealthyThreshold sets the unhealthyThreshold property value. The threshold for being unhealthy based on default health status metrics: CPU usage unhealthy > 75%, Memory usage unhealthy > 75%, Disk space < 3GB, Latency Unhealthy > 20ms, health metrics can be customized. +func (m *MicrosoftTunnelHealthThreshold) SetUnhealthyThreshold(value *int64)() { + m.unhealthyThreshold = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_response.go new file mode 100644 index 000000000..e3fc55e99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelHealthThresholdCollectionResponse +type MicrosoftTunnelHealthThresholdCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftTunnelHealthThresholdable +} +// NewMicrosoftTunnelHealthThresholdCollectionResponse instantiates a new MicrosoftTunnelHealthThresholdCollectionResponse and sets the default values. +func NewMicrosoftTunnelHealthThresholdCollectionResponse()(*MicrosoftTunnelHealthThresholdCollectionResponse) { + m := &MicrosoftTunnelHealthThresholdCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftTunnelHealthThresholdCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelHealthThresholdCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelHealthThresholdCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelHealthThresholdCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelHealthThresholdFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelHealthThresholdable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelHealthThresholdable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftTunnelHealthThresholdCollectionResponse) GetValue()([]MicrosoftTunnelHealthThresholdable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelHealthThresholdCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftTunnelHealthThresholdCollectionResponse) SetValue(value []MicrosoftTunnelHealthThresholdable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_responseable.go new file mode 100644 index 000000000..32c1c343b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_threshold_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelHealthThresholdCollectionResponseable +type MicrosoftTunnelHealthThresholdCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftTunnelHealthThresholdable) + SetValue(value []MicrosoftTunnelHealthThresholdable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_thresholdable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_thresholdable.go new file mode 100644 index 000000000..fd7d8d060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_health_thresholdable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelHealthThresholdable +type MicrosoftTunnelHealthThresholdable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultHealthyThreshold()(*int64) + GetDefaultUnhealthyThreshold()(*int64) + GetHealthyThreshold()(*int64) + GetUnhealthyThreshold()(*int64) + SetDefaultHealthyThreshold(value *int64)() + SetDefaultUnhealthyThreshold(value *int64)() + SetHealthyThreshold(value *int64)() + SetUnhealthyThreshold(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_log_collection_status.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_log_collection_status.go new file mode 100644 index 000000000..c88d338a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_log_collection_status.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftTunnelLogCollectionStatus int + +const ( + // Indicates that the log collection is in progress + PENDING_MICROSOFTTUNNELLOGCOLLECTIONSTATUS MicrosoftTunnelLogCollectionStatus = iota + // Indicates that the log collection is completed + COMPLETED_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + // Indicates that the log collection has failed + FAILED_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + // Placeholder value for future expansion enums + UNKNOWNFUTUREVALUE_MICROSOFTTUNNELLOGCOLLECTIONSTATUS +) + +func (i MicrosoftTunnelLogCollectionStatus) String() string { + return []string{"pending", "completed", "failed", "unknownFutureValue"}[i] +} +func ParseMicrosoftTunnelLogCollectionStatus(v string) (interface{}, error) { + result := PENDING_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + switch v { + case "pending": + result = PENDING_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + case "completed": + result = COMPLETED_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + case "failed": + result = FAILED_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MICROSOFTTUNNELLOGCOLLECTIONSTATUS + default: + return 0, errors.New("Unknown MicrosoftTunnelLogCollectionStatus value: " + v) + } + return &result, nil +} +func SerializeMicrosoftTunnelLogCollectionStatus(values []MicrosoftTunnelLogCollectionStatus) []string { + 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/microsoft_tunnel_server.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server.go new file mode 100644 index 000000000..b87c6751e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServer entity that represents a single Microsoft Tunnel server +type MicrosoftTunnelServer struct { + Entity + // The digest of the current agent image running on this server + agentImageDigest *string + // The display name for the server. This property is required when a server is created and cannot be cleared during updates. + displayName *string + // Indicates when the server last checked in + lastCheckinDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The digest of the current server image running on this server + serverImageDigest *string + // Enum of possible MicrosoftTunnelServer health status types + tunnelServerHealthStatus *MicrosoftTunnelServerHealthStatus +} +// NewMicrosoftTunnelServer instantiates a new microsoftTunnelServer and sets the default values. +func NewMicrosoftTunnelServer()(*MicrosoftTunnelServer) { + m := &MicrosoftTunnelServer{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftTunnelServerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelServerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelServer(), nil +} +// GetAgentImageDigest gets the agentImageDigest property value. The digest of the current agent image running on this server +func (m *MicrosoftTunnelServer) GetAgentImageDigest()(*string) { + return m.agentImageDigest +} +// GetDisplayName gets the displayName property value. The display name for the server. This property is required when a server is created and cannot be cleared during updates. +func (m *MicrosoftTunnelServer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelServer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agentImageDigest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAgentImageDigest(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastCheckinDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCheckinDateTime(val) + } + return nil + } + res["serverImageDigest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerImageDigest(val) + } + return nil + } + res["tunnelServerHealthStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftTunnelServerHealthStatus) + if err != nil { + return err + } + if val != nil { + m.SetTunnelServerHealthStatus(val.(*MicrosoftTunnelServerHealthStatus)) + } + return nil + } + return res +} +// GetLastCheckinDateTime gets the lastCheckinDateTime property value. Indicates when the server last checked in +func (m *MicrosoftTunnelServer) GetLastCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCheckinDateTime +} +// GetServerImageDigest gets the serverImageDigest property value. The digest of the current server image running on this server +func (m *MicrosoftTunnelServer) GetServerImageDigest()(*string) { + return m.serverImageDigest +} +// GetTunnelServerHealthStatus gets the tunnelServerHealthStatus property value. Enum of possible MicrosoftTunnelServer health status types +func (m *MicrosoftTunnelServer) GetTunnelServerHealthStatus()(*MicrosoftTunnelServerHealthStatus) { + return m.tunnelServerHealthStatus +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelServer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("agentImageDigest", m.GetAgentImageDigest()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastCheckinDateTime", m.GetLastCheckinDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serverImageDigest", m.GetServerImageDigest()) + if err != nil { + return err + } + } + if m.GetTunnelServerHealthStatus() != nil { + cast := (*m.GetTunnelServerHealthStatus()).String() + err = writer.WriteStringValue("tunnelServerHealthStatus", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAgentImageDigest sets the agentImageDigest property value. The digest of the current agent image running on this server +func (m *MicrosoftTunnelServer) SetAgentImageDigest(value *string)() { + m.agentImageDigest = value +} +// SetDisplayName sets the displayName property value. The display name for the server. This property is required when a server is created and cannot be cleared during updates. +func (m *MicrosoftTunnelServer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastCheckinDateTime sets the lastCheckinDateTime property value. Indicates when the server last checked in +func (m *MicrosoftTunnelServer) SetLastCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCheckinDateTime = value +} +// SetServerImageDigest sets the serverImageDigest property value. The digest of the current server image running on this server +func (m *MicrosoftTunnelServer) SetServerImageDigest(value *string)() { + m.serverImageDigest = value +} +// SetTunnelServerHealthStatus sets the tunnelServerHealthStatus property value. Enum of possible MicrosoftTunnelServer health status types +func (m *MicrosoftTunnelServer) SetTunnelServerHealthStatus(value *MicrosoftTunnelServerHealthStatus)() { + m.tunnelServerHealthStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_response.go new file mode 100644 index 000000000..fb3c0dd08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerCollectionResponse +type MicrosoftTunnelServerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftTunnelServerable +} +// NewMicrosoftTunnelServerCollectionResponse instantiates a new MicrosoftTunnelServerCollectionResponse and sets the default values. +func NewMicrosoftTunnelServerCollectionResponse()(*MicrosoftTunnelServerCollectionResponse) { + m := &MicrosoftTunnelServerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftTunnelServerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelServerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelServerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelServerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelServerable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelServerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftTunnelServerCollectionResponse) GetValue()([]MicrosoftTunnelServerable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelServerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftTunnelServerCollectionResponse) SetValue(value []MicrosoftTunnelServerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_responseable.go new file mode 100644 index 000000000..7585267df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerCollectionResponseable +type MicrosoftTunnelServerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftTunnelServerable) + SetValue(value []MicrosoftTunnelServerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_health_status.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_health_status.go new file mode 100644 index 000000000..175b70de9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_health_status.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MicrosoftTunnelServerHealthStatus int + +const ( + // Indicates that the health status of the server is unknown. This occurs when no health status has been reported, for example when the server is initialized, but has not yet been evaluated for its health. + UNKNOWN_MICROSOFTTUNNELSERVERHEALTHSTATUS MicrosoftTunnelServerHealthStatus = iota + // Indicates that the health status of the server is healthy. This should be the normal operational health status. + HEALTHY_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Indicates that the health status of the server is unhealthy. This is normally a transient condition that will last up to 5 minutes. If the server cannot be remediated while reporting unhealthy state, the health state will change to 'warning'. If it can be remediated, the health state will return to 'healthy'. + UNHEALTHY_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Indicates a warning based on the Tunnel Gateway server's CPU usage, memory usage, latency, TLS certificate, version + WARNING_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Indicates the server state is offline + OFFLINE_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Indicates the upgrade in progress during the upgrade cycle of when Intune begins upgrading servers, one server at a time + UPGRADEINPROGRESS_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Indicates the failure of the upgrade during the upgrade cycle of when Intune begins upgrading servers, one server at a time + UPGRADEFAILED_MICROSOFTTUNNELSERVERHEALTHSTATUS + // Evolvable enumeration sentinel value. Do not use enums. + UNKNOWNFUTUREVALUE_MICROSOFTTUNNELSERVERHEALTHSTATUS +) + +func (i MicrosoftTunnelServerHealthStatus) String() string { + return []string{"unknown", "healthy", "unhealthy", "warning", "offline", "upgradeInProgress", "upgradeFailed", "unknownFutureValue"}[i] +} +func ParseMicrosoftTunnelServerHealthStatus(v string) (interface{}, error) { + result := UNKNOWN_MICROSOFTTUNNELSERVERHEALTHSTATUS + switch v { + case "unknown": + result = UNKNOWN_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "healthy": + result = HEALTHY_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "unhealthy": + result = UNHEALTHY_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "warning": + result = WARNING_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "offline": + result = OFFLINE_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "upgradeInProgress": + result = UPGRADEINPROGRESS_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "upgradeFailed": + result = UPGRADEFAILED_MICROSOFTTUNNELSERVERHEALTHSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MICROSOFTTUNNELSERVERHEALTHSTATUS + default: + return 0, errors.New("Unknown MicrosoftTunnelServerHealthStatus value: " + v) + } + return &result, nil +} +func SerializeMicrosoftTunnelServerHealthStatus(values []MicrosoftTunnelServerHealthStatus) []string { + 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/microsoft_tunnel_server_log_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response.go new file mode 100644 index 000000000..66948ee4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response.go @@ -0,0 +1,218 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerLogCollectionResponse entity that stores the server log collection status. +type MicrosoftTunnelServerLogCollectionResponse struct { + Entity + // The end time of the logs collected + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time when the log collection is expired + expiryDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time when the log collection was requested + requestDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // ID of the server the log collection is requested upon + serverId *string + // The size of the logs in bytes + sizeInBytes *int64 + // The start time of the logs collected + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Enum type that represent the status of log collection + status *MicrosoftTunnelLogCollectionStatus +} +// NewMicrosoftTunnelServerLogCollectionResponse instantiates a new microsoftTunnelServerLogCollectionResponse and sets the default values. +func NewMicrosoftTunnelServerLogCollectionResponse()(*MicrosoftTunnelServerLogCollectionResponse) { + m := &MicrosoftTunnelServerLogCollectionResponse{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftTunnelServerLogCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelServerLogCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelServerLogCollectionResponse(), nil +} +// GetEndDateTime gets the endDateTime property value. The end time of the logs collected +func (m *MicrosoftTunnelServerLogCollectionResponse) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetExpiryDateTime gets the expiryDateTime property value. The time when the log collection is expired +func (m *MicrosoftTunnelServerLogCollectionResponse) GetExpiryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expiryDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelServerLogCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["expiryDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiryDateTime(val) + } + return nil + } + res["requestDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestDateTime(val) + } + return nil + } + res["serverId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServerId(val) + } + return nil + } + res["sizeInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeInBytes(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMicrosoftTunnelLogCollectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*MicrosoftTunnelLogCollectionStatus)) + } + return nil + } + return res +} +// GetRequestDateTime gets the requestDateTime property value. The time when the log collection was requested +func (m *MicrosoftTunnelServerLogCollectionResponse) GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestDateTime +} +// GetServerId gets the serverId property value. ID of the server the log collection is requested upon +func (m *MicrosoftTunnelServerLogCollectionResponse) GetServerId()(*string) { + return m.serverId +} +// GetSizeInBytes gets the sizeInBytes property value. The size of the logs in bytes +func (m *MicrosoftTunnelServerLogCollectionResponse) GetSizeInBytes()(*int64) { + return m.sizeInBytes +} +// GetStartDateTime gets the startDateTime property value. The start time of the logs collected +func (m *MicrosoftTunnelServerLogCollectionResponse) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetStatus gets the status property value. Enum type that represent the status of log collection +func (m *MicrosoftTunnelServerLogCollectionResponse) GetStatus()(*MicrosoftTunnelLogCollectionStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelServerLogCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expiryDateTime", m.GetExpiryDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestDateTime", m.GetRequestDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serverId", m.GetServerId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sizeInBytes", m.GetSizeInBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetEndDateTime sets the endDateTime property value. The end time of the logs collected +func (m *MicrosoftTunnelServerLogCollectionResponse) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetExpiryDateTime sets the expiryDateTime property value. The time when the log collection is expired +func (m *MicrosoftTunnelServerLogCollectionResponse) SetExpiryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expiryDateTime = value +} +// SetRequestDateTime sets the requestDateTime property value. The time when the log collection was requested +func (m *MicrosoftTunnelServerLogCollectionResponse) SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestDateTime = value +} +// SetServerId sets the serverId property value. ID of the server the log collection is requested upon +func (m *MicrosoftTunnelServerLogCollectionResponse) SetServerId(value *string)() { + m.serverId = value +} +// SetSizeInBytes sets the sizeInBytes property value. The size of the logs in bytes +func (m *MicrosoftTunnelServerLogCollectionResponse) SetSizeInBytes(value *int64)() { + m.sizeInBytes = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the logs collected +func (m *MicrosoftTunnelServerLogCollectionResponse) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetStatus sets the status property value. Enum type that represent the status of log collection +func (m *MicrosoftTunnelServerLogCollectionResponse) SetStatus(value *MicrosoftTunnelLogCollectionStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_response.go new file mode 100644 index 000000000..a87de1ff4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerLogCollectionResponseCollectionResponse +type MicrosoftTunnelServerLogCollectionResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftTunnelServerLogCollectionResponseable +} +// NewMicrosoftTunnelServerLogCollectionResponseCollectionResponse instantiates a new MicrosoftTunnelServerLogCollectionResponseCollectionResponse and sets the default values. +func NewMicrosoftTunnelServerLogCollectionResponseCollectionResponse()(*MicrosoftTunnelServerLogCollectionResponseCollectionResponse) { + m := &MicrosoftTunnelServerLogCollectionResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftTunnelServerLogCollectionResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelServerLogCollectionResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelServerLogCollectionResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelServerLogCollectionResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelServerLogCollectionResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelServerLogCollectionResponseable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelServerLogCollectionResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftTunnelServerLogCollectionResponseCollectionResponse) GetValue()([]MicrosoftTunnelServerLogCollectionResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelServerLogCollectionResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftTunnelServerLogCollectionResponseCollectionResponse) SetValue(value []MicrosoftTunnelServerLogCollectionResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_responseable.go new file mode 100644 index 000000000..599670618 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerLogCollectionResponseCollectionResponseable +type MicrosoftTunnelServerLogCollectionResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftTunnelServerLogCollectionResponseable) + SetValue(value []MicrosoftTunnelServerLogCollectionResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_responseable.go new file mode 100644 index 000000000..f15ef2edd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_server_log_collection_responseable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerLogCollectionResponseable +type MicrosoftTunnelServerLogCollectionResponseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpiryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetServerId()(*string) + GetSizeInBytes()(*int64) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*MicrosoftTunnelLogCollectionStatus) + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpiryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetServerId(value *string)() + SetSizeInBytes(value *int64)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *MicrosoftTunnelLogCollectionStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_serverable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_serverable.go new file mode 100644 index 000000000..bc446f45f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_serverable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelServerable +type MicrosoftTunnelServerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentImageDigest()(*string) + GetDisplayName()(*string) + GetLastCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetServerImageDigest()(*string) + GetTunnelServerHealthStatus()(*MicrosoftTunnelServerHealthStatus) + SetAgentImageDigest(value *string)() + SetDisplayName(value *string)() + SetLastCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetServerImageDigest(value *string)() + SetTunnelServerHealthStatus(value *MicrosoftTunnelServerHealthStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site.go new file mode 100644 index 000000000..550de1c94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site.go @@ -0,0 +1,358 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelSite entity that represents a Microsoft Tunnel site +type MicrosoftTunnelSite struct { + Entity + // The site's description (optional) + description *string + // The display name for the site. This property is required when a site is created. + displayName *string + // The site's Internal Network Access Probe URL + internalNetworkProbeUrl *string + // The MicrosoftTunnelConfiguration that has been applied to this MicrosoftTunnelSite + microsoftTunnelConfiguration MicrosoftTunnelConfigurationable + // A list of MicrosoftTunnelServers that are registered to this MicrosoftTunnelSite + microsoftTunnelServers []MicrosoftTunnelServerable + // The site's public domain name or IP address + publicAddress *string + // List of Scope Tags for this Entity instance + roleScopeTagIds []string + // The site's automatic upgrade setting. True for automatic upgrades, false for manual control + upgradeAutomatically *bool + // The site provides the state of when an upgrade is available + upgradeAvailable *bool + // The site's upgrade window end time of day + upgradeWindowEndTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // The site's upgrade window start time of day + upgradeWindowStartTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // The site's timezone represented as a minute offset from UTC + upgradeWindowUtcOffsetInMinutes *int32 +} +// NewMicrosoftTunnelSite instantiates a new microsoftTunnelSite and sets the default values. +func NewMicrosoftTunnelSite()(*MicrosoftTunnelSite) { + m := &MicrosoftTunnelSite{ + Entity: *NewEntity(), + } + return m +} +// CreateMicrosoftTunnelSiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelSiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelSite(), nil +} +// GetDescription gets the description property value. The site's description (optional) +func (m *MicrosoftTunnelSite) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display name for the site. This property is required when a site is created. +func (m *MicrosoftTunnelSite) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelSite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["internalNetworkProbeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternalNetworkProbeUrl(val) + } + return nil + } + res["microsoftTunnelConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMicrosoftTunnelConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftTunnelConfiguration(val.(MicrosoftTunnelConfigurationable)) + } + return nil + } + res["microsoftTunnelServers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelServerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelServerable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelServerable) + } + m.SetMicrosoftTunnelServers(res) + } + return nil + } + res["publicAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicAddress(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["upgradeAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUpgradeAutomatically(val) + } + return nil + } + res["upgradeAvailable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUpgradeAvailable(val) + } + return nil + } + res["upgradeWindowEndTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetUpgradeWindowEndTime(val) + } + return nil + } + res["upgradeWindowStartTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetUpgradeWindowStartTime(val) + } + return nil + } + res["upgradeWindowUtcOffsetInMinutes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUpgradeWindowUtcOffsetInMinutes(val) + } + return nil + } + return res +} +// GetInternalNetworkProbeUrl gets the internalNetworkProbeUrl property value. The site's Internal Network Access Probe URL +func (m *MicrosoftTunnelSite) GetInternalNetworkProbeUrl()(*string) { + return m.internalNetworkProbeUrl +} +// GetMicrosoftTunnelConfiguration gets the microsoftTunnelConfiguration property value. The MicrosoftTunnelConfiguration that has been applied to this MicrosoftTunnelSite +func (m *MicrosoftTunnelSite) GetMicrosoftTunnelConfiguration()(MicrosoftTunnelConfigurationable) { + return m.microsoftTunnelConfiguration +} +// GetMicrosoftTunnelServers gets the microsoftTunnelServers property value. A list of MicrosoftTunnelServers that are registered to this MicrosoftTunnelSite +func (m *MicrosoftTunnelSite) GetMicrosoftTunnelServers()([]MicrosoftTunnelServerable) { + return m.microsoftTunnelServers +} +// GetPublicAddress gets the publicAddress property value. The site's public domain name or IP address +func (m *MicrosoftTunnelSite) GetPublicAddress()(*string) { + return m.publicAddress +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance +func (m *MicrosoftTunnelSite) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetUpgradeAutomatically gets the upgradeAutomatically property value. The site's automatic upgrade setting. True for automatic upgrades, false for manual control +func (m *MicrosoftTunnelSite) GetUpgradeAutomatically()(*bool) { + return m.upgradeAutomatically +} +// GetUpgradeAvailable gets the upgradeAvailable property value. The site provides the state of when an upgrade is available +func (m *MicrosoftTunnelSite) GetUpgradeAvailable()(*bool) { + return m.upgradeAvailable +} +// GetUpgradeWindowEndTime gets the upgradeWindowEndTime property value. The site's upgrade window end time of day +func (m *MicrosoftTunnelSite) GetUpgradeWindowEndTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.upgradeWindowEndTime +} +// GetUpgradeWindowStartTime gets the upgradeWindowStartTime property value. The site's upgrade window start time of day +func (m *MicrosoftTunnelSite) GetUpgradeWindowStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.upgradeWindowStartTime +} +// GetUpgradeWindowUtcOffsetInMinutes gets the upgradeWindowUtcOffsetInMinutes property value. The site's timezone represented as a minute offset from UTC +func (m *MicrosoftTunnelSite) GetUpgradeWindowUtcOffsetInMinutes()(*int32) { + return m.upgradeWindowUtcOffsetInMinutes +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelSite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("internalNetworkProbeUrl", m.GetInternalNetworkProbeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("microsoftTunnelConfiguration", m.GetMicrosoftTunnelConfiguration()) + if err != nil { + return err + } + } + if m.GetMicrosoftTunnelServers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMicrosoftTunnelServers())) + for i, v := range m.GetMicrosoftTunnelServers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("microsoftTunnelServers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publicAddress", m.GetPublicAddress()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("upgradeAutomatically", m.GetUpgradeAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("upgradeAvailable", m.GetUpgradeAvailable()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeOnlyValue("upgradeWindowEndTime", m.GetUpgradeWindowEndTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeOnlyValue("upgradeWindowStartTime", m.GetUpgradeWindowStartTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("upgradeWindowUtcOffsetInMinutes", m.GetUpgradeWindowUtcOffsetInMinutes()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. The site's description (optional) +func (m *MicrosoftTunnelSite) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display name for the site. This property is required when a site is created. +func (m *MicrosoftTunnelSite) SetDisplayName(value *string)() { + m.displayName = value +} +// SetInternalNetworkProbeUrl sets the internalNetworkProbeUrl property value. The site's Internal Network Access Probe URL +func (m *MicrosoftTunnelSite) SetInternalNetworkProbeUrl(value *string)() { + m.internalNetworkProbeUrl = value +} +// SetMicrosoftTunnelConfiguration sets the microsoftTunnelConfiguration property value. The MicrosoftTunnelConfiguration that has been applied to this MicrosoftTunnelSite +func (m *MicrosoftTunnelSite) SetMicrosoftTunnelConfiguration(value MicrosoftTunnelConfigurationable)() { + m.microsoftTunnelConfiguration = value +} +// SetMicrosoftTunnelServers sets the microsoftTunnelServers property value. A list of MicrosoftTunnelServers that are registered to this MicrosoftTunnelSite +func (m *MicrosoftTunnelSite) SetMicrosoftTunnelServers(value []MicrosoftTunnelServerable)() { + m.microsoftTunnelServers = value +} +// SetPublicAddress sets the publicAddress property value. The site's public domain name or IP address +func (m *MicrosoftTunnelSite) SetPublicAddress(value *string)() { + m.publicAddress = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance +func (m *MicrosoftTunnelSite) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetUpgradeAutomatically sets the upgradeAutomatically property value. The site's automatic upgrade setting. True for automatic upgrades, false for manual control +func (m *MicrosoftTunnelSite) SetUpgradeAutomatically(value *bool)() { + m.upgradeAutomatically = value +} +// SetUpgradeAvailable sets the upgradeAvailable property value. The site provides the state of when an upgrade is available +func (m *MicrosoftTunnelSite) SetUpgradeAvailable(value *bool)() { + m.upgradeAvailable = value +} +// SetUpgradeWindowEndTime sets the upgradeWindowEndTime property value. The site's upgrade window end time of day +func (m *MicrosoftTunnelSite) SetUpgradeWindowEndTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.upgradeWindowEndTime = value +} +// SetUpgradeWindowStartTime sets the upgradeWindowStartTime property value. The site's upgrade window start time of day +func (m *MicrosoftTunnelSite) SetUpgradeWindowStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.upgradeWindowStartTime = value +} +// SetUpgradeWindowUtcOffsetInMinutes sets the upgradeWindowUtcOffsetInMinutes property value. The site's timezone represented as a minute offset from UTC +func (m *MicrosoftTunnelSite) SetUpgradeWindowUtcOffsetInMinutes(value *int32)() { + m.upgradeWindowUtcOffsetInMinutes = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_response.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_response.go new file mode 100644 index 000000000..e77c6856a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelSiteCollectionResponse +type MicrosoftTunnelSiteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MicrosoftTunnelSiteable +} +// NewMicrosoftTunnelSiteCollectionResponse instantiates a new MicrosoftTunnelSiteCollectionResponse and sets the default values. +func NewMicrosoftTunnelSiteCollectionResponse()(*MicrosoftTunnelSiteCollectionResponse) { + m := &MicrosoftTunnelSiteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMicrosoftTunnelSiteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMicrosoftTunnelSiteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMicrosoftTunnelSiteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MicrosoftTunnelSiteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMicrosoftTunnelSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MicrosoftTunnelSiteable, len(val)) + for i, v := range val { + res[i] = v.(MicrosoftTunnelSiteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MicrosoftTunnelSiteCollectionResponse) GetValue()([]MicrosoftTunnelSiteable) { + return m.value +} +// Serialize serializes information the current object +func (m *MicrosoftTunnelSiteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MicrosoftTunnelSiteCollectionResponse) SetValue(value []MicrosoftTunnelSiteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_responseable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_responseable.go new file mode 100644 index 000000000..60ea943ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_site_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelSiteCollectionResponseable +type MicrosoftTunnelSiteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MicrosoftTunnelSiteable) + SetValue(value []MicrosoftTunnelSiteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/microsoft_tunnel_siteable.go b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_siteable.go new file mode 100644 index 000000000..7e41867f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/microsoft_tunnel_siteable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MicrosoftTunnelSiteable +type MicrosoftTunnelSiteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetInternalNetworkProbeUrl()(*string) + GetMicrosoftTunnelConfiguration()(MicrosoftTunnelConfigurationable) + GetMicrosoftTunnelServers()([]MicrosoftTunnelServerable) + GetPublicAddress()(*string) + GetRoleScopeTagIds()([]string) + GetUpgradeAutomatically()(*bool) + GetUpgradeAvailable()(*bool) + GetUpgradeWindowEndTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetUpgradeWindowStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetUpgradeWindowUtcOffsetInMinutes()(*int32) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetInternalNetworkProbeUrl(value *string)() + SetMicrosoftTunnelConfiguration(value MicrosoftTunnelConfigurationable)() + SetMicrosoftTunnelServers(value []MicrosoftTunnelServerable)() + SetPublicAddress(value *string)() + SetRoleScopeTagIds(value []string)() + SetUpgradeAutomatically(value *bool)() + SetUpgradeAvailable(value *bool)() + SetUpgradeWindowEndTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetUpgradeWindowStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetUpgradeWindowUtcOffsetInMinutes(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/migration_status.go b/src/internal/connector/graph/betasdk/models/migration_status.go new file mode 100644 index 000000000..1b3f7da54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/migration_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MigrationStatus int + +const ( + READY_MIGRATIONSTATUS MigrationStatus = iota + NEEDSREVIEW_MIGRATIONSTATUS + ADDITIONALSTEPSREQUIRED_MIGRATIONSTATUS + UNKNOWNFUTUREVALUE_MIGRATIONSTATUS +) + +func (i MigrationStatus) String() string { + return []string{"ready", "needsReview", "additionalStepsRequired", "unknownFutureValue"}[i] +} +func ParseMigrationStatus(v string) (interface{}, error) { + result := READY_MIGRATIONSTATUS + switch v { + case "ready": + result = READY_MIGRATIONSTATUS + case "needsReview": + result = NEEDSREVIEW_MIGRATIONSTATUS + case "additionalStepsRequired": + result = ADDITIONALSTEPSREQUIRED_MIGRATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MIGRATIONSTATUS + default: + return 0, errors.New("Unknown MigrationStatus value: " + v) + } + return &result, nil +} +func SerializeMigrationStatus(values []MigrationStatus) []string { + 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/mime_content.go b/src/internal/connector/graph/betasdk/models/mime_content.go new file mode 100644 index 000000000..29dfe816a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mime_content.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MimeContent contains properties for a generic mime content. +type MimeContent 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 OdataType property + odataType *string + // Indicates the content mime type. + type_escaped *string + // The byte array that contains the actual content. + value []byte +} +// NewMimeContent instantiates a new mimeContent and sets the default values. +func NewMimeContent()(*MimeContent) { + m := &MimeContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMimeContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMimeContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMimeContent(), 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 *MimeContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MimeContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MimeContent) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Indicates the content mime type. +func (m *MimeContent) GetType()(*string) { + return m.type_escaped +} +// GetValue gets the value property value. The byte array that contains the actual content. +func (m *MimeContent) GetValue()([]byte) { + return m.value +} +// Serialize serializes information the current object +func (m *MimeContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteByteArrayValue("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 *MimeContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MimeContent) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Indicates the content mime type. +func (m *MimeContent) SetType(value *string)() { + m.type_escaped = value +} +// SetValue sets the value property value. The byte array that contains the actual content. +func (m *MimeContent) SetValue(value []byte)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mime_contentable.go b/src/internal/connector/graph/betasdk/models/mime_contentable.go new file mode 100644 index 000000000..51a626c8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mime_contentable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MimeContentable +type MimeContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*string) + GetValue()([]byte) + SetOdataType(value *string)() + SetType(value *string)() + SetValue(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/miracast_channel.go b/src/internal/connector/graph/betasdk/models/miracast_channel.go new file mode 100644 index 000000000..a267e3465 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/miracast_channel.go @@ -0,0 +1,112 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MiracastChannel int + +const ( + // User Defined, default value, no intent. + USERDEFINED_MIRACASTCHANNEL MiracastChannel = iota + // One. + ONE_MIRACASTCHANNEL + // Two. + TWO_MIRACASTCHANNEL + // Three. + THREE_MIRACASTCHANNEL + // Four. + FOUR_MIRACASTCHANNEL + // Five. + FIVE_MIRACASTCHANNEL + // Six. + SIX_MIRACASTCHANNEL + // Seven. + SEVEN_MIRACASTCHANNEL + // Eight. + EIGHT_MIRACASTCHANNEL + // Nine. + NINE_MIRACASTCHANNEL + // Ten. + TEN_MIRACASTCHANNEL + // Eleven. + ELEVEN_MIRACASTCHANNEL + // Thirty-Six. + THIRTYSIX_MIRACASTCHANNEL + // Forty. + FORTY_MIRACASTCHANNEL + // Forty-Four. + FORTYFOUR_MIRACASTCHANNEL + // Forty-Eight. + FORTYEIGHT_MIRACASTCHANNEL + // OneHundredForty-Nine. + ONEHUNDREDFORTYNINE_MIRACASTCHANNEL + // OneHundredFifty-Three. + ONEHUNDREDFIFTYTHREE_MIRACASTCHANNEL + // OneHundredFifty-Seven. + ONEHUNDREDFIFTYSEVEN_MIRACASTCHANNEL + // OneHundredSixty-One. + ONEHUNDREDSIXTYONE_MIRACASTCHANNEL + // OneHundredSixty-Five. + ONEHUNDREDSIXTYFIVE_MIRACASTCHANNEL +) + +func (i MiracastChannel) String() string { + return []string{"userDefined", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "ten", "eleven", "thirtySix", "forty", "fortyFour", "fortyEight", "oneHundredFortyNine", "oneHundredFiftyThree", "oneHundredFiftySeven", "oneHundredSixtyOne", "oneHundredSixtyFive"}[i] +} +func ParseMiracastChannel(v string) (interface{}, error) { + result := USERDEFINED_MIRACASTCHANNEL + switch v { + case "userDefined": + result = USERDEFINED_MIRACASTCHANNEL + case "one": + result = ONE_MIRACASTCHANNEL + case "two": + result = TWO_MIRACASTCHANNEL + case "three": + result = THREE_MIRACASTCHANNEL + case "four": + result = FOUR_MIRACASTCHANNEL + case "five": + result = FIVE_MIRACASTCHANNEL + case "six": + result = SIX_MIRACASTCHANNEL + case "seven": + result = SEVEN_MIRACASTCHANNEL + case "eight": + result = EIGHT_MIRACASTCHANNEL + case "nine": + result = NINE_MIRACASTCHANNEL + case "ten": + result = TEN_MIRACASTCHANNEL + case "eleven": + result = ELEVEN_MIRACASTCHANNEL + case "thirtySix": + result = THIRTYSIX_MIRACASTCHANNEL + case "forty": + result = FORTY_MIRACASTCHANNEL + case "fortyFour": + result = FORTYFOUR_MIRACASTCHANNEL + case "fortyEight": + result = FORTYEIGHT_MIRACASTCHANNEL + case "oneHundredFortyNine": + result = ONEHUNDREDFORTYNINE_MIRACASTCHANNEL + case "oneHundredFiftyThree": + result = ONEHUNDREDFIFTYTHREE_MIRACASTCHANNEL + case "oneHundredFiftySeven": + result = ONEHUNDREDFIFTYSEVEN_MIRACASTCHANNEL + case "oneHundredSixtyOne": + result = ONEHUNDREDSIXTYONE_MIRACASTCHANNEL + case "oneHundredSixtyFive": + result = ONEHUNDREDSIXTYFIVE_MIRACASTCHANNEL + default: + return 0, errors.New("Unknown MiracastChannel value: " + v) + } + return &result, nil +} +func SerializeMiracastChannel(values []MiracastChannel) []string { + 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/ml_classification_match_tolerance.go b/src/internal/connector/graph/betasdk/models/ml_classification_match_tolerance.go new file mode 100644 index 000000000..41c38e8c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ml_classification_match_tolerance.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MlClassificationMatchTolerance int + +const ( + EXACT_MLCLASSIFICATIONMATCHTOLERANCE MlClassificationMatchTolerance = iota + NEAR_MLCLASSIFICATIONMATCHTOLERANCE +) + +func (i MlClassificationMatchTolerance) String() string { + return []string{"exact", "near"}[i] +} +func ParseMlClassificationMatchTolerance(v string) (interface{}, error) { + result := EXACT_MLCLASSIFICATIONMATCHTOLERANCE + switch v { + case "exact": + result = EXACT_MLCLASSIFICATIONMATCHTOLERANCE + case "near": + result = NEAR_MLCLASSIFICATIONMATCHTOLERANCE + default: + return 0, errors.New("Unknown MlClassificationMatchTolerance value: " + v) + } + return &result, nil +} +func SerializeMlClassificationMatchTolerance(values []MlClassificationMatchTolerance) []string { + 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/mobile_app.go b/src/internal/connector/graph/betasdk/models/mobile_app.go new file mode 100644 index 000000000..20106237a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app.go @@ -0,0 +1,822 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileApp +type MobileApp struct { + Entity + // The list of group assignments for this mobile app. + assignments []MobileAppAssignmentable + // The list of categories for this app. + categories []MobileAppCategoryable + // The date and time the app was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The total number of dependencies the child app has. + dependentAppCount *int32 + // The description of the app. + description *string + // The developer of the app. + developer *string + // The list of installation states for this mobile app. + deviceStatuses []MobileAppInstallStatusable + // The admin provided or imported title of the app. + displayName *string + // The more information Url. + informationUrl *string + // Mobile App Install Summary. + installSummary MobileAppInstallSummaryable + // The value indicating whether the app is assigned to at least one group. + isAssigned *bool + // The value indicating whether the app is marked as featured by the admin. + isFeatured *bool + // The large icon, to be displayed in the app details and used for upload of the icon. + largeIcon MimeContentable + // The date and time the app was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Notes for the app. + notes *string + // The owner of the app. + owner *string + // The privacy statement Url. + privacyInformationUrl *string + // The publisher of the app. + publisher *string + // Indicates the publishing state of an app. + publishingState *MobileAppPublishingState + // List of relationships for this mobile app. + relationships []MobileAppRelationshipable + // List of scope tag ids for this mobile app. + roleScopeTagIds []string + // The total number of apps this app is directly or indirectly superseded by. + supersededAppCount *int32 + // The total number of apps this app directly or indirectly supersedes. + supersedingAppCount *int32 + // The upload state. + uploadState *int32 + // The list of installation states for this mobile app. + userStatuses []UserAppInstallStatusable +} +// NewMobileApp instantiates a new MobileApp and sets the default values. +func NewMobileApp()(*MobileApp) { + m := &MobileApp{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidForWorkApp": + return NewAndroidForWorkApp(), nil + case "#microsoft.graph.androidLobApp": + return NewAndroidLobApp(), nil + case "#microsoft.graph.androidManagedStoreApp": + return NewAndroidManagedStoreApp(), nil + case "#microsoft.graph.androidManagedStoreWebApp": + return NewAndroidManagedStoreWebApp(), nil + case "#microsoft.graph.androidStoreApp": + return NewAndroidStoreApp(), nil + case "#microsoft.graph.iosiPadOSWebClip": + return NewIosiPadOSWebClip(), nil + case "#microsoft.graph.iosLobApp": + return NewIosLobApp(), nil + case "#microsoft.graph.iosStoreApp": + return NewIosStoreApp(), nil + case "#microsoft.graph.iosVppApp": + return NewIosVppApp(), nil + case "#microsoft.graph.macOSDmgApp": + return NewMacOSDmgApp(), nil + case "#microsoft.graph.macOSLobApp": + return NewMacOSLobApp(), nil + case "#microsoft.graph.macOSMdatpApp": + return NewMacOSMdatpApp(), nil + case "#microsoft.graph.macOSMicrosoftDefenderApp": + return NewMacOSMicrosoftDefenderApp(), nil + case "#microsoft.graph.macOSMicrosoftEdgeApp": + return NewMacOSMicrosoftEdgeApp(), nil + case "#microsoft.graph.macOSOfficeSuiteApp": + return NewMacOSOfficeSuiteApp(), nil + case "#microsoft.graph.macOsVppApp": + return NewMacOsVppApp(), nil + case "#microsoft.graph.managedAndroidLobApp": + return NewManagedAndroidLobApp(), nil + case "#microsoft.graph.managedAndroidStoreApp": + return NewManagedAndroidStoreApp(), nil + case "#microsoft.graph.managedApp": + return NewManagedApp(), nil + case "#microsoft.graph.managedIOSLobApp": + return NewManagedIOSLobApp(), nil + case "#microsoft.graph.managedIOSStoreApp": + return NewManagedIOSStoreApp(), nil + case "#microsoft.graph.managedMobileLobApp": + return NewManagedMobileLobApp(), nil + case "#microsoft.graph.microsoftStoreForBusinessApp": + return NewMicrosoftStoreForBusinessApp(), nil + case "#microsoft.graph.mobileLobApp": + return NewMobileLobApp(), nil + case "#microsoft.graph.officeSuiteApp": + return NewOfficeSuiteApp(), nil + case "#microsoft.graph.webApp": + return NewWebApp(), nil + case "#microsoft.graph.win32LobApp": + return NewWin32LobApp(), nil + case "#microsoft.graph.windowsAppX": + return NewWindowsAppX(), nil + case "#microsoft.graph.windowsMicrosoftEdgeApp": + return NewWindowsMicrosoftEdgeApp(), nil + case "#microsoft.graph.windowsMobileMSI": + return NewWindowsMobileMSI(), nil + case "#microsoft.graph.windowsPhone81AppX": + return NewWindowsPhone81AppX(), nil + case "#microsoft.graph.windowsPhone81AppXBundle": + return NewWindowsPhone81AppXBundle(), nil + case "#microsoft.graph.windowsPhone81StoreApp": + return NewWindowsPhone81StoreApp(), nil + case "#microsoft.graph.windowsPhoneXAP": + return NewWindowsPhoneXAP(), nil + case "#microsoft.graph.windowsStoreApp": + return NewWindowsStoreApp(), nil + case "#microsoft.graph.windowsUniversalAppX": + return NewWindowsUniversalAppX(), nil + case "#microsoft.graph.windowsWebApp": + return NewWindowsWebApp(), nil + case "#microsoft.graph.winGetApp": + return NewWinGetApp(), nil + } + } + } + } + return NewMobileApp(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for this mobile app. +func (m *MobileApp) GetAssignments()([]MobileAppAssignmentable) { + return m.assignments +} +// GetCategories gets the categories property value. The list of categories for this app. +func (m *MobileApp) GetCategories()([]MobileAppCategoryable) { + return m.categories +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the app was created. +func (m *MobileApp) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDependentAppCount gets the dependentAppCount property value. The total number of dependencies the child app has. +func (m *MobileApp) GetDependentAppCount()(*int32) { + return m.dependentAppCount +} +// GetDescription gets the description property value. The description of the app. +func (m *MobileApp) GetDescription()(*string) { + return m.description +} +// GetDeveloper gets the developer property value. The developer of the app. +func (m *MobileApp) GetDeveloper()(*string) { + return m.developer +} +// GetDeviceStatuses gets the deviceStatuses property value. The list of installation states for this mobile app. +func (m *MobileApp) GetDeviceStatuses()([]MobileAppInstallStatusable) { + return m.deviceStatuses +} +// GetDisplayName gets the displayName property value. The admin provided or imported title of the app. +func (m *MobileApp) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppCategoryable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppCategoryable) + } + m.SetCategories(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["dependentAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDependentAppCount(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["developer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeveloper(val) + } + return nil + } + res["deviceStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppInstallStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppInstallStatusable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppInstallStatusable) + } + m.SetDeviceStatuses(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["informationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInformationUrl(val) + } + return nil + } + res["installSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppInstallSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInstallSummary(val.(MobileAppInstallSummaryable)) + } + return nil + } + res["isAssigned"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAssigned(val) + } + return nil + } + res["isFeatured"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFeatured(val) + } + return nil + } + res["largeIcon"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMimeContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLargeIcon(val.(MimeContentable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(val) + } + return nil + } + res["privacyInformationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrivacyInformationUrl(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + res["publishingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppPublishingState) + if err != nil { + return err + } + if val != nil { + m.SetPublishingState(val.(*MobileAppPublishingState)) + } + return nil + } + res["relationships"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppRelationshipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppRelationshipable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppRelationshipable) + } + m.SetRelationships(res) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["supersededAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupersededAppCount(val) + } + return nil + } + res["supersedingAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupersedingAppCount(val) + } + return nil + } + res["uploadState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUploadState(val) + } + return nil + } + res["userStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserAppInstallStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserAppInstallStatusable, len(val)) + for i, v := range val { + res[i] = v.(UserAppInstallStatusable) + } + m.SetUserStatuses(res) + } + return nil + } + return res +} +// GetInformationUrl gets the informationUrl property value. The more information Url. +func (m *MobileApp) GetInformationUrl()(*string) { + return m.informationUrl +} +// GetInstallSummary gets the installSummary property value. Mobile App Install Summary. +func (m *MobileApp) GetInstallSummary()(MobileAppInstallSummaryable) { + return m.installSummary +} +// GetIsAssigned gets the isAssigned property value. The value indicating whether the app is assigned to at least one group. +func (m *MobileApp) GetIsAssigned()(*bool) { + return m.isAssigned +} +// GetIsFeatured gets the isFeatured property value. The value indicating whether the app is marked as featured by the admin. +func (m *MobileApp) GetIsFeatured()(*bool) { + return m.isFeatured +} +// GetLargeIcon gets the largeIcon property value. The large icon, to be displayed in the app details and used for upload of the icon. +func (m *MobileApp) GetLargeIcon()(MimeContentable) { + return m.largeIcon +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the app was last modified. +func (m *MobileApp) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNotes gets the notes property value. Notes for the app. +func (m *MobileApp) GetNotes()(*string) { + return m.notes +} +// GetOwner gets the owner property value. The owner of the app. +func (m *MobileApp) GetOwner()(*string) { + return m.owner +} +// GetPrivacyInformationUrl gets the privacyInformationUrl property value. The privacy statement Url. +func (m *MobileApp) GetPrivacyInformationUrl()(*string) { + return m.privacyInformationUrl +} +// GetPublisher gets the publisher property value. The publisher of the app. +func (m *MobileApp) GetPublisher()(*string) { + return m.publisher +} +// GetPublishingState gets the publishingState property value. Indicates the publishing state of an app. +func (m *MobileApp) GetPublishingState()(*MobileAppPublishingState) { + return m.publishingState +} +// GetRelationships gets the relationships property value. List of relationships for this mobile app. +func (m *MobileApp) GetRelationships()([]MobileAppRelationshipable) { + return m.relationships +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of scope tag ids for this mobile app. +func (m *MobileApp) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetSupersededAppCount gets the supersededAppCount property value. The total number of apps this app is directly or indirectly superseded by. +func (m *MobileApp) GetSupersededAppCount()(*int32) { + return m.supersededAppCount +} +// GetSupersedingAppCount gets the supersedingAppCount property value. The total number of apps this app directly or indirectly supersedes. +func (m *MobileApp) GetSupersedingAppCount()(*int32) { + return m.supersedingAppCount +} +// GetUploadState gets the uploadState property value. The upload state. +func (m *MobileApp) GetUploadState()(*int32) { + return m.uploadState +} +// GetUserStatuses gets the userStatuses property value. The list of installation states for this mobile app. +func (m *MobileApp) GetUserStatuses()([]UserAppInstallStatusable) { + return m.userStatuses +} +// Serialize serializes information the current object +func (m *MobileApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategories())) + for i, v := range m.GetCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categories", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dependentAppCount", m.GetDependentAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("developer", m.GetDeveloper()) + if err != nil { + return err + } + } + if m.GetDeviceStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStatuses())) + for i, v := range m.GetDeviceStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("informationUrl", m.GetInformationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("installSummary", m.GetInstallSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAssigned", m.GetIsAssigned()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFeatured", m.GetIsFeatured()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("largeIcon", m.GetLargeIcon()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("privacyInformationUrl", m.GetPrivacyInformationUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + if m.GetPublishingState() != nil { + cast := (*m.GetPublishingState()).String() + err = writer.WriteStringValue("publishingState", &cast) + if err != nil { + return err + } + } + if m.GetRelationships() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRelationships())) + for i, v := range m.GetRelationships() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("relationships", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("supersededAppCount", m.GetSupersededAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("supersedingAppCount", m.GetSupersedingAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("uploadState", m.GetUploadState()) + if err != nil { + return err + } + } + if m.GetUserStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserStatuses())) + for i, v := range m.GetUserStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userStatuses", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for this mobile app. +func (m *MobileApp) SetAssignments(value []MobileAppAssignmentable)() { + m.assignments = value +} +// SetCategories sets the categories property value. The list of categories for this app. +func (m *MobileApp) SetCategories(value []MobileAppCategoryable)() { + m.categories = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the app was created. +func (m *MobileApp) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDependentAppCount sets the dependentAppCount property value. The total number of dependencies the child app has. +func (m *MobileApp) SetDependentAppCount(value *int32)() { + m.dependentAppCount = value +} +// SetDescription sets the description property value. The description of the app. +func (m *MobileApp) SetDescription(value *string)() { + m.description = value +} +// SetDeveloper sets the developer property value. The developer of the app. +func (m *MobileApp) SetDeveloper(value *string)() { + m.developer = value +} +// SetDeviceStatuses sets the deviceStatuses property value. The list of installation states for this mobile app. +func (m *MobileApp) SetDeviceStatuses(value []MobileAppInstallStatusable)() { + m.deviceStatuses = value +} +// SetDisplayName sets the displayName property value. The admin provided or imported title of the app. +func (m *MobileApp) SetDisplayName(value *string)() { + m.displayName = value +} +// SetInformationUrl sets the informationUrl property value. The more information Url. +func (m *MobileApp) SetInformationUrl(value *string)() { + m.informationUrl = value +} +// SetInstallSummary sets the installSummary property value. Mobile App Install Summary. +func (m *MobileApp) SetInstallSummary(value MobileAppInstallSummaryable)() { + m.installSummary = value +} +// SetIsAssigned sets the isAssigned property value. The value indicating whether the app is assigned to at least one group. +func (m *MobileApp) SetIsAssigned(value *bool)() { + m.isAssigned = value +} +// SetIsFeatured sets the isFeatured property value. The value indicating whether the app is marked as featured by the admin. +func (m *MobileApp) SetIsFeatured(value *bool)() { + m.isFeatured = value +} +// SetLargeIcon sets the largeIcon property value. The large icon, to be displayed in the app details and used for upload of the icon. +func (m *MobileApp) SetLargeIcon(value MimeContentable)() { + m.largeIcon = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the app was last modified. +func (m *MobileApp) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNotes sets the notes property value. Notes for the app. +func (m *MobileApp) SetNotes(value *string)() { + m.notes = value +} +// SetOwner sets the owner property value. The owner of the app. +func (m *MobileApp) SetOwner(value *string)() { + m.owner = value +} +// SetPrivacyInformationUrl sets the privacyInformationUrl property value. The privacy statement Url. +func (m *MobileApp) SetPrivacyInformationUrl(value *string)() { + m.privacyInformationUrl = value +} +// SetPublisher sets the publisher property value. The publisher of the app. +func (m *MobileApp) SetPublisher(value *string)() { + m.publisher = value +} +// SetPublishingState sets the publishingState property value. Indicates the publishing state of an app. +func (m *MobileApp) SetPublishingState(value *MobileAppPublishingState)() { + m.publishingState = value +} +// SetRelationships sets the relationships property value. List of relationships for this mobile app. +func (m *MobileApp) SetRelationships(value []MobileAppRelationshipable)() { + m.relationships = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of scope tag ids for this mobile app. +func (m *MobileApp) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetSupersededAppCount sets the supersededAppCount property value. The total number of apps this app is directly or indirectly superseded by. +func (m *MobileApp) SetSupersededAppCount(value *int32)() { + m.supersededAppCount = value +} +// SetSupersedingAppCount sets the supersedingAppCount property value. The total number of apps this app directly or indirectly supersedes. +func (m *MobileApp) SetSupersedingAppCount(value *int32)() { + m.supersedingAppCount = value +} +// SetUploadState sets the uploadState property value. The upload state. +func (m *MobileApp) SetUploadState(value *int32)() { + m.uploadState = value +} +// SetUserStatuses sets the userStatuses property value. The list of installation states for this mobile app. +func (m *MobileApp) SetUserStatuses(value []UserAppInstallStatusable)() { + m.userStatuses = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_action_type.go b/src/internal/connector/graph/betasdk/models/mobile_app_action_type.go new file mode 100644 index 000000000..b48e26063 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_action_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppActionType int + +const ( + // Unknown result. + UNKNOWN_MOBILEAPPACTIONTYPE MobileAppActionType = iota + // Application install command was sent. + INSTALLCOMMANDSENT_MOBILEAPPACTIONTYPE + // Application installed. + INSTALLED_MOBILEAPPACTIONTYPE + // Application uninstalled. + UNINSTALLED_MOBILEAPPACTIONTYPE + // User requested installation + USERREQUESTEDINSTALL_MOBILEAPPACTIONTYPE +) + +func (i MobileAppActionType) String() string { + return []string{"unknown", "installCommandSent", "installed", "uninstalled", "userRequestedInstall"}[i] +} +func ParseMobileAppActionType(v string) (interface{}, error) { + result := UNKNOWN_MOBILEAPPACTIONTYPE + switch v { + case "unknown": + result = UNKNOWN_MOBILEAPPACTIONTYPE + case "installCommandSent": + result = INSTALLCOMMANDSENT_MOBILEAPPACTIONTYPE + case "installed": + result = INSTALLED_MOBILEAPPACTIONTYPE + case "uninstalled": + result = UNINSTALLED_MOBILEAPPACTIONTYPE + case "userRequestedInstall": + result = USERREQUESTEDINSTALL_MOBILEAPPACTIONTYPE + default: + return 0, errors.New("Unknown MobileAppActionType value: " + v) + } + return &result, nil +} +func SerializeMobileAppActionType(values []MobileAppActionType) []string { + 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/mobile_app_assignment.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignment.go new file mode 100644 index 000000000..0018fd919 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignment.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignment a class containing the properties used for Group Assignment of a Mobile App. +type MobileAppAssignment struct { + Entity + // Possible values for the install intent chosen by the admin. + intent *InstallIntent + // The settings for target assignment defined by the admin. + settings MobileAppAssignmentSettingsable + // Represents source of assignment. + source *DeviceAndAppManagementAssignmentSource + // The identifier of the source of the assignment. + sourceId *string + // The target group assignment defined by the admin. + target DeviceAndAppManagementAssignmentTargetable +} +// NewMobileAppAssignment instantiates a new mobileAppAssignment and sets the default values. +func NewMobileAppAssignment()(*MobileAppAssignment) { + m := &MobileAppAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["intent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallIntent) + if err != nil { + return err + } + if val != nil { + m.SetIntent(val.(*InstallIntent)) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppAssignmentSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(MobileAppAssignmentSettingsable)) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*DeviceAndAppManagementAssignmentSource)) + } + return nil + } + res["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetIntent gets the intent property value. Possible values for the install intent chosen by the admin. +func (m *MobileAppAssignment) GetIntent()(*InstallIntent) { + return m.intent +} +// GetSettings gets the settings property value. The settings for target assignment defined by the admin. +func (m *MobileAppAssignment) GetSettings()(MobileAppAssignmentSettingsable) { + return m.settings +} +// GetSource gets the source property value. Represents source of assignment. +func (m *MobileAppAssignment) GetSource()(*DeviceAndAppManagementAssignmentSource) { + return m.source +} +// GetSourceId gets the sourceId property value. The identifier of the source of the assignment. +func (m *MobileAppAssignment) GetSourceId()(*string) { + return m.sourceId +} +// GetTarget gets the target property value. The target group assignment defined by the admin. +func (m *MobileAppAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *MobileAppAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetIntent() != nil { + cast := (*m.GetIntent()).String() + err = writer.WriteStringValue("intent", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetIntent sets the intent property value. Possible values for the install intent chosen by the admin. +func (m *MobileAppAssignment) SetIntent(value *InstallIntent)() { + m.intent = value +} +// SetSettings sets the settings property value. The settings for target assignment defined by the admin. +func (m *MobileAppAssignment) SetSettings(value MobileAppAssignmentSettingsable)() { + m.settings = value +} +// SetSource sets the source property value. Represents source of assignment. +func (m *MobileAppAssignment) SetSource(value *DeviceAndAppManagementAssignmentSource)() { + m.source = value +} +// SetSourceId sets the sourceId property value. The identifier of the source of the assignment. +func (m *MobileAppAssignment) SetSourceId(value *string)() { + m.sourceId = value +} +// SetTarget sets the target property value. The target group assignment defined by the admin. +func (m *MobileAppAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_response.go new file mode 100644 index 000000000..6113a5d17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignmentCollectionResponse +type MobileAppAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppAssignmentable +} +// NewMobileAppAssignmentCollectionResponse instantiates a new MobileAppAssignmentCollectionResponse and sets the default values. +func NewMobileAppAssignmentCollectionResponse()(*MobileAppAssignmentCollectionResponse) { + m := &MobileAppAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppAssignmentCollectionResponse) GetValue()([]MobileAppAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppAssignmentCollectionResponse) SetValue(value []MobileAppAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_responseable.go new file mode 100644 index 000000000..ddb1d3f16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignmentCollectionResponseable +type MobileAppAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppAssignmentable) + SetValue(value []MobileAppAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settings.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settings.go new file mode 100644 index 000000000..c72107f27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settings.go @@ -0,0 +1,109 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignmentSettings abstract class to contain properties used to assign a mobile app to a group. +type MobileAppAssignmentSettings 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 OdataType property + odataType *string +} +// NewMobileAppAssignmentSettings instantiates a new mobileAppAssignmentSettings and sets the default values. +func NewMobileAppAssignmentSettings()(*MobileAppAssignmentSettings) { + m := &MobileAppAssignmentSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppAssignmentSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppAssignmentSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidManagedStoreAppAssignmentSettings": + return NewAndroidManagedStoreAppAssignmentSettings(), nil + case "#microsoft.graph.iosLobAppAssignmentSettings": + return NewIosLobAppAssignmentSettings(), nil + case "#microsoft.graph.iosStoreAppAssignmentSettings": + return NewIosStoreAppAssignmentSettings(), nil + case "#microsoft.graph.iosVppAppAssignmentSettings": + return NewIosVppAppAssignmentSettings(), nil + case "#microsoft.graph.macOsLobAppAssignmentSettings": + return NewMacOsLobAppAssignmentSettings(), nil + case "#microsoft.graph.macOsVppAppAssignmentSettings": + return NewMacOsVppAppAssignmentSettings(), nil + case "#microsoft.graph.microsoftStoreForBusinessAppAssignmentSettings": + return NewMicrosoftStoreForBusinessAppAssignmentSettings(), nil + case "#microsoft.graph.win32LobAppAssignmentSettings": + return NewWin32LobAppAssignmentSettings(), nil + case "#microsoft.graph.windowsAppXAppAssignmentSettings": + return NewWindowsAppXAppAssignmentSettings(), nil + case "#microsoft.graph.windowsUniversalAppXAppAssignmentSettings": + return NewWindowsUniversalAppXAppAssignmentSettings(), nil + case "#microsoft.graph.winGetAppAssignmentSettings": + return NewWinGetAppAssignmentSettings(), nil + } + } + } + } + return NewMobileAppAssignmentSettings(), 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 *MobileAppAssignmentSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppAssignmentSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppAssignmentSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MobileAppAssignmentSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MobileAppAssignmentSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppAssignmentSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settingsable.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settingsable.go new file mode 100644 index 000000000..7818ae54b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignment_settingsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignmentSettingsable +type MobileAppAssignmentSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_assignmentable.go b/src/internal/connector/graph/betasdk/models/mobile_app_assignmentable.go new file mode 100644 index 000000000..e4c5e0c74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_assignmentable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppAssignmentable +type MobileAppAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIntent()(*InstallIntent) + GetSettings()(MobileAppAssignmentSettingsable) + GetSource()(*DeviceAndAppManagementAssignmentSource) + GetSourceId()(*string) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetIntent(value *InstallIntent)() + SetSettings(value MobileAppAssignmentSettingsable)() + SetSource(value *DeviceAndAppManagementAssignmentSource)() + SetSourceId(value *string)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_category.go b/src/internal/connector/graph/betasdk/models/mobile_app_category.go new file mode 100644 index 000000000..3a941e94e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_category.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCategory contains properties for a single Intune app category. +type MobileAppCategory struct { + Entity + // The name of the app category. + displayName *string + // The date and time the mobileAppCategory was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewMobileAppCategory instantiates a new mobileAppCategory and sets the default values. +func NewMobileAppCategory()(*MobileAppCategory) { + m := &MobileAppCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppCategory(), nil +} +// GetDisplayName gets the displayName property value. The name of the app category. +func (m *MobileAppCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time the mobileAppCategory was last modified. +func (m *MobileAppCategory) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *MobileAppCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the app category. +func (m *MobileAppCategory) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time the mobileAppCategory was last modified. +func (m *MobileAppCategory) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_response.go new file mode 100644 index 000000000..13e2473d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCategoryCollectionResponse +type MobileAppCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppCategoryable +} +// NewMobileAppCategoryCollectionResponse instantiates a new MobileAppCategoryCollectionResponse and sets the default values. +func NewMobileAppCategoryCollectionResponse()(*MobileAppCategoryCollectionResponse) { + m := &MobileAppCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppCategoryable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppCategoryCollectionResponse) GetValue()([]MobileAppCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppCategoryCollectionResponse) SetValue(value []MobileAppCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_responseable.go new file mode 100644 index 000000000..8ec0fc918 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCategoryCollectionResponseable +type MobileAppCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppCategoryable) + SetValue(value []MobileAppCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_categoryable.go b/src/internal/connector/graph/betasdk/models/mobile_app_categoryable.go new file mode 100644 index 000000000..337259bdb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_categoryable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCategoryable +type MobileAppCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_collection_response.go new file mode 100644 index 000000000..56b1d4fe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCollectionResponse +type MobileAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppable +} +// NewMobileAppCollectionResponse instantiates a new MobileAppCollectionResponse and sets the default values. +func NewMobileAppCollectionResponse()(*MobileAppCollectionResponse) { + m := &MobileAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppCollectionResponse) GetValue()([]MobileAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppCollectionResponse) SetValue(value []MobileAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_collection_responseable.go new file mode 100644 index 000000000..b2ed59cd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppCollectionResponseable +type MobileAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppable) + SetValue(value []MobileAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content.go b/src/internal/connector/graph/betasdk/models/mobile_app_content.go new file mode 100644 index 000000000..21ce49606 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content.go @@ -0,0 +1,102 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContent contains content properties for a specific app version. Each mobileAppContent can have multiple mobileAppContentFile. +type MobileAppContent struct { + Entity + // The collection of contained apps in a MobileLobApp acting as a package. + containedApps []MobileContainedAppable + // The list of files for this app content version. + files []MobileAppContentFileable +} +// NewMobileAppContent instantiates a new mobileAppContent and sets the default values. +func NewMobileAppContent()(*MobileAppContent) { + m := &MobileAppContent{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContent(), nil +} +// GetContainedApps gets the containedApps property value. The collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppContent) GetContainedApps()([]MobileContainedAppable) { + return m.containedApps +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["containedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileContainedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileContainedAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileContainedAppable) + } + m.SetContainedApps(res) + } + return nil + } + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentFileable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppContentFileable) + } + m.SetFiles(res) + } + return nil + } + return res +} +// GetFiles gets the files property value. The list of files for this app content version. +func (m *MobileAppContent) GetFiles()([]MobileAppContentFileable) { + return m.files +} +// Serialize serializes information the current object +func (m *MobileAppContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetContainedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContainedApps())) + for i, v := range m.GetContainedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("containedApps", cast) + if err != nil { + return err + } + } + if m.GetFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFiles())) + for i, v := range m.GetFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("files", cast) + if err != nil { + return err + } + } + return nil +} +// SetContainedApps sets the containedApps property value. The collection of contained apps in a MobileLobApp acting as a package. +func (m *MobileAppContent) SetContainedApps(value []MobileContainedAppable)() { + m.containedApps = value +} +// SetFiles sets the files property value. The list of files for this app content version. +func (m *MobileAppContent) SetFiles(value []MobileAppContentFileable)() { + m.files = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_response.go new file mode 100644 index 000000000..df2c5f115 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentCollectionResponse +type MobileAppContentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppContentable +} +// NewMobileAppContentCollectionResponse instantiates a new MobileAppContentCollectionResponse and sets the default values. +func NewMobileAppContentCollectionResponse()(*MobileAppContentCollectionResponse) { + m := &MobileAppContentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppContentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppContentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppContentCollectionResponse) GetValue()([]MobileAppContentable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppContentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppContentCollectionResponse) SetValue(value []MobileAppContentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_responseable.go new file mode 100644 index 000000000..78d423403 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentCollectionResponseable +type MobileAppContentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppContentable) + SetValue(value []MobileAppContentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_file.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_file.go new file mode 100644 index 000000000..0ad12506e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_file.go @@ -0,0 +1,322 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentFile contains properties for a single installer file that is associated with a given mobileAppContent version. +type MobileAppContentFile struct { + Entity + // The Azure Storage URI. + azureStorageUri *string + // The time the Azure storage Uri expires. + azureStorageUriExpirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time the file was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A value indicating whether the file is committed. + isCommitted *bool + // Whether the content file is a dependency for the main content file. + isDependency *bool + // A value indicating whether the file is a framework file. + isFrameworkFile *bool + // The manifest information. + manifest []byte + // the file name. + name *string + // The size of the file prior to encryption. + size *int64 + // The size of the file after encryption. + sizeEncrypted *int64 + // Contains properties for upload request states. + uploadState *MobileAppContentFileUploadState +} +// NewMobileAppContentFile instantiates a new mobileAppContentFile and sets the default values. +func NewMobileAppContentFile()(*MobileAppContentFile) { + m := &MobileAppContentFile{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppContentFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContentFile(), nil +} +// GetAzureStorageUri gets the azureStorageUri property value. The Azure Storage URI. +func (m *MobileAppContentFile) GetAzureStorageUri()(*string) { + return m.azureStorageUri +} +// GetAzureStorageUriExpirationDateTime gets the azureStorageUriExpirationDateTime property value. The time the Azure storage Uri expires. +func (m *MobileAppContentFile) GetAzureStorageUriExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.azureStorageUriExpirationDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. The time the file was created. +func (m *MobileAppContentFile) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContentFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["azureStorageUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureStorageUri(val) + } + return nil + } + res["azureStorageUriExpirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureStorageUriExpirationDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["isCommitted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCommitted(val) + } + return nil + } + res["isDependency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDependency(val) + } + return nil + } + res["isFrameworkFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFrameworkFile(val) + } + return nil + } + res["manifest"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetManifest(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["sizeEncrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSizeEncrypted(val) + } + return nil + } + res["uploadState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppContentFileUploadState) + if err != nil { + return err + } + if val != nil { + m.SetUploadState(val.(*MobileAppContentFileUploadState)) + } + return nil + } + return res +} +// GetIsCommitted gets the isCommitted property value. A value indicating whether the file is committed. +func (m *MobileAppContentFile) GetIsCommitted()(*bool) { + return m.isCommitted +} +// GetIsDependency gets the isDependency property value. Whether the content file is a dependency for the main content file. +func (m *MobileAppContentFile) GetIsDependency()(*bool) { + return m.isDependency +} +// GetIsFrameworkFile gets the isFrameworkFile property value. A value indicating whether the file is a framework file. +func (m *MobileAppContentFile) GetIsFrameworkFile()(*bool) { + return m.isFrameworkFile +} +// GetManifest gets the manifest property value. The manifest information. +func (m *MobileAppContentFile) GetManifest()([]byte) { + return m.manifest +} +// GetName gets the name property value. the file name. +func (m *MobileAppContentFile) GetName()(*string) { + return m.name +} +// GetSize gets the size property value. The size of the file prior to encryption. +func (m *MobileAppContentFile) GetSize()(*int64) { + return m.size +} +// GetSizeEncrypted gets the sizeEncrypted property value. The size of the file after encryption. +func (m *MobileAppContentFile) GetSizeEncrypted()(*int64) { + return m.sizeEncrypted +} +// GetUploadState gets the uploadState property value. Contains properties for upload request states. +func (m *MobileAppContentFile) GetUploadState()(*MobileAppContentFileUploadState) { + return m.uploadState +} +// Serialize serializes information the current object +func (m *MobileAppContentFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureStorageUri", m.GetAzureStorageUri()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("azureStorageUriExpirationDateTime", m.GetAzureStorageUriExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCommitted", m.GetIsCommitted()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDependency", m.GetIsDependency()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFrameworkFile", m.GetIsFrameworkFile()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("manifest", m.GetManifest()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sizeEncrypted", m.GetSizeEncrypted()) + if err != nil { + return err + } + } + if m.GetUploadState() != nil { + cast := (*m.GetUploadState()).String() + err = writer.WriteStringValue("uploadState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAzureStorageUri sets the azureStorageUri property value. The Azure Storage URI. +func (m *MobileAppContentFile) SetAzureStorageUri(value *string)() { + m.azureStorageUri = value +} +// SetAzureStorageUriExpirationDateTime sets the azureStorageUriExpirationDateTime property value. The time the Azure storage Uri expires. +func (m *MobileAppContentFile) SetAzureStorageUriExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.azureStorageUriExpirationDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. The time the file was created. +func (m *MobileAppContentFile) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetIsCommitted sets the isCommitted property value. A value indicating whether the file is committed. +func (m *MobileAppContentFile) SetIsCommitted(value *bool)() { + m.isCommitted = value +} +// SetIsDependency sets the isDependency property value. Whether the content file is a dependency for the main content file. +func (m *MobileAppContentFile) SetIsDependency(value *bool)() { + m.isDependency = value +} +// SetIsFrameworkFile sets the isFrameworkFile property value. A value indicating whether the file is a framework file. +func (m *MobileAppContentFile) SetIsFrameworkFile(value *bool)() { + m.isFrameworkFile = value +} +// SetManifest sets the manifest property value. The manifest information. +func (m *MobileAppContentFile) SetManifest(value []byte)() { + m.manifest = value +} +// SetName sets the name property value. the file name. +func (m *MobileAppContentFile) SetName(value *string)() { + m.name = value +} +// SetSize sets the size property value. The size of the file prior to encryption. +func (m *MobileAppContentFile) SetSize(value *int64)() { + m.size = value +} +// SetSizeEncrypted sets the sizeEncrypted property value. The size of the file after encryption. +func (m *MobileAppContentFile) SetSizeEncrypted(value *int64)() { + m.sizeEncrypted = value +} +// SetUploadState sets the uploadState property value. Contains properties for upload request states. +func (m *MobileAppContentFile) SetUploadState(value *MobileAppContentFileUploadState)() { + m.uploadState = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_response.go new file mode 100644 index 000000000..5076eb606 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentFileCollectionResponse +type MobileAppContentFileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppContentFileable +} +// NewMobileAppContentFileCollectionResponse instantiates a new MobileAppContentFileCollectionResponse and sets the default values. +func NewMobileAppContentFileCollectionResponse()(*MobileAppContentFileCollectionResponse) { + m := &MobileAppContentFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppContentFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppContentFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppContentFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentFileable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppContentFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppContentFileCollectionResponse) GetValue()([]MobileAppContentFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppContentFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppContentFileCollectionResponse) SetValue(value []MobileAppContentFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_responseable.go new file mode 100644 index 000000000..abe555e93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentFileCollectionResponseable +type MobileAppContentFileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppContentFileable) + SetValue(value []MobileAppContentFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_content_file_upload_state.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_upload_state.go new file mode 100644 index 000000000..c452356da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_file_upload_state.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppContentFileUploadState int + +const ( + SUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE MobileAppContentFileUploadState = iota + TRANSIENTERROR_MOBILEAPPCONTENTFILEUPLOADSTATE + ERROR_MOBILEAPPCONTENTFILEUPLOADSTATE + UNKNOWN_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIREQUESTSUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIREQUESTPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIREQUESTFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIREQUESTTIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIRENEWALSUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIRENEWALPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIRENEWALFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + AZURESTORAGEURIRENEWALTIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE + COMMITFILESUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + COMMITFILEPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + COMMITFILEFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + COMMITFILETIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE +) + +func (i MobileAppContentFileUploadState) String() string { + return []string{"success", "transientError", "error", "unknown", "azureStorageUriRequestSuccess", "azureStorageUriRequestPending", "azureStorageUriRequestFailed", "azureStorageUriRequestTimedOut", "azureStorageUriRenewalSuccess", "azureStorageUriRenewalPending", "azureStorageUriRenewalFailed", "azureStorageUriRenewalTimedOut", "commitFileSuccess", "commitFilePending", "commitFileFailed", "commitFileTimedOut"}[i] +} +func ParseMobileAppContentFileUploadState(v string) (interface{}, error) { + result := SUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + switch v { + case "success": + result = SUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + case "transientError": + result = TRANSIENTERROR_MOBILEAPPCONTENTFILEUPLOADSTATE + case "error": + result = ERROR_MOBILEAPPCONTENTFILEUPLOADSTATE + case "unknown": + result = UNKNOWN_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRequestSuccess": + result = AZURESTORAGEURIREQUESTSUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRequestPending": + result = AZURESTORAGEURIREQUESTPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRequestFailed": + result = AZURESTORAGEURIREQUESTFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRequestTimedOut": + result = AZURESTORAGEURIREQUESTTIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRenewalSuccess": + result = AZURESTORAGEURIRENEWALSUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRenewalPending": + result = AZURESTORAGEURIRENEWALPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRenewalFailed": + result = AZURESTORAGEURIRENEWALFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + case "azureStorageUriRenewalTimedOut": + result = AZURESTORAGEURIRENEWALTIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE + case "commitFileSuccess": + result = COMMITFILESUCCESS_MOBILEAPPCONTENTFILEUPLOADSTATE + case "commitFilePending": + result = COMMITFILEPENDING_MOBILEAPPCONTENTFILEUPLOADSTATE + case "commitFileFailed": + result = COMMITFILEFAILED_MOBILEAPPCONTENTFILEUPLOADSTATE + case "commitFileTimedOut": + result = COMMITFILETIMEDOUT_MOBILEAPPCONTENTFILEUPLOADSTATE + default: + return 0, errors.New("Unknown MobileAppContentFileUploadState value: " + v) + } + return &result, nil +} +func SerializeMobileAppContentFileUploadState(values []MobileAppContentFileUploadState) []string { + 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/mobile_app_content_fileable.go b/src/internal/connector/graph/betasdk/models/mobile_app_content_fileable.go new file mode 100644 index 000000000..354e260fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_content_fileable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentFileable +type MobileAppContentFileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureStorageUri()(*string) + GetAzureStorageUriExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsCommitted()(*bool) + GetIsDependency()(*bool) + GetIsFrameworkFile()(*bool) + GetManifest()([]byte) + GetName()(*string) + GetSize()(*int64) + GetSizeEncrypted()(*int64) + GetUploadState()(*MobileAppContentFileUploadState) + SetAzureStorageUri(value *string)() + SetAzureStorageUriExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsCommitted(value *bool)() + SetIsDependency(value *bool)() + SetIsFrameworkFile(value *bool)() + SetManifest(value []byte)() + SetName(value *string)() + SetSize(value *int64)() + SetSizeEncrypted(value *int64)() + SetUploadState(value *MobileAppContentFileUploadState)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_contentable.go b/src/internal/connector/graph/betasdk/models/mobile_app_contentable.go new file mode 100644 index 000000000..f9fd76111 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_contentable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppContentable +type MobileAppContentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainedApps()([]MobileContainedAppable) + GetFiles()([]MobileAppContentFileable) + SetContainedApps(value []MobileContainedAppable)() + SetFiles(value []MobileAppContentFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_dependency.go b/src/internal/connector/graph/betasdk/models/mobile_app_dependency.go new file mode 100644 index 000000000..2b248a363 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_dependency.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppDependency +type MobileAppDependency struct { + MobileAppRelationship + // Indicates the dependency type associated with a relationship between two mobile apps. + dependencyType *MobileAppDependencyType + // The total number of apps that directly or indirectly depend on the parent app. + dependentAppCount *int32 + // The total number of apps the child app directly or indirectly depends on. + dependsOnAppCount *int32 +} +// NewMobileAppDependency instantiates a new MobileAppDependency and sets the default values. +func NewMobileAppDependency()(*MobileAppDependency) { + m := &MobileAppDependency{ + MobileAppRelationship: *NewMobileAppRelationship(), + } + odataTypeValue := "#microsoft.graph.mobileAppDependency"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMobileAppDependencyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppDependencyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppDependency(), nil +} +// GetDependencyType gets the dependencyType property value. Indicates the dependency type associated with a relationship between two mobile apps. +func (m *MobileAppDependency) GetDependencyType()(*MobileAppDependencyType) { + return m.dependencyType +} +// GetDependentAppCount gets the dependentAppCount property value. The total number of apps that directly or indirectly depend on the parent app. +func (m *MobileAppDependency) GetDependentAppCount()(*int32) { + return m.dependentAppCount +} +// GetDependsOnAppCount gets the dependsOnAppCount property value. The total number of apps the child app directly or indirectly depends on. +func (m *MobileAppDependency) GetDependsOnAppCount()(*int32) { + return m.dependsOnAppCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppDependency) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppRelationship.GetFieldDeserializers() + res["dependencyType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppDependencyType) + if err != nil { + return err + } + if val != nil { + m.SetDependencyType(val.(*MobileAppDependencyType)) + } + return nil + } + res["dependentAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDependentAppCount(val) + } + return nil + } + res["dependsOnAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDependsOnAppCount(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *MobileAppDependency) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppRelationship.Serialize(writer) + if err != nil { + return err + } + if m.GetDependencyType() != nil { + cast := (*m.GetDependencyType()).String() + err = writer.WriteStringValue("dependencyType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dependentAppCount", m.GetDependentAppCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("dependsOnAppCount", m.GetDependsOnAppCount()) + if err != nil { + return err + } + } + return nil +} +// SetDependencyType sets the dependencyType property value. Indicates the dependency type associated with a relationship between two mobile apps. +func (m *MobileAppDependency) SetDependencyType(value *MobileAppDependencyType)() { + m.dependencyType = value +} +// SetDependentAppCount sets the dependentAppCount property value. The total number of apps that directly or indirectly depend on the parent app. +func (m *MobileAppDependency) SetDependentAppCount(value *int32)() { + m.dependentAppCount = value +} +// SetDependsOnAppCount sets the dependsOnAppCount property value. The total number of apps the child app directly or indirectly depends on. +func (m *MobileAppDependency) SetDependsOnAppCount(value *int32)() { + m.dependsOnAppCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_response.go new file mode 100644 index 000000000..e0a2c6bf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppDependencyCollectionResponse +type MobileAppDependencyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppDependencyable +} +// NewMobileAppDependencyCollectionResponse instantiates a new MobileAppDependencyCollectionResponse and sets the default values. +func NewMobileAppDependencyCollectionResponse()(*MobileAppDependencyCollectionResponse) { + m := &MobileAppDependencyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppDependencyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppDependencyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppDependencyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppDependencyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppDependencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppDependencyable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppDependencyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppDependencyCollectionResponse) GetValue()([]MobileAppDependencyable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppDependencyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppDependencyCollectionResponse) SetValue(value []MobileAppDependencyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_responseable.go new file mode 100644 index 000000000..18379190a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppDependencyCollectionResponseable +type MobileAppDependencyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppDependencyable) + SetValue(value []MobileAppDependencyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_dependency_type.go b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_type.go new file mode 100644 index 000000000..4e94a1374 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_dependency_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppDependencyType int + +const ( + // Indicates that the child app should be detected before installing the parent app. + DETECT_MOBILEAPPDEPENDENCYTYPE MobileAppDependencyType = iota + // Indicates that the child app should be installed before installing the parent app. + AUTOINSTALL_MOBILEAPPDEPENDENCYTYPE +) + +func (i MobileAppDependencyType) String() string { + return []string{"detect", "autoInstall"}[i] +} +func ParseMobileAppDependencyType(v string) (interface{}, error) { + result := DETECT_MOBILEAPPDEPENDENCYTYPE + switch v { + case "detect": + result = DETECT_MOBILEAPPDEPENDENCYTYPE + case "autoInstall": + result = AUTOINSTALL_MOBILEAPPDEPENDENCYTYPE + default: + return 0, errors.New("Unknown MobileAppDependencyType value: " + v) + } + return &result, nil +} +func SerializeMobileAppDependencyType(values []MobileAppDependencyType) []string { + 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/mobile_app_dependencyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_dependencyable.go new file mode 100644 index 000000000..c35ffa9fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_dependencyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppDependencyable +type MobileAppDependencyable interface { + MobileAppRelationshipable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDependencyType()(*MobileAppDependencyType) + GetDependentAppCount()(*int32) + GetDependsOnAppCount()(*int32) + SetDependencyType(value *MobileAppDependencyType)() + SetDependentAppCount(value *int32)() + SetDependsOnAppCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_identifier.go b/src/internal/connector/graph/betasdk/models/mobile_app_identifier.go new file mode 100644 index 000000000..61fe87b65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_identifier.go @@ -0,0 +1,95 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIdentifier the identifier for a mobile app. +type MobileAppIdentifier 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 OdataType property + odataType *string +} +// NewMobileAppIdentifier instantiates a new mobileAppIdentifier and sets the default values. +func NewMobileAppIdentifier()(*MobileAppIdentifier) { + m := &MobileAppIdentifier{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppIdentifierFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppIdentifierFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidMobileAppIdentifier": + return NewAndroidMobileAppIdentifier(), nil + case "#microsoft.graph.iosMobileAppIdentifier": + return NewIosMobileAppIdentifier(), nil + case "#microsoft.graph.macAppIdentifier": + return NewMacAppIdentifier(), nil + case "#microsoft.graph.windowsAppIdentifier": + return NewWindowsAppIdentifier(), nil + } + } + } + } + return NewMobileAppIdentifier(), 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 *MobileAppIdentifier) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppIdentifier) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppIdentifier) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *MobileAppIdentifier) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *MobileAppIdentifier) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppIdentifier) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_identifierable.go b/src/internal/connector/graph/betasdk/models/mobile_app_identifierable.go new file mode 100644 index 000000000..253555784 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_identifierable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIdentifierable +type MobileAppIdentifierable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_status.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_status.go new file mode 100644 index 000000000..70714d594 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_status.go @@ -0,0 +1,376 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallStatus contains properties for the installation state of a mobile app for a device. +type MobileAppInstallStatus struct { + Entity + // The navigation link to the mobile app. + app MobileAppable + // Device ID + deviceId *string + // Device name + deviceName *string + // Human readable version of the application + displayVersion *string + // The error code for install or uninstall failures. + errorCode *int32 + // A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. + installState *ResultantAppState + // Enum indicating additional details regarding why an application has a particular install state. + installStateDetail *ResultantAppStateDetail + // Last sync date time + lastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. + mobileAppInstallStatusValue *ResultantAppState + // OS Description + osDescription *string + // OS Version + osVersion *string + // Device User Name + userName *string + // User Principal Name + userPrincipalName *string +} +// NewMobileAppInstallStatus instantiates a new mobileAppInstallStatus and sets the default values. +func NewMobileAppInstallStatus()(*MobileAppInstallStatus) { + m := &MobileAppInstallStatus{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppInstallStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppInstallStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppInstallStatus(), nil +} +// GetApp gets the app property value. The navigation link to the mobile app. +func (m *MobileAppInstallStatus) GetApp()(MobileAppable) { + return m.app +} +// GetDeviceId gets the deviceId property value. Device ID +func (m *MobileAppInstallStatus) GetDeviceId()(*string) { + return m.deviceId +} +// GetDeviceName gets the deviceName property value. Device name +func (m *MobileAppInstallStatus) GetDeviceName()(*string) { + return m.deviceName +} +// GetDisplayVersion gets the displayVersion property value. Human readable version of the application +func (m *MobileAppInstallStatus) GetDisplayVersion()(*string) { + return m.displayVersion +} +// GetErrorCode gets the errorCode property value. The error code for install or uninstall failures. +func (m *MobileAppInstallStatus) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppInstallStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["app"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApp(val.(MobileAppable)) + } + return nil + } + res["deviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceId(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["displayVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayVersion(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["installState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResultantAppState) + if err != nil { + return err + } + if val != nil { + m.SetInstallState(val.(*ResultantAppState)) + } + return nil + } + res["installStateDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResultantAppStateDetail) + if err != nil { + return err + } + if val != nil { + m.SetInstallStateDetail(val.(*ResultantAppStateDetail)) + } + return nil + } + res["lastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSyncDateTime(val) + } + return nil + } + res["mobileAppInstallStatusValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResultantAppState) + if err != nil { + return err + } + if val != nil { + m.SetMobileAppInstallStatusValue(val.(*ResultantAppState)) + } + return nil + } + res["osDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsDescription(val) + } + return nil + } + res["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetInstallState gets the installState property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppInstallStatus) GetInstallState()(*ResultantAppState) { + return m.installState +} +// GetInstallStateDetail gets the installStateDetail property value. Enum indicating additional details regarding why an application has a particular install state. +func (m *MobileAppInstallStatus) GetInstallStateDetail()(*ResultantAppStateDetail) { + return m.installStateDetail +} +// GetLastSyncDateTime gets the lastSyncDateTime property value. Last sync date time +func (m *MobileAppInstallStatus) GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSyncDateTime +} +// GetMobileAppInstallStatusValue gets the mobileAppInstallStatusValue property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppInstallStatus) GetMobileAppInstallStatusValue()(*ResultantAppState) { + return m.mobileAppInstallStatusValue +} +// GetOsDescription gets the osDescription property value. OS Description +func (m *MobileAppInstallStatus) GetOsDescription()(*string) { + return m.osDescription +} +// GetOsVersion gets the osVersion property value. OS Version +func (m *MobileAppInstallStatus) GetOsVersion()(*string) { + return m.osVersion +} +// GetUserName gets the userName property value. Device User Name +func (m *MobileAppInstallStatus) GetUserName()(*string) { + return m.userName +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *MobileAppInstallStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *MobileAppInstallStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("app", m.GetApp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceId", m.GetDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayVersion", m.GetDisplayVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + if m.GetInstallState() != nil { + cast := (*m.GetInstallState()).String() + err = writer.WriteStringValue("installState", &cast) + if err != nil { + return err + } + } + if m.GetInstallStateDetail() != nil { + cast := (*m.GetInstallStateDetail()).String() + err = writer.WriteStringValue("installStateDetail", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSyncDateTime", m.GetLastSyncDateTime()) + if err != nil { + return err + } + } + if m.GetMobileAppInstallStatusValue() != nil { + cast := (*m.GetMobileAppInstallStatusValue()).String() + err = writer.WriteStringValue("mobileAppInstallStatusValue", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osDescription", m.GetOsDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osVersion", m.GetOsVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetApp sets the app property value. The navigation link to the mobile app. +func (m *MobileAppInstallStatus) SetApp(value MobileAppable)() { + m.app = value +} +// SetDeviceId sets the deviceId property value. Device ID +func (m *MobileAppInstallStatus) SetDeviceId(value *string)() { + m.deviceId = value +} +// SetDeviceName sets the deviceName property value. Device name +func (m *MobileAppInstallStatus) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDisplayVersion sets the displayVersion property value. Human readable version of the application +func (m *MobileAppInstallStatus) SetDisplayVersion(value *string)() { + m.displayVersion = value +} +// SetErrorCode sets the errorCode property value. The error code for install or uninstall failures. +func (m *MobileAppInstallStatus) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetInstallState sets the installState property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppInstallStatus) SetInstallState(value *ResultantAppState)() { + m.installState = value +} +// SetInstallStateDetail sets the installStateDetail property value. Enum indicating additional details regarding why an application has a particular install state. +func (m *MobileAppInstallStatus) SetInstallStateDetail(value *ResultantAppStateDetail)() { + m.installStateDetail = value +} +// SetLastSyncDateTime sets the lastSyncDateTime property value. Last sync date time +func (m *MobileAppInstallStatus) SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSyncDateTime = value +} +// SetMobileAppInstallStatusValue sets the mobileAppInstallStatusValue property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppInstallStatus) SetMobileAppInstallStatusValue(value *ResultantAppState)() { + m.mobileAppInstallStatusValue = value +} +// SetOsDescription sets the osDescription property value. OS Description +func (m *MobileAppInstallStatus) SetOsDescription(value *string)() { + m.osDescription = value +} +// SetOsVersion sets the osVersion property value. OS Version +func (m *MobileAppInstallStatus) SetOsVersion(value *string)() { + m.osVersion = value +} +// SetUserName sets the userName property value. Device User Name +func (m *MobileAppInstallStatus) SetUserName(value *string)() { + m.userName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *MobileAppInstallStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_response.go new file mode 100644 index 000000000..79395339d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallStatusCollectionResponse +type MobileAppInstallStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppInstallStatusable +} +// NewMobileAppInstallStatusCollectionResponse instantiates a new MobileAppInstallStatusCollectionResponse and sets the default values. +func NewMobileAppInstallStatusCollectionResponse()(*MobileAppInstallStatusCollectionResponse) { + m := &MobileAppInstallStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppInstallStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppInstallStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppInstallStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppInstallStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppInstallStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppInstallStatusable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppInstallStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppInstallStatusCollectionResponse) GetValue()([]MobileAppInstallStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppInstallStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppInstallStatusCollectionResponse) SetValue(value []MobileAppInstallStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_responseable.go new file mode 100644 index 000000000..1e695979a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallStatusCollectionResponseable +type MobileAppInstallStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppInstallStatusable) + SetValue(value []MobileAppInstallStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_statusable.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_statusable.go new file mode 100644 index 000000000..d6a8c588e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_statusable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallStatusable +type MobileAppInstallStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApp()(MobileAppable) + GetDeviceId()(*string) + GetDeviceName()(*string) + GetDisplayVersion()(*string) + GetErrorCode()(*int32) + GetInstallState()(*ResultantAppState) + GetInstallStateDetail()(*ResultantAppStateDetail) + GetLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMobileAppInstallStatusValue()(*ResultantAppState) + GetOsDescription()(*string) + GetOsVersion()(*string) + GetUserName()(*string) + GetUserPrincipalName()(*string) + SetApp(value MobileAppable)() + SetDeviceId(value *string)() + SetDeviceName(value *string)() + SetDisplayVersion(value *string)() + SetErrorCode(value *int32)() + SetInstallState(value *ResultantAppState)() + SetInstallStateDetail(value *ResultantAppStateDetail)() + SetLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMobileAppInstallStatusValue(value *ResultantAppState)() + SetOsDescription(value *string)() + SetOsVersion(value *string)() + SetUserName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_summary.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_summary.go new file mode 100644 index 000000000..b3728f9eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_summary.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallSummary +type MobileAppInstallSummary struct { + Entity + // Number of Devices that have failed to install this app. + failedDeviceCount *int32 + // Number of Users that have 1 or more device that failed to install this app. + failedUserCount *int32 + // Number of Devices that have successfully installed this app. + installedDeviceCount *int32 + // Number of Users whose devices have all succeeded to install this app. + installedUserCount *int32 + // Number of Devices that are not applicable for this app. + notApplicableDeviceCount *int32 + // Number of Users whose devices were all not applicable for this app. + notApplicableUserCount *int32 + // Number of Devices that does not have this app installed. + notInstalledDeviceCount *int32 + // Number of Users that have 1 or more devices that did not install this app. + notInstalledUserCount *int32 + // Number of Devices that have been notified to install this app. + pendingInstallDeviceCount *int32 + // Number of Users that have 1 or more device that have been notified to install this app and have 0 devices with failures. + pendingInstallUserCount *int32 +} +// NewMobileAppInstallSummary instantiates a new mobileAppInstallSummary and sets the default values. +func NewMobileAppInstallSummary()(*MobileAppInstallSummary) { + m := &MobileAppInstallSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppInstallSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppInstallSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppInstallSummary(), nil +} +// GetFailedDeviceCount gets the failedDeviceCount property value. Number of Devices that have failed to install this app. +func (m *MobileAppInstallSummary) GetFailedDeviceCount()(*int32) { + return m.failedDeviceCount +} +// GetFailedUserCount gets the failedUserCount property value. Number of Users that have 1 or more device that failed to install this app. +func (m *MobileAppInstallSummary) GetFailedUserCount()(*int32) { + return m.failedUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppInstallSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["failedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedDeviceCount(val) + } + return nil + } + res["failedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUserCount(val) + } + return nil + } + res["installedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstalledDeviceCount(val) + } + return nil + } + res["installedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInstalledUserCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["notApplicableUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableUserCount(val) + } + return nil + } + res["notInstalledDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotInstalledDeviceCount(val) + } + return nil + } + res["notInstalledUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotInstalledUserCount(val) + } + return nil + } + res["pendingInstallDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingInstallDeviceCount(val) + } + return nil + } + res["pendingInstallUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPendingInstallUserCount(val) + } + return nil + } + return res +} +// GetInstalledDeviceCount gets the installedDeviceCount property value. Number of Devices that have successfully installed this app. +func (m *MobileAppInstallSummary) GetInstalledDeviceCount()(*int32) { + return m.installedDeviceCount +} +// GetInstalledUserCount gets the installedUserCount property value. Number of Users whose devices have all succeeded to install this app. +func (m *MobileAppInstallSummary) GetInstalledUserCount()(*int32) { + return m.installedUserCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Number of Devices that are not applicable for this app. +func (m *MobileAppInstallSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetNotApplicableUserCount gets the notApplicableUserCount property value. Number of Users whose devices were all not applicable for this app. +func (m *MobileAppInstallSummary) GetNotApplicableUserCount()(*int32) { + return m.notApplicableUserCount +} +// GetNotInstalledDeviceCount gets the notInstalledDeviceCount property value. Number of Devices that does not have this app installed. +func (m *MobileAppInstallSummary) GetNotInstalledDeviceCount()(*int32) { + return m.notInstalledDeviceCount +} +// GetNotInstalledUserCount gets the notInstalledUserCount property value. Number of Users that have 1 or more devices that did not install this app. +func (m *MobileAppInstallSummary) GetNotInstalledUserCount()(*int32) { + return m.notInstalledUserCount +} +// GetPendingInstallDeviceCount gets the pendingInstallDeviceCount property value. Number of Devices that have been notified to install this app. +func (m *MobileAppInstallSummary) GetPendingInstallDeviceCount()(*int32) { + return m.pendingInstallDeviceCount +} +// GetPendingInstallUserCount gets the pendingInstallUserCount property value. Number of Users that have 1 or more device that have been notified to install this app and have 0 devices with failures. +func (m *MobileAppInstallSummary) GetPendingInstallUserCount()(*int32) { + return m.pendingInstallUserCount +} +// Serialize serializes information the current object +func (m *MobileAppInstallSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("failedDeviceCount", m.GetFailedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("failedUserCount", m.GetFailedUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("installedDeviceCount", m.GetInstalledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("installedUserCount", m.GetInstalledUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableUserCount", m.GetNotApplicableUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notInstalledDeviceCount", m.GetNotInstalledDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notInstalledUserCount", m.GetNotInstalledUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingInstallDeviceCount", m.GetPendingInstallDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("pendingInstallUserCount", m.GetPendingInstallUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetFailedDeviceCount sets the failedDeviceCount property value. Number of Devices that have failed to install this app. +func (m *MobileAppInstallSummary) SetFailedDeviceCount(value *int32)() { + m.failedDeviceCount = value +} +// SetFailedUserCount sets the failedUserCount property value. Number of Users that have 1 or more device that failed to install this app. +func (m *MobileAppInstallSummary) SetFailedUserCount(value *int32)() { + m.failedUserCount = value +} +// SetInstalledDeviceCount sets the installedDeviceCount property value. Number of Devices that have successfully installed this app. +func (m *MobileAppInstallSummary) SetInstalledDeviceCount(value *int32)() { + m.installedDeviceCount = value +} +// SetInstalledUserCount sets the installedUserCount property value. Number of Users whose devices have all succeeded to install this app. +func (m *MobileAppInstallSummary) SetInstalledUserCount(value *int32)() { + m.installedUserCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Number of Devices that are not applicable for this app. +func (m *MobileAppInstallSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetNotApplicableUserCount sets the notApplicableUserCount property value. Number of Users whose devices were all not applicable for this app. +func (m *MobileAppInstallSummary) SetNotApplicableUserCount(value *int32)() { + m.notApplicableUserCount = value +} +// SetNotInstalledDeviceCount sets the notInstalledDeviceCount property value. Number of Devices that does not have this app installed. +func (m *MobileAppInstallSummary) SetNotInstalledDeviceCount(value *int32)() { + m.notInstalledDeviceCount = value +} +// SetNotInstalledUserCount sets the notInstalledUserCount property value. Number of Users that have 1 or more devices that did not install this app. +func (m *MobileAppInstallSummary) SetNotInstalledUserCount(value *int32)() { + m.notInstalledUserCount = value +} +// SetPendingInstallDeviceCount sets the pendingInstallDeviceCount property value. Number of Devices that have been notified to install this app. +func (m *MobileAppInstallSummary) SetPendingInstallDeviceCount(value *int32)() { + m.pendingInstallDeviceCount = value +} +// SetPendingInstallUserCount sets the pendingInstallUserCount property value. Number of Users that have 1 or more device that have been notified to install this app and have 0 devices with failures. +func (m *MobileAppInstallSummary) SetPendingInstallUserCount(value *int32)() { + m.pendingInstallUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_summaryable.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_summaryable.go new file mode 100644 index 000000000..4d26750b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_summaryable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallSummaryable +type MobileAppInstallSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedDeviceCount()(*int32) + GetFailedUserCount()(*int32) + GetInstalledDeviceCount()(*int32) + GetInstalledUserCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetNotApplicableUserCount()(*int32) + GetNotInstalledDeviceCount()(*int32) + GetNotInstalledUserCount()(*int32) + GetPendingInstallDeviceCount()(*int32) + GetPendingInstallUserCount()(*int32) + SetFailedDeviceCount(value *int32)() + SetFailedUserCount(value *int32)() + SetInstalledDeviceCount(value *int32)() + SetInstalledUserCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetNotApplicableUserCount(value *int32)() + SetNotInstalledDeviceCount(value *int32)() + SetNotInstalledUserCount(value *int32)() + SetPendingInstallDeviceCount(value *int32)() + SetPendingInstallUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settings.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settings.go new file mode 100644 index 000000000..73d9896ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settings.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallTimeSettings contains properties used to determine when to offer an app to devices and when to install the app on devices. +type MobileAppInstallTimeSettings 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 time at which the app should be installed. + deadlineDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The time at which the app should be available for installation. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Whether the local device time or UTC time should be used when determining the available and deadline times. + useLocalTime *bool +} +// NewMobileAppInstallTimeSettings instantiates a new mobileAppInstallTimeSettings and sets the default values. +func NewMobileAppInstallTimeSettings()(*MobileAppInstallTimeSettings) { + m := &MobileAppInstallTimeSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppInstallTimeSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppInstallTimeSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppInstallTimeSettings(), 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 *MobileAppInstallTimeSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeadlineDateTime gets the deadlineDateTime property value. The time at which the app should be installed. +func (m *MobileAppInstallTimeSettings) GetDeadlineDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.deadlineDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppInstallTimeSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deadlineDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDeadlineDateTime(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["useLocalTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseLocalTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppInstallTimeSettings) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The time at which the app should be available for installation. +func (m *MobileAppInstallTimeSettings) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetUseLocalTime gets the useLocalTime property value. Whether the local device time or UTC time should be used when determining the available and deadline times. +func (m *MobileAppInstallTimeSettings) GetUseLocalTime()(*bool) { + return m.useLocalTime +} +// Serialize serializes information the current object +func (m *MobileAppInstallTimeSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("deadlineDateTime", m.GetDeadlineDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("useLocalTime", m.GetUseLocalTime()) + 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 *MobileAppInstallTimeSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeadlineDateTime sets the deadlineDateTime property value. The time at which the app should be installed. +func (m *MobileAppInstallTimeSettings) SetDeadlineDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.deadlineDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppInstallTimeSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The time at which the app should be available for installation. +func (m *MobileAppInstallTimeSettings) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetUseLocalTime sets the useLocalTime property value. Whether the local device time or UTC time should be used when determining the available and deadline times. +func (m *MobileAppInstallTimeSettings) SetUseLocalTime(value *bool)() { + m.useLocalTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settingsable.go b/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settingsable.go new file mode 100644 index 000000000..855a1fa2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_install_time_settingsable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppInstallTimeSettingsable +type MobileAppInstallTimeSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeadlineDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUseLocalTime()(*bool) + SetDeadlineDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUseLocalTime(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent.go new file mode 100644 index 000000000..d9c69b487 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppIntent int + +const ( + // Available + AVAILABLE_MOBILEAPPINTENT MobileAppIntent = iota + // Not Available + NOTAVAILABLE_MOBILEAPPINTENT + // Required Install + REQUIREDINSTALL_MOBILEAPPINTENT + // Required Uninstall + REQUIREDUNINSTALL_MOBILEAPPINTENT + // RequiredAndAvailableInstall + REQUIREDANDAVAILABLEINSTALL_MOBILEAPPINTENT + // AvailableInstallWithoutEnrollment + AVAILABLEINSTALLWITHOUTENROLLMENT_MOBILEAPPINTENT + // Exclude + EXCLUDE_MOBILEAPPINTENT +) + +func (i MobileAppIntent) String() string { + return []string{"available", "notAvailable", "requiredInstall", "requiredUninstall", "requiredAndAvailableInstall", "availableInstallWithoutEnrollment", "exclude"}[i] +} +func ParseMobileAppIntent(v string) (interface{}, error) { + result := AVAILABLE_MOBILEAPPINTENT + switch v { + case "available": + result = AVAILABLE_MOBILEAPPINTENT + case "notAvailable": + result = NOTAVAILABLE_MOBILEAPPINTENT + case "requiredInstall": + result = REQUIREDINSTALL_MOBILEAPPINTENT + case "requiredUninstall": + result = REQUIREDUNINSTALL_MOBILEAPPINTENT + case "requiredAndAvailableInstall": + result = REQUIREDANDAVAILABLEINSTALL_MOBILEAPPINTENT + case "availableInstallWithoutEnrollment": + result = AVAILABLEINSTALLWITHOUTENROLLMENT_MOBILEAPPINTENT + case "exclude": + result = EXCLUDE_MOBILEAPPINTENT + default: + return 0, errors.New("Unknown MobileAppIntent value: " + v) + } + return &result, nil +} +func SerializeMobileAppIntent(values []MobileAppIntent) []string { + 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/mobile_app_intent_and_state.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state.go new file mode 100644 index 000000000..871e0e639 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndState mobileApp Intent and Install State for a given device. +type MobileAppIntentAndState struct { + Entity + // Device identifier created or collected by Intune. + managedDeviceIdentifier *string + // The list of payload intents and states for the tenant. + mobileAppList []MobileAppIntentAndStateDetailable + // Identifier for the user that tried to enroll the device. + userId *string +} +// NewMobileAppIntentAndState instantiates a new mobileAppIntentAndState and sets the default values. +func NewMobileAppIntentAndState()(*MobileAppIntentAndState) { + m := &MobileAppIntentAndState{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppIntentAndStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppIntentAndStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppIntentAndState(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppIntentAndState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["managedDeviceIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceIdentifier(val) + } + return nil + } + res["mobileAppList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppIntentAndStateDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppIntentAndStateDetailable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppIntentAndStateDetailable) + } + m.SetMobileAppList(res) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetManagedDeviceIdentifier gets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *MobileAppIntentAndState) GetManagedDeviceIdentifier()(*string) { + return m.managedDeviceIdentifier +} +// GetMobileAppList gets the mobileAppList property value. The list of payload intents and states for the tenant. +func (m *MobileAppIntentAndState) GetMobileAppList()([]MobileAppIntentAndStateDetailable) { + return m.mobileAppList +} +// GetUserId gets the userId property value. Identifier for the user that tried to enroll the device. +func (m *MobileAppIntentAndState) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *MobileAppIntentAndState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("managedDeviceIdentifier", m.GetManagedDeviceIdentifier()) + if err != nil { + return err + } + } + if m.GetMobileAppList() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMobileAppList())) + for i, v := range m.GetMobileAppList() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mobileAppList", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetManagedDeviceIdentifier sets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *MobileAppIntentAndState) SetManagedDeviceIdentifier(value *string)() { + m.managedDeviceIdentifier = value +} +// SetMobileAppList sets the mobileAppList property value. The list of payload intents and states for the tenant. +func (m *MobileAppIntentAndState) SetMobileAppList(value []MobileAppIntentAndStateDetailable)() { + m.mobileAppList = value +} +// SetUserId sets the userId property value. Identifier for the user that tried to enroll the device. +func (m *MobileAppIntentAndState) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_response.go new file mode 100644 index 000000000..660506a68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateCollectionResponse +type MobileAppIntentAndStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppIntentAndStateable +} +// NewMobileAppIntentAndStateCollectionResponse instantiates a new MobileAppIntentAndStateCollectionResponse and sets the default values. +func NewMobileAppIntentAndStateCollectionResponse()(*MobileAppIntentAndStateCollectionResponse) { + m := &MobileAppIntentAndStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppIntentAndStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppIntentAndStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppIntentAndStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppIntentAndStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppIntentAndStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppIntentAndStateable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppIntentAndStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppIntentAndStateCollectionResponse) GetValue()([]MobileAppIntentAndStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppIntentAndStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppIntentAndStateCollectionResponse) SetValue(value []MobileAppIntentAndStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_responseable.go new file mode 100644 index 000000000..1b5942c70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateCollectionResponseable +type MobileAppIntentAndStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppIntentAndStateable) + SetValue(value []MobileAppIntentAndStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail.go new file mode 100644 index 000000000..67582ddaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail.go @@ -0,0 +1,237 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateDetail mobile App Intent and Install State for a given device. +type MobileAppIntentAndStateDetail struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // MobieApp identifier. + applicationId *string + // The admin provided or imported title of the app. + displayName *string + // Human readable version of the application + displayVersion *string + // A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. + installState *ResultantAppState + // Indicates the status of the mobile app on the device. + mobileAppIntent *MobileAppIntent + // The OdataType property + odataType *string + // The supported platforms for the app. + supportedDeviceTypes []MobileAppSupportedDeviceTypeable +} +// NewMobileAppIntentAndStateDetail instantiates a new mobileAppIntentAndStateDetail and sets the default values. +func NewMobileAppIntentAndStateDetail()(*MobileAppIntentAndStateDetail) { + m := &MobileAppIntentAndStateDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppIntentAndStateDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppIntentAndStateDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppIntentAndStateDetail(), 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 *MobileAppIntentAndStateDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationId gets the applicationId property value. MobieApp identifier. +func (m *MobileAppIntentAndStateDetail) GetApplicationId()(*string) { + return m.applicationId +} +// GetDisplayName gets the displayName property value. The admin provided or imported title of the app. +func (m *MobileAppIntentAndStateDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetDisplayVersion gets the displayVersion property value. Human readable version of the application +func (m *MobileAppIntentAndStateDetail) GetDisplayVersion()(*string) { + return m.displayVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppIntentAndStateDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["displayVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayVersion(val) + } + return nil + } + res["installState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResultantAppState) + if err != nil { + return err + } + if val != nil { + m.SetInstallState(val.(*ResultantAppState)) + } + return nil + } + res["mobileAppIntent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppIntent) + if err != nil { + return err + } + if val != nil { + m.SetMobileAppIntent(val.(*MobileAppIntent)) + } + 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["supportedDeviceTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppSupportedDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppSupportedDeviceTypeable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppSupportedDeviceTypeable) + } + m.SetSupportedDeviceTypes(res) + } + return nil + } + return res +} +// GetInstallState gets the installState property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppIntentAndStateDetail) GetInstallState()(*ResultantAppState) { + return m.installState +} +// GetMobileAppIntent gets the mobileAppIntent property value. Indicates the status of the mobile app on the device. +func (m *MobileAppIntentAndStateDetail) GetMobileAppIntent()(*MobileAppIntent) { + return m.mobileAppIntent +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppIntentAndStateDetail) GetOdataType()(*string) { + return m.odataType +} +// GetSupportedDeviceTypes gets the supportedDeviceTypes property value. The supported platforms for the app. +func (m *MobileAppIntentAndStateDetail) GetSupportedDeviceTypes()([]MobileAppSupportedDeviceTypeable) { + return m.supportedDeviceTypes +} +// Serialize serializes information the current object +func (m *MobileAppIntentAndStateDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationId", m.GetApplicationId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayVersion", m.GetDisplayVersion()) + if err != nil { + return err + } + } + if m.GetInstallState() != nil { + cast := (*m.GetInstallState()).String() + err := writer.WriteStringValue("installState", &cast) + if err != nil { + return err + } + } + if m.GetMobileAppIntent() != nil { + cast := (*m.GetMobileAppIntent()).String() + err := writer.WriteStringValue("mobileAppIntent", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSupportedDeviceTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSupportedDeviceTypes())) + for i, v := range m.GetSupportedDeviceTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("supportedDeviceTypes", 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 *MobileAppIntentAndStateDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationId sets the applicationId property value. MobieApp identifier. +func (m *MobileAppIntentAndStateDetail) SetApplicationId(value *string)() { + m.applicationId = value +} +// SetDisplayName sets the displayName property value. The admin provided or imported title of the app. +func (m *MobileAppIntentAndStateDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDisplayVersion sets the displayVersion property value. Human readable version of the application +func (m *MobileAppIntentAndStateDetail) SetDisplayVersion(value *string)() { + m.displayVersion = value +} +// SetInstallState sets the installState property value. A list of possible states for application status on an individual device. When devices contact the Intune service and find targeted application enforcement intent, the status of the enforcement is recorded and becomes accessible in the Graph API. Since the application status is identified during device interaction with the Intune service, status records do not immediately appear upon application group assignment; it is created only after the assignment is evaluated in the service and devices start receiving the policy during check-ins. +func (m *MobileAppIntentAndStateDetail) SetInstallState(value *ResultantAppState)() { + m.installState = value +} +// SetMobileAppIntent sets the mobileAppIntent property value. Indicates the status of the mobile app on the device. +func (m *MobileAppIntentAndStateDetail) SetMobileAppIntent(value *MobileAppIntent)() { + m.mobileAppIntent = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppIntentAndStateDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetSupportedDeviceTypes sets the supportedDeviceTypes property value. The supported platforms for the app. +func (m *MobileAppIntentAndStateDetail) SetSupportedDeviceTypes(value []MobileAppSupportedDeviceTypeable)() { + m.supportedDeviceTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_response.go new file mode 100644 index 000000000..900010f6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateDetailCollectionResponse +type MobileAppIntentAndStateDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppIntentAndStateDetailable +} +// NewMobileAppIntentAndStateDetailCollectionResponse instantiates a new MobileAppIntentAndStateDetailCollectionResponse and sets the default values. +func NewMobileAppIntentAndStateDetailCollectionResponse()(*MobileAppIntentAndStateDetailCollectionResponse) { + m := &MobileAppIntentAndStateDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppIntentAndStateDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppIntentAndStateDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppIntentAndStateDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppIntentAndStateDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppIntentAndStateDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppIntentAndStateDetailable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppIntentAndStateDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppIntentAndStateDetailCollectionResponse) GetValue()([]MobileAppIntentAndStateDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppIntentAndStateDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppIntentAndStateDetailCollectionResponse) SetValue(value []MobileAppIntentAndStateDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_responseable.go new file mode 100644 index 000000000..0b75a1f53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateDetailCollectionResponseable +type MobileAppIntentAndStateDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppIntentAndStateDetailable) + SetValue(value []MobileAppIntentAndStateDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detailable.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detailable.go new file mode 100644 index 000000000..050ed59db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_state_detailable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateDetailable +type MobileAppIntentAndStateDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationId()(*string) + GetDisplayName()(*string) + GetDisplayVersion()(*string) + GetInstallState()(*ResultantAppState) + GetMobileAppIntent()(*MobileAppIntent) + GetOdataType()(*string) + GetSupportedDeviceTypes()([]MobileAppSupportedDeviceTypeable) + SetApplicationId(value *string)() + SetDisplayName(value *string)() + SetDisplayVersion(value *string)() + SetInstallState(value *ResultantAppState)() + SetMobileAppIntent(value *MobileAppIntent)() + SetOdataType(value *string)() + SetSupportedDeviceTypes(value []MobileAppSupportedDeviceTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_stateable.go b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_stateable.go new file mode 100644 index 000000000..3cc9ea2b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_intent_and_stateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppIntentAndStateable +type MobileAppIntentAndStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetManagedDeviceIdentifier()(*string) + GetMobileAppList()([]MobileAppIntentAndStateDetailable) + GetUserId()(*string) + SetManagedDeviceIdentifier(value *string)() + SetMobileAppList(value []MobileAppIntentAndStateDetailable)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item.go b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item.go new file mode 100644 index 000000000..d68b43397 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppPolicySetItem +type MobileAppPolicySetItem struct { + PolicySetItem + // Possible values for the install intent chosen by the admin. + intent *InstallIntent + // Settings of the MobileAppPolicySetItem. + settings MobileAppAssignmentSettingsable +} +// NewMobileAppPolicySetItem instantiates a new MobileAppPolicySetItem and sets the default values. +func NewMobileAppPolicySetItem()(*MobileAppPolicySetItem) { + m := &MobileAppPolicySetItem{ + PolicySetItem: *NewPolicySetItem(), + } + odataTypeValue := "#microsoft.graph.mobileAppPolicySetItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMobileAppPolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppPolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppPolicySetItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppPolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicySetItem.GetFieldDeserializers() + res["intent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseInstallIntent) + if err != nil { + return err + } + if val != nil { + m.SetIntent(val.(*InstallIntent)) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMobileAppAssignmentSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(MobileAppAssignmentSettingsable)) + } + return nil + } + return res +} +// GetIntent gets the intent property value. Possible values for the install intent chosen by the admin. +func (m *MobileAppPolicySetItem) GetIntent()(*InstallIntent) { + return m.intent +} +// GetSettings gets the settings property value. Settings of the MobileAppPolicySetItem. +func (m *MobileAppPolicySetItem) GetSettings()(MobileAppAssignmentSettingsable) { + return m.settings +} +// Serialize serializes information the current object +func (m *MobileAppPolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicySetItem.Serialize(writer) + if err != nil { + return err + } + if m.GetIntent() != nil { + cast := (*m.GetIntent()).String() + err = writer.WriteStringValue("intent", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + return nil +} +// SetIntent sets the intent property value. Possible values for the install intent chosen by the admin. +func (m *MobileAppPolicySetItem) SetIntent(value *InstallIntent)() { + m.intent = value +} +// SetSettings sets the settings property value. Settings of the MobileAppPolicySetItem. +func (m *MobileAppPolicySetItem) SetSettings(value MobileAppAssignmentSettingsable)() { + m.settings = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_response.go new file mode 100644 index 000000000..34b56f030 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppPolicySetItemCollectionResponse +type MobileAppPolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppPolicySetItemable +} +// NewMobileAppPolicySetItemCollectionResponse instantiates a new MobileAppPolicySetItemCollectionResponse and sets the default values. +func NewMobileAppPolicySetItemCollectionResponse()(*MobileAppPolicySetItemCollectionResponse) { + m := &MobileAppPolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppPolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppPolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppPolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppPolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppPolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppPolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppPolicySetItemCollectionResponse) GetValue()([]MobileAppPolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppPolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppPolicySetItemCollectionResponse) SetValue(value []MobileAppPolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_responseable.go new file mode 100644 index 000000000..42f8f5024 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppPolicySetItemCollectionResponseable +type MobileAppPolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppPolicySetItemable) + SetValue(value []MobileAppPolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_itemable.go new file mode 100644 index 000000000..2c8051356 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_policy_set_itemable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppPolicySetItemable +type MobileAppPolicySetItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicySetItemable + GetIntent()(*InstallIntent) + GetSettings()(MobileAppAssignmentSettingsable) + SetIntent(value *InstallIntent)() + SetSettings(value MobileAppAssignmentSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment.go b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment.go new file mode 100644 index 000000000..fe958860b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppProvisioningConfigGroupAssignment contains the properties used to assign an App provisioning configuration to a group. +type MobileAppProvisioningConfigGroupAssignment struct { + Entity + // The ID of the AAD group in which the app provisioning configuration is being targeted. + targetGroupId *string +} +// NewMobileAppProvisioningConfigGroupAssignment instantiates a new mobileAppProvisioningConfigGroupAssignment and sets the default values. +func NewMobileAppProvisioningConfigGroupAssignment()(*MobileAppProvisioningConfigGroupAssignment) { + m := &MobileAppProvisioningConfigGroupAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppProvisioningConfigGroupAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppProvisioningConfigGroupAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppProvisioningConfigGroupAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppProvisioningConfigGroupAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["targetGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetGroupId(val) + } + return nil + } + return res +} +// GetTargetGroupId gets the targetGroupId property value. The ID of the AAD group in which the app provisioning configuration is being targeted. +func (m *MobileAppProvisioningConfigGroupAssignment) GetTargetGroupId()(*string) { + return m.targetGroupId +} +// Serialize serializes information the current object +func (m *MobileAppProvisioningConfigGroupAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetGroupId", m.GetTargetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetTargetGroupId sets the targetGroupId property value. The ID of the AAD group in which the app provisioning configuration is being targeted. +func (m *MobileAppProvisioningConfigGroupAssignment) SetTargetGroupId(value *string)() { + m.targetGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_response.go new file mode 100644 index 000000000..182ca640b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppProvisioningConfigGroupAssignmentCollectionResponse +type MobileAppProvisioningConfigGroupAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppProvisioningConfigGroupAssignmentable +} +// NewMobileAppProvisioningConfigGroupAssignmentCollectionResponse instantiates a new MobileAppProvisioningConfigGroupAssignmentCollectionResponse and sets the default values. +func NewMobileAppProvisioningConfigGroupAssignmentCollectionResponse()(*MobileAppProvisioningConfigGroupAssignmentCollectionResponse) { + m := &MobileAppProvisioningConfigGroupAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppProvisioningConfigGroupAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppProvisioningConfigGroupAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppProvisioningConfigGroupAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppProvisioningConfigGroupAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppProvisioningConfigGroupAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppProvisioningConfigGroupAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppProvisioningConfigGroupAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppProvisioningConfigGroupAssignmentCollectionResponse) GetValue()([]MobileAppProvisioningConfigGroupAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppProvisioningConfigGroupAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppProvisioningConfigGroupAssignmentCollectionResponse) SetValue(value []MobileAppProvisioningConfigGroupAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_responseable.go new file mode 100644 index 000000000..b94e2268d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppProvisioningConfigGroupAssignmentCollectionResponseable +type MobileAppProvisioningConfigGroupAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppProvisioningConfigGroupAssignmentable) + SetValue(value []MobileAppProvisioningConfigGroupAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignmentable.go b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignmentable.go new file mode 100644 index 000000000..ad1e8322a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_provisioning_config_group_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppProvisioningConfigGroupAssignmentable +type MobileAppProvisioningConfigGroupAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTargetGroupId()(*string) + SetTargetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_publishing_state.go b/src/internal/connector/graph/betasdk/models/mobile_app_publishing_state.go new file mode 100644 index 000000000..32ee1112d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_publishing_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppPublishingState int + +const ( + // The app is not yet published. + NOTPUBLISHED_MOBILEAPPPUBLISHINGSTATE MobileAppPublishingState = iota + // The app is pending service-side processing. + PROCESSING_MOBILEAPPPUBLISHINGSTATE + // The app is published. + PUBLISHED_MOBILEAPPPUBLISHINGSTATE +) + +func (i MobileAppPublishingState) String() string { + return []string{"notPublished", "processing", "published"}[i] +} +func ParseMobileAppPublishingState(v string) (interface{}, error) { + result := NOTPUBLISHED_MOBILEAPPPUBLISHINGSTATE + switch v { + case "notPublished": + result = NOTPUBLISHED_MOBILEAPPPUBLISHINGSTATE + case "processing": + result = PROCESSING_MOBILEAPPPUBLISHINGSTATE + case "published": + result = PUBLISHED_MOBILEAPPPUBLISHINGSTATE + default: + return 0, errors.New("Unknown MobileAppPublishingState value: " + v) + } + return &result, nil +} +func SerializeMobileAppPublishingState(values []MobileAppPublishingState) []string { + 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/mobile_app_relationship.go b/src/internal/connector/graph/betasdk/models/mobile_app_relationship.go new file mode 100644 index 000000000..6893805aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_relationship.go @@ -0,0 +1,185 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppRelationship describes a relationship between two mobile apps. +type MobileAppRelationship struct { + Entity + // The target mobile app's display name. + targetDisplayName *string + // The target mobile app's display version. + targetDisplayVersion *string + // The target mobile app's app id. + targetId *string + // The target mobile app's publisher. + targetPublisher *string + // Indicates whether the target of a relationship is the parent or the child in the relationship. + targetType *MobileAppRelationshipType +} +// NewMobileAppRelationship instantiates a new mobileAppRelationship and sets the default values. +func NewMobileAppRelationship()(*MobileAppRelationship) { + m := &MobileAppRelationship{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileAppRelationshipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppRelationshipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.mobileAppDependency": + return NewMobileAppDependency(), nil + case "#microsoft.graph.mobileAppSupersedence": + return NewMobileAppSupersedence(), nil + } + } + } + } + return NewMobileAppRelationship(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppRelationship) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["targetDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetDisplayName(val) + } + return nil + } + res["targetDisplayVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetDisplayVersion(val) + } + return nil + } + res["targetId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetId(val) + } + return nil + } + res["targetPublisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetPublisher(val) + } + return nil + } + res["targetType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppRelationshipType) + if err != nil { + return err + } + if val != nil { + m.SetTargetType(val.(*MobileAppRelationshipType)) + } + return nil + } + return res +} +// GetTargetDisplayName gets the targetDisplayName property value. The target mobile app's display name. +func (m *MobileAppRelationship) GetTargetDisplayName()(*string) { + return m.targetDisplayName +} +// GetTargetDisplayVersion gets the targetDisplayVersion property value. The target mobile app's display version. +func (m *MobileAppRelationship) GetTargetDisplayVersion()(*string) { + return m.targetDisplayVersion +} +// GetTargetId gets the targetId property value. The target mobile app's app id. +func (m *MobileAppRelationship) GetTargetId()(*string) { + return m.targetId +} +// GetTargetPublisher gets the targetPublisher property value. The target mobile app's publisher. +func (m *MobileAppRelationship) GetTargetPublisher()(*string) { + return m.targetPublisher +} +// GetTargetType gets the targetType property value. Indicates whether the target of a relationship is the parent or the child in the relationship. +func (m *MobileAppRelationship) GetTargetType()(*MobileAppRelationshipType) { + return m.targetType +} +// Serialize serializes information the current object +func (m *MobileAppRelationship) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("targetDisplayName", m.GetTargetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetDisplayVersion", m.GetTargetDisplayVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetId", m.GetTargetId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetPublisher", m.GetTargetPublisher()) + if err != nil { + return err + } + } + if m.GetTargetType() != nil { + cast := (*m.GetTargetType()).String() + err = writer.WriteStringValue("targetType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetTargetDisplayName sets the targetDisplayName property value. The target mobile app's display name. +func (m *MobileAppRelationship) SetTargetDisplayName(value *string)() { + m.targetDisplayName = value +} +// SetTargetDisplayVersion sets the targetDisplayVersion property value. The target mobile app's display version. +func (m *MobileAppRelationship) SetTargetDisplayVersion(value *string)() { + m.targetDisplayVersion = value +} +// SetTargetId sets the targetId property value. The target mobile app's app id. +func (m *MobileAppRelationship) SetTargetId(value *string)() { + m.targetId = value +} +// SetTargetPublisher sets the targetPublisher property value. The target mobile app's publisher. +func (m *MobileAppRelationship) SetTargetPublisher(value *string)() { + m.targetPublisher = value +} +// SetTargetType sets the targetType property value. Indicates whether the target of a relationship is the parent or the child in the relationship. +func (m *MobileAppRelationship) SetTargetType(value *MobileAppRelationshipType)() { + m.targetType = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_response.go new file mode 100644 index 000000000..2044cc408 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppRelationshipCollectionResponse +type MobileAppRelationshipCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppRelationshipable +} +// NewMobileAppRelationshipCollectionResponse instantiates a new MobileAppRelationshipCollectionResponse and sets the default values. +func NewMobileAppRelationshipCollectionResponse()(*MobileAppRelationshipCollectionResponse) { + m := &MobileAppRelationshipCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppRelationshipCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppRelationshipCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppRelationshipCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppRelationshipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppRelationshipable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppRelationshipable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppRelationshipCollectionResponse) GetValue()([]MobileAppRelationshipable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppRelationshipCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppRelationshipCollectionResponse) SetValue(value []MobileAppRelationshipable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_responseable.go new file mode 100644 index 000000000..6965b61e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppRelationshipCollectionResponseable +type MobileAppRelationshipCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppRelationshipable) + SetValue(value []MobileAppRelationshipable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_relationship_type.go b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_type.go new file mode 100644 index 000000000..f611d51b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_relationship_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppRelationshipType int + +const ( + // Indicates that the target of a relationship is the child in the relationship. + CHILD_MOBILEAPPRELATIONSHIPTYPE MobileAppRelationshipType = iota + // Indicates that the target of a relationship is the parent in the relationship. + PARENT_MOBILEAPPRELATIONSHIPTYPE +) + +func (i MobileAppRelationshipType) String() string { + return []string{"child", "parent"}[i] +} +func ParseMobileAppRelationshipType(v string) (interface{}, error) { + result := CHILD_MOBILEAPPRELATIONSHIPTYPE + switch v { + case "child": + result = CHILD_MOBILEAPPRELATIONSHIPTYPE + case "parent": + result = PARENT_MOBILEAPPRELATIONSHIPTYPE + default: + return 0, errors.New("Unknown MobileAppRelationshipType value: " + v) + } + return &result, nil +} +func SerializeMobileAppRelationshipType(values []MobileAppRelationshipType) []string { + 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/mobile_app_relationshipable.go b/src/internal/connector/graph/betasdk/models/mobile_app_relationshipable.go new file mode 100644 index 000000000..e7ea8d80b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_relationshipable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppRelationshipable +type MobileAppRelationshipable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTargetDisplayName()(*string) + GetTargetDisplayVersion()(*string) + GetTargetId()(*string) + GetTargetPublisher()(*string) + GetTargetType()(*MobileAppRelationshipType) + SetTargetDisplayName(value *string)() + SetTargetDisplayVersion(value *string)() + SetTargetId(value *string)() + SetTargetPublisher(value *string)() + SetTargetType(value *MobileAppRelationshipType)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supersedence.go b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence.go new file mode 100644 index 000000000..1bca8e856 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupersedence +type MobileAppSupersedence struct { + MobileAppRelationship + // The total number of apps directly or indirectly superseded by the child app. + supersededAppCount *int32 + // Indicates the supersedence type associated with a relationship between two mobile apps. + supersedenceType *MobileAppSupersedenceType + // The total number of apps directly or indirectly superseding the parent app. + supersedingAppCount *int32 +} +// NewMobileAppSupersedence instantiates a new MobileAppSupersedence and sets the default values. +func NewMobileAppSupersedence()(*MobileAppSupersedence) { + m := &MobileAppSupersedence{ + MobileAppRelationship: *NewMobileAppRelationship(), + } + odataTypeValue := "#microsoft.graph.mobileAppSupersedence"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMobileAppSupersedenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppSupersedenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppSupersedence(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppSupersedence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppRelationship.GetFieldDeserializers() + res["supersededAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupersededAppCount(val) + } + return nil + } + res["supersedenceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppSupersedenceType) + if err != nil { + return err + } + if val != nil { + m.SetSupersedenceType(val.(*MobileAppSupersedenceType)) + } + return nil + } + res["supersedingAppCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSupersedingAppCount(val) + } + return nil + } + return res +} +// GetSupersededAppCount gets the supersededAppCount property value. The total number of apps directly or indirectly superseded by the child app. +func (m *MobileAppSupersedence) GetSupersededAppCount()(*int32) { + return m.supersededAppCount +} +// GetSupersedenceType gets the supersedenceType property value. Indicates the supersedence type associated with a relationship between two mobile apps. +func (m *MobileAppSupersedence) GetSupersedenceType()(*MobileAppSupersedenceType) { + return m.supersedenceType +} +// GetSupersedingAppCount gets the supersedingAppCount property value. The total number of apps directly or indirectly superseding the parent app. +func (m *MobileAppSupersedence) GetSupersedingAppCount()(*int32) { + return m.supersedingAppCount +} +// Serialize serializes information the current object +func (m *MobileAppSupersedence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppRelationship.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("supersededAppCount", m.GetSupersededAppCount()) + if err != nil { + return err + } + } + if m.GetSupersedenceType() != nil { + cast := (*m.GetSupersedenceType()).String() + err = writer.WriteStringValue("supersedenceType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("supersedingAppCount", m.GetSupersedingAppCount()) + if err != nil { + return err + } + } + return nil +} +// SetSupersededAppCount sets the supersededAppCount property value. The total number of apps directly or indirectly superseded by the child app. +func (m *MobileAppSupersedence) SetSupersededAppCount(value *int32)() { + m.supersededAppCount = value +} +// SetSupersedenceType sets the supersedenceType property value. Indicates the supersedence type associated with a relationship between two mobile apps. +func (m *MobileAppSupersedence) SetSupersedenceType(value *MobileAppSupersedenceType)() { + m.supersedenceType = value +} +// SetSupersedingAppCount sets the supersedingAppCount property value. The total number of apps directly or indirectly superseding the parent app. +func (m *MobileAppSupersedence) SetSupersedingAppCount(value *int32)() { + m.supersedingAppCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_response.go new file mode 100644 index 000000000..ee707e498 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupersedenceCollectionResponse +type MobileAppSupersedenceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppSupersedenceable +} +// NewMobileAppSupersedenceCollectionResponse instantiates a new MobileAppSupersedenceCollectionResponse and sets the default values. +func NewMobileAppSupersedenceCollectionResponse()(*MobileAppSupersedenceCollectionResponse) { + m := &MobileAppSupersedenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppSupersedenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppSupersedenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppSupersedenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppSupersedenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppSupersedenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppSupersedenceable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppSupersedenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppSupersedenceCollectionResponse) GetValue()([]MobileAppSupersedenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppSupersedenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppSupersedenceCollectionResponse) SetValue(value []MobileAppSupersedenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_responseable.go new file mode 100644 index 000000000..a7d251343 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupersedenceCollectionResponseable +type MobileAppSupersedenceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppSupersedenceable) + SetValue(value []MobileAppSupersedenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_type.go b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_type.go new file mode 100644 index 000000000..2d26b371e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supersedence_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileAppSupersedenceType int + +const ( + // Indicates that the child app should be updated by the internal logic of the parent app. + UPDATE_MOBILEAPPSUPERSEDENCETYPE MobileAppSupersedenceType = iota + // Indicates that the child app should be uninstalled before installing the parent app. + REPLACE_MOBILEAPPSUPERSEDENCETYPE +) + +func (i MobileAppSupersedenceType) String() string { + return []string{"update", "replace"}[i] +} +func ParseMobileAppSupersedenceType(v string) (interface{}, error) { + result := UPDATE_MOBILEAPPSUPERSEDENCETYPE + switch v { + case "update": + result = UPDATE_MOBILEAPPSUPERSEDENCETYPE + case "replace": + result = REPLACE_MOBILEAPPSUPERSEDENCETYPE + default: + return 0, errors.New("Unknown MobileAppSupersedenceType value: " + v) + } + return &result, nil +} +func SerializeMobileAppSupersedenceType(values []MobileAppSupersedenceType) []string { + 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/mobile_app_supersedenceable.go b/src/internal/connector/graph/betasdk/models/mobile_app_supersedenceable.go new file mode 100644 index 000000000..74decdc60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supersedenceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupersedenceable +type MobileAppSupersedenceable interface { + MobileAppRelationshipable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSupersededAppCount()(*int32) + GetSupersedenceType()(*MobileAppSupersedenceType) + GetSupersedingAppCount()(*int32) + SetSupersededAppCount(value *int32)() + SetSupersedenceType(value *MobileAppSupersedenceType)() + SetSupersedingAppCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type.go b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type.go new file mode 100644 index 000000000..aed7a56c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupportedDeviceType device properties +type MobileAppSupportedDeviceType struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Maximum OS version + maximumOperatingSystemVersion *string + // Minimum OS version + minimumOperatingSystemVersion *string + // The OdataType property + odataType *string + // Device type. + type_escaped *DeviceType +} +// NewMobileAppSupportedDeviceType instantiates a new mobileAppSupportedDeviceType and sets the default values. +func NewMobileAppSupportedDeviceType()(*MobileAppSupportedDeviceType) { + m := &MobileAppSupportedDeviceType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppSupportedDeviceTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppSupportedDeviceTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppSupportedDeviceType(), 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 *MobileAppSupportedDeviceType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppSupportedDeviceType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maximumOperatingSystemVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaximumOperatingSystemVersion(val) + } + return nil + } + res["minimumOperatingSystemVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMinimumOperatingSystemVersion(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*DeviceType)) + } + return nil + } + return res +} +// GetMaximumOperatingSystemVersion gets the maximumOperatingSystemVersion property value. Maximum OS version +func (m *MobileAppSupportedDeviceType) GetMaximumOperatingSystemVersion()(*string) { + return m.maximumOperatingSystemVersion +} +// GetMinimumOperatingSystemVersion gets the minimumOperatingSystemVersion property value. Minimum OS version +func (m *MobileAppSupportedDeviceType) GetMinimumOperatingSystemVersion()(*string) { + return m.minimumOperatingSystemVersion +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppSupportedDeviceType) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Device type. +func (m *MobileAppSupportedDeviceType) GetType()(*DeviceType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *MobileAppSupportedDeviceType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("maximumOperatingSystemVersion", m.GetMaximumOperatingSystemVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("minimumOperatingSystemVersion", m.GetMinimumOperatingSystemVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *MobileAppSupportedDeviceType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaximumOperatingSystemVersion sets the maximumOperatingSystemVersion property value. Maximum OS version +func (m *MobileAppSupportedDeviceType) SetMaximumOperatingSystemVersion(value *string)() { + m.maximumOperatingSystemVersion = value +} +// SetMinimumOperatingSystemVersion sets the minimumOperatingSystemVersion property value. Minimum OS version +func (m *MobileAppSupportedDeviceType) SetMinimumOperatingSystemVersion(value *string)() { + m.minimumOperatingSystemVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppSupportedDeviceType) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Device type. +func (m *MobileAppSupportedDeviceType) SetType(value *DeviceType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_response.go new file mode 100644 index 000000000..ca2281612 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupportedDeviceTypeCollectionResponse +type MobileAppSupportedDeviceTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppSupportedDeviceTypeable +} +// NewMobileAppSupportedDeviceTypeCollectionResponse instantiates a new MobileAppSupportedDeviceTypeCollectionResponse and sets the default values. +func NewMobileAppSupportedDeviceTypeCollectionResponse()(*MobileAppSupportedDeviceTypeCollectionResponse) { + m := &MobileAppSupportedDeviceTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppSupportedDeviceTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppSupportedDeviceTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppSupportedDeviceTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppSupportedDeviceTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppSupportedDeviceTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppSupportedDeviceTypeable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppSupportedDeviceTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppSupportedDeviceTypeCollectionResponse) GetValue()([]MobileAppSupportedDeviceTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppSupportedDeviceTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppSupportedDeviceTypeCollectionResponse) SetValue(value []MobileAppSupportedDeviceTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_responseable.go new file mode 100644 index 000000000..1c5f3c3a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupportedDeviceTypeCollectionResponseable +type MobileAppSupportedDeviceTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppSupportedDeviceTypeable) + SetValue(value []MobileAppSupportedDeviceTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_typeable.go b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_typeable.go new file mode 100644 index 000000000..4d6bbb6f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_supported_device_typeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppSupportedDeviceTypeable +type MobileAppSupportedDeviceTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaximumOperatingSystemVersion()(*string) + GetMinimumOperatingSystemVersion()(*string) + GetOdataType()(*string) + GetType()(*DeviceType) + SetMaximumOperatingSystemVersion(value *string)() + SetMinimumOperatingSystemVersion(value *string)() + SetOdataType(value *string)() + SetType(value *DeviceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_history.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_history.go new file mode 100644 index 000000000..9592e07f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_history.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppPolicyCreationHistory +type MobileAppTroubleshootingAppPolicyCreationHistory struct { + MobileAppTroubleshootingHistoryItem + // Error code for the failure, empty if no failure. + errorCode *string + // Indicates the type of execution status of the device management script. + runState *RunState +} +// NewMobileAppTroubleshootingAppPolicyCreationHistory instantiates a new MobileAppTroubleshootingAppPolicyCreationHistory and sets the default values. +func NewMobileAppTroubleshootingAppPolicyCreationHistory()(*MobileAppTroubleshootingAppPolicyCreationHistory) { + m := &MobileAppTroubleshootingAppPolicyCreationHistory{ + MobileAppTroubleshootingHistoryItem: *NewMobileAppTroubleshootingHistoryItem(), + } + return m +} +// CreateMobileAppTroubleshootingAppPolicyCreationHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingAppPolicyCreationHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingAppPolicyCreationHistory(), nil +} +// GetErrorCode gets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppTroubleshootingHistoryItem.GetFieldDeserializers() + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["runState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetRunState(val.(*RunState)) + } + return nil + } + return res +} +// GetRunState gets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) GetRunState()(*RunState) { + return m.runState +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppTroubleshootingHistoryItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + if m.GetRunState() != nil { + cast := (*m.GetRunState()).String() + err = writer.WriteStringValue("runState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetErrorCode sets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetRunState sets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppPolicyCreationHistory) SetRunState(value *RunState)() { + m.runState = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_historyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_historyable.go new file mode 100644 index 000000000..a1424bbb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_policy_creation_historyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppPolicyCreationHistoryable +type MobileAppTroubleshootingAppPolicyCreationHistoryable interface { + MobileAppTroubleshootingHistoryItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*string) + GetRunState()(*RunState) + SetErrorCode(value *string)() + SetRunState(value *RunState)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_history.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_history.go new file mode 100644 index 000000000..ed5d12abc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_history.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppStateHistory +type MobileAppTroubleshootingAppStateHistory struct { + MobileAppTroubleshootingHistoryItem + // Defines the Action Types for an Intune Application. + actionType *MobileAppActionType + // Error code for the failure, empty if no failure. + errorCode *string + // Indicates the type of execution status of the device management script. + runState *RunState +} +// NewMobileAppTroubleshootingAppStateHistory instantiates a new MobileAppTroubleshootingAppStateHistory and sets the default values. +func NewMobileAppTroubleshootingAppStateHistory()(*MobileAppTroubleshootingAppStateHistory) { + m := &MobileAppTroubleshootingAppStateHistory{ + MobileAppTroubleshootingHistoryItem: *NewMobileAppTroubleshootingHistoryItem(), + } + return m +} +// CreateMobileAppTroubleshootingAppStateHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingAppStateHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingAppStateHistory(), nil +} +// GetActionType gets the actionType property value. Defines the Action Types for an Intune Application. +func (m *MobileAppTroubleshootingAppStateHistory) GetActionType()(*MobileAppActionType) { + return m.actionType +} +// GetErrorCode gets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppStateHistory) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingAppStateHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppTroubleshootingHistoryItem.GetFieldDeserializers() + res["actionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileAppActionType) + if err != nil { + return err + } + if val != nil { + m.SetActionType(val.(*MobileAppActionType)) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["runState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetRunState(val.(*RunState)) + } + return nil + } + return res +} +// GetRunState gets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppStateHistory) GetRunState()(*RunState) { + return m.runState +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingAppStateHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppTroubleshootingHistoryItem.Serialize(writer) + if err != nil { + return err + } + if m.GetActionType() != nil { + cast := (*m.GetActionType()).String() + err = writer.WriteStringValue("actionType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + if m.GetRunState() != nil { + cast := (*m.GetRunState()).String() + err = writer.WriteStringValue("runState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetActionType sets the actionType property value. Defines the Action Types for an Intune Application. +func (m *MobileAppTroubleshootingAppStateHistory) SetActionType(value *MobileAppActionType)() { + m.actionType = value +} +// SetErrorCode sets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppStateHistory) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetRunState sets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppStateHistory) SetRunState(value *RunState)() { + m.runState = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_historyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_historyable.go new file mode 100644 index 000000000..ef0ffa428 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_state_historyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppStateHistoryable +type MobileAppTroubleshootingAppStateHistoryable interface { + MobileAppTroubleshootingHistoryItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionType()(*MobileAppActionType) + GetErrorCode()(*string) + GetRunState()(*RunState) + SetActionType(value *MobileAppActionType)() + SetErrorCode(value *string)() + SetRunState(value *RunState)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_history.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_history.go new file mode 100644 index 000000000..be624c09c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_history.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppTargetHistory +type MobileAppTroubleshootingAppTargetHistory struct { + MobileAppTroubleshootingHistoryItem + // Error code for the failure, empty if no failure. + errorCode *string + // Indicates the type of execution status of the device management script. + runState *RunState + // AAD security group id to which it was targeted. + securityGroupId *string +} +// NewMobileAppTroubleshootingAppTargetHistory instantiates a new MobileAppTroubleshootingAppTargetHistory and sets the default values. +func NewMobileAppTroubleshootingAppTargetHistory()(*MobileAppTroubleshootingAppTargetHistory) { + m := &MobileAppTroubleshootingAppTargetHistory{ + MobileAppTroubleshootingHistoryItem: *NewMobileAppTroubleshootingHistoryItem(), + } + return m +} +// CreateMobileAppTroubleshootingAppTargetHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingAppTargetHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingAppTargetHistory(), nil +} +// GetErrorCode gets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppTargetHistory) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingAppTargetHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppTroubleshootingHistoryItem.GetFieldDeserializers() + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["runState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRunState) + if err != nil { + return err + } + if val != nil { + m.SetRunState(val.(*RunState)) + } + return nil + } + res["securityGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityGroupId(val) + } + return nil + } + return res +} +// GetRunState gets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppTargetHistory) GetRunState()(*RunState) { + return m.runState +} +// GetSecurityGroupId gets the securityGroupId property value. AAD security group id to which it was targeted. +func (m *MobileAppTroubleshootingAppTargetHistory) GetSecurityGroupId()(*string) { + return m.securityGroupId +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingAppTargetHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppTroubleshootingHistoryItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + if m.GetRunState() != nil { + cast := (*m.GetRunState()).String() + err = writer.WriteStringValue("runState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("securityGroupId", m.GetSecurityGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetErrorCode sets the errorCode property value. Error code for the failure, empty if no failure. +func (m *MobileAppTroubleshootingAppTargetHistory) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetRunState sets the runState property value. Indicates the type of execution status of the device management script. +func (m *MobileAppTroubleshootingAppTargetHistory) SetRunState(value *RunState)() { + m.runState = value +} +// SetSecurityGroupId sets the securityGroupId property value. AAD security group id to which it was targeted. +func (m *MobileAppTroubleshootingAppTargetHistory) SetSecurityGroupId(value *string)() { + m.securityGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_historyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_historyable.go new file mode 100644 index 000000000..e08813967 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_target_historyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppTargetHistoryable +type MobileAppTroubleshootingAppTargetHistoryable interface { + MobileAppTroubleshootingHistoryItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*string) + GetRunState()(*RunState) + GetSecurityGroupId()(*string) + SetErrorCode(value *string)() + SetRunState(value *RunState)() + SetSecurityGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_history.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_history.go new file mode 100644 index 000000000..fe096561b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_history.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppUpdateHistory +type MobileAppTroubleshootingAppUpdateHistory struct { + MobileAppTroubleshootingHistoryItem +} +// NewMobileAppTroubleshootingAppUpdateHistory instantiates a new MobileAppTroubleshootingAppUpdateHistory and sets the default values. +func NewMobileAppTroubleshootingAppUpdateHistory()(*MobileAppTroubleshootingAppUpdateHistory) { + m := &MobileAppTroubleshootingAppUpdateHistory{ + MobileAppTroubleshootingHistoryItem: *NewMobileAppTroubleshootingHistoryItem(), + } + return m +} +// CreateMobileAppTroubleshootingAppUpdateHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingAppUpdateHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingAppUpdateHistory(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingAppUpdateHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppTroubleshootingHistoryItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingAppUpdateHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppTroubleshootingHistoryItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_historyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_historyable.go new file mode 100644 index 000000000..e027e4d11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_app_update_historyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingAppUpdateHistoryable +type MobileAppTroubleshootingAppUpdateHistoryable interface { + MobileAppTroubleshootingHistoryItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_history.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_history.go new file mode 100644 index 000000000..a56d7872f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_history.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingDeviceCheckinHistory +type MobileAppTroubleshootingDeviceCheckinHistory struct { + MobileAppTroubleshootingHistoryItem +} +// NewMobileAppTroubleshootingDeviceCheckinHistory instantiates a new MobileAppTroubleshootingDeviceCheckinHistory and sets the default values. +func NewMobileAppTroubleshootingDeviceCheckinHistory()(*MobileAppTroubleshootingDeviceCheckinHistory) { + m := &MobileAppTroubleshootingDeviceCheckinHistory{ + MobileAppTroubleshootingHistoryItem: *NewMobileAppTroubleshootingHistoryItem(), + } + return m +} +// CreateMobileAppTroubleshootingDeviceCheckinHistoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingDeviceCheckinHistoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingDeviceCheckinHistory(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingDeviceCheckinHistory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileAppTroubleshootingHistoryItem.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingDeviceCheckinHistory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileAppTroubleshootingHistoryItem.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_historyable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_historyable.go new file mode 100644 index 000000000..71d7c3fff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_device_checkin_historyable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingDeviceCheckinHistoryable +type MobileAppTroubleshootingDeviceCheckinHistoryable interface { + MobileAppTroubleshootingHistoryItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event.go new file mode 100644 index 000000000..1d7509540 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event.go @@ -0,0 +1,180 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingEvent +type MobileAppTroubleshootingEvent struct { + DeviceManagementTroubleshootingEvent + // Intune application identifier. + applicationId *string + // The collection property of AppLogUploadRequest. + appLogCollectionRequests []AppLogCollectionRequestable + // Intune Mobile Application Troubleshooting History Item + history []MobileAppTroubleshootingHistoryItemable + // Device identifier created or collected by Intune. + managedDeviceIdentifier *string + // Identifier for the user that tried to enroll the device. + userId *string +} +// NewMobileAppTroubleshootingEvent instantiates a new MobileAppTroubleshootingEvent and sets the default values. +func NewMobileAppTroubleshootingEvent()(*MobileAppTroubleshootingEvent) { + m := &MobileAppTroubleshootingEvent{ + DeviceManagementTroubleshootingEvent: *NewDeviceManagementTroubleshootingEvent(), + } + return m +} +// CreateMobileAppTroubleshootingEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingEvent(), nil +} +// GetApplicationId gets the applicationId property value. Intune application identifier. +func (m *MobileAppTroubleshootingEvent) GetApplicationId()(*string) { + return m.applicationId +} +// GetAppLogCollectionRequests gets the appLogCollectionRequests property value. The collection property of AppLogUploadRequest. +func (m *MobileAppTroubleshootingEvent) GetAppLogCollectionRequests()([]AppLogCollectionRequestable) { + return m.appLogCollectionRequests +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementTroubleshootingEvent.GetFieldDeserializers() + res["applicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationId(val) + } + return nil + } + res["appLogCollectionRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppLogCollectionRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppLogCollectionRequestable, len(val)) + for i, v := range val { + res[i] = v.(AppLogCollectionRequestable) + } + m.SetAppLogCollectionRequests(res) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppTroubleshootingHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppTroubleshootingHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppTroubleshootingHistoryItemable) + } + m.SetHistory(res) + } + return nil + } + res["managedDeviceIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceIdentifier(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetHistory gets the history property value. Intune Mobile Application Troubleshooting History Item +func (m *MobileAppTroubleshootingEvent) GetHistory()([]MobileAppTroubleshootingHistoryItemable) { + return m.history +} +// GetManagedDeviceIdentifier gets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *MobileAppTroubleshootingEvent) GetManagedDeviceIdentifier()(*string) { + return m.managedDeviceIdentifier +} +// GetUserId gets the userId property value. Identifier for the user that tried to enroll the device. +func (m *MobileAppTroubleshootingEvent) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementTroubleshootingEvent.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("applicationId", m.GetApplicationId()) + if err != nil { + return err + } + } + if m.GetAppLogCollectionRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppLogCollectionRequests())) + for i, v := range m.GetAppLogCollectionRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appLogCollectionRequests", cast) + if err != nil { + return err + } + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceIdentifier", m.GetManagedDeviceIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetApplicationId sets the applicationId property value. Intune application identifier. +func (m *MobileAppTroubleshootingEvent) SetApplicationId(value *string)() { + m.applicationId = value +} +// SetAppLogCollectionRequests sets the appLogCollectionRequests property value. The collection property of AppLogUploadRequest. +func (m *MobileAppTroubleshootingEvent) SetAppLogCollectionRequests(value []AppLogCollectionRequestable)() { + m.appLogCollectionRequests = value +} +// SetHistory sets the history property value. Intune Mobile Application Troubleshooting History Item +func (m *MobileAppTroubleshootingEvent) SetHistory(value []MobileAppTroubleshootingHistoryItemable)() { + m.history = value +} +// SetManagedDeviceIdentifier sets the managedDeviceIdentifier property value. Device identifier created or collected by Intune. +func (m *MobileAppTroubleshootingEvent) SetManagedDeviceIdentifier(value *string)() { + m.managedDeviceIdentifier = value +} +// SetUserId sets the userId property value. Identifier for the user that tried to enroll the device. +func (m *MobileAppTroubleshootingEvent) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_response.go new file mode 100644 index 000000000..35dc02e39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingEventCollectionResponse +type MobileAppTroubleshootingEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppTroubleshootingEventable +} +// NewMobileAppTroubleshootingEventCollectionResponse instantiates a new MobileAppTroubleshootingEventCollectionResponse and sets the default values. +func NewMobileAppTroubleshootingEventCollectionResponse()(*MobileAppTroubleshootingEventCollectionResponse) { + m := &MobileAppTroubleshootingEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppTroubleshootingEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppTroubleshootingEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppTroubleshootingEventable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppTroubleshootingEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppTroubleshootingEventCollectionResponse) GetValue()([]MobileAppTroubleshootingEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppTroubleshootingEventCollectionResponse) SetValue(value []MobileAppTroubleshootingEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_responseable.go new file mode 100644 index 000000000..8621d6403 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingEventCollectionResponseable +type MobileAppTroubleshootingEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppTroubleshootingEventable) + SetValue(value []MobileAppTroubleshootingEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_eventable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_eventable.go new file mode 100644 index 000000000..5ba043c61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_eventable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingEventable +type MobileAppTroubleshootingEventable interface { + DeviceManagementTroubleshootingEventable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationId()(*string) + GetAppLogCollectionRequests()([]AppLogCollectionRequestable) + GetHistory()([]MobileAppTroubleshootingHistoryItemable) + GetManagedDeviceIdentifier()(*string) + GetUserId()(*string) + SetApplicationId(value *string)() + SetAppLogCollectionRequests(value []AppLogCollectionRequestable)() + SetHistory(value []MobileAppTroubleshootingHistoryItemable)() + SetManagedDeviceIdentifier(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item.go new file mode 100644 index 000000000..f5f6ab640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingHistoryItem history Item contained in the Mobile App Troubleshooting Event. +type MobileAppTroubleshootingHistoryItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Time when the history item occurred. + occurrenceDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Object containing detailed information about the error and its remediation. + troubleshootingErrorDetails DeviceManagementTroubleshootingErrorDetailsable +} +// NewMobileAppTroubleshootingHistoryItem instantiates a new mobileAppTroubleshootingHistoryItem and sets the default values. +func NewMobileAppTroubleshootingHistoryItem()(*MobileAppTroubleshootingHistoryItem) { + m := &MobileAppTroubleshootingHistoryItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMobileAppTroubleshootingHistoryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.mobileAppTroubleshootingAppPolicyCreationHistory": + return NewMobileAppTroubleshootingAppPolicyCreationHistory(), nil + case "#microsoft.graph.mobileAppTroubleshootingAppStateHistory": + return NewMobileAppTroubleshootingAppStateHistory(), nil + case "#microsoft.graph.mobileAppTroubleshootingAppTargetHistory": + return NewMobileAppTroubleshootingAppTargetHistory(), nil + case "#microsoft.graph.mobileAppTroubleshootingAppUpdateHistory": + return NewMobileAppTroubleshootingAppUpdateHistory(), nil + case "#microsoft.graph.mobileAppTroubleshootingDeviceCheckinHistory": + return NewMobileAppTroubleshootingDeviceCheckinHistory(), nil + } + } + } + } + return NewMobileAppTroubleshootingHistoryItem(), 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 *MobileAppTroubleshootingHistoryItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["occurrenceDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOccurrenceDateTime(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["troubleshootingErrorDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceManagementTroubleshootingErrorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTroubleshootingErrorDetails(val.(DeviceManagementTroubleshootingErrorDetailsable)) + } + return nil + } + return res +} +// GetOccurrenceDateTime gets the occurrenceDateTime property value. Time when the history item occurred. +func (m *MobileAppTroubleshootingHistoryItem) GetOccurrenceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.occurrenceDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MobileAppTroubleshootingHistoryItem) GetOdataType()(*string) { + return m.odataType +} +// GetTroubleshootingErrorDetails gets the troubleshootingErrorDetails property value. Object containing detailed information about the error and its remediation. +func (m *MobileAppTroubleshootingHistoryItem) GetTroubleshootingErrorDetails()(DeviceManagementTroubleshootingErrorDetailsable) { + return m.troubleshootingErrorDetails +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("occurrenceDateTime", m.GetOccurrenceDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("troubleshootingErrorDetails", m.GetTroubleshootingErrorDetails()) + 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 *MobileAppTroubleshootingHistoryItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOccurrenceDateTime sets the occurrenceDateTime property value. Time when the history item occurred. +func (m *MobileAppTroubleshootingHistoryItem) SetOccurrenceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.occurrenceDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MobileAppTroubleshootingHistoryItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetTroubleshootingErrorDetails sets the troubleshootingErrorDetails property value. Object containing detailed information about the error and its remediation. +func (m *MobileAppTroubleshootingHistoryItem) SetTroubleshootingErrorDetails(value DeviceManagementTroubleshootingErrorDetailsable)() { + m.troubleshootingErrorDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_response.go new file mode 100644 index 000000000..a258b9f0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingHistoryItemCollectionResponse +type MobileAppTroubleshootingHistoryItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileAppTroubleshootingHistoryItemable +} +// NewMobileAppTroubleshootingHistoryItemCollectionResponse instantiates a new MobileAppTroubleshootingHistoryItemCollectionResponse and sets the default values. +func NewMobileAppTroubleshootingHistoryItemCollectionResponse()(*MobileAppTroubleshootingHistoryItemCollectionResponse) { + m := &MobileAppTroubleshootingHistoryItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileAppTroubleshootingHistoryItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileAppTroubleshootingHistoryItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileAppTroubleshootingHistoryItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileAppTroubleshootingHistoryItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppTroubleshootingHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppTroubleshootingHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppTroubleshootingHistoryItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileAppTroubleshootingHistoryItemCollectionResponse) GetValue()([]MobileAppTroubleshootingHistoryItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileAppTroubleshootingHistoryItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileAppTroubleshootingHistoryItemCollectionResponse) SetValue(value []MobileAppTroubleshootingHistoryItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_responseable.go new file mode 100644 index 000000000..68bd7dcd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingHistoryItemCollectionResponseable +type MobileAppTroubleshootingHistoryItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileAppTroubleshootingHistoryItemable) + SetValue(value []MobileAppTroubleshootingHistoryItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_itemable.go b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_itemable.go new file mode 100644 index 000000000..60ac4791e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_app_troubleshooting_history_itemable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppTroubleshootingHistoryItemable +type MobileAppTroubleshootingHistoryItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOccurrenceDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetTroubleshootingErrorDetails()(DeviceManagementTroubleshootingErrorDetailsable) + SetOccurrenceDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetTroubleshootingErrorDetails(value DeviceManagementTroubleshootingErrorDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_appable.go b/src/internal/connector/graph/betasdk/models/mobile_appable.go new file mode 100644 index 000000000..75bbbbc62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_appable.go @@ -0,0 +1,62 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileAppable +type MobileAppable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]MobileAppAssignmentable) + GetCategories()([]MobileAppCategoryable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDependentAppCount()(*int32) + GetDescription()(*string) + GetDeveloper()(*string) + GetDeviceStatuses()([]MobileAppInstallStatusable) + GetDisplayName()(*string) + GetInformationUrl()(*string) + GetInstallSummary()(MobileAppInstallSummaryable) + GetIsAssigned()(*bool) + GetIsFeatured()(*bool) + GetLargeIcon()(MimeContentable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNotes()(*string) + GetOwner()(*string) + GetPrivacyInformationUrl()(*string) + GetPublisher()(*string) + GetPublishingState()(*MobileAppPublishingState) + GetRelationships()([]MobileAppRelationshipable) + GetRoleScopeTagIds()([]string) + GetSupersededAppCount()(*int32) + GetSupersedingAppCount()(*int32) + GetUploadState()(*int32) + GetUserStatuses()([]UserAppInstallStatusable) + SetAssignments(value []MobileAppAssignmentable)() + SetCategories(value []MobileAppCategoryable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDependentAppCount(value *int32)() + SetDescription(value *string)() + SetDeveloper(value *string)() + SetDeviceStatuses(value []MobileAppInstallStatusable)() + SetDisplayName(value *string)() + SetInformationUrl(value *string)() + SetInstallSummary(value MobileAppInstallSummaryable)() + SetIsAssigned(value *bool)() + SetIsFeatured(value *bool)() + SetLargeIcon(value MimeContentable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNotes(value *string)() + SetOwner(value *string)() + SetPrivacyInformationUrl(value *string)() + SetPublisher(value *string)() + SetPublishingState(value *MobileAppPublishingState)() + SetRelationships(value []MobileAppRelationshipable)() + SetRoleScopeTagIds(value []string)() + SetSupersededAppCount(value *int32)() + SetSupersedingAppCount(value *int32)() + SetUploadState(value *int32)() + SetUserStatuses(value []UserAppInstallStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_contained_app.go b/src/internal/connector/graph/betasdk/models/mobile_contained_app.go new file mode 100644 index 000000000..b79269947 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_contained_app.go @@ -0,0 +1,54 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileContainedApp an abstract class that represents a contained app in a mobileApp acting as a package. +type MobileContainedApp struct { + Entity +} +// NewMobileContainedApp instantiates a new mobileContainedApp and sets the default values. +func NewMobileContainedApp()(*MobileContainedApp) { + m := &MobileContainedApp{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileContainedAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileContainedAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.microsoftStoreForBusinessContainedApp": + return NewMicrosoftStoreForBusinessContainedApp(), nil + case "#microsoft.graph.windowsUniversalAppXContainedApp": + return NewWindowsUniversalAppXContainedApp(), nil + } + } + } + } + return NewMobileContainedApp(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileContainedApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MobileContainedApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_response.go new file mode 100644 index 000000000..abba63df1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileContainedAppCollectionResponse +type MobileContainedAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileContainedAppable +} +// NewMobileContainedAppCollectionResponse instantiates a new MobileContainedAppCollectionResponse and sets the default values. +func NewMobileContainedAppCollectionResponse()(*MobileContainedAppCollectionResponse) { + m := &MobileContainedAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileContainedAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileContainedAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileContainedAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileContainedAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileContainedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileContainedAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileContainedAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileContainedAppCollectionResponse) GetValue()([]MobileContainedAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileContainedAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileContainedAppCollectionResponse) SetValue(value []MobileContainedAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_responseable.go new file mode 100644 index 000000000..a5992ca6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_contained_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileContainedAppCollectionResponseable +type MobileContainedAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileContainedAppable) + SetValue(value []MobileContainedAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_contained_appable.go b/src/internal/connector/graph/betasdk/models/mobile_contained_appable.go new file mode 100644 index 000000000..4fed6273b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_contained_appable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileContainedAppable +type MobileContainedAppable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_lob_app.go b/src/internal/connector/graph/betasdk/models/mobile_lob_app.go new file mode 100644 index 000000000..5b4754072 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_lob_app.go @@ -0,0 +1,186 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileLobApp +type MobileLobApp struct { + MobileApp + // The internal committed content version. + committedContentVersion *string + // The list of content versions for this app. + contentVersions []MobileAppContentable + // The name of the main Lob application file. + fileName *string + // The total size, including all uploaded files. + size *int64 +} +// NewMobileLobApp instantiates a new MobileLobApp and sets the default values. +func NewMobileLobApp()(*MobileLobApp) { + m := &MobileLobApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.mobileLobApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMobileLobAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileLobAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.androidLobApp": + return NewAndroidLobApp(), nil + case "#microsoft.graph.iosLobApp": + return NewIosLobApp(), nil + case "#microsoft.graph.macOSDmgApp": + return NewMacOSDmgApp(), nil + case "#microsoft.graph.macOSLobApp": + return NewMacOSLobApp(), nil + case "#microsoft.graph.win32LobApp": + return NewWin32LobApp(), nil + case "#microsoft.graph.windowsAppX": + return NewWindowsAppX(), nil + case "#microsoft.graph.windowsMobileMSI": + return NewWindowsMobileMSI(), nil + case "#microsoft.graph.windowsPhone81AppX": + return NewWindowsPhone81AppX(), nil + case "#microsoft.graph.windowsPhone81AppXBundle": + return NewWindowsPhone81AppXBundle(), nil + case "#microsoft.graph.windowsPhoneXAP": + return NewWindowsPhoneXAP(), nil + case "#microsoft.graph.windowsUniversalAppX": + return NewWindowsUniversalAppX(), nil + } + } + } + } + return NewMobileLobApp(), nil +} +// GetCommittedContentVersion gets the committedContentVersion property value. The internal committed content version. +func (m *MobileLobApp) GetCommittedContentVersion()(*string) { + return m.committedContentVersion +} +// GetContentVersions gets the contentVersions property value. The list of content versions for this app. +func (m *MobileLobApp) GetContentVersions()([]MobileAppContentable) { + return m.contentVersions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileLobApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["committedContentVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommittedContentVersion(val) + } + return nil + } + res["contentVersions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileAppContentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileAppContentable, len(val)) + for i, v := range val { + res[i] = v.(MobileAppContentable) + } + m.SetContentVersions(res) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. The name of the main Lob application file. +func (m *MobileLobApp) GetFileName()(*string) { + return m.fileName +} +// GetSize gets the size property value. The total size, including all uploaded files. +func (m *MobileLobApp) GetSize()(*int64) { + return m.size +} +// Serialize serializes information the current object +func (m *MobileLobApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("committedContentVersion", m.GetCommittedContentVersion()) + if err != nil { + return err + } + } + if m.GetContentVersions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContentVersions())) + for i, v := range m.GetContentVersions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contentVersions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetCommittedContentVersion sets the committedContentVersion property value. The internal committed content version. +func (m *MobileLobApp) SetCommittedContentVersion(value *string)() { + m.committedContentVersion = value +} +// SetContentVersions sets the contentVersions property value. The list of content versions for this app. +func (m *MobileLobApp) SetContentVersions(value []MobileAppContentable)() { + m.contentVersions = value +} +// SetFileName sets the fileName property value. The name of the main Lob application file. +func (m *MobileLobApp) SetFileName(value *string)() { + m.fileName = value +} +// SetSize sets the size property value. The total size, including all uploaded files. +func (m *MobileLobApp) SetSize(value *int64)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_response.go new file mode 100644 index 000000000..4f74e7e25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileLobAppCollectionResponse +type MobileLobAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileLobAppable +} +// NewMobileLobAppCollectionResponse instantiates a new MobileLobAppCollectionResponse and sets the default values. +func NewMobileLobAppCollectionResponse()(*MobileLobAppCollectionResponse) { + m := &MobileLobAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileLobAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileLobAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileLobAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileLobAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileLobAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileLobAppable, len(val)) + for i, v := range val { + res[i] = v.(MobileLobAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileLobAppCollectionResponse) GetValue()([]MobileLobAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileLobAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileLobAppCollectionResponse) SetValue(value []MobileLobAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_responseable.go new file mode 100644 index 000000000..c035d7f15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_lob_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileLobAppCollectionResponseable +type MobileLobAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileLobAppable) + SetValue(value []MobileLobAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_lob_appable.go b/src/internal/connector/graph/betasdk/models/mobile_lob_appable.go new file mode 100644 index 000000000..7605c3b15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_lob_appable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileLobAppable +type MobileLobAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCommittedContentVersion()(*string) + GetContentVersions()([]MobileAppContentable) + GetFileName()(*string) + GetSize()(*int64) + SetCommittedContentVersion(value *string)() + SetContentVersions(value []MobileAppContentable)() + SetFileName(value *string)() + SetSize(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector.go b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector.go new file mode 100644 index 000000000..c5af4005b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector.go @@ -0,0 +1,504 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileThreatDefenseConnector entity which represents a connection to Mobile threat defense partner. +type MobileThreatDefenseConnector struct { + Entity + // For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about installed applications from Intune + allowPartnerToCollectIOSApplicationMetadata *bool + // For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about personally installed applications from Intune + allowPartnerToCollectIOSPersonalApplicationMetadata *bool + // For Android, set whether Intune must receive data from the data sync partner prior to marking a device compliant + androidDeviceBlockedOnMissingPartnerData *bool + // For Android, set whether data from the data sync partner should be used during compliance evaluations + androidEnabled *bool + // For Android, set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. + androidMobileApplicationManagementEnabled *bool + // For IOS, set whether Intune must receive data from the data sync partner prior to marking a device compliant + iosDeviceBlockedOnMissingPartnerData *bool + // For IOS, get or set whether data from the data sync partner should be used during compliance evaluations + iosEnabled *bool + // For IOS, get or set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. + iosMobileApplicationManagementEnabled *bool + // DateTime of last Heartbeat recieved from the Data Sync Partner + lastHeartbeatDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // For Mac, get or set whether Intune must receive data from the data sync partner prior to marking a device compliant + macDeviceBlockedOnMissingPartnerData *bool + // For Mac, get or set whether data from the data sync partner should be used during compliance evaluations + macEnabled *bool + // When TRUE, configuration profile management via Microsoft Defender for Endpoint is enabled. When FALSE, configuration profile management via Microsoft Defender for Endpoint is disabled. + microsoftDefenderForEndpointAttachEnabled *bool + // Partner state of this tenant. + partnerState *MobileThreatPartnerTenantState + // Get or Set days the per tenant tolerance to unresponsiveness for this partner integration + partnerUnresponsivenessThresholdInDays *int32 + // Get or set whether to block devices on the enabled platforms that do not meet the minimum version requirements of the Data Sync Partner + partnerUnsupportedOsVersionBlocked *bool + // For Windows, set whether Intune must receive data from the data sync partner prior to marking a device compliant + windowsDeviceBlockedOnMissingPartnerData *bool + // For Windows, get or set whether data from the data sync partner should be used during compliance evaluations + windowsEnabled *bool + // When TRUE, app protection policies using the Device Threat Level rule will evaluate devices including data from this connector for Windows. When FALSE, Intune will not use device risk details sent over this connector during app protection policies calculation for policies with a Device Threat Level configured. Existing devices that are not compliant due to risk levels obtained from this connector will also become compliant. + windowsMobileApplicationManagementEnabled *bool +} +// NewMobileThreatDefenseConnector instantiates a new mobileThreatDefenseConnector and sets the default values. +func NewMobileThreatDefenseConnector()(*MobileThreatDefenseConnector) { + m := &MobileThreatDefenseConnector{ + Entity: *NewEntity(), + } + return m +} +// CreateMobileThreatDefenseConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileThreatDefenseConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileThreatDefenseConnector(), nil +} +// GetAllowPartnerToCollectIOSApplicationMetadata gets the allowPartnerToCollectIOSApplicationMetadata property value. For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about installed applications from Intune +func (m *MobileThreatDefenseConnector) GetAllowPartnerToCollectIOSApplicationMetadata()(*bool) { + return m.allowPartnerToCollectIOSApplicationMetadata +} +// GetAllowPartnerToCollectIOSPersonalApplicationMetadata gets the allowPartnerToCollectIOSPersonalApplicationMetadata property value. For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about personally installed applications from Intune +func (m *MobileThreatDefenseConnector) GetAllowPartnerToCollectIOSPersonalApplicationMetadata()(*bool) { + return m.allowPartnerToCollectIOSPersonalApplicationMetadata +} +// GetAndroidDeviceBlockedOnMissingPartnerData gets the androidDeviceBlockedOnMissingPartnerData property value. For Android, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) GetAndroidDeviceBlockedOnMissingPartnerData()(*bool) { + return m.androidDeviceBlockedOnMissingPartnerData +} +// GetAndroidEnabled gets the androidEnabled property value. For Android, set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) GetAndroidEnabled()(*bool) { + return m.androidEnabled +} +// GetAndroidMobileApplicationManagementEnabled gets the androidMobileApplicationManagementEnabled property value. For Android, set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. +func (m *MobileThreatDefenseConnector) GetAndroidMobileApplicationManagementEnabled()(*bool) { + return m.androidMobileApplicationManagementEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileThreatDefenseConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowPartnerToCollectIOSApplicationMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowPartnerToCollectIOSApplicationMetadata(val) + } + return nil + } + res["allowPartnerToCollectIOSPersonalApplicationMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowPartnerToCollectIOSPersonalApplicationMetadata(val) + } + return nil + } + res["androidDeviceBlockedOnMissingPartnerData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidDeviceBlockedOnMissingPartnerData(val) + } + return nil + } + res["androidEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidEnabled(val) + } + return nil + } + res["androidMobileApplicationManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAndroidMobileApplicationManagementEnabled(val) + } + return nil + } + res["iosDeviceBlockedOnMissingPartnerData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIosDeviceBlockedOnMissingPartnerData(val) + } + return nil + } + res["iosEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIosEnabled(val) + } + return nil + } + res["iosMobileApplicationManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIosMobileApplicationManagementEnabled(val) + } + return nil + } + res["lastHeartbeatDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastHeartbeatDateTime(val) + } + return nil + } + res["macDeviceBlockedOnMissingPartnerData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMacDeviceBlockedOnMissingPartnerData(val) + } + return nil + } + res["macEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMacEnabled(val) + } + return nil + } + res["microsoftDefenderForEndpointAttachEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftDefenderForEndpointAttachEnabled(val) + } + return nil + } + res["partnerState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMobileThreatPartnerTenantState) + if err != nil { + return err + } + if val != nil { + m.SetPartnerState(val.(*MobileThreatPartnerTenantState)) + } + return nil + } + res["partnerUnresponsivenessThresholdInDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPartnerUnresponsivenessThresholdInDays(val) + } + return nil + } + res["partnerUnsupportedOsVersionBlocked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPartnerUnsupportedOsVersionBlocked(val) + } + return nil + } + res["windowsDeviceBlockedOnMissingPartnerData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsDeviceBlockedOnMissingPartnerData(val) + } + return nil + } + res["windowsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsEnabled(val) + } + return nil + } + res["windowsMobileApplicationManagementEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWindowsMobileApplicationManagementEnabled(val) + } + return nil + } + return res +} +// GetIosDeviceBlockedOnMissingPartnerData gets the iosDeviceBlockedOnMissingPartnerData property value. For IOS, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) GetIosDeviceBlockedOnMissingPartnerData()(*bool) { + return m.iosDeviceBlockedOnMissingPartnerData +} +// GetIosEnabled gets the iosEnabled property value. For IOS, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) GetIosEnabled()(*bool) { + return m.iosEnabled +} +// GetIosMobileApplicationManagementEnabled gets the iosMobileApplicationManagementEnabled property value. For IOS, get or set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. +func (m *MobileThreatDefenseConnector) GetIosMobileApplicationManagementEnabled()(*bool) { + return m.iosMobileApplicationManagementEnabled +} +// GetLastHeartbeatDateTime gets the lastHeartbeatDateTime property value. DateTime of last Heartbeat recieved from the Data Sync Partner +func (m *MobileThreatDefenseConnector) GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastHeartbeatDateTime +} +// GetMacDeviceBlockedOnMissingPartnerData gets the macDeviceBlockedOnMissingPartnerData property value. For Mac, get or set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) GetMacDeviceBlockedOnMissingPartnerData()(*bool) { + return m.macDeviceBlockedOnMissingPartnerData +} +// GetMacEnabled gets the macEnabled property value. For Mac, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) GetMacEnabled()(*bool) { + return m.macEnabled +} +// GetMicrosoftDefenderForEndpointAttachEnabled gets the microsoftDefenderForEndpointAttachEnabled property value. When TRUE, configuration profile management via Microsoft Defender for Endpoint is enabled. When FALSE, configuration profile management via Microsoft Defender for Endpoint is disabled. +func (m *MobileThreatDefenseConnector) GetMicrosoftDefenderForEndpointAttachEnabled()(*bool) { + return m.microsoftDefenderForEndpointAttachEnabled +} +// GetPartnerState gets the partnerState property value. Partner state of this tenant. +func (m *MobileThreatDefenseConnector) GetPartnerState()(*MobileThreatPartnerTenantState) { + return m.partnerState +} +// GetPartnerUnresponsivenessThresholdInDays gets the partnerUnresponsivenessThresholdInDays property value. Get or Set days the per tenant tolerance to unresponsiveness for this partner integration +func (m *MobileThreatDefenseConnector) GetPartnerUnresponsivenessThresholdInDays()(*int32) { + return m.partnerUnresponsivenessThresholdInDays +} +// GetPartnerUnsupportedOsVersionBlocked gets the partnerUnsupportedOsVersionBlocked property value. Get or set whether to block devices on the enabled platforms that do not meet the minimum version requirements of the Data Sync Partner +func (m *MobileThreatDefenseConnector) GetPartnerUnsupportedOsVersionBlocked()(*bool) { + return m.partnerUnsupportedOsVersionBlocked +} +// GetWindowsDeviceBlockedOnMissingPartnerData gets the windowsDeviceBlockedOnMissingPartnerData property value. For Windows, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) GetWindowsDeviceBlockedOnMissingPartnerData()(*bool) { + return m.windowsDeviceBlockedOnMissingPartnerData +} +// GetWindowsEnabled gets the windowsEnabled property value. For Windows, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) GetWindowsEnabled()(*bool) { + return m.windowsEnabled +} +// GetWindowsMobileApplicationManagementEnabled gets the windowsMobileApplicationManagementEnabled property value. When TRUE, app protection policies using the Device Threat Level rule will evaluate devices including data from this connector for Windows. When FALSE, Intune will not use device risk details sent over this connector during app protection policies calculation for policies with a Device Threat Level configured. Existing devices that are not compliant due to risk levels obtained from this connector will also become compliant. +func (m *MobileThreatDefenseConnector) GetWindowsMobileApplicationManagementEnabled()(*bool) { + return m.windowsMobileApplicationManagementEnabled +} +// Serialize serializes information the current object +func (m *MobileThreatDefenseConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowPartnerToCollectIOSApplicationMetadata", m.GetAllowPartnerToCollectIOSApplicationMetadata()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowPartnerToCollectIOSPersonalApplicationMetadata", m.GetAllowPartnerToCollectIOSPersonalApplicationMetadata()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("androidDeviceBlockedOnMissingPartnerData", m.GetAndroidDeviceBlockedOnMissingPartnerData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("androidEnabled", m.GetAndroidEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("androidMobileApplicationManagementEnabled", m.GetAndroidMobileApplicationManagementEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iosDeviceBlockedOnMissingPartnerData", m.GetIosDeviceBlockedOnMissingPartnerData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iosEnabled", m.GetIosEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("iosMobileApplicationManagementEnabled", m.GetIosMobileApplicationManagementEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastHeartbeatDateTime", m.GetLastHeartbeatDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("macDeviceBlockedOnMissingPartnerData", m.GetMacDeviceBlockedOnMissingPartnerData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("macEnabled", m.GetMacEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("microsoftDefenderForEndpointAttachEnabled", m.GetMicrosoftDefenderForEndpointAttachEnabled()) + if err != nil { + return err + } + } + if m.GetPartnerState() != nil { + cast := (*m.GetPartnerState()).String() + err = writer.WriteStringValue("partnerState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("partnerUnresponsivenessThresholdInDays", m.GetPartnerUnresponsivenessThresholdInDays()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("partnerUnsupportedOsVersionBlocked", m.GetPartnerUnsupportedOsVersionBlocked()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("windowsDeviceBlockedOnMissingPartnerData", m.GetWindowsDeviceBlockedOnMissingPartnerData()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("windowsEnabled", m.GetWindowsEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("windowsMobileApplicationManagementEnabled", m.GetWindowsMobileApplicationManagementEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetAllowPartnerToCollectIOSApplicationMetadata sets the allowPartnerToCollectIOSApplicationMetadata property value. For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about installed applications from Intune +func (m *MobileThreatDefenseConnector) SetAllowPartnerToCollectIOSApplicationMetadata(value *bool)() { + m.allowPartnerToCollectIOSApplicationMetadata = value +} +// SetAllowPartnerToCollectIOSPersonalApplicationMetadata sets the allowPartnerToCollectIOSPersonalApplicationMetadata property value. For IOS devices, allows the admin to configure whether the data sync partner may also collect metadata about personally installed applications from Intune +func (m *MobileThreatDefenseConnector) SetAllowPartnerToCollectIOSPersonalApplicationMetadata(value *bool)() { + m.allowPartnerToCollectIOSPersonalApplicationMetadata = value +} +// SetAndroidDeviceBlockedOnMissingPartnerData sets the androidDeviceBlockedOnMissingPartnerData property value. For Android, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) SetAndroidDeviceBlockedOnMissingPartnerData(value *bool)() { + m.androidDeviceBlockedOnMissingPartnerData = value +} +// SetAndroidEnabled sets the androidEnabled property value. For Android, set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) SetAndroidEnabled(value *bool)() { + m.androidEnabled = value +} +// SetAndroidMobileApplicationManagementEnabled sets the androidMobileApplicationManagementEnabled property value. For Android, set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. +func (m *MobileThreatDefenseConnector) SetAndroidMobileApplicationManagementEnabled(value *bool)() { + m.androidMobileApplicationManagementEnabled = value +} +// SetIosDeviceBlockedOnMissingPartnerData sets the iosDeviceBlockedOnMissingPartnerData property value. For IOS, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) SetIosDeviceBlockedOnMissingPartnerData(value *bool)() { + m.iosDeviceBlockedOnMissingPartnerData = value +} +// SetIosEnabled sets the iosEnabled property value. For IOS, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) SetIosEnabled(value *bool)() { + m.iosEnabled = value +} +// SetIosMobileApplicationManagementEnabled sets the iosMobileApplicationManagementEnabled property value. For IOS, get or set whether data from the data sync partner should be used during Mobile Application Management (MAM) evaluations. Only one partner per platform may be enabled for Mobile Application Management (MAM) evaluation. +func (m *MobileThreatDefenseConnector) SetIosMobileApplicationManagementEnabled(value *bool)() { + m.iosMobileApplicationManagementEnabled = value +} +// SetLastHeartbeatDateTime sets the lastHeartbeatDateTime property value. DateTime of last Heartbeat recieved from the Data Sync Partner +func (m *MobileThreatDefenseConnector) SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastHeartbeatDateTime = value +} +// SetMacDeviceBlockedOnMissingPartnerData sets the macDeviceBlockedOnMissingPartnerData property value. For Mac, get or set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) SetMacDeviceBlockedOnMissingPartnerData(value *bool)() { + m.macDeviceBlockedOnMissingPartnerData = value +} +// SetMacEnabled sets the macEnabled property value. For Mac, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) SetMacEnabled(value *bool)() { + m.macEnabled = value +} +// SetMicrosoftDefenderForEndpointAttachEnabled sets the microsoftDefenderForEndpointAttachEnabled property value. When TRUE, configuration profile management via Microsoft Defender for Endpoint is enabled. When FALSE, configuration profile management via Microsoft Defender for Endpoint is disabled. +func (m *MobileThreatDefenseConnector) SetMicrosoftDefenderForEndpointAttachEnabled(value *bool)() { + m.microsoftDefenderForEndpointAttachEnabled = value +} +// SetPartnerState sets the partnerState property value. Partner state of this tenant. +func (m *MobileThreatDefenseConnector) SetPartnerState(value *MobileThreatPartnerTenantState)() { + m.partnerState = value +} +// SetPartnerUnresponsivenessThresholdInDays sets the partnerUnresponsivenessThresholdInDays property value. Get or Set days the per tenant tolerance to unresponsiveness for this partner integration +func (m *MobileThreatDefenseConnector) SetPartnerUnresponsivenessThresholdInDays(value *int32)() { + m.partnerUnresponsivenessThresholdInDays = value +} +// SetPartnerUnsupportedOsVersionBlocked sets the partnerUnsupportedOsVersionBlocked property value. Get or set whether to block devices on the enabled platforms that do not meet the minimum version requirements of the Data Sync Partner +func (m *MobileThreatDefenseConnector) SetPartnerUnsupportedOsVersionBlocked(value *bool)() { + m.partnerUnsupportedOsVersionBlocked = value +} +// SetWindowsDeviceBlockedOnMissingPartnerData sets the windowsDeviceBlockedOnMissingPartnerData property value. For Windows, set whether Intune must receive data from the data sync partner prior to marking a device compliant +func (m *MobileThreatDefenseConnector) SetWindowsDeviceBlockedOnMissingPartnerData(value *bool)() { + m.windowsDeviceBlockedOnMissingPartnerData = value +} +// SetWindowsEnabled sets the windowsEnabled property value. For Windows, get or set whether data from the data sync partner should be used during compliance evaluations +func (m *MobileThreatDefenseConnector) SetWindowsEnabled(value *bool)() { + m.windowsEnabled = value +} +// SetWindowsMobileApplicationManagementEnabled sets the windowsMobileApplicationManagementEnabled property value. When TRUE, app protection policies using the Device Threat Level rule will evaluate devices including data from this connector for Windows. When FALSE, Intune will not use device risk details sent over this connector during app protection policies calculation for policies with a Device Threat Level configured. Existing devices that are not compliant due to risk levels obtained from this connector will also become compliant. +func (m *MobileThreatDefenseConnector) SetWindowsMobileApplicationManagementEnabled(value *bool)() { + m.windowsMobileApplicationManagementEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_response.go new file mode 100644 index 000000000..3fc65903b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileThreatDefenseConnectorCollectionResponse +type MobileThreatDefenseConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobileThreatDefenseConnectorable +} +// NewMobileThreatDefenseConnectorCollectionResponse instantiates a new MobileThreatDefenseConnectorCollectionResponse and sets the default values. +func NewMobileThreatDefenseConnectorCollectionResponse()(*MobileThreatDefenseConnectorCollectionResponse) { + m := &MobileThreatDefenseConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobileThreatDefenseConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobileThreatDefenseConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobileThreatDefenseConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobileThreatDefenseConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobileThreatDefenseConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobileThreatDefenseConnectorable, len(val)) + for i, v := range val { + res[i] = v.(MobileThreatDefenseConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobileThreatDefenseConnectorCollectionResponse) GetValue()([]MobileThreatDefenseConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobileThreatDefenseConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobileThreatDefenseConnectorCollectionResponse) SetValue(value []MobileThreatDefenseConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_responseable.go new file mode 100644 index 000000000..b506a5a32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileThreatDefenseConnectorCollectionResponseable +type MobileThreatDefenseConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobileThreatDefenseConnectorable) + SetValue(value []MobileThreatDefenseConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connectorable.go b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connectorable.go new file mode 100644 index 000000000..bf1cb4ea0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_connectorable.go @@ -0,0 +1,48 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobileThreatDefenseConnectorable +type MobileThreatDefenseConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowPartnerToCollectIOSApplicationMetadata()(*bool) + GetAllowPartnerToCollectIOSPersonalApplicationMetadata()(*bool) + GetAndroidDeviceBlockedOnMissingPartnerData()(*bool) + GetAndroidEnabled()(*bool) + GetAndroidMobileApplicationManagementEnabled()(*bool) + GetIosDeviceBlockedOnMissingPartnerData()(*bool) + GetIosEnabled()(*bool) + GetIosMobileApplicationManagementEnabled()(*bool) + GetLastHeartbeatDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMacDeviceBlockedOnMissingPartnerData()(*bool) + GetMacEnabled()(*bool) + GetMicrosoftDefenderForEndpointAttachEnabled()(*bool) + GetPartnerState()(*MobileThreatPartnerTenantState) + GetPartnerUnresponsivenessThresholdInDays()(*int32) + GetPartnerUnsupportedOsVersionBlocked()(*bool) + GetWindowsDeviceBlockedOnMissingPartnerData()(*bool) + GetWindowsEnabled()(*bool) + GetWindowsMobileApplicationManagementEnabled()(*bool) + SetAllowPartnerToCollectIOSApplicationMetadata(value *bool)() + SetAllowPartnerToCollectIOSPersonalApplicationMetadata(value *bool)() + SetAndroidDeviceBlockedOnMissingPartnerData(value *bool)() + SetAndroidEnabled(value *bool)() + SetAndroidMobileApplicationManagementEnabled(value *bool)() + SetIosDeviceBlockedOnMissingPartnerData(value *bool)() + SetIosEnabled(value *bool)() + SetIosMobileApplicationManagementEnabled(value *bool)() + SetLastHeartbeatDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMacDeviceBlockedOnMissingPartnerData(value *bool)() + SetMacEnabled(value *bool)() + SetMicrosoftDefenderForEndpointAttachEnabled(value *bool)() + SetPartnerState(value *MobileThreatPartnerTenantState)() + SetPartnerUnresponsivenessThresholdInDays(value *int32)() + SetPartnerUnsupportedOsVersionBlocked(value *bool)() + SetWindowsDeviceBlockedOnMissingPartnerData(value *bool)() + SetWindowsEnabled(value *bool)() + SetWindowsMobileApplicationManagementEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobile_threat_defense_partner_priority.go b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_partner_priority.go new file mode 100644 index 000000000..1d52b0c61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_defense_partner_priority.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileThreatDefensePartnerPriority int + +const ( + // Indicates use of Microsoft Defender Endpoint over 3rd party MTD connectors + DEFENDEROVERTHIRDPARTYPARTNER_MOBILETHREATDEFENSEPARTNERPRIORITY MobileThreatDefensePartnerPriority = iota + // Indicates use of a 3rd party MTD connector over Microsoft Defender Endpoint + THIRDPARTYPARTNEROVERDEFENDER_MOBILETHREATDEFENSEPARTNERPRIORITY + // Evolvable enumeration sentinel value. Do not use. + UNKNOWNFUTUREVALUE_MOBILETHREATDEFENSEPARTNERPRIORITY +) + +func (i MobileThreatDefensePartnerPriority) String() string { + return []string{"defenderOverThirdPartyPartner", "thirdPartyPartnerOverDefender", "unknownFutureValue"}[i] +} +func ParseMobileThreatDefensePartnerPriority(v string) (interface{}, error) { + result := DEFENDEROVERTHIRDPARTYPARTNER_MOBILETHREATDEFENSEPARTNERPRIORITY + switch v { + case "defenderOverThirdPartyPartner": + result = DEFENDEROVERTHIRDPARTYPARTNER_MOBILETHREATDEFENSEPARTNERPRIORITY + case "thirdPartyPartnerOverDefender": + result = THIRDPARTYPARTNEROVERDEFENDER_MOBILETHREATDEFENSEPARTNERPRIORITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MOBILETHREATDEFENSEPARTNERPRIORITY + default: + return 0, errors.New("Unknown MobileThreatDefensePartnerPriority value: " + v) + } + return &result, nil +} +func SerializeMobileThreatDefensePartnerPriority(values []MobileThreatDefensePartnerPriority) []string { + 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/mobile_threat_partner_tenant_state.go b/src/internal/connector/graph/betasdk/models/mobile_threat_partner_tenant_state.go new file mode 100644 index 000000000..fa2787e5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobile_threat_partner_tenant_state.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MobileThreatPartnerTenantState int + +const ( + // Partner is unavailable. + UNAVAILABLE_MOBILETHREATPARTNERTENANTSTATE MobileThreatPartnerTenantState = iota + // Partner is available. + AVAILABLE_MOBILETHREATPARTNERTENANTSTATE + // Partner is enabled. + ENABLED_MOBILETHREATPARTNERTENANTSTATE + // Partner is unresponsive. + UNRESPONSIVE_MOBILETHREATPARTNERTENANTSTATE +) + +func (i MobileThreatPartnerTenantState) String() string { + return []string{"unavailable", "available", "enabled", "unresponsive"}[i] +} +func ParseMobileThreatPartnerTenantState(v string) (interface{}, error) { + result := UNAVAILABLE_MOBILETHREATPARTNERTENANTSTATE + switch v { + case "unavailable": + result = UNAVAILABLE_MOBILETHREATPARTNERTENANTSTATE + case "available": + result = AVAILABLE_MOBILETHREATPARTNERTENANTSTATE + case "enabled": + result = ENABLED_MOBILETHREATPARTNERTENANTSTATE + case "unresponsive": + result = UNRESPONSIVE_MOBILETHREATPARTNERTENANTSTATE + default: + return 0, errors.New("Unknown MobileThreatPartnerTenantState value: " + v) + } + return &result, nil +} +func SerializeMobileThreatPartnerTenantState(values []MobileThreatPartnerTenantState) []string { + 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/mobility_management_policy.go b/src/internal/connector/graph/betasdk/models/mobility_management_policy.go new file mode 100644 index 000000000..bc1b001ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobility_management_policy.go @@ -0,0 +1,251 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobilityManagementPolicy +type MobilityManagementPolicy struct { + Entity + // Indicates the user scope of the mobility management policy. Possible values are: none, all, selected. + appliesTo *PolicyScope + // Compliance URL of the mobility management application. + complianceUrl *string + // Description of the mobility management application. + description *string + // Discovery URL of the mobility management application. + discoveryUrl *string + // Display name of the mobility management application. + displayName *string + // Azure AD groups under the scope of the mobility management application if appliesTo is selected + includedGroups []Groupable + // Whether policy is valid. Invalid policies may not be updated and should be deleted. + isValid *bool + // Terms of Use URL of the mobility management application. + termsOfUseUrl *string +} +// NewMobilityManagementPolicy instantiates a new MobilityManagementPolicy and sets the default values. +func NewMobilityManagementPolicy()(*MobilityManagementPolicy) { + m := &MobilityManagementPolicy{ + Entity: *NewEntity(), + } + return m +} +// CreateMobilityManagementPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobilityManagementPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobilityManagementPolicy(), nil +} +// GetAppliesTo gets the appliesTo property value. Indicates the user scope of the mobility management policy. Possible values are: none, all, selected. +func (m *MobilityManagementPolicy) GetAppliesTo()(*PolicyScope) { + return m.appliesTo +} +// GetComplianceUrl gets the complianceUrl property value. Compliance URL of the mobility management application. +func (m *MobilityManagementPolicy) GetComplianceUrl()(*string) { + return m.complianceUrl +} +// GetDescription gets the description property value. Description of the mobility management application. +func (m *MobilityManagementPolicy) GetDescription()(*string) { + return m.description +} +// GetDiscoveryUrl gets the discoveryUrl property value. Discovery URL of the mobility management application. +func (m *MobilityManagementPolicy) GetDiscoveryUrl()(*string) { + return m.discoveryUrl +} +// GetDisplayName gets the displayName property value. Display name of the mobility management application. +func (m *MobilityManagementPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobilityManagementPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyScope) + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(val.(*PolicyScope)) + } + return nil + } + res["complianceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComplianceUrl(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discoveryUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscoveryUrl(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["includedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Groupable, len(val)) + for i, v := range val { + res[i] = v.(Groupable) + } + m.SetIncludedGroups(res) + } + return nil + } + res["isValid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValid(val) + } + return nil + } + res["termsOfUseUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTermsOfUseUrl(val) + } + return nil + } + return res +} +// GetIncludedGroups gets the includedGroups property value. Azure AD groups under the scope of the mobility management application if appliesTo is selected +func (m *MobilityManagementPolicy) GetIncludedGroups()([]Groupable) { + return m.includedGroups +} +// GetIsValid gets the isValid property value. Whether policy is valid. Invalid policies may not be updated and should be deleted. +func (m *MobilityManagementPolicy) GetIsValid()(*bool) { + return m.isValid +} +// GetTermsOfUseUrl gets the termsOfUseUrl property value. Terms of Use URL of the mobility management application. +func (m *MobilityManagementPolicy) GetTermsOfUseUrl()(*string) { + return m.termsOfUseUrl +} +// Serialize serializes information the current object +func (m *MobilityManagementPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAppliesTo() != nil { + cast := (*m.GetAppliesTo()).String() + err = writer.WriteStringValue("appliesTo", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("complianceUrl", m.GetComplianceUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("discoveryUrl", m.GetDiscoveryUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIncludedGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludedGroups())) + for i, v := range m.GetIncludedGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includedGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isValid", m.GetIsValid()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("termsOfUseUrl", m.GetTermsOfUseUrl()) + if err != nil { + return err + } + } + return nil +} +// SetAppliesTo sets the appliesTo property value. Indicates the user scope of the mobility management policy. Possible values are: none, all, selected. +func (m *MobilityManagementPolicy) SetAppliesTo(value *PolicyScope)() { + m.appliesTo = value +} +// SetComplianceUrl sets the complianceUrl property value. Compliance URL of the mobility management application. +func (m *MobilityManagementPolicy) SetComplianceUrl(value *string)() { + m.complianceUrl = value +} +// SetDescription sets the description property value. Description of the mobility management application. +func (m *MobilityManagementPolicy) SetDescription(value *string)() { + m.description = value +} +// SetDiscoveryUrl sets the discoveryUrl property value. Discovery URL of the mobility management application. +func (m *MobilityManagementPolicy) SetDiscoveryUrl(value *string)() { + m.discoveryUrl = value +} +// SetDisplayName sets the displayName property value. Display name of the mobility management application. +func (m *MobilityManagementPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIncludedGroups sets the includedGroups property value. Azure AD groups under the scope of the mobility management application if appliesTo is selected +func (m *MobilityManagementPolicy) SetIncludedGroups(value []Groupable)() { + m.includedGroups = value +} +// SetIsValid sets the isValid property value. Whether policy is valid. Invalid policies may not be updated and should be deleted. +func (m *MobilityManagementPolicy) SetIsValid(value *bool)() { + m.isValid = value +} +// SetTermsOfUseUrl sets the termsOfUseUrl property value. Terms of Use URL of the mobility management application. +func (m *MobilityManagementPolicy) SetTermsOfUseUrl(value *string)() { + m.termsOfUseUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_response.go new file mode 100644 index 000000000..8622ba3de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobilityManagementPolicyCollectionResponse +type MobilityManagementPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MobilityManagementPolicyable +} +// NewMobilityManagementPolicyCollectionResponse instantiates a new MobilityManagementPolicyCollectionResponse and sets the default values. +func NewMobilityManagementPolicyCollectionResponse()(*MobilityManagementPolicyCollectionResponse) { + m := &MobilityManagementPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMobilityManagementPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMobilityManagementPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMobilityManagementPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MobilityManagementPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMobilityManagementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MobilityManagementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(MobilityManagementPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MobilityManagementPolicyCollectionResponse) GetValue()([]MobilityManagementPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *MobilityManagementPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MobilityManagementPolicyCollectionResponse) SetValue(value []MobilityManagementPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_responseable.go new file mode 100644 index 000000000..7dd4ad151 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobility_management_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobilityManagementPolicyCollectionResponseable +type MobilityManagementPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MobilityManagementPolicyable) + SetValue(value []MobilityManagementPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mobility_management_policyable.go b/src/internal/connector/graph/betasdk/models/mobility_management_policyable.go new file mode 100644 index 000000000..d211d89cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mobility_management_policyable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MobilityManagementPolicyable +type MobilityManagementPolicyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()(*PolicyScope) + GetComplianceUrl()(*string) + GetDescription()(*string) + GetDiscoveryUrl()(*string) + GetDisplayName()(*string) + GetIncludedGroups()([]Groupable) + GetIsValid()(*bool) + GetTermsOfUseUrl()(*string) + SetAppliesTo(value *PolicyScope)() + SetComplianceUrl(value *string)() + SetDescription(value *string)() + SetDiscoveryUrl(value *string)() + SetDisplayName(value *string)() + SetIncludedGroups(value []Groupable)() + SetIsValid(value *bool)() + SetTermsOfUseUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/modality.go b/src/internal/connector/graph/betasdk/models/modality.go new file mode 100644 index 000000000..95ebadcb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/modality.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Modality int + +const ( + UNKNOWN_MODALITY Modality = iota + AUDIO_MODALITY + VIDEO_MODALITY + VIDEOBASEDSCREENSHARING_MODALITY + DATA_MODALITY + UNKNOWNFUTUREVALUE_MODALITY +) + +func (i Modality) String() string { + return []string{"unknown", "audio", "video", "videoBasedScreenSharing", "data", "unknownFutureValue"}[i] +} +func ParseModality(v string) (interface{}, error) { + result := UNKNOWN_MODALITY + switch v { + case "unknown": + result = UNKNOWN_MODALITY + case "audio": + result = AUDIO_MODALITY + case "video": + result = VIDEO_MODALITY + case "videoBasedScreenSharing": + result = VIDEOBASEDSCREENSHARING_MODALITY + case "data": + result = DATA_MODALITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MODALITY + default: + return 0, errors.New("Unknown Modality value: " + v) + } + return &result, nil +} +func SerializeModality(values []Modality) []string { + 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/modified_property.go b/src/internal/connector/graph/betasdk/models/modified_property.go new file mode 100644 index 000000000..1fa67931f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/modified_property.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ModifiedProperty +type ModifiedProperty struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of property that was modified. + displayName *string + // New property value. + newValue *string + // The OdataType property + odataType *string + // Old property value. + oldValue *string +} +// NewModifiedProperty instantiates a new modifiedProperty and sets the default values. +func NewModifiedProperty()(*ModifiedProperty) { + m := &ModifiedProperty{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateModifiedPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateModifiedPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewModifiedProperty(), 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 *ModifiedProperty) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of property that was modified. +func (m *ModifiedProperty) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ModifiedProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["newValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewValue(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["oldValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldValue(val) + } + return nil + } + return res +} +// GetNewValue gets the newValue property value. New property value. +func (m *ModifiedProperty) GetNewValue()(*string) { + return m.newValue +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ModifiedProperty) GetOdataType()(*string) { + return m.odataType +} +// GetOldValue gets the oldValue property value. Old property value. +func (m *ModifiedProperty) GetOldValue()(*string) { + return m.oldValue +} +// Serialize serializes information the current object +func (m *ModifiedProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("newValue", m.GetNewValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldValue", m.GetOldValue()) + 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 *ModifiedProperty) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of property that was modified. +func (m *ModifiedProperty) SetDisplayName(value *string)() { + m.displayName = value +} +// SetNewValue sets the newValue property value. New property value. +func (m *ModifiedProperty) SetNewValue(value *string)() { + m.newValue = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ModifiedProperty) SetOdataType(value *string)() { + m.odataType = value +} +// SetOldValue sets the oldValue property value. Old property value. +func (m *ModifiedProperty) SetOldValue(value *string)() { + m.oldValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/modified_property_collection_response.go b/src/internal/connector/graph/betasdk/models/modified_property_collection_response.go new file mode 100644 index 000000000..7b135dd47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/modified_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ModifiedPropertyCollectionResponse +type ModifiedPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ModifiedPropertyable +} +// NewModifiedPropertyCollectionResponse instantiates a new ModifiedPropertyCollectionResponse and sets the default values. +func NewModifiedPropertyCollectionResponse()(*ModifiedPropertyCollectionResponse) { + m := &ModifiedPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateModifiedPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateModifiedPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewModifiedPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ModifiedPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateModifiedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ModifiedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ModifiedPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ModifiedPropertyCollectionResponse) GetValue()([]ModifiedPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ModifiedPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ModifiedPropertyCollectionResponse) SetValue(value []ModifiedPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/modified_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/modified_property_collection_responseable.go new file mode 100644 index 000000000..332f48555 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/modified_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ModifiedPropertyCollectionResponseable +type ModifiedPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ModifiedPropertyable) + SetValue(value []ModifiedPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/modified_propertyable.go b/src/internal/connector/graph/betasdk/models/modified_propertyable.go new file mode 100644 index 000000000..56b082662 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/modified_propertyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ModifiedPropertyable +type ModifiedPropertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetNewValue()(*string) + GetOdataType()(*string) + GetOldValue()(*string) + SetDisplayName(value *string)() + SetNewValue(value *string)() + SetOdataType(value *string)() + SetOldValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/move_action.go b/src/internal/connector/graph/betasdk/models/move_action.go new file mode 100644 index 000000000..5e28c3ec0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/move_action.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MoveAction +type MoveAction 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 name of the location the item was moved from. + from *string + // The OdataType property + odataType *string + // The name of the location the item was moved to. + to *string +} +// NewMoveAction instantiates a new moveAction and sets the default values. +func NewMoveAction()(*MoveAction) { + m := &MoveAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMoveActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMoveActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMoveAction(), 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 *MoveAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MoveAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFrom(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["to"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTo(val) + } + return nil + } + return res +} +// GetFrom gets the from property value. The name of the location the item was moved from. +func (m *MoveAction) GetFrom()(*string) { + return m.from +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *MoveAction) GetOdataType()(*string) { + return m.odataType +} +// GetTo gets the to property value. The name of the location the item was moved to. +func (m *MoveAction) GetTo()(*string) { + return m.to +} +// Serialize serializes information the current object +func (m *MoveAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("to", m.GetTo()) + 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 *MoveAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFrom sets the from property value. The name of the location the item was moved from. +func (m *MoveAction) SetFrom(value *string)() { + m.from = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *MoveAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetTo sets the to property value. The name of the location the item was moved to. +func (m *MoveAction) SetTo(value *string)() { + m.to = value +} diff --git a/src/internal/connector/graph/betasdk/models/move_actionable.go b/src/internal/connector/graph/betasdk/models/move_actionable.go new file mode 100644 index 000000000..1e0293106 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/move_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MoveActionable +type MoveActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFrom()(*string) + GetOdataType()(*string) + GetTo()(*string) + SetFrom(value *string)() + SetOdataType(value *string)() + SetTo(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/multi_factor_auth_configuration.go b/src/internal/connector/graph/betasdk/models/multi_factor_auth_configuration.go new file mode 100644 index 000000000..e071a80c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/multi_factor_auth_configuration.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MultiFactorAuthConfiguration int + +const ( + NOTREQUIRED_MULTIFACTORAUTHCONFIGURATION MultiFactorAuthConfiguration = iota + REQUIRED_MULTIFACTORAUTHCONFIGURATION + UNKNOWNFUTUREVALUE_MULTIFACTORAUTHCONFIGURATION +) + +func (i MultiFactorAuthConfiguration) String() string { + return []string{"notRequired", "required", "unknownFutureValue"}[i] +} +func ParseMultiFactorAuthConfiguration(v string) (interface{}, error) { + result := NOTREQUIRED_MULTIFACTORAUTHCONFIGURATION + switch v { + case "notRequired": + result = NOTREQUIRED_MULTIFACTORAUTHCONFIGURATION + case "required": + result = REQUIRED_MULTIFACTORAUTHCONFIGURATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_MULTIFACTORAUTHCONFIGURATION + default: + return 0, errors.New("Unknown MultiFactorAuthConfiguration value: " + v) + } + return &result, nil +} +func SerializeMultiFactorAuthConfiguration(values []MultiFactorAuthConfiguration) []string { + 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/multi_value_legacy_extended_property.go b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property.go new file mode 100644 index 000000000..fadf42fc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MultiValueLegacyExtendedProperty provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type MultiValueLegacyExtendedProperty struct { + Entity + // A collection of property values. + value []string +} +// NewMultiValueLegacyExtendedProperty instantiates a new multiValueLegacyExtendedProperty and sets the default values. +func NewMultiValueLegacyExtendedProperty()(*MultiValueLegacyExtendedProperty) { + m := &MultiValueLegacyExtendedProperty{ + Entity: *NewEntity(), + } + return m +} +// CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiValueLegacyExtendedProperty(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MultiValueLegacyExtendedProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. A collection of property values. +func (m *MultiValueLegacyExtendedProperty) GetValue()([]string) { + return m.value +} +// Serialize serializes information the current object +func (m *MultiValueLegacyExtendedProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + err = writer.WriteCollectionOfStringValues("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. A collection of property values. +func (m *MultiValueLegacyExtendedProperty) SetValue(value []string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_response.go b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_response.go new file mode 100644 index 000000000..2757e2652 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MultiValueLegacyExtendedPropertyCollectionResponse +type MultiValueLegacyExtendedPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MultiValueLegacyExtendedPropertyable +} +// NewMultiValueLegacyExtendedPropertyCollectionResponse instantiates a new MultiValueLegacyExtendedPropertyCollectionResponse and sets the default values. +func NewMultiValueLegacyExtendedPropertyCollectionResponse()(*MultiValueLegacyExtendedPropertyCollectionResponse) { + m := &MultiValueLegacyExtendedPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMultiValueLegacyExtendedPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMultiValueLegacyExtendedPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMultiValueLegacyExtendedPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MultiValueLegacyExtendedPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MultiValueLegacyExtendedPropertyCollectionResponse) GetValue()([]MultiValueLegacyExtendedPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *MultiValueLegacyExtendedPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MultiValueLegacyExtendedPropertyCollectionResponse) SetValue(value []MultiValueLegacyExtendedPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_responseable.go new file mode 100644 index 000000000..0a4d1bfa4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MultiValueLegacyExtendedPropertyCollectionResponseable +type MultiValueLegacyExtendedPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MultiValueLegacyExtendedPropertyable) + SetValue(value []MultiValueLegacyExtendedPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_propertyable.go b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_propertyable.go new file mode 100644 index 000000000..8a9d71d17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/multi_value_legacy_extended_propertyable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MultiValueLegacyExtendedPropertyable +type MultiValueLegacyExtendedPropertyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]string) + SetValue(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/mutability.go b/src/internal/connector/graph/betasdk/models/mutability.go new file mode 100644 index 000000000..da62adca1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mutability.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Mutability int + +const ( + READWRITE_MUTABILITY Mutability = iota + READONLY_MUTABILITY + IMMUTABLE_MUTABILITY + WRITEONLY_MUTABILITY +) + +func (i Mutability) String() string { + return []string{"ReadWrite", "ReadOnly", "Immutable", "WriteOnly"}[i] +} +func ParseMutability(v string) (interface{}, error) { + result := READWRITE_MUTABILITY + switch v { + case "ReadWrite": + result = READWRITE_MUTABILITY + case "ReadOnly": + result = READONLY_MUTABILITY + case "Immutable": + result = IMMUTABLE_MUTABILITY + case "WriteOnly": + result = WRITEONLY_MUTABILITY + default: + return 0, errors.New("Unknown Mutability value: " + v) + } + return &result, nil +} +func SerializeMutability(values []Mutability) []string { + 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/mute_participant_operation.go b/src/internal/connector/graph/betasdk/models/mute_participant_operation.go new file mode 100644 index 000000000..ea176eede --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participant_operation.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantOperation +type MuteParticipantOperation struct { + CommsOperation +} +// NewMuteParticipantOperation instantiates a new MuteParticipantOperation and sets the default values. +func NewMuteParticipantOperation()(*MuteParticipantOperation) { + m := &MuteParticipantOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateMuteParticipantOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMuteParticipantOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMuteParticipantOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MuteParticipantOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *MuteParticipantOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_response.go new file mode 100644 index 000000000..c4e8ab604 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantOperationCollectionResponse +type MuteParticipantOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MuteParticipantOperationable +} +// NewMuteParticipantOperationCollectionResponse instantiates a new MuteParticipantOperationCollectionResponse and sets the default values. +func NewMuteParticipantOperationCollectionResponse()(*MuteParticipantOperationCollectionResponse) { + m := &MuteParticipantOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMuteParticipantOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMuteParticipantOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMuteParticipantOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MuteParticipantOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMuteParticipantOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MuteParticipantOperationable, len(val)) + for i, v := range val { + res[i] = v.(MuteParticipantOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MuteParticipantOperationCollectionResponse) GetValue()([]MuteParticipantOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MuteParticipantOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MuteParticipantOperationCollectionResponse) SetValue(value []MuteParticipantOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_responseable.go new file mode 100644 index 000000000..b2e9bfba0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participant_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantOperationCollectionResponseable +type MuteParticipantOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MuteParticipantOperationable) + SetValue(value []MuteParticipantOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participant_operationable.go b/src/internal/connector/graph/betasdk/models/mute_participant_operationable.go new file mode 100644 index 000000000..2d7450844 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participant_operationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantOperationable +type MuteParticipantOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participants_operation.go b/src/internal/connector/graph/betasdk/models/mute_participants_operation.go new file mode 100644 index 000000000..2ef299b85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participants_operation.go @@ -0,0 +1,64 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantsOperation +type MuteParticipantsOperation struct { + CommsOperation + // The participants property + participants []string +} +// NewMuteParticipantsOperation instantiates a new MuteParticipantsOperation and sets the default values. +func NewMuteParticipantsOperation()(*MuteParticipantsOperation) { + m := &MuteParticipantsOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateMuteParticipantsOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMuteParticipantsOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMuteParticipantsOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MuteParticipantsOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetParticipants(res) + } + return nil + } + return res +} +// GetParticipants gets the participants property value. The participants property +func (m *MuteParticipantsOperation) GetParticipants()([]string) { + return m.participants +} +// Serialize serializes information the current object +func (m *MuteParticipantsOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + if m.GetParticipants() != nil { + err = writer.WriteCollectionOfStringValues("participants", m.GetParticipants()) + if err != nil { + return err + } + } + return nil +} +// SetParticipants sets the participants property value. The participants property +func (m *MuteParticipantsOperation) SetParticipants(value []string)() { + m.participants = value +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_response.go new file mode 100644 index 000000000..2b352ae5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantsOperationCollectionResponse +type MuteParticipantsOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []MuteParticipantsOperationable +} +// NewMuteParticipantsOperationCollectionResponse instantiates a new MuteParticipantsOperationCollectionResponse and sets the default values. +func NewMuteParticipantsOperationCollectionResponse()(*MuteParticipantsOperationCollectionResponse) { + m := &MuteParticipantsOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateMuteParticipantsOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMuteParticipantsOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMuteParticipantsOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MuteParticipantsOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMuteParticipantsOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MuteParticipantsOperationable, len(val)) + for i, v := range val { + res[i] = v.(MuteParticipantsOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *MuteParticipantsOperationCollectionResponse) GetValue()([]MuteParticipantsOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *MuteParticipantsOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *MuteParticipantsOperationCollectionResponse) SetValue(value []MuteParticipantsOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_responseable.go new file mode 100644 index 000000000..1ee6784f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participants_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantsOperationCollectionResponseable +type MuteParticipantsOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]MuteParticipantsOperationable) + SetValue(value []MuteParticipantsOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/mute_participants_operationable.go b/src/internal/connector/graph/betasdk/models/mute_participants_operationable.go new file mode 100644 index 000000000..b1d2ad4ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/mute_participants_operationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MuteParticipantsOperationable +type MuteParticipantsOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParticipants()([]string) + SetParticipants(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/named_location.go b/src/internal/connector/graph/betasdk/models/named_location.go new file mode 100644 index 000000000..5fb88580b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/named_location.go @@ -0,0 +1,133 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NamedLocation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NamedLocation struct { + Entity + // The Timestamp type represents creation date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Human-readable name of the location. + displayName *string + // The Timestamp type represents last modified date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewNamedLocation instantiates a new namedLocation and sets the default values. +func NewNamedLocation()(*NamedLocation) { + m := &NamedLocation{ + Entity: *NewEntity(), + } + return m +} +// CreateNamedLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNamedLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.countryNamedLocation": + return NewCountryNamedLocation(), nil + case "#microsoft.graph.ipNamedLocation": + return NewIpNamedLocation(), nil + } + } + } + } + return NewNamedLocation(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents creation date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *NamedLocation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Human-readable name of the location. +func (m *NamedLocation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NamedLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + return res +} +// GetModifiedDateTime gets the modifiedDateTime property value. The Timestamp type represents last modified date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *NamedLocation) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// Serialize serializes information the current object +func (m *NamedLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents creation date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *NamedLocation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Human-readable name of the location. +func (m *NamedLocation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The Timestamp type represents last modified date and time of the location using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *NamedLocation) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/named_location_collection_response.go b/src/internal/connector/graph/betasdk/models/named_location_collection_response.go new file mode 100644 index 000000000..b6924e916 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/named_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NamedLocationCollectionResponse +type NamedLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NamedLocationable +} +// NewNamedLocationCollectionResponse instantiates a new NamedLocationCollectionResponse and sets the default values. +func NewNamedLocationCollectionResponse()(*NamedLocationCollectionResponse) { + m := &NamedLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNamedLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNamedLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNamedLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NamedLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNamedLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NamedLocationable, len(val)) + for i, v := range val { + res[i] = v.(NamedLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NamedLocationCollectionResponse) GetValue()([]NamedLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *NamedLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NamedLocationCollectionResponse) SetValue(value []NamedLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/named_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/named_location_collection_responseable.go new file mode 100644 index 000000000..17c442596 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/named_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NamedLocationCollectionResponseable +type NamedLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NamedLocationable) + SetValue(value []NamedLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/named_locationable.go b/src/internal/connector/graph/betasdk/models/named_locationable.go new file mode 100644 index 000000000..d4810a772 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/named_locationable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NamedLocationable +type NamedLocationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/ndes_connector.go b/src/internal/connector/graph/betasdk/models/ndes_connector.go new file mode 100644 index 000000000..6a474f1a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ndes_connector.go @@ -0,0 +1,222 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NdesConnector entity which represents an OnPrem Ndes connector. +type NdesConnector struct { + Entity + // The build version of the Ndes Connector. + connectorVersion *string + // The friendly name of the Ndes Connector. + displayName *string + // Timestamp when on-prem certificate connector was enrolled in Intune. + enrolledDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Last connection time for the Ndes Connector + lastConnectionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Name of the machine running on-prem certificate connector service. + machineName *string + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string + // The current status of the Ndes Connector. + state *NdesConnectorState +} +// NewNdesConnector instantiates a new ndesConnector and sets the default values. +func NewNdesConnector()(*NdesConnector) { + m := &NdesConnector{ + Entity: *NewEntity(), + } + return m +} +// CreateNdesConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNdesConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNdesConnector(), nil +} +// GetConnectorVersion gets the connectorVersion property value. The build version of the Ndes Connector. +func (m *NdesConnector) GetConnectorVersion()(*string) { + return m.connectorVersion +} +// GetDisplayName gets the displayName property value. The friendly name of the Ndes Connector. +func (m *NdesConnector) GetDisplayName()(*string) { + return m.displayName +} +// GetEnrolledDateTime gets the enrolledDateTime property value. Timestamp when on-prem certificate connector was enrolled in Intune. +func (m *NdesConnector) GetEnrolledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.enrolledDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NdesConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["connectorVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConnectorVersion(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["enrolledDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEnrolledDateTime(val) + } + return nil + } + res["lastConnectionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastConnectionDateTime(val) + } + return nil + } + res["machineName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachineName(val) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNdesConnectorState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*NdesConnectorState)) + } + return nil + } + return res +} +// GetLastConnectionDateTime gets the lastConnectionDateTime property value. Last connection time for the Ndes Connector +func (m *NdesConnector) GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastConnectionDateTime +} +// GetMachineName gets the machineName property value. Name of the machine running on-prem certificate connector service. +func (m *NdesConnector) GetMachineName()(*string) { + return m.machineName +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *NdesConnector) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// GetState gets the state property value. The current status of the Ndes Connector. +func (m *NdesConnector) GetState()(*NdesConnectorState) { + return m.state +} +// Serialize serializes information the current object +func (m *NdesConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("connectorVersion", m.GetConnectorVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("enrolledDateTime", m.GetEnrolledDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastConnectionDateTime", m.GetLastConnectionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("machineName", m.GetMachineName()) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetConnectorVersion sets the connectorVersion property value. The build version of the Ndes Connector. +func (m *NdesConnector) SetConnectorVersion(value *string)() { + m.connectorVersion = value +} +// SetDisplayName sets the displayName property value. The friendly name of the Ndes Connector. +func (m *NdesConnector) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEnrolledDateTime sets the enrolledDateTime property value. Timestamp when on-prem certificate connector was enrolled in Intune. +func (m *NdesConnector) SetEnrolledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.enrolledDateTime = value +} +// SetLastConnectionDateTime sets the lastConnectionDateTime property value. Last connection time for the Ndes Connector +func (m *NdesConnector) SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastConnectionDateTime = value +} +// SetMachineName sets the machineName property value. Name of the machine running on-prem certificate connector service. +func (m *NdesConnector) SetMachineName(value *string)() { + m.machineName = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *NdesConnector) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} +// SetState sets the state property value. The current status of the Ndes Connector. +func (m *NdesConnector) SetState(value *NdesConnectorState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/ndes_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/ndes_connector_collection_response.go new file mode 100644 index 000000000..0edf54e29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ndes_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NdesConnectorCollectionResponse +type NdesConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NdesConnectorable +} +// NewNdesConnectorCollectionResponse instantiates a new NdesConnectorCollectionResponse and sets the default values. +func NewNdesConnectorCollectionResponse()(*NdesConnectorCollectionResponse) { + m := &NdesConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNdesConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNdesConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNdesConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NdesConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNdesConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NdesConnectorable, len(val)) + for i, v := range val { + res[i] = v.(NdesConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NdesConnectorCollectionResponse) GetValue()([]NdesConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *NdesConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NdesConnectorCollectionResponse) SetValue(value []NdesConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ndes_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ndes_connector_collection_responseable.go new file mode 100644 index 000000000..749464682 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ndes_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NdesConnectorCollectionResponseable +type NdesConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NdesConnectorable) + SetValue(value []NdesConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ndes_connector_state.go b/src/internal/connector/graph/betasdk/models/ndes_connector_state.go new file mode 100644 index 000000000..ead272450 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ndes_connector_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NdesConnectorState int + +const ( + // State not available yet for this connector. + NONE_NDESCONNECTORSTATE NdesConnectorState = iota + // Ndes connector has connected recently + ACTIVE_NDESCONNECTORSTATE + // No recent activity for the Ndes connector + INACTIVE_NDESCONNECTORSTATE +) + +func (i NdesConnectorState) String() string { + return []string{"none", "active", "inactive"}[i] +} +func ParseNdesConnectorState(v string) (interface{}, error) { + result := NONE_NDESCONNECTORSTATE + switch v { + case "none": + result = NONE_NDESCONNECTORSTATE + case "active": + result = ACTIVE_NDESCONNECTORSTATE + case "inactive": + result = INACTIVE_NDESCONNECTORSTATE + default: + return 0, errors.New("Unknown NdesConnectorState value: " + v) + } + return &result, nil +} +func SerializeNdesConnectorState(values []NdesConnectorState) []string { + 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/ndes_connectorable.go b/src/internal/connector/graph/betasdk/models/ndes_connectorable.go new file mode 100644 index 000000000..de27fdef9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ndes_connectorable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NdesConnectorable +type NdesConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConnectorVersion()(*string) + GetDisplayName()(*string) + GetEnrolledDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMachineName()(*string) + GetRoleScopeTagIds()([]string) + GetState()(*NdesConnectorState) + SetConnectorVersion(value *string)() + SetDisplayName(value *string)() + SetEnrolledDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMachineName(value *string)() + SetRoleScopeTagIds(value []string)() + SetState(value *NdesConnectorState)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_connection.go b/src/internal/connector/graph/betasdk/models/network_connection.go new file mode 100644 index 000000000..c062a0164 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_connection.go @@ -0,0 +1,595 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkConnection +type NetworkConnection struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the application managing the network connection (for example, Facebook, SMTP, etc.). + applicationName *string + // Destination IP address (of the network connection). + destinationAddress *string + // Destination domain portion of the destination URL. (for example 'www.contoso.com'). + destinationDomain *string + // Location (by IP address mapping) associated with the destination of a network connection. + destinationLocation *string + // Destination port (of the network connection). + destinationPort *string + // Network connection URL/URI string - excluding parameters. (for example 'www.contoso.com/products/default.html') + destinationUrl *string + // Network connection direction. Possible values are: unknown, inbound, outbound. + direction *ConnectionDirection + // Date when the destination domain was registered. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + domainRegisteredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The local DNS name resolution as it appears in the host's local DNS cache (for example, in case the 'hosts' file was tampered with). + localDnsName *string + // Network Address Translation destination IP address. + natDestinationAddress *string + // Network Address Translation destination port. + natDestinationPort *string + // Network Address Translation source IP address. + natSourceAddress *string + // Network Address Translation source port. + natSourcePort *string + // The OdataType property + odataType *string + // Network protocol. Possible values are: unknown, ip, icmp, igmp, ggp, ipv4, tcp, pup, udp, idp, ipv6, ipv6RoutingHeader, ipv6FragmentHeader, ipSecEncapsulatingSecurityPayload, ipSecAuthenticationHeader, icmpV6, ipv6NoNextHeader, ipv6DestinationOptions, nd, raw, ipx, spx, spxII. + protocol *SecurityNetworkProtocol + // Provider generated/calculated risk score of the network connection. Recommended value range of 0-1, which equates to a percentage. + riskScore *string + // Source (i.e. origin) IP address (of the network connection). + sourceAddress *string + // Location (by IP address mapping) associated with the source of a network connection. + sourceLocation *string + // Source (i.e. origin) IP port (of the network connection). + sourcePort *string + // Network connection status. Possible values are: unknown, attempted, succeeded, blocked, failed. + status *ConnectionStatus + // Parameters (suffix) of the destination URL. + urlParameters *string +} +// NewNetworkConnection instantiates a new networkConnection and sets the default values. +func NewNetworkConnection()(*NetworkConnection) { + m := &NetworkConnection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNetworkConnectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkConnectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkConnection(), 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 *NetworkConnection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplicationName gets the applicationName property value. Name of the application managing the network connection (for example, Facebook, SMTP, etc.). +func (m *NetworkConnection) GetApplicationName()(*string) { + return m.applicationName +} +// GetDestinationAddress gets the destinationAddress property value. Destination IP address (of the network connection). +func (m *NetworkConnection) GetDestinationAddress()(*string) { + return m.destinationAddress +} +// GetDestinationDomain gets the destinationDomain property value. Destination domain portion of the destination URL. (for example 'www.contoso.com'). +func (m *NetworkConnection) GetDestinationDomain()(*string) { + return m.destinationDomain +} +// GetDestinationLocation gets the destinationLocation property value. Location (by IP address mapping) associated with the destination of a network connection. +func (m *NetworkConnection) GetDestinationLocation()(*string) { + return m.destinationLocation +} +// GetDestinationPort gets the destinationPort property value. Destination port (of the network connection). +func (m *NetworkConnection) GetDestinationPort()(*string) { + return m.destinationPort +} +// GetDestinationUrl gets the destinationUrl property value. Network connection URL/URI string - excluding parameters. (for example 'www.contoso.com/products/default.html') +func (m *NetworkConnection) GetDestinationUrl()(*string) { + return m.destinationUrl +} +// GetDirection gets the direction property value. Network connection direction. Possible values are: unknown, inbound, outbound. +func (m *NetworkConnection) GetDirection()(*ConnectionDirection) { + return m.direction +} +// GetDomainRegisteredDateTime gets the domainRegisteredDateTime property value. Date when the destination domain was registered. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *NetworkConnection) GetDomainRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.domainRegisteredDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkConnection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["applicationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationName(val) + } + return nil + } + res["destinationAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationAddress(val) + } + return nil + } + res["destinationDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationDomain(val) + } + return nil + } + res["destinationLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationLocation(val) + } + return nil + } + res["destinationPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationPort(val) + } + return nil + } + res["destinationUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDestinationUrl(val) + } + return nil + } + res["direction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionDirection) + if err != nil { + return err + } + if val != nil { + m.SetDirection(val.(*ConnectionDirection)) + } + return nil + } + res["domainRegisteredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainRegisteredDateTime(val) + } + return nil + } + res["localDnsName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocalDnsName(val) + } + return nil + } + res["natDestinationAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNatDestinationAddress(val) + } + return nil + } + res["natDestinationPort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNatDestinationPort(val) + } + return nil + } + res["natSourceAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNatSourceAddress(val) + } + return nil + } + res["natSourcePort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNatSourcePort(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["protocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityNetworkProtocol) + if err != nil { + return err + } + if val != nil { + m.SetProtocol(val.(*SecurityNetworkProtocol)) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val) + } + return nil + } + res["sourceAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceAddress(val) + } + return nil + } + res["sourceLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceLocation(val) + } + return nil + } + res["sourcePort"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourcePort(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseConnectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ConnectionStatus)) + } + return nil + } + res["urlParameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrlParameters(val) + } + return nil + } + return res +} +// GetLocalDnsName gets the localDnsName property value. The local DNS name resolution as it appears in the host's local DNS cache (for example, in case the 'hosts' file was tampered with). +func (m *NetworkConnection) GetLocalDnsName()(*string) { + return m.localDnsName +} +// GetNatDestinationAddress gets the natDestinationAddress property value. Network Address Translation destination IP address. +func (m *NetworkConnection) GetNatDestinationAddress()(*string) { + return m.natDestinationAddress +} +// GetNatDestinationPort gets the natDestinationPort property value. Network Address Translation destination port. +func (m *NetworkConnection) GetNatDestinationPort()(*string) { + return m.natDestinationPort +} +// GetNatSourceAddress gets the natSourceAddress property value. Network Address Translation source IP address. +func (m *NetworkConnection) GetNatSourceAddress()(*string) { + return m.natSourceAddress +} +// GetNatSourcePort gets the natSourcePort property value. Network Address Translation source port. +func (m *NetworkConnection) GetNatSourcePort()(*string) { + return m.natSourcePort +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NetworkConnection) GetOdataType()(*string) { + return m.odataType +} +// GetProtocol gets the protocol property value. Network protocol. Possible values are: unknown, ip, icmp, igmp, ggp, ipv4, tcp, pup, udp, idp, ipv6, ipv6RoutingHeader, ipv6FragmentHeader, ipSecEncapsulatingSecurityPayload, ipSecAuthenticationHeader, icmpV6, ipv6NoNextHeader, ipv6DestinationOptions, nd, raw, ipx, spx, spxII. +func (m *NetworkConnection) GetProtocol()(*SecurityNetworkProtocol) { + return m.protocol +} +// GetRiskScore gets the riskScore property value. Provider generated/calculated risk score of the network connection. Recommended value range of 0-1, which equates to a percentage. +func (m *NetworkConnection) GetRiskScore()(*string) { + return m.riskScore +} +// GetSourceAddress gets the sourceAddress property value. Source (i.e. origin) IP address (of the network connection). +func (m *NetworkConnection) GetSourceAddress()(*string) { + return m.sourceAddress +} +// GetSourceLocation gets the sourceLocation property value. Location (by IP address mapping) associated with the source of a network connection. +func (m *NetworkConnection) GetSourceLocation()(*string) { + return m.sourceLocation +} +// GetSourcePort gets the sourcePort property value. Source (i.e. origin) IP port (of the network connection). +func (m *NetworkConnection) GetSourcePort()(*string) { + return m.sourcePort +} +// GetStatus gets the status property value. Network connection status. Possible values are: unknown, attempted, succeeded, blocked, failed. +func (m *NetworkConnection) GetStatus()(*ConnectionStatus) { + return m.status +} +// GetUrlParameters gets the urlParameters property value. Parameters (suffix) of the destination URL. +func (m *NetworkConnection) GetUrlParameters()(*string) { + return m.urlParameters +} +// Serialize serializes information the current object +func (m *NetworkConnection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("applicationName", m.GetApplicationName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationAddress", m.GetDestinationAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationDomain", m.GetDestinationDomain()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationLocation", m.GetDestinationLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationPort", m.GetDestinationPort()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("destinationUrl", m.GetDestinationUrl()) + if err != nil { + return err + } + } + if m.GetDirection() != nil { + cast := (*m.GetDirection()).String() + err := writer.WriteStringValue("direction", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("domainRegisteredDateTime", m.GetDomainRegisteredDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("localDnsName", m.GetLocalDnsName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("natDestinationAddress", m.GetNatDestinationAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("natDestinationPort", m.GetNatDestinationPort()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("natSourceAddress", m.GetNatSourceAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("natSourcePort", m.GetNatSourcePort()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProtocol() != nil { + cast := (*m.GetProtocol()).String() + err := writer.WriteStringValue("protocol", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("riskScore", m.GetRiskScore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceAddress", m.GetSourceAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceLocation", m.GetSourceLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourcePort", m.GetSourcePort()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("urlParameters", m.GetUrlParameters()) + 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 *NetworkConnection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplicationName sets the applicationName property value. Name of the application managing the network connection (for example, Facebook, SMTP, etc.). +func (m *NetworkConnection) SetApplicationName(value *string)() { + m.applicationName = value +} +// SetDestinationAddress sets the destinationAddress property value. Destination IP address (of the network connection). +func (m *NetworkConnection) SetDestinationAddress(value *string)() { + m.destinationAddress = value +} +// SetDestinationDomain sets the destinationDomain property value. Destination domain portion of the destination URL. (for example 'www.contoso.com'). +func (m *NetworkConnection) SetDestinationDomain(value *string)() { + m.destinationDomain = value +} +// SetDestinationLocation sets the destinationLocation property value. Location (by IP address mapping) associated with the destination of a network connection. +func (m *NetworkConnection) SetDestinationLocation(value *string)() { + m.destinationLocation = value +} +// SetDestinationPort sets the destinationPort property value. Destination port (of the network connection). +func (m *NetworkConnection) SetDestinationPort(value *string)() { + m.destinationPort = value +} +// SetDestinationUrl sets the destinationUrl property value. Network connection URL/URI string - excluding parameters. (for example 'www.contoso.com/products/default.html') +func (m *NetworkConnection) SetDestinationUrl(value *string)() { + m.destinationUrl = value +} +// SetDirection sets the direction property value. Network connection direction. Possible values are: unknown, inbound, outbound. +func (m *NetworkConnection) SetDirection(value *ConnectionDirection)() { + m.direction = value +} +// SetDomainRegisteredDateTime sets the domainRegisteredDateTime property value. Date when the destination domain was registered. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *NetworkConnection) SetDomainRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.domainRegisteredDateTime = value +} +// SetLocalDnsName sets the localDnsName property value. The local DNS name resolution as it appears in the host's local DNS cache (for example, in case the 'hosts' file was tampered with). +func (m *NetworkConnection) SetLocalDnsName(value *string)() { + m.localDnsName = value +} +// SetNatDestinationAddress sets the natDestinationAddress property value. Network Address Translation destination IP address. +func (m *NetworkConnection) SetNatDestinationAddress(value *string)() { + m.natDestinationAddress = value +} +// SetNatDestinationPort sets the natDestinationPort property value. Network Address Translation destination port. +func (m *NetworkConnection) SetNatDestinationPort(value *string)() { + m.natDestinationPort = value +} +// SetNatSourceAddress sets the natSourceAddress property value. Network Address Translation source IP address. +func (m *NetworkConnection) SetNatSourceAddress(value *string)() { + m.natSourceAddress = value +} +// SetNatSourcePort sets the natSourcePort property value. Network Address Translation source port. +func (m *NetworkConnection) SetNatSourcePort(value *string)() { + m.natSourcePort = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NetworkConnection) SetOdataType(value *string)() { + m.odataType = value +} +// SetProtocol sets the protocol property value. Network protocol. Possible values are: unknown, ip, icmp, igmp, ggp, ipv4, tcp, pup, udp, idp, ipv6, ipv6RoutingHeader, ipv6FragmentHeader, ipSecEncapsulatingSecurityPayload, ipSecAuthenticationHeader, icmpV6, ipv6NoNextHeader, ipv6DestinationOptions, nd, raw, ipx, spx, spxII. +func (m *NetworkConnection) SetProtocol(value *SecurityNetworkProtocol)() { + m.protocol = value +} +// SetRiskScore sets the riskScore property value. Provider generated/calculated risk score of the network connection. Recommended value range of 0-1, which equates to a percentage. +func (m *NetworkConnection) SetRiskScore(value *string)() { + m.riskScore = value +} +// SetSourceAddress sets the sourceAddress property value. Source (i.e. origin) IP address (of the network connection). +func (m *NetworkConnection) SetSourceAddress(value *string)() { + m.sourceAddress = value +} +// SetSourceLocation sets the sourceLocation property value. Location (by IP address mapping) associated with the source of a network connection. +func (m *NetworkConnection) SetSourceLocation(value *string)() { + m.sourceLocation = value +} +// SetSourcePort sets the sourcePort property value. Source (i.e. origin) IP port (of the network connection). +func (m *NetworkConnection) SetSourcePort(value *string)() { + m.sourcePort = value +} +// SetStatus sets the status property value. Network connection status. Possible values are: unknown, attempted, succeeded, blocked, failed. +func (m *NetworkConnection) SetStatus(value *ConnectionStatus)() { + m.status = value +} +// SetUrlParameters sets the urlParameters property value. Parameters (suffix) of the destination URL. +func (m *NetworkConnection) SetUrlParameters(value *string)() { + m.urlParameters = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_connection_collection_response.go b/src/internal/connector/graph/betasdk/models/network_connection_collection_response.go new file mode 100644 index 000000000..2065d12c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_connection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkConnectionCollectionResponse +type NetworkConnectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NetworkConnectionable +} +// NewNetworkConnectionCollectionResponse instantiates a new NetworkConnectionCollectionResponse and sets the default values. +func NewNetworkConnectionCollectionResponse()(*NetworkConnectionCollectionResponse) { + m := &NetworkConnectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNetworkConnectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkConnectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkConnectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkConnectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNetworkConnectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NetworkConnectionable, len(val)) + for i, v := range val { + res[i] = v.(NetworkConnectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NetworkConnectionCollectionResponse) GetValue()([]NetworkConnectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *NetworkConnectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NetworkConnectionCollectionResponse) SetValue(value []NetworkConnectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_connection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/network_connection_collection_responseable.go new file mode 100644 index 000000000..3810b9913 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_connection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkConnectionCollectionResponseable +type NetworkConnectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NetworkConnectionable) + SetValue(value []NetworkConnectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_connectionable.go b/src/internal/connector/graph/betasdk/models/network_connectionable.go new file mode 100644 index 000000000..33c3b9684 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_connectionable.go @@ -0,0 +1,54 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkConnectionable +type NetworkConnectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationName()(*string) + GetDestinationAddress()(*string) + GetDestinationDomain()(*string) + GetDestinationLocation()(*string) + GetDestinationPort()(*string) + GetDestinationUrl()(*string) + GetDirection()(*ConnectionDirection) + GetDomainRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocalDnsName()(*string) + GetNatDestinationAddress()(*string) + GetNatDestinationPort()(*string) + GetNatSourceAddress()(*string) + GetNatSourcePort()(*string) + GetOdataType()(*string) + GetProtocol()(*SecurityNetworkProtocol) + GetRiskScore()(*string) + GetSourceAddress()(*string) + GetSourceLocation()(*string) + GetSourcePort()(*string) + GetStatus()(*ConnectionStatus) + GetUrlParameters()(*string) + SetApplicationName(value *string)() + SetDestinationAddress(value *string)() + SetDestinationDomain(value *string)() + SetDestinationLocation(value *string)() + SetDestinationPort(value *string)() + SetDestinationUrl(value *string)() + SetDirection(value *ConnectionDirection)() + SetDomainRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocalDnsName(value *string)() + SetNatDestinationAddress(value *string)() + SetNatDestinationPort(value *string)() + SetNatSourceAddress(value *string)() + SetNatSourcePort(value *string)() + SetOdataType(value *string)() + SetProtocol(value *SecurityNetworkProtocol)() + SetRiskScore(value *string)() + SetSourceAddress(value *string)() + SetSourceLocation(value *string)() + SetSourcePort(value *string)() + SetStatus(value *ConnectionStatus)() + SetUrlParameters(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_interface.go b/src/internal/connector/graph/betasdk/models/network_interface.go new file mode 100644 index 000000000..095c65c4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_interface.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInterface +type NetworkInterface struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Description of the NIC (e.g. Ethernet adapter, Wireless LAN adapter Local Area Connection, and so on). + description *string + // Last IPv4 address associated with this NIC. + ipV4Address *string + // Last Public (aka global) IPv6 address associated with this NIC. + ipV6Address *string + // Last local (link-local or site-local) IPv6 address associated with this NIC. + localIpV6Address *string + // MAC address of the NIC on this host. + macAddress *string + // The OdataType property + odataType *string +} +// NewNetworkInterface instantiates a new networkInterface and sets the default values. +func NewNetworkInterface()(*NetworkInterface) { + m := &NetworkInterface{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNetworkInterfaceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkInterfaceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkInterface(), 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 *NetworkInterface) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Description of the NIC (e.g. Ethernet adapter, Wireless LAN adapter Local Area Connection, and so on). +func (m *NetworkInterface) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkInterface) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["ipV4Address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpV4Address(val) + } + return nil + } + res["ipV6Address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpV6Address(val) + } + return nil + } + res["localIpV6Address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocalIpV6Address(val) + } + return nil + } + res["macAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMacAddress(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 + } + return res +} +// GetIpV4Address gets the ipV4Address property value. Last IPv4 address associated with this NIC. +func (m *NetworkInterface) GetIpV4Address()(*string) { + return m.ipV4Address +} +// GetIpV6Address gets the ipV6Address property value. Last Public (aka global) IPv6 address associated with this NIC. +func (m *NetworkInterface) GetIpV6Address()(*string) { + return m.ipV6Address +} +// GetLocalIpV6Address gets the localIpV6Address property value. Last local (link-local or site-local) IPv6 address associated with this NIC. +func (m *NetworkInterface) GetLocalIpV6Address()(*string) { + return m.localIpV6Address +} +// GetMacAddress gets the macAddress property value. MAC address of the NIC on this host. +func (m *NetworkInterface) GetMacAddress()(*string) { + return m.macAddress +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NetworkInterface) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *NetworkInterface) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipV4Address", m.GetIpV4Address()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("ipV6Address", m.GetIpV6Address()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("localIpV6Address", m.GetLocalIpV6Address()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("macAddress", m.GetMacAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *NetworkInterface) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Description of the NIC (e.g. Ethernet adapter, Wireless LAN adapter Local Area Connection, and so on). +func (m *NetworkInterface) SetDescription(value *string)() { + m.description = value +} +// SetIpV4Address sets the ipV4Address property value. Last IPv4 address associated with this NIC. +func (m *NetworkInterface) SetIpV4Address(value *string)() { + m.ipV4Address = value +} +// SetIpV6Address sets the ipV6Address property value. Last Public (aka global) IPv6 address associated with this NIC. +func (m *NetworkInterface) SetIpV6Address(value *string)() { + m.ipV6Address = value +} +// SetLocalIpV6Address sets the localIpV6Address property value. Last local (link-local or site-local) IPv6 address associated with this NIC. +func (m *NetworkInterface) SetLocalIpV6Address(value *string)() { + m.localIpV6Address = value +} +// SetMacAddress sets the macAddress property value. MAC address of the NIC on this host. +func (m *NetworkInterface) SetMacAddress(value *string)() { + m.macAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NetworkInterface) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_interface_collection_response.go b/src/internal/connector/graph/betasdk/models/network_interface_collection_response.go new file mode 100644 index 000000000..772c60fb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_interface_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInterfaceCollectionResponse +type NetworkInterfaceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NetworkInterfaceable +} +// NewNetworkInterfaceCollectionResponse instantiates a new NetworkInterfaceCollectionResponse and sets the default values. +func NewNetworkInterfaceCollectionResponse()(*NetworkInterfaceCollectionResponse) { + m := &NetworkInterfaceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNetworkInterfaceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkInterfaceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkInterfaceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkInterfaceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNetworkInterfaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NetworkInterfaceable, len(val)) + for i, v := range val { + res[i] = v.(NetworkInterfaceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NetworkInterfaceCollectionResponse) GetValue()([]NetworkInterfaceable) { + return m.value +} +// Serialize serializes information the current object +func (m *NetworkInterfaceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NetworkInterfaceCollectionResponse) SetValue(value []NetworkInterfaceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_interface_collection_responseable.go b/src/internal/connector/graph/betasdk/models/network_interface_collection_responseable.go new file mode 100644 index 000000000..9b12f192b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_interface_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInterfaceCollectionResponseable +type NetworkInterfaceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NetworkInterfaceable) + SetValue(value []NetworkInterfaceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_interfaceable.go b/src/internal/connector/graph/betasdk/models/network_interfaceable.go new file mode 100644 index 000000000..e653c5e8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_interfaceable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkInterfaceable +type NetworkInterfaceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetIpV4Address()(*string) + GetIpV6Address()(*string) + GetLocalIpV6Address()(*string) + GetMacAddress()(*string) + GetOdataType()(*string) + SetDescription(value *string)() + SetIpV4Address(value *string)() + SetIpV6Address(value *string)() + SetLocalIpV6Address(value *string)() + SetMacAddress(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_location_detail.go b/src/internal/connector/graph/betasdk/models/network_location_detail.go new file mode 100644 index 000000000..49dca5172 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_location_detail.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkLocationDetail +type NetworkLocationDetail struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Provides the name of the network used when signing in. + networkNames []string + // Provides the type of network used when signing in. Possible values are: intranet, extranet, namedNetwork, trusted, unknownFutureValue. + networkType *NetworkType + // The OdataType property + odataType *string +} +// NewNetworkLocationDetail instantiates a new networkLocationDetail and sets the default values. +func NewNetworkLocationDetail()(*NetworkLocationDetail) { + m := &NetworkLocationDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNetworkLocationDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkLocationDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkLocationDetail(), 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 *NetworkLocationDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkLocationDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["networkNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNetworkNames(res) + } + return nil + } + res["networkType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNetworkType) + if err != nil { + return err + } + if val != nil { + m.SetNetworkType(val.(*NetworkType)) + } + 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 + } + return res +} +// GetNetworkNames gets the networkNames property value. Provides the name of the network used when signing in. +func (m *NetworkLocationDetail) GetNetworkNames()([]string) { + return m.networkNames +} +// GetNetworkType gets the networkType property value. Provides the type of network used when signing in. Possible values are: intranet, extranet, namedNetwork, trusted, unknownFutureValue. +func (m *NetworkLocationDetail) GetNetworkType()(*NetworkType) { + return m.networkType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NetworkLocationDetail) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *NetworkLocationDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetNetworkNames() != nil { + err := writer.WriteCollectionOfStringValues("networkNames", m.GetNetworkNames()) + if err != nil { + return err + } + } + if m.GetNetworkType() != nil { + cast := (*m.GetNetworkType()).String() + err := writer.WriteStringValue("networkType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *NetworkLocationDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNetworkNames sets the networkNames property value. Provides the name of the network used when signing in. +func (m *NetworkLocationDetail) SetNetworkNames(value []string)() { + m.networkNames = value +} +// SetNetworkType sets the networkType property value. Provides the type of network used when signing in. Possible values are: intranet, extranet, namedNetwork, trusted, unknownFutureValue. +func (m *NetworkLocationDetail) SetNetworkType(value *NetworkType)() { + m.networkType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NetworkLocationDetail) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_location_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/network_location_detail_collection_response.go new file mode 100644 index 000000000..086aa84ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_location_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkLocationDetailCollectionResponse +type NetworkLocationDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NetworkLocationDetailable +} +// NewNetworkLocationDetailCollectionResponse instantiates a new NetworkLocationDetailCollectionResponse and sets the default values. +func NewNetworkLocationDetailCollectionResponse()(*NetworkLocationDetailCollectionResponse) { + m := &NetworkLocationDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNetworkLocationDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNetworkLocationDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNetworkLocationDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NetworkLocationDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNetworkLocationDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NetworkLocationDetailable, len(val)) + for i, v := range val { + res[i] = v.(NetworkLocationDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NetworkLocationDetailCollectionResponse) GetValue()([]NetworkLocationDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *NetworkLocationDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NetworkLocationDetailCollectionResponse) SetValue(value []NetworkLocationDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/network_location_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/network_location_detail_collection_responseable.go new file mode 100644 index 000000000..dc5ca890d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_location_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkLocationDetailCollectionResponseable +type NetworkLocationDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NetworkLocationDetailable) + SetValue(value []NetworkLocationDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_location_detailable.go b/src/internal/connector/graph/betasdk/models/network_location_detailable.go new file mode 100644 index 000000000..6f8196fbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_location_detailable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NetworkLocationDetailable +type NetworkLocationDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNetworkNames()([]string) + GetNetworkType()(*NetworkType) + GetOdataType()(*string) + SetNetworkNames(value []string)() + SetNetworkType(value *NetworkType)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/network_single_sign_on_type.go b/src/internal/connector/graph/betasdk/models/network_single_sign_on_type.go new file mode 100644 index 000000000..4caa031c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_single_sign_on_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NetworkSingleSignOnType int + +const ( + // Disabled + DISABLED_NETWORKSINGLESIGNONTYPE NetworkSingleSignOnType = iota + // Pre-Logon + PRELOGON_NETWORKSINGLESIGNONTYPE + // Post-Logon + POSTLOGON_NETWORKSINGLESIGNONTYPE +) + +func (i NetworkSingleSignOnType) String() string { + return []string{"disabled", "prelogon", "postlogon"}[i] +} +func ParseNetworkSingleSignOnType(v string) (interface{}, error) { + result := DISABLED_NETWORKSINGLESIGNONTYPE + switch v { + case "disabled": + result = DISABLED_NETWORKSINGLESIGNONTYPE + case "prelogon": + result = PRELOGON_NETWORKSINGLESIGNONTYPE + case "postlogon": + result = POSTLOGON_NETWORKSINGLESIGNONTYPE + default: + return 0, errors.New("Unknown NetworkSingleSignOnType value: " + v) + } + return &result, nil +} +func SerializeNetworkSingleSignOnType(values []NetworkSingleSignOnType) []string { + 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/network_type.go b/src/internal/connector/graph/betasdk/models/network_type.go new file mode 100644 index 000000000..51ca42687 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/network_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NetworkType int + +const ( + INTRANET_NETWORKTYPE NetworkType = iota + EXTRANET_NETWORKTYPE + NAMEDNETWORK_NETWORKTYPE + TRUSTED_NETWORKTYPE + TRUSTEDNAMEDLOCATION_NETWORKTYPE + UNKNOWNFUTUREVALUE_NETWORKTYPE +) + +func (i NetworkType) String() string { + return []string{"intranet", "extranet", "namedNetwork", "trusted", "trustedNamedLocation", "unknownFutureValue"}[i] +} +func ParseNetworkType(v string) (interface{}, error) { + result := INTRANET_NETWORKTYPE + switch v { + case "intranet": + result = INTRANET_NETWORKTYPE + case "extranet": + result = EXTRANET_NETWORKTYPE + case "namedNetwork": + result = NAMEDNETWORK_NETWORKTYPE + case "trusted": + result = TRUSTED_NETWORKTYPE + case "trustedNamedLocation": + result = TRUSTEDNAMEDLOCATION_NETWORKTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_NETWORKTYPE + default: + return 0, errors.New("Unknown NetworkType value: " + v) + } + return &result, nil +} +func SerializeNetworkType(values []NetworkType) []string { + 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/non_eap_authentication_method_for_eap_ttls_type.go b/src/internal/connector/graph/betasdk/models/non_eap_authentication_method_for_eap_ttls_type.go new file mode 100644 index 000000000..5182e4bd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/non_eap_authentication_method_for_eap_ttls_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NonEapAuthenticationMethodForEapTtlsType int + +const ( + // Unencrypted password (PAP). + UNENCRYPTEDPASSWORD_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE NonEapAuthenticationMethodForEapTtlsType = iota + // Challenge Handshake Authentication Protocol (CHAP). + CHALLENGEHANDSHAKEAUTHENTICATIONPROTOCOL_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + // Microsoft CHAP (MS-CHAP). + MICROSOFTCHAP_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + // Microsoft CHAP Version 2 (MS-CHAP v2). + MICROSOFTCHAPVERSIONTWO_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE +) + +func (i NonEapAuthenticationMethodForEapTtlsType) String() string { + return []string{"unencryptedPassword", "challengeHandshakeAuthenticationProtocol", "microsoftChap", "microsoftChapVersionTwo"}[i] +} +func ParseNonEapAuthenticationMethodForEapTtlsType(v string) (interface{}, error) { + result := UNENCRYPTEDPASSWORD_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + switch v { + case "unencryptedPassword": + result = UNENCRYPTEDPASSWORD_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + case "challengeHandshakeAuthenticationProtocol": + result = CHALLENGEHANDSHAKEAUTHENTICATIONPROTOCOL_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + case "microsoftChap": + result = MICROSOFTCHAP_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + case "microsoftChapVersionTwo": + result = MICROSOFTCHAPVERSIONTWO_NONEAPAUTHENTICATIONMETHODFOREAPTTLSTYPE + default: + return 0, errors.New("Unknown NonEapAuthenticationMethodForEapTtlsType value: " + v) + } + return &result, nil +} +func SerializeNonEapAuthenticationMethodForEapTtlsType(values []NonEapAuthenticationMethodForEapTtlsType) []string { + 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/non_eap_authentication_method_for_peap.go b/src/internal/connector/graph/betasdk/models/non_eap_authentication_method_for_peap.go new file mode 100644 index 000000000..dcb882669 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/non_eap_authentication_method_for_peap.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NonEapAuthenticationMethodForPeap int + +const ( + // None. + NONE_NONEAPAUTHENTICATIONMETHODFORPEAP NonEapAuthenticationMethodForPeap = iota + // Microsoft CHAP Version 2 (MS-CHAP v2). + MICROSOFTCHAPVERSIONTWO_NONEAPAUTHENTICATIONMETHODFORPEAP +) + +func (i NonEapAuthenticationMethodForPeap) String() string { + return []string{"none", "microsoftChapVersionTwo"}[i] +} +func ParseNonEapAuthenticationMethodForPeap(v string) (interface{}, error) { + result := NONE_NONEAPAUTHENTICATIONMETHODFORPEAP + switch v { + case "none": + result = NONE_NONEAPAUTHENTICATIONMETHODFORPEAP + case "microsoftChapVersionTwo": + result = MICROSOFTCHAPVERSIONTWO_NONEAPAUTHENTICATIONMETHODFORPEAP + default: + return 0, errors.New("Unknown NonEapAuthenticationMethodForPeap value: " + v) + } + return &result, nil +} +func SerializeNonEapAuthenticationMethodForPeap(values []NonEapAuthenticationMethodForPeap) []string { + 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/note.go b/src/internal/connector/graph/betasdk/models/note.go new file mode 100644 index 000000000..78635fd49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/note.go @@ -0,0 +1,276 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Note +type Note struct { + OutlookItem + // The attachments property + attachments []Attachmentable + // The body property + body ItemBodyable + // The extensions property + extensions []Extensionable + // The hasAttachments property + hasAttachments *bool + // The isDeleted property + isDeleted *bool + // The multiValueExtendedProperties property + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The singleValueExtendedProperties property + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The subject property + subject *string +} +// NewNote instantiates a new Note and sets the default values. +func NewNote()(*Note) { + m := &Note{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.note"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateNoteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNoteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNote(), nil +} +// GetAttachments gets the attachments property value. The attachments property +func (m *Note) GetAttachments()([]Attachmentable) { + return m.attachments +} +// GetBody gets the body property value. The body property +func (m *Note) GetBody()(ItemBodyable) { + return m.body +} +// GetExtensions gets the extensions property value. The extensions property +func (m *Note) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Note) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. The hasAttachments property +func (m *Note) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetIsDeleted gets the isDeleted property value. The isDeleted property +func (m *Note) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The multiValueExtendedProperties property +func (m *Note) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The singleValueExtendedProperties property +func (m *Note) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetSubject gets the subject property value. The subject property +func (m *Note) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *Note) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetAttachments sets the attachments property value. The attachments property +func (m *Note) SetAttachments(value []Attachmentable)() { + m.attachments = value +} +// SetBody sets the body property value. The body property +func (m *Note) SetBody(value ItemBodyable)() { + m.body = value +} +// SetExtensions sets the extensions property value. The extensions property +func (m *Note) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetHasAttachments sets the hasAttachments property value. The hasAttachments property +func (m *Note) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetIsDeleted sets the isDeleted property value. The isDeleted property +func (m *Note) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The multiValueExtendedProperties property +func (m *Note) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The singleValueExtendedProperties property +func (m *Note) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetSubject sets the subject property value. The subject property +func (m *Note) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/noteable.go b/src/internal/connector/graph/betasdk/models/noteable.go new file mode 100644 index 000000000..48b060f49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/noteable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Noteable +type Noteable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttachments()([]Attachmentable) + GetBody()(ItemBodyable) + GetExtensions()([]Extensionable) + GetHasAttachments()(*bool) + GetIsDeleted()(*bool) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetSubject()(*string) + SetAttachments(value []Attachmentable)() + SetBody(value ItemBodyable)() + SetExtensions(value []Extensionable)() + SetHasAttachments(value *bool)() + SetIsDeleted(value *bool)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/notebook.go b/src/internal/connector/graph/betasdk/models/notebook.go new file mode 100644 index 000000000..5e36911c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebook.go @@ -0,0 +1,261 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Notebook +type Notebook struct { + OnenoteEntityHierarchyModel + // Indicates whether this is the user's default notebook. Read-only. + isDefault *bool + // Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only. + isShared *bool + // Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote native client if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. + links NotebookLinksable + // The section groups in the notebook. Read-only. Nullable. + sectionGroups []SectionGroupable + // The URL for the sectionGroups navigation property, which returns all the section groups in the notebook. Read-only. + sectionGroupsUrl *string + // The sections in the notebook. Read-only. Nullable. + sections []OnenoteSectionable + // The URL for the sections navigation property, which returns all the sections in the notebook. Read-only. + sectionsUrl *string + // Possible values are: Owner, Contributor, Reader, None. Owner represents owner-level access to the notebook. Contributor represents read/write access to the notebook. Reader represents read-only access to the notebook. Read-only. + userRole *OnenoteUserRole +} +// NewNotebook instantiates a new Notebook and sets the default values. +func NewNotebook()(*Notebook) { + m := &Notebook{ + OnenoteEntityHierarchyModel: *NewOnenoteEntityHierarchyModel(), + } + odataTypeValue := "#microsoft.graph.notebook"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateNotebookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotebookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotebook(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Notebook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntityHierarchyModel.GetFieldDeserializers() + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isShared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsShared(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNotebookLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(NotebookLinksable)) + } + return nil + } + res["sectionGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SectionGroupable, len(val)) + for i, v := range val { + res[i] = v.(SectionGroupable) + } + m.SetSectionGroups(res) + } + return nil + } + res["sectionGroupsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionGroupsUrl(val) + } + return nil + } + res["sections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteSectionable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteSectionable) + } + m.SetSections(res) + } + return nil + } + res["sectionsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionsUrl(val) + } + return nil + } + res["userRole"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnenoteUserRole) + if err != nil { + return err + } + if val != nil { + m.SetUserRole(val.(*OnenoteUserRole)) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates whether this is the user's default notebook. Read-only. +func (m *Notebook) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsShared gets the isShared property value. Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only. +func (m *Notebook) GetIsShared()(*bool) { + return m.isShared +} +// GetLinks gets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote native client if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. +func (m *Notebook) GetLinks()(NotebookLinksable) { + return m.links +} +// GetSectionGroups gets the sectionGroups property value. The section groups in the notebook. Read-only. Nullable. +func (m *Notebook) GetSectionGroups()([]SectionGroupable) { + return m.sectionGroups +} +// GetSectionGroupsUrl gets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the notebook. Read-only. +func (m *Notebook) GetSectionGroupsUrl()(*string) { + return m.sectionGroupsUrl +} +// GetSections gets the sections property value. The sections in the notebook. Read-only. Nullable. +func (m *Notebook) GetSections()([]OnenoteSectionable) { + return m.sections +} +// GetSectionsUrl gets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the notebook. Read-only. +func (m *Notebook) GetSectionsUrl()(*string) { + return m.sectionsUrl +} +// GetUserRole gets the userRole property value. Possible values are: Owner, Contributor, Reader, None. Owner represents owner-level access to the notebook. Contributor represents read/write access to the notebook. Reader represents read-only access to the notebook. Read-only. +func (m *Notebook) GetUserRole()(*OnenoteUserRole) { + return m.userRole +} +// Serialize serializes information the current object +func (m *Notebook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntityHierarchyModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isShared", m.GetIsShared()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + if m.GetSectionGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSectionGroups())) + for i, v := range m.GetSectionGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sectionGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sectionGroupsUrl", m.GetSectionGroupsUrl()) + if err != nil { + return err + } + } + if m.GetSections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSections())) + for i, v := range m.GetSections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sectionsUrl", m.GetSectionsUrl()) + if err != nil { + return err + } + } + if m.GetUserRole() != nil { + cast := (*m.GetUserRole()).String() + err = writer.WriteStringValue("userRole", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIsDefault sets the isDefault property value. Indicates whether this is the user's default notebook. Read-only. +func (m *Notebook) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsShared sets the isShared property value. Indicates whether the notebook is shared. If true, the contents of the notebook can be seen by people other than the owner. Read-only. +func (m *Notebook) SetIsShared(value *bool)() { + m.isShared = value +} +// SetLinks sets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote native client if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. +func (m *Notebook) SetLinks(value NotebookLinksable)() { + m.links = value +} +// SetSectionGroups sets the sectionGroups property value. The section groups in the notebook. Read-only. Nullable. +func (m *Notebook) SetSectionGroups(value []SectionGroupable)() { + m.sectionGroups = value +} +// SetSectionGroupsUrl sets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the notebook. Read-only. +func (m *Notebook) SetSectionGroupsUrl(value *string)() { + m.sectionGroupsUrl = value +} +// SetSections sets the sections property value. The sections in the notebook. Read-only. Nullable. +func (m *Notebook) SetSections(value []OnenoteSectionable)() { + m.sections = value +} +// SetSectionsUrl sets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the notebook. Read-only. +func (m *Notebook) SetSectionsUrl(value *string)() { + m.sectionsUrl = value +} +// SetUserRole sets the userRole property value. Possible values are: Owner, Contributor, Reader, None. Owner represents owner-level access to the notebook. Contributor represents read/write access to the notebook. Reader represents read-only access to the notebook. Read-only. +func (m *Notebook) SetUserRole(value *OnenoteUserRole)() { + m.userRole = value +} diff --git a/src/internal/connector/graph/betasdk/models/notebook_collection_response.go b/src/internal/connector/graph/betasdk/models/notebook_collection_response.go new file mode 100644 index 000000000..e9f5f509a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebook_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotebookCollectionResponse +type NotebookCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Notebookable +} +// NewNotebookCollectionResponse instantiates a new NotebookCollectionResponse and sets the default values. +func NewNotebookCollectionResponse()(*NotebookCollectionResponse) { + m := &NotebookCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotebookCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotebookCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotebookCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotebookCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotebookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Notebookable, len(val)) + for i, v := range val { + res[i] = v.(Notebookable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotebookCollectionResponse) GetValue()([]Notebookable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotebookCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotebookCollectionResponse) SetValue(value []Notebookable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/notebook_collection_responseable.go b/src/internal/connector/graph/betasdk/models/notebook_collection_responseable.go new file mode 100644 index 000000000..aa47ab7e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebook_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotebookCollectionResponseable +type NotebookCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Notebookable) + SetValue(value []Notebookable)() +} diff --git a/src/internal/connector/graph/betasdk/models/notebook_links.go b/src/internal/connector/graph/betasdk/models/notebook_links.go new file mode 100644 index 000000000..613474fc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebook_links.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotebookLinks +type NotebookLinks 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 OdataType property + odataType *string + // Opens the notebook in the OneNote native client if it's installed. + oneNoteClientUrl ExternalLinkable + // Opens the notebook in OneNote on the web. + oneNoteWebUrl ExternalLinkable +} +// NewNotebookLinks instantiates a new notebookLinks and sets the default values. +func NewNotebookLinks()(*NotebookLinks) { + m := &NotebookLinks{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNotebookLinksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotebookLinksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotebookLinks(), 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 *NotebookLinks) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotebookLinks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["oneNoteClientUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteClientUrl(val.(ExternalLinkable)) + } + return nil + } + res["oneNoteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteWebUrl(val.(ExternalLinkable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NotebookLinks) GetOdataType()(*string) { + return m.odataType +} +// GetOneNoteClientUrl gets the oneNoteClientUrl property value. Opens the notebook in the OneNote native client if it's installed. +func (m *NotebookLinks) GetOneNoteClientUrl()(ExternalLinkable) { + return m.oneNoteClientUrl +} +// GetOneNoteWebUrl gets the oneNoteWebUrl property value. Opens the notebook in OneNote on the web. +func (m *NotebookLinks) GetOneNoteWebUrl()(ExternalLinkable) { + return m.oneNoteWebUrl +} +// Serialize serializes information the current object +func (m *NotebookLinks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteClientUrl", m.GetOneNoteClientUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteWebUrl", m.GetOneNoteWebUrl()) + 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 *NotebookLinks) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NotebookLinks) SetOdataType(value *string)() { + m.odataType = value +} +// SetOneNoteClientUrl sets the oneNoteClientUrl property value. Opens the notebook in the OneNote native client if it's installed. +func (m *NotebookLinks) SetOneNoteClientUrl(value ExternalLinkable)() { + m.oneNoteClientUrl = value +} +// SetOneNoteWebUrl sets the oneNoteWebUrl property value. Opens the notebook in OneNote on the web. +func (m *NotebookLinks) SetOneNoteWebUrl(value ExternalLinkable)() { + m.oneNoteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/notebook_linksable.go b/src/internal/connector/graph/betasdk/models/notebook_linksable.go new file mode 100644 index 000000000..9d7883f3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebook_linksable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotebookLinksable +type NotebookLinksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOneNoteClientUrl()(ExternalLinkable) + GetOneNoteWebUrl()(ExternalLinkable) + SetOdataType(value *string)() + SetOneNoteClientUrl(value ExternalLinkable)() + SetOneNoteWebUrl(value ExternalLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/notebookable.go b/src/internal/connector/graph/betasdk/models/notebookable.go new file mode 100644 index 000000000..e00e0b130 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notebookable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Notebookable +type Notebookable interface { + OnenoteEntityHierarchyModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDefault()(*bool) + GetIsShared()(*bool) + GetLinks()(NotebookLinksable) + GetSectionGroups()([]SectionGroupable) + GetSectionGroupsUrl()(*string) + GetSections()([]OnenoteSectionable) + GetSectionsUrl()(*string) + GetUserRole()(*OnenoteUserRole) + SetIsDefault(value *bool)() + SetIsShared(value *bool)() + SetLinks(value NotebookLinksable)() + SetSectionGroups(value []SectionGroupable)() + SetSectionGroupsUrl(value *string)() + SetSections(value []OnenoteSectionable)() + SetSectionsUrl(value *string)() + SetUserRole(value *OnenoteUserRole)() +} diff --git a/src/internal/connector/graph/betasdk/models/notification.go b/src/internal/connector/graph/betasdk/models/notification.go new file mode 100644 index 000000000..88a237a00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification.go @@ -0,0 +1,218 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Notification provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Notification struct { + Entity + // Sets how long (in seconds) this notification content will stay in each platform's notification viewer. For example, when the notification is delivered to a Windows device, the value of this property is passed on to ToastNotification.ExpirationTime, which determines how long the toast notification will stay in the user's Windows Action Center. + displayTimeToLive *int32 + // Sets a UTC expiration date and time on a user notification using ISO 8601 format (for example, midnight UTC on Jan 1, 2019 would look like this: '2019-01-01T00:00:00Z'). When time is up, the notification is removed from the Microsoft Graph notification feed store completely and is no longer part of notification history. Max value is 30 days. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the group that this notification belongs to. It is set by the developer for the purpose of grouping notifications together. + groupName *string + // The payload property + payload PayloadTypesable + // Indicates the priority of a raw user notification. Visual notifications are sent with high priority by default. Valid values are None, High and Low. + priority *Priority + // Represents the host name of the app to which the calling service wants to post the notification, for the given user. If targeting web endpoints (see targetPolicy.platformTypes), ensure that targetHostName is the same as the name used when creating a subscription on the client side within the application JSON property. + targetHostName *string + // Target policy object handles notification delivery policy for endpoint types that should be targeted (Windows, iOS, Android and WebPush) for the given user. + targetPolicy TargetPolicyEndpointsable +} +// NewNotification instantiates a new notification and sets the default values. +func NewNotification()(*Notification) { + m := &Notification{ + Entity: *NewEntity(), + } + return m +} +// CreateNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotification(), nil +} +// GetDisplayTimeToLive gets the displayTimeToLive property value. Sets how long (in seconds) this notification content will stay in each platform's notification viewer. For example, when the notification is delivered to a Windows device, the value of this property is passed on to ToastNotification.ExpirationTime, which determines how long the toast notification will stay in the user's Windows Action Center. +func (m *Notification) GetDisplayTimeToLive()(*int32) { + return m.displayTimeToLive +} +// GetExpirationDateTime gets the expirationDateTime property value. Sets a UTC expiration date and time on a user notification using ISO 8601 format (for example, midnight UTC on Jan 1, 2019 would look like this: '2019-01-01T00:00:00Z'). When time is up, the notification is removed from the Microsoft Graph notification feed store completely and is no longer part of notification history. Max value is 30 days. +func (m *Notification) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Notification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayTimeToLive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDisplayTimeToLive(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["groupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupName(val) + } + return nil + } + res["payload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePayloadTypesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPayload(val.(PayloadTypesable)) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePriority) + if err != nil { + return err + } + if val != nil { + m.SetPriority(val.(*Priority)) + } + return nil + } + res["targetHostName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetHostName(val) + } + return nil + } + res["targetPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTargetPolicyEndpointsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetPolicy(val.(TargetPolicyEndpointsable)) + } + return nil + } + return res +} +// GetGroupName gets the groupName property value. The name of the group that this notification belongs to. It is set by the developer for the purpose of grouping notifications together. +func (m *Notification) GetGroupName()(*string) { + return m.groupName +} +// GetPayload gets the payload property value. The payload property +func (m *Notification) GetPayload()(PayloadTypesable) { + return m.payload +} +// GetPriority gets the priority property value. Indicates the priority of a raw user notification. Visual notifications are sent with high priority by default. Valid values are None, High and Low. +func (m *Notification) GetPriority()(*Priority) { + return m.priority +} +// GetTargetHostName gets the targetHostName property value. Represents the host name of the app to which the calling service wants to post the notification, for the given user. If targeting web endpoints (see targetPolicy.platformTypes), ensure that targetHostName is the same as the name used when creating a subscription on the client side within the application JSON property. +func (m *Notification) GetTargetHostName()(*string) { + return m.targetHostName +} +// GetTargetPolicy gets the targetPolicy property value. Target policy object handles notification delivery policy for endpoint types that should be targeted (Windows, iOS, Android and WebPush) for the given user. +func (m *Notification) GetTargetPolicy()(TargetPolicyEndpointsable) { + return m.targetPolicy +} +// Serialize serializes information the current object +func (m *Notification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("displayTimeToLive", m.GetDisplayTimeToLive()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupName", m.GetGroupName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("payload", m.GetPayload()) + if err != nil { + return err + } + } + if m.GetPriority() != nil { + cast := (*m.GetPriority()).String() + err = writer.WriteStringValue("priority", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetHostName", m.GetTargetHostName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("targetPolicy", m.GetTargetPolicy()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayTimeToLive sets the displayTimeToLive property value. Sets how long (in seconds) this notification content will stay in each platform's notification viewer. For example, when the notification is delivered to a Windows device, the value of this property is passed on to ToastNotification.ExpirationTime, which determines how long the toast notification will stay in the user's Windows Action Center. +func (m *Notification) SetDisplayTimeToLive(value *int32)() { + m.displayTimeToLive = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Sets a UTC expiration date and time on a user notification using ISO 8601 format (for example, midnight UTC on Jan 1, 2019 would look like this: '2019-01-01T00:00:00Z'). When time is up, the notification is removed from the Microsoft Graph notification feed store completely and is no longer part of notification history. Max value is 30 days. +func (m *Notification) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetGroupName sets the groupName property value. The name of the group that this notification belongs to. It is set by the developer for the purpose of grouping notifications together. +func (m *Notification) SetGroupName(value *string)() { + m.groupName = value +} +// SetPayload sets the payload property value. The payload property +func (m *Notification) SetPayload(value PayloadTypesable)() { + m.payload = value +} +// SetPriority sets the priority property value. Indicates the priority of a raw user notification. Visual notifications are sent with high priority by default. Valid values are None, High and Low. +func (m *Notification) SetPriority(value *Priority)() { + m.priority = value +} +// SetTargetHostName sets the targetHostName property value. Represents the host name of the app to which the calling service wants to post the notification, for the given user. If targeting web endpoints (see targetPolicy.platformTypes), ensure that targetHostName is the same as the name used when creating a subscription on the client side within the application JSON property. +func (m *Notification) SetTargetHostName(value *string)() { + m.targetHostName = value +} +// SetTargetPolicy sets the targetPolicy property value. Target policy object handles notification delivery policy for endpoint types that should be targeted (Windows, iOS, Android and WebPush) for the given user. +func (m *Notification) SetTargetPolicy(value TargetPolicyEndpointsable)() { + m.targetPolicy = value +} diff --git a/src/internal/connector/graph/betasdk/models/notification_collection_response.go b/src/internal/connector/graph/betasdk/models/notification_collection_response.go new file mode 100644 index 000000000..78e076a1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationCollectionResponse +type NotificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Notificationable +} +// NewNotificationCollectionResponse instantiates a new NotificationCollectionResponse and sets the default values. +func NewNotificationCollectionResponse()(*NotificationCollectionResponse) { + m := &NotificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Notificationable, len(val)) + for i, v := range val { + res[i] = v.(Notificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotificationCollectionResponse) GetValue()([]Notificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotificationCollectionResponse) SetValue(value []Notificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/notification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/notification_collection_responseable.go new file mode 100644 index 000000000..d85c64872 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationCollectionResponseable +type NotificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Notificationable) + SetValue(value []Notificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/notification_message_template.go b/src/internal/connector/graph/betasdk/models/notification_message_template.go new file mode 100644 index 000000000..d2cca89ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_message_template.go @@ -0,0 +1,204 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationMessageTemplate notification messages are messages that are sent to end users who are determined to be not-compliant with the compliance policies defined by the administrator. Administrators choose notifications and configure them in the Intune Admin Console using the compliance policy creation page under the “Actions for non-compliance” section. Use the notificationMessageTemplate object to create your own custom notifications for administrators to choose while configuring actions for non-compliance. +type NotificationMessageTemplate struct { + Entity + // Branding Options for the Message Template. Branding is defined in the Intune Admin Console. + brandingOptions *NotificationTemplateBrandingOptions + // The default locale to fallback onto when the requested locale is not available. + defaultLocale *string + // Display name for the Notification Message Template. + displayName *string + // DateTime the object was last modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The list of localized messages for this Notification Message Template. + localizedNotificationMessages []LocalizedNotificationMessageable + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string +} +// NewNotificationMessageTemplate instantiates a new notificationMessageTemplate and sets the default values. +func NewNotificationMessageTemplate()(*NotificationMessageTemplate) { + m := &NotificationMessageTemplate{ + Entity: *NewEntity(), + } + return m +} +// CreateNotificationMessageTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationMessageTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationMessageTemplate(), nil +} +// GetBrandingOptions gets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console. +func (m *NotificationMessageTemplate) GetBrandingOptions()(*NotificationTemplateBrandingOptions) { + return m.brandingOptions +} +// GetDefaultLocale gets the defaultLocale property value. The default locale to fallback onto when the requested locale is not available. +func (m *NotificationMessageTemplate) GetDefaultLocale()(*string) { + return m.defaultLocale +} +// GetDisplayName gets the displayName property value. Display name for the Notification Message Template. +func (m *NotificationMessageTemplate) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationMessageTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["brandingOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseNotificationTemplateBrandingOptions) + if err != nil { + return err + } + if val != nil { + m.SetBrandingOptions(val.(*NotificationTemplateBrandingOptions)) + } + return nil + } + res["defaultLocale"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLocale(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["localizedNotificationMessages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocalizedNotificationMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocalizedNotificationMessageable, len(val)) + for i, v := range val { + res[i] = v.(LocalizedNotificationMessageable) + } + m.SetLocalizedNotificationMessages(res) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *NotificationMessageTemplate) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLocalizedNotificationMessages gets the localizedNotificationMessages property value. The list of localized messages for this Notification Message Template. +func (m *NotificationMessageTemplate) GetLocalizedNotificationMessages()([]LocalizedNotificationMessageable) { + return m.localizedNotificationMessages +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *NotificationMessageTemplate) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// Serialize serializes information the current object +func (m *NotificationMessageTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBrandingOptions() != nil { + cast := (*m.GetBrandingOptions()).String() + err = writer.WriteStringValue("brandingOptions", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultLocale", m.GetDefaultLocale()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetLocalizedNotificationMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizedNotificationMessages())) + for i, v := range m.GetLocalizedNotificationMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("localizedNotificationMessages", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + return nil +} +// SetBrandingOptions sets the brandingOptions property value. Branding Options for the Message Template. Branding is defined in the Intune Admin Console. +func (m *NotificationMessageTemplate) SetBrandingOptions(value *NotificationTemplateBrandingOptions)() { + m.brandingOptions = value +} +// SetDefaultLocale sets the defaultLocale property value. The default locale to fallback onto when the requested locale is not available. +func (m *NotificationMessageTemplate) SetDefaultLocale(value *string)() { + m.defaultLocale = value +} +// SetDisplayName sets the displayName property value. Display name for the Notification Message Template. +func (m *NotificationMessageTemplate) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. DateTime the object was last modified. +func (m *NotificationMessageTemplate) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLocalizedNotificationMessages sets the localizedNotificationMessages property value. The list of localized messages for this Notification Message Template. +func (m *NotificationMessageTemplate) SetLocalizedNotificationMessages(value []LocalizedNotificationMessageable)() { + m.localizedNotificationMessages = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *NotificationMessageTemplate) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/notification_message_template_collection_response.go b/src/internal/connector/graph/betasdk/models/notification_message_template_collection_response.go new file mode 100644 index 000000000..92eaba58a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_message_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationMessageTemplateCollectionResponse +type NotificationMessageTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NotificationMessageTemplateable +} +// NewNotificationMessageTemplateCollectionResponse instantiates a new NotificationMessageTemplateCollectionResponse and sets the default values. +func NewNotificationMessageTemplateCollectionResponse()(*NotificationMessageTemplateCollectionResponse) { + m := &NotificationMessageTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNotificationMessageTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotificationMessageTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotificationMessageTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotificationMessageTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotificationMessageTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NotificationMessageTemplateable, len(val)) + for i, v := range val { + res[i] = v.(NotificationMessageTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NotificationMessageTemplateCollectionResponse) GetValue()([]NotificationMessageTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *NotificationMessageTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NotificationMessageTemplateCollectionResponse) SetValue(value []NotificationMessageTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/notification_message_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/notification_message_template_collection_responseable.go new file mode 100644 index 000000000..fbcaaf379 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_message_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationMessageTemplateCollectionResponseable +type NotificationMessageTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NotificationMessageTemplateable) + SetValue(value []NotificationMessageTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/notification_message_templateable.go b/src/internal/connector/graph/betasdk/models/notification_message_templateable.go new file mode 100644 index 000000000..187ad0c3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_message_templateable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotificationMessageTemplateable +type NotificationMessageTemplateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBrandingOptions()(*NotificationTemplateBrandingOptions) + GetDefaultLocale()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocalizedNotificationMessages()([]LocalizedNotificationMessageable) + GetRoleScopeTagIds()([]string) + SetBrandingOptions(value *NotificationTemplateBrandingOptions)() + SetDefaultLocale(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocalizedNotificationMessages(value []LocalizedNotificationMessageable)() + SetRoleScopeTagIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/notification_template_branding_options.go b/src/internal/connector/graph/betasdk/models/notification_template_branding_options.go new file mode 100644 index 000000000..2cdddbfb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notification_template_branding_options.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type NotificationTemplateBrandingOptions int + +const ( + // No Branding. + NONE_NOTIFICATIONTEMPLATEBRANDINGOPTIONS NotificationTemplateBrandingOptions = iota + // Include Company Logo. + INCLUDECOMPANYLOGO_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + // Include Company Name. + INCLUDECOMPANYNAME_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + // Include Contact Info. + INCLUDECONTACTINFORMATION_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + // Include Company Portal Link. + INCLUDECOMPANYPORTALLINK_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + // Include Device Details. + INCLUDEDEVICEDETAILS_NOTIFICATIONTEMPLATEBRANDINGOPTIONS +) + +func (i NotificationTemplateBrandingOptions) String() string { + return []string{"none", "includeCompanyLogo", "includeCompanyName", "includeContactInformation", "includeCompanyPortalLink", "includeDeviceDetails"}[i] +} +func ParseNotificationTemplateBrandingOptions(v string) (interface{}, error) { + result := NONE_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + switch v { + case "none": + result = NONE_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + case "includeCompanyLogo": + result = INCLUDECOMPANYLOGO_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + case "includeCompanyName": + result = INCLUDECOMPANYNAME_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + case "includeContactInformation": + result = INCLUDECONTACTINFORMATION_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + case "includeCompanyPortalLink": + result = INCLUDECOMPANYPORTALLINK_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + case "includeDeviceDetails": + result = INCLUDEDEVICEDETAILS_NOTIFICATIONTEMPLATEBRANDINGOPTIONS + default: + return 0, errors.New("Unknown NotificationTemplateBrandingOptions value: " + v) + } + return &result, nil +} +func SerializeNotificationTemplateBrandingOptions(values []NotificationTemplateBrandingOptions) []string { + 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/notificationable.go b/src/internal/connector/graph/betasdk/models/notificationable.go new file mode 100644 index 000000000..50bd41780 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notificationable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Notificationable +type Notificationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayTimeToLive()(*int32) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupName()(*string) + GetPayload()(PayloadTypesable) + GetPriority()(*Priority) + GetTargetHostName()(*string) + GetTargetPolicy()(TargetPolicyEndpointsable) + SetDisplayTimeToLive(value *int32)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupName(value *string)() + SetPayload(value PayloadTypesable)() + SetPriority(value *Priority)() + SetTargetHostName(value *string)() + SetTargetPolicy(value TargetPolicyEndpointsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/notify_user_action.go b/src/internal/connector/graph/betasdk/models/notify_user_action.go new file mode 100644 index 000000000..e332364b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notify_user_action.go @@ -0,0 +1,170 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotifyUserAction +type NotifyUserAction struct { + DlpActionInfo + // The actionLastModifiedDateTime property + actionLastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The emailText property + emailText *string + // The overrideOption property + overrideOption *OverrideOption + // The policyTip property + policyTip *string + // The recipients property + recipients []string +} +// NewNotifyUserAction instantiates a new NotifyUserAction and sets the default values. +func NewNotifyUserAction()(*NotifyUserAction) { + m := &NotifyUserAction{ + DlpActionInfo: *NewDlpActionInfo(), + } + return m +} +// CreateNotifyUserActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNotifyUserActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNotifyUserAction(), nil +} +// GetActionLastModifiedDateTime gets the actionLastModifiedDateTime property value. The actionLastModifiedDateTime property +func (m *NotifyUserAction) GetActionLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.actionLastModifiedDateTime +} +// GetEmailText gets the emailText property value. The emailText property +func (m *NotifyUserAction) GetEmailText()(*string) { + return m.emailText +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NotifyUserAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DlpActionInfo.GetFieldDeserializers() + res["actionLastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActionLastModifiedDateTime(val) + } + return nil + } + res["emailText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailText(val) + } + return nil + } + res["overrideOption"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOverrideOption) + if err != nil { + return err + } + if val != nil { + m.SetOverrideOption(val.(*OverrideOption)) + } + return nil + } + res["policyTip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyTip(val) + } + return nil + } + res["recipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRecipients(res) + } + return nil + } + return res +} +// GetOverrideOption gets the overrideOption property value. The overrideOption property +func (m *NotifyUserAction) GetOverrideOption()(*OverrideOption) { + return m.overrideOption +} +// GetPolicyTip gets the policyTip property value. The policyTip property +func (m *NotifyUserAction) GetPolicyTip()(*string) { + return m.policyTip +} +// GetRecipients gets the recipients property value. The recipients property +func (m *NotifyUserAction) GetRecipients()([]string) { + return m.recipients +} +// Serialize serializes information the current object +func (m *NotifyUserAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DlpActionInfo.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("actionLastModifiedDateTime", m.GetActionLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailText", m.GetEmailText()) + if err != nil { + return err + } + } + if m.GetOverrideOption() != nil { + cast := (*m.GetOverrideOption()).String() + err = writer.WriteStringValue("overrideOption", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("policyTip", m.GetPolicyTip()) + if err != nil { + return err + } + } + if m.GetRecipients() != nil { + err = writer.WriteCollectionOfStringValues("recipients", m.GetRecipients()) + if err != nil { + return err + } + } + return nil +} +// SetActionLastModifiedDateTime sets the actionLastModifiedDateTime property value. The actionLastModifiedDateTime property +func (m *NotifyUserAction) SetActionLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.actionLastModifiedDateTime = value +} +// SetEmailText sets the emailText property value. The emailText property +func (m *NotifyUserAction) SetEmailText(value *string)() { + m.emailText = value +} +// SetOverrideOption sets the overrideOption property value. The overrideOption property +func (m *NotifyUserAction) SetOverrideOption(value *OverrideOption)() { + m.overrideOption = value +} +// SetPolicyTip sets the policyTip property value. The policyTip property +func (m *NotifyUserAction) SetPolicyTip(value *string)() { + m.policyTip = value +} +// SetRecipients sets the recipients property value. The recipients property +func (m *NotifyUserAction) SetRecipients(value []string)() { + m.recipients = value +} diff --git a/src/internal/connector/graph/betasdk/models/notify_user_actionable.go b/src/internal/connector/graph/betasdk/models/notify_user_actionable.go new file mode 100644 index 000000000..b9c6af24d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/notify_user_actionable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NotifyUserActionable +type NotifyUserActionable interface { + DlpActionInfoable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmailText()(*string) + GetOverrideOption()(*OverrideOption) + GetPolicyTip()(*string) + GetRecipients()([]string) + SetActionLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmailText(value *string)() + SetOverrideOption(value *OverrideOption)() + SetPolicyTip(value *string)() + SetRecipients(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/number_column.go b/src/internal/connector/graph/betasdk/models/number_column.go new file mode 100644 index 000000000..38aece510 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_column.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberColumn +type NumberColumn struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // How many decimal places to display. See below for information about the possible values. + decimalPlaces *string + // How the value should be presented in the UX. Must be one of number or percentage. If unspecified, treated as number. + displayAs *string + // The maximum permitted value. + maximum *float64 + // The minimum permitted value. + minimum *float64 + // The OdataType property + odataType *string +} +// NewNumberColumn instantiates a new numberColumn and sets the default values. +func NewNumberColumn()(*NumberColumn) { + m := &NumberColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNumberColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNumberColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNumberColumn(), 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 *NumberColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDecimalPlaces gets the decimalPlaces property value. How many decimal places to display. See below for information about the possible values. +func (m *NumberColumn) GetDecimalPlaces()(*string) { + return m.decimalPlaces +} +// GetDisplayAs gets the displayAs property value. How the value should be presented in the UX. Must be one of number or percentage. If unspecified, treated as number. +func (m *NumberColumn) GetDisplayAs()(*string) { + return m.displayAs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NumberColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["decimalPlaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDecimalPlaces(val) + } + return nil + } + res["displayAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayAs(val) + } + return nil + } + res["maximum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaximum(val) + } + return nil + } + res["minimum"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetMinimum(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 + } + return res +} +// GetMaximum gets the maximum property value. The maximum permitted value. +func (m *NumberColumn) GetMaximum()(*float64) { + return m.maximum +} +// GetMinimum gets the minimum property value. The minimum permitted value. +func (m *NumberColumn) GetMinimum()(*float64) { + return m.minimum +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NumberColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *NumberColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("decimalPlaces", m.GetDecimalPlaces()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayAs", m.GetDisplayAs()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("maximum", m.GetMaximum()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("minimum", m.GetMinimum()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *NumberColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDecimalPlaces sets the decimalPlaces property value. How many decimal places to display. See below for information about the possible values. +func (m *NumberColumn) SetDecimalPlaces(value *string)() { + m.decimalPlaces = value +} +// SetDisplayAs sets the displayAs property value. How the value should be presented in the UX. Must be one of number or percentage. If unspecified, treated as number. +func (m *NumberColumn) SetDisplayAs(value *string)() { + m.displayAs = value +} +// SetMaximum sets the maximum property value. The maximum permitted value. +func (m *NumberColumn) SetMaximum(value *float64)() { + m.maximum = value +} +// SetMinimum sets the minimum property value. The minimum permitted value. +func (m *NumberColumn) SetMinimum(value *float64)() { + m.minimum = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NumberColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/number_columnable.go b/src/internal/connector/graph/betasdk/models/number_columnable.go new file mode 100644 index 000000000..d2a2c34f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_columnable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberColumnable +type NumberColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDecimalPlaces()(*string) + GetDisplayAs()(*string) + GetMaximum()(*float64) + GetMinimum()(*float64) + GetOdataType()(*string) + SetDecimalPlaces(value *string)() + SetDisplayAs(value *string)() + SetMaximum(value *float64)() + SetMinimum(value *float64)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/number_range.go b/src/internal/connector/graph/betasdk/models/number_range.go new file mode 100644 index 000000000..9f7ffde0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_range.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberRange number Range definition. +type NumberRange struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Lower number. + lowerNumber *int32 + // The OdataType property + odataType *string + // Upper number. + upperNumber *int32 +} +// NewNumberRange instantiates a new numberRange and sets the default values. +func NewNumberRange()(*NumberRange) { + m := &NumberRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateNumberRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNumberRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNumberRange(), 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 *NumberRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NumberRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lowerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLowerNumber(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["upperNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUpperNumber(val) + } + return nil + } + return res +} +// GetLowerNumber gets the lowerNumber property value. Lower number. +func (m *NumberRange) GetLowerNumber()(*int32) { + return m.lowerNumber +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *NumberRange) GetOdataType()(*string) { + return m.odataType +} +// GetUpperNumber gets the upperNumber property value. Upper number. +func (m *NumberRange) GetUpperNumber()(*int32) { + return m.upperNumber +} +// Serialize serializes information the current object +func (m *NumberRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("lowerNumber", m.GetLowerNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("upperNumber", m.GetUpperNumber()) + 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 *NumberRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLowerNumber sets the lowerNumber property value. Lower number. +func (m *NumberRange) SetLowerNumber(value *int32)() { + m.lowerNumber = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *NumberRange) SetOdataType(value *string)() { + m.odataType = value +} +// SetUpperNumber sets the upperNumber property value. Upper number. +func (m *NumberRange) SetUpperNumber(value *int32)() { + m.upperNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/number_range_collection_response.go b/src/internal/connector/graph/betasdk/models/number_range_collection_response.go new file mode 100644 index 000000000..ac905220f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberRangeCollectionResponse +type NumberRangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []NumberRangeable +} +// NewNumberRangeCollectionResponse instantiates a new NumberRangeCollectionResponse and sets the default values. +func NewNumberRangeCollectionResponse()(*NumberRangeCollectionResponse) { + m := &NumberRangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateNumberRangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateNumberRangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewNumberRangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *NumberRangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNumberRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]NumberRangeable, len(val)) + for i, v := range val { + res[i] = v.(NumberRangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *NumberRangeCollectionResponse) GetValue()([]NumberRangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *NumberRangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *NumberRangeCollectionResponse) SetValue(value []NumberRangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/number_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/number_range_collection_responseable.go new file mode 100644 index 000000000..3525ecfeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberRangeCollectionResponseable +type NumberRangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]NumberRangeable) + SetValue(value []NumberRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/number_rangeable.go b/src/internal/connector/graph/betasdk/models/number_rangeable.go new file mode 100644 index 000000000..0e5f4cb0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/number_rangeable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// NumberRangeable +type NumberRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLowerNumber()(*int32) + GetOdataType()(*string) + GetUpperNumber()(*int32) + SetLowerNumber(value *int32)() + SetOdataType(value *string)() + SetUpperNumber(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant.go b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant.go new file mode 100644 index 000000000..eefe5238f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant.go @@ -0,0 +1,217 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OAuth2PermissionGrant provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OAuth2PermissionGrant struct { + Entity + // The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). + clientId *string + // Indicates whether authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). + consentType *string + // Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. + expiryTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). + principalId *string + // The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). + resourceId *string + // A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal. Must not exceed 3850 characters in length. + scope *string + // Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. + startTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOAuth2PermissionGrant instantiates a new oAuth2PermissionGrant and sets the default values. +func NewOAuth2PermissionGrant()(*OAuth2PermissionGrant) { + m := &OAuth2PermissionGrant{ + Entity: *NewEntity(), + } + return m +} +// CreateOAuth2PermissionGrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOAuth2PermissionGrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOAuth2PermissionGrant(), nil +} +// GetClientId gets the clientId property value. The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) GetClientId()(*string) { + return m.clientId +} +// GetConsentType gets the consentType property value. Indicates whether authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) GetConsentType()(*string) { + return m.consentType +} +// GetExpiryTime gets the expiryTime property value. Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. +func (m *OAuth2PermissionGrant) GetExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expiryTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OAuth2PermissionGrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["consentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConsentType(val) + } + return nil + } + res["expiryTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiryTime(val) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScope(val) + } + return nil + } + res["startTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartTime(val) + } + return nil + } + return res +} +// GetPrincipalId gets the principalId property value. The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) GetPrincipalId()(*string) { + return m.principalId +} +// GetResourceId gets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) GetResourceId()(*string) { + return m.resourceId +} +// GetScope gets the scope property value. A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal. Must not exceed 3850 characters in length. +func (m *OAuth2PermissionGrant) GetScope()(*string) { + return m.scope +} +// GetStartTime gets the startTime property value. Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. +func (m *OAuth2PermissionGrant) GetStartTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startTime +} +// Serialize serializes information the current object +func (m *OAuth2PermissionGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("consentType", m.GetConsentType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expiryTime", m.GetExpiryTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startTime", m.GetStartTime()) + if err != nil { + return err + } + } + return nil +} +// SetClientId sets the clientId property value. The id of the client service principal for the application which is authorized to act on behalf of a signed-in user when accessing an API. Required. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) SetClientId(value *string)() { + m.clientId = value +} +// SetConsentType sets the consentType property value. Indicates whether authorization is granted for the client application to impersonate all users or only a specific user. AllPrincipals indicates authorization to impersonate all users. Principal indicates authorization to impersonate a specific user. Consent on behalf of all users can be granted by an administrator. Non-admin users may be authorized to consent on behalf of themselves in some cases, for some delegated permissions. Required. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) SetConsentType(value *string)() { + m.consentType = value +} +// SetExpiryTime sets the expiryTime property value. Currently, the end time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. +func (m *OAuth2PermissionGrant) SetExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expiryTime = value +} +// SetPrincipalId sets the principalId property value. The id of the user on behalf of whom the client is authorized to access the resource, when consentType is Principal. If consentType is AllPrincipals this value is null. Required when consentType is Principal. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) SetPrincipalId(value *string)() { + m.principalId = value +} +// SetResourceId sets the resourceId property value. The id of the resource service principal to which access is authorized. This identifies the API which the client is authorized to attempt to call on behalf of a signed-in user. Supports $filter (eq only). +func (m *OAuth2PermissionGrant) SetResourceId(value *string)() { + m.resourceId = value +} +// SetScope sets the scope property value. A space-separated list of the claim values for delegated permissions which should be included in access tokens for the resource application (the API). For example, openid User.Read GroupMember.Read.All. Each claim value should match the value field of one of the delegated permissions defined by the API, listed in the publishedPermissionScopes property of the resource service principal. Must not exceed 3850 characters in length. +func (m *OAuth2PermissionGrant) SetScope(value *string)() { + m.scope = value +} +// SetStartTime sets the startTime property value. Currently, the start time value is ignored, but a value is required when creating an oAuth2PermissionGrant. Required. +func (m *OAuth2PermissionGrant) SetStartTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_response.go b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_response.go new file mode 100644 index 000000000..4334cbf29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OAuth2PermissionGrantCollectionResponse +type OAuth2PermissionGrantCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OAuth2PermissionGrantable +} +// NewOAuth2PermissionGrantCollectionResponse instantiates a new OAuth2PermissionGrantCollectionResponse and sets the default values. +func NewOAuth2PermissionGrantCollectionResponse()(*OAuth2PermissionGrantCollectionResponse) { + m := &OAuth2PermissionGrantCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOAuth2PermissionGrantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOAuth2PermissionGrantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOAuth2PermissionGrantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OAuth2PermissionGrantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOAuth2PermissionGrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OAuth2PermissionGrantable, len(val)) + for i, v := range val { + res[i] = v.(OAuth2PermissionGrantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OAuth2PermissionGrantCollectionResponse) GetValue()([]OAuth2PermissionGrantable) { + return m.value +} +// Serialize serializes information the current object +func (m *OAuth2PermissionGrantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OAuth2PermissionGrantCollectionResponse) SetValue(value []OAuth2PermissionGrantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_responseable.go new file mode 100644 index 000000000..59ddf14d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grant_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OAuth2PermissionGrantCollectionResponseable +type OAuth2PermissionGrantCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OAuth2PermissionGrantable) + SetValue(value []OAuth2PermissionGrantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/o_auth2_permission_grantable.go b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grantable.go new file mode 100644 index 000000000..7c96ffb9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/o_auth2_permission_grantable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OAuth2PermissionGrantable +type OAuth2PermissionGrantable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientId()(*string) + GetConsentType()(*string) + GetExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPrincipalId()(*string) + GetResourceId()(*string) + GetScope()(*string) + GetStartTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetClientId(value *string)() + SetConsentType(value *string)() + SetExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPrincipalId(value *string)() + SetResourceId(value *string)() + SetScope(value *string)() + SetStartTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/oath_token_metadata.go b/src/internal/connector/graph/betasdk/models/oath_token_metadata.go new file mode 100644 index 000000000..fee84472a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oath_token_metadata.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OathTokenMetadata +type OathTokenMetadata 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 enabled property + enabled *bool + // The manufacturer property + manufacturer *string + // The manufacturerProperties property + manufacturerProperties []KeyValueable + // The OdataType property + odataType *string + // The serialNumber property + serialNumber *string + // The tokenType property + tokenType *string +} +// NewOathTokenMetadata instantiates a new oathTokenMetadata and sets the default values. +func NewOathTokenMetadata()(*OathTokenMetadata) { + m := &OathTokenMetadata{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOathTokenMetadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOathTokenMetadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOathTokenMetadata(), 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 *OathTokenMetadata) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +func (m *OathTokenMetadata) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OathTokenMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["manufacturerProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValueable, len(val)) + for i, v := range val { + res[i] = v.(KeyValueable) + } + m.SetManufacturerProperties(res) + } + 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["serialNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSerialNumber(val) + } + return nil + } + res["tokenType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenType(val) + } + return nil + } + return res +} +// GetManufacturer gets the manufacturer property value. The manufacturer property +func (m *OathTokenMetadata) GetManufacturer()(*string) { + return m.manufacturer +} +// GetManufacturerProperties gets the manufacturerProperties property value. The manufacturerProperties property +func (m *OathTokenMetadata) GetManufacturerProperties()([]KeyValueable) { + return m.manufacturerProperties +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OathTokenMetadata) GetOdataType()(*string) { + return m.odataType +} +// GetSerialNumber gets the serialNumber property value. The serialNumber property +func (m *OathTokenMetadata) GetSerialNumber()(*string) { + return m.serialNumber +} +// GetTokenType gets the tokenType property value. The tokenType property +func (m *OathTokenMetadata) GetTokenType()(*string) { + return m.tokenType +} +// Serialize serializes information the current object +func (m *OathTokenMetadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + if m.GetManufacturerProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManufacturerProperties())) + for i, v := range m.GetManufacturerProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("manufacturerProperties", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("serialNumber", m.GetSerialNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tokenType", m.GetTokenType()) + 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 *OathTokenMetadata) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *OathTokenMetadata) SetEnabled(value *bool)() { + m.enabled = value +} +// SetManufacturer sets the manufacturer property value. The manufacturer property +func (m *OathTokenMetadata) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetManufacturerProperties sets the manufacturerProperties property value. The manufacturerProperties property +func (m *OathTokenMetadata) SetManufacturerProperties(value []KeyValueable)() { + m.manufacturerProperties = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OathTokenMetadata) SetOdataType(value *string)() { + m.odataType = value +} +// SetSerialNumber sets the serialNumber property value. The serialNumber property +func (m *OathTokenMetadata) SetSerialNumber(value *string)() { + m.serialNumber = value +} +// SetTokenType sets the tokenType property value. The tokenType property +func (m *OathTokenMetadata) SetTokenType(value *string)() { + m.tokenType = value +} diff --git a/src/internal/connector/graph/betasdk/models/oath_token_metadataable.go b/src/internal/connector/graph/betasdk/models/oath_token_metadataable.go new file mode 100644 index 000000000..d45a6b880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oath_token_metadataable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OathTokenMetadataable +type OathTokenMetadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetManufacturer()(*string) + GetManufacturerProperties()([]KeyValueable) + GetOdataType()(*string) + GetSerialNumber()(*string) + GetTokenType()(*string) + SetEnabled(value *bool)() + SetManufacturer(value *string)() + SetManufacturerProperties(value []KeyValueable)() + SetOdataType(value *string)() + SetSerialNumber(value *string)() + SetTokenType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_definition.go b/src/internal/connector/graph/betasdk/models/object_definition.go new file mode 100644 index 000000000..427ba4a51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_definition.go @@ -0,0 +1,195 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectDefinition +type ObjectDefinition 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 attributes property + attributes []AttributeDefinitionable + // The metadata property + metadata []MetadataEntryable + // The name property + name *string + // The OdataType property + odataType *string + // The supportedApis property + supportedApis []string +} +// NewObjectDefinition instantiates a new objectDefinition and sets the default values. +func NewObjectDefinition()(*ObjectDefinition) { + m := &ObjectDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateObjectDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectDefinition(), 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 *ObjectDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttributes gets the attributes property value. The attributes property +func (m *ObjectDefinition) GetAttributes()([]AttributeDefinitionable) { + return m.attributes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(AttributeDefinitionable) + } + m.SetAttributes(res) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetadataEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetadataEntryable, len(val)) + for i, v := range val { + res[i] = v.(MetadataEntryable) + } + m.SetMetadata(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["supportedApis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedApis(res) + } + return nil + } + return res +} +// GetMetadata gets the metadata property value. The metadata property +func (m *ObjectDefinition) GetMetadata()([]MetadataEntryable) { + return m.metadata +} +// GetName gets the name property value. The name property +func (m *ObjectDefinition) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ObjectDefinition) GetOdataType()(*string) { + return m.odataType +} +// GetSupportedApis gets the supportedApis property value. The supportedApis property +func (m *ObjectDefinition) GetSupportedApis()([]string) { + return m.supportedApis +} +// Serialize serializes information the current object +func (m *ObjectDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttributes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttributes())) + for i, v := range m.GetAttributes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("attributes", cast) + if err != nil { + return err + } + } + if m.GetMetadata() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadata())) + for i, v := range m.GetMetadata() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("metadata", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSupportedApis() != nil { + err := writer.WriteCollectionOfStringValues("supportedApis", m.GetSupportedApis()) + 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 *ObjectDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttributes sets the attributes property value. The attributes property +func (m *ObjectDefinition) SetAttributes(value []AttributeDefinitionable)() { + m.attributes = value +} +// SetMetadata sets the metadata property value. The metadata property +func (m *ObjectDefinition) SetMetadata(value []MetadataEntryable)() { + m.metadata = value +} +// SetName sets the name property value. The name property +func (m *ObjectDefinition) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ObjectDefinition) SetOdataType(value *string)() { + m.odataType = value +} +// SetSupportedApis sets the supportedApis property value. The supportedApis property +func (m *ObjectDefinition) SetSupportedApis(value []string)() { + m.supportedApis = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/object_definition_collection_response.go new file mode 100644 index 000000000..0eabbb856 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectDefinitionCollectionResponse +type ObjectDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ObjectDefinitionable +} +// NewObjectDefinitionCollectionResponse instantiates a new ObjectDefinitionCollectionResponse and sets the default values. +func NewObjectDefinitionCollectionResponse()(*ObjectDefinitionCollectionResponse) { + m := &ObjectDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateObjectDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateObjectDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ObjectDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(ObjectDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ObjectDefinitionCollectionResponse) GetValue()([]ObjectDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ObjectDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ObjectDefinitionCollectionResponse) SetValue(value []ObjectDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/object_definition_collection_responseable.go new file mode 100644 index 000000000..cafd4efd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectDefinitionCollectionResponseable +type ObjectDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ObjectDefinitionable) + SetValue(value []ObjectDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_definitionable.go b/src/internal/connector/graph/betasdk/models/object_definitionable.go new file mode 100644 index 000000000..ab0fb6e5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_definitionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectDefinitionable +type ObjectDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributes()([]AttributeDefinitionable) + GetMetadata()([]MetadataEntryable) + GetName()(*string) + GetOdataType()(*string) + GetSupportedApis()([]string) + SetAttributes(value []AttributeDefinitionable)() + SetMetadata(value []MetadataEntryable)() + SetName(value *string)() + SetOdataType(value *string)() + SetSupportedApis(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_flow_types.go b/src/internal/connector/graph/betasdk/models/object_flow_types.go new file mode 100644 index 000000000..d2c339d3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_flow_types.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ObjectFlowTypes int + +const ( + NONE_OBJECTFLOWTYPES ObjectFlowTypes = iota + ADD_OBJECTFLOWTYPES + UPDATE_OBJECTFLOWTYPES + DELETE_OBJECTFLOWTYPES +) + +func (i ObjectFlowTypes) String() string { + return []string{"None", "Add", "Update", "Delete"}[i] +} +func ParseObjectFlowTypes(v string) (interface{}, error) { + result := NONE_OBJECTFLOWTYPES + switch v { + case "None": + result = NONE_OBJECTFLOWTYPES + case "Add": + result = ADD_OBJECTFLOWTYPES + case "Update": + result = UPDATE_OBJECTFLOWTYPES + case "Delete": + result = DELETE_OBJECTFLOWTYPES + default: + return 0, errors.New("Unknown ObjectFlowTypes value: " + v) + } + return &result, nil +} +func SerializeObjectFlowTypes(values []ObjectFlowTypes) []string { + 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/object_identity.go b/src/internal/connector/graph/betasdk/models/object_identity.go new file mode 100644 index 000000000..4e8e05ea8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_identity.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectIdentity +type ObjectIdentity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. + issuer *string + // Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with an alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or Supports $filter. 64 character limit. + issuerAssignedId *string + // The OdataType property + odataType *string + // Specifies the user sign-in types in your directory, such as emailAddress, userName, federated, or userPrincipalName. federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Setting or updating a userPrincipalName identity will update the value of the userPrincipalName property on the user object. The validations performed on the userPrincipalName property on the user object, for example, verified domains and acceptable characters, will be performed when setting or updating a userPrincipalName identity. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. + signInType *string +} +// NewObjectIdentity instantiates a new objectIdentity and sets the default values. +func NewObjectIdentity()(*ObjectIdentity) { + m := &ObjectIdentity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateObjectIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectIdentity(), 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 *ObjectIdentity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuer(val) + } + return nil + } + res["issuerAssignedId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuerAssignedId(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["signInType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInType(val) + } + return nil + } + return res +} +// GetIssuer gets the issuer property value. Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. +func (m *ObjectIdentity) GetIssuer()(*string) { + return m.issuer +} +// GetIssuerAssignedId gets the issuerAssignedId property value. Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with an alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or Supports $filter. 64 character limit. +func (m *ObjectIdentity) GetIssuerAssignedId()(*string) { + return m.issuerAssignedId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ObjectIdentity) GetOdataType()(*string) { + return m.odataType +} +// GetSignInType gets the signInType property value. Specifies the user sign-in types in your directory, such as emailAddress, userName, federated, or userPrincipalName. federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Setting or updating a userPrincipalName identity will update the value of the userPrincipalName property on the user object. The validations performed on the userPrincipalName property on the user object, for example, verified domains and acceptable characters, will be performed when setting or updating a userPrincipalName identity. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +func (m *ObjectIdentity) GetSignInType()(*string) { + return m.signInType +} +// Serialize serializes information the current object +func (m *ObjectIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("issuer", m.GetIssuer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issuerAssignedId", m.GetIssuerAssignedId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signInType", m.GetSignInType()) + 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 *ObjectIdentity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIssuer sets the issuer property value. Specifies the issuer of the identity, for example facebook.com.For local accounts (where signInType is not federated), this property is the local B2C tenant default domain name, for example contoso.onmicrosoft.com.For external users from other Azure AD organization, this will be the domain of the federated organization, for example contoso.com.Supports $filter. 512 character limit. +func (m *ObjectIdentity) SetIssuer(value *string)() { + m.issuer = value +} +// SetIssuerAssignedId sets the issuerAssignedId property value. Specifies the unique identifier assigned to the user by the issuer. The combination of issuer and issuerAssignedId must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).When signInType is set to: emailAddress, (or a custom string that starts with emailAddress like emailAddress1) issuerAssignedId must be a valid email addressuserName, issuerAssignedId must begin with an alphabetical character or number, and can only contain alphanumeric characters and the following symbols: - or Supports $filter. 64 character limit. +func (m *ObjectIdentity) SetIssuerAssignedId(value *string)() { + m.issuerAssignedId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ObjectIdentity) SetOdataType(value *string)() { + m.odataType = value +} +// SetSignInType sets the signInType property value. Specifies the user sign-in types in your directory, such as emailAddress, userName, federated, or userPrincipalName. federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. Setting or updating a userPrincipalName identity will update the value of the userPrincipalName property on the user object. The validations performed on the userPrincipalName property on the user object, for example, verified domains and acceptable characters, will be performed when setting or updating a userPrincipalName identity. Additional validation is enforced on issuerAssignedId when the sign-in type is set to emailAddress or userName. This property can also be set to any custom string. +func (m *ObjectIdentity) SetSignInType(value *string)() { + m.signInType = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_identity_collection_response.go b/src/internal/connector/graph/betasdk/models/object_identity_collection_response.go new file mode 100644 index 000000000..9fd30e0d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_identity_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectIdentityCollectionResponse +type ObjectIdentityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ObjectIdentityable +} +// NewObjectIdentityCollectionResponse instantiates a new ObjectIdentityCollectionResponse and sets the default values. +func NewObjectIdentityCollectionResponse()(*ObjectIdentityCollectionResponse) { + m := &ObjectIdentityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateObjectIdentityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectIdentityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectIdentityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectIdentityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateObjectIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ObjectIdentityable, len(val)) + for i, v := range val { + res[i] = v.(ObjectIdentityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ObjectIdentityCollectionResponse) GetValue()([]ObjectIdentityable) { + return m.value +} +// Serialize serializes information the current object +func (m *ObjectIdentityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ObjectIdentityCollectionResponse) SetValue(value []ObjectIdentityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_identity_collection_responseable.go b/src/internal/connector/graph/betasdk/models/object_identity_collection_responseable.go new file mode 100644 index 000000000..5c1f56ba0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_identity_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectIdentityCollectionResponseable +type ObjectIdentityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ObjectIdentityable) + SetValue(value []ObjectIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_identityable.go b/src/internal/connector/graph/betasdk/models/object_identityable.go new file mode 100644 index 000000000..92384684f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_identityable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectIdentityable +type ObjectIdentityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssuer()(*string) + GetIssuerAssignedId()(*string) + GetOdataType()(*string) + GetSignInType()(*string) + SetIssuer(value *string)() + SetIssuerAssignedId(value *string)() + SetOdataType(value *string)() + SetSignInType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_mapping.go b/src/internal/connector/graph/betasdk/models/object_mapping.go new file mode 100644 index 000000000..33e210737 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_mapping.go @@ -0,0 +1,296 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectMapping +type ObjectMapping struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values. + attributeMappings []AttributeMappingable + // When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped. + enabled *bool + // The flowTypes property + flowTypes *ObjectFlowTypes + // Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. + metadata []MetadataEntryable + // Human-friendly name of the object mapping. + name *string + // The OdataType property + odataType *string + // Defines a filter to be used when deciding whether a given object should be provisioned. For example, you might want to only provision users that are located in the US. + scope Filterable + // Name of the object in the source directory. Must match the object name from the source directory definition. + sourceObjectName *string + // Name of the object in target directory. Must match the object name from the target directory definition. + targetObjectName *string +} +// NewObjectMapping instantiates a new objectMapping and sets the default values. +func NewObjectMapping()(*ObjectMapping) { + m := &ObjectMapping{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateObjectMappingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectMappingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectMapping(), 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 *ObjectMapping) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttributeMappings gets the attributeMappings property value. Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values. +func (m *ObjectMapping) GetAttributeMappings()([]AttributeMappingable) { + return m.attributeMappings +} +// GetEnabled gets the enabled property value. When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped. +func (m *ObjectMapping) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectMapping) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attributeMappings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttributeMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AttributeMappingable, len(val)) + for i, v := range val { + res[i] = v.(AttributeMappingable) + } + m.SetAttributeMappings(res) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["flowTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseObjectFlowTypes) + if err != nil { + return err + } + if val != nil { + m.SetFlowTypes(val.(*ObjectFlowTypes)) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetadataEntryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetadataEntryable, len(val)) + for i, v := range val { + res[i] = v.(MetadataEntryable) + } + m.SetMetadata(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(Filterable)) + } + return nil + } + res["sourceObjectName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceObjectName(val) + } + return nil + } + res["targetObjectName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetObjectName(val) + } + return nil + } + return res +} +// GetFlowTypes gets the flowTypes property value. The flowTypes property +func (m *ObjectMapping) GetFlowTypes()(*ObjectFlowTypes) { + return m.flowTypes +} +// GetMetadata gets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +func (m *ObjectMapping) GetMetadata()([]MetadataEntryable) { + return m.metadata +} +// GetName gets the name property value. Human-friendly name of the object mapping. +func (m *ObjectMapping) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ObjectMapping) GetOdataType()(*string) { + return m.odataType +} +// GetScope gets the scope property value. Defines a filter to be used when deciding whether a given object should be provisioned. For example, you might want to only provision users that are located in the US. +func (m *ObjectMapping) GetScope()(Filterable) { + return m.scope +} +// GetSourceObjectName gets the sourceObjectName property value. Name of the object in the source directory. Must match the object name from the source directory definition. +func (m *ObjectMapping) GetSourceObjectName()(*string) { + return m.sourceObjectName +} +// GetTargetObjectName gets the targetObjectName property value. Name of the object in target directory. Must match the object name from the target directory definition. +func (m *ObjectMapping) GetTargetObjectName()(*string) { + return m.targetObjectName +} +// Serialize serializes information the current object +func (m *ObjectMapping) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAttributeMappings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttributeMappings())) + for i, v := range m.GetAttributeMappings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("attributeMappings", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + if m.GetFlowTypes() != nil { + cast := (*m.GetFlowTypes()).String() + err := writer.WriteStringValue("flowTypes", &cast) + if err != nil { + return err + } + } + if m.GetMetadata() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadata())) + for i, v := range m.GetMetadata() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("metadata", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceObjectName", m.GetSourceObjectName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("targetObjectName", m.GetTargetObjectName()) + 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 *ObjectMapping) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttributeMappings sets the attributeMappings property value. Attribute mappings define which attributes to map from the source object into the target object and how they should flow. A number of functions are available to support the transformation of the original source values. +func (m *ObjectMapping) SetAttributeMappings(value []AttributeMappingable)() { + m.attributeMappings = value +} +// SetEnabled sets the enabled property value. When true, this object mapping will be processed during synchronization. When false, this object mapping will be skipped. +func (m *ObjectMapping) SetEnabled(value *bool)() { + m.enabled = value +} +// SetFlowTypes sets the flowTypes property value. The flowTypes property +func (m *ObjectMapping) SetFlowTypes(value *ObjectFlowTypes)() { + m.flowTypes = value +} +// SetMetadata sets the metadata property value. Additional extension properties. Unless mentioned explicitly, metadata values should not be changed. +func (m *ObjectMapping) SetMetadata(value []MetadataEntryable)() { + m.metadata = value +} +// SetName sets the name property value. Human-friendly name of the object mapping. +func (m *ObjectMapping) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ObjectMapping) SetOdataType(value *string)() { + m.odataType = value +} +// SetScope sets the scope property value. Defines a filter to be used when deciding whether a given object should be provisioned. For example, you might want to only provision users that are located in the US. +func (m *ObjectMapping) SetScope(value Filterable)() { + m.scope = value +} +// SetSourceObjectName sets the sourceObjectName property value. Name of the object in the source directory. Must match the object name from the source directory definition. +func (m *ObjectMapping) SetSourceObjectName(value *string)() { + m.sourceObjectName = value +} +// SetTargetObjectName sets the targetObjectName property value. Name of the object in target directory. Must match the object name from the target directory definition. +func (m *ObjectMapping) SetTargetObjectName(value *string)() { + m.targetObjectName = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_mapping_collection_response.go b/src/internal/connector/graph/betasdk/models/object_mapping_collection_response.go new file mode 100644 index 000000000..9d75f3f93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_mapping_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectMappingCollectionResponse +type ObjectMappingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ObjectMappingable +} +// NewObjectMappingCollectionResponse instantiates a new ObjectMappingCollectionResponse and sets the default values. +func NewObjectMappingCollectionResponse()(*ObjectMappingCollectionResponse) { + m := &ObjectMappingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateObjectMappingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateObjectMappingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewObjectMappingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ObjectMappingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateObjectMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ObjectMappingable, len(val)) + for i, v := range val { + res[i] = v.(ObjectMappingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ObjectMappingCollectionResponse) GetValue()([]ObjectMappingable) { + return m.value +} +// Serialize serializes information the current object +func (m *ObjectMappingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ObjectMappingCollectionResponse) SetValue(value []ObjectMappingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/object_mapping_collection_responseable.go b/src/internal/connector/graph/betasdk/models/object_mapping_collection_responseable.go new file mode 100644 index 000000000..651ebc834 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_mapping_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectMappingCollectionResponseable +type ObjectMappingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ObjectMappingable) + SetValue(value []ObjectMappingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/object_mappingable.go b/src/internal/connector/graph/betasdk/models/object_mappingable.go new file mode 100644 index 000000000..fffb8d350 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/object_mappingable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ObjectMappingable +type ObjectMappingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttributeMappings()([]AttributeMappingable) + GetEnabled()(*bool) + GetFlowTypes()(*ObjectFlowTypes) + GetMetadata()([]MetadataEntryable) + GetName()(*string) + GetOdataType()(*string) + GetScope()(Filterable) + GetSourceObjectName()(*string) + GetTargetObjectName()(*string) + SetAttributeMappings(value []AttributeMappingable)() + SetEnabled(value *bool)() + SetFlowTypes(value *ObjectFlowTypes)() + SetMetadata(value []MetadataEntryable)() + SetName(value *string)() + SetOdataType(value *string)() + SetScope(value Filterable)() + SetSourceObjectName(value *string)() + SetTargetObjectName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/error_details.go b/src/internal/connector/graph/betasdk/models/odataerrors/error_details.go new file mode 100644 index 000000000..3a2cf3078 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/error_details.go @@ -0,0 +1,123 @@ +package odataerrors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ErrorDetails +type ErrorDetails 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 code property + code *string + // The message property + message *string + // The target property + target *string +} +// NewErrorDetails instantiates a new ErrorDetails and sets the default values. +func NewErrorDetails()(*ErrorDetails) { + m := &ErrorDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateErrorDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateErrorDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewErrorDetails(), 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 *ErrorDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The code property +func (m *ErrorDetails) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ErrorDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message property +func (m *ErrorDetails) GetMessage()(*string) { + return m.message +} +// GetTarget gets the target property value. The target property +func (m *ErrorDetails) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *ErrorDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *ErrorDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *ErrorDetails) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The message property +func (m *ErrorDetails) SetMessage(value *string)() { + m.message = value +} +// SetTarget sets the target property value. The target property +func (m *ErrorDetails) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/error_detailsable.go b/src/internal/connector/graph/betasdk/models/odataerrors/error_detailsable.go new file mode 100644 index 000000000..cebf80f08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/error_detailsable.go @@ -0,0 +1,17 @@ +package odataerrors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ErrorDetailsable +type ErrorDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/inner_error.go b/src/internal/connector/graph/betasdk/models/odataerrors/inner_error.go new file mode 100644 index 000000000..90ba6c4cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/inner_error.go @@ -0,0 +1,150 @@ +package odataerrors + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InnerError +type InnerError struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Client request Id as sent by the client application. + clientRequestId *string + // Date when the error occured. + date *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Request Id as tracked internally by the service + requestId *string +} +// NewInnerError instantiates a new InnerError and sets the default values. +func NewInnerError()(*InnerError) { + m := &InnerError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInnerErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInnerErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInnerError(), 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 *InnerError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClientRequestId gets the client-request-id property value. Client request Id as sent by the client application. +func (m *InnerError) GetClientRequestId()(*string) { + return m.clientRequestId +} +// GetDate gets the date property value. Date when the error occured. +func (m *InnerError) GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.date +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InnerError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["client-request-id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientRequestId(val) + } + return nil + } + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(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["request-id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InnerError) GetOdataType()(*string) { + return m.odataType +} +// GetRequestId gets the request-id property value. Request Id as tracked internally by the service +func (m *InnerError) GetRequestId()(*string) { + return m.requestId +} +// Serialize serializes information the current object +func (m *InnerError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("client-request-id", m.GetClientRequestId()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("request-id", m.GetRequestId()) + 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 *InnerError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClientRequestId sets the client-request-id property value. Client request Id as sent by the client application. +func (m *InnerError) SetClientRequestId(value *string)() { + m.clientRequestId = value +} +// SetDate sets the date property value. Date when the error occured. +func (m *InnerError) SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.date = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InnerError) SetOdataType(value *string)() { + m.odataType = value +} +// SetRequestId sets the request-id property value. Request Id as tracked internally by the service +func (m *InnerError) SetRequestId(value *string)() { + m.requestId = value +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/inner_errorable.go b/src/internal/connector/graph/betasdk/models/odataerrors/inner_errorable.go new file mode 100644 index 000000000..d6bd2e6cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/inner_errorable.go @@ -0,0 +1,20 @@ +package odataerrors + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InnerErrorable +type InnerErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientRequestId()(*string) + GetDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetRequestId()(*string) + SetClientRequestId(value *string)() + SetDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetRequestId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/main_error.go b/src/internal/connector/graph/betasdk/models/odataerrors/main_error.go new file mode 100644 index 000000000..ed4856cc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/main_error.go @@ -0,0 +1,183 @@ +package odataerrors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MainError +type MainError 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 code property + code *string + // The details property + details []ErrorDetailsable + // The innererror property + innererror InnerErrorable + // The message property + message *string + // The target property + target *string +} +// NewMainError instantiates a new MainError and sets the default values. +func NewMainError()(*MainError) { + m := &MainError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateMainErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMainErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMainError(), 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 *MainError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The code property +func (m *MainError) GetCode()(*string) { + return m.code +} +// GetDetails gets the details property value. The details property +func (m *MainError) GetDetails()([]ErrorDetailsable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MainError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateErrorDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ErrorDetailsable, len(val)) + for i, v := range val { + res[i] = v.(ErrorDetailsable) + } + m.SetDetails(res) + } + return nil + } + res["innererror"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInnerErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInnererror(val.(InnerErrorable)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetInnererror gets the innererror property value. The innererror property +func (m *MainError) GetInnererror()(InnerErrorable) { + return m.innererror +} +// GetMessage gets the message property value. The message property +func (m *MainError) GetMessage()(*string) { + return m.message +} +// GetTarget gets the target property value. The target property +func (m *MainError) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *MainError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + if m.GetDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetails())) + for i, v := range m.GetDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("details", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("innererror", m.GetInnererror()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *MainError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The code property +func (m *MainError) SetCode(value *string)() { + m.code = value +} +// SetDetails sets the details property value. The details property +func (m *MainError) SetDetails(value []ErrorDetailsable)() { + m.details = value +} +// SetInnererror sets the innererror property value. The innererror property +func (m *MainError) SetInnererror(value InnerErrorable)() { + m.innererror = value +} +// SetMessage sets the message property value. The message property +func (m *MainError) SetMessage(value *string)() { + m.message = value +} +// SetTarget sets the target property value. The target property +func (m *MainError) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/main_errorable.go b/src/internal/connector/graph/betasdk/models/odataerrors/main_errorable.go new file mode 100644 index 000000000..6c07d3c11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/main_errorable.go @@ -0,0 +1,21 @@ +package odataerrors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MainErrorable +type MainErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDetails()([]ErrorDetailsable) + GetInnererror()(InnerErrorable) + GetMessage()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetDetails(value []ErrorDetailsable)() + SetInnererror(value InnerErrorable)() + SetMessage(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/o_data_error.go b/src/internal/connector/graph/betasdk/models/odataerrors/o_data_error.go new file mode 100644 index 000000000..498104271 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/o_data_error.go @@ -0,0 +1,74 @@ +package odataerrors + +import ( + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f "github.com/microsoft/kiota-abstractions-go" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ODataError +type ODataError struct { + i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.ApiError + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The error property + error MainErrorable +} +// NewODataError instantiates a new ODataError and sets the default values. +func NewODataError()(*ODataError) { + m := &ODataError{ + ApiError: *i2ae4187f7daee263371cb1c977df639813ab50ffa529013b7437480d1ec0158f.NewApiError(), + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateODataErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateODataErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewODataError(), 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 *ODataError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetError gets the error property value. The error property +func (m *ODataError) GetError()(MainErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ODataError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMainErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(MainErrorable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ODataError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("error", m.GetError()) + 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 *ODataError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetError sets the error property value. The error property +func (m *ODataError) SetError(value MainErrorable)() { + m.error = value +} diff --git a/src/internal/connector/graph/betasdk/models/odataerrors/o_data_errorable.go b/src/internal/connector/graph/betasdk/models/odataerrors/o_data_errorable.go new file mode 100644 index 000000000..99602e83a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/odataerrors/o_data_errorable.go @@ -0,0 +1,13 @@ +package odataerrors + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ODataErrorable +type ODataErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(MainErrorable) + SetError(value MainErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding.go b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding.go new file mode 100644 index 000000000..e069494a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OemWarrantyInformationOnboarding warranty status entity for a given OEM +type OemWarrantyInformationOnboarding struct { + Entity + // Specifies whether warranty API is available. This property is read-only. + available *bool + // Specifies whether warranty query is enabled for given OEM. This property is read-only. + enabled *bool + // OEM name. This property is read-only. + oemName *string +} +// NewOemWarrantyInformationOnboarding instantiates a new oemWarrantyInformationOnboarding and sets the default values. +func NewOemWarrantyInformationOnboarding()(*OemWarrantyInformationOnboarding) { + m := &OemWarrantyInformationOnboarding{ + Entity: *NewEntity(), + } + return m +} +// CreateOemWarrantyInformationOnboardingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOemWarrantyInformationOnboardingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOemWarrantyInformationOnboarding(), nil +} +// GetAvailable gets the available property value. Specifies whether warranty API is available. This property is read-only. +func (m *OemWarrantyInformationOnboarding) GetAvailable()(*bool) { + return m.available +} +// GetEnabled gets the enabled property value. Specifies whether warranty query is enabled for given OEM. This property is read-only. +func (m *OemWarrantyInformationOnboarding) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OemWarrantyInformationOnboarding) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["available"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailable(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["oemName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOemName(val) + } + return nil + } + return res +} +// GetOemName gets the oemName property value. OEM name. This property is read-only. +func (m *OemWarrantyInformationOnboarding) GetOemName()(*string) { + return m.oemName +} +// Serialize serializes information the current object +func (m *OemWarrantyInformationOnboarding) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} +// SetAvailable sets the available property value. Specifies whether warranty API is available. This property is read-only. +func (m *OemWarrantyInformationOnboarding) SetAvailable(value *bool)() { + m.available = value +} +// SetEnabled sets the enabled property value. Specifies whether warranty query is enabled for given OEM. This property is read-only. +func (m *OemWarrantyInformationOnboarding) SetEnabled(value *bool)() { + m.enabled = value +} +// SetOemName sets the oemName property value. OEM name. This property is read-only. +func (m *OemWarrantyInformationOnboarding) SetOemName(value *string)() { + m.oemName = value +} diff --git a/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_response.go b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_response.go new file mode 100644 index 000000000..c609f9aec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OemWarrantyInformationOnboardingCollectionResponse +type OemWarrantyInformationOnboardingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OemWarrantyInformationOnboardingable +} +// NewOemWarrantyInformationOnboardingCollectionResponse instantiates a new OemWarrantyInformationOnboardingCollectionResponse and sets the default values. +func NewOemWarrantyInformationOnboardingCollectionResponse()(*OemWarrantyInformationOnboardingCollectionResponse) { + m := &OemWarrantyInformationOnboardingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOemWarrantyInformationOnboardingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOemWarrantyInformationOnboardingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOemWarrantyInformationOnboardingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OemWarrantyInformationOnboardingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOemWarrantyInformationOnboardingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OemWarrantyInformationOnboardingable, len(val)) + for i, v := range val { + res[i] = v.(OemWarrantyInformationOnboardingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OemWarrantyInformationOnboardingCollectionResponse) GetValue()([]OemWarrantyInformationOnboardingable) { + return m.value +} +// Serialize serializes information the current object +func (m *OemWarrantyInformationOnboardingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OemWarrantyInformationOnboardingCollectionResponse) SetValue(value []OemWarrantyInformationOnboardingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_responseable.go b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_responseable.go new file mode 100644 index 000000000..56f20796f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboarding_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OemWarrantyInformationOnboardingCollectionResponseable +type OemWarrantyInformationOnboardingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OemWarrantyInformationOnboardingable) + SetValue(value []OemWarrantyInformationOnboardingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboardingable.go b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboardingable.go new file mode 100644 index 000000000..cd5568be1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oem_warranty_information_onboardingable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OemWarrantyInformationOnboardingable +type OemWarrantyInformationOnboardingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAvailable()(*bool) + GetEnabled()(*bool) + GetOemName()(*string) + SetAvailable(value *bool)() + SetEnabled(value *bool)() + SetOemName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/offer_shift_request.go b/src/internal/connector/graph/betasdk/models/offer_shift_request.go new file mode 100644 index 000000000..8b1ffb501 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/offer_shift_request.go @@ -0,0 +1,153 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfferShiftRequest +type OfferShiftRequest struct { + ScheduleChangeRequest + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + recipientActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Custom message sent by recipient of the offer shift request. + recipientActionMessage *string + // User id of the recipient of the offer shift request. + recipientUserId *string + // User id of the sender of the offer shift request. + senderShiftId *string +} +// NewOfferShiftRequest instantiates a new OfferShiftRequest and sets the default values. +func NewOfferShiftRequest()(*OfferShiftRequest) { + m := &OfferShiftRequest{ + ScheduleChangeRequest: *NewScheduleChangeRequest(), + } + odataTypeValue := "#microsoft.graph.offerShiftRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOfferShiftRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfferShiftRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.swapShiftsChangeRequest": + return NewSwapShiftsChangeRequest(), nil + } + } + } + } + return NewOfferShiftRequest(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfferShiftRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ScheduleChangeRequest.GetFieldDeserializers() + res["recipientActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientActionDateTime(val) + } + return nil + } + res["recipientActionMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientActionMessage(val) + } + return nil + } + res["recipientUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientUserId(val) + } + return nil + } + res["senderShiftId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderShiftId(val) + } + return nil + } + return res +} +// GetRecipientActionDateTime gets the recipientActionDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OfferShiftRequest) GetRecipientActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.recipientActionDateTime +} +// GetRecipientActionMessage gets the recipientActionMessage property value. Custom message sent by recipient of the offer shift request. +func (m *OfferShiftRequest) GetRecipientActionMessage()(*string) { + return m.recipientActionMessage +} +// GetRecipientUserId gets the recipientUserId property value. User id of the recipient of the offer shift request. +func (m *OfferShiftRequest) GetRecipientUserId()(*string) { + return m.recipientUserId +} +// GetSenderShiftId gets the senderShiftId property value. User id of the sender of the offer shift request. +func (m *OfferShiftRequest) GetSenderShiftId()(*string) { + return m.senderShiftId +} +// Serialize serializes information the current object +func (m *OfferShiftRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ScheduleChangeRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("recipientActionMessage", m.GetRecipientActionMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientUserId", m.GetRecipientUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("senderShiftId", m.GetSenderShiftId()) + if err != nil { + return err + } + } + return nil +} +// SetRecipientActionDateTime sets the recipientActionDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OfferShiftRequest) SetRecipientActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.recipientActionDateTime = value +} +// SetRecipientActionMessage sets the recipientActionMessage property value. Custom message sent by recipient of the offer shift request. +func (m *OfferShiftRequest) SetRecipientActionMessage(value *string)() { + m.recipientActionMessage = value +} +// SetRecipientUserId sets the recipientUserId property value. User id of the recipient of the offer shift request. +func (m *OfferShiftRequest) SetRecipientUserId(value *string)() { + m.recipientUserId = value +} +// SetSenderShiftId sets the senderShiftId property value. User id of the sender of the offer shift request. +func (m *OfferShiftRequest) SetSenderShiftId(value *string)() { + m.senderShiftId = value +} diff --git a/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_response.go b/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_response.go new file mode 100644 index 000000000..b58fd935c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfferShiftRequestCollectionResponse +type OfferShiftRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OfferShiftRequestable +} +// NewOfferShiftRequestCollectionResponse instantiates a new OfferShiftRequestCollectionResponse and sets the default values. +func NewOfferShiftRequestCollectionResponse()(*OfferShiftRequestCollectionResponse) { + m := &OfferShiftRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOfferShiftRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfferShiftRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfferShiftRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfferShiftRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfferShiftRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfferShiftRequestable, len(val)) + for i, v := range val { + res[i] = v.(OfferShiftRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OfferShiftRequestCollectionResponse) GetValue()([]OfferShiftRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *OfferShiftRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OfferShiftRequestCollectionResponse) SetValue(value []OfferShiftRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_responseable.go new file mode 100644 index 000000000..4ebb12e34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/offer_shift_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfferShiftRequestCollectionResponseable +type OfferShiftRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OfferShiftRequestable) + SetValue(value []OfferShiftRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/offer_shift_requestable.go b/src/internal/connector/graph/betasdk/models/offer_shift_requestable.go new file mode 100644 index 000000000..c16e37c97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/offer_shift_requestable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfferShiftRequestable +type OfferShiftRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ScheduleChangeRequestable + GetRecipientActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecipientActionMessage()(*string) + GetRecipientUserId()(*string) + GetSenderShiftId()(*string) + SetRecipientActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecipientActionMessage(value *string)() + SetRecipientUserId(value *string)() + SetSenderShiftId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_active_user_counts.go b/src/internal/connector/graph/betasdk/models/office365_active_user_counts.go new file mode 100644 index 000000000..2b20c08a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_active_user_counts.go @@ -0,0 +1,294 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ActiveUserCounts +type Office365ActiveUserCounts struct { + Entity + // The number of active users in Exchange. Any user who can read and send email is considered an active user. + exchange *int64 + // The number of active users in Microsoft 365. This number includes all the active users in Exchange, OneDrive, SharePoint, Skype For Business, Yammer, and Microsoft Teams. You can find the definition of active user for each product in the respective property description. + office365 *int64 + // The number of active users in OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. + oneDrive *int64 + // The date on which a number of users were active. + reportDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of active users in SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. + sharePoint *int64 + // The number of active users in Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. + skypeForBusiness *int64 + // The number of active users in Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. + teams *int64 + // The number of active users in Yammer. Any user who can post, read, or like messages is considered an active user. + yammer *int64 +} +// NewOffice365ActiveUserCounts instantiates a new Office365ActiveUserCounts and sets the default values. +func NewOffice365ActiveUserCounts()(*Office365ActiveUserCounts) { + m := &Office365ActiveUserCounts{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365ActiveUserCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365ActiveUserCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365ActiveUserCounts(), nil +} +// GetExchange gets the exchange property value. The number of active users in Exchange. Any user who can read and send email is considered an active user. +func (m *Office365ActiveUserCounts) GetExchange()(*int64) { + return m.exchange +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365ActiveUserCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exchange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchange(val) + } + return nil + } + res["office365"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOffice365(val) + } + return nil + } + res["oneDrive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOneDrive(val) + } + return nil + } + res["reportDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportDate(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["sharePoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePoint(val) + } + return nil + } + res["skypeForBusiness"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSkypeForBusiness(val) + } + return nil + } + res["teams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeams(val) + } + return nil + } + res["yammer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammer(val) + } + return nil + } + return res +} +// GetOffice365 gets the office365 property value. The number of active users in Microsoft 365. This number includes all the active users in Exchange, OneDrive, SharePoint, Skype For Business, Yammer, and Microsoft Teams. You can find the definition of active user for each product in the respective property description. +func (m *Office365ActiveUserCounts) GetOffice365()(*int64) { + return m.office365 +} +// GetOneDrive gets the oneDrive property value. The number of active users in OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. +func (m *Office365ActiveUserCounts) GetOneDrive()(*int64) { + return m.oneDrive +} +// GetReportDate gets the reportDate property value. The date on which a number of users were active. +func (m *Office365ActiveUserCounts) GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportDate +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365ActiveUserCounts) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ActiveUserCounts) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetSharePoint gets the sharePoint property value. The number of active users in SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. +func (m *Office365ActiveUserCounts) GetSharePoint()(*int64) { + return m.sharePoint +} +// GetSkypeForBusiness gets the skypeForBusiness property value. The number of active users in Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. +func (m *Office365ActiveUserCounts) GetSkypeForBusiness()(*int64) { + return m.skypeForBusiness +} +// GetTeams gets the teams property value. The number of active users in Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. +func (m *Office365ActiveUserCounts) GetTeams()(*int64) { + return m.teams +} +// GetYammer gets the yammer property value. The number of active users in Yammer. Any user who can post, read, or like messages is considered an active user. +func (m *Office365ActiveUserCounts) GetYammer()(*int64) { + return m.yammer +} +// Serialize serializes information the current object +func (m *Office365ActiveUserCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("exchange", m.GetExchange()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("office365", m.GetOffice365()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("oneDrive", m.GetOneDrive()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportDate", m.GetReportDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePoint", m.GetSharePoint()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("skypeForBusiness", m.GetSkypeForBusiness()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teams", m.GetTeams()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammer", m.GetYammer()) + if err != nil { + return err + } + } + return nil +} +// SetExchange sets the exchange property value. The number of active users in Exchange. Any user who can read and send email is considered an active user. +func (m *Office365ActiveUserCounts) SetExchange(value *int64)() { + m.exchange = value +} +// SetOffice365 sets the office365 property value. The number of active users in Microsoft 365. This number includes all the active users in Exchange, OneDrive, SharePoint, Skype For Business, Yammer, and Microsoft Teams. You can find the definition of active user for each product in the respective property description. +func (m *Office365ActiveUserCounts) SetOffice365(value *int64)() { + m.office365 = value +} +// SetOneDrive sets the oneDrive property value. The number of active users in OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. +func (m *Office365ActiveUserCounts) SetOneDrive(value *int64)() { + m.oneDrive = value +} +// SetReportDate sets the reportDate property value. The date on which a number of users were active. +func (m *Office365ActiveUserCounts) SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportDate = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365ActiveUserCounts) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ActiveUserCounts) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetSharePoint sets the sharePoint property value. The number of active users in SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. +func (m *Office365ActiveUserCounts) SetSharePoint(value *int64)() { + m.sharePoint = value +} +// SetSkypeForBusiness sets the skypeForBusiness property value. The number of active users in Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. +func (m *Office365ActiveUserCounts) SetSkypeForBusiness(value *int64)() { + m.skypeForBusiness = value +} +// SetTeams sets the teams property value. The number of active users in Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. +func (m *Office365ActiveUserCounts) SetTeams(value *int64)() { + m.teams = value +} +// SetYammer sets the yammer property value. The number of active users in Yammer. Any user who can post, read, or like messages is considered an active user. +func (m *Office365ActiveUserCounts) SetYammer(value *int64)() { + m.yammer = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_active_user_countsable.go b/src/internal/connector/graph/betasdk/models/office365_active_user_countsable.go new file mode 100644 index 000000000..d57853dc0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_active_user_countsable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ActiveUserCountsable +type Office365ActiveUserCountsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExchange()(*int64) + GetOffice365()(*int64) + GetOneDrive()(*int64) + GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSharePoint()(*int64) + GetSkypeForBusiness()(*int64) + GetTeams()(*int64) + GetYammer()(*int64) + SetExchange(value *int64)() + SetOffice365(value *int64)() + SetOneDrive(value *int64)() + SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSharePoint(value *int64)() + SetSkypeForBusiness(value *int64)() + SetTeams(value *int64)() + SetYammer(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_active_user_detail.go b/src/internal/connector/graph/betasdk/models/office365_active_user_detail.go new file mode 100644 index 000000000..5ba225328 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_active_user_detail.go @@ -0,0 +1,662 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ActiveUserDetail +type Office365ActiveUserDetail struct { + Entity + // All the products assigned for the user. + assignedProducts []string + // The date when the delete operation happened. Default value is 'null' when the user has not been deleted. + deletedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. + displayName *string + // The date when user last read or sent email. + exchangeLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned an Exchange license. + exchangeLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Whether the user has been assigned an Exchange license. + hasExchangeLicense *bool + // Whether the user has been assigned a OneDrive license. + hasOneDriveLicense *bool + // Whether the user has been assigned a SharePoint license. + hasSharePointLicense *bool + // Whether the user has been assigned a Skype For Business license. + hasSkypeForBusinessLicense *bool + // Whether the user has been assigned a Teams license. + hasTeamsLicense *bool + // Whether the user has been assigned a Yammer license. + hasYammerLicense *bool + // Whether this user has been deleted or soft deleted. + isDeleted *bool + // The date when user last viewed or edited files, shared files internally or externally, or synced files. + oneDriveLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned a OneDrive license. + oneDriveLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The date when user last viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages. + sharePointLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned a SharePoint license. + sharePointLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The date when user last organized or participated in conferences, or joined peer-to-peer sessions. + skypeForBusinessLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned a Skype For Business license. + skypeForBusinessLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The date when user last posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls. + teamsLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned a Teams license. + teamsLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created. + userPrincipalName *string + // The date when user last posted, read, or liked message. + yammerLastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The last date when the user was assigned a Yammer license. + yammerLicenseAssignDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewOffice365ActiveUserDetail instantiates a new Office365ActiveUserDetail and sets the default values. +func NewOffice365ActiveUserDetail()(*Office365ActiveUserDetail) { + m := &Office365ActiveUserDetail{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365ActiveUserDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365ActiveUserDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365ActiveUserDetail(), nil +} +// GetAssignedProducts gets the assignedProducts property value. All the products assigned for the user. +func (m *Office365ActiveUserDetail) GetAssignedProducts()([]string) { + return m.assignedProducts +} +// GetDeletedDate gets the deletedDate property value. The date when the delete operation happened. Default value is 'null' when the user has not been deleted. +func (m *Office365ActiveUserDetail) GetDeletedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.deletedDate +} +// GetDisplayName gets the displayName property value. The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. +func (m *Office365ActiveUserDetail) GetDisplayName()(*string) { + return m.displayName +} +// GetExchangeLastActivityDate gets the exchangeLastActivityDate property value. The date when user last read or sent email. +func (m *Office365ActiveUserDetail) GetExchangeLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.exchangeLastActivityDate +} +// GetExchangeLicenseAssignDate gets the exchangeLicenseAssignDate property value. The last date when the user was assigned an Exchange license. +func (m *Office365ActiveUserDetail) GetExchangeLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.exchangeLicenseAssignDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365ActiveUserDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignedProducts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAssignedProducts(res) + } + return nil + } + res["deletedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDeletedDate(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["exchangeLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExchangeLastActivityDate(val) + } + return nil + } + res["exchangeLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExchangeLicenseAssignDate(val) + } + return nil + } + res["hasExchangeLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasExchangeLicense(val) + } + return nil + } + res["hasOneDriveLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOneDriveLicense(val) + } + return nil + } + res["hasSharePointLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasSharePointLicense(val) + } + return nil + } + res["hasSkypeForBusinessLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasSkypeForBusinessLicense(val) + } + return nil + } + res["hasTeamsLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasTeamsLicense(val) + } + return nil + } + res["hasYammerLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasYammerLicense(val) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["oneDriveLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetOneDriveLastActivityDate(val) + } + return nil + } + res["oneDriveLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetOneDriveLicenseAssignDate(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["sharePointLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetSharePointLastActivityDate(val) + } + return nil + } + res["sharePointLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetSharePointLicenseAssignDate(val) + } + return nil + } + res["skypeForBusinessLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetSkypeForBusinessLastActivityDate(val) + } + return nil + } + res["skypeForBusinessLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetSkypeForBusinessLicenseAssignDate(val) + } + return nil + } + res["teamsLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsLastActivityDate(val) + } + return nil + } + res["teamsLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamsLicenseAssignDate(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["yammerLastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetYammerLastActivityDate(val) + } + return nil + } + res["yammerLicenseAssignDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetYammerLicenseAssignDate(val) + } + return nil + } + return res +} +// GetHasExchangeLicense gets the hasExchangeLicense property value. Whether the user has been assigned an Exchange license. +func (m *Office365ActiveUserDetail) GetHasExchangeLicense()(*bool) { + return m.hasExchangeLicense +} +// GetHasOneDriveLicense gets the hasOneDriveLicense property value. Whether the user has been assigned a OneDrive license. +func (m *Office365ActiveUserDetail) GetHasOneDriveLicense()(*bool) { + return m.hasOneDriveLicense +} +// GetHasSharePointLicense gets the hasSharePointLicense property value. Whether the user has been assigned a SharePoint license. +func (m *Office365ActiveUserDetail) GetHasSharePointLicense()(*bool) { + return m.hasSharePointLicense +} +// GetHasSkypeForBusinessLicense gets the hasSkypeForBusinessLicense property value. Whether the user has been assigned a Skype For Business license. +func (m *Office365ActiveUserDetail) GetHasSkypeForBusinessLicense()(*bool) { + return m.hasSkypeForBusinessLicense +} +// GetHasTeamsLicense gets the hasTeamsLicense property value. Whether the user has been assigned a Teams license. +func (m *Office365ActiveUserDetail) GetHasTeamsLicense()(*bool) { + return m.hasTeamsLicense +} +// GetHasYammerLicense gets the hasYammerLicense property value. Whether the user has been assigned a Yammer license. +func (m *Office365ActiveUserDetail) GetHasYammerLicense()(*bool) { + return m.hasYammerLicense +} +// GetIsDeleted gets the isDeleted property value. Whether this user has been deleted or soft deleted. +func (m *Office365ActiveUserDetail) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetOneDriveLastActivityDate gets the oneDriveLastActivityDate property value. The date when user last viewed or edited files, shared files internally or externally, or synced files. +func (m *Office365ActiveUserDetail) GetOneDriveLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.oneDriveLastActivityDate +} +// GetOneDriveLicenseAssignDate gets the oneDriveLicenseAssignDate property value. The last date when the user was assigned a OneDrive license. +func (m *Office365ActiveUserDetail) GetOneDriveLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.oneDriveLicenseAssignDate +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ActiveUserDetail) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetSharePointLastActivityDate gets the sharePointLastActivityDate property value. The date when user last viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages. +func (m *Office365ActiveUserDetail) GetSharePointLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.sharePointLastActivityDate +} +// GetSharePointLicenseAssignDate gets the sharePointLicenseAssignDate property value. The last date when the user was assigned a SharePoint license. +func (m *Office365ActiveUserDetail) GetSharePointLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.sharePointLicenseAssignDate +} +// GetSkypeForBusinessLastActivityDate gets the skypeForBusinessLastActivityDate property value. The date when user last organized or participated in conferences, or joined peer-to-peer sessions. +func (m *Office365ActiveUserDetail) GetSkypeForBusinessLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.skypeForBusinessLastActivityDate +} +// GetSkypeForBusinessLicenseAssignDate gets the skypeForBusinessLicenseAssignDate property value. The last date when the user was assigned a Skype For Business license. +func (m *Office365ActiveUserDetail) GetSkypeForBusinessLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.skypeForBusinessLicenseAssignDate +} +// GetTeamsLastActivityDate gets the teamsLastActivityDate property value. The date when user last posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls. +func (m *Office365ActiveUserDetail) GetTeamsLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.teamsLastActivityDate +} +// GetTeamsLicenseAssignDate gets the teamsLicenseAssignDate property value. The last date when the user was assigned a Teams license. +func (m *Office365ActiveUserDetail) GetTeamsLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.teamsLicenseAssignDate +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created. +func (m *Office365ActiveUserDetail) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetYammerLastActivityDate gets the yammerLastActivityDate property value. The date when user last posted, read, or liked message. +func (m *Office365ActiveUserDetail) GetYammerLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.yammerLastActivityDate +} +// GetYammerLicenseAssignDate gets the yammerLicenseAssignDate property value. The last date when the user was assigned a Yammer license. +func (m *Office365ActiveUserDetail) GetYammerLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.yammerLicenseAssignDate +} +// Serialize serializes information the current object +func (m *Office365ActiveUserDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignedProducts() != nil { + err = writer.WriteCollectionOfStringValues("assignedProducts", m.GetAssignedProducts()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("deletedDate", m.GetDeletedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("exchangeLastActivityDate", m.GetExchangeLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("exchangeLicenseAssignDate", m.GetExchangeLicenseAssignDate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasExchangeLicense", m.GetHasExchangeLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasOneDriveLicense", m.GetHasOneDriveLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasSharePointLicense", m.GetHasSharePointLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasSkypeForBusinessLicense", m.GetHasSkypeForBusinessLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasTeamsLicense", m.GetHasTeamsLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasYammerLicense", m.GetHasYammerLicense()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("oneDriveLastActivityDate", m.GetOneDriveLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("oneDriveLicenseAssignDate", m.GetOneDriveLicenseAssignDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("sharePointLastActivityDate", m.GetSharePointLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("sharePointLicenseAssignDate", m.GetSharePointLicenseAssignDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("skypeForBusinessLastActivityDate", m.GetSkypeForBusinessLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("skypeForBusinessLicenseAssignDate", m.GetSkypeForBusinessLicenseAssignDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("teamsLastActivityDate", m.GetTeamsLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("teamsLicenseAssignDate", m.GetTeamsLicenseAssignDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("yammerLastActivityDate", m.GetYammerLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("yammerLicenseAssignDate", m.GetYammerLicenseAssignDate()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedProducts sets the assignedProducts property value. All the products assigned for the user. +func (m *Office365ActiveUserDetail) SetAssignedProducts(value []string)() { + m.assignedProducts = value +} +// SetDeletedDate sets the deletedDate property value. The date when the delete operation happened. Default value is 'null' when the user has not been deleted. +func (m *Office365ActiveUserDetail) SetDeletedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.deletedDate = value +} +// SetDisplayName sets the displayName property value. The name displayed in the address book for the user. This is usually the combination of the user's first name, middle initial, and last name. This property is required when a user is created and it cannot be cleared during updates. +func (m *Office365ActiveUserDetail) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExchangeLastActivityDate sets the exchangeLastActivityDate property value. The date when user last read or sent email. +func (m *Office365ActiveUserDetail) SetExchangeLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.exchangeLastActivityDate = value +} +// SetExchangeLicenseAssignDate sets the exchangeLicenseAssignDate property value. The last date when the user was assigned an Exchange license. +func (m *Office365ActiveUserDetail) SetExchangeLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.exchangeLicenseAssignDate = value +} +// SetHasExchangeLicense sets the hasExchangeLicense property value. Whether the user has been assigned an Exchange license. +func (m *Office365ActiveUserDetail) SetHasExchangeLicense(value *bool)() { + m.hasExchangeLicense = value +} +// SetHasOneDriveLicense sets the hasOneDriveLicense property value. Whether the user has been assigned a OneDrive license. +func (m *Office365ActiveUserDetail) SetHasOneDriveLicense(value *bool)() { + m.hasOneDriveLicense = value +} +// SetHasSharePointLicense sets the hasSharePointLicense property value. Whether the user has been assigned a SharePoint license. +func (m *Office365ActiveUserDetail) SetHasSharePointLicense(value *bool)() { + m.hasSharePointLicense = value +} +// SetHasSkypeForBusinessLicense sets the hasSkypeForBusinessLicense property value. Whether the user has been assigned a Skype For Business license. +func (m *Office365ActiveUserDetail) SetHasSkypeForBusinessLicense(value *bool)() { + m.hasSkypeForBusinessLicense = value +} +// SetHasTeamsLicense sets the hasTeamsLicense property value. Whether the user has been assigned a Teams license. +func (m *Office365ActiveUserDetail) SetHasTeamsLicense(value *bool)() { + m.hasTeamsLicense = value +} +// SetHasYammerLicense sets the hasYammerLicense property value. Whether the user has been assigned a Yammer license. +func (m *Office365ActiveUserDetail) SetHasYammerLicense(value *bool)() { + m.hasYammerLicense = value +} +// SetIsDeleted sets the isDeleted property value. Whether this user has been deleted or soft deleted. +func (m *Office365ActiveUserDetail) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetOneDriveLastActivityDate sets the oneDriveLastActivityDate property value. The date when user last viewed or edited files, shared files internally or externally, or synced files. +func (m *Office365ActiveUserDetail) SetOneDriveLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.oneDriveLastActivityDate = value +} +// SetOneDriveLicenseAssignDate sets the oneDriveLicenseAssignDate property value. The last date when the user was assigned a OneDrive license. +func (m *Office365ActiveUserDetail) SetOneDriveLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.oneDriveLicenseAssignDate = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ActiveUserDetail) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetSharePointLastActivityDate sets the sharePointLastActivityDate property value. The date when user last viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages. +func (m *Office365ActiveUserDetail) SetSharePointLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.sharePointLastActivityDate = value +} +// SetSharePointLicenseAssignDate sets the sharePointLicenseAssignDate property value. The last date when the user was assigned a SharePoint license. +func (m *Office365ActiveUserDetail) SetSharePointLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.sharePointLicenseAssignDate = value +} +// SetSkypeForBusinessLastActivityDate sets the skypeForBusinessLastActivityDate property value. The date when user last organized or participated in conferences, or joined peer-to-peer sessions. +func (m *Office365ActiveUserDetail) SetSkypeForBusinessLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.skypeForBusinessLastActivityDate = value +} +// SetSkypeForBusinessLicenseAssignDate sets the skypeForBusinessLicenseAssignDate property value. The last date when the user was assigned a Skype For Business license. +func (m *Office365ActiveUserDetail) SetSkypeForBusinessLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.skypeForBusinessLicenseAssignDate = value +} +// SetTeamsLastActivityDate sets the teamsLastActivityDate property value. The date when user last posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls. +func (m *Office365ActiveUserDetail) SetTeamsLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.teamsLastActivityDate = value +} +// SetTeamsLicenseAssignDate sets the teamsLicenseAssignDate property value. The last date when the user was assigned a Teams license. +func (m *Office365ActiveUserDetail) SetTeamsLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.teamsLicenseAssignDate = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the user. The UPN is an Internet-style login name for the user based on the Internet standard RFC 822. By convention, this should map to the user's email name. The general format is alias@domain, where domain must be present in the tenant’s collection of verified domains. This property is required when a user is created. +func (m *Office365ActiveUserDetail) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetYammerLastActivityDate sets the yammerLastActivityDate property value. The date when user last posted, read, or liked message. +func (m *Office365ActiveUserDetail) SetYammerLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.yammerLastActivityDate = value +} +// SetYammerLicenseAssignDate sets the yammerLicenseAssignDate property value. The last date when the user was assigned a Yammer license. +func (m *Office365ActiveUserDetail) SetYammerLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.yammerLicenseAssignDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_active_user_detailable.go b/src/internal/connector/graph/betasdk/models/office365_active_user_detailable.go new file mode 100644 index 000000000..5156eba0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_active_user_detailable.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ActiveUserDetailable +type Office365ActiveUserDetailable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedProducts()([]string) + GetDeletedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetDisplayName()(*string) + GetExchangeLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetExchangeLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetHasExchangeLicense()(*bool) + GetHasOneDriveLicense()(*bool) + GetHasSharePointLicense()(*bool) + GetHasSkypeForBusinessLicense()(*bool) + GetHasTeamsLicense()(*bool) + GetHasYammerLicense()(*bool) + GetIsDeleted()(*bool) + GetOneDriveLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetOneDriveLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSharePointLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSharePointLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSkypeForBusinessLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSkypeForBusinessLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTeamsLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTeamsLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetUserPrincipalName()(*string) + GetYammerLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetYammerLicenseAssignDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAssignedProducts(value []string)() + SetDeletedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetDisplayName(value *string)() + SetExchangeLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetExchangeLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetHasExchangeLicense(value *bool)() + SetHasOneDriveLicense(value *bool)() + SetHasSharePointLicense(value *bool)() + SetHasSkypeForBusinessLicense(value *bool)() + SetHasTeamsLicense(value *bool)() + SetHasYammerLicense(value *bool)() + SetIsDeleted(value *bool)() + SetOneDriveLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetOneDriveLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSharePointLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSharePointLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSkypeForBusinessLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSkypeForBusinessLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTeamsLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTeamsLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetUserPrincipalName(value *string)() + SetYammerLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetYammerLicenseAssignDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_counts.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_counts.go new file mode 100644 index 000000000..79ac7ef13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_counts.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityCounts +type Office365GroupsActivityCounts struct { + Entity + // The number of emails received by Group mailboxes. + exchangeEmailsReceived *int64 + // The date on which a number of emails were sent to a group mailbox or a number of messages were posted, read, or liked in a Yammer group + reportDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The teamsChannelMessages property + teamsChannelMessages *int64 + // The teamsMeetingsOrganized property + teamsMeetingsOrganized *int64 + // The number of messages liked in Yammer groups. + yammerMessagesLiked *int64 + // The number of messages posted to Yammer groups. + yammerMessagesPosted *int64 + // The number of messages read in Yammer groups. + yammerMessagesRead *int64 +} +// NewOffice365GroupsActivityCounts instantiates a new Office365GroupsActivityCounts and sets the default values. +func NewOffice365GroupsActivityCounts()(*Office365GroupsActivityCounts) { + m := &Office365GroupsActivityCounts{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365GroupsActivityCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365GroupsActivityCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365GroupsActivityCounts(), nil +} +// GetExchangeEmailsReceived gets the exchangeEmailsReceived property value. The number of emails received by Group mailboxes. +func (m *Office365GroupsActivityCounts) GetExchangeEmailsReceived()(*int64) { + return m.exchangeEmailsReceived +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365GroupsActivityCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exchangeEmailsReceived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeEmailsReceived(val) + } + return nil + } + res["reportDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportDate(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["teamsChannelMessages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsChannelMessages(val) + } + return nil + } + res["teamsMeetingsOrganized"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsMeetingsOrganized(val) + } + return nil + } + res["yammerMessagesLiked"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerMessagesLiked(val) + } + return nil + } + res["yammerMessagesPosted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerMessagesPosted(val) + } + return nil + } + res["yammerMessagesRead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerMessagesRead(val) + } + return nil + } + return res +} +// GetReportDate gets the reportDate property value. The date on which a number of emails were sent to a group mailbox or a number of messages were posted, read, or liked in a Yammer group +func (m *Office365GroupsActivityCounts) GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportDate +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityCounts) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityCounts) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetTeamsChannelMessages gets the teamsChannelMessages property value. The teamsChannelMessages property +func (m *Office365GroupsActivityCounts) GetTeamsChannelMessages()(*int64) { + return m.teamsChannelMessages +} +// GetTeamsMeetingsOrganized gets the teamsMeetingsOrganized property value. The teamsMeetingsOrganized property +func (m *Office365GroupsActivityCounts) GetTeamsMeetingsOrganized()(*int64) { + return m.teamsMeetingsOrganized +} +// GetYammerMessagesLiked gets the yammerMessagesLiked property value. The number of messages liked in Yammer groups. +func (m *Office365GroupsActivityCounts) GetYammerMessagesLiked()(*int64) { + return m.yammerMessagesLiked +} +// GetYammerMessagesPosted gets the yammerMessagesPosted property value. The number of messages posted to Yammer groups. +func (m *Office365GroupsActivityCounts) GetYammerMessagesPosted()(*int64) { + return m.yammerMessagesPosted +} +// GetYammerMessagesRead gets the yammerMessagesRead property value. The number of messages read in Yammer groups. +func (m *Office365GroupsActivityCounts) GetYammerMessagesRead()(*int64) { + return m.yammerMessagesRead +} +// Serialize serializes information the current object +func (m *Office365GroupsActivityCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("exchangeEmailsReceived", m.GetExchangeEmailsReceived()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportDate", m.GetReportDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsChannelMessages", m.GetTeamsChannelMessages()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsMeetingsOrganized", m.GetTeamsMeetingsOrganized()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerMessagesLiked", m.GetYammerMessagesLiked()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerMessagesPosted", m.GetYammerMessagesPosted()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerMessagesRead", m.GetYammerMessagesRead()) + if err != nil { + return err + } + } + return nil +} +// SetExchangeEmailsReceived sets the exchangeEmailsReceived property value. The number of emails received by Group mailboxes. +func (m *Office365GroupsActivityCounts) SetExchangeEmailsReceived(value *int64)() { + m.exchangeEmailsReceived = value +} +// SetReportDate sets the reportDate property value. The date on which a number of emails were sent to a group mailbox or a number of messages were posted, read, or liked in a Yammer group +func (m *Office365GroupsActivityCounts) SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportDate = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityCounts) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityCounts) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetTeamsChannelMessages sets the teamsChannelMessages property value. The teamsChannelMessages property +func (m *Office365GroupsActivityCounts) SetTeamsChannelMessages(value *int64)() { + m.teamsChannelMessages = value +} +// SetTeamsMeetingsOrganized sets the teamsMeetingsOrganized property value. The teamsMeetingsOrganized property +func (m *Office365GroupsActivityCounts) SetTeamsMeetingsOrganized(value *int64)() { + m.teamsMeetingsOrganized = value +} +// SetYammerMessagesLiked sets the yammerMessagesLiked property value. The number of messages liked in Yammer groups. +func (m *Office365GroupsActivityCounts) SetYammerMessagesLiked(value *int64)() { + m.yammerMessagesLiked = value +} +// SetYammerMessagesPosted sets the yammerMessagesPosted property value. The number of messages posted to Yammer groups. +func (m *Office365GroupsActivityCounts) SetYammerMessagesPosted(value *int64)() { + m.yammerMessagesPosted = value +} +// SetYammerMessagesRead sets the yammerMessagesRead property value. The number of messages read in Yammer groups. +func (m *Office365GroupsActivityCounts) SetYammerMessagesRead(value *int64)() { + m.yammerMessagesRead = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_countsable.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_countsable.go new file mode 100644 index 000000000..9c95c51c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_countsable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityCountsable +type Office365GroupsActivityCountsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExchangeEmailsReceived()(*int64) + GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTeamsChannelMessages()(*int64) + GetTeamsMeetingsOrganized()(*int64) + GetYammerMessagesLiked()(*int64) + GetYammerMessagesPosted()(*int64) + GetYammerMessagesRead()(*int64) + SetExchangeEmailsReceived(value *int64)() + SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTeamsChannelMessages(value *int64)() + SetTeamsMeetingsOrganized(value *int64)() + SetYammerMessagesLiked(value *int64)() + SetYammerMessagesPosted(value *int64)() + SetYammerMessagesRead(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_detail.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_detail.go new file mode 100644 index 000000000..5afbbfbb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_detail.go @@ -0,0 +1,580 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityDetail +type Office365GroupsActivityDetail struct { + Entity + // The storage used of the group mailbox. + exchangeMailboxStorageUsedInBytes *int64 + // The number of items in the group mailbox. + exchangeMailboxTotalItemCount *int64 + // The number of email that the group mailbox received. + exchangeReceivedEmailCount *int64 + // The group external member count. + externalMemberCount *int64 + // The display name of the group. + groupDisplayName *string + // The group id. + groupId *string + // The group type. Possible values are: Public or Private. + groupType *string + // Whether this user has been deleted or soft deleted. + isDeleted *bool + // The last activity date for the following scenarios: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. + lastActivityDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The group member count. + memberCount *int64 + // The group owner principal name. + ownerPrincipalName *string + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of active files in SharePoint Group site. + sharePointActiveFileCount *int64 + // The storage used by SharePoint Group site. + sharePointSiteStorageUsedInBytes *int64 + // The total number of files in SharePoint Group site. + sharePointTotalFileCount *int64 + // The teamsChannelMessagesCount property + teamsChannelMessagesCount *int64 + // The teamsMeetingsOrganizedCount property + teamsMeetingsOrganizedCount *int64 + // The number of messages liked in Yammer groups. + yammerLikedMessageCount *int64 + // The number of messages posted to Yammer groups. + yammerPostedMessageCount *int64 + // The number of messages read in Yammer groups. + yammerReadMessageCount *int64 +} +// NewOffice365GroupsActivityDetail instantiates a new Office365GroupsActivityDetail and sets the default values. +func NewOffice365GroupsActivityDetail()(*Office365GroupsActivityDetail) { + m := &Office365GroupsActivityDetail{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365GroupsActivityDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365GroupsActivityDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365GroupsActivityDetail(), nil +} +// GetExchangeMailboxStorageUsedInBytes gets the exchangeMailboxStorageUsedInBytes property value. The storage used of the group mailbox. +func (m *Office365GroupsActivityDetail) GetExchangeMailboxStorageUsedInBytes()(*int64) { + return m.exchangeMailboxStorageUsedInBytes +} +// GetExchangeMailboxTotalItemCount gets the exchangeMailboxTotalItemCount property value. The number of items in the group mailbox. +func (m *Office365GroupsActivityDetail) GetExchangeMailboxTotalItemCount()(*int64) { + return m.exchangeMailboxTotalItemCount +} +// GetExchangeReceivedEmailCount gets the exchangeReceivedEmailCount property value. The number of email that the group mailbox received. +func (m *Office365GroupsActivityDetail) GetExchangeReceivedEmailCount()(*int64) { + return m.exchangeReceivedEmailCount +} +// GetExternalMemberCount gets the externalMemberCount property value. The group external member count. +func (m *Office365GroupsActivityDetail) GetExternalMemberCount()(*int64) { + return m.externalMemberCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365GroupsActivityDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exchangeMailboxStorageUsedInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeMailboxStorageUsedInBytes(val) + } + return nil + } + res["exchangeMailboxTotalItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeMailboxTotalItemCount(val) + } + return nil + } + res["exchangeReceivedEmailCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeReceivedEmailCount(val) + } + return nil + } + res["externalMemberCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExternalMemberCount(val) + } + return nil + } + res["groupDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupDisplayName(val) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["groupType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupType(val) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["lastActivityDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActivityDate(val) + } + return nil + } + res["memberCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMemberCount(val) + } + return nil + } + res["ownerPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwnerPrincipalName(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["sharePointActiveFileCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePointActiveFileCount(val) + } + return nil + } + res["sharePointSiteStorageUsedInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePointSiteStorageUsedInBytes(val) + } + return nil + } + res["sharePointTotalFileCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePointTotalFileCount(val) + } + return nil + } + res["teamsChannelMessagesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsChannelMessagesCount(val) + } + return nil + } + res["teamsMeetingsOrganizedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsMeetingsOrganizedCount(val) + } + return nil + } + res["yammerLikedMessageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerLikedMessageCount(val) + } + return nil + } + res["yammerPostedMessageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerPostedMessageCount(val) + } + return nil + } + res["yammerReadMessageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerReadMessageCount(val) + } + return nil + } + return res +} +// GetGroupDisplayName gets the groupDisplayName property value. The display name of the group. +func (m *Office365GroupsActivityDetail) GetGroupDisplayName()(*string) { + return m.groupDisplayName +} +// GetGroupId gets the groupId property value. The group id. +func (m *Office365GroupsActivityDetail) GetGroupId()(*string) { + return m.groupId +} +// GetGroupType gets the groupType property value. The group type. Possible values are: Public or Private. +func (m *Office365GroupsActivityDetail) GetGroupType()(*string) { + return m.groupType +} +// GetIsDeleted gets the isDeleted property value. Whether this user has been deleted or soft deleted. +func (m *Office365GroupsActivityDetail) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetLastActivityDate gets the lastActivityDate property value. The last activity date for the following scenarios: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. +func (m *Office365GroupsActivityDetail) GetLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.lastActivityDate +} +// GetMemberCount gets the memberCount property value. The group member count. +func (m *Office365GroupsActivityDetail) GetMemberCount()(*int64) { + return m.memberCount +} +// GetOwnerPrincipalName gets the ownerPrincipalName property value. The group owner principal name. +func (m *Office365GroupsActivityDetail) GetOwnerPrincipalName()(*string) { + return m.ownerPrincipalName +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityDetail) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityDetail) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetSharePointActiveFileCount gets the sharePointActiveFileCount property value. The number of active files in SharePoint Group site. +func (m *Office365GroupsActivityDetail) GetSharePointActiveFileCount()(*int64) { + return m.sharePointActiveFileCount +} +// GetSharePointSiteStorageUsedInBytes gets the sharePointSiteStorageUsedInBytes property value. The storage used by SharePoint Group site. +func (m *Office365GroupsActivityDetail) GetSharePointSiteStorageUsedInBytes()(*int64) { + return m.sharePointSiteStorageUsedInBytes +} +// GetSharePointTotalFileCount gets the sharePointTotalFileCount property value. The total number of files in SharePoint Group site. +func (m *Office365GroupsActivityDetail) GetSharePointTotalFileCount()(*int64) { + return m.sharePointTotalFileCount +} +// GetTeamsChannelMessagesCount gets the teamsChannelMessagesCount property value. The teamsChannelMessagesCount property +func (m *Office365GroupsActivityDetail) GetTeamsChannelMessagesCount()(*int64) { + return m.teamsChannelMessagesCount +} +// GetTeamsMeetingsOrganizedCount gets the teamsMeetingsOrganizedCount property value. The teamsMeetingsOrganizedCount property +func (m *Office365GroupsActivityDetail) GetTeamsMeetingsOrganizedCount()(*int64) { + return m.teamsMeetingsOrganizedCount +} +// GetYammerLikedMessageCount gets the yammerLikedMessageCount property value. The number of messages liked in Yammer groups. +func (m *Office365GroupsActivityDetail) GetYammerLikedMessageCount()(*int64) { + return m.yammerLikedMessageCount +} +// GetYammerPostedMessageCount gets the yammerPostedMessageCount property value. The number of messages posted to Yammer groups. +func (m *Office365GroupsActivityDetail) GetYammerPostedMessageCount()(*int64) { + return m.yammerPostedMessageCount +} +// GetYammerReadMessageCount gets the yammerReadMessageCount property value. The number of messages read in Yammer groups. +func (m *Office365GroupsActivityDetail) GetYammerReadMessageCount()(*int64) { + return m.yammerReadMessageCount +} +// Serialize serializes information the current object +func (m *Office365GroupsActivityDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("exchangeMailboxStorageUsedInBytes", m.GetExchangeMailboxStorageUsedInBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("exchangeMailboxTotalItemCount", m.GetExchangeMailboxTotalItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("exchangeReceivedEmailCount", m.GetExchangeReceivedEmailCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("externalMemberCount", m.GetExternalMemberCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupDisplayName", m.GetGroupDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupType", m.GetGroupType()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("lastActivityDate", m.GetLastActivityDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("memberCount", m.GetMemberCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ownerPrincipalName", m.GetOwnerPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePointActiveFileCount", m.GetSharePointActiveFileCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePointSiteStorageUsedInBytes", m.GetSharePointSiteStorageUsedInBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePointTotalFileCount", m.GetSharePointTotalFileCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsChannelMessagesCount", m.GetTeamsChannelMessagesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsMeetingsOrganizedCount", m.GetTeamsMeetingsOrganizedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerLikedMessageCount", m.GetYammerLikedMessageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerPostedMessageCount", m.GetYammerPostedMessageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerReadMessageCount", m.GetYammerReadMessageCount()) + if err != nil { + return err + } + } + return nil +} +// SetExchangeMailboxStorageUsedInBytes sets the exchangeMailboxStorageUsedInBytes property value. The storage used of the group mailbox. +func (m *Office365GroupsActivityDetail) SetExchangeMailboxStorageUsedInBytes(value *int64)() { + m.exchangeMailboxStorageUsedInBytes = value +} +// SetExchangeMailboxTotalItemCount sets the exchangeMailboxTotalItemCount property value. The number of items in the group mailbox. +func (m *Office365GroupsActivityDetail) SetExchangeMailboxTotalItemCount(value *int64)() { + m.exchangeMailboxTotalItemCount = value +} +// SetExchangeReceivedEmailCount sets the exchangeReceivedEmailCount property value. The number of email that the group mailbox received. +func (m *Office365GroupsActivityDetail) SetExchangeReceivedEmailCount(value *int64)() { + m.exchangeReceivedEmailCount = value +} +// SetExternalMemberCount sets the externalMemberCount property value. The group external member count. +func (m *Office365GroupsActivityDetail) SetExternalMemberCount(value *int64)() { + m.externalMemberCount = value +} +// SetGroupDisplayName sets the groupDisplayName property value. The display name of the group. +func (m *Office365GroupsActivityDetail) SetGroupDisplayName(value *string)() { + m.groupDisplayName = value +} +// SetGroupId sets the groupId property value. The group id. +func (m *Office365GroupsActivityDetail) SetGroupId(value *string)() { + m.groupId = value +} +// SetGroupType sets the groupType property value. The group type. Possible values are: Public or Private. +func (m *Office365GroupsActivityDetail) SetGroupType(value *string)() { + m.groupType = value +} +// SetIsDeleted sets the isDeleted property value. Whether this user has been deleted or soft deleted. +func (m *Office365GroupsActivityDetail) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetLastActivityDate sets the lastActivityDate property value. The last activity date for the following scenarios: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. +func (m *Office365GroupsActivityDetail) SetLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.lastActivityDate = value +} +// SetMemberCount sets the memberCount property value. The group member count. +func (m *Office365GroupsActivityDetail) SetMemberCount(value *int64)() { + m.memberCount = value +} +// SetOwnerPrincipalName sets the ownerPrincipalName property value. The group owner principal name. +func (m *Office365GroupsActivityDetail) SetOwnerPrincipalName(value *string)() { + m.ownerPrincipalName = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityDetail) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityDetail) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetSharePointActiveFileCount sets the sharePointActiveFileCount property value. The number of active files in SharePoint Group site. +func (m *Office365GroupsActivityDetail) SetSharePointActiveFileCount(value *int64)() { + m.sharePointActiveFileCount = value +} +// SetSharePointSiteStorageUsedInBytes sets the sharePointSiteStorageUsedInBytes property value. The storage used by SharePoint Group site. +func (m *Office365GroupsActivityDetail) SetSharePointSiteStorageUsedInBytes(value *int64)() { + m.sharePointSiteStorageUsedInBytes = value +} +// SetSharePointTotalFileCount sets the sharePointTotalFileCount property value. The total number of files in SharePoint Group site. +func (m *Office365GroupsActivityDetail) SetSharePointTotalFileCount(value *int64)() { + m.sharePointTotalFileCount = value +} +// SetTeamsChannelMessagesCount sets the teamsChannelMessagesCount property value. The teamsChannelMessagesCount property +func (m *Office365GroupsActivityDetail) SetTeamsChannelMessagesCount(value *int64)() { + m.teamsChannelMessagesCount = value +} +// SetTeamsMeetingsOrganizedCount sets the teamsMeetingsOrganizedCount property value. The teamsMeetingsOrganizedCount property +func (m *Office365GroupsActivityDetail) SetTeamsMeetingsOrganizedCount(value *int64)() { + m.teamsMeetingsOrganizedCount = value +} +// SetYammerLikedMessageCount sets the yammerLikedMessageCount property value. The number of messages liked in Yammer groups. +func (m *Office365GroupsActivityDetail) SetYammerLikedMessageCount(value *int64)() { + m.yammerLikedMessageCount = value +} +// SetYammerPostedMessageCount sets the yammerPostedMessageCount property value. The number of messages posted to Yammer groups. +func (m *Office365GroupsActivityDetail) SetYammerPostedMessageCount(value *int64)() { + m.yammerPostedMessageCount = value +} +// SetYammerReadMessageCount sets the yammerReadMessageCount property value. The number of messages read in Yammer groups. +func (m *Office365GroupsActivityDetail) SetYammerReadMessageCount(value *int64)() { + m.yammerReadMessageCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_detailable.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_detailable.go new file mode 100644 index 000000000..68ebb20c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_detailable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityDetailable +type Office365GroupsActivityDetailable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExchangeMailboxStorageUsedInBytes()(*int64) + GetExchangeMailboxTotalItemCount()(*int64) + GetExchangeReceivedEmailCount()(*int64) + GetExternalMemberCount()(*int64) + GetGroupDisplayName()(*string) + GetGroupId()(*string) + GetGroupType()(*string) + GetIsDeleted()(*bool) + GetLastActivityDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetMemberCount()(*int64) + GetOwnerPrincipalName()(*string) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSharePointActiveFileCount()(*int64) + GetSharePointSiteStorageUsedInBytes()(*int64) + GetSharePointTotalFileCount()(*int64) + GetTeamsChannelMessagesCount()(*int64) + GetTeamsMeetingsOrganizedCount()(*int64) + GetYammerLikedMessageCount()(*int64) + GetYammerPostedMessageCount()(*int64) + GetYammerReadMessageCount()(*int64) + SetExchangeMailboxStorageUsedInBytes(value *int64)() + SetExchangeMailboxTotalItemCount(value *int64)() + SetExchangeReceivedEmailCount(value *int64)() + SetExternalMemberCount(value *int64)() + SetGroupDisplayName(value *string)() + SetGroupId(value *string)() + SetGroupType(value *string)() + SetIsDeleted(value *bool)() + SetLastActivityDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetMemberCount(value *int64)() + SetOwnerPrincipalName(value *string)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSharePointActiveFileCount(value *int64)() + SetSharePointSiteStorageUsedInBytes(value *int64)() + SetSharePointTotalFileCount(value *int64)() + SetTeamsChannelMessagesCount(value *int64)() + SetTeamsMeetingsOrganizedCount(value *int64)() + SetYammerLikedMessageCount(value *int64)() + SetYammerPostedMessageCount(value *int64)() + SetYammerReadMessageCount(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_counts.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_counts.go new file mode 100644 index 000000000..df74b87d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_counts.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityFileCounts +type Office365GroupsActivityFileCounts struct { + Entity + // The number of files that were viewed, edited, shared, or synced in the group's SharePoint document library. + active *int64 + // The date on which a number of files were active in the group's SharePoint site. + reportDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The total number of files in the group's SharePoint document library. + total *int64 +} +// NewOffice365GroupsActivityFileCounts instantiates a new Office365GroupsActivityFileCounts and sets the default values. +func NewOffice365GroupsActivityFileCounts()(*Office365GroupsActivityFileCounts) { + m := &Office365GroupsActivityFileCounts{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365GroupsActivityFileCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365GroupsActivityFileCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365GroupsActivityFileCounts(), nil +} +// GetActive gets the active property value. The number of files that were viewed, edited, shared, or synced in the group's SharePoint document library. +func (m *Office365GroupsActivityFileCounts) GetActive()(*int64) { + return m.active +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365GroupsActivityFileCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["reportDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportDate(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetReportDate gets the reportDate property value. The date on which a number of files were active in the group's SharePoint site. +func (m *Office365GroupsActivityFileCounts) GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportDate +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityFileCounts) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityFileCounts) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetTotal gets the total property value. The total number of files in the group's SharePoint document library. +func (m *Office365GroupsActivityFileCounts) GetTotal()(*int64) { + return m.total +} +// Serialize serializes information the current object +func (m *Office365GroupsActivityFileCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("active", m.GetActive()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportDate", m.GetReportDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("total", m.GetTotal()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The number of files that were viewed, edited, shared, or synced in the group's SharePoint document library. +func (m *Office365GroupsActivityFileCounts) SetActive(value *int64)() { + m.active = value +} +// SetReportDate sets the reportDate property value. The date on which a number of files were active in the group's SharePoint site. +func (m *Office365GroupsActivityFileCounts) SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportDate = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityFileCounts) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityFileCounts) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetTotal sets the total property value. The total number of files in the group's SharePoint document library. +func (m *Office365GroupsActivityFileCounts) SetTotal(value *int64)() { + m.total = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_countsable.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_countsable.go new file mode 100644 index 000000000..3f9cf43ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_file_countsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityFileCountsable +type Office365GroupsActivityFileCountsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*int64) + GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTotal()(*int64) + SetActive(value *int64)() + SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTotal(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_counts.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_counts.go new file mode 100644 index 000000000..1cc705425 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_counts.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityGroupCounts +type Office365GroupsActivityGroupCounts struct { + Entity + // The number of active groups. A group is considered active if any of the following occurred: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. + active *int64 + // The date on which a number of groups were active. + reportDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The total number of groups. + total *int64 +} +// NewOffice365GroupsActivityGroupCounts instantiates a new Office365GroupsActivityGroupCounts and sets the default values. +func NewOffice365GroupsActivityGroupCounts()(*Office365GroupsActivityGroupCounts) { + m := &Office365GroupsActivityGroupCounts{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365GroupsActivityGroupCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365GroupsActivityGroupCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365GroupsActivityGroupCounts(), nil +} +// GetActive gets the active property value. The number of active groups. A group is considered active if any of the following occurred: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. +func (m *Office365GroupsActivityGroupCounts) GetActive()(*int64) { + return m.active +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365GroupsActivityGroupCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetActive(val) + } + return nil + } + res["reportDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportDate(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetReportDate gets the reportDate property value. The date on which a number of groups were active. +func (m *Office365GroupsActivityGroupCounts) GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportDate +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityGroupCounts) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityGroupCounts) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetTotal gets the total property value. The total number of groups. +func (m *Office365GroupsActivityGroupCounts) GetTotal()(*int64) { + return m.total +} +// Serialize serializes information the current object +func (m *Office365GroupsActivityGroupCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("active", m.GetActive()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportDate", m.GetReportDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("total", m.GetTotal()) + if err != nil { + return err + } + } + return nil +} +// SetActive sets the active property value. The number of active groups. A group is considered active if any of the following occurred: group mailbox received email; user viewed, edited, shared, or synced files in SharePoint document library; user viewed SharePoint pages; user posted, read, or liked messages in Yammer groups. +func (m *Office365GroupsActivityGroupCounts) SetActive(value *int64)() { + m.active = value +} +// SetReportDate sets the reportDate property value. The date on which a number of groups were active. +func (m *Office365GroupsActivityGroupCounts) SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportDate = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityGroupCounts) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityGroupCounts) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetTotal sets the total property value. The total number of groups. +func (m *Office365GroupsActivityGroupCounts) SetTotal(value *int64)() { + m.total = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_countsable.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_countsable.go new file mode 100644 index 000000000..bb9b8a6e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_group_countsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityGroupCountsable +type Office365GroupsActivityGroupCountsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActive()(*int64) + GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTotal()(*int64) + SetActive(value *int64)() + SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTotal(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_storage.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_storage.go new file mode 100644 index 000000000..f1c87268f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_storage.go @@ -0,0 +1,164 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityStorage +type Office365GroupsActivityStorage struct { + Entity + // The storage used in group mailbox. + mailboxStorageUsedInBytes *int64 + // The snapshot date for Exchange and SharePoint used storage. + reportDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The storage used in SharePoint document library. + siteStorageUsedInBytes *int64 +} +// NewOffice365GroupsActivityStorage instantiates a new Office365GroupsActivityStorage and sets the default values. +func NewOffice365GroupsActivityStorage()(*Office365GroupsActivityStorage) { + m := &Office365GroupsActivityStorage{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365GroupsActivityStorageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365GroupsActivityStorageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365GroupsActivityStorage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365GroupsActivityStorage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["mailboxStorageUsedInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMailboxStorageUsedInBytes(val) + } + return nil + } + res["reportDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportDate(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["siteStorageUsedInBytes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSiteStorageUsedInBytes(val) + } + return nil + } + return res +} +// GetMailboxStorageUsedInBytes gets the mailboxStorageUsedInBytes property value. The storage used in group mailbox. +func (m *Office365GroupsActivityStorage) GetMailboxStorageUsedInBytes()(*int64) { + return m.mailboxStorageUsedInBytes +} +// GetReportDate gets the reportDate property value. The snapshot date for Exchange and SharePoint used storage. +func (m *Office365GroupsActivityStorage) GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportDate +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityStorage) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityStorage) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetSiteStorageUsedInBytes gets the siteStorageUsedInBytes property value. The storage used in SharePoint document library. +func (m *Office365GroupsActivityStorage) GetSiteStorageUsedInBytes()(*int64) { + return m.siteStorageUsedInBytes +} +// Serialize serializes information the current object +func (m *Office365GroupsActivityStorage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("mailboxStorageUsedInBytes", m.GetMailboxStorageUsedInBytes()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportDate", m.GetReportDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("siteStorageUsedInBytes", m.GetSiteStorageUsedInBytes()) + if err != nil { + return err + } + } + return nil +} +// SetMailboxStorageUsedInBytes sets the mailboxStorageUsedInBytes property value. The storage used in group mailbox. +func (m *Office365GroupsActivityStorage) SetMailboxStorageUsedInBytes(value *int64)() { + m.mailboxStorageUsedInBytes = value +} +// SetReportDate sets the reportDate property value. The snapshot date for Exchange and SharePoint used storage. +func (m *Office365GroupsActivityStorage) SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportDate = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365GroupsActivityStorage) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365GroupsActivityStorage) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetSiteStorageUsedInBytes sets the siteStorageUsedInBytes property value. The storage used in SharePoint document library. +func (m *Office365GroupsActivityStorage) SetSiteStorageUsedInBytes(value *int64)() { + m.siteStorageUsedInBytes = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_groups_activity_storageable.go b/src/internal/connector/graph/betasdk/models/office365_groups_activity_storageable.go new file mode 100644 index 000000000..4d249567f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_groups_activity_storageable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365GroupsActivityStorageable +type Office365GroupsActivityStorageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMailboxStorageUsedInBytes()(*int64) + GetReportDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSiteStorageUsedInBytes()(*int64) + SetMailboxStorageUsedInBytes(value *int64)() + SetReportDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSiteStorageUsedInBytes(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office365_services_user_counts.go b/src/internal/connector/graph/betasdk/models/office365_services_user_counts.go new file mode 100644 index 000000000..40e29a952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_services_user_counts.go @@ -0,0 +1,450 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ServicesUserCounts +type Office365ServicesUserCounts struct { + Entity + // The number of active users on Exchange. Any user who can read and send email is considered an active user. + exchangeActive *int64 + // The number of inactive users on Exchange. + exchangeInactive *int64 + // The number of active users on Microsoft 365. + office365Active *int64 + // The number of inactive users on Microsoft 365. + office365Inactive *int64 + // The number of active users on OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. + oneDriveActive *int64 + // The number of inactive users on OneDrive. + oneDriveInactive *int64 + // The number of days the report covers. + reportPeriod *string + // The latest date of the content. + reportRefreshDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of active users on SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. + sharePointActive *int64 + // The number of inactive users on SharePoint. + sharePointInactive *int64 + // The number of active users on Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. + skypeForBusinessActive *int64 + // The number of inactive users on Skype For Business. + skypeForBusinessInactive *int64 + // The number of active users on Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. + teamsActive *int64 + // The number of inactive users on Microsoft Teams. + teamsInactive *int64 + // The number of active users on Yammer. Any user who can post, read, or like messages is considered an active user. + yammerActive *int64 + // The number of inactive users on Yammer. + yammerInactive *int64 +} +// NewOffice365ServicesUserCounts instantiates a new Office365ServicesUserCounts and sets the default values. +func NewOffice365ServicesUserCounts()(*Office365ServicesUserCounts) { + m := &Office365ServicesUserCounts{ + Entity: *NewEntity(), + } + return m +} +// CreateOffice365ServicesUserCountsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOffice365ServicesUserCountsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOffice365ServicesUserCounts(), nil +} +// GetExchangeActive gets the exchangeActive property value. The number of active users on Exchange. Any user who can read and send email is considered an active user. +func (m *Office365ServicesUserCounts) GetExchangeActive()(*int64) { + return m.exchangeActive +} +// GetExchangeInactive gets the exchangeInactive property value. The number of inactive users on Exchange. +func (m *Office365ServicesUserCounts) GetExchangeInactive()(*int64) { + return m.exchangeInactive +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Office365ServicesUserCounts) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["exchangeActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeActive(val) + } + return nil + } + res["exchangeInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetExchangeInactive(val) + } + return nil + } + res["office365Active"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOffice365Active(val) + } + return nil + } + res["office365Inactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOffice365Inactive(val) + } + return nil + } + res["oneDriveActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOneDriveActive(val) + } + return nil + } + res["oneDriveInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOneDriveInactive(val) + } + return nil + } + res["reportPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReportPeriod(val) + } + return nil + } + res["reportRefreshDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetReportRefreshDate(val) + } + return nil + } + res["sharePointActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePointActive(val) + } + return nil + } + res["sharePointInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSharePointInactive(val) + } + return nil + } + res["skypeForBusinessActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSkypeForBusinessActive(val) + } + return nil + } + res["skypeForBusinessInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSkypeForBusinessInactive(val) + } + return nil + } + res["teamsActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsActive(val) + } + return nil + } + res["teamsInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTeamsInactive(val) + } + return nil + } + res["yammerActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerActive(val) + } + return nil + } + res["yammerInactive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetYammerInactive(val) + } + return nil + } + return res +} +// GetOffice365Active gets the office365Active property value. The number of active users on Microsoft 365. +func (m *Office365ServicesUserCounts) GetOffice365Active()(*int64) { + return m.office365Active +} +// GetOffice365Inactive gets the office365Inactive property value. The number of inactive users on Microsoft 365. +func (m *Office365ServicesUserCounts) GetOffice365Inactive()(*int64) { + return m.office365Inactive +} +// GetOneDriveActive gets the oneDriveActive property value. The number of active users on OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. +func (m *Office365ServicesUserCounts) GetOneDriveActive()(*int64) { + return m.oneDriveActive +} +// GetOneDriveInactive gets the oneDriveInactive property value. The number of inactive users on OneDrive. +func (m *Office365ServicesUserCounts) GetOneDriveInactive()(*int64) { + return m.oneDriveInactive +} +// GetReportPeriod gets the reportPeriod property value. The number of days the report covers. +func (m *Office365ServicesUserCounts) GetReportPeriod()(*string) { + return m.reportPeriod +} +// GetReportRefreshDate gets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ServicesUserCounts) GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.reportRefreshDate +} +// GetSharePointActive gets the sharePointActive property value. The number of active users on SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. +func (m *Office365ServicesUserCounts) GetSharePointActive()(*int64) { + return m.sharePointActive +} +// GetSharePointInactive gets the sharePointInactive property value. The number of inactive users on SharePoint. +func (m *Office365ServicesUserCounts) GetSharePointInactive()(*int64) { + return m.sharePointInactive +} +// GetSkypeForBusinessActive gets the skypeForBusinessActive property value. The number of active users on Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. +func (m *Office365ServicesUserCounts) GetSkypeForBusinessActive()(*int64) { + return m.skypeForBusinessActive +} +// GetSkypeForBusinessInactive gets the skypeForBusinessInactive property value. The number of inactive users on Skype For Business. +func (m *Office365ServicesUserCounts) GetSkypeForBusinessInactive()(*int64) { + return m.skypeForBusinessInactive +} +// GetTeamsActive gets the teamsActive property value. The number of active users on Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. +func (m *Office365ServicesUserCounts) GetTeamsActive()(*int64) { + return m.teamsActive +} +// GetTeamsInactive gets the teamsInactive property value. The number of inactive users on Microsoft Teams. +func (m *Office365ServicesUserCounts) GetTeamsInactive()(*int64) { + return m.teamsInactive +} +// GetYammerActive gets the yammerActive property value. The number of active users on Yammer. Any user who can post, read, or like messages is considered an active user. +func (m *Office365ServicesUserCounts) GetYammerActive()(*int64) { + return m.yammerActive +} +// GetYammerInactive gets the yammerInactive property value. The number of inactive users on Yammer. +func (m *Office365ServicesUserCounts) GetYammerInactive()(*int64) { + return m.yammerInactive +} +// Serialize serializes information the current object +func (m *Office365ServicesUserCounts) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("exchangeActive", m.GetExchangeActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("exchangeInactive", m.GetExchangeInactive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("office365Active", m.GetOffice365Active()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("office365Inactive", m.GetOffice365Inactive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("oneDriveActive", m.GetOneDriveActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("oneDriveInactive", m.GetOneDriveInactive()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reportPeriod", m.GetReportPeriod()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("reportRefreshDate", m.GetReportRefreshDate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePointActive", m.GetSharePointActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("sharePointInactive", m.GetSharePointInactive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("skypeForBusinessActive", m.GetSkypeForBusinessActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("skypeForBusinessInactive", m.GetSkypeForBusinessInactive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsActive", m.GetTeamsActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("teamsInactive", m.GetTeamsInactive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerActive", m.GetYammerActive()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("yammerInactive", m.GetYammerInactive()) + if err != nil { + return err + } + } + return nil +} +// SetExchangeActive sets the exchangeActive property value. The number of active users on Exchange. Any user who can read and send email is considered an active user. +func (m *Office365ServicesUserCounts) SetExchangeActive(value *int64)() { + m.exchangeActive = value +} +// SetExchangeInactive sets the exchangeInactive property value. The number of inactive users on Exchange. +func (m *Office365ServicesUserCounts) SetExchangeInactive(value *int64)() { + m.exchangeInactive = value +} +// SetOffice365Active sets the office365Active property value. The number of active users on Microsoft 365. +func (m *Office365ServicesUserCounts) SetOffice365Active(value *int64)() { + m.office365Active = value +} +// SetOffice365Inactive sets the office365Inactive property value. The number of inactive users on Microsoft 365. +func (m *Office365ServicesUserCounts) SetOffice365Inactive(value *int64)() { + m.office365Inactive = value +} +// SetOneDriveActive sets the oneDriveActive property value. The number of active users on OneDrive. Any user who viewed or edited files, shared files internally or externally, or synced files is considered an active user. +func (m *Office365ServicesUserCounts) SetOneDriveActive(value *int64)() { + m.oneDriveActive = value +} +// SetOneDriveInactive sets the oneDriveInactive property value. The number of inactive users on OneDrive. +func (m *Office365ServicesUserCounts) SetOneDriveInactive(value *int64)() { + m.oneDriveInactive = value +} +// SetReportPeriod sets the reportPeriod property value. The number of days the report covers. +func (m *Office365ServicesUserCounts) SetReportPeriod(value *string)() { + m.reportPeriod = value +} +// SetReportRefreshDate sets the reportRefreshDate property value. The latest date of the content. +func (m *Office365ServicesUserCounts) SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.reportRefreshDate = value +} +// SetSharePointActive sets the sharePointActive property value. The number of active users on SharePoint. Any user who viewed or edited files, shared files internally or externally, synced files, or viewed SharePoint pages is considered an active user. +func (m *Office365ServicesUserCounts) SetSharePointActive(value *int64)() { + m.sharePointActive = value +} +// SetSharePointInactive sets the sharePointInactive property value. The number of inactive users on SharePoint. +func (m *Office365ServicesUserCounts) SetSharePointInactive(value *int64)() { + m.sharePointInactive = value +} +// SetSkypeForBusinessActive sets the skypeForBusinessActive property value. The number of active users on Skype For Business. Any user who organized or participated in conferences, or joined peer-to-peer sessions is considered an active user. +func (m *Office365ServicesUserCounts) SetSkypeForBusinessActive(value *int64)() { + m.skypeForBusinessActive = value +} +// SetSkypeForBusinessInactive sets the skypeForBusinessInactive property value. The number of inactive users on Skype For Business. +func (m *Office365ServicesUserCounts) SetSkypeForBusinessInactive(value *int64)() { + m.skypeForBusinessInactive = value +} +// SetTeamsActive sets the teamsActive property value. The number of active users on Microsoft Teams. Any user who posted messages in team channels, sent messages in private chat sessions, or participated in meetings or calls is considered an active user. +func (m *Office365ServicesUserCounts) SetTeamsActive(value *int64)() { + m.teamsActive = value +} +// SetTeamsInactive sets the teamsInactive property value. The number of inactive users on Microsoft Teams. +func (m *Office365ServicesUserCounts) SetTeamsInactive(value *int64)() { + m.teamsInactive = value +} +// SetYammerActive sets the yammerActive property value. The number of active users on Yammer. Any user who can post, read, or like messages is considered an active user. +func (m *Office365ServicesUserCounts) SetYammerActive(value *int64)() { + m.yammerActive = value +} +// SetYammerInactive sets the yammerInactive property value. The number of inactive users on Yammer. +func (m *Office365ServicesUserCounts) SetYammerInactive(value *int64)() { + m.yammerInactive = value +} diff --git a/src/internal/connector/graph/betasdk/models/office365_services_user_countsable.go b/src/internal/connector/graph/betasdk/models/office365_services_user_countsable.go new file mode 100644 index 000000000..f4adb8ecf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office365_services_user_countsable.go @@ -0,0 +1,43 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Office365ServicesUserCountsable +type Office365ServicesUserCountsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExchangeActive()(*int64) + GetExchangeInactive()(*int64) + GetOffice365Active()(*int64) + GetOffice365Inactive()(*int64) + GetOneDriveActive()(*int64) + GetOneDriveInactive()(*int64) + GetReportPeriod()(*string) + GetReportRefreshDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSharePointActive()(*int64) + GetSharePointInactive()(*int64) + GetSkypeForBusinessActive()(*int64) + GetSkypeForBusinessInactive()(*int64) + GetTeamsActive()(*int64) + GetTeamsInactive()(*int64) + GetYammerActive()(*int64) + GetYammerInactive()(*int64) + SetExchangeActive(value *int64)() + SetExchangeInactive(value *int64)() + SetOffice365Active(value *int64)() + SetOffice365Inactive(value *int64)() + SetOneDriveActive(value *int64)() + SetOneDriveInactive(value *int64)() + SetReportPeriod(value *string)() + SetReportRefreshDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSharePointActive(value *int64)() + SetSharePointInactive(value *int64)() + SetSkypeForBusinessActive(value *int64)() + SetSkypeForBusinessInactive(value *int64)() + SetTeamsActive(value *int64)() + SetTeamsInactive(value *int64)() + SetYammerActive(value *int64)() + SetYammerInactive(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_checkin_status.go b/src/internal/connector/graph/betasdk/models/office_client_checkin_status.go new file mode 100644 index 000000000..a0d1a3c57 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_checkin_status.go @@ -0,0 +1,310 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientCheckinStatus +type OfficeClientCheckinStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // List of policies delivered to the device as last checkin. + appliedPolicies []string + // Last device check-in time in UTC. + checkinDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Device name trying to check-in. + deviceName *string + // Device platform trying to check-in. + devicePlatform *string + // Device platform version trying to check-in. + devicePlatformVersion *string + // Error message if any associated for the last checkin. + errorMessage *string + // The OdataType property + odataType *string + // User identifier using the device. + userId *string + // User principal name using the device. + userPrincipalName *string + // If the last checkin was successful. + wasSuccessful *bool +} +// NewOfficeClientCheckinStatus instantiates a new officeClientCheckinStatus and sets the default values. +func NewOfficeClientCheckinStatus()(*OfficeClientCheckinStatus) { + m := &OfficeClientCheckinStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOfficeClientCheckinStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientCheckinStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeClientCheckinStatus(), 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 *OfficeClientCheckinStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppliedPolicies gets the appliedPolicies property value. List of policies delivered to the device as last checkin. +func (m *OfficeClientCheckinStatus) GetAppliedPolicies()([]string) { + return m.appliedPolicies +} +// GetCheckinDateTime gets the checkinDateTime property value. Last device check-in time in UTC. +func (m *OfficeClientCheckinStatus) GetCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.checkinDateTime +} +// GetDeviceName gets the deviceName property value. Device name trying to check-in. +func (m *OfficeClientCheckinStatus) GetDeviceName()(*string) { + return m.deviceName +} +// GetDevicePlatform gets the devicePlatform property value. Device platform trying to check-in. +func (m *OfficeClientCheckinStatus) GetDevicePlatform()(*string) { + return m.devicePlatform +} +// GetDevicePlatformVersion gets the devicePlatformVersion property value. Device platform version trying to check-in. +func (m *OfficeClientCheckinStatus) GetDevicePlatformVersion()(*string) { + return m.devicePlatformVersion +} +// GetErrorMessage gets the errorMessage property value. Error message if any associated for the last checkin. +func (m *OfficeClientCheckinStatus) GetErrorMessage()(*string) { + return m.errorMessage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientCheckinStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appliedPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAppliedPolicies(res) + } + return nil + } + res["checkinDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCheckinDateTime(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["devicePlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevicePlatform(val) + } + return nil + } + res["devicePlatformVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDevicePlatformVersion(val) + } + return nil + } + res["errorMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorMessage(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["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["wasSuccessful"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetWasSuccessful(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OfficeClientCheckinStatus) GetOdataType()(*string) { + return m.odataType +} +// GetUserId gets the userId property value. User identifier using the device. +func (m *OfficeClientCheckinStatus) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. User principal name using the device. +func (m *OfficeClientCheckinStatus) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetWasSuccessful gets the wasSuccessful property value. If the last checkin was successful. +func (m *OfficeClientCheckinStatus) GetWasSuccessful()(*bool) { + return m.wasSuccessful +} +// Serialize serializes information the current object +func (m *OfficeClientCheckinStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAppliedPolicies() != nil { + err := writer.WriteCollectionOfStringValues("appliedPolicies", m.GetAppliedPolicies()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("checkinDateTime", m.GetCheckinDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devicePlatform", m.GetDevicePlatform()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("devicePlatformVersion", m.GetDevicePlatformVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("errorMessage", m.GetErrorMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("wasSuccessful", m.GetWasSuccessful()) + 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 *OfficeClientCheckinStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppliedPolicies sets the appliedPolicies property value. List of policies delivered to the device as last checkin. +func (m *OfficeClientCheckinStatus) SetAppliedPolicies(value []string)() { + m.appliedPolicies = value +} +// SetCheckinDateTime sets the checkinDateTime property value. Last device check-in time in UTC. +func (m *OfficeClientCheckinStatus) SetCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.checkinDateTime = value +} +// SetDeviceName sets the deviceName property value. Device name trying to check-in. +func (m *OfficeClientCheckinStatus) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetDevicePlatform sets the devicePlatform property value. Device platform trying to check-in. +func (m *OfficeClientCheckinStatus) SetDevicePlatform(value *string)() { + m.devicePlatform = value +} +// SetDevicePlatformVersion sets the devicePlatformVersion property value. Device platform version trying to check-in. +func (m *OfficeClientCheckinStatus) SetDevicePlatformVersion(value *string)() { + m.devicePlatformVersion = value +} +// SetErrorMessage sets the errorMessage property value. Error message if any associated for the last checkin. +func (m *OfficeClientCheckinStatus) SetErrorMessage(value *string)() { + m.errorMessage = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OfficeClientCheckinStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserId sets the userId property value. User identifier using the device. +func (m *OfficeClientCheckinStatus) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User principal name using the device. +func (m *OfficeClientCheckinStatus) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetWasSuccessful sets the wasSuccessful property value. If the last checkin was successful. +func (m *OfficeClientCheckinStatus) SetWasSuccessful(value *bool)() { + m.wasSuccessful = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_response.go b/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_response.go new file mode 100644 index 000000000..b2299abde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientCheckinStatusCollectionResponse +type OfficeClientCheckinStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OfficeClientCheckinStatusable +} +// NewOfficeClientCheckinStatusCollectionResponse instantiates a new OfficeClientCheckinStatusCollectionResponse and sets the default values. +func NewOfficeClientCheckinStatusCollectionResponse()(*OfficeClientCheckinStatusCollectionResponse) { + m := &OfficeClientCheckinStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOfficeClientCheckinStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientCheckinStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeClientCheckinStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientCheckinStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeClientCheckinStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeClientCheckinStatusable, len(val)) + for i, v := range val { + res[i] = v.(OfficeClientCheckinStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OfficeClientCheckinStatusCollectionResponse) GetValue()([]OfficeClientCheckinStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *OfficeClientCheckinStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OfficeClientCheckinStatusCollectionResponse) SetValue(value []OfficeClientCheckinStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_responseable.go new file mode 100644 index 000000000..5fdf92a97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_checkin_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientCheckinStatusCollectionResponseable +type OfficeClientCheckinStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OfficeClientCheckinStatusable) + SetValue(value []OfficeClientCheckinStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_checkin_statusable.go b/src/internal/connector/graph/betasdk/models/office_client_checkin_statusable.go new file mode 100644 index 000000000..0808f6d2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_checkin_statusable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientCheckinStatusable +type OfficeClientCheckinStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliedPolicies()([]string) + GetCheckinDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDeviceName()(*string) + GetDevicePlatform()(*string) + GetDevicePlatformVersion()(*string) + GetErrorMessage()(*string) + GetOdataType()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + GetWasSuccessful()(*bool) + SetAppliedPolicies(value []string)() + SetCheckinDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDeviceName(value *string)() + SetDevicePlatform(value *string)() + SetDevicePlatformVersion(value *string)() + SetErrorMessage(value *string)() + SetOdataType(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() + SetWasSuccessful(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration.go b/src/internal/connector/graph/betasdk/models/office_client_configuration.go new file mode 100644 index 000000000..e2fe0aa00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration.go @@ -0,0 +1,278 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfiguration +type OfficeClientConfiguration struct { + Entity + // The list of group assignments for the policy. + assignments []OfficeClientConfigurationAssignmentable + // List of office Client check-in status. + checkinStatuses []OfficeClientCheckinStatusable + // Not yet documented + description *string + // Admin provided description of the office client configuration policy. + displayName *string + // Policy settings JSON string in binary format, these values cannot be changed by the user. + policyPayload []byte + // Priority value should be unique value for each policy under a tenant and will be used for conflict resolution, lower values mean priority is high. + priority *int32 + // User check-in summary for the policy. + userCheckinSummary OfficeUserCheckinSummaryable + // Preference settings JSON string in binary format, these values can be overridden by the user. + userPreferencePayload []byte +} +// NewOfficeClientConfiguration instantiates a new OfficeClientConfiguration and sets the default values. +func NewOfficeClientConfiguration()(*OfficeClientConfiguration) { + m := &OfficeClientConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreateOfficeClientConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.windowsOfficeClientConfiguration": + return NewWindowsOfficeClientConfiguration(), nil + case "#microsoft.graph.windowsOfficeClientSecurityConfiguration": + return NewWindowsOfficeClientSecurityConfiguration(), nil + } + } + } + } + return NewOfficeClientConfiguration(), nil +} +// GetAssignments gets the assignments property value. The list of group assignments for the policy. +func (m *OfficeClientConfiguration) GetAssignments()([]OfficeClientConfigurationAssignmentable) { + return m.assignments +} +// GetCheckinStatuses gets the checkinStatuses property value. List of office Client check-in status. +func (m *OfficeClientConfiguration) GetCheckinStatuses()([]OfficeClientCheckinStatusable) { + return m.checkinStatuses +} +// GetDescription gets the description property value. Not yet documented +func (m *OfficeClientConfiguration) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Admin provided description of the office client configuration policy. +func (m *OfficeClientConfiguration) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeClientConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeClientConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(OfficeClientConfigurationAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["checkinStatuses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeClientCheckinStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeClientCheckinStatusable, len(val)) + for i, v := range val { + res[i] = v.(OfficeClientCheckinStatusable) + } + m.SetCheckinStatuses(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["policyPayload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyPayload(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["userCheckinSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOfficeUserCheckinSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserCheckinSummary(val.(OfficeUserCheckinSummaryable)) + } + return nil + } + res["userPreferencePayload"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPreferencePayload(val) + } + return nil + } + return res +} +// GetPolicyPayload gets the policyPayload property value. Policy settings JSON string in binary format, these values cannot be changed by the user. +func (m *OfficeClientConfiguration) GetPolicyPayload()([]byte) { + return m.policyPayload +} +// GetPriority gets the priority property value. Priority value should be unique value for each policy under a tenant and will be used for conflict resolution, lower values mean priority is high. +func (m *OfficeClientConfiguration) GetPriority()(*int32) { + return m.priority +} +// GetUserCheckinSummary gets the userCheckinSummary property value. User check-in summary for the policy. +func (m *OfficeClientConfiguration) GetUserCheckinSummary()(OfficeUserCheckinSummaryable) { + return m.userCheckinSummary +} +// GetUserPreferencePayload gets the userPreferencePayload property value. Preference settings JSON string in binary format, these values can be overridden by the user. +func (m *OfficeClientConfiguration) GetUserPreferencePayload()([]byte) { + return m.userPreferencePayload +} +// Serialize serializes information the current object +func (m *OfficeClientConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + if m.GetCheckinStatuses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCheckinStatuses())) + for i, v := range m.GetCheckinStatuses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("checkinStatuses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("policyPayload", m.GetPolicyPayload()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userCheckinSummary", m.GetUserCheckinSummary()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("userPreferencePayload", m.GetUserPreferencePayload()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of group assignments for the policy. +func (m *OfficeClientConfiguration) SetAssignments(value []OfficeClientConfigurationAssignmentable)() { + m.assignments = value +} +// SetCheckinStatuses sets the checkinStatuses property value. List of office Client check-in status. +func (m *OfficeClientConfiguration) SetCheckinStatuses(value []OfficeClientCheckinStatusable)() { + m.checkinStatuses = value +} +// SetDescription sets the description property value. Not yet documented +func (m *OfficeClientConfiguration) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Admin provided description of the office client configuration policy. +func (m *OfficeClientConfiguration) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPolicyPayload sets the policyPayload property value. Policy settings JSON string in binary format, these values cannot be changed by the user. +func (m *OfficeClientConfiguration) SetPolicyPayload(value []byte)() { + m.policyPayload = value +} +// SetPriority sets the priority property value. Priority value should be unique value for each policy under a tenant and will be used for conflict resolution, lower values mean priority is high. +func (m *OfficeClientConfiguration) SetPriority(value *int32)() { + m.priority = value +} +// SetUserCheckinSummary sets the userCheckinSummary property value. User check-in summary for the policy. +func (m *OfficeClientConfiguration) SetUserCheckinSummary(value OfficeUserCheckinSummaryable)() { + m.userCheckinSummary = value +} +// SetUserPreferencePayload sets the userPreferencePayload property value. Preference settings JSON string in binary format, these values can be overridden by the user. +func (m *OfficeClientConfiguration) SetUserPreferencePayload(value []byte)() { + m.userPreferencePayload = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment.go new file mode 100644 index 000000000..4b2e1a2c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OfficeClientConfigurationAssignment struct { + Entity + // The target assignment defined by the admin. + target OfficeConfigurationAssignmentTargetable +} +// NewOfficeClientConfigurationAssignment instantiates a new officeClientConfigurationAssignment and sets the default values. +func NewOfficeClientConfigurationAssignment()(*OfficeClientConfigurationAssignment) { + m := &OfficeClientConfigurationAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateOfficeClientConfigurationAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientConfigurationAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeClientConfigurationAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientConfigurationAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOfficeConfigurationAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(OfficeConfigurationAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The target assignment defined by the admin. +func (m *OfficeClientConfigurationAssignment) GetTarget()(OfficeConfigurationAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *OfficeClientConfigurationAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The target assignment defined by the admin. +func (m *OfficeClientConfigurationAssignment) SetTarget(value OfficeConfigurationAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_response.go new file mode 100644 index 000000000..5e4c24dd2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationAssignmentCollectionResponse +type OfficeClientConfigurationAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OfficeClientConfigurationAssignmentable +} +// NewOfficeClientConfigurationAssignmentCollectionResponse instantiates a new OfficeClientConfigurationAssignmentCollectionResponse and sets the default values. +func NewOfficeClientConfigurationAssignmentCollectionResponse()(*OfficeClientConfigurationAssignmentCollectionResponse) { + m := &OfficeClientConfigurationAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOfficeClientConfigurationAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientConfigurationAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeClientConfigurationAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientConfigurationAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeClientConfigurationAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeClientConfigurationAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(OfficeClientConfigurationAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OfficeClientConfigurationAssignmentCollectionResponse) GetValue()([]OfficeClientConfigurationAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *OfficeClientConfigurationAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OfficeClientConfigurationAssignmentCollectionResponse) SetValue(value []OfficeClientConfigurationAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_responseable.go new file mode 100644 index 000000000..c6708cbde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationAssignmentCollectionResponseable +type OfficeClientConfigurationAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OfficeClientConfigurationAssignmentable) + SetValue(value []OfficeClientConfigurationAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_assignmentable.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignmentable.go new file mode 100644 index 000000000..62797a62e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationAssignmentable +type OfficeClientConfigurationAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(OfficeConfigurationAssignmentTargetable) + SetTarget(value OfficeConfigurationAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_response.go new file mode 100644 index 000000000..b68cffafe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationCollectionResponse +type OfficeClientConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OfficeClientConfigurationable +} +// NewOfficeClientConfigurationCollectionResponse instantiates a new OfficeClientConfigurationCollectionResponse and sets the default values. +func NewOfficeClientConfigurationCollectionResponse()(*OfficeClientConfigurationCollectionResponse) { + m := &OfficeClientConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOfficeClientConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeClientConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeClientConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeClientConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeClientConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeClientConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(OfficeClientConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OfficeClientConfigurationCollectionResponse) GetValue()([]OfficeClientConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *OfficeClientConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OfficeClientConfigurationCollectionResponse) SetValue(value []OfficeClientConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_responseable.go new file mode 100644 index 000000000..e5f5cf327 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationCollectionResponseable +type OfficeClientConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OfficeClientConfigurationable) + SetValue(value []OfficeClientConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_client_configurationable.go b/src/internal/connector/graph/betasdk/models/office_client_configurationable.go new file mode 100644 index 000000000..8ecfbd7be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_client_configurationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeClientConfigurationable +type OfficeClientConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]OfficeClientConfigurationAssignmentable) + GetCheckinStatuses()([]OfficeClientCheckinStatusable) + GetDescription()(*string) + GetDisplayName()(*string) + GetPolicyPayload()([]byte) + GetPriority()(*int32) + GetUserCheckinSummary()(OfficeUserCheckinSummaryable) + GetUserPreferencePayload()([]byte) + SetAssignments(value []OfficeClientConfigurationAssignmentable)() + SetCheckinStatuses(value []OfficeClientCheckinStatusable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetPolicyPayload(value []byte)() + SetPriority(value *int32)() + SetUserCheckinSummary(value OfficeUserCheckinSummaryable)() + SetUserPreferencePayload(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_configuration_assignment_target.go b/src/internal/connector/graph/betasdk/models/office_configuration_assignment_target.go new file mode 100644 index 000000000..a840d8645 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_configuration_assignment_target.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeConfigurationAssignmentTarget +type OfficeConfigurationAssignmentTarget 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 OdataType property + odataType *string +} +// NewOfficeConfigurationAssignmentTarget instantiates a new officeConfigurationAssignmentTarget and sets the default values. +func NewOfficeConfigurationAssignmentTarget()(*OfficeConfigurationAssignmentTarget) { + m := &OfficeConfigurationAssignmentTarget{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOfficeConfigurationAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeConfigurationAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.officeConfigurationGroupAssignmentTarget": + return NewOfficeConfigurationGroupAssignmentTarget(), nil + } + } + } + } + return NewOfficeConfigurationAssignmentTarget(), 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 *OfficeConfigurationAssignmentTarget) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeConfigurationAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OfficeConfigurationAssignmentTarget) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OfficeConfigurationAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OfficeConfigurationAssignmentTarget) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OfficeConfigurationAssignmentTarget) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_configuration_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/office_configuration_assignment_targetable.go new file mode 100644 index 000000000..1467ac407 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_configuration_assignment_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeConfigurationAssignmentTargetable +type OfficeConfigurationAssignmentTargetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_target.go b/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_target.go new file mode 100644 index 000000000..590f12f5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_target.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeConfigurationGroupAssignmentTarget +type OfficeConfigurationGroupAssignmentTarget struct { + OfficeConfigurationAssignmentTarget + // The Id of the AAD group we are targeting the device configuration to. + groupId *string +} +// NewOfficeConfigurationGroupAssignmentTarget instantiates a new OfficeConfigurationGroupAssignmentTarget and sets the default values. +func NewOfficeConfigurationGroupAssignmentTarget()(*OfficeConfigurationGroupAssignmentTarget) { + m := &OfficeConfigurationGroupAssignmentTarget{ + OfficeConfigurationAssignmentTarget: *NewOfficeConfigurationAssignmentTarget(), + } + odataTypeValue := "#microsoft.graph.officeConfigurationGroupAssignmentTarget"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOfficeConfigurationGroupAssignmentTargetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeConfigurationGroupAssignmentTargetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeConfigurationGroupAssignmentTarget(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeConfigurationGroupAssignmentTarget) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OfficeConfigurationAssignmentTarget.GetFieldDeserializers() + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The Id of the AAD group we are targeting the device configuration to. +func (m *OfficeConfigurationGroupAssignmentTarget) GetGroupId()(*string) { + return m.groupId +} +// Serialize serializes information the current object +func (m *OfficeConfigurationGroupAssignmentTarget) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OfficeConfigurationAssignmentTarget.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetGroupId sets the groupId property value. The Id of the AAD group we are targeting the device configuration to. +func (m *OfficeConfigurationGroupAssignmentTarget) SetGroupId(value *string)() { + m.groupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_targetable.go b/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_targetable.go new file mode 100644 index 000000000..272f7d7ee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_configuration_group_assignment_targetable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeConfigurationGroupAssignmentTargetable +type OfficeConfigurationGroupAssignmentTargetable interface { + OfficeConfigurationAssignmentTargetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroupId()(*string) + SetGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_graph_insights.go b/src/internal/connector/graph/betasdk/models/office_graph_insights.go new file mode 100644 index 000000000..d6f58bfd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_graph_insights.go @@ -0,0 +1,154 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeGraphInsights +type OfficeGraphInsights struct { + Entity + // Access this property from the derived type itemInsights. + shared []SharedInsightable + // Access this property from the derived type itemInsights. + trending []Trendingable + // Access this property from the derived type itemInsights. + used []UsedInsightable +} +// NewOfficeGraphInsights instantiates a new officeGraphInsights and sets the default values. +func NewOfficeGraphInsights()(*OfficeGraphInsights) { + m := &OfficeGraphInsights{ + Entity: *NewEntity(), + } + return m +} +// CreateOfficeGraphInsightsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeGraphInsightsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.itemInsights": + return NewItemInsights(), nil + } + } + } + } + return NewOfficeGraphInsights(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeGraphInsights) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["shared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedInsightable, len(val)) + for i, v := range val { + res[i] = v.(SharedInsightable) + } + m.SetShared(res) + } + return nil + } + res["trending"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTrendingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Trendingable, len(val)) + for i, v := range val { + res[i] = v.(Trendingable) + } + m.SetTrending(res) + } + return nil + } + res["used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUsedInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UsedInsightable, len(val)) + for i, v := range val { + res[i] = v.(UsedInsightable) + } + m.SetUsed(res) + } + return nil + } + return res +} +// GetShared gets the shared property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) GetShared()([]SharedInsightable) { + return m.shared +} +// GetTrending gets the trending property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) GetTrending()([]Trendingable) { + return m.trending +} +// GetUsed gets the used property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) GetUsed()([]UsedInsightable) { + return m.used +} +// Serialize serializes information the current object +func (m *OfficeGraphInsights) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetShared() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetShared())) + for i, v := range m.GetShared() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("shared", cast) + if err != nil { + return err + } + } + if m.GetTrending() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTrending())) + for i, v := range m.GetTrending() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("trending", cast) + if err != nil { + return err + } + } + if m.GetUsed() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUsed())) + for i, v := range m.GetUsed() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("used", cast) + if err != nil { + return err + } + } + return nil +} +// SetShared sets the shared property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) SetShared(value []SharedInsightable)() { + m.shared = value +} +// SetTrending sets the trending property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) SetTrending(value []Trendingable)() { + m.trending = value +} +// SetUsed sets the used property value. Access this property from the derived type itemInsights. +func (m *OfficeGraphInsights) SetUsed(value []UsedInsightable)() { + m.used = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_graph_insightsable.go b/src/internal/connector/graph/betasdk/models/office_graph_insightsable.go new file mode 100644 index 000000000..d30a4ac60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_graph_insightsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeGraphInsightsable +type OfficeGraphInsightsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetShared()([]SharedInsightable) + GetTrending()([]Trendingable) + GetUsed()([]UsedInsightable) + SetShared(value []SharedInsightable)() + SetTrending(value []Trendingable)() + SetUsed(value []UsedInsightable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_product_id.go b/src/internal/connector/graph/betasdk/models/office_product_id.go new file mode 100644 index 000000000..f0bbe1268 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_product_id.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OfficeProductId int + +const ( + O365PROPLUSRETAIL_OFFICEPRODUCTID OfficeProductId = iota + O365BUSINESSRETAIL_OFFICEPRODUCTID + VISIOPRORETAIL_OFFICEPRODUCTID + PROJECTPRORETAIL_OFFICEPRODUCTID +) + +func (i OfficeProductId) String() string { + return []string{"o365ProPlusRetail", "o365BusinessRetail", "visioProRetail", "projectProRetail"}[i] +} +func ParseOfficeProductId(v string) (interface{}, error) { + result := O365PROPLUSRETAIL_OFFICEPRODUCTID + switch v { + case "o365ProPlusRetail": + result = O365PROPLUSRETAIL_OFFICEPRODUCTID + case "o365BusinessRetail": + result = O365BUSINESSRETAIL_OFFICEPRODUCTID + case "visioProRetail": + result = VISIOPRORETAIL_OFFICEPRODUCTID + case "projectProRetail": + result = PROJECTPRORETAIL_OFFICEPRODUCTID + default: + return 0, errors.New("Unknown OfficeProductId value: " + v) + } + return &result, nil +} +func SerializeOfficeProductId(values []OfficeProductId) []string { + 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/office_suite_app.go b/src/internal/connector/graph/betasdk/models/office_suite_app.go new file mode 100644 index 000000000..76bc21cf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_app.go @@ -0,0 +1,386 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeSuiteApp +type OfficeSuiteApp struct { + MobileApp + // The value to accept the EULA automatically on the enduser's device. + autoAcceptEula *bool + // The property to represent the apps which are excluded from the selected Office365 Product Id. + excludedApps ExcludedAppsable + // The Enum to specify the level of display for the Installation Progress Setup UI on the Device. + installProgressDisplayLevel *OfficeSuiteInstallProgressDisplayLevel + // The property to represent the locales which are installed when the apps from Office365 is installed. It uses standard RFC 6033. Ref: https://technet.microsoft.com/library/cc179219(v=office.16).aspx + localesToInstall []string + // The property to represent the XML configuration file that can be specified for Office ProPlus Apps. Takes precedence over all other properties. When present, the XML configuration file will be used to create the app. + officeConfigurationXml []byte + // Contains properties for Windows architecture. + officePlatformArchitecture *WindowsArchitecture + // Describes the OfficeSuiteApp file format types that can be selected. + officeSuiteAppDefaultFileFormat *OfficeSuiteDefaultFileFormatType + // The Product Ids that represent the Office365 Suite SKU. + productIds []OfficeProductId + // The property to determine whether to uninstall existing Office MSI if an Office365 app suite is deployed to the device or not. + shouldUninstallOlderVersionsOfOffice *bool + // The property to represent the specific target version for the Office365 app suite that should be remained deployed on the devices. + targetVersion *string + // The Enum to specify the Office365 Updates Channel. + updateChannel *OfficeUpdateChannel + // The property to represent the update version in which the specific target version is available for the Office365 app suite. + updateVersion *string + // The property to represent that whether the shared computer activation is used not for Office365 app suite. + useSharedComputerActivation *bool +} +// NewOfficeSuiteApp instantiates a new OfficeSuiteApp and sets the default values. +func NewOfficeSuiteApp()(*OfficeSuiteApp) { + m := &OfficeSuiteApp{ + MobileApp: *NewMobileApp(), + } + odataTypeValue := "#microsoft.graph.officeSuiteApp"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOfficeSuiteAppFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeSuiteAppFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeSuiteApp(), nil +} +// GetAutoAcceptEula gets the autoAcceptEula property value. The value to accept the EULA automatically on the enduser's device. +func (m *OfficeSuiteApp) GetAutoAcceptEula()(*bool) { + return m.autoAcceptEula +} +// GetExcludedApps gets the excludedApps property value. The property to represent the apps which are excluded from the selected Office365 Product Id. +func (m *OfficeSuiteApp) GetExcludedApps()(ExcludedAppsable) { + return m.excludedApps +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeSuiteApp) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MobileApp.GetFieldDeserializers() + res["autoAcceptEula"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAutoAcceptEula(val) + } + return nil + } + res["excludedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExcludedAppsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExcludedApps(val.(ExcludedAppsable)) + } + return nil + } + res["installProgressDisplayLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOfficeSuiteInstallProgressDisplayLevel) + if err != nil { + return err + } + if val != nil { + m.SetInstallProgressDisplayLevel(val.(*OfficeSuiteInstallProgressDisplayLevel)) + } + return nil + } + res["localesToInstall"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetLocalesToInstall(res) + } + return nil + } + res["officeConfigurationXml"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeConfigurationXml(val) + } + return nil + } + res["officePlatformArchitecture"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsArchitecture) + if err != nil { + return err + } + if val != nil { + m.SetOfficePlatformArchitecture(val.(*WindowsArchitecture)) + } + return nil + } + res["officeSuiteAppDefaultFileFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOfficeSuiteDefaultFileFormatType) + if err != nil { + return err + } + if val != nil { + m.SetOfficeSuiteAppDefaultFileFormat(val.(*OfficeSuiteDefaultFileFormatType)) + } + return nil + } + res["productIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseOfficeProductId) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeProductId, len(val)) + for i, v := range val { + res[i] = *(v.(*OfficeProductId)) + } + m.SetProductIds(res) + } + return nil + } + res["shouldUninstallOlderVersionsOfOffice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetShouldUninstallOlderVersionsOfOffice(val) + } + return nil + } + res["targetVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetVersion(val) + } + return nil + } + res["updateChannel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOfficeUpdateChannel) + if err != nil { + return err + } + if val != nil { + m.SetUpdateChannel(val.(*OfficeUpdateChannel)) + } + return nil + } + res["updateVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdateVersion(val) + } + return nil + } + res["useSharedComputerActivation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseSharedComputerActivation(val) + } + return nil + } + return res +} +// GetInstallProgressDisplayLevel gets the installProgressDisplayLevel property value. The Enum to specify the level of display for the Installation Progress Setup UI on the Device. +func (m *OfficeSuiteApp) GetInstallProgressDisplayLevel()(*OfficeSuiteInstallProgressDisplayLevel) { + return m.installProgressDisplayLevel +} +// GetLocalesToInstall gets the localesToInstall property value. The property to represent the locales which are installed when the apps from Office365 is installed. It uses standard RFC 6033. Ref: https://technet.microsoft.com/library/cc179219(v=office.16).aspx +func (m *OfficeSuiteApp) GetLocalesToInstall()([]string) { + return m.localesToInstall +} +// GetOfficeConfigurationXml gets the officeConfigurationXml property value. The property to represent the XML configuration file that can be specified for Office ProPlus Apps. Takes precedence over all other properties. When present, the XML configuration file will be used to create the app. +func (m *OfficeSuiteApp) GetOfficeConfigurationXml()([]byte) { + return m.officeConfigurationXml +} +// GetOfficePlatformArchitecture gets the officePlatformArchitecture property value. Contains properties for Windows architecture. +func (m *OfficeSuiteApp) GetOfficePlatformArchitecture()(*WindowsArchitecture) { + return m.officePlatformArchitecture +} +// GetOfficeSuiteAppDefaultFileFormat gets the officeSuiteAppDefaultFileFormat property value. Describes the OfficeSuiteApp file format types that can be selected. +func (m *OfficeSuiteApp) GetOfficeSuiteAppDefaultFileFormat()(*OfficeSuiteDefaultFileFormatType) { + return m.officeSuiteAppDefaultFileFormat +} +// GetProductIds gets the productIds property value. The Product Ids that represent the Office365 Suite SKU. +func (m *OfficeSuiteApp) GetProductIds()([]OfficeProductId) { + return m.productIds +} +// GetShouldUninstallOlderVersionsOfOffice gets the shouldUninstallOlderVersionsOfOffice property value. The property to determine whether to uninstall existing Office MSI if an Office365 app suite is deployed to the device or not. +func (m *OfficeSuiteApp) GetShouldUninstallOlderVersionsOfOffice()(*bool) { + return m.shouldUninstallOlderVersionsOfOffice +} +// GetTargetVersion gets the targetVersion property value. The property to represent the specific target version for the Office365 app suite that should be remained deployed on the devices. +func (m *OfficeSuiteApp) GetTargetVersion()(*string) { + return m.targetVersion +} +// GetUpdateChannel gets the updateChannel property value. The Enum to specify the Office365 Updates Channel. +func (m *OfficeSuiteApp) GetUpdateChannel()(*OfficeUpdateChannel) { + return m.updateChannel +} +// GetUpdateVersion gets the updateVersion property value. The property to represent the update version in which the specific target version is available for the Office365 app suite. +func (m *OfficeSuiteApp) GetUpdateVersion()(*string) { + return m.updateVersion +} +// GetUseSharedComputerActivation gets the useSharedComputerActivation property value. The property to represent that whether the shared computer activation is used not for Office365 app suite. +func (m *OfficeSuiteApp) GetUseSharedComputerActivation()(*bool) { + return m.useSharedComputerActivation +} +// Serialize serializes information the current object +func (m *OfficeSuiteApp) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MobileApp.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("autoAcceptEula", m.GetAutoAcceptEula()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("excludedApps", m.GetExcludedApps()) + if err != nil { + return err + } + } + if m.GetInstallProgressDisplayLevel() != nil { + cast := (*m.GetInstallProgressDisplayLevel()).String() + err = writer.WriteStringValue("installProgressDisplayLevel", &cast) + if err != nil { + return err + } + } + if m.GetLocalesToInstall() != nil { + err = writer.WriteCollectionOfStringValues("localesToInstall", m.GetLocalesToInstall()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("officeConfigurationXml", m.GetOfficeConfigurationXml()) + if err != nil { + return err + } + } + if m.GetOfficePlatformArchitecture() != nil { + cast := (*m.GetOfficePlatformArchitecture()).String() + err = writer.WriteStringValue("officePlatformArchitecture", &cast) + if err != nil { + return err + } + } + if m.GetOfficeSuiteAppDefaultFileFormat() != nil { + cast := (*m.GetOfficeSuiteAppDefaultFileFormat()).String() + err = writer.WriteStringValue("officeSuiteAppDefaultFileFormat", &cast) + if err != nil { + return err + } + } + if m.GetProductIds() != nil { + err = writer.WriteCollectionOfStringValues("productIds", SerializeOfficeProductId(m.GetProductIds())) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("shouldUninstallOlderVersionsOfOffice", m.GetShouldUninstallOlderVersionsOfOffice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetVersion", m.GetTargetVersion()) + if err != nil { + return err + } + } + if m.GetUpdateChannel() != nil { + cast := (*m.GetUpdateChannel()).String() + err = writer.WriteStringValue("updateChannel", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("updateVersion", m.GetUpdateVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("useSharedComputerActivation", m.GetUseSharedComputerActivation()) + if err != nil { + return err + } + } + return nil +} +// SetAutoAcceptEula sets the autoAcceptEula property value. The value to accept the EULA automatically on the enduser's device. +func (m *OfficeSuiteApp) SetAutoAcceptEula(value *bool)() { + m.autoAcceptEula = value +} +// SetExcludedApps sets the excludedApps property value. The property to represent the apps which are excluded from the selected Office365 Product Id. +func (m *OfficeSuiteApp) SetExcludedApps(value ExcludedAppsable)() { + m.excludedApps = value +} +// SetInstallProgressDisplayLevel sets the installProgressDisplayLevel property value. The Enum to specify the level of display for the Installation Progress Setup UI on the Device. +func (m *OfficeSuiteApp) SetInstallProgressDisplayLevel(value *OfficeSuiteInstallProgressDisplayLevel)() { + m.installProgressDisplayLevel = value +} +// SetLocalesToInstall sets the localesToInstall property value. The property to represent the locales which are installed when the apps from Office365 is installed. It uses standard RFC 6033. Ref: https://technet.microsoft.com/library/cc179219(v=office.16).aspx +func (m *OfficeSuiteApp) SetLocalesToInstall(value []string)() { + m.localesToInstall = value +} +// SetOfficeConfigurationXml sets the officeConfigurationXml property value. The property to represent the XML configuration file that can be specified for Office ProPlus Apps. Takes precedence over all other properties. When present, the XML configuration file will be used to create the app. +func (m *OfficeSuiteApp) SetOfficeConfigurationXml(value []byte)() { + m.officeConfigurationXml = value +} +// SetOfficePlatformArchitecture sets the officePlatformArchitecture property value. Contains properties for Windows architecture. +func (m *OfficeSuiteApp) SetOfficePlatformArchitecture(value *WindowsArchitecture)() { + m.officePlatformArchitecture = value +} +// SetOfficeSuiteAppDefaultFileFormat sets the officeSuiteAppDefaultFileFormat property value. Describes the OfficeSuiteApp file format types that can be selected. +func (m *OfficeSuiteApp) SetOfficeSuiteAppDefaultFileFormat(value *OfficeSuiteDefaultFileFormatType)() { + m.officeSuiteAppDefaultFileFormat = value +} +// SetProductIds sets the productIds property value. The Product Ids that represent the Office365 Suite SKU. +func (m *OfficeSuiteApp) SetProductIds(value []OfficeProductId)() { + m.productIds = value +} +// SetShouldUninstallOlderVersionsOfOffice sets the shouldUninstallOlderVersionsOfOffice property value. The property to determine whether to uninstall existing Office MSI if an Office365 app suite is deployed to the device or not. +func (m *OfficeSuiteApp) SetShouldUninstallOlderVersionsOfOffice(value *bool)() { + m.shouldUninstallOlderVersionsOfOffice = value +} +// SetTargetVersion sets the targetVersion property value. The property to represent the specific target version for the Office365 app suite that should be remained deployed on the devices. +func (m *OfficeSuiteApp) SetTargetVersion(value *string)() { + m.targetVersion = value +} +// SetUpdateChannel sets the updateChannel property value. The Enum to specify the Office365 Updates Channel. +func (m *OfficeSuiteApp) SetUpdateChannel(value *OfficeUpdateChannel)() { + m.updateChannel = value +} +// SetUpdateVersion sets the updateVersion property value. The property to represent the update version in which the specific target version is available for the Office365 app suite. +func (m *OfficeSuiteApp) SetUpdateVersion(value *string)() { + m.updateVersion = value +} +// SetUseSharedComputerActivation sets the useSharedComputerActivation property value. The property to represent that whether the shared computer activation is used not for Office365 app suite. +func (m *OfficeSuiteApp) SetUseSharedComputerActivation(value *bool)() { + m.useSharedComputerActivation = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_suite_app_collection_response.go b/src/internal/connector/graph/betasdk/models/office_suite_app_collection_response.go new file mode 100644 index 000000000..56f049f7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_app_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeSuiteAppCollectionResponse +type OfficeSuiteAppCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OfficeSuiteAppable +} +// NewOfficeSuiteAppCollectionResponse instantiates a new OfficeSuiteAppCollectionResponse and sets the default values. +func NewOfficeSuiteAppCollectionResponse()(*OfficeSuiteAppCollectionResponse) { + m := &OfficeSuiteAppCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOfficeSuiteAppCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeSuiteAppCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeSuiteAppCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeSuiteAppCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfficeSuiteAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfficeSuiteAppable, len(val)) + for i, v := range val { + res[i] = v.(OfficeSuiteAppable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OfficeSuiteAppCollectionResponse) GetValue()([]OfficeSuiteAppable) { + return m.value +} +// Serialize serializes information the current object +func (m *OfficeSuiteAppCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OfficeSuiteAppCollectionResponse) SetValue(value []OfficeSuiteAppable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_suite_app_collection_responseable.go b/src/internal/connector/graph/betasdk/models/office_suite_app_collection_responseable.go new file mode 100644 index 000000000..3af13464c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_app_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeSuiteAppCollectionResponseable +type OfficeSuiteAppCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OfficeSuiteAppable) + SetValue(value []OfficeSuiteAppable)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_suite_appable.go b/src/internal/connector/graph/betasdk/models/office_suite_appable.go new file mode 100644 index 000000000..19e4a78ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_appable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeSuiteAppable +type OfficeSuiteAppable interface { + MobileAppable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAutoAcceptEula()(*bool) + GetExcludedApps()(ExcludedAppsable) + GetInstallProgressDisplayLevel()(*OfficeSuiteInstallProgressDisplayLevel) + GetLocalesToInstall()([]string) + GetOfficeConfigurationXml()([]byte) + GetOfficePlatformArchitecture()(*WindowsArchitecture) + GetOfficeSuiteAppDefaultFileFormat()(*OfficeSuiteDefaultFileFormatType) + GetProductIds()([]OfficeProductId) + GetShouldUninstallOlderVersionsOfOffice()(*bool) + GetTargetVersion()(*string) + GetUpdateChannel()(*OfficeUpdateChannel) + GetUpdateVersion()(*string) + GetUseSharedComputerActivation()(*bool) + SetAutoAcceptEula(value *bool)() + SetExcludedApps(value ExcludedAppsable)() + SetInstallProgressDisplayLevel(value *OfficeSuiteInstallProgressDisplayLevel)() + SetLocalesToInstall(value []string)() + SetOfficeConfigurationXml(value []byte)() + SetOfficePlatformArchitecture(value *WindowsArchitecture)() + SetOfficeSuiteAppDefaultFileFormat(value *OfficeSuiteDefaultFileFormatType)() + SetProductIds(value []OfficeProductId)() + SetShouldUninstallOlderVersionsOfOffice(value *bool)() + SetTargetVersion(value *string)() + SetUpdateChannel(value *OfficeUpdateChannel)() + SetUpdateVersion(value *string)() + SetUseSharedComputerActivation(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/office_suite_default_file_format_type.go b/src/internal/connector/graph/betasdk/models/office_suite_default_file_format_type.go new file mode 100644 index 000000000..1b4b25f93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_default_file_format_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OfficeSuiteDefaultFileFormatType int + +const ( + // No file format selected + NOTCONFIGURED_OFFICESUITEDEFAULTFILEFORMATTYPE OfficeSuiteDefaultFileFormatType = iota + // Office Open XML Format selected + OFFICEOPENXMLFORMAT_OFFICESUITEDEFAULTFILEFORMATTYPE + // Office Open Document Format selected + OFFICEOPENDOCUMENTFORMAT_OFFICESUITEDEFAULTFILEFORMATTYPE + // Placeholder for evolvable enum. + UNKNOWNFUTUREVALUE_OFFICESUITEDEFAULTFILEFORMATTYPE +) + +func (i OfficeSuiteDefaultFileFormatType) String() string { + return []string{"notConfigured", "officeOpenXMLFormat", "officeOpenDocumentFormat", "unknownFutureValue"}[i] +} +func ParseOfficeSuiteDefaultFileFormatType(v string) (interface{}, error) { + result := NOTCONFIGURED_OFFICESUITEDEFAULTFILEFORMATTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_OFFICESUITEDEFAULTFILEFORMATTYPE + case "officeOpenXMLFormat": + result = OFFICEOPENXMLFORMAT_OFFICESUITEDEFAULTFILEFORMATTYPE + case "officeOpenDocumentFormat": + result = OFFICEOPENDOCUMENTFORMAT_OFFICESUITEDEFAULTFILEFORMATTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OFFICESUITEDEFAULTFILEFORMATTYPE + default: + return 0, errors.New("Unknown OfficeSuiteDefaultFileFormatType value: " + v) + } + return &result, nil +} +func SerializeOfficeSuiteDefaultFileFormatType(values []OfficeSuiteDefaultFileFormatType) []string { + 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/office_suite_install_progress_display_level.go b/src/internal/connector/graph/betasdk/models/office_suite_install_progress_display_level.go new file mode 100644 index 000000000..72073101a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_suite_install_progress_display_level.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OfficeSuiteInstallProgressDisplayLevel int + +const ( + NONE_OFFICESUITEINSTALLPROGRESSDISPLAYLEVEL OfficeSuiteInstallProgressDisplayLevel = iota + FULL_OFFICESUITEINSTALLPROGRESSDISPLAYLEVEL +) + +func (i OfficeSuiteInstallProgressDisplayLevel) String() string { + return []string{"none", "full"}[i] +} +func ParseOfficeSuiteInstallProgressDisplayLevel(v string) (interface{}, error) { + result := NONE_OFFICESUITEINSTALLPROGRESSDISPLAYLEVEL + switch v { + case "none": + result = NONE_OFFICESUITEINSTALLPROGRESSDISPLAYLEVEL + case "full": + result = FULL_OFFICESUITEINSTALLPROGRESSDISPLAYLEVEL + default: + return 0, errors.New("Unknown OfficeSuiteInstallProgressDisplayLevel value: " + v) + } + return &result, nil +} +func SerializeOfficeSuiteInstallProgressDisplayLevel(values []OfficeSuiteInstallProgressDisplayLevel) []string { + 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/office_update_channel.go b/src/internal/connector/graph/betasdk/models/office_update_channel.go new file mode 100644 index 000000000..cfb79c43e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_update_channel.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OfficeUpdateChannel int + +const ( + NONE_OFFICEUPDATECHANNEL OfficeUpdateChannel = iota + CURRENT_OFFICEUPDATECHANNEL + DEFERRED_OFFICEUPDATECHANNEL + FIRSTRELEASECURRENT_OFFICEUPDATECHANNEL + FIRSTRELEASEDEFERRED_OFFICEUPDATECHANNEL + MONTHLYENTERPRISE_OFFICEUPDATECHANNEL +) + +func (i OfficeUpdateChannel) String() string { + return []string{"none", "current", "deferred", "firstReleaseCurrent", "firstReleaseDeferred", "monthlyEnterprise"}[i] +} +func ParseOfficeUpdateChannel(v string) (interface{}, error) { + result := NONE_OFFICEUPDATECHANNEL + switch v { + case "none": + result = NONE_OFFICEUPDATECHANNEL + case "current": + result = CURRENT_OFFICEUPDATECHANNEL + case "deferred": + result = DEFERRED_OFFICEUPDATECHANNEL + case "firstReleaseCurrent": + result = FIRSTRELEASECURRENT_OFFICEUPDATECHANNEL + case "firstReleaseDeferred": + result = FIRSTRELEASEDEFERRED_OFFICEUPDATECHANNEL + case "monthlyEnterprise": + result = MONTHLYENTERPRISE_OFFICEUPDATECHANNEL + default: + return 0, errors.New("Unknown OfficeUpdateChannel value: " + v) + } + return &result, nil +} +func SerializeOfficeUpdateChannel(values []OfficeUpdateChannel) []string { + 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/office_user_checkin_summary.go b/src/internal/connector/graph/betasdk/models/office_user_checkin_summary.go new file mode 100644 index 000000000..4cdb981cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_user_checkin_summary.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeUserCheckinSummary +type OfficeUserCheckinSummary struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Total failed user check ins for the last 3 months. + failedUserCount *int32 + // The OdataType property + odataType *string + // Total successful user check ins for the last 3 months. + succeededUserCount *int32 +} +// NewOfficeUserCheckinSummary instantiates a new officeUserCheckinSummary and sets the default values. +func NewOfficeUserCheckinSummary()(*OfficeUserCheckinSummary) { + m := &OfficeUserCheckinSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOfficeUserCheckinSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOfficeUserCheckinSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOfficeUserCheckinSummary(), 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 *OfficeUserCheckinSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFailedUserCount gets the failedUserCount property value. Total failed user check ins for the last 3 months. +func (m *OfficeUserCheckinSummary) GetFailedUserCount()(*int32) { + return m.failedUserCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OfficeUserCheckinSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["failedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedUserCount(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["succeededUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSucceededUserCount(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OfficeUserCheckinSummary) GetOdataType()(*string) { + return m.odataType +} +// GetSucceededUserCount gets the succeededUserCount property value. Total successful user check ins for the last 3 months. +func (m *OfficeUserCheckinSummary) GetSucceededUserCount()(*int32) { + return m.succeededUserCount +} +// Serialize serializes information the current object +func (m *OfficeUserCheckinSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("failedUserCount", m.GetFailedUserCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("succeededUserCount", m.GetSucceededUserCount()) + 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 *OfficeUserCheckinSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFailedUserCount sets the failedUserCount property value. Total failed user check ins for the last 3 months. +func (m *OfficeUserCheckinSummary) SetFailedUserCount(value *int32)() { + m.failedUserCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OfficeUserCheckinSummary) SetOdataType(value *string)() { + m.odataType = value +} +// SetSucceededUserCount sets the succeededUserCount property value. Total successful user check ins for the last 3 months. +func (m *OfficeUserCheckinSummary) SetSucceededUserCount(value *int32)() { + m.succeededUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/office_user_checkin_summaryable.go b/src/internal/connector/graph/betasdk/models/office_user_checkin_summaryable.go new file mode 100644 index 000000000..5dd3946b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/office_user_checkin_summaryable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OfficeUserCheckinSummaryable +type OfficeUserCheckinSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedUserCount()(*int32) + GetOdataType()(*string) + GetSucceededUserCount()(*int32) + SetFailedUserCount(value *int32)() + SetOdataType(value *string)() + SetSucceededUserCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting.go b/src/internal/connector/graph/betasdk/models/oma_setting.go new file mode 100644 index 000000000..ff418337c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSetting oMA Settings definition. +type OmaSetting struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Description. + description *string + // Display Name. + displayName *string + // Indicates whether the value field is encrypted. This property is read-only. + isEncrypted *bool + // The OdataType property + odataType *string + // OMA. + omaUri *string + // ReferenceId for looking up secret for decryption. This property is read-only. + secretReferenceValueId *string +} +// NewOmaSetting instantiates a new omaSetting and sets the default values. +func NewOmaSetting()(*OmaSetting) { + m := &OmaSetting{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOmaSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.omaSettingBase64": + return NewOmaSettingBase64(), nil + case "#microsoft.graph.omaSettingBoolean": + return NewOmaSettingBoolean(), nil + case "#microsoft.graph.omaSettingDateTime": + return NewOmaSettingDateTime(), nil + case "#microsoft.graph.omaSettingFloatingPoint": + return NewOmaSettingFloatingPoint(), nil + case "#microsoft.graph.omaSettingInteger": + return NewOmaSettingInteger(), nil + case "#microsoft.graph.omaSettingString": + return NewOmaSettingString(), nil + case "#microsoft.graph.omaSettingStringXml": + return NewOmaSettingStringXml(), nil + } + } + } + } + return NewOmaSetting(), 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 *OmaSetting) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Description. +func (m *OmaSetting) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display Name. +func (m *OmaSetting) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isEncrypted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEncrypted(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["omaUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOmaUri(val) + } + return nil + } + res["secretReferenceValueId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretReferenceValueId(val) + } + return nil + } + return res +} +// GetIsEncrypted gets the isEncrypted property value. Indicates whether the value field is encrypted. This property is read-only. +func (m *OmaSetting) GetIsEncrypted()(*bool) { + return m.isEncrypted +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OmaSetting) GetOdataType()(*string) { + return m.odataType +} +// GetOmaUri gets the omaUri property value. OMA. +func (m *OmaSetting) GetOmaUri()(*string) { + return m.omaUri +} +// GetSecretReferenceValueId gets the secretReferenceValueId property value. ReferenceId for looking up secret for decryption. This property is read-only. +func (m *OmaSetting) GetSecretReferenceValueId()(*string) { + return m.secretReferenceValueId +} +// Serialize serializes information the current object +func (m *OmaSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("omaUri", m.GetOmaUri()) + 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 *OmaSetting) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Description. +func (m *OmaSetting) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display Name. +func (m *OmaSetting) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsEncrypted sets the isEncrypted property value. Indicates whether the value field is encrypted. This property is read-only. +func (m *OmaSetting) SetIsEncrypted(value *bool)() { + m.isEncrypted = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OmaSetting) SetOdataType(value *string)() { + m.odataType = value +} +// SetOmaUri sets the omaUri property value. OMA. +func (m *OmaSetting) SetOmaUri(value *string)() { + m.omaUri = value +} +// SetSecretReferenceValueId sets the secretReferenceValueId property value. ReferenceId for looking up secret for decryption. This property is read-only. +func (m *OmaSetting) SetSecretReferenceValueId(value *string)() { + m.secretReferenceValueId = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_base64.go b/src/internal/connector/graph/betasdk/models/oma_setting_base64.go new file mode 100644 index 000000000..6cb2df2c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_base64.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingBase64 +type OmaSettingBase64 struct { + OmaSetting + // File name associated with the Value property (.cer + fileName *string + // Value. (Base64 encoded string) + value *string +} +// NewOmaSettingBase64 instantiates a new OmaSettingBase64 and sets the default values. +func NewOmaSettingBase64()(*OmaSettingBase64) { + m := &OmaSettingBase64{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingBase64"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingBase64FromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingBase64FromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingBase64(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingBase64) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(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 +} +// GetFileName gets the fileName property value. File name associated with the Value property (.cer +func (m *OmaSettingBase64) GetFileName()(*string) { + return m.fileName +} +// GetValue gets the value property value. Value. (Base64 encoded string) +func (m *OmaSettingBase64) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingBase64) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetFileName sets the fileName property value. File name associated with the Value property (.cer +func (m *OmaSettingBase64) SetFileName(value *string)() { + m.fileName = value +} +// SetValue sets the value property value. Value. (Base64 encoded string) +func (m *OmaSettingBase64) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_base64able.go b/src/internal/connector/graph/betasdk/models/oma_setting_base64able.go new file mode 100644 index 000000000..0e025d839 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_base64able.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingBase64able +type OmaSettingBase64able interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileName()(*string) + GetValue()(*string) + SetFileName(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_boolean.go b/src/internal/connector/graph/betasdk/models/oma_setting_boolean.go new file mode 100644 index 000000000..5a7388944 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_boolean.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingBoolean +type OmaSettingBoolean struct { + OmaSetting + // Value. + value *bool +} +// NewOmaSettingBoolean instantiates a new OmaSettingBoolean and sets the default values. +func NewOmaSettingBoolean()(*OmaSettingBoolean) { + m := &OmaSettingBoolean{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingBoolean"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingBooleanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingBooleanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingBoolean(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingBoolean) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Value. +func (m *OmaSettingBoolean) GetValue()(*bool) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingBoolean) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value. +func (m *OmaSettingBoolean) SetValue(value *bool)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_booleanable.go b/src/internal/connector/graph/betasdk/models/oma_setting_booleanable.go new file mode 100644 index 000000000..fd417423d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_booleanable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingBooleanable +type OmaSettingBooleanable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*bool) + SetValue(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/oma_setting_collection_response.go new file mode 100644 index 000000000..719917a07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingCollectionResponse +type OmaSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OmaSettingable +} +// NewOmaSettingCollectionResponse instantiates a new OmaSettingCollectionResponse and sets the default values. +func NewOmaSettingCollectionResponse()(*OmaSettingCollectionResponse) { + m := &OmaSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOmaSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOmaSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OmaSettingable, len(val)) + for i, v := range val { + res[i] = v.(OmaSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OmaSettingCollectionResponse) GetValue()([]OmaSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OmaSettingCollectionResponse) SetValue(value []OmaSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/oma_setting_collection_responseable.go new file mode 100644 index 000000000..20511aafd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingCollectionResponseable +type OmaSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OmaSettingable) + SetValue(value []OmaSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_date_time.go b/src/internal/connector/graph/betasdk/models/oma_setting_date_time.go new file mode 100644 index 000000000..b6f7134a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_date_time.go @@ -0,0 +1,63 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingDateTime +type OmaSettingDateTime struct { + OmaSetting + // Value. + value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOmaSettingDateTime instantiates a new OmaSettingDateTime and sets the default values. +func NewOmaSettingDateTime()(*OmaSettingDateTime) { + m := &OmaSettingDateTime{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingDateTime"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingDateTimeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingDateTimeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingDateTime(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingDateTime) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Value. +func (m *OmaSettingDateTime) GetValue()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingDateTime) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value. +func (m *OmaSettingDateTime) SetValue(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_date_timeable.go b/src/internal/connector/graph/betasdk/models/oma_setting_date_timeable.go new file mode 100644 index 000000000..12f0aba67 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_date_timeable.go @@ -0,0 +1,14 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingDateTimeable +type OmaSettingDateTimeable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetValue(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_floating_point.go b/src/internal/connector/graph/betasdk/models/oma_setting_floating_point.go new file mode 100644 index 000000000..77996611d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_floating_point.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingFloatingPoint +type OmaSettingFloatingPoint struct { + OmaSetting + // Value. + value *float32 +} +// NewOmaSettingFloatingPoint instantiates a new OmaSettingFloatingPoint and sets the default values. +func NewOmaSettingFloatingPoint()(*OmaSettingFloatingPoint) { + m := &OmaSettingFloatingPoint{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingFloatingPoint"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingFloatingPointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingFloatingPointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingFloatingPoint(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingFloatingPoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetValue gets the value property value. Value. +func (m *OmaSettingFloatingPoint) GetValue()(*float32) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingFloatingPoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteFloat32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value. +func (m *OmaSettingFloatingPoint) SetValue(value *float32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_floating_pointable.go b/src/internal/connector/graph/betasdk/models/oma_setting_floating_pointable.go new file mode 100644 index 000000000..f3d6a7445 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_floating_pointable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingFloatingPointable +type OmaSettingFloatingPointable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*float32) + SetValue(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_integer.go b/src/internal/connector/graph/betasdk/models/oma_setting_integer.go new file mode 100644 index 000000000..d4e13cb6c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_integer.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingInteger +type OmaSettingInteger struct { + OmaSetting + // By setting to true, the CSP (configuration service provider) specified in the OMA-URI will perform a get, instead of set + isReadOnly *bool + // Value. + value *int32 +} +// NewOmaSettingInteger instantiates a new OmaSettingInteger and sets the default values. +func NewOmaSettingInteger()(*OmaSettingInteger) { + m := &OmaSettingInteger{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingInteger"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingIntegerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingIntegerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingInteger(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingInteger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["isReadOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReadOnly(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetIsReadOnly gets the isReadOnly property value. By setting to true, the CSP (configuration service provider) specified in the OMA-URI will perform a get, instead of set +func (m *OmaSettingInteger) GetIsReadOnly()(*bool) { + return m.isReadOnly +} +// GetValue gets the value property value. Value. +func (m *OmaSettingInteger) GetValue()(*int32) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingInteger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isReadOnly", m.GetIsReadOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetIsReadOnly sets the isReadOnly property value. By setting to true, the CSP (configuration service provider) specified in the OMA-URI will perform a get, instead of set +func (m *OmaSettingInteger) SetIsReadOnly(value *bool)() { + m.isReadOnly = value +} +// SetValue sets the value property value. Value. +func (m *OmaSettingInteger) SetValue(value *int32)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_integerable.go b/src/internal/connector/graph/betasdk/models/oma_setting_integerable.go new file mode 100644 index 000000000..00d8f8dca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_integerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingIntegerable +type OmaSettingIntegerable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsReadOnly()(*bool) + GetValue()(*int32) + SetIsReadOnly(value *bool)() + SetValue(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_string.go b/src/internal/connector/graph/betasdk/models/oma_setting_string.go new file mode 100644 index 000000000..741d90d7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_string.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingString +type OmaSettingString struct { + OmaSetting + // Value. + value *string +} +// NewOmaSettingString instantiates a new OmaSettingString and sets the default values. +func NewOmaSettingString()(*OmaSettingString) { + m := &OmaSettingString{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingString"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingStringFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingStringFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingString(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingString) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + 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 +} +// GetValue gets the value property value. Value. +func (m *OmaSettingString) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingString) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. Value. +func (m *OmaSettingString) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_string_xml.go b/src/internal/connector/graph/betasdk/models/oma_setting_string_xml.go new file mode 100644 index 000000000..2711dc706 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_string_xml.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingStringXml +type OmaSettingStringXml struct { + OmaSetting + // File name associated with the Value property (.xml). + fileName *string + // Value. (UTF8 encoded byte array) + value []byte +} +// NewOmaSettingStringXml instantiates a new OmaSettingStringXml and sets the default values. +func NewOmaSettingStringXml()(*OmaSettingStringXml) { + m := &OmaSettingStringXml{ + OmaSetting: *NewOmaSetting(), + } + odataTypeValue := "#microsoft.graph.omaSettingStringXml"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOmaSettingStringXmlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOmaSettingStringXmlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOmaSettingStringXml(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OmaSettingStringXml) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OmaSetting.GetFieldDeserializers() + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetValue(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. File name associated with the Value property (.xml). +func (m *OmaSettingStringXml) GetFileName()(*string) { + return m.fileName +} +// GetValue gets the value property value. Value. (UTF8 encoded byte array) +func (m *OmaSettingStringXml) GetValue()([]byte) { + return m.value +} +// Serialize serializes information the current object +func (m *OmaSettingStringXml) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OmaSetting.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("value", m.GetValue()) + if err != nil { + return err + } + } + return nil +} +// SetFileName sets the fileName property value. File name associated with the Value property (.xml). +func (m *OmaSettingStringXml) SetFileName(value *string)() { + m.fileName = value +} +// SetValue sets the value property value. Value. (UTF8 encoded byte array) +func (m *OmaSettingStringXml) SetValue(value []byte)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_string_xmlable.go b/src/internal/connector/graph/betasdk/models/oma_setting_string_xmlable.go new file mode 100644 index 000000000..a648a0109 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_string_xmlable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingStringXmlable +type OmaSettingStringXmlable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileName()(*string) + GetValue()([]byte) + SetFileName(value *string)() + SetValue(value []byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_setting_stringable.go b/src/internal/connector/graph/betasdk/models/oma_setting_stringable.go new file mode 100644 index 000000000..41ff3b786 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_setting_stringable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingStringable +type OmaSettingStringable interface { + OmaSettingable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()(*string) + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/oma_settingable.go b/src/internal/connector/graph/betasdk/models/oma_settingable.go new file mode 100644 index 000000000..e756e71bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/oma_settingable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OmaSettingable +type OmaSettingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIsEncrypted()(*bool) + GetOdataType()(*string) + GetOmaUri()(*string) + GetSecretReferenceValueId()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsEncrypted(value *bool)() + SetOdataType(value *string)() + SetOmaUri(value *string)() + SetSecretReferenceValueId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_prevention.go b/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_prevention.go new file mode 100644 index 000000000..227a9460b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_prevention.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAccidentalDeletionPrevention +type OnPremisesAccidentalDeletionPrevention struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Threshold value which triggers accidental deletion prevention. The threshold is either an absolute number of objects or a percentage number of objects. + alertThreshold *int32 + // The OdataType property + odataType *string + // The status of the accidental deletion prevention feature. The possible values are: disabled, enabledForCount, enabledForPercentage. + synchronizationPreventionType *OnPremisesDirectorySynchronizationDeletionPreventionType +} +// NewOnPremisesAccidentalDeletionPrevention instantiates a new onPremisesAccidentalDeletionPrevention and sets the default values. +func NewOnPremisesAccidentalDeletionPrevention()(*OnPremisesAccidentalDeletionPrevention) { + m := &OnPremisesAccidentalDeletionPrevention{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesAccidentalDeletionPreventionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesAccidentalDeletionPreventionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesAccidentalDeletionPrevention(), 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 *OnPremisesAccidentalDeletionPrevention) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlertThreshold gets the alertThreshold property value. Threshold value which triggers accidental deletion prevention. The threshold is either an absolute number of objects or a percentage number of objects. +func (m *OnPremisesAccidentalDeletionPrevention) GetAlertThreshold()(*int32) { + return m.alertThreshold +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesAccidentalDeletionPrevention) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alertThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAlertThreshold(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["synchronizationPreventionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnPremisesDirectorySynchronizationDeletionPreventionType) + if err != nil { + return err + } + if val != nil { + m.SetSynchronizationPreventionType(val.(*OnPremisesDirectorySynchronizationDeletionPreventionType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesAccidentalDeletionPrevention) GetOdataType()(*string) { + return m.odataType +} +// GetSynchronizationPreventionType gets the synchronizationPreventionType property value. The status of the accidental deletion prevention feature. The possible values are: disabled, enabledForCount, enabledForPercentage. +func (m *OnPremisesAccidentalDeletionPrevention) GetSynchronizationPreventionType()(*OnPremisesDirectorySynchronizationDeletionPreventionType) { + return m.synchronizationPreventionType +} +// Serialize serializes information the current object +func (m *OnPremisesAccidentalDeletionPrevention) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("alertThreshold", m.GetAlertThreshold()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSynchronizationPreventionType() != nil { + cast := (*m.GetSynchronizationPreventionType()).String() + err := writer.WriteStringValue("synchronizationPreventionType", &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 *OnPremisesAccidentalDeletionPrevention) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlertThreshold sets the alertThreshold property value. Threshold value which triggers accidental deletion prevention. The threshold is either an absolute number of objects or a percentage number of objects. +func (m *OnPremisesAccidentalDeletionPrevention) SetAlertThreshold(value *int32)() { + m.alertThreshold = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesAccidentalDeletionPrevention) SetOdataType(value *string)() { + m.odataType = value +} +// SetSynchronizationPreventionType sets the synchronizationPreventionType property value. The status of the accidental deletion prevention feature. The possible values are: disabled, enabledForCount, enabledForPercentage. +func (m *OnPremisesAccidentalDeletionPrevention) SetSynchronizationPreventionType(value *OnPremisesDirectorySynchronizationDeletionPreventionType)() { + m.synchronizationPreventionType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_preventionable.go b/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_preventionable.go new file mode 100644 index 000000000..a0460473f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_accidental_deletion_preventionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAccidentalDeletionPreventionable +type OnPremisesAccidentalDeletionPreventionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlertThreshold()(*int32) + GetOdataType()(*string) + GetSynchronizationPreventionType()(*OnPremisesDirectorySynchronizationDeletionPreventionType) + SetAlertThreshold(value *int32)() + SetOdataType(value *string)() + SetSynchronizationPreventionType(value *OnPremisesDirectorySynchronizationDeletionPreventionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent.go b/src/internal/connector/graph/betasdk/models/on_premises_agent.go new file mode 100644 index 000000000..a693494b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgent +type OnPremisesAgent struct { + Entity + // List of onPremisesAgentGroups that an onPremisesAgent is assigned to. Read-only. Nullable. + agentGroups []OnPremisesAgentGroupable + // The external IP address as detected by the service for the agent machine. Read-only + externalIp *string + // The name of the machine that the aggent is running on. Read-only + machineName *string + // The status property + status *AgentStatus + // The supportedPublishingTypes property + supportedPublishingTypes []OnPremisesPublishingType +} +// NewOnPremisesAgent instantiates a new OnPremisesAgent and sets the default values. +func NewOnPremisesAgent()(*OnPremisesAgent) { + m := &OnPremisesAgent{ + Entity: *NewEntity(), + } + return m +} +// CreateOnPremisesAgentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesAgentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesAgent(), nil +} +// GetAgentGroups gets the agentGroups property value. List of onPremisesAgentGroups that an onPremisesAgent is assigned to. Read-only. Nullable. +func (m *OnPremisesAgent) GetAgentGroups()([]OnPremisesAgentGroupable) { + return m.agentGroups +} +// GetExternalIp gets the externalIp property value. The external IP address as detected by the service for the agent machine. Read-only +func (m *OnPremisesAgent) GetExternalIp()(*string) { + return m.externalIp +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesAgent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agentGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentGroupable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentGroupable) + } + m.SetAgentGroups(res) + } + return nil + } + res["externalIp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalIp(val) + } + return nil + } + res["machineName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMachineName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAgentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AgentStatus)) + } + return nil + } + res["supportedPublishingTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseOnPremisesPublishingType) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesPublishingType, len(val)) + for i, v := range val { + res[i] = *(v.(*OnPremisesPublishingType)) + } + m.SetSupportedPublishingTypes(res) + } + return nil + } + return res +} +// GetMachineName gets the machineName property value. The name of the machine that the aggent is running on. Read-only +func (m *OnPremisesAgent) GetMachineName()(*string) { + return m.machineName +} +// GetStatus gets the status property value. The status property +func (m *OnPremisesAgent) GetStatus()(*AgentStatus) { + return m.status +} +// GetSupportedPublishingTypes gets the supportedPublishingTypes property value. The supportedPublishingTypes property +func (m *OnPremisesAgent) GetSupportedPublishingTypes()([]OnPremisesPublishingType) { + return m.supportedPublishingTypes +} +// Serialize serializes information the current object +func (m *OnPremisesAgent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAgentGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgentGroups())) + for i, v := range m.GetAgentGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agentGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalIp", m.GetExternalIp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("machineName", m.GetMachineName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetSupportedPublishingTypes() != nil { + err = writer.WriteCollectionOfStringValues("supportedPublishingTypes", SerializeOnPremisesPublishingType(m.GetSupportedPublishingTypes())) + if err != nil { + return err + } + } + return nil +} +// SetAgentGroups sets the agentGroups property value. List of onPremisesAgentGroups that an onPremisesAgent is assigned to. Read-only. Nullable. +func (m *OnPremisesAgent) SetAgentGroups(value []OnPremisesAgentGroupable)() { + m.agentGroups = value +} +// SetExternalIp sets the externalIp property value. The external IP address as detected by the service for the agent machine. Read-only +func (m *OnPremisesAgent) SetExternalIp(value *string)() { + m.externalIp = value +} +// SetMachineName sets the machineName property value. The name of the machine that the aggent is running on. Read-only +func (m *OnPremisesAgent) SetMachineName(value *string)() { + m.machineName = value +} +// SetStatus sets the status property value. The status property +func (m *OnPremisesAgent) SetStatus(value *AgentStatus)() { + m.status = value +} +// SetSupportedPublishingTypes sets the supportedPublishingTypes property value. The supportedPublishingTypes property +func (m *OnPremisesAgent) SetSupportedPublishingTypes(value []OnPremisesPublishingType)() { + m.supportedPublishingTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_response.go new file mode 100644 index 000000000..5b6fb71e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentCollectionResponse +type OnPremisesAgentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesAgentable +} +// NewOnPremisesAgentCollectionResponse instantiates a new OnPremisesAgentCollectionResponse and sets the default values. +func NewOnPremisesAgentCollectionResponse()(*OnPremisesAgentCollectionResponse) { + m := &OnPremisesAgentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesAgentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesAgentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesAgentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesAgentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesAgentCollectionResponse) GetValue()([]OnPremisesAgentable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesAgentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesAgentCollectionResponse) SetValue(value []OnPremisesAgentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_responseable.go new file mode 100644 index 000000000..0d4c7bffd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentCollectionResponseable +type OnPremisesAgentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesAgentable) + SetValue(value []OnPremisesAgentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_group.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_group.go new file mode 100644 index 000000000..a1f70078a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_group.go @@ -0,0 +1,181 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnPremisesAgentGroup struct { + Entity + // List of onPremisesAgent that are assigned to an onPremisesAgentGroup. Read-only. Nullable. + agents []OnPremisesAgentable + // Display name of the onPremisesAgentGroup. + displayName *string + // Indicates if the onPremisesAgentGroup is the default agent group. Only a single agent group can be the default onPremisesAgentGroup and is set by the system. + isDefault *bool + // List of publishedResource that are assigned to an onPremisesAgentGroup. Read-only. Nullable. + publishedResources []PublishedResourceable + // The publishingType property + publishingType *OnPremisesPublishingType +} +// NewOnPremisesAgentGroup instantiates a new onPremisesAgentGroup and sets the default values. +func NewOnPremisesAgentGroup()(*OnPremisesAgentGroup) { + m := &OnPremisesAgentGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateOnPremisesAgentGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesAgentGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesAgentGroup(), nil +} +// GetAgents gets the agents property value. List of onPremisesAgent that are assigned to an onPremisesAgentGroup. Read-only. Nullable. +func (m *OnPremisesAgentGroup) GetAgents()([]OnPremisesAgentable) { + return m.agents +} +// GetDisplayName gets the displayName property value. Display name of the onPremisesAgentGroup. +func (m *OnPremisesAgentGroup) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesAgentGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentable) + } + m.SetAgents(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["publishedResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublishedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublishedResourceable, len(val)) + for i, v := range val { + res[i] = v.(PublishedResourceable) + } + m.SetPublishedResources(res) + } + return nil + } + res["publishingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnPremisesPublishingType) + if err != nil { + return err + } + if val != nil { + m.SetPublishingType(val.(*OnPremisesPublishingType)) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates if the onPremisesAgentGroup is the default agent group. Only a single agent group can be the default onPremisesAgentGroup and is set by the system. +func (m *OnPremisesAgentGroup) GetIsDefault()(*bool) { + return m.isDefault +} +// GetPublishedResources gets the publishedResources property value. List of publishedResource that are assigned to an onPremisesAgentGroup. Read-only. Nullable. +func (m *OnPremisesAgentGroup) GetPublishedResources()([]PublishedResourceable) { + return m.publishedResources +} +// GetPublishingType gets the publishingType property value. The publishingType property +func (m *OnPremisesAgentGroup) GetPublishingType()(*OnPremisesPublishingType) { + return m.publishingType +} +// Serialize serializes information the current object +func (m *OnPremisesAgentGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAgents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgents())) + for i, v := range m.GetAgents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agents", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + if m.GetPublishedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublishedResources())) + for i, v := range m.GetPublishedResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publishedResources", cast) + if err != nil { + return err + } + } + if m.GetPublishingType() != nil { + cast := (*m.GetPublishingType()).String() + err = writer.WriteStringValue("publishingType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAgents sets the agents property value. List of onPremisesAgent that are assigned to an onPremisesAgentGroup. Read-only. Nullable. +func (m *OnPremisesAgentGroup) SetAgents(value []OnPremisesAgentable)() { + m.agents = value +} +// SetDisplayName sets the displayName property value. Display name of the onPremisesAgentGroup. +func (m *OnPremisesAgentGroup) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsDefault sets the isDefault property value. Indicates if the onPremisesAgentGroup is the default agent group. Only a single agent group can be the default onPremisesAgentGroup and is set by the system. +func (m *OnPremisesAgentGroup) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetPublishedResources sets the publishedResources property value. List of publishedResource that are assigned to an onPremisesAgentGroup. Read-only. Nullable. +func (m *OnPremisesAgentGroup) SetPublishedResources(value []PublishedResourceable)() { + m.publishedResources = value +} +// SetPublishingType sets the publishingType property value. The publishingType property +func (m *OnPremisesAgentGroup) SetPublishingType(value *OnPremisesPublishingType)() { + m.publishingType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_response.go new file mode 100644 index 000000000..bcde7db48 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentGroupCollectionResponse +type OnPremisesAgentGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesAgentGroupable +} +// NewOnPremisesAgentGroupCollectionResponse instantiates a new OnPremisesAgentGroupCollectionResponse and sets the default values. +func NewOnPremisesAgentGroupCollectionResponse()(*OnPremisesAgentGroupCollectionResponse) { + m := &OnPremisesAgentGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesAgentGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesAgentGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesAgentGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesAgentGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentGroupable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesAgentGroupCollectionResponse) GetValue()([]OnPremisesAgentGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesAgentGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesAgentGroupCollectionResponse) SetValue(value []OnPremisesAgentGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_responseable.go new file mode 100644 index 000000000..e42595890 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentGroupCollectionResponseable +type OnPremisesAgentGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesAgentGroupable) + SetValue(value []OnPremisesAgentGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agent_groupable.go b/src/internal/connector/graph/betasdk/models/on_premises_agent_groupable.go new file mode 100644 index 000000000..7bfbf0875 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agent_groupable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentGroupable +type OnPremisesAgentGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgents()([]OnPremisesAgentable) + GetDisplayName()(*string) + GetIsDefault()(*bool) + GetPublishedResources()([]PublishedResourceable) + GetPublishingType()(*OnPremisesPublishingType) + SetAgents(value []OnPremisesAgentable)() + SetDisplayName(value *string)() + SetIsDefault(value *bool)() + SetPublishedResources(value []PublishedResourceable)() + SetPublishingType(value *OnPremisesPublishingType)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_agentable.go b/src/internal/connector/graph/betasdk/models/on_premises_agentable.go new file mode 100644 index 000000000..dcaae39ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_agentable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesAgentable +type OnPremisesAgentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentGroups()([]OnPremisesAgentGroupable) + GetExternalIp()(*string) + GetMachineName()(*string) + GetStatus()(*AgentStatus) + GetSupportedPublishingTypes()([]OnPremisesPublishingType) + SetAgentGroups(value []OnPremisesAgentGroupable)() + SetExternalIp(value *string)() + SetMachineName(value *string)() + SetStatus(value *AgentStatus)() + SetSupportedPublishingTypes(value []OnPremisesPublishingType)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_application_segment.go b/src/internal/connector/graph/betasdk/models/on_premises_application_segment.go new file mode 100644 index 000000000..7c2ac96ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_application_segment.go @@ -0,0 +1,183 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesApplicationSegment +type OnPremisesApplicationSegment struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If you're configuring a traffic manager in front of multiple App Proxy application segments, contains the user-friendly URL that will point to the traffic manager. + alternateUrl *string + // CORS Rule definition for a particular application segment. + corsConfigurations []CorsConfigurationable + // The published external URL for the application segment; for example, https://intranet.contoso.com./ + externalUrl *string + // The internal URL of the application segment; for example, https://intranet/. + internalUrl *string + // The OdataType property + odataType *string +} +// NewOnPremisesApplicationSegment instantiates a new onPremisesApplicationSegment and sets the default values. +func NewOnPremisesApplicationSegment()(*OnPremisesApplicationSegment) { + m := &OnPremisesApplicationSegment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesApplicationSegmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesApplicationSegmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesApplicationSegment(), 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 *OnPremisesApplicationSegment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlternateUrl gets the alternateUrl property value. If you're configuring a traffic manager in front of multiple App Proxy application segments, contains the user-friendly URL that will point to the traffic manager. +func (m *OnPremisesApplicationSegment) GetAlternateUrl()(*string) { + return m.alternateUrl +} +// GetCorsConfigurations gets the corsConfigurations property value. CORS Rule definition for a particular application segment. +func (m *OnPremisesApplicationSegment) GetCorsConfigurations()([]CorsConfigurationable) { + return m.corsConfigurations +} +// GetExternalUrl gets the externalUrl property value. The published external URL for the application segment; for example, https://intranet.contoso.com./ +func (m *OnPremisesApplicationSegment) GetExternalUrl()(*string) { + return m.externalUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesApplicationSegment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alternateUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateUrl(val) + } + return nil + } + res["corsConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCorsConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CorsConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(CorsConfigurationable) + } + m.SetCorsConfigurations(res) + } + return nil + } + res["externalUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUrl(val) + } + return nil + } + res["internalUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternalUrl(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 + } + return res +} +// GetInternalUrl gets the internalUrl property value. The internal URL of the application segment; for example, https://intranet/. +func (m *OnPremisesApplicationSegment) GetInternalUrl()(*string) { + return m.internalUrl +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesApplicationSegment) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OnPremisesApplicationSegment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("alternateUrl", m.GetAlternateUrl()) + if err != nil { + return err + } + } + if m.GetCorsConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCorsConfigurations())) + for i, v := range m.GetCorsConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("corsConfigurations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalUrl", m.GetExternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("internalUrl", m.GetInternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OnPremisesApplicationSegment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlternateUrl sets the alternateUrl property value. If you're configuring a traffic manager in front of multiple App Proxy application segments, contains the user-friendly URL that will point to the traffic manager. +func (m *OnPremisesApplicationSegment) SetAlternateUrl(value *string)() { + m.alternateUrl = value +} +// SetCorsConfigurations sets the corsConfigurations property value. CORS Rule definition for a particular application segment. +func (m *OnPremisesApplicationSegment) SetCorsConfigurations(value []CorsConfigurationable)() { + m.corsConfigurations = value +} +// SetExternalUrl sets the externalUrl property value. The published external URL for the application segment; for example, https://intranet.contoso.com./ +func (m *OnPremisesApplicationSegment) SetExternalUrl(value *string)() { + m.externalUrl = value +} +// SetInternalUrl sets the internalUrl property value. The internal URL of the application segment; for example, https://intranet/. +func (m *OnPremisesApplicationSegment) SetInternalUrl(value *string)() { + m.internalUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesApplicationSegment) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_response.go new file mode 100644 index 000000000..3df4a6fc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesApplicationSegmentCollectionResponse +type OnPremisesApplicationSegmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesApplicationSegmentable +} +// NewOnPremisesApplicationSegmentCollectionResponse instantiates a new OnPremisesApplicationSegmentCollectionResponse and sets the default values. +func NewOnPremisesApplicationSegmentCollectionResponse()(*OnPremisesApplicationSegmentCollectionResponse) { + m := &OnPremisesApplicationSegmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesApplicationSegmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesApplicationSegmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesApplicationSegmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesApplicationSegmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesApplicationSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesApplicationSegmentable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesApplicationSegmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesApplicationSegmentCollectionResponse) GetValue()([]OnPremisesApplicationSegmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesApplicationSegmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesApplicationSegmentCollectionResponse) SetValue(value []OnPremisesApplicationSegmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_responseable.go new file mode 100644 index 000000000..70886a164 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_application_segment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesApplicationSegmentCollectionResponseable +type OnPremisesApplicationSegmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesApplicationSegmentable) + SetValue(value []OnPremisesApplicationSegmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_application_segmentable.go b/src/internal/connector/graph/betasdk/models/on_premises_application_segmentable.go new file mode 100644 index 000000000..6df2c73e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_application_segmentable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesApplicationSegmentable +type OnPremisesApplicationSegmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlternateUrl()(*string) + GetCorsConfigurations()([]CorsConfigurationable) + GetExternalUrl()(*string) + GetInternalUrl()(*string) + GetOdataType()(*string) + SetAlternateUrl(value *string)() + SetCorsConfigurations(value []CorsConfigurationable)() + SetExternalUrl(value *string)() + SetInternalUrl(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settings.go b/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settings.go new file mode 100644 index 000000000..cb10bbc90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settings.go @@ -0,0 +1,147 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesConditionalAccessSettings +type OnPremisesConditionalAccessSettings struct { + Entity + // Indicates if on premises conditional access is enabled for this organization + enabled *bool + // User groups that will be exempt by on premises conditional access. All users in these groups will be exempt from the conditional access policy. + excludedGroups []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // User groups that will be targeted by on premises conditional access. All users in these groups will be required to have mobile device managed and compliant for mail access. + includedGroups []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // Override the default access rule when allowing a device to ensure access is granted. + overrideDefaultRule *bool +} +// NewOnPremisesConditionalAccessSettings instantiates a new onPremisesConditionalAccessSettings and sets the default values. +func NewOnPremisesConditionalAccessSettings()(*OnPremisesConditionalAccessSettings) { + m := &OnPremisesConditionalAccessSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateOnPremisesConditionalAccessSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesConditionalAccessSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesConditionalAccessSettings(), nil +} +// GetEnabled gets the enabled property value. Indicates if on premises conditional access is enabled for this organization +func (m *OnPremisesConditionalAccessSettings) GetEnabled()(*bool) { + return m.enabled +} +// GetExcludedGroups gets the excludedGroups property value. User groups that will be exempt by on premises conditional access. All users in these groups will be exempt from the conditional access policy. +func (m *OnPremisesConditionalAccessSettings) GetExcludedGroups()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.excludedGroups +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesConditionalAccessSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["excludedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetExcludedGroups(res) + } + return nil + } + res["includedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetIncludedGroups(res) + } + return nil + } + res["overrideDefaultRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOverrideDefaultRule(val) + } + return nil + } + return res +} +// GetIncludedGroups gets the includedGroups property value. User groups that will be targeted by on premises conditional access. All users in these groups will be required to have mobile device managed and compliant for mail access. +func (m *OnPremisesConditionalAccessSettings) GetIncludedGroups()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.includedGroups +} +// GetOverrideDefaultRule gets the overrideDefaultRule property value. Override the default access rule when allowing a device to ensure access is granted. +func (m *OnPremisesConditionalAccessSettings) GetOverrideDefaultRule()(*bool) { + return m.overrideDefaultRule +} +// Serialize serializes information the current object +func (m *OnPremisesConditionalAccessSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + if m.GetExcludedGroups() != nil { + err = writer.WriteCollectionOfUUIDValues("excludedGroups", m.GetExcludedGroups()) + if err != nil { + return err + } + } + if m.GetIncludedGroups() != nil { + err = writer.WriteCollectionOfUUIDValues("includedGroups", m.GetIncludedGroups()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("overrideDefaultRule", m.GetOverrideDefaultRule()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. Indicates if on premises conditional access is enabled for this organization +func (m *OnPremisesConditionalAccessSettings) SetEnabled(value *bool)() { + m.enabled = value +} +// SetExcludedGroups sets the excludedGroups property value. User groups that will be exempt by on premises conditional access. All users in these groups will be exempt from the conditional access policy. +func (m *OnPremisesConditionalAccessSettings) SetExcludedGroups(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.excludedGroups = value +} +// SetIncludedGroups sets the includedGroups property value. User groups that will be targeted by on premises conditional access. All users in these groups will be required to have mobile device managed and compliant for mail access. +func (m *OnPremisesConditionalAccessSettings) SetIncludedGroups(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.includedGroups = value +} +// SetOverrideDefaultRule sets the overrideDefaultRule property value. Override the default access rule when allowing a device to ensure access is granted. +func (m *OnPremisesConditionalAccessSettings) SetOverrideDefaultRule(value *bool)() { + m.overrideDefaultRule = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settingsable.go b/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settingsable.go new file mode 100644 index 000000000..7da2225a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_conditional_access_settingsable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesConditionalAccessSettingsable +type OnPremisesConditionalAccessSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetExcludedGroups()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIncludedGroups()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOverrideDefaultRule()(*bool) + SetEnabled(value *bool)() + SetExcludedGroups(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIncludedGroups(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOverrideDefaultRule(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization.go new file mode 100644 index 000000000..b88386b5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronization provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnPremisesDirectorySynchronization struct { + Entity + // Consists of configurations that can be fine-tuned and impact the on-premises directory synchronization process for a tenant. + configuration OnPremisesDirectorySynchronizationConfigurationable + // The features property + features OnPremisesDirectorySynchronizationFeatureable +} +// NewOnPremisesDirectorySynchronization instantiates a new onPremisesDirectorySynchronization and sets the default values. +func NewOnPremisesDirectorySynchronization()(*OnPremisesDirectorySynchronization) { + m := &OnPremisesDirectorySynchronization{ + Entity: *NewEntity(), + } + return m +} +// CreateOnPremisesDirectorySynchronizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesDirectorySynchronizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesDirectorySynchronization(), nil +} +// GetConfiguration gets the configuration property value. Consists of configurations that can be fine-tuned and impact the on-premises directory synchronization process for a tenant. +func (m *OnPremisesDirectorySynchronization) GetConfiguration()(OnPremisesDirectorySynchronizationConfigurationable) { + return m.configuration +} +// GetFeatures gets the features property value. The features property +func (m *OnPremisesDirectorySynchronization) GetFeatures()(OnPremisesDirectorySynchronizationFeatureable) { + return m.features +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesDirectorySynchronization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesDirectorySynchronizationConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(OnPremisesDirectorySynchronizationConfigurationable)) + } + return nil + } + res["features"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesDirectorySynchronizationFeatureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeatures(val.(OnPremisesDirectorySynchronizationFeatureable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnPremisesDirectorySynchronization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("features", m.GetFeatures()) + if err != nil { + return err + } + } + return nil +} +// SetConfiguration sets the configuration property value. Consists of configurations that can be fine-tuned and impact the on-premises directory synchronization process for a tenant. +func (m *OnPremisesDirectorySynchronization) SetConfiguration(value OnPremisesDirectorySynchronizationConfigurationable)() { + m.configuration = value +} +// SetFeatures sets the features property value. The features property +func (m *OnPremisesDirectorySynchronization) SetFeatures(value OnPremisesDirectorySynchronizationFeatureable)() { + m.features = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_response.go new file mode 100644 index 000000000..4baf36e95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationCollectionResponse +type OnPremisesDirectorySynchronizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesDirectorySynchronizationable +} +// NewOnPremisesDirectorySynchronizationCollectionResponse instantiates a new OnPremisesDirectorySynchronizationCollectionResponse and sets the default values. +func NewOnPremisesDirectorySynchronizationCollectionResponse()(*OnPremisesDirectorySynchronizationCollectionResponse) { + m := &OnPremisesDirectorySynchronizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesDirectorySynchronizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesDirectorySynchronizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesDirectorySynchronizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesDirectorySynchronizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesDirectorySynchronizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesDirectorySynchronizationable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesDirectorySynchronizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesDirectorySynchronizationCollectionResponse) GetValue()([]OnPremisesDirectorySynchronizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesDirectorySynchronizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesDirectorySynchronizationCollectionResponse) SetValue(value []OnPremisesDirectorySynchronizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_responseable.go new file mode 100644 index 000000000..a51c269fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationCollectionResponseable +type OnPremisesDirectorySynchronizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesDirectorySynchronizationable) + SetValue(value []OnPremisesDirectorySynchronizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configuration.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configuration.go new file mode 100644 index 000000000..66391ec4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configuration.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationConfiguration +type OnPremisesDirectorySynchronizationConfiguration struct { + // Contains the accidental deletion prevention configuration for a tenant. + accidentalDeletionPrevention OnPremisesAccidentalDeletionPreventionable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Interval of time that the customer requested the sync client waits between sync cycles. + customerRequestedSynchronizationInterval *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The OdataType property + odataType *string + // Interval of time the sync client should honor between sync cycles + synchronizationInterval *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewOnPremisesDirectorySynchronizationConfiguration instantiates a new onPremisesDirectorySynchronizationConfiguration and sets the default values. +func NewOnPremisesDirectorySynchronizationConfiguration()(*OnPremisesDirectorySynchronizationConfiguration) { + m := &OnPremisesDirectorySynchronizationConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesDirectorySynchronizationConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesDirectorySynchronizationConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesDirectorySynchronizationConfiguration(), nil +} +// GetAccidentalDeletionPrevention gets the accidentalDeletionPrevention property value. Contains the accidental deletion prevention configuration for a tenant. +func (m *OnPremisesDirectorySynchronizationConfiguration) GetAccidentalDeletionPrevention()(OnPremisesAccidentalDeletionPreventionable) { + return m.accidentalDeletionPrevention +} +// 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 *OnPremisesDirectorySynchronizationConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCustomerRequestedSynchronizationInterval gets the customerRequestedSynchronizationInterval property value. Interval of time that the customer requested the sync client waits between sync cycles. +func (m *OnPremisesDirectorySynchronizationConfiguration) GetCustomerRequestedSynchronizationInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.customerRequestedSynchronizationInterval +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesDirectorySynchronizationConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accidentalDeletionPrevention"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesAccidentalDeletionPreventionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccidentalDeletionPrevention(val.(OnPremisesAccidentalDeletionPreventionable)) + } + return nil + } + res["customerRequestedSynchronizationInterval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerRequestedSynchronizationInterval(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["synchronizationInterval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetSynchronizationInterval(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesDirectorySynchronizationConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetSynchronizationInterval gets the synchronizationInterval property value. Interval of time the sync client should honor between sync cycles +func (m *OnPremisesDirectorySynchronizationConfiguration) GetSynchronizationInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.synchronizationInterval +} +// Serialize serializes information the current object +func (m *OnPremisesDirectorySynchronizationConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("accidentalDeletionPrevention", m.GetAccidentalDeletionPrevention()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("customerRequestedSynchronizationInterval", m.GetCustomerRequestedSynchronizationInterval()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("synchronizationInterval", m.GetSynchronizationInterval()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccidentalDeletionPrevention sets the accidentalDeletionPrevention property value. Contains the accidental deletion prevention configuration for a tenant. +func (m *OnPremisesDirectorySynchronizationConfiguration) SetAccidentalDeletionPrevention(value OnPremisesAccidentalDeletionPreventionable)() { + m.accidentalDeletionPrevention = value +} +// 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 *OnPremisesDirectorySynchronizationConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCustomerRequestedSynchronizationInterval sets the customerRequestedSynchronizationInterval property value. Interval of time that the customer requested the sync client waits between sync cycles. +func (m *OnPremisesDirectorySynchronizationConfiguration) SetCustomerRequestedSynchronizationInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.customerRequestedSynchronizationInterval = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesDirectorySynchronizationConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetSynchronizationInterval sets the synchronizationInterval property value. Interval of time the sync client should honor between sync cycles +func (m *OnPremisesDirectorySynchronizationConfiguration) SetSynchronizationInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.synchronizationInterval = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configurationable.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configurationable.go new file mode 100644 index 000000000..7721c9737 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_configurationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationConfigurationable +type OnPremisesDirectorySynchronizationConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccidentalDeletionPrevention()(OnPremisesAccidentalDeletionPreventionable) + GetCustomerRequestedSynchronizationInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOdataType()(*string) + GetSynchronizationInterval()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetAccidentalDeletionPrevention(value OnPremisesAccidentalDeletionPreventionable)() + SetCustomerRequestedSynchronizationInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOdataType(value *string)() + SetSynchronizationInterval(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_deletion_prevention_type.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_deletion_prevention_type.go new file mode 100644 index 000000000..7d32a1020 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_deletion_prevention_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnPremisesDirectorySynchronizationDeletionPreventionType int + +const ( + DISABLED_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE OnPremisesDirectorySynchronizationDeletionPreventionType = iota + ENABLEDFORCOUNT_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + ENABLEDFORPERCENTAGE_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + UNKNOWNFUTUREVALUE_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE +) + +func (i OnPremisesDirectorySynchronizationDeletionPreventionType) String() string { + return []string{"disabled", "enabledForCount", "enabledForPercentage", "unknownFutureValue"}[i] +} +func ParseOnPremisesDirectorySynchronizationDeletionPreventionType(v string) (interface{}, error) { + result := DISABLED_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + switch v { + case "disabled": + result = DISABLED_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + case "enabledForCount": + result = ENABLEDFORCOUNT_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + case "enabledForPercentage": + result = ENABLEDFORPERCENTAGE_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONPREMISESDIRECTORYSYNCHRONIZATIONDELETIONPREVENTIONTYPE + default: + return 0, errors.New("Unknown OnPremisesDirectorySynchronizationDeletionPreventionType value: " + v) + } + return &result, nil +} +func SerializeOnPremisesDirectorySynchronizationDeletionPreventionType(values []OnPremisesDirectorySynchronizationDeletionPreventionType) []string { + 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/on_premises_directory_synchronization_feature.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_feature.go new file mode 100644 index 000000000..fd3223fda --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_feature.go @@ -0,0 +1,565 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationFeature +type OnPremisesDirectorySynchronizationFeature struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Used to block cloud object takeover via source anchor hard match if enabled. + blockCloudObjectTakeoverThroughHardMatchEnabled *bool + // Use to block soft match for all objects if enabled for the tenant. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching has been completed and is no longer needed. + blockSoftMatchEnabled *bool + // When true, persists the values of Mobile and OtherMobile in on-premises AD during sync cycles instead of values of MobilePhone or AlternateMobilePhones in Azure AD. + bypassDirSyncOverridesEnabled *bool + // Used to indicate that cloud password policy applies to users whose passwords are synchronized from on-premises. + cloudPasswordPolicyForPasswordSyncedUsersEnabled *bool + // Used to enable concurrent user credentials update in OrgId. + concurrentCredentialUpdateEnabled *bool + // Used to enable concurrent user creation in OrgId. + concurrentOrgIdProvisioningEnabled *bool + // Used to indicate that device write-back is enabled. + deviceWritebackEnabled *bool + // Used to indicate that directory extensions are being synced from on-premises AD to Azure AD. + directoryExtensionsEnabled *bool + // Used to indicate that for a Microsoft Forefront Online Protection for Exchange (FOPE) migrated tenant, the conflicting proxy address should be migrated over. + fopeConflictResolutionEnabled *bool + // Used to enable object-level group writeback feature for additional group types. + groupWriteBackEnabled *bool + // The OdataType property + odataType *string + // Used to indicate on-premise password synchronization is enabled. + passwordSyncEnabled *bool + // Used to indicate that writeback of password resets from Azure AD to on-premises AD is enabled. + passwordWritebackEnabled *bool + // Used to indicate that we should quarantine objects with conflicting proxy address. + quarantineUponProxyAddressesConflictEnabled *bool + // Used to indicate that we should quarantine objects conflicting with duplicate userPrincipalName. + quarantineUponUpnConflictEnabled *bool + // Used to indicate that we should soft match objects based on userPrincipalName. + softMatchOnUpnEnabled *bool + // Used to indicate that we should synchronize userPrincipalName objects for managed users with licenses. + synchronizeUpnForManagedUsersEnabled *bool + // Used to indicate that Microsoft 365 Group write-back is enabled. + unifiedGroupWritebackEnabled *bool + // Used to indicate that feature to force password change for a user on logon is enabled while synchronizing on-premise credentials. + userForcePasswordChangeOnLogonEnabled *bool + // Used to indicate that user writeback is enabled. + userWritebackEnabled *bool +} +// NewOnPremisesDirectorySynchronizationFeature instantiates a new onPremisesDirectorySynchronizationFeature and sets the default values. +func NewOnPremisesDirectorySynchronizationFeature()(*OnPremisesDirectorySynchronizationFeature) { + m := &OnPremisesDirectorySynchronizationFeature{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesDirectorySynchronizationFeatureFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesDirectorySynchronizationFeatureFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesDirectorySynchronizationFeature(), 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 *OnPremisesDirectorySynchronizationFeature) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBlockCloudObjectTakeoverThroughHardMatchEnabled gets the blockCloudObjectTakeoverThroughHardMatchEnabled property value. Used to block cloud object takeover via source anchor hard match if enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetBlockCloudObjectTakeoverThroughHardMatchEnabled()(*bool) { + return m.blockCloudObjectTakeoverThroughHardMatchEnabled +} +// GetBlockSoftMatchEnabled gets the blockSoftMatchEnabled property value. Use to block soft match for all objects if enabled for the tenant. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching has been completed and is no longer needed. +func (m *OnPremisesDirectorySynchronizationFeature) GetBlockSoftMatchEnabled()(*bool) { + return m.blockSoftMatchEnabled +} +// GetBypassDirSyncOverridesEnabled gets the bypassDirSyncOverridesEnabled property value. When true, persists the values of Mobile and OtherMobile in on-premises AD during sync cycles instead of values of MobilePhone or AlternateMobilePhones in Azure AD. +func (m *OnPremisesDirectorySynchronizationFeature) GetBypassDirSyncOverridesEnabled()(*bool) { + return m.bypassDirSyncOverridesEnabled +} +// GetCloudPasswordPolicyForPasswordSyncedUsersEnabled gets the cloudPasswordPolicyForPasswordSyncedUsersEnabled property value. Used to indicate that cloud password policy applies to users whose passwords are synchronized from on-premises. +func (m *OnPremisesDirectorySynchronizationFeature) GetCloudPasswordPolicyForPasswordSyncedUsersEnabled()(*bool) { + return m.cloudPasswordPolicyForPasswordSyncedUsersEnabled +} +// GetConcurrentCredentialUpdateEnabled gets the concurrentCredentialUpdateEnabled property value. Used to enable concurrent user credentials update in OrgId. +func (m *OnPremisesDirectorySynchronizationFeature) GetConcurrentCredentialUpdateEnabled()(*bool) { + return m.concurrentCredentialUpdateEnabled +} +// GetConcurrentOrgIdProvisioningEnabled gets the concurrentOrgIdProvisioningEnabled property value. Used to enable concurrent user creation in OrgId. +func (m *OnPremisesDirectorySynchronizationFeature) GetConcurrentOrgIdProvisioningEnabled()(*bool) { + return m.concurrentOrgIdProvisioningEnabled +} +// GetDeviceWritebackEnabled gets the deviceWritebackEnabled property value. Used to indicate that device write-back is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetDeviceWritebackEnabled()(*bool) { + return m.deviceWritebackEnabled +} +// GetDirectoryExtensionsEnabled gets the directoryExtensionsEnabled property value. Used to indicate that directory extensions are being synced from on-premises AD to Azure AD. +func (m *OnPremisesDirectorySynchronizationFeature) GetDirectoryExtensionsEnabled()(*bool) { + return m.directoryExtensionsEnabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesDirectorySynchronizationFeature) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["blockCloudObjectTakeoverThroughHardMatchEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockCloudObjectTakeoverThroughHardMatchEnabled(val) + } + return nil + } + res["blockSoftMatchEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockSoftMatchEnabled(val) + } + return nil + } + res["bypassDirSyncOverridesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBypassDirSyncOverridesEnabled(val) + } + return nil + } + res["cloudPasswordPolicyForPasswordSyncedUsersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCloudPasswordPolicyForPasswordSyncedUsersEnabled(val) + } + return nil + } + res["concurrentCredentialUpdateEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConcurrentCredentialUpdateEnabled(val) + } + return nil + } + res["concurrentOrgIdProvisioningEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetConcurrentOrgIdProvisioningEnabled(val) + } + return nil + } + res["deviceWritebackEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceWritebackEnabled(val) + } + return nil + } + res["directoryExtensionsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDirectoryExtensionsEnabled(val) + } + return nil + } + res["fopeConflictResolutionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFopeConflictResolutionEnabled(val) + } + return nil + } + res["groupWriteBackEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupWriteBackEnabled(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["passwordSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordSyncEnabled(val) + } + return nil + } + res["passwordWritebackEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPasswordWritebackEnabled(val) + } + return nil + } + res["quarantineUponProxyAddressesConflictEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetQuarantineUponProxyAddressesConflictEnabled(val) + } + return nil + } + res["quarantineUponUpnConflictEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetQuarantineUponUpnConflictEnabled(val) + } + return nil + } + res["softMatchOnUpnEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSoftMatchOnUpnEnabled(val) + } + return nil + } + res["synchronizeUpnForManagedUsersEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSynchronizeUpnForManagedUsersEnabled(val) + } + return nil + } + res["unifiedGroupWritebackEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUnifiedGroupWritebackEnabled(val) + } + return nil + } + res["userForcePasswordChangeOnLogonEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserForcePasswordChangeOnLogonEnabled(val) + } + return nil + } + res["userWritebackEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUserWritebackEnabled(val) + } + return nil + } + return res +} +// GetFopeConflictResolutionEnabled gets the fopeConflictResolutionEnabled property value. Used to indicate that for a Microsoft Forefront Online Protection for Exchange (FOPE) migrated tenant, the conflicting proxy address should be migrated over. +func (m *OnPremisesDirectorySynchronizationFeature) GetFopeConflictResolutionEnabled()(*bool) { + return m.fopeConflictResolutionEnabled +} +// GetGroupWriteBackEnabled gets the groupWriteBackEnabled property value. Used to enable object-level group writeback feature for additional group types. +func (m *OnPremisesDirectorySynchronizationFeature) GetGroupWriteBackEnabled()(*bool) { + return m.groupWriteBackEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesDirectorySynchronizationFeature) GetOdataType()(*string) { + return m.odataType +} +// GetPasswordSyncEnabled gets the passwordSyncEnabled property value. Used to indicate on-premise password synchronization is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetPasswordSyncEnabled()(*bool) { + return m.passwordSyncEnabled +} +// GetPasswordWritebackEnabled gets the passwordWritebackEnabled property value. Used to indicate that writeback of password resets from Azure AD to on-premises AD is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetPasswordWritebackEnabled()(*bool) { + return m.passwordWritebackEnabled +} +// GetQuarantineUponProxyAddressesConflictEnabled gets the quarantineUponProxyAddressesConflictEnabled property value. Used to indicate that we should quarantine objects with conflicting proxy address. +func (m *OnPremisesDirectorySynchronizationFeature) GetQuarantineUponProxyAddressesConflictEnabled()(*bool) { + return m.quarantineUponProxyAddressesConflictEnabled +} +// GetQuarantineUponUpnConflictEnabled gets the quarantineUponUpnConflictEnabled property value. Used to indicate that we should quarantine objects conflicting with duplicate userPrincipalName. +func (m *OnPremisesDirectorySynchronizationFeature) GetQuarantineUponUpnConflictEnabled()(*bool) { + return m.quarantineUponUpnConflictEnabled +} +// GetSoftMatchOnUpnEnabled gets the softMatchOnUpnEnabled property value. Used to indicate that we should soft match objects based on userPrincipalName. +func (m *OnPremisesDirectorySynchronizationFeature) GetSoftMatchOnUpnEnabled()(*bool) { + return m.softMatchOnUpnEnabled +} +// GetSynchronizeUpnForManagedUsersEnabled gets the synchronizeUpnForManagedUsersEnabled property value. Used to indicate that we should synchronize userPrincipalName objects for managed users with licenses. +func (m *OnPremisesDirectorySynchronizationFeature) GetSynchronizeUpnForManagedUsersEnabled()(*bool) { + return m.synchronizeUpnForManagedUsersEnabled +} +// GetUnifiedGroupWritebackEnabled gets the unifiedGroupWritebackEnabled property value. Used to indicate that Microsoft 365 Group write-back is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetUnifiedGroupWritebackEnabled()(*bool) { + return m.unifiedGroupWritebackEnabled +} +// GetUserForcePasswordChangeOnLogonEnabled gets the userForcePasswordChangeOnLogonEnabled property value. Used to indicate that feature to force password change for a user on logon is enabled while synchronizing on-premise credentials. +func (m *OnPremisesDirectorySynchronizationFeature) GetUserForcePasswordChangeOnLogonEnabled()(*bool) { + return m.userForcePasswordChangeOnLogonEnabled +} +// GetUserWritebackEnabled gets the userWritebackEnabled property value. Used to indicate that user writeback is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) GetUserWritebackEnabled()(*bool) { + return m.userWritebackEnabled +} +// Serialize serializes information the current object +func (m *OnPremisesDirectorySynchronizationFeature) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("blockCloudObjectTakeoverThroughHardMatchEnabled", m.GetBlockCloudObjectTakeoverThroughHardMatchEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("blockSoftMatchEnabled", m.GetBlockSoftMatchEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("bypassDirSyncOverridesEnabled", m.GetBypassDirSyncOverridesEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("cloudPasswordPolicyForPasswordSyncedUsersEnabled", m.GetCloudPasswordPolicyForPasswordSyncedUsersEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("concurrentCredentialUpdateEnabled", m.GetConcurrentCredentialUpdateEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("concurrentOrgIdProvisioningEnabled", m.GetConcurrentOrgIdProvisioningEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("deviceWritebackEnabled", m.GetDeviceWritebackEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("directoryExtensionsEnabled", m.GetDirectoryExtensionsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fopeConflictResolutionEnabled", m.GetFopeConflictResolutionEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("groupWriteBackEnabled", m.GetGroupWriteBackEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("passwordSyncEnabled", m.GetPasswordSyncEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("passwordWritebackEnabled", m.GetPasswordWritebackEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("quarantineUponProxyAddressesConflictEnabled", m.GetQuarantineUponProxyAddressesConflictEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("quarantineUponUpnConflictEnabled", m.GetQuarantineUponUpnConflictEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("softMatchOnUpnEnabled", m.GetSoftMatchOnUpnEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("synchronizeUpnForManagedUsersEnabled", m.GetSynchronizeUpnForManagedUsersEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("unifiedGroupWritebackEnabled", m.GetUnifiedGroupWritebackEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("userForcePasswordChangeOnLogonEnabled", m.GetUserForcePasswordChangeOnLogonEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("userWritebackEnabled", m.GetUserWritebackEnabled()) + 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 *OnPremisesDirectorySynchronizationFeature) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBlockCloudObjectTakeoverThroughHardMatchEnabled sets the blockCloudObjectTakeoverThroughHardMatchEnabled property value. Used to block cloud object takeover via source anchor hard match if enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetBlockCloudObjectTakeoverThroughHardMatchEnabled(value *bool)() { + m.blockCloudObjectTakeoverThroughHardMatchEnabled = value +} +// SetBlockSoftMatchEnabled sets the blockSoftMatchEnabled property value. Use to block soft match for all objects if enabled for the tenant. Customers are encouraged to enable this feature and keep it enabled until soft matching is required again for their tenancy. This flag should be enabled again after any soft matching has been completed and is no longer needed. +func (m *OnPremisesDirectorySynchronizationFeature) SetBlockSoftMatchEnabled(value *bool)() { + m.blockSoftMatchEnabled = value +} +// SetBypassDirSyncOverridesEnabled sets the bypassDirSyncOverridesEnabled property value. When true, persists the values of Mobile and OtherMobile in on-premises AD during sync cycles instead of values of MobilePhone or AlternateMobilePhones in Azure AD. +func (m *OnPremisesDirectorySynchronizationFeature) SetBypassDirSyncOverridesEnabled(value *bool)() { + m.bypassDirSyncOverridesEnabled = value +} +// SetCloudPasswordPolicyForPasswordSyncedUsersEnabled sets the cloudPasswordPolicyForPasswordSyncedUsersEnabled property value. Used to indicate that cloud password policy applies to users whose passwords are synchronized from on-premises. +func (m *OnPremisesDirectorySynchronizationFeature) SetCloudPasswordPolicyForPasswordSyncedUsersEnabled(value *bool)() { + m.cloudPasswordPolicyForPasswordSyncedUsersEnabled = value +} +// SetConcurrentCredentialUpdateEnabled sets the concurrentCredentialUpdateEnabled property value. Used to enable concurrent user credentials update in OrgId. +func (m *OnPremisesDirectorySynchronizationFeature) SetConcurrentCredentialUpdateEnabled(value *bool)() { + m.concurrentCredentialUpdateEnabled = value +} +// SetConcurrentOrgIdProvisioningEnabled sets the concurrentOrgIdProvisioningEnabled property value. Used to enable concurrent user creation in OrgId. +func (m *OnPremisesDirectorySynchronizationFeature) SetConcurrentOrgIdProvisioningEnabled(value *bool)() { + m.concurrentOrgIdProvisioningEnabled = value +} +// SetDeviceWritebackEnabled sets the deviceWritebackEnabled property value. Used to indicate that device write-back is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetDeviceWritebackEnabled(value *bool)() { + m.deviceWritebackEnabled = value +} +// SetDirectoryExtensionsEnabled sets the directoryExtensionsEnabled property value. Used to indicate that directory extensions are being synced from on-premises AD to Azure AD. +func (m *OnPremisesDirectorySynchronizationFeature) SetDirectoryExtensionsEnabled(value *bool)() { + m.directoryExtensionsEnabled = value +} +// SetFopeConflictResolutionEnabled sets the fopeConflictResolutionEnabled property value. Used to indicate that for a Microsoft Forefront Online Protection for Exchange (FOPE) migrated tenant, the conflicting proxy address should be migrated over. +func (m *OnPremisesDirectorySynchronizationFeature) SetFopeConflictResolutionEnabled(value *bool)() { + m.fopeConflictResolutionEnabled = value +} +// SetGroupWriteBackEnabled sets the groupWriteBackEnabled property value. Used to enable object-level group writeback feature for additional group types. +func (m *OnPremisesDirectorySynchronizationFeature) SetGroupWriteBackEnabled(value *bool)() { + m.groupWriteBackEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesDirectorySynchronizationFeature) SetOdataType(value *string)() { + m.odataType = value +} +// SetPasswordSyncEnabled sets the passwordSyncEnabled property value. Used to indicate on-premise password synchronization is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetPasswordSyncEnabled(value *bool)() { + m.passwordSyncEnabled = value +} +// SetPasswordWritebackEnabled sets the passwordWritebackEnabled property value. Used to indicate that writeback of password resets from Azure AD to on-premises AD is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetPasswordWritebackEnabled(value *bool)() { + m.passwordWritebackEnabled = value +} +// SetQuarantineUponProxyAddressesConflictEnabled sets the quarantineUponProxyAddressesConflictEnabled property value. Used to indicate that we should quarantine objects with conflicting proxy address. +func (m *OnPremisesDirectorySynchronizationFeature) SetQuarantineUponProxyAddressesConflictEnabled(value *bool)() { + m.quarantineUponProxyAddressesConflictEnabled = value +} +// SetQuarantineUponUpnConflictEnabled sets the quarantineUponUpnConflictEnabled property value. Used to indicate that we should quarantine objects conflicting with duplicate userPrincipalName. +func (m *OnPremisesDirectorySynchronizationFeature) SetQuarantineUponUpnConflictEnabled(value *bool)() { + m.quarantineUponUpnConflictEnabled = value +} +// SetSoftMatchOnUpnEnabled sets the softMatchOnUpnEnabled property value. Used to indicate that we should soft match objects based on userPrincipalName. +func (m *OnPremisesDirectorySynchronizationFeature) SetSoftMatchOnUpnEnabled(value *bool)() { + m.softMatchOnUpnEnabled = value +} +// SetSynchronizeUpnForManagedUsersEnabled sets the synchronizeUpnForManagedUsersEnabled property value. Used to indicate that we should synchronize userPrincipalName objects for managed users with licenses. +func (m *OnPremisesDirectorySynchronizationFeature) SetSynchronizeUpnForManagedUsersEnabled(value *bool)() { + m.synchronizeUpnForManagedUsersEnabled = value +} +// SetUnifiedGroupWritebackEnabled sets the unifiedGroupWritebackEnabled property value. Used to indicate that Microsoft 365 Group write-back is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetUnifiedGroupWritebackEnabled(value *bool)() { + m.unifiedGroupWritebackEnabled = value +} +// SetUserForcePasswordChangeOnLogonEnabled sets the userForcePasswordChangeOnLogonEnabled property value. Used to indicate that feature to force password change for a user on logon is enabled while synchronizing on-premise credentials. +func (m *OnPremisesDirectorySynchronizationFeature) SetUserForcePasswordChangeOnLogonEnabled(value *bool)() { + m.userForcePasswordChangeOnLogonEnabled = value +} +// SetUserWritebackEnabled sets the userWritebackEnabled property value. Used to indicate that user writeback is enabled. +func (m *OnPremisesDirectorySynchronizationFeature) SetUserWritebackEnabled(value *bool)() { + m.userWritebackEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_featureable.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_featureable.go new file mode 100644 index 000000000..b7a66dc72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronization_featureable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationFeatureable +type OnPremisesDirectorySynchronizationFeatureable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlockCloudObjectTakeoverThroughHardMatchEnabled()(*bool) + GetBlockSoftMatchEnabled()(*bool) + GetBypassDirSyncOverridesEnabled()(*bool) + GetCloudPasswordPolicyForPasswordSyncedUsersEnabled()(*bool) + GetConcurrentCredentialUpdateEnabled()(*bool) + GetConcurrentOrgIdProvisioningEnabled()(*bool) + GetDeviceWritebackEnabled()(*bool) + GetDirectoryExtensionsEnabled()(*bool) + GetFopeConflictResolutionEnabled()(*bool) + GetGroupWriteBackEnabled()(*bool) + GetOdataType()(*string) + GetPasswordSyncEnabled()(*bool) + GetPasswordWritebackEnabled()(*bool) + GetQuarantineUponProxyAddressesConflictEnabled()(*bool) + GetQuarantineUponUpnConflictEnabled()(*bool) + GetSoftMatchOnUpnEnabled()(*bool) + GetSynchronizeUpnForManagedUsersEnabled()(*bool) + GetUnifiedGroupWritebackEnabled()(*bool) + GetUserForcePasswordChangeOnLogonEnabled()(*bool) + GetUserWritebackEnabled()(*bool) + SetBlockCloudObjectTakeoverThroughHardMatchEnabled(value *bool)() + SetBlockSoftMatchEnabled(value *bool)() + SetBypassDirSyncOverridesEnabled(value *bool)() + SetCloudPasswordPolicyForPasswordSyncedUsersEnabled(value *bool)() + SetConcurrentCredentialUpdateEnabled(value *bool)() + SetConcurrentOrgIdProvisioningEnabled(value *bool)() + SetDeviceWritebackEnabled(value *bool)() + SetDirectoryExtensionsEnabled(value *bool)() + SetFopeConflictResolutionEnabled(value *bool)() + SetGroupWriteBackEnabled(value *bool)() + SetOdataType(value *string)() + SetPasswordSyncEnabled(value *bool)() + SetPasswordWritebackEnabled(value *bool)() + SetQuarantineUponProxyAddressesConflictEnabled(value *bool)() + SetQuarantineUponUpnConflictEnabled(value *bool)() + SetSoftMatchOnUpnEnabled(value *bool)() + SetSynchronizeUpnForManagedUsersEnabled(value *bool)() + SetUnifiedGroupWritebackEnabled(value *bool)() + SetUserForcePasswordChangeOnLogonEnabled(value *bool)() + SetUserWritebackEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronizationable.go b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronizationable.go new file mode 100644 index 000000000..286ea741b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_directory_synchronizationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesDirectorySynchronizationable +type OnPremisesDirectorySynchronizationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(OnPremisesDirectorySynchronizationConfigurationable) + GetFeatures()(OnPremisesDirectorySynchronizationFeatureable) + SetConfiguration(value OnPremisesDirectorySynchronizationConfigurationable)() + SetFeatures(value OnPremisesDirectorySynchronizationFeatureable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_extension_attributes.go b/src/internal/connector/graph/betasdk/models/on_premises_extension_attributes.go new file mode 100644 index 000000000..f721756ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_extension_attributes.go @@ -0,0 +1,461 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesExtensionAttributes +type OnPremisesExtensionAttributes struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // First customizable extension attribute. + extensionAttribute1 *string + // Tenth customizable extension attribute. + extensionAttribute10 *string + // Eleventh customizable extension attribute. + extensionAttribute11 *string + // Twelfth customizable extension attribute. + extensionAttribute12 *string + // Thirteenth customizable extension attribute. + extensionAttribute13 *string + // Fourteenth customizable extension attribute. + extensionAttribute14 *string + // Fifteenth customizable extension attribute. + extensionAttribute15 *string + // Second customizable extension attribute. + extensionAttribute2 *string + // Third customizable extension attribute. + extensionAttribute3 *string + // Fourth customizable extension attribute. + extensionAttribute4 *string + // Fifth customizable extension attribute. + extensionAttribute5 *string + // Sixth customizable extension attribute. + extensionAttribute6 *string + // Seventh customizable extension attribute. + extensionAttribute7 *string + // Eighth customizable extension attribute. + extensionAttribute8 *string + // Ninth customizable extension attribute. + extensionAttribute9 *string + // The OdataType property + odataType *string +} +// NewOnPremisesExtensionAttributes instantiates a new onPremisesExtensionAttributes and sets the default values. +func NewOnPremisesExtensionAttributes()(*OnPremisesExtensionAttributes) { + m := &OnPremisesExtensionAttributes{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesExtensionAttributesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesExtensionAttributesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesExtensionAttributes(), 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 *OnPremisesExtensionAttributes) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExtensionAttribute1 gets the extensionAttribute1 property value. First customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute1()(*string) { + return m.extensionAttribute1 +} +// GetExtensionAttribute10 gets the extensionAttribute10 property value. Tenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute10()(*string) { + return m.extensionAttribute10 +} +// GetExtensionAttribute11 gets the extensionAttribute11 property value. Eleventh customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute11()(*string) { + return m.extensionAttribute11 +} +// GetExtensionAttribute12 gets the extensionAttribute12 property value. Twelfth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute12()(*string) { + return m.extensionAttribute12 +} +// GetExtensionAttribute13 gets the extensionAttribute13 property value. Thirteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute13()(*string) { + return m.extensionAttribute13 +} +// GetExtensionAttribute14 gets the extensionAttribute14 property value. Fourteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute14()(*string) { + return m.extensionAttribute14 +} +// GetExtensionAttribute15 gets the extensionAttribute15 property value. Fifteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute15()(*string) { + return m.extensionAttribute15 +} +// GetExtensionAttribute2 gets the extensionAttribute2 property value. Second customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute2()(*string) { + return m.extensionAttribute2 +} +// GetExtensionAttribute3 gets the extensionAttribute3 property value. Third customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute3()(*string) { + return m.extensionAttribute3 +} +// GetExtensionAttribute4 gets the extensionAttribute4 property value. Fourth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute4()(*string) { + return m.extensionAttribute4 +} +// GetExtensionAttribute5 gets the extensionAttribute5 property value. Fifth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute5()(*string) { + return m.extensionAttribute5 +} +// GetExtensionAttribute6 gets the extensionAttribute6 property value. Sixth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute6()(*string) { + return m.extensionAttribute6 +} +// GetExtensionAttribute7 gets the extensionAttribute7 property value. Seventh customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute7()(*string) { + return m.extensionAttribute7 +} +// GetExtensionAttribute8 gets the extensionAttribute8 property value. Eighth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute8()(*string) { + return m.extensionAttribute8 +} +// GetExtensionAttribute9 gets the extensionAttribute9 property value. Ninth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) GetExtensionAttribute9()(*string) { + return m.extensionAttribute9 +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesExtensionAttributes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["extensionAttribute1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute1(val) + } + return nil + } + res["extensionAttribute10"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute10(val) + } + return nil + } + res["extensionAttribute11"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute11(val) + } + return nil + } + res["extensionAttribute12"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute12(val) + } + return nil + } + res["extensionAttribute13"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute13(val) + } + return nil + } + res["extensionAttribute14"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute14(val) + } + return nil + } + res["extensionAttribute15"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute15(val) + } + return nil + } + res["extensionAttribute2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute2(val) + } + return nil + } + res["extensionAttribute3"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute3(val) + } + return nil + } + res["extensionAttribute4"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute4(val) + } + return nil + } + res["extensionAttribute5"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute5(val) + } + return nil + } + res["extensionAttribute6"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute6(val) + } + return nil + } + res["extensionAttribute7"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute7(val) + } + return nil + } + res["extensionAttribute8"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute8(val) + } + return nil + } + res["extensionAttribute9"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionAttribute9(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesExtensionAttributes) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OnPremisesExtensionAttributes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("extensionAttribute1", m.GetExtensionAttribute1()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute10", m.GetExtensionAttribute10()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute11", m.GetExtensionAttribute11()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute12", m.GetExtensionAttribute12()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute13", m.GetExtensionAttribute13()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute14", m.GetExtensionAttribute14()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute15", m.GetExtensionAttribute15()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute2", m.GetExtensionAttribute2()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute3", m.GetExtensionAttribute3()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute4", m.GetExtensionAttribute4()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute5", m.GetExtensionAttribute5()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute6", m.GetExtensionAttribute6()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute7", m.GetExtensionAttribute7()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute8", m.GetExtensionAttribute8()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("extensionAttribute9", m.GetExtensionAttribute9()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OnPremisesExtensionAttributes) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExtensionAttribute1 sets the extensionAttribute1 property value. First customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute1(value *string)() { + m.extensionAttribute1 = value +} +// SetExtensionAttribute10 sets the extensionAttribute10 property value. Tenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute10(value *string)() { + m.extensionAttribute10 = value +} +// SetExtensionAttribute11 sets the extensionAttribute11 property value. Eleventh customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute11(value *string)() { + m.extensionAttribute11 = value +} +// SetExtensionAttribute12 sets the extensionAttribute12 property value. Twelfth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute12(value *string)() { + m.extensionAttribute12 = value +} +// SetExtensionAttribute13 sets the extensionAttribute13 property value. Thirteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute13(value *string)() { + m.extensionAttribute13 = value +} +// SetExtensionAttribute14 sets the extensionAttribute14 property value. Fourteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute14(value *string)() { + m.extensionAttribute14 = value +} +// SetExtensionAttribute15 sets the extensionAttribute15 property value. Fifteenth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute15(value *string)() { + m.extensionAttribute15 = value +} +// SetExtensionAttribute2 sets the extensionAttribute2 property value. Second customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute2(value *string)() { + m.extensionAttribute2 = value +} +// SetExtensionAttribute3 sets the extensionAttribute3 property value. Third customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute3(value *string)() { + m.extensionAttribute3 = value +} +// SetExtensionAttribute4 sets the extensionAttribute4 property value. Fourth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute4(value *string)() { + m.extensionAttribute4 = value +} +// SetExtensionAttribute5 sets the extensionAttribute5 property value. Fifth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute5(value *string)() { + m.extensionAttribute5 = value +} +// SetExtensionAttribute6 sets the extensionAttribute6 property value. Sixth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute6(value *string)() { + m.extensionAttribute6 = value +} +// SetExtensionAttribute7 sets the extensionAttribute7 property value. Seventh customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute7(value *string)() { + m.extensionAttribute7 = value +} +// SetExtensionAttribute8 sets the extensionAttribute8 property value. Eighth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute8(value *string)() { + m.extensionAttribute8 = value +} +// SetExtensionAttribute9 sets the extensionAttribute9 property value. Ninth customizable extension attribute. +func (m *OnPremisesExtensionAttributes) SetExtensionAttribute9(value *string)() { + m.extensionAttribute9 = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesExtensionAttributes) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_extension_attributesable.go b/src/internal/connector/graph/betasdk/models/on_premises_extension_attributesable.go new file mode 100644 index 000000000..32af56159 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_extension_attributesable.go @@ -0,0 +1,43 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesExtensionAttributesable +type OnPremisesExtensionAttributesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExtensionAttribute1()(*string) + GetExtensionAttribute10()(*string) + GetExtensionAttribute11()(*string) + GetExtensionAttribute12()(*string) + GetExtensionAttribute13()(*string) + GetExtensionAttribute14()(*string) + GetExtensionAttribute15()(*string) + GetExtensionAttribute2()(*string) + GetExtensionAttribute3()(*string) + GetExtensionAttribute4()(*string) + GetExtensionAttribute5()(*string) + GetExtensionAttribute6()(*string) + GetExtensionAttribute7()(*string) + GetExtensionAttribute8()(*string) + GetExtensionAttribute9()(*string) + GetOdataType()(*string) + SetExtensionAttribute1(value *string)() + SetExtensionAttribute10(value *string)() + SetExtensionAttribute11(value *string)() + SetExtensionAttribute12(value *string)() + SetExtensionAttribute13(value *string)() + SetExtensionAttribute14(value *string)() + SetExtensionAttribute15(value *string)() + SetExtensionAttribute2(value *string)() + SetExtensionAttribute3(value *string)() + SetExtensionAttribute4(value *string)() + SetExtensionAttribute5(value *string)() + SetExtensionAttribute6(value *string)() + SetExtensionAttribute7(value *string)() + SetExtensionAttribute8(value *string)() + SetExtensionAttribute9(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error.go b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error.go new file mode 100644 index 000000000..4768a7028 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error.go @@ -0,0 +1,176 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesProvisioningError +type OnPremisesProvisioningError struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. + category *string + // The date and time at which the error occurred. + occurredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress + propertyCausingError *string + // Value of the property causing the error. + value *string +} +// NewOnPremisesProvisioningError instantiates a new onPremisesProvisioningError and sets the default values. +func NewOnPremisesProvisioningError()(*OnPremisesProvisioningError) { + m := &OnPremisesProvisioningError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesProvisioningErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesProvisioningErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesProvisioningError(), 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 *OnPremisesProvisioningError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. +func (m *OnPremisesProvisioningError) GetCategory()(*string) { + return m.category +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesProvisioningError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["occurredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOccurredDateTime(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["propertyCausingError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyCausingError(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 +} +// GetOccurredDateTime gets the occurredDateTime property value. The date and time at which the error occurred. +func (m *OnPremisesProvisioningError) GetOccurredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.occurredDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesProvisioningError) GetOdataType()(*string) { + return m.odataType +} +// GetPropertyCausingError gets the propertyCausingError property value. Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress +func (m *OnPremisesProvisioningError) GetPropertyCausingError()(*string) { + return m.propertyCausingError +} +// GetValue gets the value property value. Value of the property causing the error. +func (m *OnPremisesProvisioningError) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesProvisioningError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("occurredDateTime", m.GetOccurredDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("propertyCausingError", m.GetPropertyCausingError()) + 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 *OnPremisesProvisioningError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. +func (m *OnPremisesProvisioningError) SetCategory(value *string)() { + m.category = value +} +// SetOccurredDateTime sets the occurredDateTime property value. The date and time at which the error occurred. +func (m *OnPremisesProvisioningError) SetOccurredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.occurredDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesProvisioningError) SetOdataType(value *string)() { + m.odataType = value +} +// SetPropertyCausingError sets the propertyCausingError property value. Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress +func (m *OnPremisesProvisioningError) SetPropertyCausingError(value *string)() { + m.propertyCausingError = value +} +// SetValue sets the value property value. Value of the property causing the error. +func (m *OnPremisesProvisioningError) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_response.go new file mode 100644 index 000000000..0233e07c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesProvisioningErrorCollectionResponse +type OnPremisesProvisioningErrorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesProvisioningErrorable +} +// NewOnPremisesProvisioningErrorCollectionResponse instantiates a new OnPremisesProvisioningErrorCollectionResponse and sets the default values. +func NewOnPremisesProvisioningErrorCollectionResponse()(*OnPremisesProvisioningErrorCollectionResponse) { + m := &OnPremisesProvisioningErrorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesProvisioningErrorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesProvisioningErrorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesProvisioningErrorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesProvisioningErrorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesProvisioningErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesProvisioningErrorable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesProvisioningErrorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesProvisioningErrorCollectionResponse) GetValue()([]OnPremisesProvisioningErrorable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesProvisioningErrorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesProvisioningErrorCollectionResponse) SetValue(value []OnPremisesProvisioningErrorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_responseable.go new file mode 100644 index 000000000..b5eda5e4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_error_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesProvisioningErrorCollectionResponseable +type OnPremisesProvisioningErrorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesProvisioningErrorable) + SetValue(value []OnPremisesProvisioningErrorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_provisioning_errorable.go b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_errorable.go new file mode 100644 index 000000000..a272486d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_provisioning_errorable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesProvisioningErrorable +type OnPremisesProvisioningErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*string) + GetOccurredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetPropertyCausingError()(*string) + GetValue()(*string) + SetCategory(value *string)() + SetOccurredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetPropertyCausingError(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing.go new file mode 100644 index 000000000..d786e260a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing.go @@ -0,0 +1,626 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishing +type OnPremisesPublishing struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If you are configuring a traffic manager in front of multiple App Proxy applications, the alternateUrl is the user-friendly URL that will point to the traffic manager. + alternateUrl *string + // The duration the connector will wait for a response from the backend application before closing the connection. Possible values are default, long. When set to default, the backend application timeout has a length of 85 seconds. When set to long, the backend timeout is increased to 180 seconds. Use long if your server takes more than 85 seconds to respond to requests or if you are unable to access the application and the error status is 'Backend Timeout'. Default value is default. + applicationServerTimeout *string + // Indicates if this application is an Application Proxy configured application. This is pre-set by the system. Read-only. + applicationType *string + // Details the pre-authentication setting for the application. Pre-authentication enforces that users must authenticate before accessing the app. Passthru does not require authentication. Possible values are: passthru, aadPreAuthentication. + externalAuthenticationType *ExternalAuthenticationType + // The published external url for the application. For example, https://intranet-contoso.msappproxy.net/. + externalUrl *string + // The internal url of the application. For example, https://intranet/. + internalUrl *string + // Indicates whether backend SSL certificate validation is enabled for the application. For all new Application Proxy apps, the property will be set to true by default. For all existing apps, the property will be set to false. + isBackendCertificateValidationEnabled *bool + // Indicates if the HTTPOnly cookie flag should be set in the HTTP response headers. Set this value to true to have Application Proxy cookies include the HTTPOnly flag in the HTTP response headers. If using Remote Desktop Services, set this value to False. Default value is false. + isHttpOnlyCookieEnabled *bool + // Indicates if the application is currently being published via Application Proxy or not. This is pre-set by the system. Read-only. + isOnPremPublishingEnabled *bool + // Indicates if the Persistent cookie flag should be set in the HTTP response headers. Keep this value set to false. Only use this setting for applications that can't share cookies between processes. For more information about cookie settings, see Cookie settings for accessing on-premises applications in Azure Active Directory. Default value is false. + isPersistentCookieEnabled *bool + // Indicates if the Secure cookie flag should be set in the HTTP response headers. Set this value to true to transmit cookies over a secure channel such as an encrypted HTTPS request. Default value is true. + isSecureCookieEnabled *bool + // Indicates whether validation of the state parameter when the client uses the OAuth 2.0 authorization code grant flow is enabled. This setting allows admins to specify whether they want to enable CSRF protection for their apps. + isStateSessionEnabled *bool + // Indicates if the application should translate urls in the reponse headers. Keep this value as true unless your application required the original host header in the authentication request. Default value is true. + isTranslateHostHeaderEnabled *bool + // Indicates if the application should translate urls in the application body. Keep this value as false unless you have hardcoded HTML links to other on-premises applications and don't use custom domains. For more information, see Link translation with Application Proxy. Default value is false. + isTranslateLinksInBodyEnabled *bool + // The OdataType property + odataType *string + // Represents the application segment collection for an on-premises wildcard application. + onPremisesApplicationSegments []OnPremisesApplicationSegmentable + // The segmentsConfiguration property + segmentsConfiguration SegmentConfigurationable + // Represents the single sign-on configuration for the on-premises application. + singleSignOnSettings OnPremisesPublishingSingleSignOnable + // The useAlternateUrlForTranslationAndRedirect property + useAlternateUrlForTranslationAndRedirect *bool + // Details of the certificate associated with the application when a custom domain is in use. null when using the default domain. Read-only. + verifiedCustomDomainCertificatesMetadata VerifiedCustomDomainCertificatesMetadataable + // The associated key credential for the custom domain used. + verifiedCustomDomainKeyCredential KeyCredentialable + // The associated password credential for the custom domain used. + verifiedCustomDomainPasswordCredential PasswordCredentialable +} +// NewOnPremisesPublishing instantiates a new onPremisesPublishing and sets the default values. +func NewOnPremisesPublishing()(*OnPremisesPublishing) { + m := &OnPremisesPublishing{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesPublishingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesPublishingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesPublishing(), 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 *OnPremisesPublishing) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAlternateUrl gets the alternateUrl property value. If you are configuring a traffic manager in front of multiple App Proxy applications, the alternateUrl is the user-friendly URL that will point to the traffic manager. +func (m *OnPremisesPublishing) GetAlternateUrl()(*string) { + return m.alternateUrl +} +// GetApplicationServerTimeout gets the applicationServerTimeout property value. The duration the connector will wait for a response from the backend application before closing the connection. Possible values are default, long. When set to default, the backend application timeout has a length of 85 seconds. When set to long, the backend timeout is increased to 180 seconds. Use long if your server takes more than 85 seconds to respond to requests or if you are unable to access the application and the error status is 'Backend Timeout'. Default value is default. +func (m *OnPremisesPublishing) GetApplicationServerTimeout()(*string) { + return m.applicationServerTimeout +} +// GetApplicationType gets the applicationType property value. Indicates if this application is an Application Proxy configured application. This is pre-set by the system. Read-only. +func (m *OnPremisesPublishing) GetApplicationType()(*string) { + return m.applicationType +} +// GetExternalAuthenticationType gets the externalAuthenticationType property value. Details the pre-authentication setting for the application. Pre-authentication enforces that users must authenticate before accessing the app. Passthru does not require authentication. Possible values are: passthru, aadPreAuthentication. +func (m *OnPremisesPublishing) GetExternalAuthenticationType()(*ExternalAuthenticationType) { + return m.externalAuthenticationType +} +// GetExternalUrl gets the externalUrl property value. The published external url for the application. For example, https://intranet-contoso.msappproxy.net/. +func (m *OnPremisesPublishing) GetExternalUrl()(*string) { + return m.externalUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesPublishing) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["alternateUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternateUrl(val) + } + return nil + } + res["applicationServerTimeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationServerTimeout(val) + } + return nil + } + res["applicationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationType(val) + } + return nil + } + res["externalAuthenticationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExternalAuthenticationType) + if err != nil { + return err + } + if val != nil { + m.SetExternalAuthenticationType(val.(*ExternalAuthenticationType)) + } + return nil + } + res["externalUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalUrl(val) + } + return nil + } + res["internalUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternalUrl(val) + } + return nil + } + res["isBackendCertificateValidationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBackendCertificateValidationEnabled(val) + } + return nil + } + res["isHttpOnlyCookieEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHttpOnlyCookieEnabled(val) + } + return nil + } + res["isOnPremPublishingEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOnPremPublishingEnabled(val) + } + return nil + } + res["isPersistentCookieEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPersistentCookieEnabled(val) + } + return nil + } + res["isSecureCookieEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSecureCookieEnabled(val) + } + return nil + } + res["isStateSessionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsStateSessionEnabled(val) + } + return nil + } + res["isTranslateHostHeaderEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTranslateHostHeaderEnabled(val) + } + return nil + } + res["isTranslateLinksInBodyEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsTranslateLinksInBodyEnabled(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["onPremisesApplicationSegments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesApplicationSegmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesApplicationSegmentable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesApplicationSegmentable) + } + m.SetOnPremisesApplicationSegments(res) + } + return nil + } + res["segmentsConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSegmentConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSegmentsConfiguration(val.(SegmentConfigurationable)) + } + return nil + } + res["singleSignOnSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnPremisesPublishingSingleSignOnFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnSettings(val.(OnPremisesPublishingSingleSignOnable)) + } + return nil + } + res["useAlternateUrlForTranslationAndRedirect"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetUseAlternateUrlForTranslationAndRedirect(val) + } + return nil + } + res["verifiedCustomDomainCertificatesMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerifiedCustomDomainCertificatesMetadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerifiedCustomDomainCertificatesMetadata(val.(VerifiedCustomDomainCertificatesMetadataable)) + } + return nil + } + res["verifiedCustomDomainKeyCredential"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateKeyCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerifiedCustomDomainKeyCredential(val.(KeyCredentialable)) + } + return nil + } + res["verifiedCustomDomainPasswordCredential"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePasswordCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerifiedCustomDomainPasswordCredential(val.(PasswordCredentialable)) + } + return nil + } + return res +} +// GetInternalUrl gets the internalUrl property value. The internal url of the application. For example, https://intranet/. +func (m *OnPremisesPublishing) GetInternalUrl()(*string) { + return m.internalUrl +} +// GetIsBackendCertificateValidationEnabled gets the isBackendCertificateValidationEnabled property value. Indicates whether backend SSL certificate validation is enabled for the application. For all new Application Proxy apps, the property will be set to true by default. For all existing apps, the property will be set to false. +func (m *OnPremisesPublishing) GetIsBackendCertificateValidationEnabled()(*bool) { + return m.isBackendCertificateValidationEnabled +} +// GetIsHttpOnlyCookieEnabled gets the isHttpOnlyCookieEnabled property value. Indicates if the HTTPOnly cookie flag should be set in the HTTP response headers. Set this value to true to have Application Proxy cookies include the HTTPOnly flag in the HTTP response headers. If using Remote Desktop Services, set this value to False. Default value is false. +func (m *OnPremisesPublishing) GetIsHttpOnlyCookieEnabled()(*bool) { + return m.isHttpOnlyCookieEnabled +} +// GetIsOnPremPublishingEnabled gets the isOnPremPublishingEnabled property value. Indicates if the application is currently being published via Application Proxy or not. This is pre-set by the system. Read-only. +func (m *OnPremisesPublishing) GetIsOnPremPublishingEnabled()(*bool) { + return m.isOnPremPublishingEnabled +} +// GetIsPersistentCookieEnabled gets the isPersistentCookieEnabled property value. Indicates if the Persistent cookie flag should be set in the HTTP response headers. Keep this value set to false. Only use this setting for applications that can't share cookies between processes. For more information about cookie settings, see Cookie settings for accessing on-premises applications in Azure Active Directory. Default value is false. +func (m *OnPremisesPublishing) GetIsPersistentCookieEnabled()(*bool) { + return m.isPersistentCookieEnabled +} +// GetIsSecureCookieEnabled gets the isSecureCookieEnabled property value. Indicates if the Secure cookie flag should be set in the HTTP response headers. Set this value to true to transmit cookies over a secure channel such as an encrypted HTTPS request. Default value is true. +func (m *OnPremisesPublishing) GetIsSecureCookieEnabled()(*bool) { + return m.isSecureCookieEnabled +} +// GetIsStateSessionEnabled gets the isStateSessionEnabled property value. Indicates whether validation of the state parameter when the client uses the OAuth 2.0 authorization code grant flow is enabled. This setting allows admins to specify whether they want to enable CSRF protection for their apps. +func (m *OnPremisesPublishing) GetIsStateSessionEnabled()(*bool) { + return m.isStateSessionEnabled +} +// GetIsTranslateHostHeaderEnabled gets the isTranslateHostHeaderEnabled property value. Indicates if the application should translate urls in the reponse headers. Keep this value as true unless your application required the original host header in the authentication request. Default value is true. +func (m *OnPremisesPublishing) GetIsTranslateHostHeaderEnabled()(*bool) { + return m.isTranslateHostHeaderEnabled +} +// GetIsTranslateLinksInBodyEnabled gets the isTranslateLinksInBodyEnabled property value. Indicates if the application should translate urls in the application body. Keep this value as false unless you have hardcoded HTML links to other on-premises applications and don't use custom domains. For more information, see Link translation with Application Proxy. Default value is false. +func (m *OnPremisesPublishing) GetIsTranslateLinksInBodyEnabled()(*bool) { + return m.isTranslateLinksInBodyEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesPublishing) GetOdataType()(*string) { + return m.odataType +} +// GetOnPremisesApplicationSegments gets the onPremisesApplicationSegments property value. Represents the application segment collection for an on-premises wildcard application. +func (m *OnPremisesPublishing) GetOnPremisesApplicationSegments()([]OnPremisesApplicationSegmentable) { + return m.onPremisesApplicationSegments +} +// GetSegmentsConfiguration gets the segmentsConfiguration property value. The segmentsConfiguration property +func (m *OnPremisesPublishing) GetSegmentsConfiguration()(SegmentConfigurationable) { + return m.segmentsConfiguration +} +// GetSingleSignOnSettings gets the singleSignOnSettings property value. Represents the single sign-on configuration for the on-premises application. +func (m *OnPremisesPublishing) GetSingleSignOnSettings()(OnPremisesPublishingSingleSignOnable) { + return m.singleSignOnSettings +} +// GetUseAlternateUrlForTranslationAndRedirect gets the useAlternateUrlForTranslationAndRedirect property value. The useAlternateUrlForTranslationAndRedirect property +func (m *OnPremisesPublishing) GetUseAlternateUrlForTranslationAndRedirect()(*bool) { + return m.useAlternateUrlForTranslationAndRedirect +} +// GetVerifiedCustomDomainCertificatesMetadata gets the verifiedCustomDomainCertificatesMetadata property value. Details of the certificate associated with the application when a custom domain is in use. null when using the default domain. Read-only. +func (m *OnPremisesPublishing) GetVerifiedCustomDomainCertificatesMetadata()(VerifiedCustomDomainCertificatesMetadataable) { + return m.verifiedCustomDomainCertificatesMetadata +} +// GetVerifiedCustomDomainKeyCredential gets the verifiedCustomDomainKeyCredential property value. The associated key credential for the custom domain used. +func (m *OnPremisesPublishing) GetVerifiedCustomDomainKeyCredential()(KeyCredentialable) { + return m.verifiedCustomDomainKeyCredential +} +// GetVerifiedCustomDomainPasswordCredential gets the verifiedCustomDomainPasswordCredential property value. The associated password credential for the custom domain used. +func (m *OnPremisesPublishing) GetVerifiedCustomDomainPasswordCredential()(PasswordCredentialable) { + return m.verifiedCustomDomainPasswordCredential +} +// Serialize serializes information the current object +func (m *OnPremisesPublishing) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("alternateUrl", m.GetAlternateUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("applicationServerTimeout", m.GetApplicationServerTimeout()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("applicationType", m.GetApplicationType()) + if err != nil { + return err + } + } + if m.GetExternalAuthenticationType() != nil { + cast := (*m.GetExternalAuthenticationType()).String() + err := writer.WriteStringValue("externalAuthenticationType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("externalUrl", m.GetExternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("internalUrl", m.GetInternalUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isBackendCertificateValidationEnabled", m.GetIsBackendCertificateValidationEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isHttpOnlyCookieEnabled", m.GetIsHttpOnlyCookieEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isOnPremPublishingEnabled", m.GetIsOnPremPublishingEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPersistentCookieEnabled", m.GetIsPersistentCookieEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSecureCookieEnabled", m.GetIsSecureCookieEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isStateSessionEnabled", m.GetIsStateSessionEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isTranslateHostHeaderEnabled", m.GetIsTranslateHostHeaderEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isTranslateLinksInBodyEnabled", m.GetIsTranslateLinksInBodyEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOnPremisesApplicationSegments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnPremisesApplicationSegments())) + for i, v := range m.GetOnPremisesApplicationSegments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("onPremisesApplicationSegments", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("segmentsConfiguration", m.GetSegmentsConfiguration()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("singleSignOnSettings", m.GetSingleSignOnSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("useAlternateUrlForTranslationAndRedirect", m.GetUseAlternateUrlForTranslationAndRedirect()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verifiedCustomDomainCertificatesMetadata", m.GetVerifiedCustomDomainCertificatesMetadata()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verifiedCustomDomainKeyCredential", m.GetVerifiedCustomDomainKeyCredential()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("verifiedCustomDomainPasswordCredential", m.GetVerifiedCustomDomainPasswordCredential()) + 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 *OnPremisesPublishing) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAlternateUrl sets the alternateUrl property value. If you are configuring a traffic manager in front of multiple App Proxy applications, the alternateUrl is the user-friendly URL that will point to the traffic manager. +func (m *OnPremisesPublishing) SetAlternateUrl(value *string)() { + m.alternateUrl = value +} +// SetApplicationServerTimeout sets the applicationServerTimeout property value. The duration the connector will wait for a response from the backend application before closing the connection. Possible values are default, long. When set to default, the backend application timeout has a length of 85 seconds. When set to long, the backend timeout is increased to 180 seconds. Use long if your server takes more than 85 seconds to respond to requests or if you are unable to access the application and the error status is 'Backend Timeout'. Default value is default. +func (m *OnPremisesPublishing) SetApplicationServerTimeout(value *string)() { + m.applicationServerTimeout = value +} +// SetApplicationType sets the applicationType property value. Indicates if this application is an Application Proxy configured application. This is pre-set by the system. Read-only. +func (m *OnPremisesPublishing) SetApplicationType(value *string)() { + m.applicationType = value +} +// SetExternalAuthenticationType sets the externalAuthenticationType property value. Details the pre-authentication setting for the application. Pre-authentication enforces that users must authenticate before accessing the app. Passthru does not require authentication. Possible values are: passthru, aadPreAuthentication. +func (m *OnPremisesPublishing) SetExternalAuthenticationType(value *ExternalAuthenticationType)() { + m.externalAuthenticationType = value +} +// SetExternalUrl sets the externalUrl property value. The published external url for the application. For example, https://intranet-contoso.msappproxy.net/. +func (m *OnPremisesPublishing) SetExternalUrl(value *string)() { + m.externalUrl = value +} +// SetInternalUrl sets the internalUrl property value. The internal url of the application. For example, https://intranet/. +func (m *OnPremisesPublishing) SetInternalUrl(value *string)() { + m.internalUrl = value +} +// SetIsBackendCertificateValidationEnabled sets the isBackendCertificateValidationEnabled property value. Indicates whether backend SSL certificate validation is enabled for the application. For all new Application Proxy apps, the property will be set to true by default. For all existing apps, the property will be set to false. +func (m *OnPremisesPublishing) SetIsBackendCertificateValidationEnabled(value *bool)() { + m.isBackendCertificateValidationEnabled = value +} +// SetIsHttpOnlyCookieEnabled sets the isHttpOnlyCookieEnabled property value. Indicates if the HTTPOnly cookie flag should be set in the HTTP response headers. Set this value to true to have Application Proxy cookies include the HTTPOnly flag in the HTTP response headers. If using Remote Desktop Services, set this value to False. Default value is false. +func (m *OnPremisesPublishing) SetIsHttpOnlyCookieEnabled(value *bool)() { + m.isHttpOnlyCookieEnabled = value +} +// SetIsOnPremPublishingEnabled sets the isOnPremPublishingEnabled property value. Indicates if the application is currently being published via Application Proxy or not. This is pre-set by the system. Read-only. +func (m *OnPremisesPublishing) SetIsOnPremPublishingEnabled(value *bool)() { + m.isOnPremPublishingEnabled = value +} +// SetIsPersistentCookieEnabled sets the isPersistentCookieEnabled property value. Indicates if the Persistent cookie flag should be set in the HTTP response headers. Keep this value set to false. Only use this setting for applications that can't share cookies between processes. For more information about cookie settings, see Cookie settings for accessing on-premises applications in Azure Active Directory. Default value is false. +func (m *OnPremisesPublishing) SetIsPersistentCookieEnabled(value *bool)() { + m.isPersistentCookieEnabled = value +} +// SetIsSecureCookieEnabled sets the isSecureCookieEnabled property value. Indicates if the Secure cookie flag should be set in the HTTP response headers. Set this value to true to transmit cookies over a secure channel such as an encrypted HTTPS request. Default value is true. +func (m *OnPremisesPublishing) SetIsSecureCookieEnabled(value *bool)() { + m.isSecureCookieEnabled = value +} +// SetIsStateSessionEnabled sets the isStateSessionEnabled property value. Indicates whether validation of the state parameter when the client uses the OAuth 2.0 authorization code grant flow is enabled. This setting allows admins to specify whether they want to enable CSRF protection for their apps. +func (m *OnPremisesPublishing) SetIsStateSessionEnabled(value *bool)() { + m.isStateSessionEnabled = value +} +// SetIsTranslateHostHeaderEnabled sets the isTranslateHostHeaderEnabled property value. Indicates if the application should translate urls in the reponse headers. Keep this value as true unless your application required the original host header in the authentication request. Default value is true. +func (m *OnPremisesPublishing) SetIsTranslateHostHeaderEnabled(value *bool)() { + m.isTranslateHostHeaderEnabled = value +} +// SetIsTranslateLinksInBodyEnabled sets the isTranslateLinksInBodyEnabled property value. Indicates if the application should translate urls in the application body. Keep this value as false unless you have hardcoded HTML links to other on-premises applications and don't use custom domains. For more information, see Link translation with Application Proxy. Default value is false. +func (m *OnPremisesPublishing) SetIsTranslateLinksInBodyEnabled(value *bool)() { + m.isTranslateLinksInBodyEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesPublishing) SetOdataType(value *string)() { + m.odataType = value +} +// SetOnPremisesApplicationSegments sets the onPremisesApplicationSegments property value. Represents the application segment collection for an on-premises wildcard application. +func (m *OnPremisesPublishing) SetOnPremisesApplicationSegments(value []OnPremisesApplicationSegmentable)() { + m.onPremisesApplicationSegments = value +} +// SetSegmentsConfiguration sets the segmentsConfiguration property value. The segmentsConfiguration property +func (m *OnPremisesPublishing) SetSegmentsConfiguration(value SegmentConfigurationable)() { + m.segmentsConfiguration = value +} +// SetSingleSignOnSettings sets the singleSignOnSettings property value. Represents the single sign-on configuration for the on-premises application. +func (m *OnPremisesPublishing) SetSingleSignOnSettings(value OnPremisesPublishingSingleSignOnable)() { + m.singleSignOnSettings = value +} +// SetUseAlternateUrlForTranslationAndRedirect sets the useAlternateUrlForTranslationAndRedirect property value. The useAlternateUrlForTranslationAndRedirect property +func (m *OnPremisesPublishing) SetUseAlternateUrlForTranslationAndRedirect(value *bool)() { + m.useAlternateUrlForTranslationAndRedirect = value +} +// SetVerifiedCustomDomainCertificatesMetadata sets the verifiedCustomDomainCertificatesMetadata property value. Details of the certificate associated with the application when a custom domain is in use. null when using the default domain. Read-only. +func (m *OnPremisesPublishing) SetVerifiedCustomDomainCertificatesMetadata(value VerifiedCustomDomainCertificatesMetadataable)() { + m.verifiedCustomDomainCertificatesMetadata = value +} +// SetVerifiedCustomDomainKeyCredential sets the verifiedCustomDomainKeyCredential property value. The associated key credential for the custom domain used. +func (m *OnPremisesPublishing) SetVerifiedCustomDomainKeyCredential(value KeyCredentialable)() { + m.verifiedCustomDomainKeyCredential = value +} +// SetVerifiedCustomDomainPasswordCredential sets the verifiedCustomDomainPasswordCredential property value. The associated password credential for the custom domain used. +func (m *OnPremisesPublishing) SetVerifiedCustomDomainPasswordCredential(value PasswordCredentialable)() { + m.verifiedCustomDomainPasswordCredential = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile.go new file mode 100644 index 000000000..a909cb49e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile.go @@ -0,0 +1,282 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingProfile +type OnPremisesPublishingProfile struct { + Entity + // List of existing onPremisesAgentGroup objects. Read-only. Nullable. + agentGroups []OnPremisesAgentGroupable + // List of existing onPremisesAgent objects. Read-only. Nullable. + agents []OnPremisesAgentable + // List of existing connectorGroup objects for applications published through Application Proxy. Read-only. Nullable. + connectorGroups []ConnectorGroupable + // List of existing connector objects for applications published through Application Proxy. Read-only. Nullable. + connectors []Connectorable + // Represents a hybridAgentUpdaterConfiguration object. + hybridAgentUpdaterConfiguration HybridAgentUpdaterConfigurationable + // The isDefaultAccessEnabled property + isDefaultAccessEnabled *bool + // Represents if Azure AD Application Proxy is enabled for the tenant. + isEnabled *bool + // List of existing publishedResource objects. Read-only. Nullable. + publishedResources []PublishedResourceable +} +// NewOnPremisesPublishingProfile instantiates a new OnPremisesPublishingProfile and sets the default values. +func NewOnPremisesPublishingProfile()(*OnPremisesPublishingProfile) { + m := &OnPremisesPublishingProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateOnPremisesPublishingProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesPublishingProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesPublishingProfile(), nil +} +// GetAgentGroups gets the agentGroups property value. List of existing onPremisesAgentGroup objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) GetAgentGroups()([]OnPremisesAgentGroupable) { + return m.agentGroups +} +// GetAgents gets the agents property value. List of existing onPremisesAgent objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) GetAgents()([]OnPremisesAgentable) { + return m.agents +} +// GetConnectorGroups gets the connectorGroups property value. List of existing connectorGroup objects for applications published through Application Proxy. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) GetConnectorGroups()([]ConnectorGroupable) { + return m.connectorGroups +} +// GetConnectors gets the connectors property value. List of existing connector objects for applications published through Application Proxy. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) GetConnectors()([]Connectorable) { + return m.connectors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesPublishingProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agentGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentGroupable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentGroupable) + } + m.SetAgentGroups(res) + } + return nil + } + res["agents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentable) + } + m.SetAgents(res) + } + return nil + } + res["connectorGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConnectorGroupable, len(val)) + for i, v := range val { + res[i] = v.(ConnectorGroupable) + } + m.SetConnectorGroups(res) + } + return nil + } + res["connectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Connectorable, len(val)) + for i, v := range val { + res[i] = v.(Connectorable) + } + m.SetConnectors(res) + } + return nil + } + res["hybridAgentUpdaterConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateHybridAgentUpdaterConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHybridAgentUpdaterConfiguration(val.(HybridAgentUpdaterConfigurationable)) + } + return nil + } + res["isDefaultAccessEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultAccessEnabled(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["publishedResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublishedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublishedResourceable, len(val)) + for i, v := range val { + res[i] = v.(PublishedResourceable) + } + m.SetPublishedResources(res) + } + return nil + } + return res +} +// GetHybridAgentUpdaterConfiguration gets the hybridAgentUpdaterConfiguration property value. Represents a hybridAgentUpdaterConfiguration object. +func (m *OnPremisesPublishingProfile) GetHybridAgentUpdaterConfiguration()(HybridAgentUpdaterConfigurationable) { + return m.hybridAgentUpdaterConfiguration +} +// GetIsDefaultAccessEnabled gets the isDefaultAccessEnabled property value. The isDefaultAccessEnabled property +func (m *OnPremisesPublishingProfile) GetIsDefaultAccessEnabled()(*bool) { + return m.isDefaultAccessEnabled +} +// GetIsEnabled gets the isEnabled property value. Represents if Azure AD Application Proxy is enabled for the tenant. +func (m *OnPremisesPublishingProfile) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetPublishedResources gets the publishedResources property value. List of existing publishedResource objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) GetPublishedResources()([]PublishedResourceable) { + return m.publishedResources +} +// Serialize serializes information the current object +func (m *OnPremisesPublishingProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAgentGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgentGroups())) + for i, v := range m.GetAgentGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agentGroups", cast) + if err != nil { + return err + } + } + if m.GetAgents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgents())) + for i, v := range m.GetAgents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agents", cast) + if err != nil { + return err + } + } + if m.GetConnectorGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConnectorGroups())) + for i, v := range m.GetConnectorGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("connectorGroups", cast) + if err != nil { + return err + } + } + if m.GetConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConnectors())) + for i, v := range m.GetConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("connectors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("hybridAgentUpdaterConfiguration", m.GetHybridAgentUpdaterConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultAccessEnabled", m.GetIsDefaultAccessEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + if m.GetPublishedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublishedResources())) + for i, v := range m.GetPublishedResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publishedResources", cast) + if err != nil { + return err + } + } + return nil +} +// SetAgentGroups sets the agentGroups property value. List of existing onPremisesAgentGroup objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) SetAgentGroups(value []OnPremisesAgentGroupable)() { + m.agentGroups = value +} +// SetAgents sets the agents property value. List of existing onPremisesAgent objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) SetAgents(value []OnPremisesAgentable)() { + m.agents = value +} +// SetConnectorGroups sets the connectorGroups property value. List of existing connectorGroup objects for applications published through Application Proxy. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) SetConnectorGroups(value []ConnectorGroupable)() { + m.connectorGroups = value +} +// SetConnectors sets the connectors property value. List of existing connector objects for applications published through Application Proxy. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) SetConnectors(value []Connectorable)() { + m.connectors = value +} +// SetHybridAgentUpdaterConfiguration sets the hybridAgentUpdaterConfiguration property value. Represents a hybridAgentUpdaterConfiguration object. +func (m *OnPremisesPublishingProfile) SetHybridAgentUpdaterConfiguration(value HybridAgentUpdaterConfigurationable)() { + m.hybridAgentUpdaterConfiguration = value +} +// SetIsDefaultAccessEnabled sets the isDefaultAccessEnabled property value. The isDefaultAccessEnabled property +func (m *OnPremisesPublishingProfile) SetIsDefaultAccessEnabled(value *bool)() { + m.isDefaultAccessEnabled = value +} +// SetIsEnabled sets the isEnabled property value. Represents if Azure AD Application Proxy is enabled for the tenant. +func (m *OnPremisesPublishingProfile) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetPublishedResources sets the publishedResources property value. List of existing publishedResource objects. Read-only. Nullable. +func (m *OnPremisesPublishingProfile) SetPublishedResources(value []PublishedResourceable)() { + m.publishedResources = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_response.go new file mode 100644 index 000000000..db18d13b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingProfileCollectionResponse +type OnPremisesPublishingProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnPremisesPublishingProfileable +} +// NewOnPremisesPublishingProfileCollectionResponse instantiates a new OnPremisesPublishingProfileCollectionResponse and sets the default values. +func NewOnPremisesPublishingProfileCollectionResponse()(*OnPremisesPublishingProfileCollectionResponse) { + m := &OnPremisesPublishingProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnPremisesPublishingProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesPublishingProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesPublishingProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesPublishingProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesPublishingProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesPublishingProfileable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesPublishingProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnPremisesPublishingProfileCollectionResponse) GetValue()([]OnPremisesPublishingProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnPremisesPublishingProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnPremisesPublishingProfileCollectionResponse) SetValue(value []OnPremisesPublishingProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_responseable.go new file mode 100644 index 000000000..2bf2d38de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingProfileCollectionResponseable +type OnPremisesPublishingProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnPremisesPublishingProfileable) + SetValue(value []OnPremisesPublishingProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_profileable.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profileable.go new file mode 100644 index 000000000..de63e202a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_profileable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingProfileable +type OnPremisesPublishingProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentGroups()([]OnPremisesAgentGroupable) + GetAgents()([]OnPremisesAgentable) + GetConnectorGroups()([]ConnectorGroupable) + GetConnectors()([]Connectorable) + GetHybridAgentUpdaterConfiguration()(HybridAgentUpdaterConfigurationable) + GetIsDefaultAccessEnabled()(*bool) + GetIsEnabled()(*bool) + GetPublishedResources()([]PublishedResourceable) + SetAgentGroups(value []OnPremisesAgentGroupable)() + SetAgents(value []OnPremisesAgentable)() + SetConnectorGroups(value []ConnectorGroupable)() + SetConnectors(value []Connectorable)() + SetHybridAgentUpdaterConfiguration(value HybridAgentUpdaterConfigurationable)() + SetIsDefaultAccessEnabled(value *bool)() + SetIsEnabled(value *bool)() + SetPublishedResources(value []PublishedResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_on.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_on.go new file mode 100644 index 000000000..aa3467e01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_on.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingSingleSignOn +type OnPremisesPublishingSingleSignOn 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 Kerberos Constrained Delegation settings for applications that use Integrated Window Authentication. + kerberosSignOnSettings KerberosSignOnSettingsable + // The OdataType property + odataType *string + // The preferred single-sign on mode for the application. Possible values are: none, onPremisesKerberos, aadHeaderBased,pingHeaderBased. + singleSignOnMode *SingleSignOnMode +} +// NewOnPremisesPublishingSingleSignOn instantiates a new onPremisesPublishingSingleSignOn and sets the default values. +func NewOnPremisesPublishingSingleSignOn()(*OnPremisesPublishingSingleSignOn) { + m := &OnPremisesPublishingSingleSignOn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnPremisesPublishingSingleSignOnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnPremisesPublishingSingleSignOnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnPremisesPublishingSingleSignOn(), 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 *OnPremisesPublishingSingleSignOn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnPremisesPublishingSingleSignOn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["kerberosSignOnSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateKerberosSignOnSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKerberosSignOnSettings(val.(KerberosSignOnSettingsable)) + } + 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["singleSignOnMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSingleSignOnMode) + if err != nil { + return err + } + if val != nil { + m.SetSingleSignOnMode(val.(*SingleSignOnMode)) + } + return nil + } + return res +} +// GetKerberosSignOnSettings gets the kerberosSignOnSettings property value. The Kerberos Constrained Delegation settings for applications that use Integrated Window Authentication. +func (m *OnPremisesPublishingSingleSignOn) GetKerberosSignOnSettings()(KerberosSignOnSettingsable) { + return m.kerberosSignOnSettings +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnPremisesPublishingSingleSignOn) GetOdataType()(*string) { + return m.odataType +} +// GetSingleSignOnMode gets the singleSignOnMode property value. The preferred single-sign on mode for the application. Possible values are: none, onPremisesKerberos, aadHeaderBased,pingHeaderBased. +func (m *OnPremisesPublishingSingleSignOn) GetSingleSignOnMode()(*SingleSignOnMode) { + return m.singleSignOnMode +} +// Serialize serializes information the current object +func (m *OnPremisesPublishingSingleSignOn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("kerberosSignOnSettings", m.GetKerberosSignOnSettings()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSingleSignOnMode() != nil { + cast := (*m.GetSingleSignOnMode()).String() + err := writer.WriteStringValue("singleSignOnMode", &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 *OnPremisesPublishingSingleSignOn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKerberosSignOnSettings sets the kerberosSignOnSettings property value. The Kerberos Constrained Delegation settings for applications that use Integrated Window Authentication. +func (m *OnPremisesPublishingSingleSignOn) SetKerberosSignOnSettings(value KerberosSignOnSettingsable)() { + m.kerberosSignOnSettings = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnPremisesPublishingSingleSignOn) SetOdataType(value *string)() { + m.odataType = value +} +// SetSingleSignOnMode sets the singleSignOnMode property value. The preferred single-sign on mode for the application. Possible values are: none, onPremisesKerberos, aadHeaderBased,pingHeaderBased. +func (m *OnPremisesPublishingSingleSignOn) SetSingleSignOnMode(value *SingleSignOnMode)() { + m.singleSignOnMode = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_onable.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_onable.go new file mode 100644 index 000000000..15ad9a112 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_single_sign_onable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingSingleSignOnable +type OnPremisesPublishingSingleSignOnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKerberosSignOnSettings()(KerberosSignOnSettingsable) + GetOdataType()(*string) + GetSingleSignOnMode()(*SingleSignOnMode) + SetKerberosSignOnSettings(value KerberosSignOnSettingsable)() + SetOdataType(value *string)() + SetSingleSignOnMode(value *SingleSignOnMode)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_premises_publishing_type.go b/src/internal/connector/graph/betasdk/models/on_premises_publishing_type.go new file mode 100644 index 000000000..5da4e1476 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishing_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnPremisesPublishingType int + +const ( + APPLICATIONPROXY_ONPREMISESPUBLISHINGTYPE OnPremisesPublishingType = iota + EXCHANGEONLINE_ONPREMISESPUBLISHINGTYPE + AUTHENTICATION_ONPREMISESPUBLISHINGTYPE + PROVISIONING_ONPREMISESPUBLISHINGTYPE + INTUNEPFX_ONPREMISESPUBLISHINGTYPE + OFLINEDOMAINJOIN_ONPREMISESPUBLISHINGTYPE + UNKNOWNFUTUREVALUE_ONPREMISESPUBLISHINGTYPE +) + +func (i OnPremisesPublishingType) String() string { + return []string{"applicationProxy", "exchangeOnline", "authentication", "provisioning", "intunePfx", "oflineDomainJoin", "unknownFutureValue"}[i] +} +func ParseOnPremisesPublishingType(v string) (interface{}, error) { + result := APPLICATIONPROXY_ONPREMISESPUBLISHINGTYPE + switch v { + case "applicationProxy": + result = APPLICATIONPROXY_ONPREMISESPUBLISHINGTYPE + case "exchangeOnline": + result = EXCHANGEONLINE_ONPREMISESPUBLISHINGTYPE + case "authentication": + result = AUTHENTICATION_ONPREMISESPUBLISHINGTYPE + case "provisioning": + result = PROVISIONING_ONPREMISESPUBLISHINGTYPE + case "intunePfx": + result = INTUNEPFX_ONPREMISESPUBLISHINGTYPE + case "oflineDomainJoin": + result = OFLINEDOMAINJOIN_ONPREMISESPUBLISHINGTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONPREMISESPUBLISHINGTYPE + default: + return 0, errors.New("Unknown OnPremisesPublishingType value: " + v) + } + return &result, nil +} +func SerializeOnPremisesPublishingType(values []OnPremisesPublishingType) []string { + 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/on_premises_publishingable.go b/src/internal/connector/graph/betasdk/models/on_premises_publishingable.go new file mode 100644 index 000000000..2ee7c629e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_premises_publishingable.go @@ -0,0 +1,55 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnPremisesPublishingable +type OnPremisesPublishingable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlternateUrl()(*string) + GetApplicationServerTimeout()(*string) + GetApplicationType()(*string) + GetExternalAuthenticationType()(*ExternalAuthenticationType) + GetExternalUrl()(*string) + GetInternalUrl()(*string) + GetIsBackendCertificateValidationEnabled()(*bool) + GetIsHttpOnlyCookieEnabled()(*bool) + GetIsOnPremPublishingEnabled()(*bool) + GetIsPersistentCookieEnabled()(*bool) + GetIsSecureCookieEnabled()(*bool) + GetIsStateSessionEnabled()(*bool) + GetIsTranslateHostHeaderEnabled()(*bool) + GetIsTranslateLinksInBodyEnabled()(*bool) + GetOdataType()(*string) + GetOnPremisesApplicationSegments()([]OnPremisesApplicationSegmentable) + GetSegmentsConfiguration()(SegmentConfigurationable) + GetSingleSignOnSettings()(OnPremisesPublishingSingleSignOnable) + GetUseAlternateUrlForTranslationAndRedirect()(*bool) + GetVerifiedCustomDomainCertificatesMetadata()(VerifiedCustomDomainCertificatesMetadataable) + GetVerifiedCustomDomainKeyCredential()(KeyCredentialable) + GetVerifiedCustomDomainPasswordCredential()(PasswordCredentialable) + SetAlternateUrl(value *string)() + SetApplicationServerTimeout(value *string)() + SetApplicationType(value *string)() + SetExternalAuthenticationType(value *ExternalAuthenticationType)() + SetExternalUrl(value *string)() + SetInternalUrl(value *string)() + SetIsBackendCertificateValidationEnabled(value *bool)() + SetIsHttpOnlyCookieEnabled(value *bool)() + SetIsOnPremPublishingEnabled(value *bool)() + SetIsPersistentCookieEnabled(value *bool)() + SetIsSecureCookieEnabled(value *bool)() + SetIsStateSessionEnabled(value *bool)() + SetIsTranslateHostHeaderEnabled(value *bool)() + SetIsTranslateLinksInBodyEnabled(value *bool)() + SetOdataType(value *string)() + SetOnPremisesApplicationSegments(value []OnPremisesApplicationSegmentable)() + SetSegmentsConfiguration(value SegmentConfigurationable)() + SetSingleSignOnSettings(value OnPremisesPublishingSingleSignOnable)() + SetUseAlternateUrlForTranslationAndRedirect(value *bool)() + SetVerifiedCustomDomainCertificatesMetadata(value VerifiedCustomDomainCertificatesMetadataable)() + SetVerifiedCustomDomainKeyCredential(value KeyCredentialable)() + SetVerifiedCustomDomainPasswordCredential(value PasswordCredentialable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension.go new file mode 100644 index 000000000..1bff972af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtension +type OnTokenIssuanceStartCustomExtension struct { + CustomAuthenticationExtension + // The claimsForTokenConfiguration property + claimsForTokenConfiguration []OnTokenIssuanceStartReturnClaimable +} +// NewOnTokenIssuanceStartCustomExtension instantiates a new OnTokenIssuanceStartCustomExtension and sets the default values. +func NewOnTokenIssuanceStartCustomExtension()(*OnTokenIssuanceStartCustomExtension) { + m := &OnTokenIssuanceStartCustomExtension{ + CustomAuthenticationExtension: *NewCustomAuthenticationExtension(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartCustomExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartCustomExtension(), nil +} +// GetClaimsForTokenConfiguration gets the claimsForTokenConfiguration property value. The claimsForTokenConfiguration property +func (m *OnTokenIssuanceStartCustomExtension) GetClaimsForTokenConfiguration()([]OnTokenIssuanceStartReturnClaimable) { + return m.claimsForTokenConfiguration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartCustomExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CustomAuthenticationExtension.GetFieldDeserializers() + res["claimsForTokenConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnTokenIssuanceStartReturnClaimable, len(val)) + for i, v := range val { + res[i] = v.(OnTokenIssuanceStartReturnClaimable) + } + m.SetClaimsForTokenConfiguration(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartCustomExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CustomAuthenticationExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetClaimsForTokenConfiguration() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClaimsForTokenConfiguration())) + for i, v := range m.GetClaimsForTokenConfiguration() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("claimsForTokenConfiguration", cast) + if err != nil { + return err + } + } + return nil +} +// SetClaimsForTokenConfiguration sets the claimsForTokenConfiguration property value. The claimsForTokenConfiguration property +func (m *OnTokenIssuanceStartCustomExtension) SetClaimsForTokenConfiguration(value []OnTokenIssuanceStartReturnClaimable)() { + m.claimsForTokenConfiguration = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_response.go new file mode 100644 index 000000000..a5da3243b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtensionCollectionResponse +type OnTokenIssuanceStartCustomExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnTokenIssuanceStartCustomExtensionable +} +// NewOnTokenIssuanceStartCustomExtensionCollectionResponse instantiates a new OnTokenIssuanceStartCustomExtensionCollectionResponse and sets the default values. +func NewOnTokenIssuanceStartCustomExtensionCollectionResponse()(*OnTokenIssuanceStartCustomExtensionCollectionResponse) { + m := &OnTokenIssuanceStartCustomExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnTokenIssuanceStartCustomExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartCustomExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartCustomExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartCustomExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnTokenIssuanceStartCustomExtensionable, len(val)) + for i, v := range val { + res[i] = v.(OnTokenIssuanceStartCustomExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnTokenIssuanceStartCustomExtensionCollectionResponse) GetValue()([]OnTokenIssuanceStartCustomExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartCustomExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnTokenIssuanceStartCustomExtensionCollectionResponse) SetValue(value []OnTokenIssuanceStartCustomExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_responseable.go new file mode 100644 index 000000000..a78f1cf12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtensionCollectionResponseable +type OnTokenIssuanceStartCustomExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnTokenIssuanceStartCustomExtensionable) + SetValue(value []OnTokenIssuanceStartCustomExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handler.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handler.go new file mode 100644 index 000000000..664f54f0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handler.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtensionHandler +type OnTokenIssuanceStartCustomExtensionHandler struct { + OnTokenIssuanceStartHandler + // The customExtension property + customExtension OnTokenIssuanceStartCustomExtensionable +} +// NewOnTokenIssuanceStartCustomExtensionHandler instantiates a new OnTokenIssuanceStartCustomExtensionHandler and sets the default values. +func NewOnTokenIssuanceStartCustomExtensionHandler()(*OnTokenIssuanceStartCustomExtensionHandler) { + m := &OnTokenIssuanceStartCustomExtensionHandler{ + OnTokenIssuanceStartHandler: *NewOnTokenIssuanceStartHandler(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartCustomExtensionHandler"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnTokenIssuanceStartCustomExtensionHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartCustomExtensionHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartCustomExtensionHandler(), nil +} +// GetCustomExtension gets the customExtension property value. The customExtension property +func (m *OnTokenIssuanceStartCustomExtensionHandler) GetCustomExtension()(OnTokenIssuanceStartCustomExtensionable) { + return m.customExtension +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartCustomExtensionHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnTokenIssuanceStartHandler.GetFieldDeserializers() + res["customExtension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnTokenIssuanceStartCustomExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomExtension(val.(OnTokenIssuanceStartCustomExtensionable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartCustomExtensionHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnTokenIssuanceStartHandler.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("customExtension", m.GetCustomExtension()) + if err != nil { + return err + } + } + return nil +} +// SetCustomExtension sets the customExtension property value. The customExtension property +func (m *OnTokenIssuanceStartCustomExtensionHandler) SetCustomExtension(value OnTokenIssuanceStartCustomExtensionable)() { + m.customExtension = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handlerable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handlerable.go new file mode 100644 index 000000000..6640711df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extension_handlerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtensionHandlerable +type OnTokenIssuanceStartCustomExtensionHandlerable interface { + OnTokenIssuanceStartHandlerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomExtension()(OnTokenIssuanceStartCustomExtensionable) + SetCustomExtension(value OnTokenIssuanceStartCustomExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extensionable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extensionable.go new file mode 100644 index 000000000..662b96db6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_custom_extensionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartCustomExtensionable +type OnTokenIssuanceStartCustomExtensionable interface { + CustomAuthenticationExtensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClaimsForTokenConfiguration()([]OnTokenIssuanceStartReturnClaimable) + SetClaimsForTokenConfiguration(value []OnTokenIssuanceStartReturnClaimable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handler.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handler.go new file mode 100644 index 000000000..ae7ab9340 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handler.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartHandler +type OnTokenIssuanceStartHandler 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 OdataType property + odataType *string +} +// NewOnTokenIssuanceStartHandler instantiates a new onTokenIssuanceStartHandler and sets the default values. +func NewOnTokenIssuanceStartHandler()(*OnTokenIssuanceStartHandler) { + m := &OnTokenIssuanceStartHandler{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.onTokenIssuanceStartCustomExtensionHandler": + return NewOnTokenIssuanceStartCustomExtensionHandler(), nil + } + } + } + } + return NewOnTokenIssuanceStartHandler(), 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 *OnTokenIssuanceStartHandler) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartHandler) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartHandler) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartHandler) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OnTokenIssuanceStartHandler) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartHandler) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handlerable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handlerable.go new file mode 100644 index 000000000..a0e6c9218 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_handlerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartHandlerable +type OnTokenIssuanceStartHandlerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener.go new file mode 100644 index 000000000..2e6553299 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartListener +type OnTokenIssuanceStartListener struct { + AuthenticationEventListener + // The handler property + handler OnTokenIssuanceStartHandlerable +} +// NewOnTokenIssuanceStartListener instantiates a new OnTokenIssuanceStartListener and sets the default values. +func NewOnTokenIssuanceStartListener()(*OnTokenIssuanceStartListener) { + m := &OnTokenIssuanceStartListener{ + AuthenticationEventListener: *NewAuthenticationEventListener(), + } + odataTypeValue := "#microsoft.graph.onTokenIssuanceStartListener"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnTokenIssuanceStartListenerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartListenerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartListener(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartListener) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationEventListener.GetFieldDeserializers() + res["handler"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnTokenIssuanceStartHandlerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetHandler(val.(OnTokenIssuanceStartHandlerable)) + } + return nil + } + return res +} +// GetHandler gets the handler property value. The handler property +func (m *OnTokenIssuanceStartListener) GetHandler()(OnTokenIssuanceStartHandlerable) { + return m.handler +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartListener) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationEventListener.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("handler", m.GetHandler()) + if err != nil { + return err + } + } + return nil +} +// SetHandler sets the handler property value. The handler property +func (m *OnTokenIssuanceStartListener) SetHandler(value OnTokenIssuanceStartHandlerable)() { + m.handler = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_response.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_response.go new file mode 100644 index 000000000..3759b4584 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartListenerCollectionResponse +type OnTokenIssuanceStartListenerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnTokenIssuanceStartListenerable +} +// NewOnTokenIssuanceStartListenerCollectionResponse instantiates a new OnTokenIssuanceStartListenerCollectionResponse and sets the default values. +func NewOnTokenIssuanceStartListenerCollectionResponse()(*OnTokenIssuanceStartListenerCollectionResponse) { + m := &OnTokenIssuanceStartListenerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnTokenIssuanceStartListenerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartListenerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartListenerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartListenerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnTokenIssuanceStartListenerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnTokenIssuanceStartListenerable, len(val)) + for i, v := range val { + res[i] = v.(OnTokenIssuanceStartListenerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnTokenIssuanceStartListenerCollectionResponse) GetValue()([]OnTokenIssuanceStartListenerable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartListenerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnTokenIssuanceStartListenerCollectionResponse) SetValue(value []OnTokenIssuanceStartListenerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_responseable.go new file mode 100644 index 000000000..1d76537a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listener_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartListenerCollectionResponseable +type OnTokenIssuanceStartListenerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnTokenIssuanceStartListenerable) + SetValue(value []OnTokenIssuanceStartListenerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listenerable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listenerable.go new file mode 100644 index 000000000..a6afb4274 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_listenerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartListenerable +type OnTokenIssuanceStartListenerable interface { + AuthenticationEventListenerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHandler()(OnTokenIssuanceStartHandlerable) + SetHandler(value OnTokenIssuanceStartHandlerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim.go new file mode 100644 index 000000000..574417d1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartReturnClaim +type OnTokenIssuanceStartReturnClaim 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 claimIdInApiResponse property + claimIdInApiResponse *string + // The OdataType property + odataType *string +} +// NewOnTokenIssuanceStartReturnClaim instantiates a new onTokenIssuanceStartReturnClaim and sets the default values. +func NewOnTokenIssuanceStartReturnClaim()(*OnTokenIssuanceStartReturnClaim) { + m := &OnTokenIssuanceStartReturnClaim{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartReturnClaim(), 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 *OnTokenIssuanceStartReturnClaim) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetClaimIdInApiResponse gets the claimIdInApiResponse property value. The claimIdInApiResponse property +func (m *OnTokenIssuanceStartReturnClaim) GetClaimIdInApiResponse()(*string) { + return m.claimIdInApiResponse +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartReturnClaim) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["claimIdInApiResponse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClaimIdInApiResponse(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartReturnClaim) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartReturnClaim) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("claimIdInApiResponse", m.GetClaimIdInApiResponse()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OnTokenIssuanceStartReturnClaim) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetClaimIdInApiResponse sets the claimIdInApiResponse property value. The claimIdInApiResponse property +func (m *OnTokenIssuanceStartReturnClaim) SetClaimIdInApiResponse(value *string)() { + m.claimIdInApiResponse = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnTokenIssuanceStartReturnClaim) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_response.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_response.go new file mode 100644 index 000000000..a1a361b86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartReturnClaimCollectionResponse +type OnTokenIssuanceStartReturnClaimCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnTokenIssuanceStartReturnClaimable +} +// NewOnTokenIssuanceStartReturnClaimCollectionResponse instantiates a new OnTokenIssuanceStartReturnClaimCollectionResponse and sets the default values. +func NewOnTokenIssuanceStartReturnClaimCollectionResponse()(*OnTokenIssuanceStartReturnClaimCollectionResponse) { + m := &OnTokenIssuanceStartReturnClaimCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnTokenIssuanceStartReturnClaimCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnTokenIssuanceStartReturnClaimCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnTokenIssuanceStartReturnClaimCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnTokenIssuanceStartReturnClaimCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnTokenIssuanceStartReturnClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnTokenIssuanceStartReturnClaimable, len(val)) + for i, v := range val { + res[i] = v.(OnTokenIssuanceStartReturnClaimable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnTokenIssuanceStartReturnClaimCollectionResponse) GetValue()([]OnTokenIssuanceStartReturnClaimable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnTokenIssuanceStartReturnClaimCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnTokenIssuanceStartReturnClaimCollectionResponse) SetValue(value []OnTokenIssuanceStartReturnClaimable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_responseable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_responseable.go new file mode 100644 index 000000000..40a5eb33e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claim_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartReturnClaimCollectionResponseable +type OnTokenIssuanceStartReturnClaimCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnTokenIssuanceStartReturnClaimable) + SetValue(value []OnTokenIssuanceStartReturnClaimable)() +} diff --git a/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claimable.go b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claimable.go new file mode 100644 index 000000000..3241eec1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/on_token_issuance_start_return_claimable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnTokenIssuanceStartReturnClaimable +type OnTokenIssuanceStartReturnClaimable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClaimIdInApiResponse()(*string) + GetOdataType()(*string) + SetClaimIdInApiResponse(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onboarding_status.go b/src/internal/connector/graph/betasdk/models/onboarding_status.go new file mode 100644 index 000000000..62599f8a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onboarding_status.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnboardingStatus int + +const ( + // Unknown + UNKNOWN_ONBOARDINGSTATUS OnboardingStatus = iota + // In progress + INPROGRESS_ONBOARDINGSTATUS + // Onboarded + ONBOARDED_ONBOARDINGSTATUS + // Failed + FAILED_ONBOARDINGSTATUS + // Offboarding + OFFBOARDING_ONBOARDINGSTATUS + // UnknownFutureValue + UNKNOWNFUTUREVALUE_ONBOARDINGSTATUS +) + +func (i OnboardingStatus) String() string { + return []string{"unknown", "inprogress", "onboarded", "failed", "offboarding", "unknownFutureValue"}[i] +} +func ParseOnboardingStatus(v string) (interface{}, error) { + result := UNKNOWN_ONBOARDINGSTATUS + switch v { + case "unknown": + result = UNKNOWN_ONBOARDINGSTATUS + case "inprogress": + result = INPROGRESS_ONBOARDINGSTATUS + case "onboarded": + result = ONBOARDED_ONBOARDINGSTATUS + case "failed": + result = FAILED_ONBOARDINGSTATUS + case "offboarding": + result = OFFBOARDING_ONBOARDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONBOARDINGSTATUS + default: + return 0, errors.New("Unknown OnboardingStatus value: " + v) + } + return &result, nil +} +func SerializeOnboardingStatus(values []OnboardingStatus) []string { + 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/onenote.go b/src/internal/connector/graph/betasdk/models/onenote.go new file mode 100644 index 000000000..377ad789f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote.go @@ -0,0 +1,238 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Onenote +type Onenote struct { + Entity + // The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable. + notebooks []Notebookable + // The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. + operations []OnenoteOperationable + // The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. + pages []OnenotePageable + // The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. + resources []OnenoteResourceable + // The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. + sectionGroups []SectionGroupable + // The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. + sections []OnenoteSectionable +} +// NewOnenote instantiates a new onenote and sets the default values. +func NewOnenote()(*Onenote) { + m := &Onenote{ + Entity: *NewEntity(), + } + return m +} +// CreateOnenoteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenote(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Onenote) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["notebooks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateNotebookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Notebookable, len(val)) + for i, v := range val { + res[i] = v.(Notebookable) + } + m.SetNotebooks(res) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteOperationable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteOperationable) + } + m.SetOperations(res) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenotePageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenotePageable, len(val)) + for i, v := range val { + res[i] = v.(OnenotePageable) + } + m.SetPages(res) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteResourceable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteResourceable) + } + m.SetResources(res) + } + return nil + } + res["sectionGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SectionGroupable, len(val)) + for i, v := range val { + res[i] = v.(SectionGroupable) + } + m.SetSectionGroups(res) + } + return nil + } + res["sections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteSectionable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteSectionable) + } + m.SetSections(res) + } + return nil + } + return res +} +// GetNotebooks gets the notebooks property value. The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) GetNotebooks()([]Notebookable) { + return m.notebooks +} +// GetOperations gets the operations property value. The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. +func (m *Onenote) GetOperations()([]OnenoteOperationable) { + return m.operations +} +// GetPages gets the pages property value. The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) GetPages()([]OnenotePageable) { + return m.pages +} +// GetResources gets the resources property value. The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. +func (m *Onenote) GetResources()([]OnenoteResourceable) { + return m.resources +} +// GetSectionGroups gets the sectionGroups property value. The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) GetSectionGroups()([]SectionGroupable) { + return m.sectionGroups +} +// GetSections gets the sections property value. The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) GetSections()([]OnenoteSectionable) { + return m.sections +} +// Serialize serializes information the current object +func (m *Onenote) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetNotebooks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotebooks())) + for i, v := range m.GetNotebooks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("notebooks", cast) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetPages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPages())) + for i, v := range m.GetPages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("pages", cast) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + if m.GetSectionGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSectionGroups())) + for i, v := range m.GetSectionGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sectionGroups", cast) + if err != nil { + return err + } + } + if m.GetSections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSections())) + for i, v := range m.GetSections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sections", cast) + if err != nil { + return err + } + } + return nil +} +// SetNotebooks sets the notebooks property value. The collection of OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) SetNotebooks(value []Notebookable)() { + m.notebooks = value +} +// SetOperations sets the operations property value. The status of OneNote operations. Getting an operations collection is not supported, but you can get the status of long-running operations if the Operation-Location header is returned in the response. Read-only. Nullable. +func (m *Onenote) SetOperations(value []OnenoteOperationable)() { + m.operations = value +} +// SetPages sets the pages property value. The pages in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) SetPages(value []OnenotePageable)() { + m.pages = value +} +// SetResources sets the resources property value. The image and other file resources in OneNote pages. Getting a resources collection is not supported, but you can get the binary content of a specific resource. Read-only. Nullable. +func (m *Onenote) SetResources(value []OnenoteResourceable)() { + m.resources = value +} +// SetSectionGroups sets the sectionGroups property value. The section groups in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) SetSectionGroups(value []SectionGroupable)() { + m.sectionGroups = value +} +// SetSections sets the sections property value. The sections in all OneNote notebooks that are owned by the user or group. Read-only. Nullable. +func (m *Onenote) SetSections(value []OnenoteSectionable)() { + m.sections = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_base_model.go b/src/internal/connector/graph/betasdk/models/onenote_entity_base_model.go new file mode 100644 index 000000000..16a714dfd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_base_model.go @@ -0,0 +1,90 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntityBaseModel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnenoteEntityBaseModel struct { + Entity + // The self property + self *string +} +// NewOnenoteEntityBaseModel instantiates a new onenoteEntityBaseModel and sets the default values. +func NewOnenoteEntityBaseModel()(*OnenoteEntityBaseModel) { + m := &OnenoteEntityBaseModel{ + Entity: *NewEntity(), + } + return m +} +// CreateOnenoteEntityBaseModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteEntityBaseModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.notebook": + return NewNotebook(), nil + case "#microsoft.graph.onenoteEntityHierarchyModel": + return NewOnenoteEntityHierarchyModel(), nil + case "#microsoft.graph.onenoteEntitySchemaObjectModel": + return NewOnenoteEntitySchemaObjectModel(), nil + case "#microsoft.graph.onenotePage": + return NewOnenotePage(), nil + case "#microsoft.graph.onenoteResource": + return NewOnenoteResource(), nil + case "#microsoft.graph.onenoteSection": + return NewOnenoteSection(), nil + case "#microsoft.graph.sectionGroup": + return NewSectionGroup(), nil + } + } + } + } + return NewOnenoteEntityBaseModel(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteEntityBaseModel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["self"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSelf(val) + } + return nil + } + return res +} +// GetSelf gets the self property value. The self property +func (m *OnenoteEntityBaseModel) GetSelf()(*string) { + return m.self +} +// Serialize serializes information the current object +func (m *OnenoteEntityBaseModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("self", m.GetSelf()) + if err != nil { + return err + } + } + return nil +} +// SetSelf sets the self property value. The self property +func (m *OnenoteEntityBaseModel) SetSelf(value *string)() { + m.self = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_base_modelable.go b/src/internal/connector/graph/betasdk/models/onenote_entity_base_modelable.go new file mode 100644 index 000000000..4daeb8f9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_base_modelable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntityBaseModelable +type OnenoteEntityBaseModelable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSelf()(*string) + SetSelf(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_model.go b/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_model.go new file mode 100644 index 000000000..9307d54a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_model.go @@ -0,0 +1,163 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntityHierarchyModel +type OnenoteEntityHierarchyModel struct { + OnenoteEntitySchemaObjectModel + // The createdBy property + createdBy IdentitySetable + // The displayName property + displayName *string + // The lastModifiedBy property + lastModifiedBy IdentitySetable + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOnenoteEntityHierarchyModel instantiates a new OnenoteEntityHierarchyModel and sets the default values. +func NewOnenoteEntityHierarchyModel()(*OnenoteEntityHierarchyModel) { + m := &OnenoteEntityHierarchyModel{ + OnenoteEntitySchemaObjectModel: *NewOnenoteEntitySchemaObjectModel(), + } + odataTypeValue := "#microsoft.graph.onenoteEntityHierarchyModel"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnenoteEntityHierarchyModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteEntityHierarchyModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.notebook": + return NewNotebook(), nil + case "#microsoft.graph.onenoteSection": + return NewOnenoteSection(), nil + case "#microsoft.graph.sectionGroup": + return NewSectionGroup(), nil + } + } + } + } + return NewOnenoteEntityHierarchyModel(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *OnenoteEntityHierarchyModel) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *OnenoteEntityHierarchyModel) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteEntityHierarchyModel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntitySchemaObjectModel.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *OnenoteEntityHierarchyModel) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *OnenoteEntityHierarchyModel) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *OnenoteEntityHierarchyModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntitySchemaObjectModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *OnenoteEntityHierarchyModel) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *OnenoteEntityHierarchyModel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *OnenoteEntityHierarchyModel) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *OnenoteEntityHierarchyModel) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_modelable.go b/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_modelable.go new file mode 100644 index 000000000..257377203 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_hierarchy_modelable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntityHierarchyModelable +type OnenoteEntityHierarchyModelable interface { + OnenoteEntitySchemaObjectModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetDisplayName()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedBy(value IdentitySetable)() + SetDisplayName(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_model.go b/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_model.go new file mode 100644 index 000000000..6e147227d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_model.go @@ -0,0 +1,89 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntitySchemaObjectModel +type OnenoteEntitySchemaObjectModel struct { + OnenoteEntityBaseModel + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOnenoteEntitySchemaObjectModel instantiates a new OnenoteEntitySchemaObjectModel and sets the default values. +func NewOnenoteEntitySchemaObjectModel()(*OnenoteEntitySchemaObjectModel) { + m := &OnenoteEntitySchemaObjectModel{ + OnenoteEntityBaseModel: *NewOnenoteEntityBaseModel(), + } + odataTypeValue := "#microsoft.graph.onenoteEntitySchemaObjectModel"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnenoteEntitySchemaObjectModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteEntitySchemaObjectModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.notebook": + return NewNotebook(), nil + case "#microsoft.graph.onenoteEntityHierarchyModel": + return NewOnenoteEntityHierarchyModel(), nil + case "#microsoft.graph.onenotePage": + return NewOnenotePage(), nil + case "#microsoft.graph.onenoteSection": + return NewOnenoteSection(), nil + case "#microsoft.graph.sectionGroup": + return NewSectionGroup(), nil + } + } + } + } + return NewOnenoteEntitySchemaObjectModel(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *OnenoteEntitySchemaObjectModel) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteEntitySchemaObjectModel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntityBaseModel.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnenoteEntitySchemaObjectModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntityBaseModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *OnenoteEntitySchemaObjectModel) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_modelable.go b/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_modelable.go new file mode 100644 index 000000000..0d0ef7954 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_entity_schema_object_modelable.go @@ -0,0 +1,14 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteEntitySchemaObjectModelable +type OnenoteEntitySchemaObjectModelable interface { + OnenoteEntityBaseModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operation.go b/src/internal/connector/graph/betasdk/models/onenote_operation.go new file mode 100644 index 000000000..bd9b1ed7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operation.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperation +type OnenoteOperation struct { + Operation + // The error returned by the operation. + error OnenoteOperationErrorable + // The operation percent complete if the operation is still in running status. + percentComplete *string + // The resource id. + resourceId *string + // The resource URI for the object. For example, the resource URI for a copied page or section. + resourceLocation *string +} +// NewOnenoteOperation instantiates a new OnenoteOperation and sets the default values. +func NewOnenoteOperation()(*OnenoteOperation) { + m := &OnenoteOperation{ + Operation: *NewOperation(), + } + return m +} +// CreateOnenoteOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteOperation(), nil +} +// GetError gets the error property value. The error returned by the operation. +func (m *OnenoteOperation) GetError()(OnenoteOperationErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Operation.GetFieldDeserializers() + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnenoteOperationErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(OnenoteOperationErrorable)) + } + return nil + } + res["percentComplete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPercentComplete(val) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["resourceLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceLocation(val) + } + return nil + } + return res +} +// GetPercentComplete gets the percentComplete property value. The operation percent complete if the operation is still in running status. +func (m *OnenoteOperation) GetPercentComplete()(*string) { + return m.percentComplete +} +// GetResourceId gets the resourceId property value. The resource id. +func (m *OnenoteOperation) GetResourceId()(*string) { + return m.resourceId +} +// GetResourceLocation gets the resourceLocation property value. The resource URI for the object. For example, the resource URI for a copied page or section. +func (m *OnenoteOperation) GetResourceLocation()(*string) { + return m.resourceLocation +} +// Serialize serializes information the current object +func (m *OnenoteOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Operation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("percentComplete", m.GetPercentComplete()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceLocation", m.GetResourceLocation()) + if err != nil { + return err + } + } + return nil +} +// SetError sets the error property value. The error returned by the operation. +func (m *OnenoteOperation) SetError(value OnenoteOperationErrorable)() { + m.error = value +} +// SetPercentComplete sets the percentComplete property value. The operation percent complete if the operation is still in running status. +func (m *OnenoteOperation) SetPercentComplete(value *string)() { + m.percentComplete = value +} +// SetResourceId sets the resourceId property value. The resource id. +func (m *OnenoteOperation) SetResourceId(value *string)() { + m.resourceId = value +} +// SetResourceLocation sets the resourceLocation property value. The resource URI for the object. For example, the resource URI for a copied page or section. +func (m *OnenoteOperation) SetResourceLocation(value *string)() { + m.resourceLocation = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/onenote_operation_collection_response.go new file mode 100644 index 000000000..3fccb1f9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperationCollectionResponse +type OnenoteOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnenoteOperationable +} +// NewOnenoteOperationCollectionResponse instantiates a new OnenoteOperationCollectionResponse and sets the default values. +func NewOnenoteOperationCollectionResponse()(*OnenoteOperationCollectionResponse) { + m := &OnenoteOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnenoteOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteOperationable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnenoteOperationCollectionResponse) GetValue()([]OnenoteOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnenoteOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnenoteOperationCollectionResponse) SetValue(value []OnenoteOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/onenote_operation_collection_responseable.go new file mode 100644 index 000000000..85bb28738 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperationCollectionResponseable +type OnenoteOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnenoteOperationable) + SetValue(value []OnenoteOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operation_error.go b/src/internal/connector/graph/betasdk/models/onenote_operation_error.go new file mode 100644 index 000000000..ed5b044a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operation_error.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperationError +type OnenoteOperationError 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 error code. + code *string + // The error message. + message *string + // The OdataType property + odataType *string +} +// NewOnenoteOperationError instantiates a new onenoteOperationError and sets the default values. +func NewOnenoteOperationError()(*OnenoteOperationError) { + m := &OnenoteOperationError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnenoteOperationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteOperationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteOperationError(), 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 *OnenoteOperationError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The error code. +func (m *OnenoteOperationError) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteOperationError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. The error message. +func (m *OnenoteOperationError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnenoteOperationError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OnenoteOperationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OnenoteOperationError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The error code. +func (m *OnenoteOperationError) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The error message. +func (m *OnenoteOperationError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnenoteOperationError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operation_errorable.go b/src/internal/connector/graph/betasdk/models/onenote_operation_errorable.go new file mode 100644 index 000000000..99569ec25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operation_errorable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperationErrorable +type OnenoteOperationErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_operationable.go b/src/internal/connector/graph/betasdk/models/onenote_operationable.go new file mode 100644 index 000000000..b20797d1d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_operationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteOperationable +type OnenoteOperationable interface { + Operationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(OnenoteOperationErrorable) + GetPercentComplete()(*string) + GetResourceId()(*string) + GetResourceLocation()(*string) + SetError(value OnenoteOperationErrorable)() + SetPercentComplete(value *string)() + SetResourceId(value *string)() + SetResourceLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page.go b/src/internal/connector/graph/betasdk/models/onenote_page.go new file mode 100644 index 000000000..9bd6bce39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page.go @@ -0,0 +1,327 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnenotePage struct { + OnenoteEntitySchemaObjectModel + // The page's HTML content. + content []byte + // The URL for the page's HTML content. Read-only. + contentUrl *string + // The unique identifier of the application that created the page. Read-only. + createdByAppId *string + // The date and time when the page was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The indentation level of the page. Read-only. + level *int32 + // Links for opening the page. The oneNoteClientURL link opens the page in the OneNote native client if it 's installed. The oneNoteWebUrl link opens the page in OneNote on the web. Read-only. + links PageLinksable + // The order of the page within its parent section. Read-only. + order *int32 + // The notebook that contains the page. Read-only. + parentNotebook Notebookable + // The section that contains the page. Read-only. + parentSection OnenoteSectionable + // The title of the page. + title *string + // The userTags property + userTags []string +} +// NewOnenotePage instantiates a new onenotePage and sets the default values. +func NewOnenotePage()(*OnenotePage) { + m := &OnenotePage{ + OnenoteEntitySchemaObjectModel: *NewOnenoteEntitySchemaObjectModel(), + } + odataTypeValue := "#microsoft.graph.onenotePage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnenotePageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenotePageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenotePage(), nil +} +// GetContent gets the content property value. The page's HTML content. +func (m *OnenotePage) GetContent()([]byte) { + return m.content +} +// GetContentUrl gets the contentUrl property value. The URL for the page's HTML content. Read-only. +func (m *OnenotePage) GetContentUrl()(*string) { + return m.contentUrl +} +// GetCreatedByAppId gets the createdByAppId property value. The unique identifier of the application that created the page. Read-only. +func (m *OnenotePage) GetCreatedByAppId()(*string) { + return m.createdByAppId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenotePage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntitySchemaObjectModel.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentUrl(val) + } + return nil + } + res["createdByAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByAppId(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["level"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLevel(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePageLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(PageLinksable)) + } + return nil + } + res["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrder(val) + } + return nil + } + res["parentNotebook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNotebookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentNotebook(val.(Notebookable)) + } + return nil + } + res["parentSection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnenoteSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentSection(val.(OnenoteSectionable)) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["userTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUserTags(res) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the page was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *OnenotePage) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLevel gets the level property value. The indentation level of the page. Read-only. +func (m *OnenotePage) GetLevel()(*int32) { + return m.level +} +// GetLinks gets the links property value. Links for opening the page. The oneNoteClientURL link opens the page in the OneNote native client if it 's installed. The oneNoteWebUrl link opens the page in OneNote on the web. Read-only. +func (m *OnenotePage) GetLinks()(PageLinksable) { + return m.links +} +// GetOrder gets the order property value. The order of the page within its parent section. Read-only. +func (m *OnenotePage) GetOrder()(*int32) { + return m.order +} +// GetParentNotebook gets the parentNotebook property value. The notebook that contains the page. Read-only. +func (m *OnenotePage) GetParentNotebook()(Notebookable) { + return m.parentNotebook +} +// GetParentSection gets the parentSection property value. The section that contains the page. Read-only. +func (m *OnenotePage) GetParentSection()(OnenoteSectionable) { + return m.parentSection +} +// GetTitle gets the title property value. The title of the page. +func (m *OnenotePage) GetTitle()(*string) { + return m.title +} +// GetUserTags gets the userTags property value. The userTags property +func (m *OnenotePage) GetUserTags()([]string) { + return m.userTags +} +// Serialize serializes information the current object +func (m *OnenotePage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntitySchemaObjectModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentUrl", m.GetContentUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdByAppId", m.GetCreatedByAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("level", m.GetLevel()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("order", m.GetOrder()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentNotebook", m.GetParentNotebook()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentSection", m.GetParentSection()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + if m.GetUserTags() != nil { + err = writer.WriteCollectionOfStringValues("userTags", m.GetUserTags()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The page's HTML content. +func (m *OnenotePage) SetContent(value []byte)() { + m.content = value +} +// SetContentUrl sets the contentUrl property value. The URL for the page's HTML content. Read-only. +func (m *OnenotePage) SetContentUrl(value *string)() { + m.contentUrl = value +} +// SetCreatedByAppId sets the createdByAppId property value. The unique identifier of the application that created the page. Read-only. +func (m *OnenotePage) SetCreatedByAppId(value *string)() { + m.createdByAppId = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the page was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *OnenotePage) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLevel sets the level property value. The indentation level of the page. Read-only. +func (m *OnenotePage) SetLevel(value *int32)() { + m.level = value +} +// SetLinks sets the links property value. Links for opening the page. The oneNoteClientURL link opens the page in the OneNote native client if it 's installed. The oneNoteWebUrl link opens the page in OneNote on the web. Read-only. +func (m *OnenotePage) SetLinks(value PageLinksable)() { + m.links = value +} +// SetOrder sets the order property value. The order of the page within its parent section. Read-only. +func (m *OnenotePage) SetOrder(value *int32)() { + m.order = value +} +// SetParentNotebook sets the parentNotebook property value. The notebook that contains the page. Read-only. +func (m *OnenotePage) SetParentNotebook(value Notebookable)() { + m.parentNotebook = value +} +// SetParentSection sets the parentSection property value. The section that contains the page. Read-only. +func (m *OnenotePage) SetParentSection(value OnenoteSectionable)() { + m.parentSection = value +} +// SetTitle sets the title property value. The title of the page. +func (m *OnenotePage) SetTitle(value *string)() { + m.title = value +} +// SetUserTags sets the userTags property value. The userTags property +func (m *OnenotePage) SetUserTags(value []string)() { + m.userTags = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_collection_response.go b/src/internal/connector/graph/betasdk/models/onenote_page_collection_response.go new file mode 100644 index 000000000..e364031a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePageCollectionResponse +type OnenotePageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnenotePageable +} +// NewOnenotePageCollectionResponse instantiates a new OnenotePageCollectionResponse and sets the default values. +func NewOnenotePageCollectionResponse()(*OnenotePageCollectionResponse) { + m := &OnenotePageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnenotePageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenotePageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenotePageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenotePageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenotePageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenotePageable, len(val)) + for i, v := range val { + res[i] = v.(OnenotePageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnenotePageCollectionResponse) GetValue()([]OnenotePageable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnenotePageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnenotePageCollectionResponse) SetValue(value []OnenotePageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_collection_responseable.go b/src/internal/connector/graph/betasdk/models/onenote_page_collection_responseable.go new file mode 100644 index 000000000..a46a04338 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePageCollectionResponseable +type OnenotePageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnenotePageable) + SetValue(value []OnenotePageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_preview.go b/src/internal/connector/graph/betasdk/models/onenote_page_preview.go new file mode 100644 index 000000000..ecf2ef681 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_preview.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePagePreview +type OnenotePagePreview 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 links property + links OnenotePagePreviewLinksable + // The OdataType property + odataType *string + // The previewText property + previewText *string +} +// NewOnenotePagePreview instantiates a new onenotePagePreview and sets the default values. +func NewOnenotePagePreview()(*OnenotePagePreview) { + m := &OnenotePagePreview{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnenotePagePreviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenotePagePreviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenotePagePreview(), 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 *OnenotePagePreview) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenotePagePreview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnenotePagePreviewLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(OnenotePagePreviewLinksable)) + } + 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["previewText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviewText(val) + } + return nil + } + return res +} +// GetLinks gets the links property value. The links property +func (m *OnenotePagePreview) GetLinks()(OnenotePagePreviewLinksable) { + return m.links +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnenotePagePreview) GetOdataType()(*string) { + return m.odataType +} +// GetPreviewText gets the previewText property value. The previewText property +func (m *OnenotePagePreview) GetPreviewText()(*string) { + return m.previewText +} +// Serialize serializes information the current object +func (m *OnenotePagePreview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previewText", m.GetPreviewText()) + 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 *OnenotePagePreview) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLinks sets the links property value. The links property +func (m *OnenotePagePreview) SetLinks(value OnenotePagePreviewLinksable)() { + m.links = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnenotePagePreview) SetOdataType(value *string)() { + m.odataType = value +} +// SetPreviewText sets the previewText property value. The previewText property +func (m *OnenotePagePreview) SetPreviewText(value *string)() { + m.previewText = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_preview_links.go b/src/internal/connector/graph/betasdk/models/onenote_page_preview_links.go new file mode 100644 index 000000000..34a03ee19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_preview_links.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePagePreviewLinks +type OnenotePagePreviewLinks 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 OdataType property + odataType *string + // The previewImageUrl property + previewImageUrl ExternalLinkable +} +// NewOnenotePagePreviewLinks instantiates a new onenotePagePreviewLinks and sets the default values. +func NewOnenotePagePreviewLinks()(*OnenotePagePreviewLinks) { + m := &OnenotePagePreviewLinks{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnenotePagePreviewLinksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenotePagePreviewLinksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenotePagePreviewLinks(), 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 *OnenotePagePreviewLinks) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenotePagePreviewLinks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["previewImageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPreviewImageUrl(val.(ExternalLinkable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnenotePagePreviewLinks) GetOdataType()(*string) { + return m.odataType +} +// GetPreviewImageUrl gets the previewImageUrl property value. The previewImageUrl property +func (m *OnenotePagePreviewLinks) GetPreviewImageUrl()(ExternalLinkable) { + return m.previewImageUrl +} +// Serialize serializes information the current object +func (m *OnenotePagePreviewLinks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("previewImageUrl", m.GetPreviewImageUrl()) + 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 *OnenotePagePreviewLinks) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnenotePagePreviewLinks) SetOdataType(value *string)() { + m.odataType = value +} +// SetPreviewImageUrl sets the previewImageUrl property value. The previewImageUrl property +func (m *OnenotePagePreviewLinks) SetPreviewImageUrl(value ExternalLinkable)() { + m.previewImageUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_preview_linksable.go b/src/internal/connector/graph/betasdk/models/onenote_page_preview_linksable.go new file mode 100644 index 000000000..a0e0ade63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_preview_linksable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePagePreviewLinksable +type OnenotePagePreviewLinksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPreviewImageUrl()(ExternalLinkable) + SetOdataType(value *string)() + SetPreviewImageUrl(value ExternalLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_page_previewable.go b/src/internal/connector/graph/betasdk/models/onenote_page_previewable.go new file mode 100644 index 000000000..00f531b99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_page_previewable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePagePreviewable +type OnenotePagePreviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLinks()(OnenotePagePreviewLinksable) + GetOdataType()(*string) + GetPreviewText()(*string) + SetLinks(value OnenotePagePreviewLinksable)() + SetOdataType(value *string)() + SetPreviewText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_pageable.go b/src/internal/connector/graph/betasdk/models/onenote_pageable.go new file mode 100644 index 000000000..acff2bac6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_pageable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePageable +type OnenotePageable interface { + OnenoteEntitySchemaObjectModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetContentUrl()(*string) + GetCreatedByAppId()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLevel()(*int32) + GetLinks()(PageLinksable) + GetOrder()(*int32) + GetParentNotebook()(Notebookable) + GetParentSection()(OnenoteSectionable) + GetTitle()(*string) + GetUserTags()([]string) + SetContent(value []byte)() + SetContentUrl(value *string)() + SetCreatedByAppId(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLevel(value *int32)() + SetLinks(value PageLinksable)() + SetOrder(value *int32)() + SetParentNotebook(value Notebookable)() + SetParentSection(value OnenoteSectionable)() + SetTitle(value *string)() + SetUserTags(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_patch_action_type.go b/src/internal/connector/graph/betasdk/models/onenote_patch_action_type.go new file mode 100644 index 000000000..3e6d51a9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_patch_action_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to call the onenotePatchContent method. +type OnenotePatchActionType int + +const ( + REPLACE_ONENOTEPATCHACTIONTYPE OnenotePatchActionType = iota + APPEND_ONENOTEPATCHACTIONTYPE + DELETE_ONENOTEPATCHACTIONTYPE + INSERT_ONENOTEPATCHACTIONTYPE + PREPEND_ONENOTEPATCHACTIONTYPE +) + +func (i OnenotePatchActionType) String() string { + return []string{"Replace", "Append", "Delete", "Insert", "Prepend"}[i] +} +func ParseOnenotePatchActionType(v string) (interface{}, error) { + result := REPLACE_ONENOTEPATCHACTIONTYPE + switch v { + case "Replace": + result = REPLACE_ONENOTEPATCHACTIONTYPE + case "Append": + result = APPEND_ONENOTEPATCHACTIONTYPE + case "Delete": + result = DELETE_ONENOTEPATCHACTIONTYPE + case "Insert": + result = INSERT_ONENOTEPATCHACTIONTYPE + case "Prepend": + result = PREPEND_ONENOTEPATCHACTIONTYPE + default: + return 0, errors.New("Unknown OnenotePatchActionType value: " + v) + } + return &result, nil +} +func SerializeOnenotePatchActionType(values []OnenotePatchActionType) []string { + 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/onenote_patch_content_command.go b/src/internal/connector/graph/betasdk/models/onenote_patch_content_command.go new file mode 100644 index 000000000..e5026778c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_patch_content_command.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePatchContentCommand +type OnenotePatchContentCommand struct { + // The action property + action *OnenotePatchActionType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A string of well-formed HTML to add to the page, and any image or file binary data. If the content contains binary data, the request must be sent using the multipart/form-data content type with a 'Commands' part. + content *string + // The OdataType property + odataType *string + // The location to add the supplied content, relative to the target element. Possible values are: after (default) or before. + position *OnenotePatchInsertPosition + // The element to update. Must be the # or the generated {id} of the element, or the body or title keyword. + target *string +} +// NewOnenotePatchContentCommand instantiates a new onenotePatchContentCommand and sets the default values. +func NewOnenotePatchContentCommand()(*OnenotePatchContentCommand) { + m := &OnenotePatchContentCommand{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnenotePatchContentCommandFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenotePatchContentCommandFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenotePatchContentCommand(), nil +} +// GetAction gets the action property value. The action property +func (m *OnenotePatchContentCommand) GetAction()(*OnenotePatchActionType) { + return m.action +} +// 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 *OnenotePatchContentCommand) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContent gets the content property value. A string of well-formed HTML to add to the page, and any image or file binary data. If the content contains binary data, the request must be sent using the multipart/form-data content type with a 'Commands' part. +func (m *OnenotePatchContentCommand) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenotePatchContentCommand) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnenotePatchActionType) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*OnenotePatchActionType)) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(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["position"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnenotePatchInsertPosition) + if err != nil { + return err + } + if val != nil { + m.SetPosition(val.(*OnenotePatchInsertPosition)) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnenotePatchContentCommand) GetOdataType()(*string) { + return m.odataType +} +// GetPosition gets the position property value. The location to add the supplied content, relative to the target element. Possible values are: after (default) or before. +func (m *OnenotePatchContentCommand) GetPosition()(*OnenotePatchInsertPosition) { + return m.position +} +// GetTarget gets the target property value. The element to update. Must be the # or the generated {id} of the element, or the body or title keyword. +func (m *OnenotePatchContentCommand) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *OnenotePatchContentCommand) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPosition() != nil { + cast := (*m.GetPosition()).String() + err := writer.WriteStringValue("position", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *OnenotePatchContentCommand) SetAction(value *OnenotePatchActionType)() { + m.action = value +} +// 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 *OnenotePatchContentCommand) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContent sets the content property value. A string of well-formed HTML to add to the page, and any image or file binary data. If the content contains binary data, the request must be sent using the multipart/form-data content type with a 'Commands' part. +func (m *OnenotePatchContentCommand) SetContent(value *string)() { + m.content = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnenotePatchContentCommand) SetOdataType(value *string)() { + m.odataType = value +} +// SetPosition sets the position property value. The location to add the supplied content, relative to the target element. Possible values are: after (default) or before. +func (m *OnenotePatchContentCommand) SetPosition(value *OnenotePatchInsertPosition)() { + m.position = value +} +// SetTarget sets the target property value. The element to update. Must be the # or the generated {id} of the element, or the body or title keyword. +func (m *OnenotePatchContentCommand) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_patch_content_commandable.go b/src/internal/connector/graph/betasdk/models/onenote_patch_content_commandable.go new file mode 100644 index 000000000..9b495fb71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_patch_content_commandable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenotePatchContentCommandable +type OnenotePatchContentCommandable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*OnenotePatchActionType) + GetContent()(*string) + GetOdataType()(*string) + GetPosition()(*OnenotePatchInsertPosition) + GetTarget()(*string) + SetAction(value *OnenotePatchActionType)() + SetContent(value *string)() + SetOdataType(value *string)() + SetPosition(value *OnenotePatchInsertPosition)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_patch_insert_position.go b/src/internal/connector/graph/betasdk/models/onenote_patch_insert_position.go new file mode 100644 index 000000000..454daf9c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_patch_insert_position.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to call the onenotePatchContent method. +type OnenotePatchInsertPosition int + +const ( + AFTER_ONENOTEPATCHINSERTPOSITION OnenotePatchInsertPosition = iota + BEFORE_ONENOTEPATCHINSERTPOSITION +) + +func (i OnenotePatchInsertPosition) String() string { + return []string{"After", "Before"}[i] +} +func ParseOnenotePatchInsertPosition(v string) (interface{}, error) { + result := AFTER_ONENOTEPATCHINSERTPOSITION + switch v { + case "After": + result = AFTER_ONENOTEPATCHINSERTPOSITION + case "Before": + result = BEFORE_ONENOTEPATCHINSERTPOSITION + default: + return 0, errors.New("Unknown OnenotePatchInsertPosition value: " + v) + } + return &result, nil +} +func SerializeOnenotePatchInsertPosition(values []OnenotePatchInsertPosition) []string { + 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/onenote_resource.go b/src/internal/connector/graph/betasdk/models/onenote_resource.go new file mode 100644 index 000000000..5171df488 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_resource.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteResource +type OnenoteResource struct { + OnenoteEntityBaseModel + // The content property + content []byte + // The contentUrl property + contentUrl *string +} +// NewOnenoteResource instantiates a new OnenoteResource and sets the default values. +func NewOnenoteResource()(*OnenoteResource) { + m := &OnenoteResource{ + OnenoteEntityBaseModel: *NewOnenoteEntityBaseModel(), + } + odataTypeValue := "#microsoft.graph.onenoteResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnenoteResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteResource(), nil +} +// GetContent gets the content property value. The content property +func (m *OnenoteResource) GetContent()([]byte) { + return m.content +} +// GetContentUrl gets the contentUrl property value. The contentUrl property +func (m *OnenoteResource) GetContentUrl()(*string) { + return m.contentUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntityBaseModel.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentUrl(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OnenoteResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntityBaseModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentUrl", m.GetContentUrl()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *OnenoteResource) SetContent(value []byte)() { + m.content = value +} +// SetContentUrl sets the contentUrl property value. The contentUrl property +func (m *OnenoteResource) SetContentUrl(value *string)() { + m.contentUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/onenote_resource_collection_response.go new file mode 100644 index 000000000..28b8b18e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteResourceCollectionResponse +type OnenoteResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnenoteResourceable +} +// NewOnenoteResourceCollectionResponse instantiates a new OnenoteResourceCollectionResponse and sets the default values. +func NewOnenoteResourceCollectionResponse()(*OnenoteResourceCollectionResponse) { + m := &OnenoteResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnenoteResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteResourceable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnenoteResourceCollectionResponse) GetValue()([]OnenoteResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnenoteResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnenoteResourceCollectionResponse) SetValue(value []OnenoteResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/onenote_resource_collection_responseable.go new file mode 100644 index 000000000..a514efd6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteResourceCollectionResponseable +type OnenoteResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnenoteResourceable) + SetValue(value []OnenoteResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_resourceable.go b/src/internal/connector/graph/betasdk/models/onenote_resourceable.go new file mode 100644 index 000000000..85f6e26f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_resourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteResourceable +type OnenoteResourceable interface { + OnenoteEntityBaseModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetContentUrl()(*string) + SetContent(value []byte)() + SetContentUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_section.go b/src/internal/connector/graph/betasdk/models/onenote_section.go new file mode 100644 index 000000000..2a1b7d67c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_section.go @@ -0,0 +1,200 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteSection provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnenoteSection struct { + OnenoteEntityHierarchyModel + // Indicates whether this is the user's default section. Read-only. + isDefault *bool + // Links for opening the section. The oneNoteClientURL link opens the section in the OneNote native client if it's installed. The oneNoteWebURL link opens the section in OneNote on the web. + links SectionLinksable + // The collection of pages in the section. Read-only. Nullable. + pages []OnenotePageable + // The pages endpoint where you can get details for all the pages in the section. Read-only. + pagesUrl *string + // The notebook that contains the section. Read-only. + parentNotebook Notebookable + // The section group that contains the section. Read-only. + parentSectionGroup SectionGroupable +} +// NewOnenoteSection instantiates a new onenoteSection and sets the default values. +func NewOnenoteSection()(*OnenoteSection) { + m := &OnenoteSection{ + OnenoteEntityHierarchyModel: *NewOnenoteEntityHierarchyModel(), + } + odataTypeValue := "#microsoft.graph.onenoteSection"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOnenoteSectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteSectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteSection(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteSection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntityHierarchyModel.GetFieldDeserializers() + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSectionLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(SectionLinksable)) + } + return nil + } + res["pages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenotePageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenotePageable, len(val)) + for i, v := range val { + res[i] = v.(OnenotePageable) + } + m.SetPages(res) + } + return nil + } + res["pagesUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPagesUrl(val) + } + return nil + } + res["parentNotebook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNotebookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentNotebook(val.(Notebookable)) + } + return nil + } + res["parentSectionGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentSectionGroup(val.(SectionGroupable)) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. Indicates whether this is the user's default section. Read-only. +func (m *OnenoteSection) GetIsDefault()(*bool) { + return m.isDefault +} +// GetLinks gets the links property value. Links for opening the section. The oneNoteClientURL link opens the section in the OneNote native client if it's installed. The oneNoteWebURL link opens the section in OneNote on the web. +func (m *OnenoteSection) GetLinks()(SectionLinksable) { + return m.links +} +// GetPages gets the pages property value. The collection of pages in the section. Read-only. Nullable. +func (m *OnenoteSection) GetPages()([]OnenotePageable) { + return m.pages +} +// GetPagesUrl gets the pagesUrl property value. The pages endpoint where you can get details for all the pages in the section. Read-only. +func (m *OnenoteSection) GetPagesUrl()(*string) { + return m.pagesUrl +} +// GetParentNotebook gets the parentNotebook property value. The notebook that contains the section. Read-only. +func (m *OnenoteSection) GetParentNotebook()(Notebookable) { + return m.parentNotebook +} +// GetParentSectionGroup gets the parentSectionGroup property value. The section group that contains the section. Read-only. +func (m *OnenoteSection) GetParentSectionGroup()(SectionGroupable) { + return m.parentSectionGroup +} +// Serialize serializes information the current object +func (m *OnenoteSection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntityHierarchyModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + if m.GetPages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPages())) + for i, v := range m.GetPages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("pages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("pagesUrl", m.GetPagesUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentNotebook", m.GetParentNotebook()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentSectionGroup", m.GetParentSectionGroup()) + if err != nil { + return err + } + } + return nil +} +// SetIsDefault sets the isDefault property value. Indicates whether this is the user's default section. Read-only. +func (m *OnenoteSection) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetLinks sets the links property value. Links for opening the section. The oneNoteClientURL link opens the section in the OneNote native client if it's installed. The oneNoteWebURL link opens the section in OneNote on the web. +func (m *OnenoteSection) SetLinks(value SectionLinksable)() { + m.links = value +} +// SetPages sets the pages property value. The collection of pages in the section. Read-only. Nullable. +func (m *OnenoteSection) SetPages(value []OnenotePageable)() { + m.pages = value +} +// SetPagesUrl sets the pagesUrl property value. The pages endpoint where you can get details for all the pages in the section. Read-only. +func (m *OnenoteSection) SetPagesUrl(value *string)() { + m.pagesUrl = value +} +// SetParentNotebook sets the parentNotebook property value. The notebook that contains the section. Read-only. +func (m *OnenoteSection) SetParentNotebook(value Notebookable)() { + m.parentNotebook = value +} +// SetParentSectionGroup sets the parentSectionGroup property value. The section group that contains the section. Read-only. +func (m *OnenoteSection) SetParentSectionGroup(value SectionGroupable)() { + m.parentSectionGroup = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_section_collection_response.go b/src/internal/connector/graph/betasdk/models/onenote_section_collection_response.go new file mode 100644 index 000000000..090e35655 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_section_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteSectionCollectionResponse +type OnenoteSectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnenoteSectionable +} +// NewOnenoteSectionCollectionResponse instantiates a new OnenoteSectionCollectionResponse and sets the default values. +func NewOnenoteSectionCollectionResponse()(*OnenoteSectionCollectionResponse) { + m := &OnenoteSectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnenoteSectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnenoteSectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnenoteSectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnenoteSectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteSectionable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteSectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnenoteSectionCollectionResponse) GetValue()([]OnenoteSectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnenoteSectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnenoteSectionCollectionResponse) SetValue(value []OnenoteSectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_section_collection_responseable.go b/src/internal/connector/graph/betasdk/models/onenote_section_collection_responseable.go new file mode 100644 index 000000000..2c9a28795 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_section_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteSectionCollectionResponseable +type OnenoteSectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnenoteSectionable) + SetValue(value []OnenoteSectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_sectionable.go b/src/internal/connector/graph/betasdk/models/onenote_sectionable.go new file mode 100644 index 000000000..00723b22b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_sectionable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnenoteSectionable +type OnenoteSectionable interface { + OnenoteEntityHierarchyModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsDefault()(*bool) + GetLinks()(SectionLinksable) + GetPages()([]OnenotePageable) + GetPagesUrl()(*string) + GetParentNotebook()(Notebookable) + GetParentSectionGroup()(SectionGroupable) + SetIsDefault(value *bool)() + SetLinks(value SectionLinksable)() + SetPages(value []OnenotePageable)() + SetPagesUrl(value *string)() + SetParentNotebook(value Notebookable)() + SetParentSectionGroup(value SectionGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/onenote_source_service.go b/src/internal/connector/graph/betasdk/models/onenote_source_service.go new file mode 100644 index 000000000..37ab65e77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_source_service.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to call the getRecentNotebooks method. +type OnenoteSourceService int + +const ( + UNKNOWN_ONENOTESOURCESERVICE OnenoteSourceService = iota + ONEDRIVE_ONENOTESOURCESERVICE + ONEDRIVEFORBUSINESS_ONENOTESOURCESERVICE + ONPREMONEDRIVEFORBUSINESS_ONENOTESOURCESERVICE +) + +func (i OnenoteSourceService) String() string { + return []string{"Unknown", "OneDrive", "OneDriveForBusiness", "OnPremOneDriveForBusiness"}[i] +} +func ParseOnenoteSourceService(v string) (interface{}, error) { + result := UNKNOWN_ONENOTESOURCESERVICE + switch v { + case "Unknown": + result = UNKNOWN_ONENOTESOURCESERVICE + case "OneDrive": + result = ONEDRIVE_ONENOTESOURCESERVICE + case "OneDriveForBusiness": + result = ONEDRIVEFORBUSINESS_ONENOTESOURCESERVICE + case "OnPremOneDriveForBusiness": + result = ONPREMONEDRIVEFORBUSINESS_ONENOTESOURCESERVICE + default: + return 0, errors.New("Unknown OnenoteSourceService value: " + v) + } + return &result, nil +} +func SerializeOnenoteSourceService(values []OnenoteSourceService) []string { + 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/onenote_user_role.go b/src/internal/connector/graph/betasdk/models/onenote_user_role.go new file mode 100644 index 000000000..559fcc6a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenote_user_role.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnenoteUserRole int + +const ( + NONE_ONENOTEUSERROLE OnenoteUserRole = iota + OWNER_ONENOTEUSERROLE + CONTRIBUTOR_ONENOTEUSERROLE + READER_ONENOTEUSERROLE +) + +func (i OnenoteUserRole) String() string { + return []string{"None", "Owner", "Contributor", "Reader"}[i] +} +func ParseOnenoteUserRole(v string) (interface{}, error) { + result := NONE_ONENOTEUSERROLE + switch v { + case "None": + result = NONE_ONENOTEUSERROLE + case "Owner": + result = OWNER_ONENOTEUSERROLE + case "Contributor": + result = CONTRIBUTOR_ONENOTEUSERROLE + case "Reader": + result = READER_ONENOTEUSERROLE + default: + return 0, errors.New("Unknown OnenoteUserRole value: " + v) + } + return &result, nil +} +func SerializeOnenoteUserRole(values []OnenoteUserRole) []string { + 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/onenoteable.go b/src/internal/connector/graph/betasdk/models/onenoteable.go new file mode 100644 index 000000000..aa229d78a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/onenoteable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Onenoteable +type Onenoteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNotebooks()([]Notebookable) + GetOperations()([]OnenoteOperationable) + GetPages()([]OnenotePageable) + GetResources()([]OnenoteResourceable) + GetSectionGroups()([]SectionGroupable) + GetSections()([]OnenoteSectionable) + SetNotebooks(value []Notebookable)() + SetOperations(value []OnenoteOperationable)() + SetPages(value []OnenotePageable)() + SetResources(value []OnenoteResourceable)() + SetSectionGroups(value []SectionGroupable)() + SetSections(value []OnenoteSectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting.go b/src/internal/connector/graph/betasdk/models/online_meeting.go new file mode 100644 index 000000000..624ce2b33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting.go @@ -0,0 +1,918 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeeting provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeeting struct { + Entity + // Indicates whether attendees can turn on their camera. + allowAttendeeToEnableCamera *bool + // Indicates whether attendees can turn on their microphone. + allowAttendeeToEnableMic *bool + // Specifies who can be a presenter in a meeting. + allowedPresenters *OnlineMeetingPresenters + // Indicates if Teams reactions are enabled for the meeting. + allowTeamworkReactions *bool + // The content stream of the alternative recording of a Microsoft Teams live event. Read-only. + alternativeRecording []byte + // The anonymizeIdentityForRoles property + anonymizeIdentityForRoles []OnlineMeetingRole + // The attendance reports of an online meeting. Read-only. + attendanceReports []MeetingAttendanceReportable + // The content stream of the attendee report of a Teams live event. Read-only. + attendeeReport []byte + // The phone access (dial-in) information for an online meeting. Read-only. + audioConferencing AudioConferencingable + // Settings related to a live event. + broadcastSettings BroadcastMeetingSettingsable + // The capabilities property + capabilities []MeetingCapabilities + // The chat information associated with this online meeting. + chatInfo ChatInfoable + // The meeting creation time in UTC. Read-only. + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The meeting end time in UTC. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The external ID. A custom ID. Optional. + externalId *string + // Indicates whether this is a Teams live event. + isBroadcast *bool + // Indicates whether to announce when callers join or leave. + isEntryExitAnnounced *bool + // The join information in the language and locale variant specified in 'Accept-Language' request HTTP header. Read-only. + joinInformation ItemBodyable + // Specifies the joinMeetingId, the meeting passcode, and the requirement for the passcode. Once an onlineMeeting is created, the joinMeetingIdSettings cannot be modified. To make any changes to this property, the meeting needs to be canceled and a new one needs to be created. + joinMeetingIdSettings JoinMeetingIdSettingsable + // The joinUrl property + joinUrl *string + // The join URL of the online meeting. Read-only. + joinWebUrl *string + // Specifies which participants can bypass the meeting lobby. + lobbyBypassSettings LobbyBypassSettingsable + // The meetingAttendanceReport property + meetingAttendanceReport MeetingAttendanceReportable + // The participants associated with the online meeting. This includes the organizer and the attendees. + participants MeetingParticipantsable + // Indicates whether to record the meeting automatically. + recordAutomatically *bool + // The content stream of the recording of a Teams live event. Read-only. + recording []byte + // The registration that has been enabled for an online meeting. One online meeting can only have one registration enabled. + registration MeetingRegistrationable + // The meeting start time in UTC. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The subject of the online meeting. + subject *string + // The transcripts of an online meeting. Read-only. + transcripts []CallTranscriptable + // The video teleconferencing ID. Read-only. + videoTeleconferenceId *string + // The virtualAppointment property + virtualAppointment VirtualAppointmentable + // The watermarkProtection property + watermarkProtection WatermarkProtectionValuesable +} +// NewOnlineMeeting instantiates a new onlineMeeting and sets the default values. +func NewOnlineMeeting()(*OnlineMeeting) { + m := &OnlineMeeting{ + Entity: *NewEntity(), + } + return m +} +// CreateOnlineMeetingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnlineMeetingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnlineMeeting(), nil +} +// GetAllowAttendeeToEnableCamera gets the allowAttendeeToEnableCamera property value. Indicates whether attendees can turn on their camera. +func (m *OnlineMeeting) GetAllowAttendeeToEnableCamera()(*bool) { + return m.allowAttendeeToEnableCamera +} +// GetAllowAttendeeToEnableMic gets the allowAttendeeToEnableMic property value. Indicates whether attendees can turn on their microphone. +func (m *OnlineMeeting) GetAllowAttendeeToEnableMic()(*bool) { + return m.allowAttendeeToEnableMic +} +// GetAllowedPresenters gets the allowedPresenters property value. Specifies who can be a presenter in a meeting. +func (m *OnlineMeeting) GetAllowedPresenters()(*OnlineMeetingPresenters) { + return m.allowedPresenters +} +// GetAllowTeamworkReactions gets the allowTeamworkReactions property value. Indicates if Teams reactions are enabled for the meeting. +func (m *OnlineMeeting) GetAllowTeamworkReactions()(*bool) { + return m.allowTeamworkReactions +} +// GetAlternativeRecording gets the alternativeRecording property value. The content stream of the alternative recording of a Microsoft Teams live event. Read-only. +func (m *OnlineMeeting) GetAlternativeRecording()([]byte) { + return m.alternativeRecording +} +// GetAnonymizeIdentityForRoles gets the anonymizeIdentityForRoles property value. The anonymizeIdentityForRoles property +func (m *OnlineMeeting) GetAnonymizeIdentityForRoles()([]OnlineMeetingRole) { + return m.anonymizeIdentityForRoles +} +// GetAttendanceReports gets the attendanceReports property value. The attendance reports of an online meeting. Read-only. +func (m *OnlineMeeting) GetAttendanceReports()([]MeetingAttendanceReportable) { + return m.attendanceReports +} +// GetAttendeeReport gets the attendeeReport property value. The content stream of the attendee report of a Teams live event. Read-only. +func (m *OnlineMeeting) GetAttendeeReport()([]byte) { + return m.attendeeReport +} +// GetAudioConferencing gets the audioConferencing property value. The phone access (dial-in) information for an online meeting. Read-only. +func (m *OnlineMeeting) GetAudioConferencing()(AudioConferencingable) { + return m.audioConferencing +} +// GetBroadcastSettings gets the broadcastSettings property value. Settings related to a live event. +func (m *OnlineMeeting) GetBroadcastSettings()(BroadcastMeetingSettingsable) { + return m.broadcastSettings +} +// GetCapabilities gets the capabilities property value. The capabilities property +func (m *OnlineMeeting) GetCapabilities()([]MeetingCapabilities) { + return m.capabilities +} +// GetChatInfo gets the chatInfo property value. The chat information associated with this online meeting. +func (m *OnlineMeeting) GetChatInfo()(ChatInfoable) { + return m.chatInfo +} +// GetCreationDateTime gets the creationDateTime property value. The meeting creation time in UTC. Read-only. +func (m *OnlineMeeting) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetEndDateTime gets the endDateTime property value. The meeting end time in UTC. +func (m *OnlineMeeting) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetExternalId gets the externalId property value. The external ID. A custom ID. Optional. +func (m *OnlineMeeting) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnlineMeeting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowAttendeeToEnableCamera"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAttendeeToEnableCamera(val) + } + return nil + } + res["allowAttendeeToEnableMic"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAttendeeToEnableMic(val) + } + return nil + } + res["allowedPresenters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingPresenters) + if err != nil { + return err + } + if val != nil { + m.SetAllowedPresenters(val.(*OnlineMeetingPresenters)) + } + return nil + } + res["allowTeamworkReactions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowTeamworkReactions(val) + } + return nil + } + res["alternativeRecording"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetAlternativeRecording(val) + } + return nil + } + res["anonymizeIdentityForRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseOnlineMeetingRole) + if err != nil { + return err + } + if val != nil { + res := make([]OnlineMeetingRole, len(val)) + for i, v := range val { + res[i] = *(v.(*OnlineMeetingRole)) + } + m.SetAnonymizeIdentityForRoles(res) + } + return nil + } + res["attendanceReports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMeetingAttendanceReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingAttendanceReportable, len(val)) + for i, v := range val { + res[i] = v.(MeetingAttendanceReportable) + } + m.SetAttendanceReports(res) + } + return nil + } + res["attendeeReport"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetAttendeeReport(val) + } + return nil + } + res["audioConferencing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAudioConferencingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAudioConferencing(val.(AudioConferencingable)) + } + return nil + } + res["broadcastSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateBroadcastMeetingSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBroadcastSettings(val.(BroadcastMeetingSettingsable)) + } + return nil + } + res["capabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseMeetingCapabilities) + if err != nil { + return err + } + if val != nil { + res := make([]MeetingCapabilities, len(val)) + for i, v := range val { + res[i] = *(v.(*MeetingCapabilities)) + } + m.SetCapabilities(res) + } + return nil + } + res["chatInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChatInfo(val.(ChatInfoable)) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["isBroadcast"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBroadcast(val) + } + return nil + } + res["isEntryExitAnnounced"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEntryExitAnnounced(val) + } + return nil + } + res["joinInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetJoinInformation(val.(ItemBodyable)) + } + return nil + } + res["joinMeetingIdSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateJoinMeetingIdSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetJoinMeetingIdSettings(val.(JoinMeetingIdSettingsable)) + } + return nil + } + res["joinUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinUrl(val) + } + return nil + } + res["joinWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinWebUrl(val) + } + return nil + } + res["lobbyBypassSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLobbyBypassSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLobbyBypassSettings(val.(LobbyBypassSettingsable)) + } + return nil + } + res["meetingAttendanceReport"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingAttendanceReportFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMeetingAttendanceReport(val.(MeetingAttendanceReportable)) + } + return nil + } + res["participants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingParticipantsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParticipants(val.(MeetingParticipantsable)) + } + return nil + } + res["recordAutomatically"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordAutomatically(val) + } + return nil + } + res["recording"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetRecording(val) + } + return nil + } + res["registration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMeetingRegistrationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRegistration(val.(MeetingRegistrationable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["transcripts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCallTranscriptFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CallTranscriptable, len(val)) + for i, v := range val { + res[i] = v.(CallTranscriptable) + } + m.SetTranscripts(res) + } + return nil + } + res["videoTeleconferenceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVideoTeleconferenceId(val) + } + return nil + } + res["virtualAppointment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVirtualAppointmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVirtualAppointment(val.(VirtualAppointmentable)) + } + return nil + } + res["watermarkProtection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateWatermarkProtectionValuesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetWatermarkProtection(val.(WatermarkProtectionValuesable)) + } + return nil + } + return res +} +// GetIsBroadcast gets the isBroadcast property value. Indicates whether this is a Teams live event. +func (m *OnlineMeeting) GetIsBroadcast()(*bool) { + return m.isBroadcast +} +// GetIsEntryExitAnnounced gets the isEntryExitAnnounced property value. Indicates whether to announce when callers join or leave. +func (m *OnlineMeeting) GetIsEntryExitAnnounced()(*bool) { + return m.isEntryExitAnnounced +} +// GetJoinInformation gets the joinInformation property value. The join information in the language and locale variant specified in 'Accept-Language' request HTTP header. Read-only. +func (m *OnlineMeeting) GetJoinInformation()(ItemBodyable) { + return m.joinInformation +} +// GetJoinMeetingIdSettings gets the joinMeetingIdSettings property value. Specifies the joinMeetingId, the meeting passcode, and the requirement for the passcode. Once an onlineMeeting is created, the joinMeetingIdSettings cannot be modified. To make any changes to this property, the meeting needs to be canceled and a new one needs to be created. +func (m *OnlineMeeting) GetJoinMeetingIdSettings()(JoinMeetingIdSettingsable) { + return m.joinMeetingIdSettings +} +// GetJoinUrl gets the joinUrl property value. The joinUrl property +func (m *OnlineMeeting) GetJoinUrl()(*string) { + return m.joinUrl +} +// GetJoinWebUrl gets the joinWebUrl property value. The join URL of the online meeting. Read-only. +func (m *OnlineMeeting) GetJoinWebUrl()(*string) { + return m.joinWebUrl +} +// GetLobbyBypassSettings gets the lobbyBypassSettings property value. Specifies which participants can bypass the meeting lobby. +func (m *OnlineMeeting) GetLobbyBypassSettings()(LobbyBypassSettingsable) { + return m.lobbyBypassSettings +} +// GetMeetingAttendanceReport gets the meetingAttendanceReport property value. The meetingAttendanceReport property +func (m *OnlineMeeting) GetMeetingAttendanceReport()(MeetingAttendanceReportable) { + return m.meetingAttendanceReport +} +// GetParticipants gets the participants property value. The participants associated with the online meeting. This includes the organizer and the attendees. +func (m *OnlineMeeting) GetParticipants()(MeetingParticipantsable) { + return m.participants +} +// GetRecordAutomatically gets the recordAutomatically property value. Indicates whether to record the meeting automatically. +func (m *OnlineMeeting) GetRecordAutomatically()(*bool) { + return m.recordAutomatically +} +// GetRecording gets the recording property value. The content stream of the recording of a Teams live event. Read-only. +func (m *OnlineMeeting) GetRecording()([]byte) { + return m.recording +} +// GetRegistration gets the registration property value. The registration that has been enabled for an online meeting. One online meeting can only have one registration enabled. +func (m *OnlineMeeting) GetRegistration()(MeetingRegistrationable) { + return m.registration +} +// GetStartDateTime gets the startDateTime property value. The meeting start time in UTC. +func (m *OnlineMeeting) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetSubject gets the subject property value. The subject of the online meeting. +func (m *OnlineMeeting) GetSubject()(*string) { + return m.subject +} +// GetTranscripts gets the transcripts property value. The transcripts of an online meeting. Read-only. +func (m *OnlineMeeting) GetTranscripts()([]CallTranscriptable) { + return m.transcripts +} +// GetVideoTeleconferenceId gets the videoTeleconferenceId property value. The video teleconferencing ID. Read-only. +func (m *OnlineMeeting) GetVideoTeleconferenceId()(*string) { + return m.videoTeleconferenceId +} +// GetVirtualAppointment gets the virtualAppointment property value. The virtualAppointment property +func (m *OnlineMeeting) GetVirtualAppointment()(VirtualAppointmentable) { + return m.virtualAppointment +} +// GetWatermarkProtection gets the watermarkProtection property value. The watermarkProtection property +func (m *OnlineMeeting) GetWatermarkProtection()(WatermarkProtectionValuesable) { + return m.watermarkProtection +} +// Serialize serializes information the current object +func (m *OnlineMeeting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowAttendeeToEnableCamera", m.GetAllowAttendeeToEnableCamera()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowAttendeeToEnableMic", m.GetAllowAttendeeToEnableMic()) + if err != nil { + return err + } + } + if m.GetAllowedPresenters() != nil { + cast := (*m.GetAllowedPresenters()).String() + err = writer.WriteStringValue("allowedPresenters", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowTeamworkReactions", m.GetAllowTeamworkReactions()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("alternativeRecording", m.GetAlternativeRecording()) + if err != nil { + return err + } + } + if m.GetAnonymizeIdentityForRoles() != nil { + err = writer.WriteCollectionOfStringValues("anonymizeIdentityForRoles", SerializeOnlineMeetingRole(m.GetAnonymizeIdentityForRoles())) + if err != nil { + return err + } + } + if m.GetAttendanceReports() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttendanceReports())) + for i, v := range m.GetAttendanceReports() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attendanceReports", cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("attendeeReport", m.GetAttendeeReport()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("audioConferencing", m.GetAudioConferencing()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("broadcastSettings", m.GetBroadcastSettings()) + if err != nil { + return err + } + } + if m.GetCapabilities() != nil { + err = writer.WriteCollectionOfStringValues("capabilities", SerializeMeetingCapabilities(m.GetCapabilities())) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("chatInfo", m.GetChatInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isBroadcast", m.GetIsBroadcast()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEntryExitAnnounced", m.GetIsEntryExitAnnounced()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("joinInformation", m.GetJoinInformation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("joinMeetingIdSettings", m.GetJoinMeetingIdSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("joinUrl", m.GetJoinUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("joinWebUrl", m.GetJoinWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lobbyBypassSettings", m.GetLobbyBypassSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("meetingAttendanceReport", m.GetMeetingAttendanceReport()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("participants", m.GetParticipants()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("recordAutomatically", m.GetRecordAutomatically()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("recording", m.GetRecording()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("registration", m.GetRegistration()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + if m.GetTranscripts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTranscripts())) + for i, v := range m.GetTranscripts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transcripts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("videoTeleconferenceId", m.GetVideoTeleconferenceId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("virtualAppointment", m.GetVirtualAppointment()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("watermarkProtection", m.GetWatermarkProtection()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAttendeeToEnableCamera sets the allowAttendeeToEnableCamera property value. Indicates whether attendees can turn on their camera. +func (m *OnlineMeeting) SetAllowAttendeeToEnableCamera(value *bool)() { + m.allowAttendeeToEnableCamera = value +} +// SetAllowAttendeeToEnableMic sets the allowAttendeeToEnableMic property value. Indicates whether attendees can turn on their microphone. +func (m *OnlineMeeting) SetAllowAttendeeToEnableMic(value *bool)() { + m.allowAttendeeToEnableMic = value +} +// SetAllowedPresenters sets the allowedPresenters property value. Specifies who can be a presenter in a meeting. +func (m *OnlineMeeting) SetAllowedPresenters(value *OnlineMeetingPresenters)() { + m.allowedPresenters = value +} +// SetAllowTeamworkReactions sets the allowTeamworkReactions property value. Indicates if Teams reactions are enabled for the meeting. +func (m *OnlineMeeting) SetAllowTeamworkReactions(value *bool)() { + m.allowTeamworkReactions = value +} +// SetAlternativeRecording sets the alternativeRecording property value. The content stream of the alternative recording of a Microsoft Teams live event. Read-only. +func (m *OnlineMeeting) SetAlternativeRecording(value []byte)() { + m.alternativeRecording = value +} +// SetAnonymizeIdentityForRoles sets the anonymizeIdentityForRoles property value. The anonymizeIdentityForRoles property +func (m *OnlineMeeting) SetAnonymizeIdentityForRoles(value []OnlineMeetingRole)() { + m.anonymizeIdentityForRoles = value +} +// SetAttendanceReports sets the attendanceReports property value. The attendance reports of an online meeting. Read-only. +func (m *OnlineMeeting) SetAttendanceReports(value []MeetingAttendanceReportable)() { + m.attendanceReports = value +} +// SetAttendeeReport sets the attendeeReport property value. The content stream of the attendee report of a Teams live event. Read-only. +func (m *OnlineMeeting) SetAttendeeReport(value []byte)() { + m.attendeeReport = value +} +// SetAudioConferencing sets the audioConferencing property value. The phone access (dial-in) information for an online meeting. Read-only. +func (m *OnlineMeeting) SetAudioConferencing(value AudioConferencingable)() { + m.audioConferencing = value +} +// SetBroadcastSettings sets the broadcastSettings property value. Settings related to a live event. +func (m *OnlineMeeting) SetBroadcastSettings(value BroadcastMeetingSettingsable)() { + m.broadcastSettings = value +} +// SetCapabilities sets the capabilities property value. The capabilities property +func (m *OnlineMeeting) SetCapabilities(value []MeetingCapabilities)() { + m.capabilities = value +} +// SetChatInfo sets the chatInfo property value. The chat information associated with this online meeting. +func (m *OnlineMeeting) SetChatInfo(value ChatInfoable)() { + m.chatInfo = value +} +// SetCreationDateTime sets the creationDateTime property value. The meeting creation time in UTC. Read-only. +func (m *OnlineMeeting) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetEndDateTime sets the endDateTime property value. The meeting end time in UTC. +func (m *OnlineMeeting) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetExternalId sets the externalId property value. The external ID. A custom ID. Optional. +func (m *OnlineMeeting) SetExternalId(value *string)() { + m.externalId = value +} +// SetIsBroadcast sets the isBroadcast property value. Indicates whether this is a Teams live event. +func (m *OnlineMeeting) SetIsBroadcast(value *bool)() { + m.isBroadcast = value +} +// SetIsEntryExitAnnounced sets the isEntryExitAnnounced property value. Indicates whether to announce when callers join or leave. +func (m *OnlineMeeting) SetIsEntryExitAnnounced(value *bool)() { + m.isEntryExitAnnounced = value +} +// SetJoinInformation sets the joinInformation property value. The join information in the language and locale variant specified in 'Accept-Language' request HTTP header. Read-only. +func (m *OnlineMeeting) SetJoinInformation(value ItemBodyable)() { + m.joinInformation = value +} +// SetJoinMeetingIdSettings sets the joinMeetingIdSettings property value. Specifies the joinMeetingId, the meeting passcode, and the requirement for the passcode. Once an onlineMeeting is created, the joinMeetingIdSettings cannot be modified. To make any changes to this property, the meeting needs to be canceled and a new one needs to be created. +func (m *OnlineMeeting) SetJoinMeetingIdSettings(value JoinMeetingIdSettingsable)() { + m.joinMeetingIdSettings = value +} +// SetJoinUrl sets the joinUrl property value. The joinUrl property +func (m *OnlineMeeting) SetJoinUrl(value *string)() { + m.joinUrl = value +} +// SetJoinWebUrl sets the joinWebUrl property value. The join URL of the online meeting. Read-only. +func (m *OnlineMeeting) SetJoinWebUrl(value *string)() { + m.joinWebUrl = value +} +// SetLobbyBypassSettings sets the lobbyBypassSettings property value. Specifies which participants can bypass the meeting lobby. +func (m *OnlineMeeting) SetLobbyBypassSettings(value LobbyBypassSettingsable)() { + m.lobbyBypassSettings = value +} +// SetMeetingAttendanceReport sets the meetingAttendanceReport property value. The meetingAttendanceReport property +func (m *OnlineMeeting) SetMeetingAttendanceReport(value MeetingAttendanceReportable)() { + m.meetingAttendanceReport = value +} +// SetParticipants sets the participants property value. The participants associated with the online meeting. This includes the organizer and the attendees. +func (m *OnlineMeeting) SetParticipants(value MeetingParticipantsable)() { + m.participants = value +} +// SetRecordAutomatically sets the recordAutomatically property value. Indicates whether to record the meeting automatically. +func (m *OnlineMeeting) SetRecordAutomatically(value *bool)() { + m.recordAutomatically = value +} +// SetRecording sets the recording property value. The content stream of the recording of a Teams live event. Read-only. +func (m *OnlineMeeting) SetRecording(value []byte)() { + m.recording = value +} +// SetRegistration sets the registration property value. The registration that has been enabled for an online meeting. One online meeting can only have one registration enabled. +func (m *OnlineMeeting) SetRegistration(value MeetingRegistrationable)() { + m.registration = value +} +// SetStartDateTime sets the startDateTime property value. The meeting start time in UTC. +func (m *OnlineMeeting) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetSubject sets the subject property value. The subject of the online meeting. +func (m *OnlineMeeting) SetSubject(value *string)() { + m.subject = value +} +// SetTranscripts sets the transcripts property value. The transcripts of an online meeting. Read-only. +func (m *OnlineMeeting) SetTranscripts(value []CallTranscriptable)() { + m.transcripts = value +} +// SetVideoTeleconferenceId sets the videoTeleconferenceId property value. The video teleconferencing ID. Read-only. +func (m *OnlineMeeting) SetVideoTeleconferenceId(value *string)() { + m.videoTeleconferenceId = value +} +// SetVirtualAppointment sets the virtualAppointment property value. The virtualAppointment property +func (m *OnlineMeeting) SetVirtualAppointment(value VirtualAppointmentable)() { + m.virtualAppointment = value +} +// SetWatermarkProtection sets the watermarkProtection property value. The watermarkProtection property +func (m *OnlineMeeting) SetWatermarkProtection(value WatermarkProtectionValuesable)() { + m.watermarkProtection = value +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_collection_response.go b/src/internal/connector/graph/betasdk/models/online_meeting_collection_response.go new file mode 100644 index 000000000..3af9ee904 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingCollectionResponse +type OnlineMeetingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OnlineMeetingable +} +// NewOnlineMeetingCollectionResponse instantiates a new OnlineMeetingCollectionResponse and sets the default values. +func NewOnlineMeetingCollectionResponse()(*OnlineMeetingCollectionResponse) { + m := &OnlineMeetingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOnlineMeetingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnlineMeetingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnlineMeetingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnlineMeetingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnlineMeetingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnlineMeetingable, len(val)) + for i, v := range val { + res[i] = v.(OnlineMeetingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OnlineMeetingCollectionResponse) GetValue()([]OnlineMeetingable) { + return m.value +} +// Serialize serializes information the current object +func (m *OnlineMeetingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OnlineMeetingCollectionResponse) SetValue(value []OnlineMeetingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/online_meeting_collection_responseable.go new file mode 100644 index 000000000..8df5f9ea1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingCollectionResponseable +type OnlineMeetingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OnlineMeetingable) + SetValue(value []OnlineMeetingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_content_sharing_disabled_reason.go b/src/internal/connector/graph/betasdk/models/online_meeting_content_sharing_disabled_reason.go new file mode 100644 index 000000000..4794905e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_content_sharing_disabled_reason.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingContentSharingDisabledReason int + +const ( + WATERMARKPROTECTION_ONLINEMEETINGCONTENTSHARINGDISABLEDREASON OnlineMeetingContentSharingDisabledReason = iota + UNKNOWNFUTUREVALUE_ONLINEMEETINGCONTENTSHARINGDISABLEDREASON +) + +func (i OnlineMeetingContentSharingDisabledReason) String() string { + return []string{"watermarkProtection", "unknownFutureValue"}[i] +} +func ParseOnlineMeetingContentSharingDisabledReason(v string) (interface{}, error) { + result := WATERMARKPROTECTION_ONLINEMEETINGCONTENTSHARINGDISABLEDREASON + switch v { + case "watermarkProtection": + result = WATERMARKPROTECTION_ONLINEMEETINGCONTENTSHARINGDISABLEDREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONLINEMEETINGCONTENTSHARINGDISABLEDREASON + default: + return 0, errors.New("Unknown OnlineMeetingContentSharingDisabledReason value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingContentSharingDisabledReason(values []OnlineMeetingContentSharingDisabledReason) []string { + 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/online_meeting_forwarders.go b/src/internal/connector/graph/betasdk/models/online_meeting_forwarders.go new file mode 100644 index 000000000..5095166ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_forwarders.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingForwarders int + +const ( + EVERYONE_ONLINEMEETINGFORWARDERS OnlineMeetingForwarders = iota + ORGANIZER_ONLINEMEETINGFORWARDERS + UNKNOWNFUTUREVALUE_ONLINEMEETINGFORWARDERS +) + +func (i OnlineMeetingForwarders) String() string { + return []string{"everyone", "organizer", "unknownFutureValue"}[i] +} +func ParseOnlineMeetingForwarders(v string) (interface{}, error) { + result := EVERYONE_ONLINEMEETINGFORWARDERS + switch v { + case "everyone": + result = EVERYONE_ONLINEMEETINGFORWARDERS + case "organizer": + result = ORGANIZER_ONLINEMEETINGFORWARDERS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONLINEMEETINGFORWARDERS + default: + return 0, errors.New("Unknown OnlineMeetingForwarders value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingForwarders(values []OnlineMeetingForwarders) []string { + 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/online_meeting_info.go b/src/internal/connector/graph/betasdk/models/online_meeting_info.go new file mode 100644 index 000000000..49bc86dcb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_info.go @@ -0,0 +1,239 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingInfo +type OnlineMeetingInfo 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 ID of the conference. + conferenceId *string + // The external link that launches the online meeting. This is a URL that clients will launch into a browser and will redirect the user to join the meeting. + joinUrl *string + // The OdataType property + odataType *string + // All of the phone numbers associated with this conference. + phones []Phoneable + // The pre-formatted quickdial for this call. + quickDial *string + // The toll free numbers that can be used to join the conference. + tollFreeNumbers []string + // The toll number that can be used to join the conference. + tollNumber *string +} +// NewOnlineMeetingInfo instantiates a new onlineMeetingInfo and sets the default values. +func NewOnlineMeetingInfo()(*OnlineMeetingInfo) { + m := &OnlineMeetingInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnlineMeetingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnlineMeetingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnlineMeetingInfo(), 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 *OnlineMeetingInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConferenceId gets the conferenceId property value. The ID of the conference. +func (m *OnlineMeetingInfo) GetConferenceId()(*string) { + return m.conferenceId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnlineMeetingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["conferenceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConferenceId(val) + } + return nil + } + res["joinUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJoinUrl(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["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetPhones(res) + } + return nil + } + res["quickDial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuickDial(val) + } + return nil + } + res["tollFreeNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTollFreeNumbers(res) + } + return nil + } + res["tollNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTollNumber(val) + } + return nil + } + return res +} +// GetJoinUrl gets the joinUrl property value. The external link that launches the online meeting. This is a URL that clients will launch into a browser and will redirect the user to join the meeting. +func (m *OnlineMeetingInfo) GetJoinUrl()(*string) { + return m.joinUrl +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnlineMeetingInfo) GetOdataType()(*string) { + return m.odataType +} +// GetPhones gets the phones property value. All of the phone numbers associated with this conference. +func (m *OnlineMeetingInfo) GetPhones()([]Phoneable) { + return m.phones +} +// GetQuickDial gets the quickDial property value. The pre-formatted quickdial for this call. +func (m *OnlineMeetingInfo) GetQuickDial()(*string) { + return m.quickDial +} +// GetTollFreeNumbers gets the tollFreeNumbers property value. The toll free numbers that can be used to join the conference. +func (m *OnlineMeetingInfo) GetTollFreeNumbers()([]string) { + return m.tollFreeNumbers +} +// GetTollNumber gets the tollNumber property value. The toll number that can be used to join the conference. +func (m *OnlineMeetingInfo) GetTollNumber()(*string) { + return m.tollNumber +} +// Serialize serializes information the current object +func (m *OnlineMeetingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("conferenceId", m.GetConferenceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("joinUrl", m.GetJoinUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("quickDial", m.GetQuickDial()) + if err != nil { + return err + } + } + if m.GetTollFreeNumbers() != nil { + err := writer.WriteCollectionOfStringValues("tollFreeNumbers", m.GetTollFreeNumbers()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tollNumber", m.GetTollNumber()) + 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 *OnlineMeetingInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConferenceId sets the conferenceId property value. The ID of the conference. +func (m *OnlineMeetingInfo) SetConferenceId(value *string)() { + m.conferenceId = value +} +// SetJoinUrl sets the joinUrl property value. The external link that launches the online meeting. This is a URL that clients will launch into a browser and will redirect the user to join the meeting. +func (m *OnlineMeetingInfo) SetJoinUrl(value *string)() { + m.joinUrl = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnlineMeetingInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetPhones sets the phones property value. All of the phone numbers associated with this conference. +func (m *OnlineMeetingInfo) SetPhones(value []Phoneable)() { + m.phones = value +} +// SetQuickDial sets the quickDial property value. The pre-formatted quickdial for this call. +func (m *OnlineMeetingInfo) SetQuickDial(value *string)() { + m.quickDial = value +} +// SetTollFreeNumbers sets the tollFreeNumbers property value. The toll free numbers that can be used to join the conference. +func (m *OnlineMeetingInfo) SetTollFreeNumbers(value []string)() { + m.tollFreeNumbers = value +} +// SetTollNumber sets the tollNumber property value. The toll number that can be used to join the conference. +func (m *OnlineMeetingInfo) SetTollNumber(value *string)() { + m.tollNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_infoable.go b/src/internal/connector/graph/betasdk/models/online_meeting_infoable.go new file mode 100644 index 000000000..085ede59c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_infoable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingInfoable +type OnlineMeetingInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConferenceId()(*string) + GetJoinUrl()(*string) + GetOdataType()(*string) + GetPhones()([]Phoneable) + GetQuickDial()(*string) + GetTollFreeNumbers()([]string) + GetTollNumber()(*string) + SetConferenceId(value *string)() + SetJoinUrl(value *string)() + SetOdataType(value *string)() + SetPhones(value []Phoneable)() + SetQuickDial(value *string)() + SetTollFreeNumbers(value []string)() + SetTollNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_presenters.go b/src/internal/connector/graph/betasdk/models/online_meeting_presenters.go new file mode 100644 index 000000000..453a59b0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_presenters.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingPresenters int + +const ( + EVERYONE_ONLINEMEETINGPRESENTERS OnlineMeetingPresenters = iota + ORGANIZATION_ONLINEMEETINGPRESENTERS + ROLEISPRESENTER_ONLINEMEETINGPRESENTERS + ORGANIZER_ONLINEMEETINGPRESENTERS + UNKNOWNFUTUREVALUE_ONLINEMEETINGPRESENTERS +) + +func (i OnlineMeetingPresenters) String() string { + return []string{"everyone", "organization", "roleIsPresenter", "organizer", "unknownFutureValue"}[i] +} +func ParseOnlineMeetingPresenters(v string) (interface{}, error) { + result := EVERYONE_ONLINEMEETINGPRESENTERS + switch v { + case "everyone": + result = EVERYONE_ONLINEMEETINGPRESENTERS + case "organization": + result = ORGANIZATION_ONLINEMEETINGPRESENTERS + case "roleIsPresenter": + result = ROLEISPRESENTER_ONLINEMEETINGPRESENTERS + case "organizer": + result = ORGANIZER_ONLINEMEETINGPRESENTERS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONLINEMEETINGPRESENTERS + default: + return 0, errors.New("Unknown OnlineMeetingPresenters value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingPresenters(values []OnlineMeetingPresenters) []string { + 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/online_meeting_provider_type.go b/src/internal/connector/graph/betasdk/models/online_meeting_provider_type.go new file mode 100644 index 000000000..06174a8e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_provider_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingProviderType int + +const ( + UNKNOWN_ONLINEMEETINGPROVIDERTYPE OnlineMeetingProviderType = iota + SKYPEFORBUSINESS_ONLINEMEETINGPROVIDERTYPE + SKYPEFORCONSUMER_ONLINEMEETINGPROVIDERTYPE + TEAMSFORBUSINESS_ONLINEMEETINGPROVIDERTYPE +) + +func (i OnlineMeetingProviderType) String() string { + return []string{"unknown", "skypeForBusiness", "skypeForConsumer", "teamsForBusiness"}[i] +} +func ParseOnlineMeetingProviderType(v string) (interface{}, error) { + result := UNKNOWN_ONLINEMEETINGPROVIDERTYPE + switch v { + case "unknown": + result = UNKNOWN_ONLINEMEETINGPROVIDERTYPE + case "skypeForBusiness": + result = SKYPEFORBUSINESS_ONLINEMEETINGPROVIDERTYPE + case "skypeForConsumer": + result = SKYPEFORCONSUMER_ONLINEMEETINGPROVIDERTYPE + case "teamsForBusiness": + result = TEAMSFORBUSINESS_ONLINEMEETINGPROVIDERTYPE + default: + return 0, errors.New("Unknown OnlineMeetingProviderType value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingProviderType(values []OnlineMeetingProviderType) []string { + 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/online_meeting_restricted.go b/src/internal/connector/graph/betasdk/models/online_meeting_restricted.go new file mode 100644 index 000000000..d9cd68a01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_restricted.go @@ -0,0 +1,125 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingRestricted +type OnlineMeetingRestricted 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 contentSharingDisabled property + contentSharingDisabled *OnlineMeetingContentSharingDisabledReason + // The OdataType property + odataType *string + // The videoDisabled property + videoDisabled *OnlineMeetingVideoDisabledReason +} +// NewOnlineMeetingRestricted instantiates a new onlineMeetingRestricted and sets the default values. +func NewOnlineMeetingRestricted()(*OnlineMeetingRestricted) { + m := &OnlineMeetingRestricted{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOnlineMeetingRestrictedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOnlineMeetingRestrictedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOnlineMeetingRestricted(), 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 *OnlineMeetingRestricted) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContentSharingDisabled gets the contentSharingDisabled property value. The contentSharingDisabled property +func (m *OnlineMeetingRestricted) GetContentSharingDisabled()(*OnlineMeetingContentSharingDisabledReason) { + return m.contentSharingDisabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OnlineMeetingRestricted) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contentSharingDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingContentSharingDisabledReason) + if err != nil { + return err + } + if val != nil { + m.SetContentSharingDisabled(val.(*OnlineMeetingContentSharingDisabledReason)) + } + 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["videoDisabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingVideoDisabledReason) + if err != nil { + return err + } + if val != nil { + m.SetVideoDisabled(val.(*OnlineMeetingVideoDisabledReason)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OnlineMeetingRestricted) GetOdataType()(*string) { + return m.odataType +} +// GetVideoDisabled gets the videoDisabled property value. The videoDisabled property +func (m *OnlineMeetingRestricted) GetVideoDisabled()(*OnlineMeetingVideoDisabledReason) { + return m.videoDisabled +} +// Serialize serializes information the current object +func (m *OnlineMeetingRestricted) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetContentSharingDisabled() != nil { + cast := (*m.GetContentSharingDisabled()).String() + err := writer.WriteStringValue("contentSharingDisabled", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetVideoDisabled() != nil { + cast := (*m.GetVideoDisabled()).String() + err := writer.WriteStringValue("videoDisabled", &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 *OnlineMeetingRestricted) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContentSharingDisabled sets the contentSharingDisabled property value. The contentSharingDisabled property +func (m *OnlineMeetingRestricted) SetContentSharingDisabled(value *OnlineMeetingContentSharingDisabledReason)() { + m.contentSharingDisabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OnlineMeetingRestricted) SetOdataType(value *string)() { + m.odataType = value +} +// SetVideoDisabled sets the videoDisabled property value. The videoDisabled property +func (m *OnlineMeetingRestricted) SetVideoDisabled(value *OnlineMeetingVideoDisabledReason)() { + m.videoDisabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_restrictedable.go b/src/internal/connector/graph/betasdk/models/online_meeting_restrictedable.go new file mode 100644 index 000000000..0d720a95f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_restrictedable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingRestrictedable +type OnlineMeetingRestrictedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentSharingDisabled()(*OnlineMeetingContentSharingDisabledReason) + GetOdataType()(*string) + GetVideoDisabled()(*OnlineMeetingVideoDisabledReason) + SetContentSharingDisabled(value *OnlineMeetingContentSharingDisabledReason)() + SetOdataType(value *string)() + SetVideoDisabled(value *OnlineMeetingVideoDisabledReason)() +} diff --git a/src/internal/connector/graph/betasdk/models/online_meeting_role.go b/src/internal/connector/graph/betasdk/models/online_meeting_role.go new file mode 100644 index 000000000..287e58c73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_role.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingRole int + +const ( + ATTENDEE_ONLINEMEETINGROLE OnlineMeetingRole = iota + PRESENTER_ONLINEMEETINGROLE + UNKNOWNFUTUREVALUE_ONLINEMEETINGROLE + PRODUCER_ONLINEMEETINGROLE + COORGANIZER_ONLINEMEETINGROLE +) + +func (i OnlineMeetingRole) String() string { + return []string{"attendee", "presenter", "unknownFutureValue", "producer", "coorganizer"}[i] +} +func ParseOnlineMeetingRole(v string) (interface{}, error) { + result := ATTENDEE_ONLINEMEETINGROLE + switch v { + case "attendee": + result = ATTENDEE_ONLINEMEETINGROLE + case "presenter": + result = PRESENTER_ONLINEMEETINGROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONLINEMEETINGROLE + case "producer": + result = PRODUCER_ONLINEMEETINGROLE + case "coorganizer": + result = COORGANIZER_ONLINEMEETINGROLE + default: + return 0, errors.New("Unknown OnlineMeetingRole value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingRole(values []OnlineMeetingRole) []string { + 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/online_meeting_video_disabled_reason.go b/src/internal/connector/graph/betasdk/models/online_meeting_video_disabled_reason.go new file mode 100644 index 000000000..b6e84d47c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meeting_video_disabled_reason.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnlineMeetingVideoDisabledReason int + +const ( + WATERMARKPROTECTION_ONLINEMEETINGVIDEODISABLEDREASON OnlineMeetingVideoDisabledReason = iota + UNKNOWNFUTUREVALUE_ONLINEMEETINGVIDEODISABLEDREASON +) + +func (i OnlineMeetingVideoDisabledReason) String() string { + return []string{"watermarkProtection", "unknownFutureValue"}[i] +} +func ParseOnlineMeetingVideoDisabledReason(v string) (interface{}, error) { + result := WATERMARKPROTECTION_ONLINEMEETINGVIDEODISABLEDREASON + switch v { + case "watermarkProtection": + result = WATERMARKPROTECTION_ONLINEMEETINGVIDEODISABLEDREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONLINEMEETINGVIDEODISABLEDREASON + default: + return 0, errors.New("Unknown OnlineMeetingVideoDisabledReason value: " + v) + } + return &result, nil +} +func SerializeOnlineMeetingVideoDisabledReason(values []OnlineMeetingVideoDisabledReason) []string { + 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/online_meetingable.go b/src/internal/connector/graph/betasdk/models/online_meetingable.go new file mode 100644 index 000000000..bf8531980 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/online_meetingable.go @@ -0,0 +1,78 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OnlineMeetingable +type OnlineMeetingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowAttendeeToEnableCamera()(*bool) + GetAllowAttendeeToEnableMic()(*bool) + GetAllowedPresenters()(*OnlineMeetingPresenters) + GetAllowTeamworkReactions()(*bool) + GetAlternativeRecording()([]byte) + GetAnonymizeIdentityForRoles()([]OnlineMeetingRole) + GetAttendanceReports()([]MeetingAttendanceReportable) + GetAttendeeReport()([]byte) + GetAudioConferencing()(AudioConferencingable) + GetBroadcastSettings()(BroadcastMeetingSettingsable) + GetCapabilities()([]MeetingCapabilities) + GetChatInfo()(ChatInfoable) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExternalId()(*string) + GetIsBroadcast()(*bool) + GetIsEntryExitAnnounced()(*bool) + GetJoinInformation()(ItemBodyable) + GetJoinMeetingIdSettings()(JoinMeetingIdSettingsable) + GetJoinUrl()(*string) + GetJoinWebUrl()(*string) + GetLobbyBypassSettings()(LobbyBypassSettingsable) + GetMeetingAttendanceReport()(MeetingAttendanceReportable) + GetParticipants()(MeetingParticipantsable) + GetRecordAutomatically()(*bool) + GetRecording()([]byte) + GetRegistration()(MeetingRegistrationable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSubject()(*string) + GetTranscripts()([]CallTranscriptable) + GetVideoTeleconferenceId()(*string) + GetVirtualAppointment()(VirtualAppointmentable) + GetWatermarkProtection()(WatermarkProtectionValuesable) + SetAllowAttendeeToEnableCamera(value *bool)() + SetAllowAttendeeToEnableMic(value *bool)() + SetAllowedPresenters(value *OnlineMeetingPresenters)() + SetAllowTeamworkReactions(value *bool)() + SetAlternativeRecording(value []byte)() + SetAnonymizeIdentityForRoles(value []OnlineMeetingRole)() + SetAttendanceReports(value []MeetingAttendanceReportable)() + SetAttendeeReport(value []byte)() + SetAudioConferencing(value AudioConferencingable)() + SetBroadcastSettings(value BroadcastMeetingSettingsable)() + SetCapabilities(value []MeetingCapabilities)() + SetChatInfo(value ChatInfoable)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExternalId(value *string)() + SetIsBroadcast(value *bool)() + SetIsEntryExitAnnounced(value *bool)() + SetJoinInformation(value ItemBodyable)() + SetJoinMeetingIdSettings(value JoinMeetingIdSettingsable)() + SetJoinUrl(value *string)() + SetJoinWebUrl(value *string)() + SetLobbyBypassSettings(value LobbyBypassSettingsable)() + SetMeetingAttendanceReport(value MeetingAttendanceReportable)() + SetParticipants(value MeetingParticipantsable)() + SetRecordAutomatically(value *bool)() + SetRecording(value []byte)() + SetRegistration(value MeetingRegistrationable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSubject(value *string)() + SetTranscripts(value []CallTranscriptable)() + SetVideoTeleconferenceId(value *string)() + SetVirtualAppointment(value VirtualAppointmentable)() + SetWatermarkProtection(value WatermarkProtectionValuesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider.go b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider.go new file mode 100644 index 000000000..9573f6510 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider.go @@ -0,0 +1,246 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectIdentityProvider +type OpenIdConnectIdentityProvider struct { + IdentityProviderBase + // After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. Required. + claimsMapping ClaimsMappingable + // The client identifier for the application obtained when registering the application with the identity provider. Required. + clientId *string + // The client secret for the application obtained when registering the application with the identity provider. The clientSecret has a dependency on responseType. When responseType is code, a secret is required for the auth code exchange.When responseType is id_token the secret is not required because there is no code exchange. The id_token is returned directly from the authorization response. This is write-only. A read operation returns ****. + clientSecret *string + // The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. + domainHint *string + // The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration. Provide the metadata URL for the OpenID Connect identity provider you add. Read-only. Required. + metadataUrl *string + // The responseMode property + responseMode *OpenIdConnectResponseMode + // The responseType property + responseType *OpenIdConnectResponseTypes + // Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended, separated by a space. For more details about the scope limitations see RFC6749 Section 3.3. Required. + scope *string +} +// NewOpenIdConnectIdentityProvider instantiates a new OpenIdConnectIdentityProvider and sets the default values. +func NewOpenIdConnectIdentityProvider()(*OpenIdConnectIdentityProvider) { + m := &OpenIdConnectIdentityProvider{ + IdentityProviderBase: *NewIdentityProviderBase(), + } + odataTypeValue := "#microsoft.graph.openIdConnectIdentityProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOpenIdConnectIdentityProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenIdConnectIdentityProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenIdConnectIdentityProvider(), nil +} +// GetClaimsMapping gets the claimsMapping property value. After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. Required. +func (m *OpenIdConnectIdentityProvider) GetClaimsMapping()(ClaimsMappingable) { + return m.claimsMapping +} +// GetClientId gets the clientId property value. The client identifier for the application obtained when registering the application with the identity provider. Required. +func (m *OpenIdConnectIdentityProvider) GetClientId()(*string) { + return m.clientId +} +// GetClientSecret gets the clientSecret property value. The client secret for the application obtained when registering the application with the identity provider. The clientSecret has a dependency on responseType. When responseType is code, a secret is required for the auth code exchange.When responseType is id_token the secret is not required because there is no code exchange. The id_token is returned directly from the authorization response. This is write-only. A read operation returns ****. +func (m *OpenIdConnectIdentityProvider) GetClientSecret()(*string) { + return m.clientSecret +} +// GetDomainHint gets the domainHint property value. The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. +func (m *OpenIdConnectIdentityProvider) GetDomainHint()(*string) { + return m.domainHint +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenIdConnectIdentityProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityProviderBase.GetFieldDeserializers() + res["claimsMapping"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClaimsMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClaimsMapping(val.(ClaimsMappingable)) + } + return nil + } + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["clientSecret"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientSecret(val) + } + return nil + } + res["domainHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainHint(val) + } + return nil + } + res["metadataUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadataUrl(val) + } + return nil + } + res["responseMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOpenIdConnectResponseMode) + if err != nil { + return err + } + if val != nil { + m.SetResponseMode(val.(*OpenIdConnectResponseMode)) + } + return nil + } + res["responseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOpenIdConnectResponseTypes) + if err != nil { + return err + } + if val != nil { + m.SetResponseType(val.(*OpenIdConnectResponseTypes)) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScope(val) + } + return nil + } + return res +} +// GetMetadataUrl gets the metadataUrl property value. The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration. Provide the metadata URL for the OpenID Connect identity provider you add. Read-only. Required. +func (m *OpenIdConnectIdentityProvider) GetMetadataUrl()(*string) { + return m.metadataUrl +} +// GetResponseMode gets the responseMode property value. The responseMode property +func (m *OpenIdConnectIdentityProvider) GetResponseMode()(*OpenIdConnectResponseMode) { + return m.responseMode +} +// GetResponseType gets the responseType property value. The responseType property +func (m *OpenIdConnectIdentityProvider) GetResponseType()(*OpenIdConnectResponseTypes) { + return m.responseType +} +// GetScope gets the scope property value. Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended, separated by a space. For more details about the scope limitations see RFC6749 Section 3.3. Required. +func (m *OpenIdConnectIdentityProvider) GetScope()(*string) { + return m.scope +} +// Serialize serializes information the current object +func (m *OpenIdConnectIdentityProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityProviderBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("claimsMapping", m.GetClaimsMapping()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientSecret", m.GetClientSecret()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domainHint", m.GetDomainHint()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("metadataUrl", m.GetMetadataUrl()) + if err != nil { + return err + } + } + if m.GetResponseMode() != nil { + cast := (*m.GetResponseMode()).String() + err = writer.WriteStringValue("responseMode", &cast) + if err != nil { + return err + } + } + if m.GetResponseType() != nil { + cast := (*m.GetResponseType()).String() + err = writer.WriteStringValue("responseType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("scope", m.GetScope()) + if err != nil { + return err + } + } + return nil +} +// SetClaimsMapping sets the claimsMapping property value. After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. Required. +func (m *OpenIdConnectIdentityProvider) SetClaimsMapping(value ClaimsMappingable)() { + m.claimsMapping = value +} +// SetClientId sets the clientId property value. The client identifier for the application obtained when registering the application with the identity provider. Required. +func (m *OpenIdConnectIdentityProvider) SetClientId(value *string)() { + m.clientId = value +} +// SetClientSecret sets the clientSecret property value. The client secret for the application obtained when registering the application with the identity provider. The clientSecret has a dependency on responseType. When responseType is code, a secret is required for the auth code exchange.When responseType is id_token the secret is not required because there is no code exchange. The id_token is returned directly from the authorization response. This is write-only. A read operation returns ****. +func (m *OpenIdConnectIdentityProvider) SetClientSecret(value *string)() { + m.clientSecret = value +} +// SetDomainHint sets the domainHint property value. The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. +func (m *OpenIdConnectIdentityProvider) SetDomainHint(value *string)() { + m.domainHint = value +} +// SetMetadataUrl sets the metadataUrl property value. The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration. Provide the metadata URL for the OpenID Connect identity provider you add. Read-only. Required. +func (m *OpenIdConnectIdentityProvider) SetMetadataUrl(value *string)() { + m.metadataUrl = value +} +// SetResponseMode sets the responseMode property value. The responseMode property +func (m *OpenIdConnectIdentityProvider) SetResponseMode(value *OpenIdConnectResponseMode)() { + m.responseMode = value +} +// SetResponseType sets the responseType property value. The responseType property +func (m *OpenIdConnectIdentityProvider) SetResponseType(value *OpenIdConnectResponseTypes)() { + m.responseType = value +} +// SetScope sets the scope property value. Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended, separated by a space. For more details about the scope limitations see RFC6749 Section 3.3. Required. +func (m *OpenIdConnectIdentityProvider) SetScope(value *string)() { + m.scope = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_response.go new file mode 100644 index 000000000..ae03139bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectIdentityProviderCollectionResponse +type OpenIdConnectIdentityProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OpenIdConnectIdentityProviderable +} +// NewOpenIdConnectIdentityProviderCollectionResponse instantiates a new OpenIdConnectIdentityProviderCollectionResponse and sets the default values. +func NewOpenIdConnectIdentityProviderCollectionResponse()(*OpenIdConnectIdentityProviderCollectionResponse) { + m := &OpenIdConnectIdentityProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOpenIdConnectIdentityProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenIdConnectIdentityProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenIdConnectIdentityProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenIdConnectIdentityProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenIdConnectIdentityProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenIdConnectIdentityProviderable, len(val)) + for i, v := range val { + res[i] = v.(OpenIdConnectIdentityProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OpenIdConnectIdentityProviderCollectionResponse) GetValue()([]OpenIdConnectIdentityProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *OpenIdConnectIdentityProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OpenIdConnectIdentityProviderCollectionResponse) SetValue(value []OpenIdConnectIdentityProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_responseable.go new file mode 100644 index 000000000..79f2f22ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectIdentityProviderCollectionResponseable +type OpenIdConnectIdentityProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OpenIdConnectIdentityProviderable) + SetValue(value []OpenIdConnectIdentityProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_identity_providerable.go b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_providerable.go new file mode 100644 index 000000000..1bcb18cca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_identity_providerable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectIdentityProviderable +type OpenIdConnectIdentityProviderable interface { + IdentityProviderBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClaimsMapping()(ClaimsMappingable) + GetClientId()(*string) + GetClientSecret()(*string) + GetDomainHint()(*string) + GetMetadataUrl()(*string) + GetResponseMode()(*OpenIdConnectResponseMode) + GetResponseType()(*OpenIdConnectResponseTypes) + GetScope()(*string) + SetClaimsMapping(value ClaimsMappingable)() + SetClientId(value *string)() + SetClientSecret(value *string)() + SetDomainHint(value *string)() + SetMetadataUrl(value *string)() + SetResponseMode(value *OpenIdConnectResponseMode)() + SetResponseType(value *OpenIdConnectResponseTypes)() + SetScope(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_provider.go b/src/internal/connector/graph/betasdk/models/open_id_connect_provider.go new file mode 100644 index 000000000..39ca864c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_provider.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectProvider +type OpenIdConnectProvider struct { + IdentityProvider + // After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. It is a required property. + claimsMapping ClaimsMappingable + // The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. + domainHint *string + // The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration . For the OpenID Connect identity provider you are looking to add, you will need to provide the metadata URL. It is a required property and is read only after creation. + metadataUrl *string + // The responseMode property + responseMode *OpenIdConnectResponseMode + // The responseType property + responseType *OpenIdConnectResponseTypes + // Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended separated by space. For more details about the scope limitations see RFC6749 Section 3.3. It is a required property. + scope *string +} +// NewOpenIdConnectProvider instantiates a new OpenIdConnectProvider and sets the default values. +func NewOpenIdConnectProvider()(*OpenIdConnectProvider) { + m := &OpenIdConnectProvider{ + IdentityProvider: *NewIdentityProvider(), + } + return m +} +// CreateOpenIdConnectProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenIdConnectProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenIdConnectProvider(), nil +} +// GetClaimsMapping gets the claimsMapping property value. After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. It is a required property. +func (m *OpenIdConnectProvider) GetClaimsMapping()(ClaimsMappingable) { + return m.claimsMapping +} +// GetDomainHint gets the domainHint property value. The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. +func (m *OpenIdConnectProvider) GetDomainHint()(*string) { + return m.domainHint +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenIdConnectProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityProvider.GetFieldDeserializers() + res["claimsMapping"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateClaimsMappingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClaimsMapping(val.(ClaimsMappingable)) + } + return nil + } + res["domainHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainHint(val) + } + return nil + } + res["metadataUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadataUrl(val) + } + return nil + } + res["responseMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOpenIdConnectResponseMode) + if err != nil { + return err + } + if val != nil { + m.SetResponseMode(val.(*OpenIdConnectResponseMode)) + } + return nil + } + res["responseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOpenIdConnectResponseTypes) + if err != nil { + return err + } + if val != nil { + m.SetResponseType(val.(*OpenIdConnectResponseTypes)) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScope(val) + } + return nil + } + return res +} +// GetMetadataUrl gets the metadataUrl property value. The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration . For the OpenID Connect identity provider you are looking to add, you will need to provide the metadata URL. It is a required property and is read only after creation. +func (m *OpenIdConnectProvider) GetMetadataUrl()(*string) { + return m.metadataUrl +} +// GetResponseMode gets the responseMode property value. The responseMode property +func (m *OpenIdConnectProvider) GetResponseMode()(*OpenIdConnectResponseMode) { + return m.responseMode +} +// GetResponseType gets the responseType property value. The responseType property +func (m *OpenIdConnectProvider) GetResponseType()(*OpenIdConnectResponseTypes) { + return m.responseType +} +// GetScope gets the scope property value. Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended separated by space. For more details about the scope limitations see RFC6749 Section 3.3. It is a required property. +func (m *OpenIdConnectProvider) GetScope()(*string) { + return m.scope +} +// Serialize serializes information the current object +func (m *OpenIdConnectProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityProvider.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("claimsMapping", m.GetClaimsMapping()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("domainHint", m.GetDomainHint()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("metadataUrl", m.GetMetadataUrl()) + if err != nil { + return err + } + } + if m.GetResponseMode() != nil { + cast := (*m.GetResponseMode()).String() + err = writer.WriteStringValue("responseMode", &cast) + if err != nil { + return err + } + } + if m.GetResponseType() != nil { + cast := (*m.GetResponseType()).String() + err = writer.WriteStringValue("responseType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("scope", m.GetScope()) + if err != nil { + return err + } + } + return nil +} +// SetClaimsMapping sets the claimsMapping property value. After the OIDC provider sends an ID token back to Azure AD, Azure AD needs to be able to map the claims from the received token to the claims that Azure AD recognizes and uses. This complex type captures that mapping. It is a required property. +func (m *OpenIdConnectProvider) SetClaimsMapping(value ClaimsMappingable)() { + m.claimsMapping = value +} +// SetDomainHint sets the domainHint property value. The domain hint can be used to skip directly to the sign-in page of the specified identity provider, instead of having the user make a selection among the list of available identity providers. +func (m *OpenIdConnectProvider) SetDomainHint(value *string)() { + m.domainHint = value +} +// SetMetadataUrl sets the metadataUrl property value. The URL for the metadata document of the OpenID Connect identity provider. Every OpenID Connect identity provider describes a metadata document that contains most of the information required to perform sign-in. This includes information such as the URLs to use and the location of the service's public signing keys. The OpenID Connect metadata document is always located at an endpoint that ends in .well-known/openid-configuration . For the OpenID Connect identity provider you are looking to add, you will need to provide the metadata URL. It is a required property and is read only after creation. +func (m *OpenIdConnectProvider) SetMetadataUrl(value *string)() { + m.metadataUrl = value +} +// SetResponseMode sets the responseMode property value. The responseMode property +func (m *OpenIdConnectProvider) SetResponseMode(value *OpenIdConnectResponseMode)() { + m.responseMode = value +} +// SetResponseType sets the responseType property value. The responseType property +func (m *OpenIdConnectProvider) SetResponseType(value *OpenIdConnectResponseTypes)() { + m.responseType = value +} +// SetScope sets the scope property value. Scope defines the information and permissions you are looking to gather from your custom identity provider. OpenID Connect requests must contain the openid scope value in order to receive the ID token from the identity provider. Without the ID token, users are not able to sign in to Azure AD B2C using the custom identity provider. Other scopes can be appended separated by space. For more details about the scope limitations see RFC6749 Section 3.3. It is a required property. +func (m *OpenIdConnectProvider) SetScope(value *string)() { + m.scope = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_response.go new file mode 100644 index 000000000..10e037579 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectProviderCollectionResponse +type OpenIdConnectProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OpenIdConnectProviderable +} +// NewOpenIdConnectProviderCollectionResponse instantiates a new OpenIdConnectProviderCollectionResponse and sets the default values. +func NewOpenIdConnectProviderCollectionResponse()(*OpenIdConnectProviderCollectionResponse) { + m := &OpenIdConnectProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOpenIdConnectProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenIdConnectProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenIdConnectProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenIdConnectProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenIdConnectProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenIdConnectProviderable, len(val)) + for i, v := range val { + res[i] = v.(OpenIdConnectProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OpenIdConnectProviderCollectionResponse) GetValue()([]OpenIdConnectProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *OpenIdConnectProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OpenIdConnectProviderCollectionResponse) SetValue(value []OpenIdConnectProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_responseable.go new file mode 100644 index 000000000..847f54ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectProviderCollectionResponseable +type OpenIdConnectProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OpenIdConnectProviderable) + SetValue(value []OpenIdConnectProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_providerable.go b/src/internal/connector/graph/betasdk/models/open_id_connect_providerable.go new file mode 100644 index 000000000..c7052ad79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_providerable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenIdConnectProviderable +type OpenIdConnectProviderable interface { + IdentityProviderable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClaimsMapping()(ClaimsMappingable) + GetDomainHint()(*string) + GetMetadataUrl()(*string) + GetResponseMode()(*OpenIdConnectResponseMode) + GetResponseType()(*OpenIdConnectResponseTypes) + GetScope()(*string) + SetClaimsMapping(value ClaimsMappingable)() + SetDomainHint(value *string)() + SetMetadataUrl(value *string)() + SetResponseMode(value *OpenIdConnectResponseMode)() + SetResponseType(value *OpenIdConnectResponseTypes)() + SetScope(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_id_connect_response_mode.go b/src/internal/connector/graph/betasdk/models/open_id_connect_response_mode.go new file mode 100644 index 000000000..2d4c7444a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_response_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OpenIdConnectResponseMode int + +const ( + FORM_POST_OPENIDCONNECTRESPONSEMODE OpenIdConnectResponseMode = iota + QUERY_OPENIDCONNECTRESPONSEMODE + UNKNOWNFUTUREVALUE_OPENIDCONNECTRESPONSEMODE +) + +func (i OpenIdConnectResponseMode) String() string { + return []string{"form_post", "query", "unknownFutureValue"}[i] +} +func ParseOpenIdConnectResponseMode(v string) (interface{}, error) { + result := FORM_POST_OPENIDCONNECTRESPONSEMODE + switch v { + case "form_post": + result = FORM_POST_OPENIDCONNECTRESPONSEMODE + case "query": + result = QUERY_OPENIDCONNECTRESPONSEMODE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OPENIDCONNECTRESPONSEMODE + default: + return 0, errors.New("Unknown OpenIdConnectResponseMode value: " + v) + } + return &result, nil +} +func SerializeOpenIdConnectResponseMode(values []OpenIdConnectResponseMode) []string { + 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/open_id_connect_response_types.go b/src/internal/connector/graph/betasdk/models/open_id_connect_response_types.go new file mode 100644 index 000000000..d36a0e20a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_id_connect_response_types.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OpenIdConnectResponseTypes int + +const ( + CODE_OPENIDCONNECTRESPONSETYPES OpenIdConnectResponseTypes = iota + ID_TOKEN_OPENIDCONNECTRESPONSETYPES + TOKEN_OPENIDCONNECTRESPONSETYPES +) + +func (i OpenIdConnectResponseTypes) String() string { + return []string{"code", "id_token", "token"}[i] +} +func ParseOpenIdConnectResponseTypes(v string) (interface{}, error) { + result := CODE_OPENIDCONNECTRESPONSETYPES + switch v { + case "code": + result = CODE_OPENIDCONNECTRESPONSETYPES + case "id_token": + result = ID_TOKEN_OPENIDCONNECTRESPONSETYPES + case "token": + result = TOKEN_OPENIDCONNECTRESPONSETYPES + default: + return 0, errors.New("Unknown OpenIdConnectResponseTypes value: " + v) + } + return &result, nil +} +func SerializeOpenIdConnectResponseTypes(values []OpenIdConnectResponseTypes) []string { + 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/open_shift.go b/src/internal/connector/graph/betasdk/models/open_shift.go new file mode 100644 index 000000000..47c7c639d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShift +type OpenShift struct { + ChangeTrackedEntity + // An unpublished open shift. + draftOpenShift OpenShiftItemable + // The isStagedForDeletion property + isStagedForDeletion *bool + // ID for the scheduling group that the open shift belongs to. + schedulingGroupId *string + // A published open shift. + sharedOpenShift OpenShiftItemable +} +// NewOpenShift instantiates a new OpenShift and sets the default values. +func NewOpenShift()(*OpenShift) { + m := &OpenShift{ + ChangeTrackedEntity: *NewChangeTrackedEntity(), + } + odataTypeValue := "#microsoft.graph.openShift"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOpenShiftFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenShiftFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenShift(), nil +} +// GetDraftOpenShift gets the draftOpenShift property value. An unpublished open shift. +func (m *OpenShift) GetDraftOpenShift()(OpenShiftItemable) { + return m.draftOpenShift +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenShift) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ChangeTrackedEntity.GetFieldDeserializers() + res["draftOpenShift"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOpenShiftItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDraftOpenShift(val.(OpenShiftItemable)) + } + return nil + } + res["isStagedForDeletion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsStagedForDeletion(val) + } + return nil + } + res["schedulingGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSchedulingGroupId(val) + } + return nil + } + res["sharedOpenShift"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOpenShiftItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharedOpenShift(val.(OpenShiftItemable)) + } + return nil + } + return res +} +// GetIsStagedForDeletion gets the isStagedForDeletion property value. The isStagedForDeletion property +func (m *OpenShift) GetIsStagedForDeletion()(*bool) { + return m.isStagedForDeletion +} +// GetSchedulingGroupId gets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to. +func (m *OpenShift) GetSchedulingGroupId()(*string) { + return m.schedulingGroupId +} +// GetSharedOpenShift gets the sharedOpenShift property value. A published open shift. +func (m *OpenShift) GetSharedOpenShift()(OpenShiftItemable) { + return m.sharedOpenShift +} +// Serialize serializes information the current object +func (m *OpenShift) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ChangeTrackedEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("draftOpenShift", m.GetDraftOpenShift()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isStagedForDeletion", m.GetIsStagedForDeletion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("schedulingGroupId", m.GetSchedulingGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharedOpenShift", m.GetSharedOpenShift()) + if err != nil { + return err + } + } + return nil +} +// SetDraftOpenShift sets the draftOpenShift property value. An unpublished open shift. +func (m *OpenShift) SetDraftOpenShift(value OpenShiftItemable)() { + m.draftOpenShift = value +} +// SetIsStagedForDeletion sets the isStagedForDeletion property value. The isStagedForDeletion property +func (m *OpenShift) SetIsStagedForDeletion(value *bool)() { + m.isStagedForDeletion = value +} +// SetSchedulingGroupId sets the schedulingGroupId property value. ID for the scheduling group that the open shift belongs to. +func (m *OpenShift) SetSchedulingGroupId(value *string)() { + m.schedulingGroupId = value +} +// SetSharedOpenShift sets the sharedOpenShift property value. A published open shift. +func (m *OpenShift) SetSharedOpenShift(value OpenShiftItemable)() { + m.sharedOpenShift = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_change_request.go b/src/internal/connector/graph/betasdk/models/open_shift_change_request.go new file mode 100644 index 000000000..7eacb69db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_change_request.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftChangeRequest +type OpenShiftChangeRequest struct { + ScheduleChangeRequest + // ID for the open shift. + openShiftId *string +} +// NewOpenShiftChangeRequest instantiates a new OpenShiftChangeRequest and sets the default values. +func NewOpenShiftChangeRequest()(*OpenShiftChangeRequest) { + m := &OpenShiftChangeRequest{ + ScheduleChangeRequest: *NewScheduleChangeRequest(), + } + odataTypeValue := "#microsoft.graph.openShiftChangeRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOpenShiftChangeRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenShiftChangeRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenShiftChangeRequest(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenShiftChangeRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ScheduleChangeRequest.GetFieldDeserializers() + res["openShiftId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOpenShiftId(val) + } + return nil + } + return res +} +// GetOpenShiftId gets the openShiftId property value. ID for the open shift. +func (m *OpenShiftChangeRequest) GetOpenShiftId()(*string) { + return m.openShiftId +} +// Serialize serializes information the current object +func (m *OpenShiftChangeRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ScheduleChangeRequest.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("openShiftId", m.GetOpenShiftId()) + if err != nil { + return err + } + } + return nil +} +// SetOpenShiftId sets the openShiftId property value. ID for the open shift. +func (m *OpenShiftChangeRequest) SetOpenShiftId(value *string)() { + m.openShiftId = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_response.go b/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_response.go new file mode 100644 index 000000000..125365f99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftChangeRequestCollectionResponse +type OpenShiftChangeRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OpenShiftChangeRequestable +} +// NewOpenShiftChangeRequestCollectionResponse instantiates a new OpenShiftChangeRequestCollectionResponse and sets the default values. +func NewOpenShiftChangeRequestCollectionResponse()(*OpenShiftChangeRequestCollectionResponse) { + m := &OpenShiftChangeRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOpenShiftChangeRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenShiftChangeRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenShiftChangeRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenShiftChangeRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenShiftChangeRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenShiftChangeRequestable, len(val)) + for i, v := range val { + res[i] = v.(OpenShiftChangeRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OpenShiftChangeRequestCollectionResponse) GetValue()([]OpenShiftChangeRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *OpenShiftChangeRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OpenShiftChangeRequestCollectionResponse) SetValue(value []OpenShiftChangeRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_responseable.go new file mode 100644 index 000000000..b77c87e9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_change_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftChangeRequestCollectionResponseable +type OpenShiftChangeRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OpenShiftChangeRequestable) + SetValue(value []OpenShiftChangeRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_change_requestable.go b/src/internal/connector/graph/betasdk/models/open_shift_change_requestable.go new file mode 100644 index 000000000..7133f340b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_change_requestable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftChangeRequestable +type OpenShiftChangeRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ScheduleChangeRequestable + GetOpenShiftId()(*string) + SetOpenShiftId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_collection_response.go b/src/internal/connector/graph/betasdk/models/open_shift_collection_response.go new file mode 100644 index 000000000..643bbf860 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftCollectionResponse +type OpenShiftCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OpenShiftable +} +// NewOpenShiftCollectionResponse instantiates a new OpenShiftCollectionResponse and sets the default values. +func NewOpenShiftCollectionResponse()(*OpenShiftCollectionResponse) { + m := &OpenShiftCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOpenShiftCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenShiftCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenShiftCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenShiftCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenShiftFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenShiftable, len(val)) + for i, v := range val { + res[i] = v.(OpenShiftable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OpenShiftCollectionResponse) GetValue()([]OpenShiftable) { + return m.value +} +// Serialize serializes information the current object +func (m *OpenShiftCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OpenShiftCollectionResponse) SetValue(value []OpenShiftable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_collection_responseable.go b/src/internal/connector/graph/betasdk/models/open_shift_collection_responseable.go new file mode 100644 index 000000000..d589c58f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftCollectionResponseable +type OpenShiftCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OpenShiftable) + SetValue(value []OpenShiftable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_item.go b/src/internal/connector/graph/betasdk/models/open_shift_item.go new file mode 100644 index 000000000..78c374530 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_item.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftItem +type OpenShiftItem struct { + ShiftItem + // Count of the number of slots for the given open shift. + openSlotCount *int32 +} +// NewOpenShiftItem instantiates a new OpenShiftItem and sets the default values. +func NewOpenShiftItem()(*OpenShiftItem) { + m := &OpenShiftItem{ + ShiftItem: *NewShiftItem(), + } + odataTypeValue := "#microsoft.graph.openShiftItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOpenShiftItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenShiftItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenShiftItem(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenShiftItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ShiftItem.GetFieldDeserializers() + res["openSlotCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOpenSlotCount(val) + } + return nil + } + return res +} +// GetOpenSlotCount gets the openSlotCount property value. Count of the number of slots for the given open shift. +func (m *OpenShiftItem) GetOpenSlotCount()(*int32) { + return m.openSlotCount +} +// Serialize serializes information the current object +func (m *OpenShiftItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ShiftItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("openSlotCount", m.GetOpenSlotCount()) + if err != nil { + return err + } + } + return nil +} +// SetOpenSlotCount sets the openSlotCount property value. Count of the number of slots for the given open shift. +func (m *OpenShiftItem) SetOpenSlotCount(value *int32)() { + m.openSlotCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_shift_itemable.go b/src/internal/connector/graph/betasdk/models/open_shift_itemable.go new file mode 100644 index 000000000..4afbd1205 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shift_itemable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftItemable +type OpenShiftItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ShiftItemable + GetOpenSlotCount()(*int32) + SetOpenSlotCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_shiftable.go b/src/internal/connector/graph/betasdk/models/open_shiftable.go new file mode 100644 index 000000000..3af8ea0c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_shiftable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenShiftable +type OpenShiftable interface { + ChangeTrackedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDraftOpenShift()(OpenShiftItemable) + GetIsStagedForDeletion()(*bool) + GetSchedulingGroupId()(*string) + GetSharedOpenShift()(OpenShiftItemable) + SetDraftOpenShift(value OpenShiftItemable)() + SetIsStagedForDeletion(value *bool)() + SetSchedulingGroupId(value *string)() + SetSharedOpenShift(value OpenShiftItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_type_extension.go b/src/internal/connector/graph/betasdk/models/open_type_extension.go new file mode 100644 index 000000000..6ad278886 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_type_extension.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenTypeExtension +type OpenTypeExtension struct { + Extension + // A unique text identifier for an open type data extension. Required. + extensionName *string +} +// NewOpenTypeExtension instantiates a new OpenTypeExtension and sets the default values. +func NewOpenTypeExtension()(*OpenTypeExtension) { + m := &OpenTypeExtension{ + Extension: *NewExtension(), + } + odataTypeValue := "#microsoft.graph.openTypeExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOpenTypeExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenTypeExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenTypeExtension(), nil +} +// GetExtensionName gets the extensionName property value. A unique text identifier for an open type data extension. Required. +func (m *OpenTypeExtension) GetExtensionName()(*string) { + return m.extensionName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenTypeExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Extension.GetFieldDeserializers() + res["extensionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OpenTypeExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Extension.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("extensionName", m.GetExtensionName()) + if err != nil { + return err + } + } + return nil +} +// SetExtensionName sets the extensionName property value. A unique text identifier for an open type data extension. Required. +func (m *OpenTypeExtension) SetExtensionName(value *string)() { + m.extensionName = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_type_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/open_type_extension_collection_response.go new file mode 100644 index 000000000..18841f57f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_type_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenTypeExtensionCollectionResponse +type OpenTypeExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OpenTypeExtensionable +} +// NewOpenTypeExtensionCollectionResponse instantiates a new OpenTypeExtensionCollectionResponse and sets the default values. +func NewOpenTypeExtensionCollectionResponse()(*OpenTypeExtensionCollectionResponse) { + m := &OpenTypeExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOpenTypeExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOpenTypeExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOpenTypeExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OpenTypeExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenTypeExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenTypeExtensionable, len(val)) + for i, v := range val { + res[i] = v.(OpenTypeExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OpenTypeExtensionCollectionResponse) GetValue()([]OpenTypeExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *OpenTypeExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OpenTypeExtensionCollectionResponse) SetValue(value []OpenTypeExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/open_type_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/open_type_extension_collection_responseable.go new file mode 100644 index 000000000..f25747f68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_type_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenTypeExtensionCollectionResponseable +type OpenTypeExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OpenTypeExtensionable) + SetValue(value []OpenTypeExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/open_type_extensionable.go b/src/internal/connector/graph/betasdk/models/open_type_extensionable.go new file mode 100644 index 000000000..6e2188a93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/open_type_extensionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OpenTypeExtensionable +type OpenTypeExtensionable interface { + Extensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExtensionName()(*string) + SetExtensionName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/operating_system_upgrade_eligibility.go b/src/internal/connector/graph/betasdk/models/operating_system_upgrade_eligibility.go new file mode 100644 index 000000000..2a8fa43e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operating_system_upgrade_eligibility.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OperatingSystemUpgradeEligibility int + +const ( + // The device is upgraded to latest version of windows + UPGRADED_OPERATINGSYSTEMUPGRADEELIGIBILITY OperatingSystemUpgradeEligibility = iota + // Not enough data available to compute the eligibility of device for windows upgrade + UNKNOWN_OPERATINGSYSTEMUPGRADEELIGIBILITY + // The device is not capable for windows upgrade + NOTCAPABLE_OPERATINGSYSTEMUPGRADEELIGIBILITY + // The device is capable for windows upgrade + CAPABLE_OPERATINGSYSTEMUPGRADEELIGIBILITY +) + +func (i OperatingSystemUpgradeEligibility) String() string { + return []string{"upgraded", "unknown", "notCapable", "capable"}[i] +} +func ParseOperatingSystemUpgradeEligibility(v string) (interface{}, error) { + result := UPGRADED_OPERATINGSYSTEMUPGRADEELIGIBILITY + switch v { + case "upgraded": + result = UPGRADED_OPERATINGSYSTEMUPGRADEELIGIBILITY + case "unknown": + result = UNKNOWN_OPERATINGSYSTEMUPGRADEELIGIBILITY + case "notCapable": + result = NOTCAPABLE_OPERATINGSYSTEMUPGRADEELIGIBILITY + case "capable": + result = CAPABLE_OPERATINGSYSTEMUPGRADEELIGIBILITY + default: + return 0, errors.New("Unknown OperatingSystemUpgradeEligibility value: " + v) + } + return &result, nil +} +func SerializeOperatingSystemUpgradeEligibility(values []OperatingSystemUpgradeEligibility) []string { + 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/operating_system_version_range.go b/src/internal/connector/graph/betasdk/models/operating_system_version_range.go new file mode 100644 index 000000000..87663c390 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operating_system_version_range.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperatingSystemVersionRange operating System version range. +type OperatingSystemVersionRange 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 description of this range (e.g. Valid 1702 builds) + description *string + // The highest inclusive version that this range contains. + highestVersion *string + // The lowest inclusive version that this range contains. + lowestVersion *string + // The OdataType property + odataType *string +} +// NewOperatingSystemVersionRange instantiates a new operatingSystemVersionRange and sets the default values. +func NewOperatingSystemVersionRange()(*OperatingSystemVersionRange) { + m := &OperatingSystemVersionRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOperatingSystemVersionRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperatingSystemVersionRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOperatingSystemVersionRange(), 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 *OperatingSystemVersionRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description of this range (e.g. Valid 1702 builds) +func (m *OperatingSystemVersionRange) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OperatingSystemVersionRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["highestVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHighestVersion(val) + } + return nil + } + res["lowestVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLowestVersion(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 + } + return res +} +// GetHighestVersion gets the highestVersion property value. The highest inclusive version that this range contains. +func (m *OperatingSystemVersionRange) GetHighestVersion()(*string) { + return m.highestVersion +} +// GetLowestVersion gets the lowestVersion property value. The lowest inclusive version that this range contains. +func (m *OperatingSystemVersionRange) GetLowestVersion()(*string) { + return m.lowestVersion +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OperatingSystemVersionRange) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OperatingSystemVersionRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("highestVersion", m.GetHighestVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("lowestVersion", m.GetLowestVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OperatingSystemVersionRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of this range (e.g. Valid 1702 builds) +func (m *OperatingSystemVersionRange) SetDescription(value *string)() { + m.description = value +} +// SetHighestVersion sets the highestVersion property value. The highest inclusive version that this range contains. +func (m *OperatingSystemVersionRange) SetHighestVersion(value *string)() { + m.highestVersion = value +} +// SetLowestVersion sets the lowestVersion property value. The lowest inclusive version that this range contains. +func (m *OperatingSystemVersionRange) SetLowestVersion(value *string)() { + m.lowestVersion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OperatingSystemVersionRange) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_response.go b/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_response.go new file mode 100644 index 000000000..8029d1b2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperatingSystemVersionRangeCollectionResponse +type OperatingSystemVersionRangeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OperatingSystemVersionRangeable +} +// NewOperatingSystemVersionRangeCollectionResponse instantiates a new OperatingSystemVersionRangeCollectionResponse and sets the default values. +func NewOperatingSystemVersionRangeCollectionResponse()(*OperatingSystemVersionRangeCollectionResponse) { + m := &OperatingSystemVersionRangeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOperatingSystemVersionRangeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperatingSystemVersionRangeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOperatingSystemVersionRangeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OperatingSystemVersionRangeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOperatingSystemVersionRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OperatingSystemVersionRangeable, len(val)) + for i, v := range val { + res[i] = v.(OperatingSystemVersionRangeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OperatingSystemVersionRangeCollectionResponse) GetValue()([]OperatingSystemVersionRangeable) { + return m.value +} +// Serialize serializes information the current object +func (m *OperatingSystemVersionRangeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OperatingSystemVersionRangeCollectionResponse) SetValue(value []OperatingSystemVersionRangeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_responseable.go b/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_responseable.go new file mode 100644 index 000000000..a22d46db2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operating_system_version_range_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperatingSystemVersionRangeCollectionResponseable +type OperatingSystemVersionRangeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OperatingSystemVersionRangeable) + SetValue(value []OperatingSystemVersionRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/operating_system_version_rangeable.go b/src/internal/connector/graph/betasdk/models/operating_system_version_rangeable.go new file mode 100644 index 000000000..ec37555a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operating_system_version_rangeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperatingSystemVersionRangeable +type OperatingSystemVersionRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetHighestVersion()(*string) + GetLowestVersion()(*string) + GetOdataType()(*string) + SetDescription(value *string)() + SetHighestVersion(value *string)() + SetLowestVersion(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/operation.go b/src/internal/connector/graph/betasdk/models/operation.go new file mode 100644 index 000000000..a58f87b23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operation.go @@ -0,0 +1,132 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Operation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Operation struct { + Entity + // The start time of the operation. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The time of the last action of the operation. + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Possible values are: notStarted, running, completed, failed. Read-only. + status *OperationStatus +} +// NewOperation instantiates a new operation and sets the default values. +func NewOperation()(*Operation) { + m := &Operation{ + Entity: *NewEntity(), + } + return m +} +// CreateOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.onenoteOperation": + return NewOnenoteOperation(), nil + } + } + } + } + return NewOperation(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The start time of the operation. +func (m *Operation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Operation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*OperationStatus)) + } + return nil + } + return res +} +// GetLastActionDateTime gets the lastActionDateTime property value. The time of the last action of the operation. +func (m *Operation) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetStatus gets the status property value. Possible values are: notStarted, running, completed, failed. Read-only. +func (m *Operation) GetStatus()(*OperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *Operation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The start time of the operation. +func (m *Operation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. The time of the last action of the operation. +func (m *Operation) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetStatus sets the status property value. Possible values are: notStarted, running, completed, failed. Read-only. +func (m *Operation) SetStatus(value *OperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/operation_error.go b/src/internal/connector/graph/betasdk/models/operation_error.go new file mode 100644 index 000000000..d0575452d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operation_error.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperationError +type OperationError struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Operation error code. + code *string + // Operation error message. + message *string + // The OdataType property + odataType *string +} +// NewOperationError instantiates a new operationError and sets the default values. +func NewOperationError()(*OperationError) { + m := &OperationError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOperationErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOperationErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOperationError(), 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 *OperationError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. Operation error code. +func (m *OperationError) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OperationError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetMessage gets the message property value. Operation error message. +func (m *OperationError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OperationError) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OperationError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OperationError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. Operation error code. +func (m *OperationError) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. Operation error message. +func (m *OperationError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OperationError) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/operation_errorable.go b/src/internal/connector/graph/betasdk/models/operation_errorable.go new file mode 100644 index 000000000..b16a9378c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operation_errorable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OperationErrorable +type OperationErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/operation_result.go b/src/internal/connector/graph/betasdk/models/operation_result.go new file mode 100644 index 000000000..0adbbf0da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operation_result.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OperationResult int + +const ( + SUCCESS_OPERATIONRESULT OperationResult = iota + FAILURE_OPERATIONRESULT + TIMEOUT_OPERATIONRESULT + UNKNOWNFUTUREVALUE_OPERATIONRESULT +) + +func (i OperationResult) String() string { + return []string{"success", "failure", "timeout", "unknownFutureValue"}[i] +} +func ParseOperationResult(v string) (interface{}, error) { + result := SUCCESS_OPERATIONRESULT + switch v { + case "success": + result = SUCCESS_OPERATIONRESULT + case "failure": + result = FAILURE_OPERATIONRESULT + case "timeout": + result = TIMEOUT_OPERATIONRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OPERATIONRESULT + default: + return 0, errors.New("Unknown OperationResult value: " + v) + } + return &result, nil +} +func SerializeOperationResult(values []OperationResult) []string { + 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/operation_status.go b/src/internal/connector/graph/betasdk/models/operation_status.go new file mode 100644 index 000000000..9dda332a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operation_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OperationStatus int + +const ( + NOTSTARTED_OPERATIONSTATUS OperationStatus = iota + RUNNING_OPERATIONSTATUS + COMPLETED_OPERATIONSTATUS + FAILED_OPERATIONSTATUS +) + +func (i OperationStatus) String() string { + return []string{"NotStarted", "Running", "Completed", "Failed"}[i] +} +func ParseOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_OPERATIONSTATUS + switch v { + case "NotStarted": + result = NOTSTARTED_OPERATIONSTATUS + case "Running": + result = RUNNING_OPERATIONSTATUS + case "Completed": + result = COMPLETED_OPERATIONSTATUS + case "Failed": + result = FAILED_OPERATIONSTATUS + default: + return 0, errors.New("Unknown OperationStatus value: " + v) + } + return &result, nil +} +func SerializeOperationStatus(values []OperationStatus) []string { + 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/operationable.go b/src/internal/connector/graph/betasdk/models/operationable.go new file mode 100644 index 000000000..22d95b584 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operationable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Operationable +type Operationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*OperationStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *OperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/operator.go b/src/internal/connector/graph/betasdk/models/operator.go new file mode 100644 index 000000000..8d5cda61e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/operator.go @@ -0,0 +1,128 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type Operator int + +const ( + // None operator. + NONE_OPERATOR Operator = iota + // And operator. + AND_OPERATOR + // Or operator. + OR_OPERATOR + // IsEquals operator. + ISEQUALS_OPERATOR + // NotEquals operator. + NOTEQUALS_OPERATOR + // GreaterThan operator. + GREATERTHAN_OPERATOR + // LessThan operator. + LESSTHAN_OPERATOR + // Between operator. + BETWEEN_OPERATOR + // NotBetween operator. + NOTBETWEEN_OPERATOR + // GreaterEquals operator. + GREATEREQUALS_OPERATOR + // LessEquals operator. + LESSEQUALS_OPERATOR + // DayTimeBetween operator. + DAYTIMEBETWEEN_OPERATOR + // BeginsWith operator. + BEGINSWITH_OPERATOR + // NotBeginsWith operator. + NOTBEGINSWITH_OPERATOR + // EndsWith operator. + ENDSWITH_OPERATOR + // NotEndsWith operator. + NOTENDSWITH_OPERATOR + // Contains operator. + CONTAINS_OPERATOR + // NotContains operator. + NOTCONTAINS_OPERATOR + // AllOf operator. + ALLOF_OPERATOR + // OneOf operator. + ONEOF_OPERATOR + // NoneOf operator. + NONEOF_OPERATOR + // SetEquals operator. + SETEQUALS_OPERATOR + // OrderedSetEquals operator. + ORDEREDSETEQUALS_OPERATOR + // SubsetOf operator. + SUBSETOF_OPERATOR + // ExcludesAll operator. + EXCLUDESALL_OPERATOR +) + +func (i Operator) String() string { + return []string{"none", "and", "or", "isEquals", "notEquals", "greaterThan", "lessThan", "between", "notBetween", "greaterEquals", "lessEquals", "dayTimeBetween", "beginsWith", "notBeginsWith", "endsWith", "notEndsWith", "contains", "notContains", "allOf", "oneOf", "noneOf", "setEquals", "orderedSetEquals", "subsetOf", "excludesAll"}[i] +} +func ParseOperator(v string) (interface{}, error) { + result := NONE_OPERATOR + switch v { + case "none": + result = NONE_OPERATOR + case "and": + result = AND_OPERATOR + case "or": + result = OR_OPERATOR + case "isEquals": + result = ISEQUALS_OPERATOR + case "notEquals": + result = NOTEQUALS_OPERATOR + case "greaterThan": + result = GREATERTHAN_OPERATOR + case "lessThan": + result = LESSTHAN_OPERATOR + case "between": + result = BETWEEN_OPERATOR + case "notBetween": + result = NOTBETWEEN_OPERATOR + case "greaterEquals": + result = GREATEREQUALS_OPERATOR + case "lessEquals": + result = LESSEQUALS_OPERATOR + case "dayTimeBetween": + result = DAYTIMEBETWEEN_OPERATOR + case "beginsWith": + result = BEGINSWITH_OPERATOR + case "notBeginsWith": + result = NOTBEGINSWITH_OPERATOR + case "endsWith": + result = ENDSWITH_OPERATOR + case "notEndsWith": + result = NOTENDSWITH_OPERATOR + case "contains": + result = CONTAINS_OPERATOR + case "notContains": + result = NOTCONTAINS_OPERATOR + case "allOf": + result = ALLOF_OPERATOR + case "oneOf": + result = ONEOF_OPERATOR + case "noneOf": + result = NONEOF_OPERATOR + case "setEquals": + result = SETEQUALS_OPERATOR + case "orderedSetEquals": + result = ORDEREDSETEQUALS_OPERATOR + case "subsetOf": + result = SUBSETOF_OPERATOR + case "excludesAll": + result = EXCLUDESALL_OPERATOR + default: + return 0, errors.New("Unknown Operator value: " + v) + } + return &result, nil +} +func SerializeOperator(values []Operator) []string { + 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/optional_claim.go b/src/internal/connector/graph/betasdk/models/optional_claim.go new file mode 100644 index 000000000..ef163f7a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claim.go @@ -0,0 +1,179 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaim +type OptionalClaim struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Additional properties of the claim. If a property exists in this collection, it modifies the behavior of the optional claim specified in the name property. + additionalProperties []string + // If the value is true, the claim specified by the client is necessary to ensure a smooth authorization experience for the specific task requested by the end user. The default value is false. + essential *bool + // The name of the optional claim. + name *string + // The OdataType property + odataType *string + // The source (directory object) of the claim. There are predefined claims and user-defined claims from extension properties. If the source value is null, the claim is a predefined optional claim. If the source value is user, the value in the name property is the extension property from the user object. + source *string +} +// NewOptionalClaim instantiates a new optionalClaim and sets the default values. +func NewOptionalClaim()(*OptionalClaim) { + m := &OptionalClaim{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOptionalClaimFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOptionalClaimFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOptionalClaim(), 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 *OptionalClaim) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdditionalProperties gets the additionalProperties property value. Additional properties of the claim. If a property exists in this collection, it modifies the behavior of the optional claim specified in the name property. +func (m *OptionalClaim) GetAdditionalProperties()([]string) { + return m.additionalProperties +} +// GetEssential gets the essential property value. If the value is true, the claim specified by the client is necessary to ensure a smooth authorization experience for the specific task requested by the end user. The default value is false. +func (m *OptionalClaim) GetEssential()(*bool) { + return m.essential +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OptionalClaim) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAdditionalProperties(res) + } + return nil + } + res["essential"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEssential(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the optional claim. +func (m *OptionalClaim) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OptionalClaim) GetOdataType()(*string) { + return m.odataType +} +// GetSource gets the source property value. The source (directory object) of the claim. There are predefined claims and user-defined claims from extension properties. If the source value is null, the claim is a predefined optional claim. If the source value is user, the value in the name property is the extension property from the user object. +func (m *OptionalClaim) GetSource()(*string) { + return m.source +} +// Serialize serializes information the current object +func (m *OptionalClaim) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAdditionalProperties() != nil { + err := writer.WriteCollectionOfStringValues("additionalProperties", m.GetAdditionalProperties()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("essential", m.GetEssential()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("source", m.GetSource()) + 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 *OptionalClaim) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdditionalProperties sets the additionalProperties property value. Additional properties of the claim. If a property exists in this collection, it modifies the behavior of the optional claim specified in the name property. +func (m *OptionalClaim) SetAdditionalProperties(value []string)() { + m.additionalProperties = value +} +// SetEssential sets the essential property value. If the value is true, the claim specified by the client is necessary to ensure a smooth authorization experience for the specific task requested by the end user. The default value is false. +func (m *OptionalClaim) SetEssential(value *bool)() { + m.essential = value +} +// SetName sets the name property value. The name of the optional claim. +func (m *OptionalClaim) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OptionalClaim) SetOdataType(value *string)() { + m.odataType = value +} +// SetSource sets the source property value. The source (directory object) of the claim. There are predefined claims and user-defined claims from extension properties. If the source value is null, the claim is a predefined optional claim. If the source value is user, the value in the name property is the extension property from the user object. +func (m *OptionalClaim) SetSource(value *string)() { + m.source = value +} diff --git a/src/internal/connector/graph/betasdk/models/optional_claim_collection_response.go b/src/internal/connector/graph/betasdk/models/optional_claim_collection_response.go new file mode 100644 index 000000000..8c555b7b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claim_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaimCollectionResponse +type OptionalClaimCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OptionalClaimable +} +// NewOptionalClaimCollectionResponse instantiates a new OptionalClaimCollectionResponse and sets the default values. +func NewOptionalClaimCollectionResponse()(*OptionalClaimCollectionResponse) { + m := &OptionalClaimCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOptionalClaimCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOptionalClaimCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOptionalClaimCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OptionalClaimCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOptionalClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OptionalClaimable, len(val)) + for i, v := range val { + res[i] = v.(OptionalClaimable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OptionalClaimCollectionResponse) GetValue()([]OptionalClaimable) { + return m.value +} +// Serialize serializes information the current object +func (m *OptionalClaimCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OptionalClaimCollectionResponse) SetValue(value []OptionalClaimable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/optional_claim_collection_responseable.go b/src/internal/connector/graph/betasdk/models/optional_claim_collection_responseable.go new file mode 100644 index 000000000..d7b3abbac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claim_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaimCollectionResponseable +type OptionalClaimCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OptionalClaimable) + SetValue(value []OptionalClaimable)() +} diff --git a/src/internal/connector/graph/betasdk/models/optional_claimable.go b/src/internal/connector/graph/betasdk/models/optional_claimable.go new file mode 100644 index 000000000..4cb36f946 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claimable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaimable +type OptionalClaimable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalProperties()([]string) + GetEssential()(*bool) + GetName()(*string) + GetOdataType()(*string) + GetSource()(*string) + SetAdditionalProperties(value []string)() + SetEssential(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() + SetSource(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/optional_claims.go b/src/internal/connector/graph/betasdk/models/optional_claims.go new file mode 100644 index 000000000..f3d708eec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claims.go @@ -0,0 +1,173 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaims +type OptionalClaims struct { + // The optional claims returned in the JWT access token. + accessToken []OptionalClaimable + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The optional claims returned in the JWT ID token. + idToken []OptionalClaimable + // The OdataType property + odataType *string + // The optional claims returned in the SAML token. + saml2Token []OptionalClaimable +} +// NewOptionalClaims instantiates a new optionalClaims and sets the default values. +func NewOptionalClaims()(*OptionalClaims) { + m := &OptionalClaims{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOptionalClaimsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOptionalClaimsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOptionalClaims(), nil +} +// GetAccessToken gets the accessToken property value. The optional claims returned in the JWT access token. +func (m *OptionalClaims) GetAccessToken()([]OptionalClaimable) { + return m.accessToken +} +// 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 *OptionalClaims) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OptionalClaims) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOptionalClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OptionalClaimable, len(val)) + for i, v := range val { + res[i] = v.(OptionalClaimable) + } + m.SetAccessToken(res) + } + return nil + } + res["idToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOptionalClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OptionalClaimable, len(val)) + for i, v := range val { + res[i] = v.(OptionalClaimable) + } + m.SetIdToken(res) + } + 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["saml2Token"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOptionalClaimFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OptionalClaimable, len(val)) + for i, v := range val { + res[i] = v.(OptionalClaimable) + } + m.SetSaml2Token(res) + } + return nil + } + return res +} +// GetIdToken gets the idToken property value. The optional claims returned in the JWT ID token. +func (m *OptionalClaims) GetIdToken()([]OptionalClaimable) { + return m.idToken +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OptionalClaims) GetOdataType()(*string) { + return m.odataType +} +// GetSaml2Token gets the saml2Token property value. The optional claims returned in the SAML token. +func (m *OptionalClaims) GetSaml2Token()([]OptionalClaimable) { + return m.saml2Token +} +// Serialize serializes information the current object +func (m *OptionalClaims) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccessToken() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccessToken())) + for i, v := range m.GetAccessToken() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("accessToken", cast) + if err != nil { + return err + } + } + if m.GetIdToken() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIdToken())) + for i, v := range m.GetIdToken() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("idToken", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSaml2Token() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSaml2Token())) + for i, v := range m.GetSaml2Token() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("saml2Token", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessToken sets the accessToken property value. The optional claims returned in the JWT access token. +func (m *OptionalClaims) SetAccessToken(value []OptionalClaimable)() { + m.accessToken = value +} +// 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 *OptionalClaims) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIdToken sets the idToken property value. The optional claims returned in the JWT ID token. +func (m *OptionalClaims) SetIdToken(value []OptionalClaimable)() { + m.idToken = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OptionalClaims) SetOdataType(value *string)() { + m.odataType = value +} +// SetSaml2Token sets the saml2Token property value. The optional claims returned in the SAML token. +func (m *OptionalClaims) SetSaml2Token(value []OptionalClaimable)() { + m.saml2Token = value +} diff --git a/src/internal/connector/graph/betasdk/models/optional_claimsable.go b/src/internal/connector/graph/betasdk/models/optional_claimsable.go new file mode 100644 index 000000000..2b8541276 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/optional_claimsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OptionalClaimsable +type OptionalClaimsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessToken()([]OptionalClaimable) + GetIdToken()([]OptionalClaimable) + GetOdataType()(*string) + GetSaml2Token()([]OptionalClaimable) + SetAccessToken(value []OptionalClaimable)() + SetIdToken(value []OptionalClaimable)() + SetOdataType(value *string)() + SetSaml2Token(value []OptionalClaimable)() +} diff --git a/src/internal/connector/graph/betasdk/models/org_contact.go b/src/internal/connector/graph/betasdk/models/org_contact.go new file mode 100644 index 000000000..79a886b00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/org_contact.go @@ -0,0 +1,591 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgContact +type OrgContact struct { + DirectoryObject + // Postal addresses for this organizational contact. For now a contact can only have one physical address. + addresses []PhysicalOfficeAddressable + // Name of the company that this organizational contact belong to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + companyName *string + // The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + department *string + // The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. + directReports []DirectoryObjectable + // Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderBy. + displayName *string + // First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + givenName *string + // Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + jobTitle *string + // The SMTP address for the contact, for example, 'jeff@contoso.onmicrosoft.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + mail *string + // Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). + mailNickname *string + // The user or contact that is this contact's manager. Read-only. Supports $expand and $filter (eq) by id. + manager DirectoryObjectable + // Groups that this contact is a member of. Read-only. Nullable. Supports $expand. + memberOf []DirectoryObjectable + // Date and time when this organizational contact was last synchronized from on-premises AD. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in). + onPremisesLastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0. + onPremisesProvisioningErrors []OnPremisesProvisioningErrorable + // true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values). + onPremisesSyncEnabled *bool + // List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection. Supports $filter (eq, ne, not, in). + phones []Phoneable + // For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0). + proxyAddresses []string + // Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values) + surname *string + // The transitiveMemberOf property + transitiveMemberOf []DirectoryObjectable + // The transitive reports for a contact. Read-only. + transitiveReports []DirectoryObjectable +} +// NewOrgContact instantiates a new OrgContact and sets the default values. +func NewOrgContact()(*OrgContact) { + m := &OrgContact{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.orgContact"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOrgContactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrgContactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgContact(), nil +} +// GetAddresses gets the addresses property value. Postal addresses for this organizational contact. For now a contact can only have one physical address. +func (m *OrgContact) GetAddresses()([]PhysicalOfficeAddressable) { + return m.addresses +} +// GetCompanyName gets the companyName property value. Name of the company that this organizational contact belong to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetCompanyName()(*string) { + return m.companyName +} +// GetDepartment gets the department property value. The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetDepartment()(*string) { + return m.department +} +// GetDirectReports gets the directReports property value. The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. +func (m *OrgContact) GetDirectReports()([]DirectoryObjectable) { + return m.directReports +} +// GetDisplayName gets the displayName property value. Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderBy. +func (m *OrgContact) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrgContact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["addresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhysicalOfficeAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhysicalOfficeAddressable, len(val)) + for i, v := range val { + res[i] = v.(PhysicalOfficeAddressable) + } + m.SetAddresses(res) + } + return nil + } + res["companyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompanyName(val) + } + return nil + } + res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDepartment(val) + } + return nil + } + res["directReports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetDirectReports(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["jobTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobTitle(val) + } + return nil + } + res["mail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMail(val) + } + return nil + } + res["mailNickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailNickname(val) + } + return nil + } + res["manager"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetManager(val.(DirectoryObjectable)) + } + return nil + } + res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMemberOf(res) + } + return nil + } + res["onPremisesLastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesLastSyncDateTime(val) + } + return nil + } + res["onPremisesProvisioningErrors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesProvisioningErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesProvisioningErrorable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesProvisioningErrorable) + } + m.SetOnPremisesProvisioningErrors(res) + } + return nil + } + res["onPremisesSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSyncEnabled(val) + } + return nil + } + res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetPhones(res) + } + return nil + } + res["proxyAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetProxyAddresses(res) + } + return nil + } + res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["transitiveMemberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveMemberOf(res) + } + return nil + } + res["transitiveReports"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveReports(res) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetGivenName()(*string) { + return m.givenName +} +// GetJobTitle gets the jobTitle property value. Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetJobTitle()(*string) { + return m.jobTitle +} +// GetMail gets the mail property value. The SMTP address for the contact, for example, 'jeff@contoso.onmicrosoft.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetMail()(*string) { + return m.mail +} +// GetMailNickname gets the mailNickname property value. Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) GetMailNickname()(*string) { + return m.mailNickname +} +// GetManager gets the manager property value. The user or contact that is this contact's manager. Read-only. Supports $expand and $filter (eq) by id. +func (m *OrgContact) GetManager()(DirectoryObjectable) { + return m.manager +} +// GetMemberOf gets the memberOf property value. Groups that this contact is a member of. Read-only. Nullable. Supports $expand. +func (m *OrgContact) GetMemberOf()([]DirectoryObjectable) { + return m.memberOf +} +// GetOnPremisesLastSyncDateTime gets the onPremisesLastSyncDateTime property value. Date and time when this organizational contact was last synchronized from on-premises AD. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in). +func (m *OrgContact) GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onPremisesLastSyncDateTime +} +// GetOnPremisesProvisioningErrors gets the onPremisesProvisioningErrors property value. List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0. +func (m *OrgContact) GetOnPremisesProvisioningErrors()([]OnPremisesProvisioningErrorable) { + return m.onPremisesProvisioningErrors +} +// GetOnPremisesSyncEnabled gets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values). +func (m *OrgContact) GetOnPremisesSyncEnabled()(*bool) { + return m.onPremisesSyncEnabled +} +// GetPhones gets the phones property value. List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection. Supports $filter (eq, ne, not, in). +func (m *OrgContact) GetPhones()([]Phoneable) { + return m.phones +} +// GetProxyAddresses gets the proxyAddresses property value. For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0). +func (m *OrgContact) GetProxyAddresses()([]string) { + return m.proxyAddresses +} +// GetSurname gets the surname property value. Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values) +func (m *OrgContact) GetSurname()(*string) { + return m.surname +} +// GetTransitiveMemberOf gets the transitiveMemberOf property value. The transitiveMemberOf property +func (m *OrgContact) GetTransitiveMemberOf()([]DirectoryObjectable) { + return m.transitiveMemberOf +} +// GetTransitiveReports gets the transitiveReports property value. The transitive reports for a contact. Read-only. +func (m *OrgContact) GetTransitiveReports()([]DirectoryObjectable) { + return m.transitiveReports +} +// Serialize serializes information the current object +func (m *OrgContact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + if m.GetAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAddresses())) + for i, v := range m.GetAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("addresses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("companyName", m.GetCompanyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("department", m.GetDepartment()) + if err != nil { + return err + } + } + if m.GetDirectReports() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDirectReports())) + for i, v := range m.GetDirectReports() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("directReports", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("jobTitle", m.GetJobTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mail", m.GetMail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mailNickname", m.GetMailNickname()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("manager", m.GetManager()) + if err != nil { + return err + } + } + if m.GetMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf())) + for i, v := range m.GetMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("memberOf", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("onPremisesLastSyncDateTime", m.GetOnPremisesLastSyncDateTime()) + if err != nil { + return err + } + } + if m.GetOnPremisesProvisioningErrors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOnPremisesProvisioningErrors())) + for i, v := range m.GetOnPremisesProvisioningErrors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("onPremisesProvisioningErrors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onPremisesSyncEnabled", m.GetOnPremisesSyncEnabled()) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + if m.GetProxyAddresses() != nil { + err = writer.WriteCollectionOfStringValues("proxyAddresses", m.GetProxyAddresses()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + if m.GetTransitiveMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMemberOf())) + for i, v := range m.GetTransitiveMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveMemberOf", cast) + if err != nil { + return err + } + } + if m.GetTransitiveReports() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveReports())) + for i, v := range m.GetTransitiveReports() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveReports", cast) + if err != nil { + return err + } + } + return nil +} +// SetAddresses sets the addresses property value. Postal addresses for this organizational contact. For now a contact can only have one physical address. +func (m *OrgContact) SetAddresses(value []PhysicalOfficeAddressable)() { + m.addresses = value +} +// SetCompanyName sets the companyName property value. Name of the company that this organizational contact belong to. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetCompanyName(value *string)() { + m.companyName = value +} +// SetDepartment sets the department property value. The name for the department in which the contact works. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetDepartment(value *string)() { + m.department = value +} +// SetDirectReports sets the directReports property value. The contact's direct reports. (The users and contacts that have their manager property set to this contact.) Read-only. Nullable. Supports $expand. +func (m *OrgContact) SetDirectReports(value []DirectoryObjectable)() { + m.directReports = value +} +// SetDisplayName sets the displayName property value. Display name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values), $search, and $orderBy. +func (m *OrgContact) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGivenName sets the givenName property value. First name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetGivenName(value *string)() { + m.givenName = value +} +// SetJobTitle sets the jobTitle property value. Job title for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetJobTitle(value *string)() { + m.jobTitle = value +} +// SetMail sets the mail property value. The SMTP address for the contact, for example, 'jeff@contoso.onmicrosoft.com'. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetMail(value *string)() { + m.mail = value +} +// SetMailNickname sets the mailNickname property value. Email alias (portion of email address pre-pending the @ symbol) for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values). +func (m *OrgContact) SetMailNickname(value *string)() { + m.mailNickname = value +} +// SetManager sets the manager property value. The user or contact that is this contact's manager. Read-only. Supports $expand and $filter (eq) by id. +func (m *OrgContact) SetManager(value DirectoryObjectable)() { + m.manager = value +} +// SetMemberOf sets the memberOf property value. Groups that this contact is a member of. Read-only. Nullable. Supports $expand. +func (m *OrgContact) SetMemberOf(value []DirectoryObjectable)() { + m.memberOf = value +} +// SetOnPremisesLastSyncDateTime sets the onPremisesLastSyncDateTime property value. Date and time when this organizational contact was last synchronized from on-premises AD. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Supports $filter (eq, ne, not, ge, le, in). +func (m *OrgContact) SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onPremisesLastSyncDateTime = value +} +// SetOnPremisesProvisioningErrors sets the onPremisesProvisioningErrors property value. List of any synchronization provisioning errors for this organizational contact. Supports $filter (eq, not for category and propertyCausingError), /$count eq 0, /$count ne 0. +func (m *OrgContact) SetOnPremisesProvisioningErrors(value []OnPremisesProvisioningErrorable)() { + m.onPremisesProvisioningErrors = value +} +// SetOnPremisesSyncEnabled sets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced and now mastered in Exchange; null if this object has never been synced from an on-premises directory (default). Supports $filter (eq, ne, not, in, and eq for null values). +func (m *OrgContact) SetOnPremisesSyncEnabled(value *bool)() { + m.onPremisesSyncEnabled = value +} +// SetPhones sets the phones property value. List of phones for this organizational contact. Phone types can be mobile, business, and businessFax. Only one of each type can ever be present in the collection. Supports $filter (eq, ne, not, in). +func (m *OrgContact) SetPhones(value []Phoneable)() { + m.phones = value +} +// SetProxyAddresses sets the proxyAddresses property value. For example: 'SMTP: bob@contoso.com', 'smtp: bob@sales.contoso.com'. The any operator is required for filter expressions on multi-valued properties. Supports $filter (eq, not, ge, le, startsWith, /$count eq 0, /$count ne 0). +func (m *OrgContact) SetProxyAddresses(value []string)() { + m.proxyAddresses = value +} +// SetSurname sets the surname property value. Last name for this organizational contact. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq for null values) +func (m *OrgContact) SetSurname(value *string)() { + m.surname = value +} +// SetTransitiveMemberOf sets the transitiveMemberOf property value. The transitiveMemberOf property +func (m *OrgContact) SetTransitiveMemberOf(value []DirectoryObjectable)() { + m.transitiveMemberOf = value +} +// SetTransitiveReports sets the transitiveReports property value. The transitive reports for a contact. Read-only. +func (m *OrgContact) SetTransitiveReports(value []DirectoryObjectable)() { + m.transitiveReports = value +} diff --git a/src/internal/connector/graph/betasdk/models/org_contact_collection_response.go b/src/internal/connector/graph/betasdk/models/org_contact_collection_response.go new file mode 100644 index 000000000..5c3636887 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/org_contact_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgContactCollectionResponse +type OrgContactCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OrgContactable +} +// NewOrgContactCollectionResponse instantiates a new OrgContactCollectionResponse and sets the default values. +func NewOrgContactCollectionResponse()(*OrgContactCollectionResponse) { + m := &OrgContactCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOrgContactCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrgContactCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrgContactCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrgContactCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrgContactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OrgContactable, len(val)) + for i, v := range val { + res[i] = v.(OrgContactable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OrgContactCollectionResponse) GetValue()([]OrgContactable) { + return m.value +} +// Serialize serializes information the current object +func (m *OrgContactCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OrgContactCollectionResponse) SetValue(value []OrgContactable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/org_contact_collection_responseable.go b/src/internal/connector/graph/betasdk/models/org_contact_collection_responseable.go new file mode 100644 index 000000000..4c8fb1db6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/org_contact_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgContactCollectionResponseable +type OrgContactCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OrgContactable) + SetValue(value []OrgContactable)() +} diff --git a/src/internal/connector/graph/betasdk/models/org_contactable.go b/src/internal/connector/graph/betasdk/models/org_contactable.go new file mode 100644 index 000000000..c0fcfc192 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/org_contactable.go @@ -0,0 +1,50 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrgContactable +type OrgContactable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddresses()([]PhysicalOfficeAddressable) + GetCompanyName()(*string) + GetDepartment()(*string) + GetDirectReports()([]DirectoryObjectable) + GetDisplayName()(*string) + GetGivenName()(*string) + GetJobTitle()(*string) + GetMail()(*string) + GetMailNickname()(*string) + GetManager()(DirectoryObjectable) + GetMemberOf()([]DirectoryObjectable) + GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnPremisesProvisioningErrors()([]OnPremisesProvisioningErrorable) + GetOnPremisesSyncEnabled()(*bool) + GetPhones()([]Phoneable) + GetProxyAddresses()([]string) + GetSurname()(*string) + GetTransitiveMemberOf()([]DirectoryObjectable) + GetTransitiveReports()([]DirectoryObjectable) + SetAddresses(value []PhysicalOfficeAddressable)() + SetCompanyName(value *string)() + SetDepartment(value *string)() + SetDirectReports(value []DirectoryObjectable)() + SetDisplayName(value *string)() + SetGivenName(value *string)() + SetJobTitle(value *string)() + SetMail(value *string)() + SetMailNickname(value *string)() + SetManager(value DirectoryObjectable)() + SetMemberOf(value []DirectoryObjectable)() + SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnPremisesProvisioningErrors(value []OnPremisesProvisioningErrorable)() + SetOnPremisesSyncEnabled(value *bool)() + SetPhones(value []Phoneable)() + SetProxyAddresses(value []string)() + SetSurname(value *string)() + SetTransitiveMemberOf(value []DirectoryObjectable)() + SetTransitiveReports(value []DirectoryObjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organization.go b/src/internal/connector/graph/betasdk/models/organization.go new file mode 100644 index 000000000..3d45afbd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organization.go @@ -0,0 +1,879 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Organization +type Organization struct { + DirectoryObject + // The collection of service plans associated with the tenant. Not nullable. + assignedPlans []AssignedPlanable + // Resource to manage the default branding for the organization. Nullable. + branding OrganizationalBrandingable + // Telephone number for the organization. Although this is a string collection, only one number can be set for this property. + businessPhones []string + // Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. + certificateBasedAuthConfiguration []CertificateBasedAuthConfigurationable + // Certificate connector setting. + certificateConnectorSetting CertificateConnectorSettingable + // City name of the address for the organization. + city *string + // Country/region name of the address for the organization. + country *string + // Country or region abbreviation for the organization in ISO 3166-2 format. + countryLetterCode *string + // Timestamp of when the organization was created. The value cannot be modified and is automatically populated when the organization is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Two-letter ISO 3166 country code indicating the default service usage location of an organization. + defaultUsageLocation *string + // The directory size quota information of an organization. + directorySizeQuota DirectorySizeQuotaable + // The display name for the tenant. + displayName *string + // The collection of open extensions defined for the organization resource. Nullable. + extensions []Extensionable + // true if organization is Multi-Geo enabled; false if organization is not Multi-Geo enabled; null (default). Read-only. For more information, see OneDrive Online Multi-Geo. + isMultipleDataLocationsForServicesEnabled *bool + // Not nullable. + marketingNotificationEmails []string + // Mobile device management authority. + mobileDeviceManagementAuthority *MdmAuthority + // The time and date at which the tenant was last synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + onPremisesLastSyncDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; Nullable. null if this object has never been synced from an on-premises directory (default). + onPremisesSyncEnabled *bool + // The partnerTenantType property + partnerTenantType *PartnerTenantType + // Postal code of the address for the organization. + postalCode *string + // The preferred language for the organization. Should follow ISO 639-1 Code; for example en. + preferredLanguage *string + // The privacy profile of an organization. + privacyProfile PrivacyProfileable + // Not nullable. + provisionedPlans []ProvisionedPlanable + // The securityComplianceNotificationMails property + securityComplianceNotificationMails []string + // The securityComplianceNotificationPhones property + securityComplianceNotificationPhones []string + // Retrieve the properties and relationships of organizationSettings object. Nullable. + settings OrganizationSettingsable + // State name of the address for the organization. + state *string + // Street name of the address for organization. + street *string + // Not nullable. + technicalNotificationMails []string + // The collection of domains associated with this tenant. Not nullable. + verifiedDomains []VerifiedDomainable +} +// NewOrganization instantiates a new Organization and sets the default values. +func NewOrganization()(*Organization) { + m := &Organization{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.organization"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOrganizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganization(), nil +} +// GetAssignedPlans gets the assignedPlans property value. The collection of service plans associated with the tenant. Not nullable. +func (m *Organization) GetAssignedPlans()([]AssignedPlanable) { + return m.assignedPlans +} +// GetBranding gets the branding property value. Resource to manage the default branding for the organization. Nullable. +func (m *Organization) GetBranding()(OrganizationalBrandingable) { + return m.branding +} +// GetBusinessPhones gets the businessPhones property value. Telephone number for the organization. Although this is a string collection, only one number can be set for this property. +func (m *Organization) GetBusinessPhones()([]string) { + return m.businessPhones +} +// GetCertificateBasedAuthConfiguration gets the certificateBasedAuthConfiguration property value. Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. +func (m *Organization) GetCertificateBasedAuthConfiguration()([]CertificateBasedAuthConfigurationable) { + return m.certificateBasedAuthConfiguration +} +// GetCertificateConnectorSetting gets the certificateConnectorSetting property value. Certificate connector setting. +func (m *Organization) GetCertificateConnectorSetting()(CertificateConnectorSettingable) { + return m.certificateConnectorSetting +} +// GetCity gets the city property value. City name of the address for the organization. +func (m *Organization) GetCity()(*string) { + return m.city +} +// GetCountry gets the country property value. Country/region name of the address for the organization. +func (m *Organization) GetCountry()(*string) { + return m.country +} +// GetCountryLetterCode gets the countryLetterCode property value. Country or region abbreviation for the organization in ISO 3166-2 format. +func (m *Organization) GetCountryLetterCode()(*string) { + return m.countryLetterCode +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp of when the organization was created. The value cannot be modified and is automatically populated when the organization is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Organization) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefaultUsageLocation gets the defaultUsageLocation property value. Two-letter ISO 3166 country code indicating the default service usage location of an organization. +func (m *Organization) GetDefaultUsageLocation()(*string) { + return m.defaultUsageLocation +} +// GetDirectorySizeQuota gets the directorySizeQuota property value. The directory size quota information of an organization. +func (m *Organization) GetDirectorySizeQuota()(DirectorySizeQuotaable) { + return m.directorySizeQuota +} +// GetDisplayName gets the displayName property value. The display name for the tenant. +func (m *Organization) GetDisplayName()(*string) { + return m.displayName +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the organization resource. Nullable. +func (m *Organization) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Organization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["assignedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAssignedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AssignedPlanable, len(val)) + for i, v := range val { + res[i] = v.(AssignedPlanable) + } + m.SetAssignedPlans(res) + } + return nil + } + res["branding"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationalBrandingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBranding(val.(OrganizationalBrandingable)) + } + return nil + } + res["businessPhones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBusinessPhones(res) + } + return nil + } + res["certificateBasedAuthConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCertificateBasedAuthConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CertificateBasedAuthConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(CertificateBasedAuthConfigurationable) + } + m.SetCertificateBasedAuthConfiguration(res) + } + return nil + } + res["certificateConnectorSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCertificateConnectorSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCertificateConnectorSetting(val.(CertificateConnectorSettingable)) + } + return nil + } + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["country"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountry(val) + } + return nil + } + res["countryLetterCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryLetterCode(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["defaultUsageLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultUsageLocation(val) + } + return nil + } + res["directorySizeQuota"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectorySizeQuotaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDirectorySizeQuota(val.(DirectorySizeQuotaable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["isMultipleDataLocationsForServicesEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMultipleDataLocationsForServicesEnabled(val) + } + return nil + } + res["marketingNotificationEmails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMarketingNotificationEmails(res) + } + return nil + } + res["mobileDeviceManagementAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMdmAuthority) + if err != nil { + return err + } + if val != nil { + m.SetMobileDeviceManagementAuthority(val.(*MdmAuthority)) + } + return nil + } + res["onPremisesLastSyncDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesLastSyncDateTime(val) + } + return nil + } + res["onPremisesSyncEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOnPremisesSyncEnabled(val) + } + return nil + } + res["partnerTenantType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePartnerTenantType) + if err != nil { + return err + } + if val != nil { + m.SetPartnerTenantType(val.(*PartnerTenantType)) + } + return nil + } + res["postalCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostalCode(val) + } + return nil + } + res["preferredLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredLanguage(val) + } + return nil + } + res["privacyProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivacyProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrivacyProfile(val.(PrivacyProfileable)) + } + return nil + } + res["provisionedPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisionedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisionedPlanable, len(val)) + for i, v := range val { + res[i] = v.(ProvisionedPlanable) + } + m.SetProvisionedPlans(res) + } + return nil + } + res["securityComplianceNotificationMails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSecurityComplianceNotificationMails(res) + } + return nil + } + res["securityComplianceNotificationPhones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSecurityComplianceNotificationPhones(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOrganizationSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(OrganizationSettingsable)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["street"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreet(val) + } + return nil + } + res["technicalNotificationMails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTechnicalNotificationMails(res) + } + return nil + } + res["verifiedDomains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVerifiedDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VerifiedDomainable, len(val)) + for i, v := range val { + res[i] = v.(VerifiedDomainable) + } + m.SetVerifiedDomains(res) + } + return nil + } + return res +} +// GetIsMultipleDataLocationsForServicesEnabled gets the isMultipleDataLocationsForServicesEnabled property value. true if organization is Multi-Geo enabled; false if organization is not Multi-Geo enabled; null (default). Read-only. For more information, see OneDrive Online Multi-Geo. +func (m *Organization) GetIsMultipleDataLocationsForServicesEnabled()(*bool) { + return m.isMultipleDataLocationsForServicesEnabled +} +// GetMarketingNotificationEmails gets the marketingNotificationEmails property value. Not nullable. +func (m *Organization) GetMarketingNotificationEmails()([]string) { + return m.marketingNotificationEmails +} +// GetMobileDeviceManagementAuthority gets the mobileDeviceManagementAuthority property value. Mobile device management authority. +func (m *Organization) GetMobileDeviceManagementAuthority()(*MdmAuthority) { + return m.mobileDeviceManagementAuthority +} +// GetOnPremisesLastSyncDateTime gets the onPremisesLastSyncDateTime property value. The time and date at which the tenant was last synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Organization) GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onPremisesLastSyncDateTime +} +// GetOnPremisesSyncEnabled gets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; Nullable. null if this object has never been synced from an on-premises directory (default). +func (m *Organization) GetOnPremisesSyncEnabled()(*bool) { + return m.onPremisesSyncEnabled +} +// GetPartnerTenantType gets the partnerTenantType property value. The partnerTenantType property +func (m *Organization) GetPartnerTenantType()(*PartnerTenantType) { + return m.partnerTenantType +} +// GetPostalCode gets the postalCode property value. Postal code of the address for the organization. +func (m *Organization) GetPostalCode()(*string) { + return m.postalCode +} +// GetPreferredLanguage gets the preferredLanguage property value. The preferred language for the organization. Should follow ISO 639-1 Code; for example en. +func (m *Organization) GetPreferredLanguage()(*string) { + return m.preferredLanguage +} +// GetPrivacyProfile gets the privacyProfile property value. The privacy profile of an organization. +func (m *Organization) GetPrivacyProfile()(PrivacyProfileable) { + return m.privacyProfile +} +// GetProvisionedPlans gets the provisionedPlans property value. Not nullable. +func (m *Organization) GetProvisionedPlans()([]ProvisionedPlanable) { + return m.provisionedPlans +} +// GetSecurityComplianceNotificationMails gets the securityComplianceNotificationMails property value. The securityComplianceNotificationMails property +func (m *Organization) GetSecurityComplianceNotificationMails()([]string) { + return m.securityComplianceNotificationMails +} +// GetSecurityComplianceNotificationPhones gets the securityComplianceNotificationPhones property value. The securityComplianceNotificationPhones property +func (m *Organization) GetSecurityComplianceNotificationPhones()([]string) { + return m.securityComplianceNotificationPhones +} +// GetSettings gets the settings property value. Retrieve the properties and relationships of organizationSettings object. Nullable. +func (m *Organization) GetSettings()(OrganizationSettingsable) { + return m.settings +} +// GetState gets the state property value. State name of the address for the organization. +func (m *Organization) GetState()(*string) { + return m.state +} +// GetStreet gets the street property value. Street name of the address for organization. +func (m *Organization) GetStreet()(*string) { + return m.street +} +// GetTechnicalNotificationMails gets the technicalNotificationMails property value. Not nullable. +func (m *Organization) GetTechnicalNotificationMails()([]string) { + return m.technicalNotificationMails +} +// GetVerifiedDomains gets the verifiedDomains property value. The collection of domains associated with this tenant. Not nullable. +func (m *Organization) GetVerifiedDomains()([]VerifiedDomainable) { + return m.verifiedDomains +} +// Serialize serializes information the current object +func (m *Organization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignedPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedPlans())) + for i, v := range m.GetAssignedPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedPlans", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("branding", m.GetBranding()) + if err != nil { + return err + } + } + if m.GetBusinessPhones() != nil { + err = writer.WriteCollectionOfStringValues("businessPhones", m.GetBusinessPhones()) + if err != nil { + return err + } + } + if m.GetCertificateBasedAuthConfiguration() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertificateBasedAuthConfiguration())) + for i, v := range m.GetCertificateBasedAuthConfiguration() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("certificateBasedAuthConfiguration", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("certificateConnectorSetting", m.GetCertificateConnectorSetting()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("country", m.GetCountry()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("countryLetterCode", m.GetCountryLetterCode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultUsageLocation", m.GetDefaultUsageLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("directorySizeQuota", m.GetDirectorySizeQuota()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMultipleDataLocationsForServicesEnabled", m.GetIsMultipleDataLocationsForServicesEnabled()) + if err != nil { + return err + } + } + if m.GetMarketingNotificationEmails() != nil { + err = writer.WriteCollectionOfStringValues("marketingNotificationEmails", m.GetMarketingNotificationEmails()) + if err != nil { + return err + } + } + if m.GetMobileDeviceManagementAuthority() != nil { + cast := (*m.GetMobileDeviceManagementAuthority()).String() + err = writer.WriteStringValue("mobileDeviceManagementAuthority", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("onPremisesLastSyncDateTime", m.GetOnPremisesLastSyncDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("onPremisesSyncEnabled", m.GetOnPremisesSyncEnabled()) + if err != nil { + return err + } + } + if m.GetPartnerTenantType() != nil { + cast := (*m.GetPartnerTenantType()).String() + err = writer.WriteStringValue("partnerTenantType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("postalCode", m.GetPostalCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredLanguage", m.GetPreferredLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("privacyProfile", m.GetPrivacyProfile()) + if err != nil { + return err + } + } + if m.GetProvisionedPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProvisionedPlans())) + for i, v := range m.GetProvisionedPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("provisionedPlans", cast) + if err != nil { + return err + } + } + if m.GetSecurityComplianceNotificationMails() != nil { + err = writer.WriteCollectionOfStringValues("securityComplianceNotificationMails", m.GetSecurityComplianceNotificationMails()) + if err != nil { + return err + } + } + if m.GetSecurityComplianceNotificationPhones() != nil { + err = writer.WriteCollectionOfStringValues("securityComplianceNotificationPhones", m.GetSecurityComplianceNotificationPhones()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("street", m.GetStreet()) + if err != nil { + return err + } + } + if m.GetTechnicalNotificationMails() != nil { + err = writer.WriteCollectionOfStringValues("technicalNotificationMails", m.GetTechnicalNotificationMails()) + if err != nil { + return err + } + } + if m.GetVerifiedDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetVerifiedDomains())) + for i, v := range m.GetVerifiedDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("verifiedDomains", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignedPlans sets the assignedPlans property value. The collection of service plans associated with the tenant. Not nullable. +func (m *Organization) SetAssignedPlans(value []AssignedPlanable)() { + m.assignedPlans = value +} +// SetBranding sets the branding property value. Resource to manage the default branding for the organization. Nullable. +func (m *Organization) SetBranding(value OrganizationalBrandingable)() { + m.branding = value +} +// SetBusinessPhones sets the businessPhones property value. Telephone number for the organization. Although this is a string collection, only one number can be set for this property. +func (m *Organization) SetBusinessPhones(value []string)() { + m.businessPhones = value +} +// SetCertificateBasedAuthConfiguration sets the certificateBasedAuthConfiguration property value. Navigation property to manage certificate-based authentication configuration. Only a single instance of certificateBasedAuthConfiguration can be created in the collection. +func (m *Organization) SetCertificateBasedAuthConfiguration(value []CertificateBasedAuthConfigurationable)() { + m.certificateBasedAuthConfiguration = value +} +// SetCertificateConnectorSetting sets the certificateConnectorSetting property value. Certificate connector setting. +func (m *Organization) SetCertificateConnectorSetting(value CertificateConnectorSettingable)() { + m.certificateConnectorSetting = value +} +// SetCity sets the city property value. City name of the address for the organization. +func (m *Organization) SetCity(value *string)() { + m.city = value +} +// SetCountry sets the country property value. Country/region name of the address for the organization. +func (m *Organization) SetCountry(value *string)() { + m.country = value +} +// SetCountryLetterCode sets the countryLetterCode property value. Country or region abbreviation for the organization in ISO 3166-2 format. +func (m *Organization) SetCountryLetterCode(value *string)() { + m.countryLetterCode = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp of when the organization was created. The value cannot be modified and is automatically populated when the organization is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *Organization) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefaultUsageLocation sets the defaultUsageLocation property value. Two-letter ISO 3166 country code indicating the default service usage location of an organization. +func (m *Organization) SetDefaultUsageLocation(value *string)() { + m.defaultUsageLocation = value +} +// SetDirectorySizeQuota sets the directorySizeQuota property value. The directory size quota information of an organization. +func (m *Organization) SetDirectorySizeQuota(value DirectorySizeQuotaable)() { + m.directorySizeQuota = value +} +// SetDisplayName sets the displayName property value. The display name for the tenant. +func (m *Organization) SetDisplayName(value *string)() { + m.displayName = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the organization resource. Nullable. +func (m *Organization) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetIsMultipleDataLocationsForServicesEnabled sets the isMultipleDataLocationsForServicesEnabled property value. true if organization is Multi-Geo enabled; false if organization is not Multi-Geo enabled; null (default). Read-only. For more information, see OneDrive Online Multi-Geo. +func (m *Organization) SetIsMultipleDataLocationsForServicesEnabled(value *bool)() { + m.isMultipleDataLocationsForServicesEnabled = value +} +// SetMarketingNotificationEmails sets the marketingNotificationEmails property value. Not nullable. +func (m *Organization) SetMarketingNotificationEmails(value []string)() { + m.marketingNotificationEmails = value +} +// SetMobileDeviceManagementAuthority sets the mobileDeviceManagementAuthority property value. Mobile device management authority. +func (m *Organization) SetMobileDeviceManagementAuthority(value *MdmAuthority)() { + m.mobileDeviceManagementAuthority = value +} +// SetOnPremisesLastSyncDateTime sets the onPremisesLastSyncDateTime property value. The time and date at which the tenant was last synced with the on-premises directory. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Organization) SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onPremisesLastSyncDateTime = value +} +// SetOnPremisesSyncEnabled sets the onPremisesSyncEnabled property value. true if this object is synced from an on-premises directory; false if this object was originally synced from an on-premises directory but is no longer synced; Nullable. null if this object has never been synced from an on-premises directory (default). +func (m *Organization) SetOnPremisesSyncEnabled(value *bool)() { + m.onPremisesSyncEnabled = value +} +// SetPartnerTenantType sets the partnerTenantType property value. The partnerTenantType property +func (m *Organization) SetPartnerTenantType(value *PartnerTenantType)() { + m.partnerTenantType = value +} +// SetPostalCode sets the postalCode property value. Postal code of the address for the organization. +func (m *Organization) SetPostalCode(value *string)() { + m.postalCode = value +} +// SetPreferredLanguage sets the preferredLanguage property value. The preferred language for the organization. Should follow ISO 639-1 Code; for example en. +func (m *Organization) SetPreferredLanguage(value *string)() { + m.preferredLanguage = value +} +// SetPrivacyProfile sets the privacyProfile property value. The privacy profile of an organization. +func (m *Organization) SetPrivacyProfile(value PrivacyProfileable)() { + m.privacyProfile = value +} +// SetProvisionedPlans sets the provisionedPlans property value. Not nullable. +func (m *Organization) SetProvisionedPlans(value []ProvisionedPlanable)() { + m.provisionedPlans = value +} +// SetSecurityComplianceNotificationMails sets the securityComplianceNotificationMails property value. The securityComplianceNotificationMails property +func (m *Organization) SetSecurityComplianceNotificationMails(value []string)() { + m.securityComplianceNotificationMails = value +} +// SetSecurityComplianceNotificationPhones sets the securityComplianceNotificationPhones property value. The securityComplianceNotificationPhones property +func (m *Organization) SetSecurityComplianceNotificationPhones(value []string)() { + m.securityComplianceNotificationPhones = value +} +// SetSettings sets the settings property value. Retrieve the properties and relationships of organizationSettings object. Nullable. +func (m *Organization) SetSettings(value OrganizationSettingsable)() { + m.settings = value +} +// SetState sets the state property value. State name of the address for the organization. +func (m *Organization) SetState(value *string)() { + m.state = value +} +// SetStreet sets the street property value. Street name of the address for organization. +func (m *Organization) SetStreet(value *string)() { + m.street = value +} +// SetTechnicalNotificationMails sets the technicalNotificationMails property value. Not nullable. +func (m *Organization) SetTechnicalNotificationMails(value []string)() { + m.technicalNotificationMails = value +} +// SetVerifiedDomains sets the verifiedDomains property value. The collection of domains associated with this tenant. Not nullable. +func (m *Organization) SetVerifiedDomains(value []VerifiedDomainable)() { + m.verifiedDomains = value +} diff --git a/src/internal/connector/graph/betasdk/models/organization_collection_response.go b/src/internal/connector/graph/betasdk/models/organization_collection_response.go new file mode 100644 index 000000000..3c20e0ddf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationCollectionResponse +type OrganizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Organizationable +} +// NewOrganizationCollectionResponse instantiates a new OrganizationCollectionResponse and sets the default values. +func NewOrganizationCollectionResponse()(*OrganizationCollectionResponse) { + m := &OrganizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOrganizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrganizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Organizationable, len(val)) + for i, v := range val { + res[i] = v.(Organizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OrganizationCollectionResponse) GetValue()([]Organizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *OrganizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OrganizationCollectionResponse) SetValue(value []Organizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/organization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/organization_collection_responseable.go new file mode 100644 index 000000000..e2a36ec26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationCollectionResponseable +type OrganizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Organizationable) + SetValue(value []Organizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organization_settings.go b/src/internal/connector/graph/betasdk/models/organization_settings.go new file mode 100644 index 000000000..f3bde8c9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organization_settings.go @@ -0,0 +1,172 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationSettings +type OrganizationSettings struct { + Entity + // Contains the properties that are configured by an administrator as a tenant-level privacy control whether to identify duplicate contacts among a user's contacts list and suggest the user to merge those contacts to have a cleaner contacts list. List contactInsights returns the settings to display or return contact insights in an organization. + contactInsights InsightsSettingsable + // Contains the properties that are configured by an administrator for the visibility of Microsoft Graph-derived insights, between a user and other items in Microsoft 365, such as documents or sites. List itemInsights returns the settings to display or return item insights in an organization. + itemInsights InsightsSettingsable + // The microsoftApplicationDataAccess property + microsoftApplicationDataAccess MicrosoftApplicationDataAccessSettingsable + // Contains the properties that are configured by an administrator for the visibility of a list of people relevant and working with a user in Microsoft 365. List peopleInsights returns the settings to display or return people insights in an organization. + peopleInsights InsightsSettingsable + // Contains a collection of the properties an administrator has defined as visible on the Microsoft 365 profile card. Get organization settings returns the properties configured for profile cards for the organization. + profileCardProperties []ProfileCardPropertyable +} +// NewOrganizationSettings instantiates a new organizationSettings and sets the default values. +func NewOrganizationSettings()(*OrganizationSettings) { + m := &OrganizationSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateOrganizationSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationSettings(), nil +} +// GetContactInsights gets the contactInsights property value. Contains the properties that are configured by an administrator as a tenant-level privacy control whether to identify duplicate contacts among a user's contacts list and suggest the user to merge those contacts to have a cleaner contacts list. List contactInsights returns the settings to display or return contact insights in an organization. +func (m *OrganizationSettings) GetContactInsights()(InsightsSettingsable) { + return m.contactInsights +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contactInsights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInsightsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContactInsights(val.(InsightsSettingsable)) + } + return nil + } + res["itemInsights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInsightsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItemInsights(val.(InsightsSettingsable)) + } + return nil + } + res["microsoftApplicationDataAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateMicrosoftApplicationDataAccessSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMicrosoftApplicationDataAccess(val.(MicrosoftApplicationDataAccessSettingsable)) + } + return nil + } + res["peopleInsights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInsightsSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPeopleInsights(val.(InsightsSettingsable)) + } + return nil + } + res["profileCardProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfileCardPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfileCardPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ProfileCardPropertyable) + } + m.SetProfileCardProperties(res) + } + return nil + } + return res +} +// GetItemInsights gets the itemInsights property value. Contains the properties that are configured by an administrator for the visibility of Microsoft Graph-derived insights, between a user and other items in Microsoft 365, such as documents or sites. List itemInsights returns the settings to display or return item insights in an organization. +func (m *OrganizationSettings) GetItemInsights()(InsightsSettingsable) { + return m.itemInsights +} +// GetMicrosoftApplicationDataAccess gets the microsoftApplicationDataAccess property value. The microsoftApplicationDataAccess property +func (m *OrganizationSettings) GetMicrosoftApplicationDataAccess()(MicrosoftApplicationDataAccessSettingsable) { + return m.microsoftApplicationDataAccess +} +// GetPeopleInsights gets the peopleInsights property value. Contains the properties that are configured by an administrator for the visibility of a list of people relevant and working with a user in Microsoft 365. List peopleInsights returns the settings to display or return people insights in an organization. +func (m *OrganizationSettings) GetPeopleInsights()(InsightsSettingsable) { + return m.peopleInsights +} +// GetProfileCardProperties gets the profileCardProperties property value. Contains a collection of the properties an administrator has defined as visible on the Microsoft 365 profile card. Get organization settings returns the properties configured for profile cards for the organization. +func (m *OrganizationSettings) GetProfileCardProperties()([]ProfileCardPropertyable) { + return m.profileCardProperties +} +// Serialize serializes information the current object +func (m *OrganizationSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("contactInsights", m.GetContactInsights()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("itemInsights", m.GetItemInsights()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("microsoftApplicationDataAccess", m.GetMicrosoftApplicationDataAccess()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("peopleInsights", m.GetPeopleInsights()) + if err != nil { + return err + } + } + if m.GetProfileCardProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProfileCardProperties())) + for i, v := range m.GetProfileCardProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("profileCardProperties", cast) + if err != nil { + return err + } + } + return nil +} +// SetContactInsights sets the contactInsights property value. Contains the properties that are configured by an administrator as a tenant-level privacy control whether to identify duplicate contacts among a user's contacts list and suggest the user to merge those contacts to have a cleaner contacts list. List contactInsights returns the settings to display or return contact insights in an organization. +func (m *OrganizationSettings) SetContactInsights(value InsightsSettingsable)() { + m.contactInsights = value +} +// SetItemInsights sets the itemInsights property value. Contains the properties that are configured by an administrator for the visibility of Microsoft Graph-derived insights, between a user and other items in Microsoft 365, such as documents or sites. List itemInsights returns the settings to display or return item insights in an organization. +func (m *OrganizationSettings) SetItemInsights(value InsightsSettingsable)() { + m.itemInsights = value +} +// SetMicrosoftApplicationDataAccess sets the microsoftApplicationDataAccess property value. The microsoftApplicationDataAccess property +func (m *OrganizationSettings) SetMicrosoftApplicationDataAccess(value MicrosoftApplicationDataAccessSettingsable)() { + m.microsoftApplicationDataAccess = value +} +// SetPeopleInsights sets the peopleInsights property value. Contains the properties that are configured by an administrator for the visibility of a list of people relevant and working with a user in Microsoft 365. List peopleInsights returns the settings to display or return people insights in an organization. +func (m *OrganizationSettings) SetPeopleInsights(value InsightsSettingsable)() { + m.peopleInsights = value +} +// SetProfileCardProperties sets the profileCardProperties property value. Contains a collection of the properties an administrator has defined as visible on the Microsoft 365 profile card. Get organization settings returns the properties configured for profile cards for the organization. +func (m *OrganizationSettings) SetProfileCardProperties(value []ProfileCardPropertyable)() { + m.profileCardProperties = value +} diff --git a/src/internal/connector/graph/betasdk/models/organization_settingsable.go b/src/internal/connector/graph/betasdk/models/organization_settingsable.go new file mode 100644 index 000000000..da0c4841e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organization_settingsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationSettingsable +type OrganizationSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContactInsights()(InsightsSettingsable) + GetItemInsights()(InsightsSettingsable) + GetMicrosoftApplicationDataAccess()(MicrosoftApplicationDataAccessSettingsable) + GetPeopleInsights()(InsightsSettingsable) + GetProfileCardProperties()([]ProfileCardPropertyable) + SetContactInsights(value InsightsSettingsable)() + SetItemInsights(value InsightsSettingsable)() + SetMicrosoftApplicationDataAccess(value MicrosoftApplicationDataAccessSettingsable)() + SetPeopleInsights(value InsightsSettingsable)() + SetProfileCardProperties(value []ProfileCardPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organizationable.go b/src/internal/connector/graph/betasdk/models/organizationable.go new file mode 100644 index 000000000..82b12a414 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizationable.go @@ -0,0 +1,72 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Organizationable +type Organizationable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedPlans()([]AssignedPlanable) + GetBranding()(OrganizationalBrandingable) + GetBusinessPhones()([]string) + GetCertificateBasedAuthConfiguration()([]CertificateBasedAuthConfigurationable) + GetCertificateConnectorSetting()(CertificateConnectorSettingable) + GetCity()(*string) + GetCountry()(*string) + GetCountryLetterCode()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultUsageLocation()(*string) + GetDirectorySizeQuota()(DirectorySizeQuotaable) + GetDisplayName()(*string) + GetExtensions()([]Extensionable) + GetIsMultipleDataLocationsForServicesEnabled()(*bool) + GetMarketingNotificationEmails()([]string) + GetMobileDeviceManagementAuthority()(*MdmAuthority) + GetOnPremisesLastSyncDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnPremisesSyncEnabled()(*bool) + GetPartnerTenantType()(*PartnerTenantType) + GetPostalCode()(*string) + GetPreferredLanguage()(*string) + GetPrivacyProfile()(PrivacyProfileable) + GetProvisionedPlans()([]ProvisionedPlanable) + GetSecurityComplianceNotificationMails()([]string) + GetSecurityComplianceNotificationPhones()([]string) + GetSettings()(OrganizationSettingsable) + GetState()(*string) + GetStreet()(*string) + GetTechnicalNotificationMails()([]string) + GetVerifiedDomains()([]VerifiedDomainable) + SetAssignedPlans(value []AssignedPlanable)() + SetBranding(value OrganizationalBrandingable)() + SetBusinessPhones(value []string)() + SetCertificateBasedAuthConfiguration(value []CertificateBasedAuthConfigurationable)() + SetCertificateConnectorSetting(value CertificateConnectorSettingable)() + SetCity(value *string)() + SetCountry(value *string)() + SetCountryLetterCode(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultUsageLocation(value *string)() + SetDirectorySizeQuota(value DirectorySizeQuotaable)() + SetDisplayName(value *string)() + SetExtensions(value []Extensionable)() + SetIsMultipleDataLocationsForServicesEnabled(value *bool)() + SetMarketingNotificationEmails(value []string)() + SetMobileDeviceManagementAuthority(value *MdmAuthority)() + SetOnPremisesLastSyncDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnPremisesSyncEnabled(value *bool)() + SetPartnerTenantType(value *PartnerTenantType)() + SetPostalCode(value *string)() + SetPreferredLanguage(value *string)() + SetPrivacyProfile(value PrivacyProfileable)() + SetProvisionedPlans(value []ProvisionedPlanable)() + SetSecurityComplianceNotificationMails(value []string)() + SetSecurityComplianceNotificationPhones(value []string)() + SetSettings(value OrganizationSettingsable)() + SetState(value *string)() + SetStreet(value *string)() + SetTechnicalNotificationMails(value []string)() + SetVerifiedDomains(value []VerifiedDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding.go b/src/internal/connector/graph/betasdk/models/organizational_branding.go new file mode 100644 index 000000000..db641acb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBranding +type OrganizationalBranding struct { + OrganizationalBrandingProperties + // Add different branding based on a locale. + localizations []OrganizationalBrandingLocalizationable +} +// NewOrganizationalBranding instantiates a new OrganizationalBranding and sets the default values. +func NewOrganizationalBranding()(*OrganizationalBranding) { + m := &OrganizationalBranding{ + OrganizationalBrandingProperties: *NewOrganizationalBrandingProperties(), + } + odataTypeValue := "#microsoft.graph.organizationalBranding"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOrganizationalBrandingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationalBrandingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationalBranding(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationalBranding) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OrganizationalBrandingProperties.GetFieldDeserializers() + res["localizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrganizationalBrandingLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OrganizationalBrandingLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(OrganizationalBrandingLocalizationable) + } + m.SetLocalizations(res) + } + return nil + } + return res +} +// GetLocalizations gets the localizations property value. Add different branding based on a locale. +func (m *OrganizationalBranding) GetLocalizations()([]OrganizationalBrandingLocalizationable) { + return m.localizations +} +// Serialize serializes information the current object +func (m *OrganizationalBranding) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OrganizationalBrandingProperties.Serialize(writer) + if err != nil { + return err + } + if m.GetLocalizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizations())) + for i, v := range m.GetLocalizations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("localizations", cast) + if err != nil { + return err + } + } + return nil +} +// SetLocalizations sets the localizations property value. Add different branding based on a locale. +func (m *OrganizationalBranding) SetLocalizations(value []OrganizationalBrandingLocalizationable)() { + m.localizations = value +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_localization.go b/src/internal/connector/graph/betasdk/models/organizational_branding_localization.go new file mode 100644 index 000000000..f1aed2aba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_localization.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingLocalization provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OrganizationalBrandingLocalization struct { + OrganizationalBrandingProperties +} +// NewOrganizationalBrandingLocalization instantiates a new organizationalBrandingLocalization and sets the default values. +func NewOrganizationalBrandingLocalization()(*OrganizationalBrandingLocalization) { + m := &OrganizationalBrandingLocalization{ + OrganizationalBrandingProperties: *NewOrganizationalBrandingProperties(), + } + odataTypeValue := "#microsoft.graph.organizationalBrandingLocalization"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOrganizationalBrandingLocalizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationalBrandingLocalizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationalBrandingLocalization(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationalBrandingLocalization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OrganizationalBrandingProperties.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *OrganizationalBrandingLocalization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OrganizationalBrandingProperties.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_response.go b/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_response.go new file mode 100644 index 000000000..0b702d617 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingLocalizationCollectionResponse +type OrganizationalBrandingLocalizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OrganizationalBrandingLocalizationable +} +// NewOrganizationalBrandingLocalizationCollectionResponse instantiates a new OrganizationalBrandingLocalizationCollectionResponse and sets the default values. +func NewOrganizationalBrandingLocalizationCollectionResponse()(*OrganizationalBrandingLocalizationCollectionResponse) { + m := &OrganizationalBrandingLocalizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOrganizationalBrandingLocalizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationalBrandingLocalizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizationalBrandingLocalizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationalBrandingLocalizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOrganizationalBrandingLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OrganizationalBrandingLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(OrganizationalBrandingLocalizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OrganizationalBrandingLocalizationCollectionResponse) GetValue()([]OrganizationalBrandingLocalizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *OrganizationalBrandingLocalizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OrganizationalBrandingLocalizationCollectionResponse) SetValue(value []OrganizationalBrandingLocalizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_responseable.go new file mode 100644 index 000000000..358e1d7c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_localization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingLocalizationCollectionResponseable +type OrganizationalBrandingLocalizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OrganizationalBrandingLocalizationable) + SetValue(value []OrganizationalBrandingLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_localizationable.go b/src/internal/connector/graph/betasdk/models/organizational_branding_localizationable.go new file mode 100644 index 000000000..25ec04f32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_localizationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingLocalizationable +type OrganizationalBrandingLocalizationable interface { + OrganizationalBrandingPropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_properties.go b/src/internal/connector/graph/betasdk/models/organizational_branding_properties.go new file mode 100644 index 000000000..56c37aa77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_properties.go @@ -0,0 +1,838 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingProperties +type OrganizationalBrandingProperties struct { + Entity + // Color that appears in place of the background image in low-bandwidth connections. We recommend that you use the primary color of your banner logo or your organization color. Specify this in hexadecimal format, for example, white is #FFFFFF. + backgroundColor *string + // Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. + backgroundImage []byte + // A relative URL for the backgroundImage property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. + backgroundImageRelativeUrl *string + // A banner version of your company logo that appears on the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. + bannerLogo []byte + // A relative URL for the bannerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. + bannerLogoRelativeUrl *string + // A list of base URLs for all available CDN providers that are serving the assets of the current resource. Several CDN providers are used at the same time for high availability of read requests. Read-only. + cdnList []string + // A custom URL for resetting account credentials. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. + customAccountResetCredentialsUrl *string + // A string to replace the default 'Can't access your account?' self-service password reset (SSPR) hyperlink text on the sign-in page. This text must be in Unicode format and not exceed 256 characters. + customCannotAccessYourAccountText *string + // A custom URL to replace the default URL of the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in page. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. DO NOT USE. Use customAccountResetCredentialsUrl instead. + customCannotAccessYourAccountUrl *string + // CSS styling that appears on the sign-in page. The allowed format is .css format only and not larger than 25 KB. + customCSS []byte + // A relative URL for the customCSS property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. + customCSSRelativeUrl *string + // A string to replace the default 'Forgot my password' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. + customForgotMyPasswordText *string + // A string to replace the default 'Privacy and Cookies' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. + customPrivacyAndCookiesText *string + // A custom URL to replace the default URL of the 'Privacy and Cookies' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. + customPrivacyAndCookiesUrl *string + // A string to replace the default 'reset it now' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. DO NOT USE: Customization of the 'reset it now' hyperlink text is currently not supported. + customResetItNowText *string + // A string to replace the the default 'Terms of Use' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. + customTermsOfUseText *string + // A custom URL to replace the default URL of the 'Terms of Use' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128characters. + customTermsOfUseUrl *string + // A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. + favicon []byte + // A relative url for the favicon above that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. + faviconRelativeUrl *string + // The RGB color to apply to customize the color of the header. + headerBackgroundColor *string + // A company logo that appears in the header of the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. + headerLogo []byte + // A relative URL for the headerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. + headerLogoRelativeUrl *string + // Represents the layout configuration to be displayed on the login page for a tenant. + loginPageLayoutConfiguration LoginPageLayoutConfigurationable + // Represents the various texts that can be hidden on the login page for a tenant. + loginPageTextVisibilitySettings LoginPageTextVisibilitySettingsable + // Text that appears at the bottom of the sign-in box. Use this to communicate additional information, such as the phone number to your help desk or a legal statement. This text must be in Unicode format and not exceed 1024 characters. + signInPageText *string + // A square version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. + squareLogo []byte + // A square dark version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. + squareLogoDark []byte + // A relative URL for the squareLogoDark property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. + squareLogoDarkRelativeUrl *string + // A relative URL for the squareLogo property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. + squareLogoRelativeUrl *string + // A string that shows as the hint in the username textbox on the sign-in screen. This text must be a Unicode, without links or code, and can't exceed 64 characters. + usernameHintText *string +} +// NewOrganizationalBrandingProperties instantiates a new organizationalBrandingProperties and sets the default values. +func NewOrganizationalBrandingProperties()(*OrganizationalBrandingProperties) { + m := &OrganizationalBrandingProperties{ + Entity: *NewEntity(), + } + return m +} +// CreateOrganizationalBrandingPropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizationalBrandingPropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.organizationalBranding": + return NewOrganizationalBranding(), nil + case "#microsoft.graph.organizationalBrandingLocalization": + return NewOrganizationalBrandingLocalization(), nil + } + } + } + } + return NewOrganizationalBrandingProperties(), nil +} +// GetBackgroundColor gets the backgroundColor property value. Color that appears in place of the background image in low-bandwidth connections. We recommend that you use the primary color of your banner logo or your organization color. Specify this in hexadecimal format, for example, white is #FFFFFF. +func (m *OrganizationalBrandingProperties) GetBackgroundColor()(*string) { + return m.backgroundColor +} +// GetBackgroundImage gets the backgroundImage property value. Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. +func (m *OrganizationalBrandingProperties) GetBackgroundImage()([]byte) { + return m.backgroundImage +} +// GetBackgroundImageRelativeUrl gets the backgroundImageRelativeUrl property value. A relative URL for the backgroundImage property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetBackgroundImageRelativeUrl()(*string) { + return m.backgroundImageRelativeUrl +} +// GetBannerLogo gets the bannerLogo property value. A banner version of your company logo that appears on the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) GetBannerLogo()([]byte) { + return m.bannerLogo +} +// GetBannerLogoRelativeUrl gets the bannerLogoRelativeUrl property value. A relative URL for the bannerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetBannerLogoRelativeUrl()(*string) { + return m.bannerLogoRelativeUrl +} +// GetCdnList gets the cdnList property value. A list of base URLs for all available CDN providers that are serving the assets of the current resource. Several CDN providers are used at the same time for high availability of read requests. Read-only. +func (m *OrganizationalBrandingProperties) GetCdnList()([]string) { + return m.cdnList +} +// GetCustomAccountResetCredentialsUrl gets the customAccountResetCredentialsUrl property value. A custom URL for resetting account credentials. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. +func (m *OrganizationalBrandingProperties) GetCustomAccountResetCredentialsUrl()(*string) { + return m.customAccountResetCredentialsUrl +} +// GetCustomCannotAccessYourAccountText gets the customCannotAccessYourAccountText property value. A string to replace the default 'Can't access your account?' self-service password reset (SSPR) hyperlink text on the sign-in page. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) GetCustomCannotAccessYourAccountText()(*string) { + return m.customCannotAccessYourAccountText +} +// GetCustomCannotAccessYourAccountUrl gets the customCannotAccessYourAccountUrl property value. A custom URL to replace the default URL of the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in page. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. DO NOT USE. Use customAccountResetCredentialsUrl instead. +func (m *OrganizationalBrandingProperties) GetCustomCannotAccessYourAccountUrl()(*string) { + return m.customCannotAccessYourAccountUrl +} +// GetCustomCSS gets the customCSS property value. CSS styling that appears on the sign-in page. The allowed format is .css format only and not larger than 25 KB. +func (m *OrganizationalBrandingProperties) GetCustomCSS()([]byte) { + return m.customCSS +} +// GetCustomCSSRelativeUrl gets the customCSSRelativeUrl property value. A relative URL for the customCSS property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetCustomCSSRelativeUrl()(*string) { + return m.customCSSRelativeUrl +} +// GetCustomForgotMyPasswordText gets the customForgotMyPasswordText property value. A string to replace the default 'Forgot my password' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) GetCustomForgotMyPasswordText()(*string) { + return m.customForgotMyPasswordText +} +// GetCustomPrivacyAndCookiesText gets the customPrivacyAndCookiesText property value. A string to replace the default 'Privacy and Cookies' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) GetCustomPrivacyAndCookiesText()(*string) { + return m.customPrivacyAndCookiesText +} +// GetCustomPrivacyAndCookiesUrl gets the customPrivacyAndCookiesUrl property value. A custom URL to replace the default URL of the 'Privacy and Cookies' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. +func (m *OrganizationalBrandingProperties) GetCustomPrivacyAndCookiesUrl()(*string) { + return m.customPrivacyAndCookiesUrl +} +// GetCustomResetItNowText gets the customResetItNowText property value. A string to replace the default 'reset it now' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. DO NOT USE: Customization of the 'reset it now' hyperlink text is currently not supported. +func (m *OrganizationalBrandingProperties) GetCustomResetItNowText()(*string) { + return m.customResetItNowText +} +// GetCustomTermsOfUseText gets the customTermsOfUseText property value. A string to replace the the default 'Terms of Use' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) GetCustomTermsOfUseText()(*string) { + return m.customTermsOfUseText +} +// GetCustomTermsOfUseUrl gets the customTermsOfUseUrl property value. A custom URL to replace the default URL of the 'Terms of Use' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128characters. +func (m *OrganizationalBrandingProperties) GetCustomTermsOfUseUrl()(*string) { + return m.customTermsOfUseUrl +} +// GetFavicon gets the favicon property value. A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. +func (m *OrganizationalBrandingProperties) GetFavicon()([]byte) { + return m.favicon +} +// GetFaviconRelativeUrl gets the faviconRelativeUrl property value. A relative url for the favicon above that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetFaviconRelativeUrl()(*string) { + return m.faviconRelativeUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizationalBrandingProperties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["backgroundColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBackgroundColor(val) + } + return nil + } + res["backgroundImage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetBackgroundImage(val) + } + return nil + } + res["backgroundImageRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBackgroundImageRelativeUrl(val) + } + return nil + } + res["bannerLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetBannerLogo(val) + } + return nil + } + res["bannerLogoRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBannerLogoRelativeUrl(val) + } + return nil + } + res["cdnList"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCdnList(res) + } + return nil + } + res["customAccountResetCredentialsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomAccountResetCredentialsUrl(val) + } + return nil + } + res["customCannotAccessYourAccountText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCannotAccessYourAccountText(val) + } + return nil + } + res["customCannotAccessYourAccountUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCannotAccessYourAccountUrl(val) + } + return nil + } + res["customCSS"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCSS(val) + } + return nil + } + res["customCSSRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomCSSRelativeUrl(val) + } + return nil + } + res["customForgotMyPasswordText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomForgotMyPasswordText(val) + } + return nil + } + res["customPrivacyAndCookiesText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomPrivacyAndCookiesText(val) + } + return nil + } + res["customPrivacyAndCookiesUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomPrivacyAndCookiesUrl(val) + } + return nil + } + res["customResetItNowText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomResetItNowText(val) + } + return nil + } + res["customTermsOfUseText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomTermsOfUseText(val) + } + return nil + } + res["customTermsOfUseUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomTermsOfUseUrl(val) + } + return nil + } + res["favicon"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetFavicon(val) + } + return nil + } + res["faviconRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFaviconRelativeUrl(val) + } + return nil + } + res["headerBackgroundColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderBackgroundColor(val) + } + return nil + } + res["headerLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderLogo(val) + } + return nil + } + res["headerLogoRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHeaderLogoRelativeUrl(val) + } + return nil + } + res["loginPageLayoutConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLoginPageLayoutConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLoginPageLayoutConfiguration(val.(LoginPageLayoutConfigurationable)) + } + return nil + } + res["loginPageTextVisibilitySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLoginPageTextVisibilitySettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLoginPageTextVisibilitySettings(val.(LoginPageTextVisibilitySettingsable)) + } + return nil + } + res["signInPageText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInPageText(val) + } + return nil + } + res["squareLogo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogo(val) + } + return nil + } + res["squareLogoDark"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogoDark(val) + } + return nil + } + res["squareLogoDarkRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogoDarkRelativeUrl(val) + } + return nil + } + res["squareLogoRelativeUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSquareLogoRelativeUrl(val) + } + return nil + } + res["usernameHintText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUsernameHintText(val) + } + return nil + } + return res +} +// GetHeaderBackgroundColor gets the headerBackgroundColor property value. The RGB color to apply to customize the color of the header. +func (m *OrganizationalBrandingProperties) GetHeaderBackgroundColor()(*string) { + return m.headerBackgroundColor +} +// GetHeaderLogo gets the headerLogo property value. A company logo that appears in the header of the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) GetHeaderLogo()([]byte) { + return m.headerLogo +} +// GetHeaderLogoRelativeUrl gets the headerLogoRelativeUrl property value. A relative URL for the headerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetHeaderLogoRelativeUrl()(*string) { + return m.headerLogoRelativeUrl +} +// GetLoginPageLayoutConfiguration gets the loginPageLayoutConfiguration property value. Represents the layout configuration to be displayed on the login page for a tenant. +func (m *OrganizationalBrandingProperties) GetLoginPageLayoutConfiguration()(LoginPageLayoutConfigurationable) { + return m.loginPageLayoutConfiguration +} +// GetLoginPageTextVisibilitySettings gets the loginPageTextVisibilitySettings property value. Represents the various texts that can be hidden on the login page for a tenant. +func (m *OrganizationalBrandingProperties) GetLoginPageTextVisibilitySettings()(LoginPageTextVisibilitySettingsable) { + return m.loginPageTextVisibilitySettings +} +// GetSignInPageText gets the signInPageText property value. Text that appears at the bottom of the sign-in box. Use this to communicate additional information, such as the phone number to your help desk or a legal statement. This text must be in Unicode format and not exceed 1024 characters. +func (m *OrganizationalBrandingProperties) GetSignInPageText()(*string) { + return m.signInPageText +} +// GetSquareLogo gets the squareLogo property value. A square version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) GetSquareLogo()([]byte) { + return m.squareLogo +} +// GetSquareLogoDark gets the squareLogoDark property value. A square dark version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) GetSquareLogoDark()([]byte) { + return m.squareLogoDark +} +// GetSquareLogoDarkRelativeUrl gets the squareLogoDarkRelativeUrl property value. A relative URL for the squareLogoDark property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetSquareLogoDarkRelativeUrl()(*string) { + return m.squareLogoDarkRelativeUrl +} +// GetSquareLogoRelativeUrl gets the squareLogoRelativeUrl property value. A relative URL for the squareLogo property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) GetSquareLogoRelativeUrl()(*string) { + return m.squareLogoRelativeUrl +} +// GetUsernameHintText gets the usernameHintText property value. A string that shows as the hint in the username textbox on the sign-in screen. This text must be a Unicode, without links or code, and can't exceed 64 characters. +func (m *OrganizationalBrandingProperties) GetUsernameHintText()(*string) { + return m.usernameHintText +} +// Serialize serializes information the current object +func (m *OrganizationalBrandingProperties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("backgroundColor", m.GetBackgroundColor()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("backgroundImage", m.GetBackgroundImage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("backgroundImageRelativeUrl", m.GetBackgroundImageRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("bannerLogo", m.GetBannerLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bannerLogoRelativeUrl", m.GetBannerLogoRelativeUrl()) + if err != nil { + return err + } + } + if m.GetCdnList() != nil { + err = writer.WriteCollectionOfStringValues("cdnList", m.GetCdnList()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customAccountResetCredentialsUrl", m.GetCustomAccountResetCredentialsUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customCannotAccessYourAccountText", m.GetCustomCannotAccessYourAccountText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customCannotAccessYourAccountUrl", m.GetCustomCannotAccessYourAccountUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("customCSS", m.GetCustomCSS()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customCSSRelativeUrl", m.GetCustomCSSRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customForgotMyPasswordText", m.GetCustomForgotMyPasswordText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customPrivacyAndCookiesText", m.GetCustomPrivacyAndCookiesText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customPrivacyAndCookiesUrl", m.GetCustomPrivacyAndCookiesUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customResetItNowText", m.GetCustomResetItNowText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customTermsOfUseText", m.GetCustomTermsOfUseText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customTermsOfUseUrl", m.GetCustomTermsOfUseUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("favicon", m.GetFavicon()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("faviconRelativeUrl", m.GetFaviconRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("headerBackgroundColor", m.GetHeaderBackgroundColor()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("headerLogo", m.GetHeaderLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("headerLogoRelativeUrl", m.GetHeaderLogoRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("loginPageLayoutConfiguration", m.GetLoginPageLayoutConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("loginPageTextVisibilitySettings", m.GetLoginPageTextVisibilitySettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signInPageText", m.GetSignInPageText()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("squareLogo", m.GetSquareLogo()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("squareLogoDark", m.GetSquareLogoDark()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("squareLogoDarkRelativeUrl", m.GetSquareLogoDarkRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("squareLogoRelativeUrl", m.GetSquareLogoRelativeUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("usernameHintText", m.GetUsernameHintText()) + if err != nil { + return err + } + } + return nil +} +// SetBackgroundColor sets the backgroundColor property value. Color that appears in place of the background image in low-bandwidth connections. We recommend that you use the primary color of your banner logo or your organization color. Specify this in hexadecimal format, for example, white is #FFFFFF. +func (m *OrganizationalBrandingProperties) SetBackgroundColor(value *string)() { + m.backgroundColor = value +} +// SetBackgroundImage sets the backgroundImage property value. Image that appears as the background of the sign-in page. The allowed types are PNG or JPEG not smaller than 300 KB and not larger than 1920 × 1080 pixels. A smaller image will reduce bandwidth requirements and make the page load faster. +func (m *OrganizationalBrandingProperties) SetBackgroundImage(value []byte)() { + m.backgroundImage = value +} +// SetBackgroundImageRelativeUrl sets the backgroundImageRelativeUrl property value. A relative URL for the backgroundImage property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetBackgroundImageRelativeUrl(value *string)() { + m.backgroundImageRelativeUrl = value +} +// SetBannerLogo sets the bannerLogo property value. A banner version of your company logo that appears on the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) SetBannerLogo(value []byte)() { + m.bannerLogo = value +} +// SetBannerLogoRelativeUrl sets the bannerLogoRelativeUrl property value. A relative URL for the bannerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetBannerLogoRelativeUrl(value *string)() { + m.bannerLogoRelativeUrl = value +} +// SetCdnList sets the cdnList property value. A list of base URLs for all available CDN providers that are serving the assets of the current resource. Several CDN providers are used at the same time for high availability of read requests. Read-only. +func (m *OrganizationalBrandingProperties) SetCdnList(value []string)() { + m.cdnList = value +} +// SetCustomAccountResetCredentialsUrl sets the customAccountResetCredentialsUrl property value. A custom URL for resetting account credentials. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. +func (m *OrganizationalBrandingProperties) SetCustomAccountResetCredentialsUrl(value *string)() { + m.customAccountResetCredentialsUrl = value +} +// SetCustomCannotAccessYourAccountText sets the customCannotAccessYourAccountText property value. A string to replace the default 'Can't access your account?' self-service password reset (SSPR) hyperlink text on the sign-in page. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) SetCustomCannotAccessYourAccountText(value *string)() { + m.customCannotAccessYourAccountText = value +} +// SetCustomCannotAccessYourAccountUrl sets the customCannotAccessYourAccountUrl property value. A custom URL to replace the default URL of the self-service password reset (SSPR) 'Can't access your account?' hyperlink on the sign-in page. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. DO NOT USE. Use customAccountResetCredentialsUrl instead. +func (m *OrganizationalBrandingProperties) SetCustomCannotAccessYourAccountUrl(value *string)() { + m.customCannotAccessYourAccountUrl = value +} +// SetCustomCSS sets the customCSS property value. CSS styling that appears on the sign-in page. The allowed format is .css format only and not larger than 25 KB. +func (m *OrganizationalBrandingProperties) SetCustomCSS(value []byte)() { + m.customCSS = value +} +// SetCustomCSSRelativeUrl sets the customCSSRelativeUrl property value. A relative URL for the customCSS property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetCustomCSSRelativeUrl(value *string)() { + m.customCSSRelativeUrl = value +} +// SetCustomForgotMyPasswordText sets the customForgotMyPasswordText property value. A string to replace the default 'Forgot my password' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) SetCustomForgotMyPasswordText(value *string)() { + m.customForgotMyPasswordText = value +} +// SetCustomPrivacyAndCookiesText sets the customPrivacyAndCookiesText property value. A string to replace the default 'Privacy and Cookies' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) SetCustomPrivacyAndCookiesText(value *string)() { + m.customPrivacyAndCookiesText = value +} +// SetCustomPrivacyAndCookiesUrl sets the customPrivacyAndCookiesUrl property value. A custom URL to replace the default URL of the 'Privacy and Cookies' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128 characters. +func (m *OrganizationalBrandingProperties) SetCustomPrivacyAndCookiesUrl(value *string)() { + m.customPrivacyAndCookiesUrl = value +} +// SetCustomResetItNowText sets the customResetItNowText property value. A string to replace the default 'reset it now' hyperlink text on the sign-in form. This text must be in Unicode format and not exceed 256 characters. DO NOT USE: Customization of the 'reset it now' hyperlink text is currently not supported. +func (m *OrganizationalBrandingProperties) SetCustomResetItNowText(value *string)() { + m.customResetItNowText = value +} +// SetCustomTermsOfUseText sets the customTermsOfUseText property value. A string to replace the the default 'Terms of Use' hyperlink text in the footer. This text must be in Unicode format and not exceed 256 characters. +func (m *OrganizationalBrandingProperties) SetCustomTermsOfUseText(value *string)() { + m.customTermsOfUseText = value +} +// SetCustomTermsOfUseUrl sets the customTermsOfUseUrl property value. A custom URL to replace the default URL of the 'Terms of Use' hyperlink in the footer. This URL must be in ASCII format or non-ASCII characters must be URL encoded, and not exceed 128characters. +func (m *OrganizationalBrandingProperties) SetCustomTermsOfUseUrl(value *string)() { + m.customTermsOfUseUrl = value +} +// SetFavicon sets the favicon property value. A custom icon (favicon) to replace a default Microsoft product favicon on an Azure AD tenant. +func (m *OrganizationalBrandingProperties) SetFavicon(value []byte)() { + m.favicon = value +} +// SetFaviconRelativeUrl sets the faviconRelativeUrl property value. A relative url for the favicon above that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetFaviconRelativeUrl(value *string)() { + m.faviconRelativeUrl = value +} +// SetHeaderBackgroundColor sets the headerBackgroundColor property value. The RGB color to apply to customize the color of the header. +func (m *OrganizationalBrandingProperties) SetHeaderBackgroundColor(value *string)() { + m.headerBackgroundColor = value +} +// SetHeaderLogo sets the headerLogo property value. A company logo that appears in the header of the sign-in page. The allowed types are PNG or JPEG not larger than 36 × 245 pixels. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) SetHeaderLogo(value []byte)() { + m.headerLogo = value +} +// SetHeaderLogoRelativeUrl sets the headerLogoRelativeUrl property value. A relative URL for the headerLogo property that is combined with a CDN base URL from the cdnList to provide the read-only version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetHeaderLogoRelativeUrl(value *string)() { + m.headerLogoRelativeUrl = value +} +// SetLoginPageLayoutConfiguration sets the loginPageLayoutConfiguration property value. Represents the layout configuration to be displayed on the login page for a tenant. +func (m *OrganizationalBrandingProperties) SetLoginPageLayoutConfiguration(value LoginPageLayoutConfigurationable)() { + m.loginPageLayoutConfiguration = value +} +// SetLoginPageTextVisibilitySettings sets the loginPageTextVisibilitySettings property value. Represents the various texts that can be hidden on the login page for a tenant. +func (m *OrganizationalBrandingProperties) SetLoginPageTextVisibilitySettings(value LoginPageTextVisibilitySettingsable)() { + m.loginPageTextVisibilitySettings = value +} +// SetSignInPageText sets the signInPageText property value. Text that appears at the bottom of the sign-in box. Use this to communicate additional information, such as the phone number to your help desk or a legal statement. This text must be in Unicode format and not exceed 1024 characters. +func (m *OrganizationalBrandingProperties) SetSignInPageText(value *string)() { + m.signInPageText = value +} +// SetSquareLogo sets the squareLogo property value. A square version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) SetSquareLogo(value []byte)() { + m.squareLogo = value +} +// SetSquareLogoDark sets the squareLogoDark property value. A square dark version of your company logo that appears in Windows 10 out-of-box experiences (OOBE) and when Windows Autopilot is enabled for deployment. Allowed types are PNG or JPEG not larger than 240 x 240 pixels and not more than 10 KB in size. We recommend using a transparent image with no padding around the logo. +func (m *OrganizationalBrandingProperties) SetSquareLogoDark(value []byte)() { + m.squareLogoDark = value +} +// SetSquareLogoDarkRelativeUrl sets the squareLogoDarkRelativeUrl property value. A relative URL for the squareLogoDark property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetSquareLogoDarkRelativeUrl(value *string)() { + m.squareLogoDarkRelativeUrl = value +} +// SetSquareLogoRelativeUrl sets the squareLogoRelativeUrl property value. A relative URL for the squareLogo property that is combined with a CDN base URL from the cdnList to provide the version served by a CDN. Read-only. +func (m *OrganizationalBrandingProperties) SetSquareLogoRelativeUrl(value *string)() { + m.squareLogoRelativeUrl = value +} +// SetUsernameHintText sets the usernameHintText property value. A string that shows as the hint in the username textbox on the sign-in screen. This text must be a Unicode, without links or code, and can't exceed 64 characters. +func (m *OrganizationalBrandingProperties) SetUsernameHintText(value *string)() { + m.usernameHintText = value +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_branding_propertiesable.go b/src/internal/connector/graph/betasdk/models/organizational_branding_propertiesable.go new file mode 100644 index 000000000..45bb1d540 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_branding_propertiesable.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingPropertiesable +type OrganizationalBrandingPropertiesable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBackgroundColor()(*string) + GetBackgroundImage()([]byte) + GetBackgroundImageRelativeUrl()(*string) + GetBannerLogo()([]byte) + GetBannerLogoRelativeUrl()(*string) + GetCdnList()([]string) + GetCustomAccountResetCredentialsUrl()(*string) + GetCustomCannotAccessYourAccountText()(*string) + GetCustomCannotAccessYourAccountUrl()(*string) + GetCustomCSS()([]byte) + GetCustomCSSRelativeUrl()(*string) + GetCustomForgotMyPasswordText()(*string) + GetCustomPrivacyAndCookiesText()(*string) + GetCustomPrivacyAndCookiesUrl()(*string) + GetCustomResetItNowText()(*string) + GetCustomTermsOfUseText()(*string) + GetCustomTermsOfUseUrl()(*string) + GetFavicon()([]byte) + GetFaviconRelativeUrl()(*string) + GetHeaderBackgroundColor()(*string) + GetHeaderLogo()([]byte) + GetHeaderLogoRelativeUrl()(*string) + GetLoginPageLayoutConfiguration()(LoginPageLayoutConfigurationable) + GetLoginPageTextVisibilitySettings()(LoginPageTextVisibilitySettingsable) + GetSignInPageText()(*string) + GetSquareLogo()([]byte) + GetSquareLogoDark()([]byte) + GetSquareLogoDarkRelativeUrl()(*string) + GetSquareLogoRelativeUrl()(*string) + GetUsernameHintText()(*string) + SetBackgroundColor(value *string)() + SetBackgroundImage(value []byte)() + SetBackgroundImageRelativeUrl(value *string)() + SetBannerLogo(value []byte)() + SetBannerLogoRelativeUrl(value *string)() + SetCdnList(value []string)() + SetCustomAccountResetCredentialsUrl(value *string)() + SetCustomCannotAccessYourAccountText(value *string)() + SetCustomCannotAccessYourAccountUrl(value *string)() + SetCustomCSS(value []byte)() + SetCustomCSSRelativeUrl(value *string)() + SetCustomForgotMyPasswordText(value *string)() + SetCustomPrivacyAndCookiesText(value *string)() + SetCustomPrivacyAndCookiesUrl(value *string)() + SetCustomResetItNowText(value *string)() + SetCustomTermsOfUseText(value *string)() + SetCustomTermsOfUseUrl(value *string)() + SetFavicon(value []byte)() + SetFaviconRelativeUrl(value *string)() + SetHeaderBackgroundColor(value *string)() + SetHeaderLogo(value []byte)() + SetHeaderLogoRelativeUrl(value *string)() + SetLoginPageLayoutConfiguration(value LoginPageLayoutConfigurationable)() + SetLoginPageTextVisibilitySettings(value LoginPageTextVisibilitySettingsable)() + SetSignInPageText(value *string)() + SetSquareLogo(value []byte)() + SetSquareLogoDark(value []byte)() + SetSquareLogoDarkRelativeUrl(value *string)() + SetSquareLogoRelativeUrl(value *string)() + SetUsernameHintText(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/organizational_brandingable.go b/src/internal/connector/graph/betasdk/models/organizational_brandingable.go new file mode 100644 index 000000000..b12b59e92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizational_brandingable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizationalBrandingable +type OrganizationalBrandingable interface { + OrganizationalBrandingPropertiesable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLocalizations()([]OrganizationalBrandingLocalizationable) + SetLocalizations(value []OrganizationalBrandingLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/organizer_meeting_info.go b/src/internal/connector/graph/betasdk/models/organizer_meeting_info.go new file mode 100644 index 000000000..0b4170232 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizer_meeting_info.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizerMeetingInfo +type OrganizerMeetingInfo struct { + MeetingInfo + // The organizer property + organizer IdentitySetable +} +// NewOrganizerMeetingInfo instantiates a new OrganizerMeetingInfo and sets the default values. +func NewOrganizerMeetingInfo()(*OrganizerMeetingInfo) { + m := &OrganizerMeetingInfo{ + MeetingInfo: *NewMeetingInfo(), + } + odataTypeValue := "#microsoft.graph.organizerMeetingInfo"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOrganizerMeetingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOrganizerMeetingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOrganizerMeetingInfo(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OrganizerMeetingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MeetingInfo.GetFieldDeserializers() + res["organizer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrganizer(val.(IdentitySetable)) + } + return nil + } + return res +} +// GetOrganizer gets the organizer property value. The organizer property +func (m *OrganizerMeetingInfo) GetOrganizer()(IdentitySetable) { + return m.organizer +} +// Serialize serializes information the current object +func (m *OrganizerMeetingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MeetingInfo.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("organizer", m.GetOrganizer()) + if err != nil { + return err + } + } + return nil +} +// SetOrganizer sets the organizer property value. The organizer property +func (m *OrganizerMeetingInfo) SetOrganizer(value IdentitySetable)() { + m.organizer = value +} diff --git a/src/internal/connector/graph/betasdk/models/organizer_meeting_infoable.go b/src/internal/connector/graph/betasdk/models/organizer_meeting_infoable.go new file mode 100644 index 000000000..864b128b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/organizer_meeting_infoable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OrganizerMeetingInfoable +type OrganizerMeetingInfoable interface { + MeetingInfoable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOrganizer()(IdentitySetable) + SetOrganizer(value IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/os_version_count.go b/src/internal/connector/graph/betasdk/models/os_version_count.go new file mode 100644 index 000000000..ad18faaa6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/os_version_count.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OsVersionCount count of devices with malware for each OS version +type OsVersionCount 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 devices with malware for the OS version + deviceCount *int32 + // The Timestamp of the last update for the device count in UTC + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // OS version + osVersion *string +} +// NewOsVersionCount instantiates a new osVersionCount and sets the default values. +func NewOsVersionCount()(*OsVersionCount) { + m := &OsVersionCount{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOsVersionCountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOsVersionCountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOsVersionCount(), 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 *OsVersionCount) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceCount gets the deviceCount property value. Count of devices with malware for the OS version +func (m *OsVersionCount) GetDeviceCount()(*int32) { + return m.deviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OsVersionCount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDeviceCount(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(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["osVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsVersion(val) + } + return nil + } + return res +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC +func (m *OsVersionCount) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OsVersionCount) GetOdataType()(*string) { + return m.odataType +} +// GetOsVersion gets the osVersion property value. OS version +func (m *OsVersionCount) GetOsVersion()(*string) { + return m.osVersion +} +// Serialize serializes information the current object +func (m *OsVersionCount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("deviceCount", m.GetDeviceCount()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("osVersion", m.GetOsVersion()) + 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 *OsVersionCount) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceCount sets the deviceCount property value. Count of devices with malware for the OS version +func (m *OsVersionCount) SetDeviceCount(value *int32)() { + m.deviceCount = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. The Timestamp of the last update for the device count in UTC +func (m *OsVersionCount) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OsVersionCount) SetOdataType(value *string)() { + m.odataType = value +} +// SetOsVersion sets the osVersion property value. OS version +func (m *OsVersionCount) SetOsVersion(value *string)() { + m.osVersion = value +} diff --git a/src/internal/connector/graph/betasdk/models/os_version_count_collection_response.go b/src/internal/connector/graph/betasdk/models/os_version_count_collection_response.go new file mode 100644 index 000000000..d164d06b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/os_version_count_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OsVersionCountCollectionResponse +type OsVersionCountCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OsVersionCountable +} +// NewOsVersionCountCollectionResponse instantiates a new OsVersionCountCollectionResponse and sets the default values. +func NewOsVersionCountCollectionResponse()(*OsVersionCountCollectionResponse) { + m := &OsVersionCountCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOsVersionCountCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOsVersionCountCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOsVersionCountCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OsVersionCountCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOsVersionCountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OsVersionCountable, len(val)) + for i, v := range val { + res[i] = v.(OsVersionCountable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OsVersionCountCollectionResponse) GetValue()([]OsVersionCountable) { + return m.value +} +// Serialize serializes information the current object +func (m *OsVersionCountCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OsVersionCountCollectionResponse) SetValue(value []OsVersionCountable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/os_version_count_collection_responseable.go b/src/internal/connector/graph/betasdk/models/os_version_count_collection_responseable.go new file mode 100644 index 000000000..672e636a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/os_version_count_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OsVersionCountCollectionResponseable +type OsVersionCountCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OsVersionCountable) + SetValue(value []OsVersionCountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/os_version_countable.go b/src/internal/connector/graph/betasdk/models/os_version_countable.go new file mode 100644 index 000000000..8a483e2ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/os_version_countable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OsVersionCountable +type OsVersionCountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceCount()(*int32) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetOsVersion()(*string) + SetDeviceCount(value *int32)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetOsVersion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/out_of_box_experience_settings.go b/src/internal/connector/graph/betasdk/models/out_of_box_experience_settings.go new file mode 100644 index 000000000..cf39e148d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/out_of_box_experience_settings.go @@ -0,0 +1,229 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutOfBoxExperienceSettings out of box experience setting +type OutOfBoxExperienceSettings 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 deviceUsageType property + deviceUsageType *WindowsDeviceUsageType + // If set to true, then the user can't start over with different account, on company sign-in + hideEscapeLink *bool + // Show or hide EULA to user + hideEULA *bool + // Show or hide privacy settings to user + hidePrivacySettings *bool + // The OdataType property + odataType *string + // If set, then skip the keyboard selection page if Language and Region are set + skipKeyboardSelectionPage *bool + // The userType property + userType *WindowsUserType +} +// NewOutOfBoxExperienceSettings instantiates a new outOfBoxExperienceSettings and sets the default values. +func NewOutOfBoxExperienceSettings()(*OutOfBoxExperienceSettings) { + m := &OutOfBoxExperienceSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOutOfBoxExperienceSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutOfBoxExperienceSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutOfBoxExperienceSettings(), 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 *OutOfBoxExperienceSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeviceUsageType gets the deviceUsageType property value. The deviceUsageType property +func (m *OutOfBoxExperienceSettings) GetDeviceUsageType()(*WindowsDeviceUsageType) { + return m.deviceUsageType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutOfBoxExperienceSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deviceUsageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsDeviceUsageType) + if err != nil { + return err + } + if val != nil { + m.SetDeviceUsageType(val.(*WindowsDeviceUsageType)) + } + return nil + } + res["hideEscapeLink"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideEscapeLink(val) + } + return nil + } + res["hideEULA"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHideEULA(val) + } + return nil + } + res["hidePrivacySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHidePrivacySettings(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["skipKeyboardSelectionPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSkipKeyboardSelectionPage(val) + } + return nil + } + res["userType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWindowsUserType) + if err != nil { + return err + } + if val != nil { + m.SetUserType(val.(*WindowsUserType)) + } + return nil + } + return res +} +// GetHideEscapeLink gets the hideEscapeLink property value. If set to true, then the user can't start over with different account, on company sign-in +func (m *OutOfBoxExperienceSettings) GetHideEscapeLink()(*bool) { + return m.hideEscapeLink +} +// GetHideEULA gets the hideEULA property value. Show or hide EULA to user +func (m *OutOfBoxExperienceSettings) GetHideEULA()(*bool) { + return m.hideEULA +} +// GetHidePrivacySettings gets the hidePrivacySettings property value. Show or hide privacy settings to user +func (m *OutOfBoxExperienceSettings) GetHidePrivacySettings()(*bool) { + return m.hidePrivacySettings +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OutOfBoxExperienceSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSkipKeyboardSelectionPage gets the skipKeyboardSelectionPage property value. If set, then skip the keyboard selection page if Language and Region are set +func (m *OutOfBoxExperienceSettings) GetSkipKeyboardSelectionPage()(*bool) { + return m.skipKeyboardSelectionPage +} +// GetUserType gets the userType property value. The userType property +func (m *OutOfBoxExperienceSettings) GetUserType()(*WindowsUserType) { + return m.userType +} +// Serialize serializes information the current object +func (m *OutOfBoxExperienceSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDeviceUsageType() != nil { + cast := (*m.GetDeviceUsageType()).String() + err := writer.WriteStringValue("deviceUsageType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideEscapeLink", m.GetHideEscapeLink()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hideEULA", m.GetHideEULA()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hidePrivacySettings", m.GetHidePrivacySettings()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("skipKeyboardSelectionPage", m.GetSkipKeyboardSelectionPage()) + if err != nil { + return err + } + } + if m.GetUserType() != nil { + cast := (*m.GetUserType()).String() + err := writer.WriteStringValue("userType", &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 *OutOfBoxExperienceSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeviceUsageType sets the deviceUsageType property value. The deviceUsageType property +func (m *OutOfBoxExperienceSettings) SetDeviceUsageType(value *WindowsDeviceUsageType)() { + m.deviceUsageType = value +} +// SetHideEscapeLink sets the hideEscapeLink property value. If set to true, then the user can't start over with different account, on company sign-in +func (m *OutOfBoxExperienceSettings) SetHideEscapeLink(value *bool)() { + m.hideEscapeLink = value +} +// SetHideEULA sets the hideEULA property value. Show or hide EULA to user +func (m *OutOfBoxExperienceSettings) SetHideEULA(value *bool)() { + m.hideEULA = value +} +// SetHidePrivacySettings sets the hidePrivacySettings property value. Show or hide privacy settings to user +func (m *OutOfBoxExperienceSettings) SetHidePrivacySettings(value *bool)() { + m.hidePrivacySettings = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OutOfBoxExperienceSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSkipKeyboardSelectionPage sets the skipKeyboardSelectionPage property value. If set, then skip the keyboard selection page if Language and Region are set +func (m *OutOfBoxExperienceSettings) SetSkipKeyboardSelectionPage(value *bool)() { + m.skipKeyboardSelectionPage = value +} +// SetUserType sets the userType property value. The userType property +func (m *OutOfBoxExperienceSettings) SetUserType(value *WindowsUserType)() { + m.userType = value +} diff --git a/src/internal/connector/graph/betasdk/models/out_of_box_experience_settingsable.go b/src/internal/connector/graph/betasdk/models/out_of_box_experience_settingsable.go new file mode 100644 index 000000000..db60056fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/out_of_box_experience_settingsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutOfBoxExperienceSettingsable +type OutOfBoxExperienceSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceUsageType()(*WindowsDeviceUsageType) + GetHideEscapeLink()(*bool) + GetHideEULA()(*bool) + GetHidePrivacySettings()(*bool) + GetOdataType()(*string) + GetSkipKeyboardSelectionPage()(*bool) + GetUserType()(*WindowsUserType) + SetDeviceUsageType(value *WindowsDeviceUsageType)() + SetHideEscapeLink(value *bool)() + SetHideEULA(value *bool)() + SetHidePrivacySettings(value *bool)() + SetOdataType(value *string)() + SetSkipKeyboardSelectionPage(value *bool)() + SetUserType(value *WindowsUserType)() +} diff --git a/src/internal/connector/graph/betasdk/models/out_of_office_settings.go b/src/internal/connector/graph/betasdk/models/out_of_office_settings.go new file mode 100644 index 000000000..032682c41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/out_of_office_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutOfOfficeSettings +type OutOfOfficeSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // True if either:It is currently in the out of office time window configured on the Outlook or Teams client.There is currently an event on the user's calendar that's marked as Show as Out of OfficeOtherwise, false. + isOutOfOffice *bool + // The out of office message that the user configured on Outlook client (Automatic Replies (Out of Office)) or the Teams client (Schedule out of office). + message *string + // The OdataType property + odataType *string +} +// NewOutOfOfficeSettings instantiates a new outOfOfficeSettings and sets the default values. +func NewOutOfOfficeSettings()(*OutOfOfficeSettings) { + m := &OutOfOfficeSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOutOfOfficeSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutOfOfficeSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutOfOfficeSettings(), 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 *OutOfOfficeSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutOfOfficeSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isOutOfOffice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOutOfOffice(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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 + } + return res +} +// GetIsOutOfOffice gets the isOutOfOffice property value. True if either:It is currently in the out of office time window configured on the Outlook or Teams client.There is currently an event on the user's calendar that's marked as Show as Out of OfficeOtherwise, false. +func (m *OutOfOfficeSettings) GetIsOutOfOffice()(*bool) { + return m.isOutOfOffice +} +// GetMessage gets the message property value. The out of office message that the user configured on Outlook client (Automatic Replies (Out of Office)) or the Teams client (Schedule out of office). +func (m *OutOfOfficeSettings) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OutOfOfficeSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OutOfOfficeSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isOutOfOffice", m.GetIsOutOfOffice()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *OutOfOfficeSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsOutOfOffice sets the isOutOfOffice property value. True if either:It is currently in the out of office time window configured on the Outlook or Teams client.There is currently an event on the user's calendar that's marked as Show as Out of OfficeOtherwise, false. +func (m *OutOfOfficeSettings) SetIsOutOfOffice(value *bool)() { + m.isOutOfOffice = value +} +// SetMessage sets the message property value. The out of office message that the user configured on Outlook client (Automatic Replies (Out of Office)) or the Teams client (Schedule out of office). +func (m *OutOfOfficeSettings) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OutOfOfficeSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/out_of_office_settingsable.go b/src/internal/connector/graph/betasdk/models/out_of_office_settingsable.go new file mode 100644 index 000000000..02f0b3ad8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/out_of_office_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutOfOfficeSettingsable +type OutOfOfficeSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsOutOfOffice()(*bool) + GetMessage()(*string) + GetOdataType()(*string) + SetIsOutOfOffice(value *bool)() + SetMessage(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile.go b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile.go new file mode 100644 index 000000000..40ea1fb60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutboundSharedUserProfile +type OutboundSharedUserProfile 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 OdataType property + odataType *string + // The tenants property + tenants []TenantReferenceable + // The userId property + userId *string +} +// NewOutboundSharedUserProfile instantiates a new outboundSharedUserProfile and sets the default values. +func NewOutboundSharedUserProfile()(*OutboundSharedUserProfile) { + m := &OutboundSharedUserProfile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOutboundSharedUserProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutboundSharedUserProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutboundSharedUserProfile(), 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 *OutboundSharedUserProfile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutboundSharedUserProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["tenants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantReferenceable, len(val)) + for i, v := range val { + res[i] = v.(TenantReferenceable) + } + m.SetTenants(res) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OutboundSharedUserProfile) GetOdataType()(*string) { + return m.odataType +} +// GetTenants gets the tenants property value. The tenants property +func (m *OutboundSharedUserProfile) GetTenants()([]TenantReferenceable) { + return m.tenants +} +// GetUserId gets the userId property value. The userId property +func (m *OutboundSharedUserProfile) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *OutboundSharedUserProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetTenants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTenants())) + for i, v := range m.GetTenants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("tenants", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userId", m.GetUserId()) + 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 *OutboundSharedUserProfile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OutboundSharedUserProfile) SetOdataType(value *string)() { + m.odataType = value +} +// SetTenants sets the tenants property value. The tenants property +func (m *OutboundSharedUserProfile) SetTenants(value []TenantReferenceable)() { + m.tenants = value +} +// SetUserId sets the userId property value. The userId property +func (m *OutboundSharedUserProfile) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_response.go new file mode 100644 index 000000000..0bca04fe5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutboundSharedUserProfileCollectionResponse +type OutboundSharedUserProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OutboundSharedUserProfileable +} +// NewOutboundSharedUserProfileCollectionResponse instantiates a new OutboundSharedUserProfileCollectionResponse and sets the default values. +func NewOutboundSharedUserProfileCollectionResponse()(*OutboundSharedUserProfileCollectionResponse) { + m := &OutboundSharedUserProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOutboundSharedUserProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutboundSharedUserProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutboundSharedUserProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutboundSharedUserProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutboundSharedUserProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutboundSharedUserProfileable, len(val)) + for i, v := range val { + res[i] = v.(OutboundSharedUserProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OutboundSharedUserProfileCollectionResponse) GetValue()([]OutboundSharedUserProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *OutboundSharedUserProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OutboundSharedUserProfileCollectionResponse) SetValue(value []OutboundSharedUserProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_responseable.go new file mode 100644 index 000000000..8e82b26fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutboundSharedUserProfileCollectionResponseable +type OutboundSharedUserProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OutboundSharedUserProfileable) + SetValue(value []OutboundSharedUserProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outbound_shared_user_profileable.go b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profileable.go new file mode 100644 index 000000000..9c8ad0e92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outbound_shared_user_profileable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutboundSharedUserProfileable +type OutboundSharedUserProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetTenants()([]TenantReferenceable) + GetUserId()(*string) + SetOdataType(value *string)() + SetTenants(value []TenantReferenceable)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/outgoing_call_options.go b/src/internal/connector/graph/betasdk/models/outgoing_call_options.go new file mode 100644 index 000000000..11f5ac640 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outgoing_call_options.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutgoingCallOptions +type OutgoingCallOptions struct { + CallOptions +} +// NewOutgoingCallOptions instantiates a new OutgoingCallOptions and sets the default values. +func NewOutgoingCallOptions()(*OutgoingCallOptions) { + m := &OutgoingCallOptions{ + CallOptions: *NewCallOptions(), + } + odataTypeValue := "#microsoft.graph.outgoingCallOptions"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOutgoingCallOptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutgoingCallOptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutgoingCallOptions(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutgoingCallOptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CallOptions.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *OutgoingCallOptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CallOptions.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/outgoing_call_optionsable.go b/src/internal/connector/graph/betasdk/models/outgoing_call_optionsable.go new file mode 100644 index 000000000..c351c5b90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outgoing_call_optionsable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutgoingCallOptionsable +type OutgoingCallOptionsable interface { + CallOptionsable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/outlier_container_type.go b/src/internal/connector/graph/betasdk/models/outlier_container_type.go new file mode 100644 index 000000000..8dc222bf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlier_container_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlierContainerType int + +const ( + GROUP_OUTLIERCONTAINERTYPE OutlierContainerType = iota + UNKNOWNFUTUREVALUE_OUTLIERCONTAINERTYPE +) + +func (i OutlierContainerType) String() string { + return []string{"group", "unknownFutureValue"}[i] +} +func ParseOutlierContainerType(v string) (interface{}, error) { + result := GROUP_OUTLIERCONTAINERTYPE + switch v { + case "group": + result = GROUP_OUTLIERCONTAINERTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OUTLIERCONTAINERTYPE + default: + return 0, errors.New("Unknown OutlierContainerType value: " + v) + } + return &result, nil +} +func SerializeOutlierContainerType(values []OutlierContainerType) []string { + 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/outlier_member_type.go b/src/internal/connector/graph/betasdk/models/outlier_member_type.go new file mode 100644 index 000000000..963251fe8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlier_member_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlierMemberType int + +const ( + USER_OUTLIERMEMBERTYPE OutlierMemberType = iota + UNKNOWNFUTUREVALUE_OUTLIERMEMBERTYPE +) + +func (i OutlierMemberType) String() string { + return []string{"user", "unknownFutureValue"}[i] +} +func ParseOutlierMemberType(v string) (interface{}, error) { + result := USER_OUTLIERMEMBERTYPE + switch v { + case "user": + result = USER_OUTLIERMEMBERTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_OUTLIERMEMBERTYPE + default: + return 0, errors.New("Unknown OutlierMemberType value: " + v) + } + return &result, nil +} +func SerializeOutlierMemberType(values []OutlierMemberType) []string { + 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/outlook_category.go b/src/internal/connector/graph/betasdk/models/outlook_category.go new file mode 100644 index 000000000..b00afe262 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_category.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookCategory provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlookCategory struct { + Entity + // A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. See the note below. + color *CategoryColor + // A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only. + displayName *string +} +// NewOutlookCategory instantiates a new outlookCategory and sets the default values. +func NewOutlookCategory()(*OutlookCategory) { + m := &OutlookCategory{ + Entity: *NewEntity(), + } + return m +} +// CreateOutlookCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookCategory(), nil +} +// GetColor gets the color property value. A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. See the note below. +func (m *OutlookCategory) GetColor()(*CategoryColor) { + return m.color +} +// GetDisplayName gets the displayName property value. A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only. +func (m *OutlookCategory) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCategoryColor) + if err != nil { + return err + } + if val != nil { + m.SetColor(val.(*CategoryColor)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *OutlookCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetColor() != nil { + cast := (*m.GetColor()).String() + err = writer.WriteStringValue("color", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetColor sets the color property value. A pre-set color constant that characterizes a category, and that is mapped to one of 25 predefined colors. See the note below. +func (m *OutlookCategory) SetColor(value *CategoryColor)() { + m.color = value +} +// SetDisplayName sets the displayName property value. A unique name that identifies a category in the user's mailbox. After a category is created, the name cannot be changed. Read-only. +func (m *OutlookCategory) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_category_collection_response.go b/src/internal/connector/graph/betasdk/models/outlook_category_collection_response.go new file mode 100644 index 000000000..f12f0018c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookCategoryCollectionResponse +type OutlookCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OutlookCategoryable +} +// NewOutlookCategoryCollectionResponse instantiates a new OutlookCategoryCollectionResponse and sets the default values. +func NewOutlookCategoryCollectionResponse()(*OutlookCategoryCollectionResponse) { + m := &OutlookCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOutlookCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookCategoryable, len(val)) + for i, v := range val { + res[i] = v.(OutlookCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OutlookCategoryCollectionResponse) GetValue()([]OutlookCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *OutlookCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OutlookCategoryCollectionResponse) SetValue(value []OutlookCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/outlook_category_collection_responseable.go new file mode 100644 index 000000000..c75b940fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookCategoryCollectionResponseable +type OutlookCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OutlookCategoryable) + SetValue(value []OutlookCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_categoryable.go b/src/internal/connector/graph/betasdk/models/outlook_categoryable.go new file mode 100644 index 000000000..886bd0428 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_categoryable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookCategoryable +type OutlookCategoryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*CategoryColor) + GetDisplayName()(*string) + SetColor(value *CategoryColor)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_geo_coordinates.go b/src/internal/connector/graph/betasdk/models/outlook_geo_coordinates.go new file mode 100644 index 000000000..03392182f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_geo_coordinates.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookGeoCoordinates +type OutlookGeoCoordinates struct { + // The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters. + accuracy *float64 + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The altitude of the location. + altitude *float64 + // The accuracy of the altitude. + altitudeAccuracy *float64 + // The latitude of the location. + latitude *float64 + // The longitude of the location. + longitude *float64 + // The OdataType property + odataType *string +} +// NewOutlookGeoCoordinates instantiates a new outlookGeoCoordinates and sets the default values. +func NewOutlookGeoCoordinates()(*OutlookGeoCoordinates) { + m := &OutlookGeoCoordinates{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOutlookGeoCoordinatesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookGeoCoordinatesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookGeoCoordinates(), nil +} +// GetAccuracy gets the accuracy property value. The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters. +func (m *OutlookGeoCoordinates) GetAccuracy()(*float64) { + return m.accuracy +} +// 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 *OutlookGeoCoordinates) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAltitude gets the altitude property value. The altitude of the location. +func (m *OutlookGeoCoordinates) GetAltitude()(*float64) { + return m.altitude +} +// GetAltitudeAccuracy gets the altitudeAccuracy property value. The accuracy of the altitude. +func (m *OutlookGeoCoordinates) GetAltitudeAccuracy()(*float64) { + return m.altitudeAccuracy +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookGeoCoordinates) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accuracy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAccuracy(val) + } + return nil + } + res["altitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAltitude(val) + } + return nil + } + res["altitudeAccuracy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAltitudeAccuracy(val) + } + return nil + } + res["latitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLatitude(val) + } + return nil + } + res["longitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLongitude(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 + } + return res +} +// GetLatitude gets the latitude property value. The latitude of the location. +func (m *OutlookGeoCoordinates) GetLatitude()(*float64) { + return m.latitude +} +// GetLongitude gets the longitude property value. The longitude of the location. +func (m *OutlookGeoCoordinates) GetLongitude()(*float64) { + return m.longitude +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OutlookGeoCoordinates) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *OutlookGeoCoordinates) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteFloat64Value("accuracy", m.GetAccuracy()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("altitude", m.GetAltitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("altitudeAccuracy", m.GetAltitudeAccuracy()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("latitude", m.GetLatitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("longitude", m.GetLongitude()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccuracy sets the accuracy property value. The accuracy of the latitude and longitude. As an example, the accuracy can be measured in meters, such as the latitude and longitude are accurate to within 50 meters. +func (m *OutlookGeoCoordinates) SetAccuracy(value *float64)() { + m.accuracy = value +} +// 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 *OutlookGeoCoordinates) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAltitude sets the altitude property value. The altitude of the location. +func (m *OutlookGeoCoordinates) SetAltitude(value *float64)() { + m.altitude = value +} +// SetAltitudeAccuracy sets the altitudeAccuracy property value. The accuracy of the altitude. +func (m *OutlookGeoCoordinates) SetAltitudeAccuracy(value *float64)() { + m.altitudeAccuracy = value +} +// SetLatitude sets the latitude property value. The latitude of the location. +func (m *OutlookGeoCoordinates) SetLatitude(value *float64)() { + m.latitude = value +} +// SetLongitude sets the longitude property value. The longitude of the location. +func (m *OutlookGeoCoordinates) SetLongitude(value *float64)() { + m.longitude = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OutlookGeoCoordinates) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_geo_coordinatesable.go b/src/internal/connector/graph/betasdk/models/outlook_geo_coordinatesable.go new file mode 100644 index 000000000..a5b2376e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_geo_coordinatesable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookGeoCoordinatesable +type OutlookGeoCoordinatesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccuracy()(*float64) + GetAltitude()(*float64) + GetAltitudeAccuracy()(*float64) + GetLatitude()(*float64) + GetLongitude()(*float64) + GetOdataType()(*string) + SetAccuracy(value *float64)() + SetAltitude(value *float64)() + SetAltitudeAccuracy(value *float64)() + SetLatitude(value *float64)() + SetLongitude(value *float64)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_item.go b/src/internal/connector/graph/betasdk/models/outlook_item.go new file mode 100644 index 000000000..dfa47bbad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_item.go @@ -0,0 +1,179 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlookItem struct { + Entity + // The categories property + categories []string + // The changeKey property + changeKey *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewOutlookItem instantiates a new outlookItem and sets the default values. +func NewOutlookItem()(*OutlookItem) { + m := &OutlookItem{ + Entity: *NewEntity(), + } + return m +} +// CreateOutlookItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.calendarSharingMessage": + return NewCalendarSharingMessage(), nil + case "#microsoft.graph.contact": + return NewContact(), nil + case "#microsoft.graph.event": + return NewEvent(), nil + case "#microsoft.graph.eventMessage": + return NewEventMessage(), nil + case "#microsoft.graph.eventMessageRequest": + return NewEventMessageRequest(), nil + case "#microsoft.graph.eventMessageResponse": + return NewEventMessageResponse(), nil + case "#microsoft.graph.message": + return NewMessage(), nil + case "#microsoft.graph.note": + return NewNote(), nil + case "#microsoft.graph.outlookTask": + return NewOutlookTask(), nil + case "#microsoft.graph.post": + return NewPost(), nil + } + } + } + } + return NewOutlookItem(), nil +} +// GetCategories gets the categories property value. The categories property +func (m *OutlookItem) GetCategories()([]string) { + return m.categories +} +// GetChangeKey gets the changeKey property value. The changeKey property +func (m *OutlookItem) GetChangeKey()(*string) { + return m.changeKey +} +// GetCreatedDateTime gets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OutlookItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["changeKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeKey(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OutlookItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *OutlookItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("changeKey", m.GetChangeKey()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. The categories property +func (m *OutlookItem) SetCategories(value []string)() { + m.categories = value +} +// SetChangeKey sets the changeKey property value. The changeKey property +func (m *OutlookItem) SetChangeKey(value *string)() { + m.changeKey = value +} +// SetCreatedDateTime sets the createdDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OutlookItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *OutlookItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_itemable.go b/src/internal/connector/graph/betasdk/models/outlook_itemable.go new file mode 100644 index 000000000..9788d5560 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_itemable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookItemable +type OutlookItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]string) + GetChangeKey()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCategories(value []string)() + SetChangeKey(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task.go b/src/internal/connector/graph/betasdk/models/outlook_task.go new file mode 100644 index 000000000..a9e35cfe4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task.go @@ -0,0 +1,531 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTask +type OutlookTask struct { + OutlookItem + // The name of the person who has been assigned the task in Outlook. Read-only. + assignedTo *string + // The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the task. Read-only. Nullable. + attachments []Attachmentable + // The task body that typically contains information about the task. Note that only HTML type is supported. + body ItemBodyable + // The date in the specified time zone that the task was finished. + completedDateTime DateTimeTimeZoneable + // The date in the specified time zone that the task is to be finished. + dueDateTime DateTimeTimeZoneable + // Set to true if the task has attachments. + hasAttachments *bool + // The importance property + importance *Importance + // The isReminderOn property + isReminderOn *bool + // The collection of multi-value extended properties defined for the task. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The owner property + owner *string + // The parentFolderId property + parentFolderId *string + // The recurrence property + recurrence PatternedRecurrenceable + // The reminderDateTime property + reminderDateTime DateTimeTimeZoneable + // The sensitivity property + sensitivity *Sensitivity + // The collection of single-value extended properties defined for the task. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The startDateTime property + startDateTime DateTimeTimeZoneable + // The status property + status *TaskStatus + // The subject property + subject *string +} +// NewOutlookTask instantiates a new OutlookTask and sets the default values. +func NewOutlookTask()(*OutlookTask) { + m := &OutlookTask{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.outlookTask"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateOutlookTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTask(), nil +} +// GetAssignedTo gets the assignedTo property value. The name of the person who has been assigned the task in Outlook. Read-only. +func (m *OutlookTask) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetAttachments gets the attachments property value. The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the task. Read-only. Nullable. +func (m *OutlookTask) GetAttachments()([]Attachmentable) { + return m.attachments +} +// GetBody gets the body property value. The task body that typically contains information about the task. Note that only HTML type is supported. +func (m *OutlookTask) GetBody()(ItemBodyable) { + return m.body +} +// GetCompletedDateTime gets the completedDateTime property value. The date in the specified time zone that the task was finished. +func (m *OutlookTask) GetCompletedDateTime()(DateTimeTimeZoneable) { + return m.completedDateTime +} +// GetDueDateTime gets the dueDateTime property value. The date in the specified time zone that the task is to be finished. +func (m *OutlookTask) GetDueDateTime()(DateTimeTimeZoneable) { + return m.dueDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*Importance)) + } + return nil + } + res["isReminderOn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReminderOn(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(val) + } + return nil + } + res["parentFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentFolderId(val) + } + return nil + } + res["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["reminderDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReminderDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivity) + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val.(*Sensitivity)) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTaskStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*TaskStatus)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. Set to true if the task has attachments. +func (m *OutlookTask) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetImportance gets the importance property value. The importance property +func (m *OutlookTask) GetImportance()(*Importance) { + return m.importance +} +// GetIsReminderOn gets the isReminderOn property value. The isReminderOn property +func (m *OutlookTask) GetIsReminderOn()(*bool) { + return m.isReminderOn +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the task. Read-only. Nullable. +func (m *OutlookTask) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetOwner gets the owner property value. The owner property +func (m *OutlookTask) GetOwner()(*string) { + return m.owner +} +// GetParentFolderId gets the parentFolderId property value. The parentFolderId property +func (m *OutlookTask) GetParentFolderId()(*string) { + return m.parentFolderId +} +// GetRecurrence gets the recurrence property value. The recurrence property +func (m *OutlookTask) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetReminderDateTime gets the reminderDateTime property value. The reminderDateTime property +func (m *OutlookTask) GetReminderDateTime()(DateTimeTimeZoneable) { + return m.reminderDateTime +} +// GetSensitivity gets the sensitivity property value. The sensitivity property +func (m *OutlookTask) GetSensitivity()(*Sensitivity) { + return m.sensitivity +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the task. Read-only. Nullable. +func (m *OutlookTask) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *OutlookTask) GetStartDateTime()(DateTimeTimeZoneable) { + return m.startDateTime +} +// GetStatus gets the status property value. The status property +func (m *OutlookTask) GetStatus()(*TaskStatus) { + return m.status +} +// GetSubject gets the subject property value. The subject property +func (m *OutlookTask) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *OutlookTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err = writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReminderOn", m.GetIsReminderOn()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentFolderId", m.GetParentFolderId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reminderDateTime", m.GetReminderDateTime()) + if err != nil { + return err + } + } + if m.GetSensitivity() != nil { + cast := (*m.GetSensitivity()).String() + err = writer.WriteStringValue("sensitivity", &cast) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The name of the person who has been assigned the task in Outlook. Read-only. +func (m *OutlookTask) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetAttachments sets the attachments property value. The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the task. Read-only. Nullable. +func (m *OutlookTask) SetAttachments(value []Attachmentable)() { + m.attachments = value +} +// SetBody sets the body property value. The task body that typically contains information about the task. Note that only HTML type is supported. +func (m *OutlookTask) SetBody(value ItemBodyable)() { + m.body = value +} +// SetCompletedDateTime sets the completedDateTime property value. The date in the specified time zone that the task was finished. +func (m *OutlookTask) SetCompletedDateTime(value DateTimeTimeZoneable)() { + m.completedDateTime = value +} +// SetDueDateTime sets the dueDateTime property value. The date in the specified time zone that the task is to be finished. +func (m *OutlookTask) SetDueDateTime(value DateTimeTimeZoneable)() { + m.dueDateTime = value +} +// SetHasAttachments sets the hasAttachments property value. Set to true if the task has attachments. +func (m *OutlookTask) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetImportance sets the importance property value. The importance property +func (m *OutlookTask) SetImportance(value *Importance)() { + m.importance = value +} +// SetIsReminderOn sets the isReminderOn property value. The isReminderOn property +func (m *OutlookTask) SetIsReminderOn(value *bool)() { + m.isReminderOn = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the task. Read-only. Nullable. +func (m *OutlookTask) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetOwner sets the owner property value. The owner property +func (m *OutlookTask) SetOwner(value *string)() { + m.owner = value +} +// SetParentFolderId sets the parentFolderId property value. The parentFolderId property +func (m *OutlookTask) SetParentFolderId(value *string)() { + m.parentFolderId = value +} +// SetRecurrence sets the recurrence property value. The recurrence property +func (m *OutlookTask) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetReminderDateTime sets the reminderDateTime property value. The reminderDateTime property +func (m *OutlookTask) SetReminderDateTime(value DateTimeTimeZoneable)() { + m.reminderDateTime = value +} +// SetSensitivity sets the sensitivity property value. The sensitivity property +func (m *OutlookTask) SetSensitivity(value *Sensitivity)() { + m.sensitivity = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the task. Read-only. Nullable. +func (m *OutlookTask) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *OutlookTask) SetStartDateTime(value DateTimeTimeZoneable)() { + m.startDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *OutlookTask) SetStatus(value *TaskStatus)() { + m.status = value +} +// SetSubject sets the subject property value. The subject property +func (m *OutlookTask) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_collection_response.go b/src/internal/connector/graph/betasdk/models/outlook_task_collection_response.go new file mode 100644 index 000000000..07aa81579 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskCollectionResponse +type OutlookTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OutlookTaskable +} +// NewOutlookTaskCollectionResponse instantiates a new OutlookTaskCollectionResponse and sets the default values. +func NewOutlookTaskCollectionResponse()(*OutlookTaskCollectionResponse) { + m := &OutlookTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOutlookTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OutlookTaskCollectionResponse) GetValue()([]OutlookTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *OutlookTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OutlookTaskCollectionResponse) SetValue(value []OutlookTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/outlook_task_collection_responseable.go new file mode 100644 index 000000000..4cae3253f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskCollectionResponseable +type OutlookTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OutlookTaskable) + SetValue(value []OutlookTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_folder.go b/src/internal/connector/graph/betasdk/models/outlook_task_folder.go new file mode 100644 index 000000000..ae242b650 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_folder.go @@ -0,0 +1,241 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskFolder provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlookTaskFolder struct { + Entity + // The version of the task folder. + changeKey *string + // True if the folder is the default task folder. + isDefaultFolder *bool + // The collection of multi-value extended properties defined for the task folder. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // The name of the task folder. + name *string + // The unique GUID identifier for the task folder's parent group. + parentGroupKey *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The collection of single-value extended properties defined for the task folder. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable + // The tasks in this task folder. Read-only. Nullable. + tasks []OutlookTaskable +} +// NewOutlookTaskFolder instantiates a new outlookTaskFolder and sets the default values. +func NewOutlookTaskFolder()(*OutlookTaskFolder) { + m := &OutlookTaskFolder{ + Entity: *NewEntity(), + } + return m +} +// CreateOutlookTaskFolderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskFolderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTaskFolder(), nil +} +// GetChangeKey gets the changeKey property value. The version of the task folder. +func (m *OutlookTaskFolder) GetChangeKey()(*string) { + return m.changeKey +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTaskFolder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["changeKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeKey(val) + } + return nil + } + res["isDefaultFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultFolder(val) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parentGroupKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetParentGroupKey(val) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetIsDefaultFolder gets the isDefaultFolder property value. True if the folder is the default task folder. +func (m *OutlookTaskFolder) GetIsDefaultFolder()(*bool) { + return m.isDefaultFolder +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetName gets the name property value. The name of the task folder. +func (m *OutlookTaskFolder) GetName()(*string) { + return m.name +} +// GetParentGroupKey gets the parentGroupKey property value. The unique GUID identifier for the task folder's parent group. +func (m *OutlookTaskFolder) GetParentGroupKey()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.parentGroupKey +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// GetTasks gets the tasks property value. The tasks in this task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) GetTasks()([]OutlookTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *OutlookTaskFolder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("changeKey", m.GetChangeKey()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultFolder", m.GetIsDefaultFolder()) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("parentGroupKey", m.GetParentGroupKey()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetChangeKey sets the changeKey property value. The version of the task folder. +func (m *OutlookTaskFolder) SetChangeKey(value *string)() { + m.changeKey = value +} +// SetIsDefaultFolder sets the isDefaultFolder property value. True if the folder is the default task folder. +func (m *OutlookTaskFolder) SetIsDefaultFolder(value *bool)() { + m.isDefaultFolder = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetName sets the name property value. The name of the task folder. +func (m *OutlookTaskFolder) SetName(value *string)() { + m.name = value +} +// SetParentGroupKey sets the parentGroupKey property value. The unique GUID identifier for the task folder's parent group. +func (m *OutlookTaskFolder) SetParentGroupKey(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.parentGroupKey = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} +// SetTasks sets the tasks property value. The tasks in this task folder. Read-only. Nullable. +func (m *OutlookTaskFolder) SetTasks(value []OutlookTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_response.go b/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_response.go new file mode 100644 index 000000000..cbf45fbd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskFolderCollectionResponse +type OutlookTaskFolderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OutlookTaskFolderable +} +// NewOutlookTaskFolderCollectionResponse instantiates a new OutlookTaskFolderCollectionResponse and sets the default values. +func NewOutlookTaskFolderCollectionResponse()(*OutlookTaskFolderCollectionResponse) { + m := &OutlookTaskFolderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOutlookTaskFolderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskFolderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTaskFolderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTaskFolderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskFolderable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskFolderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OutlookTaskFolderCollectionResponse) GetValue()([]OutlookTaskFolderable) { + return m.value +} +// Serialize serializes information the current object +func (m *OutlookTaskFolderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OutlookTaskFolderCollectionResponse) SetValue(value []OutlookTaskFolderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_responseable.go b/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_responseable.go new file mode 100644 index 000000000..76233d5eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_folder_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskFolderCollectionResponseable +type OutlookTaskFolderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OutlookTaskFolderable) + SetValue(value []OutlookTaskFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_folderable.go b/src/internal/connector/graph/betasdk/models/outlook_task_folderable.go new file mode 100644 index 000000000..1ce490ca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_folderable.go @@ -0,0 +1,26 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskFolderable +type OutlookTaskFolderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeKey()(*string) + GetIsDefaultFolder()(*bool) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetName()(*string) + GetParentGroupKey()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetTasks()([]OutlookTaskable) + SetChangeKey(value *string)() + SetIsDefaultFolder(value *bool)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetName(value *string)() + SetParentGroupKey(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetTasks(value []OutlookTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_group.go b/src/internal/connector/graph/betasdk/models/outlook_task_group.go new file mode 100644 index 000000000..5697675a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_group.go @@ -0,0 +1,173 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OutlookTaskGroup struct { + Entity + // The version of the task group. + changeKey *string + // The unique GUID identifier for the task group. + groupKey *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // True if the task group is the default task group. + isDefaultGroup *bool + // The name of the task group. + name *string + // The collection of task folders in the task group. Read-only. Nullable. + taskFolders []OutlookTaskFolderable +} +// NewOutlookTaskGroup instantiates a new outlookTaskGroup and sets the default values. +func NewOutlookTaskGroup()(*OutlookTaskGroup) { + m := &OutlookTaskGroup{ + Entity: *NewEntity(), + } + return m +} +// CreateOutlookTaskGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTaskGroup(), nil +} +// GetChangeKey gets the changeKey property value. The version of the task group. +func (m *OutlookTaskGroup) GetChangeKey()(*string) { + return m.changeKey +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTaskGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["changeKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeKey(val) + } + return nil + } + res["groupKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupKey(val) + } + return nil + } + res["isDefaultGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefaultGroup(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["taskFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskFolderable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskFolderable) + } + m.SetTaskFolders(res) + } + return nil + } + return res +} +// GetGroupKey gets the groupKey property value. The unique GUID identifier for the task group. +func (m *OutlookTaskGroup) GetGroupKey()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.groupKey +} +// GetIsDefaultGroup gets the isDefaultGroup property value. True if the task group is the default task group. +func (m *OutlookTaskGroup) GetIsDefaultGroup()(*bool) { + return m.isDefaultGroup +} +// GetName gets the name property value. The name of the task group. +func (m *OutlookTaskGroup) GetName()(*string) { + return m.name +} +// GetTaskFolders gets the taskFolders property value. The collection of task folders in the task group. Read-only. Nullable. +func (m *OutlookTaskGroup) GetTaskFolders()([]OutlookTaskFolderable) { + return m.taskFolders +} +// Serialize serializes information the current object +func (m *OutlookTaskGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("changeKey", m.GetChangeKey()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("groupKey", m.GetGroupKey()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefaultGroup", m.GetIsDefaultGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetTaskFolders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskFolders())) + for i, v := range m.GetTaskFolders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskFolders", cast) + if err != nil { + return err + } + } + return nil +} +// SetChangeKey sets the changeKey property value. The version of the task group. +func (m *OutlookTaskGroup) SetChangeKey(value *string)() { + m.changeKey = value +} +// SetGroupKey sets the groupKey property value. The unique GUID identifier for the task group. +func (m *OutlookTaskGroup) SetGroupKey(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.groupKey = value +} +// SetIsDefaultGroup sets the isDefaultGroup property value. True if the task group is the default task group. +func (m *OutlookTaskGroup) SetIsDefaultGroup(value *bool)() { + m.isDefaultGroup = value +} +// SetName sets the name property value. The name of the task group. +func (m *OutlookTaskGroup) SetName(value *string)() { + m.name = value +} +// SetTaskFolders sets the taskFolders property value. The collection of task folders in the task group. Read-only. Nullable. +func (m *OutlookTaskGroup) SetTaskFolders(value []OutlookTaskFolderable)() { + m.taskFolders = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_response.go b/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_response.go new file mode 100644 index 000000000..690fe5d4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskGroupCollectionResponse +type OutlookTaskGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []OutlookTaskGroupable +} +// NewOutlookTaskGroupCollectionResponse instantiates a new OutlookTaskGroupCollectionResponse and sets the default values. +func NewOutlookTaskGroupCollectionResponse()(*OutlookTaskGroupCollectionResponse) { + m := &OutlookTaskGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateOutlookTaskGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookTaskGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookTaskGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookTaskGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskGroupable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *OutlookTaskGroupCollectionResponse) GetValue()([]OutlookTaskGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *OutlookTaskGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *OutlookTaskGroupCollectionResponse) SetValue(value []OutlookTaskGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_responseable.go new file mode 100644 index 000000000..3da1df2a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskGroupCollectionResponseable +type OutlookTaskGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]OutlookTaskGroupable) + SetValue(value []OutlookTaskGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_task_groupable.go b/src/internal/connector/graph/betasdk/models/outlook_task_groupable.go new file mode 100644 index 000000000..9db53c44d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_task_groupable.go @@ -0,0 +1,22 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskGroupable +type OutlookTaskGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetChangeKey()(*string) + GetGroupKey()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIsDefaultGroup()(*bool) + GetName()(*string) + GetTaskFolders()([]OutlookTaskFolderable) + SetChangeKey(value *string)() + SetGroupKey(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIsDefaultGroup(value *bool)() + SetName(value *string)() + SetTaskFolders(value []OutlookTaskFolderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_taskable.go b/src/internal/connector/graph/betasdk/models/outlook_taskable.go new file mode 100644 index 000000000..00463b0b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_taskable.go @@ -0,0 +1,47 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookTaskable +type OutlookTaskable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetAttachments()([]Attachmentable) + GetBody()(ItemBodyable) + GetCompletedDateTime()(DateTimeTimeZoneable) + GetDueDateTime()(DateTimeTimeZoneable) + GetHasAttachments()(*bool) + GetImportance()(*Importance) + GetIsReminderOn()(*bool) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetOwner()(*string) + GetParentFolderId()(*string) + GetRecurrence()(PatternedRecurrenceable) + GetReminderDateTime()(DateTimeTimeZoneable) + GetSensitivity()(*Sensitivity) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + GetStartDateTime()(DateTimeTimeZoneable) + GetStatus()(*TaskStatus) + GetSubject()(*string) + SetAssignedTo(value *string)() + SetAttachments(value []Attachmentable)() + SetBody(value ItemBodyable)() + SetCompletedDateTime(value DateTimeTimeZoneable)() + SetDueDateTime(value DateTimeTimeZoneable)() + SetHasAttachments(value *bool)() + SetImportance(value *Importance)() + SetIsReminderOn(value *bool)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetOwner(value *string)() + SetParentFolderId(value *string)() + SetRecurrence(value PatternedRecurrenceable)() + SetReminderDateTime(value DateTimeTimeZoneable)() + SetSensitivity(value *Sensitivity)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() + SetStartDateTime(value DateTimeTimeZoneable)() + SetStatus(value *TaskStatus)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_user.go b/src/internal/connector/graph/betasdk/models/outlook_user.go new file mode 100644 index 000000000..c547ff606 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_user.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookUser +type OutlookUser struct { + Entity + // A list of categories defined for the user. + masterCategories []OutlookCategoryable + // The taskFolders property + taskFolders []OutlookTaskFolderable + // The taskGroups property + taskGroups []OutlookTaskGroupable + // The tasks property + tasks []OutlookTaskable +} +// NewOutlookUser instantiates a new outlookUser and sets the default values. +func NewOutlookUser()(*OutlookUser) { + m := &OutlookUser{ + Entity: *NewEntity(), + } + return m +} +// CreateOutlookUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOutlookUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOutlookUser(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OutlookUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["masterCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookCategoryable, len(val)) + for i, v := range val { + res[i] = v.(OutlookCategoryable) + } + m.SetMasterCategories(res) + } + return nil + } + res["taskFolders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskFolderable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskFolderable) + } + m.SetTaskFolders(res) + } + return nil + } + res["taskGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskGroupable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskGroupable) + } + m.SetTaskGroups(res) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOutlookTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OutlookTaskable, len(val)) + for i, v := range val { + res[i] = v.(OutlookTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetMasterCategories gets the masterCategories property value. A list of categories defined for the user. +func (m *OutlookUser) GetMasterCategories()([]OutlookCategoryable) { + return m.masterCategories +} +// GetTaskFolders gets the taskFolders property value. The taskFolders property +func (m *OutlookUser) GetTaskFolders()([]OutlookTaskFolderable) { + return m.taskFolders +} +// GetTaskGroups gets the taskGroups property value. The taskGroups property +func (m *OutlookUser) GetTaskGroups()([]OutlookTaskGroupable) { + return m.taskGroups +} +// GetTasks gets the tasks property value. The tasks property +func (m *OutlookUser) GetTasks()([]OutlookTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *OutlookUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetMasterCategories() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMasterCategories())) + for i, v := range m.GetMasterCategories() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("masterCategories", cast) + if err != nil { + return err + } + } + if m.GetTaskFolders() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskFolders())) + for i, v := range m.GetTaskFolders() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskFolders", cast) + if err != nil { + return err + } + } + if m.GetTaskGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskGroups())) + for i, v := range m.GetTaskGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskGroups", cast) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetMasterCategories sets the masterCategories property value. A list of categories defined for the user. +func (m *OutlookUser) SetMasterCategories(value []OutlookCategoryable)() { + m.masterCategories = value +} +// SetTaskFolders sets the taskFolders property value. The taskFolders property +func (m *OutlookUser) SetTaskFolders(value []OutlookTaskFolderable)() { + m.taskFolders = value +} +// SetTaskGroups sets the taskGroups property value. The taskGroups property +func (m *OutlookUser) SetTaskGroups(value []OutlookTaskGroupable)() { + m.taskGroups = value +} +// SetTasks sets the tasks property value. The tasks property +func (m *OutlookUser) SetTasks(value []OutlookTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/outlook_userable.go b/src/internal/connector/graph/betasdk/models/outlook_userable.go new file mode 100644 index 000000000..840eed66a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/outlook_userable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OutlookUserable +type OutlookUserable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMasterCategories()([]OutlookCategoryable) + GetTaskFolders()([]OutlookTaskFolderable) + GetTaskGroups()([]OutlookTaskGroupable) + GetTasks()([]OutlookTaskable) + SetMasterCategories(value []OutlookCategoryable)() + SetTaskFolders(value []OutlookTaskFolderable)() + SetTaskGroups(value []OutlookTaskGroupable)() + SetTasks(value []OutlookTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/override_option.go b/src/internal/connector/graph/betasdk/models/override_option.go new file mode 100644 index 000000000..d3d80f149 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/override_option.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OverrideOption int + +const ( + NOTALLOWED_OVERRIDEOPTION OverrideOption = iota + ALLOWFALSEPOSITIVEOVERRIDE_OVERRIDEOPTION + ALLOWWITHJUSTIFICATION_OVERRIDEOPTION + ALLOWWITHOUTJUSTIFICATION_OVERRIDEOPTION +) + +func (i OverrideOption) String() string { + return []string{"notAllowed", "allowFalsePositiveOverride", "allowWithJustification", "allowWithoutJustification"}[i] +} +func ParseOverrideOption(v string) (interface{}, error) { + result := NOTALLOWED_OVERRIDEOPTION + switch v { + case "notAllowed": + result = NOTALLOWED_OVERRIDEOPTION + case "allowFalsePositiveOverride": + result = ALLOWFALSEPOSITIVEOVERRIDE_OVERRIDEOPTION + case "allowWithJustification": + result = ALLOWWITHJUSTIFICATION_OVERRIDEOPTION + case "allowWithoutJustification": + result = ALLOWWITHOUTJUSTIFICATION_OVERRIDEOPTION + default: + return 0, errors.New("Unknown OverrideOption value: " + v) + } + return &result, nil +} +func SerializeOverrideOption(values []OverrideOption) []string { + 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/owner_type.go b/src/internal/connector/graph/betasdk/models/owner_type.go new file mode 100644 index 000000000..530eb672a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/owner_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OwnerType int + +const ( + // Unknown. + UNKNOWN_OWNERTYPE OwnerType = iota + // Owned by company. + COMPANY_OWNERTYPE + // Owned by person. + PERSONAL_OWNERTYPE +) + +func (i OwnerType) String() string { + return []string{"unknown", "company", "personal"}[i] +} +func ParseOwnerType(v string) (interface{}, error) { + result := UNKNOWN_OWNERTYPE + switch v { + case "unknown": + result = UNKNOWN_OWNERTYPE + case "company": + result = COMPANY_OWNERTYPE + case "personal": + result = PERSONAL_OWNERTYPE + default: + return 0, errors.New("Unknown OwnerType value: " + v) + } + return &result, nil +} +func SerializeOwnerType(values []OwnerType) []string { + 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/package_escaped.go b/src/internal/connector/graph/betasdk/models/package_escaped.go new file mode 100644 index 000000000..c549037f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/package_escaped.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Package_escaped +type Package_escaped 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 OdataType property + odataType *string + // The type property + type_escaped *string +} +// NewPackage_escaped instantiates a new package_escaped and sets the default values. +func NewPackage_escaped()(*Package_escaped) { + m := &Package_escaped{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePackage_escapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePackage_escapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPackage_escaped(), 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 *Package_escaped) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Package_escaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Package_escaped) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *Package_escaped) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Package_escaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *Package_escaped) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Package_escaped) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *Package_escaped) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/package_escapedable.go b/src/internal/connector/graph/betasdk/models/package_escapedable.go new file mode 100644 index 000000000..b42c9fbf6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/package_escapedable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Package_escapedable +type Package_escapedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*string) + SetOdataType(value *string)() + SetType(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 new file mode 100644 index 000000000..9f20e9a25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/page_layout_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PageLayoutType int + +const ( + MICROSOFTRESERVED_PAGELAYOUTTYPE PageLayoutType = iota + ARTICLE_PAGELAYOUTTYPE + HOME_PAGELAYOUTTYPE + UNKNOWNFUTUREVALUE_PAGELAYOUTTYPE +) + +func (i PageLayoutType) String() string { + 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 +} +func SerializePageLayoutType(values []PageLayoutType) []string { + 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_links.go b/src/internal/connector/graph/betasdk/models/page_links.go new file mode 100644 index 000000000..3a8a1e7cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/page_links.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PageLinks +type PageLinks 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 OdataType property + odataType *string + // Opens the page in the OneNote native client if it's installed. + oneNoteClientUrl ExternalLinkable + // Opens the page in OneNote on the web. + oneNoteWebUrl ExternalLinkable +} +// NewPageLinks instantiates a new pageLinks and sets the default values. +func NewPageLinks()(*PageLinks) { + m := &PageLinks{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePageLinksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePageLinksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPageLinks(), 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 *PageLinks) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PageLinks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["oneNoteClientUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteClientUrl(val.(ExternalLinkable)) + } + return nil + } + res["oneNoteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteWebUrl(val.(ExternalLinkable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PageLinks) GetOdataType()(*string) { + return m.odataType +} +// GetOneNoteClientUrl gets the oneNoteClientUrl property value. Opens the page in the OneNote native client if it's installed. +func (m *PageLinks) GetOneNoteClientUrl()(ExternalLinkable) { + return m.oneNoteClientUrl +} +// GetOneNoteWebUrl gets the oneNoteWebUrl property value. Opens the page in OneNote on the web. +func (m *PageLinks) GetOneNoteWebUrl()(ExternalLinkable) { + return m.oneNoteWebUrl +} +// Serialize serializes information the current object +func (m *PageLinks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteClientUrl", m.GetOneNoteClientUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteWebUrl", m.GetOneNoteWebUrl()) + 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 *PageLinks) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PageLinks) SetOdataType(value *string)() { + m.odataType = value +} +// SetOneNoteClientUrl sets the oneNoteClientUrl property value. Opens the page in the OneNote native client if it's installed. +func (m *PageLinks) SetOneNoteClientUrl(value ExternalLinkable)() { + m.oneNoteClientUrl = value +} +// SetOneNoteWebUrl sets the oneNoteWebUrl property value. Opens the page in OneNote on the web. +func (m *PageLinks) SetOneNoteWebUrl(value ExternalLinkable)() { + m.oneNoteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/page_linksable.go b/src/internal/connector/graph/betasdk/models/page_linksable.go new file mode 100644 index 000000000..bee5ab952 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/page_linksable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PageLinksable +type PageLinksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOneNoteClientUrl()(ExternalLinkable) + GetOneNoteWebUrl()(ExternalLinkable) + SetOdataType(value *string)() + SetOneNoteClientUrl(value ExternalLinkable)() + SetOneNoteWebUrl(value ExternalLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/page_orientation.go b/src/internal/connector/graph/betasdk/models/page_orientation.go new file mode 100644 index 000000000..178239f53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/page_orientation.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PageOrientation int + +const ( + HORIZONTAL_PAGEORIENTATION PageOrientation = iota + DIAGONAL_PAGEORIENTATION +) + +func (i PageOrientation) String() string { + return []string{"horizontal", "diagonal"}[i] +} +func ParsePageOrientation(v string) (interface{}, error) { + result := HORIZONTAL_PAGEORIENTATION + switch v { + case "horizontal": + result = HORIZONTAL_PAGEORIENTATION + case "diagonal": + result = DIAGONAL_PAGEORIENTATION + default: + return 0, errors.New("Unknown PageOrientation value: " + v) + } + return &result, nil +} +func SerializePageOrientation(values []PageOrientation) []string { + 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 new file mode 100644 index 000000000..2281230d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/page_promotion_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PagePromotionType int + +const ( + MICROSOFTRESERVED_PAGEPROMOTIONTYPE PagePromotionType = iota + PAGE_PAGEPROMOTIONTYPE + NEWSPOST_PAGEPROMOTIONTYPE + UNKNOWNFUTUREVALUE_PAGEPROMOTIONTYPE +) + +func (i PagePromotionType) String() string { + 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 +} +func SerializePagePromotionType(values []PagePromotionType) []string { + 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/parent_label_details.go b/src/internal/connector/graph/betasdk/models/parent_label_details.go new file mode 100644 index 000000000..0c6f9809c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/parent_label_details.go @@ -0,0 +1,297 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParentLabelDetails +type ParentLabelDetails 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 color that the user interface should display for the label, if configured. + color *string + // The admin-defined description for the label. + description *string + // The label ID is a globally unique identifier (GUID). + id *string + // Indicates whether the label is active or not. Active labels should be hidden or disabled in user interfaces. + isActive *bool + // The plaintext name of the label. + name *string + // The OdataType property + odataType *string + // The parent property + parent ParentLabelDetailsable + // The sensitivity value of the label, where lower is less sensitive. + sensitivity *int32 + // The tooltip that should be displayed for the label in a user interface. + tooltip *string +} +// NewParentLabelDetails instantiates a new parentLabelDetails and sets the default values. +func NewParentLabelDetails()(*ParentLabelDetails) { + m := &ParentLabelDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateParentLabelDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParentLabelDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.labelDetails": + return NewLabelDetails(), nil + } + } + } + } + return NewParentLabelDetails(), 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 *ParentLabelDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetColor gets the color property value. The color that the user interface should display for the label, if configured. +func (m *ParentLabelDetails) GetColor()(*string) { + return m.color +} +// GetDescription gets the description property value. The admin-defined description for the label. +func (m *ParentLabelDetails) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParentLabelDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParentLabelDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(ParentLabelDetailsable)) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val) + } + return nil + } + res["tooltip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTooltip(val) + } + return nil + } + return res +} +// GetId gets the id property value. The label ID is a globally unique identifier (GUID). +func (m *ParentLabelDetails) GetId()(*string) { + return m.id +} +// GetIsActive gets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in user interfaces. +func (m *ParentLabelDetails) GetIsActive()(*bool) { + return m.isActive +} +// GetName gets the name property value. The plaintext name of the label. +func (m *ParentLabelDetails) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ParentLabelDetails) GetOdataType()(*string) { + return m.odataType +} +// GetParent gets the parent property value. The parent property +func (m *ParentLabelDetails) GetParent()(ParentLabelDetailsable) { + return m.parent +} +// GetSensitivity gets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *ParentLabelDetails) GetSensitivity()(*int32) { + return m.sensitivity +} +// GetTooltip gets the tooltip property value. The tooltip that should be displayed for the label in a user interface. +func (m *ParentLabelDetails) GetTooltip()(*string) { + return m.tooltip +} +// Serialize serializes information the current object +func (m *ParentLabelDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("sensitivity", m.GetSensitivity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tooltip", m.GetTooltip()) + 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 *ParentLabelDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetColor sets the color property value. The color that the user interface should display for the label, if configured. +func (m *ParentLabelDetails) SetColor(value *string)() { + m.color = value +} +// SetDescription sets the description property value. The admin-defined description for the label. +func (m *ParentLabelDetails) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The label ID is a globally unique identifier (GUID). +func (m *ParentLabelDetails) SetId(value *string)() { + m.id = value +} +// SetIsActive sets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in user interfaces. +func (m *ParentLabelDetails) SetIsActive(value *bool)() { + m.isActive = value +} +// SetName sets the name property value. The plaintext name of the label. +func (m *ParentLabelDetails) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ParentLabelDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetParent sets the parent property value. The parent property +func (m *ParentLabelDetails) SetParent(value ParentLabelDetailsable)() { + m.parent = value +} +// SetSensitivity sets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *ParentLabelDetails) SetSensitivity(value *int32)() { + m.sensitivity = value +} +// SetTooltip sets the tooltip property value. The tooltip that should be displayed for the label in a user interface. +func (m *ParentLabelDetails) SetTooltip(value *string)() { + m.tooltip = value +} diff --git a/src/internal/connector/graph/betasdk/models/parent_label_detailsable.go b/src/internal/connector/graph/betasdk/models/parent_label_detailsable.go new file mode 100644 index 000000000..b9ef16abd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/parent_label_detailsable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParentLabelDetailsable +type ParentLabelDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetDescription()(*string) + GetId()(*string) + GetIsActive()(*bool) + GetName()(*string) + GetOdataType()(*string) + GetParent()(ParentLabelDetailsable) + GetSensitivity()(*int32) + GetTooltip()(*string) + SetColor(value *string)() + SetDescription(value *string)() + SetId(value *string)() + SetIsActive(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() + SetParent(value ParentLabelDetailsable)() + SetSensitivity(value *int32)() + SetTooltip(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/parental_control_settings.go b/src/internal/connector/graph/betasdk/models/parental_control_settings.go new file mode 100644 index 000000000..6fdb3b6b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/parental_control_settings.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParentalControlSettings +type ParentalControlSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies the two-letter ISO country codes. Access to the application will be blocked for minors from the countries specified in this list. + countriesBlockedForMinors []string + // Specifies the legal age group rule that applies to users of the app. Can be set to one of the following values: ValueDescriptionAllowDefault. Enforces the legal minimum. This means parental consent is required for minors in the European Union and Korea.RequireConsentForPrivacyServicesEnforces the user to specify date of birth to comply with COPPA rules. RequireConsentForMinorsRequires parental consent for ages below 18, regardless of country minor rules.RequireConsentForKidsRequires parental consent for ages below 14, regardless of country minor rules.BlockMinorsBlocks minors from using the app. + legalAgeGroupRule *string + // The OdataType property + odataType *string +} +// NewParentalControlSettings instantiates a new parentalControlSettings and sets the default values. +func NewParentalControlSettings()(*ParentalControlSettings) { + m := &ParentalControlSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateParentalControlSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParentalControlSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParentalControlSettings(), 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 *ParentalControlSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCountriesBlockedForMinors gets the countriesBlockedForMinors property value. Specifies the two-letter ISO country codes. Access to the application will be blocked for minors from the countries specified in this list. +func (m *ParentalControlSettings) GetCountriesBlockedForMinors()([]string) { + return m.countriesBlockedForMinors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParentalControlSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["countriesBlockedForMinors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCountriesBlockedForMinors(res) + } + return nil + } + res["legalAgeGroupRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLegalAgeGroupRule(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 + } + return res +} +// GetLegalAgeGroupRule gets the legalAgeGroupRule property value. Specifies the legal age group rule that applies to users of the app. Can be set to one of the following values: ValueDescriptionAllowDefault. Enforces the legal minimum. This means parental consent is required for minors in the European Union and Korea.RequireConsentForPrivacyServicesEnforces the user to specify date of birth to comply with COPPA rules. RequireConsentForMinorsRequires parental consent for ages below 18, regardless of country minor rules.RequireConsentForKidsRequires parental consent for ages below 14, regardless of country minor rules.BlockMinorsBlocks minors from using the app. +func (m *ParentalControlSettings) GetLegalAgeGroupRule()(*string) { + return m.legalAgeGroupRule +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ParentalControlSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ParentalControlSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCountriesBlockedForMinors() != nil { + err := writer.WriteCollectionOfStringValues("countriesBlockedForMinors", m.GetCountriesBlockedForMinors()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("legalAgeGroupRule", m.GetLegalAgeGroupRule()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ParentalControlSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCountriesBlockedForMinors sets the countriesBlockedForMinors property value. Specifies the two-letter ISO country codes. Access to the application will be blocked for minors from the countries specified in this list. +func (m *ParentalControlSettings) SetCountriesBlockedForMinors(value []string)() { + m.countriesBlockedForMinors = value +} +// SetLegalAgeGroupRule sets the legalAgeGroupRule property value. Specifies the legal age group rule that applies to users of the app. Can be set to one of the following values: ValueDescriptionAllowDefault. Enforces the legal minimum. This means parental consent is required for minors in the European Union and Korea.RequireConsentForPrivacyServicesEnforces the user to specify date of birth to comply with COPPA rules. RequireConsentForMinorsRequires parental consent for ages below 18, regardless of country minor rules.RequireConsentForKidsRequires parental consent for ages below 14, regardless of country minor rules.BlockMinorsBlocks minors from using the app. +func (m *ParentalControlSettings) SetLegalAgeGroupRule(value *string)() { + m.legalAgeGroupRule = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ParentalControlSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/parental_control_settingsable.go b/src/internal/connector/graph/betasdk/models/parental_control_settingsable.go new file mode 100644 index 000000000..9a6240004 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/parental_control_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParentalControlSettingsable +type ParentalControlSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountriesBlockedForMinors()([]string) + GetLegalAgeGroupRule()(*string) + GetOdataType()(*string) + SetCountriesBlockedForMinors(value []string)() + SetLegalAgeGroupRule(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/participant.go b/src/internal/connector/graph/betasdk/models/participant.go new file mode 100644 index 000000000..b9c340a32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant.go @@ -0,0 +1,250 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Participant provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Participant struct { + Entity + // The info property + info ParticipantInfoable + // The isIdentityAnonymized property + isIdentityAnonymized *bool + // true if the participant is in lobby. + isInLobby *bool + // true if the participant is muted (client or server muted). + isMuted *bool + // The list of media streams. + mediaStreams []MediaStreamable + // A blob of data provided by the participant in the roster. + metadata *string + // Information on whether the participant has recording capability. + recordingInfo RecordingInfoable + // The restrictedExperience property + restrictedExperience OnlineMeetingRestrictedable +} +// NewParticipant instantiates a new participant and sets the default values. +func NewParticipant()(*Participant) { + m := &Participant{ + Entity: *NewEntity(), + } + return m +} +// CreateParticipantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipant(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Participant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["info"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInfo(val.(ParticipantInfoable)) + } + return nil + } + res["isIdentityAnonymized"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsIdentityAnonymized(val) + } + return nil + } + res["isInLobby"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInLobby(val) + } + return nil + } + res["isMuted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMuted(val) + } + return nil + } + res["mediaStreams"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaStreamFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaStreamable, len(val)) + for i, v := range val { + res[i] = v.(MediaStreamable) + } + m.SetMediaStreams(res) + } + return nil + } + res["metadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadata(val) + } + return nil + } + res["recordingInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecordingInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecordingInfo(val.(RecordingInfoable)) + } + return nil + } + res["restrictedExperience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOnlineMeetingRestrictedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRestrictedExperience(val.(OnlineMeetingRestrictedable)) + } + return nil + } + return res +} +// GetInfo gets the info property value. The info property +func (m *Participant) GetInfo()(ParticipantInfoable) { + return m.info +} +// GetIsIdentityAnonymized gets the isIdentityAnonymized property value. The isIdentityAnonymized property +func (m *Participant) GetIsIdentityAnonymized()(*bool) { + return m.isIdentityAnonymized +} +// GetIsInLobby gets the isInLobby property value. true if the participant is in lobby. +func (m *Participant) GetIsInLobby()(*bool) { + return m.isInLobby +} +// GetIsMuted gets the isMuted property value. true if the participant is muted (client or server muted). +func (m *Participant) GetIsMuted()(*bool) { + return m.isMuted +} +// GetMediaStreams gets the mediaStreams property value. The list of media streams. +func (m *Participant) GetMediaStreams()([]MediaStreamable) { + return m.mediaStreams +} +// GetMetadata gets the metadata property value. A blob of data provided by the participant in the roster. +func (m *Participant) GetMetadata()(*string) { + return m.metadata +} +// GetRecordingInfo gets the recordingInfo property value. Information on whether the participant has recording capability. +func (m *Participant) GetRecordingInfo()(RecordingInfoable) { + return m.recordingInfo +} +// GetRestrictedExperience gets the restrictedExperience property value. The restrictedExperience property +func (m *Participant) GetRestrictedExperience()(OnlineMeetingRestrictedable) { + return m.restrictedExperience +} +// Serialize serializes information the current object +func (m *Participant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("info", m.GetInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isIdentityAnonymized", m.GetIsIdentityAnonymized()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isInLobby", m.GetIsInLobby()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMuted", m.GetIsMuted()) + if err != nil { + return err + } + } + if m.GetMediaStreams() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMediaStreams())) + for i, v := range m.GetMediaStreams() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mediaStreams", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("metadata", m.GetMetadata()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recordingInfo", m.GetRecordingInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("restrictedExperience", m.GetRestrictedExperience()) + if err != nil { + return err + } + } + return nil +} +// SetInfo sets the info property value. The info property +func (m *Participant) SetInfo(value ParticipantInfoable)() { + m.info = value +} +// SetIsIdentityAnonymized sets the isIdentityAnonymized property value. The isIdentityAnonymized property +func (m *Participant) SetIsIdentityAnonymized(value *bool)() { + m.isIdentityAnonymized = value +} +// SetIsInLobby sets the isInLobby property value. true if the participant is in lobby. +func (m *Participant) SetIsInLobby(value *bool)() { + m.isInLobby = value +} +// SetIsMuted sets the isMuted property value. true if the participant is muted (client or server muted). +func (m *Participant) SetIsMuted(value *bool)() { + m.isMuted = value +} +// SetMediaStreams sets the mediaStreams property value. The list of media streams. +func (m *Participant) SetMediaStreams(value []MediaStreamable)() { + m.mediaStreams = value +} +// SetMetadata sets the metadata property value. A blob of data provided by the participant in the roster. +func (m *Participant) SetMetadata(value *string)() { + m.metadata = value +} +// SetRecordingInfo sets the recordingInfo property value. Information on whether the participant has recording capability. +func (m *Participant) SetRecordingInfo(value RecordingInfoable)() { + m.recordingInfo = value +} +// SetRestrictedExperience sets the restrictedExperience property value. The restrictedExperience property +func (m *Participant) SetRestrictedExperience(value OnlineMeetingRestrictedable)() { + m.restrictedExperience = value +} diff --git a/src/internal/connector/graph/betasdk/models/participant_collection_response.go b/src/internal/connector/graph/betasdk/models/participant_collection_response.go new file mode 100644 index 000000000..ae28054c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantCollectionResponse +type ParticipantCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Participantable +} +// NewParticipantCollectionResponse instantiates a new ParticipantCollectionResponse and sets the default values. +func NewParticipantCollectionResponse()(*ParticipantCollectionResponse) { + m := &ParticipantCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateParticipantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParticipantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateParticipantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Participantable, len(val)) + for i, v := range val { + res[i] = v.(Participantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ParticipantCollectionResponse) GetValue()([]Participantable) { + return m.value +} +// Serialize serializes information the current object +func (m *ParticipantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ParticipantCollectionResponse) SetValue(value []Participantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/participant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/participant_collection_responseable.go new file mode 100644 index 000000000..ddc7737f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantCollectionResponseable +type ParticipantCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Participantable) + SetValue(value []Participantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/participant_info.go b/src/internal/connector/graph/betasdk/models/participant_info.go new file mode 100644 index 000000000..740df27ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_info.go @@ -0,0 +1,280 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantInfo +type ParticipantInfo 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 ISO 3166-1 Alpha-2 country code of the participant's best estimated physical location at the start of the call. Read-only. + countryCode *string + // The type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. Read-only. + endpointType *EndpointType + // The identity property + identity IdentitySetable + // The language culture string. Read-only. + languageId *string + // The nonAnonymizedIdentity property + nonAnonymizedIdentity IdentitySetable + // The OdataType property + odataType *string + // The participant ID of the participant. Read-only. + participantId *string + // The client platform ID of the participant. Read-only. + platformId *string + // The home region of the participant. This can be a country, a continent, or a larger geographic region. This does not change based on the participant's current physical location, unlike countryCode. Read-only. + region *string +} +// NewParticipantInfo instantiates a new participantInfo and sets the default values. +func NewParticipantInfo()(*ParticipantInfo) { + m := &ParticipantInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateParticipantInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipantInfo(), 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 *ParticipantInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCountryCode gets the countryCode property value. The ISO 3166-1 Alpha-2 country code of the participant's best estimated physical location at the start of the call. Read-only. +func (m *ParticipantInfo) GetCountryCode()(*string) { + return m.countryCode +} +// GetEndpointType gets the endpointType property value. The type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. Read-only. +func (m *ParticipantInfo) GetEndpointType()(*EndpointType) { + return m.endpointType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParticipantInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["countryCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryCode(val) + } + return nil + } + res["endpointType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointType) + if err != nil { + return err + } + if val != nil { + m.SetEndpointType(val.(*EndpointType)) + } + return nil + } + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetIdentity(val.(IdentitySetable)) + } + return nil + } + res["languageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguageId(val) + } + return nil + } + res["nonAnonymizedIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNonAnonymizedIdentity(val.(IdentitySetable)) + } + 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["participantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParticipantId(val) + } + return nil + } + res["platformId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlatformId(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } + return res +} +// GetIdentity gets the identity property value. The identity property +func (m *ParticipantInfo) GetIdentity()(IdentitySetable) { + return m.identity +} +// GetLanguageId gets the languageId property value. The language culture string. Read-only. +func (m *ParticipantInfo) GetLanguageId()(*string) { + return m.languageId +} +// GetNonAnonymizedIdentity gets the nonAnonymizedIdentity property value. The nonAnonymizedIdentity property +func (m *ParticipantInfo) GetNonAnonymizedIdentity()(IdentitySetable) { + return m.nonAnonymizedIdentity +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ParticipantInfo) GetOdataType()(*string) { + return m.odataType +} +// GetParticipantId gets the participantId property value. The participant ID of the participant. Read-only. +func (m *ParticipantInfo) GetParticipantId()(*string) { + return m.participantId +} +// GetPlatformId gets the platformId property value. The client platform ID of the participant. Read-only. +func (m *ParticipantInfo) GetPlatformId()(*string) { + return m.platformId +} +// GetRegion gets the region property value. The home region of the participant. This can be a country, a continent, or a larger geographic region. This does not change based on the participant's current physical location, unlike countryCode. Read-only. +func (m *ParticipantInfo) GetRegion()(*string) { + return m.region +} +// Serialize serializes information the current object +func (m *ParticipantInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("countryCode", m.GetCountryCode()) + if err != nil { + return err + } + } + if m.GetEndpointType() != nil { + cast := (*m.GetEndpointType()).String() + err := writer.WriteStringValue("endpointType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languageId", m.GetLanguageId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("nonAnonymizedIdentity", m.GetNonAnonymizedIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("participantId", m.GetParticipantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("platformId", m.GetPlatformId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("region", m.GetRegion()) + 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 *ParticipantInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCountryCode sets the countryCode property value. The ISO 3166-1 Alpha-2 country code of the participant's best estimated physical location at the start of the call. Read-only. +func (m *ParticipantInfo) SetCountryCode(value *string)() { + m.countryCode = value +} +// SetEndpointType sets the endpointType property value. The type of endpoint the participant is using. Possible values are: default, voicemail, skypeForBusiness, skypeForBusinessVoipPhone and unknownFutureValue. Read-only. +func (m *ParticipantInfo) SetEndpointType(value *EndpointType)() { + m.endpointType = value +} +// SetIdentity sets the identity property value. The identity property +func (m *ParticipantInfo) SetIdentity(value IdentitySetable)() { + m.identity = value +} +// SetLanguageId sets the languageId property value. The language culture string. Read-only. +func (m *ParticipantInfo) SetLanguageId(value *string)() { + m.languageId = value +} +// SetNonAnonymizedIdentity sets the nonAnonymizedIdentity property value. The nonAnonymizedIdentity property +func (m *ParticipantInfo) SetNonAnonymizedIdentity(value IdentitySetable)() { + m.nonAnonymizedIdentity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ParticipantInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetParticipantId sets the participantId property value. The participant ID of the participant. Read-only. +func (m *ParticipantInfo) SetParticipantId(value *string)() { + m.participantId = value +} +// SetPlatformId sets the platformId property value. The client platform ID of the participant. Read-only. +func (m *ParticipantInfo) SetPlatformId(value *string)() { + m.platformId = value +} +// SetRegion sets the region property value. The home region of the participant. This can be a country, a continent, or a larger geographic region. This does not change based on the participant's current physical location, unlike countryCode. Read-only. +func (m *ParticipantInfo) SetRegion(value *string)() { + m.region = value +} diff --git a/src/internal/connector/graph/betasdk/models/participant_infoable.go b/src/internal/connector/graph/betasdk/models/participant_infoable.go new file mode 100644 index 000000000..2d5c039e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_infoable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantInfoable +type ParticipantInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountryCode()(*string) + GetEndpointType()(*EndpointType) + GetIdentity()(IdentitySetable) + GetLanguageId()(*string) + GetNonAnonymizedIdentity()(IdentitySetable) + GetOdataType()(*string) + GetParticipantId()(*string) + GetPlatformId()(*string) + GetRegion()(*string) + SetCountryCode(value *string)() + SetEndpointType(value *EndpointType)() + SetIdentity(value IdentitySetable)() + SetLanguageId(value *string)() + SetNonAnonymizedIdentity(value IdentitySetable)() + SetOdataType(value *string)() + SetParticipantId(value *string)() + SetPlatformId(value *string)() + SetRegion(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/participant_joining_notification.go b/src/internal/connector/graph/betasdk/models/participant_joining_notification.go new file mode 100644 index 000000000..dd793b002 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_joining_notification.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantJoiningNotification +type ParticipantJoiningNotification struct { + Entity + // The call property + call Callable +} +// NewParticipantJoiningNotification instantiates a new ParticipantJoiningNotification and sets the default values. +func NewParticipantJoiningNotification()(*ParticipantJoiningNotification) { + m := &ParticipantJoiningNotification{ + Entity: *NewEntity(), + } + return m +} +// CreateParticipantJoiningNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantJoiningNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipantJoiningNotification(), nil +} +// GetCall gets the call property value. The call property +func (m *ParticipantJoiningNotification) GetCall()(Callable) { + return m.call +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParticipantJoiningNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["call"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCallFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCall(val.(Callable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ParticipantJoiningNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("call", m.GetCall()) + if err != nil { + return err + } + } + return nil +} +// SetCall sets the call property value. The call property +func (m *ParticipantJoiningNotification) SetCall(value Callable)() { + m.call = value +} diff --git a/src/internal/connector/graph/betasdk/models/participant_joining_notificationable.go b/src/internal/connector/graph/betasdk/models/participant_joining_notificationable.go new file mode 100644 index 000000000..7d8b025f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_joining_notificationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantJoiningNotificationable +type ParticipantJoiningNotificationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCall()(Callable) + SetCall(value Callable)() +} diff --git a/src/internal/connector/graph/betasdk/models/participant_left_notification.go b/src/internal/connector/graph/betasdk/models/participant_left_notification.go new file mode 100644 index 000000000..21bcc27fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_left_notification.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantLeftNotification +type ParticipantLeftNotification struct { + Entity + // The call property + call Callable + // ID of the participant under the policy who has left the meeting. + participantId *string +} +// NewParticipantLeftNotification instantiates a new ParticipantLeftNotification and sets the default values. +func NewParticipantLeftNotification()(*ParticipantLeftNotification) { + m := &ParticipantLeftNotification{ + Entity: *NewEntity(), + } + return m +} +// CreateParticipantLeftNotificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateParticipantLeftNotificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewParticipantLeftNotification(), nil +} +// GetCall gets the call property value. The call property +func (m *ParticipantLeftNotification) GetCall()(Callable) { + return m.call +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ParticipantLeftNotification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["call"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCallFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCall(val.(Callable)) + } + return nil + } + res["participantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParticipantId(val) + } + return nil + } + return res +} +// GetParticipantId gets the participantId property value. ID of the participant under the policy who has left the meeting. +func (m *ParticipantLeftNotification) GetParticipantId()(*string) { + return m.participantId +} +// Serialize serializes information the current object +func (m *ParticipantLeftNotification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("call", m.GetCall()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("participantId", m.GetParticipantId()) + if err != nil { + return err + } + } + return nil +} +// SetCall sets the call property value. The call property +func (m *ParticipantLeftNotification) SetCall(value Callable)() { + m.call = value +} +// SetParticipantId sets the participantId property value. ID of the participant under the policy who has left the meeting. +func (m *ParticipantLeftNotification) SetParticipantId(value *string)() { + m.participantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/participant_left_notificationable.go b/src/internal/connector/graph/betasdk/models/participant_left_notificationable.go new file mode 100644 index 000000000..0b48cfcb4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participant_left_notificationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ParticipantLeftNotificationable +type ParticipantLeftNotificationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCall()(Callable) + GetParticipantId()(*string) + SetCall(value Callable)() + SetParticipantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/participantable.go b/src/internal/connector/graph/betasdk/models/participantable.go new file mode 100644 index 000000000..94783073d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/participantable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Participantable +type Participantable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInfo()(ParticipantInfoable) + GetIsIdentityAnonymized()(*bool) + GetIsInLobby()(*bool) + GetIsMuted()(*bool) + GetMediaStreams()([]MediaStreamable) + GetMetadata()(*string) + GetRecordingInfo()(RecordingInfoable) + GetRestrictedExperience()(OnlineMeetingRestrictedable) + SetInfo(value ParticipantInfoable)() + SetIsIdentityAnonymized(value *bool)() + SetIsInLobby(value *bool)() + SetIsMuted(value *bool)() + SetMediaStreams(value []MediaStreamable)() + SetMetadata(value *string)() + SetRecordingInfo(value RecordingInfoable)() + SetRestrictedExperience(value OnlineMeetingRestrictedable)() +} diff --git a/src/internal/connector/graph/betasdk/models/partner_tenant_type.go b/src/internal/connector/graph/betasdk/models/partner_tenant_type.go new file mode 100644 index 000000000..906e77f44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/partner_tenant_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PartnerTenantType int + +const ( + MICROSOFTSUPPORT_PARTNERTENANTTYPE PartnerTenantType = iota + SYNDICATEPARTNER_PARTNERTENANTTYPE + BREADTHPARTNER_PARTNERTENANTTYPE + BREADTHPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + RESELLERPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + VALUEADDEDRESELLERPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + UNKNOWNFUTUREVALUE_PARTNERTENANTTYPE +) + +func (i PartnerTenantType) String() string { + return []string{"microsoftSupport", "syndicatePartner", "breadthPartner", "breadthPartnerDelegatedAdmin", "resellerPartnerDelegatedAdmin", "valueAddedResellerPartnerDelegatedAdmin", "unknownFutureValue"}[i] +} +func ParsePartnerTenantType(v string) (interface{}, error) { + result := MICROSOFTSUPPORT_PARTNERTENANTTYPE + switch v { + case "microsoftSupport": + result = MICROSOFTSUPPORT_PARTNERTENANTTYPE + case "syndicatePartner": + result = SYNDICATEPARTNER_PARTNERTENANTTYPE + case "breadthPartner": + result = BREADTHPARTNER_PARTNERTENANTTYPE + case "breadthPartnerDelegatedAdmin": + result = BREADTHPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + case "resellerPartnerDelegatedAdmin": + result = RESELLERPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + case "valueAddedResellerPartnerDelegatedAdmin": + result = VALUEADDEDRESELLERPARTNERDELEGATEDADMIN_PARTNERTENANTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PARTNERTENANTTYPE + default: + return 0, errors.New("Unknown PartnerTenantType value: " + v) + } + return &result, nil +} +func SerializePartnerTenantType(values []PartnerTenantType) []string { + 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/password_authentication_method.go b/src/internal/connector/graph/betasdk/models/password_authentication_method.go new file mode 100644 index 000000000..9f014c23e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_authentication_method.go @@ -0,0 +1,115 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordAuthenticationMethod +type PasswordAuthenticationMethod struct { + AuthenticationMethod + // The date and time when this password was last updated. This property is currently not populated. Read-only. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The creationDateTime property + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // For security, the password is always returned as null from a LIST or GET operation. + password *string +} +// NewPasswordAuthenticationMethod instantiates a new PasswordAuthenticationMethod and sets the default values. +func NewPasswordAuthenticationMethod()(*PasswordAuthenticationMethod) { + m := &PasswordAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.passwordAuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePasswordAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordAuthenticationMethod(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when this password was last updated. This property is currently not populated. Read-only. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PasswordAuthenticationMethod) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationDateTime gets the creationDateTime property value. The creationDateTime property +func (m *PasswordAuthenticationMethod) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassword(val) + } + return nil + } + return res +} +// GetPassword gets the password property value. For security, the password is always returned as null from a LIST or GET operation. +func (m *PasswordAuthenticationMethod) GetPassword()(*string) { + return m.password +} +// Serialize serializes information the current object +func (m *PasswordAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("password", m.GetPassword()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when this password was last updated. This property is currently not populated. Read-only. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PasswordAuthenticationMethod) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationDateTime sets the creationDateTime property value. The creationDateTime property +func (m *PasswordAuthenticationMethod) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetPassword sets the password property value. For security, the password is always returned as null from a LIST or GET operation. +func (m *PasswordAuthenticationMethod) SetPassword(value *string)() { + m.password = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_response.go new file mode 100644 index 000000000..0a29fb1f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordAuthenticationMethodCollectionResponse +type PasswordAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PasswordAuthenticationMethodable +} +// NewPasswordAuthenticationMethodCollectionResponse instantiates a new PasswordAuthenticationMethodCollectionResponse and sets the default values. +func NewPasswordAuthenticationMethodCollectionResponse()(*PasswordAuthenticationMethodCollectionResponse) { + m := &PasswordAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePasswordAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PasswordAuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PasswordAuthenticationMethodCollectionResponse) GetValue()([]PasswordAuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *PasswordAuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PasswordAuthenticationMethodCollectionResponse) SetValue(value []PasswordAuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_responseable.go new file mode 100644 index 000000000..ea9083831 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordAuthenticationMethodCollectionResponseable +type PasswordAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PasswordAuthenticationMethodable) + SetValue(value []PasswordAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/password_authentication_methodable.go new file mode 100644 index 000000000..2b3039dd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_authentication_methodable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordAuthenticationMethodable +type PasswordAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPassword()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPassword(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential.go b/src/internal/connector/graph/betasdk/models/password_credential.go new file mode 100644 index 000000000..57a74f985 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential.go @@ -0,0 +1,255 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredential +type PasswordCredential struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Do not use. + customKeyIdentifier []byte + // Friendly name for the password. Optional. + displayName *string + // The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains the first three characters of the password. Read-only. + hint *string + // The unique identifier for the password. + keyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. + secretText *string + // The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPasswordCredential instantiates a new passwordCredential and sets the default values. +func NewPasswordCredential()(*PasswordCredential) { + m := &PasswordCredential{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePasswordCredentialFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordCredentialFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordCredential(), 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 *PasswordCredential) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCustomKeyIdentifier gets the customKeyIdentifier property value. Do not use. +func (m *PasswordCredential) GetCustomKeyIdentifier()([]byte) { + return m.customKeyIdentifier +} +// GetDisplayName gets the displayName property value. Friendly name for the password. Optional. +func (m *PasswordCredential) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDateTime gets the endDateTime property value. The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *PasswordCredential) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordCredential) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["customKeyIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomKeyIdentifier(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["hint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHint(val) + } + return nil + } + res["keyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetKeyId(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["secretText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecretText(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetHint gets the hint property value. Contains the first three characters of the password. Read-only. +func (m *PasswordCredential) GetHint()(*string) { + return m.hint +} +// GetKeyId gets the keyId property value. The unique identifier for the password. +func (m *PasswordCredential) GetKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.keyId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PasswordCredential) GetOdataType()(*string) { + return m.odataType +} +// GetSecretText gets the secretText property value. Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. +func (m *PasswordCredential) GetSecretText()(*string) { + return m.secretText +} +// GetStartDateTime gets the startDateTime property value. The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *PasswordCredential) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *PasswordCredential) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteArrayValue("customKeyIdentifier", m.GetCustomKeyIdentifier()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hint", m.GetHint()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("keyId", m.GetKeyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("secretText", m.GetSecretText()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + 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 *PasswordCredential) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCustomKeyIdentifier sets the customKeyIdentifier property value. Do not use. +func (m *PasswordCredential) SetCustomKeyIdentifier(value []byte)() { + m.customKeyIdentifier = value +} +// SetDisplayName sets the displayName property value. Friendly name for the password. Optional. +func (m *PasswordCredential) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDateTime sets the endDateTime property value. The date and time at which the password expires represented using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *PasswordCredential) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetHint sets the hint property value. Contains the first three characters of the password. Read-only. +func (m *PasswordCredential) SetHint(value *string)() { + m.hint = value +} +// SetKeyId sets the keyId property value. The unique identifier for the password. +func (m *PasswordCredential) SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.keyId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PasswordCredential) SetOdataType(value *string)() { + m.odataType = value +} +// SetSecretText sets the secretText property value. Read-only; Contains the strong passwords generated by Azure AD that are 16-64 characters in length. The generated password value is only returned during the initial POST request to addPassword. There is no way to retrieve this password in the future. +func (m *PasswordCredential) SetSecretText(value *string)() { + m.secretText = value +} +// SetStartDateTime sets the startDateTime property value. The date and time at which the password becomes valid. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Optional. +func (m *PasswordCredential) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_collection_response.go b/src/internal/connector/graph/betasdk/models/password_credential_collection_response.go new file mode 100644 index 000000000..dcc4b2c75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialCollectionResponse +type PasswordCredentialCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PasswordCredentialable +} +// NewPasswordCredentialCollectionResponse instantiates a new PasswordCredentialCollectionResponse and sets the default values. +func NewPasswordCredentialCollectionResponse()(*PasswordCredentialCollectionResponse) { + m := &PasswordCredentialCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePasswordCredentialCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordCredentialCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordCredentialCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordCredentialCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordCredentialable, len(val)) + for i, v := range val { + res[i] = v.(PasswordCredentialable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PasswordCredentialCollectionResponse) GetValue()([]PasswordCredentialable) { + return m.value +} +// Serialize serializes information the current object +func (m *PasswordCredentialCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PasswordCredentialCollectionResponse) SetValue(value []PasswordCredentialable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_collection_responseable.go b/src/internal/connector/graph/betasdk/models/password_credential_collection_responseable.go new file mode 100644 index 000000000..ccc9fa174 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialCollectionResponseable +type PasswordCredentialCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PasswordCredentialable) + SetValue(value []PasswordCredentialable)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_configuration.go b/src/internal/connector/graph/betasdk/models/password_credential_configuration.go new file mode 100644 index 000000000..26f9e44d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_configuration.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialConfiguration +type PasswordCredentialConfiguration 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 maxLifetime property + maxLifetime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The OdataType property + odataType *string + // Enforces the policy for an app created on or after the enforcement date. For existing applications, the enforcement date would be backdated. To apply to all applications, this date would be null. + restrictForAppsCreatedAfterDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The type of restriction being applied. The possible values are: passwordAddition, passwordLifetime, symmetricKeyAddition, symmetricKeyLifetime,customPasswordAddition, unknownFutureValue. Each value of restrictionType can be used only once per policy. + restrictionType *AppCredentialRestrictionType +} +// NewPasswordCredentialConfiguration instantiates a new passwordCredentialConfiguration and sets the default values. +func NewPasswordCredentialConfiguration()(*PasswordCredentialConfiguration) { + m := &PasswordCredentialConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePasswordCredentialConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordCredentialConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordCredentialConfiguration(), 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 *PasswordCredentialConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordCredentialConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["maxLifetime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxLifetime(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["restrictForAppsCreatedAfterDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRestrictForAppsCreatedAfterDateTime(val) + } + return nil + } + res["restrictionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAppCredentialRestrictionType) + if err != nil { + return err + } + if val != nil { + m.SetRestrictionType(val.(*AppCredentialRestrictionType)) + } + return nil + } + return res +} +// GetMaxLifetime gets the maxLifetime property value. The maxLifetime property +func (m *PasswordCredentialConfiguration) GetMaxLifetime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxLifetime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PasswordCredentialConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetRestrictForAppsCreatedAfterDateTime gets the restrictForAppsCreatedAfterDateTime property value. Enforces the policy for an app created on or after the enforcement date. For existing applications, the enforcement date would be backdated. To apply to all applications, this date would be null. +func (m *PasswordCredentialConfiguration) GetRestrictForAppsCreatedAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.restrictForAppsCreatedAfterDateTime +} +// GetRestrictionType gets the restrictionType property value. The type of restriction being applied. The possible values are: passwordAddition, passwordLifetime, symmetricKeyAddition, symmetricKeyLifetime,customPasswordAddition, unknownFutureValue. Each value of restrictionType can be used only once per policy. +func (m *PasswordCredentialConfiguration) GetRestrictionType()(*AppCredentialRestrictionType) { + return m.restrictionType +} +// Serialize serializes information the current object +func (m *PasswordCredentialConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteISODurationValue("maxLifetime", m.GetMaxLifetime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("restrictForAppsCreatedAfterDateTime", m.GetRestrictForAppsCreatedAfterDateTime()) + if err != nil { + return err + } + } + if m.GetRestrictionType() != nil { + cast := (*m.GetRestrictionType()).String() + err := writer.WriteStringValue("restrictionType", &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 *PasswordCredentialConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetMaxLifetime sets the maxLifetime property value. The maxLifetime property +func (m *PasswordCredentialConfiguration) SetMaxLifetime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxLifetime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PasswordCredentialConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetRestrictForAppsCreatedAfterDateTime sets the restrictForAppsCreatedAfterDateTime property value. Enforces the policy for an app created on or after the enforcement date. For existing applications, the enforcement date would be backdated. To apply to all applications, this date would be null. +func (m *PasswordCredentialConfiguration) SetRestrictForAppsCreatedAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.restrictForAppsCreatedAfterDateTime = value +} +// SetRestrictionType sets the restrictionType property value. The type of restriction being applied. The possible values are: passwordAddition, passwordLifetime, symmetricKeyAddition, symmetricKeyLifetime,customPasswordAddition, unknownFutureValue. Each value of restrictionType can be used only once per policy. +func (m *PasswordCredentialConfiguration) SetRestrictionType(value *AppCredentialRestrictionType)() { + m.restrictionType = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_response.go new file mode 100644 index 000000000..2af781d09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialConfigurationCollectionResponse +type PasswordCredentialConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PasswordCredentialConfigurationable +} +// NewPasswordCredentialConfigurationCollectionResponse instantiates a new PasswordCredentialConfigurationCollectionResponse and sets the default values. +func NewPasswordCredentialConfigurationCollectionResponse()(*PasswordCredentialConfigurationCollectionResponse) { + m := &PasswordCredentialConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePasswordCredentialConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordCredentialConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordCredentialConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordCredentialConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordCredentialConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordCredentialConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(PasswordCredentialConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PasswordCredentialConfigurationCollectionResponse) GetValue()([]PasswordCredentialConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PasswordCredentialConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PasswordCredentialConfigurationCollectionResponse) SetValue(value []PasswordCredentialConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_responseable.go new file mode 100644 index 000000000..31eb2775c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialConfigurationCollectionResponseable +type PasswordCredentialConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PasswordCredentialConfigurationable) + SetValue(value []PasswordCredentialConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_credential_configurationable.go b/src/internal/connector/graph/betasdk/models/password_credential_configurationable.go new file mode 100644 index 000000000..ce1bfbfc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credential_configurationable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialConfigurationable +type PasswordCredentialConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMaxLifetime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetOdataType()(*string) + GetRestrictForAppsCreatedAfterDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRestrictionType()(*AppCredentialRestrictionType) + SetMaxLifetime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetOdataType(value *string)() + SetRestrictForAppsCreatedAfterDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRestrictionType(value *AppCredentialRestrictionType)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_credentialable.go b/src/internal/connector/graph/betasdk/models/password_credentialable.go new file mode 100644 index 000000000..66e248ce7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_credentialable.go @@ -0,0 +1,29 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordCredentialable +type PasswordCredentialable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomKeyIdentifier()([]byte) + GetDisplayName()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHint()(*string) + GetKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetSecretText()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCustomKeyIdentifier(value []byte)() + SetDisplayName(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHint(value *string)() + SetKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetSecretText(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_profile.go b/src/internal/connector/graph/betasdk/models/password_profile.go new file mode 100644 index 000000000..e43d62cd4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_profile.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordProfile +type PasswordProfile struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // true if the user must change her password on the next login; otherwise false. If not set, default is false. + forceChangePasswordNextSignIn *bool + // If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. + forceChangePasswordNextSignInWithMfa *bool + // The OdataType property + odataType *string + // The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. + password *string +} +// NewPasswordProfile instantiates a new passwordProfile and sets the default values. +func NewPasswordProfile()(*PasswordProfile) { + m := &PasswordProfile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePasswordProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordProfile(), 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 *PasswordProfile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["forceChangePasswordNextSignIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetForceChangePasswordNextSignIn(val) + } + return nil + } + res["forceChangePasswordNextSignInWithMfa"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetForceChangePasswordNextSignInWithMfa(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["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassword(val) + } + return nil + } + return res +} +// GetForceChangePasswordNextSignIn gets the forceChangePasswordNextSignIn property value. true if the user must change her password on the next login; otherwise false. If not set, default is false. +func (m *PasswordProfile) GetForceChangePasswordNextSignIn()(*bool) { + return m.forceChangePasswordNextSignIn +} +// GetForceChangePasswordNextSignInWithMfa gets the forceChangePasswordNextSignInWithMfa property value. If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. +func (m *PasswordProfile) GetForceChangePasswordNextSignInWithMfa()(*bool) { + return m.forceChangePasswordNextSignInWithMfa +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PasswordProfile) GetOdataType()(*string) { + return m.odataType +} +// GetPassword gets the password property value. The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. +func (m *PasswordProfile) GetPassword()(*string) { + return m.password +} +// Serialize serializes information the current object +func (m *PasswordProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("forceChangePasswordNextSignIn", m.GetForceChangePasswordNextSignIn()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("forceChangePasswordNextSignInWithMfa", m.GetForceChangePasswordNextSignInWithMfa()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("password", m.GetPassword()) + 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 *PasswordProfile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetForceChangePasswordNextSignIn sets the forceChangePasswordNextSignIn property value. true if the user must change her password on the next login; otherwise false. If not set, default is false. +func (m *PasswordProfile) SetForceChangePasswordNextSignIn(value *bool)() { + m.forceChangePasswordNextSignIn = value +} +// SetForceChangePasswordNextSignInWithMfa sets the forceChangePasswordNextSignInWithMfa property value. If true, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. +func (m *PasswordProfile) SetForceChangePasswordNextSignInWithMfa(value *bool)() { + m.forceChangePasswordNextSignInWithMfa = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PasswordProfile) SetOdataType(value *string)() { + m.odataType = value +} +// SetPassword sets the password property value. The password for the user. This property is required when a user is created. It can be updated, but the user will be required to change the password on the next login. The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. +func (m *PasswordProfile) SetPassword(value *string)() { + m.password = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_profileable.go b/src/internal/connector/graph/betasdk/models/password_profileable.go new file mode 100644 index 000000000..192e53afb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_profileable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordProfileable +type PasswordProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetForceChangePasswordNextSignIn()(*bool) + GetForceChangePasswordNextSignInWithMfa()(*bool) + GetOdataType()(*string) + GetPassword()(*string) + SetForceChangePasswordNextSignIn(value *bool)() + SetForceChangePasswordNextSignInWithMfa(value *bool)() + SetOdataType(value *string)() + SetPassword(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_field.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field.go new file mode 100644 index 000000000..d2426e0d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnField +type PasswordSingleSignOnField struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Title/label override for customization. + customizedLabel *string + // Label that would be used if no customizedLabel is provided. Read only. + defaultLabel *string + // Id used to identity the field type. This is an internal id and possible values are param_1, param_2, param_userName, param_password. + fieldId *string + // The OdataType property + odataType *string + // Type of the credential. The values can be text, password. + type_escaped *string +} +// NewPasswordSingleSignOnField instantiates a new passwordSingleSignOnField and sets the default values. +func NewPasswordSingleSignOnField()(*PasswordSingleSignOnField) { + m := &PasswordSingleSignOnField{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePasswordSingleSignOnFieldFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordSingleSignOnFieldFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordSingleSignOnField(), 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 *PasswordSingleSignOnField) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCustomizedLabel gets the customizedLabel property value. Title/label override for customization. +func (m *PasswordSingleSignOnField) GetCustomizedLabel()(*string) { + return m.customizedLabel +} +// GetDefaultLabel gets the defaultLabel property value. Label that would be used if no customizedLabel is provided. Read only. +func (m *PasswordSingleSignOnField) GetDefaultLabel()(*string) { + return m.defaultLabel +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordSingleSignOnField) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["customizedLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomizedLabel(val) + } + return nil + } + res["defaultLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLabel(val) + } + return nil + } + res["fieldId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFieldId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetFieldId gets the fieldId property value. Id used to identity the field type. This is an internal id and possible values are param_1, param_2, param_userName, param_password. +func (m *PasswordSingleSignOnField) GetFieldId()(*string) { + return m.fieldId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PasswordSingleSignOnField) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Type of the credential. The values can be text, password. +func (m *PasswordSingleSignOnField) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *PasswordSingleSignOnField) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("customizedLabel", m.GetCustomizedLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("defaultLabel", m.GetDefaultLabel()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fieldId", m.GetFieldId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *PasswordSingleSignOnField) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCustomizedLabel sets the customizedLabel property value. Title/label override for customization. +func (m *PasswordSingleSignOnField) SetCustomizedLabel(value *string)() { + m.customizedLabel = value +} +// SetDefaultLabel sets the defaultLabel property value. Label that would be used if no customizedLabel is provided. Read only. +func (m *PasswordSingleSignOnField) SetDefaultLabel(value *string)() { + m.defaultLabel = value +} +// SetFieldId sets the fieldId property value. Id used to identity the field type. This is an internal id and possible values are param_1, param_2, param_userName, param_password. +func (m *PasswordSingleSignOnField) SetFieldId(value *string)() { + m.fieldId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PasswordSingleSignOnField) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Type of the credential. The values can be text, password. +func (m *PasswordSingleSignOnField) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_response.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_response.go new file mode 100644 index 000000000..436e95827 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnFieldCollectionResponse +type PasswordSingleSignOnFieldCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PasswordSingleSignOnFieldable +} +// NewPasswordSingleSignOnFieldCollectionResponse instantiates a new PasswordSingleSignOnFieldCollectionResponse and sets the default values. +func NewPasswordSingleSignOnFieldCollectionResponse()(*PasswordSingleSignOnFieldCollectionResponse) { + m := &PasswordSingleSignOnFieldCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePasswordSingleSignOnFieldCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordSingleSignOnFieldCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordSingleSignOnFieldCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordSingleSignOnFieldCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordSingleSignOnFieldFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordSingleSignOnFieldable, len(val)) + for i, v := range val { + res[i] = v.(PasswordSingleSignOnFieldable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PasswordSingleSignOnFieldCollectionResponse) GetValue()([]PasswordSingleSignOnFieldable) { + return m.value +} +// Serialize serializes information the current object +func (m *PasswordSingleSignOnFieldCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PasswordSingleSignOnFieldCollectionResponse) SetValue(value []PasswordSingleSignOnFieldable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_responseable.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_responseable.go new file mode 100644 index 000000000..a46c84724 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_field_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnFieldCollectionResponseable +type PasswordSingleSignOnFieldCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PasswordSingleSignOnFieldable) + SetValue(value []PasswordSingleSignOnFieldable)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_fieldable.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_fieldable.go new file mode 100644 index 000000000..c59b4306b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_fieldable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnFieldable +type PasswordSingleSignOnFieldable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomizedLabel()(*string) + GetDefaultLabel()(*string) + GetFieldId()(*string) + GetOdataType()(*string) + GetType()(*string) + SetCustomizedLabel(value *string)() + SetDefaultLabel(value *string)() + SetFieldId(value *string)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_settings.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_settings.go new file mode 100644 index 000000000..03c192a27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_settings.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnSettings +type PasswordSingleSignOnSettings 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 fields property + fields []PasswordSingleSignOnFieldable + // The OdataType property + odataType *string +} +// NewPasswordSingleSignOnSettings instantiates a new passwordSingleSignOnSettings and sets the default values. +func NewPasswordSingleSignOnSettings()(*PasswordSingleSignOnSettings) { + m := &PasswordSingleSignOnSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePasswordSingleSignOnSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordSingleSignOnSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordSingleSignOnSettings(), 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 *PasswordSingleSignOnSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordSingleSignOnSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fields"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordSingleSignOnFieldFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordSingleSignOnFieldable, len(val)) + for i, v := range val { + res[i] = v.(PasswordSingleSignOnFieldable) + } + m.SetFields(res) + } + 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 + } + return res +} +// GetFields gets the fields property value. The fields property +func (m *PasswordSingleSignOnSettings) GetFields()([]PasswordSingleSignOnFieldable) { + return m.fields +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PasswordSingleSignOnSettings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PasswordSingleSignOnSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetFields() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFields())) + for i, v := range m.GetFields() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("fields", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PasswordSingleSignOnSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFields sets the fields property value. The fields property +func (m *PasswordSingleSignOnSettings) SetFields(value []PasswordSingleSignOnFieldable)() { + m.fields = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PasswordSingleSignOnSettings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/password_single_sign_on_settingsable.go b/src/internal/connector/graph/betasdk/models/password_single_sign_on_settingsable.go new file mode 100644 index 000000000..adf4a2815 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/password_single_sign_on_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordSingleSignOnSettingsable +type PasswordSingleSignOnSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFields()([]PasswordSingleSignOnFieldable) + GetOdataType()(*string) + SetFields(value []PasswordSingleSignOnFieldable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method.go b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method.go new file mode 100644 index 000000000..afa90bb3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method.go @@ -0,0 +1,141 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordlessMicrosoftAuthenticatorAuthenticationMethod +type PasswordlessMicrosoftAuthenticatorAuthenticationMethod struct { + AuthenticationMethod + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The timestamp when this method was registered to the user. + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The device property + device Deviceable + // The display name of the mobile device as given by the user. + displayName *string +} +// NewPasswordlessMicrosoftAuthenticatorAuthenticationMethod instantiates a new PasswordlessMicrosoftAuthenticatorAuthenticationMethod and sets the default values. +func NewPasswordlessMicrosoftAuthenticatorAuthenticationMethod()(*PasswordlessMicrosoftAuthenticatorAuthenticationMethod) { + m := &PasswordlessMicrosoftAuthenticatorAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.passwordlessMicrosoftAuthenticatorAuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordlessMicrosoftAuthenticatorAuthenticationMethod(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationDateTime gets the creationDateTime property value. The timestamp when this method was registered to the user. +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetDevice gets the device property value. The device property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) GetDevice()(Deviceable) { + return m.device +} +// GetDisplayName gets the displayName property value. The display name of the mobile device as given by the user. +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["device"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevice(val.(Deviceable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("device", m.GetDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationDateTime sets the creationDateTime property value. The timestamp when this method was registered to the user. +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetDevice sets the device property value. The device property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) SetDevice(value Deviceable)() { + m.device = value +} +// SetDisplayName sets the displayName property value. The display name of the mobile device as given by the user. +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethod) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_response.go new file mode 100644 index 000000000..370eafb47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse +type PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable +} +// NewPasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse instantiates a new PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse and sets the default values. +func NewPasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse()(*PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse) { + m := &PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordlessMicrosoftAuthenticatorAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse) GetValue()([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponse) SetValue(value []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_responseable.go new file mode 100644 index 000000000..a8b2c3f59 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponseable +type PasswordlessMicrosoftAuthenticatorAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PasswordlessMicrosoftAuthenticatorAuthenticationMethodable) + SetValue(value []PasswordlessMicrosoftAuthenticatorAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_methodable.go new file mode 100644 index 000000000..eef23b293 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/passwordless_microsoft_authenticator_authentication_methodable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PasswordlessMicrosoftAuthenticatorAuthenticationMethodable +type PasswordlessMicrosoftAuthenticatorAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDevice()(Deviceable) + GetDisplayName()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDevice(value Deviceable)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/patterned_recurrence.go b/src/internal/connector/graph/betasdk/models/patterned_recurrence.go new file mode 100644 index 000000000..fe3ef6529 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/patterned_recurrence.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PatternedRecurrence +type PatternedRecurrence 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 OdataType property + odataType *string + // The frequency of an event. Do not specify for a one-time access review. For access reviews: Do not specify this property for a one-time access review. Only interval, dayOfMonth, and type (weekly, absoluteMonthly) properties of recurrencePattern are supported. + pattern RecurrencePatternable + // The duration of an event. + range_escaped RecurrenceRangeable +} +// NewPatternedRecurrence instantiates a new patternedRecurrence and sets the default values. +func NewPatternedRecurrence()(*PatternedRecurrence) { + m := &PatternedRecurrence{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePatternedRecurrenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePatternedRecurrenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPatternedRecurrence(), 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 *PatternedRecurrence) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PatternedRecurrence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["pattern"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecurrencePatternFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPattern(val.(RecurrencePatternable)) + } + return nil + } + res["range"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecurrenceRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRange(val.(RecurrenceRangeable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PatternedRecurrence) GetOdataType()(*string) { + return m.odataType +} +// GetPattern gets the pattern property value. The frequency of an event. Do not specify for a one-time access review. For access reviews: Do not specify this property for a one-time access review. Only interval, dayOfMonth, and type (weekly, absoluteMonthly) properties of recurrencePattern are supported. +func (m *PatternedRecurrence) GetPattern()(RecurrencePatternable) { + return m.pattern +} +// GetRange gets the range property value. The duration of an event. +func (m *PatternedRecurrence) GetRange()(RecurrenceRangeable) { + return m.range_escaped +} +// Serialize serializes information the current object +func (m *PatternedRecurrence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pattern", m.GetPattern()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("range", m.GetRange()) + 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 *PatternedRecurrence) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PatternedRecurrence) SetOdataType(value *string)() { + m.odataType = value +} +// SetPattern sets the pattern property value. The frequency of an event. Do not specify for a one-time access review. For access reviews: Do not specify this property for a one-time access review. Only interval, dayOfMonth, and type (weekly, absoluteMonthly) properties of recurrencePattern are supported. +func (m *PatternedRecurrence) SetPattern(value RecurrencePatternable)() { + m.pattern = value +} +// SetRange sets the range property value. The duration of an event. +func (m *PatternedRecurrence) SetRange(value RecurrenceRangeable)() { + m.range_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/patterned_recurrenceable.go b/src/internal/connector/graph/betasdk/models/patterned_recurrenceable.go new file mode 100644 index 000000000..0d2599c82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/patterned_recurrenceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PatternedRecurrenceable +type PatternedRecurrenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPattern()(RecurrencePatternable) + GetRange()(RecurrenceRangeable) + SetOdataType(value *string)() + SetPattern(value RecurrencePatternable)() + SetRange(value RecurrenceRangeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload.go b/src/internal/connector/graph/betasdk/models/payload.go new file mode 100644 index 000000000..719841c6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload.go @@ -0,0 +1,620 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Payload provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Payload struct { + Entity + // The branch of a payload. Possible values are: unknown, other, americanExpress, capitalOne, dhl, docuSign, dropbox, facebook, firstAmerican, microsoft, netflix, scotiabank, stewartTitle, tesco, wellsFargo, syrinxCloud, adobe, teams, zoom, unknownFutureValue. + brand *PayloadBrand + // The complexity of a payload.Possible values are: unknown, low, medium, high, unknownFutureValue + complexity *PayloadComplexity + // Identity of the user who created the attack simulation and training campaign payload. + createdBy EmailIdentityable + // Date and time when the attack simulation and training campaign payload. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description of the attack simulation and training campaign payload. + description *string + // Additional details about the payload. + detail PayloadDetailable + // Display name of the attack simulation and training campaign payload. Supports $filter and $orderby. + displayName *string + // Industry of a payload. Possible values are: unknown, other, banking, businessServices, consumerServices, education, energy, construction, consulting, financialServices, government, hospitality, insurance, legal, courierServices, IT, healthcare, manufacturing, retail, telecom, realEstate, unknownFutureValue. + industry *PayloadIndustry + // Indicates whether the attack simulation and training campaign payload was created from an automation flow. Supports $filter and $orderby. + isAutomated *bool + // Indicates whether the payload is controversial. + isControversial *bool + // Indicates whether the payload is from any recent event. + isCurrentEvent *bool + // Payload language. + language *string + // Identity of the user who most recently modified the attack simulation and training campaign payload. + lastModifiedBy EmailIdentityable + // Date and time when the attack simulation and training campaign payload was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Free text tags for a payload. + payloadTags []string + // The payload delivery platform for a simulation. Possible values are: unknown, sms, email, teams, unknownFutureValue. + platform *PayloadDeliveryPlatform + // Predicted probability for a payload to phish a targeted user. + predictedCompromiseRate *float64 + // Attack type of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, social, cloud, endpoint, unknownFutureValue. + simulationAttackType *SimulationAttackType + // The source property + source *SimulationContentSource + // Simulation content status. Supports $filter and $orderby. Possible values are: unknown, draft, ready, archive, delete, unknownFutureValue. Inherited from simulation. + status *SimulationContentStatus + // The social engineering technique used in the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, credentialHarvesting, attachmentMalware, driveByUrl, linkInAttachment, linkToMalwareFile, unknownFutureValue. For more information on the types of social engineering attack techniques, see simulations. + technique *SimulationAttackTechnique + // The theme of a payload. Possible values are: unknown, other, accountActivation, accountVerification, billing, cleanUpMail, controversial, documentReceived, expense, incomingMessages, invoice, itemReceived, loginAlert, mailReceived, password, payment, payroll, personalizedOffer, quarantine, remoteWork, reviewMessage, securityUpdate, serviceSuspended, signatureRequired, upgradeMailboxStorage, verifyMailbox, voicemail, advertisement, employeeEngagement, unknownFutureValue. + theme *PayloadTheme +} +// NewPayload instantiates a new payload and sets the default values. +func NewPayload()(*Payload) { + m := &Payload{ + Entity: *NewEntity(), + } + return m +} +// CreatePayloadFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayload(), nil +} +// GetBrand gets the brand property value. The branch of a payload. Possible values are: unknown, other, americanExpress, capitalOne, dhl, docuSign, dropbox, facebook, firstAmerican, microsoft, netflix, scotiabank, stewartTitle, tesco, wellsFargo, syrinxCloud, adobe, teams, zoom, unknownFutureValue. +func (m *Payload) GetBrand()(*PayloadBrand) { + return m.brand +} +// GetComplexity gets the complexity property value. The complexity of a payload.Possible values are: unknown, low, medium, high, unknownFutureValue +func (m *Payload) GetComplexity()(*PayloadComplexity) { + return m.complexity +} +// GetCreatedBy gets the createdBy property value. Identity of the user who created the attack simulation and training campaign payload. +func (m *Payload) GetCreatedBy()(EmailIdentityable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time when the attack simulation and training campaign payload. +func (m *Payload) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description of the attack simulation and training campaign payload. +func (m *Payload) GetDescription()(*string) { + return m.description +} +// GetDetail gets the detail property value. Additional details about the payload. +func (m *Payload) GetDetail()(PayloadDetailable) { + return m.detail +} +// GetDisplayName gets the displayName property value. Display name of the attack simulation and training campaign payload. Supports $filter and $orderby. +func (m *Payload) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Payload) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["brand"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePayloadBrand) + if err != nil { + return err + } + if val != nil { + m.SetBrand(val.(*PayloadBrand)) + } + return nil + } + res["complexity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePayloadComplexity) + if err != nil { + return err + } + if val != nil { + m.SetComplexity(val.(*PayloadComplexity)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(EmailIdentityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePayloadDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(PayloadDetailable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["industry"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePayloadIndustry) + if err != nil { + return err + } + if val != nil { + m.SetIndustry(val.(*PayloadIndustry)) + } + return nil + } + res["isAutomated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAutomated(val) + } + return nil + } + res["isControversial"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsControversial(val) + } + return nil + } + res["isCurrentEvent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCurrentEvent(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(EmailIdentityable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["payloadTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPayloadTags(res) + } + return nil + } + res["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePayloadDeliveryPlatform) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*PayloadDeliveryPlatform)) + } + return nil + } + res["predictedCompromiseRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPredictedCompromiseRate(val) + } + return nil + } + res["simulationAttackType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSimulationAttackType) + if err != nil { + return err + } + if val != nil { + m.SetSimulationAttackType(val.(*SimulationAttackType)) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSimulationContentSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*SimulationContentSource)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSimulationContentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SimulationContentStatus)) + } + return nil + } + res["technique"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSimulationAttackTechnique) + if err != nil { + return err + } + if val != nil { + m.SetTechnique(val.(*SimulationAttackTechnique)) + } + return nil + } + res["theme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePayloadTheme) + if err != nil { + return err + } + if val != nil { + m.SetTheme(val.(*PayloadTheme)) + } + return nil + } + return res +} +// GetIndustry gets the industry property value. Industry of a payload. Possible values are: unknown, other, banking, businessServices, consumerServices, education, energy, construction, consulting, financialServices, government, hospitality, insurance, legal, courierServices, IT, healthcare, manufacturing, retail, telecom, realEstate, unknownFutureValue. +func (m *Payload) GetIndustry()(*PayloadIndustry) { + return m.industry +} +// GetIsAutomated gets the isAutomated property value. Indicates whether the attack simulation and training campaign payload was created from an automation flow. Supports $filter and $orderby. +func (m *Payload) GetIsAutomated()(*bool) { + return m.isAutomated +} +// GetIsControversial gets the isControversial property value. Indicates whether the payload is controversial. +func (m *Payload) GetIsControversial()(*bool) { + return m.isControversial +} +// GetIsCurrentEvent gets the isCurrentEvent property value. Indicates whether the payload is from any recent event. +func (m *Payload) GetIsCurrentEvent()(*bool) { + return m.isCurrentEvent +} +// GetLanguage gets the language property value. Payload language. +func (m *Payload) GetLanguage()(*string) { + return m.language +} +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation and training campaign payload. +func (m *Payload) GetLastModifiedBy()(EmailIdentityable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time when the attack simulation and training campaign payload was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Payload) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPayloadTags gets the payloadTags property value. Free text tags for a payload. +func (m *Payload) GetPayloadTags()([]string) { + return m.payloadTags +} +// GetPlatform gets the platform property value. The payload delivery platform for a simulation. Possible values are: unknown, sms, email, teams, unknownFutureValue. +func (m *Payload) GetPlatform()(*PayloadDeliveryPlatform) { + return m.platform +} +// GetPredictedCompromiseRate gets the predictedCompromiseRate property value. Predicted probability for a payload to phish a targeted user. +func (m *Payload) GetPredictedCompromiseRate()(*float64) { + return m.predictedCompromiseRate +} +// GetSimulationAttackType gets the simulationAttackType property value. Attack type of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, social, cloud, endpoint, unknownFutureValue. +func (m *Payload) GetSimulationAttackType()(*SimulationAttackType) { + return m.simulationAttackType +} +// GetSource gets the source property value. The source property +func (m *Payload) GetSource()(*SimulationContentSource) { + return m.source +} +// GetStatus gets the status property value. Simulation content status. Supports $filter and $orderby. Possible values are: unknown, draft, ready, archive, delete, unknownFutureValue. Inherited from simulation. +func (m *Payload) GetStatus()(*SimulationContentStatus) { + return m.status +} +// GetTechnique gets the technique property value. The social engineering technique used in the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, credentialHarvesting, attachmentMalware, driveByUrl, linkInAttachment, linkToMalwareFile, unknownFutureValue. For more information on the types of social engineering attack techniques, see simulations. +func (m *Payload) GetTechnique()(*SimulationAttackTechnique) { + return m.technique +} +// GetTheme gets the theme property value. The theme of a payload. Possible values are: unknown, other, accountActivation, accountVerification, billing, cleanUpMail, controversial, documentReceived, expense, incomingMessages, invoice, itemReceived, loginAlert, mailReceived, password, payment, payroll, personalizedOffer, quarantine, remoteWork, reviewMessage, securityUpdate, serviceSuspended, signatureRequired, upgradeMailboxStorage, verifyMailbox, voicemail, advertisement, employeeEngagement, unknownFutureValue. +func (m *Payload) GetTheme()(*PayloadTheme) { + return m.theme +} +// Serialize serializes information the current object +func (m *Payload) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBrand() != nil { + cast := (*m.GetBrand()).String() + err = writer.WriteStringValue("brand", &cast) + if err != nil { + return err + } + } + if m.GetComplexity() != nil { + cast := (*m.GetComplexity()).String() + err = writer.WriteStringValue("complexity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetIndustry() != nil { + cast := (*m.GetIndustry()).String() + err = writer.WriteStringValue("industry", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAutomated", m.GetIsAutomated()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isControversial", m.GetIsControversial()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCurrentEvent", m.GetIsCurrentEvent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetPayloadTags() != nil { + err = writer.WriteCollectionOfStringValues("payloadTags", m.GetPayloadTags()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err = writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("predictedCompromiseRate", m.GetPredictedCompromiseRate()) + if err != nil { + return err + } + } + if m.GetSimulationAttackType() != nil { + cast := (*m.GetSimulationAttackType()).String() + err = writer.WriteStringValue("simulationAttackType", &cast) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + if m.GetTechnique() != nil { + cast := (*m.GetTechnique()).String() + err = writer.WriteStringValue("technique", &cast) + if err != nil { + return err + } + } + if m.GetTheme() != nil { + cast := (*m.GetTheme()).String() + err = writer.WriteStringValue("theme", &cast) + if err != nil { + return err + } + } + return nil +} +// SetBrand sets the brand property value. The branch of a payload. Possible values are: unknown, other, americanExpress, capitalOne, dhl, docuSign, dropbox, facebook, firstAmerican, microsoft, netflix, scotiabank, stewartTitle, tesco, wellsFargo, syrinxCloud, adobe, teams, zoom, unknownFutureValue. +func (m *Payload) SetBrand(value *PayloadBrand)() { + m.brand = value +} +// SetComplexity sets the complexity property value. The complexity of a payload.Possible values are: unknown, low, medium, high, unknownFutureValue +func (m *Payload) SetComplexity(value *PayloadComplexity)() { + m.complexity = value +} +// SetCreatedBy sets the createdBy property value. Identity of the user who created the attack simulation and training campaign payload. +func (m *Payload) SetCreatedBy(value EmailIdentityable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time when the attack simulation and training campaign payload. +func (m *Payload) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description of the attack simulation and training campaign payload. +func (m *Payload) SetDescription(value *string)() { + m.description = value +} +// SetDetail sets the detail property value. Additional details about the payload. +func (m *Payload) SetDetail(value PayloadDetailable)() { + m.detail = value +} +// SetDisplayName sets the displayName property value. Display name of the attack simulation and training campaign payload. Supports $filter and $orderby. +func (m *Payload) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIndustry sets the industry property value. Industry of a payload. Possible values are: unknown, other, banking, businessServices, consumerServices, education, energy, construction, consulting, financialServices, government, hospitality, insurance, legal, courierServices, IT, healthcare, manufacturing, retail, telecom, realEstate, unknownFutureValue. +func (m *Payload) SetIndustry(value *PayloadIndustry)() { + m.industry = value +} +// SetIsAutomated sets the isAutomated property value. Indicates whether the attack simulation and training campaign payload was created from an automation flow. Supports $filter and $orderby. +func (m *Payload) SetIsAutomated(value *bool)() { + m.isAutomated = value +} +// SetIsControversial sets the isControversial property value. Indicates whether the payload is controversial. +func (m *Payload) SetIsControversial(value *bool)() { + m.isControversial = value +} +// SetIsCurrentEvent sets the isCurrentEvent property value. Indicates whether the payload is from any recent event. +func (m *Payload) SetIsCurrentEvent(value *bool)() { + m.isCurrentEvent = value +} +// SetLanguage sets the language property value. Payload language. +func (m *Payload) SetLanguage(value *string)() { + m.language = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user who most recently modified the attack simulation and training campaign payload. +func (m *Payload) SetLastModifiedBy(value EmailIdentityable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time when the attack simulation and training campaign payload was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Payload) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPayloadTags sets the payloadTags property value. Free text tags for a payload. +func (m *Payload) SetPayloadTags(value []string)() { + m.payloadTags = value +} +// SetPlatform sets the platform property value. The payload delivery platform for a simulation. Possible values are: unknown, sms, email, teams, unknownFutureValue. +func (m *Payload) SetPlatform(value *PayloadDeliveryPlatform)() { + m.platform = value +} +// SetPredictedCompromiseRate sets the predictedCompromiseRate property value. Predicted probability for a payload to phish a targeted user. +func (m *Payload) SetPredictedCompromiseRate(value *float64)() { + m.predictedCompromiseRate = value +} +// SetSimulationAttackType sets the simulationAttackType property value. Attack type of the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, social, cloud, endpoint, unknownFutureValue. +func (m *Payload) SetSimulationAttackType(value *SimulationAttackType)() { + m.simulationAttackType = value +} +// SetSource sets the source property value. The source property +func (m *Payload) SetSource(value *SimulationContentSource)() { + m.source = value +} +// SetStatus sets the status property value. Simulation content status. Supports $filter and $orderby. Possible values are: unknown, draft, ready, archive, delete, unknownFutureValue. Inherited from simulation. +func (m *Payload) SetStatus(value *SimulationContentStatus)() { + m.status = value +} +// SetTechnique sets the technique property value. The social engineering technique used in the attack simulation and training campaign. Supports $filter and $orderby. Possible values are: unknown, credentialHarvesting, attachmentMalware, driveByUrl, linkInAttachment, linkToMalwareFile, unknownFutureValue. For more information on the types of social engineering attack techniques, see simulations. +func (m *Payload) SetTechnique(value *SimulationAttackTechnique)() { + m.technique = value +} +// SetTheme sets the theme property value. The theme of a payload. Possible values are: unknown, other, accountActivation, accountVerification, billing, cleanUpMail, controversial, documentReceived, expense, incomingMessages, invoice, itemReceived, loginAlert, mailReceived, password, payment, payroll, personalizedOffer, quarantine, remoteWork, reviewMessage, securityUpdate, serviceSuspended, signatureRequired, upgradeMailboxStorage, verifyMailbox, voicemail, advertisement, employeeEngagement, unknownFutureValue. +func (m *Payload) SetTheme(value *PayloadTheme)() { + m.theme = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_brand.go b/src/internal/connector/graph/betasdk/models/payload_brand.go new file mode 100644 index 000000000..c317a20a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_brand.go @@ -0,0 +1,91 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PayloadBrand int + +const ( + UNKNOWN_PAYLOADBRAND PayloadBrand = iota + OTHER_PAYLOADBRAND + AMERICANEXPRESS_PAYLOADBRAND + CAPITALONE_PAYLOADBRAND + DHL_PAYLOADBRAND + DOCUSIGN_PAYLOADBRAND + DROPBOX_PAYLOADBRAND + FACEBOOK_PAYLOADBRAND + FIRSTAMERICAN_PAYLOADBRAND + MICROSOFT_PAYLOADBRAND + NETFLIX_PAYLOADBRAND + SCOTIABANK_PAYLOADBRAND + SENDGRID_PAYLOADBRAND + STEWARTTITLE_PAYLOADBRAND + TESCO_PAYLOADBRAND + WELLSFARGO_PAYLOADBRAND + SYRINXCLOUD_PAYLOADBRAND + ADOBE_PAYLOADBRAND + TEAMS_PAYLOADBRAND + ZOOM_PAYLOADBRAND + UNKNOWNFUTUREVALUE_PAYLOADBRAND +) + +func (i PayloadBrand) String() string { + return []string{"unknown", "other", "americanExpress", "capitalOne", "dhl", "docuSign", "dropbox", "facebook", "firstAmerican", "microsoft", "netflix", "scotiabank", "sendGrid", "stewartTitle", "tesco", "wellsFargo", "syrinxCloud", "adobe", "teams", "zoom", "unknownFutureValue"}[i] +} +func ParsePayloadBrand(v string) (interface{}, error) { + result := UNKNOWN_PAYLOADBRAND + switch v { + case "unknown": + result = UNKNOWN_PAYLOADBRAND + case "other": + result = OTHER_PAYLOADBRAND + case "americanExpress": + result = AMERICANEXPRESS_PAYLOADBRAND + case "capitalOne": + result = CAPITALONE_PAYLOADBRAND + case "dhl": + result = DHL_PAYLOADBRAND + case "docuSign": + result = DOCUSIGN_PAYLOADBRAND + case "dropbox": + result = DROPBOX_PAYLOADBRAND + case "facebook": + result = FACEBOOK_PAYLOADBRAND + case "firstAmerican": + result = FIRSTAMERICAN_PAYLOADBRAND + case "microsoft": + result = MICROSOFT_PAYLOADBRAND + case "netflix": + result = NETFLIX_PAYLOADBRAND + case "scotiabank": + result = SCOTIABANK_PAYLOADBRAND + case "sendGrid": + result = SENDGRID_PAYLOADBRAND + case "stewartTitle": + result = STEWARTTITLE_PAYLOADBRAND + case "tesco": + result = TESCO_PAYLOADBRAND + case "wellsFargo": + result = WELLSFARGO_PAYLOADBRAND + case "syrinxCloud": + result = SYRINXCLOUD_PAYLOADBRAND + case "adobe": + result = ADOBE_PAYLOADBRAND + case "teams": + result = TEAMS_PAYLOADBRAND + case "zoom": + result = ZOOM_PAYLOADBRAND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAYLOADBRAND + default: + return 0, errors.New("Unknown PayloadBrand value: " + v) + } + return &result, nil +} +func SerializePayloadBrand(values []PayloadBrand) []string { + 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/payload_by_filter.go b/src/internal/connector/graph/betasdk/models/payload_by_filter.go new file mode 100644 index 000000000..ed4c6f423 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_by_filter.go @@ -0,0 +1,177 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadByFilter this entity represents a single payload with requested assignment filter Id +type PayloadByFilter struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents type of the assignment filter. + assignmentFilterType *DeviceAndAppManagementAssignmentFilterType + // The Azure AD security group ID + groupId *string + // The OdataType property + odataType *string + // The policy identifier + payloadId *string + // This enum represents associated assignment payload type + payloadType *AssociatedAssignmentPayloadType +} +// NewPayloadByFilter instantiates a new payloadByFilter and sets the default values. +func NewPayloadByFilter()(*PayloadByFilter) { + m := &PayloadByFilter{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePayloadByFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadByFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadByFilter(), 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 *PayloadByFilter) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentFilterType gets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *PayloadByFilter) GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) { + return m.assignmentFilterType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadByFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentFilterType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceAndAppManagementAssignmentFilterType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentFilterType(val.(*DeviceAndAppManagementAssignmentFilterType)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(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["payloadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadId(val) + } + return nil + } + res["payloadType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssociatedAssignmentPayloadType) + if err != nil { + return err + } + if val != nil { + m.SetPayloadType(val.(*AssociatedAssignmentPayloadType)) + } + return nil + } + return res +} +// GetGroupId gets the groupId property value. The Azure AD security group ID +func (m *PayloadByFilter) GetGroupId()(*string) { + return m.groupId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PayloadByFilter) GetOdataType()(*string) { + return m.odataType +} +// GetPayloadId gets the payloadId property value. The policy identifier +func (m *PayloadByFilter) GetPayloadId()(*string) { + return m.payloadId +} +// GetPayloadType gets the payloadType property value. This enum represents associated assignment payload type +func (m *PayloadByFilter) GetPayloadType()(*AssociatedAssignmentPayloadType) { + return m.payloadType +} +// Serialize serializes information the current object +func (m *PayloadByFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentFilterType() != nil { + cast := (*m.GetAssignmentFilterType()).String() + err := writer.WriteStringValue("assignmentFilterType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("payloadId", m.GetPayloadId()) + if err != nil { + return err + } + } + if m.GetPayloadType() != nil { + cast := (*m.GetPayloadType()).String() + err := writer.WriteStringValue("payloadType", &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 *PayloadByFilter) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentFilterType sets the assignmentFilterType property value. Represents type of the assignment filter. +func (m *PayloadByFilter) SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() { + m.assignmentFilterType = value +} +// SetGroupId sets the groupId property value. The Azure AD security group ID +func (m *PayloadByFilter) SetGroupId(value *string)() { + m.groupId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PayloadByFilter) SetOdataType(value *string)() { + m.odataType = value +} +// SetPayloadId sets the payloadId property value. The policy identifier +func (m *PayloadByFilter) SetPayloadId(value *string)() { + m.payloadId = value +} +// SetPayloadType sets the payloadType property value. This enum represents associated assignment payload type +func (m *PayloadByFilter) SetPayloadType(value *AssociatedAssignmentPayloadType)() { + m.payloadType = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_response.go b/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_response.go new file mode 100644 index 000000000..1d34e5c76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadByFilterCollectionResponse +type PayloadByFilterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PayloadByFilterable +} +// NewPayloadByFilterCollectionResponse instantiates a new PayloadByFilterCollectionResponse and sets the default values. +func NewPayloadByFilterCollectionResponse()(*PayloadByFilterCollectionResponse) { + m := &PayloadByFilterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePayloadByFilterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadByFilterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadByFilterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadByFilterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadByFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadByFilterable, len(val)) + for i, v := range val { + res[i] = v.(PayloadByFilterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PayloadByFilterCollectionResponse) GetValue()([]PayloadByFilterable) { + return m.value +} +// Serialize serializes information the current object +func (m *PayloadByFilterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PayloadByFilterCollectionResponse) SetValue(value []PayloadByFilterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_responseable.go new file mode 100644 index 000000000..5fbe9b074 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_by_filter_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadByFilterCollectionResponseable +type PayloadByFilterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PayloadByFilterable) + SetValue(value []PayloadByFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_by_filterable.go b/src/internal/connector/graph/betasdk/models/payload_by_filterable.go new file mode 100644 index 000000000..3f8129397 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_by_filterable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadByFilterable +type PayloadByFilterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentFilterType()(*DeviceAndAppManagementAssignmentFilterType) + GetGroupId()(*string) + GetOdataType()(*string) + GetPayloadId()(*string) + GetPayloadType()(*AssociatedAssignmentPayloadType) + SetAssignmentFilterType(value *DeviceAndAppManagementAssignmentFilterType)() + SetGroupId(value *string)() + SetOdataType(value *string)() + SetPayloadId(value *string)() + SetPayloadType(value *AssociatedAssignmentPayloadType)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_coachmark.go b/src/internal/connector/graph/betasdk/models/payload_coachmark.go new file mode 100644 index 000000000..39fd218dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_coachmark.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCoachmark +type PayloadCoachmark 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 coachmark location. + coachmarkLocation CoachmarkLocationable + // The description about the coachmark. + description *string + // The coachmark indicator. + indicator *string + // Indicates whether the coachmark is valid or not. + isValid *bool + // The coachmark language. + language *string + // The OdataType property + odataType *string + // The coachmark order. + order *string +} +// NewPayloadCoachmark instantiates a new payloadCoachmark and sets the default values. +func NewPayloadCoachmark()(*PayloadCoachmark) { + m := &PayloadCoachmark{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePayloadCoachmarkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadCoachmarkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadCoachmark(), 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 *PayloadCoachmark) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCoachmarkLocation gets the coachmarkLocation property value. The coachmark location. +func (m *PayloadCoachmark) GetCoachmarkLocation()(CoachmarkLocationable) { + return m.coachmarkLocation +} +// GetDescription gets the description property value. The description about the coachmark. +func (m *PayloadCoachmark) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadCoachmark) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["coachmarkLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCoachmarkLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCoachmarkLocation(val.(CoachmarkLocationable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["indicator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIndicator(val) + } + return nil + } + res["isValid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValid(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(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["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrder(val) + } + return nil + } + return res +} +// GetIndicator gets the indicator property value. The coachmark indicator. +func (m *PayloadCoachmark) GetIndicator()(*string) { + return m.indicator +} +// GetIsValid gets the isValid property value. Indicates whether the coachmark is valid or not. +func (m *PayloadCoachmark) GetIsValid()(*bool) { + return m.isValid +} +// GetLanguage gets the language property value. The coachmark language. +func (m *PayloadCoachmark) GetLanguage()(*string) { + return m.language +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PayloadCoachmark) GetOdataType()(*string) { + return m.odataType +} +// GetOrder gets the order property value. The coachmark order. +func (m *PayloadCoachmark) GetOrder()(*string) { + return m.order +} +// Serialize serializes information the current object +func (m *PayloadCoachmark) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("coachmarkLocation", m.GetCoachmarkLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("indicator", m.GetIndicator()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isValid", m.GetIsValid()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("order", m.GetOrder()) + 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 *PayloadCoachmark) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCoachmarkLocation sets the coachmarkLocation property value. The coachmark location. +func (m *PayloadCoachmark) SetCoachmarkLocation(value CoachmarkLocationable)() { + m.coachmarkLocation = value +} +// SetDescription sets the description property value. The description about the coachmark. +func (m *PayloadCoachmark) SetDescription(value *string)() { + m.description = value +} +// SetIndicator sets the indicator property value. The coachmark indicator. +func (m *PayloadCoachmark) SetIndicator(value *string)() { + m.indicator = value +} +// SetIsValid sets the isValid property value. Indicates whether the coachmark is valid or not. +func (m *PayloadCoachmark) SetIsValid(value *bool)() { + m.isValid = value +} +// SetLanguage sets the language property value. The coachmark language. +func (m *PayloadCoachmark) SetLanguage(value *string)() { + m.language = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PayloadCoachmark) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrder sets the order property value. The coachmark order. +func (m *PayloadCoachmark) SetOrder(value *string)() { + m.order = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_response.go b/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_response.go new file mode 100644 index 000000000..fc4ff8891 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCoachmarkCollectionResponse +type PayloadCoachmarkCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PayloadCoachmarkable +} +// NewPayloadCoachmarkCollectionResponse instantiates a new PayloadCoachmarkCollectionResponse and sets the default values. +func NewPayloadCoachmarkCollectionResponse()(*PayloadCoachmarkCollectionResponse) { + m := &PayloadCoachmarkCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePayloadCoachmarkCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadCoachmarkCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadCoachmarkCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadCoachmarkCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadCoachmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadCoachmarkable, len(val)) + for i, v := range val { + res[i] = v.(PayloadCoachmarkable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PayloadCoachmarkCollectionResponse) GetValue()([]PayloadCoachmarkable) { + return m.value +} +// Serialize serializes information the current object +func (m *PayloadCoachmarkCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PayloadCoachmarkCollectionResponse) SetValue(value []PayloadCoachmarkable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_responseable.go new file mode 100644 index 000000000..39d6ec07f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_coachmark_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCoachmarkCollectionResponseable +type PayloadCoachmarkCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PayloadCoachmarkable) + SetValue(value []PayloadCoachmarkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_coachmarkable.go b/src/internal/connector/graph/betasdk/models/payload_coachmarkable.go new file mode 100644 index 000000000..11ed1e8a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_coachmarkable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCoachmarkable +type PayloadCoachmarkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCoachmarkLocation()(CoachmarkLocationable) + GetDescription()(*string) + GetIndicator()(*string) + GetIsValid()(*bool) + GetLanguage()(*string) + GetOdataType()(*string) + GetOrder()(*string) + SetCoachmarkLocation(value CoachmarkLocationable)() + SetDescription(value *string)() + SetIndicator(value *string)() + SetIsValid(value *bool)() + SetLanguage(value *string)() + SetOdataType(value *string)() + SetOrder(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_collection_response.go b/src/internal/connector/graph/betasdk/models/payload_collection_response.go new file mode 100644 index 000000000..ce8a6552b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCollectionResponse +type PayloadCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Payloadable +} +// NewPayloadCollectionResponse instantiates a new PayloadCollectionResponse and sets the default values. +func NewPayloadCollectionResponse()(*PayloadCollectionResponse) { + m := &PayloadCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePayloadCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Payloadable, len(val)) + for i, v := range val { + res[i] = v.(Payloadable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PayloadCollectionResponse) GetValue()([]Payloadable) { + return m.value +} +// Serialize serializes information the current object +func (m *PayloadCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PayloadCollectionResponse) SetValue(value []Payloadable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payload_collection_responseable.go new file mode 100644 index 000000000..0a527e54a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCollectionResponseable +type PayloadCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Payloadable) + SetValue(value []Payloadable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter.go b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter.go new file mode 100644 index 000000000..6ea37e632 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCompatibleAssignmentFilter +type PayloadCompatibleAssignmentFilter struct { + DeviceAndAppManagementAssignmentFilter + // Represents the payload type AssignmentFilter is being assigned to. + payloadType *AssignmentFilterPayloadType +} +// NewPayloadCompatibleAssignmentFilter instantiates a new PayloadCompatibleAssignmentFilter and sets the default values. +func NewPayloadCompatibleAssignmentFilter()(*PayloadCompatibleAssignmentFilter) { + m := &PayloadCompatibleAssignmentFilter{ + DeviceAndAppManagementAssignmentFilter: *NewDeviceAndAppManagementAssignmentFilter(), + } + odataTypeValue := "#microsoft.graph.payloadCompatibleAssignmentFilter"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePayloadCompatibleAssignmentFilterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadCompatibleAssignmentFilterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadCompatibleAssignmentFilter(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadCompatibleAssignmentFilter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAndAppManagementAssignmentFilter.GetFieldDeserializers() + res["payloadType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAssignmentFilterPayloadType) + if err != nil { + return err + } + if val != nil { + m.SetPayloadType(val.(*AssignmentFilterPayloadType)) + } + return nil + } + return res +} +// GetPayloadType gets the payloadType property value. Represents the payload type AssignmentFilter is being assigned to. +func (m *PayloadCompatibleAssignmentFilter) GetPayloadType()(*AssignmentFilterPayloadType) { + return m.payloadType +} +// Serialize serializes information the current object +func (m *PayloadCompatibleAssignmentFilter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAndAppManagementAssignmentFilter.Serialize(writer) + if err != nil { + return err + } + if m.GetPayloadType() != nil { + cast := (*m.GetPayloadType()).String() + err = writer.WriteStringValue("payloadType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetPayloadType sets the payloadType property value. Represents the payload type AssignmentFilter is being assigned to. +func (m *PayloadCompatibleAssignmentFilter) SetPayloadType(value *AssignmentFilterPayloadType)() { + m.payloadType = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_response.go b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_response.go new file mode 100644 index 000000000..24a24ab2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCompatibleAssignmentFilterCollectionResponse +type PayloadCompatibleAssignmentFilterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PayloadCompatibleAssignmentFilterable +} +// NewPayloadCompatibleAssignmentFilterCollectionResponse instantiates a new PayloadCompatibleAssignmentFilterCollectionResponse and sets the default values. +func NewPayloadCompatibleAssignmentFilterCollectionResponse()(*PayloadCompatibleAssignmentFilterCollectionResponse) { + m := &PayloadCompatibleAssignmentFilterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePayloadCompatibleAssignmentFilterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadCompatibleAssignmentFilterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadCompatibleAssignmentFilterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadCompatibleAssignmentFilterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadCompatibleAssignmentFilterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadCompatibleAssignmentFilterable, len(val)) + for i, v := range val { + res[i] = v.(PayloadCompatibleAssignmentFilterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PayloadCompatibleAssignmentFilterCollectionResponse) GetValue()([]PayloadCompatibleAssignmentFilterable) { + return m.value +} +// Serialize serializes information the current object +func (m *PayloadCompatibleAssignmentFilterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PayloadCompatibleAssignmentFilterCollectionResponse) SetValue(value []PayloadCompatibleAssignmentFilterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_responseable.go new file mode 100644 index 000000000..35175666b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filter_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCompatibleAssignmentFilterCollectionResponseable +type PayloadCompatibleAssignmentFilterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PayloadCompatibleAssignmentFilterable) + SetValue(value []PayloadCompatibleAssignmentFilterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filterable.go b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filterable.go new file mode 100644 index 000000000..626d3bdab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_compatible_assignment_filterable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadCompatibleAssignmentFilterable +type PayloadCompatibleAssignmentFilterable interface { + DeviceAndAppManagementAssignmentFilterable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPayloadType()(*AssignmentFilterPayloadType) + SetPayloadType(value *AssignmentFilterPayloadType)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_complexity.go b/src/internal/connector/graph/betasdk/models/payload_complexity.go new file mode 100644 index 000000000..faf6baf78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_complexity.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PayloadComplexity int + +const ( + UNKNOWN_PAYLOADCOMPLEXITY PayloadComplexity = iota + LOW_PAYLOADCOMPLEXITY + MEDIUM_PAYLOADCOMPLEXITY + HIGH_PAYLOADCOMPLEXITY + UNKNOWNFUTUREVALUE_PAYLOADCOMPLEXITY +) + +func (i PayloadComplexity) String() string { + return []string{"unknown", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParsePayloadComplexity(v string) (interface{}, error) { + result := UNKNOWN_PAYLOADCOMPLEXITY + switch v { + case "unknown": + result = UNKNOWN_PAYLOADCOMPLEXITY + case "low": + result = LOW_PAYLOADCOMPLEXITY + case "medium": + result = MEDIUM_PAYLOADCOMPLEXITY + case "high": + result = HIGH_PAYLOADCOMPLEXITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAYLOADCOMPLEXITY + default: + return 0, errors.New("Unknown PayloadComplexity value: " + v) + } + return &result, nil +} +func SerializePayloadComplexity(values []PayloadComplexity) []string { + 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/payload_delivery_platform.go b/src/internal/connector/graph/betasdk/models/payload_delivery_platform.go new file mode 100644 index 000000000..48c89a474 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_delivery_platform.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PayloadDeliveryPlatform int + +const ( + UNKNOWN_PAYLOADDELIVERYPLATFORM PayloadDeliveryPlatform = iota + SMS_PAYLOADDELIVERYPLATFORM + EMAIL_PAYLOADDELIVERYPLATFORM + TEAMS_PAYLOADDELIVERYPLATFORM + UNKNOWNFUTUREVALUE_PAYLOADDELIVERYPLATFORM +) + +func (i PayloadDeliveryPlatform) String() string { + return []string{"unknown", "sms", "email", "teams", "unknownFutureValue"}[i] +} +func ParsePayloadDeliveryPlatform(v string) (interface{}, error) { + result := UNKNOWN_PAYLOADDELIVERYPLATFORM + switch v { + case "unknown": + result = UNKNOWN_PAYLOADDELIVERYPLATFORM + case "sms": + result = SMS_PAYLOADDELIVERYPLATFORM + case "email": + result = EMAIL_PAYLOADDELIVERYPLATFORM + case "teams": + result = TEAMS_PAYLOADDELIVERYPLATFORM + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAYLOADDELIVERYPLATFORM + default: + return 0, errors.New("Unknown PayloadDeliveryPlatform value: " + v) + } + return &result, nil +} +func SerializePayloadDeliveryPlatform(values []PayloadDeliveryPlatform) []string { + 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/payload_detail.go b/src/internal/connector/graph/betasdk/models/payload_detail.go new file mode 100644 index 000000000..32984149f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_detail.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadDetail +type PayloadDetail struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Payload coachmark details. + coachmarks []PayloadCoachmarkable + // Payload content details. + content *string + // The OdataType property + odataType *string + // The phishing URL used to target a user. + phishingUrl *string +} +// NewPayloadDetail instantiates a new payloadDetail and sets the default values. +func NewPayloadDetail()(*PayloadDetail) { + m := &PayloadDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePayloadDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.emailPayloadDetail": + return NewEmailPayloadDetail(), nil + } + } + } + } + return NewPayloadDetail(), 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 *PayloadDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCoachmarks gets the coachmarks property value. Payload coachmark details. +func (m *PayloadDetail) GetCoachmarks()([]PayloadCoachmarkable) { + return m.coachmarks +} +// GetContent gets the content property value. Payload content details. +func (m *PayloadDetail) GetContent()(*string) { + return m.content +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["coachmarks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadCoachmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadCoachmarkable, len(val)) + for i, v := range val { + res[i] = v.(PayloadCoachmarkable) + } + m.SetCoachmarks(res) + } + return nil + } + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(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["phishingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhishingUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PayloadDetail) GetOdataType()(*string) { + return m.odataType +} +// GetPhishingUrl gets the phishingUrl property value. The phishing URL used to target a user. +func (m *PayloadDetail) GetPhishingUrl()(*string) { + return m.phishingUrl +} +// Serialize serializes information the current object +func (m *PayloadDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCoachmarks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCoachmarks())) + for i, v := range m.GetCoachmarks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("coachmarks", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("phishingUrl", m.GetPhishingUrl()) + 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 *PayloadDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCoachmarks sets the coachmarks property value. Payload coachmark details. +func (m *PayloadDetail) SetCoachmarks(value []PayloadCoachmarkable)() { + m.coachmarks = value +} +// SetContent sets the content property value. Payload content details. +func (m *PayloadDetail) SetContent(value *string)() { + m.content = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PayloadDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetPhishingUrl sets the phishingUrl property value. The phishing URL used to target a user. +func (m *PayloadDetail) SetPhishingUrl(value *string)() { + m.phishingUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_detailable.go b/src/internal/connector/graph/betasdk/models/payload_detailable.go new file mode 100644 index 000000000..f861f0db7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_detailable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadDetailable +type PayloadDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCoachmarks()([]PayloadCoachmarkable) + GetContent()(*string) + GetOdataType()(*string) + GetPhishingUrl()(*string) + SetCoachmarks(value []PayloadCoachmarkable)() + SetContent(value *string)() + SetOdataType(value *string)() + SetPhishingUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_industry.go b/src/internal/connector/graph/betasdk/models/payload_industry.go new file mode 100644 index 000000000..972a194ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_industry.go @@ -0,0 +1,94 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PayloadIndustry int + +const ( + UNKNOWN_PAYLOADINDUSTRY PayloadIndustry = iota + OTHER_PAYLOADINDUSTRY + BANKING_PAYLOADINDUSTRY + BUSINESSSERVICES_PAYLOADINDUSTRY + CONSUMERSERVICES_PAYLOADINDUSTRY + EDUCATION_PAYLOADINDUSTRY + ENERGY_PAYLOADINDUSTRY + CONSTRUCTION_PAYLOADINDUSTRY + CONSULTING_PAYLOADINDUSTRY + FINANCIALSERVICES_PAYLOADINDUSTRY + GOVERNMENT_PAYLOADINDUSTRY + HOSPITALITY_PAYLOADINDUSTRY + INSURANCE_PAYLOADINDUSTRY + LEGAL_PAYLOADINDUSTRY + COURIERSERVICES_PAYLOADINDUSTRY + IT_PAYLOADINDUSTRY + HEALTHCARE_PAYLOADINDUSTRY + MANUFACTURING_PAYLOADINDUSTRY + RETAIL_PAYLOADINDUSTRY + TELECOM_PAYLOADINDUSTRY + REALESTATE_PAYLOADINDUSTRY + UNKNOWNFUTUREVALUE_PAYLOADINDUSTRY +) + +func (i PayloadIndustry) String() string { + return []string{"unknown", "other", "banking", "businessServices", "consumerServices", "education", "energy", "construction", "consulting", "financialServices", "government", "hospitality", "insurance", "legal", "courierServices", "IT", "healthcare", "manufacturing", "retail", "telecom", "realEstate", "unknownFutureValue"}[i] +} +func ParsePayloadIndustry(v string) (interface{}, error) { + result := UNKNOWN_PAYLOADINDUSTRY + switch v { + case "unknown": + result = UNKNOWN_PAYLOADINDUSTRY + case "other": + result = OTHER_PAYLOADINDUSTRY + case "banking": + result = BANKING_PAYLOADINDUSTRY + case "businessServices": + result = BUSINESSSERVICES_PAYLOADINDUSTRY + case "consumerServices": + result = CONSUMERSERVICES_PAYLOADINDUSTRY + case "education": + result = EDUCATION_PAYLOADINDUSTRY + case "energy": + result = ENERGY_PAYLOADINDUSTRY + case "construction": + result = CONSTRUCTION_PAYLOADINDUSTRY + case "consulting": + result = CONSULTING_PAYLOADINDUSTRY + case "financialServices": + result = FINANCIALSERVICES_PAYLOADINDUSTRY + case "government": + result = GOVERNMENT_PAYLOADINDUSTRY + case "hospitality": + result = HOSPITALITY_PAYLOADINDUSTRY + case "insurance": + result = INSURANCE_PAYLOADINDUSTRY + case "legal": + result = LEGAL_PAYLOADINDUSTRY + case "courierServices": + result = COURIERSERVICES_PAYLOADINDUSTRY + case "IT": + result = IT_PAYLOADINDUSTRY + case "healthcare": + result = HEALTHCARE_PAYLOADINDUSTRY + case "manufacturing": + result = MANUFACTURING_PAYLOADINDUSTRY + case "retail": + result = RETAIL_PAYLOADINDUSTRY + case "telecom": + result = TELECOM_PAYLOADINDUSTRY + case "realEstate": + result = REALESTATE_PAYLOADINDUSTRY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAYLOADINDUSTRY + default: + return 0, errors.New("Unknown PayloadIndustry value: " + v) + } + return &result, nil +} +func SerializePayloadIndustry(values []PayloadIndustry) []string { + 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/payload_request.go b/src/internal/connector/graph/betasdk/models/payload_request.go new file mode 100644 index 000000000..41158e66c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_request.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadRequest +type PayloadRequest 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 OdataType property + odataType *string +} +// NewPayloadRequest instantiates a new payloadRequest and sets the default values. +func NewPayloadRequest()(*PayloadRequest) { + m := &PayloadRequest{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePayloadRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadRequest(), 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 *PayloadRequest) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PayloadRequest) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PayloadRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PayloadRequest) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PayloadRequest) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_requestable.go b/src/internal/connector/graph/betasdk/models/payload_requestable.go new file mode 100644 index 000000000..41ce8d13b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_requestable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadRequestable +type PayloadRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_response.go b/src/internal/connector/graph/betasdk/models/payload_response.go new file mode 100644 index 000000000..4a0b77158 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_response.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadResponse +type PayloadResponse struct { + Entity +} +// NewPayloadResponse instantiates a new payloadResponse and sets the default values. +func NewPayloadResponse()(*PayloadResponse) { + m := &PayloadResponse{ + Entity: *NewEntity(), + } + return m +} +// CreatePayloadResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *PayloadResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/payload_response_collection_response.go b/src/internal/connector/graph/betasdk/models/payload_response_collection_response.go new file mode 100644 index 000000000..f84a1bec3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_response_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadResponseCollectionResponse +type PayloadResponseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PayloadResponseable +} +// NewPayloadResponseCollectionResponse instantiates a new PayloadResponseCollectionResponse and sets the default values. +func NewPayloadResponseCollectionResponse()(*PayloadResponseCollectionResponse) { + m := &PayloadResponseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePayloadResponseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadResponseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadResponseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadResponseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePayloadResponseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PayloadResponseable, len(val)) + for i, v := range val { + res[i] = v.(PayloadResponseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PayloadResponseCollectionResponse) GetValue()([]PayloadResponseable) { + return m.value +} +// Serialize serializes information the current object +func (m *PayloadResponseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PayloadResponseCollectionResponse) SetValue(value []PayloadResponseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_response_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payload_response_collection_responseable.go new file mode 100644 index 000000000..051f12a89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_response_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadResponseCollectionResponseable +type PayloadResponseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PayloadResponseable) + SetValue(value []PayloadResponseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payload_responseable.go b/src/internal/connector/graph/betasdk/models/payload_responseable.go new file mode 100644 index 000000000..af715c0de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_responseable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadResponseable +type PayloadResponseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/payload_theme.go b/src/internal/connector/graph/betasdk/models/payload_theme.go new file mode 100644 index 000000000..5af90dda0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_theme.go @@ -0,0 +1,124 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PayloadTheme int + +const ( + UNKNOWN_PAYLOADTHEME PayloadTheme = iota + OTHER_PAYLOADTHEME + ACCOUNTACTIVATION_PAYLOADTHEME + ACCOUNTVERIFICATION_PAYLOADTHEME + BILLING_PAYLOADTHEME + CLEANUPMAIL_PAYLOADTHEME + CONTROVERSIAL_PAYLOADTHEME + DOCUMENTRECEIVED_PAYLOADTHEME + EXPENSE_PAYLOADTHEME + FAX_PAYLOADTHEME + FINANCEREPORT_PAYLOADTHEME + INCOMINGMESSAGES_PAYLOADTHEME + INVOICE_PAYLOADTHEME + ITEMRECEIVED_PAYLOADTHEME + LOGINALERT_PAYLOADTHEME + MAILRECEIVED_PAYLOADTHEME + PASSWORD_PAYLOADTHEME + PAYMENT_PAYLOADTHEME + PAYROLL_PAYLOADTHEME + PERSONALIZEDOFFER_PAYLOADTHEME + QUARANTINE_PAYLOADTHEME + REMOTEWORK_PAYLOADTHEME + REVIEWMESSAGE_PAYLOADTHEME + SECURITYUPDATE_PAYLOADTHEME + SERVICESUSPENDED_PAYLOADTHEME + SIGNATUREREQUIRED_PAYLOADTHEME + UPGRADEMAILBOXSTORAGE_PAYLOADTHEME + VERIFYMAILBOX_PAYLOADTHEME + VOICEMAIL_PAYLOADTHEME + ADVERTISEMENT_PAYLOADTHEME + EMPLOYEEENGAGEMENT_PAYLOADTHEME + UNKNOWNFUTUREVALUE_PAYLOADTHEME +) + +func (i PayloadTheme) String() string { + return []string{"unknown", "other", "accountActivation", "accountVerification", "billing", "cleanUpMail", "controversial", "documentReceived", "expense", "fax", "financeReport", "incomingMessages", "invoice", "itemReceived", "loginAlert", "mailReceived", "password", "payment", "payroll", "personalizedOffer", "quarantine", "remoteWork", "reviewMessage", "securityUpdate", "serviceSuspended", "signatureRequired", "upgradeMailboxStorage", "verifyMailbox", "voicemail", "advertisement", "employeeEngagement", "unknownFutureValue"}[i] +} +func ParsePayloadTheme(v string) (interface{}, error) { + result := UNKNOWN_PAYLOADTHEME + switch v { + case "unknown": + result = UNKNOWN_PAYLOADTHEME + case "other": + result = OTHER_PAYLOADTHEME + case "accountActivation": + result = ACCOUNTACTIVATION_PAYLOADTHEME + case "accountVerification": + result = ACCOUNTVERIFICATION_PAYLOADTHEME + case "billing": + result = BILLING_PAYLOADTHEME + case "cleanUpMail": + result = CLEANUPMAIL_PAYLOADTHEME + case "controversial": + result = CONTROVERSIAL_PAYLOADTHEME + case "documentReceived": + result = DOCUMENTRECEIVED_PAYLOADTHEME + case "expense": + result = EXPENSE_PAYLOADTHEME + case "fax": + result = FAX_PAYLOADTHEME + case "financeReport": + result = FINANCEREPORT_PAYLOADTHEME + case "incomingMessages": + result = INCOMINGMESSAGES_PAYLOADTHEME + case "invoice": + result = INVOICE_PAYLOADTHEME + case "itemReceived": + result = ITEMRECEIVED_PAYLOADTHEME + case "loginAlert": + result = LOGINALERT_PAYLOADTHEME + case "mailReceived": + result = MAILRECEIVED_PAYLOADTHEME + case "password": + result = PASSWORD_PAYLOADTHEME + case "payment": + result = PAYMENT_PAYLOADTHEME + case "payroll": + result = PAYROLL_PAYLOADTHEME + case "personalizedOffer": + result = PERSONALIZEDOFFER_PAYLOADTHEME + case "quarantine": + result = QUARANTINE_PAYLOADTHEME + case "remoteWork": + result = REMOTEWORK_PAYLOADTHEME + case "reviewMessage": + result = REVIEWMESSAGE_PAYLOADTHEME + case "securityUpdate": + result = SECURITYUPDATE_PAYLOADTHEME + case "serviceSuspended": + result = SERVICESUSPENDED_PAYLOADTHEME + case "signatureRequired": + result = SIGNATUREREQUIRED_PAYLOADTHEME + case "upgradeMailboxStorage": + result = UPGRADEMAILBOXSTORAGE_PAYLOADTHEME + case "verifyMailbox": + result = VERIFYMAILBOX_PAYLOADTHEME + case "voicemail": + result = VOICEMAIL_PAYLOADTHEME + case "advertisement": + result = ADVERTISEMENT_PAYLOADTHEME + case "employeeEngagement": + result = EMPLOYEEENGAGEMENT_PAYLOADTHEME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PAYLOADTHEME + default: + return 0, errors.New("Unknown PayloadTheme value: " + v) + } + return &result, nil +} +func SerializePayloadTheme(values []PayloadTheme) []string { + 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/payload_types.go b/src/internal/connector/graph/betasdk/models/payload_types.go new file mode 100644 index 000000000..b4b6383ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_types.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadTypes +type PayloadTypes 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 OdataType property + odataType *string + // The notification content of a raw user notification that will be delivered to and consumed by the app client on all supported platforms (Windows, iOS, Android or WebPush) receiving this notification. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. + rawContent *string + // The visual content of a visual user notification, which will be consumed by the notification platform on each supported platform (Windows, iOS and Android only) and rendered for the user. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. + visualContent VisualPropertiesable +} +// NewPayloadTypes instantiates a new payloadTypes and sets the default values. +func NewPayloadTypes()(*PayloadTypes) { + m := &PayloadTypes{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePayloadTypesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePayloadTypesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPayloadTypes(), 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 *PayloadTypes) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PayloadTypes) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["rawContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRawContent(val) + } + return nil + } + res["visualContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVisualPropertiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVisualContent(val.(VisualPropertiesable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PayloadTypes) GetOdataType()(*string) { + return m.odataType +} +// GetRawContent gets the rawContent property value. The notification content of a raw user notification that will be delivered to and consumed by the app client on all supported platforms (Windows, iOS, Android or WebPush) receiving this notification. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. +func (m *PayloadTypes) GetRawContent()(*string) { + return m.rawContent +} +// GetVisualContent gets the visualContent property value. The visual content of a visual user notification, which will be consumed by the notification platform on each supported platform (Windows, iOS and Android only) and rendered for the user. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. +func (m *PayloadTypes) GetVisualContent()(VisualPropertiesable) { + return m.visualContent +} +// Serialize serializes information the current object +func (m *PayloadTypes) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rawContent", m.GetRawContent()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("visualContent", m.GetVisualContent()) + 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 *PayloadTypes) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PayloadTypes) SetOdataType(value *string)() { + m.odataType = value +} +// SetRawContent sets the rawContent property value. The notification content of a raw user notification that will be delivered to and consumed by the app client on all supported platforms (Windows, iOS, Android or WebPush) receiving this notification. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. +func (m *PayloadTypes) SetRawContent(value *string)() { + m.rawContent = value +} +// SetVisualContent sets the visualContent property value. The visual content of a visual user notification, which will be consumed by the notification platform on each supported platform (Windows, iOS and Android only) and rendered for the user. At least one of Payload.RawContent or Payload.VisualContent needs to be valid for a POST Notification request. +func (m *PayloadTypes) SetVisualContent(value VisualPropertiesable)() { + m.visualContent = value +} diff --git a/src/internal/connector/graph/betasdk/models/payload_typesable.go b/src/internal/connector/graph/betasdk/models/payload_typesable.go new file mode 100644 index 000000000..793807660 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payload_typesable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PayloadTypesable +type PayloadTypesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRawContent()(*string) + GetVisualContent()(VisualPropertiesable) + SetOdataType(value *string)() + SetRawContent(value *string)() + SetVisualContent(value VisualPropertiesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payloadable.go b/src/internal/connector/graph/betasdk/models/payloadable.go new file mode 100644 index 000000000..f5ec6895d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payloadable.go @@ -0,0 +1,56 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Payloadable +type Payloadable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBrand()(*PayloadBrand) + GetComplexity()(*PayloadComplexity) + GetCreatedBy()(EmailIdentityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDetail()(PayloadDetailable) + GetDisplayName()(*string) + GetIndustry()(*PayloadIndustry) + GetIsAutomated()(*bool) + GetIsControversial()(*bool) + GetIsCurrentEvent()(*bool) + GetLanguage()(*string) + GetLastModifiedBy()(EmailIdentityable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPayloadTags()([]string) + GetPlatform()(*PayloadDeliveryPlatform) + GetPredictedCompromiseRate()(*float64) + GetSimulationAttackType()(*SimulationAttackType) + GetSource()(*SimulationContentSource) + GetStatus()(*SimulationContentStatus) + GetTechnique()(*SimulationAttackTechnique) + GetTheme()(*PayloadTheme) + SetBrand(value *PayloadBrand)() + SetComplexity(value *PayloadComplexity)() + SetCreatedBy(value EmailIdentityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDetail(value PayloadDetailable)() + SetDisplayName(value *string)() + SetIndustry(value *PayloadIndustry)() + SetIsAutomated(value *bool)() + SetIsControversial(value *bool)() + SetIsCurrentEvent(value *bool)() + SetLanguage(value *string)() + SetLastModifiedBy(value EmailIdentityable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPayloadTags(value []string)() + SetPlatform(value *PayloadDeliveryPlatform)() + SetPredictedCompromiseRate(value *float64)() + SetSimulationAttackType(value *SimulationAttackType)() + SetSource(value *SimulationContentSource)() + SetStatus(value *SimulationContentStatus)() + SetTechnique(value *SimulationAttackTechnique)() + SetTheme(value *PayloadTheme)() +} diff --git a/src/internal/connector/graph/betasdk/models/payment_method.go b/src/internal/connector/graph/betasdk/models/payment_method.go new file mode 100644 index 000000000..fc8ea7f01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_method.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentMethod +type PaymentMethod struct { + Entity + // The code property + code *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPaymentMethod instantiates a new paymentMethod and sets the default values. +func NewPaymentMethod()(*PaymentMethod) { + m := &PaymentMethod{ + Entity: *NewEntity(), + } + return m +} +// CreatePaymentMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePaymentMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPaymentMethod(), nil +} +// GetCode gets the code property value. The code property +func (m *PaymentMethod) GetCode()(*string) { + return m.code +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PaymentMethod) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PaymentMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PaymentMethod) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *PaymentMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCode sets the code property value. The code property +func (m *PaymentMethod) SetCode(value *string)() { + m.code = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PaymentMethod) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PaymentMethod) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/payment_method_collection_response.go b/src/internal/connector/graph/betasdk/models/payment_method_collection_response.go new file mode 100644 index 000000000..396bf2e6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentMethodCollectionResponse +type PaymentMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PaymentMethodable +} +// NewPaymentMethodCollectionResponse instantiates a new PaymentMethodCollectionResponse and sets the default values. +func NewPaymentMethodCollectionResponse()(*PaymentMethodCollectionResponse) { + m := &PaymentMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePaymentMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePaymentMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPaymentMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PaymentMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePaymentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PaymentMethodable, len(val)) + for i, v := range val { + res[i] = v.(PaymentMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PaymentMethodCollectionResponse) GetValue()([]PaymentMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *PaymentMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PaymentMethodCollectionResponse) SetValue(value []PaymentMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payment_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payment_method_collection_responseable.go new file mode 100644 index 000000000..f59c88042 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentMethodCollectionResponseable +type PaymentMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PaymentMethodable) + SetValue(value []PaymentMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payment_methodable.go b/src/internal/connector/graph/betasdk/models/payment_methodable.go new file mode 100644 index 000000000..d0ba61bde --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_methodable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentMethodable +type PaymentMethodable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCode(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/payment_term.go b/src/internal/connector/graph/betasdk/models/payment_term.go new file mode 100644 index 000000000..8ebfe970b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_term.go @@ -0,0 +1,217 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentTerm +type PaymentTerm struct { + Entity + // The calculateDiscountOnCreditMemos property + calculateDiscountOnCreditMemos *bool + // The code property + code *string + // The discountDateCalculation property + discountDateCalculation *string + // The discountPercent property + discountPercent *float64 + // The displayName property + displayName *string + // The dueDateCalculation property + dueDateCalculation *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPaymentTerm instantiates a new paymentTerm and sets the default values. +func NewPaymentTerm()(*PaymentTerm) { + m := &PaymentTerm{ + Entity: *NewEntity(), + } + return m +} +// CreatePaymentTermFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePaymentTermFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPaymentTerm(), nil +} +// GetCalculateDiscountOnCreditMemos gets the calculateDiscountOnCreditMemos property value. The calculateDiscountOnCreditMemos property +func (m *PaymentTerm) GetCalculateDiscountOnCreditMemos()(*bool) { + return m.calculateDiscountOnCreditMemos +} +// GetCode gets the code property value. The code property +func (m *PaymentTerm) GetCode()(*string) { + return m.code +} +// GetDiscountDateCalculation gets the discountDateCalculation property value. The discountDateCalculation property +func (m *PaymentTerm) GetDiscountDateCalculation()(*string) { + return m.discountDateCalculation +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *PaymentTerm) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PaymentTerm) GetDisplayName()(*string) { + return m.displayName +} +// GetDueDateCalculation gets the dueDateCalculation property value. The dueDateCalculation property +func (m *PaymentTerm) GetDueDateCalculation()(*string) { + return m.dueDateCalculation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PaymentTerm) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["calculateDiscountOnCreditMemos"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCalculateDiscountOnCreditMemos(val) + } + return nil + } + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["discountDateCalculation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountDateCalculation(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["dueDateCalculation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateCalculation(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PaymentTerm) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *PaymentTerm) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("calculateDiscountOnCreditMemos", m.GetCalculateDiscountOnCreditMemos()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("discountDateCalculation", m.GetDiscountDateCalculation()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("dueDateCalculation", m.GetDueDateCalculation()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCalculateDiscountOnCreditMemos sets the calculateDiscountOnCreditMemos property value. The calculateDiscountOnCreditMemos property +func (m *PaymentTerm) SetCalculateDiscountOnCreditMemos(value *bool)() { + m.calculateDiscountOnCreditMemos = value +} +// SetCode sets the code property value. The code property +func (m *PaymentTerm) SetCode(value *string)() { + m.code = value +} +// SetDiscountDateCalculation sets the discountDateCalculation property value. The discountDateCalculation property +func (m *PaymentTerm) SetDiscountDateCalculation(value *string)() { + m.discountDateCalculation = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *PaymentTerm) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PaymentTerm) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDueDateCalculation sets the dueDateCalculation property value. The dueDateCalculation property +func (m *PaymentTerm) SetDueDateCalculation(value *string)() { + m.dueDateCalculation = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PaymentTerm) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/payment_term_collection_response.go b/src/internal/connector/graph/betasdk/models/payment_term_collection_response.go new file mode 100644 index 000000000..ce83752c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_term_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentTermCollectionResponse +type PaymentTermCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PaymentTermable +} +// NewPaymentTermCollectionResponse instantiates a new PaymentTermCollectionResponse and sets the default values. +func NewPaymentTermCollectionResponse()(*PaymentTermCollectionResponse) { + m := &PaymentTermCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePaymentTermCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePaymentTermCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPaymentTermCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PaymentTermCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PaymentTermable, len(val)) + for i, v := range val { + res[i] = v.(PaymentTermable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PaymentTermCollectionResponse) GetValue()([]PaymentTermable) { + return m.value +} +// Serialize serializes information the current object +func (m *PaymentTermCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PaymentTermCollectionResponse) SetValue(value []PaymentTermable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/payment_term_collection_responseable.go b/src/internal/connector/graph/betasdk/models/payment_term_collection_responseable.go new file mode 100644 index 000000000..12f7e3ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_term_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentTermCollectionResponseable +type PaymentTermCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PaymentTermable) + SetValue(value []PaymentTermable)() +} diff --git a/src/internal/connector/graph/betasdk/models/payment_termable.go b/src/internal/connector/graph/betasdk/models/payment_termable.go new file mode 100644 index 000000000..59d9d72d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/payment_termable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PaymentTermable +type PaymentTermable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalculateDiscountOnCreditMemos()(*bool) + GetCode()(*string) + GetDiscountDateCalculation()(*string) + GetDiscountPercent()(*float64) + GetDisplayName()(*string) + GetDueDateCalculation()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCalculateDiscountOnCreditMemos(value *bool)() + SetCode(value *string)() + SetDiscountDateCalculation(value *string)() + SetDiscountPercent(value *float64)() + SetDisplayName(value *string)() + SetDueDateCalculation(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/pending_content_update.go b/src/internal/connector/graph/betasdk/models/pending_content_update.go new file mode 100644 index 000000000..fe5fd81ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pending_content_update.go @@ -0,0 +1,98 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PendingContentUpdate +type PendingContentUpdate 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 OdataType property + odataType *string + // Date and time the pending binary operation was queued in UTC time. Read-only. + queuedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPendingContentUpdate instantiates a new pendingContentUpdate and sets the default values. +func NewPendingContentUpdate()(*PendingContentUpdate) { + m := &PendingContentUpdate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePendingContentUpdateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePendingContentUpdateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPendingContentUpdate(), 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 *PendingContentUpdate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PendingContentUpdate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["queuedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetQueuedDateTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PendingContentUpdate) GetOdataType()(*string) { + return m.odataType +} +// GetQueuedDateTime gets the queuedDateTime property value. Date and time the pending binary operation was queued in UTC time. Read-only. +func (m *PendingContentUpdate) GetQueuedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.queuedDateTime +} +// Serialize serializes information the current object +func (m *PendingContentUpdate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("queuedDateTime", m.GetQueuedDateTime()) + 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 *PendingContentUpdate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PendingContentUpdate) SetOdataType(value *string)() { + m.odataType = value +} +// SetQueuedDateTime sets the queuedDateTime property value. Date and time the pending binary operation was queued in UTC time. Read-only. +func (m *PendingContentUpdate) SetQueuedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.queuedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/pending_content_updateable.go b/src/internal/connector/graph/betasdk/models/pending_content_updateable.go new file mode 100644 index 000000000..e96c09453 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pending_content_updateable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PendingContentUpdateable +type PendingContentUpdateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetQueuedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetOdataType(value *string)() + SetQueuedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/pending_operations.go b/src/internal/connector/graph/betasdk/models/pending_operations.go new file mode 100644 index 000000000..8d99f0fe1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pending_operations.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PendingOperations +type PendingOperations 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 OdataType property + odataType *string + // A property that indicates that an operation that might update the binary content of a file is pending completion. + pendingContentUpdate PendingContentUpdateable +} +// NewPendingOperations instantiates a new pendingOperations and sets the default values. +func NewPendingOperations()(*PendingOperations) { + m := &PendingOperations{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePendingOperationsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePendingOperationsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPendingOperations(), 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 *PendingOperations) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PendingOperations) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["pendingContentUpdate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePendingContentUpdateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPendingContentUpdate(val.(PendingContentUpdateable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PendingOperations) GetOdataType()(*string) { + return m.odataType +} +// GetPendingContentUpdate gets the pendingContentUpdate property value. A property that indicates that an operation that might update the binary content of a file is pending completion. +func (m *PendingOperations) GetPendingContentUpdate()(PendingContentUpdateable) { + return m.pendingContentUpdate +} +// Serialize serializes information the current object +func (m *PendingOperations) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("pendingContentUpdate", m.GetPendingContentUpdate()) + 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 *PendingOperations) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PendingOperations) SetOdataType(value *string)() { + m.odataType = value +} +// SetPendingContentUpdate sets the pendingContentUpdate property value. A property that indicates that an operation that might update the binary content of a file is pending completion. +func (m *PendingOperations) SetPendingContentUpdate(value PendingContentUpdateable)() { + m.pendingContentUpdate = value +} diff --git a/src/internal/connector/graph/betasdk/models/pending_operationsable.go b/src/internal/connector/graph/betasdk/models/pending_operationsable.go new file mode 100644 index 000000000..0c29f11d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pending_operationsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PendingOperationsable +type PendingOperationsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPendingContentUpdate()(PendingContentUpdateable) + SetOdataType(value *string)() + SetPendingContentUpdate(value PendingContentUpdateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/perfect_forward_secrecy_group.go b/src/internal/connector/graph/betasdk/models/perfect_forward_secrecy_group.go new file mode 100644 index 000000000..e82ac9e42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/perfect_forward_secrecy_group.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PerfectForwardSecrecyGroup int + +const ( + // PFS1 + PFS1_PERFECTFORWARDSECRECYGROUP PerfectForwardSecrecyGroup = iota + // PFS2 + PFS2_PERFECTFORWARDSECRECYGROUP + // PFS2048 + PFS2048_PERFECTFORWARDSECRECYGROUP + // ECP256 + ECP256_PERFECTFORWARDSECRECYGROUP + // ECP384 + ECP384_PERFECTFORWARDSECRECYGROUP + // PFSMM + PFSMM_PERFECTFORWARDSECRECYGROUP + // PFS24 + PFS24_PERFECTFORWARDSECRECYGROUP +) + +func (i PerfectForwardSecrecyGroup) String() string { + return []string{"pfs1", "pfs2", "pfs2048", "ecp256", "ecp384", "pfsMM", "pfs24"}[i] +} +func ParsePerfectForwardSecrecyGroup(v string) (interface{}, error) { + result := PFS1_PERFECTFORWARDSECRECYGROUP + switch v { + case "pfs1": + result = PFS1_PERFECTFORWARDSECRECYGROUP + case "pfs2": + result = PFS2_PERFECTFORWARDSECRECYGROUP + case "pfs2048": + result = PFS2048_PERFECTFORWARDSECRECYGROUP + case "ecp256": + result = ECP256_PERFECTFORWARDSECRECYGROUP + case "ecp384": + result = ECP384_PERFECTFORWARDSECRECYGROUP + case "pfsMM": + result = PFSMM_PERFECTFORWARDSECRECYGROUP + case "pfs24": + result = PFS24_PERFECTFORWARDSECRECYGROUP + default: + return 0, errors.New("Unknown PerfectForwardSecrecyGroup value: " + v) + } + return &result, nil +} +func SerializePerfectForwardSecrecyGroup(values []PerfectForwardSecrecyGroup) []string { + 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/permission.go b/src/internal/connector/graph/betasdk/models/permission.go new file mode 100644 index 000000000..983dd66c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission.go @@ -0,0 +1,341 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Permission provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Permission struct { + Entity + // A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The grantedTo property + grantedTo IdentitySetable + // The grantedToIdentities property + grantedToIdentities []IdentitySetable + // For link type permissions, the details of the users to whom permission was granted. Read-only. + grantedToIdentitiesV2 []SharePointIdentitySetable + // For user type permissions, the details of the users and applications for this permission. Read-only. + grantedToV2 SharePointIdentitySetable + // Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only. + hasPassword *bool + // Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor. Read-only. + inheritedFrom ItemReferenceable + // Details of any associated sharing invitation for this permission. Read-only. + invitation SharingInvitationable + // Provides the link details of the current permission, if it is a link type permissions. Read-only. + link SharingLinkable + // The type of permission, for example, read. See below for the full list of roles. Read-only. + roles []string + // A unique token that can be used to access this shared item via the [shares API][]. Read-only. + shareId *string +} +// NewPermission instantiates a new permission and sets the default values. +func NewPermission()(*Permission) { + m := &Permission{ + Entity: *NewEntity(), + } + return m +} +// CreatePermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermission(), nil +} +// GetExpirationDateTime gets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional. +func (m *Permission) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Permission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["grantedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrantedTo(val.(IdentitySetable)) + } + return nil + } + res["grantedToIdentities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySetable) + } + m.SetGrantedToIdentities(res) + } + return nil + } + res["grantedToIdentitiesV2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharePointIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharePointIdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(SharePointIdentitySetable) + } + m.SetGrantedToIdentitiesV2(res) + } + return nil + } + res["grantedToV2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharePointIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrantedToV2(val.(SharePointIdentitySetable)) + } + return nil + } + res["hasPassword"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPassword(val) + } + return nil + } + res["inheritedFrom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInheritedFrom(val.(ItemReferenceable)) + } + return nil + } + res["invitation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharingInvitationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvitation(val.(SharingInvitationable)) + } + return nil + } + res["link"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharingLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLink(val.(SharingLinkable)) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoles(res) + } + return nil + } + res["shareId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShareId(val) + } + return nil + } + return res +} +// GetGrantedTo gets the grantedTo property value. The grantedTo property +func (m *Permission) GetGrantedTo()(IdentitySetable) { + return m.grantedTo +} +// GetGrantedToIdentities gets the grantedToIdentities property value. The grantedToIdentities property +func (m *Permission) GetGrantedToIdentities()([]IdentitySetable) { + return m.grantedToIdentities +} +// GetGrantedToIdentitiesV2 gets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only. +func (m *Permission) GetGrantedToIdentitiesV2()([]SharePointIdentitySetable) { + return m.grantedToIdentitiesV2 +} +// GetGrantedToV2 gets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only. +func (m *Permission) GetGrantedToV2()(SharePointIdentitySetable) { + return m.grantedToV2 +} +// GetHasPassword gets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only. +func (m *Permission) GetHasPassword()(*bool) { + return m.hasPassword +} +// GetInheritedFrom gets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor. Read-only. +func (m *Permission) GetInheritedFrom()(ItemReferenceable) { + return m.inheritedFrom +} +// GetInvitation gets the invitation property value. Details of any associated sharing invitation for this permission. Read-only. +func (m *Permission) GetInvitation()(SharingInvitationable) { + return m.invitation +} +// GetLink gets the link property value. Provides the link details of the current permission, if it is a link type permissions. Read-only. +func (m *Permission) GetLink()(SharingLinkable) { + return m.link +} +// GetRoles gets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only. +func (m *Permission) GetRoles()([]string) { + return m.roles +} +// GetShareId gets the shareId property value. A unique token that can be used to access this shared item via the [shares API][]. Read-only. +func (m *Permission) GetShareId()(*string) { + return m.shareId +} +// Serialize serializes information the current object +func (m *Permission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("grantedTo", m.GetGrantedTo()) + if err != nil { + return err + } + } + if m.GetGrantedToIdentities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGrantedToIdentities())) + for i, v := range m.GetGrantedToIdentities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("grantedToIdentities", cast) + if err != nil { + return err + } + } + if m.GetGrantedToIdentitiesV2() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetGrantedToIdentitiesV2())) + for i, v := range m.GetGrantedToIdentitiesV2() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("grantedToIdentitiesV2", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("grantedToV2", m.GetGrantedToV2()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasPassword", m.GetHasPassword()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inheritedFrom", m.GetInheritedFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("invitation", m.GetInvitation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("link", m.GetLink()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + err = writer.WriteCollectionOfStringValues("roles", m.GetRoles()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shareId", m.GetShareId()) + if err != nil { + return err + } + } + return nil +} +// SetExpirationDateTime sets the expirationDateTime property value. A format of yyyy-MM-ddTHH:mm:ssZ of DateTimeOffset indicates the expiration time of the permission. DateTime.MinValue indicates there is no expiration set for this permission. Optional. +func (m *Permission) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetGrantedTo sets the grantedTo property value. The grantedTo property +func (m *Permission) SetGrantedTo(value IdentitySetable)() { + m.grantedTo = value +} +// SetGrantedToIdentities sets the grantedToIdentities property value. The grantedToIdentities property +func (m *Permission) SetGrantedToIdentities(value []IdentitySetable)() { + m.grantedToIdentities = value +} +// SetGrantedToIdentitiesV2 sets the grantedToIdentitiesV2 property value. For link type permissions, the details of the users to whom permission was granted. Read-only. +func (m *Permission) SetGrantedToIdentitiesV2(value []SharePointIdentitySetable)() { + m.grantedToIdentitiesV2 = value +} +// SetGrantedToV2 sets the grantedToV2 property value. For user type permissions, the details of the users and applications for this permission. Read-only. +func (m *Permission) SetGrantedToV2(value SharePointIdentitySetable)() { + m.grantedToV2 = value +} +// SetHasPassword sets the hasPassword property value. Indicates whether the password is set for this permission. This property only appears in the response. Optional. Read-only. For OneDrive Personal only. +func (m *Permission) SetHasPassword(value *bool)() { + m.hasPassword = value +} +// SetInheritedFrom sets the inheritedFrom property value. Provides a reference to the ancestor of the current permission, if it is inherited from an ancestor. Read-only. +func (m *Permission) SetInheritedFrom(value ItemReferenceable)() { + m.inheritedFrom = value +} +// SetInvitation sets the invitation property value. Details of any associated sharing invitation for this permission. Read-only. +func (m *Permission) SetInvitation(value SharingInvitationable)() { + m.invitation = value +} +// SetLink sets the link property value. Provides the link details of the current permission, if it is a link type permissions. Read-only. +func (m *Permission) SetLink(value SharingLinkable)() { + m.link = value +} +// SetRoles sets the roles property value. The type of permission, for example, read. See below for the full list of roles. Read-only. +func (m *Permission) SetRoles(value []string)() { + m.roles = value +} +// SetShareId sets the shareId property value. A unique token that can be used to access this shared item via the [shares API][]. Read-only. +func (m *Permission) SetShareId(value *string)() { + m.shareId = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_classification_type.go b/src/internal/connector/graph/betasdk/models/permission_classification_type.go new file mode 100644 index 000000000..c8e1f296f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_classification_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PermissionClassificationType int + +const ( + LOW_PERMISSIONCLASSIFICATIONTYPE PermissionClassificationType = iota + MEDIUM_PERMISSIONCLASSIFICATIONTYPE + HIGH_PERMISSIONCLASSIFICATIONTYPE + UNKNOWNFUTUREVALUE_PERMISSIONCLASSIFICATIONTYPE +) + +func (i PermissionClassificationType) String() string { + return []string{"low", "medium", "high", "unknownFutureValue"}[i] +} +func ParsePermissionClassificationType(v string) (interface{}, error) { + result := LOW_PERMISSIONCLASSIFICATIONTYPE + switch v { + case "low": + result = LOW_PERMISSIONCLASSIFICATIONTYPE + case "medium": + result = MEDIUM_PERMISSIONCLASSIFICATIONTYPE + case "high": + result = HIGH_PERMISSIONCLASSIFICATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PERMISSIONCLASSIFICATIONTYPE + default: + return 0, errors.New("Unknown PermissionClassificationType value: " + v) + } + return &result, nil +} +func SerializePermissionClassificationType(values []PermissionClassificationType) []string { + 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/permission_collection_response.go b/src/internal/connector/graph/betasdk/models/permission_collection_response.go new file mode 100644 index 000000000..3b903b1a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionCollectionResponse +type PermissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Permissionable +} +// NewPermissionCollectionResponse instantiates a new PermissionCollectionResponse and sets the default values. +func NewPermissionCollectionResponse()(*PermissionCollectionResponse) { + m := &PermissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePermissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Permissionable, len(val)) + for i, v := range val { + res[i] = v.(Permissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PermissionCollectionResponse) GetValue()([]Permissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *PermissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PermissionCollectionResponse) SetValue(value []Permissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/permission_collection_responseable.go new file mode 100644 index 000000000..65ac1813e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionCollectionResponseable +type PermissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Permissionable) + SetValue(value []Permissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_condition_set.go b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set.go new file mode 100644 index 000000000..26f8bef75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set.go @@ -0,0 +1,285 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantConditionSet provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PermissionGrantConditionSet struct { + Entity + // Set to true to only match on client applications that are Microsoft 365 certified. Set to false to match on any other client app. Default is false. + certifiedClientApplicationsOnly *bool + // A list of appId values for the client applications to match with, or a list with the single value all to match any client application. Default is the single value all. + clientApplicationIds []string + // A list of Microsoft Partner Network (MPN) IDs for verified publishers of the client application, or a list with the single value all to match with client apps from any publisher. Default is the single value all. + clientApplicationPublisherIds []string + // Set to true to only match on client applications with a verified publisher. Set to false to match on any client app, even if it does not have a verified publisher. Default is false. + clientApplicationsFromVerifiedPublisherOnly *bool + // A list of Azure Active Directory tenant IDs in which the client application is registered, or a list with the single value all to match with client apps registered in any tenant. Default is the single value all. + clientApplicationTenantIds []string + // The permission classification for the permission being granted, or all to match with any permission classification (including permissions which are not classified). Default is all. + permissionClassification *string + // The list of id values for the specific permissions to match with, or a list with the single value all to match with any permission. The id of delegated permissions can be found in the publishedPermissionScopes property of the API's **servicePrincipal** object. The id of application permissions can be found in the appRoles property of the API's **servicePrincipal** object. The id of resource-specific application permissions can be found in the resourceSpecificApplicationPermissions property of the API's **servicePrincipal** object. Default is the single value all. + permissions []string + // The permission type of the permission being granted. Possible values: application for application permissions (e.g. app roles), or delegated for delegated permissions. The value delegatedUserConsentable indicates delegated permissions which have not been configured by the API publisher to require admin consent—this value may be used in built-in permission grant policies, but cannot be used in custom permission grant policies. Required. + permissionType *PermissionType + // The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match with any resource application or API. Default is any. + resourceApplication *string +} +// NewPermissionGrantConditionSet instantiates a new permissionGrantConditionSet and sets the default values. +func NewPermissionGrantConditionSet()(*PermissionGrantConditionSet) { + m := &PermissionGrantConditionSet{ + Entity: *NewEntity(), + } + return m +} +// CreatePermissionGrantConditionSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionGrantConditionSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionGrantConditionSet(), nil +} +// GetCertifiedClientApplicationsOnly gets the certifiedClientApplicationsOnly property value. Set to true to only match on client applications that are Microsoft 365 certified. Set to false to match on any other client app. Default is false. +func (m *PermissionGrantConditionSet) GetCertifiedClientApplicationsOnly()(*bool) { + return m.certifiedClientApplicationsOnly +} +// GetClientApplicationIds gets the clientApplicationIds property value. A list of appId values for the client applications to match with, or a list with the single value all to match any client application. Default is the single value all. +func (m *PermissionGrantConditionSet) GetClientApplicationIds()([]string) { + return m.clientApplicationIds +} +// GetClientApplicationPublisherIds gets the clientApplicationPublisherIds property value. A list of Microsoft Partner Network (MPN) IDs for verified publishers of the client application, or a list with the single value all to match with client apps from any publisher. Default is the single value all. +func (m *PermissionGrantConditionSet) GetClientApplicationPublisherIds()([]string) { + return m.clientApplicationPublisherIds +} +// GetClientApplicationsFromVerifiedPublisherOnly gets the clientApplicationsFromVerifiedPublisherOnly property value. Set to true to only match on client applications with a verified publisher. Set to false to match on any client app, even if it does not have a verified publisher. Default is false. +func (m *PermissionGrantConditionSet) GetClientApplicationsFromVerifiedPublisherOnly()(*bool) { + return m.clientApplicationsFromVerifiedPublisherOnly +} +// GetClientApplicationTenantIds gets the clientApplicationTenantIds property value. A list of Azure Active Directory tenant IDs in which the client application is registered, or a list with the single value all to match with client apps registered in any tenant. Default is the single value all. +func (m *PermissionGrantConditionSet) GetClientApplicationTenantIds()([]string) { + return m.clientApplicationTenantIds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionGrantConditionSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["certifiedClientApplicationsOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCertifiedClientApplicationsOnly(val) + } + return nil + } + res["clientApplicationIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetClientApplicationIds(res) + } + return nil + } + res["clientApplicationPublisherIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetClientApplicationPublisherIds(res) + } + return nil + } + res["clientApplicationsFromVerifiedPublisherOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetClientApplicationsFromVerifiedPublisherOnly(val) + } + return nil + } + res["clientApplicationTenantIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetClientApplicationTenantIds(res) + } + return nil + } + res["permissionClassification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermissionClassification(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPermissions(res) + } + return nil + } + res["permissionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePermissionType) + if err != nil { + return err + } + if val != nil { + m.SetPermissionType(val.(*PermissionType)) + } + return nil + } + res["resourceApplication"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceApplication(val) + } + return nil + } + return res +} +// GetPermissionClassification gets the permissionClassification property value. The permission classification for the permission being granted, or all to match with any permission classification (including permissions which are not classified). Default is all. +func (m *PermissionGrantConditionSet) GetPermissionClassification()(*string) { + return m.permissionClassification +} +// GetPermissions gets the permissions property value. The list of id values for the specific permissions to match with, or a list with the single value all to match with any permission. The id of delegated permissions can be found in the publishedPermissionScopes property of the API's **servicePrincipal** object. The id of application permissions can be found in the appRoles property of the API's **servicePrincipal** object. The id of resource-specific application permissions can be found in the resourceSpecificApplicationPermissions property of the API's **servicePrincipal** object. Default is the single value all. +func (m *PermissionGrantConditionSet) GetPermissions()([]string) { + return m.permissions +} +// GetPermissionType gets the permissionType property value. The permission type of the permission being granted. Possible values: application for application permissions (e.g. app roles), or delegated for delegated permissions. The value delegatedUserConsentable indicates delegated permissions which have not been configured by the API publisher to require admin consent—this value may be used in built-in permission grant policies, but cannot be used in custom permission grant policies. Required. +func (m *PermissionGrantConditionSet) GetPermissionType()(*PermissionType) { + return m.permissionType +} +// GetResourceApplication gets the resourceApplication property value. The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match with any resource application or API. Default is any. +func (m *PermissionGrantConditionSet) GetResourceApplication()(*string) { + return m.resourceApplication +} +// Serialize serializes information the current object +func (m *PermissionGrantConditionSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("certifiedClientApplicationsOnly", m.GetCertifiedClientApplicationsOnly()) + if err != nil { + return err + } + } + if m.GetClientApplicationIds() != nil { + err = writer.WriteCollectionOfStringValues("clientApplicationIds", m.GetClientApplicationIds()) + if err != nil { + return err + } + } + if m.GetClientApplicationPublisherIds() != nil { + err = writer.WriteCollectionOfStringValues("clientApplicationPublisherIds", m.GetClientApplicationPublisherIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("clientApplicationsFromVerifiedPublisherOnly", m.GetClientApplicationsFromVerifiedPublisherOnly()) + if err != nil { + return err + } + } + if m.GetClientApplicationTenantIds() != nil { + err = writer.WriteCollectionOfStringValues("clientApplicationTenantIds", m.GetClientApplicationTenantIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permissionClassification", m.GetPermissionClassification()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + err = writer.WriteCollectionOfStringValues("permissions", m.GetPermissions()) + if err != nil { + return err + } + } + if m.GetPermissionType() != nil { + cast := (*m.GetPermissionType()).String() + err = writer.WriteStringValue("permissionType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceApplication", m.GetResourceApplication()) + if err != nil { + return err + } + } + return nil +} +// SetCertifiedClientApplicationsOnly sets the certifiedClientApplicationsOnly property value. Set to true to only match on client applications that are Microsoft 365 certified. Set to false to match on any other client app. Default is false. +func (m *PermissionGrantConditionSet) SetCertifiedClientApplicationsOnly(value *bool)() { + m.certifiedClientApplicationsOnly = value +} +// SetClientApplicationIds sets the clientApplicationIds property value. A list of appId values for the client applications to match with, or a list with the single value all to match any client application. Default is the single value all. +func (m *PermissionGrantConditionSet) SetClientApplicationIds(value []string)() { + m.clientApplicationIds = value +} +// SetClientApplicationPublisherIds sets the clientApplicationPublisherIds property value. A list of Microsoft Partner Network (MPN) IDs for verified publishers of the client application, or a list with the single value all to match with client apps from any publisher. Default is the single value all. +func (m *PermissionGrantConditionSet) SetClientApplicationPublisherIds(value []string)() { + m.clientApplicationPublisherIds = value +} +// SetClientApplicationsFromVerifiedPublisherOnly sets the clientApplicationsFromVerifiedPublisherOnly property value. Set to true to only match on client applications with a verified publisher. Set to false to match on any client app, even if it does not have a verified publisher. Default is false. +func (m *PermissionGrantConditionSet) SetClientApplicationsFromVerifiedPublisherOnly(value *bool)() { + m.clientApplicationsFromVerifiedPublisherOnly = value +} +// SetClientApplicationTenantIds sets the clientApplicationTenantIds property value. A list of Azure Active Directory tenant IDs in which the client application is registered, or a list with the single value all to match with client apps registered in any tenant. Default is the single value all. +func (m *PermissionGrantConditionSet) SetClientApplicationTenantIds(value []string)() { + m.clientApplicationTenantIds = value +} +// SetPermissionClassification sets the permissionClassification property value. The permission classification for the permission being granted, or all to match with any permission classification (including permissions which are not classified). Default is all. +func (m *PermissionGrantConditionSet) SetPermissionClassification(value *string)() { + m.permissionClassification = value +} +// SetPermissions sets the permissions property value. The list of id values for the specific permissions to match with, or a list with the single value all to match with any permission. The id of delegated permissions can be found in the publishedPermissionScopes property of the API's **servicePrincipal** object. The id of application permissions can be found in the appRoles property of the API's **servicePrincipal** object. The id of resource-specific application permissions can be found in the resourceSpecificApplicationPermissions property of the API's **servicePrincipal** object. Default is the single value all. +func (m *PermissionGrantConditionSet) SetPermissions(value []string)() { + m.permissions = value +} +// SetPermissionType sets the permissionType property value. The permission type of the permission being granted. Possible values: application for application permissions (e.g. app roles), or delegated for delegated permissions. The value delegatedUserConsentable indicates delegated permissions which have not been configured by the API publisher to require admin consent—this value may be used in built-in permission grant policies, but cannot be used in custom permission grant policies. Required. +func (m *PermissionGrantConditionSet) SetPermissionType(value *PermissionType)() { + m.permissionType = value +} +// SetResourceApplication sets the resourceApplication property value. The appId of the resource application (e.g. the API) for which a permission is being granted, or any to match with any resource application or API. Default is any. +func (m *PermissionGrantConditionSet) SetResourceApplication(value *string)() { + m.resourceApplication = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_response.go b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_response.go new file mode 100644 index 000000000..b7d5a733a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantConditionSetCollectionResponse +type PermissionGrantConditionSetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PermissionGrantConditionSetable +} +// NewPermissionGrantConditionSetCollectionResponse instantiates a new PermissionGrantConditionSetCollectionResponse and sets the default values. +func NewPermissionGrantConditionSetCollectionResponse()(*PermissionGrantConditionSetCollectionResponse) { + m := &PermissionGrantConditionSetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePermissionGrantConditionSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionGrantConditionSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionGrantConditionSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionGrantConditionSetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionGrantConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionGrantConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(PermissionGrantConditionSetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PermissionGrantConditionSetCollectionResponse) GetValue()([]PermissionGrantConditionSetable) { + return m.value +} +// Serialize serializes information the current object +func (m *PermissionGrantConditionSetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PermissionGrantConditionSetCollectionResponse) SetValue(value []PermissionGrantConditionSetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_responseable.go new file mode 100644 index 000000000..c77433ee7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_condition_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantConditionSetCollectionResponseable +type PermissionGrantConditionSetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PermissionGrantConditionSetable) + SetValue(value []PermissionGrantConditionSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_condition_setable.go b/src/internal/connector/graph/betasdk/models/permission_grant_condition_setable.go new file mode 100644 index 000000000..a8554a475 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_condition_setable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantConditionSetable +type PermissionGrantConditionSetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertifiedClientApplicationsOnly()(*bool) + GetClientApplicationIds()([]string) + GetClientApplicationPublisherIds()([]string) + GetClientApplicationsFromVerifiedPublisherOnly()(*bool) + GetClientApplicationTenantIds()([]string) + GetPermissionClassification()(*string) + GetPermissions()([]string) + GetPermissionType()(*PermissionType) + GetResourceApplication()(*string) + SetCertifiedClientApplicationsOnly(value *bool)() + SetClientApplicationIds(value []string)() + SetClientApplicationPublisherIds(value []string)() + SetClientApplicationsFromVerifiedPublisherOnly(value *bool)() + SetClientApplicationTenantIds(value []string)() + SetPermissionClassification(value *string)() + SetPermissions(value []string)() + SetPermissionType(value *PermissionType)() + SetResourceApplication(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_policy.go b/src/internal/connector/graph/betasdk/models/permission_grant_policy.go new file mode 100644 index 000000000..926b4733c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_policy.go @@ -0,0 +1,104 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantPolicy +type PermissionGrantPolicy struct { + PolicyBase + // Condition sets which are excluded in this permission grant policy. Automatically expanded on GET. + excludes []PermissionGrantConditionSetable + // Condition sets which are included in this permission grant policy. Automatically expanded on GET. + includes []PermissionGrantConditionSetable +} +// NewPermissionGrantPolicy instantiates a new PermissionGrantPolicy and sets the default values. +func NewPermissionGrantPolicy()(*PermissionGrantPolicy) { + m := &PermissionGrantPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.permissionGrantPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePermissionGrantPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionGrantPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionGrantPolicy(), nil +} +// GetExcludes gets the excludes property value. Condition sets which are excluded in this permission grant policy. Automatically expanded on GET. +func (m *PermissionGrantPolicy) GetExcludes()([]PermissionGrantConditionSetable) { + return m.excludes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionGrantPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["excludes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionGrantConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionGrantConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(PermissionGrantConditionSetable) + } + m.SetExcludes(res) + } + return nil + } + res["includes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionGrantConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionGrantConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(PermissionGrantConditionSetable) + } + m.SetIncludes(res) + } + return nil + } + return res +} +// GetIncludes gets the includes property value. Condition sets which are included in this permission grant policy. Automatically expanded on GET. +func (m *PermissionGrantPolicy) GetIncludes()([]PermissionGrantConditionSetable) { + return m.includes +} +// Serialize serializes information the current object +func (m *PermissionGrantPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + if m.GetExcludes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExcludes())) + for i, v := range m.GetExcludes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("excludes", cast) + if err != nil { + return err + } + } + if m.GetIncludes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludes())) + for i, v := range m.GetIncludes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includes", cast) + if err != nil { + return err + } + } + return nil +} +// SetExcludes sets the excludes property value. Condition sets which are excluded in this permission grant policy. Automatically expanded on GET. +func (m *PermissionGrantPolicy) SetExcludes(value []PermissionGrantConditionSetable)() { + m.excludes = value +} +// SetIncludes sets the includes property value. Condition sets which are included in this permission grant policy. Automatically expanded on GET. +func (m *PermissionGrantPolicy) SetIncludes(value []PermissionGrantConditionSetable)() { + m.includes = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_response.go new file mode 100644 index 000000000..99bd17969 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantPolicyCollectionResponse +type PermissionGrantPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PermissionGrantPolicyable +} +// NewPermissionGrantPolicyCollectionResponse instantiates a new PermissionGrantPolicyCollectionResponse and sets the default values. +func NewPermissionGrantPolicyCollectionResponse()(*PermissionGrantPolicyCollectionResponse) { + m := &PermissionGrantPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePermissionGrantPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionGrantPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionGrantPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionGrantPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionGrantPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionGrantPolicyable, len(val)) + for i, v := range val { + res[i] = v.(PermissionGrantPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PermissionGrantPolicyCollectionResponse) GetValue()([]PermissionGrantPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *PermissionGrantPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PermissionGrantPolicyCollectionResponse) SetValue(value []PermissionGrantPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_responseable.go new file mode 100644 index 000000000..bea2f31ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantPolicyCollectionResponseable +type PermissionGrantPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PermissionGrantPolicyable) + SetValue(value []PermissionGrantPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_grant_policyable.go b/src/internal/connector/graph/betasdk/models/permission_grant_policyable.go new file mode 100644 index 000000000..713a01474 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_grant_policyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionGrantPolicyable +type PermissionGrantPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetExcludes()([]PermissionGrantConditionSetable) + GetIncludes()([]PermissionGrantConditionSetable) + SetExcludes(value []PermissionGrantConditionSetable)() + SetIncludes(value []PermissionGrantConditionSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_scope.go b/src/internal/connector/graph/betasdk/models/permission_scope.go new file mode 100644 index 000000000..7887dcca0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_scope.go @@ -0,0 +1,306 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionScope +type PermissionScope struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A description of the delegated permissions, intended to be read by an administrator granting the permission on behalf of all users. This text appears in tenant-wide admin consent experiences. + adminConsentDescription *string + // The permission's title, intended to be read by an administrator granting the permission on behalf of all users. + adminConsentDisplayName *string + // Unique delegated permission identifier inside the collection of delegated permissions defined for a resource application. + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed. + isEnabled *bool + // The OdataType property + odataType *string + // The origin property + origin *string + // The possible values are: User and Admin. Specifies whether this delegated permission should be considered safe for non-admin users to consent to on behalf of themselves, or whether an administrator consent should always be required. While Microsoft Graph defines the default consent requirement for each permission, the tenant administrator may override the behavior in their organization (by allowing, restricting, or limiting user consent to this delegated permission). For more information, see Configure how users consent to applications. + type_escaped *string + // A description of the delegated permissions, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. + userConsentDescription *string + // A title for the permission, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. + userConsentDisplayName *string + // Specifies the value to include in the scp (scope) claim in access tokens. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. + value *string +} +// NewPermissionScope instantiates a new permissionScope and sets the default values. +func NewPermissionScope()(*PermissionScope) { + m := &PermissionScope{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePermissionScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionScope(), 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 *PermissionScope) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdminConsentDescription gets the adminConsentDescription property value. A description of the delegated permissions, intended to be read by an administrator granting the permission on behalf of all users. This text appears in tenant-wide admin consent experiences. +func (m *PermissionScope) GetAdminConsentDescription()(*string) { + return m.adminConsentDescription +} +// GetAdminConsentDisplayName gets the adminConsentDisplayName property value. The permission's title, intended to be read by an administrator granting the permission on behalf of all users. +func (m *PermissionScope) GetAdminConsentDisplayName()(*string) { + return m.adminConsentDisplayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["adminConsentDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdminConsentDescription(val) + } + return nil + } + res["adminConsentDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdminConsentDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["origin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrigin(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["userConsentDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserConsentDescription(val) + } + return nil + } + res["userConsentDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserConsentDisplayName(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 +} +// GetId gets the id property value. Unique delegated permission identifier inside the collection of delegated permissions defined for a resource application. +func (m *PermissionScope) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetIsEnabled gets the isEnabled property value. When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed. +func (m *PermissionScope) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PermissionScope) GetOdataType()(*string) { + return m.odataType +} +// GetOrigin gets the origin property value. The origin property +func (m *PermissionScope) GetOrigin()(*string) { + return m.origin +} +// GetType gets the type property value. The possible values are: User and Admin. Specifies whether this delegated permission should be considered safe for non-admin users to consent to on behalf of themselves, or whether an administrator consent should always be required. While Microsoft Graph defines the default consent requirement for each permission, the tenant administrator may override the behavior in their organization (by allowing, restricting, or limiting user consent to this delegated permission). For more information, see Configure how users consent to applications. +func (m *PermissionScope) GetType()(*string) { + return m.type_escaped +} +// GetUserConsentDescription gets the userConsentDescription property value. A description of the delegated permissions, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. +func (m *PermissionScope) GetUserConsentDescription()(*string) { + return m.userConsentDescription +} +// GetUserConsentDisplayName gets the userConsentDisplayName property value. A title for the permission, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. +func (m *PermissionScope) GetUserConsentDisplayName()(*string) { + return m.userConsentDisplayName +} +// GetValue gets the value property value. Specifies the value to include in the scp (scope) claim in access tokens. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. +func (m *PermissionScope) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *PermissionScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("adminConsentDescription", m.GetAdminConsentDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("adminConsentDisplayName", m.GetAdminConsentDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("origin", m.GetOrigin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userConsentDescription", m.GetUserConsentDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userConsentDisplayName", m.GetUserConsentDisplayName()) + 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 *PermissionScope) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdminConsentDescription sets the adminConsentDescription property value. A description of the delegated permissions, intended to be read by an administrator granting the permission on behalf of all users. This text appears in tenant-wide admin consent experiences. +func (m *PermissionScope) SetAdminConsentDescription(value *string)() { + m.adminConsentDescription = value +} +// SetAdminConsentDisplayName sets the adminConsentDisplayName property value. The permission's title, intended to be read by an administrator granting the permission on behalf of all users. +func (m *PermissionScope) SetAdminConsentDisplayName(value *string)() { + m.adminConsentDisplayName = value +} +// SetId sets the id property value. Unique delegated permission identifier inside the collection of delegated permissions defined for a resource application. +func (m *PermissionScope) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetIsEnabled sets the isEnabled property value. When creating or updating a permission, this property must be set to true (which is the default). To delete a permission, this property must first be set to false. At that point, in a subsequent call, the permission may be removed. +func (m *PermissionScope) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PermissionScope) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrigin sets the origin property value. The origin property +func (m *PermissionScope) SetOrigin(value *string)() { + m.origin = value +} +// SetType sets the type property value. The possible values are: User and Admin. Specifies whether this delegated permission should be considered safe for non-admin users to consent to on behalf of themselves, or whether an administrator consent should always be required. While Microsoft Graph defines the default consent requirement for each permission, the tenant administrator may override the behavior in their organization (by allowing, restricting, or limiting user consent to this delegated permission). For more information, see Configure how users consent to applications. +func (m *PermissionScope) SetType(value *string)() { + m.type_escaped = value +} +// SetUserConsentDescription sets the userConsentDescription property value. A description of the delegated permissions, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. +func (m *PermissionScope) SetUserConsentDescription(value *string)() { + m.userConsentDescription = value +} +// SetUserConsentDisplayName sets the userConsentDisplayName property value. A title for the permission, intended to be read by a user granting the permission on their own behalf. This text appears in consent experiences where the user is consenting only on behalf of themselves. +func (m *PermissionScope) SetUserConsentDisplayName(value *string)() { + m.userConsentDisplayName = value +} +// SetValue sets the value property value. Specifies the value to include in the scp (scope) claim in access tokens. Must not exceed 120 characters in length. Allowed characters are : ! # $ % & ' ( ) * + , - . / : ; = ? @ [ ] ^ + _ { } ~, as well as characters in the ranges 0-9, A-Z and a-z. Any other character, including the space character, are not allowed. May not begin with .. +func (m *PermissionScope) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_scope_collection_response.go b/src/internal/connector/graph/betasdk/models/permission_scope_collection_response.go new file mode 100644 index 000000000..047396f04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_scope_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionScopeCollectionResponse +type PermissionScopeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PermissionScopeable +} +// NewPermissionScopeCollectionResponse instantiates a new PermissionScopeCollectionResponse and sets the default values. +func NewPermissionScopeCollectionResponse()(*PermissionScopeCollectionResponse) { + m := &PermissionScopeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePermissionScopeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePermissionScopeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPermissionScopeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PermissionScopeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionScopeable, len(val)) + for i, v := range val { + res[i] = v.(PermissionScopeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PermissionScopeCollectionResponse) GetValue()([]PermissionScopeable) { + return m.value +} +// Serialize serializes information the current object +func (m *PermissionScopeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PermissionScopeCollectionResponse) SetValue(value []PermissionScopeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/permission_scope_collection_responseable.go b/src/internal/connector/graph/betasdk/models/permission_scope_collection_responseable.go new file mode 100644 index 000000000..22e837867 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_scope_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionScopeCollectionResponseable +type PermissionScopeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PermissionScopeable) + SetValue(value []PermissionScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_scopeable.go b/src/internal/connector/graph/betasdk/models/permission_scopeable.go new file mode 100644 index 000000000..d36e8e715 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_scopeable.go @@ -0,0 +1,32 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PermissionScopeable +type PermissionScopeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminConsentDescription()(*string) + GetAdminConsentDisplayName()(*string) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetOrigin()(*string) + GetType()(*string) + GetUserConsentDescription()(*string) + GetUserConsentDisplayName()(*string) + GetValue()(*string) + SetAdminConsentDescription(value *string)() + SetAdminConsentDisplayName(value *string)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetOrigin(value *string)() + SetType(value *string)() + SetUserConsentDescription(value *string)() + SetUserConsentDisplayName(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/permission_type.go b/src/internal/connector/graph/betasdk/models/permission_type.go new file mode 100644 index 000000000..b4228b235 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permission_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PermissionType int + +const ( + APPLICATION_PERMISSIONTYPE PermissionType = iota + DELEGATED_PERMISSIONTYPE + DELEGATEDUSERCONSENTABLE_PERMISSIONTYPE +) + +func (i PermissionType) String() string { + return []string{"application", "delegated", "delegatedUserConsentable"}[i] +} +func ParsePermissionType(v string) (interface{}, error) { + result := APPLICATION_PERMISSIONTYPE + switch v { + case "application": + result = APPLICATION_PERMISSIONTYPE + case "delegated": + result = DELEGATED_PERMISSIONTYPE + case "delegatedUserConsentable": + result = DELEGATEDUSERCONSENTABLE_PERMISSIONTYPE + default: + return 0, errors.New("Unknown PermissionType value: " + v) + } + return &result, nil +} +func SerializePermissionType(values []PermissionType) []string { + 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/permissionable.go b/src/internal/connector/graph/betasdk/models/permissionable.go new file mode 100644 index 000000000..0be9e6404 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/permissionable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Permissionable +type Permissionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGrantedTo()(IdentitySetable) + GetGrantedToIdentities()([]IdentitySetable) + GetGrantedToIdentitiesV2()([]SharePointIdentitySetable) + GetGrantedToV2()(SharePointIdentitySetable) + GetHasPassword()(*bool) + GetInheritedFrom()(ItemReferenceable) + GetInvitation()(SharingInvitationable) + GetLink()(SharingLinkable) + GetRoles()([]string) + GetShareId()(*string) + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGrantedTo(value IdentitySetable)() + SetGrantedToIdentities(value []IdentitySetable)() + SetGrantedToIdentitiesV2(value []SharePointIdentitySetable)() + SetGrantedToV2(value SharePointIdentitySetable)() + SetHasPassword(value *bool)() + SetInheritedFrom(value ItemReferenceable)() + SetInvitation(value SharingInvitationable)() + SetLink(value SharingLinkable)() + SetRoles(value []string)() + SetShareId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/persistent_browser_session_control.go b/src/internal/connector/graph/betasdk/models/persistent_browser_session_control.go new file mode 100644 index 000000000..d433a8b66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/persistent_browser_session_control.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersistentBrowserSessionControl +type PersistentBrowserSessionControl struct { + ConditionalAccessSessionControl + // Possible values are: always, never. + mode *PersistentBrowserSessionMode +} +// NewPersistentBrowserSessionControl instantiates a new PersistentBrowserSessionControl and sets the default values. +func NewPersistentBrowserSessionControl()(*PersistentBrowserSessionControl) { + m := &PersistentBrowserSessionControl{ + ConditionalAccessSessionControl: *NewConditionalAccessSessionControl(), + } + odataTypeValue := "#microsoft.graph.persistentBrowserSessionControl"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersistentBrowserSessionControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersistentBrowserSessionControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersistentBrowserSessionControl(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersistentBrowserSessionControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ConditionalAccessSessionControl.GetFieldDeserializers() + res["mode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePersistentBrowserSessionMode) + if err != nil { + return err + } + if val != nil { + m.SetMode(val.(*PersistentBrowserSessionMode)) + } + return nil + } + return res +} +// GetMode gets the mode property value. Possible values are: always, never. +func (m *PersistentBrowserSessionControl) GetMode()(*PersistentBrowserSessionMode) { + return m.mode +} +// Serialize serializes information the current object +func (m *PersistentBrowserSessionControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ConditionalAccessSessionControl.Serialize(writer) + if err != nil { + return err + } + if m.GetMode() != nil { + cast := (*m.GetMode()).String() + err = writer.WriteStringValue("mode", &cast) + if err != nil { + return err + } + } + return nil +} +// SetMode sets the mode property value. Possible values are: always, never. +func (m *PersistentBrowserSessionControl) SetMode(value *PersistentBrowserSessionMode)() { + m.mode = value +} diff --git a/src/internal/connector/graph/betasdk/models/persistent_browser_session_controlable.go b/src/internal/connector/graph/betasdk/models/persistent_browser_session_controlable.go new file mode 100644 index 000000000..8f1c4949d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/persistent_browser_session_controlable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersistentBrowserSessionControlable +type PersistentBrowserSessionControlable interface { + ConditionalAccessSessionControlable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMode()(*PersistentBrowserSessionMode) + SetMode(value *PersistentBrowserSessionMode)() +} diff --git a/src/internal/connector/graph/betasdk/models/persistent_browser_session_mode.go b/src/internal/connector/graph/betasdk/models/persistent_browser_session_mode.go new file mode 100644 index 000000000..d32f17d6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/persistent_browser_session_mode.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PersistentBrowserSessionMode int + +const ( + ALWAYS_PERSISTENTBROWSERSESSIONMODE PersistentBrowserSessionMode = iota + NEVER_PERSISTENTBROWSERSESSIONMODE +) + +func (i PersistentBrowserSessionMode) String() string { + return []string{"always", "never"}[i] +} +func ParsePersistentBrowserSessionMode(v string) (interface{}, error) { + result := ALWAYS_PERSISTENTBROWSERSESSIONMODE + switch v { + case "always": + result = ALWAYS_PERSISTENTBROWSERSESSIONMODE + case "never": + result = NEVER_PERSISTENTBROWSERSESSIONMODE + default: + return 0, errors.New("Unknown PersistentBrowserSessionMode value: " + v) + } + return &result, nil +} +func SerializePersistentBrowserSessionMode(values []PersistentBrowserSessionMode) []string { + 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/person.go b/src/internal/connector/graph/betasdk/models/person.go new file mode 100644 index 000000000..b970a44aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person.go @@ -0,0 +1,594 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Person provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Person struct { + Entity + // The person's birthday. + birthday *string + // The name of the person's company. + companyName *string + // The person's department. + department *string + // The person's display name. + displayName *string + // The person's email addresses. + emailAddresses []RankedEmailAddressable + // The person's given name. + givenName *string + // true if the user has flagged this person as a favorite. + isFavorite *bool + // The type of mailbox that is represented by the person's email address. + mailboxType *string + // The location of the person's office. + officeLocation *string + // Free-form notes that the user has taken about this person. + personNotes *string + // The type of person, for example distribution list. + personType *string + // The person's phone numbers. + phones []Phoneable + // The person's addresses. + postalAddresses []Locationable + // The person's profession. + profession *string + // The sources the user data comes from, for example Directory or Outlook Contacts. + sources []PersonDataSourceable + // The person's surname. + surname *string + // The person's title. + title *string + // The user principal name (UPN) of the person. The UPN is an Internet-style login name for the person based on the Internet standard RFC 822. By convention, this should map to the person's email name. The general format is alias@domain. + userPrincipalName *string + // The person's websites. + websites []Websiteable + // The phonetic Japanese name of the person's company. + yomiCompany *string +} +// NewPerson instantiates a new person and sets the default values. +func NewPerson()(*Person) { + m := &Person{ + Entity: *NewEntity(), + } + return m +} +// CreatePersonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPerson(), nil +} +// GetBirthday gets the birthday property value. The person's birthday. +func (m *Person) GetBirthday()(*string) { + return m.birthday +} +// GetCompanyName gets the companyName property value. The name of the person's company. +func (m *Person) GetCompanyName()(*string) { + return m.companyName +} +// GetDepartment gets the department property value. The person's department. +func (m *Person) GetDepartment()(*string) { + return m.department +} +// GetDisplayName gets the displayName property value. The person's display name. +func (m *Person) GetDisplayName()(*string) { + return m.displayName +} +// GetEmailAddresses gets the emailAddresses property value. The person's email addresses. +func (m *Person) GetEmailAddresses()([]RankedEmailAddressable) { + return m.emailAddresses +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Person) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["birthday"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBirthday(val) + } + return nil + } + res["companyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCompanyName(val) + } + return nil + } + res["department"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDepartment(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRankedEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RankedEmailAddressable, len(val)) + for i, v := range val { + res[i] = v.(RankedEmailAddressable) + } + m.SetEmailAddresses(res) + } + return nil + } + res["givenName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGivenName(val) + } + return nil + } + res["isFavorite"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFavorite(val) + } + return nil + } + res["mailboxType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMailboxType(val) + } + return nil + } + res["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeLocation(val) + } + return nil + } + res["personNotes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonNotes(val) + } + return nil + } + res["personType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPersonType(val) + } + return nil + } + res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetPhones(res) + } + return nil + } + res["postalAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Locationable, len(val)) + for i, v := range val { + res[i] = v.(Locationable) + } + m.SetPostalAddresses(res) + } + return nil + } + res["profession"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProfession(val) + } + return nil + } + res["sources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(PersonDataSourceable) + } + m.SetSources(res) + } + return nil + } + res["surname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSurname(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["websites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWebsiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Websiteable, len(val)) + for i, v := range val { + res[i] = v.(Websiteable) + } + m.SetWebsites(res) + } + return nil + } + res["yomiCompany"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetYomiCompany(val) + } + return nil + } + return res +} +// GetGivenName gets the givenName property value. The person's given name. +func (m *Person) GetGivenName()(*string) { + return m.givenName +} +// GetIsFavorite gets the isFavorite property value. true if the user has flagged this person as a favorite. +func (m *Person) GetIsFavorite()(*bool) { + return m.isFavorite +} +// GetMailboxType gets the mailboxType property value. The type of mailbox that is represented by the person's email address. +func (m *Person) GetMailboxType()(*string) { + return m.mailboxType +} +// GetOfficeLocation gets the officeLocation property value. The location of the person's office. +func (m *Person) GetOfficeLocation()(*string) { + return m.officeLocation +} +// GetPersonNotes gets the personNotes property value. Free-form notes that the user has taken about this person. +func (m *Person) GetPersonNotes()(*string) { + return m.personNotes +} +// GetPersonType gets the personType property value. The type of person, for example distribution list. +func (m *Person) GetPersonType()(*string) { + return m.personType +} +// GetPhones gets the phones property value. The person's phone numbers. +func (m *Person) GetPhones()([]Phoneable) { + return m.phones +} +// GetPostalAddresses gets the postalAddresses property value. The person's addresses. +func (m *Person) GetPostalAddresses()([]Locationable) { + return m.postalAddresses +} +// GetProfession gets the profession property value. The person's profession. +func (m *Person) GetProfession()(*string) { + return m.profession +} +// GetSources gets the sources property value. The sources the user data comes from, for example Directory or Outlook Contacts. +func (m *Person) GetSources()([]PersonDataSourceable) { + return m.sources +} +// GetSurname gets the surname property value. The person's surname. +func (m *Person) GetSurname()(*string) { + return m.surname +} +// GetTitle gets the title property value. The person's title. +func (m *Person) GetTitle()(*string) { + return m.title +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the person. The UPN is an Internet-style login name for the person based on the Internet standard RFC 822. By convention, this should map to the person's email name. The general format is alias@domain. +func (m *Person) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetWebsites gets the websites property value. The person's websites. +func (m *Person) GetWebsites()([]Websiteable) { + return m.websites +} +// GetYomiCompany gets the yomiCompany property value. The phonetic Japanese name of the person's company. +func (m *Person) GetYomiCompany()(*string) { + return m.yomiCompany +} +// Serialize serializes information the current object +func (m *Person) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("birthday", m.GetBirthday()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("companyName", m.GetCompanyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("department", m.GetDepartment()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEmailAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailAddresses())) + for i, v := range m.GetEmailAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailAddresses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("givenName", m.GetGivenName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFavorite", m.GetIsFavorite()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mailboxType", m.GetMailboxType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("officeLocation", m.GetOfficeLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("personNotes", m.GetPersonNotes()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("personType", m.GetPersonType()) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + if m.GetPostalAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPostalAddresses())) + for i, v := range m.GetPostalAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("postalAddresses", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("profession", m.GetProfession()) + if err != nil { + return err + } + } + if m.GetSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSources())) + for i, v := range m.GetSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("surname", m.GetSurname()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + if m.GetWebsites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebsites())) + for i, v := range m.GetWebsites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("websites", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("yomiCompany", m.GetYomiCompany()) + if err != nil { + return err + } + } + return nil +} +// SetBirthday sets the birthday property value. The person's birthday. +func (m *Person) SetBirthday(value *string)() { + m.birthday = value +} +// SetCompanyName sets the companyName property value. The name of the person's company. +func (m *Person) SetCompanyName(value *string)() { + m.companyName = value +} +// SetDepartment sets the department property value. The person's department. +func (m *Person) SetDepartment(value *string)() { + m.department = value +} +// SetDisplayName sets the displayName property value. The person's display name. +func (m *Person) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmailAddresses sets the emailAddresses property value. The person's email addresses. +func (m *Person) SetEmailAddresses(value []RankedEmailAddressable)() { + m.emailAddresses = value +} +// SetGivenName sets the givenName property value. The person's given name. +func (m *Person) SetGivenName(value *string)() { + m.givenName = value +} +// SetIsFavorite sets the isFavorite property value. true if the user has flagged this person as a favorite. +func (m *Person) SetIsFavorite(value *bool)() { + m.isFavorite = value +} +// SetMailboxType sets the mailboxType property value. The type of mailbox that is represented by the person's email address. +func (m *Person) SetMailboxType(value *string)() { + m.mailboxType = value +} +// SetOfficeLocation sets the officeLocation property value. The location of the person's office. +func (m *Person) SetOfficeLocation(value *string)() { + m.officeLocation = value +} +// SetPersonNotes sets the personNotes property value. Free-form notes that the user has taken about this person. +func (m *Person) SetPersonNotes(value *string)() { + m.personNotes = value +} +// SetPersonType sets the personType property value. The type of person, for example distribution list. +func (m *Person) SetPersonType(value *string)() { + m.personType = value +} +// SetPhones sets the phones property value. The person's phone numbers. +func (m *Person) SetPhones(value []Phoneable)() { + m.phones = value +} +// SetPostalAddresses sets the postalAddresses property value. The person's addresses. +func (m *Person) SetPostalAddresses(value []Locationable)() { + m.postalAddresses = value +} +// SetProfession sets the profession property value. The person's profession. +func (m *Person) SetProfession(value *string)() { + m.profession = value +} +// SetSources sets the sources property value. The sources the user data comes from, for example Directory or Outlook Contacts. +func (m *Person) SetSources(value []PersonDataSourceable)() { + m.sources = value +} +// SetSurname sets the surname property value. The person's surname. +func (m *Person) SetSurname(value *string)() { + m.surname = value +} +// SetTitle sets the title property value. The person's title. +func (m *Person) SetTitle(value *string)() { + m.title = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the person. The UPN is an Internet-style login name for the person based on the Internet standard RFC 822. By convention, this should map to the person's email name. The general format is alias@domain. +func (m *Person) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetWebsites sets the websites property value. The person's websites. +func (m *Person) SetWebsites(value []Websiteable)() { + m.websites = value +} +// SetYomiCompany sets the yomiCompany property value. The phonetic Japanese name of the person's company. +func (m *Person) SetYomiCompany(value *string)() { + m.yomiCompany = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_annotation.go b/src/internal/connector/graph/betasdk/models/person_annotation.go new file mode 100644 index 000000000..da50a9851 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annotation.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnotation +type PersonAnnotation struct { + ItemFacet + // Contains the detail of the note itself. + detail ItemBodyable + // Contains a friendly name for the note. + displayName *string + // The thumbnailUrl property + thumbnailUrl *string +} +// NewPersonAnnotation instantiates a new PersonAnnotation and sets the default values. +func NewPersonAnnotation()(*PersonAnnotation) { + m := &PersonAnnotation{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personAnnotation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonAnnotationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAnnotationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAnnotation(), nil +} +// GetDetail gets the detail property value. Contains the detail of the note itself. +func (m *PersonAnnotation) GetDetail()(ItemBodyable) { + return m.detail +} +// GetDisplayName gets the displayName property value. Contains a friendly name for the note. +func (m *PersonAnnotation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAnnotation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(ItemBodyable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + return res +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonAnnotation) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// Serialize serializes information the current object +func (m *PersonAnnotation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDetail sets the detail property value. Contains the detail of the note itself. +func (m *PersonAnnotation) SetDetail(value ItemBodyable)() { + m.detail = value +} +// SetDisplayName sets the displayName property value. Contains a friendly name for the note. +func (m *PersonAnnotation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonAnnotation) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_annotation_collection_response.go b/src/internal/connector/graph/betasdk/models/person_annotation_collection_response.go new file mode 100644 index 000000000..7bbec1c60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annotation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnotationCollectionResponse +type PersonAnnotationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonAnnotationable +} +// NewPersonAnnotationCollectionResponse instantiates a new PersonAnnotationCollectionResponse and sets the default values. +func NewPersonAnnotationCollectionResponse()(*PersonAnnotationCollectionResponse) { + m := &PersonAnnotationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonAnnotationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAnnotationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAnnotationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAnnotationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAnnotationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAnnotationable, len(val)) + for i, v := range val { + res[i] = v.(PersonAnnotationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonAnnotationCollectionResponse) GetValue()([]PersonAnnotationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonAnnotationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonAnnotationCollectionResponse) SetValue(value []PersonAnnotationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_annotation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_annotation_collection_responseable.go new file mode 100644 index 000000000..48fd6882f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annotation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnotationCollectionResponseable +type PersonAnnotationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonAnnotationable) + SetValue(value []PersonAnnotationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_annotationable.go b/src/internal/connector/graph/betasdk/models/person_annotationable.go new file mode 100644 index 000000000..7481af84a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annotationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnotationable +type PersonAnnotationable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(ItemBodyable) + GetDisplayName()(*string) + GetThumbnailUrl()(*string) + SetDetail(value ItemBodyable)() + SetDisplayName(value *string)() + SetThumbnailUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_annual_event.go b/src/internal/connector/graph/betasdk/models/person_annual_event.go new file mode 100644 index 000000000..4447fd240 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annual_event.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnualEvent +type PersonAnnualEvent struct { + ItemFacet + // The date property + date *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The displayName property + displayName *string + // The type property + type_escaped *PersonAnnualEventType +} +// NewPersonAnnualEvent instantiates a new PersonAnnualEvent and sets the default values. +func NewPersonAnnualEvent()(*PersonAnnualEvent) { + m := &PersonAnnualEvent{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personAnnualEvent"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonAnnualEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAnnualEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAnnualEvent(), nil +} +// GetDate gets the date property value. The date property +func (m *PersonAnnualEvent) GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.date +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PersonAnnualEvent) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAnnualEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["date"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDate(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePersonAnnualEventType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PersonAnnualEventType)) + } + return nil + } + return res +} +// GetType gets the type property value. The type property +func (m *PersonAnnualEvent) GetType()(*PersonAnnualEventType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *PersonAnnualEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("date", m.GetDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err = writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDate sets the date property value. The date property +func (m *PersonAnnualEvent) SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.date = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PersonAnnualEvent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetType sets the type property value. The type property +func (m *PersonAnnualEvent) SetType(value *PersonAnnualEventType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_annual_event_collection_response.go b/src/internal/connector/graph/betasdk/models/person_annual_event_collection_response.go new file mode 100644 index 000000000..c43775d4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annual_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnualEventCollectionResponse +type PersonAnnualEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonAnnualEventable +} +// NewPersonAnnualEventCollectionResponse instantiates a new PersonAnnualEventCollectionResponse and sets the default values. +func NewPersonAnnualEventCollectionResponse()(*PersonAnnualEventCollectionResponse) { + m := &PersonAnnualEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonAnnualEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAnnualEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAnnualEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAnnualEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAnnualEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAnnualEventable, len(val)) + for i, v := range val { + res[i] = v.(PersonAnnualEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonAnnualEventCollectionResponse) GetValue()([]PersonAnnualEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonAnnualEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonAnnualEventCollectionResponse) SetValue(value []PersonAnnualEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_annual_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_annual_event_collection_responseable.go new file mode 100644 index 000000000..77503fa13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annual_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnualEventCollectionResponseable +type PersonAnnualEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonAnnualEventable) + SetValue(value []PersonAnnualEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_annual_event_type.go b/src/internal/connector/graph/betasdk/models/person_annual_event_type.go new file mode 100644 index 000000000..6b518c556 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annual_event_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PersonAnnualEventType int + +const ( + BIRTHDAY_PERSONANNUALEVENTTYPE PersonAnnualEventType = iota + WEDDING_PERSONANNUALEVENTTYPE + WORK_PERSONANNUALEVENTTYPE + OTHER_PERSONANNUALEVENTTYPE + UNKNOWNFUTUREVALUE_PERSONANNUALEVENTTYPE +) + +func (i PersonAnnualEventType) String() string { + return []string{"birthday", "wedding", "work", "other", "unknownFutureValue"}[i] +} +func ParsePersonAnnualEventType(v string) (interface{}, error) { + result := BIRTHDAY_PERSONANNUALEVENTTYPE + switch v { + case "birthday": + result = BIRTHDAY_PERSONANNUALEVENTTYPE + case "wedding": + result = WEDDING_PERSONANNUALEVENTTYPE + case "work": + result = WORK_PERSONANNUALEVENTTYPE + case "other": + result = OTHER_PERSONANNUALEVENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PERSONANNUALEVENTTYPE + default: + return 0, errors.New("Unknown PersonAnnualEventType value: " + v) + } + return &result, nil +} +func SerializePersonAnnualEventType(values []PersonAnnualEventType) []string { + 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/person_annual_eventable.go b/src/internal/connector/graph/betasdk/models/person_annual_eventable.go new file mode 100644 index 000000000..25d1c9a26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_annual_eventable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAnnualEventable +type PersonAnnualEventable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetDisplayName()(*string) + GetType()(*PersonAnnualEventType) + SetDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetDisplayName(value *string)() + SetType(value *PersonAnnualEventType)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_award.go b/src/internal/connector/graph/betasdk/models/person_award.go new file mode 100644 index 000000000..99630c7f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_award.go @@ -0,0 +1,192 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAward +type PersonAward struct { + ItemFacet + // Descpription of the award or honor. + description *string + // Name of the award or honor. + displayName *string + // The date that the award or honor was granted. + issuedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Authority which granted the award or honor. + issuingAuthority *string + // URL referencing a thumbnail of the award or honor. + thumbnailUrl *string + // URL referencing the award or honor. + webUrl *string +} +// NewPersonAward instantiates a new PersonAward and sets the default values. +func NewPersonAward()(*PersonAward) { + m := &PersonAward{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personAward"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonAwardFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAwardFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAward(), nil +} +// GetDescription gets the description property value. Descpription of the award or honor. +func (m *PersonAward) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the award or honor. +func (m *PersonAward) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAward) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["issuedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuedDate(val) + } + return nil + } + res["issuingAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuingAuthority(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetIssuedDate gets the issuedDate property value. The date that the award or honor was granted. +func (m *PersonAward) GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.issuedDate +} +// GetIssuingAuthority gets the issuingAuthority property value. Authority which granted the award or honor. +func (m *PersonAward) GetIssuingAuthority()(*string) { + return m.issuingAuthority +} +// GetThumbnailUrl gets the thumbnailUrl property value. URL referencing a thumbnail of the award or honor. +func (m *PersonAward) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. URL referencing the award or honor. +func (m *PersonAward) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PersonAward) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("issuedDate", m.GetIssuedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuingAuthority", m.GetIssuingAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Descpription of the award or honor. +func (m *PersonAward) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the award or honor. +func (m *PersonAward) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIssuedDate sets the issuedDate property value. The date that the award or honor was granted. +func (m *PersonAward) SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.issuedDate = value +} +// SetIssuingAuthority sets the issuingAuthority property value. Authority which granted the award or honor. +func (m *PersonAward) SetIssuingAuthority(value *string)() { + m.issuingAuthority = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. URL referencing a thumbnail of the award or honor. +func (m *PersonAward) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. URL referencing the award or honor. +func (m *PersonAward) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_award_collection_response.go b/src/internal/connector/graph/betasdk/models/person_award_collection_response.go new file mode 100644 index 000000000..166ddb601 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_award_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAwardCollectionResponse +type PersonAwardCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonAwardable +} +// NewPersonAwardCollectionResponse instantiates a new PersonAwardCollectionResponse and sets the default values. +func NewPersonAwardCollectionResponse()(*PersonAwardCollectionResponse) { + m := &PersonAwardCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonAwardCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonAwardCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonAwardCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonAwardCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAwardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAwardable, len(val)) + for i, v := range val { + res[i] = v.(PersonAwardable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonAwardCollectionResponse) GetValue()([]PersonAwardable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonAwardCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonAwardCollectionResponse) SetValue(value []PersonAwardable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_award_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_award_collection_responseable.go new file mode 100644 index 000000000..4055ba785 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_award_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAwardCollectionResponseable +type PersonAwardCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonAwardable) + SetValue(value []PersonAwardable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_awardable.go b/src/internal/connector/graph/betasdk/models/person_awardable.go new file mode 100644 index 000000000..77ea82b9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_awardable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonAwardable +type PersonAwardable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetIssuingAuthority()(*string) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetIssuingAuthority(value *string)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_certification.go b/src/internal/connector/graph/betasdk/models/person_certification.go new file mode 100644 index 000000000..26ef32d94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_certification.go @@ -0,0 +1,296 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCertification +type PersonCertification struct { + ItemFacet + // The referenceable identifier for the certification. + certificationId *string + // Description of the certification. + description *string + // Title of the certification. + displayName *string + // The date that the certification expires. + endDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The date that the certification was issued. + issuedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Authority which granted the certification. + issuingAuthority *string + // Company which granted the certification. + issuingCompany *string + // The date that the certification became valid. + startDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // URL referencing a thumbnail of the certification. + thumbnailUrl *string + // URL referencing the certification. + webUrl *string +} +// NewPersonCertification instantiates a new PersonCertification and sets the default values. +func NewPersonCertification()(*PersonCertification) { + m := &PersonCertification{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personCertification"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonCertificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonCertificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonCertification(), nil +} +// GetCertificationId gets the certificationId property value. The referenceable identifier for the certification. +func (m *PersonCertification) GetCertificationId()(*string) { + return m.certificationId +} +// GetDescription gets the description property value. Description of the certification. +func (m *PersonCertification) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Title of the certification. +func (m *PersonCertification) GetDisplayName()(*string) { + return m.displayName +} +// GetEndDate gets the endDate property value. The date that the certification expires. +func (m *PersonCertification) GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonCertification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["certificationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificationId(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDate(val) + } + return nil + } + res["issuedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuedDate(val) + } + return nil + } + res["issuingAuthority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuingAuthority(val) + } + return nil + } + res["issuingCompany"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuingCompany(val) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetIssuedDate gets the issuedDate property value. The date that the certification was issued. +func (m *PersonCertification) GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.issuedDate +} +// GetIssuingAuthority gets the issuingAuthority property value. Authority which granted the certification. +func (m *PersonCertification) GetIssuingAuthority()(*string) { + return m.issuingAuthority +} +// GetIssuingCompany gets the issuingCompany property value. Company which granted the certification. +func (m *PersonCertification) GetIssuingCompany()(*string) { + return m.issuingCompany +} +// GetStartDate gets the startDate property value. The date that the certification became valid. +func (m *PersonCertification) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startDate +} +// GetThumbnailUrl gets the thumbnailUrl property value. URL referencing a thumbnail of the certification. +func (m *PersonCertification) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. URL referencing the certification. +func (m *PersonCertification) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PersonCertification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificationId", m.GetCertificationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("endDate", m.GetEndDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("issuedDate", m.GetIssuedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuingAuthority", m.GetIssuingAuthority()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("issuingCompany", m.GetIssuingCompany()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCertificationId sets the certificationId property value. The referenceable identifier for the certification. +func (m *PersonCertification) SetCertificationId(value *string)() { + m.certificationId = value +} +// SetDescription sets the description property value. Description of the certification. +func (m *PersonCertification) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Title of the certification. +func (m *PersonCertification) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndDate sets the endDate property value. The date that the certification expires. +func (m *PersonCertification) SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endDate = value +} +// SetIssuedDate sets the issuedDate property value. The date that the certification was issued. +func (m *PersonCertification) SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.issuedDate = value +} +// SetIssuingAuthority sets the issuingAuthority property value. Authority which granted the certification. +func (m *PersonCertification) SetIssuingAuthority(value *string)() { + m.issuingAuthority = value +} +// SetIssuingCompany sets the issuingCompany property value. Company which granted the certification. +func (m *PersonCertification) SetIssuingCompany(value *string)() { + m.issuingCompany = value +} +// SetStartDate sets the startDate property value. The date that the certification became valid. +func (m *PersonCertification) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startDate = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. URL referencing a thumbnail of the certification. +func (m *PersonCertification) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. URL referencing the certification. +func (m *PersonCertification) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_certification_collection_response.go b/src/internal/connector/graph/betasdk/models/person_certification_collection_response.go new file mode 100644 index 000000000..075bd43e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_certification_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCertificationCollectionResponse +type PersonCertificationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonCertificationable +} +// NewPersonCertificationCollectionResponse instantiates a new PersonCertificationCollectionResponse and sets the default values. +func NewPersonCertificationCollectionResponse()(*PersonCertificationCollectionResponse) { + m := &PersonCertificationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonCertificationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonCertificationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonCertificationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonCertificationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonCertificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonCertificationable, len(val)) + for i, v := range val { + res[i] = v.(PersonCertificationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonCertificationCollectionResponse) GetValue()([]PersonCertificationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonCertificationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonCertificationCollectionResponse) SetValue(value []PersonCertificationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_certification_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_certification_collection_responseable.go new file mode 100644 index 000000000..0b1cd26f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_certification_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCertificationCollectionResponseable +type PersonCertificationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonCertificationable) + SetValue(value []PersonCertificationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_certificationable.go b/src/internal/connector/graph/betasdk/models/person_certificationable.go new file mode 100644 index 000000000..8af4e9298 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_certificationable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCertificationable +type PersonCertificationable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCertificationId()(*string) + GetDescription()(*string) + GetDisplayName()(*string) + GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetIssuedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetIssuingAuthority()(*string) + GetIssuingCompany()(*string) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetCertificationId(value *string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetIssuedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetIssuingAuthority(value *string)() + SetIssuingCompany(value *string)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_collection_response.go b/src/internal/connector/graph/betasdk/models/person_collection_response.go new file mode 100644 index 000000000..7dc84c52d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCollectionResponse +type PersonCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Personable +} +// NewPersonCollectionResponse instantiates a new PersonCollectionResponse and sets the default values. +func NewPersonCollectionResponse()(*PersonCollectionResponse) { + m := &PersonCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Personable, len(val)) + for i, v := range val { + res[i] = v.(Personable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonCollectionResponse) GetValue()([]Personable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonCollectionResponse) SetValue(value []Personable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_collection_responseable.go new file mode 100644 index 000000000..f968f7c01 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonCollectionResponseable +type PersonCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Personable) + SetValue(value []Personable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_source.go b/src/internal/connector/graph/betasdk/models/person_data_source.go new file mode 100644 index 000000000..e33b7889d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_source.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSource +type PersonDataSource 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 OdataType property + odataType *string + // The type of data source. + type_escaped *string +} +// NewPersonDataSource instantiates a new personDataSource and sets the default values. +func NewPersonDataSource()(*PersonDataSource) { + m := &PersonDataSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePersonDataSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonDataSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonDataSource(), 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 *PersonDataSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonDataSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PersonDataSource) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of data source. +func (m *PersonDataSource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *PersonDataSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *PersonDataSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PersonDataSource) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of data source. +func (m *PersonDataSource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_source_collection_response.go b/src/internal/connector/graph/betasdk/models/person_data_source_collection_response.go new file mode 100644 index 000000000..5518df5c7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_source_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSourceCollectionResponse +type PersonDataSourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonDataSourceable +} +// NewPersonDataSourceCollectionResponse instantiates a new PersonDataSourceCollectionResponse and sets the default values. +func NewPersonDataSourceCollectionResponse()(*PersonDataSourceCollectionResponse) { + m := &PersonDataSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonDataSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonDataSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonDataSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonDataSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(PersonDataSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonDataSourceCollectionResponse) GetValue()([]PersonDataSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonDataSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonDataSourceCollectionResponse) SetValue(value []PersonDataSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_data_source_collection_responseable.go new file mode 100644 index 000000000..5084f774a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_source_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSourceCollectionResponseable +type PersonDataSourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonDataSourceable) + SetValue(value []PersonDataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_sourceable.go b/src/internal/connector/graph/betasdk/models/person_data_sourceable.go new file mode 100644 index 000000000..88fab969f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_sourceable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSourceable +type PersonDataSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*string) + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_sources.go b/src/internal/connector/graph/betasdk/models/person_data_sources.go new file mode 100644 index 000000000..870a7d748 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_sources.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSources +type PersonDataSources 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 OdataType property + odataType *string + // The type property + type_escaped []string +} +// NewPersonDataSources instantiates a new personDataSources and sets the default values. +func NewPersonDataSources()(*PersonDataSources) { + m := &PersonDataSources{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePersonDataSourcesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonDataSourcesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonDataSources(), 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 *PersonDataSources) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonDataSources) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetType(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PersonDataSources) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *PersonDataSources) GetType()([]string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *PersonDataSources) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + err := writer.WriteCollectionOfStringValues("type", m.GetType()) + 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 *PersonDataSources) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PersonDataSources) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *PersonDataSources) SetType(value []string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_data_sourcesable.go b/src/internal/connector/graph/betasdk/models/person_data_sourcesable.go new file mode 100644 index 000000000..a1c56f6ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_data_sourcesable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonDataSourcesable +type PersonDataSourcesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()([]string) + SetOdataType(value *string)() + SetType(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_extension.go b/src/internal/connector/graph/betasdk/models/person_extension.go new file mode 100644 index 000000000..3e5e3ccb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_extension.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonExtension +type PersonExtension struct { + Extension +} +// NewPersonExtension instantiates a new PersonExtension and sets the default values. +func NewPersonExtension()(*PersonExtension) { + m := &PersonExtension{ + Extension: *NewExtension(), + } + odataTypeValue := "#microsoft.graph.personExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonExtension(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Extension.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *PersonExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Extension.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/person_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/person_extension_collection_response.go new file mode 100644 index 000000000..7820e5ae8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonExtensionCollectionResponse +type PersonExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonExtensionable +} +// NewPersonExtensionCollectionResponse instantiates a new PersonExtensionCollectionResponse and sets the default values. +func NewPersonExtensionCollectionResponse()(*PersonExtensionCollectionResponse) { + m := &PersonExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonExtensionable, len(val)) + for i, v := range val { + res[i] = v.(PersonExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonExtensionCollectionResponse) GetValue()([]PersonExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonExtensionCollectionResponse) SetValue(value []PersonExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_extension_collection_responseable.go new file mode 100644 index 000000000..8bc758741 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonExtensionCollectionResponseable +type PersonExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonExtensionable) + SetValue(value []PersonExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_extensionable.go b/src/internal/connector/graph/betasdk/models/person_extensionable.go new file mode 100644 index 000000000..095c59185 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_extensionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonExtensionable +type PersonExtensionable interface { + Extensionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/person_interest.go b/src/internal/connector/graph/betasdk/models/person_interest.go new file mode 100644 index 000000000..0c0753303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_interest.go @@ -0,0 +1,200 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonInterest +type PersonInterest struct { + ItemFacet + // Contains categories a user has associated with the interest (for example, personal, recipies). + categories []string + // Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. + collaborationTags []string + // Contains a description of the interest. + description *string + // Contains a friendly name for the interest. + displayName *string + // The thumbnailUrl property + thumbnailUrl *string + // Contains a link to a web page or resource about the interest. + webUrl *string +} +// NewPersonInterest instantiates a new PersonInterest and sets the default values. +func NewPersonInterest()(*PersonInterest) { + m := &PersonInterest{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personInterest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonInterestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonInterestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonInterest(), nil +} +// GetCategories gets the categories property value. Contains categories a user has associated with the interest (for example, personal, recipies). +func (m *PersonInterest) GetCategories()([]string) { + return m.categories +} +// GetCollaborationTags gets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *PersonInterest) GetCollaborationTags()([]string) { + return m.collaborationTags +} +// GetDescription gets the description property value. Contains a description of the interest. +func (m *PersonInterest) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Contains a friendly name for the interest. +func (m *PersonInterest) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonInterest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["collaborationTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCollaborationTags(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonInterest) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. Contains a link to a web page or resource about the interest. +func (m *PersonInterest) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PersonInterest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + if m.GetCollaborationTags() != nil { + err = writer.WriteCollectionOfStringValues("collaborationTags", m.GetCollaborationTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. Contains categories a user has associated with the interest (for example, personal, recipies). +func (m *PersonInterest) SetCategories(value []string)() { + m.categories = value +} +// SetCollaborationTags sets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *PersonInterest) SetCollaborationTags(value []string)() { + m.collaborationTags = value +} +// SetDescription sets the description property value. Contains a description of the interest. +func (m *PersonInterest) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Contains a friendly name for the interest. +func (m *PersonInterest) SetDisplayName(value *string)() { + m.displayName = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonInterest) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. Contains a link to a web page or resource about the interest. +func (m *PersonInterest) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_interest_collection_response.go b/src/internal/connector/graph/betasdk/models/person_interest_collection_response.go new file mode 100644 index 000000000..5982d92d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_interest_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonInterestCollectionResponse +type PersonInterestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonInterestable +} +// NewPersonInterestCollectionResponse instantiates a new PersonInterestCollectionResponse and sets the default values. +func NewPersonInterestCollectionResponse()(*PersonInterestCollectionResponse) { + m := &PersonInterestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonInterestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonInterestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonInterestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonInterestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonInterestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonInterestable, len(val)) + for i, v := range val { + res[i] = v.(PersonInterestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonInterestCollectionResponse) GetValue()([]PersonInterestable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonInterestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonInterestCollectionResponse) SetValue(value []PersonInterestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_interest_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_interest_collection_responseable.go new file mode 100644 index 000000000..286258714 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_interest_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonInterestCollectionResponseable +type PersonInterestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonInterestable) + SetValue(value []PersonInterestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_interestable.go b/src/internal/connector/graph/betasdk/models/person_interestable.go new file mode 100644 index 000000000..9ef2cdea8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_interestable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonInterestable +type PersonInterestable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]string) + GetCollaborationTags()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetCategories(value []string)() + SetCollaborationTags(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_name.go b/src/internal/connector/graph/betasdk/models/person_name.go new file mode 100644 index 000000000..f839c796a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_name.go @@ -0,0 +1,322 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonName +type PersonName struct { + ItemFacet + // Provides an ordered rendering of firstName and lastName depending on the locale of the user or their device. + displayName *string + // First name of the user. + first *string + // Initials of the user. + initials *string + // Contains the name for the language (en-US, no-NB, en-AU) following IETF BCP47 format. + languageTag *string + // Last name of the user. + last *string + // Maiden name of the user. + maiden *string + // Middle name of the user. + middle *string + // Nickname of the user. + nickname *string + // Guidance on how to pronounce the users name. + pronunciation PersonNamePronounciationable + // Designators used after the users name (eg: PhD.) + suffix *string + // Honorifics used to prefix a users name (eg: Dr, Sir, Madam, Mrs.) + title *string +} +// NewPersonName instantiates a new PersonName and sets the default values. +func NewPersonName()(*PersonName) { + m := &PersonName{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personName"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonNameFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonNameFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonName(), nil +} +// GetDisplayName gets the displayName property value. Provides an ordered rendering of firstName and lastName depending on the locale of the user or their device. +func (m *PersonName) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonName) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["first"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirst(val) + } + return nil + } + res["initials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitials(val) + } + return nil + } + 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["last"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLast(val) + } + return nil + } + res["maiden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaiden(val) + } + return nil + } + res["middle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddle(val) + } + return nil + } + res["nickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNickname(val) + } + return nil + } + res["pronunciation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePersonNamePronounciationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPronunciation(val.(PersonNamePronounciationable)) + } + return nil + } + res["suffix"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSuffix(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetFirst gets the first property value. First name of the user. +func (m *PersonName) GetFirst()(*string) { + return m.first +} +// GetInitials gets the initials property value. Initials of the user. +func (m *PersonName) GetInitials()(*string) { + return m.initials +} +// GetLanguageTag gets the languageTag property value. Contains the name for the language (en-US, no-NB, en-AU) following IETF BCP47 format. +func (m *PersonName) GetLanguageTag()(*string) { + return m.languageTag +} +// GetLast gets the last property value. Last name of the user. +func (m *PersonName) GetLast()(*string) { + return m.last +} +// GetMaiden gets the maiden property value. Maiden name of the user. +func (m *PersonName) GetMaiden()(*string) { + return m.maiden +} +// GetMiddle gets the middle property value. Middle name of the user. +func (m *PersonName) GetMiddle()(*string) { + return m.middle +} +// GetNickname gets the nickname property value. Nickname of the user. +func (m *PersonName) GetNickname()(*string) { + return m.nickname +} +// GetPronunciation gets the pronunciation property value. Guidance on how to pronounce the users name. +func (m *PersonName) GetPronunciation()(PersonNamePronounciationable) { + return m.pronunciation +} +// GetSuffix gets the suffix property value. Designators used after the users name (eg: PhD.) +func (m *PersonName) GetSuffix()(*string) { + return m.suffix +} +// GetTitle gets the title property value. Honorifics used to prefix a users name (eg: Dr, Sir, Madam, Mrs.) +func (m *PersonName) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *PersonName) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("first", m.GetFirst()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initials", m.GetInitials()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("last", m.GetLast()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("maiden", m.GetMaiden()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("middle", m.GetMiddle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("nickname", m.GetNickname()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("pronunciation", m.GetPronunciation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("suffix", m.GetSuffix()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Provides an ordered rendering of firstName and lastName depending on the locale of the user or their device. +func (m *PersonName) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFirst sets the first property value. First name of the user. +func (m *PersonName) SetFirst(value *string)() { + m.first = value +} +// SetInitials sets the initials property value. Initials of the user. +func (m *PersonName) SetInitials(value *string)() { + m.initials = value +} +// SetLanguageTag sets the languageTag property value. Contains the name for the language (en-US, no-NB, en-AU) following IETF BCP47 format. +func (m *PersonName) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetLast sets the last property value. Last name of the user. +func (m *PersonName) SetLast(value *string)() { + m.last = value +} +// SetMaiden sets the maiden property value. Maiden name of the user. +func (m *PersonName) SetMaiden(value *string)() { + m.maiden = value +} +// SetMiddle sets the middle property value. Middle name of the user. +func (m *PersonName) SetMiddle(value *string)() { + m.middle = value +} +// SetNickname sets the nickname property value. Nickname of the user. +func (m *PersonName) SetNickname(value *string)() { + m.nickname = value +} +// SetPronunciation sets the pronunciation property value. Guidance on how to pronounce the users name. +func (m *PersonName) SetPronunciation(value PersonNamePronounciationable)() { + m.pronunciation = value +} +// SetSuffix sets the suffix property value. Designators used after the users name (eg: PhD.) +func (m *PersonName) SetSuffix(value *string)() { + m.suffix = value +} +// SetTitle sets the title property value. Honorifics used to prefix a users name (eg: Dr, Sir, Madam, Mrs.) +func (m *PersonName) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_name_collection_response.go b/src/internal/connector/graph/betasdk/models/person_name_collection_response.go new file mode 100644 index 000000000..733823ed5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_name_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonNameCollectionResponse +type PersonNameCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonNameable +} +// NewPersonNameCollectionResponse instantiates a new PersonNameCollectionResponse and sets the default values. +func NewPersonNameCollectionResponse()(*PersonNameCollectionResponse) { + m := &PersonNameCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonNameCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonNameCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonNameCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonNameCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonNameable, len(val)) + for i, v := range val { + res[i] = v.(PersonNameable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonNameCollectionResponse) GetValue()([]PersonNameable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonNameCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonNameCollectionResponse) SetValue(value []PersonNameable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_name_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_name_collection_responseable.go new file mode 100644 index 000000000..f73612035 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_name_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonNameCollectionResponseable +type PersonNameCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonNameable) + SetValue(value []PersonNameable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_name_pronounciation.go b/src/internal/connector/graph/betasdk/models/person_name_pronounciation.go new file mode 100644 index 000000000..e8e5d7c85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_name_pronounciation.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonNamePronounciation +type PersonNamePronounciation 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 displayName property + displayName *string + // The first property + first *string + // The last property + last *string + // The maiden property + maiden *string + // The middle property + middle *string + // The OdataType property + odataType *string +} +// NewPersonNamePronounciation instantiates a new personNamePronounciation and sets the default values. +func NewPersonNamePronounciation()(*PersonNamePronounciation) { + m := &PersonNamePronounciation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePersonNamePronounciationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonNamePronounciationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonNamePronounciation(), 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 *PersonNamePronounciation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PersonNamePronounciation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonNamePronounciation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["first"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirst(val) + } + return nil + } + res["last"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLast(val) + } + return nil + } + res["maiden"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMaiden(val) + } + return nil + } + res["middle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMiddle(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 + } + return res +} +// GetFirst gets the first property value. The first property +func (m *PersonNamePronounciation) GetFirst()(*string) { + return m.first +} +// GetLast gets the last property value. The last property +func (m *PersonNamePronounciation) GetLast()(*string) { + return m.last +} +// GetMaiden gets the maiden property value. The maiden property +func (m *PersonNamePronounciation) GetMaiden()(*string) { + return m.maiden +} +// GetMiddle gets the middle property value. The middle property +func (m *PersonNamePronounciation) GetMiddle()(*string) { + return m.middle +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PersonNamePronounciation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PersonNamePronounciation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("first", m.GetFirst()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("last", m.GetLast()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("maiden", m.GetMaiden()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("middle", m.GetMiddle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PersonNamePronounciation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PersonNamePronounciation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFirst sets the first property value. The first property +func (m *PersonNamePronounciation) SetFirst(value *string)() { + m.first = value +} +// SetLast sets the last property value. The last property +func (m *PersonNamePronounciation) SetLast(value *string)() { + m.last = value +} +// SetMaiden sets the maiden property value. The maiden property +func (m *PersonNamePronounciation) SetMaiden(value *string)() { + m.maiden = value +} +// SetMiddle sets the middle property value. The middle property +func (m *PersonNamePronounciation) SetMiddle(value *string)() { + m.middle = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PersonNamePronounciation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_name_pronounciationable.go b/src/internal/connector/graph/betasdk/models/person_name_pronounciationable.go new file mode 100644 index 000000000..04288a185 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_name_pronounciationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonNamePronounciationable +type PersonNamePronounciationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetFirst()(*string) + GetLast()(*string) + GetMaiden()(*string) + GetMiddle()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetFirst(value *string)() + SetLast(value *string)() + SetMaiden(value *string)() + SetMiddle(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_nameable.go b/src/internal/connector/graph/betasdk/models/person_nameable.go new file mode 100644 index 000000000..461862d47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_nameable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonNameable +type PersonNameable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetFirst()(*string) + GetInitials()(*string) + GetLanguageTag()(*string) + GetLast()(*string) + GetMaiden()(*string) + GetMiddle()(*string) + GetNickname()(*string) + GetPronunciation()(PersonNamePronounciationable) + GetSuffix()(*string) + GetTitle()(*string) + SetDisplayName(value *string)() + SetFirst(value *string)() + SetInitials(value *string)() + SetLanguageTag(value *string)() + SetLast(value *string)() + SetMaiden(value *string)() + SetMiddle(value *string)() + SetNickname(value *string)() + SetPronunciation(value PersonNamePronounciationable)() + SetSuffix(value *string)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_or_group_column.go b/src/internal/connector/graph/betasdk/models/person_or_group_column.go new file mode 100644 index 000000000..073cf85a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_or_group_column.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonOrGroupColumn +type PersonOrGroupColumn 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 whether multiple values can be selected from the source. + allowMultipleSelection *bool + // Whether to allow selection of people only, or people and groups. Must be one of peopleAndGroups or peopleOnly. + chooseFromType *string + // How to display the information about the person or group chosen. See below. + displayAs *string + // The OdataType property + odataType *string +} +// NewPersonOrGroupColumn instantiates a new personOrGroupColumn and sets the default values. +func NewPersonOrGroupColumn()(*PersonOrGroupColumn) { + m := &PersonOrGroupColumn{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePersonOrGroupColumnFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonOrGroupColumnFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonOrGroupColumn(), 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 *PersonOrGroupColumn) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowMultipleSelection gets the allowMultipleSelection property value. Indicates whether multiple values can be selected from the source. +func (m *PersonOrGroupColumn) GetAllowMultipleSelection()(*bool) { + return m.allowMultipleSelection +} +// GetChooseFromType gets the chooseFromType property value. Whether to allow selection of people only, or people and groups. Must be one of peopleAndGroups or peopleOnly. +func (m *PersonOrGroupColumn) GetChooseFromType()(*string) { + return m.chooseFromType +} +// GetDisplayAs gets the displayAs property value. How to display the information about the person or group chosen. See below. +func (m *PersonOrGroupColumn) GetDisplayAs()(*string) { + return m.displayAs +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonOrGroupColumn) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowMultipleSelection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowMultipleSelection(val) + } + return nil + } + res["chooseFromType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChooseFromType(val) + } + return nil + } + res["displayAs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayAs(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PersonOrGroupColumn) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PersonOrGroupColumn) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allowMultipleSelection", m.GetAllowMultipleSelection()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("chooseFromType", m.GetChooseFromType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayAs", m.GetDisplayAs()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PersonOrGroupColumn) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowMultipleSelection sets the allowMultipleSelection property value. Indicates whether multiple values can be selected from the source. +func (m *PersonOrGroupColumn) SetAllowMultipleSelection(value *bool)() { + m.allowMultipleSelection = value +} +// SetChooseFromType sets the chooseFromType property value. Whether to allow selection of people only, or people and groups. Must be one of peopleAndGroups or peopleOnly. +func (m *PersonOrGroupColumn) SetChooseFromType(value *string)() { + m.chooseFromType = value +} +// SetDisplayAs sets the displayAs property value. How to display the information about the person or group chosen. See below. +func (m *PersonOrGroupColumn) SetDisplayAs(value *string)() { + m.displayAs = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PersonOrGroupColumn) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_or_group_columnable.go b/src/internal/connector/graph/betasdk/models/person_or_group_columnable.go new file mode 100644 index 000000000..be5490b90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_or_group_columnable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonOrGroupColumnable +type PersonOrGroupColumnable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowMultipleSelection()(*bool) + GetChooseFromType()(*string) + GetDisplayAs()(*string) + GetOdataType()(*string) + SetAllowMultipleSelection(value *bool)() + SetChooseFromType(value *string)() + SetDisplayAs(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_relationship.go b/src/internal/connector/graph/betasdk/models/person_relationship.go new file mode 100644 index 000000000..397e34f83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_relationship.go @@ -0,0 +1,76 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PersonRelationship int + +const ( + MANAGER_PERSONRELATIONSHIP PersonRelationship = iota + COLLEAGUE_PERSONRELATIONSHIP + DIRECTREPORT_PERSONRELATIONSHIP + DOTLINEREPORT_PERSONRELATIONSHIP + ASSISTANT_PERSONRELATIONSHIP + DOTLINEMANAGER_PERSONRELATIONSHIP + ALTERNATECONTACT_PERSONRELATIONSHIP + FRIEND_PERSONRELATIONSHIP + SPOUSE_PERSONRELATIONSHIP + SIBLING_PERSONRELATIONSHIP + CHILD_PERSONRELATIONSHIP + PARENT_PERSONRELATIONSHIP + SPONSOR_PERSONRELATIONSHIP + EMERGENCYCONTACT_PERSONRELATIONSHIP + OTHER_PERSONRELATIONSHIP + UNKNOWNFUTUREVALUE_PERSONRELATIONSHIP +) + +func (i PersonRelationship) String() string { + return []string{"manager", "colleague", "directReport", "dotLineReport", "assistant", "dotLineManager", "alternateContact", "friend", "spouse", "sibling", "child", "parent", "sponsor", "emergencyContact", "other", "unknownFutureValue"}[i] +} +func ParsePersonRelationship(v string) (interface{}, error) { + result := MANAGER_PERSONRELATIONSHIP + switch v { + case "manager": + result = MANAGER_PERSONRELATIONSHIP + case "colleague": + result = COLLEAGUE_PERSONRELATIONSHIP + case "directReport": + result = DIRECTREPORT_PERSONRELATIONSHIP + case "dotLineReport": + result = DOTLINEREPORT_PERSONRELATIONSHIP + case "assistant": + result = ASSISTANT_PERSONRELATIONSHIP + case "dotLineManager": + result = DOTLINEMANAGER_PERSONRELATIONSHIP + case "alternateContact": + result = ALTERNATECONTACT_PERSONRELATIONSHIP + case "friend": + result = FRIEND_PERSONRELATIONSHIP + case "spouse": + result = SPOUSE_PERSONRELATIONSHIP + case "sibling": + result = SIBLING_PERSONRELATIONSHIP + case "child": + result = CHILD_PERSONRELATIONSHIP + case "parent": + result = PARENT_PERSONRELATIONSHIP + case "sponsor": + result = SPONSOR_PERSONRELATIONSHIP + case "emergencyContact": + result = EMERGENCYCONTACT_PERSONRELATIONSHIP + case "other": + result = OTHER_PERSONRELATIONSHIP + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PERSONRELATIONSHIP + default: + return 0, errors.New("Unknown PersonRelationship value: " + v) + } + return &result, nil +} +func SerializePersonRelationship(values []PersonRelationship) []string { + 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/person_responsibility.go b/src/internal/connector/graph/betasdk/models/person_responsibility.go new file mode 100644 index 000000000..76f75d8c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_responsibility.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonResponsibility +type PersonResponsibility struct { + ItemFacet + // Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. + collaborationTags []string + // Description of the responsibility. + description *string + // Contains a friendly name for the responsibility. + displayName *string + // The thumbnailUrl property + thumbnailUrl *string + // Contains a link to a web page or resource about the responsibility. + webUrl *string +} +// NewPersonResponsibility instantiates a new PersonResponsibility and sets the default values. +func NewPersonResponsibility()(*PersonResponsibility) { + m := &PersonResponsibility{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personResponsibility"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonResponsibilityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonResponsibilityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonResponsibility(), nil +} +// GetCollaborationTags gets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *PersonResponsibility) GetCollaborationTags()([]string) { + return m.collaborationTags +} +// GetDescription gets the description property value. Description of the responsibility. +func (m *PersonResponsibility) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Contains a friendly name for the responsibility. +func (m *PersonResponsibility) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonResponsibility) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["collaborationTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCollaborationTags(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonResponsibility) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. Contains a link to a web page or resource about the responsibility. +func (m *PersonResponsibility) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PersonResponsibility) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + if m.GetCollaborationTags() != nil { + err = writer.WriteCollectionOfStringValues("collaborationTags", m.GetCollaborationTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCollaborationTags sets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *PersonResponsibility) SetCollaborationTags(value []string)() { + m.collaborationTags = value +} +// SetDescription sets the description property value. Description of the responsibility. +func (m *PersonResponsibility) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Contains a friendly name for the responsibility. +func (m *PersonResponsibility) SetDisplayName(value *string)() { + m.displayName = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonResponsibility) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. Contains a link to a web page or resource about the responsibility. +func (m *PersonResponsibility) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_responsibilityable.go b/src/internal/connector/graph/betasdk/models/person_responsibilityable.go new file mode 100644 index 000000000..d061b6ab1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_responsibilityable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonResponsibilityable +type PersonResponsibilityable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollaborationTags()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetCollaborationTags(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_website.go b/src/internal/connector/graph/betasdk/models/person_website.go new file mode 100644 index 000000000..99c49e93c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_website.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonWebsite +type PersonWebsite struct { + ItemFacet + // Contains categories a user has associated with the website (for example, personal, recipes). + categories []string + // Contains a description of the website. + description *string + // Contains a friendly name for the website. + displayName *string + // The thumbnailUrl property + thumbnailUrl *string + // Contains a link to the website itself. + webUrl *string +} +// NewPersonWebsite instantiates a new PersonWebsite and sets the default values. +func NewPersonWebsite()(*PersonWebsite) { + m := &PersonWebsite{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.personWebsite"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePersonWebsiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonWebsiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonWebsite(), nil +} +// GetCategories gets the categories property value. Contains categories a user has associated with the website (for example, personal, recipes). +func (m *PersonWebsite) GetCategories()([]string) { + return m.categories +} +// GetDescription gets the description property value. Contains a description of the website. +func (m *PersonWebsite) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Contains a friendly name for the website. +func (m *PersonWebsite) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonWebsite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonWebsite) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// GetWebUrl gets the webUrl property value. Contains a link to the website itself. +func (m *PersonWebsite) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PersonWebsite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. Contains categories a user has associated with the website (for example, personal, recipes). +func (m *PersonWebsite) SetCategories(value []string)() { + m.categories = value +} +// SetDescription sets the description property value. Contains a description of the website. +func (m *PersonWebsite) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Contains a friendly name for the website. +func (m *PersonWebsite) SetDisplayName(value *string)() { + m.displayName = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *PersonWebsite) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} +// SetWebUrl sets the webUrl property value. Contains a link to the website itself. +func (m *PersonWebsite) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_website_collection_response.go b/src/internal/connector/graph/betasdk/models/person_website_collection_response.go new file mode 100644 index 000000000..587927174 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_website_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonWebsiteCollectionResponse +type PersonWebsiteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PersonWebsiteable +} +// NewPersonWebsiteCollectionResponse instantiates a new PersonWebsiteCollectionResponse and sets the default values. +func NewPersonWebsiteCollectionResponse()(*PersonWebsiteCollectionResponse) { + m := &PersonWebsiteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePersonWebsiteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePersonWebsiteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPersonWebsiteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PersonWebsiteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonWebsiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonWebsiteable, len(val)) + for i, v := range val { + res[i] = v.(PersonWebsiteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PersonWebsiteCollectionResponse) GetValue()([]PersonWebsiteable) { + return m.value +} +// Serialize serializes information the current object +func (m *PersonWebsiteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PersonWebsiteCollectionResponse) SetValue(value []PersonWebsiteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/person_website_collection_responseable.go b/src/internal/connector/graph/betasdk/models/person_website_collection_responseable.go new file mode 100644 index 000000000..a1c84d215 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_website_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonWebsiteCollectionResponseable +type PersonWebsiteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PersonWebsiteable) + SetValue(value []PersonWebsiteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/person_websiteable.go b/src/internal/connector/graph/betasdk/models/person_websiteable.go new file mode 100644 index 000000000..1bdeedc8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/person_websiteable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PersonWebsiteable +type PersonWebsiteable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]string) + GetDescription()(*string) + GetDisplayName()(*string) + GetThumbnailUrl()(*string) + GetWebUrl()(*string) + SetCategories(value []string)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetThumbnailUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/personable.go b/src/internal/connector/graph/betasdk/models/personable.go new file mode 100644 index 000000000..16b5e224b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/personable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Personable +type Personable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBirthday()(*string) + GetCompanyName()(*string) + GetDepartment()(*string) + GetDisplayName()(*string) + GetEmailAddresses()([]RankedEmailAddressable) + GetGivenName()(*string) + GetIsFavorite()(*bool) + GetMailboxType()(*string) + GetOfficeLocation()(*string) + GetPersonNotes()(*string) + GetPersonType()(*string) + GetPhones()([]Phoneable) + GetPostalAddresses()([]Locationable) + GetProfession()(*string) + GetSources()([]PersonDataSourceable) + GetSurname()(*string) + GetTitle()(*string) + GetUserPrincipalName()(*string) + GetWebsites()([]Websiteable) + GetYomiCompany()(*string) + SetBirthday(value *string)() + SetCompanyName(value *string)() + SetDepartment(value *string)() + SetDisplayName(value *string)() + SetEmailAddresses(value []RankedEmailAddressable)() + SetGivenName(value *string)() + SetIsFavorite(value *bool)() + SetMailboxType(value *string)() + SetOfficeLocation(value *string)() + SetPersonNotes(value *string)() + SetPersonType(value *string)() + SetPhones(value []Phoneable)() + SetPostalAddresses(value []Locationable)() + SetProfession(value *string)() + SetSources(value []PersonDataSourceable)() + SetSurname(value *string)() + SetTitle(value *string)() + SetUserPrincipalName(value *string)() + SetWebsites(value []Websiteable)() + SetYomiCompany(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/personal_profile_personal_play_store_mode.go b/src/internal/connector/graph/betasdk/models/personal_profile_personal_play_store_mode.go new file mode 100644 index 000000000..a934c7325 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/personal_profile_personal_play_store_mode.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PersonalProfilePersonalPlayStoreMode int + +const ( + // Not configured. + NOTCONFIGURED_PERSONALPROFILEPERSONALPLAYSTOREMODE PersonalProfilePersonalPlayStoreMode = iota + // Blocked Apps. + BLOCKEDAPPS_PERSONALPROFILEPERSONALPLAYSTOREMODE + // Allowed Apps. + ALLOWEDAPPS_PERSONALPROFILEPERSONALPLAYSTOREMODE +) + +func (i PersonalProfilePersonalPlayStoreMode) String() string { + return []string{"notConfigured", "blockedApps", "allowedApps"}[i] +} +func ParsePersonalProfilePersonalPlayStoreMode(v string) (interface{}, error) { + result := NOTCONFIGURED_PERSONALPROFILEPERSONALPLAYSTOREMODE + switch v { + case "notConfigured": + result = NOTCONFIGURED_PERSONALPROFILEPERSONALPLAYSTOREMODE + case "blockedApps": + result = BLOCKEDAPPS_PERSONALPROFILEPERSONALPLAYSTOREMODE + case "allowedApps": + result = ALLOWEDAPPS_PERSONALPROFILEPERSONALPLAYSTOREMODE + default: + return 0, errors.New("Unknown PersonalProfilePersonalPlayStoreMode value: " + v) + } + return &result, nil +} +func SerializePersonalProfilePersonalPlayStoreMode(values []PersonalProfilePersonalPlayStoreMode) []string { + 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/phone.go b/src/internal/connector/graph/betasdk/models/phone.go new file mode 100644 index 000000000..0876e4e4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Phone +type Phone 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 phone number. + number *string + // The OdataType property + odataType *string + // The type of phone number. Possible values are: home, business, mobile, other, assistant, homeFax, businessFax, otherFax, pager, radio. + type_escaped *PhoneType +} +// NewPhone instantiates a new phone and sets the default values. +func NewPhone()(*Phone) { + m := &Phone{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePhoneFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhoneFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhone(), 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 *Phone) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Phone) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePhoneType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PhoneType)) + } + return nil + } + return res +} +// GetNumber gets the number property value. The phone number. +func (m *Phone) GetNumber()(*string) { + return m.number +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Phone) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of phone number. Possible values are: home, business, mobile, other, assistant, homeFax, businessFax, otherFax, pager, radio. +func (m *Phone) GetType()(*PhoneType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Phone) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *Phone) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNumber sets the number property value. The phone number. +func (m *Phone) SetNumber(value *string)() { + m.number = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Phone) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of phone number. Possible values are: home, business, mobile, other, assistant, homeFax, businessFax, otherFax, pager, radio. +func (m *Phone) SetType(value *PhoneType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/phone_authentication_method.go b/src/internal/connector/graph/betasdk/models/phone_authentication_method.go new file mode 100644 index 000000000..ffd154636 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_authentication_method.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneAuthenticationMethod +type PhoneAuthenticationMethod struct { + AuthenticationMethod + // The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they do not match the required format. + phoneNumber *string + // The type of this phone. Possible values are: mobile, alternateMobile, or office. + phoneType *AuthenticationPhoneType + // Whether a phone is ready to be used for SMS sign-in or not. Possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue. + smsSignInState *AuthenticationMethodSignInState +} +// NewPhoneAuthenticationMethod instantiates a new PhoneAuthenticationMethod and sets the default values. +func NewPhoneAuthenticationMethod()(*PhoneAuthenticationMethod) { + m := &PhoneAuthenticationMethod{ + AuthenticationMethod: *NewAuthenticationMethod(), + } + odataTypeValue := "#microsoft.graph.phoneAuthenticationMethod"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePhoneAuthenticationMethodFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhoneAuthenticationMethodFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhoneAuthenticationMethod(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhoneAuthenticationMethod) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AuthenticationMethod.GetFieldDeserializers() + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["phoneType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationPhoneType) + if err != nil { + return err + } + if val != nil { + m.SetPhoneType(val.(*AuthenticationPhoneType)) + } + return nil + } + res["smsSignInState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationMethodSignInState) + if err != nil { + return err + } + if val != nil { + m.SetSmsSignInState(val.(*AuthenticationMethodSignInState)) + } + return nil + } + return res +} +// GetPhoneNumber gets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they do not match the required format. +func (m *PhoneAuthenticationMethod) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPhoneType gets the phoneType property value. The type of this phone. Possible values are: mobile, alternateMobile, or office. +func (m *PhoneAuthenticationMethod) GetPhoneType()(*AuthenticationPhoneType) { + return m.phoneType +} +// GetSmsSignInState gets the smsSignInState property value. Whether a phone is ready to be used for SMS sign-in or not. Possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue. +func (m *PhoneAuthenticationMethod) GetSmsSignInState()(*AuthenticationMethodSignInState) { + return m.smsSignInState +} +// Serialize serializes information the current object +func (m *PhoneAuthenticationMethod) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AuthenticationMethod.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + if m.GetPhoneType() != nil { + cast := (*m.GetPhoneType()).String() + err = writer.WriteStringValue("phoneType", &cast) + if err != nil { + return err + } + } + if m.GetSmsSignInState() != nil { + cast := (*m.GetSmsSignInState()).String() + err = writer.WriteStringValue("smsSignInState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetPhoneNumber sets the phoneNumber property value. The phone number to text or call for authentication. Phone numbers use the format '+ x', with extension optional. For example, +1 5555551234 or +1 5555551234x123 are valid. Numbers are rejected when creating/updating if they do not match the required format. +func (m *PhoneAuthenticationMethod) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPhoneType sets the phoneType property value. The type of this phone. Possible values are: mobile, alternateMobile, or office. +func (m *PhoneAuthenticationMethod) SetPhoneType(value *AuthenticationPhoneType)() { + m.phoneType = value +} +// SetSmsSignInState sets the smsSignInState property value. Whether a phone is ready to be used for SMS sign-in or not. Possible values are: notSupported, notAllowedByPolicy, notEnabled, phoneNumberNotUnique, ready, or notConfigured, unknownFutureValue. +func (m *PhoneAuthenticationMethod) SetSmsSignInState(value *AuthenticationMethodSignInState)() { + m.smsSignInState = value +} diff --git a/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_response.go b/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_response.go new file mode 100644 index 000000000..2faf44ed7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneAuthenticationMethodCollectionResponse +type PhoneAuthenticationMethodCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PhoneAuthenticationMethodable +} +// NewPhoneAuthenticationMethodCollectionResponse instantiates a new PhoneAuthenticationMethodCollectionResponse and sets the default values. +func NewPhoneAuthenticationMethodCollectionResponse()(*PhoneAuthenticationMethodCollectionResponse) { + m := &PhoneAuthenticationMethodCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePhoneAuthenticationMethodCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhoneAuthenticationMethodCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhoneAuthenticationMethodCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhoneAuthenticationMethodCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneAuthenticationMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhoneAuthenticationMethodable, len(val)) + for i, v := range val { + res[i] = v.(PhoneAuthenticationMethodable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PhoneAuthenticationMethodCollectionResponse) GetValue()([]PhoneAuthenticationMethodable) { + return m.value +} +// Serialize serializes information the current object +func (m *PhoneAuthenticationMethodCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PhoneAuthenticationMethodCollectionResponse) SetValue(value []PhoneAuthenticationMethodable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_responseable.go b/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_responseable.go new file mode 100644 index 000000000..36a528457 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_authentication_method_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneAuthenticationMethodCollectionResponseable +type PhoneAuthenticationMethodCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PhoneAuthenticationMethodable) + SetValue(value []PhoneAuthenticationMethodable)() +} diff --git a/src/internal/connector/graph/betasdk/models/phone_authentication_methodable.go b/src/internal/connector/graph/betasdk/models/phone_authentication_methodable.go new file mode 100644 index 000000000..5821ee5fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_authentication_methodable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneAuthenticationMethodable +type PhoneAuthenticationMethodable interface { + AuthenticationMethodable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPhoneNumber()(*string) + GetPhoneType()(*AuthenticationPhoneType) + GetSmsSignInState()(*AuthenticationMethodSignInState) + SetPhoneNumber(value *string)() + SetPhoneType(value *AuthenticationPhoneType)() + SetSmsSignInState(value *AuthenticationMethodSignInState)() +} diff --git a/src/internal/connector/graph/betasdk/models/phone_collection_response.go b/src/internal/connector/graph/betasdk/models/phone_collection_response.go new file mode 100644 index 000000000..e376ca402 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneCollectionResponse +type PhoneCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Phoneable +} +// NewPhoneCollectionResponse instantiates a new PhoneCollectionResponse and sets the default values. +func NewPhoneCollectionResponse()(*PhoneCollectionResponse) { + m := &PhoneCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePhoneCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhoneCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhoneCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhoneCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Phoneable, len(val)) + for i, v := range val { + res[i] = v.(Phoneable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PhoneCollectionResponse) GetValue()([]Phoneable) { + return m.value +} +// Serialize serializes information the current object +func (m *PhoneCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PhoneCollectionResponse) SetValue(value []Phoneable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/phone_collection_responseable.go b/src/internal/connector/graph/betasdk/models/phone_collection_responseable.go new file mode 100644 index 000000000..79d488018 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhoneCollectionResponseable +type PhoneCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Phoneable) + SetValue(value []Phoneable)() +} diff --git a/src/internal/connector/graph/betasdk/models/phone_type.go b/src/internal/connector/graph/betasdk/models/phone_type.go new file mode 100644 index 000000000..cf5612ed7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phone_type.go @@ -0,0 +1,58 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PhoneType int + +const ( + HOME_PHONETYPE PhoneType = iota + BUSINESS_PHONETYPE + MOBILE_PHONETYPE + OTHER_PHONETYPE + ASSISTANT_PHONETYPE + HOMEFAX_PHONETYPE + BUSINESSFAX_PHONETYPE + OTHERFAX_PHONETYPE + PAGER_PHONETYPE + RADIO_PHONETYPE +) + +func (i PhoneType) String() string { + return []string{"home", "business", "mobile", "other", "assistant", "homeFax", "businessFax", "otherFax", "pager", "radio"}[i] +} +func ParsePhoneType(v string) (interface{}, error) { + result := HOME_PHONETYPE + switch v { + case "home": + result = HOME_PHONETYPE + case "business": + result = BUSINESS_PHONETYPE + case "mobile": + result = MOBILE_PHONETYPE + case "other": + result = OTHER_PHONETYPE + case "assistant": + result = ASSISTANT_PHONETYPE + case "homeFax": + result = HOMEFAX_PHONETYPE + case "businessFax": + result = BUSINESSFAX_PHONETYPE + case "otherFax": + result = OTHERFAX_PHONETYPE + case "pager": + result = PAGER_PHONETYPE + case "radio": + result = RADIO_PHONETYPE + default: + return 0, errors.New("Unknown PhoneType value: " + v) + } + return &result, nil +} +func SerializePhoneType(values []PhoneType) []string { + 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/phoneable.go b/src/internal/connector/graph/betasdk/models/phoneable.go new file mode 100644 index 000000000..7d38c7931 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/phoneable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Phoneable +type Phoneable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNumber()(*string) + GetOdataType()(*string) + GetType()(*PhoneType) + SetNumber(value *string)() + SetOdataType(value *string)() + SetType(value *PhoneType)() +} diff --git a/src/internal/connector/graph/betasdk/models/photo.go b/src/internal/connector/graph/betasdk/models/photo.go new file mode 100644 index 000000000..40a40be64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/photo.go @@ -0,0 +1,306 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Photo +type Photo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Camera manufacturer. Read-only. + cameraMake *string + // Camera model. Read-only. + cameraModel *string + // The denominator for the exposure time fraction from the camera. Read-only. + exposureDenominator *float64 + // The numerator for the exposure time fraction from the camera. Read-only. + exposureNumerator *float64 + // The F-stop value from the camera. Read-only. + fNumber *float64 + // The focal length from the camera. Read-only. + focalLength *float64 + // The ISO value from the camera. Read-only. + iso *int32 + // The OdataType property + odataType *string + // The orientation value from the camera. Writable on OneDrive Personal. + orientation *int32 + // The date and time the photo was taken in UTC time. Read-only. + takenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPhoto instantiates a new photo and sets the default values. +func NewPhoto()(*Photo) { + m := &Photo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePhotoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhotoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhoto(), 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 *Photo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCameraMake gets the cameraMake property value. Camera manufacturer. Read-only. +func (m *Photo) GetCameraMake()(*string) { + return m.cameraMake +} +// GetCameraModel gets the cameraModel property value. Camera model. Read-only. +func (m *Photo) GetCameraModel()(*string) { + return m.cameraModel +} +// GetExposureDenominator gets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only. +func (m *Photo) GetExposureDenominator()(*float64) { + return m.exposureDenominator +} +// GetExposureNumerator gets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only. +func (m *Photo) GetExposureNumerator()(*float64) { + return m.exposureNumerator +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Photo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cameraMake"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraMake(val) + } + return nil + } + res["cameraModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCameraModel(val) + } + return nil + } + res["exposureDenominator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetExposureDenominator(val) + } + return nil + } + res["exposureNumerator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetExposureNumerator(val) + } + return nil + } + res["fNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetFNumber(val) + } + return nil + } + res["focalLength"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetFocalLength(val) + } + return nil + } + res["iso"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIso(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["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOrientation(val) + } + return nil + } + res["takenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTakenDateTime(val) + } + return nil + } + return res +} +// GetFNumber gets the fNumber property value. The F-stop value from the camera. Read-only. +func (m *Photo) GetFNumber()(*float64) { + return m.fNumber +} +// GetFocalLength gets the focalLength property value. The focal length from the camera. Read-only. +func (m *Photo) GetFocalLength()(*float64) { + return m.focalLength +} +// GetIso gets the iso property value. The ISO value from the camera. Read-only. +func (m *Photo) GetIso()(*int32) { + return m.iso +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Photo) GetOdataType()(*string) { + return m.odataType +} +// GetOrientation gets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal. +func (m *Photo) GetOrientation()(*int32) { + return m.orientation +} +// GetTakenDateTime gets the takenDateTime property value. The date and time the photo was taken in UTC time. Read-only. +func (m *Photo) GetTakenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.takenDateTime +} +// Serialize serializes information the current object +func (m *Photo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("cameraMake", m.GetCameraMake()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("cameraModel", m.GetCameraModel()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("exposureDenominator", m.GetExposureDenominator()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("exposureNumerator", m.GetExposureNumerator()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("fNumber", m.GetFNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("focalLength", m.GetFocalLength()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("iso", m.GetIso()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("orientation", m.GetOrientation()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("takenDateTime", m.GetTakenDateTime()) + 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 *Photo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCameraMake sets the cameraMake property value. Camera manufacturer. Read-only. +func (m *Photo) SetCameraMake(value *string)() { + m.cameraMake = value +} +// SetCameraModel sets the cameraModel property value. Camera model. Read-only. +func (m *Photo) SetCameraModel(value *string)() { + m.cameraModel = value +} +// SetExposureDenominator sets the exposureDenominator property value. The denominator for the exposure time fraction from the camera. Read-only. +func (m *Photo) SetExposureDenominator(value *float64)() { + m.exposureDenominator = value +} +// SetExposureNumerator sets the exposureNumerator property value. The numerator for the exposure time fraction from the camera. Read-only. +func (m *Photo) SetExposureNumerator(value *float64)() { + m.exposureNumerator = value +} +// SetFNumber sets the fNumber property value. The F-stop value from the camera. Read-only. +func (m *Photo) SetFNumber(value *float64)() { + m.fNumber = value +} +// SetFocalLength sets the focalLength property value. The focal length from the camera. Read-only. +func (m *Photo) SetFocalLength(value *float64)() { + m.focalLength = value +} +// SetIso sets the iso property value. The ISO value from the camera. Read-only. +func (m *Photo) SetIso(value *int32)() { + m.iso = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Photo) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrientation sets the orientation property value. The orientation value from the camera. Writable on OneDrive Personal. +func (m *Photo) SetOrientation(value *int32)() { + m.orientation = value +} +// SetTakenDateTime sets the takenDateTime property value. The date and time the photo was taken in UTC time. Read-only. +func (m *Photo) SetTakenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.takenDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/photoable.go b/src/internal/connector/graph/betasdk/models/photoable.go new file mode 100644 index 000000000..fc588b7b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/photoable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Photoable +type Photoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCameraMake()(*string) + GetCameraModel()(*string) + GetExposureDenominator()(*float64) + GetExposureNumerator()(*float64) + GetFNumber()(*float64) + GetFocalLength()(*float64) + GetIso()(*int32) + GetOdataType()(*string) + GetOrientation()(*int32) + GetTakenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCameraMake(value *string)() + SetCameraModel(value *string)() + SetExposureDenominator(value *float64)() + SetExposureNumerator(value *float64)() + SetFNumber(value *float64)() + SetFocalLength(value *float64)() + SetIso(value *int32)() + SetOdataType(value *string)() + SetOrientation(value *int32)() + SetTakenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/physical_address.go b/src/internal/connector/graph/betasdk/models/physical_address.go new file mode 100644 index 000000000..2d2433eb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_address.go @@ -0,0 +1,254 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalAddress +type PhysicalAddress 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 city. + city *string + // The country or region. It's a free-format string value, for example, 'United States'. + countryOrRegion *string + // The OdataType property + odataType *string + // The postal code. + postalCode *string + // The post office box number. + postOfficeBox *string + // The state. + state *string + // The street. + street *string + // The type of address. Possible values are: unknown, home, business, other. + type_escaped *PhysicalAddressType +} +// NewPhysicalAddress instantiates a new physicalAddress and sets the default values. +func NewPhysicalAddress()(*PhysicalAddress) { + m := &PhysicalAddress{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePhysicalAddressFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhysicalAddressFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhysicalAddress(), 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 *PhysicalAddress) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCity gets the city property value. The city. +func (m *PhysicalAddress) GetCity()(*string) { + return m.city +} +// GetCountryOrRegion gets the countryOrRegion property value. The country or region. It's a free-format string value, for example, 'United States'. +func (m *PhysicalAddress) GetCountryOrRegion()(*string) { + return m.countryOrRegion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhysicalAddress) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryOrRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryOrRegion(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["postalCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostalCode(val) + } + return nil + } + res["postOfficeBox"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostOfficeBox(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["street"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreet(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePhysicalAddressType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PhysicalAddressType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PhysicalAddress) GetOdataType()(*string) { + return m.odataType +} +// GetPostalCode gets the postalCode property value. The postal code. +func (m *PhysicalAddress) GetPostalCode()(*string) { + return m.postalCode +} +// GetPostOfficeBox gets the postOfficeBox property value. The post office box number. +func (m *PhysicalAddress) GetPostOfficeBox()(*string) { + return m.postOfficeBox +} +// GetState gets the state property value. The state. +func (m *PhysicalAddress) GetState()(*string) { + return m.state +} +// GetStreet gets the street property value. The street. +func (m *PhysicalAddress) GetStreet()(*string) { + return m.street +} +// GetType gets the type property value. The type of address. Possible values are: unknown, home, business, other. +func (m *PhysicalAddress) GetType()(*PhysicalAddressType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *PhysicalAddress) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("countryOrRegion", m.GetCountryOrRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("postalCode", m.GetPostalCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("postOfficeBox", m.GetPostOfficeBox()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("street", m.GetStreet()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *PhysicalAddress) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCity sets the city property value. The city. +func (m *PhysicalAddress) SetCity(value *string)() { + m.city = value +} +// SetCountryOrRegion sets the countryOrRegion property value. The country or region. It's a free-format string value, for example, 'United States'. +func (m *PhysicalAddress) SetCountryOrRegion(value *string)() { + m.countryOrRegion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PhysicalAddress) SetOdataType(value *string)() { + m.odataType = value +} +// SetPostalCode sets the postalCode property value. The postal code. +func (m *PhysicalAddress) SetPostalCode(value *string)() { + m.postalCode = value +} +// SetPostOfficeBox sets the postOfficeBox property value. The post office box number. +func (m *PhysicalAddress) SetPostOfficeBox(value *string)() { + m.postOfficeBox = value +} +// SetState sets the state property value. The state. +func (m *PhysicalAddress) SetState(value *string)() { + m.state = value +} +// SetStreet sets the street property value. The street. +func (m *PhysicalAddress) SetStreet(value *string)() { + m.street = value +} +// SetType sets the type property value. The type of address. Possible values are: unknown, home, business, other. +func (m *PhysicalAddress) SetType(value *PhysicalAddressType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/physical_address_collection_response.go b/src/internal/connector/graph/betasdk/models/physical_address_collection_response.go new file mode 100644 index 000000000..76184c23d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_address_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalAddressCollectionResponse +type PhysicalAddressCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PhysicalAddressable +} +// NewPhysicalAddressCollectionResponse instantiates a new PhysicalAddressCollectionResponse and sets the default values. +func NewPhysicalAddressCollectionResponse()(*PhysicalAddressCollectionResponse) { + m := &PhysicalAddressCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePhysicalAddressCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhysicalAddressCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhysicalAddressCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhysicalAddressCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhysicalAddressable, len(val)) + for i, v := range val { + res[i] = v.(PhysicalAddressable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PhysicalAddressCollectionResponse) GetValue()([]PhysicalAddressable) { + return m.value +} +// Serialize serializes information the current object +func (m *PhysicalAddressCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PhysicalAddressCollectionResponse) SetValue(value []PhysicalAddressable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/physical_address_collection_responseable.go b/src/internal/connector/graph/betasdk/models/physical_address_collection_responseable.go new file mode 100644 index 000000000..7e5c0edf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_address_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalAddressCollectionResponseable +type PhysicalAddressCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PhysicalAddressable) + SetValue(value []PhysicalAddressable)() +} diff --git a/src/internal/connector/graph/betasdk/models/physical_address_type.go b/src/internal/connector/graph/betasdk/models/physical_address_type.go new file mode 100644 index 000000000..276f090c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_address_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PhysicalAddressType int + +const ( + UNKNOWN_PHYSICALADDRESSTYPE PhysicalAddressType = iota + HOME_PHYSICALADDRESSTYPE + BUSINESS_PHYSICALADDRESSTYPE + OTHER_PHYSICALADDRESSTYPE +) + +func (i PhysicalAddressType) String() string { + return []string{"unknown", "home", "business", "other"}[i] +} +func ParsePhysicalAddressType(v string) (interface{}, error) { + result := UNKNOWN_PHYSICALADDRESSTYPE + switch v { + case "unknown": + result = UNKNOWN_PHYSICALADDRESSTYPE + case "home": + result = HOME_PHYSICALADDRESSTYPE + case "business": + result = BUSINESS_PHYSICALADDRESSTYPE + case "other": + result = OTHER_PHYSICALADDRESSTYPE + default: + return 0, errors.New("Unknown PhysicalAddressType value: " + v) + } + return &result, nil +} +func SerializePhysicalAddressType(values []PhysicalAddressType) []string { + 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/physical_addressable.go b/src/internal/connector/graph/betasdk/models/physical_addressable.go new file mode 100644 index 000000000..1aaf33263 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_addressable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalAddressable +type PhysicalAddressable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCity()(*string) + GetCountryOrRegion()(*string) + GetOdataType()(*string) + GetPostalCode()(*string) + GetPostOfficeBox()(*string) + GetState()(*string) + GetStreet()(*string) + GetType()(*PhysicalAddressType) + SetCity(value *string)() + SetCountryOrRegion(value *string)() + SetOdataType(value *string)() + SetPostalCode(value *string)() + SetPostOfficeBox(value *string)() + SetState(value *string)() + SetStreet(value *string)() + SetType(value *PhysicalAddressType)() +} diff --git a/src/internal/connector/graph/betasdk/models/physical_office_address.go b/src/internal/connector/graph/betasdk/models/physical_office_address.go new file mode 100644 index 000000000..17095ed18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_office_address.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalOfficeAddress +type PhysicalOfficeAddress 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 city. + city *string + // The country or region. It's a free-format string value, for example, 'United States'. + countryOrRegion *string + // The OdataType property + odataType *string + // Office location such as building and office number for an organizational contact. + officeLocation *string + // The postal code. + postalCode *string + // The state. + state *string + // The street. + street *string +} +// NewPhysicalOfficeAddress instantiates a new physicalOfficeAddress and sets the default values. +func NewPhysicalOfficeAddress()(*PhysicalOfficeAddress) { + m := &PhysicalOfficeAddress{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePhysicalOfficeAddressFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhysicalOfficeAddressFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhysicalOfficeAddress(), 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 *PhysicalOfficeAddress) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCity gets the city property value. The city. +func (m *PhysicalOfficeAddress) GetCity()(*string) { + return m.city +} +// GetCountryOrRegion gets the countryOrRegion property value. The country or region. It's a free-format string value, for example, 'United States'. +func (m *PhysicalOfficeAddress) GetCountryOrRegion()(*string) { + return m.countryOrRegion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhysicalOfficeAddress) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryOrRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryOrRegion(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["officeLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOfficeLocation(val) + } + return nil + } + res["postalCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostalCode(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["street"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreet(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PhysicalOfficeAddress) GetOdataType()(*string) { + return m.odataType +} +// GetOfficeLocation gets the officeLocation property value. Office location such as building and office number for an organizational contact. +func (m *PhysicalOfficeAddress) GetOfficeLocation()(*string) { + return m.officeLocation +} +// GetPostalCode gets the postalCode property value. The postal code. +func (m *PhysicalOfficeAddress) GetPostalCode()(*string) { + return m.postalCode +} +// GetState gets the state property value. The state. +func (m *PhysicalOfficeAddress) GetState()(*string) { + return m.state +} +// GetStreet gets the street property value. The street. +func (m *PhysicalOfficeAddress) GetStreet()(*string) { + return m.street +} +// Serialize serializes information the current object +func (m *PhysicalOfficeAddress) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("countryOrRegion", m.GetCountryOrRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("officeLocation", m.GetOfficeLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("postalCode", m.GetPostalCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("street", m.GetStreet()) + 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 *PhysicalOfficeAddress) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCity sets the city property value. The city. +func (m *PhysicalOfficeAddress) SetCity(value *string)() { + m.city = value +} +// SetCountryOrRegion sets the countryOrRegion property value. The country or region. It's a free-format string value, for example, 'United States'. +func (m *PhysicalOfficeAddress) SetCountryOrRegion(value *string)() { + m.countryOrRegion = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PhysicalOfficeAddress) SetOdataType(value *string)() { + m.odataType = value +} +// SetOfficeLocation sets the officeLocation property value. Office location such as building and office number for an organizational contact. +func (m *PhysicalOfficeAddress) SetOfficeLocation(value *string)() { + m.officeLocation = value +} +// SetPostalCode sets the postalCode property value. The postal code. +func (m *PhysicalOfficeAddress) SetPostalCode(value *string)() { + m.postalCode = value +} +// SetState sets the state property value. The state. +func (m *PhysicalOfficeAddress) SetState(value *string)() { + m.state = value +} +// SetStreet sets the street property value. The street. +func (m *PhysicalOfficeAddress) SetStreet(value *string)() { + m.street = value +} diff --git a/src/internal/connector/graph/betasdk/models/physical_office_address_collection_response.go b/src/internal/connector/graph/betasdk/models/physical_office_address_collection_response.go new file mode 100644 index 000000000..11b5e6494 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_office_address_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalOfficeAddressCollectionResponse +type PhysicalOfficeAddressCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PhysicalOfficeAddressable +} +// NewPhysicalOfficeAddressCollectionResponse instantiates a new PhysicalOfficeAddressCollectionResponse and sets the default values. +func NewPhysicalOfficeAddressCollectionResponse()(*PhysicalOfficeAddressCollectionResponse) { + m := &PhysicalOfficeAddressCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePhysicalOfficeAddressCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePhysicalOfficeAddressCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPhysicalOfficeAddressCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PhysicalOfficeAddressCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePhysicalOfficeAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PhysicalOfficeAddressable, len(val)) + for i, v := range val { + res[i] = v.(PhysicalOfficeAddressable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PhysicalOfficeAddressCollectionResponse) GetValue()([]PhysicalOfficeAddressable) { + return m.value +} +// Serialize serializes information the current object +func (m *PhysicalOfficeAddressCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PhysicalOfficeAddressCollectionResponse) SetValue(value []PhysicalOfficeAddressable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/physical_office_address_collection_responseable.go b/src/internal/connector/graph/betasdk/models/physical_office_address_collection_responseable.go new file mode 100644 index 000000000..4b0531a12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_office_address_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalOfficeAddressCollectionResponseable +type PhysicalOfficeAddressCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PhysicalOfficeAddressable) + SetValue(value []PhysicalOfficeAddressable)() +} diff --git a/src/internal/connector/graph/betasdk/models/physical_office_addressable.go b/src/internal/connector/graph/betasdk/models/physical_office_addressable.go new file mode 100644 index 000000000..0fe029ab6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/physical_office_addressable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PhysicalOfficeAddressable +type PhysicalOfficeAddressable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCity()(*string) + GetCountryOrRegion()(*string) + GetOdataType()(*string) + GetOfficeLocation()(*string) + GetPostalCode()(*string) + GetState()(*string) + GetStreet()(*string) + SetCity(value *string)() + SetCountryOrRegion(value *string)() + SetOdataType(value *string)() + SetOfficeLocation(value *string)() + SetPostalCode(value *string)() + SetState(value *string)() + SetStreet(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/picture.go b/src/internal/connector/graph/betasdk/models/picture.go new file mode 100644 index 000000000..6f4939ad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/picture.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Picture provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Picture struct { + Entity + // The content property + content []byte + // The contentType property + contentType *string + // The height property + height *int32 + // The width property + width *int32 +} +// NewPicture instantiates a new picture and sets the default values. +func NewPicture()(*Picture) { + m := &Picture{ + Entity: *NewEntity(), + } + return m +} +// CreatePictureFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePictureFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPicture(), nil +} +// GetContent gets the content property value. The content property +func (m *Picture) GetContent()([]byte) { + return m.content +} +// GetContentType gets the contentType property value. The contentType property +func (m *Picture) GetContentType()(*string) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Picture) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["height"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeight(val) + } + return nil + } + res["width"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWidth(val) + } + return nil + } + return res +} +// GetHeight gets the height property value. The height property +func (m *Picture) GetHeight()(*int32) { + return m.height +} +// GetWidth gets the width property value. The width property +func (m *Picture) GetWidth()(*int32) { + return m.width +} +// Serialize serializes information the current object +func (m *Picture) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("height", m.GetHeight()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("width", m.GetWidth()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *Picture) SetContent(value []byte)() { + m.content = value +} +// SetContentType sets the contentType property value. The contentType property +func (m *Picture) SetContentType(value *string)() { + m.contentType = value +} +// SetHeight sets the height property value. The height property +func (m *Picture) SetHeight(value *int32)() { + m.height = value +} +// SetWidth sets the width property value. The width property +func (m *Picture) SetWidth(value *int32)() { + m.width = value +} diff --git a/src/internal/connector/graph/betasdk/models/picture_collection_response.go b/src/internal/connector/graph/betasdk/models/picture_collection_response.go new file mode 100644 index 000000000..1afc89f5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/picture_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PictureCollectionResponse +type PictureCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Pictureable +} +// NewPictureCollectionResponse instantiates a new PictureCollectionResponse and sets the default values. +func NewPictureCollectionResponse()(*PictureCollectionResponse) { + m := &PictureCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePictureCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePictureCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPictureCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PictureCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePictureFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pictureable, len(val)) + for i, v := range val { + res[i] = v.(Pictureable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PictureCollectionResponse) GetValue()([]Pictureable) { + return m.value +} +// Serialize serializes information the current object +func (m *PictureCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PictureCollectionResponse) SetValue(value []Pictureable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/picture_collection_responseable.go b/src/internal/connector/graph/betasdk/models/picture_collection_responseable.go new file mode 100644 index 000000000..825953966 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/picture_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PictureCollectionResponseable +type PictureCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Pictureable) + SetValue(value []Pictureable)() +} diff --git a/src/internal/connector/graph/betasdk/models/pictureable.go b/src/internal/connector/graph/betasdk/models/pictureable.go new file mode 100644 index 000000000..53d342d60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pictureable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pictureable +type Pictureable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetContentType()(*string) + GetHeight()(*int32) + GetWidth()(*int32) + SetContent(value []byte)() + SetContentType(value *string)() + SetHeight(value *int32)() + SetWidth(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/pinned_chat_message_info.go b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info.go new file mode 100644 index 000000000..c0eeed03c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PinnedChatMessageInfo provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PinnedChatMessageInfo struct { + Entity + // Represents details about the chat message that is pinned. + message ChatMessageable +} +// NewPinnedChatMessageInfo instantiates a new pinnedChatMessageInfo and sets the default values. +func NewPinnedChatMessageInfo()(*PinnedChatMessageInfo) { + m := &PinnedChatMessageInfo{ + Entity: *NewEntity(), + } + return m +} +// CreatePinnedChatMessageInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePinnedChatMessageInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPinnedChatMessageInfo(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PinnedChatMessageInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateChatMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMessage(val.(ChatMessageable)) + } + return nil + } + return res +} +// GetMessage gets the message property value. Represents details about the chat message that is pinned. +func (m *PinnedChatMessageInfo) GetMessage()(ChatMessageable) { + return m.message +} +// Serialize serializes information the current object +func (m *PinnedChatMessageInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("message", m.GetMessage()) + if err != nil { + return err + } + } + return nil +} +// SetMessage sets the message property value. Represents details about the chat message that is pinned. +func (m *PinnedChatMessageInfo) SetMessage(value ChatMessageable)() { + m.message = value +} diff --git a/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_response.go b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_response.go new file mode 100644 index 000000000..d08e29e4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PinnedChatMessageInfoCollectionResponse +type PinnedChatMessageInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PinnedChatMessageInfoable +} +// NewPinnedChatMessageInfoCollectionResponse instantiates a new PinnedChatMessageInfoCollectionResponse and sets the default values. +func NewPinnedChatMessageInfoCollectionResponse()(*PinnedChatMessageInfoCollectionResponse) { + m := &PinnedChatMessageInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePinnedChatMessageInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePinnedChatMessageInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPinnedChatMessageInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PinnedChatMessageInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePinnedChatMessageInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PinnedChatMessageInfoable, len(val)) + for i, v := range val { + res[i] = v.(PinnedChatMessageInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PinnedChatMessageInfoCollectionResponse) GetValue()([]PinnedChatMessageInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *PinnedChatMessageInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PinnedChatMessageInfoCollectionResponse) SetValue(value []PinnedChatMessageInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_responseable.go new file mode 100644 index 000000000..945d1a3eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pinned_chat_message_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PinnedChatMessageInfoCollectionResponseable +type PinnedChatMessageInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PinnedChatMessageInfoable) + SetValue(value []PinnedChatMessageInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/pinned_chat_message_infoable.go b/src/internal/connector/graph/betasdk/models/pinned_chat_message_infoable.go new file mode 100644 index 000000000..2082de1cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pinned_chat_message_infoable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PinnedChatMessageInfoable +type PinnedChatMessageInfoable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessage()(ChatMessageable) + SetMessage(value ChatMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificate.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificate.go new file mode 100644 index 000000000..c3a045777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificate.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12Certificate +type Pkcs12Certificate struct { + ApiAuthenticationConfigurationBase + // This is the password for the pfx file. Required. If no password is used, must still provide a value of ''. + password *string + // This is the field for sending pfx content. The value should be a base-64 encoded version of the actual certificate content. Required. + pkcs12Value *string +} +// NewPkcs12Certificate instantiates a new Pkcs12Certificate and sets the default values. +func NewPkcs12Certificate()(*Pkcs12Certificate) { + m := &Pkcs12Certificate{ + ApiAuthenticationConfigurationBase: *NewApiAuthenticationConfigurationBase(), + } + odataTypeValue := "#microsoft.graph.pkcs12Certificate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePkcs12CertificateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePkcs12CertificateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPkcs12Certificate(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Pkcs12Certificate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ApiAuthenticationConfigurationBase.GetFieldDeserializers() + res["password"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassword(val) + } + return nil + } + res["pkcs12Value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPkcs12Value(val) + } + return nil + } + return res +} +// GetPassword gets the password property value. This is the password for the pfx file. Required. If no password is used, must still provide a value of ''. +func (m *Pkcs12Certificate) GetPassword()(*string) { + return m.password +} +// GetPkcs12Value gets the pkcs12Value property value. This is the field for sending pfx content. The value should be a base-64 encoded version of the actual certificate content. Required. +func (m *Pkcs12Certificate) GetPkcs12Value()(*string) { + return m.pkcs12Value +} +// Serialize serializes information the current object +func (m *Pkcs12Certificate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ApiAuthenticationConfigurationBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("password", m.GetPassword()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("pkcs12Value", m.GetPkcs12Value()) + if err != nil { + return err + } + } + return nil +} +// SetPassword sets the password property value. This is the password for the pfx file. Required. If no password is used, must still provide a value of ''. +func (m *Pkcs12Certificate) SetPassword(value *string)() { + m.password = value +} +// SetPkcs12Value sets the pkcs12Value property value. This is the field for sending pfx content. The value should be a base-64 encoded version of the actual certificate content. Required. +func (m *Pkcs12Certificate) SetPkcs12Value(value *string)() { + m.pkcs12Value = value +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information.go new file mode 100644 index 000000000..2a4fb8677 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12CertificateInformation +type Pkcs12CertificateInformation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate which is not yet expired but whose notBefore time is in the past. + isActive *bool + // The certificate's expiry. This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) + notAfter *int64 + // The certificate's issue time (not before). This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) + notBefore *int64 + // The OdataType property + odataType *string + // The certificate thumbprint. + thumbprint *string +} +// NewPkcs12CertificateInformation instantiates a new pkcs12CertificateInformation and sets the default values. +func NewPkcs12CertificateInformation()(*Pkcs12CertificateInformation) { + m := &Pkcs12CertificateInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePkcs12CertificateInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePkcs12CertificateInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPkcs12CertificateInformation(), 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 *Pkcs12CertificateInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Pkcs12CertificateInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["notAfter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetNotAfter(val) + } + return nil + } + res["notBefore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetNotBefore(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["thumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbprint(val) + } + return nil + } + return res +} +// GetIsActive gets the isActive property value. Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate which is not yet expired but whose notBefore time is in the past. +func (m *Pkcs12CertificateInformation) GetIsActive()(*bool) { + return m.isActive +} +// GetNotAfter gets the notAfter property value. The certificate's expiry. This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) +func (m *Pkcs12CertificateInformation) GetNotAfter()(*int64) { + return m.notAfter +} +// GetNotBefore gets the notBefore property value. The certificate's issue time (not before). This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) +func (m *Pkcs12CertificateInformation) GetNotBefore()(*int64) { + return m.notBefore +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Pkcs12CertificateInformation) GetOdataType()(*string) { + return m.odataType +} +// GetThumbprint gets the thumbprint property value. The certificate thumbprint. +func (m *Pkcs12CertificateInformation) GetThumbprint()(*string) { + return m.thumbprint +} +// Serialize serializes information the current object +func (m *Pkcs12CertificateInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("notAfter", m.GetNotAfter()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("notBefore", m.GetNotBefore()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("thumbprint", m.GetThumbprint()) + 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 *Pkcs12CertificateInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsActive sets the isActive property value. Represents whether the certificate is the active certificate to be used for calling the API connector. The active certificate is the most recently uploaded certificate which is not yet expired but whose notBefore time is in the past. +func (m *Pkcs12CertificateInformation) SetIsActive(value *bool)() { + m.isActive = value +} +// SetNotAfter sets the notAfter property value. The certificate's expiry. This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) +func (m *Pkcs12CertificateInformation) SetNotAfter(value *int64)() { + m.notAfter = value +} +// SetNotBefore sets the notBefore property value. The certificate's issue time (not before). This value is a NumericDate as defined in RFC 7519 (A JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds.) +func (m *Pkcs12CertificateInformation) SetNotBefore(value *int64)() { + m.notBefore = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Pkcs12CertificateInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetThumbprint sets the thumbprint property value. The certificate thumbprint. +func (m *Pkcs12CertificateInformation) SetThumbprint(value *string)() { + m.thumbprint = value +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_response.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_response.go new file mode 100644 index 000000000..b62f719e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12CertificateInformationCollectionResponse +type Pkcs12CertificateInformationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Pkcs12CertificateInformationable +} +// NewPkcs12CertificateInformationCollectionResponse instantiates a new Pkcs12CertificateInformationCollectionResponse and sets the default values. +func NewPkcs12CertificateInformationCollectionResponse()(*Pkcs12CertificateInformationCollectionResponse) { + m := &Pkcs12CertificateInformationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePkcs12CertificateInformationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePkcs12CertificateInformationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPkcs12CertificateInformationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Pkcs12CertificateInformationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePkcs12CertificateInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Pkcs12CertificateInformationable, len(val)) + for i, v := range val { + res[i] = v.(Pkcs12CertificateInformationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *Pkcs12CertificateInformationCollectionResponse) GetValue()([]Pkcs12CertificateInformationable) { + return m.value +} +// Serialize serializes information the current object +func (m *Pkcs12CertificateInformationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *Pkcs12CertificateInformationCollectionResponse) SetValue(value []Pkcs12CertificateInformationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_responseable.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_responseable.go new file mode 100644 index 000000000..cc34a341f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_information_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12CertificateInformationCollectionResponseable +type Pkcs12CertificateInformationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Pkcs12CertificateInformationable) + SetValue(value []Pkcs12CertificateInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificate_informationable.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_informationable.go new file mode 100644 index 000000000..526664370 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificate_informationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12CertificateInformationable +type Pkcs12CertificateInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsActive()(*bool) + GetNotAfter()(*int64) + GetNotBefore()(*int64) + GetOdataType()(*string) + GetThumbprint()(*string) + SetIsActive(value *bool)() + SetNotAfter(value *int64)() + SetNotBefore(value *int64)() + SetOdataType(value *string)() + SetThumbprint(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/pkcs12_certificateable.go b/src/internal/connector/graph/betasdk/models/pkcs12_certificateable.go new file mode 100644 index 000000000..6635c12c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pkcs12_certificateable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Pkcs12Certificateable +type Pkcs12Certificateable interface { + ApiAuthenticationConfigurationBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPassword()(*string) + GetPkcs12Value()(*string) + SetPassword(value *string)() + SetPkcs12Value(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/place.go b/src/internal/connector/graph/betasdk/models/place.go new file mode 100644 index 000000000..a6e444602 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/place.go @@ -0,0 +1,160 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Place +type Place struct { + Entity + // The street address of the place. + address PhysicalAddressable + // The name associated with the place. + displayName *string + // Specifies the place location in latitude, longitude and (optionally) altitude coordinates. + geoCoordinates OutlookGeoCoordinatesable + // The phone number of the place. + phone *string +} +// NewPlace instantiates a new Place and sets the default values. +func NewPlace()(*Place) { + m := &Place{ + Entity: *NewEntity(), + } + return m +} +// CreatePlaceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlaceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.room": + return NewRoom(), nil + case "#microsoft.graph.roomList": + return NewRoomList(), nil + case "#microsoft.graph.workspace": + return NewWorkspace(), nil + } + } + } + } + return NewPlace(), nil +} +// GetAddress gets the address property value. The street address of the place. +func (m *Place) GetAddress()(PhysicalAddressable) { + return m.address +} +// GetDisplayName gets the displayName property value. The name associated with the place. +func (m *Place) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Place) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePhysicalAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddress(val.(PhysicalAddressable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["geoCoordinates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOutlookGeoCoordinatesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGeoCoordinates(val.(OutlookGeoCoordinatesable)) + } + return nil + } + res["phone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhone(val) + } + return nil + } + return res +} +// GetGeoCoordinates gets the geoCoordinates property value. Specifies the place location in latitude, longitude and (optionally) altitude coordinates. +func (m *Place) GetGeoCoordinates()(OutlookGeoCoordinatesable) { + return m.geoCoordinates +} +// GetPhone gets the phone property value. The phone number of the place. +func (m *Place) GetPhone()(*string) { + return m.phone +} +// Serialize serializes information the current object +func (m *Place) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("geoCoordinates", m.GetGeoCoordinates()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phone", m.GetPhone()) + if err != nil { + return err + } + } + return nil +} +// SetAddress sets the address property value. The street address of the place. +func (m *Place) SetAddress(value PhysicalAddressable)() { + m.address = value +} +// SetDisplayName sets the displayName property value. The name associated with the place. +func (m *Place) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGeoCoordinates sets the geoCoordinates property value. Specifies the place location in latitude, longitude and (optionally) altitude coordinates. +func (m *Place) SetGeoCoordinates(value OutlookGeoCoordinatesable)() { + m.geoCoordinates = value +} +// SetPhone sets the phone property value. The phone number of the place. +func (m *Place) SetPhone(value *string)() { + m.phone = value +} diff --git a/src/internal/connector/graph/betasdk/models/place_collection_response.go b/src/internal/connector/graph/betasdk/models/place_collection_response.go new file mode 100644 index 000000000..6bbb96262 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/place_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlaceCollectionResponse +type PlaceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Placeable +} +// NewPlaceCollectionResponse instantiates a new PlaceCollectionResponse and sets the default values. +func NewPlaceCollectionResponse()(*PlaceCollectionResponse) { + m := &PlaceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlaceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlaceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlaceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlaceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Placeable, len(val)) + for i, v := range val { + res[i] = v.(Placeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlaceCollectionResponse) GetValue()([]Placeable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlaceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlaceCollectionResponse) SetValue(value []Placeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/place_collection_responseable.go b/src/internal/connector/graph/betasdk/models/place_collection_responseable.go new file mode 100644 index 000000000..a80d0f116 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/place_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlaceCollectionResponseable +type PlaceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Placeable) + SetValue(value []Placeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/placeable.go b/src/internal/connector/graph/betasdk/models/placeable.go new file mode 100644 index 000000000..97fe8bfd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/placeable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Placeable +type Placeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(PhysicalAddressable) + GetDisplayName()(*string) + GetGeoCoordinates()(OutlookGeoCoordinatesable) + GetPhone()(*string) + SetAddress(value PhysicalAddressable)() + SetDisplayName(value *string)() + SetGeoCoordinates(value OutlookGeoCoordinatesable)() + SetPhone(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner.go b/src/internal/connector/graph/betasdk/models/planner.go new file mode 100644 index 000000000..b84d5d56f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner.go @@ -0,0 +1,170 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Planner +type Planner struct { + Entity + // Read-only. Nullable. Returns a collection of the specified buckets + buckets []PlannerBucketable + // Read-only. Nullable. Returns a collection of the specified plans + plans []PlannerPlanable + // Read-only. Nullable. Returns a collection of the specified rosters + rosters []PlannerRosterable + // Read-only. Nullable. Returns a collection of the specified tasks + tasks []PlannerTaskable +} +// NewPlanner instantiates a new Planner and sets the default values. +func NewPlanner()(*Planner) { + m := &Planner{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlanner(), nil +} +// GetBuckets gets the buckets property value. Read-only. Nullable. Returns a collection of the specified buckets +func (m *Planner) GetBuckets()([]PlannerBucketable) { + return m.buckets +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Planner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerBucketFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerBucketable, len(val)) + for i, v := range val { + res[i] = v.(PlannerBucketable) + } + m.SetBuckets(res) + } + return nil + } + res["plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetPlans(res) + } + return nil + } + res["rosters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRosterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRosterable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRosterable) + } + m.SetRosters(res) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetPlans gets the plans property value. Read-only. Nullable. Returns a collection of the specified plans +func (m *Planner) GetPlans()([]PlannerPlanable) { + return m.plans +} +// GetRosters gets the rosters property value. Read-only. Nullable. Returns a collection of the specified rosters +func (m *Planner) GetRosters()([]PlannerRosterable) { + return m.rosters +} +// GetTasks gets the tasks property value. Read-only. Nullable. Returns a collection of the specified tasks +func (m *Planner) GetTasks()([]PlannerTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *Planner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBuckets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) + for i, v := range m.GetBuckets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("buckets", cast) + if err != nil { + return err + } + } + if m.GetPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPlans())) + for i, v := range m.GetPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("plans", cast) + if err != nil { + return err + } + } + if m.GetRosters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRosters())) + for i, v := range m.GetRosters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rosters", cast) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetBuckets sets the buckets property value. Read-only. Nullable. Returns a collection of the specified buckets +func (m *Planner) SetBuckets(value []PlannerBucketable)() { + m.buckets = value +} +// SetPlans sets the plans property value. Read-only. Nullable. Returns a collection of the specified plans +func (m *Planner) SetPlans(value []PlannerPlanable)() { + m.plans = value +} +// SetRosters sets the rosters property value. Read-only. Nullable. Returns a collection of the specified rosters +func (m *Planner) SetRosters(value []PlannerRosterable)() { + m.rosters = value +} +// SetTasks sets the tasks property value. Read-only. Nullable. Returns a collection of the specified tasks +func (m *Planner) SetTasks(value []PlannerTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_applied_categories.go b/src/internal/connector/graph/betasdk/models/planner_applied_categories.go new file mode 100644 index 000000000..2b23038ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_applied_categories.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAppliedCategories +type PlannerAppliedCategories 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 OdataType property + odataType *string +} +// NewPlannerAppliedCategories instantiates a new plannerAppliedCategories and sets the default values. +func NewPlannerAppliedCategories()(*PlannerAppliedCategories) { + m := &PlannerAppliedCategories{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerAppliedCategoriesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerAppliedCategoriesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerAppliedCategories(), 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 *PlannerAppliedCategories) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerAppliedCategories) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerAppliedCategories) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerAppliedCategories) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerAppliedCategories) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerAppliedCategories) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_applied_categoriesable.go b/src/internal/connector/graph/betasdk/models/planner_applied_categoriesable.go new file mode 100644 index 000000000..c6c57c6b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_applied_categoriesable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAppliedCategoriesable +type PlannerAppliedCategoriesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format.go b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format.go new file mode 100644 index 000000000..bc6b13443 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignedToTaskBoardTaskFormat +type PlannerAssignedToTaskBoardTaskFormat struct { + PlannerDelta + // Dictionary of hints used to order tasks on the AssignedTo view of the Task Board. The key of each entry is one of the users the task is assigned to and the value is the order hint. The format of each value is defined as outlined here. + orderHintsByAssignee PlannerOrderHintsByAssigneeable + // Hint value used to order the task on the AssignedTo view of the Task Board when the task is not assigned to anyone, or if the orderHintsByAssignee dictionary does not provide an order hint for the user the task is assigned to. The format is defined as outlined here. + unassignedOrderHint *string +} +// NewPlannerAssignedToTaskBoardTaskFormat instantiates a new plannerAssignedToTaskBoardTaskFormat and sets the default values. +func NewPlannerAssignedToTaskBoardTaskFormat()(*PlannerAssignedToTaskBoardTaskFormat) { + m := &PlannerAssignedToTaskBoardTaskFormat{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerAssignedToTaskBoardTaskFormat(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerAssignedToTaskBoardTaskFormat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["orderHintsByAssignee"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerOrderHintsByAssigneeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOrderHintsByAssignee(val.(PlannerOrderHintsByAssigneeable)) + } + return nil + } + res["unassignedOrderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUnassignedOrderHint(val) + } + return nil + } + return res +} +// GetOrderHintsByAssignee gets the orderHintsByAssignee property value. Dictionary of hints used to order tasks on the AssignedTo view of the Task Board. The key of each entry is one of the users the task is assigned to and the value is the order hint. The format of each value is defined as outlined here. +func (m *PlannerAssignedToTaskBoardTaskFormat) GetOrderHintsByAssignee()(PlannerOrderHintsByAssigneeable) { + return m.orderHintsByAssignee +} +// GetUnassignedOrderHint gets the unassignedOrderHint property value. Hint value used to order the task on the AssignedTo view of the Task Board when the task is not assigned to anyone, or if the orderHintsByAssignee dictionary does not provide an order hint for the user the task is assigned to. The format is defined as outlined here. +func (m *PlannerAssignedToTaskBoardTaskFormat) GetUnassignedOrderHint()(*string) { + return m.unassignedOrderHint +} +// Serialize serializes information the current object +func (m *PlannerAssignedToTaskBoardTaskFormat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("orderHintsByAssignee", m.GetOrderHintsByAssignee()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("unassignedOrderHint", m.GetUnassignedOrderHint()) + if err != nil { + return err + } + } + return nil +} +// SetOrderHintsByAssignee sets the orderHintsByAssignee property value. Dictionary of hints used to order tasks on the AssignedTo view of the Task Board. The key of each entry is one of the users the task is assigned to and the value is the order hint. The format of each value is defined as outlined here. +func (m *PlannerAssignedToTaskBoardTaskFormat) SetOrderHintsByAssignee(value PlannerOrderHintsByAssigneeable)() { + m.orderHintsByAssignee = value +} +// SetUnassignedOrderHint sets the unassignedOrderHint property value. Hint value used to order the task on the AssignedTo view of the Task Board when the task is not assigned to anyone, or if the orderHintsByAssignee dictionary does not provide an order hint for the user the task is assigned to. The format is defined as outlined here. +func (m *PlannerAssignedToTaskBoardTaskFormat) SetUnassignedOrderHint(value *string)() { + m.unassignedOrderHint = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_response.go new file mode 100644 index 000000000..69a36c480 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignedToTaskBoardTaskFormatCollectionResponse +type PlannerAssignedToTaskBoardTaskFormatCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerAssignedToTaskBoardTaskFormatable +} +// NewPlannerAssignedToTaskBoardTaskFormatCollectionResponse instantiates a new PlannerAssignedToTaskBoardTaskFormatCollectionResponse and sets the default values. +func NewPlannerAssignedToTaskBoardTaskFormatCollectionResponse()(*PlannerAssignedToTaskBoardTaskFormatCollectionResponse) { + m := &PlannerAssignedToTaskBoardTaskFormatCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerAssignedToTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerAssignedToTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerAssignedToTaskBoardTaskFormatCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerAssignedToTaskBoardTaskFormatCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerAssignedToTaskBoardTaskFormatable, len(val)) + for i, v := range val { + res[i] = v.(PlannerAssignedToTaskBoardTaskFormatable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerAssignedToTaskBoardTaskFormatCollectionResponse) GetValue()([]PlannerAssignedToTaskBoardTaskFormatable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerAssignedToTaskBoardTaskFormatCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerAssignedToTaskBoardTaskFormatCollectionResponse) SetValue(value []PlannerAssignedToTaskBoardTaskFormatable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_responseable.go new file mode 100644 index 000000000..9ecc2e01a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_format_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignedToTaskBoardTaskFormatCollectionResponseable +type PlannerAssignedToTaskBoardTaskFormatCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerAssignedToTaskBoardTaskFormatable) + SetValue(value []PlannerAssignedToTaskBoardTaskFormatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_formatable.go b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_formatable.go new file mode 100644 index 000000000..521b65077 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assigned_to_task_board_task_formatable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignedToTaskBoardTaskFormatable +type PlannerAssignedToTaskBoardTaskFormatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetOrderHintsByAssignee()(PlannerOrderHintsByAssigneeable) + GetUnassignedOrderHint()(*string) + SetOrderHintsByAssignee(value PlannerOrderHintsByAssigneeable)() + SetUnassignedOrderHint(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assignments.go b/src/internal/connector/graph/betasdk/models/planner_assignments.go new file mode 100644 index 000000000..81b15fe94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assignments.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignments +type PlannerAssignments 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 OdataType property + odataType *string +} +// NewPlannerAssignments instantiates a new plannerAssignments and sets the default values. +func NewPlannerAssignments()(*PlannerAssignments) { + m := &PlannerAssignments{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerAssignmentsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerAssignmentsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerAssignments(), 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 *PlannerAssignments) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerAssignments) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerAssignments) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerAssignments) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerAssignments) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerAssignments) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_assignmentsable.go b/src/internal/connector/graph/betasdk/models/planner_assignmentsable.go new file mode 100644 index 000000000..7d1d5a629 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_assignmentsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerAssignmentsable +type PlannerAssignmentsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket.go b/src/internal/connector/graph/betasdk/models/planner_bucket.go new file mode 100644 index 000000000..03f63d880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket.go @@ -0,0 +1,172 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucket provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerBucket struct { + PlannerDelta + // Contains information about the origin of the bucket. + creationSource PlannerBucketCreationable + // Name of the bucket. + name *string + // Hint used to order items of this type in a list view. The format is defined as outlined here. + orderHint *string + // Plan ID to which the bucket belongs. + planId *string + // Read-only. Nullable. The collection of tasks in the bucket. + tasks []PlannerTaskable +} +// NewPlannerBucket instantiates a new plannerBucket and sets the default values. +func NewPlannerBucket()(*PlannerBucket) { + m := &PlannerBucket{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerBucketFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBucket(), nil +} +// GetCreationSource gets the creationSource property value. Contains information about the origin of the bucket. +func (m *PlannerBucket) GetCreationSource()(PlannerBucketCreationable) { + return m.creationSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucket) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerBucketCreationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreationSource(val.(PlannerBucketCreationable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["orderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderHint(val) + } + return nil + } + res["planId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanId(val) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the bucket. +func (m *PlannerBucket) GetName()(*string) { + return m.name +} +// GetOrderHint gets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerBucket) GetOrderHint()(*string) { + return m.orderHint +} +// GetPlanId gets the planId property value. Plan ID to which the bucket belongs. +func (m *PlannerBucket) GetPlanId()(*string) { + return m.planId +} +// GetTasks gets the tasks property value. Read-only. Nullable. The collection of tasks in the bucket. +func (m *PlannerBucket) GetTasks()([]PlannerTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *PlannerBucket) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("creationSource", m.GetCreationSource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("orderHint", m.GetOrderHint()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("planId", m.GetPlanId()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreationSource sets the creationSource property value. Contains information about the origin of the bucket. +func (m *PlannerBucket) SetCreationSource(value PlannerBucketCreationable)() { + m.creationSource = value +} +// SetName sets the name property value. Name of the bucket. +func (m *PlannerBucket) SetName(value *string)() { + m.name = value +} +// SetOrderHint sets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerBucket) SetOrderHint(value *string)() { + m.orderHint = value +} +// SetPlanId sets the planId property value. Plan ID to which the bucket belongs. +func (m *PlannerBucket) SetPlanId(value *string)() { + m.planId = value +} +// SetTasks sets the tasks property value. Read-only. Nullable. The collection of tasks in the bucket. +func (m *PlannerBucket) SetTasks(value []PlannerTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_bucket_collection_response.go new file mode 100644 index 000000000..424578467 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketCollectionResponse +type PlannerBucketCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerBucketable +} +// NewPlannerBucketCollectionResponse instantiates a new PlannerBucketCollectionResponse and sets the default values. +func NewPlannerBucketCollectionResponse()(*PlannerBucketCollectionResponse) { + m := &PlannerBucketCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerBucketCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBucketCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucketCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerBucketFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerBucketable, len(val)) + for i, v := range val { + res[i] = v.(PlannerBucketable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerBucketCollectionResponse) GetValue()([]PlannerBucketable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerBucketCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerBucketCollectionResponse) SetValue(value []PlannerBucketable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_bucket_collection_responseable.go new file mode 100644 index 000000000..d40fa140f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketCollectionResponseable +type PlannerBucketCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerBucketable) + SetValue(value []PlannerBucketable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_creation.go b/src/internal/connector/graph/betasdk/models/planner_bucket_creation.go new file mode 100644 index 000000000..1cd527aeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_creation.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketCreation +type PlannerBucketCreation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies what kind of creation source the bucket is created with. The possible values are: external, publication and unknownFutureValue. + creationSourceKind *PlannerCreationSourceKind + // The OdataType property + odataType *string +} +// NewPlannerBucketCreation instantiates a new plannerBucketCreation and sets the default values. +func NewPlannerBucketCreation()(*PlannerBucketCreation) { + m := &PlannerBucketCreation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerBucketCreationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketCreationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.plannerExternalBucketSource": + return NewPlannerExternalBucketSource(), nil + } + } + } + } + return NewPlannerBucketCreation(), 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 *PlannerBucketCreation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreationSourceKind gets the creationSourceKind property value. Specifies what kind of creation source the bucket is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerBucketCreation) GetCreationSourceKind()(*PlannerCreationSourceKind) { + return m.creationSourceKind +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucketCreation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["creationSourceKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerCreationSourceKind) + if err != nil { + return err + } + if val != nil { + m.SetCreationSourceKind(val.(*PlannerCreationSourceKind)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerBucketCreation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerBucketCreation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCreationSourceKind() != nil { + cast := (*m.GetCreationSourceKind()).String() + err := writer.WriteStringValue("creationSourceKind", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerBucketCreation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreationSourceKind sets the creationSourceKind property value. Specifies what kind of creation source the bucket is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerBucketCreation) SetCreationSourceKind(value *PlannerCreationSourceKind)() { + m.creationSourceKind = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerBucketCreation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_creationable.go b/src/internal/connector/graph/betasdk/models/planner_bucket_creationable.go new file mode 100644 index 000000000..ac421d5ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_creationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketCreationable +type PlannerBucketCreationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationSourceKind()(*PlannerCreationSourceKind) + GetOdataType()(*string) + SetCreationSourceKind(value *PlannerCreationSourceKind)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_property_rule.go b/src/internal/connector/graph/betasdk/models/planner_bucket_property_rule.go new file mode 100644 index 000000000..380e13b0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_property_rule.go @@ -0,0 +1,96 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketPropertyRule +type PlannerBucketPropertyRule struct { + PlannerPropertyRule + // The order property + order []string + // The title property + title []string +} +// NewPlannerBucketPropertyRule instantiates a new PlannerBucketPropertyRule and sets the default values. +func NewPlannerBucketPropertyRule()(*PlannerBucketPropertyRule) { + m := &PlannerBucketPropertyRule{ + PlannerPropertyRule: *NewPlannerPropertyRule(), + } + odataTypeValue := "#microsoft.graph.plannerBucketPropertyRule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerBucketPropertyRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketPropertyRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBucketPropertyRule(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucketPropertyRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerPropertyRule.GetFieldDeserializers() + res["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOrder(res) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTitle(res) + } + return nil + } + return res +} +// GetOrder gets the order property value. The order property +func (m *PlannerBucketPropertyRule) GetOrder()([]string) { + return m.order +} +// GetTitle gets the title property value. The title property +func (m *PlannerBucketPropertyRule) GetTitle()([]string) { + return m.title +} +// Serialize serializes information the current object +func (m *PlannerBucketPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerPropertyRule.Serialize(writer) + if err != nil { + return err + } + if m.GetOrder() != nil { + err = writer.WriteCollectionOfStringValues("order", m.GetOrder()) + if err != nil { + return err + } + } + if m.GetTitle() != nil { + err = writer.WriteCollectionOfStringValues("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetOrder sets the order property value. The order property +func (m *PlannerBucketPropertyRule) SetOrder(value []string)() { + m.order = value +} +// SetTitle sets the title property value. The title property +func (m *PlannerBucketPropertyRule) SetTitle(value []string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_property_ruleable.go b/src/internal/connector/graph/betasdk/models/planner_bucket_property_ruleable.go new file mode 100644 index 000000000..02a2452c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_property_ruleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketPropertyRuleable +type PlannerBucketPropertyRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerPropertyRuleable + GetOrder()([]string) + GetTitle()([]string) + SetOrder(value []string)() + SetTitle(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format.go b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format.go new file mode 100644 index 000000000..0652a8eea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketTaskBoardTaskFormat +type PlannerBucketTaskBoardTaskFormat struct { + PlannerDelta + // Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner. + orderHint *string +} +// NewPlannerBucketTaskBoardTaskFormat instantiates a new plannerBucketTaskBoardTaskFormat and sets the default values. +func NewPlannerBucketTaskBoardTaskFormat()(*PlannerBucketTaskBoardTaskFormat) { + m := &PlannerBucketTaskBoardTaskFormat{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerBucketTaskBoardTaskFormatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketTaskBoardTaskFormatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBucketTaskBoardTaskFormat(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucketTaskBoardTaskFormat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["orderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderHint(val) + } + return nil + } + return res +} +// GetOrderHint gets the orderHint property value. Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner. +func (m *PlannerBucketTaskBoardTaskFormat) GetOrderHint()(*string) { + return m.orderHint +} +// Serialize serializes information the current object +func (m *PlannerBucketTaskBoardTaskFormat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("orderHint", m.GetOrderHint()) + if err != nil { + return err + } + } + return nil +} +// SetOrderHint sets the orderHint property value. Hint used to order tasks in the bucket view of the task board. For details about the supported format, see Using order hints in Planner. +func (m *PlannerBucketTaskBoardTaskFormat) SetOrderHint(value *string)() { + m.orderHint = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_response.go new file mode 100644 index 000000000..6a241417d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketTaskBoardTaskFormatCollectionResponse +type PlannerBucketTaskBoardTaskFormatCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerBucketTaskBoardTaskFormatable +} +// NewPlannerBucketTaskBoardTaskFormatCollectionResponse instantiates a new PlannerBucketTaskBoardTaskFormatCollectionResponse and sets the default values. +func NewPlannerBucketTaskBoardTaskFormatCollectionResponse()(*PlannerBucketTaskBoardTaskFormatCollectionResponse) { + m := &PlannerBucketTaskBoardTaskFormatCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerBucketTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerBucketTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerBucketTaskBoardTaskFormatCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerBucketTaskBoardTaskFormatCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerBucketTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerBucketTaskBoardTaskFormatable, len(val)) + for i, v := range val { + res[i] = v.(PlannerBucketTaskBoardTaskFormatable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerBucketTaskBoardTaskFormatCollectionResponse) GetValue()([]PlannerBucketTaskBoardTaskFormatable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerBucketTaskBoardTaskFormatCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerBucketTaskBoardTaskFormatCollectionResponse) SetValue(value []PlannerBucketTaskBoardTaskFormatable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_responseable.go new file mode 100644 index 000000000..9c45010e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_format_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketTaskBoardTaskFormatCollectionResponseable +type PlannerBucketTaskBoardTaskFormatCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerBucketTaskBoardTaskFormatable) + SetValue(value []PlannerBucketTaskBoardTaskFormatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_formatable.go b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_formatable.go new file mode 100644 index 000000000..f600cd2ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucket_task_board_task_formatable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketTaskBoardTaskFormatable +type PlannerBucketTaskBoardTaskFormatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetOrderHint()(*string) + SetOrderHint(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_bucketable.go b/src/internal/connector/graph/betasdk/models/planner_bucketable.go new file mode 100644 index 000000000..157820e4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_bucketable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerBucketable +type PlannerBucketable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetCreationSource()(PlannerBucketCreationable) + GetName()(*string) + GetOrderHint()(*string) + GetPlanId()(*string) + GetTasks()([]PlannerTaskable) + SetCreationSource(value PlannerBucketCreationable)() + SetName(value *string)() + SetOrderHint(value *string)() + SetPlanId(value *string)() + SetTasks(value []PlannerTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_category_descriptions.go b/src/internal/connector/graph/betasdk/models/planner_category_descriptions.go new file mode 100644 index 000000000..3ff6a9f1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_category_descriptions.go @@ -0,0 +1,721 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerCategoryDescriptions +type PlannerCategoryDescriptions 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 label associated with Category 1 + category1 *string + // The label associated with Category 10 + category10 *string + // The label associated with Category 11 + category11 *string + // The label associated with Category 12 + category12 *string + // The label associated with Category 13 + category13 *string + // The label associated with Category 14 + category14 *string + // The label associated with Category 15 + category15 *string + // The label associated with Category 16 + category16 *string + // The label associated with Category 17 + category17 *string + // The label associated with Category 18 + category18 *string + // The label associated with Category 19 + category19 *string + // The label associated with Category 2 + category2 *string + // The label associated with Category 20 + category20 *string + // The label associated with Category 21 + category21 *string + // The label associated with Category 22 + category22 *string + // The label associated with Category 23 + category23 *string + // The label associated with Category 24 + category24 *string + // The label associated with Category 25 + category25 *string + // The label associated with Category 3 + category3 *string + // The label associated with Category 4 + category4 *string + // The label associated with Category 5 + category5 *string + // The label associated with Category 6 + category6 *string + // The label associated with Category 7 + category7 *string + // The label associated with Category 8 + category8 *string + // The label associated with Category 9 + category9 *string + // The OdataType property + odataType *string +} +// NewPlannerCategoryDescriptions instantiates a new plannerCategoryDescriptions and sets the default values. +func NewPlannerCategoryDescriptions()(*PlannerCategoryDescriptions) { + m := &PlannerCategoryDescriptions{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerCategoryDescriptionsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerCategoryDescriptionsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerCategoryDescriptions(), 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 *PlannerCategoryDescriptions) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory1 gets the category1 property value. The label associated with Category 1 +func (m *PlannerCategoryDescriptions) GetCategory1()(*string) { + return m.category1 +} +// GetCategory10 gets the category10 property value. The label associated with Category 10 +func (m *PlannerCategoryDescriptions) GetCategory10()(*string) { + return m.category10 +} +// GetCategory11 gets the category11 property value. The label associated with Category 11 +func (m *PlannerCategoryDescriptions) GetCategory11()(*string) { + return m.category11 +} +// GetCategory12 gets the category12 property value. The label associated with Category 12 +func (m *PlannerCategoryDescriptions) GetCategory12()(*string) { + return m.category12 +} +// GetCategory13 gets the category13 property value. The label associated with Category 13 +func (m *PlannerCategoryDescriptions) GetCategory13()(*string) { + return m.category13 +} +// GetCategory14 gets the category14 property value. The label associated with Category 14 +func (m *PlannerCategoryDescriptions) GetCategory14()(*string) { + return m.category14 +} +// GetCategory15 gets the category15 property value. The label associated with Category 15 +func (m *PlannerCategoryDescriptions) GetCategory15()(*string) { + return m.category15 +} +// GetCategory16 gets the category16 property value. The label associated with Category 16 +func (m *PlannerCategoryDescriptions) GetCategory16()(*string) { + return m.category16 +} +// GetCategory17 gets the category17 property value. The label associated with Category 17 +func (m *PlannerCategoryDescriptions) GetCategory17()(*string) { + return m.category17 +} +// GetCategory18 gets the category18 property value. The label associated with Category 18 +func (m *PlannerCategoryDescriptions) GetCategory18()(*string) { + return m.category18 +} +// GetCategory19 gets the category19 property value. The label associated with Category 19 +func (m *PlannerCategoryDescriptions) GetCategory19()(*string) { + return m.category19 +} +// GetCategory2 gets the category2 property value. The label associated with Category 2 +func (m *PlannerCategoryDescriptions) GetCategory2()(*string) { + return m.category2 +} +// GetCategory20 gets the category20 property value. The label associated with Category 20 +func (m *PlannerCategoryDescriptions) GetCategory20()(*string) { + return m.category20 +} +// GetCategory21 gets the category21 property value. The label associated with Category 21 +func (m *PlannerCategoryDescriptions) GetCategory21()(*string) { + return m.category21 +} +// GetCategory22 gets the category22 property value. The label associated with Category 22 +func (m *PlannerCategoryDescriptions) GetCategory22()(*string) { + return m.category22 +} +// GetCategory23 gets the category23 property value. The label associated with Category 23 +func (m *PlannerCategoryDescriptions) GetCategory23()(*string) { + return m.category23 +} +// GetCategory24 gets the category24 property value. The label associated with Category 24 +func (m *PlannerCategoryDescriptions) GetCategory24()(*string) { + return m.category24 +} +// GetCategory25 gets the category25 property value. The label associated with Category 25 +func (m *PlannerCategoryDescriptions) GetCategory25()(*string) { + return m.category25 +} +// GetCategory3 gets the category3 property value. The label associated with Category 3 +func (m *PlannerCategoryDescriptions) GetCategory3()(*string) { + return m.category3 +} +// GetCategory4 gets the category4 property value. The label associated with Category 4 +func (m *PlannerCategoryDescriptions) GetCategory4()(*string) { + return m.category4 +} +// GetCategory5 gets the category5 property value. The label associated with Category 5 +func (m *PlannerCategoryDescriptions) GetCategory5()(*string) { + return m.category5 +} +// GetCategory6 gets the category6 property value. The label associated with Category 6 +func (m *PlannerCategoryDescriptions) GetCategory6()(*string) { + return m.category6 +} +// GetCategory7 gets the category7 property value. The label associated with Category 7 +func (m *PlannerCategoryDescriptions) GetCategory7()(*string) { + return m.category7 +} +// GetCategory8 gets the category8 property value. The label associated with Category 8 +func (m *PlannerCategoryDescriptions) GetCategory8()(*string) { + return m.category8 +} +// GetCategory9 gets the category9 property value. The label associated with Category 9 +func (m *PlannerCategoryDescriptions) GetCategory9()(*string) { + return m.category9 +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerCategoryDescriptions) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory1(val) + } + return nil + } + res["category10"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory10(val) + } + return nil + } + res["category11"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory11(val) + } + return nil + } + res["category12"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory12(val) + } + return nil + } + res["category13"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory13(val) + } + return nil + } + res["category14"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory14(val) + } + return nil + } + res["category15"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory15(val) + } + return nil + } + res["category16"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory16(val) + } + return nil + } + res["category17"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory17(val) + } + return nil + } + res["category18"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory18(val) + } + return nil + } + res["category19"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory19(val) + } + return nil + } + res["category2"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory2(val) + } + return nil + } + res["category20"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory20(val) + } + return nil + } + res["category21"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory21(val) + } + return nil + } + res["category22"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory22(val) + } + return nil + } + res["category23"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory23(val) + } + return nil + } + res["category24"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory24(val) + } + return nil + } + res["category25"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory25(val) + } + return nil + } + res["category3"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory3(val) + } + return nil + } + res["category4"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory4(val) + } + return nil + } + res["category5"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory5(val) + } + return nil + } + res["category6"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory6(val) + } + return nil + } + res["category7"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory7(val) + } + return nil + } + res["category8"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory8(val) + } + return nil + } + res["category9"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory9(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerCategoryDescriptions) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerCategoryDescriptions) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("category1", m.GetCategory1()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category10", m.GetCategory10()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category11", m.GetCategory11()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category12", m.GetCategory12()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category13", m.GetCategory13()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category14", m.GetCategory14()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category15", m.GetCategory15()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category16", m.GetCategory16()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category17", m.GetCategory17()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category18", m.GetCategory18()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category19", m.GetCategory19()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category2", m.GetCategory2()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category20", m.GetCategory20()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category21", m.GetCategory21()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category22", m.GetCategory22()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category23", m.GetCategory23()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category24", m.GetCategory24()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category25", m.GetCategory25()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category3", m.GetCategory3()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category4", m.GetCategory4()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category5", m.GetCategory5()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category6", m.GetCategory6()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category7", m.GetCategory7()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category8", m.GetCategory8()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("category9", m.GetCategory9()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerCategoryDescriptions) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory1 sets the category1 property value. The label associated with Category 1 +func (m *PlannerCategoryDescriptions) SetCategory1(value *string)() { + m.category1 = value +} +// SetCategory10 sets the category10 property value. The label associated with Category 10 +func (m *PlannerCategoryDescriptions) SetCategory10(value *string)() { + m.category10 = value +} +// SetCategory11 sets the category11 property value. The label associated with Category 11 +func (m *PlannerCategoryDescriptions) SetCategory11(value *string)() { + m.category11 = value +} +// SetCategory12 sets the category12 property value. The label associated with Category 12 +func (m *PlannerCategoryDescriptions) SetCategory12(value *string)() { + m.category12 = value +} +// SetCategory13 sets the category13 property value. The label associated with Category 13 +func (m *PlannerCategoryDescriptions) SetCategory13(value *string)() { + m.category13 = value +} +// SetCategory14 sets the category14 property value. The label associated with Category 14 +func (m *PlannerCategoryDescriptions) SetCategory14(value *string)() { + m.category14 = value +} +// SetCategory15 sets the category15 property value. The label associated with Category 15 +func (m *PlannerCategoryDescriptions) SetCategory15(value *string)() { + m.category15 = value +} +// SetCategory16 sets the category16 property value. The label associated with Category 16 +func (m *PlannerCategoryDescriptions) SetCategory16(value *string)() { + m.category16 = value +} +// SetCategory17 sets the category17 property value. The label associated with Category 17 +func (m *PlannerCategoryDescriptions) SetCategory17(value *string)() { + m.category17 = value +} +// SetCategory18 sets the category18 property value. The label associated with Category 18 +func (m *PlannerCategoryDescriptions) SetCategory18(value *string)() { + m.category18 = value +} +// SetCategory19 sets the category19 property value. The label associated with Category 19 +func (m *PlannerCategoryDescriptions) SetCategory19(value *string)() { + m.category19 = value +} +// SetCategory2 sets the category2 property value. The label associated with Category 2 +func (m *PlannerCategoryDescriptions) SetCategory2(value *string)() { + m.category2 = value +} +// SetCategory20 sets the category20 property value. The label associated with Category 20 +func (m *PlannerCategoryDescriptions) SetCategory20(value *string)() { + m.category20 = value +} +// SetCategory21 sets the category21 property value. The label associated with Category 21 +func (m *PlannerCategoryDescriptions) SetCategory21(value *string)() { + m.category21 = value +} +// SetCategory22 sets the category22 property value. The label associated with Category 22 +func (m *PlannerCategoryDescriptions) SetCategory22(value *string)() { + m.category22 = value +} +// SetCategory23 sets the category23 property value. The label associated with Category 23 +func (m *PlannerCategoryDescriptions) SetCategory23(value *string)() { + m.category23 = value +} +// SetCategory24 sets the category24 property value. The label associated with Category 24 +func (m *PlannerCategoryDescriptions) SetCategory24(value *string)() { + m.category24 = value +} +// SetCategory25 sets the category25 property value. The label associated with Category 25 +func (m *PlannerCategoryDescriptions) SetCategory25(value *string)() { + m.category25 = value +} +// SetCategory3 sets the category3 property value. The label associated with Category 3 +func (m *PlannerCategoryDescriptions) SetCategory3(value *string)() { + m.category3 = value +} +// SetCategory4 sets the category4 property value. The label associated with Category 4 +func (m *PlannerCategoryDescriptions) SetCategory4(value *string)() { + m.category4 = value +} +// SetCategory5 sets the category5 property value. The label associated with Category 5 +func (m *PlannerCategoryDescriptions) SetCategory5(value *string)() { + m.category5 = value +} +// SetCategory6 sets the category6 property value. The label associated with Category 6 +func (m *PlannerCategoryDescriptions) SetCategory6(value *string)() { + m.category6 = value +} +// SetCategory7 sets the category7 property value. The label associated with Category 7 +func (m *PlannerCategoryDescriptions) SetCategory7(value *string)() { + m.category7 = value +} +// SetCategory8 sets the category8 property value. The label associated with Category 8 +func (m *PlannerCategoryDescriptions) SetCategory8(value *string)() { + m.category8 = value +} +// SetCategory9 sets the category9 property value. The label associated with Category 9 +func (m *PlannerCategoryDescriptions) SetCategory9(value *string)() { + m.category9 = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerCategoryDescriptions) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_category_descriptionsable.go b/src/internal/connector/graph/betasdk/models/planner_category_descriptionsable.go new file mode 100644 index 000000000..a72f7b316 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_category_descriptionsable.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerCategoryDescriptionsable +type PlannerCategoryDescriptionsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory1()(*string) + GetCategory10()(*string) + GetCategory11()(*string) + GetCategory12()(*string) + GetCategory13()(*string) + GetCategory14()(*string) + GetCategory15()(*string) + GetCategory16()(*string) + GetCategory17()(*string) + GetCategory18()(*string) + GetCategory19()(*string) + GetCategory2()(*string) + GetCategory20()(*string) + GetCategory21()(*string) + GetCategory22()(*string) + GetCategory23()(*string) + GetCategory24()(*string) + GetCategory25()(*string) + GetCategory3()(*string) + GetCategory4()(*string) + GetCategory5()(*string) + GetCategory6()(*string) + GetCategory7()(*string) + GetCategory8()(*string) + GetCategory9()(*string) + GetOdataType()(*string) + SetCategory1(value *string)() + SetCategory10(value *string)() + SetCategory11(value *string)() + SetCategory12(value *string)() + SetCategory13(value *string)() + SetCategory14(value *string)() + SetCategory15(value *string)() + SetCategory16(value *string)() + SetCategory17(value *string)() + SetCategory18(value *string)() + SetCategory19(value *string)() + SetCategory2(value *string)() + SetCategory20(value *string)() + SetCategory21(value *string)() + SetCategory22(value *string)() + SetCategory23(value *string)() + SetCategory24(value *string)() + SetCategory25(value *string)() + SetCategory3(value *string)() + SetCategory4(value *string)() + SetCategory5(value *string)() + SetCategory6(value *string)() + SetCategory7(value *string)() + SetCategory8(value *string)() + SetCategory9(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_checklist_items.go b/src/internal/connector/graph/betasdk/models/planner_checklist_items.go new file mode 100644 index 000000000..60723bcea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_checklist_items.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerChecklistItems +type PlannerChecklistItems 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 OdataType property + odataType *string +} +// NewPlannerChecklistItems instantiates a new plannerChecklistItems and sets the default values. +func NewPlannerChecklistItems()(*PlannerChecklistItems) { + m := &PlannerChecklistItems{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerChecklistItemsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerChecklistItemsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerChecklistItems(), 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 *PlannerChecklistItems) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerChecklistItems) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerChecklistItems) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerChecklistItems) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerChecklistItems) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerChecklistItems) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_checklist_itemsable.go b/src/internal/connector/graph/betasdk/models/planner_checklist_itemsable.go new file mode 100644 index 000000000..4690f01c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_checklist_itemsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerChecklistItemsable +type PlannerChecklistItemsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_container_type.go b/src/internal/connector/graph/betasdk/models/planner_container_type.go new file mode 100644 index 000000000..80aeab2a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_container_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerContainerType int + +const ( + GROUP_PLANNERCONTAINERTYPE PlannerContainerType = iota + UNKNOWNFUTUREVALUE_PLANNERCONTAINERTYPE + ROSTER_PLANNERCONTAINERTYPE + PROJECT_PLANNERCONTAINERTYPE +) + +func (i PlannerContainerType) String() string { + return []string{"group", "unknownFutureValue", "roster", "project"}[i] +} +func ParsePlannerContainerType(v string) (interface{}, error) { + result := GROUP_PLANNERCONTAINERTYPE + switch v { + case "group": + result = GROUP_PLANNERCONTAINERTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERCONTAINERTYPE + case "roster": + result = ROSTER_PLANNERCONTAINERTYPE + case "project": + result = PROJECT_PLANNERCONTAINERTYPE + default: + return 0, errors.New("Unknown PlannerContainerType value: " + v) + } + return &result, nil +} +func SerializePlannerContainerType(values []PlannerContainerType) []string { + 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/planner_creation_source_kind.go b/src/internal/connector/graph/betasdk/models/planner_creation_source_kind.go new file mode 100644 index 000000000..5a1051481 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_creation_source_kind.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerCreationSourceKind int + +const ( + NONE_PLANNERCREATIONSOURCEKIND PlannerCreationSourceKind = iota + EXTERNAL_PLANNERCREATIONSOURCEKIND + PUBLICATION_PLANNERCREATIONSOURCEKIND + UNKNOWNFUTUREVALUE_PLANNERCREATIONSOURCEKIND +) + +func (i PlannerCreationSourceKind) String() string { + return []string{"none", "external", "publication", "unknownFutureValue"}[i] +} +func ParsePlannerCreationSourceKind(v string) (interface{}, error) { + result := NONE_PLANNERCREATIONSOURCEKIND + switch v { + case "none": + result = NONE_PLANNERCREATIONSOURCEKIND + case "external": + result = EXTERNAL_PLANNERCREATIONSOURCEKIND + case "publication": + result = PUBLICATION_PLANNERCREATIONSOURCEKIND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERCREATIONSOURCEKIND + default: + return 0, errors.New("Unknown PlannerCreationSourceKind value: " + v) + } + return &result, nil +} +func SerializePlannerCreationSourceKind(values []PlannerCreationSourceKind) []string { + 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/planner_delta.go b/src/internal/connector/graph/betasdk/models/planner_delta.go new file mode 100644 index 000000000..a3fa3fef5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_delta.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerDelta provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerDelta struct { + Entity +} +// NewPlannerDelta instantiates a new plannerDelta and sets the default values. +func NewPlannerDelta()(*PlannerDelta) { + m := &PlannerDelta{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerDeltaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerDeltaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.businessScenarioTask": + return NewBusinessScenarioTask(), nil + case "#microsoft.graph.plannerAssignedToTaskBoardTaskFormat": + return NewPlannerAssignedToTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerBucket": + return NewPlannerBucket(), nil + case "#microsoft.graph.plannerBucketTaskBoardTaskFormat": + return NewPlannerBucketTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerPlan": + return NewPlannerPlan(), nil + case "#microsoft.graph.plannerPlanDetails": + return NewPlannerPlanDetails(), nil + case "#microsoft.graph.plannerProgressTaskBoardTaskFormat": + return NewPlannerProgressTaskBoardTaskFormat(), nil + case "#microsoft.graph.plannerTask": + return NewPlannerTask(), nil + case "#microsoft.graph.plannerTaskDetails": + return NewPlannerTaskDetails(), nil + case "#microsoft.graph.plannerUser": + return NewPlannerUser(), nil + } + } + } + } + return NewPlannerDelta(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerDelta) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *PlannerDelta) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/planner_delta_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_delta_collection_response.go new file mode 100644 index 000000000..9576a100c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_delta_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerDeltaCollectionResponse +type PlannerDeltaCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerDeltaable +} +// NewPlannerDeltaCollectionResponse instantiates a new PlannerDeltaCollectionResponse and sets the default values. +func NewPlannerDeltaCollectionResponse()(*PlannerDeltaCollectionResponse) { + m := &PlannerDeltaCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerDeltaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerDeltaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerDeltaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerDeltaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerDeltaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerDeltaable, len(val)) + for i, v := range val { + res[i] = v.(PlannerDeltaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerDeltaCollectionResponse) GetValue()([]PlannerDeltaable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerDeltaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerDeltaCollectionResponse) SetValue(value []PlannerDeltaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_delta_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_delta_collection_responseable.go new file mode 100644 index 000000000..0335705cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_delta_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerDeltaCollectionResponseable +type PlannerDeltaCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerDeltaable) + SetValue(value []PlannerDeltaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_deltaable.go b/src/internal/connector/graph/betasdk/models/planner_deltaable.go new file mode 100644 index 000000000..9835665da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_deltaable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerDeltaable +type PlannerDeltaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_bucket_source.go b/src/internal/connector/graph/betasdk/models/planner_external_bucket_source.go new file mode 100644 index 000000000..3b1756bf5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_bucket_source.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalBucketSource +type PlannerExternalBucketSource struct { + PlannerBucketCreation + // Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. + contextScenarioId *string + // Nullable. The id of the external entity's containing entity or context. + externalContextId *string + // Nullable. The id of the entity that an external service associates with a bucket. + externalObjectId *string +} +// NewPlannerExternalBucketSource instantiates a new PlannerExternalBucketSource and sets the default values. +func NewPlannerExternalBucketSource()(*PlannerExternalBucketSource) { + m := &PlannerExternalBucketSource{ + PlannerBucketCreation: *NewPlannerBucketCreation(), + } + odataTypeValue := "#microsoft.graph.plannerExternalBucketSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerExternalBucketSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerExternalBucketSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerExternalBucketSource(), nil +} +// GetContextScenarioId gets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalBucketSource) GetContextScenarioId()(*string) { + return m.contextScenarioId +} +// GetExternalContextId gets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalBucketSource) GetExternalContextId()(*string) { + return m.externalContextId +} +// GetExternalObjectId gets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a bucket. +func (m *PlannerExternalBucketSource) GetExternalObjectId()(*string) { + return m.externalObjectId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerExternalBucketSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerBucketCreation.GetFieldDeserializers() + res["contextScenarioId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextScenarioId(val) + } + return nil + } + res["externalContextId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalContextId(val) + } + return nil + } + res["externalObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PlannerExternalBucketSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerBucketCreation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contextScenarioId", m.GetContextScenarioId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalContextId", m.GetExternalContextId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalObjectId", m.GetExternalObjectId()) + if err != nil { + return err + } + } + return nil +} +// SetContextScenarioId sets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalBucketSource) SetContextScenarioId(value *string)() { + m.contextScenarioId = value +} +// SetExternalContextId sets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalBucketSource) SetExternalContextId(value *string)() { + m.externalContextId = value +} +// SetExternalObjectId sets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a bucket. +func (m *PlannerExternalBucketSource) SetExternalObjectId(value *string)() { + m.externalObjectId = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_bucket_sourceable.go b/src/internal/connector/graph/betasdk/models/planner_external_bucket_sourceable.go new file mode 100644 index 000000000..2cd306398 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_bucket_sourceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalBucketSourceable +type PlannerExternalBucketSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerBucketCreationable + GetContextScenarioId()(*string) + GetExternalContextId()(*string) + GetExternalObjectId()(*string) + SetContextScenarioId(value *string)() + SetExternalContextId(value *string)() + SetExternalObjectId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_plan_source.go b/src/internal/connector/graph/betasdk/models/planner_external_plan_source.go new file mode 100644 index 000000000..5c5308ac6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_plan_source.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalPlanSource +type PlannerExternalPlanSource struct { + PlannerPlanCreation + // Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. + contextScenarioId *string + // Nullable. The id of the external entity's containing entity or context. + externalContextId *string + // Nullable. The id of the entity that an external service associates with a plan. + externalObjectId *string +} +// NewPlannerExternalPlanSource instantiates a new PlannerExternalPlanSource and sets the default values. +func NewPlannerExternalPlanSource()(*PlannerExternalPlanSource) { + m := &PlannerExternalPlanSource{ + PlannerPlanCreation: *NewPlannerPlanCreation(), + } + odataTypeValue := "#microsoft.graph.plannerExternalPlanSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerExternalPlanSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerExternalPlanSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerExternalPlanSource(), nil +} +// GetContextScenarioId gets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalPlanSource) GetContextScenarioId()(*string) { + return m.contextScenarioId +} +// GetExternalContextId gets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalPlanSource) GetExternalContextId()(*string) { + return m.externalContextId +} +// GetExternalObjectId gets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a plan. +func (m *PlannerExternalPlanSource) GetExternalObjectId()(*string) { + return m.externalObjectId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerExternalPlanSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerPlanCreation.GetFieldDeserializers() + res["contextScenarioId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextScenarioId(val) + } + return nil + } + res["externalContextId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalContextId(val) + } + return nil + } + res["externalObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PlannerExternalPlanSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerPlanCreation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contextScenarioId", m.GetContextScenarioId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalContextId", m.GetExternalContextId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalObjectId", m.GetExternalObjectId()) + if err != nil { + return err + } + } + return nil +} +// SetContextScenarioId sets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalPlanSource) SetContextScenarioId(value *string)() { + m.contextScenarioId = value +} +// SetExternalContextId sets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalPlanSource) SetExternalContextId(value *string)() { + m.externalContextId = value +} +// SetExternalObjectId sets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a plan. +func (m *PlannerExternalPlanSource) SetExternalObjectId(value *string)() { + m.externalObjectId = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_plan_sourceable.go b/src/internal/connector/graph/betasdk/models/planner_external_plan_sourceable.go new file mode 100644 index 000000000..a78cd3b0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_plan_sourceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalPlanSourceable +type PlannerExternalPlanSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerPlanCreationable + GetContextScenarioId()(*string) + GetExternalContextId()(*string) + GetExternalObjectId()(*string) + SetContextScenarioId(value *string)() + SetExternalContextId(value *string)() + SetExternalObjectId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_references.go b/src/internal/connector/graph/betasdk/models/planner_external_references.go new file mode 100644 index 000000000..9206b5347 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_references.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalReferences +type PlannerExternalReferences 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 OdataType property + odataType *string +} +// NewPlannerExternalReferences instantiates a new plannerExternalReferences and sets the default values. +func NewPlannerExternalReferences()(*PlannerExternalReferences) { + m := &PlannerExternalReferences{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerExternalReferencesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerExternalReferencesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerExternalReferences(), 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 *PlannerExternalReferences) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerExternalReferences) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerExternalReferences) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerExternalReferences) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerExternalReferences) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerExternalReferences) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_referencesable.go b/src/internal/connector/graph/betasdk/models/planner_external_referencesable.go new file mode 100644 index 000000000..e9b5f34f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_referencesable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalReferencesable +type PlannerExternalReferencesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_task_source.go b/src/internal/connector/graph/betasdk/models/planner_external_task_source.go new file mode 100644 index 000000000..ecf8c1f00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_task_source.go @@ -0,0 +1,223 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalTaskSource +type PlannerExternalTaskSource struct { + PlannerTaskCreation + // Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. + contextScenarioId *string + // Specifies how an application should display the link to the associated plannerExternalTaskSource. The possible values are: none, default. + displayLinkType *PlannerExternalTaskSourceDisplayType + // The segments of the name of the external experience. Segments represent a hierarchical structure that allows other apps to display the relationship. + displayNameSegments []string + // Nullable. The id of the external entity's containing entity or context. + externalContextId *string + // Nullable. The id of the entity that an external service associates with a task. + externalObjectId *string + // Nullable. The external Item Version for the object specified by the externalObjectId. + externalObjectVersion *string + // Nullable. URL of the user experience represented by the associated plannerExternalTaskSource. + webUrl *string +} +// NewPlannerExternalTaskSource instantiates a new PlannerExternalTaskSource and sets the default values. +func NewPlannerExternalTaskSource()(*PlannerExternalTaskSource) { + m := &PlannerExternalTaskSource{ + PlannerTaskCreation: *NewPlannerTaskCreation(), + } + odataTypeValue := "#microsoft.graph.plannerExternalTaskSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerExternalTaskSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerExternalTaskSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerExternalTaskSource(), nil +} +// GetContextScenarioId gets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalTaskSource) GetContextScenarioId()(*string) { + return m.contextScenarioId +} +// GetDisplayLinkType gets the displayLinkType property value. Specifies how an application should display the link to the associated plannerExternalTaskSource. The possible values are: none, default. +func (m *PlannerExternalTaskSource) GetDisplayLinkType()(*PlannerExternalTaskSourceDisplayType) { + return m.displayLinkType +} +// GetDisplayNameSegments gets the displayNameSegments property value. The segments of the name of the external experience. Segments represent a hierarchical structure that allows other apps to display the relationship. +func (m *PlannerExternalTaskSource) GetDisplayNameSegments()([]string) { + return m.displayNameSegments +} +// GetExternalContextId gets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalTaskSource) GetExternalContextId()(*string) { + return m.externalContextId +} +// GetExternalObjectId gets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a task. +func (m *PlannerExternalTaskSource) GetExternalObjectId()(*string) { + return m.externalObjectId +} +// GetExternalObjectVersion gets the externalObjectVersion property value. Nullable. The external Item Version for the object specified by the externalObjectId. +func (m *PlannerExternalTaskSource) GetExternalObjectVersion()(*string) { + return m.externalObjectVersion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerExternalTaskSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerTaskCreation.GetFieldDeserializers() + res["contextScenarioId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContextScenarioId(val) + } + return nil + } + res["displayLinkType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerExternalTaskSourceDisplayType) + if err != nil { + return err + } + if val != nil { + m.SetDisplayLinkType(val.(*PlannerExternalTaskSourceDisplayType)) + } + return nil + } + res["displayNameSegments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDisplayNameSegments(res) + } + return nil + } + res["externalContextId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalContextId(val) + } + return nil + } + res["externalObjectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectId(val) + } + return nil + } + res["externalObjectVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalObjectVersion(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetWebUrl gets the webUrl property value. Nullable. URL of the user experience represented by the associated plannerExternalTaskSource. +func (m *PlannerExternalTaskSource) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *PlannerExternalTaskSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerTaskCreation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contextScenarioId", m.GetContextScenarioId()) + if err != nil { + return err + } + } + if m.GetDisplayLinkType() != nil { + cast := (*m.GetDisplayLinkType()).String() + err = writer.WriteStringValue("displayLinkType", &cast) + if err != nil { + return err + } + } + if m.GetDisplayNameSegments() != nil { + err = writer.WriteCollectionOfStringValues("displayNameSegments", m.GetDisplayNameSegments()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalContextId", m.GetExternalContextId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalObjectId", m.GetExternalObjectId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalObjectVersion", m.GetExternalObjectVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetContextScenarioId sets the contextScenarioId property value. Nullable. An identifier for the scenario associated with this external source. This should be in reverse DNS format. For example, Contoso company owned application for customer support would have a value like 'com.constoso.customerSupport'. +func (m *PlannerExternalTaskSource) SetContextScenarioId(value *string)() { + m.contextScenarioId = value +} +// SetDisplayLinkType sets the displayLinkType property value. Specifies how an application should display the link to the associated plannerExternalTaskSource. The possible values are: none, default. +func (m *PlannerExternalTaskSource) SetDisplayLinkType(value *PlannerExternalTaskSourceDisplayType)() { + m.displayLinkType = value +} +// SetDisplayNameSegments sets the displayNameSegments property value. The segments of the name of the external experience. Segments represent a hierarchical structure that allows other apps to display the relationship. +func (m *PlannerExternalTaskSource) SetDisplayNameSegments(value []string)() { + m.displayNameSegments = value +} +// SetExternalContextId sets the externalContextId property value. Nullable. The id of the external entity's containing entity or context. +func (m *PlannerExternalTaskSource) SetExternalContextId(value *string)() { + m.externalContextId = value +} +// SetExternalObjectId sets the externalObjectId property value. Nullable. The id of the entity that an external service associates with a task. +func (m *PlannerExternalTaskSource) SetExternalObjectId(value *string)() { + m.externalObjectId = value +} +// SetExternalObjectVersion sets the externalObjectVersion property value. Nullable. The external Item Version for the object specified by the externalObjectId. +func (m *PlannerExternalTaskSource) SetExternalObjectVersion(value *string)() { + m.externalObjectVersion = value +} +// SetWebUrl sets the webUrl property value. Nullable. URL of the user experience represented by the associated plannerExternalTaskSource. +func (m *PlannerExternalTaskSource) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_external_task_source_display_type.go b/src/internal/connector/graph/betasdk/models/planner_external_task_source_display_type.go new file mode 100644 index 000000000..ca8317ec6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_task_source_display_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerExternalTaskSourceDisplayType int + +const ( + NONE_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE PlannerExternalTaskSourceDisplayType = iota + DEFAULT_ESCAPED_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE + UNKNOWNFUTUREVALUE_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE +) + +func (i PlannerExternalTaskSourceDisplayType) String() string { + return []string{"none", "default", "unknownFutureValue"}[i] +} +func ParsePlannerExternalTaskSourceDisplayType(v string) (interface{}, error) { + result := NONE_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE + switch v { + case "none": + result = NONE_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE + case "default": + result = DEFAULT_ESCAPED_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNEREXTERNALTASKSOURCEDISPLAYTYPE + default: + return 0, errors.New("Unknown PlannerExternalTaskSourceDisplayType value: " + v) + } + return &result, nil +} +func SerializePlannerExternalTaskSourceDisplayType(values []PlannerExternalTaskSourceDisplayType) []string { + 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/planner_external_task_sourceable.go b/src/internal/connector/graph/betasdk/models/planner_external_task_sourceable.go new file mode 100644 index 000000000..af50a0f9f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_external_task_sourceable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerExternalTaskSourceable +type PlannerExternalTaskSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerTaskCreationable + GetContextScenarioId()(*string) + GetDisplayLinkType()(*PlannerExternalTaskSourceDisplayType) + GetDisplayNameSegments()([]string) + GetExternalContextId()(*string) + GetExternalObjectId()(*string) + GetExternalObjectVersion()(*string) + GetWebUrl()(*string) + SetContextScenarioId(value *string)() + SetDisplayLinkType(value *PlannerExternalTaskSourceDisplayType)() + SetDisplayNameSegments(value []string)() + SetExternalContextId(value *string)() + SetExternalObjectId(value *string)() + SetExternalObjectVersion(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collection.go b/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collection.go new file mode 100644 index 000000000..783cecde5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collection.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerFavoritePlanReferenceCollection +type PlannerFavoritePlanReferenceCollection 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 OdataType property + odataType *string +} +// NewPlannerFavoritePlanReferenceCollection instantiates a new plannerFavoritePlanReferenceCollection and sets the default values. +func NewPlannerFavoritePlanReferenceCollection()(*PlannerFavoritePlanReferenceCollection) { + m := &PlannerFavoritePlanReferenceCollection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerFavoritePlanReferenceCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerFavoritePlanReferenceCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerFavoritePlanReferenceCollection(), 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 *PlannerFavoritePlanReferenceCollection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerFavoritePlanReferenceCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerFavoritePlanReferenceCollection) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerFavoritePlanReferenceCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerFavoritePlanReferenceCollection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerFavoritePlanReferenceCollection) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collectionable.go b/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collectionable.go new file mode 100644 index 000000000..f54ca0807 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_favorite_plan_reference_collectionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerFavoritePlanReferenceCollectionable +type PlannerFavoritePlanReferenceCollectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_field_rules.go b/src/internal/connector/graph/betasdk/models/planner_field_rules.go new file mode 100644 index 000000000..64a77944b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_field_rules.go @@ -0,0 +1,135 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerFieldRules +type PlannerFieldRules 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 default rules that apply if no override matches to the current data. + defaultRules []string + // The OdataType property + odataType *string + // Overrides that specify different rules for specific data associated with the field. + overrides []PlannerRuleOverrideable +} +// NewPlannerFieldRules instantiates a new plannerFieldRules and sets the default values. +func NewPlannerFieldRules()(*PlannerFieldRules) { + m := &PlannerFieldRules{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerFieldRulesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerFieldRulesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerFieldRules(), 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 *PlannerFieldRules) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultRules gets the defaultRules property value. The default rules that apply if no override matches to the current data. +func (m *PlannerFieldRules) GetDefaultRules()([]string) { + return m.defaultRules +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerFieldRules) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultRules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDefaultRules(res) + } + 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["overrides"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRuleOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRuleOverrideable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRuleOverrideable) + } + m.SetOverrides(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerFieldRules) GetOdataType()(*string) { + return m.odataType +} +// GetOverrides gets the overrides property value. Overrides that specify different rules for specific data associated with the field. +func (m *PlannerFieldRules) GetOverrides()([]PlannerRuleOverrideable) { + return m.overrides +} +// Serialize serializes information the current object +func (m *PlannerFieldRules) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDefaultRules() != nil { + err := writer.WriteCollectionOfStringValues("defaultRules", m.GetDefaultRules()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOverrides() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOverrides())) + for i, v := range m.GetOverrides() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("overrides", 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 *PlannerFieldRules) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultRules sets the defaultRules property value. The default rules that apply if no override matches to the current data. +func (m *PlannerFieldRules) SetDefaultRules(value []string)() { + m.defaultRules = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerFieldRules) SetOdataType(value *string)() { + m.odataType = value +} +// SetOverrides sets the overrides property value. Overrides that specify different rules for specific data associated with the field. +func (m *PlannerFieldRules) SetOverrides(value []PlannerRuleOverrideable)() { + m.overrides = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_field_rulesable.go b/src/internal/connector/graph/betasdk/models/planner_field_rulesable.go new file mode 100644 index 000000000..c66b6da32 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_field_rulesable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerFieldRulesable +type PlannerFieldRulesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultRules()([]string) + GetOdataType()(*string) + GetOverrides()([]PlannerRuleOverrideable) + SetDefaultRules(value []string)() + SetOdataType(value *string)() + SetOverrides(value []PlannerRuleOverrideable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_group.go b/src/internal/connector/graph/betasdk/models/planner_group.go new file mode 100644 index 000000000..a5d5946ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_group.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerGroup +type PlannerGroup struct { + Entity + // Read-only. Nullable. Returns the plannerPlans owned by the group. + plans []PlannerPlanable +} +// NewPlannerGroup instantiates a new plannerGroup and sets the default values. +func NewPlannerGroup()(*PlannerGroup) { + m := &PlannerGroup{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerGroup(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetPlans(res) + } + return nil + } + return res +} +// GetPlans gets the plans property value. Read-only. Nullable. Returns the plannerPlans owned by the group. +func (m *PlannerGroup) GetPlans()([]PlannerPlanable) { + return m.plans +} +// Serialize serializes information the current object +func (m *PlannerGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPlans())) + for i, v := range m.GetPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("plans", cast) + if err != nil { + return err + } + } + return nil +} +// SetPlans sets the plans property value. Read-only. Nullable. Returns the plannerPlans owned by the group. +func (m *PlannerGroup) SetPlans(value []PlannerPlanable)() { + m.plans = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_groupable.go b/src/internal/connector/graph/betasdk/models/planner_groupable.go new file mode 100644 index 000000000..9e24d1c37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_groupable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerGroupable +type PlannerGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPlans()([]PlannerPlanable) + SetPlans(value []PlannerPlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assignee.go b/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assignee.go new file mode 100644 index 000000000..d3c6fe645 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assignee.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerOrderHintsByAssignee +type PlannerOrderHintsByAssignee 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 OdataType property + odataType *string +} +// NewPlannerOrderHintsByAssignee instantiates a new plannerOrderHintsByAssignee and sets the default values. +func NewPlannerOrderHintsByAssignee()(*PlannerOrderHintsByAssignee) { + m := &PlannerOrderHintsByAssignee{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerOrderHintsByAssigneeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerOrderHintsByAssigneeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerOrderHintsByAssignee(), 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 *PlannerOrderHintsByAssignee) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerOrderHintsByAssignee) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerOrderHintsByAssignee) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerOrderHintsByAssignee) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerOrderHintsByAssignee) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerOrderHintsByAssignee) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assigneeable.go b/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assigneeable.go new file mode 100644 index 000000000..d80828582 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_order_hints_by_assigneeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerOrderHintsByAssigneeable +type PlannerOrderHintsByAssigneeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan.go b/src/internal/connector/graph/betasdk/models/planner_plan.go new file mode 100644 index 000000000..ad8f0099c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan.go @@ -0,0 +1,311 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlan provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerPlan struct { + PlannerDelta + // Collection of buckets in the plan. Read-only. Nullable. + buckets []PlannerBucketable + // Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated. Required. + container PlannerPlanContainerable + // Read-only. Additional user experiences in which this plan is used, represented as plannerPlanContext entries. + contexts PlannerPlanContextCollectionable + // Read-only. The user who created the plan. + createdBy IdentitySetable + // Read-only. Date and time at which the plan is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains information about the origin of the plan. + creationSource PlannerPlanCreationable + // Additional details about the plan. Read-only. Nullable. + details PlannerPlanDetailsable + // The owner property + owner *string + // Collection of tasks in the plan. Read-only. Nullable. + tasks []PlannerTaskable + // Required. Title of the plan. + title *string +} +// NewPlannerPlan instantiates a new plannerPlan and sets the default values. +func NewPlannerPlan()(*PlannerPlan) { + m := &PlannerPlan{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerPlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlan(), nil +} +// GetBuckets gets the buckets property value. Collection of buckets in the plan. Read-only. Nullable. +func (m *PlannerPlan) GetBuckets()([]PlannerBucketable) { + return m.buckets +} +// GetContainer gets the container property value. Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated. Required. +func (m *PlannerPlan) GetContainer()(PlannerPlanContainerable) { + return m.container +} +// GetContexts gets the contexts property value. Read-only. Additional user experiences in which this plan is used, represented as plannerPlanContext entries. +func (m *PlannerPlan) GetContexts()(PlannerPlanContextCollectionable) { + return m.contexts +} +// GetCreatedBy gets the createdBy property value. Read-only. The user who created the plan. +func (m *PlannerPlan) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Read-only. Date and time at which the plan is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerPlan) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationSource gets the creationSource property value. Contains information about the origin of the plan. +func (m *PlannerPlan) GetCreationSource()(PlannerPlanCreationable) { + return m.creationSource +} +// GetDetails gets the details property value. Additional details about the plan. Read-only. Nullable. +func (m *PlannerPlan) GetDetails()(PlannerPlanDetailsable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerBucketFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerBucketable, len(val)) + for i, v := range val { + res[i] = v.(PlannerBucketable) + } + m.SetBuckets(res) + } + return nil + } + res["container"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContainer(val.(PlannerPlanContainerable)) + } + return nil + } + res["contexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanContextCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContexts(val.(PlannerPlanContextCollectionable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanCreationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreationSource(val.(PlannerPlanCreationable)) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(PlannerPlanDetailsable)) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(val) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskable) + } + m.SetTasks(res) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetOwner gets the owner property value. The owner property +func (m *PlannerPlan) GetOwner()(*string) { + return m.owner +} +// GetTasks gets the tasks property value. Collection of tasks in the plan. Read-only. Nullable. +func (m *PlannerPlan) GetTasks()([]PlannerTaskable) { + return m.tasks +} +// GetTitle gets the title property value. Required. Title of the plan. +func (m *PlannerPlan) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *PlannerPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + if m.GetBuckets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) + for i, v := range m.GetBuckets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("buckets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("container", m.GetContainer()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contexts", m.GetContexts()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("creationSource", m.GetCreationSource()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetBuckets sets the buckets property value. Collection of buckets in the plan. Read-only. Nullable. +func (m *PlannerPlan) SetBuckets(value []PlannerBucketable)() { + m.buckets = value +} +// SetContainer sets the container property value. Identifies the container of the plan. Specify only the url, the containerId and type, or all properties. After it is set, this property can’t be updated. Required. +func (m *PlannerPlan) SetContainer(value PlannerPlanContainerable)() { + m.container = value +} +// SetContexts sets the contexts property value. Read-only. Additional user experiences in which this plan is used, represented as plannerPlanContext entries. +func (m *PlannerPlan) SetContexts(value PlannerPlanContextCollectionable)() { + m.contexts = value +} +// SetCreatedBy sets the createdBy property value. Read-only. The user who created the plan. +func (m *PlannerPlan) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Read-only. Date and time at which the plan is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerPlan) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationSource sets the creationSource property value. Contains information about the origin of the plan. +func (m *PlannerPlan) SetCreationSource(value PlannerPlanCreationable)() { + m.creationSource = value +} +// SetDetails sets the details property value. Additional details about the plan. Read-only. Nullable. +func (m *PlannerPlan) SetDetails(value PlannerPlanDetailsable)() { + m.details = value +} +// SetOwner sets the owner property value. The owner property +func (m *PlannerPlan) SetOwner(value *string)() { + m.owner = value +} +// SetTasks sets the tasks property value. Collection of tasks in the plan. Read-only. Nullable. +func (m *PlannerPlan) SetTasks(value []PlannerTaskable)() { + m.tasks = value +} +// SetTitle sets the title property value. Required. Title of the plan. +func (m *PlannerPlan) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_plan_collection_response.go new file mode 100644 index 000000000..200db83d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanCollectionResponse +type PlannerPlanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerPlanable +} +// NewPlannerPlanCollectionResponse instantiates a new PlannerPlanCollectionResponse and sets the default values. +func NewPlannerPlanCollectionResponse()(*PlannerPlanCollectionResponse) { + m := &PlannerPlanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerPlanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerPlanCollectionResponse) GetValue()([]PlannerPlanable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerPlanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerPlanCollectionResponse) SetValue(value []PlannerPlanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_plan_collection_responseable.go new file mode 100644 index 000000000..af3a160c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanCollectionResponseable +type PlannerPlanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerPlanable) + SetValue(value []PlannerPlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration.go new file mode 100644 index 000000000..151bf0f2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration.go @@ -0,0 +1,233 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfiguration +type PlannerPlanConfiguration struct { + Entity + // List the buckets that should be created in the plan. + buckets []PlannerPlanConfigurationBucketDefinitionable + // The identity of the creator of the plan configuration. + createdBy IdentitySetable + // The date and time when the plan configuration was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The language code for the default language to be used for the names of the objects created for the plan. + defaultLanguage *string + // The identity of the user who last modified the plan configuration. + lastModifiedBy IdentitySetable + // The date and time when the plan configuration was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Localized names for the plan configuration. + localizations []PlannerPlanConfigurationLocalizationable +} +// NewPlannerPlanConfiguration instantiates a new plannerPlanConfiguration and sets the default values. +func NewPlannerPlanConfiguration()(*PlannerPlanConfiguration) { + m := &PlannerPlanConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerPlanConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfiguration(), nil +} +// GetBuckets gets the buckets property value. List the buckets that should be created in the plan. +func (m *PlannerPlanConfiguration) GetBuckets()([]PlannerPlanConfigurationBucketDefinitionable) { + return m.buckets +} +// GetCreatedBy gets the createdBy property value. The identity of the creator of the plan configuration. +func (m *PlannerPlanConfiguration) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time when the plan configuration was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PlannerPlanConfiguration) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefaultLanguage gets the defaultLanguage property value. The language code for the default language to be used for the names of the objects created for the plan. +func (m *PlannerPlanConfiguration) GetDefaultLanguage()(*string) { + return m.defaultLanguage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationBucketDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationBucketDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationBucketDefinitionable) + } + m.SetBuckets(res) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["defaultLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLanguage(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["localizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationLocalizationable) + } + m.SetLocalizations(res) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The identity of the user who last modified the plan configuration. +func (m *PlannerPlanConfiguration) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when the plan configuration was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PlannerPlanConfiguration) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLocalizations gets the localizations property value. Localized names for the plan configuration. +func (m *PlannerPlanConfiguration) GetLocalizations()([]PlannerPlanConfigurationLocalizationable) { + return m.localizations +} +// Serialize serializes information the current object +func (m *PlannerPlanConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBuckets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) + for i, v := range m.GetBuckets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("buckets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("defaultLanguage", m.GetDefaultLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetLocalizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizations())) + for i, v := range m.GetLocalizations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("localizations", cast) + if err != nil { + return err + } + } + return nil +} +// SetBuckets sets the buckets property value. List the buckets that should be created in the plan. +func (m *PlannerPlanConfiguration) SetBuckets(value []PlannerPlanConfigurationBucketDefinitionable)() { + m.buckets = value +} +// SetCreatedBy sets the createdBy property value. The identity of the creator of the plan configuration. +func (m *PlannerPlanConfiguration) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time when the plan configuration was created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PlannerPlanConfiguration) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefaultLanguage sets the defaultLanguage property value. The language code for the default language to be used for the names of the objects created for the plan. +func (m *PlannerPlanConfiguration) SetDefaultLanguage(value *string)() { + m.defaultLanguage = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The identity of the user who last modified the plan configuration. +func (m *PlannerPlanConfiguration) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when the plan configuration was last modified. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PlannerPlanConfiguration) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLocalizations sets the localizations property value. Localized names for the plan configuration. +func (m *PlannerPlanConfiguration) SetLocalizations(value []PlannerPlanConfigurationLocalizationable)() { + m.localizations = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition.go new file mode 100644 index 000000000..a6d1b8d3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketDefinition +type PlannerPlanConfigurationBucketDefinition struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Application-specified identifier of the bucket. + externalBucketId *string + // The OdataType property + odataType *string +} +// NewPlannerPlanConfigurationBucketDefinition instantiates a new plannerPlanConfigurationBucketDefinition and sets the default values. +func NewPlannerPlanConfigurationBucketDefinition()(*PlannerPlanConfigurationBucketDefinition) { + m := &PlannerPlanConfigurationBucketDefinition{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanConfigurationBucketDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationBucketDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationBucketDefinition(), 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 *PlannerPlanConfigurationBucketDefinition) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalBucketId gets the externalBucketId property value. Application-specified identifier of the bucket. +func (m *PlannerPlanConfigurationBucketDefinition) GetExternalBucketId()(*string) { + return m.externalBucketId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationBucketDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalBucketId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalBucketId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanConfigurationBucketDefinition) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationBucketDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("externalBucketId", m.GetExternalBucketId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerPlanConfigurationBucketDefinition) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalBucketId sets the externalBucketId property value. Application-specified identifier of the bucket. +func (m *PlannerPlanConfigurationBucketDefinition) SetExternalBucketId(value *string)() { + m.externalBucketId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanConfigurationBucketDefinition) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_response.go new file mode 100644 index 000000000..d65ccc9c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketDefinitionCollectionResponse +type PlannerPlanConfigurationBucketDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerPlanConfigurationBucketDefinitionable +} +// NewPlannerPlanConfigurationBucketDefinitionCollectionResponse instantiates a new PlannerPlanConfigurationBucketDefinitionCollectionResponse and sets the default values. +func NewPlannerPlanConfigurationBucketDefinitionCollectionResponse()(*PlannerPlanConfigurationBucketDefinitionCollectionResponse) { + m := &PlannerPlanConfigurationBucketDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerPlanConfigurationBucketDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationBucketDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationBucketDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationBucketDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationBucketDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationBucketDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationBucketDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerPlanConfigurationBucketDefinitionCollectionResponse) GetValue()([]PlannerPlanConfigurationBucketDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationBucketDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerPlanConfigurationBucketDefinitionCollectionResponse) SetValue(value []PlannerPlanConfigurationBucketDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_responseable.go new file mode 100644 index 000000000..053c2c675 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketDefinitionCollectionResponseable +type PlannerPlanConfigurationBucketDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerPlanConfigurationBucketDefinitionable) + SetValue(value []PlannerPlanConfigurationBucketDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definitionable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definitionable.go new file mode 100644 index 000000000..b95e9b601 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_definitionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketDefinitionable +type PlannerPlanConfigurationBucketDefinitionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalBucketId()(*string) + GetOdataType()(*string) + SetExternalBucketId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization.go new file mode 100644 index 000000000..8a2fcf0ef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketLocalization +type PlannerPlanConfigurationBucketLocalization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Application-specified identifier of the bucket. + externalBucketId *string + // Name of the bucket. + name *string + // The OdataType property + odataType *string +} +// NewPlannerPlanConfigurationBucketLocalization instantiates a new plannerPlanConfigurationBucketLocalization and sets the default values. +func NewPlannerPlanConfigurationBucketLocalization()(*PlannerPlanConfigurationBucketLocalization) { + m := &PlannerPlanConfigurationBucketLocalization{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanConfigurationBucketLocalizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationBucketLocalizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationBucketLocalization(), 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 *PlannerPlanConfigurationBucketLocalization) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExternalBucketId gets the externalBucketId property value. Application-specified identifier of the bucket. +func (m *PlannerPlanConfigurationBucketLocalization) GetExternalBucketId()(*string) { + return m.externalBucketId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationBucketLocalization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["externalBucketId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalBucketId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetName gets the name property value. Name of the bucket. +func (m *PlannerPlanConfigurationBucketLocalization) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanConfigurationBucketLocalization) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationBucketLocalization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("externalBucketId", m.GetExternalBucketId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerPlanConfigurationBucketLocalization) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExternalBucketId sets the externalBucketId property value. Application-specified identifier of the bucket. +func (m *PlannerPlanConfigurationBucketLocalization) SetExternalBucketId(value *string)() { + m.externalBucketId = value +} +// SetName sets the name property value. Name of the bucket. +func (m *PlannerPlanConfigurationBucketLocalization) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanConfigurationBucketLocalization) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_response.go new file mode 100644 index 000000000..a3ff7876e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketLocalizationCollectionResponse +type PlannerPlanConfigurationBucketLocalizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerPlanConfigurationBucketLocalizationable +} +// NewPlannerPlanConfigurationBucketLocalizationCollectionResponse instantiates a new PlannerPlanConfigurationBucketLocalizationCollectionResponse and sets the default values. +func NewPlannerPlanConfigurationBucketLocalizationCollectionResponse()(*PlannerPlanConfigurationBucketLocalizationCollectionResponse) { + m := &PlannerPlanConfigurationBucketLocalizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerPlanConfigurationBucketLocalizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationBucketLocalizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationBucketLocalizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationBucketLocalizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationBucketLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationBucketLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationBucketLocalizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerPlanConfigurationBucketLocalizationCollectionResponse) GetValue()([]PlannerPlanConfigurationBucketLocalizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationBucketLocalizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerPlanConfigurationBucketLocalizationCollectionResponse) SetValue(value []PlannerPlanConfigurationBucketLocalizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_responseable.go new file mode 100644 index 000000000..41f3fa9f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketLocalizationCollectionResponseable +type PlannerPlanConfigurationBucketLocalizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerPlanConfigurationBucketLocalizationable) + SetValue(value []PlannerPlanConfigurationBucketLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localizationable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localizationable.go new file mode 100644 index 000000000..28643d5cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_bucket_localizationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationBucketLocalizationable +type PlannerPlanConfigurationBucketLocalizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExternalBucketId()(*string) + GetName()(*string) + GetOdataType()(*string) + SetExternalBucketId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization.go new file mode 100644 index 000000000..4983361ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationLocalization provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerPlanConfigurationLocalization struct { + Entity + // Localized names for configured buckets in the plan configuration. + buckets []PlannerPlanConfigurationBucketLocalizationable + // The language code associated with the localized names in this object. + languageTag *string + // Localized title of the plan. + planTitle *string +} +// NewPlannerPlanConfigurationLocalization instantiates a new plannerPlanConfigurationLocalization and sets the default values. +func NewPlannerPlanConfigurationLocalization()(*PlannerPlanConfigurationLocalization) { + m := &PlannerPlanConfigurationLocalization{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerPlanConfigurationLocalizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationLocalizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationLocalization(), nil +} +// GetBuckets gets the buckets property value. Localized names for configured buckets in the plan configuration. +func (m *PlannerPlanConfigurationLocalization) GetBuckets()([]PlannerPlanConfigurationBucketLocalizationable) { + return m.buckets +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationLocalization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationBucketLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationBucketLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationBucketLocalizationable) + } + m.SetBuckets(res) + } + return nil + } + 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["planTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanTitle(val) + } + return nil + } + return res +} +// GetLanguageTag gets the languageTag property value. The language code associated with the localized names in this object. +func (m *PlannerPlanConfigurationLocalization) GetLanguageTag()(*string) { + return m.languageTag +} +// GetPlanTitle gets the planTitle property value. Localized title of the plan. +func (m *PlannerPlanConfigurationLocalization) GetPlanTitle()(*string) { + return m.planTitle +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationLocalization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetBuckets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) + for i, v := range m.GetBuckets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("buckets", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("planTitle", m.GetPlanTitle()) + if err != nil { + return err + } + } + return nil +} +// SetBuckets sets the buckets property value. Localized names for configured buckets in the plan configuration. +func (m *PlannerPlanConfigurationLocalization) SetBuckets(value []PlannerPlanConfigurationBucketLocalizationable)() { + m.buckets = value +} +// SetLanguageTag sets the languageTag property value. The language code associated with the localized names in this object. +func (m *PlannerPlanConfigurationLocalization) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetPlanTitle sets the planTitle property value. Localized title of the plan. +func (m *PlannerPlanConfigurationLocalization) SetPlanTitle(value *string)() { + m.planTitle = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_response.go new file mode 100644 index 000000000..0bd2a60ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationLocalizationCollectionResponse +type PlannerPlanConfigurationLocalizationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerPlanConfigurationLocalizationable +} +// NewPlannerPlanConfigurationLocalizationCollectionResponse instantiates a new PlannerPlanConfigurationLocalizationCollectionResponse and sets the default values. +func NewPlannerPlanConfigurationLocalizationCollectionResponse()(*PlannerPlanConfigurationLocalizationCollectionResponse) { + m := &PlannerPlanConfigurationLocalizationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerPlanConfigurationLocalizationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanConfigurationLocalizationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanConfigurationLocalizationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanConfigurationLocalizationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanConfigurationLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanConfigurationLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanConfigurationLocalizationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerPlanConfigurationLocalizationCollectionResponse) GetValue()([]PlannerPlanConfigurationLocalizationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerPlanConfigurationLocalizationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerPlanConfigurationLocalizationCollectionResponse) SetValue(value []PlannerPlanConfigurationLocalizationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_responseable.go new file mode 100644 index 000000000..4996df445 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localization_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationLocalizationCollectionResponseable +type PlannerPlanConfigurationLocalizationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerPlanConfigurationLocalizationable) + SetValue(value []PlannerPlanConfigurationLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localizationable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localizationable.go new file mode 100644 index 000000000..1b2ad5759 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configuration_localizationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationLocalizationable +type PlannerPlanConfigurationLocalizationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuckets()([]PlannerPlanConfigurationBucketLocalizationable) + GetLanguageTag()(*string) + GetPlanTitle()(*string) + SetBuckets(value []PlannerPlanConfigurationBucketLocalizationable)() + SetLanguageTag(value *string)() + SetPlanTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_configurationable.go b/src/internal/connector/graph/betasdk/models/planner_plan_configurationable.go new file mode 100644 index 000000000..c5eb687ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_configurationable.go @@ -0,0 +1,26 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanConfigurationable +type PlannerPlanConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuckets()([]PlannerPlanConfigurationBucketDefinitionable) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultLanguage()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocalizations()([]PlannerPlanConfigurationLocalizationable) + SetBuckets(value []PlannerPlanConfigurationBucketDefinitionable)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultLanguage(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocalizations(value []PlannerPlanConfigurationLocalizationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_container.go b/src/internal/connector/graph/betasdk/models/planner_plan_container.go new file mode 100644 index 000000000..d091ec2c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_container.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContainer +type PlannerPlanContainer 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 identifier of the resource that contains the plan. Optional. + containerId *string + // The OdataType property + odataType *string + // The type of the resource that contains the plan. For supported types, see the previous table. Possible values are: group, unknownFutureValue, roster, and project. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: roster, project. Optional. + type_escaped *PlannerContainerType + // The full canonical URL of the container. Optional. + url *string +} +// NewPlannerPlanContainer instantiates a new plannerPlanContainer and sets the default values. +func NewPlannerPlanContainer()(*PlannerPlanContainer) { + m := &PlannerPlanContainer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanContainer(), 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 *PlannerPlanContainer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContainerId gets the containerId property value. The identifier of the resource that contains the plan. Optional. +func (m *PlannerPlanContainer) GetContainerId()(*string) { + return m.containerId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["containerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContainerId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerContainerType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PlannerContainerType)) + } + return nil + } + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanContainer) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of the resource that contains the plan. For supported types, see the previous table. Possible values are: group, unknownFutureValue, roster, and project. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: roster, project. Optional. +func (m *PlannerPlanContainer) GetType()(*PlannerContainerType) { + return m.type_escaped +} +// GetUrl gets the url property value. The full canonical URL of the container. Optional. +func (m *PlannerPlanContainer) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *PlannerPlanContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("containerId", m.GetContainerId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).String() + err := writer.WriteStringValue("type", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("url", m.GetUrl()) + 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 *PlannerPlanContainer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContainerId sets the containerId property value. The identifier of the resource that contains the plan. Optional. +func (m *PlannerPlanContainer) SetContainerId(value *string)() { + m.containerId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanContainer) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of the resource that contains the plan. For supported types, see the previous table. Possible values are: group, unknownFutureValue, roster, and project. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value in this evolvable enum: roster, project. Optional. +func (m *PlannerPlanContainer) SetType(value *PlannerContainerType)() { + m.type_escaped = value +} +// SetUrl sets the url property value. The full canonical URL of the container. Optional. +func (m *PlannerPlanContainer) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_containerable.go b/src/internal/connector/graph/betasdk/models/planner_plan_containerable.go new file mode 100644 index 000000000..14f6840c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_containerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContainerable +type PlannerPlanContainerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainerId()(*string) + GetOdataType()(*string) + GetType()(*PlannerContainerType) + GetUrl()(*string) + SetContainerId(value *string)() + SetOdataType(value *string)() + SetType(value *PlannerContainerType)() + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_context_collection.go b/src/internal/connector/graph/betasdk/models/planner_plan_context_collection.go new file mode 100644 index 000000000..daca06d4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_context_collection.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContextCollection +type PlannerPlanContextCollection 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 OdataType property + odataType *string +} +// NewPlannerPlanContextCollection instantiates a new plannerPlanContextCollection and sets the default values. +func NewPlannerPlanContextCollection()(*PlannerPlanContextCollection) { + m := &PlannerPlanContextCollection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanContextCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanContextCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanContextCollection(), 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 *PlannerPlanContextCollection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanContextCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanContextCollection) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerPlanContextCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerPlanContextCollection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanContextCollection) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_context_collectionable.go b/src/internal/connector/graph/betasdk/models/planner_plan_context_collectionable.go new file mode 100644 index 000000000..042f88994 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_context_collectionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContextCollectionable +type PlannerPlanContextCollectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collection.go b/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collection.go new file mode 100644 index 000000000..eca815117 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collection.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContextDetailsCollection +type PlannerPlanContextDetailsCollection 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 OdataType property + odataType *string +} +// NewPlannerPlanContextDetailsCollection instantiates a new plannerPlanContextDetailsCollection and sets the default values. +func NewPlannerPlanContextDetailsCollection()(*PlannerPlanContextDetailsCollection) { + m := &PlannerPlanContextDetailsCollection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanContextDetailsCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanContextDetailsCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanContextDetailsCollection(), 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 *PlannerPlanContextDetailsCollection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanContextDetailsCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanContextDetailsCollection) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerPlanContextDetailsCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerPlanContextDetailsCollection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanContextDetailsCollection) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collectionable.go b/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collectionable.go new file mode 100644 index 000000000..319f67242 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_context_details_collectionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanContextDetailsCollectionable +type PlannerPlanContextDetailsCollectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_creation.go b/src/internal/connector/graph/betasdk/models/planner_plan_creation.go new file mode 100644 index 000000000..7264da573 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_creation.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanCreation +type PlannerPlanCreation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies what kind of creation source the plan is created with. The possible values are: external, publication and unknownFutureValue. + creationSourceKind *PlannerCreationSourceKind + // The OdataType property + odataType *string +} +// NewPlannerPlanCreation instantiates a new plannerPlanCreation and sets the default values. +func NewPlannerPlanCreation()(*PlannerPlanCreation) { + m := &PlannerPlanCreation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPlanCreationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanCreationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.plannerExternalPlanSource": + return NewPlannerExternalPlanSource(), nil + } + } + } + } + return NewPlannerPlanCreation(), 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 *PlannerPlanCreation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreationSourceKind gets the creationSourceKind property value. Specifies what kind of creation source the plan is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerPlanCreation) GetCreationSourceKind()(*PlannerCreationSourceKind) { + return m.creationSourceKind +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanCreation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["creationSourceKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerCreationSourceKind) + if err != nil { + return err + } + if val != nil { + m.SetCreationSourceKind(val.(*PlannerCreationSourceKind)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPlanCreation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerPlanCreation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCreationSourceKind() != nil { + cast := (*m.GetCreationSourceKind()).String() + err := writer.WriteStringValue("creationSourceKind", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerPlanCreation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreationSourceKind sets the creationSourceKind property value. Specifies what kind of creation source the plan is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerPlanCreation) SetCreationSourceKind(value *PlannerCreationSourceKind)() { + m.creationSourceKind = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPlanCreation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_creationable.go b/src/internal/connector/graph/betasdk/models/planner_plan_creationable.go new file mode 100644 index 000000000..56d76f2b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_creationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanCreationable +type PlannerPlanCreationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationSourceKind()(*PlannerCreationSourceKind) + GetOdataType()(*string) + SetCreationSourceKind(value *PlannerCreationSourceKind)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_details.go b/src/internal/connector/graph/betasdk/models/planner_plan_details.go new file mode 100644 index 000000000..e38aa441a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_details.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanDetails +type PlannerPlanDetails struct { + PlannerDelta + // An object that specifies the descriptions of the 25 categories that can be associated with tasks in the plan. + categoryDescriptions PlannerCategoryDescriptionsable + // A collection of additional information associated with plannerPlanContext entries that are defined for the plannerPlan container. Read-only. + contextDetails PlannerPlanContextDetailsCollectionable + // The set of user IDs that this plan is shared with. If you are using Microsoft 365 groups, use the groups API to manage group membership to share the group's plan. You can also add existing members of the group to this collection, although it is not required in order for them to access the plan owned by the group. + sharedWith PlannerUserIdsable +} +// NewPlannerPlanDetails instantiates a new plannerPlanDetails and sets the default values. +func NewPlannerPlanDetails()(*PlannerPlanDetails) { + m := &PlannerPlanDetails{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerPlanDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanDetails(), nil +} +// GetCategoryDescriptions gets the categoryDescriptions property value. An object that specifies the descriptions of the 25 categories that can be associated with tasks in the plan. +func (m *PlannerPlanDetails) GetCategoryDescriptions()(PlannerCategoryDescriptionsable) { + return m.categoryDescriptions +} +// GetContextDetails gets the contextDetails property value. A collection of additional information associated with plannerPlanContext entries that are defined for the plannerPlan container. Read-only. +func (m *PlannerPlanDetails) GetContextDetails()(PlannerPlanContextDetailsCollectionable) { + return m.contextDetails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["categoryDescriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerCategoryDescriptionsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCategoryDescriptions(val.(PlannerCategoryDescriptionsable)) + } + return nil + } + res["contextDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerPlanContextDetailsCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetContextDetails(val.(PlannerPlanContextDetailsCollectionable)) + } + return nil + } + res["sharedWith"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerUserIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharedWith(val.(PlannerUserIdsable)) + } + return nil + } + return res +} +// GetSharedWith gets the sharedWith property value. The set of user IDs that this plan is shared with. If you are using Microsoft 365 groups, use the groups API to manage group membership to share the group's plan. You can also add existing members of the group to this collection, although it is not required in order for them to access the plan owned by the group. +func (m *PlannerPlanDetails) GetSharedWith()(PlannerUserIdsable) { + return m.sharedWith +} +// Serialize serializes information the current object +func (m *PlannerPlanDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("categoryDescriptions", m.GetCategoryDescriptions()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("contextDetails", m.GetContextDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sharedWith", m.GetSharedWith()) + if err != nil { + return err + } + } + return nil +} +// SetCategoryDescriptions sets the categoryDescriptions property value. An object that specifies the descriptions of the 25 categories that can be associated with tasks in the plan. +func (m *PlannerPlanDetails) SetCategoryDescriptions(value PlannerCategoryDescriptionsable)() { + m.categoryDescriptions = value +} +// SetContextDetails sets the contextDetails property value. A collection of additional information associated with plannerPlanContext entries that are defined for the plannerPlan container. Read-only. +func (m *PlannerPlanDetails) SetContextDetails(value PlannerPlanContextDetailsCollectionable)() { + m.contextDetails = value +} +// SetSharedWith sets the sharedWith property value. The set of user IDs that this plan is shared with. If you are using Microsoft 365 groups, use the groups API to manage group membership to share the group's plan. You can also add existing members of the group to this collection, although it is not required in order for them to access the plan owned by the group. +func (m *PlannerPlanDetails) SetSharedWith(value PlannerUserIdsable)() { + m.sharedWith = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_response.go new file mode 100644 index 000000000..6092b8b0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanDetailsCollectionResponse +type PlannerPlanDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerPlanDetailsable +} +// NewPlannerPlanDetailsCollectionResponse instantiates a new PlannerPlanDetailsCollectionResponse and sets the default values. +func NewPlannerPlanDetailsCollectionResponse()(*PlannerPlanDetailsCollectionResponse) { + m := &PlannerPlanDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerPlanDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanDetailsable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerPlanDetailsCollectionResponse) GetValue()([]PlannerPlanDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerPlanDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerPlanDetailsCollectionResponse) SetValue(value []PlannerPlanDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_responseable.go new file mode 100644 index 000000000..92b0d34eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanDetailsCollectionResponseable +type PlannerPlanDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerPlanDetailsable) + SetValue(value []PlannerPlanDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_detailsable.go b/src/internal/connector/graph/betasdk/models/planner_plan_detailsable.go new file mode 100644 index 000000000..75b867ef4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_detailsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanDetailsable +type PlannerPlanDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetCategoryDescriptions()(PlannerCategoryDescriptionsable) + GetContextDetails()(PlannerPlanContextDetailsCollectionable) + GetSharedWith()(PlannerUserIdsable) + SetCategoryDescriptions(value PlannerCategoryDescriptionsable)() + SetContextDetails(value PlannerPlanContextDetailsCollectionable)() + SetSharedWith(value PlannerUserIdsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_property_rule.go b/src/internal/connector/graph/betasdk/models/planner_plan_property_rule.go new file mode 100644 index 000000000..b5f6b498e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_property_rule.go @@ -0,0 +1,148 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanPropertyRule +type PlannerPlanPropertyRule struct { + PlannerPropertyRule + // The buckets property + buckets []string + // The categoryDescriptions property + categoryDescriptions PlannerFieldRulesable + // The tasks property + tasks []string + // The title property + title PlannerFieldRulesable +} +// NewPlannerPlanPropertyRule instantiates a new PlannerPlanPropertyRule and sets the default values. +func NewPlannerPlanPropertyRule()(*PlannerPlanPropertyRule) { + m := &PlannerPlanPropertyRule{ + PlannerPropertyRule: *NewPlannerPropertyRule(), + } + odataTypeValue := "#microsoft.graph.plannerPlanPropertyRule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerPlanPropertyRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPlanPropertyRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerPlanPropertyRule(), nil +} +// GetBuckets gets the buckets property value. The buckets property +func (m *PlannerPlanPropertyRule) GetBuckets()([]string) { + return m.buckets +} +// GetCategoryDescriptions gets the categoryDescriptions property value. The categoryDescriptions property +func (m *PlannerPlanPropertyRule) GetCategoryDescriptions()(PlannerFieldRulesable) { + return m.categoryDescriptions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPlanPropertyRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerPropertyRule.GetFieldDeserializers() + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetBuckets(res) + } + return nil + } + res["categoryDescriptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCategoryDescriptions(val.(PlannerFieldRulesable)) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTasks(res) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTitle(val.(PlannerFieldRulesable)) + } + return nil + } + return res +} +// GetTasks gets the tasks property value. The tasks property +func (m *PlannerPlanPropertyRule) GetTasks()([]string) { + return m.tasks +} +// GetTitle gets the title property value. The title property +func (m *PlannerPlanPropertyRule) GetTitle()(PlannerFieldRulesable) { + return m.title +} +// Serialize serializes information the current object +func (m *PlannerPlanPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerPropertyRule.Serialize(writer) + if err != nil { + return err + } + if m.GetBuckets() != nil { + err = writer.WriteCollectionOfStringValues("buckets", m.GetBuckets()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("categoryDescriptions", m.GetCategoryDescriptions()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + err = writer.WriteCollectionOfStringValues("tasks", m.GetTasks()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetBuckets sets the buckets property value. The buckets property +func (m *PlannerPlanPropertyRule) SetBuckets(value []string)() { + m.buckets = value +} +// SetCategoryDescriptions sets the categoryDescriptions property value. The categoryDescriptions property +func (m *PlannerPlanPropertyRule) SetCategoryDescriptions(value PlannerFieldRulesable)() { + m.categoryDescriptions = value +} +// SetTasks sets the tasks property value. The tasks property +func (m *PlannerPlanPropertyRule) SetTasks(value []string)() { + m.tasks = value +} +// SetTitle sets the title property value. The title property +func (m *PlannerPlanPropertyRule) SetTitle(value PlannerFieldRulesable)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_plan_property_ruleable.go b/src/internal/connector/graph/betasdk/models/planner_plan_property_ruleable.go new file mode 100644 index 000000000..71749fb7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_plan_property_ruleable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanPropertyRuleable +type PlannerPlanPropertyRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerPropertyRuleable + GetBuckets()([]string) + GetCategoryDescriptions()(PlannerFieldRulesable) + GetTasks()([]string) + GetTitle()(PlannerFieldRulesable) + SetBuckets(value []string)() + SetCategoryDescriptions(value PlannerFieldRulesable)() + SetTasks(value []string)() + SetTitle(value PlannerFieldRulesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_planable.go b/src/internal/connector/graph/betasdk/models/planner_planable.go new file mode 100644 index 000000000..c95368d3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_planable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPlanable +type PlannerPlanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetBuckets()([]PlannerBucketable) + GetContainer()(PlannerPlanContainerable) + GetContexts()(PlannerPlanContextCollectionable) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationSource()(PlannerPlanCreationable) + GetDetails()(PlannerPlanDetailsable) + GetOwner()(*string) + GetTasks()([]PlannerTaskable) + GetTitle()(*string) + SetBuckets(value []PlannerBucketable)() + SetContainer(value PlannerPlanContainerable)() + SetContexts(value PlannerPlanContextCollectionable)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationSource(value PlannerPlanCreationable)() + SetDetails(value PlannerPlanDetailsable)() + SetOwner(value *string)() + SetTasks(value []PlannerTaskable)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_preview_type.go b/src/internal/connector/graph/betasdk/models/planner_preview_type.go new file mode 100644 index 000000000..c0ca27921 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_preview_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerPreviewType int + +const ( + AUTOMATIC_PLANNERPREVIEWTYPE PlannerPreviewType = iota + NOPREVIEW_PLANNERPREVIEWTYPE + CHECKLIST_PLANNERPREVIEWTYPE + DESCRIPTION_PLANNERPREVIEWTYPE + REFERENCE_PLANNERPREVIEWTYPE +) + +func (i PlannerPreviewType) String() string { + return []string{"automatic", "noPreview", "checklist", "description", "reference"}[i] +} +func ParsePlannerPreviewType(v string) (interface{}, error) { + result := AUTOMATIC_PLANNERPREVIEWTYPE + switch v { + case "automatic": + result = AUTOMATIC_PLANNERPREVIEWTYPE + case "noPreview": + result = NOPREVIEW_PLANNERPREVIEWTYPE + case "checklist": + result = CHECKLIST_PLANNERPREVIEWTYPE + case "description": + result = DESCRIPTION_PLANNERPREVIEWTYPE + case "reference": + result = REFERENCE_PLANNERPREVIEWTYPE + default: + return 0, errors.New("Unknown PlannerPreviewType value: " + v) + } + return &result, nil +} +func SerializePlannerPreviewType(values []PlannerPreviewType) []string { + 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/planner_progress_task_board_task_format.go b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format.go new file mode 100644 index 000000000..68335ce08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerProgressTaskBoardTaskFormat +type PlannerProgressTaskBoardTaskFormat struct { + PlannerDelta + // Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner. + orderHint *string +} +// NewPlannerProgressTaskBoardTaskFormat instantiates a new plannerProgressTaskBoardTaskFormat and sets the default values. +func NewPlannerProgressTaskBoardTaskFormat()(*PlannerProgressTaskBoardTaskFormat) { + m := &PlannerProgressTaskBoardTaskFormat{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerProgressTaskBoardTaskFormatFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerProgressTaskBoardTaskFormatFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerProgressTaskBoardTaskFormat(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerProgressTaskBoardTaskFormat) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["orderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderHint(val) + } + return nil + } + return res +} +// GetOrderHint gets the orderHint property value. Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner. +func (m *PlannerProgressTaskBoardTaskFormat) GetOrderHint()(*string) { + return m.orderHint +} +// Serialize serializes information the current object +func (m *PlannerProgressTaskBoardTaskFormat) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("orderHint", m.GetOrderHint()) + if err != nil { + return err + } + } + return nil +} +// SetOrderHint sets the orderHint property value. Hint value used to order the task on the progress view of the task board. For details about the supported format, see Using order hints in Planner. +func (m *PlannerProgressTaskBoardTaskFormat) SetOrderHint(value *string)() { + m.orderHint = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_response.go new file mode 100644 index 000000000..12c72ad4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerProgressTaskBoardTaskFormatCollectionResponse +type PlannerProgressTaskBoardTaskFormatCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerProgressTaskBoardTaskFormatable +} +// NewPlannerProgressTaskBoardTaskFormatCollectionResponse instantiates a new PlannerProgressTaskBoardTaskFormatCollectionResponse and sets the default values. +func NewPlannerProgressTaskBoardTaskFormatCollectionResponse()(*PlannerProgressTaskBoardTaskFormatCollectionResponse) { + m := &PlannerProgressTaskBoardTaskFormatCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerProgressTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerProgressTaskBoardTaskFormatCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerProgressTaskBoardTaskFormatCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerProgressTaskBoardTaskFormatCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerProgressTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerProgressTaskBoardTaskFormatable, len(val)) + for i, v := range val { + res[i] = v.(PlannerProgressTaskBoardTaskFormatable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerProgressTaskBoardTaskFormatCollectionResponse) GetValue()([]PlannerProgressTaskBoardTaskFormatable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerProgressTaskBoardTaskFormatCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerProgressTaskBoardTaskFormatCollectionResponse) SetValue(value []PlannerProgressTaskBoardTaskFormatable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_responseable.go new file mode 100644 index 000000000..09549e788 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_format_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerProgressTaskBoardTaskFormatCollectionResponseable +type PlannerProgressTaskBoardTaskFormatCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerProgressTaskBoardTaskFormatable) + SetValue(value []PlannerProgressTaskBoardTaskFormatable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_formatable.go b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_formatable.go new file mode 100644 index 000000000..a0181fb02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_progress_task_board_task_formatable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerProgressTaskBoardTaskFormatable +type PlannerProgressTaskBoardTaskFormatable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetOrderHint()(*string) + SetOrderHint(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_property_rule.go b/src/internal/connector/graph/betasdk/models/planner_property_rule.go new file mode 100644 index 000000000..7999ea924 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_property_rule.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPropertyRule +type PlannerPropertyRule 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 OdataType property + odataType *string + // Identifies which type of property rules is represented by this instance. The possible values are: taskRule, bucketRule, planRule, unknownFutureValue. + ruleKind *PlannerRuleKind +} +// NewPlannerPropertyRule instantiates a new plannerPropertyRule and sets the default values. +func NewPlannerPropertyRule()(*PlannerPropertyRule) { + m := &PlannerPropertyRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerPropertyRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerPropertyRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.plannerBucketPropertyRule": + return NewPlannerBucketPropertyRule(), nil + case "#microsoft.graph.plannerPlanPropertyRule": + return NewPlannerPlanPropertyRule(), nil + case "#microsoft.graph.plannerTaskPropertyRule": + return NewPlannerTaskPropertyRule(), nil + } + } + } + } + return NewPlannerPropertyRule(), 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 *PlannerPropertyRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerPropertyRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["ruleKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerRuleKind) + if err != nil { + return err + } + if val != nil { + m.SetRuleKind(val.(*PlannerRuleKind)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerPropertyRule) GetOdataType()(*string) { + return m.odataType +} +// GetRuleKind gets the ruleKind property value. Identifies which type of property rules is represented by this instance. The possible values are: taskRule, bucketRule, planRule, unknownFutureValue. +func (m *PlannerPropertyRule) GetRuleKind()(*PlannerRuleKind) { + return m.ruleKind +} +// Serialize serializes information the current object +func (m *PlannerPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRuleKind() != nil { + cast := (*m.GetRuleKind()).String() + err := writer.WriteStringValue("ruleKind", &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 *PlannerPropertyRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerPropertyRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetRuleKind sets the ruleKind property value. Identifies which type of property rules is represented by this instance. The possible values are: taskRule, bucketRule, planRule, unknownFutureValue. +func (m *PlannerPropertyRule) SetRuleKind(value *PlannerRuleKind)() { + m.ruleKind = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_property_ruleable.go b/src/internal/connector/graph/betasdk/models/planner_property_ruleable.go new file mode 100644 index 000000000..092d8628a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_property_ruleable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerPropertyRuleable +type PlannerPropertyRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRuleKind()(*PlannerRuleKind) + SetOdataType(value *string)() + SetRuleKind(value *PlannerRuleKind)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collection.go b/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collection.go new file mode 100644 index 000000000..13d240ede --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collection.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRecentPlanReferenceCollection +type PlannerRecentPlanReferenceCollection 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 OdataType property + odataType *string +} +// NewPlannerRecentPlanReferenceCollection instantiates a new plannerRecentPlanReferenceCollection and sets the default values. +func NewPlannerRecentPlanReferenceCollection()(*PlannerRecentPlanReferenceCollection) { + m := &PlannerRecentPlanReferenceCollection{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerRecentPlanReferenceCollectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRecentPlanReferenceCollectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRecentPlanReferenceCollection(), 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 *PlannerRecentPlanReferenceCollection) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRecentPlanReferenceCollection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerRecentPlanReferenceCollection) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerRecentPlanReferenceCollection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerRecentPlanReferenceCollection) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerRecentPlanReferenceCollection) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collectionable.go b/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collectionable.go new file mode 100644 index 000000000..9812f4c1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_recent_plan_reference_collectionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRecentPlanReferenceCollectionable +type PlannerRecentPlanReferenceCollectionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_type.go b/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_type.go new file mode 100644 index 000000000..3c72b40ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_type.go @@ -0,0 +1,63 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRelationshipBasedUserType +type PlannerRelationshipBasedUserType struct { + PlannerTaskConfigurationRoleBase + // The role property + role *PlannerRelationshipUserRoles +} +// NewPlannerRelationshipBasedUserType instantiates a new PlannerRelationshipBasedUserType and sets the default values. +func NewPlannerRelationshipBasedUserType()(*PlannerRelationshipBasedUserType) { + m := &PlannerRelationshipBasedUserType{ + PlannerTaskConfigurationRoleBase: *NewPlannerTaskConfigurationRoleBase(), + } + odataTypeValue := "#microsoft.graph.plannerRelationshipBasedUserType"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerRelationshipBasedUserTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRelationshipBasedUserTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRelationshipBasedUserType(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRelationshipBasedUserType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerTaskConfigurationRoleBase.GetFieldDeserializers() + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerRelationshipUserRoles) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(*PlannerRelationshipUserRoles)) + } + return nil + } + return res +} +// GetRole gets the role property value. The role property +func (m *PlannerRelationshipBasedUserType) GetRole()(*PlannerRelationshipUserRoles) { + return m.role +} +// Serialize serializes information the current object +func (m *PlannerRelationshipBasedUserType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerTaskConfigurationRoleBase.Serialize(writer) + if err != nil { + return err + } + if m.GetRole() != nil { + cast := (*m.GetRole()).String() + err = writer.WriteStringValue("role", &cast) + if err != nil { + return err + } + } + return nil +} +// SetRole sets the role property value. The role property +func (m *PlannerRelationshipBasedUserType) SetRole(value *PlannerRelationshipUserRoles)() { + m.role = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_typeable.go b/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_typeable.go new file mode 100644 index 000000000..b5ac08c26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_relationship_based_user_typeable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRelationshipBasedUserTypeable +type PlannerRelationshipBasedUserTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerTaskConfigurationRoleBaseable + GetRole()(*PlannerRelationshipUserRoles) + SetRole(value *PlannerRelationshipUserRoles)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_relationship_user_roles.go b/src/internal/connector/graph/betasdk/models/planner_relationship_user_roles.go new file mode 100644 index 000000000..f0e747581 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_relationship_user_roles.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerRelationshipUserRoles int + +const ( + DEFAULTRULES_PLANNERRELATIONSHIPUSERROLES PlannerRelationshipUserRoles = iota + GROUPOWNERS_PLANNERRELATIONSHIPUSERROLES + GROUPMEMBERS_PLANNERRELATIONSHIPUSERROLES + TASKASSIGNEES_PLANNERRELATIONSHIPUSERROLES + APPLICATIONS_PLANNERRELATIONSHIPUSERROLES + UNKNOWNFUTUREVALUE_PLANNERRELATIONSHIPUSERROLES +) + +func (i PlannerRelationshipUserRoles) String() string { + return []string{"defaultRules", "groupOwners", "groupMembers", "taskAssignees", "applications", "unknownFutureValue"}[i] +} +func ParsePlannerRelationshipUserRoles(v string) (interface{}, error) { + result := DEFAULTRULES_PLANNERRELATIONSHIPUSERROLES + switch v { + case "defaultRules": + result = DEFAULTRULES_PLANNERRELATIONSHIPUSERROLES + case "groupOwners": + result = GROUPOWNERS_PLANNERRELATIONSHIPUSERROLES + case "groupMembers": + result = GROUPMEMBERS_PLANNERRELATIONSHIPUSERROLES + case "taskAssignees": + result = TASKASSIGNEES_PLANNERRELATIONSHIPUSERROLES + case "applications": + result = APPLICATIONS_PLANNERRELATIONSHIPUSERROLES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERRELATIONSHIPUSERROLES + default: + return 0, errors.New("Unknown PlannerRelationshipUserRoles value: " + v) + } + return &result, nil +} +func SerializePlannerRelationshipUserRoles(values []PlannerRelationshipUserRoles) []string { + 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/planner_roster.go b/src/internal/connector/graph/betasdk/models/planner_roster.go new file mode 100644 index 000000000..5c68c2678 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster.go @@ -0,0 +1,102 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRoster provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerRoster struct { + Entity + // Retrieves the members of the plannerRoster. + members []PlannerRosterMemberable + // Retrieves the plans contained by the plannerRoster. + plans []PlannerPlanable +} +// NewPlannerRoster instantiates a new plannerRoster and sets the default values. +func NewPlannerRoster()(*PlannerRoster) { + m := &PlannerRoster{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerRosterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRosterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRoster(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRoster) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["members"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRosterMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRosterMemberable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRosterMemberable) + } + m.SetMembers(res) + } + return nil + } + res["plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetPlans(res) + } + return nil + } + return res +} +// GetMembers gets the members property value. Retrieves the members of the plannerRoster. +func (m *PlannerRoster) GetMembers()([]PlannerRosterMemberable) { + return m.members +} +// GetPlans gets the plans property value. Retrieves the plans contained by the plannerRoster. +func (m *PlannerRoster) GetPlans()([]PlannerPlanable) { + return m.plans +} +// Serialize serializes information the current object +func (m *PlannerRoster) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMembers())) + for i, v := range m.GetMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("members", cast) + if err != nil { + return err + } + } + if m.GetPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPlans())) + for i, v := range m.GetPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("plans", cast) + if err != nil { + return err + } + } + return nil +} +// SetMembers sets the members property value. Retrieves the members of the plannerRoster. +func (m *PlannerRoster) SetMembers(value []PlannerRosterMemberable)() { + m.members = value +} +// SetPlans sets the plans property value. Retrieves the plans contained by the plannerRoster. +func (m *PlannerRoster) SetPlans(value []PlannerPlanable)() { + m.plans = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_roster_collection_response.go new file mode 100644 index 000000000..6c1417b3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterCollectionResponse +type PlannerRosterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerRosterable +} +// NewPlannerRosterCollectionResponse instantiates a new PlannerRosterCollectionResponse and sets the default values. +func NewPlannerRosterCollectionResponse()(*PlannerRosterCollectionResponse) { + m := &PlannerRosterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerRosterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRosterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRosterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRosterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRosterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRosterable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRosterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerRosterCollectionResponse) GetValue()([]PlannerRosterable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerRosterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerRosterCollectionResponse) SetValue(value []PlannerRosterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_roster_collection_responseable.go new file mode 100644 index 000000000..ce9d5e856 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterCollectionResponseable +type PlannerRosterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerRosterable) + SetValue(value []PlannerRosterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_member.go b/src/internal/connector/graph/betasdk/models/planner_roster_member.go new file mode 100644 index 000000000..af7ef6b95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_member.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterMember provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerRosterMember struct { + Entity + // Additional roles associated with the PlannerRosterMember, which determines permissions of the member in the plannerRoster. Currently there are no available roles to assign, and every member has full control over the contents of the plannerRoster. + roles []string + // Identifier of the tenant the user belongs to. Currently only the users from the same tenant can be added to a plannerRoster. + tenantId *string + // Identifier of the user. + userId *string +} +// NewPlannerRosterMember instantiates a new plannerRosterMember and sets the default values. +func NewPlannerRosterMember()(*PlannerRosterMember) { + m := &PlannerRosterMember{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerRosterMemberFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRosterMemberFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRosterMember(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRosterMember) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoles(res) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetRoles gets the roles property value. Additional roles associated with the PlannerRosterMember, which determines permissions of the member in the plannerRoster. Currently there are no available roles to assign, and every member has full control over the contents of the plannerRoster. +func (m *PlannerRosterMember) GetRoles()([]string) { + return m.roles +} +// GetTenantId gets the tenantId property value. Identifier of the tenant the user belongs to. Currently only the users from the same tenant can be added to a plannerRoster. +func (m *PlannerRosterMember) GetTenantId()(*string) { + return m.tenantId +} +// GetUserId gets the userId property value. Identifier of the user. +func (m *PlannerRosterMember) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *PlannerRosterMember) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetRoles() != nil { + err = writer.WriteCollectionOfStringValues("roles", m.GetRoles()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetRoles sets the roles property value. Additional roles associated with the PlannerRosterMember, which determines permissions of the member in the plannerRoster. Currently there are no available roles to assign, and every member has full control over the contents of the plannerRoster. +func (m *PlannerRosterMember) SetRoles(value []string)() { + m.roles = value +} +// SetTenantId sets the tenantId property value. Identifier of the tenant the user belongs to. Currently only the users from the same tenant can be added to a plannerRoster. +func (m *PlannerRosterMember) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUserId sets the userId property value. Identifier of the user. +func (m *PlannerRosterMember) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_response.go new file mode 100644 index 000000000..08f34ec38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterMemberCollectionResponse +type PlannerRosterMemberCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerRosterMemberable +} +// NewPlannerRosterMemberCollectionResponse instantiates a new PlannerRosterMemberCollectionResponse and sets the default values. +func NewPlannerRosterMemberCollectionResponse()(*PlannerRosterMemberCollectionResponse) { + m := &PlannerRosterMemberCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerRosterMemberCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRosterMemberCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRosterMemberCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRosterMemberCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRosterMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRosterMemberable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRosterMemberable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerRosterMemberCollectionResponse) GetValue()([]PlannerRosterMemberable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerRosterMemberCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerRosterMemberCollectionResponse) SetValue(value []PlannerRosterMemberable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_responseable.go new file mode 100644 index 000000000..84cbec776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_member_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterMemberCollectionResponseable +type PlannerRosterMemberCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerRosterMemberable) + SetValue(value []PlannerRosterMemberable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_roster_memberable.go b/src/internal/connector/graph/betasdk/models/planner_roster_memberable.go new file mode 100644 index 000000000..b1b92a13c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_roster_memberable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterMemberable +type PlannerRosterMemberable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRoles()([]string) + GetTenantId()(*string) + GetUserId()(*string) + SetRoles(value []string)() + SetTenantId(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_rosterable.go b/src/internal/connector/graph/betasdk/models/planner_rosterable.go new file mode 100644 index 000000000..6b27fb58a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rosterable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRosterable +type PlannerRosterable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMembers()([]PlannerRosterMemberable) + GetPlans()([]PlannerPlanable) + SetMembers(value []PlannerRosterMemberable)() + SetPlans(value []PlannerPlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_rule_kind.go b/src/internal/connector/graph/betasdk/models/planner_rule_kind.go new file mode 100644 index 000000000..3a0f2cd3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rule_kind.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerRuleKind int + +const ( + TASKRULE_PLANNERRULEKIND PlannerRuleKind = iota + BUCKETRULE_PLANNERRULEKIND + PLANRULE_PLANNERRULEKIND + UNKNOWNFUTUREVALUE_PLANNERRULEKIND +) + +func (i PlannerRuleKind) String() string { + return []string{"taskRule", "bucketRule", "planRule", "unknownFutureValue"}[i] +} +func ParsePlannerRuleKind(v string) (interface{}, error) { + result := TASKRULE_PLANNERRULEKIND + switch v { + case "taskRule": + result = TASKRULE_PLANNERRULEKIND + case "bucketRule": + result = BUCKETRULE_PLANNERRULEKIND + case "planRule": + result = PLANRULE_PLANNERRULEKIND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERRULEKIND + default: + return 0, errors.New("Unknown PlannerRuleKind value: " + v) + } + return &result, nil +} +func SerializePlannerRuleKind(values []PlannerRuleKind) []string { + 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/planner_rule_override.go b/src/internal/connector/graph/betasdk/models/planner_rule_override.go new file mode 100644 index 000000000..a78623104 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rule_override.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRuleOverride +type PlannerRuleOverride struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the override. Allowed override values will be dependent on the property affected by the rule. + name *string + // The OdataType property + odataType *string + // Overridden rules. These are used as rules for the override instead of the default rules. + rules []string +} +// NewPlannerRuleOverride instantiates a new plannerRuleOverride and sets the default values. +func NewPlannerRuleOverride()(*PlannerRuleOverride) { + m := &PlannerRuleOverride{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerRuleOverrideFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRuleOverrideFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRuleOverride(), 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 *PlannerRuleOverride) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRuleOverride) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRules(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the override. Allowed override values will be dependent on the property affected by the rule. +func (m *PlannerRuleOverride) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerRuleOverride) GetOdataType()(*string) { + return m.odataType +} +// GetRules gets the rules property value. Overridden rules. These are used as rules for the override instead of the default rules. +func (m *PlannerRuleOverride) GetRules()([]string) { + return m.rules +} +// Serialize serializes information the current object +func (m *PlannerRuleOverride) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + err := writer.WriteCollectionOfStringValues("rules", m.GetRules()) + 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 *PlannerRuleOverride) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name of the override. Allowed override values will be dependent on the property affected by the rule. +func (m *PlannerRuleOverride) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerRuleOverride) SetOdataType(value *string)() { + m.odataType = value +} +// SetRules sets the rules property value. Overridden rules. These are used as rules for the override instead of the default rules. +func (m *PlannerRuleOverride) SetRules(value []string)() { + m.rules = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_response.go new file mode 100644 index 000000000..16f037443 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRuleOverrideCollectionResponse +type PlannerRuleOverrideCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerRuleOverrideable +} +// NewPlannerRuleOverrideCollectionResponse instantiates a new PlannerRuleOverrideCollectionResponse and sets the default values. +func NewPlannerRuleOverrideCollectionResponse()(*PlannerRuleOverrideCollectionResponse) { + m := &PlannerRuleOverrideCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerRuleOverrideCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerRuleOverrideCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerRuleOverrideCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerRuleOverrideCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerRuleOverrideFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerRuleOverrideable, len(val)) + for i, v := range val { + res[i] = v.(PlannerRuleOverrideable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerRuleOverrideCollectionResponse) GetValue()([]PlannerRuleOverrideable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerRuleOverrideCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerRuleOverrideCollectionResponse) SetValue(value []PlannerRuleOverrideable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_responseable.go new file mode 100644 index 000000000..fc279b211 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rule_override_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRuleOverrideCollectionResponseable +type PlannerRuleOverrideCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerRuleOverrideable) + SetValue(value []PlannerRuleOverrideable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_rule_overrideable.go b/src/internal/connector/graph/betasdk/models/planner_rule_overrideable.go new file mode 100644 index 000000000..3a1dc2a3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_rule_overrideable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerRuleOverrideable +type PlannerRuleOverrideable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetRules()([]string) + SetName(value *string)() + SetOdataType(value *string)() + SetRules(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task.go b/src/internal/connector/graph/betasdk/models/planner_task.go new file mode 100644 index 000000000..0ae03f020 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task.go @@ -0,0 +1,730 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTask provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerTask struct { + PlannerDelta + // Number of checklist items with value set to false, representing incomplete items. + activeChecklistItemCount *int32 + // The categories to which the task has been applied. See applied Categories for possible values. + appliedCategories PlannerAppliedCategoriesable + // Read-only. Nullable. Used to render the task correctly in the task board view when grouped by assignedTo. + assignedToTaskBoardFormat PlannerAssignedToTaskBoardTaskFormatable + // Hint used to order items of this type in a list view. The format is defined as outlined here. + assigneePriority *string + // The set of assignees the task is assigned to. + assignments PlannerAssignmentsable + // Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It is 28 characters long and case-sensitive. Format validation is done on the service. + bucketId *string + // Read-only. Nullable. Used to render the task correctly in the task board view when grouped by bucket. + bucketTaskBoardFormat PlannerBucketTaskBoardTaskFormatable + // Number of checklist items that are present on the task. + checklistItemCount *int32 + // Identity of the user that completed the task. + completedBy IdentitySetable + // Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group. + conversationThreadId *string + // Identity of the user that created the task. + createdBy IdentitySetable + // Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains information about the origin of the task. + creationSource PlannerTaskCreationable + // Read-only. Nullable. Additional details about the task. + details PlannerTaskDetailsable + // Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + dueDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. Value is true if the details object of the task has a non-empty description and false otherwise. + hasDescription *bool + // Hint used to order items of this type in a list view. The format is defined as outlined here. + orderHint *string + // Percentage of task completion. When set to 100, the task is considered completed. + percentComplete *int32 + // Plan ID to which the task belongs. + planId *string + // This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. + previewType *PlannerPreviewType + // Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2 and 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Currently, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'. + priority *int32 + // Read-only. Nullable. Used to render the task correctly in the task board view when grouped by progress. + progressTaskBoardFormat PlannerProgressTaskBoardTaskFormatable + // Number of external references that exist on the task. + referenceCount *int32 + // Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Title of the task. + title *string +} +// NewPlannerTask instantiates a new plannerTask and sets the default values. +func NewPlannerTask()(*PlannerTask) { + m := &PlannerTask{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.businessScenarioTask": + return NewBusinessScenarioTask(), nil + } + } + } + } + return NewPlannerTask(), nil +} +// GetActiveChecklistItemCount gets the activeChecklistItemCount property value. Number of checklist items with value set to false, representing incomplete items. +func (m *PlannerTask) GetActiveChecklistItemCount()(*int32) { + return m.activeChecklistItemCount +} +// GetAppliedCategories gets the appliedCategories property value. The categories to which the task has been applied. See applied Categories for possible values. +func (m *PlannerTask) GetAppliedCategories()(PlannerAppliedCategoriesable) { + return m.appliedCategories +} +// GetAssignedToTaskBoardFormat gets the assignedToTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by assignedTo. +func (m *PlannerTask) GetAssignedToTaskBoardFormat()(PlannerAssignedToTaskBoardTaskFormatable) { + return m.assignedToTaskBoardFormat +} +// GetAssigneePriority gets the assigneePriority property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerTask) GetAssigneePriority()(*string) { + return m.assigneePriority +} +// GetAssignments gets the assignments property value. The set of assignees the task is assigned to. +func (m *PlannerTask) GetAssignments()(PlannerAssignmentsable) { + return m.assignments +} +// GetBucketId gets the bucketId property value. Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It is 28 characters long and case-sensitive. Format validation is done on the service. +func (m *PlannerTask) GetBucketId()(*string) { + return m.bucketId +} +// GetBucketTaskBoardFormat gets the bucketTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by bucket. +func (m *PlannerTask) GetBucketTaskBoardFormat()(PlannerBucketTaskBoardTaskFormatable) { + return m.bucketTaskBoardFormat +} +// GetChecklistItemCount gets the checklistItemCount property value. Number of checklist items that are present on the task. +func (m *PlannerTask) GetChecklistItemCount()(*int32) { + return m.checklistItemCount +} +// GetCompletedBy gets the completedBy property value. Identity of the user that completed the task. +func (m *PlannerTask) GetCompletedBy()(IdentitySetable) { + return m.completedBy +} +// GetCompletedDateTime gets the completedDateTime property value. Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetConversationThreadId gets the conversationThreadId property value. Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group. +func (m *PlannerTask) GetConversationThreadId()(*string) { + return m.conversationThreadId +} +// GetCreatedBy gets the createdBy property value. Identity of the user that created the task. +func (m *PlannerTask) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreationSource gets the creationSource property value. Contains information about the origin of the task. +func (m *PlannerTask) GetCreationSource()(PlannerTaskCreationable) { + return m.creationSource +} +// GetDetails gets the details property value. Read-only. Nullable. Additional details about the task. +func (m *PlannerTask) GetDetails()(PlannerTaskDetailsable) { + return m.details +} +// GetDueDateTime gets the dueDateTime property value. Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dueDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["activeChecklistItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveChecklistItemCount(val) + } + return nil + } + res["appliedCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerAppliedCategoriesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppliedCategories(val.(PlannerAppliedCategoriesable)) + } + return nil + } + res["assignedToTaskBoardFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerAssignedToTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignedToTaskBoardFormat(val.(PlannerAssignedToTaskBoardTaskFormatable)) + } + return nil + } + res["assigneePriority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssigneePriority(val) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerAssignmentsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignments(val.(PlannerAssignmentsable)) + } + return nil + } + res["bucketId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBucketId(val) + } + return nil + } + res["bucketTaskBoardFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerBucketTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBucketTaskBoardFormat(val.(PlannerBucketTaskBoardTaskFormatable)) + } + return nil + } + res["checklistItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetChecklistItemCount(val) + } + return nil + } + res["completedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCompletedBy(val.(IdentitySetable)) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["conversationThreadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConversationThreadId(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["creationSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskCreationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreationSource(val.(PlannerTaskCreationable)) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(PlannerTaskDetailsable)) + } + return nil + } + res["dueDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDateTime(val) + } + return nil + } + res["hasDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasDescription(val) + } + return nil + } + res["orderHint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderHint(val) + } + return nil + } + res["percentComplete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentComplete(val) + } + return nil + } + res["planId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPlanId(val) + } + return nil + } + res["previewType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerPreviewType) + if err != nil { + return err + } + if val != nil { + m.SetPreviewType(val.(*PlannerPreviewType)) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["progressTaskBoardFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerProgressTaskBoardTaskFormatFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProgressTaskBoardFormat(val.(PlannerProgressTaskBoardTaskFormatable)) + } + return nil + } + res["referenceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetReferenceCount(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetHasDescription gets the hasDescription property value. Read-only. Value is true if the details object of the task has a non-empty description and false otherwise. +func (m *PlannerTask) GetHasDescription()(*bool) { + return m.hasDescription +} +// GetOrderHint gets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerTask) GetOrderHint()(*string) { + return m.orderHint +} +// GetPercentComplete gets the percentComplete property value. Percentage of task completion. When set to 100, the task is considered completed. +func (m *PlannerTask) GetPercentComplete()(*int32) { + return m.percentComplete +} +// GetPlanId gets the planId property value. Plan ID to which the task belongs. +func (m *PlannerTask) GetPlanId()(*string) { + return m.planId +} +// GetPreviewType gets the previewType property value. This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. +func (m *PlannerTask) GetPreviewType()(*PlannerPreviewType) { + return m.previewType +} +// GetPriority gets the priority property value. Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2 and 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Currently, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'. +func (m *PlannerTask) GetPriority()(*int32) { + return m.priority +} +// GetProgressTaskBoardFormat gets the progressTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by progress. +func (m *PlannerTask) GetProgressTaskBoardFormat()(PlannerProgressTaskBoardTaskFormatable) { + return m.progressTaskBoardFormat +} +// GetReferenceCount gets the referenceCount property value. Number of external references that exist on the task. +func (m *PlannerTask) GetReferenceCount()(*int32) { + return m.referenceCount +} +// GetStartDateTime gets the startDateTime property value. Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetTitle gets the title property value. Title of the task. +func (m *PlannerTask) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *PlannerTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("activeChecklistItemCount", m.GetActiveChecklistItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("appliedCategories", m.GetAppliedCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignedToTaskBoardFormat", m.GetAssignedToTaskBoardFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assigneePriority", m.GetAssigneePriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignments", m.GetAssignments()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("bucketId", m.GetBucketId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("bucketTaskBoardFormat", m.GetBucketTaskBoardFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("checklistItemCount", m.GetChecklistItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("completedBy", m.GetCompletedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conversationThreadId", m.GetConversationThreadId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("creationSource", m.GetCreationSource()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dueDateTime", m.GetDueDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasDescription", m.GetHasDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("orderHint", m.GetOrderHint()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("percentComplete", m.GetPercentComplete()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("planId", m.GetPlanId()) + if err != nil { + return err + } + } + if m.GetPreviewType() != nil { + cast := (*m.GetPreviewType()).String() + err = writer.WriteStringValue("previewType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("progressTaskBoardFormat", m.GetProgressTaskBoardFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("referenceCount", m.GetReferenceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetActiveChecklistItemCount sets the activeChecklistItemCount property value. Number of checklist items with value set to false, representing incomplete items. +func (m *PlannerTask) SetActiveChecklistItemCount(value *int32)() { + m.activeChecklistItemCount = value +} +// SetAppliedCategories sets the appliedCategories property value. The categories to which the task has been applied. See applied Categories for possible values. +func (m *PlannerTask) SetAppliedCategories(value PlannerAppliedCategoriesable)() { + m.appliedCategories = value +} +// SetAssignedToTaskBoardFormat sets the assignedToTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by assignedTo. +func (m *PlannerTask) SetAssignedToTaskBoardFormat(value PlannerAssignedToTaskBoardTaskFormatable)() { + m.assignedToTaskBoardFormat = value +} +// SetAssigneePriority sets the assigneePriority property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerTask) SetAssigneePriority(value *string)() { + m.assigneePriority = value +} +// SetAssignments sets the assignments property value. The set of assignees the task is assigned to. +func (m *PlannerTask) SetAssignments(value PlannerAssignmentsable)() { + m.assignments = value +} +// SetBucketId sets the bucketId property value. Bucket ID to which the task belongs. The bucket needs to be in the plan that the task is in. It is 28 characters long and case-sensitive. Format validation is done on the service. +func (m *PlannerTask) SetBucketId(value *string)() { + m.bucketId = value +} +// SetBucketTaskBoardFormat sets the bucketTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by bucket. +func (m *PlannerTask) SetBucketTaskBoardFormat(value PlannerBucketTaskBoardTaskFormatable)() { + m.bucketTaskBoardFormat = value +} +// SetChecklistItemCount sets the checklistItemCount property value. Number of checklist items that are present on the task. +func (m *PlannerTask) SetChecklistItemCount(value *int32)() { + m.checklistItemCount = value +} +// SetCompletedBy sets the completedBy property value. Identity of the user that completed the task. +func (m *PlannerTask) SetCompletedBy(value IdentitySetable)() { + m.completedBy = value +} +// SetCompletedDateTime sets the completedDateTime property value. Read-only. Date and time at which the 'percentComplete' of the task is set to '100'. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetConversationThreadId sets the conversationThreadId property value. Thread ID of the conversation on the task. This is the ID of the conversation thread object created in the group. +func (m *PlannerTask) SetConversationThreadId(value *string)() { + m.conversationThreadId = value +} +// SetCreatedBy sets the createdBy property value. Identity of the user that created the task. +func (m *PlannerTask) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Read-only. Date and time at which the task is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreationSource sets the creationSource property value. Contains information about the origin of the task. +func (m *PlannerTask) SetCreationSource(value PlannerTaskCreationable)() { + m.creationSource = value +} +// SetDetails sets the details property value. Read-only. Nullable. Additional details about the task. +func (m *PlannerTask) SetDetails(value PlannerTaskDetailsable)() { + m.details = value +} +// SetDueDateTime sets the dueDateTime property value. Date and time at which the task is due. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dueDateTime = value +} +// SetHasDescription sets the hasDescription property value. Read-only. Value is true if the details object of the task has a non-empty description and false otherwise. +func (m *PlannerTask) SetHasDescription(value *bool)() { + m.hasDescription = value +} +// SetOrderHint sets the orderHint property value. Hint used to order items of this type in a list view. The format is defined as outlined here. +func (m *PlannerTask) SetOrderHint(value *string)() { + m.orderHint = value +} +// SetPercentComplete sets the percentComplete property value. Percentage of task completion. When set to 100, the task is considered completed. +func (m *PlannerTask) SetPercentComplete(value *int32)() { + m.percentComplete = value +} +// SetPlanId sets the planId property value. Plan ID to which the task belongs. +func (m *PlannerTask) SetPlanId(value *string)() { + m.planId = value +} +// SetPreviewType sets the previewType property value. This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. +func (m *PlannerTask) SetPreviewType(value *PlannerPreviewType)() { + m.previewType = value +} +// SetPriority sets the priority property value. Priority of the task. Valid range of values is between 0 and 10 (inclusive), with increasing value being lower priority (0 has the highest priority and 10 has the lowest priority). Currently, Planner interprets values 0 and 1 as 'urgent', 2 and 3 and 4 as 'important', 5, 6, and 7 as 'medium', and 8, 9, and 10 as 'low'. Currently, Planner sets the value 1 for 'urgent', 3 for 'important', 5 for 'medium', and 9 for 'low'. +func (m *PlannerTask) SetPriority(value *int32)() { + m.priority = value +} +// SetProgressTaskBoardFormat sets the progressTaskBoardFormat property value. Read-only. Nullable. Used to render the task correctly in the task board view when grouped by progress. +func (m *PlannerTask) SetProgressTaskBoardFormat(value PlannerProgressTaskBoardTaskFormatable)() { + m.progressTaskBoardFormat = value +} +// SetReferenceCount sets the referenceCount property value. Number of external references that exist on the task. +func (m *PlannerTask) SetReferenceCount(value *int32)() { + m.referenceCount = value +} +// SetStartDateTime sets the startDateTime property value. Date and time at which the task starts. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PlannerTask) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetTitle sets the title property value. Title of the task. +func (m *PlannerTask) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_task_collection_response.go new file mode 100644 index 000000000..4d88f54e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskCollectionResponse +type PlannerTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerTaskable +} +// NewPlannerTaskCollectionResponse instantiates a new PlannerTaskCollectionResponse and sets the default values. +func NewPlannerTaskCollectionResponse()(*PlannerTaskCollectionResponse) { + m := &PlannerTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerTaskCollectionResponse) GetValue()([]PlannerTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerTaskCollectionResponse) SetValue(value []PlannerTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_task_collection_responseable.go new file mode 100644 index 000000000..7f32abd80 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskCollectionResponseable +type PlannerTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerTaskable) + SetValue(value []PlannerTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_configuration.go b/src/internal/connector/graph/betasdk/models/planner_task_configuration.go new file mode 100644 index 000000000..096592eba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_configuration.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskConfiguration +type PlannerTaskConfiguration struct { + Entity + // Policy configuration for tasks created for the businessScenario when they are being changed outside of the scenario. + editPolicy PlannerTaskPolicyable +} +// NewPlannerTaskConfiguration instantiates a new plannerTaskConfiguration and sets the default values. +func NewPlannerTaskConfiguration()(*PlannerTaskConfiguration) { + m := &PlannerTaskConfiguration{ + Entity: *NewEntity(), + } + return m +} +// CreatePlannerTaskConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskConfiguration(), nil +} +// GetEditPolicy gets the editPolicy property value. Policy configuration for tasks created for the businessScenario when they are being changed outside of the scenario. +func (m *PlannerTaskConfiguration) GetEditPolicy()(PlannerTaskPolicyable) { + return m.editPolicy +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["editPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEditPolicy(val.(PlannerTaskPolicyable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PlannerTaskConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("editPolicy", m.GetEditPolicy()) + if err != nil { + return err + } + } + return nil +} +// SetEditPolicy sets the editPolicy property value. Policy configuration for tasks created for the businessScenario when they are being changed outside of the scenario. +func (m *PlannerTaskConfiguration) SetEditPolicy(value PlannerTaskPolicyable)() { + m.editPolicy = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_base.go b/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_base.go new file mode 100644 index 000000000..9cfb24862 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_base.go @@ -0,0 +1,116 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskConfigurationRoleBase +type PlannerTaskConfigurationRoleBase 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 OdataType property + odataType *string + // The roleKind property + roleKind *PlannerUserRoleKind +} +// NewPlannerTaskConfigurationRoleBase instantiates a new plannerTaskConfigurationRoleBase and sets the default values. +func NewPlannerTaskConfigurationRoleBase()(*PlannerTaskConfigurationRoleBase) { + m := &PlannerTaskConfigurationRoleBase{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerTaskConfigurationRoleBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskConfigurationRoleBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.plannerRelationshipBasedUserType": + return NewPlannerRelationshipBasedUserType(), nil + } + } + } + } + return NewPlannerTaskConfigurationRoleBase(), 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 *PlannerTaskConfigurationRoleBase) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskConfigurationRoleBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["roleKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerUserRoleKind) + if err != nil { + return err + } + if val != nil { + m.SetRoleKind(val.(*PlannerUserRoleKind)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerTaskConfigurationRoleBase) GetOdataType()(*string) { + return m.odataType +} +// GetRoleKind gets the roleKind property value. The roleKind property +func (m *PlannerTaskConfigurationRoleBase) GetRoleKind()(*PlannerUserRoleKind) { + return m.roleKind +} +// Serialize serializes information the current object +func (m *PlannerTaskConfigurationRoleBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRoleKind() != nil { + cast := (*m.GetRoleKind()).String() + err := writer.WriteStringValue("roleKind", &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 *PlannerTaskConfigurationRoleBase) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerTaskConfigurationRoleBase) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoleKind sets the roleKind property value. The roleKind property +func (m *PlannerTaskConfigurationRoleBase) SetRoleKind(value *PlannerUserRoleKind)() { + m.roleKind = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_baseable.go b/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_baseable.go new file mode 100644 index 000000000..fab38aa6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_configuration_role_baseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskConfigurationRoleBaseable +type PlannerTaskConfigurationRoleBaseable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRoleKind()(*PlannerUserRoleKind) + SetOdataType(value *string)() + SetRoleKind(value *PlannerUserRoleKind)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_configurationable.go b/src/internal/connector/graph/betasdk/models/planner_task_configurationable.go new file mode 100644 index 000000000..f695522a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskConfigurationable +type PlannerTaskConfigurationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEditPolicy()(PlannerTaskPolicyable) + SetEditPolicy(value PlannerTaskPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_creation.go b/src/internal/connector/graph/betasdk/models/planner_task_creation.go new file mode 100644 index 000000000..d4929a654 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_creation.go @@ -0,0 +1,144 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskCreation +type PlannerTaskCreation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies what kind of creation source the task is created with. The possible values are: external, publication and unknownFutureValue. + creationSourceKind *PlannerCreationSourceKind + // The OdataType property + odataType *string + // Information about the publication process that created this task. This field is deprecated and clients should move to using the new inheritance model. + teamsPublicationInfo PlannerTeamsPublicationInfoable +} +// NewPlannerTaskCreation instantiates a new plannerTaskCreation and sets the default values. +func NewPlannerTaskCreation()(*PlannerTaskCreation) { + m := &PlannerTaskCreation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerTaskCreationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskCreationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.plannerExternalTaskSource": + return NewPlannerExternalTaskSource(), nil + case "#microsoft.graph.plannerTeamsPublicationInfo": + return NewPlannerTeamsPublicationInfo(), nil + } + } + } + } + return NewPlannerTaskCreation(), 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 *PlannerTaskCreation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreationSourceKind gets the creationSourceKind property value. Specifies what kind of creation source the task is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerTaskCreation) GetCreationSourceKind()(*PlannerCreationSourceKind) { + return m.creationSourceKind +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskCreation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["creationSourceKind"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerCreationSourceKind) + if err != nil { + return err + } + if val != nil { + m.SetCreationSourceKind(val.(*PlannerCreationSourceKind)) + } + 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["teamsPublicationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTeamsPublicationInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTeamsPublicationInfo(val.(PlannerTeamsPublicationInfoable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerTaskCreation) GetOdataType()(*string) { + return m.odataType +} +// GetTeamsPublicationInfo gets the teamsPublicationInfo property value. Information about the publication process that created this task. This field is deprecated and clients should move to using the new inheritance model. +func (m *PlannerTaskCreation) GetTeamsPublicationInfo()(PlannerTeamsPublicationInfoable) { + return m.teamsPublicationInfo +} +// Serialize serializes information the current object +func (m *PlannerTaskCreation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCreationSourceKind() != nil { + cast := (*m.GetCreationSourceKind()).String() + err := writer.WriteStringValue("creationSourceKind", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("teamsPublicationInfo", m.GetTeamsPublicationInfo()) + 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 *PlannerTaskCreation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreationSourceKind sets the creationSourceKind property value. Specifies what kind of creation source the task is created with. The possible values are: external, publication and unknownFutureValue. +func (m *PlannerTaskCreation) SetCreationSourceKind(value *PlannerCreationSourceKind)() { + m.creationSourceKind = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerTaskCreation) SetOdataType(value *string)() { + m.odataType = value +} +// SetTeamsPublicationInfo sets the teamsPublicationInfo property value. Information about the publication process that created this task. This field is deprecated and clients should move to using the new inheritance model. +func (m *PlannerTaskCreation) SetTeamsPublicationInfo(value PlannerTeamsPublicationInfoable)() { + m.teamsPublicationInfo = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_creationable.go b/src/internal/connector/graph/betasdk/models/planner_task_creationable.go new file mode 100644 index 000000000..59a515be8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_creationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskCreationable +type PlannerTaskCreationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreationSourceKind()(*PlannerCreationSourceKind) + GetOdataType()(*string) + GetTeamsPublicationInfo()(PlannerTeamsPublicationInfoable) + SetCreationSourceKind(value *PlannerCreationSourceKind)() + SetOdataType(value *string)() + SetTeamsPublicationInfo(value PlannerTeamsPublicationInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_details.go b/src/internal/connector/graph/betasdk/models/planner_task_details.go new file mode 100644 index 000000000..19dfd9d9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_details.go @@ -0,0 +1,165 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskDetails +type PlannerTaskDetails struct { + PlannerDelta + // The collection of checklist items on the task. + checklist PlannerChecklistItemsable + // Description of the task. + description *string + // Rich text description of the task. To be used by HTML-aware clients. For backwards compatibility, a plain-text version of the HTML description will be synced to the 'description' field. If this field has not previously been set but 'description' has been, the existing description will be synchronized to 'notes' with minimal whitespace-preserving HTML markup. Setting both 'description' and 'notes' is an error and will result in an exception. + notes ItemBodyable + // This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. When set to automatic the displayed preview is chosen by the app viewing the task. + previewType *PlannerPreviewType + // The collection of references on the task. + references PlannerExternalReferencesable +} +// NewPlannerTaskDetails instantiates a new plannerTaskDetails and sets the default values. +func NewPlannerTaskDetails()(*PlannerTaskDetails) { + m := &PlannerTaskDetails{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerTaskDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskDetails(), nil +} +// GetChecklist gets the checklist property value. The collection of checklist items on the task. +func (m *PlannerTaskDetails) GetChecklist()(PlannerChecklistItemsable) { + return m.checklist +} +// GetDescription gets the description property value. Description of the task. +func (m *PlannerTaskDetails) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["checklist"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerChecklistItemsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetChecklist(val.(PlannerChecklistItemsable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetNotes(val.(ItemBodyable)) + } + return nil + } + res["previewType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlannerPreviewType) + if err != nil { + return err + } + if val != nil { + m.SetPreviewType(val.(*PlannerPreviewType)) + } + return nil + } + res["references"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerExternalReferencesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReferences(val.(PlannerExternalReferencesable)) + } + return nil + } + return res +} +// GetNotes gets the notes property value. Rich text description of the task. To be used by HTML-aware clients. For backwards compatibility, a plain-text version of the HTML description will be synced to the 'description' field. If this field has not previously been set but 'description' has been, the existing description will be synchronized to 'notes' with minimal whitespace-preserving HTML markup. Setting both 'description' and 'notes' is an error and will result in an exception. +func (m *PlannerTaskDetails) GetNotes()(ItemBodyable) { + return m.notes +} +// GetPreviewType gets the previewType property value. This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. When set to automatic the displayed preview is chosen by the app viewing the task. +func (m *PlannerTaskDetails) GetPreviewType()(*PlannerPreviewType) { + return m.previewType +} +// GetReferences gets the references property value. The collection of references on the task. +func (m *PlannerTaskDetails) GetReferences()(PlannerExternalReferencesable) { + return m.references +} +// Serialize serializes information the current object +func (m *PlannerTaskDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("checklist", m.GetChecklist()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + if m.GetPreviewType() != nil { + cast := (*m.GetPreviewType()).String() + err = writer.WriteStringValue("previewType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("references", m.GetReferences()) + if err != nil { + return err + } + } + return nil +} +// SetChecklist sets the checklist property value. The collection of checklist items on the task. +func (m *PlannerTaskDetails) SetChecklist(value PlannerChecklistItemsable)() { + m.checklist = value +} +// SetDescription sets the description property value. Description of the task. +func (m *PlannerTaskDetails) SetDescription(value *string)() { + m.description = value +} +// SetNotes sets the notes property value. Rich text description of the task. To be used by HTML-aware clients. For backwards compatibility, a plain-text version of the HTML description will be synced to the 'description' field. If this field has not previously been set but 'description' has been, the existing description will be synchronized to 'notes' with minimal whitespace-preserving HTML markup. Setting both 'description' and 'notes' is an error and will result in an exception. +func (m *PlannerTaskDetails) SetNotes(value ItemBodyable)() { + m.notes = value +} +// SetPreviewType sets the previewType property value. This sets the type of preview that shows up on the task. Possible values are: automatic, noPreview, checklist, description, reference. When set to automatic the displayed preview is chosen by the app viewing the task. +func (m *PlannerTaskDetails) SetPreviewType(value *PlannerPreviewType)() { + m.previewType = value +} +// SetReferences sets the references property value. The collection of references on the task. +func (m *PlannerTaskDetails) SetReferences(value PlannerExternalReferencesable)() { + m.references = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_details_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_task_details_collection_response.go new file mode 100644 index 000000000..6d78367b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_details_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskDetailsCollectionResponse +type PlannerTaskDetailsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerTaskDetailsable +} +// NewPlannerTaskDetailsCollectionResponse instantiates a new PlannerTaskDetailsCollectionResponse and sets the default values. +func NewPlannerTaskDetailsCollectionResponse()(*PlannerTaskDetailsCollectionResponse) { + m := &PlannerTaskDetailsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerTaskDetailsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskDetailsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskDetailsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskDetailsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskDetailsable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskDetailsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerTaskDetailsCollectionResponse) GetValue()([]PlannerTaskDetailsable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerTaskDetailsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerTaskDetailsCollectionResponse) SetValue(value []PlannerTaskDetailsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_details_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_task_details_collection_responseable.go new file mode 100644 index 000000000..539619c85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_details_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskDetailsCollectionResponseable +type PlannerTaskDetailsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerTaskDetailsable) + SetValue(value []PlannerTaskDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_detailsable.go b/src/internal/connector/graph/betasdk/models/planner_task_detailsable.go new file mode 100644 index 000000000..24f5584b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_detailsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskDetailsable +type PlannerTaskDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetChecklist()(PlannerChecklistItemsable) + GetDescription()(*string) + GetNotes()(ItemBodyable) + GetPreviewType()(*PlannerPreviewType) + GetReferences()(PlannerExternalReferencesable) + SetChecklist(value PlannerChecklistItemsable)() + SetDescription(value *string)() + SetNotes(value ItemBodyable)() + SetPreviewType(value *PlannerPreviewType)() + SetReferences(value PlannerExternalReferencesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_policy.go b/src/internal/connector/graph/betasdk/models/planner_task_policy.go new file mode 100644 index 000000000..b8840bc11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_policy.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskPolicy +type PlannerTaskPolicy 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 OdataType property + odataType *string + // The rules that should be enforced on the tasks when they are being changed outside of the scenario, based on the role of the caller. + rules []PlannerTaskRoleBasedRuleable +} +// NewPlannerTaskPolicy instantiates a new plannerTaskPolicy and sets the default values. +func NewPlannerTaskPolicy()(*PlannerTaskPolicy) { + m := &PlannerTaskPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerTaskPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskPolicy(), 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 *PlannerTaskPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["rules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskRoleBasedRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskRoleBasedRuleable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskRoleBasedRuleable) + } + m.SetRules(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerTaskPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetRules gets the rules property value. The rules that should be enforced on the tasks when they are being changed outside of the scenario, based on the role of the caller. +func (m *PlannerTaskPolicy) GetRules()([]PlannerTaskRoleBasedRuleable) { + return m.rules +} +// Serialize serializes information the current object +func (m *PlannerTaskPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRules())) + for i, v := range m.GetRules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("rules", 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 *PlannerTaskPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerTaskPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRules sets the rules property value. The rules that should be enforced on the tasks when they are being changed outside of the scenario, based on the role of the caller. +func (m *PlannerTaskPolicy) SetRules(value []PlannerTaskRoleBasedRuleable)() { + m.rules = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_policyable.go b/src/internal/connector/graph/betasdk/models/planner_task_policyable.go new file mode 100644 index 000000000..2f10706da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_policyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskPolicyable +type PlannerTaskPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRules()([]PlannerTaskRoleBasedRuleable) + SetOdataType(value *string)() + SetRules(value []PlannerTaskRoleBasedRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_property_rule.go b/src/internal/connector/graph/betasdk/models/planner_task_property_rule.go new file mode 100644 index 000000000..1209c3501 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_property_rule.go @@ -0,0 +1,440 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskPropertyRule +type PlannerTaskPropertyRule struct { + PlannerPropertyRule + // Rules and restrictions for applied categories. This value does not currently support overrides. Accepted values for the default rule and individual overrides are allow, block. + appliedCategories PlannerFieldRulesable + // Rules and restrictions for assignments. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, addSelf, addOther, remove, removeSelf, removeOther, block. + assignments PlannerFieldRulesable + // Rules and restrictions for checklist. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, update, check, reorder, block. + checkLists PlannerFieldRulesable + // Rules and restrictions for deleting the task. Accepted values are allow and block. + delete []string + // Rules and restrictions for changing the due date of the task. Accepted values are allow and block. + dueDate []string + // Rules and restrictions for moving the task between buckets or plans. Accepted values are allow, moveBetweenPlans, moveBetweenBuckets, and block. + move []string + // Rules and restrictions for changing the notes of the task. Accepted values are allow and block. + notes []string + // Rules and restrictions for changing the order of the task. Accepted values are allow and block. + order []string + // Rules and restrictions for changing the completion percentage of the task. Accepted values are allow, setToComplete, setToNotStarted, setToInProgress, and block. + percentComplete []string + // Rules and restrictions for changing the preview type of the task. Accepted values are allow and block. + previewType []string + // Rules and restrictions for changing the priority of the task. Accepted values are allow and block. + priority []string + // Rules and restrictions for references. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, block. + references PlannerFieldRulesable + // Rules and restrictions for changing the start date of the task. Accepted values are allow and block. + startDate []string + // Rules and restrictions for changing the title of the task. Accepted values are allow and block. + title []string +} +// NewPlannerTaskPropertyRule instantiates a new PlannerTaskPropertyRule and sets the default values. +func NewPlannerTaskPropertyRule()(*PlannerTaskPropertyRule) { + m := &PlannerTaskPropertyRule{ + PlannerPropertyRule: *NewPlannerPropertyRule(), + } + odataTypeValue := "#microsoft.graph.plannerTaskPropertyRule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerTaskPropertyRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskPropertyRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskPropertyRule(), nil +} +// GetAppliedCategories gets the appliedCategories property value. Rules and restrictions for applied categories. This value does not currently support overrides. Accepted values for the default rule and individual overrides are allow, block. +func (m *PlannerTaskPropertyRule) GetAppliedCategories()(PlannerFieldRulesable) { + return m.appliedCategories +} +// GetAssignments gets the assignments property value. Rules and restrictions for assignments. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, addSelf, addOther, remove, removeSelf, removeOther, block. +func (m *PlannerTaskPropertyRule) GetAssignments()(PlannerFieldRulesable) { + return m.assignments +} +// GetCheckLists gets the checkLists property value. Rules and restrictions for checklist. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, update, check, reorder, block. +func (m *PlannerTaskPropertyRule) GetCheckLists()(PlannerFieldRulesable) { + return m.checkLists +} +// GetDelete gets the delete property value. Rules and restrictions for deleting the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetDelete()([]string) { + return m.delete +} +// GetDueDate gets the dueDate property value. Rules and restrictions for changing the due date of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetDueDate()([]string) { + return m.dueDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskPropertyRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerPropertyRule.GetFieldDeserializers() + res["appliedCategories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAppliedCategories(val.(PlannerFieldRulesable)) + } + return nil + } + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAssignments(val.(PlannerFieldRulesable)) + } + return nil + } + res["checkLists"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCheckLists(val.(PlannerFieldRulesable)) + } + return nil + } + res["delete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDelete(res) + } + return nil + } + res["dueDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDueDate(res) + } + return nil + } + res["move"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMove(res) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotes(res) + } + return nil + } + res["order"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOrder(res) + } + return nil + } + res["percentComplete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPercentComplete(res) + } + return nil + } + res["previewType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPreviewType(res) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPriority(res) + } + return nil + } + res["references"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFieldRulesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReferences(val.(PlannerFieldRulesable)) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetStartDate(res) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTitle(res) + } + return nil + } + return res +} +// GetMove gets the move property value. Rules and restrictions for moving the task between buckets or plans. Accepted values are allow, moveBetweenPlans, moveBetweenBuckets, and block. +func (m *PlannerTaskPropertyRule) GetMove()([]string) { + return m.move +} +// GetNotes gets the notes property value. Rules and restrictions for changing the notes of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetNotes()([]string) { + return m.notes +} +// GetOrder gets the order property value. Rules and restrictions for changing the order of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetOrder()([]string) { + return m.order +} +// GetPercentComplete gets the percentComplete property value. Rules and restrictions for changing the completion percentage of the task. Accepted values are allow, setToComplete, setToNotStarted, setToInProgress, and block. +func (m *PlannerTaskPropertyRule) GetPercentComplete()([]string) { + return m.percentComplete +} +// GetPreviewType gets the previewType property value. Rules and restrictions for changing the preview type of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetPreviewType()([]string) { + return m.previewType +} +// GetPriority gets the priority property value. Rules and restrictions for changing the priority of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetPriority()([]string) { + return m.priority +} +// GetReferences gets the references property value. Rules and restrictions for references. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, block. +func (m *PlannerTaskPropertyRule) GetReferences()(PlannerFieldRulesable) { + return m.references +} +// GetStartDate gets the startDate property value. Rules and restrictions for changing the start date of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetStartDate()([]string) { + return m.startDate +} +// GetTitle gets the title property value. Rules and restrictions for changing the title of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) GetTitle()([]string) { + return m.title +} +// Serialize serializes information the current object +func (m *PlannerTaskPropertyRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerPropertyRule.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("appliedCategories", m.GetAppliedCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("assignments", m.GetAssignments()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("checkLists", m.GetCheckLists()) + if err != nil { + return err + } + } + if m.GetDelete() != nil { + err = writer.WriteCollectionOfStringValues("delete", m.GetDelete()) + if err != nil { + return err + } + } + if m.GetDueDate() != nil { + err = writer.WriteCollectionOfStringValues("dueDate", m.GetDueDate()) + if err != nil { + return err + } + } + if m.GetMove() != nil { + err = writer.WriteCollectionOfStringValues("move", m.GetMove()) + if err != nil { + return err + } + } + if m.GetNotes() != nil { + err = writer.WriteCollectionOfStringValues("notes", m.GetNotes()) + if err != nil { + return err + } + } + if m.GetOrder() != nil { + err = writer.WriteCollectionOfStringValues("order", m.GetOrder()) + if err != nil { + return err + } + } + if m.GetPercentComplete() != nil { + err = writer.WriteCollectionOfStringValues("percentComplete", m.GetPercentComplete()) + if err != nil { + return err + } + } + if m.GetPreviewType() != nil { + err = writer.WriteCollectionOfStringValues("previewType", m.GetPreviewType()) + if err != nil { + return err + } + } + if m.GetPriority() != nil { + err = writer.WriteCollectionOfStringValues("priority", m.GetPriority()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("references", m.GetReferences()) + if err != nil { + return err + } + } + if m.GetStartDate() != nil { + err = writer.WriteCollectionOfStringValues("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + if m.GetTitle() != nil { + err = writer.WriteCollectionOfStringValues("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetAppliedCategories sets the appliedCategories property value. Rules and restrictions for applied categories. This value does not currently support overrides. Accepted values for the default rule and individual overrides are allow, block. +func (m *PlannerTaskPropertyRule) SetAppliedCategories(value PlannerFieldRulesable)() { + m.appliedCategories = value +} +// SetAssignments sets the assignments property value. Rules and restrictions for assignments. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, addSelf, addOther, remove, removeSelf, removeOther, block. +func (m *PlannerTaskPropertyRule) SetAssignments(value PlannerFieldRulesable)() { + m.assignments = value +} +// SetCheckLists sets the checkLists property value. Rules and restrictions for checklist. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, update, check, reorder, block. +func (m *PlannerTaskPropertyRule) SetCheckLists(value PlannerFieldRulesable)() { + m.checkLists = value +} +// SetDelete sets the delete property value. Rules and restrictions for deleting the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetDelete(value []string)() { + m.delete = value +} +// SetDueDate sets the dueDate property value. Rules and restrictions for changing the due date of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetDueDate(value []string)() { + m.dueDate = value +} +// SetMove sets the move property value. Rules and restrictions for moving the task between buckets or plans. Accepted values are allow, moveBetweenPlans, moveBetweenBuckets, and block. +func (m *PlannerTaskPropertyRule) SetMove(value []string)() { + m.move = value +} +// SetNotes sets the notes property value. Rules and restrictions for changing the notes of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetNotes(value []string)() { + m.notes = value +} +// SetOrder sets the order property value. Rules and restrictions for changing the order of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetOrder(value []string)() { + m.order = value +} +// SetPercentComplete sets the percentComplete property value. Rules and restrictions for changing the completion percentage of the task. Accepted values are allow, setToComplete, setToNotStarted, setToInProgress, and block. +func (m *PlannerTaskPropertyRule) SetPercentComplete(value []string)() { + m.percentComplete = value +} +// SetPreviewType sets the previewType property value. Rules and restrictions for changing the preview type of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetPreviewType(value []string)() { + m.previewType = value +} +// SetPriority sets the priority property value. Rules and restrictions for changing the priority of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetPriority(value []string)() { + m.priority = value +} +// SetReferences sets the references property value. Rules and restrictions for references. Allowed overrides are userCreated and applicationCreated. Accepted values for the default rule and individual overrides are allow, add, remove, block. +func (m *PlannerTaskPropertyRule) SetReferences(value PlannerFieldRulesable)() { + m.references = value +} +// SetStartDate sets the startDate property value. Rules and restrictions for changing the start date of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetStartDate(value []string)() { + m.startDate = value +} +// SetTitle sets the title property value. Rules and restrictions for changing the title of the task. Accepted values are allow and block. +func (m *PlannerTaskPropertyRule) SetTitle(value []string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_property_ruleable.go b/src/internal/connector/graph/betasdk/models/planner_task_property_ruleable.go new file mode 100644 index 000000000..d3225c943 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_property_ruleable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskPropertyRuleable +type PlannerTaskPropertyRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerPropertyRuleable + GetAppliedCategories()(PlannerFieldRulesable) + GetAssignments()(PlannerFieldRulesable) + GetCheckLists()(PlannerFieldRulesable) + GetDelete()([]string) + GetDueDate()([]string) + GetMove()([]string) + GetNotes()([]string) + GetOrder()([]string) + GetPercentComplete()([]string) + GetPreviewType()([]string) + GetPriority()([]string) + GetReferences()(PlannerFieldRulesable) + GetStartDate()([]string) + GetTitle()([]string) + SetAppliedCategories(value PlannerFieldRulesable)() + SetAssignments(value PlannerFieldRulesable)() + SetCheckLists(value PlannerFieldRulesable)() + SetDelete(value []string)() + SetDueDate(value []string)() + SetMove(value []string)() + SetNotes(value []string)() + SetOrder(value []string)() + SetPercentComplete(value []string)() + SetPreviewType(value []string)() + SetPriority(value []string)() + SetReferences(value PlannerFieldRulesable)() + SetStartDate(value []string)() + SetTitle(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule.go b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule.go new file mode 100644 index 000000000..0464a7718 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskRoleBasedRule +type PlannerTaskRoleBasedRule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Default rule that applies when a property or action-specific rule is not provided. Possible values are: Allow, Block + defaultRule *string + // The OdataType property + odataType *string + // Rules for specific properties and actions. + propertyRule PlannerTaskPropertyRuleable + // The role these rules apply to. + role PlannerTaskConfigurationRoleBaseable +} +// NewPlannerTaskRoleBasedRule instantiates a new plannerTaskRoleBasedRule and sets the default values. +func NewPlannerTaskRoleBasedRule()(*PlannerTaskRoleBasedRule) { + m := &PlannerTaskRoleBasedRule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerTaskRoleBasedRuleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskRoleBasedRuleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskRoleBasedRule(), 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 *PlannerTaskRoleBasedRule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultRule gets the defaultRule property value. Default rule that applies when a property or action-specific rule is not provided. Possible values are: Allow, Block +func (m *PlannerTaskRoleBasedRule) GetDefaultRule()(*string) { + return m.defaultRule +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskRoleBasedRule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultRule(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["propertyRule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskPropertyRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPropertyRule(val.(PlannerTaskPropertyRuleable)) + } + return nil + } + res["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerTaskConfigurationRoleBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRole(val.(PlannerTaskConfigurationRoleBaseable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerTaskRoleBasedRule) GetOdataType()(*string) { + return m.odataType +} +// GetPropertyRule gets the propertyRule property value. Rules for specific properties and actions. +func (m *PlannerTaskRoleBasedRule) GetPropertyRule()(PlannerTaskPropertyRuleable) { + return m.propertyRule +} +// GetRole gets the role property value. The role these rules apply to. +func (m *PlannerTaskRoleBasedRule) GetRole()(PlannerTaskConfigurationRoleBaseable) { + return m.role +} +// Serialize serializes information the current object +func (m *PlannerTaskRoleBasedRule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultRule", m.GetDefaultRule()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("propertyRule", m.GetPropertyRule()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("role", m.GetRole()) + 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 *PlannerTaskRoleBasedRule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultRule sets the defaultRule property value. Default rule that applies when a property or action-specific rule is not provided. Possible values are: Allow, Block +func (m *PlannerTaskRoleBasedRule) SetDefaultRule(value *string)() { + m.defaultRule = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerTaskRoleBasedRule) SetOdataType(value *string)() { + m.odataType = value +} +// SetPropertyRule sets the propertyRule property value. Rules for specific properties and actions. +func (m *PlannerTaskRoleBasedRule) SetPropertyRule(value PlannerTaskPropertyRuleable)() { + m.propertyRule = value +} +// SetRole sets the role property value. The role these rules apply to. +func (m *PlannerTaskRoleBasedRule) SetRole(value PlannerTaskConfigurationRoleBaseable)() { + m.role = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_response.go new file mode 100644 index 000000000..465bd42b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskRoleBasedRuleCollectionResponse +type PlannerTaskRoleBasedRuleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerTaskRoleBasedRuleable +} +// NewPlannerTaskRoleBasedRuleCollectionResponse instantiates a new PlannerTaskRoleBasedRuleCollectionResponse and sets the default values. +func NewPlannerTaskRoleBasedRuleCollectionResponse()(*PlannerTaskRoleBasedRuleCollectionResponse) { + m := &PlannerTaskRoleBasedRuleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerTaskRoleBasedRuleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTaskRoleBasedRuleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTaskRoleBasedRuleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTaskRoleBasedRuleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskRoleBasedRuleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskRoleBasedRuleable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskRoleBasedRuleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerTaskRoleBasedRuleCollectionResponse) GetValue()([]PlannerTaskRoleBasedRuleable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerTaskRoleBasedRuleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerTaskRoleBasedRuleCollectionResponse) SetValue(value []PlannerTaskRoleBasedRuleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_responseable.go new file mode 100644 index 000000000..9ef50d54e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_role_based_rule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskRoleBasedRuleCollectionResponseable +type PlannerTaskRoleBasedRuleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerTaskRoleBasedRuleable) + SetValue(value []PlannerTaskRoleBasedRuleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_role_based_ruleable.go b/src/internal/connector/graph/betasdk/models/planner_task_role_based_ruleable.go new file mode 100644 index 000000000..bebc815d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_role_based_ruleable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskRoleBasedRuleable +type PlannerTaskRoleBasedRuleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultRule()(*string) + GetOdataType()(*string) + GetPropertyRule()(PlannerTaskPropertyRuleable) + GetRole()(PlannerTaskConfigurationRoleBaseable) + SetDefaultRule(value *string)() + SetOdataType(value *string)() + SetPropertyRule(value PlannerTaskPropertyRuleable)() + SetRole(value PlannerTaskConfigurationRoleBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_task_target_kind.go b/src/internal/connector/graph/betasdk/models/planner_task_target_kind.go new file mode 100644 index 000000000..fc687c8b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_task_target_kind.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerTaskTargetKind int + +const ( + GROUP_PLANNERTASKTARGETKIND PlannerTaskTargetKind = iota + UNKNOWNFUTUREVALUE_PLANNERTASKTARGETKIND +) + +func (i PlannerTaskTargetKind) String() string { + return []string{"group", "unknownFutureValue"}[i] +} +func ParsePlannerTaskTargetKind(v string) (interface{}, error) { + result := GROUP_PLANNERTASKTARGETKIND + switch v { + case "group": + result = GROUP_PLANNERTASKTARGETKIND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERTASKTARGETKIND + default: + return 0, errors.New("Unknown PlannerTaskTargetKind value: " + v) + } + return &result, nil +} +func SerializePlannerTaskTargetKind(values []PlannerTaskTargetKind) []string { + 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/planner_taskable.go b/src/internal/connector/graph/betasdk/models/planner_taskable.go new file mode 100644 index 000000000..18a09b91f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_taskable.go @@ -0,0 +1,64 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTaskable +type PlannerTaskable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetActiveChecklistItemCount()(*int32) + GetAppliedCategories()(PlannerAppliedCategoriesable) + GetAssignedToTaskBoardFormat()(PlannerAssignedToTaskBoardTaskFormatable) + GetAssigneePriority()(*string) + GetAssignments()(PlannerAssignmentsable) + GetBucketId()(*string) + GetBucketTaskBoardFormat()(PlannerBucketTaskBoardTaskFormatable) + GetChecklistItemCount()(*int32) + GetCompletedBy()(IdentitySetable) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConversationThreadId()(*string) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreationSource()(PlannerTaskCreationable) + GetDetails()(PlannerTaskDetailsable) + GetDueDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHasDescription()(*bool) + GetOrderHint()(*string) + GetPercentComplete()(*int32) + GetPlanId()(*string) + GetPreviewType()(*PlannerPreviewType) + GetPriority()(*int32) + GetProgressTaskBoardFormat()(PlannerProgressTaskBoardTaskFormatable) + GetReferenceCount()(*int32) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTitle()(*string) + SetActiveChecklistItemCount(value *int32)() + SetAppliedCategories(value PlannerAppliedCategoriesable)() + SetAssignedToTaskBoardFormat(value PlannerAssignedToTaskBoardTaskFormatable)() + SetAssigneePriority(value *string)() + SetAssignments(value PlannerAssignmentsable)() + SetBucketId(value *string)() + SetBucketTaskBoardFormat(value PlannerBucketTaskBoardTaskFormatable)() + SetChecklistItemCount(value *int32)() + SetCompletedBy(value IdentitySetable)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConversationThreadId(value *string)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreationSource(value PlannerTaskCreationable)() + SetDetails(value PlannerTaskDetailsable)() + SetDueDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHasDescription(value *bool)() + SetOrderHint(value *string)() + SetPercentComplete(value *int32)() + SetPlanId(value *string)() + SetPreviewType(value *PlannerPreviewType)() + SetPriority(value *int32)() + SetProgressTaskBoardFormat(value PlannerProgressTaskBoardTaskFormatable)() + SetReferenceCount(value *int32)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_teams_publication_info.go b/src/internal/connector/graph/betasdk/models/planner_teams_publication_info.go new file mode 100644 index 000000000..b635981b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_teams_publication_info.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTeamsPublicationInfo +type PlannerTeamsPublicationInfo struct { + PlannerTaskCreation + // The date and time when this task was last modified by the publication process. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The identifier of the publication. Read-only. + publicationId *string + // The identifier of the plannerPlan this task was originally placed in. Read-only. + publishedToPlanId *string + // The identifier of the team that initiated the publication process. Read-only. + publishingTeamId *string + // The display name of the team that initiated the publication process. This display name is for reference only, and might not represent the most up-to-date name of the team. Read-only. + publishingTeamName *string +} +// NewPlannerTeamsPublicationInfo instantiates a new plannerTeamsPublicationInfo and sets the default values. +func NewPlannerTeamsPublicationInfo()(*PlannerTeamsPublicationInfo) { + m := &PlannerTeamsPublicationInfo{ + PlannerTaskCreation: *NewPlannerTaskCreation(), + } + odataTypeValue := "#microsoft.graph.plannerTeamsPublicationInfo"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePlannerTeamsPublicationInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerTeamsPublicationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerTeamsPublicationInfo(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerTeamsPublicationInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerTaskCreation.GetFieldDeserializers() + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(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["publicationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublicationId(val) + } + return nil + } + res["publishedToPlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedToPlanId(val) + } + return nil + } + res["publishingTeamId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishingTeamId(val) + } + return nil + } + res["publishingTeamName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishingTeamName(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The date and time when this task was last modified by the publication process. Read-only. +func (m *PlannerTeamsPublicationInfo) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerTeamsPublicationInfo) GetOdataType()(*string) { + return m.odataType +} +// GetPublicationId gets the publicationId property value. The identifier of the publication. Read-only. +func (m *PlannerTeamsPublicationInfo) GetPublicationId()(*string) { + return m.publicationId +} +// GetPublishedToPlanId gets the publishedToPlanId property value. The identifier of the plannerPlan this task was originally placed in. Read-only. +func (m *PlannerTeamsPublicationInfo) GetPublishedToPlanId()(*string) { + return m.publishedToPlanId +} +// GetPublishingTeamId gets the publishingTeamId property value. The identifier of the team that initiated the publication process. Read-only. +func (m *PlannerTeamsPublicationInfo) GetPublishingTeamId()(*string) { + return m.publishingTeamId +} +// GetPublishingTeamName gets the publishingTeamName property value. The display name of the team that initiated the publication process. This display name is for reference only, and might not represent the most up-to-date name of the team. Read-only. +func (m *PlannerTeamsPublicationInfo) GetPublishingTeamName()(*string) { + return m.publishingTeamName +} +// Serialize serializes information the current object +func (m *PlannerTeamsPublicationInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerTaskCreation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publicationId", m.GetPublicationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publishedToPlanId", m.GetPublishedToPlanId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publishingTeamId", m.GetPublishingTeamId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publishingTeamName", m.GetPublishingTeamName()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The date and time when this task was last modified by the publication process. Read-only. +func (m *PlannerTeamsPublicationInfo) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerTeamsPublicationInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublicationId sets the publicationId property value. The identifier of the publication. Read-only. +func (m *PlannerTeamsPublicationInfo) SetPublicationId(value *string)() { + m.publicationId = value +} +// SetPublishedToPlanId sets the publishedToPlanId property value. The identifier of the plannerPlan this task was originally placed in. Read-only. +func (m *PlannerTeamsPublicationInfo) SetPublishedToPlanId(value *string)() { + m.publishedToPlanId = value +} +// SetPublishingTeamId sets the publishingTeamId property value. The identifier of the team that initiated the publication process. Read-only. +func (m *PlannerTeamsPublicationInfo) SetPublishingTeamId(value *string)() { + m.publishingTeamId = value +} +// SetPublishingTeamName sets the publishingTeamName property value. The display name of the team that initiated the publication process. This display name is for reference only, and might not represent the most up-to-date name of the team. Read-only. +func (m *PlannerTeamsPublicationInfo) SetPublishingTeamName(value *string)() { + m.publishingTeamName = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_teams_publication_infoable.go b/src/internal/connector/graph/betasdk/models/planner_teams_publication_infoable.go new file mode 100644 index 000000000..a1c9f6b58 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_teams_publication_infoable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerTeamsPublicationInfoable +type PlannerTeamsPublicationInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerTaskCreationable + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetPublicationId()(*string) + GetPublishedToPlanId()(*string) + GetPublishingTeamId()(*string) + GetPublishingTeamName()(*string) + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetPublicationId(value *string)() + SetPublishedToPlanId(value *string)() + SetPublishingTeamId(value *string)() + SetPublishingTeamName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user.go b/src/internal/connector/graph/betasdk/models/planner_user.go new file mode 100644 index 000000000..e890920d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user.go @@ -0,0 +1,290 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUser +type PlannerUser struct { + PlannerDelta + // The all property + all []PlannerDeltaable + // A collection that contains the references to the plans that the user has marked as favorites. + favoritePlanReferences PlannerFavoritePlanReferenceCollectionable + // Read-only. Nullable. Returns the plannerPlans that the user marked as favorites. + favoritePlans []PlannerPlanable + // The plans property + plans []PlannerPlanable + // A collection that contains references to the plans that were viewed recently by the user in apps that support recent plans. + recentPlanReferences PlannerRecentPlanReferenceCollectionable + // Read-only. Nullable. Returns the plannerPlans that have been recently viewed by the user in apps that support recent plans. + recentPlans []PlannerPlanable + // Read-only. Nullable. Returns the plannerPlans contained by the plannerRosters the user is a member. + rosterPlans []PlannerPlanable + // Read-only. Nullable. Returns the plannerTasks assigned to the user. + tasks []PlannerTaskable +} +// NewPlannerUser instantiates a new PlannerUser and sets the default values. +func NewPlannerUser()(*PlannerUser) { + m := &PlannerUser{ + PlannerDelta: *NewPlannerDelta(), + } + return m +} +// CreatePlannerUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerUser(), nil +} +// GetAll gets the all property value. The all property +func (m *PlannerUser) GetAll()([]PlannerDeltaable) { + return m.all +} +// GetFavoritePlanReferences gets the favoritePlanReferences property value. A collection that contains the references to the plans that the user has marked as favorites. +func (m *PlannerUser) GetFavoritePlanReferences()(PlannerFavoritePlanReferenceCollectionable) { + return m.favoritePlanReferences +} +// GetFavoritePlans gets the favoritePlans property value. Read-only. Nullable. Returns the plannerPlans that the user marked as favorites. +func (m *PlannerUser) GetFavoritePlans()([]PlannerPlanable) { + return m.favoritePlans +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PlannerDelta.GetFieldDeserializers() + res["all"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerDeltaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerDeltaable, len(val)) + for i, v := range val { + res[i] = v.(PlannerDeltaable) + } + m.SetAll(res) + } + return nil + } + res["favoritePlanReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerFavoritePlanReferenceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFavoritePlanReferences(val.(PlannerFavoritePlanReferenceCollectionable)) + } + return nil + } + res["favoritePlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetFavoritePlans(res) + } + return nil + } + res["plans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetPlans(res) + } + return nil + } + res["recentPlanReferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePlannerRecentPlanReferenceCollectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecentPlanReferences(val.(PlannerRecentPlanReferenceCollectionable)) + } + return nil + } + res["recentPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetRecentPlans(res) + } + return nil + } + res["rosterPlans"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerPlanable, len(val)) + for i, v := range val { + res[i] = v.(PlannerPlanable) + } + m.SetRosterPlans(res) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerTaskable, len(val)) + for i, v := range val { + res[i] = v.(PlannerTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetPlans gets the plans property value. The plans property +func (m *PlannerUser) GetPlans()([]PlannerPlanable) { + return m.plans +} +// GetRecentPlanReferences gets the recentPlanReferences property value. A collection that contains references to the plans that were viewed recently by the user in apps that support recent plans. +func (m *PlannerUser) GetRecentPlanReferences()(PlannerRecentPlanReferenceCollectionable) { + return m.recentPlanReferences +} +// GetRecentPlans gets the recentPlans property value. Read-only. Nullable. Returns the plannerPlans that have been recently viewed by the user in apps that support recent plans. +func (m *PlannerUser) GetRecentPlans()([]PlannerPlanable) { + return m.recentPlans +} +// GetRosterPlans gets the rosterPlans property value. Read-only. Nullable. Returns the plannerPlans contained by the plannerRosters the user is a member. +func (m *PlannerUser) GetRosterPlans()([]PlannerPlanable) { + return m.rosterPlans +} +// GetTasks gets the tasks property value. Read-only. Nullable. Returns the plannerTasks assigned to the user. +func (m *PlannerUser) GetTasks()([]PlannerTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *PlannerUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PlannerDelta.Serialize(writer) + if err != nil { + return err + } + if m.GetAll() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAll())) + for i, v := range m.GetAll() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("all", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("favoritePlanReferences", m.GetFavoritePlanReferences()) + if err != nil { + return err + } + } + if m.GetFavoritePlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFavoritePlans())) + for i, v := range m.GetFavoritePlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("favoritePlans", cast) + if err != nil { + return err + } + } + if m.GetPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPlans())) + for i, v := range m.GetPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("plans", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("recentPlanReferences", m.GetRecentPlanReferences()) + if err != nil { + return err + } + } + if m.GetRecentPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecentPlans())) + for i, v := range m.GetRecentPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("recentPlans", cast) + if err != nil { + return err + } + } + if m.GetRosterPlans() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRosterPlans())) + for i, v := range m.GetRosterPlans() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rosterPlans", cast) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetAll sets the all property value. The all property +func (m *PlannerUser) SetAll(value []PlannerDeltaable)() { + m.all = value +} +// SetFavoritePlanReferences sets the favoritePlanReferences property value. A collection that contains the references to the plans that the user has marked as favorites. +func (m *PlannerUser) SetFavoritePlanReferences(value PlannerFavoritePlanReferenceCollectionable)() { + m.favoritePlanReferences = value +} +// SetFavoritePlans sets the favoritePlans property value. Read-only. Nullable. Returns the plannerPlans that the user marked as favorites. +func (m *PlannerUser) SetFavoritePlans(value []PlannerPlanable)() { + m.favoritePlans = value +} +// SetPlans sets the plans property value. The plans property +func (m *PlannerUser) SetPlans(value []PlannerPlanable)() { + m.plans = value +} +// SetRecentPlanReferences sets the recentPlanReferences property value. A collection that contains references to the plans that were viewed recently by the user in apps that support recent plans. +func (m *PlannerUser) SetRecentPlanReferences(value PlannerRecentPlanReferenceCollectionable)() { + m.recentPlanReferences = value +} +// SetRecentPlans sets the recentPlans property value. Read-only. Nullable. Returns the plannerPlans that have been recently viewed by the user in apps that support recent plans. +func (m *PlannerUser) SetRecentPlans(value []PlannerPlanable)() { + m.recentPlans = value +} +// SetRosterPlans sets the rosterPlans property value. Read-only. Nullable. Returns the plannerPlans contained by the plannerRosters the user is a member. +func (m *PlannerUser) SetRosterPlans(value []PlannerPlanable)() { + m.rosterPlans = value +} +// SetTasks sets the tasks property value. Read-only. Nullable. Returns the plannerTasks assigned to the user. +func (m *PlannerUser) SetTasks(value []PlannerTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user_collection_response.go b/src/internal/connector/graph/betasdk/models/planner_user_collection_response.go new file mode 100644 index 000000000..592b9cfc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUserCollectionResponse +type PlannerUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlannerUserable +} +// NewPlannerUserCollectionResponse instantiates a new PlannerUserCollectionResponse and sets the default values. +func NewPlannerUserCollectionResponse()(*PlannerUserCollectionResponse) { + m := &PlannerUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlannerUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlannerUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlannerUserable, len(val)) + for i, v := range val { + res[i] = v.(PlannerUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlannerUserCollectionResponse) GetValue()([]PlannerUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlannerUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlannerUserCollectionResponse) SetValue(value []PlannerUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/planner_user_collection_responseable.go new file mode 100644 index 000000000..510df101a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUserCollectionResponseable +type PlannerUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlannerUserable) + SetValue(value []PlannerUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user_ids.go b/src/internal/connector/graph/betasdk/models/planner_user_ids.go new file mode 100644 index 000000000..955a79f66 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user_ids.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUserIds +type PlannerUserIds 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 OdataType property + odataType *string +} +// NewPlannerUserIds instantiates a new plannerUserIds and sets the default values. +func NewPlannerUserIds()(*PlannerUserIds) { + m := &PlannerUserIds{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePlannerUserIdsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlannerUserIdsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlannerUserIds(), 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 *PlannerUserIds) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlannerUserIds) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PlannerUserIds) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PlannerUserIds) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PlannerUserIds) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PlannerUserIds) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user_idsable.go b/src/internal/connector/graph/betasdk/models/planner_user_idsable.go new file mode 100644 index 000000000..be063b0eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user_idsable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUserIdsable +type PlannerUserIdsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/planner_user_role_kind.go b/src/internal/connector/graph/betasdk/models/planner_user_role_kind.go new file mode 100644 index 000000000..2967f7107 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_user_role_kind.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlannerUserRoleKind int + +const ( + RELATIONSHIP_PLANNERUSERROLEKIND PlannerUserRoleKind = iota + UNKNOWNFUTUREVALUE_PLANNERUSERROLEKIND +) + +func (i PlannerUserRoleKind) String() string { + return []string{"relationship", "unknownFutureValue"}[i] +} +func ParsePlannerUserRoleKind(v string) (interface{}, error) { + result := RELATIONSHIP_PLANNERUSERROLEKIND + switch v { + case "relationship": + result = RELATIONSHIP_PLANNERUSERROLEKIND + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLANNERUSERROLEKIND + default: + return 0, errors.New("Unknown PlannerUserRoleKind value: " + v) + } + return &result, nil +} +func SerializePlannerUserRoleKind(values []PlannerUserRoleKind) []string { + 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/planner_userable.go b/src/internal/connector/graph/betasdk/models/planner_userable.go new file mode 100644 index 000000000..13db9f554 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/planner_userable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlannerUserable +type PlannerUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PlannerDeltaable + GetAll()([]PlannerDeltaable) + GetFavoritePlanReferences()(PlannerFavoritePlanReferenceCollectionable) + GetFavoritePlans()([]PlannerPlanable) + GetPlans()([]PlannerPlanable) + GetRecentPlanReferences()(PlannerRecentPlanReferenceCollectionable) + GetRecentPlans()([]PlannerPlanable) + GetRosterPlans()([]PlannerPlanable) + GetTasks()([]PlannerTaskable) + SetAll(value []PlannerDeltaable)() + SetFavoritePlanReferences(value PlannerFavoritePlanReferenceCollectionable)() + SetFavoritePlans(value []PlannerPlanable)() + SetPlans(value []PlannerPlanable)() + SetRecentPlanReferences(value PlannerRecentPlanReferenceCollectionable)() + SetRecentPlans(value []PlannerPlanable)() + SetRosterPlans(value []PlannerPlanable)() + SetTasks(value []PlannerTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/plannerable.go b/src/internal/connector/graph/betasdk/models/plannerable.go new file mode 100644 index 000000000..356fe9b99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/plannerable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Plannerable +type Plannerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuckets()([]PlannerBucketable) + GetPlans()([]PlannerPlanable) + GetRosters()([]PlannerRosterable) + GetTasks()([]PlannerTaskable) + SetBuckets(value []PlannerBucketable)() + SetPlans(value []PlannerPlanable)() + SetRosters(value []PlannerRosterable)() + SetTasks(value []PlannerTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/platform.go b/src/internal/connector/graph/betasdk/models/platform.go new file mode 100644 index 000000000..076dda77d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/platform.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Platform int + +const ( + // Unknown device platform + UNKNOWN_PLATFORM Platform = iota + // IOS device platform + IOS_PLATFORM + // Android device platform + ANDROID_PLATFORM + // Windows device platform + WINDOWS_PLATFORM + // WindowsMobile device platform + WINDOWSMOBILE_PLATFORM + // Mac device platform + MACOS_PLATFORM +) + +func (i Platform) String() string { + return []string{"unknown", "ios", "android", "windows", "windowsMobile", "macOS"}[i] +} +func ParsePlatform(v string) (interface{}, error) { + result := UNKNOWN_PLATFORM + switch v { + case "unknown": + result = UNKNOWN_PLATFORM + case "ios": + result = IOS_PLATFORM + case "android": + result = ANDROID_PLATFORM + case "windows": + result = WINDOWS_PLATFORM + case "windowsMobile": + result = WINDOWSMOBILE_PLATFORM + case "macOS": + result = MACOS_PLATFORM + default: + return 0, errors.New("Unknown Platform value: " + v) + } + return &result, nil +} +func SerializePlatform(values []Platform) []string { + 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/play_prompt_completion_reason.go b/src/internal/connector/graph/betasdk/models/play_prompt_completion_reason.go new file mode 100644 index 000000000..79a983189 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/play_prompt_completion_reason.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PlayPromptCompletionReason int + +const ( + UNKNOWN_PLAYPROMPTCOMPLETIONREASON PlayPromptCompletionReason = iota + COMPLETEDSUCCESSFULLY_PLAYPROMPTCOMPLETIONREASON + MEDIAOPERATIONCANCELED_PLAYPROMPTCOMPLETIONREASON + UNKNOWNFUTUREVALUE_PLAYPROMPTCOMPLETIONREASON +) + +func (i PlayPromptCompletionReason) String() string { + return []string{"unknown", "completedSuccessfully", "mediaOperationCanceled", "unknownFutureValue"}[i] +} +func ParsePlayPromptCompletionReason(v string) (interface{}, error) { + result := UNKNOWN_PLAYPROMPTCOMPLETIONREASON + switch v { + case "unknown": + result = UNKNOWN_PLAYPROMPTCOMPLETIONREASON + case "completedSuccessfully": + result = COMPLETEDSUCCESSFULLY_PLAYPROMPTCOMPLETIONREASON + case "mediaOperationCanceled": + result = MEDIAOPERATIONCANCELED_PLAYPROMPTCOMPLETIONREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PLAYPROMPTCOMPLETIONREASON + default: + return 0, errors.New("Unknown PlayPromptCompletionReason value: " + v) + } + return &result, nil +} +func SerializePlayPromptCompletionReason(values []PlayPromptCompletionReason) []string { + 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/play_prompt_operation.go b/src/internal/connector/graph/betasdk/models/play_prompt_operation.go new file mode 100644 index 000000000..1b499c73e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/play_prompt_operation.go @@ -0,0 +1,61 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlayPromptOperation +type PlayPromptOperation struct { + CommsOperation + // Possible values are: unknown, completedSuccessfully, mediaOperationCanceled. + completionReason *PlayPromptCompletionReason +} +// NewPlayPromptOperation instantiates a new PlayPromptOperation and sets the default values. +func NewPlayPromptOperation()(*PlayPromptOperation) { + m := &PlayPromptOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreatePlayPromptOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlayPromptOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlayPromptOperation(), nil +} +// GetCompletionReason gets the completionReason property value. Possible values are: unknown, completedSuccessfully, mediaOperationCanceled. +func (m *PlayPromptOperation) GetCompletionReason()(*PlayPromptCompletionReason) { + return m.completionReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlayPromptOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + res["completionReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePlayPromptCompletionReason) + if err != nil { + return err + } + if val != nil { + m.SetCompletionReason(val.(*PlayPromptCompletionReason)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PlayPromptOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + if m.GetCompletionReason() != nil { + cast := (*m.GetCompletionReason()).String() + err = writer.WriteStringValue("completionReason", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCompletionReason sets the completionReason property value. Possible values are: unknown, completedSuccessfully, mediaOperationCanceled. +func (m *PlayPromptOperation) SetCompletionReason(value *PlayPromptCompletionReason)() { + m.completionReason = value +} diff --git a/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_response.go new file mode 100644 index 000000000..8f2c251dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlayPromptOperationCollectionResponse +type PlayPromptOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PlayPromptOperationable +} +// NewPlayPromptOperationCollectionResponse instantiates a new PlayPromptOperationCollectionResponse and sets the default values. +func NewPlayPromptOperationCollectionResponse()(*PlayPromptOperationCollectionResponse) { + m := &PlayPromptOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePlayPromptOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePlayPromptOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPlayPromptOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PlayPromptOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePlayPromptOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PlayPromptOperationable, len(val)) + for i, v := range val { + res[i] = v.(PlayPromptOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PlayPromptOperationCollectionResponse) GetValue()([]PlayPromptOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PlayPromptOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PlayPromptOperationCollectionResponse) SetValue(value []PlayPromptOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_responseable.go new file mode 100644 index 000000000..7aeeb1013 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/play_prompt_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlayPromptOperationCollectionResponseable +type PlayPromptOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PlayPromptOperationable) + SetValue(value []PlayPromptOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/play_prompt_operationable.go b/src/internal/connector/graph/betasdk/models/play_prompt_operationable.go new file mode 100644 index 000000000..70cbb0d95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/play_prompt_operationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PlayPromptOperationable +type PlayPromptOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletionReason()(*PlayPromptCompletionReason) + SetCompletionReason(value *PlayPromptCompletionReason)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_base.go b/src/internal/connector/graph/betasdk/models/policy_base.go new file mode 100644 index 000000000..8cda9aa85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_base.go @@ -0,0 +1,134 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicyBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicyBase struct { + DirectoryObject + // Description for this policy. Required. + description *string + // Display name for this policy. Required. + displayName *string +} +// NewPolicyBase instantiates a new policyBase and sets the default values. +func NewPolicyBase()(*PolicyBase) { + m := &PolicyBase{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.policyBase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePolicyBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicyBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.activityBasedTimeoutPolicy": + return NewActivityBasedTimeoutPolicy(), nil + case "#microsoft.graph.appManagementPolicy": + return NewAppManagementPolicy(), nil + case "#microsoft.graph.authorizationPolicy": + return NewAuthorizationPolicy(), nil + case "#microsoft.graph.claimsMappingPolicy": + return NewClaimsMappingPolicy(), nil + case "#microsoft.graph.crossTenantAccessPolicy": + return NewCrossTenantAccessPolicy(), nil + case "#microsoft.graph.externalIdentitiesPolicy": + return NewExternalIdentitiesPolicy(), nil + case "#microsoft.graph.homeRealmDiscoveryPolicy": + return NewHomeRealmDiscoveryPolicy(), nil + case "#microsoft.graph.identitySecurityDefaultsEnforcementPolicy": + return NewIdentitySecurityDefaultsEnforcementPolicy(), nil + case "#microsoft.graph.permissionGrantPolicy": + return NewPermissionGrantPolicy(), nil + case "#microsoft.graph.servicePrincipalCreationPolicy": + return NewServicePrincipalCreationPolicy(), nil + case "#microsoft.graph.stsPolicy": + return NewStsPolicy(), nil + case "#microsoft.graph.tenantAppManagementPolicy": + return NewTenantAppManagementPolicy(), nil + case "#microsoft.graph.tenantRelationshipAccessPolicyBase": + return NewTenantRelationshipAccessPolicyBase(), nil + case "#microsoft.graph.tokenIssuancePolicy": + return NewTokenIssuancePolicy(), nil + case "#microsoft.graph.tokenLifetimePolicy": + return NewTokenLifetimePolicy(), nil + } + } + } + } + return NewPolicyBase(), nil +} +// GetDescription gets the description property value. Description for this policy. Required. +func (m *PolicyBase) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display name for this policy. Required. +func (m *PolicyBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicyBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PolicyBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description for this policy. Required. +func (m *PolicyBase) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display name for this policy. Required. +func (m *PolicyBase) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_base_collection_response.go b/src/internal/connector/graph/betasdk/models/policy_base_collection_response.go new file mode 100644 index 000000000..cad58698a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_base_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicyBaseCollectionResponse +type PolicyBaseCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PolicyBaseable +} +// NewPolicyBaseCollectionResponse instantiates a new PolicyBaseCollectionResponse and sets the default values. +func NewPolicyBaseCollectionResponse()(*PolicyBaseCollectionResponse) { + m := &PolicyBaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePolicyBaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicyBaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicyBaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicyBaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicyBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicyBaseable, len(val)) + for i, v := range val { + res[i] = v.(PolicyBaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PolicyBaseCollectionResponse) GetValue()([]PolicyBaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *PolicyBaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PolicyBaseCollectionResponse) SetValue(value []PolicyBaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_base_collection_responseable.go b/src/internal/connector/graph/betasdk/models/policy_base_collection_responseable.go new file mode 100644 index 000000000..f3b36d5f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_base_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicyBaseCollectionResponseable +type PolicyBaseCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PolicyBaseable) + SetValue(value []PolicyBaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_baseable.go b/src/internal/connector/graph/betasdk/models/policy_baseable.go new file mode 100644 index 000000000..58a3cc6d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_baseable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicyBaseable +type PolicyBaseable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_platform_type.go b/src/internal/connector/graph/betasdk/models/policy_platform_type.go new file mode 100644 index 000000000..e49da21b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_platform_type.go @@ -0,0 +1,72 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicyPlatformType int + +const ( + // Android. + ANDROID_POLICYPLATFORMTYPE PolicyPlatformType = iota + // AndroidForWork. + ANDROIDFORWORK_POLICYPLATFORMTYPE + // iOS. + IOS_POLICYPLATFORMTYPE + // MacOS. + MACOS_POLICYPLATFORMTYPE + // WindowsPhone 8.1. + WINDOWSPHONE81_POLICYPLATFORMTYPE + // Windows 8.1 and later + WINDOWS81ANDLATER_POLICYPLATFORMTYPE + // Windows 10 and later. + WINDOWS10ANDLATER_POLICYPLATFORMTYPE + // AndroidWorkProfile. + ANDROIDWORKPROFILE_POLICYPLATFORMTYPE + // Windows10XProfile. + WINDOWS10XPROFILE_POLICYPLATFORMTYPE + // AndroidAOSPProfile. + ANDROIDAOSP_POLICYPLATFORMTYPE + // All platforms. + ALL_POLICYPLATFORMTYPE +) + +func (i PolicyPlatformType) String() string { + return []string{"android", "androidForWork", "iOS", "macOS", "windowsPhone81", "windows81AndLater", "windows10AndLater", "androidWorkProfile", "windows10XProfile", "androidAOSP", "all"}[i] +} +func ParsePolicyPlatformType(v string) (interface{}, error) { + result := ANDROID_POLICYPLATFORMTYPE + switch v { + case "android": + result = ANDROID_POLICYPLATFORMTYPE + case "androidForWork": + result = ANDROIDFORWORK_POLICYPLATFORMTYPE + case "iOS": + result = IOS_POLICYPLATFORMTYPE + case "macOS": + result = MACOS_POLICYPLATFORMTYPE + case "windowsPhone81": + result = WINDOWSPHONE81_POLICYPLATFORMTYPE + case "windows81AndLater": + result = WINDOWS81ANDLATER_POLICYPLATFORMTYPE + case "windows10AndLater": + result = WINDOWS10ANDLATER_POLICYPLATFORMTYPE + case "androidWorkProfile": + result = ANDROIDWORKPROFILE_POLICYPLATFORMTYPE + case "windows10XProfile": + result = WINDOWS10XPROFILE_POLICYPLATFORMTYPE + case "androidAOSP": + result = ANDROIDAOSP_POLICYPLATFORMTYPE + case "all": + result = ALL_POLICYPLATFORMTYPE + default: + return 0, errors.New("Unknown PolicyPlatformType value: " + v) + } + return &result, nil +} +func SerializePolicyPlatformType(values []PolicyPlatformType) []string { + 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/policy_scope.go b/src/internal/connector/graph/betasdk/models/policy_scope.go new file mode 100644 index 000000000..7bd9a7650 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_scope.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicyScope int + +const ( + NONE_POLICYSCOPE PolicyScope = iota + ALL_POLICYSCOPE + SELECTED_POLICYSCOPE + UNKNOWNFUTUREVALUE_POLICYSCOPE +) + +func (i PolicyScope) String() string { + return []string{"none", "all", "selected", "unknownFutureValue"}[i] +} +func ParsePolicyScope(v string) (interface{}, error) { + result := NONE_POLICYSCOPE + switch v { + case "none": + result = NONE_POLICYSCOPE + case "all": + result = ALL_POLICYSCOPE + case "selected": + result = SELECTED_POLICYSCOPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_POLICYSCOPE + default: + return 0, errors.New("Unknown PolicyScope value: " + v) + } + return &result, nil +} +func SerializePolicyScope(values []PolicyScope) []string { + 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/policy_set.go b/src/internal/connector/graph/betasdk/models/policy_set.go new file mode 100644 index 000000000..acda9c1db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set.go @@ -0,0 +1,321 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySet a class containing the properties used for PolicySet. +type PolicySet struct { + Entity + // Assignments of the PolicySet. + assignments []PolicySetAssignmentable + // Creation time of the PolicySet. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Description of the PolicySet. + description *string + // DisplayName of the PolicySet. + displayName *string + // The errorCode property + errorCode *ErrorCode + // Tags of the guided deployment + guidedDeploymentTags []string + // Items of the PolicySet with maximum count 100. + items []PolicySetItemable + // Last modified time of the PolicySet. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // RoleScopeTags of the PolicySet + roleScopeTags []string + // The enum to specify the status of PolicySet. + status *PolicySetStatus +} +// NewPolicySet instantiates a new policySet and sets the default values. +func NewPolicySet()(*PolicySet) { + m := &PolicySet{ + Entity: *NewEntity(), + } + return m +} +// CreatePolicySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicySet(), nil +} +// GetAssignments gets the assignments property value. Assignments of the PolicySet. +func (m *PolicySet) GetAssignments()([]PolicySetAssignmentable) { + return m.assignments +} +// GetCreatedDateTime gets the createdDateTime property value. Creation time of the PolicySet. +func (m *PolicySet) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Description of the PolicySet. +func (m *PolicySet) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. DisplayName of the PolicySet. +func (m *PolicySet) GetDisplayName()(*string) { + return m.displayName +} +// GetErrorCode gets the errorCode property value. The errorCode property +func (m *PolicySet) GetErrorCode()(*ErrorCode) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseErrorCode) + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val.(*ErrorCode)) + } + return nil + } + res["guidedDeploymentTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGuidedDeploymentTags(res) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetItemable) + } + m.SetItems(res) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["roleScopeTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTags(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicySetStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PolicySetStatus)) + } + return nil + } + return res +} +// GetGuidedDeploymentTags gets the guidedDeploymentTags property value. Tags of the guided deployment +func (m *PolicySet) GetGuidedDeploymentTags()([]string) { + return m.guidedDeploymentTags +} +// GetItems gets the items property value. Items of the PolicySet with maximum count 100. +func (m *PolicySet) GetItems()([]PolicySetItemable) { + return m.items +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified time of the PolicySet. +func (m *PolicySet) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRoleScopeTags gets the roleScopeTags property value. RoleScopeTags of the PolicySet +func (m *PolicySet) GetRoleScopeTags()([]string) { + return m.roleScopeTags +} +// GetStatus gets the status property value. The enum to specify the status of PolicySet. +func (m *PolicySet) GetStatus()(*PolicySetStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *PolicySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetErrorCode() != nil { + cast := (*m.GetErrorCode()).String() + err = writer.WriteStringValue("errorCode", &cast) + if err != nil { + return err + } + } + if m.GetGuidedDeploymentTags() != nil { + err = writer.WriteCollectionOfStringValues("guidedDeploymentTags", m.GetGuidedDeploymentTags()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetRoleScopeTags() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTags", m.GetRoleScopeTags()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. Assignments of the PolicySet. +func (m *PolicySet) SetAssignments(value []PolicySetAssignmentable)() { + m.assignments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Creation time of the PolicySet. +func (m *PolicySet) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Description of the PolicySet. +func (m *PolicySet) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. DisplayName of the PolicySet. +func (m *PolicySet) SetDisplayName(value *string)() { + m.displayName = value +} +// SetErrorCode sets the errorCode property value. The errorCode property +func (m *PolicySet) SetErrorCode(value *ErrorCode)() { + m.errorCode = value +} +// SetGuidedDeploymentTags sets the guidedDeploymentTags property value. Tags of the guided deployment +func (m *PolicySet) SetGuidedDeploymentTags(value []string)() { + m.guidedDeploymentTags = value +} +// SetItems sets the items property value. Items of the PolicySet with maximum count 100. +func (m *PolicySet) SetItems(value []PolicySetItemable)() { + m.items = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified time of the PolicySet. +func (m *PolicySet) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRoleScopeTags sets the roleScopeTags property value. RoleScopeTags of the PolicySet +func (m *PolicySet) SetRoleScopeTags(value []string)() { + m.roleScopeTags = value +} +// SetStatus sets the status property value. The enum to specify the status of PolicySet. +func (m *PolicySet) SetStatus(value *PolicySetStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_assignment.go b/src/internal/connector/graph/betasdk/models/policy_set_assignment.go new file mode 100644 index 000000000..ff6b291bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_assignment.go @@ -0,0 +1,87 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetAssignment a class containing the properties used for PolicySet Assignment. +type PolicySetAssignment struct { + Entity + // Last modified time of the PolicySetAssignment. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The target group of PolicySetAssignment + target DeviceAndAppManagementAssignmentTargetable +} +// NewPolicySetAssignment instantiates a new policySetAssignment and sets the default values. +func NewPolicySetAssignment()(*PolicySetAssignment) { + m := &PolicySetAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreatePolicySetAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicySetAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySetAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified time of the PolicySetAssignment. +func (m *PolicySetAssignment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetTarget gets the target property value. The target group of PolicySetAssignment +func (m *PolicySetAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *PolicySetAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified time of the PolicySetAssignment. +func (m *PolicySetAssignment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetTarget sets the target property value. The target group of PolicySetAssignment +func (m *PolicySetAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_response.go new file mode 100644 index 000000000..fe2161f6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetAssignmentCollectionResponse +type PolicySetAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PolicySetAssignmentable +} +// NewPolicySetAssignmentCollectionResponse instantiates a new PolicySetAssignmentCollectionResponse and sets the default values. +func NewPolicySetAssignmentCollectionResponse()(*PolicySetAssignmentCollectionResponse) { + m := &PolicySetAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePolicySetAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicySetAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySetAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PolicySetAssignmentCollectionResponse) GetValue()([]PolicySetAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *PolicySetAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PolicySetAssignmentCollectionResponse) SetValue(value []PolicySetAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_responseable.go new file mode 100644 index 000000000..7c675e36f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetAssignmentCollectionResponseable +type PolicySetAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PolicySetAssignmentable) + SetValue(value []PolicySetAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_assignmentable.go b/src/internal/connector/graph/betasdk/models/policy_set_assignmentable.go new file mode 100644 index 000000000..48f623cb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_assignmentable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetAssignmentable +type PolicySetAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_collection_response.go b/src/internal/connector/graph/betasdk/models/policy_set_collection_response.go new file mode 100644 index 000000000..47461b2da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetCollectionResponse +type PolicySetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PolicySetable +} +// NewPolicySetCollectionResponse instantiates a new PolicySetCollectionResponse and sets the default values. +func NewPolicySetCollectionResponse()(*PolicySetCollectionResponse) { + m := &PolicySetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePolicySetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicySetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PolicySetCollectionResponse) GetValue()([]PolicySetable) { + return m.value +} +// Serialize serializes information the current object +func (m *PolicySetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PolicySetCollectionResponse) SetValue(value []PolicySetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/policy_set_collection_responseable.go new file mode 100644 index 000000000..81f67affe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetCollectionResponseable +type PolicySetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PolicySetable) + SetValue(value []PolicySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_item.go b/src/internal/connector/graph/betasdk/models/policy_set_item.go new file mode 100644 index 000000000..e98535247 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_item.go @@ -0,0 +1,291 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetItem a class containing the properties used for PolicySet Item. +type PolicySetItem struct { + Entity + // Creation time of the PolicySetItem. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // DisplayName of the PolicySetItem. + displayName *string + // The errorCode property + errorCode *ErrorCode + // Tags of the guided deployment + guidedDeploymentTags []string + // policySetType of the PolicySetItem. + itemType *string + // Last modified time of the PolicySetItem. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // PayloadId of the PolicySetItem. + payloadId *string + // The enum to specify the status of PolicySet. + status *PolicySetStatus +} +// NewPolicySetItem instantiates a new policySetItem and sets the default values. +func NewPolicySetItem()(*PolicySetItem) { + m := &PolicySetItem{ + Entity: *NewEntity(), + } + return m +} +// CreatePolicySetItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceCompliancePolicyPolicySetItem": + return NewDeviceCompliancePolicyPolicySetItem(), nil + case "#microsoft.graph.deviceConfigurationPolicySetItem": + return NewDeviceConfigurationPolicySetItem(), nil + case "#microsoft.graph.deviceManagementConfigurationPolicyPolicySetItem": + return NewDeviceManagementConfigurationPolicyPolicySetItem(), nil + case "#microsoft.graph.deviceManagementScriptPolicySetItem": + return NewDeviceManagementScriptPolicySetItem(), nil + case "#microsoft.graph.enrollmentRestrictionsConfigurationPolicySetItem": + return NewEnrollmentRestrictionsConfigurationPolicySetItem(), nil + case "#microsoft.graph.iosLobAppProvisioningConfigurationPolicySetItem": + return NewIosLobAppProvisioningConfigurationPolicySetItem(), nil + case "#microsoft.graph.managedAppProtectionPolicySetItem": + return NewManagedAppProtectionPolicySetItem(), nil + case "#microsoft.graph.managedDeviceMobileAppConfigurationPolicySetItem": + return NewManagedDeviceMobileAppConfigurationPolicySetItem(), nil + case "#microsoft.graph.mdmWindowsInformationProtectionPolicyPolicySetItem": + return NewMdmWindowsInformationProtectionPolicyPolicySetItem(), nil + case "#microsoft.graph.mobileAppPolicySetItem": + return NewMobileAppPolicySetItem(), nil + case "#microsoft.graph.targetedManagedAppConfigurationPolicySetItem": + return NewTargetedManagedAppConfigurationPolicySetItem(), nil + case "#microsoft.graph.windows10EnrollmentCompletionPageConfigurationPolicySetItem": + return NewWindows10EnrollmentCompletionPageConfigurationPolicySetItem(), nil + case "#microsoft.graph.windowsAutopilotDeploymentProfilePolicySetItem": + return NewWindowsAutopilotDeploymentProfilePolicySetItem(), nil + } + } + } + } + return NewPolicySetItem(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Creation time of the PolicySetItem. +func (m *PolicySetItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. DisplayName of the PolicySetItem. +func (m *PolicySetItem) GetDisplayName()(*string) { + return m.displayName +} +// GetErrorCode gets the errorCode property value. The errorCode property +func (m *PolicySetItem) GetErrorCode()(*ErrorCode) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySetItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseErrorCode) + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val.(*ErrorCode)) + } + return nil + } + res["guidedDeploymentTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGuidedDeploymentTags(res) + } + return nil + } + res["itemType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetItemType(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["payloadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayloadId(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicySetStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PolicySetStatus)) + } + return nil + } + return res +} +// GetGuidedDeploymentTags gets the guidedDeploymentTags property value. Tags of the guided deployment +func (m *PolicySetItem) GetGuidedDeploymentTags()([]string) { + return m.guidedDeploymentTags +} +// GetItemType gets the itemType property value. policySetType of the PolicySetItem. +func (m *PolicySetItem) GetItemType()(*string) { + return m.itemType +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified time of the PolicySetItem. +func (m *PolicySetItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetPayloadId gets the payloadId property value. PayloadId of the PolicySetItem. +func (m *PolicySetItem) GetPayloadId()(*string) { + return m.payloadId +} +// GetStatus gets the status property value. The enum to specify the status of PolicySet. +func (m *PolicySetItem) GetStatus()(*PolicySetStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *PolicySetItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetErrorCode() != nil { + cast := (*m.GetErrorCode()).String() + err = writer.WriteStringValue("errorCode", &cast) + if err != nil { + return err + } + } + if m.GetGuidedDeploymentTags() != nil { + err = writer.WriteCollectionOfStringValues("guidedDeploymentTags", m.GetGuidedDeploymentTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("itemType", m.GetItemType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payloadId", m.GetPayloadId()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Creation time of the PolicySetItem. +func (m *PolicySetItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. DisplayName of the PolicySetItem. +func (m *PolicySetItem) SetDisplayName(value *string)() { + m.displayName = value +} +// SetErrorCode sets the errorCode property value. The errorCode property +func (m *PolicySetItem) SetErrorCode(value *ErrorCode)() { + m.errorCode = value +} +// SetGuidedDeploymentTags sets the guidedDeploymentTags property value. Tags of the guided deployment +func (m *PolicySetItem) SetGuidedDeploymentTags(value []string)() { + m.guidedDeploymentTags = value +} +// SetItemType sets the itemType property value. policySetType of the PolicySetItem. +func (m *PolicySetItem) SetItemType(value *string)() { + m.itemType = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified time of the PolicySetItem. +func (m *PolicySetItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetPayloadId sets the payloadId property value. PayloadId of the PolicySetItem. +func (m *PolicySetItem) SetPayloadId(value *string)() { + m.payloadId = value +} +// SetStatus sets the status property value. The enum to specify the status of PolicySet. +func (m *PolicySetItem) SetStatus(value *PolicySetStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_item_collection_response.go b/src/internal/connector/graph/betasdk/models/policy_set_item_collection_response.go new file mode 100644 index 000000000..b7633a23e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetItemCollectionResponse +type PolicySetItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PolicySetItemable +} +// NewPolicySetItemCollectionResponse instantiates a new PolicySetItemCollectionResponse and sets the default values. +func NewPolicySetItemCollectionResponse()(*PolicySetItemCollectionResponse) { + m := &PolicySetItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePolicySetItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicySetItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPolicySetItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicySetItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePolicySetItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PolicySetItemable, len(val)) + for i, v := range val { + res[i] = v.(PolicySetItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PolicySetItemCollectionResponse) GetValue()([]PolicySetItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *PolicySetItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PolicySetItemCollectionResponse) SetValue(value []PolicySetItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/policy_set_item_collection_responseable.go new file mode 100644 index 000000000..6a7247a81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetItemCollectionResponseable +type PolicySetItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PolicySetItemable) + SetValue(value []PolicySetItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_itemable.go b/src/internal/connector/graph/betasdk/models/policy_set_itemable.go new file mode 100644 index 000000000..36d5f43c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_itemable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetItemable +type PolicySetItemable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetErrorCode()(*ErrorCode) + GetGuidedDeploymentTags()([]string) + GetItemType()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPayloadId()(*string) + GetStatus()(*PolicySetStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetErrorCode(value *ErrorCode)() + SetGuidedDeploymentTags(value []string)() + SetItemType(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPayloadId(value *string)() + SetStatus(value *PolicySetStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/policy_set_status.go b/src/internal/connector/graph/betasdk/models/policy_set_status.go new file mode 100644 index 000000000..af47cafdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_set_status.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicySetStatus int + +const ( + // Default Value. + UNKNOWN_POLICYSETSTATUS PolicySetStatus = iota + // All PolicySet items are now validating for corresponding settings of workloads. + VALIDATING_POLICYSETSTATUS + // Post process complete for all PolicySet items but there are failures. + PARTIALSUCCESS_POLICYSETSTATUS + // All PolicySet items are deployed. Doesn’t mean that all deployment succeeded. + SUCCESS_POLICYSETSTATUS + // PolicySet processing completely failed. + ERROR_POLICYSETSTATUS + // PolicySet/PolicySetItem is not assigned to any group. + NOTASSIGNED_POLICYSETSTATUS +) + +func (i PolicySetStatus) String() string { + return []string{"unknown", "validating", "partialSuccess", "success", "error", "notAssigned"}[i] +} +func ParsePolicySetStatus(v string) (interface{}, error) { + result := UNKNOWN_POLICYSETSTATUS + switch v { + case "unknown": + result = UNKNOWN_POLICYSETSTATUS + case "validating": + result = VALIDATING_POLICYSETSTATUS + case "partialSuccess": + result = PARTIALSUCCESS_POLICYSETSTATUS + case "success": + result = SUCCESS_POLICYSETSTATUS + case "error": + result = ERROR_POLICYSETSTATUS + case "notAssigned": + result = NOTASSIGNED_POLICYSETSTATUS + default: + return 0, errors.New("Unknown PolicySetStatus value: " + v) + } + return &result, nil +} +func SerializePolicySetStatus(values []PolicySetStatus) []string { + 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/policy_setable.go b/src/internal/connector/graph/betasdk/models/policy_setable.go new file mode 100644 index 000000000..9d3339a76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/policy_setable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PolicySetable +type PolicySetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]PolicySetAssignmentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetErrorCode()(*ErrorCode) + GetGuidedDeploymentTags()([]string) + GetItems()([]PolicySetItemable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleScopeTags()([]string) + GetStatus()(*PolicySetStatus) + SetAssignments(value []PolicySetAssignmentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetErrorCode(value *ErrorCode)() + SetGuidedDeploymentTags(value []string)() + SetItems(value []PolicySetItemable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleScopeTags(value []string)() + SetStatus(value *PolicySetStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/position_detail.go b/src/internal/connector/graph/betasdk/models/position_detail.go new file mode 100644 index 000000000..ba39378aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/position_detail.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PositionDetail +type PositionDetail struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Detail about the company or employer. + company CompanyDetailable + // Description of the position in question. + description *string + // When the position ended. + endMonthYear *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The title held when in that position. + jobTitle *string + // The OdataType property + odataType *string + // The role the position entailed. + role *string + // The start month and year of the position. + startMonthYear *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // Short summary of the position. + summary *string +} +// NewPositionDetail instantiates a new positionDetail and sets the default values. +func NewPositionDetail()(*PositionDetail) { + m := &PositionDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePositionDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePositionDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPositionDetail(), 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 *PositionDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCompany gets the company property value. Detail about the company or employer. +func (m *PositionDetail) GetCompany()(CompanyDetailable) { + return m.company +} +// GetDescription gets the description property value. Description of the position in question. +func (m *PositionDetail) GetDescription()(*string) { + return m.description +} +// GetEndMonthYear gets the endMonthYear property value. When the position ended. +func (m *PositionDetail) GetEndMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endMonthYear +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PositionDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["company"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCompanyDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCompany(val.(CompanyDetailable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["endMonthYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndMonthYear(val) + } + return nil + } + res["jobTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobTitle(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["role"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRole(val) + } + return nil + } + res["startMonthYear"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartMonthYear(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + return res +} +// GetJobTitle gets the jobTitle property value. The title held when in that position. +func (m *PositionDetail) GetJobTitle()(*string) { + return m.jobTitle +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PositionDetail) GetOdataType()(*string) { + return m.odataType +} +// GetRole gets the role property value. The role the position entailed. +func (m *PositionDetail) GetRole()(*string) { + return m.role +} +// GetStartMonthYear gets the startMonthYear property value. The start month and year of the position. +func (m *PositionDetail) GetStartMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startMonthYear +} +// GetSummary gets the summary property value. Short summary of the position. +func (m *PositionDetail) GetSummary()(*string) { + return m.summary +} +// Serialize serializes information the current object +func (m *PositionDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("company", m.GetCompany()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("endMonthYear", m.GetEndMonthYear()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("jobTitle", m.GetJobTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("role", m.GetRole()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("startMonthYear", m.GetStartMonthYear()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + 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 *PositionDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCompany sets the company property value. Detail about the company or employer. +func (m *PositionDetail) SetCompany(value CompanyDetailable)() { + m.company = value +} +// SetDescription sets the description property value. Description of the position in question. +func (m *PositionDetail) SetDescription(value *string)() { + m.description = value +} +// SetEndMonthYear sets the endMonthYear property value. When the position ended. +func (m *PositionDetail) SetEndMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endMonthYear = value +} +// SetJobTitle sets the jobTitle property value. The title held when in that position. +func (m *PositionDetail) SetJobTitle(value *string)() { + m.jobTitle = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PositionDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetRole sets the role property value. The role the position entailed. +func (m *PositionDetail) SetRole(value *string)() { + m.role = value +} +// SetStartMonthYear sets the startMonthYear property value. The start month and year of the position. +func (m *PositionDetail) SetStartMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startMonthYear = value +} +// SetSummary sets the summary property value. Short summary of the position. +func (m *PositionDetail) SetSummary(value *string)() { + m.summary = value +} diff --git a/src/internal/connector/graph/betasdk/models/position_detailable.go b/src/internal/connector/graph/betasdk/models/position_detailable.go new file mode 100644 index 000000000..bf86594f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/position_detailable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PositionDetailable +type PositionDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompany()(CompanyDetailable) + GetDescription()(*string) + GetEndMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetJobTitle()(*string) + GetOdataType()(*string) + GetRole()(*string) + GetStartMonthYear()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSummary()(*string) + SetCompany(value CompanyDetailable)() + SetDescription(value *string)() + SetEndMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetJobTitle(value *string)() + SetOdataType(value *string)() + SetRole(value *string)() + SetStartMonthYear(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSummary(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/post.go b/src/internal/connector/graph/betasdk/models/post.go new file mode 100644 index 000000000..f41953a28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/post.go @@ -0,0 +1,476 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Post +type Post struct { + OutlookItem + // The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the post. Read-only. Nullable. Supports $expand. + attachments []Attachmentable + // The contents of the post. This is a default property. This property can be null. + body ItemBodyable + // Unique ID of the conversation. Read-only. + conversationId *string + // Unique ID of the conversation thread. Read-only. + conversationThreadId *string + // The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand. + extensions []Extensionable + // The from property + from Recipientable + // Indicates whether the post has at least one attachment. This is a default property. + hasAttachments *bool + // The importance of a group post: low, normal, high. + importance *Importance + // The earlier post that this post is replying to in the conversationThread. Read-only. Supports $expand. + inReplyTo Postable + // The mentions property + mentions []Mentionable + // The collection of multi-value extended properties defined for the post. Read-only. Nullable. + multiValueExtendedProperties []MultiValueLegacyExtendedPropertyable + // Conversation participants that were added to the thread as part of this post. + newParticipants []Recipientable + // Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + receivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Contains the address of the sender. The value of Sender is assumed to be the address of the authenticated user in the case when Sender is not specified. This is a default property. + sender Recipientable + // The collection of single-value extended properties defined for the post. Read-only. Nullable. + singleValueExtendedProperties []SingleValueLegacyExtendedPropertyable +} +// NewPost instantiates a new Post and sets the default values. +func NewPost()(*Post) { + m := &Post{ + OutlookItem: *NewOutlookItem(), + } + odataTypeValue := "#microsoft.graph.post"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePostFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePostFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPost(), nil +} +// GetAttachments gets the attachments property value. The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the post. Read-only. Nullable. Supports $expand. +func (m *Post) GetAttachments()([]Attachmentable) { + return m.attachments +} +// GetBody gets the body property value. The contents of the post. This is a default property. This property can be null. +func (m *Post) GetBody()(ItemBodyable) { + return m.body +} +// GetConversationId gets the conversationId property value. Unique ID of the conversation. Read-only. +func (m *Post) GetConversationId()(*string) { + return m.conversationId +} +// GetConversationThreadId gets the conversationThreadId property value. Unique ID of the conversation thread. Read-only. +func (m *Post) GetConversationThreadId()(*string) { + return m.conversationThreadId +} +// GetExtensions gets the extensions property value. The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand. +func (m *Post) GetExtensions()([]Extensionable) { + return m.extensions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Post) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OutlookItem.GetFieldDeserializers() + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Attachmentable, len(val)) + for i, v := range val { + res[i] = v.(Attachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["conversationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConversationId(val) + } + return nil + } + res["conversationThreadId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConversationThreadId(val) + } + return nil + } + res["extensions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Extensionable, len(val)) + for i, v := range val { + res[i] = v.(Extensionable) + } + m.SetExtensions(res) + } + return nil + } + res["from"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFrom(val.(Recipientable)) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["importance"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseImportance) + if err != nil { + return err + } + if val != nil { + m.SetImportance(val.(*Importance)) + } + return nil + } + res["inReplyTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInReplyTo(val.(Postable)) + } + return nil + } + res["mentions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMentionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Mentionable, len(val)) + for i, v := range val { + res[i] = v.(Mentionable) + } + m.SetMentions(res) + } + return nil + } + res["multiValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMultiValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MultiValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(MultiValueLegacyExtendedPropertyable) + } + m.SetMultiValueExtendedProperties(res) + } + return nil + } + res["newParticipants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetNewParticipants(res) + } + return nil + } + res["receivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTime(val) + } + return nil + } + res["sender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSender(val.(Recipientable)) + } + return nil + } + res["singleValueExtendedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSingleValueLegacyExtendedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SingleValueLegacyExtendedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(SingleValueLegacyExtendedPropertyable) + } + m.SetSingleValueExtendedProperties(res) + } + return nil + } + return res +} +// GetFrom gets the from property value. The from property +func (m *Post) GetFrom()(Recipientable) { + return m.from +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether the post has at least one attachment. This is a default property. +func (m *Post) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetImportance gets the importance property value. The importance of a group post: low, normal, high. +func (m *Post) GetImportance()(*Importance) { + return m.importance +} +// GetInReplyTo gets the inReplyTo property value. The earlier post that this post is replying to in the conversationThread. Read-only. Supports $expand. +func (m *Post) GetInReplyTo()(Postable) { + return m.inReplyTo +} +// GetMentions gets the mentions property value. The mentions property +func (m *Post) GetMentions()([]Mentionable) { + return m.mentions +} +// GetMultiValueExtendedProperties gets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the post. Read-only. Nullable. +func (m *Post) GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) { + return m.multiValueExtendedProperties +} +// GetNewParticipants gets the newParticipants property value. Conversation participants that were added to the thread as part of this post. +func (m *Post) GetNewParticipants()([]Recipientable) { + return m.newParticipants +} +// GetReceivedDateTime gets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Post) GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTime +} +// GetSender gets the sender property value. Contains the address of the sender. The value of Sender is assumed to be the address of the authenticated user in the case when Sender is not specified. This is a default property. +func (m *Post) GetSender()(Recipientable) { + return m.sender +} +// GetSingleValueExtendedProperties gets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the post. Read-only. Nullable. +func (m *Post) GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) { + return m.singleValueExtendedProperties +} +// Serialize serializes information the current object +func (m *Post) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OutlookItem.Serialize(writer) + if err != nil { + return err + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conversationId", m.GetConversationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conversationThreadId", m.GetConversationThreadId()) + if err != nil { + return err + } + } + if m.GetExtensions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExtensions())) + for i, v := range m.GetExtensions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("extensions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("from", m.GetFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + if m.GetImportance() != nil { + cast := (*m.GetImportance()).String() + err = writer.WriteStringValue("importance", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("inReplyTo", m.GetInReplyTo()) + if err != nil { + return err + } + } + if m.GetMentions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMentions())) + for i, v := range m.GetMentions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("mentions", cast) + if err != nil { + return err + } + } + if m.GetMultiValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMultiValueExtendedProperties())) + for i, v := range m.GetMultiValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("multiValueExtendedProperties", cast) + if err != nil { + return err + } + } + if m.GetNewParticipants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNewParticipants())) + for i, v := range m.GetNewParticipants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("newParticipants", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTime", m.GetReceivedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sender", m.GetSender()) + if err != nil { + return err + } + } + if m.GetSingleValueExtendedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSingleValueExtendedProperties())) + for i, v := range m.GetSingleValueExtendedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("singleValueExtendedProperties", cast) + if err != nil { + return err + } + } + return nil +} +// SetAttachments sets the attachments property value. The collection of fileAttachment, itemAttachment, and referenceAttachment attachments for the post. Read-only. Nullable. Supports $expand. +func (m *Post) SetAttachments(value []Attachmentable)() { + m.attachments = value +} +// SetBody sets the body property value. The contents of the post. This is a default property. This property can be null. +func (m *Post) SetBody(value ItemBodyable)() { + m.body = value +} +// SetConversationId sets the conversationId property value. Unique ID of the conversation. Read-only. +func (m *Post) SetConversationId(value *string)() { + m.conversationId = value +} +// SetConversationThreadId sets the conversationThreadId property value. Unique ID of the conversation thread. Read-only. +func (m *Post) SetConversationThreadId(value *string)() { + m.conversationThreadId = value +} +// SetExtensions sets the extensions property value. The collection of open extensions defined for the post. Read-only. Nullable. Supports $expand. +func (m *Post) SetExtensions(value []Extensionable)() { + m.extensions = value +} +// SetFrom sets the from property value. The from property +func (m *Post) SetFrom(value Recipientable)() { + m.from = value +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether the post has at least one attachment. This is a default property. +func (m *Post) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetImportance sets the importance property value. The importance of a group post: low, normal, high. +func (m *Post) SetImportance(value *Importance)() { + m.importance = value +} +// SetInReplyTo sets the inReplyTo property value. The earlier post that this post is replying to in the conversationThread. Read-only. Supports $expand. +func (m *Post) SetInReplyTo(value Postable)() { + m.inReplyTo = value +} +// SetMentions sets the mentions property value. The mentions property +func (m *Post) SetMentions(value []Mentionable)() { + m.mentions = value +} +// SetMultiValueExtendedProperties sets the multiValueExtendedProperties property value. The collection of multi-value extended properties defined for the post. Read-only. Nullable. +func (m *Post) SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() { + m.multiValueExtendedProperties = value +} +// SetNewParticipants sets the newParticipants property value. Conversation participants that were added to the thread as part of this post. +func (m *Post) SetNewParticipants(value []Recipientable)() { + m.newParticipants = value +} +// SetReceivedDateTime sets the receivedDateTime property value. Specifies when the post was received. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *Post) SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTime = value +} +// SetSender sets the sender property value. Contains the address of the sender. The value of Sender is assumed to be the address of the authenticated user in the case when Sender is not specified. This is a default property. +func (m *Post) SetSender(value Recipientable)() { + m.sender = value +} +// SetSingleValueExtendedProperties sets the singleValueExtendedProperties property value. The collection of single-value extended properties defined for the post. Read-only. Nullable. +func (m *Post) SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() { + m.singleValueExtendedProperties = value +} diff --git a/src/internal/connector/graph/betasdk/models/post_collection_response.go b/src/internal/connector/graph/betasdk/models/post_collection_response.go new file mode 100644 index 000000000..2e9be4f36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/post_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PostCollectionResponse +type PostCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Postable +} +// NewPostCollectionResponse instantiates a new PostCollectionResponse and sets the default values. +func NewPostCollectionResponse()(*PostCollectionResponse) { + m := &PostCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePostCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePostCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPostCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PostCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePostFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Postable, len(val)) + for i, v := range val { + res[i] = v.(Postable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PostCollectionResponse) GetValue()([]Postable) { + return m.value +} +// Serialize serializes information the current object +func (m *PostCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PostCollectionResponse) SetValue(value []Postable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/post_collection_responseable.go b/src/internal/connector/graph/betasdk/models/post_collection_responseable.go new file mode 100644 index 000000000..d6dd0d4f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/post_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PostCollectionResponseable +type PostCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Postable) + SetValue(value []Postable)() +} diff --git a/src/internal/connector/graph/betasdk/models/post_type.go b/src/internal/connector/graph/betasdk/models/post_type.go new file mode 100644 index 000000000..8d9de80bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/post_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PostType int + +const ( + REGULAR_POSTTYPE PostType = iota + QUICK_POSTTYPE + STRATEGIC_POSTTYPE + UNKNOWNFUTUREVALUE_POSTTYPE +) + +func (i PostType) String() string { + return []string{"regular", "quick", "strategic", "unknownFutureValue"}[i] +} +func ParsePostType(v string) (interface{}, error) { + result := REGULAR_POSTTYPE + switch v { + case "regular": + result = REGULAR_POSTTYPE + case "quick": + result = QUICK_POSTTYPE + case "strategic": + result = STRATEGIC_POSTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_POSTTYPE + default: + return 0, errors.New("Unknown PostType value: " + v) + } + return &result, nil +} +func SerializePostType(values []PostType) []string { + 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/postable.go b/src/internal/connector/graph/betasdk/models/postable.go new file mode 100644 index 000000000..a332d1b29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/postable.go @@ -0,0 +1,42 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Postable +type Postable interface { + OutlookItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttachments()([]Attachmentable) + GetBody()(ItemBodyable) + GetConversationId()(*string) + GetConversationThreadId()(*string) + GetExtensions()([]Extensionable) + GetFrom()(Recipientable) + GetHasAttachments()(*bool) + GetImportance()(*Importance) + GetInReplyTo()(Postable) + GetMentions()([]Mentionable) + GetMultiValueExtendedProperties()([]MultiValueLegacyExtendedPropertyable) + GetNewParticipants()([]Recipientable) + GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSender()(Recipientable) + GetSingleValueExtendedProperties()([]SingleValueLegacyExtendedPropertyable) + SetAttachments(value []Attachmentable)() + SetBody(value ItemBodyable)() + SetConversationId(value *string)() + SetConversationThreadId(value *string)() + SetExtensions(value []Extensionable)() + SetFrom(value Recipientable)() + SetHasAttachments(value *bool)() + SetImportance(value *Importance)() + SetInReplyTo(value Postable)() + SetMentions(value []Mentionable)() + SetMultiValueExtendedProperties(value []MultiValueLegacyExtendedPropertyable)() + SetNewParticipants(value []Recipientable)() + SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSender(value Recipientable)() + SetSingleValueExtendedProperties(value []SingleValueLegacyExtendedPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/postal_address_type.go b/src/internal/connector/graph/betasdk/models/postal_address_type.go new file mode 100644 index 000000000..8113163ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/postal_address_type.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PostalAddressType +type PostalAddressType 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 city property + city *string + // The countryLetterCode property + countryLetterCode *string + // The OdataType property + odataType *string + // The postalCode property + postalCode *string + // The state property + state *string + // The street property + street *string +} +// NewPostalAddressType instantiates a new postalAddressType and sets the default values. +func NewPostalAddressType()(*PostalAddressType) { + m := &PostalAddressType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePostalAddressTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePostalAddressTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPostalAddressType(), 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 *PostalAddressType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCity gets the city property value. The city property +func (m *PostalAddressType) GetCity()(*string) { + return m.city +} +// GetCountryLetterCode gets the countryLetterCode property value. The countryLetterCode property +func (m *PostalAddressType) GetCountryLetterCode()(*string) { + return m.countryLetterCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PostalAddressType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryLetterCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryLetterCode(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["postalCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostalCode(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["street"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreet(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PostalAddressType) GetOdataType()(*string) { + return m.odataType +} +// GetPostalCode gets the postalCode property value. The postalCode property +func (m *PostalAddressType) GetPostalCode()(*string) { + return m.postalCode +} +// GetState gets the state property value. The state property +func (m *PostalAddressType) GetState()(*string) { + return m.state +} +// GetStreet gets the street property value. The street property +func (m *PostalAddressType) GetStreet()(*string) { + return m.street +} +// Serialize serializes information the current object +func (m *PostalAddressType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("countryLetterCode", m.GetCountryLetterCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("postalCode", m.GetPostalCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("street", m.GetStreet()) + 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 *PostalAddressType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCity sets the city property value. The city property +func (m *PostalAddressType) SetCity(value *string)() { + m.city = value +} +// SetCountryLetterCode sets the countryLetterCode property value. The countryLetterCode property +func (m *PostalAddressType) SetCountryLetterCode(value *string)() { + m.countryLetterCode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PostalAddressType) SetOdataType(value *string)() { + m.odataType = value +} +// SetPostalCode sets the postalCode property value. The postalCode property +func (m *PostalAddressType) SetPostalCode(value *string)() { + m.postalCode = value +} +// SetState sets the state property value. The state property +func (m *PostalAddressType) SetState(value *string)() { + m.state = value +} +// SetStreet sets the street property value. The street property +func (m *PostalAddressType) SetStreet(value *string)() { + m.street = value +} diff --git a/src/internal/connector/graph/betasdk/models/postal_address_typeable.go b/src/internal/connector/graph/betasdk/models/postal_address_typeable.go new file mode 100644 index 000000000..872440038 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/postal_address_typeable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PostalAddressTypeable +type PostalAddressTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCity()(*string) + GetCountryLetterCode()(*string) + GetOdataType()(*string) + GetPostalCode()(*string) + GetState()(*string) + GetStreet()(*string) + SetCity(value *string)() + SetCountryLetterCode(value *string)() + SetOdataType(value *string)() + SetPostalCode(value *string)() + SetState(value *string)() + SetStreet(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/power_action_type.go b/src/internal/connector/graph/betasdk/models/power_action_type.go new file mode 100644 index 000000000..e749b5ad9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/power_action_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PowerActionType int + +const ( + // Not configured + NOTCONFIGURED_POWERACTIONTYPE PowerActionType = iota + // No action + NOACTION_POWERACTIONTYPE + // Put device in sleep state + SLEEP_POWERACTIONTYPE + // Put device in hibernate state + HIBERNATE_POWERACTIONTYPE + // Shutdown device + SHUTDOWN_POWERACTIONTYPE +) + +func (i PowerActionType) String() string { + return []string{"notConfigured", "noAction", "sleep", "hibernate", "shutdown"}[i] +} +func ParsePowerActionType(v string) (interface{}, error) { + result := NOTCONFIGURED_POWERACTIONTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_POWERACTIONTYPE + case "noAction": + result = NOACTION_POWERACTIONTYPE + case "sleep": + result = SLEEP_POWERACTIONTYPE + case "hibernate": + result = HIBERNATE_POWERACTIONTYPE + case "shutdown": + result = SHUTDOWN_POWERACTIONTYPE + default: + return 0, errors.New("Unknown PowerActionType value: " + v) + } + return &result, nil +} +func SerializePowerActionType(values []PowerActionType) []string { + 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/pre_authorized_application.go b/src/internal/connector/graph/betasdk/models/pre_authorized_application.go new file mode 100644 index 000000000..87025ad21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pre_authorized_application.go @@ -0,0 +1,127 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PreAuthorizedApplication +type PreAuthorizedApplication 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 unique identifier for the client application. + appId *string + // The OdataType property + odataType *string + // The unique identifier for the scopes the client application is granted. + permissionIds []string +} +// NewPreAuthorizedApplication instantiates a new preAuthorizedApplication and sets the default values. +func NewPreAuthorizedApplication()(*PreAuthorizedApplication) { + m := &PreAuthorizedApplication{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePreAuthorizedApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePreAuthorizedApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPreAuthorizedApplication(), 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 *PreAuthorizedApplication) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The unique identifier for the client application. +func (m *PreAuthorizedApplication) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PreAuthorizedApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(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["permissionIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPermissionIds(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PreAuthorizedApplication) GetOdataType()(*string) { + return m.odataType +} +// GetPermissionIds gets the permissionIds property value. The unique identifier for the scopes the client application is granted. +func (m *PreAuthorizedApplication) GetPermissionIds()([]string) { + return m.permissionIds +} +// Serialize serializes information the current object +func (m *PreAuthorizedApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPermissionIds() != nil { + err := writer.WriteCollectionOfStringValues("permissionIds", m.GetPermissionIds()) + 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 *PreAuthorizedApplication) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The unique identifier for the client application. +func (m *PreAuthorizedApplication) SetAppId(value *string)() { + m.appId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PreAuthorizedApplication) SetOdataType(value *string)() { + m.odataType = value +} +// SetPermissionIds sets the permissionIds property value. The unique identifier for the scopes the client application is granted. +func (m *PreAuthorizedApplication) SetPermissionIds(value []string)() { + m.permissionIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_response.go b/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_response.go new file mode 100644 index 000000000..322b11776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PreAuthorizedApplicationCollectionResponse +type PreAuthorizedApplicationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PreAuthorizedApplicationable +} +// NewPreAuthorizedApplicationCollectionResponse instantiates a new PreAuthorizedApplicationCollectionResponse and sets the default values. +func NewPreAuthorizedApplicationCollectionResponse()(*PreAuthorizedApplicationCollectionResponse) { + m := &PreAuthorizedApplicationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePreAuthorizedApplicationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePreAuthorizedApplicationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPreAuthorizedApplicationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PreAuthorizedApplicationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePreAuthorizedApplicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PreAuthorizedApplicationable, len(val)) + for i, v := range val { + res[i] = v.(PreAuthorizedApplicationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PreAuthorizedApplicationCollectionResponse) GetValue()([]PreAuthorizedApplicationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PreAuthorizedApplicationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PreAuthorizedApplicationCollectionResponse) SetValue(value []PreAuthorizedApplicationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_responseable.go b/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_responseable.go new file mode 100644 index 000000000..df105484f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pre_authorized_application_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PreAuthorizedApplicationCollectionResponseable +type PreAuthorizedApplicationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PreAuthorizedApplicationable) + SetValue(value []PreAuthorizedApplicationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/pre_authorized_applicationable.go b/src/internal/connector/graph/betasdk/models/pre_authorized_applicationable.go new file mode 100644 index 000000000..9108224d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/pre_authorized_applicationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PreAuthorizedApplicationable +type PreAuthorizedApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetOdataType()(*string) + GetPermissionIds()([]string) + SetAppId(value *string)() + SetOdataType(value *string)() + SetPermissionIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/prerelease_features.go b/src/internal/connector/graph/betasdk/models/prerelease_features.go new file mode 100644 index 000000000..e9dacc319 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/prerelease_features.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrereleaseFeatures int + +const ( + // User Defined, default value, no intent. + USERDEFINED_PRERELEASEFEATURES PrereleaseFeatures = iota + // Settings only pre-release features. + SETTINGSONLY_PRERELEASEFEATURES + // Settings and experimentations pre-release features. + SETTINGSANDEXPERIMENTATIONS_PRERELEASEFEATURES + // Pre-release features not allowed. + NOTALLOWED_PRERELEASEFEATURES +) + +func (i PrereleaseFeatures) String() string { + return []string{"userDefined", "settingsOnly", "settingsAndExperimentations", "notAllowed"}[i] +} +func ParsePrereleaseFeatures(v string) (interface{}, error) { + result := USERDEFINED_PRERELEASEFEATURES + switch v { + case "userDefined": + result = USERDEFINED_PRERELEASEFEATURES + case "settingsOnly": + result = SETTINGSONLY_PRERELEASEFEATURES + case "settingsAndExperimentations": + result = SETTINGSANDEXPERIMENTATIONS_PRERELEASEFEATURES + case "notAllowed": + result = NOTALLOWED_PRERELEASEFEATURES + default: + return 0, errors.New("Unknown PrereleaseFeatures value: " + v) + } + return &result, nil +} +func SerializePrereleaseFeatures(values []PrereleaseFeatures) []string { + 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/presence.go b/src/internal/connector/graph/betasdk/models/presence.go new file mode 100644 index 000000000..ef77b1154 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presence.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Presence +type Presence struct { + Entity + // The supplemental information to a user's availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive,InAMeeting, Offline, OffWork,OutOfOffice, PresenceUnknown,Presenting, UrgentInterruptionsOnly. + activity *string + // The base presence information for a user. Possible values are Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, PresenceUnknown + availability *string + // The out of office settings for a user. + outOfOfficeSettings OutOfOfficeSettingsable + // The presence status message of a user. + statusMessage PresenceStatusMessageable +} +// NewPresence instantiates a new presence and sets the default values. +func NewPresence()(*Presence) { + m := &Presence{ + Entity: *NewEntity(), + } + return m +} +// CreatePresenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePresenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPresence(), nil +} +// GetActivity gets the activity property value. The supplemental information to a user's availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive,InAMeeting, Offline, OffWork,OutOfOffice, PresenceUnknown,Presenting, UrgentInterruptionsOnly. +func (m *Presence) GetActivity()(*string) { + return m.activity +} +// GetAvailability gets the availability property value. The base presence information for a user. Possible values are Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, PresenceUnknown +func (m *Presence) GetAvailability()(*string) { + return m.availability +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Presence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActivity(val) + } + return nil + } + res["availability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailability(val) + } + return nil + } + res["outOfOfficeSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOutOfOfficeSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOutOfOfficeSettings(val.(OutOfOfficeSettingsable)) + } + return nil + } + res["statusMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePresenceStatusMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusMessage(val.(PresenceStatusMessageable)) + } + return nil + } + return res +} +// GetOutOfOfficeSettings gets the outOfOfficeSettings property value. The out of office settings for a user. +func (m *Presence) GetOutOfOfficeSettings()(OutOfOfficeSettingsable) { + return m.outOfOfficeSettings +} +// GetStatusMessage gets the statusMessage property value. The presence status message of a user. +func (m *Presence) GetStatusMessage()(PresenceStatusMessageable) { + return m.statusMessage +} +// Serialize serializes information the current object +func (m *Presence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("availability", m.GetAvailability()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("outOfOfficeSettings", m.GetOutOfOfficeSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("statusMessage", m.GetStatusMessage()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. The supplemental information to a user's availability. Possible values are Available, Away, BeRightBack, Busy, DoNotDisturb, InACall, InAConferenceCall, Inactive,InAMeeting, Offline, OffWork,OutOfOffice, PresenceUnknown,Presenting, UrgentInterruptionsOnly. +func (m *Presence) SetActivity(value *string)() { + m.activity = value +} +// SetAvailability sets the availability property value. The base presence information for a user. Possible values are Available, AvailableIdle, Away, BeRightBack, Busy, BusyIdle, DoNotDisturb, Offline, PresenceUnknown +func (m *Presence) SetAvailability(value *string)() { + m.availability = value +} +// SetOutOfOfficeSettings sets the outOfOfficeSettings property value. The out of office settings for a user. +func (m *Presence) SetOutOfOfficeSettings(value OutOfOfficeSettingsable)() { + m.outOfOfficeSettings = value +} +// SetStatusMessage sets the statusMessage property value. The presence status message of a user. +func (m *Presence) SetStatusMessage(value PresenceStatusMessageable)() { + m.statusMessage = value +} diff --git a/src/internal/connector/graph/betasdk/models/presence_collection_response.go b/src/internal/connector/graph/betasdk/models/presence_collection_response.go new file mode 100644 index 000000000..5dc15cbbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presence_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PresenceCollectionResponse +type PresenceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Presenceable +} +// NewPresenceCollectionResponse instantiates a new PresenceCollectionResponse and sets the default values. +func NewPresenceCollectionResponse()(*PresenceCollectionResponse) { + m := &PresenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePresenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePresenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPresenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PresenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePresenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Presenceable, len(val)) + for i, v := range val { + res[i] = v.(Presenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PresenceCollectionResponse) GetValue()([]Presenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PresenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PresenceCollectionResponse) SetValue(value []Presenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/presence_collection_responseable.go b/src/internal/connector/graph/betasdk/models/presence_collection_responseable.go new file mode 100644 index 000000000..fa58932d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presence_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PresenceCollectionResponseable +type PresenceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Presenceable) + SetValue(value []Presenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/presence_status_message.go b/src/internal/connector/graph/betasdk/models/presence_status_message.go new file mode 100644 index 000000000..b889957f1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presence_status_message.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PresenceStatusMessage +type PresenceStatusMessage struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Time in which the status message expires.If not provided, the status message does not expire.expiryDateTime.dateTime should not include time zone.expiryDateTime is not available when requesting presence of another user. + expiryDateTime DateTimeTimeZoneable + // Status message item. The only supported format currently is message.contentType = 'text'. + message ItemBodyable + // The OdataType property + odataType *string + // Time in which the status message was published.Read-only.publishedDateTime is not available when requesting presence of another user. + publishedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPresenceStatusMessage instantiates a new presenceStatusMessage and sets the default values. +func NewPresenceStatusMessage()(*PresenceStatusMessage) { + m := &PresenceStatusMessage{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePresenceStatusMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePresenceStatusMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPresenceStatusMessage(), 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 *PresenceStatusMessage) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExpiryDateTime gets the expiryDateTime property value. Time in which the status message expires.If not provided, the status message does not expire.expiryDateTime.dateTime should not include time zone.expiryDateTime is not available when requesting presence of another user. +func (m *PresenceStatusMessage) GetExpiryDateTime()(DateTimeTimeZoneable) { + return m.expiryDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PresenceStatusMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expiryDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExpiryDateTime(val.(DateTimeTimeZoneable)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMessage(val.(ItemBodyable)) + } + 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["publishedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPublishedDateTime(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. Status message item. The only supported format currently is message.contentType = 'text'. +func (m *PresenceStatusMessage) GetMessage()(ItemBodyable) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PresenceStatusMessage) GetOdataType()(*string) { + return m.odataType +} +// GetPublishedDateTime gets the publishedDateTime property value. Time in which the status message was published.Read-only.publishedDateTime is not available when requesting presence of another user. +func (m *PresenceStatusMessage) GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.publishedDateTime +} +// Serialize serializes information the current object +func (m *PresenceStatusMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("expiryDateTime", m.GetExpiryDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("publishedDateTime", m.GetPublishedDateTime()) + 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 *PresenceStatusMessage) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExpiryDateTime sets the expiryDateTime property value. Time in which the status message expires.If not provided, the status message does not expire.expiryDateTime.dateTime should not include time zone.expiryDateTime is not available when requesting presence of another user. +func (m *PresenceStatusMessage) SetExpiryDateTime(value DateTimeTimeZoneable)() { + m.expiryDateTime = value +} +// SetMessage sets the message property value. Status message item. The only supported format currently is message.contentType = 'text'. +func (m *PresenceStatusMessage) SetMessage(value ItemBodyable)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PresenceStatusMessage) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublishedDateTime sets the publishedDateTime property value. Time in which the status message was published.Read-only.publishedDateTime is not available when requesting presence of another user. +func (m *PresenceStatusMessage) SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.publishedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/presence_status_messageable.go b/src/internal/connector/graph/betasdk/models/presence_status_messageable.go new file mode 100644 index 000000000..6632052fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presence_status_messageable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PresenceStatusMessageable +type PresenceStatusMessageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiryDateTime()(DateTimeTimeZoneable) + GetMessage()(ItemBodyable) + GetOdataType()(*string) + GetPublishedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetExpiryDateTime(value DateTimeTimeZoneable)() + SetMessage(value ItemBodyable)() + SetOdataType(value *string)() + SetPublishedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/presenceable.go b/src/internal/connector/graph/betasdk/models/presenceable.go new file mode 100644 index 000000000..2f3d3886f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presenceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Presenceable +type Presenceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*string) + GetAvailability()(*string) + GetOutOfOfficeSettings()(OutOfOfficeSettingsable) + GetStatusMessage()(PresenceStatusMessageable) + SetActivity(value *string)() + SetAvailability(value *string)() + SetOutOfOfficeSettings(value OutOfOfficeSettingsable)() + SetStatusMessage(value PresenceStatusMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/presentation.go b/src/internal/connector/graph/betasdk/models/presentation.go new file mode 100644 index 000000000..673bf45da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presentation.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Presentation +type Presentation struct { + Entity + // The comments property + comments []DocumentCommentable +} +// NewPresentation instantiates a new Presentation and sets the default values. +func NewPresentation()(*Presentation) { + m := &Presentation{ + Entity: *NewEntity(), + } + return m +} +// CreatePresentationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePresentationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPresentation(), nil +} +// GetComments gets the comments property value. The comments property +func (m *Presentation) GetComments()([]DocumentCommentable) { + return m.comments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Presentation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDocumentCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DocumentCommentable, len(val)) + for i, v := range val { + res[i] = v.(DocumentCommentable) + } + m.SetComments(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Presentation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + return nil +} +// SetComments sets the comments property value. The comments property +func (m *Presentation) SetComments(value []DocumentCommentable)() { + m.comments = value +} diff --git a/src/internal/connector/graph/betasdk/models/presentationable.go b/src/internal/connector/graph/betasdk/models/presentationable.go new file mode 100644 index 000000000..1e83c362e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/presentationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Presentationable +type Presentationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComments()([]DocumentCommentable) + SetComments(value []DocumentCommentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scope.go b/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scope.go new file mode 100644 index 000000000..f42bdccee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scope.go @@ -0,0 +1,104 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrincipalResourceMembershipsScope +type PrincipalResourceMembershipsScope struct { + AccessReviewScope + // Defines the scopes of the principals whose access to resources are reviewed in the access review. + principalScopes []AccessReviewScopeable + // Defines the scopes of the resources for which access is reviewed. + resourceScopes []AccessReviewScopeable +} +// NewPrincipalResourceMembershipsScope instantiates a new PrincipalResourceMembershipsScope and sets the default values. +func NewPrincipalResourceMembershipsScope()(*PrincipalResourceMembershipsScope) { + m := &PrincipalResourceMembershipsScope{ + AccessReviewScope: *NewAccessReviewScope(), + } + odataTypeValue := "#microsoft.graph.principalResourceMembershipsScope"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrincipalResourceMembershipsScopeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrincipalResourceMembershipsScopeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrincipalResourceMembershipsScope(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrincipalResourceMembershipsScope) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewScope.GetFieldDeserializers() + res["principalScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScopeable) + } + m.SetPrincipalScopes(res) + } + return nil + } + res["resourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAccessReviewScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AccessReviewScopeable, len(val)) + for i, v := range val { + res[i] = v.(AccessReviewScopeable) + } + m.SetResourceScopes(res) + } + return nil + } + return res +} +// GetPrincipalScopes gets the principalScopes property value. Defines the scopes of the principals whose access to resources are reviewed in the access review. +func (m *PrincipalResourceMembershipsScope) GetPrincipalScopes()([]AccessReviewScopeable) { + return m.principalScopes +} +// GetResourceScopes gets the resourceScopes property value. Defines the scopes of the resources for which access is reviewed. +func (m *PrincipalResourceMembershipsScope) GetResourceScopes()([]AccessReviewScopeable) { + return m.resourceScopes +} +// Serialize serializes information the current object +func (m *PrincipalResourceMembershipsScope) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewScope.Serialize(writer) + if err != nil { + return err + } + if m.GetPrincipalScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPrincipalScopes())) + for i, v := range m.GetPrincipalScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("principalScopes", cast) + if err != nil { + return err + } + } + if m.GetResourceScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceScopes())) + for i, v := range m.GetResourceScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceScopes", cast) + if err != nil { + return err + } + } + return nil +} +// SetPrincipalScopes sets the principalScopes property value. Defines the scopes of the principals whose access to resources are reviewed in the access review. +func (m *PrincipalResourceMembershipsScope) SetPrincipalScopes(value []AccessReviewScopeable)() { + m.principalScopes = value +} +// SetResourceScopes sets the resourceScopes property value. Defines the scopes of the resources for which access is reviewed. +func (m *PrincipalResourceMembershipsScope) SetResourceScopes(value []AccessReviewScopeable)() { + m.resourceScopes = value +} diff --git a/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scopeable.go b/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scopeable.go new file mode 100644 index 000000000..62837fd73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/principal_resource_memberships_scopeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrincipalResourceMembershipsScopeable +type PrincipalResourceMembershipsScopeable interface { + AccessReviewScopeable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPrincipalScopes()([]AccessReviewScopeable) + GetResourceScopes()([]AccessReviewScopeable) + SetPrincipalScopes(value []AccessReviewScopeable)() + SetResourceScopes(value []AccessReviewScopeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_color_configuration.go b/src/internal/connector/graph/betasdk/models/print_color_configuration.go new file mode 100644 index 000000000..b04711921 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_color_configuration.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintColorConfiguration int + +const ( + BLACKANDWHITE_PRINTCOLORCONFIGURATION PrintColorConfiguration = iota + GRAYSCALE_PRINTCOLORCONFIGURATION + COLOR_PRINTCOLORCONFIGURATION + AUTO_PRINTCOLORCONFIGURATION +) + +func (i PrintColorConfiguration) String() string { + return []string{"blackAndWhite", "grayscale", "color", "auto"}[i] +} +func ParsePrintColorConfiguration(v string) (interface{}, error) { + result := BLACKANDWHITE_PRINTCOLORCONFIGURATION + switch v { + case "blackAndWhite": + result = BLACKANDWHITE_PRINTCOLORCONFIGURATION + case "grayscale": + result = GRAYSCALE_PRINTCOLORCONFIGURATION + case "color": + result = COLOR_PRINTCOLORCONFIGURATION + case "auto": + result = AUTO_PRINTCOLORCONFIGURATION + default: + return 0, errors.New("Unknown PrintColorConfiguration value: " + v) + } + return &result, nil +} +func SerializePrintColorConfiguration(values []PrintColorConfiguration) []string { + 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/print_color_mode.go b/src/internal/connector/graph/betasdk/models/print_color_mode.go new file mode 100644 index 000000000..b2b774cec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_color_mode.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintColorMode int + +const ( + BLACKANDWHITE_PRINTCOLORMODE PrintColorMode = iota + GRAYSCALE_PRINTCOLORMODE + COLOR_PRINTCOLORMODE + AUTO_PRINTCOLORMODE +) + +func (i PrintColorMode) String() string { + return []string{"blackAndWhite", "grayscale", "color", "auto"}[i] +} +func ParsePrintColorMode(v string) (interface{}, error) { + result := BLACKANDWHITE_PRINTCOLORMODE + switch v { + case "blackAndWhite": + result = BLACKANDWHITE_PRINTCOLORMODE + case "grayscale": + result = GRAYSCALE_PRINTCOLORMODE + case "color": + result = COLOR_PRINTCOLORMODE + case "auto": + result = AUTO_PRINTCOLORMODE + default: + return 0, errors.New("Unknown PrintColorMode value: " + v) + } + return &result, nil +} +func SerializePrintColorMode(values []PrintColorMode) []string { + 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/print_connector.go b/src/internal/connector/graph/betasdk/models/print_connector.go new file mode 100644 index 000000000..bd7cb27ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_connector.go @@ -0,0 +1,243 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintConnector provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintConnector struct { + Entity + // The connector's version. + appVersion *string + // The connector's device health. + deviceHealth DeviceHealthable + // The name of the connector. + displayName *string + // The connector machine's hostname. + fullyQualifiedDomainName *string + // The physical and/or organizational location of the connector. + location PrinterLocationable + // The name property + name *string + // The connector machine's operating system version. + operatingSystem *string + // The DateTimeOffset when the connector was registered. + registeredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPrintConnector instantiates a new printConnector and sets the default values. +func NewPrintConnector()(*PrintConnector) { + m := &PrintConnector{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintConnectorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintConnectorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintConnector(), nil +} +// GetAppVersion gets the appVersion property value. The connector's version. +func (m *PrintConnector) GetAppVersion()(*string) { + return m.appVersion +} +// GetDeviceHealth gets the deviceHealth property value. The connector's device health. +func (m *PrintConnector) GetDeviceHealth()(DeviceHealthable) { + return m.deviceHealth +} +// GetDisplayName gets the displayName property value. The name of the connector. +func (m *PrintConnector) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintConnector) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["appVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppVersion(val) + } + return nil + } + res["deviceHealth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceHealthFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceHealth(val.(DeviceHealthable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["fullyQualifiedDomainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFullyQualifiedDomainName(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(PrinterLocationable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["operatingSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOperatingSystem(val) + } + return nil + } + res["registeredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRegisteredDateTime(val) + } + return nil + } + return res +} +// GetFullyQualifiedDomainName gets the fullyQualifiedDomainName property value. The connector machine's hostname. +func (m *PrintConnector) GetFullyQualifiedDomainName()(*string) { + return m.fullyQualifiedDomainName +} +// GetLocation gets the location property value. The physical and/or organizational location of the connector. +func (m *PrintConnector) GetLocation()(PrinterLocationable) { + return m.location +} +// GetName gets the name property value. The name property +func (m *PrintConnector) GetName()(*string) { + return m.name +} +// GetOperatingSystem gets the operatingSystem property value. The connector machine's operating system version. +func (m *PrintConnector) GetOperatingSystem()(*string) { + return m.operatingSystem +} +// GetRegisteredDateTime gets the registeredDateTime property value. The DateTimeOffset when the connector was registered. +func (m *PrintConnector) GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.registeredDateTime +} +// Serialize serializes information the current object +func (m *PrintConnector) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appVersion", m.GetAppVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceHealth", m.GetDeviceHealth()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fullyQualifiedDomainName", m.GetFullyQualifiedDomainName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("operatingSystem", m.GetOperatingSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("registeredDateTime", m.GetRegisteredDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetAppVersion sets the appVersion property value. The connector's version. +func (m *PrintConnector) SetAppVersion(value *string)() { + m.appVersion = value +} +// SetDeviceHealth sets the deviceHealth property value. The connector's device health. +func (m *PrintConnector) SetDeviceHealth(value DeviceHealthable)() { + m.deviceHealth = value +} +// SetDisplayName sets the displayName property value. The name of the connector. +func (m *PrintConnector) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFullyQualifiedDomainName sets the fullyQualifiedDomainName property value. The connector machine's hostname. +func (m *PrintConnector) SetFullyQualifiedDomainName(value *string)() { + m.fullyQualifiedDomainName = value +} +// SetLocation sets the location property value. The physical and/or organizational location of the connector. +func (m *PrintConnector) SetLocation(value PrinterLocationable)() { + m.location = value +} +// SetName sets the name property value. The name property +func (m *PrintConnector) SetName(value *string)() { + m.name = value +} +// SetOperatingSystem sets the operatingSystem property value. The connector machine's operating system version. +func (m *PrintConnector) SetOperatingSystem(value *string)() { + m.operatingSystem = value +} +// SetRegisteredDateTime sets the registeredDateTime property value. The DateTimeOffset when the connector was registered. +func (m *PrintConnector) SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.registeredDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_connector_collection_response.go b/src/internal/connector/graph/betasdk/models/print_connector_collection_response.go new file mode 100644 index 000000000..48f536dd9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_connector_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintConnectorCollectionResponse +type PrintConnectorCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintConnectorable +} +// NewPrintConnectorCollectionResponse instantiates a new PrintConnectorCollectionResponse and sets the default values. +func NewPrintConnectorCollectionResponse()(*PrintConnectorCollectionResponse) { + m := &PrintConnectorCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintConnectorCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintConnectorCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintConnectorCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintConnectorCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintConnectorable, len(val)) + for i, v := range val { + res[i] = v.(PrintConnectorable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintConnectorCollectionResponse) GetValue()([]PrintConnectorable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintConnectorCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintConnectorCollectionResponse) SetValue(value []PrintConnectorable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_connector_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_connector_collection_responseable.go new file mode 100644 index 000000000..ea16218fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_connector_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintConnectorCollectionResponseable +type PrintConnectorCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintConnectorable) + SetValue(value []PrintConnectorable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_connectorable.go b/src/internal/connector/graph/betasdk/models/print_connectorable.go new file mode 100644 index 000000000..cb0042a1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_connectorable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintConnectorable +type PrintConnectorable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppVersion()(*string) + GetDeviceHealth()(DeviceHealthable) + GetDisplayName()(*string) + GetFullyQualifiedDomainName()(*string) + GetLocation()(PrinterLocationable) + GetName()(*string) + GetOperatingSystem()(*string) + GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAppVersion(value *string)() + SetDeviceHealth(value DeviceHealthable)() + SetDisplayName(value *string)() + SetFullyQualifiedDomainName(value *string)() + SetLocation(value PrinterLocationable)() + SetName(value *string)() + SetOperatingSystem(value *string)() + SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_document.go b/src/internal/connector/graph/betasdk/models/print_document.go new file mode 100644 index 000000000..22126a776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_document.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintDocument provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintDocument struct { + Entity + // The configuration property + configuration PrinterDocumentConfigurationable + // The document's content (MIME) type. Read-only. + contentType *string + // The document's name. Read-only. + displayName *string + // The downloadedDateTime property + downloadedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The document's size in bytes. Read-only. + size *int64 + // The uploadedDateTime property + uploadedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPrintDocument instantiates a new printDocument and sets the default values. +func NewPrintDocument()(*PrintDocument) { + m := &PrintDocument{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintDocumentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintDocumentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintDocument(), nil +} +// GetConfiguration gets the configuration property value. The configuration property +func (m *PrintDocument) GetConfiguration()(PrinterDocumentConfigurationable) { + return m.configuration +} +// GetContentType gets the contentType property value. The document's content (MIME) type. Read-only. +func (m *PrintDocument) GetContentType()(*string) { + return m.contentType +} +// GetDisplayName gets the displayName property value. The document's name. Read-only. +func (m *PrintDocument) GetDisplayName()(*string) { + return m.displayName +} +// GetDownloadedDateTime gets the downloadedDateTime property value. The downloadedDateTime property +func (m *PrintDocument) GetDownloadedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.downloadedDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintDocument) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterDocumentConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(PrinterDocumentConfigurationable)) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["downloadedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDownloadedDateTime(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["uploadedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUploadedDateTime(val) + } + return nil + } + return res +} +// GetSize gets the size property value. The document's size in bytes. Read-only. +func (m *PrintDocument) GetSize()(*int64) { + return m.size +} +// GetUploadedDateTime gets the uploadedDateTime property value. The uploadedDateTime property +func (m *PrintDocument) GetUploadedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.uploadedDateTime +} +// Serialize serializes information the current object +func (m *PrintDocument) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("downloadedDateTime", m.GetDownloadedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("uploadedDateTime", m.GetUploadedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetConfiguration sets the configuration property value. The configuration property +func (m *PrintDocument) SetConfiguration(value PrinterDocumentConfigurationable)() { + m.configuration = value +} +// SetContentType sets the contentType property value. The document's content (MIME) type. Read-only. +func (m *PrintDocument) SetContentType(value *string)() { + m.contentType = value +} +// SetDisplayName sets the displayName property value. The document's name. Read-only. +func (m *PrintDocument) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDownloadedDateTime sets the downloadedDateTime property value. The downloadedDateTime property +func (m *PrintDocument) SetDownloadedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.downloadedDateTime = value +} +// SetSize sets the size property value. The document's size in bytes. Read-only. +func (m *PrintDocument) SetSize(value *int64)() { + m.size = value +} +// SetUploadedDateTime sets the uploadedDateTime property value. The uploadedDateTime property +func (m *PrintDocument) SetUploadedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.uploadedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_document_collection_response.go b/src/internal/connector/graph/betasdk/models/print_document_collection_response.go new file mode 100644 index 000000000..160befccf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_document_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintDocumentCollectionResponse +type PrintDocumentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintDocumentable +} +// NewPrintDocumentCollectionResponse instantiates a new PrintDocumentCollectionResponse and sets the default values. +func NewPrintDocumentCollectionResponse()(*PrintDocumentCollectionResponse) { + m := &PrintDocumentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintDocumentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintDocumentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintDocumentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintDocumentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintDocumentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintDocumentable, len(val)) + for i, v := range val { + res[i] = v.(PrintDocumentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintDocumentCollectionResponse) GetValue()([]PrintDocumentable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintDocumentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintDocumentCollectionResponse) SetValue(value []PrintDocumentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_document_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_document_collection_responseable.go new file mode 100644 index 000000000..d8b0d969a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_document_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintDocumentCollectionResponseable +type PrintDocumentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintDocumentable) + SetValue(value []PrintDocumentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_documentable.go b/src/internal/connector/graph/betasdk/models/print_documentable.go new file mode 100644 index 000000000..52b670c87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_documentable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintDocumentable +type PrintDocumentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfiguration()(PrinterDocumentConfigurationable) + GetContentType()(*string) + GetDisplayName()(*string) + GetDownloadedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSize()(*int64) + GetUploadedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetConfiguration(value PrinterDocumentConfigurationable)() + SetContentType(value *string)() + SetDisplayName(value *string)() + SetDownloadedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSize(value *int64)() + SetUploadedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_duplex_configuration.go b/src/internal/connector/graph/betasdk/models/print_duplex_configuration.go new file mode 100644 index 000000000..a66d4f509 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_duplex_configuration.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintDuplexConfiguration int + +const ( + TWOSIDEDLONGEDGE_PRINTDUPLEXCONFIGURATION PrintDuplexConfiguration = iota + TWOSIDEDSHORTEDGE_PRINTDUPLEXCONFIGURATION + ONESIDED_PRINTDUPLEXCONFIGURATION +) + +func (i PrintDuplexConfiguration) String() string { + return []string{"twoSidedLongEdge", "twoSidedShortEdge", "oneSided"}[i] +} +func ParsePrintDuplexConfiguration(v string) (interface{}, error) { + result := TWOSIDEDLONGEDGE_PRINTDUPLEXCONFIGURATION + switch v { + case "twoSidedLongEdge": + result = TWOSIDEDLONGEDGE_PRINTDUPLEXCONFIGURATION + case "twoSidedShortEdge": + result = TWOSIDEDSHORTEDGE_PRINTDUPLEXCONFIGURATION + case "oneSided": + result = ONESIDED_PRINTDUPLEXCONFIGURATION + default: + return 0, errors.New("Unknown PrintDuplexConfiguration value: " + v) + } + return &result, nil +} +func SerializePrintDuplexConfiguration(values []PrintDuplexConfiguration) []string { + 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/print_duplex_mode.go b/src/internal/connector/graph/betasdk/models/print_duplex_mode.go new file mode 100644 index 000000000..787675a28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_duplex_mode.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintDuplexMode int + +const ( + FLIPONLONGEDGE_PRINTDUPLEXMODE PrintDuplexMode = iota + FLIPONSHORTEDGE_PRINTDUPLEXMODE + ONESIDED_PRINTDUPLEXMODE +) + +func (i PrintDuplexMode) String() string { + return []string{"flipOnLongEdge", "flipOnShortEdge", "oneSided"}[i] +} +func ParsePrintDuplexMode(v string) (interface{}, error) { + result := FLIPONLONGEDGE_PRINTDUPLEXMODE + switch v { + case "flipOnLongEdge": + result = FLIPONLONGEDGE_PRINTDUPLEXMODE + case "flipOnShortEdge": + result = FLIPONSHORTEDGE_PRINTDUPLEXMODE + case "oneSided": + result = ONESIDED_PRINTDUPLEXMODE + default: + return 0, errors.New("Unknown PrintDuplexMode value: " + v) + } + return &result, nil +} +func SerializePrintDuplexMode(values []PrintDuplexMode) []string { + 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/print_event.go b/src/internal/connector/graph/betasdk/models/print_event.go new file mode 100644 index 000000000..2b9b8b25e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_event.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintEvent int + +const ( + JOBSTARTED_PRINTEVENT PrintEvent = iota + UNKNOWNFUTUREVALUE_PRINTEVENT +) + +func (i PrintEvent) String() string { + return []string{"jobStarted", "unknownFutureValue"}[i] +} +func ParsePrintEvent(v string) (interface{}, error) { + result := JOBSTARTED_PRINTEVENT + switch v { + case "jobStarted": + result = JOBSTARTED_PRINTEVENT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTEVENT + default: + return 0, errors.New("Unknown PrintEvent value: " + v) + } + return &result, nil +} +func SerializePrintEvent(values []PrintEvent) []string { + 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/print_finishing.go b/src/internal/connector/graph/betasdk/models/print_finishing.go new file mode 100644 index 000000000..92c6a9fb6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_finishing.go @@ -0,0 +1,88 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintFinishing int + +const ( + NONE_PRINTFINISHING PrintFinishing = iota + STAPLE_PRINTFINISHING + PUNCH_PRINTFINISHING + COVER_PRINTFINISHING + BIND_PRINTFINISHING + SADDLESTITCH_PRINTFINISHING + STITCHEDGE_PRINTFINISHING + STAPLETOPLEFT_PRINTFINISHING + STAPLEBOTTOMLEFT_PRINTFINISHING + STAPLETOPRIGHT_PRINTFINISHING + STAPLEBOTTOMRIGHT_PRINTFINISHING + STITCHLEFTEDGE_PRINTFINISHING + STITCHTOPEDGE_PRINTFINISHING + STITCHRIGHTEDGE_PRINTFINISHING + STITCHBOTTOMEDGE_PRINTFINISHING + STAPLEDUALLEFT_PRINTFINISHING + STAPLEDUALTOP_PRINTFINISHING + STAPLEDUALRIGHT_PRINTFINISHING + STAPLEDUALBOTTOM_PRINTFINISHING + UNKNOWNFUTUREVALUE_PRINTFINISHING +) + +func (i PrintFinishing) String() string { + return []string{"none", "staple", "punch", "cover", "bind", "saddleStitch", "stitchEdge", "stapleTopLeft", "stapleBottomLeft", "stapleTopRight", "stapleBottomRight", "stitchLeftEdge", "stitchTopEdge", "stitchRightEdge", "stitchBottomEdge", "stapleDualLeft", "stapleDualTop", "stapleDualRight", "stapleDualBottom", "unknownFutureValue"}[i] +} +func ParsePrintFinishing(v string) (interface{}, error) { + result := NONE_PRINTFINISHING + switch v { + case "none": + result = NONE_PRINTFINISHING + case "staple": + result = STAPLE_PRINTFINISHING + case "punch": + result = PUNCH_PRINTFINISHING + case "cover": + result = COVER_PRINTFINISHING + case "bind": + result = BIND_PRINTFINISHING + case "saddleStitch": + result = SADDLESTITCH_PRINTFINISHING + case "stitchEdge": + result = STITCHEDGE_PRINTFINISHING + case "stapleTopLeft": + result = STAPLETOPLEFT_PRINTFINISHING + case "stapleBottomLeft": + result = STAPLEBOTTOMLEFT_PRINTFINISHING + case "stapleTopRight": + result = STAPLETOPRIGHT_PRINTFINISHING + case "stapleBottomRight": + result = STAPLEBOTTOMRIGHT_PRINTFINISHING + case "stitchLeftEdge": + result = STITCHLEFTEDGE_PRINTFINISHING + case "stitchTopEdge": + result = STITCHTOPEDGE_PRINTFINISHING + case "stitchRightEdge": + result = STITCHRIGHTEDGE_PRINTFINISHING + case "stitchBottomEdge": + result = STITCHBOTTOMEDGE_PRINTFINISHING + case "stapleDualLeft": + result = STAPLEDUALLEFT_PRINTFINISHING + case "stapleDualTop": + result = STAPLEDUALTOP_PRINTFINISHING + case "stapleDualRight": + result = STAPLEDUALRIGHT_PRINTFINISHING + case "stapleDualBottom": + result = STAPLEDUALBOTTOM_PRINTFINISHING + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTFINISHING + default: + return 0, errors.New("Unknown PrintFinishing value: " + v) + } + return &result, nil +} +func SerializePrintFinishing(values []PrintFinishing) []string { + 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/print_job.go b/src/internal/connector/graph/betasdk/models/print_job.go new file mode 100644 index 000000000..ceff60831 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job.go @@ -0,0 +1,389 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJob provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintJob struct { + Entity + // The acknowledgedDateTime property + acknowledgedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The completedDateTime property + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A group of settings that a printer should use to print a job. + configuration PrintJobConfigurationable + // The createdBy property + createdBy UserIdentityable + // The DateTimeOffset when the job was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The displayName property + displayName *string + // The documents property + documents []PrintDocumentable + // The errorCode property + errorCode *int32 + // If true, document can be fetched by printer. + isFetchable *bool + // Contains the source job URL, if the job has been redirected from another printer. + redirectedFrom *string + // Contains the destination job URL, if the job has been redirected to another printer. + redirectedTo *string + // The status of the print job. Read-only. + status PrintJobStatusable + // A list of printTasks that were triggered by this print job. + tasks []PrintTaskable +} +// NewPrintJob instantiates a new printJob and sets the default values. +func NewPrintJob()(*PrintJob) { + m := &PrintJob{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintJobFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintJobFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintJob(), nil +} +// GetAcknowledgedDateTime gets the acknowledgedDateTime property value. The acknowledgedDateTime property +func (m *PrintJob) GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.acknowledgedDateTime +} +// GetCompletedDateTime gets the completedDateTime property value. The completedDateTime property +func (m *PrintJob) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetConfiguration gets the configuration property value. A group of settings that a printer should use to print a job. +func (m *PrintJob) GetConfiguration()(PrintJobConfigurationable) { + return m.configuration +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *PrintJob) GetCreatedBy()(UserIdentityable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The DateTimeOffset when the job was created. Read-only. +func (m *PrintJob) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PrintJob) GetDisplayName()(*string) { + return m.displayName +} +// GetDocuments gets the documents property value. The documents property +func (m *PrintJob) GetDocuments()([]PrintDocumentable) { + return m.documents +} +// GetErrorCode gets the errorCode property value. The errorCode property +func (m *PrintJob) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintJob) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acknowledgedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAcknowledgedDateTime(val) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["configuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintJobConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetConfiguration(val.(PrintJobConfigurationable)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(UserIdentityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["documents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintDocumentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintDocumentable, len(val)) + for i, v := range val { + res[i] = v.(PrintDocumentable) + } + m.SetDocuments(res) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["isFetchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFetchable(val) + } + return nil + } + res["redirectedFrom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedirectedFrom(val) + } + return nil + } + res["redirectedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedirectedTo(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintJobStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(PrintJobStatusable)) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetIsFetchable gets the isFetchable property value. If true, document can be fetched by printer. +func (m *PrintJob) GetIsFetchable()(*bool) { + return m.isFetchable +} +// GetRedirectedFrom gets the redirectedFrom property value. Contains the source job URL, if the job has been redirected from another printer. +func (m *PrintJob) GetRedirectedFrom()(*string) { + return m.redirectedFrom +} +// GetRedirectedTo gets the redirectedTo property value. Contains the destination job URL, if the job has been redirected to another printer. +func (m *PrintJob) GetRedirectedTo()(*string) { + return m.redirectedTo +} +// GetStatus gets the status property value. The status of the print job. Read-only. +func (m *PrintJob) GetStatus()(PrintJobStatusable) { + return m.status +} +// GetTasks gets the tasks property value. A list of printTasks that were triggered by this print job. +func (m *PrintJob) GetTasks()([]PrintTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *PrintJob) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("acknowledgedDateTime", m.GetAcknowledgedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("configuration", m.GetConfiguration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetDocuments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDocuments())) + for i, v := range m.GetDocuments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("documents", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isFetchable", m.GetIsFetchable()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("redirectedFrom", m.GetRedirectedFrom()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("redirectedTo", m.GetRedirectedTo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetAcknowledgedDateTime sets the acknowledgedDateTime property value. The acknowledgedDateTime property +func (m *PrintJob) SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.acknowledgedDateTime = value +} +// SetCompletedDateTime sets the completedDateTime property value. The completedDateTime property +func (m *PrintJob) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetConfiguration sets the configuration property value. A group of settings that a printer should use to print a job. +func (m *PrintJob) SetConfiguration(value PrintJobConfigurationable)() { + m.configuration = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *PrintJob) SetCreatedBy(value UserIdentityable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The DateTimeOffset when the job was created. Read-only. +func (m *PrintJob) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PrintJob) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDocuments sets the documents property value. The documents property +func (m *PrintJob) SetDocuments(value []PrintDocumentable)() { + m.documents = value +} +// SetErrorCode sets the errorCode property value. The errorCode property +func (m *PrintJob) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetIsFetchable sets the isFetchable property value. If true, document can be fetched by printer. +func (m *PrintJob) SetIsFetchable(value *bool)() { + m.isFetchable = value +} +// SetRedirectedFrom sets the redirectedFrom property value. Contains the source job URL, if the job has been redirected from another printer. +func (m *PrintJob) SetRedirectedFrom(value *string)() { + m.redirectedFrom = value +} +// SetRedirectedTo sets the redirectedTo property value. Contains the destination job URL, if the job has been redirected to another printer. +func (m *PrintJob) SetRedirectedTo(value *string)() { + m.redirectedTo = value +} +// SetStatus sets the status property value. The status of the print job. Read-only. +func (m *PrintJob) SetStatus(value PrintJobStatusable)() { + m.status = value +} +// SetTasks sets the tasks property value. A list of printTasks that were triggered by this print job. +func (m *PrintJob) SetTasks(value []PrintTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_collection_response.go b/src/internal/connector/graph/betasdk/models/print_job_collection_response.go new file mode 100644 index 000000000..7dd165b07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobCollectionResponse +type PrintJobCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintJobable +} +// NewPrintJobCollectionResponse instantiates a new PrintJobCollectionResponse and sets the default values. +func NewPrintJobCollectionResponse()(*PrintJobCollectionResponse) { + m := &PrintJobCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintJobCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintJobCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintJobCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintJobCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintJobable, len(val)) + for i, v := range val { + res[i] = v.(PrintJobable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintJobCollectionResponse) GetValue()([]PrintJobable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintJobCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintJobCollectionResponse) SetValue(value []PrintJobable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_job_collection_responseable.go new file mode 100644 index 000000000..705f4e0c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobCollectionResponseable +type PrintJobCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintJobable) + SetValue(value []PrintJobable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_configuration.go b/src/internal/connector/graph/betasdk/models/print_job_configuration.go new file mode 100644 index 000000000..c3f214276 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_configuration.go @@ -0,0 +1,584 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobConfiguration +type PrintJobConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Whether the printer should collate pages wehen printing multiple copies of a multi-page document. + collate *bool + // The color mode the printer should use to print the job. Valid values are described in the table below. Read-only. + colorMode *PrintColorMode + // The number of copies that should be printed. Read-only. + copies *int32 + // The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only. + dpi *int32 + // The duplex mode the printer should use when printing the job. Valid values are described in the table below. Read-only. + duplexMode *PrintDuplexMode + // The orientation to use when feeding media into the printer. Valid values are described in the following table. Read-only. + feedOrientation *PrinterFeedOrientation + // Finishing processes to use when printing. + finishings []PrintFinishing + // The fitPdfToPage property + fitPdfToPage *bool + // The input bin (tray) to use when printing. See the printer's capabilities for a list of supported input bins. + inputBin *string + // The margin settings to use when printing. + margin PrintMarginable + // The media sizeto use when printing. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. + mediaSize *string + // The default media (such as paper) type to print the document on. + mediaType *string + // The direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. + multipageLayout *PrintMultipageLayout + // The OdataType property + odataType *string + // The orientation setting the printer should use when printing the job. Valid values are described in the following table. + orientation *PrintOrientation + // The output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. + outputBin *string + // The page ranges to print. Read-only. + pageRanges []IntegerRangeable + // The number of document pages to print on each sheet. + pagesPerSheet *int32 + // The print quality to use when printing the job. Valid values are described in the table below. Read-only. + quality *PrintQuality + // Specifies how the printer should scale the document data to fit the requested media. Valid values are described in the following table. + scaling *PrintScaling +} +// NewPrintJobConfiguration instantiates a new printJobConfiguration and sets the default values. +func NewPrintJobConfiguration()(*PrintJobConfiguration) { + m := &PrintJobConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrintJobConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintJobConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintJobConfiguration(), 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 *PrintJobConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCollate gets the collate property value. Whether the printer should collate pages wehen printing multiple copies of a multi-page document. +func (m *PrintJobConfiguration) GetCollate()(*bool) { + return m.collate +} +// GetColorMode gets the colorMode property value. The color mode the printer should use to print the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) GetColorMode()(*PrintColorMode) { + return m.colorMode +} +// GetCopies gets the copies property value. The number of copies that should be printed. Read-only. +func (m *PrintJobConfiguration) GetCopies()(*int32) { + return m.copies +} +// GetDpi gets the dpi property value. The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only. +func (m *PrintJobConfiguration) GetDpi()(*int32) { + return m.dpi +} +// GetDuplexMode gets the duplexMode property value. The duplex mode the printer should use when printing the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) GetDuplexMode()(*PrintDuplexMode) { + return m.duplexMode +} +// GetFeedOrientation gets the feedOrientation property value. The orientation to use when feeding media into the printer. Valid values are described in the following table. Read-only. +func (m *PrintJobConfiguration) GetFeedOrientation()(*PrinterFeedOrientation) { + return m.feedOrientation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintJobConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["collate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCollate(val) + } + return nil + } + res["colorMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintColorMode) + if err != nil { + return err + } + if val != nil { + m.SetColorMode(val.(*PrintColorMode)) + } + return nil + } + res["copies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCopies(val) + } + return nil + } + res["dpi"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDpi(val) + } + return nil + } + res["duplexMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintDuplexMode) + if err != nil { + return err + } + if val != nil { + m.SetDuplexMode(val.(*PrintDuplexMode)) + } + return nil + } + res["feedOrientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrinterFeedOrientation) + if err != nil { + return err + } + if val != nil { + m.SetFeedOrientation(val.(*PrinterFeedOrientation)) + } + return nil + } + res["finishings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintFinishing) + if err != nil { + return err + } + if val != nil { + res := make([]PrintFinishing, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintFinishing)) + } + m.SetFinishings(res) + } + return nil + } + res["fitPdfToPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFitPdfToPage(val) + } + return nil + } + res["inputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInputBin(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintMarginFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMargin(val.(PrintMarginable)) + } + return nil + } + res["mediaSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaSize(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["multipageLayout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintMultipageLayout) + if err != nil { + return err + } + if val != nil { + m.SetMultipageLayout(val.(*PrintMultipageLayout)) + } + 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["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintOrientation) + if err != nil { + return err + } + if val != nil { + m.SetOrientation(val.(*PrintOrientation)) + } + return nil + } + res["outputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputBin(val) + } + return nil + } + res["pageRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntegerRangeable, len(val)) + for i, v := range val { + res[i] = v.(IntegerRangeable) + } + m.SetPageRanges(res) + } + return nil + } + res["pagesPerSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPagesPerSheet(val) + } + return nil + } + res["quality"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + m.SetQuality(val.(*PrintQuality)) + } + return nil + } + res["scaling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintScaling) + if err != nil { + return err + } + if val != nil { + m.SetScaling(val.(*PrintScaling)) + } + return nil + } + return res +} +// GetFinishings gets the finishings property value. Finishing processes to use when printing. +func (m *PrintJobConfiguration) GetFinishings()([]PrintFinishing) { + return m.finishings +} +// GetFitPdfToPage gets the fitPdfToPage property value. The fitPdfToPage property +func (m *PrintJobConfiguration) GetFitPdfToPage()(*bool) { + return m.fitPdfToPage +} +// GetInputBin gets the inputBin property value. The input bin (tray) to use when printing. See the printer's capabilities for a list of supported input bins. +func (m *PrintJobConfiguration) GetInputBin()(*string) { + return m.inputBin +} +// GetMargin gets the margin property value. The margin settings to use when printing. +func (m *PrintJobConfiguration) GetMargin()(PrintMarginable) { + return m.margin +} +// GetMediaSize gets the mediaSize property value. The media sizeto use when printing. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. +func (m *PrintJobConfiguration) GetMediaSize()(*string) { + return m.mediaSize +} +// GetMediaType gets the mediaType property value. The default media (such as paper) type to print the document on. +func (m *PrintJobConfiguration) GetMediaType()(*string) { + return m.mediaType +} +// GetMultipageLayout gets the multipageLayout property value. The direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. +func (m *PrintJobConfiguration) GetMultipageLayout()(*PrintMultipageLayout) { + return m.multipageLayout +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrintJobConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetOrientation gets the orientation property value. The orientation setting the printer should use when printing the job. Valid values are described in the following table. +func (m *PrintJobConfiguration) GetOrientation()(*PrintOrientation) { + return m.orientation +} +// GetOutputBin gets the outputBin property value. The output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. +func (m *PrintJobConfiguration) GetOutputBin()(*string) { + return m.outputBin +} +// GetPageRanges gets the pageRanges property value. The page ranges to print. Read-only. +func (m *PrintJobConfiguration) GetPageRanges()([]IntegerRangeable) { + return m.pageRanges +} +// GetPagesPerSheet gets the pagesPerSheet property value. The number of document pages to print on each sheet. +func (m *PrintJobConfiguration) GetPagesPerSheet()(*int32) { + return m.pagesPerSheet +} +// GetQuality gets the quality property value. The print quality to use when printing the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) GetQuality()(*PrintQuality) { + return m.quality +} +// GetScaling gets the scaling property value. Specifies how the printer should scale the document data to fit the requested media. Valid values are described in the following table. +func (m *PrintJobConfiguration) GetScaling()(*PrintScaling) { + return m.scaling +} +// Serialize serializes information the current object +func (m *PrintJobConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("collate", m.GetCollate()) + if err != nil { + return err + } + } + if m.GetColorMode() != nil { + cast := (*m.GetColorMode()).String() + err := writer.WriteStringValue("colorMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("copies", m.GetCopies()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("dpi", m.GetDpi()) + if err != nil { + return err + } + } + if m.GetDuplexMode() != nil { + cast := (*m.GetDuplexMode()).String() + err := writer.WriteStringValue("duplexMode", &cast) + if err != nil { + return err + } + } + if m.GetFeedOrientation() != nil { + cast := (*m.GetFeedOrientation()).String() + err := writer.WriteStringValue("feedOrientation", &cast) + if err != nil { + return err + } + } + if m.GetFinishings() != nil { + err := writer.WriteCollectionOfStringValues("finishings", SerializePrintFinishing(m.GetFinishings())) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fitPdfToPage", m.GetFitPdfToPage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("inputBin", m.GetInputBin()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaSize", m.GetMediaSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + if m.GetMultipageLayout() != nil { + cast := (*m.GetMultipageLayout()).String() + err := writer.WriteStringValue("multipageLayout", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOrientation() != nil { + cast := (*m.GetOrientation()).String() + err := writer.WriteStringValue("orientation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("outputBin", m.GetOutputBin()) + if err != nil { + return err + } + } + if m.GetPageRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPageRanges())) + for i, v := range m.GetPageRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("pageRanges", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pagesPerSheet", m.GetPagesPerSheet()) + if err != nil { + return err + } + } + if m.GetQuality() != nil { + cast := (*m.GetQuality()).String() + err := writer.WriteStringValue("quality", &cast) + if err != nil { + return err + } + } + if m.GetScaling() != nil { + cast := (*m.GetScaling()).String() + err := writer.WriteStringValue("scaling", &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 *PrintJobConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCollate sets the collate property value. Whether the printer should collate pages wehen printing multiple copies of a multi-page document. +func (m *PrintJobConfiguration) SetCollate(value *bool)() { + m.collate = value +} +// SetColorMode sets the colorMode property value. The color mode the printer should use to print the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) SetColorMode(value *PrintColorMode)() { + m.colorMode = value +} +// SetCopies sets the copies property value. The number of copies that should be printed. Read-only. +func (m *PrintJobConfiguration) SetCopies(value *int32)() { + m.copies = value +} +// SetDpi sets the dpi property value. The resolution to use when printing the job, expressed in dots per inch (DPI). Read-only. +func (m *PrintJobConfiguration) SetDpi(value *int32)() { + m.dpi = value +} +// SetDuplexMode sets the duplexMode property value. The duplex mode the printer should use when printing the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) SetDuplexMode(value *PrintDuplexMode)() { + m.duplexMode = value +} +// SetFeedOrientation sets the feedOrientation property value. The orientation to use when feeding media into the printer. Valid values are described in the following table. Read-only. +func (m *PrintJobConfiguration) SetFeedOrientation(value *PrinterFeedOrientation)() { + m.feedOrientation = value +} +// SetFinishings sets the finishings property value. Finishing processes to use when printing. +func (m *PrintJobConfiguration) SetFinishings(value []PrintFinishing)() { + m.finishings = value +} +// SetFitPdfToPage sets the fitPdfToPage property value. The fitPdfToPage property +func (m *PrintJobConfiguration) SetFitPdfToPage(value *bool)() { + m.fitPdfToPage = value +} +// SetInputBin sets the inputBin property value. The input bin (tray) to use when printing. See the printer's capabilities for a list of supported input bins. +func (m *PrintJobConfiguration) SetInputBin(value *string)() { + m.inputBin = value +} +// SetMargin sets the margin property value. The margin settings to use when printing. +func (m *PrintJobConfiguration) SetMargin(value PrintMarginable)() { + m.margin = value +} +// SetMediaSize sets the mediaSize property value. The media sizeto use when printing. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. +func (m *PrintJobConfiguration) SetMediaSize(value *string)() { + m.mediaSize = value +} +// SetMediaType sets the mediaType property value. The default media (such as paper) type to print the document on. +func (m *PrintJobConfiguration) SetMediaType(value *string)() { + m.mediaType = value +} +// SetMultipageLayout sets the multipageLayout property value. The direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. +func (m *PrintJobConfiguration) SetMultipageLayout(value *PrintMultipageLayout)() { + m.multipageLayout = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrintJobConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrientation sets the orientation property value. The orientation setting the printer should use when printing the job. Valid values are described in the following table. +func (m *PrintJobConfiguration) SetOrientation(value *PrintOrientation)() { + m.orientation = value +} +// SetOutputBin sets the outputBin property value. The output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. +func (m *PrintJobConfiguration) SetOutputBin(value *string)() { + m.outputBin = value +} +// SetPageRanges sets the pageRanges property value. The page ranges to print. Read-only. +func (m *PrintJobConfiguration) SetPageRanges(value []IntegerRangeable)() { + m.pageRanges = value +} +// SetPagesPerSheet sets the pagesPerSheet property value. The number of document pages to print on each sheet. +func (m *PrintJobConfiguration) SetPagesPerSheet(value *int32)() { + m.pagesPerSheet = value +} +// SetQuality sets the quality property value. The print quality to use when printing the job. Valid values are described in the table below. Read-only. +func (m *PrintJobConfiguration) SetQuality(value *PrintQuality)() { + m.quality = value +} +// SetScaling sets the scaling property value. Specifies how the printer should scale the document data to fit the requested media. Valid values are described in the following table. +func (m *PrintJobConfiguration) SetScaling(value *PrintScaling)() { + m.scaling = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_configurationable.go b/src/internal/connector/graph/betasdk/models/print_job_configurationable.go new file mode 100644 index 000000000..78d8ffa98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_configurationable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobConfigurationable +type PrintJobConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollate()(*bool) + GetColorMode()(*PrintColorMode) + GetCopies()(*int32) + GetDpi()(*int32) + GetDuplexMode()(*PrintDuplexMode) + GetFeedOrientation()(*PrinterFeedOrientation) + GetFinishings()([]PrintFinishing) + GetFitPdfToPage()(*bool) + GetInputBin()(*string) + GetMargin()(PrintMarginable) + GetMediaSize()(*string) + GetMediaType()(*string) + GetMultipageLayout()(*PrintMultipageLayout) + GetOdataType()(*string) + GetOrientation()(*PrintOrientation) + GetOutputBin()(*string) + GetPageRanges()([]IntegerRangeable) + GetPagesPerSheet()(*int32) + GetQuality()(*PrintQuality) + GetScaling()(*PrintScaling) + SetCollate(value *bool)() + SetColorMode(value *PrintColorMode)() + SetCopies(value *int32)() + SetDpi(value *int32)() + SetDuplexMode(value *PrintDuplexMode)() + SetFeedOrientation(value *PrinterFeedOrientation)() + SetFinishings(value []PrintFinishing)() + SetFitPdfToPage(value *bool)() + SetInputBin(value *string)() + SetMargin(value PrintMarginable)() + SetMediaSize(value *string)() + SetMediaType(value *string)() + SetMultipageLayout(value *PrintMultipageLayout)() + SetOdataType(value *string)() + SetOrientation(value *PrintOrientation)() + SetOutputBin(value *string)() + SetPageRanges(value []IntegerRangeable)() + SetPagesPerSheet(value *int32)() + SetQuality(value *PrintQuality)() + SetScaling(value *PrintScaling)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_processing_state.go b/src/internal/connector/graph/betasdk/models/print_job_processing_state.go new file mode 100644 index 000000000..b27f78c5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_processing_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintJobProcessingState int + +const ( + UNKNOWN_PRINTJOBPROCESSINGSTATE PrintJobProcessingState = iota + PENDING_PRINTJOBPROCESSINGSTATE + PROCESSING_PRINTJOBPROCESSINGSTATE + PAUSED_PRINTJOBPROCESSINGSTATE + STOPPED_PRINTJOBPROCESSINGSTATE + COMPLETED_PRINTJOBPROCESSINGSTATE + CANCELED_PRINTJOBPROCESSINGSTATE + ABORTED_PRINTJOBPROCESSINGSTATE +) + +func (i PrintJobProcessingState) String() string { + return []string{"unknown", "pending", "processing", "paused", "stopped", "completed", "canceled", "aborted"}[i] +} +func ParsePrintJobProcessingState(v string) (interface{}, error) { + result := UNKNOWN_PRINTJOBPROCESSINGSTATE + switch v { + case "unknown": + result = UNKNOWN_PRINTJOBPROCESSINGSTATE + case "pending": + result = PENDING_PRINTJOBPROCESSINGSTATE + case "processing": + result = PROCESSING_PRINTJOBPROCESSINGSTATE + case "paused": + result = PAUSED_PRINTJOBPROCESSINGSTATE + case "stopped": + result = STOPPED_PRINTJOBPROCESSINGSTATE + case "completed": + result = COMPLETED_PRINTJOBPROCESSINGSTATE + case "canceled": + result = CANCELED_PRINTJOBPROCESSINGSTATE + case "aborted": + result = ABORTED_PRINTJOBPROCESSINGSTATE + default: + return 0, errors.New("Unknown PrintJobProcessingState value: " + v) + } + return &result, nil +} +func SerializePrintJobProcessingState(values []PrintJobProcessingState) []string { + 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/print_job_state_detail.go b/src/internal/connector/graph/betasdk/models/print_job_state_detail.go new file mode 100644 index 000000000..fd22c4df0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_state_detail.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintJobStateDetail int + +const ( + UPLOADPENDING_PRINTJOBSTATEDETAIL PrintJobStateDetail = iota + TRANSFORMING_PRINTJOBSTATEDETAIL + COMPLETEDSUCCESSFULLY_PRINTJOBSTATEDETAIL + COMPLETEDWITHWARNINGS_PRINTJOBSTATEDETAIL + COMPLETEDWITHERRORS_PRINTJOBSTATEDETAIL + RELEASEWAIT_PRINTJOBSTATEDETAIL + INTERPRETING_PRINTJOBSTATEDETAIL + UNKNOWNFUTUREVALUE_PRINTJOBSTATEDETAIL +) + +func (i PrintJobStateDetail) String() string { + return []string{"uploadPending", "transforming", "completedSuccessfully", "completedWithWarnings", "completedWithErrors", "releaseWait", "interpreting", "unknownFutureValue"}[i] +} +func ParsePrintJobStateDetail(v string) (interface{}, error) { + result := UPLOADPENDING_PRINTJOBSTATEDETAIL + switch v { + case "uploadPending": + result = UPLOADPENDING_PRINTJOBSTATEDETAIL + case "transforming": + result = TRANSFORMING_PRINTJOBSTATEDETAIL + case "completedSuccessfully": + result = COMPLETEDSUCCESSFULLY_PRINTJOBSTATEDETAIL + case "completedWithWarnings": + result = COMPLETEDWITHWARNINGS_PRINTJOBSTATEDETAIL + case "completedWithErrors": + result = COMPLETEDWITHERRORS_PRINTJOBSTATEDETAIL + case "releaseWait": + result = RELEASEWAIT_PRINTJOBSTATEDETAIL + case "interpreting": + result = INTERPRETING_PRINTJOBSTATEDETAIL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTJOBSTATEDETAIL + default: + return 0, errors.New("Unknown PrintJobStateDetail value: " + v) + } + return &result, nil +} +func SerializePrintJobStateDetail(values []PrintJobStateDetail) []string { + 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/print_job_status.go b/src/internal/connector/graph/betasdk/models/print_job_status.go new file mode 100644 index 000000000..b084c2606 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_status.go @@ -0,0 +1,259 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobStatus +type PrintJobStatus struct { + // The acquiredByPrinter property + acquiredByPrinter *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A human-readable description of the print job's current processing state. Read-only. + description *string + // Additional details for print job state. Valid values are described in the following table. Read-only. + details []PrintJobStateDetail + // True if the job was acknowledged by a printer; false otherwise. Read-only. + isAcquiredByPrinter *bool + // The OdataType property + odataType *string + // The processingState property + processingState *PrintJobProcessingState + // The processingStateDescription property + processingStateDescription *string + // The state property + state *PrintJobProcessingState +} +// NewPrintJobStatus instantiates a new printJobStatus and sets the default values. +func NewPrintJobStatus()(*PrintJobStatus) { + m := &PrintJobStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrintJobStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintJobStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintJobStatus(), nil +} +// GetAcquiredByPrinter gets the acquiredByPrinter property value. The acquiredByPrinter property +func (m *PrintJobStatus) GetAcquiredByPrinter()(*bool) { + return m.acquiredByPrinter +} +// 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 *PrintJobStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. A human-readable description of the print job's current processing state. Read-only. +func (m *PrintJobStatus) GetDescription()(*string) { + return m.description +} +// GetDetails gets the details property value. Additional details for print job state. Valid values are described in the following table. Read-only. +func (m *PrintJobStatus) GetDetails()([]PrintJobStateDetail) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintJobStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["acquiredByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAcquiredByPrinter(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintJobStateDetail) + if err != nil { + return err + } + if val != nil { + res := make([]PrintJobStateDetail, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintJobStateDetail)) + } + m.SetDetails(res) + } + return nil + } + res["isAcquiredByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAcquiredByPrinter(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["processingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintJobProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetProcessingState(val.(*PrintJobProcessingState)) + } + return nil + } + res["processingStateDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessingStateDescription(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintJobProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PrintJobProcessingState)) + } + return nil + } + return res +} +// GetIsAcquiredByPrinter gets the isAcquiredByPrinter property value. True if the job was acknowledged by a printer; false otherwise. Read-only. +func (m *PrintJobStatus) GetIsAcquiredByPrinter()(*bool) { + return m.isAcquiredByPrinter +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrintJobStatus) GetOdataType()(*string) { + return m.odataType +} +// GetProcessingState gets the processingState property value. The processingState property +func (m *PrintJobStatus) GetProcessingState()(*PrintJobProcessingState) { + return m.processingState +} +// GetProcessingStateDescription gets the processingStateDescription property value. The processingStateDescription property +func (m *PrintJobStatus) GetProcessingStateDescription()(*string) { + return m.processingStateDescription +} +// GetState gets the state property value. The state property +func (m *PrintJobStatus) GetState()(*PrintJobProcessingState) { + return m.state +} +// Serialize serializes information the current object +func (m *PrintJobStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("acquiredByPrinter", m.GetAcquiredByPrinter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDetails() != nil { + err := writer.WriteCollectionOfStringValues("details", SerializePrintJobStateDetail(m.GetDetails())) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isAcquiredByPrinter", m.GetIsAcquiredByPrinter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProcessingState() != nil { + cast := (*m.GetProcessingState()).String() + err := writer.WriteStringValue("processingState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("processingStateDescription", m.GetProcessingStateDescription()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAcquiredByPrinter sets the acquiredByPrinter property value. The acquiredByPrinter property +func (m *PrintJobStatus) SetAcquiredByPrinter(value *bool)() { + m.acquiredByPrinter = value +} +// 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 *PrintJobStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. A human-readable description of the print job's current processing state. Read-only. +func (m *PrintJobStatus) SetDescription(value *string)() { + m.description = value +} +// SetDetails sets the details property value. Additional details for print job state. Valid values are described in the following table. Read-only. +func (m *PrintJobStatus) SetDetails(value []PrintJobStateDetail)() { + m.details = value +} +// SetIsAcquiredByPrinter sets the isAcquiredByPrinter property value. True if the job was acknowledged by a printer; false otherwise. Read-only. +func (m *PrintJobStatus) SetIsAcquiredByPrinter(value *bool)() { + m.isAcquiredByPrinter = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrintJobStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetProcessingState sets the processingState property value. The processingState property +func (m *PrintJobStatus) SetProcessingState(value *PrintJobProcessingState)() { + m.processingState = value +} +// SetProcessingStateDescription sets the processingStateDescription property value. The processingStateDescription property +func (m *PrintJobStatus) SetProcessingStateDescription(value *string)() { + m.processingStateDescription = value +} +// SetState sets the state property value. The state property +func (m *PrintJobStatus) SetState(value *PrintJobProcessingState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_job_statusable.go b/src/internal/connector/graph/betasdk/models/print_job_statusable.go new file mode 100644 index 000000000..1e81da721 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_job_statusable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobStatusable +type PrintJobStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcquiredByPrinter()(*bool) + GetDescription()(*string) + GetDetails()([]PrintJobStateDetail) + GetIsAcquiredByPrinter()(*bool) + GetOdataType()(*string) + GetProcessingState()(*PrintJobProcessingState) + GetProcessingStateDescription()(*string) + GetState()(*PrintJobProcessingState) + SetAcquiredByPrinter(value *bool)() + SetDescription(value *string)() + SetDetails(value []PrintJobStateDetail)() + SetIsAcquiredByPrinter(value *bool)() + SetOdataType(value *string)() + SetProcessingState(value *PrintJobProcessingState)() + SetProcessingStateDescription(value *string)() + SetState(value *PrintJobProcessingState)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_jobable.go b/src/internal/connector/graph/betasdk/models/print_jobable.go new file mode 100644 index 000000000..9ce596ca7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_jobable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintJobable +type PrintJobable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetConfiguration()(PrintJobConfigurationable) + GetCreatedBy()(UserIdentityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetDocuments()([]PrintDocumentable) + GetErrorCode()(*int32) + GetIsFetchable()(*bool) + GetRedirectedFrom()(*string) + GetRedirectedTo()(*string) + GetStatus()(PrintJobStatusable) + GetTasks()([]PrintTaskable) + SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetConfiguration(value PrintJobConfigurationable)() + SetCreatedBy(value UserIdentityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetDocuments(value []PrintDocumentable)() + SetErrorCode(value *int32)() + SetIsFetchable(value *bool)() + SetRedirectedFrom(value *string)() + SetRedirectedTo(value *string)() + SetStatus(value PrintJobStatusable)() + SetTasks(value []PrintTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_margin.go b/src/internal/connector/graph/betasdk/models/print_margin.go new file mode 100644 index 000000000..bdf7e6778 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_margin.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintMargin +type PrintMargin 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 margin in microns from the bottom edge. + bottom *int32 + // The margin in microns from the left edge. + left *int32 + // The OdataType property + odataType *string + // The margin in microns from the right edge. + right *int32 + // The margin in microns from the top edge. + top *int32 +} +// NewPrintMargin instantiates a new printMargin and sets the default values. +func NewPrintMargin()(*PrintMargin) { + m := &PrintMargin{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrintMarginFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintMarginFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintMargin(), 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 *PrintMargin) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBottom gets the bottom property value. The margin in microns from the bottom edge. +func (m *PrintMargin) GetBottom()(*int32) { + return m.bottom +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintMargin) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bottom"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetBottom(val) + } + return nil + } + res["left"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLeft(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["right"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRight(val) + } + return nil + } + res["top"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTop(val) + } + return nil + } + return res +} +// GetLeft gets the left property value. The margin in microns from the left edge. +func (m *PrintMargin) GetLeft()(*int32) { + return m.left +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrintMargin) GetOdataType()(*string) { + return m.odataType +} +// GetRight gets the right property value. The margin in microns from the right edge. +func (m *PrintMargin) GetRight()(*int32) { + return m.right +} +// GetTop gets the top property value. The margin in microns from the top edge. +func (m *PrintMargin) GetTop()(*int32) { + return m.top +} +// Serialize serializes information the current object +func (m *PrintMargin) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("bottom", m.GetBottom()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("left", m.GetLeft()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("right", m.GetRight()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("top", m.GetTop()) + 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 *PrintMargin) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBottom sets the bottom property value. The margin in microns from the bottom edge. +func (m *PrintMargin) SetBottom(value *int32)() { + m.bottom = value +} +// SetLeft sets the left property value. The margin in microns from the left edge. +func (m *PrintMargin) SetLeft(value *int32)() { + m.left = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrintMargin) SetOdataType(value *string)() { + m.odataType = value +} +// SetRight sets the right property value. The margin in microns from the right edge. +func (m *PrintMargin) SetRight(value *int32)() { + m.right = value +} +// SetTop sets the top property value. The margin in microns from the top edge. +func (m *PrintMargin) SetTop(value *int32)() { + m.top = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_marginable.go b/src/internal/connector/graph/betasdk/models/print_marginable.go new file mode 100644 index 000000000..73e52da06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_marginable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintMarginable +type PrintMarginable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBottom()(*int32) + GetLeft()(*int32) + GetOdataType()(*string) + GetRight()(*int32) + GetTop()(*int32) + SetBottom(value *int32)() + SetLeft(value *int32)() + SetOdataType(value *string)() + SetRight(value *int32)() + SetTop(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_media_type.go b/src/internal/connector/graph/betasdk/models/print_media_type.go new file mode 100644 index 000000000..7e1f646d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_media_type.go @@ -0,0 +1,67 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintMediaType int + +const ( + STATIONERY_PRINTMEDIATYPE PrintMediaType = iota + TRANSPARENCY_PRINTMEDIATYPE + ENVELOPE_PRINTMEDIATYPE + ENVELOPEPLAIN_PRINTMEDIATYPE + CONTINUOUS_PRINTMEDIATYPE + SCREEN_PRINTMEDIATYPE + SCREENPAGED_PRINTMEDIATYPE + CONTINUOUSLONG_PRINTMEDIATYPE + CONTINUOUSSHORT_PRINTMEDIATYPE + ENVELOPEWINDOW_PRINTMEDIATYPE + MULTIPARTFORM_PRINTMEDIATYPE + MULTILAYER_PRINTMEDIATYPE + LABELS_PRINTMEDIATYPE +) + +func (i PrintMediaType) String() string { + return []string{"stationery", "transparency", "envelope", "envelopePlain", "continuous", "screen", "screenPaged", "continuousLong", "continuousShort", "envelopeWindow", "multiPartForm", "multiLayer", "labels"}[i] +} +func ParsePrintMediaType(v string) (interface{}, error) { + result := STATIONERY_PRINTMEDIATYPE + switch v { + case "stationery": + result = STATIONERY_PRINTMEDIATYPE + case "transparency": + result = TRANSPARENCY_PRINTMEDIATYPE + case "envelope": + result = ENVELOPE_PRINTMEDIATYPE + case "envelopePlain": + result = ENVELOPEPLAIN_PRINTMEDIATYPE + case "continuous": + result = CONTINUOUS_PRINTMEDIATYPE + case "screen": + result = SCREEN_PRINTMEDIATYPE + case "screenPaged": + result = SCREENPAGED_PRINTMEDIATYPE + case "continuousLong": + result = CONTINUOUSLONG_PRINTMEDIATYPE + case "continuousShort": + result = CONTINUOUSSHORT_PRINTMEDIATYPE + case "envelopeWindow": + result = ENVELOPEWINDOW_PRINTMEDIATYPE + case "multiPartForm": + result = MULTIPARTFORM_PRINTMEDIATYPE + case "multiLayer": + result = MULTILAYER_PRINTMEDIATYPE + case "labels": + result = LABELS_PRINTMEDIATYPE + default: + return 0, errors.New("Unknown PrintMediaType value: " + v) + } + return &result, nil +} +func SerializePrintMediaType(values []PrintMediaType) []string { + 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/print_multipage_layout.go b/src/internal/connector/graph/betasdk/models/print_multipage_layout.go new file mode 100644 index 000000000..fbe53ed96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_multipage_layout.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintMultipageLayout int + +const ( + CLOCKWISEFROMTOPLEFT_PRINTMULTIPAGELAYOUT PrintMultipageLayout = iota + COUNTERCLOCKWISEFROMTOPLEFT_PRINTMULTIPAGELAYOUT + COUNTERCLOCKWISEFROMTOPRIGHT_PRINTMULTIPAGELAYOUT + CLOCKWISEFROMTOPRIGHT_PRINTMULTIPAGELAYOUT + COUNTERCLOCKWISEFROMBOTTOMLEFT_PRINTMULTIPAGELAYOUT + CLOCKWISEFROMBOTTOMLEFT_PRINTMULTIPAGELAYOUT + COUNTERCLOCKWISEFROMBOTTOMRIGHT_PRINTMULTIPAGELAYOUT + CLOCKWISEFROMBOTTOMRIGHT_PRINTMULTIPAGELAYOUT +) + +func (i PrintMultipageLayout) String() string { + return []string{"clockwiseFromTopLeft", "counterclockwiseFromTopLeft", "counterclockwiseFromTopRight", "clockwiseFromTopRight", "counterclockwiseFromBottomLeft", "clockwiseFromBottomLeft", "counterclockwiseFromBottomRight", "clockwiseFromBottomRight"}[i] +} +func ParsePrintMultipageLayout(v string) (interface{}, error) { + result := CLOCKWISEFROMTOPLEFT_PRINTMULTIPAGELAYOUT + switch v { + case "clockwiseFromTopLeft": + result = CLOCKWISEFROMTOPLEFT_PRINTMULTIPAGELAYOUT + case "counterclockwiseFromTopLeft": + result = COUNTERCLOCKWISEFROMTOPLEFT_PRINTMULTIPAGELAYOUT + case "counterclockwiseFromTopRight": + result = COUNTERCLOCKWISEFROMTOPRIGHT_PRINTMULTIPAGELAYOUT + case "clockwiseFromTopRight": + result = CLOCKWISEFROMTOPRIGHT_PRINTMULTIPAGELAYOUT + case "counterclockwiseFromBottomLeft": + result = COUNTERCLOCKWISEFROMBOTTOMLEFT_PRINTMULTIPAGELAYOUT + case "clockwiseFromBottomLeft": + result = CLOCKWISEFROMBOTTOMLEFT_PRINTMULTIPAGELAYOUT + case "counterclockwiseFromBottomRight": + result = COUNTERCLOCKWISEFROMBOTTOMRIGHT_PRINTMULTIPAGELAYOUT + case "clockwiseFromBottomRight": + result = CLOCKWISEFROMBOTTOMRIGHT_PRINTMULTIPAGELAYOUT + default: + return 0, errors.New("Unknown PrintMultipageLayout value: " + v) + } + return &result, nil +} +func SerializePrintMultipageLayout(values []PrintMultipageLayout) []string { + 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/print_operation.go b/src/internal/connector/graph/betasdk/models/print_operation.go new file mode 100644 index 000000000..62338155d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation.go @@ -0,0 +1,105 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperation +type PrintOperation struct { + Entity + // The DateTimeOffset when the operation was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status PrintOperationStatusable +} +// NewPrintOperation instantiates a new PrintOperation and sets the default values. +func NewPrintOperation()(*PrintOperation) { + m := &PrintOperation{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.printerCreateOperation": + return NewPrinterCreateOperation(), nil + } + } + } + } + return NewPrintOperation(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The DateTimeOffset when the operation was created. Read-only. +func (m *PrintOperation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintOperationStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(PrintOperationStatusable)) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status property +func (m *PrintOperation) GetStatus()(PrintOperationStatusable) { + return m.status +} +// Serialize serializes information the current object +func (m *PrintOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The DateTimeOffset when the operation was created. Read-only. +func (m *PrintOperation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *PrintOperation) SetStatus(value PrintOperationStatusable)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/print_operation_collection_response.go new file mode 100644 index 000000000..b0cfd7e08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperationCollectionResponse +type PrintOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintOperationable +} +// NewPrintOperationCollectionResponse instantiates a new PrintOperationCollectionResponse and sets the default values. +func NewPrintOperationCollectionResponse()(*PrintOperationCollectionResponse) { + m := &PrintOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintOperationable, len(val)) + for i, v := range val { + res[i] = v.(PrintOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintOperationCollectionResponse) GetValue()([]PrintOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintOperationCollectionResponse) SetValue(value []PrintOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_operation_collection_responseable.go new file mode 100644 index 000000000..c9ff4e077 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperationCollectionResponseable +type PrintOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintOperationable) + SetValue(value []PrintOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_operation_processing_state.go b/src/internal/connector/graph/betasdk/models/print_operation_processing_state.go new file mode 100644 index 000000000..cdc6b0a0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation_processing_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintOperationProcessingState int + +const ( + NOTSTARTED_PRINTOPERATIONPROCESSINGSTATE PrintOperationProcessingState = iota + RUNNING_PRINTOPERATIONPROCESSINGSTATE + SUCCEEDED_PRINTOPERATIONPROCESSINGSTATE + FAILED_PRINTOPERATIONPROCESSINGSTATE + UNKNOWNFUTUREVALUE_PRINTOPERATIONPROCESSINGSTATE +) + +func (i PrintOperationProcessingState) String() string { + return []string{"notStarted", "running", "succeeded", "failed", "unknownFutureValue"}[i] +} +func ParsePrintOperationProcessingState(v string) (interface{}, error) { + result := NOTSTARTED_PRINTOPERATIONPROCESSINGSTATE + switch v { + case "notStarted": + result = NOTSTARTED_PRINTOPERATIONPROCESSINGSTATE + case "running": + result = RUNNING_PRINTOPERATIONPROCESSINGSTATE + case "succeeded": + result = SUCCEEDED_PRINTOPERATIONPROCESSINGSTATE + case "failed": + result = FAILED_PRINTOPERATIONPROCESSINGSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTOPERATIONPROCESSINGSTATE + default: + return 0, errors.New("Unknown PrintOperationProcessingState value: " + v) + } + return &result, nil +} +func SerializePrintOperationProcessingState(values []PrintOperationProcessingState) []string { + 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/print_operation_status.go b/src/internal/connector/graph/betasdk/models/print_operation_status.go new file mode 100644 index 000000000..cd7ce2123 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation_status.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperationStatus +type PrintOperationStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A human-readable description of the printOperation's current processing state. Read-only. + description *string + // The OdataType property + odataType *string + // The state property + state *PrintOperationProcessingState +} +// NewPrintOperationStatus instantiates a new printOperationStatus and sets the default values. +func NewPrintOperationStatus()(*PrintOperationStatus) { + m := &PrintOperationStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrintOperationStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintOperationStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintOperationStatus(), 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 *PrintOperationStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. A human-readable description of the printOperation's current processing state. Read-only. +func (m *PrintOperationStatus) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintOperationStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintOperationProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PrintOperationProcessingState)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrintOperationStatus) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *PrintOperationStatus) GetState()(*PrintOperationProcessingState) { + return m.state +} +// Serialize serializes information the current object +func (m *PrintOperationStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *PrintOperationStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. A human-readable description of the printOperation's current processing state. Read-only. +func (m *PrintOperationStatus) SetDescription(value *string)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrintOperationStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *PrintOperationStatus) SetState(value *PrintOperationProcessingState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_operation_statusable.go b/src/internal/connector/graph/betasdk/models/print_operation_statusable.go new file mode 100644 index 000000000..e8f61ad4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operation_statusable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperationStatusable +type PrintOperationStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetOdataType()(*string) + GetState()(*PrintOperationProcessingState) + SetDescription(value *string)() + SetOdataType(value *string)() + SetState(value *PrintOperationProcessingState)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_operationable.go b/src/internal/connector/graph/betasdk/models/print_operationable.go new file mode 100644 index 000000000..767e5bdcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_operationable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintOperationable +type PrintOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(PrintOperationStatusable) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value PrintOperationStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_orientation.go b/src/internal/connector/graph/betasdk/models/print_orientation.go new file mode 100644 index 000000000..ecc418331 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_orientation.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintOrientation int + +const ( + PORTRAIT_PRINTORIENTATION PrintOrientation = iota + LANDSCAPE_PRINTORIENTATION + REVERSELANDSCAPE_PRINTORIENTATION + REVERSEPORTRAIT_PRINTORIENTATION +) + +func (i PrintOrientation) String() string { + return []string{"portrait", "landscape", "reverseLandscape", "reversePortrait"}[i] +} +func ParsePrintOrientation(v string) (interface{}, error) { + result := PORTRAIT_PRINTORIENTATION + switch v { + case "portrait": + result = PORTRAIT_PRINTORIENTATION + case "landscape": + result = LANDSCAPE_PRINTORIENTATION + case "reverseLandscape": + result = REVERSELANDSCAPE_PRINTORIENTATION + case "reversePortrait": + result = REVERSEPORTRAIT_PRINTORIENTATION + default: + return 0, errors.New("Unknown PrintOrientation value: " + v) + } + return &result, nil +} +func SerializePrintOrientation(values []PrintOrientation) []string { + 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/print_presentation_direction.go b/src/internal/connector/graph/betasdk/models/print_presentation_direction.go new file mode 100644 index 000000000..5bd85ba21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_presentation_direction.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintPresentationDirection int + +const ( + CLOCKWISEFROMTOPLEFT_PRINTPRESENTATIONDIRECTION PrintPresentationDirection = iota + COUNTERCLOCKWISEFROMTOPLEFT_PRINTPRESENTATIONDIRECTION + COUNTERCLOCKWISEFROMTOPRIGHT_PRINTPRESENTATIONDIRECTION + CLOCKWISEFROMTOPRIGHT_PRINTPRESENTATIONDIRECTION + COUNTERCLOCKWISEFROMBOTTOMLEFT_PRINTPRESENTATIONDIRECTION + CLOCKWISEFROMBOTTOMLEFT_PRINTPRESENTATIONDIRECTION + COUNTERCLOCKWISEFROMBOTTOMRIGHT_PRINTPRESENTATIONDIRECTION + CLOCKWISEFROMBOTTOMRIGHT_PRINTPRESENTATIONDIRECTION +) + +func (i PrintPresentationDirection) String() string { + return []string{"clockwiseFromTopLeft", "counterClockwiseFromTopLeft", "counterClockwiseFromTopRight", "clockwiseFromTopRight", "counterClockwiseFromBottomLeft", "clockwiseFromBottomLeft", "counterClockwiseFromBottomRight", "clockwiseFromBottomRight"}[i] +} +func ParsePrintPresentationDirection(v string) (interface{}, error) { + result := CLOCKWISEFROMTOPLEFT_PRINTPRESENTATIONDIRECTION + switch v { + case "clockwiseFromTopLeft": + result = CLOCKWISEFROMTOPLEFT_PRINTPRESENTATIONDIRECTION + case "counterClockwiseFromTopLeft": + result = COUNTERCLOCKWISEFROMTOPLEFT_PRINTPRESENTATIONDIRECTION + case "counterClockwiseFromTopRight": + result = COUNTERCLOCKWISEFROMTOPRIGHT_PRINTPRESENTATIONDIRECTION + case "clockwiseFromTopRight": + result = CLOCKWISEFROMTOPRIGHT_PRINTPRESENTATIONDIRECTION + case "counterClockwiseFromBottomLeft": + result = COUNTERCLOCKWISEFROMBOTTOMLEFT_PRINTPRESENTATIONDIRECTION + case "clockwiseFromBottomLeft": + result = CLOCKWISEFROMBOTTOMLEFT_PRINTPRESENTATIONDIRECTION + case "counterClockwiseFromBottomRight": + result = COUNTERCLOCKWISEFROMBOTTOMRIGHT_PRINTPRESENTATIONDIRECTION + case "clockwiseFromBottomRight": + result = CLOCKWISEFROMBOTTOMRIGHT_PRINTPRESENTATIONDIRECTION + default: + return 0, errors.New("Unknown PrintPresentationDirection value: " + v) + } + return &result, nil +} +func SerializePrintPresentationDirection(values []PrintPresentationDirection) []string { + 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/print_quality.go b/src/internal/connector/graph/betasdk/models/print_quality.go new file mode 100644 index 000000000..8f3483fdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_quality.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintQuality int + +const ( + LOW_PRINTQUALITY PrintQuality = iota + MEDIUM_PRINTQUALITY + HIGH_PRINTQUALITY + UNKNOWNFUTUREVALUE_PRINTQUALITY +) + +func (i PrintQuality) String() string { + return []string{"low", "medium", "high", "unknownFutureValue"}[i] +} +func ParsePrintQuality(v string) (interface{}, error) { + result := LOW_PRINTQUALITY + switch v { + case "low": + result = LOW_PRINTQUALITY + case "medium": + result = MEDIUM_PRINTQUALITY + case "high": + result = HIGH_PRINTQUALITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTQUALITY + default: + return 0, errors.New("Unknown PrintQuality value: " + v) + } + return &result, nil +} +func SerializePrintQuality(values []PrintQuality) []string { + 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/print_scaling.go b/src/internal/connector/graph/betasdk/models/print_scaling.go new file mode 100644 index 000000000..aa28abb1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_scaling.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintScaling int + +const ( + AUTO_PRINTSCALING PrintScaling = iota + SHRINKTOFIT_PRINTSCALING + FILL_PRINTSCALING + FIT_PRINTSCALING + NONE_PRINTSCALING + UNKNOWNFUTUREVALUE_PRINTSCALING +) + +func (i PrintScaling) String() string { + return []string{"auto", "shrinkToFit", "fill", "fit", "none", "unknownFutureValue"}[i] +} +func ParsePrintScaling(v string) (interface{}, error) { + result := AUTO_PRINTSCALING + switch v { + case "auto": + result = AUTO_PRINTSCALING + case "shrinkToFit": + result = SHRINKTOFIT_PRINTSCALING + case "fill": + result = FILL_PRINTSCALING + case "fit": + result = FIT_PRINTSCALING + case "none": + result = NONE_PRINTSCALING + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTSCALING + default: + return 0, errors.New("Unknown PrintScaling value: " + v) + } + return &result, nil +} +func SerializePrintScaling(values []PrintScaling) []string { + 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/print_service.go b/src/internal/connector/graph/betasdk/models/print_service.go new file mode 100644 index 000000000..eadb1149e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintService +type PrintService struct { + Entity + // Endpoints that can be used to access the service. Read-only. Nullable. + endpoints []PrintServiceEndpointable +} +// NewPrintService instantiates a new PrintService and sets the default values. +func NewPrintService()(*PrintService) { + m := &PrintService{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintServiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintServiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintService(), nil +} +// GetEndpoints gets the endpoints property value. Endpoints that can be used to access the service. Read-only. Nullable. +func (m *PrintService) GetEndpoints()([]PrintServiceEndpointable) { + return m.endpoints +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintService) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["endpoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintServiceEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintServiceEndpointable, len(val)) + for i, v := range val { + res[i] = v.(PrintServiceEndpointable) + } + m.SetEndpoints(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PrintService) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetEndpoints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEndpoints())) + for i, v := range m.GetEndpoints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("endpoints", cast) + if err != nil { + return err + } + } + return nil +} +// SetEndpoints sets the endpoints property value. Endpoints that can be used to access the service. Read-only. Nullable. +func (m *PrintService) SetEndpoints(value []PrintServiceEndpointable)() { + m.endpoints = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_collection_response.go b/src/internal/connector/graph/betasdk/models/print_service_collection_response.go new file mode 100644 index 000000000..b1d637ea9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceCollectionResponse +type PrintServiceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintServiceable +} +// NewPrintServiceCollectionResponse instantiates a new PrintServiceCollectionResponse and sets the default values. +func NewPrintServiceCollectionResponse()(*PrintServiceCollectionResponse) { + m := &PrintServiceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintServiceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintServiceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintServiceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintServiceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintServiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintServiceable, len(val)) + for i, v := range val { + res[i] = v.(PrintServiceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintServiceCollectionResponse) GetValue()([]PrintServiceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintServiceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintServiceCollectionResponse) SetValue(value []PrintServiceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_service_collection_responseable.go new file mode 100644 index 000000000..8e079df79 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceCollectionResponseable +type PrintServiceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintServiceable) + SetValue(value []PrintServiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_endpoint.go b/src/internal/connector/graph/betasdk/models/print_service_endpoint.go new file mode 100644 index 000000000..880b0fbd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_endpoint.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceEndpoint provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintServiceEndpoint struct { + Entity + // A human-readable display name for the endpoint. + displayName *string + // The URI that can be used to access the service. + uri *string +} +// NewPrintServiceEndpoint instantiates a new printServiceEndpoint and sets the default values. +func NewPrintServiceEndpoint()(*PrintServiceEndpoint) { + m := &PrintServiceEndpoint{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintServiceEndpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintServiceEndpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintServiceEndpoint(), nil +} +// GetDisplayName gets the displayName property value. A human-readable display name for the endpoint. +func (m *PrintServiceEndpoint) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintServiceEndpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetUri gets the uri property value. The URI that can be used to access the service. +func (m *PrintServiceEndpoint) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *PrintServiceEndpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uri", m.GetUri()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. A human-readable display name for the endpoint. +func (m *PrintServiceEndpoint) SetDisplayName(value *string)() { + m.displayName = value +} +// SetUri sets the uri property value. The URI that can be used to access the service. +func (m *PrintServiceEndpoint) SetUri(value *string)() { + m.uri = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_response.go b/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_response.go new file mode 100644 index 000000000..325e337e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceEndpointCollectionResponse +type PrintServiceEndpointCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintServiceEndpointable +} +// NewPrintServiceEndpointCollectionResponse instantiates a new PrintServiceEndpointCollectionResponse and sets the default values. +func NewPrintServiceEndpointCollectionResponse()(*PrintServiceEndpointCollectionResponse) { + m := &PrintServiceEndpointCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintServiceEndpointCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintServiceEndpointCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintServiceEndpointCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintServiceEndpointCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintServiceEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintServiceEndpointable, len(val)) + for i, v := range val { + res[i] = v.(PrintServiceEndpointable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintServiceEndpointCollectionResponse) GetValue()([]PrintServiceEndpointable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintServiceEndpointCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintServiceEndpointCollectionResponse) SetValue(value []PrintServiceEndpointable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_responseable.go new file mode 100644 index 000000000..f0cd33b90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_endpoint_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceEndpointCollectionResponseable +type PrintServiceEndpointCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintServiceEndpointable) + SetValue(value []PrintServiceEndpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_service_endpointable.go b/src/internal/connector/graph/betasdk/models/print_service_endpointable.go new file mode 100644 index 000000000..43eb27755 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_service_endpointable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceEndpointable +type PrintServiceEndpointable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetUri()(*string) + SetDisplayName(value *string)() + SetUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_serviceable.go b/src/internal/connector/graph/betasdk/models/print_serviceable.go new file mode 100644 index 000000000..0113273b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_serviceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintServiceable +type PrintServiceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndpoints()([]PrintServiceEndpointable) + SetEndpoints(value []PrintServiceEndpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task.go b/src/internal/connector/graph/betasdk/models/print_task.go new file mode 100644 index 000000000..2733b67e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTask provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintTask struct { + Entity + // The definition property + definition PrintTaskDefinitionable + // The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/beta/print/printers/{printerId}/jobs/{jobId}. Read-only. + parentUrl *string + // The status property + status PrintTaskStatusable + // The trigger property + trigger PrintTaskTriggerable +} +// NewPrintTask instantiates a new printTask and sets the default values. +func NewPrintTask()(*PrintTask) { + m := &PrintTask{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTask(), nil +} +// GetDefinition gets the definition property value. The definition property +func (m *PrintTask) GetDefinition()(PrintTaskDefinitionable) { + return m.definition +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["definition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinition(val.(PrintTaskDefinitionable)) + } + return nil + } + res["parentUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentUrl(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintTaskStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(PrintTaskStatusable)) + } + return nil + } + res["trigger"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintTaskTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTrigger(val.(PrintTaskTriggerable)) + } + return nil + } + return res +} +// GetParentUrl gets the parentUrl property value. The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/beta/print/printers/{printerId}/jobs/{jobId}. Read-only. +func (m *PrintTask) GetParentUrl()(*string) { + return m.parentUrl +} +// GetStatus gets the status property value. The status property +func (m *PrintTask) GetStatus()(PrintTaskStatusable) { + return m.status +} +// GetTrigger gets the trigger property value. The trigger property +func (m *PrintTask) GetTrigger()(PrintTaskTriggerable) { + return m.trigger +} +// Serialize serializes information the current object +func (m *PrintTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("definition", m.GetDefinition()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("parentUrl", m.GetParentUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("trigger", m.GetTrigger()) + if err != nil { + return err + } + } + return nil +} +// SetDefinition sets the definition property value. The definition property +func (m *PrintTask) SetDefinition(value PrintTaskDefinitionable)() { + m.definition = value +} +// SetParentUrl sets the parentUrl property value. The URL for the print entity that triggered this task. For example, https://graph.microsoft.com/beta/print/printers/{printerId}/jobs/{jobId}. Read-only. +func (m *PrintTask) SetParentUrl(value *string)() { + m.parentUrl = value +} +// SetStatus sets the status property value. The status property +func (m *PrintTask) SetStatus(value PrintTaskStatusable)() { + m.status = value +} +// SetTrigger sets the trigger property value. The trigger property +func (m *PrintTask) SetTrigger(value PrintTaskTriggerable)() { + m.trigger = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_collection_response.go b/src/internal/connector/graph/betasdk/models/print_task_collection_response.go new file mode 100644 index 000000000..65b4c4d31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskCollectionResponse +type PrintTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintTaskable +} +// NewPrintTaskCollectionResponse instantiates a new PrintTaskCollectionResponse and sets the default values. +func NewPrintTaskCollectionResponse()(*PrintTaskCollectionResponse) { + m := &PrintTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintTaskCollectionResponse) GetValue()([]PrintTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintTaskCollectionResponse) SetValue(value []PrintTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_task_collection_responseable.go new file mode 100644 index 000000000..2adb72bfa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskCollectionResponseable +type PrintTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintTaskable) + SetValue(value []PrintTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_definition.go b/src/internal/connector/graph/betasdk/models/print_task_definition.go new file mode 100644 index 000000000..f2c6e51fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_definition.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskDefinition provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintTaskDefinition struct { + Entity + // The createdBy property + createdBy AppIdentityable + // The name of the printTaskDefinition. + displayName *string + // A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. + tasks []PrintTaskable +} +// NewPrintTaskDefinition instantiates a new printTaskDefinition and sets the default values. +func NewPrintTaskDefinition()(*PrintTaskDefinition) { + m := &PrintTaskDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintTaskDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskDefinition(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *PrintTaskDefinition) GetCreatedBy()(AppIdentityable) { + return m.createdBy +} +// GetDisplayName gets the displayName property value. The name of the printTaskDefinition. +func (m *PrintTaskDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAppIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(AppIdentityable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["tasks"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskable) + } + m.SetTasks(res) + } + return nil + } + return res +} +// GetTasks gets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. +func (m *PrintTaskDefinition) GetTasks()([]PrintTaskable) { + return m.tasks +} +// Serialize serializes information the current object +func (m *PrintTaskDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetTasks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTasks())) + for i, v := range m.GetTasks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tasks", cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *PrintTaskDefinition) SetCreatedBy(value AppIdentityable)() { + m.createdBy = value +} +// SetDisplayName sets the displayName property value. The name of the printTaskDefinition. +func (m *PrintTaskDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetTasks sets the tasks property value. A list of tasks that have been created based on this definition. The list includes currently running tasks and recently completed tasks. Read-only. +func (m *PrintTaskDefinition) SetTasks(value []PrintTaskable)() { + m.tasks = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/print_task_definition_collection_response.go new file mode 100644 index 000000000..38e9d11ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskDefinitionCollectionResponse +type PrintTaskDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintTaskDefinitionable +} +// NewPrintTaskDefinitionCollectionResponse instantiates a new PrintTaskDefinitionCollectionResponse and sets the default values. +func NewPrintTaskDefinitionCollectionResponse()(*PrintTaskDefinitionCollectionResponse) { + m := &PrintTaskDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintTaskDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintTaskDefinitionCollectionResponse) GetValue()([]PrintTaskDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintTaskDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintTaskDefinitionCollectionResponse) SetValue(value []PrintTaskDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_task_definition_collection_responseable.go new file mode 100644 index 000000000..ab921c500 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskDefinitionCollectionResponseable +type PrintTaskDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintTaskDefinitionable) + SetValue(value []PrintTaskDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_definitionable.go b/src/internal/connector/graph/betasdk/models/print_task_definitionable.go new file mode 100644 index 000000000..b1289272a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_definitionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskDefinitionable +type PrintTaskDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(AppIdentityable) + GetDisplayName()(*string) + GetTasks()([]PrintTaskable) + SetCreatedBy(value AppIdentityable)() + SetDisplayName(value *string)() + SetTasks(value []PrintTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_processing_state.go b/src/internal/connector/graph/betasdk/models/print_task_processing_state.go new file mode 100644 index 000000000..847aea0aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_processing_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintTaskProcessingState int + +const ( + PENDING_PRINTTASKPROCESSINGSTATE PrintTaskProcessingState = iota + PROCESSING_PRINTTASKPROCESSINGSTATE + COMPLETED_PRINTTASKPROCESSINGSTATE + ABORTED_PRINTTASKPROCESSINGSTATE + UNKNOWNFUTUREVALUE_PRINTTASKPROCESSINGSTATE +) + +func (i PrintTaskProcessingState) String() string { + return []string{"pending", "processing", "completed", "aborted", "unknownFutureValue"}[i] +} +func ParsePrintTaskProcessingState(v string) (interface{}, error) { + result := PENDING_PRINTTASKPROCESSINGSTATE + switch v { + case "pending": + result = PENDING_PRINTTASKPROCESSINGSTATE + case "processing": + result = PROCESSING_PRINTTASKPROCESSINGSTATE + case "completed": + result = COMPLETED_PRINTTASKPROCESSINGSTATE + case "aborted": + result = ABORTED_PRINTTASKPROCESSINGSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTTASKPROCESSINGSTATE + default: + return 0, errors.New("Unknown PrintTaskProcessingState value: " + v) + } + return &result, nil +} +func SerializePrintTaskProcessingState(values []PrintTaskProcessingState) []string { + 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/print_task_status.go b/src/internal/connector/graph/betasdk/models/print_task_status.go new file mode 100644 index 000000000..8c6fc035c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_status.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskStatus +type PrintTaskStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A human-readable description of the current processing state of the printTask. + description *string + // The OdataType property + odataType *string + // The state property + state *PrintTaskProcessingState +} +// NewPrintTaskStatus instantiates a new printTaskStatus and sets the default values. +func NewPrintTaskStatus()(*PrintTaskStatus) { + m := &PrintTaskStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrintTaskStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskStatus(), 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 *PrintTaskStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. A human-readable description of the current processing state of the printTask. +func (m *PrintTaskStatus) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintTaskProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PrintTaskProcessingState)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrintTaskStatus) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *PrintTaskStatus) GetState()(*PrintTaskProcessingState) { + return m.state +} +// Serialize serializes information the current object +func (m *PrintTaskStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *PrintTaskStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. A human-readable description of the current processing state of the printTask. +func (m *PrintTaskStatus) SetDescription(value *string)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrintTaskStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *PrintTaskStatus) SetState(value *PrintTaskProcessingState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_statusable.go b/src/internal/connector/graph/betasdk/models/print_task_statusable.go new file mode 100644 index 000000000..c45c87653 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_statusable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskStatusable +type PrintTaskStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetOdataType()(*string) + GetState()(*PrintTaskProcessingState) + SetDescription(value *string)() + SetOdataType(value *string)() + SetState(value *PrintTaskProcessingState)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_trigger.go b/src/internal/connector/graph/betasdk/models/print_task_trigger.go new file mode 100644 index 000000000..9a70a637d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_trigger.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskTrigger provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintTaskTrigger struct { + Entity + // The definition property + definition PrintTaskDefinitionable + // The event property + event *PrintEvent +} +// NewPrintTaskTrigger instantiates a new printTaskTrigger and sets the default values. +func NewPrintTaskTrigger()(*PrintTaskTrigger) { + m := &PrintTaskTrigger{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintTaskTriggerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskTriggerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskTrigger(), nil +} +// GetDefinition gets the definition property value. The definition property +func (m *PrintTaskTrigger) GetDefinition()(PrintTaskDefinitionable) { + return m.definition +} +// GetEvent gets the event property value. The event property +func (m *PrintTaskTrigger) GetEvent()(*PrintEvent) { + return m.event +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskTrigger) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["definition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintTaskDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefinition(val.(PrintTaskDefinitionable)) + } + return nil + } + res["event"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintEvent) + if err != nil { + return err + } + if val != nil { + m.SetEvent(val.(*PrintEvent)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PrintTaskTrigger) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("definition", m.GetDefinition()) + if err != nil { + return err + } + } + if m.GetEvent() != nil { + cast := (*m.GetEvent()).String() + err = writer.WriteStringValue("event", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDefinition sets the definition property value. The definition property +func (m *PrintTaskTrigger) SetDefinition(value PrintTaskDefinitionable)() { + m.definition = value +} +// SetEvent sets the event property value. The event property +func (m *PrintTaskTrigger) SetEvent(value *PrintEvent)() { + m.event = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_response.go b/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_response.go new file mode 100644 index 000000000..6daf068cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskTriggerCollectionResponse +type PrintTaskTriggerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintTaskTriggerable +} +// NewPrintTaskTriggerCollectionResponse instantiates a new PrintTaskTriggerCollectionResponse and sets the default values. +func NewPrintTaskTriggerCollectionResponse()(*PrintTaskTriggerCollectionResponse) { + m := &PrintTaskTriggerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintTaskTriggerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintTaskTriggerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintTaskTriggerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintTaskTriggerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskTriggerable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskTriggerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintTaskTriggerCollectionResponse) GetValue()([]PrintTaskTriggerable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintTaskTriggerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintTaskTriggerCollectionResponse) SetValue(value []PrintTaskTriggerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_responseable.go new file mode 100644 index 000000000..cdf31f523 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_trigger_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskTriggerCollectionResponseable +type PrintTaskTriggerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintTaskTriggerable) + SetValue(value []PrintTaskTriggerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_task_triggerable.go b/src/internal/connector/graph/betasdk/models/print_task_triggerable.go new file mode 100644 index 000000000..ee48a4f08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_task_triggerable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskTriggerable +type PrintTaskTriggerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefinition()(PrintTaskDefinitionable) + GetEvent()(*PrintEvent) + SetDefinition(value PrintTaskDefinitionable)() + SetEvent(value *PrintEvent)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_taskable.go b/src/internal/connector/graph/betasdk/models/print_taskable.go new file mode 100644 index 000000000..dbae14791 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_taskable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintTaskable +type PrintTaskable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefinition()(PrintTaskDefinitionable) + GetParentUrl()(*string) + GetStatus()(PrintTaskStatusable) + GetTrigger()(PrintTaskTriggerable) + SetDefinition(value PrintTaskDefinitionable)() + SetParentUrl(value *string)() + SetStatus(value PrintTaskStatusable)() + SetTrigger(value PrintTaskTriggerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage.go b/src/internal/connector/graph/betasdk/models/print_usage.go new file mode 100644 index 000000000..3f9da7eaa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage.go @@ -0,0 +1,340 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrintUsage struct { + Entity + // The blackAndWhitePageCount property + blackAndWhitePageCount *int64 + // The colorPageCount property + colorPageCount *int64 + // The completedBlackAndWhiteJobCount property + completedBlackAndWhiteJobCount *int64 + // The completedColorJobCount property + completedColorJobCount *int64 + // The completedJobCount property + completedJobCount *int64 + // The doubleSidedSheetCount property + doubleSidedSheetCount *int64 + // The incompleteJobCount property + incompleteJobCount *int64 + // The mediaSheetCount property + mediaSheetCount *int64 + // The pageCount property + pageCount *int64 + // The singleSidedSheetCount property + singleSidedSheetCount *int64 + // The usageDate property + usageDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewPrintUsage instantiates a new printUsage and sets the default values. +func NewPrintUsage()(*PrintUsage) { + m := &PrintUsage{ + Entity: *NewEntity(), + } + return m +} +// CreatePrintUsageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.printUsageByPrinter": + return NewPrintUsageByPrinter(), nil + case "#microsoft.graph.printUsageByUser": + return NewPrintUsageByUser(), nil + } + } + } + } + return NewPrintUsage(), nil +} +// GetBlackAndWhitePageCount gets the blackAndWhitePageCount property value. The blackAndWhitePageCount property +func (m *PrintUsage) GetBlackAndWhitePageCount()(*int64) { + return m.blackAndWhitePageCount +} +// GetColorPageCount gets the colorPageCount property value. The colorPageCount property +func (m *PrintUsage) GetColorPageCount()(*int64) { + return m.colorPageCount +} +// GetCompletedBlackAndWhiteJobCount gets the completedBlackAndWhiteJobCount property value. The completedBlackAndWhiteJobCount property +func (m *PrintUsage) GetCompletedBlackAndWhiteJobCount()(*int64) { + return m.completedBlackAndWhiteJobCount +} +// GetCompletedColorJobCount gets the completedColorJobCount property value. The completedColorJobCount property +func (m *PrintUsage) GetCompletedColorJobCount()(*int64) { + return m.completedColorJobCount +} +// GetCompletedJobCount gets the completedJobCount property value. The completedJobCount property +func (m *PrintUsage) GetCompletedJobCount()(*int64) { + return m.completedJobCount +} +// GetDoubleSidedSheetCount gets the doubleSidedSheetCount property value. The doubleSidedSheetCount property +func (m *PrintUsage) GetDoubleSidedSheetCount()(*int64) { + return m.doubleSidedSheetCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["blackAndWhitePageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetBlackAndWhitePageCount(val) + } + return nil + } + res["colorPageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetColorPageCount(val) + } + return nil + } + res["completedBlackAndWhiteJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetCompletedBlackAndWhiteJobCount(val) + } + return nil + } + res["completedColorJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetCompletedColorJobCount(val) + } + return nil + } + res["completedJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetCompletedJobCount(val) + } + return nil + } + res["doubleSidedSheetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDoubleSidedSheetCount(val) + } + return nil + } + res["incompleteJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteJobCount(val) + } + return nil + } + res["mediaSheetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetMediaSheetCount(val) + } + return nil + } + res["pageCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetPageCount(val) + } + return nil + } + res["singleSidedSheetCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSingleSidedSheetCount(val) + } + return nil + } + res["usageDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetUsageDate(val) + } + return nil + } + return res +} +// GetIncompleteJobCount gets the incompleteJobCount property value. The incompleteJobCount property +func (m *PrintUsage) GetIncompleteJobCount()(*int64) { + return m.incompleteJobCount +} +// GetMediaSheetCount gets the mediaSheetCount property value. The mediaSheetCount property +func (m *PrintUsage) GetMediaSheetCount()(*int64) { + return m.mediaSheetCount +} +// GetPageCount gets the pageCount property value. The pageCount property +func (m *PrintUsage) GetPageCount()(*int64) { + return m.pageCount +} +// GetSingleSidedSheetCount gets the singleSidedSheetCount property value. The singleSidedSheetCount property +func (m *PrintUsage) GetSingleSidedSheetCount()(*int64) { + return m.singleSidedSheetCount +} +// GetUsageDate gets the usageDate property value. The usageDate property +func (m *PrintUsage) GetUsageDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.usageDate +} +// Serialize serializes information the current object +func (m *PrintUsage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("blackAndWhitePageCount", m.GetBlackAndWhitePageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("colorPageCount", m.GetColorPageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("completedBlackAndWhiteJobCount", m.GetCompletedBlackAndWhiteJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("completedColorJobCount", m.GetCompletedColorJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("completedJobCount", m.GetCompletedJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("doubleSidedSheetCount", m.GetDoubleSidedSheetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("incompleteJobCount", m.GetIncompleteJobCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("mediaSheetCount", m.GetMediaSheetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("pageCount", m.GetPageCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("singleSidedSheetCount", m.GetSingleSidedSheetCount()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("usageDate", m.GetUsageDate()) + if err != nil { + return err + } + } + return nil +} +// SetBlackAndWhitePageCount sets the blackAndWhitePageCount property value. The blackAndWhitePageCount property +func (m *PrintUsage) SetBlackAndWhitePageCount(value *int64)() { + m.blackAndWhitePageCount = value +} +// SetColorPageCount sets the colorPageCount property value. The colorPageCount property +func (m *PrintUsage) SetColorPageCount(value *int64)() { + m.colorPageCount = value +} +// SetCompletedBlackAndWhiteJobCount sets the completedBlackAndWhiteJobCount property value. The completedBlackAndWhiteJobCount property +func (m *PrintUsage) SetCompletedBlackAndWhiteJobCount(value *int64)() { + m.completedBlackAndWhiteJobCount = value +} +// SetCompletedColorJobCount sets the completedColorJobCount property value. The completedColorJobCount property +func (m *PrintUsage) SetCompletedColorJobCount(value *int64)() { + m.completedColorJobCount = value +} +// SetCompletedJobCount sets the completedJobCount property value. The completedJobCount property +func (m *PrintUsage) SetCompletedJobCount(value *int64)() { + m.completedJobCount = value +} +// SetDoubleSidedSheetCount sets the doubleSidedSheetCount property value. The doubleSidedSheetCount property +func (m *PrintUsage) SetDoubleSidedSheetCount(value *int64)() { + m.doubleSidedSheetCount = value +} +// SetIncompleteJobCount sets the incompleteJobCount property value. The incompleteJobCount property +func (m *PrintUsage) SetIncompleteJobCount(value *int64)() { + m.incompleteJobCount = value +} +// SetMediaSheetCount sets the mediaSheetCount property value. The mediaSheetCount property +func (m *PrintUsage) SetMediaSheetCount(value *int64)() { + m.mediaSheetCount = value +} +// SetPageCount sets the pageCount property value. The pageCount property +func (m *PrintUsage) SetPageCount(value *int64)() { + m.pageCount = value +} +// SetSingleSidedSheetCount sets the singleSidedSheetCount property value. The singleSidedSheetCount property +func (m *PrintUsage) SetSingleSidedSheetCount(value *int64)() { + m.singleSidedSheetCount = value +} +// SetUsageDate sets the usageDate property value. The usageDate property +func (m *PrintUsage) SetUsageDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.usageDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_printer.go b/src/internal/connector/graph/betasdk/models/print_usage_by_printer.go new file mode 100644 index 000000000..15270c96d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_printer.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByPrinter +type PrintUsageByPrinter struct { + PrintUsage + // The printerId property + printerId *string +} +// NewPrintUsageByPrinter instantiates a new PrintUsageByPrinter and sets the default values. +func NewPrintUsageByPrinter()(*PrintUsageByPrinter) { + m := &PrintUsageByPrinter{ + PrintUsage: *NewPrintUsage(), + } + return m +} +// CreatePrintUsageByPrinterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageByPrinterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintUsageByPrinter(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsageByPrinter) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrintUsage.GetFieldDeserializers() + res["printerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrinterId(val) + } + return nil + } + return res +} +// GetPrinterId gets the printerId property value. The printerId property +func (m *PrintUsageByPrinter) GetPrinterId()(*string) { + return m.printerId +} +// Serialize serializes information the current object +func (m *PrintUsageByPrinter) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrintUsage.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("printerId", m.GetPrinterId()) + if err != nil { + return err + } + } + return nil +} +// SetPrinterId sets the printerId property value. The printerId property +func (m *PrintUsageByPrinter) SetPrinterId(value *string)() { + m.printerId = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_response.go b/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_response.go new file mode 100644 index 000000000..ad5ab3313 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByPrinterCollectionResponse +type PrintUsageByPrinterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintUsageByPrinterable +} +// NewPrintUsageByPrinterCollectionResponse instantiates a new PrintUsageByPrinterCollectionResponse and sets the default values. +func NewPrintUsageByPrinterCollectionResponse()(*PrintUsageByPrinterCollectionResponse) { + m := &PrintUsageByPrinterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintUsageByPrinterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageByPrinterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintUsageByPrinterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsageByPrinterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByPrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByPrinterable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByPrinterable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintUsageByPrinterCollectionResponse) GetValue()([]PrintUsageByPrinterable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintUsageByPrinterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintUsageByPrinterCollectionResponse) SetValue(value []PrintUsageByPrinterable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_responseable.go new file mode 100644 index 000000000..11401fe41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_printer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByPrinterCollectionResponseable +type PrintUsageByPrinterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintUsageByPrinterable) + SetValue(value []PrintUsageByPrinterable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_printerable.go b/src/internal/connector/graph/betasdk/models/print_usage_by_printerable.go new file mode 100644 index 000000000..b0e1b595a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_printerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByPrinterable +type PrintUsageByPrinterable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrintUsageable + GetPrinterId()(*string) + SetPrinterId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_user.go b/src/internal/connector/graph/betasdk/models/print_usage_by_user.go new file mode 100644 index 000000000..25d2b89ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_user.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByUser +type PrintUsageByUser struct { + PrintUsage + // The UPN of the user represented by these statistics. + userPrincipalName *string +} +// NewPrintUsageByUser instantiates a new PrintUsageByUser and sets the default values. +func NewPrintUsageByUser()(*PrintUsageByUser) { + m := &PrintUsageByUser{ + PrintUsage: *NewPrintUsage(), + } + return m +} +// CreatePrintUsageByUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageByUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintUsageByUser(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsageByUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrintUsage.GetFieldDeserializers() + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetUserPrincipalName gets the userPrincipalName property value. The UPN of the user represented by these statistics. +func (m *PrintUsageByUser) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *PrintUsageByUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrintUsage.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetUserPrincipalName sets the userPrincipalName property value. The UPN of the user represented by these statistics. +func (m *PrintUsageByUser) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_response.go b/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_response.go new file mode 100644 index 000000000..039cc6a17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByUserCollectionResponse +type PrintUsageByUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintUsageByUserable +} +// NewPrintUsageByUserCollectionResponse instantiates a new PrintUsageByUserCollectionResponse and sets the default values. +func NewPrintUsageByUserCollectionResponse()(*PrintUsageByUserCollectionResponse) { + m := &PrintUsageByUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintUsageByUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageByUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintUsageByUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsageByUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByUserable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintUsageByUserCollectionResponse) GetValue()([]PrintUsageByUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintUsageByUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintUsageByUserCollectionResponse) SetValue(value []PrintUsageByUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_responseable.go new file mode 100644 index 000000000..3e082bcaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByUserCollectionResponseable +type PrintUsageByUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintUsageByUserable) + SetValue(value []PrintUsageByUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_by_userable.go b/src/internal/connector/graph/betasdk/models/print_usage_by_userable.go new file mode 100644 index 000000000..f96a5c7f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_by_userable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageByUserable +type PrintUsageByUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrintUsageable + GetUserPrincipalName()(*string) + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_collection_response.go b/src/internal/connector/graph/betasdk/models/print_usage_collection_response.go new file mode 100644 index 000000000..e076a437d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageCollectionResponse +type PrintUsageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrintUsageable +} +// NewPrintUsageCollectionResponse instantiates a new PrintUsageCollectionResponse and sets the default values. +func NewPrintUsageCollectionResponse()(*PrintUsageCollectionResponse) { + m := &PrintUsageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrintUsageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrintUsageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrintUsageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrintUsageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrintUsageCollectionResponse) GetValue()([]PrintUsageable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrintUsageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrintUsageCollectionResponse) SetValue(value []PrintUsageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/print_usage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/print_usage_collection_responseable.go new file mode 100644 index 000000000..d86b59476 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usage_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageCollectionResponseable +type PrintUsageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrintUsageable) + SetValue(value []PrintUsageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/print_usageable.go b/src/internal/connector/graph/betasdk/models/print_usageable.go new file mode 100644 index 000000000..178f11c69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/print_usageable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrintUsageable +type PrintUsageable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBlackAndWhitePageCount()(*int64) + GetColorPageCount()(*int64) + GetCompletedBlackAndWhiteJobCount()(*int64) + GetCompletedColorJobCount()(*int64) + GetCompletedJobCount()(*int64) + GetDoubleSidedSheetCount()(*int64) + GetIncompleteJobCount()(*int64) + GetMediaSheetCount()(*int64) + GetPageCount()(*int64) + GetSingleSidedSheetCount()(*int64) + GetUsageDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetBlackAndWhitePageCount(value *int64)() + SetColorPageCount(value *int64)() + SetCompletedBlackAndWhiteJobCount(value *int64)() + SetCompletedColorJobCount(value *int64)() + SetCompletedJobCount(value *int64)() + SetDoubleSidedSheetCount(value *int64)() + SetIncompleteJobCount(value *int64)() + SetMediaSheetCount(value *int64)() + SetPageCount(value *int64)() + SetSingleSidedSheetCount(value *int64)() + SetUsageDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer.go b/src/internal/connector/graph/betasdk/models/printer.go new file mode 100644 index 000000000..c70fe8e71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer.go @@ -0,0 +1,295 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Printer +type Printer struct { + PrinterBase + // The acceptingJobs property + acceptingJobs *bool + // The connectors that are associated with the printer. + connectors []PrintConnectorable + // True if the printer has a physical device for printing. Read-only. + hasPhysicalDevice *bool + // True if the printer is shared; false otherwise. Read-only. + isShared *bool + // The most recent dateTimeOffset when a printer interacted with Universal Print. Read-only. + lastSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The DateTimeOffset when the printer was registered. Read-only. + registeredDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The share property + share PrinterShareable + // The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable. + shares []PrinterShareable + // A list of task triggers that are associated with the printer. + taskTriggers []PrintTaskTriggerable +} +// NewPrinter instantiates a new printer and sets the default values. +func NewPrinter()(*Printer) { + m := &Printer{ + PrinterBase: *NewPrinterBase(), + } + odataTypeValue := "#microsoft.graph.printer"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrinterFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinter(), nil +} +// GetAcceptingJobs gets the acceptingJobs property value. The acceptingJobs property +func (m *Printer) GetAcceptingJobs()(*bool) { + return m.acceptingJobs +} +// GetConnectors gets the connectors property value. The connectors that are associated with the printer. +func (m *Printer) GetConnectors()([]PrintConnectorable) { + return m.connectors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Printer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrinterBase.GetFieldDeserializers() + res["acceptingJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAcceptingJobs(val) + } + return nil + } + res["connectors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintConnectorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintConnectorable, len(val)) + for i, v := range val { + res[i] = v.(PrintConnectorable) + } + m.SetConnectors(res) + } + return nil + } + res["hasPhysicalDevice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasPhysicalDevice(val) + } + return nil + } + res["isShared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsShared(val) + } + return nil + } + res["lastSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastSeenDateTime(val) + } + return nil + } + res["registeredDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRegisteredDateTime(val) + } + return nil + } + res["share"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterShareFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShare(val.(PrinterShareable)) + } + return nil + } + res["shares"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrinterShareFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterShareable, len(val)) + for i, v := range val { + res[i] = v.(PrinterShareable) + } + m.SetShares(res) + } + return nil + } + res["taskTriggers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintTaskTriggerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintTaskTriggerable, len(val)) + for i, v := range val { + res[i] = v.(PrintTaskTriggerable) + } + m.SetTaskTriggers(res) + } + return nil + } + return res +} +// GetHasPhysicalDevice gets the hasPhysicalDevice property value. True if the printer has a physical device for printing. Read-only. +func (m *Printer) GetHasPhysicalDevice()(*bool) { + return m.hasPhysicalDevice +} +// GetIsShared gets the isShared property value. True if the printer is shared; false otherwise. Read-only. +func (m *Printer) GetIsShared()(*bool) { + return m.isShared +} +// GetLastSeenDateTime gets the lastSeenDateTime property value. The most recent dateTimeOffset when a printer interacted with Universal Print. Read-only. +func (m *Printer) GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastSeenDateTime +} +// GetRegisteredDateTime gets the registeredDateTime property value. The DateTimeOffset when the printer was registered. Read-only. +func (m *Printer) GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.registeredDateTime +} +// GetShare gets the share property value. The share property +func (m *Printer) GetShare()(PrinterShareable) { + return m.share +} +// GetShares gets the shares property value. The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable. +func (m *Printer) GetShares()([]PrinterShareable) { + return m.shares +} +// GetTaskTriggers gets the taskTriggers property value. A list of task triggers that are associated with the printer. +func (m *Printer) GetTaskTriggers()([]PrintTaskTriggerable) { + return m.taskTriggers +} +// Serialize serializes information the current object +func (m *Printer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrinterBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("acceptingJobs", m.GetAcceptingJobs()) + if err != nil { + return err + } + } + if m.GetConnectors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConnectors())) + for i, v := range m.GetConnectors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("connectors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasPhysicalDevice", m.GetHasPhysicalDevice()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isShared", m.GetIsShared()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastSeenDateTime", m.GetLastSeenDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("registeredDateTime", m.GetRegisteredDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("share", m.GetShare()) + if err != nil { + return err + } + } + if m.GetShares() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetShares())) + for i, v := range m.GetShares() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("shares", cast) + if err != nil { + return err + } + } + if m.GetTaskTriggers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTaskTriggers())) + for i, v := range m.GetTaskTriggers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("taskTriggers", cast) + if err != nil { + return err + } + } + return nil +} +// SetAcceptingJobs sets the acceptingJobs property value. The acceptingJobs property +func (m *Printer) SetAcceptingJobs(value *bool)() { + m.acceptingJobs = value +} +// SetConnectors sets the connectors property value. The connectors that are associated with the printer. +func (m *Printer) SetConnectors(value []PrintConnectorable)() { + m.connectors = value +} +// SetHasPhysicalDevice sets the hasPhysicalDevice property value. True if the printer has a physical device for printing. Read-only. +func (m *Printer) SetHasPhysicalDevice(value *bool)() { + m.hasPhysicalDevice = value +} +// SetIsShared sets the isShared property value. True if the printer is shared; false otherwise. Read-only. +func (m *Printer) SetIsShared(value *bool)() { + m.isShared = value +} +// SetLastSeenDateTime sets the lastSeenDateTime property value. The most recent dateTimeOffset when a printer interacted with Universal Print. Read-only. +func (m *Printer) SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastSeenDateTime = value +} +// SetRegisteredDateTime sets the registeredDateTime property value. The DateTimeOffset when the printer was registered. Read-only. +func (m *Printer) SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.registeredDateTime = value +} +// SetShare sets the share property value. The share property +func (m *Printer) SetShare(value PrinterShareable)() { + m.share = value +} +// SetShares sets the shares property value. The list of printerShares that are associated with the printer. Currently, only one printerShare can be associated with the printer. Read-only. Nullable. +func (m *Printer) SetShares(value []PrinterShareable)() { + m.shares = value +} +// SetTaskTriggers sets the taskTriggers property value. A list of task triggers that are associated with the printer. +func (m *Printer) SetTaskTriggers(value []PrintTaskTriggerable)() { + m.taskTriggers = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_base.go b/src/internal/connector/graph/betasdk/models/printer_base.go new file mode 100644 index 000000000..5982b7db4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_base.go @@ -0,0 +1,322 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterBase struct { + Entity + // The capabilities property + capabilities PrinterCapabilitiesable + // The defaults property + defaults PrinterDefaultsable + // The displayName property + displayName *string + // The isAcceptingJobs property + isAcceptingJobs *bool + // The jobs property + jobs []PrintJobable + // The location property + location PrinterLocationable + // The manufacturer property + manufacturer *string + // The model property + model *string + // The name property + name *string + // The status property + status PrinterStatusable +} +// NewPrinterBase instantiates a new printerBase and sets the default values. +func NewPrinterBase()(*PrinterBase) { + m := &PrinterBase{ + Entity: *NewEntity(), + } + return m +} +// CreatePrinterBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.printer": + return NewPrinter(), nil + case "#microsoft.graph.printerShare": + return NewPrinterShare(), nil + } + } + } + } + return NewPrinterBase(), nil +} +// GetCapabilities gets the capabilities property value. The capabilities property +func (m *PrinterBase) GetCapabilities()(PrinterCapabilitiesable) { + return m.capabilities +} +// GetDefaults gets the defaults property value. The defaults property +func (m *PrinterBase) GetDefaults()(PrinterDefaultsable) { + return m.defaults +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PrinterBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["capabilities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterCapabilitiesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCapabilities(val.(PrinterCapabilitiesable)) + } + return nil + } + res["defaults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterDefaultsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaults(val.(PrinterDefaultsable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isAcceptingJobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAcceptingJobs(val) + } + return nil + } + res["jobs"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintJobFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintJobable, len(val)) + for i, v := range val { + res[i] = v.(PrintJobable) + } + m.SetJobs(res) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(PrinterLocationable)) + } + return nil + } + res["manufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManufacturer(val) + } + return nil + } + res["model"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetModel(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(PrinterStatusable)) + } + return nil + } + return res +} +// GetIsAcceptingJobs gets the isAcceptingJobs property value. The isAcceptingJobs property +func (m *PrinterBase) GetIsAcceptingJobs()(*bool) { + return m.isAcceptingJobs +} +// GetJobs gets the jobs property value. The jobs property +func (m *PrinterBase) GetJobs()([]PrintJobable) { + return m.jobs +} +// GetLocation gets the location property value. The location property +func (m *PrinterBase) GetLocation()(PrinterLocationable) { + return m.location +} +// GetManufacturer gets the manufacturer property value. The manufacturer property +func (m *PrinterBase) GetManufacturer()(*string) { + return m.manufacturer +} +// GetModel gets the model property value. The model property +func (m *PrinterBase) GetModel()(*string) { + return m.model +} +// GetName gets the name property value. The name property +func (m *PrinterBase) GetName()(*string) { + return m.name +} +// GetStatus gets the status property value. The status property +func (m *PrinterBase) GetStatus()(PrinterStatusable) { + return m.status +} +// Serialize serializes information the current object +func (m *PrinterBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("capabilities", m.GetCapabilities()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaults", m.GetDefaults()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAcceptingJobs", m.GetIsAcceptingJobs()) + if err != nil { + return err + } + } + if m.GetJobs() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetJobs())) + for i, v := range m.GetJobs() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("jobs", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("manufacturer", m.GetManufacturer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("model", m.GetModel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetCapabilities sets the capabilities property value. The capabilities property +func (m *PrinterBase) SetCapabilities(value PrinterCapabilitiesable)() { + m.capabilities = value +} +// SetDefaults sets the defaults property value. The defaults property +func (m *PrinterBase) SetDefaults(value PrinterDefaultsable)() { + m.defaults = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PrinterBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsAcceptingJobs sets the isAcceptingJobs property value. The isAcceptingJobs property +func (m *PrinterBase) SetIsAcceptingJobs(value *bool)() { + m.isAcceptingJobs = value +} +// SetJobs sets the jobs property value. The jobs property +func (m *PrinterBase) SetJobs(value []PrintJobable)() { + m.jobs = value +} +// SetLocation sets the location property value. The location property +func (m *PrinterBase) SetLocation(value PrinterLocationable)() { + m.location = value +} +// SetManufacturer sets the manufacturer property value. The manufacturer property +func (m *PrinterBase) SetManufacturer(value *string)() { + m.manufacturer = value +} +// SetModel sets the model property value. The model property +func (m *PrinterBase) SetModel(value *string)() { + m.model = value +} +// SetName sets the name property value. The name property +func (m *PrinterBase) SetName(value *string)() { + m.name = value +} +// SetStatus sets the status property value. The status property +func (m *PrinterBase) SetStatus(value PrinterStatusable)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_baseable.go b/src/internal/connector/graph/betasdk/models/printer_baseable.go new file mode 100644 index 000000000..281a7b0e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_baseable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterBaseable +type PrinterBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCapabilities()(PrinterCapabilitiesable) + GetDefaults()(PrinterDefaultsable) + GetDisplayName()(*string) + GetIsAcceptingJobs()(*bool) + GetJobs()([]PrintJobable) + GetLocation()(PrinterLocationable) + GetManufacturer()(*string) + GetModel()(*string) + GetName()(*string) + GetStatus()(PrinterStatusable) + SetCapabilities(value PrinterCapabilitiesable)() + SetDefaults(value PrinterDefaultsable)() + SetDisplayName(value *string)() + SetIsAcceptingJobs(value *bool)() + SetJobs(value []PrintJobable)() + SetLocation(value PrinterLocationable)() + SetManufacturer(value *string)() + SetModel(value *string)() + SetName(value *string)() + SetStatus(value PrinterStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_capabilities.go b/src/internal/connector/graph/betasdk/models/printer_capabilities.go new file mode 100644 index 000000000..621d6ed14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_capabilities.go @@ -0,0 +1,1213 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCapabilities +type PrinterCapabilities struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A list of supported bottom margins(in microns) for the printer. + bottomMargins []int32 + // True if the printer supports collating when printing muliple copies of a multi-page document; false otherwise. + collation *bool + // The color modes supported by the printer. Valid values are described in the following table. + colorModes []PrintColorMode + // A list of supported content (MIME) types that the printer supports. It is not guaranteed that the Universal Print service supports printing all of these MIME types. + contentTypes []string + // The range of copies per job supported by the printer. + copiesPerJob IntegerRangeable + // The list of print resolutions in DPI that are supported by the printer. + dpis []int32 + // The list of duplex modes that are supported by the printer. Valid values are described in the following table. + duplexModes []PrintDuplexMode + // The feedDirections property + feedDirections []PrinterFeedDirection + // The list of feed orientations that are supported by the printer. + feedOrientations []PrinterFeedOrientation + // Finishing processes the printer supports for a printed document. + finishings []PrintFinishing + // Supported input bins for the printer. + inputBins []string + // True if color printing is supported by the printer; false otherwise. Read-only. + isColorPrintingSupported *bool + // True if the printer supports printing by page ranges; false otherwise. + isPageRangeSupported *bool + // A list of supported left margins(in microns) for the printer. + leftMargins []int32 + // The media (i.e., paper) colors supported by the printer. + mediaColors []string + // The media sizes supported by the printer. Supports standard size names for ISO and ANSI media sizes. Valid values are in the following table. + mediaSizes []string + // The media types supported by the printer. + mediaTypes []string + // The presentation directions supported by the printer. Supported values are described in the following table. + multipageLayouts []PrintMultipageLayout + // The OdataType property + odataType *string + // The print orientations supported by the printer. Valid values are described in the following table. + orientations []PrintOrientation + // The printer's supported output bins (trays). + outputBins []string + // Supported number of Input Pages to impose upon a single Impression. + pagesPerSheet []int32 + // The print qualities supported by the printer. + qualities []PrintQuality + // A list of supported right margins(in microns) for the printer. + rightMargins []int32 + // Supported print scalings. + scalings []PrintScaling + // The supportedColorConfigurations property + supportedColorConfigurations []PrintColorConfiguration + // The supportedCopiesPerJob property + supportedCopiesPerJob IntegerRangeable + // The supportedDocumentMimeTypes property + supportedDocumentMimeTypes []string + // The supportedDuplexConfigurations property + supportedDuplexConfigurations []PrintDuplexConfiguration + // The supportedFinishings property + supportedFinishings []PrintFinishing + // The supportedMediaColors property + supportedMediaColors []string + // The supportedMediaSizes property + supportedMediaSizes []string + // The supportedMediaTypes property + supportedMediaTypes []PrintMediaType + // The supportedOrientations property + supportedOrientations []PrintOrientation + // The supportedOutputBins property + supportedOutputBins []string + // The supportedPagesPerSheet property + supportedPagesPerSheet IntegerRangeable + // The supportedPresentationDirections property + supportedPresentationDirections []PrintPresentationDirection + // The supportedPrintQualities property + supportedPrintQualities []PrintQuality + // True if the printer supports scaling PDF pages to match the print media size; false otherwise. + supportsFitPdfToPage *bool + // A list of supported top margins(in microns) for the printer. + topMargins []int32 +} +// NewPrinterCapabilities instantiates a new printerCapabilities and sets the default values. +func NewPrinterCapabilities()(*PrinterCapabilities) { + m := &PrinterCapabilities{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterCapabilitiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterCapabilitiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterCapabilities(), 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 *PrinterCapabilities) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBottomMargins gets the bottomMargins property value. A list of supported bottom margins(in microns) for the printer. +func (m *PrinterCapabilities) GetBottomMargins()([]int32) { + return m.bottomMargins +} +// GetCollation gets the collation property value. True if the printer supports collating when printing muliple copies of a multi-page document; false otherwise. +func (m *PrinterCapabilities) GetCollation()(*bool) { + return m.collation +} +// GetColorModes gets the colorModes property value. The color modes supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) GetColorModes()([]PrintColorMode) { + return m.colorModes +} +// GetContentTypes gets the contentTypes property value. A list of supported content (MIME) types that the printer supports. It is not guaranteed that the Universal Print service supports printing all of these MIME types. +func (m *PrinterCapabilities) GetContentTypes()([]string) { + return m.contentTypes +} +// GetCopiesPerJob gets the copiesPerJob property value. The range of copies per job supported by the printer. +func (m *PrinterCapabilities) GetCopiesPerJob()(IntegerRangeable) { + return m.copiesPerJob +} +// GetDpis gets the dpis property value. The list of print resolutions in DPI that are supported by the printer. +func (m *PrinterCapabilities) GetDpis()([]int32) { + return m.dpis +} +// GetDuplexModes gets the duplexModes property value. The list of duplex modes that are supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) GetDuplexModes()([]PrintDuplexMode) { + return m.duplexModes +} +// GetFeedDirections gets the feedDirections property value. The feedDirections property +func (m *PrinterCapabilities) GetFeedDirections()([]PrinterFeedDirection) { + return m.feedDirections +} +// GetFeedOrientations gets the feedOrientations property value. The list of feed orientations that are supported by the printer. +func (m *PrinterCapabilities) GetFeedOrientations()([]PrinterFeedOrientation) { + return m.feedOrientations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterCapabilities) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["bottomMargins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetBottomMargins(res) + } + return nil + } + res["collation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCollation(val) + } + return nil + } + res["colorModes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintColorMode) + if err != nil { + return err + } + if val != nil { + res := make([]PrintColorMode, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintColorMode)) + } + m.SetColorModes(res) + } + return nil + } + res["contentTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetContentTypes(res) + } + return nil + } + res["copiesPerJob"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCopiesPerJob(val.(IntegerRangeable)) + } + return nil + } + res["dpis"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetDpis(res) + } + return nil + } + res["duplexModes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintDuplexMode) + if err != nil { + return err + } + if val != nil { + res := make([]PrintDuplexMode, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintDuplexMode)) + } + m.SetDuplexModes(res) + } + return nil + } + res["feedDirections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrinterFeedDirection) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterFeedDirection, len(val)) + for i, v := range val { + res[i] = *(v.(*PrinterFeedDirection)) + } + m.SetFeedDirections(res) + } + return nil + } + res["feedOrientations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrinterFeedOrientation) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterFeedOrientation, len(val)) + for i, v := range val { + res[i] = *(v.(*PrinterFeedOrientation)) + } + m.SetFeedOrientations(res) + } + return nil + } + res["finishings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintFinishing) + if err != nil { + return err + } + if val != nil { + res := make([]PrintFinishing, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintFinishing)) + } + m.SetFinishings(res) + } + return nil + } + res["inputBins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetInputBins(res) + } + return nil + } + res["isColorPrintingSupported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsColorPrintingSupported(val) + } + return nil + } + res["isPageRangeSupported"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPageRangeSupported(val) + } + return nil + } + res["leftMargins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetLeftMargins(res) + } + return nil + } + res["mediaColors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMediaColors(res) + } + return nil + } + res["mediaSizes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMediaSizes(res) + } + return nil + } + res["mediaTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMediaTypes(res) + } + return nil + } + res["multipageLayouts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintMultipageLayout) + if err != nil { + return err + } + if val != nil { + res := make([]PrintMultipageLayout, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintMultipageLayout)) + } + m.SetMultipageLayouts(res) + } + 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["orientations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintOrientation) + if err != nil { + return err + } + if val != nil { + res := make([]PrintOrientation, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintOrientation)) + } + m.SetOrientations(res) + } + return nil + } + res["outputBins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOutputBins(res) + } + return nil + } + res["pagesPerSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetPagesPerSheet(res) + } + return nil + } + res["qualities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + res := make([]PrintQuality, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintQuality)) + } + m.SetQualities(res) + } + return nil + } + res["rightMargins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetRightMargins(res) + } + return nil + } + res["scalings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintScaling) + if err != nil { + return err + } + if val != nil { + res := make([]PrintScaling, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintScaling)) + } + m.SetScalings(res) + } + return nil + } + res["supportedColorConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintColorConfiguration) + if err != nil { + return err + } + if val != nil { + res := make([]PrintColorConfiguration, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintColorConfiguration)) + } + m.SetSupportedColorConfigurations(res) + } + return nil + } + res["supportedCopiesPerJob"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSupportedCopiesPerJob(val.(IntegerRangeable)) + } + return nil + } + res["supportedDocumentMimeTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedDocumentMimeTypes(res) + } + return nil + } + res["supportedDuplexConfigurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintDuplexConfiguration) + if err != nil { + return err + } + if val != nil { + res := make([]PrintDuplexConfiguration, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintDuplexConfiguration)) + } + m.SetSupportedDuplexConfigurations(res) + } + return nil + } + res["supportedFinishings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintFinishing) + if err != nil { + return err + } + if val != nil { + res := make([]PrintFinishing, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintFinishing)) + } + m.SetSupportedFinishings(res) + } + return nil + } + res["supportedMediaColors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedMediaColors(res) + } + return nil + } + res["supportedMediaSizes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedMediaSizes(res) + } + return nil + } + res["supportedMediaTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintMediaType) + if err != nil { + return err + } + if val != nil { + res := make([]PrintMediaType, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintMediaType)) + } + m.SetSupportedMediaTypes(res) + } + return nil + } + res["supportedOrientations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintOrientation) + if err != nil { + return err + } + if val != nil { + res := make([]PrintOrientation, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintOrientation)) + } + m.SetSupportedOrientations(res) + } + return nil + } + res["supportedOutputBins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSupportedOutputBins(res) + } + return nil + } + res["supportedPagesPerSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSupportedPagesPerSheet(val.(IntegerRangeable)) + } + return nil + } + res["supportedPresentationDirections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintPresentationDirection) + if err != nil { + return err + } + if val != nil { + res := make([]PrintPresentationDirection, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintPresentationDirection)) + } + m.SetSupportedPresentationDirections(res) + } + return nil + } + res["supportedPrintQualities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + res := make([]PrintQuality, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintQuality)) + } + m.SetSupportedPrintQualities(res) + } + return nil + } + res["supportsFitPdfToPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSupportsFitPdfToPage(val) + } + return nil + } + res["topMargins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("int32") + if err != nil { + return err + } + if val != nil { + res := make([]int32, len(val)) + for i, v := range val { + res[i] = *(v.(*int32)) + } + m.SetTopMargins(res) + } + return nil + } + return res +} +// GetFinishings gets the finishings property value. Finishing processes the printer supports for a printed document. +func (m *PrinterCapabilities) GetFinishings()([]PrintFinishing) { + return m.finishings +} +// GetInputBins gets the inputBins property value. Supported input bins for the printer. +func (m *PrinterCapabilities) GetInputBins()([]string) { + return m.inputBins +} +// GetIsColorPrintingSupported gets the isColorPrintingSupported property value. True if color printing is supported by the printer; false otherwise. Read-only. +func (m *PrinterCapabilities) GetIsColorPrintingSupported()(*bool) { + return m.isColorPrintingSupported +} +// GetIsPageRangeSupported gets the isPageRangeSupported property value. True if the printer supports printing by page ranges; false otherwise. +func (m *PrinterCapabilities) GetIsPageRangeSupported()(*bool) { + return m.isPageRangeSupported +} +// GetLeftMargins gets the leftMargins property value. A list of supported left margins(in microns) for the printer. +func (m *PrinterCapabilities) GetLeftMargins()([]int32) { + return m.leftMargins +} +// GetMediaColors gets the mediaColors property value. The media (i.e., paper) colors supported by the printer. +func (m *PrinterCapabilities) GetMediaColors()([]string) { + return m.mediaColors +} +// GetMediaSizes gets the mediaSizes property value. The media sizes supported by the printer. Supports standard size names for ISO and ANSI media sizes. Valid values are in the following table. +func (m *PrinterCapabilities) GetMediaSizes()([]string) { + return m.mediaSizes +} +// GetMediaTypes gets the mediaTypes property value. The media types supported by the printer. +func (m *PrinterCapabilities) GetMediaTypes()([]string) { + return m.mediaTypes +} +// GetMultipageLayouts gets the multipageLayouts property value. The presentation directions supported by the printer. Supported values are described in the following table. +func (m *PrinterCapabilities) GetMultipageLayouts()([]PrintMultipageLayout) { + return m.multipageLayouts +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterCapabilities) GetOdataType()(*string) { + return m.odataType +} +// GetOrientations gets the orientations property value. The print orientations supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) GetOrientations()([]PrintOrientation) { + return m.orientations +} +// GetOutputBins gets the outputBins property value. The printer's supported output bins (trays). +func (m *PrinterCapabilities) GetOutputBins()([]string) { + return m.outputBins +} +// GetPagesPerSheet gets the pagesPerSheet property value. Supported number of Input Pages to impose upon a single Impression. +func (m *PrinterCapabilities) GetPagesPerSheet()([]int32) { + return m.pagesPerSheet +} +// GetQualities gets the qualities property value. The print qualities supported by the printer. +func (m *PrinterCapabilities) GetQualities()([]PrintQuality) { + return m.qualities +} +// GetRightMargins gets the rightMargins property value. A list of supported right margins(in microns) for the printer. +func (m *PrinterCapabilities) GetRightMargins()([]int32) { + return m.rightMargins +} +// GetScalings gets the scalings property value. Supported print scalings. +func (m *PrinterCapabilities) GetScalings()([]PrintScaling) { + return m.scalings +} +// GetSupportedColorConfigurations gets the supportedColorConfigurations property value. The supportedColorConfigurations property +func (m *PrinterCapabilities) GetSupportedColorConfigurations()([]PrintColorConfiguration) { + return m.supportedColorConfigurations +} +// GetSupportedCopiesPerJob gets the supportedCopiesPerJob property value. The supportedCopiesPerJob property +func (m *PrinterCapabilities) GetSupportedCopiesPerJob()(IntegerRangeable) { + return m.supportedCopiesPerJob +} +// GetSupportedDocumentMimeTypes gets the supportedDocumentMimeTypes property value. The supportedDocumentMimeTypes property +func (m *PrinterCapabilities) GetSupportedDocumentMimeTypes()([]string) { + return m.supportedDocumentMimeTypes +} +// GetSupportedDuplexConfigurations gets the supportedDuplexConfigurations property value. The supportedDuplexConfigurations property +func (m *PrinterCapabilities) GetSupportedDuplexConfigurations()([]PrintDuplexConfiguration) { + return m.supportedDuplexConfigurations +} +// GetSupportedFinishings gets the supportedFinishings property value. The supportedFinishings property +func (m *PrinterCapabilities) GetSupportedFinishings()([]PrintFinishing) { + return m.supportedFinishings +} +// GetSupportedMediaColors gets the supportedMediaColors property value. The supportedMediaColors property +func (m *PrinterCapabilities) GetSupportedMediaColors()([]string) { + return m.supportedMediaColors +} +// GetSupportedMediaSizes gets the supportedMediaSizes property value. The supportedMediaSizes property +func (m *PrinterCapabilities) GetSupportedMediaSizes()([]string) { + return m.supportedMediaSizes +} +// GetSupportedMediaTypes gets the supportedMediaTypes property value. The supportedMediaTypes property +func (m *PrinterCapabilities) GetSupportedMediaTypes()([]PrintMediaType) { + return m.supportedMediaTypes +} +// GetSupportedOrientations gets the supportedOrientations property value. The supportedOrientations property +func (m *PrinterCapabilities) GetSupportedOrientations()([]PrintOrientation) { + return m.supportedOrientations +} +// GetSupportedOutputBins gets the supportedOutputBins property value. The supportedOutputBins property +func (m *PrinterCapabilities) GetSupportedOutputBins()([]string) { + return m.supportedOutputBins +} +// GetSupportedPagesPerSheet gets the supportedPagesPerSheet property value. The supportedPagesPerSheet property +func (m *PrinterCapabilities) GetSupportedPagesPerSheet()(IntegerRangeable) { + return m.supportedPagesPerSheet +} +// GetSupportedPresentationDirections gets the supportedPresentationDirections property value. The supportedPresentationDirections property +func (m *PrinterCapabilities) GetSupportedPresentationDirections()([]PrintPresentationDirection) { + return m.supportedPresentationDirections +} +// GetSupportedPrintQualities gets the supportedPrintQualities property value. The supportedPrintQualities property +func (m *PrinterCapabilities) GetSupportedPrintQualities()([]PrintQuality) { + return m.supportedPrintQualities +} +// GetSupportsFitPdfToPage gets the supportsFitPdfToPage property value. True if the printer supports scaling PDF pages to match the print media size; false otherwise. +func (m *PrinterCapabilities) GetSupportsFitPdfToPage()(*bool) { + return m.supportsFitPdfToPage +} +// GetTopMargins gets the topMargins property value. A list of supported top margins(in microns) for the printer. +func (m *PrinterCapabilities) GetTopMargins()([]int32) { + return m.topMargins +} +// Serialize serializes information the current object +func (m *PrinterCapabilities) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBottomMargins() != nil { + err := writer.WriteCollectionOfInt32Values("bottomMargins", m.GetBottomMargins()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("collation", m.GetCollation()) + if err != nil { + return err + } + } + if m.GetColorModes() != nil { + err := writer.WriteCollectionOfStringValues("colorModes", SerializePrintColorMode(m.GetColorModes())) + if err != nil { + return err + } + } + if m.GetContentTypes() != nil { + err := writer.WriteCollectionOfStringValues("contentTypes", m.GetContentTypes()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("copiesPerJob", m.GetCopiesPerJob()) + if err != nil { + return err + } + } + if m.GetDpis() != nil { + err := writer.WriteCollectionOfInt32Values("dpis", m.GetDpis()) + if err != nil { + return err + } + } + if m.GetDuplexModes() != nil { + err := writer.WriteCollectionOfStringValues("duplexModes", SerializePrintDuplexMode(m.GetDuplexModes())) + if err != nil { + return err + } + } + if m.GetFeedDirections() != nil { + err := writer.WriteCollectionOfStringValues("feedDirections", SerializePrinterFeedDirection(m.GetFeedDirections())) + if err != nil { + return err + } + } + if m.GetFeedOrientations() != nil { + err := writer.WriteCollectionOfStringValues("feedOrientations", SerializePrinterFeedOrientation(m.GetFeedOrientations())) + if err != nil { + return err + } + } + if m.GetFinishings() != nil { + err := writer.WriteCollectionOfStringValues("finishings", SerializePrintFinishing(m.GetFinishings())) + if err != nil { + return err + } + } + if m.GetInputBins() != nil { + err := writer.WriteCollectionOfStringValues("inputBins", m.GetInputBins()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isColorPrintingSupported", m.GetIsColorPrintingSupported()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPageRangeSupported", m.GetIsPageRangeSupported()) + if err != nil { + return err + } + } + if m.GetLeftMargins() != nil { + err := writer.WriteCollectionOfInt32Values("leftMargins", m.GetLeftMargins()) + if err != nil { + return err + } + } + if m.GetMediaColors() != nil { + err := writer.WriteCollectionOfStringValues("mediaColors", m.GetMediaColors()) + if err != nil { + return err + } + } + if m.GetMediaSizes() != nil { + err := writer.WriteCollectionOfStringValues("mediaSizes", m.GetMediaSizes()) + if err != nil { + return err + } + } + if m.GetMediaTypes() != nil { + err := writer.WriteCollectionOfStringValues("mediaTypes", m.GetMediaTypes()) + if err != nil { + return err + } + } + if m.GetMultipageLayouts() != nil { + err := writer.WriteCollectionOfStringValues("multipageLayouts", SerializePrintMultipageLayout(m.GetMultipageLayouts())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOrientations() != nil { + err := writer.WriteCollectionOfStringValues("orientations", SerializePrintOrientation(m.GetOrientations())) + if err != nil { + return err + } + } + if m.GetOutputBins() != nil { + err := writer.WriteCollectionOfStringValues("outputBins", m.GetOutputBins()) + if err != nil { + return err + } + } + if m.GetPagesPerSheet() != nil { + err := writer.WriteCollectionOfInt32Values("pagesPerSheet", m.GetPagesPerSheet()) + if err != nil { + return err + } + } + if m.GetQualities() != nil { + err := writer.WriteCollectionOfStringValues("qualities", SerializePrintQuality(m.GetQualities())) + if err != nil { + return err + } + } + if m.GetRightMargins() != nil { + err := writer.WriteCollectionOfInt32Values("rightMargins", m.GetRightMargins()) + if err != nil { + return err + } + } + if m.GetScalings() != nil { + err := writer.WriteCollectionOfStringValues("scalings", SerializePrintScaling(m.GetScalings())) + if err != nil { + return err + } + } + if m.GetSupportedColorConfigurations() != nil { + err := writer.WriteCollectionOfStringValues("supportedColorConfigurations", SerializePrintColorConfiguration(m.GetSupportedColorConfigurations())) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("supportedCopiesPerJob", m.GetSupportedCopiesPerJob()) + if err != nil { + return err + } + } + if m.GetSupportedDocumentMimeTypes() != nil { + err := writer.WriteCollectionOfStringValues("supportedDocumentMimeTypes", m.GetSupportedDocumentMimeTypes()) + if err != nil { + return err + } + } + if m.GetSupportedDuplexConfigurations() != nil { + err := writer.WriteCollectionOfStringValues("supportedDuplexConfigurations", SerializePrintDuplexConfiguration(m.GetSupportedDuplexConfigurations())) + if err != nil { + return err + } + } + if m.GetSupportedFinishings() != nil { + err := writer.WriteCollectionOfStringValues("supportedFinishings", SerializePrintFinishing(m.GetSupportedFinishings())) + if err != nil { + return err + } + } + if m.GetSupportedMediaColors() != nil { + err := writer.WriteCollectionOfStringValues("supportedMediaColors", m.GetSupportedMediaColors()) + if err != nil { + return err + } + } + if m.GetSupportedMediaSizes() != nil { + err := writer.WriteCollectionOfStringValues("supportedMediaSizes", m.GetSupportedMediaSizes()) + if err != nil { + return err + } + } + if m.GetSupportedMediaTypes() != nil { + err := writer.WriteCollectionOfStringValues("supportedMediaTypes", SerializePrintMediaType(m.GetSupportedMediaTypes())) + if err != nil { + return err + } + } + if m.GetSupportedOrientations() != nil { + err := writer.WriteCollectionOfStringValues("supportedOrientations", SerializePrintOrientation(m.GetSupportedOrientations())) + if err != nil { + return err + } + } + if m.GetSupportedOutputBins() != nil { + err := writer.WriteCollectionOfStringValues("supportedOutputBins", m.GetSupportedOutputBins()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("supportedPagesPerSheet", m.GetSupportedPagesPerSheet()) + if err != nil { + return err + } + } + if m.GetSupportedPresentationDirections() != nil { + err := writer.WriteCollectionOfStringValues("supportedPresentationDirections", SerializePrintPresentationDirection(m.GetSupportedPresentationDirections())) + if err != nil { + return err + } + } + if m.GetSupportedPrintQualities() != nil { + err := writer.WriteCollectionOfStringValues("supportedPrintQualities", SerializePrintQuality(m.GetSupportedPrintQualities())) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("supportsFitPdfToPage", m.GetSupportsFitPdfToPage()) + if err != nil { + return err + } + } + if m.GetTopMargins() != nil { + err := writer.WriteCollectionOfInt32Values("topMargins", m.GetTopMargins()) + 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 *PrinterCapabilities) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBottomMargins sets the bottomMargins property value. A list of supported bottom margins(in microns) for the printer. +func (m *PrinterCapabilities) SetBottomMargins(value []int32)() { + m.bottomMargins = value +} +// SetCollation sets the collation property value. True if the printer supports collating when printing muliple copies of a multi-page document; false otherwise. +func (m *PrinterCapabilities) SetCollation(value *bool)() { + m.collation = value +} +// SetColorModes sets the colorModes property value. The color modes supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) SetColorModes(value []PrintColorMode)() { + m.colorModes = value +} +// SetContentTypes sets the contentTypes property value. A list of supported content (MIME) types that the printer supports. It is not guaranteed that the Universal Print service supports printing all of these MIME types. +func (m *PrinterCapabilities) SetContentTypes(value []string)() { + m.contentTypes = value +} +// SetCopiesPerJob sets the copiesPerJob property value. The range of copies per job supported by the printer. +func (m *PrinterCapabilities) SetCopiesPerJob(value IntegerRangeable)() { + m.copiesPerJob = value +} +// SetDpis sets the dpis property value. The list of print resolutions in DPI that are supported by the printer. +func (m *PrinterCapabilities) SetDpis(value []int32)() { + m.dpis = value +} +// SetDuplexModes sets the duplexModes property value. The list of duplex modes that are supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) SetDuplexModes(value []PrintDuplexMode)() { + m.duplexModes = value +} +// SetFeedDirections sets the feedDirections property value. The feedDirections property +func (m *PrinterCapabilities) SetFeedDirections(value []PrinterFeedDirection)() { + m.feedDirections = value +} +// SetFeedOrientations sets the feedOrientations property value. The list of feed orientations that are supported by the printer. +func (m *PrinterCapabilities) SetFeedOrientations(value []PrinterFeedOrientation)() { + m.feedOrientations = value +} +// SetFinishings sets the finishings property value. Finishing processes the printer supports for a printed document. +func (m *PrinterCapabilities) SetFinishings(value []PrintFinishing)() { + m.finishings = value +} +// SetInputBins sets the inputBins property value. Supported input bins for the printer. +func (m *PrinterCapabilities) SetInputBins(value []string)() { + m.inputBins = value +} +// SetIsColorPrintingSupported sets the isColorPrintingSupported property value. True if color printing is supported by the printer; false otherwise. Read-only. +func (m *PrinterCapabilities) SetIsColorPrintingSupported(value *bool)() { + m.isColorPrintingSupported = value +} +// SetIsPageRangeSupported sets the isPageRangeSupported property value. True if the printer supports printing by page ranges; false otherwise. +func (m *PrinterCapabilities) SetIsPageRangeSupported(value *bool)() { + m.isPageRangeSupported = value +} +// SetLeftMargins sets the leftMargins property value. A list of supported left margins(in microns) for the printer. +func (m *PrinterCapabilities) SetLeftMargins(value []int32)() { + m.leftMargins = value +} +// SetMediaColors sets the mediaColors property value. The media (i.e., paper) colors supported by the printer. +func (m *PrinterCapabilities) SetMediaColors(value []string)() { + m.mediaColors = value +} +// SetMediaSizes sets the mediaSizes property value. The media sizes supported by the printer. Supports standard size names for ISO and ANSI media sizes. Valid values are in the following table. +func (m *PrinterCapabilities) SetMediaSizes(value []string)() { + m.mediaSizes = value +} +// SetMediaTypes sets the mediaTypes property value. The media types supported by the printer. +func (m *PrinterCapabilities) SetMediaTypes(value []string)() { + m.mediaTypes = value +} +// SetMultipageLayouts sets the multipageLayouts property value. The presentation directions supported by the printer. Supported values are described in the following table. +func (m *PrinterCapabilities) SetMultipageLayouts(value []PrintMultipageLayout)() { + m.multipageLayouts = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterCapabilities) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrientations sets the orientations property value. The print orientations supported by the printer. Valid values are described in the following table. +func (m *PrinterCapabilities) SetOrientations(value []PrintOrientation)() { + m.orientations = value +} +// SetOutputBins sets the outputBins property value. The printer's supported output bins (trays). +func (m *PrinterCapabilities) SetOutputBins(value []string)() { + m.outputBins = value +} +// SetPagesPerSheet sets the pagesPerSheet property value. Supported number of Input Pages to impose upon a single Impression. +func (m *PrinterCapabilities) SetPagesPerSheet(value []int32)() { + m.pagesPerSheet = value +} +// SetQualities sets the qualities property value. The print qualities supported by the printer. +func (m *PrinterCapabilities) SetQualities(value []PrintQuality)() { + m.qualities = value +} +// SetRightMargins sets the rightMargins property value. A list of supported right margins(in microns) for the printer. +func (m *PrinterCapabilities) SetRightMargins(value []int32)() { + m.rightMargins = value +} +// SetScalings sets the scalings property value. Supported print scalings. +func (m *PrinterCapabilities) SetScalings(value []PrintScaling)() { + m.scalings = value +} +// SetSupportedColorConfigurations sets the supportedColorConfigurations property value. The supportedColorConfigurations property +func (m *PrinterCapabilities) SetSupportedColorConfigurations(value []PrintColorConfiguration)() { + m.supportedColorConfigurations = value +} +// SetSupportedCopiesPerJob sets the supportedCopiesPerJob property value. The supportedCopiesPerJob property +func (m *PrinterCapabilities) SetSupportedCopiesPerJob(value IntegerRangeable)() { + m.supportedCopiesPerJob = value +} +// SetSupportedDocumentMimeTypes sets the supportedDocumentMimeTypes property value. The supportedDocumentMimeTypes property +func (m *PrinterCapabilities) SetSupportedDocumentMimeTypes(value []string)() { + m.supportedDocumentMimeTypes = value +} +// SetSupportedDuplexConfigurations sets the supportedDuplexConfigurations property value. The supportedDuplexConfigurations property +func (m *PrinterCapabilities) SetSupportedDuplexConfigurations(value []PrintDuplexConfiguration)() { + m.supportedDuplexConfigurations = value +} +// SetSupportedFinishings sets the supportedFinishings property value. The supportedFinishings property +func (m *PrinterCapabilities) SetSupportedFinishings(value []PrintFinishing)() { + m.supportedFinishings = value +} +// SetSupportedMediaColors sets the supportedMediaColors property value. The supportedMediaColors property +func (m *PrinterCapabilities) SetSupportedMediaColors(value []string)() { + m.supportedMediaColors = value +} +// SetSupportedMediaSizes sets the supportedMediaSizes property value. The supportedMediaSizes property +func (m *PrinterCapabilities) SetSupportedMediaSizes(value []string)() { + m.supportedMediaSizes = value +} +// SetSupportedMediaTypes sets the supportedMediaTypes property value. The supportedMediaTypes property +func (m *PrinterCapabilities) SetSupportedMediaTypes(value []PrintMediaType)() { + m.supportedMediaTypes = value +} +// SetSupportedOrientations sets the supportedOrientations property value. The supportedOrientations property +func (m *PrinterCapabilities) SetSupportedOrientations(value []PrintOrientation)() { + m.supportedOrientations = value +} +// SetSupportedOutputBins sets the supportedOutputBins property value. The supportedOutputBins property +func (m *PrinterCapabilities) SetSupportedOutputBins(value []string)() { + m.supportedOutputBins = value +} +// SetSupportedPagesPerSheet sets the supportedPagesPerSheet property value. The supportedPagesPerSheet property +func (m *PrinterCapabilities) SetSupportedPagesPerSheet(value IntegerRangeable)() { + m.supportedPagesPerSheet = value +} +// SetSupportedPresentationDirections sets the supportedPresentationDirections property value. The supportedPresentationDirections property +func (m *PrinterCapabilities) SetSupportedPresentationDirections(value []PrintPresentationDirection)() { + m.supportedPresentationDirections = value +} +// SetSupportedPrintQualities sets the supportedPrintQualities property value. The supportedPrintQualities property +func (m *PrinterCapabilities) SetSupportedPrintQualities(value []PrintQuality)() { + m.supportedPrintQualities = value +} +// SetSupportsFitPdfToPage sets the supportsFitPdfToPage property value. True if the printer supports scaling PDF pages to match the print media size; false otherwise. +func (m *PrinterCapabilities) SetSupportsFitPdfToPage(value *bool)() { + m.supportsFitPdfToPage = value +} +// SetTopMargins sets the topMargins property value. A list of supported top margins(in microns) for the printer. +func (m *PrinterCapabilities) SetTopMargins(value []int32)() { + m.topMargins = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_capabilitiesable.go b/src/internal/connector/graph/betasdk/models/printer_capabilitiesable.go new file mode 100644 index 000000000..26e7d5ecc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_capabilitiesable.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCapabilitiesable +type PrinterCapabilitiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBottomMargins()([]int32) + GetCollation()(*bool) + GetColorModes()([]PrintColorMode) + GetContentTypes()([]string) + GetCopiesPerJob()(IntegerRangeable) + GetDpis()([]int32) + GetDuplexModes()([]PrintDuplexMode) + GetFeedDirections()([]PrinterFeedDirection) + GetFeedOrientations()([]PrinterFeedOrientation) + GetFinishings()([]PrintFinishing) + GetInputBins()([]string) + GetIsColorPrintingSupported()(*bool) + GetIsPageRangeSupported()(*bool) + GetLeftMargins()([]int32) + GetMediaColors()([]string) + GetMediaSizes()([]string) + GetMediaTypes()([]string) + GetMultipageLayouts()([]PrintMultipageLayout) + GetOdataType()(*string) + GetOrientations()([]PrintOrientation) + GetOutputBins()([]string) + GetPagesPerSheet()([]int32) + GetQualities()([]PrintQuality) + GetRightMargins()([]int32) + GetScalings()([]PrintScaling) + GetSupportedColorConfigurations()([]PrintColorConfiguration) + GetSupportedCopiesPerJob()(IntegerRangeable) + GetSupportedDocumentMimeTypes()([]string) + GetSupportedDuplexConfigurations()([]PrintDuplexConfiguration) + GetSupportedFinishings()([]PrintFinishing) + GetSupportedMediaColors()([]string) + GetSupportedMediaSizes()([]string) + GetSupportedMediaTypes()([]PrintMediaType) + GetSupportedOrientations()([]PrintOrientation) + GetSupportedOutputBins()([]string) + GetSupportedPagesPerSheet()(IntegerRangeable) + GetSupportedPresentationDirections()([]PrintPresentationDirection) + GetSupportedPrintQualities()([]PrintQuality) + GetSupportsFitPdfToPage()(*bool) + GetTopMargins()([]int32) + SetBottomMargins(value []int32)() + SetCollation(value *bool)() + SetColorModes(value []PrintColorMode)() + SetContentTypes(value []string)() + SetCopiesPerJob(value IntegerRangeable)() + SetDpis(value []int32)() + SetDuplexModes(value []PrintDuplexMode)() + SetFeedDirections(value []PrinterFeedDirection)() + SetFeedOrientations(value []PrinterFeedOrientation)() + SetFinishings(value []PrintFinishing)() + SetInputBins(value []string)() + SetIsColorPrintingSupported(value *bool)() + SetIsPageRangeSupported(value *bool)() + SetLeftMargins(value []int32)() + SetMediaColors(value []string)() + SetMediaSizes(value []string)() + SetMediaTypes(value []string)() + SetMultipageLayouts(value []PrintMultipageLayout)() + SetOdataType(value *string)() + SetOrientations(value []PrintOrientation)() + SetOutputBins(value []string)() + SetPagesPerSheet(value []int32)() + SetQualities(value []PrintQuality)() + SetRightMargins(value []int32)() + SetScalings(value []PrintScaling)() + SetSupportedColorConfigurations(value []PrintColorConfiguration)() + SetSupportedCopiesPerJob(value IntegerRangeable)() + SetSupportedDocumentMimeTypes(value []string)() + SetSupportedDuplexConfigurations(value []PrintDuplexConfiguration)() + SetSupportedFinishings(value []PrintFinishing)() + SetSupportedMediaColors(value []string)() + SetSupportedMediaSizes(value []string)() + SetSupportedMediaTypes(value []PrintMediaType)() + SetSupportedOrientations(value []PrintOrientation)() + SetSupportedOutputBins(value []string)() + SetSupportedPagesPerSheet(value IntegerRangeable)() + SetSupportedPresentationDirections(value []PrintPresentationDirection)() + SetSupportedPrintQualities(value []PrintQuality)() + SetSupportsFitPdfToPage(value *bool)() + SetTopMargins(value []int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_collection_response.go b/src/internal/connector/graph/betasdk/models/printer_collection_response.go new file mode 100644 index 000000000..131a4b7d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCollectionResponse +type PrinterCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Printerable +} +// NewPrinterCollectionResponse instantiates a new PrinterCollectionResponse and sets the default values. +func NewPrinterCollectionResponse()(*PrinterCollectionResponse) { + m := &PrinterCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrinterCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Printerable, len(val)) + for i, v := range val { + res[i] = v.(Printerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrinterCollectionResponse) GetValue()([]Printerable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrinterCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrinterCollectionResponse) SetValue(value []Printerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_collection_responseable.go b/src/internal/connector/graph/betasdk/models/printer_collection_responseable.go new file mode 100644 index 000000000..b030ad99b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCollectionResponseable +type PrinterCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Printerable) + SetValue(value []Printerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_create_operation.go b/src/internal/connector/graph/betasdk/models/printer_create_operation.go new file mode 100644 index 000000000..fe9d1e24b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_create_operation.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCreateOperation +type PrinterCreateOperation struct { + PrintOperation + // The signed certificate created during the registration process. Read-only. + certificate *string + // The printer property + printer Printerable +} +// NewPrinterCreateOperation instantiates a new PrinterCreateOperation and sets the default values. +func NewPrinterCreateOperation()(*PrinterCreateOperation) { + m := &PrinterCreateOperation{ + PrintOperation: *NewPrintOperation(), + } + odataTypeValue := "#microsoft.graph.printerCreateOperation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrinterCreateOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterCreateOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterCreateOperation(), nil +} +// GetCertificate gets the certificate property value. The signed certificate created during the registration process. Read-only. +func (m *PrinterCreateOperation) GetCertificate()(*string) { + return m.certificate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterCreateOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrintOperation.GetFieldDeserializers() + res["certificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCertificate(val) + } + return nil + } + res["printer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrinter(val.(Printerable)) + } + return nil + } + return res +} +// GetPrinter gets the printer property value. The printer property +func (m *PrinterCreateOperation) GetPrinter()(Printerable) { + return m.printer +} +// Serialize serializes information the current object +func (m *PrinterCreateOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrintOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("certificate", m.GetCertificate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("printer", m.GetPrinter()) + if err != nil { + return err + } + } + return nil +} +// SetCertificate sets the certificate property value. The signed certificate created during the registration process. Read-only. +func (m *PrinterCreateOperation) SetCertificate(value *string)() { + m.certificate = value +} +// SetPrinter sets the printer property value. The printer property +func (m *PrinterCreateOperation) SetPrinter(value Printerable)() { + m.printer = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_response.go new file mode 100644 index 000000000..6631d3c54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCreateOperationCollectionResponse +type PrinterCreateOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrinterCreateOperationable +} +// NewPrinterCreateOperationCollectionResponse instantiates a new PrinterCreateOperationCollectionResponse and sets the default values. +func NewPrinterCreateOperationCollectionResponse()(*PrinterCreateOperationCollectionResponse) { + m := &PrinterCreateOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrinterCreateOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterCreateOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterCreateOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterCreateOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrinterCreateOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterCreateOperationable, len(val)) + for i, v := range val { + res[i] = v.(PrinterCreateOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrinterCreateOperationCollectionResponse) GetValue()([]PrinterCreateOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrinterCreateOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrinterCreateOperationCollectionResponse) SetValue(value []PrinterCreateOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_responseable.go new file mode 100644 index 000000000..53bc56207 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_create_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCreateOperationCollectionResponseable +type PrinterCreateOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrinterCreateOperationable) + SetValue(value []PrinterCreateOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_create_operationable.go b/src/internal/connector/graph/betasdk/models/printer_create_operationable.go new file mode 100644 index 000000000..77e26d540 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_create_operationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterCreateOperationable +type PrinterCreateOperationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrintOperationable + GetCertificate()(*string) + GetPrinter()(Printerable) + SetCertificate(value *string)() + SetPrinter(value Printerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_defaults.go b/src/internal/connector/graph/betasdk/models/printer_defaults.go new file mode 100644 index 000000000..c101f6068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_defaults.go @@ -0,0 +1,683 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterDefaults +type PrinterDefaults 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 default color mode to use when printing the document. Valid values are described in the following table. + colorMode *PrintColorMode + // The default content (MIME) type to use when processing documents. + contentType *string + // The default number of copies printed per job. + copiesPerJob *int32 + // The documentMimeType property + documentMimeType *string + // The default resolution in DPI to use when printing the job. + dpi *int32 + // The duplexConfiguration property + duplexConfiguration *PrintDuplexConfiguration + // The default duplex (double-sided) configuration to use when printing a document. Valid values are described in the following table. + duplexMode *PrintDuplexMode + // The default set of finishings to apply to print jobs. Valid values are described in the following table. + finishings []PrintFinishing + // The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions. + fitPdfToPage *bool + // The default input bin that serves as the paper source. + inputBin *string + // The default media (such as paper) color to print the document on. + mediaColor *string + // The default media size to use. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. + mediaSize *string + // The default media (such as paper) type to print the document on. + mediaType *string + // The default direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. + multipageLayout *PrintMultipageLayout + // The OdataType property + odataType *string + // The default orientation to use when printing the document. Valid values are described in the following table. + orientation *PrintOrientation + // The default output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. + outputBin *string + // The default number of document pages to print on each sheet. + pagesPerSheet *int32 + // The pdfFitToPage property + pdfFitToPage *bool + // The presentationDirection property + presentationDirection *PrintPresentationDirection + // The printColorConfiguration property + printColorConfiguration *PrintColorConfiguration + // The printQuality property + printQuality *PrintQuality + // The default quality to use when printing the document. Valid values are described in the following table. + quality *PrintQuality + // Specifies how the printer scales the document data to fit the requested media. Valid values are described in the following table. + scaling *PrintScaling +} +// NewPrinterDefaults instantiates a new printerDefaults and sets the default values. +func NewPrinterDefaults()(*PrinterDefaults) { + m := &PrinterDefaults{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterDefaultsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterDefaultsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterDefaults(), 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 *PrinterDefaults) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetColorMode gets the colorMode property value. The default color mode to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) GetColorMode()(*PrintColorMode) { + return m.colorMode +} +// GetContentType gets the contentType property value. The default content (MIME) type to use when processing documents. +func (m *PrinterDefaults) GetContentType()(*string) { + return m.contentType +} +// GetCopiesPerJob gets the copiesPerJob property value. The default number of copies printed per job. +func (m *PrinterDefaults) GetCopiesPerJob()(*int32) { + return m.copiesPerJob +} +// GetDocumentMimeType gets the documentMimeType property value. The documentMimeType property +func (m *PrinterDefaults) GetDocumentMimeType()(*string) { + return m.documentMimeType +} +// GetDpi gets the dpi property value. The default resolution in DPI to use when printing the job. +func (m *PrinterDefaults) GetDpi()(*int32) { + return m.dpi +} +// GetDuplexConfiguration gets the duplexConfiguration property value. The duplexConfiguration property +func (m *PrinterDefaults) GetDuplexConfiguration()(*PrintDuplexConfiguration) { + return m.duplexConfiguration +} +// GetDuplexMode gets the duplexMode property value. The default duplex (double-sided) configuration to use when printing a document. Valid values are described in the following table. +func (m *PrinterDefaults) GetDuplexMode()(*PrintDuplexMode) { + return m.duplexMode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterDefaults) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["colorMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintColorMode) + if err != nil { + return err + } + if val != nil { + m.SetColorMode(val.(*PrintColorMode)) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["copiesPerJob"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCopiesPerJob(val) + } + return nil + } + res["documentMimeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentMimeType(val) + } + return nil + } + res["dpi"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDpi(val) + } + return nil + } + res["duplexConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintDuplexConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetDuplexConfiguration(val.(*PrintDuplexConfiguration)) + } + return nil + } + res["duplexMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintDuplexMode) + if err != nil { + return err + } + if val != nil { + m.SetDuplexMode(val.(*PrintDuplexMode)) + } + return nil + } + res["finishings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintFinishing) + if err != nil { + return err + } + if val != nil { + res := make([]PrintFinishing, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintFinishing)) + } + m.SetFinishings(res) + } + return nil + } + res["fitPdfToPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFitPdfToPage(val) + } + return nil + } + res["inputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInputBin(val) + } + return nil + } + res["mediaColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaColor(val) + } + return nil + } + res["mediaSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaSize(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["multipageLayout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintMultipageLayout) + if err != nil { + return err + } + if val != nil { + m.SetMultipageLayout(val.(*PrintMultipageLayout)) + } + 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["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintOrientation) + if err != nil { + return err + } + if val != nil { + m.SetOrientation(val.(*PrintOrientation)) + } + return nil + } + res["outputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputBin(val) + } + return nil + } + res["pagesPerSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPagesPerSheet(val) + } + return nil + } + res["pdfFitToPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPdfFitToPage(val) + } + return nil + } + res["presentationDirection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintPresentationDirection) + if err != nil { + return err + } + if val != nil { + m.SetPresentationDirection(val.(*PrintPresentationDirection)) + } + return nil + } + res["printColorConfiguration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintColorConfiguration) + if err != nil { + return err + } + if val != nil { + m.SetPrintColorConfiguration(val.(*PrintColorConfiguration)) + } + return nil + } + res["printQuality"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + m.SetPrintQuality(val.(*PrintQuality)) + } + return nil + } + res["quality"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + m.SetQuality(val.(*PrintQuality)) + } + return nil + } + res["scaling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintScaling) + if err != nil { + return err + } + if val != nil { + m.SetScaling(val.(*PrintScaling)) + } + return nil + } + return res +} +// GetFinishings gets the finishings property value. The default set of finishings to apply to print jobs. Valid values are described in the following table. +func (m *PrinterDefaults) GetFinishings()([]PrintFinishing) { + return m.finishings +} +// GetFitPdfToPage gets the fitPdfToPage property value. The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions. +func (m *PrinterDefaults) GetFitPdfToPage()(*bool) { + return m.fitPdfToPage +} +// GetInputBin gets the inputBin property value. The default input bin that serves as the paper source. +func (m *PrinterDefaults) GetInputBin()(*string) { + return m.inputBin +} +// GetMediaColor gets the mediaColor property value. The default media (such as paper) color to print the document on. +func (m *PrinterDefaults) GetMediaColor()(*string) { + return m.mediaColor +} +// GetMediaSize gets the mediaSize property value. The default media size to use. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. +func (m *PrinterDefaults) GetMediaSize()(*string) { + return m.mediaSize +} +// GetMediaType gets the mediaType property value. The default media (such as paper) type to print the document on. +func (m *PrinterDefaults) GetMediaType()(*string) { + return m.mediaType +} +// GetMultipageLayout gets the multipageLayout property value. The default direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. +func (m *PrinterDefaults) GetMultipageLayout()(*PrintMultipageLayout) { + return m.multipageLayout +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterDefaults) GetOdataType()(*string) { + return m.odataType +} +// GetOrientation gets the orientation property value. The default orientation to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) GetOrientation()(*PrintOrientation) { + return m.orientation +} +// GetOutputBin gets the outputBin property value. The default output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. +func (m *PrinterDefaults) GetOutputBin()(*string) { + return m.outputBin +} +// GetPagesPerSheet gets the pagesPerSheet property value. The default number of document pages to print on each sheet. +func (m *PrinterDefaults) GetPagesPerSheet()(*int32) { + return m.pagesPerSheet +} +// GetPdfFitToPage gets the pdfFitToPage property value. The pdfFitToPage property +func (m *PrinterDefaults) GetPdfFitToPage()(*bool) { + return m.pdfFitToPage +} +// GetPresentationDirection gets the presentationDirection property value. The presentationDirection property +func (m *PrinterDefaults) GetPresentationDirection()(*PrintPresentationDirection) { + return m.presentationDirection +} +// GetPrintColorConfiguration gets the printColorConfiguration property value. The printColorConfiguration property +func (m *PrinterDefaults) GetPrintColorConfiguration()(*PrintColorConfiguration) { + return m.printColorConfiguration +} +// GetPrintQuality gets the printQuality property value. The printQuality property +func (m *PrinterDefaults) GetPrintQuality()(*PrintQuality) { + return m.printQuality +} +// GetQuality gets the quality property value. The default quality to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) GetQuality()(*PrintQuality) { + return m.quality +} +// GetScaling gets the scaling property value. Specifies how the printer scales the document data to fit the requested media. Valid values are described in the following table. +func (m *PrinterDefaults) GetScaling()(*PrintScaling) { + return m.scaling +} +// Serialize serializes information the current object +func (m *PrinterDefaults) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetColorMode() != nil { + cast := (*m.GetColorMode()).String() + err := writer.WriteStringValue("colorMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("copiesPerJob", m.GetCopiesPerJob()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("documentMimeType", m.GetDocumentMimeType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("dpi", m.GetDpi()) + if err != nil { + return err + } + } + if m.GetDuplexConfiguration() != nil { + cast := (*m.GetDuplexConfiguration()).String() + err := writer.WriteStringValue("duplexConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetDuplexMode() != nil { + cast := (*m.GetDuplexMode()).String() + err := writer.WriteStringValue("duplexMode", &cast) + if err != nil { + return err + } + } + if m.GetFinishings() != nil { + err := writer.WriteCollectionOfStringValues("finishings", SerializePrintFinishing(m.GetFinishings())) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fitPdfToPage", m.GetFitPdfToPage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("inputBin", m.GetInputBin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaColor", m.GetMediaColor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaSize", m.GetMediaSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + if m.GetMultipageLayout() != nil { + cast := (*m.GetMultipageLayout()).String() + err := writer.WriteStringValue("multipageLayout", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOrientation() != nil { + cast := (*m.GetOrientation()).String() + err := writer.WriteStringValue("orientation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("outputBin", m.GetOutputBin()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pagesPerSheet", m.GetPagesPerSheet()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("pdfFitToPage", m.GetPdfFitToPage()) + if err != nil { + return err + } + } + if m.GetPresentationDirection() != nil { + cast := (*m.GetPresentationDirection()).String() + err := writer.WriteStringValue("presentationDirection", &cast) + if err != nil { + return err + } + } + if m.GetPrintColorConfiguration() != nil { + cast := (*m.GetPrintColorConfiguration()).String() + err := writer.WriteStringValue("printColorConfiguration", &cast) + if err != nil { + return err + } + } + if m.GetPrintQuality() != nil { + cast := (*m.GetPrintQuality()).String() + err := writer.WriteStringValue("printQuality", &cast) + if err != nil { + return err + } + } + if m.GetQuality() != nil { + cast := (*m.GetQuality()).String() + err := writer.WriteStringValue("quality", &cast) + if err != nil { + return err + } + } + if m.GetScaling() != nil { + cast := (*m.GetScaling()).String() + err := writer.WriteStringValue("scaling", &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 *PrinterDefaults) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetColorMode sets the colorMode property value. The default color mode to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) SetColorMode(value *PrintColorMode)() { + m.colorMode = value +} +// SetContentType sets the contentType property value. The default content (MIME) type to use when processing documents. +func (m *PrinterDefaults) SetContentType(value *string)() { + m.contentType = value +} +// SetCopiesPerJob sets the copiesPerJob property value. The default number of copies printed per job. +func (m *PrinterDefaults) SetCopiesPerJob(value *int32)() { + m.copiesPerJob = value +} +// SetDocumentMimeType sets the documentMimeType property value. The documentMimeType property +func (m *PrinterDefaults) SetDocumentMimeType(value *string)() { + m.documentMimeType = value +} +// SetDpi sets the dpi property value. The default resolution in DPI to use when printing the job. +func (m *PrinterDefaults) SetDpi(value *int32)() { + m.dpi = value +} +// SetDuplexConfiguration sets the duplexConfiguration property value. The duplexConfiguration property +func (m *PrinterDefaults) SetDuplexConfiguration(value *PrintDuplexConfiguration)() { + m.duplexConfiguration = value +} +// SetDuplexMode sets the duplexMode property value. The default duplex (double-sided) configuration to use when printing a document. Valid values are described in the following table. +func (m *PrinterDefaults) SetDuplexMode(value *PrintDuplexMode)() { + m.duplexMode = value +} +// SetFinishings sets the finishings property value. The default set of finishings to apply to print jobs. Valid values are described in the following table. +func (m *PrinterDefaults) SetFinishings(value []PrintFinishing)() { + m.finishings = value +} +// SetFitPdfToPage sets the fitPdfToPage property value. The default fitPdfToPage setting. True to fit each page of a PDF document to a physical sheet of media; false to let the printer decide how to lay out impressions. +func (m *PrinterDefaults) SetFitPdfToPage(value *bool)() { + m.fitPdfToPage = value +} +// SetInputBin sets the inputBin property value. The default input bin that serves as the paper source. +func (m *PrinterDefaults) SetInputBin(value *string)() { + m.inputBin = value +} +// SetMediaColor sets the mediaColor property value. The default media (such as paper) color to print the document on. +func (m *PrinterDefaults) SetMediaColor(value *string)() { + m.mediaColor = value +} +// SetMediaSize sets the mediaSize property value. The default media size to use. Supports standard size names for ISO and ANSI media sizes. Valid values are listed in the printerCapabilities topic. +func (m *PrinterDefaults) SetMediaSize(value *string)() { + m.mediaSize = value +} +// SetMediaType sets the mediaType property value. The default media (such as paper) type to print the document on. +func (m *PrinterDefaults) SetMediaType(value *string)() { + m.mediaType = value +} +// SetMultipageLayout sets the multipageLayout property value. The default direction to lay out pages when multiple pages are being printed per sheet. Valid values are described in the following table. +func (m *PrinterDefaults) SetMultipageLayout(value *PrintMultipageLayout)() { + m.multipageLayout = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterDefaults) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrientation sets the orientation property value. The default orientation to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) SetOrientation(value *PrintOrientation)() { + m.orientation = value +} +// SetOutputBin sets the outputBin property value. The default output bin to place completed prints into. See the printer's capabilities for a list of supported output bins. +func (m *PrinterDefaults) SetOutputBin(value *string)() { + m.outputBin = value +} +// SetPagesPerSheet sets the pagesPerSheet property value. The default number of document pages to print on each sheet. +func (m *PrinterDefaults) SetPagesPerSheet(value *int32)() { + m.pagesPerSheet = value +} +// SetPdfFitToPage sets the pdfFitToPage property value. The pdfFitToPage property +func (m *PrinterDefaults) SetPdfFitToPage(value *bool)() { + m.pdfFitToPage = value +} +// SetPresentationDirection sets the presentationDirection property value. The presentationDirection property +func (m *PrinterDefaults) SetPresentationDirection(value *PrintPresentationDirection)() { + m.presentationDirection = value +} +// SetPrintColorConfiguration sets the printColorConfiguration property value. The printColorConfiguration property +func (m *PrinterDefaults) SetPrintColorConfiguration(value *PrintColorConfiguration)() { + m.printColorConfiguration = value +} +// SetPrintQuality sets the printQuality property value. The printQuality property +func (m *PrinterDefaults) SetPrintQuality(value *PrintQuality)() { + m.printQuality = value +} +// SetQuality sets the quality property value. The default quality to use when printing the document. Valid values are described in the following table. +func (m *PrinterDefaults) SetQuality(value *PrintQuality)() { + m.quality = value +} +// SetScaling sets the scaling property value. Specifies how the printer scales the document data to fit the requested media. Valid values are described in the following table. +func (m *PrinterDefaults) SetScaling(value *PrintScaling)() { + m.scaling = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_defaultsable.go b/src/internal/connector/graph/betasdk/models/printer_defaultsable.go new file mode 100644 index 000000000..c354dac34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_defaultsable.go @@ -0,0 +1,59 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterDefaultsable +type PrinterDefaultsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColorMode()(*PrintColorMode) + GetContentType()(*string) + GetCopiesPerJob()(*int32) + GetDocumentMimeType()(*string) + GetDpi()(*int32) + GetDuplexConfiguration()(*PrintDuplexConfiguration) + GetDuplexMode()(*PrintDuplexMode) + GetFinishings()([]PrintFinishing) + GetFitPdfToPage()(*bool) + GetInputBin()(*string) + GetMediaColor()(*string) + GetMediaSize()(*string) + GetMediaType()(*string) + GetMultipageLayout()(*PrintMultipageLayout) + GetOdataType()(*string) + GetOrientation()(*PrintOrientation) + GetOutputBin()(*string) + GetPagesPerSheet()(*int32) + GetPdfFitToPage()(*bool) + GetPresentationDirection()(*PrintPresentationDirection) + GetPrintColorConfiguration()(*PrintColorConfiguration) + GetPrintQuality()(*PrintQuality) + GetQuality()(*PrintQuality) + GetScaling()(*PrintScaling) + SetColorMode(value *PrintColorMode)() + SetContentType(value *string)() + SetCopiesPerJob(value *int32)() + SetDocumentMimeType(value *string)() + SetDpi(value *int32)() + SetDuplexConfiguration(value *PrintDuplexConfiguration)() + SetDuplexMode(value *PrintDuplexMode)() + SetFinishings(value []PrintFinishing)() + SetFitPdfToPage(value *bool)() + SetInputBin(value *string)() + SetMediaColor(value *string)() + SetMediaSize(value *string)() + SetMediaType(value *string)() + SetMultipageLayout(value *PrintMultipageLayout)() + SetOdataType(value *string)() + SetOrientation(value *PrintOrientation)() + SetOutputBin(value *string)() + SetPagesPerSheet(value *int32)() + SetPdfFitToPage(value *bool)() + SetPresentationDirection(value *PrintPresentationDirection)() + SetPrintColorConfiguration(value *PrintColorConfiguration)() + SetPrintQuality(value *PrintQuality)() + SetQuality(value *PrintQuality)() + SetScaling(value *PrintScaling)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_document_configuration.go b/src/internal/connector/graph/betasdk/models/printer_document_configuration.go new file mode 100644 index 000000000..5cccc627c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_document_configuration.go @@ -0,0 +1,611 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterDocumentConfiguration +type PrinterDocumentConfiguration 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 collate property + collate *bool + // The colorMode property + colorMode *PrintColorMode + // The copies property + copies *int32 + // The dpi property + dpi *int32 + // The duplexMode property + duplexMode *PrintDuplexMode + // The feedDirection property + feedDirection *PrinterFeedDirection + // The feedOrientation property + feedOrientation *PrinterFeedOrientation + // The finishings property + finishings []PrintFinishing + // The fitPdfToPage property + fitPdfToPage *bool + // The inputBin property + inputBin *string + // The margin property + margin PrintMarginable + // The mediaSize property + mediaSize *string + // The mediaType property + mediaType *string + // The multipageLayout property + multipageLayout *PrintMultipageLayout + // The OdataType property + odataType *string + // The orientation property + orientation *PrintOrientation + // The outputBin property + outputBin *string + // The pageRanges property + pageRanges []IntegerRangeable + // The pagesPerSheet property + pagesPerSheet *int32 + // The quality property + quality *PrintQuality + // The scaling property + scaling *PrintScaling +} +// NewPrinterDocumentConfiguration instantiates a new printerDocumentConfiguration and sets the default values. +func NewPrinterDocumentConfiguration()(*PrinterDocumentConfiguration) { + m := &PrinterDocumentConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterDocumentConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterDocumentConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterDocumentConfiguration(), 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 *PrinterDocumentConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCollate gets the collate property value. The collate property +func (m *PrinterDocumentConfiguration) GetCollate()(*bool) { + return m.collate +} +// GetColorMode gets the colorMode property value. The colorMode property +func (m *PrinterDocumentConfiguration) GetColorMode()(*PrintColorMode) { + return m.colorMode +} +// GetCopies gets the copies property value. The copies property +func (m *PrinterDocumentConfiguration) GetCopies()(*int32) { + return m.copies +} +// GetDpi gets the dpi property value. The dpi property +func (m *PrinterDocumentConfiguration) GetDpi()(*int32) { + return m.dpi +} +// GetDuplexMode gets the duplexMode property value. The duplexMode property +func (m *PrinterDocumentConfiguration) GetDuplexMode()(*PrintDuplexMode) { + return m.duplexMode +} +// GetFeedDirection gets the feedDirection property value. The feedDirection property +func (m *PrinterDocumentConfiguration) GetFeedDirection()(*PrinterFeedDirection) { + return m.feedDirection +} +// GetFeedOrientation gets the feedOrientation property value. The feedOrientation property +func (m *PrinterDocumentConfiguration) GetFeedOrientation()(*PrinterFeedOrientation) { + return m.feedOrientation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterDocumentConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["collate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCollate(val) + } + return nil + } + res["colorMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintColorMode) + if err != nil { + return err + } + if val != nil { + m.SetColorMode(val.(*PrintColorMode)) + } + return nil + } + res["copies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCopies(val) + } + return nil + } + res["dpi"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDpi(val) + } + return nil + } + res["duplexMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintDuplexMode) + if err != nil { + return err + } + if val != nil { + m.SetDuplexMode(val.(*PrintDuplexMode)) + } + return nil + } + res["feedDirection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrinterFeedDirection) + if err != nil { + return err + } + if val != nil { + m.SetFeedDirection(val.(*PrinterFeedDirection)) + } + return nil + } + res["feedOrientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrinterFeedOrientation) + if err != nil { + return err + } + if val != nil { + m.SetFeedOrientation(val.(*PrinterFeedOrientation)) + } + return nil + } + res["finishings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrintFinishing) + if err != nil { + return err + } + if val != nil { + res := make([]PrintFinishing, len(val)) + for i, v := range val { + res[i] = *(v.(*PrintFinishing)) + } + m.SetFinishings(res) + } + return nil + } + res["fitPdfToPage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFitPdfToPage(val) + } + return nil + } + res["inputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInputBin(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrintMarginFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetMargin(val.(PrintMarginable)) + } + return nil + } + res["mediaSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaSize(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["multipageLayout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintMultipageLayout) + if err != nil { + return err + } + if val != nil { + m.SetMultipageLayout(val.(*PrintMultipageLayout)) + } + 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["orientation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintOrientation) + if err != nil { + return err + } + if val != nil { + m.SetOrientation(val.(*PrintOrientation)) + } + return nil + } + res["outputBin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputBin(val) + } + return nil + } + res["pageRanges"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIntegerRangeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IntegerRangeable, len(val)) + for i, v := range val { + res[i] = v.(IntegerRangeable) + } + m.SetPageRanges(res) + } + return nil + } + res["pagesPerSheet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPagesPerSheet(val) + } + return nil + } + res["quality"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintQuality) + if err != nil { + return err + } + if val != nil { + m.SetQuality(val.(*PrintQuality)) + } + return nil + } + res["scaling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrintScaling) + if err != nil { + return err + } + if val != nil { + m.SetScaling(val.(*PrintScaling)) + } + return nil + } + return res +} +// GetFinishings gets the finishings property value. The finishings property +func (m *PrinterDocumentConfiguration) GetFinishings()([]PrintFinishing) { + return m.finishings +} +// GetFitPdfToPage gets the fitPdfToPage property value. The fitPdfToPage property +func (m *PrinterDocumentConfiguration) GetFitPdfToPage()(*bool) { + return m.fitPdfToPage +} +// GetInputBin gets the inputBin property value. The inputBin property +func (m *PrinterDocumentConfiguration) GetInputBin()(*string) { + return m.inputBin +} +// GetMargin gets the margin property value. The margin property +func (m *PrinterDocumentConfiguration) GetMargin()(PrintMarginable) { + return m.margin +} +// GetMediaSize gets the mediaSize property value. The mediaSize property +func (m *PrinterDocumentConfiguration) GetMediaSize()(*string) { + return m.mediaSize +} +// GetMediaType gets the mediaType property value. The mediaType property +func (m *PrinterDocumentConfiguration) GetMediaType()(*string) { + return m.mediaType +} +// GetMultipageLayout gets the multipageLayout property value. The multipageLayout property +func (m *PrinterDocumentConfiguration) GetMultipageLayout()(*PrintMultipageLayout) { + return m.multipageLayout +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterDocumentConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetOrientation gets the orientation property value. The orientation property +func (m *PrinterDocumentConfiguration) GetOrientation()(*PrintOrientation) { + return m.orientation +} +// GetOutputBin gets the outputBin property value. The outputBin property +func (m *PrinterDocumentConfiguration) GetOutputBin()(*string) { + return m.outputBin +} +// GetPageRanges gets the pageRanges property value. The pageRanges property +func (m *PrinterDocumentConfiguration) GetPageRanges()([]IntegerRangeable) { + return m.pageRanges +} +// GetPagesPerSheet gets the pagesPerSheet property value. The pagesPerSheet property +func (m *PrinterDocumentConfiguration) GetPagesPerSheet()(*int32) { + return m.pagesPerSheet +} +// GetQuality gets the quality property value. The quality property +func (m *PrinterDocumentConfiguration) GetQuality()(*PrintQuality) { + return m.quality +} +// GetScaling gets the scaling property value. The scaling property +func (m *PrinterDocumentConfiguration) GetScaling()(*PrintScaling) { + return m.scaling +} +// Serialize serializes information the current object +func (m *PrinterDocumentConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("collate", m.GetCollate()) + if err != nil { + return err + } + } + if m.GetColorMode() != nil { + cast := (*m.GetColorMode()).String() + err := writer.WriteStringValue("colorMode", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("copies", m.GetCopies()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("dpi", m.GetDpi()) + if err != nil { + return err + } + } + if m.GetDuplexMode() != nil { + cast := (*m.GetDuplexMode()).String() + err := writer.WriteStringValue("duplexMode", &cast) + if err != nil { + return err + } + } + if m.GetFeedDirection() != nil { + cast := (*m.GetFeedDirection()).String() + err := writer.WriteStringValue("feedDirection", &cast) + if err != nil { + return err + } + } + if m.GetFeedOrientation() != nil { + cast := (*m.GetFeedOrientation()).String() + err := writer.WriteStringValue("feedOrientation", &cast) + if err != nil { + return err + } + } + if m.GetFinishings() != nil { + err := writer.WriteCollectionOfStringValues("finishings", SerializePrintFinishing(m.GetFinishings())) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("fitPdfToPage", m.GetFitPdfToPage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("inputBin", m.GetInputBin()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaSize", m.GetMediaSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + if m.GetMultipageLayout() != nil { + cast := (*m.GetMultipageLayout()).String() + err := writer.WriteStringValue("multipageLayout", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOrientation() != nil { + cast := (*m.GetOrientation()).String() + err := writer.WriteStringValue("orientation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("outputBin", m.GetOutputBin()) + if err != nil { + return err + } + } + if m.GetPageRanges() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPageRanges())) + for i, v := range m.GetPageRanges() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("pageRanges", cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("pagesPerSheet", m.GetPagesPerSheet()) + if err != nil { + return err + } + } + if m.GetQuality() != nil { + cast := (*m.GetQuality()).String() + err := writer.WriteStringValue("quality", &cast) + if err != nil { + return err + } + } + if m.GetScaling() != nil { + cast := (*m.GetScaling()).String() + err := writer.WriteStringValue("scaling", &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 *PrinterDocumentConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCollate sets the collate property value. The collate property +func (m *PrinterDocumentConfiguration) SetCollate(value *bool)() { + m.collate = value +} +// SetColorMode sets the colorMode property value. The colorMode property +func (m *PrinterDocumentConfiguration) SetColorMode(value *PrintColorMode)() { + m.colorMode = value +} +// SetCopies sets the copies property value. The copies property +func (m *PrinterDocumentConfiguration) SetCopies(value *int32)() { + m.copies = value +} +// SetDpi sets the dpi property value. The dpi property +func (m *PrinterDocumentConfiguration) SetDpi(value *int32)() { + m.dpi = value +} +// SetDuplexMode sets the duplexMode property value. The duplexMode property +func (m *PrinterDocumentConfiguration) SetDuplexMode(value *PrintDuplexMode)() { + m.duplexMode = value +} +// SetFeedDirection sets the feedDirection property value. The feedDirection property +func (m *PrinterDocumentConfiguration) SetFeedDirection(value *PrinterFeedDirection)() { + m.feedDirection = value +} +// SetFeedOrientation sets the feedOrientation property value. The feedOrientation property +func (m *PrinterDocumentConfiguration) SetFeedOrientation(value *PrinterFeedOrientation)() { + m.feedOrientation = value +} +// SetFinishings sets the finishings property value. The finishings property +func (m *PrinterDocumentConfiguration) SetFinishings(value []PrintFinishing)() { + m.finishings = value +} +// SetFitPdfToPage sets the fitPdfToPage property value. The fitPdfToPage property +func (m *PrinterDocumentConfiguration) SetFitPdfToPage(value *bool)() { + m.fitPdfToPage = value +} +// SetInputBin sets the inputBin property value. The inputBin property +func (m *PrinterDocumentConfiguration) SetInputBin(value *string)() { + m.inputBin = value +} +// SetMargin sets the margin property value. The margin property +func (m *PrinterDocumentConfiguration) SetMargin(value PrintMarginable)() { + m.margin = value +} +// SetMediaSize sets the mediaSize property value. The mediaSize property +func (m *PrinterDocumentConfiguration) SetMediaSize(value *string)() { + m.mediaSize = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *PrinterDocumentConfiguration) SetMediaType(value *string)() { + m.mediaType = value +} +// SetMultipageLayout sets the multipageLayout property value. The multipageLayout property +func (m *PrinterDocumentConfiguration) SetMultipageLayout(value *PrintMultipageLayout)() { + m.multipageLayout = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterDocumentConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrientation sets the orientation property value. The orientation property +func (m *PrinterDocumentConfiguration) SetOrientation(value *PrintOrientation)() { + m.orientation = value +} +// SetOutputBin sets the outputBin property value. The outputBin property +func (m *PrinterDocumentConfiguration) SetOutputBin(value *string)() { + m.outputBin = value +} +// SetPageRanges sets the pageRanges property value. The pageRanges property +func (m *PrinterDocumentConfiguration) SetPageRanges(value []IntegerRangeable)() { + m.pageRanges = value +} +// SetPagesPerSheet sets the pagesPerSheet property value. The pagesPerSheet property +func (m *PrinterDocumentConfiguration) SetPagesPerSheet(value *int32)() { + m.pagesPerSheet = value +} +// SetQuality sets the quality property value. The quality property +func (m *PrinterDocumentConfiguration) SetQuality(value *PrintQuality)() { + m.quality = value +} +// SetScaling sets the scaling property value. The scaling property +func (m *PrinterDocumentConfiguration) SetScaling(value *PrintScaling)() { + m.scaling = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_document_configurationable.go b/src/internal/connector/graph/betasdk/models/printer_document_configurationable.go new file mode 100644 index 000000000..b8fa8ab46 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_document_configurationable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterDocumentConfigurationable +type PrinterDocumentConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCollate()(*bool) + GetColorMode()(*PrintColorMode) + GetCopies()(*int32) + GetDpi()(*int32) + GetDuplexMode()(*PrintDuplexMode) + GetFeedDirection()(*PrinterFeedDirection) + GetFeedOrientation()(*PrinterFeedOrientation) + GetFinishings()([]PrintFinishing) + GetFitPdfToPage()(*bool) + GetInputBin()(*string) + GetMargin()(PrintMarginable) + GetMediaSize()(*string) + GetMediaType()(*string) + GetMultipageLayout()(*PrintMultipageLayout) + GetOdataType()(*string) + GetOrientation()(*PrintOrientation) + GetOutputBin()(*string) + GetPageRanges()([]IntegerRangeable) + GetPagesPerSheet()(*int32) + GetQuality()(*PrintQuality) + GetScaling()(*PrintScaling) + SetCollate(value *bool)() + SetColorMode(value *PrintColorMode)() + SetCopies(value *int32)() + SetDpi(value *int32)() + SetDuplexMode(value *PrintDuplexMode)() + SetFeedDirection(value *PrinterFeedDirection)() + SetFeedOrientation(value *PrinterFeedOrientation)() + SetFinishings(value []PrintFinishing)() + SetFitPdfToPage(value *bool)() + SetInputBin(value *string)() + SetMargin(value PrintMarginable)() + SetMediaSize(value *string)() + SetMediaType(value *string)() + SetMultipageLayout(value *PrintMultipageLayout)() + SetOdataType(value *string)() + SetOrientation(value *PrintOrientation)() + SetOutputBin(value *string)() + SetPageRanges(value []IntegerRangeable)() + SetPagesPerSheet(value *int32)() + SetQuality(value *PrintQuality)() + SetScaling(value *PrintScaling)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_feed_direction.go b/src/internal/connector/graph/betasdk/models/printer_feed_direction.go new file mode 100644 index 000000000..118399d28 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_feed_direction.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterFeedDirection int + +const ( + LONGEDGEFIRST_PRINTERFEEDDIRECTION PrinterFeedDirection = iota + SHORTEDGEFIRST_PRINTERFEEDDIRECTION +) + +func (i PrinterFeedDirection) String() string { + return []string{"longEdgeFirst", "shortEdgeFirst"}[i] +} +func ParsePrinterFeedDirection(v string) (interface{}, error) { + result := LONGEDGEFIRST_PRINTERFEEDDIRECTION + switch v { + case "longEdgeFirst": + result = LONGEDGEFIRST_PRINTERFEEDDIRECTION + case "shortEdgeFirst": + result = SHORTEDGEFIRST_PRINTERFEEDDIRECTION + default: + return 0, errors.New("Unknown PrinterFeedDirection value: " + v) + } + return &result, nil +} +func SerializePrinterFeedDirection(values []PrinterFeedDirection) []string { + 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/printer_feed_orientation.go b/src/internal/connector/graph/betasdk/models/printer_feed_orientation.go new file mode 100644 index 000000000..19b8845fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_feed_orientation.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterFeedOrientation int + +const ( + LONGEDGEFIRST_PRINTERFEEDORIENTATION PrinterFeedOrientation = iota + SHORTEDGEFIRST_PRINTERFEEDORIENTATION +) + +func (i PrinterFeedOrientation) String() string { + return []string{"longEdgeFirst", "shortEdgeFirst"}[i] +} +func ParsePrinterFeedOrientation(v string) (interface{}, error) { + result := LONGEDGEFIRST_PRINTERFEEDORIENTATION + switch v { + case "longEdgeFirst": + result = LONGEDGEFIRST_PRINTERFEEDORIENTATION + case "shortEdgeFirst": + result = SHORTEDGEFIRST_PRINTERFEEDORIENTATION + default: + return 0, errors.New("Unknown PrinterFeedOrientation value: " + v) + } + return &result, nil +} +func SerializePrinterFeedOrientation(values []PrinterFeedOrientation) []string { + 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/printer_location.go b/src/internal/connector/graph/betasdk/models/printer_location.go new file mode 100644 index 000000000..7089fb093 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_location.go @@ -0,0 +1,577 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterLocation +type PrinterLocation 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 altitude, in meters, that the printer is located at. + altitudeInMeters *int32 + // The building that the printer is located in. + building *string + // The city that the printer is located in. + city *string + // The country or region that the printer is located in. + countryOrRegion *string + // The floor that the printer is located on. Only numerical values are supported right now. + floor *string + // The description of the floor that the printer is located on. + floorDescription *string + // The floorNumber property + floorNumber *int32 + // The latitude that the printer is located at. + latitude *float64 + // The longitude that the printer is located at. + longitude *float64 + // The OdataType property + odataType *string + // The organizational hierarchy that the printer belongs to. The elements should be in hierarchical order. + organization []string + // The postal code that the printer is located in. + postalCode *string + // The description of the room that the printer is located in. + roomDescription *string + // The room that the printer is located in. Only numerical values are supported right now. + roomName *string + // The roomNumber property + roomNumber *int32 + // The site that the printer is located in. + site *string + // The state or province that the printer is located in. + stateOrProvince *string + // The street address where the printer is located. + streetAddress *string + // The subdivision that the printer is located in. The elements should be in hierarchical order. + subdivision []string + // The subunit property + subunit []string +} +// NewPrinterLocation instantiates a new printerLocation and sets the default values. +func NewPrinterLocation()(*PrinterLocation) { + m := &PrinterLocation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterLocation(), 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 *PrinterLocation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAltitudeInMeters gets the altitudeInMeters property value. The altitude, in meters, that the printer is located at. +func (m *PrinterLocation) GetAltitudeInMeters()(*int32) { + return m.altitudeInMeters +} +// GetBuilding gets the building property value. The building that the printer is located in. +func (m *PrinterLocation) GetBuilding()(*string) { + return m.building +} +// GetCity gets the city property value. The city that the printer is located in. +func (m *PrinterLocation) GetCity()(*string) { + return m.city +} +// GetCountryOrRegion gets the countryOrRegion property value. The country or region that the printer is located in. +func (m *PrinterLocation) GetCountryOrRegion()(*string) { + return m.countryOrRegion +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["altitudeInMeters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetAltitudeInMeters(val) + } + return nil + } + res["building"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuilding(val) + } + return nil + } + res["city"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCity(val) + } + return nil + } + res["countryOrRegion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryOrRegion(val) + } + return nil + } + res["floor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFloor(val) + } + return nil + } + res["floorDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFloorDescription(val) + } + return nil + } + res["floorNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFloorNumber(val) + } + return nil + } + res["latitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLatitude(val) + } + return nil + } + res["longitude"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetLongitude(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["organization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetOrganization(res) + } + return nil + } + res["postalCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPostalCode(val) + } + return nil + } + res["roomDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoomDescription(val) + } + return nil + } + res["roomName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoomName(val) + } + return nil + } + res["roomNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRoomNumber(val) + } + return nil + } + res["site"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSite(val) + } + return nil + } + res["stateOrProvince"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStateOrProvince(val) + } + return nil + } + res["streetAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStreetAddress(val) + } + return nil + } + res["subdivision"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSubdivision(res) + } + return nil + } + res["subunit"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSubunit(res) + } + return nil + } + return res +} +// GetFloor gets the floor property value. The floor that the printer is located on. Only numerical values are supported right now. +func (m *PrinterLocation) GetFloor()(*string) { + return m.floor +} +// GetFloorDescription gets the floorDescription property value. The description of the floor that the printer is located on. +func (m *PrinterLocation) GetFloorDescription()(*string) { + return m.floorDescription +} +// GetFloorNumber gets the floorNumber property value. The floorNumber property +func (m *PrinterLocation) GetFloorNumber()(*int32) { + return m.floorNumber +} +// GetLatitude gets the latitude property value. The latitude that the printer is located at. +func (m *PrinterLocation) GetLatitude()(*float64) { + return m.latitude +} +// GetLongitude gets the longitude property value. The longitude that the printer is located at. +func (m *PrinterLocation) GetLongitude()(*float64) { + return m.longitude +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterLocation) GetOdataType()(*string) { + return m.odataType +} +// GetOrganization gets the organization property value. The organizational hierarchy that the printer belongs to. The elements should be in hierarchical order. +func (m *PrinterLocation) GetOrganization()([]string) { + return m.organization +} +// GetPostalCode gets the postalCode property value. The postal code that the printer is located in. +func (m *PrinterLocation) GetPostalCode()(*string) { + return m.postalCode +} +// GetRoomDescription gets the roomDescription property value. The description of the room that the printer is located in. +func (m *PrinterLocation) GetRoomDescription()(*string) { + return m.roomDescription +} +// GetRoomName gets the roomName property value. The room that the printer is located in. Only numerical values are supported right now. +func (m *PrinterLocation) GetRoomName()(*string) { + return m.roomName +} +// GetRoomNumber gets the roomNumber property value. The roomNumber property +func (m *PrinterLocation) GetRoomNumber()(*int32) { + return m.roomNumber +} +// GetSite gets the site property value. The site that the printer is located in. +func (m *PrinterLocation) GetSite()(*string) { + return m.site +} +// GetStateOrProvince gets the stateOrProvince property value. The state or province that the printer is located in. +func (m *PrinterLocation) GetStateOrProvince()(*string) { + return m.stateOrProvince +} +// GetStreetAddress gets the streetAddress property value. The street address where the printer is located. +func (m *PrinterLocation) GetStreetAddress()(*string) { + return m.streetAddress +} +// GetSubdivision gets the subdivision property value. The subdivision that the printer is located in. The elements should be in hierarchical order. +func (m *PrinterLocation) GetSubdivision()([]string) { + return m.subdivision +} +// GetSubunit gets the subunit property value. The subunit property +func (m *PrinterLocation) GetSubunit()([]string) { + return m.subunit +} +// Serialize serializes information the current object +func (m *PrinterLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("altitudeInMeters", m.GetAltitudeInMeters()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("building", m.GetBuilding()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("city", m.GetCity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("countryOrRegion", m.GetCountryOrRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("floor", m.GetFloor()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("floorDescription", m.GetFloorDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("floorNumber", m.GetFloorNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("latitude", m.GetLatitude()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("longitude", m.GetLongitude()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetOrganization() != nil { + err := writer.WriteCollectionOfStringValues("organization", m.GetOrganization()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("postalCode", m.GetPostalCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("roomDescription", m.GetRoomDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("roomName", m.GetRoomName()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("roomNumber", m.GetRoomNumber()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("site", m.GetSite()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("stateOrProvince", m.GetStateOrProvince()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("streetAddress", m.GetStreetAddress()) + if err != nil { + return err + } + } + if m.GetSubdivision() != nil { + err := writer.WriteCollectionOfStringValues("subdivision", m.GetSubdivision()) + if err != nil { + return err + } + } + if m.GetSubunit() != nil { + err := writer.WriteCollectionOfStringValues("subunit", m.GetSubunit()) + 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 *PrinterLocation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAltitudeInMeters sets the altitudeInMeters property value. The altitude, in meters, that the printer is located at. +func (m *PrinterLocation) SetAltitudeInMeters(value *int32)() { + m.altitudeInMeters = value +} +// SetBuilding sets the building property value. The building that the printer is located in. +func (m *PrinterLocation) SetBuilding(value *string)() { + m.building = value +} +// SetCity sets the city property value. The city that the printer is located in. +func (m *PrinterLocation) SetCity(value *string)() { + m.city = value +} +// SetCountryOrRegion sets the countryOrRegion property value. The country or region that the printer is located in. +func (m *PrinterLocation) SetCountryOrRegion(value *string)() { + m.countryOrRegion = value +} +// SetFloor sets the floor property value. The floor that the printer is located on. Only numerical values are supported right now. +func (m *PrinterLocation) SetFloor(value *string)() { + m.floor = value +} +// SetFloorDescription sets the floorDescription property value. The description of the floor that the printer is located on. +func (m *PrinterLocation) SetFloorDescription(value *string)() { + m.floorDescription = value +} +// SetFloorNumber sets the floorNumber property value. The floorNumber property +func (m *PrinterLocation) SetFloorNumber(value *int32)() { + m.floorNumber = value +} +// SetLatitude sets the latitude property value. The latitude that the printer is located at. +func (m *PrinterLocation) SetLatitude(value *float64)() { + m.latitude = value +} +// SetLongitude sets the longitude property value. The longitude that the printer is located at. +func (m *PrinterLocation) SetLongitude(value *float64)() { + m.longitude = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterLocation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOrganization sets the organization property value. The organizational hierarchy that the printer belongs to. The elements should be in hierarchical order. +func (m *PrinterLocation) SetOrganization(value []string)() { + m.organization = value +} +// SetPostalCode sets the postalCode property value. The postal code that the printer is located in. +func (m *PrinterLocation) SetPostalCode(value *string)() { + m.postalCode = value +} +// SetRoomDescription sets the roomDescription property value. The description of the room that the printer is located in. +func (m *PrinterLocation) SetRoomDescription(value *string)() { + m.roomDescription = value +} +// SetRoomName sets the roomName property value. The room that the printer is located in. Only numerical values are supported right now. +func (m *PrinterLocation) SetRoomName(value *string)() { + m.roomName = value +} +// SetRoomNumber sets the roomNumber property value. The roomNumber property +func (m *PrinterLocation) SetRoomNumber(value *int32)() { + m.roomNumber = value +} +// SetSite sets the site property value. The site that the printer is located in. +func (m *PrinterLocation) SetSite(value *string)() { + m.site = value +} +// SetStateOrProvince sets the stateOrProvince property value. The state or province that the printer is located in. +func (m *PrinterLocation) SetStateOrProvince(value *string)() { + m.stateOrProvince = value +} +// SetStreetAddress sets the streetAddress property value. The street address where the printer is located. +func (m *PrinterLocation) SetStreetAddress(value *string)() { + m.streetAddress = value +} +// SetSubdivision sets the subdivision property value. The subdivision that the printer is located in. The elements should be in hierarchical order. +func (m *PrinterLocation) SetSubdivision(value []string)() { + m.subdivision = value +} +// SetSubunit sets the subunit property value. The subunit property +func (m *PrinterLocation) SetSubunit(value []string)() { + m.subunit = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_locationable.go b/src/internal/connector/graph/betasdk/models/printer_locationable.go new file mode 100644 index 000000000..66e43ed25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_locationable.go @@ -0,0 +1,51 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterLocationable +type PrinterLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAltitudeInMeters()(*int32) + GetBuilding()(*string) + GetCity()(*string) + GetCountryOrRegion()(*string) + GetFloor()(*string) + GetFloorDescription()(*string) + GetFloorNumber()(*int32) + GetLatitude()(*float64) + GetLongitude()(*float64) + GetOdataType()(*string) + GetOrganization()([]string) + GetPostalCode()(*string) + GetRoomDescription()(*string) + GetRoomName()(*string) + GetRoomNumber()(*int32) + GetSite()(*string) + GetStateOrProvince()(*string) + GetStreetAddress()(*string) + GetSubdivision()([]string) + GetSubunit()([]string) + SetAltitudeInMeters(value *int32)() + SetBuilding(value *string)() + SetCity(value *string)() + SetCountryOrRegion(value *string)() + SetFloor(value *string)() + SetFloorDescription(value *string)() + SetFloorNumber(value *int32)() + SetLatitude(value *float64)() + SetLongitude(value *float64)() + SetOdataType(value *string)() + SetOrganization(value []string)() + SetPostalCode(value *string)() + SetRoomDescription(value *string)() + SetRoomName(value *string)() + SetRoomNumber(value *int32)() + SetSite(value *string)() + SetStateOrProvince(value *string)() + SetStreetAddress(value *string)() + SetSubdivision(value []string)() + SetSubunit(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_processing_state.go b/src/internal/connector/graph/betasdk/models/printer_processing_state.go new file mode 100644 index 000000000..acc80aad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_processing_state.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterProcessingState int + +const ( + UNKNOWN_PRINTERPROCESSINGSTATE PrinterProcessingState = iota + IDLE_PRINTERPROCESSINGSTATE + PROCESSING_PRINTERPROCESSINGSTATE + STOPPED_PRINTERPROCESSINGSTATE + UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATE +) + +func (i PrinterProcessingState) String() string { + return []string{"unknown", "idle", "processing", "stopped", "unknownFutureValue"}[i] +} +func ParsePrinterProcessingState(v string) (interface{}, error) { + result := UNKNOWN_PRINTERPROCESSINGSTATE + switch v { + case "unknown": + result = UNKNOWN_PRINTERPROCESSINGSTATE + case "idle": + result = IDLE_PRINTERPROCESSINGSTATE + case "processing": + result = PROCESSING_PRINTERPROCESSINGSTATE + case "stopped": + result = STOPPED_PRINTERPROCESSINGSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATE + default: + return 0, errors.New("Unknown PrinterProcessingState value: " + v) + } + return &result, nil +} +func SerializePrinterProcessingState(values []PrinterProcessingState) []string { + 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/printer_processing_state_detail.go b/src/internal/connector/graph/betasdk/models/printer_processing_state_detail.go new file mode 100644 index 000000000..b7a75dfcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_processing_state_detail.go @@ -0,0 +1,2506 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterProcessingStateDetail int + +const ( + PAUSED_PRINTERPROCESSINGSTATEDETAIL PrinterProcessingStateDetail = iota + MEDIAJAM_PRINTERPROCESSINGSTATEDETAIL + MEDIANEEDED_PRINTERPROCESSINGSTATEDETAIL + MEDIALOW_PRINTERPROCESSINGSTATEDETAIL + MEDIAEMPTY_PRINTERPROCESSINGSTATEDETAIL + COVEROPEN_PRINTERPROCESSINGSTATEDETAIL + INTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + OUTPUTTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + OUTPUTAREAFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERSUPPLYLOW_PRINTERPROCESSINGSTATEDETAIL + MARKERSUPPLYEMPTY_PRINTERPROCESSINGSTATEDETAIL + INPUTTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + OUTPUTAREAALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEFULL_PRINTERPROCESSINGSTATEDETAIL + FUSEROVERTEMP_PRINTERPROCESSINGSTATEDETAIL + FUSERUNDERTEMP_PRINTERPROCESSINGSTATEDETAIL + OTHER_PRINTERPROCESSINGSTATEDETAIL + NONE_PRINTERPROCESSINGSTATEDETAIL + MOVINGTOPAUSED_PRINTERPROCESSINGSTATEDETAIL + SHUTDOWN_PRINTERPROCESSINGSTATEDETAIL + CONNECTINGTODEVICE_PRINTERPROCESSINGSTATEDETAIL + TIMEDOUT_PRINTERPROCESSINGSTATEDETAIL + STOPPING_PRINTERPROCESSINGSTATEDETAIL + STOPPEDPARTIALLY_PRINTERPROCESSINGSTATEDETAIL + TONERLOW_PRINTERPROCESSINGSTATEDETAIL + TONEREMPTY_PRINTERPROCESSINGSTATEDETAIL + SPOOLAREAFULL_PRINTERPROCESSINGSTATEDETAIL + DOOROPEN_PRINTERPROCESSINGSTATEDETAIL + OPTICALPHOTOCONDUCTORNEARENDOFLIFE_PRINTERPROCESSINGSTATEDETAIL + OPTICALPHOTOCONDUCTORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + DEVELOPERLOW_PRINTERPROCESSINGSTATEDETAIL + DEVELOPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERRESOURCEUNAVAILABLE_PRINTERPROCESSINGSTATEDETAIL + UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATEDETAIL + ALERTREMOVALOFBINARYCHANGEENTRY_PRINTERPROCESSINGSTATEDETAIL + BANDERADDED_PRINTERPROCESSINGSTATEDETAIL + BANDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + BANDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + BANDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + BANDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + BANDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + BANDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + BANDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + BANDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + BANDERFULL_PRINTERPROCESSINGSTATEDETAIL + BANDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + BANDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + BANDERJAM_PRINTERPROCESSINGSTATEDETAIL + BANDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + BANDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + BANDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + BANDERMISSING_PRINTERPROCESSINGSTATEDETAIL + BANDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + BANDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + BANDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + BANDEROPENED_PRINTERPROCESSINGSTATEDETAIL + BANDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + BANDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + BANDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + BANDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + BANDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + BANDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + BANDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + BANDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + BANDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + BANDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + BANDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + BANDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + BANDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + BANDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + BANDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + BINDERADDED_PRINTERPROCESSINGSTATEDETAIL + BINDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + BINDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + BINDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + BINDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + BINDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + BINDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + BINDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + BINDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + BINDERFULL_PRINTERPROCESSINGSTATEDETAIL + BINDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + BINDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + BINDERJAM_PRINTERPROCESSINGSTATEDETAIL + BINDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + BINDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + BINDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + BINDERMISSING_PRINTERPROCESSINGSTATEDETAIL + BINDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + BINDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + BINDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + BINDEROPENED_PRINTERPROCESSINGSTATEDETAIL + BINDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + BINDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + BINDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + BINDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + BINDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + BINDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + BINDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + BINDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + BINDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + BINDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + BINDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + BINDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + BINDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + BINDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + BINDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + CAMERAFAILURE_PRINTERPROCESSINGSTATEDETAIL + CHAMBERCOOLING_PRINTERPROCESSINGSTATEDETAIL + CHAMBERFAILURE_PRINTERPROCESSINGSTATEDETAIL + CHAMBERHEATING_PRINTERPROCESSINGSTATEDETAIL + CHAMBERTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + CHAMBERTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + CLEANERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + CLEANERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + CONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + DEACTIVATED_PRINTERPROCESSINGSTATEDETAIL + DELETED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERADDED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + DIECUTTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERFULL_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERJAM_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERMISSING_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + DIECUTTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTEROPENED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + DIECUTTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERCOOLING_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERFAILURE_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERHEATING_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERJAM_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + EXTRUDERTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + FANFAILURE_PRINTERPROCESSINGSTATEDETAIL + FAXMODEMLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + FAXMODEMLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + FAXMODEMMISSING_PRINTERPROCESSINGSTATEDETAIL + FAXMODEMTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + FAXMODEMTURNEDON_PRINTERPROCESSINGSTATEDETAIL + FOLDERADDED_PRINTERPROCESSINGSTATEDETAIL + FOLDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + FOLDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + FOLDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + FOLDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + FOLDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + FOLDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + FOLDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + FOLDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + FOLDERFULL_PRINTERPROCESSINGSTATEDETAIL + FOLDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + FOLDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + FOLDERJAM_PRINTERPROCESSINGSTATEDETAIL + FOLDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + FOLDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + FOLDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + FOLDERMISSING_PRINTERPROCESSINGSTATEDETAIL + FOLDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + FOLDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + FOLDEROPENED_PRINTERPROCESSINGSTATEDETAIL + FOLDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + FOLDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + FOLDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + FOLDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + FOLDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + FOLDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + FOLDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + FOLDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + FOLDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + FOLDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + HIBERNATE_PRINTERPROCESSINGSTATEDETAIL + HOLDNEWJOBS_PRINTERPROCESSINGSTATEDETAIL + IDENTIFYPRINTERREQUESTED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERADDED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + IMPRINTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERFULL_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERJAM_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERMISSING_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + IMPRINTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTEROPENED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + IMPRINTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + INPUTCANNOTFEEDSIZESELECTED_PRINTERPROCESSINGSTATEDETAIL + INPUTMANUALINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIACOLORCHANGE_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIAFORMPARTSCHANGE_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIASIZECHANGE_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIATRAYFAILURE_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIATRAYFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIATRAYJAM_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIATYPECHANGE_PRINTERPROCESSINGSTATEDETAIL + INPUTMEDIAWEIGHTCHANGE_PRINTERPROCESSINGSTATEDETAIL + INPUTPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + INPUTPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + INPUTPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + INPUTPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + INPUTTRAYELEVATIONFAILURE_PRINTERPROCESSINGSTATEDETAIL + INPUTTRAYPOSITIONFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERADDED_PRINTERPROCESSINGSTATEDETAIL + INSERTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + INSERTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + INSERTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + INSERTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + INSERTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + INSERTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + INSERTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + INSERTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + INSERTERFULL_PRINTERPROCESSINGSTATEDETAIL + INSERTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + INSERTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + INSERTERJAM_PRINTERPROCESSINGSTATEDETAIL + INSERTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + INSERTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + INSERTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + INSERTERMISSING_PRINTERPROCESSINGSTATEDETAIL + INSERTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + INSERTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + INSERTEROPENED_PRINTERPROCESSINGSTATEDETAIL + INSERTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + INSERTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + INSERTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + INSERTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + INSERTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + INSERTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + INSERTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + INSERTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + INSERTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + INSERTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + INTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERCARTRIDGEADDED_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERCARTRIDGEDELETED_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERCOMPLEXPAGEENCOUNTERED_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERMEMORYDECREASE_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERMEMORYINCREASE_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + INTERPRETERRESOURCEDELETED_PRINTERPROCESSINGSTATEDETAIL + LAMPATEOL_PRINTERPROCESSINGSTATEDETAIL + LAMPFAILURE_PRINTERPROCESSINGSTATEDETAIL + LAMPNEAREOL_PRINTERPROCESSINGSTATEDETAIL + LASERATEOL_PRINTERPROCESSINGSTATEDETAIL + LASERFAILURE_PRINTERPROCESSINGSTATEDETAIL + LASERNEAREOL_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEADDED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEATLIMIT_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPECLOSED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPECONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPECOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPECOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEEMPTY_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEFULL_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEJAM_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPELIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPELIFEOVER_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEMISSING_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPENEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEOFFLINE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEOPENED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEOVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPERECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPERECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEREMOVED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPERESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPERESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPETHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPETIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPETURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPETURNEDON_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + MAKEENVELOPEWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + MARKERADJUSTINGPRINTQUALITY_PRINTERPROCESSINGSTATEDETAIL + MARKERCLEANERMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERDEVELOPERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERDEVELOPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERDEVELOPERMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERFUSERMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERFUSERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + MARKERFUSERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + MARKERINKALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERINKEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERINKMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKEROPCMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERPRINTRIBBONALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERPRINTRIBBONEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERPRINTRIBBONMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERSUPPLYALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MARKERSUPPLYMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERTONERCARTRIDGEMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERTONERMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEINKRECEPTACLEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEINKRECEPTACLEFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEINKRECEPTACLEMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTEMISSING_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTETONERRECEPTACLEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTETONERRECEPTACLEFULL_PRINTERPROCESSINGSTATEDETAIL + MARKERWASTETONERRECEPTACLEMISSING_PRINTERPROCESSINGSTATEDETAIL + MATERIALEMPTY_PRINTERPROCESSINGSTATEDETAIL + MATERIALLOW_PRINTERPROCESSINGSTATEDETAIL + MATERIALNEEDED_PRINTERPROCESSINGSTATEDETAIL + MEDIADRYING_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHCANNOTDUPLEXMEDIASELECTED_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHFAILURE_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHINPUTEMPTY_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHINPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHINPUTJAM_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHJAM_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHMEDIATRAYALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHMEDIATRAYFULL_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHMEDIATRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHOUTPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHOUTPUTFULL_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHOUTPUTJAM_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + MEDIAPATHPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + MOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + OUTPUTMAILBOXSELECTFAILURE_PRINTERPROCESSINGSTATEDETAIL + OUTPUTMEDIATRAYFAILURE_PRINTERPROCESSINGSTATEDETAIL + OUTPUTMEDIATRAYFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + OUTPUTMEDIATRAYJAM_PRINTERPROCESSINGSTATEDETAIL + PERFORATERADDED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + PERFORATERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + PERFORATERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + PERFORATERCLOSED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + PERFORATEREMPTY_PRINTERPROCESSINGSTATEDETAIL + PERFORATERFULL_PRINTERPROCESSINGSTATEDETAIL + PERFORATERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + PERFORATERJAM_PRINTERPROCESSINGSTATEDETAIL + PERFORATERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + PERFORATERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + PERFORATERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERMISSING_PRINTERPROCESSINGSTATEDETAIL + PERFORATERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + PERFORATEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + PERFORATEROPENED_PRINTERPROCESSINGSTATEDETAIL + PERFORATEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + PERFORATERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERREMOVED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + PERFORATERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + PERFORATERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + PERFORATERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + PERFORATERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + PERFORATERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + PLATFORMCOOLING_PRINTERPROCESSINGSTATEDETAIL + PLATFORMFAILURE_PRINTERPROCESSINGSTATEDETAIL + PLATFORMHEATING_PRINTERPROCESSINGSTATEDETAIL + PLATFORMTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + PLATFORMTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + POWERDOWN_PRINTERPROCESSINGSTATEDETAIL + POWERUP_PRINTERPROCESSINGSTATEDETAIL + PRINTERMANUALRESET_PRINTERPROCESSINGSTATEDETAIL + PRINTERNMSRESET_PRINTERPROCESSINGSTATEDETAIL + PRINTERREADYTOPRINT_PRINTERPROCESSINGSTATEDETAIL + PUNCHERADDED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + PUNCHERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + PUNCHERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + PUNCHERCLOSED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + PUNCHEREMPTY_PRINTERPROCESSINGSTATEDETAIL + PUNCHERFULL_PRINTERPROCESSINGSTATEDETAIL + PUNCHERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + PUNCHERJAM_PRINTERPROCESSINGSTATEDETAIL + PUNCHERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + PUNCHERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + PUNCHERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERMISSING_PRINTERPROCESSINGSTATEDETAIL + PUNCHERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + PUNCHEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + PUNCHEROPENED_PRINTERPROCESSINGSTATEDETAIL + PUNCHEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + PUNCHERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERREMOVED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + PUNCHERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + PUNCHERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + PUNCHERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + PUNCHERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + PUNCHERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + RESUMING_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHFAILURE_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHINPUTEMPTY_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHINPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHINPUTJAM_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHJAM_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHOUTPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHOUTPUTFULL_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHOUTPUTJAM_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHTRAYALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHTRAYFULL_PRINTERPROCESSINGSTATEDETAIL + SCANMEDIAPATHTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + SCANNERLIGHTFAILURE_PRINTERPROCESSINGSTATEDETAIL + SCANNERLIGHTLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SCANNERLIGHTLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SCANNERLIGHTMISSING_PRINTERPROCESSINGSTATEDETAIL + SCANNERSENSORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SCANNERSENSORLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SCANNERSENSORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SCANNERSENSORMISSING_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERADDED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERFULL_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERJAM_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERMISSING_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTEROPENED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + SEPARATIONCUTTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORADDED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORATLIMIT_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORCLOSED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATOREMPTY_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORFULL_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORJAM_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORMISSING_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATOROFFLINE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATOROPENED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATOROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORREMOVED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORTURNEDON_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + SHEETROTATORWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + SLITTERADDED_PRINTERPROCESSINGSTATEDETAIL + SLITTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + SLITTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + SLITTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + SLITTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + SLITTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + SLITTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + SLITTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + SLITTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + SLITTERFULL_PRINTERPROCESSINGSTATEDETAIL + SLITTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + SLITTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + SLITTERJAM_PRINTERPROCESSINGSTATEDETAIL + SLITTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SLITTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SLITTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + SLITTERMISSING_PRINTERPROCESSINGSTATEDETAIL + SLITTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + SLITTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + SLITTEROPENED_PRINTERPROCESSINGSTATEDETAIL + SLITTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + SLITTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + SLITTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + SLITTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + SLITTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + SLITTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + SLITTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + SLITTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SLITTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + SLITTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + STACKERADDED_PRINTERPROCESSINGSTATEDETAIL + STACKERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + STACKERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + STACKERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + STACKERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STACKERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + STACKERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STACKERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + STACKEREMPTY_PRINTERPROCESSINGSTATEDETAIL + STACKERFULL_PRINTERPROCESSINGSTATEDETAIL + STACKERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + STACKERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + STACKERJAM_PRINTERPROCESSINGSTATEDETAIL + STACKERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + STACKERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + STACKERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + STACKERMISSING_PRINTERPROCESSINGSTATEDETAIL + STACKERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STACKERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + STACKEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + STACKEROPENED_PRINTERPROCESSINGSTATEDETAIL + STACKEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STACKERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + STACKERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STACKERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + STACKERREMOVED_PRINTERPROCESSINGSTATEDETAIL + STACKERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + STACKERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + STACKERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STACKERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + STACKERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + STACKERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + STACKERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STACKERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STACKERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + STACKERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + STANDBY_PRINTERPROCESSINGSTATEDETAIL + STAPLERADDED_PRINTERPROCESSINGSTATEDETAIL + STAPLERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + STAPLERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + STAPLERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + STAPLERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STAPLERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + STAPLERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STAPLERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + STAPLEREMPTY_PRINTERPROCESSINGSTATEDETAIL + STAPLERFULL_PRINTERPROCESSINGSTATEDETAIL + STAPLERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + STAPLERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + STAPLERJAM_PRINTERPROCESSINGSTATEDETAIL + STAPLERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + STAPLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + STAPLERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + STAPLERMISSING_PRINTERPROCESSINGSTATEDETAIL + STAPLERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + STAPLEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + STAPLEROPENED_PRINTERPROCESSINGSTATEDETAIL + STAPLEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + STAPLERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + STAPLERREMOVED_PRINTERPROCESSINGSTATEDETAIL + STAPLERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + STAPLERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + STAPLERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + STAPLERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + STAPLERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STAPLERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + STAPLERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + STITCHERADDED_PRINTERPROCESSINGSTATEDETAIL + STITCHERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + STITCHERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + STITCHERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + STITCHERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STITCHERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + STITCHERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + STITCHERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + STITCHEREMPTY_PRINTERPROCESSINGSTATEDETAIL + STITCHERFULL_PRINTERPROCESSINGSTATEDETAIL + STITCHERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + STITCHERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + STITCHERJAM_PRINTERPROCESSINGSTATEDETAIL + STITCHERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + STITCHERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + STITCHERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + STITCHERMISSING_PRINTERPROCESSINGSTATEDETAIL + STITCHERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + STITCHEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + STITCHEROPENED_PRINTERPROCESSINGSTATEDETAIL + STITCHEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + STITCHERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + STITCHERREMOVED_PRINTERPROCESSINGSTATEDETAIL + STITCHERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + STITCHERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + STITCHERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + STITCHERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + STITCHERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + STITCHERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + STITCHERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + SUBUNITADDED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + SUBUNITALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + SUBUNITATLIMIT_PRINTERPROCESSINGSTATEDETAIL + SUBUNITCLOSED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITCOOLINGDOWN_PRINTERPROCESSINGSTATEDETAIL + SUBUNITEMPTY_PRINTERPROCESSINGSTATEDETAIL + SUBUNITFULL_PRINTERPROCESSINGSTATEDETAIL + SUBUNITLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + SUBUNITLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + SUBUNITMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITMISSING_PRINTERPROCESSINGSTATEDETAIL + SUBUNITMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + SUBUNITOFFLINE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITOPENED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITOVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + SUBUNITRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITREMOVED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + SUBUNITTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + SUBUNITTURNEDON_PRINTERPROCESSINGSTATEDETAIL + SUBUNITUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITUNRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + SUBUNITWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + SUSPEND_PRINTERPROCESSINGSTATEDETAIL + TESTING_PRINTERPROCESSINGSTATEDETAIL + TRIMMERADDED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + TRIMMERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + TRIMMERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + TRIMMERCLOSED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + TRIMMEREMPTY_PRINTERPROCESSINGSTATEDETAIL + TRIMMERFULL_PRINTERPROCESSINGSTATEDETAIL + TRIMMERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + TRIMMERJAM_PRINTERPROCESSINGSTATEDETAIL + TRIMMERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + TRIMMERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + TRIMMERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERMISSING_PRINTERPROCESSINGSTATEDETAIL + TRIMMERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + TRIMMEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + TRIMMEROPENED_PRINTERPROCESSINGSTATEDETAIL + TRIMMEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + TRIMMERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERREMOVED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + TRIMMERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + TRIMMERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + TRIMMERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + TRIMMERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + TRIMMERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + UNKNOWN_PRINTERPROCESSINGSTATEDETAIL + WRAPPERADDED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + WRAPPERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + WRAPPERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + WRAPPERCLOSED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + WRAPPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + WRAPPERFULL_PRINTERPROCESSINGSTATEDETAIL + WRAPPERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + WRAPPERJAM_PRINTERPROCESSINGSTATEDETAIL + WRAPPERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + WRAPPERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + WRAPPERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERMISSING_PRINTERPROCESSINGSTATEDETAIL + WRAPPERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + WRAPPEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + WRAPPEROPENED_PRINTERPROCESSINGSTATEDETAIL + WRAPPEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + WRAPPERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERREMOVED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + WRAPPERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + WRAPPERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + WRAPPERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + WRAPPERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + WRAPPERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL +) + +func (i PrinterProcessingStateDetail) String() string { + return []string{"paused", "mediaJam", "mediaNeeded", "mediaLow", "mediaEmpty", "coverOpen", "interlockOpen", "outputTrayMissing", "outputAreaFull", "markerSupplyLow", "markerSupplyEmpty", "inputTrayMissing", "outputAreaAlmostFull", "markerWasteAlmostFull", "markerWasteFull", "fuserOverTemp", "fuserUnderTemp", "other", "none", "movingToPaused", "shutdown", "connectingToDevice", "timedOut", "stopping", "stoppedPartially", "tonerLow", "tonerEmpty", "spoolAreaFull", "doorOpen", "opticalPhotoConductorNearEndOfLife", "opticalPhotoConductorLifeOver", "developerLow", "developerEmpty", "interpreterResourceUnavailable", "unknownFutureValue", "alertRemovalOfBinaryChangeEntry", "banderAdded", "banderAlmostEmpty", "banderAlmostFull", "banderAtLimit", "banderClosed", "banderConfigurationChange", "banderCoverClosed", "banderCoverOpen", "banderEmpty", "banderFull", "banderInterlockClosed", "banderInterlockOpen", "banderJam", "banderLifeAlmostOver", "banderLifeOver", "banderMemoryExhausted", "banderMissing", "banderMotorFailure", "banderNearLimit", "banderOffline", "banderOpened", "banderOverTemperature", "banderPowerSaver", "banderRecoverableFailure", "banderRecoverableStorage", "banderRemoved", "banderResourceAdded", "banderResourceRemoved", "banderThermistorFailure", "banderTimingFailure", "banderTurnedOff", "banderTurnedOn", "banderUnderTemperature", "banderUnrecoverableFailure", "banderUnrecoverableStorageError", "banderWarmingUp", "binderAdded", "binderAlmostEmpty", "binderAlmostFull", "binderAtLimit", "binderClosed", "binderConfigurationChange", "binderCoverClosed", "binderCoverOpen", "binderEmpty", "binderFull", "binderInterlockClosed", "binderInterlockOpen", "binderJam", "binderLifeAlmostOver", "binderLifeOver", "binderMemoryExhausted", "binderMissing", "binderMotorFailure", "binderNearLimit", "binderOffline", "binderOpened", "binderOverTemperature", "binderPowerSaver", "binderRecoverableFailure", "binderRecoverableStorage", "binderRemoved", "binderResourceAdded", "binderResourceRemoved", "binderThermistorFailure", "binderTimingFailure", "binderTurnedOff", "binderTurnedOn", "binderUnderTemperature", "binderUnrecoverableFailure", "binderUnrecoverableStorageError", "binderWarmingUp", "cameraFailure", "chamberCooling", "chamberFailure", "chamberHeating", "chamberTemperatureHigh", "chamberTemperatureLow", "cleanerLifeAlmostOver", "cleanerLifeOver", "configurationChange", "deactivated", "deleted", "dieCutterAdded", "dieCutterAlmostEmpty", "dieCutterAlmostFull", "dieCutterAtLimit", "dieCutterClosed", "dieCutterConfigurationChange", "dieCutterCoverClosed", "dieCutterCoverOpen", "dieCutterEmpty", "dieCutterFull", "dieCutterInterlockClosed", "dieCutterInterlockOpen", "dieCutterJam", "dieCutterLifeAlmostOver", "dieCutterLifeOver", "dieCutterMemoryExhausted", "dieCutterMissing", "dieCutterMotorFailure", "dieCutterNearLimit", "dieCutterOffline", "dieCutterOpened", "dieCutterOverTemperature", "dieCutterPowerSaver", "dieCutterRecoverableFailure", "dieCutterRecoverableStorage", "dieCutterRemoved", "dieCutterResourceAdded", "dieCutterResourceRemoved", "dieCutterThermistorFailure", "dieCutterTimingFailure", "dieCutterTurnedOff", "dieCutterTurnedOn", "dieCutterUnderTemperature", "dieCutterUnrecoverableFailure", "dieCutterUnrecoverableStorageError", "dieCutterWarmingUp", "extruderCooling", "extruderFailure", "extruderHeating", "extruderJam", "extruderTemperatureHigh", "extruderTemperatureLow", "fanFailure", "faxModemLifeAlmostOver", "faxModemLifeOver", "faxModemMissing", "faxModemTurnedOff", "faxModemTurnedOn", "folderAdded", "folderAlmostEmpty", "folderAlmostFull", "folderAtLimit", "folderClosed", "folderConfigurationChange", "folderCoverClosed", "folderCoverOpen", "folderEmpty", "folderFull", "folderInterlockClosed", "folderInterlockOpen", "folderJam", "folderLifeAlmostOver", "folderLifeOver", "folderMemoryExhausted", "folderMissing", "folderMotorFailure", "folderNearLimit", "folderOffline", "folderOpened", "folderOverTemperature", "folderPowerSaver", "folderRecoverableFailure", "folderRecoverableStorage", "folderRemoved", "folderResourceAdded", "folderResourceRemoved", "folderThermistorFailure", "folderTimingFailure", "folderTurnedOff", "folderTurnedOn", "folderUnderTemperature", "folderUnrecoverableFailure", "folderUnrecoverableStorageError", "folderWarmingUp", "hibernate", "holdNewJobs", "identifyPrinterRequested", "imprinterAdded", "imprinterAlmostEmpty", "imprinterAlmostFull", "imprinterAtLimit", "imprinterClosed", "imprinterConfigurationChange", "imprinterCoverClosed", "imprinterCoverOpen", "imprinterEmpty", "imprinterFull", "imprinterInterlockClosed", "imprinterInterlockOpen", "imprinterJam", "imprinterLifeAlmostOver", "imprinterLifeOver", "imprinterMemoryExhausted", "imprinterMissing", "imprinterMotorFailure", "imprinterNearLimit", "imprinterOffline", "imprinterOpened", "imprinterOverTemperature", "imprinterPowerSaver", "imprinterRecoverableFailure", "imprinterRecoverableStorage", "imprinterRemoved", "imprinterResourceAdded", "imprinterResourceRemoved", "imprinterThermistorFailure", "imprinterTimingFailure", "imprinterTurnedOff", "imprinterTurnedOn", "imprinterUnderTemperature", "imprinterUnrecoverableFailure", "imprinterUnrecoverableStorageError", "imprinterWarmingUp", "inputCannotFeedSizeSelected", "inputManualInputRequest", "inputMediaColorChange", "inputMediaFormPartsChange", "inputMediaSizeChange", "inputMediaTrayFailure", "inputMediaTrayFeedError", "inputMediaTrayJam", "inputMediaTypeChange", "inputMediaWeightChange", "inputPickRollerFailure", "inputPickRollerLifeOver", "inputPickRollerLifeWarn", "inputPickRollerMissing", "inputTrayElevationFailure", "inputTrayPositionFailure", "inserterAdded", "inserterAlmostEmpty", "inserterAlmostFull", "inserterAtLimit", "inserterClosed", "inserterConfigurationChange", "inserterCoverClosed", "inserterCoverOpen", "inserterEmpty", "inserterFull", "inserterInterlockClosed", "inserterInterlockOpen", "inserterJam", "inserterLifeAlmostOver", "inserterLifeOver", "inserterMemoryExhausted", "inserterMissing", "inserterMotorFailure", "inserterNearLimit", "inserterOffline", "inserterOpened", "inserterOverTemperature", "inserterPowerSaver", "inserterRecoverableFailure", "inserterRecoverableStorage", "inserterRemoved", "inserterResourceAdded", "inserterResourceRemoved", "inserterThermistorFailure", "inserterTimingFailure", "inserterTurnedOff", "inserterTurnedOn", "inserterUnderTemperature", "inserterUnrecoverableFailure", "inserterUnrecoverableStorageError", "inserterWarmingUp", "interlockClosed", "interpreterCartridgeAdded", "interpreterCartridgeDeleted", "interpreterComplexPageEncountered", "interpreterMemoryDecrease", "interpreterMemoryIncrease", "interpreterResourceAdded", "interpreterResourceDeleted", "lampAtEol", "lampFailure", "lampNearEol", "laserAtEol", "laserFailure", "laserNearEol", "makeEnvelopeAdded", "makeEnvelopeAlmostEmpty", "makeEnvelopeAlmostFull", "makeEnvelopeAtLimit", "makeEnvelopeClosed", "makeEnvelopeConfigurationChange", "makeEnvelopeCoverClosed", "makeEnvelopeCoverOpen", "makeEnvelopeEmpty", "makeEnvelopeFull", "makeEnvelopeInterlockClosed", "makeEnvelopeInterlockOpen", "makeEnvelopeJam", "makeEnvelopeLifeAlmostOver", "makeEnvelopeLifeOver", "makeEnvelopeMemoryExhausted", "makeEnvelopeMissing", "makeEnvelopeMotorFailure", "makeEnvelopeNearLimit", "makeEnvelopeOffline", "makeEnvelopeOpened", "makeEnvelopeOverTemperature", "makeEnvelopePowerSaver", "makeEnvelopeRecoverableFailure", "makeEnvelopeRecoverableStorage", "makeEnvelopeRemoved", "makeEnvelopeResourceAdded", "makeEnvelopeResourceRemoved", "makeEnvelopeThermistorFailure", "makeEnvelopeTimingFailure", "makeEnvelopeTurnedOff", "makeEnvelopeTurnedOn", "makeEnvelopeUnderTemperature", "makeEnvelopeUnrecoverableFailure", "makeEnvelopeUnrecoverableStorageError", "makeEnvelopeWarmingUp", "markerAdjustingPrintQuality", "markerCleanerMissing", "markerDeveloperAlmostEmpty", "markerDeveloperEmpty", "markerDeveloperMissing", "markerFuserMissing", "markerFuserThermistorFailure", "markerFuserTimingFailure", "markerInkAlmostEmpty", "markerInkEmpty", "markerInkMissing", "markerOpcMissing", "markerPrintRibbonAlmostEmpty", "markerPrintRibbonEmpty", "markerPrintRibbonMissing", "markerSupplyAlmostEmpty", "markerSupplyMissing", "markerTonerCartridgeMissing", "markerTonerMissing", "markerWasteInkReceptacleAlmostFull", "markerWasteInkReceptacleFull", "markerWasteInkReceptacleMissing", "markerWasteMissing", "markerWasteTonerReceptacleAlmostFull", "markerWasteTonerReceptacleFull", "markerWasteTonerReceptacleMissing", "materialEmpty", "materialLow", "materialNeeded", "mediaDrying", "mediaPathCannotDuplexMediaSelected", "mediaPathFailure", "mediaPathInputEmpty", "mediaPathInputFeedError", "mediaPathInputJam", "mediaPathInputRequest", "mediaPathJam", "mediaPathMediaTrayAlmostFull", "mediaPathMediaTrayFull", "mediaPathMediaTrayMissing", "mediaPathOutputFeedError", "mediaPathOutputFull", "mediaPathOutputJam", "mediaPathPickRollerFailure", "mediaPathPickRollerLifeOver", "mediaPathPickRollerLifeWarn", "mediaPathPickRollerMissing", "motorFailure", "outputMailboxSelectFailure", "outputMediaTrayFailure", "outputMediaTrayFeedError", "outputMediaTrayJam", "perforaterAdded", "perforaterAlmostEmpty", "perforaterAlmostFull", "perforaterAtLimit", "perforaterClosed", "perforaterConfigurationChange", "perforaterCoverClosed", "perforaterCoverOpen", "perforaterEmpty", "perforaterFull", "perforaterInterlockClosed", "perforaterInterlockOpen", "perforaterJam", "perforaterLifeAlmostOver", "perforaterLifeOver", "perforaterMemoryExhausted", "perforaterMissing", "perforaterMotorFailure", "perforaterNearLimit", "perforaterOffline", "perforaterOpened", "perforaterOverTemperature", "perforaterPowerSaver", "perforaterRecoverableFailure", "perforaterRecoverableStorage", "perforaterRemoved", "perforaterResourceAdded", "perforaterResourceRemoved", "perforaterThermistorFailure", "perforaterTimingFailure", "perforaterTurnedOff", "perforaterTurnedOn", "perforaterUnderTemperature", "perforaterUnrecoverableFailure", "perforaterUnrecoverableStorageError", "perforaterWarmingUp", "platformCooling", "platformFailure", "platformHeating", "platformTemperatureHigh", "platformTemperatureLow", "powerDown", "powerUp", "printerManualReset", "printerNmsReset", "printerReadyToPrint", "puncherAdded", "puncherAlmostEmpty", "puncherAlmostFull", "puncherAtLimit", "puncherClosed", "puncherConfigurationChange", "puncherCoverClosed", "puncherCoverOpen", "puncherEmpty", "puncherFull", "puncherInterlockClosed", "puncherInterlockOpen", "puncherJam", "puncherLifeAlmostOver", "puncherLifeOver", "puncherMemoryExhausted", "puncherMissing", "puncherMotorFailure", "puncherNearLimit", "puncherOffline", "puncherOpened", "puncherOverTemperature", "puncherPowerSaver", "puncherRecoverableFailure", "puncherRecoverableStorage", "puncherRemoved", "puncherResourceAdded", "puncherResourceRemoved", "puncherThermistorFailure", "puncherTimingFailure", "puncherTurnedOff", "puncherTurnedOn", "puncherUnderTemperature", "puncherUnrecoverableFailure", "puncherUnrecoverableStorageError", "puncherWarmingUp", "resuming", "scanMediaPathFailure", "scanMediaPathInputEmpty", "scanMediaPathInputFeedError", "scanMediaPathInputJam", "scanMediaPathInputRequest", "scanMediaPathJam", "scanMediaPathOutputFeedError", "scanMediaPathOutputFull", "scanMediaPathOutputJam", "scanMediaPathPickRollerFailure", "scanMediaPathPickRollerLifeOver", "scanMediaPathPickRollerLifeWarn", "scanMediaPathPickRollerMissing", "scanMediaPathTrayAlmostFull", "scanMediaPathTrayFull", "scanMediaPathTrayMissing", "scannerLightFailure", "scannerLightLifeAlmostOver", "scannerLightLifeOver", "scannerLightMissing", "scannerSensorFailure", "scannerSensorLifeAlmostOver", "scannerSensorLifeOver", "scannerSensorMissing", "separationCutterAdded", "separationCutterAlmostEmpty", "separationCutterAlmostFull", "separationCutterAtLimit", "separationCutterClosed", "separationCutterConfigurationChange", "separationCutterCoverClosed", "separationCutterCoverOpen", "separationCutterEmpty", "separationCutterFull", "separationCutterInterlockClosed", "separationCutterInterlockOpen", "separationCutterJam", "separationCutterLifeAlmostOver", "separationCutterLifeOver", "separationCutterMemoryExhausted", "separationCutterMissing", "separationCutterMotorFailure", "separationCutterNearLimit", "separationCutterOffline", "separationCutterOpened", "separationCutterOverTemperature", "separationCutterPowerSaver", "separationCutterRecoverableFailure", "separationCutterRecoverableStorage", "separationCutterRemoved", "separationCutterResourceAdded", "separationCutterResourceRemoved", "separationCutterThermistorFailure", "separationCutterTimingFailure", "separationCutterTurnedOff", "separationCutterTurnedOn", "separationCutterUnderTemperature", "separationCutterUnrecoverableFailure", "separationCutterUnrecoverableStorageError", "separationCutterWarmingUp", "sheetRotatorAdded", "sheetRotatorAlmostEmpty", "sheetRotatorAlmostFull", "sheetRotatorAtLimit", "sheetRotatorClosed", "sheetRotatorConfigurationChange", "sheetRotatorCoverClosed", "sheetRotatorCoverOpen", "sheetRotatorEmpty", "sheetRotatorFull", "sheetRotatorInterlockClosed", "sheetRotatorInterlockOpen", "sheetRotatorJam", "sheetRotatorLifeAlmostOver", "sheetRotatorLifeOver", "sheetRotatorMemoryExhausted", "sheetRotatorMissing", "sheetRotatorMotorFailure", "sheetRotatorNearLimit", "sheetRotatorOffline", "sheetRotatorOpened", "sheetRotatorOverTemperature", "sheetRotatorPowerSaver", "sheetRotatorRecoverableFailure", "sheetRotatorRecoverableStorage", "sheetRotatorRemoved", "sheetRotatorResourceAdded", "sheetRotatorResourceRemoved", "sheetRotatorThermistorFailure", "sheetRotatorTimingFailure", "sheetRotatorTurnedOff", "sheetRotatorTurnedOn", "sheetRotatorUnderTemperature", "sheetRotatorUnrecoverableFailure", "sheetRotatorUnrecoverableStorageError", "sheetRotatorWarmingUp", "slitterAdded", "slitterAlmostEmpty", "slitterAlmostFull", "slitterAtLimit", "slitterClosed", "slitterConfigurationChange", "slitterCoverClosed", "slitterCoverOpen", "slitterEmpty", "slitterFull", "slitterInterlockClosed", "slitterInterlockOpen", "slitterJam", "slitterLifeAlmostOver", "slitterLifeOver", "slitterMemoryExhausted", "slitterMissing", "slitterMotorFailure", "slitterNearLimit", "slitterOffline", "slitterOpened", "slitterOverTemperature", "slitterPowerSaver", "slitterRecoverableFailure", "slitterRecoverableStorage", "slitterRemoved", "slitterResourceAdded", "slitterResourceRemoved", "slitterThermistorFailure", "slitterTimingFailure", "slitterTurnedOff", "slitterTurnedOn", "slitterUnderTemperature", "slitterUnrecoverableFailure", "slitterUnrecoverableStorageError", "slitterWarmingUp", "stackerAdded", "stackerAlmostEmpty", "stackerAlmostFull", "stackerAtLimit", "stackerClosed", "stackerConfigurationChange", "stackerCoverClosed", "stackerCoverOpen", "stackerEmpty", "stackerFull", "stackerInterlockClosed", "stackerInterlockOpen", "stackerJam", "stackerLifeAlmostOver", "stackerLifeOver", "stackerMemoryExhausted", "stackerMissing", "stackerMotorFailure", "stackerNearLimit", "stackerOffline", "stackerOpened", "stackerOverTemperature", "stackerPowerSaver", "stackerRecoverableFailure", "stackerRecoverableStorage", "stackerRemoved", "stackerResourceAdded", "stackerResourceRemoved", "stackerThermistorFailure", "stackerTimingFailure", "stackerTurnedOff", "stackerTurnedOn", "stackerUnderTemperature", "stackerUnrecoverableFailure", "stackerUnrecoverableStorageError", "stackerWarmingUp", "standby", "staplerAdded", "staplerAlmostEmpty", "staplerAlmostFull", "staplerAtLimit", "staplerClosed", "staplerConfigurationChange", "staplerCoverClosed", "staplerCoverOpen", "staplerEmpty", "staplerFull", "staplerInterlockClosed", "staplerInterlockOpen", "staplerJam", "staplerLifeAlmostOver", "staplerLifeOver", "staplerMemoryExhausted", "staplerMissing", "staplerMotorFailure", "staplerNearLimit", "staplerOffline", "staplerOpened", "staplerOverTemperature", "staplerPowerSaver", "staplerRecoverableFailure", "staplerRecoverableStorage", "staplerRemoved", "staplerResourceAdded", "staplerResourceRemoved", "staplerThermistorFailure", "staplerTimingFailure", "staplerTurnedOff", "staplerTurnedOn", "staplerUnderTemperature", "staplerUnrecoverableFailure", "staplerUnrecoverableStorageError", "staplerWarmingUp", "stitcherAdded", "stitcherAlmostEmpty", "stitcherAlmostFull", "stitcherAtLimit", "stitcherClosed", "stitcherConfigurationChange", "stitcherCoverClosed", "stitcherCoverOpen", "stitcherEmpty", "stitcherFull", "stitcherInterlockClosed", "stitcherInterlockOpen", "stitcherJam", "stitcherLifeAlmostOver", "stitcherLifeOver", "stitcherMemoryExhausted", "stitcherMissing", "stitcherMotorFailure", "stitcherNearLimit", "stitcherOffline", "stitcherOpened", "stitcherOverTemperature", "stitcherPowerSaver", "stitcherRecoverableFailure", "stitcherRecoverableStorage", "stitcherRemoved", "stitcherResourceAdded", "stitcherResourceRemoved", "stitcherThermistorFailure", "stitcherTimingFailure", "stitcherTurnedOff", "stitcherTurnedOn", "stitcherUnderTemperature", "stitcherUnrecoverableFailure", "stitcherUnrecoverableStorageError", "stitcherWarmingUp", "subunitAdded", "subunitAlmostEmpty", "subunitAlmostFull", "subunitAtLimit", "subunitClosed", "subunitCoolingDown", "subunitEmpty", "subunitFull", "subunitLifeAlmostOver", "subunitLifeOver", "subunitMemoryExhausted", "subunitMissing", "subunitMotorFailure", "subunitNearLimit", "subunitOffline", "subunitOpened", "subunitOverTemperature", "subunitPowerSaver", "subunitRecoverableFailure", "subunitRecoverableStorage", "subunitRemoved", "subunitResourceAdded", "subunitResourceRemoved", "subunitThermistorFailure", "subunitTimingFailure", "subunitTurnedOff", "subunitTurnedOn", "subunitUnderTemperature", "subunitUnrecoverableFailure", "subunitUnrecoverableStorage", "subunitWarmingUp", "suspend", "testing", "trimmerAdded", "trimmerAlmostEmpty", "trimmerAlmostFull", "trimmerAtLimit", "trimmerClosed", "trimmerConfigurationChange", "trimmerCoverClosed", "trimmerCoverOpen", "trimmerEmpty", "trimmerFull", "trimmerInterlockClosed", "trimmerInterlockOpen", "trimmerJam", "trimmerLifeAlmostOver", "trimmerLifeOver", "trimmerMemoryExhausted", "trimmerMissing", "trimmerMotorFailure", "trimmerNearLimit", "trimmerOffline", "trimmerOpened", "trimmerOverTemperature", "trimmerPowerSaver", "trimmerRecoverableFailure", "trimmerRecoverableStorage", "trimmerRemoved", "trimmerResourceAdded", "trimmerResourceRemoved", "trimmerThermistorFailure", "trimmerTimingFailure", "trimmerTurnedOff", "trimmerTurnedOn", "trimmerUnderTemperature", "trimmerUnrecoverableFailure", "trimmerUnrecoverableStorageError", "trimmerWarmingUp", "unknown", "wrapperAdded", "wrapperAlmostEmpty", "wrapperAlmostFull", "wrapperAtLimit", "wrapperClosed", "wrapperConfigurationChange", "wrapperCoverClosed", "wrapperCoverOpen", "wrapperEmpty", "wrapperFull", "wrapperInterlockClosed", "wrapperInterlockOpen", "wrapperJam", "wrapperLifeAlmostOver", "wrapperLifeOver", "wrapperMemoryExhausted", "wrapperMissing", "wrapperMotorFailure", "wrapperNearLimit", "wrapperOffline", "wrapperOpened", "wrapperOverTemperature", "wrapperPowerSaver", "wrapperRecoverableFailure", "wrapperRecoverableStorage", "wrapperRemoved", "wrapperResourceAdded", "wrapperResourceRemoved", "wrapperThermistorFailure", "wrapperTimingFailure", "wrapperTurnedOff", "wrapperTurnedOn", "wrapperUnderTemperature", "wrapperUnrecoverableFailure", "wrapperUnrecoverableStorageError", "wrapperWarmingUp"}[i] +} +func ParsePrinterProcessingStateDetail(v string) (interface{}, error) { + result := PAUSED_PRINTERPROCESSINGSTATEDETAIL + switch v { + case "paused": + result = PAUSED_PRINTERPROCESSINGSTATEDETAIL + case "mediaJam": + result = MEDIAJAM_PRINTERPROCESSINGSTATEDETAIL + case "mediaNeeded": + result = MEDIANEEDED_PRINTERPROCESSINGSTATEDETAIL + case "mediaLow": + result = MEDIALOW_PRINTERPROCESSINGSTATEDETAIL + case "mediaEmpty": + result = MEDIAEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "coverOpen": + result = COVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "interlockOpen": + result = INTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "outputTrayMissing": + result = OUTPUTTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + case "outputAreaFull": + result = OUTPUTAREAFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerSupplyLow": + result = MARKERSUPPLYLOW_PRINTERPROCESSINGSTATEDETAIL + case "markerSupplyEmpty": + result = MARKERSUPPLYEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "inputTrayMissing": + result = INPUTTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + case "outputAreaAlmostFull": + result = OUTPUTAREAALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteAlmostFull": + result = MARKERWASTEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteFull": + result = MARKERWASTEFULL_PRINTERPROCESSINGSTATEDETAIL + case "fuserOverTemp": + result = FUSEROVERTEMP_PRINTERPROCESSINGSTATEDETAIL + case "fuserUnderTemp": + result = FUSERUNDERTEMP_PRINTERPROCESSINGSTATEDETAIL + case "other": + result = OTHER_PRINTERPROCESSINGSTATEDETAIL + case "none": + result = NONE_PRINTERPROCESSINGSTATEDETAIL + case "movingToPaused": + result = MOVINGTOPAUSED_PRINTERPROCESSINGSTATEDETAIL + case "shutdown": + result = SHUTDOWN_PRINTERPROCESSINGSTATEDETAIL + case "connectingToDevice": + result = CONNECTINGTODEVICE_PRINTERPROCESSINGSTATEDETAIL + case "timedOut": + result = TIMEDOUT_PRINTERPROCESSINGSTATEDETAIL + case "stopping": + result = STOPPING_PRINTERPROCESSINGSTATEDETAIL + case "stoppedPartially": + result = STOPPEDPARTIALLY_PRINTERPROCESSINGSTATEDETAIL + case "tonerLow": + result = TONERLOW_PRINTERPROCESSINGSTATEDETAIL + case "tonerEmpty": + result = TONEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "spoolAreaFull": + result = SPOOLAREAFULL_PRINTERPROCESSINGSTATEDETAIL + case "doorOpen": + result = DOOROPEN_PRINTERPROCESSINGSTATEDETAIL + case "opticalPhotoConductorNearEndOfLife": + result = OPTICALPHOTOCONDUCTORNEARENDOFLIFE_PRINTERPROCESSINGSTATEDETAIL + case "opticalPhotoConductorLifeOver": + result = OPTICALPHOTOCONDUCTORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "developerLow": + result = DEVELOPERLOW_PRINTERPROCESSINGSTATEDETAIL + case "developerEmpty": + result = DEVELOPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "interpreterResourceUnavailable": + result = INTERPRETERRESOURCEUNAVAILABLE_PRINTERPROCESSINGSTATEDETAIL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATEDETAIL + case "alertRemovalOfBinaryChangeEntry": + result = ALERTREMOVALOFBINARYCHANGEENTRY_PRINTERPROCESSINGSTATEDETAIL + case "banderAdded": + result = BANDERADDED_PRINTERPROCESSINGSTATEDETAIL + case "banderAlmostEmpty": + result = BANDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "banderAlmostFull": + result = BANDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "banderAtLimit": + result = BANDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "banderClosed": + result = BANDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "banderConfigurationChange": + result = BANDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "banderCoverClosed": + result = BANDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "banderCoverOpen": + result = BANDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "banderEmpty": + result = BANDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "banderFull": + result = BANDERFULL_PRINTERPROCESSINGSTATEDETAIL + case "banderInterlockClosed": + result = BANDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "banderInterlockOpen": + result = BANDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "banderJam": + result = BANDERJAM_PRINTERPROCESSINGSTATEDETAIL + case "banderLifeAlmostOver": + result = BANDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "banderLifeOver": + result = BANDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "banderMemoryExhausted": + result = BANDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "banderMissing": + result = BANDERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "banderMotorFailure": + result = BANDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "banderNearLimit": + result = BANDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "banderOffline": + result = BANDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "banderOpened": + result = BANDEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "banderOverTemperature": + result = BANDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "banderPowerSaver": + result = BANDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "banderRecoverableFailure": + result = BANDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "banderRecoverableStorage": + result = BANDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "banderRemoved": + result = BANDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "banderResourceAdded": + result = BANDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "banderResourceRemoved": + result = BANDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "banderThermistorFailure": + result = BANDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "banderTimingFailure": + result = BANDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "banderTurnedOff": + result = BANDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "banderTurnedOn": + result = BANDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "banderUnderTemperature": + result = BANDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "banderUnrecoverableFailure": + result = BANDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "banderUnrecoverableStorageError": + result = BANDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "banderWarmingUp": + result = BANDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "binderAdded": + result = BINDERADDED_PRINTERPROCESSINGSTATEDETAIL + case "binderAlmostEmpty": + result = BINDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "binderAlmostFull": + result = BINDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "binderAtLimit": + result = BINDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "binderClosed": + result = BINDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "binderConfigurationChange": + result = BINDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "binderCoverClosed": + result = BINDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "binderCoverOpen": + result = BINDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "binderEmpty": + result = BINDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "binderFull": + result = BINDERFULL_PRINTERPROCESSINGSTATEDETAIL + case "binderInterlockClosed": + result = BINDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "binderInterlockOpen": + result = BINDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "binderJam": + result = BINDERJAM_PRINTERPROCESSINGSTATEDETAIL + case "binderLifeAlmostOver": + result = BINDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "binderLifeOver": + result = BINDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "binderMemoryExhausted": + result = BINDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "binderMissing": + result = BINDERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "binderMotorFailure": + result = BINDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "binderNearLimit": + result = BINDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "binderOffline": + result = BINDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "binderOpened": + result = BINDEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "binderOverTemperature": + result = BINDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "binderPowerSaver": + result = BINDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "binderRecoverableFailure": + result = BINDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "binderRecoverableStorage": + result = BINDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "binderRemoved": + result = BINDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "binderResourceAdded": + result = BINDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "binderResourceRemoved": + result = BINDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "binderThermistorFailure": + result = BINDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "binderTimingFailure": + result = BINDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "binderTurnedOff": + result = BINDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "binderTurnedOn": + result = BINDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "binderUnderTemperature": + result = BINDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "binderUnrecoverableFailure": + result = BINDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "binderUnrecoverableStorageError": + result = BINDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "binderWarmingUp": + result = BINDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "cameraFailure": + result = CAMERAFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "chamberCooling": + result = CHAMBERCOOLING_PRINTERPROCESSINGSTATEDETAIL + case "chamberFailure": + result = CHAMBERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "chamberHeating": + result = CHAMBERHEATING_PRINTERPROCESSINGSTATEDETAIL + case "chamberTemperatureHigh": + result = CHAMBERTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + case "chamberTemperatureLow": + result = CHAMBERTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + case "cleanerLifeAlmostOver": + result = CLEANERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "cleanerLifeOver": + result = CLEANERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "configurationChange": + result = CONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "deactivated": + result = DEACTIVATED_PRINTERPROCESSINGSTATEDETAIL + case "deleted": + result = DELETED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterAdded": + result = DIECUTTERADDED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterAlmostEmpty": + result = DIECUTTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterAlmostFull": + result = DIECUTTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterAtLimit": + result = DIECUTTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterClosed": + result = DIECUTTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterConfigurationChange": + result = DIECUTTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterCoverClosed": + result = DIECUTTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterCoverOpen": + result = DIECUTTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterEmpty": + result = DIECUTTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterFull": + result = DIECUTTERFULL_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterInterlockClosed": + result = DIECUTTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterInterlockOpen": + result = DIECUTTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterJam": + result = DIECUTTERJAM_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterLifeAlmostOver": + result = DIECUTTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterLifeOver": + result = DIECUTTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterMemoryExhausted": + result = DIECUTTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterMissing": + result = DIECUTTERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterMotorFailure": + result = DIECUTTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterNearLimit": + result = DIECUTTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterOffline": + result = DIECUTTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterOpened": + result = DIECUTTEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterOverTemperature": + result = DIECUTTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterPowerSaver": + result = DIECUTTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterRecoverableFailure": + result = DIECUTTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterRecoverableStorage": + result = DIECUTTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterRemoved": + result = DIECUTTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterResourceAdded": + result = DIECUTTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterResourceRemoved": + result = DIECUTTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterThermistorFailure": + result = DIECUTTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterTimingFailure": + result = DIECUTTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterTurnedOff": + result = DIECUTTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterTurnedOn": + result = DIECUTTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterUnderTemperature": + result = DIECUTTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterUnrecoverableFailure": + result = DIECUTTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterUnrecoverableStorageError": + result = DIECUTTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "dieCutterWarmingUp": + result = DIECUTTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "extruderCooling": + result = EXTRUDERCOOLING_PRINTERPROCESSINGSTATEDETAIL + case "extruderFailure": + result = EXTRUDERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "extruderHeating": + result = EXTRUDERHEATING_PRINTERPROCESSINGSTATEDETAIL + case "extruderJam": + result = EXTRUDERJAM_PRINTERPROCESSINGSTATEDETAIL + case "extruderTemperatureHigh": + result = EXTRUDERTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + case "extruderTemperatureLow": + result = EXTRUDERTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + case "fanFailure": + result = FANFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "faxModemLifeAlmostOver": + result = FAXMODEMLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "faxModemLifeOver": + result = FAXMODEMLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "faxModemMissing": + result = FAXMODEMMISSING_PRINTERPROCESSINGSTATEDETAIL + case "faxModemTurnedOff": + result = FAXMODEMTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "faxModemTurnedOn": + result = FAXMODEMTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "folderAdded": + result = FOLDERADDED_PRINTERPROCESSINGSTATEDETAIL + case "folderAlmostEmpty": + result = FOLDERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "folderAlmostFull": + result = FOLDERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "folderAtLimit": + result = FOLDERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "folderClosed": + result = FOLDERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "folderConfigurationChange": + result = FOLDERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "folderCoverClosed": + result = FOLDERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "folderCoverOpen": + result = FOLDERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "folderEmpty": + result = FOLDEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "folderFull": + result = FOLDERFULL_PRINTERPROCESSINGSTATEDETAIL + case "folderInterlockClosed": + result = FOLDERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "folderInterlockOpen": + result = FOLDERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "folderJam": + result = FOLDERJAM_PRINTERPROCESSINGSTATEDETAIL + case "folderLifeAlmostOver": + result = FOLDERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "folderLifeOver": + result = FOLDERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "folderMemoryExhausted": + result = FOLDERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "folderMissing": + result = FOLDERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "folderMotorFailure": + result = FOLDERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "folderNearLimit": + result = FOLDERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "folderOffline": + result = FOLDEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "folderOpened": + result = FOLDEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "folderOverTemperature": + result = FOLDEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "folderPowerSaver": + result = FOLDERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "folderRecoverableFailure": + result = FOLDERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "folderRecoverableStorage": + result = FOLDERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "folderRemoved": + result = FOLDERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "folderResourceAdded": + result = FOLDERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "folderResourceRemoved": + result = FOLDERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "folderThermistorFailure": + result = FOLDERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "folderTimingFailure": + result = FOLDERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "folderTurnedOff": + result = FOLDERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "folderTurnedOn": + result = FOLDERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "folderUnderTemperature": + result = FOLDERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "folderUnrecoverableFailure": + result = FOLDERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "folderUnrecoverableStorageError": + result = FOLDERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "folderWarmingUp": + result = FOLDERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "hibernate": + result = HIBERNATE_PRINTERPROCESSINGSTATEDETAIL + case "holdNewJobs": + result = HOLDNEWJOBS_PRINTERPROCESSINGSTATEDETAIL + case "identifyPrinterRequested": + result = IDENTIFYPRINTERREQUESTED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterAdded": + result = IMPRINTERADDED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterAlmostEmpty": + result = IMPRINTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "imprinterAlmostFull": + result = IMPRINTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "imprinterAtLimit": + result = IMPRINTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "imprinterClosed": + result = IMPRINTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterConfigurationChange": + result = IMPRINTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterCoverClosed": + result = IMPRINTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterCoverOpen": + result = IMPRINTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "imprinterEmpty": + result = IMPRINTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "imprinterFull": + result = IMPRINTERFULL_PRINTERPROCESSINGSTATEDETAIL + case "imprinterInterlockClosed": + result = IMPRINTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterInterlockOpen": + result = IMPRINTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "imprinterJam": + result = IMPRINTERJAM_PRINTERPROCESSINGSTATEDETAIL + case "imprinterLifeAlmostOver": + result = IMPRINTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "imprinterLifeOver": + result = IMPRINTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "imprinterMemoryExhausted": + result = IMPRINTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterMissing": + result = IMPRINTERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "imprinterMotorFailure": + result = IMPRINTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterNearLimit": + result = IMPRINTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "imprinterOffline": + result = IMPRINTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterOpened": + result = IMPRINTEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterOverTemperature": + result = IMPRINTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterPowerSaver": + result = IMPRINTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "imprinterRecoverableFailure": + result = IMPRINTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterRecoverableStorage": + result = IMPRINTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterRemoved": + result = IMPRINTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterResourceAdded": + result = IMPRINTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterResourceRemoved": + result = IMPRINTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "imprinterThermistorFailure": + result = IMPRINTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterTimingFailure": + result = IMPRINTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterTurnedOff": + result = IMPRINTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "imprinterTurnedOn": + result = IMPRINTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "imprinterUnderTemperature": + result = IMPRINTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterUnrecoverableFailure": + result = IMPRINTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "imprinterUnrecoverableStorageError": + result = IMPRINTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "imprinterWarmingUp": + result = IMPRINTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "inputCannotFeedSizeSelected": + result = INPUTCANNOTFEEDSIZESELECTED_PRINTERPROCESSINGSTATEDETAIL + case "inputManualInputRequest": + result = INPUTMANUALINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaColorChange": + result = INPUTMEDIACOLORCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaFormPartsChange": + result = INPUTMEDIAFORMPARTSCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaSizeChange": + result = INPUTMEDIASIZECHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaTrayFailure": + result = INPUTMEDIATRAYFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaTrayFeedError": + result = INPUTMEDIATRAYFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaTrayJam": + result = INPUTMEDIATRAYJAM_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaTypeChange": + result = INPUTMEDIATYPECHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inputMediaWeightChange": + result = INPUTMEDIAWEIGHTCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inputPickRollerFailure": + result = INPUTPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inputPickRollerLifeOver": + result = INPUTPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "inputPickRollerLifeWarn": + result = INPUTPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + case "inputPickRollerMissing": + result = INPUTPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "inputTrayElevationFailure": + result = INPUTTRAYELEVATIONFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inputTrayPositionFailure": + result = INPUTTRAYPOSITIONFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterAdded": + result = INSERTERADDED_PRINTERPROCESSINGSTATEDETAIL + case "inserterAlmostEmpty": + result = INSERTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "inserterAlmostFull": + result = INSERTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "inserterAtLimit": + result = INSERTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "inserterClosed": + result = INSERTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "inserterConfigurationChange": + result = INSERTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "inserterCoverClosed": + result = INSERTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "inserterCoverOpen": + result = INSERTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "inserterEmpty": + result = INSERTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "inserterFull": + result = INSERTERFULL_PRINTERPROCESSINGSTATEDETAIL + case "inserterInterlockClosed": + result = INSERTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "inserterInterlockOpen": + result = INSERTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "inserterJam": + result = INSERTERJAM_PRINTERPROCESSINGSTATEDETAIL + case "inserterLifeAlmostOver": + result = INSERTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "inserterLifeOver": + result = INSERTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "inserterMemoryExhausted": + result = INSERTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "inserterMissing": + result = INSERTERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "inserterMotorFailure": + result = INSERTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterNearLimit": + result = INSERTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "inserterOffline": + result = INSERTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "inserterOpened": + result = INSERTEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "inserterOverTemperature": + result = INSERTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterPowerSaver": + result = INSERTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "inserterRecoverableFailure": + result = INSERTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterRecoverableStorage": + result = INSERTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "inserterRemoved": + result = INSERTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "inserterResourceAdded": + result = INSERTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "inserterResourceRemoved": + result = INSERTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "inserterThermistorFailure": + result = INSERTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterTimingFailure": + result = INSERTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterTurnedOff": + result = INSERTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "inserterTurnedOn": + result = INSERTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "inserterUnderTemperature": + result = INSERTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterUnrecoverableFailure": + result = INSERTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "inserterUnrecoverableStorageError": + result = INSERTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "inserterWarmingUp": + result = INSERTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "interlockClosed": + result = INTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "interpreterCartridgeAdded": + result = INTERPRETERCARTRIDGEADDED_PRINTERPROCESSINGSTATEDETAIL + case "interpreterCartridgeDeleted": + result = INTERPRETERCARTRIDGEDELETED_PRINTERPROCESSINGSTATEDETAIL + case "interpreterComplexPageEncountered": + result = INTERPRETERCOMPLEXPAGEENCOUNTERED_PRINTERPROCESSINGSTATEDETAIL + case "interpreterMemoryDecrease": + result = INTERPRETERMEMORYDECREASE_PRINTERPROCESSINGSTATEDETAIL + case "interpreterMemoryIncrease": + result = INTERPRETERMEMORYINCREASE_PRINTERPROCESSINGSTATEDETAIL + case "interpreterResourceAdded": + result = INTERPRETERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "interpreterResourceDeleted": + result = INTERPRETERRESOURCEDELETED_PRINTERPROCESSINGSTATEDETAIL + case "lampAtEol": + result = LAMPATEOL_PRINTERPROCESSINGSTATEDETAIL + case "lampFailure": + result = LAMPFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "lampNearEol": + result = LAMPNEAREOL_PRINTERPROCESSINGSTATEDETAIL + case "laserAtEol": + result = LASERATEOL_PRINTERPROCESSINGSTATEDETAIL + case "laserFailure": + result = LASERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "laserNearEol": + result = LASERNEAREOL_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeAdded": + result = MAKEENVELOPEADDED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeAlmostEmpty": + result = MAKEENVELOPEALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeAlmostFull": + result = MAKEENVELOPEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeAtLimit": + result = MAKEENVELOPEATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeClosed": + result = MAKEENVELOPECLOSED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeConfigurationChange": + result = MAKEENVELOPECONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeCoverClosed": + result = MAKEENVELOPECOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeCoverOpen": + result = MAKEENVELOPECOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeEmpty": + result = MAKEENVELOPEEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeFull": + result = MAKEENVELOPEFULL_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeInterlockClosed": + result = MAKEENVELOPEINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeInterlockOpen": + result = MAKEENVELOPEINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeJam": + result = MAKEENVELOPEJAM_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeLifeAlmostOver": + result = MAKEENVELOPELIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeLifeOver": + result = MAKEENVELOPELIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeMemoryExhausted": + result = MAKEENVELOPEMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeMissing": + result = MAKEENVELOPEMISSING_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeMotorFailure": + result = MAKEENVELOPEMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeNearLimit": + result = MAKEENVELOPENEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeOffline": + result = MAKEENVELOPEOFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeOpened": + result = MAKEENVELOPEOPENED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeOverTemperature": + result = MAKEENVELOPEOVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopePowerSaver": + result = MAKEENVELOPEPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeRecoverableFailure": + result = MAKEENVELOPERECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeRecoverableStorage": + result = MAKEENVELOPERECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeRemoved": + result = MAKEENVELOPEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeResourceAdded": + result = MAKEENVELOPERESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeResourceRemoved": + result = MAKEENVELOPERESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeThermistorFailure": + result = MAKEENVELOPETHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeTimingFailure": + result = MAKEENVELOPETIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeTurnedOff": + result = MAKEENVELOPETURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeTurnedOn": + result = MAKEENVELOPETURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeUnderTemperature": + result = MAKEENVELOPEUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeUnrecoverableFailure": + result = MAKEENVELOPEUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeUnrecoverableStorageError": + result = MAKEENVELOPEUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "makeEnvelopeWarmingUp": + result = MAKEENVELOPEWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "markerAdjustingPrintQuality": + result = MARKERADJUSTINGPRINTQUALITY_PRINTERPROCESSINGSTATEDETAIL + case "markerCleanerMissing": + result = MARKERCLEANERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerDeveloperAlmostEmpty": + result = MARKERDEVELOPERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerDeveloperEmpty": + result = MARKERDEVELOPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerDeveloperMissing": + result = MARKERDEVELOPERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerFuserMissing": + result = MARKERFUSERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerFuserThermistorFailure": + result = MARKERFUSERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "markerFuserTimingFailure": + result = MARKERFUSERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "markerInkAlmostEmpty": + result = MARKERINKALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerInkEmpty": + result = MARKERINKEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerInkMissing": + result = MARKERINKMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerOpcMissing": + result = MARKEROPCMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerPrintRibbonAlmostEmpty": + result = MARKERPRINTRIBBONALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerPrintRibbonEmpty": + result = MARKERPRINTRIBBONEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerPrintRibbonMissing": + result = MARKERPRINTRIBBONMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerSupplyAlmostEmpty": + result = MARKERSUPPLYALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "markerSupplyMissing": + result = MARKERSUPPLYMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerTonerCartridgeMissing": + result = MARKERTONERCARTRIDGEMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerTonerMissing": + result = MARKERTONERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteInkReceptacleAlmostFull": + result = MARKERWASTEINKRECEPTACLEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteInkReceptacleFull": + result = MARKERWASTEINKRECEPTACLEFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteInkReceptacleMissing": + result = MARKERWASTEINKRECEPTACLEMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteMissing": + result = MARKERWASTEMISSING_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteTonerReceptacleAlmostFull": + result = MARKERWASTETONERRECEPTACLEALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteTonerReceptacleFull": + result = MARKERWASTETONERRECEPTACLEFULL_PRINTERPROCESSINGSTATEDETAIL + case "markerWasteTonerReceptacleMissing": + result = MARKERWASTETONERRECEPTACLEMISSING_PRINTERPROCESSINGSTATEDETAIL + case "materialEmpty": + result = MATERIALEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "materialLow": + result = MATERIALLOW_PRINTERPROCESSINGSTATEDETAIL + case "materialNeeded": + result = MATERIALNEEDED_PRINTERPROCESSINGSTATEDETAIL + case "mediaDrying": + result = MEDIADRYING_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathCannotDuplexMediaSelected": + result = MEDIAPATHCANNOTDUPLEXMEDIASELECTED_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathFailure": + result = MEDIAPATHFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathInputEmpty": + result = MEDIAPATHINPUTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathInputFeedError": + result = MEDIAPATHINPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathInputJam": + result = MEDIAPATHINPUTJAM_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathInputRequest": + result = MEDIAPATHINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathJam": + result = MEDIAPATHJAM_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathMediaTrayAlmostFull": + result = MEDIAPATHMEDIATRAYALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathMediaTrayFull": + result = MEDIAPATHMEDIATRAYFULL_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathMediaTrayMissing": + result = MEDIAPATHMEDIATRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathOutputFeedError": + result = MEDIAPATHOUTPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathOutputFull": + result = MEDIAPATHOUTPUTFULL_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathOutputJam": + result = MEDIAPATHOUTPUTJAM_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathPickRollerFailure": + result = MEDIAPATHPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathPickRollerLifeOver": + result = MEDIAPATHPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathPickRollerLifeWarn": + result = MEDIAPATHPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + case "mediaPathPickRollerMissing": + result = MEDIAPATHPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "motorFailure": + result = MOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "outputMailboxSelectFailure": + result = OUTPUTMAILBOXSELECTFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "outputMediaTrayFailure": + result = OUTPUTMEDIATRAYFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "outputMediaTrayFeedError": + result = OUTPUTMEDIATRAYFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "outputMediaTrayJam": + result = OUTPUTMEDIATRAYJAM_PRINTERPROCESSINGSTATEDETAIL + case "perforaterAdded": + result = PERFORATERADDED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterAlmostEmpty": + result = PERFORATERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "perforaterAlmostFull": + result = PERFORATERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "perforaterAtLimit": + result = PERFORATERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "perforaterClosed": + result = PERFORATERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterConfigurationChange": + result = PERFORATERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterCoverClosed": + result = PERFORATERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterCoverOpen": + result = PERFORATERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "perforaterEmpty": + result = PERFORATEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "perforaterFull": + result = PERFORATERFULL_PRINTERPROCESSINGSTATEDETAIL + case "perforaterInterlockClosed": + result = PERFORATERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterInterlockOpen": + result = PERFORATERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "perforaterJam": + result = PERFORATERJAM_PRINTERPROCESSINGSTATEDETAIL + case "perforaterLifeAlmostOver": + result = PERFORATERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "perforaterLifeOver": + result = PERFORATERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "perforaterMemoryExhausted": + result = PERFORATERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterMissing": + result = PERFORATERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "perforaterMotorFailure": + result = PERFORATERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterNearLimit": + result = PERFORATERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "perforaterOffline": + result = PERFORATEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterOpened": + result = PERFORATEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterOverTemperature": + result = PERFORATEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterPowerSaver": + result = PERFORATERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "perforaterRecoverableFailure": + result = PERFORATERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterRecoverableStorage": + result = PERFORATERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterRemoved": + result = PERFORATERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterResourceAdded": + result = PERFORATERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterResourceRemoved": + result = PERFORATERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "perforaterThermistorFailure": + result = PERFORATERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterTimingFailure": + result = PERFORATERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterTurnedOff": + result = PERFORATERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "perforaterTurnedOn": + result = PERFORATERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "perforaterUnderTemperature": + result = PERFORATERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterUnrecoverableFailure": + result = PERFORATERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "perforaterUnrecoverableStorageError": + result = PERFORATERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "perforaterWarmingUp": + result = PERFORATERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "platformCooling": + result = PLATFORMCOOLING_PRINTERPROCESSINGSTATEDETAIL + case "platformFailure": + result = PLATFORMFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "platformHeating": + result = PLATFORMHEATING_PRINTERPROCESSINGSTATEDETAIL + case "platformTemperatureHigh": + result = PLATFORMTEMPERATUREHIGH_PRINTERPROCESSINGSTATEDETAIL + case "platformTemperatureLow": + result = PLATFORMTEMPERATURELOW_PRINTERPROCESSINGSTATEDETAIL + case "powerDown": + result = POWERDOWN_PRINTERPROCESSINGSTATEDETAIL + case "powerUp": + result = POWERUP_PRINTERPROCESSINGSTATEDETAIL + case "printerManualReset": + result = PRINTERMANUALRESET_PRINTERPROCESSINGSTATEDETAIL + case "printerNmsReset": + result = PRINTERNMSRESET_PRINTERPROCESSINGSTATEDETAIL + case "printerReadyToPrint": + result = PRINTERREADYTOPRINT_PRINTERPROCESSINGSTATEDETAIL + case "puncherAdded": + result = PUNCHERADDED_PRINTERPROCESSINGSTATEDETAIL + case "puncherAlmostEmpty": + result = PUNCHERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "puncherAlmostFull": + result = PUNCHERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "puncherAtLimit": + result = PUNCHERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "puncherClosed": + result = PUNCHERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "puncherConfigurationChange": + result = PUNCHERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "puncherCoverClosed": + result = PUNCHERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "puncherCoverOpen": + result = PUNCHERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "puncherEmpty": + result = PUNCHEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "puncherFull": + result = PUNCHERFULL_PRINTERPROCESSINGSTATEDETAIL + case "puncherInterlockClosed": + result = PUNCHERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "puncherInterlockOpen": + result = PUNCHERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "puncherJam": + result = PUNCHERJAM_PRINTERPROCESSINGSTATEDETAIL + case "puncherLifeAlmostOver": + result = PUNCHERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "puncherLifeOver": + result = PUNCHERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "puncherMemoryExhausted": + result = PUNCHERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "puncherMissing": + result = PUNCHERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "puncherMotorFailure": + result = PUNCHERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherNearLimit": + result = PUNCHERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "puncherOffline": + result = PUNCHEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "puncherOpened": + result = PUNCHEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "puncherOverTemperature": + result = PUNCHEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherPowerSaver": + result = PUNCHERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "puncherRecoverableFailure": + result = PUNCHERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherRecoverableStorage": + result = PUNCHERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "puncherRemoved": + result = PUNCHERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "puncherResourceAdded": + result = PUNCHERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "puncherResourceRemoved": + result = PUNCHERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "puncherThermistorFailure": + result = PUNCHERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherTimingFailure": + result = PUNCHERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherTurnedOff": + result = PUNCHERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "puncherTurnedOn": + result = PUNCHERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "puncherUnderTemperature": + result = PUNCHERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherUnrecoverableFailure": + result = PUNCHERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "puncherUnrecoverableStorageError": + result = PUNCHERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "puncherWarmingUp": + result = PUNCHERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "resuming": + result = RESUMING_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathFailure": + result = SCANMEDIAPATHFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathInputEmpty": + result = SCANMEDIAPATHINPUTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathInputFeedError": + result = SCANMEDIAPATHINPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathInputJam": + result = SCANMEDIAPATHINPUTJAM_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathInputRequest": + result = SCANMEDIAPATHINPUTREQUEST_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathJam": + result = SCANMEDIAPATHJAM_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathOutputFeedError": + result = SCANMEDIAPATHOUTPUTFEEDERROR_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathOutputFull": + result = SCANMEDIAPATHOUTPUTFULL_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathOutputJam": + result = SCANMEDIAPATHOUTPUTJAM_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathPickRollerFailure": + result = SCANMEDIAPATHPICKROLLERFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathPickRollerLifeOver": + result = SCANMEDIAPATHPICKROLLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathPickRollerLifeWarn": + result = SCANMEDIAPATHPICKROLLERLIFEWARN_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathPickRollerMissing": + result = SCANMEDIAPATHPICKROLLERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathTrayAlmostFull": + result = SCANMEDIAPATHTRAYALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathTrayFull": + result = SCANMEDIAPATHTRAYFULL_PRINTERPROCESSINGSTATEDETAIL + case "scanMediaPathTrayMissing": + result = SCANMEDIAPATHTRAYMISSING_PRINTERPROCESSINGSTATEDETAIL + case "scannerLightFailure": + result = SCANNERLIGHTFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "scannerLightLifeAlmostOver": + result = SCANNERLIGHTLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "scannerLightLifeOver": + result = SCANNERLIGHTLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "scannerLightMissing": + result = SCANNERLIGHTMISSING_PRINTERPROCESSINGSTATEDETAIL + case "scannerSensorFailure": + result = SCANNERSENSORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "scannerSensorLifeAlmostOver": + result = SCANNERSENSORLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "scannerSensorLifeOver": + result = SCANNERSENSORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "scannerSensorMissing": + result = SCANNERSENSORMISSING_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterAdded": + result = SEPARATIONCUTTERADDED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterAlmostEmpty": + result = SEPARATIONCUTTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterAlmostFull": + result = SEPARATIONCUTTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterAtLimit": + result = SEPARATIONCUTTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterClosed": + result = SEPARATIONCUTTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterConfigurationChange": + result = SEPARATIONCUTTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterCoverClosed": + result = SEPARATIONCUTTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterCoverOpen": + result = SEPARATIONCUTTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterEmpty": + result = SEPARATIONCUTTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterFull": + result = SEPARATIONCUTTERFULL_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterInterlockClosed": + result = SEPARATIONCUTTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterInterlockOpen": + result = SEPARATIONCUTTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterJam": + result = SEPARATIONCUTTERJAM_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterLifeAlmostOver": + result = SEPARATIONCUTTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterLifeOver": + result = SEPARATIONCUTTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterMemoryExhausted": + result = SEPARATIONCUTTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterMissing": + result = SEPARATIONCUTTERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterMotorFailure": + result = SEPARATIONCUTTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterNearLimit": + result = SEPARATIONCUTTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterOffline": + result = SEPARATIONCUTTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterOpened": + result = SEPARATIONCUTTEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterOverTemperature": + result = SEPARATIONCUTTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterPowerSaver": + result = SEPARATIONCUTTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterRecoverableFailure": + result = SEPARATIONCUTTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterRecoverableStorage": + result = SEPARATIONCUTTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterRemoved": + result = SEPARATIONCUTTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterResourceAdded": + result = SEPARATIONCUTTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterResourceRemoved": + result = SEPARATIONCUTTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterThermistorFailure": + result = SEPARATIONCUTTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterTimingFailure": + result = SEPARATIONCUTTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterTurnedOff": + result = SEPARATIONCUTTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterTurnedOn": + result = SEPARATIONCUTTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterUnderTemperature": + result = SEPARATIONCUTTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterUnrecoverableFailure": + result = SEPARATIONCUTTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterUnrecoverableStorageError": + result = SEPARATIONCUTTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "separationCutterWarmingUp": + result = SEPARATIONCUTTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorAdded": + result = SHEETROTATORADDED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorAlmostEmpty": + result = SHEETROTATORALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorAlmostFull": + result = SHEETROTATORALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorAtLimit": + result = SHEETROTATORATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorClosed": + result = SHEETROTATORCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorConfigurationChange": + result = SHEETROTATORCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorCoverClosed": + result = SHEETROTATORCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorCoverOpen": + result = SHEETROTATORCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorEmpty": + result = SHEETROTATOREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorFull": + result = SHEETROTATORFULL_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorInterlockClosed": + result = SHEETROTATORINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorInterlockOpen": + result = SHEETROTATORINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorJam": + result = SHEETROTATORJAM_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorLifeAlmostOver": + result = SHEETROTATORLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorLifeOver": + result = SHEETROTATORLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorMemoryExhausted": + result = SHEETROTATORMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorMissing": + result = SHEETROTATORMISSING_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorMotorFailure": + result = SHEETROTATORMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorNearLimit": + result = SHEETROTATORNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorOffline": + result = SHEETROTATOROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorOpened": + result = SHEETROTATOROPENED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorOverTemperature": + result = SHEETROTATOROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorPowerSaver": + result = SHEETROTATORPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorRecoverableFailure": + result = SHEETROTATORRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorRecoverableStorage": + result = SHEETROTATORRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorRemoved": + result = SHEETROTATORREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorResourceAdded": + result = SHEETROTATORRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorResourceRemoved": + result = SHEETROTATORRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorThermistorFailure": + result = SHEETROTATORTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorTimingFailure": + result = SHEETROTATORTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorTurnedOff": + result = SHEETROTATORTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorTurnedOn": + result = SHEETROTATORTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorUnderTemperature": + result = SHEETROTATORUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorUnrecoverableFailure": + result = SHEETROTATORUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorUnrecoverableStorageError": + result = SHEETROTATORUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "sheetRotatorWarmingUp": + result = SHEETROTATORWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "slitterAdded": + result = SLITTERADDED_PRINTERPROCESSINGSTATEDETAIL + case "slitterAlmostEmpty": + result = SLITTERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "slitterAlmostFull": + result = SLITTERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "slitterAtLimit": + result = SLITTERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "slitterClosed": + result = SLITTERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "slitterConfigurationChange": + result = SLITTERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "slitterCoverClosed": + result = SLITTERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "slitterCoverOpen": + result = SLITTERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "slitterEmpty": + result = SLITTEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "slitterFull": + result = SLITTERFULL_PRINTERPROCESSINGSTATEDETAIL + case "slitterInterlockClosed": + result = SLITTERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "slitterInterlockOpen": + result = SLITTERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "slitterJam": + result = SLITTERJAM_PRINTERPROCESSINGSTATEDETAIL + case "slitterLifeAlmostOver": + result = SLITTERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "slitterLifeOver": + result = SLITTERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "slitterMemoryExhausted": + result = SLITTERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "slitterMissing": + result = SLITTERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "slitterMotorFailure": + result = SLITTERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterNearLimit": + result = SLITTERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "slitterOffline": + result = SLITTEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "slitterOpened": + result = SLITTEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "slitterOverTemperature": + result = SLITTEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterPowerSaver": + result = SLITTERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "slitterRecoverableFailure": + result = SLITTERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterRecoverableStorage": + result = SLITTERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "slitterRemoved": + result = SLITTERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "slitterResourceAdded": + result = SLITTERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "slitterResourceRemoved": + result = SLITTERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "slitterThermistorFailure": + result = SLITTERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterTimingFailure": + result = SLITTERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterTurnedOff": + result = SLITTERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "slitterTurnedOn": + result = SLITTERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "slitterUnderTemperature": + result = SLITTERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterUnrecoverableFailure": + result = SLITTERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "slitterUnrecoverableStorageError": + result = SLITTERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "slitterWarmingUp": + result = SLITTERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "stackerAdded": + result = STACKERADDED_PRINTERPROCESSINGSTATEDETAIL + case "stackerAlmostEmpty": + result = STACKERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "stackerAlmostFull": + result = STACKERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "stackerAtLimit": + result = STACKERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "stackerClosed": + result = STACKERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stackerConfigurationChange": + result = STACKERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "stackerCoverClosed": + result = STACKERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stackerCoverOpen": + result = STACKERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "stackerEmpty": + result = STACKEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "stackerFull": + result = STACKERFULL_PRINTERPROCESSINGSTATEDETAIL + case "stackerInterlockClosed": + result = STACKERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stackerInterlockOpen": + result = STACKERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "stackerJam": + result = STACKERJAM_PRINTERPROCESSINGSTATEDETAIL + case "stackerLifeAlmostOver": + result = STACKERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "stackerLifeOver": + result = STACKERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "stackerMemoryExhausted": + result = STACKERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "stackerMissing": + result = STACKERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "stackerMotorFailure": + result = STACKERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerNearLimit": + result = STACKERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "stackerOffline": + result = STACKEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "stackerOpened": + result = STACKEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "stackerOverTemperature": + result = STACKEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerPowerSaver": + result = STACKERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "stackerRecoverableFailure": + result = STACKERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerRecoverableStorage": + result = STACKERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "stackerRemoved": + result = STACKERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "stackerResourceAdded": + result = STACKERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "stackerResourceRemoved": + result = STACKERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "stackerThermistorFailure": + result = STACKERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerTimingFailure": + result = STACKERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerTurnedOff": + result = STACKERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "stackerTurnedOn": + result = STACKERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "stackerUnderTemperature": + result = STACKERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerUnrecoverableFailure": + result = STACKERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stackerUnrecoverableStorageError": + result = STACKERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "stackerWarmingUp": + result = STACKERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "standby": + result = STANDBY_PRINTERPROCESSINGSTATEDETAIL + case "staplerAdded": + result = STAPLERADDED_PRINTERPROCESSINGSTATEDETAIL + case "staplerAlmostEmpty": + result = STAPLERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "staplerAlmostFull": + result = STAPLERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "staplerAtLimit": + result = STAPLERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "staplerClosed": + result = STAPLERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "staplerConfigurationChange": + result = STAPLERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "staplerCoverClosed": + result = STAPLERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "staplerCoverOpen": + result = STAPLERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "staplerEmpty": + result = STAPLEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "staplerFull": + result = STAPLERFULL_PRINTERPROCESSINGSTATEDETAIL + case "staplerInterlockClosed": + result = STAPLERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "staplerInterlockOpen": + result = STAPLERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "staplerJam": + result = STAPLERJAM_PRINTERPROCESSINGSTATEDETAIL + case "staplerLifeAlmostOver": + result = STAPLERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "staplerLifeOver": + result = STAPLERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "staplerMemoryExhausted": + result = STAPLERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "staplerMissing": + result = STAPLERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "staplerMotorFailure": + result = STAPLERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerNearLimit": + result = STAPLERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "staplerOffline": + result = STAPLEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "staplerOpened": + result = STAPLEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "staplerOverTemperature": + result = STAPLEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerPowerSaver": + result = STAPLERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "staplerRecoverableFailure": + result = STAPLERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerRecoverableStorage": + result = STAPLERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "staplerRemoved": + result = STAPLERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "staplerResourceAdded": + result = STAPLERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "staplerResourceRemoved": + result = STAPLERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "staplerThermistorFailure": + result = STAPLERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerTimingFailure": + result = STAPLERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerTurnedOff": + result = STAPLERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "staplerTurnedOn": + result = STAPLERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "staplerUnderTemperature": + result = STAPLERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerUnrecoverableFailure": + result = STAPLERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "staplerUnrecoverableStorageError": + result = STAPLERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "staplerWarmingUp": + result = STAPLERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "stitcherAdded": + result = STITCHERADDED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherAlmostEmpty": + result = STITCHERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "stitcherAlmostFull": + result = STITCHERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "stitcherAtLimit": + result = STITCHERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "stitcherClosed": + result = STITCHERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherConfigurationChange": + result = STITCHERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherCoverClosed": + result = STITCHERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherCoverOpen": + result = STITCHERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "stitcherEmpty": + result = STITCHEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "stitcherFull": + result = STITCHERFULL_PRINTERPROCESSINGSTATEDETAIL + case "stitcherInterlockClosed": + result = STITCHERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherInterlockOpen": + result = STITCHERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "stitcherJam": + result = STITCHERJAM_PRINTERPROCESSINGSTATEDETAIL + case "stitcherLifeAlmostOver": + result = STITCHERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "stitcherLifeOver": + result = STITCHERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "stitcherMemoryExhausted": + result = STITCHERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherMissing": + result = STITCHERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "stitcherMotorFailure": + result = STITCHERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherNearLimit": + result = STITCHERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "stitcherOffline": + result = STITCHEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherOpened": + result = STITCHEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherOverTemperature": + result = STITCHEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherPowerSaver": + result = STITCHERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "stitcherRecoverableFailure": + result = STITCHERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherRecoverableStorage": + result = STITCHERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherRemoved": + result = STITCHERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherResourceAdded": + result = STITCHERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherResourceRemoved": + result = STITCHERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "stitcherThermistorFailure": + result = STITCHERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherTimingFailure": + result = STITCHERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherTurnedOff": + result = STITCHERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "stitcherTurnedOn": + result = STITCHERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "stitcherUnderTemperature": + result = STITCHERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherUnrecoverableFailure": + result = STITCHERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "stitcherUnrecoverableStorageError": + result = STITCHERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "stitcherWarmingUp": + result = STITCHERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "subunitAdded": + result = SUBUNITADDED_PRINTERPROCESSINGSTATEDETAIL + case "subunitAlmostEmpty": + result = SUBUNITALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "subunitAlmostFull": + result = SUBUNITALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "subunitAtLimit": + result = SUBUNITATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "subunitClosed": + result = SUBUNITCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "subunitCoolingDown": + result = SUBUNITCOOLINGDOWN_PRINTERPROCESSINGSTATEDETAIL + case "subunitEmpty": + result = SUBUNITEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "subunitFull": + result = SUBUNITFULL_PRINTERPROCESSINGSTATEDETAIL + case "subunitLifeAlmostOver": + result = SUBUNITLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "subunitLifeOver": + result = SUBUNITLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "subunitMemoryExhausted": + result = SUBUNITMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "subunitMissing": + result = SUBUNITMISSING_PRINTERPROCESSINGSTATEDETAIL + case "subunitMotorFailure": + result = SUBUNITMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitNearLimit": + result = SUBUNITNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "subunitOffline": + result = SUBUNITOFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "subunitOpened": + result = SUBUNITOPENED_PRINTERPROCESSINGSTATEDETAIL + case "subunitOverTemperature": + result = SUBUNITOVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitPowerSaver": + result = SUBUNITPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "subunitRecoverableFailure": + result = SUBUNITRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitRecoverableStorage": + result = SUBUNITRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "subunitRemoved": + result = SUBUNITREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "subunitResourceAdded": + result = SUBUNITRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "subunitResourceRemoved": + result = SUBUNITRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "subunitThermistorFailure": + result = SUBUNITTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitTimingFailure": + result = SUBUNITTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitTurnedOff": + result = SUBUNITTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "subunitTurnedOn": + result = SUBUNITTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "subunitUnderTemperature": + result = SUBUNITUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitUnrecoverableFailure": + result = SUBUNITUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "subunitUnrecoverableStorage": + result = SUBUNITUNRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "subunitWarmingUp": + result = SUBUNITWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "suspend": + result = SUSPEND_PRINTERPROCESSINGSTATEDETAIL + case "testing": + result = TESTING_PRINTERPROCESSINGSTATEDETAIL + case "trimmerAdded": + result = TRIMMERADDED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerAlmostEmpty": + result = TRIMMERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "trimmerAlmostFull": + result = TRIMMERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "trimmerAtLimit": + result = TRIMMERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "trimmerClosed": + result = TRIMMERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerConfigurationChange": + result = TRIMMERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerCoverClosed": + result = TRIMMERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerCoverOpen": + result = TRIMMERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "trimmerEmpty": + result = TRIMMEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "trimmerFull": + result = TRIMMERFULL_PRINTERPROCESSINGSTATEDETAIL + case "trimmerInterlockClosed": + result = TRIMMERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerInterlockOpen": + result = TRIMMERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "trimmerJam": + result = TRIMMERJAM_PRINTERPROCESSINGSTATEDETAIL + case "trimmerLifeAlmostOver": + result = TRIMMERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "trimmerLifeOver": + result = TRIMMERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "trimmerMemoryExhausted": + result = TRIMMERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerMissing": + result = TRIMMERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "trimmerMotorFailure": + result = TRIMMERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerNearLimit": + result = TRIMMERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "trimmerOffline": + result = TRIMMEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerOpened": + result = TRIMMEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerOverTemperature": + result = TRIMMEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerPowerSaver": + result = TRIMMERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "trimmerRecoverableFailure": + result = TRIMMERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerRecoverableStorage": + result = TRIMMERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerRemoved": + result = TRIMMERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerResourceAdded": + result = TRIMMERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerResourceRemoved": + result = TRIMMERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "trimmerThermistorFailure": + result = TRIMMERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerTimingFailure": + result = TRIMMERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerTurnedOff": + result = TRIMMERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "trimmerTurnedOn": + result = TRIMMERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "trimmerUnderTemperature": + result = TRIMMERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerUnrecoverableFailure": + result = TRIMMERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "trimmerUnrecoverableStorageError": + result = TRIMMERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "trimmerWarmingUp": + result = TRIMMERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + case "unknown": + result = UNKNOWN_PRINTERPROCESSINGSTATEDETAIL + case "wrapperAdded": + result = WRAPPERADDED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperAlmostEmpty": + result = WRAPPERALMOSTEMPTY_PRINTERPROCESSINGSTATEDETAIL + case "wrapperAlmostFull": + result = WRAPPERALMOSTFULL_PRINTERPROCESSINGSTATEDETAIL + case "wrapperAtLimit": + result = WRAPPERATLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "wrapperClosed": + result = WRAPPERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperConfigurationChange": + result = WRAPPERCONFIGURATIONCHANGE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperCoverClosed": + result = WRAPPERCOVERCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperCoverOpen": + result = WRAPPERCOVEROPEN_PRINTERPROCESSINGSTATEDETAIL + case "wrapperEmpty": + result = WRAPPEREMPTY_PRINTERPROCESSINGSTATEDETAIL + case "wrapperFull": + result = WRAPPERFULL_PRINTERPROCESSINGSTATEDETAIL + case "wrapperInterlockClosed": + result = WRAPPERINTERLOCKCLOSED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperInterlockOpen": + result = WRAPPERINTERLOCKOPEN_PRINTERPROCESSINGSTATEDETAIL + case "wrapperJam": + result = WRAPPERJAM_PRINTERPROCESSINGSTATEDETAIL + case "wrapperLifeAlmostOver": + result = WRAPPERLIFEALMOSTOVER_PRINTERPROCESSINGSTATEDETAIL + case "wrapperLifeOver": + result = WRAPPERLIFEOVER_PRINTERPROCESSINGSTATEDETAIL + case "wrapperMemoryExhausted": + result = WRAPPERMEMORYEXHAUSTED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperMissing": + result = WRAPPERMISSING_PRINTERPROCESSINGSTATEDETAIL + case "wrapperMotorFailure": + result = WRAPPERMOTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperNearLimit": + result = WRAPPERNEARLIMIT_PRINTERPROCESSINGSTATEDETAIL + case "wrapperOffline": + result = WRAPPEROFFLINE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperOpened": + result = WRAPPEROPENED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperOverTemperature": + result = WRAPPEROVERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperPowerSaver": + result = WRAPPERPOWERSAVER_PRINTERPROCESSINGSTATEDETAIL + case "wrapperRecoverableFailure": + result = WRAPPERRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperRecoverableStorage": + result = WRAPPERRECOVERABLESTORAGE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperRemoved": + result = WRAPPERREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperResourceAdded": + result = WRAPPERRESOURCEADDED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperResourceRemoved": + result = WRAPPERRESOURCEREMOVED_PRINTERPROCESSINGSTATEDETAIL + case "wrapperThermistorFailure": + result = WRAPPERTHERMISTORFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperTimingFailure": + result = WRAPPERTIMINGFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperTurnedOff": + result = WRAPPERTURNEDOFF_PRINTERPROCESSINGSTATEDETAIL + case "wrapperTurnedOn": + result = WRAPPERTURNEDON_PRINTERPROCESSINGSTATEDETAIL + case "wrapperUnderTemperature": + result = WRAPPERUNDERTEMPERATURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperUnrecoverableFailure": + result = WRAPPERUNRECOVERABLEFAILURE_PRINTERPROCESSINGSTATEDETAIL + case "wrapperUnrecoverableStorageError": + result = WRAPPERUNRECOVERABLESTORAGEERROR_PRINTERPROCESSINGSTATEDETAIL + case "wrapperWarmingUp": + result = WRAPPERWARMINGUP_PRINTERPROCESSINGSTATEDETAIL + default: + return 0, errors.New("Unknown PrinterProcessingStateDetail value: " + v) + } + return &result, nil +} +func SerializePrinterProcessingStateDetail(values []PrinterProcessingStateDetail) []string { + 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/printer_processing_state_reason.go b/src/internal/connector/graph/betasdk/models/printer_processing_state_reason.go new file mode 100644 index 000000000..a4a0652c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_processing_state_reason.go @@ -0,0 +1,133 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrinterProcessingStateReason int + +const ( + PAUSED_PRINTERPROCESSINGSTATEREASON PrinterProcessingStateReason = iota + MEDIAJAM_PRINTERPROCESSINGSTATEREASON + MEDIANEEDED_PRINTERPROCESSINGSTATEREASON + MEDIALOW_PRINTERPROCESSINGSTATEREASON + MEDIAEMPTY_PRINTERPROCESSINGSTATEREASON + COVEROPEN_PRINTERPROCESSINGSTATEREASON + INTERLOCKOPEN_PRINTERPROCESSINGSTATEREASON + OUTPUTTRAYMISSING_PRINTERPROCESSINGSTATEREASON + OUTPUTAREAFULL_PRINTERPROCESSINGSTATEREASON + MARKERSUPPLYLOW_PRINTERPROCESSINGSTATEREASON + MARKERSUPPLYEMPTY_PRINTERPROCESSINGSTATEREASON + INPUTTRAYMISSING_PRINTERPROCESSINGSTATEREASON + OUTPUTAREAALMOSTFULL_PRINTERPROCESSINGSTATEREASON + MARKERWASTEALMOSTFULL_PRINTERPROCESSINGSTATEREASON + MARKERWASTEFULL_PRINTERPROCESSINGSTATEREASON + FUSEROVERTEMP_PRINTERPROCESSINGSTATEREASON + FUSERUNDERTEMP_PRINTERPROCESSINGSTATEREASON + OTHER_PRINTERPROCESSINGSTATEREASON + NONE_PRINTERPROCESSINGSTATEREASON + MOVINGTOPAUSED_PRINTERPROCESSINGSTATEREASON + SHUTDOWN_PRINTERPROCESSINGSTATEREASON + CONNECTINGTODEVICE_PRINTERPROCESSINGSTATEREASON + TIMEDOUT_PRINTERPROCESSINGSTATEREASON + STOPPING_PRINTERPROCESSINGSTATEREASON + STOPPEDPARTIALLY_PRINTERPROCESSINGSTATEREASON + TONERLOW_PRINTERPROCESSINGSTATEREASON + TONEREMPTY_PRINTERPROCESSINGSTATEREASON + SPOOLAREAFULL_PRINTERPROCESSINGSTATEREASON + DOOROPEN_PRINTERPROCESSINGSTATEREASON + OPTICALPHOTOCONDUCTORNEARENDOFLIFE_PRINTERPROCESSINGSTATEREASON + OPTICALPHOTOCONDUCTORLIFEOVER_PRINTERPROCESSINGSTATEREASON + DEVELOPERLOW_PRINTERPROCESSINGSTATEREASON + DEVELOPEREMPTY_PRINTERPROCESSINGSTATEREASON + INTERPRETERRESOURCEUNAVAILABLE_PRINTERPROCESSINGSTATEREASON + UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATEREASON +) + +func (i PrinterProcessingStateReason) String() string { + return []string{"paused", "mediaJam", "mediaNeeded", "mediaLow", "mediaEmpty", "coverOpen", "interlockOpen", "outputTrayMissing", "outputAreaFull", "markerSupplyLow", "markerSupplyEmpty", "inputTrayMissing", "outputAreaAlmostFull", "markerWasteAlmostFull", "markerWasteFull", "fuserOverTemp", "fuserUnderTemp", "other", "none", "movingToPaused", "shutdown", "connectingToDevice", "timedOut", "stopping", "stoppedPartially", "tonerLow", "tonerEmpty", "spoolAreaFull", "doorOpen", "opticalPhotoConductorNearEndOfLife", "opticalPhotoConductorLifeOver", "developerLow", "developerEmpty", "interpreterResourceUnavailable", "unknownFutureValue"}[i] +} +func ParsePrinterProcessingStateReason(v string) (interface{}, error) { + result := PAUSED_PRINTERPROCESSINGSTATEREASON + switch v { + case "paused": + result = PAUSED_PRINTERPROCESSINGSTATEREASON + case "mediaJam": + result = MEDIAJAM_PRINTERPROCESSINGSTATEREASON + case "mediaNeeded": + result = MEDIANEEDED_PRINTERPROCESSINGSTATEREASON + case "mediaLow": + result = MEDIALOW_PRINTERPROCESSINGSTATEREASON + case "mediaEmpty": + result = MEDIAEMPTY_PRINTERPROCESSINGSTATEREASON + case "coverOpen": + result = COVEROPEN_PRINTERPROCESSINGSTATEREASON + case "interlockOpen": + result = INTERLOCKOPEN_PRINTERPROCESSINGSTATEREASON + case "outputTrayMissing": + result = OUTPUTTRAYMISSING_PRINTERPROCESSINGSTATEREASON + case "outputAreaFull": + result = OUTPUTAREAFULL_PRINTERPROCESSINGSTATEREASON + case "markerSupplyLow": + result = MARKERSUPPLYLOW_PRINTERPROCESSINGSTATEREASON + case "markerSupplyEmpty": + result = MARKERSUPPLYEMPTY_PRINTERPROCESSINGSTATEREASON + case "inputTrayMissing": + result = INPUTTRAYMISSING_PRINTERPROCESSINGSTATEREASON + case "outputAreaAlmostFull": + result = OUTPUTAREAALMOSTFULL_PRINTERPROCESSINGSTATEREASON + case "markerWasteAlmostFull": + result = MARKERWASTEALMOSTFULL_PRINTERPROCESSINGSTATEREASON + case "markerWasteFull": + result = MARKERWASTEFULL_PRINTERPROCESSINGSTATEREASON + case "fuserOverTemp": + result = FUSEROVERTEMP_PRINTERPROCESSINGSTATEREASON + case "fuserUnderTemp": + result = FUSERUNDERTEMP_PRINTERPROCESSINGSTATEREASON + case "other": + result = OTHER_PRINTERPROCESSINGSTATEREASON + case "none": + result = NONE_PRINTERPROCESSINGSTATEREASON + case "movingToPaused": + result = MOVINGTOPAUSED_PRINTERPROCESSINGSTATEREASON + case "shutdown": + result = SHUTDOWN_PRINTERPROCESSINGSTATEREASON + case "connectingToDevice": + result = CONNECTINGTODEVICE_PRINTERPROCESSINGSTATEREASON + case "timedOut": + result = TIMEDOUT_PRINTERPROCESSINGSTATEREASON + case "stopping": + result = STOPPING_PRINTERPROCESSINGSTATEREASON + case "stoppedPartially": + result = STOPPEDPARTIALLY_PRINTERPROCESSINGSTATEREASON + case "tonerLow": + result = TONERLOW_PRINTERPROCESSINGSTATEREASON + case "tonerEmpty": + result = TONEREMPTY_PRINTERPROCESSINGSTATEREASON + case "spoolAreaFull": + result = SPOOLAREAFULL_PRINTERPROCESSINGSTATEREASON + case "doorOpen": + result = DOOROPEN_PRINTERPROCESSINGSTATEREASON + case "opticalPhotoConductorNearEndOfLife": + result = OPTICALPHOTOCONDUCTORNEARENDOFLIFE_PRINTERPROCESSINGSTATEREASON + case "opticalPhotoConductorLifeOver": + result = OPTICALPHOTOCONDUCTORLIFEOVER_PRINTERPROCESSINGSTATEREASON + case "developerLow": + result = DEVELOPERLOW_PRINTERPROCESSINGSTATEREASON + case "developerEmpty": + result = DEVELOPEREMPTY_PRINTERPROCESSINGSTATEREASON + case "interpreterResourceUnavailable": + result = INTERPRETERRESOURCEUNAVAILABLE_PRINTERPROCESSINGSTATEREASON + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRINTERPROCESSINGSTATEREASON + default: + return 0, errors.New("Unknown PrinterProcessingStateReason value: " + v) + } + return &result, nil +} +func SerializePrinterProcessingStateReason(values []PrinterProcessingStateReason) []string { + 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/printer_share.go b/src/internal/connector/graph/betasdk/models/printer_share.go new file mode 100644 index 000000000..2c6c4ae04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_share.go @@ -0,0 +1,209 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShare +type PrinterShare struct { + PrinterBase + // If true, all users and groups will be granted access to this printer share. This supersedes the allow lists defined by the allowedUsers and allowedGroups navigation properties. + allowAllUsers *bool + // The groups whose users have access to print using the printer. + allowedGroups []Groupable + // The users who have access to print using the printer. + allowedUsers []Userable + // The DateTimeOffset when the printer share was created. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The printer that this printer share is related to. + printer Printerable + // Additional data for a printer share as viewed by the signed-in user. + viewPoint PrinterShareViewpointable +} +// NewPrinterShare instantiates a new PrinterShare and sets the default values. +func NewPrinterShare()(*PrinterShare) { + m := &PrinterShare{ + PrinterBase: *NewPrinterBase(), + } + odataTypeValue := "#microsoft.graph.printerShare"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrinterShareFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterShareFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterShare(), nil +} +// GetAllowAllUsers gets the allowAllUsers property value. If true, all users and groups will be granted access to this printer share. This supersedes the allow lists defined by the allowedUsers and allowedGroups navigation properties. +func (m *PrinterShare) GetAllowAllUsers()(*bool) { + return m.allowAllUsers +} +// GetAllowedGroups gets the allowedGroups property value. The groups whose users have access to print using the printer. +func (m *PrinterShare) GetAllowedGroups()([]Groupable) { + return m.allowedGroups +} +// GetAllowedUsers gets the allowedUsers property value. The users who have access to print using the printer. +func (m *PrinterShare) GetAllowedUsers()([]Userable) { + return m.allowedUsers +} +// GetCreatedDateTime gets the createdDateTime property value. The DateTimeOffset when the printer share was created. Read-only. +func (m *PrinterShare) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterShare) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrinterBase.GetFieldDeserializers() + res["allowAllUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowAllUsers(val) + } + return nil + } + res["allowedGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Groupable, len(val)) + for i, v := range val { + res[i] = v.(Groupable) + } + m.SetAllowedGroups(res) + } + return nil + } + res["allowedUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Userable, len(val)) + for i, v := range val { + res[i] = v.(Userable) + } + m.SetAllowedUsers(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["printer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrinter(val.(Printerable)) + } + return nil + } + res["viewPoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrinterShareViewpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetViewPoint(val.(PrinterShareViewpointable)) + } + return nil + } + return res +} +// GetPrinter gets the printer property value. The printer that this printer share is related to. +func (m *PrinterShare) GetPrinter()(Printerable) { + return m.printer +} +// GetViewPoint gets the viewPoint property value. Additional data for a printer share as viewed by the signed-in user. +func (m *PrinterShare) GetViewPoint()(PrinterShareViewpointable) { + return m.viewPoint +} +// Serialize serializes information the current object +func (m *PrinterShare) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrinterBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowAllUsers", m.GetAllowAllUsers()) + if err != nil { + return err + } + } + if m.GetAllowedGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedGroups())) + for i, v := range m.GetAllowedGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("allowedGroups", cast) + if err != nil { + return err + } + } + if m.GetAllowedUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedUsers())) + for i, v := range m.GetAllowedUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("allowedUsers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("printer", m.GetPrinter()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("viewPoint", m.GetViewPoint()) + if err != nil { + return err + } + } + return nil +} +// SetAllowAllUsers sets the allowAllUsers property value. If true, all users and groups will be granted access to this printer share. This supersedes the allow lists defined by the allowedUsers and allowedGroups navigation properties. +func (m *PrinterShare) SetAllowAllUsers(value *bool)() { + m.allowAllUsers = value +} +// SetAllowedGroups sets the allowedGroups property value. The groups whose users have access to print using the printer. +func (m *PrinterShare) SetAllowedGroups(value []Groupable)() { + m.allowedGroups = value +} +// SetAllowedUsers sets the allowedUsers property value. The users who have access to print using the printer. +func (m *PrinterShare) SetAllowedUsers(value []Userable)() { + m.allowedUsers = value +} +// SetCreatedDateTime sets the createdDateTime property value. The DateTimeOffset when the printer share was created. Read-only. +func (m *PrinterShare) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetPrinter sets the printer property value. The printer that this printer share is related to. +func (m *PrinterShare) SetPrinter(value Printerable)() { + m.printer = value +} +// SetViewPoint sets the viewPoint property value. Additional data for a printer share as viewed by the signed-in user. +func (m *PrinterShare) SetViewPoint(value PrinterShareViewpointable)() { + m.viewPoint = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_share_collection_response.go b/src/internal/connector/graph/betasdk/models/printer_share_collection_response.go new file mode 100644 index 000000000..9b45dc03e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_share_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShareCollectionResponse +type PrinterShareCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrinterShareable +} +// NewPrinterShareCollectionResponse instantiates a new PrinterShareCollectionResponse and sets the default values. +func NewPrinterShareCollectionResponse()(*PrinterShareCollectionResponse) { + m := &PrinterShareCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrinterShareCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterShareCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterShareCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterShareCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrinterShareFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterShareable, len(val)) + for i, v := range val { + res[i] = v.(PrinterShareable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrinterShareCollectionResponse) GetValue()([]PrinterShareable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrinterShareCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrinterShareCollectionResponse) SetValue(value []PrinterShareable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_share_collection_responseable.go b/src/internal/connector/graph/betasdk/models/printer_share_collection_responseable.go new file mode 100644 index 000000000..5ab47e9e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_share_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShareCollectionResponseable +type PrinterShareCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrinterShareable) + SetValue(value []PrinterShareable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_share_viewpoint.go b/src/internal/connector/graph/betasdk/models/printer_share_viewpoint.go new file mode 100644 index 000000000..65c37ac9c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_share_viewpoint.go @@ -0,0 +1,98 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShareViewpoint +type PrinterShareViewpoint struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Date and time when the printer was last used by the signed-in user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastUsedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewPrinterShareViewpoint instantiates a new printerShareViewpoint and sets the default values. +func NewPrinterShareViewpoint()(*PrinterShareViewpoint) { + m := &PrinterShareViewpoint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterShareViewpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterShareViewpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterShareViewpoint(), 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 *PrinterShareViewpoint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterShareViewpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["lastUsedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUsedDateTime(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 + } + return res +} +// GetLastUsedDateTime gets the lastUsedDateTime property value. Date and time when the printer was last used by the signed-in user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PrinterShareViewpoint) GetLastUsedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUsedDateTime +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterShareViewpoint) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *PrinterShareViewpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("lastUsedDateTime", m.GetLastUsedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *PrinterShareViewpoint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLastUsedDateTime sets the lastUsedDateTime property value. Date and time when the printer was last used by the signed-in user. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PrinterShareViewpoint) SetLastUsedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUsedDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterShareViewpoint) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_share_viewpointable.go b/src/internal/connector/graph/betasdk/models/printer_share_viewpointable.go new file mode 100644 index 000000000..a086847b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_share_viewpointable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShareViewpointable +type PrinterShareViewpointable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastUsedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetLastUsedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_shareable.go b/src/internal/connector/graph/betasdk/models/printer_shareable.go new file mode 100644 index 000000000..ddc15fa55 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_shareable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterShareable +type PrinterShareable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrinterBaseable + GetAllowAllUsers()(*bool) + GetAllowedGroups()([]Groupable) + GetAllowedUsers()([]Userable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPrinter()(Printerable) + GetViewPoint()(PrinterShareViewpointable) + SetAllowAllUsers(value *bool)() + SetAllowedGroups(value []Groupable)() + SetAllowedUsers(value []Userable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPrinter(value Printerable)() + SetViewPoint(value PrinterShareViewpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_status.go b/src/internal/connector/graph/betasdk/models/printer_status.go new file mode 100644 index 000000000..449a75958 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_status.go @@ -0,0 +1,237 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterStatus +type PrinterStatus struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A human-readable description of the printer's current processing state. Read-only. + description *string + // The list of details describing why the printer is in the current state. Valid values are described in the following table. Read-only. + details []PrinterProcessingStateDetail + // The OdataType property + odataType *string + // The processingState property + processingState *PrinterProcessingState + // The processingStateDescription property + processingStateDescription *string + // The processingStateReasons property + processingStateReasons []PrinterProcessingStateReason + // The state property + state *PrinterProcessingState +} +// NewPrinterStatus instantiates a new printerStatus and sets the default values. +func NewPrinterStatus()(*PrinterStatus) { + m := &PrinterStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterStatus(), 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 *PrinterStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. A human-readable description of the printer's current processing state. Read-only. +func (m *PrinterStatus) GetDescription()(*string) { + return m.description +} +// GetDetails gets the details property value. The list of details describing why the printer is in the current state. Valid values are described in the following table. Read-only. +func (m *PrinterStatus) GetDetails()([]PrinterProcessingStateDetail) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrinterProcessingStateDetail) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterProcessingStateDetail, len(val)) + for i, v := range val { + res[i] = *(v.(*PrinterProcessingStateDetail)) + } + m.SetDetails(res) + } + 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["processingState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrinterProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetProcessingState(val.(*PrinterProcessingState)) + } + return nil + } + res["processingStateDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessingStateDescription(val) + } + return nil + } + res["processingStateReasons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParsePrinterProcessingStateReason) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterProcessingStateReason, len(val)) + for i, v := range val { + res[i] = *(v.(*PrinterProcessingStateReason)) + } + m.SetProcessingStateReasons(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrinterProcessingState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*PrinterProcessingState)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterStatus) GetOdataType()(*string) { + return m.odataType +} +// GetProcessingState gets the processingState property value. The processingState property +func (m *PrinterStatus) GetProcessingState()(*PrinterProcessingState) { + return m.processingState +} +// GetProcessingStateDescription gets the processingStateDescription property value. The processingStateDescription property +func (m *PrinterStatus) GetProcessingStateDescription()(*string) { + return m.processingStateDescription +} +// GetProcessingStateReasons gets the processingStateReasons property value. The processingStateReasons property +func (m *PrinterStatus) GetProcessingStateReasons()([]PrinterProcessingStateReason) { + return m.processingStateReasons +} +// GetState gets the state property value. The state property +func (m *PrinterStatus) GetState()(*PrinterProcessingState) { + return m.state +} +// Serialize serializes information the current object +func (m *PrinterStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDetails() != nil { + err := writer.WriteCollectionOfStringValues("details", SerializePrinterProcessingStateDetail(m.GetDetails())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProcessingState() != nil { + cast := (*m.GetProcessingState()).String() + err := writer.WriteStringValue("processingState", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("processingStateDescription", m.GetProcessingStateDescription()) + if err != nil { + return err + } + } + if m.GetProcessingStateReasons() != nil { + err := writer.WriteCollectionOfStringValues("processingStateReasons", SerializePrinterProcessingStateReason(m.GetProcessingStateReasons())) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err := writer.WriteStringValue("state", &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 *PrinterStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. A human-readable description of the printer's current processing state. Read-only. +func (m *PrinterStatus) SetDescription(value *string)() { + m.description = value +} +// SetDetails sets the details property value. The list of details describing why the printer is in the current state. Valid values are described in the following table. Read-only. +func (m *PrinterStatus) SetDetails(value []PrinterProcessingStateDetail)() { + m.details = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetProcessingState sets the processingState property value. The processingState property +func (m *PrinterStatus) SetProcessingState(value *PrinterProcessingState)() { + m.processingState = value +} +// SetProcessingStateDescription sets the processingStateDescription property value. The processingStateDescription property +func (m *PrinterStatus) SetProcessingStateDescription(value *string)() { + m.processingStateDescription = value +} +// SetProcessingStateReasons sets the processingStateReasons property value. The processingStateReasons property +func (m *PrinterStatus) SetProcessingStateReasons(value []PrinterProcessingStateReason)() { + m.processingStateReasons = value +} +// SetState sets the state property value. The state property +func (m *PrinterStatus) SetState(value *PrinterProcessingState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_statusable.go b/src/internal/connector/graph/betasdk/models/printer_statusable.go new file mode 100644 index 000000000..bf2b1a5f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_statusable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterStatusable +type PrinterStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDetails()([]PrinterProcessingStateDetail) + GetOdataType()(*string) + GetProcessingState()(*PrinterProcessingState) + GetProcessingStateDescription()(*string) + GetProcessingStateReasons()([]PrinterProcessingStateReason) + GetState()(*PrinterProcessingState) + SetDescription(value *string)() + SetDetails(value []PrinterProcessingStateDetail)() + SetOdataType(value *string)() + SetProcessingState(value *PrinterProcessingState)() + SetProcessingStateDescription(value *string)() + SetProcessingStateReasons(value []PrinterProcessingStateReason)() + SetState(value *PrinterProcessingState)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_usage_summary.go b/src/internal/connector/graph/betasdk/models/printer_usage_summary.go new file mode 100644 index 000000000..c11a24c90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_usage_summary.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterUsageSummary +type PrinterUsageSummary 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 completedJobCount property + completedJobCount *int32 + // The incompleteJobCount property + incompleteJobCount *int32 + // The OdataType property + odataType *string + // The printer property + printer DirectoryObjectable + // The printerDisplayName property + printerDisplayName *string + // The printerId property + printerId *string + // The printerManufacturer property + printerManufacturer *string + // The printerModel property + printerModel *string +} +// NewPrinterUsageSummary instantiates a new printerUsageSummary and sets the default values. +func NewPrinterUsageSummary()(*PrinterUsageSummary) { + m := &PrinterUsageSummary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrinterUsageSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterUsageSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterUsageSummary(), 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 *PrinterUsageSummary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCompletedJobCount gets the completedJobCount property value. The completedJobCount property +func (m *PrinterUsageSummary) GetCompletedJobCount()(*int32) { + return m.completedJobCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterUsageSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["completedJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompletedJobCount(val) + } + return nil + } + res["incompleteJobCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIncompleteJobCount(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["printer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrinter(val.(DirectoryObjectable)) + } + return nil + } + res["printerDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrinterDisplayName(val) + } + return nil + } + res["printerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrinterId(val) + } + return nil + } + res["printerManufacturer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrinterManufacturer(val) + } + return nil + } + res["printerModel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrinterModel(val) + } + return nil + } + return res +} +// GetIncompleteJobCount gets the incompleteJobCount property value. The incompleteJobCount property +func (m *PrinterUsageSummary) GetIncompleteJobCount()(*int32) { + return m.incompleteJobCount +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrinterUsageSummary) GetOdataType()(*string) { + return m.odataType +} +// GetPrinter gets the printer property value. The printer property +func (m *PrinterUsageSummary) GetPrinter()(DirectoryObjectable) { + return m.printer +} +// GetPrinterDisplayName gets the printerDisplayName property value. The printerDisplayName property +func (m *PrinterUsageSummary) GetPrinterDisplayName()(*string) { + return m.printerDisplayName +} +// GetPrinterId gets the printerId property value. The printerId property +func (m *PrinterUsageSummary) GetPrinterId()(*string) { + return m.printerId +} +// GetPrinterManufacturer gets the printerManufacturer property value. The printerManufacturer property +func (m *PrinterUsageSummary) GetPrinterManufacturer()(*string) { + return m.printerManufacturer +} +// GetPrinterModel gets the printerModel property value. The printerModel property +func (m *PrinterUsageSummary) GetPrinterModel()(*string) { + return m.printerModel +} +// Serialize serializes information the current object +func (m *PrinterUsageSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("completedJobCount", m.GetCompletedJobCount()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("incompleteJobCount", m.GetIncompleteJobCount()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("printer", m.GetPrinter()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("printerDisplayName", m.GetPrinterDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("printerId", m.GetPrinterId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("printerManufacturer", m.GetPrinterManufacturer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("printerModel", m.GetPrinterModel()) + 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 *PrinterUsageSummary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCompletedJobCount sets the completedJobCount property value. The completedJobCount property +func (m *PrinterUsageSummary) SetCompletedJobCount(value *int32)() { + m.completedJobCount = value +} +// SetIncompleteJobCount sets the incompleteJobCount property value. The incompleteJobCount property +func (m *PrinterUsageSummary) SetIncompleteJobCount(value *int32)() { + m.incompleteJobCount = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrinterUsageSummary) SetOdataType(value *string)() { + m.odataType = value +} +// SetPrinter sets the printer property value. The printer property +func (m *PrinterUsageSummary) SetPrinter(value DirectoryObjectable)() { + m.printer = value +} +// SetPrinterDisplayName sets the printerDisplayName property value. The printerDisplayName property +func (m *PrinterUsageSummary) SetPrinterDisplayName(value *string)() { + m.printerDisplayName = value +} +// SetPrinterId sets the printerId property value. The printerId property +func (m *PrinterUsageSummary) SetPrinterId(value *string)() { + m.printerId = value +} +// SetPrinterManufacturer sets the printerManufacturer property value. The printerManufacturer property +func (m *PrinterUsageSummary) SetPrinterManufacturer(value *string)() { + m.printerManufacturer = value +} +// SetPrinterModel sets the printerModel property value. The printerModel property +func (m *PrinterUsageSummary) SetPrinterModel(value *string)() { + m.printerModel = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_response.go new file mode 100644 index 000000000..531fe9423 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterUsageSummaryCollectionResponse +type PrinterUsageSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrinterUsageSummaryable +} +// NewPrinterUsageSummaryCollectionResponse instantiates a new PrinterUsageSummaryCollectionResponse and sets the default values. +func NewPrinterUsageSummaryCollectionResponse()(*PrinterUsageSummaryCollectionResponse) { + m := &PrinterUsageSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrinterUsageSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrinterUsageSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrinterUsageSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrinterUsageSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrinterUsageSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrinterUsageSummaryable, len(val)) + for i, v := range val { + res[i] = v.(PrinterUsageSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrinterUsageSummaryCollectionResponse) GetValue()([]PrinterUsageSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrinterUsageSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrinterUsageSummaryCollectionResponse) SetValue(value []PrinterUsageSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_responseable.go new file mode 100644 index 000000000..3d02031e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_usage_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterUsageSummaryCollectionResponseable +type PrinterUsageSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrinterUsageSummaryable) + SetValue(value []PrinterUsageSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/printer_usage_summaryable.go b/src/internal/connector/graph/betasdk/models/printer_usage_summaryable.go new file mode 100644 index 000000000..680b5fb65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printer_usage_summaryable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrinterUsageSummaryable +type PrinterUsageSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletedJobCount()(*int32) + GetIncompleteJobCount()(*int32) + GetOdataType()(*string) + GetPrinter()(DirectoryObjectable) + GetPrinterDisplayName()(*string) + GetPrinterId()(*string) + GetPrinterManufacturer()(*string) + GetPrinterModel()(*string) + SetCompletedJobCount(value *int32)() + SetIncompleteJobCount(value *int32)() + SetOdataType(value *string)() + SetPrinter(value DirectoryObjectable)() + SetPrinterDisplayName(value *string)() + SetPrinterId(value *string)() + SetPrinterManufacturer(value *string)() + SetPrinterModel(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/printerable.go b/src/internal/connector/graph/betasdk/models/printerable.go new file mode 100644 index 000000000..d58ec6233 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/printerable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Printerable +type Printerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrinterBaseable + GetAcceptingJobs()(*bool) + GetConnectors()([]PrintConnectorable) + GetHasPhysicalDevice()(*bool) + GetIsShared()(*bool) + GetLastSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRegisteredDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetShare()(PrinterShareable) + GetShares()([]PrinterShareable) + GetTaskTriggers()([]PrintTaskTriggerable) + SetAcceptingJobs(value *bool)() + SetConnectors(value []PrintConnectorable)() + SetHasPhysicalDevice(value *bool)() + SetIsShared(value *bool)() + SetLastSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRegisteredDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetShare(value PrinterShareable)() + SetShares(value []PrinterShareable)() + SetTaskTriggers(value []PrintTaskTriggerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/priority.go b/src/internal/connector/graph/betasdk/models/priority.go new file mode 100644 index 000000000..cd3e1d10d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/priority.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Priority int + +const ( + NONE_PRIORITY Priority = iota + HIGH_PRIORITY + LOW_PRIORITY +) + +func (i Priority) String() string { + return []string{"None", "High", "Low"}[i] +} +func ParsePriority(v string) (interface{}, error) { + result := NONE_PRIORITY + switch v { + case "None": + result = NONE_PRIORITY + case "High": + result = HIGH_PRIORITY + case "Low": + result = LOW_PRIORITY + default: + return 0, errors.New("Unknown Priority value: " + v) + } + return &result, nil +} +func SerializePriority(values []Priority) []string { + 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/privacy_profile.go b/src/internal/connector/graph/betasdk/models/privacy_profile.go new file mode 100644 index 000000000..e4cda10e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privacy_profile.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivacyProfile +type PrivacyProfile struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A valid smtp email address for the privacy statement contact. Not required. + contactEmail *string + // The OdataType property + odataType *string + // A valid URL format that begins with http:// or https://. Maximum length is 255 characters. The URL that directs to the company's privacy statement. Not required. + statementUrl *string +} +// NewPrivacyProfile instantiates a new privacyProfile and sets the default values. +func NewPrivacyProfile()(*PrivacyProfile) { + m := &PrivacyProfile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrivacyProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivacyProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivacyProfile(), 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 *PrivacyProfile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContactEmail gets the contactEmail property value. A valid smtp email address for the privacy statement contact. Not required. +func (m *PrivacyProfile) GetContactEmail()(*string) { + return m.contactEmail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivacyProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["contactEmail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContactEmail(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["statementUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatementUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrivacyProfile) GetOdataType()(*string) { + return m.odataType +} +// GetStatementUrl gets the statementUrl property value. A valid URL format that begins with http:// or https://. Maximum length is 255 characters. The URL that directs to the company's privacy statement. Not required. +func (m *PrivacyProfile) GetStatementUrl()(*string) { + return m.statementUrl +} +// Serialize serializes information the current object +func (m *PrivacyProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("contactEmail", m.GetContactEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statementUrl", m.GetStatementUrl()) + 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 *PrivacyProfile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContactEmail sets the contactEmail property value. A valid smtp email address for the privacy statement contact. Not required. +func (m *PrivacyProfile) SetContactEmail(value *string)() { + m.contactEmail = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrivacyProfile) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatementUrl sets the statementUrl property value. A valid URL format that begins with http:// or https://. Maximum length is 255 characters. The URL that directs to the company's privacy statement. Not required. +func (m *PrivacyProfile) SetStatementUrl(value *string)() { + m.statementUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/privacy_profileable.go b/src/internal/connector/graph/betasdk/models/privacy_profileable.go new file mode 100644 index 000000000..5cf11b681 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privacy_profileable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivacyProfileable +type PrivacyProfileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContactEmail()(*string) + GetOdataType()(*string) + GetStatementUrl()(*string) + SetContactEmail(value *string)() + SetOdataType(value *string)() + SetStatementUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/private_link_details.go b/src/internal/connector/graph/betasdk/models/private_link_details.go new file mode 100644 index 000000000..bdb3f68e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/private_link_details.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivateLinkDetails +type PrivateLinkDetails 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 OdataType property + odataType *string + // The unique identifier for the Private Link policy. + policyId *string + // The name of the Private Link policy in Azure AD. + policyName *string + // The tenant identifier of the Azure AD tenant the Private Link policy belongs to. + policyTenantId *string + // The Azure Resource Manager (ARM) path for the Private Link policy resource. + resourceId *string +} +// NewPrivateLinkDetails instantiates a new privateLinkDetails and sets the default values. +func NewPrivateLinkDetails()(*PrivateLinkDetails) { + m := &PrivateLinkDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePrivateLinkDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivateLinkDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivateLinkDetails(), 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 *PrivateLinkDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivateLinkDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["policyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyId(val) + } + return nil + } + res["policyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyName(val) + } + return nil + } + res["policyTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPolicyTenantId(val) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PrivateLinkDetails) GetOdataType()(*string) { + return m.odataType +} +// GetPolicyId gets the policyId property value. The unique identifier for the Private Link policy. +func (m *PrivateLinkDetails) GetPolicyId()(*string) { + return m.policyId +} +// GetPolicyName gets the policyName property value. The name of the Private Link policy in Azure AD. +func (m *PrivateLinkDetails) GetPolicyName()(*string) { + return m.policyName +} +// GetPolicyTenantId gets the policyTenantId property value. The tenant identifier of the Azure AD tenant the Private Link policy belongs to. +func (m *PrivateLinkDetails) GetPolicyTenantId()(*string) { + return m.policyTenantId +} +// GetResourceId gets the resourceId property value. The Azure Resource Manager (ARM) path for the Private Link policy resource. +func (m *PrivateLinkDetails) GetResourceId()(*string) { + return m.resourceId +} +// Serialize serializes information the current object +func (m *PrivateLinkDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyId", m.GetPolicyId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyName", m.GetPolicyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("policyTenantId", m.GetPolicyTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + 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 *PrivateLinkDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PrivateLinkDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetPolicyId sets the policyId property value. The unique identifier for the Private Link policy. +func (m *PrivateLinkDetails) SetPolicyId(value *string)() { + m.policyId = value +} +// SetPolicyName sets the policyName property value. The name of the Private Link policy in Azure AD. +func (m *PrivateLinkDetails) SetPolicyName(value *string)() { + m.policyName = value +} +// SetPolicyTenantId sets the policyTenantId property value. The tenant identifier of the Azure AD tenant the Private Link policy belongs to. +func (m *PrivateLinkDetails) SetPolicyTenantId(value *string)() { + m.policyTenantId = value +} +// SetResourceId sets the resourceId property value. The Azure Resource Manager (ARM) path for the Private Link policy resource. +func (m *PrivateLinkDetails) SetResourceId(value *string)() { + m.resourceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/private_link_detailsable.go b/src/internal/connector/graph/betasdk/models/private_link_detailsable.go new file mode 100644 index 000000000..2e3393729 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/private_link_detailsable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivateLinkDetailsable +type PrivateLinkDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPolicyId()(*string) + GetPolicyName()(*string) + GetPolicyTenantId()(*string) + GetResourceId()(*string) + SetOdataType(value *string)() + SetPolicyId(value *string)() + SetPolicyName(value *string)() + SetPolicyTenantId(value *string)() + SetResourceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access.go b/src/internal/connector/graph/betasdk/models/privileged_access.go new file mode 100644 index 000000000..81d722d22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access.go @@ -0,0 +1,230 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccess +type PrivilegedAccess struct { + Entity + // The display name of the provider managed by PIM. + displayName *string + // A collection of resources for the provider. + resources []GovernanceResourceable + // A collection of role assignment requests for the provider. + roleAssignmentRequests []GovernanceRoleAssignmentRequestable + // A collection of role assignments for the provider. + roleAssignments []GovernanceRoleAssignmentable + // A collection of role defintions for the provider. + roleDefinitions []GovernanceRoleDefinitionable + // A collection of role settings for the provider. + roleSettings []GovernanceRoleSettingable +} +// NewPrivilegedAccess instantiates a new PrivilegedAccess and sets the default values. +func NewPrivilegedAccess()(*PrivilegedAccess) { + m := &PrivilegedAccess{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedAccessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccess(), nil +} +// GetDisplayName gets the displayName property value. The display name of the provider managed by PIM. +func (m *PrivilegedAccess) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccess) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["resources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceResourceable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceResourceable) + } + m.SetResources(res) + } + return nil + } + res["roleAssignmentRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentRequestable) + } + m.SetRoleAssignmentRequests(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleAssignmentable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["roleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleDefinitionable) + } + m.SetRoleDefinitions(res) + } + return nil + } + res["roleSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateGovernanceRoleSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]GovernanceRoleSettingable, len(val)) + for i, v := range val { + res[i] = v.(GovernanceRoleSettingable) + } + m.SetRoleSettings(res) + } + return nil + } + return res +} +// GetResources gets the resources property value. A collection of resources for the provider. +func (m *PrivilegedAccess) GetResources()([]GovernanceResourceable) { + return m.resources +} +// GetRoleAssignmentRequests gets the roleAssignmentRequests property value. A collection of role assignment requests for the provider. +func (m *PrivilegedAccess) GetRoleAssignmentRequests()([]GovernanceRoleAssignmentRequestable) { + return m.roleAssignmentRequests +} +// GetRoleAssignments gets the roleAssignments property value. A collection of role assignments for the provider. +func (m *PrivilegedAccess) GetRoleAssignments()([]GovernanceRoleAssignmentable) { + return m.roleAssignments +} +// GetRoleDefinitions gets the roleDefinitions property value. A collection of role defintions for the provider. +func (m *PrivilegedAccess) GetRoleDefinitions()([]GovernanceRoleDefinitionable) { + return m.roleDefinitions +} +// GetRoleSettings gets the roleSettings property value. A collection of role settings for the provider. +func (m *PrivilegedAccess) GetRoleSettings()([]GovernanceRoleSettingable) { + return m.roleSettings +} +// Serialize serializes information the current object +func (m *PrivilegedAccess) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResources())) + for i, v := range m.GetResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resources", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignmentRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentRequests())) + for i, v := range m.GetRoleAssignmentRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentRequests", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleDefinitions())) + for i, v := range m.GetRoleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleDefinitions", cast) + if err != nil { + return err + } + } + if m.GetRoleSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleSettings())) + for i, v := range m.GetRoleSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleSettings", cast) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the provider managed by PIM. +func (m *PrivilegedAccess) SetDisplayName(value *string)() { + m.displayName = value +} +// SetResources sets the resources property value. A collection of resources for the provider. +func (m *PrivilegedAccess) SetResources(value []GovernanceResourceable)() { + m.resources = value +} +// SetRoleAssignmentRequests sets the roleAssignmentRequests property value. A collection of role assignment requests for the provider. +func (m *PrivilegedAccess) SetRoleAssignmentRequests(value []GovernanceRoleAssignmentRequestable)() { + m.roleAssignmentRequests = value +} +// SetRoleAssignments sets the roleAssignments property value. A collection of role assignments for the provider. +func (m *PrivilegedAccess) SetRoleAssignments(value []GovernanceRoleAssignmentable)() { + m.roleAssignments = value +} +// SetRoleDefinitions sets the roleDefinitions property value. A collection of role defintions for the provider. +func (m *PrivilegedAccess) SetRoleDefinitions(value []GovernanceRoleDefinitionable)() { + m.roleDefinitions = value +} +// SetRoleSettings sets the roleSettings property value. A collection of role settings for the provider. +func (m *PrivilegedAccess) SetRoleSettings(value []GovernanceRoleSettingable)() { + m.roleSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_collection_response.go new file mode 100644 index 000000000..a2233e8ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessCollectionResponse +type PrivilegedAccessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessable +} +// NewPrivilegedAccessCollectionResponse instantiates a new PrivilegedAccessCollectionResponse and sets the default values. +func NewPrivilegedAccessCollectionResponse()(*PrivilegedAccessCollectionResponse) { + m := &PrivilegedAccessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessCollectionResponse) GetValue()([]PrivilegedAccessable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessCollectionResponse) SetValue(value []PrivilegedAccessable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_collection_responseable.go new file mode 100644 index 000000000..0b0f37b5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessCollectionResponseable +type PrivilegedAccessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessable) + SetValue(value []PrivilegedAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group.go b/src/internal/connector/graph/betasdk/models/privileged_access_group.go new file mode 100644 index 000000000..771ecc99e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group.go @@ -0,0 +1,238 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroup +type PrivilegedAccessGroup struct { + Entity + // The assignmentScheduleInstances property + assignmentScheduleInstances []PrivilegedAccessGroupAssignmentScheduleInstanceable + // The assignmentScheduleRequests property + assignmentScheduleRequests []PrivilegedAccessGroupAssignmentScheduleRequestable + // The assignmentSchedules property + assignmentSchedules []PrivilegedAccessGroupAssignmentScheduleable + // The eligibilityScheduleInstances property + eligibilityScheduleInstances []PrivilegedAccessGroupEligibilityScheduleInstanceable + // The eligibilityScheduleRequests property + eligibilityScheduleRequests []PrivilegedAccessGroupEligibilityScheduleRequestable + // The eligibilitySchedules property + eligibilitySchedules []PrivilegedAccessGroupEligibilityScheduleable +} +// NewPrivilegedAccessGroup instantiates a new privilegedAccessGroup and sets the default values. +func NewPrivilegedAccessGroup()(*PrivilegedAccessGroup) { + m := &PrivilegedAccessGroup{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedAccessGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroup(), nil +} +// GetAssignmentScheduleInstances gets the assignmentScheduleInstances property value. The assignmentScheduleInstances property +func (m *PrivilegedAccessGroup) GetAssignmentScheduleInstances()([]PrivilegedAccessGroupAssignmentScheduleInstanceable) { + return m.assignmentScheduleInstances +} +// GetAssignmentScheduleRequests gets the assignmentScheduleRequests property value. The assignmentScheduleRequests property +func (m *PrivilegedAccessGroup) GetAssignmentScheduleRequests()([]PrivilegedAccessGroupAssignmentScheduleRequestable) { + return m.assignmentScheduleRequests +} +// GetAssignmentSchedules gets the assignmentSchedules property value. The assignmentSchedules property +func (m *PrivilegedAccessGroup) GetAssignmentSchedules()([]PrivilegedAccessGroupAssignmentScheduleable) { + return m.assignmentSchedules +} +// GetEligibilityScheduleInstances gets the eligibilityScheduleInstances property value. The eligibilityScheduleInstances property +func (m *PrivilegedAccessGroup) GetEligibilityScheduleInstances()([]PrivilegedAccessGroupEligibilityScheduleInstanceable) { + return m.eligibilityScheduleInstances +} +// GetEligibilityScheduleRequests gets the eligibilityScheduleRequests property value. The eligibilityScheduleRequests property +func (m *PrivilegedAccessGroup) GetEligibilityScheduleRequests()([]PrivilegedAccessGroupEligibilityScheduleRequestable) { + return m.eligibilityScheduleRequests +} +// GetEligibilitySchedules gets the eligibilitySchedules property value. The eligibilitySchedules property +func (m *PrivilegedAccessGroup) GetEligibilitySchedules()([]PrivilegedAccessGroupEligibilityScheduleable) { + return m.eligibilitySchedules +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentScheduleInstances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleInstanceable) + } + m.SetAssignmentScheduleInstances(res) + } + return nil + } + res["assignmentScheduleRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleRequestable) + } + m.SetAssignmentScheduleRequests(res) + } + return nil + } + res["assignmentSchedules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleable) + } + m.SetAssignmentSchedules(res) + } + return nil + } + res["eligibilityScheduleInstances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleInstanceable) + } + m.SetEligibilityScheduleInstances(res) + } + return nil + } + res["eligibilityScheduleRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleRequestable) + } + m.SetEligibilityScheduleRequests(res) + } + return nil + } + res["eligibilitySchedules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleable) + } + m.SetEligibilitySchedules(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignmentScheduleInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentScheduleInstances())) + for i, v := range m.GetAssignmentScheduleInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentScheduleInstances", cast) + if err != nil { + return err + } + } + if m.GetAssignmentScheduleRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentScheduleRequests())) + for i, v := range m.GetAssignmentScheduleRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentScheduleRequests", cast) + if err != nil { + return err + } + } + if m.GetAssignmentSchedules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignmentSchedules())) + for i, v := range m.GetAssignmentSchedules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignmentSchedules", cast) + if err != nil { + return err + } + } + if m.GetEligibilityScheduleInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEligibilityScheduleInstances())) + for i, v := range m.GetEligibilityScheduleInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("eligibilityScheduleInstances", cast) + if err != nil { + return err + } + } + if m.GetEligibilityScheduleRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEligibilityScheduleRequests())) + for i, v := range m.GetEligibilityScheduleRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("eligibilityScheduleRequests", cast) + if err != nil { + return err + } + } + if m.GetEligibilitySchedules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEligibilitySchedules())) + for i, v := range m.GetEligibilitySchedules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("eligibilitySchedules", cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentScheduleInstances sets the assignmentScheduleInstances property value. The assignmentScheduleInstances property +func (m *PrivilegedAccessGroup) SetAssignmentScheduleInstances(value []PrivilegedAccessGroupAssignmentScheduleInstanceable)() { + m.assignmentScheduleInstances = value +} +// SetAssignmentScheduleRequests sets the assignmentScheduleRequests property value. The assignmentScheduleRequests property +func (m *PrivilegedAccessGroup) SetAssignmentScheduleRequests(value []PrivilegedAccessGroupAssignmentScheduleRequestable)() { + m.assignmentScheduleRequests = value +} +// SetAssignmentSchedules sets the assignmentSchedules property value. The assignmentSchedules property +func (m *PrivilegedAccessGroup) SetAssignmentSchedules(value []PrivilegedAccessGroupAssignmentScheduleable)() { + m.assignmentSchedules = value +} +// SetEligibilityScheduleInstances sets the eligibilityScheduleInstances property value. The eligibilityScheduleInstances property +func (m *PrivilegedAccessGroup) SetEligibilityScheduleInstances(value []PrivilegedAccessGroupEligibilityScheduleInstanceable)() { + m.eligibilityScheduleInstances = value +} +// SetEligibilityScheduleRequests sets the eligibilityScheduleRequests property value. The eligibilityScheduleRequests property +func (m *PrivilegedAccessGroup) SetEligibilityScheduleRequests(value []PrivilegedAccessGroupEligibilityScheduleRequestable)() { + m.eligibilityScheduleRequests = value +} +// SetEligibilitySchedules sets the eligibilitySchedules property value. The eligibilitySchedules property +func (m *PrivilegedAccessGroup) SetEligibilitySchedules(value []PrivilegedAccessGroupEligibilityScheduleable)() { + m.eligibilitySchedules = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule.go new file mode 100644 index 000000000..7c5890143 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule.go @@ -0,0 +1,247 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentSchedule +type PrivilegedAccessGroupAssignmentSchedule struct { + PrivilegedAccessSchedule + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The activatedUsing property + activatedUsing PrivilegedAccessGroupEligibilityScheduleable + // The assignmentType property + assignmentType *PrivilegedAccessGroupAssignmentType + // The group property + group Groupable + // The groupId property + groupId *string + // The memberType property + memberType *PrivilegedAccessGroupMemberType + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string +} +// NewPrivilegedAccessGroupAssignmentSchedule instantiates a new PrivilegedAccessGroupAssignmentSchedule and sets the default values. +func NewPrivilegedAccessGroupAssignmentSchedule()(*PrivilegedAccessGroupAssignmentSchedule) { + m := &PrivilegedAccessGroupAssignmentSchedule{ + PrivilegedAccessSchedule: *NewPrivilegedAccessSchedule(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupAssignmentSchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentSchedule(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetActivatedUsing gets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleable) { + return m.activatedUsing +} +// GetAssignmentType gets the assignmentType property value. The assignmentType property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetAssignmentType()(*PrivilegedAccessGroupAssignmentType) { + return m.assignmentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessSchedule.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["activatedUsing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivatedUsing(val.(PrivilegedAccessGroupEligibilityScheduleable)) + } + return nil + } + res["assignmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupAssignmentType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentType(val.(*PrivilegedAccessGroupAssignmentType)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["memberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupMemberType) + if err != nil { + return err + } + if val != nil { + m.SetMemberType(val.(*PrivilegedAccessGroupMemberType)) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetGroupId()(*string) { + return m.groupId +} +// GetMemberType gets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetMemberType()(*PrivilegedAccessGroupMemberType) { + return m.memberType +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentSchedule) GetPrincipalId()(*string) { + return m.principalId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessSchedule.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("activatedUsing", m.GetActivatedUsing()) + if err != nil { + return err + } + } + if m.GetAssignmentType() != nil { + cast := (*m.GetAssignmentType()).String() + err = writer.WriteStringValue("assignmentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + if m.GetMemberType() != nil { + cast := (*m.GetMemberType()).String() + err = writer.WriteStringValue("memberType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetActivatedUsing sets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleable)() { + m.activatedUsing = value +} +// SetAssignmentType sets the assignmentType property value. The assignmentType property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetAssignmentType(value *PrivilegedAccessGroupAssignmentType)() { + m.assignmentType = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetGroupId(value *string)() { + m.groupId = value +} +// SetMemberType sets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetMemberType(value *PrivilegedAccessGroupMemberType)() { + m.memberType = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentSchedule) SetPrincipalId(value *string)() { + m.principalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_response.go new file mode 100644 index 000000000..6161fa71b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleCollectionResponse +type PrivilegedAccessGroupAssignmentScheduleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupAssignmentScheduleable +} +// NewPrivilegedAccessGroupAssignmentScheduleCollectionResponse instantiates a new PrivilegedAccessGroupAssignmentScheduleCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleCollectionResponse()(*PrivilegedAccessGroupAssignmentScheduleCollectionResponse) { + m := &PrivilegedAccessGroupAssignmentScheduleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentScheduleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentScheduleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleCollectionResponse) GetValue()([]PrivilegedAccessGroupAssignmentScheduleable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentScheduleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleCollectionResponse) SetValue(value []PrivilegedAccessGroupAssignmentScheduleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_responseable.go new file mode 100644 index 000000000..404bf21b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleCollectionResponseable +type PrivilegedAccessGroupAssignmentScheduleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupAssignmentScheduleable) + SetValue(value []PrivilegedAccessGroupAssignmentScheduleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance.go new file mode 100644 index 000000000..d048d13de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance.go @@ -0,0 +1,273 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleInstance +type PrivilegedAccessGroupAssignmentScheduleInstance struct { + PrivilegedAccessScheduleInstance + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The activatedUsing property + activatedUsing PrivilegedAccessGroupEligibilityScheduleInstanceable + // The assignmentScheduleId property + assignmentScheduleId *string + // The assignmentType property + assignmentType *PrivilegedAccessGroupAssignmentType + // The group property + group Groupable + // The groupId property + groupId *string + // The memberType property + memberType *PrivilegedAccessGroupMemberType + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string +} +// NewPrivilegedAccessGroupAssignmentScheduleInstance instantiates a new PrivilegedAccessGroupAssignmentScheduleInstance and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstance()(*PrivilegedAccessGroupAssignmentScheduleInstance) { + m := &PrivilegedAccessGroupAssignmentScheduleInstance{ + PrivilegedAccessScheduleInstance: *NewPrivilegedAccessScheduleInstance(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentScheduleInstance(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetActivatedUsing gets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleInstanceable) { + return m.activatedUsing +} +// GetAssignmentScheduleId gets the assignmentScheduleId property value. The assignmentScheduleId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetAssignmentScheduleId()(*string) { + return m.assignmentScheduleId +} +// GetAssignmentType gets the assignmentType property value. The assignmentType property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetAssignmentType()(*PrivilegedAccessGroupAssignmentType) { + return m.assignmentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessScheduleInstance.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["activatedUsing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupEligibilityScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivatedUsing(val.(PrivilegedAccessGroupEligibilityScheduleInstanceable)) + } + return nil + } + res["assignmentScheduleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentScheduleId(val) + } + return nil + } + res["assignmentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupAssignmentType) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentType(val.(*PrivilegedAccessGroupAssignmentType)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["memberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupMemberType) + if err != nil { + return err + } + if val != nil { + m.SetMemberType(val.(*PrivilegedAccessGroupMemberType)) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetGroupId()(*string) { + return m.groupId +} +// GetMemberType gets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetMemberType()(*PrivilegedAccessGroupMemberType) { + return m.memberType +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) GetPrincipalId()(*string) { + return m.principalId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessScheduleInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("activatedUsing", m.GetActivatedUsing()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignmentScheduleId", m.GetAssignmentScheduleId()) + if err != nil { + return err + } + } + if m.GetAssignmentType() != nil { + cast := (*m.GetAssignmentType()).String() + err = writer.WriteStringValue("assignmentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + if m.GetMemberType() != nil { + cast := (*m.GetMemberType()).String() + err = writer.WriteStringValue("memberType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetActivatedUsing sets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleInstanceable)() { + m.activatedUsing = value +} +// SetAssignmentScheduleId sets the assignmentScheduleId property value. The assignmentScheduleId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetAssignmentScheduleId(value *string)() { + m.assignmentScheduleId = value +} +// SetAssignmentType sets the assignmentType property value. The assignmentType property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetAssignmentType(value *PrivilegedAccessGroupAssignmentType)() { + m.assignmentType = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetGroupId(value *string)() { + m.groupId = value +} +// SetMemberType sets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetMemberType(value *PrivilegedAccessGroupMemberType)() { + m.memberType = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentScheduleInstance) SetPrincipalId(value *string)() { + m.principalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_response.go new file mode 100644 index 000000000..2c656b753 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse +type PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupAssignmentScheduleInstanceable +} +// NewPrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse instantiates a new PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse()(*PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse) { + m := &PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse) GetValue()([]PrivilegedAccessGroupAssignmentScheduleInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponse) SetValue(value []PrivilegedAccessGroupAssignmentScheduleInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_responseable.go new file mode 100644 index 000000000..884a4b36a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponseable +type PrivilegedAccessGroupAssignmentScheduleInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupAssignmentScheduleInstanceable) + SetValue(value []PrivilegedAccessGroupAssignmentScheduleInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instanceable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instanceable.go new file mode 100644 index 000000000..c59970ccc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_instanceable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleInstanceable +type PrivilegedAccessGroupAssignmentScheduleInstanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleInstanceable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleInstanceable) + GetAssignmentScheduleId()(*string) + GetAssignmentType()(*PrivilegedAccessGroupAssignmentType) + GetGroup()(Groupable) + GetGroupId()(*string) + GetMemberType()(*PrivilegedAccessGroupMemberType) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleInstanceable)() + SetAssignmentScheduleId(value *string)() + SetAssignmentType(value *PrivilegedAccessGroupAssignmentType)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetMemberType(value *PrivilegedAccessGroupMemberType)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request.go new file mode 100644 index 000000000..4baff9106 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request.go @@ -0,0 +1,245 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleRequest +type PrivilegedAccessGroupAssignmentScheduleRequest struct { + PrivilegedAccessScheduleRequest + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The activatedUsing property + activatedUsing PrivilegedAccessGroupEligibilityScheduleable + // The group property + group Groupable + // The groupId property + groupId *string + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string + // The targetSchedule property + targetSchedule PrivilegedAccessGroupEligibilityScheduleable + // The targetScheduleId property + targetScheduleId *string +} +// NewPrivilegedAccessGroupAssignmentScheduleRequest instantiates a new PrivilegedAccessGroupAssignmentScheduleRequest and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequest()(*PrivilegedAccessGroupAssignmentScheduleRequest) { + m := &PrivilegedAccessGroupAssignmentScheduleRequest{ + PrivilegedAccessScheduleRequest: *NewPrivilegedAccessScheduleRequest(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentScheduleRequest(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetActivatedUsing gets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleable) { + return m.activatedUsing +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessScheduleRequest.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["activatedUsing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivatedUsing(val.(PrivilegedAccessGroupEligibilityScheduleable)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + res["targetSchedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetSchedule(val.(PrivilegedAccessGroupEligibilityScheduleable)) + } + return nil + } + res["targetScheduleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetScheduleId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetGroupId()(*string) { + return m.groupId +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetPrincipalId()(*string) { + return m.principalId +} +// GetTargetSchedule gets the targetSchedule property value. The targetSchedule property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetTargetSchedule()(PrivilegedAccessGroupEligibilityScheduleable) { + return m.targetSchedule +} +// GetTargetScheduleId gets the targetScheduleId property value. The targetScheduleId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) GetTargetScheduleId()(*string) { + return m.targetScheduleId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessScheduleRequest.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("activatedUsing", m.GetActivatedUsing()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("targetSchedule", m.GetTargetSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetScheduleId", m.GetTargetScheduleId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetActivatedUsing sets the activatedUsing property value. The activatedUsing property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleable)() { + m.activatedUsing = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetGroupId(value *string)() { + m.groupId = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetPrincipalId(value *string)() { + m.principalId = value +} +// SetTargetSchedule sets the targetSchedule property value. The targetSchedule property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetTargetSchedule(value PrivilegedAccessGroupEligibilityScheduleable)() { + m.targetSchedule = value +} +// SetTargetScheduleId sets the targetScheduleId property value. The targetScheduleId property +func (m *PrivilegedAccessGroupAssignmentScheduleRequest) SetTargetScheduleId(value *string)() { + m.targetScheduleId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_response.go new file mode 100644 index 000000000..3e4f22fc2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse +type PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupAssignmentScheduleRequestable +} +// NewPrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse instantiates a new PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse()(*PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse) { + m := &PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupAssignmentScheduleRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupAssignmentScheduleRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupAssignmentScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupAssignmentScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupAssignmentScheduleRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse) GetValue()([]PrivilegedAccessGroupAssignmentScheduleRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponse) SetValue(value []PrivilegedAccessGroupAssignmentScheduleRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_responseable.go new file mode 100644 index 000000000..7bbff281c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponseable +type PrivilegedAccessGroupAssignmentScheduleRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupAssignmentScheduleRequestable) + SetValue(value []PrivilegedAccessGroupAssignmentScheduleRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_requestable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_requestable.go new file mode 100644 index 000000000..daad495f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_schedule_requestable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleRequestable +type PrivilegedAccessGroupAssignmentScheduleRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleRequestable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleable) + GetGroup()(Groupable) + GetGroupId()(*string) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + GetTargetSchedule()(PrivilegedAccessGroupEligibilityScheduleable) + GetTargetScheduleId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleable)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() + SetTargetSchedule(value PrivilegedAccessGroupEligibilityScheduleable)() + SetTargetScheduleId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_scheduleable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_scheduleable.go new file mode 100644 index 000000000..932192440 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_scheduleable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupAssignmentScheduleable +type PrivilegedAccessGroupAssignmentScheduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetActivatedUsing()(PrivilegedAccessGroupEligibilityScheduleable) + GetAssignmentType()(*PrivilegedAccessGroupAssignmentType) + GetGroup()(Groupable) + GetGroupId()(*string) + GetMemberType()(*PrivilegedAccessGroupMemberType) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetActivatedUsing(value PrivilegedAccessGroupEligibilityScheduleable)() + SetAssignmentType(value *PrivilegedAccessGroupAssignmentType)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetMemberType(value *PrivilegedAccessGroupMemberType)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_type.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_type.go new file mode 100644 index 000000000..df1111c39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_assignment_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrivilegedAccessGroupAssignmentType int + +const ( + ASSIGNED_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE PrivilegedAccessGroupAssignmentType = iota + ACTIVATED_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE + UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE +) + +func (i PrivilegedAccessGroupAssignmentType) String() string { + return []string{"assigned", "activated", "unknownFutureValue"}[i] +} +func ParsePrivilegedAccessGroupAssignmentType(v string) (interface{}, error) { + result := ASSIGNED_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE + switch v { + case "assigned": + result = ASSIGNED_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE + case "activated": + result = ACTIVATED_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPASSIGNMENTTYPE + default: + return 0, errors.New("Unknown PrivilegedAccessGroupAssignmentType value: " + v) + } + return &result, nil +} +func SerializePrivilegedAccessGroupAssignmentType(values []PrivilegedAccessGroupAssignmentType) []string { + 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/privileged_access_group_eligibility_schedule.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule.go new file mode 100644 index 000000000..fc9e8fbf5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule.go @@ -0,0 +1,194 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilitySchedule +type PrivilegedAccessGroupEligibilitySchedule struct { + PrivilegedAccessSchedule + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The group property + group Groupable + // The groupId property + groupId *string + // The memberType property + memberType *PrivilegedAccessGroupMemberType + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string +} +// NewPrivilegedAccessGroupEligibilitySchedule instantiates a new privilegedAccessGroupEligibilitySchedule and sets the default values. +func NewPrivilegedAccessGroupEligibilitySchedule()(*PrivilegedAccessGroupEligibilitySchedule) { + m := &PrivilegedAccessGroupEligibilitySchedule{ + PrivilegedAccessSchedule: *NewPrivilegedAccessSchedule(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupEligibilitySchedule"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilitySchedule(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilitySchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessSchedule.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["memberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupMemberType) + if err != nil { + return err + } + if val != nil { + m.SetMemberType(val.(*PrivilegedAccessGroupMemberType)) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetGroupId()(*string) { + return m.groupId +} +// GetMemberType gets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetMemberType()(*PrivilegedAccessGroupMemberType) { + return m.memberType +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilitySchedule) GetPrincipalId()(*string) { + return m.principalId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilitySchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessSchedule.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + if m.GetMemberType() != nil { + cast := (*m.GetMemberType()).String() + err = writer.WriteStringValue("memberType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetGroupId(value *string)() { + m.groupId = value +} +// SetMemberType sets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetMemberType(value *PrivilegedAccessGroupMemberType)() { + m.memberType = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilitySchedule) SetPrincipalId(value *string)() { + m.principalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_response.go new file mode 100644 index 000000000..9bd1f2e92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleCollectionResponse +type PrivilegedAccessGroupEligibilityScheduleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupEligibilityScheduleable +} +// NewPrivilegedAccessGroupEligibilityScheduleCollectionResponse instantiates a new PrivilegedAccessGroupEligibilityScheduleCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleCollectionResponse()(*PrivilegedAccessGroupEligibilityScheduleCollectionResponse) { + m := &PrivilegedAccessGroupEligibilityScheduleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilityScheduleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilityScheduleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleCollectionResponse) GetValue()([]PrivilegedAccessGroupEligibilityScheduleable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilityScheduleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleCollectionResponse) SetValue(value []PrivilegedAccessGroupEligibilityScheduleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_responseable.go new file mode 100644 index 000000000..6a8c4da2b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleCollectionResponseable +type PrivilegedAccessGroupEligibilityScheduleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupEligibilityScheduleable) + SetValue(value []PrivilegedAccessGroupEligibilityScheduleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance.go new file mode 100644 index 000000000..ebfb38891 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance.go @@ -0,0 +1,220 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleInstance +type PrivilegedAccessGroupEligibilityScheduleInstance struct { + PrivilegedAccessScheduleInstance + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The eligibilityScheduleId property + eligibilityScheduleId *string + // The group property + group Groupable + // The groupId property + groupId *string + // The memberType property + memberType *PrivilegedAccessGroupMemberType + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string +} +// NewPrivilegedAccessGroupEligibilityScheduleInstance instantiates a new privilegedAccessGroupEligibilityScheduleInstance and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstance()(*PrivilegedAccessGroupEligibilityScheduleInstance) { + m := &PrivilegedAccessGroupEligibilityScheduleInstance{ + PrivilegedAccessScheduleInstance: *NewPrivilegedAccessScheduleInstance(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilityScheduleInstance(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetEligibilityScheduleId gets the eligibilityScheduleId property value. The eligibilityScheduleId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetEligibilityScheduleId()(*string) { + return m.eligibilityScheduleId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessScheduleInstance.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["eligibilityScheduleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEligibilityScheduleId(val) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["memberType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupMemberType) + if err != nil { + return err + } + if val != nil { + m.SetMemberType(val.(*PrivilegedAccessGroupMemberType)) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetGroupId()(*string) { + return m.groupId +} +// GetMemberType gets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetMemberType()(*PrivilegedAccessGroupMemberType) { + return m.memberType +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) GetPrincipalId()(*string) { + return m.principalId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessScheduleInstance.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("eligibilityScheduleId", m.GetEligibilityScheduleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + if m.GetMemberType() != nil { + cast := (*m.GetMemberType()).String() + err = writer.WriteStringValue("memberType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetEligibilityScheduleId sets the eligibilityScheduleId property value. The eligibilityScheduleId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetEligibilityScheduleId(value *string)() { + m.eligibilityScheduleId = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetGroupId(value *string)() { + m.groupId = value +} +// SetMemberType sets the memberType property value. The memberType property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetMemberType(value *PrivilegedAccessGroupMemberType)() { + m.memberType = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilityScheduleInstance) SetPrincipalId(value *string)() { + m.principalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_response.go new file mode 100644 index 000000000..55c8a72b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse +type PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupEligibilityScheduleInstanceable +} +// NewPrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse instantiates a new PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse()(*PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse) { + m := &PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleInstanceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse) GetValue()([]PrivilegedAccessGroupEligibilityScheduleInstanceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponse) SetValue(value []PrivilegedAccessGroupEligibilityScheduleInstanceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_responseable.go new file mode 100644 index 000000000..6e46d87ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instance_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponseable +type PrivilegedAccessGroupEligibilityScheduleInstanceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupEligibilityScheduleInstanceable) + SetValue(value []PrivilegedAccessGroupEligibilityScheduleInstanceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instanceable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instanceable.go new file mode 100644 index 000000000..9817dfc1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_instanceable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleInstanceable +type PrivilegedAccessGroupEligibilityScheduleInstanceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleInstanceable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetEligibilityScheduleId()(*string) + GetGroup()(Groupable) + GetGroupId()(*string) + GetMemberType()(*PrivilegedAccessGroupMemberType) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetEligibilityScheduleId(value *string)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetMemberType(value *PrivilegedAccessGroupMemberType)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request.go new file mode 100644 index 000000000..c747ed459 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request.go @@ -0,0 +1,219 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleRequest +type PrivilegedAccessGroupEligibilityScheduleRequest struct { + PrivilegedAccessScheduleRequest + // The accessId property + accessId *PrivilegedAccessGroupRelationships + // The group property + group Groupable + // The groupId property + groupId *string + // The principal property + principal DirectoryObjectable + // The principalId property + principalId *string + // The targetSchedule property + targetSchedule PrivilegedAccessGroupEligibilityScheduleable + // The targetScheduleId property + targetScheduleId *string +} +// NewPrivilegedAccessGroupEligibilityScheduleRequest instantiates a new PrivilegedAccessGroupEligibilityScheduleRequest and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequest()(*PrivilegedAccessGroupEligibilityScheduleRequest) { + m := &PrivilegedAccessGroupEligibilityScheduleRequest{ + PrivilegedAccessScheduleRequest: *NewPrivilegedAccessScheduleRequest(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilityScheduleRequest(), nil +} +// GetAccessId gets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetAccessId()(*PrivilegedAccessGroupRelationships) { + return m.accessId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PrivilegedAccessScheduleRequest.GetFieldDeserializers() + res["accessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePrivilegedAccessGroupRelationships) + if err != nil { + return err + } + if val != nil { + m.SetAccessId(val.(*PrivilegedAccessGroupRelationships)) + } + return nil + } + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Groupable)) + } + return nil + } + res["groupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetGroupId(val) + } + return nil + } + res["principal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPrincipal(val.(DirectoryObjectable)) + } + return nil + } + res["principalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrincipalId(val) + } + return nil + } + res["targetSchedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetSchedule(val.(PrivilegedAccessGroupEligibilityScheduleable)) + } + return nil + } + res["targetScheduleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTargetScheduleId(val) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetGroup()(Groupable) { + return m.group +} +// GetGroupId gets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetGroupId()(*string) { + return m.groupId +} +// GetPrincipal gets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetPrincipal()(DirectoryObjectable) { + return m.principal +} +// GetPrincipalId gets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetPrincipalId()(*string) { + return m.principalId +} +// GetTargetSchedule gets the targetSchedule property value. The targetSchedule property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetTargetSchedule()(PrivilegedAccessGroupEligibilityScheduleable) { + return m.targetSchedule +} +// GetTargetScheduleId gets the targetScheduleId property value. The targetScheduleId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) GetTargetScheduleId()(*string) { + return m.targetScheduleId +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PrivilegedAccessScheduleRequest.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessId() != nil { + cast := (*m.GetAccessId()).String() + err = writer.WriteStringValue("accessId", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("groupId", m.GetGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("principal", m.GetPrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("principalId", m.GetPrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("targetSchedule", m.GetTargetSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("targetScheduleId", m.GetTargetScheduleId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessId sets the accessId property value. The accessId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetAccessId(value *PrivilegedAccessGroupRelationships)() { + m.accessId = value +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetGroup(value Groupable)() { + m.group = value +} +// SetGroupId sets the groupId property value. The groupId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetGroupId(value *string)() { + m.groupId = value +} +// SetPrincipal sets the principal property value. The principal property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetPrincipal(value DirectoryObjectable)() { + m.principal = value +} +// SetPrincipalId sets the principalId property value. The principalId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetPrincipalId(value *string)() { + m.principalId = value +} +// SetTargetSchedule sets the targetSchedule property value. The targetSchedule property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetTargetSchedule(value PrivilegedAccessGroupEligibilityScheduleable)() { + m.targetSchedule = value +} +// SetTargetScheduleId sets the targetScheduleId property value. The targetScheduleId property +func (m *PrivilegedAccessGroupEligibilityScheduleRequest) SetTargetScheduleId(value *string)() { + m.targetScheduleId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_response.go new file mode 100644 index 000000000..2027f3633 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse +type PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedAccessGroupEligibilityScheduleRequestable +} +// NewPrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse instantiates a new PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse and sets the default values. +func NewPrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse()(*PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse) { + m := &PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedAccessGroupEligibilityScheduleRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessGroupEligibilityScheduleRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedAccessGroupEligibilityScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedAccessGroupEligibilityScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedAccessGroupEligibilityScheduleRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse) GetValue()([]PrivilegedAccessGroupEligibilityScheduleRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponse) SetValue(value []PrivilegedAccessGroupEligibilityScheduleRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_responseable.go new file mode 100644 index 000000000..0835b9011 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponseable +type PrivilegedAccessGroupEligibilityScheduleRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedAccessGroupEligibilityScheduleRequestable) + SetValue(value []PrivilegedAccessGroupEligibilityScheduleRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_requestable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_requestable.go new file mode 100644 index 000000000..f15bda7ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_schedule_requestable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleRequestable +type PrivilegedAccessGroupEligibilityScheduleRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleRequestable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetGroup()(Groupable) + GetGroupId()(*string) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + GetTargetSchedule()(PrivilegedAccessGroupEligibilityScheduleable) + GetTargetScheduleId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() + SetTargetSchedule(value PrivilegedAccessGroupEligibilityScheduleable)() + SetTargetScheduleId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_scheduleable.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_scheduleable.go new file mode 100644 index 000000000..99d5abeed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_eligibility_scheduleable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupEligibilityScheduleable +type PrivilegedAccessGroupEligibilityScheduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PrivilegedAccessScheduleable + GetAccessId()(*PrivilegedAccessGroupRelationships) + GetGroup()(Groupable) + GetGroupId()(*string) + GetMemberType()(*PrivilegedAccessGroupMemberType) + GetPrincipal()(DirectoryObjectable) + GetPrincipalId()(*string) + SetAccessId(value *PrivilegedAccessGroupRelationships)() + SetGroup(value Groupable)() + SetGroupId(value *string)() + SetMemberType(value *PrivilegedAccessGroupMemberType)() + SetPrincipal(value DirectoryObjectable)() + SetPrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_group_member_type.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_member_type.go new file mode 100644 index 000000000..21ce3c566 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_member_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrivilegedAccessGroupMemberType int + +const ( + DIRECT_PRIVILEGEDACCESSGROUPMEMBERTYPE PrivilegedAccessGroupMemberType = iota + GROUP_PRIVILEGEDACCESSGROUPMEMBERTYPE + UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPMEMBERTYPE +) + +func (i PrivilegedAccessGroupMemberType) String() string { + return []string{"direct", "group", "unknownFutureValue"}[i] +} +func ParsePrivilegedAccessGroupMemberType(v string) (interface{}, error) { + result := DIRECT_PRIVILEGEDACCESSGROUPMEMBERTYPE + switch v { + case "direct": + result = DIRECT_PRIVILEGEDACCESSGROUPMEMBERTYPE + case "group": + result = GROUP_PRIVILEGEDACCESSGROUPMEMBERTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPMEMBERTYPE + default: + return 0, errors.New("Unknown PrivilegedAccessGroupMemberType value: " + v) + } + return &result, nil +} +func SerializePrivilegedAccessGroupMemberType(values []PrivilegedAccessGroupMemberType) []string { + 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/privileged_access_group_relationships.go b/src/internal/connector/graph/betasdk/models/privileged_access_group_relationships.go new file mode 100644 index 000000000..23f1ef357 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_group_relationships.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrivilegedAccessGroupRelationships int + +const ( + OWNER_PRIVILEGEDACCESSGROUPRELATIONSHIPS PrivilegedAccessGroupRelationships = iota + MEMBER_PRIVILEGEDACCESSGROUPRELATIONSHIPS + UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPRELATIONSHIPS +) + +func (i PrivilegedAccessGroupRelationships) String() string { + return []string{"owner", "member", "unknownFutureValue"}[i] +} +func ParsePrivilegedAccessGroupRelationships(v string) (interface{}, error) { + result := OWNER_PRIVILEGEDACCESSGROUPRELATIONSHIPS + switch v { + case "owner": + result = OWNER_PRIVILEGEDACCESSGROUPRELATIONSHIPS + case "member": + result = MEMBER_PRIVILEGEDACCESSGROUPRELATIONSHIPS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PRIVILEGEDACCESSGROUPRELATIONSHIPS + default: + return 0, errors.New("Unknown PrivilegedAccessGroupRelationships value: " + v) + } + return &result, nil +} +func SerializePrivilegedAccessGroupRelationships(values []PrivilegedAccessGroupRelationships) []string { + 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/privileged_access_groupable.go b/src/internal/connector/graph/betasdk/models/privileged_access_groupable.go new file mode 100644 index 000000000..d57ad3b90 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_groupable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessGroupable +type PrivilegedAccessGroupable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentScheduleInstances()([]PrivilegedAccessGroupAssignmentScheduleInstanceable) + GetAssignmentScheduleRequests()([]PrivilegedAccessGroupAssignmentScheduleRequestable) + GetAssignmentSchedules()([]PrivilegedAccessGroupAssignmentScheduleable) + GetEligibilityScheduleInstances()([]PrivilegedAccessGroupEligibilityScheduleInstanceable) + GetEligibilityScheduleRequests()([]PrivilegedAccessGroupEligibilityScheduleRequestable) + GetEligibilitySchedules()([]PrivilegedAccessGroupEligibilityScheduleable) + SetAssignmentScheduleInstances(value []PrivilegedAccessGroupAssignmentScheduleInstanceable)() + SetAssignmentScheduleRequests(value []PrivilegedAccessGroupAssignmentScheduleRequestable)() + SetAssignmentSchedules(value []PrivilegedAccessGroupAssignmentScheduleable)() + SetEligibilityScheduleInstances(value []PrivilegedAccessGroupEligibilityScheduleInstanceable)() + SetEligibilityScheduleRequests(value []PrivilegedAccessGroupEligibilityScheduleRequestable)() + SetEligibilitySchedules(value []PrivilegedAccessGroupEligibilityScheduleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_root.go b/src/internal/connector/graph/betasdk/models/privileged_access_root.go new file mode 100644 index 000000000..2ded47cac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_root.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessRoot +type PrivilegedAccessRoot struct { + Entity + // The group property + group PrivilegedAccessGroupable +} +// NewPrivilegedAccessRoot instantiates a new PrivilegedAccessRoot and sets the default values. +func NewPrivilegedAccessRoot()(*PrivilegedAccessRoot) { + m := &PrivilegedAccessRoot{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedAccessRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedAccessRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedAccessGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(PrivilegedAccessGroupable)) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *PrivilegedAccessRoot) GetGroup()(PrivilegedAccessGroupable) { + return m.group +} +// Serialize serializes information the current object +func (m *PrivilegedAccessRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + return nil +} +// SetGroup sets the group property value. The group property +func (m *PrivilegedAccessRoot) SetGroup(value PrivilegedAccessGroupable)() { + m.group = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_rootable.go b/src/internal/connector/graph/betasdk/models/privileged_access_rootable.go new file mode 100644 index 000000000..9a2a0af73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_rootable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessRootable +type PrivilegedAccessRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroup()(PrivilegedAccessGroupable) + SetGroup(value PrivilegedAccessGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_schedule.go b/src/internal/connector/graph/betasdk/models/privileged_access_schedule.go new file mode 100644 index 000000000..79e22829f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_schedule.go @@ -0,0 +1,185 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessSchedule +type PrivilegedAccessSchedule struct { + Entity + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The createdUsing property + createdUsing *string + // The modifiedDateTime property + modifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The scheduleInfo property + scheduleInfo RequestScheduleable + // The status property + status *string +} +// NewPrivilegedAccessSchedule instantiates a new privilegedAccessSchedule and sets the default values. +func NewPrivilegedAccessSchedule()(*PrivilegedAccessSchedule) { + m := &PrivilegedAccessSchedule{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedAccessScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.privilegedAccessGroupAssignmentSchedule": + return NewPrivilegedAccessGroupAssignmentSchedule(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilitySchedule": + return NewPrivilegedAccessGroupEligibilitySchedule(), nil + } + } + } + } + return NewPrivilegedAccessSchedule(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *PrivilegedAccessSchedule) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCreatedUsing gets the createdUsing property value. The createdUsing property +func (m *PrivilegedAccessSchedule) GetCreatedUsing()(*string) { + return m.createdUsing +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["createdUsing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedUsing(val) + } + return nil + } + res["modifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetModifiedDateTime(val) + } + return nil + } + res["scheduleInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScheduleInfo(val.(RequestScheduleable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetModifiedDateTime gets the modifiedDateTime property value. The modifiedDateTime property +func (m *PrivilegedAccessSchedule) GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.modifiedDateTime +} +// GetScheduleInfo gets the scheduleInfo property value. The scheduleInfo property +func (m *PrivilegedAccessSchedule) GetScheduleInfo()(RequestScheduleable) { + return m.scheduleInfo +} +// GetStatus gets the status property value. The status property +func (m *PrivilegedAccessSchedule) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *PrivilegedAccessSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("createdUsing", m.GetCreatedUsing()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("modifiedDateTime", m.GetModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("scheduleInfo", m.GetScheduleInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *PrivilegedAccessSchedule) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCreatedUsing sets the createdUsing property value. The createdUsing property +func (m *PrivilegedAccessSchedule) SetCreatedUsing(value *string)() { + m.createdUsing = value +} +// SetModifiedDateTime sets the modifiedDateTime property value. The modifiedDateTime property +func (m *PrivilegedAccessSchedule) SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.modifiedDateTime = value +} +// SetScheduleInfo sets the scheduleInfo property value. The scheduleInfo property +func (m *PrivilegedAccessSchedule) SetScheduleInfo(value RequestScheduleable)() { + m.scheduleInfo = value +} +// SetStatus sets the status property value. The status property +func (m *PrivilegedAccessSchedule) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instance.go b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instance.go new file mode 100644 index 000000000..3a0799e52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instance.go @@ -0,0 +1,107 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessScheduleInstance provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrivilegedAccessScheduleInstance struct { + Entity + // The endDateTime property + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The startDateTime property + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewPrivilegedAccessScheduleInstance instantiates a new privilegedAccessScheduleInstance and sets the default values. +func NewPrivilegedAccessScheduleInstance()(*PrivilegedAccessScheduleInstance) { + m := &PrivilegedAccessScheduleInstance{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedAccessScheduleInstanceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessScheduleInstanceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.privilegedAccessGroupAssignmentScheduleInstance": + return NewPrivilegedAccessGroupAssignmentScheduleInstance(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilityScheduleInstance": + return NewPrivilegedAccessGroupEligibilityScheduleInstance(), nil + } + } + } + } + return NewPrivilegedAccessScheduleInstance(), nil +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *PrivilegedAccessScheduleInstance) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessScheduleInstance) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *PrivilegedAccessScheduleInstance) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *PrivilegedAccessScheduleInstance) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *PrivilegedAccessScheduleInstance) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *PrivilegedAccessScheduleInstance) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instanceable.go b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instanceable.go new file mode 100644 index 000000000..ba6a87ed6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_instanceable.go @@ -0,0 +1,16 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessScheduleInstanceable +type PrivilegedAccessScheduleInstanceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_schedule_request.go b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_request.go new file mode 100644 index 000000000..3d4376208 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_request.go @@ -0,0 +1,187 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessScheduleRequest +type PrivilegedAccessScheduleRequest struct { + Request + // The action property + action *ScheduleRequestActions + // The isValidationOnly property + isValidationOnly *bool + // The justification property + justification *string + // The scheduleInfo property + scheduleInfo RequestScheduleable + // The ticketInfo property + ticketInfo TicketInfoable +} +// NewPrivilegedAccessScheduleRequest instantiates a new PrivilegedAccessScheduleRequest and sets the default values. +func NewPrivilegedAccessScheduleRequest()(*PrivilegedAccessScheduleRequest) { + m := &PrivilegedAccessScheduleRequest{ + Request: *NewRequest(), + } + odataTypeValue := "#microsoft.graph.privilegedAccessScheduleRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreatePrivilegedAccessScheduleRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedAccessScheduleRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest": + return NewPrivilegedAccessGroupAssignmentScheduleRequest(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest": + return NewPrivilegedAccessGroupEligibilityScheduleRequest(), nil + } + } + } + } + return NewPrivilegedAccessScheduleRequest(), nil +} +// GetAction gets the action property value. The action property +func (m *PrivilegedAccessScheduleRequest) GetAction()(*ScheduleRequestActions) { + return m.action +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedAccessScheduleRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Request.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScheduleRequestActions) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*ScheduleRequestActions)) + } + return nil + } + res["isValidationOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsValidationOnly(val) + } + return nil + } + res["justification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJustification(val) + } + return nil + } + res["scheduleInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRequestScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetScheduleInfo(val.(RequestScheduleable)) + } + return nil + } + res["ticketInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTicketInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTicketInfo(val.(TicketInfoable)) + } + return nil + } + return res +} +// GetIsValidationOnly gets the isValidationOnly property value. The isValidationOnly property +func (m *PrivilegedAccessScheduleRequest) GetIsValidationOnly()(*bool) { + return m.isValidationOnly +} +// GetJustification gets the justification property value. The justification property +func (m *PrivilegedAccessScheduleRequest) GetJustification()(*string) { + return m.justification +} +// GetScheduleInfo gets the scheduleInfo property value. The scheduleInfo property +func (m *PrivilegedAccessScheduleRequest) GetScheduleInfo()(RequestScheduleable) { + return m.scheduleInfo +} +// GetTicketInfo gets the ticketInfo property value. The ticketInfo property +func (m *PrivilegedAccessScheduleRequest) GetTicketInfo()(TicketInfoable) { + return m.ticketInfo +} +// Serialize serializes information the current object +func (m *PrivilegedAccessScheduleRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Request.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isValidationOnly", m.GetIsValidationOnly()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("justification", m.GetJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("scheduleInfo", m.GetScheduleInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("ticketInfo", m.GetTicketInfo()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *PrivilegedAccessScheduleRequest) SetAction(value *ScheduleRequestActions)() { + m.action = value +} +// SetIsValidationOnly sets the isValidationOnly property value. The isValidationOnly property +func (m *PrivilegedAccessScheduleRequest) SetIsValidationOnly(value *bool)() { + m.isValidationOnly = value +} +// SetJustification sets the justification property value. The justification property +func (m *PrivilegedAccessScheduleRequest) SetJustification(value *string)() { + m.justification = value +} +// SetScheduleInfo sets the scheduleInfo property value. The scheduleInfo property +func (m *PrivilegedAccessScheduleRequest) SetScheduleInfo(value RequestScheduleable)() { + m.scheduleInfo = value +} +// SetTicketInfo sets the ticketInfo property value. The ticketInfo property +func (m *PrivilegedAccessScheduleRequest) SetTicketInfo(value TicketInfoable)() { + m.ticketInfo = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_schedule_requestable.go b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_requestable.go new file mode 100644 index 000000000..4d60a4be0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_schedule_requestable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessScheduleRequestable +type PrivilegedAccessScheduleRequestable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Requestable + GetAction()(*ScheduleRequestActions) + GetIsValidationOnly()(*bool) + GetJustification()(*string) + GetScheduleInfo()(RequestScheduleable) + GetTicketInfo()(TicketInfoable) + SetAction(value *ScheduleRequestActions)() + SetIsValidationOnly(value *bool)() + SetJustification(value *string)() + SetScheduleInfo(value RequestScheduleable)() + SetTicketInfo(value TicketInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_access_scheduleable.go b/src/internal/connector/graph/betasdk/models/privileged_access_scheduleable.go new file mode 100644 index 000000000..b7cc5ebcf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_access_scheduleable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessScheduleable +type PrivilegedAccessScheduleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedUsing()(*string) + GetModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetScheduleInfo()(RequestScheduleable) + GetStatus()(*string) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedUsing(value *string)() + SetModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetScheduleInfo(value RequestScheduleable)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_accessable.go b/src/internal/connector/graph/betasdk/models/privileged_accessable.go new file mode 100644 index 000000000..9740ebb51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_accessable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedAccessable +type PrivilegedAccessable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetResources()([]GovernanceResourceable) + GetRoleAssignmentRequests()([]GovernanceRoleAssignmentRequestable) + GetRoleAssignments()([]GovernanceRoleAssignmentable) + GetRoleDefinitions()([]GovernanceRoleDefinitionable) + GetRoleSettings()([]GovernanceRoleSettingable) + SetDisplayName(value *string)() + SetResources(value []GovernanceResourceable)() + SetRoleAssignmentRequests(value []GovernanceRoleAssignmentRequestable)() + SetRoleAssignments(value []GovernanceRoleAssignmentable)() + SetRoleDefinitions(value []GovernanceRoleDefinitionable)() + SetRoleSettings(value []GovernanceRoleSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_approval.go b/src/internal/connector/graph/betasdk/models/privileged_approval.go new file mode 100644 index 000000000..bd7839c02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_approval.go @@ -0,0 +1,322 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedApproval +type PrivilegedApproval struct { + Entity + // The approvalDuration property + approvalDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // Possible values are: pending, approved, denied, aborted, canceled. + approvalState *ApprovalState + // The approvalType property + approvalType *string + // The approverReason property + approverReason *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Read-only. The role assignment request for this approval object + request PrivilegedRoleAssignmentRequestable + // The requestorReason property + requestorReason *string + // The roleId property + roleId *string + // The roleInfo property + roleInfo PrivilegedRoleable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The userId property + userId *string +} +// NewPrivilegedApproval instantiates a new PrivilegedApproval and sets the default values. +func NewPrivilegedApproval()(*PrivilegedApproval) { + m := &PrivilegedApproval{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedApprovalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedApprovalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedApproval(), nil +} +// GetApprovalDuration gets the approvalDuration property value. The approvalDuration property +func (m *PrivilegedApproval) GetApprovalDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.approvalDuration +} +// GetApprovalState gets the approvalState property value. Possible values are: pending, approved, denied, aborted, canceled. +func (m *PrivilegedApproval) GetApprovalState()(*ApprovalState) { + return m.approvalState +} +// GetApprovalType gets the approvalType property value. The approvalType property +func (m *PrivilegedApproval) GetApprovalType()(*string) { + return m.approvalType +} +// GetApproverReason gets the approverReason property value. The approverReason property +func (m *PrivilegedApproval) GetApproverReason()(*string) { + return m.approverReason +} +// GetEndDateTime gets the endDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PrivilegedApproval) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedApproval) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["approvalDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalDuration(val) + } + return nil + } + res["approvalState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseApprovalState) + if err != nil { + return err + } + if val != nil { + m.SetApprovalState(val.(*ApprovalState)) + } + return nil + } + res["approvalType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalType(val) + } + return nil + } + res["approverReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApproverReason(val) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["request"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRequest(val.(PrivilegedRoleAssignmentRequestable)) + } + return nil + } + res["requestorReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestorReason(val) + } + return nil + } + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleInfo(val.(PrivilegedRoleable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetRequest gets the request property value. Read-only. The role assignment request for this approval object +func (m *PrivilegedApproval) GetRequest()(PrivilegedRoleAssignmentRequestable) { + return m.request +} +// GetRequestorReason gets the requestorReason property value. The requestorReason property +func (m *PrivilegedApproval) GetRequestorReason()(*string) { + return m.requestorReason +} +// GetRoleId gets the roleId property value. The roleId property +func (m *PrivilegedApproval) GetRoleId()(*string) { + return m.roleId +} +// GetRoleInfo gets the roleInfo property value. The roleInfo property +func (m *PrivilegedApproval) GetRoleInfo()(PrivilegedRoleable) { + return m.roleInfo +} +// GetStartDateTime gets the startDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PrivilegedApproval) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetUserId gets the userId property value. The userId property +func (m *PrivilegedApproval) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *PrivilegedApproval) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteISODurationValue("approvalDuration", m.GetApprovalDuration()) + if err != nil { + return err + } + } + if m.GetApprovalState() != nil { + cast := (*m.GetApprovalState()).String() + err = writer.WriteStringValue("approvalState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("approvalType", m.GetApprovalType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("approverReason", m.GetApproverReason()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("request", m.GetRequest()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestorReason", m.GetRequestorReason()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleInfo", m.GetRoleInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetApprovalDuration sets the approvalDuration property value. The approvalDuration property +func (m *PrivilegedApproval) SetApprovalDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.approvalDuration = value +} +// SetApprovalState sets the approvalState property value. Possible values are: pending, approved, denied, aborted, canceled. +func (m *PrivilegedApproval) SetApprovalState(value *ApprovalState)() { + m.approvalState = value +} +// SetApprovalType sets the approvalType property value. The approvalType property +func (m *PrivilegedApproval) SetApprovalType(value *string)() { + m.approvalType = value +} +// SetApproverReason sets the approverReason property value. The approverReason property +func (m *PrivilegedApproval) SetApproverReason(value *string)() { + m.approverReason = value +} +// SetEndDateTime sets the endDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PrivilegedApproval) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetRequest sets the request property value. Read-only. The role assignment request for this approval object +func (m *PrivilegedApproval) SetRequest(value PrivilegedRoleAssignmentRequestable)() { + m.request = value +} +// SetRequestorReason sets the requestorReason property value. The requestorReason property +func (m *PrivilegedApproval) SetRequestorReason(value *string)() { + m.requestorReason = value +} +// SetRoleId sets the roleId property value. The roleId property +func (m *PrivilegedApproval) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleInfo sets the roleInfo property value. The roleInfo property +func (m *PrivilegedApproval) SetRoleInfo(value PrivilegedRoleable)() { + m.roleInfo = value +} +// SetStartDateTime sets the startDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *PrivilegedApproval) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetUserId sets the userId property value. The userId property +func (m *PrivilegedApproval) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_approval_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_approval_collection_response.go new file mode 100644 index 000000000..e16cae974 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_approval_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedApprovalCollectionResponse +type PrivilegedApprovalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedApprovalable +} +// NewPrivilegedApprovalCollectionResponse instantiates a new PrivilegedApprovalCollectionResponse and sets the default values. +func NewPrivilegedApprovalCollectionResponse()(*PrivilegedApprovalCollectionResponse) { + m := &PrivilegedApprovalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedApprovalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedApprovalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedApprovalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedApprovalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedApprovalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedApprovalable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedApprovalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedApprovalCollectionResponse) GetValue()([]PrivilegedApprovalable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedApprovalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedApprovalCollectionResponse) SetValue(value []PrivilegedApprovalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_approval_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_approval_collection_responseable.go new file mode 100644 index 000000000..8a0c213aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_approval_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedApprovalCollectionResponseable +type PrivilegedApprovalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedApprovalable) + SetValue(value []PrivilegedApprovalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_approvalable.go b/src/internal/connector/graph/betasdk/models/privileged_approvalable.go new file mode 100644 index 000000000..e014594a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_approvalable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedApprovalable +type PrivilegedApprovalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetApprovalState()(*ApprovalState) + GetApprovalType()(*string) + GetApproverReason()(*string) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRequest()(PrivilegedRoleAssignmentRequestable) + GetRequestorReason()(*string) + GetRoleId()(*string) + GetRoleInfo()(PrivilegedRoleable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUserId()(*string) + SetApprovalDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetApprovalState(value *ApprovalState)() + SetApprovalType(value *string)() + SetApproverReason(value *string)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRequest(value PrivilegedRoleAssignmentRequestable)() + SetRequestorReason(value *string)() + SetRoleId(value *string)() + SetRoleInfo(value PrivilegedRoleable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_operation_event.go b/src/internal/connector/graph/betasdk/models/privileged_operation_event.go new file mode 100644 index 000000000..e3d4163e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_operation_event.go @@ -0,0 +1,399 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedOperationEvent +type PrivilegedOperationEvent struct { + Entity + // Detailed human readable information for the event. + additionalInformation *string + // Indicates the time when the event is created. + creationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // This is only used when the requestType is Activate, and it indicates the expiration time for the role activation. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Incident/Request ticket number during role activation. The value is presented only if the ticket number is provided during role activation. + referenceKey *string + // Incident/Request ticketing system provided during tole activation. The value is presented only if the ticket system is provided during role activation. + referenceSystem *string + // The user id of the requestor who initiates the operation. + requestorId *string + // The user name of the requestor who initiates the operation. + requestorName *string + // The request operation type. The requestType value can be: Assign (role assignment), Activate (role activation), Unassign (remove role assignment), Deactivate (role deactivation), ScanAlertsNow (scan security alerts), DismissAlert (dismiss security alert), FixAlertItem (fix a security alert issue), AccessReview_Review (review an Access Review), AccessReview_Create (create an Access Review) , AccessReview_Update (update an Access Review), AccessReview_Delete (delete an Access Review). + requestType *string + // The id of the role that is associated with the operation. + roleId *string + // The name of the role. + roleName *string + // The tenant (organization) id. + tenantId *string + // The id of the user that is associated with the operation. + userId *string + // The user's email. + userMail *string + // The user's display name. + userName *string +} +// NewPrivilegedOperationEvent instantiates a new PrivilegedOperationEvent and sets the default values. +func NewPrivilegedOperationEvent()(*PrivilegedOperationEvent) { + m := &PrivilegedOperationEvent{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedOperationEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedOperationEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedOperationEvent(), nil +} +// GetAdditionalInformation gets the additionalInformation property value. Detailed human readable information for the event. +func (m *PrivilegedOperationEvent) GetAdditionalInformation()(*string) { + return m.additionalInformation +} +// GetCreationDateTime gets the creationDateTime property value. Indicates the time when the event is created. +func (m *PrivilegedOperationEvent) GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.creationDateTime +} +// GetExpirationDateTime gets the expirationDateTime property value. This is only used when the requestType is Activate, and it indicates the expiration time for the role activation. +func (m *PrivilegedOperationEvent) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedOperationEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["additionalInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInformation(val) + } + return nil + } + res["creationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreationDateTime(val) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["referenceKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceKey(val) + } + return nil + } + res["referenceSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferenceSystem(val) + } + return nil + } + res["requestorId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestorId(val) + } + return nil + } + res["requestorName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestorName(val) + } + return nil + } + res["requestType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestType(val) + } + return nil + } + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleName(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userMail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserMail(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetReferenceKey gets the referenceKey property value. Incident/Request ticket number during role activation. The value is presented only if the ticket number is provided during role activation. +func (m *PrivilegedOperationEvent) GetReferenceKey()(*string) { + return m.referenceKey +} +// GetReferenceSystem gets the referenceSystem property value. Incident/Request ticketing system provided during tole activation. The value is presented only if the ticket system is provided during role activation. +func (m *PrivilegedOperationEvent) GetReferenceSystem()(*string) { + return m.referenceSystem +} +// GetRequestorId gets the requestorId property value. The user id of the requestor who initiates the operation. +func (m *PrivilegedOperationEvent) GetRequestorId()(*string) { + return m.requestorId +} +// GetRequestorName gets the requestorName property value. The user name of the requestor who initiates the operation. +func (m *PrivilegedOperationEvent) GetRequestorName()(*string) { + return m.requestorName +} +// GetRequestType gets the requestType property value. The request operation type. The requestType value can be: Assign (role assignment), Activate (role activation), Unassign (remove role assignment), Deactivate (role deactivation), ScanAlertsNow (scan security alerts), DismissAlert (dismiss security alert), FixAlertItem (fix a security alert issue), AccessReview_Review (review an Access Review), AccessReview_Create (create an Access Review) , AccessReview_Update (update an Access Review), AccessReview_Delete (delete an Access Review). +func (m *PrivilegedOperationEvent) GetRequestType()(*string) { + return m.requestType +} +// GetRoleId gets the roleId property value. The id of the role that is associated with the operation. +func (m *PrivilegedOperationEvent) GetRoleId()(*string) { + return m.roleId +} +// GetRoleName gets the roleName property value. The name of the role. +func (m *PrivilegedOperationEvent) GetRoleName()(*string) { + return m.roleName +} +// GetTenantId gets the tenantId property value. The tenant (organization) id. +func (m *PrivilegedOperationEvent) GetTenantId()(*string) { + return m.tenantId +} +// GetUserId gets the userId property value. The id of the user that is associated with the operation. +func (m *PrivilegedOperationEvent) GetUserId()(*string) { + return m.userId +} +// GetUserMail gets the userMail property value. The user's email. +func (m *PrivilegedOperationEvent) GetUserMail()(*string) { + return m.userMail +} +// GetUserName gets the userName property value. The user's display name. +func (m *PrivilegedOperationEvent) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *PrivilegedOperationEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("additionalInformation", m.GetAdditionalInformation()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("creationDateTime", m.GetCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("referenceKey", m.GetReferenceKey()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("referenceSystem", m.GetReferenceSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestorId", m.GetRequestorId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestorName", m.GetRequestorName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestType", m.GetRequestType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleName", m.GetRoleName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userMail", m.GetUserMail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalInformation sets the additionalInformation property value. Detailed human readable information for the event. +func (m *PrivilegedOperationEvent) SetAdditionalInformation(value *string)() { + m.additionalInformation = value +} +// SetCreationDateTime sets the creationDateTime property value. Indicates the time when the event is created. +func (m *PrivilegedOperationEvent) SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.creationDateTime = value +} +// SetExpirationDateTime sets the expirationDateTime property value. This is only used when the requestType is Activate, and it indicates the expiration time for the role activation. +func (m *PrivilegedOperationEvent) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetReferenceKey sets the referenceKey property value. Incident/Request ticket number during role activation. The value is presented only if the ticket number is provided during role activation. +func (m *PrivilegedOperationEvent) SetReferenceKey(value *string)() { + m.referenceKey = value +} +// SetReferenceSystem sets the referenceSystem property value. Incident/Request ticketing system provided during tole activation. The value is presented only if the ticket system is provided during role activation. +func (m *PrivilegedOperationEvent) SetReferenceSystem(value *string)() { + m.referenceSystem = value +} +// SetRequestorId sets the requestorId property value. The user id of the requestor who initiates the operation. +func (m *PrivilegedOperationEvent) SetRequestorId(value *string)() { + m.requestorId = value +} +// SetRequestorName sets the requestorName property value. The user name of the requestor who initiates the operation. +func (m *PrivilegedOperationEvent) SetRequestorName(value *string)() { + m.requestorName = value +} +// SetRequestType sets the requestType property value. The request operation type. The requestType value can be: Assign (role assignment), Activate (role activation), Unassign (remove role assignment), Deactivate (role deactivation), ScanAlertsNow (scan security alerts), DismissAlert (dismiss security alert), FixAlertItem (fix a security alert issue), AccessReview_Review (review an Access Review), AccessReview_Create (create an Access Review) , AccessReview_Update (update an Access Review), AccessReview_Delete (delete an Access Review). +func (m *PrivilegedOperationEvent) SetRequestType(value *string)() { + m.requestType = value +} +// SetRoleId sets the roleId property value. The id of the role that is associated with the operation. +func (m *PrivilegedOperationEvent) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleName sets the roleName property value. The name of the role. +func (m *PrivilegedOperationEvent) SetRoleName(value *string)() { + m.roleName = value +} +// SetTenantId sets the tenantId property value. The tenant (organization) id. +func (m *PrivilegedOperationEvent) SetTenantId(value *string)() { + m.tenantId = value +} +// SetUserId sets the userId property value. The id of the user that is associated with the operation. +func (m *PrivilegedOperationEvent) SetUserId(value *string)() { + m.userId = value +} +// SetUserMail sets the userMail property value. The user's email. +func (m *PrivilegedOperationEvent) SetUserMail(value *string)() { + m.userMail = value +} +// SetUserName sets the userName property value. The user's display name. +func (m *PrivilegedOperationEvent) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_response.go new file mode 100644 index 000000000..d2c63b7c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedOperationEventCollectionResponse +type PrivilegedOperationEventCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedOperationEventable +} +// NewPrivilegedOperationEventCollectionResponse instantiates a new PrivilegedOperationEventCollectionResponse and sets the default values. +func NewPrivilegedOperationEventCollectionResponse()(*PrivilegedOperationEventCollectionResponse) { + m := &PrivilegedOperationEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedOperationEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedOperationEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedOperationEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedOperationEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedOperationEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedOperationEventable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedOperationEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedOperationEventCollectionResponse) GetValue()([]PrivilegedOperationEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedOperationEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedOperationEventCollectionResponse) SetValue(value []PrivilegedOperationEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_responseable.go new file mode 100644 index 000000000..a83457b09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_operation_event_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedOperationEventCollectionResponseable +type PrivilegedOperationEventCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedOperationEventable) + SetValue(value []PrivilegedOperationEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_operation_eventable.go b/src/internal/connector/graph/betasdk/models/privileged_operation_eventable.go new file mode 100644 index 000000000..79e33d571 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_operation_eventable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedOperationEventable +type PrivilegedOperationEventable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalInformation()(*string) + GetCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReferenceKey()(*string) + GetReferenceSystem()(*string) + GetRequestorId()(*string) + GetRequestorName()(*string) + GetRequestType()(*string) + GetRoleId()(*string) + GetRoleName()(*string) + GetTenantId()(*string) + GetUserId()(*string) + GetUserMail()(*string) + GetUserName()(*string) + SetAdditionalInformation(value *string)() + SetCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReferenceKey(value *string)() + SetReferenceSystem(value *string)() + SetRequestorId(value *string)() + SetRequestorName(value *string)() + SetRequestType(value *string)() + SetRoleId(value *string)() + SetRoleName(value *string)() + SetTenantId(value *string)() + SetUserId(value *string)() + SetUserMail(value *string)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role.go b/src/internal/connector/graph/betasdk/models/privileged_role.go new file mode 100644 index 000000000..aa0dd6677 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role.go @@ -0,0 +1,146 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRole +type PrivilegedRole struct { + Entity + // The assignments for this role. Read-only. Nullable. + assignments []PrivilegedRoleAssignmentable + // Role name. + name *string + // The settings for this role. Read-only. Nullable. + settings PrivilegedRoleSettingsable + // The summary information for this role. Read-only. Nullable. + summary PrivilegedRoleSummaryable +} +// NewPrivilegedRole instantiates a new privilegedRole and sets the default values. +func NewPrivilegedRole()(*PrivilegedRole) { + m := &PrivilegedRole{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedRoleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRole(), nil +} +// GetAssignments gets the assignments property value. The assignments for this role. Read-only. Nullable. +func (m *PrivilegedRole) GetAssignments()([]PrivilegedRoleAssignmentable) { + return m.assignments +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRole) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedRoleAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(PrivilegedRoleSettingsable)) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSummary(val.(PrivilegedRoleSummaryable)) + } + return nil + } + return res +} +// GetName gets the name property value. Role name. +func (m *PrivilegedRole) GetName()(*string) { + return m.name +} +// GetSettings gets the settings property value. The settings for this role. Read-only. Nullable. +func (m *PrivilegedRole) GetSettings()(PrivilegedRoleSettingsable) { + return m.settings +} +// GetSummary gets the summary property value. The summary information for this role. Read-only. Nullable. +func (m *PrivilegedRole) GetSummary()(PrivilegedRoleSummaryable) { + return m.summary +} +// Serialize serializes information the current object +func (m *PrivilegedRole) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The assignments for this role. Read-only. Nullable. +func (m *PrivilegedRole) SetAssignments(value []PrivilegedRoleAssignmentable)() { + m.assignments = value +} +// SetName sets the name property value. Role name. +func (m *PrivilegedRole) SetName(value *string)() { + m.name = value +} +// SetSettings sets the settings property value. The settings for this role. Read-only. Nullable. +func (m *PrivilegedRole) SetSettings(value PrivilegedRoleSettingsable)() { + m.settings = value +} +// SetSummary sets the summary property value. The summary information for this role. Read-only. Nullable. +func (m *PrivilegedRole) SetSummary(value PrivilegedRoleSummaryable)() { + m.summary = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment.go new file mode 100644 index 000000000..5d8eaff0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment.go @@ -0,0 +1,191 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PrivilegedRoleAssignment struct { + Entity + // The UTC DateTime when the temporary privileged role assignment will be expired. For permanent role assignment, the value is null. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // true if the role assignment is activated. false if the role assignment is deactivated. + isElevated *bool + // Result message set by the service. + resultMessage *string + // Role identifier. In GUID string format. + roleId *string + // Read-only. Nullable. The associated role information. + roleInfo PrivilegedRoleable + // User identifier. In GUID string format. + userId *string +} +// NewPrivilegedRoleAssignment instantiates a new privilegedRoleAssignment and sets the default values. +func NewPrivilegedRoleAssignment()(*PrivilegedRoleAssignment) { + m := &PrivilegedRoleAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleAssignment(), nil +} +// GetExpirationDateTime gets the expirationDateTime property value. The UTC DateTime when the temporary privileged role assignment will be expired. For permanent role assignment, the value is null. +func (m *PrivilegedRoleAssignment) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["isElevated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsElevated(val) + } + return nil + } + res["resultMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResultMessage(val) + } + return nil + } + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleInfo(val.(PrivilegedRoleable)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetIsElevated gets the isElevated property value. true if the role assignment is activated. false if the role assignment is deactivated. +func (m *PrivilegedRoleAssignment) GetIsElevated()(*bool) { + return m.isElevated +} +// GetResultMessage gets the resultMessage property value. Result message set by the service. +func (m *PrivilegedRoleAssignment) GetResultMessage()(*string) { + return m.resultMessage +} +// GetRoleId gets the roleId property value. Role identifier. In GUID string format. +func (m *PrivilegedRoleAssignment) GetRoleId()(*string) { + return m.roleId +} +// GetRoleInfo gets the roleInfo property value. Read-only. Nullable. The associated role information. +func (m *PrivilegedRoleAssignment) GetRoleInfo()(PrivilegedRoleable) { + return m.roleInfo +} +// GetUserId gets the userId property value. User identifier. In GUID string format. +func (m *PrivilegedRoleAssignment) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *PrivilegedRoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isElevated", m.GetIsElevated()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resultMessage", m.GetResultMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleInfo", m.GetRoleInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetExpirationDateTime sets the expirationDateTime property value. The UTC DateTime when the temporary privileged role assignment will be expired. For permanent role assignment, the value is null. +func (m *PrivilegedRoleAssignment) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIsElevated sets the isElevated property value. true if the role assignment is activated. false if the role assignment is deactivated. +func (m *PrivilegedRoleAssignment) SetIsElevated(value *bool)() { + m.isElevated = value +} +// SetResultMessage sets the resultMessage property value. Result message set by the service. +func (m *PrivilegedRoleAssignment) SetResultMessage(value *string)() { + m.resultMessage = value +} +// SetRoleId sets the roleId property value. Role identifier. In GUID string format. +func (m *PrivilegedRoleAssignment) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleInfo sets the roleInfo property value. Read-only. Nullable. The associated role information. +func (m *PrivilegedRoleAssignment) SetRoleInfo(value PrivilegedRoleable)() { + m.roleInfo = value +} +// SetUserId sets the userId property value. User identifier. In GUID string format. +func (m *PrivilegedRoleAssignment) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_response.go new file mode 100644 index 000000000..874781935 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentCollectionResponse +type PrivilegedRoleAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedRoleAssignmentable +} +// NewPrivilegedRoleAssignmentCollectionResponse instantiates a new PrivilegedRoleAssignmentCollectionResponse and sets the default values. +func NewPrivilegedRoleAssignmentCollectionResponse()(*PrivilegedRoleAssignmentCollectionResponse) { + m := &PrivilegedRoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedRoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedRoleAssignmentCollectionResponse) GetValue()([]PrivilegedRoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedRoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedRoleAssignmentCollectionResponse) SetValue(value []PrivilegedRoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_responseable.go new file mode 100644 index 000000000..eca841195 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentCollectionResponseable +type PrivilegedRoleAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedRoleAssignmentable) + SetValue(value []PrivilegedRoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request.go new file mode 100644 index 000000000..6a1ecc4be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request.go @@ -0,0 +1,347 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentRequest +type PrivilegedRoleAssignmentRequest struct { + Entity + // The state of the assignment. The value can be Eligible for eligible assignment Active - if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. + assignmentState *string + // The duration of a role assignment. + duration *string + // The reason for the role assignment. + reason *string + // Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + requestedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The id of the role. + roleId *string + // The roleInfo object of the role assignment request. + roleInfo PrivilegedRoleable + // The schedule object of the role assignment request. + schedule GovernanceScheduleable + // Read-only.The status of the role assignment request. The value can be NotStarted,Completed,RequestedApproval,Scheduled,Approved,ApprovalDenied,ApprovalAborted,Cancelling,Cancelled,Revoked,RequestExpired. + status *string + // The ticketNumber for the role assignment. + ticketNumber *string + // The ticketSystem for the role assignment. + ticketSystem *string + // Representing the type of the operation on the role assignment. The value can be AdminAdd: Administrators add users to roles;UserAdd: Users add role assignments. + type_escaped *string + // The id of the user. + userId *string +} +// NewPrivilegedRoleAssignmentRequest instantiates a new privilegedRoleAssignmentRequest and sets the default values. +func NewPrivilegedRoleAssignmentRequest()(*PrivilegedRoleAssignmentRequest) { + m := &PrivilegedRoleAssignmentRequest{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedRoleAssignmentRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleAssignmentRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleAssignmentRequest(), nil +} +// GetAssignmentState gets the assignmentState property value. The state of the assignment. The value can be Eligible for eligible assignment Active - if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. +func (m *PrivilegedRoleAssignmentRequest) GetAssignmentState()(*string) { + return m.assignmentState +} +// GetDuration gets the duration property value. The duration of a role assignment. +func (m *PrivilegedRoleAssignmentRequest) GetDuration()(*string) { + return m.duration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleAssignmentRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignmentState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignmentState(val) + } + return nil + } + res["duration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDuration(val) + } + return nil + } + res["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["requestedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedDateTime(val) + } + return nil + } + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePrivilegedRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleInfo(val.(PrivilegedRoleable)) + } + return nil + } + res["schedule"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateGovernanceScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSchedule(val.(GovernanceScheduleable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["ticketNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketNumber(val) + } + return nil + } + res["ticketSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketSystem(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetReason gets the reason property value. The reason for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) GetReason()(*string) { + return m.reason +} +// GetRequestedDateTime gets the requestedDateTime property value. Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PrivilegedRoleAssignmentRequest) GetRequestedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestedDateTime +} +// GetRoleId gets the roleId property value. The id of the role. +func (m *PrivilegedRoleAssignmentRequest) GetRoleId()(*string) { + return m.roleId +} +// GetRoleInfo gets the roleInfo property value. The roleInfo object of the role assignment request. +func (m *PrivilegedRoleAssignmentRequest) GetRoleInfo()(PrivilegedRoleable) { + return m.roleInfo +} +// GetSchedule gets the schedule property value. The schedule object of the role assignment request. +func (m *PrivilegedRoleAssignmentRequest) GetSchedule()(GovernanceScheduleable) { + return m.schedule +} +// GetStatus gets the status property value. Read-only.The status of the role assignment request. The value can be NotStarted,Completed,RequestedApproval,Scheduled,Approved,ApprovalDenied,ApprovalAborted,Cancelling,Cancelled,Revoked,RequestExpired. +func (m *PrivilegedRoleAssignmentRequest) GetStatus()(*string) { + return m.status +} +// GetTicketNumber gets the ticketNumber property value. The ticketNumber for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) GetTicketNumber()(*string) { + return m.ticketNumber +} +// GetTicketSystem gets the ticketSystem property value. The ticketSystem for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) GetTicketSystem()(*string) { + return m.ticketSystem +} +// GetType gets the type property value. Representing the type of the operation on the role assignment. The value can be AdminAdd: Administrators add users to roles;UserAdd: Users add role assignments. +func (m *PrivilegedRoleAssignmentRequest) GetType()(*string) { + return m.type_escaped +} +// GetUserId gets the userId property value. The id of the user. +func (m *PrivilegedRoleAssignmentRequest) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *PrivilegedRoleAssignmentRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("assignmentState", m.GetAssignmentState()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("duration", m.GetDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestedDateTime", m.GetRequestedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleInfo", m.GetRoleInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("schedule", m.GetSchedule()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ticketNumber", m.GetTicketNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ticketSystem", m.GetTicketSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetAssignmentState sets the assignmentState property value. The state of the assignment. The value can be Eligible for eligible assignment Active - if it is directly assigned Active by administrators, or activated on an eligible assignment by the users. +func (m *PrivilegedRoleAssignmentRequest) SetAssignmentState(value *string)() { + m.assignmentState = value +} +// SetDuration sets the duration property value. The duration of a role assignment. +func (m *PrivilegedRoleAssignmentRequest) SetDuration(value *string)() { + m.duration = value +} +// SetReason sets the reason property value. The reason for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) SetReason(value *string)() { + m.reason = value +} +// SetRequestedDateTime sets the requestedDateTime property value. Read-only. The request create time. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *PrivilegedRoleAssignmentRequest) SetRequestedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestedDateTime = value +} +// SetRoleId sets the roleId property value. The id of the role. +func (m *PrivilegedRoleAssignmentRequest) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleInfo sets the roleInfo property value. The roleInfo object of the role assignment request. +func (m *PrivilegedRoleAssignmentRequest) SetRoleInfo(value PrivilegedRoleable)() { + m.roleInfo = value +} +// SetSchedule sets the schedule property value. The schedule object of the role assignment request. +func (m *PrivilegedRoleAssignmentRequest) SetSchedule(value GovernanceScheduleable)() { + m.schedule = value +} +// SetStatus sets the status property value. Read-only.The status of the role assignment request. The value can be NotStarted,Completed,RequestedApproval,Scheduled,Approved,ApprovalDenied,ApprovalAborted,Cancelling,Cancelled,Revoked,RequestExpired. +func (m *PrivilegedRoleAssignmentRequest) SetStatus(value *string)() { + m.status = value +} +// SetTicketNumber sets the ticketNumber property value. The ticketNumber for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) SetTicketNumber(value *string)() { + m.ticketNumber = value +} +// SetTicketSystem sets the ticketSystem property value. The ticketSystem for the role assignment. +func (m *PrivilegedRoleAssignmentRequest) SetTicketSystem(value *string)() { + m.ticketSystem = value +} +// SetType sets the type property value. Representing the type of the operation on the role assignment. The value can be AdminAdd: Administrators add users to roles;UserAdd: Users add role assignments. +func (m *PrivilegedRoleAssignmentRequest) SetType(value *string)() { + m.type_escaped = value +} +// SetUserId sets the userId property value. The id of the user. +func (m *PrivilegedRoleAssignmentRequest) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_response.go new file mode 100644 index 000000000..235dae531 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentRequestCollectionResponse +type PrivilegedRoleAssignmentRequestCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedRoleAssignmentRequestable +} +// NewPrivilegedRoleAssignmentRequestCollectionResponse instantiates a new PrivilegedRoleAssignmentRequestCollectionResponse and sets the default values. +func NewPrivilegedRoleAssignmentRequestCollectionResponse()(*PrivilegedRoleAssignmentRequestCollectionResponse) { + m := &PrivilegedRoleAssignmentRequestCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedRoleAssignmentRequestCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleAssignmentRequestCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleAssignmentRequestCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleAssignmentRequestCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedRoleAssignmentRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedRoleAssignmentRequestable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedRoleAssignmentRequestable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedRoleAssignmentRequestCollectionResponse) GetValue()([]PrivilegedRoleAssignmentRequestable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedRoleAssignmentRequestCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedRoleAssignmentRequestCollectionResponse) SetValue(value []PrivilegedRoleAssignmentRequestable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_responseable.go new file mode 100644 index 000000000..cb38f4d05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_request_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentRequestCollectionResponseable +type PrivilegedRoleAssignmentRequestCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedRoleAssignmentRequestable) + SetValue(value []PrivilegedRoleAssignmentRequestable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignment_requestable.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_requestable.go new file mode 100644 index 000000000..112ce5b31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignment_requestable.go @@ -0,0 +1,36 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentRequestable +type PrivilegedRoleAssignmentRequestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentState()(*string) + GetDuration()(*string) + GetReason()(*string) + GetRequestedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRoleId()(*string) + GetRoleInfo()(PrivilegedRoleable) + GetSchedule()(GovernanceScheduleable) + GetStatus()(*string) + GetTicketNumber()(*string) + GetTicketSystem()(*string) + GetType()(*string) + GetUserId()(*string) + SetAssignmentState(value *string)() + SetDuration(value *string)() + SetReason(value *string)() + SetRequestedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRoleId(value *string)() + SetRoleInfo(value PrivilegedRoleable)() + SetSchedule(value GovernanceScheduleable)() + SetStatus(value *string)() + SetTicketNumber(value *string)() + SetTicketSystem(value *string)() + SetType(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_assignmentable.go b/src/internal/connector/graph/betasdk/models/privileged_role_assignmentable.go new file mode 100644 index 000000000..71d15e319 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_assignmentable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleAssignmentable +type PrivilegedRoleAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIsElevated()(*bool) + GetResultMessage()(*string) + GetRoleId()(*string) + GetRoleInfo()(PrivilegedRoleable) + GetUserId()(*string) + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIsElevated(value *bool)() + SetResultMessage(value *string)() + SetRoleId(value *string)() + SetRoleInfo(value PrivilegedRoleable)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_role_collection_response.go new file mode 100644 index 000000000..10a115701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleCollectionResponse +type PrivilegedRoleCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedRoleable +} +// NewPrivilegedRoleCollectionResponse instantiates a new PrivilegedRoleCollectionResponse and sets the default values. +func NewPrivilegedRoleCollectionResponse()(*PrivilegedRoleCollectionResponse) { + m := &PrivilegedRoleCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedRoleCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedRoleable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedRoleable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedRoleCollectionResponse) GetValue()([]PrivilegedRoleable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedRoleCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedRoleCollectionResponse) SetValue(value []PrivilegedRoleable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_role_collection_responseable.go new file mode 100644 index 000000000..da9cabceb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleCollectionResponseable +type PrivilegedRoleCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedRoleable) + SetValue(value []PrivilegedRoleable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_settings.go b/src/internal/connector/graph/betasdk/models/privileged_role_settings.go new file mode 100644 index 000000000..8acc85326 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_settings.go @@ -0,0 +1,298 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleSettings +type PrivilegedRoleSettings struct { + Entity + // true if the approval is required when activate the role. false if the approval is not required when activate the role. + approvalOnElevation *bool + // List of Approval ids, if approval is required for activation. + approverIds []string + // The duration when the role is activated. + elevationDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // true if mfaOnElevation is configurable. false if mfaOnElevation is not configurable. + isMfaOnElevationConfigurable *bool + // Internal used only. + lastGlobalAdmin *bool + // Maximal duration for the activated role. + maxElavationDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // true if MFA is required to activate the role. false if MFA is not required to activate the role. + mfaOnElevation *bool + // Minimal duration for the activated role. + minElevationDuration *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // true if send notification to the end user when the role is activated. false if do not send notification when the role is activated. + notificationToUserOnElevation *bool + // true if the ticketing information is required when activate the role. false if the ticketing information is not required when activate the role. + ticketingInfoOnElevation *bool +} +// NewPrivilegedRoleSettings instantiates a new privilegedRoleSettings and sets the default values. +func NewPrivilegedRoleSettings()(*PrivilegedRoleSettings) { + m := &PrivilegedRoleSettings{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedRoleSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleSettings(), nil +} +// GetApprovalOnElevation gets the approvalOnElevation property value. true if the approval is required when activate the role. false if the approval is not required when activate the role. +func (m *PrivilegedRoleSettings) GetApprovalOnElevation()(*bool) { + return m.approvalOnElevation +} +// GetApproverIds gets the approverIds property value. List of Approval ids, if approval is required for activation. +func (m *PrivilegedRoleSettings) GetApproverIds()([]string) { + return m.approverIds +} +// GetElevationDuration gets the elevationDuration property value. The duration when the role is activated. +func (m *PrivilegedRoleSettings) GetElevationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.elevationDuration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["approvalOnElevation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalOnElevation(val) + } + return nil + } + res["approverIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetApproverIds(res) + } + return nil + } + res["elevationDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetElevationDuration(val) + } + return nil + } + res["isMfaOnElevationConfigurable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMfaOnElevationConfigurable(val) + } + return nil + } + res["lastGlobalAdmin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetLastGlobalAdmin(val) + } + return nil + } + res["maxElavationDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMaxElavationDuration(val) + } + return nil + } + res["mfaOnElevation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMfaOnElevation(val) + } + return nil + } + res["minElevationDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetMinElevationDuration(val) + } + return nil + } + res["notificationToUserOnElevation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetNotificationToUserOnElevation(val) + } + return nil + } + res["ticketingInfoOnElevation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTicketingInfoOnElevation(val) + } + return nil + } + return res +} +// GetIsMfaOnElevationConfigurable gets the isMfaOnElevationConfigurable property value. true if mfaOnElevation is configurable. false if mfaOnElevation is not configurable. +func (m *PrivilegedRoleSettings) GetIsMfaOnElevationConfigurable()(*bool) { + return m.isMfaOnElevationConfigurable +} +// GetLastGlobalAdmin gets the lastGlobalAdmin property value. Internal used only. +func (m *PrivilegedRoleSettings) GetLastGlobalAdmin()(*bool) { + return m.lastGlobalAdmin +} +// GetMaxElavationDuration gets the maxElavationDuration property value. Maximal duration for the activated role. +func (m *PrivilegedRoleSettings) GetMaxElavationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.maxElavationDuration +} +// GetMfaOnElevation gets the mfaOnElevation property value. true if MFA is required to activate the role. false if MFA is not required to activate the role. +func (m *PrivilegedRoleSettings) GetMfaOnElevation()(*bool) { + return m.mfaOnElevation +} +// GetMinElevationDuration gets the minElevationDuration property value. Minimal duration for the activated role. +func (m *PrivilegedRoleSettings) GetMinElevationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.minElevationDuration +} +// GetNotificationToUserOnElevation gets the notificationToUserOnElevation property value. true if send notification to the end user when the role is activated. false if do not send notification when the role is activated. +func (m *PrivilegedRoleSettings) GetNotificationToUserOnElevation()(*bool) { + return m.notificationToUserOnElevation +} +// GetTicketingInfoOnElevation gets the ticketingInfoOnElevation property value. true if the ticketing information is required when activate the role. false if the ticketing information is not required when activate the role. +func (m *PrivilegedRoleSettings) GetTicketingInfoOnElevation()(*bool) { + return m.ticketingInfoOnElevation +} +// Serialize serializes information the current object +func (m *PrivilegedRoleSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("approvalOnElevation", m.GetApprovalOnElevation()) + if err != nil { + return err + } + } + if m.GetApproverIds() != nil { + err = writer.WriteCollectionOfStringValues("approverIds", m.GetApproverIds()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("elevationDuration", m.GetElevationDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMfaOnElevationConfigurable", m.GetIsMfaOnElevationConfigurable()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("lastGlobalAdmin", m.GetLastGlobalAdmin()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("maxElavationDuration", m.GetMaxElavationDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("mfaOnElevation", m.GetMfaOnElevation()) + if err != nil { + return err + } + } + { + err = writer.WriteISODurationValue("minElevationDuration", m.GetMinElevationDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("notificationToUserOnElevation", m.GetNotificationToUserOnElevation()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("ticketingInfoOnElevation", m.GetTicketingInfoOnElevation()) + if err != nil { + return err + } + } + return nil +} +// SetApprovalOnElevation sets the approvalOnElevation property value. true if the approval is required when activate the role. false if the approval is not required when activate the role. +func (m *PrivilegedRoleSettings) SetApprovalOnElevation(value *bool)() { + m.approvalOnElevation = value +} +// SetApproverIds sets the approverIds property value. List of Approval ids, if approval is required for activation. +func (m *PrivilegedRoleSettings) SetApproverIds(value []string)() { + m.approverIds = value +} +// SetElevationDuration sets the elevationDuration property value. The duration when the role is activated. +func (m *PrivilegedRoleSettings) SetElevationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.elevationDuration = value +} +// SetIsMfaOnElevationConfigurable sets the isMfaOnElevationConfigurable property value. true if mfaOnElevation is configurable. false if mfaOnElevation is not configurable. +func (m *PrivilegedRoleSettings) SetIsMfaOnElevationConfigurable(value *bool)() { + m.isMfaOnElevationConfigurable = value +} +// SetLastGlobalAdmin sets the lastGlobalAdmin property value. Internal used only. +func (m *PrivilegedRoleSettings) SetLastGlobalAdmin(value *bool)() { + m.lastGlobalAdmin = value +} +// SetMaxElavationDuration sets the maxElavationDuration property value. Maximal duration for the activated role. +func (m *PrivilegedRoleSettings) SetMaxElavationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.maxElavationDuration = value +} +// SetMfaOnElevation sets the mfaOnElevation property value. true if MFA is required to activate the role. false if MFA is not required to activate the role. +func (m *PrivilegedRoleSettings) SetMfaOnElevation(value *bool)() { + m.mfaOnElevation = value +} +// SetMinElevationDuration sets the minElevationDuration property value. Minimal duration for the activated role. +func (m *PrivilegedRoleSettings) SetMinElevationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.minElevationDuration = value +} +// SetNotificationToUserOnElevation sets the notificationToUserOnElevation property value. true if send notification to the end user when the role is activated. false if do not send notification when the role is activated. +func (m *PrivilegedRoleSettings) SetNotificationToUserOnElevation(value *bool)() { + m.notificationToUserOnElevation = value +} +// SetTicketingInfoOnElevation sets the ticketingInfoOnElevation property value. true if the ticketing information is required when activate the role. false if the ticketing information is not required when activate the role. +func (m *PrivilegedRoleSettings) SetTicketingInfoOnElevation(value *bool)() { + m.ticketingInfoOnElevation = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_settingsable.go b/src/internal/connector/graph/betasdk/models/privileged_role_settingsable.go new file mode 100644 index 000000000..5b617bdc4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_settingsable.go @@ -0,0 +1,31 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleSettingsable +type PrivilegedRoleSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalOnElevation()(*bool) + GetApproverIds()([]string) + GetElevationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetIsMfaOnElevationConfigurable()(*bool) + GetLastGlobalAdmin()(*bool) + GetMaxElavationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetMfaOnElevation()(*bool) + GetMinElevationDuration()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetNotificationToUserOnElevation()(*bool) + GetTicketingInfoOnElevation()(*bool) + SetApprovalOnElevation(value *bool)() + SetApproverIds(value []string)() + SetElevationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetIsMfaOnElevationConfigurable(value *bool)() + SetLastGlobalAdmin(value *bool)() + SetMaxElavationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetMfaOnElevation(value *bool)() + SetMinElevationDuration(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetNotificationToUserOnElevation(value *bool)() + SetTicketingInfoOnElevation(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_summary.go b/src/internal/connector/graph/betasdk/models/privileged_role_summary.go new file mode 100644 index 000000000..48c8312c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_summary.go @@ -0,0 +1,165 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleSummary +type PrivilegedRoleSummary struct { + Entity + // The number of users that have the role assigned and the role is activated. + elevatedCount *int32 + // The number of users that have the role assigned but the role is deactivated. + managedCount *int32 + // true if the role activation requires MFA. false if the role activation doesn't require MFA. + mfaEnabled *bool + // Possible values are: ok, bad. The value depends on the ratio of (managedCount / usersCount). If the ratio is less than a predefined threshold, ok is returned. Otherwise, bad is returned. + status *RoleSummaryStatus + // The number of users that are assigned with the role. + usersCount *int32 +} +// NewPrivilegedRoleSummary instantiates a new privilegedRoleSummary and sets the default values. +func NewPrivilegedRoleSummary()(*PrivilegedRoleSummary) { + m := &PrivilegedRoleSummary{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedRoleSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedRoleSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedRoleSummary(), nil +} +// GetElevatedCount gets the elevatedCount property value. The number of users that have the role assigned and the role is activated. +func (m *PrivilegedRoleSummary) GetElevatedCount()(*int32) { + return m.elevatedCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedRoleSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["elevatedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetElevatedCount(val) + } + return nil + } + res["managedCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagedCount(val) + } + return nil + } + res["mfaEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMfaEnabled(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRoleSummaryStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*RoleSummaryStatus)) + } + return nil + } + res["usersCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUsersCount(val) + } + return nil + } + return res +} +// GetManagedCount gets the managedCount property value. The number of users that have the role assigned but the role is deactivated. +func (m *PrivilegedRoleSummary) GetManagedCount()(*int32) { + return m.managedCount +} +// GetMfaEnabled gets the mfaEnabled property value. true if the role activation requires MFA. false if the role activation doesn't require MFA. +func (m *PrivilegedRoleSummary) GetMfaEnabled()(*bool) { + return m.mfaEnabled +} +// GetStatus gets the status property value. Possible values are: ok, bad. The value depends on the ratio of (managedCount / usersCount). If the ratio is less than a predefined threshold, ok is returned. Otherwise, bad is returned. +func (m *PrivilegedRoleSummary) GetStatus()(*RoleSummaryStatus) { + return m.status +} +// GetUsersCount gets the usersCount property value. The number of users that are assigned with the role. +func (m *PrivilegedRoleSummary) GetUsersCount()(*int32) { + return m.usersCount +} +// Serialize serializes information the current object +func (m *PrivilegedRoleSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("elevatedCount", m.GetElevatedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("managedCount", m.GetManagedCount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("mfaEnabled", m.GetMfaEnabled()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("usersCount", m.GetUsersCount()) + if err != nil { + return err + } + } + return nil +} +// SetElevatedCount sets the elevatedCount property value. The number of users that have the role assigned and the role is activated. +func (m *PrivilegedRoleSummary) SetElevatedCount(value *int32)() { + m.elevatedCount = value +} +// SetManagedCount sets the managedCount property value. The number of users that have the role assigned but the role is deactivated. +func (m *PrivilegedRoleSummary) SetManagedCount(value *int32)() { + m.managedCount = value +} +// SetMfaEnabled sets the mfaEnabled property value. true if the role activation requires MFA. false if the role activation doesn't require MFA. +func (m *PrivilegedRoleSummary) SetMfaEnabled(value *bool)() { + m.mfaEnabled = value +} +// SetStatus sets the status property value. Possible values are: ok, bad. The value depends on the ratio of (managedCount / usersCount). If the ratio is less than a predefined threshold, ok is returned. Otherwise, bad is returned. +func (m *PrivilegedRoleSummary) SetStatus(value *RoleSummaryStatus)() { + m.status = value +} +// SetUsersCount sets the usersCount property value. The number of users that are assigned with the role. +func (m *PrivilegedRoleSummary) SetUsersCount(value *int32)() { + m.usersCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_role_summaryable.go b/src/internal/connector/graph/betasdk/models/privileged_role_summaryable.go new file mode 100644 index 000000000..a53c9f50f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_role_summaryable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleSummaryable +type PrivilegedRoleSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetElevatedCount()(*int32) + GetManagedCount()(*int32) + GetMfaEnabled()(*bool) + GetStatus()(*RoleSummaryStatus) + GetUsersCount()(*int32) + SetElevatedCount(value *int32)() + SetManagedCount(value *int32)() + SetMfaEnabled(value *bool)() + SetStatus(value *RoleSummaryStatus)() + SetUsersCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_roleable.go b/src/internal/connector/graph/betasdk/models/privileged_roleable.go new file mode 100644 index 000000000..659e974f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_roleable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedRoleable +type PrivilegedRoleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]PrivilegedRoleAssignmentable) + GetName()(*string) + GetSettings()(PrivilegedRoleSettingsable) + GetSummary()(PrivilegedRoleSummaryable) + SetAssignments(value []PrivilegedRoleAssignmentable)() + SetName(value *string)() + SetSettings(value PrivilegedRoleSettingsable)() + SetSummary(value PrivilegedRoleSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_signup_status.go b/src/internal/connector/graph/betasdk/models/privileged_signup_status.go new file mode 100644 index 000000000..e00a3d016 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_signup_status.go @@ -0,0 +1,87 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedSignupStatus +type PrivilegedSignupStatus struct { + Entity + // The isRegistered property + isRegistered *bool + // The status property + status *SetupStatus +} +// NewPrivilegedSignupStatus instantiates a new PrivilegedSignupStatus and sets the default values. +func NewPrivilegedSignupStatus()(*PrivilegedSignupStatus) { + m := &PrivilegedSignupStatus{ + Entity: *NewEntity(), + } + return m +} +// CreatePrivilegedSignupStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedSignupStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedSignupStatus(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedSignupStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["isRegistered"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRegistered(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSetupStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*SetupStatus)) + } + return nil + } + return res +} +// GetIsRegistered gets the isRegistered property value. The isRegistered property +func (m *PrivilegedSignupStatus) GetIsRegistered()(*bool) { + return m.isRegistered +} +// GetStatus gets the status property value. The status property +func (m *PrivilegedSignupStatus) GetStatus()(*SetupStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *PrivilegedSignupStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isRegistered", m.GetIsRegistered()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIsRegistered sets the isRegistered property value. The isRegistered property +func (m *PrivilegedSignupStatus) SetIsRegistered(value *bool)() { + m.isRegistered = value +} +// SetStatus sets the status property value. The status property +func (m *PrivilegedSignupStatus) SetStatus(value *SetupStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_response.go b/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_response.go new file mode 100644 index 000000000..68c05dd93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedSignupStatusCollectionResponse +type PrivilegedSignupStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PrivilegedSignupStatusable +} +// NewPrivilegedSignupStatusCollectionResponse instantiates a new PrivilegedSignupStatusCollectionResponse and sets the default values. +func NewPrivilegedSignupStatusCollectionResponse()(*PrivilegedSignupStatusCollectionResponse) { + m := &PrivilegedSignupStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePrivilegedSignupStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePrivilegedSignupStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPrivilegedSignupStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PrivilegedSignupStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrivilegedSignupStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrivilegedSignupStatusable, len(val)) + for i, v := range val { + res[i] = v.(PrivilegedSignupStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PrivilegedSignupStatusCollectionResponse) GetValue()([]PrivilegedSignupStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *PrivilegedSignupStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PrivilegedSignupStatusCollectionResponse) SetValue(value []PrivilegedSignupStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_responseable.go new file mode 100644 index 000000000..24e996caf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_signup_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedSignupStatusCollectionResponseable +type PrivilegedSignupStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PrivilegedSignupStatusable) + SetValue(value []PrivilegedSignupStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/privileged_signup_statusable.go b/src/internal/connector/graph/betasdk/models/privileged_signup_statusable.go new file mode 100644 index 000000000..1cb7ce6f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/privileged_signup_statusable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PrivilegedSignupStatusable +type PrivilegedSignupStatusable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsRegistered()(*bool) + GetStatus()(*SetupStatus) + SetIsRegistered(value *bool)() + SetStatus(value *SetupStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/process.go b/src/internal/connector/graph/betasdk/models/process.go new file mode 100644 index 000000000..73fb29740 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/process.go @@ -0,0 +1,385 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Process +type Process struct { + // User account identifier (user account context the process ran under) for example, AccountName, SID, and so on. + accountName *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 full process invocation commandline including all parameters. + commandLine *string + // Time at which the process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Complex type containing file hashes (cryptographic and location-sensitive). + fileHash FileHashable + // The integrity level of the process. Possible values are: unknown, untrusted, low, medium, high, system. + integrityLevel *ProcessIntegrityLevel + // True if the process is elevated. + isElevated *bool + // The name of the process' Image file. + name *string + // The OdataType property + odataType *string + // DateTime at which the parent process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + parentProcessCreatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The Process ID (PID) of the parent process. + parentProcessId *int32 + // The name of the image file of the parent process. + parentProcessName *string + // Full path, including filename. + path *string + // The Process ID (PID) of the process. + processId *int32 +} +// NewProcess instantiates a new process and sets the default values. +func NewProcess()(*Process) { + m := &Process{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProcessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProcessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProcess(), nil +} +// GetAccountName gets the accountName property value. User account identifier (user account context the process ran under) for example, AccountName, SID, and so on. +func (m *Process) GetAccountName()(*string) { + return m.accountName +} +// 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 *Process) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCommandLine gets the commandLine property value. The full process invocation commandline including all parameters. +func (m *Process) GetCommandLine()(*string) { + return m.commandLine +} +// GetCreatedDateTime gets the createdDateTime property value. Time at which the process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Process) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Process) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["commandLine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCommandLine(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["fileHash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileHashFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileHash(val.(FileHashable)) + } + return nil + } + res["integrityLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProcessIntegrityLevel) + if err != nil { + return err + } + if val != nil { + m.SetIntegrityLevel(val.(*ProcessIntegrityLevel)) + } + return nil + } + res["isElevated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsElevated(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["parentProcessCreatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetParentProcessCreatedDateTime(val) + } + return nil + } + res["parentProcessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetParentProcessId(val) + } + return nil + } + res["parentProcessName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetParentProcessName(val) + } + return nil + } + res["path"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPath(val) + } + return nil + } + res["processId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProcessId(val) + } + return nil + } + return res +} +// GetFileHash gets the fileHash property value. Complex type containing file hashes (cryptographic and location-sensitive). +func (m *Process) GetFileHash()(FileHashable) { + return m.fileHash +} +// GetIntegrityLevel gets the integrityLevel property value. The integrity level of the process. Possible values are: unknown, untrusted, low, medium, high, system. +func (m *Process) GetIntegrityLevel()(*ProcessIntegrityLevel) { + return m.integrityLevel +} +// GetIsElevated gets the isElevated property value. True if the process is elevated. +func (m *Process) GetIsElevated()(*bool) { + return m.isElevated +} +// GetName gets the name property value. The name of the process' Image file. +func (m *Process) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Process) GetOdataType()(*string) { + return m.odataType +} +// GetParentProcessCreatedDateTime gets the parentProcessCreatedDateTime property value. DateTime at which the parent process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Process) GetParentProcessCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.parentProcessCreatedDateTime +} +// GetParentProcessId gets the parentProcessId property value. The Process ID (PID) of the parent process. +func (m *Process) GetParentProcessId()(*int32) { + return m.parentProcessId +} +// GetParentProcessName gets the parentProcessName property value. The name of the image file of the parent process. +func (m *Process) GetParentProcessName()(*string) { + return m.parentProcessName +} +// GetPath gets the path property value. Full path, including filename. +func (m *Process) GetPath()(*string) { + return m.path +} +// GetProcessId gets the processId property value. The Process ID (PID) of the process. +func (m *Process) GetProcessId()(*int32) { + return m.processId +} +// Serialize serializes information the current object +func (m *Process) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("commandLine", m.GetCommandLine()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("fileHash", m.GetFileHash()) + if err != nil { + return err + } + } + if m.GetIntegrityLevel() != nil { + cast := (*m.GetIntegrityLevel()).String() + err := writer.WriteStringValue("integrityLevel", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isElevated", m.GetIsElevated()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("parentProcessCreatedDateTime", m.GetParentProcessCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("parentProcessId", m.GetParentProcessId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("parentProcessName", m.GetParentProcessName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("path", m.GetPath()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("processId", m.GetProcessId()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountName sets the accountName property value. User account identifier (user account context the process ran under) for example, AccountName, SID, and so on. +func (m *Process) SetAccountName(value *string)() { + m.accountName = value +} +// 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 *Process) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCommandLine sets the commandLine property value. The full process invocation commandline including all parameters. +func (m *Process) SetCommandLine(value *string)() { + m.commandLine = value +} +// SetCreatedDateTime sets the createdDateTime property value. Time at which the process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Process) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetFileHash sets the fileHash property value. Complex type containing file hashes (cryptographic and location-sensitive). +func (m *Process) SetFileHash(value FileHashable)() { + m.fileHash = value +} +// SetIntegrityLevel sets the integrityLevel property value. The integrity level of the process. Possible values are: unknown, untrusted, low, medium, high, system. +func (m *Process) SetIntegrityLevel(value *ProcessIntegrityLevel)() { + m.integrityLevel = value +} +// SetIsElevated sets the isElevated property value. True if the process is elevated. +func (m *Process) SetIsElevated(value *bool)() { + m.isElevated = value +} +// SetName sets the name property value. The name of the process' Image file. +func (m *Process) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Process) SetOdataType(value *string)() { + m.odataType = value +} +// SetParentProcessCreatedDateTime sets the parentProcessCreatedDateTime property value. DateTime at which the parent process was started. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *Process) SetParentProcessCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.parentProcessCreatedDateTime = value +} +// SetParentProcessId sets the parentProcessId property value. The Process ID (PID) of the parent process. +func (m *Process) SetParentProcessId(value *int32)() { + m.parentProcessId = value +} +// SetParentProcessName sets the parentProcessName property value. The name of the image file of the parent process. +func (m *Process) SetParentProcessName(value *string)() { + m.parentProcessName = value +} +// SetPath sets the path property value. Full path, including filename. +func (m *Process) SetPath(value *string)() { + m.path = value +} +// SetProcessId sets the processId property value. The Process ID (PID) of the process. +func (m *Process) SetProcessId(value *int32)() { + m.processId = value +} diff --git a/src/internal/connector/graph/betasdk/models/process_collection_response.go b/src/internal/connector/graph/betasdk/models/process_collection_response.go new file mode 100644 index 000000000..92bd13b13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/process_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProcessCollectionResponse +type ProcessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Processable +} +// NewProcessCollectionResponse instantiates a new ProcessCollectionResponse and sets the default values. +func NewProcessCollectionResponse()(*ProcessCollectionResponse) { + m := &ProcessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProcessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProcessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProcessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProcessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProcessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Processable, len(val)) + for i, v := range val { + res[i] = v.(Processable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProcessCollectionResponse) GetValue()([]Processable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProcessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProcessCollectionResponse) SetValue(value []Processable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/process_collection_responseable.go b/src/internal/connector/graph/betasdk/models/process_collection_responseable.go new file mode 100644 index 000000000..721034131 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/process_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProcessCollectionResponseable +type ProcessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Processable) + SetValue(value []Processable)() +} diff --git a/src/internal/connector/graph/betasdk/models/process_integrity_level.go b/src/internal/connector/graph/betasdk/models/process_integrity_level.go new file mode 100644 index 000000000..345a095ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/process_integrity_level.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProcessIntegrityLevel int + +const ( + UNKNOWN_PROCESSINTEGRITYLEVEL ProcessIntegrityLevel = iota + UNTRUSTED_PROCESSINTEGRITYLEVEL + LOW_PROCESSINTEGRITYLEVEL + MEDIUM_PROCESSINTEGRITYLEVEL + HIGH_PROCESSINTEGRITYLEVEL + SYSTEM_PROCESSINTEGRITYLEVEL + UNKNOWNFUTUREVALUE_PROCESSINTEGRITYLEVEL +) + +func (i ProcessIntegrityLevel) String() string { + return []string{"unknown", "untrusted", "low", "medium", "high", "system", "unknownFutureValue"}[i] +} +func ParseProcessIntegrityLevel(v string) (interface{}, error) { + result := UNKNOWN_PROCESSINTEGRITYLEVEL + switch v { + case "unknown": + result = UNKNOWN_PROCESSINTEGRITYLEVEL + case "untrusted": + result = UNTRUSTED_PROCESSINTEGRITYLEVEL + case "low": + result = LOW_PROCESSINTEGRITYLEVEL + case "medium": + result = MEDIUM_PROCESSINTEGRITYLEVEL + case "high": + result = HIGH_PROCESSINTEGRITYLEVEL + case "system": + result = SYSTEM_PROCESSINTEGRITYLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROCESSINTEGRITYLEVEL + default: + return 0, errors.New("Unknown ProcessIntegrityLevel value: " + v) + } + return &result, nil +} +func SerializeProcessIntegrityLevel(values []ProcessIntegrityLevel) []string { + 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/processable.go b/src/internal/connector/graph/betasdk/models/processable.go new file mode 100644 index 000000000..22a37cf81 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/processable.go @@ -0,0 +1,38 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Processable +type Processable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountName()(*string) + GetCommandLine()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFileHash()(FileHashable) + GetIntegrityLevel()(*ProcessIntegrityLevel) + GetIsElevated()(*bool) + GetName()(*string) + GetOdataType()(*string) + GetParentProcessCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetParentProcessId()(*int32) + GetParentProcessName()(*string) + GetPath()(*string) + GetProcessId()(*int32) + SetAccountName(value *string)() + SetCommandLine(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFileHash(value FileHashable)() + SetIntegrityLevel(value *ProcessIntegrityLevel)() + SetIsElevated(value *bool)() + SetName(value *string)() + SetOdataType(value *string)() + SetParentProcessCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetParentProcessId(value *int32)() + SetParentProcessName(value *string)() + SetPath(value *string)() + SetProcessId(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile.go b/src/internal/connector/graph/betasdk/models/profile.go new file mode 100644 index 000000000..7a8ef405c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile.go @@ -0,0 +1,680 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Profile +type Profile struct { + Entity + // The account property + account []UserAccountInformationable + // Represents details of addresses associated with the user. + addresses []ItemAddressable + // Represents the details of meaningful dates associated with a person. + anniversaries []PersonAnnualEventable + // Represents the details of awards or honors associated with a person. + awards []PersonAwardable + // Represents the details of certifications associated with a person. + certifications []PersonCertificationable + // Represents data that a user has supplied related to undergraduate, graduate, postgraduate or other educational activities. + educationalActivities []EducationalActivityable + // Represents detailed information about email addresses associated with the user. + emails []ItemEmailable + // Provides detailed information about interests the user has associated with themselves in various services. + interests []PersonInterestable + // Represents detailed information about languages that a user has added to their profile. + languages []LanguageProficiencyable + // Represents the names a user has added to their profile. + names []PersonNameable + // Represents notes that a user has added to their profile. + notes []PersonAnnotationable + // Represents patents that a user has added to their profile. + patents []ItemPatentable + // Represents detailed information about phone numbers associated with a user in various services. + phones []ItemPhoneable + // Represents detailed information about work positions associated with a user's profile. + positions []WorkPositionable + // Represents detailed information about projects associated with a user. + projects []ProjectParticipationable + // Represents details of any publications a user has added to their profile. + publications []ItemPublicationable + // Represents detailed information about skills associated with a user in various services. + skills []SkillProficiencyable + // Represents web accounts the user has indicated they use or has added to their user profile. + webAccounts []WebAccountable + // Represents detailed information about websites associated with a user in various services. + websites []PersonWebsiteable +} +// NewProfile instantiates a new profile and sets the default values. +func NewProfile()(*Profile) { + m := &Profile{ + Entity: *NewEntity(), + } + return m +} +// CreateProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfile(), nil +} +// GetAccount gets the account property value. The account property +func (m *Profile) GetAccount()([]UserAccountInformationable) { + return m.account +} +// GetAddresses gets the addresses property value. Represents details of addresses associated with the user. +func (m *Profile) GetAddresses()([]ItemAddressable) { + return m.addresses +} +// GetAnniversaries gets the anniversaries property value. Represents the details of meaningful dates associated with a person. +func (m *Profile) GetAnniversaries()([]PersonAnnualEventable) { + return m.anniversaries +} +// GetAwards gets the awards property value. Represents the details of awards or honors associated with a person. +func (m *Profile) GetAwards()([]PersonAwardable) { + return m.awards +} +// GetCertifications gets the certifications property value. Represents the details of certifications associated with a person. +func (m *Profile) GetCertifications()([]PersonCertificationable) { + return m.certifications +} +// GetEducationalActivities gets the educationalActivities property value. Represents data that a user has supplied related to undergraduate, graduate, postgraduate or other educational activities. +func (m *Profile) GetEducationalActivities()([]EducationalActivityable) { + return m.educationalActivities +} +// GetEmails gets the emails property value. Represents detailed information about email addresses associated with the user. +func (m *Profile) GetEmails()([]ItemEmailable) { + return m.emails +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Profile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserAccountInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserAccountInformationable, len(val)) + for i, v := range val { + res[i] = v.(UserAccountInformationable) + } + m.SetAccount(res) + } + return nil + } + res["addresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemAddressable, len(val)) + for i, v := range val { + res[i] = v.(ItemAddressable) + } + m.SetAddresses(res) + } + return nil + } + res["anniversaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAnnualEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAnnualEventable, len(val)) + for i, v := range val { + res[i] = v.(PersonAnnualEventable) + } + m.SetAnniversaries(res) + } + return nil + } + res["awards"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAwardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAwardable, len(val)) + for i, v := range val { + res[i] = v.(PersonAwardable) + } + m.SetAwards(res) + } + return nil + } + res["certifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonCertificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonCertificationable, len(val)) + for i, v := range val { + res[i] = v.(PersonCertificationable) + } + m.SetCertifications(res) + } + return nil + } + res["educationalActivities"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEducationalActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EducationalActivityable, len(val)) + for i, v := range val { + res[i] = v.(EducationalActivityable) + } + m.SetEducationalActivities(res) + } + return nil + } + res["emails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemEmailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemEmailable, len(val)) + for i, v := range val { + res[i] = v.(ItemEmailable) + } + m.SetEmails(res) + } + return nil + } + res["interests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonInterestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonInterestable, len(val)) + for i, v := range val { + res[i] = v.(PersonInterestable) + } + m.SetInterests(res) + } + return nil + } + res["languages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLanguageProficiencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LanguageProficiencyable, len(val)) + for i, v := range val { + res[i] = v.(LanguageProficiencyable) + } + m.SetLanguages(res) + } + return nil + } + res["names"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonNameable, len(val)) + for i, v := range val { + res[i] = v.(PersonNameable) + } + m.SetNames(res) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonAnnotationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonAnnotationable, len(val)) + for i, v := range val { + res[i] = v.(PersonAnnotationable) + } + m.SetNotes(res) + } + return nil + } + res["patents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPatentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPatentable, len(val)) + for i, v := range val { + res[i] = v.(ItemPatentable) + } + m.SetPatents(res) + } + return nil + } + res["phones"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPhoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPhoneable, len(val)) + for i, v := range val { + res[i] = v.(ItemPhoneable) + } + m.SetPhones(res) + } + return nil + } + res["positions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkPositionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WorkPositionable, len(val)) + for i, v := range val { + res[i] = v.(WorkPositionable) + } + m.SetPositions(res) + } + return nil + } + res["projects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProjectParticipationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProjectParticipationable, len(val)) + for i, v := range val { + res[i] = v.(ProjectParticipationable) + } + m.SetProjects(res) + } + return nil + } + res["publications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateItemPublicationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ItemPublicationable, len(val)) + for i, v := range val { + res[i] = v.(ItemPublicationable) + } + m.SetPublications(res) + } + return nil + } + res["skills"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSkillProficiencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SkillProficiencyable, len(val)) + for i, v := range val { + res[i] = v.(SkillProficiencyable) + } + m.SetSkills(res) + } + return nil + } + res["webAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWebAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]WebAccountable, len(val)) + for i, v := range val { + res[i] = v.(WebAccountable) + } + m.SetWebAccounts(res) + } + return nil + } + res["websites"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePersonWebsiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PersonWebsiteable, len(val)) + for i, v := range val { + res[i] = v.(PersonWebsiteable) + } + m.SetWebsites(res) + } + return nil + } + return res +} +// GetInterests gets the interests property value. Provides detailed information about interests the user has associated with themselves in various services. +func (m *Profile) GetInterests()([]PersonInterestable) { + return m.interests +} +// GetLanguages gets the languages property value. Represents detailed information about languages that a user has added to their profile. +func (m *Profile) GetLanguages()([]LanguageProficiencyable) { + return m.languages +} +// GetNames gets the names property value. Represents the names a user has added to their profile. +func (m *Profile) GetNames()([]PersonNameable) { + return m.names +} +// GetNotes gets the notes property value. Represents notes that a user has added to their profile. +func (m *Profile) GetNotes()([]PersonAnnotationable) { + return m.notes +} +// GetPatents gets the patents property value. Represents patents that a user has added to their profile. +func (m *Profile) GetPatents()([]ItemPatentable) { + return m.patents +} +// GetPhones gets the phones property value. Represents detailed information about phone numbers associated with a user in various services. +func (m *Profile) GetPhones()([]ItemPhoneable) { + return m.phones +} +// GetPositions gets the positions property value. Represents detailed information about work positions associated with a user's profile. +func (m *Profile) GetPositions()([]WorkPositionable) { + return m.positions +} +// GetProjects gets the projects property value. Represents detailed information about projects associated with a user. +func (m *Profile) GetProjects()([]ProjectParticipationable) { + return m.projects +} +// GetPublications gets the publications property value. Represents details of any publications a user has added to their profile. +func (m *Profile) GetPublications()([]ItemPublicationable) { + return m.publications +} +// GetSkills gets the skills property value. Represents detailed information about skills associated with a user in various services. +func (m *Profile) GetSkills()([]SkillProficiencyable) { + return m.skills +} +// GetWebAccounts gets the webAccounts property value. Represents web accounts the user has indicated they use or has added to their user profile. +func (m *Profile) GetWebAccounts()([]WebAccountable) { + return m.webAccounts +} +// GetWebsites gets the websites property value. Represents detailed information about websites associated with a user in various services. +func (m *Profile) GetWebsites()([]PersonWebsiteable) { + return m.websites +} +// Serialize serializes information the current object +func (m *Profile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAccount() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAccount())) + for i, v := range m.GetAccount() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("account", cast) + if err != nil { + return err + } + } + if m.GetAddresses() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAddresses())) + for i, v := range m.GetAddresses() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("addresses", cast) + if err != nil { + return err + } + } + if m.GetAnniversaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAnniversaries())) + for i, v := range m.GetAnniversaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("anniversaries", cast) + if err != nil { + return err + } + } + if m.GetAwards() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAwards())) + for i, v := range m.GetAwards() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("awards", cast) + if err != nil { + return err + } + } + if m.GetCertifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCertifications())) + for i, v := range m.GetCertifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("certifications", cast) + if err != nil { + return err + } + } + if m.GetEducationalActivities() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEducationalActivities())) + for i, v := range m.GetEducationalActivities() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("educationalActivities", cast) + if err != nil { + return err + } + } + if m.GetEmails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmails())) + for i, v := range m.GetEmails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emails", cast) + if err != nil { + return err + } + } + if m.GetInterests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetInterests())) + for i, v := range m.GetInterests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("interests", cast) + if err != nil { + return err + } + } + if m.GetLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLanguages())) + for i, v := range m.GetLanguages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("languages", cast) + if err != nil { + return err + } + } + if m.GetNames() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNames())) + for i, v := range m.GetNames() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("names", cast) + if err != nil { + return err + } + } + if m.GetNotes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNotes())) + for i, v := range m.GetNotes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("notes", cast) + if err != nil { + return err + } + } + if m.GetPatents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPatents())) + for i, v := range m.GetPatents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("patents", cast) + if err != nil { + return err + } + } + if m.GetPhones() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPhones())) + for i, v := range m.GetPhones() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("phones", cast) + if err != nil { + return err + } + } + if m.GetPositions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPositions())) + for i, v := range m.GetPositions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("positions", cast) + if err != nil { + return err + } + } + if m.GetProjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProjects())) + for i, v := range m.GetProjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("projects", cast) + if err != nil { + return err + } + } + if m.GetPublications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublications())) + for i, v := range m.GetPublications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publications", cast) + if err != nil { + return err + } + } + if m.GetSkills() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSkills())) + for i, v := range m.GetSkills() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("skills", cast) + if err != nil { + return err + } + } + if m.GetWebAccounts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebAccounts())) + for i, v := range m.GetWebAccounts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("webAccounts", cast) + if err != nil { + return err + } + } + if m.GetWebsites() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWebsites())) + for i, v := range m.GetWebsites() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("websites", cast) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *Profile) SetAccount(value []UserAccountInformationable)() { + m.account = value +} +// SetAddresses sets the addresses property value. Represents details of addresses associated with the user. +func (m *Profile) SetAddresses(value []ItemAddressable)() { + m.addresses = value +} +// SetAnniversaries sets the anniversaries property value. Represents the details of meaningful dates associated with a person. +func (m *Profile) SetAnniversaries(value []PersonAnnualEventable)() { + m.anniversaries = value +} +// SetAwards sets the awards property value. Represents the details of awards or honors associated with a person. +func (m *Profile) SetAwards(value []PersonAwardable)() { + m.awards = value +} +// SetCertifications sets the certifications property value. Represents the details of certifications associated with a person. +func (m *Profile) SetCertifications(value []PersonCertificationable)() { + m.certifications = value +} +// SetEducationalActivities sets the educationalActivities property value. Represents data that a user has supplied related to undergraduate, graduate, postgraduate or other educational activities. +func (m *Profile) SetEducationalActivities(value []EducationalActivityable)() { + m.educationalActivities = value +} +// SetEmails sets the emails property value. Represents detailed information about email addresses associated with the user. +func (m *Profile) SetEmails(value []ItemEmailable)() { + m.emails = value +} +// SetInterests sets the interests property value. Provides detailed information about interests the user has associated with themselves in various services. +func (m *Profile) SetInterests(value []PersonInterestable)() { + m.interests = value +} +// SetLanguages sets the languages property value. Represents detailed information about languages that a user has added to their profile. +func (m *Profile) SetLanguages(value []LanguageProficiencyable)() { + m.languages = value +} +// SetNames sets the names property value. Represents the names a user has added to their profile. +func (m *Profile) SetNames(value []PersonNameable)() { + m.names = value +} +// SetNotes sets the notes property value. Represents notes that a user has added to their profile. +func (m *Profile) SetNotes(value []PersonAnnotationable)() { + m.notes = value +} +// SetPatents sets the patents property value. Represents patents that a user has added to their profile. +func (m *Profile) SetPatents(value []ItemPatentable)() { + m.patents = value +} +// SetPhones sets the phones property value. Represents detailed information about phone numbers associated with a user in various services. +func (m *Profile) SetPhones(value []ItemPhoneable)() { + m.phones = value +} +// SetPositions sets the positions property value. Represents detailed information about work positions associated with a user's profile. +func (m *Profile) SetPositions(value []WorkPositionable)() { + m.positions = value +} +// SetProjects sets the projects property value. Represents detailed information about projects associated with a user. +func (m *Profile) SetProjects(value []ProjectParticipationable)() { + m.projects = value +} +// SetPublications sets the publications property value. Represents details of any publications a user has added to their profile. +func (m *Profile) SetPublications(value []ItemPublicationable)() { + m.publications = value +} +// SetSkills sets the skills property value. Represents detailed information about skills associated with a user in various services. +func (m *Profile) SetSkills(value []SkillProficiencyable)() { + m.skills = value +} +// SetWebAccounts sets the webAccounts property value. Represents web accounts the user has indicated they use or has added to their user profile. +func (m *Profile) SetWebAccounts(value []WebAccountable)() { + m.webAccounts = value +} +// SetWebsites sets the websites property value. Represents detailed information about websites associated with a user in various services. +func (m *Profile) SetWebsites(value []PersonWebsiteable)() { + m.websites = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_annotation.go b/src/internal/connector/graph/betasdk/models/profile_card_annotation.go new file mode 100644 index 000000000..0124fe184 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_annotation.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardAnnotation +type ProfileCardAnnotation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // If present, the value of this field is used by the profile card as the default property label in the experience (for example, 'Cost Center'). + displayName *string + // Each resource in this collection represents the localized value of the attribute name for a given language, used as the default label for that locale. For example, a user with a no-NB client gets 'Kostnads Senter' as the attribute label, rather than 'Cost Center.' + localizations []DisplayNameLocalizationable + // The OdataType property + odataType *string +} +// NewProfileCardAnnotation instantiates a new profileCardAnnotation and sets the default values. +func NewProfileCardAnnotation()(*ProfileCardAnnotation) { + m := &ProfileCardAnnotation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProfileCardAnnotationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfileCardAnnotationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfileCardAnnotation(), 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 *ProfileCardAnnotation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. If present, the value of this field is used by the profile card as the default property label in the experience (for example, 'Cost Center'). +func (m *ProfileCardAnnotation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfileCardAnnotation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["localizations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDisplayNameLocalizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DisplayNameLocalizationable, len(val)) + for i, v := range val { + res[i] = v.(DisplayNameLocalizationable) + } + m.SetLocalizations(res) + } + 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 + } + return res +} +// GetLocalizations gets the localizations property value. Each resource in this collection represents the localized value of the attribute name for a given language, used as the default label for that locale. For example, a user with a no-NB client gets 'Kostnads Senter' as the attribute label, rather than 'Cost Center.' +func (m *ProfileCardAnnotation) GetLocalizations()([]DisplayNameLocalizationable) { + return m.localizations +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProfileCardAnnotation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ProfileCardAnnotation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetLocalizations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLocalizations())) + for i, v := range m.GetLocalizations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("localizations", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ProfileCardAnnotation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. If present, the value of this field is used by the profile card as the default property label in the experience (for example, 'Cost Center'). +func (m *ProfileCardAnnotation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLocalizations sets the localizations property value. Each resource in this collection represents the localized value of the attribute name for a given language, used as the default label for that locale. For example, a user with a no-NB client gets 'Kostnads Senter' as the attribute label, rather than 'Cost Center.' +func (m *ProfileCardAnnotation) SetLocalizations(value []DisplayNameLocalizationable)() { + m.localizations = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProfileCardAnnotation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_response.go b/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_response.go new file mode 100644 index 000000000..7a57faee3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardAnnotationCollectionResponse +type ProfileCardAnnotationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProfileCardAnnotationable +} +// NewProfileCardAnnotationCollectionResponse instantiates a new ProfileCardAnnotationCollectionResponse and sets the default values. +func NewProfileCardAnnotationCollectionResponse()(*ProfileCardAnnotationCollectionResponse) { + m := &ProfileCardAnnotationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProfileCardAnnotationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfileCardAnnotationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfileCardAnnotationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfileCardAnnotationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfileCardAnnotationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfileCardAnnotationable, len(val)) + for i, v := range val { + res[i] = v.(ProfileCardAnnotationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProfileCardAnnotationCollectionResponse) GetValue()([]ProfileCardAnnotationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProfileCardAnnotationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProfileCardAnnotationCollectionResponse) SetValue(value []ProfileCardAnnotationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_responseable.go new file mode 100644 index 000000000..5a8c6b1a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_annotation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardAnnotationCollectionResponseable +type ProfileCardAnnotationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProfileCardAnnotationable) + SetValue(value []ProfileCardAnnotationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_annotationable.go b/src/internal/connector/graph/betasdk/models/profile_card_annotationable.go new file mode 100644 index 000000000..81cf497dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_annotationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardAnnotationable +type ProfileCardAnnotationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLocalizations()([]DisplayNameLocalizationable) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetLocalizations(value []DisplayNameLocalizationable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_property.go b/src/internal/connector/graph/betasdk/models/profile_card_property.go new file mode 100644 index 000000000..dfe4111f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_property.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardProperty provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProfileCardProperty struct { + Entity + // Allows an administrator to set a custom display label for the directory property and localize it for the users in their tenant. + annotations []ProfileCardAnnotationable + // Identifies a profileCardProperty resource in Get, Update, or Delete operations. Allows an administrator to surface hidden Azure Active Directory (Azure AD) properties on the Microsoft 365 profile card within their tenant. When present, the Azure AD field referenced in this field will be visible to all users in your tenant on the contact pane of the profile card. Allowed values for this field are: UserPrincipalName, Fax, StreetAddress, PostalCode, StateOrProvince, Alias, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15. + directoryPropertyName *string +} +// NewProfileCardProperty instantiates a new profileCardProperty and sets the default values. +func NewProfileCardProperty()(*ProfileCardProperty) { + m := &ProfileCardProperty{ + Entity: *NewEntity(), + } + return m +} +// CreateProfileCardPropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfileCardPropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfileCardProperty(), nil +} +// GetAnnotations gets the annotations property value. Allows an administrator to set a custom display label for the directory property and localize it for the users in their tenant. +func (m *ProfileCardProperty) GetAnnotations()([]ProfileCardAnnotationable) { + return m.annotations +} +// GetDirectoryPropertyName gets the directoryPropertyName property value. Identifies a profileCardProperty resource in Get, Update, or Delete operations. Allows an administrator to surface hidden Azure Active Directory (Azure AD) properties on the Microsoft 365 profile card within their tenant. When present, the Azure AD field referenced in this field will be visible to all users in your tenant on the contact pane of the profile card. Allowed values for this field are: UserPrincipalName, Fax, StreetAddress, PostalCode, StateOrProvince, Alias, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15. +func (m *ProfileCardProperty) GetDirectoryPropertyName()(*string) { + return m.directoryPropertyName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfileCardProperty) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["annotations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfileCardAnnotationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfileCardAnnotationable, len(val)) + for i, v := range val { + res[i] = v.(ProfileCardAnnotationable) + } + m.SetAnnotations(res) + } + return nil + } + res["directoryPropertyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDirectoryPropertyName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProfileCardProperty) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAnnotations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAnnotations())) + for i, v := range m.GetAnnotations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("annotations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("directoryPropertyName", m.GetDirectoryPropertyName()) + if err != nil { + return err + } + } + return nil +} +// SetAnnotations sets the annotations property value. Allows an administrator to set a custom display label for the directory property and localize it for the users in their tenant. +func (m *ProfileCardProperty) SetAnnotations(value []ProfileCardAnnotationable)() { + m.annotations = value +} +// SetDirectoryPropertyName sets the directoryPropertyName property value. Identifies a profileCardProperty resource in Get, Update, or Delete operations. Allows an administrator to surface hidden Azure Active Directory (Azure AD) properties on the Microsoft 365 profile card within their tenant. When present, the Azure AD field referenced in this field will be visible to all users in your tenant on the contact pane of the profile card. Allowed values for this field are: UserPrincipalName, Fax, StreetAddress, PostalCode, StateOrProvince, Alias, CustomAttribute1, CustomAttribute2, CustomAttribute3, CustomAttribute4, CustomAttribute5, CustomAttribute6, CustomAttribute7, CustomAttribute8, CustomAttribute9, CustomAttribute10, CustomAttribute11, CustomAttribute12, CustomAttribute13, CustomAttribute14, CustomAttribute15. +func (m *ProfileCardProperty) SetDirectoryPropertyName(value *string)() { + m.directoryPropertyName = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_property_collection_response.go b/src/internal/connector/graph/betasdk/models/profile_card_property_collection_response.go new file mode 100644 index 000000000..f1c2f717e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardPropertyCollectionResponse +type ProfileCardPropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProfileCardPropertyable +} +// NewProfileCardPropertyCollectionResponse instantiates a new ProfileCardPropertyCollectionResponse and sets the default values. +func NewProfileCardPropertyCollectionResponse()(*ProfileCardPropertyCollectionResponse) { + m := &ProfileCardPropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProfileCardPropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfileCardPropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfileCardPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfileCardPropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfileCardPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfileCardPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ProfileCardPropertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProfileCardPropertyCollectionResponse) GetValue()([]ProfileCardPropertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProfileCardPropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProfileCardPropertyCollectionResponse) SetValue(value []ProfileCardPropertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/profile_card_property_collection_responseable.go new file mode 100644 index 000000000..37aa1751d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardPropertyCollectionResponseable +type ProfileCardPropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProfileCardPropertyable) + SetValue(value []ProfileCardPropertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile_card_propertyable.go b/src/internal/connector/graph/betasdk/models/profile_card_propertyable.go new file mode 100644 index 000000000..d372425ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_card_propertyable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfileCardPropertyable +type ProfileCardPropertyable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAnnotations()([]ProfileCardAnnotationable) + GetDirectoryPropertyName()(*string) + SetAnnotations(value []ProfileCardAnnotationable)() + SetDirectoryPropertyName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile_photo.go b/src/internal/connector/graph/betasdk/models/profile_photo.go new file mode 100644 index 000000000..d7d966819 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_photo.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfilePhoto +type ProfilePhoto struct { + Entity + // The height of the photo. Read-only. + height *int32 + // The width of the photo. Read-only. + width *int32 +} +// NewProfilePhoto instantiates a new profilePhoto and sets the default values. +func NewProfilePhoto()(*ProfilePhoto) { + m := &ProfilePhoto{ + Entity: *NewEntity(), + } + return m +} +// CreateProfilePhotoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfilePhotoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfilePhoto(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfilePhoto) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["height"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetHeight(val) + } + return nil + } + res["width"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetWidth(val) + } + return nil + } + return res +} +// GetHeight gets the height property value. The height of the photo. Read-only. +func (m *ProfilePhoto) GetHeight()(*int32) { + return m.height +} +// GetWidth gets the width property value. The width of the photo. Read-only. +func (m *ProfilePhoto) GetWidth()(*int32) { + return m.width +} +// Serialize serializes information the current object +func (m *ProfilePhoto) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("height", m.GetHeight()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("width", m.GetWidth()) + if err != nil { + return err + } + } + return nil +} +// SetHeight sets the height property value. The height of the photo. Read-only. +func (m *ProfilePhoto) SetHeight(value *int32)() { + m.height = value +} +// SetWidth sets the width property value. The width of the photo. Read-only. +func (m *ProfilePhoto) SetWidth(value *int32)() { + m.width = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_photo_collection_response.go b/src/internal/connector/graph/betasdk/models/profile_photo_collection_response.go new file mode 100644 index 000000000..c6741fc8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_photo_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfilePhotoCollectionResponse +type ProfilePhotoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProfilePhotoable +} +// NewProfilePhotoCollectionResponse instantiates a new ProfilePhotoCollectionResponse and sets the default values. +func NewProfilePhotoCollectionResponse()(*ProfilePhotoCollectionResponse) { + m := &ProfilePhotoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProfilePhotoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProfilePhotoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProfilePhotoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProfilePhotoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProfilePhotoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProfilePhotoable, len(val)) + for i, v := range val { + res[i] = v.(ProfilePhotoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProfilePhotoCollectionResponse) GetValue()([]ProfilePhotoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProfilePhotoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProfilePhotoCollectionResponse) SetValue(value []ProfilePhotoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/profile_photo_collection_responseable.go b/src/internal/connector/graph/betasdk/models/profile_photo_collection_responseable.go new file mode 100644 index 000000000..11c5a200c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_photo_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfilePhotoCollectionResponseable +type ProfilePhotoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProfilePhotoable) + SetValue(value []ProfilePhotoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/profile_photoable.go b/src/internal/connector/graph/betasdk/models/profile_photoable.go new file mode 100644 index 000000000..35f89828b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profile_photoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProfilePhotoable +type ProfilePhotoable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHeight()(*int32) + GetWidth()(*int32) + SetHeight(value *int32)() + SetWidth(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/profileable.go b/src/internal/connector/graph/betasdk/models/profileable.go new file mode 100644 index 000000000..dc88ce309 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/profileable.go @@ -0,0 +1,49 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Profileable +type Profileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()([]UserAccountInformationable) + GetAddresses()([]ItemAddressable) + GetAnniversaries()([]PersonAnnualEventable) + GetAwards()([]PersonAwardable) + GetCertifications()([]PersonCertificationable) + GetEducationalActivities()([]EducationalActivityable) + GetEmails()([]ItemEmailable) + GetInterests()([]PersonInterestable) + GetLanguages()([]LanguageProficiencyable) + GetNames()([]PersonNameable) + GetNotes()([]PersonAnnotationable) + GetPatents()([]ItemPatentable) + GetPhones()([]ItemPhoneable) + GetPositions()([]WorkPositionable) + GetProjects()([]ProjectParticipationable) + GetPublications()([]ItemPublicationable) + GetSkills()([]SkillProficiencyable) + GetWebAccounts()([]WebAccountable) + GetWebsites()([]PersonWebsiteable) + SetAccount(value []UserAccountInformationable)() + SetAddresses(value []ItemAddressable)() + SetAnniversaries(value []PersonAnnualEventable)() + SetAwards(value []PersonAwardable)() + SetCertifications(value []PersonCertificationable)() + SetEducationalActivities(value []EducationalActivityable)() + SetEmails(value []ItemEmailable)() + SetInterests(value []PersonInterestable)() + SetLanguages(value []LanguageProficiencyable)() + SetNames(value []PersonNameable)() + SetNotes(value []PersonAnnotationable)() + SetPatents(value []ItemPatentable)() + SetPhones(value []ItemPhoneable)() + SetPositions(value []WorkPositionable)() + SetProjects(value []ProjectParticipationable)() + SetPublications(value []ItemPublicationable)() + SetSkills(value []SkillProficiencyable)() + SetWebAccounts(value []WebAccountable)() + SetWebsites(value []PersonWebsiteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/program.go b/src/internal/connector/graph/betasdk/models/program.go new file mode 100644 index 000000000..02ba72000 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program.go @@ -0,0 +1,120 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Program +type Program struct { + Entity + // Controls associated with the program. + controls []ProgramControlable + // The description of the program. + description *string + // The name of the program. Required on create. + displayName *string +} +// NewProgram instantiates a new Program and sets the default values. +func NewProgram()(*Program) { + m := &Program{ + Entity: *NewEntity(), + } + return m +} +// CreateProgramFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgram(), nil +} +// GetControls gets the controls property value. Controls associated with the program. +func (m *Program) GetControls()([]ProgramControlable) { + return m.controls +} +// GetDescription gets the description property value. The description of the program. +func (m *Program) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of the program. Required on create. +func (m *Program) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Program) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["controls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProgramControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProgramControlable, len(val)) + for i, v := range val { + res[i] = v.(ProgramControlable) + } + m.SetControls(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *Program) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetControls() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetControls())) + for i, v := range m.GetControls() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("controls", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetControls sets the controls property value. Controls associated with the program. +func (m *Program) SetControls(value []ProgramControlable)() { + m.controls = value +} +// SetDescription sets the description property value. The description of the program. +func (m *Program) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of the program. Required on create. +func (m *Program) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_collection_response.go b/src/internal/connector/graph/betasdk/models/program_collection_response.go new file mode 100644 index 000000000..f3608e54f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramCollectionResponse +type ProgramCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Programable +} +// NewProgramCollectionResponse instantiates a new ProgramCollectionResponse and sets the default values. +func NewProgramCollectionResponse()(*ProgramCollectionResponse) { + m := &ProgramCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProgramCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProgramFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Programable, len(val)) + for i, v := range val { + res[i] = v.(Programable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProgramCollectionResponse) GetValue()([]Programable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProgramCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProgramCollectionResponse) SetValue(value []Programable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_collection_responseable.go b/src/internal/connector/graph/betasdk/models/program_collection_responseable.go new file mode 100644 index 000000000..b14836d29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramCollectionResponseable +type ProgramCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Programable) + SetValue(value []Programable)() +} diff --git a/src/internal/connector/graph/betasdk/models/program_control.go b/src/internal/connector/graph/betasdk/models/program_control.go new file mode 100644 index 000000000..05040d15e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control.go @@ -0,0 +1,269 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControl provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProgramControl struct { + Entity + // The controlId of the control, in particular the identifier of an access review. Required on create. + controlId *string + // The programControlType identifies the type of program control - for example, a control linking to guest access reviews. Required on create. + controlTypeId *string + // The creation date and time of the program control. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name of the control. + displayName *string + // The user who created the program control. + owner UserIdentityable + // The program this control is part of. + program Programable + // The programId of the program this control is a part of. Required on create. + programId *string + // The resource, a group or an app, targeted by this program control's access review. + resource ProgramResourceable + // The life cycle status of the control. + status *string +} +// NewProgramControl instantiates a new programControl and sets the default values. +func NewProgramControl()(*ProgramControl) { + m := &ProgramControl{ + Entity: *NewEntity(), + } + return m +} +// CreateProgramControlFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramControlFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramControl(), nil +} +// GetControlId gets the controlId property value. The controlId of the control, in particular the identifier of an access review. Required on create. +func (m *ProgramControl) GetControlId()(*string) { + return m.controlId +} +// GetControlTypeId gets the controlTypeId property value. The programControlType identifies the type of program control - for example, a control linking to guest access reviews. Required on create. +func (m *ProgramControl) GetControlTypeId()(*string) { + return m.controlTypeId +} +// GetCreatedDateTime gets the createdDateTime property value. The creation date and time of the program control. +func (m *ProgramControl) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The name of the control. +func (m *ProgramControl) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramControl) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["controlId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlId(val) + } + return nil + } + res["controlTypeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlTypeId(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(UserIdentityable)) + } + return nil + } + res["program"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProgramFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProgram(val.(Programable)) + } + return nil + } + res["programId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProgramId(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProgramResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(ProgramResourceable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetOwner gets the owner property value. The user who created the program control. +func (m *ProgramControl) GetOwner()(UserIdentityable) { + return m.owner +} +// GetProgram gets the program property value. The program this control is part of. +func (m *ProgramControl) GetProgram()(Programable) { + return m.program +} +// GetProgramId gets the programId property value. The programId of the program this control is a part of. Required on create. +func (m *ProgramControl) GetProgramId()(*string) { + return m.programId +} +// GetResource gets the resource property value. The resource, a group or an app, targeted by this program control's access review. +func (m *ProgramControl) GetResource()(ProgramResourceable) { + return m.resource +} +// GetStatus gets the status property value. The life cycle status of the control. +func (m *ProgramControl) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *ProgramControl) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("controlId", m.GetControlId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("controlTypeId", m.GetControlTypeId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("program", m.GetProgram()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("programId", m.GetProgramId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetControlId sets the controlId property value. The controlId of the control, in particular the identifier of an access review. Required on create. +func (m *ProgramControl) SetControlId(value *string)() { + m.controlId = value +} +// SetControlTypeId sets the controlTypeId property value. The programControlType identifies the type of program control - for example, a control linking to guest access reviews. Required on create. +func (m *ProgramControl) SetControlTypeId(value *string)() { + m.controlTypeId = value +} +// SetCreatedDateTime sets the createdDateTime property value. The creation date and time of the program control. +func (m *ProgramControl) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The name of the control. +func (m *ProgramControl) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOwner sets the owner property value. The user who created the program control. +func (m *ProgramControl) SetOwner(value UserIdentityable)() { + m.owner = value +} +// SetProgram sets the program property value. The program this control is part of. +func (m *ProgramControl) SetProgram(value Programable)() { + m.program = value +} +// SetProgramId sets the programId property value. The programId of the program this control is a part of. Required on create. +func (m *ProgramControl) SetProgramId(value *string)() { + m.programId = value +} +// SetResource sets the resource property value. The resource, a group or an app, targeted by this program control's access review. +func (m *ProgramControl) SetResource(value ProgramResourceable)() { + m.resource = value +} +// SetStatus sets the status property value. The life cycle status of the control. +func (m *ProgramControl) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_collection_response.go b/src/internal/connector/graph/betasdk/models/program_control_collection_response.go new file mode 100644 index 000000000..4b2780f77 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlCollectionResponse +type ProgramControlCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProgramControlable +} +// NewProgramControlCollectionResponse instantiates a new ProgramControlCollectionResponse and sets the default values. +func NewProgramControlCollectionResponse()(*ProgramControlCollectionResponse) { + m := &ProgramControlCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProgramControlCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramControlCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramControlCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramControlCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProgramControlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProgramControlable, len(val)) + for i, v := range val { + res[i] = v.(ProgramControlable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProgramControlCollectionResponse) GetValue()([]ProgramControlable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProgramControlCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProgramControlCollectionResponse) SetValue(value []ProgramControlable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_collection_responseable.go b/src/internal/connector/graph/betasdk/models/program_control_collection_responseable.go new file mode 100644 index 000000000..21b8d8ea6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlCollectionResponseable +type ProgramControlCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProgramControlable) + SetValue(value []ProgramControlable)() +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_type.go b/src/internal/connector/graph/betasdk/models/program_control_type.go new file mode 100644 index 000000000..52aed65df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_type.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlType +type ProgramControlType struct { + Entity + // The controlTypeGroupId property + controlTypeGroupId *string + // The name of the program control type + displayName *string +} +// NewProgramControlType instantiates a new ProgramControlType and sets the default values. +func NewProgramControlType()(*ProgramControlType) { + m := &ProgramControlType{ + Entity: *NewEntity(), + } + return m +} +// CreateProgramControlTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramControlTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramControlType(), nil +} +// GetControlTypeGroupId gets the controlTypeGroupId property value. The controlTypeGroupId property +func (m *ProgramControlType) GetControlTypeGroupId()(*string) { + return m.controlTypeGroupId +} +// GetDisplayName gets the displayName property value. The name of the program control type +func (m *ProgramControlType) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramControlType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["controlTypeGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlTypeGroupId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProgramControlType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("controlTypeGroupId", m.GetControlTypeGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetControlTypeGroupId sets the controlTypeGroupId property value. The controlTypeGroupId property +func (m *ProgramControlType) SetControlTypeGroupId(value *string)() { + m.controlTypeGroupId = value +} +// SetDisplayName sets the displayName property value. The name of the program control type +func (m *ProgramControlType) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_type_collection_response.go b/src/internal/connector/graph/betasdk/models/program_control_type_collection_response.go new file mode 100644 index 000000000..2ff1b51e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlTypeCollectionResponse +type ProgramControlTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProgramControlTypeable +} +// NewProgramControlTypeCollectionResponse instantiates a new ProgramControlTypeCollectionResponse and sets the default values. +func NewProgramControlTypeCollectionResponse()(*ProgramControlTypeCollectionResponse) { + m := &ProgramControlTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProgramControlTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramControlTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramControlTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramControlTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProgramControlTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProgramControlTypeable, len(val)) + for i, v := range val { + res[i] = v.(ProgramControlTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProgramControlTypeCollectionResponse) GetValue()([]ProgramControlTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProgramControlTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProgramControlTypeCollectionResponse) SetValue(value []ProgramControlTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/program_control_type_collection_responseable.go new file mode 100644 index 000000000..e37db41ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlTypeCollectionResponseable +type ProgramControlTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProgramControlTypeable) + SetValue(value []ProgramControlTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/program_control_typeable.go b/src/internal/connector/graph/betasdk/models/program_control_typeable.go new file mode 100644 index 000000000..4fd470221 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_control_typeable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlTypeable +type ProgramControlTypeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetControlTypeGroupId()(*string) + GetDisplayName()(*string) + SetControlTypeGroupId(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/program_controlable.go b/src/internal/connector/graph/betasdk/models/program_controlable.go new file mode 100644 index 000000000..dc7f9d486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_controlable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramControlable +type ProgramControlable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetControlId()(*string) + GetControlTypeId()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetOwner()(UserIdentityable) + GetProgram()(Programable) + GetProgramId()(*string) + GetResource()(ProgramResourceable) + GetStatus()(*string) + SetControlId(value *string)() + SetControlTypeId(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetOwner(value UserIdentityable)() + SetProgram(value Programable)() + SetProgramId(value *string)() + SetResource(value ProgramResourceable)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/program_resource.go b/src/internal/connector/graph/betasdk/models/program_resource.go new file mode 100644 index 000000000..7f8a0e0a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_resource.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramResource +type ProgramResource struct { + Identity + // Type of the resource, indicating whether it is a group or an app. + type_escaped *string +} +// NewProgramResource instantiates a new ProgramResource and sets the default values. +func NewProgramResource()(*ProgramResource) { + m := &ProgramResource{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.programResource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProgramResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProgramResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProgramResource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProgramResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetType gets the type property value. Type of the resource, indicating whether it is a group or an app. +func (m *ProgramResource) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ProgramResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetType sets the type property value. Type of the resource, indicating whether it is a group or an app. +func (m *ProgramResource) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/program_resourceable.go b/src/internal/connector/graph/betasdk/models/program_resourceable.go new file mode 100644 index 000000000..dbf55e03f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/program_resourceable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProgramResourceable +type ProgramResourceable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetType()(*string) + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/programable.go b/src/internal/connector/graph/betasdk/models/programable.go new file mode 100644 index 000000000..efe24ba76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/programable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Programable +type Programable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetControls()([]ProgramControlable) + GetDescription()(*string) + GetDisplayName()(*string) + SetControls(value []ProgramControlable)() + SetDescription(value *string)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/project_participation.go b/src/internal/connector/graph/betasdk/models/project_participation.go new file mode 100644 index 000000000..dba37bcd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/project_participation.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectParticipation +type ProjectParticipation struct { + ItemFacet + // Contains categories a user has associated with the project (for example, digital transformation, oil rig). + categories []string + // Contains detailed information about the client the project was for. + client CompanyDetailable + // Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. + collaborationTags []string + // Lists people that also worked on the project. + colleagues []RelatedPersonable + // Contains detail about the user's role on the project. + detail PositionDetailable + // Contains a friendly name for the project. + displayName *string + // The Person or people who sponsored the project. + sponsors []RelatedPersonable + // The thumbnailUrl property + thumbnailUrl *string +} +// NewProjectParticipation instantiates a new ProjectParticipation and sets the default values. +func NewProjectParticipation()(*ProjectParticipation) { + m := &ProjectParticipation{ + ItemFacet: *NewItemFacet(), + } + odataTypeValue := "#microsoft.graph.projectParticipation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProjectParticipationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProjectParticipationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectParticipation(), nil +} +// GetCategories gets the categories property value. Contains categories a user has associated with the project (for example, digital transformation, oil rig). +func (m *ProjectParticipation) GetCategories()([]string) { + return m.categories +} +// GetClient gets the client property value. Contains detailed information about the client the project was for. +func (m *ProjectParticipation) GetClient()(CompanyDetailable) { + return m.client +} +// GetCollaborationTags gets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *ProjectParticipation) GetCollaborationTags()([]string) { + return m.collaborationTags +} +// GetColleagues gets the colleagues property value. Lists people that also worked on the project. +func (m *ProjectParticipation) GetColleagues()([]RelatedPersonable) { + return m.colleagues +} +// GetDetail gets the detail property value. Contains detail about the user's role on the project. +func (m *ProjectParticipation) GetDetail()(PositionDetailable) { + return m.detail +} +// GetDisplayName gets the displayName property value. Contains a friendly name for the project. +func (m *ProjectParticipation) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProjectParticipation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ItemFacet.GetFieldDeserializers() + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["client"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCompanyDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClient(val.(CompanyDetailable)) + } + return nil + } + res["collaborationTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCollaborationTags(res) + } + return nil + } + res["colleagues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelatedPersonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RelatedPersonable, len(val)) + for i, v := range val { + res[i] = v.(RelatedPersonable) + } + m.SetColleagues(res) + } + return nil + } + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePositionDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(PositionDetailable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["sponsors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelatedPersonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RelatedPersonable, len(val)) + for i, v := range val { + res[i] = v.(RelatedPersonable) + } + m.SetSponsors(res) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + return res +} +// GetSponsors gets the sponsors property value. The Person or people who sponsored the project. +func (m *ProjectParticipation) GetSponsors()([]RelatedPersonable) { + return m.sponsors +} +// GetThumbnailUrl gets the thumbnailUrl property value. The thumbnailUrl property +func (m *ProjectParticipation) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// Serialize serializes information the current object +func (m *ProjectParticipation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ItemFacet.Serialize(writer) + if err != nil { + return err + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("client", m.GetClient()) + if err != nil { + return err + } + } + if m.GetCollaborationTags() != nil { + err = writer.WriteCollectionOfStringValues("collaborationTags", m.GetCollaborationTags()) + if err != nil { + return err + } + } + if m.GetColleagues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetColleagues())) + for i, v := range m.GetColleagues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("colleagues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetSponsors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSponsors())) + for i, v := range m.GetSponsors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sponsors", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + return nil +} +// SetCategories sets the categories property value. Contains categories a user has associated with the project (for example, digital transformation, oil rig). +func (m *ProjectParticipation) SetCategories(value []string)() { + m.categories = value +} +// SetClient sets the client property value. Contains detailed information about the client the project was for. +func (m *ProjectParticipation) SetClient(value CompanyDetailable)() { + m.client = value +} +// SetCollaborationTags sets the collaborationTags property value. Contains experience scenario tags a user has associated with the interest. Allowed values in the collection are: askMeAbout, ableToMentor, wantsToLearn, wantsToImprove. +func (m *ProjectParticipation) SetCollaborationTags(value []string)() { + m.collaborationTags = value +} +// SetColleagues sets the colleagues property value. Lists people that also worked on the project. +func (m *ProjectParticipation) SetColleagues(value []RelatedPersonable)() { + m.colleagues = value +} +// SetDetail sets the detail property value. Contains detail about the user's role on the project. +func (m *ProjectParticipation) SetDetail(value PositionDetailable)() { + m.detail = value +} +// SetDisplayName sets the displayName property value. Contains a friendly name for the project. +func (m *ProjectParticipation) SetDisplayName(value *string)() { + m.displayName = value +} +// SetSponsors sets the sponsors property value. The Person or people who sponsored the project. +func (m *ProjectParticipation) SetSponsors(value []RelatedPersonable)() { + m.sponsors = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. The thumbnailUrl property +func (m *ProjectParticipation) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/project_participation_collection_response.go b/src/internal/connector/graph/betasdk/models/project_participation_collection_response.go new file mode 100644 index 000000000..4a78a1861 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/project_participation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectParticipationCollectionResponse +type ProjectParticipationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProjectParticipationable +} +// NewProjectParticipationCollectionResponse instantiates a new ProjectParticipationCollectionResponse and sets the default values. +func NewProjectParticipationCollectionResponse()(*ProjectParticipationCollectionResponse) { + m := &ProjectParticipationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProjectParticipationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProjectParticipationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProjectParticipationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProjectParticipationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProjectParticipationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProjectParticipationable, len(val)) + for i, v := range val { + res[i] = v.(ProjectParticipationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProjectParticipationCollectionResponse) GetValue()([]ProjectParticipationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProjectParticipationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProjectParticipationCollectionResponse) SetValue(value []ProjectParticipationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/project_participation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/project_participation_collection_responseable.go new file mode 100644 index 000000000..13017bf88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/project_participation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectParticipationCollectionResponseable +type ProjectParticipationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProjectParticipationable) + SetValue(value []ProjectParticipationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/project_participationable.go b/src/internal/connector/graph/betasdk/models/project_participationable.go new file mode 100644 index 000000000..fd80d3b68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/project_participationable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProjectParticipationable +type ProjectParticipationable interface { + ItemFacetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategories()([]string) + GetClient()(CompanyDetailable) + GetCollaborationTags()([]string) + GetColleagues()([]RelatedPersonable) + GetDetail()(PositionDetailable) + GetDisplayName()(*string) + GetSponsors()([]RelatedPersonable) + GetThumbnailUrl()(*string) + SetCategories(value []string)() + SetClient(value CompanyDetailable)() + SetCollaborationTags(value []string)() + SetColleagues(value []RelatedPersonable)() + SetDetail(value PositionDetailable)() + SetDisplayName(value *string)() + SetSponsors(value []RelatedPersonable)() + SetThumbnailUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/prompt_login_behavior.go b/src/internal/connector/graph/betasdk/models/prompt_login_behavior.go new file mode 100644 index 000000000..4ed5e0365 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/prompt_login_behavior.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PromptLoginBehavior int + +const ( + TRANSLATETOFRESHPASSWORDAUTHENTICATION_PROMPTLOGINBEHAVIOR PromptLoginBehavior = iota + NATIVESUPPORT_PROMPTLOGINBEHAVIOR + DISABLED_PROMPTLOGINBEHAVIOR + UNKNOWNFUTUREVALUE_PROMPTLOGINBEHAVIOR +) + +func (i PromptLoginBehavior) String() string { + return []string{"translateToFreshPasswordAuthentication", "nativeSupport", "disabled", "unknownFutureValue"}[i] +} +func ParsePromptLoginBehavior(v string) (interface{}, error) { + result := TRANSLATETOFRESHPASSWORDAUTHENTICATION_PROMPTLOGINBEHAVIOR + switch v { + case "translateToFreshPasswordAuthentication": + result = TRANSLATETOFRESHPASSWORDAUTHENTICATION_PROMPTLOGINBEHAVIOR + case "nativeSupport": + result = NATIVESUPPORT_PROMPTLOGINBEHAVIOR + case "disabled": + result = DISABLED_PROMPTLOGINBEHAVIOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROMPTLOGINBEHAVIOR + default: + return 0, errors.New("Unknown PromptLoginBehavior value: " + v) + } + return &result, nil +} +func SerializePromptLoginBehavior(values []PromptLoginBehavior) []string { + 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/properties.go b/src/internal/connector/graph/betasdk/models/properties.go new file mode 100644 index 000000000..42618b11f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/properties.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Properties +type Properties 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 OdataType property + odataType *string +} +// NewProperties instantiates a new properties and sets the default values. +func NewProperties()(*Properties) { + m := &Properties{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertiesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertiesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProperties(), 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 *Properties) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Properties) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Properties) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Properties) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Properties) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Properties) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/propertiesable.go b/src/internal/connector/graph/betasdk/models/propertiesable.go new file mode 100644 index 000000000..8d741a87d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/propertiesable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Propertiesable +type Propertiesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/property.go b/src/internal/connector/graph/betasdk/models/property.go new file mode 100644 index 000000000..549d14dcc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property.go @@ -0,0 +1,288 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Property +type Property 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 aliases property + aliases []string + // The isQueryable property + isQueryable *bool + // The isRefinable property + isRefinable *bool + // The isRetrievable property + isRetrievable *bool + // The isSearchable property + isSearchable *bool + // The labels property + labels []Label + // The name property + name *string + // The OdataType property + odataType *string + // The type property + type_escaped *PropertyType +} +// NewProperty instantiates a new property and sets the default values. +func NewProperty()(*Property) { + m := &Property{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProperty(), 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 *Property) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAliases gets the aliases property value. The aliases property +func (m *Property) GetAliases()([]string) { + return m.aliases +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Property) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aliases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAliases(res) + } + return nil + } + res["isQueryable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsQueryable(val) + } + return nil + } + res["isRefinable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRefinable(val) + } + return nil + } + res["isRetrievable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRetrievable(val) + } + return nil + } + res["isSearchable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSearchable(val) + } + return nil + } + res["labels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseLabel) + if err != nil { + return err + } + if val != nil { + res := make([]Label, len(val)) + for i, v := range val { + res[i] = *(v.(*Label)) + } + m.SetLabels(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePropertyType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*PropertyType)) + } + return nil + } + return res +} +// GetIsQueryable gets the isQueryable property value. The isQueryable property +func (m *Property) GetIsQueryable()(*bool) { + return m.isQueryable +} +// GetIsRefinable gets the isRefinable property value. The isRefinable property +func (m *Property) GetIsRefinable()(*bool) { + return m.isRefinable +} +// GetIsRetrievable gets the isRetrievable property value. The isRetrievable property +func (m *Property) GetIsRetrievable()(*bool) { + return m.isRetrievable +} +// GetIsSearchable gets the isSearchable property value. The isSearchable property +func (m *Property) GetIsSearchable()(*bool) { + return m.isSearchable +} +// GetLabels gets the labels property value. The labels property +func (m *Property) GetLabels()([]Label) { + return m.labels +} +// GetName gets the name property value. The name property +func (m *Property) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Property) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *Property) GetType()(*PropertyType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *Property) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAliases() != nil { + err := writer.WriteCollectionOfStringValues("aliases", m.GetAliases()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isQueryable", m.GetIsQueryable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRefinable", m.GetIsRefinable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRetrievable", m.GetIsRetrievable()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSearchable", m.GetIsSearchable()) + if err != nil { + return err + } + } + if m.GetLabels() != nil { + err := writer.WriteCollectionOfStringValues("labels", SerializeLabel(m.GetLabels())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *Property) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAliases sets the aliases property value. The aliases property +func (m *Property) SetAliases(value []string)() { + m.aliases = value +} +// SetIsQueryable sets the isQueryable property value. The isQueryable property +func (m *Property) SetIsQueryable(value *bool)() { + m.isQueryable = value +} +// SetIsRefinable sets the isRefinable property value. The isRefinable property +func (m *Property) SetIsRefinable(value *bool)() { + m.isRefinable = value +} +// SetIsRetrievable sets the isRetrievable property value. The isRetrievable property +func (m *Property) SetIsRetrievable(value *bool)() { + m.isRetrievable = value +} +// SetIsSearchable sets the isSearchable property value. The isSearchable property +func (m *Property) SetIsSearchable(value *bool)() { + m.isSearchable = value +} +// SetLabels sets the labels property value. The labels property +func (m *Property) SetLabels(value []Label)() { + m.labels = value +} +// SetName sets the name property value. The name property +func (m *Property) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Property) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *Property) SetType(value *PropertyType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/property_collection_response.go b/src/internal/connector/graph/betasdk/models/property_collection_response.go new file mode 100644 index 000000000..8ce34d134 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PropertyCollectionResponse +type PropertyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Propertyable +} +// NewPropertyCollectionResponse instantiates a new PropertyCollectionResponse and sets the default values. +func NewPropertyCollectionResponse()(*PropertyCollectionResponse) { + m := &PropertyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePropertyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPropertyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PropertyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Propertyable, len(val)) + for i, v := range val { + res[i] = v.(Propertyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PropertyCollectionResponse) GetValue()([]Propertyable) { + return m.value +} +// Serialize serializes information the current object +func (m *PropertyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PropertyCollectionResponse) SetValue(value []Propertyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/property_collection_responseable.go b/src/internal/connector/graph/betasdk/models/property_collection_responseable.go new file mode 100644 index 000000000..d13558fb6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PropertyCollectionResponseable +type PropertyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Propertyable) + SetValue(value []Propertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/property_to_evaluate.go b/src/internal/connector/graph/betasdk/models/property_to_evaluate.go new file mode 100644 index 000000000..c758b34c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property_to_evaluate.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PropertyToEvaluate +type PropertyToEvaluate 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 OdataType property + odataType *string + // Provides the property name. + propertyName *string + // Provides the property value. + propertyValue *string +} +// NewPropertyToEvaluate instantiates a new propertyToEvaluate and sets the default values. +func NewPropertyToEvaluate()(*PropertyToEvaluate) { + m := &PropertyToEvaluate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePropertyToEvaluateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePropertyToEvaluateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPropertyToEvaluate(), 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 *PropertyToEvaluate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PropertyToEvaluate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["propertyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyName(val) + } + return nil + } + res["propertyValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPropertyValue(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PropertyToEvaluate) GetOdataType()(*string) { + return m.odataType +} +// GetPropertyName gets the propertyName property value. Provides the property name. +func (m *PropertyToEvaluate) GetPropertyName()(*string) { + return m.propertyName +} +// GetPropertyValue gets the propertyValue property value. Provides the property value. +func (m *PropertyToEvaluate) GetPropertyValue()(*string) { + return m.propertyValue +} +// Serialize serializes information the current object +func (m *PropertyToEvaluate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("propertyName", m.GetPropertyName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("propertyValue", m.GetPropertyValue()) + 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 *PropertyToEvaluate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PropertyToEvaluate) SetOdataType(value *string)() { + m.odataType = value +} +// SetPropertyName sets the propertyName property value. Provides the property name. +func (m *PropertyToEvaluate) SetPropertyName(value *string)() { + m.propertyName = value +} +// SetPropertyValue sets the propertyValue property value. Provides the property value. +func (m *PropertyToEvaluate) SetPropertyValue(value *string)() { + m.propertyValue = value +} diff --git a/src/internal/connector/graph/betasdk/models/property_to_evaluateable.go b/src/internal/connector/graph/betasdk/models/property_to_evaluateable.go new file mode 100644 index 000000000..dd0f96e1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property_to_evaluateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PropertyToEvaluateable +type PropertyToEvaluateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetPropertyName()(*string) + GetPropertyValue()(*string) + SetOdataType(value *string)() + SetPropertyName(value *string)() + SetPropertyValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/property_type.go b/src/internal/connector/graph/betasdk/models/property_type.go new file mode 100644 index 000000000..b3d2782ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/property_type.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PropertyType int + +const ( + STRING_PROPERTYTYPE PropertyType = iota + INT64_PROPERTYTYPE + DOUBLE_PROPERTYTYPE + DATETIME_PROPERTYTYPE + BOOLEAN_PROPERTYTYPE + STRINGCOLLECTION_PROPERTYTYPE + INT64COLLECTION_PROPERTYTYPE + DOUBLECOLLECTION_PROPERTYTYPE + DATETIMECOLLECTION_PROPERTYTYPE +) + +func (i PropertyType) String() string { + return []string{"string", "int64", "double", "dateTime", "boolean", "stringCollection", "int64Collection", "doubleCollection", "dateTimeCollection"}[i] +} +func ParsePropertyType(v string) (interface{}, error) { + result := STRING_PROPERTYTYPE + switch v { + case "string": + result = STRING_PROPERTYTYPE + case "int64": + result = INT64_PROPERTYTYPE + case "double": + result = DOUBLE_PROPERTYTYPE + case "dateTime": + result = DATETIME_PROPERTYTYPE + case "boolean": + result = BOOLEAN_PROPERTYTYPE + case "stringCollection": + result = STRINGCOLLECTION_PROPERTYTYPE + case "int64Collection": + result = INT64COLLECTION_PROPERTYTYPE + case "doubleCollection": + result = DOUBLECOLLECTION_PROPERTYTYPE + case "dateTimeCollection": + result = DATETIMECOLLECTION_PROPERTYTYPE + default: + return 0, errors.New("Unknown PropertyType value: " + v) + } + return &result, nil +} +func SerializePropertyType(values []PropertyType) []string { + 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/propertyable.go b/src/internal/connector/graph/betasdk/models/propertyable.go new file mode 100644 index 000000000..560f050fc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/propertyable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Propertyable +type Propertyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAliases()([]string) + GetIsQueryable()(*bool) + GetIsRefinable()(*bool) + GetIsRetrievable()(*bool) + GetIsSearchable()(*bool) + GetLabels()([]Label) + GetName()(*string) + GetOdataType()(*string) + GetType()(*PropertyType) + SetAliases(value []string)() + SetIsQueryable(value *bool)() + SetIsRefinable(value *bool)() + SetIsRetrievable(value *bool)() + SetIsSearchable(value *bool)() + SetLabels(value []Label)() + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *PropertyType)() +} diff --git a/src/internal/connector/graph/betasdk/models/protect_adhoc_action.go b/src/internal/connector/graph/betasdk/models/protect_adhoc_action.go new file mode 100644 index 000000000..bcbea0e34 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_adhoc_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectAdhocAction +type ProtectAdhocAction struct { + InformationProtectionAction +} +// NewProtectAdhocAction instantiates a new ProtectAdhocAction and sets the default values. +func NewProtectAdhocAction()(*ProtectAdhocAction) { + m := &ProtectAdhocAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.protectAdhocAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectAdhocActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectAdhocActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectAdhocAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectAdhocAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ProtectAdhocAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/protect_adhoc_actionable.go b/src/internal/connector/graph/betasdk/models/protect_adhoc_actionable.go new file mode 100644 index 000000000..08a9594a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_adhoc_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectAdhocActionable +type ProtectAdhocActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/protect_by_template_action.go b/src/internal/connector/graph/betasdk/models/protect_by_template_action.go new file mode 100644 index 000000000..08a5e9149 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_by_template_action.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectByTemplateAction +type ProtectByTemplateAction struct { + InformationProtectionAction + // The GUID of the Azure Information Protection template to apply to the information. + templateId *string +} +// NewProtectByTemplateAction instantiates a new ProtectByTemplateAction and sets the default values. +func NewProtectByTemplateAction()(*ProtectByTemplateAction) { + m := &ProtectByTemplateAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.protectByTemplateAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectByTemplateActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectByTemplateActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectByTemplateAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectByTemplateAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetTemplateId gets the templateId property value. The GUID of the Azure Information Protection template to apply to the information. +func (m *ProtectByTemplateAction) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *ProtectByTemplateAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetTemplateId sets the templateId property value. The GUID of the Azure Information Protection template to apply to the information. +func (m *ProtectByTemplateAction) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/protect_by_template_actionable.go b/src/internal/connector/graph/betasdk/models/protect_by_template_actionable.go new file mode 100644 index 000000000..074ba3c00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_by_template_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectByTemplateActionable +type ProtectByTemplateActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTemplateId()(*string) + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/protect_do_not_forward_action.go b/src/internal/connector/graph/betasdk/models/protect_do_not_forward_action.go new file mode 100644 index 000000000..76760a375 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_do_not_forward_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectDoNotForwardAction +type ProtectDoNotForwardAction struct { + InformationProtectionAction +} +// NewProtectDoNotForwardAction instantiates a new ProtectDoNotForwardAction and sets the default values. +func NewProtectDoNotForwardAction()(*ProtectDoNotForwardAction) { + m := &ProtectDoNotForwardAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.protectDoNotForwardAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectDoNotForwardActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectDoNotForwardActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectDoNotForwardAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectDoNotForwardAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ProtectDoNotForwardAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/protect_do_not_forward_actionable.go b/src/internal/connector/graph/betasdk/models/protect_do_not_forward_actionable.go new file mode 100644 index 000000000..af664d32d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_do_not_forward_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectDoNotForwardActionable +type ProtectDoNotForwardActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/protect_group.go b/src/internal/connector/graph/betasdk/models/protect_group.go new file mode 100644 index 000000000..fc049ca42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_group.go @@ -0,0 +1,115 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectGroup +type ProtectGroup struct { + LabelActionBase + // The allowEmailFromGuestUsers property + allowEmailFromGuestUsers *bool + // The allowGuestUsers property + allowGuestUsers *bool + // The privacy property + privacy *GroupPrivacy +} +// NewProtectGroup instantiates a new ProtectGroup and sets the default values. +func NewProtectGroup()(*ProtectGroup) { + m := &ProtectGroup{ + LabelActionBase: *NewLabelActionBase(), + } + odataTypeValue := "#microsoft.graph.protectGroup"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectGroup(), nil +} +// GetAllowEmailFromGuestUsers gets the allowEmailFromGuestUsers property value. The allowEmailFromGuestUsers property +func (m *ProtectGroup) GetAllowEmailFromGuestUsers()(*bool) { + return m.allowEmailFromGuestUsers +} +// GetAllowGuestUsers gets the allowGuestUsers property value. The allowGuestUsers property +func (m *ProtectGroup) GetAllowGuestUsers()(*bool) { + return m.allowGuestUsers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LabelActionBase.GetFieldDeserializers() + res["allowEmailFromGuestUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowEmailFromGuestUsers(val) + } + return nil + } + res["allowGuestUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowGuestUsers(val) + } + return nil + } + res["privacy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseGroupPrivacy) + if err != nil { + return err + } + if val != nil { + m.SetPrivacy(val.(*GroupPrivacy)) + } + return nil + } + return res +} +// GetPrivacy gets the privacy property value. The privacy property +func (m *ProtectGroup) GetPrivacy()(*GroupPrivacy) { + return m.privacy +} +// Serialize serializes information the current object +func (m *ProtectGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LabelActionBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowEmailFromGuestUsers", m.GetAllowEmailFromGuestUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowGuestUsers", m.GetAllowGuestUsers()) + if err != nil { + return err + } + } + if m.GetPrivacy() != nil { + cast := (*m.GetPrivacy()).String() + err = writer.WriteStringValue("privacy", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowEmailFromGuestUsers sets the allowEmailFromGuestUsers property value. The allowEmailFromGuestUsers property +func (m *ProtectGroup) SetAllowEmailFromGuestUsers(value *bool)() { + m.allowEmailFromGuestUsers = value +} +// SetAllowGuestUsers sets the allowGuestUsers property value. The allowGuestUsers property +func (m *ProtectGroup) SetAllowGuestUsers(value *bool)() { + m.allowGuestUsers = value +} +// SetPrivacy sets the privacy property value. The privacy property +func (m *ProtectGroup) SetPrivacy(value *GroupPrivacy)() { + m.privacy = value +} diff --git a/src/internal/connector/graph/betasdk/models/protect_groupable.go b/src/internal/connector/graph/betasdk/models/protect_groupable.go new file mode 100644 index 000000000..90660343e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_groupable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectGroupable +type ProtectGroupable interface { + LabelActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowEmailFromGuestUsers()(*bool) + GetAllowGuestUsers()(*bool) + GetPrivacy()(*GroupPrivacy) + SetAllowEmailFromGuestUsers(value *bool)() + SetAllowGuestUsers(value *bool)() + SetPrivacy(value *GroupPrivacy)() +} diff --git a/src/internal/connector/graph/betasdk/models/protect_online_meeting_action.go b/src/internal/connector/graph/betasdk/models/protect_online_meeting_action.go new file mode 100644 index 000000000..39802d9f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_online_meeting_action.go @@ -0,0 +1,168 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectOnlineMeetingAction +type ProtectOnlineMeetingAction struct { + LabelActionBase + // The allowedForwarders property + allowedForwarders *OnlineMeetingForwarders + // The allowedPresenters property + allowedPresenters *OnlineMeetingPresenters + // The isCopyToClipboardEnabled property + isCopyToClipboardEnabled *bool + // The isLobbyEnabled property + isLobbyEnabled *bool + // The lobbyBypassSettings property + lobbyBypassSettings LobbyBypassSettingsable +} +// NewProtectOnlineMeetingAction instantiates a new ProtectOnlineMeetingAction and sets the default values. +func NewProtectOnlineMeetingAction()(*ProtectOnlineMeetingAction) { + m := &ProtectOnlineMeetingAction{ + LabelActionBase: *NewLabelActionBase(), + } + odataTypeValue := "#microsoft.graph.protectOnlineMeetingAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectOnlineMeetingActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectOnlineMeetingActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectOnlineMeetingAction(), nil +} +// GetAllowedForwarders gets the allowedForwarders property value. The allowedForwarders property +func (m *ProtectOnlineMeetingAction) GetAllowedForwarders()(*OnlineMeetingForwarders) { + return m.allowedForwarders +} +// GetAllowedPresenters gets the allowedPresenters property value. The allowedPresenters property +func (m *ProtectOnlineMeetingAction) GetAllowedPresenters()(*OnlineMeetingPresenters) { + return m.allowedPresenters +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectOnlineMeetingAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LabelActionBase.GetFieldDeserializers() + res["allowedForwarders"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingForwarders) + if err != nil { + return err + } + if val != nil { + m.SetAllowedForwarders(val.(*OnlineMeetingForwarders)) + } + return nil + } + res["allowedPresenters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnlineMeetingPresenters) + if err != nil { + return err + } + if val != nil { + m.SetAllowedPresenters(val.(*OnlineMeetingPresenters)) + } + return nil + } + res["isCopyToClipboardEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCopyToClipboardEnabled(val) + } + return nil + } + res["isLobbyEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsLobbyEnabled(val) + } + return nil + } + res["lobbyBypassSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLobbyBypassSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLobbyBypassSettings(val.(LobbyBypassSettingsable)) + } + return nil + } + return res +} +// GetIsCopyToClipboardEnabled gets the isCopyToClipboardEnabled property value. The isCopyToClipboardEnabled property +func (m *ProtectOnlineMeetingAction) GetIsCopyToClipboardEnabled()(*bool) { + return m.isCopyToClipboardEnabled +} +// GetIsLobbyEnabled gets the isLobbyEnabled property value. The isLobbyEnabled property +func (m *ProtectOnlineMeetingAction) GetIsLobbyEnabled()(*bool) { + return m.isLobbyEnabled +} +// GetLobbyBypassSettings gets the lobbyBypassSettings property value. The lobbyBypassSettings property +func (m *ProtectOnlineMeetingAction) GetLobbyBypassSettings()(LobbyBypassSettingsable) { + return m.lobbyBypassSettings +} +// Serialize serializes information the current object +func (m *ProtectOnlineMeetingAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LabelActionBase.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedForwarders() != nil { + cast := (*m.GetAllowedForwarders()).String() + err = writer.WriteStringValue("allowedForwarders", &cast) + if err != nil { + return err + } + } + if m.GetAllowedPresenters() != nil { + cast := (*m.GetAllowedPresenters()).String() + err = writer.WriteStringValue("allowedPresenters", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCopyToClipboardEnabled", m.GetIsCopyToClipboardEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isLobbyEnabled", m.GetIsLobbyEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lobbyBypassSettings", m.GetLobbyBypassSettings()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedForwarders sets the allowedForwarders property value. The allowedForwarders property +func (m *ProtectOnlineMeetingAction) SetAllowedForwarders(value *OnlineMeetingForwarders)() { + m.allowedForwarders = value +} +// SetAllowedPresenters sets the allowedPresenters property value. The allowedPresenters property +func (m *ProtectOnlineMeetingAction) SetAllowedPresenters(value *OnlineMeetingPresenters)() { + m.allowedPresenters = value +} +// SetIsCopyToClipboardEnabled sets the isCopyToClipboardEnabled property value. The isCopyToClipboardEnabled property +func (m *ProtectOnlineMeetingAction) SetIsCopyToClipboardEnabled(value *bool)() { + m.isCopyToClipboardEnabled = value +} +// SetIsLobbyEnabled sets the isLobbyEnabled property value. The isLobbyEnabled property +func (m *ProtectOnlineMeetingAction) SetIsLobbyEnabled(value *bool)() { + m.isLobbyEnabled = value +} +// SetLobbyBypassSettings sets the lobbyBypassSettings property value. The lobbyBypassSettings property +func (m *ProtectOnlineMeetingAction) SetLobbyBypassSettings(value LobbyBypassSettingsable)() { + m.lobbyBypassSettings = value +} diff --git a/src/internal/connector/graph/betasdk/models/protect_online_meeting_actionable.go b/src/internal/connector/graph/betasdk/models/protect_online_meeting_actionable.go new file mode 100644 index 000000000..223e8708f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_online_meeting_actionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectOnlineMeetingActionable +type ProtectOnlineMeetingActionable interface { + LabelActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedForwarders()(*OnlineMeetingForwarders) + GetAllowedPresenters()(*OnlineMeetingPresenters) + GetIsCopyToClipboardEnabled()(*bool) + GetIsLobbyEnabled()(*bool) + GetLobbyBypassSettings()(LobbyBypassSettingsable) + SetAllowedForwarders(value *OnlineMeetingForwarders)() + SetAllowedPresenters(value *OnlineMeetingPresenters)() + SetIsCopyToClipboardEnabled(value *bool)() + SetIsLobbyEnabled(value *bool)() + SetLobbyBypassSettings(value LobbyBypassSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/protect_site.go b/src/internal/connector/graph/betasdk/models/protect_site.go new file mode 100644 index 000000000..cb4f0eb71 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_site.go @@ -0,0 +1,89 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectSite +type ProtectSite struct { + LabelActionBase + // The accessType property + accessType *SiteAccessType + // The conditionalAccessProtectionLevelId property + conditionalAccessProtectionLevelId *string +} +// NewProtectSite instantiates a new ProtectSite and sets the default values. +func NewProtectSite()(*ProtectSite) { + m := &ProtectSite{ + LabelActionBase: *NewLabelActionBase(), + } + odataTypeValue := "#microsoft.graph.protectSite"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectSiteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectSiteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectSite(), nil +} +// GetAccessType gets the accessType property value. The accessType property +func (m *ProtectSite) GetAccessType()(*SiteAccessType) { + return m.accessType +} +// GetConditionalAccessProtectionLevelId gets the conditionalAccessProtectionLevelId property value. The conditionalAccessProtectionLevelId property +func (m *ProtectSite) GetConditionalAccessProtectionLevelId()(*string) { + return m.conditionalAccessProtectionLevelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectSite) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LabelActionBase.GetFieldDeserializers() + res["accessType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSiteAccessType) + if err != nil { + return err + } + if val != nil { + m.SetAccessType(val.(*SiteAccessType)) + } + return nil + } + res["conditionalAccessProtectionLevelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetConditionalAccessProtectionLevelId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProtectSite) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LabelActionBase.Serialize(writer) + if err != nil { + return err + } + if m.GetAccessType() != nil { + cast := (*m.GetAccessType()).String() + err = writer.WriteStringValue("accessType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("conditionalAccessProtectionLevelId", m.GetConditionalAccessProtectionLevelId()) + if err != nil { + return err + } + } + return nil +} +// SetAccessType sets the accessType property value. The accessType property +func (m *ProtectSite) SetAccessType(value *SiteAccessType)() { + m.accessType = value +} +// SetConditionalAccessProtectionLevelId sets the conditionalAccessProtectionLevelId property value. The conditionalAccessProtectionLevelId property +func (m *ProtectSite) SetConditionalAccessProtectionLevelId(value *string)() { + m.conditionalAccessProtectionLevelId = value +} diff --git a/src/internal/connector/graph/betasdk/models/protect_siteable.go b/src/internal/connector/graph/betasdk/models/protect_siteable.go new file mode 100644 index 000000000..60c878860 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protect_siteable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectSiteable +type ProtectSiteable interface { + LabelActionBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessType()(*SiteAccessType) + GetConditionalAccessProtectionLevelId()(*string) + SetAccessType(value *SiteAccessType)() + SetConditionalAccessProtectionLevelId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/protocol_type.go b/src/internal/connector/graph/betasdk/models/protocol_type.go new file mode 100644 index 000000000..f06740886 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/protocol_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProtocolType int + +const ( + NONE_PROTOCOLTYPE ProtocolType = iota + OAUTH2_PROTOCOLTYPE + ROPC_PROTOCOLTYPE + WSFEDERATION_PROTOCOLTYPE + SAML20_PROTOCOLTYPE + DEVICECODE_PROTOCOLTYPE + UNKNOWNFUTUREVALUE_PROTOCOLTYPE +) + +func (i ProtocolType) String() string { + return []string{"none", "oAuth2", "ropc", "wsFederation", "saml20", "deviceCode", "unknownFutureValue"}[i] +} +func ParseProtocolType(v string) (interface{}, error) { + result := NONE_PROTOCOLTYPE + switch v { + case "none": + result = NONE_PROTOCOLTYPE + case "oAuth2": + result = OAUTH2_PROTOCOLTYPE + case "ropc": + result = ROPC_PROTOCOLTYPE + case "wsFederation": + result = WSFEDERATION_PROTOCOLTYPE + case "saml20": + result = SAML20_PROTOCOLTYPE + case "deviceCode": + result = DEVICECODE_PROTOCOLTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROTOCOLTYPE + default: + return 0, errors.New("Unknown ProtocolType value: " + v) + } + return &result, nil +} +func SerializeProtocolType(values []ProtocolType) []string { + 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/provider_tenant_setting.go b/src/internal/connector/graph/betasdk/models/provider_tenant_setting.go new file mode 100644 index 000000000..649eb2c5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provider_tenant_setting.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProviderTenantSetting provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProviderTenantSetting struct { + Entity + // The azureTenantId property + azureTenantId *string + // The enabled property + enabled *bool + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The provider property + provider *string + // The vendor property + vendor_escaped *string +} +// NewProviderTenantSetting instantiates a new providerTenantSetting and sets the default values. +func NewProviderTenantSetting()(*ProviderTenantSetting) { + m := &ProviderTenantSetting{ + Entity: *NewEntity(), + } + return m +} +// CreateProviderTenantSettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProviderTenantSettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProviderTenantSetting(), nil +} +// GetAzureTenantId gets the azureTenantId property value. The azureTenantId property +func (m *ProviderTenantSetting) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetEnabled gets the enabled property value. The enabled property +func (m *ProviderTenantSetting) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProviderTenantSetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvider(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ProviderTenantSetting) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetProvider gets the provider property value. The provider property +func (m *ProviderTenantSetting) GetProvider()(*string) { + return m.provider +} +// GetVendor gets the vendor property value. The vendor property +func (m *ProviderTenantSetting) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *ProviderTenantSetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("provider", m.GetProvider()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vendor", m.GetVendor()) + if err != nil { + return err + } + } + return nil +} +// SetAzureTenantId sets the azureTenantId property value. The azureTenantId property +func (m *ProviderTenantSetting) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *ProviderTenantSetting) SetEnabled(value *bool)() { + m.enabled = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ProviderTenantSetting) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetProvider sets the provider property value. The provider property +func (m *ProviderTenantSetting) SetProvider(value *string)() { + m.provider = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *ProviderTenantSetting) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_response.go b/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_response.go new file mode 100644 index 000000000..ee7701129 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProviderTenantSettingCollectionResponse +type ProviderTenantSettingCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProviderTenantSettingable +} +// NewProviderTenantSettingCollectionResponse instantiates a new ProviderTenantSettingCollectionResponse and sets the default values. +func NewProviderTenantSettingCollectionResponse()(*ProviderTenantSettingCollectionResponse) { + m := &ProviderTenantSettingCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProviderTenantSettingCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProviderTenantSettingCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProviderTenantSettingCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProviderTenantSettingCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProviderTenantSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProviderTenantSettingable, len(val)) + for i, v := range val { + res[i] = v.(ProviderTenantSettingable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProviderTenantSettingCollectionResponse) GetValue()([]ProviderTenantSettingable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProviderTenantSettingCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProviderTenantSettingCollectionResponse) SetValue(value []ProviderTenantSettingable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_responseable.go b/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_responseable.go new file mode 100644 index 000000000..d1ce7dce8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provider_tenant_setting_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProviderTenantSettingCollectionResponseable +type ProviderTenantSettingCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProviderTenantSettingable) + SetValue(value []ProviderTenantSettingable)() +} diff --git a/src/internal/connector/graph/betasdk/models/provider_tenant_settingable.go b/src/internal/connector/graph/betasdk/models/provider_tenant_settingable.go new file mode 100644 index 000000000..a2d3b1684 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provider_tenant_settingable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProviderTenantSettingable +type ProviderTenantSettingable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureTenantId()(*string) + GetEnabled()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProvider()(*string) + GetVendor()(*string) + SetAzureTenantId(value *string)() + SetEnabled(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProvider(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_identity.go b/src/internal/connector/graph/betasdk/models/provisioned_identity.go new file mode 100644 index 000000000..776daf978 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_identity.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedIdentity +type ProvisionedIdentity struct { + Identity + // Details of the identity. + details DetailsInfoable + // Type of identity that has been provisioned, such as 'user' or 'group'. + identityType *string +} +// NewProvisionedIdentity instantiates a new ProvisionedIdentity and sets the default values. +func NewProvisionedIdentity()(*ProvisionedIdentity) { + m := &ProvisionedIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.provisionedIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProvisionedIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisionedIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisionedIdentity(), nil +} +// GetDetails gets the details property value. Details of the identity. +func (m *ProvisionedIdentity) GetDetails()(DetailsInfoable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisionedIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDetailsInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(DetailsInfoable)) + } + return nil + } + res["identityType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentityType(val) + } + return nil + } + return res +} +// GetIdentityType gets the identityType property value. Type of identity that has been provisioned, such as 'user' or 'group'. +func (m *ProvisionedIdentity) GetIdentityType()(*string) { + return m.identityType +} +// Serialize serializes information the current object +func (m *ProvisionedIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("identityType", m.GetIdentityType()) + if err != nil { + return err + } + } + return nil +} +// SetDetails sets the details property value. Details of the identity. +func (m *ProvisionedIdentity) SetDetails(value DetailsInfoable)() { + m.details = value +} +// SetIdentityType sets the identityType property value. Type of identity that has been provisioned, such as 'user' or 'group'. +func (m *ProvisionedIdentity) SetIdentityType(value *string)() { + m.identityType = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_identityable.go b/src/internal/connector/graph/betasdk/models/provisioned_identityable.go new file mode 100644 index 000000000..ab719c8ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_identityable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedIdentityable +type ProvisionedIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()(DetailsInfoable) + GetIdentityType()(*string) + SetDetails(value DetailsInfoable)() + SetIdentityType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_plan.go b/src/internal/connector/graph/betasdk/models/provisioned_plan.go new file mode 100644 index 000000000..3eec2f3e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_plan.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedPlan +type ProvisionedPlan struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // For example, 'Enabled'. + capabilityStatus *string + // The OdataType property + odataType *string + // For example, 'Success'. + provisioningStatus *string + // The name of the service; for example, 'AccessControlS2S' + service *string +} +// NewProvisionedPlan instantiates a new provisionedPlan and sets the default values. +func NewProvisionedPlan()(*ProvisionedPlan) { + m := &ProvisionedPlan{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProvisionedPlanFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisionedPlanFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisionedPlan(), 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 *ProvisionedPlan) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCapabilityStatus gets the capabilityStatus property value. For example, 'Enabled'. +func (m *ProvisionedPlan) GetCapabilityStatus()(*string) { + return m.capabilityStatus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisionedPlan) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["capabilityStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCapabilityStatus(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["provisioningStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningStatus(val) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProvisionedPlan) GetOdataType()(*string) { + return m.odataType +} +// GetProvisioningStatus gets the provisioningStatus property value. For example, 'Success'. +func (m *ProvisionedPlan) GetProvisioningStatus()(*string) { + return m.provisioningStatus +} +// GetService gets the service property value. The name of the service; for example, 'AccessControlS2S' +func (m *ProvisionedPlan) GetService()(*string) { + return m.service +} +// Serialize serializes information the current object +func (m *ProvisionedPlan) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("capabilityStatus", m.GetCapabilityStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("provisioningStatus", m.GetProvisioningStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("service", m.GetService()) + 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 *ProvisionedPlan) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCapabilityStatus sets the capabilityStatus property value. For example, 'Enabled'. +func (m *ProvisionedPlan) SetCapabilityStatus(value *string)() { + m.capabilityStatus = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProvisionedPlan) SetOdataType(value *string)() { + m.odataType = value +} +// SetProvisioningStatus sets the provisioningStatus property value. For example, 'Success'. +func (m *ProvisionedPlan) SetProvisioningStatus(value *string)() { + m.provisioningStatus = value +} +// SetService sets the service property value. The name of the service; for example, 'AccessControlS2S' +func (m *ProvisionedPlan) SetService(value *string)() { + m.service = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_response.go b/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_response.go new file mode 100644 index 000000000..151fc963b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedPlanCollectionResponse +type ProvisionedPlanCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProvisionedPlanable +} +// NewProvisionedPlanCollectionResponse instantiates a new ProvisionedPlanCollectionResponse and sets the default values. +func NewProvisionedPlanCollectionResponse()(*ProvisionedPlanCollectionResponse) { + m := &ProvisionedPlanCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProvisionedPlanCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisionedPlanCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisionedPlanCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisionedPlanCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisionedPlanFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisionedPlanable, len(val)) + for i, v := range val { + res[i] = v.(ProvisionedPlanable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProvisionedPlanCollectionResponse) GetValue()([]ProvisionedPlanable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProvisionedPlanCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProvisionedPlanCollectionResponse) SetValue(value []ProvisionedPlanable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_responseable.go b/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_responseable.go new file mode 100644 index 000000000..0ff2bbe9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_plan_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedPlanCollectionResponseable +type ProvisionedPlanCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProvisionedPlanable) + SetValue(value []ProvisionedPlanable)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioned_planable.go b/src/internal/connector/graph/betasdk/models/provisioned_planable.go new file mode 100644 index 000000000..18a538b14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioned_planable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisionedPlanable +type ProvisionedPlanable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCapabilityStatus()(*string) + GetOdataType()(*string) + GetProvisioningStatus()(*string) + GetService()(*string) + SetCapabilityStatus(value *string)() + SetOdataType(value *string)() + SetProvisioningStatus(value *string)() + SetService(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_action.go b/src/internal/connector/graph/betasdk/models/provisioning_action.go new file mode 100644 index 000000000..ebed39eb9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_action.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProvisioningAction int + +const ( + OTHER_PROVISIONINGACTION ProvisioningAction = iota + CREATE_PROVISIONINGACTION + DELETE_PROVISIONINGACTION + DISABLE_PROVISIONINGACTION + UPDATE_PROVISIONINGACTION + STAGEDDELETE_PROVISIONINGACTION + UNKNOWNFUTUREVALUE_PROVISIONINGACTION +) + +func (i ProvisioningAction) String() string { + return []string{"other", "create", "delete", "disable", "update", "stagedDelete", "unknownFutureValue"}[i] +} +func ParseProvisioningAction(v string) (interface{}, error) { + result := OTHER_PROVISIONINGACTION + switch v { + case "other": + result = OTHER_PROVISIONINGACTION + case "create": + result = CREATE_PROVISIONINGACTION + case "delete": + result = DELETE_PROVISIONINGACTION + case "disable": + result = DISABLE_PROVISIONINGACTION + case "update": + result = UPDATE_PROVISIONINGACTION + case "stagedDelete": + result = STAGEDDELETE_PROVISIONINGACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROVISIONINGACTION + default: + return 0, errors.New("Unknown ProvisioningAction value: " + v) + } + return &result, nil +} +func SerializeProvisioningAction(values []ProvisioningAction) []string { + 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/provisioning_error_info.go b/src/internal/connector/graph/betasdk/models/provisioning_error_info.go new file mode 100644 index 000000000..7f7209c3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_error_info.go @@ -0,0 +1,202 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningErrorInfo +type ProvisioningErrorInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Additional details in case of error. + additionalDetails *string + // Categorizes the error code. Possible values are failure, nonServiceFailure, success, unknownFutureValue + errorCategory *ProvisioningStatusErrorCategory + // Unique error code if any occurred. Learn more + errorCode *string + // The OdataType property + odataType *string + // Summarizes the status and describes why the status happened. + reason *string + // Provides the resolution for the corresponding error. + recommendedAction *string +} +// NewProvisioningErrorInfo instantiates a new provisioningErrorInfo and sets the default values. +func NewProvisioningErrorInfo()(*ProvisioningErrorInfo) { + m := &ProvisioningErrorInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProvisioningErrorInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningErrorInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningErrorInfo(), 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 *ProvisioningErrorInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAdditionalDetails gets the additionalDetails property value. Additional details in case of error. +func (m *ProvisioningErrorInfo) GetAdditionalDetails()(*string) { + return m.additionalDetails +} +// GetErrorCategory gets the errorCategory property value. Categorizes the error code. Possible values are failure, nonServiceFailure, success, unknownFutureValue +func (m *ProvisioningErrorInfo) GetErrorCategory()(*ProvisioningStatusErrorCategory) { + return m.errorCategory +} +// GetErrorCode gets the errorCode property value. Unique error code if any occurred. Learn more +func (m *ProvisioningErrorInfo) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningErrorInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["additionalDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalDetails(val) + } + return nil + } + res["errorCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProvisioningStatusErrorCategory) + if err != nil { + return err + } + if val != nil { + m.SetErrorCategory(val.(*ProvisioningStatusErrorCategory)) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(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["reason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReason(val) + } + return nil + } + res["recommendedAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedAction(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProvisioningErrorInfo) GetOdataType()(*string) { + return m.odataType +} +// GetReason gets the reason property value. Summarizes the status and describes why the status happened. +func (m *ProvisioningErrorInfo) GetReason()(*string) { + return m.reason +} +// GetRecommendedAction gets the recommendedAction property value. Provides the resolution for the corresponding error. +func (m *ProvisioningErrorInfo) GetRecommendedAction()(*string) { + return m.recommendedAction +} +// Serialize serializes information the current object +func (m *ProvisioningErrorInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("additionalDetails", m.GetAdditionalDetails()) + if err != nil { + return err + } + } + if m.GetErrorCategory() != nil { + cast := (*m.GetErrorCategory()).String() + err := writer.WriteStringValue("errorCategory", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reason", m.GetReason()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recommendedAction", m.GetRecommendedAction()) + 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 *ProvisioningErrorInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAdditionalDetails sets the additionalDetails property value. Additional details in case of error. +func (m *ProvisioningErrorInfo) SetAdditionalDetails(value *string)() { + m.additionalDetails = value +} +// SetErrorCategory sets the errorCategory property value. Categorizes the error code. Possible values are failure, nonServiceFailure, success, unknownFutureValue +func (m *ProvisioningErrorInfo) SetErrorCategory(value *ProvisioningStatusErrorCategory)() { + m.errorCategory = value +} +// SetErrorCode sets the errorCode property value. Unique error code if any occurred. Learn more +func (m *ProvisioningErrorInfo) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProvisioningErrorInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetReason sets the reason property value. Summarizes the status and describes why the status happened. +func (m *ProvisioningErrorInfo) SetReason(value *string)() { + m.reason = value +} +// SetRecommendedAction sets the recommendedAction property value. Provides the resolution for the corresponding error. +func (m *ProvisioningErrorInfo) SetRecommendedAction(value *string)() { + m.recommendedAction = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_error_infoable.go b/src/internal/connector/graph/betasdk/models/provisioning_error_infoable.go new file mode 100644 index 000000000..36279e5ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_error_infoable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningErrorInfoable +type ProvisioningErrorInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdditionalDetails()(*string) + GetErrorCategory()(*ProvisioningStatusErrorCategory) + GetErrorCode()(*string) + GetOdataType()(*string) + GetReason()(*string) + GetRecommendedAction()(*string) + SetAdditionalDetails(value *string)() + SetErrorCategory(value *ProvisioningStatusErrorCategory)() + SetErrorCode(value *string)() + SetOdataType(value *string)() + SetReason(value *string)() + SetRecommendedAction(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_object_summary.go b/src/internal/connector/graph/betasdk/models/provisioning_object_summary.go new file mode 100644 index 000000000..3552e466d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_object_summary.go @@ -0,0 +1,520 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningObjectSummary +type ProvisioningObjectSummary struct { + Entity + // The action property + action *string + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Unique ID of this change in this cycle. + changeId *string + // Unique ID per job iteration. + cycleId *string + // Indicates how long this provisioning action took to finish. Measured in milliseconds. + durationInMilliseconds *int32 + // Details of who initiated this provisioning. + initiatedBy Initiatorable + // The unique ID for the whole provisioning job. + jobId *string + // Details of each property that was modified in this provisioning action on this object. + modifiedProperties []ModifiedPropertyable + // Indicates the activity name or the operation name. Possible values are: create, update, delete, stageddelete, disable, other and unknownFutureValue. For a list of activities logged, refer to Azure AD activity list. + provisioningAction *ProvisioningAction + // Details of provisioning status. + provisioningStatusInfo ProvisioningStatusInfoable + // Details of each step in provisioning. + provisioningSteps []ProvisioningStepable + // Represents the service principal used for provisioning. + servicePrincipal ProvisioningServicePrincipalable + // Details of source object being provisioned. + sourceIdentity ProvisionedIdentityable + // Details of source system of the object being provisioned. + sourceSystem ProvisioningSystemable + // The statusInfo property + statusInfo StatusBaseable + // Details of target object being provisioned. + targetIdentity ProvisionedIdentityable + // Details of target system of the object being provisioned. + targetSystem ProvisioningSystemable + // Unique Azure AD tenant ID. + tenantId *string +} +// NewProvisioningObjectSummary instantiates a new ProvisioningObjectSummary and sets the default values. +func NewProvisioningObjectSummary()(*ProvisioningObjectSummary) { + m := &ProvisioningObjectSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateProvisioningObjectSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningObjectSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningObjectSummary(), nil +} +// GetAction gets the action property value. The action property +func (m *ProvisioningObjectSummary) GetAction()(*string) { + return m.action +} +// GetActivityDateTime gets the activityDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ProvisioningObjectSummary) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetChangeId gets the changeId property value. Unique ID of this change in this cycle. +func (m *ProvisioningObjectSummary) GetChangeId()(*string) { + return m.changeId +} +// GetCycleId gets the cycleId property value. Unique ID per job iteration. +func (m *ProvisioningObjectSummary) GetCycleId()(*string) { + return m.cycleId +} +// GetDurationInMilliseconds gets the durationInMilliseconds property value. Indicates how long this provisioning action took to finish. Measured in milliseconds. +func (m *ProvisioningObjectSummary) GetDurationInMilliseconds()(*int32) { + return m.durationInMilliseconds +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningObjectSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAction(val) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["changeId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetChangeId(val) + } + return nil + } + res["cycleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCycleId(val) + } + return nil + } + res["durationInMilliseconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDurationInMilliseconds(val) + } + return nil + } + res["initiatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInitiatorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiatedBy(val.(Initiatorable)) + } + return nil + } + res["jobId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetJobId(val) + } + return nil + } + res["modifiedProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateModifiedPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ModifiedPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ModifiedPropertyable) + } + m.SetModifiedProperties(res) + } + return nil + } + res["provisioningAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProvisioningAction) + if err != nil { + return err + } + if val != nil { + m.SetProvisioningAction(val.(*ProvisioningAction)) + } + return nil + } + res["provisioningStatusInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisioningStatusInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetProvisioningStatusInfo(val.(ProvisioningStatusInfoable)) + } + return nil + } + res["provisioningSteps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisioningStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisioningStepable, len(val)) + for i, v := range val { + res[i] = v.(ProvisioningStepable) + } + m.SetProvisioningSteps(res) + } + return nil + } + res["servicePrincipal"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisioningServicePrincipalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipal(val.(ProvisioningServicePrincipalable)) + } + return nil + } + res["sourceIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisionedIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceIdentity(val.(ProvisionedIdentityable)) + } + return nil + } + res["sourceSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisioningSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSourceSystem(val.(ProvisioningSystemable)) + } + return nil + } + res["statusInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStatusBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStatusInfo(val.(StatusBaseable)) + } + return nil + } + res["targetIdentity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisionedIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetIdentity(val.(ProvisionedIdentityable)) + } + return nil + } + res["targetSystem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisioningSystemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTargetSystem(val.(ProvisioningSystemable)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetInitiatedBy gets the initiatedBy property value. Details of who initiated this provisioning. +func (m *ProvisioningObjectSummary) GetInitiatedBy()(Initiatorable) { + return m.initiatedBy +} +// GetJobId gets the jobId property value. The unique ID for the whole provisioning job. +func (m *ProvisioningObjectSummary) GetJobId()(*string) { + return m.jobId +} +// GetModifiedProperties gets the modifiedProperties property value. Details of each property that was modified in this provisioning action on this object. +func (m *ProvisioningObjectSummary) GetModifiedProperties()([]ModifiedPropertyable) { + return m.modifiedProperties +} +// GetProvisioningAction gets the provisioningAction property value. Indicates the activity name or the operation name. Possible values are: create, update, delete, stageddelete, disable, other and unknownFutureValue. For a list of activities logged, refer to Azure AD activity list. +func (m *ProvisioningObjectSummary) GetProvisioningAction()(*ProvisioningAction) { + return m.provisioningAction +} +// GetProvisioningStatusInfo gets the provisioningStatusInfo property value. Details of provisioning status. +func (m *ProvisioningObjectSummary) GetProvisioningStatusInfo()(ProvisioningStatusInfoable) { + return m.provisioningStatusInfo +} +// GetProvisioningSteps gets the provisioningSteps property value. Details of each step in provisioning. +func (m *ProvisioningObjectSummary) GetProvisioningSteps()([]ProvisioningStepable) { + return m.provisioningSteps +} +// GetServicePrincipal gets the servicePrincipal property value. Represents the service principal used for provisioning. +func (m *ProvisioningObjectSummary) GetServicePrincipal()(ProvisioningServicePrincipalable) { + return m.servicePrincipal +} +// GetSourceIdentity gets the sourceIdentity property value. Details of source object being provisioned. +func (m *ProvisioningObjectSummary) GetSourceIdentity()(ProvisionedIdentityable) { + return m.sourceIdentity +} +// GetSourceSystem gets the sourceSystem property value. Details of source system of the object being provisioned. +func (m *ProvisioningObjectSummary) GetSourceSystem()(ProvisioningSystemable) { + return m.sourceSystem +} +// GetStatusInfo gets the statusInfo property value. The statusInfo property +func (m *ProvisioningObjectSummary) GetStatusInfo()(StatusBaseable) { + return m.statusInfo +} +// GetTargetIdentity gets the targetIdentity property value. Details of target object being provisioned. +func (m *ProvisioningObjectSummary) GetTargetIdentity()(ProvisionedIdentityable) { + return m.targetIdentity +} +// GetTargetSystem gets the targetSystem property value. Details of target system of the object being provisioned. +func (m *ProvisioningObjectSummary) GetTargetSystem()(ProvisioningSystemable) { + return m.targetSystem +} +// GetTenantId gets the tenantId property value. Unique Azure AD tenant ID. +func (m *ProvisioningObjectSummary) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ProvisioningObjectSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("action", m.GetAction()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("changeId", m.GetChangeId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("cycleId", m.GetCycleId()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("durationInMilliseconds", m.GetDurationInMilliseconds()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("initiatedBy", m.GetInitiatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("jobId", m.GetJobId()) + if err != nil { + return err + } + } + if m.GetModifiedProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetModifiedProperties())) + for i, v := range m.GetModifiedProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("modifiedProperties", cast) + if err != nil { + return err + } + } + if m.GetProvisioningAction() != nil { + cast := (*m.GetProvisioningAction()).String() + err = writer.WriteStringValue("provisioningAction", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("provisioningStatusInfo", m.GetProvisioningStatusInfo()) + if err != nil { + return err + } + } + if m.GetProvisioningSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProvisioningSteps())) + for i, v := range m.GetProvisioningSteps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("provisioningSteps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("servicePrincipal", m.GetServicePrincipal()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceIdentity", m.GetSourceIdentity()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sourceSystem", m.GetSourceSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("statusInfo", m.GetStatusInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("targetIdentity", m.GetTargetIdentity()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("targetSystem", m.GetTargetSystem()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The action property +func (m *ProvisioningObjectSummary) SetAction(value *string)() { + m.action = value +} +// SetActivityDateTime sets the activityDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ProvisioningObjectSummary) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetChangeId sets the changeId property value. Unique ID of this change in this cycle. +func (m *ProvisioningObjectSummary) SetChangeId(value *string)() { + m.changeId = value +} +// SetCycleId sets the cycleId property value. Unique ID per job iteration. +func (m *ProvisioningObjectSummary) SetCycleId(value *string)() { + m.cycleId = value +} +// SetDurationInMilliseconds sets the durationInMilliseconds property value. Indicates how long this provisioning action took to finish. Measured in milliseconds. +func (m *ProvisioningObjectSummary) SetDurationInMilliseconds(value *int32)() { + m.durationInMilliseconds = value +} +// SetInitiatedBy sets the initiatedBy property value. Details of who initiated this provisioning. +func (m *ProvisioningObjectSummary) SetInitiatedBy(value Initiatorable)() { + m.initiatedBy = value +} +// SetJobId sets the jobId property value. The unique ID for the whole provisioning job. +func (m *ProvisioningObjectSummary) SetJobId(value *string)() { + m.jobId = value +} +// SetModifiedProperties sets the modifiedProperties property value. Details of each property that was modified in this provisioning action on this object. +func (m *ProvisioningObjectSummary) SetModifiedProperties(value []ModifiedPropertyable)() { + m.modifiedProperties = value +} +// SetProvisioningAction sets the provisioningAction property value. Indicates the activity name or the operation name. Possible values are: create, update, delete, stageddelete, disable, other and unknownFutureValue. For a list of activities logged, refer to Azure AD activity list. +func (m *ProvisioningObjectSummary) SetProvisioningAction(value *ProvisioningAction)() { + m.provisioningAction = value +} +// SetProvisioningStatusInfo sets the provisioningStatusInfo property value. Details of provisioning status. +func (m *ProvisioningObjectSummary) SetProvisioningStatusInfo(value ProvisioningStatusInfoable)() { + m.provisioningStatusInfo = value +} +// SetProvisioningSteps sets the provisioningSteps property value. Details of each step in provisioning. +func (m *ProvisioningObjectSummary) SetProvisioningSteps(value []ProvisioningStepable)() { + m.provisioningSteps = value +} +// SetServicePrincipal sets the servicePrincipal property value. Represents the service principal used for provisioning. +func (m *ProvisioningObjectSummary) SetServicePrincipal(value ProvisioningServicePrincipalable)() { + m.servicePrincipal = value +} +// SetSourceIdentity sets the sourceIdentity property value. Details of source object being provisioned. +func (m *ProvisioningObjectSummary) SetSourceIdentity(value ProvisionedIdentityable)() { + m.sourceIdentity = value +} +// SetSourceSystem sets the sourceSystem property value. Details of source system of the object being provisioned. +func (m *ProvisioningObjectSummary) SetSourceSystem(value ProvisioningSystemable)() { + m.sourceSystem = value +} +// SetStatusInfo sets the statusInfo property value. The statusInfo property +func (m *ProvisioningObjectSummary) SetStatusInfo(value StatusBaseable)() { + m.statusInfo = value +} +// SetTargetIdentity sets the targetIdentity property value. Details of target object being provisioned. +func (m *ProvisioningObjectSummary) SetTargetIdentity(value ProvisionedIdentityable)() { + m.targetIdentity = value +} +// SetTargetSystem sets the targetSystem property value. Details of target system of the object being provisioned. +func (m *ProvisioningObjectSummary) SetTargetSystem(value ProvisioningSystemable)() { + m.targetSystem = value +} +// SetTenantId sets the tenantId property value. Unique Azure AD tenant ID. +func (m *ProvisioningObjectSummary) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_response.go new file mode 100644 index 000000000..ec2122ddf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningObjectSummaryCollectionResponse +type ProvisioningObjectSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProvisioningObjectSummaryable +} +// NewProvisioningObjectSummaryCollectionResponse instantiates a new ProvisioningObjectSummaryCollectionResponse and sets the default values. +func NewProvisioningObjectSummaryCollectionResponse()(*ProvisioningObjectSummaryCollectionResponse) { + m := &ProvisioningObjectSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProvisioningObjectSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningObjectSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningObjectSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningObjectSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisioningObjectSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisioningObjectSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ProvisioningObjectSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProvisioningObjectSummaryCollectionResponse) GetValue()([]ProvisioningObjectSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProvisioningObjectSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProvisioningObjectSummaryCollectionResponse) SetValue(value []ProvisioningObjectSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_responseable.go new file mode 100644 index 000000000..2e1a63d8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_object_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningObjectSummaryCollectionResponseable +type ProvisioningObjectSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProvisioningObjectSummaryable) + SetValue(value []ProvisioningObjectSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_object_summaryable.go b/src/internal/connector/graph/betasdk/models/provisioning_object_summaryable.go new file mode 100644 index 000000000..05c1d7c35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_object_summaryable.go @@ -0,0 +1,48 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningObjectSummaryable +type ProvisioningObjectSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*string) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetChangeId()(*string) + GetCycleId()(*string) + GetDurationInMilliseconds()(*int32) + GetInitiatedBy()(Initiatorable) + GetJobId()(*string) + GetModifiedProperties()([]ModifiedPropertyable) + GetProvisioningAction()(*ProvisioningAction) + GetProvisioningStatusInfo()(ProvisioningStatusInfoable) + GetProvisioningSteps()([]ProvisioningStepable) + GetServicePrincipal()(ProvisioningServicePrincipalable) + GetSourceIdentity()(ProvisionedIdentityable) + GetSourceSystem()(ProvisioningSystemable) + GetStatusInfo()(StatusBaseable) + GetTargetIdentity()(ProvisionedIdentityable) + GetTargetSystem()(ProvisioningSystemable) + GetTenantId()(*string) + SetAction(value *string)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetChangeId(value *string)() + SetCycleId(value *string)() + SetDurationInMilliseconds(value *int32)() + SetInitiatedBy(value Initiatorable)() + SetJobId(value *string)() + SetModifiedProperties(value []ModifiedPropertyable)() + SetProvisioningAction(value *ProvisioningAction)() + SetProvisioningStatusInfo(value ProvisioningStatusInfoable)() + SetProvisioningSteps(value []ProvisioningStepable)() + SetServicePrincipal(value ProvisioningServicePrincipalable)() + SetSourceIdentity(value ProvisionedIdentityable)() + SetSourceSystem(value ProvisioningSystemable)() + SetStatusInfo(value StatusBaseable)() + SetTargetIdentity(value ProvisionedIdentityable)() + SetTargetSystem(value ProvisioningSystemable)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_result.go b/src/internal/connector/graph/betasdk/models/provisioning_result.go new file mode 100644 index 000000000..d289f6210 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_result.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProvisioningResult int + +const ( + SUCCESS_PROVISIONINGRESULT ProvisioningResult = iota + FAILURE_PROVISIONINGRESULT + SKIPPED_PROVISIONINGRESULT + WARNING_PROVISIONINGRESULT + UNKNOWNFUTUREVALUE_PROVISIONINGRESULT +) + +func (i ProvisioningResult) String() string { + return []string{"success", "failure", "skipped", "warning", "unknownFutureValue"}[i] +} +func ParseProvisioningResult(v string) (interface{}, error) { + result := SUCCESS_PROVISIONINGRESULT + switch v { + case "success": + result = SUCCESS_PROVISIONINGRESULT + case "failure": + result = FAILURE_PROVISIONINGRESULT + case "skipped": + result = SKIPPED_PROVISIONINGRESULT + case "warning": + result = WARNING_PROVISIONINGRESULT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROVISIONINGRESULT + default: + return 0, errors.New("Unknown ProvisioningResult value: " + v) + } + return &result, nil +} +func SerializeProvisioningResult(values []ProvisioningResult) []string { + 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/provisioning_service_principal.go b/src/internal/connector/graph/betasdk/models/provisioning_service_principal.go new file mode 100644 index 000000000..0c5db68f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_service_principal.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningServicePrincipal +type ProvisioningServicePrincipal struct { + Identity +} +// NewProvisioningServicePrincipal instantiates a new ProvisioningServicePrincipal and sets the default values. +func NewProvisioningServicePrincipal()(*ProvisioningServicePrincipal) { + m := &ProvisioningServicePrincipal{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.provisioningServicePrincipal"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProvisioningServicePrincipalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningServicePrincipalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningServicePrincipal(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningServicePrincipal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ProvisioningServicePrincipal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_service_principalable.go b/src/internal/connector/graph/betasdk/models/provisioning_service_principalable.go new file mode 100644 index 000000000..2cdf1ab2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_service_principalable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningServicePrincipalable +type ProvisioningServicePrincipalable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_status_error_category.go b/src/internal/connector/graph/betasdk/models/provisioning_status_error_category.go new file mode 100644 index 000000000..6648a1871 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_status_error_category.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProvisioningStatusErrorCategory int + +const ( + FAILURE_PROVISIONINGSTATUSERRORCATEGORY ProvisioningStatusErrorCategory = iota + NONSERVICEFAILURE_PROVISIONINGSTATUSERRORCATEGORY + SUCCESS_PROVISIONINGSTATUSERRORCATEGORY + UNKNOWNFUTUREVALUE_PROVISIONINGSTATUSERRORCATEGORY +) + +func (i ProvisioningStatusErrorCategory) String() string { + return []string{"failure", "nonServiceFailure", "success", "unknownFutureValue"}[i] +} +func ParseProvisioningStatusErrorCategory(v string) (interface{}, error) { + result := FAILURE_PROVISIONINGSTATUSERRORCATEGORY + switch v { + case "failure": + result = FAILURE_PROVISIONINGSTATUSERRORCATEGORY + case "nonServiceFailure": + result = NONSERVICEFAILURE_PROVISIONINGSTATUSERRORCATEGORY + case "success": + result = SUCCESS_PROVISIONINGSTATUSERRORCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROVISIONINGSTATUSERRORCATEGORY + default: + return 0, errors.New("Unknown ProvisioningStatusErrorCategory value: " + v) + } + return &result, nil +} +func SerializeProvisioningStatusErrorCategory(values []ProvisioningStatusErrorCategory) []string { + 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/provisioning_status_info.go b/src/internal/connector/graph/betasdk/models/provisioning_status_info.go new file mode 100644 index 000000000..e4663610b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_status_info.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStatusInfo +type ProvisioningStatusInfo 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 errorInformation property + errorInformation ProvisioningErrorInfoable + // The OdataType property + odataType *string + // Possible values are: success, warning, failure, skipped, unknownFutureValue. + status *ProvisioningResult +} +// NewProvisioningStatusInfo instantiates a new provisioningStatusInfo and sets the default values. +func NewProvisioningStatusInfo()(*ProvisioningStatusInfo) { + m := &ProvisioningStatusInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProvisioningStatusInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningStatusInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningStatusInfo(), 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 *ProvisioningStatusInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetErrorInformation gets the errorInformation property value. The errorInformation property +func (m *ProvisioningStatusInfo) GetErrorInformation()(ProvisioningErrorInfoable) { + return m.errorInformation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningStatusInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["errorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateProvisioningErrorInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetErrorInformation(val.(ProvisioningErrorInfoable)) + } + 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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProvisioningResult) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ProvisioningResult)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProvisioningStatusInfo) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Possible values are: success, warning, failure, skipped, unknownFutureValue. +func (m *ProvisioningStatusInfo) GetStatus()(*ProvisioningResult) { + return m.status +} +// Serialize serializes information the current object +func (m *ProvisioningStatusInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("errorInformation", m.GetErrorInformation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *ProvisioningStatusInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetErrorInformation sets the errorInformation property value. The errorInformation property +func (m *ProvisioningStatusInfo) SetErrorInformation(value ProvisioningErrorInfoable)() { + m.errorInformation = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProvisioningStatusInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Possible values are: success, warning, failure, skipped, unknownFutureValue. +func (m *ProvisioningStatusInfo) SetStatus(value *ProvisioningResult)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_status_infoable.go b/src/internal/connector/graph/betasdk/models/provisioning_status_infoable.go new file mode 100644 index 000000000..0773db2d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_status_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStatusInfoable +type ProvisioningStatusInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorInformation()(ProvisioningErrorInfoable) + GetOdataType()(*string) + GetStatus()(*ProvisioningResult) + SetErrorInformation(value ProvisioningErrorInfoable)() + SetOdataType(value *string)() + SetStatus(value *ProvisioningResult)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_step.go b/src/internal/connector/graph/betasdk/models/provisioning_step.go new file mode 100644 index 000000000..f8e01f5a7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_step.go @@ -0,0 +1,203 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStep +type ProvisioningStep struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Summary of what occurred during the step. + description *string + // Details of what occurred during the step. + details DetailsInfoable + // Name of the step. + name *string + // The OdataType property + odataType *string + // Type of step. Possible values are: import, scoping, matching, processing, referenceResolution, export, unknownFutureValue. + provisioningStepType *ProvisioningStepType + // Status of the step. Possible values are: success, warning, failure, skipped, unknownFutureValue. + status *ProvisioningResult +} +// NewProvisioningStep instantiates a new provisioningStep and sets the default values. +func NewProvisioningStep()(*ProvisioningStep) { + m := &ProvisioningStep{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProvisioningStepFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningStepFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningStep(), 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 *ProvisioningStep) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Summary of what occurred during the step. +func (m *ProvisioningStep) GetDescription()(*string) { + return m.description +} +// GetDetails gets the details property value. Details of what occurred during the step. +func (m *ProvisioningStep) GetDetails()(DetailsInfoable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningStep) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDetailsInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(DetailsInfoable)) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["provisioningStepType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProvisioningStepType) + if err != nil { + return err + } + if val != nil { + m.SetProvisioningStepType(val.(*ProvisioningStepType)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseProvisioningResult) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ProvisioningResult)) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the step. +func (m *ProvisioningStep) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProvisioningStep) GetOdataType()(*string) { + return m.odataType +} +// GetProvisioningStepType gets the provisioningStepType property value. Type of step. Possible values are: import, scoping, matching, processing, referenceResolution, export, unknownFutureValue. +func (m *ProvisioningStep) GetProvisioningStepType()(*ProvisioningStepType) { + return m.provisioningStepType +} +// GetStatus gets the status property value. Status of the step. Possible values are: success, warning, failure, skipped, unknownFutureValue. +func (m *ProvisioningStep) GetStatus()(*ProvisioningResult) { + return m.status +} +// Serialize serializes information the current object +func (m *ProvisioningStep) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetProvisioningStepType() != nil { + cast := (*m.GetProvisioningStepType()).String() + err := writer.WriteStringValue("provisioningStepType", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *ProvisioningStep) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Summary of what occurred during the step. +func (m *ProvisioningStep) SetDescription(value *string)() { + m.description = value +} +// SetDetails sets the details property value. Details of what occurred during the step. +func (m *ProvisioningStep) SetDetails(value DetailsInfoable)() { + m.details = value +} +// SetName sets the name property value. Name of the step. +func (m *ProvisioningStep) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProvisioningStep) SetOdataType(value *string)() { + m.odataType = value +} +// SetProvisioningStepType sets the provisioningStepType property value. Type of step. Possible values are: import, scoping, matching, processing, referenceResolution, export, unknownFutureValue. +func (m *ProvisioningStep) SetProvisioningStepType(value *ProvisioningStepType)() { + m.provisioningStepType = value +} +// SetStatus sets the status property value. Status of the step. Possible values are: success, warning, failure, skipped, unknownFutureValue. +func (m *ProvisioningStep) SetStatus(value *ProvisioningResult)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_step_collection_response.go b/src/internal/connector/graph/betasdk/models/provisioning_step_collection_response.go new file mode 100644 index 000000000..967a18bf0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_step_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStepCollectionResponse +type ProvisioningStepCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProvisioningStepable +} +// NewProvisioningStepCollectionResponse instantiates a new ProvisioningStepCollectionResponse and sets the default values. +func NewProvisioningStepCollectionResponse()(*ProvisioningStepCollectionResponse) { + m := &ProvisioningStepCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProvisioningStepCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningStepCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningStepCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningStepCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProvisioningStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProvisioningStepable, len(val)) + for i, v := range val { + res[i] = v.(ProvisioningStepable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProvisioningStepCollectionResponse) GetValue()([]ProvisioningStepable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProvisioningStepCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProvisioningStepCollectionResponse) SetValue(value []ProvisioningStepable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_step_collection_responseable.go b/src/internal/connector/graph/betasdk/models/provisioning_step_collection_responseable.go new file mode 100644 index 000000000..6adfe4e4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_step_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStepCollectionResponseable +type ProvisioningStepCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProvisioningStepable) + SetValue(value []ProvisioningStepable)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_step_type.go b/src/internal/connector/graph/betasdk/models/provisioning_step_type.go new file mode 100644 index 000000000..f1de3a113 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_step_type.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ProvisioningStepType int + +const ( + IMPORT_ESCAPED_PROVISIONINGSTEPTYPE ProvisioningStepType = iota + SCOPING_PROVISIONINGSTEPTYPE + MATCHING_PROVISIONINGSTEPTYPE + PROCESSING_PROVISIONINGSTEPTYPE + REFERENCERESOLUTION_PROVISIONINGSTEPTYPE + EXPORT_PROVISIONINGSTEPTYPE + UNKNOWNFUTUREVALUE_PROVISIONINGSTEPTYPE +) + +func (i ProvisioningStepType) String() string { + return []string{"import", "scoping", "matching", "processing", "referenceResolution", "export", "unknownFutureValue"}[i] +} +func ParseProvisioningStepType(v string) (interface{}, error) { + result := IMPORT_ESCAPED_PROVISIONINGSTEPTYPE + switch v { + case "import": + result = IMPORT_ESCAPED_PROVISIONINGSTEPTYPE + case "scoping": + result = SCOPING_PROVISIONINGSTEPTYPE + case "matching": + result = MATCHING_PROVISIONINGSTEPTYPE + case "processing": + result = PROCESSING_PROVISIONINGSTEPTYPE + case "referenceResolution": + result = REFERENCERESOLUTION_PROVISIONINGSTEPTYPE + case "export": + result = EXPORT_PROVISIONINGSTEPTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_PROVISIONINGSTEPTYPE + default: + return 0, errors.New("Unknown ProvisioningStepType value: " + v) + } + return &result, nil +} +func SerializeProvisioningStepType(values []ProvisioningStepType) []string { + 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/provisioning_stepable.go b/src/internal/connector/graph/betasdk/models/provisioning_stepable.go new file mode 100644 index 000000000..078ca84c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_stepable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningStepable +type ProvisioningStepable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDetails()(DetailsInfoable) + GetName()(*string) + GetOdataType()(*string) + GetProvisioningStepType()(*ProvisioningStepType) + GetStatus()(*ProvisioningResult) + SetDescription(value *string)() + SetDetails(value DetailsInfoable)() + SetName(value *string)() + SetOdataType(value *string)() + SetProvisioningStepType(value *ProvisioningStepType)() + SetStatus(value *ProvisioningResult)() +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_system.go b/src/internal/connector/graph/betasdk/models/provisioning_system.go new file mode 100644 index 000000000..6e3f1fed3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_system.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningSystem +type ProvisioningSystem struct { + Identity + // Details of the system. + details DetailsInfoable +} +// NewProvisioningSystem instantiates a new ProvisioningSystem and sets the default values. +func NewProvisioningSystem()(*ProvisioningSystem) { + m := &ProvisioningSystem{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.provisioningSystem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProvisioningSystemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProvisioningSystemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProvisioningSystem(), nil +} +// GetDetails gets the details property value. Details of the system. +func (m *ProvisioningSystem) GetDetails()(DetailsInfoable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProvisioningSystem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDetailsInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDetails(val.(DetailsInfoable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ProvisioningSystem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("details", m.GetDetails()) + if err != nil { + return err + } + } + return nil +} +// SetDetails sets the details property value. Details of the system. +func (m *ProvisioningSystem) SetDetails(value DetailsInfoable)() { + m.details = value +} diff --git a/src/internal/connector/graph/betasdk/models/provisioning_systemable.go b/src/internal/connector/graph/betasdk/models/provisioning_systemable.go new file mode 100644 index 000000000..1b5a6f8a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/provisioning_systemable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProvisioningSystemable +type ProvisioningSystemable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()(DetailsInfoable) + SetDetails(value DetailsInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/proxied_domain.go b/src/internal/connector/graph/betasdk/models/proxied_domain.go new file mode 100644 index 000000000..d5a2ddc54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/proxied_domain.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProxiedDomain proxied Domain +type ProxiedDomain 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 IP address or FQDN + ipAddressOrFQDN *string + // The OdataType property + odataType *string + // Proxy IP or FQDN + proxy *string +} +// NewProxiedDomain instantiates a new proxiedDomain and sets the default values. +func NewProxiedDomain()(*ProxiedDomain) { + m := &ProxiedDomain{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateProxiedDomainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProxiedDomainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProxiedDomain(), 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 *ProxiedDomain) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProxiedDomain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["ipAddressOrFQDN"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddressOrFQDN(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["proxy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProxy(val) + } + return nil + } + return res +} +// GetIpAddressOrFQDN gets the ipAddressOrFQDN property value. The IP address or FQDN +func (m *ProxiedDomain) GetIpAddressOrFQDN()(*string) { + return m.ipAddressOrFQDN +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ProxiedDomain) GetOdataType()(*string) { + return m.odataType +} +// GetProxy gets the proxy property value. Proxy IP or FQDN +func (m *ProxiedDomain) GetProxy()(*string) { + return m.proxy +} +// Serialize serializes information the current object +func (m *ProxiedDomain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("ipAddressOrFQDN", m.GetIpAddressOrFQDN()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("proxy", m.GetProxy()) + 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 *ProxiedDomain) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIpAddressOrFQDN sets the ipAddressOrFQDN property value. The IP address or FQDN +func (m *ProxiedDomain) SetIpAddressOrFQDN(value *string)() { + m.ipAddressOrFQDN = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ProxiedDomain) SetOdataType(value *string)() { + m.odataType = value +} +// SetProxy sets the proxy property value. Proxy IP or FQDN +func (m *ProxiedDomain) SetProxy(value *string)() { + m.proxy = value +} diff --git a/src/internal/connector/graph/betasdk/models/proxied_domain_collection_response.go b/src/internal/connector/graph/betasdk/models/proxied_domain_collection_response.go new file mode 100644 index 000000000..cd3e16706 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/proxied_domain_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProxiedDomainCollectionResponse +type ProxiedDomainCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ProxiedDomainable +} +// NewProxiedDomainCollectionResponse instantiates a new ProxiedDomainCollectionResponse and sets the default values. +func NewProxiedDomainCollectionResponse()(*ProxiedDomainCollectionResponse) { + m := &ProxiedDomainCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateProxiedDomainCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProxiedDomainCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProxiedDomainCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProxiedDomainCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProxiedDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProxiedDomainable, len(val)) + for i, v := range val { + res[i] = v.(ProxiedDomainable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ProxiedDomainCollectionResponse) GetValue()([]ProxiedDomainable) { + return m.value +} +// Serialize serializes information the current object +func (m *ProxiedDomainCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ProxiedDomainCollectionResponse) SetValue(value []ProxiedDomainable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/proxied_domain_collection_responseable.go b/src/internal/connector/graph/betasdk/models/proxied_domain_collection_responseable.go new file mode 100644 index 000000000..75fcec42b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/proxied_domain_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProxiedDomainCollectionResponseable +type ProxiedDomainCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ProxiedDomainable) + SetValue(value []ProxiedDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/proxied_domainable.go b/src/internal/connector/graph/betasdk/models/proxied_domainable.go new file mode 100644 index 000000000..305578f5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/proxied_domainable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProxiedDomainable +type ProxiedDomainable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIpAddressOrFQDN()(*string) + GetOdataType()(*string) + GetProxy()(*string) + SetIpAddressOrFQDN(value *string)() + SetOdataType(value *string)() + SetProxy(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/public_client_application.go b/src/internal/connector/graph/betasdk/models/public_client_application.go new file mode 100644 index 000000000..8d0121d35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_client_application.go @@ -0,0 +1,101 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicClientApplication +type PublicClientApplication 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 OdataType property + odataType *string + // Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. + redirectUris []string +} +// NewPublicClientApplication instantiates a new publicClientApplication and sets the default values. +func NewPublicClientApplication()(*PublicClientApplication) { + m := &PublicClientApplication{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePublicClientApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublicClientApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicClientApplication(), 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 *PublicClientApplication) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublicClientApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["redirectUris"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRedirectUris(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PublicClientApplication) GetOdataType()(*string) { + return m.odataType +} +// GetRedirectUris gets the redirectUris property value. Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. +func (m *PublicClientApplication) GetRedirectUris()([]string) { + return m.redirectUris +} +// Serialize serializes information the current object +func (m *PublicClientApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRedirectUris() != nil { + err := writer.WriteCollectionOfStringValues("redirectUris", m.GetRedirectUris()) + 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 *PublicClientApplication) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PublicClientApplication) SetOdataType(value *string)() { + m.odataType = value +} +// SetRedirectUris sets the redirectUris property value. Specifies the URLs where user tokens are sent for sign-in, or the redirect URIs where OAuth 2.0 authorization codes and access tokens are sent. +func (m *PublicClientApplication) SetRedirectUris(value []string)() { + m.redirectUris = value +} diff --git a/src/internal/connector/graph/betasdk/models/public_client_applicationable.go b/src/internal/connector/graph/betasdk/models/public_client_applicationable.go new file mode 100644 index 000000000..777579f8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_client_applicationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicClientApplicationable +type PublicClientApplicationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRedirectUris()([]string) + SetOdataType(value *string)() + SetRedirectUris(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/public_error.go b/src/internal/connector/graph/betasdk/models/public_error.go new file mode 100644 index 000000000..102e850eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_error.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicError +type PublicError struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Represents the error code. + code *string + // Details of the error. + details []PublicErrorDetailable + // Details of the inner error. + innerError PublicInnerErrorable + // A non-localized message for the developer. + message *string + // The OdataType property + odataType *string + // The target of the error. + target *string +} +// NewPublicError instantiates a new publicError and sets the default values. +func NewPublicError()(*PublicError) { + m := &PublicError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePublicErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublicErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicError(), 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 *PublicError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. Represents the error code. +func (m *PublicError) GetCode()(*string) { + return m.code +} +// GetDetails gets the details property value. Details of the error. +func (m *PublicError) GetDetails()([]PublicErrorDetailable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublicError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublicErrorDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublicErrorDetailable, len(val)) + for i, v := range val { + res[i] = v.(PublicErrorDetailable) + } + m.SetDetails(res) + } + return nil + } + res["innerError"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicInnerErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInnerError(val.(PublicInnerErrorable)) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetInnerError gets the innerError property value. Details of the inner error. +func (m *PublicError) GetInnerError()(PublicInnerErrorable) { + return m.innerError +} +// GetMessage gets the message property value. A non-localized message for the developer. +func (m *PublicError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PublicError) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The target of the error. +func (m *PublicError) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *PublicError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + if m.GetDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetails())) + for i, v := range m.GetDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("details", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("innerError", m.GetInnerError()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *PublicError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. Represents the error code. +func (m *PublicError) SetCode(value *string)() { + m.code = value +} +// SetDetails sets the details property value. Details of the error. +func (m *PublicError) SetDetails(value []PublicErrorDetailable)() { + m.details = value +} +// SetInnerError sets the innerError property value. Details of the inner error. +func (m *PublicError) SetInnerError(value PublicInnerErrorable)() { + m.innerError = value +} +// SetMessage sets the message property value. A non-localized message for the developer. +func (m *PublicError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PublicError) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The target of the error. +func (m *PublicError) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/public_error_detail.go b/src/internal/connector/graph/betasdk/models/public_error_detail.go new file mode 100644 index 000000000..7ebcdad02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_error_detail.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicErrorDetail +type PublicErrorDetail 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 error code. + code *string + // The error message. + message *string + // The OdataType property + odataType *string + // The target of the error. + target *string +} +// NewPublicErrorDetail instantiates a new publicErrorDetail and sets the default values. +func NewPublicErrorDetail()(*PublicErrorDetail) { + m := &PublicErrorDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePublicErrorDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublicErrorDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicErrorDetail(), 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 *PublicErrorDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The error code. +func (m *PublicErrorDetail) GetCode()(*string) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublicErrorDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The error message. +func (m *PublicErrorDetail) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PublicErrorDetail) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The target of the error. +func (m *PublicErrorDetail) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *PublicErrorDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *PublicErrorDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The error code. +func (m *PublicErrorDetail) SetCode(value *string)() { + m.code = value +} +// SetMessage sets the message property value. The error message. +func (m *PublicErrorDetail) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PublicErrorDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The target of the error. +func (m *PublicErrorDetail) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/public_error_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/public_error_detail_collection_response.go new file mode 100644 index 000000000..e76300285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_error_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicErrorDetailCollectionResponse +type PublicErrorDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PublicErrorDetailable +} +// NewPublicErrorDetailCollectionResponse instantiates a new PublicErrorDetailCollectionResponse and sets the default values. +func NewPublicErrorDetailCollectionResponse()(*PublicErrorDetailCollectionResponse) { + m := &PublicErrorDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePublicErrorDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublicErrorDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicErrorDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublicErrorDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublicErrorDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublicErrorDetailable, len(val)) + for i, v := range val { + res[i] = v.(PublicErrorDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PublicErrorDetailCollectionResponse) GetValue()([]PublicErrorDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *PublicErrorDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PublicErrorDetailCollectionResponse) SetValue(value []PublicErrorDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/public_error_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/public_error_detail_collection_responseable.go new file mode 100644 index 000000000..26fe5a0f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_error_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicErrorDetailCollectionResponseable +type PublicErrorDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PublicErrorDetailable) + SetValue(value []PublicErrorDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/public_error_detailable.go b/src/internal/connector/graph/betasdk/models/public_error_detailable.go new file mode 100644 index 000000000..1d3dce96a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_error_detailable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicErrorDetailable +type PublicErrorDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetMessage()(*string) + GetOdataType()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetMessage(value *string)() + SetOdataType(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/public_errorable.go b/src/internal/connector/graph/betasdk/models/public_errorable.go new file mode 100644 index 000000000..bdb91ee23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_errorable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicErrorable +type PublicErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDetails()([]PublicErrorDetailable) + GetInnerError()(PublicInnerErrorable) + GetMessage()(*string) + GetOdataType()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetDetails(value []PublicErrorDetailable)() + SetInnerError(value PublicInnerErrorable)() + SetMessage(value *string)() + SetOdataType(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/public_inner_error.go b/src/internal/connector/graph/betasdk/models/public_inner_error.go new file mode 100644 index 000000000..22eb8ee74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_inner_error.go @@ -0,0 +1,183 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicInnerError +type PublicInnerError 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 error code. + code *string + // A collection of error details. + details []PublicErrorDetailable + // The error message. + message *string + // The OdataType property + odataType *string + // The target of the error. + target *string +} +// NewPublicInnerError instantiates a new publicInnerError and sets the default values. +func NewPublicInnerError()(*PublicInnerError) { + m := &PublicInnerError{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreatePublicInnerErrorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublicInnerErrorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublicInnerError(), 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 *PublicInnerError) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The error code. +func (m *PublicInnerError) GetCode()(*string) { + return m.code +} +// GetDetails gets the details property value. A collection of error details. +func (m *PublicInnerError) GetDetails()([]PublicErrorDetailable) { + return m.details +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublicInnerError) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublicErrorDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublicErrorDetailable, len(val)) + for i, v := range val { + res[i] = v.(PublicErrorDetailable) + } + m.SetDetails(res) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTarget(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The error message. +func (m *PublicInnerError) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *PublicInnerError) GetOdataType()(*string) { + return m.odataType +} +// GetTarget gets the target property value. The target of the error. +func (m *PublicInnerError) GetTarget()(*string) { + return m.target +} +// Serialize serializes information the current object +func (m *PublicInnerError) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("code", m.GetCode()) + if err != nil { + return err + } + } + if m.GetDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetails())) + for i, v := range m.GetDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("details", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("target", m.GetTarget()) + 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 *PublicInnerError) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The error code. +func (m *PublicInnerError) SetCode(value *string)() { + m.code = value +} +// SetDetails sets the details property value. A collection of error details. +func (m *PublicInnerError) SetDetails(value []PublicErrorDetailable)() { + m.details = value +} +// SetMessage sets the message property value. The error message. +func (m *PublicInnerError) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *PublicInnerError) SetOdataType(value *string)() { + m.odataType = value +} +// SetTarget sets the target property value. The target of the error. +func (m *PublicInnerError) SetTarget(value *string)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/public_inner_errorable.go b/src/internal/connector/graph/betasdk/models/public_inner_errorable.go new file mode 100644 index 000000000..5172e7845 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/public_inner_errorable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicInnerErrorable +type PublicInnerErrorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*string) + GetDetails()([]PublicErrorDetailable) + GetMessage()(*string) + GetOdataType()(*string) + GetTarget()(*string) + SetCode(value *string)() + SetDetails(value []PublicErrorDetailable)() + SetMessage(value *string)() + SetOdataType(value *string)() + SetTarget(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/publication_facet.go b/src/internal/connector/graph/betasdk/models/publication_facet.go new file mode 100644 index 000000000..87e59d34b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/publication_facet.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// 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 +} +// NewPublicationFacet instantiates a new publicationFacet and sets the default values. +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 +} +// 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 +} +// 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 +} +// 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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +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 +} +// 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 +} +// 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 +} +// 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 +} +// SetOdataType sets the @odata.type property value. The OdataType property +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 +} diff --git a/src/internal/connector/graph/betasdk/models/publication_facetable.go b/src/internal/connector/graph/betasdk/models/publication_facetable.go new file mode 100644 index 000000000..20d82ccf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/publication_facetable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublicationFacetable +type PublicationFacetable interface { + 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/published_resource.go b/src/internal/connector/graph/betasdk/models/published_resource.go new file mode 100644 index 000000000..e5322c95a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/published_resource.go @@ -0,0 +1,147 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublishedResource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PublishedResource struct { + Entity + // List of onPremisesAgentGroups that a publishedResource is assigned to. Read-only. Nullable. + agentGroups []OnPremisesAgentGroupable + // Display Name of the publishedResource. + displayName *string + // The publishingType property + publishingType *OnPremisesPublishingType + // Name of the publishedResource. + resourceName *string +} +// NewPublishedResource instantiates a new publishedResource and sets the default values. +func NewPublishedResource()(*PublishedResource) { + m := &PublishedResource{ + Entity: *NewEntity(), + } + return m +} +// CreatePublishedResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublishedResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublishedResource(), nil +} +// GetAgentGroups gets the agentGroups property value. List of onPremisesAgentGroups that a publishedResource is assigned to. Read-only. Nullable. +func (m *PublishedResource) GetAgentGroups()([]OnPremisesAgentGroupable) { + return m.agentGroups +} +// GetDisplayName gets the displayName property value. Display Name of the publishedResource. +func (m *PublishedResource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublishedResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["agentGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnPremisesAgentGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnPremisesAgentGroupable, len(val)) + for i, v := range val { + res[i] = v.(OnPremisesAgentGroupable) + } + m.SetAgentGroups(res) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["publishingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnPremisesPublishingType) + if err != nil { + return err + } + if val != nil { + m.SetPublishingType(val.(*OnPremisesPublishingType)) + } + return nil + } + res["resourceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceName(val) + } + return nil + } + return res +} +// GetPublishingType gets the publishingType property value. The publishingType property +func (m *PublishedResource) GetPublishingType()(*OnPremisesPublishingType) { + return m.publishingType +} +// GetResourceName gets the resourceName property value. Name of the publishedResource. +func (m *PublishedResource) GetResourceName()(*string) { + return m.resourceName +} +// Serialize serializes information the current object +func (m *PublishedResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAgentGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAgentGroups())) + for i, v := range m.GetAgentGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("agentGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetPublishingType() != nil { + cast := (*m.GetPublishingType()).String() + err = writer.WriteStringValue("publishingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceName", m.GetResourceName()) + if err != nil { + return err + } + } + return nil +} +// SetAgentGroups sets the agentGroups property value. List of onPremisesAgentGroups that a publishedResource is assigned to. Read-only. Nullable. +func (m *PublishedResource) SetAgentGroups(value []OnPremisesAgentGroupable)() { + m.agentGroups = value +} +// SetDisplayName sets the displayName property value. Display Name of the publishedResource. +func (m *PublishedResource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPublishingType sets the publishingType property value. The publishingType property +func (m *PublishedResource) SetPublishingType(value *OnPremisesPublishingType)() { + m.publishingType = value +} +// SetResourceName sets the resourceName property value. Name of the publishedResource. +func (m *PublishedResource) SetResourceName(value *string)() { + m.resourceName = value +} diff --git a/src/internal/connector/graph/betasdk/models/published_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/published_resource_collection_response.go new file mode 100644 index 000000000..d9cf338e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/published_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublishedResourceCollectionResponse +type PublishedResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PublishedResourceable +} +// NewPublishedResourceCollectionResponse instantiates a new PublishedResourceCollectionResponse and sets the default values. +func NewPublishedResourceCollectionResponse()(*PublishedResourceCollectionResponse) { + m := &PublishedResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePublishedResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePublishedResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPublishedResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PublishedResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePublishedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PublishedResourceable, len(val)) + for i, v := range val { + res[i] = v.(PublishedResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PublishedResourceCollectionResponse) GetValue()([]PublishedResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PublishedResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PublishedResourceCollectionResponse) SetValue(value []PublishedResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/published_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/published_resource_collection_responseable.go new file mode 100644 index 000000000..592d1ec8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/published_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublishedResourceCollectionResponseable +type PublishedResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PublishedResourceable) + SetValue(value []PublishedResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/published_resourceable.go b/src/internal/connector/graph/betasdk/models/published_resourceable.go new file mode 100644 index 000000000..c9e9d9945 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/published_resourceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PublishedResourceable +type PublishedResourceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAgentGroups()([]OnPremisesAgentGroupable) + GetDisplayName()(*string) + GetPublishingType()(*OnPremisesPublishingType) + GetResourceName()(*string) + SetAgentGroups(value []OnPremisesAgentGroupable)() + SetDisplayName(value *string)() + SetPublishingType(value *OnPremisesPublishingType)() + SetResourceName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice.go b/src/internal/connector/graph/betasdk/models/purchase_invoice.go new file mode 100644 index 000000000..be8558e88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice.go @@ -0,0 +1,798 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoice provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PurchaseInvoice struct { + Entity + // The buyFromAddress property + buyFromAddress PostalAddressTypeable + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The dueDate property + dueDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The invoiceDate property + invoiceDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The payToAddress property + payToAddress PostalAddressTypeable + // The payToContact property + payToContact *string + // The payToName property + payToName *string + // The payToVendorId property + payToVendorId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The payToVendorNumber property + payToVendorNumber *string + // The pricesIncludeTax property + pricesIncludeTax *bool + // The purchaseInvoiceLines property + purchaseInvoiceLines []PurchaseInvoiceLineable + // The shipToAddress property + shipToAddress PostalAddressTypeable + // The shipToContact property + shipToContact *string + // The shipToName property + shipToName *string + // The status property + status *string + // The totalAmountExcludingTax property + totalAmountExcludingTax *float64 + // The totalAmountIncludingTax property + totalAmountIncludingTax *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The vendor property + vendor_escaped Vendor_escapedable + // The vendorId property + vendorId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The vendorInvoiceNumber property + vendorInvoiceNumber *string + // The vendorName property + vendorName *string + // The vendorNumber property + vendorNumber *string +} +// NewPurchaseInvoice instantiates a new purchaseInvoice and sets the default values. +func NewPurchaseInvoice()(*PurchaseInvoice) { + m := &PurchaseInvoice{ + Entity: *NewEntity(), + } + return m +} +// CreatePurchaseInvoiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurchaseInvoiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurchaseInvoice(), nil +} +// GetBuyFromAddress gets the buyFromAddress property value. The buyFromAddress property +func (m *PurchaseInvoice) GetBuyFromAddress()(PostalAddressTypeable) { + return m.buyFromAddress +} +// GetCurrency gets the currency property value. The currency property +func (m *PurchaseInvoice) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *PurchaseInvoice) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *PurchaseInvoice) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *PurchaseInvoice) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *PurchaseInvoice) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDueDate gets the dueDate property value. The dueDate property +func (m *PurchaseInvoice) GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.dueDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurchaseInvoice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["buyFromAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBuyFromAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["dueDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDate(val) + } + return nil + } + res["invoiceDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDate(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["payToAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPayToAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["payToContact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayToContact(val) + } + return nil + } + res["payToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayToName(val) + } + return nil + } + res["payToVendorId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPayToVendorId(val) + } + return nil + } + res["payToVendorNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPayToVendorNumber(val) + } + return nil + } + res["pricesIncludeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPricesIncludeTax(val) + } + return nil + } + res["purchaseInvoiceLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurchaseInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurchaseInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(PurchaseInvoiceLineable) + } + m.SetPurchaseInvoiceLines(res) + } + return nil + } + res["shipToAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShipToAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shipToContact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToContact(val) + } + return nil + } + res["shipToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["totalAmountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountExcludingTax(val) + } + return nil + } + res["totalAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountIncludingTax(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVendor_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendor(val.(Vendor_escapedable)) + } + return nil + } + res["vendorId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetVendorId(val) + } + return nil + } + res["vendorInvoiceNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendorInvoiceNumber(val) + } + return nil + } + res["vendorName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendorName(val) + } + return nil + } + res["vendorNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendorNumber(val) + } + return nil + } + return res +} +// GetInvoiceDate gets the invoiceDate property value. The invoiceDate property +func (m *PurchaseInvoice) GetInvoiceDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.invoiceDate +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PurchaseInvoice) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *PurchaseInvoice) GetNumber()(*string) { + return m.number +} +// GetPayToAddress gets the payToAddress property value. The payToAddress property +func (m *PurchaseInvoice) GetPayToAddress()(PostalAddressTypeable) { + return m.payToAddress +} +// GetPayToContact gets the payToContact property value. The payToContact property +func (m *PurchaseInvoice) GetPayToContact()(*string) { + return m.payToContact +} +// GetPayToName gets the payToName property value. The payToName property +func (m *PurchaseInvoice) GetPayToName()(*string) { + return m.payToName +} +// GetPayToVendorId gets the payToVendorId property value. The payToVendorId property +func (m *PurchaseInvoice) GetPayToVendorId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.payToVendorId +} +// GetPayToVendorNumber gets the payToVendorNumber property value. The payToVendorNumber property +func (m *PurchaseInvoice) GetPayToVendorNumber()(*string) { + return m.payToVendorNumber +} +// GetPricesIncludeTax gets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *PurchaseInvoice) GetPricesIncludeTax()(*bool) { + return m.pricesIncludeTax +} +// GetPurchaseInvoiceLines gets the purchaseInvoiceLines property value. The purchaseInvoiceLines property +func (m *PurchaseInvoice) GetPurchaseInvoiceLines()([]PurchaseInvoiceLineable) { + return m.purchaseInvoiceLines +} +// GetShipToAddress gets the shipToAddress property value. The shipToAddress property +func (m *PurchaseInvoice) GetShipToAddress()(PostalAddressTypeable) { + return m.shipToAddress +} +// GetShipToContact gets the shipToContact property value. The shipToContact property +func (m *PurchaseInvoice) GetShipToContact()(*string) { + return m.shipToContact +} +// GetShipToName gets the shipToName property value. The shipToName property +func (m *PurchaseInvoice) GetShipToName()(*string) { + return m.shipToName +} +// GetStatus gets the status property value. The status property +func (m *PurchaseInvoice) GetStatus()(*string) { + return m.status +} +// GetTotalAmountExcludingTax gets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *PurchaseInvoice) GetTotalAmountExcludingTax()(*float64) { + return m.totalAmountExcludingTax +} +// GetTotalAmountIncludingTax gets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *PurchaseInvoice) GetTotalAmountIncludingTax()(*float64) { + return m.totalAmountIncludingTax +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *PurchaseInvoice) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetVendor gets the vendor property value. The vendor property +func (m *PurchaseInvoice) GetVendor()(Vendor_escapedable) { + return m.vendor_escaped +} +// GetVendorId gets the vendorId property value. The vendorId property +func (m *PurchaseInvoice) GetVendorId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.vendorId +} +// GetVendorInvoiceNumber gets the vendorInvoiceNumber property value. The vendorInvoiceNumber property +func (m *PurchaseInvoice) GetVendorInvoiceNumber()(*string) { + return m.vendorInvoiceNumber +} +// GetVendorName gets the vendorName property value. The vendorName property +func (m *PurchaseInvoice) GetVendorName()(*string) { + return m.vendorName +} +// GetVendorNumber gets the vendorNumber property value. The vendorNumber property +func (m *PurchaseInvoice) GetVendorNumber()(*string) { + return m.vendorNumber +} +// Serialize serializes information the current object +func (m *PurchaseInvoice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("buyFromAddress", m.GetBuyFromAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("dueDate", m.GetDueDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("invoiceDate", m.GetInvoiceDate()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("payToAddress", m.GetPayToAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payToContact", m.GetPayToContact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payToName", m.GetPayToName()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("payToVendorId", m.GetPayToVendorId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("payToVendorNumber", m.GetPayToVendorNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pricesIncludeTax", m.GetPricesIncludeTax()) + if err != nil { + return err + } + } + if m.GetPurchaseInvoiceLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPurchaseInvoiceLines())) + for i, v := range m.GetPurchaseInvoiceLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("purchaseInvoiceLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shipToAddress", m.GetShipToAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToContact", m.GetShipToContact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToName", m.GetShipToName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountExcludingTax", m.GetTotalAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountIncludingTax", m.GetTotalAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("vendorId", m.GetVendorId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vendorInvoiceNumber", m.GetVendorInvoiceNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vendorName", m.GetVendorName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("vendorNumber", m.GetVendorNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendor", m.GetVendor()) + if err != nil { + return err + } + } + return nil +} +// SetBuyFromAddress sets the buyFromAddress property value. The buyFromAddress property +func (m *PurchaseInvoice) SetBuyFromAddress(value PostalAddressTypeable)() { + m.buyFromAddress = value +} +// SetCurrency sets the currency property value. The currency property +func (m *PurchaseInvoice) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *PurchaseInvoice) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *PurchaseInvoice) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *PurchaseInvoice) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *PurchaseInvoice) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDueDate sets the dueDate property value. The dueDate property +func (m *PurchaseInvoice) SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.dueDate = value +} +// SetInvoiceDate sets the invoiceDate property value. The invoiceDate property +func (m *PurchaseInvoice) SetInvoiceDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.invoiceDate = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PurchaseInvoice) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *PurchaseInvoice) SetNumber(value *string)() { + m.number = value +} +// SetPayToAddress sets the payToAddress property value. The payToAddress property +func (m *PurchaseInvoice) SetPayToAddress(value PostalAddressTypeable)() { + m.payToAddress = value +} +// SetPayToContact sets the payToContact property value. The payToContact property +func (m *PurchaseInvoice) SetPayToContact(value *string)() { + m.payToContact = value +} +// SetPayToName sets the payToName property value. The payToName property +func (m *PurchaseInvoice) SetPayToName(value *string)() { + m.payToName = value +} +// SetPayToVendorId sets the payToVendorId property value. The payToVendorId property +func (m *PurchaseInvoice) SetPayToVendorId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.payToVendorId = value +} +// SetPayToVendorNumber sets the payToVendorNumber property value. The payToVendorNumber property +func (m *PurchaseInvoice) SetPayToVendorNumber(value *string)() { + m.payToVendorNumber = value +} +// SetPricesIncludeTax sets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *PurchaseInvoice) SetPricesIncludeTax(value *bool)() { + m.pricesIncludeTax = value +} +// SetPurchaseInvoiceLines sets the purchaseInvoiceLines property value. The purchaseInvoiceLines property +func (m *PurchaseInvoice) SetPurchaseInvoiceLines(value []PurchaseInvoiceLineable)() { + m.purchaseInvoiceLines = value +} +// SetShipToAddress sets the shipToAddress property value. The shipToAddress property +func (m *PurchaseInvoice) SetShipToAddress(value PostalAddressTypeable)() { + m.shipToAddress = value +} +// SetShipToContact sets the shipToContact property value. The shipToContact property +func (m *PurchaseInvoice) SetShipToContact(value *string)() { + m.shipToContact = value +} +// SetShipToName sets the shipToName property value. The shipToName property +func (m *PurchaseInvoice) SetShipToName(value *string)() { + m.shipToName = value +} +// SetStatus sets the status property value. The status property +func (m *PurchaseInvoice) SetStatus(value *string)() { + m.status = value +} +// SetTotalAmountExcludingTax sets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *PurchaseInvoice) SetTotalAmountExcludingTax(value *float64)() { + m.totalAmountExcludingTax = value +} +// SetTotalAmountIncludingTax sets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *PurchaseInvoice) SetTotalAmountIncludingTax(value *float64)() { + m.totalAmountIncludingTax = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *PurchaseInvoice) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *PurchaseInvoice) SetVendor(value Vendor_escapedable)() { + m.vendor_escaped = value +} +// SetVendorId sets the vendorId property value. The vendorId property +func (m *PurchaseInvoice) SetVendorId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.vendorId = value +} +// SetVendorInvoiceNumber sets the vendorInvoiceNumber property value. The vendorInvoiceNumber property +func (m *PurchaseInvoice) SetVendorInvoiceNumber(value *string)() { + m.vendorInvoiceNumber = value +} +// SetVendorName sets the vendorName property value. The vendorName property +func (m *PurchaseInvoice) SetVendorName(value *string)() { + m.vendorName = value +} +// SetVendorNumber sets the vendorNumber property value. The vendorNumber property +func (m *PurchaseInvoice) SetVendorNumber(value *string)() { + m.vendorNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_response.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_response.go new file mode 100644 index 000000000..beecfee4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceCollectionResponse +type PurchaseInvoiceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PurchaseInvoiceable +} +// NewPurchaseInvoiceCollectionResponse instantiates a new PurchaseInvoiceCollectionResponse and sets the default values. +func NewPurchaseInvoiceCollectionResponse()(*PurchaseInvoiceCollectionResponse) { + m := &PurchaseInvoiceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePurchaseInvoiceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurchaseInvoiceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurchaseInvoiceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurchaseInvoiceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurchaseInvoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurchaseInvoiceable, len(val)) + for i, v := range val { + res[i] = v.(PurchaseInvoiceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PurchaseInvoiceCollectionResponse) GetValue()([]PurchaseInvoiceable) { + return m.value +} +// Serialize serializes information the current object +func (m *PurchaseInvoiceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PurchaseInvoiceCollectionResponse) SetValue(value []PurchaseInvoiceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_responseable.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_responseable.go new file mode 100644 index 000000000..130d2e211 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceCollectionResponseable +type PurchaseInvoiceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PurchaseInvoiceable) + SetValue(value []PurchaseInvoiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_line.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_line.go new file mode 100644 index 000000000..10499c8df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_line.go @@ -0,0 +1,633 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PurchaseInvoiceLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The amountExcludingTax property + amountExcludingTax *float64 + // The amountIncludingTax property + amountIncludingTax *float64 + // The description property + description *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The discountPercent property + discountPercent *float64 + // The documentId property + documentId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The expectedReceiptDate property + expectedReceiptDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The invoiceDiscountAllocation property + invoiceDiscountAllocation *float64 + // The item property + item Itemable + // The itemId property + itemId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lineType property + lineType *string + // The netAmount property + netAmount *float64 + // The netAmountIncludingTax property + netAmountIncludingTax *float64 + // The netTaxAmount property + netTaxAmount *float64 + // The quantity property + quantity *float64 + // The sequence property + sequence *int32 + // The taxCode property + taxCode *string + // The taxPercent property + taxPercent *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The unitCost property + unitCost *float64 +} +// NewPurchaseInvoiceLine instantiates a new purchaseInvoiceLine and sets the default values. +func NewPurchaseInvoiceLine()(*PurchaseInvoiceLine) { + m := &PurchaseInvoiceLine{ + Entity: *NewEntity(), + } + return m +} +// CreatePurchaseInvoiceLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurchaseInvoiceLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurchaseInvoiceLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *PurchaseInvoiceLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *PurchaseInvoiceLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAmountExcludingTax gets the amountExcludingTax property value. The amountExcludingTax property +func (m *PurchaseInvoiceLine) GetAmountExcludingTax()(*float64) { + return m.amountExcludingTax +} +// GetAmountIncludingTax gets the amountIncludingTax property value. The amountIncludingTax property +func (m *PurchaseInvoiceLine) GetAmountIncludingTax()(*float64) { + return m.amountIncludingTax +} +// GetDescription gets the description property value. The description property +func (m *PurchaseInvoiceLine) GetDescription()(*string) { + return m.description +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *PurchaseInvoiceLine) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *PurchaseInvoiceLine) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *PurchaseInvoiceLine) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDocumentId gets the documentId property value. The documentId property +func (m *PurchaseInvoiceLine) GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.documentId +} +// GetExpectedReceiptDate gets the expectedReceiptDate property value. The expectedReceiptDate property +func (m *PurchaseInvoiceLine) GetExpectedReceiptDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.expectedReceiptDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurchaseInvoiceLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["amountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountExcludingTax(val) + } + return nil + } + res["amountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountIncludingTax(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["documentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["expectedReceiptDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetExpectedReceiptDate(val) + } + return nil + } + res["invoiceDiscountAllocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDiscountAllocation(val) + } + return nil + } + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(Itemable)) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["lineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLineType(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["netAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmountIncludingTax(val) + } + return nil + } + res["netTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetTaxAmount(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["taxCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxCode(val) + } + return nil + } + res["taxPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTaxPercent(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["unitCost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitCost(val) + } + return nil + } + return res +} +// GetInvoiceDiscountAllocation gets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *PurchaseInvoiceLine) GetInvoiceDiscountAllocation()(*float64) { + return m.invoiceDiscountAllocation +} +// GetItem gets the item property value. The item property +func (m *PurchaseInvoiceLine) GetItem()(Itemable) { + return m.item +} +// GetItemId gets the itemId property value. The itemId property +func (m *PurchaseInvoiceLine) GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemId +} +// GetLineType gets the lineType property value. The lineType property +func (m *PurchaseInvoiceLine) GetLineType()(*string) { + return m.lineType +} +// GetNetAmount gets the netAmount property value. The netAmount property +func (m *PurchaseInvoiceLine) GetNetAmount()(*float64) { + return m.netAmount +} +// GetNetAmountIncludingTax gets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *PurchaseInvoiceLine) GetNetAmountIncludingTax()(*float64) { + return m.netAmountIncludingTax +} +// GetNetTaxAmount gets the netTaxAmount property value. The netTaxAmount property +func (m *PurchaseInvoiceLine) GetNetTaxAmount()(*float64) { + return m.netTaxAmount +} +// GetQuantity gets the quantity property value. The quantity property +func (m *PurchaseInvoiceLine) GetQuantity()(*float64) { + return m.quantity +} +// GetSequence gets the sequence property value. The sequence property +func (m *PurchaseInvoiceLine) GetSequence()(*int32) { + return m.sequence +} +// GetTaxCode gets the taxCode property value. The taxCode property +func (m *PurchaseInvoiceLine) GetTaxCode()(*string) { + return m.taxCode +} +// GetTaxPercent gets the taxPercent property value. The taxPercent property +func (m *PurchaseInvoiceLine) GetTaxPercent()(*float64) { + return m.taxPercent +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *PurchaseInvoiceLine) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetUnitCost gets the unitCost property value. The unitCost property +func (m *PurchaseInvoiceLine) GetUnitCost()(*float64) { + return m.unitCost +} +// Serialize serializes information the current object +func (m *PurchaseInvoiceLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountExcludingTax", m.GetAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountIncludingTax", m.GetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("documentId", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("expectedReceiptDate", m.GetExpectedReceiptDate()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceDiscountAllocation", m.GetInvoiceDiscountAllocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lineType", m.GetLineType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmountIncludingTax", m.GetNetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netTaxAmount", m.GetNetTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxCode", m.GetTaxCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("taxPercent", m.GetTaxPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitCost", m.GetUnitCost()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *PurchaseInvoiceLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *PurchaseInvoiceLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAmountExcludingTax sets the amountExcludingTax property value. The amountExcludingTax property +func (m *PurchaseInvoiceLine) SetAmountExcludingTax(value *float64)() { + m.amountExcludingTax = value +} +// SetAmountIncludingTax sets the amountIncludingTax property value. The amountIncludingTax property +func (m *PurchaseInvoiceLine) SetAmountIncludingTax(value *float64)() { + m.amountIncludingTax = value +} +// SetDescription sets the description property value. The description property +func (m *PurchaseInvoiceLine) SetDescription(value *string)() { + m.description = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *PurchaseInvoiceLine) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *PurchaseInvoiceLine) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *PurchaseInvoiceLine) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDocumentId sets the documentId property value. The documentId property +func (m *PurchaseInvoiceLine) SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.documentId = value +} +// SetExpectedReceiptDate sets the expectedReceiptDate property value. The expectedReceiptDate property +func (m *PurchaseInvoiceLine) SetExpectedReceiptDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.expectedReceiptDate = value +} +// SetInvoiceDiscountAllocation sets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *PurchaseInvoiceLine) SetInvoiceDiscountAllocation(value *float64)() { + m.invoiceDiscountAllocation = value +} +// SetItem sets the item property value. The item property +func (m *PurchaseInvoiceLine) SetItem(value Itemable)() { + m.item = value +} +// SetItemId sets the itemId property value. The itemId property +func (m *PurchaseInvoiceLine) SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemId = value +} +// SetLineType sets the lineType property value. The lineType property +func (m *PurchaseInvoiceLine) SetLineType(value *string)() { + m.lineType = value +} +// SetNetAmount sets the netAmount property value. The netAmount property +func (m *PurchaseInvoiceLine) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetNetAmountIncludingTax sets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *PurchaseInvoiceLine) SetNetAmountIncludingTax(value *float64)() { + m.netAmountIncludingTax = value +} +// SetNetTaxAmount sets the netTaxAmount property value. The netTaxAmount property +func (m *PurchaseInvoiceLine) SetNetTaxAmount(value *float64)() { + m.netTaxAmount = value +} +// SetQuantity sets the quantity property value. The quantity property +func (m *PurchaseInvoiceLine) SetQuantity(value *float64)() { + m.quantity = value +} +// SetSequence sets the sequence property value. The sequence property +func (m *PurchaseInvoiceLine) SetSequence(value *int32)() { + m.sequence = value +} +// SetTaxCode sets the taxCode property value. The taxCode property +func (m *PurchaseInvoiceLine) SetTaxCode(value *string)() { + m.taxCode = value +} +// SetTaxPercent sets the taxPercent property value. The taxPercent property +func (m *PurchaseInvoiceLine) SetTaxPercent(value *float64)() { + m.taxPercent = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *PurchaseInvoiceLine) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetUnitCost sets the unitCost property value. The unitCost property +func (m *PurchaseInvoiceLine) SetUnitCost(value *float64)() { + m.unitCost = value +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_response.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_response.go new file mode 100644 index 000000000..a69c132d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceLineCollectionResponse +type PurchaseInvoiceLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []PurchaseInvoiceLineable +} +// NewPurchaseInvoiceLineCollectionResponse instantiates a new PurchaseInvoiceLineCollectionResponse and sets the default values. +func NewPurchaseInvoiceLineCollectionResponse()(*PurchaseInvoiceLineCollectionResponse) { + m := &PurchaseInvoiceLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreatePurchaseInvoiceLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePurchaseInvoiceLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewPurchaseInvoiceLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PurchaseInvoiceLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePurchaseInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PurchaseInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(PurchaseInvoiceLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *PurchaseInvoiceLineCollectionResponse) GetValue()([]PurchaseInvoiceLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *PurchaseInvoiceLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *PurchaseInvoiceLineCollectionResponse) SetValue(value []PurchaseInvoiceLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_responseable.go new file mode 100644 index 000000000..9e762589b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceLineCollectionResponseable +type PurchaseInvoiceLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]PurchaseInvoiceLineable) + SetValue(value []PurchaseInvoiceLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoice_lineable.go b/src/internal/connector/graph/betasdk/models/purchase_invoice_lineable.go new file mode 100644 index 000000000..959eaab6b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoice_lineable.go @@ -0,0 +1,58 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceLineable +type PurchaseInvoiceLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAmountExcludingTax()(*float64) + GetAmountIncludingTax()(*float64) + GetDescription()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDiscountPercent()(*float64) + GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetExpectedReceiptDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetInvoiceDiscountAllocation()(*float64) + GetItem()(Itemable) + GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLineType()(*string) + GetNetAmount()(*float64) + GetNetAmountIncludingTax()(*float64) + GetNetTaxAmount()(*float64) + GetQuantity()(*float64) + GetSequence()(*int32) + GetTaxCode()(*string) + GetTaxPercent()(*float64) + GetTotalTaxAmount()(*float64) + GetUnitCost()(*float64) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAmountExcludingTax(value *float64)() + SetAmountIncludingTax(value *float64)() + SetDescription(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDiscountPercent(value *float64)() + SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetExpectedReceiptDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetInvoiceDiscountAllocation(value *float64)() + SetItem(value Itemable)() + SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLineType(value *string)() + SetNetAmount(value *float64)() + SetNetAmountIncludingTax(value *float64)() + SetNetTaxAmount(value *float64)() + SetQuantity(value *float64)() + SetSequence(value *int32)() + SetTaxCode(value *string)() + SetTaxPercent(value *float64)() + SetTotalTaxAmount(value *float64)() + SetUnitCost(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/purchase_invoiceable.go b/src/internal/connector/graph/betasdk/models/purchase_invoiceable.go new file mode 100644 index 000000000..f5baafe1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/purchase_invoiceable.go @@ -0,0 +1,71 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// PurchaseInvoiceable +type PurchaseInvoiceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuyFromAddress()(PostalAddressTypeable) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetInvoiceDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetPayToAddress()(PostalAddressTypeable) + GetPayToContact()(*string) + GetPayToName()(*string) + GetPayToVendorId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPayToVendorNumber()(*string) + GetPricesIncludeTax()(*bool) + GetPurchaseInvoiceLines()([]PurchaseInvoiceLineable) + GetShipToAddress()(PostalAddressTypeable) + GetShipToContact()(*string) + GetShipToName()(*string) + GetStatus()(*string) + GetTotalAmountExcludingTax()(*float64) + GetTotalAmountIncludingTax()(*float64) + GetTotalTaxAmount()(*float64) + GetVendor()(Vendor_escapedable) + GetVendorId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetVendorInvoiceNumber()(*string) + GetVendorName()(*string) + GetVendorNumber()(*string) + SetBuyFromAddress(value PostalAddressTypeable)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetInvoiceDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetPayToAddress(value PostalAddressTypeable)() + SetPayToContact(value *string)() + SetPayToName(value *string)() + SetPayToVendorId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPayToVendorNumber(value *string)() + SetPricesIncludeTax(value *bool)() + SetPurchaseInvoiceLines(value []PurchaseInvoiceLineable)() + SetShipToAddress(value PostalAddressTypeable)() + SetShipToContact(value *string)() + SetShipToName(value *string)() + SetStatus(value *string)() + SetTotalAmountExcludingTax(value *float64)() + SetTotalAmountIncludingTax(value *float64)() + SetTotalTaxAmount(value *float64)() + SetVendor(value Vendor_escapedable)() + SetVendorId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetVendorInvoiceNumber(value *string)() + SetVendorName(value *string)() + SetVendorNumber(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/quarantine_reason.go b/src/internal/connector/graph/betasdk/models/quarantine_reason.go new file mode 100644 index 000000000..b3cf852e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/quarantine_reason.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type QuarantineReason int + +const ( + ENCOUNTEREDBASEESCROWTHRESHOLD_QUARANTINEREASON QuarantineReason = iota + ENCOUNTEREDTOTALESCROWTHRESHOLD_QUARANTINEREASON + ENCOUNTEREDESCROWPROPORTIONTHRESHOLD_QUARANTINEREASON + ENCOUNTEREDQUARANTINEEXCEPTION_QUARANTINEREASON + UNKNOWN_QUARANTINEREASON + QUARANTINEDONDEMAND_QUARANTINEREASON + TOOMANYDELETES_QUARANTINEREASON + INGESTIONINTERRUPTED_QUARANTINEREASON +) + +func (i QuarantineReason) String() string { + return []string{"EncounteredBaseEscrowThreshold", "EncounteredTotalEscrowThreshold", "EncounteredEscrowProportionThreshold", "EncounteredQuarantineException", "Unknown", "QuarantinedOnDemand", "TooManyDeletes", "IngestionInterrupted"}[i] +} +func ParseQuarantineReason(v string) (interface{}, error) { + result := ENCOUNTEREDBASEESCROWTHRESHOLD_QUARANTINEREASON + switch v { + case "EncounteredBaseEscrowThreshold": + result = ENCOUNTEREDBASEESCROWTHRESHOLD_QUARANTINEREASON + case "EncounteredTotalEscrowThreshold": + result = ENCOUNTEREDTOTALESCROWTHRESHOLD_QUARANTINEREASON + case "EncounteredEscrowProportionThreshold": + result = ENCOUNTEREDESCROWPROPORTIONTHRESHOLD_QUARANTINEREASON + case "EncounteredQuarantineException": + result = ENCOUNTEREDQUARANTINEEXCEPTION_QUARANTINEREASON + case "Unknown": + result = UNKNOWN_QUARANTINEREASON + case "QuarantinedOnDemand": + result = QUARANTINEDONDEMAND_QUARANTINEREASON + case "TooManyDeletes": + result = TOOMANYDELETES_QUARANTINEREASON + case "IngestionInterrupted": + result = INGESTIONINTERRUPTED_QUARANTINEREASON + default: + return 0, errors.New("Unknown QuarantineReason value: " + v) + } + return &result, nil +} +func SerializeQuarantineReason(values []QuarantineReason) []string { + 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/quota.go b/src/internal/connector/graph/betasdk/models/quota.go new file mode 100644 index 000000000..92b373414 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/quota.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Quota +type Quota struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Total space consumed by files in the recycle bin, in bytes. Read-only. + deleted *int64 + // The OdataType property + odataType *string + // Total space remaining before reaching the quota limit, in bytes. Read-only. + remaining *int64 + // Enumeration value that indicates the state of the storage space. Read-only. + state *string + // Information about the drive's storage quota plans. Only in Personal OneDrive. + storagePlanInformation StoragePlanInformationable + // Total allowed storage space, in bytes. Read-only. + total *int64 + // Total space used, in bytes. Read-only. + used *int64 +} +// NewQuota instantiates a new quota and sets the default values. +func NewQuota()(*Quota) { + m := &Quota{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateQuotaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQuotaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewQuota(), 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 *Quota) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDeleted gets the deleted property value. Total space consumed by files in the recycle bin, in bytes. Read-only. +func (m *Quota) GetDeleted()(*int64) { + return m.deleted +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Quota) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["deleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDeleted(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["remaining"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetRemaining(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["storagePlanInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStoragePlanInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStoragePlanInformation(val.(StoragePlanInformationable)) + } + return nil + } + res["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + res["used"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUsed(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Quota) GetOdataType()(*string) { + return m.odataType +} +// GetRemaining gets the remaining property value. Total space remaining before reaching the quota limit, in bytes. Read-only. +func (m *Quota) GetRemaining()(*int64) { + return m.remaining +} +// GetState gets the state property value. Enumeration value that indicates the state of the storage space. Read-only. +func (m *Quota) GetState()(*string) { + return m.state +} +// GetStoragePlanInformation gets the storagePlanInformation property value. Information about the drive's storage quota plans. Only in Personal OneDrive. +func (m *Quota) GetStoragePlanInformation()(StoragePlanInformationable) { + return m.storagePlanInformation +} +// GetTotal gets the total property value. Total allowed storage space, in bytes. Read-only. +func (m *Quota) GetTotal()(*int64) { + return m.total +} +// GetUsed gets the used property value. Total space used, in bytes. Read-only. +func (m *Quota) GetUsed()(*int64) { + return m.used +} +// Serialize serializes information the current object +func (m *Quota) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("deleted", m.GetDeleted()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("remaining", m.GetRemaining()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("storagePlanInformation", m.GetStoragePlanInformation()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("total", m.GetTotal()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("used", m.GetUsed()) + 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 *Quota) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDeleted sets the deleted property value. Total space consumed by files in the recycle bin, in bytes. Read-only. +func (m *Quota) SetDeleted(value *int64)() { + m.deleted = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Quota) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemaining sets the remaining property value. Total space remaining before reaching the quota limit, in bytes. Read-only. +func (m *Quota) SetRemaining(value *int64)() { + m.remaining = value +} +// SetState sets the state property value. Enumeration value that indicates the state of the storage space. Read-only. +func (m *Quota) SetState(value *string)() { + m.state = value +} +// SetStoragePlanInformation sets the storagePlanInformation property value. Information about the drive's storage quota plans. Only in Personal OneDrive. +func (m *Quota) SetStoragePlanInformation(value StoragePlanInformationable)() { + m.storagePlanInformation = value +} +// SetTotal sets the total property value. Total allowed storage space, in bytes. Read-only. +func (m *Quota) SetTotal(value *int64)() { + m.total = value +} +// SetUsed sets the used property value. Total space used, in bytes. Read-only. +func (m *Quota) SetUsed(value *int64)() { + m.used = value +} diff --git a/src/internal/connector/graph/betasdk/models/quotaable.go b/src/internal/connector/graph/betasdk/models/quotaable.go new file mode 100644 index 000000000..0e5cbc7ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/quotaable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Quotaable +type Quotaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeleted()(*int64) + GetOdataType()(*string) + GetRemaining()(*int64) + GetState()(*string) + GetStoragePlanInformation()(StoragePlanInformationable) + GetTotal()(*int64) + GetUsed()(*int64) + SetDeleted(value *int64)() + SetOdataType(value *string)() + SetRemaining(value *int64)() + SetState(value *string)() + SetStoragePlanInformation(value StoragePlanInformationable)() + SetTotal(value *int64)() + SetUsed(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/ranked_email_address.go b/src/internal/connector/graph/betasdk/models/ranked_email_address.go new file mode 100644 index 000000000..5de67ae9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ranked_email_address.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RankedEmailAddress +type RankedEmailAddress 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 email address. + address *string + // The OdataType property + odataType *string + // The rank of the email address. A rank is used as a sort key, in relation to the other returned results. A higher rank value corresponds to a more relevant result. Relevance is determined by communication, collaboration, and business relationship signals. + rank *float64 +} +// NewRankedEmailAddress instantiates a new rankedEmailAddress and sets the default values. +func NewRankedEmailAddress()(*RankedEmailAddress) { + m := &RankedEmailAddress{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRankedEmailAddressFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRankedEmailAddressFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRankedEmailAddress(), 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 *RankedEmailAddress) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAddress gets the address property value. The email address. +func (m *RankedEmailAddress) GetAddress()(*string) { + return m.address +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RankedEmailAddress) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["address"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAddress(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["rank"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetRank(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RankedEmailAddress) GetOdataType()(*string) { + return m.odataType +} +// GetRank gets the rank property value. The rank of the email address. A rank is used as a sort key, in relation to the other returned results. A higher rank value corresponds to a more relevant result. Relevance is determined by communication, collaboration, and business relationship signals. +func (m *RankedEmailAddress) GetRank()(*float64) { + return m.rank +} +// Serialize serializes information the current object +func (m *RankedEmailAddress) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("address", m.GetAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("rank", m.GetRank()) + 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 *RankedEmailAddress) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAddress sets the address property value. The email address. +func (m *RankedEmailAddress) SetAddress(value *string)() { + m.address = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RankedEmailAddress) SetOdataType(value *string)() { + m.odataType = value +} +// SetRank sets the rank property value. The rank of the email address. A rank is used as a sort key, in relation to the other returned results. A higher rank value corresponds to a more relevant result. Relevance is determined by communication, collaboration, and business relationship signals. +func (m *RankedEmailAddress) SetRank(value *float64)() { + m.rank = value +} diff --git a/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_response.go b/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_response.go new file mode 100644 index 000000000..caa45ddaf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RankedEmailAddressCollectionResponse +type RankedEmailAddressCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RankedEmailAddressable +} +// NewRankedEmailAddressCollectionResponse instantiates a new RankedEmailAddressCollectionResponse and sets the default values. +func NewRankedEmailAddressCollectionResponse()(*RankedEmailAddressCollectionResponse) { + m := &RankedEmailAddressCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRankedEmailAddressCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRankedEmailAddressCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRankedEmailAddressCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RankedEmailAddressCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRankedEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RankedEmailAddressable, len(val)) + for i, v := range val { + res[i] = v.(RankedEmailAddressable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RankedEmailAddressCollectionResponse) GetValue()([]RankedEmailAddressable) { + return m.value +} +// Serialize serializes information the current object +func (m *RankedEmailAddressCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RankedEmailAddressCollectionResponse) SetValue(value []RankedEmailAddressable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_responseable.go b/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_responseable.go new file mode 100644 index 000000000..fa38634a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ranked_email_address_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RankedEmailAddressCollectionResponseable +type RankedEmailAddressCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RankedEmailAddressable) + SetValue(value []RankedEmailAddressable)() +} diff --git a/src/internal/connector/graph/betasdk/models/ranked_email_addressable.go b/src/internal/connector/graph/betasdk/models/ranked_email_addressable.go new file mode 100644 index 000000000..301676b6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/ranked_email_addressable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RankedEmailAddressable +type RankedEmailAddressable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAddress()(*string) + GetOdataType()(*string) + GetRank()(*float64) + SetAddress(value *string)() + SetOdataType(value *string)() + SetRank(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/rating_apps_type.go b/src/internal/connector/graph/betasdk/models/rating_apps_type.go new file mode 100644 index 000000000..9851aeb27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_apps_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingAppsType int + +const ( + // Default value, allow all apps content + ALLALLOWED_RATINGAPPSTYPE RatingAppsType = iota + // Do not allow any apps content + ALLBLOCKED_RATINGAPPSTYPE + // 4+, age 4 and above + AGESABOVE4_RATINGAPPSTYPE + // 9+, age 9 and above + AGESABOVE9_RATINGAPPSTYPE + // 12+, age 12 and above + AGESABOVE12_RATINGAPPSTYPE + // 17+, age 17 and above + AGESABOVE17_RATINGAPPSTYPE +) + +func (i RatingAppsType) String() string { + return []string{"allAllowed", "allBlocked", "agesAbove4", "agesAbove9", "agesAbove12", "agesAbove17"}[i] +} +func ParseRatingAppsType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGAPPSTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGAPPSTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGAPPSTYPE + case "agesAbove4": + result = AGESABOVE4_RATINGAPPSTYPE + case "agesAbove9": + result = AGESABOVE9_RATINGAPPSTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGAPPSTYPE + case "agesAbove17": + result = AGESABOVE17_RATINGAPPSTYPE + default: + return 0, errors.New("Unknown RatingAppsType value: " + v) + } + return &result, nil +} +func SerializeRatingAppsType(values []RatingAppsType) []string { + 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/rating_australia_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_australia_movies_type.go new file mode 100644 index 000000000..683ecb6a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_australia_movies_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingAustraliaMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGAUSTRALIAMOVIESTYPE RatingAustraliaMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGAUSTRALIAMOVIESTYPE + // The G classification is suitable for everyone + GENERAL_RATINGAUSTRALIAMOVIESTYPE + // The PG recommends viewers under 15 with guidance from parents or guardians + PARENTALGUIDANCE_RATINGAUSTRALIAMOVIESTYPE + // The M classification is not recommended for viewers under 15 + MATURE_RATINGAUSTRALIAMOVIESTYPE + // The MA15+ classification is not suitable for viewers under 15 + AGESABOVE15_RATINGAUSTRALIAMOVIESTYPE + // The R18+ classification is not suitable for viewers under 18 + AGESABOVE18_RATINGAUSTRALIAMOVIESTYPE +) + +func (i RatingAustraliaMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "mature", "agesAbove15", "agesAbove18"}[i] +} +func ParseRatingAustraliaMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGAUSTRALIAMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGAUSTRALIAMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGAUSTRALIAMOVIESTYPE + case "general": + result = GENERAL_RATINGAUSTRALIAMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGAUSTRALIAMOVIESTYPE + case "mature": + result = MATURE_RATINGAUSTRALIAMOVIESTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGAUSTRALIAMOVIESTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGAUSTRALIAMOVIESTYPE + default: + return 0, errors.New("Unknown RatingAustraliaMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingAustraliaMoviesType(values []RatingAustraliaMoviesType) []string { + 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/rating_australia_television_type.go b/src/internal/connector/graph/betasdk/models/rating_australia_television_type.go new file mode 100644 index 000000000..7b5e8459b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_australia_television_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingAustraliaTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGAUSTRALIATELEVISIONTYPE RatingAustraliaTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGAUSTRALIATELEVISIONTYPE + // The P classification is intended for preschoolers + PRESCHOOLERS_RATINGAUSTRALIATELEVISIONTYPE + // The C classification is intended for children under 14 + CHILDREN_RATINGAUSTRALIATELEVISIONTYPE + // The G classification is suitable for all ages + GENERAL_RATINGAUSTRALIATELEVISIONTYPE + // The PG classification is recommended for young viewers + PARENTALGUIDANCE_RATINGAUSTRALIATELEVISIONTYPE + // The M classification is recommended for viewers over 15 + MATURE_RATINGAUSTRALIATELEVISIONTYPE + // The MA15+ classification is not suitable for viewers under 15 + AGESABOVE15_RATINGAUSTRALIATELEVISIONTYPE + // The AV15+ classification is not suitable for viewers under 15, adult violence-specific + AGESABOVE15ADULTVIOLENCE_RATINGAUSTRALIATELEVISIONTYPE +) + +func (i RatingAustraliaTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "preschoolers", "children", "general", "parentalGuidance", "mature", "agesAbove15", "agesAbove15AdultViolence"}[i] +} +func ParseRatingAustraliaTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGAUSTRALIATELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGAUSTRALIATELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGAUSTRALIATELEVISIONTYPE + case "preschoolers": + result = PRESCHOOLERS_RATINGAUSTRALIATELEVISIONTYPE + case "children": + result = CHILDREN_RATINGAUSTRALIATELEVISIONTYPE + case "general": + result = GENERAL_RATINGAUSTRALIATELEVISIONTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGAUSTRALIATELEVISIONTYPE + case "mature": + result = MATURE_RATINGAUSTRALIATELEVISIONTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGAUSTRALIATELEVISIONTYPE + case "agesAbove15AdultViolence": + result = AGESABOVE15ADULTVIOLENCE_RATINGAUSTRALIATELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingAustraliaTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingAustraliaTelevisionType(values []RatingAustraliaTelevisionType) []string { + 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/rating_canada_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_canada_movies_type.go new file mode 100644 index 000000000..22dad3a02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_canada_movies_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingCanadaMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGCANADAMOVIESTYPE RatingCanadaMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGCANADAMOVIESTYPE + // The G classification is suitable for all ages + GENERAL_RATINGCANADAMOVIESTYPE + // The PG classification advises parental guidance + PARENTALGUIDANCE_RATINGCANADAMOVIESTYPE + // The 14A classification is suitable for viewers above 14 or older + AGESABOVE14_RATINGCANADAMOVIESTYPE + // The 18A classification is suitable for viewers above 18 or older + AGESABOVE18_RATINGCANADAMOVIESTYPE + // The R classification is restricted to 18 years and older + RESTRICTED_RATINGCANADAMOVIESTYPE +) + +func (i RatingCanadaMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "agesAbove14", "agesAbove18", "restricted"}[i] +} +func ParseRatingCanadaMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGCANADAMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGCANADAMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGCANADAMOVIESTYPE + case "general": + result = GENERAL_RATINGCANADAMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGCANADAMOVIESTYPE + case "agesAbove14": + result = AGESABOVE14_RATINGCANADAMOVIESTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGCANADAMOVIESTYPE + case "restricted": + result = RESTRICTED_RATINGCANADAMOVIESTYPE + default: + return 0, errors.New("Unknown RatingCanadaMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingCanadaMoviesType(values []RatingCanadaMoviesType) []string { + 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/rating_canada_television_type.go b/src/internal/connector/graph/betasdk/models/rating_canada_television_type.go new file mode 100644 index 000000000..653dae8a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_canada_television_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingCanadaTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGCANADATELEVISIONTYPE RatingCanadaTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGCANADATELEVISIONTYPE + // The C classification is suitable for children ages of 2 to 7 years + CHILDREN_RATINGCANADATELEVISIONTYPE + // The C8 classification is suitable for children ages 8+ + CHILDRENABOVE8_RATINGCANADATELEVISIONTYPE + // The G classification is suitable for general audience + GENERAL_RATINGCANADATELEVISIONTYPE + // PG, Parental Guidance + PARENTALGUIDANCE_RATINGCANADATELEVISIONTYPE + // The 14+ classification is intended for viewers ages 14 and older + AGESABOVE14_RATINGCANADATELEVISIONTYPE + // The 18+ classification is intended for viewers ages 18 and older + AGESABOVE18_RATINGCANADATELEVISIONTYPE +) + +func (i RatingCanadaTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "children", "childrenAbove8", "general", "parentalGuidance", "agesAbove14", "agesAbove18"}[i] +} +func ParseRatingCanadaTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGCANADATELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGCANADATELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGCANADATELEVISIONTYPE + case "children": + result = CHILDREN_RATINGCANADATELEVISIONTYPE + case "childrenAbove8": + result = CHILDRENABOVE8_RATINGCANADATELEVISIONTYPE + case "general": + result = GENERAL_RATINGCANADATELEVISIONTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGCANADATELEVISIONTYPE + case "agesAbove14": + result = AGESABOVE14_RATINGCANADATELEVISIONTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGCANADATELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingCanadaTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingCanadaTelevisionType(values []RatingCanadaTelevisionType) []string { + 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/rating_france_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_france_movies_type.go new file mode 100644 index 000000000..6c2b724f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_france_movies_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingFranceMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGFRANCEMOVIESTYPE RatingFranceMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGFRANCEMOVIESTYPE + // The 10 classification prohibits the screening of the film to minors under 10 + AGESABOVE10_RATINGFRANCEMOVIESTYPE + // The 12 classification prohibits the screening of the film to minors under 12 + AGESABOVE12_RATINGFRANCEMOVIESTYPE + // The 16 classification prohibits the screening of the film to minors under 16 + AGESABOVE16_RATINGFRANCEMOVIESTYPE + // The 18 classification prohibits the screening to minors under 18 + AGESABOVE18_RATINGFRANCEMOVIESTYPE +) + +func (i RatingFranceMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "agesAbove10", "agesAbove12", "agesAbove16", "agesAbove18"}[i] +} +func ParseRatingFranceMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGFRANCEMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGFRANCEMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGFRANCEMOVIESTYPE + case "agesAbove10": + result = AGESABOVE10_RATINGFRANCEMOVIESTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGFRANCEMOVIESTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGFRANCEMOVIESTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGFRANCEMOVIESTYPE + default: + return 0, errors.New("Unknown RatingFranceMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingFranceMoviesType(values []RatingFranceMoviesType) []string { + 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/rating_france_television_type.go b/src/internal/connector/graph/betasdk/models/rating_france_television_type.go new file mode 100644 index 000000000..819e5e8f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_france_television_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingFranceTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGFRANCETELEVISIONTYPE RatingFranceTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGFRANCETELEVISIONTYPE + // The -10 classification is not recommended for children under 10 + AGESABOVE10_RATINGFRANCETELEVISIONTYPE + // The -12 classification is not recommended for children under 12 + AGESABOVE12_RATINGFRANCETELEVISIONTYPE + // The -16 classification is not recommended for children under 16 + AGESABOVE16_RATINGFRANCETELEVISIONTYPE + // The -18 classification is not recommended for persons under 18 + AGESABOVE18_RATINGFRANCETELEVISIONTYPE +) + +func (i RatingFranceTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "agesAbove10", "agesAbove12", "agesAbove16", "agesAbove18"}[i] +} +func ParseRatingFranceTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGFRANCETELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGFRANCETELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGFRANCETELEVISIONTYPE + case "agesAbove10": + result = AGESABOVE10_RATINGFRANCETELEVISIONTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGFRANCETELEVISIONTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGFRANCETELEVISIONTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGFRANCETELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingFranceTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingFranceTelevisionType(values []RatingFranceTelevisionType) []string { + 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/rating_germany_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_germany_movies_type.go new file mode 100644 index 000000000..c7ee32b11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_germany_movies_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingGermanyMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGGERMANYMOVIESTYPE RatingGermanyMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGGERMANYMOVIESTYPE + // Ab 0 Jahren, no age restrictions + GENERAL_RATINGGERMANYMOVIESTYPE + // Ab 6 Jahren, ages 6 and older + AGESABOVE6_RATINGGERMANYMOVIESTYPE + // Ab 12 Jahren, ages 12 and older + AGESABOVE12_RATINGGERMANYMOVIESTYPE + // Ab 16 Jahren, ages 16 and older + AGESABOVE16_RATINGGERMANYMOVIESTYPE + // Ab 18 Jahren, adults only + ADULTS_RATINGGERMANYMOVIESTYPE +) + +func (i RatingGermanyMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "agesAbove6", "agesAbove12", "agesAbove16", "adults"}[i] +} +func ParseRatingGermanyMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGGERMANYMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGGERMANYMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGGERMANYMOVIESTYPE + case "general": + result = GENERAL_RATINGGERMANYMOVIESTYPE + case "agesAbove6": + result = AGESABOVE6_RATINGGERMANYMOVIESTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGGERMANYMOVIESTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGGERMANYMOVIESTYPE + case "adults": + result = ADULTS_RATINGGERMANYMOVIESTYPE + default: + return 0, errors.New("Unknown RatingGermanyMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingGermanyMoviesType(values []RatingGermanyMoviesType) []string { + 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/rating_germany_television_type.go b/src/internal/connector/graph/betasdk/models/rating_germany_television_type.go new file mode 100644 index 000000000..aeaea7daf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_germany_television_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingGermanyTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGGERMANYTELEVISIONTYPE RatingGermanyTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGGERMANYTELEVISIONTYPE + // Ab 0 Jahren, no age restrictions + GENERAL_RATINGGERMANYTELEVISIONTYPE + // Ab 6 Jahren, ages 6 and older + AGESABOVE6_RATINGGERMANYTELEVISIONTYPE + // Ab 12 Jahren, ages 12 and older + AGESABOVE12_RATINGGERMANYTELEVISIONTYPE + // Ab 16 Jahren, ages 16 and older + AGESABOVE16_RATINGGERMANYTELEVISIONTYPE + // Ab 18 Jahren, adults only + ADULTS_RATINGGERMANYTELEVISIONTYPE +) + +func (i RatingGermanyTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "general", "agesAbove6", "agesAbove12", "agesAbove16", "adults"}[i] +} +func ParseRatingGermanyTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGGERMANYTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGGERMANYTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGGERMANYTELEVISIONTYPE + case "general": + result = GENERAL_RATINGGERMANYTELEVISIONTYPE + case "agesAbove6": + result = AGESABOVE6_RATINGGERMANYTELEVISIONTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGGERMANYTELEVISIONTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGGERMANYTELEVISIONTYPE + case "adults": + result = ADULTS_RATINGGERMANYTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingGermanyTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingGermanyTelevisionType(values []RatingGermanyTelevisionType) []string { + 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/rating_ireland_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_ireland_movies_type.go new file mode 100644 index 000000000..88950be35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_ireland_movies_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingIrelandMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGIRELANDMOVIESTYPE RatingIrelandMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGIRELANDMOVIESTYPE + // Suitable for children of school going age + GENERAL_RATINGIRELANDMOVIESTYPE + // The PG classification advises parental guidance + PARENTALGUIDANCE_RATINGIRELANDMOVIESTYPE + // The 12A classification is suitable for viewers of 12 or older + AGESABOVE12_RATINGIRELANDMOVIESTYPE + // The 15A classification is suitable for viewers of 15 or older + AGESABOVE15_RATINGIRELANDMOVIESTYPE + // The 16 classification is suitable for viewers of 16 or older + AGESABOVE16_RATINGIRELANDMOVIESTYPE + // The 18 classification, suitable only for adults + ADULTS_RATINGIRELANDMOVIESTYPE +) + +func (i RatingIrelandMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "agesAbove12", "agesAbove15", "agesAbove16", "adults"}[i] +} +func ParseRatingIrelandMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGIRELANDMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGIRELANDMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGIRELANDMOVIESTYPE + case "general": + result = GENERAL_RATINGIRELANDMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGIRELANDMOVIESTYPE + case "agesAbove12": + result = AGESABOVE12_RATINGIRELANDMOVIESTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGIRELANDMOVIESTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGIRELANDMOVIESTYPE + case "adults": + result = ADULTS_RATINGIRELANDMOVIESTYPE + default: + return 0, errors.New("Unknown RatingIrelandMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingIrelandMoviesType(values []RatingIrelandMoviesType) []string { + 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/rating_ireland_television_type.go b/src/internal/connector/graph/betasdk/models/rating_ireland_television_type.go new file mode 100644 index 000000000..39d496ce9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_ireland_television_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingIrelandTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGIRELANDTELEVISIONTYPE RatingIrelandTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGIRELANDTELEVISIONTYPE + // The GA classification is suitable for all audiences + GENERAL_RATINGIRELANDTELEVISIONTYPE + // The CH classification is suitable for children + CHILDREN_RATINGIRELANDTELEVISIONTYPE + // The YA classification is suitable for teenage audience + YOUNGADULTS_RATINGIRELANDTELEVISIONTYPE + // The PS classification invites parents and guardians to consider restriction children’s access + PARENTALSUPERVISION_RATINGIRELANDTELEVISIONTYPE + // The MA classification is suitable for adults + MATURE_RATINGIRELANDTELEVISIONTYPE +) + +func (i RatingIrelandTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "general", "children", "youngAdults", "parentalSupervision", "mature"}[i] +} +func ParseRatingIrelandTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGIRELANDTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGIRELANDTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGIRELANDTELEVISIONTYPE + case "general": + result = GENERAL_RATINGIRELANDTELEVISIONTYPE + case "children": + result = CHILDREN_RATINGIRELANDTELEVISIONTYPE + case "youngAdults": + result = YOUNGADULTS_RATINGIRELANDTELEVISIONTYPE + case "parentalSupervision": + result = PARENTALSUPERVISION_RATINGIRELANDTELEVISIONTYPE + case "mature": + result = MATURE_RATINGIRELANDTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingIrelandTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingIrelandTelevisionType(values []RatingIrelandTelevisionType) []string { + 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/rating_japan_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_japan_movies_type.go new file mode 100644 index 000000000..f732aec05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_japan_movies_type.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingJapanMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGJAPANMOVIESTYPE RatingJapanMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGJAPANMOVIESTYPE + // Suitable for all ages + GENERAL_RATINGJAPANMOVIESTYPE + // The PG-12 classification requests parental guidance for young people under 12 + PARENTALGUIDANCE_RATINGJAPANMOVIESTYPE + // The R15+ classification is suitable for viewers of 15 or older + AGESABOVE15_RATINGJAPANMOVIESTYPE + // The R18+ classification is suitable for viewers of 18 or older + AGESABOVE18_RATINGJAPANMOVIESTYPE +) + +func (i RatingJapanMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "agesAbove15", "agesAbove18"}[i] +} +func ParseRatingJapanMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGJAPANMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGJAPANMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGJAPANMOVIESTYPE + case "general": + result = GENERAL_RATINGJAPANMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGJAPANMOVIESTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGJAPANMOVIESTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGJAPANMOVIESTYPE + default: + return 0, errors.New("Unknown RatingJapanMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingJapanMoviesType(values []RatingJapanMoviesType) []string { + 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/rating_japan_television_type.go b/src/internal/connector/graph/betasdk/models/rating_japan_television_type.go new file mode 100644 index 000000000..1e9f006b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_japan_television_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingJapanTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGJAPANTELEVISIONTYPE RatingJapanTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGJAPANTELEVISIONTYPE + // All TV content is explicitly allowed + EXPLICITALLOWED_RATINGJAPANTELEVISIONTYPE +) + +func (i RatingJapanTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "explicitAllowed"}[i] +} +func ParseRatingJapanTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGJAPANTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGJAPANTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGJAPANTELEVISIONTYPE + case "explicitAllowed": + result = EXPLICITALLOWED_RATINGJAPANTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingJapanTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingJapanTelevisionType(values []RatingJapanTelevisionType) []string { + 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/rating_new_zealand_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_new_zealand_movies_type.go new file mode 100644 index 000000000..910251cb3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_new_zealand_movies_type.go @@ -0,0 +1,72 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingNewZealandMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGNEWZEALANDMOVIESTYPE RatingNewZealandMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGNEWZEALANDMOVIESTYPE + // Suitable for general audience + GENERAL_RATINGNEWZEALANDMOVIESTYPE + // The PG classification recommends parental guidance + PARENTALGUIDANCE_RATINGNEWZEALANDMOVIESTYPE + // The M classification is suitable for mature audience + MATURE_RATINGNEWZEALANDMOVIESTYPE + // The R13 classification is restricted to persons 13 years and over + AGESABOVE13_RATINGNEWZEALANDMOVIESTYPE + // The R15 classification is restricted to persons 15 years and over + AGESABOVE15_RATINGNEWZEALANDMOVIESTYPE + // The R16 classification is restricted to persons 16 years and over + AGESABOVE16_RATINGNEWZEALANDMOVIESTYPE + // The R18 classification is restricted to persons 18 years and over + AGESABOVE18_RATINGNEWZEALANDMOVIESTYPE + // The R classification is restricted to a certain audience + RESTRICTED_RATINGNEWZEALANDMOVIESTYPE + // The RP16 classification requires viewers under 16 accompanied by a parent or an adult + AGESABOVE16RESTRICTED_RATINGNEWZEALANDMOVIESTYPE +) + +func (i RatingNewZealandMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "mature", "agesAbove13", "agesAbove15", "agesAbove16", "agesAbove18", "restricted", "agesAbove16Restricted"}[i] +} +func ParseRatingNewZealandMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGNEWZEALANDMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGNEWZEALANDMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGNEWZEALANDMOVIESTYPE + case "general": + result = GENERAL_RATINGNEWZEALANDMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGNEWZEALANDMOVIESTYPE + case "mature": + result = MATURE_RATINGNEWZEALANDMOVIESTYPE + case "agesAbove13": + result = AGESABOVE13_RATINGNEWZEALANDMOVIESTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGNEWZEALANDMOVIESTYPE + case "agesAbove16": + result = AGESABOVE16_RATINGNEWZEALANDMOVIESTYPE + case "agesAbove18": + result = AGESABOVE18_RATINGNEWZEALANDMOVIESTYPE + case "restricted": + result = RESTRICTED_RATINGNEWZEALANDMOVIESTYPE + case "agesAbove16Restricted": + result = AGESABOVE16RESTRICTED_RATINGNEWZEALANDMOVIESTYPE + default: + return 0, errors.New("Unknown RatingNewZealandMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingNewZealandMoviesType(values []RatingNewZealandMoviesType) []string { + 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/rating_new_zealand_television_type.go b/src/internal/connector/graph/betasdk/models/rating_new_zealand_television_type.go new file mode 100644 index 000000000..4f8019f1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_new_zealand_television_type.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingNewZealandTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGNEWZEALANDTELEVISIONTYPE RatingNewZealandTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGNEWZEALANDTELEVISIONTYPE + // The G classification excludes materials likely to harm children under 14 + GENERAL_RATINGNEWZEALANDTELEVISIONTYPE + // The PGR classification encourages parents and guardians to supervise younger viewers + PARENTALGUIDANCE_RATINGNEWZEALANDTELEVISIONTYPE + // The AO classification is not suitable for children + ADULTS_RATINGNEWZEALANDTELEVISIONTYPE +) + +func (i RatingNewZealandTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "adults"}[i] +} +func ParseRatingNewZealandTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGNEWZEALANDTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGNEWZEALANDTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGNEWZEALANDTELEVISIONTYPE + case "general": + result = GENERAL_RATINGNEWZEALANDTELEVISIONTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGNEWZEALANDTELEVISIONTYPE + case "adults": + result = ADULTS_RATINGNEWZEALANDTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingNewZealandTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingNewZealandTelevisionType(values []RatingNewZealandTelevisionType) []string { + 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/rating_united_kingdom_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_united_kingdom_movies_type.go new file mode 100644 index 000000000..9aebcfd5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_united_kingdom_movies_type.go @@ -0,0 +1,64 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingUnitedKingdomMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGUNITEDKINGDOMMOVIESTYPE RatingUnitedKingdomMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGUNITEDKINGDOMMOVIESTYPE + // The U classification is suitable for all ages + GENERAL_RATINGUNITEDKINGDOMMOVIESTYPE + // The UC classification is suitable for pre-school children, an old rating label + UNIVERSALCHILDREN_RATINGUNITEDKINGDOMMOVIESTYPE + // The PG classification is suitable for mature + PARENTALGUIDANCE_RATINGUNITEDKINGDOMMOVIESTYPE + // 12, video release suitable for 12 years and over + AGESABOVE12VIDEO_RATINGUNITEDKINGDOMMOVIESTYPE + // 12A, cinema release suitable for 12 years and over + AGESABOVE12CINEMA_RATINGUNITEDKINGDOMMOVIESTYPE + // 15, suitable only for 15 years and older + AGESABOVE15_RATINGUNITEDKINGDOMMOVIESTYPE + // Suitable only for adults + ADULTS_RATINGUNITEDKINGDOMMOVIESTYPE +) + +func (i RatingUnitedKingdomMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "universalChildren", "parentalGuidance", "agesAbove12Video", "agesAbove12Cinema", "agesAbove15", "adults"}[i] +} +func ParseRatingUnitedKingdomMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGUNITEDKINGDOMMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGUNITEDKINGDOMMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGUNITEDKINGDOMMOVIESTYPE + case "general": + result = GENERAL_RATINGUNITEDKINGDOMMOVIESTYPE + case "universalChildren": + result = UNIVERSALCHILDREN_RATINGUNITEDKINGDOMMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGUNITEDKINGDOMMOVIESTYPE + case "agesAbove12Video": + result = AGESABOVE12VIDEO_RATINGUNITEDKINGDOMMOVIESTYPE + case "agesAbove12Cinema": + result = AGESABOVE12CINEMA_RATINGUNITEDKINGDOMMOVIESTYPE + case "agesAbove15": + result = AGESABOVE15_RATINGUNITEDKINGDOMMOVIESTYPE + case "adults": + result = ADULTS_RATINGUNITEDKINGDOMMOVIESTYPE + default: + return 0, errors.New("Unknown RatingUnitedKingdomMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingUnitedKingdomMoviesType(values []RatingUnitedKingdomMoviesType) []string { + 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/rating_united_kingdom_television_type.go b/src/internal/connector/graph/betasdk/models/rating_united_kingdom_television_type.go new file mode 100644 index 000000000..07c319999 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_united_kingdom_television_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingUnitedKingdomTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGUNITEDKINGDOMTELEVISIONTYPE RatingUnitedKingdomTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGUNITEDKINGDOMTELEVISIONTYPE + // Allowing TV contents with a warning message + CAUTION_RATINGUNITEDKINGDOMTELEVISIONTYPE +) + +func (i RatingUnitedKingdomTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "caution"}[i] +} +func ParseRatingUnitedKingdomTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGUNITEDKINGDOMTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGUNITEDKINGDOMTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGUNITEDKINGDOMTELEVISIONTYPE + case "caution": + result = CAUTION_RATINGUNITEDKINGDOMTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingUnitedKingdomTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingUnitedKingdomTelevisionType(values []RatingUnitedKingdomTelevisionType) []string { + 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/rating_united_states_movies_type.go b/src/internal/connector/graph/betasdk/models/rating_united_states_movies_type.go new file mode 100644 index 000000000..39b319d12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_united_states_movies_type.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingUnitedStatesMoviesType int + +const ( + // Default value, allow all movies content + ALLALLOWED_RATINGUNITEDSTATESMOVIESTYPE RatingUnitedStatesMoviesType = iota + // Do not allow any movies content + ALLBLOCKED_RATINGUNITEDSTATESMOVIESTYPE + // G, all ages admitted + GENERAL_RATINGUNITEDSTATESMOVIESTYPE + // PG, some material may not be suitable for children + PARENTALGUIDANCE_RATINGUNITEDSTATESMOVIESTYPE + // PG13, some material may be inappropriate for children under 13 + PARENTALGUIDANCE13_RATINGUNITEDSTATESMOVIESTYPE + // R, viewers under 17 require accompanying parent or adult guardian + RESTRICTED_RATINGUNITEDSTATESMOVIESTYPE + // NC17, adults only + ADULTS_RATINGUNITEDSTATESMOVIESTYPE +) + +func (i RatingUnitedStatesMoviesType) String() string { + return []string{"allAllowed", "allBlocked", "general", "parentalGuidance", "parentalGuidance13", "restricted", "adults"}[i] +} +func ParseRatingUnitedStatesMoviesType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGUNITEDSTATESMOVIESTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGUNITEDSTATESMOVIESTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGUNITEDSTATESMOVIESTYPE + case "general": + result = GENERAL_RATINGUNITEDSTATESMOVIESTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGUNITEDSTATESMOVIESTYPE + case "parentalGuidance13": + result = PARENTALGUIDANCE13_RATINGUNITEDSTATESMOVIESTYPE + case "restricted": + result = RESTRICTED_RATINGUNITEDSTATESMOVIESTYPE + case "adults": + result = ADULTS_RATINGUNITEDSTATESMOVIESTYPE + default: + return 0, errors.New("Unknown RatingUnitedStatesMoviesType value: " + v) + } + return &result, nil +} +func SerializeRatingUnitedStatesMoviesType(values []RatingUnitedStatesMoviesType) []string { + 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/rating_united_states_television_type.go b/src/internal/connector/graph/betasdk/models/rating_united_states_television_type.go new file mode 100644 index 000000000..8d840d776 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rating_united_states_television_type.go @@ -0,0 +1,60 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RatingUnitedStatesTelevisionType int + +const ( + // Default value, allow all TV shows content + ALLALLOWED_RATINGUNITEDSTATESTELEVISIONTYPE RatingUnitedStatesTelevisionType = iota + // Do not allow any TV shows content + ALLBLOCKED_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-Y, all children + CHILDRENALL_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-Y7, children age 7 and above + CHILDRENABOVE7_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-G, suitable for all ages + GENERAL_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-PG, parental guidance + PARENTALGUIDANCE_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-14, children age 14 and above + CHILDRENABOVE14_RATINGUNITEDSTATESTELEVISIONTYPE + // TV-MA, adults only + ADULTS_RATINGUNITEDSTATESTELEVISIONTYPE +) + +func (i RatingUnitedStatesTelevisionType) String() string { + return []string{"allAllowed", "allBlocked", "childrenAll", "childrenAbove7", "general", "parentalGuidance", "childrenAbove14", "adults"}[i] +} +func ParseRatingUnitedStatesTelevisionType(v string) (interface{}, error) { + result := ALLALLOWED_RATINGUNITEDSTATESTELEVISIONTYPE + switch v { + case "allAllowed": + result = ALLALLOWED_RATINGUNITEDSTATESTELEVISIONTYPE + case "allBlocked": + result = ALLBLOCKED_RATINGUNITEDSTATESTELEVISIONTYPE + case "childrenAll": + result = CHILDRENALL_RATINGUNITEDSTATESTELEVISIONTYPE + case "childrenAbove7": + result = CHILDRENABOVE7_RATINGUNITEDSTATESTELEVISIONTYPE + case "general": + result = GENERAL_RATINGUNITEDSTATESTELEVISIONTYPE + case "parentalGuidance": + result = PARENTALGUIDANCE_RATINGUNITEDSTATESTELEVISIONTYPE + case "childrenAbove14": + result = CHILDRENABOVE14_RATINGUNITEDSTATESTELEVISIONTYPE + case "adults": + result = ADULTS_RATINGUNITEDSTATESTELEVISIONTYPE + default: + return 0, errors.New("Unknown RatingUnitedStatesTelevisionType value: " + v) + } + return &result, nil +} +func SerializeRatingUnitedStatesTelevisionType(values []RatingUnitedStatesTelevisionType) []string { + 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/rbac_application.go b/src/internal/connector/graph/betasdk/models/rbac_application.go new file mode 100644 index 000000000..3bb3da836 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rbac_application.go @@ -0,0 +1,408 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RbacApplication +type RbacApplication struct { + Entity + // The resourceNamespaces property + resourceNamespaces []UnifiedRbacResourceNamespaceable + // The roleAssignmentApprovals property + roleAssignmentApprovals []Approvalable + // The roleAssignments property + roleAssignments []UnifiedRoleAssignmentable + // The roleAssignmentScheduleInstances property + roleAssignmentScheduleInstances []UnifiedRoleAssignmentScheduleInstanceable + // The roleAssignmentScheduleRequests property + roleAssignmentScheduleRequests []UnifiedRoleAssignmentScheduleRequestable + // The roleAssignmentSchedules property + roleAssignmentSchedules []UnifiedRoleAssignmentScheduleable + // The roleDefinitions property + roleDefinitions []UnifiedRoleDefinitionable + // The roleEligibilityScheduleInstances property + roleEligibilityScheduleInstances []UnifiedRoleEligibilityScheduleInstanceable + // The roleEligibilityScheduleRequests property + roleEligibilityScheduleRequests []UnifiedRoleEligibilityScheduleRequestable + // The roleEligibilitySchedules property + roleEligibilitySchedules []UnifiedRoleEligibilityScheduleable + // The transitiveRoleAssignments property + transitiveRoleAssignments []UnifiedRoleAssignmentable +} +// NewRbacApplication instantiates a new RbacApplication and sets the default values. +func NewRbacApplication()(*RbacApplication) { + m := &RbacApplication{ + Entity: *NewEntity(), + } + return m +} +// CreateRbacApplicationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRbacApplicationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRbacApplication(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RbacApplication) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["resourceNamespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRbacResourceNamespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRbacResourceNamespaceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRbacResourceNamespaceable) + } + m.SetResourceNamespaces(res) + } + return nil + } + res["roleAssignmentApprovals"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApprovalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Approvalable, len(val)) + for i, v := range val { + res[i] = v.(Approvalable) + } + m.SetRoleAssignmentApprovals(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["roleAssignmentScheduleInstances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentScheduleInstanceable) + } + m.SetRoleAssignmentScheduleInstances(res) + } + return nil + } + res["roleAssignmentScheduleRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentScheduleRequestable) + } + m.SetRoleAssignmentScheduleRequests(res) + } + return nil + } + res["roleAssignmentSchedules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentScheduleable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentScheduleable) + } + m.SetRoleAssignmentSchedules(res) + } + return nil + } + res["roleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleDefinitionable) + } + m.SetRoleDefinitions(res) + } + return nil + } + res["roleEligibilityScheduleInstances"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleEligibilityScheduleInstanceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleEligibilityScheduleInstanceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleEligibilityScheduleInstanceable) + } + m.SetRoleEligibilityScheduleInstances(res) + } + return nil + } + res["roleEligibilityScheduleRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleEligibilityScheduleRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleEligibilityScheduleRequestable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleEligibilityScheduleRequestable) + } + m.SetRoleEligibilityScheduleRequests(res) + } + return nil + } + res["roleEligibilitySchedules"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleEligibilityScheduleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleEligibilityScheduleable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleEligibilityScheduleable) + } + m.SetRoleEligibilitySchedules(res) + } + return nil + } + res["transitiveRoleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentable) + } + m.SetTransitiveRoleAssignments(res) + } + return nil + } + return res +} +// GetResourceNamespaces gets the resourceNamespaces property value. The resourceNamespaces property +func (m *RbacApplication) GetResourceNamespaces()([]UnifiedRbacResourceNamespaceable) { + return m.resourceNamespaces +} +// GetRoleAssignmentApprovals gets the roleAssignmentApprovals property value. The roleAssignmentApprovals property +func (m *RbacApplication) GetRoleAssignmentApprovals()([]Approvalable) { + return m.roleAssignmentApprovals +} +// GetRoleAssignments gets the roleAssignments property value. The roleAssignments property +func (m *RbacApplication) GetRoleAssignments()([]UnifiedRoleAssignmentable) { + return m.roleAssignments +} +// GetRoleAssignmentScheduleInstances gets the roleAssignmentScheduleInstances property value. The roleAssignmentScheduleInstances property +func (m *RbacApplication) GetRoleAssignmentScheduleInstances()([]UnifiedRoleAssignmentScheduleInstanceable) { + return m.roleAssignmentScheduleInstances +} +// GetRoleAssignmentScheduleRequests gets the roleAssignmentScheduleRequests property value. The roleAssignmentScheduleRequests property +func (m *RbacApplication) GetRoleAssignmentScheduleRequests()([]UnifiedRoleAssignmentScheduleRequestable) { + return m.roleAssignmentScheduleRequests +} +// GetRoleAssignmentSchedules gets the roleAssignmentSchedules property value. The roleAssignmentSchedules property +func (m *RbacApplication) GetRoleAssignmentSchedules()([]UnifiedRoleAssignmentScheduleable) { + return m.roleAssignmentSchedules +} +// GetRoleDefinitions gets the roleDefinitions property value. The roleDefinitions property +func (m *RbacApplication) GetRoleDefinitions()([]UnifiedRoleDefinitionable) { + return m.roleDefinitions +} +// GetRoleEligibilityScheduleInstances gets the roleEligibilityScheduleInstances property value. The roleEligibilityScheduleInstances property +func (m *RbacApplication) GetRoleEligibilityScheduleInstances()([]UnifiedRoleEligibilityScheduleInstanceable) { + return m.roleEligibilityScheduleInstances +} +// GetRoleEligibilityScheduleRequests gets the roleEligibilityScheduleRequests property value. The roleEligibilityScheduleRequests property +func (m *RbacApplication) GetRoleEligibilityScheduleRequests()([]UnifiedRoleEligibilityScheduleRequestable) { + return m.roleEligibilityScheduleRequests +} +// GetRoleEligibilitySchedules gets the roleEligibilitySchedules property value. The roleEligibilitySchedules property +func (m *RbacApplication) GetRoleEligibilitySchedules()([]UnifiedRoleEligibilityScheduleable) { + return m.roleEligibilitySchedules +} +// GetTransitiveRoleAssignments gets the transitiveRoleAssignments property value. The transitiveRoleAssignments property +func (m *RbacApplication) GetTransitiveRoleAssignments()([]UnifiedRoleAssignmentable) { + return m.transitiveRoleAssignments +} +// Serialize serializes information the current object +func (m *RbacApplication) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetResourceNamespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceNamespaces())) + for i, v := range m.GetResourceNamespaces() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceNamespaces", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignmentApprovals() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentApprovals())) + for i, v := range m.GetRoleAssignmentApprovals() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentApprovals", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignmentScheduleInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentScheduleInstances())) + for i, v := range m.GetRoleAssignmentScheduleInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentScheduleInstances", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignmentScheduleRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentScheduleRequests())) + for i, v := range m.GetRoleAssignmentScheduleRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentScheduleRequests", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignmentSchedules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignmentSchedules())) + for i, v := range m.GetRoleAssignmentSchedules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignmentSchedules", cast) + if err != nil { + return err + } + } + if m.GetRoleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleDefinitions())) + for i, v := range m.GetRoleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleDefinitions", cast) + if err != nil { + return err + } + } + if m.GetRoleEligibilityScheduleInstances() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleEligibilityScheduleInstances())) + for i, v := range m.GetRoleEligibilityScheduleInstances() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleEligibilityScheduleInstances", cast) + if err != nil { + return err + } + } + if m.GetRoleEligibilityScheduleRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleEligibilityScheduleRequests())) + for i, v := range m.GetRoleEligibilityScheduleRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleEligibilityScheduleRequests", cast) + if err != nil { + return err + } + } + if m.GetRoleEligibilitySchedules() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleEligibilitySchedules())) + for i, v := range m.GetRoleEligibilitySchedules() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleEligibilitySchedules", cast) + if err != nil { + return err + } + } + if m.GetTransitiveRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveRoleAssignments())) + for i, v := range m.GetTransitiveRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveRoleAssignments", cast) + if err != nil { + return err + } + } + return nil +} +// SetResourceNamespaces sets the resourceNamespaces property value. The resourceNamespaces property +func (m *RbacApplication) SetResourceNamespaces(value []UnifiedRbacResourceNamespaceable)() { + m.resourceNamespaces = value +} +// SetRoleAssignmentApprovals sets the roleAssignmentApprovals property value. The roleAssignmentApprovals property +func (m *RbacApplication) SetRoleAssignmentApprovals(value []Approvalable)() { + m.roleAssignmentApprovals = value +} +// SetRoleAssignments sets the roleAssignments property value. The roleAssignments property +func (m *RbacApplication) SetRoleAssignments(value []UnifiedRoleAssignmentable)() { + m.roleAssignments = value +} +// SetRoleAssignmentScheduleInstances sets the roleAssignmentScheduleInstances property value. The roleAssignmentScheduleInstances property +func (m *RbacApplication) SetRoleAssignmentScheduleInstances(value []UnifiedRoleAssignmentScheduleInstanceable)() { + m.roleAssignmentScheduleInstances = value +} +// SetRoleAssignmentScheduleRequests sets the roleAssignmentScheduleRequests property value. The roleAssignmentScheduleRequests property +func (m *RbacApplication) SetRoleAssignmentScheduleRequests(value []UnifiedRoleAssignmentScheduleRequestable)() { + m.roleAssignmentScheduleRequests = value +} +// SetRoleAssignmentSchedules sets the roleAssignmentSchedules property value. The roleAssignmentSchedules property +func (m *RbacApplication) SetRoleAssignmentSchedules(value []UnifiedRoleAssignmentScheduleable)() { + m.roleAssignmentSchedules = value +} +// SetRoleDefinitions sets the roleDefinitions property value. The roleDefinitions property +func (m *RbacApplication) SetRoleDefinitions(value []UnifiedRoleDefinitionable)() { + m.roleDefinitions = value +} +// SetRoleEligibilityScheduleInstances sets the roleEligibilityScheduleInstances property value. The roleEligibilityScheduleInstances property +func (m *RbacApplication) SetRoleEligibilityScheduleInstances(value []UnifiedRoleEligibilityScheduleInstanceable)() { + m.roleEligibilityScheduleInstances = value +} +// SetRoleEligibilityScheduleRequests sets the roleEligibilityScheduleRequests property value. The roleEligibilityScheduleRequests property +func (m *RbacApplication) SetRoleEligibilityScheduleRequests(value []UnifiedRoleEligibilityScheduleRequestable)() { + m.roleEligibilityScheduleRequests = value +} +// SetRoleEligibilitySchedules sets the roleEligibilitySchedules property value. The roleEligibilitySchedules property +func (m *RbacApplication) SetRoleEligibilitySchedules(value []UnifiedRoleEligibilityScheduleable)() { + m.roleEligibilitySchedules = value +} +// SetTransitiveRoleAssignments sets the transitiveRoleAssignments property value. The transitiveRoleAssignments property +func (m *RbacApplication) SetTransitiveRoleAssignments(value []UnifiedRoleAssignmentable)() { + m.transitiveRoleAssignments = value +} diff --git a/src/internal/connector/graph/betasdk/models/rbac_application_multiple.go b/src/internal/connector/graph/betasdk/models/rbac_application_multiple.go new file mode 100644 index 000000000..9990dfe14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rbac_application_multiple.go @@ -0,0 +1,136 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RbacApplicationMultiple +type RbacApplicationMultiple struct { + Entity + // The resourceNamespaces property + resourceNamespaces []UnifiedRbacResourceNamespaceable + // The roleAssignments property + roleAssignments []UnifiedRoleAssignmentMultipleable + // The roleDefinitions property + roleDefinitions []UnifiedRoleDefinitionable +} +// NewRbacApplicationMultiple instantiates a new RbacApplicationMultiple and sets the default values. +func NewRbacApplicationMultiple()(*RbacApplicationMultiple) { + m := &RbacApplicationMultiple{ + Entity: *NewEntity(), + } + return m +} +// CreateRbacApplicationMultipleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRbacApplicationMultipleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRbacApplicationMultiple(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RbacApplicationMultiple) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["resourceNamespaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRbacResourceNamespaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRbacResourceNamespaceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRbacResourceNamespaceable) + } + m.SetResourceNamespaces(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleAssignmentMultipleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleAssignmentMultipleable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleAssignmentMultipleable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["roleDefinitions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedRoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedRoleDefinitionable) + } + m.SetRoleDefinitions(res) + } + return nil + } + return res +} +// GetResourceNamespaces gets the resourceNamespaces property value. The resourceNamespaces property +func (m *RbacApplicationMultiple) GetResourceNamespaces()([]UnifiedRbacResourceNamespaceable) { + return m.resourceNamespaces +} +// GetRoleAssignments gets the roleAssignments property value. The roleAssignments property +func (m *RbacApplicationMultiple) GetRoleAssignments()([]UnifiedRoleAssignmentMultipleable) { + return m.roleAssignments +} +// GetRoleDefinitions gets the roleDefinitions property value. The roleDefinitions property +func (m *RbacApplicationMultiple) GetRoleDefinitions()([]UnifiedRoleDefinitionable) { + return m.roleDefinitions +} +// Serialize serializes information the current object +func (m *RbacApplicationMultiple) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetResourceNamespaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceNamespaces())) + for i, v := range m.GetResourceNamespaces() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("resourceNamespaces", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRoleDefinitions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleDefinitions())) + for i, v := range m.GetRoleDefinitions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleDefinitions", cast) + if err != nil { + return err + } + } + return nil +} +// SetResourceNamespaces sets the resourceNamespaces property value. The resourceNamespaces property +func (m *RbacApplicationMultiple) SetResourceNamespaces(value []UnifiedRbacResourceNamespaceable)() { + m.resourceNamespaces = value +} +// SetRoleAssignments sets the roleAssignments property value. The roleAssignments property +func (m *RbacApplicationMultiple) SetRoleAssignments(value []UnifiedRoleAssignmentMultipleable)() { + m.roleAssignments = value +} +// SetRoleDefinitions sets the roleDefinitions property value. The roleDefinitions property +func (m *RbacApplicationMultiple) SetRoleDefinitions(value []UnifiedRoleDefinitionable)() { + m.roleDefinitions = value +} diff --git a/src/internal/connector/graph/betasdk/models/rbac_application_multipleable.go b/src/internal/connector/graph/betasdk/models/rbac_application_multipleable.go new file mode 100644 index 000000000..ebbb969c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rbac_application_multipleable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RbacApplicationMultipleable +type RbacApplicationMultipleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResourceNamespaces()([]UnifiedRbacResourceNamespaceable) + GetRoleAssignments()([]UnifiedRoleAssignmentMultipleable) + GetRoleDefinitions()([]UnifiedRoleDefinitionable) + SetResourceNamespaces(value []UnifiedRbacResourceNamespaceable)() + SetRoleAssignments(value []UnifiedRoleAssignmentMultipleable)() + SetRoleDefinitions(value []UnifiedRoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rbac_applicationable.go b/src/internal/connector/graph/betasdk/models/rbac_applicationable.go new file mode 100644 index 000000000..f0e731ae8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rbac_applicationable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RbacApplicationable +type RbacApplicationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetResourceNamespaces()([]UnifiedRbacResourceNamespaceable) + GetRoleAssignmentApprovals()([]Approvalable) + GetRoleAssignments()([]UnifiedRoleAssignmentable) + GetRoleAssignmentScheduleInstances()([]UnifiedRoleAssignmentScheduleInstanceable) + GetRoleAssignmentScheduleRequests()([]UnifiedRoleAssignmentScheduleRequestable) + GetRoleAssignmentSchedules()([]UnifiedRoleAssignmentScheduleable) + GetRoleDefinitions()([]UnifiedRoleDefinitionable) + GetRoleEligibilityScheduleInstances()([]UnifiedRoleEligibilityScheduleInstanceable) + GetRoleEligibilityScheduleRequests()([]UnifiedRoleEligibilityScheduleRequestable) + GetRoleEligibilitySchedules()([]UnifiedRoleEligibilityScheduleable) + GetTransitiveRoleAssignments()([]UnifiedRoleAssignmentable) + SetResourceNamespaces(value []UnifiedRbacResourceNamespaceable)() + SetRoleAssignmentApprovals(value []Approvalable)() + SetRoleAssignments(value []UnifiedRoleAssignmentable)() + SetRoleAssignmentScheduleInstances(value []UnifiedRoleAssignmentScheduleInstanceable)() + SetRoleAssignmentScheduleRequests(value []UnifiedRoleAssignmentScheduleRequestable)() + SetRoleAssignmentSchedules(value []UnifiedRoleAssignmentScheduleable)() + SetRoleDefinitions(value []UnifiedRoleDefinitionable)() + SetRoleEligibilityScheduleInstances(value []UnifiedRoleEligibilityScheduleInstanceable)() + SetRoleEligibilityScheduleRequests(value []UnifiedRoleEligibilityScheduleRequestable)() + SetRoleEligibilitySchedules(value []UnifiedRoleEligibilityScheduleable)() + SetTransitiveRoleAssignments(value []UnifiedRoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/reactions_facet.go b/src/internal/connector/graph/betasdk/models/reactions_facet.go new file mode 100644 index 000000000..b298a9fe1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reactions_facet.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// 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 +} +// NewReactionsFacet instantiates a new reactionsFacet and sets the default values. +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 +} +// 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 +} +// GetCommentCount gets the commentCount property value. Count of comments. +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 +} +// GetLikeCount gets the likeCount property value. Count of likes. +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 +} +// GetShareCount gets the shareCount property value. Count of shares. +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 +} +// 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 +} +// SetCommentCount sets the commentCount property value. Count of comments. +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 +} +// SetOdataType sets the @odata.type property value. The OdataType property +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 +} diff --git a/src/internal/connector/graph/betasdk/models/reactions_facetable.go b/src/internal/connector/graph/betasdk/models/reactions_facetable.go new file mode 100644 index 000000000..4e5086047 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reactions_facetable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// 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)() +} diff --git a/src/internal/connector/graph/betasdk/models/recent_notebook.go b/src/internal/connector/graph/betasdk/models/recent_notebook.go new file mode 100644 index 000000000..22e078239 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recent_notebook.go @@ -0,0 +1,177 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecentNotebook +type RecentNotebook 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 name of the notebook. + displayName *string + // The date and time when the notebook was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + lastAccessedTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote client, if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. + links RecentNotebookLinksable + // The OdataType property + odataType *string + // The backend store where the Notebook resides, either OneDriveForBusiness or OneDrive. + sourceService *OnenoteSourceService +} +// NewRecentNotebook instantiates a new recentNotebook and sets the default values. +func NewRecentNotebook()(*RecentNotebook) { + m := &RecentNotebook{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecentNotebookFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecentNotebookFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecentNotebook(), 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 *RecentNotebook) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the notebook. +func (m *RecentNotebook) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecentNotebook) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastAccessedTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastAccessedTime(val) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRecentNotebookLinksFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLinks(val.(RecentNotebookLinksable)) + } + 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["sourceService"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnenoteSourceService) + if err != nil { + return err + } + if val != nil { + m.SetSourceService(val.(*OnenoteSourceService)) + } + return nil + } + return res +} +// GetLastAccessedTime gets the lastAccessedTime property value. The date and time when the notebook was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *RecentNotebook) GetLastAccessedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastAccessedTime +} +// GetLinks gets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote client, if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. +func (m *RecentNotebook) GetLinks()(RecentNotebookLinksable) { + return m.links +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecentNotebook) GetOdataType()(*string) { + return m.odataType +} +// GetSourceService gets the sourceService property value. The backend store where the Notebook resides, either OneDriveForBusiness or OneDrive. +func (m *RecentNotebook) GetSourceService()(*OnenoteSourceService) { + return m.sourceService +} +// Serialize serializes information the current object +func (m *RecentNotebook) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastAccessedTime", m.GetLastAccessedTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("links", m.GetLinks()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSourceService() != nil { + cast := (*m.GetSourceService()).String() + err := writer.WriteStringValue("sourceService", &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 *RecentNotebook) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the notebook. +func (m *RecentNotebook) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastAccessedTime sets the lastAccessedTime property value. The date and time when the notebook was last modified. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *RecentNotebook) SetLastAccessedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastAccessedTime = value +} +// SetLinks sets the links property value. Links for opening the notebook. The oneNoteClientURL link opens the notebook in the OneNote client, if it's installed. The oneNoteWebURL link opens the notebook in OneNote on the web. +func (m *RecentNotebook) SetLinks(value RecentNotebookLinksable)() { + m.links = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecentNotebook) SetOdataType(value *string)() { + m.odataType = value +} +// SetSourceService sets the sourceService property value. The backend store where the Notebook resides, either OneDriveForBusiness or OneDrive. +func (m *RecentNotebook) SetSourceService(value *OnenoteSourceService)() { + m.sourceService = value +} diff --git a/src/internal/connector/graph/betasdk/models/recent_notebook_links.go b/src/internal/connector/graph/betasdk/models/recent_notebook_links.go new file mode 100644 index 000000000..9b264fad7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recent_notebook_links.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecentNotebookLinks +type RecentNotebookLinks 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 OdataType property + odataType *string + // Opens the notebook in the OneNote client, if it's installed. + oneNoteClientUrl ExternalLinkable + // Opens the notebook in OneNote on the web. + oneNoteWebUrl ExternalLinkable +} +// NewRecentNotebookLinks instantiates a new recentNotebookLinks and sets the default values. +func NewRecentNotebookLinks()(*RecentNotebookLinks) { + m := &RecentNotebookLinks{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecentNotebookLinksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecentNotebookLinksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecentNotebookLinks(), 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 *RecentNotebookLinks) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecentNotebookLinks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["oneNoteClientUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteClientUrl(val.(ExternalLinkable)) + } + return nil + } + res["oneNoteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteWebUrl(val.(ExternalLinkable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecentNotebookLinks) GetOdataType()(*string) { + return m.odataType +} +// GetOneNoteClientUrl gets the oneNoteClientUrl property value. Opens the notebook in the OneNote client, if it's installed. +func (m *RecentNotebookLinks) GetOneNoteClientUrl()(ExternalLinkable) { + return m.oneNoteClientUrl +} +// GetOneNoteWebUrl gets the oneNoteWebUrl property value. Opens the notebook in OneNote on the web. +func (m *RecentNotebookLinks) GetOneNoteWebUrl()(ExternalLinkable) { + return m.oneNoteWebUrl +} +// Serialize serializes information the current object +func (m *RecentNotebookLinks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteClientUrl", m.GetOneNoteClientUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteWebUrl", m.GetOneNoteWebUrl()) + 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 *RecentNotebookLinks) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecentNotebookLinks) SetOdataType(value *string)() { + m.odataType = value +} +// SetOneNoteClientUrl sets the oneNoteClientUrl property value. Opens the notebook in the OneNote client, if it's installed. +func (m *RecentNotebookLinks) SetOneNoteClientUrl(value ExternalLinkable)() { + m.oneNoteClientUrl = value +} +// SetOneNoteWebUrl sets the oneNoteWebUrl property value. Opens the notebook in OneNote on the web. +func (m *RecentNotebookLinks) SetOneNoteWebUrl(value ExternalLinkable)() { + m.oneNoteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/recent_notebook_linksable.go b/src/internal/connector/graph/betasdk/models/recent_notebook_linksable.go new file mode 100644 index 000000000..3ff238a6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recent_notebook_linksable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecentNotebookLinksable +type RecentNotebookLinksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOneNoteClientUrl()(ExternalLinkable) + GetOneNoteWebUrl()(ExternalLinkable) + SetOdataType(value *string)() + SetOneNoteClientUrl(value ExternalLinkable)() + SetOneNoteWebUrl(value ExternalLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/recent_notebookable.go b/src/internal/connector/graph/betasdk/models/recent_notebookable.go new file mode 100644 index 000000000..fef00e810 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recent_notebookable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecentNotebookable +type RecentNotebookable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastAccessedTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLinks()(RecentNotebookLinksable) + GetOdataType()(*string) + GetSourceService()(*OnenoteSourceService) + SetDisplayName(value *string)() + SetLastAccessedTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLinks(value RecentNotebookLinksable)() + SetOdataType(value *string)() + SetSourceService(value *OnenoteSourceService)() +} diff --git a/src/internal/connector/graph/betasdk/models/recipient.go b/src/internal/connector/graph/betasdk/models/recipient.go new file mode 100644 index 000000000..861d40017 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recipient.go @@ -0,0 +1,117 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Recipient +type Recipient 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 recipient's email address. + emailAddress EmailAddressable + // The OdataType property + odataType *string +} +// NewRecipient instantiates a new recipient and sets the default values. +func NewRecipient()(*Recipient) { + m := &Recipient{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecipientFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecipientFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.attendee": + return NewAttendee(), nil + case "#microsoft.graph.attendeeBase": + return NewAttendeeBase(), nil + } + } + } + } + return NewRecipient(), 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 *Recipient) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEmailAddress gets the emailAddress property value. The recipient's email address. +func (m *Recipient) GetEmailAddress()(EmailAddressable) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Recipient) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailAddressFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val.(EmailAddressable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Recipient) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Recipient) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Recipient) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEmailAddress sets the emailAddress property value. The recipient's email address. +func (m *Recipient) SetEmailAddress(value EmailAddressable)() { + m.emailAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Recipient) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/recipient_collection_response.go b/src/internal/connector/graph/betasdk/models/recipient_collection_response.go new file mode 100644 index 000000000..a013a6799 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recipient_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecipientCollectionResponse +type RecipientCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Recipientable +} +// NewRecipientCollectionResponse instantiates a new RecipientCollectionResponse and sets the default values. +func NewRecipientCollectionResponse()(*RecipientCollectionResponse) { + m := &RecipientCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRecipientCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecipientCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecipientCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecipientCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecipientFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recipientable, len(val)) + for i, v := range val { + res[i] = v.(Recipientable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RecipientCollectionResponse) GetValue()([]Recipientable) { + return m.value +} +// Serialize serializes information the current object +func (m *RecipientCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RecipientCollectionResponse) SetValue(value []Recipientable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/recipient_collection_responseable.go b/src/internal/connector/graph/betasdk/models/recipient_collection_responseable.go new file mode 100644 index 000000000..694c12556 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recipient_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecipientCollectionResponseable +type RecipientCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Recipientable) + SetValue(value []Recipientable)() +} diff --git a/src/internal/connector/graph/betasdk/models/recipientable.go b/src/internal/connector/graph/betasdk/models/recipientable.go new file mode 100644 index 000000000..ec6035231 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recipientable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Recipientable +type Recipientable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailAddress()(EmailAddressable) + GetOdataType()(*string) + SetEmailAddress(value EmailAddressable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/recommend_label_action.go b/src/internal/connector/graph/betasdk/models/recommend_label_action.go new file mode 100644 index 000000000..0724ad576 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommend_label_action.go @@ -0,0 +1,154 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendLabelAction +type RecommendLabelAction struct { + InformationProtectionAction + // Actions to take if the label is accepted by the user. + actions []InformationProtectionActionable + // The actionSource property + actionSource *ActionSource + // The label that is being recommended. + label LabelDetailsable + // The sensitive information type GUIDs that caused the recommendation to be given. + responsibleSensitiveTypeIds []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID +} +// NewRecommendLabelAction instantiates a new RecommendLabelAction and sets the default values. +func NewRecommendLabelAction()(*RecommendLabelAction) { + m := &RecommendLabelAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.recommendLabelAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRecommendLabelActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendLabelActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendLabelAction(), nil +} +// GetActions gets the actions property value. Actions to take if the label is accepted by the user. +func (m *RecommendLabelAction) GetActions()([]InformationProtectionActionable) { + return m.actions +} +// GetActionSource gets the actionSource property value. The actionSource property +func (m *RecommendLabelAction) GetActionSource()(*ActionSource) { + return m.actionSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendLabelAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetActions(res) + } + return nil + } + res["actionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionSource) + if err != nil { + return err + } + if val != nil { + m.SetActionSource(val.(*ActionSource)) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLabelDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabel(val.(LabelDetailsable)) + } + return nil + } + res["responsibleSensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID") + if err != nil { + return err + } + if val != nil { + res := make([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID, len(val)) + for i, v := range val { + res[i] = *(v.(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)) + } + m.SetResponsibleSensitiveTypeIds(res) + } + return nil + } + return res +} +// GetLabel gets the label property value. The label that is being recommended. +func (m *RecommendLabelAction) GetLabel()(LabelDetailsable) { + return m.label +} +// GetResponsibleSensitiveTypeIds gets the responsibleSensitiveTypeIds property value. The sensitive information type GUIDs that caused the recommendation to be given. +func (m *RecommendLabelAction) GetResponsibleSensitiveTypeIds()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.responsibleSensitiveTypeIds +} +// Serialize serializes information the current object +func (m *RecommendLabelAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActions())) + for i, v := range m.GetActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("actions", cast) + if err != nil { + return err + } + } + if m.GetActionSource() != nil { + cast := (*m.GetActionSource()).String() + err = writer.WriteStringValue("actionSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("label", m.GetLabel()) + if err != nil { + return err + } + } + if m.GetResponsibleSensitiveTypeIds() != nil { + err = writer.WriteCollectionOfUUIDValues("responsibleSensitiveTypeIds", m.GetResponsibleSensitiveTypeIds()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. Actions to take if the label is accepted by the user. +func (m *RecommendLabelAction) SetActions(value []InformationProtectionActionable)() { + m.actions = value +} +// SetActionSource sets the actionSource property value. The actionSource property +func (m *RecommendLabelAction) SetActionSource(value *ActionSource)() { + m.actionSource = value +} +// SetLabel sets the label property value. The label that is being recommended. +func (m *RecommendLabelAction) SetLabel(value LabelDetailsable)() { + m.label = value +} +// SetResponsibleSensitiveTypeIds sets the responsibleSensitiveTypeIds property value. The sensitive information type GUIDs that caused the recommendation to be given. +func (m *RecommendLabelAction) SetResponsibleSensitiveTypeIds(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.responsibleSensitiveTypeIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/recommend_label_actionable.go b/src/internal/connector/graph/betasdk/models/recommend_label_actionable.go new file mode 100644 index 000000000..3c6adf428 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommend_label_actionable.go @@ -0,0 +1,20 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendLabelActionable +type RecommendLabelActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]InformationProtectionActionable) + GetActionSource()(*ActionSource) + GetLabel()(LabelDetailsable) + GetResponsibleSensitiveTypeIds()([]i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + SetActions(value []InformationProtectionActionable)() + SetActionSource(value *ActionSource)() + SetLabel(value LabelDetailsable)() + SetResponsibleSensitiveTypeIds(value []i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation.go b/src/internal/connector/graph/betasdk/models/recommendation.go new file mode 100644 index 000000000..ade0fbbf4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Recommendation +type Recommendation struct { + RecommendationBase +} +// NewRecommendation instantiates a new Recommendation and sets the default values. +func NewRecommendation()(*Recommendation) { + m := &Recommendation{ + RecommendationBase: *NewRecommendationBase(), + } + return m +} +// CreateRecommendationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Recommendation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RecommendationBase.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *Recommendation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RecommendationBase.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation_base.go b/src/internal/connector/graph/betasdk/models/recommendation_base.go new file mode 100644 index 000000000..990589866 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_base.go @@ -0,0 +1,597 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendationBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationBase struct { + Entity + // The actionSteps property + actionSteps []ActionStepable + // The benefits property + benefits *string + // The category property + category *RecommendationCategory + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The currentScore property + currentScore *float64 + // The displayName property + displayName *string + // The featureAreas property + featureAreas []RecommendationFeatureAreas + // The impactedResources property + impactedResources []ImpactedResourceable + // The impactStartDateTime property + impactStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The impactType property + impactType *string + // The insights property + insights *string + // The lastCheckedDateTime property + lastCheckedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The lastModifiedBy property + lastModifiedBy *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The maxScore property + maxScore *float64 + // The postponeUntilDateTime property + postponeUntilDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The priority property + priority *RecommendationPriority + // The recommendationType property + recommendationType *RecommendationType + // The remediationImpact property + remediationImpact *string + // The status property + status *RecommendationStatus +} +// NewRecommendationBase instantiates a new recommendationBase and sets the default values. +func NewRecommendationBase()(*RecommendationBase) { + m := &RecommendationBase{ + Entity: *NewEntity(), + } + return m +} +// CreateRecommendationBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendationBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.recommendation": + return NewRecommendation(), nil + } + } + } + } + return NewRecommendationBase(), nil +} +// GetActionSteps gets the actionSteps property value. The actionSteps property +func (m *RecommendationBase) GetActionSteps()([]ActionStepable) { + return m.actionSteps +} +// GetBenefits gets the benefits property value. The benefits property +func (m *RecommendationBase) GetBenefits()(*string) { + return m.benefits +} +// GetCategory gets the category property value. The category property +func (m *RecommendationBase) GetCategory()(*RecommendationCategory) { + return m.category +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *RecommendationBase) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCurrentScore gets the currentScore property value. The currentScore property +func (m *RecommendationBase) GetCurrentScore()(*float64) { + return m.currentScore +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *RecommendationBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFeatureAreas gets the featureAreas property value. The featureAreas property +func (m *RecommendationBase) GetFeatureAreas()([]RecommendationFeatureAreas) { + return m.featureAreas +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendationBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionSteps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateActionStepFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ActionStepable, len(val)) + for i, v := range val { + res[i] = v.(ActionStepable) + } + m.SetActionSteps(res) + } + return nil + } + res["benefits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBenefits(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecommendationCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*RecommendationCategory)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["currentScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetCurrentScore(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["featureAreas"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRecommendationFeatureAreas) + if err != nil { + return err + } + if val != nil { + res := make([]RecommendationFeatureAreas, len(val)) + for i, v := range val { + res[i] = *(v.(*RecommendationFeatureAreas)) + } + m.SetFeatureAreas(res) + } + return nil + } + res["impactedResources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateImpactedResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ImpactedResourceable, len(val)) + for i, v := range val { + res[i] = v.(ImpactedResourceable) + } + m.SetImpactedResources(res) + } + return nil + } + res["impactStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetImpactStartDateTime(val) + } + return nil + } + res["impactType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImpactType(val) + } + return nil + } + res["insights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInsights(val) + } + return nil + } + res["lastCheckedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastCheckedDateTime(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["maxScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxScore(val) + } + return nil + } + res["postponeUntilDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPostponeUntilDateTime(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecommendationPriority) + if err != nil { + return err + } + if val != nil { + m.SetPriority(val.(*RecommendationPriority)) + } + return nil + } + res["recommendationType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecommendationType) + if err != nil { + return err + } + if val != nil { + m.SetRecommendationType(val.(*RecommendationType)) + } + return nil + } + res["remediationImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediationImpact(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecommendationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*RecommendationStatus)) + } + return nil + } + return res +} +// GetImpactedResources gets the impactedResources property value. The impactedResources property +func (m *RecommendationBase) GetImpactedResources()([]ImpactedResourceable) { + return m.impactedResources +} +// GetImpactStartDateTime gets the impactStartDateTime property value. The impactStartDateTime property +func (m *RecommendationBase) GetImpactStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.impactStartDateTime +} +// GetImpactType gets the impactType property value. The impactType property +func (m *RecommendationBase) GetImpactType()(*string) { + return m.impactType +} +// GetInsights gets the insights property value. The insights property +func (m *RecommendationBase) GetInsights()(*string) { + return m.insights +} +// GetLastCheckedDateTime gets the lastCheckedDateTime property value. The lastCheckedDateTime property +func (m *RecommendationBase) GetLastCheckedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastCheckedDateTime +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *RecommendationBase) GetLastModifiedBy()(*string) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *RecommendationBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMaxScore gets the maxScore property value. The maxScore property +func (m *RecommendationBase) GetMaxScore()(*float64) { + return m.maxScore +} +// GetPostponeUntilDateTime gets the postponeUntilDateTime property value. The postponeUntilDateTime property +func (m *RecommendationBase) GetPostponeUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.postponeUntilDateTime +} +// GetPriority gets the priority property value. The priority property +func (m *RecommendationBase) GetPriority()(*RecommendationPriority) { + return m.priority +} +// GetRecommendationType gets the recommendationType property value. The recommendationType property +func (m *RecommendationBase) GetRecommendationType()(*RecommendationType) { + return m.recommendationType +} +// GetRemediationImpact gets the remediationImpact property value. The remediationImpact property +func (m *RecommendationBase) GetRemediationImpact()(*string) { + return m.remediationImpact +} +// GetStatus gets the status property value. The status property +func (m *RecommendationBase) GetStatus()(*RecommendationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *RecommendationBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActionSteps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActionSteps())) + for i, v := range m.GetActionSteps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("actionSteps", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("benefits", m.GetBenefits()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("currentScore", m.GetCurrentScore()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetFeatureAreas() != nil { + err = writer.WriteCollectionOfStringValues("featureAreas", SerializeRecommendationFeatureAreas(m.GetFeatureAreas())) + if err != nil { + return err + } + } + if m.GetImpactedResources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImpactedResources())) + for i, v := range m.GetImpactedResources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("impactedResources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("impactStartDateTime", m.GetImpactStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("impactType", m.GetImpactType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("insights", m.GetInsights()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastCheckedDateTime", m.GetLastCheckedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("maxScore", m.GetMaxScore()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("postponeUntilDateTime", m.GetPostponeUntilDateTime()) + if err != nil { + return err + } + } + if m.GetPriority() != nil { + cast := (*m.GetPriority()).String() + err = writer.WriteStringValue("priority", &cast) + if err != nil { + return err + } + } + if m.GetRecommendationType() != nil { + cast := (*m.GetRecommendationType()).String() + err = writer.WriteStringValue("recommendationType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remediationImpact", m.GetRemediationImpact()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetActionSteps sets the actionSteps property value. The actionSteps property +func (m *RecommendationBase) SetActionSteps(value []ActionStepable)() { + m.actionSteps = value +} +// SetBenefits sets the benefits property value. The benefits property +func (m *RecommendationBase) SetBenefits(value *string)() { + m.benefits = value +} +// SetCategory sets the category property value. The category property +func (m *RecommendationBase) SetCategory(value *RecommendationCategory)() { + m.category = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *RecommendationBase) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCurrentScore sets the currentScore property value. The currentScore property +func (m *RecommendationBase) SetCurrentScore(value *float64)() { + m.currentScore = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *RecommendationBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetFeatureAreas sets the featureAreas property value. The featureAreas property +func (m *RecommendationBase) SetFeatureAreas(value []RecommendationFeatureAreas)() { + m.featureAreas = value +} +// SetImpactedResources sets the impactedResources property value. The impactedResources property +func (m *RecommendationBase) SetImpactedResources(value []ImpactedResourceable)() { + m.impactedResources = value +} +// SetImpactStartDateTime sets the impactStartDateTime property value. The impactStartDateTime property +func (m *RecommendationBase) SetImpactStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.impactStartDateTime = value +} +// SetImpactType sets the impactType property value. The impactType property +func (m *RecommendationBase) SetImpactType(value *string)() { + m.impactType = value +} +// SetInsights sets the insights property value. The insights property +func (m *RecommendationBase) SetInsights(value *string)() { + m.insights = value +} +// SetLastCheckedDateTime sets the lastCheckedDateTime property value. The lastCheckedDateTime property +func (m *RecommendationBase) SetLastCheckedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastCheckedDateTime = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *RecommendationBase) SetLastModifiedBy(value *string)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *RecommendationBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMaxScore sets the maxScore property value. The maxScore property +func (m *RecommendationBase) SetMaxScore(value *float64)() { + m.maxScore = value +} +// SetPostponeUntilDateTime sets the postponeUntilDateTime property value. The postponeUntilDateTime property +func (m *RecommendationBase) SetPostponeUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.postponeUntilDateTime = value +} +// SetPriority sets the priority property value. The priority property +func (m *RecommendationBase) SetPriority(value *RecommendationPriority)() { + m.priority = value +} +// SetRecommendationType sets the recommendationType property value. The recommendationType property +func (m *RecommendationBase) SetRecommendationType(value *RecommendationType)() { + m.recommendationType = value +} +// SetRemediationImpact sets the remediationImpact property value. The remediationImpact property +func (m *RecommendationBase) SetRemediationImpact(value *string)() { + m.remediationImpact = value +} +// SetStatus sets the status property value. The status property +func (m *RecommendationBase) SetStatus(value *RecommendationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation_baseable.go b/src/internal/connector/graph/betasdk/models/recommendation_baseable.go new file mode 100644 index 000000000..b859c4c74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_baseable.go @@ -0,0 +1,52 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendationBaseable +type RecommendationBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionSteps()([]ActionStepable) + GetBenefits()(*string) + GetCategory()(*RecommendationCategory) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCurrentScore()(*float64) + GetDisplayName()(*string) + GetFeatureAreas()([]RecommendationFeatureAreas) + GetImpactedResources()([]ImpactedResourceable) + GetImpactStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetImpactType()(*string) + GetInsights()(*string) + GetLastCheckedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedBy()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMaxScore()(*float64) + GetPostponeUntilDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPriority()(*RecommendationPriority) + GetRecommendationType()(*RecommendationType) + GetRemediationImpact()(*string) + GetStatus()(*RecommendationStatus) + SetActionSteps(value []ActionStepable)() + SetBenefits(value *string)() + SetCategory(value *RecommendationCategory)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCurrentScore(value *float64)() + SetDisplayName(value *string)() + SetFeatureAreas(value []RecommendationFeatureAreas)() + SetImpactedResources(value []ImpactedResourceable)() + SetImpactStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetImpactType(value *string)() + SetInsights(value *string)() + SetLastCheckedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedBy(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMaxScore(value *float64)() + SetPostponeUntilDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPriority(value *RecommendationPriority)() + SetRecommendationType(value *RecommendationType)() + SetRemediationImpact(value *string)() + SetStatus(value *RecommendationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation_category.go b/src/internal/connector/graph/betasdk/models/recommendation_category.go new file mode 100644 index 000000000..2484469e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_category.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationCategory int + +const ( + IDENTITYBESTPRACTICE_RECOMMENDATIONCATEGORY RecommendationCategory = iota + IDENTITYSECURESCORE_RECOMMENDATIONCATEGORY + UNKNOWNFUTUREVALUE_RECOMMENDATIONCATEGORY +) + +func (i RecommendationCategory) String() string { + return []string{"identityBestPractice", "identitySecureScore", "unknownFutureValue"}[i] +} +func ParseRecommendationCategory(v string) (interface{}, error) { + result := IDENTITYBESTPRACTICE_RECOMMENDATIONCATEGORY + switch v { + case "identityBestPractice": + result = IDENTITYBESTPRACTICE_RECOMMENDATIONCATEGORY + case "identitySecureScore": + result = IDENTITYSECURESCORE_RECOMMENDATIONCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RECOMMENDATIONCATEGORY + default: + return 0, errors.New("Unknown RecommendationCategory value: " + v) + } + return &result, nil +} +func SerializeRecommendationCategory(values []RecommendationCategory) []string { + 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/recommendation_collection_response.go b/src/internal/connector/graph/betasdk/models/recommendation_collection_response.go new file mode 100644 index 000000000..66b149459 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendationCollectionResponse +type RecommendationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Recommendationable +} +// NewRecommendationCollectionResponse instantiates a new RecommendationCollectionResponse and sets the default values. +func NewRecommendationCollectionResponse()(*RecommendationCollectionResponse) { + m := &RecommendationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRecommendationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecommendationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Recommendationable, len(val)) + for i, v := range val { + res[i] = v.(Recommendationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RecommendationCollectionResponse) GetValue()([]Recommendationable) { + return m.value +} +// Serialize serializes information the current object +func (m *RecommendationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RecommendationCollectionResponse) SetValue(value []Recommendationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/recommendation_collection_responseable.go new file mode 100644 index 000000000..d01458060 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendationCollectionResponseable +type RecommendationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Recommendationable) + SetValue(value []Recommendationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/recommendation_feature_areas.go b/src/internal/connector/graph/betasdk/models/recommendation_feature_areas.go new file mode 100644 index 000000000..c70658b37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_feature_areas.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationFeatureAreas int + +const ( + USERS_RECOMMENDATIONFEATUREAREAS RecommendationFeatureAreas = iota + GROUPS_RECOMMENDATIONFEATUREAREAS + DEVICES_RECOMMENDATIONFEATUREAREAS + APPLICATIONS_RECOMMENDATIONFEATUREAREAS + ACCESSREVIEWS_RECOMMENDATIONFEATUREAREAS + CONDITIONALACCESS_RECOMMENDATIONFEATUREAREAS + GOVERNANCE_RECOMMENDATIONFEATUREAREAS + UNKNOWNFUTUREVALUE_RECOMMENDATIONFEATUREAREAS +) + +func (i RecommendationFeatureAreas) String() string { + return []string{"users", "groups", "devices", "applications", "accessReviews", "conditionalAccess", "governance", "unknownFutureValue"}[i] +} +func ParseRecommendationFeatureAreas(v string) (interface{}, error) { + result := USERS_RECOMMENDATIONFEATUREAREAS + switch v { + case "users": + result = USERS_RECOMMENDATIONFEATUREAREAS + case "groups": + result = GROUPS_RECOMMENDATIONFEATUREAREAS + case "devices": + result = DEVICES_RECOMMENDATIONFEATUREAREAS + case "applications": + result = APPLICATIONS_RECOMMENDATIONFEATUREAREAS + case "accessReviews": + result = ACCESSREVIEWS_RECOMMENDATIONFEATUREAREAS + case "conditionalAccess": + result = CONDITIONALACCESS_RECOMMENDATIONFEATUREAREAS + case "governance": + result = GOVERNANCE_RECOMMENDATIONFEATUREAREAS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RECOMMENDATIONFEATUREAREAS + default: + return 0, errors.New("Unknown RecommendationFeatureAreas value: " + v) + } + return &result, nil +} +func SerializeRecommendationFeatureAreas(values []RecommendationFeatureAreas) []string { + 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/recommendation_priority.go b/src/internal/connector/graph/betasdk/models/recommendation_priority.go new file mode 100644 index 000000000..cb939c65c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_priority.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationPriority int + +const ( + LOW_RECOMMENDATIONPRIORITY RecommendationPriority = iota + MEDIUM_RECOMMENDATIONPRIORITY + HIGH_RECOMMENDATIONPRIORITY +) + +func (i RecommendationPriority) String() string { + return []string{"low", "medium", "high"}[i] +} +func ParseRecommendationPriority(v string) (interface{}, error) { + result := LOW_RECOMMENDATIONPRIORITY + switch v { + case "low": + result = LOW_RECOMMENDATIONPRIORITY + case "medium": + result = MEDIUM_RECOMMENDATIONPRIORITY + case "high": + result = HIGH_RECOMMENDATIONPRIORITY + default: + return 0, errors.New("Unknown RecommendationPriority value: " + v) + } + return &result, nil +} +func SerializeRecommendationPriority(values []RecommendationPriority) []string { + 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/recommendation_status.go b/src/internal/connector/graph/betasdk/models/recommendation_status.go new file mode 100644 index 000000000..5822a5a2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_status.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationStatus int + +const ( + ACTIVE_RECOMMENDATIONSTATUS RecommendationStatus = iota + COMPLETEDBYSYSTEM_RECOMMENDATIONSTATUS + COMPLETEDBYUSER_RECOMMENDATIONSTATUS + DISMISSED_RECOMMENDATIONSTATUS + POSTPONED_RECOMMENDATIONSTATUS + UNKNOWNFUTUREVALUE_RECOMMENDATIONSTATUS +) + +func (i RecommendationStatus) String() string { + return []string{"active", "completedBySystem", "completedByUser", "dismissed", "postponed", "unknownFutureValue"}[i] +} +func ParseRecommendationStatus(v string) (interface{}, error) { + result := ACTIVE_RECOMMENDATIONSTATUS + switch v { + case "active": + result = ACTIVE_RECOMMENDATIONSTATUS + case "completedBySystem": + result = COMPLETEDBYSYSTEM_RECOMMENDATIONSTATUS + case "completedByUser": + result = COMPLETEDBYUSER_RECOMMENDATIONSTATUS + case "dismissed": + result = DISMISSED_RECOMMENDATIONSTATUS + case "postponed": + result = POSTPONED_RECOMMENDATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RECOMMENDATIONSTATUS + default: + return 0, errors.New("Unknown RecommendationStatus value: " + v) + } + return &result, nil +} +func SerializeRecommendationStatus(values []RecommendationStatus) []string { + 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/recommendation_type.go b/src/internal/connector/graph/betasdk/models/recommendation_type.go new file mode 100644 index 000000000..301215d7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendation_type.go @@ -0,0 +1,124 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecommendationType int + +const ( + ADFSAPPSMIGRATION_RECOMMENDATIONTYPE RecommendationType = iota + ENABLEDESKTOPSSO_RECOMMENDATIONTYPE + ENABLEPHS_RECOMMENDATIONTYPE + ENABLEPROVISIONING_RECOMMENDATIONTYPE + SWITCHFROMPERUSERMFA_RECOMMENDATIONTYPE + TENANTMFA_RECOMMENDATIONTYPE + THIRDPARTYAPPS_RECOMMENDATIONTYPE + TURNOFFPERUSERMFA_RECOMMENDATIONTYPE + USEAUTHENTICATORAPP_RECOMMENDATIONTYPE + USEMYAPPS_RECOMMENDATIONTYPE + STALEAPPS_RECOMMENDATIONTYPE + STALEAPPCREDS_RECOMMENDATIONTYPE + APPLICATIONCREDENTIALEXPIRY_RECOMMENDATIONTYPE + SERVICEPRINCIPALKEYEXPIRY_RECOMMENDATIONTYPE + ADMINMFAV2_RECOMMENDATIONTYPE + BLOCKLEGACYAUTHENTICATION_RECOMMENDATIONTYPE + INTEGRATEDAPPS_RECOMMENDATIONTYPE + MFAREGISTRATIONV2_RECOMMENDATIONTYPE + PWAGEPOLICYNEW_RECOMMENDATIONTYPE + PASSWORDHASHSYNC_RECOMMENDATIONTYPE + ONEADMIN_RECOMMENDATIONTYPE + ROLEOVERLAP_RECOMMENDATIONTYPE + SELFSERVICEPASSWORDRESET_RECOMMENDATIONTYPE + SIGNINRISKPOLICY_RECOMMENDATIONTYPE + USERRISKPOLICY_RECOMMENDATIONTYPE + VERIFYAPPPUBLISHER_RECOMMENDATIONTYPE + PRIVATELINKFORAAD_RECOMMENDATIONTYPE + APPROLEASSIGNMENTSGROUPS_RECOMMENDATIONTYPE + APPROLEASSIGNMENTSUSERS_RECOMMENDATIONTYPE + MANAGEDIDENTITY_RECOMMENDATIONTYPE + OVERPRIVILEGEDAPPS_RECOMMENDATIONTYPE + UNKNOWNFUTUREVALUE_RECOMMENDATIONTYPE +) + +func (i RecommendationType) String() string { + return []string{"adfsAppsMigration", "enableDesktopSSO", "enablePHS", "enableProvisioning", "switchFromPerUserMFA", "tenantMFA", "thirdPartyApps", "turnOffPerUserMFA", "useAuthenticatorApp", "useMyApps", "staleApps", "staleAppCreds", "applicationCredentialExpiry", "servicePrincipalKeyExpiry", "adminMFAV2", "blockLegacyAuthentication", "integratedApps", "mfaRegistrationV2", "pwagePolicyNew", "passwordHashSync", "oneAdmin", "roleOverlap", "selfServicePasswordReset", "signinRiskPolicy", "userRiskPolicy", "verifyAppPublisher", "privateLinkForAAD", "appRoleAssignmentsGroups", "appRoleAssignmentsUsers", "managedIdentity", "overprivilegedApps", "unknownFutureValue"}[i] +} +func ParseRecommendationType(v string) (interface{}, error) { + result := ADFSAPPSMIGRATION_RECOMMENDATIONTYPE + switch v { + case "adfsAppsMigration": + result = ADFSAPPSMIGRATION_RECOMMENDATIONTYPE + case "enableDesktopSSO": + result = ENABLEDESKTOPSSO_RECOMMENDATIONTYPE + case "enablePHS": + result = ENABLEPHS_RECOMMENDATIONTYPE + case "enableProvisioning": + result = ENABLEPROVISIONING_RECOMMENDATIONTYPE + case "switchFromPerUserMFA": + result = SWITCHFROMPERUSERMFA_RECOMMENDATIONTYPE + case "tenantMFA": + result = TENANTMFA_RECOMMENDATIONTYPE + case "thirdPartyApps": + result = THIRDPARTYAPPS_RECOMMENDATIONTYPE + case "turnOffPerUserMFA": + result = TURNOFFPERUSERMFA_RECOMMENDATIONTYPE + case "useAuthenticatorApp": + result = USEAUTHENTICATORAPP_RECOMMENDATIONTYPE + case "useMyApps": + result = USEMYAPPS_RECOMMENDATIONTYPE + case "staleApps": + result = STALEAPPS_RECOMMENDATIONTYPE + case "staleAppCreds": + result = STALEAPPCREDS_RECOMMENDATIONTYPE + case "applicationCredentialExpiry": + result = APPLICATIONCREDENTIALEXPIRY_RECOMMENDATIONTYPE + case "servicePrincipalKeyExpiry": + result = SERVICEPRINCIPALKEYEXPIRY_RECOMMENDATIONTYPE + case "adminMFAV2": + result = ADMINMFAV2_RECOMMENDATIONTYPE + case "blockLegacyAuthentication": + result = BLOCKLEGACYAUTHENTICATION_RECOMMENDATIONTYPE + case "integratedApps": + result = INTEGRATEDAPPS_RECOMMENDATIONTYPE + case "mfaRegistrationV2": + result = MFAREGISTRATIONV2_RECOMMENDATIONTYPE + case "pwagePolicyNew": + result = PWAGEPOLICYNEW_RECOMMENDATIONTYPE + case "passwordHashSync": + result = PASSWORDHASHSYNC_RECOMMENDATIONTYPE + case "oneAdmin": + result = ONEADMIN_RECOMMENDATIONTYPE + case "roleOverlap": + result = ROLEOVERLAP_RECOMMENDATIONTYPE + case "selfServicePasswordReset": + result = SELFSERVICEPASSWORDRESET_RECOMMENDATIONTYPE + case "signinRiskPolicy": + result = SIGNINRISKPOLICY_RECOMMENDATIONTYPE + case "userRiskPolicy": + result = USERRISKPOLICY_RECOMMENDATIONTYPE + case "verifyAppPublisher": + result = VERIFYAPPPUBLISHER_RECOMMENDATIONTYPE + case "privateLinkForAAD": + result = PRIVATELINKFORAAD_RECOMMENDATIONTYPE + case "appRoleAssignmentsGroups": + result = APPROLEASSIGNMENTSGROUPS_RECOMMENDATIONTYPE + case "appRoleAssignmentsUsers": + result = APPROLEASSIGNMENTSUSERS_RECOMMENDATIONTYPE + case "managedIdentity": + result = MANAGEDIDENTITY_RECOMMENDATIONTYPE + case "overprivilegedApps": + result = OVERPRIVILEGEDAPPS_RECOMMENDATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RECOMMENDATIONTYPE + default: + return 0, errors.New("Unknown RecommendationType value: " + v) + } + return &result, nil +} +func SerializeRecommendationType(values []RecommendationType) []string { + 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/recommendationable.go b/src/internal/connector/graph/betasdk/models/recommendationable.go new file mode 100644 index 000000000..b1409f6c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommendationable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Recommendationable +type Recommendationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RecommendationBaseable +} diff --git a/src/internal/connector/graph/betasdk/models/recommended_action.go b/src/internal/connector/graph/betasdk/models/recommended_action.go new file mode 100644 index 000000000..8ac1e82b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommended_action.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendedAction +type RecommendedAction struct { + // Web URL to the recommended action. + actionWebUrl *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 OdataType property + odataType *string + // Potential improvement in the tenant security score from the recommended action. + potentialScoreImpact *float64 + // Title of the recommended action. + title *string +} +// NewRecommendedAction instantiates a new recommendedAction and sets the default values. +func NewRecommendedAction()(*RecommendedAction) { + m := &RecommendedAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecommendedActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendedActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendedAction(), nil +} +// GetActionWebUrl gets the actionWebUrl property value. Web URL to the recommended action. +func (m *RecommendedAction) GetActionWebUrl()(*string) { + return m.actionWebUrl +} +// 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 *RecommendedAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendedAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actionWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionWebUrl(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["potentialScoreImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetPotentialScoreImpact(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecommendedAction) GetOdataType()(*string) { + return m.odataType +} +// GetPotentialScoreImpact gets the potentialScoreImpact property value. Potential improvement in the tenant security score from the recommended action. +func (m *RecommendedAction) GetPotentialScoreImpact()(*float64) { + return m.potentialScoreImpact +} +// GetTitle gets the title property value. Title of the recommended action. +func (m *RecommendedAction) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *RecommendedAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("actionWebUrl", m.GetActionWebUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat64Value("potentialScoreImpact", m.GetPotentialScoreImpact()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActionWebUrl sets the actionWebUrl property value. Web URL to the recommended action. +func (m *RecommendedAction) SetActionWebUrl(value *string)() { + m.actionWebUrl = value +} +// 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 *RecommendedAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecommendedAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetPotentialScoreImpact sets the potentialScoreImpact property value. Potential improvement in the tenant security score from the recommended action. +func (m *RecommendedAction) SetPotentialScoreImpact(value *float64)() { + m.potentialScoreImpact = value +} +// SetTitle sets the title property value. Title of the recommended action. +func (m *RecommendedAction) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/recommended_action_collection_response.go b/src/internal/connector/graph/betasdk/models/recommended_action_collection_response.go new file mode 100644 index 000000000..ffaacd2d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommended_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendedActionCollectionResponse +type RecommendedActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RecommendedActionable +} +// NewRecommendedActionCollectionResponse instantiates a new RecommendedActionCollectionResponse and sets the default values. +func NewRecommendedActionCollectionResponse()(*RecommendedActionCollectionResponse) { + m := &RecommendedActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRecommendedActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendedActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendedActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendedActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecommendedActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RecommendedActionable, len(val)) + for i, v := range val { + res[i] = v.(RecommendedActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RecommendedActionCollectionResponse) GetValue()([]RecommendedActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RecommendedActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RecommendedActionCollectionResponse) SetValue(value []RecommendedActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/recommended_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/recommended_action_collection_responseable.go new file mode 100644 index 000000000..70e66fa31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommended_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendedActionCollectionResponseable +type RecommendedActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RecommendedActionable) + SetValue(value []RecommendedActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/recommended_actionable.go b/src/internal/connector/graph/betasdk/models/recommended_actionable.go new file mode 100644 index 000000000..c138f9d89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recommended_actionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendedActionable +type RecommendedActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionWebUrl()(*string) + GetOdataType()(*string) + GetPotentialScoreImpact()(*float64) + GetTitle()(*string) + SetActionWebUrl(value *string)() + SetOdataType(value *string)() + SetPotentialScoreImpact(value *float64)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/record_completion_reason.go b/src/internal/connector/graph/betasdk/models/record_completion_reason.go new file mode 100644 index 000000000..c75e53231 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/record_completion_reason.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecordCompletionReason int + +const ( + OPERATIONCANCELED_RECORDCOMPLETIONREASON RecordCompletionReason = iota + STOPTONEDETECTED_RECORDCOMPLETIONREASON + MAXRECORDDURATIONREACHED_RECORDCOMPLETIONREASON + INITIALSILENCETIMEOUT_RECORDCOMPLETIONREASON + MAXSILENCETIMEOUT_RECORDCOMPLETIONREASON + PLAYPROMPTFAILED_RECORDCOMPLETIONREASON + PLAYBEEPFAILED_RECORDCOMPLETIONREASON + MEDIARECEIVETIMEOUT_RECORDCOMPLETIONREASON + UNSPECIFIEDERROR_RECORDCOMPLETIONREASON +) + +func (i RecordCompletionReason) String() string { + return []string{"operationCanceled", "stopToneDetected", "maxRecordDurationReached", "initialSilenceTimeout", "maxSilenceTimeout", "playPromptFailed", "playBeepFailed", "mediaReceiveTimeout", "unspecifiedError"}[i] +} +func ParseRecordCompletionReason(v string) (interface{}, error) { + result := OPERATIONCANCELED_RECORDCOMPLETIONREASON + switch v { + case "operationCanceled": + result = OPERATIONCANCELED_RECORDCOMPLETIONREASON + case "stopToneDetected": + result = STOPTONEDETECTED_RECORDCOMPLETIONREASON + case "maxRecordDurationReached": + result = MAXRECORDDURATIONREACHED_RECORDCOMPLETIONREASON + case "initialSilenceTimeout": + result = INITIALSILENCETIMEOUT_RECORDCOMPLETIONREASON + case "maxSilenceTimeout": + result = MAXSILENCETIMEOUT_RECORDCOMPLETIONREASON + case "playPromptFailed": + result = PLAYPROMPTFAILED_RECORDCOMPLETIONREASON + case "playBeepFailed": + result = PLAYBEEPFAILED_RECORDCOMPLETIONREASON + case "mediaReceiveTimeout": + result = MEDIARECEIVETIMEOUT_RECORDCOMPLETIONREASON + case "unspecifiedError": + result = UNSPECIFIEDERROR_RECORDCOMPLETIONREASON + default: + return 0, errors.New("Unknown RecordCompletionReason value: " + v) + } + return &result, nil +} +func SerializeRecordCompletionReason(values []RecordCompletionReason) []string { + 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/record_operation.go b/src/internal/connector/graph/betasdk/models/record_operation.go new file mode 100644 index 000000000..0e167f854 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/record_operation.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordOperation +type RecordOperation struct { + CommsOperation + // Possible values are: operationCanceled, stopToneDetected, maxRecordDurationReached, initialSilenceTimeout, maxSilenceTimeout, playPromptFailed, playBeepFailed, mediaReceiveTimeout, unspecifiedError, none. + completionReason *RecordCompletionReason + // The access token required to retrieve the recording. + recordingAccessToken *string + // The location where the recording is located. + recordingLocation *string +} +// NewRecordOperation instantiates a new RecordOperation and sets the default values. +func NewRecordOperation()(*RecordOperation) { + m := &RecordOperation{ + CommsOperation: *NewCommsOperation(), + } + return m +} +// CreateRecordOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecordOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecordOperation(), nil +} +// GetCompletionReason gets the completionReason property value. Possible values are: operationCanceled, stopToneDetected, maxRecordDurationReached, initialSilenceTimeout, maxSilenceTimeout, playPromptFailed, playBeepFailed, mediaReceiveTimeout, unspecifiedError, none. +func (m *RecordOperation) GetCompletionReason()(*RecordCompletionReason) { + return m.completionReason +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecordOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CommsOperation.GetFieldDeserializers() + res["completionReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecordCompletionReason) + if err != nil { + return err + } + if val != nil { + m.SetCompletionReason(val.(*RecordCompletionReason)) + } + return nil + } + res["recordingAccessToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordingAccessToken(val) + } + return nil + } + res["recordingLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecordingLocation(val) + } + return nil + } + return res +} +// GetRecordingAccessToken gets the recordingAccessToken property value. The access token required to retrieve the recording. +func (m *RecordOperation) GetRecordingAccessToken()(*string) { + return m.recordingAccessToken +} +// GetRecordingLocation gets the recordingLocation property value. The location where the recording is located. +func (m *RecordOperation) GetRecordingLocation()(*string) { + return m.recordingLocation +} +// Serialize serializes information the current object +func (m *RecordOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CommsOperation.Serialize(writer) + if err != nil { + return err + } + if m.GetCompletionReason() != nil { + cast := (*m.GetCompletionReason()).String() + err = writer.WriteStringValue("completionReason", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recordingAccessToken", m.GetRecordingAccessToken()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recordingLocation", m.GetRecordingLocation()) + if err != nil { + return err + } + } + return nil +} +// SetCompletionReason sets the completionReason property value. Possible values are: operationCanceled, stopToneDetected, maxRecordDurationReached, initialSilenceTimeout, maxSilenceTimeout, playPromptFailed, playBeepFailed, mediaReceiveTimeout, unspecifiedError, none. +func (m *RecordOperation) SetCompletionReason(value *RecordCompletionReason)() { + m.completionReason = value +} +// SetRecordingAccessToken sets the recordingAccessToken property value. The access token required to retrieve the recording. +func (m *RecordOperation) SetRecordingAccessToken(value *string)() { + m.recordingAccessToken = value +} +// SetRecordingLocation sets the recordingLocation property value. The location where the recording is located. +func (m *RecordOperation) SetRecordingLocation(value *string)() { + m.recordingLocation = value +} diff --git a/src/internal/connector/graph/betasdk/models/record_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/record_operation_collection_response.go new file mode 100644 index 000000000..c570c3987 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/record_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordOperationCollectionResponse +type RecordOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RecordOperationable +} +// NewRecordOperationCollectionResponse instantiates a new RecordOperationCollectionResponse and sets the default values. +func NewRecordOperationCollectionResponse()(*RecordOperationCollectionResponse) { + m := &RecordOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRecordOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecordOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecordOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecordOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRecordOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RecordOperationable, len(val)) + for i, v := range val { + res[i] = v.(RecordOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RecordOperationCollectionResponse) GetValue()([]RecordOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *RecordOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RecordOperationCollectionResponse) SetValue(value []RecordOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/record_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/record_operation_collection_responseable.go new file mode 100644 index 000000000..ae3053769 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/record_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordOperationCollectionResponseable +type RecordOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RecordOperationable) + SetValue(value []RecordOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/record_operationable.go b/src/internal/connector/graph/betasdk/models/record_operationable.go new file mode 100644 index 000000000..13e89e422 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/record_operationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordOperationable +type RecordOperationable interface { + CommsOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompletionReason()(*RecordCompletionReason) + GetRecordingAccessToken()(*string) + GetRecordingLocation()(*string) + SetCompletionReason(value *RecordCompletionReason)() + SetRecordingAccessToken(value *string)() + SetRecordingLocation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/recording_info.go b/src/internal/connector/graph/betasdk/models/recording_info.go new file mode 100644 index 000000000..70549c4a5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recording_info.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordingInfo +type RecordingInfo 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 participant who initiated the recording. + initiatedBy ParticipantInfoable + // The identities of recording initiator. + initiator IdentitySetable + // The OdataType property + odataType *string + // The recordingStatus property + recordingStatus *RecordingStatus +} +// NewRecordingInfo instantiates a new recordingInfo and sets the default values. +func NewRecordingInfo()(*RecordingInfo) { + m := &RecordingInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecordingInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecordingInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecordingInfo(), 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 *RecordingInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecordingInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["initiatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateParticipantInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiatedBy(val.(ParticipantInfoable)) + } + return nil + } + res["initiator"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInitiator(val.(IdentitySetable)) + } + 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["recordingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecordingStatus) + if err != nil { + return err + } + if val != nil { + m.SetRecordingStatus(val.(*RecordingStatus)) + } + return nil + } + return res +} +// GetInitiatedBy gets the initiatedBy property value. The participant who initiated the recording. +func (m *RecordingInfo) GetInitiatedBy()(ParticipantInfoable) { + return m.initiatedBy +} +// GetInitiator gets the initiator property value. The identities of recording initiator. +func (m *RecordingInfo) GetInitiator()(IdentitySetable) { + return m.initiator +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecordingInfo) GetOdataType()(*string) { + return m.odataType +} +// GetRecordingStatus gets the recordingStatus property value. The recordingStatus property +func (m *RecordingInfo) GetRecordingStatus()(*RecordingStatus) { + return m.recordingStatus +} +// Serialize serializes information the current object +func (m *RecordingInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("initiatedBy", m.GetInitiatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("initiator", m.GetInitiator()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecordingStatus() != nil { + cast := (*m.GetRecordingStatus()).String() + err := writer.WriteStringValue("recordingStatus", &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 *RecordingInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetInitiatedBy sets the initiatedBy property value. The participant who initiated the recording. +func (m *RecordingInfo) SetInitiatedBy(value ParticipantInfoable)() { + m.initiatedBy = value +} +// SetInitiator sets the initiator property value. The identities of recording initiator. +func (m *RecordingInfo) SetInitiator(value IdentitySetable)() { + m.initiator = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecordingInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecordingStatus sets the recordingStatus property value. The recordingStatus property +func (m *RecordingInfo) SetRecordingStatus(value *RecordingStatus)() { + m.recordingStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/recording_infoable.go b/src/internal/connector/graph/betasdk/models/recording_infoable.go new file mode 100644 index 000000000..83da8beb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recording_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecordingInfoable +type RecordingInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInitiatedBy()(ParticipantInfoable) + GetInitiator()(IdentitySetable) + GetOdataType()(*string) + GetRecordingStatus()(*RecordingStatus) + SetInitiatedBy(value ParticipantInfoable)() + SetInitiator(value IdentitySetable)() + SetOdataType(value *string)() + SetRecordingStatus(value *RecordingStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/recording_status.go b/src/internal/connector/graph/betasdk/models/recording_status.go new file mode 100644 index 000000000..b2ed3538c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recording_status.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecordingStatus int + +const ( + UNKNOWN_RECORDINGSTATUS RecordingStatus = iota + NOTRECORDING_RECORDINGSTATUS + RECORDING_RECORDINGSTATUS + FAILED_RECORDINGSTATUS + UNKNOWNFUTUREVALUE_RECORDINGSTATUS +) + +func (i RecordingStatus) String() string { + return []string{"unknown", "notRecording", "recording", "failed", "unknownFutureValue"}[i] +} +func ParseRecordingStatus(v string) (interface{}, error) { + result := UNKNOWN_RECORDINGSTATUS + switch v { + case "unknown": + result = UNKNOWN_RECORDINGSTATUS + case "notRecording": + result = NOTRECORDING_RECORDINGSTATUS + case "recording": + result = RECORDING_RECORDINGSTATUS + case "failed": + result = FAILED_RECORDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RECORDINGSTATUS + default: + return 0, errors.New("Unknown RecordingStatus value: " + v) + } + return &result, nil +} +func SerializeRecordingStatus(values []RecordingStatus) []string { + 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/recurrence_pattern.go b/src/internal/connector/graph/betasdk/models/recurrence_pattern.go new file mode 100644 index 000000000..3cc0a855c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_pattern.go @@ -0,0 +1,260 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecurrencePattern +type RecurrencePattern 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 day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly. + dayOfMonth *int32 + // A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly. + daysOfWeek []DayOfWeek + // The first day of the week. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default is sunday. Required if type is weekly. + firstDayOfWeek *DayOfWeek + // Specifies on which instance of the allowed days specified in daysOfWeek the event occurs, counted from the first instance in the month. The possible values are: first, second, third, fourth, last. Default is first. Optional and used if type is relativeMonthly or relativeYearly. + index *WeekIndex + // The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required. + interval *int32 + // The month in which the event occurs. This is a number from 1 to 12. + month *int32 + // The OdataType property + odataType *string + // The recurrence pattern type: daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. Required. For more information, see values of type property. + type_escaped *RecurrencePatternType +} +// NewRecurrencePattern instantiates a new recurrencePattern and sets the default values. +func NewRecurrencePattern()(*RecurrencePattern) { + m := &RecurrencePattern{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecurrencePatternFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecurrencePatternFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecurrencePattern(), 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 *RecurrencePattern) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDayOfMonth gets the dayOfMonth property value. The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly. +func (m *RecurrencePattern) GetDayOfMonth()(*int32) { + return m.dayOfMonth +} +// GetDaysOfWeek gets the daysOfWeek property value. A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly. +func (m *RecurrencePattern) GetDaysOfWeek()([]DayOfWeek) { + return m.daysOfWeek +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecurrencePattern) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dayOfMonth"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDayOfMonth(val) + } + return nil + } + res["daysOfWeek"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + res := make([]DayOfWeek, len(val)) + for i, v := range val { + res[i] = *(v.(*DayOfWeek)) + } + m.SetDaysOfWeek(res) + } + return nil + } + res["firstDayOfWeek"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDayOfWeek) + if err != nil { + return err + } + if val != nil { + m.SetFirstDayOfWeek(val.(*DayOfWeek)) + } + return nil + } + res["index"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWeekIndex) + if err != nil { + return err + } + if val != nil { + m.SetIndex(val.(*WeekIndex)) + } + return nil + } + res["interval"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInterval(val) + } + return nil + } + res["month"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMonth(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecurrencePatternType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*RecurrencePatternType)) + } + return nil + } + return res +} +// GetFirstDayOfWeek gets the firstDayOfWeek property value. The first day of the week. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default is sunday. Required if type is weekly. +func (m *RecurrencePattern) GetFirstDayOfWeek()(*DayOfWeek) { + return m.firstDayOfWeek +} +// GetIndex gets the index property value. Specifies on which instance of the allowed days specified in daysOfWeek the event occurs, counted from the first instance in the month. The possible values are: first, second, third, fourth, last. Default is first. Optional and used if type is relativeMonthly or relativeYearly. +func (m *RecurrencePattern) GetIndex()(*WeekIndex) { + return m.index +} +// GetInterval gets the interval property value. The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required. +func (m *RecurrencePattern) GetInterval()(*int32) { + return m.interval +} +// GetMonth gets the month property value. The month in which the event occurs. This is a number from 1 to 12. +func (m *RecurrencePattern) GetMonth()(*int32) { + return m.month +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecurrencePattern) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The recurrence pattern type: daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. Required. For more information, see values of type property. +func (m *RecurrencePattern) GetType()(*RecurrencePatternType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *RecurrencePattern) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("dayOfMonth", m.GetDayOfMonth()) + if err != nil { + return err + } + } + if m.GetDaysOfWeek() != nil { + err := writer.WriteCollectionOfStringValues("daysOfWeek", SerializeDayOfWeek(m.GetDaysOfWeek())) + if err != nil { + return err + } + } + if m.GetFirstDayOfWeek() != nil { + cast := (*m.GetFirstDayOfWeek()).String() + err := writer.WriteStringValue("firstDayOfWeek", &cast) + if err != nil { + return err + } + } + if m.GetIndex() != nil { + cast := (*m.GetIndex()).String() + err := writer.WriteStringValue("index", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("interval", m.GetInterval()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("month", m.GetMonth()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *RecurrencePattern) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDayOfMonth sets the dayOfMonth property value. The day of the month on which the event occurs. Required if type is absoluteMonthly or absoluteYearly. +func (m *RecurrencePattern) SetDayOfMonth(value *int32)() { + m.dayOfMonth = value +} +// SetDaysOfWeek sets the daysOfWeek property value. A collection of the days of the week on which the event occurs. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. If type is relativeMonthly or relativeYearly, and daysOfWeek specifies more than one day, the event falls on the first day that satisfies the pattern. Required if type is weekly, relativeMonthly, or relativeYearly. +func (m *RecurrencePattern) SetDaysOfWeek(value []DayOfWeek)() { + m.daysOfWeek = value +} +// SetFirstDayOfWeek sets the firstDayOfWeek property value. The first day of the week. The possible values are: sunday, monday, tuesday, wednesday, thursday, friday, saturday. Default is sunday. Required if type is weekly. +func (m *RecurrencePattern) SetFirstDayOfWeek(value *DayOfWeek)() { + m.firstDayOfWeek = value +} +// SetIndex sets the index property value. Specifies on which instance of the allowed days specified in daysOfWeek the event occurs, counted from the first instance in the month. The possible values are: first, second, third, fourth, last. Default is first. Optional and used if type is relativeMonthly or relativeYearly. +func (m *RecurrencePattern) SetIndex(value *WeekIndex)() { + m.index = value +} +// SetInterval sets the interval property value. The number of units between occurrences, where units can be in days, weeks, months, or years, depending on the type. Required. +func (m *RecurrencePattern) SetInterval(value *int32)() { + m.interval = value +} +// SetMonth sets the month property value. The month in which the event occurs. This is a number from 1 to 12. +func (m *RecurrencePattern) SetMonth(value *int32)() { + m.month = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecurrencePattern) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The recurrence pattern type: daily, weekly, absoluteMonthly, relativeMonthly, absoluteYearly, relativeYearly. Required. For more information, see values of type property. +func (m *RecurrencePattern) SetType(value *RecurrencePatternType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/recurrence_pattern_type.go b/src/internal/connector/graph/betasdk/models/recurrence_pattern_type.go new file mode 100644 index 000000000..321ca644c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_pattern_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecurrencePatternType int + +const ( + DAILY_RECURRENCEPATTERNTYPE RecurrencePatternType = iota + WEEKLY_RECURRENCEPATTERNTYPE + ABSOLUTEMONTHLY_RECURRENCEPATTERNTYPE + RELATIVEMONTHLY_RECURRENCEPATTERNTYPE + ABSOLUTEYEARLY_RECURRENCEPATTERNTYPE + RELATIVEYEARLY_RECURRENCEPATTERNTYPE +) + +func (i RecurrencePatternType) String() string { + return []string{"daily", "weekly", "absoluteMonthly", "relativeMonthly", "absoluteYearly", "relativeYearly"}[i] +} +func ParseRecurrencePatternType(v string) (interface{}, error) { + result := DAILY_RECURRENCEPATTERNTYPE + switch v { + case "daily": + result = DAILY_RECURRENCEPATTERNTYPE + case "weekly": + result = WEEKLY_RECURRENCEPATTERNTYPE + case "absoluteMonthly": + result = ABSOLUTEMONTHLY_RECURRENCEPATTERNTYPE + case "relativeMonthly": + result = RELATIVEMONTHLY_RECURRENCEPATTERNTYPE + case "absoluteYearly": + result = ABSOLUTEYEARLY_RECURRENCEPATTERNTYPE + case "relativeYearly": + result = RELATIVEYEARLY_RECURRENCEPATTERNTYPE + default: + return 0, errors.New("Unknown RecurrencePatternType value: " + v) + } + return &result, nil +} +func SerializeRecurrencePatternType(values []RecurrencePatternType) []string { + 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/recurrence_patternable.go b/src/internal/connector/graph/betasdk/models/recurrence_patternable.go new file mode 100644 index 000000000..aa3dbecd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_patternable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecurrencePatternable +type RecurrencePatternable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDayOfMonth()(*int32) + GetDaysOfWeek()([]DayOfWeek) + GetFirstDayOfWeek()(*DayOfWeek) + GetIndex()(*WeekIndex) + GetInterval()(*int32) + GetMonth()(*int32) + GetOdataType()(*string) + GetType()(*RecurrencePatternType) + SetDayOfMonth(value *int32)() + SetDaysOfWeek(value []DayOfWeek)() + SetFirstDayOfWeek(value *DayOfWeek)() + SetIndex(value *WeekIndex)() + SetInterval(value *int32)() + SetMonth(value *int32)() + SetOdataType(value *string)() + SetType(value *RecurrencePatternType)() +} diff --git a/src/internal/connector/graph/betasdk/models/recurrence_range.go b/src/internal/connector/graph/betasdk/models/recurrence_range.go new file mode 100644 index 000000000..0a2e3f34f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_range.go @@ -0,0 +1,202 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecurrenceRange +type RecurrenceRange 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 date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate. + endDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The number of times to repeat the event. Required and must be positive if type is numbered. + numberOfOccurrences *int32 + // The OdataType property + odataType *string + // Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used. + recurrenceTimeZone *string + // The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required. + startDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The recurrence range. Possible values are: endDate, noEnd, numbered. Required. + type_escaped *RecurrenceRangeType +} +// NewRecurrenceRange instantiates a new recurrenceRange and sets the default values. +func NewRecurrenceRange()(*RecurrenceRange) { + m := &RecurrenceRange{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRecurrenceRangeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecurrenceRangeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecurrenceRange(), 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 *RecurrenceRange) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDate gets the endDate property value. The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate. +func (m *RecurrenceRange) GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.endDate +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecurrenceRange) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDate(val) + } + return nil + } + res["numberOfOccurrences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNumberOfOccurrences(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["recurrenceTimeZone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecurrenceTimeZone(val) + } + return nil + } + res["startDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDate(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRecurrenceRangeType) + if err != nil { + return err + } + if val != nil { + m.SetType(val.(*RecurrenceRangeType)) + } + return nil + } + return res +} +// GetNumberOfOccurrences gets the numberOfOccurrences property value. The number of times to repeat the event. Required and must be positive if type is numbered. +func (m *RecurrenceRange) GetNumberOfOccurrences()(*int32) { + return m.numberOfOccurrences +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RecurrenceRange) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrenceTimeZone gets the recurrenceTimeZone property value. Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used. +func (m *RecurrenceRange) GetRecurrenceTimeZone()(*string) { + return m.recurrenceTimeZone +} +// GetStartDate gets the startDate property value. The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required. +func (m *RecurrenceRange) GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.startDate +} +// GetType gets the type property value. The recurrence range. Possible values are: endDate, noEnd, numbered. Required. +func (m *RecurrenceRange) GetType()(*RecurrenceRangeType) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *RecurrenceRange) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteDateOnlyValue("endDate", m.GetEndDate()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("numberOfOccurrences", m.GetNumberOfOccurrences()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("recurrenceTimeZone", m.GetRecurrenceTimeZone()) + if err != nil { + return err + } + } + { + err := writer.WriteDateOnlyValue("startDate", m.GetStartDate()) + if err != nil { + return err + } + } + if m.GetType() != nil { + cast := (*m.GetType()).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 *RecurrenceRange) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDate sets the endDate property value. The date to stop applying the recurrence pattern. Depending on the recurrence pattern of the event, the last occurrence of the meeting may not be this date. Required if type is endDate. +func (m *RecurrenceRange) SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.endDate = value +} +// SetNumberOfOccurrences sets the numberOfOccurrences property value. The number of times to repeat the event. Required and must be positive if type is numbered. +func (m *RecurrenceRange) SetNumberOfOccurrences(value *int32)() { + m.numberOfOccurrences = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RecurrenceRange) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrenceTimeZone sets the recurrenceTimeZone property value. Time zone for the startDate and endDate properties. Optional. If not specified, the time zone of the event is used. +func (m *RecurrenceRange) SetRecurrenceTimeZone(value *string)() { + m.recurrenceTimeZone = value +} +// SetStartDate sets the startDate property value. The date to start applying the recurrence pattern. The first occurrence of the meeting may be this date or later, depending on the recurrence pattern of the event. Must be the same value as the start property of the recurring event. Required. +func (m *RecurrenceRange) SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.startDate = value +} +// SetType sets the type property value. The recurrence range. Possible values are: endDate, noEnd, numbered. Required. +func (m *RecurrenceRange) SetType(value *RecurrenceRangeType)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/recurrence_range_type.go b/src/internal/connector/graph/betasdk/models/recurrence_range_type.go new file mode 100644 index 000000000..7d76f3ff4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_range_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RecurrenceRangeType int + +const ( + ENDDATE_RECURRENCERANGETYPE RecurrenceRangeType = iota + NOEND_RECURRENCERANGETYPE + NUMBERED_RECURRENCERANGETYPE +) + +func (i RecurrenceRangeType) String() string { + return []string{"endDate", "noEnd", "numbered"}[i] +} +func ParseRecurrenceRangeType(v string) (interface{}, error) { + result := ENDDATE_RECURRENCERANGETYPE + switch v { + case "endDate": + result = ENDDATE_RECURRENCERANGETYPE + case "noEnd": + result = NOEND_RECURRENCERANGETYPE + case "numbered": + result = NUMBERED_RECURRENCERANGETYPE + default: + return 0, errors.New("Unknown RecurrenceRangeType value: " + v) + } + return &result, nil +} +func SerializeRecurrenceRangeType(values []RecurrenceRangeType) []string { + 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/recurrence_rangeable.go b/src/internal/connector/graph/betasdk/models/recurrence_rangeable.go new file mode 100644 index 000000000..2cf9240f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/recurrence_rangeable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecurrenceRangeable +type RecurrenceRangeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetNumberOfOccurrences()(*int32) + GetOdataType()(*string) + GetRecurrenceTimeZone()(*string) + GetStartDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetType()(*RecurrenceRangeType) + SetEndDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetNumberOfOccurrences(value *int32)() + SetOdataType(value *string)() + SetRecurrenceTimeZone(value *string)() + SetStartDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetType(value *RecurrenceRangeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extension.go b/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extension.go new file mode 100644 index 000000000..13475889f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extension.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectSingleSignOnExtension +type RedirectSingleSignOnExtension struct { + SingleSignOnExtension + // Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. + configurations []KeyTypedValuePairable + // Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. + extensionIdentifier *string + // Gets or sets the team ID of the app extension that performs SSO for the specified URLs. + teamIdentifier *string + // One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. + urlPrefixes []string +} +// NewRedirectSingleSignOnExtension instantiates a new RedirectSingleSignOnExtension and sets the default values. +func NewRedirectSingleSignOnExtension()(*RedirectSingleSignOnExtension) { + m := &RedirectSingleSignOnExtension{ + SingleSignOnExtension: *NewSingleSignOnExtension(), + } + odataTypeValue := "#microsoft.graph.redirectSingleSignOnExtension"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRedirectSingleSignOnExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRedirectSingleSignOnExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRedirectSingleSignOnExtension(), nil +} +// GetConfigurations gets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *RedirectSingleSignOnExtension) GetConfigurations()([]KeyTypedValuePairable) { + return m.configurations +} +// GetExtensionIdentifier gets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *RedirectSingleSignOnExtension) GetExtensionIdentifier()(*string) { + return m.extensionIdentifier +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RedirectSingleSignOnExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SingleSignOnExtension.GetFieldDeserializers() + res["configurations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyTypedValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyTypedValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyTypedValuePairable) + } + m.SetConfigurations(res) + } + return nil + } + res["extensionIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtensionIdentifier(val) + } + return nil + } + res["teamIdentifier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTeamIdentifier(val) + } + return nil + } + res["urlPrefixes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUrlPrefixes(res) + } + return nil + } + return res +} +// GetTeamIdentifier gets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *RedirectSingleSignOnExtension) GetTeamIdentifier()(*string) { + return m.teamIdentifier +} +// GetUrlPrefixes gets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *RedirectSingleSignOnExtension) GetUrlPrefixes()([]string) { + return m.urlPrefixes +} +// Serialize serializes information the current object +func (m *RedirectSingleSignOnExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SingleSignOnExtension.Serialize(writer) + if err != nil { + return err + } + if m.GetConfigurations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetConfigurations())) + for i, v := range m.GetConfigurations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("configurations", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extensionIdentifier", m.GetExtensionIdentifier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("teamIdentifier", m.GetTeamIdentifier()) + if err != nil { + return err + } + } + if m.GetUrlPrefixes() != nil { + err = writer.WriteCollectionOfStringValues("urlPrefixes", m.GetUrlPrefixes()) + if err != nil { + return err + } + } + return nil +} +// SetConfigurations sets the configurations property value. Gets or sets a list of typed key-value pairs used to configure Credential-type profiles. This collection can contain a maximum of 500 elements. +func (m *RedirectSingleSignOnExtension) SetConfigurations(value []KeyTypedValuePairable)() { + m.configurations = value +} +// SetExtensionIdentifier sets the extensionIdentifier property value. Gets or sets the bundle ID of the app extension that performs SSO for the specified URLs. +func (m *RedirectSingleSignOnExtension) SetExtensionIdentifier(value *string)() { + m.extensionIdentifier = value +} +// SetTeamIdentifier sets the teamIdentifier property value. Gets or sets the team ID of the app extension that performs SSO for the specified URLs. +func (m *RedirectSingleSignOnExtension) SetTeamIdentifier(value *string)() { + m.teamIdentifier = value +} +// SetUrlPrefixes sets the urlPrefixes property value. One or more URL prefixes of identity providers on whose behalf the app extension performs single sign-on. URLs must begin with http:// or https://. All URL prefixes must be unique for all profiles. +func (m *RedirectSingleSignOnExtension) SetUrlPrefixes(value []string)() { + m.urlPrefixes = value +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extensionable.go b/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extensionable.go new file mode 100644 index 000000000..431293c89 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_single_sign_on_extensionable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectSingleSignOnExtensionable +type RedirectSingleSignOnExtensionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SingleSignOnExtensionable + GetConfigurations()([]KeyTypedValuePairable) + GetExtensionIdentifier()(*string) + GetTeamIdentifier()(*string) + GetUrlPrefixes()([]string) + SetConfigurations(value []KeyTypedValuePairable)() + SetExtensionIdentifier(value *string)() + SetTeamIdentifier(value *string)() + SetUrlPrefixes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_uri_settings.go b/src/internal/connector/graph/betasdk/models/redirect_uri_settings.go new file mode 100644 index 000000000..039772749 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_uri_settings.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectUriSettings +type RedirectUriSettings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identifies the specific URI within the redirectURIs collection in SAML SSO flows. Defaults to null. The index is unique across all the redirectUris for the application. + index *int32 + // The OdataType property + odataType *string + // Specifies the URI that tokens are sent to. + uri *string +} +// NewRedirectUriSettings instantiates a new redirectUriSettings and sets the default values. +func NewRedirectUriSettings()(*RedirectUriSettings) { + m := &RedirectUriSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRedirectUriSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRedirectUriSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRedirectUriSettings(), 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 *RedirectUriSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RedirectUriSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["index"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIndex(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["uri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUri(val) + } + return nil + } + return res +} +// GetIndex gets the index property value. Identifies the specific URI within the redirectURIs collection in SAML SSO flows. Defaults to null. The index is unique across all the redirectUris for the application. +func (m *RedirectUriSettings) GetIndex()(*int32) { + return m.index +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RedirectUriSettings) GetOdataType()(*string) { + return m.odataType +} +// GetUri gets the uri property value. Specifies the URI that tokens are sent to. +func (m *RedirectUriSettings) GetUri()(*string) { + return m.uri +} +// Serialize serializes information the current object +func (m *RedirectUriSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("index", m.GetIndex()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("uri", m.GetUri()) + 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 *RedirectUriSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIndex sets the index property value. Identifies the specific URI within the redirectURIs collection in SAML SSO flows. Defaults to null. The index is unique across all the redirectUris for the application. +func (m *RedirectUriSettings) SetIndex(value *int32)() { + m.index = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RedirectUriSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetUri sets the uri property value. Specifies the URI that tokens are sent to. +func (m *RedirectUriSettings) SetUri(value *string)() { + m.uri = value +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_response.go b/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_response.go new file mode 100644 index 000000000..c389e8cb0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectUriSettingsCollectionResponse +type RedirectUriSettingsCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RedirectUriSettingsable +} +// NewRedirectUriSettingsCollectionResponse instantiates a new RedirectUriSettingsCollectionResponse and sets the default values. +func NewRedirectUriSettingsCollectionResponse()(*RedirectUriSettingsCollectionResponse) { + m := &RedirectUriSettingsCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRedirectUriSettingsCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRedirectUriSettingsCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRedirectUriSettingsCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RedirectUriSettingsCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRedirectUriSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RedirectUriSettingsable, len(val)) + for i, v := range val { + res[i] = v.(RedirectUriSettingsable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RedirectUriSettingsCollectionResponse) GetValue()([]RedirectUriSettingsable) { + return m.value +} +// Serialize serializes information the current object +func (m *RedirectUriSettingsCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RedirectUriSettingsCollectionResponse) SetValue(value []RedirectUriSettingsable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_responseable.go b/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_responseable.go new file mode 100644 index 000000000..eb4c6dc08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_uri_settings_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectUriSettingsCollectionResponseable +type RedirectUriSettingsCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RedirectUriSettingsable) + SetValue(value []RedirectUriSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/redirect_uri_settingsable.go b/src/internal/connector/graph/betasdk/models/redirect_uri_settingsable.go new file mode 100644 index 000000000..981454d2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/redirect_uri_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedirectUriSettingsable +type RedirectUriSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndex()(*int32) + GetOdataType()(*string) + GetUri()(*string) + SetIndex(value *int32)() + SetOdataType(value *string)() + SetUri(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/reference_attachment.go b/src/internal/connector/graph/betasdk/models/reference_attachment.go new file mode 100644 index 000000000..1ed925d4d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachment.go @@ -0,0 +1,194 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferenceAttachment +type ReferenceAttachment struct { + Attachment + // Specifies whether the attachment is a link to a folder. Must set this to true if sourceUrl is a link to a folder. Optional. + isFolder *bool + // Specifies the permissions granted for the attachment by the type of provider in providerType. Possible values are: other, view, edit, anonymousView, anonymousEdit, organizationView, organizationEdit. Optional. + permission *ReferenceAttachmentPermission + // Applies to only a reference attachment of an image - URL to get a preview image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. + previewUrl *string + // The type of provider that supports an attachment of this contentType. Possible values are: other, oneDriveBusiness, oneDriveConsumer, dropbox. Optional. + providerType *ReferenceAttachmentProvider + // URL to get the attachment content. If this is a URL to a folder, then for the folder to be displayed correctly in Outlook or Outlook on the web, set isFolder to true. Required. + sourceUrl *string + // Applies to only a reference attachment of an image - URL to get a thumbnail image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. + thumbnailUrl *string +} +// NewReferenceAttachment instantiates a new ReferenceAttachment and sets the default values. +func NewReferenceAttachment()(*ReferenceAttachment) { + m := &ReferenceAttachment{ + Attachment: *NewAttachment(), + } + odataTypeValue := "#microsoft.graph.referenceAttachment"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateReferenceAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReferenceAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferenceAttachment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReferenceAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Attachment.GetFieldDeserializers() + res["isFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFolder(val) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReferenceAttachmentPermission) + if err != nil { + return err + } + if val != nil { + m.SetPermission(val.(*ReferenceAttachmentPermission)) + } + return nil + } + res["previewUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviewUrl(val) + } + return nil + } + res["providerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseReferenceAttachmentProvider) + if err != nil { + return err + } + if val != nil { + m.SetProviderType(val.(*ReferenceAttachmentProvider)) + } + return nil + } + res["sourceUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceUrl(val) + } + return nil + } + res["thumbnailUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThumbnailUrl(val) + } + return nil + } + return res +} +// GetIsFolder gets the isFolder property value. Specifies whether the attachment is a link to a folder. Must set this to true if sourceUrl is a link to a folder. Optional. +func (m *ReferenceAttachment) GetIsFolder()(*bool) { + return m.isFolder +} +// GetPermission gets the permission property value. Specifies the permissions granted for the attachment by the type of provider in providerType. Possible values are: other, view, edit, anonymousView, anonymousEdit, organizationView, organizationEdit. Optional. +func (m *ReferenceAttachment) GetPermission()(*ReferenceAttachmentPermission) { + return m.permission +} +// GetPreviewUrl gets the previewUrl property value. Applies to only a reference attachment of an image - URL to get a preview image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. +func (m *ReferenceAttachment) GetPreviewUrl()(*string) { + return m.previewUrl +} +// GetProviderType gets the providerType property value. The type of provider that supports an attachment of this contentType. Possible values are: other, oneDriveBusiness, oneDriveConsumer, dropbox. Optional. +func (m *ReferenceAttachment) GetProviderType()(*ReferenceAttachmentProvider) { + return m.providerType +} +// GetSourceUrl gets the sourceUrl property value. URL to get the attachment content. If this is a URL to a folder, then for the folder to be displayed correctly in Outlook or Outlook on the web, set isFolder to true. Required. +func (m *ReferenceAttachment) GetSourceUrl()(*string) { + return m.sourceUrl +} +// GetThumbnailUrl gets the thumbnailUrl property value. Applies to only a reference attachment of an image - URL to get a thumbnail image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. +func (m *ReferenceAttachment) GetThumbnailUrl()(*string) { + return m.thumbnailUrl +} +// Serialize serializes information the current object +func (m *ReferenceAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Attachment.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("isFolder", m.GetIsFolder()) + if err != nil { + return err + } + } + if m.GetPermission() != nil { + cast := (*m.GetPermission()).String() + err = writer.WriteStringValue("permission", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("previewUrl", m.GetPreviewUrl()) + if err != nil { + return err + } + } + if m.GetProviderType() != nil { + cast := (*m.GetProviderType()).String() + err = writer.WriteStringValue("providerType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sourceUrl", m.GetSourceUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("thumbnailUrl", m.GetThumbnailUrl()) + if err != nil { + return err + } + } + return nil +} +// SetIsFolder sets the isFolder property value. Specifies whether the attachment is a link to a folder. Must set this to true if sourceUrl is a link to a folder. Optional. +func (m *ReferenceAttachment) SetIsFolder(value *bool)() { + m.isFolder = value +} +// SetPermission sets the permission property value. Specifies the permissions granted for the attachment by the type of provider in providerType. Possible values are: other, view, edit, anonymousView, anonymousEdit, organizationView, organizationEdit. Optional. +func (m *ReferenceAttachment) SetPermission(value *ReferenceAttachmentPermission)() { + m.permission = value +} +// SetPreviewUrl sets the previewUrl property value. Applies to only a reference attachment of an image - URL to get a preview image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. +func (m *ReferenceAttachment) SetPreviewUrl(value *string)() { + m.previewUrl = value +} +// SetProviderType sets the providerType property value. The type of provider that supports an attachment of this contentType. Possible values are: other, oneDriveBusiness, oneDriveConsumer, dropbox. Optional. +func (m *ReferenceAttachment) SetProviderType(value *ReferenceAttachmentProvider)() { + m.providerType = value +} +// SetSourceUrl sets the sourceUrl property value. URL to get the attachment content. If this is a URL to a folder, then for the folder to be displayed correctly in Outlook or Outlook on the web, set isFolder to true. Required. +func (m *ReferenceAttachment) SetSourceUrl(value *string)() { + m.sourceUrl = value +} +// SetThumbnailUrl sets the thumbnailUrl property value. Applies to only a reference attachment of an image - URL to get a thumbnail image. Use thumbnailUrl and previewUrl only when sourceUrl identifies an image file. Optional. +func (m *ReferenceAttachment) SetThumbnailUrl(value *string)() { + m.thumbnailUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/reference_attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/reference_attachment_collection_response.go new file mode 100644 index 000000000..cb727ce0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferenceAttachmentCollectionResponse +type ReferenceAttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ReferenceAttachmentable +} +// NewReferenceAttachmentCollectionResponse instantiates a new ReferenceAttachmentCollectionResponse and sets the default values. +func NewReferenceAttachmentCollectionResponse()(*ReferenceAttachmentCollectionResponse) { + m := &ReferenceAttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateReferenceAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReferenceAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferenceAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReferenceAttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReferenceAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReferenceAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ReferenceAttachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ReferenceAttachmentCollectionResponse) GetValue()([]ReferenceAttachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ReferenceAttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ReferenceAttachmentCollectionResponse) SetValue(value []ReferenceAttachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/reference_attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/reference_attachment_collection_responseable.go new file mode 100644 index 000000000..eedd0a036 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferenceAttachmentCollectionResponseable +type ReferenceAttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ReferenceAttachmentable) + SetValue(value []ReferenceAttachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/reference_attachment_permission.go b/src/internal/connector/graph/betasdk/models/reference_attachment_permission.go new file mode 100644 index 000000000..9ea53cd64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachment_permission.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ReferenceAttachmentPermission int + +const ( + OTHER_REFERENCEATTACHMENTPERMISSION ReferenceAttachmentPermission = iota + VIEW_REFERENCEATTACHMENTPERMISSION + EDIT_REFERENCEATTACHMENTPERMISSION + ANONYMOUSVIEW_REFERENCEATTACHMENTPERMISSION + ANONYMOUSEDIT_REFERENCEATTACHMENTPERMISSION + ORGANIZATIONVIEW_REFERENCEATTACHMENTPERMISSION + ORGANIZATIONEDIT_REFERENCEATTACHMENTPERMISSION +) + +func (i ReferenceAttachmentPermission) String() string { + return []string{"other", "view", "edit", "anonymousView", "anonymousEdit", "organizationView", "organizationEdit"}[i] +} +func ParseReferenceAttachmentPermission(v string) (interface{}, error) { + result := OTHER_REFERENCEATTACHMENTPERMISSION + switch v { + case "other": + result = OTHER_REFERENCEATTACHMENTPERMISSION + case "view": + result = VIEW_REFERENCEATTACHMENTPERMISSION + case "edit": + result = EDIT_REFERENCEATTACHMENTPERMISSION + case "anonymousView": + result = ANONYMOUSVIEW_REFERENCEATTACHMENTPERMISSION + case "anonymousEdit": + result = ANONYMOUSEDIT_REFERENCEATTACHMENTPERMISSION + case "organizationView": + result = ORGANIZATIONVIEW_REFERENCEATTACHMENTPERMISSION + case "organizationEdit": + result = ORGANIZATIONEDIT_REFERENCEATTACHMENTPERMISSION + default: + return 0, errors.New("Unknown ReferenceAttachmentPermission value: " + v) + } + return &result, nil +} +func SerializeReferenceAttachmentPermission(values []ReferenceAttachmentPermission) []string { + 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/reference_attachment_provider.go b/src/internal/connector/graph/betasdk/models/reference_attachment_provider.go new file mode 100644 index 000000000..0beb6d147 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachment_provider.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ReferenceAttachmentProvider int + +const ( + OTHER_REFERENCEATTACHMENTPROVIDER ReferenceAttachmentProvider = iota + ONEDRIVEBUSINESS_REFERENCEATTACHMENTPROVIDER + ONEDRIVECONSUMER_REFERENCEATTACHMENTPROVIDER + DROPBOX_REFERENCEATTACHMENTPROVIDER +) + +func (i ReferenceAttachmentProvider) String() string { + return []string{"other", "oneDriveBusiness", "oneDriveConsumer", "dropbox"}[i] +} +func ParseReferenceAttachmentProvider(v string) (interface{}, error) { + result := OTHER_REFERENCEATTACHMENTPROVIDER + switch v { + case "other": + result = OTHER_REFERENCEATTACHMENTPROVIDER + case "oneDriveBusiness": + result = ONEDRIVEBUSINESS_REFERENCEATTACHMENTPROVIDER + case "oneDriveConsumer": + result = ONEDRIVECONSUMER_REFERENCEATTACHMENTPROVIDER + case "dropbox": + result = DROPBOX_REFERENCEATTACHMENTPROVIDER + default: + return 0, errors.New("Unknown ReferenceAttachmentProvider value: " + v) + } + return &result, nil +} +func SerializeReferenceAttachmentProvider(values []ReferenceAttachmentProvider) []string { + 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/reference_attachmentable.go b/src/internal/connector/graph/betasdk/models/reference_attachmentable.go new file mode 100644 index 000000000..942408a37 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reference_attachmentable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferenceAttachmentable +type ReferenceAttachmentable interface { + Attachmentable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsFolder()(*bool) + GetPermission()(*ReferenceAttachmentPermission) + GetPreviewUrl()(*string) + GetProviderType()(*ReferenceAttachmentProvider) + GetSourceUrl()(*string) + GetThumbnailUrl()(*string) + SetIsFolder(value *bool)() + SetPermission(value *ReferenceAttachmentPermission)() + SetPreviewUrl(value *string)() + SetProviderType(value *ReferenceAttachmentProvider)() + SetSourceUrl(value *string)() + SetThumbnailUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/referenced_object.go b/src/internal/connector/graph/betasdk/models/referenced_object.go new file mode 100644 index 000000000..94e14fb10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/referenced_object.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferencedObject +type ReferencedObject 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 OdataType property + odataType *string + // Name of the referenced object. Must match one of the objects in the directory definition. + referencedObjectName *string + // Currently not supported. Name of the property in the referenced object, the value for which is used as the reference. + referencedProperty *string +} +// NewReferencedObject instantiates a new referencedObject and sets the default values. +func NewReferencedObject()(*ReferencedObject) { + m := &ReferencedObject{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateReferencedObjectFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReferencedObjectFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferencedObject(), 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 *ReferencedObject) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReferencedObject) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["referencedObjectName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferencedObjectName(val) + } + return nil + } + res["referencedProperty"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReferencedProperty(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ReferencedObject) GetOdataType()(*string) { + return m.odataType +} +// GetReferencedObjectName gets the referencedObjectName property value. Name of the referenced object. Must match one of the objects in the directory definition. +func (m *ReferencedObject) GetReferencedObjectName()(*string) { + return m.referencedObjectName +} +// GetReferencedProperty gets the referencedProperty property value. Currently not supported. Name of the property in the referenced object, the value for which is used as the reference. +func (m *ReferencedObject) GetReferencedProperty()(*string) { + return m.referencedProperty +} +// Serialize serializes information the current object +func (m *ReferencedObject) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("referencedObjectName", m.GetReferencedObjectName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("referencedProperty", m.GetReferencedProperty()) + 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 *ReferencedObject) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ReferencedObject) SetOdataType(value *string)() { + m.odataType = value +} +// SetReferencedObjectName sets the referencedObjectName property value. Name of the referenced object. Must match one of the objects in the directory definition. +func (m *ReferencedObject) SetReferencedObjectName(value *string)() { + m.referencedObjectName = value +} +// SetReferencedProperty sets the referencedProperty property value. Currently not supported. Name of the property in the referenced object, the value for which is used as the reference. +func (m *ReferencedObject) SetReferencedProperty(value *string)() { + m.referencedProperty = value +} diff --git a/src/internal/connector/graph/betasdk/models/referenced_object_collection_response.go b/src/internal/connector/graph/betasdk/models/referenced_object_collection_response.go new file mode 100644 index 000000000..8792a2835 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/referenced_object_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferencedObjectCollectionResponse +type ReferencedObjectCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ReferencedObjectable +} +// NewReferencedObjectCollectionResponse instantiates a new ReferencedObjectCollectionResponse and sets the default values. +func NewReferencedObjectCollectionResponse()(*ReferencedObjectCollectionResponse) { + m := &ReferencedObjectCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateReferencedObjectCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReferencedObjectCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReferencedObjectCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReferencedObjectCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReferencedObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReferencedObjectable, len(val)) + for i, v := range val { + res[i] = v.(ReferencedObjectable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ReferencedObjectCollectionResponse) GetValue()([]ReferencedObjectable) { + return m.value +} +// Serialize serializes information the current object +func (m *ReferencedObjectCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ReferencedObjectCollectionResponse) SetValue(value []ReferencedObjectable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/referenced_object_collection_responseable.go b/src/internal/connector/graph/betasdk/models/referenced_object_collection_responseable.go new file mode 100644 index 000000000..8cc94f01b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/referenced_object_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferencedObjectCollectionResponseable +type ReferencedObjectCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ReferencedObjectable) + SetValue(value []ReferencedObjectable)() +} diff --git a/src/internal/connector/graph/betasdk/models/referenced_objectable.go b/src/internal/connector/graph/betasdk/models/referenced_objectable.go new file mode 100644 index 000000000..0830ddd50 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/referenced_objectable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReferencedObjectable +type ReferencedObjectable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetReferencedObjectName()(*string) + GetReferencedProperty()(*string) + SetOdataType(value *string)() + SetReferencedObjectName(value *string)() + SetReferencedProperty(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/regional_and_language_settings.go b/src/internal/connector/graph/betasdk/models/regional_and_language_settings.go new file mode 100644 index 000000000..6570abda1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/regional_and_language_settings.go @@ -0,0 +1,224 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegionalAndLanguageSettings +type RegionalAndLanguageSettings struct { + Entity + // Prioritized list of languages the user reads and authors in.Returned by default. Not nullable. + authoringLanguages []LocaleInfoable + // The user's preferred user interface language (menus, buttons, ribbons, warning messages) for Microsoft web applications.Returned by default. Not nullable. + defaultDisplayLanguage LocaleInfoable + // The locale that drives the default date, time, and calendar formatting.Returned by default. + defaultRegionalFormat LocaleInfoable + // The language a user expected to use as input for text to speech scenarios.Returned by default. + defaultSpeechInputLanguage LocaleInfoable + // The language a user expects to have documents, emails, and messages translated into.Returned by default. + defaultTranslationLanguage LocaleInfoable + // Allows a user to override their defaultRegionalFormat with field specific formats.Returned by default. + regionalFormatOverrides RegionalFormatOverridesable + // The user's preferred settings when consuming translated documents, emails, messages, and websites.Returned by default. Not nullable. + translationPreferences TranslationPreferencesable +} +// NewRegionalAndLanguageSettings instantiates a new regionalAndLanguageSettings and sets the default values. +func NewRegionalAndLanguageSettings()(*RegionalAndLanguageSettings) { + m := &RegionalAndLanguageSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateRegionalAndLanguageSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegionalAndLanguageSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegionalAndLanguageSettings(), nil +} +// GetAuthoringLanguages gets the authoringLanguages property value. Prioritized list of languages the user reads and authors in.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) GetAuthoringLanguages()([]LocaleInfoable) { + return m.authoringLanguages +} +// GetDefaultDisplayLanguage gets the defaultDisplayLanguage property value. The user's preferred user interface language (menus, buttons, ribbons, warning messages) for Microsoft web applications.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) GetDefaultDisplayLanguage()(LocaleInfoable) { + return m.defaultDisplayLanguage +} +// GetDefaultRegionalFormat gets the defaultRegionalFormat property value. The locale that drives the default date, time, and calendar formatting.Returned by default. +func (m *RegionalAndLanguageSettings) GetDefaultRegionalFormat()(LocaleInfoable) { + return m.defaultRegionalFormat +} +// GetDefaultSpeechInputLanguage gets the defaultSpeechInputLanguage property value. The language a user expected to use as input for text to speech scenarios.Returned by default. +func (m *RegionalAndLanguageSettings) GetDefaultSpeechInputLanguage()(LocaleInfoable) { + return m.defaultSpeechInputLanguage +} +// GetDefaultTranslationLanguage gets the defaultTranslationLanguage property value. The language a user expects to have documents, emails, and messages translated into.Returned by default. +func (m *RegionalAndLanguageSettings) GetDefaultTranslationLanguage()(LocaleInfoable) { + return m.defaultTranslationLanguage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegionalAndLanguageSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["authoringLanguages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LocaleInfoable, len(val)) + for i, v := range val { + res[i] = v.(LocaleInfoable) + } + m.SetAuthoringLanguages(res) + } + return nil + } + res["defaultDisplayLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultDisplayLanguage(val.(LocaleInfoable)) + } + return nil + } + res["defaultRegionalFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultRegionalFormat(val.(LocaleInfoable)) + } + return nil + } + res["defaultSpeechInputLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultSpeechInputLanguage(val.(LocaleInfoable)) + } + return nil + } + res["defaultTranslationLanguage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateLocaleInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDefaultTranslationLanguage(val.(LocaleInfoable)) + } + return nil + } + res["regionalFormatOverrides"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRegionalFormatOverridesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRegionalFormatOverrides(val.(RegionalFormatOverridesable)) + } + return nil + } + res["translationPreferences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTranslationPreferencesFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTranslationPreferences(val.(TranslationPreferencesable)) + } + return nil + } + return res +} +// GetRegionalFormatOverrides gets the regionalFormatOverrides property value. Allows a user to override their defaultRegionalFormat with field specific formats.Returned by default. +func (m *RegionalAndLanguageSettings) GetRegionalFormatOverrides()(RegionalFormatOverridesable) { + return m.regionalFormatOverrides +} +// GetTranslationPreferences gets the translationPreferences property value. The user's preferred settings when consuming translated documents, emails, messages, and websites.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) GetTranslationPreferences()(TranslationPreferencesable) { + return m.translationPreferences +} +// Serialize serializes information the current object +func (m *RegionalAndLanguageSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAuthoringLanguages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAuthoringLanguages())) + for i, v := range m.GetAuthoringLanguages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("authoringLanguages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultDisplayLanguage", m.GetDefaultDisplayLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultRegionalFormat", m.GetDefaultRegionalFormat()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultSpeechInputLanguage", m.GetDefaultSpeechInputLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("defaultTranslationLanguage", m.GetDefaultTranslationLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("regionalFormatOverrides", m.GetRegionalFormatOverrides()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("translationPreferences", m.GetTranslationPreferences()) + if err != nil { + return err + } + } + return nil +} +// SetAuthoringLanguages sets the authoringLanguages property value. Prioritized list of languages the user reads and authors in.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) SetAuthoringLanguages(value []LocaleInfoable)() { + m.authoringLanguages = value +} +// SetDefaultDisplayLanguage sets the defaultDisplayLanguage property value. The user's preferred user interface language (menus, buttons, ribbons, warning messages) for Microsoft web applications.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) SetDefaultDisplayLanguage(value LocaleInfoable)() { + m.defaultDisplayLanguage = value +} +// SetDefaultRegionalFormat sets the defaultRegionalFormat property value. The locale that drives the default date, time, and calendar formatting.Returned by default. +func (m *RegionalAndLanguageSettings) SetDefaultRegionalFormat(value LocaleInfoable)() { + m.defaultRegionalFormat = value +} +// SetDefaultSpeechInputLanguage sets the defaultSpeechInputLanguage property value. The language a user expected to use as input for text to speech scenarios.Returned by default. +func (m *RegionalAndLanguageSettings) SetDefaultSpeechInputLanguage(value LocaleInfoable)() { + m.defaultSpeechInputLanguage = value +} +// SetDefaultTranslationLanguage sets the defaultTranslationLanguage property value. The language a user expects to have documents, emails, and messages translated into.Returned by default. +func (m *RegionalAndLanguageSettings) SetDefaultTranslationLanguage(value LocaleInfoable)() { + m.defaultTranslationLanguage = value +} +// SetRegionalFormatOverrides sets the regionalFormatOverrides property value. Allows a user to override their defaultRegionalFormat with field specific formats.Returned by default. +func (m *RegionalAndLanguageSettings) SetRegionalFormatOverrides(value RegionalFormatOverridesable)() { + m.regionalFormatOverrides = value +} +// SetTranslationPreferences sets the translationPreferences property value. The user's preferred settings when consuming translated documents, emails, messages, and websites.Returned by default. Not nullable. +func (m *RegionalAndLanguageSettings) SetTranslationPreferences(value TranslationPreferencesable)() { + m.translationPreferences = value +} diff --git a/src/internal/connector/graph/betasdk/models/regional_and_language_settingsable.go b/src/internal/connector/graph/betasdk/models/regional_and_language_settingsable.go new file mode 100644 index 000000000..5fe22108b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/regional_and_language_settingsable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegionalAndLanguageSettingsable +type RegionalAndLanguageSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthoringLanguages()([]LocaleInfoable) + GetDefaultDisplayLanguage()(LocaleInfoable) + GetDefaultRegionalFormat()(LocaleInfoable) + GetDefaultSpeechInputLanguage()(LocaleInfoable) + GetDefaultTranslationLanguage()(LocaleInfoable) + GetRegionalFormatOverrides()(RegionalFormatOverridesable) + GetTranslationPreferences()(TranslationPreferencesable) + SetAuthoringLanguages(value []LocaleInfoable)() + SetDefaultDisplayLanguage(value LocaleInfoable)() + SetDefaultRegionalFormat(value LocaleInfoable)() + SetDefaultSpeechInputLanguage(value LocaleInfoable)() + SetDefaultTranslationLanguage(value LocaleInfoable)() + SetRegionalFormatOverrides(value RegionalFormatOverridesable)() + SetTranslationPreferences(value TranslationPreferencesable)() +} diff --git a/src/internal/connector/graph/betasdk/models/regional_format_overrides.go b/src/internal/connector/graph/betasdk/models/regional_format_overrides.go new file mode 100644 index 000000000..7d8a8b082 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/regional_format_overrides.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegionalFormatOverrides +type RegionalFormatOverrides 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 calendar to use, e.g., Gregorian Calendar.Returned by default. + calendar *string + // The first day of the week to use, e.g., Sunday.Returned by default. + firstDayOfWeek *string + // The long date time format to be used for displaying dates.Returned by default. + longDateFormat *string + // The long time format to be used for displaying time.Returned by default. + longTimeFormat *string + // The OdataType property + odataType *string + // The short date time format to be used for displaying dates.Returned by default. + shortDateFormat *string + // The short time format to be used for displaying time.Returned by default. + shortTimeFormat *string + // The timezone to be used for displaying time.Returned by default. + timeZone *string +} +// NewRegionalFormatOverrides instantiates a new regionalFormatOverrides and sets the default values. +func NewRegionalFormatOverrides()(*RegionalFormatOverrides) { + m := &RegionalFormatOverrides{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRegionalFormatOverridesFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegionalFormatOverridesFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegionalFormatOverrides(), 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 *RegionalFormatOverrides) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCalendar gets the calendar property value. The calendar to use, e.g., Gregorian Calendar.Returned by default. +func (m *RegionalFormatOverrides) GetCalendar()(*string) { + return m.calendar +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegionalFormatOverrides) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["calendar"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCalendar(val) + } + return nil + } + res["firstDayOfWeek"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstDayOfWeek(val) + } + return nil + } + res["longDateFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLongDateFormat(val) + } + return nil + } + res["longTimeFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLongTimeFormat(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["shortDateFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShortDateFormat(val) + } + return nil + } + res["shortTimeFormat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShortTimeFormat(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 +} +// GetFirstDayOfWeek gets the firstDayOfWeek property value. The first day of the week to use, e.g., Sunday.Returned by default. +func (m *RegionalFormatOverrides) GetFirstDayOfWeek()(*string) { + return m.firstDayOfWeek +} +// GetLongDateFormat gets the longDateFormat property value. The long date time format to be used for displaying dates.Returned by default. +func (m *RegionalFormatOverrides) GetLongDateFormat()(*string) { + return m.longDateFormat +} +// GetLongTimeFormat gets the longTimeFormat property value. The long time format to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) GetLongTimeFormat()(*string) { + return m.longTimeFormat +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RegionalFormatOverrides) GetOdataType()(*string) { + return m.odataType +} +// GetShortDateFormat gets the shortDateFormat property value. The short date time format to be used for displaying dates.Returned by default. +func (m *RegionalFormatOverrides) GetShortDateFormat()(*string) { + return m.shortDateFormat +} +// GetShortTimeFormat gets the shortTimeFormat property value. The short time format to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) GetShortTimeFormat()(*string) { + return m.shortTimeFormat +} +// GetTimeZone gets the timeZone property value. The timezone to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) GetTimeZone()(*string) { + return m.timeZone +} +// Serialize serializes information the current object +func (m *RegionalFormatOverrides) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("calendar", m.GetCalendar()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("firstDayOfWeek", m.GetFirstDayOfWeek()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("longDateFormat", m.GetLongDateFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("longTimeFormat", m.GetLongTimeFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("shortDateFormat", m.GetShortDateFormat()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("shortTimeFormat", m.GetShortTimeFormat()) + 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 *RegionalFormatOverrides) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCalendar sets the calendar property value. The calendar to use, e.g., Gregorian Calendar.Returned by default. +func (m *RegionalFormatOverrides) SetCalendar(value *string)() { + m.calendar = value +} +// SetFirstDayOfWeek sets the firstDayOfWeek property value. The first day of the week to use, e.g., Sunday.Returned by default. +func (m *RegionalFormatOverrides) SetFirstDayOfWeek(value *string)() { + m.firstDayOfWeek = value +} +// SetLongDateFormat sets the longDateFormat property value. The long date time format to be used for displaying dates.Returned by default. +func (m *RegionalFormatOverrides) SetLongDateFormat(value *string)() { + m.longDateFormat = value +} +// SetLongTimeFormat sets the longTimeFormat property value. The long time format to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) SetLongTimeFormat(value *string)() { + m.longTimeFormat = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RegionalFormatOverrides) SetOdataType(value *string)() { + m.odataType = value +} +// SetShortDateFormat sets the shortDateFormat property value. The short date time format to be used for displaying dates.Returned by default. +func (m *RegionalFormatOverrides) SetShortDateFormat(value *string)() { + m.shortDateFormat = value +} +// SetShortTimeFormat sets the shortTimeFormat property value. The short time format to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) SetShortTimeFormat(value *string)() { + m.shortTimeFormat = value +} +// SetTimeZone sets the timeZone property value. The timezone to be used for displaying time.Returned by default. +func (m *RegionalFormatOverrides) SetTimeZone(value *string)() { + m.timeZone = value +} diff --git a/src/internal/connector/graph/betasdk/models/regional_format_overridesable.go b/src/internal/connector/graph/betasdk/models/regional_format_overridesable.go new file mode 100644 index 000000000..7aa328324 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/regional_format_overridesable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegionalFormatOverridesable +type RegionalFormatOverridesable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCalendar()(*string) + GetFirstDayOfWeek()(*string) + GetLongDateFormat()(*string) + GetLongTimeFormat()(*string) + GetOdataType()(*string) + GetShortDateFormat()(*string) + GetShortTimeFormat()(*string) + GetTimeZone()(*string) + SetCalendar(value *string)() + SetFirstDayOfWeek(value *string)() + SetLongDateFormat(value *string)() + SetLongTimeFormat(value *string)() + SetOdataType(value *string)() + SetShortDateFormat(value *string)() + SetShortTimeFormat(value *string)() + SetTimeZone(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/registration_auth_method.go b/src/internal/connector/graph/betasdk/models/registration_auth_method.go new file mode 100644 index 000000000..989142992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registration_auth_method.go @@ -0,0 +1,58 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RegistrationAuthMethod int + +const ( + EMAIL_REGISTRATIONAUTHMETHOD RegistrationAuthMethod = iota + MOBILEPHONE_REGISTRATIONAUTHMETHOD + OFFICEPHONE_REGISTRATIONAUTHMETHOD + SECURITYQUESTION_REGISTRATIONAUTHMETHOD + APPNOTIFICATION_REGISTRATIONAUTHMETHOD + APPCODE_REGISTRATIONAUTHMETHOD + ALTERNATEMOBILEPHONE_REGISTRATIONAUTHMETHOD + FIDO_REGISTRATIONAUTHMETHOD + APPPASSWORD_REGISTRATIONAUTHMETHOD + UNKNOWNFUTUREVALUE_REGISTRATIONAUTHMETHOD +) + +func (i RegistrationAuthMethod) String() string { + return []string{"email", "mobilePhone", "officePhone", "securityQuestion", "appNotification", "appCode", "alternateMobilePhone", "fido", "appPassword", "unknownFutureValue"}[i] +} +func ParseRegistrationAuthMethod(v string) (interface{}, error) { + result := EMAIL_REGISTRATIONAUTHMETHOD + switch v { + case "email": + result = EMAIL_REGISTRATIONAUTHMETHOD + case "mobilePhone": + result = MOBILEPHONE_REGISTRATIONAUTHMETHOD + case "officePhone": + result = OFFICEPHONE_REGISTRATIONAUTHMETHOD + case "securityQuestion": + result = SECURITYQUESTION_REGISTRATIONAUTHMETHOD + case "appNotification": + result = APPNOTIFICATION_REGISTRATIONAUTHMETHOD + case "appCode": + result = APPCODE_REGISTRATIONAUTHMETHOD + case "alternateMobilePhone": + result = ALTERNATEMOBILEPHONE_REGISTRATIONAUTHMETHOD + case "fido": + result = FIDO_REGISTRATIONAUTHMETHOD + case "appPassword": + result = APPPASSWORD_REGISTRATIONAUTHMETHOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REGISTRATIONAUTHMETHOD + default: + return 0, errors.New("Unknown RegistrationAuthMethod value: " + v) + } + return &result, nil +} +func SerializeRegistrationAuthMethod(values []RegistrationAuthMethod) []string { + 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/registration_enforcement.go b/src/internal/connector/graph/betasdk/models/registration_enforcement.go new file mode 100644 index 000000000..793da7990 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registration_enforcement.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistrationEnforcement +type RegistrationEnforcement struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Run campaigns to remind users to setup targeted authentication methods. + authenticationMethodsRegistrationCampaign AuthenticationMethodsRegistrationCampaignable + // The OdataType property + odataType *string +} +// NewRegistrationEnforcement instantiates a new registrationEnforcement and sets the default values. +func NewRegistrationEnforcement()(*RegistrationEnforcement) { + m := &RegistrationEnforcement{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRegistrationEnforcementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegistrationEnforcementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegistrationEnforcement(), 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 *RegistrationEnforcement) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAuthenticationMethodsRegistrationCampaign gets the authenticationMethodsRegistrationCampaign property value. Run campaigns to remind users to setup targeted authentication methods. +func (m *RegistrationEnforcement) GetAuthenticationMethodsRegistrationCampaign()(AuthenticationMethodsRegistrationCampaignable) { + return m.authenticationMethodsRegistrationCampaign +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegistrationEnforcement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["authenticationMethodsRegistrationCampaign"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationMethodsRegistrationCampaignFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethodsRegistrationCampaign(val.(AuthenticationMethodsRegistrationCampaignable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RegistrationEnforcement) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RegistrationEnforcement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("authenticationMethodsRegistrationCampaign", m.GetAuthenticationMethodsRegistrationCampaign()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RegistrationEnforcement) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAuthenticationMethodsRegistrationCampaign sets the authenticationMethodsRegistrationCampaign property value. Run campaigns to remind users to setup targeted authentication methods. +func (m *RegistrationEnforcement) SetAuthenticationMethodsRegistrationCampaign(value AuthenticationMethodsRegistrationCampaignable)() { + m.authenticationMethodsRegistrationCampaign = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RegistrationEnforcement) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/registration_enforcementable.go b/src/internal/connector/graph/betasdk/models/registration_enforcementable.go new file mode 100644 index 000000000..cff2aa8ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registration_enforcementable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistrationEnforcementable +type RegistrationEnforcementable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAuthenticationMethodsRegistrationCampaign()(AuthenticationMethodsRegistrationCampaignable) + GetOdataType()(*string) + SetAuthenticationMethodsRegistrationCampaign(value AuthenticationMethodsRegistrationCampaignable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/registration_status_type.go b/src/internal/connector/graph/betasdk/models/registration_status_type.go new file mode 100644 index 000000000..5ce135752 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registration_status_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RegistrationStatusType int + +const ( + REGISTERED_REGISTRATIONSTATUSTYPE RegistrationStatusType = iota + ENABLED_REGISTRATIONSTATUSTYPE + CAPABLE_REGISTRATIONSTATUSTYPE + MFAREGISTERED_REGISTRATIONSTATUSTYPE + UNKNOWNFUTUREVALUE_REGISTRATIONSTATUSTYPE +) + +func (i RegistrationStatusType) String() string { + return []string{"registered", "enabled", "capable", "mfaRegistered", "unknownFutureValue"}[i] +} +func ParseRegistrationStatusType(v string) (interface{}, error) { + result := REGISTERED_REGISTRATIONSTATUSTYPE + switch v { + case "registered": + result = REGISTERED_REGISTRATIONSTATUSTYPE + case "enabled": + result = ENABLED_REGISTRATIONSTATUSTYPE + case "capable": + result = CAPABLE_REGISTRATIONSTATUSTYPE + case "mfaRegistered": + result = MFAREGISTERED_REGISTRATIONSTATUSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REGISTRATIONSTATUSTYPE + default: + return 0, errors.New("Unknown RegistrationStatusType value: " + v) + } + return &result, nil +} +func SerializeRegistrationStatusType(values []RegistrationStatusType) []string { + 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/registry_hive.go b/src/internal/connector/graph/betasdk/models/registry_hive.go new file mode 100644 index 000000000..9eff2d424 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_hive.go @@ -0,0 +1,55 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RegistryHive int + +const ( + UNKNOWN_REGISTRYHIVE RegistryHive = iota + CURRENTCONFIG_REGISTRYHIVE + CURRENTUSER_REGISTRYHIVE + LOCALMACHINESAM_REGISTRYHIVE + LOCALMACHINESECURITY_REGISTRYHIVE + LOCALMACHINESOFTWARE_REGISTRYHIVE + LOCALMACHINESYSTEM_REGISTRYHIVE + USERSDEFAULT_REGISTRYHIVE + UNKNOWNFUTUREVALUE_REGISTRYHIVE +) + +func (i RegistryHive) String() string { + return []string{"unknown", "currentConfig", "currentUser", "localMachineSam", "localMachineSecurity", "localMachineSoftware", "localMachineSystem", "usersDefault", "unknownFutureValue"}[i] +} +func ParseRegistryHive(v string) (interface{}, error) { + result := UNKNOWN_REGISTRYHIVE + switch v { + case "unknown": + result = UNKNOWN_REGISTRYHIVE + case "currentConfig": + result = CURRENTCONFIG_REGISTRYHIVE + case "currentUser": + result = CURRENTUSER_REGISTRYHIVE + case "localMachineSam": + result = LOCALMACHINESAM_REGISTRYHIVE + case "localMachineSecurity": + result = LOCALMACHINESECURITY_REGISTRYHIVE + case "localMachineSoftware": + result = LOCALMACHINESOFTWARE_REGISTRYHIVE + case "localMachineSystem": + result = LOCALMACHINESYSTEM_REGISTRYHIVE + case "usersDefault": + result = USERSDEFAULT_REGISTRYHIVE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REGISTRYHIVE + default: + return 0, errors.New("Unknown RegistryHive value: " + v) + } + return &result, nil +} +func SerializeRegistryHive(values []RegistryHive) []string { + 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/registry_key_state.go b/src/internal/connector/graph/betasdk/models/registry_key_state.go new file mode 100644 index 000000000..58cf5b71e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_key_state.go @@ -0,0 +1,334 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyState +type RegistryKeyState struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A Windows registry hive : HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_LOCAL_MACHINE/SAM HKEY_LOCAL_MACHINE/Security HKEY_LOCAL_MACHINE/Software HKEY_LOCAL_MACHINE/System HKEY_USERS/.Default. Possible values are: unknown, currentConfig, currentUser, localMachineSam, localMachineSecurity, localMachineSoftware, localMachineSystem, usersDefault. + hive *RegistryHive + // Current (i.e. changed) registry key (excludes HIVE). + key *string + // The OdataType property + odataType *string + // Previous (i.e. before changed) registry key (excludes HIVE). + oldKey *string + // Previous (i.e. before changed) registry key value data (contents). + oldValueData *string + // Previous (i.e. before changed) registry key value name. + oldValueName *string + // Operation that changed the registry key name and/or value. Possible values are: unknown, create, modify, delete. + operation *RegistryOperation + // Process ID (PID) of the process that modified the registry key (process details will appear in the alert 'processes' collection). + processId *int32 + // Current (i.e. changed) registry key value data (contents). + valueData *string + // Current (i.e. changed) registry key value name + valueName *string + // Registry key value type REG_BINARY REG_DWORD REG_DWORD_LITTLE_ENDIAN REG_DWORD_BIG_ENDIANREG_EXPAND_SZ REG_LINK REG_MULTI_SZ REG_NONE REG_QWORD REG_QWORD_LITTLE_ENDIAN REG_SZ Possible values are: unknown, binary, dword, dwordLittleEndian, dwordBigEndian, expandSz, link, multiSz, none, qword, qwordlittleEndian, sz. + valueType *RegistryValueType +} +// NewRegistryKeyState instantiates a new registryKeyState and sets the default values. +func NewRegistryKeyState()(*RegistryKeyState) { + m := &RegistryKeyState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRegistryKeyStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegistryKeyStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegistryKeyState(), 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 *RegistryKeyState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegistryKeyState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRegistryHive) + if err != nil { + return err + } + if val != nil { + m.SetHive(val.(*RegistryHive)) + } + return nil + } + 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["oldKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldKey(val) + } + return nil + } + res["oldValueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldValueData(val) + } + return nil + } + res["oldValueName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldValueName(val) + } + return nil + } + res["operation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRegistryOperation) + if err != nil { + return err + } + if val != nil { + m.SetOperation(val.(*RegistryOperation)) + } + return nil + } + res["processId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetProcessId(val) + } + return nil + } + res["valueData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValueData(val) + } + return nil + } + res["valueName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetValueName(val) + } + return nil + } + res["valueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRegistryValueType) + if err != nil { + return err + } + if val != nil { + m.SetValueType(val.(*RegistryValueType)) + } + return nil + } + return res +} +// GetHive gets the hive property value. A Windows registry hive : HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_LOCAL_MACHINE/SAM HKEY_LOCAL_MACHINE/Security HKEY_LOCAL_MACHINE/Software HKEY_LOCAL_MACHINE/System HKEY_USERS/.Default. Possible values are: unknown, currentConfig, currentUser, localMachineSam, localMachineSecurity, localMachineSoftware, localMachineSystem, usersDefault. +func (m *RegistryKeyState) GetHive()(*RegistryHive) { + return m.hive +} +// GetKey gets the key property value. Current (i.e. changed) registry key (excludes HIVE). +func (m *RegistryKeyState) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RegistryKeyState) GetOdataType()(*string) { + return m.odataType +} +// GetOldKey gets the oldKey property value. Previous (i.e. before changed) registry key (excludes HIVE). +func (m *RegistryKeyState) GetOldKey()(*string) { + return m.oldKey +} +// GetOldValueData gets the oldValueData property value. Previous (i.e. before changed) registry key value data (contents). +func (m *RegistryKeyState) GetOldValueData()(*string) { + return m.oldValueData +} +// GetOldValueName gets the oldValueName property value. Previous (i.e. before changed) registry key value name. +func (m *RegistryKeyState) GetOldValueName()(*string) { + return m.oldValueName +} +// GetOperation gets the operation property value. Operation that changed the registry key name and/or value. Possible values are: unknown, create, modify, delete. +func (m *RegistryKeyState) GetOperation()(*RegistryOperation) { + return m.operation +} +// GetProcessId gets the processId property value. Process ID (PID) of the process that modified the registry key (process details will appear in the alert 'processes' collection). +func (m *RegistryKeyState) GetProcessId()(*int32) { + return m.processId +} +// GetValueData gets the valueData property value. Current (i.e. changed) registry key value data (contents). +func (m *RegistryKeyState) GetValueData()(*string) { + return m.valueData +} +// GetValueName gets the valueName property value. Current (i.e. changed) registry key value name +func (m *RegistryKeyState) GetValueName()(*string) { + return m.valueName +} +// GetValueType gets the valueType property value. Registry key value type REG_BINARY REG_DWORD REG_DWORD_LITTLE_ENDIAN REG_DWORD_BIG_ENDIANREG_EXPAND_SZ REG_LINK REG_MULTI_SZ REG_NONE REG_QWORD REG_QWORD_LITTLE_ENDIAN REG_SZ Possible values are: unknown, binary, dword, dwordLittleEndian, dwordBigEndian, expandSz, link, multiSz, none, qword, qwordlittleEndian, sz. +func (m *RegistryKeyState) GetValueType()(*RegistryValueType) { + return m.valueType +} +// Serialize serializes information the current object +func (m *RegistryKeyState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetHive() != nil { + cast := (*m.GetHive()).String() + err := writer.WriteStringValue("hive", &cast) + if err != nil { + return err + } + } + { + 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("oldKey", m.GetOldKey()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldValueData", m.GetOldValueData()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldValueName", m.GetOldValueName()) + if err != nil { + return err + } + } + if m.GetOperation() != nil { + cast := (*m.GetOperation()).String() + err := writer.WriteStringValue("operation", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("processId", m.GetProcessId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("valueData", m.GetValueData()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("valueName", m.GetValueName()) + if err != nil { + return err + } + } + if m.GetValueType() != nil { + cast := (*m.GetValueType()).String() + err := writer.WriteStringValue("valueType", &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 *RegistryKeyState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHive sets the hive property value. A Windows registry hive : HKEY_CURRENT_CONFIG HKEY_CURRENT_USER HKEY_LOCAL_MACHINE/SAM HKEY_LOCAL_MACHINE/Security HKEY_LOCAL_MACHINE/Software HKEY_LOCAL_MACHINE/System HKEY_USERS/.Default. Possible values are: unknown, currentConfig, currentUser, localMachineSam, localMachineSecurity, localMachineSoftware, localMachineSystem, usersDefault. +func (m *RegistryKeyState) SetHive(value *RegistryHive)() { + m.hive = value +} +// SetKey sets the key property value. Current (i.e. changed) registry key (excludes HIVE). +func (m *RegistryKeyState) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RegistryKeyState) SetOdataType(value *string)() { + m.odataType = value +} +// SetOldKey sets the oldKey property value. Previous (i.e. before changed) registry key (excludes HIVE). +func (m *RegistryKeyState) SetOldKey(value *string)() { + m.oldKey = value +} +// SetOldValueData sets the oldValueData property value. Previous (i.e. before changed) registry key value data (contents). +func (m *RegistryKeyState) SetOldValueData(value *string)() { + m.oldValueData = value +} +// SetOldValueName sets the oldValueName property value. Previous (i.e. before changed) registry key value name. +func (m *RegistryKeyState) SetOldValueName(value *string)() { + m.oldValueName = value +} +// SetOperation sets the operation property value. Operation that changed the registry key name and/or value. Possible values are: unknown, create, modify, delete. +func (m *RegistryKeyState) SetOperation(value *RegistryOperation)() { + m.operation = value +} +// SetProcessId sets the processId property value. Process ID (PID) of the process that modified the registry key (process details will appear in the alert 'processes' collection). +func (m *RegistryKeyState) SetProcessId(value *int32)() { + m.processId = value +} +// SetValueData sets the valueData property value. Current (i.e. changed) registry key value data (contents). +func (m *RegistryKeyState) SetValueData(value *string)() { + m.valueData = value +} +// SetValueName sets the valueName property value. Current (i.e. changed) registry key value name +func (m *RegistryKeyState) SetValueName(value *string)() { + m.valueName = value +} +// SetValueType sets the valueType property value. Registry key value type REG_BINARY REG_DWORD REG_DWORD_LITTLE_ENDIAN REG_DWORD_BIG_ENDIANREG_EXPAND_SZ REG_LINK REG_MULTI_SZ REG_NONE REG_QWORD REG_QWORD_LITTLE_ENDIAN REG_SZ Possible values are: unknown, binary, dword, dwordLittleEndian, dwordBigEndian, expandSz, link, multiSz, none, qword, qwordlittleEndian, sz. +func (m *RegistryKeyState) SetValueType(value *RegistryValueType)() { + m.valueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/registry_key_state_collection_response.go b/src/internal/connector/graph/betasdk/models/registry_key_state_collection_response.go new file mode 100644 index 000000000..1ff9240c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_key_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyStateCollectionResponse +type RegistryKeyStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RegistryKeyStateable +} +// NewRegistryKeyStateCollectionResponse instantiates a new RegistryKeyStateCollectionResponse and sets the default values. +func NewRegistryKeyStateCollectionResponse()(*RegistryKeyStateCollectionResponse) { + m := &RegistryKeyStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRegistryKeyStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegistryKeyStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegistryKeyStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegistryKeyStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRegistryKeyStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RegistryKeyStateable, len(val)) + for i, v := range val { + res[i] = v.(RegistryKeyStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RegistryKeyStateCollectionResponse) GetValue()([]RegistryKeyStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *RegistryKeyStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RegistryKeyStateCollectionResponse) SetValue(value []RegistryKeyStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/registry_key_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/registry_key_state_collection_responseable.go new file mode 100644 index 000000000..f3c6d2936 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_key_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyStateCollectionResponseable +type RegistryKeyStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RegistryKeyStateable) + SetValue(value []RegistryKeyStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/registry_key_stateable.go b/src/internal/connector/graph/betasdk/models/registry_key_stateable.go new file mode 100644 index 000000000..e9906f1a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_key_stateable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyStateable +type RegistryKeyStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHive()(*RegistryHive) + GetKey()(*string) + GetOdataType()(*string) + GetOldKey()(*string) + GetOldValueData()(*string) + GetOldValueName()(*string) + GetOperation()(*RegistryOperation) + GetProcessId()(*int32) + GetValueData()(*string) + GetValueName()(*string) + GetValueType()(*RegistryValueType) + SetHive(value *RegistryHive)() + SetKey(value *string)() + SetOdataType(value *string)() + SetOldKey(value *string)() + SetOldValueData(value *string)() + SetOldValueName(value *string)() + SetOperation(value *RegistryOperation)() + SetProcessId(value *int32)() + SetValueData(value *string)() + SetValueName(value *string)() + SetValueType(value *RegistryValueType)() +} diff --git a/src/internal/connector/graph/betasdk/models/registry_operation.go b/src/internal/connector/graph/betasdk/models/registry_operation.go new file mode 100644 index 000000000..ebea67f4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_operation.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RegistryOperation int + +const ( + UNKNOWN_REGISTRYOPERATION RegistryOperation = iota + CREATE_REGISTRYOPERATION + MODIFY_REGISTRYOPERATION + DELETE_REGISTRYOPERATION + UNKNOWNFUTUREVALUE_REGISTRYOPERATION +) + +func (i RegistryOperation) String() string { + return []string{"unknown", "create", "modify", "delete", "unknownFutureValue"}[i] +} +func ParseRegistryOperation(v string) (interface{}, error) { + result := UNKNOWN_REGISTRYOPERATION + switch v { + case "unknown": + result = UNKNOWN_REGISTRYOPERATION + case "create": + result = CREATE_REGISTRYOPERATION + case "modify": + result = MODIFY_REGISTRYOPERATION + case "delete": + result = DELETE_REGISTRYOPERATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REGISTRYOPERATION + default: + return 0, errors.New("Unknown RegistryOperation value: " + v) + } + return &result, nil +} +func SerializeRegistryOperation(values []RegistryOperation) []string { + 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/registry_value_type.go b/src/internal/connector/graph/betasdk/models/registry_value_type.go new file mode 100644 index 000000000..fe1ab25df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/registry_value_type.go @@ -0,0 +1,67 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RegistryValueType int + +const ( + UNKNOWN_REGISTRYVALUETYPE RegistryValueType = iota + BINARY_REGISTRYVALUETYPE + DWORD_REGISTRYVALUETYPE + DWORDLITTLEENDIAN_REGISTRYVALUETYPE + DWORDBIGENDIAN_REGISTRYVALUETYPE + EXPANDSZ_REGISTRYVALUETYPE + LINK_REGISTRYVALUETYPE + MULTISZ_REGISTRYVALUETYPE + NONE_REGISTRYVALUETYPE + QWORD_REGISTRYVALUETYPE + QWORDLITTLEENDIAN_REGISTRYVALUETYPE + SZ_REGISTRYVALUETYPE + UNKNOWNFUTUREVALUE_REGISTRYVALUETYPE +) + +func (i RegistryValueType) String() string { + return []string{"unknown", "binary", "dword", "dwordLittleEndian", "dwordBigEndian", "expandSz", "link", "multiSz", "none", "qword", "qwordlittleEndian", "sz", "unknownFutureValue"}[i] +} +func ParseRegistryValueType(v string) (interface{}, error) { + result := UNKNOWN_REGISTRYVALUETYPE + switch v { + case "unknown": + result = UNKNOWN_REGISTRYVALUETYPE + case "binary": + result = BINARY_REGISTRYVALUETYPE + case "dword": + result = DWORD_REGISTRYVALUETYPE + case "dwordLittleEndian": + result = DWORDLITTLEENDIAN_REGISTRYVALUETYPE + case "dwordBigEndian": + result = DWORDBIGENDIAN_REGISTRYVALUETYPE + case "expandSz": + result = EXPANDSZ_REGISTRYVALUETYPE + case "link": + result = LINK_REGISTRYVALUETYPE + case "multiSz": + result = MULTISZ_REGISTRYVALUETYPE + case "none": + result = NONE_REGISTRYVALUETYPE + case "qword": + result = QWORD_REGISTRYVALUETYPE + case "qwordlittleEndian": + result = QWORDLITTLEENDIAN_REGISTRYVALUETYPE + case "sz": + result = SZ_REGISTRYVALUETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REGISTRYVALUETYPE + default: + return 0, errors.New("Unknown RegistryValueType value: " + v) + } + return &result, nil +} +func SerializeRegistryValueType(values []RegistryValueType) []string { + 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/related_contact.go b/src/internal/connector/graph/betasdk/models/related_contact.go new file mode 100644 index 000000000..2c88616fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_contact.go @@ -0,0 +1,228 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedContact +type RelatedContact struct { + // Indicates whether the user has been consented to access student data. + accessConsent *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the contact. Required. + displayName *string + // Email address of the contact. + emailAddress *string + // The id property + id *string + // Mobile phone number of the contact. + mobilePhone *string + // The OdataType property + odataType *string + // The relationship property + relationship *ContactRelationship +} +// NewRelatedContact instantiates a new relatedContact and sets the default values. +func NewRelatedContact()(*RelatedContact) { + m := &RelatedContact{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRelatedContactFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelatedContactFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelatedContact(), nil +} +// GetAccessConsent gets the accessConsent property value. Indicates whether the user has been consented to access student data. +func (m *RelatedContact) GetAccessConsent()(*bool) { + return m.accessConsent +} +// 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 *RelatedContact) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of the contact. Required. +func (m *RelatedContact) GetDisplayName()(*string) { + return m.displayName +} +// GetEmailAddress gets the emailAddress property value. Email address of the contact. +func (m *RelatedContact) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelatedContact) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accessConsent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccessConsent(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["mobilePhone"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMobilePhone(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["relationship"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContactRelationship) + if err != nil { + return err + } + if val != nil { + m.SetRelationship(val.(*ContactRelationship)) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *RelatedContact) GetId()(*string) { + return m.id +} +// GetMobilePhone gets the mobilePhone property value. Mobile phone number of the contact. +func (m *RelatedContact) GetMobilePhone()(*string) { + return m.mobilePhone +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RelatedContact) GetOdataType()(*string) { + return m.odataType +} +// GetRelationship gets the relationship property value. The relationship property +func (m *RelatedContact) GetRelationship()(*ContactRelationship) { + return m.relationship +} +// Serialize serializes information the current object +func (m *RelatedContact) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("accessConsent", m.GetAccessConsent()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mobilePhone", m.GetMobilePhone()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRelationship() != nil { + cast := (*m.GetRelationship()).String() + err := writer.WriteStringValue("relationship", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccessConsent sets the accessConsent property value. Indicates whether the user has been consented to access student data. +func (m *RelatedContact) SetAccessConsent(value *bool)() { + m.accessConsent = value +} +// 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 *RelatedContact) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of the contact. Required. +func (m *RelatedContact) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEmailAddress sets the emailAddress property value. Email address of the contact. +func (m *RelatedContact) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetId sets the id property value. The id property +func (m *RelatedContact) SetId(value *string)() { + m.id = value +} +// SetMobilePhone sets the mobilePhone property value. Mobile phone number of the contact. +func (m *RelatedContact) SetMobilePhone(value *string)() { + m.mobilePhone = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RelatedContact) SetOdataType(value *string)() { + m.odataType = value +} +// SetRelationship sets the relationship property value. The relationship property +func (m *RelatedContact) SetRelationship(value *ContactRelationship)() { + m.relationship = value +} diff --git a/src/internal/connector/graph/betasdk/models/related_contact_collection_response.go b/src/internal/connector/graph/betasdk/models/related_contact_collection_response.go new file mode 100644 index 000000000..e149739e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_contact_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedContactCollectionResponse +type RelatedContactCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RelatedContactable +} +// NewRelatedContactCollectionResponse instantiates a new RelatedContactCollectionResponse and sets the default values. +func NewRelatedContactCollectionResponse()(*RelatedContactCollectionResponse) { + m := &RelatedContactCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRelatedContactCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelatedContactCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelatedContactCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelatedContactCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelatedContactFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RelatedContactable, len(val)) + for i, v := range val { + res[i] = v.(RelatedContactable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RelatedContactCollectionResponse) GetValue()([]RelatedContactable) { + return m.value +} +// Serialize serializes information the current object +func (m *RelatedContactCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RelatedContactCollectionResponse) SetValue(value []RelatedContactable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/related_contact_collection_responseable.go b/src/internal/connector/graph/betasdk/models/related_contact_collection_responseable.go new file mode 100644 index 000000000..81b429310 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_contact_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedContactCollectionResponseable +type RelatedContactCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RelatedContactable) + SetValue(value []RelatedContactable)() +} diff --git a/src/internal/connector/graph/betasdk/models/related_contactable.go b/src/internal/connector/graph/betasdk/models/related_contactable.go new file mode 100644 index 000000000..853458893 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_contactable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedContactable +type RelatedContactable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccessConsent()(*bool) + GetDisplayName()(*string) + GetEmailAddress()(*string) + GetId()(*string) + GetMobilePhone()(*string) + GetOdataType()(*string) + GetRelationship()(*ContactRelationship) + SetAccessConsent(value *bool)() + SetDisplayName(value *string)() + SetEmailAddress(value *string)() + SetId(value *string)() + SetMobilePhone(value *string)() + SetOdataType(value *string)() + SetRelationship(value *ContactRelationship)() +} diff --git a/src/internal/connector/graph/betasdk/models/related_person.go b/src/internal/connector/graph/betasdk/models/related_person.go new file mode 100644 index 000000000..a99c6c98a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_person.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedPerson +type RelatedPerson struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the person. + displayName *string + // The OdataType property + odataType *string + // Possible values are: manager, colleague, directReport, dotLineReport, assistant, dotLineManager, alternateContact, friend, spouse, sibling, child, parent, sponsor, emergencyContact, other, unknownFutureValue. + relationship *PersonRelationship + // Email address or reference to person within organization. + userPrincipalName *string +} +// NewRelatedPerson instantiates a new relatedPerson and sets the default values. +func NewRelatedPerson()(*RelatedPerson) { + m := &RelatedPerson{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRelatedPersonFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelatedPersonFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelatedPerson(), 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 *RelatedPerson) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of the person. +func (m *RelatedPerson) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelatedPerson) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["relationship"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePersonRelationship) + if err != nil { + return err + } + if val != nil { + m.SetRelationship(val.(*PersonRelationship)) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RelatedPerson) GetOdataType()(*string) { + return m.odataType +} +// GetRelationship gets the relationship property value. Possible values are: manager, colleague, directReport, dotLineReport, assistant, dotLineManager, alternateContact, friend, spouse, sibling, child, parent, sponsor, emergencyContact, other, unknownFutureValue. +func (m *RelatedPerson) GetRelationship()(*PersonRelationship) { + return m.relationship +} +// GetUserPrincipalName gets the userPrincipalName property value. Email address or reference to person within organization. +func (m *RelatedPerson) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *RelatedPerson) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRelationship() != nil { + cast := (*m.GetRelationship()).String() + err := writer.WriteStringValue("relationship", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *RelatedPerson) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of the person. +func (m *RelatedPerson) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RelatedPerson) SetOdataType(value *string)() { + m.odataType = value +} +// SetRelationship sets the relationship property value. Possible values are: manager, colleague, directReport, dotLineReport, assistant, dotLineManager, alternateContact, friend, spouse, sibling, child, parent, sponsor, emergencyContact, other, unknownFutureValue. +func (m *RelatedPerson) SetRelationship(value *PersonRelationship)() { + m.relationship = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Email address or reference to person within organization. +func (m *RelatedPerson) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/related_person_collection_response.go b/src/internal/connector/graph/betasdk/models/related_person_collection_response.go new file mode 100644 index 000000000..97a2217fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_person_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedPersonCollectionResponse +type RelatedPersonCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RelatedPersonable +} +// NewRelatedPersonCollectionResponse instantiates a new RelatedPersonCollectionResponse and sets the default values. +func NewRelatedPersonCollectionResponse()(*RelatedPersonCollectionResponse) { + m := &RelatedPersonCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRelatedPersonCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelatedPersonCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelatedPersonCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelatedPersonCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRelatedPersonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RelatedPersonable, len(val)) + for i, v := range val { + res[i] = v.(RelatedPersonable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RelatedPersonCollectionResponse) GetValue()([]RelatedPersonable) { + return m.value +} +// Serialize serializes information the current object +func (m *RelatedPersonCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RelatedPersonCollectionResponse) SetValue(value []RelatedPersonable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/related_person_collection_responseable.go b/src/internal/connector/graph/betasdk/models/related_person_collection_responseable.go new file mode 100644 index 000000000..9dfdc0755 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_person_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedPersonCollectionResponseable +type RelatedPersonCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RelatedPersonable) + SetValue(value []RelatedPersonable)() +} diff --git a/src/internal/connector/graph/betasdk/models/related_personable.go b/src/internal/connector/graph/betasdk/models/related_personable.go new file mode 100644 index 000000000..21c48501a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/related_personable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelatedPersonable +type RelatedPersonable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetRelationship()(*PersonRelationship) + GetUserPrincipalName()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetRelationship(value *PersonRelationship)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/relying_party_detailed_summary.go b/src/internal/connector/graph/betasdk/models/relying_party_detailed_summary.go new file mode 100644 index 000000000..2dbd1e3d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/relying_party_detailed_summary.go @@ -0,0 +1,333 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelyingPartyDetailedSummary +type RelyingPartyDetailedSummary struct { + Entity + // Number of failed sign in on Active Directory Federation Service in the period specified. + failedSignInCount *int64 + // The migrationStatus property + migrationStatus *MigrationStatus + // Specifies all the validations check done on applications configuration details to evaluate if the application is ready to be moved to Azure AD. + migrationValidationDetails []KeyValuePairable + // This identifier is used to identify the relying party to this Federation Service. It is used when issuing claims to the relying party. + relyingPartyId *string + // Name of application or other entity on the internet that uses an identity provider to authenticate a user who wants to log in. + relyingPartyName *string + // Specifies where the relying party expects to receive the token. + replyUrls []string + // Uniquely identifies the Active Directory forest. + serviceId *string + // Number of successful / (number of successful + number of failed sign ins) on Active Directory Federation Service in the period specified. + signInSuccessRate *float64 + // Number of successful sign ins on Active Directory Federation Service. + successfulSignInCount *int64 + // Number of successful + failed sign ins failed sign ins on Active Directory Federation Service in the period specified. + totalSignInCount *int64 + // Number of unique users that have signed into the application. + uniqueUserCount *int64 +} +// NewRelyingPartyDetailedSummary instantiates a new RelyingPartyDetailedSummary and sets the default values. +func NewRelyingPartyDetailedSummary()(*RelyingPartyDetailedSummary) { + m := &RelyingPartyDetailedSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateRelyingPartyDetailedSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRelyingPartyDetailedSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRelyingPartyDetailedSummary(), nil +} +// GetFailedSignInCount gets the failedSignInCount property value. Number of failed sign in on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) GetFailedSignInCount()(*int64) { + return m.failedSignInCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RelyingPartyDetailedSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["failedSignInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedSignInCount(val) + } + return nil + } + res["migrationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseMigrationStatus) + if err != nil { + return err + } + if val != nil { + m.SetMigrationStatus(val.(*MigrationStatus)) + } + return nil + } + res["migrationValidationDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetMigrationValidationDetails(res) + } + return nil + } + res["relyingPartyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelyingPartyId(val) + } + return nil + } + res["relyingPartyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelyingPartyName(val) + } + return nil + } + res["replyUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReplyUrls(res) + } + return nil + } + res["serviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceId(val) + } + return nil + } + res["signInSuccessRate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetSignInSuccessRate(val) + } + return nil + } + res["successfulSignInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSuccessfulSignInCount(val) + } + return nil + } + res["totalSignInCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalSignInCount(val) + } + return nil + } + res["uniqueUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUniqueUserCount(val) + } + return nil + } + return res +} +// GetMigrationStatus gets the migrationStatus property value. The migrationStatus property +func (m *RelyingPartyDetailedSummary) GetMigrationStatus()(*MigrationStatus) { + return m.migrationStatus +} +// GetMigrationValidationDetails gets the migrationValidationDetails property value. Specifies all the validations check done on applications configuration details to evaluate if the application is ready to be moved to Azure AD. +func (m *RelyingPartyDetailedSummary) GetMigrationValidationDetails()([]KeyValuePairable) { + return m.migrationValidationDetails +} +// GetRelyingPartyId gets the relyingPartyId property value. This identifier is used to identify the relying party to this Federation Service. It is used when issuing claims to the relying party. +func (m *RelyingPartyDetailedSummary) GetRelyingPartyId()(*string) { + return m.relyingPartyId +} +// GetRelyingPartyName gets the relyingPartyName property value. Name of application or other entity on the internet that uses an identity provider to authenticate a user who wants to log in. +func (m *RelyingPartyDetailedSummary) GetRelyingPartyName()(*string) { + return m.relyingPartyName +} +// GetReplyUrls gets the replyUrls property value. Specifies where the relying party expects to receive the token. +func (m *RelyingPartyDetailedSummary) GetReplyUrls()([]string) { + return m.replyUrls +} +// GetServiceId gets the serviceId property value. Uniquely identifies the Active Directory forest. +func (m *RelyingPartyDetailedSummary) GetServiceId()(*string) { + return m.serviceId +} +// GetSignInSuccessRate gets the signInSuccessRate property value. Number of successful / (number of successful + number of failed sign ins) on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) GetSignInSuccessRate()(*float64) { + return m.signInSuccessRate +} +// GetSuccessfulSignInCount gets the successfulSignInCount property value. Number of successful sign ins on Active Directory Federation Service. +func (m *RelyingPartyDetailedSummary) GetSuccessfulSignInCount()(*int64) { + return m.successfulSignInCount +} +// GetTotalSignInCount gets the totalSignInCount property value. Number of successful + failed sign ins failed sign ins on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) GetTotalSignInCount()(*int64) { + return m.totalSignInCount +} +// GetUniqueUserCount gets the uniqueUserCount property value. Number of unique users that have signed into the application. +func (m *RelyingPartyDetailedSummary) GetUniqueUserCount()(*int64) { + return m.uniqueUserCount +} +// Serialize serializes information the current object +func (m *RelyingPartyDetailedSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("failedSignInCount", m.GetFailedSignInCount()) + if err != nil { + return err + } + } + if m.GetMigrationStatus() != nil { + cast := (*m.GetMigrationStatus()).String() + err = writer.WriteStringValue("migrationStatus", &cast) + if err != nil { + return err + } + } + if m.GetMigrationValidationDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMigrationValidationDetails())) + for i, v := range m.GetMigrationValidationDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("migrationValidationDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("relyingPartyId", m.GetRelyingPartyId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("relyingPartyName", m.GetRelyingPartyName()) + if err != nil { + return err + } + } + if m.GetReplyUrls() != nil { + err = writer.WriteCollectionOfStringValues("replyUrls", m.GetReplyUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("serviceId", m.GetServiceId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("signInSuccessRate", m.GetSignInSuccessRate()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("successfulSignInCount", m.GetSuccessfulSignInCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("totalSignInCount", m.GetTotalSignInCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("uniqueUserCount", m.GetUniqueUserCount()) + if err != nil { + return err + } + } + return nil +} +// SetFailedSignInCount sets the failedSignInCount property value. Number of failed sign in on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) SetFailedSignInCount(value *int64)() { + m.failedSignInCount = value +} +// SetMigrationStatus sets the migrationStatus property value. The migrationStatus property +func (m *RelyingPartyDetailedSummary) SetMigrationStatus(value *MigrationStatus)() { + m.migrationStatus = value +} +// SetMigrationValidationDetails sets the migrationValidationDetails property value. Specifies all the validations check done on applications configuration details to evaluate if the application is ready to be moved to Azure AD. +func (m *RelyingPartyDetailedSummary) SetMigrationValidationDetails(value []KeyValuePairable)() { + m.migrationValidationDetails = value +} +// SetRelyingPartyId sets the relyingPartyId property value. This identifier is used to identify the relying party to this Federation Service. It is used when issuing claims to the relying party. +func (m *RelyingPartyDetailedSummary) SetRelyingPartyId(value *string)() { + m.relyingPartyId = value +} +// SetRelyingPartyName sets the relyingPartyName property value. Name of application or other entity on the internet that uses an identity provider to authenticate a user who wants to log in. +func (m *RelyingPartyDetailedSummary) SetRelyingPartyName(value *string)() { + m.relyingPartyName = value +} +// SetReplyUrls sets the replyUrls property value. Specifies where the relying party expects to receive the token. +func (m *RelyingPartyDetailedSummary) SetReplyUrls(value []string)() { + m.replyUrls = value +} +// SetServiceId sets the serviceId property value. Uniquely identifies the Active Directory forest. +func (m *RelyingPartyDetailedSummary) SetServiceId(value *string)() { + m.serviceId = value +} +// SetSignInSuccessRate sets the signInSuccessRate property value. Number of successful / (number of successful + number of failed sign ins) on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) SetSignInSuccessRate(value *float64)() { + m.signInSuccessRate = value +} +// SetSuccessfulSignInCount sets the successfulSignInCount property value. Number of successful sign ins on Active Directory Federation Service. +func (m *RelyingPartyDetailedSummary) SetSuccessfulSignInCount(value *int64)() { + m.successfulSignInCount = value +} +// SetTotalSignInCount sets the totalSignInCount property value. Number of successful + failed sign ins failed sign ins on Active Directory Federation Service in the period specified. +func (m *RelyingPartyDetailedSummary) SetTotalSignInCount(value *int64)() { + m.totalSignInCount = value +} +// SetUniqueUserCount sets the uniqueUserCount property value. Number of unique users that have signed into the application. +func (m *RelyingPartyDetailedSummary) SetUniqueUserCount(value *int64)() { + m.uniqueUserCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/relying_party_detailed_summaryable.go b/src/internal/connector/graph/betasdk/models/relying_party_detailed_summaryable.go new file mode 100644 index 000000000..890ac5053 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/relying_party_detailed_summaryable.go @@ -0,0 +1,33 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RelyingPartyDetailedSummaryable +type RelyingPartyDetailedSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedSignInCount()(*int64) + GetMigrationStatus()(*MigrationStatus) + GetMigrationValidationDetails()([]KeyValuePairable) + GetRelyingPartyId()(*string) + GetRelyingPartyName()(*string) + GetReplyUrls()([]string) + GetServiceId()(*string) + GetSignInSuccessRate()(*float64) + GetSuccessfulSignInCount()(*int64) + GetTotalSignInCount()(*int64) + GetUniqueUserCount()(*int64) + SetFailedSignInCount(value *int64)() + SetMigrationStatus(value *MigrationStatus)() + SetMigrationValidationDetails(value []KeyValuePairable)() + SetRelyingPartyId(value *string)() + SetRelyingPartyName(value *string)() + SetReplyUrls(value []string)() + SetServiceId(value *string)() + SetSignInSuccessRate(value *float64)() + SetSuccessfulSignInCount(value *int64)() + SetTotalSignInCount(value *int64)() + SetUniqueUserCount(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/remediation_state.go b/src/internal/connector/graph/betasdk/models/remediation_state.go new file mode 100644 index 000000000..2d7f06a17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remediation_state.go @@ -0,0 +1,48 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RemediationState int + +const ( + // Unknown result. + UNKNOWN_REMEDIATIONSTATE RemediationState = iota + // Remediation script execution was skipped + SKIPPED_REMEDIATIONSTATE + // Remediation script executed successfully and remediated the device state + SUCCESS_REMEDIATIONSTATE + // Remediation script executed successfully but failed to remediated the device state + REMEDIATIONFAILED_REMEDIATIONSTATE + // Remediation script execution encountered and error or timed out + SCRIPTERROR_REMEDIATIONSTATE +) + +func (i RemediationState) String() string { + return []string{"unknown", "skipped", "success", "remediationFailed", "scriptError"}[i] +} +func ParseRemediationState(v string) (interface{}, error) { + result := UNKNOWN_REMEDIATIONSTATE + switch v { + case "unknown": + result = UNKNOWN_REMEDIATIONSTATE + case "skipped": + result = SKIPPED_REMEDIATIONSTATE + case "success": + result = SUCCESS_REMEDIATIONSTATE + case "remediationFailed": + result = REMEDIATIONFAILED_REMEDIATIONSTATE + case "scriptError": + result = SCRIPTERROR_REMEDIATIONSTATE + default: + return 0, errors.New("Unknown RemediationState value: " + v) + } + return &result, nil +} +func SerializeRemediationState(values []RemediationState) []string { + 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/remote_action.go b/src/internal/connector/graph/betasdk/models/remote_action.go new file mode 100644 index 000000000..9248fd3c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_action.go @@ -0,0 +1,144 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RemoteAction int + +const ( + // Indicate user initiates an unknown action. + UNKNOWN_REMOTEACTION RemoteAction = iota + // Indicate user initiates an action to factory reset a device. + FACTORYRESET_REMOTEACTION + // Indicate user initiates an action to remove company data from a device. + REMOVECOMPANYDATA_REMOTEACTION + // Indicate user initiates an action to remove the passcode of an iOS device, or reset the passcode of Android / Windows device. + RESETPASSCODE_REMOTEACTION + // Indicate user initiates an action to remote lock a device. + REMOTELOCK_REMOTEACTION + // Indicate user initiates an action to enable lost mode on a supervised iOS device. + ENABLELOSTMODE_REMOTEACTION + // Indicate user initiates an action to disable lost mode on a supervised iOS device. + DISABLELOSTMODE_REMOTEACTION + // Indicate user initiates an action to locate a supervised iOS device. + LOCATEDEVICE_REMOTEACTION + // Indicate user initiates an action to reboot the device. + REBOOTNOW_REMOTEACTION + // Indicate user initiates an action to reset the pin for passport for work on windows phone device. + RECOVERPASSCODE_REMOTEACTION + // Indicate user initiates an action to clean up windows device. + CLEANWINDOWSDEVICE_REMOTEACTION + // Indicate user initiates an action to log out current user on shared apple device. + LOGOUTSHAREDAPPLEDEVICEACTIVEUSER_REMOTEACTION + // Indicate user initiates an action to run quick scan on device. + QUICKSCAN_REMOTEACTION + // Indicate user initiates an action to run full scan on device. + FULLSCAN_REMOTEACTION + // Indicate user initiates an action to update malware signatures on device. + WINDOWSDEFENDERUPDATESIGNATURES_REMOTEACTION + // Indicate user initiates an action remote wipe device with keeping enrollment data. + FACTORYRESETKEEPENROLLMENTDATA_REMOTEACTION + // Indicate user initiates an action to update account on device. + UPDATEDEVICEACCOUNT_REMOTEACTION + // Indicate user initiates an action to automatic redeploy the device + AUTOMATICREDEPLOYMENT_REMOTEACTION + // Indicate user initiates an action to shut down the device. + SHUTDOWN_REMOTEACTION + // Indicate user initiates an action to Rotate BitLockerKeys on the device. + ROTATEBITLOCKERKEYS_REMOTEACTION + // Indicate user initiates an action to Rotate FileVaultKey on mac. + ROTATEFILEVAULTKEY_REMOTEACTION + // Indicate user initiates an action to Get FileVaultKey on mac. + GETFILEVAULTKEY_REMOTEACTION + // Indicate user initiates an action to Set Device Name on the device. + SETDEVICENAME_REMOTEACTION + // Indicate user initiates an action to Activate eSIM on the device. + ACTIVATEDEVICEESIM_REMOTEACTION + // Indicate user initiates an action to deprovision the device. + DEPROVISION_REMOTEACTION + // Indicate user initiates an action to disable the device. + DISABLE_REMOTEACTION + // Indicate user initiates an action to reenable the device. + REENABLE_REMOTEACTION + // Indicate user initiates an action to move the device to a new organizational unit. + MOVEDEVICETOORGANIZATIONALUNIT_REMOTEACTION + // Add device action of InitiateMobileDeviceManagementKeyRecovery + INITIATEMOBILEDEVICEMANAGEMENTKEYRECOVERY_REMOTEACTION +) + +func (i RemoteAction) String() string { + return []string{"unknown", "factoryReset", "removeCompanyData", "resetPasscode", "remoteLock", "enableLostMode", "disableLostMode", "locateDevice", "rebootNow", "recoverPasscode", "cleanWindowsDevice", "logoutSharedAppleDeviceActiveUser", "quickScan", "fullScan", "windowsDefenderUpdateSignatures", "factoryResetKeepEnrollmentData", "updateDeviceAccount", "automaticRedeployment", "shutDown", "rotateBitLockerKeys", "rotateFileVaultKey", "getFileVaultKey", "setDeviceName", "activateDeviceEsim", "deprovision", "disable", "reenable", "moveDeviceToOrganizationalUnit", "initiateMobileDeviceManagementKeyRecovery"}[i] +} +func ParseRemoteAction(v string) (interface{}, error) { + result := UNKNOWN_REMOTEACTION + switch v { + case "unknown": + result = UNKNOWN_REMOTEACTION + case "factoryReset": + result = FACTORYRESET_REMOTEACTION + case "removeCompanyData": + result = REMOVECOMPANYDATA_REMOTEACTION + case "resetPasscode": + result = RESETPASSCODE_REMOTEACTION + case "remoteLock": + result = REMOTELOCK_REMOTEACTION + case "enableLostMode": + result = ENABLELOSTMODE_REMOTEACTION + case "disableLostMode": + result = DISABLELOSTMODE_REMOTEACTION + case "locateDevice": + result = LOCATEDEVICE_REMOTEACTION + case "rebootNow": + result = REBOOTNOW_REMOTEACTION + case "recoverPasscode": + result = RECOVERPASSCODE_REMOTEACTION + case "cleanWindowsDevice": + result = CLEANWINDOWSDEVICE_REMOTEACTION + case "logoutSharedAppleDeviceActiveUser": + result = LOGOUTSHAREDAPPLEDEVICEACTIVEUSER_REMOTEACTION + case "quickScan": + result = QUICKSCAN_REMOTEACTION + case "fullScan": + result = FULLSCAN_REMOTEACTION + case "windowsDefenderUpdateSignatures": + result = WINDOWSDEFENDERUPDATESIGNATURES_REMOTEACTION + case "factoryResetKeepEnrollmentData": + result = FACTORYRESETKEEPENROLLMENTDATA_REMOTEACTION + case "updateDeviceAccount": + result = UPDATEDEVICEACCOUNT_REMOTEACTION + case "automaticRedeployment": + result = AUTOMATICREDEPLOYMENT_REMOTEACTION + case "shutDown": + result = SHUTDOWN_REMOTEACTION + case "rotateBitLockerKeys": + result = ROTATEBITLOCKERKEYS_REMOTEACTION + case "rotateFileVaultKey": + result = ROTATEFILEVAULTKEY_REMOTEACTION + case "getFileVaultKey": + result = GETFILEVAULTKEY_REMOTEACTION + case "setDeviceName": + result = SETDEVICENAME_REMOTEACTION + case "activateDeviceEsim": + result = ACTIVATEDEVICEESIM_REMOTEACTION + case "deprovision": + result = DEPROVISION_REMOTEACTION + case "disable": + result = DISABLE_REMOTEACTION + case "reenable": + result = REENABLE_REMOTEACTION + case "moveDeviceToOrganizationalUnit": + result = MOVEDEVICETOORGANIZATIONALUNIT_REMOTEACTION + case "initiateMobileDeviceManagementKeyRecovery": + result = INITIATEMOBILEDEVICEMANAGEMENTKEYRECOVERY_REMOTEACTION + default: + return 0, errors.New("Unknown RemoteAction value: " + v) + } + return &result, nil +} +func SerializeRemoteAction(values []RemoteAction) []string { + 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/remote_action_audit.go b/src/internal/connector/graph/betasdk/models/remote_action_audit.go new file mode 100644 index 000000000..905c9c39c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_action_audit.go @@ -0,0 +1,271 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteActionAudit report of remote actions initiated on the devices belonging to a certain tenant. +type RemoteActionAudit struct { + Entity + // Remote actions Intune supports. + action *RemoteAction + // The actionState property + actionState *ActionState + // Intune device name. + deviceDisplayName *string + // IMEI of the device. + deviceIMEI *string + // Upn of the device owner. + deviceOwnerUserPrincipalName *string + // User who initiated the device action, format is UPN. + initiatedByUserPrincipalName *string + // Action target. + managedDeviceId *string + // Time when the action was issued, given in UTC. + requestDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // [deprecated] Please use InitiatedByUserPrincipalName instead. + userName *string +} +// NewRemoteActionAudit instantiates a new remoteActionAudit and sets the default values. +func NewRemoteActionAudit()(*RemoteActionAudit) { + m := &RemoteActionAudit{ + Entity: *NewEntity(), + } + return m +} +// CreateRemoteActionAuditFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteActionAuditFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteActionAudit(), nil +} +// GetAction gets the action property value. Remote actions Intune supports. +func (m *RemoteActionAudit) GetAction()(*RemoteAction) { + return m.action +} +// GetActionState gets the actionState property value. The actionState property +func (m *RemoteActionAudit) GetActionState()(*ActionState) { + return m.actionState +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Intune device name. +func (m *RemoteActionAudit) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetDeviceIMEI gets the deviceIMEI property value. IMEI of the device. +func (m *RemoteActionAudit) GetDeviceIMEI()(*string) { + return m.deviceIMEI +} +// GetDeviceOwnerUserPrincipalName gets the deviceOwnerUserPrincipalName property value. Upn of the device owner. +func (m *RemoteActionAudit) GetDeviceOwnerUserPrincipalName()(*string) { + return m.deviceOwnerUserPrincipalName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteActionAudit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRemoteAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*RemoteAction)) + } + return nil + } + res["actionState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionState) + if err != nil { + return err + } + if val != nil { + m.SetActionState(val.(*ActionState)) + } + return nil + } + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["deviceIMEI"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceIMEI(val) + } + return nil + } + res["deviceOwnerUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceOwnerUserPrincipalName(val) + } + return nil + } + res["initiatedByUserPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedByUserPrincipalName(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["requestDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestDateTime(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetInitiatedByUserPrincipalName gets the initiatedByUserPrincipalName property value. User who initiated the device action, format is UPN. +func (m *RemoteActionAudit) GetInitiatedByUserPrincipalName()(*string) { + return m.initiatedByUserPrincipalName +} +// GetManagedDeviceId gets the managedDeviceId property value. Action target. +func (m *RemoteActionAudit) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetRequestDateTime gets the requestDateTime property value. Time when the action was issued, given in UTC. +func (m *RemoteActionAudit) GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.requestDateTime +} +// GetUserName gets the userName property value. [deprecated] Please use InitiatedByUserPrincipalName instead. +func (m *RemoteActionAudit) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *RemoteActionAudit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + if m.GetActionState() != nil { + cast := (*m.GetActionState()).String() + err = writer.WriteStringValue("actionState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceIMEI", m.GetDeviceIMEI()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceOwnerUserPrincipalName", m.GetDeviceOwnerUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedByUserPrincipalName", m.GetInitiatedByUserPrincipalName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("requestDateTime", m.GetRequestDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. Remote actions Intune supports. +func (m *RemoteActionAudit) SetAction(value *RemoteAction)() { + m.action = value +} +// SetActionState sets the actionState property value. The actionState property +func (m *RemoteActionAudit) SetActionState(value *ActionState)() { + m.actionState = value +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Intune device name. +func (m *RemoteActionAudit) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetDeviceIMEI sets the deviceIMEI property value. IMEI of the device. +func (m *RemoteActionAudit) SetDeviceIMEI(value *string)() { + m.deviceIMEI = value +} +// SetDeviceOwnerUserPrincipalName sets the deviceOwnerUserPrincipalName property value. Upn of the device owner. +func (m *RemoteActionAudit) SetDeviceOwnerUserPrincipalName(value *string)() { + m.deviceOwnerUserPrincipalName = value +} +// SetInitiatedByUserPrincipalName sets the initiatedByUserPrincipalName property value. User who initiated the device action, format is UPN. +func (m *RemoteActionAudit) SetInitiatedByUserPrincipalName(value *string)() { + m.initiatedByUserPrincipalName = value +} +// SetManagedDeviceId sets the managedDeviceId property value. Action target. +func (m *RemoteActionAudit) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetRequestDateTime sets the requestDateTime property value. Time when the action was issued, given in UTC. +func (m *RemoteActionAudit) SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.requestDateTime = value +} +// SetUserName sets the userName property value. [deprecated] Please use InitiatedByUserPrincipalName instead. +func (m *RemoteActionAudit) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_response.go b/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_response.go new file mode 100644 index 000000000..0222eda3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteActionAuditCollectionResponse +type RemoteActionAuditCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RemoteActionAuditable +} +// NewRemoteActionAuditCollectionResponse instantiates a new RemoteActionAuditCollectionResponse and sets the default values. +func NewRemoteActionAuditCollectionResponse()(*RemoteActionAuditCollectionResponse) { + m := &RemoteActionAuditCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRemoteActionAuditCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteActionAuditCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteActionAuditCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteActionAuditCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRemoteActionAuditFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RemoteActionAuditable, len(val)) + for i, v := range val { + res[i] = v.(RemoteActionAuditable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RemoteActionAuditCollectionResponse) GetValue()([]RemoteActionAuditable) { + return m.value +} +// Serialize serializes information the current object +func (m *RemoteActionAuditCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RemoteActionAuditCollectionResponse) SetValue(value []RemoteActionAuditable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_responseable.go b/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_responseable.go new file mode 100644 index 000000000..856e19c64 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_action_audit_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteActionAuditCollectionResponseable +type RemoteActionAuditCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RemoteActionAuditable) + SetValue(value []RemoteActionAuditable)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_action_auditable.go b/src/internal/connector/graph/betasdk/models/remote_action_auditable.go new file mode 100644 index 000000000..d27f3e036 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_action_auditable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteActionAuditable +type RemoteActionAuditable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*RemoteAction) + GetActionState()(*ActionState) + GetDeviceDisplayName()(*string) + GetDeviceIMEI()(*string) + GetDeviceOwnerUserPrincipalName()(*string) + GetInitiatedByUserPrincipalName()(*string) + GetManagedDeviceId()(*string) + GetRequestDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUserName()(*string) + SetAction(value *RemoteAction)() + SetActionState(value *ActionState)() + SetDeviceDisplayName(value *string)() + SetDeviceIMEI(value *string)() + SetDeviceOwnerUserPrincipalName(value *string)() + SetInitiatedByUserPrincipalName(value *string)() + SetManagedDeviceId(value *string)() + SetRequestDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_onboarding_status.go b/src/internal/connector/graph/betasdk/models/remote_assistance_onboarding_status.go new file mode 100644 index 000000000..9f3dbb1df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_onboarding_status.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RemoteAssistanceOnboardingStatus int + +const ( + // The status reported when there is no active TeamViewer connector configured or active + NOTONBOARDED_REMOTEASSISTANCEONBOARDINGSTATUS RemoteAssistanceOnboardingStatus = iota + // The status reported when the system has initiated a TeamViewer connection, but the service has not yet completed the confirmation of a connector + ONBOARDING_REMOTEASSISTANCEONBOARDINGSTATUS + // The status reported when the system has successfully exchanged account information with TeamViewer and can now initiate remote assistance sessions with clients + ONBOARDED_REMOTEASSISTANCEONBOARDINGSTATUS +) + +func (i RemoteAssistanceOnboardingStatus) String() string { + return []string{"notOnboarded", "onboarding", "onboarded"}[i] +} +func ParseRemoteAssistanceOnboardingStatus(v string) (interface{}, error) { + result := NOTONBOARDED_REMOTEASSISTANCEONBOARDINGSTATUS + switch v { + case "notOnboarded": + result = NOTONBOARDED_REMOTEASSISTANCEONBOARDINGSTATUS + case "onboarding": + result = ONBOARDING_REMOTEASSISTANCEONBOARDINGSTATUS + case "onboarded": + result = ONBOARDED_REMOTEASSISTANCEONBOARDINGSTATUS + default: + return 0, errors.New("Unknown RemoteAssistanceOnboardingStatus value: " + v) + } + return &result, nil +} +func SerializeRemoteAssistanceOnboardingStatus(values []RemoteAssistanceOnboardingStatus) []string { + 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/remote_assistance_partner.go b/src/internal/connector/graph/betasdk/models/remote_assistance_partner.go new file mode 100644 index 000000000..6f5c9a0d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_partner.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistancePartner remoteAssistPartner resources represent the metadata and status of a given Remote Assistance partner service. +type RemoteAssistancePartner struct { + Entity + // Display name of the partner. + displayName *string + // Timestamp of the last request sent to Intune by the TEM partner. + lastConnectionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // When the OnboardingStatus is Onboarding, This is the date time when the onboarding request expires. + onboardingRequestExpiryDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The current TeamViewer connector status + onboardingStatus *RemoteAssistanceOnboardingStatus + // URL of the partner's onboarding portal, where an administrator can configure their Remote Assistance service. + onboardingUrl *string +} +// NewRemoteAssistancePartner instantiates a new remoteAssistancePartner and sets the default values. +func NewRemoteAssistancePartner()(*RemoteAssistancePartner) { + m := &RemoteAssistancePartner{ + Entity: *NewEntity(), + } + return m +} +// CreateRemoteAssistancePartnerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteAssistancePartnerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteAssistancePartner(), nil +} +// GetDisplayName gets the displayName property value. Display name of the partner. +func (m *RemoteAssistancePartner) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteAssistancePartner) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastConnectionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastConnectionDateTime(val) + } + return nil + } + res["onboardingRequestExpiryDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetOnboardingRequestExpiryDateTime(val) + } + return nil + } + res["onboardingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRemoteAssistanceOnboardingStatus) + if err != nil { + return err + } + if val != nil { + m.SetOnboardingStatus(val.(*RemoteAssistanceOnboardingStatus)) + } + return nil + } + res["onboardingUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnboardingUrl(val) + } + return nil + } + return res +} +// GetLastConnectionDateTime gets the lastConnectionDateTime property value. Timestamp of the last request sent to Intune by the TEM partner. +func (m *RemoteAssistancePartner) GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastConnectionDateTime +} +// GetOnboardingRequestExpiryDateTime gets the onboardingRequestExpiryDateTime property value. When the OnboardingStatus is Onboarding, This is the date time when the onboarding request expires. +func (m *RemoteAssistancePartner) GetOnboardingRequestExpiryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.onboardingRequestExpiryDateTime +} +// GetOnboardingStatus gets the onboardingStatus property value. The current TeamViewer connector status +func (m *RemoteAssistancePartner) GetOnboardingStatus()(*RemoteAssistanceOnboardingStatus) { + return m.onboardingStatus +} +// GetOnboardingUrl gets the onboardingUrl property value. URL of the partner's onboarding portal, where an administrator can configure their Remote Assistance service. +func (m *RemoteAssistancePartner) GetOnboardingUrl()(*string) { + return m.onboardingUrl +} +// Serialize serializes information the current object +func (m *RemoteAssistancePartner) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastConnectionDateTime", m.GetLastConnectionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("onboardingRequestExpiryDateTime", m.GetOnboardingRequestExpiryDateTime()) + if err != nil { + return err + } + } + if m.GetOnboardingStatus() != nil { + cast := (*m.GetOnboardingStatus()).String() + err = writer.WriteStringValue("onboardingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("onboardingUrl", m.GetOnboardingUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. Display name of the partner. +func (m *RemoteAssistancePartner) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastConnectionDateTime sets the lastConnectionDateTime property value. Timestamp of the last request sent to Intune by the TEM partner. +func (m *RemoteAssistancePartner) SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastConnectionDateTime = value +} +// SetOnboardingRequestExpiryDateTime sets the onboardingRequestExpiryDateTime property value. When the OnboardingStatus is Onboarding, This is the date time when the onboarding request expires. +func (m *RemoteAssistancePartner) SetOnboardingRequestExpiryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.onboardingRequestExpiryDateTime = value +} +// SetOnboardingStatus sets the onboardingStatus property value. The current TeamViewer connector status +func (m *RemoteAssistancePartner) SetOnboardingStatus(value *RemoteAssistanceOnboardingStatus)() { + m.onboardingStatus = value +} +// SetOnboardingUrl sets the onboardingUrl property value. URL of the partner's onboarding portal, where an administrator can configure their Remote Assistance service. +func (m *RemoteAssistancePartner) SetOnboardingUrl(value *string)() { + m.onboardingUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_response.go b/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_response.go new file mode 100644 index 000000000..88fccb10d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistancePartnerCollectionResponse +type RemoteAssistancePartnerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RemoteAssistancePartnerable +} +// NewRemoteAssistancePartnerCollectionResponse instantiates a new RemoteAssistancePartnerCollectionResponse and sets the default values. +func NewRemoteAssistancePartnerCollectionResponse()(*RemoteAssistancePartnerCollectionResponse) { + m := &RemoteAssistancePartnerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRemoteAssistancePartnerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteAssistancePartnerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteAssistancePartnerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteAssistancePartnerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRemoteAssistancePartnerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RemoteAssistancePartnerable, len(val)) + for i, v := range val { + res[i] = v.(RemoteAssistancePartnerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RemoteAssistancePartnerCollectionResponse) GetValue()([]RemoteAssistancePartnerable) { + return m.value +} +// Serialize serializes information the current object +func (m *RemoteAssistancePartnerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RemoteAssistancePartnerCollectionResponse) SetValue(value []RemoteAssistancePartnerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_responseable.go b/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_responseable.go new file mode 100644 index 000000000..a10f26786 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_partner_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistancePartnerCollectionResponseable +type RemoteAssistancePartnerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RemoteAssistancePartnerable) + SetValue(value []RemoteAssistancePartnerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_partnerable.go b/src/internal/connector/graph/betasdk/models/remote_assistance_partnerable.go new file mode 100644 index 000000000..ab196ae7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_partnerable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistancePartnerable +type RemoteAssistancePartnerable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetLastConnectionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardingRequestExpiryDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOnboardingStatus()(*RemoteAssistanceOnboardingStatus) + GetOnboardingUrl()(*string) + SetDisplayName(value *string)() + SetLastConnectionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardingRequestExpiryDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOnboardingStatus(value *RemoteAssistanceOnboardingStatus)() + SetOnboardingUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_settings.go b/src/internal/connector/graph/betasdk/models/remote_assistance_settings.go new file mode 100644 index 000000000..357874455 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_settings.go @@ -0,0 +1,113 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistanceSettings +type RemoteAssistanceSettings struct { + Entity + // Indicates if sessions to unenrolled devices are allowed for the account. This setting is configurable by the admin. Default value is false. + allowSessionsToUnenrolledDevices *bool + // Indicates if sessions to block chat function. This setting is configurable by the admin. Default value is false. + blockChat *bool + // State of remote assistance for the account + remoteAssistanceState *RemoteAssistanceState +} +// NewRemoteAssistanceSettings instantiates a new remoteAssistanceSettings and sets the default values. +func NewRemoteAssistanceSettings()(*RemoteAssistanceSettings) { + m := &RemoteAssistanceSettings{ + Entity: *NewEntity(), + } + return m +} +// CreateRemoteAssistanceSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteAssistanceSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteAssistanceSettings(), nil +} +// GetAllowSessionsToUnenrolledDevices gets the allowSessionsToUnenrolledDevices property value. Indicates if sessions to unenrolled devices are allowed for the account. This setting is configurable by the admin. Default value is false. +func (m *RemoteAssistanceSettings) GetAllowSessionsToUnenrolledDevices()(*bool) { + return m.allowSessionsToUnenrolledDevices +} +// GetBlockChat gets the blockChat property value. Indicates if sessions to block chat function. This setting is configurable by the admin. Default value is false. +func (m *RemoteAssistanceSettings) GetBlockChat()(*bool) { + return m.blockChat +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteAssistanceSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["allowSessionsToUnenrolledDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowSessionsToUnenrolledDevices(val) + } + return nil + } + res["blockChat"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetBlockChat(val) + } + return nil + } + res["remoteAssistanceState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRemoteAssistanceState) + if err != nil { + return err + } + if val != nil { + m.SetRemoteAssistanceState(val.(*RemoteAssistanceState)) + } + return nil + } + return res +} +// GetRemoteAssistanceState gets the remoteAssistanceState property value. State of remote assistance for the account +func (m *RemoteAssistanceSettings) GetRemoteAssistanceState()(*RemoteAssistanceState) { + return m.remoteAssistanceState +} +// Serialize serializes information the current object +func (m *RemoteAssistanceSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("allowSessionsToUnenrolledDevices", m.GetAllowSessionsToUnenrolledDevices()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("blockChat", m.GetBlockChat()) + if err != nil { + return err + } + } + if m.GetRemoteAssistanceState() != nil { + cast := (*m.GetRemoteAssistanceState()).String() + err = writer.WriteStringValue("remoteAssistanceState", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAllowSessionsToUnenrolledDevices sets the allowSessionsToUnenrolledDevices property value. Indicates if sessions to unenrolled devices are allowed for the account. This setting is configurable by the admin. Default value is false. +func (m *RemoteAssistanceSettings) SetAllowSessionsToUnenrolledDevices(value *bool)() { + m.allowSessionsToUnenrolledDevices = value +} +// SetBlockChat sets the blockChat property value. Indicates if sessions to block chat function. This setting is configurable by the admin. Default value is false. +func (m *RemoteAssistanceSettings) SetBlockChat(value *bool)() { + m.blockChat = value +} +// SetRemoteAssistanceState sets the remoteAssistanceState property value. State of remote assistance for the account +func (m *RemoteAssistanceSettings) SetRemoteAssistanceState(value *RemoteAssistanceState)() { + m.remoteAssistanceState = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_settingsable.go b/src/internal/connector/graph/betasdk/models/remote_assistance_settingsable.go new file mode 100644 index 000000000..a0b4dddd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_settingsable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteAssistanceSettingsable +type RemoteAssistanceSettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowSessionsToUnenrolledDevices()(*bool) + GetBlockChat()(*bool) + GetRemoteAssistanceState()(*RemoteAssistanceState) + SetAllowSessionsToUnenrolledDevices(value *bool)() + SetBlockChat(value *bool)() + SetRemoteAssistanceState(value *RemoteAssistanceState)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_assistance_state.go b/src/internal/connector/graph/betasdk/models/remote_assistance_state.go new file mode 100644 index 000000000..3cbbbc542 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_assistance_state.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RemoteAssistanceState int + +const ( + // Remote assistance is disabled for the account. With this value, Quick Assist remote assistance sessions are not allowed for the account. + DISABLED_REMOTEASSISTANCESTATE RemoteAssistanceState = iota + // Remote assistance is enabled for the account. With this value, enterprise Quick Assist remote assistance features are provided. + ENABLED_REMOTEASSISTANCESTATE +) + +func (i RemoteAssistanceState) String() string { + return []string{"disabled", "enabled"}[i] +} +func ParseRemoteAssistanceState(v string) (interface{}, error) { + result := DISABLED_REMOTEASSISTANCESTATE + switch v { + case "disabled": + result = DISABLED_REMOTEASSISTANCESTATE + case "enabled": + result = ENABLED_REMOTEASSISTANCESTATE + default: + return 0, errors.New("Unknown RemoteAssistanceState value: " + v) + } + return &result, nil +} +func SerializeRemoteAssistanceState(values []RemoteAssistanceState) []string { + 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/remote_item.go b/src/internal/connector/graph/betasdk/models/remote_item.go new file mode 100644 index 000000000..d54c3b7c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_item.go @@ -0,0 +1,566 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteItem +type RemoteItem struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Identity of the user, device, and application which created the item. Read-only. + createdBy IdentitySetable + // Date and time of item creation. Read-only. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Indicates that the remote item is a file. Read-only. + file Fileable + // Information about the remote item from the local file system. Read-only. + fileSystemInfo FileSystemInfoable + // Indicates that the remote item is a folder. Read-only. + folder Folderable + // Unique identifier for the remote item in its drive. Read-only. + id *string + // Image metadata, if the item is an image. Read-only. + image Imageable + // Identity of the user, device, and application which last modified the item. Read-only. + lastModifiedBy IdentitySetable + // Date and time the item was last modified. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional. Filename of the remote item. Read-only. + name *string + // The OdataType property + odataType *string + // If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. + package_escaped Package_escapedable + // Properties of the parent of the remote item. Read-only. + parentReference ItemReferenceable + // Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. + shared Sharedable + // Provides interop between items in OneDrive for Business and SharePoint with the full set of item identifiers. Read-only. + sharepointIds SharepointIdsable + // Size of the remote item. Read-only. + size *int64 + // The specialFolder property + specialFolder SpecialFolderable + // Video metadata, if the item is a video. Read-only. + video Videoable + // DAV compatible URL for the item. + webDavUrl *string + // URL that displays the resource in the browser. Read-only. + webUrl *string +} +// NewRemoteItem instantiates a new remoteItem and sets the default values. +func NewRemoteItem()(*RemoteItem) { + m := &RemoteItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRemoteItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteItem(), 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 *RemoteItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedBy gets the createdBy property value. Identity of the user, device, and application which created the item. Read-only. +func (m *RemoteItem) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Date and time of item creation. Read-only. +func (m *RemoteItem) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["file"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFile(val.(Fileable)) + } + return nil + } + res["fileSystemInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileSystemInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileSystemInfo(val.(FileSystemInfoable)) + } + return nil + } + res["folder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFolder(val.(Folderable)) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["image"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateImageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImage(val.(Imageable)) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["package"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePackage_escapedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPackage(val.(Package_escapedable)) + } + return nil + } + res["parentReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentReference(val.(ItemReferenceable)) + } + return nil + } + res["shared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharedFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShared(val.(Sharedable)) + } + return nil + } + res["sharepointIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharepointIdsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharepointIds(val.(SharepointIdsable)) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["specialFolder"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSpecialFolderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSpecialFolder(val.(SpecialFolderable)) + } + return nil + } + res["video"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVideoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVideo(val.(Videoable)) + } + return nil + } + res["webDavUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebDavUrl(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetFile gets the file property value. Indicates that the remote item is a file. Read-only. +func (m *RemoteItem) GetFile()(Fileable) { + return m.file +} +// GetFileSystemInfo gets the fileSystemInfo property value. Information about the remote item from the local file system. Read-only. +func (m *RemoteItem) GetFileSystemInfo()(FileSystemInfoable) { + return m.fileSystemInfo +} +// GetFolder gets the folder property value. Indicates that the remote item is a folder. Read-only. +func (m *RemoteItem) GetFolder()(Folderable) { + return m.folder +} +// GetId gets the id property value. Unique identifier for the remote item in its drive. Read-only. +func (m *RemoteItem) GetId()(*string) { + return m.id +} +// GetImage gets the image property value. Image metadata, if the item is an image. Read-only. +func (m *RemoteItem) GetImage()(Imageable) { + return m.image +} +// GetLastModifiedBy gets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only. +func (m *RemoteItem) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only. +func (m *RemoteItem) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. Optional. Filename of the remote item. Read-only. +func (m *RemoteItem) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RemoteItem) GetOdataType()(*string) { + return m.odataType +} +// GetPackage gets the package property value. If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. +func (m *RemoteItem) GetPackage()(Package_escapedable) { + return m.package_escaped +} +// GetParentReference gets the parentReference property value. Properties of the parent of the remote item. Read-only. +func (m *RemoteItem) GetParentReference()(ItemReferenceable) { + return m.parentReference +} +// GetShared gets the shared property value. Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. +func (m *RemoteItem) GetShared()(Sharedable) { + return m.shared +} +// GetSharepointIds gets the sharepointIds property value. Provides interop between items in OneDrive for Business and SharePoint with the full set of item identifiers. Read-only. +func (m *RemoteItem) GetSharepointIds()(SharepointIdsable) { + return m.sharepointIds +} +// GetSize gets the size property value. Size of the remote item. Read-only. +func (m *RemoteItem) GetSize()(*int64) { + return m.size +} +// GetSpecialFolder gets the specialFolder property value. The specialFolder property +func (m *RemoteItem) GetSpecialFolder()(SpecialFolderable) { + return m.specialFolder +} +// GetVideo gets the video property value. Video metadata, if the item is a video. Read-only. +func (m *RemoteItem) GetVideo()(Videoable) { + return m.video +} +// GetWebDavUrl gets the webDavUrl property value. DAV compatible URL for the item. +func (m *RemoteItem) GetWebDavUrl()(*string) { + return m.webDavUrl +} +// GetWebUrl gets the webUrl property value. URL that displays the resource in the browser. Read-only. +func (m *RemoteItem) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *RemoteItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("file", m.GetFile()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("fileSystemInfo", m.GetFileSystemInfo()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("folder", m.GetFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("image", m.GetImage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("package", m.GetPackage()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("parentReference", m.GetParentReference()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("shared", m.GetShared()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sharepointIds", m.GetSharepointIds()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("specialFolder", m.GetSpecialFolder()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("video", m.GetVideo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webDavUrl", m.GetWebDavUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *RemoteItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedBy sets the createdBy property value. Identity of the user, device, and application which created the item. Read-only. +func (m *RemoteItem) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Date and time of item creation. Read-only. +func (m *RemoteItem) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetFile sets the file property value. Indicates that the remote item is a file. Read-only. +func (m *RemoteItem) SetFile(value Fileable)() { + m.file = value +} +// SetFileSystemInfo sets the fileSystemInfo property value. Information about the remote item from the local file system. Read-only. +func (m *RemoteItem) SetFileSystemInfo(value FileSystemInfoable)() { + m.fileSystemInfo = value +} +// SetFolder sets the folder property value. Indicates that the remote item is a folder. Read-only. +func (m *RemoteItem) SetFolder(value Folderable)() { + m.folder = value +} +// SetId sets the id property value. Unique identifier for the remote item in its drive. Read-only. +func (m *RemoteItem) SetId(value *string)() { + m.id = value +} +// SetImage sets the image property value. Image metadata, if the item is an image. Read-only. +func (m *RemoteItem) SetImage(value Imageable)() { + m.image = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Identity of the user, device, and application which last modified the item. Read-only. +func (m *RemoteItem) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Date and time the item was last modified. Read-only. +func (m *RemoteItem) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. Optional. Filename of the remote item. Read-only. +func (m *RemoteItem) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RemoteItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetPackage sets the package property value. If present, indicates that this item is a package instead of a folder or file. Packages are treated like files in some contexts and folders in others. Read-only. +func (m *RemoteItem) SetPackage(value Package_escapedable)() { + m.package_escaped = value +} +// SetParentReference sets the parentReference property value. Properties of the parent of the remote item. Read-only. +func (m *RemoteItem) SetParentReference(value ItemReferenceable)() { + m.parentReference = value +} +// SetShared sets the shared property value. Indicates that the item has been shared with others and provides information about the shared state of the item. Read-only. +func (m *RemoteItem) SetShared(value Sharedable)() { + m.shared = value +} +// SetSharepointIds sets the sharepointIds property value. Provides interop between items in OneDrive for Business and SharePoint with the full set of item identifiers. Read-only. +func (m *RemoteItem) SetSharepointIds(value SharepointIdsable)() { + m.sharepointIds = value +} +// SetSize sets the size property value. Size of the remote item. Read-only. +func (m *RemoteItem) SetSize(value *int64)() { + m.size = value +} +// SetSpecialFolder sets the specialFolder property value. The specialFolder property +func (m *RemoteItem) SetSpecialFolder(value SpecialFolderable)() { + m.specialFolder = value +} +// SetVideo sets the video property value. Video metadata, if the item is a video. Read-only. +func (m *RemoteItem) SetVideo(value Videoable)() { + m.video = value +} +// SetWebDavUrl sets the webDavUrl property value. DAV compatible URL for the item. +func (m *RemoteItem) SetWebDavUrl(value *string)() { + m.webDavUrl = value +} +// SetWebUrl sets the webUrl property value. URL that displays the resource in the browser. Read-only. +func (m *RemoteItem) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_itemable.go b/src/internal/connector/graph/betasdk/models/remote_itemable.go new file mode 100644 index 000000000..bba9e37cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_itemable.go @@ -0,0 +1,52 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteItemable +type RemoteItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetFile()(Fileable) + GetFileSystemInfo()(FileSystemInfoable) + GetFolder()(Folderable) + GetId()(*string) + GetImage()(Imageable) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetOdataType()(*string) + GetPackage()(Package_escapedable) + GetParentReference()(ItemReferenceable) + GetShared()(Sharedable) + GetSharepointIds()(SharepointIdsable) + GetSize()(*int64) + GetSpecialFolder()(SpecialFolderable) + GetVideo()(Videoable) + GetWebDavUrl()(*string) + GetWebUrl()(*string) + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetFile(value Fileable)() + SetFileSystemInfo(value FileSystemInfoable)() + SetFolder(value Folderable)() + SetId(value *string)() + SetImage(value Imageable)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetOdataType(value *string)() + SetPackage(value Package_escapedable)() + SetParentReference(value ItemReferenceable)() + SetShared(value Sharedable)() + SetSharepointIds(value SharepointIdsable)() + SetSize(value *int64)() + SetSpecialFolder(value SpecialFolderable)() + SetVideo(value Videoable)() + SetWebDavUrl(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remote_lock_action_result.go b/src/internal/connector/graph/betasdk/models/remote_lock_action_result.go new file mode 100644 index 000000000..23f7884c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_lock_action_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteLockActionResult +type RemoteLockActionResult struct { + DeviceActionResult + // Pin to unlock the client + unlockPin *string +} +// NewRemoteLockActionResult instantiates a new RemoteLockActionResult and sets the default values. +func NewRemoteLockActionResult()(*RemoteLockActionResult) { + m := &RemoteLockActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateRemoteLockActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoteLockActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoteLockActionResult(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoteLockActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["unlockPin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUnlockPin(val) + } + return nil + } + return res +} +// GetUnlockPin gets the unlockPin property value. Pin to unlock the client +func (m *RemoteLockActionResult) GetUnlockPin()(*string) { + return m.unlockPin +} +// Serialize serializes information the current object +func (m *RemoteLockActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("unlockPin", m.GetUnlockPin()) + if err != nil { + return err + } + } + return nil +} +// SetUnlockPin sets the unlockPin property value. Pin to unlock the client +func (m *RemoteLockActionResult) SetUnlockPin(value *string)() { + m.unlockPin = value +} diff --git a/src/internal/connector/graph/betasdk/models/remote_lock_action_resultable.go b/src/internal/connector/graph/betasdk/models/remote_lock_action_resultable.go new file mode 100644 index 000000000..f9ba4d45b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remote_lock_action_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoteLockActionResultable +type RemoteLockActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUnlockPin()(*string) + SetUnlockPin(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remove_access_apply_action.go b/src/internal/connector/graph/betasdk/models/remove_access_apply_action.go new file mode 100644 index 000000000..bc816980e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_access_apply_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveAccessApplyAction +type RemoveAccessApplyAction struct { + AccessReviewApplyAction +} +// NewRemoveAccessApplyAction instantiates a new RemoveAccessApplyAction and sets the default values. +func NewRemoveAccessApplyAction()(*RemoveAccessApplyAction) { + m := &RemoveAccessApplyAction{ + AccessReviewApplyAction: *NewAccessReviewApplyAction(), + } + odataTypeValue := "#microsoft.graph.removeAccessApplyAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveAccessApplyActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveAccessApplyActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveAccessApplyAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveAccessApplyAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AccessReviewApplyAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *RemoveAccessApplyAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AccessReviewApplyAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/remove_access_apply_actionable.go b/src/internal/connector/graph/betasdk/models/remove_access_apply_actionable.go new file mode 100644 index 000000000..38e9e5612 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_access_apply_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveAccessApplyActionable +type RemoveAccessApplyActionable interface { + AccessReviewApplyActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/remove_content_footer_action.go b/src/internal/connector/graph/betasdk/models/remove_content_footer_action.go new file mode 100644 index 000000000..1f5854554 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_content_footer_action.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentFooterAction +type RemoveContentFooterAction struct { + InformationProtectionAction + // The name of the UI element of the footer to be removed. + uiElementNames []string +} +// NewRemoveContentFooterAction instantiates a new RemoveContentFooterAction and sets the default values. +func NewRemoveContentFooterAction()(*RemoveContentFooterAction) { + m := &RemoveContentFooterAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.removeContentFooterAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveContentFooterActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveContentFooterActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveContentFooterAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveContentFooterAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of the footer to be removed. +func (m *RemoveContentFooterAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveContentFooterAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of the footer to be removed. +func (m *RemoveContentFooterAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/remove_content_footer_actionable.go b/src/internal/connector/graph/betasdk/models/remove_content_footer_actionable.go new file mode 100644 index 000000000..e505b4edd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_content_footer_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentFooterActionable +type RemoveContentFooterActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remove_content_header_action.go b/src/internal/connector/graph/betasdk/models/remove_content_header_action.go new file mode 100644 index 000000000..db809f836 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_content_header_action.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentHeaderAction +type RemoveContentHeaderAction struct { + InformationProtectionAction + // The name of the UI element of the header to be removed. + uiElementNames []string +} +// NewRemoveContentHeaderAction instantiates a new RemoveContentHeaderAction and sets the default values. +func NewRemoveContentHeaderAction()(*RemoveContentHeaderAction) { + m := &RemoveContentHeaderAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.removeContentHeaderAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveContentHeaderActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveContentHeaderActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveContentHeaderAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveContentHeaderAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of the header to be removed. +func (m *RemoveContentHeaderAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveContentHeaderAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of the header to be removed. +func (m *RemoveContentHeaderAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/remove_content_header_actionable.go b/src/internal/connector/graph/betasdk/models/remove_content_header_actionable.go new file mode 100644 index 000000000..d6eb58b3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_content_header_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentHeaderActionable +type RemoveContentHeaderActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/remove_protection_action.go b/src/internal/connector/graph/betasdk/models/remove_protection_action.go new file mode 100644 index 000000000..9daf55ad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_protection_action.go @@ -0,0 +1,36 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveProtectionAction +type RemoveProtectionAction struct { + InformationProtectionAction +} +// NewRemoveProtectionAction instantiates a new RemoveProtectionAction and sets the default values. +func NewRemoveProtectionAction()(*RemoveProtectionAction) { + m := &RemoveProtectionAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.removeProtectionAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveProtectionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveProtectionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveProtectionAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveProtectionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *RemoveProtectionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/remove_protection_actionable.go b/src/internal/connector/graph/betasdk/models/remove_protection_actionable.go new file mode 100644 index 000000000..7a1e09e0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_protection_actionable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveProtectionActionable +type RemoveProtectionActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/remove_watermark_action.go b/src/internal/connector/graph/betasdk/models/remove_watermark_action.go new file mode 100644 index 000000000..521d3809b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_watermark_action.go @@ -0,0 +1,66 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveWatermarkAction +type RemoveWatermarkAction struct { + InformationProtectionAction + // The name of the UI element of footer to be removed. + uiElementNames []string +} +// NewRemoveWatermarkAction instantiates a new RemoveWatermarkAction and sets the default values. +func NewRemoveWatermarkAction()(*RemoveWatermarkAction) { + m := &RemoveWatermarkAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.removeWatermarkAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveWatermarkActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveWatermarkActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveWatermarkAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveWatermarkAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of footer to be removed. +func (m *RemoveWatermarkAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveWatermarkAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of footer to be removed. +func (m *RemoveWatermarkAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/remove_watermark_actionable.go b/src/internal/connector/graph/betasdk/models/remove_watermark_actionable.go new file mode 100644 index 000000000..3ced58aeb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/remove_watermark_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveWatermarkActionable +type RemoveWatermarkActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rename_action.go b/src/internal/connector/graph/betasdk/models/rename_action.go new file mode 100644 index 000000000..cfd67f902 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rename_action.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RenameAction +type RenameAction 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 new name of the item. + newName *string + // The OdataType property + odataType *string + // The previous name of the item. + oldName *string +} +// NewRenameAction instantiates a new renameAction and sets the default values. +func NewRenameAction()(*RenameAction) { + m := &RenameAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRenameActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRenameActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRenameAction(), 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 *RenameAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RenameAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["newName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNewName(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["oldName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOldName(val) + } + return nil + } + return res +} +// GetNewName gets the newName property value. The new name of the item. +func (m *RenameAction) GetNewName()(*string) { + return m.newName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RenameAction) GetOdataType()(*string) { + return m.odataType +} +// GetOldName gets the oldName property value. The previous name of the item. +func (m *RenameAction) GetOldName()(*string) { + return m.oldName +} +// Serialize serializes information the current object +func (m *RenameAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("newName", m.GetNewName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("oldName", m.GetOldName()) + 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 *RenameAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetNewName sets the newName property value. The new name of the item. +func (m *RenameAction) SetNewName(value *string)() { + m.newName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RenameAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetOldName sets the oldName property value. The previous name of the item. +func (m *RenameAction) SetOldName(value *string)() { + m.oldName = value +} diff --git a/src/internal/connector/graph/betasdk/models/rename_actionable.go b/src/internal/connector/graph/betasdk/models/rename_actionable.go new file mode 100644 index 000000000..a74c9e2d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rename_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RenameActionable +type RenameActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetNewName()(*string) + GetOdataType()(*string) + GetOldName()(*string) + SetNewName(value *string)() + SetOdataType(value *string)() + SetOldName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/reply_restriction.go b/src/internal/connector/graph/betasdk/models/reply_restriction.go new file mode 100644 index 000000000..9d1a78001 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reply_restriction.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ReplyRestriction int + +const ( + EVERYONE_REPLYRESTRICTION ReplyRestriction = iota + AUTHORANDMODERATORS_REPLYRESTRICTION + UNKNOWNFUTUREVALUE_REPLYRESTRICTION +) + +func (i ReplyRestriction) String() string { + return []string{"everyone", "authorAndModerators", "unknownFutureValue"}[i] +} +func ParseReplyRestriction(v string) (interface{}, error) { + result := EVERYONE_REPLYRESTRICTION + switch v { + case "everyone": + result = EVERYONE_REPLYRESTRICTION + case "authorAndModerators": + result = AUTHORANDMODERATORS_REPLYRESTRICTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REPLYRESTRICTION + default: + return 0, errors.New("Unknown ReplyRestriction value: " + v) + } + return &result, nil +} +func SerializeReplyRestriction(values []ReplyRestriction) []string { + 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/report_root.go b/src/internal/connector/graph/betasdk/models/report_root.go new file mode 100644 index 000000000..952ac7076 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/report_root.go @@ -0,0 +1,494 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReportRoot +type ReportRoot struct { + Entity + // Represents a detailed summary of an application sign-in. + applicationSignInDetailedSummary []ApplicationSignInDetailedSummaryable + // Container for navigation properties for Azure AD authentication methods resources. + authenticationMethods AuthenticationMethodsRootable + // Details of the usage of self-service password reset and multi-factor authentication (MFA) for all registered users. + credentialUserRegistrationDetails []CredentialUserRegistrationDetailsable + // The dailyPrintUsage property + dailyPrintUsage []PrintUsageable + // The dailyPrintUsageByPrinter property + dailyPrintUsageByPrinter []PrintUsageByPrinterable + // The dailyPrintUsageByUser property + dailyPrintUsageByUser []PrintUsageByUserable + // The dailyPrintUsageSummariesByPrinter property + dailyPrintUsageSummariesByPrinter []PrintUsageByPrinterable + // The dailyPrintUsageSummariesByUser property + dailyPrintUsageSummariesByUser []PrintUsageByUserable + // The monthlyPrintUsageByPrinter property + monthlyPrintUsageByPrinter []PrintUsageByPrinterable + // The monthlyPrintUsageByUser property + monthlyPrintUsageByUser []PrintUsageByUserable + // The monthlyPrintUsageSummariesByPrinter property + monthlyPrintUsageSummariesByPrinter []PrintUsageByPrinterable + // The monthlyPrintUsageSummariesByUser property + monthlyPrintUsageSummariesByUser []PrintUsageByUserable + // Provides the ability to launch a realistic simulated phishing attack that organizations can learn from. + security SecurityReportsRootable + // Represents the self-service password reset (SSPR) usage for a given tenant. + userCredentialUsageDetails []UserCredentialUsageDetailsable +} +// NewReportRoot instantiates a new ReportRoot and sets the default values. +func NewReportRoot()(*ReportRoot) { + m := &ReportRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateReportRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReportRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReportRoot(), nil +} +// GetApplicationSignInDetailedSummary gets the applicationSignInDetailedSummary property value. Represents a detailed summary of an application sign-in. +func (m *ReportRoot) GetApplicationSignInDetailedSummary()([]ApplicationSignInDetailedSummaryable) { + return m.applicationSignInDetailedSummary +} +// GetAuthenticationMethods gets the authenticationMethods property value. Container for navigation properties for Azure AD authentication methods resources. +func (m *ReportRoot) GetAuthenticationMethods()(AuthenticationMethodsRootable) { + return m.authenticationMethods +} +// GetCredentialUserRegistrationDetails gets the credentialUserRegistrationDetails property value. Details of the usage of self-service password reset and multi-factor authentication (MFA) for all registered users. +func (m *ReportRoot) GetCredentialUserRegistrationDetails()([]CredentialUserRegistrationDetailsable) { + return m.credentialUserRegistrationDetails +} +// GetDailyPrintUsage gets the dailyPrintUsage property value. The dailyPrintUsage property +func (m *ReportRoot) GetDailyPrintUsage()([]PrintUsageable) { + return m.dailyPrintUsage +} +// GetDailyPrintUsageByPrinter gets the dailyPrintUsageByPrinter property value. The dailyPrintUsageByPrinter property +func (m *ReportRoot) GetDailyPrintUsageByPrinter()([]PrintUsageByPrinterable) { + return m.dailyPrintUsageByPrinter +} +// GetDailyPrintUsageByUser gets the dailyPrintUsageByUser property value. The dailyPrintUsageByUser property +func (m *ReportRoot) GetDailyPrintUsageByUser()([]PrintUsageByUserable) { + return m.dailyPrintUsageByUser +} +// GetDailyPrintUsageSummariesByPrinter gets the dailyPrintUsageSummariesByPrinter property value. The dailyPrintUsageSummariesByPrinter property +func (m *ReportRoot) GetDailyPrintUsageSummariesByPrinter()([]PrintUsageByPrinterable) { + return m.dailyPrintUsageSummariesByPrinter +} +// GetDailyPrintUsageSummariesByUser gets the dailyPrintUsageSummariesByUser property value. The dailyPrintUsageSummariesByUser property +func (m *ReportRoot) GetDailyPrintUsageSummariesByUser()([]PrintUsageByUserable) { + return m.dailyPrintUsageSummariesByUser +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReportRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applicationSignInDetailedSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateApplicationSignInDetailedSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ApplicationSignInDetailedSummaryable, len(val)) + for i, v := range val { + res[i] = v.(ApplicationSignInDetailedSummaryable) + } + m.SetApplicationSignInDetailedSummary(res) + } + return nil + } + res["authenticationMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAuthenticationMethodsRootFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAuthenticationMethods(val.(AuthenticationMethodsRootable)) + } + return nil + } + res["credentialUserRegistrationDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCredentialUserRegistrationDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CredentialUserRegistrationDetailsable, len(val)) + for i, v := range val { + res[i] = v.(CredentialUserRegistrationDetailsable) + } + m.SetCredentialUserRegistrationDetails(res) + } + return nil + } + res["dailyPrintUsage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageable) + } + m.SetDailyPrintUsage(res) + } + return nil + } + res["dailyPrintUsageByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByPrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByPrinterable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByPrinterable) + } + m.SetDailyPrintUsageByPrinter(res) + } + return nil + } + res["dailyPrintUsageByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByUserable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByUserable) + } + m.SetDailyPrintUsageByUser(res) + } + return nil + } + res["dailyPrintUsageSummariesByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByPrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByPrinterable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByPrinterable) + } + m.SetDailyPrintUsageSummariesByPrinter(res) + } + return nil + } + res["dailyPrintUsageSummariesByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByUserable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByUserable) + } + m.SetDailyPrintUsageSummariesByUser(res) + } + return nil + } + res["monthlyPrintUsageByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByPrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByPrinterable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByPrinterable) + } + m.SetMonthlyPrintUsageByPrinter(res) + } + return nil + } + res["monthlyPrintUsageByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByUserable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByUserable) + } + m.SetMonthlyPrintUsageByUser(res) + } + return nil + } + res["monthlyPrintUsageSummariesByPrinter"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByPrinterFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByPrinterable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByPrinterable) + } + m.SetMonthlyPrintUsageSummariesByPrinter(res) + } + return nil + } + res["monthlyPrintUsageSummariesByUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePrintUsageByUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PrintUsageByUserable, len(val)) + for i, v := range val { + res[i] = v.(PrintUsageByUserable) + } + m.SetMonthlyPrintUsageSummariesByUser(res) + } + return nil + } + res["security"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityReportsRootFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSecurity(val.(SecurityReportsRootable)) + } + return nil + } + res["userCredentialUsageDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserCredentialUsageDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserCredentialUsageDetailsable, len(val)) + for i, v := range val { + res[i] = v.(UserCredentialUsageDetailsable) + } + m.SetUserCredentialUsageDetails(res) + } + return nil + } + return res +} +// GetMonthlyPrintUsageByPrinter gets the monthlyPrintUsageByPrinter property value. The monthlyPrintUsageByPrinter property +func (m *ReportRoot) GetMonthlyPrintUsageByPrinter()([]PrintUsageByPrinterable) { + return m.monthlyPrintUsageByPrinter +} +// GetMonthlyPrintUsageByUser gets the monthlyPrintUsageByUser property value. The monthlyPrintUsageByUser property +func (m *ReportRoot) GetMonthlyPrintUsageByUser()([]PrintUsageByUserable) { + return m.monthlyPrintUsageByUser +} +// GetMonthlyPrintUsageSummariesByPrinter gets the monthlyPrintUsageSummariesByPrinter property value. The monthlyPrintUsageSummariesByPrinter property +func (m *ReportRoot) GetMonthlyPrintUsageSummariesByPrinter()([]PrintUsageByPrinterable) { + return m.monthlyPrintUsageSummariesByPrinter +} +// GetMonthlyPrintUsageSummariesByUser gets the monthlyPrintUsageSummariesByUser property value. The monthlyPrintUsageSummariesByUser property +func (m *ReportRoot) GetMonthlyPrintUsageSummariesByUser()([]PrintUsageByUserable) { + return m.monthlyPrintUsageSummariesByUser +} +// GetSecurity gets the security property value. Provides the ability to launch a realistic simulated phishing attack that organizations can learn from. +func (m *ReportRoot) GetSecurity()(SecurityReportsRootable) { + return m.security +} +// GetUserCredentialUsageDetails gets the userCredentialUsageDetails property value. Represents the self-service password reset (SSPR) usage for a given tenant. +func (m *ReportRoot) GetUserCredentialUsageDetails()([]UserCredentialUsageDetailsable) { + return m.userCredentialUsageDetails +} +// Serialize serializes information the current object +func (m *ReportRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicationSignInDetailedSummary() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetApplicationSignInDetailedSummary())) + for i, v := range m.GetApplicationSignInDetailedSummary() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("applicationSignInDetailedSummary", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("authenticationMethods", m.GetAuthenticationMethods()) + if err != nil { + return err + } + } + if m.GetCredentialUserRegistrationDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCredentialUserRegistrationDetails())) + for i, v := range m.GetCredentialUserRegistrationDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("credentialUserRegistrationDetails", cast) + if err != nil { + return err + } + } + if m.GetDailyPrintUsage() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDailyPrintUsage())) + for i, v := range m.GetDailyPrintUsage() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dailyPrintUsage", cast) + if err != nil { + return err + } + } + if m.GetDailyPrintUsageByPrinter() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDailyPrintUsageByPrinter())) + for i, v := range m.GetDailyPrintUsageByPrinter() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dailyPrintUsageByPrinter", cast) + if err != nil { + return err + } + } + if m.GetDailyPrintUsageByUser() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDailyPrintUsageByUser())) + for i, v := range m.GetDailyPrintUsageByUser() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dailyPrintUsageByUser", cast) + if err != nil { + return err + } + } + if m.GetDailyPrintUsageSummariesByPrinter() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDailyPrintUsageSummariesByPrinter())) + for i, v := range m.GetDailyPrintUsageSummariesByPrinter() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dailyPrintUsageSummariesByPrinter", cast) + if err != nil { + return err + } + } + if m.GetDailyPrintUsageSummariesByUser() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDailyPrintUsageSummariesByUser())) + for i, v := range m.GetDailyPrintUsageSummariesByUser() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dailyPrintUsageSummariesByUser", cast) + if err != nil { + return err + } + } + if m.GetMonthlyPrintUsageByPrinter() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMonthlyPrintUsageByPrinter())) + for i, v := range m.GetMonthlyPrintUsageByPrinter() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("monthlyPrintUsageByPrinter", cast) + if err != nil { + return err + } + } + if m.GetMonthlyPrintUsageByUser() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMonthlyPrintUsageByUser())) + for i, v := range m.GetMonthlyPrintUsageByUser() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("monthlyPrintUsageByUser", cast) + if err != nil { + return err + } + } + if m.GetMonthlyPrintUsageSummariesByPrinter() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMonthlyPrintUsageSummariesByPrinter())) + for i, v := range m.GetMonthlyPrintUsageSummariesByPrinter() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("monthlyPrintUsageSummariesByPrinter", cast) + if err != nil { + return err + } + } + if m.GetMonthlyPrintUsageSummariesByUser() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMonthlyPrintUsageSummariesByUser())) + for i, v := range m.GetMonthlyPrintUsageSummariesByUser() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("monthlyPrintUsageSummariesByUser", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("security", m.GetSecurity()) + if err != nil { + return err + } + } + if m.GetUserCredentialUsageDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserCredentialUsageDetails())) + for i, v := range m.GetUserCredentialUsageDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userCredentialUsageDetails", cast) + if err != nil { + return err + } + } + return nil +} +// SetApplicationSignInDetailedSummary sets the applicationSignInDetailedSummary property value. Represents a detailed summary of an application sign-in. +func (m *ReportRoot) SetApplicationSignInDetailedSummary(value []ApplicationSignInDetailedSummaryable)() { + m.applicationSignInDetailedSummary = value +} +// SetAuthenticationMethods sets the authenticationMethods property value. Container for navigation properties for Azure AD authentication methods resources. +func (m *ReportRoot) SetAuthenticationMethods(value AuthenticationMethodsRootable)() { + m.authenticationMethods = value +} +// SetCredentialUserRegistrationDetails sets the credentialUserRegistrationDetails property value. Details of the usage of self-service password reset and multi-factor authentication (MFA) for all registered users. +func (m *ReportRoot) SetCredentialUserRegistrationDetails(value []CredentialUserRegistrationDetailsable)() { + m.credentialUserRegistrationDetails = value +} +// SetDailyPrintUsage sets the dailyPrintUsage property value. The dailyPrintUsage property +func (m *ReportRoot) SetDailyPrintUsage(value []PrintUsageable)() { + m.dailyPrintUsage = value +} +// SetDailyPrintUsageByPrinter sets the dailyPrintUsageByPrinter property value. The dailyPrintUsageByPrinter property +func (m *ReportRoot) SetDailyPrintUsageByPrinter(value []PrintUsageByPrinterable)() { + m.dailyPrintUsageByPrinter = value +} +// SetDailyPrintUsageByUser sets the dailyPrintUsageByUser property value. The dailyPrintUsageByUser property +func (m *ReportRoot) SetDailyPrintUsageByUser(value []PrintUsageByUserable)() { + m.dailyPrintUsageByUser = value +} +// SetDailyPrintUsageSummariesByPrinter sets the dailyPrintUsageSummariesByPrinter property value. The dailyPrintUsageSummariesByPrinter property +func (m *ReportRoot) SetDailyPrintUsageSummariesByPrinter(value []PrintUsageByPrinterable)() { + m.dailyPrintUsageSummariesByPrinter = value +} +// SetDailyPrintUsageSummariesByUser sets the dailyPrintUsageSummariesByUser property value. The dailyPrintUsageSummariesByUser property +func (m *ReportRoot) SetDailyPrintUsageSummariesByUser(value []PrintUsageByUserable)() { + m.dailyPrintUsageSummariesByUser = value +} +// SetMonthlyPrintUsageByPrinter sets the monthlyPrintUsageByPrinter property value. The monthlyPrintUsageByPrinter property +func (m *ReportRoot) SetMonthlyPrintUsageByPrinter(value []PrintUsageByPrinterable)() { + m.monthlyPrintUsageByPrinter = value +} +// SetMonthlyPrintUsageByUser sets the monthlyPrintUsageByUser property value. The monthlyPrintUsageByUser property +func (m *ReportRoot) SetMonthlyPrintUsageByUser(value []PrintUsageByUserable)() { + m.monthlyPrintUsageByUser = value +} +// SetMonthlyPrintUsageSummariesByPrinter sets the monthlyPrintUsageSummariesByPrinter property value. The monthlyPrintUsageSummariesByPrinter property +func (m *ReportRoot) SetMonthlyPrintUsageSummariesByPrinter(value []PrintUsageByPrinterable)() { + m.monthlyPrintUsageSummariesByPrinter = value +} +// SetMonthlyPrintUsageSummariesByUser sets the monthlyPrintUsageSummariesByUser property value. The monthlyPrintUsageSummariesByUser property +func (m *ReportRoot) SetMonthlyPrintUsageSummariesByUser(value []PrintUsageByUserable)() { + m.monthlyPrintUsageSummariesByUser = value +} +// SetSecurity sets the security property value. Provides the ability to launch a realistic simulated phishing attack that organizations can learn from. +func (m *ReportRoot) SetSecurity(value SecurityReportsRootable)() { + m.security = value +} +// SetUserCredentialUsageDetails sets the userCredentialUsageDetails property value. Represents the self-service password reset (SSPR) usage for a given tenant. +func (m *ReportRoot) SetUserCredentialUsageDetails(value []UserCredentialUsageDetailsable)() { + m.userCredentialUsageDetails = value +} diff --git a/src/internal/connector/graph/betasdk/models/report_rootable.go b/src/internal/connector/graph/betasdk/models/report_rootable.go new file mode 100644 index 000000000..eb27d753d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/report_rootable.go @@ -0,0 +1,39 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReportRootable +type ReportRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationSignInDetailedSummary()([]ApplicationSignInDetailedSummaryable) + GetAuthenticationMethods()(AuthenticationMethodsRootable) + GetCredentialUserRegistrationDetails()([]CredentialUserRegistrationDetailsable) + GetDailyPrintUsage()([]PrintUsageable) + GetDailyPrintUsageByPrinter()([]PrintUsageByPrinterable) + GetDailyPrintUsageByUser()([]PrintUsageByUserable) + GetDailyPrintUsageSummariesByPrinter()([]PrintUsageByPrinterable) + GetDailyPrintUsageSummariesByUser()([]PrintUsageByUserable) + GetMonthlyPrintUsageByPrinter()([]PrintUsageByPrinterable) + GetMonthlyPrintUsageByUser()([]PrintUsageByUserable) + GetMonthlyPrintUsageSummariesByPrinter()([]PrintUsageByPrinterable) + GetMonthlyPrintUsageSummariesByUser()([]PrintUsageByUserable) + GetSecurity()(SecurityReportsRootable) + GetUserCredentialUsageDetails()([]UserCredentialUsageDetailsable) + SetApplicationSignInDetailedSummary(value []ApplicationSignInDetailedSummaryable)() + SetAuthenticationMethods(value AuthenticationMethodsRootable)() + SetCredentialUserRegistrationDetails(value []CredentialUserRegistrationDetailsable)() + SetDailyPrintUsage(value []PrintUsageable)() + SetDailyPrintUsageByPrinter(value []PrintUsageByPrinterable)() + SetDailyPrintUsageByUser(value []PrintUsageByUserable)() + SetDailyPrintUsageSummariesByPrinter(value []PrintUsageByPrinterable)() + SetDailyPrintUsageSummariesByUser(value []PrintUsageByUserable)() + SetMonthlyPrintUsageByPrinter(value []PrintUsageByPrinterable)() + SetMonthlyPrintUsageByUser(value []PrintUsageByUserable)() + SetMonthlyPrintUsageSummariesByPrinter(value []PrintUsageByPrinterable)() + SetMonthlyPrintUsageSummariesByUser(value []PrintUsageByUserable)() + SetSecurity(value SecurityReportsRootable)() + SetUserCredentialUsageDetails(value []UserCredentialUsageDetailsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/reputation_category.go b/src/internal/connector/graph/betasdk/models/reputation_category.go new file mode 100644 index 000000000..0a1b0cde4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reputation_category.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReputationCategory +type ReputationCategory 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 description property + description *string + // The name property + name *string + // The OdataType property + odataType *string + // The vendor property + vendor_escaped *string +} +// NewReputationCategory instantiates a new reputationCategory and sets the default values. +func NewReputationCategory()(*ReputationCategory) { + m := &ReputationCategory{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateReputationCategoryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReputationCategoryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReputationCategory(), 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 *ReputationCategory) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +func (m *ReputationCategory) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReputationCategory) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *ReputationCategory) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ReputationCategory) GetOdataType()(*string) { + return m.odataType +} +// GetVendor gets the vendor property value. The vendor property +func (m *ReputationCategory) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *ReputationCategory) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *ReputationCategory) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *ReputationCategory) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name property +func (m *ReputationCategory) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ReputationCategory) SetOdataType(value *string)() { + m.odataType = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *ReputationCategory) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/reputation_category_collection_response.go b/src/internal/connector/graph/betasdk/models/reputation_category_collection_response.go new file mode 100644 index 000000000..2e78f0dcf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reputation_category_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReputationCategoryCollectionResponse +type ReputationCategoryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ReputationCategoryable +} +// NewReputationCategoryCollectionResponse instantiates a new ReputationCategoryCollectionResponse and sets the default values. +func NewReputationCategoryCollectionResponse()(*ReputationCategoryCollectionResponse) { + m := &ReputationCategoryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateReputationCategoryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateReputationCategoryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewReputationCategoryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ReputationCategoryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateReputationCategoryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ReputationCategoryable, len(val)) + for i, v := range val { + res[i] = v.(ReputationCategoryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ReputationCategoryCollectionResponse) GetValue()([]ReputationCategoryable) { + return m.value +} +// Serialize serializes information the current object +func (m *ReputationCategoryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ReputationCategoryCollectionResponse) SetValue(value []ReputationCategoryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/reputation_category_collection_responseable.go b/src/internal/connector/graph/betasdk/models/reputation_category_collection_responseable.go new file mode 100644 index 000000000..0e819e54a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reputation_category_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReputationCategoryCollectionResponseable +type ReputationCategoryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ReputationCategoryable) + SetValue(value []ReputationCategoryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/reputation_categoryable.go b/src/internal/connector/graph/betasdk/models/reputation_categoryable.go new file mode 100644 index 000000000..3ad942fdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reputation_categoryable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ReputationCategoryable +type ReputationCategoryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetName()(*string) + GetOdataType()(*string) + GetVendor()(*string) + SetDescription(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/request.go b/src/internal/connector/graph/betasdk/models/request.go new file mode 100644 index 000000000..ea9b6f5bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/request.go @@ -0,0 +1,219 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Request provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Request struct { + Entity + // The identifier of the approval of the request. + approvalId *string + // The request completion date time. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The principal that created the request. + createdBy IdentitySetable + // The request creation date time. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Free text field to define any custom data for the request. Not used. + customData *string + // The status of the request. Not nullable. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. + status *string +} +// NewRequest instantiates a new request and sets the default values. +func NewRequest()(*Request) { + m := &Request{ + Entity: *NewEntity(), + } + return m +} +// CreateRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.privilegedAccessGroupAssignmentScheduleRequest": + return NewPrivilegedAccessGroupAssignmentScheduleRequest(), nil + case "#microsoft.graph.privilegedAccessGroupEligibilityScheduleRequest": + return NewPrivilegedAccessGroupEligibilityScheduleRequest(), nil + case "#microsoft.graph.privilegedAccessScheduleRequest": + return NewPrivilegedAccessScheduleRequest(), nil + case "#microsoft.graph.unifiedRoleAssignmentScheduleRequest": + return NewUnifiedRoleAssignmentScheduleRequest(), nil + case "#microsoft.graph.unifiedRoleEligibilityScheduleRequest": + return NewUnifiedRoleEligibilityScheduleRequest(), nil + case "#microsoft.graph.userConsentRequest": + return NewUserConsentRequest(), nil + } + } + } + } + return NewRequest(), nil +} +// GetApprovalId gets the approvalId property value. The identifier of the approval of the request. +func (m *Request) GetApprovalId()(*string) { + return m.approvalId +} +// GetCompletedDateTime gets the completedDateTime property value. The request completion date time. +func (m *Request) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCreatedBy gets the createdBy property value. The principal that created the request. +func (m *Request) GetCreatedBy()(IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The request creation date time. +func (m *Request) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomData gets the customData property value. Free text field to define any custom data for the request. Not used. +func (m *Request) GetCustomData()(*string) { + return m.customData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Request) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["approvalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApprovalId(val) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customData"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomData(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + return res +} +// GetStatus gets the status property value. The status of the request. Not nullable. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. +func (m *Request) GetStatus()(*string) { + return m.status +} +// Serialize serializes information the current object +func (m *Request) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("approvalId", m.GetApprovalId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customData", m.GetCustomData()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + return nil +} +// SetApprovalId sets the approvalId property value. The identifier of the approval of the request. +func (m *Request) SetApprovalId(value *string)() { + m.approvalId = value +} +// SetCompletedDateTime sets the completedDateTime property value. The request completion date time. +func (m *Request) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCreatedBy sets the createdBy property value. The principal that created the request. +func (m *Request) SetCreatedBy(value IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The request creation date time. +func (m *Request) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomData sets the customData property value. Free text field to define any custom data for the request. Not used. +func (m *Request) SetCustomData(value *string)() { + m.customData = value +} +// SetStatus sets the status property value. The status of the request. Not nullable. The possible values are: Canceled, Denied, Failed, Granted, PendingAdminDecision, PendingApproval, PendingProvisioning, PendingScheduleCreation, Provisioned, Revoked, and ScheduleCreated. Not nullable. +func (m *Request) SetStatus(value *string)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/request_schedule.go b/src/internal/connector/graph/betasdk/models/request_schedule.go new file mode 100644 index 000000000..af6c952bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/request_schedule.go @@ -0,0 +1,150 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestSchedule +type RequestSchedule struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // In entitlement management, when the access should expire. + expiration ExpirationPatternable + // The OdataType property + odataType *string + // For recurring access, or eligible or active assignment. This property is currently unsupported in both PIM and entitlement management. + recurrence PatternedRecurrenceable + // The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. In PIM, when the eligible or active assignment becomes active. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewRequestSchedule instantiates a new requestSchedule and sets the default values. +func NewRequestSchedule()(*RequestSchedule) { + m := &RequestSchedule{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRequestScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequestScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequestSchedule(), 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 *RequestSchedule) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExpiration gets the expiration property value. In entitlement management, when the access should expire. +func (m *RequestSchedule) GetExpiration()(ExpirationPatternable) { + return m.expiration +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequestSchedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["expiration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExpirationPatternFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetExpiration(val.(ExpirationPatternable)) + } + 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["recurrence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePatternedRecurrenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRecurrence(val.(PatternedRecurrenceable)) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RequestSchedule) GetOdataType()(*string) { + return m.odataType +} +// GetRecurrence gets the recurrence property value. For recurring access, or eligible or active assignment. This property is currently unsupported in both PIM and entitlement management. +func (m *RequestSchedule) GetRecurrence()(PatternedRecurrenceable) { + return m.recurrence +} +// GetStartDateTime gets the startDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. In PIM, when the eligible or active assignment becomes active. +func (m *RequestSchedule) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// Serialize serializes information the current object +func (m *RequestSchedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("expiration", m.GetExpiration()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("recurrence", m.GetRecurrence()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + 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 *RequestSchedule) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExpiration sets the expiration property value. In entitlement management, when the access should expire. +func (m *RequestSchedule) SetExpiration(value ExpirationPatternable)() { + m.expiration = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RequestSchedule) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecurrence sets the recurrence property value. For recurring access, or eligible or active assignment. This property is currently unsupported in both PIM and entitlement management. +func (m *RequestSchedule) SetRecurrence(value PatternedRecurrenceable)() { + m.recurrence = value +} +// SetStartDateTime sets the startDateTime property value. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. In PIM, when the eligible or active assignment becomes active. +func (m *RequestSchedule) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/request_scheduleable.go b/src/internal/connector/graph/betasdk/models/request_scheduleable.go new file mode 100644 index 000000000..175cb5c12 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/request_scheduleable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestScheduleable +type RequestScheduleable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiration()(ExpirationPatternable) + GetOdataType()(*string) + GetRecurrence()(PatternedRecurrenceable) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetExpiration(value ExpirationPatternable)() + SetOdataType(value *string)() + SetRecurrence(value PatternedRecurrenceable)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/request_signature_verification.go b/src/internal/connector/graph/betasdk/models/request_signature_verification.go new file mode 100644 index 000000000..687e64dd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/request_signature_verification.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestSignatureVerification +type RequestSignatureVerification struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies whether this application accepts weak algorithms. The possible values are: rsaSha1, unknownFutureValue. + allowedWeakAlgorithms *WeakAlgorithms + // Specifies whether signed authentication requests for this application should be required. + isSignedRequestRequired *bool + // The OdataType property + odataType *string +} +// NewRequestSignatureVerification instantiates a new requestSignatureVerification and sets the default values. +func NewRequestSignatureVerification()(*RequestSignatureVerification) { + m := &RequestSignatureVerification{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRequestSignatureVerificationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequestSignatureVerificationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequestSignatureVerification(), 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 *RequestSignatureVerification) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedWeakAlgorithms gets the allowedWeakAlgorithms property value. Specifies whether this application accepts weak algorithms. The possible values are: rsaSha1, unknownFutureValue. +func (m *RequestSignatureVerification) GetAllowedWeakAlgorithms()(*WeakAlgorithms) { + return m.allowedWeakAlgorithms +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequestSignatureVerification) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedWeakAlgorithms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWeakAlgorithms) + if err != nil { + return err + } + if val != nil { + m.SetAllowedWeakAlgorithms(val.(*WeakAlgorithms)) + } + return nil + } + res["isSignedRequestRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSignedRequestRequired(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 + } + return res +} +// GetIsSignedRequestRequired gets the isSignedRequestRequired property value. Specifies whether signed authentication requests for this application should be required. +func (m *RequestSignatureVerification) GetIsSignedRequestRequired()(*bool) { + return m.isSignedRequestRequired +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RequestSignatureVerification) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RequestSignatureVerification) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedWeakAlgorithms() != nil { + cast := (*m.GetAllowedWeakAlgorithms()).String() + err := writer.WriteStringValue("allowedWeakAlgorithms", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isSignedRequestRequired", m.GetIsSignedRequestRequired()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RequestSignatureVerification) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedWeakAlgorithms sets the allowedWeakAlgorithms property value. Specifies whether this application accepts weak algorithms. The possible values are: rsaSha1, unknownFutureValue. +func (m *RequestSignatureVerification) SetAllowedWeakAlgorithms(value *WeakAlgorithms)() { + m.allowedWeakAlgorithms = value +} +// SetIsSignedRequestRequired sets the isSignedRequestRequired property value. Specifies whether signed authentication requests for this application should be required. +func (m *RequestSignatureVerification) SetIsSignedRequestRequired(value *bool)() { + m.isSignedRequestRequired = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RequestSignatureVerification) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/request_signature_verificationable.go b/src/internal/connector/graph/betasdk/models/request_signature_verificationable.go new file mode 100644 index 000000000..b9808df17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/request_signature_verificationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestSignatureVerificationable +type RequestSignatureVerificationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedWeakAlgorithms()(*WeakAlgorithms) + GetIsSignedRequestRequired()(*bool) + GetOdataType()(*string) + SetAllowedWeakAlgorithms(value *WeakAlgorithms)() + SetIsSignedRequestRequired(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/requestable.go b/src/internal/connector/graph/betasdk/models/requestable.go new file mode 100644 index 000000000..e09f9155d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requestable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Requestable +type Requestable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApprovalId()(*string) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedBy()(IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomData()(*string) + GetStatus()(*string) + SetApprovalId(value *string)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedBy(value IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomData(value *string)() + SetStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/requestor_manager.go b/src/internal/connector/graph/betasdk/models/requestor_manager.go new file mode 100644 index 000000000..4fca6a7d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requestor_manager.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestorManager +type RequestorManager struct { + UserSet + // The hierarchical level of the manager with respect to the requestor. For example, the direct manager of a requestor would have a managerLevel of 1, while the manager of the requestor's manager would have a managerLevel of 2. Default value for managerLevel is 1. Possible values for this property range from 1 to 2. + managerLevel *int32 +} +// NewRequestorManager instantiates a new RequestorManager and sets the default values. +func NewRequestorManager()(*RequestorManager) { + m := &RequestorManager{ + UserSet: *NewUserSet(), + } + odataTypeValue := "#microsoft.graph.requestorManager"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRequestorManagerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequestorManagerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequestorManager(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequestorManager) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.UserSet.GetFieldDeserializers() + res["managerLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagerLevel(val) + } + return nil + } + return res +} +// GetManagerLevel gets the managerLevel property value. The hierarchical level of the manager with respect to the requestor. For example, the direct manager of a requestor would have a managerLevel of 1, while the manager of the requestor's manager would have a managerLevel of 2. Default value for managerLevel is 1. Possible values for this property range from 1 to 2. +func (m *RequestorManager) GetManagerLevel()(*int32) { + return m.managerLevel +} +// Serialize serializes information the current object +func (m *RequestorManager) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.UserSet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("managerLevel", m.GetManagerLevel()) + if err != nil { + return err + } + } + return nil +} +// SetManagerLevel sets the managerLevel property value. The hierarchical level of the manager with respect to the requestor. For example, the direct manager of a requestor would have a managerLevel of 1, while the manager of the requestor's manager would have a managerLevel of 2. Default value for managerLevel is 1. Possible values for this property range from 1 to 2. +func (m *RequestorManager) SetManagerLevel(value *int32)() { + m.managerLevel = value +} diff --git a/src/internal/connector/graph/betasdk/models/requestor_managerable.go b/src/internal/connector/graph/betasdk/models/requestor_managerable.go new file mode 100644 index 000000000..0fd817a5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requestor_managerable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestorManagerable +type RequestorManagerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + UserSetable + GetManagerLevel()(*int32) + SetManagerLevel(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/requestor_settings.go b/src/internal/connector/graph/betasdk/models/requestor_settings.go new file mode 100644 index 000000000..b981f4a0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requestor_settings.go @@ -0,0 +1,157 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestorSettings +type RequestorSettings struct { + // Indicates whether new requests are accepted on this policy. + acceptRequests *bool + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // The users who are allowed to request on this policy, which can be singleUser, groupMembers, and connectedOrganizationMembers. + allowedRequestors []UserSetable + // The OdataType property + odataType *string + // Who can request. One of NoSubjects, SpecificDirectorySubjects, SpecificConnectedOrganizationSubjects, AllConfiguredConnectedOrganizationSubjects, AllExistingConnectedOrganizationSubjects, AllExistingDirectoryMemberUsers, AllExistingDirectorySubjects or AllExternalSubjects. + scopeType *string +} +// NewRequestorSettings instantiates a new requestorSettings and sets the default values. +func NewRequestorSettings()(*RequestorSettings) { + m := &RequestorSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRequestorSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequestorSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequestorSettings(), nil +} +// GetAcceptRequests gets the acceptRequests property value. Indicates whether new requests are accepted on this policy. +func (m *RequestorSettings) GetAcceptRequests()(*bool) { + return m.acceptRequests +} +// 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 *RequestorSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedRequestors gets the allowedRequestors property value. The users who are allowed to request on this policy, which can be singleUser, groupMembers, and connectedOrganizationMembers. +func (m *RequestorSettings) GetAllowedRequestors()([]UserSetable) { + return m.allowedRequestors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequestorSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["acceptRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAcceptRequests(val) + } + return nil + } + res["allowedRequestors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSetable, len(val)) + for i, v := range val { + res[i] = v.(UserSetable) + } + m.SetAllowedRequestors(res) + } + 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["scopeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScopeType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RequestorSettings) GetOdataType()(*string) { + return m.odataType +} +// GetScopeType gets the scopeType property value. Who can request. One of NoSubjects, SpecificDirectorySubjects, SpecificConnectedOrganizationSubjects, AllConfiguredConnectedOrganizationSubjects, AllExistingConnectedOrganizationSubjects, AllExistingDirectoryMemberUsers, AllExistingDirectorySubjects or AllExternalSubjects. +func (m *RequestorSettings) GetScopeType()(*string) { + return m.scopeType +} +// Serialize serializes information the current object +func (m *RequestorSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("acceptRequests", m.GetAcceptRequests()) + if err != nil { + return err + } + } + if m.GetAllowedRequestors() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedRequestors())) + for i, v := range m.GetAllowedRequestors() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("allowedRequestors", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("scopeType", m.GetScopeType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptRequests sets the acceptRequests property value. Indicates whether new requests are accepted on this policy. +func (m *RequestorSettings) SetAcceptRequests(value *bool)() { + m.acceptRequests = value +} +// 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 *RequestorSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedRequestors sets the allowedRequestors property value. The users who are allowed to request on this policy, which can be singleUser, groupMembers, and connectedOrganizationMembers. +func (m *RequestorSettings) SetAllowedRequestors(value []UserSetable)() { + m.allowedRequestors = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RequestorSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetScopeType sets the scopeType property value. Who can request. One of NoSubjects, SpecificDirectorySubjects, SpecificConnectedOrganizationSubjects, AllConfiguredConnectedOrganizationSubjects, AllExistingConnectedOrganizationSubjects, AllExistingDirectoryMemberUsers, AllExistingDirectorySubjects or AllExternalSubjects. +func (m *RequestorSettings) SetScopeType(value *string)() { + m.scopeType = value +} diff --git a/src/internal/connector/graph/betasdk/models/requestor_settingsable.go b/src/internal/connector/graph/betasdk/models/requestor_settingsable.go new file mode 100644 index 000000000..d063d27f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requestor_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequestorSettingsable +type RequestorSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptRequests()(*bool) + GetAllowedRequestors()([]UserSetable) + GetOdataType()(*string) + GetScopeType()(*string) + SetAcceptRequests(value *bool)() + SetAllowedRequestors(value []UserSetable)() + SetOdataType(value *string)() + SetScopeType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/required_password_type.go b/src/internal/connector/graph/betasdk/models/required_password_type.go new file mode 100644 index 000000000..c444d2344 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/required_password_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RequiredPasswordType int + +const ( + // Device default value, no intent. + DEVICEDEFAULT_REQUIREDPASSWORDTYPE RequiredPasswordType = iota + // Alphanumeric password required. + ALPHANUMERIC_REQUIREDPASSWORDTYPE + // Numeric password required. + NUMERIC_REQUIREDPASSWORDTYPE +) + +func (i RequiredPasswordType) String() string { + return []string{"deviceDefault", "alphanumeric", "numeric"}[i] +} +func ParseRequiredPasswordType(v string) (interface{}, error) { + result := DEVICEDEFAULT_REQUIREDPASSWORDTYPE + switch v { + case "deviceDefault": + result = DEVICEDEFAULT_REQUIREDPASSWORDTYPE + case "alphanumeric": + result = ALPHANUMERIC_REQUIREDPASSWORDTYPE + case "numeric": + result = NUMERIC_REQUIREDPASSWORDTYPE + default: + return 0, errors.New("Unknown RequiredPasswordType value: " + v) + } + return &result, nil +} +func SerializeRequiredPasswordType(values []RequiredPasswordType) []string { + 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/required_resource_access.go b/src/internal/connector/graph/betasdk/models/required_resource_access.go new file mode 100644 index 000000000..537b65f1c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/required_resource_access.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequiredResourceAccess +type RequiredResourceAccess 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 OdataType property + odataType *string + // The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource. + resourceAccess []ResourceAccessable + // The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application. + resourceAppId *string +} +// NewRequiredResourceAccess instantiates a new requiredResourceAccess and sets the default values. +func NewRequiredResourceAccess()(*RequiredResourceAccess) { + m := &RequiredResourceAccess{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRequiredResourceAccessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequiredResourceAccessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequiredResourceAccess(), 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 *RequiredResourceAccess) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequiredResourceAccess) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["resourceAccess"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceAccessable, len(val)) + for i, v := range val { + res[i] = v.(ResourceAccessable) + } + m.SetResourceAccess(res) + } + return nil + } + res["resourceAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceAppId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RequiredResourceAccess) GetOdataType()(*string) { + return m.odataType +} +// GetResourceAccess gets the resourceAccess property value. The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource. +func (m *RequiredResourceAccess) GetResourceAccess()([]ResourceAccessable) { + return m.resourceAccess +} +// GetResourceAppId gets the resourceAppId property value. The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application. +func (m *RequiredResourceAccess) GetResourceAppId()(*string) { + return m.resourceAppId +} +// Serialize serializes information the current object +func (m *RequiredResourceAccess) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResourceAccess() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceAccess())) + for i, v := range m.GetResourceAccess() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("resourceAccess", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceAppId", m.GetResourceAppId()) + 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 *RequiredResourceAccess) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RequiredResourceAccess) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceAccess sets the resourceAccess property value. The list of OAuth2.0 permission scopes and app roles that the application requires from the specified resource. +func (m *RequiredResourceAccess) SetResourceAccess(value []ResourceAccessable)() { + m.resourceAccess = value +} +// SetResourceAppId sets the resourceAppId property value. The unique identifier for the resource that the application requires access to. This should be equal to the appId declared on the target resource application. +func (m *RequiredResourceAccess) SetResourceAppId(value *string)() { + m.resourceAppId = value +} diff --git a/src/internal/connector/graph/betasdk/models/required_resource_access_collection_response.go b/src/internal/connector/graph/betasdk/models/required_resource_access_collection_response.go new file mode 100644 index 000000000..c7fc767f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/required_resource_access_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequiredResourceAccessCollectionResponse +type RequiredResourceAccessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RequiredResourceAccessable +} +// NewRequiredResourceAccessCollectionResponse instantiates a new RequiredResourceAccessCollectionResponse and sets the default values. +func NewRequiredResourceAccessCollectionResponse()(*RequiredResourceAccessCollectionResponse) { + m := &RequiredResourceAccessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRequiredResourceAccessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRequiredResourceAccessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRequiredResourceAccessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RequiredResourceAccessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRequiredResourceAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RequiredResourceAccessable, len(val)) + for i, v := range val { + res[i] = v.(RequiredResourceAccessable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RequiredResourceAccessCollectionResponse) GetValue()([]RequiredResourceAccessable) { + return m.value +} +// Serialize serializes information the current object +func (m *RequiredResourceAccessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RequiredResourceAccessCollectionResponse) SetValue(value []RequiredResourceAccessable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/required_resource_access_collection_responseable.go b/src/internal/connector/graph/betasdk/models/required_resource_access_collection_responseable.go new file mode 100644 index 000000000..7cffad7d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/required_resource_access_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequiredResourceAccessCollectionResponseable +type RequiredResourceAccessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RequiredResourceAccessable) + SetValue(value []RequiredResourceAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/required_resource_accessable.go b/src/internal/connector/graph/betasdk/models/required_resource_accessable.go new file mode 100644 index 000000000..15c6edc8c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/required_resource_accessable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RequiredResourceAccessable +type RequiredResourceAccessable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetResourceAccess()([]ResourceAccessable) + GetResourceAppId()(*string) + SetOdataType(value *string)() + SetResourceAccess(value []ResourceAccessable)() + SetResourceAppId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/requirement_provider.go b/src/internal/connector/graph/betasdk/models/requirement_provider.go new file mode 100644 index 000000000..93d4a4be9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/requirement_provider.go @@ -0,0 +1,91 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RequirementProvider int + +const ( + USER_REQUIREMENTPROVIDER RequirementProvider = iota + REQUEST_REQUIREMENTPROVIDER + SERVICEPRINCIPAL_REQUIREMENTPROVIDER + V1CONDITIONALACCESS_REQUIREMENTPROVIDER + MULTICONDITIONALACCESS_REQUIREMENTPROVIDER + TENANTSESSIONRISKPOLICY_REQUIREMENTPROVIDER + ACCOUNTCOMPROMISEPOLICIES_REQUIREMENTPROVIDER + V1CONDITIONALACCESSDEPENDENCY_REQUIREMENTPROVIDER + V1CONDITIONALACCESSPOLICYIDREQUESTED_REQUIREMENTPROVIDER + MFAREGISTRATIONREQUIREDBYIDENTITYPROTECTIONPOLICY_REQUIREMENTPROVIDER + BASELINEPROTECTION_REQUIREMENTPROVIDER + MFAREGISTRATIONREQUIREDBYBASELINEPROTECTION_REQUIREMENTPROVIDER + MFAREGISTRATIONREQUIREDBYMULTICONDITIONALACCESS_REQUIREMENTPROVIDER + ENFORCEDFORCSPADMINS_REQUIREMENTPROVIDER + SECURITYDEFAULTS_REQUIREMENTPROVIDER + MFAREGISTRATIONREQUIREDBYSECURITYDEFAULTS_REQUIREMENTPROVIDER + PROOFUPCODEREQUEST_REQUIREMENTPROVIDER + CROSSTENANTOUTBOUNDRULE_REQUIREMENTPROVIDER + GPSLOCATIONCONDITION_REQUIREMENTPROVIDER + RISKBASEDPOLICY_REQUIREMENTPROVIDER + UNKNOWNFUTUREVALUE_REQUIREMENTPROVIDER +) + +func (i RequirementProvider) String() string { + return []string{"user", "request", "servicePrincipal", "v1ConditionalAccess", "multiConditionalAccess", "tenantSessionRiskPolicy", "accountCompromisePolicies", "v1ConditionalAccessDependency", "v1ConditionalAccessPolicyIdRequested", "mfaRegistrationRequiredByIdentityProtectionPolicy", "baselineProtection", "mfaRegistrationRequiredByBaselineProtection", "mfaRegistrationRequiredByMultiConditionalAccess", "enforcedForCspAdmins", "securityDefaults", "mfaRegistrationRequiredBySecurityDefaults", "proofUpCodeRequest", "crossTenantOutboundRule", "gpsLocationCondition", "riskBasedPolicy", "unknownFutureValue"}[i] +} +func ParseRequirementProvider(v string) (interface{}, error) { + result := USER_REQUIREMENTPROVIDER + switch v { + case "user": + result = USER_REQUIREMENTPROVIDER + case "request": + result = REQUEST_REQUIREMENTPROVIDER + case "servicePrincipal": + result = SERVICEPRINCIPAL_REQUIREMENTPROVIDER + case "v1ConditionalAccess": + result = V1CONDITIONALACCESS_REQUIREMENTPROVIDER + case "multiConditionalAccess": + result = MULTICONDITIONALACCESS_REQUIREMENTPROVIDER + case "tenantSessionRiskPolicy": + result = TENANTSESSIONRISKPOLICY_REQUIREMENTPROVIDER + case "accountCompromisePolicies": + result = ACCOUNTCOMPROMISEPOLICIES_REQUIREMENTPROVIDER + case "v1ConditionalAccessDependency": + result = V1CONDITIONALACCESSDEPENDENCY_REQUIREMENTPROVIDER + case "v1ConditionalAccessPolicyIdRequested": + result = V1CONDITIONALACCESSPOLICYIDREQUESTED_REQUIREMENTPROVIDER + case "mfaRegistrationRequiredByIdentityProtectionPolicy": + result = MFAREGISTRATIONREQUIREDBYIDENTITYPROTECTIONPOLICY_REQUIREMENTPROVIDER + case "baselineProtection": + result = BASELINEPROTECTION_REQUIREMENTPROVIDER + case "mfaRegistrationRequiredByBaselineProtection": + result = MFAREGISTRATIONREQUIREDBYBASELINEPROTECTION_REQUIREMENTPROVIDER + case "mfaRegistrationRequiredByMultiConditionalAccess": + result = MFAREGISTRATIONREQUIREDBYMULTICONDITIONALACCESS_REQUIREMENTPROVIDER + case "enforcedForCspAdmins": + result = ENFORCEDFORCSPADMINS_REQUIREMENTPROVIDER + case "securityDefaults": + result = SECURITYDEFAULTS_REQUIREMENTPROVIDER + case "mfaRegistrationRequiredBySecurityDefaults": + result = MFAREGISTRATIONREQUIREDBYSECURITYDEFAULTS_REQUIREMENTPROVIDER + case "proofUpCodeRequest": + result = PROOFUPCODEREQUEST_REQUIREMENTPROVIDER + case "crossTenantOutboundRule": + result = CROSSTENANTOUTBOUNDRULE_REQUIREMENTPROVIDER + case "gpsLocationCondition": + result = GPSLOCATIONCONDITION_REQUIREMENTPROVIDER + case "riskBasedPolicy": + result = RISKBASEDPOLICY_REQUIREMENTPROVIDER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_REQUIREMENTPROVIDER + default: + return 0, errors.New("Unknown RequirementProvider value: " + v) + } + return &result, nil +} +func SerializeRequirementProvider(values []RequirementProvider) []string { + 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/reset_passcode_action_result.go b/src/internal/connector/graph/betasdk/models/reset_passcode_action_result.go new file mode 100644 index 000000000..ade754b9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reset_passcode_action_result.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResetPasscodeActionResult +type ResetPasscodeActionResult struct { + DeviceActionResult + // RotateBitLockerKeys action error code. Valid values 0 to 2147483647 + errorCode *int32 + // Newly generated passcode for the device + passcode *string +} +// NewResetPasscodeActionResult instantiates a new ResetPasscodeActionResult and sets the default values. +func NewResetPasscodeActionResult()(*ResetPasscodeActionResult) { + m := &ResetPasscodeActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateResetPasscodeActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResetPasscodeActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResetPasscodeActionResult(), nil +} +// GetErrorCode gets the errorCode property value. RotateBitLockerKeys action error code. Valid values 0 to 2147483647 +func (m *ResetPasscodeActionResult) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResetPasscodeActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["passcode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPasscode(val) + } + return nil + } + return res +} +// GetPasscode gets the passcode property value. Newly generated passcode for the device +func (m *ResetPasscodeActionResult) GetPasscode()(*string) { + return m.passcode +} +// Serialize serializes information the current object +func (m *ResetPasscodeActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passcode", m.GetPasscode()) + if err != nil { + return err + } + } + return nil +} +// SetErrorCode sets the errorCode property value. RotateBitLockerKeys action error code. Valid values 0 to 2147483647 +func (m *ResetPasscodeActionResult) SetErrorCode(value *int32)() { + m.errorCode = value +} +// SetPasscode sets the passcode property value. Newly generated passcode for the device +func (m *ResetPasscodeActionResult) SetPasscode(value *string)() { + m.passcode = value +} diff --git a/src/internal/connector/graph/betasdk/models/reset_passcode_action_resultable.go b/src/internal/connector/graph/betasdk/models/reset_passcode_action_resultable.go new file mode 100644 index 000000000..fba4eb186 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/reset_passcode_action_resultable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResetPasscodeActionResultable +type ResetPasscodeActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*int32) + GetPasscode()(*string) + SetErrorCode(value *int32)() + SetPasscode(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_access.go b/src/internal/connector/graph/betasdk/models/resource_access.go new file mode 100644 index 000000000..1991dea0e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_access.go @@ -0,0 +1,124 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceAccess +type ResourceAccess 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 unique identifier of an app role or delegated permission exposed by the resource application. For delegated permissions, this should match the id property of one of the delegated permissions in the oauth2PermissionScopes collection of the resource application's service principal. For app roles (application permissions), this should match the id property of an app role in the appRoles collection of the resource application's service principal. + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The OdataType property + odataType *string + // Specifies whether the id property references a delegated permission or an app role (application permission). The possible values are: Scope (for delegated permissions) or Role (for app roles). + type_escaped *string +} +// NewResourceAccess instantiates a new resourceAccess and sets the default values. +func NewResourceAccess()(*ResourceAccess) { + m := &ResourceAccess{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceAccessFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceAccessFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceAccess(), 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 *ResourceAccess) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceAccess) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetId gets the id property value. The unique identifier of an app role or delegated permission exposed by the resource application. For delegated permissions, this should match the id property of one of the delegated permissions in the oauth2PermissionScopes collection of the resource application's service principal. For app roles (application permissions), this should match the id property of an app role in the appRoles collection of the resource application's service principal. +func (m *ResourceAccess) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceAccess) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Specifies whether the id property references a delegated permission or an app role (application permission). The possible values are: Scope (for delegated permissions) or Role (for app roles). +func (m *ResourceAccess) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ResourceAccess) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *ResourceAccess) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The unique identifier of an app role or delegated permission exposed by the resource application. For delegated permissions, this should match the id property of one of the delegated permissions in the oauth2PermissionScopes collection of the resource application's service principal. For app roles (application permissions), this should match the id property of an app role in the appRoles collection of the resource application's service principal. +func (m *ResourceAccess) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceAccess) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Specifies whether the id property references a delegated permission or an app role (application permission). The possible values are: Scope (for delegated permissions) or Role (for app roles). +func (m *ResourceAccess) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_access_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_access_collection_response.go new file mode 100644 index 000000000..627b6aa15 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_access_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceAccessCollectionResponse +type ResourceAccessCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourceAccessable +} +// NewResourceAccessCollectionResponse instantiates a new ResourceAccessCollectionResponse and sets the default values. +func NewResourceAccessCollectionResponse()(*ResourceAccessCollectionResponse) { + m := &ResourceAccessCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceAccessCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceAccessCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceAccessCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceAccessCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceAccessFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceAccessable, len(val)) + for i, v := range val { + res[i] = v.(ResourceAccessable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceAccessCollectionResponse) GetValue()([]ResourceAccessable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceAccessCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceAccessCollectionResponse) SetValue(value []ResourceAccessable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_access_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_access_collection_responseable.go new file mode 100644 index 000000000..14ffafab8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_access_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceAccessCollectionResponseable +type ResourceAccessCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceAccessable) + SetValue(value []ResourceAccessable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_accessable.go b/src/internal/connector/graph/betasdk/models/resource_accessable.go new file mode 100644 index 000000000..22a76030e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_accessable.go @@ -0,0 +1,18 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceAccessable +type ResourceAccessable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOdataType()(*string) + GetType()(*string) + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_action.go b/src/internal/connector/graph/betasdk/models/resource_action.go new file mode 100644 index 000000000..5861483cb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_action.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceAction set of allowed and not allowed actions for a resource. +type ResourceAction struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Allowed Actions + allowedResourceActions []string + // Not Allowed Actions. + notAllowedResourceActions []string + // The OdataType property + odataType *string +} +// NewResourceAction instantiates a new resourceAction and sets the default values. +func NewResourceAction()(*ResourceAction) { + m := &ResourceAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceAction(), 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 *ResourceAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllowedResourceActions gets the allowedResourceActions property value. Allowed Actions +func (m *ResourceAction) GetAllowedResourceActions()([]string) { + return m.allowedResourceActions +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allowedResourceActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAllowedResourceActions(res) + } + return nil + } + res["notAllowedResourceActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotAllowedResourceActions(res) + } + 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 + } + return res +} +// GetNotAllowedResourceActions gets the notAllowedResourceActions property value. Not Allowed Actions. +func (m *ResourceAction) GetNotAllowedResourceActions()([]string) { + return m.notAllowedResourceActions +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ResourceAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAllowedResourceActions() != nil { + err := writer.WriteCollectionOfStringValues("allowedResourceActions", m.GetAllowedResourceActions()) + if err != nil { + return err + } + } + if m.GetNotAllowedResourceActions() != nil { + err := writer.WriteCollectionOfStringValues("notAllowedResourceActions", m.GetNotAllowedResourceActions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ResourceAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllowedResourceActions sets the allowedResourceActions property value. Allowed Actions +func (m *ResourceAction) SetAllowedResourceActions(value []string)() { + m.allowedResourceActions = value +} +// SetNotAllowedResourceActions sets the notAllowedResourceActions property value. Not Allowed Actions. +func (m *ResourceAction) SetNotAllowedResourceActions(value []string)() { + m.notAllowedResourceActions = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_action_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_action_collection_response.go new file mode 100644 index 000000000..10ccc5b60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceActionCollectionResponse +type ResourceActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourceActionable +} +// NewResourceActionCollectionResponse instantiates a new ResourceActionCollectionResponse and sets the default values. +func NewResourceActionCollectionResponse()(*ResourceActionCollectionResponse) { + m := &ResourceActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceActionable, len(val)) + for i, v := range val { + res[i] = v.(ResourceActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceActionCollectionResponse) GetValue()([]ResourceActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceActionCollectionResponse) SetValue(value []ResourceActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_action_collection_responseable.go new file mode 100644 index 000000000..7079df6ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceActionCollectionResponseable +type ResourceActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceActionable) + SetValue(value []ResourceActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_actionable.go b/src/internal/connector/graph/betasdk/models/resource_actionable.go new file mode 100644 index 000000000..629bc9486 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_actionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceActionable +type ResourceActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllowedResourceActions()([]string) + GetNotAllowedResourceActions()([]string) + GetOdataType()(*string) + SetAllowedResourceActions(value []string)() + SetNotAllowedResourceActions(value []string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_data.go b/src/internal/connector/graph/betasdk/models/resource_data.go new file mode 100644 index 000000000..f15597103 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_data.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceData +type ResourceData 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 OdataType property + odataType *string +} +// NewResourceData instantiates a new resourceData and sets the default values. +func NewResourceData()(*ResourceData) { + m := &ResourceData{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceDataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceDataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceData(), 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 *ResourceData) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceData) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceData) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ResourceData) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ResourceData) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceData) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_dataable.go b/src/internal/connector/graph/betasdk/models/resource_dataable.go new file mode 100644 index 000000000..9c0dd6a99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_dataable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceDataable +type ResourceDataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_operation.go b/src/internal/connector/graph/betasdk/models/resource_operation.go new file mode 100644 index 000000000..b3ff1b53b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_operation.go @@ -0,0 +1,152 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceOperation describes the resourceOperation resource (entity) of the Microsoft Graph API (REST), which supports Intune workflows related to role-based access control (RBAC). +type ResourceOperation struct { + Entity + // Type of action this operation is going to perform. The actionName should be concise and limited to as few words as possible. + actionName *string + // Description of the resource operation. The description is used in mouse-over text for the operation when shown in the Azure Portal. + description *string + // Determines whether the Permission is validated for Scopes defined per Role Assignment. This property is read-only. + enabledForScopeValidation *bool + // Resource category to which this Operation belongs. This property is read-only. + resource *string + // Name of the Resource this operation is performed on. + resourceName *string +} +// NewResourceOperation instantiates a new resourceOperation and sets the default values. +func NewResourceOperation()(*ResourceOperation) { + m := &ResourceOperation{ + Entity: *NewEntity(), + } + return m +} +// CreateResourceOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceOperation(), nil +} +// GetActionName gets the actionName property value. Type of action this operation is going to perform. The actionName should be concise and limited to as few words as possible. +func (m *ResourceOperation) GetActionName()(*string) { + return m.actionName +} +// GetDescription gets the description property value. Description of the resource operation. The description is used in mouse-over text for the operation when shown in the Azure Portal. +func (m *ResourceOperation) GetDescription()(*string) { + return m.description +} +// GetEnabledForScopeValidation gets the enabledForScopeValidation property value. Determines whether the Permission is validated for Scopes defined per Role Assignment. This property is read-only. +func (m *ResourceOperation) GetEnabledForScopeValidation()(*bool) { + return m.enabledForScopeValidation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionName(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["enabledForScopeValidation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabledForScopeValidation(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + res["resourceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceName(val) + } + return nil + } + return res +} +// GetResource gets the resource property value. Resource category to which this Operation belongs. This property is read-only. +func (m *ResourceOperation) GetResource()(*string) { + return m.resource +} +// GetResourceName gets the resourceName property value. Name of the Resource this operation is performed on. +func (m *ResourceOperation) GetResourceName()(*string) { + return m.resourceName +} +// Serialize serializes information the current object +func (m *ResourceOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("actionName", m.GetActionName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceName", m.GetResourceName()) + if err != nil { + return err + } + } + return nil +} +// SetActionName sets the actionName property value. Type of action this operation is going to perform. The actionName should be concise and limited to as few words as possible. +func (m *ResourceOperation) SetActionName(value *string)() { + m.actionName = value +} +// SetDescription sets the description property value. Description of the resource operation. The description is used in mouse-over text for the operation when shown in the Azure Portal. +func (m *ResourceOperation) SetDescription(value *string)() { + m.description = value +} +// SetEnabledForScopeValidation sets the enabledForScopeValidation property value. Determines whether the Permission is validated for Scopes defined per Role Assignment. This property is read-only. +func (m *ResourceOperation) SetEnabledForScopeValidation(value *bool)() { + m.enabledForScopeValidation = value +} +// SetResource sets the resource property value. Resource category to which this Operation belongs. This property is read-only. +func (m *ResourceOperation) SetResource(value *string)() { + m.resource = value +} +// SetResourceName sets the resourceName property value. Name of the Resource this operation is performed on. +func (m *ResourceOperation) SetResourceName(value *string)() { + m.resourceName = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_operation_collection_response.go new file mode 100644 index 000000000..a7f8a05b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceOperationCollectionResponse +type ResourceOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourceOperationable +} +// NewResourceOperationCollectionResponse instantiates a new ResourceOperationCollectionResponse and sets the default values. +func NewResourceOperationCollectionResponse()(*ResourceOperationCollectionResponse) { + m := &ResourceOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceOperationable, len(val)) + for i, v := range val { + res[i] = v.(ResourceOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceOperationCollectionResponse) GetValue()([]ResourceOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceOperationCollectionResponse) SetValue(value []ResourceOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_operation_collection_responseable.go new file mode 100644 index 000000000..4a6ddcc19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceOperationCollectionResponseable +type ResourceOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceOperationable) + SetValue(value []ResourceOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_operationable.go b/src/internal/connector/graph/betasdk/models/resource_operationable.go new file mode 100644 index 000000000..78fa3a67a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_operationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceOperationable +type ResourceOperationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionName()(*string) + GetDescription()(*string) + GetEnabledForScopeValidation()(*bool) + GetResource()(*string) + GetResourceName()(*string) + SetActionName(value *string)() + SetDescription(value *string)() + SetEnabledForScopeValidation(value *bool)() + SetResource(value *string)() + SetResourceName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_permission.go b/src/internal/connector/graph/betasdk/models/resource_permission.go new file mode 100644 index 000000000..511a87519 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_permission.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourcePermission +type ResourcePermission 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 OdataType property + odataType *string + // The type property + type_escaped *string + // The value property + value *string +} +// NewResourcePermission instantiates a new resourcePermission and sets the default values. +func NewResourcePermission()(*ResourcePermission) { + m := &ResourcePermission{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourcePermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourcePermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourcePermission(), 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 *ResourcePermission) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourcePermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(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 +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourcePermission) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type property +func (m *ResourcePermission) GetType()(*string) { + return m.type_escaped +} +// GetValue gets the value property value. The value property +func (m *ResourcePermission) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourcePermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *ResourcePermission) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourcePermission) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type property +func (m *ResourcePermission) SetType(value *string)() { + m.type_escaped = value +} +// SetValue sets the value property value. The value property +func (m *ResourcePermission) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_permission_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_permission_collection_response.go new file mode 100644 index 000000000..a82bf4041 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_permission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourcePermissionCollectionResponse +type ResourcePermissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourcePermissionable +} +// NewResourcePermissionCollectionResponse instantiates a new ResourcePermissionCollectionResponse and sets the default values. +func NewResourcePermissionCollectionResponse()(*ResourcePermissionCollectionResponse) { + m := &ResourcePermissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourcePermissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourcePermissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourcePermissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourcePermissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourcePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourcePermissionable, len(val)) + for i, v := range val { + res[i] = v.(ResourcePermissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourcePermissionCollectionResponse) GetValue()([]ResourcePermissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourcePermissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourcePermissionCollectionResponse) SetValue(value []ResourcePermissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_permission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_permission_collection_responseable.go new file mode 100644 index 000000000..7c1656704 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_permission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourcePermissionCollectionResponseable +type ResourcePermissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourcePermissionable) + SetValue(value []ResourcePermissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_permissionable.go b/src/internal/connector/graph/betasdk/models/resource_permissionable.go new file mode 100644 index 000000000..6403225b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_permissionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourcePermissionable +type ResourcePermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetType()(*string) + GetValue()(*string) + SetOdataType(value *string)() + SetType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_reference.go b/src/internal/connector/graph/betasdk/models/resource_reference.go new file mode 100644 index 000000000..beb2c3e47 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_reference.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceReference +type ResourceReference 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 item's unique identifier. + id *string + // The OdataType property + odataType *string + // A string value that can be used to classify the item, such as 'microsoft.graph.driveItem' + type_escaped *string + // A URL leading to the referenced item. + webUrl *string +} +// NewResourceReference instantiates a new resourceReference and sets the default values. +func NewResourceReference()(*ResourceReference) { + m := &ResourceReference{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceReferenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceReferenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceReference(), 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 *ResourceReference) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceReference) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetId gets the id property value. The item's unique identifier. +func (m *ResourceReference) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceReference) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. A string value that can be used to classify the item, such as 'microsoft.graph.driveItem' +func (m *ResourceReference) GetType()(*string) { + return m.type_escaped +} +// GetWebUrl gets the webUrl property value. A URL leading to the referenced item. +func (m *ResourceReference) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *ResourceReference) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *ResourceReference) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The item's unique identifier. +func (m *ResourceReference) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceReference) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. A string value that can be used to classify the item, such as 'microsoft.graph.driveItem' +func (m *ResourceReference) SetType(value *string)() { + m.type_escaped = value +} +// SetWebUrl sets the webUrl property value. A URL leading to the referenced item. +func (m *ResourceReference) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_referenceable.go b/src/internal/connector/graph/betasdk/models/resource_referenceable.go new file mode 100644 index 000000000..530f1fb22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_referenceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceReferenceable +type ResourceReferenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetOdataType()(*string) + GetType()(*string) + GetWebUrl()(*string) + SetId(value *string)() + SetOdataType(value *string)() + SetType(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission.go new file mode 100644 index 000000000..06413768a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission.go @@ -0,0 +1,202 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermission +type ResourceSpecificPermission 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 description property + description *string + // The displayName property + displayName *string + // The id property + id *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The isEnabled property + isEnabled *bool + // The OdataType property + odataType *string + // The value property + value *string +} +// NewResourceSpecificPermission instantiates a new resourceSpecificPermission and sets the default values. +func NewResourceSpecificPermission()(*ResourceSpecificPermission) { + m := &ResourceSpecificPermission{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceSpecificPermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceSpecificPermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceSpecificPermission(), 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 *ResourceSpecificPermission) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +func (m *ResourceSpecificPermission) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *ResourceSpecificPermission) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceSpecificPermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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 +} +// GetId gets the id property value. The id property +func (m *ResourceSpecificPermission) GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.id +} +// GetIsEnabled gets the isEnabled property value. The isEnabled property +func (m *ResourceSpecificPermission) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceSpecificPermission) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. The value property +func (m *ResourceSpecificPermission) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceSpecificPermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + 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 *ResourceSpecificPermission) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *ResourceSpecificPermission) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *ResourceSpecificPermission) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. The id property +func (m *ResourceSpecificPermission) SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.id = value +} +// SetIsEnabled sets the isEnabled property value. The isEnabled property +func (m *ResourceSpecificPermission) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceSpecificPermission) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. The value property +func (m *ResourceSpecificPermission) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_response.go new file mode 100644 index 000000000..7edc7f1a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionCollectionResponse +type ResourceSpecificPermissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourceSpecificPermissionable +} +// NewResourceSpecificPermissionCollectionResponse instantiates a new ResourceSpecificPermissionCollectionResponse and sets the default values. +func NewResourceSpecificPermissionCollectionResponse()(*ResourceSpecificPermissionCollectionResponse) { + m := &ResourceSpecificPermissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceSpecificPermissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceSpecificPermissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceSpecificPermissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceSpecificPermissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceSpecificPermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceSpecificPermissionable, len(val)) + for i, v := range val { + res[i] = v.(ResourceSpecificPermissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceSpecificPermissionCollectionResponse) GetValue()([]ResourceSpecificPermissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceSpecificPermissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceSpecificPermissionCollectionResponse) SetValue(value []ResourceSpecificPermissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_responseable.go new file mode 100644 index 000000000..fd9ed03ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionCollectionResponseable +type ResourceSpecificPermissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceSpecificPermissionable) + SetValue(value []ResourceSpecificPermissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant.go new file mode 100644 index 000000000..1693b0b56 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant.go @@ -0,0 +1,166 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionGrant provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResourceSpecificPermissionGrant struct { + DirectoryObject + // ID of the service principal of the Azure AD app that has been granted access. Read-only. + clientAppId *string + // ID of the Azure AD app that has been granted access. Read-only. + clientId *string + // The name of the resource-specific permission. Read-only. + permission *string + // The type of permission. Possible values are: Application, Delegated. Read-only. + permissionType *string + // ID of the Azure AD app that is hosting the resource. Read-only. + resourceAppId *string +} +// NewResourceSpecificPermissionGrant instantiates a new resourceSpecificPermissionGrant and sets the default values. +func NewResourceSpecificPermissionGrant()(*ResourceSpecificPermissionGrant) { + m := &ResourceSpecificPermissionGrant{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.resourceSpecificPermissionGrant"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateResourceSpecificPermissionGrantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceSpecificPermissionGrantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceSpecificPermissionGrant(), nil +} +// GetClientAppId gets the clientAppId property value. ID of the service principal of the Azure AD app that has been granted access. Read-only. +func (m *ResourceSpecificPermissionGrant) GetClientAppId()(*string) { + return m.clientAppId +} +// GetClientId gets the clientId property value. ID of the Azure AD app that has been granted access. Read-only. +func (m *ResourceSpecificPermissionGrant) GetClientId()(*string) { + return m.clientId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceSpecificPermissionGrant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["clientAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientAppId(val) + } + return nil + } + res["clientId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientId(val) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermission(val) + } + return nil + } + res["permissionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPermissionType(val) + } + return nil + } + res["resourceAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceAppId(val) + } + return nil + } + return res +} +// GetPermission gets the permission property value. The name of the resource-specific permission. Read-only. +func (m *ResourceSpecificPermissionGrant) GetPermission()(*string) { + return m.permission +} +// GetPermissionType gets the permissionType property value. The type of permission. Possible values are: Application, Delegated. Read-only. +func (m *ResourceSpecificPermissionGrant) GetPermissionType()(*string) { + return m.permissionType +} +// GetResourceAppId gets the resourceAppId property value. ID of the Azure AD app that is hosting the resource. Read-only. +func (m *ResourceSpecificPermissionGrant) GetResourceAppId()(*string) { + return m.resourceAppId +} +// Serialize serializes information the current object +func (m *ResourceSpecificPermissionGrant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("clientAppId", m.GetClientAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientId", m.GetClientId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("permissionType", m.GetPermissionType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceAppId", m.GetResourceAppId()) + if err != nil { + return err + } + } + return nil +} +// SetClientAppId sets the clientAppId property value. ID of the service principal of the Azure AD app that has been granted access. Read-only. +func (m *ResourceSpecificPermissionGrant) SetClientAppId(value *string)() { + m.clientAppId = value +} +// SetClientId sets the clientId property value. ID of the Azure AD app that has been granted access. Read-only. +func (m *ResourceSpecificPermissionGrant) SetClientId(value *string)() { + m.clientId = value +} +// SetPermission sets the permission property value. The name of the resource-specific permission. Read-only. +func (m *ResourceSpecificPermissionGrant) SetPermission(value *string)() { + m.permission = value +} +// SetPermissionType sets the permissionType property value. The type of permission. Possible values are: Application, Delegated. Read-only. +func (m *ResourceSpecificPermissionGrant) SetPermissionType(value *string)() { + m.permissionType = value +} +// SetResourceAppId sets the resourceAppId property value. ID of the Azure AD app that is hosting the resource. Read-only. +func (m *ResourceSpecificPermissionGrant) SetResourceAppId(value *string)() { + m.resourceAppId = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_response.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_response.go new file mode 100644 index 000000000..07d6ecdbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionGrantCollectionResponse +type ResourceSpecificPermissionGrantCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResourceSpecificPermissionGrantable +} +// NewResourceSpecificPermissionGrantCollectionResponse instantiates a new ResourceSpecificPermissionGrantCollectionResponse and sets the default values. +func NewResourceSpecificPermissionGrantCollectionResponse()(*ResourceSpecificPermissionGrantCollectionResponse) { + m := &ResourceSpecificPermissionGrantCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceSpecificPermissionGrantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceSpecificPermissionGrantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceSpecificPermissionGrantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceSpecificPermissionGrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceSpecificPermissionGrantable, len(val)) + for i, v := range val { + res[i] = v.(ResourceSpecificPermissionGrantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResourceSpecificPermissionGrantCollectionResponse) GetValue()([]ResourceSpecificPermissionGrantable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResourceSpecificPermissionGrantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResourceSpecificPermissionGrantCollectionResponse) SetValue(value []ResourceSpecificPermissionGrantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_responseable.go new file mode 100644 index 000000000..038b5a661 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grant_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionGrantCollectionResponseable +type ResourceSpecificPermissionGrantCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResourceSpecificPermissionGrantable) + SetValue(value []ResourceSpecificPermissionGrantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permission_grantable.go b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grantable.go new file mode 100644 index 000000000..1152f909a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permission_grantable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionGrantable +type ResourceSpecificPermissionGrantable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClientAppId()(*string) + GetClientId()(*string) + GetPermission()(*string) + GetPermissionType()(*string) + GetResourceAppId()(*string) + SetClientAppId(value *string)() + SetClientId(value *string)() + SetPermission(value *string)() + SetPermissionType(value *string)() + SetResourceAppId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_specific_permissionable.go b/src/internal/connector/graph/betasdk/models/resource_specific_permissionable.go new file mode 100644 index 000000000..672f1805d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_specific_permissionable.go @@ -0,0 +1,24 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceSpecificPermissionable +type ResourceSpecificPermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetValue()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/resource_visualization.go b/src/internal/connector/graph/betasdk/models/resource_visualization.go new file mode 100644 index 000000000..2327fe8d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_visualization.go @@ -0,0 +1,279 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceVisualization +type ResourceVisualization struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item. + containerDisplayName *string + // Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness. + containerType *string + // A path leading to the folder in which the item is stored. + containerWebUrl *string + // The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported. + mediaType *string + // The OdataType property + odataType *string + // A URL leading to the preview image for the item. + previewImageUrl *string + // A preview text for the item. + previewText *string + // The item's title text. + title *string + // The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types. + type_escaped *string +} +// NewResourceVisualization instantiates a new resourceVisualization and sets the default values. +func NewResourceVisualization()(*ResourceVisualization) { + m := &ResourceVisualization{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResourceVisualizationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResourceVisualizationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResourceVisualization(), 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 *ResourceVisualization) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContainerDisplayName gets the containerDisplayName property value. A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item. +func (m *ResourceVisualization) GetContainerDisplayName()(*string) { + return m.containerDisplayName +} +// GetContainerType gets the containerType property value. Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness. +func (m *ResourceVisualization) GetContainerType()(*string) { + return m.containerType +} +// GetContainerWebUrl gets the containerWebUrl property value. A path leading to the folder in which the item is stored. +func (m *ResourceVisualization) GetContainerWebUrl()(*string) { + return m.containerWebUrl +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResourceVisualization) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["containerDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContainerDisplayName(val) + } + return nil + } + res["containerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContainerType(val) + } + return nil + } + res["containerWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContainerWebUrl(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(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["previewImageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviewImageUrl(val) + } + return nil + } + res["previewText"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreviewText(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported. +func (m *ResourceVisualization) GetMediaType()(*string) { + return m.mediaType +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResourceVisualization) GetOdataType()(*string) { + return m.odataType +} +// GetPreviewImageUrl gets the previewImageUrl property value. A URL leading to the preview image for the item. +func (m *ResourceVisualization) GetPreviewImageUrl()(*string) { + return m.previewImageUrl +} +// GetPreviewText gets the previewText property value. A preview text for the item. +func (m *ResourceVisualization) GetPreviewText()(*string) { + return m.previewText +} +// GetTitle gets the title property value. The item's title text. +func (m *ResourceVisualization) GetTitle()(*string) { + return m.title +} +// GetType gets the type property value. The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types. +func (m *ResourceVisualization) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *ResourceVisualization) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("containerDisplayName", m.GetContainerDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("containerType", m.GetContainerType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("containerWebUrl", m.GetContainerWebUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previewImageUrl", m.GetPreviewImageUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("previewText", m.GetPreviewText()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *ResourceVisualization) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContainerDisplayName sets the containerDisplayName property value. A string describing where the item is stored. For example, the name of a SharePoint site or the user name identifying the owner of the OneDrive storing the item. +func (m *ResourceVisualization) SetContainerDisplayName(value *string)() { + m.containerDisplayName = value +} +// SetContainerType sets the containerType property value. Can be used for filtering by the type of container in which the file is stored. Such as Site or OneDriveBusiness. +func (m *ResourceVisualization) SetContainerType(value *string)() { + m.containerType = value +} +// SetContainerWebUrl sets the containerWebUrl property value. A path leading to the folder in which the item is stored. +func (m *ResourceVisualization) SetContainerWebUrl(value *string)() { + m.containerWebUrl = value +} +// SetMediaType sets the mediaType property value. The item's media type. Can be used for filtering for a specific type of file based on supported IANA Media Mime Types. Note that not all Media Mime Types are supported. +func (m *ResourceVisualization) SetMediaType(value *string)() { + m.mediaType = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResourceVisualization) SetOdataType(value *string)() { + m.odataType = value +} +// SetPreviewImageUrl sets the previewImageUrl property value. A URL leading to the preview image for the item. +func (m *ResourceVisualization) SetPreviewImageUrl(value *string)() { + m.previewImageUrl = value +} +// SetPreviewText sets the previewText property value. A preview text for the item. +func (m *ResourceVisualization) SetPreviewText(value *string)() { + m.previewText = value +} +// SetTitle sets the title property value. The item's title text. +func (m *ResourceVisualization) SetTitle(value *string)() { + m.title = value +} +// SetType sets the type property value. The item's media type. Can be used for filtering for a specific file based on a specific type. See below for supported types. +func (m *ResourceVisualization) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/resource_visualizationable.go b/src/internal/connector/graph/betasdk/models/resource_visualizationable.go new file mode 100644 index 000000000..625feed0b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resource_visualizationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResourceVisualizationable +type ResourceVisualizationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContainerDisplayName()(*string) + GetContainerType()(*string) + GetContainerWebUrl()(*string) + GetMediaType()(*string) + GetOdataType()(*string) + GetPreviewImageUrl()(*string) + GetPreviewText()(*string) + GetTitle()(*string) + GetType()(*string) + SetContainerDisplayName(value *string)() + SetContainerType(value *string)() + SetContainerWebUrl(value *string)() + SetMediaType(value *string)() + SetOdataType(value *string)() + SetPreviewImageUrl(value *string)() + SetPreviewText(value *string)() + SetTitle(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/response_status.go b/src/internal/connector/graph/betasdk/models/response_status.go new file mode 100644 index 000000000..5a9d77d8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/response_status.go @@ -0,0 +1,125 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponseStatus +type ResponseStatus 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 OdataType property + odataType *string + // The response type. Possible values are: none, organizer, tentativelyAccepted, accepted, declined, notResponded.To differentiate between none and notResponded: none – from organizer's perspective. This value is used when the status of an attendee/participant is reported to the organizer of a meeting. notResponded – from attendee's perspective. Indicates the attendee has not responded to the meeting request. Clients can treat notResponded == none. As an example, if attendee Alex hasn't responded to a meeting request, getting Alex' response status for that event in Alex' calendar returns notResponded. Getting Alex' response from the calendar of any other attendee or the organizer's returns none. Getting the organizer's response for the event in anybody's calendar also returns none. + response *ResponseType + // The date and time that the response was returned. It uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + time *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewResponseStatus instantiates a new responseStatus and sets the default values. +func NewResponseStatus()(*ResponseStatus) { + m := &ResponseStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResponseStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResponseStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResponseStatus(), 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 *ResponseStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResponseStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["response"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseResponseType) + if err != nil { + return err + } + if val != nil { + m.SetResponse(val.(*ResponseType)) + } + return nil + } + res["time"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResponseStatus) GetOdataType()(*string) { + return m.odataType +} +// GetResponse gets the response property value. The response type. Possible values are: none, organizer, tentativelyAccepted, accepted, declined, notResponded.To differentiate between none and notResponded: none – from organizer's perspective. This value is used when the status of an attendee/participant is reported to the organizer of a meeting. notResponded – from attendee's perspective. Indicates the attendee has not responded to the meeting request. Clients can treat notResponded == none. As an example, if attendee Alex hasn't responded to a meeting request, getting Alex' response status for that event in Alex' calendar returns notResponded. Getting Alex' response from the calendar of any other attendee or the organizer's returns none. Getting the organizer's response for the event in anybody's calendar also returns none. +func (m *ResponseStatus) GetResponse()(*ResponseType) { + return m.response +} +// GetTime gets the time property value. The date and time that the response was returned. It uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ResponseStatus) GetTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.time +} +// Serialize serializes information the current object +func (m *ResponseStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResponse() != nil { + cast := (*m.GetResponse()).String() + err := writer.WriteStringValue("response", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("time", m.GetTime()) + 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 *ResponseStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResponseStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetResponse sets the response property value. The response type. Possible values are: none, organizer, tentativelyAccepted, accepted, declined, notResponded.To differentiate between none and notResponded: none – from organizer's perspective. This value is used when the status of an attendee/participant is reported to the organizer of a meeting. notResponded – from attendee's perspective. Indicates the attendee has not responded to the meeting request. Clients can treat notResponded == none. As an example, if attendee Alex hasn't responded to a meeting request, getting Alex' response status for that event in Alex' calendar returns notResponded. Getting Alex' response from the calendar of any other attendee or the organizer's returns none. Getting the organizer's response for the event in anybody's calendar also returns none. +func (m *ResponseStatus) SetResponse(value *ResponseType)() { + m.response = value +} +// SetTime sets the time property value. The date and time that the response was returned. It uses ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ResponseStatus) SetTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.time = value +} diff --git a/src/internal/connector/graph/betasdk/models/response_statusable.go b/src/internal/connector/graph/betasdk/models/response_statusable.go new file mode 100644 index 000000000..f3118f802 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/response_statusable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponseStatusable +type ResponseStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetResponse()(*ResponseType) + GetTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetOdataType(value *string)() + SetResponse(value *ResponseType)() + SetTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/response_type.go b/src/internal/connector/graph/betasdk/models/response_type.go new file mode 100644 index 000000000..dc12b9522 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/response_type.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResponseType int + +const ( + NONE_RESPONSETYPE ResponseType = iota + ORGANIZER_RESPONSETYPE + TENTATIVELYACCEPTED_RESPONSETYPE + ACCEPTED_RESPONSETYPE + DECLINED_RESPONSETYPE + NOTRESPONDED_RESPONSETYPE +) + +func (i ResponseType) String() string { + return []string{"none", "organizer", "tentativelyAccepted", "accepted", "declined", "notResponded"}[i] +} +func ParseResponseType(v string) (interface{}, error) { + result := NONE_RESPONSETYPE + switch v { + case "none": + result = NONE_RESPONSETYPE + case "organizer": + result = ORGANIZER_RESPONSETYPE + case "tentativelyAccepted": + result = TENTATIVELYACCEPTED_RESPONSETYPE + case "accepted": + result = ACCEPTED_RESPONSETYPE + case "declined": + result = DECLINED_RESPONSETYPE + case "notResponded": + result = NOTRESPONDED_RESPONSETYPE + default: + return 0, errors.New("Unknown ResponseType value: " + v) + } + return &result, nil +} +func SerializeResponseType(values []ResponseType) []string { + 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/responsible_policy.go b/src/internal/connector/graph/betasdk/models/responsible_policy.go new file mode 100644 index 000000000..01d04dcc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_policy.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsiblePolicy +type ResponsiblePolicy 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 id property + id *string + // The name property + name *string + // The OdataType property + odataType *string +} +// NewResponsiblePolicy instantiates a new responsiblePolicy and sets the default values. +func NewResponsiblePolicy()(*ResponsiblePolicy) { + m := &ResponsiblePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResponsiblePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResponsiblePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResponsiblePolicy(), 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 *ResponsiblePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResponsiblePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 + } + return res +} +// GetId gets the id property value. The id property +func (m *ResponsiblePolicy) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name property +func (m *ResponsiblePolicy) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResponsiblePolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ResponsiblePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ResponsiblePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetId sets the id property value. The id property +func (m *ResponsiblePolicy) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *ResponsiblePolicy) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResponsiblePolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/responsible_policyable.go b/src/internal/connector/graph/betasdk/models/responsible_policyable.go new file mode 100644 index 000000000..4766fe66c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsiblePolicyable +type ResponsiblePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/responsible_sensitive_type.go b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type.go new file mode 100644 index 000000000..86e6cd3b4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type.go @@ -0,0 +1,227 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsibleSensitiveType +type ResponsibleSensitiveType 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 description property + description *string + // The id property + id *string + // The name property + name *string + // The OdataType property + odataType *string + // The publisherName property + publisherName *string + // The rulePackageId property + rulePackageId *string + // The rulePackageType property + rulePackageType *string +} +// NewResponsibleSensitiveType instantiates a new responsibleSensitiveType and sets the default values. +func NewResponsibleSensitiveType()(*ResponsibleSensitiveType) { + m := &ResponsibleSensitiveType{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResponsibleSensitiveTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResponsibleSensitiveTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResponsibleSensitiveType(), 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 *ResponsibleSensitiveType) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description property +func (m *ResponsibleSensitiveType) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResponsibleSensitiveType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["publisherName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisherName(val) + } + return nil + } + res["rulePackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRulePackageId(val) + } + return nil + } + res["rulePackageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRulePackageType(val) + } + return nil + } + return res +} +// GetId gets the id property value. The id property +func (m *ResponsibleSensitiveType) GetId()(*string) { + return m.id +} +// GetName gets the name property value. The name property +func (m *ResponsibleSensitiveType) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResponsibleSensitiveType) GetOdataType()(*string) { + return m.odataType +} +// GetPublisherName gets the publisherName property value. The publisherName property +func (m *ResponsibleSensitiveType) GetPublisherName()(*string) { + return m.publisherName +} +// GetRulePackageId gets the rulePackageId property value. The rulePackageId property +func (m *ResponsibleSensitiveType) GetRulePackageId()(*string) { + return m.rulePackageId +} +// GetRulePackageType gets the rulePackageType property value. The rulePackageType property +func (m *ResponsibleSensitiveType) GetRulePackageType()(*string) { + return m.rulePackageType +} +// Serialize serializes information the current object +func (m *ResponsibleSensitiveType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("publisherName", m.GetPublisherName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rulePackageId", m.GetRulePackageId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("rulePackageType", m.GetRulePackageType()) + 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 *ResponsibleSensitiveType) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description property +func (m *ResponsibleSensitiveType) SetDescription(value *string)() { + m.description = value +} +// SetId sets the id property value. The id property +func (m *ResponsibleSensitiveType) SetId(value *string)() { + m.id = value +} +// SetName sets the name property value. The name property +func (m *ResponsibleSensitiveType) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResponsibleSensitiveType) SetOdataType(value *string)() { + m.odataType = value +} +// SetPublisherName sets the publisherName property value. The publisherName property +func (m *ResponsibleSensitiveType) SetPublisherName(value *string)() { + m.publisherName = value +} +// SetRulePackageId sets the rulePackageId property value. The rulePackageId property +func (m *ResponsibleSensitiveType) SetRulePackageId(value *string)() { + m.rulePackageId = value +} +// SetRulePackageType sets the rulePackageType property value. The rulePackageType property +func (m *ResponsibleSensitiveType) SetRulePackageType(value *string)() { + m.rulePackageType = value +} diff --git a/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_response.go b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_response.go new file mode 100644 index 000000000..3a554da22 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsibleSensitiveTypeCollectionResponse +type ResponsibleSensitiveTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ResponsibleSensitiveTypeable +} +// NewResponsibleSensitiveTypeCollectionResponse instantiates a new ResponsibleSensitiveTypeCollectionResponse and sets the default values. +func NewResponsibleSensitiveTypeCollectionResponse()(*ResponsibleSensitiveTypeCollectionResponse) { + m := &ResponsibleSensitiveTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateResponsibleSensitiveTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResponsibleSensitiveTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResponsibleSensitiveTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResponsibleSensitiveTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResponsibleSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResponsibleSensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(ResponsibleSensitiveTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ResponsibleSensitiveTypeCollectionResponse) GetValue()([]ResponsibleSensitiveTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *ResponsibleSensitiveTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ResponsibleSensitiveTypeCollectionResponse) SetValue(value []ResponsibleSensitiveTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_responseable.go new file mode 100644 index 000000000..2e2a25ad8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_sensitive_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsibleSensitiveTypeCollectionResponseable +type ResponsibleSensitiveTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ResponsibleSensitiveTypeable) + SetValue(value []ResponsibleSensitiveTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/responsible_sensitive_typeable.go b/src/internal/connector/graph/betasdk/models/responsible_sensitive_typeable.go new file mode 100644 index 000000000..06d680653 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/responsible_sensitive_typeable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResponsibleSensitiveTypeable +type ResponsibleSensitiveTypeable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetId()(*string) + GetName()(*string) + GetOdataType()(*string) + GetPublisherName()(*string) + GetRulePackageId()(*string) + GetRulePackageType()(*string) + SetDescription(value *string)() + SetId(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetPublisherName(value *string)() + SetRulePackageId(value *string)() + SetRulePackageType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/restore_action.go b/src/internal/connector/graph/betasdk/models/restore_action.go new file mode 100644 index 000000000..b5901b564 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restore_action.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestoreAction +type RestoreAction 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 OdataType property + odataType *string +} +// NewRestoreAction instantiates a new restoreAction and sets the default values. +func NewRestoreAction()(*RestoreAction) { + m := &RestoreAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRestoreActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRestoreActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRestoreAction(), 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 *RestoreAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RestoreAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RestoreAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RestoreAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RestoreAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RestoreAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/restore_actionable.go b/src/internal/connector/graph/betasdk/models/restore_actionable.go new file mode 100644 index 000000000..72226bb54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restore_actionable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestoreActionable +type RestoreActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/restricted_apps_state.go b/src/internal/connector/graph/betasdk/models/restricted_apps_state.go new file mode 100644 index 000000000..0f7b1d884 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restricted_apps_state.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RestrictedAppsState int + +const ( + // Prohibited apps + PROHIBITEDAPPS_RESTRICTEDAPPSSTATE RestrictedAppsState = iota + // Not approved apps + NOTAPPROVEDAPPS_RESTRICTEDAPPSSTATE +) + +func (i RestrictedAppsState) String() string { + return []string{"prohibitedApps", "notApprovedApps"}[i] +} +func ParseRestrictedAppsState(v string) (interface{}, error) { + result := PROHIBITEDAPPS_RESTRICTEDAPPSSTATE + switch v { + case "prohibitedApps": + result = PROHIBITEDAPPS_RESTRICTEDAPPSSTATE + case "notApprovedApps": + result = NOTAPPROVEDAPPS_RESTRICTEDAPPSSTATE + default: + return 0, errors.New("Unknown RestrictedAppsState value: " + v) + } + return &result, nil +} +func SerializeRestrictedAppsState(values []RestrictedAppsState) []string { + 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/restricted_apps_violation.go b/src/internal/connector/graph/betasdk/models/restricted_apps_violation.go new file mode 100644 index 000000000..f3f08a8d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restricted_apps_violation.go @@ -0,0 +1,278 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestrictedAppsViolation violation of restricted apps configuration profile per device per user +type RestrictedAppsViolation struct { + Entity + // Device configuration profile unique identifier, must be Guid + deviceConfigurationId *string + // Device configuration profile name + deviceConfigurationName *string + // Device name + deviceName *string + // Managed device unique identifier, must be Guid + managedDeviceId *string + // Supported platform types for policies. + platformType *PolicyPlatformType + // List of violated restricted apps + restrictedApps []ManagedDeviceReportedAppable + // Restricted apps state + restrictedAppsState *RestrictedAppsState + // User unique identifier, must be Guid + userId *string + // User name + userName *string +} +// NewRestrictedAppsViolation instantiates a new restrictedAppsViolation and sets the default values. +func NewRestrictedAppsViolation()(*RestrictedAppsViolation) { + m := &RestrictedAppsViolation{ + Entity: *NewEntity(), + } + return m +} +// CreateRestrictedAppsViolationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRestrictedAppsViolationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRestrictedAppsViolation(), nil +} +// GetDeviceConfigurationId gets the deviceConfigurationId property value. Device configuration profile unique identifier, must be Guid +func (m *RestrictedAppsViolation) GetDeviceConfigurationId()(*string) { + return m.deviceConfigurationId +} +// GetDeviceConfigurationName gets the deviceConfigurationName property value. Device configuration profile name +func (m *RestrictedAppsViolation) GetDeviceConfigurationName()(*string) { + return m.deviceConfigurationName +} +// GetDeviceName gets the deviceName property value. Device name +func (m *RestrictedAppsViolation) GetDeviceName()(*string) { + return m.deviceName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RestrictedAppsViolation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceConfigurationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfigurationId(val) + } + return nil + } + res["deviceConfigurationName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceConfigurationName(val) + } + return nil + } + res["deviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceName(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["platformType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyPlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatformType(val.(*PolicyPlatformType)) + } + return nil + } + res["restrictedApps"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateManagedDeviceReportedAppFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ManagedDeviceReportedAppable, len(val)) + for i, v := range val { + res[i] = v.(ManagedDeviceReportedAppable) + } + m.SetRestrictedApps(res) + } + return nil + } + res["restrictedAppsState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRestrictedAppsState) + if err != nil { + return err + } + if val != nil { + m.SetRestrictedAppsState(val.(*RestrictedAppsState)) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserName(val) + } + return nil + } + return res +} +// GetManagedDeviceId gets the managedDeviceId property value. Managed device unique identifier, must be Guid +func (m *RestrictedAppsViolation) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetPlatformType gets the platformType property value. Supported platform types for policies. +func (m *RestrictedAppsViolation) GetPlatformType()(*PolicyPlatformType) { + return m.platformType +} +// GetRestrictedApps gets the restrictedApps property value. List of violated restricted apps +func (m *RestrictedAppsViolation) GetRestrictedApps()([]ManagedDeviceReportedAppable) { + return m.restrictedApps +} +// GetRestrictedAppsState gets the restrictedAppsState property value. Restricted apps state +func (m *RestrictedAppsViolation) GetRestrictedAppsState()(*RestrictedAppsState) { + return m.restrictedAppsState +} +// GetUserId gets the userId property value. User unique identifier, must be Guid +func (m *RestrictedAppsViolation) GetUserId()(*string) { + return m.userId +} +// GetUserName gets the userName property value. User name +func (m *RestrictedAppsViolation) GetUserName()(*string) { + return m.userName +} +// Serialize serializes information the current object +func (m *RestrictedAppsViolation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceConfigurationId", m.GetDeviceConfigurationId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceConfigurationName", m.GetDeviceConfigurationName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceName", m.GetDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + if m.GetPlatformType() != nil { + cast := (*m.GetPlatformType()).String() + err = writer.WriteStringValue("platformType", &cast) + if err != nil { + return err + } + } + if m.GetRestrictedApps() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRestrictedApps())) + for i, v := range m.GetRestrictedApps() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("restrictedApps", cast) + if err != nil { + return err + } + } + if m.GetRestrictedAppsState() != nil { + cast := (*m.GetRestrictedAppsState()).String() + err = writer.WriteStringValue("restrictedAppsState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userName", m.GetUserName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceConfigurationId sets the deviceConfigurationId property value. Device configuration profile unique identifier, must be Guid +func (m *RestrictedAppsViolation) SetDeviceConfigurationId(value *string)() { + m.deviceConfigurationId = value +} +// SetDeviceConfigurationName sets the deviceConfigurationName property value. Device configuration profile name +func (m *RestrictedAppsViolation) SetDeviceConfigurationName(value *string)() { + m.deviceConfigurationName = value +} +// SetDeviceName sets the deviceName property value. Device name +func (m *RestrictedAppsViolation) SetDeviceName(value *string)() { + m.deviceName = value +} +// SetManagedDeviceId sets the managedDeviceId property value. Managed device unique identifier, must be Guid +func (m *RestrictedAppsViolation) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetPlatformType sets the platformType property value. Supported platform types for policies. +func (m *RestrictedAppsViolation) SetPlatformType(value *PolicyPlatformType)() { + m.platformType = value +} +// SetRestrictedApps sets the restrictedApps property value. List of violated restricted apps +func (m *RestrictedAppsViolation) SetRestrictedApps(value []ManagedDeviceReportedAppable)() { + m.restrictedApps = value +} +// SetRestrictedAppsState sets the restrictedAppsState property value. Restricted apps state +func (m *RestrictedAppsViolation) SetRestrictedAppsState(value *RestrictedAppsState)() { + m.restrictedAppsState = value +} +// SetUserId sets the userId property value. User unique identifier, must be Guid +func (m *RestrictedAppsViolation) SetUserId(value *string)() { + m.userId = value +} +// SetUserName sets the userName property value. User name +func (m *RestrictedAppsViolation) SetUserName(value *string)() { + m.userName = value +} diff --git a/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_response.go b/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_response.go new file mode 100644 index 000000000..087168af8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestrictedAppsViolationCollectionResponse +type RestrictedAppsViolationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RestrictedAppsViolationable +} +// NewRestrictedAppsViolationCollectionResponse instantiates a new RestrictedAppsViolationCollectionResponse and sets the default values. +func NewRestrictedAppsViolationCollectionResponse()(*RestrictedAppsViolationCollectionResponse) { + m := &RestrictedAppsViolationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRestrictedAppsViolationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRestrictedAppsViolationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRestrictedAppsViolationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RestrictedAppsViolationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRestrictedAppsViolationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RestrictedAppsViolationable, len(val)) + for i, v := range val { + res[i] = v.(RestrictedAppsViolationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RestrictedAppsViolationCollectionResponse) GetValue()([]RestrictedAppsViolationable) { + return m.value +} +// Serialize serializes information the current object +func (m *RestrictedAppsViolationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RestrictedAppsViolationCollectionResponse) SetValue(value []RestrictedAppsViolationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_responseable.go new file mode 100644 index 000000000..605e89509 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restricted_apps_violation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestrictedAppsViolationCollectionResponseable +type RestrictedAppsViolationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RestrictedAppsViolationable) + SetValue(value []RestrictedAppsViolationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/restricted_apps_violationable.go b/src/internal/connector/graph/betasdk/models/restricted_apps_violationable.go new file mode 100644 index 000000000..91da06357 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restricted_apps_violationable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RestrictedAppsViolationable +type RestrictedAppsViolationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceConfigurationId()(*string) + GetDeviceConfigurationName()(*string) + GetDeviceName()(*string) + GetManagedDeviceId()(*string) + GetPlatformType()(*PolicyPlatformType) + GetRestrictedApps()([]ManagedDeviceReportedAppable) + GetRestrictedAppsState()(*RestrictedAppsState) + GetUserId()(*string) + GetUserName()(*string) + SetDeviceConfigurationId(value *string)() + SetDeviceConfigurationName(value *string)() + SetDeviceName(value *string)() + SetManagedDeviceId(value *string)() + SetPlatformType(value *PolicyPlatformType)() + SetRestrictedApps(value []ManagedDeviceReportedAppable)() + SetRestrictedAppsState(value *RestrictedAppsState)() + SetUserId(value *string)() + SetUserName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/restriction_action.go b/src/internal/connector/graph/betasdk/models/restriction_action.go new file mode 100644 index 000000000..fdcbf3a7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restriction_action.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RestrictionAction int + +const ( + WARN_RESTRICTIONACTION RestrictionAction = iota + AUDIT_RESTRICTIONACTION + BLOCK_RESTRICTIONACTION +) + +func (i RestrictionAction) String() string { + return []string{"warn", "audit", "block"}[i] +} +func ParseRestrictionAction(v string) (interface{}, error) { + result := WARN_RESTRICTIONACTION + switch v { + case "warn": + result = WARN_RESTRICTIONACTION + case "audit": + result = AUDIT_RESTRICTIONACTION + case "block": + result = BLOCK_RESTRICTIONACTION + default: + return 0, errors.New("Unknown RestrictionAction value: " + v) + } + return &result, nil +} +func SerializeRestrictionAction(values []RestrictionAction) []string { + 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/restriction_trigger.go b/src/internal/connector/graph/betasdk/models/restriction_trigger.go new file mode 100644 index 000000000..40472febf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/restriction_trigger.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RestrictionTrigger int + +const ( + COPYPASTE_RESTRICTIONTRIGGER RestrictionTrigger = iota + COPYTONETWORKSHARE_RESTRICTIONTRIGGER + COPYTOREMOVABLEMEDIA_RESTRICTIONTRIGGER + SCREENCAPTURE_RESTRICTIONTRIGGER + PRINT_RESTRICTIONTRIGGER + CLOUDEGRESS_RESTRICTIONTRIGGER + UNALLOWEDAPPS_RESTRICTIONTRIGGER +) + +func (i RestrictionTrigger) String() string { + return []string{"copyPaste", "copyToNetworkShare", "copyToRemovableMedia", "screenCapture", "print", "cloudEgress", "unallowedApps"}[i] +} +func ParseRestrictionTrigger(v string) (interface{}, error) { + result := COPYPASTE_RESTRICTIONTRIGGER + switch v { + case "copyPaste": + result = COPYPASTE_RESTRICTIONTRIGGER + case "copyToNetworkShare": + result = COPYTONETWORKSHARE_RESTRICTIONTRIGGER + case "copyToRemovableMedia": + result = COPYTOREMOVABLEMEDIA_RESTRICTIONTRIGGER + case "screenCapture": + result = SCREENCAPTURE_RESTRICTIONTRIGGER + case "print": + result = PRINT_RESTRICTIONTRIGGER + case "cloudEgress": + result = CLOUDEGRESS_RESTRICTIONTRIGGER + case "unallowedApps": + result = UNALLOWEDAPPS_RESTRICTIONTRIGGER + default: + return 0, errors.New("Unknown RestrictionTrigger value: " + v) + } + return &result, nil +} +func SerializeRestrictionTrigger(values []RestrictionTrigger) []string { + 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/result_info.go b/src/internal/connector/graph/betasdk/models/result_info.go new file mode 100644 index 000000000..ff2b3dacc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/result_info.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResultInfo +type ResultInfo 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 result code. + code *int32 + // The message. + message *string + // The OdataType property + odataType *string + // The result sub-code. + subcode *int32 +} +// NewResultInfo instantiates a new resultInfo and sets the default values. +func NewResultInfo()(*ResultInfo) { + m := &ResultInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateResultInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateResultInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewResultInfo(), 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 *ResultInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCode gets the code property value. The result code. +func (m *ResultInfo) GetCode()(*int32) { + return m.code +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ResultInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["code"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCode(val) + } + return nil + } + res["message"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessage(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["subcode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSubcode(val) + } + return nil + } + return res +} +// GetMessage gets the message property value. The message. +func (m *ResultInfo) GetMessage()(*string) { + return m.message +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ResultInfo) GetOdataType()(*string) { + return m.odataType +} +// GetSubcode gets the subcode property value. The result sub-code. +func (m *ResultInfo) GetSubcode()(*int32) { + return m.subcode +} +// Serialize serializes information the current object +func (m *ResultInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("code", m.GetCode()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("message", m.GetMessage()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("subcode", m.GetSubcode()) + 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 *ResultInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCode sets the code property value. The result code. +func (m *ResultInfo) SetCode(value *int32)() { + m.code = value +} +// SetMessage sets the message property value. The message. +func (m *ResultInfo) SetMessage(value *string)() { + m.message = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ResultInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetSubcode sets the subcode property value. The result sub-code. +func (m *ResultInfo) SetSubcode(value *int32)() { + m.subcode = value +} diff --git a/src/internal/connector/graph/betasdk/models/result_infoable.go b/src/internal/connector/graph/betasdk/models/result_infoable.go new file mode 100644 index 000000000..f59c712d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/result_infoable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ResultInfoable +type ResultInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCode()(*int32) + GetMessage()(*string) + GetOdataType()(*string) + GetSubcode()(*int32) + SetCode(value *int32)() + SetMessage(value *string)() + SetOdataType(value *string)() + SetSubcode(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/resultant_app_state.go b/src/internal/connector/graph/betasdk/models/resultant_app_state.go new file mode 100644 index 000000000..e1c397d83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resultant_app_state.go @@ -0,0 +1,56 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResultantAppState int + +const ( + // The application is not applicable. + NOTAPPLICABLE_RESULTANTAPPSTATE ResultantAppState = iota + // The application is installed with no errors. + INSTALLED_RESULTANTAPPSTATE + // The application failed to install. + FAILED_RESULTANTAPPSTATE + // The application is not installed. + NOTINSTALLED_RESULTANTAPPSTATE + // The application failed to uninstall. + UNINSTALLFAILED_RESULTANTAPPSTATE + // The installation of the application is in progress. + PENDINGINSTALL_RESULTANTAPPSTATE + // The status of the application is unknown. + UNKNOWN_RESULTANTAPPSTATE +) + +func (i ResultantAppState) String() string { + return []string{"notApplicable", "installed", "failed", "notInstalled", "uninstallFailed", "pendingInstall", "unknown"}[i] +} +func ParseResultantAppState(v string) (interface{}, error) { + result := NOTAPPLICABLE_RESULTANTAPPSTATE + switch v { + case "notApplicable": + result = NOTAPPLICABLE_RESULTANTAPPSTATE + case "installed": + result = INSTALLED_RESULTANTAPPSTATE + case "failed": + result = FAILED_RESULTANTAPPSTATE + case "notInstalled": + result = NOTINSTALLED_RESULTANTAPPSTATE + case "uninstallFailed": + result = UNINSTALLFAILED_RESULTANTAPPSTATE + case "pendingInstall": + result = PENDINGINSTALL_RESULTANTAPPSTATE + case "unknown": + result = UNKNOWN_RESULTANTAPPSTATE + default: + return 0, errors.New("Unknown ResultantAppState value: " + v) + } + return &result, nil +} +func SerializeResultantAppState(values []ResultantAppState) []string { + 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/resultant_app_state_detail.go b/src/internal/connector/graph/betasdk/models/resultant_app_state_detail.go new file mode 100644 index 000000000..e0ff636eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/resultant_app_state_detail.go @@ -0,0 +1,172 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ResultantAppStateDetail int + +const ( + // Device architecture (e.g. x86/amd64) is not applicable for the application. + PROCESSORARCHITECTURENOTAPPLICABLE_RESULTANTAPPSTATEDETAIL ResultantAppStateDetail = iota + // Available disk space on the target device is less than the configured minimum. + MINIMUMDISKSPACENOTMET_RESULTANTAPPSTATEDETAIL + // OS version on the target device is less than the configured minimum. + MINIMUMOSVERSIONNOTMET_RESULTANTAPPSTATEDETAIL + // Amount of RAM on the target device is less than the configured minimum. + MINIMUMPHYSICALMEMORYNOTMET_RESULTANTAPPSTATEDETAIL + // Count of logical processors on the target device is less than the configured minimum. + MINIMUMLOGICALPROCESSORCOUNTNOTMET_RESULTANTAPPSTATEDETAIL + // CPU speed on the target device is less than the configured minimum. + MINIMUMCPUSPEEDNOTMET_RESULTANTAPPSTATEDETAIL + // Application is not applicable to this platform. (e.g. Android app targeted to IOS) + PLATFORMNOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + // File system requirement rule is not met + FILESYSTEMREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + // Registry requirement rule is not met + REGISTRYREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + // PowerShell script requirement rule is not met + POWERSHELLSCRIPTREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + // All targeted, superseding apps are not applicable. + SUPERSEDINGAPPSNOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + // No additional details are available. + NOADDITIONALDETAILS_RESULTANTAPPSTATEDETAIL + // One or more of the application's dependencies failed to install. + DEPENDENCYFAILEDTOINSTALL_RESULTANTAPPSTATEDETAIL + // One or more of the application's dependencies have requirements which are not met. + DEPENDENCYWITHREQUIREMENTSNOTMET_RESULTANTAPPSTATEDETAIL + // One or more of the application's dependencies require a device reboot to complete installation. + DEPENDENCYPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + // One or more of the application's dependencies are configured to not automatically install. + DEPENDENCYWITHAUTOINSTALLDISABLED_RESULTANTAPPSTATEDETAIL + // A superseded app failed to uninstall. + SUPERSEDEDAPPUNINSTALLFAILED_RESULTANTAPPSTATEDETAIL + // A superseded app requires a reboot to complete uninstall. + SUPERSEDEDAPPUNINSTALLPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + // Superseded apps are being removed. + REMOVINGSUPERSEDEDAPPS_RESULTANTAPPSTATEDETAIL + // The latest version of the app failed to update from an earlier version. + IOSAPPSTOREUPDATEFAILEDTOINSTALL_RESULTANTAPPSTATEDETAIL + // An update is available. + VPPAPPHASUPDATEAVAILABLE_RESULTANTAPPSTATEDETAIL + // The user rejected the app update. + USERREJECTEDUPDATE_RESULTANTAPPSTATEDETAIL + // To complete the removal of the app, the device must be rebooted. + UNINSTALLPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + // Superseding applications are detected. + SUPERSEDINGAPPSDETECTED_RESULTANTAPPSTATEDETAIL + // Superseded applications are detected. + SUPERSEDEDAPPSDETECTED_RESULTANTAPPSTATEDETAIL + // Application failed to install. See error code property for more details. + SEEINSTALLERRORCODE_RESULTANTAPPSTATEDETAIL + // Application is configured to not be automatically installed. + AUTOINSTALLDISABLED_RESULTANTAPPSTATEDETAIL + // The app is managed but no longer installed. + MANAGEDAPPNOLONGERPRESENT_RESULTANTAPPSTATEDETAIL + // The user rejected the app install. + USERREJECTEDINSTALL_RESULTANTAPPSTATEDETAIL + // The user must log into the App Store to install app. + USERISNOTLOGGEDINTOAPPSTORE_RESULTANTAPPSTATEDETAIL + // App cannot be installed. An untargeted, superseding app was detected, which created a conflict. + UNTARGETEDSUPERSEDINGAPPSDETECTED_RESULTANTAPPSTATEDETAIL + // App was removed in order to install a superseding app. + APPREMOVEDBYSUPERSEDENCE_RESULTANTAPPSTATEDETAIL + // Application failed to uninstall. See error code property for more details. + SEEUNINSTALLERRORCODE_RESULTANTAPPSTATEDETAIL + // Device must be rebooted to complete installation of the application. + PENDINGREBOOT_RESULTANTAPPSTATEDETAIL + // One or more of the application's dependencies are installing. + INSTALLINGDEPENDENCIES_RESULTANTAPPSTATEDETAIL + // Application content was downloaded to the device. + CONTENTDOWNLOADED_RESULTANTAPPSTATEDETAIL +) + +func (i ResultantAppStateDetail) String() string { + return []string{"processorArchitectureNotApplicable", "minimumDiskSpaceNotMet", "minimumOsVersionNotMet", "minimumPhysicalMemoryNotMet", "minimumLogicalProcessorCountNotMet", "minimumCpuSpeedNotMet", "platformNotApplicable", "fileSystemRequirementNotMet", "registryRequirementNotMet", "powerShellScriptRequirementNotMet", "supersedingAppsNotApplicable", "noAdditionalDetails", "dependencyFailedToInstall", "dependencyWithRequirementsNotMet", "dependencyPendingReboot", "dependencyWithAutoInstallDisabled", "supersededAppUninstallFailed", "supersededAppUninstallPendingReboot", "removingSupersededApps", "iosAppStoreUpdateFailedToInstall", "vppAppHasUpdateAvailable", "userRejectedUpdate", "uninstallPendingReboot", "supersedingAppsDetected", "supersededAppsDetected", "seeInstallErrorCode", "autoInstallDisabled", "managedAppNoLongerPresent", "userRejectedInstall", "userIsNotLoggedIntoAppStore", "untargetedSupersedingAppsDetected", "appRemovedBySupersedence", "seeUninstallErrorCode", "pendingReboot", "installingDependencies", "contentDownloaded"}[i] +} +func ParseResultantAppStateDetail(v string) (interface{}, error) { + result := PROCESSORARCHITECTURENOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + switch v { + case "processorArchitectureNotApplicable": + result = PROCESSORARCHITECTURENOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + case "minimumDiskSpaceNotMet": + result = MINIMUMDISKSPACENOTMET_RESULTANTAPPSTATEDETAIL + case "minimumOsVersionNotMet": + result = MINIMUMOSVERSIONNOTMET_RESULTANTAPPSTATEDETAIL + case "minimumPhysicalMemoryNotMet": + result = MINIMUMPHYSICALMEMORYNOTMET_RESULTANTAPPSTATEDETAIL + case "minimumLogicalProcessorCountNotMet": + result = MINIMUMLOGICALPROCESSORCOUNTNOTMET_RESULTANTAPPSTATEDETAIL + case "minimumCpuSpeedNotMet": + result = MINIMUMCPUSPEEDNOTMET_RESULTANTAPPSTATEDETAIL + case "platformNotApplicable": + result = PLATFORMNOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + case "fileSystemRequirementNotMet": + result = FILESYSTEMREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + case "registryRequirementNotMet": + result = REGISTRYREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + case "powerShellScriptRequirementNotMet": + result = POWERSHELLSCRIPTREQUIREMENTNOTMET_RESULTANTAPPSTATEDETAIL + case "supersedingAppsNotApplicable": + result = SUPERSEDINGAPPSNOTAPPLICABLE_RESULTANTAPPSTATEDETAIL + case "noAdditionalDetails": + result = NOADDITIONALDETAILS_RESULTANTAPPSTATEDETAIL + case "dependencyFailedToInstall": + result = DEPENDENCYFAILEDTOINSTALL_RESULTANTAPPSTATEDETAIL + case "dependencyWithRequirementsNotMet": + result = DEPENDENCYWITHREQUIREMENTSNOTMET_RESULTANTAPPSTATEDETAIL + case "dependencyPendingReboot": + result = DEPENDENCYPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + case "dependencyWithAutoInstallDisabled": + result = DEPENDENCYWITHAUTOINSTALLDISABLED_RESULTANTAPPSTATEDETAIL + case "supersededAppUninstallFailed": + result = SUPERSEDEDAPPUNINSTALLFAILED_RESULTANTAPPSTATEDETAIL + case "supersededAppUninstallPendingReboot": + result = SUPERSEDEDAPPUNINSTALLPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + case "removingSupersededApps": + result = REMOVINGSUPERSEDEDAPPS_RESULTANTAPPSTATEDETAIL + case "iosAppStoreUpdateFailedToInstall": + result = IOSAPPSTOREUPDATEFAILEDTOINSTALL_RESULTANTAPPSTATEDETAIL + case "vppAppHasUpdateAvailable": + result = VPPAPPHASUPDATEAVAILABLE_RESULTANTAPPSTATEDETAIL + case "userRejectedUpdate": + result = USERREJECTEDUPDATE_RESULTANTAPPSTATEDETAIL + case "uninstallPendingReboot": + result = UNINSTALLPENDINGREBOOT_RESULTANTAPPSTATEDETAIL + case "supersedingAppsDetected": + result = SUPERSEDINGAPPSDETECTED_RESULTANTAPPSTATEDETAIL + case "supersededAppsDetected": + result = SUPERSEDEDAPPSDETECTED_RESULTANTAPPSTATEDETAIL + case "seeInstallErrorCode": + result = SEEINSTALLERRORCODE_RESULTANTAPPSTATEDETAIL + case "autoInstallDisabled": + result = AUTOINSTALLDISABLED_RESULTANTAPPSTATEDETAIL + case "managedAppNoLongerPresent": + result = MANAGEDAPPNOLONGERPRESENT_RESULTANTAPPSTATEDETAIL + case "userRejectedInstall": + result = USERREJECTEDINSTALL_RESULTANTAPPSTATEDETAIL + case "userIsNotLoggedIntoAppStore": + result = USERISNOTLOGGEDINTOAPPSTORE_RESULTANTAPPSTATEDETAIL + case "untargetedSupersedingAppsDetected": + result = UNTARGETEDSUPERSEDINGAPPSDETECTED_RESULTANTAPPSTATEDETAIL + case "appRemovedBySupersedence": + result = APPREMOVEDBYSUPERSEDENCE_RESULTANTAPPSTATEDETAIL + case "seeUninstallErrorCode": + result = SEEUNINSTALLERRORCODE_RESULTANTAPPSTATEDETAIL + case "pendingReboot": + result = PENDINGREBOOT_RESULTANTAPPSTATEDETAIL + case "installingDependencies": + result = INSTALLINGDEPENDENCIES_RESULTANTAPPSTATEDETAIL + case "contentDownloaded": + result = CONTENTDOWNLOADED_RESULTANTAPPSTATEDETAIL + default: + return 0, errors.New("Unknown ResultantAppStateDetail value: " + v) + } + return &result, nil +} +func SerializeResultantAppStateDetail(values []ResultantAppStateDetail) []string { + 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/revoke_apple_vpp_licenses_action_result.go b/src/internal/connector/graph/betasdk/models/revoke_apple_vpp_licenses_action_result.go new file mode 100644 index 000000000..3af6faed9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/revoke_apple_vpp_licenses_action_result.go @@ -0,0 +1,86 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RevokeAppleVppLicensesActionResult +type RevokeAppleVppLicensesActionResult struct { + DeviceActionResult + // Total number of Apple Vpp licenses that failed to revoke + failedLicensesCount *int32 + // Total number of Apple Vpp licenses associated + totalLicensesCount *int32 +} +// NewRevokeAppleVppLicensesActionResult instantiates a new RevokeAppleVppLicensesActionResult and sets the default values. +func NewRevokeAppleVppLicensesActionResult()(*RevokeAppleVppLicensesActionResult) { + m := &RevokeAppleVppLicensesActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateRevokeAppleVppLicensesActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRevokeAppleVppLicensesActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRevokeAppleVppLicensesActionResult(), nil +} +// GetFailedLicensesCount gets the failedLicensesCount property value. Total number of Apple Vpp licenses that failed to revoke +func (m *RevokeAppleVppLicensesActionResult) GetFailedLicensesCount()(*int32) { + return m.failedLicensesCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RevokeAppleVppLicensesActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["failedLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFailedLicensesCount(val) + } + return nil + } + res["totalLicensesCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalLicensesCount(val) + } + return nil + } + return res +} +// GetTotalLicensesCount gets the totalLicensesCount property value. Total number of Apple Vpp licenses associated +func (m *RevokeAppleVppLicensesActionResult) GetTotalLicensesCount()(*int32) { + return m.totalLicensesCount +} +// Serialize serializes information the current object +func (m *RevokeAppleVppLicensesActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("failedLicensesCount", m.GetFailedLicensesCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("totalLicensesCount", m.GetTotalLicensesCount()) + if err != nil { + return err + } + } + return nil +} +// SetFailedLicensesCount sets the failedLicensesCount property value. Total number of Apple Vpp licenses that failed to revoke +func (m *RevokeAppleVppLicensesActionResult) SetFailedLicensesCount(value *int32)() { + m.failedLicensesCount = value +} +// SetTotalLicensesCount sets the totalLicensesCount property value. Total number of Apple Vpp licenses associated +func (m *RevokeAppleVppLicensesActionResult) SetTotalLicensesCount(value *int32)() { + m.totalLicensesCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/revoke_apple_vpp_licenses_action_resultable.go b/src/internal/connector/graph/betasdk/models/revoke_apple_vpp_licenses_action_resultable.go new file mode 100644 index 000000000..ed68f6a27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/revoke_apple_vpp_licenses_action_resultable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RevokeAppleVppLicensesActionResultable +type RevokeAppleVppLicensesActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFailedLicensesCount()(*int32) + GetTotalLicensesCount()(*int32) + SetFailedLicensesCount(value *int32)() + SetTotalLicensesCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/rgb_color.go b/src/internal/connector/graph/betasdk/models/rgb_color.go new file mode 100644 index 000000000..17b3e8158 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rgb_color.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RgbColor color in RGB. +type RgbColor struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Blue value + b *byte + // Green value + g *byte + // The OdataType property + odataType *string + // Red value + r *byte +} +// NewRgbColor instantiates a new rgbColor and sets the default values. +func NewRgbColor()(*RgbColor) { + m := &RgbColor{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRgbColorFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRgbColorFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRgbColor(), 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 *RgbColor) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetB gets the b property value. Blue value +func (m *RgbColor) GetB()(*byte) { + return m.b +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RgbColor) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["b"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteValue() + if err != nil { + return err + } + if val != nil { + m.SetB(val) + } + return nil + } + res["g"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteValue() + if err != nil { + return err + } + if val != nil { + m.SetG(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["r"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteValue() + if err != nil { + return err + } + if val != nil { + m.SetR(val) + } + return nil + } + return res +} +// GetG gets the g property value. Green value +func (m *RgbColor) GetG()(*byte) { + return m.g +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RgbColor) GetOdataType()(*string) { + return m.odataType +} +// GetR gets the r property value. Red value +func (m *RgbColor) GetR()(*byte) { + return m.r +} +// Serialize serializes information the current object +func (m *RgbColor) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteByteValue("b", m.GetB()) + if err != nil { + return err + } + } + { + err := writer.WriteByteValue("g", m.GetG()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteByteValue("r", m.GetR()) + 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 *RgbColor) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetB sets the b property value. Blue value +func (m *RgbColor) SetB(value *byte)() { + m.b = value +} +// SetG sets the g property value. Green value +func (m *RgbColor) SetG(value *byte)() { + m.g = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RgbColor) SetOdataType(value *string)() { + m.odataType = value +} +// SetR sets the r property value. Red value +func (m *RgbColor) SetR(value *byte)() { + m.r = value +} diff --git a/src/internal/connector/graph/betasdk/models/rgb_colorable.go b/src/internal/connector/graph/betasdk/models/rgb_colorable.go new file mode 100644 index 000000000..8bcd3d11d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rgb_colorable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RgbColorable +type RgbColorable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetB()(*byte) + GetG()(*byte) + GetOdataType()(*string) + GetR()(*byte) + SetB(value *byte)() + SetG(value *byte)() + SetOdataType(value *string)() + SetR(value *byte)() +} diff --git a/src/internal/connector/graph/betasdk/models/rich_long_running_operation.go b/src/internal/connector/graph/betasdk/models/rich_long_running_operation.go new file mode 100644 index 000000000..37e546ae7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rich_long_running_operation.go @@ -0,0 +1,138 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RichLongRunningOperation +type RichLongRunningOperation struct { + LongRunningOperation + // Error due to which the operation failed. + error PublicErrorable + // A value between 0 and 100 that indicates the progress of the operation. + percentageComplete *int32 + // A unique identifier for the result. + resourceId *string + // Type of the operation. + type_escaped *string +} +// NewRichLongRunningOperation instantiates a new RichLongRunningOperation and sets the default values. +func NewRichLongRunningOperation()(*RichLongRunningOperation) { + m := &RichLongRunningOperation{ + LongRunningOperation: *NewLongRunningOperation(), + } + return m +} +// CreateRichLongRunningOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRichLongRunningOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRichLongRunningOperation(), nil +} +// GetError gets the error property value. Error due to which the operation failed. +func (m *RichLongRunningOperation) GetError()(PublicErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RichLongRunningOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.LongRunningOperation.GetFieldDeserializers() + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePublicErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(PublicErrorable)) + } + return nil + } + res["percentageComplete"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentageComplete(val) + } + return nil + } + res["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetPercentageComplete gets the percentageComplete property value. A value between 0 and 100 that indicates the progress of the operation. +func (m *RichLongRunningOperation) GetPercentageComplete()(*int32) { + return m.percentageComplete +} +// GetResourceId gets the resourceId property value. A unique identifier for the result. +func (m *RichLongRunningOperation) GetResourceId()(*string) { + return m.resourceId +} +// GetType gets the type property value. Type of the operation. +func (m *RichLongRunningOperation) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *RichLongRunningOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.LongRunningOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("percentageComplete", m.GetPercentageComplete()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("type", m.GetType()) + if err != nil { + return err + } + } + return nil +} +// SetError sets the error property value. Error due to which the operation failed. +func (m *RichLongRunningOperation) SetError(value PublicErrorable)() { + m.error = value +} +// SetPercentageComplete sets the percentageComplete property value. A value between 0 and 100 that indicates the progress of the operation. +func (m *RichLongRunningOperation) SetPercentageComplete(value *int32)() { + m.percentageComplete = value +} +// SetResourceId sets the resourceId property value. A unique identifier for the result. +func (m *RichLongRunningOperation) SetResourceId(value *string)() { + m.resourceId = value +} +// SetType sets the type property value. Type of the operation. +func (m *RichLongRunningOperation) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_response.go new file mode 100644 index 000000000..eee98fd3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RichLongRunningOperationCollectionResponse +type RichLongRunningOperationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RichLongRunningOperationable +} +// NewRichLongRunningOperationCollectionResponse instantiates a new RichLongRunningOperationCollectionResponse and sets the default values. +func NewRichLongRunningOperationCollectionResponse()(*RichLongRunningOperationCollectionResponse) { + m := &RichLongRunningOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRichLongRunningOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRichLongRunningOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRichLongRunningOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RichLongRunningOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRichLongRunningOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RichLongRunningOperationable, len(val)) + for i, v := range val { + res[i] = v.(RichLongRunningOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RichLongRunningOperationCollectionResponse) GetValue()([]RichLongRunningOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *RichLongRunningOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RichLongRunningOperationCollectionResponse) SetValue(value []RichLongRunningOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_responseable.go new file mode 100644 index 000000000..ab5d60615 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rich_long_running_operation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RichLongRunningOperationCollectionResponseable +type RichLongRunningOperationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RichLongRunningOperationable) + SetValue(value []RichLongRunningOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rich_long_running_operationable.go b/src/internal/connector/graph/betasdk/models/rich_long_running_operationable.go new file mode 100644 index 000000000..78b8ec362 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rich_long_running_operationable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RichLongRunningOperationable +type RichLongRunningOperationable interface { + LongRunningOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(PublicErrorable) + GetPercentageComplete()(*int32) + GetResourceId()(*string) + GetType()(*string) + SetError(value PublicErrorable)() + SetPercentageComplete(value *int32)() + SetResourceId(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risk_detail.go b/src/internal/connector/graph/betasdk/models/risk_detail.go new file mode 100644 index 000000000..0b769692b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detail.go @@ -0,0 +1,73 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskDetail int + +const ( + NONE_RISKDETAIL RiskDetail = iota + ADMINGENERATEDTEMPORARYPASSWORD_RISKDETAIL + USERPERFORMEDSECUREDPASSWORDCHANGE_RISKDETAIL + USERPERFORMEDSECUREDPASSWORDRESET_RISKDETAIL + ADMINCONFIRMEDSIGNINSAFE_RISKDETAIL + AICONFIRMEDSIGNINSAFE_RISKDETAIL + USERPASSEDMFADRIVENBYRISKBASEDPOLICY_RISKDETAIL + ADMINDISMISSEDALLRISKFORUSER_RISKDETAIL + ADMINCONFIRMEDSIGNINCOMPROMISED_RISKDETAIL + HIDDEN_RISKDETAIL + ADMINCONFIRMEDUSERCOMPROMISED_RISKDETAIL + UNKNOWNFUTUREVALUE_RISKDETAIL + ADMINCONFIRMEDSERVICEPRINCIPALCOMPROMISED_RISKDETAIL + ADMINDISMISSEDALLRISKFORSERVICEPRINCIPAL_RISKDETAIL + M365DADMINDISMISSEDDETECTION_RISKDETAIL +) + +func (i RiskDetail) String() string { + return []string{"none", "adminGeneratedTemporaryPassword", "userPerformedSecuredPasswordChange", "userPerformedSecuredPasswordReset", "adminConfirmedSigninSafe", "aiConfirmedSigninSafe", "userPassedMFADrivenByRiskBasedPolicy", "adminDismissedAllRiskForUser", "adminConfirmedSigninCompromised", "hidden", "adminConfirmedUserCompromised", "unknownFutureValue", "adminConfirmedServicePrincipalCompromised", "adminDismissedAllRiskForServicePrincipal", "m365DAdminDismissedDetection"}[i] +} +func ParseRiskDetail(v string) (interface{}, error) { + result := NONE_RISKDETAIL + switch v { + case "none": + result = NONE_RISKDETAIL + case "adminGeneratedTemporaryPassword": + result = ADMINGENERATEDTEMPORARYPASSWORD_RISKDETAIL + case "userPerformedSecuredPasswordChange": + result = USERPERFORMEDSECUREDPASSWORDCHANGE_RISKDETAIL + case "userPerformedSecuredPasswordReset": + result = USERPERFORMEDSECUREDPASSWORDRESET_RISKDETAIL + case "adminConfirmedSigninSafe": + result = ADMINCONFIRMEDSIGNINSAFE_RISKDETAIL + case "aiConfirmedSigninSafe": + result = AICONFIRMEDSIGNINSAFE_RISKDETAIL + case "userPassedMFADrivenByRiskBasedPolicy": + result = USERPASSEDMFADRIVENBYRISKBASEDPOLICY_RISKDETAIL + case "adminDismissedAllRiskForUser": + result = ADMINDISMISSEDALLRISKFORUSER_RISKDETAIL + case "adminConfirmedSigninCompromised": + result = ADMINCONFIRMEDSIGNINCOMPROMISED_RISKDETAIL + case "hidden": + result = HIDDEN_RISKDETAIL + case "adminConfirmedUserCompromised": + result = ADMINCONFIRMEDUSERCOMPROMISED_RISKDETAIL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RISKDETAIL + case "adminConfirmedServicePrincipalCompromised": + result = ADMINCONFIRMEDSERVICEPRINCIPALCOMPROMISED_RISKDETAIL + case "adminDismissedAllRiskForServicePrincipal": + result = ADMINDISMISSEDALLRISKFORSERVICEPRINCIPAL_RISKDETAIL + case "m365DAdminDismissedDetection": + result = M365DADMINDISMISSEDDETECTION_RISKDETAIL + default: + return 0, errors.New("Unknown RiskDetail value: " + v) + } + return &result, nil +} +func SerializeRiskDetail(values []RiskDetail) []string { + 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/risk_detection.go b/src/internal/connector/graph/betasdk/models/risk_detection.go new file mode 100644 index 000000000..cc123c404 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detection.go @@ -0,0 +1,562 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskDetection +type RiskDetection struct { + Entity + // Indicates the activity type the detected risk is linked to. The possible values are signin, user, unknownFutureValue. + activity *ActivityType + // Date and time that the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Additional information associated with the risk detection in JSON format. + additionalInfo *string + // Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. + correlationId *string + // Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + detectedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timing of the detected risk (real-time/offline). The possible values are notDefined, realtime, nearRealtime, offline, unknownFutureValue. + detectionTimingType *RiskDetectionTimingType + // Provides the IP address of the client from where the risk occurred. + ipAddress *string + // Date and time that the risk detection was last updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Location of the sign-in. + location SignInLocationable + // Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. + requestId *string + // Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal , m365DAdminDismissedDetection. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. + riskDetail *RiskDetail + // The type of risk event detected. The possible values are unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic,adminConfirmedUserCompromised, mcasImpossibleTravel, mcasSuspiciousInboxManipulationRules, investigationsThreatIntelligenceSigninLinked, maliciousIPAddressValidCredentialsBlockedIP, and anomalousUserActivity. For more information about each value, see riskEventType values. + riskEventType *string + // Level of the detected risk. The possible values are low, medium, high, hidden, none, unknownFutureValue. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. + riskLevel *RiskLevel + // The state of a detected risky user or sign-in. The possible values are none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, and unknownFutureValue. + riskState *RiskState + // The riskType property + riskType *RiskEventType + // Source of the risk detection. For example, activeDirectory. + source *string + // Indicates the type of token issuer for the detected sign-in risk. The possible values are AzureAD, ADFederationServices, and unknownFutureValue. + tokenIssuerType *TokenIssuerType + // Name of the user. + userDisplayName *string + // Unique ID of the user. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + userId *string + // The user principal name (UPN) of the user. + userPrincipalName *string +} +// NewRiskDetection instantiates a new RiskDetection and sets the default values. +func NewRiskDetection()(*RiskDetection) { + m := &RiskDetection{ + Entity: *NewEntity(), + } + return m +} +// CreateRiskDetectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskDetectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskDetection(), nil +} +// GetActivity gets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are signin, user, unknownFutureValue. +func (m *RiskDetection) GetActivity()(*ActivityType) { + return m.activity +} +// GetActivityDateTime gets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetAdditionalInfo gets the additionalInfo property value. Additional information associated with the risk detection in JSON format. +func (m *RiskDetection) GetAdditionalInfo()(*string) { + return m.additionalInfo +} +// GetCorrelationId gets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. +func (m *RiskDetection) GetCorrelationId()(*string) { + return m.correlationId +} +// GetDetectedDateTime gets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.detectedDateTime +} +// GetDetectionTimingType gets the detectionTimingType property value. Timing of the detected risk (real-time/offline). The possible values are notDefined, realtime, nearRealtime, offline, unknownFutureValue. +func (m *RiskDetection) GetDetectionTimingType()(*RiskDetectionTimingType) { + return m.detectionTimingType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskDetection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActivityType) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(*ActivityType)) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["additionalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInfo(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["detectedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectedDateTime(val) + } + return nil + } + res["detectionTimingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetectionTimingType) + if err != nil { + return err + } + if val != nil { + m.SetDetectionTimingType(val.(*RiskDetectionTimingType)) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(val) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSignInLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(SignInLocationable)) + } + return nil + } + res["requestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestId(val) + } + return nil + } + res["riskDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetRiskDetail(val.(*RiskDetail)) + } + return nil + } + res["riskEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskEventType(val) + } + return nil + } + res["riskLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + m.SetRiskLevel(val.(*RiskLevel)) + } + return nil + } + res["riskState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskState) + if err != nil { + return err + } + if val != nil { + m.SetRiskState(val.(*RiskState)) + } + return nil + } + res["riskType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskEventType) + if err != nil { + return err + } + if val != nil { + m.SetRiskType(val.(*RiskEventType)) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["tokenIssuerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTokenIssuerType) + if err != nil { + return err + } + if val != nil { + m.SetTokenIssuerType(val.(*TokenIssuerType)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. Provides the IP address of the client from where the risk occurred. +func (m *RiskDetection) GetIpAddress()(*string) { + return m.ipAddress +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. +func (m *RiskDetection) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetLocation gets the location property value. Location of the sign-in. +func (m *RiskDetection) GetLocation()(SignInLocationable) { + return m.location +} +// GetRequestId gets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. +func (m *RiskDetection) GetRequestId()(*string) { + return m.requestId +} +// GetRiskDetail gets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal , m365DAdminDismissedDetection. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. +func (m *RiskDetection) GetRiskDetail()(*RiskDetail) { + return m.riskDetail +} +// GetRiskEventType gets the riskEventType property value. The type of risk event detected. The possible values are unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic,adminConfirmedUserCompromised, mcasImpossibleTravel, mcasSuspiciousInboxManipulationRules, investigationsThreatIntelligenceSigninLinked, maliciousIPAddressValidCredentialsBlockedIP, and anomalousUserActivity. For more information about each value, see riskEventType values. +func (m *RiskDetection) GetRiskEventType()(*string) { + return m.riskEventType +} +// GetRiskLevel gets the riskLevel property value. Level of the detected risk. The possible values are low, medium, high, hidden, none, unknownFutureValue. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. +func (m *RiskDetection) GetRiskLevel()(*RiskLevel) { + return m.riskLevel +} +// GetRiskState gets the riskState property value. The state of a detected risky user or sign-in. The possible values are none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, and unknownFutureValue. +func (m *RiskDetection) GetRiskState()(*RiskState) { + return m.riskState +} +// GetRiskType gets the riskType property value. The riskType property +func (m *RiskDetection) GetRiskType()(*RiskEventType) { + return m.riskType +} +// GetSource gets the source property value. Source of the risk detection. For example, activeDirectory. +func (m *RiskDetection) GetSource()(*string) { + return m.source +} +// GetTokenIssuerType gets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are AzureAD, ADFederationServices, and unknownFutureValue. +func (m *RiskDetection) GetTokenIssuerType()(*TokenIssuerType) { + return m.tokenIssuerType +} +// GetUserDisplayName gets the userDisplayName property value. Name of the user. +func (m *RiskDetection) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserId gets the userId property value. Unique ID of the user. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) GetUserId()(*string) { + return m.userId +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name (UPN) of the user. +func (m *RiskDetection) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *RiskDetection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivity() != nil { + cast := (*m.GetActivity()).String() + err = writer.WriteStringValue("activity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("additionalInfo", m.GetAdditionalInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("detectedDateTime", m.GetDetectedDateTime()) + if err != nil { + return err + } + } + if m.GetDetectionTimingType() != nil { + cast := (*m.GetDetectionTimingType()).String() + err = writer.WriteStringValue("detectionTimingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestId", m.GetRequestId()) + if err != nil { + return err + } + } + if m.GetRiskDetail() != nil { + cast := (*m.GetRiskDetail()).String() + err = writer.WriteStringValue("riskDetail", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskEventType", m.GetRiskEventType()) + if err != nil { + return err + } + } + if m.GetRiskLevel() != nil { + cast := (*m.GetRiskLevel()).String() + err = writer.WriteStringValue("riskLevel", &cast) + if err != nil { + return err + } + } + if m.GetRiskState() != nil { + cast := (*m.GetRiskState()).String() + err = writer.WriteStringValue("riskState", &cast) + if err != nil { + return err + } + } + if m.GetRiskType() != nil { + cast := (*m.GetRiskType()).String() + err = writer.WriteStringValue("riskType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetTokenIssuerType() != nil { + cast := (*m.GetTokenIssuerType()).String() + err = writer.WriteStringValue("tokenIssuerType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are signin, user, unknownFutureValue. +func (m *RiskDetection) SetActivity(value *ActivityType)() { + m.activity = value +} +// SetActivityDateTime sets the activityDateTime property value. Date and time that the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetAdditionalInfo sets the additionalInfo property value. Additional information associated with the risk detection in JSON format. +func (m *RiskDetection) SetAdditionalInfo(value *string)() { + m.additionalInfo = value +} +// SetCorrelationId sets the correlationId property value. Correlation ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. +func (m *RiskDetection) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetDetectedDateTime sets the detectedDateTime property value. Date and time that the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.detectedDateTime = value +} +// SetDetectionTimingType sets the detectionTimingType property value. Timing of the detected risk (real-time/offline). The possible values are notDefined, realtime, nearRealtime, offline, unknownFutureValue. +func (m *RiskDetection) SetDetectionTimingType(value *RiskDetectionTimingType)() { + m.detectionTimingType = value +} +// SetIpAddress sets the ipAddress property value. Provides the IP address of the client from where the risk occurred. +func (m *RiskDetection) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Date and time that the risk detection was last updated. +func (m *RiskDetection) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetLocation sets the location property value. Location of the sign-in. +func (m *RiskDetection) SetLocation(value SignInLocationable)() { + m.location = value +} +// SetRequestId sets the requestId property value. Request ID of the sign-in associated with the risk detection. This property is null if the risk detection is not associated with a sign-in. +func (m *RiskDetection) SetRequestId(value *string)() { + m.requestId = value +} +// SetRiskDetail sets the riskDetail property value. Details of the detected risk. The possible values are: none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal, m365DAdminDismissedDetection. Note that you must use the Prefer: include - unknown -enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal , m365DAdminDismissedDetection. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. +func (m *RiskDetection) SetRiskDetail(value *RiskDetail)() { + m.riskDetail = value +} +// SetRiskEventType sets the riskEventType property value. The type of risk event detected. The possible values are unlikelyTravel, anonymizedIPAddress, maliciousIPAddress, unfamiliarFeatures, malwareInfectedIPAddress, suspiciousIPAddress, leakedCredentials, investigationsThreatIntelligence, generic,adminConfirmedUserCompromised, mcasImpossibleTravel, mcasSuspiciousInboxManipulationRules, investigationsThreatIntelligenceSigninLinked, maliciousIPAddressValidCredentialsBlockedIP, and anomalousUserActivity. For more information about each value, see riskEventType values. +func (m *RiskDetection) SetRiskEventType(value *string)() { + m.riskEventType = value +} +// SetRiskLevel sets the riskLevel property value. Level of the detected risk. The possible values are low, medium, high, hidden, none, unknownFutureValue. Note: Details for this property are only available for Azure AD Premium P2 customers. P1 customers will be returned hidden. +func (m *RiskDetection) SetRiskLevel(value *RiskLevel)() { + m.riskLevel = value +} +// SetRiskState sets the riskState property value. The state of a detected risky user or sign-in. The possible values are none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, and unknownFutureValue. +func (m *RiskDetection) SetRiskState(value *RiskState)() { + m.riskState = value +} +// SetRiskType sets the riskType property value. The riskType property +func (m *RiskDetection) SetRiskType(value *RiskEventType)() { + m.riskType = value +} +// SetSource sets the source property value. Source of the risk detection. For example, activeDirectory. +func (m *RiskDetection) SetSource(value *string)() { + m.source = value +} +// SetTokenIssuerType sets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are AzureAD, ADFederationServices, and unknownFutureValue. +func (m *RiskDetection) SetTokenIssuerType(value *TokenIssuerType)() { + m.tokenIssuerType = value +} +// SetUserDisplayName sets the userDisplayName property value. Name of the user. +func (m *RiskDetection) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserId sets the userId property value. Unique ID of the user. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *RiskDetection) SetUserId(value *string)() { + m.userId = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name (UPN) of the user. +func (m *RiskDetection) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/risk_detection_collection_response.go b/src/internal/connector/graph/betasdk/models/risk_detection_collection_response.go new file mode 100644 index 000000000..db65d92a3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskDetectionCollectionResponse +type RiskDetectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RiskDetectionable +} +// NewRiskDetectionCollectionResponse instantiates a new RiskDetectionCollectionResponse and sets the default values. +func NewRiskDetectionCollectionResponse()(*RiskDetectionCollectionResponse) { + m := &RiskDetectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRiskDetectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskDetectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskDetectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskDetectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskDetectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskDetectionable, len(val)) + for i, v := range val { + res[i] = v.(RiskDetectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RiskDetectionCollectionResponse) GetValue()([]RiskDetectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RiskDetectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RiskDetectionCollectionResponse) SetValue(value []RiskDetectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/risk_detection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/risk_detection_collection_responseable.go new file mode 100644 index 000000000..d16a9f091 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskDetectionCollectionResponseable +type RiskDetectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RiskDetectionable) + SetValue(value []RiskDetectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/risk_detection_timing_type.go b/src/internal/connector/graph/betasdk/models/risk_detection_timing_type.go new file mode 100644 index 000000000..3dc529150 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detection_timing_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskDetectionTimingType int + +const ( + NOTDEFINED_RISKDETECTIONTIMINGTYPE RiskDetectionTimingType = iota + REALTIME_RISKDETECTIONTIMINGTYPE + NEARREALTIME_RISKDETECTIONTIMINGTYPE + OFFLINE_RISKDETECTIONTIMINGTYPE + UNKNOWNFUTUREVALUE_RISKDETECTIONTIMINGTYPE +) + +func (i RiskDetectionTimingType) String() string { + return []string{"notDefined", "realtime", "nearRealtime", "offline", "unknownFutureValue"}[i] +} +func ParseRiskDetectionTimingType(v string) (interface{}, error) { + result := NOTDEFINED_RISKDETECTIONTIMINGTYPE + switch v { + case "notDefined": + result = NOTDEFINED_RISKDETECTIONTIMINGTYPE + case "realtime": + result = REALTIME_RISKDETECTIONTIMINGTYPE + case "nearRealtime": + result = NEARREALTIME_RISKDETECTIONTIMINGTYPE + case "offline": + result = OFFLINE_RISKDETECTIONTIMINGTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RISKDETECTIONTIMINGTYPE + default: + return 0, errors.New("Unknown RiskDetectionTimingType value: " + v) + } + return &result, nil +} +func SerializeRiskDetectionTimingType(values []RiskDetectionTimingType) []string { + 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/risk_detectionable.go b/src/internal/connector/graph/betasdk/models/risk_detectionable.go new file mode 100644 index 000000000..912536600 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_detectionable.go @@ -0,0 +1,52 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskDetectionable +type RiskDetectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*ActivityType) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAdditionalInfo()(*string) + GetCorrelationId()(*string) + GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDetectionTimingType()(*RiskDetectionTimingType) + GetIpAddress()(*string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocation()(SignInLocationable) + GetRequestId()(*string) + GetRiskDetail()(*RiskDetail) + GetRiskEventType()(*string) + GetRiskLevel()(*RiskLevel) + GetRiskState()(*RiskState) + GetRiskType()(*RiskEventType) + GetSource()(*string) + GetTokenIssuerType()(*TokenIssuerType) + GetUserDisplayName()(*string) + GetUserId()(*string) + GetUserPrincipalName()(*string) + SetActivity(value *ActivityType)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAdditionalInfo(value *string)() + SetCorrelationId(value *string)() + SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDetectionTimingType(value *RiskDetectionTimingType)() + SetIpAddress(value *string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocation(value SignInLocationable)() + SetRequestId(value *string)() + SetRiskDetail(value *RiskDetail)() + SetRiskEventType(value *string)() + SetRiskLevel(value *RiskLevel)() + SetRiskState(value *RiskState)() + SetRiskType(value *RiskEventType)() + SetSource(value *string)() + SetTokenIssuerType(value *TokenIssuerType)() + SetUserDisplayName(value *string)() + SetUserId(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risk_event_type.go b/src/internal/connector/graph/betasdk/models/risk_event_type.go new file mode 100644 index 000000000..212b45055 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_event_type.go @@ -0,0 +1,73 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskEventType int + +const ( + UNLIKELYTRAVEL_RISKEVENTTYPE RiskEventType = iota + ANONYMIZEDIPADDRESS_RISKEVENTTYPE + MALICIOUSIPADDRESS_RISKEVENTTYPE + UNFAMILIARFEATURES_RISKEVENTTYPE + MALWAREINFECTEDIPADDRESS_RISKEVENTTYPE + SUSPICIOUSIPADDRESS_RISKEVENTTYPE + LEAKEDCREDENTIALS_RISKEVENTTYPE + INVESTIGATIONSTHREATINTELLIGENCE_RISKEVENTTYPE + GENERIC_RISKEVENTTYPE + ADMINCONFIRMEDUSERCOMPROMISED_RISKEVENTTYPE + MCASIMPOSSIBLETRAVEL_RISKEVENTTYPE + MCASSUSPICIOUSINBOXMANIPULATIONRULES_RISKEVENTTYPE + INVESTIGATIONSTHREATINTELLIGENCESIGNINLINKED_RISKEVENTTYPE + MALICIOUSIPADDRESSVALIDCREDENTIALSBLOCKEDIP_RISKEVENTTYPE + UNKNOWNFUTUREVALUE_RISKEVENTTYPE +) + +func (i RiskEventType) String() string { + return []string{"unlikelyTravel", "anonymizedIPAddress", "maliciousIPAddress", "unfamiliarFeatures", "malwareInfectedIPAddress", "suspiciousIPAddress", "leakedCredentials", "investigationsThreatIntelligence", "generic", "adminConfirmedUserCompromised", "mcasImpossibleTravel", "mcasSuspiciousInboxManipulationRules", "investigationsThreatIntelligenceSigninLinked", "maliciousIPAddressValidCredentialsBlockedIP", "unknownFutureValue"}[i] +} +func ParseRiskEventType(v string) (interface{}, error) { + result := UNLIKELYTRAVEL_RISKEVENTTYPE + switch v { + case "unlikelyTravel": + result = UNLIKELYTRAVEL_RISKEVENTTYPE + case "anonymizedIPAddress": + result = ANONYMIZEDIPADDRESS_RISKEVENTTYPE + case "maliciousIPAddress": + result = MALICIOUSIPADDRESS_RISKEVENTTYPE + case "unfamiliarFeatures": + result = UNFAMILIARFEATURES_RISKEVENTTYPE + case "malwareInfectedIPAddress": + result = MALWAREINFECTEDIPADDRESS_RISKEVENTTYPE + case "suspiciousIPAddress": + result = SUSPICIOUSIPADDRESS_RISKEVENTTYPE + case "leakedCredentials": + result = LEAKEDCREDENTIALS_RISKEVENTTYPE + case "investigationsThreatIntelligence": + result = INVESTIGATIONSTHREATINTELLIGENCE_RISKEVENTTYPE + case "generic": + result = GENERIC_RISKEVENTTYPE + case "adminConfirmedUserCompromised": + result = ADMINCONFIRMEDUSERCOMPROMISED_RISKEVENTTYPE + case "mcasImpossibleTravel": + result = MCASIMPOSSIBLETRAVEL_RISKEVENTTYPE + case "mcasSuspiciousInboxManipulationRules": + result = MCASSUSPICIOUSINBOXMANIPULATIONRULES_RISKEVENTTYPE + case "investigationsThreatIntelligenceSigninLinked": + result = INVESTIGATIONSTHREATINTELLIGENCESIGNINLINKED_RISKEVENTTYPE + case "maliciousIPAddressValidCredentialsBlockedIP": + result = MALICIOUSIPADDRESSVALIDCREDENTIALSBLOCKEDIP_RISKEVENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RISKEVENTTYPE + default: + return 0, errors.New("Unknown RiskEventType value: " + v) + } + return &result, nil +} +func SerializeRiskEventType(values []RiskEventType) []string { + 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/risk_level.go b/src/internal/connector/graph/betasdk/models/risk_level.go new file mode 100644 index 000000000..582140042 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_level.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskLevel int + +const ( + LOW_RISKLEVEL RiskLevel = iota + MEDIUM_RISKLEVEL + HIGH_RISKLEVEL + HIDDEN_RISKLEVEL + NONE_RISKLEVEL + UNKNOWNFUTUREVALUE_RISKLEVEL +) + +func (i RiskLevel) String() string { + return []string{"low", "medium", "high", "hidden", "none", "unknownFutureValue"}[i] +} +func ParseRiskLevel(v string) (interface{}, error) { + result := LOW_RISKLEVEL + switch v { + case "low": + result = LOW_RISKLEVEL + case "medium": + result = MEDIUM_RISKLEVEL + case "high": + result = HIGH_RISKLEVEL + case "hidden": + result = HIDDEN_RISKLEVEL + case "none": + result = NONE_RISKLEVEL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RISKLEVEL + default: + return 0, errors.New("Unknown RiskLevel value: " + v) + } + return &result, nil +} +func SerializeRiskLevel(values []RiskLevel) []string { + 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/risk_service_principal_activity.go b/src/internal/connector/graph/betasdk/models/risk_service_principal_activity.go new file mode 100644 index 000000000..a546aeda9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_service_principal_activity.go @@ -0,0 +1,128 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskServicePrincipalActivity +type RiskServicePrincipalActivity struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without that license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. + detail *RiskDetail + // The OdataType property + odataType *string + // The riskEventTypes property + riskEventTypes []string +} +// NewRiskServicePrincipalActivity instantiates a new riskServicePrincipalActivity and sets the default values. +func NewRiskServicePrincipalActivity()(*RiskServicePrincipalActivity) { + m := &RiskServicePrincipalActivity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRiskServicePrincipalActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskServicePrincipalActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskServicePrincipalActivity(), 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 *RiskServicePrincipalActivity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetail gets the detail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without that license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *RiskServicePrincipalActivity) GetDetail()(*RiskDetail) { + return m.detail +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskServicePrincipalActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(*RiskDetail)) + } + 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["riskEventTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRiskEventTypes(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RiskServicePrincipalActivity) GetOdataType()(*string) { + return m.odataType +} +// GetRiskEventTypes gets the riskEventTypes property value. The riskEventTypes property +func (m *RiskServicePrincipalActivity) GetRiskEventTypes()([]string) { + return m.riskEventTypes +} +// Serialize serializes information the current object +func (m *RiskServicePrincipalActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDetail() != nil { + cast := (*m.GetDetail()).String() + err := writer.WriteStringValue("detail", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRiskEventTypes() != nil { + err := writer.WriteCollectionOfStringValues("riskEventTypes", m.GetRiskEventTypes()) + 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 *RiskServicePrincipalActivity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetail sets the detail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without that license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *RiskServicePrincipalActivity) SetDetail(value *RiskDetail)() { + m.detail = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RiskServicePrincipalActivity) SetOdataType(value *string)() { + m.odataType = value +} +// SetRiskEventTypes sets the riskEventTypes property value. The riskEventTypes property +func (m *RiskServicePrincipalActivity) SetRiskEventTypes(value []string)() { + m.riskEventTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/risk_service_principal_activityable.go b/src/internal/connector/graph/betasdk/models/risk_service_principal_activityable.go new file mode 100644 index 000000000..8fb3fc82d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_service_principal_activityable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskServicePrincipalActivityable +type RiskServicePrincipalActivityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*RiskDetail) + GetOdataType()(*string) + GetRiskEventTypes()([]string) + SetDetail(value *RiskDetail)() + SetOdataType(value *string)() + SetRiskEventTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risk_state.go b/src/internal/connector/graph/betasdk/models/risk_state.go new file mode 100644 index 000000000..c5134fdf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_state.go @@ -0,0 +1,49 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskState int + +const ( + NONE_RISKSTATE RiskState = iota + CONFIRMEDSAFE_RISKSTATE + REMEDIATED_RISKSTATE + DISMISSED_RISKSTATE + ATRISK_RISKSTATE + CONFIRMEDCOMPROMISED_RISKSTATE + UNKNOWNFUTUREVALUE_RISKSTATE +) + +func (i RiskState) String() string { + return []string{"none", "confirmedSafe", "remediated", "dismissed", "atRisk", "confirmedCompromised", "unknownFutureValue"}[i] +} +func ParseRiskState(v string) (interface{}, error) { + result := NONE_RISKSTATE + switch v { + case "none": + result = NONE_RISKSTATE + case "confirmedSafe": + result = CONFIRMEDSAFE_RISKSTATE + case "remediated": + result = REMEDIATED_RISKSTATE + case "dismissed": + result = DISMISSED_RISKSTATE + case "atRisk": + result = ATRISK_RISKSTATE + case "confirmedCompromised": + result = CONFIRMEDCOMPROMISED_RISKSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RISKSTATE + default: + return 0, errors.New("Unknown RiskState value: " + v) + } + return &result, nil +} +func SerializeRiskState(values []RiskState) []string { + 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/risk_user_activity.go b/src/internal/connector/graph/betasdk/models/risk_user_activity.go new file mode 100644 index 000000000..b8bf8b05b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_user_activity.go @@ -0,0 +1,158 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskUserActivity +type RiskUserActivity 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 possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. + detail *RiskDetail + // The eventTypes property + eventTypes []RiskEventType + // The OdataType property + odataType *string + // The riskEventTypes property + riskEventTypes []string +} +// NewRiskUserActivity instantiates a new riskUserActivity and sets the default values. +func NewRiskUserActivity()(*RiskUserActivity) { + m := &RiskUserActivity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRiskUserActivityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskUserActivityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskUserActivity(), 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 *RiskUserActivity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetail gets the detail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. +func (m *RiskUserActivity) GetDetail()(*RiskDetail) { + return m.detail +} +// GetEventTypes gets the eventTypes property value. The eventTypes property +func (m *RiskUserActivity) GetEventTypes()([]RiskEventType) { + return m.eventTypes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskUserActivity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(*RiskDetail)) + } + return nil + } + res["eventTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseRiskEventType) + if err != nil { + return err + } + if val != nil { + res := make([]RiskEventType, len(val)) + for i, v := range val { + res[i] = *(v.(*RiskEventType)) + } + m.SetEventTypes(res) + } + 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["riskEventTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRiskEventTypes(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RiskUserActivity) GetOdataType()(*string) { + return m.odataType +} +// GetRiskEventTypes gets the riskEventTypes property value. The riskEventTypes property +func (m *RiskUserActivity) GetRiskEventTypes()([]string) { + return m.riskEventTypes +} +// Serialize serializes information the current object +func (m *RiskUserActivity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetDetail() != nil { + cast := (*m.GetDetail()).String() + err := writer.WriteStringValue("detail", &cast) + if err != nil { + return err + } + } + if m.GetEventTypes() != nil { + err := writer.WriteCollectionOfStringValues("eventTypes", SerializeRiskEventType(m.GetEventTypes())) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRiskEventTypes() != nil { + err := writer.WriteCollectionOfStringValues("riskEventTypes", m.GetRiskEventTypes()) + 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 *RiskUserActivity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetail sets the detail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. +func (m *RiskUserActivity) SetDetail(value *RiskDetail)() { + m.detail = value +} +// SetEventTypes sets the eventTypes property value. The eventTypes property +func (m *RiskUserActivity) SetEventTypes(value []RiskEventType)() { + m.eventTypes = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RiskUserActivity) SetOdataType(value *string)() { + m.odataType = value +} +// SetRiskEventTypes sets the riskEventTypes property value. The riskEventTypes property +func (m *RiskUserActivity) SetRiskEventTypes(value []string)() { + m.riskEventTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/risk_user_activityable.go b/src/internal/connector/graph/betasdk/models/risk_user_activityable.go new file mode 100644 index 000000000..85c14174b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risk_user_activityable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskUserActivityable +type RiskUserActivityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*RiskDetail) + GetEventTypes()([]RiskEventType) + GetOdataType()(*string) + GetRiskEventTypes()([]string) + SetDetail(value *RiskDetail)() + SetEventTypes(value []RiskEventType)() + SetOdataType(value *string)() + SetRiskEventTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal.go b/src/internal/connector/graph/betasdk/models/risky_service_principal.go new file mode 100644 index 000000000..4eeb4e6f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal.go @@ -0,0 +1,324 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipal +type RiskyServicePrincipal struct { + Entity + // true if the service principal account is enabled; otherwise, false. + accountEnabled *bool + // The globally unique identifier for the associated application (its appId property), if any. + appId *string + // The display name for the service principal. + displayName *string + // Represents the risk history of Azure AD service principals. + history []RiskyServicePrincipalHistoryItemable + // Indicates whether Azure AD is currently processing the service principal's risky state. + isProcessing *bool + // Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. + riskDetail *RiskDetail + // The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq). + riskLastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq). + riskLevel *RiskLevel + // State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. + riskState *RiskState + // Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal. + servicePrincipalType *string +} +// NewRiskyServicePrincipal instantiates a new RiskyServicePrincipal and sets the default values. +func NewRiskyServicePrincipal()(*RiskyServicePrincipal) { + m := &RiskyServicePrincipal{ + Entity: *NewEntity(), + } + return m +} +// CreateRiskyServicePrincipalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyServicePrincipalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.riskyServicePrincipalHistoryItem": + return NewRiskyServicePrincipalHistoryItem(), nil + } + } + } + } + return NewRiskyServicePrincipal(), nil +} +// GetAccountEnabled gets the accountEnabled property value. true if the service principal account is enabled; otherwise, false. +func (m *RiskyServicePrincipal) GetAccountEnabled()(*bool) { + return m.accountEnabled +} +// GetAppId gets the appId property value. The globally unique identifier for the associated application (its appId property), if any. +func (m *RiskyServicePrincipal) GetAppId()(*string) { + return m.appId +} +// GetDisplayName gets the displayName property value. The display name for the service principal. +func (m *RiskyServicePrincipal) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyServicePrincipal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountEnabled(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyServicePrincipalHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyServicePrincipalHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(RiskyServicePrincipalHistoryItemable) + } + m.SetHistory(res) + } + return nil + } + res["isProcessing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsProcessing(val) + } + return nil + } + res["riskDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetRiskDetail(val.(*RiskDetail)) + } + return nil + } + res["riskLastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskLastUpdatedDateTime(val) + } + return nil + } + res["riskLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + m.SetRiskLevel(val.(*RiskLevel)) + } + return nil + } + res["riskState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskState) + if err != nil { + return err + } + if val != nil { + m.SetRiskState(val.(*RiskState)) + } + return nil + } + res["servicePrincipalType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalType(val) + } + return nil + } + return res +} +// GetHistory gets the history property value. Represents the risk history of Azure AD service principals. +func (m *RiskyServicePrincipal) GetHistory()([]RiskyServicePrincipalHistoryItemable) { + return m.history +} +// GetIsProcessing gets the isProcessing property value. Indicates whether Azure AD is currently processing the service principal's risky state. +func (m *RiskyServicePrincipal) GetIsProcessing()(*bool) { + return m.isProcessing +} +// GetRiskDetail gets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *RiskyServicePrincipal) GetRiskDetail()(*RiskDetail) { + return m.riskDetail +} +// GetRiskLastUpdatedDateTime gets the riskLastUpdatedDateTime property value. The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq). +func (m *RiskyServicePrincipal) GetRiskLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.riskLastUpdatedDateTime +} +// GetRiskLevel gets the riskLevel property value. Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq). +func (m *RiskyServicePrincipal) GetRiskLevel()(*RiskLevel) { + return m.riskLevel +} +// GetRiskState gets the riskState property value. State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. +func (m *RiskyServicePrincipal) GetRiskState()(*RiskState) { + return m.riskState +} +// GetServicePrincipalType gets the servicePrincipalType property value. Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal. +func (m *RiskyServicePrincipal) GetServicePrincipalType()(*string) { + return m.servicePrincipalType +} +// Serialize serializes information the current object +func (m *RiskyServicePrincipal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isProcessing", m.GetIsProcessing()) + if err != nil { + return err + } + } + if m.GetRiskDetail() != nil { + cast := (*m.GetRiskDetail()).String() + err = writer.WriteStringValue("riskDetail", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("riskLastUpdatedDateTime", m.GetRiskLastUpdatedDateTime()) + if err != nil { + return err + } + } + if m.GetRiskLevel() != nil { + cast := (*m.GetRiskLevel()).String() + err = writer.WriteStringValue("riskLevel", &cast) + if err != nil { + return err + } + } + if m.GetRiskState() != nil { + cast := (*m.GetRiskState()).String() + err = writer.WriteStringValue("riskState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalType", m.GetServicePrincipalType()) + if err != nil { + return err + } + } + return nil +} +// SetAccountEnabled sets the accountEnabled property value. true if the service principal account is enabled; otherwise, false. +func (m *RiskyServicePrincipal) SetAccountEnabled(value *bool)() { + m.accountEnabled = value +} +// SetAppId sets the appId property value. The globally unique identifier for the associated application (its appId property), if any. +func (m *RiskyServicePrincipal) SetAppId(value *string)() { + m.appId = value +} +// SetDisplayName sets the displayName property value. The display name for the service principal. +func (m *RiskyServicePrincipal) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHistory sets the history property value. Represents the risk history of Azure AD service principals. +func (m *RiskyServicePrincipal) SetHistory(value []RiskyServicePrincipalHistoryItemable)() { + m.history = value +} +// SetIsProcessing sets the isProcessing property value. Indicates whether Azure AD is currently processing the service principal's risky state. +func (m *RiskyServicePrincipal) SetIsProcessing(value *bool)() { + m.isProcessing = value +} +// SetRiskDetail sets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, unknownFutureValue, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *RiskyServicePrincipal) SetRiskDetail(value *RiskDetail)() { + m.riskDetail = value +} +// SetRiskLastUpdatedDateTime sets the riskLastUpdatedDateTime property value. The date and time that the risk state was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2021 is 2021-01-01T00:00:00Z. Supports $filter (eq). +func (m *RiskyServicePrincipal) SetRiskLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.riskLastUpdatedDateTime = value +} +// SetRiskLevel sets the riskLevel property value. Level of the detected risky workload identity. The possible values are: low, medium, high, hidden, none, unknownFutureValue. Supports $filter (eq). +func (m *RiskyServicePrincipal) SetRiskLevel(value *RiskLevel)() { + m.riskLevel = value +} +// SetRiskState sets the riskState property value. State of the service principal's risk. The possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. +func (m *RiskyServicePrincipal) SetRiskState(value *RiskState)() { + m.riskState = value +} +// SetServicePrincipalType sets the servicePrincipalType property value. Identifies whether the service principal represents an Application, a ManagedIdentity, or a legacy application (socialIdp). This is set by Azure AD internally and is inherited from servicePrincipal. +func (m *RiskyServicePrincipal) SetServicePrincipalType(value *string)() { + m.servicePrincipalType = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_response.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_response.go new file mode 100644 index 000000000..d95ba1bc5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalCollectionResponse +type RiskyServicePrincipalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RiskyServicePrincipalable +} +// NewRiskyServicePrincipalCollectionResponse instantiates a new RiskyServicePrincipalCollectionResponse and sets the default values. +func NewRiskyServicePrincipalCollectionResponse()(*RiskyServicePrincipalCollectionResponse) { + m := &RiskyServicePrincipalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRiskyServicePrincipalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyServicePrincipalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyServicePrincipalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyServicePrincipalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyServicePrincipalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyServicePrincipalable, len(val)) + for i, v := range val { + res[i] = v.(RiskyServicePrincipalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RiskyServicePrincipalCollectionResponse) GetValue()([]RiskyServicePrincipalable) { + return m.value +} +// Serialize serializes information the current object +func (m *RiskyServicePrincipalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RiskyServicePrincipalCollectionResponse) SetValue(value []RiskyServicePrincipalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_responseable.go new file mode 100644 index 000000000..ed6d6db14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalCollectionResponseable +type RiskyServicePrincipalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RiskyServicePrincipalable) + SetValue(value []RiskyServicePrincipalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item.go new file mode 100644 index 000000000..1099260bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalHistoryItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskyServicePrincipalHistoryItem struct { + RiskyServicePrincipal + // The activity related to service principal risk level change. + activity RiskServicePrincipalActivityable + // The identifier of the actor of the operation. + initiatedBy *string + // The identifier of the service principal. + servicePrincipalId *string +} +// NewRiskyServicePrincipalHistoryItem instantiates a new riskyServicePrincipalHistoryItem and sets the default values. +func NewRiskyServicePrincipalHistoryItem()(*RiskyServicePrincipalHistoryItem) { + m := &RiskyServicePrincipalHistoryItem{ + RiskyServicePrincipal: *NewRiskyServicePrincipal(), + } + return m +} +// CreateRiskyServicePrincipalHistoryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyServicePrincipalHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyServicePrincipalHistoryItem(), nil +} +// GetActivity gets the activity property value. The activity related to service principal risk level change. +func (m *RiskyServicePrincipalHistoryItem) GetActivity()(RiskServicePrincipalActivityable) { + return m.activity +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyServicePrincipalHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RiskyServicePrincipal.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRiskServicePrincipalActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(RiskServicePrincipalActivityable)) + } + return nil + } + res["initiatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedBy(val) + } + return nil + } + res["servicePrincipalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalId(val) + } + return nil + } + return res +} +// GetInitiatedBy gets the initiatedBy property value. The identifier of the actor of the operation. +func (m *RiskyServicePrincipalHistoryItem) GetInitiatedBy()(*string) { + return m.initiatedBy +} +// GetServicePrincipalId gets the servicePrincipalId property value. The identifier of the service principal. +func (m *RiskyServicePrincipalHistoryItem) GetServicePrincipalId()(*string) { + return m.servicePrincipalId +} +// Serialize serializes information the current object +func (m *RiskyServicePrincipalHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RiskyServicePrincipal.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedBy", m.GetInitiatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalId", m.GetServicePrincipalId()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. The activity related to service principal risk level change. +func (m *RiskyServicePrincipalHistoryItem) SetActivity(value RiskServicePrincipalActivityable)() { + m.activity = value +} +// SetInitiatedBy sets the initiatedBy property value. The identifier of the actor of the operation. +func (m *RiskyServicePrincipalHistoryItem) SetInitiatedBy(value *string)() { + m.initiatedBy = value +} +// SetServicePrincipalId sets the servicePrincipalId property value. The identifier of the service principal. +func (m *RiskyServicePrincipalHistoryItem) SetServicePrincipalId(value *string)() { + m.servicePrincipalId = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_response.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_response.go new file mode 100644 index 000000000..3c7e4e529 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalHistoryItemCollectionResponse +type RiskyServicePrincipalHistoryItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RiskyServicePrincipalHistoryItemable +} +// NewRiskyServicePrincipalHistoryItemCollectionResponse instantiates a new RiskyServicePrincipalHistoryItemCollectionResponse and sets the default values. +func NewRiskyServicePrincipalHistoryItemCollectionResponse()(*RiskyServicePrincipalHistoryItemCollectionResponse) { + m := &RiskyServicePrincipalHistoryItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRiskyServicePrincipalHistoryItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyServicePrincipalHistoryItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyServicePrincipalHistoryItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyServicePrincipalHistoryItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyServicePrincipalHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyServicePrincipalHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(RiskyServicePrincipalHistoryItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RiskyServicePrincipalHistoryItemCollectionResponse) GetValue()([]RiskyServicePrincipalHistoryItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *RiskyServicePrincipalHistoryItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RiskyServicePrincipalHistoryItemCollectionResponse) SetValue(value []RiskyServicePrincipalHistoryItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_responseable.go new file mode 100644 index 000000000..28c030a82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalHistoryItemCollectionResponseable +type RiskyServicePrincipalHistoryItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RiskyServicePrincipalHistoryItemable) + SetValue(value []RiskyServicePrincipalHistoryItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principal_history_itemable.go b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_itemable.go new file mode 100644 index 000000000..953402bd3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principal_history_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalHistoryItemable +type RiskyServicePrincipalHistoryItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RiskyServicePrincipalable + GetActivity()(RiskServicePrincipalActivityable) + GetInitiatedBy()(*string) + GetServicePrincipalId()(*string) + SetActivity(value RiskServicePrincipalActivityable)() + SetInitiatedBy(value *string)() + SetServicePrincipalId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_service_principalable.go b/src/internal/connector/graph/betasdk/models/risky_service_principalable.go new file mode 100644 index 000000000..ffdbd2daa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_service_principalable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyServicePrincipalable +type RiskyServicePrincipalable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountEnabled()(*bool) + GetAppId()(*string) + GetDisplayName()(*string) + GetHistory()([]RiskyServicePrincipalHistoryItemable) + GetIsProcessing()(*bool) + GetRiskDetail()(*RiskDetail) + GetRiskLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRiskLevel()(*RiskLevel) + GetRiskState()(*RiskState) + GetServicePrincipalType()(*string) + SetAccountEnabled(value *bool)() + SetAppId(value *string)() + SetDisplayName(value *string)() + SetHistory(value []RiskyServicePrincipalHistoryItemable)() + SetIsProcessing(value *bool)() + SetRiskDetail(value *RiskDetail)() + SetRiskLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRiskLevel(value *RiskLevel)() + SetRiskState(value *RiskState)() + SetServicePrincipalType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user.go b/src/internal/connector/graph/betasdk/models/risky_user.go new file mode 100644 index 000000000..d98a84fc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user.go @@ -0,0 +1,298 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUser +type RiskyUser struct { + Entity + // The history property + history []RiskyUserHistoryItemable + // Indicates whether the user is deleted. Possible values are: true, false. + isDeleted *bool + // Indicates whether a user's risky state is being processed by the backend. + isProcessing *bool + // The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. + riskDetail *RiskDetail + // The date and time that the risky user was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + riskLastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Level of the detected risky user. The possible values are low, medium, high, hidden, none, unknownFutureValue. + riskLevel *RiskLevel + // State of the user's risk. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. + riskState *RiskState + // Risky user display name. + userDisplayName *string + // Risky user principal name. + userPrincipalName *string +} +// NewRiskyUser instantiates a new RiskyUser and sets the default values. +func NewRiskyUser()(*RiskyUser) { + m := &RiskyUser{ + Entity: *NewEntity(), + } + return m +} +// CreateRiskyUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.riskyUserHistoryItem": + return NewRiskyUserHistoryItem(), nil + } + } + } + } + return NewRiskyUser(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["history"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyUserHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyUserHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(RiskyUserHistoryItemable) + } + m.SetHistory(res) + } + return nil + } + res["isDeleted"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDeleted(val) + } + return nil + } + res["isProcessing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsProcessing(val) + } + return nil + } + res["riskDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetRiskDetail(val.(*RiskDetail)) + } + return nil + } + res["riskLastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskLastUpdatedDateTime(val) + } + return nil + } + res["riskLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + m.SetRiskLevel(val.(*RiskLevel)) + } + return nil + } + res["riskState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskState) + if err != nil { + return err + } + if val != nil { + m.SetRiskState(val.(*RiskState)) + } + return nil + } + res["userDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserDisplayName(val) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetHistory gets the history property value. The history property +func (m *RiskyUser) GetHistory()([]RiskyUserHistoryItemable) { + return m.history +} +// GetIsDeleted gets the isDeleted property value. Indicates whether the user is deleted. Possible values are: true, false. +func (m *RiskyUser) GetIsDeleted()(*bool) { + return m.isDeleted +} +// GetIsProcessing gets the isProcessing property value. Indicates whether a user's risky state is being processed by the backend. +func (m *RiskyUser) GetIsProcessing()(*bool) { + return m.isProcessing +} +// GetRiskDetail gets the riskDetail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. +func (m *RiskyUser) GetRiskDetail()(*RiskDetail) { + return m.riskDetail +} +// GetRiskLastUpdatedDateTime gets the riskLastUpdatedDateTime property value. The date and time that the risky user was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *RiskyUser) GetRiskLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.riskLastUpdatedDateTime +} +// GetRiskLevel gets the riskLevel property value. Level of the detected risky user. The possible values are low, medium, high, hidden, none, unknownFutureValue. +func (m *RiskyUser) GetRiskLevel()(*RiskLevel) { + return m.riskLevel +} +// GetRiskState gets the riskState property value. State of the user's risk. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. +func (m *RiskyUser) GetRiskState()(*RiskState) { + return m.riskState +} +// GetUserDisplayName gets the userDisplayName property value. Risky user display name. +func (m *RiskyUser) GetUserDisplayName()(*string) { + return m.userDisplayName +} +// GetUserPrincipalName gets the userPrincipalName property value. Risky user principal name. +func (m *RiskyUser) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *RiskyUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHistory())) + for i, v := range m.GetHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("history", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDeleted", m.GetIsDeleted()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isProcessing", m.GetIsProcessing()) + if err != nil { + return err + } + } + if m.GetRiskDetail() != nil { + cast := (*m.GetRiskDetail()).String() + err = writer.WriteStringValue("riskDetail", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("riskLastUpdatedDateTime", m.GetRiskLastUpdatedDateTime()) + if err != nil { + return err + } + } + if m.GetRiskLevel() != nil { + cast := (*m.GetRiskLevel()).String() + err = writer.WriteStringValue("riskLevel", &cast) + if err != nil { + return err + } + } + if m.GetRiskState() != nil { + cast := (*m.GetRiskState()).String() + err = writer.WriteStringValue("riskState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userDisplayName", m.GetUserDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetHistory sets the history property value. The history property +func (m *RiskyUser) SetHistory(value []RiskyUserHistoryItemable)() { + m.history = value +} +// SetIsDeleted sets the isDeleted property value. Indicates whether the user is deleted. Possible values are: true, false. +func (m *RiskyUser) SetIsDeleted(value *bool)() { + m.isDeleted = value +} +// SetIsProcessing sets the isProcessing property value. Indicates whether a user's risky state is being processed by the backend. +func (m *RiskyUser) SetIsProcessing(value *bool)() { + m.isProcessing = value +} +// SetRiskDetail sets the riskDetail property value. The possible values are none, adminGeneratedTemporaryPassword, userPerformedSecuredPasswordChange, userPerformedSecuredPasswordReset, adminConfirmedSigninSafe, aiConfirmedSigninSafe, userPassedMFADrivenByRiskBasedPolicy, adminDismissedAllRiskForUser, adminConfirmedSigninCompromised, hidden, adminConfirmedUserCompromised, unknownFutureValue. +func (m *RiskyUser) SetRiskDetail(value *RiskDetail)() { + m.riskDetail = value +} +// SetRiskLastUpdatedDateTime sets the riskLastUpdatedDateTime property value. The date and time that the risky user was last updated. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *RiskyUser) SetRiskLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.riskLastUpdatedDateTime = value +} +// SetRiskLevel sets the riskLevel property value. Level of the detected risky user. The possible values are low, medium, high, hidden, none, unknownFutureValue. +func (m *RiskyUser) SetRiskLevel(value *RiskLevel)() { + m.riskLevel = value +} +// SetRiskState sets the riskState property value. State of the user's risk. Possible values are: none, confirmedSafe, remediated, dismissed, atRisk, confirmedCompromised, unknownFutureValue. +func (m *RiskyUser) SetRiskState(value *RiskState)() { + m.riskState = value +} +// SetUserDisplayName sets the userDisplayName property value. Risky user display name. +func (m *RiskyUser) SetUserDisplayName(value *string)() { + m.userDisplayName = value +} +// SetUserPrincipalName sets the userPrincipalName property value. Risky user principal name. +func (m *RiskyUser) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_collection_response.go b/src/internal/connector/graph/betasdk/models/risky_user_collection_response.go new file mode 100644 index 000000000..e31e5ea72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserCollectionResponse +type RiskyUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RiskyUserable +} +// NewRiskyUserCollectionResponse instantiates a new RiskyUserCollectionResponse and sets the default values. +func NewRiskyUserCollectionResponse()(*RiskyUserCollectionResponse) { + m := &RiskyUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRiskyUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyUserable, len(val)) + for i, v := range val { + res[i] = v.(RiskyUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RiskyUserCollectionResponse) GetValue()([]RiskyUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *RiskyUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RiskyUserCollectionResponse) SetValue(value []RiskyUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/risky_user_collection_responseable.go new file mode 100644 index 000000000..6147c1a39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserCollectionResponseable +type RiskyUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RiskyUserable) + SetValue(value []RiskyUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_history_item.go b/src/internal/connector/graph/betasdk/models/risky_user_history_item.go new file mode 100644 index 000000000..215223e0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_history_item.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserHistoryItem provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RiskyUserHistoryItem struct { + RiskyUser + // The activity related to user risk level change. + activity RiskUserActivityable + // The ID of actor that does the operation. + initiatedBy *string + // The ID of the user. + userId *string +} +// NewRiskyUserHistoryItem instantiates a new riskyUserHistoryItem and sets the default values. +func NewRiskyUserHistoryItem()(*RiskyUserHistoryItem) { + m := &RiskyUserHistoryItem{ + RiskyUser: *NewRiskyUser(), + } + return m +} +// CreateRiskyUserHistoryItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyUserHistoryItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyUserHistoryItem(), nil +} +// GetActivity gets the activity property value. The activity related to user risk level change. +func (m *RiskyUserHistoryItem) GetActivity()(RiskUserActivityable) { + return m.activity +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyUserHistoryItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RiskyUser.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRiskUserActivityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(RiskUserActivityable)) + } + return nil + } + res["initiatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInitiatedBy(val) + } + return nil + } + res["userId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserId(val) + } + return nil + } + return res +} +// GetInitiatedBy gets the initiatedBy property value. The ID of actor that does the operation. +func (m *RiskyUserHistoryItem) GetInitiatedBy()(*string) { + return m.initiatedBy +} +// GetUserId gets the userId property value. The ID of the user. +func (m *RiskyUserHistoryItem) GetUserId()(*string) { + return m.userId +} +// Serialize serializes information the current object +func (m *RiskyUserHistoryItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RiskyUser.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("activity", m.GetActivity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("initiatedBy", m.GetInitiatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userId", m.GetUserId()) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. The activity related to user risk level change. +func (m *RiskyUserHistoryItem) SetActivity(value RiskUserActivityable)() { + m.activity = value +} +// SetInitiatedBy sets the initiatedBy property value. The ID of actor that does the operation. +func (m *RiskyUserHistoryItem) SetInitiatedBy(value *string)() { + m.initiatedBy = value +} +// SetUserId sets the userId property value. The ID of the user. +func (m *RiskyUserHistoryItem) SetUserId(value *string)() { + m.userId = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_response.go b/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_response.go new file mode 100644 index 000000000..63dd05833 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserHistoryItemCollectionResponse +type RiskyUserHistoryItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RiskyUserHistoryItemable +} +// NewRiskyUserHistoryItemCollectionResponse instantiates a new RiskyUserHistoryItemCollectionResponse and sets the default values. +func NewRiskyUserHistoryItemCollectionResponse()(*RiskyUserHistoryItemCollectionResponse) { + m := &RiskyUserHistoryItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRiskyUserHistoryItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRiskyUserHistoryItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRiskyUserHistoryItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RiskyUserHistoryItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRiskyUserHistoryItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RiskyUserHistoryItemable, len(val)) + for i, v := range val { + res[i] = v.(RiskyUserHistoryItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RiskyUserHistoryItemCollectionResponse) GetValue()([]RiskyUserHistoryItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *RiskyUserHistoryItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RiskyUserHistoryItemCollectionResponse) SetValue(value []RiskyUserHistoryItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_responseable.go new file mode 100644 index 000000000..e3b33c2c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_history_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserHistoryItemCollectionResponseable +type RiskyUserHistoryItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RiskyUserHistoryItemable) + SetValue(value []RiskyUserHistoryItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_user_history_itemable.go b/src/internal/connector/graph/betasdk/models/risky_user_history_itemable.go new file mode 100644 index 000000000..58ad8f7a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_user_history_itemable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserHistoryItemable +type RiskyUserHistoryItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RiskyUserable + GetActivity()(RiskUserActivityable) + GetInitiatedBy()(*string) + GetUserId()(*string) + SetActivity(value RiskUserActivityable)() + SetInitiatedBy(value *string)() + SetUserId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/risky_userable.go b/src/internal/connector/graph/betasdk/models/risky_userable.go new file mode 100644 index 000000000..951cbf9e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/risky_userable.go @@ -0,0 +1,30 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RiskyUserable +type RiskyUserable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHistory()([]RiskyUserHistoryItemable) + GetIsDeleted()(*bool) + GetIsProcessing()(*bool) + GetRiskDetail()(*RiskDetail) + GetRiskLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRiskLevel()(*RiskLevel) + GetRiskState()(*RiskState) + GetUserDisplayName()(*string) + GetUserPrincipalName()(*string) + SetHistory(value []RiskyUserHistoryItemable)() + SetIsDeleted(value *bool)() + SetIsProcessing(value *bool)() + SetRiskDetail(value *RiskDetail)() + SetRiskLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRiskLevel(value *RiskLevel)() + SetRiskState(value *RiskState)() + SetUserDisplayName(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_assignment.go b/src/internal/connector/graph/betasdk/models/role_assignment.go new file mode 100644 index 000000000..f889314c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_assignment.go @@ -0,0 +1,217 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignment the Role Assignment resource. Role assignments tie together a role definition with members and scopes. There can be one or more role assignments per role. This applies to custom and built-in roles. +type RoleAssignment struct { + Entity + // Description of the Role Assignment. + description *string + // The display or friendly name of the role Assignment. + displayName *string + // List of ids of role scope member security groups. These are IDs from Azure Active Directory. + resourceScopes []string + // Role definition this assignment is part of. + roleDefinition RoleDefinitionable + // List of ids of role scope member security groups. These are IDs from Azure Active Directory. + scopeMembers []string + // Specifies the type of scope for a Role Assignment. + scopeType *RoleAssignmentScopeType +} +// NewRoleAssignment instantiates a new roleAssignment and sets the default values. +func NewRoleAssignment()(*RoleAssignment) { + m := &RoleAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateRoleAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceAndAppManagementRoleAssignment": + return NewDeviceAndAppManagementRoleAssignment(), nil + } + } + } + } + return NewRoleAssignment(), nil +} +// GetDescription gets the description property value. Description of the Role Assignment. +func (m *RoleAssignment) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display or friendly name of the role Assignment. +func (m *RoleAssignment) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["resourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetResourceScopes(res) + } + return nil + } + res["roleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleDefinition(val.(RoleDefinitionable)) + } + return nil + } + res["scopeMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetScopeMembers(res) + } + return nil + } + res["scopeType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRoleAssignmentScopeType) + if err != nil { + return err + } + if val != nil { + m.SetScopeType(val.(*RoleAssignmentScopeType)) + } + return nil + } + return res +} +// GetResourceScopes gets the resourceScopes property value. List of ids of role scope member security groups. These are IDs from Azure Active Directory. +func (m *RoleAssignment) GetResourceScopes()([]string) { + return m.resourceScopes +} +// GetRoleDefinition gets the roleDefinition property value. Role definition this assignment is part of. +func (m *RoleAssignment) GetRoleDefinition()(RoleDefinitionable) { + return m.roleDefinition +} +// GetScopeMembers gets the scopeMembers property value. List of ids of role scope member security groups. These are IDs from Azure Active Directory. +func (m *RoleAssignment) GetScopeMembers()([]string) { + return m.scopeMembers +} +// GetScopeType gets the scopeType property value. Specifies the type of scope for a Role Assignment. +func (m *RoleAssignment) GetScopeType()(*RoleAssignmentScopeType) { + return m.scopeType +} +// Serialize serializes information the current object +func (m *RoleAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetResourceScopes() != nil { + err = writer.WriteCollectionOfStringValues("resourceScopes", m.GetResourceScopes()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleDefinition", m.GetRoleDefinition()) + if err != nil { + return err + } + } + if m.GetScopeMembers() != nil { + err = writer.WriteCollectionOfStringValues("scopeMembers", m.GetScopeMembers()) + if err != nil { + return err + } + } + if m.GetScopeType() != nil { + cast := (*m.GetScopeType()).String() + err = writer.WriteStringValue("scopeType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the Role Assignment. +func (m *RoleAssignment) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display or friendly name of the role Assignment. +func (m *RoleAssignment) SetDisplayName(value *string)() { + m.displayName = value +} +// SetResourceScopes sets the resourceScopes property value. List of ids of role scope member security groups. These are IDs from Azure Active Directory. +func (m *RoleAssignment) SetResourceScopes(value []string)() { + m.resourceScopes = value +} +// SetRoleDefinition sets the roleDefinition property value. Role definition this assignment is part of. +func (m *RoleAssignment) SetRoleDefinition(value RoleDefinitionable)() { + m.roleDefinition = value +} +// SetScopeMembers sets the scopeMembers property value. List of ids of role scope member security groups. These are IDs from Azure Active Directory. +func (m *RoleAssignment) SetScopeMembers(value []string)() { + m.scopeMembers = value +} +// SetScopeType sets the scopeType property value. Specifies the type of scope for a Role Assignment. +func (m *RoleAssignment) SetScopeType(value *RoleAssignmentScopeType)() { + m.scopeType = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/role_assignment_collection_response.go new file mode 100644 index 000000000..ea9cf45bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignmentCollectionResponse +type RoleAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoleAssignmentable +} +// NewRoleAssignmentCollectionResponse instantiates a new RoleAssignmentCollectionResponse and sets the default values. +func NewRoleAssignmentCollectionResponse()(*RoleAssignmentCollectionResponse) { + m := &RoleAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleAssignmentCollectionResponse) GetValue()([]RoleAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleAssignmentCollectionResponse) SetValue(value []RoleAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_assignment_collection_responseable.go new file mode 100644 index 000000000..30a172ca3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignmentCollectionResponseable +type RoleAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleAssignmentable) + SetValue(value []RoleAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_assignment_scope_type.go b/src/internal/connector/graph/betasdk/models/role_assignment_scope_type.go new file mode 100644 index 000000000..68bbc3df5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_assignment_scope_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RoleAssignmentScopeType int + +const ( + // Allow assignments to the specified ResourceScopes. + RESOURCESCOPE_ROLEASSIGNMENTSCOPETYPE RoleAssignmentScopeType = iota + // Allow assignments to all Intune devices. + ALLDEVICES_ROLEASSIGNMENTSCOPETYPE + // Allow assignments to all Intune licensed users. + ALLLICENSEDUSERS_ROLEASSIGNMENTSCOPETYPE + // Allow assignments to all Intune devices and licensed users. + ALLDEVICESANDLICENSEDUSERS_ROLEASSIGNMENTSCOPETYPE +) + +func (i RoleAssignmentScopeType) String() string { + return []string{"resourceScope", "allDevices", "allLicensedUsers", "allDevicesAndLicensedUsers"}[i] +} +func ParseRoleAssignmentScopeType(v string) (interface{}, error) { + result := RESOURCESCOPE_ROLEASSIGNMENTSCOPETYPE + switch v { + case "resourceScope": + result = RESOURCESCOPE_ROLEASSIGNMENTSCOPETYPE + case "allDevices": + result = ALLDEVICES_ROLEASSIGNMENTSCOPETYPE + case "allLicensedUsers": + result = ALLLICENSEDUSERS_ROLEASSIGNMENTSCOPETYPE + case "allDevicesAndLicensedUsers": + result = ALLDEVICESANDLICENSEDUSERS_ROLEASSIGNMENTSCOPETYPE + default: + return 0, errors.New("Unknown RoleAssignmentScopeType value: " + v) + } + return &result, nil +} +func SerializeRoleAssignmentScopeType(values []RoleAssignmentScopeType) []string { + 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/role_assignmentable.go b/src/internal/connector/graph/betasdk/models/role_assignmentable.go new file mode 100644 index 000000000..c880f9ab9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_assignmentable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleAssignmentable +type RoleAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetResourceScopes()([]string) + GetRoleDefinition()(RoleDefinitionable) + GetScopeMembers()([]string) + GetScopeType()(*RoleAssignmentScopeType) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetResourceScopes(value []string)() + SetRoleDefinition(value RoleDefinitionable)() + SetScopeMembers(value []string)() + SetScopeType(value *RoleAssignmentScopeType)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_definition.go b/src/internal/connector/graph/betasdk/models/role_definition.go new file mode 100644 index 000000000..5883d639c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_definition.go @@ -0,0 +1,288 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinition +type RoleDefinition struct { + Entity + // Description of the Role definition. + description *string + // Display Name of the Role definition. + displayName *string + // Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. + isBuiltIn *bool + // Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. + isBuiltInRoleDefinition *bool + // List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. + permissions []RolePermissionable + // List of Role assignments for this role definition. + roleAssignments []RoleAssignmentable + // List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. + rolePermissions []RolePermissionable + // List of Scope Tags for this Entity instance. + roleScopeTagIds []string +} +// NewRoleDefinition instantiates a new roleDefinition and sets the default values. +func NewRoleDefinition()(*RoleDefinition) { + m := &RoleDefinition{ + Entity: *NewEntity(), + } + return m +} +// CreateRoleDefinitionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleDefinitionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.deviceAndAppManagementRoleDefinition": + return NewDeviceAndAppManagementRoleDefinition(), nil + } + } + } + } + return NewRoleDefinition(), nil +} +// GetDescription gets the description property value. Description of the Role definition. +func (m *RoleDefinition) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Display Name of the Role definition. +func (m *RoleDefinition) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleDefinition) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isBuiltIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBuiltIn(val) + } + return nil + } + res["isBuiltInRoleDefinition"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBuiltInRoleDefinition(val) + } + return nil + } + res["permissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRolePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RolePermissionable, len(val)) + for i, v := range val { + res[i] = v.(RolePermissionable) + } + m.SetPermissions(res) + } + return nil + } + res["roleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleAssignmentable) + } + m.SetRoleAssignments(res) + } + return nil + } + res["rolePermissions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRolePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RolePermissionable, len(val)) + for i, v := range val { + res[i] = v.(RolePermissionable) + } + m.SetRolePermissions(res) + } + return nil + } + res["roleScopeTagIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetRoleScopeTagIds(res) + } + return nil + } + return res +} +// GetIsBuiltIn gets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. +func (m *RoleDefinition) GetIsBuiltIn()(*bool) { + return m.isBuiltIn +} +// GetIsBuiltInRoleDefinition gets the isBuiltInRoleDefinition property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. +func (m *RoleDefinition) GetIsBuiltInRoleDefinition()(*bool) { + return m.isBuiltInRoleDefinition +} +// GetPermissions gets the permissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. +func (m *RoleDefinition) GetPermissions()([]RolePermissionable) { + return m.permissions +} +// GetRoleAssignments gets the roleAssignments property value. List of Role assignments for this role definition. +func (m *RoleDefinition) GetRoleAssignments()([]RoleAssignmentable) { + return m.roleAssignments +} +// GetRolePermissions gets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. +func (m *RoleDefinition) GetRolePermissions()([]RolePermissionable) { + return m.rolePermissions +} +// GetRoleScopeTagIds gets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *RoleDefinition) GetRoleScopeTagIds()([]string) { + return m.roleScopeTagIds +} +// Serialize serializes information the current object +func (m *RoleDefinition) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isBuiltIn", m.GetIsBuiltIn()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isBuiltInRoleDefinition", m.GetIsBuiltInRoleDefinition()) + if err != nil { + return err + } + } + if m.GetPermissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPermissions())) + for i, v := range m.GetPermissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("permissions", cast) + if err != nil { + return err + } + } + if m.GetRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRoleAssignments())) + for i, v := range m.GetRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("roleAssignments", cast) + if err != nil { + return err + } + } + if m.GetRolePermissions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRolePermissions())) + for i, v := range m.GetRolePermissions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rolePermissions", cast) + if err != nil { + return err + } + } + if m.GetRoleScopeTagIds() != nil { + err = writer.WriteCollectionOfStringValues("roleScopeTagIds", m.GetRoleScopeTagIds()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description of the Role definition. +func (m *RoleDefinition) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Display Name of the Role definition. +func (m *RoleDefinition) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsBuiltIn sets the isBuiltIn property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. +func (m *RoleDefinition) SetIsBuiltIn(value *bool)() { + m.isBuiltIn = value +} +// SetIsBuiltInRoleDefinition sets the isBuiltInRoleDefinition property value. Type of Role. Set to True if it is built-in, or set to False if it is a custom role definition. +func (m *RoleDefinition) SetIsBuiltInRoleDefinition(value *bool)() { + m.isBuiltInRoleDefinition = value +} +// SetPermissions sets the permissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. +func (m *RoleDefinition) SetPermissions(value []RolePermissionable)() { + m.permissions = value +} +// SetRoleAssignments sets the roleAssignments property value. List of Role assignments for this role definition. +func (m *RoleDefinition) SetRoleAssignments(value []RoleAssignmentable)() { + m.roleAssignments = value +} +// SetRolePermissions sets the rolePermissions property value. List of Role Permissions this role is allowed to perform. These must match the actionName that is defined as part of the rolePermission. +func (m *RoleDefinition) SetRolePermissions(value []RolePermissionable)() { + m.rolePermissions = value +} +// SetRoleScopeTagIds sets the roleScopeTagIds property value. List of Scope Tags for this Entity instance. +func (m *RoleDefinition) SetRoleScopeTagIds(value []string)() { + m.roleScopeTagIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_definition_collection_response.go b/src/internal/connector/graph/betasdk/models/role_definition_collection_response.go new file mode 100644 index 000000000..c0040edd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_definition_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinitionCollectionResponse +type RoleDefinitionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoleDefinitionable +} +// NewRoleDefinitionCollectionResponse instantiates a new RoleDefinitionCollectionResponse and sets the default values. +func NewRoleDefinitionCollectionResponse()(*RoleDefinitionCollectionResponse) { + m := &RoleDefinitionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleDefinitionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleDefinitionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleDefinitionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleDefinitionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleDefinitionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleDefinitionable, len(val)) + for i, v := range val { + res[i] = v.(RoleDefinitionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleDefinitionCollectionResponse) GetValue()([]RoleDefinitionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleDefinitionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleDefinitionCollectionResponse) SetValue(value []RoleDefinitionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_definition_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_definition_collection_responseable.go new file mode 100644 index 000000000..33e61d6d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_definition_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinitionCollectionResponseable +type RoleDefinitionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleDefinitionable) + SetValue(value []RoleDefinitionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_definitionable.go b/src/internal/connector/graph/betasdk/models/role_definitionable.go new file mode 100644 index 000000000..a1069c7ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_definitionable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleDefinitionable +type RoleDefinitionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetIsBuiltIn()(*bool) + GetIsBuiltInRoleDefinition()(*bool) + GetPermissions()([]RolePermissionable) + GetRoleAssignments()([]RoleAssignmentable) + GetRolePermissions()([]RolePermissionable) + GetRoleScopeTagIds()([]string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsBuiltIn(value *bool)() + SetIsBuiltInRoleDefinition(value *bool)() + SetPermissions(value []RolePermissionable)() + SetRoleAssignments(value []RoleAssignmentable)() + SetRolePermissions(value []RolePermissionable)() + SetRoleScopeTagIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_membership_governance_criteria.go b/src/internal/connector/graph/betasdk/models/role_membership_governance_criteria.go new file mode 100644 index 000000000..3bb0c2516 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_membership_governance_criteria.go @@ -0,0 +1,88 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleMembershipGovernanceCriteria +type RoleMembershipGovernanceCriteria struct { + GovernanceCriteria + // The roleId property + roleId *string + // The roleTemplateId property + roleTemplateId *string +} +// NewRoleMembershipGovernanceCriteria instantiates a new RoleMembershipGovernanceCriteria and sets the default values. +func NewRoleMembershipGovernanceCriteria()(*RoleMembershipGovernanceCriteria) { + m := &RoleMembershipGovernanceCriteria{ + GovernanceCriteria: *NewGovernanceCriteria(), + } + odataTypeValue := "#microsoft.graph.roleMembershipGovernanceCriteria"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRoleMembershipGovernanceCriteriaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleMembershipGovernanceCriteriaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleMembershipGovernanceCriteria(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleMembershipGovernanceCriteria) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.GovernanceCriteria.GetFieldDeserializers() + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleTemplateId(val) + } + return nil + } + return res +} +// GetRoleId gets the roleId property value. The roleId property +func (m *RoleMembershipGovernanceCriteria) GetRoleId()(*string) { + return m.roleId +} +// GetRoleTemplateId gets the roleTemplateId property value. The roleTemplateId property +func (m *RoleMembershipGovernanceCriteria) GetRoleTemplateId()(*string) { + return m.roleTemplateId +} +// Serialize serializes information the current object +func (m *RoleMembershipGovernanceCriteria) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.GovernanceCriteria.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleTemplateId", m.GetRoleTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetRoleId sets the roleId property value. The roleId property +func (m *RoleMembershipGovernanceCriteria) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleTemplateId sets the roleTemplateId property value. The roleTemplateId property +func (m *RoleMembershipGovernanceCriteria) SetRoleTemplateId(value *string)() { + m.roleTemplateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_membership_governance_criteriaable.go b/src/internal/connector/graph/betasdk/models/role_membership_governance_criteriaable.go new file mode 100644 index 000000000..0fea9a662 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_membership_governance_criteriaable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleMembershipGovernanceCriteriaable +type RoleMembershipGovernanceCriteriaable interface { + GovernanceCriteriaable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRoleId()(*string) + GetRoleTemplateId()(*string) + SetRoleId(value *string)() + SetRoleTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_permission.go b/src/internal/connector/graph/betasdk/models/role_permission.go new file mode 100644 index 000000000..3aa0a98ea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_permission.go @@ -0,0 +1,135 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolePermission contains the set of ResourceActions determining the allowed and not allowed permissions for each role. +type RolePermission struct { + // Allowed Actions - Deprecated + actions []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 OdataType property + odataType *string + // Resource Actions each containing a set of allowed and not allowed permissions. + resourceActions []ResourceActionable +} +// NewRolePermission instantiates a new rolePermission and sets the default values. +func NewRolePermission()(*RolePermission) { + m := &RolePermission{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRolePermissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRolePermissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRolePermission(), nil +} +// GetActions gets the actions property value. Allowed Actions - Deprecated +func (m *RolePermission) GetActions()([]string) { + return m.actions +} +// 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 *RolePermission) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RolePermission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetActions(res) + } + 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["resourceActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateResourceActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ResourceActionable, len(val)) + for i, v := range val { + res[i] = v.(ResourceActionable) + } + m.SetResourceActions(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RolePermission) GetOdataType()(*string) { + return m.odataType +} +// GetResourceActions gets the resourceActions property value. Resource Actions each containing a set of allowed and not allowed permissions. +func (m *RolePermission) GetResourceActions()([]ResourceActionable) { + return m.resourceActions +} +// Serialize serializes information the current object +func (m *RolePermission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetActions() != nil { + err := writer.WriteCollectionOfStringValues("actions", m.GetActions()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResourceActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResourceActions())) + for i, v := range m.GetResourceActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("resourceActions", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. Allowed Actions - Deprecated +func (m *RolePermission) SetActions(value []string)() { + m.actions = value +} +// 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 *RolePermission) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RolePermission) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceActions sets the resourceActions property value. Resource Actions each containing a set of allowed and not allowed permissions. +func (m *RolePermission) SetResourceActions(value []ResourceActionable)() { + m.resourceActions = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_permission_collection_response.go b/src/internal/connector/graph/betasdk/models/role_permission_collection_response.go new file mode 100644 index 000000000..2991fc57a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_permission_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolePermissionCollectionResponse +type RolePermissionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RolePermissionable +} +// NewRolePermissionCollectionResponse instantiates a new RolePermissionCollectionResponse and sets the default values. +func NewRolePermissionCollectionResponse()(*RolePermissionCollectionResponse) { + m := &RolePermissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRolePermissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRolePermissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRolePermissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RolePermissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRolePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RolePermissionable, len(val)) + for i, v := range val { + res[i] = v.(RolePermissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RolePermissionCollectionResponse) GetValue()([]RolePermissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RolePermissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RolePermissionCollectionResponse) SetValue(value []RolePermissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_permission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_permission_collection_responseable.go new file mode 100644 index 000000000..303f13eac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_permission_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolePermissionCollectionResponseable +type RolePermissionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RolePermissionable) + SetValue(value []RolePermissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_permissionable.go b/src/internal/connector/graph/betasdk/models/role_permissionable.go new file mode 100644 index 000000000..2c9d50f38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_permissionable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RolePermissionable +type RolePermissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]string) + GetOdataType()(*string) + GetResourceActions()([]ResourceActionable) + SetActions(value []string)() + SetOdataType(value *string)() + SetResourceActions(value []ResourceActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag.go b/src/internal/connector/graph/betasdk/models/role_scope_tag.go new file mode 100644 index 000000000..4db082049 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag.go @@ -0,0 +1,140 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTag role Scope Tag +type RoleScopeTag struct { + Entity + // The list of assignments for this Role Scope Tag. + assignments []RoleScopeTagAutoAssignmentable + // Description of the Role Scope Tag. + description *string + // The display or friendly name of the Role Scope Tag. + displayName *string + // Description of the Role Scope Tag. This property is read-only. + isBuiltIn *bool +} +// NewRoleScopeTag instantiates a new roleScopeTag and sets the default values. +func NewRoleScopeTag()(*RoleScopeTag) { + m := &RoleScopeTag{ + Entity: *NewEntity(), + } + return m +} +// CreateRoleScopeTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTag(), nil +} +// GetAssignments gets the assignments property value. The list of assignments for this Role Scope Tag. +func (m *RoleScopeTag) GetAssignments()([]RoleScopeTagAutoAssignmentable) { + return m.assignments +} +// GetDescription gets the description property value. Description of the Role Scope Tag. +func (m *RoleScopeTag) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The display or friendly name of the Role Scope Tag. +func (m *RoleScopeTag) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["assignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagAutoAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagAutoAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagAutoAssignmentable) + } + m.SetAssignments(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isBuiltIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBuiltIn(val) + } + return nil + } + return res +} +// GetIsBuiltIn gets the isBuiltIn property value. Description of the Role Scope Tag. This property is read-only. +func (m *RoleScopeTag) GetIsBuiltIn()(*bool) { + return m.isBuiltIn +} +// Serialize serializes information the current object +func (m *RoleScopeTag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignments())) + for i, v := range m.GetAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetAssignments sets the assignments property value. The list of assignments for this Role Scope Tag. +func (m *RoleScopeTag) SetAssignments(value []RoleScopeTagAutoAssignmentable)() { + m.assignments = value +} +// SetDescription sets the description property value. Description of the Role Scope Tag. +func (m *RoleScopeTag) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The display or friendly name of the Role Scope Tag. +func (m *RoleScopeTag) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsBuiltIn sets the isBuiltIn property value. Description of the Role Scope Tag. This property is read-only. +func (m *RoleScopeTag) SetIsBuiltIn(value *bool)() { + m.isBuiltIn = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment.go new file mode 100644 index 000000000..405000a98 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagAutoAssignment contains the properties for auto-assigning a Role Scope Tag to a group to be applied to Devices. +type RoleScopeTagAutoAssignment struct { + Entity + // The auto-assignment target for the specific Role Scope Tag. + target DeviceAndAppManagementAssignmentTargetable +} +// NewRoleScopeTagAutoAssignment instantiates a new roleScopeTagAutoAssignment and sets the default values. +func NewRoleScopeTagAutoAssignment()(*RoleScopeTagAutoAssignment) { + m := &RoleScopeTagAutoAssignment{ + Entity: *NewEntity(), + } + return m +} +// CreateRoleScopeTagAutoAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagAutoAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTagAutoAssignment(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTagAutoAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["target"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDeviceAndAppManagementAssignmentTargetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTarget(val.(DeviceAndAppManagementAssignmentTargetable)) + } + return nil + } + return res +} +// GetTarget gets the target property value. The auto-assignment target for the specific Role Scope Tag. +func (m *RoleScopeTagAutoAssignment) GetTarget()(DeviceAndAppManagementAssignmentTargetable) { + return m.target +} +// Serialize serializes information the current object +func (m *RoleScopeTagAutoAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("target", m.GetTarget()) + if err != nil { + return err + } + } + return nil +} +// SetTarget sets the target property value. The auto-assignment target for the specific Role Scope Tag. +func (m *RoleScopeTagAutoAssignment) SetTarget(value DeviceAndAppManagementAssignmentTargetable)() { + m.target = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_response.go new file mode 100644 index 000000000..f20126068 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagAutoAssignmentCollectionResponse +type RoleScopeTagAutoAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoleScopeTagAutoAssignmentable +} +// NewRoleScopeTagAutoAssignmentCollectionResponse instantiates a new RoleScopeTagAutoAssignmentCollectionResponse and sets the default values. +func NewRoleScopeTagAutoAssignmentCollectionResponse()(*RoleScopeTagAutoAssignmentCollectionResponse) { + m := &RoleScopeTagAutoAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleScopeTagAutoAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagAutoAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTagAutoAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTagAutoAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagAutoAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagAutoAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagAutoAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleScopeTagAutoAssignmentCollectionResponse) GetValue()([]RoleScopeTagAutoAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleScopeTagAutoAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleScopeTagAutoAssignmentCollectionResponse) SetValue(value []RoleScopeTagAutoAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_responseable.go new file mode 100644 index 000000000..e54156759 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagAutoAssignmentCollectionResponseable +type RoleScopeTagAutoAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleScopeTagAutoAssignmentable) + SetValue(value []RoleScopeTagAutoAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignmentable.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignmentable.go new file mode 100644 index 000000000..2738308b6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_auto_assignmentable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagAutoAssignmentable +type RoleScopeTagAutoAssignmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTarget()(DeviceAndAppManagementAssignmentTargetable) + SetTarget(value DeviceAndAppManagementAssignmentTargetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_response.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_response.go new file mode 100644 index 000000000..9b4191df6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagCollectionResponse +type RoleScopeTagCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoleScopeTagable +} +// NewRoleScopeTagCollectionResponse instantiates a new RoleScopeTagCollectionResponse and sets the default values. +func NewRoleScopeTagCollectionResponse()(*RoleScopeTagCollectionResponse) { + m := &RoleScopeTagCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleScopeTagCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTagCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTagCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleScopeTagCollectionResponse) GetValue()([]RoleScopeTagable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleScopeTagCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleScopeTagCollectionResponse) SetValue(value []RoleScopeTagable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_responseable.go new file mode 100644 index 000000000..cadce7822 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagCollectionResponseable +type RoleScopeTagCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleScopeTagable) + SetValue(value []RoleScopeTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_info.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_info.go new file mode 100644 index 000000000..dbfa45ba1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_info.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagInfo a class containing the properties of Role Scope Tag Object. +type RoleScopeTagInfo struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Scope Tag Display name. + displayName *string + // The OdataType property + odataType *string + // Scope Tag Id. + roleScopeTagId *string +} +// NewRoleScopeTagInfo instantiates a new roleScopeTagInfo and sets the default values. +func NewRoleScopeTagInfo()(*RoleScopeTagInfo) { + m := &RoleScopeTagInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRoleScopeTagInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTagInfo(), 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 *RoleScopeTagInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Scope Tag Display name. +func (m *RoleScopeTagInfo) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTagInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["roleScopeTagId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleScopeTagId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RoleScopeTagInfo) GetOdataType()(*string) { + return m.odataType +} +// GetRoleScopeTagId gets the roleScopeTagId property value. Scope Tag Id. +func (m *RoleScopeTagInfo) GetRoleScopeTagId()(*string) { + return m.roleScopeTagId +} +// Serialize serializes information the current object +func (m *RoleScopeTagInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("roleScopeTagId", m.GetRoleScopeTagId()) + 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 *RoleScopeTagInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Scope Tag Display name. +func (m *RoleScopeTagInfo) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RoleScopeTagInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetRoleScopeTagId sets the roleScopeTagId property value. Scope Tag Id. +func (m *RoleScopeTagInfo) SetRoleScopeTagId(value *string)() { + m.roleScopeTagId = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_response.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_response.go new file mode 100644 index 000000000..73351edce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagInfoCollectionResponse +type RoleScopeTagInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoleScopeTagInfoable +} +// NewRoleScopeTagInfoCollectionResponse instantiates a new RoleScopeTagInfoCollectionResponse and sets the default values. +func NewRoleScopeTagInfoCollectionResponse()(*RoleScopeTagInfoCollectionResponse) { + m := &RoleScopeTagInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoleScopeTagInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoleScopeTagInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoleScopeTagInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoleScopeTagInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoleScopeTagInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoleScopeTagInfoable, len(val)) + for i, v := range val { + res[i] = v.(RoleScopeTagInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoleScopeTagInfoCollectionResponse) GetValue()([]RoleScopeTagInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoleScopeTagInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoleScopeTagInfoCollectionResponse) SetValue(value []RoleScopeTagInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_responseable.go new file mode 100644 index 000000000..601720c54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagInfoCollectionResponseable +type RoleScopeTagInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoleScopeTagInfoable) + SetValue(value []RoleScopeTagInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tag_infoable.go b/src/internal/connector/graph/betasdk/models/role_scope_tag_infoable.go new file mode 100644 index 000000000..c58e24488 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tag_infoable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagInfoable +type RoleScopeTagInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetRoleScopeTagId()(*string) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetRoleScopeTagId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_scope_tagable.go b/src/internal/connector/graph/betasdk/models/role_scope_tagable.go new file mode 100644 index 000000000..256882fc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_scope_tagable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoleScopeTagable +type RoleScopeTagable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignments()([]RoleScopeTagAutoAssignmentable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsBuiltIn()(*bool) + SetAssignments(value []RoleScopeTagAutoAssignmentable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsBuiltIn(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/role_summary_status.go b/src/internal/connector/graph/betasdk/models/role_summary_status.go new file mode 100644 index 000000000..290ea3b49 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/role_summary_status.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RoleSummaryStatus int + +const ( + OK_ROLESUMMARYSTATUS RoleSummaryStatus = iota + BAD_ROLESUMMARYSTATUS +) + +func (i RoleSummaryStatus) String() string { + return []string{"ok", "bad"}[i] +} +func ParseRoleSummaryStatus(v string) (interface{}, error) { + result := OK_ROLESUMMARYSTATUS + switch v { + case "ok": + result = OK_ROLESUMMARYSTATUS + case "bad": + result = BAD_ROLESUMMARYSTATUS + default: + return 0, errors.New("Unknown RoleSummaryStatus value: " + v) + } + return &result, nil +} +func SerializeRoleSummaryStatus(values []RoleSummaryStatus) []string { + 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/room.go b/src/internal/connector/graph/betasdk/models/room.go new file mode 100644 index 000000000..6323ec135 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room.go @@ -0,0 +1,379 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Room +type Room struct { + Place + // Specifies the name of the audio device in the room. + audioDeviceName *string + // Type of room. Possible values are standard, and reserved. + bookingType *BookingType + // Specifies the building name or building number that the room is in. + building *string + // Specifies the capacity of the room. + capacity *int32 + // Specifies the name of the display device in the room. + displayDeviceName *string + // Email address of the room. + emailAddress *string + // Specifies a descriptive label for the floor, for example, P. + floorLabel *string + // Specifies the floor number that the room is on. + floorNumber *int32 + // Specifies whether the room is wheelchair accessible. + isWheelChairAccessible *bool + // Specifies a descriptive label for the room, for example, a number or name. + label *string + // Specifies a nickname for the room, for example, 'conf room'. + nickname *string + // Specifies additional features of the room, for example, details like the type of view or furniture type. + tags []string + // Specifies the name of the video device in the room. + videoDeviceName *string +} +// NewRoom instantiates a new Room and sets the default values. +func NewRoom()(*Room) { + m := &Room{ + Place: *NewPlace(), + } + odataTypeValue := "#microsoft.graph.room"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRoomFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoomFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoom(), nil +} +// GetAudioDeviceName gets the audioDeviceName property value. Specifies the name of the audio device in the room. +func (m *Room) GetAudioDeviceName()(*string) { + return m.audioDeviceName +} +// GetBookingType gets the bookingType property value. Type of room. Possible values are standard, and reserved. +func (m *Room) GetBookingType()(*BookingType) { + return m.bookingType +} +// GetBuilding gets the building property value. Specifies the building name or building number that the room is in. +func (m *Room) GetBuilding()(*string) { + return m.building +} +// GetCapacity gets the capacity property value. Specifies the capacity of the room. +func (m *Room) GetCapacity()(*int32) { + return m.capacity +} +// GetDisplayDeviceName gets the displayDeviceName property value. Specifies the name of the display device in the room. +func (m *Room) GetDisplayDeviceName()(*string) { + return m.displayDeviceName +} +// GetEmailAddress gets the emailAddress property value. Email address of the room. +func (m *Room) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Room) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Place.GetFieldDeserializers() + res["audioDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAudioDeviceName(val) + } + return nil + } + res["bookingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBookingType) + if err != nil { + return err + } + if val != nil { + m.SetBookingType(val.(*BookingType)) + } + return nil + } + res["building"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBuilding(val) + } + return nil + } + res["capacity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCapacity(val) + } + return nil + } + res["displayDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayDeviceName(val) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["floorLabel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFloorLabel(val) + } + return nil + } + res["floorNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFloorNumber(val) + } + return nil + } + res["isWheelChairAccessible"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsWheelChairAccessible(val) + } + return nil + } + res["label"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabel(val) + } + return nil + } + res["nickname"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNickname(val) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["videoDeviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVideoDeviceName(val) + } + return nil + } + return res +} +// GetFloorLabel gets the floorLabel property value. Specifies a descriptive label for the floor, for example, P. +func (m *Room) GetFloorLabel()(*string) { + return m.floorLabel +} +// GetFloorNumber gets the floorNumber property value. Specifies the floor number that the room is on. +func (m *Room) GetFloorNumber()(*int32) { + return m.floorNumber +} +// GetIsWheelChairAccessible gets the isWheelChairAccessible property value. Specifies whether the room is wheelchair accessible. +func (m *Room) GetIsWheelChairAccessible()(*bool) { + return m.isWheelChairAccessible +} +// GetLabel gets the label property value. Specifies a descriptive label for the room, for example, a number or name. +func (m *Room) GetLabel()(*string) { + return m.label +} +// GetNickname gets the nickname property value. Specifies a nickname for the room, for example, 'conf room'. +func (m *Room) GetNickname()(*string) { + return m.nickname +} +// GetTags gets the tags property value. Specifies additional features of the room, for example, details like the type of view or furniture type. +func (m *Room) GetTags()([]string) { + return m.tags +} +// GetVideoDeviceName gets the videoDeviceName property value. Specifies the name of the video device in the room. +func (m *Room) GetVideoDeviceName()(*string) { + return m.videoDeviceName +} +// Serialize serializes information the current object +func (m *Room) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Place.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("audioDeviceName", m.GetAudioDeviceName()) + if err != nil { + return err + } + } + if m.GetBookingType() != nil { + cast := (*m.GetBookingType()).String() + err = writer.WriteStringValue("bookingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("building", m.GetBuilding()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("capacity", m.GetCapacity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayDeviceName", m.GetDisplayDeviceName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("floorLabel", m.GetFloorLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("floorNumber", m.GetFloorNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isWheelChairAccessible", m.GetIsWheelChairAccessible()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("label", m.GetLabel()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("nickname", m.GetNickname()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("videoDeviceName", m.GetVideoDeviceName()) + if err != nil { + return err + } + } + return nil +} +// SetAudioDeviceName sets the audioDeviceName property value. Specifies the name of the audio device in the room. +func (m *Room) SetAudioDeviceName(value *string)() { + m.audioDeviceName = value +} +// SetBookingType sets the bookingType property value. Type of room. Possible values are standard, and reserved. +func (m *Room) SetBookingType(value *BookingType)() { + m.bookingType = value +} +// SetBuilding sets the building property value. Specifies the building name or building number that the room is in. +func (m *Room) SetBuilding(value *string)() { + m.building = value +} +// SetCapacity sets the capacity property value. Specifies the capacity of the room. +func (m *Room) SetCapacity(value *int32)() { + m.capacity = value +} +// SetDisplayDeviceName sets the displayDeviceName property value. Specifies the name of the display device in the room. +func (m *Room) SetDisplayDeviceName(value *string)() { + m.displayDeviceName = value +} +// SetEmailAddress sets the emailAddress property value. Email address of the room. +func (m *Room) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetFloorLabel sets the floorLabel property value. Specifies a descriptive label for the floor, for example, P. +func (m *Room) SetFloorLabel(value *string)() { + m.floorLabel = value +} +// SetFloorNumber sets the floorNumber property value. Specifies the floor number that the room is on. +func (m *Room) SetFloorNumber(value *int32)() { + m.floorNumber = value +} +// SetIsWheelChairAccessible sets the isWheelChairAccessible property value. Specifies whether the room is wheelchair accessible. +func (m *Room) SetIsWheelChairAccessible(value *bool)() { + m.isWheelChairAccessible = value +} +// SetLabel sets the label property value. Specifies a descriptive label for the room, for example, a number or name. +func (m *Room) SetLabel(value *string)() { + m.label = value +} +// SetNickname sets the nickname property value. Specifies a nickname for the room, for example, 'conf room'. +func (m *Room) SetNickname(value *string)() { + m.nickname = value +} +// SetTags sets the tags property value. Specifies additional features of the room, for example, details like the type of view or furniture type. +func (m *Room) SetTags(value []string)() { + m.tags = value +} +// SetVideoDeviceName sets the videoDeviceName property value. Specifies the name of the video device in the room. +func (m *Room) SetVideoDeviceName(value *string)() { + m.videoDeviceName = value +} diff --git a/src/internal/connector/graph/betasdk/models/room_collection_response.go b/src/internal/connector/graph/betasdk/models/room_collection_response.go new file mode 100644 index 000000000..2a7e1bc72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomCollectionResponse +type RoomCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []Roomable +} +// NewRoomCollectionResponse instantiates a new RoomCollectionResponse and sets the default values. +func NewRoomCollectionResponse()(*RoomCollectionResponse) { + m := &RoomCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoomCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoomCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoomCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoomCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Roomable, len(val)) + for i, v := range val { + res[i] = v.(Roomable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoomCollectionResponse) GetValue()([]Roomable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoomCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoomCollectionResponse) SetValue(value []Roomable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/room_collection_responseable.go b/src/internal/connector/graph/betasdk/models/room_collection_responseable.go new file mode 100644 index 000000000..3fef9d649 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomCollectionResponseable +type RoomCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Roomable) + SetValue(value []Roomable)() +} diff --git a/src/internal/connector/graph/betasdk/models/room_list.go b/src/internal/connector/graph/betasdk/models/room_list.go new file mode 100644 index 000000000..34862583a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_list.go @@ -0,0 +1,130 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomList +type RoomList struct { + Place + // The email address of the room list. + emailAddress *string + // The rooms property + rooms []Roomable + // The workspaces property + workspaces []Workspaceable +} +// NewRoomList instantiates a new RoomList and sets the default values. +func NewRoomList()(*RoomList) { + m := &RoomList{ + Place: *NewPlace(), + } + odataTypeValue := "#microsoft.graph.roomList"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRoomListFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoomListFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoomList(), nil +} +// GetEmailAddress gets the emailAddress property value. The email address of the room list. +func (m *RoomList) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoomList) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Place.GetFieldDeserializers() + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(val) + } + return nil + } + res["rooms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoomFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Roomable, len(val)) + for i, v := range val { + res[i] = v.(Roomable) + } + m.SetRooms(res) + } + return nil + } + res["workspaces"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateWorkspaceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Workspaceable, len(val)) + for i, v := range val { + res[i] = v.(Workspaceable) + } + m.SetWorkspaces(res) + } + return nil + } + return res +} +// GetRooms gets the rooms property value. The rooms property +func (m *RoomList) GetRooms()([]Roomable) { + return m.rooms +} +// GetWorkspaces gets the workspaces property value. The workspaces property +func (m *RoomList) GetWorkspaces()([]Workspaceable) { + return m.workspaces +} +// Serialize serializes information the current object +func (m *RoomList) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Place.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + if m.GetRooms() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRooms())) + for i, v := range m.GetRooms() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("rooms", cast) + if err != nil { + return err + } + } + if m.GetWorkspaces() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetWorkspaces())) + for i, v := range m.GetWorkspaces() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("workspaces", cast) + if err != nil { + return err + } + } + return nil +} +// SetEmailAddress sets the emailAddress property value. The email address of the room list. +func (m *RoomList) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetRooms sets the rooms property value. The rooms property +func (m *RoomList) SetRooms(value []Roomable)() { + m.rooms = value +} +// SetWorkspaces sets the workspaces property value. The workspaces property +func (m *RoomList) SetWorkspaces(value []Workspaceable)() { + m.workspaces = value +} diff --git a/src/internal/connector/graph/betasdk/models/room_list_collection_response.go b/src/internal/connector/graph/betasdk/models/room_list_collection_response.go new file mode 100644 index 000000000..e37e82124 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_list_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomListCollectionResponse +type RoomListCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RoomListable +} +// NewRoomListCollectionResponse instantiates a new RoomListCollectionResponse and sets the default values. +func NewRoomListCollectionResponse()(*RoomListCollectionResponse) { + m := &RoomListCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRoomListCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRoomListCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoomListCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RoomListCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRoomListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RoomListable, len(val)) + for i, v := range val { + res[i] = v.(RoomListable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RoomListCollectionResponse) GetValue()([]RoomListable) { + return m.value +} +// Serialize serializes information the current object +func (m *RoomListCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RoomListCollectionResponse) SetValue(value []RoomListable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/room_list_collection_responseable.go b/src/internal/connector/graph/betasdk/models/room_list_collection_responseable.go new file mode 100644 index 000000000..fd0da21c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_list_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomListCollectionResponseable +type RoomListCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RoomListable) + SetValue(value []RoomListable)() +} diff --git a/src/internal/connector/graph/betasdk/models/room_listable.go b/src/internal/connector/graph/betasdk/models/room_listable.go new file mode 100644 index 000000000..1fd867726 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/room_listable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RoomListable +type RoomListable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Placeable + GetEmailAddress()(*string) + GetRooms()([]Roomable) + GetWorkspaces()([]Workspaceable) + SetEmailAddress(value *string)() + SetRooms(value []Roomable)() + SetWorkspaces(value []Workspaceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/roomable.go b/src/internal/connector/graph/betasdk/models/roomable.go new file mode 100644 index 000000000..f83320cc7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/roomable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Roomable +type Roomable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Placeable + GetAudioDeviceName()(*string) + GetBookingType()(*BookingType) + GetBuilding()(*string) + GetCapacity()(*int32) + GetDisplayDeviceName()(*string) + GetEmailAddress()(*string) + GetFloorLabel()(*string) + GetFloorNumber()(*int32) + GetIsWheelChairAccessible()(*bool) + GetLabel()(*string) + GetNickname()(*string) + GetTags()([]string) + GetVideoDeviceName()(*string) + SetAudioDeviceName(value *string)() + SetBookingType(value *BookingType)() + SetBuilding(value *string)() + SetCapacity(value *int32)() + SetDisplayDeviceName(value *string)() + SetEmailAddress(value *string)() + SetFloorLabel(value *string)() + SetFloorNumber(value *int32)() + SetIsWheelChairAccessible(value *bool)() + SetLabel(value *string)() + SetNickname(value *string)() + SetTags(value []string)() + SetVideoDeviceName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/root.go b/src/internal/connector/graph/betasdk/models/root.go new file mode 100644 index 000000000..2ad60d9bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/root.go @@ -0,0 +1,71 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Root +type Root 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 OdataType property + odataType *string +} +// NewRoot instantiates a new root and sets the default values. +func NewRoot()(*Root) { + m := &Root{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRoot(), 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 *Root) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Root) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Root) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Root) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Root) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Root) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/rootable.go b/src/internal/connector/graph/betasdk/models/rootable.go new file mode 100644 index 000000000..0522c935a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rootable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Rootable +type Rootable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_result.go b/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_result.go new file mode 100644 index 000000000..ff532e74a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_result.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RotateBitLockerKeysDeviceActionResult +type RotateBitLockerKeysDeviceActionResult struct { + DeviceActionResult + // RotateBitLockerKeys action error code + errorCode *int32 +} +// NewRotateBitLockerKeysDeviceActionResult instantiates a new RotateBitLockerKeysDeviceActionResult and sets the default values. +func NewRotateBitLockerKeysDeviceActionResult()(*RotateBitLockerKeysDeviceActionResult) { + m := &RotateBitLockerKeysDeviceActionResult{ + DeviceActionResult: *NewDeviceActionResult(), + } + return m +} +// CreateRotateBitLockerKeysDeviceActionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRotateBitLockerKeysDeviceActionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRotateBitLockerKeysDeviceActionResult(), nil +} +// GetErrorCode gets the errorCode property value. RotateBitLockerKeys action error code +func (m *RotateBitLockerKeysDeviceActionResult) GetErrorCode()(*int32) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RotateBitLockerKeysDeviceActionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceActionResult.GetFieldDeserializers() + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *RotateBitLockerKeysDeviceActionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceActionResult.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + return nil +} +// SetErrorCode sets the errorCode property value. RotateBitLockerKeys action error code +func (m *RotateBitLockerKeysDeviceActionResult) SetErrorCode(value *int32)() { + m.errorCode = value +} diff --git a/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_resultable.go b/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_resultable.go new file mode 100644 index 000000000..dda6affe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rotate_bit_locker_keys_device_action_resultable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RotateBitLockerKeysDeviceActionResultable +type RotateBitLockerKeysDeviceActionResultable interface { + DeviceActionResultable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetErrorCode()(*int32) + SetErrorCode(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/routing_mode.go b/src/internal/connector/graph/betasdk/models/routing_mode.go new file mode 100644 index 000000000..2705f765f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/routing_mode.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RoutingMode int + +const ( + ONETOONE_ROUTINGMODE RoutingMode = iota + MULTICAST_ROUTINGMODE +) + +func (i RoutingMode) String() string { + return []string{"oneToOne", "multicast"}[i] +} +func ParseRoutingMode(v string) (interface{}, error) { + result := ONETOONE_ROUTINGMODE + switch v { + case "oneToOne": + result = ONETOONE_ROUTINGMODE + case "multicast": + result = MULTICAST_ROUTINGMODE + default: + return 0, errors.New("Unknown RoutingMode value: " + v) + } + return &result, nil +} +func SerializeRoutingMode(values []RoutingMode) []string { + 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/routing_policy.go b/src/internal/connector/graph/betasdk/models/routing_policy.go new file mode 100644 index 000000000..dd0c7f729 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/routing_policy.go @@ -0,0 +1,46 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RoutingPolicy int + +const ( + NONE_ROUTINGPOLICY RoutingPolicy = iota + NOMISSEDCALL_ROUTINGPOLICY + DISABLEFORWARDINGEXCEPTPHONE_ROUTINGPOLICY + DISABLEFORWARDING_ROUTINGPOLICY + PREFERSKYPEFORBUSINESS_ROUTINGPOLICY + UNKNOWNFUTUREVALUE_ROUTINGPOLICY +) + +func (i RoutingPolicy) String() string { + return []string{"none", "noMissedCall", "disableForwardingExceptPhone", "disableForwarding", "preferSkypeForBusiness", "unknownFutureValue"}[i] +} +func ParseRoutingPolicy(v string) (interface{}, error) { + result := NONE_ROUTINGPOLICY + switch v { + case "none": + result = NONE_ROUTINGPOLICY + case "noMissedCall": + result = NOMISSEDCALL_ROUTINGPOLICY + case "disableForwardingExceptPhone": + result = DISABLEFORWARDINGEXCEPTPHONE_ROUTINGPOLICY + case "disableForwarding": + result = DISABLEFORWARDING_ROUTINGPOLICY + case "preferSkypeForBusiness": + result = PREFERSKYPEFORBUSINESS_ROUTINGPOLICY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ROUTINGPOLICY + default: + return 0, errors.New("Unknown RoutingPolicy value: " + v) + } + return &result, nil +} +func SerializeRoutingPolicy(values []RoutingPolicy) []string { + 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/routing_type.go b/src/internal/connector/graph/betasdk/models/routing_type.go new file mode 100644 index 000000000..2e83836d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/routing_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RoutingType int + +const ( + FORWARDED_ROUTINGTYPE RoutingType = iota + LOOKUP_ROUTINGTYPE + SELFFORK_ROUTINGTYPE + UNKNOWNFUTUREVALUE_ROUTINGTYPE +) + +func (i RoutingType) String() string { + return []string{"forwarded", "lookup", "selfFork", "unknownFutureValue"}[i] +} +func ParseRoutingType(v string) (interface{}, error) { + result := FORWARDED_ROUTINGTYPE + switch v { + case "forwarded": + result = FORWARDED_ROUTINGTYPE + case "lookup": + result = LOOKUP_ROUTINGTYPE + case "selfFork": + result = SELFFORK_ROUTINGTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ROUTINGTYPE + default: + return 0, errors.New("Unknown RoutingType value: " + v) + } + return &result, nil +} +func SerializeRoutingType(values []RoutingType) []string { + 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/rubric_criterion.go b/src/internal/connector/graph/betasdk/models/rubric_criterion.go new file mode 100644 index 000000000..31ae6ecc9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_criterion.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricCriterion +type RubricCriterion 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 description of this criterion. + description EducationItemBodyable + // The OdataType property + odataType *string +} +// NewRubricCriterion instantiates a new rubricCriterion and sets the default values. +func NewRubricCriterion()(*RubricCriterion) { + m := &RubricCriterion{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRubricCriterionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricCriterionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricCriterion(), 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 *RubricCriterion) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description of this criterion. +func (m *RubricCriterion) GetDescription()(EducationItemBodyable) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricCriterion) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDescription(val.(EducationItemBodyable)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RubricCriterion) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RubricCriterion) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RubricCriterion) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of this criterion. +func (m *RubricCriterion) SetDescription(value EducationItemBodyable)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RubricCriterion) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_response.go b/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_response.go new file mode 100644 index 000000000..dcdb0484c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricCriterionCollectionResponse +type RubricCriterionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RubricCriterionable +} +// NewRubricCriterionCollectionResponse instantiates a new RubricCriterionCollectionResponse and sets the default values. +func NewRubricCriterionCollectionResponse()(*RubricCriterionCollectionResponse) { + m := &RubricCriterionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRubricCriterionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricCriterionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricCriterionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricCriterionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricCriterionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricCriterionable, len(val)) + for i, v := range val { + res[i] = v.(RubricCriterionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RubricCriterionCollectionResponse) GetValue()([]RubricCriterionable) { + return m.value +} +// Serialize serializes information the current object +func (m *RubricCriterionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RubricCriterionCollectionResponse) SetValue(value []RubricCriterionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_responseable.go new file mode 100644 index 000000000..a4d59d04e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_criterion_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricCriterionCollectionResponseable +type RubricCriterionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RubricCriterionable) + SetValue(value []RubricCriterionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_criterionable.go b/src/internal/connector/graph/betasdk/models/rubric_criterionable.go new file mode 100644 index 000000000..bfcd9a53e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_criterionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricCriterionable +type RubricCriterionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(EducationItemBodyable) + GetOdataType()(*string) + SetDescription(value EducationItemBodyable)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_level.go b/src/internal/connector/graph/betasdk/models/rubric_level.go new file mode 100644 index 000000000..2eb4fa934 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_level.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricLevel +type RubricLevel 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 description of this rubric level. + description EducationItemBodyable + // The name of this rubric level. + displayName *string + // Null if this is a no-points rubric; educationAssignmentPointsGradeType if it is a points rubric. + grading EducationAssignmentGradeTypeable + // The ID of this resource. + levelId *string + // The OdataType property + odataType *string +} +// NewRubricLevel instantiates a new rubricLevel and sets the default values. +func NewRubricLevel()(*RubricLevel) { + m := &RubricLevel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRubricLevelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricLevelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricLevel(), 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 *RubricLevel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. The description of this rubric level. +func (m *RubricLevel) GetDescription()(EducationItemBodyable) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of this rubric level. +func (m *RubricLevel) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricLevel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDescription(val.(EducationItemBodyable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["grading"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationAssignmentGradeTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGrading(val.(EducationAssignmentGradeTypeable)) + } + return nil + } + res["levelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLevelId(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 + } + return res +} +// GetGrading gets the grading property value. Null if this is a no-points rubric; educationAssignmentPointsGradeType if it is a points rubric. +func (m *RubricLevel) GetGrading()(EducationAssignmentGradeTypeable) { + return m.grading +} +// GetLevelId gets the levelId property value. The ID of this resource. +func (m *RubricLevel) GetLevelId()(*string) { + return m.levelId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RubricLevel) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RubricLevel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("grading", m.GetGrading()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("levelId", m.GetLevelId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RubricLevel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. The description of this rubric level. +func (m *RubricLevel) SetDescription(value EducationItemBodyable)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of this rubric level. +func (m *RubricLevel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetGrading sets the grading property value. Null if this is a no-points rubric; educationAssignmentPointsGradeType if it is a points rubric. +func (m *RubricLevel) SetGrading(value EducationAssignmentGradeTypeable)() { + m.grading = value +} +// SetLevelId sets the levelId property value. The ID of this resource. +func (m *RubricLevel) SetLevelId(value *string)() { + m.levelId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RubricLevel) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_level_collection_response.go b/src/internal/connector/graph/betasdk/models/rubric_level_collection_response.go new file mode 100644 index 000000000..42dff270b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_level_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricLevelCollectionResponse +type RubricLevelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RubricLevelable +} +// NewRubricLevelCollectionResponse instantiates a new RubricLevelCollectionResponse and sets the default values. +func NewRubricLevelCollectionResponse()(*RubricLevelCollectionResponse) { + m := &RubricLevelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRubricLevelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricLevelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricLevelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricLevelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricLevelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricLevelable, len(val)) + for i, v := range val { + res[i] = v.(RubricLevelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RubricLevelCollectionResponse) GetValue()([]RubricLevelable) { + return m.value +} +// Serialize serializes information the current object +func (m *RubricLevelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RubricLevelCollectionResponse) SetValue(value []RubricLevelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_level_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rubric_level_collection_responseable.go new file mode 100644 index 000000000..fa2f57766 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_level_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricLevelCollectionResponseable +type RubricLevelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RubricLevelable) + SetValue(value []RubricLevelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_levelable.go b/src/internal/connector/graph/betasdk/models/rubric_levelable.go new file mode 100644 index 000000000..19969f206 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_levelable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricLevelable +type RubricLevelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(EducationItemBodyable) + GetDisplayName()(*string) + GetGrading()(EducationAssignmentGradeTypeable) + GetLevelId()(*string) + GetOdataType()(*string) + SetDescription(value EducationItemBodyable)() + SetDisplayName(value *string)() + SetGrading(value EducationAssignmentGradeTypeable)() + SetLevelId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality.go b/src/internal/connector/graph/betasdk/models/rubric_quality.go new file mode 100644 index 000000000..ee66c5c87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQuality +type RubricQuality 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 collection of criteria for this rubric quality. + criteria []RubricCriterionable + // The description of this rubric quality. + description EducationItemBodyable + // The name of this rubric quality. + displayName *string + // The OdataType property + odataType *string + // The ID of this resource. + qualityId *string + // If present, a numerical weight for this quality. Weights must add up to 100. + weight *float32 +} +// NewRubricQuality instantiates a new rubricQuality and sets the default values. +func NewRubricQuality()(*RubricQuality) { + m := &RubricQuality{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRubricQualityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQuality(), 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 *RubricQuality) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCriteria gets the criteria property value. The collection of criteria for this rubric quality. +func (m *RubricQuality) GetCriteria()([]RubricCriterionable) { + return m.criteria +} +// GetDescription gets the description property value. The description of this rubric quality. +func (m *RubricQuality) GetDescription()(EducationItemBodyable) { + return m.description +} +// GetDisplayName gets the displayName property value. The name of this rubric quality. +func (m *RubricQuality) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQuality) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["criteria"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricCriterionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricCriterionable, len(val)) + for i, v := range val { + res[i] = v.(RubricCriterionable) + } + m.SetCriteria(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDescription(val.(EducationItemBodyable)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["qualityId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQualityId(val) + } + return nil + } + res["weight"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat32Value() + if err != nil { + return err + } + if val != nil { + m.SetWeight(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RubricQuality) GetOdataType()(*string) { + return m.odataType +} +// GetQualityId gets the qualityId property value. The ID of this resource. +func (m *RubricQuality) GetQualityId()(*string) { + return m.qualityId +} +// GetWeight gets the weight property value. If present, a numerical weight for this quality. Weights must add up to 100. +func (m *RubricQuality) GetWeight()(*float32) { + return m.weight +} +// Serialize serializes information the current object +func (m *RubricQuality) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCriteria() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCriteria())) + for i, v := range m.GetCriteria() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("criteria", cast) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("qualityId", m.GetQualityId()) + if err != nil { + return err + } + } + { + err := writer.WriteFloat32Value("weight", m.GetWeight()) + 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 *RubricQuality) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCriteria sets the criteria property value. The collection of criteria for this rubric quality. +func (m *RubricQuality) SetCriteria(value []RubricCriterionable)() { + m.criteria = value +} +// SetDescription sets the description property value. The description of this rubric quality. +func (m *RubricQuality) SetDescription(value EducationItemBodyable)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The name of this rubric quality. +func (m *RubricQuality) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RubricQuality) SetOdataType(value *string)() { + m.odataType = value +} +// SetQualityId sets the qualityId property value. The ID of this resource. +func (m *RubricQuality) SetQualityId(value *string)() { + m.qualityId = value +} +// SetWeight sets the weight property value. If present, a numerical weight for this quality. Weights must add up to 100. +func (m *RubricQuality) SetWeight(value *float32)() { + m.weight = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_collection_response.go b/src/internal/connector/graph/betasdk/models/rubric_quality_collection_response.go new file mode 100644 index 000000000..7f915454e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityCollectionResponse +type RubricQualityCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RubricQualityable +} +// NewRubricQualityCollectionResponse instantiates a new RubricQualityCollectionResponse and sets the default values. +func NewRubricQualityCollectionResponse()(*RubricQualityCollectionResponse) { + m := &RubricQualityCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRubricQualityCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualityCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQualityCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQualityCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualityable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualityable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RubricQualityCollectionResponse) GetValue()([]RubricQualityable) { + return m.value +} +// Serialize serializes information the current object +func (m *RubricQualityCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RubricQualityCollectionResponse) SetValue(value []RubricQualityable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rubric_quality_collection_responseable.go new file mode 100644 index 000000000..d1751bd6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityCollectionResponseable +type RubricQualityCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RubricQualityable) + SetValue(value []RubricQualityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model.go b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model.go new file mode 100644 index 000000000..51f33a9bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityFeedbackModel +type RubricQualityFeedbackModel struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specific feedback for one quality of this rubric. + feedback EducationItemBodyable + // The OdataType property + odataType *string + // The ID of the rubricQuality that this feedback is related to. + qualityId *string +} +// NewRubricQualityFeedbackModel instantiates a new rubricQualityFeedbackModel and sets the default values. +func NewRubricQualityFeedbackModel()(*RubricQualityFeedbackModel) { + m := &RubricQualityFeedbackModel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRubricQualityFeedbackModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualityFeedbackModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQualityFeedbackModel(), 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 *RubricQualityFeedbackModel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFeedback gets the feedback property value. Specific feedback for one quality of this rubric. +func (m *RubricQualityFeedbackModel) GetFeedback()(EducationItemBodyable) { + return m.feedback +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQualityFeedbackModel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["feedback"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEducationItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFeedback(val.(EducationItemBodyable)) + } + 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["qualityId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQualityId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RubricQualityFeedbackModel) GetOdataType()(*string) { + return m.odataType +} +// GetQualityId gets the qualityId property value. The ID of the rubricQuality that this feedback is related to. +func (m *RubricQualityFeedbackModel) GetQualityId()(*string) { + return m.qualityId +} +// Serialize serializes information the current object +func (m *RubricQualityFeedbackModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("feedback", m.GetFeedback()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("qualityId", m.GetQualityId()) + 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 *RubricQualityFeedbackModel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFeedback sets the feedback property value. Specific feedback for one quality of this rubric. +func (m *RubricQualityFeedbackModel) SetFeedback(value EducationItemBodyable)() { + m.feedback = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RubricQualityFeedbackModel) SetOdataType(value *string)() { + m.odataType = value +} +// SetQualityId sets the qualityId property value. The ID of the rubricQuality that this feedback is related to. +func (m *RubricQualityFeedbackModel) SetQualityId(value *string)() { + m.qualityId = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_response.go b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_response.go new file mode 100644 index 000000000..17334c965 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityFeedbackModelCollectionResponse +type RubricQualityFeedbackModelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RubricQualityFeedbackModelable +} +// NewRubricQualityFeedbackModelCollectionResponse instantiates a new RubricQualityFeedbackModelCollectionResponse and sets the default values. +func NewRubricQualityFeedbackModelCollectionResponse()(*RubricQualityFeedbackModelCollectionResponse) { + m := &RubricQualityFeedbackModelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRubricQualityFeedbackModelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualityFeedbackModelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQualityFeedbackModelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQualityFeedbackModelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualityFeedbackModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualityFeedbackModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualityFeedbackModelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RubricQualityFeedbackModelCollectionResponse) GetValue()([]RubricQualityFeedbackModelable) { + return m.value +} +// Serialize serializes information the current object +func (m *RubricQualityFeedbackModelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RubricQualityFeedbackModelCollectionResponse) SetValue(value []RubricQualityFeedbackModelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_responseable.go new file mode 100644 index 000000000..a949dc086 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_model_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityFeedbackModelCollectionResponseable +type RubricQualityFeedbackModelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RubricQualityFeedbackModelable) + SetValue(value []RubricQualityFeedbackModelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_modelable.go b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_modelable.go new file mode 100644 index 000000000..1cb69ce9d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_feedback_modelable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityFeedbackModelable +type RubricQualityFeedbackModelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFeedback()(EducationItemBodyable) + GetOdataType()(*string) + GetQualityId()(*string) + SetFeedback(value EducationItemBodyable)() + SetOdataType(value *string)() + SetQualityId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model.go b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model.go new file mode 100644 index 000000000..5834dcf8a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualitySelectedColumnModel +type RubricQualitySelectedColumnModel struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // ID of the selected level for this quality. + columnId *string + // The OdataType property + odataType *string + // ID of the associated quality. + qualityId *string +} +// NewRubricQualitySelectedColumnModel instantiates a new rubricQualitySelectedColumnModel and sets the default values. +func NewRubricQualitySelectedColumnModel()(*RubricQualitySelectedColumnModel) { + m := &RubricQualitySelectedColumnModel{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRubricQualitySelectedColumnModelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualitySelectedColumnModelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQualitySelectedColumnModel(), 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 *RubricQualitySelectedColumnModel) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetColumnId gets the columnId property value. ID of the selected level for this quality. +func (m *RubricQualitySelectedColumnModel) GetColumnId()(*string) { + return m.columnId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQualitySelectedColumnModel) 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.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColumnId(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["qualityId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQualityId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RubricQualitySelectedColumnModel) GetOdataType()(*string) { + return m.odataType +} +// GetQualityId gets the qualityId property value. ID of the associated quality. +func (m *RubricQualitySelectedColumnModel) GetQualityId()(*string) { + return m.qualityId +} +// Serialize serializes information the current object +func (m *RubricQualitySelectedColumnModel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("columnId", m.GetColumnId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("qualityId", m.GetQualityId()) + 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 *RubricQualitySelectedColumnModel) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetColumnId sets the columnId property value. ID of the selected level for this quality. +func (m *RubricQualitySelectedColumnModel) SetColumnId(value *string)() { + m.columnId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RubricQualitySelectedColumnModel) SetOdataType(value *string)() { + m.odataType = value +} +// SetQualityId sets the qualityId property value. ID of the associated quality. +func (m *RubricQualitySelectedColumnModel) SetQualityId(value *string)() { + m.qualityId = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_response.go b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_response.go new file mode 100644 index 000000000..585079045 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualitySelectedColumnModelCollectionResponse +type RubricQualitySelectedColumnModelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []RubricQualitySelectedColumnModelable +} +// NewRubricQualitySelectedColumnModelCollectionResponse instantiates a new RubricQualitySelectedColumnModelCollectionResponse and sets the default values. +func NewRubricQualitySelectedColumnModelCollectionResponse()(*RubricQualitySelectedColumnModelCollectionResponse) { + m := &RubricQualitySelectedColumnModelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRubricQualitySelectedColumnModelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRubricQualitySelectedColumnModelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRubricQualitySelectedColumnModelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RubricQualitySelectedColumnModelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRubricQualitySelectedColumnModelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RubricQualitySelectedColumnModelable, len(val)) + for i, v := range val { + res[i] = v.(RubricQualitySelectedColumnModelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RubricQualitySelectedColumnModelCollectionResponse) GetValue()([]RubricQualitySelectedColumnModelable) { + return m.value +} +// Serialize serializes information the current object +func (m *RubricQualitySelectedColumnModelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RubricQualitySelectedColumnModelCollectionResponse) SetValue(value []RubricQualitySelectedColumnModelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_responseable.go b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_responseable.go new file mode 100644 index 000000000..10f5036f4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_model_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualitySelectedColumnModelCollectionResponseable +type RubricQualitySelectedColumnModelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RubricQualitySelectedColumnModelable) + SetValue(value []RubricQualitySelectedColumnModelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_modelable.go b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_modelable.go new file mode 100644 index 000000000..685ea0efc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_quality_selected_column_modelable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualitySelectedColumnModelable +type RubricQualitySelectedColumnModelable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColumnId()(*string) + GetOdataType()(*string) + GetQualityId()(*string) + SetColumnId(value *string)() + SetOdataType(value *string)() + SetQualityId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/rubric_qualityable.go b/src/internal/connector/graph/betasdk/models/rubric_qualityable.go new file mode 100644 index 000000000..c6d9147ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rubric_qualityable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RubricQualityable +type RubricQualityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCriteria()([]RubricCriterionable) + GetDescription()(EducationItemBodyable) + GetDisplayName()(*string) + GetOdataType()(*string) + GetQualityId()(*string) + GetWeight()(*float32) + SetCriteria(value []RubricCriterionable)() + SetDescription(value EducationItemBodyable)() + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetQualityId(value *string)() + SetWeight(value *float32)() +} diff --git a/src/internal/connector/graph/betasdk/models/rule_mode.go b/src/internal/connector/graph/betasdk/models/rule_mode.go new file mode 100644 index 000000000..5d99a4d0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/rule_mode.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RuleMode int + +const ( + AUDIT_RULEMODE RuleMode = iota + AUDITANDNOTIFY_RULEMODE + ENFORCE_RULEMODE + PENDINGDELETION_RULEMODE + TEST_RULEMODE +) + +func (i RuleMode) String() string { + return []string{"audit", "auditAndNotify", "enforce", "pendingDeletion", "test"}[i] +} +func ParseRuleMode(v string) (interface{}, error) { + result := AUDIT_RULEMODE + switch v { + case "audit": + result = AUDIT_RULEMODE + case "auditAndNotify": + result = AUDITANDNOTIFY_RULEMODE + case "enforce": + result = ENFORCE_RULEMODE + case "pendingDeletion": + result = PENDINGDELETION_RULEMODE + case "test": + result = TEST_RULEMODE + default: + return 0, errors.New("Unknown RuleMode value: " + v) + } + return &result, nil +} +func SerializeRuleMode(values []RuleMode) []string { + 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/run_as_account_type.go b/src/internal/connector/graph/betasdk/models/run_as_account_type.go new file mode 100644 index 000000000..d633385ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/run_as_account_type.go @@ -0,0 +1,36 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RunAsAccountType int + +const ( + // System context + SYSTEM_RUNASACCOUNTTYPE RunAsAccountType = iota + // User context + USER_RUNASACCOUNTTYPE +) + +func (i RunAsAccountType) String() string { + return []string{"system", "user"}[i] +} +func ParseRunAsAccountType(v string) (interface{}, error) { + result := SYSTEM_RUNASACCOUNTTYPE + switch v { + case "system": + result = SYSTEM_RUNASACCOUNTTYPE + case "user": + result = USER_RUNASACCOUNTTYPE + default: + return 0, errors.New("Unknown RunAsAccountType value: " + v) + } + return &result, nil +} +func SerializeRunAsAccountType(values []RunAsAccountType) []string { + 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/run_state.go b/src/internal/connector/graph/betasdk/models/run_state.go new file mode 100644 index 000000000..da3c61d99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/run_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RunState int + +const ( + // Unknown result. + UNKNOWN_RUNSTATE RunState = iota + // Script is run successfully. + SUCCESS_RUNSTATE + // Script failed to run. + FAIL_RUNSTATE + // Discovery script hits error. + SCRIPTERROR_RUNSTATE + // Script is pending to execute. + PENDING_RUNSTATE + // Script is not applicable for this device. + NOTAPPLICABLE_RUNSTATE +) + +func (i RunState) String() string { + return []string{"unknown", "success", "fail", "scriptError", "pending", "notApplicable"}[i] +} +func ParseRunState(v string) (interface{}, error) { + result := UNKNOWN_RUNSTATE + switch v { + case "unknown": + result = UNKNOWN_RUNSTATE + case "success": + result = SUCCESS_RUNSTATE + case "fail": + result = FAIL_RUNSTATE + case "scriptError": + result = SCRIPTERROR_RUNSTATE + case "pending": + result = PENDING_RUNSTATE + case "notApplicable": + result = NOTAPPLICABLE_RUNSTATE + default: + return 0, errors.New("Unknown RunState value: " + v) + } + return &result, nil +} +func SerializeRunState(values []RunState) []string { + 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/safe_search_filter_type.go b/src/internal/connector/graph/betasdk/models/safe_search_filter_type.go new file mode 100644 index 000000000..51a88671c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/safe_search_filter_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SafeSearchFilterType int + +const ( + // User Defined, default value, no intent. + USERDEFINED_SAFESEARCHFILTERTYPE SafeSearchFilterType = iota + // Strict, highest filtering against adult content. + STRICT_SAFESEARCHFILTERTYPE + // Moderate filtering against adult content (valid search results will not be filtered). + MODERATE_SAFESEARCHFILTERTYPE +) + +func (i SafeSearchFilterType) String() string { + return []string{"userDefined", "strict", "moderate"}[i] +} +func ParseSafeSearchFilterType(v string) (interface{}, error) { + result := USERDEFINED_SAFESEARCHFILTERTYPE + switch v { + case "userDefined": + result = USERDEFINED_SAFESEARCHFILTERTYPE + case "strict": + result = STRICT_SAFESEARCHFILTERTYPE + case "moderate": + result = MODERATE_SAFESEARCHFILTERTYPE + default: + return 0, errors.New("Unknown SafeSearchFilterType value: " + v) + } + return &result, nil +} +func SerializeSafeSearchFilterType(values []SafeSearchFilterType) []string { + 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/sales_credit_memo.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo.go new file mode 100644 index 000000000..426b8d524 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo.go @@ -0,0 +1,876 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemo provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesCreditMemo struct { + Entity + // The billingPostalAddress property + billingPostalAddress PostalAddressTypeable + // The billToCustomerId property + billToCustomerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The billToCustomerNumber property + billToCustomerNumber *string + // The billToName property + billToName *string + // The creditMemoDate property + creditMemoDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customer property + customer Customerable + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customerName property + customerName *string + // The customerNumber property + customerNumber *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The dueDate property + dueDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The email property + email *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The invoiceId property + invoiceId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The invoiceNumber property + invoiceNumber *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The paymentTerm property + paymentTerm PaymentTermable + // The paymentTermsId property + paymentTermsId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The phoneNumber property + phoneNumber *string + // The pricesIncludeTax property + pricesIncludeTax *bool + // The salesCreditMemoLines property + salesCreditMemoLines []SalesCreditMemoLineable + // The salesperson property + salesperson *string + // The sellingPostalAddress property + sellingPostalAddress PostalAddressTypeable + // The status property + status *string + // The totalAmountExcludingTax property + totalAmountExcludingTax *float64 + // The totalAmountIncludingTax property + totalAmountIncludingTax *float64 + // The totalTaxAmount property + totalTaxAmount *float64 +} +// NewSalesCreditMemo instantiates a new salesCreditMemo and sets the default values. +func NewSalesCreditMemo()(*SalesCreditMemo) { + m := &SalesCreditMemo{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesCreditMemoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesCreditMemoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesCreditMemo(), nil +} +// GetBillingPostalAddress gets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesCreditMemo) GetBillingPostalAddress()(PostalAddressTypeable) { + return m.billingPostalAddress +} +// GetBillToCustomerId gets the billToCustomerId property value. The billToCustomerId property +func (m *SalesCreditMemo) GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.billToCustomerId +} +// GetBillToCustomerNumber gets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesCreditMemo) GetBillToCustomerNumber()(*string) { + return m.billToCustomerNumber +} +// GetBillToName gets the billToName property value. The billToName property +func (m *SalesCreditMemo) GetBillToName()(*string) { + return m.billToName +} +// GetCreditMemoDate gets the creditMemoDate property value. The creditMemoDate property +func (m *SalesCreditMemo) GetCreditMemoDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.creditMemoDate +} +// GetCurrency gets the currency property value. The currency property +func (m *SalesCreditMemo) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *SalesCreditMemo) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *SalesCreditMemo) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetCustomer gets the customer property value. The customer property +func (m *SalesCreditMemo) GetCustomer()(Customerable) { + return m.customer +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *SalesCreditMemo) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetCustomerName gets the customerName property value. The customerName property +func (m *SalesCreditMemo) GetCustomerName()(*string) { + return m.customerName +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *SalesCreditMemo) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesCreditMemo) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesCreditMemo) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDueDate gets the dueDate property value. The dueDate property +func (m *SalesCreditMemo) GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.dueDate +} +// GetEmail gets the email property value. The email property +func (m *SalesCreditMemo) GetEmail()(*string) { + return m.email +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesCreditMemo) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesCreditMemo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["billingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["billToCustomerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerId(val) + } + return nil + } + res["billToCustomerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerNumber(val) + } + return nil + } + res["billToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToName(val) + } + return nil + } + res["creditMemoDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetCreditMemoDate(val) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(Customerable)) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["dueDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["invoiceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceId(val) + } + return nil + } + res["invoiceNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceNumber(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["paymentTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentTerm(val.(PaymentTermable)) + } + return nil + } + res["paymentTermsId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentTermsId(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["pricesIncludeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPricesIncludeTax(val) + } + return nil + } + res["salesCreditMemoLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesCreditMemoLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesCreditMemoLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesCreditMemoLineable) + } + m.SetSalesCreditMemoLines(res) + } + return nil + } + res["salesperson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSalesperson(val) + } + return nil + } + res["sellingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSellingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["totalAmountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountExcludingTax(val) + } + return nil + } + res["totalAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountIncludingTax(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + return res +} +// GetInvoiceId gets the invoiceId property value. The invoiceId property +func (m *SalesCreditMemo) GetInvoiceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.invoiceId +} +// GetInvoiceNumber gets the invoiceNumber property value. The invoiceNumber property +func (m *SalesCreditMemo) GetInvoiceNumber()(*string) { + return m.invoiceNumber +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesCreditMemo) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *SalesCreditMemo) GetNumber()(*string) { + return m.number +} +// GetPaymentTerm gets the paymentTerm property value. The paymentTerm property +func (m *SalesCreditMemo) GetPaymentTerm()(PaymentTermable) { + return m.paymentTerm +} +// GetPaymentTermsId gets the paymentTermsId property value. The paymentTermsId property +func (m *SalesCreditMemo) GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentTermsId +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *SalesCreditMemo) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPricesIncludeTax gets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesCreditMemo) GetPricesIncludeTax()(*bool) { + return m.pricesIncludeTax +} +// GetSalesCreditMemoLines gets the salesCreditMemoLines property value. The salesCreditMemoLines property +func (m *SalesCreditMemo) GetSalesCreditMemoLines()([]SalesCreditMemoLineable) { + return m.salesCreditMemoLines +} +// GetSalesperson gets the salesperson property value. The salesperson property +func (m *SalesCreditMemo) GetSalesperson()(*string) { + return m.salesperson +} +// GetSellingPostalAddress gets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesCreditMemo) GetSellingPostalAddress()(PostalAddressTypeable) { + return m.sellingPostalAddress +} +// GetStatus gets the status property value. The status property +func (m *SalesCreditMemo) GetStatus()(*string) { + return m.status +} +// GetTotalAmountExcludingTax gets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesCreditMemo) GetTotalAmountExcludingTax()(*float64) { + return m.totalAmountExcludingTax +} +// GetTotalAmountIncludingTax gets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesCreditMemo) GetTotalAmountIncludingTax()(*float64) { + return m.totalAmountIncludingTax +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesCreditMemo) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// Serialize serializes information the current object +func (m *SalesCreditMemo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("billingPostalAddress", m.GetBillingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("billToCustomerId", m.GetBillToCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToCustomerNumber", m.GetBillToCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToName", m.GetBillToName()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("creditMemoDate", m.GetCreditMemoDate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("dueDate", m.GetDueDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("invoiceId", m.GetInvoiceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invoiceNumber", m.GetInvoiceNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentTerm", m.GetPaymentTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentTermsId", m.GetPaymentTermsId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pricesIncludeTax", m.GetPricesIncludeTax()) + if err != nil { + return err + } + } + if m.GetSalesCreditMemoLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesCreditMemoLines())) + for i, v := range m.GetSalesCreditMemoLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesCreditMemoLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("salesperson", m.GetSalesperson()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sellingPostalAddress", m.GetSellingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountExcludingTax", m.GetTotalAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountIncludingTax", m.GetTotalAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + return nil +} +// SetBillingPostalAddress sets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesCreditMemo) SetBillingPostalAddress(value PostalAddressTypeable)() { + m.billingPostalAddress = value +} +// SetBillToCustomerId sets the billToCustomerId property value. The billToCustomerId property +func (m *SalesCreditMemo) SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.billToCustomerId = value +} +// SetBillToCustomerNumber sets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesCreditMemo) SetBillToCustomerNumber(value *string)() { + m.billToCustomerNumber = value +} +// SetBillToName sets the billToName property value. The billToName property +func (m *SalesCreditMemo) SetBillToName(value *string)() { + m.billToName = value +} +// SetCreditMemoDate sets the creditMemoDate property value. The creditMemoDate property +func (m *SalesCreditMemo) SetCreditMemoDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.creditMemoDate = value +} +// SetCurrency sets the currency property value. The currency property +func (m *SalesCreditMemo) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *SalesCreditMemo) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *SalesCreditMemo) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetCustomer sets the customer property value. The customer property +func (m *SalesCreditMemo) SetCustomer(value Customerable)() { + m.customer = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *SalesCreditMemo) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetCustomerName sets the customerName property value. The customerName property +func (m *SalesCreditMemo) SetCustomerName(value *string)() { + m.customerName = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *SalesCreditMemo) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesCreditMemo) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesCreditMemo) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDueDate sets the dueDate property value. The dueDate property +func (m *SalesCreditMemo) SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.dueDate = value +} +// SetEmail sets the email property value. The email property +func (m *SalesCreditMemo) SetEmail(value *string)() { + m.email = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesCreditMemo) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetInvoiceId sets the invoiceId property value. The invoiceId property +func (m *SalesCreditMemo) SetInvoiceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.invoiceId = value +} +// SetInvoiceNumber sets the invoiceNumber property value. The invoiceNumber property +func (m *SalesCreditMemo) SetInvoiceNumber(value *string)() { + m.invoiceNumber = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesCreditMemo) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *SalesCreditMemo) SetNumber(value *string)() { + m.number = value +} +// SetPaymentTerm sets the paymentTerm property value. The paymentTerm property +func (m *SalesCreditMemo) SetPaymentTerm(value PaymentTermable)() { + m.paymentTerm = value +} +// SetPaymentTermsId sets the paymentTermsId property value. The paymentTermsId property +func (m *SalesCreditMemo) SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentTermsId = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *SalesCreditMemo) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPricesIncludeTax sets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesCreditMemo) SetPricesIncludeTax(value *bool)() { + m.pricesIncludeTax = value +} +// SetSalesCreditMemoLines sets the salesCreditMemoLines property value. The salesCreditMemoLines property +func (m *SalesCreditMemo) SetSalesCreditMemoLines(value []SalesCreditMemoLineable)() { + m.salesCreditMemoLines = value +} +// SetSalesperson sets the salesperson property value. The salesperson property +func (m *SalesCreditMemo) SetSalesperson(value *string)() { + m.salesperson = value +} +// SetSellingPostalAddress sets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesCreditMemo) SetSellingPostalAddress(value PostalAddressTypeable)() { + m.sellingPostalAddress = value +} +// SetStatus sets the status property value. The status property +func (m *SalesCreditMemo) SetStatus(value *string)() { + m.status = value +} +// SetTotalAmountExcludingTax sets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesCreditMemo) SetTotalAmountExcludingTax(value *float64)() { + m.totalAmountExcludingTax = value +} +// SetTotalAmountIncludingTax sets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesCreditMemo) SetTotalAmountIncludingTax(value *float64)() { + m.totalAmountIncludingTax = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesCreditMemo) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_response.go new file mode 100644 index 000000000..3bdef908f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoCollectionResponse +type SalesCreditMemoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesCreditMemoable +} +// NewSalesCreditMemoCollectionResponse instantiates a new SalesCreditMemoCollectionResponse and sets the default values. +func NewSalesCreditMemoCollectionResponse()(*SalesCreditMemoCollectionResponse) { + m := &SalesCreditMemoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesCreditMemoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesCreditMemoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesCreditMemoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesCreditMemoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesCreditMemoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesCreditMemoable, len(val)) + for i, v := range val { + res[i] = v.(SalesCreditMemoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesCreditMemoCollectionResponse) GetValue()([]SalesCreditMemoable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesCreditMemoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesCreditMemoCollectionResponse) SetValue(value []SalesCreditMemoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_responseable.go new file mode 100644 index 000000000..2c206cb05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoCollectionResponseable +type SalesCreditMemoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesCreditMemoable) + SetValue(value []SalesCreditMemoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_line.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line.go new file mode 100644 index 000000000..d858e14be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line.go @@ -0,0 +1,659 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesCreditMemoLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The amountExcludingTax property + amountExcludingTax *float64 + // The amountIncludingTax property + amountIncludingTax *float64 + // The description property + description *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The discountPercent property + discountPercent *float64 + // The documentId property + documentId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The invoiceDiscountAllocation property + invoiceDiscountAllocation *float64 + // The item property + item Itemable + // The itemId property + itemId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lineType property + lineType *string + // The netAmount property + netAmount *float64 + // The netAmountIncludingTax property + netAmountIncludingTax *float64 + // The netTaxAmount property + netTaxAmount *float64 + // The quantity property + quantity *float64 + // The sequence property + sequence *int32 + // The shipmentDate property + shipmentDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The taxCode property + taxCode *string + // The taxPercent property + taxPercent *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The unitOfMeasureId property + unitOfMeasureId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unitPrice property + unitPrice *float64 +} +// NewSalesCreditMemoLine instantiates a new salesCreditMemoLine and sets the default values. +func NewSalesCreditMemoLine()(*SalesCreditMemoLine) { + m := &SalesCreditMemoLine{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesCreditMemoLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesCreditMemoLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesCreditMemoLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *SalesCreditMemoLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *SalesCreditMemoLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAmountExcludingTax gets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesCreditMemoLine) GetAmountExcludingTax()(*float64) { + return m.amountExcludingTax +} +// GetAmountIncludingTax gets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesCreditMemoLine) GetAmountIncludingTax()(*float64) { + return m.amountIncludingTax +} +// GetDescription gets the description property value. The description property +func (m *SalesCreditMemoLine) GetDescription()(*string) { + return m.description +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesCreditMemoLine) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesCreditMemoLine) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *SalesCreditMemoLine) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDocumentId gets the documentId property value. The documentId property +func (m *SalesCreditMemoLine) GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.documentId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesCreditMemoLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["amountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountExcludingTax(val) + } + return nil + } + res["amountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountIncludingTax(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["documentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["invoiceDiscountAllocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDiscountAllocation(val) + } + return nil + } + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(Itemable)) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["lineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLineType(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["netAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmountIncludingTax(val) + } + return nil + } + res["netTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetTaxAmount(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["shipmentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentDate(val) + } + return nil + } + res["taxCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxCode(val) + } + return nil + } + res["taxPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTaxPercent(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["unitOfMeasureId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitOfMeasureId(val) + } + return nil + } + res["unitPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitPrice(val) + } + return nil + } + return res +} +// GetInvoiceDiscountAllocation gets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesCreditMemoLine) GetInvoiceDiscountAllocation()(*float64) { + return m.invoiceDiscountAllocation +} +// GetItem gets the item property value. The item property +func (m *SalesCreditMemoLine) GetItem()(Itemable) { + return m.item +} +// GetItemId gets the itemId property value. The itemId property +func (m *SalesCreditMemoLine) GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemId +} +// GetLineType gets the lineType property value. The lineType property +func (m *SalesCreditMemoLine) GetLineType()(*string) { + return m.lineType +} +// GetNetAmount gets the netAmount property value. The netAmount property +func (m *SalesCreditMemoLine) GetNetAmount()(*float64) { + return m.netAmount +} +// GetNetAmountIncludingTax gets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesCreditMemoLine) GetNetAmountIncludingTax()(*float64) { + return m.netAmountIncludingTax +} +// GetNetTaxAmount gets the netTaxAmount property value. The netTaxAmount property +func (m *SalesCreditMemoLine) GetNetTaxAmount()(*float64) { + return m.netTaxAmount +} +// GetQuantity gets the quantity property value. The quantity property +func (m *SalesCreditMemoLine) GetQuantity()(*float64) { + return m.quantity +} +// GetSequence gets the sequence property value. The sequence property +func (m *SalesCreditMemoLine) GetSequence()(*int32) { + return m.sequence +} +// GetShipmentDate gets the shipmentDate property value. The shipmentDate property +func (m *SalesCreditMemoLine) GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.shipmentDate +} +// GetTaxCode gets the taxCode property value. The taxCode property +func (m *SalesCreditMemoLine) GetTaxCode()(*string) { + return m.taxCode +} +// GetTaxPercent gets the taxPercent property value. The taxPercent property +func (m *SalesCreditMemoLine) GetTaxPercent()(*float64) { + return m.taxPercent +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesCreditMemoLine) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetUnitOfMeasureId gets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesCreditMemoLine) GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.unitOfMeasureId +} +// GetUnitPrice gets the unitPrice property value. The unitPrice property +func (m *SalesCreditMemoLine) GetUnitPrice()(*float64) { + return m.unitPrice +} +// Serialize serializes information the current object +func (m *SalesCreditMemoLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountExcludingTax", m.GetAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountIncludingTax", m.GetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("documentId", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceDiscountAllocation", m.GetInvoiceDiscountAllocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lineType", m.GetLineType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmountIncludingTax", m.GetNetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netTaxAmount", m.GetNetTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("shipmentDate", m.GetShipmentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxCode", m.GetTaxCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("taxPercent", m.GetTaxPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("unitOfMeasureId", m.GetUnitOfMeasureId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitPrice", m.GetUnitPrice()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *SalesCreditMemoLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *SalesCreditMemoLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAmountExcludingTax sets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesCreditMemoLine) SetAmountExcludingTax(value *float64)() { + m.amountExcludingTax = value +} +// SetAmountIncludingTax sets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesCreditMemoLine) SetAmountIncludingTax(value *float64)() { + m.amountIncludingTax = value +} +// SetDescription sets the description property value. The description property +func (m *SalesCreditMemoLine) SetDescription(value *string)() { + m.description = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesCreditMemoLine) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesCreditMemoLine) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *SalesCreditMemoLine) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDocumentId sets the documentId property value. The documentId property +func (m *SalesCreditMemoLine) SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.documentId = value +} +// SetInvoiceDiscountAllocation sets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesCreditMemoLine) SetInvoiceDiscountAllocation(value *float64)() { + m.invoiceDiscountAllocation = value +} +// SetItem sets the item property value. The item property +func (m *SalesCreditMemoLine) SetItem(value Itemable)() { + m.item = value +} +// SetItemId sets the itemId property value. The itemId property +func (m *SalesCreditMemoLine) SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemId = value +} +// SetLineType sets the lineType property value. The lineType property +func (m *SalesCreditMemoLine) SetLineType(value *string)() { + m.lineType = value +} +// SetNetAmount sets the netAmount property value. The netAmount property +func (m *SalesCreditMemoLine) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetNetAmountIncludingTax sets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesCreditMemoLine) SetNetAmountIncludingTax(value *float64)() { + m.netAmountIncludingTax = value +} +// SetNetTaxAmount sets the netTaxAmount property value. The netTaxAmount property +func (m *SalesCreditMemoLine) SetNetTaxAmount(value *float64)() { + m.netTaxAmount = value +} +// SetQuantity sets the quantity property value. The quantity property +func (m *SalesCreditMemoLine) SetQuantity(value *float64)() { + m.quantity = value +} +// SetSequence sets the sequence property value. The sequence property +func (m *SalesCreditMemoLine) SetSequence(value *int32)() { + m.sequence = value +} +// SetShipmentDate sets the shipmentDate property value. The shipmentDate property +func (m *SalesCreditMemoLine) SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.shipmentDate = value +} +// SetTaxCode sets the taxCode property value. The taxCode property +func (m *SalesCreditMemoLine) SetTaxCode(value *string)() { + m.taxCode = value +} +// SetTaxPercent sets the taxPercent property value. The taxPercent property +func (m *SalesCreditMemoLine) SetTaxPercent(value *float64)() { + m.taxPercent = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesCreditMemoLine) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetUnitOfMeasureId sets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesCreditMemoLine) SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.unitOfMeasureId = value +} +// SetUnitPrice sets the unitPrice property value. The unitPrice property +func (m *SalesCreditMemoLine) SetUnitPrice(value *float64)() { + m.unitPrice = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_response.go new file mode 100644 index 000000000..0c7e5b71e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoLineCollectionResponse +type SalesCreditMemoLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesCreditMemoLineable +} +// NewSalesCreditMemoLineCollectionResponse instantiates a new SalesCreditMemoLineCollectionResponse and sets the default values. +func NewSalesCreditMemoLineCollectionResponse()(*SalesCreditMemoLineCollectionResponse) { + m := &SalesCreditMemoLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesCreditMemoLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesCreditMemoLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesCreditMemoLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesCreditMemoLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesCreditMemoLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesCreditMemoLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesCreditMemoLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesCreditMemoLineCollectionResponse) GetValue()([]SalesCreditMemoLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesCreditMemoLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesCreditMemoLineCollectionResponse) SetValue(value []SalesCreditMemoLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_responseable.go new file mode 100644 index 000000000..bedf0c4b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoLineCollectionResponseable +type SalesCreditMemoLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesCreditMemoLineable) + SetValue(value []SalesCreditMemoLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memo_lineable.go b/src/internal/connector/graph/betasdk/models/sales_credit_memo_lineable.go new file mode 100644 index 000000000..b628d7e0a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memo_lineable.go @@ -0,0 +1,60 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoLineable +type SalesCreditMemoLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAmountExcludingTax()(*float64) + GetAmountIncludingTax()(*float64) + GetDescription()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDiscountPercent()(*float64) + GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetInvoiceDiscountAllocation()(*float64) + GetItem()(Itemable) + GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLineType()(*string) + GetNetAmount()(*float64) + GetNetAmountIncludingTax()(*float64) + GetNetTaxAmount()(*float64) + GetQuantity()(*float64) + GetSequence()(*int32) + GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTaxCode()(*string) + GetTaxPercent()(*float64) + GetTotalTaxAmount()(*float64) + GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetUnitPrice()(*float64) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAmountExcludingTax(value *float64)() + SetAmountIncludingTax(value *float64)() + SetDescription(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDiscountPercent(value *float64)() + SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetInvoiceDiscountAllocation(value *float64)() + SetItem(value Itemable)() + SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLineType(value *string)() + SetNetAmount(value *float64)() + SetNetAmountIncludingTax(value *float64)() + SetNetTaxAmount(value *float64)() + SetQuantity(value *float64)() + SetSequence(value *int32)() + SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTaxCode(value *string)() + SetTaxPercent(value *float64)() + SetTotalTaxAmount(value *float64)() + SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetUnitPrice(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_credit_memoable.go b/src/internal/connector/graph/betasdk/models/sales_credit_memoable.go new file mode 100644 index 000000000..758c81516 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_credit_memoable.go @@ -0,0 +1,77 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesCreditMemoable +type SalesCreditMemoable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillingPostalAddress()(PostalAddressTypeable) + GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBillToCustomerNumber()(*string) + GetBillToName()(*string) + GetCreditMemoDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomer()(Customerable) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomerName()(*string) + GetCustomerNumber()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetEmail()(*string) + GetExternalDocumentNumber()(*string) + GetInvoiceId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetInvoiceNumber()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetPricesIncludeTax()(*bool) + GetSalesCreditMemoLines()([]SalesCreditMemoLineable) + GetSalesperson()(*string) + GetSellingPostalAddress()(PostalAddressTypeable) + GetStatus()(*string) + GetTotalAmountExcludingTax()(*float64) + GetTotalAmountIncludingTax()(*float64) + GetTotalTaxAmount()(*float64) + SetBillingPostalAddress(value PostalAddressTypeable)() + SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBillToCustomerNumber(value *string)() + SetBillToName(value *string)() + SetCreditMemoDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomer(value Customerable)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomerName(value *string)() + SetCustomerNumber(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetEmail(value *string)() + SetExternalDocumentNumber(value *string)() + SetInvoiceId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetInvoiceNumber(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetPricesIncludeTax(value *bool)() + SetSalesCreditMemoLines(value []SalesCreditMemoLineable)() + SetSalesperson(value *string)() + SetSellingPostalAddress(value PostalAddressTypeable)() + SetStatus(value *string)() + SetTotalAmountExcludingTax(value *float64)() + SetTotalAmountIncludingTax(value *float64)() + SetTotalTaxAmount(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice.go b/src/internal/connector/graph/betasdk/models/sales_invoice.go new file mode 100644 index 000000000..e1119e942 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice.go @@ -0,0 +1,1032 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoice provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesInvoice struct { + Entity + // The billingPostalAddress property + billingPostalAddress PostalAddressTypeable + // The billToCustomerId property + billToCustomerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The billToCustomerNumber property + billToCustomerNumber *string + // The billToName property + billToName *string + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customer property + customer Customerable + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customerName property + customerName *string + // The customerNumber property + customerNumber *string + // The customerPurchaseOrderReference property + customerPurchaseOrderReference *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The dueDate property + dueDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The email property + email *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The invoiceDate property + invoiceDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The orderId property + orderId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The orderNumber property + orderNumber *string + // The paymentTerm property + paymentTerm PaymentTermable + // The paymentTermsId property + paymentTermsId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The phoneNumber property + phoneNumber *string + // The pricesIncludeTax property + pricesIncludeTax *bool + // The salesInvoiceLines property + salesInvoiceLines []SalesInvoiceLineable + // The salesperson property + salesperson *string + // The sellingPostalAddress property + sellingPostalAddress PostalAddressTypeable + // The shipmentMethod property + shipmentMethod ShipmentMethodable + // The shipmentMethodId property + shipmentMethodId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The shippingPostalAddress property + shippingPostalAddress PostalAddressTypeable + // The shipToContact property + shipToContact *string + // The shipToName property + shipToName *string + // The status property + status *string + // The totalAmountExcludingTax property + totalAmountExcludingTax *float64 + // The totalAmountIncludingTax property + totalAmountIncludingTax *float64 + // The totalTaxAmount property + totalTaxAmount *float64 +} +// NewSalesInvoice instantiates a new salesInvoice and sets the default values. +func NewSalesInvoice()(*SalesInvoice) { + m := &SalesInvoice{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesInvoiceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesInvoiceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesInvoice(), nil +} +// GetBillingPostalAddress gets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesInvoice) GetBillingPostalAddress()(PostalAddressTypeable) { + return m.billingPostalAddress +} +// GetBillToCustomerId gets the billToCustomerId property value. The billToCustomerId property +func (m *SalesInvoice) GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.billToCustomerId +} +// GetBillToCustomerNumber gets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesInvoice) GetBillToCustomerNumber()(*string) { + return m.billToCustomerNumber +} +// GetBillToName gets the billToName property value. The billToName property +func (m *SalesInvoice) GetBillToName()(*string) { + return m.billToName +} +// GetCurrency gets the currency property value. The currency property +func (m *SalesInvoice) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *SalesInvoice) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *SalesInvoice) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetCustomer gets the customer property value. The customer property +func (m *SalesInvoice) GetCustomer()(Customerable) { + return m.customer +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *SalesInvoice) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetCustomerName gets the customerName property value. The customerName property +func (m *SalesInvoice) GetCustomerName()(*string) { + return m.customerName +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *SalesInvoice) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetCustomerPurchaseOrderReference gets the customerPurchaseOrderReference property value. The customerPurchaseOrderReference property +func (m *SalesInvoice) GetCustomerPurchaseOrderReference()(*string) { + return m.customerPurchaseOrderReference +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesInvoice) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesInvoice) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDueDate gets the dueDate property value. The dueDate property +func (m *SalesInvoice) GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.dueDate +} +// GetEmail gets the email property value. The email property +func (m *SalesInvoice) GetEmail()(*string) { + return m.email +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesInvoice) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesInvoice) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["billingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["billToCustomerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerId(val) + } + return nil + } + res["billToCustomerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerNumber(val) + } + return nil + } + res["billToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToName(val) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(Customerable)) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["customerPurchaseOrderReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerPurchaseOrderReference(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["dueDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["invoiceDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDate(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["orderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderId(val) + } + return nil + } + res["orderNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderNumber(val) + } + return nil + } + res["paymentTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentTerm(val.(PaymentTermable)) + } + return nil + } + res["paymentTermsId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentTermsId(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["pricesIncludeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPricesIncludeTax(val) + } + return nil + } + res["salesInvoiceLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesInvoiceLineable) + } + m.SetSalesInvoiceLines(res) + } + return nil + } + res["salesperson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSalesperson(val) + } + return nil + } + res["sellingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSellingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shipmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateShipmentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethod(val.(ShipmentMethodable)) + } + return nil + } + res["shipmentMethodId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethodId(val) + } + return nil + } + res["shippingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShippingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shipToContact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToContact(val) + } + return nil + } + res["shipToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["totalAmountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountExcludingTax(val) + } + return nil + } + res["totalAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountIncludingTax(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + return res +} +// GetInvoiceDate gets the invoiceDate property value. The invoiceDate property +func (m *SalesInvoice) GetInvoiceDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.invoiceDate +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesInvoice) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *SalesInvoice) GetNumber()(*string) { + return m.number +} +// GetOrderId gets the orderId property value. The orderId property +func (m *SalesInvoice) GetOrderId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.orderId +} +// GetOrderNumber gets the orderNumber property value. The orderNumber property +func (m *SalesInvoice) GetOrderNumber()(*string) { + return m.orderNumber +} +// GetPaymentTerm gets the paymentTerm property value. The paymentTerm property +func (m *SalesInvoice) GetPaymentTerm()(PaymentTermable) { + return m.paymentTerm +} +// GetPaymentTermsId gets the paymentTermsId property value. The paymentTermsId property +func (m *SalesInvoice) GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentTermsId +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *SalesInvoice) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPricesIncludeTax gets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesInvoice) GetPricesIncludeTax()(*bool) { + return m.pricesIncludeTax +} +// GetSalesInvoiceLines gets the salesInvoiceLines property value. The salesInvoiceLines property +func (m *SalesInvoice) GetSalesInvoiceLines()([]SalesInvoiceLineable) { + return m.salesInvoiceLines +} +// GetSalesperson gets the salesperson property value. The salesperson property +func (m *SalesInvoice) GetSalesperson()(*string) { + return m.salesperson +} +// GetSellingPostalAddress gets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesInvoice) GetSellingPostalAddress()(PostalAddressTypeable) { + return m.sellingPostalAddress +} +// GetShipmentMethod gets the shipmentMethod property value. The shipmentMethod property +func (m *SalesInvoice) GetShipmentMethod()(ShipmentMethodable) { + return m.shipmentMethod +} +// GetShipmentMethodId gets the shipmentMethodId property value. The shipmentMethodId property +func (m *SalesInvoice) GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.shipmentMethodId +} +// GetShippingPostalAddress gets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesInvoice) GetShippingPostalAddress()(PostalAddressTypeable) { + return m.shippingPostalAddress +} +// GetShipToContact gets the shipToContact property value. The shipToContact property +func (m *SalesInvoice) GetShipToContact()(*string) { + return m.shipToContact +} +// GetShipToName gets the shipToName property value. The shipToName property +func (m *SalesInvoice) GetShipToName()(*string) { + return m.shipToName +} +// GetStatus gets the status property value. The status property +func (m *SalesInvoice) GetStatus()(*string) { + return m.status +} +// GetTotalAmountExcludingTax gets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesInvoice) GetTotalAmountExcludingTax()(*float64) { + return m.totalAmountExcludingTax +} +// GetTotalAmountIncludingTax gets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesInvoice) GetTotalAmountIncludingTax()(*float64) { + return m.totalAmountIncludingTax +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesInvoice) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// Serialize serializes information the current object +func (m *SalesInvoice) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("billingPostalAddress", m.GetBillingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("billToCustomerId", m.GetBillToCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToCustomerNumber", m.GetBillToCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToName", m.GetBillToName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerPurchaseOrderReference", m.GetCustomerPurchaseOrderReference()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("dueDate", m.GetDueDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("invoiceDate", m.GetInvoiceDate()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("orderId", m.GetOrderId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("orderNumber", m.GetOrderNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentTerm", m.GetPaymentTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentTermsId", m.GetPaymentTermsId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pricesIncludeTax", m.GetPricesIncludeTax()) + if err != nil { + return err + } + } + if m.GetSalesInvoiceLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesInvoiceLines())) + for i, v := range m.GetSalesInvoiceLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesInvoiceLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("salesperson", m.GetSalesperson()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sellingPostalAddress", m.GetSellingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shipmentMethod", m.GetShipmentMethod()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("shipmentMethodId", m.GetShipmentMethodId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shippingPostalAddress", m.GetShippingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToContact", m.GetShipToContact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToName", m.GetShipToName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountExcludingTax", m.GetTotalAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountIncludingTax", m.GetTotalAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + return nil +} +// SetBillingPostalAddress sets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesInvoice) SetBillingPostalAddress(value PostalAddressTypeable)() { + m.billingPostalAddress = value +} +// SetBillToCustomerId sets the billToCustomerId property value. The billToCustomerId property +func (m *SalesInvoice) SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.billToCustomerId = value +} +// SetBillToCustomerNumber sets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesInvoice) SetBillToCustomerNumber(value *string)() { + m.billToCustomerNumber = value +} +// SetBillToName sets the billToName property value. The billToName property +func (m *SalesInvoice) SetBillToName(value *string)() { + m.billToName = value +} +// SetCurrency sets the currency property value. The currency property +func (m *SalesInvoice) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *SalesInvoice) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *SalesInvoice) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetCustomer sets the customer property value. The customer property +func (m *SalesInvoice) SetCustomer(value Customerable)() { + m.customer = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *SalesInvoice) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetCustomerName sets the customerName property value. The customerName property +func (m *SalesInvoice) SetCustomerName(value *string)() { + m.customerName = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *SalesInvoice) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetCustomerPurchaseOrderReference sets the customerPurchaseOrderReference property value. The customerPurchaseOrderReference property +func (m *SalesInvoice) SetCustomerPurchaseOrderReference(value *string)() { + m.customerPurchaseOrderReference = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesInvoice) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesInvoice) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDueDate sets the dueDate property value. The dueDate property +func (m *SalesInvoice) SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.dueDate = value +} +// SetEmail sets the email property value. The email property +func (m *SalesInvoice) SetEmail(value *string)() { + m.email = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesInvoice) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetInvoiceDate sets the invoiceDate property value. The invoiceDate property +func (m *SalesInvoice) SetInvoiceDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.invoiceDate = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesInvoice) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *SalesInvoice) SetNumber(value *string)() { + m.number = value +} +// SetOrderId sets the orderId property value. The orderId property +func (m *SalesInvoice) SetOrderId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.orderId = value +} +// SetOrderNumber sets the orderNumber property value. The orderNumber property +func (m *SalesInvoice) SetOrderNumber(value *string)() { + m.orderNumber = value +} +// SetPaymentTerm sets the paymentTerm property value. The paymentTerm property +func (m *SalesInvoice) SetPaymentTerm(value PaymentTermable)() { + m.paymentTerm = value +} +// SetPaymentTermsId sets the paymentTermsId property value. The paymentTermsId property +func (m *SalesInvoice) SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentTermsId = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *SalesInvoice) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPricesIncludeTax sets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesInvoice) SetPricesIncludeTax(value *bool)() { + m.pricesIncludeTax = value +} +// SetSalesInvoiceLines sets the salesInvoiceLines property value. The salesInvoiceLines property +func (m *SalesInvoice) SetSalesInvoiceLines(value []SalesInvoiceLineable)() { + m.salesInvoiceLines = value +} +// SetSalesperson sets the salesperson property value. The salesperson property +func (m *SalesInvoice) SetSalesperson(value *string)() { + m.salesperson = value +} +// SetSellingPostalAddress sets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesInvoice) SetSellingPostalAddress(value PostalAddressTypeable)() { + m.sellingPostalAddress = value +} +// SetShipmentMethod sets the shipmentMethod property value. The shipmentMethod property +func (m *SalesInvoice) SetShipmentMethod(value ShipmentMethodable)() { + m.shipmentMethod = value +} +// SetShipmentMethodId sets the shipmentMethodId property value. The shipmentMethodId property +func (m *SalesInvoice) SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.shipmentMethodId = value +} +// SetShippingPostalAddress sets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesInvoice) SetShippingPostalAddress(value PostalAddressTypeable)() { + m.shippingPostalAddress = value +} +// SetShipToContact sets the shipToContact property value. The shipToContact property +func (m *SalesInvoice) SetShipToContact(value *string)() { + m.shipToContact = value +} +// SetShipToName sets the shipToName property value. The shipToName property +func (m *SalesInvoice) SetShipToName(value *string)() { + m.shipToName = value +} +// SetStatus sets the status property value. The status property +func (m *SalesInvoice) SetStatus(value *string)() { + m.status = value +} +// SetTotalAmountExcludingTax sets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesInvoice) SetTotalAmountExcludingTax(value *float64)() { + m.totalAmountExcludingTax = value +} +// SetTotalAmountIncludingTax sets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesInvoice) SetTotalAmountIncludingTax(value *float64)() { + m.totalAmountIncludingTax = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesInvoice) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_invoice_collection_response.go new file mode 100644 index 000000000..3c3b00102 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceCollectionResponse +type SalesInvoiceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesInvoiceable +} +// NewSalesInvoiceCollectionResponse instantiates a new SalesInvoiceCollectionResponse and sets the default values. +func NewSalesInvoiceCollectionResponse()(*SalesInvoiceCollectionResponse) { + m := &SalesInvoiceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesInvoiceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesInvoiceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesInvoiceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesInvoiceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesInvoiceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesInvoiceable, len(val)) + for i, v := range val { + res[i] = v.(SalesInvoiceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesInvoiceCollectionResponse) GetValue()([]SalesInvoiceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesInvoiceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesInvoiceCollectionResponse) SetValue(value []SalesInvoiceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_invoice_collection_responseable.go new file mode 100644 index 000000000..2b9c5c416 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceCollectionResponseable +type SalesInvoiceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesInvoiceable) + SetValue(value []SalesInvoiceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_line.go b/src/internal/connector/graph/betasdk/models/sales_invoice_line.go new file mode 100644 index 000000000..0ffbd3250 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_line.go @@ -0,0 +1,659 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesInvoiceLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The amountExcludingTax property + amountExcludingTax *float64 + // The amountIncludingTax property + amountIncludingTax *float64 + // The description property + description *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The discountPercent property + discountPercent *float64 + // The documentId property + documentId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The invoiceDiscountAllocation property + invoiceDiscountAllocation *float64 + // The item property + item Itemable + // The itemId property + itemId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lineType property + lineType *string + // The netAmount property + netAmount *float64 + // The netAmountIncludingTax property + netAmountIncludingTax *float64 + // The netTaxAmount property + netTaxAmount *float64 + // The quantity property + quantity *float64 + // The sequence property + sequence *int32 + // The shipmentDate property + shipmentDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The taxCode property + taxCode *string + // The taxPercent property + taxPercent *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The unitOfMeasureId property + unitOfMeasureId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unitPrice property + unitPrice *float64 +} +// NewSalesInvoiceLine instantiates a new salesInvoiceLine and sets the default values. +func NewSalesInvoiceLine()(*SalesInvoiceLine) { + m := &SalesInvoiceLine{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesInvoiceLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesInvoiceLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesInvoiceLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *SalesInvoiceLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *SalesInvoiceLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAmountExcludingTax gets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesInvoiceLine) GetAmountExcludingTax()(*float64) { + return m.amountExcludingTax +} +// GetAmountIncludingTax gets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesInvoiceLine) GetAmountIncludingTax()(*float64) { + return m.amountIncludingTax +} +// GetDescription gets the description property value. The description property +func (m *SalesInvoiceLine) GetDescription()(*string) { + return m.description +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesInvoiceLine) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesInvoiceLine) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *SalesInvoiceLine) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDocumentId gets the documentId property value. The documentId property +func (m *SalesInvoiceLine) GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.documentId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesInvoiceLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["amountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountExcludingTax(val) + } + return nil + } + res["amountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountIncludingTax(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["documentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["invoiceDiscountAllocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDiscountAllocation(val) + } + return nil + } + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(Itemable)) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["lineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLineType(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["netAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmountIncludingTax(val) + } + return nil + } + res["netTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetTaxAmount(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["shipmentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentDate(val) + } + return nil + } + res["taxCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxCode(val) + } + return nil + } + res["taxPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTaxPercent(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["unitOfMeasureId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitOfMeasureId(val) + } + return nil + } + res["unitPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitPrice(val) + } + return nil + } + return res +} +// GetInvoiceDiscountAllocation gets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesInvoiceLine) GetInvoiceDiscountAllocation()(*float64) { + return m.invoiceDiscountAllocation +} +// GetItem gets the item property value. The item property +func (m *SalesInvoiceLine) GetItem()(Itemable) { + return m.item +} +// GetItemId gets the itemId property value. The itemId property +func (m *SalesInvoiceLine) GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemId +} +// GetLineType gets the lineType property value. The lineType property +func (m *SalesInvoiceLine) GetLineType()(*string) { + return m.lineType +} +// GetNetAmount gets the netAmount property value. The netAmount property +func (m *SalesInvoiceLine) GetNetAmount()(*float64) { + return m.netAmount +} +// GetNetAmountIncludingTax gets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesInvoiceLine) GetNetAmountIncludingTax()(*float64) { + return m.netAmountIncludingTax +} +// GetNetTaxAmount gets the netTaxAmount property value. The netTaxAmount property +func (m *SalesInvoiceLine) GetNetTaxAmount()(*float64) { + return m.netTaxAmount +} +// GetQuantity gets the quantity property value. The quantity property +func (m *SalesInvoiceLine) GetQuantity()(*float64) { + return m.quantity +} +// GetSequence gets the sequence property value. The sequence property +func (m *SalesInvoiceLine) GetSequence()(*int32) { + return m.sequence +} +// GetShipmentDate gets the shipmentDate property value. The shipmentDate property +func (m *SalesInvoiceLine) GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.shipmentDate +} +// GetTaxCode gets the taxCode property value. The taxCode property +func (m *SalesInvoiceLine) GetTaxCode()(*string) { + return m.taxCode +} +// GetTaxPercent gets the taxPercent property value. The taxPercent property +func (m *SalesInvoiceLine) GetTaxPercent()(*float64) { + return m.taxPercent +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesInvoiceLine) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetUnitOfMeasureId gets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesInvoiceLine) GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.unitOfMeasureId +} +// GetUnitPrice gets the unitPrice property value. The unitPrice property +func (m *SalesInvoiceLine) GetUnitPrice()(*float64) { + return m.unitPrice +} +// Serialize serializes information the current object +func (m *SalesInvoiceLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountExcludingTax", m.GetAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountIncludingTax", m.GetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("documentId", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceDiscountAllocation", m.GetInvoiceDiscountAllocation()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lineType", m.GetLineType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmountIncludingTax", m.GetNetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netTaxAmount", m.GetNetTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("shipmentDate", m.GetShipmentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxCode", m.GetTaxCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("taxPercent", m.GetTaxPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("unitOfMeasureId", m.GetUnitOfMeasureId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitPrice", m.GetUnitPrice()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *SalesInvoiceLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *SalesInvoiceLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAmountExcludingTax sets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesInvoiceLine) SetAmountExcludingTax(value *float64)() { + m.amountExcludingTax = value +} +// SetAmountIncludingTax sets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesInvoiceLine) SetAmountIncludingTax(value *float64)() { + m.amountIncludingTax = value +} +// SetDescription sets the description property value. The description property +func (m *SalesInvoiceLine) SetDescription(value *string)() { + m.description = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesInvoiceLine) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesInvoiceLine) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *SalesInvoiceLine) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDocumentId sets the documentId property value. The documentId property +func (m *SalesInvoiceLine) SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.documentId = value +} +// SetInvoiceDiscountAllocation sets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesInvoiceLine) SetInvoiceDiscountAllocation(value *float64)() { + m.invoiceDiscountAllocation = value +} +// SetItem sets the item property value. The item property +func (m *SalesInvoiceLine) SetItem(value Itemable)() { + m.item = value +} +// SetItemId sets the itemId property value. The itemId property +func (m *SalesInvoiceLine) SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemId = value +} +// SetLineType sets the lineType property value. The lineType property +func (m *SalesInvoiceLine) SetLineType(value *string)() { + m.lineType = value +} +// SetNetAmount sets the netAmount property value. The netAmount property +func (m *SalesInvoiceLine) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetNetAmountIncludingTax sets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesInvoiceLine) SetNetAmountIncludingTax(value *float64)() { + m.netAmountIncludingTax = value +} +// SetNetTaxAmount sets the netTaxAmount property value. The netTaxAmount property +func (m *SalesInvoiceLine) SetNetTaxAmount(value *float64)() { + m.netTaxAmount = value +} +// SetQuantity sets the quantity property value. The quantity property +func (m *SalesInvoiceLine) SetQuantity(value *float64)() { + m.quantity = value +} +// SetSequence sets the sequence property value. The sequence property +func (m *SalesInvoiceLine) SetSequence(value *int32)() { + m.sequence = value +} +// SetShipmentDate sets the shipmentDate property value. The shipmentDate property +func (m *SalesInvoiceLine) SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.shipmentDate = value +} +// SetTaxCode sets the taxCode property value. The taxCode property +func (m *SalesInvoiceLine) SetTaxCode(value *string)() { + m.taxCode = value +} +// SetTaxPercent sets the taxPercent property value. The taxPercent property +func (m *SalesInvoiceLine) SetTaxPercent(value *float64)() { + m.taxPercent = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesInvoiceLine) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetUnitOfMeasureId sets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesInvoiceLine) SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.unitOfMeasureId = value +} +// SetUnitPrice sets the unitPrice property value. The unitPrice property +func (m *SalesInvoiceLine) SetUnitPrice(value *float64)() { + m.unitPrice = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_response.go new file mode 100644 index 000000000..ea4a2dae3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceLineCollectionResponse +type SalesInvoiceLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesInvoiceLineable +} +// NewSalesInvoiceLineCollectionResponse instantiates a new SalesInvoiceLineCollectionResponse and sets the default values. +func NewSalesInvoiceLineCollectionResponse()(*SalesInvoiceLineCollectionResponse) { + m := &SalesInvoiceLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesInvoiceLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesInvoiceLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesInvoiceLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesInvoiceLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesInvoiceLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesInvoiceLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesInvoiceLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesInvoiceLineCollectionResponse) GetValue()([]SalesInvoiceLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesInvoiceLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesInvoiceLineCollectionResponse) SetValue(value []SalesInvoiceLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_responseable.go new file mode 100644 index 000000000..07f4fd6d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceLineCollectionResponseable +type SalesInvoiceLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesInvoiceLineable) + SetValue(value []SalesInvoiceLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoice_lineable.go b/src/internal/connector/graph/betasdk/models/sales_invoice_lineable.go new file mode 100644 index 000000000..a326065e3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoice_lineable.go @@ -0,0 +1,60 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceLineable +type SalesInvoiceLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAmountExcludingTax()(*float64) + GetAmountIncludingTax()(*float64) + GetDescription()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDiscountPercent()(*float64) + GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetInvoiceDiscountAllocation()(*float64) + GetItem()(Itemable) + GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLineType()(*string) + GetNetAmount()(*float64) + GetNetAmountIncludingTax()(*float64) + GetNetTaxAmount()(*float64) + GetQuantity()(*float64) + GetSequence()(*int32) + GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetTaxCode()(*string) + GetTaxPercent()(*float64) + GetTotalTaxAmount()(*float64) + GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetUnitPrice()(*float64) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAmountExcludingTax(value *float64)() + SetAmountIncludingTax(value *float64)() + SetDescription(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDiscountPercent(value *float64)() + SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetInvoiceDiscountAllocation(value *float64)() + SetItem(value Itemable)() + SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLineType(value *string)() + SetNetAmount(value *float64)() + SetNetAmountIncludingTax(value *float64)() + SetNetTaxAmount(value *float64)() + SetQuantity(value *float64)() + SetSequence(value *int32)() + SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetTaxCode(value *string)() + SetTaxPercent(value *float64)() + SetTotalTaxAmount(value *float64)() + SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetUnitPrice(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_invoiceable.go b/src/internal/connector/graph/betasdk/models/sales_invoiceable.go new file mode 100644 index 000000000..402d09f2f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_invoiceable.go @@ -0,0 +1,89 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesInvoiceable +type SalesInvoiceable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillingPostalAddress()(PostalAddressTypeable) + GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBillToCustomerNumber()(*string) + GetBillToName()(*string) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomer()(Customerable) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomerName()(*string) + GetCustomerNumber()(*string) + GetCustomerPurchaseOrderReference()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetEmail()(*string) + GetExternalDocumentNumber()(*string) + GetInvoiceDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetOrderId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetOrderNumber()(*string) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetPricesIncludeTax()(*bool) + GetSalesInvoiceLines()([]SalesInvoiceLineable) + GetSalesperson()(*string) + GetSellingPostalAddress()(PostalAddressTypeable) + GetShipmentMethod()(ShipmentMethodable) + GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetShippingPostalAddress()(PostalAddressTypeable) + GetShipToContact()(*string) + GetShipToName()(*string) + GetStatus()(*string) + GetTotalAmountExcludingTax()(*float64) + GetTotalAmountIncludingTax()(*float64) + GetTotalTaxAmount()(*float64) + SetBillingPostalAddress(value PostalAddressTypeable)() + SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBillToCustomerNumber(value *string)() + SetBillToName(value *string)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomer(value Customerable)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomerName(value *string)() + SetCustomerNumber(value *string)() + SetCustomerPurchaseOrderReference(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetEmail(value *string)() + SetExternalDocumentNumber(value *string)() + SetInvoiceDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetOrderId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetOrderNumber(value *string)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetPricesIncludeTax(value *bool)() + SetSalesInvoiceLines(value []SalesInvoiceLineable)() + SetSalesperson(value *string)() + SetSellingPostalAddress(value PostalAddressTypeable)() + SetShipmentMethod(value ShipmentMethodable)() + SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetShippingPostalAddress(value PostalAddressTypeable)() + SetShipToContact(value *string)() + SetShipToName(value *string)() + SetStatus(value *string)() + SetTotalAmountExcludingTax(value *float64)() + SetTotalAmountIncludingTax(value *float64)() + SetTotalTaxAmount(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order.go b/src/internal/connector/graph/betasdk/models/sales_order.go new file mode 100644 index 000000000..ea983c695 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order.go @@ -0,0 +1,954 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrder provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesOrder struct { + Entity + // The billingPostalAddress property + billingPostalAddress PostalAddressTypeable + // The billToCustomerId property + billToCustomerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The billToCustomerNumber property + billToCustomerNumber *string + // The billToName property + billToName *string + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customer property + customer Customerable + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customerName property + customerName *string + // The customerNumber property + customerNumber *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The email property + email *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The fullyShipped property + fullyShipped *bool + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The orderDate property + orderDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The partialShipping property + partialShipping *bool + // The paymentTerm property + paymentTerm PaymentTermable + // The paymentTermsId property + paymentTermsId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The phoneNumber property + phoneNumber *string + // The pricesIncludeTax property + pricesIncludeTax *bool + // The requestedDeliveryDate property + requestedDeliveryDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The salesOrderLines property + salesOrderLines []SalesOrderLineable + // The salesperson property + salesperson *string + // The sellingPostalAddress property + sellingPostalAddress PostalAddressTypeable + // The shippingPostalAddress property + shippingPostalAddress PostalAddressTypeable + // The shipToContact property + shipToContact *string + // The shipToName property + shipToName *string + // The status property + status *string + // The totalAmountExcludingTax property + totalAmountExcludingTax *float64 + // The totalAmountIncludingTax property + totalAmountIncludingTax *float64 + // The totalTaxAmount property + totalTaxAmount *float64 +} +// NewSalesOrder instantiates a new salesOrder and sets the default values. +func NewSalesOrder()(*SalesOrder) { + m := &SalesOrder{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesOrderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesOrderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesOrder(), nil +} +// GetBillingPostalAddress gets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesOrder) GetBillingPostalAddress()(PostalAddressTypeable) { + return m.billingPostalAddress +} +// GetBillToCustomerId gets the billToCustomerId property value. The billToCustomerId property +func (m *SalesOrder) GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.billToCustomerId +} +// GetBillToCustomerNumber gets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesOrder) GetBillToCustomerNumber()(*string) { + return m.billToCustomerNumber +} +// GetBillToName gets the billToName property value. The billToName property +func (m *SalesOrder) GetBillToName()(*string) { + return m.billToName +} +// GetCurrency gets the currency property value. The currency property +func (m *SalesOrder) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *SalesOrder) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *SalesOrder) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetCustomer gets the customer property value. The customer property +func (m *SalesOrder) GetCustomer()(Customerable) { + return m.customer +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *SalesOrder) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetCustomerName gets the customerName property value. The customerName property +func (m *SalesOrder) GetCustomerName()(*string) { + return m.customerName +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *SalesOrder) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesOrder) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesOrder) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetEmail gets the email property value. The email property +func (m *SalesOrder) GetEmail()(*string) { + return m.email +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesOrder) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesOrder) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["billingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["billToCustomerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerId(val) + } + return nil + } + res["billToCustomerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerNumber(val) + } + return nil + } + res["billToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToName(val) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(Customerable)) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["fullyShipped"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetFullyShipped(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["orderDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetOrderDate(val) + } + return nil + } + res["partialShipping"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPartialShipping(val) + } + return nil + } + res["paymentTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentTerm(val.(PaymentTermable)) + } + return nil + } + res["paymentTermsId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentTermsId(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["pricesIncludeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetPricesIncludeTax(val) + } + return nil + } + res["requestedDeliveryDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestedDeliveryDate(val) + } + return nil + } + res["salesOrderLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesOrderLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesOrderLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesOrderLineable) + } + m.SetSalesOrderLines(res) + } + return nil + } + res["salesperson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSalesperson(val) + } + return nil + } + res["sellingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSellingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shippingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShippingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shipToContact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToContact(val) + } + return nil + } + res["shipToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["totalAmountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountExcludingTax(val) + } + return nil + } + res["totalAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountIncludingTax(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + return res +} +// GetFullyShipped gets the fullyShipped property value. The fullyShipped property +func (m *SalesOrder) GetFullyShipped()(*bool) { + return m.fullyShipped +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesOrder) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *SalesOrder) GetNumber()(*string) { + return m.number +} +// GetOrderDate gets the orderDate property value. The orderDate property +func (m *SalesOrder) GetOrderDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.orderDate +} +// GetPartialShipping gets the partialShipping property value. The partialShipping property +func (m *SalesOrder) GetPartialShipping()(*bool) { + return m.partialShipping +} +// GetPaymentTerm gets the paymentTerm property value. The paymentTerm property +func (m *SalesOrder) GetPaymentTerm()(PaymentTermable) { + return m.paymentTerm +} +// GetPaymentTermsId gets the paymentTermsId property value. The paymentTermsId property +func (m *SalesOrder) GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentTermsId +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *SalesOrder) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetPricesIncludeTax gets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesOrder) GetPricesIncludeTax()(*bool) { + return m.pricesIncludeTax +} +// GetRequestedDeliveryDate gets the requestedDeliveryDate property value. The requestedDeliveryDate property +func (m *SalesOrder) GetRequestedDeliveryDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.requestedDeliveryDate +} +// GetSalesOrderLines gets the salesOrderLines property value. The salesOrderLines property +func (m *SalesOrder) GetSalesOrderLines()([]SalesOrderLineable) { + return m.salesOrderLines +} +// GetSalesperson gets the salesperson property value. The salesperson property +func (m *SalesOrder) GetSalesperson()(*string) { + return m.salesperson +} +// GetSellingPostalAddress gets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesOrder) GetSellingPostalAddress()(PostalAddressTypeable) { + return m.sellingPostalAddress +} +// GetShippingPostalAddress gets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesOrder) GetShippingPostalAddress()(PostalAddressTypeable) { + return m.shippingPostalAddress +} +// GetShipToContact gets the shipToContact property value. The shipToContact property +func (m *SalesOrder) GetShipToContact()(*string) { + return m.shipToContact +} +// GetShipToName gets the shipToName property value. The shipToName property +func (m *SalesOrder) GetShipToName()(*string) { + return m.shipToName +} +// GetStatus gets the status property value. The status property +func (m *SalesOrder) GetStatus()(*string) { + return m.status +} +// GetTotalAmountExcludingTax gets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesOrder) GetTotalAmountExcludingTax()(*float64) { + return m.totalAmountExcludingTax +} +// GetTotalAmountIncludingTax gets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesOrder) GetTotalAmountIncludingTax()(*float64) { + return m.totalAmountIncludingTax +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesOrder) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// Serialize serializes information the current object +func (m *SalesOrder) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("billingPostalAddress", m.GetBillingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("billToCustomerId", m.GetBillToCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToCustomerNumber", m.GetBillToCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToName", m.GetBillToName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("fullyShipped", m.GetFullyShipped()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("orderDate", m.GetOrderDate()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("partialShipping", m.GetPartialShipping()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentTerm", m.GetPaymentTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentTermsId", m.GetPaymentTermsId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("pricesIncludeTax", m.GetPricesIncludeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("requestedDeliveryDate", m.GetRequestedDeliveryDate()) + if err != nil { + return err + } + } + if m.GetSalesOrderLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesOrderLines())) + for i, v := range m.GetSalesOrderLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesOrderLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("salesperson", m.GetSalesperson()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sellingPostalAddress", m.GetSellingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shippingPostalAddress", m.GetShippingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToContact", m.GetShipToContact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToName", m.GetShipToName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountExcludingTax", m.GetTotalAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountIncludingTax", m.GetTotalAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + return nil +} +// SetBillingPostalAddress sets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesOrder) SetBillingPostalAddress(value PostalAddressTypeable)() { + m.billingPostalAddress = value +} +// SetBillToCustomerId sets the billToCustomerId property value. The billToCustomerId property +func (m *SalesOrder) SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.billToCustomerId = value +} +// SetBillToCustomerNumber sets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesOrder) SetBillToCustomerNumber(value *string)() { + m.billToCustomerNumber = value +} +// SetBillToName sets the billToName property value. The billToName property +func (m *SalesOrder) SetBillToName(value *string)() { + m.billToName = value +} +// SetCurrency sets the currency property value. The currency property +func (m *SalesOrder) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *SalesOrder) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *SalesOrder) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetCustomer sets the customer property value. The customer property +func (m *SalesOrder) SetCustomer(value Customerable)() { + m.customer = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *SalesOrder) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetCustomerName sets the customerName property value. The customerName property +func (m *SalesOrder) SetCustomerName(value *string)() { + m.customerName = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *SalesOrder) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesOrder) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesOrder) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetEmail sets the email property value. The email property +func (m *SalesOrder) SetEmail(value *string)() { + m.email = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesOrder) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetFullyShipped sets the fullyShipped property value. The fullyShipped property +func (m *SalesOrder) SetFullyShipped(value *bool)() { + m.fullyShipped = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesOrder) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *SalesOrder) SetNumber(value *string)() { + m.number = value +} +// SetOrderDate sets the orderDate property value. The orderDate property +func (m *SalesOrder) SetOrderDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.orderDate = value +} +// SetPartialShipping sets the partialShipping property value. The partialShipping property +func (m *SalesOrder) SetPartialShipping(value *bool)() { + m.partialShipping = value +} +// SetPaymentTerm sets the paymentTerm property value. The paymentTerm property +func (m *SalesOrder) SetPaymentTerm(value PaymentTermable)() { + m.paymentTerm = value +} +// SetPaymentTermsId sets the paymentTermsId property value. The paymentTermsId property +func (m *SalesOrder) SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentTermsId = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *SalesOrder) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetPricesIncludeTax sets the pricesIncludeTax property value. The pricesIncludeTax property +func (m *SalesOrder) SetPricesIncludeTax(value *bool)() { + m.pricesIncludeTax = value +} +// SetRequestedDeliveryDate sets the requestedDeliveryDate property value. The requestedDeliveryDate property +func (m *SalesOrder) SetRequestedDeliveryDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.requestedDeliveryDate = value +} +// SetSalesOrderLines sets the salesOrderLines property value. The salesOrderLines property +func (m *SalesOrder) SetSalesOrderLines(value []SalesOrderLineable)() { + m.salesOrderLines = value +} +// SetSalesperson sets the salesperson property value. The salesperson property +func (m *SalesOrder) SetSalesperson(value *string)() { + m.salesperson = value +} +// SetSellingPostalAddress sets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesOrder) SetSellingPostalAddress(value PostalAddressTypeable)() { + m.sellingPostalAddress = value +} +// SetShippingPostalAddress sets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesOrder) SetShippingPostalAddress(value PostalAddressTypeable)() { + m.shippingPostalAddress = value +} +// SetShipToContact sets the shipToContact property value. The shipToContact property +func (m *SalesOrder) SetShipToContact(value *string)() { + m.shipToContact = value +} +// SetShipToName sets the shipToName property value. The shipToName property +func (m *SalesOrder) SetShipToName(value *string)() { + m.shipToName = value +} +// SetStatus sets the status property value. The status property +func (m *SalesOrder) SetStatus(value *string)() { + m.status = value +} +// SetTotalAmountExcludingTax sets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesOrder) SetTotalAmountExcludingTax(value *float64)() { + m.totalAmountExcludingTax = value +} +// SetTotalAmountIncludingTax sets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesOrder) SetTotalAmountIncludingTax(value *float64)() { + m.totalAmountIncludingTax = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesOrder) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_order_collection_response.go new file mode 100644 index 000000000..06d136e11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderCollectionResponse +type SalesOrderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesOrderable +} +// NewSalesOrderCollectionResponse instantiates a new SalesOrderCollectionResponse and sets the default values. +func NewSalesOrderCollectionResponse()(*SalesOrderCollectionResponse) { + m := &SalesOrderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesOrderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesOrderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesOrderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesOrderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesOrderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesOrderable, len(val)) + for i, v := range val { + res[i] = v.(SalesOrderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesOrderCollectionResponse) GetValue()([]SalesOrderable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesOrderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesOrderCollectionResponse) SetValue(value []SalesOrderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_order_collection_responseable.go new file mode 100644 index 000000000..e36daefab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderCollectionResponseable +type SalesOrderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesOrderable) + SetValue(value []SalesOrderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_line.go b/src/internal/connector/graph/betasdk/models/sales_order_line.go new file mode 100644 index 000000000..ed7798dbf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_line.go @@ -0,0 +1,763 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesOrderLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The amountExcludingTax property + amountExcludingTax *float64 + // The amountIncludingTax property + amountIncludingTax *float64 + // The description property + description *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The discountPercent property + discountPercent *float64 + // The documentId property + documentId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The invoiceDiscountAllocation property + invoiceDiscountAllocation *float64 + // The invoicedQuantity property + invoicedQuantity *float64 + // The invoiceQuantity property + invoiceQuantity *float64 + // The item property + item Itemable + // The itemId property + itemId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lineType property + lineType *string + // The netAmount property + netAmount *float64 + // The netAmountIncludingTax property + netAmountIncludingTax *float64 + // The netTaxAmount property + netTaxAmount *float64 + // The quantity property + quantity *float64 + // The sequence property + sequence *int32 + // The shipmentDate property + shipmentDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The shippedQuantity property + shippedQuantity *float64 + // The shipQuantity property + shipQuantity *float64 + // The taxCode property + taxCode *string + // The taxPercent property + taxPercent *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The unitOfMeasureId property + unitOfMeasureId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unitPrice property + unitPrice *float64 +} +// NewSalesOrderLine instantiates a new salesOrderLine and sets the default values. +func NewSalesOrderLine()(*SalesOrderLine) { + m := &SalesOrderLine{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesOrderLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesOrderLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesOrderLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *SalesOrderLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *SalesOrderLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAmountExcludingTax gets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesOrderLine) GetAmountExcludingTax()(*float64) { + return m.amountExcludingTax +} +// GetAmountIncludingTax gets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesOrderLine) GetAmountIncludingTax()(*float64) { + return m.amountIncludingTax +} +// GetDescription gets the description property value. The description property +func (m *SalesOrderLine) GetDescription()(*string) { + return m.description +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesOrderLine) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesOrderLine) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *SalesOrderLine) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDocumentId gets the documentId property value. The documentId property +func (m *SalesOrderLine) GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.documentId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesOrderLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["amountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountExcludingTax(val) + } + return nil + } + res["amountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountIncludingTax(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["documentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["invoiceDiscountAllocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceDiscountAllocation(val) + } + return nil + } + res["invoicedQuantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoicedQuantity(val) + } + return nil + } + res["invoiceQuantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetInvoiceQuantity(val) + } + return nil + } + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(Itemable)) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["lineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLineType(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["netAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmountIncludingTax(val) + } + return nil + } + res["netTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetTaxAmount(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["shipmentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentDate(val) + } + return nil + } + res["shippedQuantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetShippedQuantity(val) + } + return nil + } + res["shipQuantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetShipQuantity(val) + } + return nil + } + res["taxCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxCode(val) + } + return nil + } + res["taxPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTaxPercent(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["unitOfMeasureId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitOfMeasureId(val) + } + return nil + } + res["unitPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitPrice(val) + } + return nil + } + return res +} +// GetInvoiceDiscountAllocation gets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesOrderLine) GetInvoiceDiscountAllocation()(*float64) { + return m.invoiceDiscountAllocation +} +// GetInvoicedQuantity gets the invoicedQuantity property value. The invoicedQuantity property +func (m *SalesOrderLine) GetInvoicedQuantity()(*float64) { + return m.invoicedQuantity +} +// GetInvoiceQuantity gets the invoiceQuantity property value. The invoiceQuantity property +func (m *SalesOrderLine) GetInvoiceQuantity()(*float64) { + return m.invoiceQuantity +} +// GetItem gets the item property value. The item property +func (m *SalesOrderLine) GetItem()(Itemable) { + return m.item +} +// GetItemId gets the itemId property value. The itemId property +func (m *SalesOrderLine) GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemId +} +// GetLineType gets the lineType property value. The lineType property +func (m *SalesOrderLine) GetLineType()(*string) { + return m.lineType +} +// GetNetAmount gets the netAmount property value. The netAmount property +func (m *SalesOrderLine) GetNetAmount()(*float64) { + return m.netAmount +} +// GetNetAmountIncludingTax gets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesOrderLine) GetNetAmountIncludingTax()(*float64) { + return m.netAmountIncludingTax +} +// GetNetTaxAmount gets the netTaxAmount property value. The netTaxAmount property +func (m *SalesOrderLine) GetNetTaxAmount()(*float64) { + return m.netTaxAmount +} +// GetQuantity gets the quantity property value. The quantity property +func (m *SalesOrderLine) GetQuantity()(*float64) { + return m.quantity +} +// GetSequence gets the sequence property value. The sequence property +func (m *SalesOrderLine) GetSequence()(*int32) { + return m.sequence +} +// GetShipmentDate gets the shipmentDate property value. The shipmentDate property +func (m *SalesOrderLine) GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.shipmentDate +} +// GetShippedQuantity gets the shippedQuantity property value. The shippedQuantity property +func (m *SalesOrderLine) GetShippedQuantity()(*float64) { + return m.shippedQuantity +} +// GetShipQuantity gets the shipQuantity property value. The shipQuantity property +func (m *SalesOrderLine) GetShipQuantity()(*float64) { + return m.shipQuantity +} +// GetTaxCode gets the taxCode property value. The taxCode property +func (m *SalesOrderLine) GetTaxCode()(*string) { + return m.taxCode +} +// GetTaxPercent gets the taxPercent property value. The taxPercent property +func (m *SalesOrderLine) GetTaxPercent()(*float64) { + return m.taxPercent +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesOrderLine) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetUnitOfMeasureId gets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesOrderLine) GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.unitOfMeasureId +} +// GetUnitPrice gets the unitPrice property value. The unitPrice property +func (m *SalesOrderLine) GetUnitPrice()(*float64) { + return m.unitPrice +} +// Serialize serializes information the current object +func (m *SalesOrderLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountExcludingTax", m.GetAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountIncludingTax", m.GetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("documentId", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceDiscountAllocation", m.GetInvoiceDiscountAllocation()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoicedQuantity", m.GetInvoicedQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("invoiceQuantity", m.GetInvoiceQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lineType", m.GetLineType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmountIncludingTax", m.GetNetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netTaxAmount", m.GetNetTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("shipmentDate", m.GetShipmentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("shippedQuantity", m.GetShippedQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("shipQuantity", m.GetShipQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxCode", m.GetTaxCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("taxPercent", m.GetTaxPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("unitOfMeasureId", m.GetUnitOfMeasureId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitPrice", m.GetUnitPrice()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *SalesOrderLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *SalesOrderLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAmountExcludingTax sets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesOrderLine) SetAmountExcludingTax(value *float64)() { + m.amountExcludingTax = value +} +// SetAmountIncludingTax sets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesOrderLine) SetAmountIncludingTax(value *float64)() { + m.amountIncludingTax = value +} +// SetDescription sets the description property value. The description property +func (m *SalesOrderLine) SetDescription(value *string)() { + m.description = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesOrderLine) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesOrderLine) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *SalesOrderLine) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDocumentId sets the documentId property value. The documentId property +func (m *SalesOrderLine) SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.documentId = value +} +// SetInvoiceDiscountAllocation sets the invoiceDiscountAllocation property value. The invoiceDiscountAllocation property +func (m *SalesOrderLine) SetInvoiceDiscountAllocation(value *float64)() { + m.invoiceDiscountAllocation = value +} +// SetInvoicedQuantity sets the invoicedQuantity property value. The invoicedQuantity property +func (m *SalesOrderLine) SetInvoicedQuantity(value *float64)() { + m.invoicedQuantity = value +} +// SetInvoiceQuantity sets the invoiceQuantity property value. The invoiceQuantity property +func (m *SalesOrderLine) SetInvoiceQuantity(value *float64)() { + m.invoiceQuantity = value +} +// SetItem sets the item property value. The item property +func (m *SalesOrderLine) SetItem(value Itemable)() { + m.item = value +} +// SetItemId sets the itemId property value. The itemId property +func (m *SalesOrderLine) SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemId = value +} +// SetLineType sets the lineType property value. The lineType property +func (m *SalesOrderLine) SetLineType(value *string)() { + m.lineType = value +} +// SetNetAmount sets the netAmount property value. The netAmount property +func (m *SalesOrderLine) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetNetAmountIncludingTax sets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesOrderLine) SetNetAmountIncludingTax(value *float64)() { + m.netAmountIncludingTax = value +} +// SetNetTaxAmount sets the netTaxAmount property value. The netTaxAmount property +func (m *SalesOrderLine) SetNetTaxAmount(value *float64)() { + m.netTaxAmount = value +} +// SetQuantity sets the quantity property value. The quantity property +func (m *SalesOrderLine) SetQuantity(value *float64)() { + m.quantity = value +} +// SetSequence sets the sequence property value. The sequence property +func (m *SalesOrderLine) SetSequence(value *int32)() { + m.sequence = value +} +// SetShipmentDate sets the shipmentDate property value. The shipmentDate property +func (m *SalesOrderLine) SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.shipmentDate = value +} +// SetShippedQuantity sets the shippedQuantity property value. The shippedQuantity property +func (m *SalesOrderLine) SetShippedQuantity(value *float64)() { + m.shippedQuantity = value +} +// SetShipQuantity sets the shipQuantity property value. The shipQuantity property +func (m *SalesOrderLine) SetShipQuantity(value *float64)() { + m.shipQuantity = value +} +// SetTaxCode sets the taxCode property value. The taxCode property +func (m *SalesOrderLine) SetTaxCode(value *string)() { + m.taxCode = value +} +// SetTaxPercent sets the taxPercent property value. The taxPercent property +func (m *SalesOrderLine) SetTaxPercent(value *float64)() { + m.taxPercent = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesOrderLine) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetUnitOfMeasureId sets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesOrderLine) SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.unitOfMeasureId = value +} +// SetUnitPrice sets the unitPrice property value. The unitPrice property +func (m *SalesOrderLine) SetUnitPrice(value *float64)() { + m.unitPrice = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_line_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_order_line_collection_response.go new file mode 100644 index 000000000..5c329e86c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderLineCollectionResponse +type SalesOrderLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesOrderLineable +} +// NewSalesOrderLineCollectionResponse instantiates a new SalesOrderLineCollectionResponse and sets the default values. +func NewSalesOrderLineCollectionResponse()(*SalesOrderLineCollectionResponse) { + m := &SalesOrderLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesOrderLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesOrderLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesOrderLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesOrderLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesOrderLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesOrderLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesOrderLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesOrderLineCollectionResponse) GetValue()([]SalesOrderLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesOrderLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesOrderLineCollectionResponse) SetValue(value []SalesOrderLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_order_line_collection_responseable.go new file mode 100644 index 000000000..cb6f75bfb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderLineCollectionResponseable +type SalesOrderLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesOrderLineable) + SetValue(value []SalesOrderLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_order_lineable.go b/src/internal/connector/graph/betasdk/models/sales_order_lineable.go new file mode 100644 index 000000000..3e981020d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_order_lineable.go @@ -0,0 +1,68 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderLineable +type SalesOrderLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAmountExcludingTax()(*float64) + GetAmountIncludingTax()(*float64) + GetDescription()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDiscountPercent()(*float64) + GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetInvoiceDiscountAllocation()(*float64) + GetInvoicedQuantity()(*float64) + GetInvoiceQuantity()(*float64) + GetItem()(Itemable) + GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLineType()(*string) + GetNetAmount()(*float64) + GetNetAmountIncludingTax()(*float64) + GetNetTaxAmount()(*float64) + GetQuantity()(*float64) + GetSequence()(*int32) + GetShipmentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetShippedQuantity()(*float64) + GetShipQuantity()(*float64) + GetTaxCode()(*string) + GetTaxPercent()(*float64) + GetTotalTaxAmount()(*float64) + GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetUnitPrice()(*float64) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAmountExcludingTax(value *float64)() + SetAmountIncludingTax(value *float64)() + SetDescription(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDiscountPercent(value *float64)() + SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetInvoiceDiscountAllocation(value *float64)() + SetInvoicedQuantity(value *float64)() + SetInvoiceQuantity(value *float64)() + SetItem(value Itemable)() + SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLineType(value *string)() + SetNetAmount(value *float64)() + SetNetAmountIncludingTax(value *float64)() + SetNetTaxAmount(value *float64)() + SetQuantity(value *float64)() + SetSequence(value *int32)() + SetShipmentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetShippedQuantity(value *float64)() + SetShipQuantity(value *float64)() + SetTaxCode(value *string)() + SetTaxPercent(value *float64)() + SetTotalTaxAmount(value *float64)() + SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetUnitPrice(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_orderable.go b/src/internal/connector/graph/betasdk/models/sales_orderable.go new file mode 100644 index 000000000..de4f98bcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_orderable.go @@ -0,0 +1,83 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesOrderable +type SalesOrderable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBillingPostalAddress()(PostalAddressTypeable) + GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBillToCustomerNumber()(*string) + GetBillToName()(*string) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomer()(Customerable) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomerName()(*string) + GetCustomerNumber()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetEmail()(*string) + GetExternalDocumentNumber()(*string) + GetFullyShipped()(*bool) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetOrderDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetPartialShipping()(*bool) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetPricesIncludeTax()(*bool) + GetRequestedDeliveryDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetSalesOrderLines()([]SalesOrderLineable) + GetSalesperson()(*string) + GetSellingPostalAddress()(PostalAddressTypeable) + GetShippingPostalAddress()(PostalAddressTypeable) + GetShipToContact()(*string) + GetShipToName()(*string) + GetStatus()(*string) + GetTotalAmountExcludingTax()(*float64) + GetTotalAmountIncludingTax()(*float64) + GetTotalTaxAmount()(*float64) + SetBillingPostalAddress(value PostalAddressTypeable)() + SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBillToCustomerNumber(value *string)() + SetBillToName(value *string)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomer(value Customerable)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomerName(value *string)() + SetCustomerNumber(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetEmail(value *string)() + SetExternalDocumentNumber(value *string)() + SetFullyShipped(value *bool)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetOrderDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetPartialShipping(value *bool)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetPricesIncludeTax(value *bool)() + SetRequestedDeliveryDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetSalesOrderLines(value []SalesOrderLineable)() + SetSalesperson(value *string)() + SetSellingPostalAddress(value PostalAddressTypeable)() + SetShippingPostalAddress(value PostalAddressTypeable)() + SetShipToContact(value *string)() + SetShipToName(value *string)() + SetStatus(value *string)() + SetTotalAmountExcludingTax(value *float64)() + SetTotalAmountIncludingTax(value *float64)() + SetTotalTaxAmount(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote.go b/src/internal/connector/graph/betasdk/models/sales_quote.go new file mode 100644 index 000000000..798253f78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote.go @@ -0,0 +1,980 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuote provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesQuote struct { + Entity + // The acceptedDate property + acceptedDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The billingPostalAddress property + billingPostalAddress PostalAddressTypeable + // The billToCustomerId property + billToCustomerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The billToCustomerNumber property + billToCustomerNumber *string + // The billToName property + billToName *string + // The currency property + currency Currencyable + // The currencyCode property + currencyCode *string + // The currencyId property + currencyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customer property + customer Customerable + // The customerId property + customerId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The customerName property + customerName *string + // The customerNumber property + customerNumber *string + // The discountAmount property + discountAmount *float64 + // The documentDate property + documentDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The dueDate property + dueDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly + // The email property + email *string + // The externalDocumentNumber property + externalDocumentNumber *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The number property + number *string + // The paymentTerm property + paymentTerm PaymentTermable + // The paymentTermsId property + paymentTermsId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The phoneNumber property + phoneNumber *string + // The salesperson property + salesperson *string + // The salesQuoteLines property + salesQuoteLines []SalesQuoteLineable + // The sellingPostalAddress property + sellingPostalAddress PostalAddressTypeable + // The sentDate property + sentDate *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The shipmentMethod property + shipmentMethod ShipmentMethodable + // The shipmentMethodId property + shipmentMethodId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The shippingPostalAddress property + shippingPostalAddress PostalAddressTypeable + // The shipToContact property + shipToContact *string + // The shipToName property + shipToName *string + // The status property + status *string + // The totalAmountExcludingTax property + totalAmountExcludingTax *float64 + // The totalAmountIncludingTax property + totalAmountIncludingTax *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The validUntilDate property + validUntilDate *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly +} +// NewSalesQuote instantiates a new salesQuote and sets the default values. +func NewSalesQuote()(*SalesQuote) { + m := &SalesQuote{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesQuoteFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesQuoteFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesQuote(), nil +} +// GetAcceptedDate gets the acceptedDate property value. The acceptedDate property +func (m *SalesQuote) GetAcceptedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.acceptedDate +} +// GetBillingPostalAddress gets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesQuote) GetBillingPostalAddress()(PostalAddressTypeable) { + return m.billingPostalAddress +} +// GetBillToCustomerId gets the billToCustomerId property value. The billToCustomerId property +func (m *SalesQuote) GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.billToCustomerId +} +// GetBillToCustomerNumber gets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesQuote) GetBillToCustomerNumber()(*string) { + return m.billToCustomerNumber +} +// GetBillToName gets the billToName property value. The billToName property +func (m *SalesQuote) GetBillToName()(*string) { + return m.billToName +} +// GetCurrency gets the currency property value. The currency property +func (m *SalesQuote) GetCurrency()(Currencyable) { + return m.currency +} +// GetCurrencyCode gets the currencyCode property value. The currencyCode property +func (m *SalesQuote) GetCurrencyCode()(*string) { + return m.currencyCode +} +// GetCurrencyId gets the currencyId property value. The currencyId property +func (m *SalesQuote) GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.currencyId +} +// GetCustomer gets the customer property value. The customer property +func (m *SalesQuote) GetCustomer()(Customerable) { + return m.customer +} +// GetCustomerId gets the customerId property value. The customerId property +func (m *SalesQuote) GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.customerId +} +// GetCustomerName gets the customerName property value. The customerName property +func (m *SalesQuote) GetCustomerName()(*string) { + return m.customerName +} +// GetCustomerNumber gets the customerNumber property value. The customerNumber property +func (m *SalesQuote) GetCustomerNumber()(*string) { + return m.customerNumber +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesQuote) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDocumentDate gets the documentDate property value. The documentDate property +func (m *SalesQuote) GetDocumentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.documentDate +} +// GetDueDate gets the dueDate property value. The dueDate property +func (m *SalesQuote) GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.dueDate +} +// GetEmail gets the email property value. The email property +func (m *SalesQuote) GetEmail()(*string) { + return m.email +} +// GetExternalDocumentNumber gets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesQuote) GetExternalDocumentNumber()(*string) { + return m.externalDocumentNumber +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesQuote) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["acceptedDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetAcceptedDate(val) + } + return nil + } + res["billingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBillingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["billToCustomerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerId(val) + } + return nil + } + res["billToCustomerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToCustomerNumber(val) + } + return nil + } + res["billToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBillToName(val) + } + return nil + } + res["currency"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCurrencyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCurrency(val.(Currencyable)) + } + return nil + } + res["currencyCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyCode(val) + } + return nil + } + res["currencyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCurrencyId(val) + } + return nil + } + res["customer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomer(val.(Customerable)) + } + return nil + } + res["customerId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerId(val) + } + return nil + } + res["customerName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerName(val) + } + return nil + } + res["customerNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomerNumber(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["documentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentDate(val) + } + return nil + } + res["dueDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetDueDate(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["externalDocumentNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalDocumentNumber(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["number"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNumber(val) + } + return nil + } + res["paymentTerm"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePaymentTermFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPaymentTerm(val.(PaymentTermable)) + } + return nil + } + res["paymentTermsId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetPaymentTermsId(val) + } + return nil + } + res["phoneNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPhoneNumber(val) + } + return nil + } + res["salesperson"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSalesperson(val) + } + return nil + } + res["salesQuoteLines"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesQuoteLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesQuoteLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesQuoteLineable) + } + m.SetSalesQuoteLines(res) + } + return nil + } + res["sellingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSellingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["sentDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSentDate(val) + } + return nil + } + res["shipmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateShipmentMethodFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethod(val.(ShipmentMethodable)) + } + return nil + } + res["shipmentMethodId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetShipmentMethodId(val) + } + return nil + } + res["shippingPostalAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePostalAddressTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetShippingPostalAddress(val.(PostalAddressTypeable)) + } + return nil + } + res["shipToContact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToContact(val) + } + return nil + } + res["shipToName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetShipToName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["totalAmountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountExcludingTax(val) + } + return nil + } + res["totalAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalAmountIncludingTax(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["validUntilDate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetDateOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetValidUntilDate(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesQuote) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetNumber gets the number property value. The number property +func (m *SalesQuote) GetNumber()(*string) { + return m.number +} +// GetPaymentTerm gets the paymentTerm property value. The paymentTerm property +func (m *SalesQuote) GetPaymentTerm()(PaymentTermable) { + return m.paymentTerm +} +// GetPaymentTermsId gets the paymentTermsId property value. The paymentTermsId property +func (m *SalesQuote) GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.paymentTermsId +} +// GetPhoneNumber gets the phoneNumber property value. The phoneNumber property +func (m *SalesQuote) GetPhoneNumber()(*string) { + return m.phoneNumber +} +// GetSalesperson gets the salesperson property value. The salesperson property +func (m *SalesQuote) GetSalesperson()(*string) { + return m.salesperson +} +// GetSalesQuoteLines gets the salesQuoteLines property value. The salesQuoteLines property +func (m *SalesQuote) GetSalesQuoteLines()([]SalesQuoteLineable) { + return m.salesQuoteLines +} +// GetSellingPostalAddress gets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesQuote) GetSellingPostalAddress()(PostalAddressTypeable) { + return m.sellingPostalAddress +} +// GetSentDate gets the sentDate property value. The sentDate property +func (m *SalesQuote) GetSentDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.sentDate +} +// GetShipmentMethod gets the shipmentMethod property value. The shipmentMethod property +func (m *SalesQuote) GetShipmentMethod()(ShipmentMethodable) { + return m.shipmentMethod +} +// GetShipmentMethodId gets the shipmentMethodId property value. The shipmentMethodId property +func (m *SalesQuote) GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.shipmentMethodId +} +// GetShippingPostalAddress gets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesQuote) GetShippingPostalAddress()(PostalAddressTypeable) { + return m.shippingPostalAddress +} +// GetShipToContact gets the shipToContact property value. The shipToContact property +func (m *SalesQuote) GetShipToContact()(*string) { + return m.shipToContact +} +// GetShipToName gets the shipToName property value. The shipToName property +func (m *SalesQuote) GetShipToName()(*string) { + return m.shipToName +} +// GetStatus gets the status property value. The status property +func (m *SalesQuote) GetStatus()(*string) { + return m.status +} +// GetTotalAmountExcludingTax gets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesQuote) GetTotalAmountExcludingTax()(*float64) { + return m.totalAmountExcludingTax +} +// GetTotalAmountIncludingTax gets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesQuote) GetTotalAmountIncludingTax()(*float64) { + return m.totalAmountIncludingTax +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesQuote) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetValidUntilDate gets the validUntilDate property value. The validUntilDate property +func (m *SalesQuote) GetValidUntilDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) { + return m.validUntilDate +} +// Serialize serializes information the current object +func (m *SalesQuote) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteDateOnlyValue("acceptedDate", m.GetAcceptedDate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("billingPostalAddress", m.GetBillingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("billToCustomerId", m.GetBillToCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToCustomerNumber", m.GetBillToCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("billToName", m.GetBillToName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("currency", m.GetCurrency()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("currencyCode", m.GetCurrencyCode()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("currencyId", m.GetCurrencyId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customer", m.GetCustomer()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("customerId", m.GetCustomerId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerName", m.GetCustomerName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customerNumber", m.GetCustomerNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("documentDate", m.GetDocumentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("dueDate", m.GetDueDate()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalDocumentNumber", m.GetExternalDocumentNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("number", m.GetNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("paymentTerm", m.GetPaymentTerm()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("paymentTermsId", m.GetPaymentTermsId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("phoneNumber", m.GetPhoneNumber()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("salesperson", m.GetSalesperson()) + if err != nil { + return err + } + } + if m.GetSalesQuoteLines() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSalesQuoteLines())) + for i, v := range m.GetSalesQuoteLines() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("salesQuoteLines", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("sellingPostalAddress", m.GetSellingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("sentDate", m.GetSentDate()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shipmentMethod", m.GetShipmentMethod()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("shipmentMethodId", m.GetShipmentMethodId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("shippingPostalAddress", m.GetShippingPostalAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToContact", m.GetShipToContact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("shipToName", m.GetShipToName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountExcludingTax", m.GetTotalAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalAmountIncludingTax", m.GetTotalAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteDateOnlyValue("validUntilDate", m.GetValidUntilDate()) + if err != nil { + return err + } + } + return nil +} +// SetAcceptedDate sets the acceptedDate property value. The acceptedDate property +func (m *SalesQuote) SetAcceptedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.acceptedDate = value +} +// SetBillingPostalAddress sets the billingPostalAddress property value. The billingPostalAddress property +func (m *SalesQuote) SetBillingPostalAddress(value PostalAddressTypeable)() { + m.billingPostalAddress = value +} +// SetBillToCustomerId sets the billToCustomerId property value. The billToCustomerId property +func (m *SalesQuote) SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.billToCustomerId = value +} +// SetBillToCustomerNumber sets the billToCustomerNumber property value. The billToCustomerNumber property +func (m *SalesQuote) SetBillToCustomerNumber(value *string)() { + m.billToCustomerNumber = value +} +// SetBillToName sets the billToName property value. The billToName property +func (m *SalesQuote) SetBillToName(value *string)() { + m.billToName = value +} +// SetCurrency sets the currency property value. The currency property +func (m *SalesQuote) SetCurrency(value Currencyable)() { + m.currency = value +} +// SetCurrencyCode sets the currencyCode property value. The currencyCode property +func (m *SalesQuote) SetCurrencyCode(value *string)() { + m.currencyCode = value +} +// SetCurrencyId sets the currencyId property value. The currencyId property +func (m *SalesQuote) SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.currencyId = value +} +// SetCustomer sets the customer property value. The customer property +func (m *SalesQuote) SetCustomer(value Customerable)() { + m.customer = value +} +// SetCustomerId sets the customerId property value. The customerId property +func (m *SalesQuote) SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.customerId = value +} +// SetCustomerName sets the customerName property value. The customerName property +func (m *SalesQuote) SetCustomerName(value *string)() { + m.customerName = value +} +// SetCustomerNumber sets the customerNumber property value. The customerNumber property +func (m *SalesQuote) SetCustomerNumber(value *string)() { + m.customerNumber = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesQuote) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDocumentDate sets the documentDate property value. The documentDate property +func (m *SalesQuote) SetDocumentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.documentDate = value +} +// SetDueDate sets the dueDate property value. The dueDate property +func (m *SalesQuote) SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.dueDate = value +} +// SetEmail sets the email property value. The email property +func (m *SalesQuote) SetEmail(value *string)() { + m.email = value +} +// SetExternalDocumentNumber sets the externalDocumentNumber property value. The externalDocumentNumber property +func (m *SalesQuote) SetExternalDocumentNumber(value *string)() { + m.externalDocumentNumber = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SalesQuote) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetNumber sets the number property value. The number property +func (m *SalesQuote) SetNumber(value *string)() { + m.number = value +} +// SetPaymentTerm sets the paymentTerm property value. The paymentTerm property +func (m *SalesQuote) SetPaymentTerm(value PaymentTermable)() { + m.paymentTerm = value +} +// SetPaymentTermsId sets the paymentTermsId property value. The paymentTermsId property +func (m *SalesQuote) SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.paymentTermsId = value +} +// SetPhoneNumber sets the phoneNumber property value. The phoneNumber property +func (m *SalesQuote) SetPhoneNumber(value *string)() { + m.phoneNumber = value +} +// SetSalesperson sets the salesperson property value. The salesperson property +func (m *SalesQuote) SetSalesperson(value *string)() { + m.salesperson = value +} +// SetSalesQuoteLines sets the salesQuoteLines property value. The salesQuoteLines property +func (m *SalesQuote) SetSalesQuoteLines(value []SalesQuoteLineable)() { + m.salesQuoteLines = value +} +// SetSellingPostalAddress sets the sellingPostalAddress property value. The sellingPostalAddress property +func (m *SalesQuote) SetSellingPostalAddress(value PostalAddressTypeable)() { + m.sellingPostalAddress = value +} +// SetSentDate sets the sentDate property value. The sentDate property +func (m *SalesQuote) SetSentDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.sentDate = value +} +// SetShipmentMethod sets the shipmentMethod property value. The shipmentMethod property +func (m *SalesQuote) SetShipmentMethod(value ShipmentMethodable)() { + m.shipmentMethod = value +} +// SetShipmentMethodId sets the shipmentMethodId property value. The shipmentMethodId property +func (m *SalesQuote) SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.shipmentMethodId = value +} +// SetShippingPostalAddress sets the shippingPostalAddress property value. The shippingPostalAddress property +func (m *SalesQuote) SetShippingPostalAddress(value PostalAddressTypeable)() { + m.shippingPostalAddress = value +} +// SetShipToContact sets the shipToContact property value. The shipToContact property +func (m *SalesQuote) SetShipToContact(value *string)() { + m.shipToContact = value +} +// SetShipToName sets the shipToName property value. The shipToName property +func (m *SalesQuote) SetShipToName(value *string)() { + m.shipToName = value +} +// SetStatus sets the status property value. The status property +func (m *SalesQuote) SetStatus(value *string)() { + m.status = value +} +// SetTotalAmountExcludingTax sets the totalAmountExcludingTax property value. The totalAmountExcludingTax property +func (m *SalesQuote) SetTotalAmountExcludingTax(value *float64)() { + m.totalAmountExcludingTax = value +} +// SetTotalAmountIncludingTax sets the totalAmountIncludingTax property value. The totalAmountIncludingTax property +func (m *SalesQuote) SetTotalAmountIncludingTax(value *float64)() { + m.totalAmountIncludingTax = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesQuote) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetValidUntilDate sets the validUntilDate property value. The validUntilDate property +func (m *SalesQuote) SetValidUntilDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() { + m.validUntilDate = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_quote_collection_response.go new file mode 100644 index 000000000..9b7d4392c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteCollectionResponse +type SalesQuoteCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesQuoteable +} +// NewSalesQuoteCollectionResponse instantiates a new SalesQuoteCollectionResponse and sets the default values. +func NewSalesQuoteCollectionResponse()(*SalesQuoteCollectionResponse) { + m := &SalesQuoteCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesQuoteCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesQuoteCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesQuoteCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesQuoteCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesQuoteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesQuoteable, len(val)) + for i, v := range val { + res[i] = v.(SalesQuoteable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesQuoteCollectionResponse) GetValue()([]SalesQuoteable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesQuoteCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesQuoteCollectionResponse) SetValue(value []SalesQuoteable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_quote_collection_responseable.go new file mode 100644 index 000000000..100d00ba4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteCollectionResponseable +type SalesQuoteCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesQuoteable) + SetValue(value []SalesQuoteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_line.go b/src/internal/connector/graph/betasdk/models/sales_quote_line.go new file mode 100644 index 000000000..116a22fc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_line.go @@ -0,0 +1,607 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteLine provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SalesQuoteLine struct { + Entity + // The account property + account Accountable + // The accountId property + accountId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The amountExcludingTax property + amountExcludingTax *float64 + // The amountIncludingTax property + amountIncludingTax *float64 + // The description property + description *string + // The discountAmount property + discountAmount *float64 + // The discountAppliedBeforeTax property + discountAppliedBeforeTax *bool + // The discountPercent property + discountPercent *float64 + // The documentId property + documentId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The item property + item Itemable + // The itemId property + itemId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The lineType property + lineType *string + // The netAmount property + netAmount *float64 + // The netAmountIncludingTax property + netAmountIncludingTax *float64 + // The netTaxAmount property + netTaxAmount *float64 + // The quantity property + quantity *float64 + // The sequence property + sequence *int32 + // The taxCode property + taxCode *string + // The taxPercent property + taxPercent *float64 + // The totalTaxAmount property + totalTaxAmount *float64 + // The unitOfMeasureId property + unitOfMeasureId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unitPrice property + unitPrice *float64 +} +// NewSalesQuoteLine instantiates a new salesQuoteLine and sets the default values. +func NewSalesQuoteLine()(*SalesQuoteLine) { + m := &SalesQuoteLine{ + Entity: *NewEntity(), + } + return m +} +// CreateSalesQuoteLineFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesQuoteLineFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesQuoteLine(), nil +} +// GetAccount gets the account property value. The account property +func (m *SalesQuoteLine) GetAccount()(Accountable) { + return m.account +} +// GetAccountId gets the accountId property value. The accountId property +func (m *SalesQuoteLine) GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.accountId +} +// GetAmountExcludingTax gets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesQuoteLine) GetAmountExcludingTax()(*float64) { + return m.amountExcludingTax +} +// GetAmountIncludingTax gets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesQuoteLine) GetAmountIncludingTax()(*float64) { + return m.amountIncludingTax +} +// GetDescription gets the description property value. The description property +func (m *SalesQuoteLine) GetDescription()(*string) { + return m.description +} +// GetDiscountAmount gets the discountAmount property value. The discountAmount property +func (m *SalesQuoteLine) GetDiscountAmount()(*float64) { + return m.discountAmount +} +// GetDiscountAppliedBeforeTax gets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesQuoteLine) GetDiscountAppliedBeforeTax()(*bool) { + return m.discountAppliedBeforeTax +} +// GetDiscountPercent gets the discountPercent property value. The discountPercent property +func (m *SalesQuoteLine) GetDiscountPercent()(*float64) { + return m.discountPercent +} +// GetDocumentId gets the documentId property value. The documentId property +func (m *SalesQuoteLine) GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.documentId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesQuoteLine) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["account"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccount(val.(Accountable)) + } + return nil + } + res["accountId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountId(val) + } + return nil + } + res["amountExcludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountExcludingTax(val) + } + return nil + } + res["amountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetAmountIncludingTax(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["discountAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAmount(val) + } + return nil + } + res["discountAppliedBeforeTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDiscountAppliedBeforeTax(val) + } + return nil + } + res["discountPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetDiscountPercent(val) + } + return nil + } + res["documentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetDocumentId(val) + } + return nil + } + res["item"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetItem(val.(Itemable)) + } + return nil + } + res["itemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetItemId(val) + } + return nil + } + res["lineType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLineType(val) + } + return nil + } + res["netAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmount(val) + } + return nil + } + res["netAmountIncludingTax"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetAmountIncludingTax(val) + } + return nil + } + res["netTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetNetTaxAmount(val) + } + return nil + } + res["quantity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetQuantity(val) + } + return nil + } + res["sequence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSequence(val) + } + return nil + } + res["taxCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTaxCode(val) + } + return nil + } + res["taxPercent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTaxPercent(val) + } + return nil + } + res["totalTaxAmount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetTotalTaxAmount(val) + } + return nil + } + res["unitOfMeasureId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetUnitOfMeasureId(val) + } + return nil + } + res["unitPrice"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnitPrice(val) + } + return nil + } + return res +} +// GetItem gets the item property value. The item property +func (m *SalesQuoteLine) GetItem()(Itemable) { + return m.item +} +// GetItemId gets the itemId property value. The itemId property +func (m *SalesQuoteLine) GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.itemId +} +// GetLineType gets the lineType property value. The lineType property +func (m *SalesQuoteLine) GetLineType()(*string) { + return m.lineType +} +// GetNetAmount gets the netAmount property value. The netAmount property +func (m *SalesQuoteLine) GetNetAmount()(*float64) { + return m.netAmount +} +// GetNetAmountIncludingTax gets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesQuoteLine) GetNetAmountIncludingTax()(*float64) { + return m.netAmountIncludingTax +} +// GetNetTaxAmount gets the netTaxAmount property value. The netTaxAmount property +func (m *SalesQuoteLine) GetNetTaxAmount()(*float64) { + return m.netTaxAmount +} +// GetQuantity gets the quantity property value. The quantity property +func (m *SalesQuoteLine) GetQuantity()(*float64) { + return m.quantity +} +// GetSequence gets the sequence property value. The sequence property +func (m *SalesQuoteLine) GetSequence()(*int32) { + return m.sequence +} +// GetTaxCode gets the taxCode property value. The taxCode property +func (m *SalesQuoteLine) GetTaxCode()(*string) { + return m.taxCode +} +// GetTaxPercent gets the taxPercent property value. The taxPercent property +func (m *SalesQuoteLine) GetTaxPercent()(*float64) { + return m.taxPercent +} +// GetTotalTaxAmount gets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesQuoteLine) GetTotalTaxAmount()(*float64) { + return m.totalTaxAmount +} +// GetUnitOfMeasureId gets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesQuoteLine) GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.unitOfMeasureId +} +// GetUnitPrice gets the unitPrice property value. The unitPrice property +func (m *SalesQuoteLine) GetUnitPrice()(*float64) { + return m.unitPrice +} +// Serialize serializes information the current object +func (m *SalesQuoteLine) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("account", m.GetAccount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("accountId", m.GetAccountId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountExcludingTax", m.GetAmountExcludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("amountIncludingTax", m.GetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountAmount", m.GetDiscountAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("discountAppliedBeforeTax", m.GetDiscountAppliedBeforeTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("discountPercent", m.GetDiscountPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("documentId", m.GetDocumentId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("item", m.GetItem()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("itemId", m.GetItemId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("lineType", m.GetLineType()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmount", m.GetNetAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netAmountIncludingTax", m.GetNetAmountIncludingTax()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("netTaxAmount", m.GetNetTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("quantity", m.GetQuantity()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sequence", m.GetSequence()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("taxCode", m.GetTaxCode()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("taxPercent", m.GetTaxPercent()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("totalTaxAmount", m.GetTotalTaxAmount()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("unitOfMeasureId", m.GetUnitOfMeasureId()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("unitPrice", m.GetUnitPrice()) + if err != nil { + return err + } + } + return nil +} +// SetAccount sets the account property value. The account property +func (m *SalesQuoteLine) SetAccount(value Accountable)() { + m.account = value +} +// SetAccountId sets the accountId property value. The accountId property +func (m *SalesQuoteLine) SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.accountId = value +} +// SetAmountExcludingTax sets the amountExcludingTax property value. The amountExcludingTax property +func (m *SalesQuoteLine) SetAmountExcludingTax(value *float64)() { + m.amountExcludingTax = value +} +// SetAmountIncludingTax sets the amountIncludingTax property value. The amountIncludingTax property +func (m *SalesQuoteLine) SetAmountIncludingTax(value *float64)() { + m.amountIncludingTax = value +} +// SetDescription sets the description property value. The description property +func (m *SalesQuoteLine) SetDescription(value *string)() { + m.description = value +} +// SetDiscountAmount sets the discountAmount property value. The discountAmount property +func (m *SalesQuoteLine) SetDiscountAmount(value *float64)() { + m.discountAmount = value +} +// SetDiscountAppliedBeforeTax sets the discountAppliedBeforeTax property value. The discountAppliedBeforeTax property +func (m *SalesQuoteLine) SetDiscountAppliedBeforeTax(value *bool)() { + m.discountAppliedBeforeTax = value +} +// SetDiscountPercent sets the discountPercent property value. The discountPercent property +func (m *SalesQuoteLine) SetDiscountPercent(value *float64)() { + m.discountPercent = value +} +// SetDocumentId sets the documentId property value. The documentId property +func (m *SalesQuoteLine) SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.documentId = value +} +// SetItem sets the item property value. The item property +func (m *SalesQuoteLine) SetItem(value Itemable)() { + m.item = value +} +// SetItemId sets the itemId property value. The itemId property +func (m *SalesQuoteLine) SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.itemId = value +} +// SetLineType sets the lineType property value. The lineType property +func (m *SalesQuoteLine) SetLineType(value *string)() { + m.lineType = value +} +// SetNetAmount sets the netAmount property value. The netAmount property +func (m *SalesQuoteLine) SetNetAmount(value *float64)() { + m.netAmount = value +} +// SetNetAmountIncludingTax sets the netAmountIncludingTax property value. The netAmountIncludingTax property +func (m *SalesQuoteLine) SetNetAmountIncludingTax(value *float64)() { + m.netAmountIncludingTax = value +} +// SetNetTaxAmount sets the netTaxAmount property value. The netTaxAmount property +func (m *SalesQuoteLine) SetNetTaxAmount(value *float64)() { + m.netTaxAmount = value +} +// SetQuantity sets the quantity property value. The quantity property +func (m *SalesQuoteLine) SetQuantity(value *float64)() { + m.quantity = value +} +// SetSequence sets the sequence property value. The sequence property +func (m *SalesQuoteLine) SetSequence(value *int32)() { + m.sequence = value +} +// SetTaxCode sets the taxCode property value. The taxCode property +func (m *SalesQuoteLine) SetTaxCode(value *string)() { + m.taxCode = value +} +// SetTaxPercent sets the taxPercent property value. The taxPercent property +func (m *SalesQuoteLine) SetTaxPercent(value *float64)() { + m.taxPercent = value +} +// SetTotalTaxAmount sets the totalTaxAmount property value. The totalTaxAmount property +func (m *SalesQuoteLine) SetTotalTaxAmount(value *float64)() { + m.totalTaxAmount = value +} +// SetUnitOfMeasureId sets the unitOfMeasureId property value. The unitOfMeasureId property +func (m *SalesQuoteLine) SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.unitOfMeasureId = value +} +// SetUnitPrice sets the unitPrice property value. The unitPrice property +func (m *SalesQuoteLine) SetUnitPrice(value *float64)() { + m.unitPrice = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_response.go b/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_response.go new file mode 100644 index 000000000..181f8de3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteLineCollectionResponse +type SalesQuoteLineCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SalesQuoteLineable +} +// NewSalesQuoteLineCollectionResponse instantiates a new SalesQuoteLineCollectionResponse and sets the default values. +func NewSalesQuoteLineCollectionResponse()(*SalesQuoteLineCollectionResponse) { + m := &SalesQuoteLineCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSalesQuoteLineCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSalesQuoteLineCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSalesQuoteLineCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SalesQuoteLineCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSalesQuoteLineFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SalesQuoteLineable, len(val)) + for i, v := range val { + res[i] = v.(SalesQuoteLineable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SalesQuoteLineCollectionResponse) GetValue()([]SalesQuoteLineable) { + return m.value +} +// Serialize serializes information the current object +func (m *SalesQuoteLineCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SalesQuoteLineCollectionResponse) SetValue(value []SalesQuoteLineable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_responseable.go new file mode 100644 index 000000000..3f17f5aee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_line_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteLineCollectionResponseable +type SalesQuoteLineCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SalesQuoteLineable) + SetValue(value []SalesQuoteLineable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quote_lineable.go b/src/internal/connector/graph/betasdk/models/sales_quote_lineable.go new file mode 100644 index 000000000..bf76b553f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quote_lineable.go @@ -0,0 +1,56 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteLineable +type SalesQuoteLineable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccount()(Accountable) + GetAccountId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAmountExcludingTax()(*float64) + GetAmountIncludingTax()(*float64) + GetDescription()(*string) + GetDiscountAmount()(*float64) + GetDiscountAppliedBeforeTax()(*bool) + GetDiscountPercent()(*float64) + GetDocumentId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetItem()(Itemable) + GetItemId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetLineType()(*string) + GetNetAmount()(*float64) + GetNetAmountIncludingTax()(*float64) + GetNetTaxAmount()(*float64) + GetQuantity()(*float64) + GetSequence()(*int32) + GetTaxCode()(*string) + GetTaxPercent()(*float64) + GetTotalTaxAmount()(*float64) + GetUnitOfMeasureId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetUnitPrice()(*float64) + SetAccount(value Accountable)() + SetAccountId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAmountExcludingTax(value *float64)() + SetAmountIncludingTax(value *float64)() + SetDescription(value *string)() + SetDiscountAmount(value *float64)() + SetDiscountAppliedBeforeTax(value *bool)() + SetDiscountPercent(value *float64)() + SetDocumentId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetItem(value Itemable)() + SetItemId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetLineType(value *string)() + SetNetAmount(value *float64)() + SetNetAmountIncludingTax(value *float64)() + SetNetTaxAmount(value *float64)() + SetQuantity(value *float64)() + SetSequence(value *int32)() + SetTaxCode(value *string)() + SetTaxPercent(value *float64)() + SetTotalTaxAmount(value *float64)() + SetUnitOfMeasureId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetUnitPrice(value *float64)() +} diff --git a/src/internal/connector/graph/betasdk/models/sales_quoteable.go b/src/internal/connector/graph/betasdk/models/sales_quoteable.go new file mode 100644 index 000000000..a7d4debec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sales_quoteable.go @@ -0,0 +1,85 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SalesQuoteable +type SalesQuoteable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcceptedDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetBillingPostalAddress()(PostalAddressTypeable) + GetBillToCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetBillToCustomerNumber()(*string) + GetBillToName()(*string) + GetCurrency()(Currencyable) + GetCurrencyCode()(*string) + GetCurrencyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomer()(Customerable) + GetCustomerId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetCustomerName()(*string) + GetCustomerNumber()(*string) + GetDiscountAmount()(*float64) + GetDocumentDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetDueDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + GetEmail()(*string) + GetExternalDocumentNumber()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNumber()(*string) + GetPaymentTerm()(PaymentTermable) + GetPaymentTermsId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetPhoneNumber()(*string) + GetSalesperson()(*string) + GetSalesQuoteLines()([]SalesQuoteLineable) + GetSellingPostalAddress()(PostalAddressTypeable) + GetSentDate()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetShipmentMethod()(ShipmentMethodable) + GetShipmentMethodId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetShippingPostalAddress()(PostalAddressTypeable) + GetShipToContact()(*string) + GetShipToName()(*string) + GetStatus()(*string) + GetTotalAmountExcludingTax()(*float64) + GetTotalAmountIncludingTax()(*float64) + GetTotalTaxAmount()(*float64) + GetValidUntilDate()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly) + SetAcceptedDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetBillingPostalAddress(value PostalAddressTypeable)() + SetBillToCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetBillToCustomerNumber(value *string)() + SetBillToName(value *string)() + SetCurrency(value Currencyable)() + SetCurrencyCode(value *string)() + SetCurrencyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomer(value Customerable)() + SetCustomerId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetCustomerName(value *string)() + SetCustomerNumber(value *string)() + SetDiscountAmount(value *float64)() + SetDocumentDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetDueDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() + SetEmail(value *string)() + SetExternalDocumentNumber(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNumber(value *string)() + SetPaymentTerm(value PaymentTermable)() + SetPaymentTermsId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetPhoneNumber(value *string)() + SetSalesperson(value *string)() + SetSalesQuoteLines(value []SalesQuoteLineable)() + SetSellingPostalAddress(value PostalAddressTypeable)() + SetSentDate(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetShipmentMethod(value ShipmentMethodable)() + SetShipmentMethodId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetShippingPostalAddress(value PostalAddressTypeable)() + SetShipToContact(value *string)() + SetShipToName(value *string)() + SetStatus(value *string)() + SetTotalAmountExcludingTax(value *float64)() + SetTotalAmountIncludingTax(value *float64)() + SetTotalTaxAmount(value *float64)() + SetValidUntilDate(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.DateOnly)() +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation.go new file mode 100644 index 000000000..49ea3c2bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedExternalDomainFederation +type SamlOrWsFedExternalDomainFederation struct { + SamlOrWsFedProvider + // Collection of domain names of the external organizations that the tenant is federating with. Supports $filter (eq). + domains []ExternalDomainNameable +} +// NewSamlOrWsFedExternalDomainFederation instantiates a new SamlOrWsFedExternalDomainFederation and sets the default values. +func NewSamlOrWsFedExternalDomainFederation()(*SamlOrWsFedExternalDomainFederation) { + m := &SamlOrWsFedExternalDomainFederation{ + SamlOrWsFedProvider: *NewSamlOrWsFedProvider(), + } + odataTypeValue := "#microsoft.graph.samlOrWsFedExternalDomainFederation"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSamlOrWsFedExternalDomainFederationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSamlOrWsFedExternalDomainFederationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSamlOrWsFedExternalDomainFederation(), nil +} +// GetDomains gets the domains property value. Collection of domain names of the external organizations that the tenant is federating with. Supports $filter (eq). +func (m *SamlOrWsFedExternalDomainFederation) GetDomains()([]ExternalDomainNameable) { + return m.domains +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SamlOrWsFedExternalDomainFederation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SamlOrWsFedProvider.GetFieldDeserializers() + res["domains"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExternalDomainNameFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExternalDomainNameable, len(val)) + for i, v := range val { + res[i] = v.(ExternalDomainNameable) + } + m.SetDomains(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SamlOrWsFedExternalDomainFederation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SamlOrWsFedProvider.Serialize(writer) + if err != nil { + return err + } + if m.GetDomains() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDomains())) + for i, v := range m.GetDomains() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("domains", cast) + if err != nil { + return err + } + } + return nil +} +// SetDomains sets the domains property value. Collection of domain names of the external organizations that the tenant is federating with. Supports $filter (eq). +func (m *SamlOrWsFedExternalDomainFederation) SetDomains(value []ExternalDomainNameable)() { + m.domains = value +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_response.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_response.go new file mode 100644 index 000000000..789bbbb3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedExternalDomainFederationCollectionResponse +type SamlOrWsFedExternalDomainFederationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SamlOrWsFedExternalDomainFederationable +} +// NewSamlOrWsFedExternalDomainFederationCollectionResponse instantiates a new SamlOrWsFedExternalDomainFederationCollectionResponse and sets the default values. +func NewSamlOrWsFedExternalDomainFederationCollectionResponse()(*SamlOrWsFedExternalDomainFederationCollectionResponse) { + m := &SamlOrWsFedExternalDomainFederationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSamlOrWsFedExternalDomainFederationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSamlOrWsFedExternalDomainFederationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSamlOrWsFedExternalDomainFederationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SamlOrWsFedExternalDomainFederationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSamlOrWsFedExternalDomainFederationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SamlOrWsFedExternalDomainFederationable, len(val)) + for i, v := range val { + res[i] = v.(SamlOrWsFedExternalDomainFederationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SamlOrWsFedExternalDomainFederationCollectionResponse) GetValue()([]SamlOrWsFedExternalDomainFederationable) { + return m.value +} +// Serialize serializes information the current object +func (m *SamlOrWsFedExternalDomainFederationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SamlOrWsFedExternalDomainFederationCollectionResponse) SetValue(value []SamlOrWsFedExternalDomainFederationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_responseable.go new file mode 100644 index 000000000..0af38156d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedExternalDomainFederationCollectionResponseable +type SamlOrWsFedExternalDomainFederationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SamlOrWsFedExternalDomainFederationable) + SetValue(value []SamlOrWsFedExternalDomainFederationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federationable.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federationable.go new file mode 100644 index 000000000..065a9d6f6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_external_domain_federationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedExternalDomainFederationable +type SamlOrWsFedExternalDomainFederationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SamlOrWsFedProviderable + GetDomains()([]ExternalDomainNameable) + SetDomains(value []ExternalDomainNameable)() +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider.go new file mode 100644 index 000000000..410cd0519 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider.go @@ -0,0 +1,187 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedProvider +type SamlOrWsFedProvider struct { + IdentityProviderBase + // Issuer URI of the federation server. + issuerUri *string + // URI of the metadata exchange endpoint used for authentication from rich client applications. + metadataExchangeUri *string + // URI that web-based clients are directed to when signing in to Azure Active Directory (Azure AD) services. + passiveSignInUri *string + // Preferred authentication protocol. Supported values include saml or wsfed. + preferredAuthenticationProtocol *AuthenticationProtocol + // Current certificate used to sign tokens passed to the Microsoft identity platform. The certificate is formatted as a Base64 encoded string of the public portion of the federated IdP's token signing certificate and must be compatible with the X509Certificate2 class. This property is used in the following scenarios: if a rollover is required outside of the autorollover update a new federation service is being set up if the new token signing certificate isn't present in the federation properties after the federation service certificate has been updated. Azure AD updates certificates via an autorollover process in which it attempts to retrieve a new certificate from the federation service metadata, 30 days before expiry of the current certificate. If a new certificate isn't available, Azure AD monitors the metadata daily and will update the federation settings for the domain when a new certificate is available. + signingCertificate *string +} +// NewSamlOrWsFedProvider instantiates a new SamlOrWsFedProvider and sets the default values. +func NewSamlOrWsFedProvider()(*SamlOrWsFedProvider) { + m := &SamlOrWsFedProvider{ + IdentityProviderBase: *NewIdentityProviderBase(), + } + odataTypeValue := "#microsoft.graph.samlOrWsFedProvider"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSamlOrWsFedProviderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSamlOrWsFedProviderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.internalDomainFederation": + return NewInternalDomainFederation(), nil + case "#microsoft.graph.samlOrWsFedExternalDomainFederation": + return NewSamlOrWsFedExternalDomainFederation(), nil + } + } + } + } + return NewSamlOrWsFedProvider(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SamlOrWsFedProvider) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentityProviderBase.GetFieldDeserializers() + res["issuerUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuerUri(val) + } + return nil + } + res["metadataExchangeUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMetadataExchangeUri(val) + } + return nil + } + res["passiveSignInUri"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPassiveSignInUri(val) + } + return nil + } + res["preferredAuthenticationProtocol"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAuthenticationProtocol) + if err != nil { + return err + } + if val != nil { + m.SetPreferredAuthenticationProtocol(val.(*AuthenticationProtocol)) + } + return nil + } + res["signingCertificate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSigningCertificate(val) + } + return nil + } + return res +} +// GetIssuerUri gets the issuerUri property value. Issuer URI of the federation server. +func (m *SamlOrWsFedProvider) GetIssuerUri()(*string) { + return m.issuerUri +} +// GetMetadataExchangeUri gets the metadataExchangeUri property value. URI of the metadata exchange endpoint used for authentication from rich client applications. +func (m *SamlOrWsFedProvider) GetMetadataExchangeUri()(*string) { + return m.metadataExchangeUri +} +// GetPassiveSignInUri gets the passiveSignInUri property value. URI that web-based clients are directed to when signing in to Azure Active Directory (Azure AD) services. +func (m *SamlOrWsFedProvider) GetPassiveSignInUri()(*string) { + return m.passiveSignInUri +} +// GetPreferredAuthenticationProtocol gets the preferredAuthenticationProtocol property value. Preferred authentication protocol. Supported values include saml or wsfed. +func (m *SamlOrWsFedProvider) GetPreferredAuthenticationProtocol()(*AuthenticationProtocol) { + return m.preferredAuthenticationProtocol +} +// GetSigningCertificate gets the signingCertificate property value. Current certificate used to sign tokens passed to the Microsoft identity platform. The certificate is formatted as a Base64 encoded string of the public portion of the federated IdP's token signing certificate and must be compatible with the X509Certificate2 class. This property is used in the following scenarios: if a rollover is required outside of the autorollover update a new federation service is being set up if the new token signing certificate isn't present in the federation properties after the federation service certificate has been updated. Azure AD updates certificates via an autorollover process in which it attempts to retrieve a new certificate from the federation service metadata, 30 days before expiry of the current certificate. If a new certificate isn't available, Azure AD monitors the metadata daily and will update the federation settings for the domain when a new certificate is available. +func (m *SamlOrWsFedProvider) GetSigningCertificate()(*string) { + return m.signingCertificate +} +// Serialize serializes information the current object +func (m *SamlOrWsFedProvider) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentityProviderBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("issuerUri", m.GetIssuerUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("metadataExchangeUri", m.GetMetadataExchangeUri()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("passiveSignInUri", m.GetPassiveSignInUri()) + if err != nil { + return err + } + } + if m.GetPreferredAuthenticationProtocol() != nil { + cast := (*m.GetPreferredAuthenticationProtocol()).String() + err = writer.WriteStringValue("preferredAuthenticationProtocol", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signingCertificate", m.GetSigningCertificate()) + if err != nil { + return err + } + } + return nil +} +// SetIssuerUri sets the issuerUri property value. Issuer URI of the federation server. +func (m *SamlOrWsFedProvider) SetIssuerUri(value *string)() { + m.issuerUri = value +} +// SetMetadataExchangeUri sets the metadataExchangeUri property value. URI of the metadata exchange endpoint used for authentication from rich client applications. +func (m *SamlOrWsFedProvider) SetMetadataExchangeUri(value *string)() { + m.metadataExchangeUri = value +} +// SetPassiveSignInUri sets the passiveSignInUri property value. URI that web-based clients are directed to when signing in to Azure Active Directory (Azure AD) services. +func (m *SamlOrWsFedProvider) SetPassiveSignInUri(value *string)() { + m.passiveSignInUri = value +} +// SetPreferredAuthenticationProtocol sets the preferredAuthenticationProtocol property value. Preferred authentication protocol. Supported values include saml or wsfed. +func (m *SamlOrWsFedProvider) SetPreferredAuthenticationProtocol(value *AuthenticationProtocol)() { + m.preferredAuthenticationProtocol = value +} +// SetSigningCertificate sets the signingCertificate property value. Current certificate used to sign tokens passed to the Microsoft identity platform. The certificate is formatted as a Base64 encoded string of the public portion of the federated IdP's token signing certificate and must be compatible with the X509Certificate2 class. This property is used in the following scenarios: if a rollover is required outside of the autorollover update a new federation service is being set up if the new token signing certificate isn't present in the federation properties after the federation service certificate has been updated. Azure AD updates certificates via an autorollover process in which it attempts to retrieve a new certificate from the federation service metadata, 30 days before expiry of the current certificate. If a new certificate isn't available, Azure AD monitors the metadata daily and will update the federation settings for the domain when a new certificate is available. +func (m *SamlOrWsFedProvider) SetSigningCertificate(value *string)() { + m.signingCertificate = value +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_response.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_response.go new file mode 100644 index 000000000..948d470ce --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedProviderCollectionResponse +type SamlOrWsFedProviderCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SamlOrWsFedProviderable +} +// NewSamlOrWsFedProviderCollectionResponse instantiates a new SamlOrWsFedProviderCollectionResponse and sets the default values. +func NewSamlOrWsFedProviderCollectionResponse()(*SamlOrWsFedProviderCollectionResponse) { + m := &SamlOrWsFedProviderCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSamlOrWsFedProviderCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSamlOrWsFedProviderCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSamlOrWsFedProviderCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SamlOrWsFedProviderCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSamlOrWsFedProviderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SamlOrWsFedProviderable, len(val)) + for i, v := range val { + res[i] = v.(SamlOrWsFedProviderable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SamlOrWsFedProviderCollectionResponse) GetValue()([]SamlOrWsFedProviderable) { + return m.value +} +// Serialize serializes information the current object +func (m *SamlOrWsFedProviderCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SamlOrWsFedProviderCollectionResponse) SetValue(value []SamlOrWsFedProviderable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_responseable.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_responseable.go new file mode 100644 index 000000000..9e810c15e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_provider_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedProviderCollectionResponseable +type SamlOrWsFedProviderCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SamlOrWsFedProviderable) + SetValue(value []SamlOrWsFedProviderable)() +} diff --git a/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_providerable.go b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_providerable.go new file mode 100644 index 000000000..1f4afdffd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_or_ws_fed_providerable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlOrWsFedProviderable +type SamlOrWsFedProviderable interface { + IdentityProviderBaseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssuerUri()(*string) + GetMetadataExchangeUri()(*string) + GetPassiveSignInUri()(*string) + GetPreferredAuthenticationProtocol()(*AuthenticationProtocol) + GetSigningCertificate()(*string) + SetIssuerUri(value *string)() + SetMetadataExchangeUri(value *string)() + SetPassiveSignInUri(value *string)() + SetPreferredAuthenticationProtocol(value *AuthenticationProtocol)() + SetSigningCertificate(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settings.go b/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settings.go new file mode 100644 index 000000000..9a61c1f61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settings.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlSingleSignOnSettings +type SamlSingleSignOnSettings 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 OdataType property + odataType *string + // The relative URI the service provider would redirect to after completion of the single sign-on flow. + relayState *string +} +// NewSamlSingleSignOnSettings instantiates a new samlSingleSignOnSettings and sets the default values. +func NewSamlSingleSignOnSettings()(*SamlSingleSignOnSettings) { + m := &SamlSingleSignOnSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSamlSingleSignOnSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSamlSingleSignOnSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSamlSingleSignOnSettings(), 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 *SamlSingleSignOnSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SamlSingleSignOnSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["relayState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRelayState(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SamlSingleSignOnSettings) GetOdataType()(*string) { + return m.odataType +} +// GetRelayState gets the relayState property value. The relative URI the service provider would redirect to after completion of the single sign-on flow. +func (m *SamlSingleSignOnSettings) GetRelayState()(*string) { + return m.relayState +} +// Serialize serializes information the current object +func (m *SamlSingleSignOnSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("relayState", m.GetRelayState()) + 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 *SamlSingleSignOnSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SamlSingleSignOnSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetRelayState sets the relayState property value. The relative URI the service provider would redirect to after completion of the single sign-on flow. +func (m *SamlSingleSignOnSettings) SetRelayState(value *string)() { + m.relayState = value +} diff --git a/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settingsable.go b/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settingsable.go new file mode 100644 index 000000000..359f9ebf8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/saml_single_sign_on_settingsable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SamlSingleSignOnSettingsable +type SamlSingleSignOnSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRelayState()(*string) + SetOdataType(value *string)() + SetRelayState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/schedule.go b/src/internal/connector/graph/betasdk/models/schedule.go new file mode 100644 index 000000000..97e75b449 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule.go @@ -0,0 +1,652 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Schedule +type Schedule struct { + Entity + // Indicates whether the schedule is enabled for the team. Required. + enabled *bool + // The offerShiftRequests property + offerShiftRequests []OfferShiftRequestable + // Indicates whether offer shift requests are enabled for the schedule. + offerShiftRequestsEnabled *bool + // The openShiftChangeRequests property + openShiftChangeRequests []OpenShiftChangeRequestable + // The openShifts property + openShifts []OpenShiftable + // Indicates whether open shifts are enabled for the schedule. + openShiftsEnabled *bool + // The status of the schedule provisioning. The possible values are notStarted, running, completed, failed. + provisionStatus *OperationStatus + // Additional information about why schedule provisioning failed. + provisionStatusCode *string + // The logical grouping of users in the schedule (usually by role). + schedulingGroups []SchedulingGroupable + // The shifts in the schedule. + shifts []Shiftable + // The swapShiftsChangeRequests property + swapShiftsChangeRequests []SwapShiftsChangeRequestable + // Indicates whether swap shifts requests are enabled for the schedule. + swapShiftsRequestsEnabled *bool + // The timeCards property + timeCards []TimeCardable + // Indicates whether time clock is enabled for the schedule. + timeClockEnabled *bool + // The timeClockSettings property + timeClockSettings TimeClockSettingsable + // The set of reasons for a time off in the schedule. + timeOffReasons []TimeOffReasonable + // The timeOffRequests property + timeOffRequests []TimeOffRequestable + // Indicates whether time off requests are enabled for the schedule. + timeOffRequestsEnabled *bool + // The instances of times off in the schedule. + timesOff []TimeOffable + // Indicates the time zone of the schedule team using tz database format. Required. + timeZone *string + // The workforceIntegrationIds property + workforceIntegrationIds []string +} +// NewSchedule instantiates a new schedule and sets the default values. +func NewSchedule()(*Schedule) { + m := &Schedule{ + Entity: *NewEntity(), + } + return m +} +// CreateScheduleFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScheduleFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchedule(), nil +} +// GetEnabled gets the enabled property value. Indicates whether the schedule is enabled for the team. Required. +func (m *Schedule) GetEnabled()(*bool) { + return m.enabled +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Schedule) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["offerShiftRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOfferShiftRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OfferShiftRequestable, len(val)) + for i, v := range val { + res[i] = v.(OfferShiftRequestable) + } + m.SetOfferShiftRequests(res) + } + return nil + } + res["offerShiftRequestsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOfferShiftRequestsEnabled(val) + } + return nil + } + res["openShiftChangeRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenShiftChangeRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenShiftChangeRequestable, len(val)) + for i, v := range val { + res[i] = v.(OpenShiftChangeRequestable) + } + m.SetOpenShiftChangeRequests(res) + } + return nil + } + res["openShifts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOpenShiftFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OpenShiftable, len(val)) + for i, v := range val { + res[i] = v.(OpenShiftable) + } + m.SetOpenShifts(res) + } + return nil + } + res["openShiftsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetOpenShiftsEnabled(val) + } + return nil + } + res["provisionStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetProvisionStatus(val.(*OperationStatus)) + } + return nil + } + res["provisionStatusCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisionStatusCode(val) + } + return nil + } + res["schedulingGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSchedulingGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SchedulingGroupable, len(val)) + for i, v := range val { + res[i] = v.(SchedulingGroupable) + } + m.SetSchedulingGroups(res) + } + return nil + } + res["shifts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateShiftFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Shiftable, len(val)) + for i, v := range val { + res[i] = v.(Shiftable) + } + m.SetShifts(res) + } + return nil + } + res["swapShiftsChangeRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSwapShiftsChangeRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SwapShiftsChangeRequestable, len(val)) + for i, v := range val { + res[i] = v.(SwapShiftsChangeRequestable) + } + m.SetSwapShiftsChangeRequests(res) + } + return nil + } + res["swapShiftsRequestsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSwapShiftsRequestsEnabled(val) + } + return nil + } + res["timeCards"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTimeCardFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TimeCardable, len(val)) + for i, v := range val { + res[i] = v.(TimeCardable) + } + m.SetTimeCards(res) + } + return nil + } + res["timeClockEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeClockEnabled(val) + } + return nil + } + res["timeClockSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTimeClockSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTimeClockSettings(val.(TimeClockSettingsable)) + } + return nil + } + res["timeOffReasons"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTimeOffReasonFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TimeOffReasonable, len(val)) + for i, v := range val { + res[i] = v.(TimeOffReasonable) + } + m.SetTimeOffReasons(res) + } + return nil + } + res["timeOffRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTimeOffRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TimeOffRequestable, len(val)) + for i, v := range val { + res[i] = v.(TimeOffRequestable) + } + m.SetTimeOffRequests(res) + } + return nil + } + res["timeOffRequestsEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeOffRequestsEnabled(val) + } + return nil + } + res["timesOff"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTimeOffFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TimeOffable, len(val)) + for i, v := range val { + res[i] = v.(TimeOffable) + } + m.SetTimesOff(res) + } + 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 + } + res["workforceIntegrationIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetWorkforceIntegrationIds(res) + } + return nil + } + return res +} +// GetOfferShiftRequests gets the offerShiftRequests property value. The offerShiftRequests property +func (m *Schedule) GetOfferShiftRequests()([]OfferShiftRequestable) { + return m.offerShiftRequests +} +// GetOfferShiftRequestsEnabled gets the offerShiftRequestsEnabled property value. Indicates whether offer shift requests are enabled for the schedule. +func (m *Schedule) GetOfferShiftRequestsEnabled()(*bool) { + return m.offerShiftRequestsEnabled +} +// GetOpenShiftChangeRequests gets the openShiftChangeRequests property value. The openShiftChangeRequests property +func (m *Schedule) GetOpenShiftChangeRequests()([]OpenShiftChangeRequestable) { + return m.openShiftChangeRequests +} +// GetOpenShifts gets the openShifts property value. The openShifts property +func (m *Schedule) GetOpenShifts()([]OpenShiftable) { + return m.openShifts +} +// GetOpenShiftsEnabled gets the openShiftsEnabled property value. Indicates whether open shifts are enabled for the schedule. +func (m *Schedule) GetOpenShiftsEnabled()(*bool) { + return m.openShiftsEnabled +} +// GetProvisionStatus gets the provisionStatus property value. The status of the schedule provisioning. The possible values are notStarted, running, completed, failed. +func (m *Schedule) GetProvisionStatus()(*OperationStatus) { + return m.provisionStatus +} +// GetProvisionStatusCode gets the provisionStatusCode property value. Additional information about why schedule provisioning failed. +func (m *Schedule) GetProvisionStatusCode()(*string) { + return m.provisionStatusCode +} +// GetSchedulingGroups gets the schedulingGroups property value. The logical grouping of users in the schedule (usually by role). +func (m *Schedule) GetSchedulingGroups()([]SchedulingGroupable) { + return m.schedulingGroups +} +// GetShifts gets the shifts property value. The shifts in the schedule. +func (m *Schedule) GetShifts()([]Shiftable) { + return m.shifts +} +// GetSwapShiftsChangeRequests gets the swapShiftsChangeRequests property value. The swapShiftsChangeRequests property +func (m *Schedule) GetSwapShiftsChangeRequests()([]SwapShiftsChangeRequestable) { + return m.swapShiftsChangeRequests +} +// GetSwapShiftsRequestsEnabled gets the swapShiftsRequestsEnabled property value. Indicates whether swap shifts requests are enabled for the schedule. +func (m *Schedule) GetSwapShiftsRequestsEnabled()(*bool) { + return m.swapShiftsRequestsEnabled +} +// GetTimeCards gets the timeCards property value. The timeCards property +func (m *Schedule) GetTimeCards()([]TimeCardable) { + return m.timeCards +} +// GetTimeClockEnabled gets the timeClockEnabled property value. Indicates whether time clock is enabled for the schedule. +func (m *Schedule) GetTimeClockEnabled()(*bool) { + return m.timeClockEnabled +} +// GetTimeClockSettings gets the timeClockSettings property value. The timeClockSettings property +func (m *Schedule) GetTimeClockSettings()(TimeClockSettingsable) { + return m.timeClockSettings +} +// GetTimeOffReasons gets the timeOffReasons property value. The set of reasons for a time off in the schedule. +func (m *Schedule) GetTimeOffReasons()([]TimeOffReasonable) { + return m.timeOffReasons +} +// GetTimeOffRequests gets the timeOffRequests property value. The timeOffRequests property +func (m *Schedule) GetTimeOffRequests()([]TimeOffRequestable) { + return m.timeOffRequests +} +// GetTimeOffRequestsEnabled gets the timeOffRequestsEnabled property value. Indicates whether time off requests are enabled for the schedule. +func (m *Schedule) GetTimeOffRequestsEnabled()(*bool) { + return m.timeOffRequestsEnabled +} +// GetTimesOff gets the timesOff property value. The instances of times off in the schedule. +func (m *Schedule) GetTimesOff()([]TimeOffable) { + return m.timesOff +} +// GetTimeZone gets the timeZone property value. Indicates the time zone of the schedule team using tz database format. Required. +func (m *Schedule) GetTimeZone()(*string) { + return m.timeZone +} +// GetWorkforceIntegrationIds gets the workforceIntegrationIds property value. The workforceIntegrationIds property +func (m *Schedule) GetWorkforceIntegrationIds()([]string) { + return m.workforceIntegrationIds +} +// Serialize serializes information the current object +func (m *Schedule) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + if m.GetOfferShiftRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOfferShiftRequests())) + for i, v := range m.GetOfferShiftRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("offerShiftRequests", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("offerShiftRequestsEnabled", m.GetOfferShiftRequestsEnabled()) + if err != nil { + return err + } + } + if m.GetOpenShiftChangeRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOpenShiftChangeRequests())) + for i, v := range m.GetOpenShiftChangeRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("openShiftChangeRequests", cast) + if err != nil { + return err + } + } + if m.GetOpenShifts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOpenShifts())) + for i, v := range m.GetOpenShifts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("openShifts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("openShiftsEnabled", m.GetOpenShiftsEnabled()) + if err != nil { + return err + } + } + if m.GetSchedulingGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSchedulingGroups())) + for i, v := range m.GetSchedulingGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("schedulingGroups", cast) + if err != nil { + return err + } + } + if m.GetShifts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetShifts())) + for i, v := range m.GetShifts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("shifts", cast) + if err != nil { + return err + } + } + if m.GetSwapShiftsChangeRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSwapShiftsChangeRequests())) + for i, v := range m.GetSwapShiftsChangeRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("swapShiftsChangeRequests", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("swapShiftsRequestsEnabled", m.GetSwapShiftsRequestsEnabled()) + if err != nil { + return err + } + } + if m.GetTimeCards() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTimeCards())) + for i, v := range m.GetTimeCards() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("timeCards", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("timeClockEnabled", m.GetTimeClockEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("timeClockSettings", m.GetTimeClockSettings()) + if err != nil { + return err + } + } + if m.GetTimeOffReasons() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTimeOffReasons())) + for i, v := range m.GetTimeOffReasons() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("timeOffReasons", cast) + if err != nil { + return err + } + } + if m.GetTimeOffRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTimeOffRequests())) + for i, v := range m.GetTimeOffRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("timeOffRequests", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("timeOffRequestsEnabled", m.GetTimeOffRequestsEnabled()) + if err != nil { + return err + } + } + if m.GetTimesOff() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTimesOff())) + for i, v := range m.GetTimesOff() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("timesOff", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("timeZone", m.GetTimeZone()) + if err != nil { + return err + } + } + if m.GetWorkforceIntegrationIds() != nil { + err = writer.WriteCollectionOfStringValues("workforceIntegrationIds", m.GetWorkforceIntegrationIds()) + if err != nil { + return err + } + } + return nil +} +// SetEnabled sets the enabled property value. Indicates whether the schedule is enabled for the team. Required. +func (m *Schedule) SetEnabled(value *bool)() { + m.enabled = value +} +// SetOfferShiftRequests sets the offerShiftRequests property value. The offerShiftRequests property +func (m *Schedule) SetOfferShiftRequests(value []OfferShiftRequestable)() { + m.offerShiftRequests = value +} +// SetOfferShiftRequestsEnabled sets the offerShiftRequestsEnabled property value. Indicates whether offer shift requests are enabled for the schedule. +func (m *Schedule) SetOfferShiftRequestsEnabled(value *bool)() { + m.offerShiftRequestsEnabled = value +} +// SetOpenShiftChangeRequests sets the openShiftChangeRequests property value. The openShiftChangeRequests property +func (m *Schedule) SetOpenShiftChangeRequests(value []OpenShiftChangeRequestable)() { + m.openShiftChangeRequests = value +} +// SetOpenShifts sets the openShifts property value. The openShifts property +func (m *Schedule) SetOpenShifts(value []OpenShiftable)() { + m.openShifts = value +} +// SetOpenShiftsEnabled sets the openShiftsEnabled property value. Indicates whether open shifts are enabled for the schedule. +func (m *Schedule) SetOpenShiftsEnabled(value *bool)() { + m.openShiftsEnabled = value +} +// SetProvisionStatus sets the provisionStatus property value. The status of the schedule provisioning. The possible values are notStarted, running, completed, failed. +func (m *Schedule) SetProvisionStatus(value *OperationStatus)() { + m.provisionStatus = value +} +// SetProvisionStatusCode sets the provisionStatusCode property value. Additional information about why schedule provisioning failed. +func (m *Schedule) SetProvisionStatusCode(value *string)() { + m.provisionStatusCode = value +} +// SetSchedulingGroups sets the schedulingGroups property value. The logical grouping of users in the schedule (usually by role). +func (m *Schedule) SetSchedulingGroups(value []SchedulingGroupable)() { + m.schedulingGroups = value +} +// SetShifts sets the shifts property value. The shifts in the schedule. +func (m *Schedule) SetShifts(value []Shiftable)() { + m.shifts = value +} +// SetSwapShiftsChangeRequests sets the swapShiftsChangeRequests property value. The swapShiftsChangeRequests property +func (m *Schedule) SetSwapShiftsChangeRequests(value []SwapShiftsChangeRequestable)() { + m.swapShiftsChangeRequests = value +} +// SetSwapShiftsRequestsEnabled sets the swapShiftsRequestsEnabled property value. Indicates whether swap shifts requests are enabled for the schedule. +func (m *Schedule) SetSwapShiftsRequestsEnabled(value *bool)() { + m.swapShiftsRequestsEnabled = value +} +// SetTimeCards sets the timeCards property value. The timeCards property +func (m *Schedule) SetTimeCards(value []TimeCardable)() { + m.timeCards = value +} +// SetTimeClockEnabled sets the timeClockEnabled property value. Indicates whether time clock is enabled for the schedule. +func (m *Schedule) SetTimeClockEnabled(value *bool)() { + m.timeClockEnabled = value +} +// SetTimeClockSettings sets the timeClockSettings property value. The timeClockSettings property +func (m *Schedule) SetTimeClockSettings(value TimeClockSettingsable)() { + m.timeClockSettings = value +} +// SetTimeOffReasons sets the timeOffReasons property value. The set of reasons for a time off in the schedule. +func (m *Schedule) SetTimeOffReasons(value []TimeOffReasonable)() { + m.timeOffReasons = value +} +// SetTimeOffRequests sets the timeOffRequests property value. The timeOffRequests property +func (m *Schedule) SetTimeOffRequests(value []TimeOffRequestable)() { + m.timeOffRequests = value +} +// SetTimeOffRequestsEnabled sets the timeOffRequestsEnabled property value. Indicates whether time off requests are enabled for the schedule. +func (m *Schedule) SetTimeOffRequestsEnabled(value *bool)() { + m.timeOffRequestsEnabled = value +} +// SetTimesOff sets the timesOff property value. The instances of times off in the schedule. +func (m *Schedule) SetTimesOff(value []TimeOffable)() { + m.timesOff = value +} +// SetTimeZone sets the timeZone property value. Indicates the time zone of the schedule team using tz database format. Required. +func (m *Schedule) SetTimeZone(value *string)() { + m.timeZone = value +} +// SetWorkforceIntegrationIds sets the workforceIntegrationIds property value. The workforceIntegrationIds property +func (m *Schedule) SetWorkforceIntegrationIds(value []string)() { + m.workforceIntegrationIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_change_request.go b/src/internal/connector/graph/betasdk/models/schedule_change_request.go new file mode 100644 index 000000000..090b78e13 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_change_request.go @@ -0,0 +1,247 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleChangeRequest +type ScheduleChangeRequest struct { + ChangeTrackedEntity + // The assignedTo property + assignedTo *ScheduleChangeRequestActor + // The managerActionDateTime property + managerActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The managerActionMessage property + managerActionMessage *string + // The managerUserId property + managerUserId *string + // The senderDateTime property + senderDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The senderMessage property + senderMessage *string + // The senderUserId property + senderUserId *string + // The state property + state *ScheduleChangeState +} +// NewScheduleChangeRequest instantiates a new ScheduleChangeRequest and sets the default values. +func NewScheduleChangeRequest()(*ScheduleChangeRequest) { + m := &ScheduleChangeRequest{ + ChangeTrackedEntity: *NewChangeTrackedEntity(), + } + odataTypeValue := "#microsoft.graph.scheduleChangeRequest"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateScheduleChangeRequestFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScheduleChangeRequestFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.offerShiftRequest": + return NewOfferShiftRequest(), nil + case "#microsoft.graph.openShiftChangeRequest": + return NewOpenShiftChangeRequest(), nil + case "#microsoft.graph.swapShiftsChangeRequest": + return NewSwapShiftsChangeRequest(), nil + case "#microsoft.graph.timeOffRequest": + return NewTimeOffRequest(), nil + } + } + } + } + return NewScheduleChangeRequest(), nil +} +// GetAssignedTo gets the assignedTo property value. The assignedTo property +func (m *ScheduleChangeRequest) GetAssignedTo()(*ScheduleChangeRequestActor) { + return m.assignedTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScheduleChangeRequest) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ChangeTrackedEntity.GetFieldDeserializers() + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScheduleChangeRequestActor) + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val.(*ScheduleChangeRequestActor)) + } + return nil + } + res["managerActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetManagerActionDateTime(val) + } + return nil + } + res["managerActionMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagerActionMessage(val) + } + return nil + } + res["managerUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagerUserId(val) + } + return nil + } + res["senderDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderDateTime(val) + } + return nil + } + res["senderMessage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderMessage(val) + } + return nil + } + res["senderUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderUserId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScheduleChangeState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*ScheduleChangeState)) + } + return nil + } + return res +} +// GetManagerActionDateTime gets the managerActionDateTime property value. The managerActionDateTime property +func (m *ScheduleChangeRequest) GetManagerActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.managerActionDateTime +} +// GetManagerActionMessage gets the managerActionMessage property value. The managerActionMessage property +func (m *ScheduleChangeRequest) GetManagerActionMessage()(*string) { + return m.managerActionMessage +} +// GetManagerUserId gets the managerUserId property value. The managerUserId property +func (m *ScheduleChangeRequest) GetManagerUserId()(*string) { + return m.managerUserId +} +// GetSenderDateTime gets the senderDateTime property value. The senderDateTime property +func (m *ScheduleChangeRequest) GetSenderDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.senderDateTime +} +// GetSenderMessage gets the senderMessage property value. The senderMessage property +func (m *ScheduleChangeRequest) GetSenderMessage()(*string) { + return m.senderMessage +} +// GetSenderUserId gets the senderUserId property value. The senderUserId property +func (m *ScheduleChangeRequest) GetSenderUserId()(*string) { + return m.senderUserId +} +// GetState gets the state property value. The state property +func (m *ScheduleChangeRequest) GetState()(*ScheduleChangeState) { + return m.state +} +// Serialize serializes information the current object +func (m *ScheduleChangeRequest) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ChangeTrackedEntity.Serialize(writer) + if err != nil { + return err + } + if m.GetAssignedTo() != nil { + cast := (*m.GetAssignedTo()).String() + err = writer.WriteStringValue("assignedTo", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managerActionMessage", m.GetManagerActionMessage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("senderMessage", m.GetSenderMessage()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAssignedTo sets the assignedTo property value. The assignedTo property +func (m *ScheduleChangeRequest) SetAssignedTo(value *ScheduleChangeRequestActor)() { + m.assignedTo = value +} +// SetManagerActionDateTime sets the managerActionDateTime property value. The managerActionDateTime property +func (m *ScheduleChangeRequest) SetManagerActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.managerActionDateTime = value +} +// SetManagerActionMessage sets the managerActionMessage property value. The managerActionMessage property +func (m *ScheduleChangeRequest) SetManagerActionMessage(value *string)() { + m.managerActionMessage = value +} +// SetManagerUserId sets the managerUserId property value. The managerUserId property +func (m *ScheduleChangeRequest) SetManagerUserId(value *string)() { + m.managerUserId = value +} +// SetSenderDateTime sets the senderDateTime property value. The senderDateTime property +func (m *ScheduleChangeRequest) SetSenderDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.senderDateTime = value +} +// SetSenderMessage sets the senderMessage property value. The senderMessage property +func (m *ScheduleChangeRequest) SetSenderMessage(value *string)() { + m.senderMessage = value +} +// SetSenderUserId sets the senderUserId property value. The senderUserId property +func (m *ScheduleChangeRequest) SetSenderUserId(value *string)() { + m.senderUserId = value +} +// SetState sets the state property value. The state property +func (m *ScheduleChangeRequest) SetState(value *ScheduleChangeState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_change_request_actor.go b/src/internal/connector/graph/betasdk/models/schedule_change_request_actor.go new file mode 100644 index 000000000..b2e225643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_change_request_actor.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScheduleChangeRequestActor int + +const ( + SENDER_SCHEDULECHANGEREQUESTACTOR ScheduleChangeRequestActor = iota + RECIPIENT_SCHEDULECHANGEREQUESTACTOR + MANAGER_SCHEDULECHANGEREQUESTACTOR + SYSTEM_SCHEDULECHANGEREQUESTACTOR + UNKNOWNFUTUREVALUE_SCHEDULECHANGEREQUESTACTOR +) + +func (i ScheduleChangeRequestActor) String() string { + return []string{"sender", "recipient", "manager", "system", "unknownFutureValue"}[i] +} +func ParseScheduleChangeRequestActor(v string) (interface{}, error) { + result := SENDER_SCHEDULECHANGEREQUESTACTOR + switch v { + case "sender": + result = SENDER_SCHEDULECHANGEREQUESTACTOR + case "recipient": + result = RECIPIENT_SCHEDULECHANGEREQUESTACTOR + case "manager": + result = MANAGER_SCHEDULECHANGEREQUESTACTOR + case "system": + result = SYSTEM_SCHEDULECHANGEREQUESTACTOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SCHEDULECHANGEREQUESTACTOR + default: + return 0, errors.New("Unknown ScheduleChangeRequestActor value: " + v) + } + return &result, nil +} +func SerializeScheduleChangeRequestActor(values []ScheduleChangeRequestActor) []string { + 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/schedule_change_requestable.go b/src/internal/connector/graph/betasdk/models/schedule_change_requestable.go new file mode 100644 index 000000000..f5457dd51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_change_requestable.go @@ -0,0 +1,28 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleChangeRequestable +type ScheduleChangeRequestable interface { + ChangeTrackedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*ScheduleChangeRequestActor) + GetManagerActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagerActionMessage()(*string) + GetManagerUserId()(*string) + GetSenderDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSenderMessage()(*string) + GetSenderUserId()(*string) + GetState()(*ScheduleChangeState) + SetAssignedTo(value *ScheduleChangeRequestActor)() + SetManagerActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagerActionMessage(value *string)() + SetManagerUserId(value *string)() + SetSenderDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSenderMessage(value *string)() + SetSenderUserId(value *string)() + SetState(value *ScheduleChangeState)() +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_change_state.go b/src/internal/connector/graph/betasdk/models/schedule_change_state.go new file mode 100644 index 000000000..6a176641d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_change_state.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScheduleChangeState int + +const ( + PENDING_SCHEDULECHANGESTATE ScheduleChangeState = iota + APPROVED_SCHEDULECHANGESTATE + DECLINED_SCHEDULECHANGESTATE + UNKNOWNFUTUREVALUE_SCHEDULECHANGESTATE +) + +func (i ScheduleChangeState) String() string { + return []string{"pending", "approved", "declined", "unknownFutureValue"}[i] +} +func ParseScheduleChangeState(v string) (interface{}, error) { + result := PENDING_SCHEDULECHANGESTATE + switch v { + case "pending": + result = PENDING_SCHEDULECHANGESTATE + case "approved": + result = APPROVED_SCHEDULECHANGESTATE + case "declined": + result = DECLINED_SCHEDULECHANGESTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SCHEDULECHANGESTATE + default: + return 0, errors.New("Unknown ScheduleChangeState value: " + v) + } + return &result, nil +} +func SerializeScheduleChangeState(values []ScheduleChangeState) []string { + 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/schedule_entity.go b/src/internal/connector/graph/betasdk/models/schedule_entity.go new file mode 100644 index 000000000..098ea9eec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_entity.go @@ -0,0 +1,173 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleEntity +type ScheduleEntity 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 endDateTime property + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The startDateTime property + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The theme property + theme *ScheduleEntityTheme +} +// NewScheduleEntity instantiates a new scheduleEntity and sets the default values. +func NewScheduleEntity()(*ScheduleEntity) { + m := &ScheduleEntity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateScheduleEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScheduleEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.openShiftItem": + return NewOpenShiftItem(), nil + case "#microsoft.graph.shiftItem": + return NewShiftItem(), nil + case "#microsoft.graph.timeOffItem": + return NewTimeOffItem(), nil + } + } + } + } + return NewScheduleEntity(), 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 *ScheduleEntity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEndDateTime gets the endDateTime property value. The endDateTime property +func (m *ScheduleEntity) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScheduleEntity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(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["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["theme"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseScheduleEntityTheme) + if err != nil { + return err + } + if val != nil { + m.SetTheme(val.(*ScheduleEntityTheme)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ScheduleEntity) GetOdataType()(*string) { + return m.odataType +} +// GetStartDateTime gets the startDateTime property value. The startDateTime property +func (m *ScheduleEntity) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetTheme gets the theme property value. The theme property +func (m *ScheduleEntity) GetTheme()(*ScheduleEntityTheme) { + return m.theme +} +// Serialize serializes information the current object +func (m *ScheduleEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + if m.GetTheme() != nil { + cast := (*m.GetTheme()).String() + err := writer.WriteStringValue("theme", &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 *ScheduleEntity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEndDateTime sets the endDateTime property value. The endDateTime property +func (m *ScheduleEntity) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ScheduleEntity) SetOdataType(value *string)() { + m.odataType = value +} +// SetStartDateTime sets the startDateTime property value. The startDateTime property +func (m *ScheduleEntity) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetTheme sets the theme property value. The theme property +func (m *ScheduleEntity) SetTheme(value *ScheduleEntityTheme)() { + m.theme = value +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_entity_theme.go b/src/internal/connector/graph/betasdk/models/schedule_entity_theme.go new file mode 100644 index 000000000..82871e8eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_entity_theme.go @@ -0,0 +1,67 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScheduleEntityTheme int + +const ( + WHITE_SCHEDULEENTITYTHEME ScheduleEntityTheme = iota + BLUE_SCHEDULEENTITYTHEME + GREEN_SCHEDULEENTITYTHEME + PURPLE_SCHEDULEENTITYTHEME + PINK_SCHEDULEENTITYTHEME + YELLOW_SCHEDULEENTITYTHEME + GRAY_SCHEDULEENTITYTHEME + DARKBLUE_SCHEDULEENTITYTHEME + DARKGREEN_SCHEDULEENTITYTHEME + DARKPURPLE_SCHEDULEENTITYTHEME + DARKPINK_SCHEDULEENTITYTHEME + DARKYELLOW_SCHEDULEENTITYTHEME + UNKNOWNFUTUREVALUE_SCHEDULEENTITYTHEME +) + +func (i ScheduleEntityTheme) String() string { + return []string{"white", "blue", "green", "purple", "pink", "yellow", "gray", "darkBlue", "darkGreen", "darkPurple", "darkPink", "darkYellow", "unknownFutureValue"}[i] +} +func ParseScheduleEntityTheme(v string) (interface{}, error) { + result := WHITE_SCHEDULEENTITYTHEME + switch v { + case "white": + result = WHITE_SCHEDULEENTITYTHEME + case "blue": + result = BLUE_SCHEDULEENTITYTHEME + case "green": + result = GREEN_SCHEDULEENTITYTHEME + case "purple": + result = PURPLE_SCHEDULEENTITYTHEME + case "pink": + result = PINK_SCHEDULEENTITYTHEME + case "yellow": + result = YELLOW_SCHEDULEENTITYTHEME + case "gray": + result = GRAY_SCHEDULEENTITYTHEME + case "darkBlue": + result = DARKBLUE_SCHEDULEENTITYTHEME + case "darkGreen": + result = DARKGREEN_SCHEDULEENTITYTHEME + case "darkPurple": + result = DARKPURPLE_SCHEDULEENTITYTHEME + case "darkPink": + result = DARKPINK_SCHEDULEENTITYTHEME + case "darkYellow": + result = DARKYELLOW_SCHEDULEENTITYTHEME + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SCHEDULEENTITYTHEME + default: + return 0, errors.New("Unknown ScheduleEntityTheme value: " + v) + } + return &result, nil +} +func SerializeScheduleEntityTheme(values []ScheduleEntityTheme) []string { + 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/schedule_entityable.go b/src/internal/connector/graph/betasdk/models/schedule_entityable.go new file mode 100644 index 000000000..84afdeba0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_entityable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleEntityable +type ScheduleEntityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTheme()(*ScheduleEntityTheme) + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTheme(value *ScheduleEntityTheme)() +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_item.go b/src/internal/connector/graph/betasdk/models/schedule_item.go new file mode 100644 index 000000000..3b24cd848 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_item.go @@ -0,0 +1,228 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleItem +type ScheduleItem 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 date, time, and time zone that the corresponding event ends. + end DateTimeTimeZoneable + // The sensitivity of the corresponding event. True if the event is marked private, false otherwise. Optional. + isPrivate *bool + // The location where the corresponding event is held or attended from. Optional. + location *string + // The OdataType property + odataType *string + // The date, time, and time zone that the corresponding event starts. + start DateTimeTimeZoneable + // The availability status of the user or resource during the corresponding event. The possible values are: free, tentative, busy, oof, workingElsewhere, unknown. + status *FreeBusyStatus + // The corresponding event's subject line. Optional. + subject *string +} +// NewScheduleItem instantiates a new scheduleItem and sets the default values. +func NewScheduleItem()(*ScheduleItem) { + m := &ScheduleItem{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateScheduleItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScheduleItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScheduleItem(), 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 *ScheduleItem) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnd gets the end property value. The date, time, and time zone that the corresponding event ends. +func (m *ScheduleItem) GetEnd()(DateTimeTimeZoneable) { + return m.end +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScheduleItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["end"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEnd(val.(DateTimeTimeZoneable)) + } + return nil + } + res["isPrivate"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsPrivate(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(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["start"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDateTimeTimeZoneFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetStart(val.(DateTimeTimeZoneable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFreeBusyStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*FreeBusyStatus)) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + return res +} +// GetIsPrivate gets the isPrivate property value. The sensitivity of the corresponding event. True if the event is marked private, false otherwise. Optional. +func (m *ScheduleItem) GetIsPrivate()(*bool) { + return m.isPrivate +} +// GetLocation gets the location property value. The location where the corresponding event is held or attended from. Optional. +func (m *ScheduleItem) GetLocation()(*string) { + return m.location +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ScheduleItem) GetOdataType()(*string) { + return m.odataType +} +// GetStart gets the start property value. The date, time, and time zone that the corresponding event starts. +func (m *ScheduleItem) GetStart()(DateTimeTimeZoneable) { + return m.start +} +// GetStatus gets the status property value. The availability status of the user or resource during the corresponding event. The possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *ScheduleItem) GetStatus()(*FreeBusyStatus) { + return m.status +} +// GetSubject gets the subject property value. The corresponding event's subject line. Optional. +func (m *ScheduleItem) GetSubject()(*string) { + return m.subject +} +// Serialize serializes information the current object +func (m *ScheduleItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("end", m.GetEnd()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isPrivate", m.GetIsPrivate()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("start", m.GetStart()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subject", m.GetSubject()) + 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 *ScheduleItem) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnd sets the end property value. The date, time, and time zone that the corresponding event ends. +func (m *ScheduleItem) SetEnd(value DateTimeTimeZoneable)() { + m.end = value +} +// SetIsPrivate sets the isPrivate property value. The sensitivity of the corresponding event. True if the event is marked private, false otherwise. Optional. +func (m *ScheduleItem) SetIsPrivate(value *bool)() { + m.isPrivate = value +} +// SetLocation sets the location property value. The location where the corresponding event is held or attended from. Optional. +func (m *ScheduleItem) SetLocation(value *string)() { + m.location = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ScheduleItem) SetOdataType(value *string)() { + m.odataType = value +} +// SetStart sets the start property value. The date, time, and time zone that the corresponding event starts. +func (m *ScheduleItem) SetStart(value DateTimeTimeZoneable)() { + m.start = value +} +// SetStatus sets the status property value. The availability status of the user or resource during the corresponding event. The possible values are: free, tentative, busy, oof, workingElsewhere, unknown. +func (m *ScheduleItem) SetStatus(value *FreeBusyStatus)() { + m.status = value +} +// SetSubject sets the subject property value. The corresponding event's subject line. Optional. +func (m *ScheduleItem) SetSubject(value *string)() { + m.subject = value +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_item_collection_response.go b/src/internal/connector/graph/betasdk/models/schedule_item_collection_response.go new file mode 100644 index 000000000..07490ad7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleItemCollectionResponse +type ScheduleItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ScheduleItemable +} +// NewScheduleItemCollectionResponse instantiates a new ScheduleItemCollectionResponse and sets the default values. +func NewScheduleItemCollectionResponse()(*ScheduleItemCollectionResponse) { + m := &ScheduleItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateScheduleItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScheduleItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScheduleItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScheduleItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScheduleItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScheduleItemable, len(val)) + for i, v := range val { + res[i] = v.(ScheduleItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ScheduleItemCollectionResponse) GetValue()([]ScheduleItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *ScheduleItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ScheduleItemCollectionResponse) SetValue(value []ScheduleItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/schedule_item_collection_responseable.go new file mode 100644 index 000000000..e1cb335dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleItemCollectionResponseable +type ScheduleItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ScheduleItemable) + SetValue(value []ScheduleItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_itemable.go b/src/internal/connector/graph/betasdk/models/schedule_itemable.go new file mode 100644 index 000000000..e5a22a507 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_itemable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScheduleItemable +type ScheduleItemable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnd()(DateTimeTimeZoneable) + GetIsPrivate()(*bool) + GetLocation()(*string) + GetOdataType()(*string) + GetStart()(DateTimeTimeZoneable) + GetStatus()(*FreeBusyStatus) + GetSubject()(*string) + SetEnd(value DateTimeTimeZoneable)() + SetIsPrivate(value *bool)() + SetLocation(value *string)() + SetOdataType(value *string)() + SetStart(value DateTimeTimeZoneable)() + SetStatus(value *FreeBusyStatus)() + SetSubject(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/schedule_request_actions.go b/src/internal/connector/graph/betasdk/models/schedule_request_actions.go new file mode 100644 index 000000000..5ebd94d92 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schedule_request_actions.go @@ -0,0 +1,58 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScheduleRequestActions int + +const ( + ADMINASSIGN_SCHEDULEREQUESTACTIONS ScheduleRequestActions = iota + ADMINUPDATE_SCHEDULEREQUESTACTIONS + ADMINREMOVE_SCHEDULEREQUESTACTIONS + SELFACTIVATE_SCHEDULEREQUESTACTIONS + SELFDEACTIVATE_SCHEDULEREQUESTACTIONS + ADMINEXTEND_SCHEDULEREQUESTACTIONS + ADMINRENEW_SCHEDULEREQUESTACTIONS + SELFEXTEND_SCHEDULEREQUESTACTIONS + SELFRENEW_SCHEDULEREQUESTACTIONS + UNKNOWNFUTUREVALUE_SCHEDULEREQUESTACTIONS +) + +func (i ScheduleRequestActions) String() string { + return []string{"adminAssign", "adminUpdate", "adminRemove", "selfActivate", "selfDeactivate", "adminExtend", "adminRenew", "selfExtend", "selfRenew", "unknownFutureValue"}[i] +} +func ParseScheduleRequestActions(v string) (interface{}, error) { + result := ADMINASSIGN_SCHEDULEREQUESTACTIONS + switch v { + case "adminAssign": + result = ADMINASSIGN_SCHEDULEREQUESTACTIONS + case "adminUpdate": + result = ADMINUPDATE_SCHEDULEREQUESTACTIONS + case "adminRemove": + result = ADMINREMOVE_SCHEDULEREQUESTACTIONS + case "selfActivate": + result = SELFACTIVATE_SCHEDULEREQUESTACTIONS + case "selfDeactivate": + result = SELFDEACTIVATE_SCHEDULEREQUESTACTIONS + case "adminExtend": + result = ADMINEXTEND_SCHEDULEREQUESTACTIONS + case "adminRenew": + result = ADMINRENEW_SCHEDULEREQUESTACTIONS + case "selfExtend": + result = SELFEXTEND_SCHEDULEREQUESTACTIONS + case "selfRenew": + result = SELFRENEW_SCHEDULEREQUESTACTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SCHEDULEREQUESTACTIONS + default: + return 0, errors.New("Unknown ScheduleRequestActions value: " + v) + } + return &result, nil +} +func SerializeScheduleRequestActions(values []ScheduleRequestActions) []string { + 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/scheduleable.go b/src/internal/connector/graph/betasdk/models/scheduleable.go new file mode 100644 index 000000000..9f45a008d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scheduleable.go @@ -0,0 +1,53 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Scheduleable +type Scheduleable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetOfferShiftRequests()([]OfferShiftRequestable) + GetOfferShiftRequestsEnabled()(*bool) + GetOpenShiftChangeRequests()([]OpenShiftChangeRequestable) + GetOpenShifts()([]OpenShiftable) + GetOpenShiftsEnabled()(*bool) + GetProvisionStatus()(*OperationStatus) + GetProvisionStatusCode()(*string) + GetSchedulingGroups()([]SchedulingGroupable) + GetShifts()([]Shiftable) + GetSwapShiftsChangeRequests()([]SwapShiftsChangeRequestable) + GetSwapShiftsRequestsEnabled()(*bool) + GetTimeCards()([]TimeCardable) + GetTimeClockEnabled()(*bool) + GetTimeClockSettings()(TimeClockSettingsable) + GetTimeOffReasons()([]TimeOffReasonable) + GetTimeOffRequests()([]TimeOffRequestable) + GetTimeOffRequestsEnabled()(*bool) + GetTimesOff()([]TimeOffable) + GetTimeZone()(*string) + GetWorkforceIntegrationIds()([]string) + SetEnabled(value *bool)() + SetOfferShiftRequests(value []OfferShiftRequestable)() + SetOfferShiftRequestsEnabled(value *bool)() + SetOpenShiftChangeRequests(value []OpenShiftChangeRequestable)() + SetOpenShifts(value []OpenShiftable)() + SetOpenShiftsEnabled(value *bool)() + SetProvisionStatus(value *OperationStatus)() + SetProvisionStatusCode(value *string)() + SetSchedulingGroups(value []SchedulingGroupable)() + SetShifts(value []Shiftable)() + SetSwapShiftsChangeRequests(value []SwapShiftsChangeRequestable)() + SetSwapShiftsRequestsEnabled(value *bool)() + SetTimeCards(value []TimeCardable)() + SetTimeClockEnabled(value *bool)() + SetTimeClockSettings(value TimeClockSettingsable)() + SetTimeOffReasons(value []TimeOffReasonable)() + SetTimeOffRequests(value []TimeOffRequestable)() + SetTimeOffRequestsEnabled(value *bool)() + SetTimesOff(value []TimeOffable)() + SetTimeZone(value *string)() + SetWorkforceIntegrationIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/scheduling_group.go b/src/internal/connector/graph/betasdk/models/scheduling_group.go new file mode 100644 index 000000000..edd9e8600 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scheduling_group.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchedulingGroup +type SchedulingGroup struct { + ChangeTrackedEntity + // The display name for the schedulingGroup. Required. + displayName *string + // Indicates whether the schedulingGroup can be used when creating new entities or updating existing ones. Required. + isActive *bool + // The list of user IDs that are a member of the schedulingGroup. Required. + userIds []string +} +// NewSchedulingGroup instantiates a new SchedulingGroup and sets the default values. +func NewSchedulingGroup()(*SchedulingGroup) { + m := &SchedulingGroup{ + ChangeTrackedEntity: *NewChangeTrackedEntity(), + } + odataTypeValue := "#microsoft.graph.schedulingGroup"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSchedulingGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchedulingGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchedulingGroup(), nil +} +// GetDisplayName gets the displayName property value. The display name for the schedulingGroup. Required. +func (m *SchedulingGroup) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SchedulingGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ChangeTrackedEntity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["userIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUserIds(res) + } + return nil + } + return res +} +// GetIsActive gets the isActive property value. Indicates whether the schedulingGroup can be used when creating new entities or updating existing ones. Required. +func (m *SchedulingGroup) GetIsActive()(*bool) { + return m.isActive +} +// GetUserIds gets the userIds property value. The list of user IDs that are a member of the schedulingGroup. Required. +func (m *SchedulingGroup) GetUserIds()([]string) { + return m.userIds +} +// Serialize serializes information the current object +func (m *SchedulingGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ChangeTrackedEntity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetUserIds() != nil { + err = writer.WriteCollectionOfStringValues("userIds", m.GetUserIds()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name for the schedulingGroup. Required. +func (m *SchedulingGroup) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsActive sets the isActive property value. Indicates whether the schedulingGroup can be used when creating new entities or updating existing ones. Required. +func (m *SchedulingGroup) SetIsActive(value *bool)() { + m.isActive = value +} +// SetUserIds sets the userIds property value. The list of user IDs that are a member of the schedulingGroup. Required. +func (m *SchedulingGroup) SetUserIds(value []string)() { + m.userIds = value +} diff --git a/src/internal/connector/graph/betasdk/models/scheduling_group_collection_response.go b/src/internal/connector/graph/betasdk/models/scheduling_group_collection_response.go new file mode 100644 index 000000000..785682ce1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scheduling_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchedulingGroupCollectionResponse +type SchedulingGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SchedulingGroupable +} +// NewSchedulingGroupCollectionResponse instantiates a new SchedulingGroupCollectionResponse and sets the default values. +func NewSchedulingGroupCollectionResponse()(*SchedulingGroupCollectionResponse) { + m := &SchedulingGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSchedulingGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchedulingGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchedulingGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SchedulingGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSchedulingGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SchedulingGroupable, len(val)) + for i, v := range val { + res[i] = v.(SchedulingGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SchedulingGroupCollectionResponse) GetValue()([]SchedulingGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *SchedulingGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SchedulingGroupCollectionResponse) SetValue(value []SchedulingGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/scheduling_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/scheduling_group_collection_responseable.go new file mode 100644 index 000000000..5f80438d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scheduling_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchedulingGroupCollectionResponseable +type SchedulingGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SchedulingGroupable) + SetValue(value []SchedulingGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/scheduling_groupable.go b/src/internal/connector/graph/betasdk/models/scheduling_groupable.go new file mode 100644 index 000000000..cf6522443 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scheduling_groupable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchedulingGroupable +type SchedulingGroupable interface { + ChangeTrackedEntityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetIsActive()(*bool) + GetUserIds()([]string) + SetDisplayName(value *string)() + SetIsActive(value *bool)() + SetUserIds(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/schema.go b/src/internal/connector/graph/betasdk/models/schema.go new file mode 100644 index 000000000..617e3686c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schema.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Schema +type Schema struct { + Entity + // The baseType property + baseType *string + // The properties property + properties []Propertyable +} +// NewSchema instantiates a new schema and sets the default values. +func NewSchema()(*Schema) { + m := &Schema{ + Entity: *NewEntity(), + } + return m +} +// CreateSchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchema(), nil +} +// GetBaseType gets the baseType property value. The baseType property +func (m *Schema) GetBaseType()(*string) { + return m.baseType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Schema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["baseType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetBaseType(val) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Propertyable, len(val)) + for i, v := range val { + res[i] = v.(Propertyable) + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetProperties gets the properties property value. The properties property +func (m *Schema) GetProperties()([]Propertyable) { + return m.properties +} +// Serialize serializes information the current object +func (m *Schema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("baseType", m.GetBaseType()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + return nil +} +// SetBaseType sets the baseType property value. The baseType property +func (m *Schema) SetBaseType(value *string)() { + m.baseType = value +} +// SetProperties sets the properties property value. The properties property +func (m *Schema) SetProperties(value []Propertyable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/schema_extension.go b/src/internal/connector/graph/betasdk/models/schema_extension.go new file mode 100644 index 000000000..049fcf308 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schema_extension.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchemaExtension +type SchemaExtension struct { + Entity + // Description for the schema extension. Supports $filter (eq). + description *string + // The appId of the application that is the owner of the schema extension. This property can be supplied on creation, to set the owner. If not supplied, then the calling application's appId will be set as the owner. In either case, the signed-in user must be the owner of the application. So, for example, if creating a new schema extension definition using Graph Explorer, you must supply the owner property. Once set, this property is read-only and cannot be changed. Supports $filter (eq). + owner *string + // The collection of property names and types that make up the schema extension definition. + properties []ExtensionSchemaPropertyable + // The lifecycle state of the schema extension. Possible states are InDevelopment, Available, and Deprecated. Automatically set to InDevelopment on creation. For more information about the possible state transitions and behaviors, see Schema extensions lifecycle. Supports $filter (eq). + status *string + // Set of Microsoft Graph types (that can support extensions) that the schema extension can be applied to. Select from administrativeUnit, contact, device, event, group, message, organization, post, todoTask, todoTaskList, or user. + targetTypes []string +} +// NewSchemaExtension instantiates a new SchemaExtension and sets the default values. +func NewSchemaExtension()(*SchemaExtension) { + m := &SchemaExtension{ + Entity: *NewEntity(), + } + return m +} +// CreateSchemaExtensionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchemaExtensionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchemaExtension(), nil +} +// GetDescription gets the description property value. Description for the schema extension. Supports $filter (eq). +func (m *SchemaExtension) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SchemaExtension) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOwner(val) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateExtensionSchemaPropertyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ExtensionSchemaPropertyable, len(val)) + for i, v := range val { + res[i] = v.(ExtensionSchemaPropertyable) + } + m.SetProperties(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatus(val) + } + return nil + } + res["targetTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTargetTypes(res) + } + return nil + } + return res +} +// GetOwner gets the owner property value. The appId of the application that is the owner of the schema extension. This property can be supplied on creation, to set the owner. If not supplied, then the calling application's appId will be set as the owner. In either case, the signed-in user must be the owner of the application. So, for example, if creating a new schema extension definition using Graph Explorer, you must supply the owner property. Once set, this property is read-only and cannot be changed. Supports $filter (eq). +func (m *SchemaExtension) GetOwner()(*string) { + return m.owner +} +// GetProperties gets the properties property value. The collection of property names and types that make up the schema extension definition. +func (m *SchemaExtension) GetProperties()([]ExtensionSchemaPropertyable) { + return m.properties +} +// GetStatus gets the status property value. The lifecycle state of the schema extension. Possible states are InDevelopment, Available, and Deprecated. Automatically set to InDevelopment on creation. For more information about the possible state transitions and behaviors, see Schema extensions lifecycle. Supports $filter (eq). +func (m *SchemaExtension) GetStatus()(*string) { + return m.status +} +// GetTargetTypes gets the targetTypes property value. Set of Microsoft Graph types (that can support extensions) that the schema extension can be applied to. Select from administrativeUnit, contact, device, event, group, message, organization, post, todoTask, todoTaskList, or user. +func (m *SchemaExtension) GetTargetTypes()([]string) { + return m.targetTypes +} +// Serialize serializes information the current object +func (m *SchemaExtension) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("status", m.GetStatus()) + if err != nil { + return err + } + } + if m.GetTargetTypes() != nil { + err = writer.WriteCollectionOfStringValues("targetTypes", m.GetTargetTypes()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Description for the schema extension. Supports $filter (eq). +func (m *SchemaExtension) SetDescription(value *string)() { + m.description = value +} +// SetOwner sets the owner property value. The appId of the application that is the owner of the schema extension. This property can be supplied on creation, to set the owner. If not supplied, then the calling application's appId will be set as the owner. In either case, the signed-in user must be the owner of the application. So, for example, if creating a new schema extension definition using Graph Explorer, you must supply the owner property. Once set, this property is read-only and cannot be changed. Supports $filter (eq). +func (m *SchemaExtension) SetOwner(value *string)() { + m.owner = value +} +// SetProperties sets the properties property value. The collection of property names and types that make up the schema extension definition. +func (m *SchemaExtension) SetProperties(value []ExtensionSchemaPropertyable)() { + m.properties = value +} +// SetStatus sets the status property value. The lifecycle state of the schema extension. Possible states are InDevelopment, Available, and Deprecated. Automatically set to InDevelopment on creation. For more information about the possible state transitions and behaviors, see Schema extensions lifecycle. Supports $filter (eq). +func (m *SchemaExtension) SetStatus(value *string)() { + m.status = value +} +// SetTargetTypes sets the targetTypes property value. Set of Microsoft Graph types (that can support extensions) that the schema extension can be applied to. Select from administrativeUnit, contact, device, event, group, message, organization, post, todoTask, todoTaskList, or user. +func (m *SchemaExtension) SetTargetTypes(value []string)() { + m.targetTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/schema_extension_collection_response.go b/src/internal/connector/graph/betasdk/models/schema_extension_collection_response.go new file mode 100644 index 000000000..e193ade17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schema_extension_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchemaExtensionCollectionResponse +type SchemaExtensionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SchemaExtensionable +} +// NewSchemaExtensionCollectionResponse instantiates a new SchemaExtensionCollectionResponse and sets the default values. +func NewSchemaExtensionCollectionResponse()(*SchemaExtensionCollectionResponse) { + m := &SchemaExtensionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSchemaExtensionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSchemaExtensionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSchemaExtensionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SchemaExtensionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSchemaExtensionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SchemaExtensionable, len(val)) + for i, v := range val { + res[i] = v.(SchemaExtensionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SchemaExtensionCollectionResponse) GetValue()([]SchemaExtensionable) { + return m.value +} +// Serialize serializes information the current object +func (m *SchemaExtensionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SchemaExtensionCollectionResponse) SetValue(value []SchemaExtensionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/schema_extension_collection_responseable.go b/src/internal/connector/graph/betasdk/models/schema_extension_collection_responseable.go new file mode 100644 index 000000000..b5869605c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schema_extension_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchemaExtensionCollectionResponseable +type SchemaExtensionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SchemaExtensionable) + SetValue(value []SchemaExtensionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/schema_extensionable.go b/src/internal/connector/graph/betasdk/models/schema_extensionable.go new file mode 100644 index 000000000..46fbefd7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schema_extensionable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SchemaExtensionable +type SchemaExtensionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetOwner()(*string) + GetProperties()([]ExtensionSchemaPropertyable) + GetStatus()(*string) + GetTargetTypes()([]string) + SetDescription(value *string)() + SetOwner(value *string)() + SetProperties(value []ExtensionSchemaPropertyable)() + SetStatus(value *string)() + SetTargetTypes(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/schemaable.go b/src/internal/connector/graph/betasdk/models/schemaable.go new file mode 100644 index 000000000..daa08e56f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/schemaable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Schemaable +type Schemaable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBaseType()(*string) + GetProperties()([]Propertyable) + SetBaseType(value *string)() + SetProperties(value []Propertyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/scope_operator_multi_valued_comparison_type.go b/src/internal/connector/graph/betasdk/models/scope_operator_multi_valued_comparison_type.go new file mode 100644 index 000000000..c41605a4a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scope_operator_multi_valued_comparison_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScopeOperatorMultiValuedComparisonType int + +const ( + ALL_SCOPEOPERATORMULTIVALUEDCOMPARISONTYPE ScopeOperatorMultiValuedComparisonType = iota + ANY_SCOPEOPERATORMULTIVALUEDCOMPARISONTYPE +) + +func (i ScopeOperatorMultiValuedComparisonType) String() string { + return []string{"All", "Any"}[i] +} +func ParseScopeOperatorMultiValuedComparisonType(v string) (interface{}, error) { + result := ALL_SCOPEOPERATORMULTIVALUEDCOMPARISONTYPE + switch v { + case "All": + result = ALL_SCOPEOPERATORMULTIVALUEDCOMPARISONTYPE + case "Any": + result = ANY_SCOPEOPERATORMULTIVALUEDCOMPARISONTYPE + default: + return 0, errors.New("Unknown ScopeOperatorMultiValuedComparisonType value: " + v) + } + return &result, nil +} +func SerializeScopeOperatorMultiValuedComparisonType(values []ScopeOperatorMultiValuedComparisonType) []string { + 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/scope_operator_type.go b/src/internal/connector/graph/betasdk/models/scope_operator_type.go new file mode 100644 index 000000000..faa882df1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scope_operator_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScopeOperatorType int + +const ( + BINARY_SCOPEOPERATORTYPE ScopeOperatorType = iota + UNARY_SCOPEOPERATORTYPE +) + +func (i ScopeOperatorType) String() string { + return []string{"Binary", "Unary"}[i] +} +func ParseScopeOperatorType(v string) (interface{}, error) { + result := BINARY_SCOPEOPERATORTYPE + switch v { + case "Binary": + result = BINARY_SCOPEOPERATORTYPE + case "Unary": + result = UNARY_SCOPEOPERATORTYPE + default: + return 0, errors.New("Unknown ScopeOperatorType value: " + v) + } + return &result, nil +} +func SerializeScopeOperatorType(values []ScopeOperatorType) []string { + 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/scoped_role_membership.go b/src/internal/connector/graph/betasdk/models/scoped_role_membership.go new file mode 100644 index 000000000..b0e805e78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scoped_role_membership.go @@ -0,0 +1,112 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScopedRoleMembership provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ScopedRoleMembership struct { + Entity + // Unique identifier for the administrative unit that the directory role is scoped to + administrativeUnitId *string + // Unique identifier for the directory role that the member is in. + roleId *string + // The roleMemberInfo property + roleMemberInfo Identityable +} +// NewScopedRoleMembership instantiates a new scopedRoleMembership and sets the default values. +func NewScopedRoleMembership()(*ScopedRoleMembership) { + m := &ScopedRoleMembership{ + Entity: *NewEntity(), + } + return m +} +// CreateScopedRoleMembershipFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScopedRoleMembershipFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScopedRoleMembership(), nil +} +// GetAdministrativeUnitId gets the administrativeUnitId property value. Unique identifier for the administrative unit that the directory role is scoped to +func (m *ScopedRoleMembership) GetAdministrativeUnitId()(*string) { + return m.administrativeUnitId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScopedRoleMembership) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["administrativeUnitId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdministrativeUnitId(val) + } + return nil + } + res["roleId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRoleId(val) + } + return nil + } + res["roleMemberInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoleMemberInfo(val.(Identityable)) + } + return nil + } + return res +} +// GetRoleId gets the roleId property value. Unique identifier for the directory role that the member is in. +func (m *ScopedRoleMembership) GetRoleId()(*string) { + return m.roleId +} +// GetRoleMemberInfo gets the roleMemberInfo property value. The roleMemberInfo property +func (m *ScopedRoleMembership) GetRoleMemberInfo()(Identityable) { + return m.roleMemberInfo +} +// Serialize serializes information the current object +func (m *ScopedRoleMembership) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("administrativeUnitId", m.GetAdministrativeUnitId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("roleId", m.GetRoleId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("roleMemberInfo", m.GetRoleMemberInfo()) + if err != nil { + return err + } + } + return nil +} +// SetAdministrativeUnitId sets the administrativeUnitId property value. Unique identifier for the administrative unit that the directory role is scoped to +func (m *ScopedRoleMembership) SetAdministrativeUnitId(value *string)() { + m.administrativeUnitId = value +} +// SetRoleId sets the roleId property value. Unique identifier for the directory role that the member is in. +func (m *ScopedRoleMembership) SetRoleId(value *string)() { + m.roleId = value +} +// SetRoleMemberInfo sets the roleMemberInfo property value. The roleMemberInfo property +func (m *ScopedRoleMembership) SetRoleMemberInfo(value Identityable)() { + m.roleMemberInfo = value +} diff --git a/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_response.go b/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_response.go new file mode 100644 index 000000000..f52ec4139 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScopedRoleMembershipCollectionResponse +type ScopedRoleMembershipCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ScopedRoleMembershipable +} +// NewScopedRoleMembershipCollectionResponse instantiates a new ScopedRoleMembershipCollectionResponse and sets the default values. +func NewScopedRoleMembershipCollectionResponse()(*ScopedRoleMembershipCollectionResponse) { + m := &ScopedRoleMembershipCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateScopedRoleMembershipCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateScopedRoleMembershipCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewScopedRoleMembershipCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ScopedRoleMembershipCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateScopedRoleMembershipFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ScopedRoleMembershipable, len(val)) + for i, v := range val { + res[i] = v.(ScopedRoleMembershipable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ScopedRoleMembershipCollectionResponse) GetValue()([]ScopedRoleMembershipable) { + return m.value +} +// Serialize serializes information the current object +func (m *ScopedRoleMembershipCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ScopedRoleMembershipCollectionResponse) SetValue(value []ScopedRoleMembershipable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_responseable.go b/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_responseable.go new file mode 100644 index 000000000..21ac5d8ba --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scoped_role_membership_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScopedRoleMembershipCollectionResponseable +type ScopedRoleMembershipCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ScopedRoleMembershipable) + SetValue(value []ScopedRoleMembershipable)() +} diff --git a/src/internal/connector/graph/betasdk/models/scoped_role_membershipable.go b/src/internal/connector/graph/betasdk/models/scoped_role_membershipable.go new file mode 100644 index 000000000..9972660fa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/scoped_role_membershipable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ScopedRoleMembershipable +type ScopedRoleMembershipable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdministrativeUnitId()(*string) + GetRoleId()(*string) + GetRoleMemberInfo()(Identityable) + SetAdministrativeUnitId(value *string)() + SetRoleId(value *string)() + SetRoleMemberInfo(value Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/acronym.go b/src/internal/connector/graph/betasdk/models/search/acronym.go new file mode 100644 index 000000000..c9dc5556d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/acronym.go @@ -0,0 +1,87 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Acronym +type Acronym struct { + SearchAnswer + // What the acronym stands for. + standsFor *string + // The state property + state *AnswerState +} +// NewAcronym instantiates a new Acronym and sets the default values. +func NewAcronym()(*Acronym) { + m := &Acronym{ + SearchAnswer: *NewSearchAnswer(), + } + return m +} +// CreateAcronymFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAcronymFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAcronym(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Acronym) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SearchAnswer.GetFieldDeserializers() + res["standsFor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStandsFor(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AnswerState)) + } + return nil + } + return res +} +// GetStandsFor gets the standsFor property value. What the acronym stands for. +func (m *Acronym) GetStandsFor()(*string) { + return m.standsFor +} +// GetState gets the state property value. The state property +func (m *Acronym) GetState()(*AnswerState) { + return m.state +} +// Serialize serializes information the current object +func (m *Acronym) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SearchAnswer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("standsFor", m.GetStandsFor()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetStandsFor sets the standsFor property value. What the acronym stands for. +func (m *Acronym) SetStandsFor(value *string)() { + m.standsFor = value +} +// SetState sets the state property value. The state property +func (m *Acronym) SetState(value *AnswerState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/acronym_collection_response.go b/src/internal/connector/graph/betasdk/models/search/acronym_collection_response.go new file mode 100644 index 000000000..9c411679b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/acronym_collection_response.go @@ -0,0 +1,69 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AcronymCollectionResponse +type AcronymCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Acronymable +} +// NewAcronymCollectionResponse instantiates a new AcronymCollectionResponse and sets the default values. +func NewAcronymCollectionResponse()(*AcronymCollectionResponse) { + m := &AcronymCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAcronymCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAcronymCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAcronymCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AcronymCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAcronymFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Acronymable, len(val)) + for i, v := range val { + res[i] = v.(Acronymable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AcronymCollectionResponse) GetValue()([]Acronymable) { + return m.value +} +// Serialize serializes information the current object +func (m *AcronymCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AcronymCollectionResponse) SetValue(value []Acronymable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/acronym_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search/acronym_collection_responseable.go new file mode 100644 index 000000000..4628ec0f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/acronym_collection_responseable.go @@ -0,0 +1,14 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AcronymCollectionResponseable +type AcronymCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Acronymable) + SetValue(value []Acronymable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/acronymable.go b/src/internal/connector/graph/betasdk/models/search/acronymable.go new file mode 100644 index 000000000..3f2add371 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/acronymable.go @@ -0,0 +1,15 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Acronymable +type Acronymable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SearchAnswerable + GetStandsFor()(*string) + GetState()(*AnswerState) + SetStandsFor(value *string)() + SetState(value *AnswerState)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_keyword.go b/src/internal/connector/graph/betasdk/models/search/answer_keyword.go new file mode 100644 index 000000000..b5f760a96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_keyword.go @@ -0,0 +1,157 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnswerKeyword +type AnswerKeyword struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A collection of keywords used to trigger the search answer. + keywords []string + // If true, indicates that the search term contains similar words to the keywords that should trigger the search answer. + matchSimilarKeywords *bool + // The OdataType property + odataType *string + // Unique keywords that will guarantee the search answer is triggered. + reservedKeywords []string +} +// NewAnswerKeyword instantiates a new answerKeyword and sets the default values. +func NewAnswerKeyword()(*AnswerKeyword) { + m := &AnswerKeyword{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAnswerKeywordFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnswerKeywordFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnswerKeyword(), 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 *AnswerKeyword) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnswerKeyword) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["keywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKeywords(res) + } + return nil + } + res["matchSimilarKeywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMatchSimilarKeywords(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["reservedKeywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReservedKeywords(res) + } + return nil + } + return res +} +// GetKeywords gets the keywords property value. A collection of keywords used to trigger the search answer. +func (m *AnswerKeyword) GetKeywords()([]string) { + return m.keywords +} +// GetMatchSimilarKeywords gets the matchSimilarKeywords property value. If true, indicates that the search term contains similar words to the keywords that should trigger the search answer. +func (m *AnswerKeyword) GetMatchSimilarKeywords()(*bool) { + return m.matchSimilarKeywords +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AnswerKeyword) GetOdataType()(*string) { + return m.odataType +} +// GetReservedKeywords gets the reservedKeywords property value. Unique keywords that will guarantee the search answer is triggered. +func (m *AnswerKeyword) GetReservedKeywords()([]string) { + return m.reservedKeywords +} +// Serialize serializes information the current object +func (m *AnswerKeyword) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetKeywords() != nil { + err := writer.WriteCollectionOfStringValues("keywords", m.GetKeywords()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("matchSimilarKeywords", m.GetMatchSimilarKeywords()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetReservedKeywords() != nil { + err := writer.WriteCollectionOfStringValues("reservedKeywords", m.GetReservedKeywords()) + 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 *AnswerKeyword) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetKeywords sets the keywords property value. A collection of keywords used to trigger the search answer. +func (m *AnswerKeyword) SetKeywords(value []string)() { + m.keywords = value +} +// SetMatchSimilarKeywords sets the matchSimilarKeywords property value. If true, indicates that the search term contains similar words to the keywords that should trigger the search answer. +func (m *AnswerKeyword) SetMatchSimilarKeywords(value *bool)() { + m.matchSimilarKeywords = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AnswerKeyword) SetOdataType(value *string)() { + m.odataType = value +} +// SetReservedKeywords sets the reservedKeywords property value. Unique keywords that will guarantee the search answer is triggered. +func (m *AnswerKeyword) SetReservedKeywords(value []string)() { + m.reservedKeywords = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_keywordable.go b/src/internal/connector/graph/betasdk/models/search/answer_keywordable.go new file mode 100644 index 000000000..4811a7423 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_keywordable.go @@ -0,0 +1,19 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnswerKeywordable +type AnswerKeywordable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetKeywords()([]string) + GetMatchSimilarKeywords()(*bool) + GetOdataType()(*string) + GetReservedKeywords()([]string) + SetKeywords(value []string)() + SetMatchSimilarKeywords(value *bool)() + SetOdataType(value *string)() + SetReservedKeywords(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_state.go b/src/internal/connector/graph/betasdk/models/search/answer_state.go new file mode 100644 index 000000000..6c67af650 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_state.go @@ -0,0 +1,40 @@ +package search +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AnswerState int + +const ( + PUBLISHED_ANSWERSTATE AnswerState = iota + DRAFT_ANSWERSTATE + EXCLUDED_ANSWERSTATE + UNKNOWNFUTUREVALUE_ANSWERSTATE +) + +func (i AnswerState) String() string { + return []string{"published", "draft", "excluded", "unknownFutureValue"}[i] +} +func ParseAnswerState(v string) (interface{}, error) { + result := PUBLISHED_ANSWERSTATE + switch v { + case "published": + result = PUBLISHED_ANSWERSTATE + case "draft": + result = DRAFT_ANSWERSTATE + case "excluded": + result = EXCLUDED_ANSWERSTATE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ANSWERSTATE + default: + return 0, errors.New("Unknown AnswerState value: " + v) + } + return &result, nil +} +func SerializeAnswerState(values []AnswerState) []string { + 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/search/answer_variant.go b/src/internal/connector/graph/betasdk/models/search/answer_variant.go new file mode 100644 index 000000000..884321e7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_variant.go @@ -0,0 +1,203 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AnswerVariant +type AnswerVariant struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Answer variation description shown on search results page. + description *string + // Answer variation name displayed in search results. + displayName *string + // The languageTag property + languageTag *string + // The OdataType property + odataType *string + // The platform property + platform *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType + // Answer variation URL link. When users click this answer variation in search results, they will go to this URL. + webUrl *string +} +// NewAnswerVariant instantiates a new answerVariant and sets the default values. +func NewAnswerVariant()(*AnswerVariant) { + m := &AnswerVariant{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAnswerVariantFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnswerVariantFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnswerVariant(), 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 *AnswerVariant) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDescription gets the description property value. Answer variation description shown on search results page. +func (m *AnswerVariant) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Answer variation name displayed in search results. +func (m *AnswerVariant) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnswerVariant) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + 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["platform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + m.SetPlatform(val.(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetLanguageTag gets the languageTag property value. The languageTag property +func (m *AnswerVariant) GetLanguageTag()(*string) { + return m.languageTag +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AnswerVariant) GetOdataType()(*string) { + return m.odataType +} +// GetPlatform gets the platform property value. The platform property +func (m *AnswerVariant) GetPlatform()(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) { + return m.platform +} +// GetWebUrl gets the webUrl property value. Answer variation URL link. When users click this answer variation in search results, they will go to this URL. +func (m *AnswerVariant) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *AnswerVariant) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("languageTag", m.GetLanguageTag()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPlatform() != nil { + cast := (*m.GetPlatform()).String() + err := writer.WriteStringValue("platform", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *AnswerVariant) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDescription sets the description property value. Answer variation description shown on search results page. +func (m *AnswerVariant) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Answer variation name displayed in search results. +func (m *AnswerVariant) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLanguageTag sets the languageTag property value. The languageTag property +func (m *AnswerVariant) SetLanguageTag(value *string)() { + m.languageTag = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AnswerVariant) SetOdataType(value *string)() { + m.odataType = value +} +// SetPlatform sets the platform property value. The platform property +func (m *AnswerVariant) SetPlatform(value *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() { + m.platform = value +} +// SetWebUrl sets the webUrl property value. Answer variation URL link. When users click this answer variation in search results, they will go to this URL. +func (m *AnswerVariant) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_response.go b/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_response.go new file mode 100644 index 000000000..b6d7f3ab0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_response.go @@ -0,0 +1,69 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AnswerVariantCollectionResponse +type AnswerVariantCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AnswerVariantable +} +// NewAnswerVariantCollectionResponse instantiates a new AnswerVariantCollectionResponse and sets the default values. +func NewAnswerVariantCollectionResponse()(*AnswerVariantCollectionResponse) { + m := &AnswerVariantCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAnswerVariantCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnswerVariantCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnswerVariantCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnswerVariantCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAnswerVariantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AnswerVariantable, len(val)) + for i, v := range val { + res[i] = v.(AnswerVariantable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AnswerVariantCollectionResponse) GetValue()([]AnswerVariantable) { + return m.value +} +// Serialize serializes information the current object +func (m *AnswerVariantCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AnswerVariantCollectionResponse) SetValue(value []AnswerVariantable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_responseable.go new file mode 100644 index 000000000..243647d60 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_variant_collection_responseable.go @@ -0,0 +1,14 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AnswerVariantCollectionResponseable +type AnswerVariantCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AnswerVariantable) + SetValue(value []AnswerVariantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/answer_variantable.go b/src/internal/connector/graph/betasdk/models/search/answer_variantable.go new file mode 100644 index 000000000..d6c1f48f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/answer_variantable.go @@ -0,0 +1,24 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AnswerVariantable +type AnswerVariantable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetLanguageTag()(*string) + GetOdataType()(*string) + GetPlatform()(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLanguageTag(value *string)() + SetOdataType(value *string)() + SetPlatform(value *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/bookmark.go b/src/internal/connector/graph/betasdk/models/search/bookmark.go new file mode 100644 index 000000000..9b9d6abbd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/bookmark.go @@ -0,0 +1,351 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Bookmark +type Bookmark struct { + SearchAnswer + // Timestamp of when the bookmark will stop to appear as a search result. Set as null for always available. + availabilityEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp of when the bookmark will start to appear as a search result. Set as null for always available. + availabilityStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Categories commonly used to describe this bookmark. For example, IT and HR. + categories []string + // List of security groups able to view this bookmark. + groupIds []string + // True if this bookmark was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. + isSuggested *bool + // Keywords that trigger this bookmark to appear in search results. + keywords AnswerKeywordable + // A list of language names that are geographically specific and that this bookmark can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. See supported language tags for the list of possible values. + languageTags []string + // List of devices and operating systems able to view this bookmark. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. + platforms []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType + // List of Power Apps associated with this bookmark. If users add existing Power Apps to a bookmark, they can complete tasks, such as to enter vacation time or to report expenses on the search results page. + powerAppIds []string + // The state property + state *AnswerState + // Variations of a bookmark for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. + targetedVariations []AnswerVariantable +} +// NewBookmark instantiates a new Bookmark and sets the default values. +func NewBookmark()(*Bookmark) { + m := &Bookmark{ + SearchAnswer: *NewSearchAnswer(), + } + return m +} +// CreateBookmarkFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookmarkFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookmark(), nil +} +// GetAvailabilityEndDateTime gets the availabilityEndDateTime property value. Timestamp of when the bookmark will stop to appear as a search result. Set as null for always available. +func (m *Bookmark) GetAvailabilityEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.availabilityEndDateTime +} +// GetAvailabilityStartDateTime gets the availabilityStartDateTime property value. Timestamp of when the bookmark will start to appear as a search result. Set as null for always available. +func (m *Bookmark) GetAvailabilityStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.availabilityStartDateTime +} +// GetCategories gets the categories property value. Categories commonly used to describe this bookmark. For example, IT and HR. +func (m *Bookmark) GetCategories()([]string) { + return m.categories +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Bookmark) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SearchAnswer.GetFieldDeserializers() + res["availabilityEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityEndDateTime(val) + } + return nil + } + res["availabilityStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityStartDateTime(val) + } + return nil + } + res["categories"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCategories(res) + } + return nil + } + res["groupIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGroupIds(res) + } + return nil + } + res["isSuggested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSuggested(val) + } + return nil + } + res["keywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAnswerKeywordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKeywords(val.(AnswerKeywordable)) + } + return nil + } + res["languageTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetLanguageTags(res) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType, len(val)) + for i, v := range val { + res[i] = *(v.(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)) + } + m.SetPlatforms(res) + } + return nil + } + res["powerAppIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetPowerAppIds(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AnswerState)) + } + return nil + } + res["targetedVariations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAnswerVariantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AnswerVariantable, len(val)) + for i, v := range val { + res[i] = v.(AnswerVariantable) + } + m.SetTargetedVariations(res) + } + return nil + } + return res +} +// GetGroupIds gets the groupIds property value. List of security groups able to view this bookmark. +func (m *Bookmark) GetGroupIds()([]string) { + return m.groupIds +} +// GetIsSuggested gets the isSuggested property value. True if this bookmark was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. +func (m *Bookmark) GetIsSuggested()(*bool) { + return m.isSuggested +} +// GetKeywords gets the keywords property value. Keywords that trigger this bookmark to appear in search results. +func (m *Bookmark) GetKeywords()(AnswerKeywordable) { + return m.keywords +} +// GetLanguageTags gets the languageTags property value. A list of language names that are geographically specific and that this bookmark can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. See supported language tags for the list of possible values. +func (m *Bookmark) GetLanguageTags()([]string) { + return m.languageTags +} +// GetPlatforms gets the platforms property value. List of devices and operating systems able to view this bookmark. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. +func (m *Bookmark) GetPlatforms()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) { + return m.platforms +} +// GetPowerAppIds gets the powerAppIds property value. List of Power Apps associated with this bookmark. If users add existing Power Apps to a bookmark, they can complete tasks, such as to enter vacation time or to report expenses on the search results page. +func (m *Bookmark) GetPowerAppIds()([]string) { + return m.powerAppIds +} +// GetState gets the state property value. The state property +func (m *Bookmark) GetState()(*AnswerState) { + return m.state +} +// GetTargetedVariations gets the targetedVariations property value. Variations of a bookmark for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. +func (m *Bookmark) GetTargetedVariations()([]AnswerVariantable) { + return m.targetedVariations +} +// Serialize serializes information the current object +func (m *Bookmark) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SearchAnswer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("availabilityEndDateTime", m.GetAvailabilityEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("availabilityStartDateTime", m.GetAvailabilityStartDateTime()) + if err != nil { + return err + } + } + if m.GetCategories() != nil { + err = writer.WriteCollectionOfStringValues("categories", m.GetCategories()) + if err != nil { + return err + } + } + if m.GetGroupIds() != nil { + err = writer.WriteCollectionOfStringValues("groupIds", m.GetGroupIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSuggested", m.GetIsSuggested()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("keywords", m.GetKeywords()) + if err != nil { + return err + } + } + if m.GetLanguageTags() != nil { + err = writer.WriteCollectionOfStringValues("languageTags", m.GetLanguageTags()) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + err = writer.WriteCollectionOfStringValues("platforms", ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SerializeDevicePlatformType(m.GetPlatforms())) + if err != nil { + return err + } + } + if m.GetPowerAppIds() != nil { + err = writer.WriteCollectionOfStringValues("powerAppIds", m.GetPowerAppIds()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetTargetedVariations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedVariations())) + for i, v := range m.GetTargetedVariations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedVariations", cast) + if err != nil { + return err + } + } + return nil +} +// SetAvailabilityEndDateTime sets the availabilityEndDateTime property value. Timestamp of when the bookmark will stop to appear as a search result. Set as null for always available. +func (m *Bookmark) SetAvailabilityEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.availabilityEndDateTime = value +} +// SetAvailabilityStartDateTime sets the availabilityStartDateTime property value. Timestamp of when the bookmark will start to appear as a search result. Set as null for always available. +func (m *Bookmark) SetAvailabilityStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.availabilityStartDateTime = value +} +// SetCategories sets the categories property value. Categories commonly used to describe this bookmark. For example, IT and HR. +func (m *Bookmark) SetCategories(value []string)() { + m.categories = value +} +// SetGroupIds sets the groupIds property value. List of security groups able to view this bookmark. +func (m *Bookmark) SetGroupIds(value []string)() { + m.groupIds = value +} +// SetIsSuggested sets the isSuggested property value. True if this bookmark was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. +func (m *Bookmark) SetIsSuggested(value *bool)() { + m.isSuggested = value +} +// SetKeywords sets the keywords property value. Keywords that trigger this bookmark to appear in search results. +func (m *Bookmark) SetKeywords(value AnswerKeywordable)() { + m.keywords = value +} +// SetLanguageTags sets the languageTags property value. A list of language names that are geographically specific and that this bookmark can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. See supported language tags for the list of possible values. +func (m *Bookmark) SetLanguageTags(value []string)() { + m.languageTags = value +} +// SetPlatforms sets the platforms property value. List of devices and operating systems able to view this bookmark. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. +func (m *Bookmark) SetPlatforms(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() { + m.platforms = value +} +// SetPowerAppIds sets the powerAppIds property value. List of Power Apps associated with this bookmark. If users add existing Power Apps to a bookmark, they can complete tasks, such as to enter vacation time or to report expenses on the search results page. +func (m *Bookmark) SetPowerAppIds(value []string)() { + m.powerAppIds = value +} +// SetState sets the state property value. The state property +func (m *Bookmark) SetState(value *AnswerState)() { + m.state = value +} +// SetTargetedVariations sets the targetedVariations property value. Variations of a bookmark for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. +func (m *Bookmark) SetTargetedVariations(value []AnswerVariantable)() { + m.targetedVariations = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/bookmark_collection_response.go b/src/internal/connector/graph/betasdk/models/search/bookmark_collection_response.go new file mode 100644 index 000000000..fed87dee3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/bookmark_collection_response.go @@ -0,0 +1,69 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// BookmarkCollectionResponse +type BookmarkCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Bookmarkable +} +// NewBookmarkCollectionResponse instantiates a new BookmarkCollectionResponse and sets the default values. +func NewBookmarkCollectionResponse()(*BookmarkCollectionResponse) { + m := &BookmarkCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateBookmarkCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateBookmarkCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewBookmarkCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *BookmarkCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateBookmarkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Bookmarkable, len(val)) + for i, v := range val { + res[i] = v.(Bookmarkable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *BookmarkCollectionResponse) GetValue()([]Bookmarkable) { + return m.value +} +// Serialize serializes information the current object +func (m *BookmarkCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *BookmarkCollectionResponse) SetValue(value []Bookmarkable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/bookmark_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search/bookmark_collection_responseable.go new file mode 100644 index 000000000..2d11eba91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/bookmark_collection_responseable.go @@ -0,0 +1,14 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// BookmarkCollectionResponseable +type BookmarkCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Bookmarkable) + SetValue(value []Bookmarkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/bookmarkable.go b/src/internal/connector/graph/betasdk/models/search/bookmarkable.go new file mode 100644 index 000000000..a66445acc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/bookmarkable.go @@ -0,0 +1,35 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Bookmarkable +type Bookmarkable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SearchAnswerable + GetAvailabilityEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAvailabilityStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCategories()([]string) + GetGroupIds()([]string) + GetIsSuggested()(*bool) + GetKeywords()(AnswerKeywordable) + GetLanguageTags()([]string) + GetPlatforms()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) + GetPowerAppIds()([]string) + GetState()(*AnswerState) + GetTargetedVariations()([]AnswerVariantable) + SetAvailabilityEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAvailabilityStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCategories(value []string)() + SetGroupIds(value []string)() + SetIsSuggested(value *bool)() + SetKeywords(value AnswerKeywordable)() + SetLanguageTags(value []string)() + SetPlatforms(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() + SetPowerAppIds(value []string)() + SetState(value *AnswerState)() + SetTargetedVariations(value []AnswerVariantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/identity.go b/src/internal/connector/graph/betasdk/models/search/identity.go new file mode 100644 index 000000000..285154f7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/identity.go @@ -0,0 +1,123 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Identity +type Identity 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 displayName property + displayName *string + // The id property + id *string + // The OdataType property + odataType *string +} +// NewIdentity instantiates a new identity and sets the default values. +func NewIdentity()(*Identity) { + m := &Identity{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentity(), 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 *Identity) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Identity) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Identity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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 + } + return res +} +// GetId gets the id property value. The id property +func (m *Identity) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Identity) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Identity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Identity) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Identity) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. The id property +func (m *Identity) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Identity) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/identity_set.go b/src/internal/connector/graph/betasdk/models/search/identity_set.go new file mode 100644 index 000000000..357b68a87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/identity_set.go @@ -0,0 +1,149 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySet +type IdentitySet 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 application property + application Identityable + // The device property + device Identityable + // The OdataType property + odataType *string + // The user property + user Identityable +} +// NewIdentitySet instantiates a new identitySet and sets the default values. +func NewIdentitySet()(*IdentitySet) { + m := &IdentitySet{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIdentitySet(), 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 *IdentitySet) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetApplication gets the application property value. The application property +func (m *IdentitySet) GetApplication()(Identityable) { + return m.application +} +// GetDevice gets the device property value. The device property +func (m *IdentitySet) GetDevice()(Identityable) { + return m.device +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["application"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetApplication(val.(Identityable)) + } + return nil + } + res["device"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDevice(val.(Identityable)) + } + 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["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUser(val.(Identityable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *IdentitySet) GetOdataType()(*string) { + return m.odataType +} +// GetUser gets the user property value. The user property +func (m *IdentitySet) GetUser()(Identityable) { + return m.user +} +// Serialize serializes information the current object +func (m *IdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("application", m.GetApplication()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("device", m.GetDevice()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("user", m.GetUser()) + 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 *IdentitySet) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetApplication sets the application property value. The application property +func (m *IdentitySet) SetApplication(value Identityable)() { + m.application = value +} +// SetDevice sets the device property value. The device property +func (m *IdentitySet) SetDevice(value Identityable)() { + m.device = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *IdentitySet) SetOdataType(value *string)() { + m.odataType = value +} +// SetUser sets the user property value. The user property +func (m *IdentitySet) SetUser(value Identityable)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/identity_setable.go b/src/internal/connector/graph/betasdk/models/search/identity_setable.go new file mode 100644 index 000000000..d2ad9cf3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/identity_setable.go @@ -0,0 +1,19 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IdentitySetable +type IdentitySetable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplication()(Identityable) + GetDevice()(Identityable) + GetOdataType()(*string) + GetUser()(Identityable) + SetApplication(value Identityable)() + SetDevice(value Identityable)() + SetOdataType(value *string)() + SetUser(value Identityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/identityable.go b/src/internal/connector/graph/betasdk/models/search/identityable.go new file mode 100644 index 000000000..322050152 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/identityable.go @@ -0,0 +1,17 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Identityable +type Identityable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/qna.go b/src/internal/connector/graph/betasdk/models/search/qna.go new file mode 100644 index 000000000..a2aab00e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/qna.go @@ -0,0 +1,291 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Qna +type Qna struct { + SearchAnswer + // Timestamp of when the qna will stop to appear as a search result. Set as null for always available. + availabilityEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp of when the qna will start to appear as a search result. Set as null for always available. + availabilityStartDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // List of security groups able to view this qna. + groupIds []string + // True if this qna was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. + isSuggested *bool + // Keywords that trigger this qna to appear in search results. + keywords AnswerKeywordable + // A list of language names that are geographically specific and that this QnA can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. For the list of possible values, see supported language tags. + languageTags []string + // List of devices and operating systems able to view this qna. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. + platforms []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType + // The state property + state *AnswerState + // Variations of a qna for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. + targetedVariations []AnswerVariantable +} +// NewQna instantiates a new Qna and sets the default values. +func NewQna()(*Qna) { + m := &Qna{ + SearchAnswer: *NewSearchAnswer(), + } + return m +} +// CreateQnaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQnaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewQna(), nil +} +// GetAvailabilityEndDateTime gets the availabilityEndDateTime property value. Timestamp of when the qna will stop to appear as a search result. Set as null for always available. +func (m *Qna) GetAvailabilityEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.availabilityEndDateTime +} +// GetAvailabilityStartDateTime gets the availabilityStartDateTime property value. Timestamp of when the qna will start to appear as a search result. Set as null for always available. +func (m *Qna) GetAvailabilityStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.availabilityStartDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Qna) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SearchAnswer.GetFieldDeserializers() + res["availabilityEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityEndDateTime(val) + } + return nil + } + res["availabilityStartDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAvailabilityStartDateTime(val) + } + return nil + } + res["groupIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetGroupIds(res) + } + return nil + } + res["isSuggested"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsSuggested(val) + } + return nil + } + res["keywords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAnswerKeywordFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetKeywords(val.(AnswerKeywordable)) + } + return nil + } + res["languageTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetLanguageTags(res) + } + return nil + } + res["platforms"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ParseDevicePlatformType) + if err != nil { + return err + } + if val != nil { + res := make([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType, len(val)) + for i, v := range val { + res[i] = *(v.(*ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)) + } + m.SetPlatforms(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAnswerState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*AnswerState)) + } + return nil + } + res["targetedVariations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAnswerVariantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AnswerVariantable, len(val)) + for i, v := range val { + res[i] = v.(AnswerVariantable) + } + m.SetTargetedVariations(res) + } + return nil + } + return res +} +// GetGroupIds gets the groupIds property value. List of security groups able to view this qna. +func (m *Qna) GetGroupIds()([]string) { + return m.groupIds +} +// GetIsSuggested gets the isSuggested property value. True if this qna was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. +func (m *Qna) GetIsSuggested()(*bool) { + return m.isSuggested +} +// GetKeywords gets the keywords property value. Keywords that trigger this qna to appear in search results. +func (m *Qna) GetKeywords()(AnswerKeywordable) { + return m.keywords +} +// GetLanguageTags gets the languageTags property value. A list of language names that are geographically specific and that this QnA can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. For the list of possible values, see supported language tags. +func (m *Qna) GetLanguageTags()([]string) { + return m.languageTags +} +// GetPlatforms gets the platforms property value. List of devices and operating systems able to view this qna. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. +func (m *Qna) GetPlatforms()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) { + return m.platforms +} +// GetState gets the state property value. The state property +func (m *Qna) GetState()(*AnswerState) { + return m.state +} +// GetTargetedVariations gets the targetedVariations property value. Variations of a qna for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. +func (m *Qna) GetTargetedVariations()([]AnswerVariantable) { + return m.targetedVariations +} +// Serialize serializes information the current object +func (m *Qna) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SearchAnswer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("availabilityEndDateTime", m.GetAvailabilityEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("availabilityStartDateTime", m.GetAvailabilityStartDateTime()) + if err != nil { + return err + } + } + if m.GetGroupIds() != nil { + err = writer.WriteCollectionOfStringValues("groupIds", m.GetGroupIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isSuggested", m.GetIsSuggested()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("keywords", m.GetKeywords()) + if err != nil { + return err + } + } + if m.GetLanguageTags() != nil { + err = writer.WriteCollectionOfStringValues("languageTags", m.GetLanguageTags()) + if err != nil { + return err + } + } + if m.GetPlatforms() != nil { + err = writer.WriteCollectionOfStringValues("platforms", ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.SerializeDevicePlatformType(m.GetPlatforms())) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + if m.GetTargetedVariations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTargetedVariations())) + for i, v := range m.GetTargetedVariations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("targetedVariations", cast) + if err != nil { + return err + } + } + return nil +} +// SetAvailabilityEndDateTime sets the availabilityEndDateTime property value. Timestamp of when the qna will stop to appear as a search result. Set as null for always available. +func (m *Qna) SetAvailabilityEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.availabilityEndDateTime = value +} +// SetAvailabilityStartDateTime sets the availabilityStartDateTime property value. Timestamp of when the qna will start to appear as a search result. Set as null for always available. +func (m *Qna) SetAvailabilityStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.availabilityStartDateTime = value +} +// SetGroupIds sets the groupIds property value. List of security groups able to view this qna. +func (m *Qna) SetGroupIds(value []string)() { + m.groupIds = value +} +// SetIsSuggested sets the isSuggested property value. True if this qna was suggested to the admin by a user or was mined and suggested by Microsoft. Read-only. +func (m *Qna) SetIsSuggested(value *bool)() { + m.isSuggested = value +} +// SetKeywords sets the keywords property value. Keywords that trigger this qna to appear in search results. +func (m *Qna) SetKeywords(value AnswerKeywordable)() { + m.keywords = value +} +// SetLanguageTags sets the languageTags property value. A list of language names that are geographically specific and that this QnA can be viewed in. Each language tag value follows the pattern {language}-{region}. As an example, en-us is English as used in the United States. For the list of possible values, see supported language tags. +func (m *Qna) SetLanguageTags(value []string)() { + m.languageTags = value +} +// SetPlatforms sets the platforms property value. List of devices and operating systems able to view this qna. Possible values are: unknown, android, androidForWork, ios, macOS, windowsPhone81, windowsPhone81AndLater, windows10AndLater, androidWorkProfile, androidASOP. +func (m *Qna) SetPlatforms(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() { + m.platforms = value +} +// SetState sets the state property value. The state property +func (m *Qna) SetState(value *AnswerState)() { + m.state = value +} +// SetTargetedVariations sets the targetedVariations property value. Variations of a qna for different countries or devices. Use when you need to show different content to users based on their device, country/region, or both. The date and group settings will apply to all variations. +func (m *Qna) SetTargetedVariations(value []AnswerVariantable)() { + m.targetedVariations = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/qna_collection_response.go b/src/internal/connector/graph/betasdk/models/search/qna_collection_response.go new file mode 100644 index 000000000..185277502 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/qna_collection_response.go @@ -0,0 +1,69 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// QnaCollectionResponse +type QnaCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Qnaable +} +// NewQnaCollectionResponse instantiates a new QnaCollectionResponse and sets the default values. +func NewQnaCollectionResponse()(*QnaCollectionResponse) { + m := &QnaCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateQnaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateQnaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewQnaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *QnaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateQnaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Qnaable, len(val)) + for i, v := range val { + res[i] = v.(Qnaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *QnaCollectionResponse) GetValue()([]Qnaable) { + return m.value +} +// Serialize serializes information the current object +func (m *QnaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *QnaCollectionResponse) SetValue(value []Qnaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/qna_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search/qna_collection_responseable.go new file mode 100644 index 000000000..81af13a88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/qna_collection_responseable.go @@ -0,0 +1,14 @@ +package search + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// QnaCollectionResponseable +type QnaCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Qnaable) + SetValue(value []Qnaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/qnaable.go b/src/internal/connector/graph/betasdk/models/search/qnaable.go new file mode 100644 index 000000000..5a14e2ad0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/qnaable.go @@ -0,0 +1,31 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Qnaable +type Qnaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SearchAnswerable + GetAvailabilityEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAvailabilityStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetGroupIds()([]string) + GetIsSuggested()(*bool) + GetKeywords()(AnswerKeywordable) + GetLanguageTags()([]string) + GetPlatforms()([]ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType) + GetState()(*AnswerState) + GetTargetedVariations()([]AnswerVariantable) + SetAvailabilityEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAvailabilityStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetGroupIds(value []string)() + SetIsSuggested(value *bool)() + SetKeywords(value AnswerKeywordable)() + SetLanguageTags(value []string)() + SetPlatforms(value []ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.DevicePlatformType)() + SetState(value *AnswerState)() + SetTargetedVariations(value []AnswerVariantable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search/search_answer.go b/src/internal/connector/graph/betasdk/models/search/search_answer.go new file mode 100644 index 000000000..1832f9c08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/search_answer.go @@ -0,0 +1,188 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SearchAnswer provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SearchAnswer struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Search answer description shown on search results page. + description *string + // Search answer name displayed in search results. + displayName *string + // Details of the user that created or last modified the search answer. Read-only. + lastModifiedBy IdentitySetable + // Timestamp of when the search answer is created or edited. Read-only. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Search answer URL link. When users click this search answer in search results, they will go to this URL. + webUrl *string +} +// NewSearchAnswer instantiates a new searchAnswer and sets the default values. +func NewSearchAnswer()(*SearchAnswer) { + m := &SearchAnswer{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSearchAnswerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchAnswerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.search.acronym": + return NewAcronym(), nil + case "#microsoft.graph.search.bookmark": + return NewBookmark(), nil + case "#microsoft.graph.search.qna": + return NewQna(), nil + } + } + } + } + return NewSearchAnswer(), nil +} +// GetDescription gets the description property value. Search answer description shown on search results page. +func (m *SearchAnswer) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Search answer name displayed in search results. +func (m *SearchAnswer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchAnswer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. Details of the user that created or last modified the search answer. Read-only. +func (m *SearchAnswer) GetLastModifiedBy()(IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Timestamp of when the search answer is created or edited. Read-only. +func (m *SearchAnswer) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetWebUrl gets the webUrl property value. Search answer URL link. When users click this search answer in search results, they will go to this URL. +func (m *SearchAnswer) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *SearchAnswer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDescription sets the description property value. Search answer description shown on search results page. +func (m *SearchAnswer) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Search answer name displayed in search results. +func (m *SearchAnswer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. Details of the user that created or last modified the search answer. Read-only. +func (m *SearchAnswer) SetLastModifiedBy(value IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Timestamp of when the search answer is created or edited. Read-only. +func (m *SearchAnswer) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetWebUrl sets the webUrl property value. Search answer URL link. When users click this search answer in search results, they will go to this URL. +func (m *SearchAnswer) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/search/search_answerable.go b/src/internal/connector/graph/betasdk/models/search/search_answerable.go new file mode 100644 index 000000000..1ba1e0a7c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search/search_answerable.go @@ -0,0 +1,23 @@ +package search + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SearchAnswerable +type SearchAnswerable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetWebUrl()(*string) + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_aggregation.go b/src/internal/connector/graph/betasdk/models/search_aggregation.go new file mode 100644 index 000000000..06e25d5d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_aggregation.go @@ -0,0 +1,131 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchAggregation +type SearchAggregation struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Defines the actual buckets of the computed aggregation. + buckets []SearchBucketable + // Defines on which field the aggregation was computed on. + field *string + // The OdataType property + odataType *string +} +// NewSearchAggregation instantiates a new searchAggregation and sets the default values. +func NewSearchAggregation()(*SearchAggregation) { + m := &SearchAggregation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchAggregationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchAggregationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchAggregation(), 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 *SearchAggregation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetBuckets gets the buckets property value. Defines the actual buckets of the computed aggregation. +func (m *SearchAggregation) GetBuckets()([]SearchBucketable) { + return m.buckets +} +// GetField gets the field property value. Defines on which field the aggregation was computed on. +func (m *SearchAggregation) GetField()(*string) { + return m.field +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchAggregation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["buckets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchBucketFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchBucketable, len(val)) + for i, v := range val { + res[i] = v.(SearchBucketable) + } + m.SetBuckets(res) + } + return nil + } + res["field"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetField(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchAggregation) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SearchAggregation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetBuckets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetBuckets())) + for i, v := range m.GetBuckets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("buckets", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("field", m.GetField()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *SearchAggregation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetBuckets sets the buckets property value. Defines the actual buckets of the computed aggregation. +func (m *SearchAggregation) SetBuckets(value []SearchBucketable)() { + m.buckets = value +} +// SetField sets the field property value. Defines on which field the aggregation was computed on. +func (m *SearchAggregation) SetField(value *string)() { + m.field = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchAggregation) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_aggregation_collection_response.go b/src/internal/connector/graph/betasdk/models/search_aggregation_collection_response.go new file mode 100644 index 000000000..1aefff7f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_aggregation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchAggregationCollectionResponse +type SearchAggregationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SearchAggregationable +} +// NewSearchAggregationCollectionResponse instantiates a new SearchAggregationCollectionResponse and sets the default values. +func NewSearchAggregationCollectionResponse()(*SearchAggregationCollectionResponse) { + m := &SearchAggregationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSearchAggregationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchAggregationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchAggregationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchAggregationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchAggregationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchAggregationable, len(val)) + for i, v := range val { + res[i] = v.(SearchAggregationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SearchAggregationCollectionResponse) GetValue()([]SearchAggregationable) { + return m.value +} +// Serialize serializes information the current object +func (m *SearchAggregationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SearchAggregationCollectionResponse) SetValue(value []SearchAggregationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_aggregation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search_aggregation_collection_responseable.go new file mode 100644 index 000000000..d9c42a4e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_aggregation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchAggregationCollectionResponseable +type SearchAggregationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SearchAggregationable) + SetValue(value []SearchAggregationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_aggregationable.go b/src/internal/connector/graph/betasdk/models/search_aggregationable.go new file mode 100644 index 000000000..9c150680b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_aggregationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchAggregationable +type SearchAggregationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetBuckets()([]SearchBucketable) + GetField()(*string) + GetOdataType()(*string) + SetBuckets(value []SearchBucketable)() + SetField(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_bucket.go b/src/internal/connector/graph/betasdk/models/search_bucket.go new file mode 100644 index 000000000..2f42956f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_bucket.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchBucket +type SearchBucket struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A token containing the encoded filter to aggregate search matches by the specific key value. To use the filter, pass the token as part of the aggregationFilter property in a searchRequest object, in the format '{field}:/'{aggregationFilterToken}/''. See an example. + aggregationFilterToken *string + // The approximate number of search matches that share the same value specified in the key property. Note that this number is not the exact number of matches. + count *int32 + // The discrete value of the field that an aggregation was computed on. + key *string + // The OdataType property + odataType *string +} +// NewSearchBucket instantiates a new searchBucket and sets the default values. +func NewSearchBucket()(*SearchBucket) { + m := &SearchBucket{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchBucketFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchBucketFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchBucket(), 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 *SearchBucket) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAggregationFilterToken gets the aggregationFilterToken property value. A token containing the encoded filter to aggregate search matches by the specific key value. To use the filter, pass the token as part of the aggregationFilter property in a searchRequest object, in the format '{field}:/'{aggregationFilterToken}/''. See an example. +func (m *SearchBucket) GetAggregationFilterToken()(*string) { + return m.aggregationFilterToken +} +// GetCount gets the count property value. The approximate number of search matches that share the same value specified in the key property. Note that this number is not the exact number of matches. +func (m *SearchBucket) GetCount()(*int32) { + return m.count +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchBucket) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aggregationFilterToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAggregationFilterToken(val) + } + return nil + } + res["count"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCount(val) + } + return nil + } + 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 + } + return res +} +// GetKey gets the key property value. The discrete value of the field that an aggregation was computed on. +func (m *SearchBucket) GetKey()(*string) { + return m.key +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchBucket) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SearchBucket) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("aggregationFilterToken", m.GetAggregationFilterToken()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("count", m.GetCount()) + if err != nil { + return err + } + } + { + 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.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 *SearchBucket) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAggregationFilterToken sets the aggregationFilterToken property value. A token containing the encoded filter to aggregate search matches by the specific key value. To use the filter, pass the token as part of the aggregationFilter property in a searchRequest object, in the format '{field}:/'{aggregationFilterToken}/''. See an example. +func (m *SearchBucket) SetAggregationFilterToken(value *string)() { + m.aggregationFilterToken = value +} +// SetCount sets the count property value. The approximate number of search matches that share the same value specified in the key property. Note that this number is not the exact number of matches. +func (m *SearchBucket) SetCount(value *int32)() { + m.count = value +} +// SetKey sets the key property value. The discrete value of the field that an aggregation was computed on. +func (m *SearchBucket) SetKey(value *string)() { + m.key = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchBucket) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_bucket_collection_response.go b/src/internal/connector/graph/betasdk/models/search_bucket_collection_response.go new file mode 100644 index 000000000..184414f2e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_bucket_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchBucketCollectionResponse +type SearchBucketCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SearchBucketable +} +// NewSearchBucketCollectionResponse instantiates a new SearchBucketCollectionResponse and sets the default values. +func NewSearchBucketCollectionResponse()(*SearchBucketCollectionResponse) { + m := &SearchBucketCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSearchBucketCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchBucketCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchBucketCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchBucketCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchBucketFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchBucketable, len(val)) + for i, v := range val { + res[i] = v.(SearchBucketable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SearchBucketCollectionResponse) GetValue()([]SearchBucketable) { + return m.value +} +// Serialize serializes information the current object +func (m *SearchBucketCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SearchBucketCollectionResponse) SetValue(value []SearchBucketable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_bucket_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search_bucket_collection_responseable.go new file mode 100644 index 000000000..06005f8a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_bucket_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchBucketCollectionResponseable +type SearchBucketCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SearchBucketable) + SetValue(value []SearchBucketable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_bucketable.go b/src/internal/connector/graph/betasdk/models/search_bucketable.go new file mode 100644 index 000000000..e528e79e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_bucketable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchBucketable +type SearchBucketable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregationFilterToken()(*string) + GetCount()(*int32) + GetKey()(*string) + GetOdataType()(*string) + SetAggregationFilterToken(value *string)() + SetCount(value *int32)() + SetKey(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_entity.go b/src/internal/connector/graph/betasdk/models/search_entity.go new file mode 100644 index 000000000..d9fc3294f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_entity.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchEntity +type SearchEntity struct { + Entity +} +// NewSearchEntity instantiates a new SearchEntity and sets the default values. +func NewSearchEntity()(*SearchEntity) { + m := &SearchEntity{ + Entity: *NewEntity(), + } + return m +} +// CreateSearchEntityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchEntityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchEntity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchEntity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *SearchEntity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/search_entityable.go b/src/internal/connector/graph/betasdk/models/search_entityable.go new file mode 100644 index 000000000..815daaa5e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_entityable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchEntityable +type SearchEntityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/search_hit.go b/src/internal/connector/graph/betasdk/models/search_hit.go new file mode 100644 index 000000000..0aec108f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hit.go @@ -0,0 +1,357 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHit +type SearchHit struct { + // The _id property + _id *string + // The _score property + _score *int32 + // The _source property + _source Entityable + // The _summary property + _summary *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 name of the content source which the externalItem is part of . + contentSource *string + // The internal identifier for the item. The format of the identifier varies based on the entity type. For details, see hitId format. + hitId *string + // The isCollapsed property + isCollapsed *bool + // The OdataType property + odataType *string + // The rank or the order of the result. + rank *int32 + // The resource property + resource Entityable + // ID of the result template for rendering the search result. This ID must map to a display layout in the resultTemplates dictionary, included in the searchresponse as well. + resultTemplateId *string + // A summary of the result, if a summary is available. + summary *string +} +// NewSearchHit instantiates a new searchHit and sets the default values. +func NewSearchHit()(*SearchHit) { + m := &SearchHit{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchHitFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchHitFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchHit(), nil +} +// Get_id gets the _id property value. The _id property +func (m *SearchHit) Get_id()(*string) { + return m._id +} +// Get_score gets the _score property value. The _score property +func (m *SearchHit) Get_score()(*int32) { + return m._score +} +// Get_source gets the _source property value. The _source property +func (m *SearchHit) Get_source()(Entityable) { + return m._source +} +// Get_summary gets the _summary property value. The _summary property +func (m *SearchHit) Get_summary()(*string) { + return m._summary +} +// 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 *SearchHit) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetContentSource gets the contentSource property value. The name of the content source which the externalItem is part of . +func (m *SearchHit) GetContentSource()(*string) { + return m.contentSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchHit) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["_id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.Set_id(val) + } + return nil + } + res["_score"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.Set_score(val) + } + return nil + } + res["_source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEntityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.Set_source(val.(Entityable)) + } + return nil + } + res["_summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.Set_summary(val) + } + return nil + } + res["contentSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentSource(val) + } + return nil + } + res["hitId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHitId(val) + } + return nil + } + res["isCollapsed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCollapsed(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["rank"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRank(val) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEntityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(Entityable)) + } + return nil + } + res["resultTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResultTemplateId(val) + } + return nil + } + res["summary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSummary(val) + } + return nil + } + return res +} +// GetHitId gets the hitId property value. The internal identifier for the item. The format of the identifier varies based on the entity type. For details, see hitId format. +func (m *SearchHit) GetHitId()(*string) { + return m.hitId +} +// GetIsCollapsed gets the isCollapsed property value. The isCollapsed property +func (m *SearchHit) GetIsCollapsed()(*bool) { + return m.isCollapsed +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchHit) GetOdataType()(*string) { + return m.odataType +} +// GetRank gets the rank property value. The rank or the order of the result. +func (m *SearchHit) GetRank()(*int32) { + return m.rank +} +// GetResource gets the resource property value. The resource property +func (m *SearchHit) GetResource()(Entityable) { + return m.resource +} +// GetResultTemplateId gets the resultTemplateId property value. ID of the result template for rendering the search result. This ID must map to a display layout in the resultTemplates dictionary, included in the searchresponse as well. +func (m *SearchHit) GetResultTemplateId()(*string) { + return m.resultTemplateId +} +// GetSummary gets the summary property value. A summary of the result, if a summary is available. +func (m *SearchHit) GetSummary()(*string) { + return m.summary +} +// Serialize serializes information the current object +func (m *SearchHit) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("contentSource", m.GetContentSource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("hitId", m.GetHitId()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isCollapsed", m.GetIsCollapsed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("rank", m.GetRank()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resultTemplateId", m.GetResultTemplateId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("summary", m.GetSummary()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("_id", m.Get_id()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("_score", m.Get_score()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("_source", m.Get_source()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("_summary", m.Get_summary()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// Set_id sets the _id property value. The _id property +func (m *SearchHit) Set_id(value *string)() { + m._id = value +} +// Set_score sets the _score property value. The _score property +func (m *SearchHit) Set_score(value *int32)() { + m._score = value +} +// Set_source sets the _source property value. The _source property +func (m *SearchHit) Set_source(value Entityable)() { + m._source = value +} +// Set_summary sets the _summary property value. The _summary property +func (m *SearchHit) Set_summary(value *string)() { + m._summary = value +} +// 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 *SearchHit) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetContentSource sets the contentSource property value. The name of the content source which the externalItem is part of . +func (m *SearchHit) SetContentSource(value *string)() { + m.contentSource = value +} +// SetHitId sets the hitId property value. The internal identifier for the item. The format of the identifier varies based on the entity type. For details, see hitId format. +func (m *SearchHit) SetHitId(value *string)() { + m.hitId = value +} +// SetIsCollapsed sets the isCollapsed property value. The isCollapsed property +func (m *SearchHit) SetIsCollapsed(value *bool)() { + m.isCollapsed = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchHit) SetOdataType(value *string)() { + m.odataType = value +} +// SetRank sets the rank property value. The rank or the order of the result. +func (m *SearchHit) SetRank(value *int32)() { + m.rank = value +} +// SetResource sets the resource property value. The resource property +func (m *SearchHit) SetResource(value Entityable)() { + m.resource = value +} +// SetResultTemplateId sets the resultTemplateId property value. ID of the result template for rendering the search result. This ID must map to a display layout in the resultTemplates dictionary, included in the searchresponse as well. +func (m *SearchHit) SetResultTemplateId(value *string)() { + m.resultTemplateId = value +} +// SetSummary sets the summary property value. A summary of the result, if a summary is available. +func (m *SearchHit) SetSummary(value *string)() { + m.summary = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_hit_collection_response.go b/src/internal/connector/graph/betasdk/models/search_hit_collection_response.go new file mode 100644 index 000000000..082072bb7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hit_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitCollectionResponse +type SearchHitCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SearchHitable +} +// NewSearchHitCollectionResponse instantiates a new SearchHitCollectionResponse and sets the default values. +func NewSearchHitCollectionResponse()(*SearchHitCollectionResponse) { + m := &SearchHitCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSearchHitCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchHitCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchHitCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchHitCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchHitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchHitable, len(val)) + for i, v := range val { + res[i] = v.(SearchHitable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SearchHitCollectionResponse) GetValue()([]SearchHitable) { + return m.value +} +// Serialize serializes information the current object +func (m *SearchHitCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SearchHitCollectionResponse) SetValue(value []SearchHitable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_hit_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search_hit_collection_responseable.go new file mode 100644 index 000000000..3a4e31ffa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hit_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitCollectionResponseable +type SearchHitCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SearchHitable) + SetValue(value []SearchHitable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_hitable.go b/src/internal/connector/graph/betasdk/models/search_hitable.go new file mode 100644 index 000000000..593c75f7d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hitable.go @@ -0,0 +1,35 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitable +type SearchHitable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Get_id()(*string) + Get_score()(*int32) + Get_source()(Entityable) + Get_summary()(*string) + GetContentSource()(*string) + GetHitId()(*string) + GetIsCollapsed()(*bool) + GetOdataType()(*string) + GetRank()(*int32) + GetResource()(Entityable) + GetResultTemplateId()(*string) + GetSummary()(*string) + Set_id(value *string)() + Set_score(value *int32)() + Set_source(value Entityable)() + Set_summary(value *string)() + SetContentSource(value *string)() + SetHitId(value *string)() + SetIsCollapsed(value *bool)() + SetOdataType(value *string)() + SetRank(value *int32)() + SetResource(value Entityable)() + SetResultTemplateId(value *string)() + SetSummary(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_hits_container.go b/src/internal/connector/graph/betasdk/models/search_hits_container.go new file mode 100644 index 000000000..33cdda2ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hits_container.go @@ -0,0 +1,191 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitsContainer +type SearchHitsContainer struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Contains the collection of aggregations computed based on the provided aggregationOption specified in the request. + aggregations []SearchAggregationable + // A collection of the search results. + hits []SearchHitable + // Provides information if more results are available. Based on this information, you can adjust the from and size properties of the searchRequest accordingly. + moreResultsAvailable *bool + // The OdataType property + odataType *string + // The total number of results. Note this is not the number of results on the page, but the total number of results satisfying the query. + total *int32 +} +// NewSearchHitsContainer instantiates a new searchHitsContainer and sets the default values. +func NewSearchHitsContainer()(*SearchHitsContainer) { + m := &SearchHitsContainer{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchHitsContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchHitsContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchHitsContainer(), 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 *SearchHitsContainer) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAggregations gets the aggregations property value. Contains the collection of aggregations computed based on the provided aggregationOption specified in the request. +func (m *SearchHitsContainer) GetAggregations()([]SearchAggregationable) { + return m.aggregations +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchHitsContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["aggregations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchAggregationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchAggregationable, len(val)) + for i, v := range val { + res[i] = v.(SearchAggregationable) + } + m.SetAggregations(res) + } + return nil + } + res["hits"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchHitFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchHitable, len(val)) + for i, v := range val { + res[i] = v.(SearchHitable) + } + m.SetHits(res) + } + return nil + } + res["moreResultsAvailable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetMoreResultsAvailable(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["total"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTotal(val) + } + return nil + } + return res +} +// GetHits gets the hits property value. A collection of the search results. +func (m *SearchHitsContainer) GetHits()([]SearchHitable) { + return m.hits +} +// GetMoreResultsAvailable gets the moreResultsAvailable property value. Provides information if more results are available. Based on this information, you can adjust the from and size properties of the searchRequest accordingly. +func (m *SearchHitsContainer) GetMoreResultsAvailable()(*bool) { + return m.moreResultsAvailable +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchHitsContainer) GetOdataType()(*string) { + return m.odataType +} +// GetTotal gets the total property value. The total number of results. Note this is not the number of results on the page, but the total number of results satisfying the query. +func (m *SearchHitsContainer) GetTotal()(*int32) { + return m.total +} +// Serialize serializes information the current object +func (m *SearchHitsContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAggregations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAggregations())) + for i, v := range m.GetAggregations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("aggregations", cast) + if err != nil { + return err + } + } + if m.GetHits() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHits())) + for i, v := range m.GetHits() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("hits", cast) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("moreResultsAvailable", m.GetMoreResultsAvailable()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("total", m.GetTotal()) + 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 *SearchHitsContainer) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAggregations sets the aggregations property value. Contains the collection of aggregations computed based on the provided aggregationOption specified in the request. +func (m *SearchHitsContainer) SetAggregations(value []SearchAggregationable)() { + m.aggregations = value +} +// SetHits sets the hits property value. A collection of the search results. +func (m *SearchHitsContainer) SetHits(value []SearchHitable)() { + m.hits = value +} +// SetMoreResultsAvailable sets the moreResultsAvailable property value. Provides information if more results are available. Based on this information, you can adjust the from and size properties of the searchRequest accordingly. +func (m *SearchHitsContainer) SetMoreResultsAvailable(value *bool)() { + m.moreResultsAvailable = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchHitsContainer) SetOdataType(value *string)() { + m.odataType = value +} +// SetTotal sets the total property value. The total number of results. Note this is not the number of results on the page, but the total number of results satisfying the query. +func (m *SearchHitsContainer) SetTotal(value *int32)() { + m.total = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_hits_container_collection_response.go b/src/internal/connector/graph/betasdk/models/search_hits_container_collection_response.go new file mode 100644 index 000000000..0f1034dcd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hits_container_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitsContainerCollectionResponse +type SearchHitsContainerCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SearchHitsContainerable +} +// NewSearchHitsContainerCollectionResponse instantiates a new SearchHitsContainerCollectionResponse and sets the default values. +func NewSearchHitsContainerCollectionResponse()(*SearchHitsContainerCollectionResponse) { + m := &SearchHitsContainerCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSearchHitsContainerCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchHitsContainerCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchHitsContainerCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchHitsContainerCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSearchHitsContainerFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SearchHitsContainerable, len(val)) + for i, v := range val { + res[i] = v.(SearchHitsContainerable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SearchHitsContainerCollectionResponse) GetValue()([]SearchHitsContainerable) { + return m.value +} +// Serialize serializes information the current object +func (m *SearchHitsContainerCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SearchHitsContainerCollectionResponse) SetValue(value []SearchHitsContainerable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_hits_container_collection_responseable.go b/src/internal/connector/graph/betasdk/models/search_hits_container_collection_responseable.go new file mode 100644 index 000000000..0a454cf2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hits_container_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitsContainerCollectionResponseable +type SearchHitsContainerCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SearchHitsContainerable) + SetValue(value []SearchHitsContainerable)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_hits_containerable.go b/src/internal/connector/graph/betasdk/models/search_hits_containerable.go new file mode 100644 index 000000000..a7b8d5478 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_hits_containerable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchHitsContainerable +type SearchHitsContainerable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAggregations()([]SearchAggregationable) + GetHits()([]SearchHitable) + GetMoreResultsAvailable()(*bool) + GetOdataType()(*string) + GetTotal()(*int32) + SetAggregations(value []SearchAggregationable)() + SetHits(value []SearchHitable)() + SetMoreResultsAvailable(value *bool)() + SetOdataType(value *string)() + SetTotal(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/search_result.go b/src/internal/connector/graph/betasdk/models/search_result.go new file mode 100644 index 000000000..3c4268517 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_result.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchResult +type SearchResult 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 OdataType property + odataType *string + // A callback URL that can be used to record telemetry information. The application should issue a GET on this URL if the user interacts with this item to improve the quality of results. + onClickTelemetryUrl *string +} +// NewSearchResult instantiates a new searchResult and sets the default values. +func NewSearchResult()(*SearchResult) { + m := &SearchResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSearchResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSearchResult(), 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 *SearchResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SearchResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["onClickTelemetryUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOnClickTelemetryUrl(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SearchResult) GetOdataType()(*string) { + return m.odataType +} +// GetOnClickTelemetryUrl gets the onClickTelemetryUrl property value. A callback URL that can be used to record telemetry information. The application should issue a GET on this URL if the user interacts with this item to improve the quality of results. +func (m *SearchResult) GetOnClickTelemetryUrl()(*string) { + return m.onClickTelemetryUrl +} +// Serialize serializes information the current object +func (m *SearchResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("onClickTelemetryUrl", m.GetOnClickTelemetryUrl()) + 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 *SearchResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SearchResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetOnClickTelemetryUrl sets the onClickTelemetryUrl property value. A callback URL that can be used to record telemetry information. The application should issue a GET on this URL if the user interacts with this item to improve the quality of results. +func (m *SearchResult) SetOnClickTelemetryUrl(value *string)() { + m.onClickTelemetryUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/search_resultable.go b/src/internal/connector/graph/betasdk/models/search_resultable.go new file mode 100644 index 000000000..7d902ae02 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/search_resultable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SearchResultable +type SearchResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOnClickTelemetryUrl()(*string) + SetOdataType(value *string)() + SetOnClickTelemetryUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/section_emphasis_type.go b/src/internal/connector/graph/betasdk/models/section_emphasis_type.go new file mode 100644 index 000000000..e6e75841b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_emphasis_type.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SectionEmphasisType int + +const ( + 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] +} +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 +} +func SerializeSectionEmphasisType(values []SectionEmphasisType) []string { + 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/section_group.go b/src/internal/connector/graph/betasdk/models/section_group.go new file mode 100644 index 000000000..2bd7d19f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_group.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionGroup provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SectionGroup struct { + OnenoteEntityHierarchyModel + // The notebook that contains the section group. Read-only. + parentNotebook Notebookable + // The section group that contains the section group. Read-only. + parentSectionGroup SectionGroupable + // The section groups in the section. Read-only. Nullable. + sectionGroups []SectionGroupable + // The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only. + sectionGroupsUrl *string + // The sections in the section group. Read-only. Nullable. + sections []OnenoteSectionable + // The URL for the sections navigation property, which returns all the sections in the section group. Read-only. + sectionsUrl *string +} +// NewSectionGroup instantiates a new sectionGroup and sets the default values. +func NewSectionGroup()(*SectionGroup) { + m := &SectionGroup{ + OnenoteEntityHierarchyModel: *NewOnenoteEntityHierarchyModel(), + } + odataTypeValue := "#microsoft.graph.sectionGroup"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSectionGroupFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSectionGroupFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSectionGroup(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SectionGroup) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.OnenoteEntityHierarchyModel.GetFieldDeserializers() + res["parentNotebook"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateNotebookFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentNotebook(val.(Notebookable)) + } + return nil + } + res["parentSectionGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentSectionGroup(val.(SectionGroupable)) + } + return nil + } + res["sectionGroups"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SectionGroupable, len(val)) + for i, v := range val { + res[i] = v.(SectionGroupable) + } + m.SetSectionGroups(res) + } + return nil + } + res["sectionGroupsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionGroupsUrl(val) + } + return nil + } + res["sections"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOnenoteSectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OnenoteSectionable, len(val)) + for i, v := range val { + res[i] = v.(OnenoteSectionable) + } + m.SetSections(res) + } + return nil + } + res["sectionsUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSectionsUrl(val) + } + return nil + } + return res +} +// GetParentNotebook gets the parentNotebook property value. The notebook that contains the section group. Read-only. +func (m *SectionGroup) GetParentNotebook()(Notebookable) { + return m.parentNotebook +} +// GetParentSectionGroup gets the parentSectionGroup property value. The section group that contains the section group. Read-only. +func (m *SectionGroup) GetParentSectionGroup()(SectionGroupable) { + return m.parentSectionGroup +} +// GetSectionGroups gets the sectionGroups property value. The section groups in the section. Read-only. Nullable. +func (m *SectionGroup) GetSectionGroups()([]SectionGroupable) { + return m.sectionGroups +} +// GetSectionGroupsUrl gets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only. +func (m *SectionGroup) GetSectionGroupsUrl()(*string) { + return m.sectionGroupsUrl +} +// GetSections gets the sections property value. The sections in the section group. Read-only. Nullable. +func (m *SectionGroup) GetSections()([]OnenoteSectionable) { + return m.sections +} +// GetSectionsUrl gets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the section group. Read-only. +func (m *SectionGroup) GetSectionsUrl()(*string) { + return m.sectionsUrl +} +// Serialize serializes information the current object +func (m *SectionGroup) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.OnenoteEntityHierarchyModel.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("parentNotebook", m.GetParentNotebook()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentSectionGroup", m.GetParentSectionGroup()) + if err != nil { + return err + } + } + if m.GetSectionGroups() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSectionGroups())) + for i, v := range m.GetSectionGroups() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sectionGroups", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sectionGroupsUrl", m.GetSectionGroupsUrl()) + if err != nil { + return err + } + } + if m.GetSections() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSections())) + for i, v := range m.GetSections() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sections", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sectionsUrl", m.GetSectionsUrl()) + if err != nil { + return err + } + } + return nil +} +// SetParentNotebook sets the parentNotebook property value. The notebook that contains the section group. Read-only. +func (m *SectionGroup) SetParentNotebook(value Notebookable)() { + m.parentNotebook = value +} +// SetParentSectionGroup sets the parentSectionGroup property value. The section group that contains the section group. Read-only. +func (m *SectionGroup) SetParentSectionGroup(value SectionGroupable)() { + m.parentSectionGroup = value +} +// SetSectionGroups sets the sectionGroups property value. The section groups in the section. Read-only. Nullable. +func (m *SectionGroup) SetSectionGroups(value []SectionGroupable)() { + m.sectionGroups = value +} +// SetSectionGroupsUrl sets the sectionGroupsUrl property value. The URL for the sectionGroups navigation property, which returns all the section groups in the section group. Read-only. +func (m *SectionGroup) SetSectionGroupsUrl(value *string)() { + m.sectionGroupsUrl = value +} +// SetSections sets the sections property value. The sections in the section group. Read-only. Nullable. +func (m *SectionGroup) SetSections(value []OnenoteSectionable)() { + m.sections = value +} +// SetSectionsUrl sets the sectionsUrl property value. The URL for the sections navigation property, which returns all the sections in the section group. Read-only. +func (m *SectionGroup) SetSectionsUrl(value *string)() { + m.sectionsUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/section_group_collection_response.go b/src/internal/connector/graph/betasdk/models/section_group_collection_response.go new file mode 100644 index 000000000..5cb7b389c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_group_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionGroupCollectionResponse +type SectionGroupCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SectionGroupable +} +// NewSectionGroupCollectionResponse instantiates a new SectionGroupCollectionResponse and sets the default values. +func NewSectionGroupCollectionResponse()(*SectionGroupCollectionResponse) { + m := &SectionGroupCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSectionGroupCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSectionGroupCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSectionGroupCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SectionGroupCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSectionGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SectionGroupable, len(val)) + for i, v := range val { + res[i] = v.(SectionGroupable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SectionGroupCollectionResponse) GetValue()([]SectionGroupable) { + return m.value +} +// Serialize serializes information the current object +func (m *SectionGroupCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SectionGroupCollectionResponse) SetValue(value []SectionGroupable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/section_group_collection_responseable.go b/src/internal/connector/graph/betasdk/models/section_group_collection_responseable.go new file mode 100644 index 000000000..4b2eea19f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_group_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionGroupCollectionResponseable +type SectionGroupCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SectionGroupable) + SetValue(value []SectionGroupable)() +} diff --git a/src/internal/connector/graph/betasdk/models/section_groupable.go b/src/internal/connector/graph/betasdk/models/section_groupable.go new file mode 100644 index 000000000..cbd496984 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_groupable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionGroupable +type SectionGroupable interface { + OnenoteEntityHierarchyModelable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetParentNotebook()(Notebookable) + GetParentSectionGroup()(SectionGroupable) + GetSectionGroups()([]SectionGroupable) + GetSectionGroupsUrl()(*string) + GetSections()([]OnenoteSectionable) + GetSectionsUrl()(*string) + SetParentNotebook(value Notebookable)() + SetParentSectionGroup(value SectionGroupable)() + SetSectionGroups(value []SectionGroupable)() + SetSectionGroupsUrl(value *string)() + SetSections(value []OnenoteSectionable)() + SetSectionsUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/section_links.go b/src/internal/connector/graph/betasdk/models/section_links.go new file mode 100644 index 000000000..6719839da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_links.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionLinks +type SectionLinks 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 OdataType property + odataType *string + // Opens the section in the OneNote native client if it's installed. + oneNoteClientUrl ExternalLinkable + // Opens the section in OneNote on the web. + oneNoteWebUrl ExternalLinkable +} +// NewSectionLinks instantiates a new sectionLinks and sets the default values. +func NewSectionLinks()(*SectionLinks) { + m := &SectionLinks{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSectionLinksFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSectionLinksFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSectionLinks(), 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 *SectionLinks) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SectionLinks) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["oneNoteClientUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteClientUrl(val.(ExternalLinkable)) + } + return nil + } + res["oneNoteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateExternalLinkFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOneNoteWebUrl(val.(ExternalLinkable)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SectionLinks) GetOdataType()(*string) { + return m.odataType +} +// GetOneNoteClientUrl gets the oneNoteClientUrl property value. Opens the section in the OneNote native client if it's installed. +func (m *SectionLinks) GetOneNoteClientUrl()(ExternalLinkable) { + return m.oneNoteClientUrl +} +// GetOneNoteWebUrl gets the oneNoteWebUrl property value. Opens the section in OneNote on the web. +func (m *SectionLinks) GetOneNoteWebUrl()(ExternalLinkable) { + return m.oneNoteWebUrl +} +// Serialize serializes information the current object +func (m *SectionLinks) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteClientUrl", m.GetOneNoteClientUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("oneNoteWebUrl", m.GetOneNoteWebUrl()) + 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 *SectionLinks) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SectionLinks) SetOdataType(value *string)() { + m.odataType = value +} +// SetOneNoteClientUrl sets the oneNoteClientUrl property value. Opens the section in the OneNote native client if it's installed. +func (m *SectionLinks) SetOneNoteClientUrl(value ExternalLinkable)() { + m.oneNoteClientUrl = value +} +// SetOneNoteWebUrl sets the oneNoteWebUrl property value. Opens the section in OneNote on the web. +func (m *SectionLinks) SetOneNoteWebUrl(value ExternalLinkable)() { + m.oneNoteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/section_linksable.go b/src/internal/connector/graph/betasdk/models/section_linksable.go new file mode 100644 index 000000000..e9f7876a4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/section_linksable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SectionLinksable +type SectionLinksable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOneNoteClientUrl()(ExternalLinkable) + GetOneNoteWebUrl()(ExternalLinkable) + SetOdataType(value *string)() + SetOneNoteClientUrl(value ExternalLinkable)() + SetOneNoteWebUrl(value ExternalLinkable)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_assessment_account_type.go b/src/internal/connector/graph/betasdk/models/secure_assessment_account_type.go new file mode 100644 index 000000000..ea75173d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_assessment_account_type.go @@ -0,0 +1,44 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecureAssessmentAccountType int + +const ( + // Indicates an Azure AD account in format of AzureAD\username@tenant.com. + AZUREADACCOUNT_SECUREASSESSMENTACCOUNTTYPE SecureAssessmentAccountType = iota + // Indicates a domain account in format of domain\user or user@domain.com. + DOMAINACCOUNT_SECUREASSESSMENTACCOUNTTYPE + // Indicates a local account in format of username. + LOCALACCOUNT_SECUREASSESSMENTACCOUNTTYPE + // Indicates a local guest account in format of test name. + LOCALGUESTACCOUNT_SECUREASSESSMENTACCOUNTTYPE +) + +func (i SecureAssessmentAccountType) String() string { + return []string{"azureADAccount", "domainAccount", "localAccount", "localGuestAccount"}[i] +} +func ParseSecureAssessmentAccountType(v string) (interface{}, error) { + result := AZUREADACCOUNT_SECUREASSESSMENTACCOUNTTYPE + switch v { + case "azureADAccount": + result = AZUREADACCOUNT_SECUREASSESSMENTACCOUNTTYPE + case "domainAccount": + result = DOMAINACCOUNT_SECUREASSESSMENTACCOUNTTYPE + case "localAccount": + result = LOCALACCOUNT_SECUREASSESSMENTACCOUNTTYPE + case "localGuestAccount": + result = LOCALGUESTACCOUNT_SECUREASSESSMENTACCOUNTTYPE + default: + return 0, errors.New("Unknown SecureAssessmentAccountType value: " + v) + } + return &result, nil +} +func SerializeSecureAssessmentAccountType(values []SecureAssessmentAccountType) []string { + 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/secure_boot_with_d_m_a_type.go b/src/internal/connector/graph/betasdk/models/secure_boot_with_d_m_a_type.go new file mode 100644 index 000000000..17b8f5252 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_boot_with_d_m_a_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecureBootWithDMAType int + +const ( + // Not configured, no operation + NOTCONFIGURED_SECUREBOOTWITHDMATYPE SecureBootWithDMAType = iota + // Turns on VBS with Secure Boot + WITHOUTDMA_SECUREBOOTWITHDMATYPE + // Turns on VBS with Secure Boot and DMA + WITHDMA_SECUREBOOTWITHDMATYPE +) + +func (i SecureBootWithDMAType) String() string { + return []string{"notConfigured", "withoutDMA", "withDMA"}[i] +} +func ParseSecureBootWithDMAType(v string) (interface{}, error) { + result := NOTCONFIGURED_SECUREBOOTWITHDMATYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_SECUREBOOTWITHDMATYPE + case "withoutDMA": + result = WITHOUTDMA_SECUREBOOTWITHDMATYPE + case "withDMA": + result = WITHDMA_SECUREBOOTWITHDMATYPE + default: + return 0, errors.New("Unknown SecureBootWithDMAType value: " + v) + } + return &result, nil +} +func SerializeSecureBootWithDMAType(values []SecureBootWithDMAType) []string { + 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/secure_score.go b/src/internal/connector/graph/betasdk/models/secure_score.go new file mode 100644 index 000000000..b8cfb96a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score.go @@ -0,0 +1,315 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScore provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecureScore struct { + Entity + // Active user count of the given tenant. + activeUserCount *int32 + // Average score by different scopes (for example, average by industry, average by seating) and control category (Identity, Data, Device, Apps, Infrastructure) within the scope. + averageComparativeScores []AverageComparativeScoreable + // GUID string for tenant ID. + azureTenantId *string + // Contains tenant scores for a set of controls. + controlScores []ControlScoreable + // The date when the entity is created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Tenant current attained score on specified date. + currentScore *float64 + // Microsoft-provided services for the tenant (for example, Exchange online, Skype, SharePoint). + enabledServices []string + // Licensed user count of the given tenant. + licensedUserCount *int32 + // Tenant maximum possible score on specified date. + maxScore *float64 + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewSecureScore instantiates a new secureScore and sets the default values. +func NewSecureScore()(*SecureScore) { + m := &SecureScore{ + Entity: *NewEntity(), + } + return m +} +// CreateSecureScoreFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScore(), nil +} +// GetActiveUserCount gets the activeUserCount property value. Active user count of the given tenant. +func (m *SecureScore) GetActiveUserCount()(*int32) { + return m.activeUserCount +} +// GetAverageComparativeScores gets the averageComparativeScores property value. Average score by different scopes (for example, average by industry, average by seating) and control category (Identity, Data, Device, Apps, Infrastructure) within the scope. +func (m *SecureScore) GetAverageComparativeScores()([]AverageComparativeScoreable) { + return m.averageComparativeScores +} +// GetAzureTenantId gets the azureTenantId property value. GUID string for tenant ID. +func (m *SecureScore) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetControlScores gets the controlScores property value. Contains tenant scores for a set of controls. +func (m *SecureScore) GetControlScores()([]ControlScoreable) { + return m.controlScores +} +// GetCreatedDateTime gets the createdDateTime property value. The date when the entity is created. +func (m *SecureScore) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCurrentScore gets the currentScore property value. Tenant current attained score on specified date. +func (m *SecureScore) GetCurrentScore()(*float64) { + return m.currentScore +} +// GetEnabledServices gets the enabledServices property value. Microsoft-provided services for the tenant (for example, Exchange online, Skype, SharePoint). +func (m *SecureScore) GetEnabledServices()([]string) { + return m.enabledServices +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScore) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activeUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetActiveUserCount(val) + } + return nil + } + res["averageComparativeScores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAverageComparativeScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AverageComparativeScoreable, len(val)) + for i, v := range val { + res[i] = v.(AverageComparativeScoreable) + } + m.SetAverageComparativeScores(res) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["controlScores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateControlScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ControlScoreable, len(val)) + for i, v := range val { + res[i] = v.(ControlScoreable) + } + m.SetControlScores(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["currentScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetCurrentScore(val) + } + return nil + } + res["enabledServices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetEnabledServices(res) + } + return nil + } + res["licensedUserCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLicensedUserCount(val) + } + return nil + } + res["maxScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxScore(val) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetLicensedUserCount gets the licensedUserCount property value. Licensed user count of the given tenant. +func (m *SecureScore) GetLicensedUserCount()(*int32) { + return m.licensedUserCount +} +// GetMaxScore gets the maxScore property value. Tenant maximum possible score on specified date. +func (m *SecureScore) GetMaxScore()(*float64) { + return m.maxScore +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *SecureScore) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *SecureScore) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("activeUserCount", m.GetActiveUserCount()) + if err != nil { + return err + } + } + if m.GetAverageComparativeScores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAverageComparativeScores())) + for i, v := range m.GetAverageComparativeScores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("averageComparativeScores", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + if m.GetControlScores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetControlScores())) + for i, v := range m.GetControlScores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("controlScores", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("currentScore", m.GetCurrentScore()) + if err != nil { + return err + } + } + if m.GetEnabledServices() != nil { + err = writer.WriteCollectionOfStringValues("enabledServices", m.GetEnabledServices()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("licensedUserCount", m.GetLicensedUserCount()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("maxScore", m.GetMaxScore()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetActiveUserCount sets the activeUserCount property value. Active user count of the given tenant. +func (m *SecureScore) SetActiveUserCount(value *int32)() { + m.activeUserCount = value +} +// SetAverageComparativeScores sets the averageComparativeScores property value. Average score by different scopes (for example, average by industry, average by seating) and control category (Identity, Data, Device, Apps, Infrastructure) within the scope. +func (m *SecureScore) SetAverageComparativeScores(value []AverageComparativeScoreable)() { + m.averageComparativeScores = value +} +// SetAzureTenantId sets the azureTenantId property value. GUID string for tenant ID. +func (m *SecureScore) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetControlScores sets the controlScores property value. Contains tenant scores for a set of controls. +func (m *SecureScore) SetControlScores(value []ControlScoreable)() { + m.controlScores = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date when the entity is created. +func (m *SecureScore) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCurrentScore sets the currentScore property value. Tenant current attained score on specified date. +func (m *SecureScore) SetCurrentScore(value *float64)() { + m.currentScore = value +} +// SetEnabledServices sets the enabledServices property value. Microsoft-provided services for the tenant (for example, Exchange online, Skype, SharePoint). +func (m *SecureScore) SetEnabledServices(value []string)() { + m.enabledServices = value +} +// SetLicensedUserCount sets the licensedUserCount property value. Licensed user count of the given tenant. +func (m *SecureScore) SetLicensedUserCount(value *int32)() { + m.licensedUserCount = value +} +// SetMaxScore sets the maxScore property value. Tenant maximum possible score on specified date. +func (m *SecureScore) SetMaxScore(value *float64)() { + m.maxScore = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *SecureScore) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_collection_response.go b/src/internal/connector/graph/betasdk/models/secure_score_collection_response.go new file mode 100644 index 000000000..18c7a2554 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreCollectionResponse +type SecureScoreCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecureScoreable +} +// NewSecureScoreCollectionResponse instantiates a new SecureScoreCollectionResponse and sets the default values. +func NewSecureScoreCollectionResponse()(*SecureScoreCollectionResponse) { + m := &SecureScoreCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecureScoreCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScoreCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScoreCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecureScoreCollectionResponse) GetValue()([]SecureScoreable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecureScoreCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecureScoreCollectionResponse) SetValue(value []SecureScoreable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_collection_responseable.go b/src/internal/connector/graph/betasdk/models/secure_score_collection_responseable.go new file mode 100644 index 000000000..fc87d08e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreCollectionResponseable +type SecureScoreCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecureScoreable) + SetValue(value []SecureScoreable)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_profile.go b/src/internal/connector/graph/betasdk/models/secure_score_control_profile.go new file mode 100644 index 000000000..80c329b1a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_profile.go @@ -0,0 +1,549 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlProfile provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecureScoreControlProfile struct { + Entity + // Control action type (Config, Review, Behavior). + actionType *string + // URL to where the control can be actioned. + actionUrl *string + // GUID string for tenant ID. + azureTenantId *string + // The collection of compliance information associated with secure score control + complianceInformation []ComplianceInformationable + // Control action category (Account, Data, Device, Apps, Infrastructure). + controlCategory *string + // Flag to indicate where the tenant has marked a control (ignore, thirdParty, reviewed) (supports update). + controlStateUpdates []SecureScoreControlStateUpdateable + // Flag to indicate if a control is depreciated. + deprecated *bool + // Resource cost of implemmentating control (low, moderate, high). + implementationCost *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Current obtained max score on specified date. + maxScore *float64 + // Microsoft's stack ranking of control. + rank *int32 + // Description of what the control will help remediate. + remediation *string + // Description of the impact on users of the remediation. + remediationImpact *string + // Service that owns the control (Exchange, Sharepoint, Azure AD). + service *string + // List of threats the control mitigates (accountBreach,dataDeletion,dataExfiltration,dataSpillage,elevationOfPrivilege,maliciousInsider,passwordCracking,phishingOrWhaling,spoofing). + threats []string + // Control tier (Core, Defense in Depth, Advanced.) + tier *string + // Title of the control. + title *string + // User impact of implementing control (low, moderate, high). + userImpact *string + // The vendorInformation property + vendorInformation SecurityVendorInformationable +} +// NewSecureScoreControlProfile instantiates a new secureScoreControlProfile and sets the default values. +func NewSecureScoreControlProfile()(*SecureScoreControlProfile) { + m := &SecureScoreControlProfile{ + Entity: *NewEntity(), + } + return m +} +// CreateSecureScoreControlProfileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreControlProfileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScoreControlProfile(), nil +} +// GetActionType gets the actionType property value. Control action type (Config, Review, Behavior). +func (m *SecureScoreControlProfile) GetActionType()(*string) { + return m.actionType +} +// GetActionUrl gets the actionUrl property value. URL to where the control can be actioned. +func (m *SecureScoreControlProfile) GetActionUrl()(*string) { + return m.actionUrl +} +// GetAzureTenantId gets the azureTenantId property value. GUID string for tenant ID. +func (m *SecureScoreControlProfile) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetComplianceInformation gets the complianceInformation property value. The collection of compliance information associated with secure score control +func (m *SecureScoreControlProfile) GetComplianceInformation()([]ComplianceInformationable) { + return m.complianceInformation +} +// GetControlCategory gets the controlCategory property value. Control action category (Account, Data, Device, Apps, Infrastructure). +func (m *SecureScoreControlProfile) GetControlCategory()(*string) { + return m.controlCategory +} +// GetControlStateUpdates gets the controlStateUpdates property value. Flag to indicate where the tenant has marked a control (ignore, thirdParty, reviewed) (supports update). +func (m *SecureScoreControlProfile) GetControlStateUpdates()([]SecureScoreControlStateUpdateable) { + return m.controlStateUpdates +} +// GetDeprecated gets the deprecated property value. Flag to indicate if a control is depreciated. +func (m *SecureScoreControlProfile) GetDeprecated()(*bool) { + return m.deprecated +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScoreControlProfile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionType(val) + } + return nil + } + res["actionUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionUrl(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["complianceInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateComplianceInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ComplianceInformationable, len(val)) + for i, v := range val { + res[i] = v.(ComplianceInformationable) + } + m.SetComplianceInformation(res) + } + return nil + } + res["controlCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetControlCategory(val) + } + return nil + } + res["controlStateUpdates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreControlStateUpdateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreControlStateUpdateable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreControlStateUpdateable) + } + m.SetControlStateUpdates(res) + } + return nil + } + res["deprecated"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDeprecated(val) + } + return nil + } + res["implementationCost"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImplementationCost(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["maxScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetFloat64Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxScore(val) + } + return nil + } + res["rank"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRank(val) + } + return nil + } + res["remediation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediation(val) + } + return nil + } + res["remediationImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediationImpact(val) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["threats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetThreats(res) + } + return nil + } + res["tier"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTier(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + res["userImpact"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserImpact(val) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetImplementationCost gets the implementationCost property value. Resource cost of implemmentating control (low, moderate, high). +func (m *SecureScoreControlProfile) GetImplementationCost()(*string) { + return m.implementationCost +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SecureScoreControlProfile) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetMaxScore gets the maxScore property value. Current obtained max score on specified date. +func (m *SecureScoreControlProfile) GetMaxScore()(*float64) { + return m.maxScore +} +// GetRank gets the rank property value. Microsoft's stack ranking of control. +func (m *SecureScoreControlProfile) GetRank()(*int32) { + return m.rank +} +// GetRemediation gets the remediation property value. Description of what the control will help remediate. +func (m *SecureScoreControlProfile) GetRemediation()(*string) { + return m.remediation +} +// GetRemediationImpact gets the remediationImpact property value. Description of the impact on users of the remediation. +func (m *SecureScoreControlProfile) GetRemediationImpact()(*string) { + return m.remediationImpact +} +// GetService gets the service property value. Service that owns the control (Exchange, Sharepoint, Azure AD). +func (m *SecureScoreControlProfile) GetService()(*string) { + return m.service +} +// GetThreats gets the threats property value. List of threats the control mitigates (accountBreach,dataDeletion,dataExfiltration,dataSpillage,elevationOfPrivilege,maliciousInsider,passwordCracking,phishingOrWhaling,spoofing). +func (m *SecureScoreControlProfile) GetThreats()([]string) { + return m.threats +} +// GetTier gets the tier property value. Control tier (Core, Defense in Depth, Advanced.) +func (m *SecureScoreControlProfile) GetTier()(*string) { + return m.tier +} +// GetTitle gets the title property value. Title of the control. +func (m *SecureScoreControlProfile) GetTitle()(*string) { + return m.title +} +// GetUserImpact gets the userImpact property value. User impact of implementing control (low, moderate, high). +func (m *SecureScoreControlProfile) GetUserImpact()(*string) { + return m.userImpact +} +// GetVendorInformation gets the vendorInformation property value. The vendorInformation property +func (m *SecureScoreControlProfile) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *SecureScoreControlProfile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("actionType", m.GetActionType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("actionUrl", m.GetActionUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + if m.GetComplianceInformation() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComplianceInformation())) + for i, v := range m.GetComplianceInformation() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("complianceInformation", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("controlCategory", m.GetControlCategory()) + if err != nil { + return err + } + } + if m.GetControlStateUpdates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetControlStateUpdates())) + for i, v := range m.GetControlStateUpdates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("controlStateUpdates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("deprecated", m.GetDeprecated()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("implementationCost", m.GetImplementationCost()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteFloat64Value("maxScore", m.GetMaxScore()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("rank", m.GetRank()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remediation", m.GetRemediation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("remediationImpact", m.GetRemediationImpact()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + if m.GetThreats() != nil { + err = writer.WriteCollectionOfStringValues("threats", m.GetThreats()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tier", m.GetTier()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userImpact", m.GetUserImpact()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetActionType sets the actionType property value. Control action type (Config, Review, Behavior). +func (m *SecureScoreControlProfile) SetActionType(value *string)() { + m.actionType = value +} +// SetActionUrl sets the actionUrl property value. URL to where the control can be actioned. +func (m *SecureScoreControlProfile) SetActionUrl(value *string)() { + m.actionUrl = value +} +// SetAzureTenantId sets the azureTenantId property value. GUID string for tenant ID. +func (m *SecureScoreControlProfile) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetComplianceInformation sets the complianceInformation property value. The collection of compliance information associated with secure score control +func (m *SecureScoreControlProfile) SetComplianceInformation(value []ComplianceInformationable)() { + m.complianceInformation = value +} +// SetControlCategory sets the controlCategory property value. Control action category (Account, Data, Device, Apps, Infrastructure). +func (m *SecureScoreControlProfile) SetControlCategory(value *string)() { + m.controlCategory = value +} +// SetControlStateUpdates sets the controlStateUpdates property value. Flag to indicate where the tenant has marked a control (ignore, thirdParty, reviewed) (supports update). +func (m *SecureScoreControlProfile) SetControlStateUpdates(value []SecureScoreControlStateUpdateable)() { + m.controlStateUpdates = value +} +// SetDeprecated sets the deprecated property value. Flag to indicate if a control is depreciated. +func (m *SecureScoreControlProfile) SetDeprecated(value *bool)() { + m.deprecated = value +} +// SetImplementationCost sets the implementationCost property value. Resource cost of implemmentating control (low, moderate, high). +func (m *SecureScoreControlProfile) SetImplementationCost(value *string)() { + m.implementationCost = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *SecureScoreControlProfile) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetMaxScore sets the maxScore property value. Current obtained max score on specified date. +func (m *SecureScoreControlProfile) SetMaxScore(value *float64)() { + m.maxScore = value +} +// SetRank sets the rank property value. Microsoft's stack ranking of control. +func (m *SecureScoreControlProfile) SetRank(value *int32)() { + m.rank = value +} +// SetRemediation sets the remediation property value. Description of what the control will help remediate. +func (m *SecureScoreControlProfile) SetRemediation(value *string)() { + m.remediation = value +} +// SetRemediationImpact sets the remediationImpact property value. Description of the impact on users of the remediation. +func (m *SecureScoreControlProfile) SetRemediationImpact(value *string)() { + m.remediationImpact = value +} +// SetService sets the service property value. Service that owns the control (Exchange, Sharepoint, Azure AD). +func (m *SecureScoreControlProfile) SetService(value *string)() { + m.service = value +} +// SetThreats sets the threats property value. List of threats the control mitigates (accountBreach,dataDeletion,dataExfiltration,dataSpillage,elevationOfPrivilege,maliciousInsider,passwordCracking,phishingOrWhaling,spoofing). +func (m *SecureScoreControlProfile) SetThreats(value []string)() { + m.threats = value +} +// SetTier sets the tier property value. Control tier (Core, Defense in Depth, Advanced.) +func (m *SecureScoreControlProfile) SetTier(value *string)() { + m.tier = value +} +// SetTitle sets the title property value. Title of the control. +func (m *SecureScoreControlProfile) SetTitle(value *string)() { + m.title = value +} +// SetUserImpact sets the userImpact property value. User impact of implementing control (low, moderate, high). +func (m *SecureScoreControlProfile) SetUserImpact(value *string)() { + m.userImpact = value +} +// SetVendorInformation sets the vendorInformation property value. The vendorInformation property +func (m *SecureScoreControlProfile) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_response.go b/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_response.go new file mode 100644 index 000000000..ce4683c53 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlProfileCollectionResponse +type SecureScoreControlProfileCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecureScoreControlProfileable +} +// NewSecureScoreControlProfileCollectionResponse instantiates a new SecureScoreControlProfileCollectionResponse and sets the default values. +func NewSecureScoreControlProfileCollectionResponse()(*SecureScoreControlProfileCollectionResponse) { + m := &SecureScoreControlProfileCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecureScoreControlProfileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreControlProfileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScoreControlProfileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScoreControlProfileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreControlProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreControlProfileable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreControlProfileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecureScoreControlProfileCollectionResponse) GetValue()([]SecureScoreControlProfileable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecureScoreControlProfileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecureScoreControlProfileCollectionResponse) SetValue(value []SecureScoreControlProfileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_responseable.go b/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_responseable.go new file mode 100644 index 000000000..9e2970478 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_profile_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlProfileCollectionResponseable +type SecureScoreControlProfileCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecureScoreControlProfileable) + SetValue(value []SecureScoreControlProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_profileable.go b/src/internal/connector/graph/betasdk/models/secure_score_control_profileable.go new file mode 100644 index 000000000..1616ec690 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_profileable.go @@ -0,0 +1,50 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlProfileable +type SecureScoreControlProfileable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionType()(*string) + GetActionUrl()(*string) + GetAzureTenantId()(*string) + GetComplianceInformation()([]ComplianceInformationable) + GetControlCategory()(*string) + GetControlStateUpdates()([]SecureScoreControlStateUpdateable) + GetDeprecated()(*bool) + GetImplementationCost()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMaxScore()(*float64) + GetRank()(*int32) + GetRemediation()(*string) + GetRemediationImpact()(*string) + GetService()(*string) + GetThreats()([]string) + GetTier()(*string) + GetTitle()(*string) + GetUserImpact()(*string) + GetVendorInformation()(SecurityVendorInformationable) + SetActionType(value *string)() + SetActionUrl(value *string)() + SetAzureTenantId(value *string)() + SetComplianceInformation(value []ComplianceInformationable)() + SetControlCategory(value *string)() + SetControlStateUpdates(value []SecureScoreControlStateUpdateable)() + SetDeprecated(value *bool)() + SetImplementationCost(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMaxScore(value *float64)() + SetRank(value *int32)() + SetRemediation(value *string)() + SetRemediationImpact(value *string)() + SetService(value *string)() + SetThreats(value []string)() + SetTier(value *string)() + SetTitle(value *string)() + SetUserImpact(value *string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_state_update.go b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update.go new file mode 100644 index 000000000..b9fde6f3a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update.go @@ -0,0 +1,202 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlStateUpdate +type SecureScoreControlStateUpdate 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 assignedTo property + assignedTo *string + // The comment property + comment *string + // The OdataType property + odataType *string + // The state property + state *string + // The updatedBy property + updatedBy *string + // The updatedDateTime property + updatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewSecureScoreControlStateUpdate instantiates a new secureScoreControlStateUpdate and sets the default values. +func NewSecureScoreControlStateUpdate()(*SecureScoreControlStateUpdate) { + m := &SecureScoreControlStateUpdate{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecureScoreControlStateUpdateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreControlStateUpdateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScoreControlStateUpdate(), 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 *SecureScoreControlStateUpdate) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignedTo gets the assignedTo property value. The assignedTo property +func (m *SecureScoreControlStateUpdate) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetComment gets the comment property value. The comment property +func (m *SecureScoreControlStateUpdate) GetComment()(*string) { + return m.comment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScoreControlStateUpdate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(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["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + res["updatedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedBy(val) + } + return nil + } + res["updatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedDateTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecureScoreControlStateUpdate) GetOdataType()(*string) { + return m.odataType +} +// GetState gets the state property value. The state property +func (m *SecureScoreControlStateUpdate) GetState()(*string) { + return m.state +} +// GetUpdatedBy gets the updatedBy property value. The updatedBy property +func (m *SecureScoreControlStateUpdate) GetUpdatedBy()(*string) { + return m.updatedBy +} +// GetUpdatedDateTime gets the updatedDateTime property value. The updatedDateTime property +func (m *SecureScoreControlStateUpdate) GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedDateTime +} +// Serialize serializes information the current object +func (m *SecureScoreControlStateUpdate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("updatedBy", m.GetUpdatedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updatedDateTime", m.GetUpdatedDateTime()) + 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 *SecureScoreControlStateUpdate) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignedTo sets the assignedTo property value. The assignedTo property +func (m *SecureScoreControlStateUpdate) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetComment sets the comment property value. The comment property +func (m *SecureScoreControlStateUpdate) SetComment(value *string)() { + m.comment = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecureScoreControlStateUpdate) SetOdataType(value *string)() { + m.odataType = value +} +// SetState sets the state property value. The state property +func (m *SecureScoreControlStateUpdate) SetState(value *string)() { + m.state = value +} +// SetUpdatedBy sets the updatedBy property value. The updatedBy property +func (m *SecureScoreControlStateUpdate) SetUpdatedBy(value *string)() { + m.updatedBy = value +} +// SetUpdatedDateTime sets the updatedDateTime property value. The updatedDateTime property +func (m *SecureScoreControlStateUpdate) SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_response.go b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_response.go new file mode 100644 index 000000000..8ad9b8bdf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlStateUpdateCollectionResponse +type SecureScoreControlStateUpdateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecureScoreControlStateUpdateable +} +// NewSecureScoreControlStateUpdateCollectionResponse instantiates a new SecureScoreControlStateUpdateCollectionResponse and sets the default values. +func NewSecureScoreControlStateUpdateCollectionResponse()(*SecureScoreControlStateUpdateCollectionResponse) { + m := &SecureScoreControlStateUpdateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecureScoreControlStateUpdateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecureScoreControlStateUpdateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecureScoreControlStateUpdateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecureScoreControlStateUpdateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreControlStateUpdateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreControlStateUpdateable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreControlStateUpdateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecureScoreControlStateUpdateCollectionResponse) GetValue()([]SecureScoreControlStateUpdateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecureScoreControlStateUpdateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecureScoreControlStateUpdateCollectionResponse) SetValue(value []SecureScoreControlStateUpdateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_responseable.go b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_responseable.go new file mode 100644 index 000000000..c5d89caac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_state_update_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlStateUpdateCollectionResponseable +type SecureScoreControlStateUpdateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecureScoreControlStateUpdateable) + SetValue(value []SecureScoreControlStateUpdateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_score_control_state_updateable.go b/src/internal/connector/graph/betasdk/models/secure_score_control_state_updateable.go new file mode 100644 index 000000000..2f686b5f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_score_control_state_updateable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreControlStateUpdateable +type SecureScoreControlStateUpdateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignedTo()(*string) + GetComment()(*string) + GetOdataType()(*string) + GetState()(*string) + GetUpdatedBy()(*string) + GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetAssignedTo(value *string)() + SetComment(value *string)() + SetOdataType(value *string)() + SetState(value *string)() + SetUpdatedBy(value *string)() + SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/secure_scoreable.go b/src/internal/connector/graph/betasdk/models/secure_scoreable.go new file mode 100644 index 000000000..56fe90237 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/secure_scoreable.go @@ -0,0 +1,32 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecureScoreable +type SecureScoreable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActiveUserCount()(*int32) + GetAverageComparativeScores()([]AverageComparativeScoreable) + GetAzureTenantId()(*string) + GetControlScores()([]ControlScoreable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCurrentScore()(*float64) + GetEnabledServices()([]string) + GetLicensedUserCount()(*int32) + GetMaxScore()(*float64) + GetVendorInformation()(SecurityVendorInformationable) + SetActiveUserCount(value *int32)() + SetAverageComparativeScores(value []AverageComparativeScoreable)() + SetAzureTenantId(value *string)() + SetControlScores(value []ControlScoreable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCurrentScore(value *float64)() + SetEnabledServices(value []string)() + SetLicensedUserCount(value *int32)() + SetMaxScore(value *float64)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security.go b/src/internal/connector/graph/betasdk/models/security.go new file mode 100644 index 000000000..756b4c54a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security.go @@ -0,0 +1,536 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Security +type Security struct { + Entity + // Notifications for suspicious or potential security issues in a customer’s tenant. + alerts []Alertable + // Provides tenants capability to launch a simulated and realistic phishing attack and learn from it. + attackSimulation AttackSimulationRootable + // The cloudAppSecurityProfiles property + cloudAppSecurityProfiles []CloudAppSecurityProfileable + // The domainSecurityProfiles property + domainSecurityProfiles []DomainSecurityProfileable + // The fileSecurityProfiles property + fileSecurityProfiles []FileSecurityProfileable + // The hostSecurityProfiles property + hostSecurityProfiles []HostSecurityProfileable + // The ipSecurityProfiles property + ipSecurityProfiles []IpSecurityProfileable + // The providerStatus property + providerStatus []SecurityProviderStatusable + // The providerTenantSettings property + providerTenantSettings []ProviderTenantSettingable + // The secureScoreControlProfiles property + secureScoreControlProfiles []SecureScoreControlProfileable + // Measurements of tenants’ security posture to help protect them from threats. + secureScores []SecureScoreable + // The securityActions property + securityActions []SecurityActionable + // The subjectRightsRequests property + subjectRightsRequests []SubjectRightsRequestable + // The tiIndicators property + tiIndicators []TiIndicatorable + // The userSecurityProfiles property + userSecurityProfiles []UserSecurityProfileable +} +// NewSecurity instantiates a new Security and sets the default values. +func NewSecurity()(*Security) { + m := &Security{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurity(), nil +} +// GetAlerts gets the alerts property value. Notifications for suspicious or potential security issues in a customer’s tenant. +func (m *Security) GetAlerts()([]Alertable) { + return m.alerts +} +// GetAttackSimulation gets the attackSimulation property value. Provides tenants capability to launch a simulated and realistic phishing attack and learn from it. +func (m *Security) GetAttackSimulation()(AttackSimulationRootable) { + return m.attackSimulation +} +// GetCloudAppSecurityProfiles gets the cloudAppSecurityProfiles property value. The cloudAppSecurityProfiles property +func (m *Security) GetCloudAppSecurityProfiles()([]CloudAppSecurityProfileable) { + return m.cloudAppSecurityProfiles +} +// GetDomainSecurityProfiles gets the domainSecurityProfiles property value. The domainSecurityProfiles property +func (m *Security) GetDomainSecurityProfiles()([]DomainSecurityProfileable) { + return m.domainSecurityProfiles +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Security) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Alertable, len(val)) + for i, v := range val { + res[i] = v.(Alertable) + } + m.SetAlerts(res) + } + return nil + } + res["attackSimulation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAttackSimulationRootFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttackSimulation(val.(AttackSimulationRootable)) + } + return nil + } + res["cloudAppSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCloudAppSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CloudAppSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(CloudAppSecurityProfileable) + } + m.SetCloudAppSecurityProfiles(res) + } + return nil + } + res["domainSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDomainSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DomainSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(DomainSecurityProfileable) + } + m.SetDomainSecurityProfiles(res) + } + return nil + } + res["fileSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(FileSecurityProfileable) + } + m.SetFileSecurityProfiles(res) + } + return nil + } + res["hostSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHostSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HostSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(HostSecurityProfileable) + } + m.SetHostSecurityProfiles(res) + } + return nil + } + res["ipSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIpSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IpSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(IpSecurityProfileable) + } + m.SetIpSecurityProfiles(res) + } + return nil + } + res["providerStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityProviderStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityProviderStatusable, len(val)) + for i, v := range val { + res[i] = v.(SecurityProviderStatusable) + } + m.SetProviderStatus(res) + } + return nil + } + res["providerTenantSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateProviderTenantSettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ProviderTenantSettingable, len(val)) + for i, v := range val { + res[i] = v.(ProviderTenantSettingable) + } + m.SetProviderTenantSettings(res) + } + return nil + } + res["secureScoreControlProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreControlProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreControlProfileable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreControlProfileable) + } + m.SetSecureScoreControlProfiles(res) + } + return nil + } + res["secureScores"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecureScoreFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecureScoreable, len(val)) + for i, v := range val { + res[i] = v.(SecureScoreable) + } + m.SetSecureScores(res) + } + return nil + } + res["securityActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityActionable, len(val)) + for i, v := range val { + res[i] = v.(SecurityActionable) + } + m.SetSecurityActions(res) + } + return nil + } + res["subjectRightsRequests"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSubjectRightsRequestFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SubjectRightsRequestable, len(val)) + for i, v := range val { + res[i] = v.(SubjectRightsRequestable) + } + m.SetSubjectRightsRequests(res) + } + return nil + } + res["tiIndicators"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTiIndicatorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TiIndicatorable, len(val)) + for i, v := range val { + res[i] = v.(TiIndicatorable) + } + m.SetTiIndicators(res) + } + return nil + } + res["userSecurityProfiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSecurityProfileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSecurityProfileable, len(val)) + for i, v := range val { + res[i] = v.(UserSecurityProfileable) + } + m.SetUserSecurityProfiles(res) + } + return nil + } + return res +} +// GetFileSecurityProfiles gets the fileSecurityProfiles property value. The fileSecurityProfiles property +func (m *Security) GetFileSecurityProfiles()([]FileSecurityProfileable) { + return m.fileSecurityProfiles +} +// GetHostSecurityProfiles gets the hostSecurityProfiles property value. The hostSecurityProfiles property +func (m *Security) GetHostSecurityProfiles()([]HostSecurityProfileable) { + return m.hostSecurityProfiles +} +// GetIpSecurityProfiles gets the ipSecurityProfiles property value. The ipSecurityProfiles property +func (m *Security) GetIpSecurityProfiles()([]IpSecurityProfileable) { + return m.ipSecurityProfiles +} +// GetProviderStatus gets the providerStatus property value. The providerStatus property +func (m *Security) GetProviderStatus()([]SecurityProviderStatusable) { + return m.providerStatus +} +// GetProviderTenantSettings gets the providerTenantSettings property value. The providerTenantSettings property +func (m *Security) GetProviderTenantSettings()([]ProviderTenantSettingable) { + return m.providerTenantSettings +} +// GetSecureScoreControlProfiles gets the secureScoreControlProfiles property value. The secureScoreControlProfiles property +func (m *Security) GetSecureScoreControlProfiles()([]SecureScoreControlProfileable) { + return m.secureScoreControlProfiles +} +// GetSecureScores gets the secureScores property value. Measurements of tenants’ security posture to help protect them from threats. +func (m *Security) GetSecureScores()([]SecureScoreable) { + return m.secureScores +} +// GetSecurityActions gets the securityActions property value. The securityActions property +func (m *Security) GetSecurityActions()([]SecurityActionable) { + return m.securityActions +} +// GetSubjectRightsRequests gets the subjectRightsRequests property value. The subjectRightsRequests property +func (m *Security) GetSubjectRightsRequests()([]SubjectRightsRequestable) { + return m.subjectRightsRequests +} +// GetTiIndicators gets the tiIndicators property value. The tiIndicators property +func (m *Security) GetTiIndicators()([]TiIndicatorable) { + return m.tiIndicators +} +// GetUserSecurityProfiles gets the userSecurityProfiles property value. The userSecurityProfiles property +func (m *Security) GetUserSecurityProfiles()([]UserSecurityProfileable) { + return m.userSecurityProfiles +} +// Serialize serializes information the current object +func (m *Security) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAlerts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlerts())) + for i, v := range m.GetAlerts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alerts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("attackSimulation", m.GetAttackSimulation()) + if err != nil { + return err + } + } + if m.GetCloudAppSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCloudAppSecurityProfiles())) + for i, v := range m.GetCloudAppSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("cloudAppSecurityProfiles", cast) + if err != nil { + return err + } + } + if m.GetDomainSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDomainSecurityProfiles())) + for i, v := range m.GetDomainSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("domainSecurityProfiles", cast) + if err != nil { + return err + } + } + if m.GetFileSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFileSecurityProfiles())) + for i, v := range m.GetFileSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fileSecurityProfiles", cast) + if err != nil { + return err + } + } + if m.GetHostSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHostSecurityProfiles())) + for i, v := range m.GetHostSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("hostSecurityProfiles", cast) + if err != nil { + return err + } + } + if m.GetIpSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIpSecurityProfiles())) + for i, v := range m.GetIpSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ipSecurityProfiles", cast) + if err != nil { + return err + } + } + if m.GetProviderStatus() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProviderStatus())) + for i, v := range m.GetProviderStatus() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("providerStatus", cast) + if err != nil { + return err + } + } + if m.GetProviderTenantSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProviderTenantSettings())) + for i, v := range m.GetProviderTenantSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("providerTenantSettings", cast) + if err != nil { + return err + } + } + if m.GetSecureScoreControlProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecureScoreControlProfiles())) + for i, v := range m.GetSecureScoreControlProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("secureScoreControlProfiles", cast) + if err != nil { + return err + } + } + if m.GetSecureScores() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecureScores())) + for i, v := range m.GetSecureScores() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("secureScores", cast) + if err != nil { + return err + } + } + if m.GetSecurityActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSecurityActions())) + for i, v := range m.GetSecurityActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("securityActions", cast) + if err != nil { + return err + } + } + if m.GetSubjectRightsRequests() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSubjectRightsRequests())) + for i, v := range m.GetSubjectRightsRequests() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("subjectRightsRequests", cast) + if err != nil { + return err + } + } + if m.GetTiIndicators() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTiIndicators())) + for i, v := range m.GetTiIndicators() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tiIndicators", cast) + if err != nil { + return err + } + } + if m.GetUserSecurityProfiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserSecurityProfiles())) + for i, v := range m.GetUserSecurityProfiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userSecurityProfiles", cast) + if err != nil { + return err + } + } + return nil +} +// SetAlerts sets the alerts property value. Notifications for suspicious or potential security issues in a customer’s tenant. +func (m *Security) SetAlerts(value []Alertable)() { + m.alerts = value +} +// SetAttackSimulation sets the attackSimulation property value. Provides tenants capability to launch a simulated and realistic phishing attack and learn from it. +func (m *Security) SetAttackSimulation(value AttackSimulationRootable)() { + m.attackSimulation = value +} +// SetCloudAppSecurityProfiles sets the cloudAppSecurityProfiles property value. The cloudAppSecurityProfiles property +func (m *Security) SetCloudAppSecurityProfiles(value []CloudAppSecurityProfileable)() { + m.cloudAppSecurityProfiles = value +} +// SetDomainSecurityProfiles sets the domainSecurityProfiles property value. The domainSecurityProfiles property +func (m *Security) SetDomainSecurityProfiles(value []DomainSecurityProfileable)() { + m.domainSecurityProfiles = value +} +// SetFileSecurityProfiles sets the fileSecurityProfiles property value. The fileSecurityProfiles property +func (m *Security) SetFileSecurityProfiles(value []FileSecurityProfileable)() { + m.fileSecurityProfiles = value +} +// SetHostSecurityProfiles sets the hostSecurityProfiles property value. The hostSecurityProfiles property +func (m *Security) SetHostSecurityProfiles(value []HostSecurityProfileable)() { + m.hostSecurityProfiles = value +} +// SetIpSecurityProfiles sets the ipSecurityProfiles property value. The ipSecurityProfiles property +func (m *Security) SetIpSecurityProfiles(value []IpSecurityProfileable)() { + m.ipSecurityProfiles = value +} +// SetProviderStatus sets the providerStatus property value. The providerStatus property +func (m *Security) SetProviderStatus(value []SecurityProviderStatusable)() { + m.providerStatus = value +} +// SetProviderTenantSettings sets the providerTenantSettings property value. The providerTenantSettings property +func (m *Security) SetProviderTenantSettings(value []ProviderTenantSettingable)() { + m.providerTenantSettings = value +} +// SetSecureScoreControlProfiles sets the secureScoreControlProfiles property value. The secureScoreControlProfiles property +func (m *Security) SetSecureScoreControlProfiles(value []SecureScoreControlProfileable)() { + m.secureScoreControlProfiles = value +} +// SetSecureScores sets the secureScores property value. Measurements of tenants’ security posture to help protect them from threats. +func (m *Security) SetSecureScores(value []SecureScoreable)() { + m.secureScores = value +} +// SetSecurityActions sets the securityActions property value. The securityActions property +func (m *Security) SetSecurityActions(value []SecurityActionable)() { + m.securityActions = value +} +// SetSubjectRightsRequests sets the subjectRightsRequests property value. The subjectRightsRequests property +func (m *Security) SetSubjectRightsRequests(value []SubjectRightsRequestable)() { + m.subjectRightsRequests = value +} +// SetTiIndicators sets the tiIndicators property value. The tiIndicators property +func (m *Security) SetTiIndicators(value []TiIndicatorable)() { + m.tiIndicators = value +} +// SetUserSecurityProfiles sets the userSecurityProfiles property value. The userSecurityProfiles property +func (m *Security) SetUserSecurityProfiles(value []UserSecurityProfileable)() { + m.userSecurityProfiles = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/action_after_retention_period.go b/src/internal/connector/graph/betasdk/models/security/action_after_retention_period.go new file mode 100644 index 000000000..43d141410 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/action_after_retention_period.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ActionAfterRetentionPeriod int + +const ( + NONE_ACTIONAFTERRETENTIONPERIOD ActionAfterRetentionPeriod = iota + DELETE_ACTIONAFTERRETENTIONPERIOD + STARTDISPOSITIONREVIEW_ACTIONAFTERRETENTIONPERIOD + RELABEL_ACTIONAFTERRETENTIONPERIOD + UNKNOWNFUTUREVALUE_ACTIONAFTERRETENTIONPERIOD +) + +func (i ActionAfterRetentionPeriod) String() string { + return []string{"none", "delete", "startDispositionReview", "relabel", "unknownFutureValue"}[i] +} +func ParseActionAfterRetentionPeriod(v string) (interface{}, error) { + result := NONE_ACTIONAFTERRETENTIONPERIOD + switch v { + case "none": + result = NONE_ACTIONAFTERRETENTIONPERIOD + case "delete": + result = DELETE_ACTIONAFTERRETENTIONPERIOD + case "startDispositionReview": + result = STARTDISPOSITIONREVIEW_ACTIONAFTERRETENTIONPERIOD + case "relabel": + result = RELABEL_ACTIONAFTERRETENTIONPERIOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ACTIONAFTERRETENTIONPERIOD + default: + return 0, errors.New("Unknown ActionAfterRetentionPeriod value: " + v) + } + return &result, nil +} +func SerializeActionAfterRetentionPeriod(values []ActionAfterRetentionPeriod) []string { + 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/security/action_source.go b/src/internal/connector/graph/betasdk/models/security/action_source.go new file mode 100644 index 000000000..7b87ed929 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/action_source.go @@ -0,0 +1,40 @@ +package security +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type ActionSource int + +const ( + MANUAL_ACTIONSOURCE ActionSource = iota + AUTOMATIC_ACTIONSOURCE + RECOMMENDED_ACTIONSOURCE + DEFAULT_ESCAPED_ACTIONSOURCE +) + +func (i ActionSource) String() string { + return []string{"manual", "automatic", "recommended", "default"}[i] +} +func ParseActionSource(v string) (interface{}, error) { + result := MANUAL_ACTIONSOURCE + switch v { + case "manual": + result = MANUAL_ACTIONSOURCE + case "automatic": + result = AUTOMATIC_ACTIONSOURCE + case "recommended": + result = RECOMMENDED_ACTIONSOURCE + case "default": + result = DEFAULT_ESCAPED_ACTIONSOURCE + default: + return 0, errors.New("Unknown ActionSource value: " + v) + } + return &result, nil +} +func SerializeActionSource(values []ActionSource) []string { + 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/security/add_content_footer_action.go b/src/internal/connector/graph/betasdk/models/security/add_content_footer_action.go new file mode 100644 index 000000000..70bfc9c45 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_content_footer_action.go @@ -0,0 +1,219 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentFooterAction +type AddContentFooterAction struct { + InformationProtectionAction + // The alignment property + alignment *ContentAlignment + // Color of the font to use for the footer. + fontColor *string + // Name of the font to use for the footer. + fontName *string + // Font size to use for the footer. + fontSize *int32 + // The margin of the header from the bottom of the document. + margin *int32 + // The contents of the footer itself. + text *string + // The name of the UI element where the footer should be placed. + uiElementName *string +} +// NewAddContentFooterAction instantiates a new AddContentFooterAction and sets the default values. +func NewAddContentFooterAction()(*AddContentFooterAction) { + m := &AddContentFooterAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.addContentFooterAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddContentFooterActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddContentFooterActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddContentFooterAction(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddContentFooterAction) GetAlignment()(*ContentAlignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddContentFooterAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*ContentAlignment)) + } + return nil + } + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the footer. +func (m *AddContentFooterAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the footer. +func (m *AddContentFooterAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the footer. +func (m *AddContentFooterAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetMargin gets the margin property value. The margin of the header from the bottom of the document. +func (m *AddContentFooterAction) GetMargin()(*int32) { + return m.margin +} +// GetText gets the text property value. The contents of the footer itself. +func (m *AddContentFooterAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the footer should be placed. +func (m *AddContentFooterAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddContentFooterAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddContentFooterAction) SetAlignment(value *ContentAlignment)() { + m.alignment = value +} +// SetFontColor sets the fontColor property value. Color of the font to use for the footer. +func (m *AddContentFooterAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the footer. +func (m *AddContentFooterAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the footer. +func (m *AddContentFooterAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetMargin sets the margin property value. The margin of the header from the bottom of the document. +func (m *AddContentFooterAction) SetMargin(value *int32)() { + m.margin = value +} +// SetText sets the text property value. The contents of the footer itself. +func (m *AddContentFooterAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the footer should be placed. +func (m *AddContentFooterAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/add_content_footer_actionable.go b/src/internal/connector/graph/betasdk/models/security/add_content_footer_actionable.go new file mode 100644 index 000000000..a4af7dced --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_content_footer_actionable.go @@ -0,0 +1,25 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentFooterActionable +type AddContentFooterActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*ContentAlignment) + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetMargin()(*int32) + GetText()(*string) + GetUiElementName()(*string) + SetAlignment(value *ContentAlignment)() + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetMargin(value *int32)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/add_content_header_action.go b/src/internal/connector/graph/betasdk/models/security/add_content_header_action.go new file mode 100644 index 000000000..8c9971a19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_content_header_action.go @@ -0,0 +1,219 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentHeaderAction +type AddContentHeaderAction struct { + InformationProtectionAction + // The alignment property + alignment *ContentAlignment + // Color of the font to use for the header. + fontColor *string + // Name of the font to use for the header. + fontName *string + // Font size to use for the header. + fontSize *int32 + // The margin of the header from the top of the document. + margin *int32 + // The contents of the header itself. + text *string + // The name of the UI element where the header should be placed. + uiElementName *string +} +// NewAddContentHeaderAction instantiates a new AddContentHeaderAction and sets the default values. +func NewAddContentHeaderAction()(*AddContentHeaderAction) { + m := &AddContentHeaderAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.addContentHeaderAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddContentHeaderActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddContentHeaderActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddContentHeaderAction(), nil +} +// GetAlignment gets the alignment property value. The alignment property +func (m *AddContentHeaderAction) GetAlignment()(*ContentAlignment) { + return m.alignment +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddContentHeaderAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["alignment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseContentAlignment) + if err != nil { + return err + } + if val != nil { + m.SetAlignment(val.(*ContentAlignment)) + } + return nil + } + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["margin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMargin(val) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the header. +func (m *AddContentHeaderAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the header. +func (m *AddContentHeaderAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the header. +func (m *AddContentHeaderAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetMargin gets the margin property value. The margin of the header from the top of the document. +func (m *AddContentHeaderAction) GetMargin()(*int32) { + return m.margin +} +// GetText gets the text property value. The contents of the header itself. +func (m *AddContentHeaderAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the header should be placed. +func (m *AddContentHeaderAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddContentHeaderAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetAlignment() != nil { + cast := (*m.GetAlignment()).String() + err = writer.WriteStringValue("alignment", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("margin", m.GetMargin()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetAlignment sets the alignment property value. The alignment property +func (m *AddContentHeaderAction) SetAlignment(value *ContentAlignment)() { + m.alignment = value +} +// SetFontColor sets the fontColor property value. Color of the font to use for the header. +func (m *AddContentHeaderAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the header. +func (m *AddContentHeaderAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the header. +func (m *AddContentHeaderAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetMargin sets the margin property value. The margin of the header from the top of the document. +func (m *AddContentHeaderAction) SetMargin(value *int32)() { + m.margin = value +} +// SetText sets the text property value. The contents of the header itself. +func (m *AddContentHeaderAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the header should be placed. +func (m *AddContentHeaderAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/add_content_header_actionable.go b/src/internal/connector/graph/betasdk/models/security/add_content_header_actionable.go new file mode 100644 index 000000000..78bd7da69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_content_header_actionable.go @@ -0,0 +1,25 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddContentHeaderActionable +type AddContentHeaderActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlignment()(*ContentAlignment) + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetMargin()(*int32) + GetText()(*string) + GetUiElementName()(*string) + SetAlignment(value *ContentAlignment)() + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetMargin(value *int32)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/add_watermark_action.go b/src/internal/connector/graph/betasdk/models/security/add_watermark_action.go new file mode 100644 index 000000000..e6cdd3d63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_watermark_action.go @@ -0,0 +1,193 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermarkAction +type AddWatermarkAction struct { + InformationProtectionAction + // Color of the font to use for the watermark. + fontColor *string + // Name of the font to use for the watermark. + fontName *string + // Font size to use for the watermark. + fontSize *int32 + // The layout property + layout *WatermarkLayout + // The contents of the watermark itself. + text *string + // The name of the UI element where the watermark should be placed. + uiElementName *string +} +// NewAddWatermarkAction instantiates a new AddWatermarkAction and sets the default values. +func NewAddWatermarkAction()(*AddWatermarkAction) { + m := &AddWatermarkAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.addWatermarkAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateAddWatermarkActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAddWatermarkActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAddWatermarkAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AddWatermarkAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["fontColor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontColor(val) + } + return nil + } + res["fontName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFontName(val) + } + return nil + } + res["fontSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetFontSize(val) + } + return nil + } + res["layout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseWatermarkLayout) + if err != nil { + return err + } + if val != nil { + m.SetLayout(val.(*WatermarkLayout)) + } + return nil + } + res["text"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetText(val) + } + return nil + } + res["uiElementName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUiElementName(val) + } + return nil + } + return res +} +// GetFontColor gets the fontColor property value. Color of the font to use for the watermark. +func (m *AddWatermarkAction) GetFontColor()(*string) { + return m.fontColor +} +// GetFontName gets the fontName property value. Name of the font to use for the watermark. +func (m *AddWatermarkAction) GetFontName()(*string) { + return m.fontName +} +// GetFontSize gets the fontSize property value. Font size to use for the watermark. +func (m *AddWatermarkAction) GetFontSize()(*int32) { + return m.fontSize +} +// GetLayout gets the layout property value. The layout property +func (m *AddWatermarkAction) GetLayout()(*WatermarkLayout) { + return m.layout +} +// GetText gets the text property value. The contents of the watermark itself. +func (m *AddWatermarkAction) GetText()(*string) { + return m.text +} +// GetUiElementName gets the uiElementName property value. The name of the UI element where the watermark should be placed. +func (m *AddWatermarkAction) GetUiElementName()(*string) { + return m.uiElementName +} +// Serialize serializes information the current object +func (m *AddWatermarkAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fontColor", m.GetFontColor()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("fontName", m.GetFontName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("fontSize", m.GetFontSize()) + if err != nil { + return err + } + } + if m.GetLayout() != nil { + cast := (*m.GetLayout()).String() + err = writer.WriteStringValue("layout", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("text", m.GetText()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("uiElementName", m.GetUiElementName()) + if err != nil { + return err + } + } + return nil +} +// SetFontColor sets the fontColor property value. Color of the font to use for the watermark. +func (m *AddWatermarkAction) SetFontColor(value *string)() { + m.fontColor = value +} +// SetFontName sets the fontName property value. Name of the font to use for the watermark. +func (m *AddWatermarkAction) SetFontName(value *string)() { + m.fontName = value +} +// SetFontSize sets the fontSize property value. Font size to use for the watermark. +func (m *AddWatermarkAction) SetFontSize(value *int32)() { + m.fontSize = value +} +// SetLayout sets the layout property value. The layout property +func (m *AddWatermarkAction) SetLayout(value *WatermarkLayout)() { + m.layout = value +} +// SetText sets the text property value. The contents of the watermark itself. +func (m *AddWatermarkAction) SetText(value *string)() { + m.text = value +} +// SetUiElementName sets the uiElementName property value. The name of the UI element where the watermark should be placed. +func (m *AddWatermarkAction) SetUiElementName(value *string)() { + m.uiElementName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/add_watermark_actionable.go b/src/internal/connector/graph/betasdk/models/security/add_watermark_actionable.go new file mode 100644 index 000000000..cc2b6423e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/add_watermark_actionable.go @@ -0,0 +1,23 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AddWatermarkActionable +type AddWatermarkActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFontColor()(*string) + GetFontName()(*string) + GetFontSize()(*int32) + GetLayout()(*WatermarkLayout) + GetText()(*string) + GetUiElementName()(*string) + SetFontColor(value *string)() + SetFontName(value *string)() + SetFontSize(value *int32)() + SetLayout(value *WatermarkLayout)() + SetText(value *string)() + SetUiElementName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert.go b/src/internal/connector/graph/betasdk/models/security/alert.go new file mode 100644 index 000000000..5215e6502 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert.go @@ -0,0 +1,790 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Alert provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Alert struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The adversary or activity group that is associated with this alert. + actorDisplayName *string + // URL for the alert page in the Microsoft 365 Defender portal. + alertWebUrl *string + // Owner of the alert, or null if no owner is assigned. + assignedTo *string + // The attack kill-chain category that the alert belongs to. Aligned with the MITRE ATT&CK framework. + category *string + // Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue. + classification *AlertClassification + // Array of comments created by the Security Operations (SecOps) team during the alert management process. + comments []AlertCommentable + // Time when Microsoft 365 Defender created the alert. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // String value describing each alert. + description *string + // Detection technology or sensor that identified the notable component or activity. + detectionSource *DetectionSource + // The ID of the detector that triggered the alert. + detectorId *string + // Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. + determination *AlertDetermination + // Collection of evidence related to the alert. + evidence []AlertEvidenceable + // The earliest activity associated with the alert. + firstActivityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Unique identifier to represent the incident this alert resource is associated with. + incidentId *string + // URL for the incident page in the Microsoft 365 Defender portal. + incidentWebUrl *string + // The oldest activity associated with the alert. + lastActivityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Time when the alert was last updated at Microsoft 365 Defender. + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The attack techniques, as aligned with the MITRE ATT&CK framework. + mitreTechniques []string + // The ID of the alert as it appears in the security provider product that generated the alert. + providerAlertId *string + // Recommended response and remediation actions to take in the event this alert was generated. + recommendedActions *string + // Time when the alert was resolved. + resolvedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The serviceSource property + serviceSource *ServiceSource + // The severity property + severity *AlertSeverity + // The status property + status *AlertStatus + // The Azure Active Directory tenant the alert was created in. + tenantId *string + // The threat associated with this alert. + threatDisplayName *string + // Threat family associated with this alert. + threatFamilyName *string + // Brief identifying string value describing the alert. + title *string +} +// NewAlert instantiates a new alert and sets the default values. +func NewAlert()(*Alert) { + m := &Alert{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateAlertFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlert(), nil +} +// GetActorDisplayName gets the actorDisplayName property value. The adversary or activity group that is associated with this alert. +func (m *Alert) GetActorDisplayName()(*string) { + return m.actorDisplayName +} +// GetAlertWebUrl gets the alertWebUrl property value. URL for the alert page in the Microsoft 365 Defender portal. +func (m *Alert) GetAlertWebUrl()(*string) { + return m.alertWebUrl +} +// GetAssignedTo gets the assignedTo property value. Owner of the alert, or null if no owner is assigned. +func (m *Alert) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetCategory gets the category property value. The attack kill-chain category that the alert belongs to. Aligned with the MITRE ATT&CK framework. +func (m *Alert) GetCategory()(*string) { + return m.category +} +// GetClassification gets the classification property value. Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue. +func (m *Alert) GetClassification()(*AlertClassification) { + return m.classification +} +// GetComments gets the comments property value. Array of comments created by the Security Operations (SecOps) team during the alert management process. +func (m *Alert) GetComments()([]AlertCommentable) { + return m.comments +} +// GetCreatedDateTime gets the createdDateTime property value. Time when Microsoft 365 Defender created the alert. +func (m *Alert) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. String value describing each alert. +func (m *Alert) GetDescription()(*string) { + return m.description +} +// GetDetectionSource gets the detectionSource property value. Detection technology or sensor that identified the notable component or activity. +func (m *Alert) GetDetectionSource()(*DetectionSource) { + return m.detectionSource +} +// GetDetectorId gets the detectorId property value. The ID of the detector that triggered the alert. +func (m *Alert) GetDetectorId()(*string) { + return m.detectorId +} +// GetDetermination gets the determination property value. Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. +func (m *Alert) GetDetermination()(*AlertDetermination) { + return m.determination +} +// GetEvidence gets the evidence property value. Collection of evidence related to the alert. +func (m *Alert) GetEvidence()([]AlertEvidenceable) { + return m.evidence +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Alert) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actorDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActorDisplayName(val) + } + return nil + } + res["alertWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAlertWebUrl(val) + } + return nil + } + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCategory(val) + } + return nil + } + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertClassification) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*AlertClassification)) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertCommentable, len(val)) + for i, v := range val { + res[i] = v.(AlertCommentable) + } + m.SetComments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["detectionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDetectionSource) + if err != nil { + return err + } + if val != nil { + m.SetDetectionSource(val.(*DetectionSource)) + } + return nil + } + res["detectorId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectorId(val) + } + return nil + } + res["determination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertDetermination) + if err != nil { + return err + } + if val != nil { + m.SetDetermination(val.(*AlertDetermination)) + } + return nil + } + res["evidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertEvidenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertEvidenceable, len(val)) + for i, v := range val { + res[i] = v.(AlertEvidenceable) + } + m.SetEvidence(res) + } + return nil + } + res["firstActivityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstActivityDateTime(val) + } + return nil + } + res["incidentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIncidentId(val) + } + return nil + } + res["incidentWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIncidentWebUrl(val) + } + return nil + } + res["lastActivityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActivityDateTime(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["mitreTechniques"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMitreTechniques(res) + } + return nil + } + res["providerAlertId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderAlertId(val) + } + return nil + } + res["recommendedActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecommendedActions(val) + } + return nil + } + res["resolvedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetResolvedDateTime(val) + } + return nil + } + res["serviceSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceSource) + if err != nil { + return err + } + if val != nil { + m.SetServiceSource(val.(*ServiceSource)) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*AlertSeverity)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*AlertStatus)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["threatDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThreatDisplayName(val) + } + return nil + } + res["threatFamilyName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetThreatFamilyName(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetFirstActivityDateTime gets the firstActivityDateTime property value. The earliest activity associated with the alert. +func (m *Alert) GetFirstActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstActivityDateTime +} +// GetIncidentId gets the incidentId property value. Unique identifier to represent the incident this alert resource is associated with. +func (m *Alert) GetIncidentId()(*string) { + return m.incidentId +} +// GetIncidentWebUrl gets the incidentWebUrl property value. URL for the incident page in the Microsoft 365 Defender portal. +func (m *Alert) GetIncidentWebUrl()(*string) { + return m.incidentWebUrl +} +// GetLastActivityDateTime gets the lastActivityDateTime property value. The oldest activity associated with the alert. +func (m *Alert) GetLastActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActivityDateTime +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Time when the alert was last updated at Microsoft 365 Defender. +func (m *Alert) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetMitreTechniques gets the mitreTechniques property value. The attack techniques, as aligned with the MITRE ATT&CK framework. +func (m *Alert) GetMitreTechniques()([]string) { + return m.mitreTechniques +} +// GetProviderAlertId gets the providerAlertId property value. The ID of the alert as it appears in the security provider product that generated the alert. +func (m *Alert) GetProviderAlertId()(*string) { + return m.providerAlertId +} +// GetRecommendedActions gets the recommendedActions property value. Recommended response and remediation actions to take in the event this alert was generated. +func (m *Alert) GetRecommendedActions()(*string) { + return m.recommendedActions +} +// GetResolvedDateTime gets the resolvedDateTime property value. Time when the alert was resolved. +func (m *Alert) GetResolvedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.resolvedDateTime +} +// GetServiceSource gets the serviceSource property value. The serviceSource property +func (m *Alert) GetServiceSource()(*ServiceSource) { + return m.serviceSource +} +// GetSeverity gets the severity property value. The severity property +func (m *Alert) GetSeverity()(*AlertSeverity) { + return m.severity +} +// GetStatus gets the status property value. The status property +func (m *Alert) GetStatus()(*AlertStatus) { + return m.status +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant the alert was created in. +func (m *Alert) GetTenantId()(*string) { + return m.tenantId +} +// GetThreatDisplayName gets the threatDisplayName property value. The threat associated with this alert. +func (m *Alert) GetThreatDisplayName()(*string) { + return m.threatDisplayName +} +// GetThreatFamilyName gets the threatFamilyName property value. Threat family associated with this alert. +func (m *Alert) GetThreatFamilyName()(*string) { + return m.threatFamilyName +} +// GetTitle gets the title property value. Brief identifying string value describing the alert. +func (m *Alert) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *Alert) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("actorDisplayName", m.GetActorDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("alertWebUrl", m.GetAlertWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("category", m.GetCategory()) + if err != nil { + return err + } + } + if m.GetClassification() != nil { + cast := (*m.GetClassification()).String() + err = writer.WriteStringValue("classification", &cast) + if err != nil { + return err + } + } + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetDetectionSource() != nil { + cast := (*m.GetDetectionSource()).String() + err = writer.WriteStringValue("detectionSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("detectorId", m.GetDetectorId()) + if err != nil { + return err + } + } + if m.GetDetermination() != nil { + cast := (*m.GetDetermination()).String() + err = writer.WriteStringValue("determination", &cast) + if err != nil { + return err + } + } + if m.GetEvidence() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvidence())) + for i, v := range m.GetEvidence() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("evidence", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstActivityDateTime", m.GetFirstActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("incidentId", m.GetIncidentId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("incidentWebUrl", m.GetIncidentWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActivityDateTime", m.GetLastActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + if m.GetMitreTechniques() != nil { + err = writer.WriteCollectionOfStringValues("mitreTechniques", m.GetMitreTechniques()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("providerAlertId", m.GetProviderAlertId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recommendedActions", m.GetRecommendedActions()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("resolvedDateTime", m.GetResolvedDateTime()) + if err != nil { + return err + } + } + if m.GetServiceSource() != nil { + cast := (*m.GetServiceSource()).String() + err = writer.WriteStringValue("serviceSource", &cast) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("threatDisplayName", m.GetThreatDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("threatFamilyName", m.GetThreatFamilyName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetActorDisplayName sets the actorDisplayName property value. The adversary or activity group that is associated with this alert. +func (m *Alert) SetActorDisplayName(value *string)() { + m.actorDisplayName = value +} +// SetAlertWebUrl sets the alertWebUrl property value. URL for the alert page in the Microsoft 365 Defender portal. +func (m *Alert) SetAlertWebUrl(value *string)() { + m.alertWebUrl = value +} +// SetAssignedTo sets the assignedTo property value. Owner of the alert, or null if no owner is assigned. +func (m *Alert) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetCategory sets the category property value. The attack kill-chain category that the alert belongs to. Aligned with the MITRE ATT&CK framework. +func (m *Alert) SetCategory(value *string)() { + m.category = value +} +// SetClassification sets the classification property value. Specifies whether the alert represents a true threat. Possible values are: unknown, falsePositive, truePositive, benignPositive, unknownFutureValue. +func (m *Alert) SetClassification(value *AlertClassification)() { + m.classification = value +} +// SetComments sets the comments property value. Array of comments created by the Security Operations (SecOps) team during the alert management process. +func (m *Alert) SetComments(value []AlertCommentable)() { + m.comments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Time when Microsoft 365 Defender created the alert. +func (m *Alert) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. String value describing each alert. +func (m *Alert) SetDescription(value *string)() { + m.description = value +} +// SetDetectionSource sets the detectionSource property value. Detection technology or sensor that identified the notable component or activity. +func (m *Alert) SetDetectionSource(value *DetectionSource)() { + m.detectionSource = value +} +// SetDetectorId sets the detectorId property value. The ID of the detector that triggered the alert. +func (m *Alert) SetDetectorId(value *string)() { + m.detectorId = value +} +// SetDetermination sets the determination property value. Specifies the result of the investigation, whether the alert represents a true attack and if so, the nature of the attack. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. +func (m *Alert) SetDetermination(value *AlertDetermination)() { + m.determination = value +} +// SetEvidence sets the evidence property value. Collection of evidence related to the alert. +func (m *Alert) SetEvidence(value []AlertEvidenceable)() { + m.evidence = value +} +// SetFirstActivityDateTime sets the firstActivityDateTime property value. The earliest activity associated with the alert. +func (m *Alert) SetFirstActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstActivityDateTime = value +} +// SetIncidentId sets the incidentId property value. Unique identifier to represent the incident this alert resource is associated with. +func (m *Alert) SetIncidentId(value *string)() { + m.incidentId = value +} +// SetIncidentWebUrl sets the incidentWebUrl property value. URL for the incident page in the Microsoft 365 Defender portal. +func (m *Alert) SetIncidentWebUrl(value *string)() { + m.incidentWebUrl = value +} +// SetLastActivityDateTime sets the lastActivityDateTime property value. The oldest activity associated with the alert. +func (m *Alert) SetLastActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActivityDateTime = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Time when the alert was last updated at Microsoft 365 Defender. +func (m *Alert) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetMitreTechniques sets the mitreTechniques property value. The attack techniques, as aligned with the MITRE ATT&CK framework. +func (m *Alert) SetMitreTechniques(value []string)() { + m.mitreTechniques = value +} +// SetProviderAlertId sets the providerAlertId property value. The ID of the alert as it appears in the security provider product that generated the alert. +func (m *Alert) SetProviderAlertId(value *string)() { + m.providerAlertId = value +} +// SetRecommendedActions sets the recommendedActions property value. Recommended response and remediation actions to take in the event this alert was generated. +func (m *Alert) SetRecommendedActions(value *string)() { + m.recommendedActions = value +} +// SetResolvedDateTime sets the resolvedDateTime property value. Time when the alert was resolved. +func (m *Alert) SetResolvedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.resolvedDateTime = value +} +// SetServiceSource sets the serviceSource property value. The serviceSource property +func (m *Alert) SetServiceSource(value *ServiceSource)() { + m.serviceSource = value +} +// SetSeverity sets the severity property value. The severity property +func (m *Alert) SetSeverity(value *AlertSeverity)() { + m.severity = value +} +// SetStatus sets the status property value. The status property +func (m *Alert) SetStatus(value *AlertStatus)() { + m.status = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant the alert was created in. +func (m *Alert) SetTenantId(value *string)() { + m.tenantId = value +} +// SetThreatDisplayName sets the threatDisplayName property value. The threat associated with this alert. +func (m *Alert) SetThreatDisplayName(value *string)() { + m.threatDisplayName = value +} +// SetThreatFamilyName sets the threatFamilyName property value. Threat family associated with this alert. +func (m *Alert) SetThreatFamilyName(value *string)() { + m.threatFamilyName = value +} +// SetTitle sets the title property value. Brief identifying string value describing the alert. +func (m *Alert) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_classification.go b/src/internal/connector/graph/betasdk/models/security/alert_classification.go new file mode 100644 index 000000000..bd03013d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_classification.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertClassification int + +const ( + UNKNOWN_ALERTCLASSIFICATION AlertClassification = iota + FALSEPOSITIVE_ALERTCLASSIFICATION + TRUEPOSITIVE_ALERTCLASSIFICATION + INFORMATIONALEXPECTEDACTIVITY_ALERTCLASSIFICATION + UNKNOWNFUTUREVALUE_ALERTCLASSIFICATION +) + +func (i AlertClassification) String() string { + return []string{"unknown", "falsePositive", "truePositive", "informationalExpectedActivity", "unknownFutureValue"}[i] +} +func ParseAlertClassification(v string) (interface{}, error) { + result := UNKNOWN_ALERTCLASSIFICATION + switch v { + case "unknown": + result = UNKNOWN_ALERTCLASSIFICATION + case "falsePositive": + result = FALSEPOSITIVE_ALERTCLASSIFICATION + case "truePositive": + result = TRUEPOSITIVE_ALERTCLASSIFICATION + case "informationalExpectedActivity": + result = INFORMATIONALEXPECTEDACTIVITY_ALERTCLASSIFICATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTCLASSIFICATION + default: + return 0, errors.New("Unknown AlertClassification value: " + v) + } + return &result, nil +} +func SerializeAlertClassification(values []AlertClassification) []string { + 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/security/alert_collection_response.go b/src/internal/connector/graph/betasdk/models/security/alert_collection_response.go new file mode 100644 index 000000000..e95b2d33a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertCollectionResponse +type AlertCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Alertable +} +// NewAlertCollectionResponse instantiates a new AlertCollectionResponse and sets the default values. +func NewAlertCollectionResponse()(*AlertCollectionResponse) { + m := &AlertCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Alertable, len(val)) + for i, v := range val { + res[i] = v.(Alertable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertCollectionResponse) GetValue()([]Alertable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertCollectionResponse) SetValue(value []Alertable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/alert_collection_responseable.go new file mode 100644 index 000000000..df08aa173 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertCollectionResponseable +type AlertCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Alertable) + SetValue(value []Alertable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_comment.go b/src/internal/connector/graph/betasdk/models/security/alert_comment.go new file mode 100644 index 000000000..e1bf145e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_comment.go @@ -0,0 +1,150 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertComment +type AlertComment 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 comment text. + comment *string + // The person or app name that submitted the comment. + createdByDisplayName *string + // The time when the comment was submitted. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string +} +// NewAlertComment instantiates a new alertComment and sets the default values. +func NewAlertComment()(*AlertComment) { + m := &AlertComment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertCommentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertCommentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertComment(), 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 *AlertComment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetComment gets the comment property value. The comment text. +func (m *AlertComment) GetComment()(*string) { + return m.comment +} +// GetCreatedByDisplayName gets the createdByDisplayName property value. The person or app name that submitted the comment. +func (m *AlertComment) GetCreatedByDisplayName()(*string) { + return m.createdByDisplayName +} +// GetCreatedDateTime gets the createdDateTime property value. The time when the comment was submitted. +func (m *AlertComment) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertComment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["comment"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetComment(val) + } + return nil + } + res["createdByDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedByDisplayName(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertComment) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AlertComment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("comment", m.GetComment()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("createdByDisplayName", m.GetCreatedByDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AlertComment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetComment sets the comment property value. The comment text. +func (m *AlertComment) SetComment(value *string)() { + m.comment = value +} +// SetCreatedByDisplayName sets the createdByDisplayName property value. The person or app name that submitted the comment. +func (m *AlertComment) SetCreatedByDisplayName(value *string)() { + m.createdByDisplayName = value +} +// SetCreatedDateTime sets the createdDateTime property value. The time when the comment was submitted. +func (m *AlertComment) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertComment) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_response.go b/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_response.go new file mode 100644 index 000000000..1c4d1119d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertCommentCollectionResponse +type AlertCommentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AlertCommentable +} +// NewAlertCommentCollectionResponse instantiates a new AlertCommentCollectionResponse and sets the default values. +func NewAlertCommentCollectionResponse()(*AlertCommentCollectionResponse) { + m := &AlertCommentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertCommentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertCommentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertCommentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertCommentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertCommentable, len(val)) + for i, v := range val { + res[i] = v.(AlertCommentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertCommentCollectionResponse) GetValue()([]AlertCommentable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertCommentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertCommentCollectionResponse) SetValue(value []AlertCommentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_responseable.go new file mode 100644 index 000000000..d4523cdca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_comment_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertCommentCollectionResponseable +type AlertCommentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertCommentable) + SetValue(value []AlertCommentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_commentable.go b/src/internal/connector/graph/betasdk/models/security/alert_commentable.go new file mode 100644 index 000000000..e1eff082f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_commentable.go @@ -0,0 +1,20 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertCommentable +type AlertCommentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComment()(*string) + GetCreatedByDisplayName()(*string) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + SetComment(value *string)() + SetCreatedByDisplayName(value *string)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_determination.go b/src/internal/connector/graph/betasdk/models/security/alert_determination.go new file mode 100644 index 000000000..49e474ed9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_determination.go @@ -0,0 +1,76 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertDetermination int + +const ( + UNKNOWN_ALERTDETERMINATION AlertDetermination = iota + APT_ALERTDETERMINATION + MALWARE_ALERTDETERMINATION + SECURITYPERSONNEL_ALERTDETERMINATION + SECURITYTESTING_ALERTDETERMINATION + UNWANTEDSOFTWARE_ALERTDETERMINATION + OTHER_ALERTDETERMINATION + MULTISTAGEDATTACK_ALERTDETERMINATION + COMPROMISEDACCOUNT_ALERTDETERMINATION + PHISHING_ALERTDETERMINATION + MALICIOUSUSERACTIVITY_ALERTDETERMINATION + NOTMALICIOUS_ALERTDETERMINATION + NOTENOUGHDATATOVALIDATE_ALERTDETERMINATION + CONFIRMEDACTIVITY_ALERTDETERMINATION + LINEOFBUSINESSAPPLICATION_ALERTDETERMINATION + UNKNOWNFUTUREVALUE_ALERTDETERMINATION +) + +func (i AlertDetermination) String() string { + return []string{"unknown", "apt", "malware", "securityPersonnel", "securityTesting", "unwantedSoftware", "other", "multiStagedAttack", "compromisedAccount", "phishing", "maliciousUserActivity", "notMalicious", "notEnoughDataToValidate", "confirmedActivity", "lineOfBusinessApplication", "unknownFutureValue"}[i] +} +func ParseAlertDetermination(v string) (interface{}, error) { + result := UNKNOWN_ALERTDETERMINATION + switch v { + case "unknown": + result = UNKNOWN_ALERTDETERMINATION + case "apt": + result = APT_ALERTDETERMINATION + case "malware": + result = MALWARE_ALERTDETERMINATION + case "securityPersonnel": + result = SECURITYPERSONNEL_ALERTDETERMINATION + case "securityTesting": + result = SECURITYTESTING_ALERTDETERMINATION + case "unwantedSoftware": + result = UNWANTEDSOFTWARE_ALERTDETERMINATION + case "other": + result = OTHER_ALERTDETERMINATION + case "multiStagedAttack": + result = MULTISTAGEDATTACK_ALERTDETERMINATION + case "compromisedAccount": + result = COMPROMISEDACCOUNT_ALERTDETERMINATION + case "phishing": + result = PHISHING_ALERTDETERMINATION + case "maliciousUserActivity": + result = MALICIOUSUSERACTIVITY_ALERTDETERMINATION + case "notMalicious": + result = NOTMALICIOUS_ALERTDETERMINATION + case "notEnoughDataToValidate": + result = NOTENOUGHDATATOVALIDATE_ALERTDETERMINATION + case "confirmedActivity": + result = CONFIRMEDACTIVITY_ALERTDETERMINATION + case "lineOfBusinessApplication": + result = LINEOFBUSINESSAPPLICATION_ALERTDETERMINATION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTDETERMINATION + default: + return 0, errors.New("Unknown AlertDetermination value: " + v) + } + return &result, nil +} +func SerializeAlertDetermination(values []AlertDetermination) []string { + 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/security/alert_evidence.go b/src/internal/connector/graph/betasdk/models/security/alert_evidence.go new file mode 100644 index 000000000..4bcee7057 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_evidence.go @@ -0,0 +1,282 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertEvidence +type AlertEvidence 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 time the evidence was created and added to the alert. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The OdataType property + odataType *string + // The remediationStatus property + remediationStatus *EvidenceRemediationStatus + // Details about the remediation status. + remediationStatusDetails *string + // The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role 'Attacker'. + roles []EvidenceRole + // Array of custom tags associated with an evidence instance, for example to denote a group of devices, high value assets, etc. + tags []string + // The verdict property + verdict *EvidenceVerdict +} +// NewAlertEvidence instantiates a new alertEvidence and sets the default values. +func NewAlertEvidence()(*AlertEvidence) { + m := &AlertEvidence{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAlertEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.analyzedMessageEvidence": + return NewAnalyzedMessageEvidence(), nil + case "#microsoft.graph.security.cloudApplicationEvidence": + return NewCloudApplicationEvidence(), nil + case "#microsoft.graph.security.deviceEvidence": + return NewDeviceEvidence(), nil + case "#microsoft.graph.security.fileEvidence": + return NewFileEvidence(), nil + case "#microsoft.graph.security.ipEvidence": + return NewIpEvidence(), nil + case "#microsoft.graph.security.mailboxEvidence": + return NewMailboxEvidence(), nil + case "#microsoft.graph.security.mailClusterEvidence": + return NewMailClusterEvidence(), nil + case "#microsoft.graph.security.oauthApplicationEvidence": + return NewOauthApplicationEvidence(), nil + case "#microsoft.graph.security.processEvidence": + return NewProcessEvidence(), nil + case "#microsoft.graph.security.registryKeyEvidence": + return NewRegistryKeyEvidence(), nil + case "#microsoft.graph.security.registryValueEvidence": + return NewRegistryValueEvidence(), nil + case "#microsoft.graph.security.securityGroupEvidence": + return NewSecurityGroupEvidence(), nil + case "#microsoft.graph.security.urlEvidence": + return NewUrlEvidence(), nil + case "#microsoft.graph.security.userEvidence": + return NewUserEvidence(), nil + } + } + } + } + return NewAlertEvidence(), 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 *AlertEvidence) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedDateTime gets the createdDateTime property value. The time the evidence was created and added to the alert. +func (m *AlertEvidence) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(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["remediationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEvidenceRemediationStatus) + if err != nil { + return err + } + if val != nil { + m.SetRemediationStatus(val.(*EvidenceRemediationStatus)) + } + return nil + } + res["remediationStatusDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRemediationStatusDetails(val) + } + return nil + } + res["roles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfEnumValues(ParseEvidenceRole) + if err != nil { + return err + } + if val != nil { + res := make([]EvidenceRole, len(val)) + for i, v := range val { + res[i] = *(v.(*EvidenceRole)) + } + m.SetRoles(res) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["verdict"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEvidenceVerdict) + if err != nil { + return err + } + if val != nil { + m.SetVerdict(val.(*EvidenceVerdict)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AlertEvidence) GetOdataType()(*string) { + return m.odataType +} +// GetRemediationStatus gets the remediationStatus property value. The remediationStatus property +func (m *AlertEvidence) GetRemediationStatus()(*EvidenceRemediationStatus) { + return m.remediationStatus +} +// GetRemediationStatusDetails gets the remediationStatusDetails property value. Details about the remediation status. +func (m *AlertEvidence) GetRemediationStatusDetails()(*string) { + return m.remediationStatusDetails +} +// GetRoles gets the roles property value. The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role 'Attacker'. +func (m *AlertEvidence) GetRoles()([]EvidenceRole) { + return m.roles +} +// GetTags gets the tags property value. Array of custom tags associated with an evidence instance, for example to denote a group of devices, high value assets, etc. +func (m *AlertEvidence) GetTags()([]string) { + return m.tags +} +// GetVerdict gets the verdict property value. The verdict property +func (m *AlertEvidence) GetVerdict()(*EvidenceVerdict) { + return m.verdict +} +// Serialize serializes information the current object +func (m *AlertEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRemediationStatus() != nil { + cast := (*m.GetRemediationStatus()).String() + err := writer.WriteStringValue("remediationStatus", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("remediationStatusDetails", m.GetRemediationStatusDetails()) + if err != nil { + return err + } + } + if m.GetRoles() != nil { + err := writer.WriteCollectionOfStringValues("roles", SerializeEvidenceRole(m.GetRoles())) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err := writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + if m.GetVerdict() != nil { + cast := (*m.GetVerdict()).String() + err := writer.WriteStringValue("verdict", &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 *AlertEvidence) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedDateTime sets the createdDateTime property value. The time the evidence was created and added to the alert. +func (m *AlertEvidence) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AlertEvidence) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemediationStatus sets the remediationStatus property value. The remediationStatus property +func (m *AlertEvidence) SetRemediationStatus(value *EvidenceRemediationStatus)() { + m.remediationStatus = value +} +// SetRemediationStatusDetails sets the remediationStatusDetails property value. Details about the remediation status. +func (m *AlertEvidence) SetRemediationStatusDetails(value *string)() { + m.remediationStatusDetails = value +} +// SetRoles sets the roles property value. The role/s that an evidence entity represents in an alert, e.g., an IP address that is associated with an attacker will have the evidence role 'Attacker'. +func (m *AlertEvidence) SetRoles(value []EvidenceRole)() { + m.roles = value +} +// SetTags sets the tags property value. Array of custom tags associated with an evidence instance, for example to denote a group of devices, high value assets, etc. +func (m *AlertEvidence) SetTags(value []string)() { + m.tags = value +} +// SetVerdict sets the verdict property value. The verdict property +func (m *AlertEvidence) SetVerdict(value *EvidenceVerdict)() { + m.verdict = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_response.go b/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_response.go new file mode 100644 index 000000000..2328a4d05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertEvidenceCollectionResponse +type AlertEvidenceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []AlertEvidenceable +} +// NewAlertEvidenceCollectionResponse instantiates a new AlertEvidenceCollectionResponse and sets the default values. +func NewAlertEvidenceCollectionResponse()(*AlertEvidenceCollectionResponse) { + m := &AlertEvidenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateAlertEvidenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAlertEvidenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAlertEvidenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AlertEvidenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertEvidenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertEvidenceable, len(val)) + for i, v := range val { + res[i] = v.(AlertEvidenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *AlertEvidenceCollectionResponse) GetValue()([]AlertEvidenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *AlertEvidenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *AlertEvidenceCollectionResponse) SetValue(value []AlertEvidenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_responseable.go new file mode 100644 index 000000000..ee15ad310 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_evidence_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// AlertEvidenceCollectionResponseable +type AlertEvidenceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]AlertEvidenceable) + SetValue(value []AlertEvidenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/alert_evidenceable.go new file mode 100644 index 000000000..214a7ae18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_evidenceable.go @@ -0,0 +1,26 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AlertEvidenceable +type AlertEvidenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetOdataType()(*string) + GetRemediationStatus()(*EvidenceRemediationStatus) + GetRemediationStatusDetails()(*string) + GetRoles()([]EvidenceRole) + GetTags()([]string) + GetVerdict()(*EvidenceVerdict) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetOdataType(value *string)() + SetRemediationStatus(value *EvidenceRemediationStatus)() + SetRemediationStatusDetails(value *string)() + SetRoles(value []EvidenceRole)() + SetTags(value []string)() + SetVerdict(value *EvidenceVerdict)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/alert_severity.go b/src/internal/connector/graph/betasdk/models/security/alert_severity.go new file mode 100644 index 000000000..767351bf6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_severity.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertSeverity int + +const ( + UNKNOWN_ALERTSEVERITY AlertSeverity = iota + INFORMATIONAL_ALERTSEVERITY + LOW_ALERTSEVERITY + MEDIUM_ALERTSEVERITY + HIGH_ALERTSEVERITY + UNKNOWNFUTUREVALUE_ALERTSEVERITY +) + +func (i AlertSeverity) String() string { + return []string{"unknown", "informational", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParseAlertSeverity(v string) (interface{}, error) { + result := UNKNOWN_ALERTSEVERITY + switch v { + case "unknown": + result = UNKNOWN_ALERTSEVERITY + case "informational": + result = INFORMATIONAL_ALERTSEVERITY + case "low": + result = LOW_ALERTSEVERITY + case "medium": + result = MEDIUM_ALERTSEVERITY + case "high": + result = HIGH_ALERTSEVERITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSEVERITY + default: + return 0, errors.New("Unknown AlertSeverity value: " + v) + } + return &result, nil +} +func SerializeAlertSeverity(values []AlertSeverity) []string { + 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/security/alert_status.go b/src/internal/connector/graph/betasdk/models/security/alert_status.go new file mode 100644 index 000000000..fd81f01a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alert_status.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type AlertStatus int + +const ( + UNKNOWN_ALERTSTATUS AlertStatus = iota + NEW_ALERTSTATUS + INPROGRESS_ALERTSTATUS + RESOLVED_ALERTSTATUS + UNKNOWNFUTUREVALUE_ALERTSTATUS +) + +func (i AlertStatus) String() string { + return []string{"unknown", "new", "inProgress", "resolved", "unknownFutureValue"}[i] +} +func ParseAlertStatus(v string) (interface{}, error) { + result := UNKNOWN_ALERTSTATUS + switch v { + case "unknown": + result = UNKNOWN_ALERTSTATUS + case "new": + result = NEW_ALERTSTATUS + case "inProgress": + result = INPROGRESS_ALERTSTATUS + case "resolved": + result = RESOLVED_ALERTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ALERTSTATUS + default: + return 0, errors.New("Unknown AlertStatus value: " + v) + } + return &result, nil +} +func SerializeAlertStatus(values []AlertStatus) []string { + 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/security/alertable.go b/src/internal/connector/graph/betasdk/models/security/alertable.go new file mode 100644 index 000000000..a216eee39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/alertable.go @@ -0,0 +1,69 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Alertable +type Alertable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActorDisplayName()(*string) + GetAlertWebUrl()(*string) + GetAssignedTo()(*string) + GetCategory()(*string) + GetClassification()(*AlertClassification) + GetComments()([]AlertCommentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDetectionSource()(*DetectionSource) + GetDetectorId()(*string) + GetDetermination()(*AlertDetermination) + GetEvidence()([]AlertEvidenceable) + GetFirstActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIncidentId()(*string) + GetIncidentWebUrl()(*string) + GetLastActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetMitreTechniques()([]string) + GetProviderAlertId()(*string) + GetRecommendedActions()(*string) + GetResolvedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetServiceSource()(*ServiceSource) + GetSeverity()(*AlertSeverity) + GetStatus()(*AlertStatus) + GetTenantId()(*string) + GetThreatDisplayName()(*string) + GetThreatFamilyName()(*string) + GetTitle()(*string) + SetActorDisplayName(value *string)() + SetAlertWebUrl(value *string)() + SetAssignedTo(value *string)() + SetCategory(value *string)() + SetClassification(value *AlertClassification)() + SetComments(value []AlertCommentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDetectionSource(value *DetectionSource)() + SetDetectorId(value *string)() + SetDetermination(value *AlertDetermination)() + SetEvidence(value []AlertEvidenceable)() + SetFirstActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIncidentId(value *string)() + SetIncidentWebUrl(value *string)() + SetLastActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetMitreTechniques(value []string)() + SetProviderAlertId(value *string)() + SetRecommendedActions(value *string)() + SetResolvedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetServiceSource(value *ServiceSource)() + SetSeverity(value *AlertSeverity)() + SetStatus(value *AlertStatus)() + SetTenantId(value *string)() + SetThreatDisplayName(value *string)() + SetThreatFamilyName(value *string)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidence.go b/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidence.go new file mode 100644 index 000000000..d7106f295 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidence.go @@ -0,0 +1,515 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnalyzedMessageEvidence +type AnalyzedMessageEvidence struct { + AlertEvidence + // Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg. + antiSpamDirection *string + // Number of attachments in the email. + attachmentsCount *int64 + // Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced. + deliveryAction *string + // Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded. + deliveryLocation *string + // Public-facing identifier for the email that is set by the sending email system. + internetMessageId *string + // Detected language of the email content. + language *string + // Unique identifier for the email, generated by Microsoft 365. + networkMessageId *string + // The P1 sender. + p1Sender EmailSenderable + // The P2 sender. + p2Sender EmailSenderable + // Date and time when the email was received. + receivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Email address of the recipient, or email address of the recipient after distribution list expansion. + recipientEmailAddress *string + // IP address of the last detected mail server that relayed the message. + senderIp *string + // Subject of the email. + subject *string + // Collection of methods used to detect malware, phishing, or other threats found in the email. + threatDetectionMethods []string + // Collection of detection names for malware or other threats found. + threats []string + // Number of embedded URLs in the email. + urlCount *int64 + // Collection of the URLs contained in this email. + urls []string + // Uniform resource name (URN) of the automated investigation where the cluster was identified. + urn *string +} +// NewAnalyzedMessageEvidence instantiates a new AnalyzedMessageEvidence and sets the default values. +func NewAnalyzedMessageEvidence()(*AnalyzedMessageEvidence) { + m := &AnalyzedMessageEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateAnalyzedMessageEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAnalyzedMessageEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAnalyzedMessageEvidence(), nil +} +// GetAntiSpamDirection gets the antiSpamDirection property value. Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg. +func (m *AnalyzedMessageEvidence) GetAntiSpamDirection()(*string) { + return m.antiSpamDirection +} +// GetAttachmentsCount gets the attachmentsCount property value. Number of attachments in the email. +func (m *AnalyzedMessageEvidence) GetAttachmentsCount()(*int64) { + return m.attachmentsCount +} +// GetDeliveryAction gets the deliveryAction property value. Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced. +func (m *AnalyzedMessageEvidence) GetDeliveryAction()(*string) { + return m.deliveryAction +} +// GetDeliveryLocation gets the deliveryLocation property value. Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded. +func (m *AnalyzedMessageEvidence) GetDeliveryLocation()(*string) { + return m.deliveryLocation +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AnalyzedMessageEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["antiSpamDirection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAntiSpamDirection(val) + } + return nil + } + res["attachmentsCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetAttachmentsCount(val) + } + return nil + } + res["deliveryAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveryAction(val) + } + return nil + } + res["deliveryLocation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeliveryLocation(val) + } + return nil + } + res["internetMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternetMessageId(val) + } + return nil + } + res["language"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLanguage(val) + } + return nil + } + res["networkMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNetworkMessageId(val) + } + return nil + } + res["p1Sender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailSenderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetP1Sender(val.(EmailSenderable)) + } + return nil + } + res["p2Sender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEmailSenderFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetP2Sender(val.(EmailSenderable)) + } + return nil + } + res["receivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTime(val) + } + return nil + } + res["recipientEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientEmailAddress(val) + } + return nil + } + res["senderIp"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderIp(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["threatDetectionMethods"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetThreatDetectionMethods(res) + } + return nil + } + res["threats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetThreats(res) + } + return nil + } + res["urlCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUrlCount(val) + } + return nil + } + res["urls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUrls(res) + } + return nil + } + res["urn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrn(val) + } + return nil + } + return res +} +// GetInternetMessageId gets the internetMessageId property value. Public-facing identifier for the email that is set by the sending email system. +func (m *AnalyzedMessageEvidence) GetInternetMessageId()(*string) { + return m.internetMessageId +} +// GetLanguage gets the language property value. Detected language of the email content. +func (m *AnalyzedMessageEvidence) GetLanguage()(*string) { + return m.language +} +// GetNetworkMessageId gets the networkMessageId property value. Unique identifier for the email, generated by Microsoft 365. +func (m *AnalyzedMessageEvidence) GetNetworkMessageId()(*string) { + return m.networkMessageId +} +// GetP1Sender gets the p1Sender property value. The P1 sender. +func (m *AnalyzedMessageEvidence) GetP1Sender()(EmailSenderable) { + return m.p1Sender +} +// GetP2Sender gets the p2Sender property value. The P2 sender. +func (m *AnalyzedMessageEvidence) GetP2Sender()(EmailSenderable) { + return m.p2Sender +} +// GetReceivedDateTime gets the receivedDateTime property value. Date and time when the email was received. +func (m *AnalyzedMessageEvidence) GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTime +} +// GetRecipientEmailAddress gets the recipientEmailAddress property value. Email address of the recipient, or email address of the recipient after distribution list expansion. +func (m *AnalyzedMessageEvidence) GetRecipientEmailAddress()(*string) { + return m.recipientEmailAddress +} +// GetSenderIp gets the senderIp property value. IP address of the last detected mail server that relayed the message. +func (m *AnalyzedMessageEvidence) GetSenderIp()(*string) { + return m.senderIp +} +// GetSubject gets the subject property value. Subject of the email. +func (m *AnalyzedMessageEvidence) GetSubject()(*string) { + return m.subject +} +// GetThreatDetectionMethods gets the threatDetectionMethods property value. Collection of methods used to detect malware, phishing, or other threats found in the email. +func (m *AnalyzedMessageEvidence) GetThreatDetectionMethods()([]string) { + return m.threatDetectionMethods +} +// GetThreats gets the threats property value. Collection of detection names for malware or other threats found. +func (m *AnalyzedMessageEvidence) GetThreats()([]string) { + return m.threats +} +// GetUrlCount gets the urlCount property value. Number of embedded URLs in the email. +func (m *AnalyzedMessageEvidence) GetUrlCount()(*int64) { + return m.urlCount +} +// GetUrls gets the urls property value. Collection of the URLs contained in this email. +func (m *AnalyzedMessageEvidence) GetUrls()([]string) { + return m.urls +} +// GetUrn gets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified. +func (m *AnalyzedMessageEvidence) GetUrn()(*string) { + return m.urn +} +// Serialize serializes information the current object +func (m *AnalyzedMessageEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("antiSpamDirection", m.GetAntiSpamDirection()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("attachmentsCount", m.GetAttachmentsCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deliveryAction", m.GetDeliveryAction()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deliveryLocation", m.GetDeliveryLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("internetMessageId", m.GetInternetMessageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("language", m.GetLanguage()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("networkMessageId", m.GetNetworkMessageId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("p1Sender", m.GetP1Sender()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("p2Sender", m.GetP2Sender()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTime", m.GetReceivedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientEmailAddress", m.GetRecipientEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("senderIp", m.GetSenderIp()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + if m.GetThreatDetectionMethods() != nil { + err = writer.WriteCollectionOfStringValues("threatDetectionMethods", m.GetThreatDetectionMethods()) + if err != nil { + return err + } + } + if m.GetThreats() != nil { + err = writer.WriteCollectionOfStringValues("threats", m.GetThreats()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("urlCount", m.GetUrlCount()) + if err != nil { + return err + } + } + if m.GetUrls() != nil { + err = writer.WriteCollectionOfStringValues("urls", m.GetUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("urn", m.GetUrn()) + if err != nil { + return err + } + } + return nil +} +// SetAntiSpamDirection sets the antiSpamDirection property value. Direction of the email relative to your network. The possible values are: inbound, outbound or intraorg. +func (m *AnalyzedMessageEvidence) SetAntiSpamDirection(value *string)() { + m.antiSpamDirection = value +} +// SetAttachmentsCount sets the attachmentsCount property value. Number of attachments in the email. +func (m *AnalyzedMessageEvidence) SetAttachmentsCount(value *int64)() { + m.attachmentsCount = value +} +// SetDeliveryAction sets the deliveryAction property value. Delivery action of the email. The possible values are: delivered, deliveredAsSpam, junked, blocked, or replaced. +func (m *AnalyzedMessageEvidence) SetDeliveryAction(value *string)() { + m.deliveryAction = value +} +// SetDeliveryLocation sets the deliveryLocation property value. Location where the email was delivered. The possible values are: inbox, external, junkFolder, quarantine, failed, dropped, deletedFolder or forwarded. +func (m *AnalyzedMessageEvidence) SetDeliveryLocation(value *string)() { + m.deliveryLocation = value +} +// SetInternetMessageId sets the internetMessageId property value. Public-facing identifier for the email that is set by the sending email system. +func (m *AnalyzedMessageEvidence) SetInternetMessageId(value *string)() { + m.internetMessageId = value +} +// SetLanguage sets the language property value. Detected language of the email content. +func (m *AnalyzedMessageEvidence) SetLanguage(value *string)() { + m.language = value +} +// SetNetworkMessageId sets the networkMessageId property value. Unique identifier for the email, generated by Microsoft 365. +func (m *AnalyzedMessageEvidence) SetNetworkMessageId(value *string)() { + m.networkMessageId = value +} +// SetP1Sender sets the p1Sender property value. The P1 sender. +func (m *AnalyzedMessageEvidence) SetP1Sender(value EmailSenderable)() { + m.p1Sender = value +} +// SetP2Sender sets the p2Sender property value. The P2 sender. +func (m *AnalyzedMessageEvidence) SetP2Sender(value EmailSenderable)() { + m.p2Sender = value +} +// SetReceivedDateTime sets the receivedDateTime property value. Date and time when the email was received. +func (m *AnalyzedMessageEvidence) SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTime = value +} +// SetRecipientEmailAddress sets the recipientEmailAddress property value. Email address of the recipient, or email address of the recipient after distribution list expansion. +func (m *AnalyzedMessageEvidence) SetRecipientEmailAddress(value *string)() { + m.recipientEmailAddress = value +} +// SetSenderIp sets the senderIp property value. IP address of the last detected mail server that relayed the message. +func (m *AnalyzedMessageEvidence) SetSenderIp(value *string)() { + m.senderIp = value +} +// SetSubject sets the subject property value. Subject of the email. +func (m *AnalyzedMessageEvidence) SetSubject(value *string)() { + m.subject = value +} +// SetThreatDetectionMethods sets the threatDetectionMethods property value. Collection of methods used to detect malware, phishing, or other threats found in the email. +func (m *AnalyzedMessageEvidence) SetThreatDetectionMethods(value []string)() { + m.threatDetectionMethods = value +} +// SetThreats sets the threats property value. Collection of detection names for malware or other threats found. +func (m *AnalyzedMessageEvidence) SetThreats(value []string)() { + m.threats = value +} +// SetUrlCount sets the urlCount property value. Number of embedded URLs in the email. +func (m *AnalyzedMessageEvidence) SetUrlCount(value *int64)() { + m.urlCount = value +} +// SetUrls sets the urls property value. Collection of the URLs contained in this email. +func (m *AnalyzedMessageEvidence) SetUrls(value []string)() { + m.urls = value +} +// SetUrn sets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified. +func (m *AnalyzedMessageEvidence) SetUrn(value *string)() { + m.urn = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidenceable.go new file mode 100644 index 000000000..d67047d33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/analyzed_message_evidenceable.go @@ -0,0 +1,48 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AnalyzedMessageEvidenceable +type AnalyzedMessageEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAntiSpamDirection()(*string) + GetAttachmentsCount()(*int64) + GetDeliveryAction()(*string) + GetDeliveryLocation()(*string) + GetInternetMessageId()(*string) + GetLanguage()(*string) + GetNetworkMessageId()(*string) + GetP1Sender()(EmailSenderable) + GetP2Sender()(EmailSenderable) + GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecipientEmailAddress()(*string) + GetSenderIp()(*string) + GetSubject()(*string) + GetThreatDetectionMethods()([]string) + GetThreats()([]string) + GetUrlCount()(*int64) + GetUrls()([]string) + GetUrn()(*string) + SetAntiSpamDirection(value *string)() + SetAttachmentsCount(value *int64)() + SetDeliveryAction(value *string)() + SetDeliveryLocation(value *string)() + SetInternetMessageId(value *string)() + SetLanguage(value *string)() + SetNetworkMessageId(value *string)() + SetP1Sender(value EmailSenderable)() + SetP2Sender(value EmailSenderable)() + SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecipientEmailAddress(value *string)() + SetSenderIp(value *string)() + SetSubject(value *string)() + SetThreatDetectionMethods(value []string)() + SetThreats(value []string)() + SetUrlCount(value *int64)() + SetUrls(value []string)() + SetUrn(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/apply_label_action.go b/src/internal/connector/graph/betasdk/models/security/apply_label_action.go new file mode 100644 index 000000000..786c8ecbe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/apply_label_action.go @@ -0,0 +1,153 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplyLabelAction +type ApplyLabelAction struct { + InformationProtectionAction + // The collection of actions that should be implemented by the caller. + actions []InformationProtectionActionable + // The actionSource property + actionSource *ActionSource + // If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. + responsibleSensitiveTypeIds []string + // The sensitivityLabelId property + sensitivityLabelId *string +} +// NewApplyLabelAction instantiates a new ApplyLabelAction and sets the default values. +func NewApplyLabelAction()(*ApplyLabelAction) { + m := &ApplyLabelAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.applyLabelAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateApplyLabelActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateApplyLabelActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewApplyLabelAction(), nil +} +// GetActions gets the actions property value. The collection of actions that should be implemented by the caller. +func (m *ApplyLabelAction) GetActions()([]InformationProtectionActionable) { + return m.actions +} +// GetActionSource gets the actionSource property value. The actionSource property +func (m *ApplyLabelAction) GetActionSource()(*ActionSource) { + return m.actionSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ApplyLabelAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetActions(res) + } + return nil + } + res["actionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionSource) + if err != nil { + return err + } + if val != nil { + m.SetActionSource(val.(*ActionSource)) + } + return nil + } + res["responsibleSensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetResponsibleSensitiveTypeIds(res) + } + return nil + } + res["sensitivityLabelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSensitivityLabelId(val) + } + return nil + } + return res +} +// GetResponsibleSensitiveTypeIds gets the responsibleSensitiveTypeIds property value. If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. +func (m *ApplyLabelAction) GetResponsibleSensitiveTypeIds()([]string) { + return m.responsibleSensitiveTypeIds +} +// GetSensitivityLabelId gets the sensitivityLabelId property value. The sensitivityLabelId property +func (m *ApplyLabelAction) GetSensitivityLabelId()(*string) { + return m.sensitivityLabelId +} +// Serialize serializes information the current object +func (m *ApplyLabelAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActions())) + for i, v := range m.GetActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("actions", cast) + if err != nil { + return err + } + } + if m.GetActionSource() != nil { + cast := (*m.GetActionSource()).String() + err = writer.WriteStringValue("actionSource", &cast) + if err != nil { + return err + } + } + if m.GetResponsibleSensitiveTypeIds() != nil { + err = writer.WriteCollectionOfStringValues("responsibleSensitiveTypeIds", m.GetResponsibleSensitiveTypeIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sensitivityLabelId", m.GetSensitivityLabelId()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. The collection of actions that should be implemented by the caller. +func (m *ApplyLabelAction) SetActions(value []InformationProtectionActionable)() { + m.actions = value +} +// SetActionSource sets the actionSource property value. The actionSource property +func (m *ApplyLabelAction) SetActionSource(value *ActionSource)() { + m.actionSource = value +} +// SetResponsibleSensitiveTypeIds sets the responsibleSensitiveTypeIds property value. If the label was the result of an automatic classification, supply the list of sensitive info type GUIDs that resulted in the returned label. +func (m *ApplyLabelAction) SetResponsibleSensitiveTypeIds(value []string)() { + m.responsibleSensitiveTypeIds = value +} +// SetSensitivityLabelId sets the sensitivityLabelId property value. The sensitivityLabelId property +func (m *ApplyLabelAction) SetSensitivityLabelId(value *string)() { + m.sensitivityLabelId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/apply_label_actionable.go b/src/internal/connector/graph/betasdk/models/security/apply_label_actionable.go new file mode 100644 index 000000000..26c7d139e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/apply_label_actionable.go @@ -0,0 +1,19 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ApplyLabelActionable +type ApplyLabelActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]InformationProtectionActionable) + GetActionSource()(*ActionSource) + GetResponsibleSensitiveTypeIds()([]string) + GetSensitivityLabelId()(*string) + SetActions(value []InformationProtectionActionable)() + SetActionSource(value *ActionSource)() + SetResponsibleSensitiveTypeIds(value []string)() + SetSensitivityLabelId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/attack_simulation_info.go b/src/internal/connector/graph/betasdk/models/security/attack_simulation_info.go new file mode 100644 index 000000000..7c601e851 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/attack_simulation_info.go @@ -0,0 +1,177 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationInfo +type AttackSimulationInfo 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 date and time of the attack simulation. + attackSimDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The duration (in time) for the attack simulation. + attackSimDurationTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration + // The activity ID for the attack simulation. + attackSimId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The unique identifier for the user who got the attack simulation email. + attackSimUserId *string + // The OdataType property + odataType *string +} +// NewAttackSimulationInfo instantiates a new attackSimulationInfo and sets the default values. +func NewAttackSimulationInfo()(*AttackSimulationInfo) { + m := &AttackSimulationInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateAttackSimulationInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateAttackSimulationInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewAttackSimulationInfo(), 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 *AttackSimulationInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAttackSimDateTime gets the attackSimDateTime property value. The date and time of the attack simulation. +func (m *AttackSimulationInfo) GetAttackSimDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.attackSimDateTime +} +// GetAttackSimDurationTime gets the attackSimDurationTime property value. The duration (in time) for the attack simulation. +func (m *AttackSimulationInfo) GetAttackSimDurationTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.attackSimDurationTime +} +// GetAttackSimId gets the attackSimId property value. The activity ID for the attack simulation. +func (m *AttackSimulationInfo) GetAttackSimId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.attackSimId +} +// GetAttackSimUserId gets the attackSimUserId property value. The unique identifier for the user who got the attack simulation email. +func (m *AttackSimulationInfo) GetAttackSimUserId()(*string) { + return m.attackSimUserId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *AttackSimulationInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["attackSimDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAttackSimDateTime(val) + } + return nil + } + res["attackSimDurationTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetAttackSimDurationTime(val) + } + return nil + } + res["attackSimId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAttackSimId(val) + } + return nil + } + res["attackSimUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAttackSimUserId(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *AttackSimulationInfo) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *AttackSimulationInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("attackSimDateTime", m.GetAttackSimDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("attackSimDurationTime", m.GetAttackSimDurationTime()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("attackSimId", m.GetAttackSimId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("attackSimUserId", m.GetAttackSimUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *AttackSimulationInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAttackSimDateTime sets the attackSimDateTime property value. The date and time of the attack simulation. +func (m *AttackSimulationInfo) SetAttackSimDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.attackSimDateTime = value +} +// SetAttackSimDurationTime sets the attackSimDurationTime property value. The duration (in time) for the attack simulation. +func (m *AttackSimulationInfo) SetAttackSimDurationTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.attackSimDurationTime = value +} +// SetAttackSimId sets the attackSimId property value. The activity ID for the attack simulation. +func (m *AttackSimulationInfo) SetAttackSimId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.attackSimId = value +} +// SetAttackSimUserId sets the attackSimUserId property value. The unique identifier for the user who got the attack simulation email. +func (m *AttackSimulationInfo) SetAttackSimUserId(value *string)() { + m.attackSimUserId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *AttackSimulationInfo) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/attack_simulation_infoable.go b/src/internal/connector/graph/betasdk/models/security/attack_simulation_infoable.go new file mode 100644 index 000000000..bfdf000a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/attack_simulation_infoable.go @@ -0,0 +1,23 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// AttackSimulationInfoable +type AttackSimulationInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAttackSimDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAttackSimDurationTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + GetAttackSimId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAttackSimUserId()(*string) + GetOdataType()(*string) + SetAttackSimDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAttackSimDurationTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() + SetAttackSimId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAttackSimUserId(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/behavior_during_retention_period.go b/src/internal/connector/graph/betasdk/models/security/behavior_during_retention_period.go new file mode 100644 index 000000000..053f5ce6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/behavior_during_retention_period.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type BehaviorDuringRetentionPeriod int + +const ( + DONOTRETAIN_BEHAVIORDURINGRETENTIONPERIOD BehaviorDuringRetentionPeriod = iota + RETAIN_BEHAVIORDURINGRETENTIONPERIOD + RETAINASRECORD_BEHAVIORDURINGRETENTIONPERIOD + RETAINASREGULATORYRECORD_BEHAVIORDURINGRETENTIONPERIOD + UNKNOWNFUTUREVALUE_BEHAVIORDURINGRETENTIONPERIOD +) + +func (i BehaviorDuringRetentionPeriod) String() string { + return []string{"doNotRetain", "retain", "retainAsRecord", "retainAsRegulatoryRecord", "unknownFutureValue"}[i] +} +func ParseBehaviorDuringRetentionPeriod(v string) (interface{}, error) { + result := DONOTRETAIN_BEHAVIORDURINGRETENTIONPERIOD + switch v { + case "doNotRetain": + result = DONOTRETAIN_BEHAVIORDURINGRETENTIONPERIOD + case "retain": + result = RETAIN_BEHAVIORDURINGRETENTIONPERIOD + case "retainAsRecord": + result = RETAINASRECORD_BEHAVIORDURINGRETENTIONPERIOD + case "retainAsRegulatoryRecord": + result = RETAINASREGULATORYRECORD_BEHAVIORDURINGRETENTIONPERIOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_BEHAVIORDURINGRETENTIONPERIOD + default: + return 0, errors.New("Unknown BehaviorDuringRetentionPeriod value: " + v) + } + return &result, nil +} +func SerializeBehaviorDuringRetentionPeriod(values []BehaviorDuringRetentionPeriod) []string { + 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/security/case_action.go b/src/internal/connector/graph/betasdk/models/security/case_action.go new file mode 100644 index 000000000..8218dfe5d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_action.go @@ -0,0 +1,55 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseAction int + +const ( + CONTENTEXPORT_CASEACTION CaseAction = iota + APPLYTAGS_CASEACTION + CONVERTTOPDF_CASEACTION + INDEX_CASEACTION + ESTIMATESTATISTICS_CASEACTION + ADDTOREVIEWSET_CASEACTION + HOLDUPDATE_CASEACTION + UNKNOWNFUTUREVALUE_CASEACTION + PURGEDATA_CASEACTION +) + +func (i CaseAction) String() string { + return []string{"contentExport", "applyTags", "convertToPdf", "index", "estimateStatistics", "addToReviewSet", "holdUpdate", "unknownFutureValue", "purgeData"}[i] +} +func ParseCaseAction(v string) (interface{}, error) { + result := CONTENTEXPORT_CASEACTION + switch v { + case "contentExport": + result = CONTENTEXPORT_CASEACTION + case "applyTags": + result = APPLYTAGS_CASEACTION + case "convertToPdf": + result = CONVERTTOPDF_CASEACTION + case "index": + result = INDEX_CASEACTION + case "estimateStatistics": + result = ESTIMATESTATISTICS_CASEACTION + case "addToReviewSet": + result = ADDTOREVIEWSET_CASEACTION + case "holdUpdate": + result = HOLDUPDATE_CASEACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASEACTION + case "purgeData": + result = PURGEDATA_CASEACTION + default: + return 0, errors.New("Unknown CaseAction value: " + v) + } + return &result, nil +} +func SerializeCaseAction(values []CaseAction) []string { + 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/security/case_escaped.go b/src/internal/connector/graph/betasdk/models/security/case_escaped.go new file mode 100644 index 000000000..93233e1ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_escaped.go @@ -0,0 +1,211 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Case_escaped provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Case_escaped struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastModifiedBy property + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *CaseStatus +} +// NewCase_escaped instantiates a new case_escaped and sets the default values. +func NewCase_escaped()(*Case_escaped) { + m := &Case_escaped{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCase_escapedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCase_escapedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryCase": + return NewEdiscoveryCase(), nil + } + } + } + } + return NewCase_escaped(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *Case_escaped) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *Case_escaped) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Case_escaped) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Case_escaped) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CaseStatus)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *Case_escaped) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Case_escaped) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStatus gets the status property value. The status property +func (m *Case_escaped) GetStatus()(*CaseStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *Case_escaped) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *Case_escaped) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *Case_escaped) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Case_escaped) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *Case_escaped) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Case_escaped) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *Case_escaped) SetStatus(value *CaseStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_escapedable.go b/src/internal/connector/graph/betasdk/models/security/case_escapedable.go new file mode 100644 index 000000000..0e2463e5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_escapedable.go @@ -0,0 +1,25 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Case_escapedable +type Case_escapedable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*CaseStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *CaseStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_operation.go b/src/internal/connector/graph/betasdk/models/security/case_operation.go new file mode 100644 index 000000000..44119f04e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_operation.go @@ -0,0 +1,250 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperation +type CaseOperation struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData + action *CaseAction + // The date and time the operation was completed. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user that created the operation. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the operation was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The progress of the operation. + percentProgress *int32 + // Contains success and failure-specific result information. + resultInfo ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable + // The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. + status *CaseOperationStatus +} +// NewCaseOperation instantiates a new caseOperation and sets the default values. +func NewCaseOperation()(*CaseOperation) { + m := &CaseOperation{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCaseOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryAddToReviewSetOperation": + return NewEdiscoveryAddToReviewSetOperation(), nil + case "#microsoft.graph.security.ediscoveryEstimateOperation": + return NewEdiscoveryEstimateOperation(), nil + case "#microsoft.graph.security.ediscoveryExportOperation": + return NewEdiscoveryExportOperation(), nil + case "#microsoft.graph.security.ediscoveryHoldOperation": + return NewEdiscoveryHoldOperation(), nil + case "#microsoft.graph.security.ediscoveryIndexOperation": + return NewEdiscoveryIndexOperation(), nil + case "#microsoft.graph.security.ediscoveryPurgeDataOperation": + return NewEdiscoveryPurgeDataOperation(), nil + case "#microsoft.graph.security.ediscoveryTagOperation": + return NewEdiscoveryTagOperation(), nil + } + } + } + } + return NewCaseOperation(), nil +} +// GetAction gets the action property value. The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData +func (m *CaseOperation) GetAction()(*CaseAction) { + return m.action +} +// GetCompletedDateTime gets the completedDateTime property value. The date and time the operation was completed. +func (m *CaseOperation) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCreatedBy gets the createdBy property value. The user that created the operation. +func (m *CaseOperation) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the operation was created. +func (m *CaseOperation) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*CaseAction)) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["percentProgress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPercentProgress(val) + } + return nil + } + res["resultInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateResultInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResultInfo(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseCaseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*CaseOperationStatus)) + } + return nil + } + return res +} +// GetPercentProgress gets the percentProgress property value. The progress of the operation. +func (m *CaseOperation) GetPercentProgress()(*int32) { + return m.percentProgress +} +// GetResultInfo gets the resultInfo property value. Contains success and failure-specific result information. +func (m *CaseOperation) GetResultInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable) { + return m.resultInfo +} +// GetStatus gets the status property value. The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. +func (m *CaseOperation) GetStatus()(*CaseOperationStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *CaseOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err = writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("percentProgress", m.GetPercentProgress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resultInfo", m.GetResultInfo()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. The type of action the operation represents. Possible values are: addToReviewSet,applyTags,contentExport,convertToPdf,estimateStatistics, purgeData +func (m *CaseOperation) SetAction(value *CaseAction)() { + m.action = value +} +// SetCompletedDateTime sets the completedDateTime property value. The date and time the operation was completed. +func (m *CaseOperation) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCreatedBy sets the createdBy property value. The user that created the operation. +func (m *CaseOperation) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the operation was created. +func (m *CaseOperation) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetPercentProgress sets the percentProgress property value. The progress of the operation. +func (m *CaseOperation) SetPercentProgress(value *int32)() { + m.percentProgress = value +} +// SetResultInfo sets the resultInfo property value. Contains success and failure-specific result information. +func (m *CaseOperation) SetResultInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)() { + m.resultInfo = value +} +// SetStatus sets the status property value. The status of the case operation. Possible values are: notStarted, submissionFailed, running, succeeded, partiallySucceeded, failed. +func (m *CaseOperation) SetStatus(value *CaseOperationStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/case_operation_collection_response.go new file mode 100644 index 000000000..48f2c7616 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationCollectionResponse +type CaseOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []CaseOperationable +} +// NewCaseOperationCollectionResponse instantiates a new CaseOperationCollectionResponse and sets the default values. +func NewCaseOperationCollectionResponse()(*CaseOperationCollectionResponse) { + m := &CaseOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateCaseOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCaseOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCaseOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CaseOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *CaseOperationCollectionResponse) GetValue()([]CaseOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *CaseOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *CaseOperationCollectionResponse) SetValue(value []CaseOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/case_operation_collection_responseable.go new file mode 100644 index 000000000..371374f41 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationCollectionResponseable +type CaseOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]CaseOperationable) + SetValue(value []CaseOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_operation_status.go b/src/internal/connector/graph/betasdk/models/security/case_operation_status.go new file mode 100644 index 000000000..3615e14b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_operation_status.go @@ -0,0 +1,49 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseOperationStatus int + +const ( + NOTSTARTED_CASEOPERATIONSTATUS CaseOperationStatus = iota + SUBMISSIONFAILED_CASEOPERATIONSTATUS + RUNNING_CASEOPERATIONSTATUS + SUCCEEDED_CASEOPERATIONSTATUS + PARTIALLYSUCCEEDED_CASEOPERATIONSTATUS + FAILED_CASEOPERATIONSTATUS + UNKNOWNFUTUREVALUE_CASEOPERATIONSTATUS +) + +func (i CaseOperationStatus) String() string { + return []string{"notStarted", "submissionFailed", "running", "succeeded", "partiallySucceeded", "failed", "unknownFutureValue"}[i] +} +func ParseCaseOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_CASEOPERATIONSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_CASEOPERATIONSTATUS + case "submissionFailed": + result = SUBMISSIONFAILED_CASEOPERATIONSTATUS + case "running": + result = RUNNING_CASEOPERATIONSTATUS + case "succeeded": + result = SUCCEEDED_CASEOPERATIONSTATUS + case "partiallySucceeded": + result = PARTIALLYSUCCEEDED_CASEOPERATIONSTATUS + case "failed": + result = FAILED_CASEOPERATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASEOPERATIONSTATUS + default: + return 0, errors.New("Unknown CaseOperationStatus value: " + v) + } + return &result, nil +} +func SerializeCaseOperationStatus(values []CaseOperationStatus) []string { + 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/security/case_operationable.go b/src/internal/connector/graph/betasdk/models/security/case_operationable.go new file mode 100644 index 000000000..f4c81a2af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_operationable.go @@ -0,0 +1,27 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CaseOperationable +type CaseOperationable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*CaseAction) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPercentProgress()(*int32) + GetResultInfo()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable) + GetStatus()(*CaseOperationStatus) + SetAction(value *CaseAction)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPercentProgress(value *int32)() + SetResultInfo(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.ResultInfoable)() + SetStatus(value *CaseOperationStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/case_status.go b/src/internal/connector/graph/betasdk/models/security/case_status.go new file mode 100644 index 000000000..4b592dcd0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/case_status.go @@ -0,0 +1,49 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type CaseStatus int + +const ( + UNKNOWN_CASESTATUS CaseStatus = iota + ACTIVE_CASESTATUS + PENDINGDELETE_CASESTATUS + CLOSING_CASESTATUS + CLOSED_CASESTATUS + CLOSEDWITHERROR_CASESTATUS + UNKNOWNFUTUREVALUE_CASESTATUS +) + +func (i CaseStatus) String() string { + return []string{"unknown", "active", "pendingDelete", "closing", "closed", "closedWithError", "unknownFutureValue"}[i] +} +func ParseCaseStatus(v string) (interface{}, error) { + result := UNKNOWN_CASESTATUS + switch v { + case "unknown": + result = UNKNOWN_CASESTATUS + case "active": + result = ACTIVE_CASESTATUS + case "pendingDelete": + result = PENDINGDELETE_CASESTATUS + case "closing": + result = CLOSING_CASESTATUS + case "closed": + result = CLOSED_CASESTATUS + case "closedWithError": + result = CLOSEDWITHERROR_CASESTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CASESTATUS + default: + return 0, errors.New("Unknown CaseStatus value: " + v) + } + return &result, nil +} +func SerializeCaseStatus(values []CaseStatus) []string { + 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/security/cases_root.go b/src/internal/connector/graph/betasdk/models/security/cases_root.go new file mode 100644 index 000000000..4bd76b5ec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/cases_root.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CasesRoot +type CasesRoot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The ediscoveryCases property + ediscoveryCases []EdiscoveryCaseable +} +// NewCasesRoot instantiates a new casesRoot and sets the default values. +func NewCasesRoot()(*CasesRoot) { + m := &CasesRoot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateCasesRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCasesRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCasesRoot(), nil +} +// GetEdiscoveryCases gets the ediscoveryCases property value. The ediscoveryCases property +func (m *CasesRoot) GetEdiscoveryCases()([]EdiscoveryCaseable) { + return m.ediscoveryCases +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CasesRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ediscoveryCases"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryCaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryCaseable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryCaseable) + } + m.SetEdiscoveryCases(res) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *CasesRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetEdiscoveryCases() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEdiscoveryCases())) + for i, v := range m.GetEdiscoveryCases() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ediscoveryCases", cast) + if err != nil { + return err + } + } + return nil +} +// SetEdiscoveryCases sets the ediscoveryCases property value. The ediscoveryCases property +func (m *CasesRoot) SetEdiscoveryCases(value []EdiscoveryCaseable)() { + m.ediscoveryCases = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/cases_rootable.go b/src/internal/connector/graph/betasdk/models/security/cases_rootable.go new file mode 100644 index 000000000..4bbfe82e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/cases_rootable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// CasesRootable +type CasesRootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEdiscoveryCases()([]EdiscoveryCaseable) + SetEdiscoveryCases(value []EdiscoveryCaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/child_selectability.go b/src/internal/connector/graph/betasdk/models/security/child_selectability.go new file mode 100644 index 000000000..b14d91016 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/child_selectability.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ChildSelectability int + +const ( + ONE_CHILDSELECTABILITY ChildSelectability = iota + MANY_CHILDSELECTABILITY + UNKNOWNFUTUREVALUE_CHILDSELECTABILITY +) + +func (i ChildSelectability) String() string { + return []string{"One", "Many", "unknownFutureValue"}[i] +} +func ParseChildSelectability(v string) (interface{}, error) { + result := ONE_CHILDSELECTABILITY + switch v { + case "One": + result = ONE_CHILDSELECTABILITY + case "Many": + result = MANY_CHILDSELECTABILITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_CHILDSELECTABILITY + default: + return 0, errors.New("Unknown ChildSelectability value: " + v) + } + return &result, nil +} +func SerializeChildSelectability(values []ChildSelectability) []string { + 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/security/cloud_application_evidence.go b/src/internal/connector/graph/betasdk/models/security/cloud_application_evidence.go new file mode 100644 index 000000000..3cf6d7a54 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/cloud_application_evidence.go @@ -0,0 +1,164 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudApplicationEvidence +type CloudApplicationEvidence struct { + AlertEvidence + // Unique identifier of the application. + appId *int64 + // Name of the application. + displayName *string + // Identifier of the instance of the Software as a Service (SaaS) application. + instanceId *int64 + // Name of the instance of the SaaS application. + instanceName *string + // The identifier of the SaaS application. + saasAppId *int64 +} +// NewCloudApplicationEvidence instantiates a new CloudApplicationEvidence and sets the default values. +func NewCloudApplicationEvidence()(*CloudApplicationEvidence) { + m := &CloudApplicationEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateCloudApplicationEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCloudApplicationEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCloudApplicationEvidence(), nil +} +// GetAppId gets the appId property value. Unique identifier of the application. +func (m *CloudApplicationEvidence) GetAppId()(*int64) { + return m.appId +} +// GetDisplayName gets the displayName property value. Name of the application. +func (m *CloudApplicationEvidence) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CloudApplicationEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["instanceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetInstanceId(val) + } + return nil + } + res["instanceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstanceName(val) + } + return nil + } + res["saasAppId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSaasAppId(val) + } + return nil + } + return res +} +// GetInstanceId gets the instanceId property value. Identifier of the instance of the Software as a Service (SaaS) application. +func (m *CloudApplicationEvidence) GetInstanceId()(*int64) { + return m.instanceId +} +// GetInstanceName gets the instanceName property value. Name of the instance of the SaaS application. +func (m *CloudApplicationEvidence) GetInstanceName()(*string) { + return m.instanceName +} +// GetSaasAppId gets the saasAppId property value. The identifier of the SaaS application. +func (m *CloudApplicationEvidence) GetSaasAppId()(*int64) { + return m.saasAppId +} +// Serialize serializes information the current object +func (m *CloudApplicationEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("instanceId", m.GetInstanceId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("instanceName", m.GetInstanceName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("saasAppId", m.GetSaasAppId()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. Unique identifier of the application. +func (m *CloudApplicationEvidence) SetAppId(value *int64)() { + m.appId = value +} +// SetDisplayName sets the displayName property value. Name of the application. +func (m *CloudApplicationEvidence) SetDisplayName(value *string)() { + m.displayName = value +} +// SetInstanceId sets the instanceId property value. Identifier of the instance of the Software as a Service (SaaS) application. +func (m *CloudApplicationEvidence) SetInstanceId(value *int64)() { + m.instanceId = value +} +// SetInstanceName sets the instanceName property value. Name of the instance of the SaaS application. +func (m *CloudApplicationEvidence) SetInstanceName(value *string)() { + m.instanceName = value +} +// SetSaasAppId sets the saasAppId property value. The identifier of the SaaS application. +func (m *CloudApplicationEvidence) SetSaasAppId(value *int64)() { + m.saasAppId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/cloud_application_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/cloud_application_evidenceable.go new file mode 100644 index 000000000..1aaf815a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/cloud_application_evidenceable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CloudApplicationEvidenceable +type CloudApplicationEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*int64) + GetDisplayName()(*string) + GetInstanceId()(*int64) + GetInstanceName()(*string) + GetSaasAppId()(*int64) + SetAppId(value *int64)() + SetDisplayName(value *string)() + SetInstanceId(value *int64)() + SetInstanceName(value *string)() + SetSaasAppId(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/content_alignment.go b/src/internal/connector/graph/betasdk/models/security/content_alignment.go new file mode 100644 index 000000000..957c31ab8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/content_alignment.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type ContentAlignment int + +const ( + LEFT_CONTENTALIGNMENT ContentAlignment = iota + RIGHT_CONTENTALIGNMENT + CENTER_CONTENTALIGNMENT +) + +func (i ContentAlignment) String() string { + return []string{"left", "right", "center"}[i] +} +func ParseContentAlignment(v string) (interface{}, error) { + result := LEFT_CONTENTALIGNMENT + switch v { + case "left": + result = LEFT_CONTENTALIGNMENT + case "right": + result = RIGHT_CONTENTALIGNMENT + case "center": + result = CENTER_CONTENTALIGNMENT + default: + return 0, errors.New("Unknown ContentAlignment value: " + v) + } + return &result, nil +} +func SerializeContentAlignment(values []ContentAlignment) []string { + 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/security/custom_action.go b/src/internal/connector/graph/betasdk/models/security/custom_action.go new file mode 100644 index 000000000..9b120ac5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/custom_action.go @@ -0,0 +1,96 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomAction +type CustomAction struct { + InformationProtectionAction + // Name of the custom action. + name *string + // Properties, in key-value pair format, of the action. + properties []KeyValuePairable +} +// NewCustomAction instantiates a new CustomAction and sets the default values. +func NewCustomAction()(*CustomAction) { + m := &CustomAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.customAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateCustomActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateCustomActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewCustomAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *CustomAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["properties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetProperties(res) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the custom action. +func (m *CustomAction) GetName()(*string) { + return m.name +} +// GetProperties gets the properties property value. Properties, in key-value pair format, of the action. +func (m *CustomAction) GetProperties()([]KeyValuePairable) { + return m.properties +} +// Serialize serializes information the current object +func (m *CustomAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetProperties() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetProperties())) + for i, v := range m.GetProperties() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("properties", cast) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. Name of the custom action. +func (m *CustomAction) SetName(value *string)() { + m.name = value +} +// SetProperties sets the properties property value. Properties, in key-value pair format, of the action. +func (m *CustomAction) SetProperties(value []KeyValuePairable)() { + m.properties = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/custom_actionable.go b/src/internal/connector/graph/betasdk/models/security/custom_actionable.go new file mode 100644 index 000000000..c4557bbd2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/custom_actionable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// CustomActionable +type CustomActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetProperties()([]KeyValuePairable) + SetName(value *string)() + SetProperties(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_set.go b/src/internal/connector/graph/betasdk/models/security/data_set.go new file mode 100644 index 000000000..35d098272 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_set.go @@ -0,0 +1,132 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSet +type DataSet struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdBy property + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The displayName property + displayName *string +} +// NewDataSet instantiates a new dataSet and sets the default values. +func NewDataSet()(*DataSet) { + m := &DataSet{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDataSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryReviewSet": + return NewEdiscoveryReviewSet(), nil + } + } + } + } + return NewDataSet(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *DataSet) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *DataSet) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *DataSet) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *DataSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *DataSet) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *DataSet) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *DataSet) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_setable.go b/src/internal/connector/graph/betasdk/models/security/data_setable.go new file mode 100644 index 000000000..30b41ef19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_setable.go @@ -0,0 +1,19 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSetable +type DataSetable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source.go b/src/internal/connector/graph/betasdk/models/security/data_source.go new file mode 100644 index 000000000..9c4427986 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source.go @@ -0,0 +1,163 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSource struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the dataSource. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time the dataSource was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The display name of the dataSource. This will be the name of the SharePoint site. + displayName *string + // The hold status of the dataSource.The possible values are: notApplied, applied, applying, removing, partial + holdStatus *DataSourceHoldStatus +} +// NewDataSource instantiates a new dataSource and sets the default values. +func NewDataSource()(*DataSource) { + m := &DataSource{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDataSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.siteSource": + return NewSiteSource(), nil + case "#microsoft.graph.security.unifiedGroupSource": + return NewUnifiedGroupSource(), nil + case "#microsoft.graph.security.userSource": + return NewUserSource(), nil + } + } + } + } + return NewDataSource(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the dataSource. +func (m *DataSource) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date and time the dataSource was created. +func (m *DataSource) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site. +func (m *DataSource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["holdStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceHoldStatus) + if err != nil { + return err + } + if val != nil { + m.SetHoldStatus(val.(*DataSourceHoldStatus)) + } + return nil + } + return res +} +// GetHoldStatus gets the holdStatus property value. The hold status of the dataSource.The possible values are: notApplied, applied, applying, removing, partial +func (m *DataSource) GetHoldStatus()(*DataSourceHoldStatus) { + return m.holdStatus +} +// Serialize serializes information the current object +func (m *DataSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHoldStatus() != nil { + cast := (*m.GetHoldStatus()).String() + err = writer.WriteStringValue("holdStatus", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the dataSource. +func (m *DataSource) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date and time the dataSource was created. +func (m *DataSource) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. The display name of the dataSource. This will be the name of the SharePoint site. +func (m *DataSource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHoldStatus sets the holdStatus property value. The hold status of the dataSource.The possible values are: notApplied, applied, applying, removing, partial +func (m *DataSource) SetHoldStatus(value *DataSourceHoldStatus)() { + m.holdStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source_collection_response.go b/src/internal/connector/graph/betasdk/models/security/data_source_collection_response.go new file mode 100644 index 000000000..52c81944e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceCollectionResponse +type DataSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DataSourceable +} +// NewDataSourceCollectionResponse instantiates a new DataSourceCollectionResponse and sets the default values. +func NewDataSourceCollectionResponse()(*DataSourceCollectionResponse) { + m := &DataSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDataSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDataSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DataSourceCollectionResponse) GetValue()([]DataSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *DataSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DataSourceCollectionResponse) SetValue(value []DataSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/data_source_collection_responseable.go new file mode 100644 index 000000000..b8db2e75f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceCollectionResponseable +type DataSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DataSourceable) + SetValue(value []DataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source_container.go b/src/internal/connector/graph/betasdk/models/security/data_source_container.go new file mode 100644 index 000000000..6a7b2e47d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_container.go @@ -0,0 +1,214 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceContainer provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceContainer struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Created date and time of the dataSourceContainer entity. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Display name of the dataSourceContainer entity. + displayName *string + // The hold status of the dataSourceContainer.The possible values are: notApplied, applied, applying, removing, partial + holdStatus *DataSourceHoldStatus + // Last modified date and time of the dataSourceContainer. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Date and time that the dataSourceContainer was released from the case. + releasedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Latest status of the dataSourceContainer. Possible values are: Active, Released. + status *DataSourceContainerStatus +} +// NewDataSourceContainer instantiates a new dataSourceContainer and sets the default values. +func NewDataSourceContainer()(*DataSourceContainer) { + m := &DataSourceContainer{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDataSourceContainerFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDataSourceContainerFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryCustodian": + return NewEdiscoveryCustodian(), nil + case "#microsoft.graph.security.ediscoveryNoncustodialDataSource": + return NewEdiscoveryNoncustodialDataSource(), nil + } + } + } + } + return NewDataSourceContainer(), nil +} +// GetCreatedDateTime gets the createdDateTime property value. Created date and time of the dataSourceContainer entity. +func (m *DataSourceContainer) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDisplayName gets the displayName property value. Display name of the dataSourceContainer entity. +func (m *DataSourceContainer) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DataSourceContainer) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["holdStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceHoldStatus) + if err != nil { + return err + } + if val != nil { + m.SetHoldStatus(val.(*DataSourceHoldStatus)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["releasedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReleasedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceContainerStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*DataSourceContainerStatus)) + } + return nil + } + return res +} +// GetHoldStatus gets the holdStatus property value. The hold status of the dataSourceContainer.The possible values are: notApplied, applied, applying, removing, partial +func (m *DataSourceContainer) GetHoldStatus()(*DataSourceHoldStatus) { + return m.holdStatus +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. Last modified date and time of the dataSourceContainer. +func (m *DataSourceContainer) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetReleasedDateTime gets the releasedDateTime property value. Date and time that the dataSourceContainer was released from the case. +func (m *DataSourceContainer) GetReleasedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.releasedDateTime +} +// GetStatus gets the status property value. Latest status of the dataSourceContainer. Possible values are: Active, Released. +func (m *DataSourceContainer) GetStatus()(*DataSourceContainerStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *DataSourceContainer) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetHoldStatus() != nil { + cast := (*m.GetHoldStatus()).String() + err = writer.WriteStringValue("holdStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("releasedDateTime", m.GetReleasedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedDateTime sets the createdDateTime property value. Created date and time of the dataSourceContainer entity. +func (m *DataSourceContainer) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDisplayName sets the displayName property value. Display name of the dataSourceContainer entity. +func (m *DataSourceContainer) SetDisplayName(value *string)() { + m.displayName = value +} +// SetHoldStatus sets the holdStatus property value. The hold status of the dataSourceContainer.The possible values are: notApplied, applied, applying, removing, partial +func (m *DataSourceContainer) SetHoldStatus(value *DataSourceHoldStatus)() { + m.holdStatus = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. Last modified date and time of the dataSourceContainer. +func (m *DataSourceContainer) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetReleasedDateTime sets the releasedDateTime property value. Date and time that the dataSourceContainer was released from the case. +func (m *DataSourceContainer) SetReleasedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.releasedDateTime = value +} +// SetStatus sets the status property value. Latest status of the dataSourceContainer. Possible values are: Active, Released. +func (m *DataSourceContainer) SetStatus(value *DataSourceContainerStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source_container_status.go b/src/internal/connector/graph/betasdk/models/security/data_source_container_status.go new file mode 100644 index 000000000..1c534ee63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_container_status.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceContainerStatus int + +const ( + ACTIVE_DATASOURCECONTAINERSTATUS DataSourceContainerStatus = iota + RELEASED_DATASOURCECONTAINERSTATUS + UNKNOWNFUTUREVALUE_DATASOURCECONTAINERSTATUS +) + +func (i DataSourceContainerStatus) String() string { + return []string{"active", "released", "unknownFutureValue"}[i] +} +func ParseDataSourceContainerStatus(v string) (interface{}, error) { + result := ACTIVE_DATASOURCECONTAINERSTATUS + switch v { + case "active": + result = ACTIVE_DATASOURCECONTAINERSTATUS + case "released": + result = RELEASED_DATASOURCECONTAINERSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCECONTAINERSTATUS + default: + return 0, errors.New("Unknown DataSourceContainerStatus value: " + v) + } + return &result, nil +} +func SerializeDataSourceContainerStatus(values []DataSourceContainerStatus) []string { + 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/security/data_source_containerable.go b/src/internal/connector/graph/betasdk/models/security/data_source_containerable.go new file mode 100644 index 000000000..cf5af1d23 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_containerable.go @@ -0,0 +1,25 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceContainerable +type DataSourceContainerable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHoldStatus()(*DataSourceHoldStatus) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReleasedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*DataSourceContainerStatus) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHoldStatus(value *DataSourceHoldStatus)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReleasedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *DataSourceContainerStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/data_source_hold_status.go b/src/internal/connector/graph/betasdk/models/security/data_source_hold_status.go new file mode 100644 index 000000000..dc154cefa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_hold_status.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceHoldStatus int + +const ( + NOTAPPLIED_DATASOURCEHOLDSTATUS DataSourceHoldStatus = iota + APPLIED_DATASOURCEHOLDSTATUS + APPLYING_DATASOURCEHOLDSTATUS + REMOVING_DATASOURCEHOLDSTATUS + PARTIAL_DATASOURCEHOLDSTATUS + UNKNOWNFUTUREVALUE_DATASOURCEHOLDSTATUS +) + +func (i DataSourceHoldStatus) String() string { + return []string{"notApplied", "applied", "applying", "removing", "partial", "unknownFutureValue"}[i] +} +func ParseDataSourceHoldStatus(v string) (interface{}, error) { + result := NOTAPPLIED_DATASOURCEHOLDSTATUS + switch v { + case "notApplied": + result = NOTAPPLIED_DATASOURCEHOLDSTATUS + case "applied": + result = APPLIED_DATASOURCEHOLDSTATUS + case "applying": + result = APPLYING_DATASOURCEHOLDSTATUS + case "removing": + result = REMOVING_DATASOURCEHOLDSTATUS + case "partial": + result = PARTIAL_DATASOURCEHOLDSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCEHOLDSTATUS + default: + return 0, errors.New("Unknown DataSourceHoldStatus value: " + v) + } + return &result, nil +} +func SerializeDataSourceHoldStatus(values []DataSourceHoldStatus) []string { + 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/security/data_source_scopes.go b/src/internal/connector/graph/betasdk/models/security/data_source_scopes.go new file mode 100644 index 000000000..f5851e9aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_source_scopes.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DataSourceScopes int + +const ( + NONE_DATASOURCESCOPES DataSourceScopes = iota + ALLTENANTMAILBOXES_DATASOURCESCOPES + ALLTENANTSITES_DATASOURCESCOPES + ALLCASECUSTODIANS_DATASOURCESCOPES + ALLCASENONCUSTODIALDATASOURCES_DATASOURCESCOPES + UNKNOWNFUTUREVALUE_DATASOURCESCOPES +) + +func (i DataSourceScopes) String() string { + return []string{"none", "allTenantMailboxes", "allTenantSites", "allCaseCustodians", "allCaseNoncustodialDataSources", "unknownFutureValue"}[i] +} +func ParseDataSourceScopes(v string) (interface{}, error) { + result := NONE_DATASOURCESCOPES + switch v { + case "none": + result = NONE_DATASOURCESCOPES + case "allTenantMailboxes": + result = ALLTENANTMAILBOXES_DATASOURCESCOPES + case "allTenantSites": + result = ALLTENANTSITES_DATASOURCESCOPES + case "allCaseCustodians": + result = ALLCASECUSTODIANS_DATASOURCESCOPES + case "allCaseNoncustodialDataSources": + result = ALLCASENONCUSTODIALDATASOURCES_DATASOURCESCOPES + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DATASOURCESCOPES + default: + return 0, errors.New("Unknown DataSourceScopes value: " + v) + } + return &result, nil +} +func SerializeDataSourceScopes(values []DataSourceScopes) []string { + 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/security/data_sourceable.go b/src/internal/connector/graph/betasdk/models/security/data_sourceable.go new file mode 100644 index 000000000..c822743d1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/data_sourceable.go @@ -0,0 +1,21 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DataSourceable +type DataSourceable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDisplayName()(*string) + GetHoldStatus()(*DataSourceHoldStatus) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDisplayName(value *string)() + SetHoldStatus(value *DataSourceHoldStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/default_record_behavior.go b/src/internal/connector/graph/betasdk/models/security/default_record_behavior.go new file mode 100644 index 000000000..62ca8164b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/default_record_behavior.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefaultRecordBehavior int + +const ( + STARTLOCKED_DEFAULTRECORDBEHAVIOR DefaultRecordBehavior = iota + STARTUNLOCKED_DEFAULTRECORDBEHAVIOR + UNKNOWNFUTUREVALUE_DEFAULTRECORDBEHAVIOR +) + +func (i DefaultRecordBehavior) String() string { + return []string{"startLocked", "startUnlocked", "unknownFutureValue"}[i] +} +func ParseDefaultRecordBehavior(v string) (interface{}, error) { + result := STARTLOCKED_DEFAULTRECORDBEHAVIOR + switch v { + case "startLocked": + result = STARTLOCKED_DEFAULTRECORDBEHAVIOR + case "startUnlocked": + result = STARTUNLOCKED_DEFAULTRECORDBEHAVIOR + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEFAULTRECORDBEHAVIOR + default: + return 0, errors.New("Unknown DefaultRecordBehavior value: " + v) + } + return &result, nil +} +func SerializeDefaultRecordBehavior(values []DefaultRecordBehavior) []string { + 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/security/defender_av_status.go b/src/internal/connector/graph/betasdk/models/security/defender_av_status.go new file mode 100644 index 000000000..f2e1cb2aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/defender_av_status.go @@ -0,0 +1,49 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DefenderAvStatus int + +const ( + NOTREPORTING_DEFENDERAVSTATUS DefenderAvStatus = iota + DISABLED_DEFENDERAVSTATUS + NOTUPDATED_DEFENDERAVSTATUS + UPDATED_DEFENDERAVSTATUS + UNKNOWN_DEFENDERAVSTATUS + NOTSUPPORTED_DEFENDERAVSTATUS + UNKNOWNFUTUREVALUE_DEFENDERAVSTATUS +) + +func (i DefenderAvStatus) String() string { + return []string{"notReporting", "disabled", "notUpdated", "updated", "unknown", "notSupported", "unknownFutureValue"}[i] +} +func ParseDefenderAvStatus(v string) (interface{}, error) { + result := NOTREPORTING_DEFENDERAVSTATUS + switch v { + case "notReporting": + result = NOTREPORTING_DEFENDERAVSTATUS + case "disabled": + result = DISABLED_DEFENDERAVSTATUS + case "notUpdated": + result = NOTUPDATED_DEFENDERAVSTATUS + case "updated": + result = UPDATED_DEFENDERAVSTATUS + case "unknown": + result = UNKNOWN_DEFENDERAVSTATUS + case "notSupported": + result = NOTSUPPORTED_DEFENDERAVSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEFENDERAVSTATUS + default: + return 0, errors.New("Unknown DefenderAvStatus value: " + v) + } + return &result, nil +} +func SerializeDefenderAvStatus(values []DefenderAvStatus) []string { + 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/security/detection_source.go b/src/internal/connector/graph/betasdk/models/security/detection_source.go new file mode 100644 index 000000000..eb2fafb9b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/detection_source.go @@ -0,0 +1,82 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DetectionSource int + +const ( + UNKNOWN_DETECTIONSOURCE DetectionSource = iota + MICROSOFTDEFENDERFORENDPOINT_DETECTIONSOURCE + ANTIVIRUS_DETECTIONSOURCE + SMARTSCREEN_DETECTIONSOURCE + CUSTOMTI_DETECTIONSOURCE + MICROSOFTDEFENDERFOROFFICE365_DETECTIONSOURCE + AUTOMATEDINVESTIGATION_DETECTIONSOURCE + MICROSOFTTHREATEXPERTS_DETECTIONSOURCE + CUSTOMDETECTION_DETECTIONSOURCE + MICROSOFTDEFENDERFORIDENTITY_DETECTIONSOURCE + CLOUDAPPSECURITY_DETECTIONSOURCE + MICROSOFT365DEFENDER_DETECTIONSOURCE + AZUREADIDENTITYPROTECTION_DETECTIONSOURCE + MANUAL_DETECTIONSOURCE + MICROSOFTDATALOSSPREVENTION_DETECTIONSOURCE + APPGOVERNANCEPOLICY_DETECTIONSOURCE + APPGOVERNANCEDETECTION_DETECTIONSOURCE + UNKNOWNFUTUREVALUE_DETECTIONSOURCE +) + +func (i DetectionSource) String() string { + return []string{"unknown", "microsoftDefenderForEndpoint", "antivirus", "smartScreen", "customTi", "microsoftDefenderForOffice365", "automatedInvestigation", "microsoftThreatExperts", "customDetection", "microsoftDefenderForIdentity", "cloudAppSecurity", "microsoft365Defender", "azureAdIdentityProtection", "manual", "microsoftDataLossPrevention", "appGovernancePolicy", "appGovernanceDetection", "unknownFutureValue"}[i] +} +func ParseDetectionSource(v string) (interface{}, error) { + result := UNKNOWN_DETECTIONSOURCE + switch v { + case "unknown": + result = UNKNOWN_DETECTIONSOURCE + case "microsoftDefenderForEndpoint": + result = MICROSOFTDEFENDERFORENDPOINT_DETECTIONSOURCE + case "antivirus": + result = ANTIVIRUS_DETECTIONSOURCE + case "smartScreen": + result = SMARTSCREEN_DETECTIONSOURCE + case "customTi": + result = CUSTOMTI_DETECTIONSOURCE + case "microsoftDefenderForOffice365": + result = MICROSOFTDEFENDERFOROFFICE365_DETECTIONSOURCE + case "automatedInvestigation": + result = AUTOMATEDINVESTIGATION_DETECTIONSOURCE + case "microsoftThreatExperts": + result = MICROSOFTTHREATEXPERTS_DETECTIONSOURCE + case "customDetection": + result = CUSTOMDETECTION_DETECTIONSOURCE + case "microsoftDefenderForIdentity": + result = MICROSOFTDEFENDERFORIDENTITY_DETECTIONSOURCE + case "cloudAppSecurity": + result = CLOUDAPPSECURITY_DETECTIONSOURCE + case "microsoft365Defender": + result = MICROSOFT365DEFENDER_DETECTIONSOURCE + case "azureAdIdentityProtection": + result = AZUREADIDENTITYPROTECTION_DETECTIONSOURCE + case "manual": + result = MANUAL_DETECTIONSOURCE + case "microsoftDataLossPrevention": + result = MICROSOFTDATALOSSPREVENTION_DETECTIONSOURCE + case "appGovernancePolicy": + result = APPGOVERNANCEPOLICY_DETECTIONSOURCE + case "appGovernanceDetection": + result = APPGOVERNANCEDETECTION_DETECTIONSOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DETECTIONSOURCE + default: + return 0, errors.New("Unknown DetectionSource value: " + v) + } + return &result, nil +} +func SerializeDetectionSource(values []DetectionSource) []string { + 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/security/detection_status.go b/src/internal/connector/graph/betasdk/models/security/detection_status.go new file mode 100644 index 000000000..1c64e93f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/detection_status.go @@ -0,0 +1,40 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DetectionStatus int + +const ( + DETECTED_DETECTIONSTATUS DetectionStatus = iota + BLOCKED_DETECTIONSTATUS + PREVENTED_DETECTIONSTATUS + UNKNOWNFUTUREVALUE_DETECTIONSTATUS +) + +func (i DetectionStatus) String() string { + return []string{"detected", "blocked", "prevented", "unknownFutureValue"}[i] +} +func ParseDetectionStatus(v string) (interface{}, error) { + result := DETECTED_DETECTIONSTATUS + switch v { + case "detected": + result = DETECTED_DETECTIONSTATUS + case "blocked": + result = BLOCKED_DETECTIONSTATUS + case "prevented": + result = PREVENTED_DETECTIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DETECTIONSTATUS + default: + return 0, errors.New("Unknown DetectionStatus value: " + v) + } + return &result, nil +} +func SerializeDetectionStatus(values []DetectionStatus) []string { + 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/security/device_evidence.go b/src/internal/connector/graph/betasdk/models/security/device_evidence.go new file mode 100644 index 000000000..08d46fddd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/device_evidence.go @@ -0,0 +1,437 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEvidence +type DeviceEvidence struct { + AlertEvidence + // A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. + azureAdDeviceId *string + // State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue. + defenderAvStatus *DefenderAvStatus + // The fully qualified domain name (FQDN) for the device. + deviceDnsName *string + // The date and time when the device was first seen. + firstSeenDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The health state of the device.The possible values are: active, inactive, impairedCommunication, noSensorData, noSensorDataImpairedCommunication, unknown, unknownFutureValue. + healthStatus *DeviceHealthStatus + // Users that were logged on the machine during the time of the alert. + loggedOnUsers []LoggedOnUserable + // A unique identifier assigned to a device by Microsoft Defender for Endpoint. + mdeDeviceId *string + // The status of the machine onboarding to Microsoft Defender for Endpoint.The possible values are: insufficientInfo, onboarded, canBeOnboarded, unsupported, unknownFutureValue. + onboardingStatus *OnboardingStatus + // The build version for the operating system the device is running. + osBuild *int64 + // The operating system platform the device is running. + osPlatform *string + // The ID of the role-based access control (RBAC) device group. + rbacGroupId *int32 + // The name of the RBAC device group. + rbacGroupName *string + // Risk score as evaluated by Microsoft Defender for Endpoint. The possible values are: none, informational, low, medium, high, unknownFutureValue. + riskScore *DeviceRiskScore + // The version of the operating system platform. + version *string + // Metadata of the virtual machine (VM) on which Microsoft Defender for Endpoint is running. + vmMetadata VmMetadataable +} +// NewDeviceEvidence instantiates a new DeviceEvidence and sets the default values. +func NewDeviceEvidence()(*DeviceEvidence) { + m := &DeviceEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateDeviceEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDeviceEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDeviceEvidence(), nil +} +// GetAzureAdDeviceId gets the azureAdDeviceId property value. A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. +func (m *DeviceEvidence) GetAzureAdDeviceId()(*string) { + return m.azureAdDeviceId +} +// GetDefenderAvStatus gets the defenderAvStatus property value. State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue. +func (m *DeviceEvidence) GetDefenderAvStatus()(*DefenderAvStatus) { + return m.defenderAvStatus +} +// GetDeviceDnsName gets the deviceDnsName property value. The fully qualified domain name (FQDN) for the device. +func (m *DeviceEvidence) GetDeviceDnsName()(*string) { + return m.deviceDnsName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DeviceEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["azureAdDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureAdDeviceId(val) + } + return nil + } + res["defenderAvStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefenderAvStatus) + if err != nil { + return err + } + if val != nil { + m.SetDefenderAvStatus(val.(*DefenderAvStatus)) + } + return nil + } + res["deviceDnsName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDnsName(val) + } + return nil + } + res["firstSeenDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetFirstSeenDateTime(val) + } + return nil + } + res["healthStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceHealthStatus) + if err != nil { + return err + } + if val != nil { + m.SetHealthStatus(val.(*DeviceHealthStatus)) + } + return nil + } + res["loggedOnUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLoggedOnUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LoggedOnUserable, len(val)) + for i, v := range val { + res[i] = v.(LoggedOnUserable) + } + m.SetLoggedOnUsers(res) + } + return nil + } + res["mdeDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdeDeviceId(val) + } + return nil + } + res["onboardingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOnboardingStatus) + if err != nil { + return err + } + if val != nil { + m.SetOnboardingStatus(val.(*OnboardingStatus)) + } + return nil + } + res["osBuild"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetOsBuild(val) + } + return nil + } + res["osPlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOsPlatform(val) + } + return nil + } + res["rbacGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRbacGroupId(val) + } + return nil + } + res["rbacGroupName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRbacGroupName(val) + } + return nil + } + res["riskScore"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDeviceRiskScore) + if err != nil { + return err + } + if val != nil { + m.SetRiskScore(val.(*DeviceRiskScore)) + } + return nil + } + res["version"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVersion(val) + } + return nil + } + res["vmMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVmMetadataFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVmMetadata(val.(VmMetadataable)) + } + return nil + } + return res +} +// GetFirstSeenDateTime gets the firstSeenDateTime property value. The date and time when the device was first seen. +func (m *DeviceEvidence) GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.firstSeenDateTime +} +// GetHealthStatus gets the healthStatus property value. The health state of the device.The possible values are: active, inactive, impairedCommunication, noSensorData, noSensorDataImpairedCommunication, unknown, unknownFutureValue. +func (m *DeviceEvidence) GetHealthStatus()(*DeviceHealthStatus) { + return m.healthStatus +} +// GetLoggedOnUsers gets the loggedOnUsers property value. Users that were logged on the machine during the time of the alert. +func (m *DeviceEvidence) GetLoggedOnUsers()([]LoggedOnUserable) { + return m.loggedOnUsers +} +// GetMdeDeviceId gets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *DeviceEvidence) GetMdeDeviceId()(*string) { + return m.mdeDeviceId +} +// GetOnboardingStatus gets the onboardingStatus property value. The status of the machine onboarding to Microsoft Defender for Endpoint.The possible values are: insufficientInfo, onboarded, canBeOnboarded, unsupported, unknownFutureValue. +func (m *DeviceEvidence) GetOnboardingStatus()(*OnboardingStatus) { + return m.onboardingStatus +} +// GetOsBuild gets the osBuild property value. The build version for the operating system the device is running. +func (m *DeviceEvidence) GetOsBuild()(*int64) { + return m.osBuild +} +// GetOsPlatform gets the osPlatform property value. The operating system platform the device is running. +func (m *DeviceEvidence) GetOsPlatform()(*string) { + return m.osPlatform +} +// GetRbacGroupId gets the rbacGroupId property value. The ID of the role-based access control (RBAC) device group. +func (m *DeviceEvidence) GetRbacGroupId()(*int32) { + return m.rbacGroupId +} +// GetRbacGroupName gets the rbacGroupName property value. The name of the RBAC device group. +func (m *DeviceEvidence) GetRbacGroupName()(*string) { + return m.rbacGroupName +} +// GetRiskScore gets the riskScore property value. Risk score as evaluated by Microsoft Defender for Endpoint. The possible values are: none, informational, low, medium, high, unknownFutureValue. +func (m *DeviceEvidence) GetRiskScore()(*DeviceRiskScore) { + return m.riskScore +} +// GetVersion gets the version property value. The version of the operating system platform. +func (m *DeviceEvidence) GetVersion()(*string) { + return m.version +} +// GetVmMetadata gets the vmMetadata property value. Metadata of the virtual machine (VM) on which Microsoft Defender for Endpoint is running. +func (m *DeviceEvidence) GetVmMetadata()(VmMetadataable) { + return m.vmMetadata +} +// Serialize serializes information the current object +func (m *DeviceEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureAdDeviceId", m.GetAzureAdDeviceId()) + if err != nil { + return err + } + } + if m.GetDefenderAvStatus() != nil { + cast := (*m.GetDefenderAvStatus()).String() + err = writer.WriteStringValue("defenderAvStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("deviceDnsName", m.GetDeviceDnsName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("firstSeenDateTime", m.GetFirstSeenDateTime()) + if err != nil { + return err + } + } + if m.GetHealthStatus() != nil { + cast := (*m.GetHealthStatus()).String() + err = writer.WriteStringValue("healthStatus", &cast) + if err != nil { + return err + } + } + if m.GetLoggedOnUsers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLoggedOnUsers())) + for i, v := range m.GetLoggedOnUsers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("loggedOnUsers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdeDeviceId", m.GetMdeDeviceId()) + if err != nil { + return err + } + } + if m.GetOnboardingStatus() != nil { + cast := (*m.GetOnboardingStatus()).String() + err = writer.WriteStringValue("onboardingStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("osBuild", m.GetOsBuild()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("osPlatform", m.GetOsPlatform()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("rbacGroupId", m.GetRbacGroupId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rbacGroupName", m.GetRbacGroupName()) + if err != nil { + return err + } + } + if m.GetRiskScore() != nil { + cast := (*m.GetRiskScore()).String() + err = writer.WriteStringValue("riskScore", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("version", m.GetVersion()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vmMetadata", m.GetVmMetadata()) + if err != nil { + return err + } + } + return nil +} +// SetAzureAdDeviceId sets the azureAdDeviceId property value. A unique identifier assigned to a device by Azure Active Directory (Azure AD) when device is Azure AD-joined. +func (m *DeviceEvidence) SetAzureAdDeviceId(value *string)() { + m.azureAdDeviceId = value +} +// SetDefenderAvStatus sets the defenderAvStatus property value. State of the Defender AntiMalware engine. The possible values are: notReporting, disabled, notUpdated, updated, unknown, notSupported, unknownFutureValue. +func (m *DeviceEvidence) SetDefenderAvStatus(value *DefenderAvStatus)() { + m.defenderAvStatus = value +} +// SetDeviceDnsName sets the deviceDnsName property value. The fully qualified domain name (FQDN) for the device. +func (m *DeviceEvidence) SetDeviceDnsName(value *string)() { + m.deviceDnsName = value +} +// SetFirstSeenDateTime sets the firstSeenDateTime property value. The date and time when the device was first seen. +func (m *DeviceEvidence) SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.firstSeenDateTime = value +} +// SetHealthStatus sets the healthStatus property value. The health state of the device.The possible values are: active, inactive, impairedCommunication, noSensorData, noSensorDataImpairedCommunication, unknown, unknownFutureValue. +func (m *DeviceEvidence) SetHealthStatus(value *DeviceHealthStatus)() { + m.healthStatus = value +} +// SetLoggedOnUsers sets the loggedOnUsers property value. Users that were logged on the machine during the time of the alert. +func (m *DeviceEvidence) SetLoggedOnUsers(value []LoggedOnUserable)() { + m.loggedOnUsers = value +} +// SetMdeDeviceId sets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *DeviceEvidence) SetMdeDeviceId(value *string)() { + m.mdeDeviceId = value +} +// SetOnboardingStatus sets the onboardingStatus property value. The status of the machine onboarding to Microsoft Defender for Endpoint.The possible values are: insufficientInfo, onboarded, canBeOnboarded, unsupported, unknownFutureValue. +func (m *DeviceEvidence) SetOnboardingStatus(value *OnboardingStatus)() { + m.onboardingStatus = value +} +// SetOsBuild sets the osBuild property value. The build version for the operating system the device is running. +func (m *DeviceEvidence) SetOsBuild(value *int64)() { + m.osBuild = value +} +// SetOsPlatform sets the osPlatform property value. The operating system platform the device is running. +func (m *DeviceEvidence) SetOsPlatform(value *string)() { + m.osPlatform = value +} +// SetRbacGroupId sets the rbacGroupId property value. The ID of the role-based access control (RBAC) device group. +func (m *DeviceEvidence) SetRbacGroupId(value *int32)() { + m.rbacGroupId = value +} +// SetRbacGroupName sets the rbacGroupName property value. The name of the RBAC device group. +func (m *DeviceEvidence) SetRbacGroupName(value *string)() { + m.rbacGroupName = value +} +// SetRiskScore sets the riskScore property value. Risk score as evaluated by Microsoft Defender for Endpoint. The possible values are: none, informational, low, medium, high, unknownFutureValue. +func (m *DeviceEvidence) SetRiskScore(value *DeviceRiskScore)() { + m.riskScore = value +} +// SetVersion sets the version property value. The version of the operating system platform. +func (m *DeviceEvidence) SetVersion(value *string)() { + m.version = value +} +// SetVmMetadata sets the vmMetadata property value. Metadata of the virtual machine (VM) on which Microsoft Defender for Endpoint is running. +func (m *DeviceEvidence) SetVmMetadata(value VmMetadataable)() { + m.vmMetadata = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/device_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/device_evidenceable.go new file mode 100644 index 000000000..8793d80e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/device_evidenceable.go @@ -0,0 +1,42 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// DeviceEvidenceable +type DeviceEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureAdDeviceId()(*string) + GetDefenderAvStatus()(*DefenderAvStatus) + GetDeviceDnsName()(*string) + GetFirstSeenDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetHealthStatus()(*DeviceHealthStatus) + GetLoggedOnUsers()([]LoggedOnUserable) + GetMdeDeviceId()(*string) + GetOnboardingStatus()(*OnboardingStatus) + GetOsBuild()(*int64) + GetOsPlatform()(*string) + GetRbacGroupId()(*int32) + GetRbacGroupName()(*string) + GetRiskScore()(*DeviceRiskScore) + GetVersion()(*string) + GetVmMetadata()(VmMetadataable) + SetAzureAdDeviceId(value *string)() + SetDefenderAvStatus(value *DefenderAvStatus)() + SetDeviceDnsName(value *string)() + SetFirstSeenDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetHealthStatus(value *DeviceHealthStatus)() + SetLoggedOnUsers(value []LoggedOnUserable)() + SetMdeDeviceId(value *string)() + SetOnboardingStatus(value *OnboardingStatus)() + SetOsBuild(value *int64)() + SetOsPlatform(value *string)() + SetRbacGroupId(value *int32)() + SetRbacGroupName(value *string)() + SetRiskScore(value *DeviceRiskScore)() + SetVersion(value *string)() + SetVmMetadata(value VmMetadataable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/device_health_status.go b/src/internal/connector/graph/betasdk/models/security/device_health_status.go new file mode 100644 index 000000000..1fcb6d8c8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/device_health_status.go @@ -0,0 +1,49 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceHealthStatus int + +const ( + ACTIVE_DEVICEHEALTHSTATUS DeviceHealthStatus = iota + INACTIVE_DEVICEHEALTHSTATUS + IMPAIREDCOMMUNICATION_DEVICEHEALTHSTATUS + NOSENSORDATA_DEVICEHEALTHSTATUS + NOSENSORDATAIMPAIREDCOMMUNICATION_DEVICEHEALTHSTATUS + UNKNOWN_DEVICEHEALTHSTATUS + UNKNOWNFUTUREVALUE_DEVICEHEALTHSTATUS +) + +func (i DeviceHealthStatus) String() string { + return []string{"active", "inactive", "impairedCommunication", "noSensorData", "noSensorDataImpairedCommunication", "unknown", "unknownFutureValue"}[i] +} +func ParseDeviceHealthStatus(v string) (interface{}, error) { + result := ACTIVE_DEVICEHEALTHSTATUS + switch v { + case "active": + result = ACTIVE_DEVICEHEALTHSTATUS + case "inactive": + result = INACTIVE_DEVICEHEALTHSTATUS + case "impairedCommunication": + result = IMPAIREDCOMMUNICATION_DEVICEHEALTHSTATUS + case "noSensorData": + result = NOSENSORDATA_DEVICEHEALTHSTATUS + case "noSensorDataImpairedCommunication": + result = NOSENSORDATAIMPAIREDCOMMUNICATION_DEVICEHEALTHSTATUS + case "unknown": + result = UNKNOWN_DEVICEHEALTHSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICEHEALTHSTATUS + default: + return 0, errors.New("Unknown DeviceHealthStatus value: " + v) + } + return &result, nil +} +func SerializeDeviceHealthStatus(values []DeviceHealthStatus) []string { + 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/security/device_risk_score.go b/src/internal/connector/graph/betasdk/models/security/device_risk_score.go new file mode 100644 index 000000000..a895099de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/device_risk_score.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DeviceRiskScore int + +const ( + NONE_DEVICERISKSCORE DeviceRiskScore = iota + INFORMATIONAL_DEVICERISKSCORE + LOW_DEVICERISKSCORE + MEDIUM_DEVICERISKSCORE + HIGH_DEVICERISKSCORE + UNKNOWNFUTUREVALUE_DEVICERISKSCORE +) + +func (i DeviceRiskScore) String() string { + return []string{"none", "informational", "low", "medium", "high", "unknownFutureValue"}[i] +} +func ParseDeviceRiskScore(v string) (interface{}, error) { + result := NONE_DEVICERISKSCORE + switch v { + case "none": + result = NONE_DEVICERISKSCORE + case "informational": + result = INFORMATIONAL_DEVICERISKSCORE + case "low": + result = LOW_DEVICERISKSCORE + case "medium": + result = MEDIUM_DEVICERISKSCORE + case "high": + result = HIGH_DEVICERISKSCORE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_DEVICERISKSCORE + default: + return 0, errors.New("Unknown DeviceRiskScore value: " + v) + } + return &result, nil +} +func SerializeDeviceRiskScore(values []DeviceRiskScore) []string { + 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/security/disposition_review_stage.go b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage.go new file mode 100644 index 000000000..2bfce2132 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage.go @@ -0,0 +1,117 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DispositionReviewStage provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type DispositionReviewStage struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Name representing each stage within a collection. + name *string + // A collection of reviewers at each stage. + reviewersEmailAddresses []string + // The sequence number for each stage of the disposition review. + stageNumber *int32 +} +// NewDispositionReviewStage instantiates a new dispositionReviewStage and sets the default values. +func NewDispositionReviewStage()(*DispositionReviewStage) { + m := &DispositionReviewStage{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateDispositionReviewStageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDispositionReviewStageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDispositionReviewStage(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DispositionReviewStage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["reviewersEmailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReviewersEmailAddresses(res) + } + return nil + } + res["stageNumber"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetStageNumber(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name representing each stage within a collection. +func (m *DispositionReviewStage) GetName()(*string) { + return m.name +} +// GetReviewersEmailAddresses gets the reviewersEmailAddresses property value. A collection of reviewers at each stage. +func (m *DispositionReviewStage) GetReviewersEmailAddresses()([]string) { + return m.reviewersEmailAddresses +} +// GetStageNumber gets the stageNumber property value. The sequence number for each stage of the disposition review. +func (m *DispositionReviewStage) GetStageNumber()(*int32) { + return m.stageNumber +} +// Serialize serializes information the current object +func (m *DispositionReviewStage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetReviewersEmailAddresses() != nil { + err = writer.WriteCollectionOfStringValues("reviewersEmailAddresses", m.GetReviewersEmailAddresses()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("stageNumber", m.GetStageNumber()) + if err != nil { + return err + } + } + return nil +} +// SetName sets the name property value. Name representing each stage within a collection. +func (m *DispositionReviewStage) SetName(value *string)() { + m.name = value +} +// SetReviewersEmailAddresses sets the reviewersEmailAddresses property value. A collection of reviewers at each stage. +func (m *DispositionReviewStage) SetReviewersEmailAddresses(value []string)() { + m.reviewersEmailAddresses = value +} +// SetStageNumber sets the stageNumber property value. The sequence number for each stage of the disposition review. +func (m *DispositionReviewStage) SetStageNumber(value *int32)() { + m.stageNumber = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_response.go b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_response.go new file mode 100644 index 000000000..7623d853e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DispositionReviewStageCollectionResponse +type DispositionReviewStageCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []DispositionReviewStageable +} +// NewDispositionReviewStageCollectionResponse instantiates a new DispositionReviewStageCollectionResponse and sets the default values. +func NewDispositionReviewStageCollectionResponse()(*DispositionReviewStageCollectionResponse) { + m := &DispositionReviewStageCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateDispositionReviewStageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateDispositionReviewStageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewDispositionReviewStageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *DispositionReviewStageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDispositionReviewStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DispositionReviewStageable, len(val)) + for i, v := range val { + res[i] = v.(DispositionReviewStageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *DispositionReviewStageCollectionResponse) GetValue()([]DispositionReviewStageable) { + return m.value +} +// Serialize serializes information the current object +func (m *DispositionReviewStageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *DispositionReviewStageCollectionResponse) SetValue(value []DispositionReviewStageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_responseable.go new file mode 100644 index 000000000..d5abb6bc5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/disposition_review_stage_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DispositionReviewStageCollectionResponseable +type DispositionReviewStageCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]DispositionReviewStageable) + SetValue(value []DispositionReviewStageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/disposition_review_stageable.go b/src/internal/connector/graph/betasdk/models/security/disposition_review_stageable.go new file mode 100644 index 000000000..a73c09080 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/disposition_review_stageable.go @@ -0,0 +1,18 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// DispositionReviewStageable +type DispositionReviewStageable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetReviewersEmailAddresses()([]string) + GetStageNumber()(*int32) + SetName(value *string)() + SetReviewersEmailAddresses(value []string)() + SetStageNumber(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation.go new file mode 100644 index 000000000..570f52b73 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation.go @@ -0,0 +1,86 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryAddToReviewSetOperation +type EdiscoveryAddToReviewSetOperation struct { + CaseOperation + // eDiscovery review set to which items matching source collection query gets added. + reviewSet EdiscoveryReviewSetable + // eDiscovery search that gets added to review set. + search EdiscoverySearchable +} +// NewEdiscoveryAddToReviewSetOperation instantiates a new EdiscoveryAddToReviewSetOperation and sets the default values. +func NewEdiscoveryAddToReviewSetOperation()(*EdiscoveryAddToReviewSetOperation) { + m := &EdiscoveryAddToReviewSetOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryAddToReviewSetOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryAddToReviewSetOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryAddToReviewSetOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryAddToReviewSetOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["reviewSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewSet(val.(EdiscoveryReviewSetable)) + } + return nil + } + res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoverySearchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSearch(val.(EdiscoverySearchable)) + } + return nil + } + return res +} +// GetReviewSet gets the reviewSet property value. eDiscovery review set to which items matching source collection query gets added. +func (m *EdiscoveryAddToReviewSetOperation) GetReviewSet()(EdiscoveryReviewSetable) { + return m.reviewSet +} +// GetSearch gets the search property value. eDiscovery search that gets added to review set. +func (m *EdiscoveryAddToReviewSetOperation) GetSearch()(EdiscoverySearchable) { + return m.search +} +// Serialize serializes information the current object +func (m *EdiscoveryAddToReviewSetOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("reviewSet", m.GetReviewSet()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("search", m.GetSearch()) + if err != nil { + return err + } + } + return nil +} +// SetReviewSet sets the reviewSet property value. eDiscovery review set to which items matching source collection query gets added. +func (m *EdiscoveryAddToReviewSetOperation) SetReviewSet(value EdiscoveryReviewSetable)() { + m.reviewSet = value +} +// SetSearch sets the search property value. eDiscovery search that gets added to review set. +func (m *EdiscoveryAddToReviewSetOperation) SetSearch(value EdiscoverySearchable)() { + m.search = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_response.go new file mode 100644 index 000000000..3306fc65a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryAddToReviewSetOperationCollectionResponse +type EdiscoveryAddToReviewSetOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryAddToReviewSetOperationable +} +// NewEdiscoveryAddToReviewSetOperationCollectionResponse instantiates a new EdiscoveryAddToReviewSetOperationCollectionResponse and sets the default values. +func NewEdiscoveryAddToReviewSetOperationCollectionResponse()(*EdiscoveryAddToReviewSetOperationCollectionResponse) { + m := &EdiscoveryAddToReviewSetOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryAddToReviewSetOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryAddToReviewSetOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryAddToReviewSetOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryAddToReviewSetOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryAddToReviewSetOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryAddToReviewSetOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryAddToReviewSetOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryAddToReviewSetOperationCollectionResponse) GetValue()([]EdiscoveryAddToReviewSetOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryAddToReviewSetOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryAddToReviewSetOperationCollectionResponse) SetValue(value []EdiscoveryAddToReviewSetOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_responseable.go new file mode 100644 index 000000000..1b3efc1bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryAddToReviewSetOperationCollectionResponseable +type EdiscoveryAddToReviewSetOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryAddToReviewSetOperationable) + SetValue(value []EdiscoveryAddToReviewSetOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operationable.go new file mode 100644 index 000000000..2a3a84ca8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_add_to_review_set_operationable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryAddToReviewSetOperationable +type EdiscoveryAddToReviewSetOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetReviewSet()(EdiscoveryReviewSetable) + GetSearch()(EdiscoverySearchable) + SetReviewSet(value EdiscoveryReviewSetable)() + SetSearch(value EdiscoverySearchable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_case.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_case.go new file mode 100644 index 000000000..b7aefb109 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_case.go @@ -0,0 +1,380 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCase +type EdiscoveryCase struct { + Case_escaped + // The user who closed the case. + closedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + closedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Returns a list of case ediscoveryCustodian objects for this case. + custodians []EdiscoveryCustodianable + // The external case number for customer reference. + externalId *string + // Returns a list of case eDiscoveryHoldPolicy objects for this case. + legalHolds []EdiscoveryHoldPolicyable + // Returns a list of case ediscoveryNoncustodialDataSource objects for this case. + noncustodialDataSources []EdiscoveryNoncustodialDataSourceable + // Returns a list of case caseOperation objects for this case. + operations []CaseOperationable + // Returns a list of eDiscoveryReviewSet objects in the case. + reviewSets []EdiscoveryReviewSetable + // Returns a list of eDiscoverySearch objects associated with this case. + searches []EdiscoverySearchable + // Returns a list of eDIscoverySettings objects in the case. + settings EdiscoveryCaseSettingsable + // Returns a list of ediscoveryReviewTag objects associated to this case. + tags []EdiscoveryReviewTagable +} +// NewEdiscoveryCase instantiates a new EdiscoveryCase and sets the default values. +func NewEdiscoveryCase()(*EdiscoveryCase) { + m := &EdiscoveryCase{ + Case_escaped: *NewCase_escaped(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryCase"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryCaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryCaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryCase(), nil +} +// GetClosedBy gets the closedBy property value. The user who closed the case. +func (m *EdiscoveryCase) GetClosedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.closedBy +} +// GetClosedDateTime gets the closedDateTime property value. The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EdiscoveryCase) GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.closedDateTime +} +// GetCustodians gets the custodians property value. Returns a list of case ediscoveryCustodian objects for this case. +func (m *EdiscoveryCase) GetCustodians()([]EdiscoveryCustodianable) { + return m.custodians +} +// GetExternalId gets the externalId property value. The external case number for customer reference. +func (m *EdiscoveryCase) GetExternalId()(*string) { + return m.externalId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryCase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Case_escaped.GetFieldDeserializers() + res["closedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetClosedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["closedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetClosedDateTime(val) + } + return nil + } + res["custodians"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryCustodianFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryCustodianable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryCustodianable) + } + m.SetCustodians(res) + } + return nil + } + res["externalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExternalId(val) + } + return nil + } + res["legalHolds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryHoldPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryHoldPolicyable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryHoldPolicyable) + } + m.SetLegalHolds(res) + } + return nil + } + res["noncustodialDataSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryNoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryNoncustodialDataSourceable) + } + m.SetNoncustodialDataSources(res) + } + return nil + } + res["operations"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateCaseOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]CaseOperationable, len(val)) + for i, v := range val { + res[i] = v.(CaseOperationable) + } + m.SetOperations(res) + } + return nil + } + res["reviewSets"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewSetable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewSetable) + } + m.SetReviewSets(res) + } + return nil + } + res["searches"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoverySearchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoverySearchable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoverySearchable) + } + m.SetSearches(res) + } + return nil + } + res["settings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryCaseSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSettings(val.(EdiscoveryCaseSettingsable)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewTagable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewTagable) + } + m.SetTags(res) + } + return nil + } + return res +} +// GetLegalHolds gets the legalHolds property value. Returns a list of case eDiscoveryHoldPolicy objects for this case. +func (m *EdiscoveryCase) GetLegalHolds()([]EdiscoveryHoldPolicyable) { + return m.legalHolds +} +// GetNoncustodialDataSources gets the noncustodialDataSources property value. Returns a list of case ediscoveryNoncustodialDataSource objects for this case. +func (m *EdiscoveryCase) GetNoncustodialDataSources()([]EdiscoveryNoncustodialDataSourceable) { + return m.noncustodialDataSources +} +// GetOperations gets the operations property value. Returns a list of case caseOperation objects for this case. +func (m *EdiscoveryCase) GetOperations()([]CaseOperationable) { + return m.operations +} +// GetReviewSets gets the reviewSets property value. Returns a list of eDiscoveryReviewSet objects in the case. +func (m *EdiscoveryCase) GetReviewSets()([]EdiscoveryReviewSetable) { + return m.reviewSets +} +// GetSearches gets the searches property value. Returns a list of eDiscoverySearch objects associated with this case. +func (m *EdiscoveryCase) GetSearches()([]EdiscoverySearchable) { + return m.searches +} +// GetSettings gets the settings property value. Returns a list of eDIscoverySettings objects in the case. +func (m *EdiscoveryCase) GetSettings()(EdiscoveryCaseSettingsable) { + return m.settings +} +// GetTags gets the tags property value. Returns a list of ediscoveryReviewTag objects associated to this case. +func (m *EdiscoveryCase) GetTags()([]EdiscoveryReviewTagable) { + return m.tags +} +// Serialize serializes information the current object +func (m *EdiscoveryCase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Case_escaped.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("closedBy", m.GetClosedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("closedDateTime", m.GetClosedDateTime()) + if err != nil { + return err + } + } + if m.GetCustodians() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustodians())) + for i, v := range m.GetCustodians() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("custodians", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("externalId", m.GetExternalId()) + if err != nil { + return err + } + } + if m.GetLegalHolds() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLegalHolds())) + for i, v := range m.GetLegalHolds() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("legalHolds", cast) + if err != nil { + return err + } + } + if m.GetNoncustodialDataSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNoncustodialDataSources())) + for i, v := range m.GetNoncustodialDataSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("noncustodialDataSources", cast) + if err != nil { + return err + } + } + if m.GetOperations() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOperations())) + for i, v := range m.GetOperations() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("operations", cast) + if err != nil { + return err + } + } + if m.GetReviewSets() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetReviewSets())) + for i, v := range m.GetReviewSets() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("reviewSets", cast) + if err != nil { + return err + } + } + if m.GetSearches() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSearches())) + for i, v := range m.GetSearches() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("searches", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("settings", m.GetSettings()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTags())) + for i, v := range m.GetTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tags", cast) + if err != nil { + return err + } + } + return nil +} +// SetClosedBy sets the closedBy property value. The user who closed the case. +func (m *EdiscoveryCase) SetClosedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.closedBy = value +} +// SetClosedDateTime sets the closedDateTime property value. The date and time when the case was closed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *EdiscoveryCase) SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.closedDateTime = value +} +// SetCustodians sets the custodians property value. Returns a list of case ediscoveryCustodian objects for this case. +func (m *EdiscoveryCase) SetCustodians(value []EdiscoveryCustodianable)() { + m.custodians = value +} +// SetExternalId sets the externalId property value. The external case number for customer reference. +func (m *EdiscoveryCase) SetExternalId(value *string)() { + m.externalId = value +} +// SetLegalHolds sets the legalHolds property value. Returns a list of case eDiscoveryHoldPolicy objects for this case. +func (m *EdiscoveryCase) SetLegalHolds(value []EdiscoveryHoldPolicyable)() { + m.legalHolds = value +} +// SetNoncustodialDataSources sets the noncustodialDataSources property value. Returns a list of case ediscoveryNoncustodialDataSource objects for this case. +func (m *EdiscoveryCase) SetNoncustodialDataSources(value []EdiscoveryNoncustodialDataSourceable)() { + m.noncustodialDataSources = value +} +// SetOperations sets the operations property value. Returns a list of case caseOperation objects for this case. +func (m *EdiscoveryCase) SetOperations(value []CaseOperationable)() { + m.operations = value +} +// SetReviewSets sets the reviewSets property value. Returns a list of eDiscoveryReviewSet objects in the case. +func (m *EdiscoveryCase) SetReviewSets(value []EdiscoveryReviewSetable)() { + m.reviewSets = value +} +// SetSearches sets the searches property value. Returns a list of eDiscoverySearch objects associated with this case. +func (m *EdiscoveryCase) SetSearches(value []EdiscoverySearchable)() { + m.searches = value +} +// SetSettings sets the settings property value. Returns a list of eDIscoverySettings objects in the case. +func (m *EdiscoveryCase) SetSettings(value EdiscoveryCaseSettingsable)() { + m.settings = value +} +// SetTags sets the tags property value. Returns a list of ediscoveryReviewTag objects associated to this case. +func (m *EdiscoveryCase) SetTags(value []EdiscoveryReviewTagable)() { + m.tags = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_response.go new file mode 100644 index 000000000..2c124da43 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCaseCollectionResponse +type EdiscoveryCaseCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryCaseable +} +// NewEdiscoveryCaseCollectionResponse instantiates a new EdiscoveryCaseCollectionResponse and sets the default values. +func NewEdiscoveryCaseCollectionResponse()(*EdiscoveryCaseCollectionResponse) { + m := &EdiscoveryCaseCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryCaseCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryCaseCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryCaseCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryCaseCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryCaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryCaseable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryCaseable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryCaseCollectionResponse) GetValue()([]EdiscoveryCaseable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryCaseCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryCaseCollectionResponse) SetValue(value []EdiscoveryCaseable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_responseable.go new file mode 100644 index 000000000..14a3b6df3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCaseCollectionResponseable +type EdiscoveryCaseCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryCaseable) + SetValue(value []EdiscoveryCaseable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settings.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settings.go new file mode 100644 index 000000000..624dd7b27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settings.go @@ -0,0 +1,113 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCaseSettings +type EdiscoveryCaseSettings struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The OCR (Optical Character Recognition) settings for the case. + ocr OcrSettingsable + // The redundancy (near duplicate and email threading) detection settings for the case. + redundancyDetection RedundancyDetectionSettingsable + // The Topic Modeling (Themes) settings for the case. + topicModeling TopicModelingSettingsable +} +// NewEdiscoveryCaseSettings instantiates a new ediscoveryCaseSettings and sets the default values. +func NewEdiscoveryCaseSettings()(*EdiscoveryCaseSettings) { + m := &EdiscoveryCaseSettings{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateEdiscoveryCaseSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryCaseSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryCaseSettings(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryCaseSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["ocr"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateOcrSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOcr(val.(OcrSettingsable)) + } + return nil + } + res["redundancyDetection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRedundancyDetectionSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRedundancyDetection(val.(RedundancyDetectionSettingsable)) + } + return nil + } + res["topicModeling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTopicModelingSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTopicModeling(val.(TopicModelingSettingsable)) + } + return nil + } + return res +} +// GetOcr gets the ocr property value. The OCR (Optical Character Recognition) settings for the case. +func (m *EdiscoveryCaseSettings) GetOcr()(OcrSettingsable) { + return m.ocr +} +// GetRedundancyDetection gets the redundancyDetection property value. The redundancy (near duplicate and email threading) detection settings for the case. +func (m *EdiscoveryCaseSettings) GetRedundancyDetection()(RedundancyDetectionSettingsable) { + return m.redundancyDetection +} +// GetTopicModeling gets the topicModeling property value. The Topic Modeling (Themes) settings for the case. +func (m *EdiscoveryCaseSettings) GetTopicModeling()(TopicModelingSettingsable) { + return m.topicModeling +} +// Serialize serializes information the current object +func (m *EdiscoveryCaseSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("ocr", m.GetOcr()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("redundancyDetection", m.GetRedundancyDetection()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("topicModeling", m.GetTopicModeling()) + if err != nil { + return err + } + } + return nil +} +// SetOcr sets the ocr property value. The OCR (Optical Character Recognition) settings for the case. +func (m *EdiscoveryCaseSettings) SetOcr(value OcrSettingsable)() { + m.ocr = value +} +// SetRedundancyDetection sets the redundancyDetection property value. The redundancy (near duplicate and email threading) detection settings for the case. +func (m *EdiscoveryCaseSettings) SetRedundancyDetection(value RedundancyDetectionSettingsable)() { + m.redundancyDetection = value +} +// SetTopicModeling sets the topicModeling property value. The Topic Modeling (Themes) settings for the case. +func (m *EdiscoveryCaseSettings) SetTopicModeling(value TopicModelingSettingsable)() { + m.topicModeling = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settingsable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settingsable.go new file mode 100644 index 000000000..2d7fa75b8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_case_settingsable.go @@ -0,0 +1,18 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCaseSettingsable +type EdiscoveryCaseSettingsable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOcr()(OcrSettingsable) + GetRedundancyDetection()(RedundancyDetectionSettingsable) + GetTopicModeling()(TopicModelingSettingsable) + SetOcr(value OcrSettingsable)() + SetRedundancyDetection(value RedundancyDetectionSettingsable)() + SetTopicModeling(value TopicModelingSettingsable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_caseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_caseable.go new file mode 100644 index 000000000..3c323e793 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_caseable.go @@ -0,0 +1,35 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCaseable +type EdiscoveryCaseable interface { + Case_escapedable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClosedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetClosedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustodians()([]EdiscoveryCustodianable) + GetExternalId()(*string) + GetLegalHolds()([]EdiscoveryHoldPolicyable) + GetNoncustodialDataSources()([]EdiscoveryNoncustodialDataSourceable) + GetOperations()([]CaseOperationable) + GetReviewSets()([]EdiscoveryReviewSetable) + GetSearches()([]EdiscoverySearchable) + GetSettings()(EdiscoveryCaseSettingsable) + GetTags()([]EdiscoveryReviewTagable) + SetClosedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetClosedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustodians(value []EdiscoveryCustodianable)() + SetExternalId(value *string)() + SetLegalHolds(value []EdiscoveryHoldPolicyable)() + SetNoncustodialDataSources(value []EdiscoveryNoncustodialDataSourceable)() + SetOperations(value []CaseOperationable)() + SetReviewSets(value []EdiscoveryReviewSetable)() + SetSearches(value []EdiscoverySearchable)() + SetSettings(value EdiscoveryCaseSettingsable)() + SetTags(value []EdiscoveryReviewTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian.go new file mode 100644 index 000000000..18da791d8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian.go @@ -0,0 +1,217 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryCustodian +type EdiscoveryCustodian struct { + DataSourceContainer + // Date and time the custodian acknowledged a hold notification. + acknowledgedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Email address of the custodian. + email *string + // Operation entity that represents the latest indexing for the custodian. + lastIndexOperation EdiscoveryIndexOperationable + // Data source entity for SharePoint sites associated with the custodian. + siteSources []SiteSourceable + // Data source entity for groups associated with the custodian. + unifiedGroupSources []UnifiedGroupSourceable + // Data source entity for a custodian. This is the container for a custodian's mailbox and OneDrive for Business site. + userSources []UserSourceable +} +// NewEdiscoveryCustodian instantiates a new EdiscoveryCustodian and sets the default values. +func NewEdiscoveryCustodian()(*EdiscoveryCustodian) { + m := &EdiscoveryCustodian{ + DataSourceContainer: *NewDataSourceContainer(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryCustodian"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryCustodianFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryCustodianFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryCustodian(), nil +} +// GetAcknowledgedDateTime gets the acknowledgedDateTime property value. Date and time the custodian acknowledged a hold notification. +func (m *EdiscoveryCustodian) GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.acknowledgedDateTime +} +// GetEmail gets the email property value. Email address of the custodian. +func (m *EdiscoveryCustodian) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryCustodian) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSourceContainer.GetFieldDeserializers() + res["acknowledgedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetAcknowledgedDateTime(val) + } + return nil + } + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["lastIndexOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryIndexOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastIndexOperation(val.(EdiscoveryIndexOperationable)) + } + return nil + } + res["siteSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetSiteSources(res) + } + return nil + } + res["unifiedGroupSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedGroupSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedGroupSourceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedGroupSourceable) + } + m.SetUnifiedGroupSources(res) + } + return nil + } + res["userSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetUserSources(res) + } + return nil + } + return res +} +// GetLastIndexOperation gets the lastIndexOperation property value. Operation entity that represents the latest indexing for the custodian. +func (m *EdiscoveryCustodian) GetLastIndexOperation()(EdiscoveryIndexOperationable) { + return m.lastIndexOperation +} +// GetSiteSources gets the siteSources property value. Data source entity for SharePoint sites associated with the custodian. +func (m *EdiscoveryCustodian) GetSiteSources()([]SiteSourceable) { + return m.siteSources +} +// GetUnifiedGroupSources gets the unifiedGroupSources property value. Data source entity for groups associated with the custodian. +func (m *EdiscoveryCustodian) GetUnifiedGroupSources()([]UnifiedGroupSourceable) { + return m.unifiedGroupSources +} +// GetUserSources gets the userSources property value. Data source entity for a custodian. This is the container for a custodian's mailbox and OneDrive for Business site. +func (m *EdiscoveryCustodian) GetUserSources()([]UserSourceable) { + return m.userSources +} +// Serialize serializes information the current object +func (m *EdiscoveryCustodian) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSourceContainer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("acknowledgedDateTime", m.GetAcknowledgedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastIndexOperation", m.GetLastIndexOperation()) + if err != nil { + return err + } + } + if m.GetSiteSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSiteSources())) + for i, v := range m.GetSiteSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("siteSources", cast) + if err != nil { + return err + } + } + if m.GetUnifiedGroupSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUnifiedGroupSources())) + for i, v := range m.GetUnifiedGroupSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("unifiedGroupSources", cast) + if err != nil { + return err + } + } + if m.GetUserSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserSources())) + for i, v := range m.GetUserSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetAcknowledgedDateTime sets the acknowledgedDateTime property value. Date and time the custodian acknowledged a hold notification. +func (m *EdiscoveryCustodian) SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.acknowledgedDateTime = value +} +// SetEmail sets the email property value. Email address of the custodian. +func (m *EdiscoveryCustodian) SetEmail(value *string)() { + m.email = value +} +// SetLastIndexOperation sets the lastIndexOperation property value. Operation entity that represents the latest indexing for the custodian. +func (m *EdiscoveryCustodian) SetLastIndexOperation(value EdiscoveryIndexOperationable)() { + m.lastIndexOperation = value +} +// SetSiteSources sets the siteSources property value. Data source entity for SharePoint sites associated with the custodian. +func (m *EdiscoveryCustodian) SetSiteSources(value []SiteSourceable)() { + m.siteSources = value +} +// SetUnifiedGroupSources sets the unifiedGroupSources property value. Data source entity for groups associated with the custodian. +func (m *EdiscoveryCustodian) SetUnifiedGroupSources(value []UnifiedGroupSourceable)() { + m.unifiedGroupSources = value +} +// SetUserSources sets the userSources property value. Data source entity for a custodian. This is the container for a custodian's mailbox and OneDrive for Business site. +func (m *EdiscoveryCustodian) SetUserSources(value []UserSourceable)() { + m.userSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_response.go new file mode 100644 index 000000000..13d8a09af --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCustodianCollectionResponse +type EdiscoveryCustodianCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryCustodianable +} +// NewEdiscoveryCustodianCollectionResponse instantiates a new EdiscoveryCustodianCollectionResponse and sets the default values. +func NewEdiscoveryCustodianCollectionResponse()(*EdiscoveryCustodianCollectionResponse) { + m := &EdiscoveryCustodianCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryCustodianCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryCustodianCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryCustodianCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryCustodianCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryCustodianFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryCustodianable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryCustodianable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryCustodianCollectionResponse) GetValue()([]EdiscoveryCustodianable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryCustodianCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryCustodianCollectionResponse) SetValue(value []EdiscoveryCustodianable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_responseable.go new file mode 100644 index 000000000..d1cfee303 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodian_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryCustodianCollectionResponseable +type EdiscoveryCustodianCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryCustodianable) + SetValue(value []EdiscoveryCustodianable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_custodianable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodianable.go new file mode 100644 index 000000000..db2f704b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_custodianable.go @@ -0,0 +1,24 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryCustodianable +type EdiscoveryCustodianable interface { + DataSourceContainerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAcknowledgedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetEmail()(*string) + GetLastIndexOperation()(EdiscoveryIndexOperationable) + GetSiteSources()([]SiteSourceable) + GetUnifiedGroupSources()([]UnifiedGroupSourceable) + GetUserSources()([]UserSourceable) + SetAcknowledgedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetEmail(value *string)() + SetLastIndexOperation(value EdiscoveryIndexOperationable)() + SetSiteSources(value []SiteSourceable)() + SetUnifiedGroupSources(value []UnifiedGroupSourceable)() + SetUserSources(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation.go new file mode 100644 index 000000000..57b455b65 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation.go @@ -0,0 +1,216 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryEstimateOperation +type EdiscoveryEstimateOperation struct { + CaseOperation + // The estimated count of items for the search that matched the content query. + indexedItemCount *int64 + // The estimated size of items for the search that matched the content query. + indexedItemsSize *int64 + // The number of mailboxes that had search hits. + mailboxCount *int32 + // eDiscovery search. + search EdiscoverySearchable + // The number of mailboxes that had search hits. + siteCount *int32 + // The estimated count of unindexed items for the collection. + unindexedItemCount *int64 + // The estimated size of unindexed items for the collection. + unindexedItemsSize *int64 +} +// NewEdiscoveryEstimateOperation instantiates a new ediscoveryEstimateOperation and sets the default values. +func NewEdiscoveryEstimateOperation()(*EdiscoveryEstimateOperation) { + m := &EdiscoveryEstimateOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryEstimateOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryEstimateOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryEstimateOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryEstimateOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["indexedItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIndexedItemCount(val) + } + return nil + } + res["indexedItemsSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetIndexedItemsSize(val) + } + return nil + } + res["mailboxCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMailboxCount(val) + } + return nil + } + res["search"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoverySearchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSearch(val.(EdiscoverySearchable)) + } + return nil + } + res["siteCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSiteCount(val) + } + return nil + } + res["unindexedItemCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnindexedItemCount(val) + } + return nil + } + res["unindexedItemsSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetUnindexedItemsSize(val) + } + return nil + } + return res +} +// GetIndexedItemCount gets the indexedItemCount property value. The estimated count of items for the search that matched the content query. +func (m *EdiscoveryEstimateOperation) GetIndexedItemCount()(*int64) { + return m.indexedItemCount +} +// GetIndexedItemsSize gets the indexedItemsSize property value. The estimated size of items for the search that matched the content query. +func (m *EdiscoveryEstimateOperation) GetIndexedItemsSize()(*int64) { + return m.indexedItemsSize +} +// GetMailboxCount gets the mailboxCount property value. The number of mailboxes that had search hits. +func (m *EdiscoveryEstimateOperation) GetMailboxCount()(*int32) { + return m.mailboxCount +} +// GetSearch gets the search property value. eDiscovery search. +func (m *EdiscoveryEstimateOperation) GetSearch()(EdiscoverySearchable) { + return m.search +} +// GetSiteCount gets the siteCount property value. The number of mailboxes that had search hits. +func (m *EdiscoveryEstimateOperation) GetSiteCount()(*int32) { + return m.siteCount +} +// GetUnindexedItemCount gets the unindexedItemCount property value. The estimated count of unindexed items for the collection. +func (m *EdiscoveryEstimateOperation) GetUnindexedItemCount()(*int64) { + return m.unindexedItemCount +} +// GetUnindexedItemsSize gets the unindexedItemsSize property value. The estimated size of unindexed items for the collection. +func (m *EdiscoveryEstimateOperation) GetUnindexedItemsSize()(*int64) { + return m.unindexedItemsSize +} +// Serialize serializes information the current object +func (m *EdiscoveryEstimateOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt64Value("indexedItemCount", m.GetIndexedItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("indexedItemsSize", m.GetIndexedItemsSize()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("mailboxCount", m.GetMailboxCount()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("search", m.GetSearch()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("siteCount", m.GetSiteCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("unindexedItemCount", m.GetUnindexedItemCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("unindexedItemsSize", m.GetUnindexedItemsSize()) + if err != nil { + return err + } + } + return nil +} +// SetIndexedItemCount sets the indexedItemCount property value. The estimated count of items for the search that matched the content query. +func (m *EdiscoveryEstimateOperation) SetIndexedItemCount(value *int64)() { + m.indexedItemCount = value +} +// SetIndexedItemsSize sets the indexedItemsSize property value. The estimated size of items for the search that matched the content query. +func (m *EdiscoveryEstimateOperation) SetIndexedItemsSize(value *int64)() { + m.indexedItemsSize = value +} +// SetMailboxCount sets the mailboxCount property value. The number of mailboxes that had search hits. +func (m *EdiscoveryEstimateOperation) SetMailboxCount(value *int32)() { + m.mailboxCount = value +} +// SetSearch sets the search property value. eDiscovery search. +func (m *EdiscoveryEstimateOperation) SetSearch(value EdiscoverySearchable)() { + m.search = value +} +// SetSiteCount sets the siteCount property value. The number of mailboxes that had search hits. +func (m *EdiscoveryEstimateOperation) SetSiteCount(value *int32)() { + m.siteCount = value +} +// SetUnindexedItemCount sets the unindexedItemCount property value. The estimated count of unindexed items for the collection. +func (m *EdiscoveryEstimateOperation) SetUnindexedItemCount(value *int64)() { + m.unindexedItemCount = value +} +// SetUnindexedItemsSize sets the unindexedItemsSize property value. The estimated size of unindexed items for the collection. +func (m *EdiscoveryEstimateOperation) SetUnindexedItemsSize(value *int64)() { + m.unindexedItemsSize = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_response.go new file mode 100644 index 000000000..b47dcffea --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryEstimateOperationCollectionResponse +type EdiscoveryEstimateOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryEstimateOperationable +} +// NewEdiscoveryEstimateOperationCollectionResponse instantiates a new EdiscoveryEstimateOperationCollectionResponse and sets the default values. +func NewEdiscoveryEstimateOperationCollectionResponse()(*EdiscoveryEstimateOperationCollectionResponse) { + m := &EdiscoveryEstimateOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryEstimateOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryEstimateOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryEstimateOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryEstimateOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryEstimateOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryEstimateOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryEstimateOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryEstimateOperationCollectionResponse) GetValue()([]EdiscoveryEstimateOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryEstimateOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryEstimateOperationCollectionResponse) SetValue(value []EdiscoveryEstimateOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_responseable.go new file mode 100644 index 000000000..fadf40f4e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryEstimateOperationCollectionResponseable +type EdiscoveryEstimateOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryEstimateOperationable) + SetValue(value []EdiscoveryEstimateOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operationable.go new file mode 100644 index 000000000..7514ec47c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_estimate_operationable.go @@ -0,0 +1,25 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryEstimateOperationable +type EdiscoveryEstimateOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIndexedItemCount()(*int64) + GetIndexedItemsSize()(*int64) + GetMailboxCount()(*int32) + GetSearch()(EdiscoverySearchable) + GetSiteCount()(*int32) + GetUnindexedItemCount()(*int64) + GetUnindexedItemsSize()(*int64) + SetIndexedItemCount(value *int64)() + SetIndexedItemsSize(value *int64)() + SetMailboxCount(value *int32)() + SetSearch(value EdiscoverySearchable)() + SetSiteCount(value *int32)() + SetUnindexedItemCount(value *int64)() + SetUnindexedItemsSize(value *int64)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation.go new file mode 100644 index 000000000..81c22a684 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation.go @@ -0,0 +1,270 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryExportOperation +type EdiscoveryExportOperation struct { + CaseOperation + // The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. + azureBlobContainer *string + // The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. + azureBlobToken *string + // The description provided for the export. + description *string + // The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. + exportOptions *ExportOptions + // The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. + exportStructure *ExportFileStructure + // The outputFolderId property + outputFolderId *string + // The name provided for the export. + outputName *string + // Review set from where documents are exported. + reviewSet EdiscoveryReviewSetable + // The review set query which is used to filter the documents for export. + reviewSetQuery EdiscoveryReviewSetQueryable +} +// NewEdiscoveryExportOperation instantiates a new EdiscoveryExportOperation and sets the default values. +func NewEdiscoveryExportOperation()(*EdiscoveryExportOperation) { + m := &EdiscoveryExportOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryExportOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryExportOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryExportOperation(), nil +} +// GetAzureBlobContainer gets the azureBlobContainer property value. The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. +func (m *EdiscoveryExportOperation) GetAzureBlobContainer()(*string) { + return m.azureBlobContainer +} +// GetAzureBlobToken gets the azureBlobToken property value. The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. +func (m *EdiscoveryExportOperation) GetAzureBlobToken()(*string) { + return m.azureBlobToken +} +// GetDescription gets the description property value. The description provided for the export. +func (m *EdiscoveryExportOperation) GetDescription()(*string) { + return m.description +} +// GetExportOptions gets the exportOptions property value. The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. +func (m *EdiscoveryExportOperation) GetExportOptions()(*ExportOptions) { + return m.exportOptions +} +// GetExportStructure gets the exportStructure property value. The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. +func (m *EdiscoveryExportOperation) GetExportStructure()(*ExportFileStructure) { + return m.exportStructure +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryExportOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + res["azureBlobContainer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureBlobContainer(val) + } + return nil + } + res["azureBlobToken"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureBlobToken(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["exportOptions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExportOptions) + if err != nil { + return err + } + if val != nil { + m.SetExportOptions(val.(*ExportOptions)) + } + return nil + } + res["exportStructure"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExportFileStructure) + if err != nil { + return err + } + if val != nil { + m.SetExportStructure(val.(*ExportFileStructure)) + } + return nil + } + res["outputFolderId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputFolderId(val) + } + return nil + } + res["outputName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetOutputName(val) + } + return nil + } + res["reviewSet"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewSet(val.(EdiscoveryReviewSetable)) + } + return nil + } + res["reviewSetQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryReviewSetQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetReviewSetQuery(val.(EdiscoveryReviewSetQueryable)) + } + return nil + } + return res +} +// GetOutputFolderId gets the outputFolderId property value. The outputFolderId property +func (m *EdiscoveryExportOperation) GetOutputFolderId()(*string) { + return m.outputFolderId +} +// GetOutputName gets the outputName property value. The name provided for the export. +func (m *EdiscoveryExportOperation) GetOutputName()(*string) { + return m.outputName +} +// GetReviewSet gets the reviewSet property value. Review set from where documents are exported. +func (m *EdiscoveryExportOperation) GetReviewSet()(EdiscoveryReviewSetable) { + return m.reviewSet +} +// GetReviewSetQuery gets the reviewSetQuery property value. The review set query which is used to filter the documents for export. +func (m *EdiscoveryExportOperation) GetReviewSetQuery()(EdiscoveryReviewSetQueryable) { + return m.reviewSetQuery +} +// Serialize serializes information the current object +func (m *EdiscoveryExportOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("azureBlobContainer", m.GetAzureBlobContainer()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureBlobToken", m.GetAzureBlobToken()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + if m.GetExportOptions() != nil { + cast := (*m.GetExportOptions()).String() + err = writer.WriteStringValue("exportOptions", &cast) + if err != nil { + return err + } + } + if m.GetExportStructure() != nil { + cast := (*m.GetExportStructure()).String() + err = writer.WriteStringValue("exportStructure", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outputFolderId", m.GetOutputFolderId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("outputName", m.GetOutputName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewSet", m.GetReviewSet()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("reviewSetQuery", m.GetReviewSetQuery()) + if err != nil { + return err + } + } + return nil +} +// SetAzureBlobContainer sets the azureBlobContainer property value. The name of the Azure storage location where the export will be stored. This only applies to exports stored in your own Azure storage location. +func (m *EdiscoveryExportOperation) SetAzureBlobContainer(value *string)() { + m.azureBlobContainer = value +} +// SetAzureBlobToken sets the azureBlobToken property value. The SAS token for the Azure storage location. This only applies to exports stored in your own Azure storage location. +func (m *EdiscoveryExportOperation) SetAzureBlobToken(value *string)() { + m.azureBlobToken = value +} +// SetDescription sets the description property value. The description provided for the export. +func (m *EdiscoveryExportOperation) SetDescription(value *string)() { + m.description = value +} +// SetExportOptions sets the exportOptions property value. The options provided for the export. For more details, see reviewSet: export. Possible values are: originalFiles, text, pdfReplacement, fileInfo, tags. +func (m *EdiscoveryExportOperation) SetExportOptions(value *ExportOptions)() { + m.exportOptions = value +} +// SetExportStructure sets the exportStructure property value. The options provided that specify the structure of the export. For more details, see reviewSet: export. Possible values are: none, directory, pst. +func (m *EdiscoveryExportOperation) SetExportStructure(value *ExportFileStructure)() { + m.exportStructure = value +} +// SetOutputFolderId sets the outputFolderId property value. The outputFolderId property +func (m *EdiscoveryExportOperation) SetOutputFolderId(value *string)() { + m.outputFolderId = value +} +// SetOutputName sets the outputName property value. The name provided for the export. +func (m *EdiscoveryExportOperation) SetOutputName(value *string)() { + m.outputName = value +} +// SetReviewSet sets the reviewSet property value. Review set from where documents are exported. +func (m *EdiscoveryExportOperation) SetReviewSet(value EdiscoveryReviewSetable)() { + m.reviewSet = value +} +// SetReviewSetQuery sets the reviewSetQuery property value. The review set query which is used to filter the documents for export. +func (m *EdiscoveryExportOperation) SetReviewSetQuery(value EdiscoveryReviewSetQueryable)() { + m.reviewSetQuery = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_response.go new file mode 100644 index 000000000..4623f5b1f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryExportOperationCollectionResponse +type EdiscoveryExportOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryExportOperationable +} +// NewEdiscoveryExportOperationCollectionResponse instantiates a new EdiscoveryExportOperationCollectionResponse and sets the default values. +func NewEdiscoveryExportOperationCollectionResponse()(*EdiscoveryExportOperationCollectionResponse) { + m := &EdiscoveryExportOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryExportOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryExportOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryExportOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryExportOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryExportOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryExportOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryExportOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryExportOperationCollectionResponse) GetValue()([]EdiscoveryExportOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryExportOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryExportOperationCollectionResponse) SetValue(value []EdiscoveryExportOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_responseable.go new file mode 100644 index 000000000..15afc5ad6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryExportOperationCollectionResponseable +type EdiscoveryExportOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryExportOperationable) + SetValue(value []EdiscoveryExportOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operationable.go new file mode 100644 index 000000000..1f9adfeac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_export_operationable.go @@ -0,0 +1,29 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryExportOperationable +type EdiscoveryExportOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAzureBlobContainer()(*string) + GetAzureBlobToken()(*string) + GetDescription()(*string) + GetExportOptions()(*ExportOptions) + GetExportStructure()(*ExportFileStructure) + GetOutputFolderId()(*string) + GetOutputName()(*string) + GetReviewSet()(EdiscoveryReviewSetable) + GetReviewSetQuery()(EdiscoveryReviewSetQueryable) + SetAzureBlobContainer(value *string)() + SetAzureBlobToken(value *string)() + SetDescription(value *string)() + SetExportOptions(value *ExportOptions)() + SetExportStructure(value *ExportFileStructure)() + SetOutputFolderId(value *string)() + SetOutputName(value *string)() + SetReviewSet(value EdiscoveryReviewSetable)() + SetReviewSetQuery(value EdiscoveryReviewSetQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_file.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_file.go new file mode 100644 index 000000000..248129643 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_file.go @@ -0,0 +1,94 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryFile +type EdiscoveryFile struct { + File + // Custodians associated with the file. + custodian EdiscoveryCustodianable + // Tags associated with the file. + tags []EdiscoveryReviewTagable +} +// NewEdiscoveryFile instantiates a new EdiscoveryFile and sets the default values. +func NewEdiscoveryFile()(*EdiscoveryFile) { + m := &EdiscoveryFile{ + File: *NewFile(), + } + return m +} +// CreateEdiscoveryFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryFile(), nil +} +// GetCustodian gets the custodian property value. Custodians associated with the file. +func (m *EdiscoveryFile) GetCustodian()(EdiscoveryCustodianable) { + return m.custodian +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.File.GetFieldDeserializers() + res["custodian"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryCustodianFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustodian(val.(EdiscoveryCustodianable)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewTagable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewTagable) + } + m.SetTags(res) + } + return nil + } + return res +} +// GetTags gets the tags property value. Tags associated with the file. +func (m *EdiscoveryFile) GetTags()([]EdiscoveryReviewTagable) { + return m.tags +} +// Serialize serializes information the current object +func (m *EdiscoveryFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.File.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("custodian", m.GetCustodian()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTags())) + for i, v := range m.GetTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tags", cast) + if err != nil { + return err + } + } + return nil +} +// SetCustodian sets the custodian property value. Custodians associated with the file. +func (m *EdiscoveryFile) SetCustodian(value EdiscoveryCustodianable)() { + m.custodian = value +} +// SetTags sets the tags property value. Tags associated with the file. +func (m *EdiscoveryFile) SetTags(value []EdiscoveryReviewTagable)() { + m.tags = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_response.go new file mode 100644 index 000000000..d4b3a09c4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryFileCollectionResponse +type EdiscoveryFileCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryFileable +} +// NewEdiscoveryFileCollectionResponse instantiates a new EdiscoveryFileCollectionResponse and sets the default values. +func NewEdiscoveryFileCollectionResponse()(*EdiscoveryFileCollectionResponse) { + m := &EdiscoveryFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryFileable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryFileCollectionResponse) GetValue()([]EdiscoveryFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryFileCollectionResponse) SetValue(value []EdiscoveryFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_responseable.go new file mode 100644 index 000000000..4619b320f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_file_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryFileCollectionResponseable +type EdiscoveryFileCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryFileable) + SetValue(value []EdiscoveryFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_fileable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_fileable.go new file mode 100644 index 000000000..1e4b13973 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_fileable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryFileable +type EdiscoveryFileable interface { + Fileable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustodian()(EdiscoveryCustodianable) + GetTags()([]EdiscoveryReviewTagable) + SetCustodian(value EdiscoveryCustodianable)() + SetTags(value []EdiscoveryReviewTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation.go new file mode 100644 index 000000000..567093917 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation.go @@ -0,0 +1,34 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryHoldOperation +type EdiscoveryHoldOperation struct { + CaseOperation +} +// NewEdiscoveryHoldOperation instantiates a new EdiscoveryHoldOperation and sets the default values. +func NewEdiscoveryHoldOperation()(*EdiscoveryHoldOperation) { + m := &EdiscoveryHoldOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryHoldOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryHoldOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryHoldOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryHoldOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdiscoveryHoldOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_response.go new file mode 100644 index 000000000..bc2a760d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryHoldOperationCollectionResponse +type EdiscoveryHoldOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryHoldOperationable +} +// NewEdiscoveryHoldOperationCollectionResponse instantiates a new EdiscoveryHoldOperationCollectionResponse and sets the default values. +func NewEdiscoveryHoldOperationCollectionResponse()(*EdiscoveryHoldOperationCollectionResponse) { + m := &EdiscoveryHoldOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryHoldOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryHoldOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryHoldOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryHoldOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryHoldOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryHoldOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryHoldOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryHoldOperationCollectionResponse) GetValue()([]EdiscoveryHoldOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryHoldOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryHoldOperationCollectionResponse) SetValue(value []EdiscoveryHoldOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_responseable.go new file mode 100644 index 000000000..87c9647b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryHoldOperationCollectionResponseable +type EdiscoveryHoldOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryHoldOperationable) + SetValue(value []EdiscoveryHoldOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operationable.go new file mode 100644 index 000000000..1a745b1cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_operationable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryHoldOperationable +type EdiscoveryHoldOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy.go new file mode 100644 index 000000000..f4897e85c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy.go @@ -0,0 +1,186 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryHoldPolicy +type EdiscoveryHoldPolicy struct { + PolicyBase + // KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. + contentQuery *string + // Lists any errors that happened while placing the hold. + errors []string + // Indicates whether the hold is enabled and actively holding content. + isEnabled *bool + // Data sources that represent SharePoint sites. + siteSources []SiteSourceable + // Data sources that represent Exchange mailboxes. + userSources []UserSourceable +} +// NewEdiscoveryHoldPolicy instantiates a new EdiscoveryHoldPolicy and sets the default values. +func NewEdiscoveryHoldPolicy()(*EdiscoveryHoldPolicy) { + m := &EdiscoveryHoldPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryHoldPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryHoldPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryHoldPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryHoldPolicy(), nil +} +// GetContentQuery gets the contentQuery property value. KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. +func (m *EdiscoveryHoldPolicy) GetContentQuery()(*string) { + return m.contentQuery +} +// GetErrors gets the errors property value. Lists any errors that happened while placing the hold. +func (m *EdiscoveryHoldPolicy) GetErrors()([]string) { + return m.errors +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryHoldPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["contentQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentQuery(val) + } + return nil + } + res["errors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetErrors(res) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["siteSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetSiteSources(res) + } + return nil + } + res["userSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetUserSources(res) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether the hold is enabled and actively holding content. +func (m *EdiscoveryHoldPolicy) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetSiteSources gets the siteSources property value. Data sources that represent SharePoint sites. +func (m *EdiscoveryHoldPolicy) GetSiteSources()([]SiteSourceable) { + return m.siteSources +} +// GetUserSources gets the userSources property value. Data sources that represent Exchange mailboxes. +func (m *EdiscoveryHoldPolicy) GetUserSources()([]UserSourceable) { + return m.userSources +} +// Serialize serializes information the current object +func (m *EdiscoveryHoldPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentQuery", m.GetContentQuery()) + if err != nil { + return err + } + } + if m.GetErrors() != nil { + err = writer.WriteCollectionOfStringValues("errors", m.GetErrors()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + if m.GetSiteSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSiteSources())) + for i, v := range m.GetSiteSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("siteSources", cast) + if err != nil { + return err + } + } + if m.GetUserSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUserSources())) + for i, v := range m.GetUserSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("userSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetContentQuery sets the contentQuery property value. KQL query that specifies content to be held in the specified locations. To learn more, see Keyword queries and search conditions for Content Search and eDiscovery. To hold all content in the specified locations, leave contentQuery blank. +func (m *EdiscoveryHoldPolicy) SetContentQuery(value *string)() { + m.contentQuery = value +} +// SetErrors sets the errors property value. Lists any errors that happened while placing the hold. +func (m *EdiscoveryHoldPolicy) SetErrors(value []string)() { + m.errors = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether the hold is enabled and actively holding content. +func (m *EdiscoveryHoldPolicy) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetSiteSources sets the siteSources property value. Data sources that represent SharePoint sites. +func (m *EdiscoveryHoldPolicy) SetSiteSources(value []SiteSourceable)() { + m.siteSources = value +} +// SetUserSources sets the userSources property value. Data sources that represent Exchange mailboxes. +func (m *EdiscoveryHoldPolicy) SetUserSources(value []UserSourceable)() { + m.userSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_response.go new file mode 100644 index 000000000..0c9360a7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryHoldPolicyCollectionResponse +type EdiscoveryHoldPolicyCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryHoldPolicyable +} +// NewEdiscoveryHoldPolicyCollectionResponse instantiates a new EdiscoveryHoldPolicyCollectionResponse and sets the default values. +func NewEdiscoveryHoldPolicyCollectionResponse()(*EdiscoveryHoldPolicyCollectionResponse) { + m := &EdiscoveryHoldPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryHoldPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryHoldPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryHoldPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryHoldPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryHoldPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryHoldPolicyable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryHoldPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryHoldPolicyCollectionResponse) GetValue()([]EdiscoveryHoldPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryHoldPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryHoldPolicyCollectionResponse) SetValue(value []EdiscoveryHoldPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_responseable.go new file mode 100644 index 000000000..a51e03014 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policy_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryHoldPolicyCollectionResponseable +type EdiscoveryHoldPolicyCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryHoldPolicyable) + SetValue(value []EdiscoveryHoldPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policyable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policyable.go new file mode 100644 index 000000000..f96bb62f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_hold_policyable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryHoldPolicyable +type EdiscoveryHoldPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetContentQuery()(*string) + GetErrors()([]string) + GetIsEnabled()(*bool) + GetSiteSources()([]SiteSourceable) + GetUserSources()([]UserSourceable) + SetContentQuery(value *string)() + SetErrors(value []string)() + SetIsEnabled(value *bool)() + SetSiteSources(value []SiteSourceable)() + SetUserSources(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation.go new file mode 100644 index 000000000..9d4bafbf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation.go @@ -0,0 +1,34 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryIndexOperation +type EdiscoveryIndexOperation struct { + CaseOperation +} +// NewEdiscoveryIndexOperation instantiates a new ediscoveryIndexOperation and sets the default values. +func NewEdiscoveryIndexOperation()(*EdiscoveryIndexOperation) { + m := &EdiscoveryIndexOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryIndexOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryIndexOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryIndexOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryIndexOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdiscoveryIndexOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_response.go new file mode 100644 index 000000000..f0a178dfc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryIndexOperationCollectionResponse +type EdiscoveryIndexOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryIndexOperationable +} +// NewEdiscoveryIndexOperationCollectionResponse instantiates a new EdiscoveryIndexOperationCollectionResponse and sets the default values. +func NewEdiscoveryIndexOperationCollectionResponse()(*EdiscoveryIndexOperationCollectionResponse) { + m := &EdiscoveryIndexOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryIndexOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryIndexOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryIndexOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryIndexOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryIndexOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryIndexOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryIndexOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryIndexOperationCollectionResponse) GetValue()([]EdiscoveryIndexOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryIndexOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryIndexOperationCollectionResponse) SetValue(value []EdiscoveryIndexOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_responseable.go new file mode 100644 index 000000000..0d848aec9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryIndexOperationCollectionResponseable +type EdiscoveryIndexOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryIndexOperationable) + SetValue(value []EdiscoveryIndexOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operationable.go new file mode 100644 index 000000000..3478bb5dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_index_operationable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryIndexOperationable +type EdiscoveryIndexOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source.go new file mode 100644 index 000000000..08cd83356 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source.go @@ -0,0 +1,88 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryNoncustodialDataSource provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EdiscoveryNoncustodialDataSource struct { + DataSourceContainer + // User source or SharePoint site data source as non-custodial data source. + dataSource DataSourceable + // Operation entity that represents the latest indexing for the non-custodial data source. + lastIndexOperation EdiscoveryIndexOperationable +} +// NewEdiscoveryNoncustodialDataSource instantiates a new ediscoveryNoncustodialDataSource and sets the default values. +func NewEdiscoveryNoncustodialDataSource()(*EdiscoveryNoncustodialDataSource) { + m := &EdiscoveryNoncustodialDataSource{ + DataSourceContainer: *NewDataSourceContainer(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryNoncustodialDataSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryNoncustodialDataSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryNoncustodialDataSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryNoncustodialDataSource(), nil +} +// GetDataSource gets the dataSource property value. User source or SharePoint site data source as non-custodial data source. +func (m *EdiscoveryNoncustodialDataSource) GetDataSource()(DataSourceable) { + return m.dataSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryNoncustodialDataSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSourceContainer.GetFieldDeserializers() + res["dataSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDataSource(val.(DataSourceable)) + } + return nil + } + res["lastIndexOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryIndexOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastIndexOperation(val.(EdiscoveryIndexOperationable)) + } + return nil + } + return res +} +// GetLastIndexOperation gets the lastIndexOperation property value. Operation entity that represents the latest indexing for the non-custodial data source. +func (m *EdiscoveryNoncustodialDataSource) GetLastIndexOperation()(EdiscoveryIndexOperationable) { + return m.lastIndexOperation +} +// Serialize serializes information the current object +func (m *EdiscoveryNoncustodialDataSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSourceContainer.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("dataSource", m.GetDataSource()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastIndexOperation", m.GetLastIndexOperation()) + if err != nil { + return err + } + } + return nil +} +// SetDataSource sets the dataSource property value. User source or SharePoint site data source as non-custodial data source. +func (m *EdiscoveryNoncustodialDataSource) SetDataSource(value DataSourceable)() { + m.dataSource = value +} +// SetLastIndexOperation sets the lastIndexOperation property value. Operation entity that represents the latest indexing for the non-custodial data source. +func (m *EdiscoveryNoncustodialDataSource) SetLastIndexOperation(value EdiscoveryIndexOperationable)() { + m.lastIndexOperation = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_response.go new file mode 100644 index 000000000..4a32da344 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryNoncustodialDataSourceCollectionResponse +type EdiscoveryNoncustodialDataSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryNoncustodialDataSourceable +} +// NewEdiscoveryNoncustodialDataSourceCollectionResponse instantiates a new EdiscoveryNoncustodialDataSourceCollectionResponse and sets the default values. +func NewEdiscoveryNoncustodialDataSourceCollectionResponse()(*EdiscoveryNoncustodialDataSourceCollectionResponse) { + m := &EdiscoveryNoncustodialDataSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryNoncustodialDataSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryNoncustodialDataSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryNoncustodialDataSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryNoncustodialDataSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryNoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryNoncustodialDataSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryNoncustodialDataSourceCollectionResponse) GetValue()([]EdiscoveryNoncustodialDataSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryNoncustodialDataSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryNoncustodialDataSourceCollectionResponse) SetValue(value []EdiscoveryNoncustodialDataSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_responseable.go new file mode 100644 index 000000000..380c04678 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_source_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryNoncustodialDataSourceCollectionResponseable +type EdiscoveryNoncustodialDataSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryNoncustodialDataSourceable) + SetValue(value []EdiscoveryNoncustodialDataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_sourceable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_sourceable.go new file mode 100644 index 000000000..5f0092877 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_noncustodial_data_sourceable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryNoncustodialDataSourceable +type EdiscoveryNoncustodialDataSourceable interface { + DataSourceContainerable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataSource()(DataSourceable) + GetLastIndexOperation()(EdiscoveryIndexOperationable) + SetDataSource(value DataSourceable)() + SetLastIndexOperation(value EdiscoveryIndexOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation.go new file mode 100644 index 000000000..99930c24d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation.go @@ -0,0 +1,34 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryPurgeDataOperation +type EdiscoveryPurgeDataOperation struct { + CaseOperation +} +// NewEdiscoveryPurgeDataOperation instantiates a new EdiscoveryPurgeDataOperation and sets the default values. +func NewEdiscoveryPurgeDataOperation()(*EdiscoveryPurgeDataOperation) { + m := &EdiscoveryPurgeDataOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryPurgeDataOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryPurgeDataOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryPurgeDataOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryPurgeDataOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdiscoveryPurgeDataOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_response.go new file mode 100644 index 000000000..58949f680 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryPurgeDataOperationCollectionResponse +type EdiscoveryPurgeDataOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryPurgeDataOperationable +} +// NewEdiscoveryPurgeDataOperationCollectionResponse instantiates a new EdiscoveryPurgeDataOperationCollectionResponse and sets the default values. +func NewEdiscoveryPurgeDataOperationCollectionResponse()(*EdiscoveryPurgeDataOperationCollectionResponse) { + m := &EdiscoveryPurgeDataOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryPurgeDataOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryPurgeDataOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryPurgeDataOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryPurgeDataOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryPurgeDataOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryPurgeDataOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryPurgeDataOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryPurgeDataOperationCollectionResponse) GetValue()([]EdiscoveryPurgeDataOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryPurgeDataOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryPurgeDataOperationCollectionResponse) SetValue(value []EdiscoveryPurgeDataOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_responseable.go new file mode 100644 index 000000000..fcfd3c9a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryPurgeDataOperationCollectionResponseable +type EdiscoveryPurgeDataOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryPurgeDataOperationable) + SetValue(value []EdiscoveryPurgeDataOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operationable.go new file mode 100644 index 000000000..d4a3af834 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_purge_data_operationable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryPurgeDataOperationable +type EdiscoveryPurgeDataOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set.go new file mode 100644 index 000000000..576b1b419 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set.go @@ -0,0 +1,104 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewSet +type EdiscoveryReviewSet struct { + DataSet + // Represents files within the review set. + files []EdiscoveryFileable + // Represents queries within the review set. + queries []EdiscoveryReviewSetQueryable +} +// NewEdiscoveryReviewSet instantiates a new EdiscoveryReviewSet and sets the default values. +func NewEdiscoveryReviewSet()(*EdiscoveryReviewSet) { + m := &EdiscoveryReviewSet{ + DataSet: *NewDataSet(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryReviewSet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryReviewSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewSet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSet.GetFieldDeserializers() + res["files"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryFileable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryFileable) + } + m.SetFiles(res) + } + return nil + } + res["queries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewSetQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewSetQueryable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewSetQueryable) + } + m.SetQueries(res) + } + return nil + } + return res +} +// GetFiles gets the files property value. Represents files within the review set. +func (m *EdiscoveryReviewSet) GetFiles()([]EdiscoveryFileable) { + return m.files +} +// GetQueries gets the queries property value. Represents queries within the review set. +func (m *EdiscoveryReviewSet) GetQueries()([]EdiscoveryReviewSetQueryable) { + return m.queries +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSet.Serialize(writer) + if err != nil { + return err + } + if m.GetFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFiles())) + for i, v := range m.GetFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("files", cast) + if err != nil { + return err + } + } + if m.GetQueries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetQueries())) + for i, v := range m.GetQueries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("queries", cast) + if err != nil { + return err + } + } + return nil +} +// SetFiles sets the files property value. Represents files within the review set. +func (m *EdiscoveryReviewSet) SetFiles(value []EdiscoveryFileable)() { + m.files = value +} +// SetQueries sets the queries property value. Represents queries within the review set. +func (m *EdiscoveryReviewSet) SetQueries(value []EdiscoveryReviewSetQueryable)() { + m.queries = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_response.go new file mode 100644 index 000000000..385d4eee2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewSetCollectionResponse +type EdiscoveryReviewSetCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryReviewSetable +} +// NewEdiscoveryReviewSetCollectionResponse instantiates a new EdiscoveryReviewSetCollectionResponse and sets the default values. +func NewEdiscoveryReviewSetCollectionResponse()(*EdiscoveryReviewSetCollectionResponse) { + m := &EdiscoveryReviewSetCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryReviewSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewSetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewSetable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewSetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryReviewSetCollectionResponse) GetValue()([]EdiscoveryReviewSetable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewSetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryReviewSetCollectionResponse) SetValue(value []EdiscoveryReviewSetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_responseable.go new file mode 100644 index 000000000..ebced4ca5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewSetCollectionResponseable +type EdiscoveryReviewSetCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryReviewSetable) + SetValue(value []EdiscoveryReviewSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query.go new file mode 100644 index 000000000..d99355000 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewSetQuery +type EdiscoveryReviewSetQuery struct { + Search +} +// NewEdiscoveryReviewSetQuery instantiates a new EdiscoveryReviewSetQuery and sets the default values. +func NewEdiscoveryReviewSetQuery()(*EdiscoveryReviewSetQuery) { + m := &EdiscoveryReviewSetQuery{ + Search: *NewSearch(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryReviewSetQuery"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryReviewSetQueryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewSetQueryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewSetQuery(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewSetQuery) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Search.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewSetQuery) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Search.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_response.go new file mode 100644 index 000000000..ef02f882d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewSetQueryCollectionResponse +type EdiscoveryReviewSetQueryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryReviewSetQueryable +} +// NewEdiscoveryReviewSetQueryCollectionResponse instantiates a new EdiscoveryReviewSetQueryCollectionResponse and sets the default values. +func NewEdiscoveryReviewSetQueryCollectionResponse()(*EdiscoveryReviewSetQueryCollectionResponse) { + m := &EdiscoveryReviewSetQueryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryReviewSetQueryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewSetQueryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewSetQueryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewSetQueryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewSetQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewSetQueryable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewSetQueryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryReviewSetQueryCollectionResponse) GetValue()([]EdiscoveryReviewSetQueryable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewSetQueryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryReviewSetQueryCollectionResponse) SetValue(value []EdiscoveryReviewSetQueryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_responseable.go new file mode 100644 index 000000000..5cb8152df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_query_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewSetQueryCollectionResponseable +type EdiscoveryReviewSetQueryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryReviewSetQueryable) + SetValue(value []EdiscoveryReviewSetQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_queryable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_queryable.go new file mode 100644 index 000000000..a1d871dbb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_set_queryable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewSetQueryable +type EdiscoveryReviewSetQueryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Searchable +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_setable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_setable.go new file mode 100644 index 000000000..1ed372afd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_setable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewSetable +type EdiscoveryReviewSetable interface { + DataSetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFiles()([]EdiscoveryFileable) + GetQueries()([]EdiscoveryReviewSetQueryable) + SetFiles(value []EdiscoveryFileable)() + SetQueries(value []EdiscoveryReviewSetQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag.go new file mode 100644 index 000000000..358723ec5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag.go @@ -0,0 +1,123 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewTag +type EdiscoveryReviewTag struct { + Tag + // Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. + childSelectability *ChildSelectability + // Returns the tags that are a child of a tag. + childTags []EdiscoveryReviewTagable + // Returns the parent tag of the specified tag. + parent EdiscoveryReviewTagable +} +// NewEdiscoveryReviewTag instantiates a new EdiscoveryReviewTag and sets the default values. +func NewEdiscoveryReviewTag()(*EdiscoveryReviewTag) { + m := &EdiscoveryReviewTag{ + Tag: *NewTag(), + } + odataTypeValue := "#microsoft.graph.security.ediscoveryReviewTag"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoveryReviewTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewTag(), nil +} +// GetChildSelectability gets the childSelectability property value. Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. +func (m *EdiscoveryReviewTag) GetChildSelectability()(*ChildSelectability) { + return m.childSelectability +} +// GetChildTags gets the childTags property value. Returns the tags that are a child of a tag. +func (m *EdiscoveryReviewTag) GetChildTags()([]EdiscoveryReviewTagable) { + return m.childTags +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewTag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Tag.GetFieldDeserializers() + res["childSelectability"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseChildSelectability) + if err != nil { + return err + } + if val != nil { + m.SetChildSelectability(val.(*ChildSelectability)) + } + return nil + } + res["childTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewTagable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewTagable) + } + m.SetChildTags(res) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryReviewTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(EdiscoveryReviewTagable)) + } + return nil + } + return res +} +// GetParent gets the parent property value. Returns the parent tag of the specified tag. +func (m *EdiscoveryReviewTag) GetParent()(EdiscoveryReviewTagable) { + return m.parent +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewTag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Tag.Serialize(writer) + if err != nil { + return err + } + if m.GetChildSelectability() != nil { + cast := (*m.GetChildSelectability()).String() + err = writer.WriteStringValue("childSelectability", &cast) + if err != nil { + return err + } + } + if m.GetChildTags() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetChildTags())) + for i, v := range m.GetChildTags() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("childTags", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + return nil +} +// SetChildSelectability sets the childSelectability property value. Indicates whether a single or multiple child tags can be associated with a document. Possible values are: One, Many. This value controls whether the UX presents the tags as checkboxes or a radio button group. +func (m *EdiscoveryReviewTag) SetChildSelectability(value *ChildSelectability)() { + m.childSelectability = value +} +// SetChildTags sets the childTags property value. Returns the tags that are a child of a tag. +func (m *EdiscoveryReviewTag) SetChildTags(value []EdiscoveryReviewTagable)() { + m.childTags = value +} +// SetParent sets the parent property value. Returns the parent tag of the specified tag. +func (m *EdiscoveryReviewTag) SetParent(value EdiscoveryReviewTagable)() { + m.parent = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_response.go new file mode 100644 index 000000000..f4e313960 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewTagCollectionResponse +type EdiscoveryReviewTagCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryReviewTagable +} +// NewEdiscoveryReviewTagCollectionResponse instantiates a new EdiscoveryReviewTagCollectionResponse and sets the default values. +func NewEdiscoveryReviewTagCollectionResponse()(*EdiscoveryReviewTagCollectionResponse) { + m := &EdiscoveryReviewTagCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryReviewTagCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryReviewTagCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryReviewTagCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryReviewTagCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryReviewTagFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryReviewTagable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryReviewTagable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryReviewTagCollectionResponse) GetValue()([]EdiscoveryReviewTagable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryReviewTagCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryReviewTagCollectionResponse) SetValue(value []EdiscoveryReviewTagable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_responseable.go new file mode 100644 index 000000000..1cb0a66cc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tag_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryReviewTagCollectionResponseable +type EdiscoveryReviewTagCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryReviewTagable) + SetValue(value []EdiscoveryReviewTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tagable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tagable.go new file mode 100644 index 000000000..6301840fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_review_tagable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryReviewTagable +type EdiscoveryReviewTagable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Tagable + GetChildSelectability()(*ChildSelectability) + GetChildTags()([]EdiscoveryReviewTagable) + GetParent()(EdiscoveryReviewTagable) + SetChildSelectability(value *ChildSelectability)() + SetChildTags(value []EdiscoveryReviewTagable)() + SetParent(value EdiscoveryReviewTagable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_search.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_search.go new file mode 100644 index 000000000..050df8ef0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_search.go @@ -0,0 +1,217 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoverySearch +type EdiscoverySearch struct { + Search + // Adds an additional source to the eDiscovery search. + additionalSources []DataSourceable + // Adds the results of the eDiscovery search to the specified reviewSet. + addToReviewSetOperation EdiscoveryAddToReviewSetOperationable + // Custodian sources that are included in the eDiscovery search. + custodianSources []DataSourceable + // When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. + dataSourceScopes *DataSourceScopes + // The last estimate operation associated with the eDiscovery search. + lastEstimateStatisticsOperation EdiscoveryEstimateOperationable + // noncustodialDataSource sources that are included in the eDiscovery search + noncustodialSources []EdiscoveryNoncustodialDataSourceable +} +// NewEdiscoverySearch instantiates a new EdiscoverySearch and sets the default values. +func NewEdiscoverySearch()(*EdiscoverySearch) { + m := &EdiscoverySearch{ + Search: *NewSearch(), + } + odataTypeValue := "#microsoft.graph.security.ediscoverySearch"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEdiscoverySearchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoverySearchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoverySearch(), nil +} +// GetAdditionalSources gets the additionalSources property value. Adds an additional source to the eDiscovery search. +func (m *EdiscoverySearch) GetAdditionalSources()([]DataSourceable) { + return m.additionalSources +} +// GetAddToReviewSetOperation gets the addToReviewSetOperation property value. Adds the results of the eDiscovery search to the specified reviewSet. +func (m *EdiscoverySearch) GetAddToReviewSetOperation()(EdiscoveryAddToReviewSetOperationable) { + return m.addToReviewSetOperation +} +// GetCustodianSources gets the custodianSources property value. Custodian sources that are included in the eDiscovery search. +func (m *EdiscoverySearch) GetCustodianSources()([]DataSourceable) { + return m.custodianSources +} +// GetDataSourceScopes gets the dataSourceScopes property value. When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. +func (m *EdiscoverySearch) GetDataSourceScopes()(*DataSourceScopes) { + return m.dataSourceScopes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoverySearch) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Search.GetFieldDeserializers() + res["additionalSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetAdditionalSources(res) + } + return nil + } + res["addToReviewSetOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryAddToReviewSetOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAddToReviewSetOperation(val.(EdiscoveryAddToReviewSetOperationable)) + } + return nil + } + res["custodianSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DataSourceable, len(val)) + for i, v := range val { + res[i] = v.(DataSourceable) + } + m.SetCustodianSources(res) + } + return nil + } + res["dataSourceScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDataSourceScopes) + if err != nil { + return err + } + if val != nil { + m.SetDataSourceScopes(val.(*DataSourceScopes)) + } + return nil + } + res["lastEstimateStatisticsOperation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEdiscoveryEstimateOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastEstimateStatisticsOperation(val.(EdiscoveryEstimateOperationable)) + } + return nil + } + res["noncustodialSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryNoncustodialDataSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryNoncustodialDataSourceable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryNoncustodialDataSourceable) + } + m.SetNoncustodialSources(res) + } + return nil + } + return res +} +// GetLastEstimateStatisticsOperation gets the lastEstimateStatisticsOperation property value. The last estimate operation associated with the eDiscovery search. +func (m *EdiscoverySearch) GetLastEstimateStatisticsOperation()(EdiscoveryEstimateOperationable) { + return m.lastEstimateStatisticsOperation +} +// GetNoncustodialSources gets the noncustodialSources property value. noncustodialDataSource sources that are included in the eDiscovery search +func (m *EdiscoverySearch) GetNoncustodialSources()([]EdiscoveryNoncustodialDataSourceable) { + return m.noncustodialSources +} +// Serialize serializes information the current object +func (m *EdiscoverySearch) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Search.Serialize(writer) + if err != nil { + return err + } + if m.GetAdditionalSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAdditionalSources())) + for i, v := range m.GetAdditionalSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("additionalSources", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("addToReviewSetOperation", m.GetAddToReviewSetOperation()) + if err != nil { + return err + } + } + if m.GetCustodianSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustodianSources())) + for i, v := range m.GetCustodianSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("custodianSources", cast) + if err != nil { + return err + } + } + if m.GetDataSourceScopes() != nil { + cast := (*m.GetDataSourceScopes()).String() + err = writer.WriteStringValue("dataSourceScopes", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastEstimateStatisticsOperation", m.GetLastEstimateStatisticsOperation()) + if err != nil { + return err + } + } + if m.GetNoncustodialSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetNoncustodialSources())) + for i, v := range m.GetNoncustodialSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("noncustodialSources", cast) + if err != nil { + return err + } + } + return nil +} +// SetAdditionalSources sets the additionalSources property value. Adds an additional source to the eDiscovery search. +func (m *EdiscoverySearch) SetAdditionalSources(value []DataSourceable)() { + m.additionalSources = value +} +// SetAddToReviewSetOperation sets the addToReviewSetOperation property value. Adds the results of the eDiscovery search to the specified reviewSet. +func (m *EdiscoverySearch) SetAddToReviewSetOperation(value EdiscoveryAddToReviewSetOperationable)() { + m.addToReviewSetOperation = value +} +// SetCustodianSources sets the custodianSources property value. Custodian sources that are included in the eDiscovery search. +func (m *EdiscoverySearch) SetCustodianSources(value []DataSourceable)() { + m.custodianSources = value +} +// SetDataSourceScopes sets the dataSourceScopes property value. When specified, the collection will span across a service for an entire workload. Possible values are: none, allTenantMailboxes, allTenantSites, allCaseCustodians, allCaseNoncustodialDataSources. +func (m *EdiscoverySearch) SetDataSourceScopes(value *DataSourceScopes)() { + m.dataSourceScopes = value +} +// SetLastEstimateStatisticsOperation sets the lastEstimateStatisticsOperation property value. The last estimate operation associated with the eDiscovery search. +func (m *EdiscoverySearch) SetLastEstimateStatisticsOperation(value EdiscoveryEstimateOperationable)() { + m.lastEstimateStatisticsOperation = value +} +// SetNoncustodialSources sets the noncustodialSources property value. noncustodialDataSource sources that are included in the eDiscovery search +func (m *EdiscoverySearch) SetNoncustodialSources(value []EdiscoveryNoncustodialDataSourceable)() { + m.noncustodialSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_response.go new file mode 100644 index 000000000..dedee4961 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoverySearchCollectionResponse +type EdiscoverySearchCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoverySearchable +} +// NewEdiscoverySearchCollectionResponse instantiates a new EdiscoverySearchCollectionResponse and sets the default values. +func NewEdiscoverySearchCollectionResponse()(*EdiscoverySearchCollectionResponse) { + m := &EdiscoverySearchCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoverySearchCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoverySearchCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoverySearchCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoverySearchCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoverySearchFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoverySearchable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoverySearchable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoverySearchCollectionResponse) GetValue()([]EdiscoverySearchable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoverySearchCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoverySearchCollectionResponse) SetValue(value []EdiscoverySearchable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_responseable.go new file mode 100644 index 000000000..127eefc83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_search_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoverySearchCollectionResponseable +type EdiscoverySearchCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoverySearchable) + SetValue(value []EdiscoverySearchable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_searchable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_searchable.go new file mode 100644 index 000000000..148fd9f29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_searchable.go @@ -0,0 +1,23 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoverySearchable +type EdiscoverySearchable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + Searchable + GetAdditionalSources()([]DataSourceable) + GetAddToReviewSetOperation()(EdiscoveryAddToReviewSetOperationable) + GetCustodianSources()([]DataSourceable) + GetDataSourceScopes()(*DataSourceScopes) + GetLastEstimateStatisticsOperation()(EdiscoveryEstimateOperationable) + GetNoncustodialSources()([]EdiscoveryNoncustodialDataSourceable) + SetAdditionalSources(value []DataSourceable)() + SetAddToReviewSetOperation(value EdiscoveryAddToReviewSetOperationable)() + SetCustodianSources(value []DataSourceable)() + SetDataSourceScopes(value *DataSourceScopes)() + SetLastEstimateStatisticsOperation(value EdiscoveryEstimateOperationable)() + SetNoncustodialSources(value []EdiscoveryNoncustodialDataSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation.go new file mode 100644 index 000000000..624a9cf38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation.go @@ -0,0 +1,34 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryTagOperation +type EdiscoveryTagOperation struct { + CaseOperation +} +// NewEdiscoveryTagOperation instantiates a new EdiscoveryTagOperation and sets the default values. +func NewEdiscoveryTagOperation()(*EdiscoveryTagOperation) { + m := &EdiscoveryTagOperation{ + CaseOperation: *NewCaseOperation(), + } + return m +} +// CreateEdiscoveryTagOperationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryTagOperationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryTagOperation(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryTagOperation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.CaseOperation.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *EdiscoveryTagOperation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.CaseOperation.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_response.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_response.go new file mode 100644 index 000000000..4c1b649fe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryTagOperationCollectionResponse +type EdiscoveryTagOperationCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EdiscoveryTagOperationable +} +// NewEdiscoveryTagOperationCollectionResponse instantiates a new EdiscoveryTagOperationCollectionResponse and sets the default values. +func NewEdiscoveryTagOperationCollectionResponse()(*EdiscoveryTagOperationCollectionResponse) { + m := &EdiscoveryTagOperationCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEdiscoveryTagOperationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEdiscoveryTagOperationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEdiscoveryTagOperationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EdiscoveryTagOperationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEdiscoveryTagOperationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EdiscoveryTagOperationable, len(val)) + for i, v := range val { + res[i] = v.(EdiscoveryTagOperationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EdiscoveryTagOperationCollectionResponse) GetValue()([]EdiscoveryTagOperationable) { + return m.value +} +// Serialize serializes information the current object +func (m *EdiscoveryTagOperationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EdiscoveryTagOperationCollectionResponse) SetValue(value []EdiscoveryTagOperationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_responseable.go new file mode 100644 index 000000000..6cbd65880 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operation_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EdiscoveryTagOperationCollectionResponseable +type EdiscoveryTagOperationCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EdiscoveryTagOperationable) + SetValue(value []EdiscoveryTagOperationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operationable.go b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operationable.go new file mode 100644 index 000000000..739f177e5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ediscovery_tag_operationable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EdiscoveryTagOperationable +type EdiscoveryTagOperationable interface { + CaseOperationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission.go new file mode 100644 index 000000000..7548b2948 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailContentThreatSubmission +type EmailContentThreatSubmission struct { + EmailThreatSubmission + // Base64 encoded file content. + fileContent *string +} +// NewEmailContentThreatSubmission instantiates a new EmailContentThreatSubmission and sets the default values. +func NewEmailContentThreatSubmission()(*EmailContentThreatSubmission) { + m := &EmailContentThreatSubmission{ + EmailThreatSubmission: *NewEmailThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.emailContentThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailContentThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailContentThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailContentThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailContentThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EmailThreatSubmission.GetFieldDeserializers() + res["fileContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileContent(val) + } + return nil + } + return res +} +// GetFileContent gets the fileContent property value. Base64 encoded file content. +func (m *EmailContentThreatSubmission) GetFileContent()(*string) { + return m.fileContent +} +// Serialize serializes information the current object +func (m *EmailContentThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EmailThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileContent", m.GetFileContent()) + if err != nil { + return err + } + } + return nil +} +// SetFileContent sets the fileContent property value. Base64 encoded file content. +func (m *EmailContentThreatSubmission) SetFileContent(value *string)() { + m.fileContent = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_response.go new file mode 100644 index 000000000..a379242fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailContentThreatSubmissionCollectionResponse +type EmailContentThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EmailContentThreatSubmissionable +} +// NewEmailContentThreatSubmissionCollectionResponse instantiates a new EmailContentThreatSubmissionCollectionResponse and sets the default values. +func NewEmailContentThreatSubmissionCollectionResponse()(*EmailContentThreatSubmissionCollectionResponse) { + m := &EmailContentThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailContentThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailContentThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailContentThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailContentThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailContentThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailContentThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EmailContentThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailContentThreatSubmissionCollectionResponse) GetValue()([]EmailContentThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailContentThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailContentThreatSubmissionCollectionResponse) SetValue(value []EmailContentThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_responseable.go new file mode 100644 index 000000000..5bb589e8f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailContentThreatSubmissionCollectionResponseable +type EmailContentThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailContentThreatSubmissionable) + SetValue(value []EmailContentThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_content_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submissionable.go new file mode 100644 index 000000000..a9daa03db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_content_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailContentThreatSubmissionable +type EmailContentThreatSubmissionable interface { + EmailThreatSubmissionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileContent()(*string) + SetFileContent(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_sender.go b/src/internal/connector/graph/betasdk/models/security/email_sender.go new file mode 100644 index 000000000..0eb84edd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_sender.go @@ -0,0 +1,149 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailSender +type EmailSender 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 name of the sender. + displayName *string + // Sender domain. + domainName *string + // Sender email address. + emailAddress *string + // The OdataType property + odataType *string +} +// NewEmailSender instantiates a new emailSender and sets the default values. +func NewEmailSender()(*EmailSender) { + m := &EmailSender{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEmailSenderFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailSenderFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailSender(), 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 *EmailSender) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. The name of the sender. +func (m *EmailSender) GetDisplayName()(*string) { + return m.displayName +} +// GetDomainName gets the domainName property value. Sender domain. +func (m *EmailSender) GetDomainName()(*string) { + return m.domainName +} +// GetEmailAddress gets the emailAddress property value. Sender email address. +func (m *EmailSender) GetEmailAddress()(*string) { + return m.emailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailSender) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(val) + } + return nil + } + res["emailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmailAddress(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EmailSender) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *EmailSender) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("emailAddress", m.GetEmailAddress()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *EmailSender) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. The name of the sender. +func (m *EmailSender) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDomainName sets the domainName property value. Sender domain. +func (m *EmailSender) SetDomainName(value *string)() { + m.domainName = value +} +// SetEmailAddress sets the emailAddress property value. Sender email address. +func (m *EmailSender) SetEmailAddress(value *string)() { + m.emailAddress = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EmailSender) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_senderable.go b/src/internal/connector/graph/betasdk/models/security/email_senderable.go new file mode 100644 index 000000000..dd46e2f5a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_senderable.go @@ -0,0 +1,19 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailSenderable +type EmailSenderable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetDomainName()(*string) + GetEmailAddress()(*string) + GetOdataType()(*string) + SetDisplayName(value *string)() + SetDomainName(value *string)() + SetEmailAddress(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission.go new file mode 100644 index 000000000..780d42878 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission.go @@ -0,0 +1,292 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailThreatSubmission +type EmailThreatSubmission struct { + ThreatSubmission + // If the email is phishing simulation, this field will not be null. + attackSimulationInfo AttackSimulationInfoable + // Specifies the internet message id of the email being submitted. This information is present in the email header. + internetMessageId *string + // The original category of the submission. The possible values are: notJunk, spam, phishing, malware and unkownFutureValue. + originalCategory *SubmissionCategory + // Specifies the date and time stamp when the email was received. + receivedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the email address (in smtp format) of the recipient who received the email. + recipientEmailAddress *string + // Specifies the email address of the sender. + sender *string + // Specifies the IP address of the sender. + senderIP *string + // Specifies the subject of the email . + subject *string + // It is used to automatically add allows for the components such as URL, file, sender; which are deemed bad by Microsoft so that similar messages in the future can be allowed. + tenantAllowOrBlockListAction TenantAllowOrBlockListActionable +} +// NewEmailThreatSubmission instantiates a new EmailThreatSubmission and sets the default values. +func NewEmailThreatSubmission()(*EmailThreatSubmission) { + m := &EmailThreatSubmission{ + ThreatSubmission: *NewThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.emailThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.emailContentThreatSubmission": + return NewEmailContentThreatSubmission(), nil + case "#microsoft.graph.security.emailUrlThreatSubmission": + return NewEmailUrlThreatSubmission(), nil + } + } + } + } + return NewEmailThreatSubmission(), nil +} +// GetAttackSimulationInfo gets the attackSimulationInfo property value. If the email is phishing simulation, this field will not be null. +func (m *EmailThreatSubmission) GetAttackSimulationInfo()(AttackSimulationInfoable) { + return m.attackSimulationInfo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatSubmission.GetFieldDeserializers() + res["attackSimulationInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAttackSimulationInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAttackSimulationInfo(val.(AttackSimulationInfoable)) + } + return nil + } + res["internetMessageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInternetMessageId(val) + } + return nil + } + res["originalCategory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionCategory) + if err != nil { + return err + } + if val != nil { + m.SetOriginalCategory(val.(*SubmissionCategory)) + } + return nil + } + res["receivedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReceivedDateTime(val) + } + return nil + } + res["recipientEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRecipientEmailAddress(val) + } + return nil + } + res["sender"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSender(val) + } + return nil + } + res["senderIP"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSenderIP(val) + } + return nil + } + res["subject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubject(val) + } + return nil + } + res["tenantAllowOrBlockListAction"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateTenantAllowOrBlockListActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetTenantAllowOrBlockListAction(val.(TenantAllowOrBlockListActionable)) + } + return nil + } + return res +} +// GetInternetMessageId gets the internetMessageId property value. Specifies the internet message id of the email being submitted. This information is present in the email header. +func (m *EmailThreatSubmission) GetInternetMessageId()(*string) { + return m.internetMessageId +} +// GetOriginalCategory gets the originalCategory property value. The original category of the submission. The possible values are: notJunk, spam, phishing, malware and unkownFutureValue. +func (m *EmailThreatSubmission) GetOriginalCategory()(*SubmissionCategory) { + return m.originalCategory +} +// GetReceivedDateTime gets the receivedDateTime property value. Specifies the date and time stamp when the email was received. +func (m *EmailThreatSubmission) GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.receivedDateTime +} +// GetRecipientEmailAddress gets the recipientEmailAddress property value. Specifies the email address (in smtp format) of the recipient who received the email. +func (m *EmailThreatSubmission) GetRecipientEmailAddress()(*string) { + return m.recipientEmailAddress +} +// GetSender gets the sender property value. Specifies the email address of the sender. +func (m *EmailThreatSubmission) GetSender()(*string) { + return m.sender +} +// GetSenderIP gets the senderIP property value. Specifies the IP address of the sender. +func (m *EmailThreatSubmission) GetSenderIP()(*string) { + return m.senderIP +} +// GetSubject gets the subject property value. Specifies the subject of the email . +func (m *EmailThreatSubmission) GetSubject()(*string) { + return m.subject +} +// GetTenantAllowOrBlockListAction gets the tenantAllowOrBlockListAction property value. It is used to automatically add allows for the components such as URL, file, sender; which are deemed bad by Microsoft so that similar messages in the future can be allowed. +func (m *EmailThreatSubmission) GetTenantAllowOrBlockListAction()(TenantAllowOrBlockListActionable) { + return m.tenantAllowOrBlockListAction +} +// Serialize serializes information the current object +func (m *EmailThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("attackSimulationInfo", m.GetAttackSimulationInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("internetMessageId", m.GetInternetMessageId()) + if err != nil { + return err + } + } + if m.GetOriginalCategory() != nil { + cast := (*m.GetOriginalCategory()).String() + err = writer.WriteStringValue("originalCategory", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("receivedDateTime", m.GetReceivedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("recipientEmailAddress", m.GetRecipientEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sender", m.GetSender()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("senderIP", m.GetSenderIP()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subject", m.GetSubject()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("tenantAllowOrBlockListAction", m.GetTenantAllowOrBlockListAction()) + if err != nil { + return err + } + } + return nil +} +// SetAttackSimulationInfo sets the attackSimulationInfo property value. If the email is phishing simulation, this field will not be null. +func (m *EmailThreatSubmission) SetAttackSimulationInfo(value AttackSimulationInfoable)() { + m.attackSimulationInfo = value +} +// SetInternetMessageId sets the internetMessageId property value. Specifies the internet message id of the email being submitted. This information is present in the email header. +func (m *EmailThreatSubmission) SetInternetMessageId(value *string)() { + m.internetMessageId = value +} +// SetOriginalCategory sets the originalCategory property value. The original category of the submission. The possible values are: notJunk, spam, phishing, malware and unkownFutureValue. +func (m *EmailThreatSubmission) SetOriginalCategory(value *SubmissionCategory)() { + m.originalCategory = value +} +// SetReceivedDateTime sets the receivedDateTime property value. Specifies the date and time stamp when the email was received. +func (m *EmailThreatSubmission) SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.receivedDateTime = value +} +// SetRecipientEmailAddress sets the recipientEmailAddress property value. Specifies the email address (in smtp format) of the recipient who received the email. +func (m *EmailThreatSubmission) SetRecipientEmailAddress(value *string)() { + m.recipientEmailAddress = value +} +// SetSender sets the sender property value. Specifies the email address of the sender. +func (m *EmailThreatSubmission) SetSender(value *string)() { + m.sender = value +} +// SetSenderIP sets the senderIP property value. Specifies the IP address of the sender. +func (m *EmailThreatSubmission) SetSenderIP(value *string)() { + m.senderIP = value +} +// SetSubject sets the subject property value. Specifies the subject of the email . +func (m *EmailThreatSubmission) SetSubject(value *string)() { + m.subject = value +} +// SetTenantAllowOrBlockListAction sets the tenantAllowOrBlockListAction property value. It is used to automatically add allows for the components such as URL, file, sender; which are deemed bad by Microsoft so that similar messages in the future can be allowed. +func (m *EmailThreatSubmission) SetTenantAllowOrBlockListAction(value TenantAllowOrBlockListActionable)() { + m.tenantAllowOrBlockListAction = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_response.go new file mode 100644 index 000000000..d14cef941 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionCollectionResponse +type EmailThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EmailThreatSubmissionable +} +// NewEmailThreatSubmissionCollectionResponse instantiates a new EmailThreatSubmissionCollectionResponse and sets the default values. +func NewEmailThreatSubmissionCollectionResponse()(*EmailThreatSubmissionCollectionResponse) { + m := &EmailThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EmailThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailThreatSubmissionCollectionResponse) GetValue()([]EmailThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailThreatSubmissionCollectionResponse) SetValue(value []EmailThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_responseable.go new file mode 100644 index 000000000..cc0e2d64c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionCollectionResponseable +type EmailThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailThreatSubmissionable) + SetValue(value []EmailThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy.go new file mode 100644 index 000000000..01bf447dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy.go @@ -0,0 +1,373 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionPolicy provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EmailThreatSubmissionPolicy struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Specifies the email address of the sender from which email notifications will be sent to end users to inform them whether an email is spam, phish or clean. The default value is null. Optional for creation. + customizedNotificationSenderEmailAddress *string + // Specifies the destination where the reported messages from end users will land whenever they report something as phish, junk or not junk. The default value is null. Optional for creation. + customizedReportRecipientEmailAddress *string + // Indicates whether end users can report a message as spam, phish or junk directly without a confirmation(popup). The default value is true. Optional for creation. + isAlwaysReportEnabledForUsers *bool + // Indicates whether end users can confirm using a popup before reporting messages as spam, phish or not junk. The default value is true. Optional for creation. + isAskMeEnabledForUsers *bool + // Indicates whether the email notifications sent to end users to inform them if an email is phish, spam or junk is customized or not. The default value is false. Optional for creation. + isCustomizedMessageEnabled *bool + // If enabled, customized message only shows when email is reported as phishing. The default value is false. Optional for creation. + isCustomizedMessageEnabledForPhishing *bool + // Indicates whether to use the sender email address set using customizedNotificationSenderEmailAddress for sending email notifications to end users. The default value is false. Optional for creation. + isCustomizedNotificationSenderEnabled *bool + // Indicates whether end users can simply move the message from one folder to another based on the action of spam, phish or not junk without actually reporting it. The default value is true. Optional for creation. + isNeverReportEnabledForUsers *bool + // Indicates whether the branding logo should be used in the email notifications sent to end users. The default value is false. Optional for creation. + isOrganizationBrandingEnabled *bool + // Indicates whether end users can submit from the quarantine page. The default value is true. Optional for creation. + isReportFromQuarantineEnabled *bool + // Indicates whether emails reported by end users should be send to the custom mailbox configured using customizedReportRecipientEmailAddress. The default value is false. Optional for creation. + isReportToCustomizedEmailAddressEnabled *bool + // If enabled, the email will be sent to Microsoft for analysis. The default value is false. Required for creation. + isReportToMicrosoftEnabled *bool + // Indicates whether an email notification is sent to the end user who reported the email when it has been reviewed by the admin. The default value is false. Optional for creation. + isReviewEmailNotificationEnabled *bool +} +// NewEmailThreatSubmissionPolicy instantiates a new emailThreatSubmissionPolicy and sets the default values. +func NewEmailThreatSubmissionPolicy()(*EmailThreatSubmissionPolicy) { + m := &EmailThreatSubmissionPolicy{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateEmailThreatSubmissionPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailThreatSubmissionPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailThreatSubmissionPolicy(), nil +} +// GetCustomizedNotificationSenderEmailAddress gets the customizedNotificationSenderEmailAddress property value. Specifies the email address of the sender from which email notifications will be sent to end users to inform them whether an email is spam, phish or clean. The default value is null. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetCustomizedNotificationSenderEmailAddress()(*string) { + return m.customizedNotificationSenderEmailAddress +} +// GetCustomizedReportRecipientEmailAddress gets the customizedReportRecipientEmailAddress property value. Specifies the destination where the reported messages from end users will land whenever they report something as phish, junk or not junk. The default value is null. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetCustomizedReportRecipientEmailAddress()(*string) { + return m.customizedReportRecipientEmailAddress +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailThreatSubmissionPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["customizedNotificationSenderEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomizedNotificationSenderEmailAddress(val) + } + return nil + } + res["customizedReportRecipientEmailAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCustomizedReportRecipientEmailAddress(val) + } + return nil + } + res["isAlwaysReportEnabledForUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAlwaysReportEnabledForUsers(val) + } + return nil + } + res["isAskMeEnabledForUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAskMeEnabledForUsers(val) + } + return nil + } + res["isCustomizedMessageEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomizedMessageEnabled(val) + } + return nil + } + res["isCustomizedMessageEnabledForPhishing"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomizedMessageEnabledForPhishing(val) + } + return nil + } + res["isCustomizedNotificationSenderEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsCustomizedNotificationSenderEnabled(val) + } + return nil + } + res["isNeverReportEnabledForUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsNeverReportEnabledForUsers(val) + } + return nil + } + res["isOrganizationBrandingEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsOrganizationBrandingEnabled(val) + } + return nil + } + res["isReportFromQuarantineEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReportFromQuarantineEnabled(val) + } + return nil + } + res["isReportToCustomizedEmailAddressEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReportToCustomizedEmailAddressEnabled(val) + } + return nil + } + res["isReportToMicrosoftEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReportToMicrosoftEnabled(val) + } + return nil + } + res["isReviewEmailNotificationEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsReviewEmailNotificationEnabled(val) + } + return nil + } + return res +} +// GetIsAlwaysReportEnabledForUsers gets the isAlwaysReportEnabledForUsers property value. Indicates whether end users can report a message as spam, phish or junk directly without a confirmation(popup). The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsAlwaysReportEnabledForUsers()(*bool) { + return m.isAlwaysReportEnabledForUsers +} +// GetIsAskMeEnabledForUsers gets the isAskMeEnabledForUsers property value. Indicates whether end users can confirm using a popup before reporting messages as spam, phish or not junk. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsAskMeEnabledForUsers()(*bool) { + return m.isAskMeEnabledForUsers +} +// GetIsCustomizedMessageEnabled gets the isCustomizedMessageEnabled property value. Indicates whether the email notifications sent to end users to inform them if an email is phish, spam or junk is customized or not. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsCustomizedMessageEnabled()(*bool) { + return m.isCustomizedMessageEnabled +} +// GetIsCustomizedMessageEnabledForPhishing gets the isCustomizedMessageEnabledForPhishing property value. If enabled, customized message only shows when email is reported as phishing. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsCustomizedMessageEnabledForPhishing()(*bool) { + return m.isCustomizedMessageEnabledForPhishing +} +// GetIsCustomizedNotificationSenderEnabled gets the isCustomizedNotificationSenderEnabled property value. Indicates whether to use the sender email address set using customizedNotificationSenderEmailAddress for sending email notifications to end users. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsCustomizedNotificationSenderEnabled()(*bool) { + return m.isCustomizedNotificationSenderEnabled +} +// GetIsNeverReportEnabledForUsers gets the isNeverReportEnabledForUsers property value. Indicates whether end users can simply move the message from one folder to another based on the action of spam, phish or not junk without actually reporting it. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsNeverReportEnabledForUsers()(*bool) { + return m.isNeverReportEnabledForUsers +} +// GetIsOrganizationBrandingEnabled gets the isOrganizationBrandingEnabled property value. Indicates whether the branding logo should be used in the email notifications sent to end users. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsOrganizationBrandingEnabled()(*bool) { + return m.isOrganizationBrandingEnabled +} +// GetIsReportFromQuarantineEnabled gets the isReportFromQuarantineEnabled property value. Indicates whether end users can submit from the quarantine page. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsReportFromQuarantineEnabled()(*bool) { + return m.isReportFromQuarantineEnabled +} +// GetIsReportToCustomizedEmailAddressEnabled gets the isReportToCustomizedEmailAddressEnabled property value. Indicates whether emails reported by end users should be send to the custom mailbox configured using customizedReportRecipientEmailAddress. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsReportToCustomizedEmailAddressEnabled()(*bool) { + return m.isReportToCustomizedEmailAddressEnabled +} +// GetIsReportToMicrosoftEnabled gets the isReportToMicrosoftEnabled property value. If enabled, the email will be sent to Microsoft for analysis. The default value is false. Required for creation. +func (m *EmailThreatSubmissionPolicy) GetIsReportToMicrosoftEnabled()(*bool) { + return m.isReportToMicrosoftEnabled +} +// GetIsReviewEmailNotificationEnabled gets the isReviewEmailNotificationEnabled property value. Indicates whether an email notification is sent to the end user who reported the email when it has been reviewed by the admin. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) GetIsReviewEmailNotificationEnabled()(*bool) { + return m.isReviewEmailNotificationEnabled +} +// Serialize serializes information the current object +func (m *EmailThreatSubmissionPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("customizedNotificationSenderEmailAddress", m.GetCustomizedNotificationSenderEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("customizedReportRecipientEmailAddress", m.GetCustomizedReportRecipientEmailAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAlwaysReportEnabledForUsers", m.GetIsAlwaysReportEnabledForUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAskMeEnabledForUsers", m.GetIsAskMeEnabledForUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCustomizedMessageEnabled", m.GetIsCustomizedMessageEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCustomizedMessageEnabledForPhishing", m.GetIsCustomizedMessageEnabledForPhishing()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isCustomizedNotificationSenderEnabled", m.GetIsCustomizedNotificationSenderEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isNeverReportEnabledForUsers", m.GetIsNeverReportEnabledForUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isOrganizationBrandingEnabled", m.GetIsOrganizationBrandingEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReportFromQuarantineEnabled", m.GetIsReportFromQuarantineEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReportToCustomizedEmailAddressEnabled", m.GetIsReportToCustomizedEmailAddressEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReportToMicrosoftEnabled", m.GetIsReportToMicrosoftEnabled()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isReviewEmailNotificationEnabled", m.GetIsReviewEmailNotificationEnabled()) + if err != nil { + return err + } + } + return nil +} +// SetCustomizedNotificationSenderEmailAddress sets the customizedNotificationSenderEmailAddress property value. Specifies the email address of the sender from which email notifications will be sent to end users to inform them whether an email is spam, phish or clean. The default value is null. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetCustomizedNotificationSenderEmailAddress(value *string)() { + m.customizedNotificationSenderEmailAddress = value +} +// SetCustomizedReportRecipientEmailAddress sets the customizedReportRecipientEmailAddress property value. Specifies the destination where the reported messages from end users will land whenever they report something as phish, junk or not junk. The default value is null. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetCustomizedReportRecipientEmailAddress(value *string)() { + m.customizedReportRecipientEmailAddress = value +} +// SetIsAlwaysReportEnabledForUsers sets the isAlwaysReportEnabledForUsers property value. Indicates whether end users can report a message as spam, phish or junk directly without a confirmation(popup). The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsAlwaysReportEnabledForUsers(value *bool)() { + m.isAlwaysReportEnabledForUsers = value +} +// SetIsAskMeEnabledForUsers sets the isAskMeEnabledForUsers property value. Indicates whether end users can confirm using a popup before reporting messages as spam, phish or not junk. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsAskMeEnabledForUsers(value *bool)() { + m.isAskMeEnabledForUsers = value +} +// SetIsCustomizedMessageEnabled sets the isCustomizedMessageEnabled property value. Indicates whether the email notifications sent to end users to inform them if an email is phish, spam or junk is customized or not. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsCustomizedMessageEnabled(value *bool)() { + m.isCustomizedMessageEnabled = value +} +// SetIsCustomizedMessageEnabledForPhishing sets the isCustomizedMessageEnabledForPhishing property value. If enabled, customized message only shows when email is reported as phishing. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsCustomizedMessageEnabledForPhishing(value *bool)() { + m.isCustomizedMessageEnabledForPhishing = value +} +// SetIsCustomizedNotificationSenderEnabled sets the isCustomizedNotificationSenderEnabled property value. Indicates whether to use the sender email address set using customizedNotificationSenderEmailAddress for sending email notifications to end users. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsCustomizedNotificationSenderEnabled(value *bool)() { + m.isCustomizedNotificationSenderEnabled = value +} +// SetIsNeverReportEnabledForUsers sets the isNeverReportEnabledForUsers property value. Indicates whether end users can simply move the message from one folder to another based on the action of spam, phish or not junk without actually reporting it. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsNeverReportEnabledForUsers(value *bool)() { + m.isNeverReportEnabledForUsers = value +} +// SetIsOrganizationBrandingEnabled sets the isOrganizationBrandingEnabled property value. Indicates whether the branding logo should be used in the email notifications sent to end users. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsOrganizationBrandingEnabled(value *bool)() { + m.isOrganizationBrandingEnabled = value +} +// SetIsReportFromQuarantineEnabled sets the isReportFromQuarantineEnabled property value. Indicates whether end users can submit from the quarantine page. The default value is true. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsReportFromQuarantineEnabled(value *bool)() { + m.isReportFromQuarantineEnabled = value +} +// SetIsReportToCustomizedEmailAddressEnabled sets the isReportToCustomizedEmailAddressEnabled property value. Indicates whether emails reported by end users should be send to the custom mailbox configured using customizedReportRecipientEmailAddress. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsReportToCustomizedEmailAddressEnabled(value *bool)() { + m.isReportToCustomizedEmailAddressEnabled = value +} +// SetIsReportToMicrosoftEnabled sets the isReportToMicrosoftEnabled property value. If enabled, the email will be sent to Microsoft for analysis. The default value is false. Required for creation. +func (m *EmailThreatSubmissionPolicy) SetIsReportToMicrosoftEnabled(value *bool)() { + m.isReportToMicrosoftEnabled = value +} +// SetIsReviewEmailNotificationEnabled sets the isReviewEmailNotificationEnabled property value. Indicates whether an email notification is sent to the end user who reported the email when it has been reviewed by the admin. The default value is false. Optional for creation. +func (m *EmailThreatSubmissionPolicy) SetIsReviewEmailNotificationEnabled(value *bool)() { + m.isReviewEmailNotificationEnabled = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_response.go new file mode 100644 index 000000000..dfd236417 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionPolicyCollectionResponse +type EmailThreatSubmissionPolicyCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EmailThreatSubmissionPolicyable +} +// NewEmailThreatSubmissionPolicyCollectionResponse instantiates a new EmailThreatSubmissionPolicyCollectionResponse and sets the default values. +func NewEmailThreatSubmissionPolicyCollectionResponse()(*EmailThreatSubmissionPolicyCollectionResponse) { + m := &EmailThreatSubmissionPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailThreatSubmissionPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailThreatSubmissionPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailThreatSubmissionPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailThreatSubmissionPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailThreatSubmissionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailThreatSubmissionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(EmailThreatSubmissionPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailThreatSubmissionPolicyCollectionResponse) GetValue()([]EmailThreatSubmissionPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailThreatSubmissionPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailThreatSubmissionPolicyCollectionResponse) SetValue(value []EmailThreatSubmissionPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_responseable.go new file mode 100644 index 000000000..25d1c27a0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policy_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionPolicyCollectionResponseable +type EmailThreatSubmissionPolicyCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailThreatSubmissionPolicyable) + SetValue(value []EmailThreatSubmissionPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policyable.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policyable.go new file mode 100644 index 000000000..6b60189eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submission_policyable.go @@ -0,0 +1,38 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailThreatSubmissionPolicyable +type EmailThreatSubmissionPolicyable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCustomizedNotificationSenderEmailAddress()(*string) + GetCustomizedReportRecipientEmailAddress()(*string) + GetIsAlwaysReportEnabledForUsers()(*bool) + GetIsAskMeEnabledForUsers()(*bool) + GetIsCustomizedMessageEnabled()(*bool) + GetIsCustomizedMessageEnabledForPhishing()(*bool) + GetIsCustomizedNotificationSenderEnabled()(*bool) + GetIsNeverReportEnabledForUsers()(*bool) + GetIsOrganizationBrandingEnabled()(*bool) + GetIsReportFromQuarantineEnabled()(*bool) + GetIsReportToCustomizedEmailAddressEnabled()(*bool) + GetIsReportToMicrosoftEnabled()(*bool) + GetIsReviewEmailNotificationEnabled()(*bool) + SetCustomizedNotificationSenderEmailAddress(value *string)() + SetCustomizedReportRecipientEmailAddress(value *string)() + SetIsAlwaysReportEnabledForUsers(value *bool)() + SetIsAskMeEnabledForUsers(value *bool)() + SetIsCustomizedMessageEnabled(value *bool)() + SetIsCustomizedMessageEnabledForPhishing(value *bool)() + SetIsCustomizedNotificationSenderEnabled(value *bool)() + SetIsNeverReportEnabledForUsers(value *bool)() + SetIsOrganizationBrandingEnabled(value *bool)() + SetIsReportFromQuarantineEnabled(value *bool)() + SetIsReportToCustomizedEmailAddressEnabled(value *bool)() + SetIsReportToMicrosoftEnabled(value *bool)() + SetIsReviewEmailNotificationEnabled(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/email_threat_submissionable.go new file mode 100644 index 000000000..83949db87 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_threat_submissionable.go @@ -0,0 +1,30 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailThreatSubmissionable +type EmailThreatSubmissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatSubmissionable + GetAttackSimulationInfo()(AttackSimulationInfoable) + GetInternetMessageId()(*string) + GetOriginalCategory()(*SubmissionCategory) + GetReceivedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRecipientEmailAddress()(*string) + GetSender()(*string) + GetSenderIP()(*string) + GetSubject()(*string) + GetTenantAllowOrBlockListAction()(TenantAllowOrBlockListActionable) + SetAttackSimulationInfo(value AttackSimulationInfoable)() + SetInternetMessageId(value *string)() + SetOriginalCategory(value *SubmissionCategory)() + SetReceivedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRecipientEmailAddress(value *string)() + SetSender(value *string)() + SetSenderIP(value *string)() + SetSubject(value *string)() + SetTenantAllowOrBlockListAction(value TenantAllowOrBlockListActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission.go new file mode 100644 index 000000000..5a7c633b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailUrlThreatSubmission +type EmailUrlThreatSubmission struct { + EmailThreatSubmission + // Specifies the url of the message to be submitted. + messageUrl *string +} +// NewEmailUrlThreatSubmission instantiates a new EmailUrlThreatSubmission and sets the default values. +func NewEmailUrlThreatSubmission()(*EmailUrlThreatSubmission) { + m := &EmailUrlThreatSubmission{ + EmailThreatSubmission: *NewEmailThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.emailUrlThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateEmailUrlThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailUrlThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailUrlThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailUrlThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.EmailThreatSubmission.GetFieldDeserializers() + res["messageUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMessageUrl(val) + } + return nil + } + return res +} +// GetMessageUrl gets the messageUrl property value. Specifies the url of the message to be submitted. +func (m *EmailUrlThreatSubmission) GetMessageUrl()(*string) { + return m.messageUrl +} +// Serialize serializes information the current object +func (m *EmailUrlThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.EmailThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("messageUrl", m.GetMessageUrl()) + if err != nil { + return err + } + } + return nil +} +// SetMessageUrl sets the messageUrl property value. Specifies the url of the message to be submitted. +func (m *EmailUrlThreatSubmission) SetMessageUrl(value *string)() { + m.messageUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_response.go new file mode 100644 index 000000000..9812a4e25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailUrlThreatSubmissionCollectionResponse +type EmailUrlThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EmailUrlThreatSubmissionable +} +// NewEmailUrlThreatSubmissionCollectionResponse instantiates a new EmailUrlThreatSubmissionCollectionResponse and sets the default values. +func NewEmailUrlThreatSubmissionCollectionResponse()(*EmailUrlThreatSubmissionCollectionResponse) { + m := &EmailUrlThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEmailUrlThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEmailUrlThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEmailUrlThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EmailUrlThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailUrlThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailUrlThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EmailUrlThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EmailUrlThreatSubmissionCollectionResponse) GetValue()([]EmailUrlThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *EmailUrlThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EmailUrlThreatSubmissionCollectionResponse) SetValue(value []EmailUrlThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_responseable.go new file mode 100644 index 000000000..a87582440 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EmailUrlThreatSubmissionCollectionResponseable +type EmailUrlThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EmailUrlThreatSubmissionable) + SetValue(value []EmailUrlThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/email_url_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submissionable.go new file mode 100644 index 000000000..3d2a39cef --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/email_url_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EmailUrlThreatSubmissionable +type EmailUrlThreatSubmissionable interface { + EmailThreatSubmissionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMessageUrl()(*string) + SetMessageUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_propagation_result.go b/src/internal/connector/graph/betasdk/models/security/event_propagation_result.go new file mode 100644 index 000000000..70ced8176 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_propagation_result.go @@ -0,0 +1,176 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventPropagationResult +type EventPropagationResult 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 name of the specific location in the workload associated with the event. + location *string + // The OdataType property + odataType *string + // The name of the workload associated with the event. + serviceName *string + // Indicates the status of the event creation request. The possible values are: none, inProcessing, failed, success. + status *EventPropagationStatus + // Additional information about the status of the event creation request. + statusInformation *string +} +// NewEventPropagationResult instantiates a new eventPropagationResult and sets the default values. +func NewEventPropagationResult()(*EventPropagationResult) { + m := &EventPropagationResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEventPropagationResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventPropagationResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventPropagationResult(), 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 *EventPropagationResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventPropagationResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLocation(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["serviceName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServiceName(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEventPropagationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*EventPropagationStatus)) + } + return nil + } + res["statusInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetStatusInformation(val) + } + return nil + } + return res +} +// GetLocation gets the location property value. The name of the specific location in the workload associated with the event. +func (m *EventPropagationResult) GetLocation()(*string) { + return m.location +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EventPropagationResult) GetOdataType()(*string) { + return m.odataType +} +// GetServiceName gets the serviceName property value. The name of the workload associated with the event. +func (m *EventPropagationResult) GetServiceName()(*string) { + return m.serviceName +} +// GetStatus gets the status property value. Indicates the status of the event creation request. The possible values are: none, inProcessing, failed, success. +func (m *EventPropagationResult) GetStatus()(*EventPropagationStatus) { + return m.status +} +// GetStatusInformation gets the statusInformation property value. Additional information about the status of the event creation request. +func (m *EventPropagationResult) GetStatusInformation()(*string) { + return m.statusInformation +} +// Serialize serializes information the current object +func (m *EventPropagationResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("serviceName", m.GetServiceName()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("statusInformation", m.GetStatusInformation()) + 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 *EventPropagationResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLocation sets the location property value. The name of the specific location in the workload associated with the event. +func (m *EventPropagationResult) SetLocation(value *string)() { + m.location = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EventPropagationResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetServiceName sets the serviceName property value. The name of the workload associated with the event. +func (m *EventPropagationResult) SetServiceName(value *string)() { + m.serviceName = value +} +// SetStatus sets the status property value. Indicates the status of the event creation request. The possible values are: none, inProcessing, failed, success. +func (m *EventPropagationResult) SetStatus(value *EventPropagationStatus)() { + m.status = value +} +// SetStatusInformation sets the statusInformation property value. Additional information about the status of the event creation request. +func (m *EventPropagationResult) SetStatusInformation(value *string)() { + m.statusInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_response.go b/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_response.go new file mode 100644 index 000000000..8ea2cb4be --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EventPropagationResultCollectionResponse +type EventPropagationResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EventPropagationResultable +} +// NewEventPropagationResultCollectionResponse instantiates a new EventPropagationResultCollectionResponse and sets the default values. +func NewEventPropagationResultCollectionResponse()(*EventPropagationResultCollectionResponse) { + m := &EventPropagationResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventPropagationResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventPropagationResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventPropagationResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventPropagationResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventPropagationResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventPropagationResultable, len(val)) + for i, v := range val { + res[i] = v.(EventPropagationResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventPropagationResultCollectionResponse) GetValue()([]EventPropagationResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventPropagationResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventPropagationResultCollectionResponse) SetValue(value []EventPropagationResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_responseable.go new file mode 100644 index 000000000..c34c159b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_propagation_result_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EventPropagationResultCollectionResponseable +type EventPropagationResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EventPropagationResultable) + SetValue(value []EventPropagationResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_propagation_resultable.go b/src/internal/connector/graph/betasdk/models/security/event_propagation_resultable.go new file mode 100644 index 000000000..f4eebef11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_propagation_resultable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventPropagationResultable +type EventPropagationResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLocation()(*string) + GetOdataType()(*string) + GetServiceName()(*string) + GetStatus()(*EventPropagationStatus) + GetStatusInformation()(*string) + SetLocation(value *string)() + SetOdataType(value *string)() + SetServiceName(value *string)() + SetStatus(value *EventPropagationStatus)() + SetStatusInformation(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_propagation_status.go b/src/internal/connector/graph/betasdk/models/security/event_propagation_status.go new file mode 100644 index 000000000..97c8fde00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_propagation_status.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EventPropagationStatus int + +const ( + NONE_EVENTPROPAGATIONSTATUS EventPropagationStatus = iota + INPROCESSING_EVENTPROPAGATIONSTATUS + FAILED_EVENTPROPAGATIONSTATUS + SUCCESS_EVENTPROPAGATIONSTATUS + UNKNOWNFUTUREVALUE_EVENTPROPAGATIONSTATUS +) + +func (i EventPropagationStatus) String() string { + return []string{"none", "inProcessing", "failed", "success", "unknownFutureValue"}[i] +} +func ParseEventPropagationStatus(v string) (interface{}, error) { + result := NONE_EVENTPROPAGATIONSTATUS + switch v { + case "none": + result = NONE_EVENTPROPAGATIONSTATUS + case "inProcessing": + result = INPROCESSING_EVENTPROPAGATIONSTATUS + case "failed": + result = FAILED_EVENTPROPAGATIONSTATUS + case "success": + result = SUCCESS_EVENTPROPAGATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EVENTPROPAGATIONSTATUS + default: + return 0, errors.New("Unknown EventPropagationStatus value: " + v) + } + return &result, nil +} +func SerializeEventPropagationStatus(values []EventPropagationStatus) []string { + 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/security/event_query.go b/src/internal/connector/graph/betasdk/models/security/event_query.go new file mode 100644 index 000000000..3c50774c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_query.go @@ -0,0 +1,124 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventQuery +type EventQuery 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 OdataType property + odataType *string + // The query property + query *string + // The queryType property + queryType *QueryType +} +// NewEventQuery instantiates a new eventQuery and sets the default values. +func NewEventQuery()(*EventQuery) { + m := &EventQuery{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateEventQueryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventQueryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventQuery(), 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 *EventQuery) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventQuery) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + res["queryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseQueryType) + if err != nil { + return err + } + if val != nil { + m.SetQueryType(val.(*QueryType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *EventQuery) GetOdataType()(*string) { + return m.odataType +} +// GetQuery gets the query property value. The query property +func (m *EventQuery) GetQuery()(*string) { + return m.query +} +// GetQueryType gets the queryType property value. The queryType property +func (m *EventQuery) GetQueryType()(*QueryType) { + return m.queryType +} +// Serialize serializes information the current object +func (m *EventQuery) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + if m.GetQueryType() != nil { + cast := (*m.GetQueryType()).String() + err := writer.WriteStringValue("queryType", &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 *EventQuery) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *EventQuery) SetOdataType(value *string)() { + m.odataType = value +} +// SetQuery sets the query property value. The query property +func (m *EventQuery) SetQuery(value *string)() { + m.query = value +} +// SetQueryType sets the queryType property value. The queryType property +func (m *EventQuery) SetQueryType(value *QueryType)() { + m.queryType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_query_collection_response.go b/src/internal/connector/graph/betasdk/models/security/event_query_collection_response.go new file mode 100644 index 000000000..b3390a1c1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_query_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EventQueryCollectionResponse +type EventQueryCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []EventQueryable +} +// NewEventQueryCollectionResponse instantiates a new EventQueryCollectionResponse and sets the default values. +func NewEventQueryCollectionResponse()(*EventQueryCollectionResponse) { + m := &EventQueryCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateEventQueryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateEventQueryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewEventQueryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *EventQueryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventQueryable, len(val)) + for i, v := range val { + res[i] = v.(EventQueryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *EventQueryCollectionResponse) GetValue()([]EventQueryable) { + return m.value +} +// Serialize serializes information the current object +func (m *EventQueryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *EventQueryCollectionResponse) SetValue(value []EventQueryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_query_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/event_query_collection_responseable.go new file mode 100644 index 000000000..e3ab9bc2d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_query_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// EventQueryCollectionResponseable +type EventQueryCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]EventQueryable) + SetValue(value []EventQueryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_queryable.go b/src/internal/connector/graph/betasdk/models/security/event_queryable.go new file mode 100644 index 000000000..c4febf43c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_queryable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// EventQueryable +type EventQueryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetQuery()(*string) + GetQueryType()(*QueryType) + SetOdataType(value *string)() + SetQuery(value *string)() + SetQueryType(value *QueryType)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/event_status_type.go b/src/internal/connector/graph/betasdk/models/security/event_status_type.go new file mode 100644 index 000000000..752e229a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/event_status_type.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EventStatusType int + +const ( + PENDING_EVENTSTATUSTYPE EventStatusType = iota + ERROR_EVENTSTATUSTYPE + SUCCESS_EVENTSTATUSTYPE + NOTAVALIABLE_EVENTSTATUSTYPE + UNKNOWNFUTUREVALUE_EVENTSTATUSTYPE +) + +func (i EventStatusType) String() string { + return []string{"pending", "error", "success", "notAvaliable", "unknownFutureValue"}[i] +} +func ParseEventStatusType(v string) (interface{}, error) { + result := PENDING_EVENTSTATUSTYPE + switch v { + case "pending": + result = PENDING_EVENTSTATUSTYPE + case "error": + result = ERROR_EVENTSTATUSTYPE + case "success": + result = SUCCESS_EVENTSTATUSTYPE + case "notAvaliable": + result = NOTAVALIABLE_EVENTSTATUSTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EVENTSTATUSTYPE + default: + return 0, errors.New("Unknown EventStatusType value: " + v) + } + return &result, nil +} +func SerializeEventStatusType(values []EventStatusType) []string { + 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/security/evidence_remediation_status.go b/src/internal/connector/graph/betasdk/models/security/evidence_remediation_status.go new file mode 100644 index 000000000..81be64d04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/evidence_remediation_status.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EvidenceRemediationStatus int + +const ( + NONE_EVIDENCEREMEDIATIONSTATUS EvidenceRemediationStatus = iota + REMEDIATED_EVIDENCEREMEDIATIONSTATUS + PREVENTED_EVIDENCEREMEDIATIONSTATUS + BLOCKED_EVIDENCEREMEDIATIONSTATUS + NOTFOUND_EVIDENCEREMEDIATIONSTATUS + UNKNOWNFUTUREVALUE_EVIDENCEREMEDIATIONSTATUS +) + +func (i EvidenceRemediationStatus) String() string { + return []string{"none", "remediated", "prevented", "blocked", "notFound", "unknownFutureValue"}[i] +} +func ParseEvidenceRemediationStatus(v string) (interface{}, error) { + result := NONE_EVIDENCEREMEDIATIONSTATUS + switch v { + case "none": + result = NONE_EVIDENCEREMEDIATIONSTATUS + case "remediated": + result = REMEDIATED_EVIDENCEREMEDIATIONSTATUS + case "prevented": + result = PREVENTED_EVIDENCEREMEDIATIONSTATUS + case "blocked": + result = BLOCKED_EVIDENCEREMEDIATIONSTATUS + case "notFound": + result = NOTFOUND_EVIDENCEREMEDIATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EVIDENCEREMEDIATIONSTATUS + default: + return 0, errors.New("Unknown EvidenceRemediationStatus value: " + v) + } + return &result, nil +} +func SerializeEvidenceRemediationStatus(values []EvidenceRemediationStatus) []string { + 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/security/evidence_role.go b/src/internal/connector/graph/betasdk/models/security/evidence_role.go new file mode 100644 index 000000000..da01af74c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/evidence_role.go @@ -0,0 +1,76 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EvidenceRole int + +const ( + UNKNOWN_EVIDENCEROLE EvidenceRole = iota + CONTEXTUAL_EVIDENCEROLE + SCANNED_EVIDENCEROLE + SOURCE_EVIDENCEROLE + DESTINATION_EVIDENCEROLE + CREATED_EVIDENCEROLE + ADDED_EVIDENCEROLE + COMPROMISED_EVIDENCEROLE + EDITED_EVIDENCEROLE + ATTACKED_EVIDENCEROLE + ATTACKER_EVIDENCEROLE + COMMANDANDCONTROL_EVIDENCEROLE + LOADED_EVIDENCEROLE + SUSPICIOUS_EVIDENCEROLE + POLICYVIOLATOR_EVIDENCEROLE + UNKNOWNFUTUREVALUE_EVIDENCEROLE +) + +func (i EvidenceRole) String() string { + return []string{"unknown", "contextual", "scanned", "source", "destination", "created", "added", "compromised", "edited", "attacked", "attacker", "commandAndControl", "loaded", "suspicious", "policyViolator", "unknownFutureValue"}[i] +} +func ParseEvidenceRole(v string) (interface{}, error) { + result := UNKNOWN_EVIDENCEROLE + switch v { + case "unknown": + result = UNKNOWN_EVIDENCEROLE + case "contextual": + result = CONTEXTUAL_EVIDENCEROLE + case "scanned": + result = SCANNED_EVIDENCEROLE + case "source": + result = SOURCE_EVIDENCEROLE + case "destination": + result = DESTINATION_EVIDENCEROLE + case "created": + result = CREATED_EVIDENCEROLE + case "added": + result = ADDED_EVIDENCEROLE + case "compromised": + result = COMPROMISED_EVIDENCEROLE + case "edited": + result = EDITED_EVIDENCEROLE + case "attacked": + result = ATTACKED_EVIDENCEROLE + case "attacker": + result = ATTACKER_EVIDENCEROLE + case "commandAndControl": + result = COMMANDANDCONTROL_EVIDENCEROLE + case "loaded": + result = LOADED_EVIDENCEROLE + case "suspicious": + result = SUSPICIOUS_EVIDENCEROLE + case "policyViolator": + result = POLICYVIOLATOR_EVIDENCEROLE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EVIDENCEROLE + default: + return 0, errors.New("Unknown EvidenceRole value: " + v) + } + return &result, nil +} +func SerializeEvidenceRole(values []EvidenceRole) []string { + 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/security/evidence_verdict.go b/src/internal/connector/graph/betasdk/models/security/evidence_verdict.go new file mode 100644 index 000000000..d230e8c96 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/evidence_verdict.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type EvidenceVerdict int + +const ( + UNKNOWN_EVIDENCEVERDICT EvidenceVerdict = iota + SUSPICIOUS_EVIDENCEVERDICT + MALICIOUS_EVIDENCEVERDICT + NOTHREATSFOUND_EVIDENCEVERDICT + UNKNOWNFUTUREVALUE_EVIDENCEVERDICT +) + +func (i EvidenceVerdict) String() string { + return []string{"unknown", "suspicious", "malicious", "noThreatsFound", "unknownFutureValue"}[i] +} +func ParseEvidenceVerdict(v string) (interface{}, error) { + result := UNKNOWN_EVIDENCEVERDICT + switch v { + case "unknown": + result = UNKNOWN_EVIDENCEVERDICT + case "suspicious": + result = SUSPICIOUS_EVIDENCEVERDICT + case "malicious": + result = MALICIOUS_EVIDENCEVERDICT + case "noThreatsFound": + result = NOTHREATSFOUND_EVIDENCEVERDICT + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EVIDENCEVERDICT + default: + return 0, errors.New("Unknown EvidenceVerdict value: " + v) + } + return &result, nil +} +func SerializeEvidenceVerdict(values []EvidenceVerdict) []string { + 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/security/export_file_structure.go b/src/internal/connector/graph/betasdk/models/security/export_file_structure.go new file mode 100644 index 000000000..0f2b2a0dc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/export_file_structure.go @@ -0,0 +1,40 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExportFileStructure int + +const ( + NONE_EXPORTFILESTRUCTURE ExportFileStructure = iota + DIRECTORY_EXPORTFILESTRUCTURE + PST_EXPORTFILESTRUCTURE + UNKNOWNFUTUREVALUE_EXPORTFILESTRUCTURE +) + +func (i ExportFileStructure) String() string { + return []string{"none", "directory", "pst", "unknownFutureValue"}[i] +} +func ParseExportFileStructure(v string) (interface{}, error) { + result := NONE_EXPORTFILESTRUCTURE + switch v { + case "none": + result = NONE_EXPORTFILESTRUCTURE + case "directory": + result = DIRECTORY_EXPORTFILESTRUCTURE + case "pst": + result = PST_EXPORTFILESTRUCTURE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXPORTFILESTRUCTURE + default: + return 0, errors.New("Unknown ExportFileStructure value: " + v) + } + return &result, nil +} +func SerializeExportFileStructure(values []ExportFileStructure) []string { + 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/security/export_options.go b/src/internal/connector/graph/betasdk/models/security/export_options.go new file mode 100644 index 000000000..41c497ecf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/export_options.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ExportOptions int + +const ( + ORIGINALFILES_EXPORTOPTIONS ExportOptions = iota + TEXT_EXPORTOPTIONS + PDFREPLACEMENT_EXPORTOPTIONS + FILEINFO_EXPORTOPTIONS + TAGS_EXPORTOPTIONS + UNKNOWNFUTUREVALUE_EXPORTOPTIONS +) + +func (i ExportOptions) String() string { + return []string{"originalFiles", "text", "pdfReplacement", "fileInfo", "tags", "unknownFutureValue"}[i] +} +func ParseExportOptions(v string) (interface{}, error) { + result := ORIGINALFILES_EXPORTOPTIONS + switch v { + case "originalFiles": + result = ORIGINALFILES_EXPORTOPTIONS + case "text": + result = TEXT_EXPORTOPTIONS + case "pdfReplacement": + result = PDFREPLACEMENT_EXPORTOPTIONS + case "fileInfo": + result = FILEINFO_EXPORTOPTIONS + case "tags": + result = TAGS_EXPORTOPTIONS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_EXPORTOPTIONS + default: + return 0, errors.New("Unknown ExportOptions value: " + v) + } + return &result, nil +} +func SerializeExportOptions(values []ExportOptions) []string { + 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/security/file.go b/src/internal/connector/graph/betasdk/models/security/file.go new file mode 100644 index 000000000..9f3f5651e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file.go @@ -0,0 +1,372 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// File provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type File struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The content property + content []byte + // The dateTime property + dateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The extension property + extension *string + // The extractedTextContent property + extractedTextContent []byte + // The mediaType property + mediaType *string + // The name property + name *string + // The otherProperties property + otherProperties StringValueDictionaryable + // The processingStatus property + processingStatus *FileProcessingStatus + // The senderOrAuthors property + senderOrAuthors []string + // The size property + size *int64 + // The sourceType property + sourceType *SourceType + // The subjectTitle property + subjectTitle *string +} +// NewFile instantiates a new file and sets the default values. +func NewFile()(*File) { + m := &File{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryFile": + return NewEdiscoveryFile(), nil + } + } + } + } + return NewFile(), nil +} +// GetContent gets the content property value. The content property +func (m *File) GetContent()([]byte) { + return m.content +} +// GetDateTime gets the dateTime property value. The dateTime property +func (m *File) GetDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.dateTime +} +// GetExtension gets the extension property value. The extension property +func (m *File) GetExtension()(*string) { + return m.extension +} +// GetExtractedTextContent gets the extractedTextContent property value. The extractedTextContent property +func (m *File) GetExtractedTextContent()([]byte) { + return m.extractedTextContent +} +// GetFieldDeserializers the deserialization information for the current model +func (m *File) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["dateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDateTime(val) + } + return nil + } + res["extension"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetExtension(val) + } + return nil + } + res["extractedTextContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetExtractedTextContent(val) + } + return nil + } + res["mediaType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMediaType(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["otherProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateStringValueDictionaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOtherProperties(val.(StringValueDictionaryable)) + } + return nil + } + res["processingStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseFileProcessingStatus) + if err != nil { + return err + } + if val != nil { + m.SetProcessingStatus(val.(*FileProcessingStatus)) + } + return nil + } + res["senderOrAuthors"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetSenderOrAuthors(res) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + res["sourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSourceType) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*SourceType)) + } + return nil + } + res["subjectTitle"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubjectTitle(val) + } + return nil + } + return res +} +// GetMediaType gets the mediaType property value. The mediaType property +func (m *File) GetMediaType()(*string) { + return m.mediaType +} +// GetName gets the name property value. The name property +func (m *File) GetName()(*string) { + return m.name +} +// GetOtherProperties gets the otherProperties property value. The otherProperties property +func (m *File) GetOtherProperties()(StringValueDictionaryable) { + return m.otherProperties +} +// GetProcessingStatus gets the processingStatus property value. The processingStatus property +func (m *File) GetProcessingStatus()(*FileProcessingStatus) { + return m.processingStatus +} +// GetSenderOrAuthors gets the senderOrAuthors property value. The senderOrAuthors property +func (m *File) GetSenderOrAuthors()([]string) { + return m.senderOrAuthors +} +// GetSize gets the size property value. The size property +func (m *File) GetSize()(*int64) { + return m.size +} +// GetSourceType gets the sourceType property value. The sourceType property +func (m *File) GetSourceType()(*SourceType) { + return m.sourceType +} +// GetSubjectTitle gets the subjectTitle property value. The subjectTitle property +func (m *File) GetSubjectTitle()(*string) { + return m.subjectTitle +} +// Serialize serializes information the current object +func (m *File) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("dateTime", m.GetDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("extension", m.GetExtension()) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("extractedTextContent", m.GetExtractedTextContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mediaType", m.GetMediaType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("otherProperties", m.GetOtherProperties()) + if err != nil { + return err + } + } + if m.GetProcessingStatus() != nil { + cast := (*m.GetProcessingStatus()).String() + err = writer.WriteStringValue("processingStatus", &cast) + if err != nil { + return err + } + } + if m.GetSenderOrAuthors() != nil { + err = writer.WriteCollectionOfStringValues("senderOrAuthors", m.GetSenderOrAuthors()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("size", m.GetSize()) + if err != nil { + return err + } + } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err = writer.WriteStringValue("sourceType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("subjectTitle", m.GetSubjectTitle()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The content property +func (m *File) SetContent(value []byte)() { + m.content = value +} +// SetDateTime sets the dateTime property value. The dateTime property +func (m *File) SetDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.dateTime = value +} +// SetExtension sets the extension property value. The extension property +func (m *File) SetExtension(value *string)() { + m.extension = value +} +// SetExtractedTextContent sets the extractedTextContent property value. The extractedTextContent property +func (m *File) SetExtractedTextContent(value []byte)() { + m.extractedTextContent = value +} +// SetMediaType sets the mediaType property value. The mediaType property +func (m *File) SetMediaType(value *string)() { + m.mediaType = value +} +// SetName sets the name property value. The name property +func (m *File) SetName(value *string)() { + m.name = value +} +// SetOtherProperties sets the otherProperties property value. The otherProperties property +func (m *File) SetOtherProperties(value StringValueDictionaryable)() { + m.otherProperties = value +} +// SetProcessingStatus sets the processingStatus property value. The processingStatus property +func (m *File) SetProcessingStatus(value *FileProcessingStatus)() { + m.processingStatus = value +} +// SetSenderOrAuthors sets the senderOrAuthors property value. The senderOrAuthors property +func (m *File) SetSenderOrAuthors(value []string)() { + m.senderOrAuthors = value +} +// SetSize sets the size property value. The size property +func (m *File) SetSize(value *int64)() { + m.size = value +} +// SetSourceType sets the sourceType property value. The sourceType property +func (m *File) SetSourceType(value *SourceType)() { + m.sourceType = value +} +// SetSubjectTitle sets the subjectTitle property value. The subjectTitle property +func (m *File) SetSubjectTitle(value *string)() { + m.subjectTitle = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission.go new file mode 100644 index 000000000..f8570d914 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileContentThreatSubmission +type FileContentThreatSubmission struct { + FileThreatSubmission + // It specifies the file content in base 64 format. + fileContent *string +} +// NewFileContentThreatSubmission instantiates a new FileContentThreatSubmission and sets the default values. +func NewFileContentThreatSubmission()(*FileContentThreatSubmission) { + m := &FileContentThreatSubmission{ + FileThreatSubmission: *NewFileThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.fileContentThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFileContentThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileContentThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileContentThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileContentThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.FileThreatSubmission.GetFieldDeserializers() + res["fileContent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileContent(val) + } + return nil + } + return res +} +// GetFileContent gets the fileContent property value. It specifies the file content in base 64 format. +func (m *FileContentThreatSubmission) GetFileContent()(*string) { + return m.fileContent +} +// Serialize serializes information the current object +func (m *FileContentThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.FileThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileContent", m.GetFileContent()) + if err != nil { + return err + } + } + return nil +} +// SetFileContent sets the fileContent property value. It specifies the file content in base 64 format. +func (m *FileContentThreatSubmission) SetFileContent(value *string)() { + m.fileContent = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_response.go new file mode 100644 index 000000000..6bd3e018d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileContentThreatSubmissionCollectionResponse +type FileContentThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []FileContentThreatSubmissionable +} +// NewFileContentThreatSubmissionCollectionResponse instantiates a new FileContentThreatSubmissionCollectionResponse and sets the default values. +func NewFileContentThreatSubmissionCollectionResponse()(*FileContentThreatSubmissionCollectionResponse) { + m := &FileContentThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileContentThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileContentThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileContentThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileContentThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileContentThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileContentThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(FileContentThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileContentThreatSubmissionCollectionResponse) GetValue()([]FileContentThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileContentThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileContentThreatSubmissionCollectionResponse) SetValue(value []FileContentThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_responseable.go new file mode 100644 index 000000000..cb2ef988b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileContentThreatSubmissionCollectionResponseable +type FileContentThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileContentThreatSubmissionable) + SetValue(value []FileContentThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_content_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submissionable.go new file mode 100644 index 000000000..32bbaf4e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_content_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileContentThreatSubmissionable +type FileContentThreatSubmissionable interface { + FileThreatSubmissionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileContent()(*string) + SetFileContent(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_details.go b/src/internal/connector/graph/betasdk/models/security/file_details.go new file mode 100644 index 000000000..5de95855f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_details.go @@ -0,0 +1,279 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileDetails +type FileDetails 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 name of the file. + fileName *string + // The file path (location) of the file instance. + filePath *string + // The publisher of the file. + filePublisher *string + // The size of the file in bytes. + fileSize *int64 + // The certificate authority (CA) that issued the certificate. + issuer *string + // The OdataType property + odataType *string + // The Sha1 cryptographic hash of the file content. + sha1 *string + // The Sha256 cryptographic hash of the file content. + sha256 *string + // The signer of the signed file. + signer *string +} +// NewFileDetails instantiates a new fileDetails and sets the default values. +func NewFileDetails()(*FileDetails) { + m := &FileDetails{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateFileDetailsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileDetailsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileDetails(), 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 *FileDetails) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileDetails) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + res["filePath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilePath(val) + } + return nil + } + res["filePublisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFilePublisher(val) + } + return nil + } + res["fileSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetFileSize(val) + } + return nil + } + res["issuer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIssuer(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["sha1"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha1(val) + } + return nil + } + res["sha256"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSha256(val) + } + return nil + } + res["signer"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSigner(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. The name of the file. +func (m *FileDetails) GetFileName()(*string) { + return m.fileName +} +// GetFilePath gets the filePath property value. The file path (location) of the file instance. +func (m *FileDetails) GetFilePath()(*string) { + return m.filePath +} +// GetFilePublisher gets the filePublisher property value. The publisher of the file. +func (m *FileDetails) GetFilePublisher()(*string) { + return m.filePublisher +} +// GetFileSize gets the fileSize property value. The size of the file in bytes. +func (m *FileDetails) GetFileSize()(*int64) { + return m.fileSize +} +// GetIssuer gets the issuer property value. The certificate authority (CA) that issued the certificate. +func (m *FileDetails) GetIssuer()(*string) { + return m.issuer +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *FileDetails) GetOdataType()(*string) { + return m.odataType +} +// GetSha1 gets the sha1 property value. The Sha1 cryptographic hash of the file content. +func (m *FileDetails) GetSha1()(*string) { + return m.sha1 +} +// GetSha256 gets the sha256 property value. The Sha256 cryptographic hash of the file content. +func (m *FileDetails) GetSha256()(*string) { + return m.sha256 +} +// GetSigner gets the signer property value. The signer of the signed file. +func (m *FileDetails) GetSigner()(*string) { + return m.signer +} +// Serialize serializes information the current object +func (m *FileDetails) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("filePath", m.GetFilePath()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("filePublisher", m.GetFilePublisher()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("fileSize", m.GetFileSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("issuer", m.GetIssuer()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha1", m.GetSha1()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sha256", m.GetSha256()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("signer", m.GetSigner()) + 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 *FileDetails) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFileName sets the fileName property value. The name of the file. +func (m *FileDetails) SetFileName(value *string)() { + m.fileName = value +} +// SetFilePath sets the filePath property value. The file path (location) of the file instance. +func (m *FileDetails) SetFilePath(value *string)() { + m.filePath = value +} +// SetFilePublisher sets the filePublisher property value. The publisher of the file. +func (m *FileDetails) SetFilePublisher(value *string)() { + m.filePublisher = value +} +// SetFileSize sets the fileSize property value. The size of the file in bytes. +func (m *FileDetails) SetFileSize(value *int64)() { + m.fileSize = value +} +// SetIssuer sets the issuer property value. The certificate authority (CA) that issued the certificate. +func (m *FileDetails) SetIssuer(value *string)() { + m.issuer = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *FileDetails) SetOdataType(value *string)() { + m.odataType = value +} +// SetSha1 sets the sha1 property value. The Sha1 cryptographic hash of the file content. +func (m *FileDetails) SetSha1(value *string)() { + m.sha1 = value +} +// SetSha256 sets the sha256 property value. The Sha256 cryptographic hash of the file content. +func (m *FileDetails) SetSha256(value *string)() { + m.sha256 = value +} +// SetSigner sets the signer property value. The signer of the signed file. +func (m *FileDetails) SetSigner(value *string)() { + m.signer = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_detailsable.go b/src/internal/connector/graph/betasdk/models/security/file_detailsable.go new file mode 100644 index 000000000..989c0ad93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_detailsable.go @@ -0,0 +1,29 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileDetailsable +type FileDetailsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileName()(*string) + GetFilePath()(*string) + GetFilePublisher()(*string) + GetFileSize()(*int64) + GetIssuer()(*string) + GetOdataType()(*string) + GetSha1()(*string) + GetSha256()(*string) + GetSigner()(*string) + SetFileName(value *string)() + SetFilePath(value *string)() + SetFilePublisher(value *string)() + SetFileSize(value *int64)() + SetIssuer(value *string)() + SetOdataType(value *string)() + SetSha1(value *string)() + SetSha256(value *string)() + SetSigner(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_evidence.go b/src/internal/connector/graph/betasdk/models/security/file_evidence.go new file mode 100644 index 000000000..d7e6ca180 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_evidence.go @@ -0,0 +1,113 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileEvidence +type FileEvidence struct { + AlertEvidence + // The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. + detectionStatus *DetectionStatus + // The file details. + fileDetails FileDetailsable + // A unique identifier assigned to a device by Microsoft Defender for Endpoint. + mdeDeviceId *string +} +// NewFileEvidence instantiates a new FileEvidence and sets the default values. +func NewFileEvidence()(*FileEvidence) { + m := &FileEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateFileEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileEvidence(), nil +} +// GetDetectionStatus gets the detectionStatus property value. The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. +func (m *FileEvidence) GetDetectionStatus()(*DetectionStatus) { + return m.detectionStatus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["detectionStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDetectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetDetectionStatus(val.(*DetectionStatus)) + } + return nil + } + res["fileDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetFileDetails(val.(FileDetailsable)) + } + return nil + } + res["mdeDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdeDeviceId(val) + } + return nil + } + return res +} +// GetFileDetails gets the fileDetails property value. The file details. +func (m *FileEvidence) GetFileDetails()(FileDetailsable) { + return m.fileDetails +} +// GetMdeDeviceId gets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *FileEvidence) GetMdeDeviceId()(*string) { + return m.mdeDeviceId +} +// Serialize serializes information the current object +func (m *FileEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + if m.GetDetectionStatus() != nil { + cast := (*m.GetDetectionStatus()).String() + err = writer.WriteStringValue("detectionStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("fileDetails", m.GetFileDetails()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdeDeviceId", m.GetMdeDeviceId()) + if err != nil { + return err + } + } + return nil +} +// SetDetectionStatus sets the detectionStatus property value. The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. +func (m *FileEvidence) SetDetectionStatus(value *DetectionStatus)() { + m.detectionStatus = value +} +// SetFileDetails sets the fileDetails property value. The file details. +func (m *FileEvidence) SetFileDetails(value FileDetailsable)() { + m.fileDetails = value +} +// SetMdeDeviceId sets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *FileEvidence) SetMdeDeviceId(value *string)() { + m.mdeDeviceId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/file_evidenceable.go new file mode 100644 index 000000000..f76610ba9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_evidenceable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileEvidenceable +type FileEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionStatus()(*DetectionStatus) + GetFileDetails()(FileDetailsable) + GetMdeDeviceId()(*string) + SetDetectionStatus(value *DetectionStatus)() + SetFileDetails(value FileDetailsable)() + SetMdeDeviceId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_processing_status.go b/src/internal/connector/graph/betasdk/models/security/file_processing_status.go new file mode 100644 index 000000000..29347f2f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_processing_status.go @@ -0,0 +1,85 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type FileProcessingStatus int + +const ( + SUCCESS_FILEPROCESSINGSTATUS FileProcessingStatus = iota + INTERNALERROR_FILEPROCESSINGSTATUS + UNKNOWNERROR_FILEPROCESSINGSTATUS + PROCESSINGTIMEOUT_FILEPROCESSINGSTATUS + INVALIDFILEID_FILEPROCESSINGSTATUS + FILESIZEISZERO_FILEPROCESSINGSTATUS + FILESIZEISTOOLARGE_FILEPROCESSINGSTATUS + FILEDEPTHLIMITEXCEEDED_FILEPROCESSINGSTATUS + FILEBODYISTOOLONG_FILEPROCESSINGSTATUS + FILETYPEISUNKNOWN_FILEPROCESSINGSTATUS + FILETYPEISNOTSUPPORTED_FILEPROCESSINGSTATUS + MALFORMEDFILE_FILEPROCESSINGSTATUS + PROTECTEDFILE_FILEPROCESSINGSTATUS + POISONFILE_FILEPROCESSINGSTATUS + NOREVIEWSETSUMMARYGENERATED_FILEPROCESSINGSTATUS + EXTRACTIONEXCEPTION_FILEPROCESSINGSTATUS + OCRPROCESSINGTIMEOUT_FILEPROCESSINGSTATUS + OCRFILESIZEEXCEEDSLIMIT_FILEPROCESSINGSTATUS + UNKNOWNFUTUREVALUE_FILEPROCESSINGSTATUS +) + +func (i FileProcessingStatus) String() string { + return []string{"success", "internalError", "unknownError", "processingTimeout", "invalidFileId", "fileSizeIsZero", "fileSizeIsTooLarge", "fileDepthLimitExceeded", "fileBodyIsTooLong", "fileTypeIsUnknown", "fileTypeIsNotSupported", "malformedFile", "protectedFile", "poisonFile", "noReviewSetSummaryGenerated", "extractionException", "ocrProcessingTimeout", "ocrFileSizeExceedsLimit", "unknownFutureValue"}[i] +} +func ParseFileProcessingStatus(v string) (interface{}, error) { + result := SUCCESS_FILEPROCESSINGSTATUS + switch v { + case "success": + result = SUCCESS_FILEPROCESSINGSTATUS + case "internalError": + result = INTERNALERROR_FILEPROCESSINGSTATUS + case "unknownError": + result = UNKNOWNERROR_FILEPROCESSINGSTATUS + case "processingTimeout": + result = PROCESSINGTIMEOUT_FILEPROCESSINGSTATUS + case "invalidFileId": + result = INVALIDFILEID_FILEPROCESSINGSTATUS + case "fileSizeIsZero": + result = FILESIZEISZERO_FILEPROCESSINGSTATUS + case "fileSizeIsTooLarge": + result = FILESIZEISTOOLARGE_FILEPROCESSINGSTATUS + case "fileDepthLimitExceeded": + result = FILEDEPTHLIMITEXCEEDED_FILEPROCESSINGSTATUS + case "fileBodyIsTooLong": + result = FILEBODYISTOOLONG_FILEPROCESSINGSTATUS + case "fileTypeIsUnknown": + result = FILETYPEISUNKNOWN_FILEPROCESSINGSTATUS + case "fileTypeIsNotSupported": + result = FILETYPEISNOTSUPPORTED_FILEPROCESSINGSTATUS + case "malformedFile": + result = MALFORMEDFILE_FILEPROCESSINGSTATUS + case "protectedFile": + result = PROTECTEDFILE_FILEPROCESSINGSTATUS + case "poisonFile": + result = POISONFILE_FILEPROCESSINGSTATUS + case "noReviewSetSummaryGenerated": + result = NOREVIEWSETSUMMARYGENERATED_FILEPROCESSINGSTATUS + case "extractionException": + result = EXTRACTIONEXCEPTION_FILEPROCESSINGSTATUS + case "ocrProcessingTimeout": + result = OCRPROCESSINGTIMEOUT_FILEPROCESSINGSTATUS + case "ocrFileSizeExceedsLimit": + result = OCRFILESIZEEXCEEDSLIMIT_FILEPROCESSINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_FILEPROCESSINGSTATUS + default: + return 0, errors.New("Unknown FileProcessingStatus value: " + v) + } + return &result, nil +} +func SerializeFileProcessingStatus(values []FileProcessingStatus) []string { + 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/security/file_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/file_threat_submission.go new file mode 100644 index 000000000..a96550ce3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_threat_submission.go @@ -0,0 +1,82 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileThreatSubmission +type FileThreatSubmission struct { + ThreatSubmission + // It specifies the file name to be submitted. + fileName *string +} +// NewFileThreatSubmission instantiates a new FileThreatSubmission and sets the default values. +func NewFileThreatSubmission()(*FileThreatSubmission) { + m := &FileThreatSubmission{ + ThreatSubmission: *NewThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.fileThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFileThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.fileContentThreatSubmission": + return NewFileContentThreatSubmission(), nil + case "#microsoft.graph.security.fileUrlThreatSubmission": + return NewFileUrlThreatSubmission(), nil + } + } + } + } + return NewFileThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatSubmission.GetFieldDeserializers() + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(val) + } + return nil + } + return res +} +// GetFileName gets the fileName property value. It specifies the file name to be submitted. +func (m *FileThreatSubmission) GetFileName()(*string) { + return m.fileName +} +// Serialize serializes information the current object +func (m *FileThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + return nil +} +// SetFileName sets the fileName property value. It specifies the file name to be submitted. +func (m *FileThreatSubmission) SetFileName(value *string)() { + m.fileName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_response.go new file mode 100644 index 000000000..c0be4bb40 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileThreatSubmissionCollectionResponse +type FileThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []FileThreatSubmissionable +} +// NewFileThreatSubmissionCollectionResponse instantiates a new FileThreatSubmissionCollectionResponse and sets the default values. +func NewFileThreatSubmissionCollectionResponse()(*FileThreatSubmissionCollectionResponse) { + m := &FileThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(FileThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileThreatSubmissionCollectionResponse) GetValue()([]FileThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileThreatSubmissionCollectionResponse) SetValue(value []FileThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_responseable.go new file mode 100644 index 000000000..9dec74325 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileThreatSubmissionCollectionResponseable +type FileThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileThreatSubmissionable) + SetValue(value []FileThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/file_threat_submissionable.go new file mode 100644 index 000000000..842d486d6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileThreatSubmissionable +type FileThreatSubmissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatSubmissionable + GetFileName()(*string) + SetFileName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission.go new file mode 100644 index 000000000..e6b48f48f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileUrlThreatSubmission +type FileUrlThreatSubmission struct { + FileThreatSubmission + // It specifies the URL of the file which needs to be submitted. + fileUrl *string +} +// NewFileUrlThreatSubmission instantiates a new FileUrlThreatSubmission and sets the default values. +func NewFileUrlThreatSubmission()(*FileUrlThreatSubmission) { + m := &FileUrlThreatSubmission{ + FileThreatSubmission: *NewFileThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.fileUrlThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateFileUrlThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileUrlThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileUrlThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileUrlThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.FileThreatSubmission.GetFieldDeserializers() + res["fileUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileUrl(val) + } + return nil + } + return res +} +// GetFileUrl gets the fileUrl property value. It specifies the URL of the file which needs to be submitted. +func (m *FileUrlThreatSubmission) GetFileUrl()(*string) { + return m.fileUrl +} +// Serialize serializes information the current object +func (m *FileUrlThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.FileThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("fileUrl", m.GetFileUrl()) + if err != nil { + return err + } + } + return nil +} +// SetFileUrl sets the fileUrl property value. It specifies the URL of the file which needs to be submitted. +func (m *FileUrlThreatSubmission) SetFileUrl(value *string)() { + m.fileUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_response.go new file mode 100644 index 000000000..a1b5278b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileUrlThreatSubmissionCollectionResponse +type FileUrlThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []FileUrlThreatSubmissionable +} +// NewFileUrlThreatSubmissionCollectionResponse instantiates a new FileUrlThreatSubmissionCollectionResponse and sets the default values. +func NewFileUrlThreatSubmissionCollectionResponse()(*FileUrlThreatSubmissionCollectionResponse) { + m := &FileUrlThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateFileUrlThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateFileUrlThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewFileUrlThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *FileUrlThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileUrlThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileUrlThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(FileUrlThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *FileUrlThreatSubmissionCollectionResponse) GetValue()([]FileUrlThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *FileUrlThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *FileUrlThreatSubmissionCollectionResponse) SetValue(value []FileUrlThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_responseable.go new file mode 100644 index 000000000..a8a224d00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// FileUrlThreatSubmissionCollectionResponseable +type FileUrlThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]FileUrlThreatSubmissionable) + SetValue(value []FileUrlThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/file_url_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submissionable.go new file mode 100644 index 000000000..07c50751d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/file_url_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// FileUrlThreatSubmissionable +type FileUrlThreatSubmissionable interface { + FileThreatSubmissionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileUrl()(*string) + SetFileUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/fileable.go b/src/internal/connector/graph/betasdk/models/security/fileable.go new file mode 100644 index 000000000..c4d292746 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/fileable.go @@ -0,0 +1,37 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Fileable +type Fileable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetExtension()(*string) + GetExtractedTextContent()([]byte) + GetMediaType()(*string) + GetName()(*string) + GetOtherProperties()(StringValueDictionaryable) + GetProcessingStatus()(*FileProcessingStatus) + GetSenderOrAuthors()([]string) + GetSize()(*int64) + GetSourceType()(*SourceType) + GetSubjectTitle()(*string) + SetContent(value []byte)() + SetDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetExtension(value *string)() + SetExtractedTextContent(value []byte)() + SetMediaType(value *string)() + SetName(value *string)() + SetOtherProperties(value StringValueDictionaryable)() + SetProcessingStatus(value *FileProcessingStatus)() + SetSenderOrAuthors(value []string)() + SetSize(value *int64)() + SetSourceType(value *SourceType)() + SetSubjectTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/hunting_row_result.go b/src/internal/connector/graph/betasdk/models/security/hunting_row_result.go new file mode 100644 index 000000000..c20837d38 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/hunting_row_result.go @@ -0,0 +1,71 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HuntingRowResult +type HuntingRowResult 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 OdataType property + odataType *string +} +// NewHuntingRowResult instantiates a new huntingRowResult and sets the default values. +func NewHuntingRowResult()(*HuntingRowResult) { + m := &HuntingRowResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateHuntingRowResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHuntingRowResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHuntingRowResult(), 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 *HuntingRowResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HuntingRowResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *HuntingRowResult) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *HuntingRowResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *HuntingRowResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *HuntingRowResult) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_response.go b/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_response.go new file mode 100644 index 000000000..2db3a6981 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// HuntingRowResultCollectionResponse +type HuntingRowResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []HuntingRowResultable +} +// NewHuntingRowResultCollectionResponse instantiates a new HuntingRowResultCollectionResponse and sets the default values. +func NewHuntingRowResultCollectionResponse()(*HuntingRowResultCollectionResponse) { + m := &HuntingRowResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateHuntingRowResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateHuntingRowResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewHuntingRowResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *HuntingRowResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHuntingRowResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HuntingRowResultable, len(val)) + for i, v := range val { + res[i] = v.(HuntingRowResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *HuntingRowResultCollectionResponse) GetValue()([]HuntingRowResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *HuntingRowResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *HuntingRowResultCollectionResponse) SetValue(value []HuntingRowResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_responseable.go new file mode 100644 index 000000000..43f2c4e0d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/hunting_row_result_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// HuntingRowResultCollectionResponseable +type HuntingRowResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]HuntingRowResultable) + SetValue(value []HuntingRowResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/hunting_row_resultable.go b/src/internal/connector/graph/betasdk/models/security/hunting_row_resultable.go new file mode 100644 index 000000000..492a305b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/hunting_row_resultable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// HuntingRowResultable +type HuntingRowResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/incident.go b/src/internal/connector/graph/betasdk/models/security/incident.go new file mode 100644 index 000000000..58c96efc9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/incident.go @@ -0,0 +1,424 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Incident provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Incident struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The list of related alerts. Supports $expand. + alerts []Alertable + // Owner of the incident, or null if no owner is assigned. Free editable text. + assignedTo *string + // The specification for the incident. Possible values are: unknown, falsePositive, truePositive, informationalExpectedActivity, unknownFutureValue. + classification *AlertClassification + // Array of comments created by the Security Operations (SecOps) team when the incident is managed. + comments []AlertCommentable + // Time when the incident was first created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Array of custom tags associated with an incident. + customTags []string + // Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. + determination *AlertDetermination + // The incident name. + displayName *string + // The URL for the incident page in the Microsoft 365 Defender portal. + incidentWebUrl *string + // Time when the incident was last updated. + lastUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Only populated in case an incident is grouped together with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected. + redirectIncidentId *string + // The severity property + severity *AlertSeverity + // The status property + status *IncidentStatus + // The Azure Active Directory tenant in which the alert was created. + tenantId *string +} +// NewIncident instantiates a new incident and sets the default values. +func NewIncident()(*Incident) { + m := &Incident{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateIncidentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncidentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncident(), nil +} +// GetAlerts gets the alerts property value. The list of related alerts. Supports $expand. +func (m *Incident) GetAlerts()([]Alertable) { + return m.alerts +} +// GetAssignedTo gets the assignedTo property value. Owner of the incident, or null if no owner is assigned. Free editable text. +func (m *Incident) GetAssignedTo()(*string) { + return m.assignedTo +} +// GetClassification gets the classification property value. The specification for the incident. Possible values are: unknown, falsePositive, truePositive, informationalExpectedActivity, unknownFutureValue. +func (m *Incident) GetClassification()(*AlertClassification) { + return m.classification +} +// GetComments gets the comments property value. Array of comments created by the Security Operations (SecOps) team when the incident is managed. +func (m *Incident) GetComments()([]AlertCommentable) { + return m.comments +} +// GetCreatedDateTime gets the createdDateTime property value. Time when the incident was first created. +func (m *Incident) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetCustomTags gets the customTags property value. Array of custom tags associated with an incident. +func (m *Incident) GetCustomTags()([]string) { + return m.customTags +} +// GetDetermination gets the determination property value. Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. +func (m *Incident) GetDetermination()(*AlertDetermination) { + return m.determination +} +// GetDisplayName gets the displayName property value. The incident name. +func (m *Incident) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Incident) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["alerts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Alertable, len(val)) + for i, v := range val { + res[i] = v.(Alertable) + } + m.SetAlerts(res) + } + return nil + } + res["assignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAssignedTo(val) + } + return nil + } + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertClassification) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*AlertClassification)) + } + return nil + } + res["comments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAlertCommentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AlertCommentable, len(val)) + for i, v := range val { + res[i] = v.(AlertCommentable) + } + m.SetComments(res) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["customTags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetCustomTags(res) + } + return nil + } + res["determination"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertDetermination) + if err != nil { + return err + } + if val != nil { + m.SetDetermination(val.(*AlertDetermination)) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["incidentWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIncidentWebUrl(val) + } + return nil + } + res["lastUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdateDateTime(val) + } + return nil + } + res["redirectIncidentId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedirectIncidentId(val) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseAlertSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*AlertSeverity)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseIncidentStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*IncidentStatus)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetIncidentWebUrl gets the incidentWebUrl property value. The URL for the incident page in the Microsoft 365 Defender portal. +func (m *Incident) GetIncidentWebUrl()(*string) { + return m.incidentWebUrl +} +// GetLastUpdateDateTime gets the lastUpdateDateTime property value. Time when the incident was last updated. +func (m *Incident) GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdateDateTime +} +// GetRedirectIncidentId gets the redirectIncidentId property value. Only populated in case an incident is grouped together with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected. +func (m *Incident) GetRedirectIncidentId()(*string) { + return m.redirectIncidentId +} +// GetSeverity gets the severity property value. The severity property +func (m *Incident) GetSeverity()(*AlertSeverity) { + return m.severity +} +// GetStatus gets the status property value. The status property +func (m *Incident) GetStatus()(*IncidentStatus) { + return m.status +} +// GetTenantId gets the tenantId property value. The Azure Active Directory tenant in which the alert was created. +func (m *Incident) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *Incident) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetAlerts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAlerts())) + for i, v := range m.GetAlerts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("alerts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("assignedTo", m.GetAssignedTo()) + if err != nil { + return err + } + } + if m.GetClassification() != nil { + cast := (*m.GetClassification()).String() + err = writer.WriteStringValue("classification", &cast) + if err != nil { + return err + } + } + if m.GetComments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComments())) + for i, v := range m.GetComments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("comments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetCustomTags() != nil { + err = writer.WriteCollectionOfStringValues("customTags", m.GetCustomTags()) + if err != nil { + return err + } + } + if m.GetDetermination() != nil { + cast := (*m.GetDetermination()).String() + err = writer.WriteStringValue("determination", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("incidentWebUrl", m.GetIncidentWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdateDateTime", m.GetLastUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("redirectIncidentId", m.GetRedirectIncidentId()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetAlerts sets the alerts property value. The list of related alerts. Supports $expand. +func (m *Incident) SetAlerts(value []Alertable)() { + m.alerts = value +} +// SetAssignedTo sets the assignedTo property value. Owner of the incident, or null if no owner is assigned. Free editable text. +func (m *Incident) SetAssignedTo(value *string)() { + m.assignedTo = value +} +// SetClassification sets the classification property value. The specification for the incident. Possible values are: unknown, falsePositive, truePositive, informationalExpectedActivity, unknownFutureValue. +func (m *Incident) SetClassification(value *AlertClassification)() { + m.classification = value +} +// SetComments sets the comments property value. Array of comments created by the Security Operations (SecOps) team when the incident is managed. +func (m *Incident) SetComments(value []AlertCommentable)() { + m.comments = value +} +// SetCreatedDateTime sets the createdDateTime property value. Time when the incident was first created. +func (m *Incident) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetCustomTags sets the customTags property value. Array of custom tags associated with an incident. +func (m *Incident) SetCustomTags(value []string)() { + m.customTags = value +} +// SetDetermination sets the determination property value. Specifies the determination of the incident. Possible values are: unknown, apt, malware, securityPersonnel, securityTesting, unwantedSoftware, other, multiStagedAttack, compromisedUser, phishing, maliciousUserActivity, clean, insufficientData, confirmedUserActivity, lineOfBusinessApplication, unknownFutureValue. +func (m *Incident) SetDetermination(value *AlertDetermination)() { + m.determination = value +} +// SetDisplayName sets the displayName property value. The incident name. +func (m *Incident) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIncidentWebUrl sets the incidentWebUrl property value. The URL for the incident page in the Microsoft 365 Defender portal. +func (m *Incident) SetIncidentWebUrl(value *string)() { + m.incidentWebUrl = value +} +// SetLastUpdateDateTime sets the lastUpdateDateTime property value. Time when the incident was last updated. +func (m *Incident) SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdateDateTime = value +} +// SetRedirectIncidentId sets the redirectIncidentId property value. Only populated in case an incident is grouped together with another incident, as part of the logic that processes incidents. In such a case, the status property is redirected. +func (m *Incident) SetRedirectIncidentId(value *string)() { + m.redirectIncidentId = value +} +// SetSeverity sets the severity property value. The severity property +func (m *Incident) SetSeverity(value *AlertSeverity)() { + m.severity = value +} +// SetStatus sets the status property value. The status property +func (m *Incident) SetStatus(value *IncidentStatus)() { + m.status = value +} +// SetTenantId sets the tenantId property value. The Azure Active Directory tenant in which the alert was created. +func (m *Incident) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/incident_collection_response.go b/src/internal/connector/graph/betasdk/models/security/incident_collection_response.go new file mode 100644 index 000000000..d82308ad9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/incident_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// IncidentCollectionResponse +type IncidentCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []Incidentable +} +// NewIncidentCollectionResponse instantiates a new IncidentCollectionResponse and sets the default values. +func NewIncidentCollectionResponse()(*IncidentCollectionResponse) { + m := &IncidentCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateIncidentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIncidentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIncidentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IncidentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIncidentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Incidentable, len(val)) + for i, v := range val { + res[i] = v.(Incidentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *IncidentCollectionResponse) GetValue()([]Incidentable) { + return m.value +} +// Serialize serializes information the current object +func (m *IncidentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *IncidentCollectionResponse) SetValue(value []Incidentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/incident_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/incident_collection_responseable.go new file mode 100644 index 000000000..de6f4ef72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/incident_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// IncidentCollectionResponseable +type IncidentCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]Incidentable) + SetValue(value []Incidentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/incident_status.go b/src/internal/connector/graph/betasdk/models/security/incident_status.go new file mode 100644 index 000000000..08f381799 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/incident_status.go @@ -0,0 +1,40 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type IncidentStatus int + +const ( + ACTIVE_INCIDENTSTATUS IncidentStatus = iota + RESOLVED_INCIDENTSTATUS + REDIRECTED_INCIDENTSTATUS + UNKNOWNFUTUREVALUE_INCIDENTSTATUS +) + +func (i IncidentStatus) String() string { + return []string{"active", "resolved", "redirected", "unknownFutureValue"}[i] +} +func ParseIncidentStatus(v string) (interface{}, error) { + result := ACTIVE_INCIDENTSTATUS + switch v { + case "active": + result = ACTIVE_INCIDENTSTATUS + case "resolved": + result = RESOLVED_INCIDENTSTATUS + case "redirected": + result = REDIRECTED_INCIDENTSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_INCIDENTSTATUS + default: + return 0, errors.New("Unknown IncidentStatus value: " + v) + } + return &result, nil +} +func SerializeIncidentStatus(values []IncidentStatus) []string { + 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/security/incidentable.go b/src/internal/connector/graph/betasdk/models/security/incidentable.go new file mode 100644 index 000000000..c16770856 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/incidentable.go @@ -0,0 +1,41 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Incidentable +type Incidentable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlerts()([]Alertable) + GetAssignedTo()(*string) + GetClassification()(*AlertClassification) + GetComments()([]AlertCommentable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCustomTags()([]string) + GetDetermination()(*AlertDetermination) + GetDisplayName()(*string) + GetIncidentWebUrl()(*string) + GetLastUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRedirectIncidentId()(*string) + GetSeverity()(*AlertSeverity) + GetStatus()(*IncidentStatus) + GetTenantId()(*string) + SetAlerts(value []Alertable)() + SetAssignedTo(value *string)() + SetClassification(value *AlertClassification)() + SetComments(value []AlertCommentable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCustomTags(value []string)() + SetDetermination(value *AlertDetermination)() + SetDisplayName(value *string)() + SetIncidentWebUrl(value *string)() + SetLastUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRedirectIncidentId(value *string)() + SetSeverity(value *AlertSeverity)() + SetStatus(value *IncidentStatus)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection.go b/src/internal/connector/graph/betasdk/models/security/information_protection.go new file mode 100644 index 000000000..0bc48ef95 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection.go @@ -0,0 +1,95 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtection +type InformationProtection struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Read the Microsoft Purview Information Protection policy settings for the user or organization. + labelPolicySettings InformationProtectionPolicySettingable + // Read the Microsoft Purview Information Protection labels for the user or organization. + sensitivityLabels []SensitivityLabelable +} +// NewInformationProtection instantiates a new informationProtection and sets the default values. +func NewInformationProtection()(*InformationProtection) { + m := &InformationProtection{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateInformationProtectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtection(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["labelPolicySettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationProtectionPolicySettingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLabelPolicySettings(val.(InformationProtectionPolicySettingable)) + } + return nil + } + res["sensitivityLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetSensitivityLabels(res) + } + return nil + } + return res +} +// GetLabelPolicySettings gets the labelPolicySettings property value. Read the Microsoft Purview Information Protection policy settings for the user or organization. +func (m *InformationProtection) GetLabelPolicySettings()(InformationProtectionPolicySettingable) { + return m.labelPolicySettings +} +// GetSensitivityLabels gets the sensitivityLabels property value. Read the Microsoft Purview Information Protection labels for the user or organization. +func (m *InformationProtection) GetSensitivityLabels()([]SensitivityLabelable) { + return m.sensitivityLabels +} +// Serialize serializes information the current object +func (m *InformationProtection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("labelPolicySettings", m.GetLabelPolicySettings()) + if err != nil { + return err + } + } + if m.GetSensitivityLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSensitivityLabels())) + for i, v := range m.GetSensitivityLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sensitivityLabels", cast) + if err != nil { + return err + } + } + return nil +} +// SetLabelPolicySettings sets the labelPolicySettings property value. Read the Microsoft Purview Information Protection policy settings for the user or organization. +func (m *InformationProtection) SetLabelPolicySettings(value InformationProtectionPolicySettingable)() { + m.labelPolicySettings = value +} +// SetSensitivityLabels sets the sensitivityLabels property value. Read the Microsoft Purview Information Protection labels for the user or organization. +func (m *InformationProtection) SetSensitivityLabels(value []SensitivityLabelable)() { + m.sensitivityLabels = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_action.go b/src/internal/connector/graph/betasdk/models/security/information_protection_action.go new file mode 100644 index 000000000..68c354648 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_action.go @@ -0,0 +1,117 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionAction +type InformationProtectionAction 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 OdataType property + odataType *string +} +// NewInformationProtectionAction instantiates a new informationProtectionAction and sets the default values. +func NewInformationProtectionAction()(*InformationProtectionAction) { + m := &InformationProtectionAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateInformationProtectionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.addContentFooterAction": + return NewAddContentFooterAction(), nil + case "#microsoft.graph.security.addContentHeaderAction": + return NewAddContentHeaderAction(), nil + case "#microsoft.graph.security.addWatermarkAction": + return NewAddWatermarkAction(), nil + case "#microsoft.graph.security.applyLabelAction": + return NewApplyLabelAction(), nil + case "#microsoft.graph.security.customAction": + return NewCustomAction(), nil + case "#microsoft.graph.security.justifyAction": + return NewJustifyAction(), nil + case "#microsoft.graph.security.metadataAction": + return NewMetadataAction(), nil + case "#microsoft.graph.security.protectAdhocAction": + return NewProtectAdhocAction(), nil + case "#microsoft.graph.security.protectByTemplateAction": + return NewProtectByTemplateAction(), nil + case "#microsoft.graph.security.protectDoNotForwardAction": + return NewProtectDoNotForwardAction(), nil + case "#microsoft.graph.security.recommendLabelAction": + return NewRecommendLabelAction(), nil + case "#microsoft.graph.security.removeContentFooterAction": + return NewRemoveContentFooterAction(), nil + case "#microsoft.graph.security.removeContentHeaderAction": + return NewRemoveContentHeaderAction(), nil + case "#microsoft.graph.security.removeProtectionAction": + return NewRemoveProtectionAction(), nil + case "#microsoft.graph.security.removeWatermarkAction": + return NewRemoveWatermarkAction(), nil + } + } + } + } + return NewInformationProtectionAction(), 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 *InformationProtectionAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *InformationProtectionAction) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *InformationProtectionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *InformationProtectionAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *InformationProtectionAction) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_response.go b/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_response.go new file mode 100644 index 000000000..6164739ae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtectionActionCollectionResponse +type InformationProtectionActionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []InformationProtectionActionable +} +// NewInformationProtectionActionCollectionResponse instantiates a new InformationProtectionActionCollectionResponse and sets the default values. +func NewInformationProtectionActionCollectionResponse()(*InformationProtectionActionCollectionResponse) { + m := &InformationProtectionActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateInformationProtectionActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *InformationProtectionActionCollectionResponse) GetValue()([]InformationProtectionActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *InformationProtectionActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *InformationProtectionActionCollectionResponse) SetValue(value []InformationProtectionActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_responseable.go new file mode 100644 index 000000000..43659a448 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_action_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtectionActionCollectionResponseable +type InformationProtectionActionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]InformationProtectionActionable) + SetValue(value []InformationProtectionActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_actionable.go b/src/internal/connector/graph/betasdk/models/security/information_protection_actionable.go new file mode 100644 index 000000000..53a0b1849 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_actionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// InformationProtectionActionable +type InformationProtectionActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_policy_setting.go b/src/internal/connector/graph/betasdk/models/security/information_protection_policy_setting.go new file mode 100644 index 000000000..3918a7280 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_policy_setting.go @@ -0,0 +1,139 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtectionPolicySetting +type InformationProtectionPolicySetting struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The defaultLabelId property + defaultLabelId *string + // Exposes whether justification input is required on label downgrade. + isDowngradeJustificationRequired *bool + // Exposes whether mandatory labeling is enabled. + isMandatory *bool + // Exposes the more information URL that can be configured by the administrator. + moreInfoUrl *string +} +// NewInformationProtectionPolicySetting instantiates a new informationProtectionPolicySetting and sets the default values. +func NewInformationProtectionPolicySetting()(*InformationProtectionPolicySetting) { + m := &InformationProtectionPolicySetting{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateInformationProtectionPolicySettingFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateInformationProtectionPolicySettingFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewInformationProtectionPolicySetting(), nil +} +// GetDefaultLabelId gets the defaultLabelId property value. The defaultLabelId property +func (m *InformationProtectionPolicySetting) GetDefaultLabelId()(*string) { + return m.defaultLabelId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *InformationProtectionPolicySetting) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["defaultLabelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultLabelId(val) + } + return nil + } + res["isDowngradeJustificationRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDowngradeJustificationRequired(val) + } + return nil + } + res["isMandatory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMandatory(val) + } + return nil + } + res["moreInfoUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMoreInfoUrl(val) + } + return nil + } + return res +} +// GetIsDowngradeJustificationRequired gets the isDowngradeJustificationRequired property value. Exposes whether justification input is required on label downgrade. +func (m *InformationProtectionPolicySetting) GetIsDowngradeJustificationRequired()(*bool) { + return m.isDowngradeJustificationRequired +} +// GetIsMandatory gets the isMandatory property value. Exposes whether mandatory labeling is enabled. +func (m *InformationProtectionPolicySetting) GetIsMandatory()(*bool) { + return m.isMandatory +} +// GetMoreInfoUrl gets the moreInfoUrl property value. Exposes the more information URL that can be configured by the administrator. +func (m *InformationProtectionPolicySetting) GetMoreInfoUrl()(*string) { + return m.moreInfoUrl +} +// Serialize serializes information the current object +func (m *InformationProtectionPolicySetting) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("defaultLabelId", m.GetDefaultLabelId()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDowngradeJustificationRequired", m.GetIsDowngradeJustificationRequired()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMandatory", m.GetIsMandatory()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("moreInfoUrl", m.GetMoreInfoUrl()) + if err != nil { + return err + } + } + return nil +} +// SetDefaultLabelId sets the defaultLabelId property value. The defaultLabelId property +func (m *InformationProtectionPolicySetting) SetDefaultLabelId(value *string)() { + m.defaultLabelId = value +} +// SetIsDowngradeJustificationRequired sets the isDowngradeJustificationRequired property value. Exposes whether justification input is required on label downgrade. +func (m *InformationProtectionPolicySetting) SetIsDowngradeJustificationRequired(value *bool)() { + m.isDowngradeJustificationRequired = value +} +// SetIsMandatory sets the isMandatory property value. Exposes whether mandatory labeling is enabled. +func (m *InformationProtectionPolicySetting) SetIsMandatory(value *bool)() { + m.isMandatory = value +} +// SetMoreInfoUrl sets the moreInfoUrl property value. Exposes the more information URL that can be configured by the administrator. +func (m *InformationProtectionPolicySetting) SetMoreInfoUrl(value *string)() { + m.moreInfoUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protection_policy_settingable.go b/src/internal/connector/graph/betasdk/models/security/information_protection_policy_settingable.go new file mode 100644 index 000000000..6510e9b06 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protection_policy_settingable.go @@ -0,0 +1,20 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtectionPolicySettingable +type InformationProtectionPolicySettingable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultLabelId()(*string) + GetIsDowngradeJustificationRequired()(*bool) + GetIsMandatory()(*bool) + GetMoreInfoUrl()(*string) + SetDefaultLabelId(value *string)() + SetIsDowngradeJustificationRequired(value *bool)() + SetIsMandatory(value *bool)() + SetMoreInfoUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/information_protectionable.go b/src/internal/connector/graph/betasdk/models/security/information_protectionable.go new file mode 100644 index 000000000..246c9bd61 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/information_protectionable.go @@ -0,0 +1,16 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// InformationProtectionable +type InformationProtectionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLabelPolicySettings()(InformationProtectionPolicySettingable) + GetSensitivityLabels()([]SensitivityLabelable) + SetLabelPolicySettings(value InformationProtectionPolicySettingable)() + SetSensitivityLabels(value []SensitivityLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ip_evidence.go b/src/internal/connector/graph/betasdk/models/security/ip_evidence.go new file mode 100644 index 000000000..b6cae9a4b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ip_evidence.go @@ -0,0 +1,86 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpEvidence +type IpEvidence struct { + AlertEvidence + // The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc..). + countryLetterCode *string + // The value of the IP Address, can be either in V4 address or V6 address format. + ipAddress *string +} +// NewIpEvidence instantiates a new IpEvidence and sets the default values. +func NewIpEvidence()(*IpEvidence) { + m := &IpEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateIpEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateIpEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewIpEvidence(), nil +} +// GetCountryLetterCode gets the countryLetterCode property value. The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc..). +func (m *IpEvidence) GetCountryLetterCode()(*string) { + return m.countryLetterCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *IpEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["countryLetterCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCountryLetterCode(val) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(val) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. The value of the IP Address, can be either in V4 address or V6 address format. +func (m *IpEvidence) GetIpAddress()(*string) { + return m.ipAddress +} +// Serialize serializes information the current object +func (m *IpEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("countryLetterCode", m.GetCountryLetterCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + return nil +} +// SetCountryLetterCode sets the countryLetterCode property value. The two-letter country code according to ISO 3166 format, for example: US, UK, CA, etc..). +func (m *IpEvidence) SetCountryLetterCode(value *string)() { + m.countryLetterCode = value +} +// SetIpAddress sets the ipAddress property value. The value of the IP Address, can be either in V4 address or V6 address format. +func (m *IpEvidence) SetIpAddress(value *string)() { + m.ipAddress = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ip_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/ip_evidenceable.go new file mode 100644 index 000000000..a043954d2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ip_evidenceable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// IpEvidenceable +type IpEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCountryLetterCode()(*string) + GetIpAddress()(*string) + SetCountryLetterCode(value *string)() + SetIpAddress(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/justify_action.go b/src/internal/connector/graph/betasdk/models/security/justify_action.go new file mode 100644 index 000000000..b225bc7d4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/justify_action.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JustifyAction +type JustifyAction struct { + InformationProtectionAction +} +// NewJustifyAction instantiates a new JustifyAction and sets the default values. +func NewJustifyAction()(*JustifyAction) { + m := &JustifyAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.justifyAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateJustifyActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateJustifyActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewJustifyAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *JustifyAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *JustifyAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/justify_actionable.go b/src/internal/connector/graph/betasdk/models/security/justify_actionable.go new file mode 100644 index 000000000..266d83ad7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/justify_actionable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// JustifyActionable +type JustifyActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/key_value_pair.go b/src/internal/connector/graph/betasdk/models/security/key_value_pair.go new file mode 100644 index 000000000..5cf88f99f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/key_value_pair.go @@ -0,0 +1,123 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePair +type KeyValuePair struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name for this key-value pair. + name *string + // The OdataType property + odataType *string + // Value for this key-value pair. + value *string +} +// NewKeyValuePair instantiates a new keyValuePair and sets the default values. +func NewKeyValuePair()(*KeyValuePair) { + m := &KeyValuePair{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateKeyValuePairFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValuePairFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValuePair(), 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 *KeyValuePair) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValuePair) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 +} +// GetName gets the name property value. Name for this key-value pair. +func (m *KeyValuePair) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *KeyValuePair) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value for this key-value pair. +func (m *KeyValuePair) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValuePair) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *KeyValuePair) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name for this key-value pair. +func (m *KeyValuePair) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *KeyValuePair) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value for this key-value pair. +func (m *KeyValuePair) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_response.go b/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_response.go new file mode 100644 index 000000000..a1f5c6c10 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// KeyValuePairCollectionResponse +type KeyValuePairCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []KeyValuePairable +} +// NewKeyValuePairCollectionResponse instantiates a new KeyValuePairCollectionResponse and sets the default values. +func NewKeyValuePairCollectionResponse()(*KeyValuePairCollectionResponse) { + m := &KeyValuePairCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateKeyValuePairCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateKeyValuePairCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewKeyValuePairCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *KeyValuePairCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *KeyValuePairCollectionResponse) GetValue()([]KeyValuePairable) { + return m.value +} +// Serialize serializes information the current object +func (m *KeyValuePairCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *KeyValuePairCollectionResponse) SetValue(value []KeyValuePairable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_responseable.go new file mode 100644 index 000000000..a4b85fb91 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/key_value_pair_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// KeyValuePairCollectionResponseable +type KeyValuePairCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]KeyValuePairable) + SetValue(value []KeyValuePairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/key_value_pairable.go b/src/internal/connector/graph/betasdk/models/security/key_value_pairable.go new file mode 100644 index 000000000..8f53592eb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/key_value_pairable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// KeyValuePairable +type KeyValuePairable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/labels_root.go b/src/internal/connector/graph/betasdk/models/security/labels_root.go new file mode 100644 index 000000000..40f5d6b76 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/labels_root.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LabelsRoot +type LabelsRoot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The retentionLabels property + retentionLabels []RetentionLabelable +} +// NewLabelsRoot instantiates a new labelsRoot and sets the default values. +func NewLabelsRoot()(*LabelsRoot) { + m := &LabelsRoot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateLabelsRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLabelsRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLabelsRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LabelsRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["retentionLabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionLabelable, len(val)) + for i, v := range val { + res[i] = v.(RetentionLabelable) + } + m.SetRetentionLabels(res) + } + return nil + } + return res +} +// GetRetentionLabels gets the retentionLabels property value. The retentionLabels property +func (m *LabelsRoot) GetRetentionLabels()([]RetentionLabelable) { + return m.retentionLabels +} +// Serialize serializes information the current object +func (m *LabelsRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetRetentionLabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRetentionLabels())) + for i, v := range m.GetRetentionLabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("retentionLabels", cast) + if err != nil { + return err + } + } + return nil +} +// SetRetentionLabels sets the retentionLabels property value. The retentionLabels property +func (m *LabelsRoot) SetRetentionLabels(value []RetentionLabelable)() { + m.retentionLabels = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/labels_rootable.go b/src/internal/connector/graph/betasdk/models/security/labels_rootable.go new file mode 100644 index 000000000..cc486f90b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/labels_rootable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LabelsRootable +type LabelsRootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRetentionLabels()([]RetentionLabelable) + SetRetentionLabels(value []RetentionLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/logged_on_user.go b/src/internal/connector/graph/betasdk/models/security/logged_on_user.go new file mode 100644 index 000000000..d520256de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/logged_on_user.go @@ -0,0 +1,123 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUser +type LoggedOnUser struct { + // User account name of the logged-on user. + accountName *string + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // User account domain of the logged-on user. + domainName *string + // The OdataType property + odataType *string +} +// NewLoggedOnUser instantiates a new loggedOnUser and sets the default values. +func NewLoggedOnUser()(*LoggedOnUser) { + m := &LoggedOnUser{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateLoggedOnUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoggedOnUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoggedOnUser(), nil +} +// GetAccountName gets the accountName property value. User account name of the logged-on user. +func (m *LoggedOnUser) GetAccountName()(*string) { + return m.accountName +} +// 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 *LoggedOnUser) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDomainName gets the domainName property value. User account domain of the logged-on user. +func (m *LoggedOnUser) GetDomainName()(*string) { + return m.domainName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoggedOnUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *LoggedOnUser) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *LoggedOnUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountName sets the accountName property value. User account name of the logged-on user. +func (m *LoggedOnUser) SetAccountName(value *string)() { + m.accountName = value +} +// 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 *LoggedOnUser) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDomainName sets the domainName property value. User account domain of the logged-on user. +func (m *LoggedOnUser) SetDomainName(value *string)() { + m.domainName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *LoggedOnUser) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_response.go b/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_response.go new file mode 100644 index 000000000..75cef29b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LoggedOnUserCollectionResponse +type LoggedOnUserCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []LoggedOnUserable +} +// NewLoggedOnUserCollectionResponse instantiates a new LoggedOnUserCollectionResponse and sets the default values. +func NewLoggedOnUserCollectionResponse()(*LoggedOnUserCollectionResponse) { + m := &LoggedOnUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateLoggedOnUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateLoggedOnUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewLoggedOnUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *LoggedOnUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLoggedOnUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LoggedOnUserable, len(val)) + for i, v := range val { + res[i] = v.(LoggedOnUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *LoggedOnUserCollectionResponse) GetValue()([]LoggedOnUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *LoggedOnUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *LoggedOnUserCollectionResponse) SetValue(value []LoggedOnUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_responseable.go new file mode 100644 index 000000000..406e6278e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/logged_on_user_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// LoggedOnUserCollectionResponseable +type LoggedOnUserCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]LoggedOnUserable) + SetValue(value []LoggedOnUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/logged_on_userable.go b/src/internal/connector/graph/betasdk/models/security/logged_on_userable.go new file mode 100644 index 000000000..fc2b5f2d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/logged_on_userable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// LoggedOnUserable +type LoggedOnUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountName()(*string) + GetDomainName()(*string) + GetOdataType()(*string) + SetAccountName(value *string)() + SetDomainName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/long_running_operation_status.go b/src/internal/connector/graph/betasdk/models/security/long_running_operation_status.go new file mode 100644 index 000000000..950a05ae6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/long_running_operation_status.go @@ -0,0 +1,46 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type LongRunningOperationStatus int + +const ( + NOTSTARTED_LONGRUNNINGOPERATIONSTATUS LongRunningOperationStatus = iota + RUNNING_LONGRUNNINGOPERATIONSTATUS + SUCCEEDED_LONGRUNNINGOPERATIONSTATUS + FAILED_LONGRUNNINGOPERATIONSTATUS + SKIPPED_LONGRUNNINGOPERATIONSTATUS + UNKNOWNFUTUREVALUE_LONGRUNNINGOPERATIONSTATUS +) + +func (i LongRunningOperationStatus) String() string { + return []string{"notStarted", "running", "succeeded", "failed", "skipped", "unknownFutureValue"}[i] +} +func ParseLongRunningOperationStatus(v string) (interface{}, error) { + result := NOTSTARTED_LONGRUNNINGOPERATIONSTATUS + switch v { + case "notStarted": + result = NOTSTARTED_LONGRUNNINGOPERATIONSTATUS + case "running": + result = RUNNING_LONGRUNNINGOPERATIONSTATUS + case "succeeded": + result = SUCCEEDED_LONGRUNNINGOPERATIONSTATUS + case "failed": + result = FAILED_LONGRUNNINGOPERATIONSTATUS + case "skipped": + result = SKIPPED_LONGRUNNINGOPERATIONSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_LONGRUNNINGOPERATIONSTATUS + default: + return 0, errors.New("Unknown LongRunningOperationStatus value: " + v) + } + return &result, nil +} +func SerializeLongRunningOperationStatus(values []LongRunningOperationStatus) []string { + 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/security/mail_cluster_evidence.go b/src/internal/connector/graph/betasdk/models/security/mail_cluster_evidence.go new file mode 100644 index 000000000..021af9bd6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/mail_cluster_evidence.go @@ -0,0 +1,194 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailClusterEvidence +type MailClusterEvidence struct { + AlertEvidence + // The clustering logic of the emails inside the cluster. + clusterBy *string + // The value utilized to cluster the similar emails. + clusterByValue *string + // Count of emails in the email cluster. + emailCount *int64 + // Unique identifiers for the emails in the cluster, generated by Microsoft 365. + networkMessageIds []string + // The query used to identify the email cluster. + query *string + // Uniform resource name (URN) of the automated investigation where the cluster was identified. + urn *string +} +// NewMailClusterEvidence instantiates a new MailClusterEvidence and sets the default values. +func NewMailClusterEvidence()(*MailClusterEvidence) { + m := &MailClusterEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateMailClusterEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailClusterEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailClusterEvidence(), nil +} +// GetClusterBy gets the clusterBy property value. The clustering logic of the emails inside the cluster. +func (m *MailClusterEvidence) GetClusterBy()(*string) { + return m.clusterBy +} +// GetClusterByValue gets the clusterByValue property value. The value utilized to cluster the similar emails. +func (m *MailClusterEvidence) GetClusterByValue()(*string) { + return m.clusterByValue +} +// GetEmailCount gets the emailCount property value. Count of emails in the email cluster. +func (m *MailClusterEvidence) GetEmailCount()(*int64) { + return m.emailCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailClusterEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["clusterBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClusterBy(val) + } + return nil + } + res["clusterByValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClusterByValue(val) + } + return nil + } + res["emailCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetEmailCount(val) + } + return nil + } + res["networkMessageIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNetworkMessageIds(res) + } + return nil + } + res["query"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetQuery(val) + } + return nil + } + res["urn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrn(val) + } + return nil + } + return res +} +// GetNetworkMessageIds gets the networkMessageIds property value. Unique identifiers for the emails in the cluster, generated by Microsoft 365. +func (m *MailClusterEvidence) GetNetworkMessageIds()([]string) { + return m.networkMessageIds +} +// GetQuery gets the query property value. The query used to identify the email cluster. +func (m *MailClusterEvidence) GetQuery()(*string) { + return m.query +} +// GetUrn gets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified. +func (m *MailClusterEvidence) GetUrn()(*string) { + return m.urn +} +// Serialize serializes information the current object +func (m *MailClusterEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("clusterBy", m.GetClusterBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clusterByValue", m.GetClusterByValue()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("emailCount", m.GetEmailCount()) + if err != nil { + return err + } + } + if m.GetNetworkMessageIds() != nil { + err = writer.WriteCollectionOfStringValues("networkMessageIds", m.GetNetworkMessageIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("query", m.GetQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("urn", m.GetUrn()) + if err != nil { + return err + } + } + return nil +} +// SetClusterBy sets the clusterBy property value. The clustering logic of the emails inside the cluster. +func (m *MailClusterEvidence) SetClusterBy(value *string)() { + m.clusterBy = value +} +// SetClusterByValue sets the clusterByValue property value. The value utilized to cluster the similar emails. +func (m *MailClusterEvidence) SetClusterByValue(value *string)() { + m.clusterByValue = value +} +// SetEmailCount sets the emailCount property value. Count of emails in the email cluster. +func (m *MailClusterEvidence) SetEmailCount(value *int64)() { + m.emailCount = value +} +// SetNetworkMessageIds sets the networkMessageIds property value. Unique identifiers for the emails in the cluster, generated by Microsoft 365. +func (m *MailClusterEvidence) SetNetworkMessageIds(value []string)() { + m.networkMessageIds = value +} +// SetQuery sets the query property value. The query used to identify the email cluster. +func (m *MailClusterEvidence) SetQuery(value *string)() { + m.query = value +} +// SetUrn sets the urn property value. Uniform resource name (URN) of the automated investigation where the cluster was identified. +func (m *MailClusterEvidence) SetUrn(value *string)() { + m.urn = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/mail_cluster_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/mail_cluster_evidenceable.go new file mode 100644 index 000000000..eb5c0bcb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/mail_cluster_evidenceable.go @@ -0,0 +1,23 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailClusterEvidenceable +type MailClusterEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClusterBy()(*string) + GetClusterByValue()(*string) + GetEmailCount()(*int64) + GetNetworkMessageIds()([]string) + GetQuery()(*string) + GetUrn()(*string) + SetClusterBy(value *string)() + SetClusterByValue(value *string)() + SetEmailCount(value *int64)() + SetNetworkMessageIds(value []string)() + SetQuery(value *string)() + SetUrn(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/mailbox_evidence.go b/src/internal/connector/graph/betasdk/models/security/mailbox_evidence.go new file mode 100644 index 000000000..46ed099c5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/mailbox_evidence.go @@ -0,0 +1,112 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailboxEvidence +type MailboxEvidence struct { + AlertEvidence + // The name associated with the mailbox. + displayName *string + // The primary email address of the mailbox. + primaryAddress *string + // The user account of the mailbox. + userAccount UserAccountable +} +// NewMailboxEvidence instantiates a new MailboxEvidence and sets the default values. +func NewMailboxEvidence()(*MailboxEvidence) { + m := &MailboxEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateMailboxEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMailboxEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMailboxEvidence(), nil +} +// GetDisplayName gets the displayName property value. The name associated with the mailbox. +func (m *MailboxEvidence) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MailboxEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["primaryAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPrimaryAddress(val) + } + return nil + } + res["userAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserAccount(val.(UserAccountable)) + } + return nil + } + return res +} +// GetPrimaryAddress gets the primaryAddress property value. The primary email address of the mailbox. +func (m *MailboxEvidence) GetPrimaryAddress()(*string) { + return m.primaryAddress +} +// GetUserAccount gets the userAccount property value. The user account of the mailbox. +func (m *MailboxEvidence) GetUserAccount()(UserAccountable) { + return m.userAccount +} +// Serialize serializes information the current object +func (m *MailboxEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("primaryAddress", m.GetPrimaryAddress()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userAccount", m.GetUserAccount()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name associated with the mailbox. +func (m *MailboxEvidence) SetDisplayName(value *string)() { + m.displayName = value +} +// SetPrimaryAddress sets the primaryAddress property value. The primary email address of the mailbox. +func (m *MailboxEvidence) SetPrimaryAddress(value *string)() { + m.primaryAddress = value +} +// SetUserAccount sets the userAccount property value. The user account of the mailbox. +func (m *MailboxEvidence) SetUserAccount(value UserAccountable)() { + m.userAccount = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/mailbox_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/mailbox_evidenceable.go new file mode 100644 index 000000000..a545bef42 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/mailbox_evidenceable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MailboxEvidenceable +type MailboxEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetPrimaryAddress()(*string) + GetUserAccount()(UserAccountable) + SetDisplayName(value *string)() + SetPrimaryAddress(value *string)() + SetUserAccount(value UserAccountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/metadata_action.go b/src/internal/connector/graph/betasdk/models/security/metadata_action.go new file mode 100644 index 000000000..cc0789508 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/metadata_action.go @@ -0,0 +1,100 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataAction +type MetadataAction struct { + InformationProtectionAction + // A collection of key-value pairs that should be added to the file. + metadataToAdd []KeyValuePairable + // A collection of strings that indicate which keys to remove from the file metadata. + metadataToRemove []string +} +// NewMetadataAction instantiates a new MetadataAction and sets the default values. +func NewMetadataAction()(*MetadataAction) { + m := &MetadataAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.metadataAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateMetadataActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateMetadataActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewMetadataAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *MetadataAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["metadataToAdd"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetMetadataToAdd(res) + } + return nil + } + res["metadataToRemove"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetMetadataToRemove(res) + } + return nil + } + return res +} +// GetMetadataToAdd gets the metadataToAdd property value. A collection of key-value pairs that should be added to the file. +func (m *MetadataAction) GetMetadataToAdd()([]KeyValuePairable) { + return m.metadataToAdd +} +// GetMetadataToRemove gets the metadataToRemove property value. A collection of strings that indicate which keys to remove from the file metadata. +func (m *MetadataAction) GetMetadataToRemove()([]string) { + return m.metadataToRemove +} +// Serialize serializes information the current object +func (m *MetadataAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetMetadataToAdd() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMetadataToAdd())) + for i, v := range m.GetMetadataToAdd() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("metadataToAdd", cast) + if err != nil { + return err + } + } + if m.GetMetadataToRemove() != nil { + err = writer.WriteCollectionOfStringValues("metadataToRemove", m.GetMetadataToRemove()) + if err != nil { + return err + } + } + return nil +} +// SetMetadataToAdd sets the metadataToAdd property value. A collection of key-value pairs that should be added to the file. +func (m *MetadataAction) SetMetadataToAdd(value []KeyValuePairable)() { + m.metadataToAdd = value +} +// SetMetadataToRemove sets the metadataToRemove property value. A collection of strings that indicate which keys to remove from the file metadata. +func (m *MetadataAction) SetMetadataToRemove(value []string)() { + m.metadataToRemove = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/metadata_actionable.go b/src/internal/connector/graph/betasdk/models/security/metadata_actionable.go new file mode 100644 index 000000000..9335be201 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/metadata_actionable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// MetadataActionable +type MetadataActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetMetadataToAdd()([]KeyValuePairable) + GetMetadataToRemove()([]string) + SetMetadataToAdd(value []KeyValuePairable)() + SetMetadataToRemove(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/oauth_application_evidence.go b/src/internal/connector/graph/betasdk/models/security/oauth_application_evidence.go new file mode 100644 index 000000000..04e01f285 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/oauth_application_evidence.go @@ -0,0 +1,138 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OauthApplicationEvidence +type OauthApplicationEvidence struct { + AlertEvidence + // Unique identifier of the application. + appId *string + // Name of the application. + displayName *string + // The unique identifier of the application object in Azure AD. + objectId *string + // The name of the application publisher. + publisher *string +} +// NewOauthApplicationEvidence instantiates a new OauthApplicationEvidence and sets the default values. +func NewOauthApplicationEvidence()(*OauthApplicationEvidence) { + m := &OauthApplicationEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateOauthApplicationEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOauthApplicationEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOauthApplicationEvidence(), nil +} +// GetAppId gets the appId property value. Unique identifier of the application. +func (m *OauthApplicationEvidence) GetAppId()(*string) { + return m.appId +} +// GetDisplayName gets the displayName property value. Name of the application. +func (m *OauthApplicationEvidence) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OauthApplicationEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["objectId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetObjectId(val) + } + return nil + } + res["publisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisher(val) + } + return nil + } + return res +} +// GetObjectId gets the objectId property value. The unique identifier of the application object in Azure AD. +func (m *OauthApplicationEvidence) GetObjectId()(*string) { + return m.objectId +} +// GetPublisher gets the publisher property value. The name of the application publisher. +func (m *OauthApplicationEvidence) GetPublisher()(*string) { + return m.publisher +} +// Serialize serializes information the current object +func (m *OauthApplicationEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("objectId", m.GetObjectId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisher", m.GetPublisher()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. Unique identifier of the application. +func (m *OauthApplicationEvidence) SetAppId(value *string)() { + m.appId = value +} +// SetDisplayName sets the displayName property value. Name of the application. +func (m *OauthApplicationEvidence) SetDisplayName(value *string)() { + m.displayName = value +} +// SetObjectId sets the objectId property value. The unique identifier of the application object in Azure AD. +func (m *OauthApplicationEvidence) SetObjectId(value *string)() { + m.objectId = value +} +// SetPublisher sets the publisher property value. The name of the application publisher. +func (m *OauthApplicationEvidence) SetPublisher(value *string)() { + m.publisher = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/oauth_application_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/oauth_application_evidenceable.go new file mode 100644 index 000000000..dda32a832 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/oauth_application_evidenceable.go @@ -0,0 +1,19 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OauthApplicationEvidenceable +type OauthApplicationEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetDisplayName()(*string) + GetObjectId()(*string) + GetPublisher()(*string) + SetAppId(value *string)() + SetDisplayName(value *string)() + SetObjectId(value *string)() + SetPublisher(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/ocr_settings.go b/src/internal/connector/graph/betasdk/models/security/ocr_settings.go new file mode 100644 index 000000000..3b4b18372 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ocr_settings.go @@ -0,0 +1,149 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OcrSettings +type OcrSettings 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 whether or not OCR is enabled for the case. + isEnabled *bool + // Maximum image size that will be processed in KB). + maxImageSize *int32 + // The OdataType property + odataType *string + // The timeout duration for the OCR engine. A longer timeout might increase success of OCR, but might add to the total processing time. + timeout *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration +} +// NewOcrSettings instantiates a new ocrSettings and sets the default values. +func NewOcrSettings()(*OcrSettings) { + m := &OcrSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateOcrSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateOcrSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewOcrSettings(), 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 *OcrSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *OcrSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["maxImageSize"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxImageSize(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["timeout"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetISODurationValue() + if err != nil { + return err + } + if val != nil { + m.SetTimeout(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether or not OCR is enabled for the case. +func (m *OcrSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetMaxImageSize gets the maxImageSize property value. Maximum image size that will be processed in KB). +func (m *OcrSettings) GetMaxImageSize()(*int32) { + return m.maxImageSize +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *OcrSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTimeout gets the timeout property value. The timeout duration for the OCR engine. A longer timeout might increase success of OCR, but might add to the total processing time. +func (m *OcrSettings) GetTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) { + return m.timeout +} +// Serialize serializes information the current object +func (m *OcrSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maxImageSize", m.GetMaxImageSize()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteISODurationValue("timeout", m.GetTimeout()) + 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 *OcrSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether or not OCR is enabled for the case. +func (m *OcrSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetMaxImageSize sets the maxImageSize property value. Maximum image size that will be processed in KB). +func (m *OcrSettings) SetMaxImageSize(value *int32)() { + m.maxImageSize = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *OcrSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTimeout sets the timeout property value. The timeout duration for the OCR engine. A longer timeout might increase success of OCR, but might add to the total processing time. +func (m *OcrSettings) SetTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() { + m.timeout = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/ocr_settingsable.go b/src/internal/connector/graph/betasdk/models/security/ocr_settingsable.go new file mode 100644 index 000000000..44922a2f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/ocr_settingsable.go @@ -0,0 +1,19 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// OcrSettingsable +type OcrSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetMaxImageSize()(*int32) + GetOdataType()(*string) + GetTimeout()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration) + SetIsEnabled(value *bool)() + SetMaxImageSize(value *int32)() + SetOdataType(value *string)() + SetTimeout(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ISODuration)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/onboarding_status.go b/src/internal/connector/graph/betasdk/models/security/onboarding_status.go new file mode 100644 index 000000000..27a00e446 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/onboarding_status.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type OnboardingStatus int + +const ( + INSUFFICIENTINFO_ONBOARDINGSTATUS OnboardingStatus = iota + ONBOARDED_ONBOARDINGSTATUS + CANBEONBOARDED_ONBOARDINGSTATUS + UNSUPPORTED_ONBOARDINGSTATUS + UNKNOWNFUTUREVALUE_ONBOARDINGSTATUS +) + +func (i OnboardingStatus) String() string { + return []string{"insufficientInfo", "onboarded", "canBeOnboarded", "unsupported", "unknownFutureValue"}[i] +} +func ParseOnboardingStatus(v string) (interface{}, error) { + result := INSUFFICIENTINFO_ONBOARDINGSTATUS + switch v { + case "insufficientInfo": + result = INSUFFICIENTINFO_ONBOARDINGSTATUS + case "onboarded": + result = ONBOARDED_ONBOARDINGSTATUS + case "canBeOnboarded": + result = CANBEONBOARDED_ONBOARDINGSTATUS + case "unsupported": + result = UNSUPPORTED_ONBOARDINGSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_ONBOARDINGSTATUS + default: + return 0, errors.New("Unknown OnboardingStatus value: " + v) + } + return &result, nil +} +func SerializeOnboardingStatus(values []OnboardingStatus) []string { + 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/security/policy_base.go b/src/internal/connector/graph/betasdk/models/security/policy_base.go new file mode 100644 index 000000000..a0c969ff6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/policy_base.go @@ -0,0 +1,237 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PolicyBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicyBase struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdBy property + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastModifiedBy property + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The status property + status *PolicyStatus +} +// NewPolicyBase instantiates a new policyBase and sets the default values. +func NewPolicyBase()(*PolicyBase) { + m := &PolicyBase{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreatePolicyBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreatePolicyBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryHoldPolicy": + return NewEdiscoveryHoldPolicy(), nil + } + } + } + } + return NewPolicyBase(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *PolicyBase) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *PolicyBase) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *PolicyBase) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *PolicyBase) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *PolicyBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePolicyStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*PolicyStatus)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *PolicyBase) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PolicyBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStatus gets the status property value. The status property +func (m *PolicyBase) GetStatus()(*PolicyStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *PolicyBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *PolicyBase) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *PolicyBase) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *PolicyBase) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *PolicyBase) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *PolicyBase) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *PolicyBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStatus sets the status property value. The status property +func (m *PolicyBase) SetStatus(value *PolicyStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/policy_baseable.go b/src/internal/connector/graph/betasdk/models/security/policy_baseable.go new file mode 100644 index 000000000..dbe8f66e7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/policy_baseable.go @@ -0,0 +1,27 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// PolicyBaseable +type PolicyBaseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStatus()(*PolicyStatus) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStatus(value *PolicyStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/policy_status.go b/src/internal/connector/graph/betasdk/models/security/policy_status.go new file mode 100644 index 000000000..e7c584c39 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/policy_status.go @@ -0,0 +1,40 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type PolicyStatus int + +const ( + PENDING_POLICYSTATUS PolicyStatus = iota + ERROR_POLICYSTATUS + SUCCESS_POLICYSTATUS + UNKNOWNFUTUREVALUE_POLICYSTATUS +) + +func (i PolicyStatus) String() string { + return []string{"pending", "error", "success", "unknownFutureValue"}[i] +} +func ParsePolicyStatus(v string) (interface{}, error) { + result := PENDING_POLICYSTATUS + switch v { + case "pending": + result = PENDING_POLICYSTATUS + case "error": + result = ERROR_POLICYSTATUS + case "success": + result = SUCCESS_POLICYSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_POLICYSTATUS + default: + return 0, errors.New("Unknown PolicyStatus value: " + v) + } + return &result, nil +} +func SerializePolicyStatus(values []PolicyStatus) []string { + 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/security/process_evidence.go b/src/internal/connector/graph/betasdk/models/security/process_evidence.go new file mode 100644 index 000000000..134f6a64a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/process_evidence.go @@ -0,0 +1,296 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProcessEvidence +type ProcessEvidence struct { + AlertEvidence + // The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. + detectionStatus *DetectionStatus + // Image file details. + imageFile FileDetailsable + // A unique identifier assigned to a device by Microsoft Defender for Endpoint. + mdeDeviceId *string + // Date and time when the parent of the process was created. + parentProcessCreationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Process ID (PID) of the parent process that spawned the process. + parentProcessId *int64 + // Parent process image file details. + parentProcessImageFile FileDetailsable + // Command line used to create the new process. + processCommandLine *string + // Date and time the process was created. + processCreationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Process ID (PID) of the newly created process. + processId *int64 + // User details of the user that ran the process. + userAccount UserAccountable +} +// NewProcessEvidence instantiates a new ProcessEvidence and sets the default values. +func NewProcessEvidence()(*ProcessEvidence) { + m := &ProcessEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateProcessEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProcessEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProcessEvidence(), nil +} +// GetDetectionStatus gets the detectionStatus property value. The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. +func (m *ProcessEvidence) GetDetectionStatus()(*DetectionStatus) { + return m.detectionStatus +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProcessEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["detectionStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDetectionStatus) + if err != nil { + return err + } + if val != nil { + m.SetDetectionStatus(val.(*DetectionStatus)) + } + return nil + } + res["imageFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetImageFile(val.(FileDetailsable)) + } + return nil + } + res["mdeDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMdeDeviceId(val) + } + return nil + } + res["parentProcessCreationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetParentProcessCreationDateTime(val) + } + return nil + } + res["parentProcessId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetParentProcessId(val) + } + return nil + } + res["parentProcessImageFile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateFileDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParentProcessImageFile(val.(FileDetailsable)) + } + return nil + } + res["processCommandLine"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessCommandLine(val) + } + return nil + } + res["processCreationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetProcessCreationDateTime(val) + } + return nil + } + res["processId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetProcessId(val) + } + return nil + } + res["userAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserAccount(val.(UserAccountable)) + } + return nil + } + return res +} +// GetImageFile gets the imageFile property value. Image file details. +func (m *ProcessEvidence) GetImageFile()(FileDetailsable) { + return m.imageFile +} +// GetMdeDeviceId gets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *ProcessEvidence) GetMdeDeviceId()(*string) { + return m.mdeDeviceId +} +// GetParentProcessCreationDateTime gets the parentProcessCreationDateTime property value. Date and time when the parent of the process was created. +func (m *ProcessEvidence) GetParentProcessCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.parentProcessCreationDateTime +} +// GetParentProcessId gets the parentProcessId property value. Process ID (PID) of the parent process that spawned the process. +func (m *ProcessEvidence) GetParentProcessId()(*int64) { + return m.parentProcessId +} +// GetParentProcessImageFile gets the parentProcessImageFile property value. Parent process image file details. +func (m *ProcessEvidence) GetParentProcessImageFile()(FileDetailsable) { + return m.parentProcessImageFile +} +// GetProcessCommandLine gets the processCommandLine property value. Command line used to create the new process. +func (m *ProcessEvidence) GetProcessCommandLine()(*string) { + return m.processCommandLine +} +// GetProcessCreationDateTime gets the processCreationDateTime property value. Date and time the process was created. +func (m *ProcessEvidence) GetProcessCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.processCreationDateTime +} +// GetProcessId gets the processId property value. Process ID (PID) of the newly created process. +func (m *ProcessEvidence) GetProcessId()(*int64) { + return m.processId +} +// GetUserAccount gets the userAccount property value. User details of the user that ran the process. +func (m *ProcessEvidence) GetUserAccount()(UserAccountable) { + return m.userAccount +} +// Serialize serializes information the current object +func (m *ProcessEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + if m.GetDetectionStatus() != nil { + cast := (*m.GetDetectionStatus()).String() + err = writer.WriteStringValue("detectionStatus", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("imageFile", m.GetImageFile()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("mdeDeviceId", m.GetMdeDeviceId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("parentProcessCreationDateTime", m.GetParentProcessCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("parentProcessId", m.GetParentProcessId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parentProcessImageFile", m.GetParentProcessImageFile()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("processCommandLine", m.GetProcessCommandLine()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("processCreationDateTime", m.GetProcessCreationDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteInt64Value("processId", m.GetProcessId()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("userAccount", m.GetUserAccount()) + if err != nil { + return err + } + } + return nil +} +// SetDetectionStatus sets the detectionStatus property value. The status of the detection.The possible values are: detected, blocked, prevented, unknownFutureValue. +func (m *ProcessEvidence) SetDetectionStatus(value *DetectionStatus)() { + m.detectionStatus = value +} +// SetImageFile sets the imageFile property value. Image file details. +func (m *ProcessEvidence) SetImageFile(value FileDetailsable)() { + m.imageFile = value +} +// SetMdeDeviceId sets the mdeDeviceId property value. A unique identifier assigned to a device by Microsoft Defender for Endpoint. +func (m *ProcessEvidence) SetMdeDeviceId(value *string)() { + m.mdeDeviceId = value +} +// SetParentProcessCreationDateTime sets the parentProcessCreationDateTime property value. Date and time when the parent of the process was created. +func (m *ProcessEvidence) SetParentProcessCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.parentProcessCreationDateTime = value +} +// SetParentProcessId sets the parentProcessId property value. Process ID (PID) of the parent process that spawned the process. +func (m *ProcessEvidence) SetParentProcessId(value *int64)() { + m.parentProcessId = value +} +// SetParentProcessImageFile sets the parentProcessImageFile property value. Parent process image file details. +func (m *ProcessEvidence) SetParentProcessImageFile(value FileDetailsable)() { + m.parentProcessImageFile = value +} +// SetProcessCommandLine sets the processCommandLine property value. Command line used to create the new process. +func (m *ProcessEvidence) SetProcessCommandLine(value *string)() { + m.processCommandLine = value +} +// SetProcessCreationDateTime sets the processCreationDateTime property value. Date and time the process was created. +func (m *ProcessEvidence) SetProcessCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.processCreationDateTime = value +} +// SetProcessId sets the processId property value. Process ID (PID) of the newly created process. +func (m *ProcessEvidence) SetProcessId(value *int64)() { + m.processId = value +} +// SetUserAccount sets the userAccount property value. User details of the user that ran the process. +func (m *ProcessEvidence) SetUserAccount(value UserAccountable)() { + m.userAccount = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/process_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/process_evidenceable.go new file mode 100644 index 000000000..f70dd7357 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/process_evidenceable.go @@ -0,0 +1,32 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProcessEvidenceable +type ProcessEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetectionStatus()(*DetectionStatus) + GetImageFile()(FileDetailsable) + GetMdeDeviceId()(*string) + GetParentProcessCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetParentProcessId()(*int64) + GetParentProcessImageFile()(FileDetailsable) + GetProcessCommandLine()(*string) + GetProcessCreationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetProcessId()(*int64) + GetUserAccount()(UserAccountable) + SetDetectionStatus(value *DetectionStatus)() + SetImageFile(value FileDetailsable)() + SetMdeDeviceId(value *string)() + SetParentProcessCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetParentProcessId(value *int64)() + SetParentProcessImageFile(value FileDetailsable)() + SetProcessCommandLine(value *string)() + SetProcessCreationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetProcessId(value *int64)() + SetUserAccount(value UserAccountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_adhoc_action.go b/src/internal/connector/graph/betasdk/models/security/protect_adhoc_action.go new file mode 100644 index 000000000..7f46a40bd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_adhoc_action.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectAdhocAction +type ProtectAdhocAction struct { + InformationProtectionAction +} +// NewProtectAdhocAction instantiates a new ProtectAdhocAction and sets the default values. +func NewProtectAdhocAction()(*ProtectAdhocAction) { + m := &ProtectAdhocAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.protectAdhocAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectAdhocActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectAdhocActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectAdhocAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectAdhocAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ProtectAdhocAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_adhoc_actionable.go b/src/internal/connector/graph/betasdk/models/security/protect_adhoc_actionable.go new file mode 100644 index 000000000..5e78ada21 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_adhoc_actionable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectAdhocActionable +type ProtectAdhocActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_by_template_action.go b/src/internal/connector/graph/betasdk/models/security/protect_by_template_action.go new file mode 100644 index 000000000..f9db7f711 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_by_template_action.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectByTemplateAction +type ProtectByTemplateAction struct { + InformationProtectionAction + // The unique identifier for a protection template in Microsoft Purview Information Protection to apply to the content. + templateId *string +} +// NewProtectByTemplateAction instantiates a new ProtectByTemplateAction and sets the default values. +func NewProtectByTemplateAction()(*ProtectByTemplateAction) { + m := &ProtectByTemplateAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.protectByTemplateAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectByTemplateActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectByTemplateActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectByTemplateAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectByTemplateAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["templateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTemplateId(val) + } + return nil + } + return res +} +// GetTemplateId gets the templateId property value. The unique identifier for a protection template in Microsoft Purview Information Protection to apply to the content. +func (m *ProtectByTemplateAction) GetTemplateId()(*string) { + return m.templateId +} +// Serialize serializes information the current object +func (m *ProtectByTemplateAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("templateId", m.GetTemplateId()) + if err != nil { + return err + } + } + return nil +} +// SetTemplateId sets the templateId property value. The unique identifier for a protection template in Microsoft Purview Information Protection to apply to the content. +func (m *ProtectByTemplateAction) SetTemplateId(value *string)() { + m.templateId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_by_template_actionable.go b/src/internal/connector/graph/betasdk/models/security/protect_by_template_actionable.go new file mode 100644 index 000000000..939620292 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_by_template_actionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectByTemplateActionable +type ProtectByTemplateActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetTemplateId()(*string) + SetTemplateId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_action.go b/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_action.go new file mode 100644 index 000000000..8be16c8cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_action.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectDoNotForwardAction +type ProtectDoNotForwardAction struct { + InformationProtectionAction +} +// NewProtectDoNotForwardAction instantiates a new ProtectDoNotForwardAction and sets the default values. +func NewProtectDoNotForwardAction()(*ProtectDoNotForwardAction) { + m := &ProtectDoNotForwardAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.protectDoNotForwardAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateProtectDoNotForwardActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateProtectDoNotForwardActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewProtectDoNotForwardAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ProtectDoNotForwardAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *ProtectDoNotForwardAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_actionable.go b/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_actionable.go new file mode 100644 index 000000000..c114f7d9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/protect_do_not_forward_actionable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ProtectDoNotForwardActionable +type ProtectDoNotForwardActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/query_type.go b/src/internal/connector/graph/betasdk/models/security/query_type.go new file mode 100644 index 000000000..a5f08ad86 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/query_type.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type QueryType int + +const ( + FILES_QUERYTYPE QueryType = iota + MESSAGES_QUERYTYPE + UNKNOWNFUTUREVALUE_QUERYTYPE +) + +func (i QueryType) String() string { + return []string{"files", "messages", "unknownFutureValue"}[i] +} +func ParseQueryType(v string) (interface{}, error) { + result := FILES_QUERYTYPE + switch v { + case "files": + result = FILES_QUERYTYPE + case "messages": + result = MESSAGES_QUERYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_QUERYTYPE + default: + return 0, errors.New("Unknown QueryType value: " + v) + } + return &result, nil +} +func SerializeQueryType(values []QueryType) []string { + 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/security/recommend_label_action.go b/src/internal/connector/graph/betasdk/models/security/recommend_label_action.go new file mode 100644 index 000000000..856032af0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/recommend_label_action.go @@ -0,0 +1,153 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendLabelAction +type RecommendLabelAction struct { + InformationProtectionAction + // Actions to take if the label is accepted by the user. + actions []InformationProtectionActionable + // The actionSource property + actionSource *ActionSource + // The sensitive information type GUIDs that caused the recommendation to be given. + responsibleSensitiveTypeIds []string + // The sensitivityLabelId property + sensitivityLabelId *string +} +// NewRecommendLabelAction instantiates a new RecommendLabelAction and sets the default values. +func NewRecommendLabelAction()(*RecommendLabelAction) { + m := &RecommendLabelAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.recommendLabelAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRecommendLabelActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRecommendLabelActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRecommendLabelAction(), nil +} +// GetActions gets the actions property value. Actions to take if the label is accepted by the user. +func (m *RecommendLabelAction) GetActions()([]InformationProtectionActionable) { + return m.actions +} +// GetActionSource gets the actionSource property value. The actionSource property +func (m *RecommendLabelAction) GetActionSource()(*ActionSource) { + return m.actionSource +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RecommendLabelAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["actions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateInformationProtectionActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]InformationProtectionActionable, len(val)) + for i, v := range val { + res[i] = v.(InformationProtectionActionable) + } + m.SetActions(res) + } + return nil + } + res["actionSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionSource) + if err != nil { + return err + } + if val != nil { + m.SetActionSource(val.(*ActionSource)) + } + return nil + } + res["responsibleSensitiveTypeIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetResponsibleSensitiveTypeIds(res) + } + return nil + } + res["sensitivityLabelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSensitivityLabelId(val) + } + return nil + } + return res +} +// GetResponsibleSensitiveTypeIds gets the responsibleSensitiveTypeIds property value. The sensitive information type GUIDs that caused the recommendation to be given. +func (m *RecommendLabelAction) GetResponsibleSensitiveTypeIds()([]string) { + return m.responsibleSensitiveTypeIds +} +// GetSensitivityLabelId gets the sensitivityLabelId property value. The sensitivityLabelId property +func (m *RecommendLabelAction) GetSensitivityLabelId()(*string) { + return m.sensitivityLabelId +} +// Serialize serializes information the current object +func (m *RecommendLabelAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetActions())) + for i, v := range m.GetActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("actions", cast) + if err != nil { + return err + } + } + if m.GetActionSource() != nil { + cast := (*m.GetActionSource()).String() + err = writer.WriteStringValue("actionSource", &cast) + if err != nil { + return err + } + } + if m.GetResponsibleSensitiveTypeIds() != nil { + err = writer.WriteCollectionOfStringValues("responsibleSensitiveTypeIds", m.GetResponsibleSensitiveTypeIds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("sensitivityLabelId", m.GetSensitivityLabelId()) + if err != nil { + return err + } + } + return nil +} +// SetActions sets the actions property value. Actions to take if the label is accepted by the user. +func (m *RecommendLabelAction) SetActions(value []InformationProtectionActionable)() { + m.actions = value +} +// SetActionSource sets the actionSource property value. The actionSource property +func (m *RecommendLabelAction) SetActionSource(value *ActionSource)() { + m.actionSource = value +} +// SetResponsibleSensitiveTypeIds sets the responsibleSensitiveTypeIds property value. The sensitive information type GUIDs that caused the recommendation to be given. +func (m *RecommendLabelAction) SetResponsibleSensitiveTypeIds(value []string)() { + m.responsibleSensitiveTypeIds = value +} +// SetSensitivityLabelId sets the sensitivityLabelId property value. The sensitivityLabelId property +func (m *RecommendLabelAction) SetSensitivityLabelId(value *string)() { + m.sensitivityLabelId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/recommend_label_actionable.go b/src/internal/connector/graph/betasdk/models/security/recommend_label_actionable.go new file mode 100644 index 000000000..b445ec18b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/recommend_label_actionable.go @@ -0,0 +1,19 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RecommendLabelActionable +type RecommendLabelActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActions()([]InformationProtectionActionable) + GetActionSource()(*ActionSource) + GetResponsibleSensitiveTypeIds()([]string) + GetSensitivityLabelId()(*string) + SetActions(value []InformationProtectionActionable)() + SetActionSource(value *ActionSource)() + SetResponsibleSensitiveTypeIds(value []string)() + SetSensitivityLabelId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settings.go b/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settings.go new file mode 100644 index 000000000..f136bde75 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settings.go @@ -0,0 +1,175 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedundancyDetectionSettings +type RedundancyDetectionSettings 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 whether email threading and near duplicate detection are enabled. + isEnabled *bool + // Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. + maxWords *int32 + // Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. + minWords *int32 + // The OdataType property + odataType *string + // Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. + similarityThreshold *int32 +} +// NewRedundancyDetectionSettings instantiates a new redundancyDetectionSettings and sets the default values. +func NewRedundancyDetectionSettings()(*RedundancyDetectionSettings) { + m := &RedundancyDetectionSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRedundancyDetectionSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRedundancyDetectionSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRedundancyDetectionSettings(), 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 *RedundancyDetectionSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RedundancyDetectionSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(val) + } + return nil + } + res["maxWords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMaxWords(val) + } + return nil + } + res["minWords"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetMinWords(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["similarityThreshold"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSimilarityThreshold(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether email threading and near duplicate detection are enabled. +func (m *RedundancyDetectionSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetMaxWords gets the maxWords property value. Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) GetMaxWords()(*int32) { + return m.maxWords +} +// GetMinWords gets the minWords property value. Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) GetMinWords()(*int32) { + return m.minWords +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RedundancyDetectionSettings) GetOdataType()(*string) { + return m.odataType +} +// GetSimilarityThreshold gets the similarityThreshold property value. Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. +func (m *RedundancyDetectionSettings) GetSimilarityThreshold()(*int32) { + return m.similarityThreshold +} +// Serialize serializes information the current object +func (m *RedundancyDetectionSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("maxWords", m.GetMaxWords()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("minWords", m.GetMinWords()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("similarityThreshold", m.GetSimilarityThreshold()) + 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 *RedundancyDetectionSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether email threading and near duplicate detection are enabled. +func (m *RedundancyDetectionSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetMaxWords sets the maxWords property value. Specifies the maximum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) SetMaxWords(value *int32)() { + m.maxWords = value +} +// SetMinWords sets the minWords property value. Specifies the minimum number of words used for email threading and near duplicate detection. To learn more, see Minimum/maximum number of words. +func (m *RedundancyDetectionSettings) SetMinWords(value *int32)() { + m.minWords = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RedundancyDetectionSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetSimilarityThreshold sets the similarityThreshold property value. Specifies the similarity level for documents to be put in the same near duplicate set. To learn more, see Document and email similarity threshold. +func (m *RedundancyDetectionSettings) SetSimilarityThreshold(value *int32)() { + m.similarityThreshold = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settingsable.go b/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settingsable.go new file mode 100644 index 000000000..d4a1a2aa1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/redundancy_detection_settingsable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RedundancyDetectionSettingsable +type RedundancyDetectionSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetMaxWords()(*int32) + GetMinWords()(*int32) + GetOdataType()(*string) + GetSimilarityThreshold()(*int32) + SetIsEnabled(value *bool)() + SetMaxWords(value *int32)() + SetMinWords(value *int32)() + SetOdataType(value *string)() + SetSimilarityThreshold(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/registry_key_evidence.go b/src/internal/connector/graph/betasdk/models/security/registry_key_evidence.go new file mode 100644 index 000000000..adf7368b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/registry_key_evidence.go @@ -0,0 +1,86 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyEvidence +type RegistryKeyEvidence struct { + AlertEvidence + // Registry hive of the key that the recorded action was applied to. + registryHive *string + // Registry key that the recorded action was applied to. + registryKey *string +} +// NewRegistryKeyEvidence instantiates a new RegistryKeyEvidence and sets the default values. +func NewRegistryKeyEvidence()(*RegistryKeyEvidence) { + m := &RegistryKeyEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateRegistryKeyEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegistryKeyEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegistryKeyEvidence(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegistryKeyEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["registryHive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryHive(val) + } + return nil + } + res["registryKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryKey(val) + } + return nil + } + return res +} +// GetRegistryHive gets the registryHive property value. Registry hive of the key that the recorded action was applied to. +func (m *RegistryKeyEvidence) GetRegistryHive()(*string) { + return m.registryHive +} +// GetRegistryKey gets the registryKey property value. Registry key that the recorded action was applied to. +func (m *RegistryKeyEvidence) GetRegistryKey()(*string) { + return m.registryKey +} +// Serialize serializes information the current object +func (m *RegistryKeyEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("registryHive", m.GetRegistryHive()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registryKey", m.GetRegistryKey()) + if err != nil { + return err + } + } + return nil +} +// SetRegistryHive sets the registryHive property value. Registry hive of the key that the recorded action was applied to. +func (m *RegistryKeyEvidence) SetRegistryHive(value *string)() { + m.registryHive = value +} +// SetRegistryKey sets the registryKey property value. Registry key that the recorded action was applied to. +func (m *RegistryKeyEvidence) SetRegistryKey(value *string)() { + m.registryKey = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/registry_key_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/registry_key_evidenceable.go new file mode 100644 index 000000000..1945094e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/registry_key_evidenceable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryKeyEvidenceable +type RegistryKeyEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRegistryHive()(*string) + GetRegistryKey()(*string) + SetRegistryHive(value *string)() + SetRegistryKey(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/registry_value_evidence.go b/src/internal/connector/graph/betasdk/models/security/registry_value_evidence.go new file mode 100644 index 000000000..e05f581d7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/registry_value_evidence.go @@ -0,0 +1,164 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryValueEvidence +type RegistryValueEvidence struct { + AlertEvidence + // Registry hive of the key that the recorded action was applied to. + registryHive *string + // Registry key that the recorded action was applied to. + registryKey *string + // Data of the registry value that the recorded action was applied to. + registryValue *string + // Name of the registry value that the recorded action was applied to. + registryValueName *string + // Data type, such as binary or string, of the registry value that the recorded action was applied to. + registryValueType *string +} +// NewRegistryValueEvidence instantiates a new RegistryValueEvidence and sets the default values. +func NewRegistryValueEvidence()(*RegistryValueEvidence) { + m := &RegistryValueEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateRegistryValueEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRegistryValueEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRegistryValueEvidence(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RegistryValueEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["registryHive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryHive(val) + } + return nil + } + res["registryKey"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryKey(val) + } + return nil + } + res["registryValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryValue(val) + } + return nil + } + res["registryValueName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryValueName(val) + } + return nil + } + res["registryValueType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegistryValueType(val) + } + return nil + } + return res +} +// GetRegistryHive gets the registryHive property value. Registry hive of the key that the recorded action was applied to. +func (m *RegistryValueEvidence) GetRegistryHive()(*string) { + return m.registryHive +} +// GetRegistryKey gets the registryKey property value. Registry key that the recorded action was applied to. +func (m *RegistryValueEvidence) GetRegistryKey()(*string) { + return m.registryKey +} +// GetRegistryValue gets the registryValue property value. Data of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) GetRegistryValue()(*string) { + return m.registryValue +} +// GetRegistryValueName gets the registryValueName property value. Name of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) GetRegistryValueName()(*string) { + return m.registryValueName +} +// GetRegistryValueType gets the registryValueType property value. Data type, such as binary or string, of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) GetRegistryValueType()(*string) { + return m.registryValueType +} +// Serialize serializes information the current object +func (m *RegistryValueEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("registryHive", m.GetRegistryHive()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registryKey", m.GetRegistryKey()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registryValue", m.GetRegistryValue()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registryValueName", m.GetRegistryValueName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("registryValueType", m.GetRegistryValueType()) + if err != nil { + return err + } + } + return nil +} +// SetRegistryHive sets the registryHive property value. Registry hive of the key that the recorded action was applied to. +func (m *RegistryValueEvidence) SetRegistryHive(value *string)() { + m.registryHive = value +} +// SetRegistryKey sets the registryKey property value. Registry key that the recorded action was applied to. +func (m *RegistryValueEvidence) SetRegistryKey(value *string)() { + m.registryKey = value +} +// SetRegistryValue sets the registryValue property value. Data of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) SetRegistryValue(value *string)() { + m.registryValue = value +} +// SetRegistryValueName sets the registryValueName property value. Name of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) SetRegistryValueName(value *string)() { + m.registryValueName = value +} +// SetRegistryValueType sets the registryValueType property value. Data type, such as binary or string, of the registry value that the recorded action was applied to. +func (m *RegistryValueEvidence) SetRegistryValueType(value *string)() { + m.registryValueType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/registry_value_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/registry_value_evidenceable.go new file mode 100644 index 000000000..3f9e807da --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/registry_value_evidenceable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RegistryValueEvidenceable +type RegistryValueEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRegistryHive()(*string) + GetRegistryKey()(*string) + GetRegistryValue()(*string) + GetRegistryValueName()(*string) + GetRegistryValueType()(*string) + SetRegistryHive(value *string)() + SetRegistryKey(value *string)() + SetRegistryValue(value *string)() + SetRegistryValueName(value *string)() + SetRegistryValueType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_content_footer_action.go b/src/internal/connector/graph/betasdk/models/security/remove_content_footer_action.go new file mode 100644 index 000000000..b1baacd4f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_content_footer_action.go @@ -0,0 +1,66 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentFooterAction +type RemoveContentFooterAction struct { + InformationProtectionAction + // The name of the UI element of the footer to be removed. + uiElementNames []string +} +// NewRemoveContentFooterAction instantiates a new RemoveContentFooterAction and sets the default values. +func NewRemoveContentFooterAction()(*RemoveContentFooterAction) { + m := &RemoveContentFooterAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.removeContentFooterAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveContentFooterActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveContentFooterActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveContentFooterAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveContentFooterAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of the footer to be removed. +func (m *RemoveContentFooterAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveContentFooterAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of the footer to be removed. +func (m *RemoveContentFooterAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_content_footer_actionable.go b/src/internal/connector/graph/betasdk/models/security/remove_content_footer_actionable.go new file mode 100644 index 000000000..30f6e6157 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_content_footer_actionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentFooterActionable +type RemoveContentFooterActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_content_header_action.go b/src/internal/connector/graph/betasdk/models/security/remove_content_header_action.go new file mode 100644 index 000000000..1b831e24a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_content_header_action.go @@ -0,0 +1,66 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentHeaderAction +type RemoveContentHeaderAction struct { + InformationProtectionAction + // The name of the UI element of the header to be removed. + uiElementNames []string +} +// NewRemoveContentHeaderAction instantiates a new RemoveContentHeaderAction and sets the default values. +func NewRemoveContentHeaderAction()(*RemoveContentHeaderAction) { + m := &RemoveContentHeaderAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.removeContentHeaderAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveContentHeaderActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveContentHeaderActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveContentHeaderAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveContentHeaderAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of the header to be removed. +func (m *RemoveContentHeaderAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveContentHeaderAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of the header to be removed. +func (m *RemoveContentHeaderAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_content_header_actionable.go b/src/internal/connector/graph/betasdk/models/security/remove_content_header_actionable.go new file mode 100644 index 000000000..3aaf56afc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_content_header_actionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveContentHeaderActionable +type RemoveContentHeaderActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_protection_action.go b/src/internal/connector/graph/betasdk/models/security/remove_protection_action.go new file mode 100644 index 000000000..6a904bc2a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_protection_action.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveProtectionAction +type RemoveProtectionAction struct { + InformationProtectionAction +} +// NewRemoveProtectionAction instantiates a new RemoveProtectionAction and sets the default values. +func NewRemoveProtectionAction()(*RemoveProtectionAction) { + m := &RemoveProtectionAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.removeProtectionAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveProtectionActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveProtectionActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveProtectionAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveProtectionAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *RemoveProtectionAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_protection_actionable.go b/src/internal/connector/graph/betasdk/models/security/remove_protection_actionable.go new file mode 100644 index 000000000..bcb1357d0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_protection_actionable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveProtectionActionable +type RemoveProtectionActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_watermark_action.go b/src/internal/connector/graph/betasdk/models/security/remove_watermark_action.go new file mode 100644 index 000000000..6e7f9426a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_watermark_action.go @@ -0,0 +1,66 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveWatermarkAction +type RemoveWatermarkAction struct { + InformationProtectionAction + // The name of the UI element of watermark to be removed. + uiElementNames []string +} +// NewRemoveWatermarkAction instantiates a new RemoveWatermarkAction and sets the default values. +func NewRemoveWatermarkAction()(*RemoveWatermarkAction) { + m := &RemoveWatermarkAction{ + InformationProtectionAction: *NewInformationProtectionAction(), + } + odataTypeValue := "#microsoft.graph.security.removeWatermarkAction"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRemoveWatermarkActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRemoveWatermarkActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRemoveWatermarkAction(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RemoveWatermarkAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.InformationProtectionAction.GetFieldDeserializers() + res["uiElementNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetUiElementNames(res) + } + return nil + } + return res +} +// GetUiElementNames gets the uiElementNames property value. The name of the UI element of watermark to be removed. +func (m *RemoveWatermarkAction) GetUiElementNames()([]string) { + return m.uiElementNames +} +// Serialize serializes information the current object +func (m *RemoveWatermarkAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.InformationProtectionAction.Serialize(writer) + if err != nil { + return err + } + if m.GetUiElementNames() != nil { + err = writer.WriteCollectionOfStringValues("uiElementNames", m.GetUiElementNames()) + if err != nil { + return err + } + } + return nil +} +// SetUiElementNames sets the uiElementNames property value. The name of the UI element of watermark to be removed. +func (m *RemoveWatermarkAction) SetUiElementNames(value []string)() { + m.uiElementNames = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/remove_watermark_actionable.go b/src/internal/connector/graph/betasdk/models/security/remove_watermark_actionable.go new file mode 100644 index 000000000..7280caf68 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/remove_watermark_actionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RemoveWatermarkActionable +type RemoveWatermarkActionable interface { + InformationProtectionActionable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUiElementNames()([]string) + SetUiElementNames(value []string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_duration.go b/src/internal/connector/graph/betasdk/models/security/retention_duration.go new file mode 100644 index 000000000..05510b9c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_duration.go @@ -0,0 +1,91 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDuration +type RetentionDuration 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 OdataType property + odataType *string +} +// NewRetentionDuration instantiates a new retentionDuration and sets the default values. +func NewRetentionDuration()(*RetentionDuration) { + m := &RetentionDuration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRetentionDurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionDurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.retentionDurationForever": + return NewRetentionDurationForever(), nil + case "#microsoft.graph.security.retentionDurationInDays": + return NewRetentionDurationInDays(), nil + } + } + } + } + return NewRetentionDuration(), 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 *RetentionDuration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionDuration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RetentionDuration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *RetentionDuration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *RetentionDuration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RetentionDuration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_duration_forever.go b/src/internal/connector/graph/betasdk/models/security/retention_duration_forever.go new file mode 100644 index 000000000..254c28d69 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_duration_forever.go @@ -0,0 +1,36 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDurationForever +type RetentionDurationForever struct { + RetentionDuration +} +// NewRetentionDurationForever instantiates a new RetentionDurationForever and sets the default values. +func NewRetentionDurationForever()(*RetentionDurationForever) { + m := &RetentionDurationForever{ + RetentionDuration: *NewRetentionDuration(), + } + odataTypeValue := "#microsoft.graph.security.retentionDurationForever"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRetentionDurationForeverFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionDurationForeverFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionDurationForever(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionDurationForever) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RetentionDuration.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *RetentionDurationForever) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RetentionDuration.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_duration_foreverable.go b/src/internal/connector/graph/betasdk/models/security/retention_duration_foreverable.go new file mode 100644 index 000000000..fe9aaf9ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_duration_foreverable.go @@ -0,0 +1,11 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDurationForeverable +type RetentionDurationForeverable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RetentionDurationable +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_duration_in_days.go b/src/internal/connector/graph/betasdk/models/security/retention_duration_in_days.go new file mode 100644 index 000000000..d8878c7a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_duration_in_days.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDurationInDays +type RetentionDurationInDays struct { + RetentionDuration + // Specifies the time period in days for which an item with the applied retention label will be retained for. + days *int32 +} +// NewRetentionDurationInDays instantiates a new RetentionDurationInDays and sets the default values. +func NewRetentionDurationInDays()(*RetentionDurationInDays) { + m := &RetentionDurationInDays{ + RetentionDuration: *NewRetentionDuration(), + } + odataTypeValue := "#microsoft.graph.security.retentionDurationInDays"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateRetentionDurationInDaysFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionDurationInDaysFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionDurationInDays(), nil +} +// GetDays gets the days property value. Specifies the time period in days for which an item with the applied retention label will be retained for. +func (m *RetentionDurationInDays) GetDays()(*int32) { + return m.days +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionDurationInDays) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.RetentionDuration.GetFieldDeserializers() + res["days"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetDays(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *RetentionDurationInDays) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.RetentionDuration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("days", m.GetDays()) + if err != nil { + return err + } + } + return nil +} +// SetDays sets the days property value. Specifies the time period in days for which an item with the applied retention label will be retained for. +func (m *RetentionDurationInDays) SetDays(value *int32)() { + m.days = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_duration_in_daysable.go b/src/internal/connector/graph/betasdk/models/security/retention_duration_in_daysable.go new file mode 100644 index 000000000..57b6bdc94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_duration_in_daysable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDurationInDaysable +type RetentionDurationInDaysable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + RetentionDurationable + GetDays()(*int32) + SetDays(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_durationable.go b/src/internal/connector/graph/betasdk/models/security/retention_durationable.go new file mode 100644 index 000000000..55fd1c39e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_durationable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// RetentionDurationable +type RetentionDurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event.go b/src/internal/connector/graph/betasdk/models/security/retention_event.go new file mode 100644 index 000000000..b76f1243b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event.go @@ -0,0 +1,364 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEvent provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RetentionEvent struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the retentionEvent. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date time when the retentionEvent was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional information about the event. + description *string + // Name of the event. + displayName *string + // The eventPropagationResults property + eventPropagationResults []EventPropagationResultable + // Represents the workload (SharePoint Online, OneDrive for Business, Exchange Online) and identification information associated with a retention event. + eventQueries []EventQueryable + // The eventStatus property + eventStatus RetentionEventStatusable + // Optional time when the event should be triggered. + eventTriggerDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user who last modified the retentionEvent. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The latest date time when the retentionEvent was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Last time the status of the event was updated. + lastStatusUpdateDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the event that will start the retention period for labels that use this event type when an event is created. + retentionEventType RetentionEventTypeable +} +// NewRetentionEvent instantiates a new retentionEvent and sets the default values. +func NewRetentionEvent()(*RetentionEvent) { + m := &RetentionEvent{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateRetentionEventFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionEventFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionEvent(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the retentionEvent. +func (m *RetentionEvent) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date time when the retentionEvent was created. +func (m *RetentionEvent) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Optional information about the event. +func (m *RetentionEvent) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the event. +func (m *RetentionEvent) GetDisplayName()(*string) { + return m.displayName +} +// GetEventPropagationResults gets the eventPropagationResults property value. The eventPropagationResults property +func (m *RetentionEvent) GetEventPropagationResults()([]EventPropagationResultable) { + return m.eventPropagationResults +} +// GetEventQueries gets the eventQueries property value. Represents the workload (SharePoint Online, OneDrive for Business, Exchange Online) and identification information associated with a retention event. +func (m *RetentionEvent) GetEventQueries()([]EventQueryable) { + return m.eventQueries +} +// GetEventStatus gets the eventStatus property value. The eventStatus property +func (m *RetentionEvent) GetEventStatus()(RetentionEventStatusable) { + return m.eventStatus +} +// GetEventTriggerDateTime gets the eventTriggerDateTime property value. Optional time when the event should be triggered. +func (m *RetentionEvent) GetEventTriggerDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.eventTriggerDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionEvent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["eventPropagationResults"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventPropagationResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventPropagationResultable, len(val)) + for i, v := range val { + res[i] = v.(EventPropagationResultable) + } + m.SetEventPropagationResults(res) + } + return nil + } + res["eventQueries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEventQueryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EventQueryable, len(val)) + for i, v := range val { + res[i] = v.(EventQueryable) + } + m.SetEventQueries(res) + } + return nil + } + res["eventStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRetentionEventStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetEventStatus(val.(RetentionEventStatusable)) + } + return nil + } + res["eventTriggerDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEventTriggerDateTime(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["lastStatusUpdateDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastStatusUpdateDateTime(val) + } + return nil + } + res["retentionEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRetentionEventTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRetentionEventType(val.(RetentionEventTypeable)) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the retentionEvent. +func (m *RetentionEvent) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The latest date time when the retentionEvent was modified. +func (m *RetentionEvent) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetLastStatusUpdateDateTime gets the lastStatusUpdateDateTime property value. Last time the status of the event was updated. +func (m *RetentionEvent) GetLastStatusUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastStatusUpdateDateTime +} +// GetRetentionEventType gets the retentionEventType property value. Specifies the event that will start the retention period for labels that use this event type when an event is created. +func (m *RetentionEvent) GetRetentionEventType()(RetentionEventTypeable) { + return m.retentionEventType +} +// Serialize serializes information the current object +func (m *RetentionEvent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEventPropagationResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEventPropagationResults())) + for i, v := range m.GetEventPropagationResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("eventPropagationResults", cast) + if err != nil { + return err + } + } + if m.GetEventQueries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEventQueries())) + for i, v := range m.GetEventQueries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("eventQueries", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("eventStatus", m.GetEventStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("eventTriggerDateTime", m.GetEventTriggerDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastStatusUpdateDateTime", m.GetLastStatusUpdateDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("retentionEventType", m.GetRetentionEventType()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the retentionEvent. +func (m *RetentionEvent) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date time when the retentionEvent was created. +func (m *RetentionEvent) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Optional information about the event. +func (m *RetentionEvent) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the event. +func (m *RetentionEvent) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEventPropagationResults sets the eventPropagationResults property value. The eventPropagationResults property +func (m *RetentionEvent) SetEventPropagationResults(value []EventPropagationResultable)() { + m.eventPropagationResults = value +} +// SetEventQueries sets the eventQueries property value. Represents the workload (SharePoint Online, OneDrive for Business, Exchange Online) and identification information associated with a retention event. +func (m *RetentionEvent) SetEventQueries(value []EventQueryable)() { + m.eventQueries = value +} +// SetEventStatus sets the eventStatus property value. The eventStatus property +func (m *RetentionEvent) SetEventStatus(value RetentionEventStatusable)() { + m.eventStatus = value +} +// SetEventTriggerDateTime sets the eventTriggerDateTime property value. Optional time when the event should be triggered. +func (m *RetentionEvent) SetEventTriggerDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.eventTriggerDateTime = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the retentionEvent. +func (m *RetentionEvent) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The latest date time when the retentionEvent was modified. +func (m *RetentionEvent) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetLastStatusUpdateDateTime sets the lastStatusUpdateDateTime property value. Last time the status of the event was updated. +func (m *RetentionEvent) SetLastStatusUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastStatusUpdateDateTime = value +} +// SetRetentionEventType sets the retentionEventType property value. Specifies the event that will start the retention period for labels that use this event type when an event is created. +func (m *RetentionEvent) SetRetentionEventType(value RetentionEventTypeable)() { + m.retentionEventType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_collection_response.go b/src/internal/connector/graph/betasdk/models/security/retention_event_collection_response.go new file mode 100644 index 000000000..3b3c63d08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventCollectionResponse +type RetentionEventCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []RetentionEventable +} +// NewRetentionEventCollectionResponse instantiates a new RetentionEventCollectionResponse and sets the default values. +func NewRetentionEventCollectionResponse()(*RetentionEventCollectionResponse) { + m := &RetentionEventCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRetentionEventCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionEventCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionEventCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionEventCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionEventable, len(val)) + for i, v := range val { + res[i] = v.(RetentionEventable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RetentionEventCollectionResponse) GetValue()([]RetentionEventable) { + return m.value +} +// Serialize serializes information the current object +func (m *RetentionEventCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RetentionEventCollectionResponse) SetValue(value []RetentionEventable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/retention_event_collection_responseable.go new file mode 100644 index 000000000..f71aab476 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventCollectionResponseable +type RetentionEventCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RetentionEventable) + SetValue(value []RetentionEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_status.go b/src/internal/connector/graph/betasdk/models/security/retention_event_status.go new file mode 100644 index 000000000..541c084ac --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_status.go @@ -0,0 +1,125 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventStatus +type RetentionEventStatus 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 error if the status is not successful. + error ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable + // The OdataType property + odataType *string + // The status of the distribution. The possible values are: pending, error, success, notAvaliable. + status *EventStatusType +} +// NewRetentionEventStatus instantiates a new retentionEventStatus and sets the default values. +func NewRetentionEventStatus()(*RetentionEventStatus) { + m := &RetentionEventStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateRetentionEventStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionEventStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionEventStatus(), 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 *RetentionEventStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetError gets the error property value. The error if the status is not successful. +func (m *RetentionEventStatus) GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) { + return m.error +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionEventStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["error"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreatePublicErrorFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetError(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)) + } + 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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEventStatusType) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*EventStatusType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *RetentionEventStatus) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. The status of the distribution. The possible values are: pending, error, success, notAvaliable. +func (m *RetentionEventStatus) GetStatus()(*EventStatusType) { + return m.status +} +// Serialize serializes information the current object +func (m *RetentionEventStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteObjectValue("error", m.GetError()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &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 *RetentionEventStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetError sets the error property value. The error if the status is not successful. +func (m *RetentionEventStatus) SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() { + m.error = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *RetentionEventStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. The status of the distribution. The possible values are: pending, error, success, notAvaliable. +func (m *RetentionEventStatus) SetStatus(value *EventStatusType)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_statusable.go b/src/internal/connector/graph/betasdk/models/security/retention_event_statusable.go new file mode 100644 index 000000000..866dbe6df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_statusable.go @@ -0,0 +1,18 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventStatusable +type RetentionEventStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetError()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable) + GetOdataType()(*string) + GetStatus()(*EventStatusType) + SetError(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.PublicErrorable)() + SetOdataType(value *string)() + SetStatus(value *EventStatusType)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_type.go b/src/internal/connector/graph/betasdk/models/security/retention_event_type.go new file mode 100644 index 000000000..0c499903d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_type.go @@ -0,0 +1,192 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventType +type RetentionEventType struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The user who created the retentionEventType. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The date time when the retentionEventType was created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Optional information about the event type. + description *string + // Name of the event type. + displayName *string + // The user who last modified the retentionEventType. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The latest date time when the retentionEventType was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewRetentionEventType instantiates a new retentionEventType and sets the default values. +func NewRetentionEventType()(*RetentionEventType) { + m := &RetentionEventType{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateRetentionEventTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionEventTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionEventType(), nil +} +// GetCreatedBy gets the createdBy property value. The user who created the retentionEventType. +func (m *RetentionEventType) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The date time when the retentionEventType was created. +func (m *RetentionEventType) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. Optional information about the event type. +func (m *RetentionEventType) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. Name of the event type. +func (m *RetentionEventType) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionEventType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the retentionEventType. +func (m *RetentionEventType) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The latest date time when the retentionEventType was modified. +func (m *RetentionEventType) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *RetentionEventType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The user who created the retentionEventType. +func (m *RetentionEventType) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The date time when the retentionEventType was created. +func (m *RetentionEventType) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. Optional information about the event type. +func (m *RetentionEventType) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. Name of the event type. +func (m *RetentionEventType) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the retentionEventType. +func (m *RetentionEventType) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The latest date time when the retentionEventType was modified. +func (m *RetentionEventType) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_response.go b/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_response.go new file mode 100644 index 000000000..b29e5117e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventTypeCollectionResponse +type RetentionEventTypeCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []RetentionEventTypeable +} +// NewRetentionEventTypeCollectionResponse instantiates a new RetentionEventTypeCollectionResponse and sets the default values. +func NewRetentionEventTypeCollectionResponse()(*RetentionEventTypeCollectionResponse) { + m := &RetentionEventTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRetentionEventTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionEventTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionEventTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionEventTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionEventTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionEventTypeable, len(val)) + for i, v := range val { + res[i] = v.(RetentionEventTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RetentionEventTypeCollectionResponse) GetValue()([]RetentionEventTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *RetentionEventTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RetentionEventTypeCollectionResponse) SetValue(value []RetentionEventTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_responseable.go new file mode 100644 index 000000000..a0c6f78e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_type_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventTypeCollectionResponseable +type RetentionEventTypeCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RetentionEventTypeable) + SetValue(value []RetentionEventTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_event_typeable.go b/src/internal/connector/graph/betasdk/models/security/retention_event_typeable.go new file mode 100644 index 000000000..9598bb85c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_event_typeable.go @@ -0,0 +1,25 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventTypeable +type RetentionEventTypeable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_eventable.go b/src/internal/connector/graph/betasdk/models/security/retention_eventable.go new file mode 100644 index 000000000..f27c8f936 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_eventable.go @@ -0,0 +1,37 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionEventable +type RetentionEventable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetEventPropagationResults()([]EventPropagationResultable) + GetEventQueries()([]EventQueryable) + GetEventStatus()(RetentionEventStatusable) + GetEventTriggerDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastStatusUpdateDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRetentionEventType()(RetentionEventTypeable) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetEventPropagationResults(value []EventPropagationResultable)() + SetEventQueries(value []EventQueryable)() + SetEventStatus(value RetentionEventStatusable)() + SetEventTriggerDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastStatusUpdateDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRetentionEventType(value RetentionEventTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_label.go b/src/internal/connector/graph/betasdk/models/security/retention_label.go new file mode 100644 index 000000000..996835e1e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_label.go @@ -0,0 +1,464 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionLabel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RetentionLabel struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Specifies the action to take on a document with this label applied during the retention period. The possible values are: none, delete, startDispositionReview, unknownFutureValue. + actionAfterRetentionPeriod *ActionAfterRetentionPeriod + // Specifies how the behavior of a document with this label should be during the retention period. The possible values are: doNotRetain, retain, retainAsRecord, retainAsRegulatoryRecord, unknownFutureValue. + behaviorDuringRetentionPeriod *BehaviorDuringRetentionPeriod + // Represents the user who created the retentionLabel. + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // Represents the date and time in which the retentionLabel is created. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the locked or unlocked state of a record label when it is created.The possible values are: startLocked, startUnlocked, unknownFutureValue. + defaultRecordBehavior *DefaultRecordBehavior + // Provides label information for the admin. Optional. + descriptionForAdmins *string + // Provides the label information for the user. Optional. + descriptionForUsers *string + // Unique string that defines a label name. + displayName *string + // Review stages during which reviewers are notified to determine whether a document must be deleted or retained. + dispositionReviewStages []DispositionReviewStageable + // Specifies whether the label is currently being used. + isInUse *bool + // Specifies the replacement label to be applied automatically after the retention period of the current label ends. + labelToBeApplied *string + // The user who last modified the retentionLabel. + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The latest date time when the retentionLabel was modified. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the number of days to retain the content. + retentionDuration RetentionDurationable + // The retentionEventType property + retentionEventType RetentionEventTypeable + // Specifies whether the retention duration is calculated from the content creation date, labeled date, or last modification date. The possible values are: dateLabeled, dateCreated, dateModified, dateOfEvent, unknownFutureValue. + retentionTrigger *RetentionTrigger +} +// NewRetentionLabel instantiates a new retentionLabel and sets the default values. +func NewRetentionLabel()(*RetentionLabel) { + m := &RetentionLabel{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateRetentionLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionLabel(), nil +} +// GetActionAfterRetentionPeriod gets the actionAfterRetentionPeriod property value. Specifies the action to take on a document with this label applied during the retention period. The possible values are: none, delete, startDispositionReview, unknownFutureValue. +func (m *RetentionLabel) GetActionAfterRetentionPeriod()(*ActionAfterRetentionPeriod) { + return m.actionAfterRetentionPeriod +} +// GetBehaviorDuringRetentionPeriod gets the behaviorDuringRetentionPeriod property value. Specifies how the behavior of a document with this label should be during the retention period. The possible values are: doNotRetain, retain, retainAsRecord, retainAsRegulatoryRecord, unknownFutureValue. +func (m *RetentionLabel) GetBehaviorDuringRetentionPeriod()(*BehaviorDuringRetentionPeriod) { + return m.behaviorDuringRetentionPeriod +} +// GetCreatedBy gets the createdBy property value. Represents the user who created the retentionLabel. +func (m *RetentionLabel) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Represents the date and time in which the retentionLabel is created. +func (m *RetentionLabel) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDefaultRecordBehavior gets the defaultRecordBehavior property value. Specifies the locked or unlocked state of a record label when it is created.The possible values are: startLocked, startUnlocked, unknownFutureValue. +func (m *RetentionLabel) GetDefaultRecordBehavior()(*DefaultRecordBehavior) { + return m.defaultRecordBehavior +} +// GetDescriptionForAdmins gets the descriptionForAdmins property value. Provides label information for the admin. Optional. +func (m *RetentionLabel) GetDescriptionForAdmins()(*string) { + return m.descriptionForAdmins +} +// GetDescriptionForUsers gets the descriptionForUsers property value. Provides the label information for the user. Optional. +func (m *RetentionLabel) GetDescriptionForUsers()(*string) { + return m.descriptionForUsers +} +// GetDisplayName gets the displayName property value. Unique string that defines a label name. +func (m *RetentionLabel) GetDisplayName()(*string) { + return m.displayName +} +// GetDispositionReviewStages gets the dispositionReviewStages property value. Review stages during which reviewers are notified to determine whether a document must be deleted or retained. +func (m *RetentionLabel) GetDispositionReviewStages()([]DispositionReviewStageable) { + return m.dispositionReviewStages +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionAfterRetentionPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActionAfterRetentionPeriod) + if err != nil { + return err + } + if val != nil { + m.SetActionAfterRetentionPeriod(val.(*ActionAfterRetentionPeriod)) + } + return nil + } + res["behaviorDuringRetentionPeriod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseBehaviorDuringRetentionPeriod) + if err != nil { + return err + } + if val != nil { + m.SetBehaviorDuringRetentionPeriod(val.(*BehaviorDuringRetentionPeriod)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["defaultRecordBehavior"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseDefaultRecordBehavior) + if err != nil { + return err + } + if val != nil { + m.SetDefaultRecordBehavior(val.(*DefaultRecordBehavior)) + } + return nil + } + res["descriptionForAdmins"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescriptionForAdmins(val) + } + return nil + } + res["descriptionForUsers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescriptionForUsers(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["dispositionReviewStages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDispositionReviewStageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DispositionReviewStageable, len(val)) + for i, v := range val { + res[i] = v.(DispositionReviewStageable) + } + m.SetDispositionReviewStages(res) + } + return nil + } + res["isInUse"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsInUse(val) + } + return nil + } + res["labelToBeApplied"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLabelToBeApplied(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["retentionDuration"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRetentionDurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRetentionDuration(val.(RetentionDurationable)) + } + return nil + } + res["retentionEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateRetentionEventTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRetentionEventType(val.(RetentionEventTypeable)) + } + return nil + } + res["retentionTrigger"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRetentionTrigger) + if err != nil { + return err + } + if val != nil { + m.SetRetentionTrigger(val.(*RetentionTrigger)) + } + return nil + } + return res +} +// GetIsInUse gets the isInUse property value. Specifies whether the label is currently being used. +func (m *RetentionLabel) GetIsInUse()(*bool) { + return m.isInUse +} +// GetLabelToBeApplied gets the labelToBeApplied property value. Specifies the replacement label to be applied automatically after the retention period of the current label ends. +func (m *RetentionLabel) GetLabelToBeApplied()(*string) { + return m.labelToBeApplied +} +// GetLastModifiedBy gets the lastModifiedBy property value. The user who last modified the retentionLabel. +func (m *RetentionLabel) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The latest date time when the retentionLabel was modified. +func (m *RetentionLabel) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetRetentionDuration gets the retentionDuration property value. Specifies the number of days to retain the content. +func (m *RetentionLabel) GetRetentionDuration()(RetentionDurationable) { + return m.retentionDuration +} +// GetRetentionEventType gets the retentionEventType property value. The retentionEventType property +func (m *RetentionLabel) GetRetentionEventType()(RetentionEventTypeable) { + return m.retentionEventType +} +// GetRetentionTrigger gets the retentionTrigger property value. Specifies whether the retention duration is calculated from the content creation date, labeled date, or last modification date. The possible values are: dateLabeled, dateCreated, dateModified, dateOfEvent, unknownFutureValue. +func (m *RetentionLabel) GetRetentionTrigger()(*RetentionTrigger) { + return m.retentionTrigger +} +// Serialize serializes information the current object +func (m *RetentionLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActionAfterRetentionPeriod() != nil { + cast := (*m.GetActionAfterRetentionPeriod()).String() + err = writer.WriteStringValue("actionAfterRetentionPeriod", &cast) + if err != nil { + return err + } + } + if m.GetBehaviorDuringRetentionPeriod() != nil { + cast := (*m.GetBehaviorDuringRetentionPeriod()).String() + err = writer.WriteStringValue("behaviorDuringRetentionPeriod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + if m.GetDefaultRecordBehavior() != nil { + cast := (*m.GetDefaultRecordBehavior()).String() + err = writer.WriteStringValue("defaultRecordBehavior", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("descriptionForAdmins", m.GetDescriptionForAdmins()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("descriptionForUsers", m.GetDescriptionForUsers()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetDispositionReviewStages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDispositionReviewStages())) + for i, v := range m.GetDispositionReviewStages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("dispositionReviewStages", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isInUse", m.GetIsInUse()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("labelToBeApplied", m.GetLabelToBeApplied()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("retentionDuration", m.GetRetentionDuration()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("retentionEventType", m.GetRetentionEventType()) + if err != nil { + return err + } + } + if m.GetRetentionTrigger() != nil { + cast := (*m.GetRetentionTrigger()).String() + err = writer.WriteStringValue("retentionTrigger", &cast) + if err != nil { + return err + } + } + return nil +} +// SetActionAfterRetentionPeriod sets the actionAfterRetentionPeriod property value. Specifies the action to take on a document with this label applied during the retention period. The possible values are: none, delete, startDispositionReview, unknownFutureValue. +func (m *RetentionLabel) SetActionAfterRetentionPeriod(value *ActionAfterRetentionPeriod)() { + m.actionAfterRetentionPeriod = value +} +// SetBehaviorDuringRetentionPeriod sets the behaviorDuringRetentionPeriod property value. Specifies how the behavior of a document with this label should be during the retention period. The possible values are: doNotRetain, retain, retainAsRecord, retainAsRegulatoryRecord, unknownFutureValue. +func (m *RetentionLabel) SetBehaviorDuringRetentionPeriod(value *BehaviorDuringRetentionPeriod)() { + m.behaviorDuringRetentionPeriod = value +} +// SetCreatedBy sets the createdBy property value. Represents the user who created the retentionLabel. +func (m *RetentionLabel) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Represents the date and time in which the retentionLabel is created. +func (m *RetentionLabel) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDefaultRecordBehavior sets the defaultRecordBehavior property value. Specifies the locked or unlocked state of a record label when it is created.The possible values are: startLocked, startUnlocked, unknownFutureValue. +func (m *RetentionLabel) SetDefaultRecordBehavior(value *DefaultRecordBehavior)() { + m.defaultRecordBehavior = value +} +// SetDescriptionForAdmins sets the descriptionForAdmins property value. Provides label information for the admin. Optional. +func (m *RetentionLabel) SetDescriptionForAdmins(value *string)() { + m.descriptionForAdmins = value +} +// SetDescriptionForUsers sets the descriptionForUsers property value. Provides the label information for the user. Optional. +func (m *RetentionLabel) SetDescriptionForUsers(value *string)() { + m.descriptionForUsers = value +} +// SetDisplayName sets the displayName property value. Unique string that defines a label name. +func (m *RetentionLabel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetDispositionReviewStages sets the dispositionReviewStages property value. Review stages during which reviewers are notified to determine whether a document must be deleted or retained. +func (m *RetentionLabel) SetDispositionReviewStages(value []DispositionReviewStageable)() { + m.dispositionReviewStages = value +} +// SetIsInUse sets the isInUse property value. Specifies whether the label is currently being used. +func (m *RetentionLabel) SetIsInUse(value *bool)() { + m.isInUse = value +} +// SetLabelToBeApplied sets the labelToBeApplied property value. Specifies the replacement label to be applied automatically after the retention period of the current label ends. +func (m *RetentionLabel) SetLabelToBeApplied(value *string)() { + m.labelToBeApplied = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The user who last modified the retentionLabel. +func (m *RetentionLabel) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The latest date time when the retentionLabel was modified. +func (m *RetentionLabel) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetRetentionDuration sets the retentionDuration property value. Specifies the number of days to retain the content. +func (m *RetentionLabel) SetRetentionDuration(value RetentionDurationable)() { + m.retentionDuration = value +} +// SetRetentionEventType sets the retentionEventType property value. The retentionEventType property +func (m *RetentionLabel) SetRetentionEventType(value RetentionEventTypeable)() { + m.retentionEventType = value +} +// SetRetentionTrigger sets the retentionTrigger property value. Specifies whether the retention duration is calculated from the content creation date, labeled date, or last modification date. The possible values are: dateLabeled, dateCreated, dateModified, dateOfEvent, unknownFutureValue. +func (m *RetentionLabel) SetRetentionTrigger(value *RetentionTrigger)() { + m.retentionTrigger = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_label_collection_response.go b/src/internal/connector/graph/betasdk/models/security/retention_label_collection_response.go new file mode 100644 index 000000000..79b91c063 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_label_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionLabelCollectionResponse +type RetentionLabelCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []RetentionLabelable +} +// NewRetentionLabelCollectionResponse instantiates a new RetentionLabelCollectionResponse and sets the default values. +func NewRetentionLabelCollectionResponse()(*RetentionLabelCollectionResponse) { + m := &RetentionLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateRetentionLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateRetentionLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewRetentionLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *RetentionLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionLabelable, len(val)) + for i, v := range val { + res[i] = v.(RetentionLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *RetentionLabelCollectionResponse) GetValue()([]RetentionLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *RetentionLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *RetentionLabelCollectionResponse) SetValue(value []RetentionLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_label_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/retention_label_collection_responseable.go new file mode 100644 index 000000000..c97f1dfe5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_label_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionLabelCollectionResponseable +type RetentionLabelCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]RetentionLabelable) + SetValue(value []RetentionLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_labelable.go b/src/internal/connector/graph/betasdk/models/security/retention_labelable.go new file mode 100644 index 000000000..950c0be00 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_labelable.go @@ -0,0 +1,45 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// RetentionLabelable +type RetentionLabelable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionAfterRetentionPeriod()(*ActionAfterRetentionPeriod) + GetBehaviorDuringRetentionPeriod()(*BehaviorDuringRetentionPeriod) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDefaultRecordBehavior()(*DefaultRecordBehavior) + GetDescriptionForAdmins()(*string) + GetDescriptionForUsers()(*string) + GetDisplayName()(*string) + GetDispositionReviewStages()([]DispositionReviewStageable) + GetIsInUse()(*bool) + GetLabelToBeApplied()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetRetentionDuration()(RetentionDurationable) + GetRetentionEventType()(RetentionEventTypeable) + GetRetentionTrigger()(*RetentionTrigger) + SetActionAfterRetentionPeriod(value *ActionAfterRetentionPeriod)() + SetBehaviorDuringRetentionPeriod(value *BehaviorDuringRetentionPeriod)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDefaultRecordBehavior(value *DefaultRecordBehavior)() + SetDescriptionForAdmins(value *string)() + SetDescriptionForUsers(value *string)() + SetDisplayName(value *string)() + SetDispositionReviewStages(value []DispositionReviewStageable)() + SetIsInUse(value *bool)() + SetLabelToBeApplied(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetRetentionDuration(value RetentionDurationable)() + SetRetentionEventType(value RetentionEventTypeable)() + SetRetentionTrigger(value *RetentionTrigger)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/retention_trigger.go b/src/internal/connector/graph/betasdk/models/security/retention_trigger.go new file mode 100644 index 000000000..e39109b07 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/retention_trigger.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type RetentionTrigger int + +const ( + DATELABELED_RETENTIONTRIGGER RetentionTrigger = iota + DATECREATED_RETENTIONTRIGGER + DATEMODIFIED_RETENTIONTRIGGER + DATEOFEVENT_RETENTIONTRIGGER + UNKNOWNFUTUREVALUE_RETENTIONTRIGGER +) + +func (i RetentionTrigger) String() string { + return []string{"dateLabeled", "dateCreated", "dateModified", "dateOfEvent", "unknownFutureValue"}[i] +} +func ParseRetentionTrigger(v string) (interface{}, error) { + result := DATELABELED_RETENTIONTRIGGER + switch v { + case "dateLabeled": + result = DATELABELED_RETENTIONTRIGGER + case "dateCreated": + result = DATECREATED_RETENTIONTRIGGER + case "dateModified": + result = DATEMODIFIED_RETENTIONTRIGGER + case "dateOfEvent": + result = DATEOFEVENT_RETENTIONTRIGGER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_RETENTIONTRIGGER + default: + return 0, errors.New("Unknown RetentionTrigger value: " + v) + } + return &result, nil +} +func SerializeRetentionTrigger(values []RetentionTrigger) []string { + 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/security/search.go b/src/internal/connector/graph/betasdk/models/security/search.go new file mode 100644 index 000000000..9f93fd583 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/search.go @@ -0,0 +1,238 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Search provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Search struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The contentQuery property + contentQuery *string + // The createdBy property + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The createdDateTime property + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The description property + description *string + // The displayName property + displayName *string + // The lastModifiedBy property + lastModifiedBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewSearch instantiates a new search and sets the default values. +func NewSearch()(*Search) { + m := &Search{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSearchFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSearchFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryReviewSetQuery": + return NewEdiscoveryReviewSetQuery(), nil + case "#microsoft.graph.security.ediscoverySearch": + return NewEdiscoverySearch(), nil + } + } + } + } + return NewSearch(), nil +} +// GetContentQuery gets the contentQuery property value. The contentQuery property +func (m *Search) GetContentQuery()(*string) { + return m.contentQuery +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *Search) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. The createdDateTime property +func (m *Search) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The description property +func (m *Search) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Search) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Search) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contentQuery"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentQuery(val) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedBy gets the lastModifiedBy property value. The lastModifiedBy property +func (m *Search) GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.lastModifiedBy +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Search) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *Search) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("contentQuery", m.GetContentQuery()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastModifiedBy", m.GetLastModifiedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetContentQuery sets the contentQuery property value. The contentQuery property +func (m *Search) SetContentQuery(value *string)() { + m.contentQuery = value +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *Search) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. The createdDateTime property +func (m *Search) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The description property +func (m *Search) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Search) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedBy sets the lastModifiedBy property value. The lastModifiedBy property +func (m *Search) SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.lastModifiedBy = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Search) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/searchable.go b/src/internal/connector/graph/betasdk/models/security/searchable.go new file mode 100644 index 000000000..027e6177d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/searchable.go @@ -0,0 +1,27 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Searchable +type Searchable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContentQuery()(*string) + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetContentQuery(value *string)() + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/security.go b/src/internal/connector/graph/betasdk/models/security/security.go new file mode 100644 index 000000000..6b16103fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/security.go @@ -0,0 +1,61 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Security +type Security struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The informationProtection property + informationProtection InformationProtectionable +} +// NewSecurity instantiates a new security and sets the default values. +func NewSecurity()(*Security) { + m := &Security{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSecurityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Security) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["informationProtection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationProtectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInformationProtection(val.(InformationProtectionable)) + } + return nil + } + return res +} +// GetInformationProtection gets the informationProtection property value. The informationProtection property +func (m *Security) GetInformationProtection()(InformationProtectionable) { + return m.informationProtection +} +// Serialize serializes information the current object +func (m *Security) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("informationProtection", m.GetInformationProtection()) + if err != nil { + return err + } + } + return nil +} +// SetInformationProtection sets the informationProtection property value. The informationProtection property +func (m *Security) SetInformationProtection(value InformationProtectionable)() { + m.informationProtection = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/security_group_evidence.go b/src/internal/connector/graph/betasdk/models/security/security_group_evidence.go new file mode 100644 index 000000000..db20f5322 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/security_group_evidence.go @@ -0,0 +1,86 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityGroupEvidence +type SecurityGroupEvidence struct { + AlertEvidence + // The name of the security group. + displayName *string + // Unique identifier of the security group. + securityGroupId *string +} +// NewSecurityGroupEvidence instantiates a new SecurityGroupEvidence and sets the default values. +func NewSecurityGroupEvidence()(*SecurityGroupEvidence) { + m := &SecurityGroupEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateSecurityGroupEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityGroupEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityGroupEvidence(), nil +} +// GetDisplayName gets the displayName property value. The name of the security group. +func (m *SecurityGroupEvidence) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityGroupEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["securityGroupId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityGroupId(val) + } + return nil + } + return res +} +// GetSecurityGroupId gets the securityGroupId property value. Unique identifier of the security group. +func (m *SecurityGroupEvidence) GetSecurityGroupId()(*string) { + return m.securityGroupId +} +// Serialize serializes information the current object +func (m *SecurityGroupEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("securityGroupId", m.GetSecurityGroupId()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The name of the security group. +func (m *SecurityGroupEvidence) SetDisplayName(value *string)() { + m.displayName = value +} +// SetSecurityGroupId sets the securityGroupId property value. Unique identifier of the security group. +func (m *SecurityGroupEvidence) SetSecurityGroupId(value *string)() { + m.securityGroupId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/security_group_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/security_group_evidenceable.go new file mode 100644 index 000000000..4e8ab5b93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/security_group_evidenceable.go @@ -0,0 +1,15 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityGroupEvidenceable +type SecurityGroupEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetSecurityGroupId()(*string) + SetDisplayName(value *string)() + SetSecurityGroupId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/securityable.go b/src/internal/connector/graph/betasdk/models/security/securityable.go new file mode 100644 index 000000000..1eb6bcb6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/securityable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Securityable +type Securityable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetInformationProtection()(InformationProtectionable) + SetInformationProtection(value InformationProtectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/sensitivity_label.go b/src/internal/connector/graph/betasdk/models/security/sensitivity_label.go new file mode 100644 index 000000000..b8e44904d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/sensitivity_label.go @@ -0,0 +1,299 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SensitivityLabel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitivityLabel struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The color that the UI should display for the label, if configured. + color *string + // Returns the supported content formats for the label. + contentFormats []string + // The admin-defined description for the label. + description *string + // Indicates whether the label has protection actions configured. + hasProtection *bool + // Indicates whether the label is active or not. Active labels should be hidden or disabled in the UI. + isActive *bool + // Indicates whether the label can be applied to content. False if the label is a parent with child labels. + isAppliable *bool + // The plaintext name of the label. + name *string + // The parent label associated with a child label. Null if the label has no parent. + parent SensitivityLabelable + // The sensitivity value of the label, where lower is less sensitive. + sensitivity *int32 + // The tooltip that should be displayed for the label in a UI. + tooltip *string +} +// NewSensitivityLabel instantiates a new sensitivityLabel and sets the default values. +func NewSensitivityLabel()(*SensitivityLabel) { + m := &SensitivityLabel{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateSensitivityLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabel(), nil +} +// GetColor gets the color property value. The color that the UI should display for the label, if configured. +func (m *SensitivityLabel) GetColor()(*string) { + return m.color +} +// GetContentFormats gets the contentFormats property value. Returns the supported content formats for the label. +func (m *SensitivityLabel) GetContentFormats()([]string) { + return m.contentFormats +} +// GetDescription gets the description property value. The admin-defined description for the label. +func (m *SensitivityLabel) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["color"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetColor(val) + } + return nil + } + res["contentFormats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetContentFormats(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["hasProtection"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasProtection(val) + } + return nil + } + res["isActive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsActive(val) + } + return nil + } + res["isAppliable"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsAppliable(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parent"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetParent(val.(SensitivityLabelable)) + } + return nil + } + res["sensitivity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSensitivity(val) + } + return nil + } + res["tooltip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTooltip(val) + } + return nil + } + return res +} +// GetHasProtection gets the hasProtection property value. Indicates whether the label has protection actions configured. +func (m *SensitivityLabel) GetHasProtection()(*bool) { + return m.hasProtection +} +// GetIsActive gets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in the UI. +func (m *SensitivityLabel) GetIsActive()(*bool) { + return m.isActive +} +// GetIsAppliable gets the isAppliable property value. Indicates whether the label can be applied to content. False if the label is a parent with child labels. +func (m *SensitivityLabel) GetIsAppliable()(*bool) { + return m.isAppliable +} +// GetName gets the name property value. The plaintext name of the label. +func (m *SensitivityLabel) GetName()(*string) { + return m.name +} +// GetParent gets the parent property value. The parent label associated with a child label. Null if the label has no parent. +func (m *SensitivityLabel) GetParent()(SensitivityLabelable) { + return m.parent +} +// GetSensitivity gets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *SensitivityLabel) GetSensitivity()(*int32) { + return m.sensitivity +} +// GetTooltip gets the tooltip property value. The tooltip that should be displayed for the label in a UI. +func (m *SensitivityLabel) GetTooltip()(*string) { + return m.tooltip +} +// Serialize serializes information the current object +func (m *SensitivityLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("color", m.GetColor()) + if err != nil { + return err + } + } + if m.GetContentFormats() != nil { + err = writer.WriteCollectionOfStringValues("contentFormats", m.GetContentFormats()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasProtection", m.GetHasProtection()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isActive", m.GetIsActive()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isAppliable", m.GetIsAppliable()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("parent", m.GetParent()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("sensitivity", m.GetSensitivity()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tooltip", m.GetTooltip()) + if err != nil { + return err + } + } + return nil +} +// SetColor sets the color property value. The color that the UI should display for the label, if configured. +func (m *SensitivityLabel) SetColor(value *string)() { + m.color = value +} +// SetContentFormats sets the contentFormats property value. Returns the supported content formats for the label. +func (m *SensitivityLabel) SetContentFormats(value []string)() { + m.contentFormats = value +} +// SetDescription sets the description property value. The admin-defined description for the label. +func (m *SensitivityLabel) SetDescription(value *string)() { + m.description = value +} +// SetHasProtection sets the hasProtection property value. Indicates whether the label has protection actions configured. +func (m *SensitivityLabel) SetHasProtection(value *bool)() { + m.hasProtection = value +} +// SetIsActive sets the isActive property value. Indicates whether the label is active or not. Active labels should be hidden or disabled in the UI. +func (m *SensitivityLabel) SetIsActive(value *bool)() { + m.isActive = value +} +// SetIsAppliable sets the isAppliable property value. Indicates whether the label can be applied to content. False if the label is a parent with child labels. +func (m *SensitivityLabel) SetIsAppliable(value *bool)() { + m.isAppliable = value +} +// SetName sets the name property value. The plaintext name of the label. +func (m *SensitivityLabel) SetName(value *string)() { + m.name = value +} +// SetParent sets the parent property value. The parent label associated with a child label. Null if the label has no parent. +func (m *SensitivityLabel) SetParent(value SensitivityLabelable)() { + m.parent = value +} +// SetSensitivity sets the sensitivity property value. The sensitivity value of the label, where lower is less sensitive. +func (m *SensitivityLabel) SetSensitivity(value *int32)() { + m.sensitivity = value +} +// SetTooltip sets the tooltip property value. The tooltip that should be displayed for the label in a UI. +func (m *SensitivityLabel) SetTooltip(value *string)() { + m.tooltip = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_response.go b/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_response.go new file mode 100644 index 000000000..edc82edee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SensitivityLabelCollectionResponse +type SensitivityLabelCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SensitivityLabelable +} +// NewSensitivityLabelCollectionResponse instantiates a new SensitivityLabelCollectionResponse and sets the default values. +func NewSensitivityLabelCollectionResponse()(*SensitivityLabelCollectionResponse) { + m := &SensitivityLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitivityLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitivityLabelCollectionResponse) GetValue()([]SensitivityLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitivityLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitivityLabelCollectionResponse) SetValue(value []SensitivityLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_responseable.go new file mode 100644 index 000000000..0ffd22419 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/sensitivity_label_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SensitivityLabelCollectionResponseable +type SensitivityLabelCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitivityLabelable) + SetValue(value []SensitivityLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/sensitivity_labelable.go b/src/internal/connector/graph/betasdk/models/security/sensitivity_labelable.go new file mode 100644 index 000000000..09cbe3d29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/sensitivity_labelable.go @@ -0,0 +1,32 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SensitivityLabelable +type SensitivityLabelable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetColor()(*string) + GetContentFormats()([]string) + GetDescription()(*string) + GetHasProtection()(*bool) + GetIsActive()(*bool) + GetIsAppliable()(*bool) + GetName()(*string) + GetParent()(SensitivityLabelable) + GetSensitivity()(*int32) + GetTooltip()(*string) + SetColor(value *string)() + SetContentFormats(value []string)() + SetDescription(value *string)() + SetHasProtection(value *bool)() + SetIsActive(value *bool)() + SetIsAppliable(value *bool)() + SetName(value *string)() + SetParent(value SensitivityLabelable)() + SetSensitivity(value *int32)() + SetTooltip(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/service_source.go b/src/internal/connector/graph/betasdk/models/security/service_source.go new file mode 100644 index 000000000..d30fd0d83 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/service_source.go @@ -0,0 +1,58 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceSource int + +const ( + UNKNOWN_SERVICESOURCE ServiceSource = iota + MICROSOFTDEFENDERFORENDPOINT_SERVICESOURCE + MICROSOFTDEFENDERFORIDENTITY_SERVICESOURCE + MICROSOFTDEFENDERFORCLOUDAPPS_SERVICESOURCE + MICROSOFTDEFENDERFOROFFICE365_SERVICESOURCE + MICROSOFT365DEFENDER_SERVICESOURCE + AZUREADIDENTITYPROTECTION_SERVICESOURCE + MICROSOFTAPPGOVERNANCE_SERVICESOURCE + DATALOSSPREVENTION_SERVICESOURCE + UNKNOWNFUTUREVALUE_SERVICESOURCE +) + +func (i ServiceSource) String() string { + return []string{"unknown", "microsoftDefenderForEndpoint", "microsoftDefenderForIdentity", "microsoftDefenderForCloudApps", "microsoftDefenderForOffice365", "microsoft365Defender", "azureAdIdentityProtection", "microsoftAppGovernance", "dataLossPrevention", "unknownFutureValue"}[i] +} +func ParseServiceSource(v string) (interface{}, error) { + result := UNKNOWN_SERVICESOURCE + switch v { + case "unknown": + result = UNKNOWN_SERVICESOURCE + case "microsoftDefenderForEndpoint": + result = MICROSOFTDEFENDERFORENDPOINT_SERVICESOURCE + case "microsoftDefenderForIdentity": + result = MICROSOFTDEFENDERFORIDENTITY_SERVICESOURCE + case "microsoftDefenderForCloudApps": + result = MICROSOFTDEFENDERFORCLOUDAPPS_SERVICESOURCE + case "microsoftDefenderForOffice365": + result = MICROSOFTDEFENDERFOROFFICE365_SERVICESOURCE + case "microsoft365Defender": + result = MICROSOFT365DEFENDER_SERVICESOURCE + case "azureAdIdentityProtection": + result = AZUREADIDENTITYPROTECTION_SERVICESOURCE + case "microsoftAppGovernance": + result = MICROSOFTAPPGOVERNANCE_SERVICESOURCE + case "dataLossPrevention": + result = DATALOSSPREVENTION_SERVICESOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICESOURCE + default: + return 0, errors.New("Unknown ServiceSource value: " + v) + } + return &result, nil +} +func SerializeServiceSource(values []ServiceSource) []string { + 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/security/single_property_schema.go b/src/internal/connector/graph/betasdk/models/security/single_property_schema.go new file mode 100644 index 000000000..01be1fa09 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/single_property_schema.go @@ -0,0 +1,123 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SinglePropertySchema +type SinglePropertySchema 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 name of the property. + name *string + // The OdataType property + odataType *string + // The type of the property. + type_escaped *string +} +// NewSinglePropertySchema instantiates a new singlePropertySchema and sets the default values. +func NewSinglePropertySchema()(*SinglePropertySchema) { + m := &SinglePropertySchema{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSinglePropertySchemaFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSinglePropertySchemaFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSinglePropertySchema(), 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 *SinglePropertySchema) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SinglePropertySchema) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the property. +func (m *SinglePropertySchema) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SinglePropertySchema) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. The type of the property. +func (m *SinglePropertySchema) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *SinglePropertySchema) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *SinglePropertySchema) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name of the property. +func (m *SinglePropertySchema) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SinglePropertySchema) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. The type of the property. +func (m *SinglePropertySchema) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_response.go b/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_response.go new file mode 100644 index 000000000..6ea3c6d52 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SinglePropertySchemaCollectionResponse +type SinglePropertySchemaCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SinglePropertySchemaable +} +// NewSinglePropertySchemaCollectionResponse instantiates a new SinglePropertySchemaCollectionResponse and sets the default values. +func NewSinglePropertySchemaCollectionResponse()(*SinglePropertySchemaCollectionResponse) { + m := &SinglePropertySchemaCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSinglePropertySchemaCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSinglePropertySchemaCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSinglePropertySchemaCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SinglePropertySchemaCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSinglePropertySchemaFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SinglePropertySchemaable, len(val)) + for i, v := range val { + res[i] = v.(SinglePropertySchemaable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SinglePropertySchemaCollectionResponse) GetValue()([]SinglePropertySchemaable) { + return m.value +} +// Serialize serializes information the current object +func (m *SinglePropertySchemaCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SinglePropertySchemaCollectionResponse) SetValue(value []SinglePropertySchemaable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_responseable.go new file mode 100644 index 000000000..0163c4b6a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/single_property_schema_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SinglePropertySchemaCollectionResponseable +type SinglePropertySchemaCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SinglePropertySchemaable) + SetValue(value []SinglePropertySchemaable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/single_property_schemaable.go b/src/internal/connector/graph/betasdk/models/security/single_property_schemaable.go new file mode 100644 index 000000000..6344308e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/single_property_schemaable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SinglePropertySchemaable +type SinglePropertySchemaable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetType()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/site_source.go b/src/internal/connector/graph/betasdk/models/security/site_source.go new file mode 100644 index 000000000..3014a5578 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/site_source.go @@ -0,0 +1,63 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSource +type SiteSource struct { + DataSource + // The site property + site ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable +} +// NewSiteSource instantiates a new SiteSource and sets the default values. +func NewSiteSource()(*SiteSource) { + m := &SiteSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.security.siteSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSiteSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["site"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSite(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)) + } + return nil + } + return res +} +// GetSite gets the site property value. The site property +func (m *SiteSource) GetSite()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) { + return m.site +} +// Serialize serializes information the current object +func (m *SiteSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("site", m.GetSite()) + if err != nil { + return err + } + } + return nil +} +// SetSite sets the site property value. The site property +func (m *SiteSource) SetSite(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() { + m.site = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/site_source_collection_response.go b/src/internal/connector/graph/betasdk/models/security/site_source_collection_response.go new file mode 100644 index 000000000..660e37ab0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/site_source_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceCollectionResponse +type SiteSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SiteSourceable +} +// NewSiteSourceCollectionResponse instantiates a new SiteSourceCollectionResponse and sets the default values. +func NewSiteSourceCollectionResponse()(*SiteSourceCollectionResponse) { + m := &SiteSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSiteSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSiteSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSiteSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SiteSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSiteSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SiteSourceable, len(val)) + for i, v := range val { + res[i] = v.(SiteSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SiteSourceCollectionResponse) GetValue()([]SiteSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SiteSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SiteSourceCollectionResponse) SetValue(value []SiteSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/site_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/site_source_collection_responseable.go new file mode 100644 index 000000000..c75f5a07d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/site_source_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceCollectionResponseable +type SiteSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SiteSourceable) + SetValue(value []SiteSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/site_sourceable.go b/src/internal/connector/graph/betasdk/models/security/site_sourceable.go new file mode 100644 index 000000000..fedb5b3f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/site_sourceable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SiteSourceable +type SiteSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetSite()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable) + SetSite(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Siteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/source_type.go b/src/internal/connector/graph/betasdk/models/security/source_type.go new file mode 100644 index 000000000..bab45705b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/source_type.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SourceType int + +const ( + MAILBOX_SOURCETYPE SourceType = iota + SITE_SOURCETYPE + UNKNOWNFUTUREVALUE_SOURCETYPE +) + +func (i SourceType) String() string { + return []string{"mailbox", "site", "unknownFutureValue"}[i] +} +func ParseSourceType(v string) (interface{}, error) { + result := MAILBOX_SOURCETYPE + switch v { + case "mailbox": + result = MAILBOX_SOURCETYPE + case "site": + result = SITE_SOURCETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SOURCETYPE + default: + return 0, errors.New("Unknown SourceType value: " + v) + } + return &result, nil +} +func SerializeSourceType(values []SourceType) []string { + 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/security/string_value_dictionary.go b/src/internal/connector/graph/betasdk/models/security/string_value_dictionary.go new file mode 100644 index 000000000..b6e08bc5b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/string_value_dictionary.go @@ -0,0 +1,71 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StringValueDictionary +type StringValueDictionary 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 OdataType property + odataType *string +} +// NewStringValueDictionary instantiates a new stringValueDictionary and sets the default values. +func NewStringValueDictionary()(*StringValueDictionary) { + m := &StringValueDictionary{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateStringValueDictionaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateStringValueDictionaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewStringValueDictionary(), 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 *StringValueDictionary) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *StringValueDictionary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *StringValueDictionary) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *StringValueDictionary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *StringValueDictionary) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *StringValueDictionary) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/string_value_dictionaryable.go b/src/internal/connector/graph/betasdk/models/security/string_value_dictionaryable.go new file mode 100644 index 000000000..828622bb1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/string_value_dictionaryable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// StringValueDictionaryable +type StringValueDictionaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_admin_review.go b/src/internal/connector/graph/betasdk/models/security/submission_admin_review.go new file mode 100644 index 000000000..21444ee85 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_admin_review.go @@ -0,0 +1,151 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionAdminReview +type SubmissionAdminReview 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 OdataType property + odataType *string + // Specifies who reviewed the email. The identification is an email ID or other identity strings. + reviewBy *string + // Specifies the date time when the review occurred. + reviewDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies what the review result was. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable, and unknownFutureValue. + reviewResult *SubmissionResultCategory +} +// NewSubmissionAdminReview instantiates a new submissionAdminReview and sets the default values. +func NewSubmissionAdminReview()(*SubmissionAdminReview) { + m := &SubmissionAdminReview{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSubmissionAdminReviewFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSubmissionAdminReviewFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubmissionAdminReview(), 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 *SubmissionAdminReview) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SubmissionAdminReview) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["reviewBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewBy(val) + } + return nil + } + res["reviewDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetReviewDateTime(val) + } + return nil + } + res["reviewResult"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionResultCategory) + if err != nil { + return err + } + if val != nil { + m.SetReviewResult(val.(*SubmissionResultCategory)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SubmissionAdminReview) GetOdataType()(*string) { + return m.odataType +} +// GetReviewBy gets the reviewBy property value. Specifies who reviewed the email. The identification is an email ID or other identity strings. +func (m *SubmissionAdminReview) GetReviewBy()(*string) { + return m.reviewBy +} +// GetReviewDateTime gets the reviewDateTime property value. Specifies the date time when the review occurred. +func (m *SubmissionAdminReview) GetReviewDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.reviewDateTime +} +// GetReviewResult gets the reviewResult property value. Specifies what the review result was. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable, and unknownFutureValue. +func (m *SubmissionAdminReview) GetReviewResult()(*SubmissionResultCategory) { + return m.reviewResult +} +// Serialize serializes information the current object +func (m *SubmissionAdminReview) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("reviewBy", m.GetReviewBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("reviewDateTime", m.GetReviewDateTime()) + if err != nil { + return err + } + } + if m.GetReviewResult() != nil { + cast := (*m.GetReviewResult()).String() + err := writer.WriteStringValue("reviewResult", &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 *SubmissionAdminReview) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SubmissionAdminReview) SetOdataType(value *string)() { + m.odataType = value +} +// SetReviewBy sets the reviewBy property value. Specifies who reviewed the email. The identification is an email ID or other identity strings. +func (m *SubmissionAdminReview) SetReviewBy(value *string)() { + m.reviewBy = value +} +// SetReviewDateTime sets the reviewDateTime property value. Specifies the date time when the review occurred. +func (m *SubmissionAdminReview) SetReviewDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.reviewDateTime = value +} +// SetReviewResult sets the reviewResult property value. Specifies what the review result was. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable, and unknownFutureValue. +func (m *SubmissionAdminReview) SetReviewResult(value *SubmissionResultCategory)() { + m.reviewResult = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_admin_reviewable.go b/src/internal/connector/graph/betasdk/models/security/submission_admin_reviewable.go new file mode 100644 index 000000000..d7445d53e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_admin_reviewable.go @@ -0,0 +1,20 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionAdminReviewable +type SubmissionAdminReviewable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetReviewBy()(*string) + GetReviewDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetReviewResult()(*SubmissionResultCategory) + SetOdataType(value *string)() + SetReviewBy(value *string)() + SetReviewDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetReviewResult(value *SubmissionResultCategory)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_category.go b/src/internal/connector/graph/betasdk/models/security/submission_category.go new file mode 100644 index 000000000..09b773e16 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_category.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionCategory int + +const ( + NOTJUNK_SUBMISSIONCATEGORY SubmissionCategory = iota + SPAM_SUBMISSIONCATEGORY + PHISHING_SUBMISSIONCATEGORY + MALWARE_SUBMISSIONCATEGORY + UNKNOWNFUTUREVALUE_SUBMISSIONCATEGORY +) + +func (i SubmissionCategory) String() string { + return []string{"notJunk", "spam", "phishing", "malware", "unknownFutureValue"}[i] +} +func ParseSubmissionCategory(v string) (interface{}, error) { + result := NOTJUNK_SUBMISSIONCATEGORY + switch v { + case "notJunk": + result = NOTJUNK_SUBMISSIONCATEGORY + case "spam": + result = SPAM_SUBMISSIONCATEGORY + case "phishing": + result = PHISHING_SUBMISSIONCATEGORY + case "malware": + result = MALWARE_SUBMISSIONCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONCATEGORY + default: + return 0, errors.New("Unknown SubmissionCategory value: " + v) + } + return &result, nil +} +func SerializeSubmissionCategory(values []SubmissionCategory) []string { + 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/security/submission_client_source.go b/src/internal/connector/graph/betasdk/models/security/submission_client_source.go new file mode 100644 index 000000000..87e873d0f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_client_source.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionClientSource int + +const ( + MICROSOFT_SUBMISSIONCLIENTSOURCE SubmissionClientSource = iota + OTHER_SUBMISSIONCLIENTSOURCE + UNKNOWNFUTUREVALUE_SUBMISSIONCLIENTSOURCE +) + +func (i SubmissionClientSource) String() string { + return []string{"microsoft", "other", "unknownFutureValue"}[i] +} +func ParseSubmissionClientSource(v string) (interface{}, error) { + result := MICROSOFT_SUBMISSIONCLIENTSOURCE + switch v { + case "microsoft": + result = MICROSOFT_SUBMISSIONCLIENTSOURCE + case "other": + result = OTHER_SUBMISSIONCLIENTSOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONCLIENTSOURCE + default: + return 0, errors.New("Unknown SubmissionClientSource value: " + v) + } + return &result, nil +} +func SerializeSubmissionClientSource(values []SubmissionClientSource) []string { + 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/security/submission_content_type.go b/src/internal/connector/graph/betasdk/models/security/submission_content_type.go new file mode 100644 index 000000000..aee26bfb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_content_type.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionContentType int + +const ( + EMAIL_SUBMISSIONCONTENTTYPE SubmissionContentType = iota + URL_SUBMISSIONCONTENTTYPE + FILE_SUBMISSIONCONTENTTYPE + APP_SUBMISSIONCONTENTTYPE + UNKNOWNFUTUREVALUE_SUBMISSIONCONTENTTYPE +) + +func (i SubmissionContentType) String() string { + return []string{"email", "url", "file", "app", "unknownFutureValue"}[i] +} +func ParseSubmissionContentType(v string) (interface{}, error) { + result := EMAIL_SUBMISSIONCONTENTTYPE + switch v { + case "email": + result = EMAIL_SUBMISSIONCONTENTTYPE + case "url": + result = URL_SUBMISSIONCONTENTTYPE + case "file": + result = FILE_SUBMISSIONCONTENTTYPE + case "app": + result = APP_SUBMISSIONCONTENTTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONCONTENTTYPE + default: + return 0, errors.New("Unknown SubmissionContentType value: " + v) + } + return &result, nil +} +func SerializeSubmissionContentType(values []SubmissionContentType) []string { + 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/security/submission_detected_file.go b/src/internal/connector/graph/betasdk/models/security/submission_detected_file.go new file mode 100644 index 000000000..3c8482787 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_detected_file.go @@ -0,0 +1,123 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionDetectedFile +type SubmissionDetectedFile 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 file hash. + fileHash *string + // The file name. + fileName *string + // The OdataType property + odataType *string +} +// NewSubmissionDetectedFile instantiates a new submissionDetectedFile and sets the default values. +func NewSubmissionDetectedFile()(*SubmissionDetectedFile) { + m := &SubmissionDetectedFile{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSubmissionDetectedFileFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSubmissionDetectedFileFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubmissionDetectedFile(), 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 *SubmissionDetectedFile) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SubmissionDetectedFile) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["fileHash"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileHash(val) + } + return nil + } + res["fileName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFileName(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 + } + return res +} +// GetFileHash gets the fileHash property value. The file hash. +func (m *SubmissionDetectedFile) GetFileHash()(*string) { + return m.fileHash +} +// GetFileName gets the fileName property value. The file name. +func (m *SubmissionDetectedFile) GetFileName()(*string) { + return m.fileName +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SubmissionDetectedFile) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SubmissionDetectedFile) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("fileHash", m.GetFileHash()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("fileName", m.GetFileName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *SubmissionDetectedFile) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetFileHash sets the fileHash property value. The file hash. +func (m *SubmissionDetectedFile) SetFileHash(value *string)() { + m.fileHash = value +} +// SetFileName sets the fileName property value. The file name. +func (m *SubmissionDetectedFile) SetFileName(value *string)() { + m.fileName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SubmissionDetectedFile) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_response.go b/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_response.go new file mode 100644 index 000000000..d9030d0e8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SubmissionDetectedFileCollectionResponse +type SubmissionDetectedFileCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []SubmissionDetectedFileable +} +// NewSubmissionDetectedFileCollectionResponse instantiates a new SubmissionDetectedFileCollectionResponse and sets the default values. +func NewSubmissionDetectedFileCollectionResponse()(*SubmissionDetectedFileCollectionResponse) { + m := &SubmissionDetectedFileCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSubmissionDetectedFileCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSubmissionDetectedFileCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubmissionDetectedFileCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SubmissionDetectedFileCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSubmissionDetectedFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SubmissionDetectedFileable, len(val)) + for i, v := range val { + res[i] = v.(SubmissionDetectedFileable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SubmissionDetectedFileCollectionResponse) GetValue()([]SubmissionDetectedFileable) { + return m.value +} +// Serialize serializes information the current object +func (m *SubmissionDetectedFileCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SubmissionDetectedFileCollectionResponse) SetValue(value []SubmissionDetectedFileable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_responseable.go new file mode 100644 index 000000000..d989c0343 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_detected_file_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SubmissionDetectedFileCollectionResponseable +type SubmissionDetectedFileCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SubmissionDetectedFileable) + SetValue(value []SubmissionDetectedFileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_detected_fileable.go b/src/internal/connector/graph/betasdk/models/security/submission_detected_fileable.go new file mode 100644 index 000000000..e164e56b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_detected_fileable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionDetectedFileable +type SubmissionDetectedFileable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetFileHash()(*string) + GetFileName()(*string) + GetOdataType()(*string) + SetFileHash(value *string)() + SetFileName(value *string)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_result.go b/src/internal/connector/graph/betasdk/models/security/submission_result.go new file mode 100644 index 000000000..86b4de5f5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_result.go @@ -0,0 +1,216 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionResult +type SubmissionResult 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 submission result category. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable and unkownFutureValue. + category *SubmissionResultCategory + // Specifies the additional details provided by Microsoft to substantiate their analysis result. + detail *SubmissionResultDetail + // Specifies the files detected by Microsoft in the submitted emails. + detectedFiles []SubmissionDetectedFileable + // Specifes the URLs detected by Microsoft in the submitted email. + detectedUrls []string + // The OdataType property + odataType *string + // Specifies the setting for user mailbox denoted by a comma-separated string. + userMailboxSetting *UserMailboxSetting +} +// NewSubmissionResult instantiates a new submissionResult and sets the default values. +func NewSubmissionResult()(*SubmissionResult) { + m := &SubmissionResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSubmissionResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSubmissionResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubmissionResult(), 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 *SubmissionResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCategory gets the category property value. The submission result category. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable and unkownFutureValue. +func (m *SubmissionResult) GetCategory()(*SubmissionResultCategory) { + return m.category +} +// GetDetail gets the detail property value. Specifies the additional details provided by Microsoft to substantiate their analysis result. +func (m *SubmissionResult) GetDetail()(*SubmissionResultDetail) { + return m.detail +} +// GetDetectedFiles gets the detectedFiles property value. Specifies the files detected by Microsoft in the submitted emails. +func (m *SubmissionResult) GetDetectedFiles()([]SubmissionDetectedFileable) { + return m.detectedFiles +} +// GetDetectedUrls gets the detectedUrls property value. Specifes the URLs detected by Microsoft in the submitted email. +func (m *SubmissionResult) GetDetectedUrls()([]string) { + return m.detectedUrls +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SubmissionResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionResultCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*SubmissionResultCategory)) + } + return nil + } + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionResultDetail) + if err != nil { + return err + } + if val != nil { + m.SetDetail(val.(*SubmissionResultDetail)) + } + return nil + } + res["detectedFiles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSubmissionDetectedFileFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SubmissionDetectedFileable, len(val)) + for i, v := range val { + res[i] = v.(SubmissionDetectedFileable) + } + m.SetDetectedFiles(res) + } + return nil + } + res["detectedUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetDetectedUrls(res) + } + 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["userMailboxSetting"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseUserMailboxSetting) + if err != nil { + return err + } + if val != nil { + m.SetUserMailboxSetting(val.(*UserMailboxSetting)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SubmissionResult) GetOdataType()(*string) { + return m.odataType +} +// GetUserMailboxSetting gets the userMailboxSetting property value. Specifies the setting for user mailbox denoted by a comma-separated string. +func (m *SubmissionResult) GetUserMailboxSetting()(*UserMailboxSetting) { + return m.userMailboxSetting +} +// Serialize serializes information the current object +func (m *SubmissionResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err := writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + if m.GetDetail() != nil { + cast := (*m.GetDetail()).String() + err := writer.WriteStringValue("detail", &cast) + if err != nil { + return err + } + } + if m.GetDetectedFiles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetectedFiles())) + for i, v := range m.GetDetectedFiles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("detectedFiles", cast) + if err != nil { + return err + } + } + if m.GetDetectedUrls() != nil { + err := writer.WriteCollectionOfStringValues("detectedUrls", m.GetDetectedUrls()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetUserMailboxSetting() != nil { + cast := (*m.GetUserMailboxSetting()).String() + err := writer.WriteStringValue("userMailboxSetting", &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 *SubmissionResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCategory sets the category property value. The submission result category. The possible values are: notJunk, spam, phishing, malware, allowedByPolicy, blockedByPolicy, spoof, unknown, noResultAvailable and unkownFutureValue. +func (m *SubmissionResult) SetCategory(value *SubmissionResultCategory)() { + m.category = value +} +// SetDetail sets the detail property value. Specifies the additional details provided by Microsoft to substantiate their analysis result. +func (m *SubmissionResult) SetDetail(value *SubmissionResultDetail)() { + m.detail = value +} +// SetDetectedFiles sets the detectedFiles property value. Specifies the files detected by Microsoft in the submitted emails. +func (m *SubmissionResult) SetDetectedFiles(value []SubmissionDetectedFileable)() { + m.detectedFiles = value +} +// SetDetectedUrls sets the detectedUrls property value. Specifes the URLs detected by Microsoft in the submitted email. +func (m *SubmissionResult) SetDetectedUrls(value []string)() { + m.detectedUrls = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SubmissionResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserMailboxSetting sets the userMailboxSetting property value. Specifies the setting for user mailbox denoted by a comma-separated string. +func (m *SubmissionResult) SetUserMailboxSetting(value *UserMailboxSetting)() { + m.userMailboxSetting = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_result_category.go b/src/internal/connector/graph/betasdk/models/security/submission_result_category.go new file mode 100644 index 000000000..ae5a20755 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_result_category.go @@ -0,0 +1,58 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionResultCategory int + +const ( + NOTJUNK_SUBMISSIONRESULTCATEGORY SubmissionResultCategory = iota + SPAM_SUBMISSIONRESULTCATEGORY + PHISHING_SUBMISSIONRESULTCATEGORY + MALWARE_SUBMISSIONRESULTCATEGORY + ALLOWEDBYPOLICY_SUBMISSIONRESULTCATEGORY + BLOCKEDBYPOLICY_SUBMISSIONRESULTCATEGORY + SPOOF_SUBMISSIONRESULTCATEGORY + UNKNOWN_SUBMISSIONRESULTCATEGORY + NORESULTAVAILABLE_SUBMISSIONRESULTCATEGORY + UNKNOWNFUTUREVALUE_SUBMISSIONRESULTCATEGORY +) + +func (i SubmissionResultCategory) String() string { + return []string{"notJunk", "spam", "phishing", "malware", "allowedByPolicy", "blockedByPolicy", "spoof", "unknown", "noResultAvailable", "unknownFutureValue"}[i] +} +func ParseSubmissionResultCategory(v string) (interface{}, error) { + result := NOTJUNK_SUBMISSIONRESULTCATEGORY + switch v { + case "notJunk": + result = NOTJUNK_SUBMISSIONRESULTCATEGORY + case "spam": + result = SPAM_SUBMISSIONRESULTCATEGORY + case "phishing": + result = PHISHING_SUBMISSIONRESULTCATEGORY + case "malware": + result = MALWARE_SUBMISSIONRESULTCATEGORY + case "allowedByPolicy": + result = ALLOWEDBYPOLICY_SUBMISSIONRESULTCATEGORY + case "blockedByPolicy": + result = BLOCKEDBYPOLICY_SUBMISSIONRESULTCATEGORY + case "spoof": + result = SPOOF_SUBMISSIONRESULTCATEGORY + case "unknown": + result = UNKNOWN_SUBMISSIONRESULTCATEGORY + case "noResultAvailable": + result = NORESULTAVAILABLE_SUBMISSIONRESULTCATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONRESULTCATEGORY + default: + return 0, errors.New("Unknown SubmissionResultCategory value: " + v) + } + return &result, nil +} +func SerializeSubmissionResultCategory(values []SubmissionResultCategory) []string { + 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/security/submission_result_detail.go b/src/internal/connector/graph/betasdk/models/security/submission_result_detail.go new file mode 100644 index 000000000..71cb903ab --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_result_detail.go @@ -0,0 +1,190 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionResultDetail int + +const ( + NONE_SUBMISSIONRESULTDETAIL SubmissionResultDetail = iota + UNDERINVESTIGATION_SUBMISSIONRESULTDETAIL + SIMULATEDTHREAT_SUBMISSIONRESULTDETAIL + ALLOWEDBYSECOPS_SUBMISSIONRESULTDETAIL + ALLOWEDBYTHIRDPARTYFILTERS_SUBMISSIONRESULTDETAIL + MESSAGENOTFOUND_SUBMISSIONRESULTDETAIL + URLFILESHOULDNOTBEBLOCKED_SUBMISSIONRESULTDETAIL + URLFILESHOULDBEBLOCKED_SUBMISSIONRESULTDETAIL + URLFILECANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + DOMAINIMPERSONATION_SUBMISSIONRESULTDETAIL + USERIMPERSONATION_SUBMISSIONRESULTDETAIL + BRANDIMPERSONATION_SUBMISSIONRESULTDETAIL + OUTBOUNDSHOULDNOTBEBLOCKED_SUBMISSIONRESULTDETAIL + OUTBOUNDSHOULDBEBLOCKED_SUBMISSIONRESULTDETAIL + OUTBOUNDBULK_SUBMISSIONRESULTDETAIL + OUTBOUNDCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + OUTBOUNDNOTRESCANNED_SUBMISSIONRESULTDETAIL + ZEROHOURAUTOPURGEALLOWED_SUBMISSIONRESULTDETAIL + ZEROHOURAUTOPURGEBLOCKED_SUBMISSIONRESULTDETAIL + ZEROHOURAUTOPURGEQUARANTINERELEASED_SUBMISSIONRESULTDETAIL + ONPREMISESSKIP_SUBMISSIONRESULTDETAIL + ALLOWEDBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + BLOCKEDBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + ALLOWEDURLBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + ALLOWEDFILEBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + ALLOWEDSENDERBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + ALLOWEDRECIPIENTBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + BLOCKEDURLBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + BLOCKEDFILEBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + BLOCKEDSENDERBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + BLOCKEDRECIPIENTBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + ALLOWEDBYCONNECTION_SUBMISSIONRESULTDETAIL + BLOCKEDBYCONNECTION_SUBMISSIONRESULTDETAIL + ALLOWEDBYEXCHANGETRANSPORTRULE_SUBMISSIONRESULTDETAIL + BLOCKEDBYEXCHANGETRANSPORTRULE_SUBMISSIONRESULTDETAIL + QUARANTINERELEASED_SUBMISSIONRESULTDETAIL + QUARANTINERELEASEDTHENBLOCKED_SUBMISSIONRESULTDETAIL + JUNKMAILRULEDISABLED_SUBMISSIONRESULTDETAIL + ALLOWEDBYUSERSETTING_SUBMISSIONRESULTDETAIL + BLOCKEDBYUSERSETTING_SUBMISSIONRESULTDETAIL + ALLOWEDBYTENANT_SUBMISSIONRESULTDETAIL + BLOCKEDBYTENANT_SUBMISSIONRESULTDETAIL + INVALIDFALSEPOSITIVE_SUBMISSIONRESULTDETAIL + INVALIDFALSENEGATIVE_SUBMISSIONRESULTDETAIL + SPOOFBLOCKED_SUBMISSIONRESULTDETAIL + GOODRECLASSIFIEDASBAD_SUBMISSIONRESULTDETAIL + GOODRECLASSIFIEDASBULK_SUBMISSIONRESULTDETAIL + GOODRECLASSIFIEDASGOOD_SUBMISSIONRESULTDETAIL + GOODRECLASSIFIEDASCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + BADRECLASSIFIEDASGOOD_SUBMISSIONRESULTDETAIL + BADRECLASSIFIEDASBULK_SUBMISSIONRESULTDETAIL + BADRECLASSIFIEDASBAD_SUBMISSIONRESULTDETAIL + BADRECLASSIFIEDASCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + UNKNOWNFUTUREVALUE_SUBMISSIONRESULTDETAIL +) + +func (i SubmissionResultDetail) String() string { + return []string{"none", "underInvestigation", "simulatedThreat", "allowedBySecOps", "allowedByThirdPartyFilters", "messageNotFound", "urlFileShouldNotBeBlocked", "urlFileShouldBeBlocked", "urlFileCannotMakeDecision", "domainImpersonation", "userImpersonation", "brandImpersonation", "outboundShouldNotBeBlocked", "outboundShouldBeBlocked", "outboundBulk", "outboundCannotMakeDecision", "outboundNotRescanned", "zeroHourAutoPurgeAllowed", "zeroHourAutoPurgeBlocked", "zeroHourAutoPurgeQuarantineReleased", "onPremisesSkip", "allowedByTenantAllowBlockList", "blockedByTenantAllowBlockList", "allowedUrlByTenantAllowBlockList", "allowedFileByTenantAllowBlockList", "allowedSenderByTenantAllowBlockList", "allowedRecipientByTenantAllowBlockList", "blockedUrlByTenantAllowBlockList", "blockedFileByTenantAllowBlockList", "blockedSenderByTenantAllowBlockList", "blockedRecipientByTenantAllowBlockList", "allowedByConnection", "blockedByConnection", "allowedByExchangeTransportRule", "blockedByExchangeTransportRule", "quarantineReleased", "quarantineReleasedThenBlocked", "junkMailRuleDisabled", "allowedByUserSetting", "blockedByUserSetting", "allowedByTenant", "blockedByTenant", "invalidFalsePositive", "invalidFalseNegative", "spoofBlocked", "goodReclassifiedAsBad", "goodReclassifiedAsBulk", "goodReclassifiedAsGood", "goodReclassifiedAsCannotMakeDecision", "badReclassifiedAsGood", "badReclassifiedAsBulk", "badReclassifiedAsBad", "badReclassifiedAsCannotMakeDecision", "unknownFutureValue"}[i] +} +func ParseSubmissionResultDetail(v string) (interface{}, error) { + result := NONE_SUBMISSIONRESULTDETAIL + switch v { + case "none": + result = NONE_SUBMISSIONRESULTDETAIL + case "underInvestigation": + result = UNDERINVESTIGATION_SUBMISSIONRESULTDETAIL + case "simulatedThreat": + result = SIMULATEDTHREAT_SUBMISSIONRESULTDETAIL + case "allowedBySecOps": + result = ALLOWEDBYSECOPS_SUBMISSIONRESULTDETAIL + case "allowedByThirdPartyFilters": + result = ALLOWEDBYTHIRDPARTYFILTERS_SUBMISSIONRESULTDETAIL + case "messageNotFound": + result = MESSAGENOTFOUND_SUBMISSIONRESULTDETAIL + case "urlFileShouldNotBeBlocked": + result = URLFILESHOULDNOTBEBLOCKED_SUBMISSIONRESULTDETAIL + case "urlFileShouldBeBlocked": + result = URLFILESHOULDBEBLOCKED_SUBMISSIONRESULTDETAIL + case "urlFileCannotMakeDecision": + result = URLFILECANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + case "domainImpersonation": + result = DOMAINIMPERSONATION_SUBMISSIONRESULTDETAIL + case "userImpersonation": + result = USERIMPERSONATION_SUBMISSIONRESULTDETAIL + case "brandImpersonation": + result = BRANDIMPERSONATION_SUBMISSIONRESULTDETAIL + case "outboundShouldNotBeBlocked": + result = OUTBOUNDSHOULDNOTBEBLOCKED_SUBMISSIONRESULTDETAIL + case "outboundShouldBeBlocked": + result = OUTBOUNDSHOULDBEBLOCKED_SUBMISSIONRESULTDETAIL + case "outboundBulk": + result = OUTBOUNDBULK_SUBMISSIONRESULTDETAIL + case "outboundCannotMakeDecision": + result = OUTBOUNDCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + case "outboundNotRescanned": + result = OUTBOUNDNOTRESCANNED_SUBMISSIONRESULTDETAIL + case "zeroHourAutoPurgeAllowed": + result = ZEROHOURAUTOPURGEALLOWED_SUBMISSIONRESULTDETAIL + case "zeroHourAutoPurgeBlocked": + result = ZEROHOURAUTOPURGEBLOCKED_SUBMISSIONRESULTDETAIL + case "zeroHourAutoPurgeQuarantineReleased": + result = ZEROHOURAUTOPURGEQUARANTINERELEASED_SUBMISSIONRESULTDETAIL + case "onPremisesSkip": + result = ONPREMISESSKIP_SUBMISSIONRESULTDETAIL + case "allowedByTenantAllowBlockList": + result = ALLOWEDBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "blockedByTenantAllowBlockList": + result = BLOCKEDBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "allowedUrlByTenantAllowBlockList": + result = ALLOWEDURLBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "allowedFileByTenantAllowBlockList": + result = ALLOWEDFILEBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "allowedSenderByTenantAllowBlockList": + result = ALLOWEDSENDERBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "allowedRecipientByTenantAllowBlockList": + result = ALLOWEDRECIPIENTBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "blockedUrlByTenantAllowBlockList": + result = BLOCKEDURLBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "blockedFileByTenantAllowBlockList": + result = BLOCKEDFILEBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "blockedSenderByTenantAllowBlockList": + result = BLOCKEDSENDERBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "blockedRecipientByTenantAllowBlockList": + result = BLOCKEDRECIPIENTBYTENANTALLOWBLOCKLIST_SUBMISSIONRESULTDETAIL + case "allowedByConnection": + result = ALLOWEDBYCONNECTION_SUBMISSIONRESULTDETAIL + case "blockedByConnection": + result = BLOCKEDBYCONNECTION_SUBMISSIONRESULTDETAIL + case "allowedByExchangeTransportRule": + result = ALLOWEDBYEXCHANGETRANSPORTRULE_SUBMISSIONRESULTDETAIL + case "blockedByExchangeTransportRule": + result = BLOCKEDBYEXCHANGETRANSPORTRULE_SUBMISSIONRESULTDETAIL + case "quarantineReleased": + result = QUARANTINERELEASED_SUBMISSIONRESULTDETAIL + case "quarantineReleasedThenBlocked": + result = QUARANTINERELEASEDTHENBLOCKED_SUBMISSIONRESULTDETAIL + case "junkMailRuleDisabled": + result = JUNKMAILRULEDISABLED_SUBMISSIONRESULTDETAIL + case "allowedByUserSetting": + result = ALLOWEDBYUSERSETTING_SUBMISSIONRESULTDETAIL + case "blockedByUserSetting": + result = BLOCKEDBYUSERSETTING_SUBMISSIONRESULTDETAIL + case "allowedByTenant": + result = ALLOWEDBYTENANT_SUBMISSIONRESULTDETAIL + case "blockedByTenant": + result = BLOCKEDBYTENANT_SUBMISSIONRESULTDETAIL + case "invalidFalsePositive": + result = INVALIDFALSEPOSITIVE_SUBMISSIONRESULTDETAIL + case "invalidFalseNegative": + result = INVALIDFALSENEGATIVE_SUBMISSIONRESULTDETAIL + case "spoofBlocked": + result = SPOOFBLOCKED_SUBMISSIONRESULTDETAIL + case "goodReclassifiedAsBad": + result = GOODRECLASSIFIEDASBAD_SUBMISSIONRESULTDETAIL + case "goodReclassifiedAsBulk": + result = GOODRECLASSIFIEDASBULK_SUBMISSIONRESULTDETAIL + case "goodReclassifiedAsGood": + result = GOODRECLASSIFIEDASGOOD_SUBMISSIONRESULTDETAIL + case "goodReclassifiedAsCannotMakeDecision": + result = GOODRECLASSIFIEDASCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + case "badReclassifiedAsGood": + result = BADRECLASSIFIEDASGOOD_SUBMISSIONRESULTDETAIL + case "badReclassifiedAsBulk": + result = BADRECLASSIFIEDASBULK_SUBMISSIONRESULTDETAIL + case "badReclassifiedAsBad": + result = BADRECLASSIFIEDASBAD_SUBMISSIONRESULTDETAIL + case "badReclassifiedAsCannotMakeDecision": + result = BADRECLASSIFIEDASCANNOTMAKEDECISION_SUBMISSIONRESULTDETAIL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONRESULTDETAIL + default: + return 0, errors.New("Unknown SubmissionResultDetail value: " + v) + } + return &result, nil +} +func SerializeSubmissionResultDetail(values []SubmissionResultDetail) []string { + 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/security/submission_resultable.go b/src/internal/connector/graph/betasdk/models/security/submission_resultable.go new file mode 100644 index 000000000..3babe7426 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_resultable.go @@ -0,0 +1,23 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SubmissionResultable +type SubmissionResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategory()(*SubmissionResultCategory) + GetDetail()(*SubmissionResultDetail) + GetDetectedFiles()([]SubmissionDetectedFileable) + GetDetectedUrls()([]string) + GetOdataType()(*string) + GetUserMailboxSetting()(*UserMailboxSetting) + SetCategory(value *SubmissionResultCategory)() + SetDetail(value *SubmissionResultDetail)() + SetDetectedFiles(value []SubmissionDetectedFileable)() + SetDetectedUrls(value []string)() + SetOdataType(value *string)() + SetUserMailboxSetting(value *UserMailboxSetting)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_source.go b/src/internal/connector/graph/betasdk/models/security/submission_source.go new file mode 100644 index 000000000..b5dafe701 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_source.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SubmissionSource int + +const ( + USER_SUBMISSIONSOURCE SubmissionSource = iota + ADMINISTRATOR_SUBMISSIONSOURCE + UNKNOWNFUTUREVALUE_SUBMISSIONSOURCE +) + +func (i SubmissionSource) String() string { + return []string{"user", "administrator", "unknownFutureValue"}[i] +} +func ParseSubmissionSource(v string) (interface{}, error) { + result := USER_SUBMISSIONSOURCE + switch v { + case "user": + result = USER_SUBMISSIONSOURCE + case "administrator": + result = ADMINISTRATOR_SUBMISSIONSOURCE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SUBMISSIONSOURCE + default: + return 0, errors.New("Unknown SubmissionSource value: " + v) + } + return &result, nil +} +func SerializeSubmissionSource(values []SubmissionSource) []string { + 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/security/submission_user_identity.go b/src/internal/connector/graph/betasdk/models/security/submission_user_identity.go new file mode 100644 index 000000000..deac93967 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_user_identity.go @@ -0,0 +1,63 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SubmissionUserIdentity +type SubmissionUserIdentity struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Identity + // The email of user who is making the submission when logged in (delegated token case). + email *string +} +// NewSubmissionUserIdentity instantiates a new SubmissionUserIdentity and sets the default values. +func NewSubmissionUserIdentity()(*SubmissionUserIdentity) { + m := &SubmissionUserIdentity{ + Identity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewIdentity(), + } + odataTypeValue := "#microsoft.graph.security.submissionUserIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSubmissionUserIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSubmissionUserIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSubmissionUserIdentity(), nil +} +// GetEmail gets the email property value. The email of user who is making the submission when logged in (delegated token case). +func (m *SubmissionUserIdentity) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SubmissionUserIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SubmissionUserIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. The email of user who is making the submission when logged in (delegated token case). +func (m *SubmissionUserIdentity) SetEmail(value *string)() { + m.email = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/submission_user_identityable.go b/src/internal/connector/graph/betasdk/models/security/submission_user_identityable.go new file mode 100644 index 000000000..aa1121f3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/submission_user_identityable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// SubmissionUserIdentityable +type SubmissionUserIdentityable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + SetEmail(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/tag.go b/src/internal/connector/graph/betasdk/models/security/tag.go new file mode 100644 index 000000000..d44c26fb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tag.go @@ -0,0 +1,158 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tag provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Tag struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The createdBy property + createdBy ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable + // The description property + description *string + // The displayName property + displayName *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewTag instantiates a new tag and sets the default values. +func NewTag()(*Tag) { + m := &Tag{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTagFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTagFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.ediscoveryReviewTag": + return NewEdiscoveryReviewTag(), nil + } + } + } + } + return NewTag(), nil +} +// GetCreatedBy gets the createdBy property value. The createdBy property +func (m *Tag) GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) { + return m.createdBy +} +// GetDescription gets the description property value. The description property +func (m *Tag) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *Tag) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Tag) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Tag) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// Serialize serializes information the current object +func (m *Tag) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + return nil +} +// SetCreatedBy sets the createdBy property value. The createdBy property +func (m *Tag) SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() { + m.createdBy = value +} +// SetDescription sets the description property value. The description property +func (m *Tag) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *Tag) SetDisplayName(value *string)() { + m.displayName = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *Tag) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/tagable.go b/src/internal/connector/graph/betasdk/models/security/tagable.go new file mode 100644 index 000000000..342fdcad4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tagable.go @@ -0,0 +1,21 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// Tagable +type Tagable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedBy()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable) + GetDescription()(*string) + GetDisplayName()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetCreatedBy(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.IdentitySetable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_action.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_action.go new file mode 100644 index 000000000..6f9b54672 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_action.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantAllowBlockListAction int + +const ( + ALLOW_TENANTALLOWBLOCKLISTACTION TenantAllowBlockListAction = iota + BLOCK_TENANTALLOWBLOCKLISTACTION + UNKNOWNFUTUREVALUE_TENANTALLOWBLOCKLISTACTION +) + +func (i TenantAllowBlockListAction) String() string { + return []string{"allow", "block", "unknownFutureValue"}[i] +} +func ParseTenantAllowBlockListAction(v string) (interface{}, error) { + result := ALLOW_TENANTALLOWBLOCKLISTACTION + switch v { + case "allow": + result = ALLOW_TENANTALLOWBLOCKLISTACTION + case "block": + result = BLOCK_TENANTALLOWBLOCKLISTACTION + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TENANTALLOWBLOCKLISTACTION + default: + return 0, errors.New("Unknown TenantAllowBlockListAction value: " + v) + } + return &result, nil +} +func SerializeTenantAllowBlockListAction(values []TenantAllowBlockListAction) []string { + 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/security/tenant_allow_block_list_entry_result.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result.go new file mode 100644 index 000000000..3fc103e7f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result.go @@ -0,0 +1,204 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantAllowBlockListEntryResult +type TenantAllowBlockListEntryResult 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 entry type of tenant allow block list. The possible values are: url, fileHash, sender, recipient and unkownFutureValue. + entryType *TenantAllowBlockListEntryType + // Specifies when will this entry expire in date time. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the identity of the entry generated by the tenant allow block list system. + identity *string + // The OdataType property + odataType *string + // Specifies whether the tenant allow block list entry creation operation was successful. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. + status *LongRunningOperationStatus + // Specifies the value of the created tenant allow block list entry. + value *string +} +// NewTenantAllowBlockListEntryResult instantiates a new tenantAllowBlockListEntryResult and sets the default values. +func NewTenantAllowBlockListEntryResult()(*TenantAllowBlockListEntryResult) { + m := &TenantAllowBlockListEntryResult{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantAllowBlockListEntryResultFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantAllowBlockListEntryResultFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantAllowBlockListEntryResult(), 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 *TenantAllowBlockListEntryResult) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEntryType gets the entryType property value. The entry type of tenant allow block list. The possible values are: url, fileHash, sender, recipient and unkownFutureValue. +func (m *TenantAllowBlockListEntryResult) GetEntryType()(*TenantAllowBlockListEntryType) { + return m.entryType +} +// GetExpirationDateTime gets the expirationDateTime property value. Specifies when will this entry expire in date time. +func (m *TenantAllowBlockListEntryResult) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantAllowBlockListEntryResult) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["entryType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTenantAllowBlockListEntryType) + if err != nil { + return err + } + if val != nil { + m.SetEntryType(val.(*TenantAllowBlockListEntryType)) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["identity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdentity(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLongRunningOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*LongRunningOperationStatus)) + } + 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 +} +// GetIdentity gets the identity property value. Specifies the identity of the entry generated by the tenant allow block list system. +func (m *TenantAllowBlockListEntryResult) GetIdentity()(*string) { + return m.identity +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantAllowBlockListEntryResult) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Specifies whether the tenant allow block list entry creation operation was successful. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. +func (m *TenantAllowBlockListEntryResult) GetStatus()(*LongRunningOperationStatus) { + return m.status +} +// GetValue gets the value property value. Specifies the value of the created tenant allow block list entry. +func (m *TenantAllowBlockListEntryResult) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantAllowBlockListEntryResult) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetEntryType() != nil { + cast := (*m.GetEntryType()).String() + err := writer.WriteStringValue("entryType", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("identity", m.GetIdentity()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + 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 *TenantAllowBlockListEntryResult) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEntryType sets the entryType property value. The entry type of tenant allow block list. The possible values are: url, fileHash, sender, recipient and unkownFutureValue. +func (m *TenantAllowBlockListEntryResult) SetEntryType(value *TenantAllowBlockListEntryType)() { + m.entryType = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Specifies when will this entry expire in date time. +func (m *TenantAllowBlockListEntryResult) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetIdentity sets the identity property value. Specifies the identity of the entry generated by the tenant allow block list system. +func (m *TenantAllowBlockListEntryResult) SetIdentity(value *string)() { + m.identity = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantAllowBlockListEntryResult) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Specifies whether the tenant allow block list entry creation operation was successful. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. +func (m *TenantAllowBlockListEntryResult) SetStatus(value *LongRunningOperationStatus)() { + m.status = value +} +// SetValue sets the value property value. Specifies the value of the created tenant allow block list entry. +func (m *TenantAllowBlockListEntryResult) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_response.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_response.go new file mode 100644 index 000000000..a2e0569cd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantAllowBlockListEntryResultCollectionResponse +type TenantAllowBlockListEntryResultCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []TenantAllowBlockListEntryResultable +} +// NewTenantAllowBlockListEntryResultCollectionResponse instantiates a new TenantAllowBlockListEntryResultCollectionResponse and sets the default values. +func NewTenantAllowBlockListEntryResultCollectionResponse()(*TenantAllowBlockListEntryResultCollectionResponse) { + m := &TenantAllowBlockListEntryResultCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateTenantAllowBlockListEntryResultCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantAllowBlockListEntryResultCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantAllowBlockListEntryResultCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantAllowBlockListEntryResultCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantAllowBlockListEntryResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantAllowBlockListEntryResultable, len(val)) + for i, v := range val { + res[i] = v.(TenantAllowBlockListEntryResultable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *TenantAllowBlockListEntryResultCollectionResponse) GetValue()([]TenantAllowBlockListEntryResultable) { + return m.value +} +// Serialize serializes information the current object +func (m *TenantAllowBlockListEntryResultCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *TenantAllowBlockListEntryResultCollectionResponse) SetValue(value []TenantAllowBlockListEntryResultable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_responseable.go new file mode 100644 index 000000000..10890cc51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_result_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TenantAllowBlockListEntryResultCollectionResponseable +type TenantAllowBlockListEntryResultCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]TenantAllowBlockListEntryResultable) + SetValue(value []TenantAllowBlockListEntryResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_resultable.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_resultable.go new file mode 100644 index 000000000..ff055c750 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_resultable.go @@ -0,0 +1,24 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantAllowBlockListEntryResultable +type TenantAllowBlockListEntryResultable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEntryType()(*TenantAllowBlockListEntryType) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetIdentity()(*string) + GetOdataType()(*string) + GetStatus()(*LongRunningOperationStatus) + GetValue()(*string) + SetEntryType(value *TenantAllowBlockListEntryType)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetIdentity(value *string)() + SetOdataType(value *string)() + SetStatus(value *LongRunningOperationStatus)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_type.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_type.go new file mode 100644 index 000000000..f4d67586c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_block_list_entry_type.go @@ -0,0 +1,43 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type TenantAllowBlockListEntryType int + +const ( + URL_TENANTALLOWBLOCKLISTENTRYTYPE TenantAllowBlockListEntryType = iota + FILEHASH_TENANTALLOWBLOCKLISTENTRYTYPE + SENDER_TENANTALLOWBLOCKLISTENTRYTYPE + RECIPIENT_TENANTALLOWBLOCKLISTENTRYTYPE + UNKNOWNFUTUREVALUE_TENANTALLOWBLOCKLISTENTRYTYPE +) + +func (i TenantAllowBlockListEntryType) String() string { + return []string{"url", "fileHash", "sender", "recipient", "unknownFutureValue"}[i] +} +func ParseTenantAllowBlockListEntryType(v string) (interface{}, error) { + result := URL_TENANTALLOWBLOCKLISTENTRYTYPE + switch v { + case "url": + result = URL_TENANTALLOWBLOCKLISTENTRYTYPE + case "fileHash": + result = FILEHASH_TENANTALLOWBLOCKLISTENTRYTYPE + case "sender": + result = SENDER_TENANTALLOWBLOCKLISTENTRYTYPE + case "recipient": + result = RECIPIENT_TENANTALLOWBLOCKLISTENTRYTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_TENANTALLOWBLOCKLISTENTRYTYPE + default: + return 0, errors.New("Unknown TenantAllowBlockListEntryType value: " + v) + } + return &result, nil +} +func SerializeTenantAllowBlockListEntryType(values []TenantAllowBlockListEntryType) []string { + 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/security/tenant_allow_or_block_list_action.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_or_block_list_action.go new file mode 100644 index 000000000..d67f66987 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_or_block_list_action.go @@ -0,0 +1,185 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantAllowOrBlockListAction +type TenantAllowOrBlockListAction struct { + // Specifies whether the tenant allow block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. + action *TenantAllowBlockListAction + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies when the tenant allow-block-list expires in date time. + expirationDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the note added to the tenant allow block list entry in the format of string. + note *string + // The OdataType property + odataType *string + // Contains the result of the submission that lead to the tenant allow-block-list entry creation. + results []TenantAllowBlockListEntryResultable +} +// NewTenantAllowOrBlockListAction instantiates a new tenantAllowOrBlockListAction and sets the default values. +func NewTenantAllowOrBlockListAction()(*TenantAllowOrBlockListAction) { + m := &TenantAllowOrBlockListAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTenantAllowOrBlockListActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTenantAllowOrBlockListActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTenantAllowOrBlockListAction(), nil +} +// GetAction gets the action property value. Specifies whether the tenant allow block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. +func (m *TenantAllowOrBlockListAction) GetAction()(*TenantAllowBlockListAction) { + return m.action +} +// 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 *TenantAllowOrBlockListAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetExpirationDateTime gets the expirationDateTime property value. Specifies when the tenant allow-block-list expires in date time. +func (m *TenantAllowOrBlockListAction) GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expirationDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TenantAllowOrBlockListAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["action"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTenantAllowBlockListAction) + if err != nil { + return err + } + if val != nil { + m.SetAction(val.(*TenantAllowBlockListAction)) + } + return nil + } + res["expirationDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpirationDateTime(val) + } + return nil + } + res["note"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNote(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["results"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTenantAllowBlockListEntryResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TenantAllowBlockListEntryResultable, len(val)) + for i, v := range val { + res[i] = v.(TenantAllowBlockListEntryResultable) + } + m.SetResults(res) + } + return nil + } + return res +} +// GetNote gets the note property value. Specifies the note added to the tenant allow block list entry in the format of string. +func (m *TenantAllowOrBlockListAction) GetNote()(*string) { + return m.note +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TenantAllowOrBlockListAction) GetOdataType()(*string) { + return m.odataType +} +// GetResults gets the results property value. Contains the result of the submission that lead to the tenant allow-block-list entry creation. +func (m *TenantAllowOrBlockListAction) GetResults()([]TenantAllowBlockListEntryResultable) { + return m.results +} +// Serialize serializes information the current object +func (m *TenantAllowOrBlockListAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAction() != nil { + cast := (*m.GetAction()).String() + err := writer.WriteStringValue("action", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("expirationDateTime", m.GetExpirationDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("note", m.GetNote()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetResults() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetResults())) + for i, v := range m.GetResults() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("results", cast) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAction sets the action property value. Specifies whether the tenant allow block list is an allow or block. The possible values are: allow, block, and unkownFutureValue. +func (m *TenantAllowOrBlockListAction) SetAction(value *TenantAllowBlockListAction)() { + m.action = value +} +// 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 *TenantAllowOrBlockListAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetExpirationDateTime sets the expirationDateTime property value. Specifies when the tenant allow-block-list expires in date time. +func (m *TenantAllowOrBlockListAction) SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expirationDateTime = value +} +// SetNote sets the note property value. Specifies the note added to the tenant allow block list entry in the format of string. +func (m *TenantAllowOrBlockListAction) SetNote(value *string)() { + m.note = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TenantAllowOrBlockListAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetResults sets the results property value. Contains the result of the submission that lead to the tenant allow-block-list entry creation. +func (m *TenantAllowOrBlockListAction) SetResults(value []TenantAllowBlockListEntryResultable)() { + m.results = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/tenant_allow_or_block_list_actionable.go b/src/internal/connector/graph/betasdk/models/security/tenant_allow_or_block_list_actionable.go new file mode 100644 index 000000000..2eaf5568d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/tenant_allow_or_block_list_actionable.go @@ -0,0 +1,22 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TenantAllowOrBlockListActionable +type TenantAllowOrBlockListActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAction()(*TenantAllowBlockListAction) + GetExpirationDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetNote()(*string) + GetOdataType()(*string) + GetResults()([]TenantAllowBlockListEntryResultable) + SetAction(value *TenantAllowBlockListAction)() + SetExpirationDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetNote(value *string)() + SetOdataType(value *string)() + SetResults(value []TenantAllowBlockListEntryResultable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/threat_submission.go b/src/internal/connector/graph/betasdk/models/security/threat_submission.go new file mode 100644 index 000000000..f4e1c13e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/threat_submission.go @@ -0,0 +1,331 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ThreatSubmission provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ThreatSubmission struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // Specifies the admin review property which constitutes of who reviewed the user submission, when and what was it identified as. + adminReview SubmissionAdminReviewable + // The category property + category *SubmissionCategory + // Specifies the source of the submission. The possible values are: microsoft, other and unkownFutureValue. + clientSource *SubmissionClientSource + // Specifies the type of content being submitted. The possible values are: email, url, file, app and unkownFutureValue. + contentType *SubmissionContentType + // Specifies who submitted the email as a threat. Supports $filter = createdBy/email eq 'value'. + createdBy SubmissionUserIdentityable + // Specifies when the threat submission was created. Supports $filter = createdDateTime ge 2022-01-01T00:00:00Z and createdDateTime lt 2022-01-02T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Specifies the result of the analysis performed by Microsoft. + result SubmissionResultable + // Specifies the role of the submitter. Supports $filter = source eq 'value'. The possible values are: administrator, user and unkownFutureValue. + source *SubmissionSource + // Indicates whether the threat submission has been analyzed by Microsoft. Supports $filter = status eq 'value'. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. + status *LongRunningOperationStatus + // Indicates the tenant id of the submitter. Not required when created using a POST operation. It is extracted from the token of the post API call. + tenantId *string +} +// NewThreatSubmission instantiates a new threatSubmission and sets the default values. +func NewThreatSubmission()(*ThreatSubmission) { + m := &ThreatSubmission{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.security.emailContentThreatSubmission": + return NewEmailContentThreatSubmission(), nil + case "#microsoft.graph.security.emailThreatSubmission": + return NewEmailThreatSubmission(), nil + case "#microsoft.graph.security.emailUrlThreatSubmission": + return NewEmailUrlThreatSubmission(), nil + case "#microsoft.graph.security.fileContentThreatSubmission": + return NewFileContentThreatSubmission(), nil + case "#microsoft.graph.security.fileThreatSubmission": + return NewFileThreatSubmission(), nil + case "#microsoft.graph.security.fileUrlThreatSubmission": + return NewFileUrlThreatSubmission(), nil + case "#microsoft.graph.security.urlThreatSubmission": + return NewUrlThreatSubmission(), nil + } + } + } + } + return NewThreatSubmission(), nil +} +// GetAdminReview gets the adminReview property value. Specifies the admin review property which constitutes of who reviewed the user submission, when and what was it identified as. +func (m *ThreatSubmission) GetAdminReview()(SubmissionAdminReviewable) { + return m.adminReview +} +// GetCategory gets the category property value. The category property +func (m *ThreatSubmission) GetCategory()(*SubmissionCategory) { + return m.category +} +// GetClientSource gets the clientSource property value. Specifies the source of the submission. The possible values are: microsoft, other and unkownFutureValue. +func (m *ThreatSubmission) GetClientSource()(*SubmissionClientSource) { + return m.clientSource +} +// GetContentType gets the contentType property value. Specifies the type of content being submitted. The possible values are: email, url, file, app and unkownFutureValue. +func (m *ThreatSubmission) GetContentType()(*SubmissionContentType) { + return m.contentType +} +// GetCreatedBy gets the createdBy property value. Specifies who submitted the email as a threat. Supports $filter = createdBy/email eq 'value'. +func (m *ThreatSubmission) GetCreatedBy()(SubmissionUserIdentityable) { + return m.createdBy +} +// GetCreatedDateTime gets the createdDateTime property value. Specifies when the threat submission was created. Supports $filter = createdDateTime ge 2022-01-01T00:00:00Z and createdDateTime lt 2022-01-02T00:00:00Z. +func (m *ThreatSubmission) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["adminReview"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubmissionAdminReviewFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAdminReview(val.(SubmissionAdminReviewable)) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*SubmissionCategory)) + } + return nil + } + res["clientSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionClientSource) + if err != nil { + return err + } + if val != nil { + m.SetClientSource(val.(*SubmissionClientSource)) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionContentType) + if err != nil { + return err + } + if val != nil { + m.SetContentType(val.(*SubmissionContentType)) + } + return nil + } + res["createdBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubmissionUserIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCreatedBy(val.(SubmissionUserIdentityable)) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["result"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSubmissionResultFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResult(val.(SubmissionResultable)) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSubmissionSource) + if err != nil { + return err + } + if val != nil { + m.SetSource(val.(*SubmissionSource)) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseLongRunningOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*LongRunningOperationStatus)) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetResult gets the result property value. Specifies the result of the analysis performed by Microsoft. +func (m *ThreatSubmission) GetResult()(SubmissionResultable) { + return m.result +} +// GetSource gets the source property value. Specifies the role of the submitter. Supports $filter = source eq 'value'. The possible values are: administrator, user and unkownFutureValue. +func (m *ThreatSubmission) GetSource()(*SubmissionSource) { + return m.source +} +// GetStatus gets the status property value. Indicates whether the threat submission has been analyzed by Microsoft. Supports $filter = status eq 'value'. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. +func (m *ThreatSubmission) GetStatus()(*LongRunningOperationStatus) { + return m.status +} +// GetTenantId gets the tenantId property value. Indicates the tenant id of the submitter. Not required when created using a POST operation. It is extracted from the token of the post API call. +func (m *ThreatSubmission) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *ThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("adminReview", m.GetAdminReview()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + if m.GetClientSource() != nil { + cast := (*m.GetClientSource()).String() + err = writer.WriteStringValue("clientSource", &cast) + if err != nil { + return err + } + } + if m.GetContentType() != nil { + cast := (*m.GetContentType()).String() + err = writer.WriteStringValue("contentType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("createdBy", m.GetCreatedBy()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("result", m.GetResult()) + if err != nil { + return err + } + } + if m.GetSource() != nil { + cast := (*m.GetSource()).String() + err = writer.WriteStringValue("source", &cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + return nil +} +// SetAdminReview sets the adminReview property value. Specifies the admin review property which constitutes of who reviewed the user submission, when and what was it identified as. +func (m *ThreatSubmission) SetAdminReview(value SubmissionAdminReviewable)() { + m.adminReview = value +} +// SetCategory sets the category property value. The category property +func (m *ThreatSubmission) SetCategory(value *SubmissionCategory)() { + m.category = value +} +// SetClientSource sets the clientSource property value. Specifies the source of the submission. The possible values are: microsoft, other and unkownFutureValue. +func (m *ThreatSubmission) SetClientSource(value *SubmissionClientSource)() { + m.clientSource = value +} +// SetContentType sets the contentType property value. Specifies the type of content being submitted. The possible values are: email, url, file, app and unkownFutureValue. +func (m *ThreatSubmission) SetContentType(value *SubmissionContentType)() { + m.contentType = value +} +// SetCreatedBy sets the createdBy property value. Specifies who submitted the email as a threat. Supports $filter = createdBy/email eq 'value'. +func (m *ThreatSubmission) SetCreatedBy(value SubmissionUserIdentityable)() { + m.createdBy = value +} +// SetCreatedDateTime sets the createdDateTime property value. Specifies when the threat submission was created. Supports $filter = createdDateTime ge 2022-01-01T00:00:00Z and createdDateTime lt 2022-01-02T00:00:00Z. +func (m *ThreatSubmission) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetResult sets the result property value. Specifies the result of the analysis performed by Microsoft. +func (m *ThreatSubmission) SetResult(value SubmissionResultable)() { + m.result = value +} +// SetSource sets the source property value. Specifies the role of the submitter. Supports $filter = source eq 'value'. The possible values are: administrator, user and unkownFutureValue. +func (m *ThreatSubmission) SetSource(value *SubmissionSource)() { + m.source = value +} +// SetStatus sets the status property value. Indicates whether the threat submission has been analyzed by Microsoft. Supports $filter = status eq 'value'. The possible values are: notStarted, running, succeeded, failed, skipped and unkownFutureValue. +func (m *ThreatSubmission) SetStatus(value *LongRunningOperationStatus)() { + m.status = value +} +// SetTenantId sets the tenantId property value. Indicates the tenant id of the submitter. Not required when created using a POST operation. It is extracted from the token of the post API call. +func (m *ThreatSubmission) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/threat_submission_root.go b/src/internal/connector/graph/betasdk/models/security/threat_submission_root.go new file mode 100644 index 000000000..9bf2ec148 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/threat_submission_root.go @@ -0,0 +1,171 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ThreatSubmissionRoot +type ThreatSubmissionRoot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The emailThreats property + emailThreats []EmailThreatSubmissionable + // The emailThreatSubmissionPolicies property + emailThreatSubmissionPolicies []EmailThreatSubmissionPolicyable + // The fileThreats property + fileThreats []FileThreatSubmissionable + // The urlThreats property + urlThreats []UrlThreatSubmissionable +} +// NewThreatSubmissionRoot instantiates a new threatSubmissionRoot and sets the default values. +func NewThreatSubmissionRoot()(*ThreatSubmissionRoot) { + m := &ThreatSubmissionRoot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateThreatSubmissionRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateThreatSubmissionRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewThreatSubmissionRoot(), nil +} +// GetEmailThreats gets the emailThreats property value. The emailThreats property +func (m *ThreatSubmissionRoot) GetEmailThreats()([]EmailThreatSubmissionable) { + return m.emailThreats +} +// GetEmailThreatSubmissionPolicies gets the emailThreatSubmissionPolicies property value. The emailThreatSubmissionPolicies property +func (m *ThreatSubmissionRoot) GetEmailThreatSubmissionPolicies()([]EmailThreatSubmissionPolicyable) { + return m.emailThreatSubmissionPolicies +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ThreatSubmissionRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["emailThreats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(EmailThreatSubmissionable) + } + m.SetEmailThreats(res) + } + return nil + } + res["emailThreatSubmissionPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEmailThreatSubmissionPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]EmailThreatSubmissionPolicyable, len(val)) + for i, v := range val { + res[i] = v.(EmailThreatSubmissionPolicyable) + } + m.SetEmailThreatSubmissionPolicies(res) + } + return nil + } + res["fileThreats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFileThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FileThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(FileThreatSubmissionable) + } + m.SetFileThreats(res) + } + return nil + } + res["urlThreats"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUrlThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UrlThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(UrlThreatSubmissionable) + } + m.SetUrlThreats(res) + } + return nil + } + return res +} +// GetFileThreats gets the fileThreats property value. The fileThreats property +func (m *ThreatSubmissionRoot) GetFileThreats()([]FileThreatSubmissionable) { + return m.fileThreats +} +// GetUrlThreats gets the urlThreats property value. The urlThreats property +func (m *ThreatSubmissionRoot) GetUrlThreats()([]UrlThreatSubmissionable) { + return m.urlThreats +} +// Serialize serializes information the current object +func (m *ThreatSubmissionRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetEmailThreats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailThreats())) + for i, v := range m.GetEmailThreats() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailThreats", cast) + if err != nil { + return err + } + } + if m.GetEmailThreatSubmissionPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEmailThreatSubmissionPolicies())) + for i, v := range m.GetEmailThreatSubmissionPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("emailThreatSubmissionPolicies", cast) + if err != nil { + return err + } + } + if m.GetFileThreats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFileThreats())) + for i, v := range m.GetFileThreats() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("fileThreats", cast) + if err != nil { + return err + } + } + if m.GetUrlThreats() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetUrlThreats())) + for i, v := range m.GetUrlThreats() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("urlThreats", cast) + if err != nil { + return err + } + } + return nil +} +// SetEmailThreats sets the emailThreats property value. The emailThreats property +func (m *ThreatSubmissionRoot) SetEmailThreats(value []EmailThreatSubmissionable)() { + m.emailThreats = value +} +// SetEmailThreatSubmissionPolicies sets the emailThreatSubmissionPolicies property value. The emailThreatSubmissionPolicies property +func (m *ThreatSubmissionRoot) SetEmailThreatSubmissionPolicies(value []EmailThreatSubmissionPolicyable)() { + m.emailThreatSubmissionPolicies = value +} +// SetFileThreats sets the fileThreats property value. The fileThreats property +func (m *ThreatSubmissionRoot) SetFileThreats(value []FileThreatSubmissionable)() { + m.fileThreats = value +} +// SetUrlThreats sets the urlThreats property value. The urlThreats property +func (m *ThreatSubmissionRoot) SetUrlThreats(value []UrlThreatSubmissionable)() { + m.urlThreats = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/threat_submission_rootable.go b/src/internal/connector/graph/betasdk/models/security/threat_submission_rootable.go new file mode 100644 index 000000000..d5ad34c29 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/threat_submission_rootable.go @@ -0,0 +1,20 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ThreatSubmissionRootable +type ThreatSubmissionRootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmailThreats()([]EmailThreatSubmissionable) + GetEmailThreatSubmissionPolicies()([]EmailThreatSubmissionPolicyable) + GetFileThreats()([]FileThreatSubmissionable) + GetUrlThreats()([]UrlThreatSubmissionable) + SetEmailThreats(value []EmailThreatSubmissionable)() + SetEmailThreatSubmissionPolicies(value []EmailThreatSubmissionPolicyable)() + SetFileThreats(value []FileThreatSubmissionable)() + SetUrlThreats(value []UrlThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/threat_submissionable.go new file mode 100644 index 000000000..6698c539b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/threat_submissionable.go @@ -0,0 +1,33 @@ +package security + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// ThreatSubmissionable +type ThreatSubmissionable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAdminReview()(SubmissionAdminReviewable) + GetCategory()(*SubmissionCategory) + GetClientSource()(*SubmissionClientSource) + GetContentType()(*SubmissionContentType) + GetCreatedBy()(SubmissionUserIdentityable) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetResult()(SubmissionResultable) + GetSource()(*SubmissionSource) + GetStatus()(*LongRunningOperationStatus) + GetTenantId()(*string) + SetAdminReview(value SubmissionAdminReviewable)() + SetCategory(value *SubmissionCategory)() + SetClientSource(value *SubmissionClientSource)() + SetContentType(value *SubmissionContentType)() + SetCreatedBy(value SubmissionUserIdentityable)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetResult(value SubmissionResultable)() + SetSource(value *SubmissionSource)() + SetStatus(value *LongRunningOperationStatus)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/topic_modeling_settings.go b/src/internal/connector/graph/betasdk/models/security/topic_modeling_settings.go new file mode 100644 index 000000000..45afb504f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/topic_modeling_settings.go @@ -0,0 +1,175 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TopicModelingSettings +type TopicModelingSettings 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 whether the themes model should dynamically optimize the number of generated topics. To learn more, see Adjust maximum number of themes dynamically. + dynamicallyAdjustTopicCount *bool + // Indicates whether the themes model should exclude numbers while parsing document texts. To learn more, see Include numbers in themes. + ignoreNumbers *bool + // Indicates whether themes model is enabled for the case. + isEnabled *bool + // The OdataType property + odataType *string + // The total number of topics that the themes model will generate for a review set. To learn more, see Maximum number of themes. + topicCount *int32 +} +// NewTopicModelingSettings instantiates a new topicModelingSettings and sets the default values. +func NewTopicModelingSettings()(*TopicModelingSettings) { + m := &TopicModelingSettings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateTopicModelingSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTopicModelingSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTopicModelingSettings(), 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 *TopicModelingSettings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDynamicallyAdjustTopicCount gets the dynamicallyAdjustTopicCount property value. Indicates whether the themes model should dynamically optimize the number of generated topics. To learn more, see Adjust maximum number of themes dynamically. +func (m *TopicModelingSettings) GetDynamicallyAdjustTopicCount()(*bool) { + return m.dynamicallyAdjustTopicCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TopicModelingSettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dynamicallyAdjustTopicCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDynamicallyAdjustTopicCount(val) + } + return nil + } + res["ignoreNumbers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIgnoreNumbers(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["topicCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetTopicCount(val) + } + return nil + } + return res +} +// GetIgnoreNumbers gets the ignoreNumbers property value. Indicates whether the themes model should exclude numbers while parsing document texts. To learn more, see Include numbers in themes. +func (m *TopicModelingSettings) GetIgnoreNumbers()(*bool) { + return m.ignoreNumbers +} +// GetIsEnabled gets the isEnabled property value. Indicates whether themes model is enabled for the case. +func (m *TopicModelingSettings) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *TopicModelingSettings) GetOdataType()(*string) { + return m.odataType +} +// GetTopicCount gets the topicCount property value. The total number of topics that the themes model will generate for a review set. To learn more, see Maximum number of themes. +func (m *TopicModelingSettings) GetTopicCount()(*int32) { + return m.topicCount +} +// Serialize serializes information the current object +func (m *TopicModelingSettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("dynamicallyAdjustTopicCount", m.GetDynamicallyAdjustTopicCount()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("ignoreNumbers", m.GetIgnoreNumbers()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("topicCount", m.GetTopicCount()) + 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 *TopicModelingSettings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDynamicallyAdjustTopicCount sets the dynamicallyAdjustTopicCount property value. Indicates whether the themes model should dynamically optimize the number of generated topics. To learn more, see Adjust maximum number of themes dynamically. +func (m *TopicModelingSettings) SetDynamicallyAdjustTopicCount(value *bool)() { + m.dynamicallyAdjustTopicCount = value +} +// SetIgnoreNumbers sets the ignoreNumbers property value. Indicates whether the themes model should exclude numbers while parsing document texts. To learn more, see Include numbers in themes. +func (m *TopicModelingSettings) SetIgnoreNumbers(value *bool)() { + m.ignoreNumbers = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether themes model is enabled for the case. +func (m *TopicModelingSettings) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *TopicModelingSettings) SetOdataType(value *string)() { + m.odataType = value +} +// SetTopicCount sets the topicCount property value. The total number of topics that the themes model will generate for a review set. To learn more, see Maximum number of themes. +func (m *TopicModelingSettings) SetTopicCount(value *int32)() { + m.topicCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/topic_modeling_settingsable.go b/src/internal/connector/graph/betasdk/models/security/topic_modeling_settingsable.go new file mode 100644 index 000000000..3a31c8435 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/topic_modeling_settingsable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// TopicModelingSettingsable +type TopicModelingSettingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDynamicallyAdjustTopicCount()(*bool) + GetIgnoreNumbers()(*bool) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetTopicCount()(*int32) + SetDynamicallyAdjustTopicCount(value *bool)() + SetIgnoreNumbers(value *bool)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetTopicCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/trigger_types_root.go b/src/internal/connector/graph/betasdk/models/security/trigger_types_root.go new file mode 100644 index 000000000..24b049f25 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/trigger_types_root.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggerTypesRoot +type TriggerTypesRoot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The retentionEventTypes property + retentionEventTypes []RetentionEventTypeable +} +// NewTriggerTypesRoot instantiates a new triggerTypesRoot and sets the default values. +func NewTriggerTypesRoot()(*TriggerTypesRoot) { + m := &TriggerTypesRoot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTriggerTypesRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTriggerTypesRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTriggerTypesRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TriggerTypesRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["retentionEventTypes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionEventTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionEventTypeable, len(val)) + for i, v := range val { + res[i] = v.(RetentionEventTypeable) + } + m.SetRetentionEventTypes(res) + } + return nil + } + return res +} +// GetRetentionEventTypes gets the retentionEventTypes property value. The retentionEventTypes property +func (m *TriggerTypesRoot) GetRetentionEventTypes()([]RetentionEventTypeable) { + return m.retentionEventTypes +} +// Serialize serializes information the current object +func (m *TriggerTypesRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetRetentionEventTypes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRetentionEventTypes())) + for i, v := range m.GetRetentionEventTypes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("retentionEventTypes", cast) + if err != nil { + return err + } + } + return nil +} +// SetRetentionEventTypes sets the retentionEventTypes property value. The retentionEventTypes property +func (m *TriggerTypesRoot) SetRetentionEventTypes(value []RetentionEventTypeable)() { + m.retentionEventTypes = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/trigger_types_rootable.go b/src/internal/connector/graph/betasdk/models/security/trigger_types_rootable.go new file mode 100644 index 000000000..b8d4bb316 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/trigger_types_rootable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggerTypesRootable +type TriggerTypesRootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRetentionEventTypes()([]RetentionEventTypeable) + SetRetentionEventTypes(value []RetentionEventTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/triggers_root.go b/src/internal/connector/graph/betasdk/models/security/triggers_root.go new file mode 100644 index 000000000..8e2238508 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/triggers_root.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggersRoot +type TriggersRoot struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entity + // The retentionEvents property + retentionEvents []RetentionEventable +} +// NewTriggersRoot instantiates a new triggersRoot and sets the default values. +func NewTriggersRoot()(*TriggersRoot) { + m := &TriggersRoot{ + Entity: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewEntity(), + } + return m +} +// CreateTriggersRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateTriggersRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewTriggersRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *TriggersRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["retentionEvents"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateRetentionEventFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]RetentionEventable, len(val)) + for i, v := range val { + res[i] = v.(RetentionEventable) + } + m.SetRetentionEvents(res) + } + return nil + } + return res +} +// GetRetentionEvents gets the retentionEvents property value. The retentionEvents property +func (m *TriggersRoot) GetRetentionEvents()([]RetentionEventable) { + return m.retentionEvents +} +// Serialize serializes information the current object +func (m *TriggersRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetRetentionEvents() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRetentionEvents())) + for i, v := range m.GetRetentionEvents() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("retentionEvents", cast) + if err != nil { + return err + } + } + return nil +} +// SetRetentionEvents sets the retentionEvents property value. The retentionEvents property +func (m *TriggersRoot) SetRetentionEvents(value []RetentionEventable)() { + m.retentionEvents = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/triggers_rootable.go b/src/internal/connector/graph/betasdk/models/security/triggers_rootable.go new file mode 100644 index 000000000..55113e1e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/triggers_rootable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// TriggersRootable +type TriggersRootable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetRetentionEvents()([]RetentionEventable) + SetRetentionEvents(value []RetentionEventable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/unified_group_source.go b/src/internal/connector/graph/betasdk/models/security/unified_group_source.go new file mode 100644 index 000000000..61ec60d36 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/unified_group_source.go @@ -0,0 +1,90 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSource +type UnifiedGroupSource struct { + DataSource + // The group property + group ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable + // Specifies which sources are included in this group. Possible values are: mailbox, site. + includedSources *SourceType +} +// NewUnifiedGroupSource instantiates a new UnifiedGroupSource and sets the default values. +func NewUnifiedGroupSource()(*UnifiedGroupSource) { + m := &UnifiedGroupSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.security.unifiedGroupSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUnifiedGroupSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUnifiedGroupSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnifiedGroupSource(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UnifiedGroupSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.CreateGroupFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)) + } + return nil + } + res["includedSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSourceType) + if err != nil { + return err + } + if val != nil { + m.SetIncludedSources(val.(*SourceType)) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group property +func (m *UnifiedGroupSource) GetGroup()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable) { + return m.group +} +// GetIncludedSources gets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UnifiedGroupSource) GetIncludedSources()(*SourceType) { + return m.includedSources +} +// Serialize serializes information the current object +func (m *UnifiedGroupSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + if m.GetIncludedSources() != nil { + cast := (*m.GetIncludedSources()).String() + err = writer.WriteStringValue("includedSources", &cast) + if err != nil { + return err + } + } + return nil +} +// SetGroup sets the group property value. The group property +func (m *UnifiedGroupSource) SetGroup(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)() { + m.group = value +} +// SetIncludedSources sets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UnifiedGroupSource) SetIncludedSources(value *SourceType)() { + m.includedSources = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_response.go b/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_response.go new file mode 100644 index 000000000..179253a26 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceCollectionResponse +type UnifiedGroupSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UnifiedGroupSourceable +} +// NewUnifiedGroupSourceCollectionResponse instantiates a new UnifiedGroupSourceCollectionResponse and sets the default values. +func NewUnifiedGroupSourceCollectionResponse()(*UnifiedGroupSourceCollectionResponse) { + m := &UnifiedGroupSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUnifiedGroupSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUnifiedGroupSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUnifiedGroupSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UnifiedGroupSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUnifiedGroupSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UnifiedGroupSourceable, len(val)) + for i, v := range val { + res[i] = v.(UnifiedGroupSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UnifiedGroupSourceCollectionResponse) GetValue()([]UnifiedGroupSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *UnifiedGroupSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UnifiedGroupSourceCollectionResponse) SetValue(value []UnifiedGroupSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_responseable.go new file mode 100644 index 000000000..3ada1ab2c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/unified_group_source_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceCollectionResponseable +type UnifiedGroupSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UnifiedGroupSourceable) + SetValue(value []UnifiedGroupSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/unified_group_sourceable.go b/src/internal/connector/graph/betasdk/models/security/unified_group_sourceable.go new file mode 100644 index 000000000..327ae328e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/unified_group_sourceable.go @@ -0,0 +1,16 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UnifiedGroupSourceable +type UnifiedGroupSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroup()(ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable) + GetIncludedSources()(*SourceType) + SetGroup(value ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.Groupable)() + SetIncludedSources(value *SourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_evidence.go b/src/internal/connector/graph/betasdk/models/security/url_evidence.go new file mode 100644 index 000000000..adcb1b731 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_evidence.go @@ -0,0 +1,60 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlEvidence +type UrlEvidence struct { + AlertEvidence + // The Unique Resource Locator (URL). + url *string +} +// NewUrlEvidence instantiates a new UrlEvidence and sets the default values. +func NewUrlEvidence()(*UrlEvidence) { + m := &UrlEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateUrlEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUrlEvidence(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["url"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUrl(val) + } + return nil + } + return res +} +// GetUrl gets the url property value. The Unique Resource Locator (URL). +func (m *UrlEvidence) GetUrl()(*string) { + return m.url +} +// Serialize serializes information the current object +func (m *UrlEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("url", m.GetUrl()) + if err != nil { + return err + } + } + return nil +} +// SetUrl sets the url property value. The Unique Resource Locator (URL). +func (m *UrlEvidence) SetUrl(value *string)() { + m.url = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/url_evidenceable.go new file mode 100644 index 000000000..ca7a86240 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_evidenceable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlEvidenceable +type UrlEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUrl()(*string) + SetUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_threat_submission.go b/src/internal/connector/graph/betasdk/models/security/url_threat_submission.go new file mode 100644 index 000000000..dd4712273 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_threat_submission.go @@ -0,0 +1,62 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlThreatSubmission +type UrlThreatSubmission struct { + ThreatSubmission + // Denotes the webUrl that needs to be submitted. + webUrl *string +} +// NewUrlThreatSubmission instantiates a new UrlThreatSubmission and sets the default values. +func NewUrlThreatSubmission()(*UrlThreatSubmission) { + m := &UrlThreatSubmission{ + ThreatSubmission: *NewThreatSubmission(), + } + odataTypeValue := "#microsoft.graph.security.urlThreatSubmission"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUrlThreatSubmissionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlThreatSubmissionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUrlThreatSubmission(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlThreatSubmission) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ThreatSubmission.GetFieldDeserializers() + res["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetWebUrl gets the webUrl property value. Denotes the webUrl that needs to be submitted. +func (m *UrlThreatSubmission) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *UrlThreatSubmission) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ThreatSubmission.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("webUrl", m.GetWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetWebUrl sets the webUrl property value. Denotes the webUrl that needs to be submitted. +func (m *UrlThreatSubmission) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_response.go b/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_response.go new file mode 100644 index 000000000..4bc906e6d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UrlThreatSubmissionCollectionResponse +type UrlThreatSubmissionCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UrlThreatSubmissionable +} +// NewUrlThreatSubmissionCollectionResponse instantiates a new UrlThreatSubmissionCollectionResponse and sets the default values. +func NewUrlThreatSubmissionCollectionResponse()(*UrlThreatSubmissionCollectionResponse) { + m := &UrlThreatSubmissionCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUrlThreatSubmissionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUrlThreatSubmissionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUrlThreatSubmissionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UrlThreatSubmissionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUrlThreatSubmissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UrlThreatSubmissionable, len(val)) + for i, v := range val { + res[i] = v.(UrlThreatSubmissionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UrlThreatSubmissionCollectionResponse) GetValue()([]UrlThreatSubmissionable) { + return m.value +} +// Serialize serializes information the current object +func (m *UrlThreatSubmissionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UrlThreatSubmissionCollectionResponse) SetValue(value []UrlThreatSubmissionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_responseable.go new file mode 100644 index 000000000..f1eeac044 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_threat_submission_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UrlThreatSubmissionCollectionResponseable +type UrlThreatSubmissionCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UrlThreatSubmissionable) + SetValue(value []UrlThreatSubmissionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/url_threat_submissionable.go b/src/internal/connector/graph/betasdk/models/security/url_threat_submissionable.go new file mode 100644 index 000000000..72d07382c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/url_threat_submissionable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UrlThreatSubmissionable +type UrlThreatSubmissionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ThreatSubmissionable + GetWebUrl()(*string) + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_account.go b/src/internal/connector/graph/betasdk/models/security/user_account.go new file mode 100644 index 000000000..79a4d7fe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_account.go @@ -0,0 +1,201 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserAccount +type UserAccount struct { + // The user account's displayed name. + accountName *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 user object identifier in Azure AD. + azureAdUserId *string + // The name of the Active Directory domain of which the user is a member. + domainName *string + // The OdataType property + odataType *string + // The user principal name of the account in Azure AD. + userPrincipalName *string + // The local security identifier of the user account. + userSid *string +} +// NewUserAccount instantiates a new userAccount and sets the default values. +func NewUserAccount()(*UserAccount) { + m := &UserAccount{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateUserAccountFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserAccountFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserAccount(), nil +} +// GetAccountName gets the accountName property value. The user account's displayed name. +func (m *UserAccount) GetAccountName()(*string) { + return m.accountName +} +// 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 *UserAccount) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAzureAdUserId gets the azureAdUserId property value. The user object identifier in Azure AD. +func (m *UserAccount) GetAzureAdUserId()(*string) { + return m.azureAdUserId +} +// GetDomainName gets the domainName property value. The name of the Active Directory domain of which the user is a member. +func (m *UserAccount) GetDomainName()(*string) { + return m.domainName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserAccount) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accountName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountName(val) + } + return nil + } + res["azureAdUserId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureAdUserId(val) + } + return nil + } + res["domainName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDomainName(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["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + res["userSid"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserSid(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *UserAccount) GetOdataType()(*string) { + return m.odataType +} +// GetUserPrincipalName gets the userPrincipalName property value. The user principal name of the account in Azure AD. +func (m *UserAccount) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// GetUserSid gets the userSid property value. The local security identifier of the user account. +func (m *UserAccount) GetUserSid()(*string) { + return m.userSid +} +// Serialize serializes information the current object +func (m *UserAccount) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("accountName", m.GetAccountName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("azureAdUserId", m.GetAzureAdUserId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("domainName", m.GetDomainName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userSid", m.GetUserSid()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountName sets the accountName property value. The user account's displayed name. +func (m *UserAccount) SetAccountName(value *string)() { + m.accountName = value +} +// 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 *UserAccount) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAzureAdUserId sets the azureAdUserId property value. The user object identifier in Azure AD. +func (m *UserAccount) SetAzureAdUserId(value *string)() { + m.azureAdUserId = value +} +// SetDomainName sets the domainName property value. The name of the Active Directory domain of which the user is a member. +func (m *UserAccount) SetDomainName(value *string)() { + m.domainName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *UserAccount) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserPrincipalName sets the userPrincipalName property value. The user principal name of the account in Azure AD. +func (m *UserAccount) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} +// SetUserSid sets the userSid property value. The local security identifier of the user account. +func (m *UserAccount) SetUserSid(value *string)() { + m.userSid = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_accountable.go b/src/internal/connector/graph/betasdk/models/security/user_accountable.go new file mode 100644 index 000000000..94bc44696 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_accountable.go @@ -0,0 +1,23 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserAccountable +type UserAccountable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountName()(*string) + GetAzureAdUserId()(*string) + GetDomainName()(*string) + GetOdataType()(*string) + GetUserPrincipalName()(*string) + GetUserSid()(*string) + SetAccountName(value *string)() + SetAzureAdUserId(value *string)() + SetDomainName(value *string)() + SetOdataType(value *string)() + SetUserPrincipalName(value *string)() + SetUserSid(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_evidence.go b/src/internal/connector/graph/betasdk/models/security/user_evidence.go new file mode 100644 index 000000000..725fbf518 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_evidence.go @@ -0,0 +1,60 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserEvidence +type UserEvidence struct { + AlertEvidence + // The user account details. + userAccount UserAccountable +} +// NewUserEvidence instantiates a new UserEvidence and sets the default values. +func NewUserEvidence()(*UserEvidence) { + m := &UserEvidence{ + AlertEvidence: *NewAlertEvidence(), + } + return m +} +// CreateUserEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserEvidence(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.AlertEvidence.GetFieldDeserializers() + res["userAccount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateUserAccountFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetUserAccount(val.(UserAccountable)) + } + return nil + } + return res +} +// GetUserAccount gets the userAccount property value. The user account details. +func (m *UserEvidence) GetUserAccount()(UserAccountable) { + return m.userAccount +} +// Serialize serializes information the current object +func (m *UserEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.AlertEvidence.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("userAccount", m.GetUserAccount()) + if err != nil { + return err + } + } + return nil +} +// SetUserAccount sets the userAccount property value. The user account details. +func (m *UserEvidence) SetUserAccount(value UserAccountable)() { + m.userAccount = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_evidenceable.go b/src/internal/connector/graph/betasdk/models/security/user_evidenceable.go new file mode 100644 index 000000000..1eb77b450 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_evidenceable.go @@ -0,0 +1,13 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserEvidenceable +type UserEvidenceable interface { + AlertEvidenceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetUserAccount()(UserAccountable) + SetUserAccount(value UserAccountable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_mailbox_setting.go b/src/internal/connector/graph/betasdk/models/security/user_mailbox_setting.go new file mode 100644 index 000000000..b894bf2db --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_mailbox_setting.go @@ -0,0 +1,85 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type UserMailboxSetting int + +const ( + NONE_USERMAILBOXSETTING UserMailboxSetting = iota + JUNKMAILDELETION_USERMAILBOXSETTING + ISFROMADDRESSINADDRESSBOOK_USERMAILBOXSETTING + ISFROMADDRESSINADDRESSSAFELIST_USERMAILBOXSETTING + ISFROMADDRESSINADDRESSBLOCKLIST_USERMAILBOXSETTING + ISFROMADDRESSINADDRESSIMPLICITSAFELIST_USERMAILBOXSETTING + ISFROMADDRESSINADDRESSIMPLICITJUNKLIST_USERMAILBOXSETTING + ISFROMDOMAININDOMAINSAFELIST_USERMAILBOXSETTING + ISFROMDOMAININDOMAINBLOCKLIST_USERMAILBOXSETTING + ISRECIPIENTINRECIPIENTSAFELIST_USERMAILBOXSETTING + CUSTOMRULE_USERMAILBOXSETTING + JUNKMAILRULE_USERMAILBOXSETTING + SENDERPRAPRESENT_USERMAILBOXSETTING + FROMFIRSTTIMESENDER_USERMAILBOXSETTING + EXCLUSIVE_USERMAILBOXSETTING + PRIORSEENPASS_USERMAILBOXSETTING + SENDERAUTHENTICATIONSUCCEEDED_USERMAILBOXSETTING + ISJUNKMAILRULEENABLED_USERMAILBOXSETTING + UNKNOWNFUTUREVALUE_USERMAILBOXSETTING +) + +func (i UserMailboxSetting) String() string { + return []string{"none", "junkMailDeletion", "isFromAddressInAddressBook", "isFromAddressInAddressSafeList", "isFromAddressInAddressBlockList", "isFromAddressInAddressImplicitSafeList", "isFromAddressInAddressImplicitJunkList", "isFromDomainInDomainSafeList", "isFromDomainInDomainBlockList", "isRecipientInRecipientSafeList", "customRule", "junkMailRule", "senderPraPresent", "fromFirstTimeSender", "exclusive", "priorSeenPass", "senderAuthenticationSucceeded", "isJunkMailRuleEnabled", "unknownFutureValue"}[i] +} +func ParseUserMailboxSetting(v string) (interface{}, error) { + result := NONE_USERMAILBOXSETTING + switch v { + case "none": + result = NONE_USERMAILBOXSETTING + case "junkMailDeletion": + result = JUNKMAILDELETION_USERMAILBOXSETTING + case "isFromAddressInAddressBook": + result = ISFROMADDRESSINADDRESSBOOK_USERMAILBOXSETTING + case "isFromAddressInAddressSafeList": + result = ISFROMADDRESSINADDRESSSAFELIST_USERMAILBOXSETTING + case "isFromAddressInAddressBlockList": + result = ISFROMADDRESSINADDRESSBLOCKLIST_USERMAILBOXSETTING + case "isFromAddressInAddressImplicitSafeList": + result = ISFROMADDRESSINADDRESSIMPLICITSAFELIST_USERMAILBOXSETTING + case "isFromAddressInAddressImplicitJunkList": + result = ISFROMADDRESSINADDRESSIMPLICITJUNKLIST_USERMAILBOXSETTING + case "isFromDomainInDomainSafeList": + result = ISFROMDOMAININDOMAINSAFELIST_USERMAILBOXSETTING + case "isFromDomainInDomainBlockList": + result = ISFROMDOMAININDOMAINBLOCKLIST_USERMAILBOXSETTING + case "isRecipientInRecipientSafeList": + result = ISRECIPIENTINRECIPIENTSAFELIST_USERMAILBOXSETTING + case "customRule": + result = CUSTOMRULE_USERMAILBOXSETTING + case "junkMailRule": + result = JUNKMAILRULE_USERMAILBOXSETTING + case "senderPraPresent": + result = SENDERPRAPRESENT_USERMAILBOXSETTING + case "fromFirstTimeSender": + result = FROMFIRSTTIMESENDER_USERMAILBOXSETTING + case "exclusive": + result = EXCLUSIVE_USERMAILBOXSETTING + case "priorSeenPass": + result = PRIORSEENPASS_USERMAILBOXSETTING + case "senderAuthenticationSucceeded": + result = SENDERAUTHENTICATIONSUCCEEDED_USERMAILBOXSETTING + case "isJunkMailRuleEnabled": + result = ISJUNKMAILRULEENABLED_USERMAILBOXSETTING + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_USERMAILBOXSETTING + default: + return 0, errors.New("Unknown UserMailboxSetting value: " + v) + } + return &result, nil +} +func SerializeUserMailboxSetting(values []UserMailboxSetting) []string { + 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/security/user_source.go b/src/internal/connector/graph/betasdk/models/security/user_source.go new file mode 100644 index 000000000..c01c0fc51 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_source.go @@ -0,0 +1,115 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserSource +type UserSource struct { + DataSource + // Email address of the user's mailbox. + email *string + // Specifies which sources are included in this group. Possible values are: mailbox, site. + includedSources *SourceType + // The URL of the user's OneDrive for Business site. Read-only. + siteWebUrl *string +} +// NewUserSource instantiates a new UserSource and sets the default values. +func NewUserSource()(*UserSource) { + m := &UserSource{ + DataSource: *NewDataSource(), + } + odataTypeValue := "#microsoft.graph.security.userSource"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateUserSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserSource(), nil +} +// GetEmail gets the email property value. Email address of the user's mailbox. +func (m *UserSource) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DataSource.GetFieldDeserializers() + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["includedSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSourceType) + if err != nil { + return err + } + if val != nil { + m.SetIncludedSources(val.(*SourceType)) + } + return nil + } + res["siteWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteWebUrl(val) + } + return nil + } + return res +} +// GetIncludedSources gets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UserSource) GetIncludedSources()(*SourceType) { + return m.includedSources +} +// GetSiteWebUrl gets the siteWebUrl property value. The URL of the user's OneDrive for Business site. Read-only. +func (m *UserSource) GetSiteWebUrl()(*string) { + return m.siteWebUrl +} +// Serialize serializes information the current object +func (m *UserSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DataSource.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + if m.GetIncludedSources() != nil { + cast := (*m.GetIncludedSources()).String() + err = writer.WriteStringValue("includedSources", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("siteWebUrl", m.GetSiteWebUrl()) + if err != nil { + return err + } + } + return nil +} +// SetEmail sets the email property value. Email address of the user's mailbox. +func (m *UserSource) SetEmail(value *string)() { + m.email = value +} +// SetIncludedSources sets the includedSources property value. Specifies which sources are included in this group. Possible values are: mailbox, site. +func (m *UserSource) SetIncludedSources(value *SourceType)() { + m.includedSources = value +} +// SetSiteWebUrl sets the siteWebUrl property value. The URL of the user's OneDrive for Business site. Read-only. +func (m *UserSource) SetSiteWebUrl(value *string)() { + m.siteWebUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_source_collection_response.go b/src/internal/connector/graph/betasdk/models/security/user_source_collection_response.go new file mode 100644 index 000000000..56cc5d964 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_source_collection_response.go @@ -0,0 +1,69 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserSourceCollectionResponse +type UserSourceCollectionResponse struct { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponse + // The value property + value []UserSourceable +} +// NewUserSourceCollectionResponse instantiates a new UserSourceCollectionResponse and sets the default values. +func NewUserSourceCollectionResponse()(*UserSourceCollectionResponse) { + m := &UserSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateUserSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateUserSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewUserSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *UserSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateUserSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]UserSourceable, len(val)) + for i, v := range val { + res[i] = v.(UserSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *UserSourceCollectionResponse) GetValue()([]UserSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *UserSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *UserSourceCollectionResponse) SetValue(value []UserSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security/user_source_collection_responseable.go new file mode 100644 index 000000000..702359373 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_source_collection_responseable.go @@ -0,0 +1,14 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354 "github.com/alcionai/corso/src/internal/connector/graph/betasdk/models" +) + +// UserSourceCollectionResponseable +type UserSourceCollectionResponseable interface { + ifda19816f54f079134d70c11e75d6b26799300cf72079e282f1d3bb9a6750354.BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]UserSourceable) + SetValue(value []UserSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/user_sourceable.go b/src/internal/connector/graph/betasdk/models/security/user_sourceable.go new file mode 100644 index 000000000..e82c1518a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/user_sourceable.go @@ -0,0 +1,17 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// UserSourceable +type UserSourceable interface { + DataSourceable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetIncludedSources()(*SourceType) + GetSiteWebUrl()(*string) + SetEmail(value *string)() + SetIncludedSources(value *SourceType)() + SetSiteWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/vm_cloud_provider.go b/src/internal/connector/graph/betasdk/models/security/vm_cloud_provider.go new file mode 100644 index 000000000..89b0ef9a1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/vm_cloud_provider.go @@ -0,0 +1,37 @@ +package security +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type VmCloudProvider int + +const ( + UNKNOWN_VMCLOUDPROVIDER VmCloudProvider = iota + AZURE_VMCLOUDPROVIDER + UNKNOWNFUTUREVALUE_VMCLOUDPROVIDER +) + +func (i VmCloudProvider) String() string { + return []string{"unknown", "azure", "unknownFutureValue"}[i] +} +func ParseVmCloudProvider(v string) (interface{}, error) { + result := UNKNOWN_VMCLOUDPROVIDER + switch v { + case "unknown": + result = UNKNOWN_VMCLOUDPROVIDER + case "azure": + result = AZURE_VMCLOUDPROVIDER + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_VMCLOUDPROVIDER + default: + return 0, errors.New("Unknown VmCloudProvider value: " + v) + } + return &result, nil +} +func SerializeVmCloudProvider(values []VmCloudProvider) []string { + 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/security/vm_metadata.go b/src/internal/connector/graph/betasdk/models/security/vm_metadata.go new file mode 100644 index 000000000..91ad9d2fb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/vm_metadata.go @@ -0,0 +1,176 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// VmMetadata +type VmMetadata 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 cloudProvider property + cloudProvider *VmCloudProvider + // The OdataType property + odataType *string + // Unique identifier of the Azure resource. + resourceId *string + // Unique identifier of the Azure subscription the customer tenant belongs to. + subscriptionId *string + // Unique identifier of the virtual machine instance. + vmId *string +} +// NewVmMetadata instantiates a new vmMetadata and sets the default values. +func NewVmMetadata()(*VmMetadata) { + m := &VmMetadata{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateVmMetadataFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateVmMetadataFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewVmMetadata(), 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 *VmMetadata) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCloudProvider gets the cloudProvider property value. The cloudProvider property +func (m *VmMetadata) GetCloudProvider()(*VmCloudProvider) { + return m.cloudProvider +} +// GetFieldDeserializers the deserialization information for the current model +func (m *VmMetadata) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["cloudProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseVmCloudProvider) + if err != nil { + return err + } + if val != nil { + m.SetCloudProvider(val.(*VmCloudProvider)) + } + 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["resourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResourceId(val) + } + return nil + } + res["subscriptionId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubscriptionId(val) + } + return nil + } + res["vmId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVmId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *VmMetadata) GetOdataType()(*string) { + return m.odataType +} +// GetResourceId gets the resourceId property value. Unique identifier of the Azure resource. +func (m *VmMetadata) GetResourceId()(*string) { + return m.resourceId +} +// GetSubscriptionId gets the subscriptionId property value. Unique identifier of the Azure subscription the customer tenant belongs to. +func (m *VmMetadata) GetSubscriptionId()(*string) { + return m.subscriptionId +} +// GetVmId gets the vmId property value. Unique identifier of the virtual machine instance. +func (m *VmMetadata) GetVmId()(*string) { + return m.vmId +} +// Serialize serializes information the current object +func (m *VmMetadata) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetCloudProvider() != nil { + cast := (*m.GetCloudProvider()).String() + err := writer.WriteStringValue("cloudProvider", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resourceId", m.GetResourceId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subscriptionId", m.GetSubscriptionId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vmId", m.GetVmId()) + 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 *VmMetadata) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCloudProvider sets the cloudProvider property value. The cloudProvider property +func (m *VmMetadata) SetCloudProvider(value *VmCloudProvider)() { + m.cloudProvider = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *VmMetadata) SetOdataType(value *string)() { + m.odataType = value +} +// SetResourceId sets the resourceId property value. Unique identifier of the Azure resource. +func (m *VmMetadata) SetResourceId(value *string)() { + m.resourceId = value +} +// SetSubscriptionId sets the subscriptionId property value. Unique identifier of the Azure subscription the customer tenant belongs to. +func (m *VmMetadata) SetSubscriptionId(value *string)() { + m.subscriptionId = value +} +// SetVmId sets the vmId property value. Unique identifier of the virtual machine instance. +func (m *VmMetadata) SetVmId(value *string)() { + m.vmId = value +} diff --git a/src/internal/connector/graph/betasdk/models/security/vm_metadataable.go b/src/internal/connector/graph/betasdk/models/security/vm_metadataable.go new file mode 100644 index 000000000..d25e128f3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/vm_metadataable.go @@ -0,0 +1,21 @@ +package security + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// VmMetadataable +type VmMetadataable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCloudProvider()(*VmCloudProvider) + GetOdataType()(*string) + GetResourceId()(*string) + GetSubscriptionId()(*string) + GetVmId()(*string) + SetCloudProvider(value *VmCloudProvider)() + SetOdataType(value *string)() + SetResourceId(value *string)() + SetSubscriptionId(value *string)() + SetVmId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security/watermark_layout.go b/src/internal/connector/graph/betasdk/models/security/watermark_layout.go new file mode 100644 index 000000000..53797d68b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security/watermark_layout.go @@ -0,0 +1,34 @@ +package security +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type WatermarkLayout int + +const ( + HORIZONTAL_WATERMARKLAYOUT WatermarkLayout = iota + DIAGONAL_WATERMARKLAYOUT +) + +func (i WatermarkLayout) String() string { + return []string{"horizontal", "diagonal"}[i] +} +func ParseWatermarkLayout(v string) (interface{}, error) { + result := HORIZONTAL_WATERMARKLAYOUT + switch v { + case "horizontal": + result = HORIZONTAL_WATERMARKLAYOUT + case "diagonal": + result = DIAGONAL_WATERMARKLAYOUT + default: + return 0, errors.New("Unknown WatermarkLayout value: " + v) + } + return &result, nil +} +func SerializeWatermarkLayout(values []WatermarkLayout) []string { + 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/security_action.go b/src/internal/connector/graph/betasdk/models/security_action.go new file mode 100644 index 000000000..23ed3f2bf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action.go @@ -0,0 +1,416 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityAction provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecurityAction struct { + Entity + // Reason for invoking this action. + actionReason *string + // The Application ID of the calling application that submitted (POST) the action. The appId should be extracted from the auth token and not entered manually by the calling application. + appId *string + // Azure tenant ID of the entity to determine which tenant the entity belongs to (multi-tenancy support). The azureTenantId should be extracted from the auth token and not entered manually by the calling application. + azureTenantId *string + // The clientContext property + clientContext *string + // Timestamp when the action was completed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + completedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timestamp when the action is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Error info when the action fails. + errorInfo ResultInfoable + // Timestamp when this action was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + lastActionDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Action name. + name *string + // Collection of parameters (key-value pairs) necessary to invoke the action, for example, URL or fileHash to block.). Required. + parameters []KeyValuePairable + // Collection of securityActionState to keep the history of an action. + states []SecurityActionStateable + // Status of the action. Possible values are: NotStarted, Running, Completed, Failed. + status *OperationStatus + // The user principal name of the signed-in user that submitted (POST) the action. The user should be extracted from the auth token and not entered manually by the calling application. + user *string + // Complex Type containing details about the Security product/service vendor, provider, and sub-provider (for example, vendor=Microsoft; provider=Windows Defender ATP; sub-provider=AppLocker). + vendorInformation SecurityVendorInformationable +} +// NewSecurityAction instantiates a new securityAction and sets the default values. +func NewSecurityAction()(*SecurityAction) { + m := &SecurityAction{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityAction(), nil +} +// GetActionReason gets the actionReason property value. Reason for invoking this action. +func (m *SecurityAction) GetActionReason()(*string) { + return m.actionReason +} +// GetAppId gets the appId property value. The Application ID of the calling application that submitted (POST) the action. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) GetAppId()(*string) { + return m.appId +} +// GetAzureTenantId gets the azureTenantId property value. Azure tenant ID of the entity to determine which tenant the entity belongs to (multi-tenancy support). The azureTenantId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) GetAzureTenantId()(*string) { + return m.azureTenantId +} +// GetClientContext gets the clientContext property value. The clientContext property +func (m *SecurityAction) GetClientContext()(*string) { + return m.clientContext +} +// GetCompletedDateTime gets the completedDateTime property value. Timestamp when the action was completed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.completedDateTime +} +// GetCreatedDateTime gets the createdDateTime property value. Timestamp when the action is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetErrorInfo gets the errorInfo property value. Error info when the action fails. +func (m *SecurityAction) GetErrorInfo()(ResultInfoable) { + return m.errorInfo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["actionReason"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetActionReason(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["azureTenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAzureTenantId(val) + } + return nil + } + res["clientContext"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetClientContext(val) + } + return nil + } + res["completedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCompletedDateTime(val) + } + return nil + } + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["errorInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResultInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetErrorInfo(val.(ResultInfoable)) + } + return nil + } + res["lastActionDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastActionDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["parameters"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetParameters(res) + } + return nil + } + res["states"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityActionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityActionStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityActionStateable) + } + m.SetStates(res) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*OperationStatus)) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUser(val) + } + return nil + } + res["vendorInformation"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityVendorInformationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVendorInformation(val.(SecurityVendorInformationable)) + } + return nil + } + return res +} +// GetLastActionDateTime gets the lastActionDateTime property value. Timestamp when this action was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastActionDateTime +} +// GetName gets the name property value. Action name. +func (m *SecurityAction) GetName()(*string) { + return m.name +} +// GetParameters gets the parameters property value. Collection of parameters (key-value pairs) necessary to invoke the action, for example, URL or fileHash to block.). Required. +func (m *SecurityAction) GetParameters()([]KeyValuePairable) { + return m.parameters +} +// GetStates gets the states property value. Collection of securityActionState to keep the history of an action. +func (m *SecurityAction) GetStates()([]SecurityActionStateable) { + return m.states +} +// GetStatus gets the status property value. Status of the action. Possible values are: NotStarted, Running, Completed, Failed. +func (m *SecurityAction) GetStatus()(*OperationStatus) { + return m.status +} +// GetUser gets the user property value. The user principal name of the signed-in user that submitted (POST) the action. The user should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) GetUser()(*string) { + return m.user +} +// GetVendorInformation gets the vendorInformation property value. Complex Type containing details about the Security product/service vendor, provider, and sub-provider (for example, vendor=Microsoft; provider=Windows Defender ATP; sub-provider=AppLocker). +func (m *SecurityAction) GetVendorInformation()(SecurityVendorInformationable) { + return m.vendorInformation +} +// Serialize serializes information the current object +func (m *SecurityAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("actionReason", m.GetActionReason()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("azureTenantId", m.GetAzureTenantId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("clientContext", m.GetClientContext()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("completedDateTime", m.GetCompletedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("errorInfo", m.GetErrorInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastActionDateTime", m.GetLastActionDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + if m.GetParameters() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetParameters())) + for i, v := range m.GetParameters() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("parameters", cast) + if err != nil { + return err + } + } + if m.GetStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetStates())) + for i, v := range m.GetStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("states", cast) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("user", m.GetUser()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("vendorInformation", m.GetVendorInformation()) + if err != nil { + return err + } + } + return nil +} +// SetActionReason sets the actionReason property value. Reason for invoking this action. +func (m *SecurityAction) SetActionReason(value *string)() { + m.actionReason = value +} +// SetAppId sets the appId property value. The Application ID of the calling application that submitted (POST) the action. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) SetAppId(value *string)() { + m.appId = value +} +// SetAzureTenantId sets the azureTenantId property value. Azure tenant ID of the entity to determine which tenant the entity belongs to (multi-tenancy support). The azureTenantId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) SetAzureTenantId(value *string)() { + m.azureTenantId = value +} +// SetClientContext sets the clientContext property value. The clientContext property +func (m *SecurityAction) SetClientContext(value *string)() { + m.clientContext = value +} +// SetCompletedDateTime sets the completedDateTime property value. Timestamp when the action was completed. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.completedDateTime = value +} +// SetCreatedDateTime sets the createdDateTime property value. Timestamp when the action is created. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetErrorInfo sets the errorInfo property value. Error info when the action fails. +func (m *SecurityAction) SetErrorInfo(value ResultInfoable)() { + m.errorInfo = value +} +// SetLastActionDateTime sets the lastActionDateTime property value. Timestamp when this action was last updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *SecurityAction) SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastActionDateTime = value +} +// SetName sets the name property value. Action name. +func (m *SecurityAction) SetName(value *string)() { + m.name = value +} +// SetParameters sets the parameters property value. Collection of parameters (key-value pairs) necessary to invoke the action, for example, URL or fileHash to block.). Required. +func (m *SecurityAction) SetParameters(value []KeyValuePairable)() { + m.parameters = value +} +// SetStates sets the states property value. Collection of securityActionState to keep the history of an action. +func (m *SecurityAction) SetStates(value []SecurityActionStateable)() { + m.states = value +} +// SetStatus sets the status property value. Status of the action. Possible values are: NotStarted, Running, Completed, Failed. +func (m *SecurityAction) SetStatus(value *OperationStatus)() { + m.status = value +} +// SetUser sets the user property value. The user principal name of the signed-in user that submitted (POST) the action. The user should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityAction) SetUser(value *string)() { + m.user = value +} +// SetVendorInformation sets the vendorInformation property value. Complex Type containing details about the Security product/service vendor, provider, and sub-provider (for example, vendor=Microsoft; provider=Windows Defender ATP; sub-provider=AppLocker). +func (m *SecurityAction) SetVendorInformation(value SecurityVendorInformationable)() { + m.vendorInformation = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_collection_response.go b/src/internal/connector/graph/betasdk/models/security_action_collection_response.go new file mode 100644 index 000000000..8664638e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionCollectionResponse +type SecurityActionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityActionable +} +// NewSecurityActionCollectionResponse instantiates a new SecurityActionCollectionResponse and sets the default values. +func NewSecurityActionCollectionResponse()(*SecurityActionCollectionResponse) { + m := &SecurityActionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityActionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityActionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityActionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityActionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityActionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityActionable, len(val)) + for i, v := range val { + res[i] = v.(SecurityActionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityActionCollectionResponse) GetValue()([]SecurityActionable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityActionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityActionCollectionResponse) SetValue(value []SecurityActionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_action_collection_responseable.go new file mode 100644 index 000000000..a1094f6dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionCollectionResponseable +type SecurityActionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityActionable) + SetValue(value []SecurityActionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_state.go b/src/internal/connector/graph/betasdk/models/security_action_state.go new file mode 100644 index 000000000..d7656ecb8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_state.go @@ -0,0 +1,177 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionState +type SecurityActionState 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 Application ID of the calling application that submitted an update (PATCH) to the action. The appId should be extracted from the auth token and not entered manually by the calling application. + appId *string + // The OdataType property + odataType *string + // Status of the securityAction in this update. Possible values are: NotStarted, Running, Completed, Failed. + status *OperationStatus + // Timestamp when the actionState was updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + updatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The user principal name of the signed-in user that submitted an update (PATCH) to the action. The user should be extracted from the auth token and not entered manually by the calling application. + user *string +} +// NewSecurityActionState instantiates a new securityActionState and sets the default values. +func NewSecurityActionState()(*SecurityActionState) { + m := &SecurityActionState{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecurityActionStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityActionStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityActionState(), 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 *SecurityActionState) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppId gets the appId property value. The Application ID of the calling application that submitted an update (PATCH) to the action. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityActionState) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityActionState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(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["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseOperationStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*OperationStatus)) + } + return nil + } + res["updatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetUpdatedDateTime(val) + } + return nil + } + res["user"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUser(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecurityActionState) GetOdataType()(*string) { + return m.odataType +} +// GetStatus gets the status property value. Status of the securityAction in this update. Possible values are: NotStarted, Running, Completed, Failed. +func (m *SecurityActionState) GetStatus()(*OperationStatus) { + return m.status +} +// GetUpdatedDateTime gets the updatedDateTime property value. Timestamp when the actionState was updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *SecurityActionState) GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.updatedDateTime +} +// GetUser gets the user property value. The user principal name of the signed-in user that submitted an update (PATCH) to the action. The user should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityActionState) GetUser()(*string) { + return m.user +} +// Serialize serializes information the current object +func (m *SecurityActionState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err := writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("updatedDateTime", m.GetUpdatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("user", m.GetUser()) + 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 *SecurityActionState) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppId sets the appId property value. The Application ID of the calling application that submitted an update (PATCH) to the action. The appId should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityActionState) SetAppId(value *string)() { + m.appId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecurityActionState) SetOdataType(value *string)() { + m.odataType = value +} +// SetStatus sets the status property value. Status of the securityAction in this update. Possible values are: NotStarted, Running, Completed, Failed. +func (m *SecurityActionState) SetStatus(value *OperationStatus)() { + m.status = value +} +// SetUpdatedDateTime sets the updatedDateTime property value. Timestamp when the actionState was updated. The Timestamp type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *SecurityActionState) SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.updatedDateTime = value +} +// SetUser sets the user property value. The user principal name of the signed-in user that submitted an update (PATCH) to the action. The user should be extracted from the auth token and not entered manually by the calling application. +func (m *SecurityActionState) SetUser(value *string)() { + m.user = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_state_collection_response.go b/src/internal/connector/graph/betasdk/models/security_action_state_collection_response.go new file mode 100644 index 000000000..3dbc4fdfe --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionStateCollectionResponse +type SecurityActionStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityActionStateable +} +// NewSecurityActionStateCollectionResponse instantiates a new SecurityActionStateCollectionResponse and sets the default values. +func NewSecurityActionStateCollectionResponse()(*SecurityActionStateCollectionResponse) { + m := &SecurityActionStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityActionStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityActionStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityActionStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityActionStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityActionStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityActionStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityActionStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityActionStateCollectionResponse) GetValue()([]SecurityActionStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityActionStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityActionStateCollectionResponse) SetValue(value []SecurityActionStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_action_state_collection_responseable.go new file mode 100644 index 000000000..be7e6d5e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionStateCollectionResponseable +type SecurityActionStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityActionStateable) + SetValue(value []SecurityActionStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_action_stateable.go b/src/internal/connector/graph/betasdk/models/security_action_stateable.go new file mode 100644 index 000000000..a147a360c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_action_stateable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionStateable +type SecurityActionStateable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + GetOdataType()(*string) + GetStatus()(*OperationStatus) + GetUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetUser()(*string) + SetAppId(value *string)() + SetOdataType(value *string)() + SetStatus(value *OperationStatus)() + SetUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetUser(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_actionable.go b/src/internal/connector/graph/betasdk/models/security_actionable.go new file mode 100644 index 000000000..63edc7c7b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_actionable.go @@ -0,0 +1,40 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityActionable +type SecurityActionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActionReason()(*string) + GetAppId()(*string) + GetAzureTenantId()(*string) + GetClientContext()(*string) + GetCompletedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetErrorInfo()(ResultInfoable) + GetLastActionDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetParameters()([]KeyValuePairable) + GetStates()([]SecurityActionStateable) + GetStatus()(*OperationStatus) + GetUser()(*string) + GetVendorInformation()(SecurityVendorInformationable) + SetActionReason(value *string)() + SetAppId(value *string)() + SetAzureTenantId(value *string)() + SetClientContext(value *string)() + SetCompletedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetErrorInfo(value ResultInfoable)() + SetLastActionDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetParameters(value []KeyValuePairable)() + SetStates(value []SecurityActionStateable)() + SetStatus(value *OperationStatus)() + SetUser(value *string)() + SetVendorInformation(value SecurityVendorInformationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary.go b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary.go new file mode 100644 index 000000000..036404e17 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineCategoryStateSummary +type SecurityBaselineCategoryStateSummary struct { + SecurityBaselineStateSummary + // The category name + displayName *string +} +// NewSecurityBaselineCategoryStateSummary instantiates a new SecurityBaselineCategoryStateSummary and sets the default values. +func NewSecurityBaselineCategoryStateSummary()(*SecurityBaselineCategoryStateSummary) { + m := &SecurityBaselineCategoryStateSummary{ + SecurityBaselineStateSummary: *NewSecurityBaselineStateSummary(), + } + odataTypeValue := "#microsoft.graph.securityBaselineCategoryStateSummary"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSecurityBaselineCategoryStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineCategoryStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineCategoryStateSummary(), nil +} +// GetDisplayName gets the displayName property value. The category name +func (m *SecurityBaselineCategoryStateSummary) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineCategoryStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.SecurityBaselineStateSummary.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecurityBaselineCategoryStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.SecurityBaselineStateSummary.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The category name +func (m *SecurityBaselineCategoryStateSummary) SetDisplayName(value *string)() { + m.displayName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_response.go new file mode 100644 index 000000000..bd5e69fb5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineCategoryStateSummaryCollectionResponse +type SecurityBaselineCategoryStateSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineCategoryStateSummaryable +} +// NewSecurityBaselineCategoryStateSummaryCollectionResponse instantiates a new SecurityBaselineCategoryStateSummaryCollectionResponse and sets the default values. +func NewSecurityBaselineCategoryStateSummaryCollectionResponse()(*SecurityBaselineCategoryStateSummaryCollectionResponse) { + m := &SecurityBaselineCategoryStateSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineCategoryStateSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineCategoryStateSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineCategoryStateSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineCategoryStateSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineCategoryStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineCategoryStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineCategoryStateSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineCategoryStateSummaryCollectionResponse) GetValue()([]SecurityBaselineCategoryStateSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineCategoryStateSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineCategoryStateSummaryCollectionResponse) SetValue(value []SecurityBaselineCategoryStateSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_responseable.go new file mode 100644 index 000000000..72ceed265 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineCategoryStateSummaryCollectionResponseable +type SecurityBaselineCategoryStateSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineCategoryStateSummaryable) + SetValue(value []SecurityBaselineCategoryStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summaryable.go b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summaryable.go new file mode 100644 index 000000000..5548afb3d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_category_state_summaryable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineCategoryStateSummaryable +type SecurityBaselineCategoryStateSummaryable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + SecurityBaselineStateSummaryable + GetDisplayName()(*string) + SetDisplayName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_compliance_state.go b/src/internal/connector/graph/betasdk/models/security_baseline_compliance_state.go new file mode 100644 index 000000000..a8fed3985 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_compliance_state.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecurityBaselineComplianceState int + +const ( + // Unknown state + UNKNOWN_SECURITYBASELINECOMPLIANCESTATE SecurityBaselineComplianceState = iota + // Secure state + SECURE_SECURITYBASELINECOMPLIANCESTATE + // Not applicable state + NOTAPPLICABLE_SECURITYBASELINECOMPLIANCESTATE + // Not secure state + NOTSECURE_SECURITYBASELINECOMPLIANCESTATE + // Error state + ERROR_SECURITYBASELINECOMPLIANCESTATE + // Conflict state + CONFLICT_SECURITYBASELINECOMPLIANCESTATE +) + +func (i SecurityBaselineComplianceState) String() string { + return []string{"unknown", "secure", "notApplicable", "notSecure", "error", "conflict"}[i] +} +func ParseSecurityBaselineComplianceState(v string) (interface{}, error) { + result := UNKNOWN_SECURITYBASELINECOMPLIANCESTATE + switch v { + case "unknown": + result = UNKNOWN_SECURITYBASELINECOMPLIANCESTATE + case "secure": + result = SECURE_SECURITYBASELINECOMPLIANCESTATE + case "notApplicable": + result = NOTAPPLICABLE_SECURITYBASELINECOMPLIANCESTATE + case "notSecure": + result = NOTSECURE_SECURITYBASELINECOMPLIANCESTATE + case "error": + result = ERROR_SECURITYBASELINECOMPLIANCESTATE + case "conflict": + result = CONFLICT_SECURITYBASELINECOMPLIANCESTATE + default: + return 0, errors.New("Unknown SecurityBaselineComplianceState value: " + v) + } + return &result, nil +} +func SerializeSecurityBaselineComplianceState(values []SecurityBaselineComplianceState) []string { + 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/security_baseline_contributing_policy.go b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy.go new file mode 100644 index 000000000..bd847954f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineContributingPolicy the security baseline compliance state of a setting for a device +type SecurityBaselineContributingPolicy struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the policy + displayName *string + // The OdataType property + odataType *string + // Unique identifier of the policy + sourceId *string + // Authoring source of a policy + sourceType *SecurityBaselinePolicySourceType +} +// NewSecurityBaselineContributingPolicy instantiates a new securityBaselineContributingPolicy and sets the default values. +func NewSecurityBaselineContributingPolicy()(*SecurityBaselineContributingPolicy) { + m := &SecurityBaselineContributingPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecurityBaselineContributingPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineContributingPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineContributingPolicy(), 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 *SecurityBaselineContributingPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Name of the policy +func (m *SecurityBaselineContributingPolicy) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineContributingPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(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["sourceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSourceId(val) + } + return nil + } + res["sourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityBaselinePolicySourceType) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*SecurityBaselinePolicySourceType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecurityBaselineContributingPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetSourceId gets the sourceId property value. Unique identifier of the policy +func (m *SecurityBaselineContributingPolicy) GetSourceId()(*string) { + return m.sourceId +} +// GetSourceType gets the sourceType property value. Authoring source of a policy +func (m *SecurityBaselineContributingPolicy) GetSourceType()(*SecurityBaselinePolicySourceType) { + return m.sourceType +} +// Serialize serializes information the current object +func (m *SecurityBaselineContributingPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sourceId", m.GetSourceId()) + if err != nil { + return err + } + } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err := writer.WriteStringValue("sourceType", &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 *SecurityBaselineContributingPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Name of the policy +func (m *SecurityBaselineContributingPolicy) SetDisplayName(value *string)() { + m.displayName = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecurityBaselineContributingPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetSourceId sets the sourceId property value. Unique identifier of the policy +func (m *SecurityBaselineContributingPolicy) SetSourceId(value *string)() { + m.sourceId = value +} +// SetSourceType sets the sourceType property value. Authoring source of a policy +func (m *SecurityBaselineContributingPolicy) SetSourceType(value *SecurityBaselinePolicySourceType)() { + m.sourceType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_response.go new file mode 100644 index 000000000..c49f76791 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineContributingPolicyCollectionResponse +type SecurityBaselineContributingPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineContributingPolicyable +} +// NewSecurityBaselineContributingPolicyCollectionResponse instantiates a new SecurityBaselineContributingPolicyCollectionResponse and sets the default values. +func NewSecurityBaselineContributingPolicyCollectionResponse()(*SecurityBaselineContributingPolicyCollectionResponse) { + m := &SecurityBaselineContributingPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineContributingPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineContributingPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineContributingPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineContributingPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineContributingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineContributingPolicyable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineContributingPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineContributingPolicyCollectionResponse) GetValue()([]SecurityBaselineContributingPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineContributingPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineContributingPolicyCollectionResponse) SetValue(value []SecurityBaselineContributingPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_responseable.go new file mode 100644 index 000000000..d446ee463 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineContributingPolicyCollectionResponseable +type SecurityBaselineContributingPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineContributingPolicyable) + SetValue(value []SecurityBaselineContributingPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policyable.go b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policyable.go new file mode 100644 index 000000000..973ef291c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_contributing_policyable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineContributingPolicyable +type SecurityBaselineContributingPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetOdataType()(*string) + GetSourceId()(*string) + GetSourceType()(*SecurityBaselinePolicySourceType) + SetDisplayName(value *string)() + SetOdataType(value *string)() + SetSourceId(value *string)() + SetSourceType(value *SecurityBaselinePolicySourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_device_state.go b/src/internal/connector/graph/betasdk/models/security_baseline_device_state.go new file mode 100644 index 000000000..5830be224 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_device_state.go @@ -0,0 +1,166 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineDeviceState the security baseline compliance state summary of the security baseline for a device. +type SecurityBaselineDeviceState struct { + Entity + // Display name of the device + deviceDisplayName *string + // Last modified date time of the policy report + lastReportedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Intune device id + managedDeviceId *string + // Security Baseline Compliance State + state *SecurityBaselineComplianceState + // User Principal Name + userPrincipalName *string +} +// NewSecurityBaselineDeviceState instantiates a new securityBaselineDeviceState and sets the default values. +func NewSecurityBaselineDeviceState()(*SecurityBaselineDeviceState) { + m := &SecurityBaselineDeviceState{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityBaselineDeviceStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineDeviceStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineDeviceState(), nil +} +// GetDeviceDisplayName gets the deviceDisplayName property value. Display name of the device +func (m *SecurityBaselineDeviceState) GetDeviceDisplayName()(*string) { + return m.deviceDisplayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineDeviceState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["deviceDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDeviceDisplayName(val) + } + return nil + } + res["lastReportedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastReportedDateTime(val) + } + return nil + } + res["managedDeviceId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceId(val) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityBaselineComplianceState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*SecurityBaselineComplianceState)) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetLastReportedDateTime gets the lastReportedDateTime property value. Last modified date time of the policy report +func (m *SecurityBaselineDeviceState) GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastReportedDateTime +} +// GetManagedDeviceId gets the managedDeviceId property value. Intune device id +func (m *SecurityBaselineDeviceState) GetManagedDeviceId()(*string) { + return m.managedDeviceId +} +// GetState gets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineDeviceState) GetState()(*SecurityBaselineComplianceState) { + return m.state +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *SecurityBaselineDeviceState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *SecurityBaselineDeviceState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("deviceDisplayName", m.GetDeviceDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastReportedDateTime", m.GetLastReportedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("managedDeviceId", m.GetManagedDeviceId()) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDeviceDisplayName sets the deviceDisplayName property value. Display name of the device +func (m *SecurityBaselineDeviceState) SetDeviceDisplayName(value *string)() { + m.deviceDisplayName = value +} +// SetLastReportedDateTime sets the lastReportedDateTime property value. Last modified date time of the policy report +func (m *SecurityBaselineDeviceState) SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastReportedDateTime = value +} +// SetManagedDeviceId sets the managedDeviceId property value. Intune device id +func (m *SecurityBaselineDeviceState) SetManagedDeviceId(value *string)() { + m.managedDeviceId = value +} +// SetState sets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineDeviceState) SetState(value *SecurityBaselineComplianceState)() { + m.state = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *SecurityBaselineDeviceState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_response.go new file mode 100644 index 000000000..26d26973e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineDeviceStateCollectionResponse +type SecurityBaselineDeviceStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineDeviceStateable +} +// NewSecurityBaselineDeviceStateCollectionResponse instantiates a new SecurityBaselineDeviceStateCollectionResponse and sets the default values. +func NewSecurityBaselineDeviceStateCollectionResponse()(*SecurityBaselineDeviceStateCollectionResponse) { + m := &SecurityBaselineDeviceStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineDeviceStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineDeviceStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineDeviceStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineDeviceStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineDeviceStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineDeviceStateCollectionResponse) GetValue()([]SecurityBaselineDeviceStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineDeviceStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineDeviceStateCollectionResponse) SetValue(value []SecurityBaselineDeviceStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_responseable.go new file mode 100644 index 000000000..c7087b314 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_device_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineDeviceStateCollectionResponseable +type SecurityBaselineDeviceStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineDeviceStateable) + SetValue(value []SecurityBaselineDeviceStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_device_stateable.go b/src/internal/connector/graph/betasdk/models/security_baseline_device_stateable.go new file mode 100644 index 000000000..5ef1a128f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_device_stateable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineDeviceStateable +type SecurityBaselineDeviceStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDeviceDisplayName()(*string) + GetLastReportedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetManagedDeviceId()(*string) + GetState()(*SecurityBaselineComplianceState) + GetUserPrincipalName()(*string) + SetDeviceDisplayName(value *string)() + SetLastReportedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetManagedDeviceId(value *string)() + SetState(value *SecurityBaselineComplianceState)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_policy_source_type.go b/src/internal/connector/graph/betasdk/models/security_baseline_policy_source_type.go new file mode 100644 index 000000000..5bee33c93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_policy_source_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecurityBaselinePolicySourceType int + +const ( + DEVICECONFIGURATION_SECURITYBASELINEPOLICYSOURCETYPE SecurityBaselinePolicySourceType = iota + DEVICEINTENT_SECURITYBASELINEPOLICYSOURCETYPE +) + +func (i SecurityBaselinePolicySourceType) String() string { + return []string{"deviceConfiguration", "deviceIntent"}[i] +} +func ParseSecurityBaselinePolicySourceType(v string) (interface{}, error) { + result := DEVICECONFIGURATION_SECURITYBASELINEPOLICYSOURCETYPE + switch v { + case "deviceConfiguration": + result = DEVICECONFIGURATION_SECURITYBASELINEPOLICYSOURCETYPE + case "deviceIntent": + result = DEVICEINTENT_SECURITYBASELINEPOLICYSOURCETYPE + default: + return 0, errors.New("Unknown SecurityBaselinePolicySourceType value: " + v) + } + return &result, nil +} +func SerializeSecurityBaselinePolicySourceType(values []SecurityBaselinePolicySourceType) []string { + 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/security_baseline_setting_state.go b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state.go new file mode 100644 index 000000000..0ada972f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state.go @@ -0,0 +1,259 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineSettingState the security baseline compliance state of a setting for a device +type SecurityBaselineSettingState struct { + Entity + // The policies that contribute to this setting instance + contributingPolicies []SecurityBaselineContributingPolicyable + // The error code if the setting is in error state + errorCode *string + // The setting category id which this setting belongs to + settingCategoryId *string + // The setting category name which this setting belongs to + settingCategoryName *string + // The setting id guid + settingId *string + // The setting name that is being reported + settingName *string + // The policies that contribute to this setting instance + sourcePolicies []SettingSourceable + // Security Baseline Compliance State + state *SecurityBaselineComplianceState +} +// NewSecurityBaselineSettingState instantiates a new securityBaselineSettingState and sets the default values. +func NewSecurityBaselineSettingState()(*SecurityBaselineSettingState) { + m := &SecurityBaselineSettingState{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityBaselineSettingStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineSettingStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineSettingState(), nil +} +// GetContributingPolicies gets the contributingPolicies property value. The policies that contribute to this setting instance +func (m *SecurityBaselineSettingState) GetContributingPolicies()([]SecurityBaselineContributingPolicyable) { + return m.contributingPolicies +} +// GetErrorCode gets the errorCode property value. The error code if the setting is in error state +func (m *SecurityBaselineSettingState) GetErrorCode()(*string) { + return m.errorCode +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineSettingState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["contributingPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineContributingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineContributingPolicyable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineContributingPolicyable) + } + m.SetContributingPolicies(res) + } + return nil + } + res["errorCode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorCode(val) + } + return nil + } + res["settingCategoryId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingCategoryId(val) + } + return nil + } + res["settingCategoryName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingCategoryName(val) + } + return nil + } + res["settingId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingId(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["sourcePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetSourcePolicies(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityBaselineComplianceState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*SecurityBaselineComplianceState)) + } + return nil + } + return res +} +// GetSettingCategoryId gets the settingCategoryId property value. The setting category id which this setting belongs to +func (m *SecurityBaselineSettingState) GetSettingCategoryId()(*string) { + return m.settingCategoryId +} +// GetSettingCategoryName gets the settingCategoryName property value. The setting category name which this setting belongs to +func (m *SecurityBaselineSettingState) GetSettingCategoryName()(*string) { + return m.settingCategoryName +} +// GetSettingId gets the settingId property value. The setting id guid +func (m *SecurityBaselineSettingState) GetSettingId()(*string) { + return m.settingId +} +// GetSettingName gets the settingName property value. The setting name that is being reported +func (m *SecurityBaselineSettingState) GetSettingName()(*string) { + return m.settingName +} +// GetSourcePolicies gets the sourcePolicies property value. The policies that contribute to this setting instance +func (m *SecurityBaselineSettingState) GetSourcePolicies()([]SettingSourceable) { + return m.sourcePolicies +} +// GetState gets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineSettingState) GetState()(*SecurityBaselineComplianceState) { + return m.state +} +// Serialize serializes information the current object +func (m *SecurityBaselineSettingState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetContributingPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetContributingPolicies())) + for i, v := range m.GetContributingPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("contributingPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorCode", m.GetErrorCode()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingCategoryId", m.GetSettingCategoryId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingCategoryName", m.GetSettingCategoryName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingId", m.GetSettingId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + if m.GetSourcePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSourcePolicies())) + for i, v := range m.GetSourcePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sourcePolicies", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + return nil +} +// SetContributingPolicies sets the contributingPolicies property value. The policies that contribute to this setting instance +func (m *SecurityBaselineSettingState) SetContributingPolicies(value []SecurityBaselineContributingPolicyable)() { + m.contributingPolicies = value +} +// SetErrorCode sets the errorCode property value. The error code if the setting is in error state +func (m *SecurityBaselineSettingState) SetErrorCode(value *string)() { + m.errorCode = value +} +// SetSettingCategoryId sets the settingCategoryId property value. The setting category id which this setting belongs to +func (m *SecurityBaselineSettingState) SetSettingCategoryId(value *string)() { + m.settingCategoryId = value +} +// SetSettingCategoryName sets the settingCategoryName property value. The setting category name which this setting belongs to +func (m *SecurityBaselineSettingState) SetSettingCategoryName(value *string)() { + m.settingCategoryName = value +} +// SetSettingId sets the settingId property value. The setting id guid +func (m *SecurityBaselineSettingState) SetSettingId(value *string)() { + m.settingId = value +} +// SetSettingName sets the settingName property value. The setting name that is being reported +func (m *SecurityBaselineSettingState) SetSettingName(value *string)() { + m.settingName = value +} +// SetSourcePolicies sets the sourcePolicies property value. The policies that contribute to this setting instance +func (m *SecurityBaselineSettingState) SetSourcePolicies(value []SettingSourceable)() { + m.sourcePolicies = value +} +// SetState sets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineSettingState) SetState(value *SecurityBaselineComplianceState)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_response.go new file mode 100644 index 000000000..8aad219bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineSettingStateCollectionResponse +type SecurityBaselineSettingStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineSettingStateable +} +// NewSecurityBaselineSettingStateCollectionResponse instantiates a new SecurityBaselineSettingStateCollectionResponse and sets the default values. +func NewSecurityBaselineSettingStateCollectionResponse()(*SecurityBaselineSettingStateCollectionResponse) { + m := &SecurityBaselineSettingStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineSettingStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineSettingStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineSettingStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineSettingStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineSettingStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineSettingStateCollectionResponse) GetValue()([]SecurityBaselineSettingStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineSettingStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineSettingStateCollectionResponse) SetValue(value []SecurityBaselineSettingStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_responseable.go new file mode 100644 index 000000000..de2580134 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_setting_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineSettingStateCollectionResponseable +type SecurityBaselineSettingStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineSettingStateable) + SetValue(value []SecurityBaselineSettingStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_setting_stateable.go b/src/internal/connector/graph/betasdk/models/security_baseline_setting_stateable.go new file mode 100644 index 000000000..00ac63ee9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_setting_stateable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineSettingStateable +type SecurityBaselineSettingStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContributingPolicies()([]SecurityBaselineContributingPolicyable) + GetErrorCode()(*string) + GetSettingCategoryId()(*string) + GetSettingCategoryName()(*string) + GetSettingId()(*string) + GetSettingName()(*string) + GetSourcePolicies()([]SettingSourceable) + GetState()(*SecurityBaselineComplianceState) + SetContributingPolicies(value []SecurityBaselineContributingPolicyable)() + SetErrorCode(value *string)() + SetSettingCategoryId(value *string)() + SetSettingCategoryName(value *string)() + SetSettingId(value *string)() + SetSettingName(value *string)() + SetSourcePolicies(value []SettingSourceable)() + SetState(value *SecurityBaselineComplianceState)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_state.go b/src/internal/connector/graph/betasdk/models/security_baseline_state.go new file mode 100644 index 000000000..cd8f06a5f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_state.go @@ -0,0 +1,173 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineState security baseline state for a device. +type SecurityBaselineState struct { + Entity + // The display name of the security baseline + displayName *string + // The security baseline template id + securityBaselineTemplateId *string + // The security baseline state for different settings for a device + settingStates []SecurityBaselineSettingStateable + // Security Baseline Compliance State + state *SecurityBaselineComplianceState + // User Principal Name + userPrincipalName *string +} +// NewSecurityBaselineState instantiates a new securityBaselineState and sets the default values. +func NewSecurityBaselineState()(*SecurityBaselineState) { + m := &SecurityBaselineState{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityBaselineStateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineStateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineState(), nil +} +// GetDisplayName gets the displayName property value. The display name of the security baseline +func (m *SecurityBaselineState) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineState) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["securityBaselineTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSecurityBaselineTemplateId(val) + } + return nil + } + res["settingStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineSettingStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineSettingStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineSettingStateable) + } + m.SetSettingStates(res) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityBaselineComplianceState) + if err != nil { + return err + } + if val != nil { + m.SetState(val.(*SecurityBaselineComplianceState)) + } + return nil + } + res["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetSecurityBaselineTemplateId gets the securityBaselineTemplateId property value. The security baseline template id +func (m *SecurityBaselineState) GetSecurityBaselineTemplateId()(*string) { + return m.securityBaselineTemplateId +} +// GetSettingStates gets the settingStates property value. The security baseline state for different settings for a device +func (m *SecurityBaselineState) GetSettingStates()([]SecurityBaselineSettingStateable) { + return m.settingStates +} +// GetState gets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineState) GetState()(*SecurityBaselineComplianceState) { + return m.state +} +// GetUserPrincipalName gets the userPrincipalName property value. User Principal Name +func (m *SecurityBaselineState) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *SecurityBaselineState) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("securityBaselineTemplateId", m.GetSecurityBaselineTemplateId()) + if err != nil { + return err + } + } + if m.GetSettingStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSettingStates())) + for i, v := range m.GetSettingStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("settingStates", cast) + if err != nil { + return err + } + } + if m.GetState() != nil { + cast := (*m.GetState()).String() + err = writer.WriteStringValue("state", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + if err != nil { + return err + } + } + return nil +} +// SetDisplayName sets the displayName property value. The display name of the security baseline +func (m *SecurityBaselineState) SetDisplayName(value *string)() { + m.displayName = value +} +// SetSecurityBaselineTemplateId sets the securityBaselineTemplateId property value. The security baseline template id +func (m *SecurityBaselineState) SetSecurityBaselineTemplateId(value *string)() { + m.securityBaselineTemplateId = value +} +// SetSettingStates sets the settingStates property value. The security baseline state for different settings for a device +func (m *SecurityBaselineState) SetSettingStates(value []SecurityBaselineSettingStateable)() { + m.settingStates = value +} +// SetState sets the state property value. Security Baseline Compliance State +func (m *SecurityBaselineState) SetState(value *SecurityBaselineComplianceState)() { + m.state = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User Principal Name +func (m *SecurityBaselineState) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_response.go new file mode 100644 index 000000000..df6477007 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineStateCollectionResponse +type SecurityBaselineStateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineStateable +} +// NewSecurityBaselineStateCollectionResponse instantiates a new SecurityBaselineStateCollectionResponse and sets the default values. +func NewSecurityBaselineStateCollectionResponse()(*SecurityBaselineStateCollectionResponse) { + m := &SecurityBaselineStateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineStateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineStateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineStateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineStateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineStateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineStateCollectionResponse) GetValue()([]SecurityBaselineStateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineStateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineStateCollectionResponse) SetValue(value []SecurityBaselineStateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_responseable.go new file mode 100644 index 000000000..be603bca5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_state_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineStateCollectionResponseable +type SecurityBaselineStateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineStateable) + SetValue(value []SecurityBaselineStateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_state_summary.go b/src/internal/connector/graph/betasdk/models/security_baseline_state_summary.go new file mode 100644 index 000000000..816580114 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_state_summary.go @@ -0,0 +1,208 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineStateSummary the security baseline compliance state summary for the security baseline of the account. +type SecurityBaselineStateSummary struct { + Entity + // Number of conflict devices + conflictCount *int32 + // Number of error devices + errorCount *int32 + // Number of not applicable devices + notApplicableCount *int32 + // Number of not secure devices + notSecureCount *int32 + // Number of secure devices + secureCount *int32 + // Number of unknown devices + unknownCount *int32 +} +// NewSecurityBaselineStateSummary instantiates a new securityBaselineStateSummary and sets the default values. +func NewSecurityBaselineStateSummary()(*SecurityBaselineStateSummary) { + m := &SecurityBaselineStateSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityBaselineStateSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineStateSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.securityBaselineCategoryStateSummary": + return NewSecurityBaselineCategoryStateSummary(), nil + } + } + } + } + return NewSecurityBaselineStateSummary(), nil +} +// GetConflictCount gets the conflictCount property value. Number of conflict devices +func (m *SecurityBaselineStateSummary) GetConflictCount()(*int32) { + return m.conflictCount +} +// GetErrorCount gets the errorCount property value. Number of error devices +func (m *SecurityBaselineStateSummary) GetErrorCount()(*int32) { + return m.errorCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineStateSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["conflictCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictCount(val) + } + return nil + } + res["errorCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorCount(val) + } + return nil + } + res["notApplicableCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableCount(val) + } + return nil + } + res["notSecureCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotSecureCount(val) + } + return nil + } + res["secureCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSecureCount(val) + } + return nil + } + res["unknownCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownCount(val) + } + return nil + } + return res +} +// GetNotApplicableCount gets the notApplicableCount property value. Number of not applicable devices +func (m *SecurityBaselineStateSummary) GetNotApplicableCount()(*int32) { + return m.notApplicableCount +} +// GetNotSecureCount gets the notSecureCount property value. Number of not secure devices +func (m *SecurityBaselineStateSummary) GetNotSecureCount()(*int32) { + return m.notSecureCount +} +// GetSecureCount gets the secureCount property value. Number of secure devices +func (m *SecurityBaselineStateSummary) GetSecureCount()(*int32) { + return m.secureCount +} +// GetUnknownCount gets the unknownCount property value. Number of unknown devices +func (m *SecurityBaselineStateSummary) GetUnknownCount()(*int32) { + return m.unknownCount +} +// Serialize serializes information the current object +func (m *SecurityBaselineStateSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("conflictCount", m.GetConflictCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorCount", m.GetErrorCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableCount", m.GetNotApplicableCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notSecureCount", m.GetNotSecureCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("secureCount", m.GetSecureCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownCount", m.GetUnknownCount()) + if err != nil { + return err + } + } + return nil +} +// SetConflictCount sets the conflictCount property value. Number of conflict devices +func (m *SecurityBaselineStateSummary) SetConflictCount(value *int32)() { + m.conflictCount = value +} +// SetErrorCount sets the errorCount property value. Number of error devices +func (m *SecurityBaselineStateSummary) SetErrorCount(value *int32)() { + m.errorCount = value +} +// SetNotApplicableCount sets the notApplicableCount property value. Number of not applicable devices +func (m *SecurityBaselineStateSummary) SetNotApplicableCount(value *int32)() { + m.notApplicableCount = value +} +// SetNotSecureCount sets the notSecureCount property value. Number of not secure devices +func (m *SecurityBaselineStateSummary) SetNotSecureCount(value *int32)() { + m.notSecureCount = value +} +// SetSecureCount sets the secureCount property value. Number of secure devices +func (m *SecurityBaselineStateSummary) SetSecureCount(value *int32)() { + m.secureCount = value +} +// SetUnknownCount sets the unknownCount property value. Number of unknown devices +func (m *SecurityBaselineStateSummary) SetUnknownCount(value *int32)() { + m.unknownCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_state_summaryable.go b/src/internal/connector/graph/betasdk/models/security_baseline_state_summaryable.go new file mode 100644 index 000000000..b3ce15210 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_state_summaryable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineStateSummaryable +type SecurityBaselineStateSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConflictCount()(*int32) + GetErrorCount()(*int32) + GetNotApplicableCount()(*int32) + GetNotSecureCount()(*int32) + GetSecureCount()(*int32) + GetUnknownCount()(*int32) + SetConflictCount(value *int32)() + SetErrorCount(value *int32)() + SetNotApplicableCount(value *int32)() + SetNotSecureCount(value *int32)() + SetSecureCount(value *int32)() + SetUnknownCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_stateable.go b/src/internal/connector/graph/betasdk/models/security_baseline_stateable.go new file mode 100644 index 000000000..08c33a7de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_stateable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineStateable +type SecurityBaselineStateable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetSecurityBaselineTemplateId()(*string) + GetSettingStates()([]SecurityBaselineSettingStateable) + GetState()(*SecurityBaselineComplianceState) + GetUserPrincipalName()(*string) + SetDisplayName(value *string)() + SetSecurityBaselineTemplateId(value *string)() + SetSettingStates(value []SecurityBaselineSettingStateable)() + SetState(value *SecurityBaselineComplianceState)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_template.go b/src/internal/connector/graph/betasdk/models/security_baseline_template.go new file mode 100644 index 000000000..351ca8440 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_template.go @@ -0,0 +1,130 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineTemplate +type SecurityBaselineTemplate struct { + DeviceManagementTemplate + // The security baseline per category device state summary + categoryDeviceStateSummaries []SecurityBaselineCategoryStateSummaryable + // The security baseline device states + deviceStates []SecurityBaselineDeviceStateable + // The security baseline device state summary + deviceStateSummary SecurityBaselineStateSummaryable +} +// NewSecurityBaselineTemplate instantiates a new SecurityBaselineTemplate and sets the default values. +func NewSecurityBaselineTemplate()(*SecurityBaselineTemplate) { + m := &SecurityBaselineTemplate{ + DeviceManagementTemplate: *NewDeviceManagementTemplate(), + } + odataTypeValue := "#microsoft.graph.securityBaselineTemplate"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSecurityBaselineTemplateFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineTemplateFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineTemplate(), nil +} +// GetCategoryDeviceStateSummaries gets the categoryDeviceStateSummaries property value. The security baseline per category device state summary +func (m *SecurityBaselineTemplate) GetCategoryDeviceStateSummaries()([]SecurityBaselineCategoryStateSummaryable) { + return m.categoryDeviceStateSummaries +} +// GetDeviceStates gets the deviceStates property value. The security baseline device states +func (m *SecurityBaselineTemplate) GetDeviceStates()([]SecurityBaselineDeviceStateable) { + return m.deviceStates +} +// GetDeviceStateSummary gets the deviceStateSummary property value. The security baseline device state summary +func (m *SecurityBaselineTemplate) GetDeviceStateSummary()(SecurityBaselineStateSummaryable) { + return m.deviceStateSummary +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineTemplate) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceManagementTemplate.GetFieldDeserializers() + res["categoryDeviceStateSummaries"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineCategoryStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineCategoryStateSummaryable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineCategoryStateSummaryable) + } + m.SetCategoryDeviceStateSummaries(res) + } + return nil + } + res["deviceStates"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineDeviceStateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineDeviceStateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineDeviceStateable) + } + m.SetDeviceStates(res) + } + return nil + } + res["deviceStateSummary"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSecurityBaselineStateSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDeviceStateSummary(val.(SecurityBaselineStateSummaryable)) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *SecurityBaselineTemplate) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceManagementTemplate.Serialize(writer) + if err != nil { + return err + } + if m.GetCategoryDeviceStateSummaries() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCategoryDeviceStateSummaries())) + for i, v := range m.GetCategoryDeviceStateSummaries() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("categoryDeviceStateSummaries", cast) + if err != nil { + return err + } + } + if m.GetDeviceStates() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDeviceStates())) + for i, v := range m.GetDeviceStates() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("deviceStates", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("deviceStateSummary", m.GetDeviceStateSummary()) + if err != nil { + return err + } + } + return nil +} +// SetCategoryDeviceStateSummaries sets the categoryDeviceStateSummaries property value. The security baseline per category device state summary +func (m *SecurityBaselineTemplate) SetCategoryDeviceStateSummaries(value []SecurityBaselineCategoryStateSummaryable)() { + m.categoryDeviceStateSummaries = value +} +// SetDeviceStates sets the deviceStates property value. The security baseline device states +func (m *SecurityBaselineTemplate) SetDeviceStates(value []SecurityBaselineDeviceStateable)() { + m.deviceStates = value +} +// SetDeviceStateSummary sets the deviceStateSummary property value. The security baseline device state summary +func (m *SecurityBaselineTemplate) SetDeviceStateSummary(value SecurityBaselineStateSummaryable)() { + m.deviceStateSummary = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_response.go b/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_response.go new file mode 100644 index 000000000..859ab1811 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineTemplateCollectionResponse +type SecurityBaselineTemplateCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityBaselineTemplateable +} +// NewSecurityBaselineTemplateCollectionResponse instantiates a new SecurityBaselineTemplateCollectionResponse and sets the default values. +func NewSecurityBaselineTemplateCollectionResponse()(*SecurityBaselineTemplateCollectionResponse) { + m := &SecurityBaselineTemplateCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityBaselineTemplateCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityBaselineTemplateCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityBaselineTemplateCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityBaselineTemplateCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityBaselineTemplateFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityBaselineTemplateable, len(val)) + for i, v := range val { + res[i] = v.(SecurityBaselineTemplateable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityBaselineTemplateCollectionResponse) GetValue()([]SecurityBaselineTemplateable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityBaselineTemplateCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityBaselineTemplateCollectionResponse) SetValue(value []SecurityBaselineTemplateable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_responseable.go new file mode 100644 index 000000000..634c1e95c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_template_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineTemplateCollectionResponseable +type SecurityBaselineTemplateCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityBaselineTemplateable) + SetValue(value []SecurityBaselineTemplateable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_baseline_templateable.go b/src/internal/connector/graph/betasdk/models/security_baseline_templateable.go new file mode 100644 index 000000000..ad18d9992 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_baseline_templateable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityBaselineTemplateable +type SecurityBaselineTemplateable interface { + DeviceManagementTemplateable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCategoryDeviceStateSummaries()([]SecurityBaselineCategoryStateSummaryable) + GetDeviceStates()([]SecurityBaselineDeviceStateable) + GetDeviceStateSummary()(SecurityBaselineStateSummaryable) + SetCategoryDeviceStateSummaries(value []SecurityBaselineCategoryStateSummaryable)() + SetDeviceStates(value []SecurityBaselineDeviceStateable)() + SetDeviceStateSummary(value SecurityBaselineStateSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_configuration_task.go b/src/internal/connector/graph/betasdk/models/security_configuration_task.go new file mode 100644 index 000000000..959f299e2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_configuration_task.go @@ -0,0 +1,237 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityConfigurationTask +type SecurityConfigurationTask struct { + DeviceAppManagementTask + // The endpoint security configuration applicable platform. + applicablePlatform *EndpointSecurityConfigurationApplicablePlatform + // The endpoint security policy type. + endpointSecurityPolicy *EndpointSecurityConfigurationType + // The endpoint security policy profile type. + endpointSecurityPolicyProfile *EndpointSecurityConfigurationProfileType + // Information about the mitigation. + insights *string + // The intended settings and their values. + intendedSettings []KeyValuePairable + // The number of vulnerable devices. Valid values 0 to 65536 + managedDeviceCount *int32 + // The vulnerable managed devices. + managedDevices []VulnerableManagedDeviceable +} +// NewSecurityConfigurationTask instantiates a new SecurityConfigurationTask and sets the default values. +func NewSecurityConfigurationTask()(*SecurityConfigurationTask) { + m := &SecurityConfigurationTask{ + DeviceAppManagementTask: *NewDeviceAppManagementTask(), + } + odataTypeValue := "#microsoft.graph.securityConfigurationTask"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSecurityConfigurationTaskFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityConfigurationTaskFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityConfigurationTask(), nil +} +// GetApplicablePlatform gets the applicablePlatform property value. The endpoint security configuration applicable platform. +func (m *SecurityConfigurationTask) GetApplicablePlatform()(*EndpointSecurityConfigurationApplicablePlatform) { + return m.applicablePlatform +} +// GetEndpointSecurityPolicy gets the endpointSecurityPolicy property value. The endpoint security policy type. +func (m *SecurityConfigurationTask) GetEndpointSecurityPolicy()(*EndpointSecurityConfigurationType) { + return m.endpointSecurityPolicy +} +// GetEndpointSecurityPolicyProfile gets the endpointSecurityPolicyProfile property value. The endpoint security policy profile type. +func (m *SecurityConfigurationTask) GetEndpointSecurityPolicyProfile()(*EndpointSecurityConfigurationProfileType) { + return m.endpointSecurityPolicyProfile +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityConfigurationTask) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceAppManagementTask.GetFieldDeserializers() + res["applicablePlatform"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointSecurityConfigurationApplicablePlatform) + if err != nil { + return err + } + if val != nil { + m.SetApplicablePlatform(val.(*EndpointSecurityConfigurationApplicablePlatform)) + } + return nil + } + res["endpointSecurityPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointSecurityConfigurationType) + if err != nil { + return err + } + if val != nil { + m.SetEndpointSecurityPolicy(val.(*EndpointSecurityConfigurationType)) + } + return nil + } + res["endpointSecurityPolicyProfile"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEndpointSecurityConfigurationProfileType) + if err != nil { + return err + } + if val != nil { + m.SetEndpointSecurityPolicyProfile(val.(*EndpointSecurityConfigurationProfileType)) + } + return nil + } + res["insights"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInsights(val) + } + return nil + } + res["intendedSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetIntendedSettings(res) + } + return nil + } + res["managedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetManagedDeviceCount(val) + } + return nil + } + res["managedDevices"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateVulnerableManagedDeviceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]VulnerableManagedDeviceable, len(val)) + for i, v := range val { + res[i] = v.(VulnerableManagedDeviceable) + } + m.SetManagedDevices(res) + } + return nil + } + return res +} +// GetInsights gets the insights property value. Information about the mitigation. +func (m *SecurityConfigurationTask) GetInsights()(*string) { + return m.insights +} +// GetIntendedSettings gets the intendedSettings property value. The intended settings and their values. +func (m *SecurityConfigurationTask) GetIntendedSettings()([]KeyValuePairable) { + return m.intendedSettings +} +// GetManagedDeviceCount gets the managedDeviceCount property value. The number of vulnerable devices. Valid values 0 to 65536 +func (m *SecurityConfigurationTask) GetManagedDeviceCount()(*int32) { + return m.managedDeviceCount +} +// GetManagedDevices gets the managedDevices property value. The vulnerable managed devices. +func (m *SecurityConfigurationTask) GetManagedDevices()([]VulnerableManagedDeviceable) { + return m.managedDevices +} +// Serialize serializes information the current object +func (m *SecurityConfigurationTask) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceAppManagementTask.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicablePlatform() != nil { + cast := (*m.GetApplicablePlatform()).String() + err = writer.WriteStringValue("applicablePlatform", &cast) + if err != nil { + return err + } + } + if m.GetEndpointSecurityPolicy() != nil { + cast := (*m.GetEndpointSecurityPolicy()).String() + err = writer.WriteStringValue("endpointSecurityPolicy", &cast) + if err != nil { + return err + } + } + if m.GetEndpointSecurityPolicyProfile() != nil { + cast := (*m.GetEndpointSecurityPolicyProfile()).String() + err = writer.WriteStringValue("endpointSecurityPolicyProfile", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("insights", m.GetInsights()) + if err != nil { + return err + } + } + if m.GetIntendedSettings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIntendedSettings())) + for i, v := range m.GetIntendedSettings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("intendedSettings", cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("managedDeviceCount", m.GetManagedDeviceCount()) + if err != nil { + return err + } + } + if m.GetManagedDevices() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetManagedDevices())) + for i, v := range m.GetManagedDevices() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("managedDevices", cast) + if err != nil { + return err + } + } + return nil +} +// SetApplicablePlatform sets the applicablePlatform property value. The endpoint security configuration applicable platform. +func (m *SecurityConfigurationTask) SetApplicablePlatform(value *EndpointSecurityConfigurationApplicablePlatform)() { + m.applicablePlatform = value +} +// SetEndpointSecurityPolicy sets the endpointSecurityPolicy property value. The endpoint security policy type. +func (m *SecurityConfigurationTask) SetEndpointSecurityPolicy(value *EndpointSecurityConfigurationType)() { + m.endpointSecurityPolicy = value +} +// SetEndpointSecurityPolicyProfile sets the endpointSecurityPolicyProfile property value. The endpoint security policy profile type. +func (m *SecurityConfigurationTask) SetEndpointSecurityPolicyProfile(value *EndpointSecurityConfigurationProfileType)() { + m.endpointSecurityPolicyProfile = value +} +// SetInsights sets the insights property value. Information about the mitigation. +func (m *SecurityConfigurationTask) SetInsights(value *string)() { + m.insights = value +} +// SetIntendedSettings sets the intendedSettings property value. The intended settings and their values. +func (m *SecurityConfigurationTask) SetIntendedSettings(value []KeyValuePairable)() { + m.intendedSettings = value +} +// SetManagedDeviceCount sets the managedDeviceCount property value. The number of vulnerable devices. Valid values 0 to 65536 +func (m *SecurityConfigurationTask) SetManagedDeviceCount(value *int32)() { + m.managedDeviceCount = value +} +// SetManagedDevices sets the managedDevices property value. The vulnerable managed devices. +func (m *SecurityConfigurationTask) SetManagedDevices(value []VulnerableManagedDeviceable)() { + m.managedDevices = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_response.go b/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_response.go new file mode 100644 index 000000000..3f479eaf1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityConfigurationTaskCollectionResponse +type SecurityConfigurationTaskCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityConfigurationTaskable +} +// NewSecurityConfigurationTaskCollectionResponse instantiates a new SecurityConfigurationTaskCollectionResponse and sets the default values. +func NewSecurityConfigurationTaskCollectionResponse()(*SecurityConfigurationTaskCollectionResponse) { + m := &SecurityConfigurationTaskCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityConfigurationTaskCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityConfigurationTaskCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityConfigurationTaskCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityConfigurationTaskCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityConfigurationTaskFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityConfigurationTaskable, len(val)) + for i, v := range val { + res[i] = v.(SecurityConfigurationTaskable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityConfigurationTaskCollectionResponse) GetValue()([]SecurityConfigurationTaskable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityConfigurationTaskCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityConfigurationTaskCollectionResponse) SetValue(value []SecurityConfigurationTaskable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_responseable.go new file mode 100644 index 000000000..91609bf1b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_configuration_task_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityConfigurationTaskCollectionResponseable +type SecurityConfigurationTaskCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityConfigurationTaskable) + SetValue(value []SecurityConfigurationTaskable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_configuration_taskable.go b/src/internal/connector/graph/betasdk/models/security_configuration_taskable.go new file mode 100644 index 000000000..9073ea777 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_configuration_taskable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityConfigurationTaskable +type SecurityConfigurationTaskable interface { + DeviceAppManagementTaskable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicablePlatform()(*EndpointSecurityConfigurationApplicablePlatform) + GetEndpointSecurityPolicy()(*EndpointSecurityConfigurationType) + GetEndpointSecurityPolicyProfile()(*EndpointSecurityConfigurationProfileType) + GetInsights()(*string) + GetIntendedSettings()([]KeyValuePairable) + GetManagedDeviceCount()(*int32) + GetManagedDevices()([]VulnerableManagedDeviceable) + SetApplicablePlatform(value *EndpointSecurityConfigurationApplicablePlatform)() + SetEndpointSecurityPolicy(value *EndpointSecurityConfigurationType)() + SetEndpointSecurityPolicyProfile(value *EndpointSecurityConfigurationProfileType)() + SetInsights(value *string)() + SetIntendedSettings(value []KeyValuePairable)() + SetManagedDeviceCount(value *int32)() + SetManagedDevices(value []VulnerableManagedDeviceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_network_protocol.go b/src/internal/connector/graph/betasdk/models/security_network_protocol.go new file mode 100644 index 000000000..c8fe96820 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_network_protocol.go @@ -0,0 +1,100 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecurityNetworkProtocol int + +const ( + UNKNOWN_SECURITYNETWORKPROTOCOL SecurityNetworkProtocol = iota + IP_SECURITYNETWORKPROTOCOL + ICMP_SECURITYNETWORKPROTOCOL + IGMP_SECURITYNETWORKPROTOCOL + GGP_SECURITYNETWORKPROTOCOL + IPV4_SECURITYNETWORKPROTOCOL + TCP_SECURITYNETWORKPROTOCOL + PUP_SECURITYNETWORKPROTOCOL + UDP_SECURITYNETWORKPROTOCOL + IDP_SECURITYNETWORKPROTOCOL + IPV6_SECURITYNETWORKPROTOCOL + IPV6ROUTINGHEADER_SECURITYNETWORKPROTOCOL + IPV6FRAGMENTHEADER_SECURITYNETWORKPROTOCOL + IPSECENCAPSULATINGSECURITYPAYLOAD_SECURITYNETWORKPROTOCOL + IPSECAUTHENTICATIONHEADER_SECURITYNETWORKPROTOCOL + ICMPV6_SECURITYNETWORKPROTOCOL + IPV6NONEXTHEADER_SECURITYNETWORKPROTOCOL + IPV6DESTINATIONOPTIONS_SECURITYNETWORKPROTOCOL + ND_SECURITYNETWORKPROTOCOL + RAW_SECURITYNETWORKPROTOCOL + IPX_SECURITYNETWORKPROTOCOL + SPX_SECURITYNETWORKPROTOCOL + SPXII_SECURITYNETWORKPROTOCOL + UNKNOWNFUTUREVALUE_SECURITYNETWORKPROTOCOL +) + +func (i SecurityNetworkProtocol) String() string { + return []string{"unknown", "ip", "icmp", "igmp", "ggp", "ipv4", "tcp", "pup", "udp", "idp", "ipv6", "ipv6RoutingHeader", "ipv6FragmentHeader", "ipSecEncapsulatingSecurityPayload", "ipSecAuthenticationHeader", "icmpV6", "ipv6NoNextHeader", "ipv6DestinationOptions", "nd", "raw", "ipx", "spx", "spxII", "unknownFutureValue"}[i] +} +func ParseSecurityNetworkProtocol(v string) (interface{}, error) { + result := UNKNOWN_SECURITYNETWORKPROTOCOL + switch v { + case "unknown": + result = UNKNOWN_SECURITYNETWORKPROTOCOL + case "ip": + result = IP_SECURITYNETWORKPROTOCOL + case "icmp": + result = ICMP_SECURITYNETWORKPROTOCOL + case "igmp": + result = IGMP_SECURITYNETWORKPROTOCOL + case "ggp": + result = GGP_SECURITYNETWORKPROTOCOL + case "ipv4": + result = IPV4_SECURITYNETWORKPROTOCOL + case "tcp": + result = TCP_SECURITYNETWORKPROTOCOL + case "pup": + result = PUP_SECURITYNETWORKPROTOCOL + case "udp": + result = UDP_SECURITYNETWORKPROTOCOL + case "idp": + result = IDP_SECURITYNETWORKPROTOCOL + case "ipv6": + result = IPV6_SECURITYNETWORKPROTOCOL + case "ipv6RoutingHeader": + result = IPV6ROUTINGHEADER_SECURITYNETWORKPROTOCOL + case "ipv6FragmentHeader": + result = IPV6FRAGMENTHEADER_SECURITYNETWORKPROTOCOL + case "ipSecEncapsulatingSecurityPayload": + result = IPSECENCAPSULATINGSECURITYPAYLOAD_SECURITYNETWORKPROTOCOL + case "ipSecAuthenticationHeader": + result = IPSECAUTHENTICATIONHEADER_SECURITYNETWORKPROTOCOL + case "icmpV6": + result = ICMPV6_SECURITYNETWORKPROTOCOL + case "ipv6NoNextHeader": + result = IPV6NONEXTHEADER_SECURITYNETWORKPROTOCOL + case "ipv6DestinationOptions": + result = IPV6DESTINATIONOPTIONS_SECURITYNETWORKPROTOCOL + case "nd": + result = ND_SECURITYNETWORKPROTOCOL + case "raw": + result = RAW_SECURITYNETWORKPROTOCOL + case "ipx": + result = IPX_SECURITYNETWORKPROTOCOL + case "spx": + result = SPX_SECURITYNETWORKPROTOCOL + case "spxII": + result = SPXII_SECURITYNETWORKPROTOCOL + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SECURITYNETWORKPROTOCOL + default: + return 0, errors.New("Unknown SecurityNetworkProtocol value: " + v) + } + return &result, nil +} +func SerializeSecurityNetworkProtocol(values []SecurityNetworkProtocol) []string { + 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/security_provider_status.go b/src/internal/connector/graph/betasdk/models/security_provider_status.go new file mode 100644 index 000000000..37603587f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_provider_status.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityProviderStatus +type SecurityProviderStatus 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 enabled property + enabled *bool + // The endpoint property + endpoint *string + // The OdataType property + odataType *string + // The provider property + provider *string + // The region property + region *string + // The vendor property + vendor_escaped *string +} +// NewSecurityProviderStatus instantiates a new securityProviderStatus and sets the default values. +func NewSecurityProviderStatus()(*SecurityProviderStatus) { + m := &SecurityProviderStatus{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecurityProviderStatusFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityProviderStatusFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityProviderStatus(), 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 *SecurityProviderStatus) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEnabled gets the enabled property value. The enabled property +func (m *SecurityProviderStatus) GetEnabled()(*bool) { + return m.enabled +} +// GetEndpoint gets the endpoint property value. The endpoint property +func (m *SecurityProviderStatus) GetEndpoint()(*string) { + return m.endpoint +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityProviderStatus) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["endpoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEndpoint(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["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvider(val) + } + return nil + } + res["region"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRegion(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecurityProviderStatus) GetOdataType()(*string) { + return m.odataType +} +// GetProvider gets the provider property value. The provider property +func (m *SecurityProviderStatus) GetProvider()(*string) { + return m.provider +} +// GetRegion gets the region property value. The region property +func (m *SecurityProviderStatus) GetRegion()(*string) { + return m.region +} +// GetVendor gets the vendor property value. The vendor property +func (m *SecurityProviderStatus) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *SecurityProviderStatus) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("endpoint", m.GetEndpoint()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("provider", m.GetProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("region", m.GetRegion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *SecurityProviderStatus) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEnabled sets the enabled property value. The enabled property +func (m *SecurityProviderStatus) SetEnabled(value *bool)() { + m.enabled = value +} +// SetEndpoint sets the endpoint property value. The endpoint property +func (m *SecurityProviderStatus) SetEndpoint(value *string)() { + m.endpoint = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecurityProviderStatus) SetOdataType(value *string)() { + m.odataType = value +} +// SetProvider sets the provider property value. The provider property +func (m *SecurityProviderStatus) SetProvider(value *string)() { + m.provider = value +} +// SetRegion sets the region property value. The region property +func (m *SecurityProviderStatus) SetRegion(value *string)() { + m.region = value +} +// SetVendor sets the vendor property value. The vendor property +func (m *SecurityProviderStatus) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_provider_status_collection_response.go b/src/internal/connector/graph/betasdk/models/security_provider_status_collection_response.go new file mode 100644 index 000000000..01b961c62 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_provider_status_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityProviderStatusCollectionResponse +type SecurityProviderStatusCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityProviderStatusable +} +// NewSecurityProviderStatusCollectionResponse instantiates a new SecurityProviderStatusCollectionResponse and sets the default values. +func NewSecurityProviderStatusCollectionResponse()(*SecurityProviderStatusCollectionResponse) { + m := &SecurityProviderStatusCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityProviderStatusCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityProviderStatusCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityProviderStatusCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityProviderStatusCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityProviderStatusFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityProviderStatusable, len(val)) + for i, v := range val { + res[i] = v.(SecurityProviderStatusable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityProviderStatusCollectionResponse) GetValue()([]SecurityProviderStatusable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityProviderStatusCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityProviderStatusCollectionResponse) SetValue(value []SecurityProviderStatusable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_provider_status_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_provider_status_collection_responseable.go new file mode 100644 index 000000000..42a714b3f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_provider_status_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityProviderStatusCollectionResponseable +type SecurityProviderStatusCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityProviderStatusable) + SetValue(value []SecurityProviderStatusable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_provider_statusable.go b/src/internal/connector/graph/betasdk/models/security_provider_statusable.go new file mode 100644 index 000000000..96b25e2b0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_provider_statusable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityProviderStatusable +type SecurityProviderStatusable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEnabled()(*bool) + GetEndpoint()(*string) + GetOdataType()(*string) + GetProvider()(*string) + GetRegion()(*string) + GetVendor()(*string) + SetEnabled(value *bool)() + SetEndpoint(value *string)() + SetOdataType(value *string)() + SetProvider(value *string)() + SetRegion(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_reports_root.go b/src/internal/connector/graph/betasdk/models/security_reports_root.go new file mode 100644 index 000000000..5e512acd8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_reports_root.go @@ -0,0 +1,34 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityReportsRoot +type SecurityReportsRoot struct { + Entity +} +// NewSecurityReportsRoot instantiates a new securityReportsRoot and sets the default values. +func NewSecurityReportsRoot()(*SecurityReportsRoot) { + m := &SecurityReportsRoot{ + Entity: *NewEntity(), + } + return m +} +// CreateSecurityReportsRootFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityReportsRootFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityReportsRoot(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityReportsRoot) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + return res +} +// Serialize serializes information the current object +func (m *SecurityReportsRoot) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + return nil +} diff --git a/src/internal/connector/graph/betasdk/models/security_reports_rootable.go b/src/internal/connector/graph/betasdk/models/security_reports_rootable.go new file mode 100644 index 000000000..9312b277b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_reports_rootable.go @@ -0,0 +1,11 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityReportsRootable +type SecurityReportsRootable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable +} diff --git a/src/internal/connector/graph/betasdk/models/security_resource.go b/src/internal/connector/graph/betasdk/models/security_resource.go new file mode 100644 index 000000000..4054b58e9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_resource.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityResource +type SecurityResource 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 OdataType property + odataType *string + // Name of the resource that is related to current alert. Required. + resource *string + // Represents type of security resources related to an alert. Possible values are: attacked, related. + resourceType *SecurityResourceType +} +// NewSecurityResource instantiates a new securityResource and sets the default values. +func NewSecurityResource()(*SecurityResource) { + m := &SecurityResource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecurityResourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityResourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityResource(), 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 *SecurityResource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityResource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetResource(val) + } + return nil + } + res["resourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSecurityResourceType) + if err != nil { + return err + } + if val != nil { + m.SetResourceType(val.(*SecurityResourceType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecurityResource) GetOdataType()(*string) { + return m.odataType +} +// GetResource gets the resource property value. Name of the resource that is related to current alert. Required. +func (m *SecurityResource) GetResource()(*string) { + return m.resource +} +// GetResourceType gets the resourceType property value. Represents type of security resources related to an alert. Possible values are: attacked, related. +func (m *SecurityResource) GetResourceType()(*SecurityResourceType) { + return m.resourceType +} +// Serialize serializes information the current object +func (m *SecurityResource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("resource", m.GetResource()) + if err != nil { + return err + } + } + if m.GetResourceType() != nil { + cast := (*m.GetResourceType()).String() + err := writer.WriteStringValue("resourceType", &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 *SecurityResource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecurityResource) SetOdataType(value *string)() { + m.odataType = value +} +// SetResource sets the resource property value. Name of the resource that is related to current alert. Required. +func (m *SecurityResource) SetResource(value *string)() { + m.resource = value +} +// SetResourceType sets the resourceType property value. Represents type of security resources related to an alert. Possible values are: attacked, related. +func (m *SecurityResource) SetResourceType(value *SecurityResourceType)() { + m.resourceType = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_resource_collection_response.go b/src/internal/connector/graph/betasdk/models/security_resource_collection_response.go new file mode 100644 index 000000000..04d658b33 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_resource_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityResourceCollectionResponse +type SecurityResourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SecurityResourceable +} +// NewSecurityResourceCollectionResponse instantiates a new SecurityResourceCollectionResponse and sets the default values. +func NewSecurityResourceCollectionResponse()(*SecurityResourceCollectionResponse) { + m := &SecurityResourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSecurityResourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityResourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityResourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityResourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSecurityResourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SecurityResourceable, len(val)) + for i, v := range val { + res[i] = v.(SecurityResourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SecurityResourceCollectionResponse) GetValue()([]SecurityResourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SecurityResourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SecurityResourceCollectionResponse) SetValue(value []SecurityResourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_resource_collection_responseable.go b/src/internal/connector/graph/betasdk/models/security_resource_collection_responseable.go new file mode 100644 index 000000000..ecb03047d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_resource_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityResourceCollectionResponseable +type SecurityResourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SecurityResourceable) + SetValue(value []SecurityResourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_resource_type.go b/src/internal/connector/graph/betasdk/models/security_resource_type.go new file mode 100644 index 000000000..df72b2a88 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_resource_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SecurityResourceType int + +const ( + UNKNOWN_SECURITYRESOURCETYPE SecurityResourceType = iota + ATTACKED_SECURITYRESOURCETYPE + RELATED_SECURITYRESOURCETYPE + UNKNOWNFUTUREVALUE_SECURITYRESOURCETYPE +) + +func (i SecurityResourceType) String() string { + return []string{"unknown", "attacked", "related", "unknownFutureValue"}[i] +} +func ParseSecurityResourceType(v string) (interface{}, error) { + result := UNKNOWN_SECURITYRESOURCETYPE + switch v { + case "unknown": + result = UNKNOWN_SECURITYRESOURCETYPE + case "attacked": + result = ATTACKED_SECURITYRESOURCETYPE + case "related": + result = RELATED_SECURITYRESOURCETYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SECURITYRESOURCETYPE + default: + return 0, errors.New("Unknown SecurityResourceType value: " + v) + } + return &result, nil +} +func SerializeSecurityResourceType(values []SecurityResourceType) []string { + 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/security_resourceable.go b/src/internal/connector/graph/betasdk/models/security_resourceable.go new file mode 100644 index 000000000..1789da6dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_resourceable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityResourceable +type SecurityResourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetResource()(*string) + GetResourceType()(*SecurityResourceType) + SetOdataType(value *string)() + SetResource(value *string)() + SetResourceType(value *SecurityResourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/security_vendor_information.go b/src/internal/connector/graph/betasdk/models/security_vendor_information.go new file mode 100644 index 000000000..216dd057c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_vendor_information.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityVendorInformation +type SecurityVendorInformation 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 OdataType property + odataType *string + // Specific provider (product/service - not vendor company); for example, WindowsDefenderATP. + provider *string + // Version of the provider or subprovider, if it exists, that generated the alert. Required + providerVersion *string + // Specific subprovider (under aggregating provider); for example, WindowsDefenderATP.SmartScreen. + subProvider *string + // Name of the alert vendor (for example, Microsoft, Dell, FireEye). Required + vendor_escaped *string +} +// NewSecurityVendorInformation instantiates a new securityVendorInformation and sets the default values. +func NewSecurityVendorInformation()(*SecurityVendorInformation) { + m := &SecurityVendorInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSecurityVendorInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSecurityVendorInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSecurityVendorInformation(), 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 *SecurityVendorInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SecurityVendorInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["provider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvider(val) + } + return nil + } + res["providerVersion"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProviderVersion(val) + } + return nil + } + res["subProvider"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSubProvider(val) + } + return nil + } + res["vendor"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetVendor(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SecurityVendorInformation) GetOdataType()(*string) { + return m.odataType +} +// GetProvider gets the provider property value. Specific provider (product/service - not vendor company); for example, WindowsDefenderATP. +func (m *SecurityVendorInformation) GetProvider()(*string) { + return m.provider +} +// GetProviderVersion gets the providerVersion property value. Version of the provider or subprovider, if it exists, that generated the alert. Required +func (m *SecurityVendorInformation) GetProviderVersion()(*string) { + return m.providerVersion +} +// GetSubProvider gets the subProvider property value. Specific subprovider (under aggregating provider); for example, WindowsDefenderATP.SmartScreen. +func (m *SecurityVendorInformation) GetSubProvider()(*string) { + return m.subProvider +} +// GetVendor gets the vendor property value. Name of the alert vendor (for example, Microsoft, Dell, FireEye). Required +func (m *SecurityVendorInformation) GetVendor()(*string) { + return m.vendor_escaped +} +// Serialize serializes information the current object +func (m *SecurityVendorInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("provider", m.GetProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("providerVersion", m.GetProviderVersion()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("subProvider", m.GetSubProvider()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("vendor", m.GetVendor()) + 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 *SecurityVendorInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SecurityVendorInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetProvider sets the provider property value. Specific provider (product/service - not vendor company); for example, WindowsDefenderATP. +func (m *SecurityVendorInformation) SetProvider(value *string)() { + m.provider = value +} +// SetProviderVersion sets the providerVersion property value. Version of the provider or subprovider, if it exists, that generated the alert. Required +func (m *SecurityVendorInformation) SetProviderVersion(value *string)() { + m.providerVersion = value +} +// SetSubProvider sets the subProvider property value. Specific subprovider (under aggregating provider); for example, WindowsDefenderATP.SmartScreen. +func (m *SecurityVendorInformation) SetSubProvider(value *string)() { + m.subProvider = value +} +// SetVendor sets the vendor property value. Name of the alert vendor (for example, Microsoft, Dell, FireEye). Required +func (m *SecurityVendorInformation) SetVendor(value *string)() { + m.vendor_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/security_vendor_informationable.go b/src/internal/connector/graph/betasdk/models/security_vendor_informationable.go new file mode 100644 index 000000000..adf3e1438 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/security_vendor_informationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SecurityVendorInformationable +type SecurityVendorInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetProvider()(*string) + GetProviderVersion()(*string) + GetSubProvider()(*string) + GetVendor()(*string) + SetOdataType(value *string)() + SetProvider(value *string)() + SetProviderVersion(value *string)() + SetSubProvider(value *string)() + SetVendor(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/securityable.go b/src/internal/connector/graph/betasdk/models/securityable.go new file mode 100644 index 000000000..03420ed04 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/securityable.go @@ -0,0 +1,41 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Securityable +type Securityable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAlerts()([]Alertable) + GetAttackSimulation()(AttackSimulationRootable) + GetCloudAppSecurityProfiles()([]CloudAppSecurityProfileable) + GetDomainSecurityProfiles()([]DomainSecurityProfileable) + GetFileSecurityProfiles()([]FileSecurityProfileable) + GetHostSecurityProfiles()([]HostSecurityProfileable) + GetIpSecurityProfiles()([]IpSecurityProfileable) + GetProviderStatus()([]SecurityProviderStatusable) + GetProviderTenantSettings()([]ProviderTenantSettingable) + GetSecureScoreControlProfiles()([]SecureScoreControlProfileable) + GetSecureScores()([]SecureScoreable) + GetSecurityActions()([]SecurityActionable) + GetSubjectRightsRequests()([]SubjectRightsRequestable) + GetTiIndicators()([]TiIndicatorable) + GetUserSecurityProfiles()([]UserSecurityProfileable) + SetAlerts(value []Alertable)() + SetAttackSimulation(value AttackSimulationRootable)() + SetCloudAppSecurityProfiles(value []CloudAppSecurityProfileable)() + SetDomainSecurityProfiles(value []DomainSecurityProfileable)() + SetFileSecurityProfiles(value []FileSecurityProfileable)() + SetHostSecurityProfiles(value []HostSecurityProfileable)() + SetIpSecurityProfiles(value []IpSecurityProfileable)() + SetProviderStatus(value []SecurityProviderStatusable)() + SetProviderTenantSettings(value []ProviderTenantSettingable)() + SetSecureScoreControlProfiles(value []SecureScoreControlProfileable)() + SetSecureScores(value []SecureScoreable)() + SetSecurityActions(value []SecurityActionable)() + SetSubjectRightsRequests(value []SubjectRightsRequestable)() + SetTiIndicators(value []TiIndicatorable)() + SetUserSecurityProfiles(value []UserSecurityProfileable)() +} diff --git a/src/internal/connector/graph/betasdk/models/segment_configuration.go b/src/internal/connector/graph/betasdk/models/segment_configuration.go new file mode 100644 index 000000000..585d060ca --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/segment_configuration.go @@ -0,0 +1,91 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SegmentConfiguration +type SegmentConfiguration 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 OdataType property + odataType *string +} +// NewSegmentConfiguration instantiates a new segmentConfiguration and sets the default values. +func NewSegmentConfiguration()(*SegmentConfiguration) { + m := &SegmentConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSegmentConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSegmentConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.ipSegmentConfiguration": + return NewIpSegmentConfiguration(), nil + case "#microsoft.graph.webSegmentConfiguration": + return NewWebSegmentConfiguration(), nil + } + } + } + } + return NewSegmentConfiguration(), 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 *SegmentConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SegmentConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SegmentConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SegmentConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *SegmentConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SegmentConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/segment_configurationable.go b/src/internal/connector/graph/betasdk/models/segment_configurationable.go new file mode 100644 index 000000000..c2a8add27 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/segment_configurationable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SegmentConfigurationable +type SegmentConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configuration.go b/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configuration.go new file mode 100644 index 000000000..137ebe9d5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configuration.go @@ -0,0 +1,97 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SelfServiceSignUpAuthenticationFlowConfiguration +type SelfServiceSignUpAuthenticationFlowConfiguration 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 whether self-service sign-up flow is enabled or disabled. The default value is false. This property is not a key. Required. + isEnabled *bool + // The OdataType property + odataType *string +} +// NewSelfServiceSignUpAuthenticationFlowConfiguration instantiates a new selfServiceSignUpAuthenticationFlowConfiguration and sets the default values. +func NewSelfServiceSignUpAuthenticationFlowConfiguration()(*SelfServiceSignUpAuthenticationFlowConfiguration) { + m := &SelfServiceSignUpAuthenticationFlowConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSelfServiceSignUpAuthenticationFlowConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSelfServiceSignUpAuthenticationFlowConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSelfServiceSignUpAuthenticationFlowConfiguration(), 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 *SelfServiceSignUpAuthenticationFlowConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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 + } + return res +} +// GetIsEnabled gets the isEnabled property value. Indicates whether self-service sign-up flow is enabled or disabled. The default value is false. This property is not a key. Required. +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *SelfServiceSignUpAuthenticationFlowConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsEnabled sets the isEnabled property value. Indicates whether self-service sign-up flow is enabled or disabled. The default value is false. This property is not a key. Required. +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SelfServiceSignUpAuthenticationFlowConfiguration) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configurationable.go b/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configurationable.go new file mode 100644 index 000000000..64dbc3a31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/self_service_sign_up_authentication_flow_configurationable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SelfServiceSignUpAuthenticationFlowConfigurationable +type SelfServiceSignUpAuthenticationFlowConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsEnabled()(*bool) + GetOdataType()(*string) + SetIsEnabled(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_evidence.go b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence.go new file mode 100644 index 000000000..3b666c600 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentEvidence +type SensitiveContentEvidence 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 length property + length *int32 + // The match property + match *string + // The OdataType property + odataType *string + // The offset property + offset *int32 +} +// NewSensitiveContentEvidence instantiates a new sensitiveContentEvidence and sets the default values. +func NewSensitiveContentEvidence()(*SensitiveContentEvidence) { + m := &SensitiveContentEvidence{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSensitiveContentEvidenceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveContentEvidenceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveContentEvidence(), 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 *SensitiveContentEvidence) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveContentEvidence) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(val) + } + return nil + } + res["match"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetMatch(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + return res +} +// GetLength gets the length property value. The length property +func (m *SensitiveContentEvidence) GetLength()(*int32) { + return m.length +} +// GetMatch gets the match property value. The match property +func (m *SensitiveContentEvidence) GetMatch()(*string) { + return m.match +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SensitiveContentEvidence) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. The offset property +func (m *SensitiveContentEvidence) GetOffset()(*int32) { + return m.offset +} +// Serialize serializes information the current object +func (m *SensitiveContentEvidence) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("match", m.GetMatch()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("offset", m.GetOffset()) + 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 *SensitiveContentEvidence) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetLength sets the length property value. The length property +func (m *SensitiveContentEvidence) SetLength(value *int32)() { + m.length = value +} +// SetMatch sets the match property value. The match property +func (m *SensitiveContentEvidence) SetMatch(value *string)() { + m.match = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SensitiveContentEvidence) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. The offset property +func (m *SensitiveContentEvidence) SetOffset(value *int32)() { + m.offset = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_response.go b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_response.go new file mode 100644 index 000000000..4b7e3ade9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentEvidenceCollectionResponse +type SensitiveContentEvidenceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SensitiveContentEvidenceable +} +// NewSensitiveContentEvidenceCollectionResponse instantiates a new SensitiveContentEvidenceCollectionResponse and sets the default values. +func NewSensitiveContentEvidenceCollectionResponse()(*SensitiveContentEvidenceCollectionResponse) { + m := &SensitiveContentEvidenceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitiveContentEvidenceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveContentEvidenceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveContentEvidenceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveContentEvidenceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveContentEvidenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveContentEvidenceable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveContentEvidenceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitiveContentEvidenceCollectionResponse) GetValue()([]SensitiveContentEvidenceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitiveContentEvidenceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitiveContentEvidenceCollectionResponse) SetValue(value []SensitiveContentEvidenceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_responseable.go new file mode 100644 index 000000000..5d9b8c2cf --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_evidence_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentEvidenceCollectionResponseable +type SensitiveContentEvidenceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitiveContentEvidenceable) + SetValue(value []SensitiveContentEvidenceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_evidenceable.go b/src/internal/connector/graph/betasdk/models/sensitive_content_evidenceable.go new file mode 100644 index 000000000..4179f6116 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_evidenceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentEvidenceable +type SensitiveContentEvidenceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLength()(*int32) + GetMatch()(*string) + GetOdataType()(*string) + GetOffset()(*int32) + SetLength(value *int32)() + SetMatch(value *string)() + SetOdataType(value *string)() + SetOffset(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_location.go b/src/internal/connector/graph/betasdk/models/sensitive_content_location.go new file mode 100644 index 000000000..4ad28fad1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_location.go @@ -0,0 +1,209 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentLocation +type SensitiveContentLocation 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 confidence property + confidence *int32 + // The evidences property + evidences []SensitiveContentEvidenceable + // The idMatch property + idMatch *string + // The length property + length *int32 + // The OdataType property + odataType *string + // The offset property + offset *int32 +} +// NewSensitiveContentLocation instantiates a new sensitiveContentLocation and sets the default values. +func NewSensitiveContentLocation()(*SensitiveContentLocation) { + m := &SensitiveContentLocation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSensitiveContentLocationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveContentLocationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveContentLocation(), 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 *SensitiveContentLocation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetConfidence gets the confidence property value. The confidence property +func (m *SensitiveContentLocation) GetConfidence()(*int32) { + return m.confidence +} +// GetEvidences gets the evidences property value. The evidences property +func (m *SensitiveContentLocation) GetEvidences()([]SensitiveContentEvidenceable) { + return m.evidences +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveContentLocation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["confidence"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConfidence(val) + } + return nil + } + res["evidences"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveContentEvidenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveContentEvidenceable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveContentEvidenceable) + } + m.SetEvidences(res) + } + return nil + } + res["idMatch"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIdMatch(val) + } + return nil + } + res["length"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetLength(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["offset"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetOffset(val) + } + return nil + } + return res +} +// GetIdMatch gets the idMatch property value. The idMatch property +func (m *SensitiveContentLocation) GetIdMatch()(*string) { + return m.idMatch +} +// GetLength gets the length property value. The length property +func (m *SensitiveContentLocation) GetLength()(*int32) { + return m.length +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SensitiveContentLocation) GetOdataType()(*string) { + return m.odataType +} +// GetOffset gets the offset property value. The offset property +func (m *SensitiveContentLocation) GetOffset()(*int32) { + return m.offset +} +// Serialize serializes information the current object +func (m *SensitiveContentLocation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt32Value("confidence", m.GetConfidence()) + if err != nil { + return err + } + } + if m.GetEvidences() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEvidences())) + for i, v := range m.GetEvidences() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("evidences", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("idMatch", m.GetIdMatch()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("length", m.GetLength()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("offset", m.GetOffset()) + 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 *SensitiveContentLocation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetConfidence sets the confidence property value. The confidence property +func (m *SensitiveContentLocation) SetConfidence(value *int32)() { + m.confidence = value +} +// SetEvidences sets the evidences property value. The evidences property +func (m *SensitiveContentLocation) SetEvidences(value []SensitiveContentEvidenceable)() { + m.evidences = value +} +// SetIdMatch sets the idMatch property value. The idMatch property +func (m *SensitiveContentLocation) SetIdMatch(value *string)() { + m.idMatch = value +} +// SetLength sets the length property value. The length property +func (m *SensitiveContentLocation) SetLength(value *int32)() { + m.length = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SensitiveContentLocation) SetOdataType(value *string)() { + m.odataType = value +} +// SetOffset sets the offset property value. The offset property +func (m *SensitiveContentLocation) SetOffset(value *int32)() { + m.offset = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_response.go b/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_response.go new file mode 100644 index 000000000..c71464f11 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentLocationCollectionResponse +type SensitiveContentLocationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SensitiveContentLocationable +} +// NewSensitiveContentLocationCollectionResponse instantiates a new SensitiveContentLocationCollectionResponse and sets the default values. +func NewSensitiveContentLocationCollectionResponse()(*SensitiveContentLocationCollectionResponse) { + m := &SensitiveContentLocationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitiveContentLocationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveContentLocationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveContentLocationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveContentLocationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveContentLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveContentLocationable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveContentLocationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitiveContentLocationCollectionResponse) GetValue()([]SensitiveContentLocationable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitiveContentLocationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitiveContentLocationCollectionResponse) SetValue(value []SensitiveContentLocationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_responseable.go new file mode 100644 index 000000000..33efaeff0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_location_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentLocationCollectionResponseable +type SensitiveContentLocationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitiveContentLocationable) + SetValue(value []SensitiveContentLocationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_content_locationable.go b/src/internal/connector/graph/betasdk/models/sensitive_content_locationable.go new file mode 100644 index 000000000..a48b48a63 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_content_locationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveContentLocationable +type SensitiveContentLocationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetConfidence()(*int32) + GetEvidences()([]SensitiveContentEvidenceable) + GetIdMatch()(*string) + GetLength()(*int32) + GetOdataType()(*string) + GetOffset()(*int32) + SetConfidence(value *int32)() + SetEvidences(value []SensitiveContentEvidenceable)() + SetIdMatch(value *string)() + SetLength(value *int32)() + SetOdataType(value *string)() + SetOffset(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_type.go b/src/internal/connector/graph/betasdk/models/sensitive_type.go new file mode 100644 index 000000000..1fe357fa5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_type.go @@ -0,0 +1,271 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveType provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitiveType struct { + Entity + // The classificationMethod property + classificationMethod *ClassificationMethod + // The description property + description *string + // The name property + name *string + // The publisherName property + publisherName *string + // The rulePackageId property + rulePackageId *string + // The rulePackageType property + rulePackageType *string + // The scope property + scope *SensitiveTypeScope + // The sensitiveTypeSource property + sensitiveTypeSource *SensitiveTypeSource + // The state property + state *string +} +// NewSensitiveType instantiates a new sensitiveType and sets the default values. +func NewSensitiveType()(*SensitiveType) { + m := &SensitiveType{ + Entity: *NewEntity(), + } + return m +} +// CreateSensitiveTypeFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveTypeFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveType(), nil +} +// GetClassificationMethod gets the classificationMethod property value. The classificationMethod property +func (m *SensitiveType) GetClassificationMethod()(*ClassificationMethod) { + return m.classificationMethod +} +// GetDescription gets the description property value. The description property +func (m *SensitiveType) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveType) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["classificationMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseClassificationMethod) + if err != nil { + return err + } + if val != nil { + m.SetClassificationMethod(val.(*ClassificationMethod)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["publisherName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisherName(val) + } + return nil + } + res["rulePackageId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRulePackageId(val) + } + return nil + } + res["rulePackageType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRulePackageType(val) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitiveTypeScope) + if err != nil { + return err + } + if val != nil { + m.SetScope(val.(*SensitiveTypeScope)) + } + return nil + } + res["sensitiveTypeSource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitiveTypeSource) + if err != nil { + return err + } + if val != nil { + m.SetSensitiveTypeSource(val.(*SensitiveTypeSource)) + } + return nil + } + res["state"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetState(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name property +func (m *SensitiveType) GetName()(*string) { + return m.name +} +// GetPublisherName gets the publisherName property value. The publisherName property +func (m *SensitiveType) GetPublisherName()(*string) { + return m.publisherName +} +// GetRulePackageId gets the rulePackageId property value. The rulePackageId property +func (m *SensitiveType) GetRulePackageId()(*string) { + return m.rulePackageId +} +// GetRulePackageType gets the rulePackageType property value. The rulePackageType property +func (m *SensitiveType) GetRulePackageType()(*string) { + return m.rulePackageType +} +// GetScope gets the scope property value. The scope property +func (m *SensitiveType) GetScope()(*SensitiveTypeScope) { + return m.scope +} +// GetSensitiveTypeSource gets the sensitiveTypeSource property value. The sensitiveTypeSource property +func (m *SensitiveType) GetSensitiveTypeSource()(*SensitiveTypeSource) { + return m.sensitiveTypeSource +} +// GetState gets the state property value. The state property +func (m *SensitiveType) GetState()(*string) { + return m.state +} +// Serialize serializes information the current object +func (m *SensitiveType) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetClassificationMethod() != nil { + cast := (*m.GetClassificationMethod()).String() + err = writer.WriteStringValue("classificationMethod", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisherName", m.GetPublisherName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rulePackageId", m.GetRulePackageId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("rulePackageType", m.GetRulePackageType()) + if err != nil { + return err + } + } + if m.GetScope() != nil { + cast := (*m.GetScope()).String() + err = writer.WriteStringValue("scope", &cast) + if err != nil { + return err + } + } + if m.GetSensitiveTypeSource() != nil { + cast := (*m.GetSensitiveTypeSource()).String() + err = writer.WriteStringValue("sensitiveTypeSource", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("state", m.GetState()) + if err != nil { + return err + } + } + return nil +} +// SetClassificationMethod sets the classificationMethod property value. The classificationMethod property +func (m *SensitiveType) SetClassificationMethod(value *ClassificationMethod)() { + m.classificationMethod = value +} +// SetDescription sets the description property value. The description property +func (m *SensitiveType) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. The name property +func (m *SensitiveType) SetName(value *string)() { + m.name = value +} +// SetPublisherName sets the publisherName property value. The publisherName property +func (m *SensitiveType) SetPublisherName(value *string)() { + m.publisherName = value +} +// SetRulePackageId sets the rulePackageId property value. The rulePackageId property +func (m *SensitiveType) SetRulePackageId(value *string)() { + m.rulePackageId = value +} +// SetRulePackageType sets the rulePackageType property value. The rulePackageType property +func (m *SensitiveType) SetRulePackageType(value *string)() { + m.rulePackageType = value +} +// SetScope sets the scope property value. The scope property +func (m *SensitiveType) SetScope(value *SensitiveTypeScope)() { + m.scope = value +} +// SetSensitiveTypeSource sets the sensitiveTypeSource property value. The sensitiveTypeSource property +func (m *SensitiveType) SetSensitiveTypeSource(value *SensitiveTypeSource)() { + m.sensitiveTypeSource = value +} +// SetState sets the state property value. The state property +func (m *SensitiveType) SetState(value *string)() { + m.state = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_type_collection_response.go b/src/internal/connector/graph/betasdk/models/sensitive_type_collection_response.go new file mode 100644 index 000000000..9972eb069 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_type_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveTypeCollectionResponse +type SensitiveTypeCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SensitiveTypeable +} +// NewSensitiveTypeCollectionResponse instantiates a new SensitiveTypeCollectionResponse and sets the default values. +func NewSensitiveTypeCollectionResponse()(*SensitiveTypeCollectionResponse) { + m := &SensitiveTypeCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitiveTypeCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitiveTypeCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitiveTypeCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitiveTypeCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitiveTypeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitiveTypeable, len(val)) + for i, v := range val { + res[i] = v.(SensitiveTypeable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitiveTypeCollectionResponse) GetValue()([]SensitiveTypeable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitiveTypeCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitiveTypeCollectionResponse) SetValue(value []SensitiveTypeable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_type_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sensitive_type_collection_responseable.go new file mode 100644 index 000000000..20b9991b1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_type_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveTypeCollectionResponseable +type SensitiveTypeCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitiveTypeable) + SetValue(value []SensitiveTypeable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitive_type_scope.go b/src/internal/connector/graph/betasdk/models/sensitive_type_scope.go new file mode 100644 index 000000000..2b2fb5a74 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_type_scope.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitiveTypeScope int + +const ( + FULLDOCUMENT_SENSITIVETYPESCOPE SensitiveTypeScope = iota + PARTIALDOCUMENT_SENSITIVETYPESCOPE +) + +func (i SensitiveTypeScope) String() string { + return []string{"fullDocument", "partialDocument"}[i] +} +func ParseSensitiveTypeScope(v string) (interface{}, error) { + result := FULLDOCUMENT_SENSITIVETYPESCOPE + switch v { + case "fullDocument": + result = FULLDOCUMENT_SENSITIVETYPESCOPE + case "partialDocument": + result = PARTIALDOCUMENT_SENSITIVETYPESCOPE + default: + return 0, errors.New("Unknown SensitiveTypeScope value: " + v) + } + return &result, nil +} +func SerializeSensitiveTypeScope(values []SensitiveTypeScope) []string { + 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/sensitive_type_source.go b/src/internal/connector/graph/betasdk/models/sensitive_type_source.go new file mode 100644 index 000000000..cb9888271 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_type_source.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitiveTypeSource int + +const ( + OUTOFBOX_SENSITIVETYPESOURCE SensitiveTypeSource = iota + TENANT_SENSITIVETYPESOURCE +) + +func (i SensitiveTypeSource) String() string { + return []string{"outOfBox", "tenant"}[i] +} +func ParseSensitiveTypeSource(v string) (interface{}, error) { + result := OUTOFBOX_SENSITIVETYPESOURCE + switch v { + case "outOfBox": + result = OUTOFBOX_SENSITIVETYPESOURCE + case "tenant": + result = TENANT_SENSITIVETYPESOURCE + default: + return 0, errors.New("Unknown SensitiveTypeSource value: " + v) + } + return &result, nil +} +func SerializeSensitiveTypeSource(values []SensitiveTypeSource) []string { + 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/sensitive_typeable.go b/src/internal/connector/graph/betasdk/models/sensitive_typeable.go new file mode 100644 index 000000000..d886c57dd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitive_typeable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitiveTypeable +type SensitiveTypeable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetClassificationMethod()(*ClassificationMethod) + GetDescription()(*string) + GetName()(*string) + GetPublisherName()(*string) + GetRulePackageId()(*string) + GetRulePackageType()(*string) + GetScope()(*SensitiveTypeScope) + GetSensitiveTypeSource()(*SensitiveTypeSource) + GetState()(*string) + SetClassificationMethod(value *ClassificationMethod)() + SetDescription(value *string)() + SetName(value *string)() + SetPublisherName(value *string)() + SetRulePackageId(value *string)() + SetRulePackageType(value *string)() + SetScope(value *SensitiveTypeScope)() + SetSensitiveTypeSource(value *SensitiveTypeSource)() + SetState(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity.go b/src/internal/connector/graph/betasdk/models/sensitivity.go new file mode 100644 index 000000000..17298e909 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type Sensitivity int + +const ( + NORMAL_SENSITIVITY Sensitivity = iota + PERSONAL_SENSITIVITY + PRIVATE_SENSITIVITY + CONFIDENTIAL_SENSITIVITY +) + +func (i Sensitivity) String() string { + return []string{"normal", "personal", "private", "confidential"}[i] +} +func ParseSensitivity(v string) (interface{}, error) { + result := NORMAL_SENSITIVITY + switch v { + case "normal": + result = NORMAL_SENSITIVITY + case "personal": + result = PERSONAL_SENSITIVITY + case "private": + result = PRIVATE_SENSITIVITY + case "confidential": + result = CONFIDENTIAL_SENSITIVITY + default: + return 0, errors.New("Unknown Sensitivity value: " + v) + } + return &result, nil +} +func SerializeSensitivity(values []Sensitivity) []string { + 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/sensitivity_label.go b/src/internal/connector/graph/betasdk/models/sensitivity_label.go new file mode 100644 index 000000000..a06c96aee --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label.go @@ -0,0 +1,398 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabel provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitivityLabel struct { + Entity + // The applicableTo property + applicableTo *SensitivityLabelTarget + // The applicationMode property + applicationMode *ApplicationMode + // The assignedPolicies property + assignedPolicies []LabelPolicyable + // The autoLabeling property + autoLabeling AutoLabelingable + // The description property + description *string + // The displayName property + displayName *string + // The isDefault property + isDefault *bool + // The isEndpointProtectionEnabled property + isEndpointProtectionEnabled *bool + // The labelActions property + labelActions []LabelActionBaseable + // The name property + name *string + // The priority property + priority *int32 + // The sublabels property + sublabels []SensitivityLabelable + // The toolTip property + toolTip *string +} +// NewSensitivityLabel instantiates a new sensitivityLabel and sets the default values. +func NewSensitivityLabel()(*SensitivityLabel) { + m := &SensitivityLabel{ + Entity: *NewEntity(), + } + return m +} +// CreateSensitivityLabelFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabel(), nil +} +// GetApplicableTo gets the applicableTo property value. The applicableTo property +func (m *SensitivityLabel) GetApplicableTo()(*SensitivityLabelTarget) { + return m.applicableTo +} +// GetApplicationMode gets the applicationMode property value. The applicationMode property +func (m *SensitivityLabel) GetApplicationMode()(*ApplicationMode) { + return m.applicationMode +} +// GetAssignedPolicies gets the assignedPolicies property value. The assignedPolicies property +func (m *SensitivityLabel) GetAssignedPolicies()([]LabelPolicyable) { + return m.assignedPolicies +} +// GetAutoLabeling gets the autoLabeling property value. The autoLabeling property +func (m *SensitivityLabel) GetAutoLabeling()(AutoLabelingable) { + return m.autoLabeling +} +// GetDescription gets the description property value. The description property +func (m *SensitivityLabel) GetDescription()(*string) { + return m.description +} +// GetDisplayName gets the displayName property value. The displayName property +func (m *SensitivityLabel) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabel) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applicableTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivityLabelTarget) + if err != nil { + return err + } + if val != nil { + m.SetApplicableTo(val.(*SensitivityLabelTarget)) + } + return nil + } + res["applicationMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseApplicationMode) + if err != nil { + return err + } + if val != nil { + m.SetApplicationMode(val.(*ApplicationMode)) + } + return nil + } + res["assignedPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LabelPolicyable, len(val)) + for i, v := range val { + res[i] = v.(LabelPolicyable) + } + m.SetAssignedPolicies(res) + } + return nil + } + res["autoLabeling"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateAutoLabelingFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAutoLabeling(val.(AutoLabelingable)) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["isDefault"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsDefault(val) + } + return nil + } + res["isEndpointProtectionEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEndpointProtectionEnabled(val) + } + return nil + } + res["labelActions"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLabelActionBaseFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LabelActionBaseable, len(val)) + for i, v := range val { + res[i] = v.(LabelActionBaseable) + } + m.SetLabelActions(res) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["priority"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetPriority(val) + } + return nil + } + res["sublabels"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetSublabels(res) + } + return nil + } + res["toolTip"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetToolTip(val) + } + return nil + } + return res +} +// GetIsDefault gets the isDefault property value. The isDefault property +func (m *SensitivityLabel) GetIsDefault()(*bool) { + return m.isDefault +} +// GetIsEndpointProtectionEnabled gets the isEndpointProtectionEnabled property value. The isEndpointProtectionEnabled property +func (m *SensitivityLabel) GetIsEndpointProtectionEnabled()(*bool) { + return m.isEndpointProtectionEnabled +} +// GetLabelActions gets the labelActions property value. The labelActions property +func (m *SensitivityLabel) GetLabelActions()([]LabelActionBaseable) { + return m.labelActions +} +// GetName gets the name property value. The name property +func (m *SensitivityLabel) GetName()(*string) { + return m.name +} +// GetPriority gets the priority property value. The priority property +func (m *SensitivityLabel) GetPriority()(*int32) { + return m.priority +} +// GetSublabels gets the sublabels property value. The sublabels property +func (m *SensitivityLabel) GetSublabels()([]SensitivityLabelable) { + return m.sublabels +} +// GetToolTip gets the toolTip property value. The toolTip property +func (m *SensitivityLabel) GetToolTip()(*string) { + return m.toolTip +} +// Serialize serializes information the current object +func (m *SensitivityLabel) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicableTo() != nil { + cast := (*m.GetApplicableTo()).String() + err = writer.WriteStringValue("applicableTo", &cast) + if err != nil { + return err + } + } + if m.GetApplicationMode() != nil { + cast := (*m.GetApplicationMode()).String() + err = writer.WriteStringValue("applicationMode", &cast) + if err != nil { + return err + } + } + if m.GetAssignedPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAssignedPolicies())) + for i, v := range m.GetAssignedPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("assignedPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("autoLabeling", m.GetAutoLabeling()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isDefault", m.GetIsDefault()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isEndpointProtectionEnabled", m.GetIsEndpointProtectionEnabled()) + if err != nil { + return err + } + } + if m.GetLabelActions() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLabelActions())) + for i, v := range m.GetLabelActions() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("labelActions", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("priority", m.GetPriority()) + if err != nil { + return err + } + } + if m.GetSublabels() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSublabels())) + for i, v := range m.GetSublabels() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sublabels", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("toolTip", m.GetToolTip()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableTo sets the applicableTo property value. The applicableTo property +func (m *SensitivityLabel) SetApplicableTo(value *SensitivityLabelTarget)() { + m.applicableTo = value +} +// SetApplicationMode sets the applicationMode property value. The applicationMode property +func (m *SensitivityLabel) SetApplicationMode(value *ApplicationMode)() { + m.applicationMode = value +} +// SetAssignedPolicies sets the assignedPolicies property value. The assignedPolicies property +func (m *SensitivityLabel) SetAssignedPolicies(value []LabelPolicyable)() { + m.assignedPolicies = value +} +// SetAutoLabeling sets the autoLabeling property value. The autoLabeling property +func (m *SensitivityLabel) SetAutoLabeling(value AutoLabelingable)() { + m.autoLabeling = value +} +// SetDescription sets the description property value. The description property +func (m *SensitivityLabel) SetDescription(value *string)() { + m.description = value +} +// SetDisplayName sets the displayName property value. The displayName property +func (m *SensitivityLabel) SetDisplayName(value *string)() { + m.displayName = value +} +// SetIsDefault sets the isDefault property value. The isDefault property +func (m *SensitivityLabel) SetIsDefault(value *bool)() { + m.isDefault = value +} +// SetIsEndpointProtectionEnabled sets the isEndpointProtectionEnabled property value. The isEndpointProtectionEnabled property +func (m *SensitivityLabel) SetIsEndpointProtectionEnabled(value *bool)() { + m.isEndpointProtectionEnabled = value +} +// SetLabelActions sets the labelActions property value. The labelActions property +func (m *SensitivityLabel) SetLabelActions(value []LabelActionBaseable)() { + m.labelActions = value +} +// SetName sets the name property value. The name property +func (m *SensitivityLabel) SetName(value *string)() { + m.name = value +} +// SetPriority sets the priority property value. The priority property +func (m *SensitivityLabel) SetPriority(value *int32)() { + m.priority = value +} +// SetSublabels sets the sublabels property value. The sublabels property +func (m *SensitivityLabel) SetSublabels(value []SensitivityLabelable)() { + m.sublabels = value +} +// SetToolTip sets the toolTip property value. The toolTip property +func (m *SensitivityLabel) SetToolTip(value *string)() { + m.toolTip = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment.go new file mode 100644 index 000000000..523f4f326 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelAssignment +type SensitivityLabelAssignment 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 assignmentMethod property + assignmentMethod *SensitivityLabelAssignmentMethod + // The OdataType property + odataType *string + // The unique identifier for the sensitivity label assigned to the file. + sensitivityLabelId *string + // The unique identifier for the tenant that hosts the file when this label is applied. + tenantId *string +} +// NewSensitivityLabelAssignment instantiates a new sensitivityLabelAssignment and sets the default values. +func NewSensitivityLabelAssignment()(*SensitivityLabelAssignment) { + m := &SensitivityLabelAssignment{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSensitivityLabelAssignmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelAssignmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabelAssignment(), 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 *SensitivityLabelAssignment) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAssignmentMethod gets the assignmentMethod property value. The assignmentMethod property +func (m *SensitivityLabelAssignment) GetAssignmentMethod()(*SensitivityLabelAssignmentMethod) { + return m.assignmentMethod +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabelAssignment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["assignmentMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivityLabelAssignmentMethod) + if err != nil { + return err + } + if val != nil { + m.SetAssignmentMethod(val.(*SensitivityLabelAssignmentMethod)) + } + 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["sensitivityLabelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSensitivityLabelId(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SensitivityLabelAssignment) GetOdataType()(*string) { + return m.odataType +} +// GetSensitivityLabelId gets the sensitivityLabelId property value. The unique identifier for the sensitivity label assigned to the file. +func (m *SensitivityLabelAssignment) GetSensitivityLabelId()(*string) { + return m.sensitivityLabelId +} +// GetTenantId gets the tenantId property value. The unique identifier for the tenant that hosts the file when this label is applied. +func (m *SensitivityLabelAssignment) GetTenantId()(*string) { + return m.tenantId +} +// Serialize serializes information the current object +func (m *SensitivityLabelAssignment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAssignmentMethod() != nil { + cast := (*m.GetAssignmentMethod()).String() + err := writer.WriteStringValue("assignmentMethod", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sensitivityLabelId", m.GetSensitivityLabelId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + 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 *SensitivityLabelAssignment) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAssignmentMethod sets the assignmentMethod property value. The assignmentMethod property +func (m *SensitivityLabelAssignment) SetAssignmentMethod(value *SensitivityLabelAssignmentMethod)() { + m.assignmentMethod = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SensitivityLabelAssignment) SetOdataType(value *string)() { + m.odataType = value +} +// SetSensitivityLabelId sets the sensitivityLabelId property value. The unique identifier for the sensitivity label assigned to the file. +func (m *SensitivityLabelAssignment) SetSensitivityLabelId(value *string)() { + m.sensitivityLabelId = value +} +// SetTenantId sets the tenantId property value. The unique identifier for the tenant that hosts the file when this label is applied. +func (m *SensitivityLabelAssignment) SetTenantId(value *string)() { + m.tenantId = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_response.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_response.go new file mode 100644 index 000000000..e1bb44fae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelAssignmentCollectionResponse +type SensitivityLabelAssignmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SensitivityLabelAssignmentable +} +// NewSensitivityLabelAssignmentCollectionResponse instantiates a new SensitivityLabelAssignmentCollectionResponse and sets the default values. +func NewSensitivityLabelAssignmentCollectionResponse()(*SensitivityLabelAssignmentCollectionResponse) { + m := &SensitivityLabelAssignmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitivityLabelAssignmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelAssignmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabelAssignmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabelAssignmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelAssignmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitivityLabelAssignmentCollectionResponse) GetValue()([]SensitivityLabelAssignmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitivityLabelAssignmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitivityLabelAssignmentCollectionResponse) SetValue(value []SensitivityLabelAssignmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_responseable.go new file mode 100644 index 000000000..f9f2ada8d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelAssignmentCollectionResponseable +type SensitivityLabelAssignmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitivityLabelAssignmentable) + SetValue(value []SensitivityLabelAssignmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_method.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_method.go new file mode 100644 index 000000000..5ac0f77e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignment_method.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the columns property of the microsoft.graph.site entity. +type SensitivityLabelAssignmentMethod int + +const ( + STANDARD_SENSITIVITYLABELASSIGNMENTMETHOD SensitivityLabelAssignmentMethod = iota + PRIVILEGED_SENSITIVITYLABELASSIGNMENTMETHOD + AUTO_SENSITIVITYLABELASSIGNMENTMETHOD + UNKNOWNFUTUREVALUE_SENSITIVITYLABELASSIGNMENTMETHOD +) + +func (i SensitivityLabelAssignmentMethod) String() string { + return []string{"standard", "privileged", "auto", "unknownFutureValue"}[i] +} +func ParseSensitivityLabelAssignmentMethod(v string) (interface{}, error) { + result := STANDARD_SENSITIVITYLABELASSIGNMENTMETHOD + switch v { + case "standard": + result = STANDARD_SENSITIVITYLABELASSIGNMENTMETHOD + case "privileged": + result = PRIVILEGED_SENSITIVITYLABELASSIGNMENTMETHOD + case "auto": + result = AUTO_SENSITIVITYLABELASSIGNMENTMETHOD + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SENSITIVITYLABELASSIGNMENTMETHOD + default: + return 0, errors.New("Unknown SensitivityLabelAssignmentMethod value: " + v) + } + return &result, nil +} +func SerializeSensitivityLabelAssignmentMethod(values []SensitivityLabelAssignmentMethod) []string { + 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/sensitivity_label_assignmentable.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignmentable.go new file mode 100644 index 000000000..c9656e74d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_assignmentable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelAssignmentable +type SensitivityLabelAssignmentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAssignmentMethod()(*SensitivityLabelAssignmentMethod) + GetOdataType()(*string) + GetSensitivityLabelId()(*string) + GetTenantId()(*string) + SetAssignmentMethod(value *SensitivityLabelAssignmentMethod)() + SetOdataType(value *string)() + SetSensitivityLabelId(value *string)() + SetTenantId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_response.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_response.go new file mode 100644 index 000000000..2d5603c84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelCollectionResponse +type SensitivityLabelCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SensitivityLabelable +} +// NewSensitivityLabelCollectionResponse instantiates a new SensitivityLabelCollectionResponse and sets the default values. +func NewSensitivityLabelCollectionResponse()(*SensitivityLabelCollectionResponse) { + m := &SensitivityLabelCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSensitivityLabelCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityLabelCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityLabelCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityLabelCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSensitivityLabelFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SensitivityLabelable, len(val)) + for i, v := range val { + res[i] = v.(SensitivityLabelable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SensitivityLabelCollectionResponse) GetValue()([]SensitivityLabelable) { + return m.value +} +// Serialize serializes information the current object +func (m *SensitivityLabelCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SensitivityLabelCollectionResponse) SetValue(value []SensitivityLabelable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_responseable.go new file mode 100644 index 000000000..e84cf87b3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelCollectionResponseable +type SensitivityLabelCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SensitivityLabelable) + SetValue(value []SensitivityLabelable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_label_target.go b/src/internal/connector/graph/betasdk/models/sensitivity_label_target.go new file mode 100644 index 000000000..57bf9f4e6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_label_target.go @@ -0,0 +1,43 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SensitivityLabelTarget int + +const ( + EMAIL_SENSITIVITYLABELTARGET SensitivityLabelTarget = iota + SITE_SENSITIVITYLABELTARGET + UNIFIEDGROUP_SENSITIVITYLABELTARGET + UNKNOWNFUTUREVALUE_SENSITIVITYLABELTARGET + TEAMWORK_SENSITIVITYLABELTARGET +) + +func (i SensitivityLabelTarget) String() string { + return []string{"email", "site", "unifiedGroup", "unknownFutureValue", "teamwork"}[i] +} +func ParseSensitivityLabelTarget(v string) (interface{}, error) { + result := EMAIL_SENSITIVITYLABELTARGET + switch v { + case "email": + result = EMAIL_SENSITIVITYLABELTARGET + case "site": + result = SITE_SENSITIVITYLABELTARGET + case "unifiedGroup": + result = UNIFIEDGROUP_SENSITIVITYLABELTARGET + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SENSITIVITYLABELTARGET + case "teamwork": + result = TEAMWORK_SENSITIVITYLABELTARGET + default: + return 0, errors.New("Unknown SensitivityLabelTarget value: " + v) + } + return &result, nil +} +func SerializeSensitivityLabelTarget(values []SensitivityLabelTarget) []string { + 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/sensitivity_labelable.go b/src/internal/connector/graph/betasdk/models/sensitivity_labelable.go new file mode 100644 index 000000000..15c0cb61e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_labelable.go @@ -0,0 +1,37 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityLabelable +type SensitivityLabelable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableTo()(*SensitivityLabelTarget) + GetApplicationMode()(*ApplicationMode) + GetAssignedPolicies()([]LabelPolicyable) + GetAutoLabeling()(AutoLabelingable) + GetDescription()(*string) + GetDisplayName()(*string) + GetIsDefault()(*bool) + GetIsEndpointProtectionEnabled()(*bool) + GetLabelActions()([]LabelActionBaseable) + GetName()(*string) + GetPriority()(*int32) + GetSublabels()([]SensitivityLabelable) + GetToolTip()(*string) + SetApplicableTo(value *SensitivityLabelTarget)() + SetApplicationMode(value *ApplicationMode)() + SetAssignedPolicies(value []LabelPolicyable)() + SetAutoLabeling(value AutoLabelingable)() + SetDescription(value *string)() + SetDisplayName(value *string)() + SetIsDefault(value *bool)() + SetIsEndpointProtectionEnabled(value *bool)() + SetLabelActions(value []LabelActionBaseable)() + SetName(value *string)() + SetPriority(value *int32)() + SetSublabels(value []SensitivityLabelable)() + SetToolTip(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_policy_settings.go b/src/internal/connector/graph/betasdk/models/sensitivity_policy_settings.go new file mode 100644 index 000000000..1e22d5295 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_policy_settings.go @@ -0,0 +1,139 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityPolicySettings +type SensitivityPolicySettings struct { + Entity + // The applicableTo property + applicableTo *SensitivityLabelTarget + // The downgradeSensitivityRequiresJustification property + downgradeSensitivityRequiresJustification *bool + // The helpWebUrl property + helpWebUrl *string + // The isMandatory property + isMandatory *bool +} +// NewSensitivityPolicySettings instantiates a new sensitivityPolicySettings and sets the default values. +func NewSensitivityPolicySettings()(*SensitivityPolicySettings) { + m := &SensitivityPolicySettings{ + Entity: *NewEntity(), + } + return m +} +// CreateSensitivityPolicySettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSensitivityPolicySettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSensitivityPolicySettings(), nil +} +// GetApplicableTo gets the applicableTo property value. The applicableTo property +func (m *SensitivityPolicySettings) GetApplicableTo()(*SensitivityLabelTarget) { + return m.applicableTo +} +// GetDowngradeSensitivityRequiresJustification gets the downgradeSensitivityRequiresJustification property value. The downgradeSensitivityRequiresJustification property +func (m *SensitivityPolicySettings) GetDowngradeSensitivityRequiresJustification()(*bool) { + return m.downgradeSensitivityRequiresJustification +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SensitivityPolicySettings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applicableTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSensitivityLabelTarget) + if err != nil { + return err + } + if val != nil { + m.SetApplicableTo(val.(*SensitivityLabelTarget)) + } + return nil + } + res["downgradeSensitivityRequiresJustification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDowngradeSensitivityRequiresJustification(val) + } + return nil + } + res["helpWebUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHelpWebUrl(val) + } + return nil + } + res["isMandatory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMandatory(val) + } + return nil + } + return res +} +// GetHelpWebUrl gets the helpWebUrl property value. The helpWebUrl property +func (m *SensitivityPolicySettings) GetHelpWebUrl()(*string) { + return m.helpWebUrl +} +// GetIsMandatory gets the isMandatory property value. The isMandatory property +func (m *SensitivityPolicySettings) GetIsMandatory()(*bool) { + return m.isMandatory +} +// Serialize serializes information the current object +func (m *SensitivityPolicySettings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicableTo() != nil { + cast := (*m.GetApplicableTo()).String() + err = writer.WriteStringValue("applicableTo", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("downgradeSensitivityRequiresJustification", m.GetDowngradeSensitivityRequiresJustification()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("helpWebUrl", m.GetHelpWebUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMandatory", m.GetIsMandatory()) + if err != nil { + return err + } + } + return nil +} +// SetApplicableTo sets the applicableTo property value. The applicableTo property +func (m *SensitivityPolicySettings) SetApplicableTo(value *SensitivityLabelTarget)() { + m.applicableTo = value +} +// SetDowngradeSensitivityRequiresJustification sets the downgradeSensitivityRequiresJustification property value. The downgradeSensitivityRequiresJustification property +func (m *SensitivityPolicySettings) SetDowngradeSensitivityRequiresJustification(value *bool)() { + m.downgradeSensitivityRequiresJustification = value +} +// SetHelpWebUrl sets the helpWebUrl property value. The helpWebUrl property +func (m *SensitivityPolicySettings) SetHelpWebUrl(value *string)() { + m.helpWebUrl = value +} +// SetIsMandatory sets the isMandatory property value. The isMandatory property +func (m *SensitivityPolicySettings) SetIsMandatory(value *bool)() { + m.isMandatory = value +} diff --git a/src/internal/connector/graph/betasdk/models/sensitivity_policy_settingsable.go b/src/internal/connector/graph/betasdk/models/sensitivity_policy_settingsable.go new file mode 100644 index 000000000..c2646007b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sensitivity_policy_settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SensitivityPolicySettingsable +type SensitivityPolicySettingsable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicableTo()(*SensitivityLabelTarget) + GetDowngradeSensitivityRequiresJustification()(*bool) + GetHelpWebUrl()(*string) + GetIsMandatory()(*bool) + SetApplicableTo(value *SensitivityLabelTarget)() + SetDowngradeSensitivityRequiresJustification(value *bool)() + SetHelpWebUrl(value *string)() + SetIsMandatory(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/server_processed_content.go b/src/internal/connector/graph/betasdk/models/server_processed_content.go new file mode 100644 index 000000000..0dfdb49d3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/server_processed_content.go @@ -0,0 +1,275 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServerProcessedContent +type ServerProcessedContent struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost. + componentDependencies []MetaDataKeyStringPairable + // A key-value map where keys are string identifier and values are object of custom key-value pair. + customMetadata []MetaDataKeyValuePairable + // A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them. + htmlStrings []MetaDataKeyStringPairable + // A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them. + imageSources []MetaDataKeyStringPairable + // A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them. + links []MetaDataKeyStringPairable + // The OdataType property + odataType *string + // A key-value map where keys are string identifiers and values are strings that should be search indexed. + searchablePlainTexts []MetaDataKeyStringPairable +} +// NewServerProcessedContent instantiates a new serverProcessedContent and sets the default values. +func NewServerProcessedContent()(*ServerProcessedContent) { + m := &ServerProcessedContent{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServerProcessedContentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServerProcessedContentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServerProcessedContent(), 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 *ServerProcessedContent) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetComponentDependencies gets the componentDependencies property value. A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost. +func (m *ServerProcessedContent) GetComponentDependencies()([]MetaDataKeyStringPairable) { + return m.componentDependencies +} +// GetCustomMetadata gets the customMetadata property value. A key-value map where keys are string identifier and values are object of custom key-value pair. +func (m *ServerProcessedContent) GetCustomMetadata()([]MetaDataKeyValuePairable) { + return m.customMetadata +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServerProcessedContent) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["componentDependencies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetComponentDependencies(res) + } + return nil + } + res["customMetadata"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyValuePairable) + } + m.SetCustomMetadata(res) + } + return nil + } + res["htmlStrings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetHtmlStrings(res) + } + return nil + } + res["imageSources"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetImageSources(res) + } + return nil + } + res["links"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetLinks(res) + } + 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["searchablePlainTexts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMetaDataKeyStringPairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MetaDataKeyStringPairable, len(val)) + for i, v := range val { + res[i] = v.(MetaDataKeyStringPairable) + } + m.SetSearchablePlainTexts(res) + } + return nil + } + return res +} +// GetHtmlStrings gets the htmlStrings property value. A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them. +func (m *ServerProcessedContent) GetHtmlStrings()([]MetaDataKeyStringPairable) { + return m.htmlStrings +} +// GetImageSources gets the imageSources property value. A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them. +func (m *ServerProcessedContent) GetImageSources()([]MetaDataKeyStringPairable) { + return m.imageSources +} +// GetLinks gets the links property value. A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them. +func (m *ServerProcessedContent) GetLinks()([]MetaDataKeyStringPairable) { + return m.links +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServerProcessedContent) GetOdataType()(*string) { + return m.odataType +} +// GetSearchablePlainTexts gets the searchablePlainTexts property value. A key-value map where keys are string identifiers and values are strings that should be search indexed. +func (m *ServerProcessedContent) GetSearchablePlainTexts()([]MetaDataKeyStringPairable) { + return m.searchablePlainTexts +} +// Serialize serializes information the current object +func (m *ServerProcessedContent) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetComponentDependencies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetComponentDependencies())) + for i, v := range m.GetComponentDependencies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("componentDependencies", cast) + if err != nil { + return err + } + } + if m.GetCustomMetadata() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCustomMetadata())) + for i, v := range m.GetCustomMetadata() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("customMetadata", cast) + if err != nil { + return err + } + } + if m.GetHtmlStrings() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHtmlStrings())) + for i, v := range m.GetHtmlStrings() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("htmlStrings", cast) + if err != nil { + return err + } + } + if m.GetImageSources() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetImageSources())) + for i, v := range m.GetImageSources() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("imageSources", cast) + if err != nil { + return err + } + } + if m.GetLinks() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLinks())) + for i, v := range m.GetLinks() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("links", cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSearchablePlainTexts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSearchablePlainTexts())) + for i, v := range m.GetSearchablePlainTexts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("searchablePlainTexts", 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 *ServerProcessedContent) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetComponentDependencies sets the componentDependencies property value. A key-value map where keys are string identifiers and values are component ids. SharePoint servers might decide to use this hint to preload the script for corresponding components for performance boost. +func (m *ServerProcessedContent) SetComponentDependencies(value []MetaDataKeyStringPairable)() { + m.componentDependencies = value +} +// SetCustomMetadata sets the customMetadata property value. A key-value map where keys are string identifier and values are object of custom key-value pair. +func (m *ServerProcessedContent) SetCustomMetadata(value []MetaDataKeyValuePairable)() { + m.customMetadata = value +} +// SetHtmlStrings sets the htmlStrings property value. A key-value map where keys are string identifiers and values are rich text with HTML format. SharePoint servers treat the values as HTML content and run services like safety checks, search index and link fixup on them. +func (m *ServerProcessedContent) SetHtmlStrings(value []MetaDataKeyStringPairable)() { + m.htmlStrings = value +} +// SetImageSources sets the imageSources property value. A key-value map where keys are string identifiers and values are image sources. SharePoint servers treat the values as image sources and run services like search index and link fixup on them. +func (m *ServerProcessedContent) SetImageSources(value []MetaDataKeyStringPairable)() { + m.imageSources = value +} +// SetLinks sets the links property value. A key-value map where keys are string identifiers and values are links. SharePoint servers treat the values as links and run services like link fixup on them. +func (m *ServerProcessedContent) SetLinks(value []MetaDataKeyStringPairable)() { + m.links = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServerProcessedContent) SetOdataType(value *string)() { + m.odataType = value +} +// SetSearchablePlainTexts sets the searchablePlainTexts property value. A key-value map where keys are string identifiers and values are strings that should be search indexed. +func (m *ServerProcessedContent) SetSearchablePlainTexts(value []MetaDataKeyStringPairable)() { + m.searchablePlainTexts = value +} diff --git a/src/internal/connector/graph/betasdk/models/server_processed_contentable.go b/src/internal/connector/graph/betasdk/models/server_processed_contentable.go new file mode 100644 index 000000000..148315c8e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/server_processed_contentable.go @@ -0,0 +1,25 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServerProcessedContentable +type ServerProcessedContentable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetComponentDependencies()([]MetaDataKeyStringPairable) + GetCustomMetadata()([]MetaDataKeyValuePairable) + GetHtmlStrings()([]MetaDataKeyStringPairable) + GetImageSources()([]MetaDataKeyStringPairable) + GetLinks()([]MetaDataKeyStringPairable) + GetOdataType()(*string) + GetSearchablePlainTexts()([]MetaDataKeyStringPairable) + SetComponentDependencies(value []MetaDataKeyStringPairable)() + SetCustomMetadata(value []MetaDataKeyValuePairable)() + SetHtmlStrings(value []MetaDataKeyStringPairable)() + SetImageSources(value []MetaDataKeyStringPairable)() + SetLinks(value []MetaDataKeyStringPairable)() + SetOdataType(value *string)() + SetSearchablePlainTexts(value []MetaDataKeyStringPairable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement.go b/src/internal/connector/graph/betasdk/models/service_announcement.go new file mode 100644 index 000000000..67b6254a2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement.go @@ -0,0 +1,136 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncement +type ServiceAnnouncement struct { + Entity + // A collection of service health information for tenant. This property is a contained navigation property, it is nullable and readonly. + healthOverviews []ServiceHealthable + // A collection of service issues for tenant. This property is a contained navigation property, it is nullable and readonly. + issues []ServiceHealthIssueable + // A collection of service messages for tenant. This property is a contained navigation property, it is nullable and readonly. + messages []ServiceUpdateMessageable +} +// NewServiceAnnouncement instantiates a new ServiceAnnouncement and sets the default values. +func NewServiceAnnouncement()(*ServiceAnnouncement) { + m := &ServiceAnnouncement{ + Entity: *NewEntity(), + } + return m +} +// CreateServiceAnnouncementFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceAnnouncementFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceAnnouncement(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceAnnouncement) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["healthOverviews"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthable) + } + m.SetHealthOverviews(res) + } + return nil + } + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthIssueable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthIssueable) + } + m.SetIssues(res) + } + return nil + } + res["messages"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceUpdateMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceUpdateMessageable, len(val)) + for i, v := range val { + res[i] = v.(ServiceUpdateMessageable) + } + m.SetMessages(res) + } + return nil + } + return res +} +// GetHealthOverviews gets the healthOverviews property value. A collection of service health information for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) GetHealthOverviews()([]ServiceHealthable) { + return m.healthOverviews +} +// GetIssues gets the issues property value. A collection of service issues for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) GetIssues()([]ServiceHealthIssueable) { + return m.issues +} +// GetMessages gets the messages property value. A collection of service messages for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) GetMessages()([]ServiceUpdateMessageable) { + return m.messages +} +// Serialize serializes information the current object +func (m *ServiceAnnouncement) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetHealthOverviews() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHealthOverviews())) + for i, v := range m.GetHealthOverviews() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("healthOverviews", cast) + if err != nil { + return err + } + } + if m.GetIssues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIssues())) + for i, v := range m.GetIssues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("issues", cast) + if err != nil { + return err + } + } + if m.GetMessages() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMessages())) + for i, v := range m.GetMessages() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("messages", cast) + if err != nil { + return err + } + } + return nil +} +// SetHealthOverviews sets the healthOverviews property value. A collection of service health information for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) SetHealthOverviews(value []ServiceHealthable)() { + m.healthOverviews = value +} +// SetIssues sets the issues property value. A collection of service issues for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) SetIssues(value []ServiceHealthIssueable)() { + m.issues = value +} +// SetMessages sets the messages property value. A collection of service messages for tenant. This property is a contained navigation property, it is nullable and readonly. +func (m *ServiceAnnouncement) SetMessages(value []ServiceUpdateMessageable)() { + m.messages = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_attachment.go b/src/internal/connector/graph/betasdk/models/service_announcement_attachment.go new file mode 100644 index 000000000..ec2d39d9a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_attachment.go @@ -0,0 +1,165 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementAttachment provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceAnnouncementAttachment struct { + Entity + // The attachment content. + content []byte + // The contentType property + contentType *string + // The lastModifiedDateTime property + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The name property + name *string + // The size property + size *int32 +} +// NewServiceAnnouncementAttachment instantiates a new serviceAnnouncementAttachment and sets the default values. +func NewServiceAnnouncementAttachment()(*ServiceAnnouncementAttachment) { + m := &ServiceAnnouncementAttachment{ + Entity: *NewEntity(), + } + return m +} +// CreateServiceAnnouncementAttachmentFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceAnnouncementAttachmentFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceAnnouncementAttachment(), nil +} +// GetContent gets the content property value. The attachment content. +func (m *ServiceAnnouncementAttachment) GetContent()([]byte) { + return m.content +} +// GetContentType gets the contentType property value. The contentType property +func (m *ServiceAnnouncementAttachment) GetContentType()(*string) { + return m.contentType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceAnnouncementAttachment) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["content"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetContent(val) + } + return nil + } + res["contentType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetContentType(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(val) + } + return nil + } + res["size"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetSize(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ServiceAnnouncementAttachment) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetName gets the name property value. The name property +func (m *ServiceAnnouncementAttachment) GetName()(*string) { + return m.name +} +// GetSize gets the size property value. The size property +func (m *ServiceAnnouncementAttachment) GetSize()(*int32) { + return m.size +} +// Serialize serializes information the current object +func (m *ServiceAnnouncementAttachment) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteByteArrayValue("content", m.GetContent()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("contentType", m.GetContentType()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("size", m.GetSize()) + if err != nil { + return err + } + } + return nil +} +// SetContent sets the content property value. The attachment content. +func (m *ServiceAnnouncementAttachment) SetContent(value []byte)() { + m.content = value +} +// SetContentType sets the contentType property value. The contentType property +func (m *ServiceAnnouncementAttachment) SetContentType(value *string)() { + m.contentType = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The lastModifiedDateTime property +func (m *ServiceAnnouncementAttachment) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetName sets the name property value. The name property +func (m *ServiceAnnouncementAttachment) SetName(value *string)() { + m.name = value +} +// SetSize sets the size property value. The size property +func (m *ServiceAnnouncementAttachment) SetSize(value *int32)() { + m.size = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_response.go b/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_response.go new file mode 100644 index 000000000..5d0c3d3b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementAttachmentCollectionResponse +type ServiceAnnouncementAttachmentCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServiceAnnouncementAttachmentable +} +// NewServiceAnnouncementAttachmentCollectionResponse instantiates a new ServiceAnnouncementAttachmentCollectionResponse and sets the default values. +func NewServiceAnnouncementAttachmentCollectionResponse()(*ServiceAnnouncementAttachmentCollectionResponse) { + m := &ServiceAnnouncementAttachmentCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceAnnouncementAttachmentCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceAnnouncementAttachmentCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceAnnouncementAttachmentCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceAnnouncementAttachmentCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceAnnouncementAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceAnnouncementAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ServiceAnnouncementAttachmentable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceAnnouncementAttachmentCollectionResponse) GetValue()([]ServiceAnnouncementAttachmentable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServiceAnnouncementAttachmentCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceAnnouncementAttachmentCollectionResponse) SetValue(value []ServiceAnnouncementAttachmentable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_responseable.go new file mode 100644 index 000000000..631c2a6d9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_attachment_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementAttachmentCollectionResponseable +type ServiceAnnouncementAttachmentCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceAnnouncementAttachmentable) + SetValue(value []ServiceAnnouncementAttachmentable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_attachmentable.go b/src/internal/connector/graph/betasdk/models/service_announcement_attachmentable.go new file mode 100644 index 000000000..5203d8f99 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_attachmentable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementAttachmentable +type ServiceAnnouncementAttachmentable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetContent()([]byte) + GetContentType()(*string) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetName()(*string) + GetSize()(*int32) + SetContent(value []byte)() + SetContentType(value *string)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetName(value *string)() + SetSize(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_base.go b/src/internal/connector/graph/betasdk/models/service_announcement_base.go new file mode 100644 index 000000000..864d709e1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_base.go @@ -0,0 +1,193 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementBase provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceAnnouncementBase struct { + Entity + // Additional details about service event. This property doesn't support filters. + details []KeyValuePairable + // The end time of the service event. + endDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The last modified time of the service event. + lastModifiedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The start time of the service event. + startDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The title of the service event. + title *string +} +// NewServiceAnnouncementBase instantiates a new serviceAnnouncementBase and sets the default values. +func NewServiceAnnouncementBase()(*ServiceAnnouncementBase) { + m := &ServiceAnnouncementBase{ + Entity: *NewEntity(), + } + return m +} +// CreateServiceAnnouncementBaseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceAnnouncementBaseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + if parseNode != nil { + mappingValueNode, err := parseNode.GetChildNode("@odata.type") + if err != nil { + return nil, err + } + if mappingValueNode != nil { + mappingValue, err := mappingValueNode.GetStringValue() + if err != nil { + return nil, err + } + if mappingValue != nil { + switch *mappingValue { + case "#microsoft.graph.serviceHealthIssue": + return NewServiceHealthIssue(), nil + case "#microsoft.graph.serviceUpdateMessage": + return NewServiceUpdateMessage(), nil + } + } + } + } + return NewServiceAnnouncementBase(), nil +} +// GetDetails gets the details property value. Additional details about service event. This property doesn't support filters. +func (m *ServiceAnnouncementBase) GetDetails()([]KeyValuePairable) { + return m.details +} +// GetEndDateTime gets the endDateTime property value. The end time of the service event. +func (m *ServiceAnnouncementBase) GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.endDateTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceAnnouncementBase) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["details"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyValuePairFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyValuePairable, len(val)) + for i, v := range val { + res[i] = v.(KeyValuePairable) + } + m.SetDetails(res) + } + return nil + } + res["endDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetEndDateTime(val) + } + return nil + } + res["lastModifiedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastModifiedDateTime(val) + } + return nil + } + res["startDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetStartDateTime(val) + } + return nil + } + res["title"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTitle(val) + } + return nil + } + return res +} +// GetLastModifiedDateTime gets the lastModifiedDateTime property value. The last modified time of the service event. +func (m *ServiceAnnouncementBase) GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastModifiedDateTime +} +// GetStartDateTime gets the startDateTime property value. The start time of the service event. +func (m *ServiceAnnouncementBase) GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.startDateTime +} +// GetTitle gets the title property value. The title of the service event. +func (m *ServiceAnnouncementBase) GetTitle()(*string) { + return m.title +} +// Serialize serializes information the current object +func (m *ServiceAnnouncementBase) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDetails())) + for i, v := range m.GetDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("details", cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("endDateTime", m.GetEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastModifiedDateTime", m.GetLastModifiedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("startDateTime", m.GetStartDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("title", m.GetTitle()) + if err != nil { + return err + } + } + return nil +} +// SetDetails sets the details property value. Additional details about service event. This property doesn't support filters. +func (m *ServiceAnnouncementBase) SetDetails(value []KeyValuePairable)() { + m.details = value +} +// SetEndDateTime sets the endDateTime property value. The end time of the service event. +func (m *ServiceAnnouncementBase) SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.endDateTime = value +} +// SetLastModifiedDateTime sets the lastModifiedDateTime property value. The last modified time of the service event. +func (m *ServiceAnnouncementBase) SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastModifiedDateTime = value +} +// SetStartDateTime sets the startDateTime property value. The start time of the service event. +func (m *ServiceAnnouncementBase) SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.startDateTime = value +} +// SetTitle sets the title property value. The title of the service event. +func (m *ServiceAnnouncementBase) SetTitle(value *string)() { + m.title = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcement_baseable.go b/src/internal/connector/graph/betasdk/models/service_announcement_baseable.go new file mode 100644 index 000000000..b5416986e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcement_baseable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementBaseable +type ServiceAnnouncementBaseable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetails()([]KeyValuePairable) + GetEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLastModifiedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetStartDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetTitle()(*string) + SetDetails(value []KeyValuePairable)() + SetEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLastModifiedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetStartDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetTitle(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_announcementable.go b/src/internal/connector/graph/betasdk/models/service_announcementable.go new file mode 100644 index 000000000..d47749d18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_announcementable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceAnnouncementable +type ServiceAnnouncementable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHealthOverviews()([]ServiceHealthable) + GetIssues()([]ServiceHealthIssueable) + GetMessages()([]ServiceUpdateMessageable) + SetHealthOverviews(value []ServiceHealthable)() + SetIssues(value []ServiceHealthIssueable)() + SetMessages(value []ServiceUpdateMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health.go b/src/internal/connector/graph/betasdk/models/service_health.go new file mode 100644 index 000000000..51738d094 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health.go @@ -0,0 +1,121 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealth provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceHealth struct { + Entity + // A collection of issues that happened on the service, with detailed information for each issue. + issues []ServiceHealthIssueable + // The service name. Use the list healthOverviews operation to get exact string names for services subscribed by the tenant. + service *string + // The status property + status *ServiceHealthStatus +} +// NewServiceHealth instantiates a new serviceHealth and sets the default values. +func NewServiceHealth()(*ServiceHealth) { + m := &ServiceHealth{ + Entity: *NewEntity(), + } + return m +} +// CreateServiceHealthFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealth(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealth) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["issues"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthIssueable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthIssueable) + } + m.SetIssues(res) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceHealthStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ServiceHealthStatus)) + } + return nil + } + return res +} +// GetIssues gets the issues property value. A collection of issues that happened on the service, with detailed information for each issue. +func (m *ServiceHealth) GetIssues()([]ServiceHealthIssueable) { + return m.issues +} +// GetService gets the service property value. The service name. Use the list healthOverviews operation to get exact string names for services subscribed by the tenant. +func (m *ServiceHealth) GetService()(*string) { + return m.service +} +// GetStatus gets the status property value. The status property +func (m *ServiceHealth) GetStatus()(*ServiceHealthStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *ServiceHealth) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetIssues() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIssues())) + for i, v := range m.GetIssues() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("issues", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetIssues sets the issues property value. A collection of issues that happened on the service, with detailed information for each issue. +func (m *ServiceHealth) SetIssues(value []ServiceHealthIssueable)() { + m.issues = value +} +// SetService sets the service property value. The service name. Use the list healthOverviews operation to get exact string names for services subscribed by the tenant. +func (m *ServiceHealth) SetService(value *string)() { + m.service = value +} +// SetStatus sets the status property value. The status property +func (m *ServiceHealth) SetStatus(value *ServiceHealthStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_classification_type.go b/src/internal/connector/graph/betasdk/models/service_health_classification_type.go new file mode 100644 index 000000000..0d9bcbaec --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_classification_type.go @@ -0,0 +1,37 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceHealthClassificationType int + +const ( + ADVISORY_SERVICEHEALTHCLASSIFICATIONTYPE ServiceHealthClassificationType = iota + INCIDENT_SERVICEHEALTHCLASSIFICATIONTYPE + UNKNOWNFUTUREVALUE_SERVICEHEALTHCLASSIFICATIONTYPE +) + +func (i ServiceHealthClassificationType) String() string { + return []string{"advisory", "incident", "unknownFutureValue"}[i] +} +func ParseServiceHealthClassificationType(v string) (interface{}, error) { + result := ADVISORY_SERVICEHEALTHCLASSIFICATIONTYPE + switch v { + case "advisory": + result = ADVISORY_SERVICEHEALTHCLASSIFICATIONTYPE + case "incident": + result = INCIDENT_SERVICEHEALTHCLASSIFICATIONTYPE + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEHEALTHCLASSIFICATIONTYPE + default: + return 0, errors.New("Unknown ServiceHealthClassificationType value: " + v) + } + return &result, nil +} +func SerializeServiceHealthClassificationType(values []ServiceHealthClassificationType) []string { + 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/service_health_collection_response.go b/src/internal/connector/graph/betasdk/models/service_health_collection_response.go new file mode 100644 index 000000000..5bb2a5d7e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthCollectionResponse +type ServiceHealthCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServiceHealthable +} +// NewServiceHealthCollectionResponse instantiates a new ServiceHealthCollectionResponse and sets the default values. +func NewServiceHealthCollectionResponse()(*ServiceHealthCollectionResponse) { + m := &ServiceHealthCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceHealthCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealthCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealthCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceHealthCollectionResponse) GetValue()([]ServiceHealthable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServiceHealthCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceHealthCollectionResponse) SetValue(value []ServiceHealthable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_health_collection_responseable.go new file mode 100644 index 000000000..d025c0de3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthCollectionResponseable +type ServiceHealthCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceHealthable) + SetValue(value []ServiceHealthable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue.go b/src/internal/connector/graph/betasdk/models/service_health_issue.go new file mode 100644 index 000000000..597903ea8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue.go @@ -0,0 +1,281 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssue +type ServiceHealthIssue struct { + ServiceAnnouncementBase + // The classification property + classification *ServiceHealthClassificationType + // The feature name of the service issue. + feature *string + // The feature group name of the service issue. + featureGroup *string + // The description of the service issue impact. + impactDescription *string + // Indicates whether the issue is resolved. + isResolved *bool + // The origin property + origin *ServiceHealthOrigin + // Collection of historical posts for the service issue. + posts []ServiceHealthIssuePostable + // Indicates the service affected by the issue. + service *string + // The status property + status *ServiceHealthStatus +} +// NewServiceHealthIssue instantiates a new ServiceHealthIssue and sets the default values. +func NewServiceHealthIssue()(*ServiceHealthIssue) { + m := &ServiceHealthIssue{ + ServiceAnnouncementBase: *NewServiceAnnouncementBase(), + } + odataTypeValue := "#microsoft.graph.serviceHealthIssue"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServiceHealthIssueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthIssueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealthIssue(), nil +} +// GetClassification gets the classification property value. The classification property +func (m *ServiceHealthIssue) GetClassification()(*ServiceHealthClassificationType) { + return m.classification +} +// GetFeature gets the feature property value. The feature name of the service issue. +func (m *ServiceHealthIssue) GetFeature()(*string) { + return m.feature +} +// GetFeatureGroup gets the featureGroup property value. The feature group name of the service issue. +func (m *ServiceHealthIssue) GetFeatureGroup()(*string) { + return m.featureGroup +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealthIssue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ServiceAnnouncementBase.GetFieldDeserializers() + res["classification"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceHealthClassificationType) + if err != nil { + return err + } + if val != nil { + m.SetClassification(val.(*ServiceHealthClassificationType)) + } + return nil + } + res["feature"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFeature(val) + } + return nil + } + res["featureGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetFeatureGroup(val) + } + return nil + } + res["impactDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetImpactDescription(val) + } + return nil + } + res["isResolved"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsResolved(val) + } + return nil + } + res["origin"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceHealthOrigin) + if err != nil { + return err + } + if val != nil { + m.SetOrigin(val.(*ServiceHealthOrigin)) + } + return nil + } + res["posts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthIssuePostFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthIssuePostable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthIssuePostable) + } + m.SetPosts(res) + } + return nil + } + res["service"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetService(val) + } + return nil + } + res["status"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceHealthStatus) + if err != nil { + return err + } + if val != nil { + m.SetStatus(val.(*ServiceHealthStatus)) + } + return nil + } + return res +} +// GetImpactDescription gets the impactDescription property value. The description of the service issue impact. +func (m *ServiceHealthIssue) GetImpactDescription()(*string) { + return m.impactDescription +} +// GetIsResolved gets the isResolved property value. Indicates whether the issue is resolved. +func (m *ServiceHealthIssue) GetIsResolved()(*bool) { + return m.isResolved +} +// GetOrigin gets the origin property value. The origin property +func (m *ServiceHealthIssue) GetOrigin()(*ServiceHealthOrigin) { + return m.origin +} +// GetPosts gets the posts property value. Collection of historical posts for the service issue. +func (m *ServiceHealthIssue) GetPosts()([]ServiceHealthIssuePostable) { + return m.posts +} +// GetService gets the service property value. Indicates the service affected by the issue. +func (m *ServiceHealthIssue) GetService()(*string) { + return m.service +} +// GetStatus gets the status property value. The status property +func (m *ServiceHealthIssue) GetStatus()(*ServiceHealthStatus) { + return m.status +} +// Serialize serializes information the current object +func (m *ServiceHealthIssue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ServiceAnnouncementBase.Serialize(writer) + if err != nil { + return err + } + if m.GetClassification() != nil { + cast := (*m.GetClassification()).String() + err = writer.WriteStringValue("classification", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("feature", m.GetFeature()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("featureGroup", m.GetFeatureGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("impactDescription", m.GetImpactDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isResolved", m.GetIsResolved()) + if err != nil { + return err + } + } + if m.GetOrigin() != nil { + cast := (*m.GetOrigin()).String() + err = writer.WriteStringValue("origin", &cast) + if err != nil { + return err + } + } + if m.GetPosts() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPosts())) + for i, v := range m.GetPosts() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("posts", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("service", m.GetService()) + if err != nil { + return err + } + } + if m.GetStatus() != nil { + cast := (*m.GetStatus()).String() + err = writer.WriteStringValue("status", &cast) + if err != nil { + return err + } + } + return nil +} +// SetClassification sets the classification property value. The classification property +func (m *ServiceHealthIssue) SetClassification(value *ServiceHealthClassificationType)() { + m.classification = value +} +// SetFeature sets the feature property value. The feature name of the service issue. +func (m *ServiceHealthIssue) SetFeature(value *string)() { + m.feature = value +} +// SetFeatureGroup sets the featureGroup property value. The feature group name of the service issue. +func (m *ServiceHealthIssue) SetFeatureGroup(value *string)() { + m.featureGroup = value +} +// SetImpactDescription sets the impactDescription property value. The description of the service issue impact. +func (m *ServiceHealthIssue) SetImpactDescription(value *string)() { + m.impactDescription = value +} +// SetIsResolved sets the isResolved property value. Indicates whether the issue is resolved. +func (m *ServiceHealthIssue) SetIsResolved(value *bool)() { + m.isResolved = value +} +// SetOrigin sets the origin property value. The origin property +func (m *ServiceHealthIssue) SetOrigin(value *ServiceHealthOrigin)() { + m.origin = value +} +// SetPosts sets the posts property value. Collection of historical posts for the service issue. +func (m *ServiceHealthIssue) SetPosts(value []ServiceHealthIssuePostable)() { + m.posts = value +} +// SetService sets the service property value. Indicates the service affected by the issue. +func (m *ServiceHealthIssue) SetService(value *string)() { + m.service = value +} +// SetStatus sets the status property value. The status property +func (m *ServiceHealthIssue) SetStatus(value *ServiceHealthStatus)() { + m.status = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_collection_response.go b/src/internal/connector/graph/betasdk/models/service_health_issue_collection_response.go new file mode 100644 index 000000000..7eeaeea19 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssueCollectionResponse +type ServiceHealthIssueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServiceHealthIssueable +} +// NewServiceHealthIssueCollectionResponse instantiates a new ServiceHealthIssueCollectionResponse and sets the default values. +func NewServiceHealthIssueCollectionResponse()(*ServiceHealthIssueCollectionResponse) { + m := &ServiceHealthIssueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceHealthIssueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthIssueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealthIssueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealthIssueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthIssueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthIssueable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthIssueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceHealthIssueCollectionResponse) GetValue()([]ServiceHealthIssueable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServiceHealthIssueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceHealthIssueCollectionResponse) SetValue(value []ServiceHealthIssueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_health_issue_collection_responseable.go new file mode 100644 index 000000000..0f50c3924 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssueCollectionResponseable +type ServiceHealthIssueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceHealthIssueable) + SetValue(value []ServiceHealthIssueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_post.go b/src/internal/connector/graph/betasdk/models/service_health_issue_post.go new file mode 100644 index 000000000..ea8ca83ad --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_post.go @@ -0,0 +1,151 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssuePost +type ServiceHealthIssuePost 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 published time of the post. + createdDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The content of the service issue post. The supported value for the contentType property is html. + description ItemBodyable + // The OdataType property + odataType *string + // The post type of the service issue historical post. Possible values are: regular, quick, strategic, unknownFutureValue. + postType *PostType +} +// NewServiceHealthIssuePost instantiates a new serviceHealthIssuePost and sets the default values. +func NewServiceHealthIssuePost()(*ServiceHealthIssuePost) { + m := &ServiceHealthIssuePost{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServiceHealthIssuePostFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthIssuePostFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealthIssuePost(), 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 *ServiceHealthIssuePost) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCreatedDateTime gets the createdDateTime property value. The published time of the post. +func (m *ServiceHealthIssuePost) GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.createdDateTime +} +// GetDescription gets the description property value. The content of the service issue post. The supported value for the contentType property is html. +func (m *ServiceHealthIssuePost) GetDescription()(ItemBodyable) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealthIssuePost) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["createdDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetCreatedDateTime(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDescription(val.(ItemBodyable)) + } + 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["postType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParsePostType) + if err != nil { + return err + } + if val != nil { + m.SetPostType(val.(*PostType)) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServiceHealthIssuePost) GetOdataType()(*string) { + return m.odataType +} +// GetPostType gets the postType property value. The post type of the service issue historical post. Possible values are: regular, quick, strategic, unknownFutureValue. +func (m *ServiceHealthIssuePost) GetPostType()(*PostType) { + return m.postType +} +// Serialize serializes information the current object +func (m *ServiceHealthIssuePost) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteTimeValue("createdDateTime", m.GetCreatedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetPostType() != nil { + cast := (*m.GetPostType()).String() + err := writer.WriteStringValue("postType", &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 *ServiceHealthIssuePost) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCreatedDateTime sets the createdDateTime property value. The published time of the post. +func (m *ServiceHealthIssuePost) SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.createdDateTime = value +} +// SetDescription sets the description property value. The content of the service issue post. The supported value for the contentType property is html. +func (m *ServiceHealthIssuePost) SetDescription(value ItemBodyable)() { + m.description = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServiceHealthIssuePost) SetOdataType(value *string)() { + m.odataType = value +} +// SetPostType sets the postType property value. The post type of the service issue historical post. Possible values are: regular, quick, strategic, unknownFutureValue. +func (m *ServiceHealthIssuePost) SetPostType(value *PostType)() { + m.postType = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_response.go b/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_response.go new file mode 100644 index 000000000..a1b1bf504 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssuePostCollectionResponse +type ServiceHealthIssuePostCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServiceHealthIssuePostable +} +// NewServiceHealthIssuePostCollectionResponse instantiates a new ServiceHealthIssuePostCollectionResponse and sets the default values. +func NewServiceHealthIssuePostCollectionResponse()(*ServiceHealthIssuePostCollectionResponse) { + m := &ServiceHealthIssuePostCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceHealthIssuePostCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHealthIssuePostCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHealthIssuePostCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHealthIssuePostCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceHealthIssuePostFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceHealthIssuePostable, len(val)) + for i, v := range val { + res[i] = v.(ServiceHealthIssuePostable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceHealthIssuePostCollectionResponse) GetValue()([]ServiceHealthIssuePostable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServiceHealthIssuePostCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceHealthIssuePostCollectionResponse) SetValue(value []ServiceHealthIssuePostable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_responseable.go new file mode 100644 index 000000000..cc7b6abe2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_post_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssuePostCollectionResponseable +type ServiceHealthIssuePostCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceHealthIssuePostable) + SetValue(value []ServiceHealthIssuePostable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issue_postable.go b/src/internal/connector/graph/betasdk/models/service_health_issue_postable.go new file mode 100644 index 000000000..032ecc873 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issue_postable.go @@ -0,0 +1,20 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssuePostable +type ServiceHealthIssuePostable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCreatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDescription()(ItemBodyable) + GetOdataType()(*string) + GetPostType()(*PostType) + SetCreatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDescription(value ItemBodyable)() + SetOdataType(value *string)() + SetPostType(value *PostType)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_issueable.go b/src/internal/connector/graph/betasdk/models/service_health_issueable.go new file mode 100644 index 000000000..d6a768699 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_issueable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthIssueable +type ServiceHealthIssueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ServiceAnnouncementBaseable + GetClassification()(*ServiceHealthClassificationType) + GetFeature()(*string) + GetFeatureGroup()(*string) + GetImpactDescription()(*string) + GetIsResolved()(*bool) + GetOrigin()(*ServiceHealthOrigin) + GetPosts()([]ServiceHealthIssuePostable) + GetService()(*string) + GetStatus()(*ServiceHealthStatus) + SetClassification(value *ServiceHealthClassificationType)() + SetFeature(value *string)() + SetFeatureGroup(value *string)() + SetImpactDescription(value *string)() + SetIsResolved(value *bool)() + SetOrigin(value *ServiceHealthOrigin)() + SetPosts(value []ServiceHealthIssuePostable)() + SetService(value *string)() + SetStatus(value *ServiceHealthStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_health_origin.go b/src/internal/connector/graph/betasdk/models/service_health_origin.go new file mode 100644 index 000000000..f1786d373 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_origin.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceHealthOrigin int + +const ( + MICROSOFT_SERVICEHEALTHORIGIN ServiceHealthOrigin = iota + THIRDPARTY_SERVICEHEALTHORIGIN + CUSTOMER_SERVICEHEALTHORIGIN + UNKNOWNFUTUREVALUE_SERVICEHEALTHORIGIN +) + +func (i ServiceHealthOrigin) String() string { + return []string{"microsoft", "thirdParty", "customer", "unknownFutureValue"}[i] +} +func ParseServiceHealthOrigin(v string) (interface{}, error) { + result := MICROSOFT_SERVICEHEALTHORIGIN + switch v { + case "microsoft": + result = MICROSOFT_SERVICEHEALTHORIGIN + case "thirdParty": + result = THIRDPARTY_SERVICEHEALTHORIGIN + case "customer": + result = CUSTOMER_SERVICEHEALTHORIGIN + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEHEALTHORIGIN + default: + return 0, errors.New("Unknown ServiceHealthOrigin value: " + v) + } + return &result, nil +} +func SerializeServiceHealthOrigin(values []ServiceHealthOrigin) []string { + 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/service_health_status.go b/src/internal/connector/graph/betasdk/models/service_health_status.go new file mode 100644 index 000000000..284a0c06c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_health_status.go @@ -0,0 +1,82 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceHealthStatus int + +const ( + SERVICEOPERATIONAL_SERVICEHEALTHSTATUS ServiceHealthStatus = iota + INVESTIGATING_SERVICEHEALTHSTATUS + RESTORINGSERVICE_SERVICEHEALTHSTATUS + VERIFYINGSERVICE_SERVICEHEALTHSTATUS + SERVICERESTORED_SERVICEHEALTHSTATUS + POSTINCIDENTREVIEWPUBLISHED_SERVICEHEALTHSTATUS + SERVICEDEGRADATION_SERVICEHEALTHSTATUS + SERVICEINTERRUPTION_SERVICEHEALTHSTATUS + EXTENDEDRECOVERY_SERVICEHEALTHSTATUS + FALSEPOSITIVE_SERVICEHEALTHSTATUS + INVESTIGATIONSUSPENDED_SERVICEHEALTHSTATUS + RESOLVED_SERVICEHEALTHSTATUS + MITIGATEDEXTERNAL_SERVICEHEALTHSTATUS + MITIGATED_SERVICEHEALTHSTATUS + RESOLVEDEXTERNAL_SERVICEHEALTHSTATUS + CONFIRMED_SERVICEHEALTHSTATUS + REPORTED_SERVICEHEALTHSTATUS + UNKNOWNFUTUREVALUE_SERVICEHEALTHSTATUS +) + +func (i ServiceHealthStatus) String() string { + return []string{"serviceOperational", "investigating", "restoringService", "verifyingService", "serviceRestored", "postIncidentReviewPublished", "serviceDegradation", "serviceInterruption", "extendedRecovery", "falsePositive", "investigationSuspended", "resolved", "mitigatedExternal", "mitigated", "resolvedExternal", "confirmed", "reported", "unknownFutureValue"}[i] +} +func ParseServiceHealthStatus(v string) (interface{}, error) { + result := SERVICEOPERATIONAL_SERVICEHEALTHSTATUS + switch v { + case "serviceOperational": + result = SERVICEOPERATIONAL_SERVICEHEALTHSTATUS + case "investigating": + result = INVESTIGATING_SERVICEHEALTHSTATUS + case "restoringService": + result = RESTORINGSERVICE_SERVICEHEALTHSTATUS + case "verifyingService": + result = VERIFYINGSERVICE_SERVICEHEALTHSTATUS + case "serviceRestored": + result = SERVICERESTORED_SERVICEHEALTHSTATUS + case "postIncidentReviewPublished": + result = POSTINCIDENTREVIEWPUBLISHED_SERVICEHEALTHSTATUS + case "serviceDegradation": + result = SERVICEDEGRADATION_SERVICEHEALTHSTATUS + case "serviceInterruption": + result = SERVICEINTERRUPTION_SERVICEHEALTHSTATUS + case "extendedRecovery": + result = EXTENDEDRECOVERY_SERVICEHEALTHSTATUS + case "falsePositive": + result = FALSEPOSITIVE_SERVICEHEALTHSTATUS + case "investigationSuspended": + result = INVESTIGATIONSUSPENDED_SERVICEHEALTHSTATUS + case "resolved": + result = RESOLVED_SERVICEHEALTHSTATUS + case "mitigatedExternal": + result = MITIGATEDEXTERNAL_SERVICEHEALTHSTATUS + case "mitigated": + result = MITIGATED_SERVICEHEALTHSTATUS + case "resolvedExternal": + result = RESOLVEDEXTERNAL_SERVICEHEALTHSTATUS + case "confirmed": + result = CONFIRMED_SERVICEHEALTHSTATUS + case "reported": + result = REPORTED_SERVICEHEALTHSTATUS + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEHEALTHSTATUS + default: + return 0, errors.New("Unknown ServiceHealthStatus value: " + v) + } + return &result, nil +} +func SerializeServiceHealthStatus(values []ServiceHealthStatus) []string { + 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/service_healthable.go b/src/internal/connector/graph/betasdk/models/service_healthable.go new file mode 100644 index 000000000..c1d7f559d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_healthable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHealthable +type ServiceHealthable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIssues()([]ServiceHealthIssueable) + GetService()(*string) + GetStatus()(*ServiceHealthStatus) + SetIssues(value []ServiceHealthIssueable)() + SetService(value *string)() + SetStatus(value *ServiceHealthStatus)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_hosted_media_config.go b/src/internal/connector/graph/betasdk/models/service_hosted_media_config.go new file mode 100644 index 000000000..a9d41198d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_hosted_media_config.go @@ -0,0 +1,70 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHostedMediaConfig +type ServiceHostedMediaConfig struct { + MediaConfig + // The list of media to pre-fetch. + preFetchMedia []MediaInfoable +} +// NewServiceHostedMediaConfig instantiates a new ServiceHostedMediaConfig and sets the default values. +func NewServiceHostedMediaConfig()(*ServiceHostedMediaConfig) { + m := &ServiceHostedMediaConfig{ + MediaConfig: *NewMediaConfig(), + } + odataTypeValue := "#microsoft.graph.serviceHostedMediaConfig"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServiceHostedMediaConfigFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceHostedMediaConfigFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceHostedMediaConfig(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceHostedMediaConfig) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.MediaConfig.GetFieldDeserializers() + res["preFetchMedia"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateMediaInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]MediaInfoable, len(val)) + for i, v := range val { + res[i] = v.(MediaInfoable) + } + m.SetPreFetchMedia(res) + } + return nil + } + return res +} +// GetPreFetchMedia gets the preFetchMedia property value. The list of media to pre-fetch. +func (m *ServiceHostedMediaConfig) GetPreFetchMedia()([]MediaInfoable) { + return m.preFetchMedia +} +// Serialize serializes information the current object +func (m *ServiceHostedMediaConfig) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.MediaConfig.Serialize(writer) + if err != nil { + return err + } + if m.GetPreFetchMedia() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPreFetchMedia())) + for i, v := range m.GetPreFetchMedia() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("preFetchMedia", cast) + if err != nil { + return err + } + } + return nil +} +// SetPreFetchMedia sets the preFetchMedia property value. The list of media to pre-fetch. +func (m *ServiceHostedMediaConfig) SetPreFetchMedia(value []MediaInfoable)() { + m.preFetchMedia = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_hosted_media_configable.go b/src/internal/connector/graph/betasdk/models/service_hosted_media_configable.go new file mode 100644 index 000000000..4c5c68f05 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_hosted_media_configable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceHostedMediaConfigable +type ServiceHostedMediaConfigable interface { + MediaConfigable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetPreFetchMedia()([]MediaInfoable) + SetPreFetchMedia(value []MediaInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_information.go b/src/internal/connector/graph/betasdk/models/service_information.go new file mode 100644 index 000000000..4238e81a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_information.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceInformation +type ServiceInformation 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 name of the cloud service (for example, Twitter, Instagram). + name *string + // The OdataType property + odataType *string + // Contains the URL for the service being referenced. + webUrl *string +} +// NewServiceInformation instantiates a new serviceInformation and sets the default values. +func NewServiceInformation()(*ServiceInformation) { + m := &ServiceInformation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServiceInformationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceInformationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceInformation(), 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 *ServiceInformation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceInformation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["webUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebUrl(val) + } + return nil + } + return res +} +// GetName gets the name property value. The name of the cloud service (for example, Twitter, Instagram). +func (m *ServiceInformation) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServiceInformation) GetOdataType()(*string) { + return m.odataType +} +// GetWebUrl gets the webUrl property value. Contains the URL for the service being referenced. +func (m *ServiceInformation) GetWebUrl()(*string) { + return m.webUrl +} +// Serialize serializes information the current object +func (m *ServiceInformation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webUrl", m.GetWebUrl()) + 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 *ServiceInformation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. The name of the cloud service (for example, Twitter, Instagram). +func (m *ServiceInformation) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServiceInformation) SetOdataType(value *string)() { + m.odataType = value +} +// SetWebUrl sets the webUrl property value. Contains the URL for the service being referenced. +func (m *ServiceInformation) SetWebUrl(value *string)() { + m.webUrl = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_informationable.go b/src/internal/connector/graph/betasdk/models/service_informationable.go new file mode 100644 index 000000000..a9ffd690c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_informationable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceInformationable +type ServiceInformationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetWebUrl()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetWebUrl(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_plan_info.go b/src/internal/connector/graph/betasdk/models/service_plan_info.go new file mode 100644 index 000000000..1a00e0fbc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_plan_info.go @@ -0,0 +1,176 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePlanInfo +type ServicePlanInfo 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 object the service plan can be assigned to. The possible values are:User - service plan can be assigned to individual users.Company - service plan can be assigned to the entire tenant. + appliesTo *string + // The OdataType property + odataType *string + // The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service has been disabled.ErrorStatus - The service plan has not been provisioned and is in an error state.PendingInput - Service is not yet provisioned; awaiting service confirmation.PendingActivation - Service is provisioned but requires explicit activation by administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it has not been activated in the tenant, yet. + provisioningStatus *string + // The unique identifier of the service plan. + servicePlanId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The name of the service plan. + servicePlanName *string +} +// NewServicePlanInfo instantiates a new servicePlanInfo and sets the default values. +func NewServicePlanInfo()(*ServicePlanInfo) { + m := &ServicePlanInfo{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServicePlanInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePlanInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePlanInfo(), 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 *ServicePlanInfo) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAppliesTo gets the appliesTo property value. The object the service plan can be assigned to. The possible values are:User - service plan can be assigned to individual users.Company - service plan can be assigned to the entire tenant. +func (m *ServicePlanInfo) GetAppliesTo()(*string) { + return m.appliesTo +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePlanInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["appliesTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppliesTo(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["provisioningStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningStatus(val) + } + return nil + } + res["servicePlanId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanId(val) + } + return nil + } + res["servicePlanName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePlanName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServicePlanInfo) GetOdataType()(*string) { + return m.odataType +} +// GetProvisioningStatus gets the provisioningStatus property value. The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service has been disabled.ErrorStatus - The service plan has not been provisioned and is in an error state.PendingInput - Service is not yet provisioned; awaiting service confirmation.PendingActivation - Service is provisioned but requires explicit activation by administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it has not been activated in the tenant, yet. +func (m *ServicePlanInfo) GetProvisioningStatus()(*string) { + return m.provisioningStatus +} +// GetServicePlanId gets the servicePlanId property value. The unique identifier of the service plan. +func (m *ServicePlanInfo) GetServicePlanId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.servicePlanId +} +// GetServicePlanName gets the servicePlanName property value. The name of the service plan. +func (m *ServicePlanInfo) GetServicePlanName()(*string) { + return m.servicePlanName +} +// Serialize serializes information the current object +func (m *ServicePlanInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("appliesTo", m.GetAppliesTo()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("provisioningStatus", m.GetProvisioningStatus()) + if err != nil { + return err + } + } + { + err := writer.WriteUUIDValue("servicePlanId", m.GetServicePlanId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("servicePlanName", m.GetServicePlanName()) + 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 *ServicePlanInfo) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAppliesTo sets the appliesTo property value. The object the service plan can be assigned to. The possible values are:User - service plan can be assigned to individual users.Company - service plan can be assigned to the entire tenant. +func (m *ServicePlanInfo) SetAppliesTo(value *string)() { + m.appliesTo = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServicePlanInfo) SetOdataType(value *string)() { + m.odataType = value +} +// SetProvisioningStatus sets the provisioningStatus property value. The provisioning status of the service plan. The possible values are:Success - Service is fully provisioned.Disabled - Service has been disabled.ErrorStatus - The service plan has not been provisioned and is in an error state.PendingInput - Service is not yet provisioned; awaiting service confirmation.PendingActivation - Service is provisioned but requires explicit activation by administrator (for example, Intune_O365 service plan)PendingProvisioning - Microsoft has added a new service to the product SKU and it has not been activated in the tenant, yet. +func (m *ServicePlanInfo) SetProvisioningStatus(value *string)() { + m.provisioningStatus = value +} +// SetServicePlanId sets the servicePlanId property value. The unique identifier of the service plan. +func (m *ServicePlanInfo) SetServicePlanId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.servicePlanId = value +} +// SetServicePlanName sets the servicePlanName property value. The name of the service plan. +func (m *ServicePlanInfo) SetServicePlanName(value *string)() { + m.servicePlanName = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_plan_info_collection_response.go b/src/internal/connector/graph/betasdk/models/service_plan_info_collection_response.go new file mode 100644 index 000000000..dbd271d6f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_plan_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePlanInfoCollectionResponse +type ServicePlanInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServicePlanInfoable +} +// NewServicePlanInfoCollectionResponse instantiates a new ServicePlanInfoCollectionResponse and sets the default values. +func NewServicePlanInfoCollectionResponse()(*ServicePlanInfoCollectionResponse) { + m := &ServicePlanInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServicePlanInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePlanInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePlanInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePlanInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePlanInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePlanInfoable, len(val)) + for i, v := range val { + res[i] = v.(ServicePlanInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServicePlanInfoCollectionResponse) GetValue()([]ServicePlanInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServicePlanInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServicePlanInfoCollectionResponse) SetValue(value []ServicePlanInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_plan_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_plan_info_collection_responseable.go new file mode 100644 index 000000000..52c0cd06d --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_plan_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePlanInfoCollectionResponseable +type ServicePlanInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServicePlanInfoable) + SetValue(value []ServicePlanInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_plan_infoable.go b/src/internal/connector/graph/betasdk/models/service_plan_infoable.go new file mode 100644 index 000000000..789c56bd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_plan_infoable.go @@ -0,0 +1,22 @@ +package models + +import ( + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePlanInfoable +type ServicePlanInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppliesTo()(*string) + GetOdataType()(*string) + GetProvisioningStatus()(*string) + GetServicePlanId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetServicePlanName()(*string) + SetAppliesTo(value *string)() + SetOdataType(value *string)() + SetProvisioningStatus(value *string)() + SetServicePlanId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetServicePlanName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal.go b/src/internal/connector/graph/betasdk/models/service_principal.go new file mode 100644 index 000000000..407f826a9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal.go @@ -0,0 +1,1690 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipal provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServicePrincipal struct { + DirectoryObject + // true if the service principal account is enabled; otherwise, false. If set to false, then no users will be able to sign in to this app, even if they are assigned to it. Supports $filter (eq, ne, not, in). + accountEnabled *bool + // Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Microsoft 365 call the application in the context of a document the user is working on. + addIns []AddInable + // Used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities. Supports $filter (eq, not, ge, le, startsWith). + alternativeNames []string + // The description exposed by the associated application. + appDescription *string + // The display name exposed by the associated application. + appDisplayName *string + // The unique identifier for the associated application (its appId property). Supports $filter (eq, ne, not, in, startsWith). + appId *string + // Unique identifier of the applicationTemplate that the servicePrincipal was created from. Read-only. Supports $filter (eq, ne, NOT, startsWith). + applicationTemplateId *string + // The appManagementPolicy applied to this service principal. + appManagementPolicies []AppManagementPolicyable + // Contains the tenant id where the application is registered. This is applicable only to service principals backed by applications.Supports $filter (eq, ne, NOT, ge, le). + appOwnerOrganizationId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // App role assignments for this app or service, granted to users, groups, and other service principals.Supports $expand. + appRoleAssignedTo []AppRoleAssignmentable + // Specifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens. The default value is false. Not nullable. Supports $filter (eq, ne, NOT). + appRoleAssignmentRequired *bool + // App role assignment for another app or service, granted to this service principal. Supports $expand. + appRoleAssignments []AppRoleAssignmentable + // The roles exposed by the application which this service principal represents. For more information see the appRoles property definition on the application entity. Not nullable. + appRoles []AppRoleable + // The claimsMappingPolicies assigned to this service principal. Supports $expand. + claimsMappingPolicies []ClaimsMappingPolicyable + // Directory objects created by this service principal. Read-only. Nullable. + createdObjects []DirectoryObjectable + // An open complex type that holds the value of a custom security attribute that is assigned to a directory object. Nullable. Returned only on $select. Supports $filter (eq, ne, not, startsWith). + customSecurityAttributes CustomSecurityAttributeValueable + // The permission classifications for delegated permissions exposed by the app that this service principal represents. Supports $expand. + delegatedPermissionClassifications []DelegatedPermissionClassificationable + // Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps will display the application description in this field. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. + description *string + // Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). + disabledByMicrosoftStatus *string + // The display name for the service principal. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. + displayName *string + // Endpoints available for discovery. Services like Sharepoint populate this property with a tenant specific SharePoint endpoints that other applications can discover and use in their experiences. + endpoints []Endpointable + // Deprecated. Don't use. + errorUrl *string + // The federatedIdentityCredentials property + federatedIdentityCredentials []FederatedIdentityCredentialable + // Home page or landing page of the application. + homepage *string + // The homeRealmDiscoveryPolicies assigned to this service principal. Supports $expand. + homeRealmDiscoveryPolicies []HomeRealmDiscoveryPolicyable + // Basic profile information of the acquired application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). + info InformationalUrlable + // The collection of key credentials associated with the service principal. Not nullable. Supports $filter (eq, not, ge, le). + keyCredentials []KeyCredentialable + // The licenseDetails property + licenseDetails []LicenseDetailsable + // Specifies the URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. When blank, Azure AD performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Azure AD My Apps, or the Azure AD SSO URL. + loginUrl *string + // Specifies the URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols. + logoutUrl *string + // Roles that this service principal is a member of. HTTP Methods: GET Read-only. Nullable. Supports $expand. + memberOf []DirectoryObjectable + // Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1024 characters. + notes *string + // Specifies the list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. + notificationEmailAddresses []string + // Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. + oauth2PermissionGrants []OAuth2PermissionGrantable + // Directory objects that are owned by this service principal. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + ownedObjects []DirectoryObjectable + // Directory objects that are owners of this servicePrincipal. The owners are a set of non-admin users or servicePrincipals who are allowed to modify this object. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). + owners []DirectoryObjectable + // The collection of password credentials associated with the service principal. Not nullable. + passwordCredentials []PasswordCredentialable + // The collection for settings related to password single sign-on. Use $select=passwordSingleSignOnSettings to read the property. Read-only for applicationTemplates except for custom applicationTemplates. + passwordSingleSignOnSettings PasswordSingleSignOnSettingsable + // Specifies the single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. The supported values are password, saml, notSupported, and oidc. + preferredSingleSignOnMode *string + // Specifies the expiration date of the keyCredential used for token signing, marked by preferredTokenSigningKeyThumbprint. + preferredTokenSigningKeyEndDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Reserved for internal use only. Do not write or otherwise rely on this property. May be removed in future versions. + preferredTokenSigningKeyThumbprint *string + // The delegated permissions exposed by the application. For more information see the oauth2PermissionScopes property on the application entity's api property. Not nullable. Note: This property is named oauth2PermissionScopes in v1.0. + publishedPermissionScopes []PermissionScopeable + // The name of the Azure AD tenant that published the application. + publisherName *string + // The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. Not nullable. + replyUrls []string + // The url where the service exposes SAML metadata for federation. + samlMetadataUrl *string + // The collection for settings related to saml single sign-on. + samlSingleSignOnSettings SamlSingleSignOnSettingsable + // Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Azure AD. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). + servicePrincipalNames []string + // Identifies if the service principal represents an application or a managed identity. This is set by Azure AD internally. For a service principal that represents an application this is set as Application. For a service principal that represent a managed identity this is set as ManagedIdentity. The SocialIdp type is for internal use. + servicePrincipalType *string + // Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization’s Azure AD tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization’s Azure AD tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. + signInAudience *string + // The synchronization property + synchronization Synchronizationable + // Custom strings that can be used to categorize and identify the service principal. Not nullable. Supports $filter (eq, not, ge, le, startsWith). + tags []string + // Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. + tokenEncryptionKeyId *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID + // The tokenIssuancePolicies assigned to this service principal. Supports $expand. + tokenIssuancePolicies []TokenIssuancePolicyable + // The tokenLifetimePolicies assigned to this service principal. Supports $expand. + tokenLifetimePolicies []TokenLifetimePolicyable + // The transitiveMemberOf property + transitiveMemberOf []DirectoryObjectable + // Specifies the verified publisher of the application which this service principal represents. + verifiedPublisher VerifiedPublisherable +} +// NewServicePrincipal instantiates a new servicePrincipal and sets the default values. +func NewServicePrincipal()(*ServicePrincipal) { + m := &ServicePrincipal{ + DirectoryObject: *NewDirectoryObject(), + } + odataTypeValue := "#microsoft.graph.servicePrincipal"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServicePrincipalFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipal(), nil +} +// GetAccountEnabled gets the accountEnabled property value. true if the service principal account is enabled; otherwise, false. If set to false, then no users will be able to sign in to this app, even if they are assigned to it. Supports $filter (eq, ne, not, in). +func (m *ServicePrincipal) GetAccountEnabled()(*bool) { + return m.accountEnabled +} +// GetAddIns gets the addIns property value. Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Microsoft 365 call the application in the context of a document the user is working on. +func (m *ServicePrincipal) GetAddIns()([]AddInable) { + return m.addIns +} +// GetAlternativeNames gets the alternativeNames property value. Used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) GetAlternativeNames()([]string) { + return m.alternativeNames +} +// GetAppDescription gets the appDescription property value. The description exposed by the associated application. +func (m *ServicePrincipal) GetAppDescription()(*string) { + return m.appDescription +} +// GetAppDisplayName gets the appDisplayName property value. The display name exposed by the associated application. +func (m *ServicePrincipal) GetAppDisplayName()(*string) { + return m.appDisplayName +} +// GetAppId gets the appId property value. The unique identifier for the associated application (its appId property). Supports $filter (eq, ne, not, in, startsWith). +func (m *ServicePrincipal) GetAppId()(*string) { + return m.appId +} +// GetApplicationTemplateId gets the applicationTemplateId property value. Unique identifier of the applicationTemplate that the servicePrincipal was created from. Read-only. Supports $filter (eq, ne, NOT, startsWith). +func (m *ServicePrincipal) GetApplicationTemplateId()(*string) { + return m.applicationTemplateId +} +// GetAppManagementPolicies gets the appManagementPolicies property value. The appManagementPolicy applied to this service principal. +func (m *ServicePrincipal) GetAppManagementPolicies()([]AppManagementPolicyable) { + return m.appManagementPolicies +} +// GetAppOwnerOrganizationId gets the appOwnerOrganizationId property value. Contains the tenant id where the application is registered. This is applicable only to service principals backed by applications.Supports $filter (eq, ne, NOT, ge, le). +func (m *ServicePrincipal) GetAppOwnerOrganizationId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.appOwnerOrganizationId +} +// GetAppRoleAssignedTo gets the appRoleAssignedTo property value. App role assignments for this app or service, granted to users, groups, and other service principals.Supports $expand. +func (m *ServicePrincipal) GetAppRoleAssignedTo()([]AppRoleAssignmentable) { + return m.appRoleAssignedTo +} +// GetAppRoleAssignmentRequired gets the appRoleAssignmentRequired property value. Specifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens. The default value is false. Not nullable. Supports $filter (eq, ne, NOT). +func (m *ServicePrincipal) GetAppRoleAssignmentRequired()(*bool) { + return m.appRoleAssignmentRequired +} +// GetAppRoleAssignments gets the appRoleAssignments property value. App role assignment for another app or service, granted to this service principal. Supports $expand. +func (m *ServicePrincipal) GetAppRoleAssignments()([]AppRoleAssignmentable) { + return m.appRoleAssignments +} +// GetAppRoles gets the appRoles property value. The roles exposed by the application which this service principal represents. For more information see the appRoles property definition on the application entity. Not nullable. +func (m *ServicePrincipal) GetAppRoles()([]AppRoleable) { + return m.appRoles +} +// GetClaimsMappingPolicies gets the claimsMappingPolicies property value. The claimsMappingPolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) GetClaimsMappingPolicies()([]ClaimsMappingPolicyable) { + return m.claimsMappingPolicies +} +// GetCreatedObjects gets the createdObjects property value. Directory objects created by this service principal. Read-only. Nullable. +func (m *ServicePrincipal) GetCreatedObjects()([]DirectoryObjectable) { + return m.createdObjects +} +// GetCustomSecurityAttributes gets the customSecurityAttributes property value. An open complex type that holds the value of a custom security attribute that is assigned to a directory object. Nullable. Returned only on $select. Supports $filter (eq, ne, not, startsWith). +func (m *ServicePrincipal) GetCustomSecurityAttributes()(CustomSecurityAttributeValueable) { + return m.customSecurityAttributes +} +// GetDelegatedPermissionClassifications gets the delegatedPermissionClassifications property value. The permission classifications for delegated permissions exposed by the app that this service principal represents. Supports $expand. +func (m *ServicePrincipal) GetDelegatedPermissionClassifications()([]DelegatedPermissionClassificationable) { + return m.delegatedPermissionClassifications +} +// GetDescription gets the description property value. Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps will display the application description in this field. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *ServicePrincipal) GetDescription()(*string) { + return m.description +} +// GetDisabledByMicrosoftStatus gets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). +func (m *ServicePrincipal) GetDisabledByMicrosoftStatus()(*string) { + return m.disabledByMicrosoftStatus +} +// GetDisplayName gets the displayName property value. The display name for the service principal. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *ServicePrincipal) GetDisplayName()(*string) { + return m.displayName +} +// GetEndpoints gets the endpoints property value. Endpoints available for discovery. Services like Sharepoint populate this property with a tenant specific SharePoint endpoints that other applications can discover and use in their experiences. +func (m *ServicePrincipal) GetEndpoints()([]Endpointable) { + return m.endpoints +} +// GetErrorUrl gets the errorUrl property value. Deprecated. Don't use. +func (m *ServicePrincipal) GetErrorUrl()(*string) { + return m.errorUrl +} +// GetFederatedIdentityCredentials gets the federatedIdentityCredentials property value. The federatedIdentityCredentials property +func (m *ServicePrincipal) GetFederatedIdentityCredentials()([]FederatedIdentityCredentialable) { + return m.federatedIdentityCredentials +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipal) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DirectoryObject.GetFieldDeserializers() + res["accountEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAccountEnabled(val) + } + return nil + } + res["addIns"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAddInFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AddInable, len(val)) + for i, v := range val { + res[i] = v.(AddInable) + } + m.SetAddIns(res) + } + return nil + } + res["alternativeNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetAlternativeNames(res) + } + return nil + } + res["appDescription"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDescription(val) + } + return nil + } + res["appDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppDisplayName(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["applicationTemplateId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationTemplateId(val) + } + return nil + } + res["appManagementPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppManagementPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppManagementPolicyable, len(val)) + for i, v := range val { + res[i] = v.(AppManagementPolicyable) + } + m.SetAppManagementPolicies(res) + } + return nil + } + res["appOwnerOrganizationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetAppOwnerOrganizationId(val) + } + return nil + } + res["appRoleAssignedTo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleAssignmentable) + } + m.SetAppRoleAssignedTo(res) + } + return nil + } + res["appRoleAssignmentRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAppRoleAssignmentRequired(val) + } + return nil + } + res["appRoleAssignments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleAssignmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleAssignmentable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleAssignmentable) + } + m.SetAppRoleAssignments(res) + } + return nil + } + res["appRoles"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateAppRoleFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]AppRoleable, len(val)) + for i, v := range val { + res[i] = v.(AppRoleable) + } + m.SetAppRoles(res) + } + return nil + } + res["claimsMappingPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateClaimsMappingPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ClaimsMappingPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ClaimsMappingPolicyable) + } + m.SetClaimsMappingPolicies(res) + } + return nil + } + res["createdObjects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetCreatedObjects(res) + } + return nil + } + res["customSecurityAttributes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateCustomSecurityAttributeValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetCustomSecurityAttributes(val.(CustomSecurityAttributeValueable)) + } + return nil + } + res["delegatedPermissionClassifications"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDelegatedPermissionClassificationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DelegatedPermissionClassificationable, len(val)) + for i, v := range val { + res[i] = v.(DelegatedPermissionClassificationable) + } + m.SetDelegatedPermissionClassifications(res) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["disabledByMicrosoftStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisabledByMicrosoftStatus(val) + } + return nil + } + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["endpoints"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateEndpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]Endpointable, len(val)) + for i, v := range val { + res[i] = v.(Endpointable) + } + m.SetEndpoints(res) + } + return nil + } + res["errorUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetErrorUrl(val) + } + return nil + } + res["federatedIdentityCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateFederatedIdentityCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]FederatedIdentityCredentialable, len(val)) + for i, v := range val { + res[i] = v.(FederatedIdentityCredentialable) + } + m.SetFederatedIdentityCredentials(res) + } + return nil + } + res["homepage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetHomepage(val) + } + return nil + } + res["homeRealmDiscoveryPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateHomeRealmDiscoveryPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]HomeRealmDiscoveryPolicyable, len(val)) + for i, v := range val { + res[i] = v.(HomeRealmDiscoveryPolicyable) + } + m.SetHomeRealmDiscoveryPolicies(res) + } + return nil + } + res["info"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInformationalUrlFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInfo(val.(InformationalUrlable)) + } + return nil + } + res["keyCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateKeyCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]KeyCredentialable, len(val)) + for i, v := range val { + res[i] = v.(KeyCredentialable) + } + m.SetKeyCredentials(res) + } + return nil + } + res["licenseDetails"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateLicenseDetailsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]LicenseDetailsable, len(val)) + for i, v := range val { + res[i] = v.(LicenseDetailsable) + } + m.SetLicenseDetails(res) + } + return nil + } + res["loginUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoginUrl(val) + } + return nil + } + res["logoutUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLogoutUrl(val) + } + return nil + } + res["memberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetMemberOf(res) + } + return nil + } + res["notes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetNotes(val) + } + return nil + } + res["notificationEmailAddresses"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetNotificationEmailAddresses(res) + } + return nil + } + res["oauth2PermissionGrants"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateOAuth2PermissionGrantFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]OAuth2PermissionGrantable, len(val)) + for i, v := range val { + res[i] = v.(OAuth2PermissionGrantable) + } + m.SetOauth2PermissionGrants(res) + } + return nil + } + res["ownedObjects"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetOwnedObjects(res) + } + return nil + } + res["owners"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetOwners(res) + } + return nil + } + res["passwordCredentials"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePasswordCredentialFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PasswordCredentialable, len(val)) + for i, v := range val { + res[i] = v.(PasswordCredentialable) + } + m.SetPasswordCredentials(res) + } + return nil + } + res["passwordSingleSignOnSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePasswordSingleSignOnSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPasswordSingleSignOnSettings(val.(PasswordSingleSignOnSettingsable)) + } + return nil + } + res["preferredSingleSignOnMode"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredSingleSignOnMode(val) + } + return nil + } + res["preferredTokenSigningKeyEndDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredTokenSigningKeyEndDateTime(val) + } + return nil + } + res["preferredTokenSigningKeyThumbprint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPreferredTokenSigningKeyThumbprint(val) + } + return nil + } + res["publishedPermissionScopes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreatePermissionScopeFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]PermissionScopeable, len(val)) + for i, v := range val { + res[i] = v.(PermissionScopeable) + } + m.SetPublishedPermissionScopes(res) + } + return nil + } + res["publisherName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetPublisherName(val) + } + return nil + } + res["replyUrls"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetReplyUrls(res) + } + return nil + } + res["samlMetadataUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSamlMetadataUrl(val) + } + return nil + } + res["samlSingleSignOnSettings"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSamlSingleSignOnSettingsFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSamlSingleSignOnSettings(val.(SamlSingleSignOnSettingsable)) + } + return nil + } + res["servicePrincipalNames"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetServicePrincipalNames(res) + } + return nil + } + res["servicePrincipalType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalType(val) + } + return nil + } + res["signInAudience"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInAudience(val) + } + return nil + } + res["synchronization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSynchronizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSynchronization(val.(Synchronizationable)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["tokenEncryptionKeyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetUUIDValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenEncryptionKeyId(val) + } + return nil + } + res["tokenIssuancePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTokenIssuancePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TokenIssuancePolicyable, len(val)) + for i, v := range val { + res[i] = v.(TokenIssuancePolicyable) + } + m.SetTokenIssuancePolicies(res) + } + return nil + } + res["tokenLifetimePolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateTokenLifetimePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]TokenLifetimePolicyable, len(val)) + for i, v := range val { + res[i] = v.(TokenLifetimePolicyable) + } + m.SetTokenLifetimePolicies(res) + } + return nil + } + res["transitiveMemberOf"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDirectoryObjectFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DirectoryObjectable, len(val)) + for i, v := range val { + res[i] = v.(DirectoryObjectable) + } + m.SetTransitiveMemberOf(res) + } + return nil + } + res["verifiedPublisher"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateVerifiedPublisherFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetVerifiedPublisher(val.(VerifiedPublisherable)) + } + return nil + } + return res +} +// GetHomepage gets the homepage property value. Home page or landing page of the application. +func (m *ServicePrincipal) GetHomepage()(*string) { + return m.homepage +} +// GetHomeRealmDiscoveryPolicies gets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) GetHomeRealmDiscoveryPolicies()([]HomeRealmDiscoveryPolicyable) { + return m.homeRealmDiscoveryPolicies +} +// GetInfo gets the info property value. Basic profile information of the acquired application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). +func (m *ServicePrincipal) GetInfo()(InformationalUrlable) { + return m.info +} +// GetKeyCredentials gets the keyCredentials property value. The collection of key credentials associated with the service principal. Not nullable. Supports $filter (eq, not, ge, le). +func (m *ServicePrincipal) GetKeyCredentials()([]KeyCredentialable) { + return m.keyCredentials +} +// GetLicenseDetails gets the licenseDetails property value. The licenseDetails property +func (m *ServicePrincipal) GetLicenseDetails()([]LicenseDetailsable) { + return m.licenseDetails +} +// GetLoginUrl gets the loginUrl property value. Specifies the URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. When blank, Azure AD performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Azure AD My Apps, or the Azure AD SSO URL. +func (m *ServicePrincipal) GetLoginUrl()(*string) { + return m.loginUrl +} +// GetLogoutUrl gets the logoutUrl property value. Specifies the URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols. +func (m *ServicePrincipal) GetLogoutUrl()(*string) { + return m.logoutUrl +} +// GetMemberOf gets the memberOf property value. Roles that this service principal is a member of. HTTP Methods: GET Read-only. Nullable. Supports $expand. +func (m *ServicePrincipal) GetMemberOf()([]DirectoryObjectable) { + return m.memberOf +} +// GetNotes gets the notes property value. Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1024 characters. +func (m *ServicePrincipal) GetNotes()(*string) { + return m.notes +} +// GetNotificationEmailAddresses gets the notificationEmailAddresses property value. Specifies the list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. +func (m *ServicePrincipal) GetNotificationEmailAddresses()([]string) { + return m.notificationEmailAddresses +} +// GetOauth2PermissionGrants gets the oauth2PermissionGrants property value. Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. +func (m *ServicePrincipal) GetOauth2PermissionGrants()([]OAuth2PermissionGrantable) { + return m.oauth2PermissionGrants +} +// GetOwnedObjects gets the ownedObjects property value. Directory objects that are owned by this service principal. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *ServicePrincipal) GetOwnedObjects()([]DirectoryObjectable) { + return m.ownedObjects +} +// GetOwners gets the owners property value. Directory objects that are owners of this servicePrincipal. The owners are a set of non-admin users or servicePrincipals who are allowed to modify this object. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *ServicePrincipal) GetOwners()([]DirectoryObjectable) { + return m.owners +} +// GetPasswordCredentials gets the passwordCredentials property value. The collection of password credentials associated with the service principal. Not nullable. +func (m *ServicePrincipal) GetPasswordCredentials()([]PasswordCredentialable) { + return m.passwordCredentials +} +// GetPasswordSingleSignOnSettings gets the passwordSingleSignOnSettings property value. The collection for settings related to password single sign-on. Use $select=passwordSingleSignOnSettings to read the property. Read-only for applicationTemplates except for custom applicationTemplates. +func (m *ServicePrincipal) GetPasswordSingleSignOnSettings()(PasswordSingleSignOnSettingsable) { + return m.passwordSingleSignOnSettings +} +// GetPreferredSingleSignOnMode gets the preferredSingleSignOnMode property value. Specifies the single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. The supported values are password, saml, notSupported, and oidc. +func (m *ServicePrincipal) GetPreferredSingleSignOnMode()(*string) { + return m.preferredSingleSignOnMode +} +// GetPreferredTokenSigningKeyEndDateTime gets the preferredTokenSigningKeyEndDateTime property value. Specifies the expiration date of the keyCredential used for token signing, marked by preferredTokenSigningKeyThumbprint. +func (m *ServicePrincipal) GetPreferredTokenSigningKeyEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.preferredTokenSigningKeyEndDateTime +} +// GetPreferredTokenSigningKeyThumbprint gets the preferredTokenSigningKeyThumbprint property value. Reserved for internal use only. Do not write or otherwise rely on this property. May be removed in future versions. +func (m *ServicePrincipal) GetPreferredTokenSigningKeyThumbprint()(*string) { + return m.preferredTokenSigningKeyThumbprint +} +// GetPublishedPermissionScopes gets the publishedPermissionScopes property value. The delegated permissions exposed by the application. For more information see the oauth2PermissionScopes property on the application entity's api property. Not nullable. Note: This property is named oauth2PermissionScopes in v1.0. +func (m *ServicePrincipal) GetPublishedPermissionScopes()([]PermissionScopeable) { + return m.publishedPermissionScopes +} +// GetPublisherName gets the publisherName property value. The name of the Azure AD tenant that published the application. +func (m *ServicePrincipal) GetPublisherName()(*string) { + return m.publisherName +} +// GetReplyUrls gets the replyUrls property value. The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. Not nullable. +func (m *ServicePrincipal) GetReplyUrls()([]string) { + return m.replyUrls +} +// GetSamlMetadataUrl gets the samlMetadataUrl property value. The url where the service exposes SAML metadata for federation. +func (m *ServicePrincipal) GetSamlMetadataUrl()(*string) { + return m.samlMetadataUrl +} +// GetSamlSingleSignOnSettings gets the samlSingleSignOnSettings property value. The collection for settings related to saml single sign-on. +func (m *ServicePrincipal) GetSamlSingleSignOnSettings()(SamlSingleSignOnSettingsable) { + return m.samlSingleSignOnSettings +} +// GetServicePrincipalNames gets the servicePrincipalNames property value. Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Azure AD. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) GetServicePrincipalNames()([]string) { + return m.servicePrincipalNames +} +// GetServicePrincipalType gets the servicePrincipalType property value. Identifies if the service principal represents an application or a managed identity. This is set by Azure AD internally. For a service principal that represents an application this is set as Application. For a service principal that represent a managed identity this is set as ManagedIdentity. The SocialIdp type is for internal use. +func (m *ServicePrincipal) GetServicePrincipalType()(*string) { + return m.servicePrincipalType +} +// GetSignInAudience gets the signInAudience property value. Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization’s Azure AD tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization’s Azure AD tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. +func (m *ServicePrincipal) GetSignInAudience()(*string) { + return m.signInAudience +} +// GetSynchronization gets the synchronization property value. The synchronization property +func (m *ServicePrincipal) GetSynchronization()(Synchronizationable) { + return m.synchronization +} +// GetTags gets the tags property value. Custom strings that can be used to categorize and identify the service principal. Not nullable. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) GetTags()([]string) { + return m.tags +} +// GetTokenEncryptionKeyId gets the tokenEncryptionKeyId property value. Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. +func (m *ServicePrincipal) GetTokenEncryptionKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) { + return m.tokenEncryptionKeyId +} +// GetTokenIssuancePolicies gets the tokenIssuancePolicies property value. The tokenIssuancePolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) GetTokenIssuancePolicies()([]TokenIssuancePolicyable) { + return m.tokenIssuancePolicies +} +// GetTokenLifetimePolicies gets the tokenLifetimePolicies property value. The tokenLifetimePolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) GetTokenLifetimePolicies()([]TokenLifetimePolicyable) { + return m.tokenLifetimePolicies +} +// GetTransitiveMemberOf gets the transitiveMemberOf property value. The transitiveMemberOf property +func (m *ServicePrincipal) GetTransitiveMemberOf()([]DirectoryObjectable) { + return m.transitiveMemberOf +} +// GetVerifiedPublisher gets the verifiedPublisher property value. Specifies the verified publisher of the application which this service principal represents. +func (m *ServicePrincipal) GetVerifiedPublisher()(VerifiedPublisherable) { + return m.verifiedPublisher +} +// Serialize serializes information the current object +func (m *ServicePrincipal) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DirectoryObject.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteBoolValue("accountEnabled", m.GetAccountEnabled()) + if err != nil { + return err + } + } + if m.GetAddIns() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAddIns())) + for i, v := range m.GetAddIns() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("addIns", cast) + if err != nil { + return err + } + } + if m.GetAlternativeNames() != nil { + err = writer.WriteCollectionOfStringValues("alternativeNames", m.GetAlternativeNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appDescription", m.GetAppDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appDisplayName", m.GetAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("applicationTemplateId", m.GetApplicationTemplateId()) + if err != nil { + return err + } + } + if m.GetAppManagementPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppManagementPolicies())) + for i, v := range m.GetAppManagementPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appManagementPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("appOwnerOrganizationId", m.GetAppOwnerOrganizationId()) + if err != nil { + return err + } + } + if m.GetAppRoleAssignedTo() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppRoleAssignedTo())) + for i, v := range m.GetAppRoleAssignedTo() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appRoleAssignedTo", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("appRoleAssignmentRequired", m.GetAppRoleAssignmentRequired()) + if err != nil { + return err + } + } + if m.GetAppRoleAssignments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppRoleAssignments())) + for i, v := range m.GetAppRoleAssignments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appRoleAssignments", cast) + if err != nil { + return err + } + } + if m.GetAppRoles() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAppRoles())) + for i, v := range m.GetAppRoles() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("appRoles", cast) + if err != nil { + return err + } + } + if m.GetClaimsMappingPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetClaimsMappingPolicies())) + for i, v := range m.GetClaimsMappingPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("claimsMappingPolicies", cast) + if err != nil { + return err + } + } + if m.GetCreatedObjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetCreatedObjects())) + for i, v := range m.GetCreatedObjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("createdObjects", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("customSecurityAttributes", m.GetCustomSecurityAttributes()) + if err != nil { + return err + } + } + if m.GetDelegatedPermissionClassifications() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetDelegatedPermissionClassifications())) + for i, v := range m.GetDelegatedPermissionClassifications() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("delegatedPermissionClassifications", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("disabledByMicrosoftStatus", m.GetDisabledByMicrosoftStatus()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + if m.GetEndpoints() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetEndpoints())) + for i, v := range m.GetEndpoints() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("endpoints", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("errorUrl", m.GetErrorUrl()) + if err != nil { + return err + } + } + if m.GetFederatedIdentityCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetFederatedIdentityCredentials())) + for i, v := range m.GetFederatedIdentityCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("federatedIdentityCredentials", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("homepage", m.GetHomepage()) + if err != nil { + return err + } + } + if m.GetHomeRealmDiscoveryPolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetHomeRealmDiscoveryPolicies())) + for i, v := range m.GetHomeRealmDiscoveryPolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("homeRealmDiscoveryPolicies", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("info", m.GetInfo()) + if err != nil { + return err + } + } + if m.GetKeyCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetKeyCredentials())) + for i, v := range m.GetKeyCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("keyCredentials", cast) + if err != nil { + return err + } + } + if m.GetLicenseDetails() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetLicenseDetails())) + for i, v := range m.GetLicenseDetails() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("licenseDetails", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("loginUrl", m.GetLoginUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("logoutUrl", m.GetLogoutUrl()) + if err != nil { + return err + } + } + if m.GetMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetMemberOf())) + for i, v := range m.GetMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("memberOf", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("notes", m.GetNotes()) + if err != nil { + return err + } + } + if m.GetNotificationEmailAddresses() != nil { + err = writer.WriteCollectionOfStringValues("notificationEmailAddresses", m.GetNotificationEmailAddresses()) + if err != nil { + return err + } + } + if m.GetOauth2PermissionGrants() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOauth2PermissionGrants())) + for i, v := range m.GetOauth2PermissionGrants() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("oauth2PermissionGrants", cast) + if err != nil { + return err + } + } + if m.GetOwnedObjects() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOwnedObjects())) + for i, v := range m.GetOwnedObjects() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("ownedObjects", cast) + if err != nil { + return err + } + } + if m.GetOwners() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetOwners())) + for i, v := range m.GetOwners() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("owners", cast) + if err != nil { + return err + } + } + if m.GetPasswordCredentials() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPasswordCredentials())) + for i, v := range m.GetPasswordCredentials() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("passwordCredentials", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("passwordSingleSignOnSettings", m.GetPasswordSingleSignOnSettings()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredSingleSignOnMode", m.GetPreferredSingleSignOnMode()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("preferredTokenSigningKeyEndDateTime", m.GetPreferredTokenSigningKeyEndDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("preferredTokenSigningKeyThumbprint", m.GetPreferredTokenSigningKeyThumbprint()) + if err != nil { + return err + } + } + if m.GetPublishedPermissionScopes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetPublishedPermissionScopes())) + for i, v := range m.GetPublishedPermissionScopes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("publishedPermissionScopes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("publisherName", m.GetPublisherName()) + if err != nil { + return err + } + } + if m.GetReplyUrls() != nil { + err = writer.WriteCollectionOfStringValues("replyUrls", m.GetReplyUrls()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("samlMetadataUrl", m.GetSamlMetadataUrl()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("samlSingleSignOnSettings", m.GetSamlSingleSignOnSettings()) + if err != nil { + return err + } + } + if m.GetServicePrincipalNames() != nil { + err = writer.WriteCollectionOfStringValues("servicePrincipalNames", m.GetServicePrincipalNames()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalType", m.GetServicePrincipalType()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("signInAudience", m.GetSignInAudience()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("synchronization", m.GetSynchronization()) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteUUIDValue("tokenEncryptionKeyId", m.GetTokenEncryptionKeyId()) + if err != nil { + return err + } + } + if m.GetTokenIssuancePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTokenIssuancePolicies())) + for i, v := range m.GetTokenIssuancePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tokenIssuancePolicies", cast) + if err != nil { + return err + } + } + if m.GetTokenLifetimePolicies() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTokenLifetimePolicies())) + for i, v := range m.GetTokenLifetimePolicies() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("tokenLifetimePolicies", cast) + if err != nil { + return err + } + } + if m.GetTransitiveMemberOf() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetTransitiveMemberOf())) + for i, v := range m.GetTransitiveMemberOf() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("transitiveMemberOf", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("verifiedPublisher", m.GetVerifiedPublisher()) + if err != nil { + return err + } + } + return nil +} +// SetAccountEnabled sets the accountEnabled property value. true if the service principal account is enabled; otherwise, false. If set to false, then no users will be able to sign in to this app, even if they are assigned to it. Supports $filter (eq, ne, not, in). +func (m *ServicePrincipal) SetAccountEnabled(value *bool)() { + m.accountEnabled = value +} +// SetAddIns sets the addIns property value. Defines custom behavior that a consuming service can use to call an app in specific contexts. For example, applications that can render file streams may set the addIns property for its 'FileHandler' functionality. This will let services like Microsoft 365 call the application in the context of a document the user is working on. +func (m *ServicePrincipal) SetAddIns(value []AddInable)() { + m.addIns = value +} +// SetAlternativeNames sets the alternativeNames property value. Used to retrieve service principals by subscription, identify resource group and full resource ids for managed identities. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) SetAlternativeNames(value []string)() { + m.alternativeNames = value +} +// SetAppDescription sets the appDescription property value. The description exposed by the associated application. +func (m *ServicePrincipal) SetAppDescription(value *string)() { + m.appDescription = value +} +// SetAppDisplayName sets the appDisplayName property value. The display name exposed by the associated application. +func (m *ServicePrincipal) SetAppDisplayName(value *string)() { + m.appDisplayName = value +} +// SetAppId sets the appId property value. The unique identifier for the associated application (its appId property). Supports $filter (eq, ne, not, in, startsWith). +func (m *ServicePrincipal) SetAppId(value *string)() { + m.appId = value +} +// SetApplicationTemplateId sets the applicationTemplateId property value. Unique identifier of the applicationTemplate that the servicePrincipal was created from. Read-only. Supports $filter (eq, ne, NOT, startsWith). +func (m *ServicePrincipal) SetApplicationTemplateId(value *string)() { + m.applicationTemplateId = value +} +// SetAppManagementPolicies sets the appManagementPolicies property value. The appManagementPolicy applied to this service principal. +func (m *ServicePrincipal) SetAppManagementPolicies(value []AppManagementPolicyable)() { + m.appManagementPolicies = value +} +// SetAppOwnerOrganizationId sets the appOwnerOrganizationId property value. Contains the tenant id where the application is registered. This is applicable only to service principals backed by applications.Supports $filter (eq, ne, NOT, ge, le). +func (m *ServicePrincipal) SetAppOwnerOrganizationId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.appOwnerOrganizationId = value +} +// SetAppRoleAssignedTo sets the appRoleAssignedTo property value. App role assignments for this app or service, granted to users, groups, and other service principals.Supports $expand. +func (m *ServicePrincipal) SetAppRoleAssignedTo(value []AppRoleAssignmentable)() { + m.appRoleAssignedTo = value +} +// SetAppRoleAssignmentRequired sets the appRoleAssignmentRequired property value. Specifies whether users or other service principals need to be granted an app role assignment for this service principal before users can sign in or apps can get tokens. The default value is false. Not nullable. Supports $filter (eq, ne, NOT). +func (m *ServicePrincipal) SetAppRoleAssignmentRequired(value *bool)() { + m.appRoleAssignmentRequired = value +} +// SetAppRoleAssignments sets the appRoleAssignments property value. App role assignment for another app or service, granted to this service principal. Supports $expand. +func (m *ServicePrincipal) SetAppRoleAssignments(value []AppRoleAssignmentable)() { + m.appRoleAssignments = value +} +// SetAppRoles sets the appRoles property value. The roles exposed by the application which this service principal represents. For more information see the appRoles property definition on the application entity. Not nullable. +func (m *ServicePrincipal) SetAppRoles(value []AppRoleable)() { + m.appRoles = value +} +// SetClaimsMappingPolicies sets the claimsMappingPolicies property value. The claimsMappingPolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) SetClaimsMappingPolicies(value []ClaimsMappingPolicyable)() { + m.claimsMappingPolicies = value +} +// SetCreatedObjects sets the createdObjects property value. Directory objects created by this service principal. Read-only. Nullable. +func (m *ServicePrincipal) SetCreatedObjects(value []DirectoryObjectable)() { + m.createdObjects = value +} +// SetCustomSecurityAttributes sets the customSecurityAttributes property value. An open complex type that holds the value of a custom security attribute that is assigned to a directory object. Nullable. Returned only on $select. Supports $filter (eq, ne, not, startsWith). +func (m *ServicePrincipal) SetCustomSecurityAttributes(value CustomSecurityAttributeValueable)() { + m.customSecurityAttributes = value +} +// SetDelegatedPermissionClassifications sets the delegatedPermissionClassifications property value. The permission classifications for delegated permissions exposed by the app that this service principal represents. Supports $expand. +func (m *ServicePrincipal) SetDelegatedPermissionClassifications(value []DelegatedPermissionClassificationable)() { + m.delegatedPermissionClassifications = value +} +// SetDescription sets the description property value. Free text field to provide an internal end-user facing description of the service principal. End-user portals such MyApps will display the application description in this field. The maximum allowed size is 1024 characters. Supports $filter (eq, ne, not, ge, le, startsWith) and $search. +func (m *ServicePrincipal) SetDescription(value *string)() { + m.description = value +} +// SetDisabledByMicrosoftStatus sets the disabledByMicrosoftStatus property value. Specifies whether Microsoft has disabled the registered application. Possible values are: null (default value), NotDisabled, and DisabledDueToViolationOfServicesAgreement (reasons may include suspicious, abusive, or malicious activity, or a violation of the Microsoft Services Agreement). Supports $filter (eq, ne, not). +func (m *ServicePrincipal) SetDisabledByMicrosoftStatus(value *string)() { + m.disabledByMicrosoftStatus = value +} +// SetDisplayName sets the displayName property value. The display name for the service principal. Supports $filter (eq, ne, not, ge, le, in, startsWith, and eq on null values), $search, and $orderBy. +func (m *ServicePrincipal) SetDisplayName(value *string)() { + m.displayName = value +} +// SetEndpoints sets the endpoints property value. Endpoints available for discovery. Services like Sharepoint populate this property with a tenant specific SharePoint endpoints that other applications can discover and use in their experiences. +func (m *ServicePrincipal) SetEndpoints(value []Endpointable)() { + m.endpoints = value +} +// SetErrorUrl sets the errorUrl property value. Deprecated. Don't use. +func (m *ServicePrincipal) SetErrorUrl(value *string)() { + m.errorUrl = value +} +// SetFederatedIdentityCredentials sets the federatedIdentityCredentials property value. The federatedIdentityCredentials property +func (m *ServicePrincipal) SetFederatedIdentityCredentials(value []FederatedIdentityCredentialable)() { + m.federatedIdentityCredentials = value +} +// SetHomepage sets the homepage property value. Home page or landing page of the application. +func (m *ServicePrincipal) SetHomepage(value *string)() { + m.homepage = value +} +// SetHomeRealmDiscoveryPolicies sets the homeRealmDiscoveryPolicies property value. The homeRealmDiscoveryPolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) SetHomeRealmDiscoveryPolicies(value []HomeRealmDiscoveryPolicyable)() { + m.homeRealmDiscoveryPolicies = value +} +// SetInfo sets the info property value. Basic profile information of the acquired application such as app's marketing, support, terms of service and privacy statement URLs. The terms of service and privacy statement are surfaced to users through the user consent experience. For more info, see How to: Add Terms of service and privacy statement for registered Azure AD apps. Supports $filter (eq, ne, not, ge, le, and eq on null values). +func (m *ServicePrincipal) SetInfo(value InformationalUrlable)() { + m.info = value +} +// SetKeyCredentials sets the keyCredentials property value. The collection of key credentials associated with the service principal. Not nullable. Supports $filter (eq, not, ge, le). +func (m *ServicePrincipal) SetKeyCredentials(value []KeyCredentialable)() { + m.keyCredentials = value +} +// SetLicenseDetails sets the licenseDetails property value. The licenseDetails property +func (m *ServicePrincipal) SetLicenseDetails(value []LicenseDetailsable)() { + m.licenseDetails = value +} +// SetLoginUrl sets the loginUrl property value. Specifies the URL where the service provider redirects the user to Azure AD to authenticate. Azure AD uses the URL to launch the application from Microsoft 365 or the Azure AD My Apps. When blank, Azure AD performs IdP-initiated sign-on for applications configured with SAML-based single sign-on. The user launches the application from Microsoft 365, the Azure AD My Apps, or the Azure AD SSO URL. +func (m *ServicePrincipal) SetLoginUrl(value *string)() { + m.loginUrl = value +} +// SetLogoutUrl sets the logoutUrl property value. Specifies the URL that will be used by Microsoft's authorization service to logout an user using OpenId Connect front-channel, back-channel or SAML logout protocols. +func (m *ServicePrincipal) SetLogoutUrl(value *string)() { + m.logoutUrl = value +} +// SetMemberOf sets the memberOf property value. Roles that this service principal is a member of. HTTP Methods: GET Read-only. Nullable. Supports $expand. +func (m *ServicePrincipal) SetMemberOf(value []DirectoryObjectable)() { + m.memberOf = value +} +// SetNotes sets the notes property value. Free text field to capture information about the service principal, typically used for operational purposes. Maximum allowed size is 1024 characters. +func (m *ServicePrincipal) SetNotes(value *string)() { + m.notes = value +} +// SetNotificationEmailAddresses sets the notificationEmailAddresses property value. Specifies the list of email addresses where Azure AD sends a notification when the active certificate is near the expiration date. This is only for the certificates used to sign the SAML token issued for Azure AD Gallery applications. +func (m *ServicePrincipal) SetNotificationEmailAddresses(value []string)() { + m.notificationEmailAddresses = value +} +// SetOauth2PermissionGrants sets the oauth2PermissionGrants property value. Delegated permission grants authorizing this service principal to access an API on behalf of a signed-in user. Read-only. Nullable. +func (m *ServicePrincipal) SetOauth2PermissionGrants(value []OAuth2PermissionGrantable)() { + m.oauth2PermissionGrants = value +} +// SetOwnedObjects sets the ownedObjects property value. Directory objects that are owned by this service principal. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *ServicePrincipal) SetOwnedObjects(value []DirectoryObjectable)() { + m.ownedObjects = value +} +// SetOwners sets the owners property value. Directory objects that are owners of this servicePrincipal. The owners are a set of non-admin users or servicePrincipals who are allowed to modify this object. Read-only. Nullable. Supports $expand and $filter (/$count eq 0, /$count ne 0, /$count eq 1, /$count ne 1). +func (m *ServicePrincipal) SetOwners(value []DirectoryObjectable)() { + m.owners = value +} +// SetPasswordCredentials sets the passwordCredentials property value. The collection of password credentials associated with the service principal. Not nullable. +func (m *ServicePrincipal) SetPasswordCredentials(value []PasswordCredentialable)() { + m.passwordCredentials = value +} +// SetPasswordSingleSignOnSettings sets the passwordSingleSignOnSettings property value. The collection for settings related to password single sign-on. Use $select=passwordSingleSignOnSettings to read the property. Read-only for applicationTemplates except for custom applicationTemplates. +func (m *ServicePrincipal) SetPasswordSingleSignOnSettings(value PasswordSingleSignOnSettingsable)() { + m.passwordSingleSignOnSettings = value +} +// SetPreferredSingleSignOnMode sets the preferredSingleSignOnMode property value. Specifies the single sign-on mode configured for this application. Azure AD uses the preferred single sign-on mode to launch the application from Microsoft 365 or the Azure AD My Apps. The supported values are password, saml, notSupported, and oidc. +func (m *ServicePrincipal) SetPreferredSingleSignOnMode(value *string)() { + m.preferredSingleSignOnMode = value +} +// SetPreferredTokenSigningKeyEndDateTime sets the preferredTokenSigningKeyEndDateTime property value. Specifies the expiration date of the keyCredential used for token signing, marked by preferredTokenSigningKeyThumbprint. +func (m *ServicePrincipal) SetPreferredTokenSigningKeyEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.preferredTokenSigningKeyEndDateTime = value +} +// SetPreferredTokenSigningKeyThumbprint sets the preferredTokenSigningKeyThumbprint property value. Reserved for internal use only. Do not write or otherwise rely on this property. May be removed in future versions. +func (m *ServicePrincipal) SetPreferredTokenSigningKeyThumbprint(value *string)() { + m.preferredTokenSigningKeyThumbprint = value +} +// SetPublishedPermissionScopes sets the publishedPermissionScopes property value. The delegated permissions exposed by the application. For more information see the oauth2PermissionScopes property on the application entity's api property. Not nullable. Note: This property is named oauth2PermissionScopes in v1.0. +func (m *ServicePrincipal) SetPublishedPermissionScopes(value []PermissionScopeable)() { + m.publishedPermissionScopes = value +} +// SetPublisherName sets the publisherName property value. The name of the Azure AD tenant that published the application. +func (m *ServicePrincipal) SetPublisherName(value *string)() { + m.publisherName = value +} +// SetReplyUrls sets the replyUrls property value. The URLs that user tokens are sent to for sign in with the associated application, or the redirect URIs that OAuth 2.0 authorization codes and access tokens are sent to for the associated application. Not nullable. +func (m *ServicePrincipal) SetReplyUrls(value []string)() { + m.replyUrls = value +} +// SetSamlMetadataUrl sets the samlMetadataUrl property value. The url where the service exposes SAML metadata for federation. +func (m *ServicePrincipal) SetSamlMetadataUrl(value *string)() { + m.samlMetadataUrl = value +} +// SetSamlSingleSignOnSettings sets the samlSingleSignOnSettings property value. The collection for settings related to saml single sign-on. +func (m *ServicePrincipal) SetSamlSingleSignOnSettings(value SamlSingleSignOnSettingsable)() { + m.samlSingleSignOnSettings = value +} +// SetServicePrincipalNames sets the servicePrincipalNames property value. Contains the list of identifiersUris, copied over from the associated application. Additional values can be added to hybrid applications. These values can be used to identify the permissions exposed by this app within Azure AD. For example,Client apps can specify a resource URI which is based on the values of this property to acquire an access token, which is the URI returned in the 'aud' claim.The any operator is required for filter expressions on multi-valued properties. Not nullable. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) SetServicePrincipalNames(value []string)() { + m.servicePrincipalNames = value +} +// SetServicePrincipalType sets the servicePrincipalType property value. Identifies if the service principal represents an application or a managed identity. This is set by Azure AD internally. For a service principal that represents an application this is set as Application. For a service principal that represent a managed identity this is set as ManagedIdentity. The SocialIdp type is for internal use. +func (m *ServicePrincipal) SetServicePrincipalType(value *string)() { + m.servicePrincipalType = value +} +// SetSignInAudience sets the signInAudience property value. Specifies the Microsoft accounts that are supported for the current application. Read-only. Supported values are:AzureADMyOrg: Users with a Microsoft work or school account in my organization’s Azure AD tenant (single-tenant).AzureADMultipleOrgs: Users with a Microsoft work or school account in any organization’s Azure AD tenant (multi-tenant).AzureADandPersonalMicrosoftAccount: Users with a personal Microsoft account, or a work or school account in any organization’s Azure AD tenant.PersonalMicrosoftAccount: Users with a personal Microsoft account only. +func (m *ServicePrincipal) SetSignInAudience(value *string)() { + m.signInAudience = value +} +// SetSynchronization sets the synchronization property value. The synchronization property +func (m *ServicePrincipal) SetSynchronization(value Synchronizationable)() { + m.synchronization = value +} +// SetTags sets the tags property value. Custom strings that can be used to categorize and identify the service principal. Not nullable. Supports $filter (eq, not, ge, le, startsWith). +func (m *ServicePrincipal) SetTags(value []string)() { + m.tags = value +} +// SetTokenEncryptionKeyId sets the tokenEncryptionKeyId property value. Specifies the keyId of a public key from the keyCredentials collection. When configured, Azure AD issues tokens for this application encrypted using the key specified by this property. The application code that receives the encrypted token must use the matching private key to decrypt the token before it can be used for the signed-in user. +func (m *ServicePrincipal) SetTokenEncryptionKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() { + m.tokenEncryptionKeyId = value +} +// SetTokenIssuancePolicies sets the tokenIssuancePolicies property value. The tokenIssuancePolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) SetTokenIssuancePolicies(value []TokenIssuancePolicyable)() { + m.tokenIssuancePolicies = value +} +// SetTokenLifetimePolicies sets the tokenLifetimePolicies property value. The tokenLifetimePolicies assigned to this service principal. Supports $expand. +func (m *ServicePrincipal) SetTokenLifetimePolicies(value []TokenLifetimePolicyable)() { + m.tokenLifetimePolicies = value +} +// SetTransitiveMemberOf sets the transitiveMemberOf property value. The transitiveMemberOf property +func (m *ServicePrincipal) SetTransitiveMemberOf(value []DirectoryObjectable)() { + m.transitiveMemberOf = value +} +// SetVerifiedPublisher sets the verifiedPublisher property value. Specifies the verified publisher of the application which this service principal represents. +func (m *ServicePrincipal) SetVerifiedPublisher(value VerifiedPublisherable)() { + m.verifiedPublisher = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_collection_response.go b/src/internal/connector/graph/betasdk/models/service_principal_collection_response.go new file mode 100644 index 000000000..d932f06ff --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCollectionResponse +type ServicePrincipalCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServicePrincipalable +} +// NewServicePrincipalCollectionResponse instantiates a new ServicePrincipalCollectionResponse and sets the default values. +func NewServicePrincipalCollectionResponse()(*ServicePrincipalCollectionResponse) { + m := &ServicePrincipalCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServicePrincipalCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServicePrincipalCollectionResponse) GetValue()([]ServicePrincipalable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServicePrincipalCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServicePrincipalCollectionResponse) SetValue(value []ServicePrincipalable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_principal_collection_responseable.go new file mode 100644 index 000000000..7c22ead31 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCollectionResponseable +type ServicePrincipalCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServicePrincipalable) + SetValue(value []ServicePrincipalable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set.go new file mode 100644 index 000000000..6f01185f8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationConditionSet provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServicePrincipalCreationConditionSet struct { + Entity + // The applicationIds property + applicationIds []string + // The applicationPublisherIds property + applicationPublisherIds []string + // The applicationsFromVerifiedPublisherOnly property + applicationsFromVerifiedPublisherOnly *bool + // The applicationTenantIds property + applicationTenantIds []string + // The certifiedApplicationsOnly property + certifiedApplicationsOnly *bool +} +// NewServicePrincipalCreationConditionSet instantiates a new servicePrincipalCreationConditionSet and sets the default values. +func NewServicePrincipalCreationConditionSet()(*ServicePrincipalCreationConditionSet) { + m := &ServicePrincipalCreationConditionSet{ + Entity: *NewEntity(), + } + return m +} +// CreateServicePrincipalCreationConditionSetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalCreationConditionSetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalCreationConditionSet(), nil +} +// GetApplicationIds gets the applicationIds property value. The applicationIds property +func (m *ServicePrincipalCreationConditionSet) GetApplicationIds()([]string) { + return m.applicationIds +} +// GetApplicationPublisherIds gets the applicationPublisherIds property value. The applicationPublisherIds property +func (m *ServicePrincipalCreationConditionSet) GetApplicationPublisherIds()([]string) { + return m.applicationPublisherIds +} +// GetApplicationsFromVerifiedPublisherOnly gets the applicationsFromVerifiedPublisherOnly property value. The applicationsFromVerifiedPublisherOnly property +func (m *ServicePrincipalCreationConditionSet) GetApplicationsFromVerifiedPublisherOnly()(*bool) { + return m.applicationsFromVerifiedPublisherOnly +} +// GetApplicationTenantIds gets the applicationTenantIds property value. The applicationTenantIds property +func (m *ServicePrincipalCreationConditionSet) GetApplicationTenantIds()([]string) { + return m.applicationTenantIds +} +// GetCertifiedApplicationsOnly gets the certifiedApplicationsOnly property value. The certifiedApplicationsOnly property +func (m *ServicePrincipalCreationConditionSet) GetCertifiedApplicationsOnly()(*bool) { + return m.certifiedApplicationsOnly +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalCreationConditionSet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["applicationIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetApplicationIds(res) + } + return nil + } + res["applicationPublisherIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetApplicationPublisherIds(res) + } + return nil + } + res["applicationsFromVerifiedPublisherOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetApplicationsFromVerifiedPublisherOnly(val) + } + return nil + } + res["applicationTenantIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetApplicationTenantIds(res) + } + return nil + } + res["certifiedApplicationsOnly"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCertifiedApplicationsOnly(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ServicePrincipalCreationConditionSet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetApplicationIds() != nil { + err = writer.WriteCollectionOfStringValues("applicationIds", m.GetApplicationIds()) + if err != nil { + return err + } + } + if m.GetApplicationPublisherIds() != nil { + err = writer.WriteCollectionOfStringValues("applicationPublisherIds", m.GetApplicationPublisherIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("applicationsFromVerifiedPublisherOnly", m.GetApplicationsFromVerifiedPublisherOnly()) + if err != nil { + return err + } + } + if m.GetApplicationTenantIds() != nil { + err = writer.WriteCollectionOfStringValues("applicationTenantIds", m.GetApplicationTenantIds()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("certifiedApplicationsOnly", m.GetCertifiedApplicationsOnly()) + if err != nil { + return err + } + } + return nil +} +// SetApplicationIds sets the applicationIds property value. The applicationIds property +func (m *ServicePrincipalCreationConditionSet) SetApplicationIds(value []string)() { + m.applicationIds = value +} +// SetApplicationPublisherIds sets the applicationPublisherIds property value. The applicationPublisherIds property +func (m *ServicePrincipalCreationConditionSet) SetApplicationPublisherIds(value []string)() { + m.applicationPublisherIds = value +} +// SetApplicationsFromVerifiedPublisherOnly sets the applicationsFromVerifiedPublisherOnly property value. The applicationsFromVerifiedPublisherOnly property +func (m *ServicePrincipalCreationConditionSet) SetApplicationsFromVerifiedPublisherOnly(value *bool)() { + m.applicationsFromVerifiedPublisherOnly = value +} +// SetApplicationTenantIds sets the applicationTenantIds property value. The applicationTenantIds property +func (m *ServicePrincipalCreationConditionSet) SetApplicationTenantIds(value []string)() { + m.applicationTenantIds = value +} +// SetCertifiedApplicationsOnly sets the certifiedApplicationsOnly property value. The certifiedApplicationsOnly property +func (m *ServicePrincipalCreationConditionSet) SetCertifiedApplicationsOnly(value *bool)() { + m.certifiedApplicationsOnly = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_response.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_response.go new file mode 100644 index 000000000..295147f18 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationConditionSetCollectionResponse +type ServicePrincipalCreationConditionSetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServicePrincipalCreationConditionSetable +} +// NewServicePrincipalCreationConditionSetCollectionResponse instantiates a new ServicePrincipalCreationConditionSetCollectionResponse and sets the default values. +func NewServicePrincipalCreationConditionSetCollectionResponse()(*ServicePrincipalCreationConditionSetCollectionResponse) { + m := &ServicePrincipalCreationConditionSetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServicePrincipalCreationConditionSetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalCreationConditionSetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalCreationConditionSetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalCreationConditionSetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalCreationConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalCreationConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalCreationConditionSetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServicePrincipalCreationConditionSetCollectionResponse) GetValue()([]ServicePrincipalCreationConditionSetable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServicePrincipalCreationConditionSetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServicePrincipalCreationConditionSetCollectionResponse) SetValue(value []ServicePrincipalCreationConditionSetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_responseable.go new file mode 100644 index 000000000..28a136f93 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationConditionSetCollectionResponseable +type ServicePrincipalCreationConditionSetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServicePrincipalCreationConditionSetable) + SetValue(value []ServicePrincipalCreationConditionSetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_setable.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_setable.go new file mode 100644 index 000000000..feafec9f2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_condition_setable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationConditionSetable +type ServicePrincipalCreationConditionSetable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetApplicationIds()([]string) + GetApplicationPublisherIds()([]string) + GetApplicationsFromVerifiedPublisherOnly()(*bool) + GetApplicationTenantIds()([]string) + GetCertifiedApplicationsOnly()(*bool) + SetApplicationIds(value []string)() + SetApplicationPublisherIds(value []string)() + SetApplicationsFromVerifiedPublisherOnly(value *bool)() + SetApplicationTenantIds(value []string)() + SetCertifiedApplicationsOnly(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_policy.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy.go new file mode 100644 index 000000000..75de3a45e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy.go @@ -0,0 +1,130 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationPolicy +type ServicePrincipalCreationPolicy struct { + PolicyBase + // The excludes property + excludes []ServicePrincipalCreationConditionSetable + // The includes property + includes []ServicePrincipalCreationConditionSetable + // The isBuiltIn property + isBuiltIn *bool +} +// NewServicePrincipalCreationPolicy instantiates a new ServicePrincipalCreationPolicy and sets the default values. +func NewServicePrincipalCreationPolicy()(*ServicePrincipalCreationPolicy) { + m := &ServicePrincipalCreationPolicy{ + PolicyBase: *NewPolicyBase(), + } + odataTypeValue := "#microsoft.graph.servicePrincipalCreationPolicy"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServicePrincipalCreationPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalCreationPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalCreationPolicy(), nil +} +// GetExcludes gets the excludes property value. The excludes property +func (m *ServicePrincipalCreationPolicy) GetExcludes()([]ServicePrincipalCreationConditionSetable) { + return m.excludes +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalCreationPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.PolicyBase.GetFieldDeserializers() + res["excludes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalCreationConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalCreationConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalCreationConditionSetable) + } + m.SetExcludes(res) + } + return nil + } + res["includes"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalCreationConditionSetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalCreationConditionSetable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalCreationConditionSetable) + } + m.SetIncludes(res) + } + return nil + } + res["isBuiltIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsBuiltIn(val) + } + return nil + } + return res +} +// GetIncludes gets the includes property value. The includes property +func (m *ServicePrincipalCreationPolicy) GetIncludes()([]ServicePrincipalCreationConditionSetable) { + return m.includes +} +// GetIsBuiltIn gets the isBuiltIn property value. The isBuiltIn property +func (m *ServicePrincipalCreationPolicy) GetIsBuiltIn()(*bool) { + return m.isBuiltIn +} +// Serialize serializes information the current object +func (m *ServicePrincipalCreationPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.PolicyBase.Serialize(writer) + if err != nil { + return err + } + if m.GetExcludes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetExcludes())) + for i, v := range m.GetExcludes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("excludes", cast) + if err != nil { + return err + } + } + if m.GetIncludes() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetIncludes())) + for i, v := range m.GetIncludes() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("includes", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isBuiltIn", m.GetIsBuiltIn()) + if err != nil { + return err + } + } + return nil +} +// SetExcludes sets the excludes property value. The excludes property +func (m *ServicePrincipalCreationPolicy) SetExcludes(value []ServicePrincipalCreationConditionSetable)() { + m.excludes = value +} +// SetIncludes sets the includes property value. The includes property +func (m *ServicePrincipalCreationPolicy) SetIncludes(value []ServicePrincipalCreationConditionSetable)() { + m.includes = value +} +// SetIsBuiltIn sets the isBuiltIn property value. The isBuiltIn property +func (m *ServicePrincipalCreationPolicy) SetIsBuiltIn(value *bool)() { + m.isBuiltIn = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_response.go new file mode 100644 index 000000000..2bd902ef7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationPolicyCollectionResponse +type ServicePrincipalCreationPolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServicePrincipalCreationPolicyable +} +// NewServicePrincipalCreationPolicyCollectionResponse instantiates a new ServicePrincipalCreationPolicyCollectionResponse and sets the default values. +func NewServicePrincipalCreationPolicyCollectionResponse()(*ServicePrincipalCreationPolicyCollectionResponse) { + m := &ServicePrincipalCreationPolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServicePrincipalCreationPolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalCreationPolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalCreationPolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalCreationPolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalCreationPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalCreationPolicyable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalCreationPolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServicePrincipalCreationPolicyCollectionResponse) GetValue()([]ServicePrincipalCreationPolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServicePrincipalCreationPolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServicePrincipalCreationPolicyCollectionResponse) SetValue(value []ServicePrincipalCreationPolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_responseable.go new file mode 100644 index 000000000..148b30558 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationPolicyCollectionResponseable +type ServicePrincipalCreationPolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServicePrincipalCreationPolicyable) + SetValue(value []ServicePrincipalCreationPolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_creation_policyable.go b/src/internal/connector/graph/betasdk/models/service_principal_creation_policyable.go new file mode 100644 index 000000000..71ae00fc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_creation_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalCreationPolicyable +type ServicePrincipalCreationPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + PolicyBaseable + GetExcludes()([]ServicePrincipalCreationConditionSetable) + GetIncludes()([]ServicePrincipalCreationConditionSetable) + GetIsBuiltIn()(*bool) + SetExcludes(value []ServicePrincipalCreationConditionSetable)() + SetIncludes(value []ServicePrincipalCreationConditionSetable)() + SetIsBuiltIn(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_identity.go b/src/internal/connector/graph/betasdk/models/service_principal_identity.go new file mode 100644 index 000000000..0129aaaf7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_identity.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalIdentity +type ServicePrincipalIdentity struct { + Identity + // The application identifier of the service principal. + appId *string +} +// NewServicePrincipalIdentity instantiates a new ServicePrincipalIdentity and sets the default values. +func NewServicePrincipalIdentity()(*ServicePrincipalIdentity) { + m := &ServicePrincipalIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.servicePrincipalIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServicePrincipalIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalIdentity(), nil +} +// GetAppId gets the appId property value. The application identifier of the service principal. +func (m *ServicePrincipalIdentity) GetAppId()(*string) { + return m.appId +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + return res +} +// Serialize serializes information the current object +func (m *ServicePrincipalIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + return nil +} +// SetAppId sets the appId property value. The application identifier of the service principal. +func (m *ServicePrincipalIdentity) SetAppId(value *string)() { + m.appId = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_identityable.go b/src/internal/connector/graph/betasdk/models/service_principal_identityable.go new file mode 100644 index 000000000..09ef05206 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_identityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalIdentityable +type ServicePrincipalIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAppId()(*string) + SetAppId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_lock_configuration.go b/src/internal/connector/graph/betasdk/models/service_principal_lock_configuration.go new file mode 100644 index 000000000..83f707373 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_lock_configuration.go @@ -0,0 +1,201 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalLockConfiguration +type ServicePrincipalLockConfiguration struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Enables locking all sensitive properties. The sensitive properties are keyCredentials, passwordCredentials, and tokenEncryptionKeyId. + allProperties *bool + // Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Sign. + credentialsWithUsageSign *bool + // Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Verify. This locks OAuth service principals. + credentialsWithUsageVerify *bool + // Enables or disables service principal lock configuration. To allow the sensitive properties to be updated, update this property to false to disable the lock on the service principal. + isEnabled *bool + // The OdataType property + odataType *string + // Locks the tokenEncryptionKeyId property for modification on the service principal. + tokenEncryptionKeyId *bool +} +// NewServicePrincipalLockConfiguration instantiates a new servicePrincipalLockConfiguration and sets the default values. +func NewServicePrincipalLockConfiguration()(*ServicePrincipalLockConfiguration) { + m := &ServicePrincipalLockConfiguration{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServicePrincipalLockConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalLockConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalLockConfiguration(), 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 *ServicePrincipalLockConfiguration) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetAllProperties gets the allProperties property value. Enables locking all sensitive properties. The sensitive properties are keyCredentials, passwordCredentials, and tokenEncryptionKeyId. +func (m *ServicePrincipalLockConfiguration) GetAllProperties()(*bool) { + return m.allProperties +} +// GetCredentialsWithUsageSign gets the credentialsWithUsageSign property value. Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Sign. +func (m *ServicePrincipalLockConfiguration) GetCredentialsWithUsageSign()(*bool) { + return m.credentialsWithUsageSign +} +// GetCredentialsWithUsageVerify gets the credentialsWithUsageVerify property value. Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Verify. This locks OAuth service principals. +func (m *ServicePrincipalLockConfiguration) GetCredentialsWithUsageVerify()(*bool) { + return m.credentialsWithUsageVerify +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalLockConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["allProperties"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllProperties(val) + } + return nil + } + res["credentialsWithUsageSign"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialsWithUsageSign(val) + } + return nil + } + res["credentialsWithUsageVerify"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetCredentialsWithUsageVerify(val) + } + return nil + } + res["isEnabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsEnabled(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["tokenEncryptionKeyId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetTokenEncryptionKeyId(val) + } + return nil + } + return res +} +// GetIsEnabled gets the isEnabled property value. Enables or disables service principal lock configuration. To allow the sensitive properties to be updated, update this property to false to disable the lock on the service principal. +func (m *ServicePrincipalLockConfiguration) GetIsEnabled()(*bool) { + return m.isEnabled +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServicePrincipalLockConfiguration) GetOdataType()(*string) { + return m.odataType +} +// GetTokenEncryptionKeyId gets the tokenEncryptionKeyId property value. Locks the tokenEncryptionKeyId property for modification on the service principal. +func (m *ServicePrincipalLockConfiguration) GetTokenEncryptionKeyId()(*bool) { + return m.tokenEncryptionKeyId +} +// Serialize serializes information the current object +func (m *ServicePrincipalLockConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("allProperties", m.GetAllProperties()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("credentialsWithUsageSign", m.GetCredentialsWithUsageSign()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("credentialsWithUsageVerify", m.GetCredentialsWithUsageVerify()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isEnabled", m.GetIsEnabled()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("tokenEncryptionKeyId", m.GetTokenEncryptionKeyId()) + 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 *ServicePrincipalLockConfiguration) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetAllProperties sets the allProperties property value. Enables locking all sensitive properties. The sensitive properties are keyCredentials, passwordCredentials, and tokenEncryptionKeyId. +func (m *ServicePrincipalLockConfiguration) SetAllProperties(value *bool)() { + m.allProperties = value +} +// SetCredentialsWithUsageSign sets the credentialsWithUsageSign property value. Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Sign. +func (m *ServicePrincipalLockConfiguration) SetCredentialsWithUsageSign(value *bool)() { + m.credentialsWithUsageSign = value +} +// SetCredentialsWithUsageVerify sets the credentialsWithUsageVerify property value. Locks the keyCredentials and passwordCredentials properties for modification where credential usage type is Verify. This locks OAuth service principals. +func (m *ServicePrincipalLockConfiguration) SetCredentialsWithUsageVerify(value *bool)() { + m.credentialsWithUsageVerify = value +} +// SetIsEnabled sets the isEnabled property value. Enables or disables service principal lock configuration. To allow the sensitive properties to be updated, update this property to false to disable the lock on the service principal. +func (m *ServicePrincipalLockConfiguration) SetIsEnabled(value *bool)() { + m.isEnabled = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServicePrincipalLockConfiguration) SetOdataType(value *string)() { + m.odataType = value +} +// SetTokenEncryptionKeyId sets the tokenEncryptionKeyId property value. Locks the tokenEncryptionKeyId property for modification on the service principal. +func (m *ServicePrincipalLockConfiguration) SetTokenEncryptionKeyId(value *bool)() { + m.tokenEncryptionKeyId = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_lock_configurationable.go b/src/internal/connector/graph/betasdk/models/service_principal_lock_configurationable.go new file mode 100644 index 000000000..04b24bed6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_lock_configurationable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalLockConfigurationable +type ServicePrincipalLockConfigurationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAllProperties()(*bool) + GetCredentialsWithUsageSign()(*bool) + GetCredentialsWithUsageVerify()(*bool) + GetIsEnabled()(*bool) + GetOdataType()(*string) + GetTokenEncryptionKeyId()(*bool) + SetAllProperties(value *bool)() + SetCredentialsWithUsageSign(value *bool)() + SetCredentialsWithUsageVerify(value *bool)() + SetIsEnabled(value *bool)() + SetOdataType(value *string)() + SetTokenEncryptionKeyId(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_risk_detection.go b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection.go new file mode 100644 index 000000000..ac47845ed --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection.go @@ -0,0 +1,565 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalRiskDetection +type ServicePrincipalRiskDetection struct { + Entity + // Indicates the activity type the detected risk is linked to. The possible values are: signin, servicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: servicePrincipal. + activity *ActivityType + // Date and time when the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z + activityDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Additional information associated with the risk detection. This string value is represented as a JSON object with the quotations escaped. + additionalInfo *string + // The unique identifier for the associated application. + appId *string + // Correlation ID of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. + correlationId *string + // Date and time when the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. + detectedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Timing of the detected risk , whether real-time or offline). The possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue. + detectionTimingType *RiskDetectionTimingType + // Provides the IP address of the client from where the risk occurred. + ipAddress *string + // The unique identifier (GUID) for the key credential associated with the risk detection. + keyIds []string + // Date and time when the risk detection was last updated. + lastUpdatedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // Location from where the sign-in was initiated. + location SignInLocationable + // Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq). + requestId *string + // Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. + riskDetail *RiskDetail + // The type of risk event detected. The possible values are: investigationsThreatIntelligence, generic, adminConfirmedServicePrincipalCompromised, suspiciousSignins, leakedCredentials, anomalousServicePrincipalActivity, maliciousApplication, suspiciousApplication. + riskEventType *string + // Level of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: low, medium, high, hidden, none. + riskLevel *RiskLevel + // The state of a detected risky service principal or sign-in activity. The possible values are: none, dismissed, atRisk, confirmedCompromised. + riskState *RiskState + // The display name for the service principal. + servicePrincipalDisplayName *string + // The unique identifier for the service principal. Supports $filter (eq). + servicePrincipalId *string + // Source of the risk detection. For example, identityProtection. + source *string + // Indicates the type of token issuer for the detected sign-in risk. The possible values are: AzureAD. + tokenIssuerType *TokenIssuerType +} +// NewServicePrincipalRiskDetection instantiates a new ServicePrincipalRiskDetection and sets the default values. +func NewServicePrincipalRiskDetection()(*ServicePrincipalRiskDetection) { + m := &ServicePrincipalRiskDetection{ + Entity: *NewEntity(), + } + return m +} +// CreateServicePrincipalRiskDetectionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalRiskDetectionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalRiskDetection(), nil +} +// GetActivity gets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are: signin, servicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: servicePrincipal. +func (m *ServicePrincipalRiskDetection) GetActivity()(*ActivityType) { + return m.activity +} +// GetActivityDateTime gets the activityDateTime property value. Date and time when the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ServicePrincipalRiskDetection) GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.activityDateTime +} +// GetAdditionalInfo gets the additionalInfo property value. Additional information associated with the risk detection. This string value is represented as a JSON object with the quotations escaped. +func (m *ServicePrincipalRiskDetection) GetAdditionalInfo()(*string) { + return m.additionalInfo +} +// GetAppId gets the appId property value. The unique identifier for the associated application. +func (m *ServicePrincipalRiskDetection) GetAppId()(*string) { + return m.appId +} +// GetCorrelationId gets the correlationId property value. Correlation ID of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. +func (m *ServicePrincipalRiskDetection) GetCorrelationId()(*string) { + return m.correlationId +} +// GetDetectedDateTime gets the detectedDateTime property value. Date and time when the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ServicePrincipalRiskDetection) GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.detectedDateTime +} +// GetDetectionTimingType gets the detectionTimingType property value. Timing of the detected risk , whether real-time or offline). The possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue. +func (m *ServicePrincipalRiskDetection) GetDetectionTimingType()(*RiskDetectionTimingType) { + return m.detectionTimingType +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalRiskDetection) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["activity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseActivityType) + if err != nil { + return err + } + if val != nil { + m.SetActivity(val.(*ActivityType)) + } + return nil + } + res["activityDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActivityDateTime(val) + } + return nil + } + res["additionalInfo"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAdditionalInfo(val) + } + return nil + } + res["appId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetAppId(val) + } + return nil + } + res["correlationId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetCorrelationId(val) + } + return nil + } + res["detectedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetDetectedDateTime(val) + } + return nil + } + res["detectionTimingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetectionTimingType) + if err != nil { + return err + } + if val != nil { + m.SetDetectionTimingType(val.(*RiskDetectionTimingType)) + } + return nil + } + res["ipAddress"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetIpAddress(val) + } + return nil + } + res["keyIds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetKeyIds(res) + } + return nil + } + res["lastUpdatedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetLastUpdatedDateTime(val) + } + return nil + } + res["location"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSignInLocationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLocation(val.(SignInLocationable)) + } + return nil + } + res["requestId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRequestId(val) + } + return nil + } + res["riskDetail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskDetail) + if err != nil { + return err + } + if val != nil { + m.SetRiskDetail(val.(*RiskDetail)) + } + return nil + } + res["riskEventType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRiskEventType(val) + } + return nil + } + res["riskLevel"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskLevel) + if err != nil { + return err + } + if val != nil { + m.SetRiskLevel(val.(*RiskLevel)) + } + return nil + } + res["riskState"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseRiskState) + if err != nil { + return err + } + if val != nil { + m.SetRiskState(val.(*RiskState)) + } + return nil + } + res["servicePrincipalDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalDisplayName(val) + } + return nil + } + res["servicePrincipalId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetServicePrincipalId(val) + } + return nil + } + res["source"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSource(val) + } + return nil + } + res["tokenIssuerType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseTokenIssuerType) + if err != nil { + return err + } + if val != nil { + m.SetTokenIssuerType(val.(*TokenIssuerType)) + } + return nil + } + return res +} +// GetIpAddress gets the ipAddress property value. Provides the IP address of the client from where the risk occurred. +func (m *ServicePrincipalRiskDetection) GetIpAddress()(*string) { + return m.ipAddress +} +// GetKeyIds gets the keyIds property value. The unique identifier (GUID) for the key credential associated with the risk detection. +func (m *ServicePrincipalRiskDetection) GetKeyIds()([]string) { + return m.keyIds +} +// GetLastUpdatedDateTime gets the lastUpdatedDateTime property value. Date and time when the risk detection was last updated. +func (m *ServicePrincipalRiskDetection) GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.lastUpdatedDateTime +} +// GetLocation gets the location property value. Location from where the sign-in was initiated. +func (m *ServicePrincipalRiskDetection) GetLocation()(SignInLocationable) { + return m.location +} +// GetRequestId gets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq). +func (m *ServicePrincipalRiskDetection) GetRequestId()(*string) { + return m.requestId +} +// GetRiskDetail gets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *ServicePrincipalRiskDetection) GetRiskDetail()(*RiskDetail) { + return m.riskDetail +} +// GetRiskEventType gets the riskEventType property value. The type of risk event detected. The possible values are: investigationsThreatIntelligence, generic, adminConfirmedServicePrincipalCompromised, suspiciousSignins, leakedCredentials, anomalousServicePrincipalActivity, maliciousApplication, suspiciousApplication. +func (m *ServicePrincipalRiskDetection) GetRiskEventType()(*string) { + return m.riskEventType +} +// GetRiskLevel gets the riskLevel property value. Level of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: low, medium, high, hidden, none. +func (m *ServicePrincipalRiskDetection) GetRiskLevel()(*RiskLevel) { + return m.riskLevel +} +// GetRiskState gets the riskState property value. The state of a detected risky service principal or sign-in activity. The possible values are: none, dismissed, atRisk, confirmedCompromised. +func (m *ServicePrincipalRiskDetection) GetRiskState()(*RiskState) { + return m.riskState +} +// GetServicePrincipalDisplayName gets the servicePrincipalDisplayName property value. The display name for the service principal. +func (m *ServicePrincipalRiskDetection) GetServicePrincipalDisplayName()(*string) { + return m.servicePrincipalDisplayName +} +// GetServicePrincipalId gets the servicePrincipalId property value. The unique identifier for the service principal. Supports $filter (eq). +func (m *ServicePrincipalRiskDetection) GetServicePrincipalId()(*string) { + return m.servicePrincipalId +} +// GetSource gets the source property value. Source of the risk detection. For example, identityProtection. +func (m *ServicePrincipalRiskDetection) GetSource()(*string) { + return m.source +} +// GetTokenIssuerType gets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are: AzureAD. +func (m *ServicePrincipalRiskDetection) GetTokenIssuerType()(*TokenIssuerType) { + return m.tokenIssuerType +} +// Serialize serializes information the current object +func (m *ServicePrincipalRiskDetection) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + if m.GetActivity() != nil { + cast := (*m.GetActivity()).String() + err = writer.WriteStringValue("activity", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("activityDateTime", m.GetActivityDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("additionalInfo", m.GetAdditionalInfo()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("appId", m.GetAppId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("correlationId", m.GetCorrelationId()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("detectedDateTime", m.GetDetectedDateTime()) + if err != nil { + return err + } + } + if m.GetDetectionTimingType() != nil { + cast := (*m.GetDetectionTimingType()).String() + err = writer.WriteStringValue("detectionTimingType", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("ipAddress", m.GetIpAddress()) + if err != nil { + return err + } + } + if m.GetKeyIds() != nil { + err = writer.WriteCollectionOfStringValues("keyIds", m.GetKeyIds()) + if err != nil { + return err + } + } + { + err = writer.WriteTimeValue("lastUpdatedDateTime", m.GetLastUpdatedDateTime()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("location", m.GetLocation()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("requestId", m.GetRequestId()) + if err != nil { + return err + } + } + if m.GetRiskDetail() != nil { + cast := (*m.GetRiskDetail()).String() + err = writer.WriteStringValue("riskDetail", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("riskEventType", m.GetRiskEventType()) + if err != nil { + return err + } + } + if m.GetRiskLevel() != nil { + cast := (*m.GetRiskLevel()).String() + err = writer.WriteStringValue("riskLevel", &cast) + if err != nil { + return err + } + } + if m.GetRiskState() != nil { + cast := (*m.GetRiskState()).String() + err = writer.WriteStringValue("riskState", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalDisplayName", m.GetServicePrincipalDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("servicePrincipalId", m.GetServicePrincipalId()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("source", m.GetSource()) + if err != nil { + return err + } + } + if m.GetTokenIssuerType() != nil { + cast := (*m.GetTokenIssuerType()).String() + err = writer.WriteStringValue("tokenIssuerType", &cast) + if err != nil { + return err + } + } + return nil +} +// SetActivity sets the activity property value. Indicates the activity type the detected risk is linked to. The possible values are: signin, servicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: servicePrincipal. +func (m *ServicePrincipalRiskDetection) SetActivity(value *ActivityType)() { + m.activity = value +} +// SetActivityDateTime sets the activityDateTime property value. Date and time when the risky activity occurred. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z +func (m *ServicePrincipalRiskDetection) SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.activityDateTime = value +} +// SetAdditionalInfo sets the additionalInfo property value. Additional information associated with the risk detection. This string value is represented as a JSON object with the quotations escaped. +func (m *ServicePrincipalRiskDetection) SetAdditionalInfo(value *string)() { + m.additionalInfo = value +} +// SetAppId sets the appId property value. The unique identifier for the associated application. +func (m *ServicePrincipalRiskDetection) SetAppId(value *string)() { + m.appId = value +} +// SetCorrelationId sets the correlationId property value. Correlation ID of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. +func (m *ServicePrincipalRiskDetection) SetCorrelationId(value *string)() { + m.correlationId = value +} +// SetDetectedDateTime sets the detectedDateTime property value. Date and time when the risk was detected. The DateTimeOffset type represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. +func (m *ServicePrincipalRiskDetection) SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.detectedDateTime = value +} +// SetDetectionTimingType sets the detectionTimingType property value. Timing of the detected risk , whether real-time or offline). The possible values are: notDefined, realtime, nearRealtime, offline, unknownFutureValue. +func (m *ServicePrincipalRiskDetection) SetDetectionTimingType(value *RiskDetectionTimingType)() { + m.detectionTimingType = value +} +// SetIpAddress sets the ipAddress property value. Provides the IP address of the client from where the risk occurred. +func (m *ServicePrincipalRiskDetection) SetIpAddress(value *string)() { + m.ipAddress = value +} +// SetKeyIds sets the keyIds property value. The unique identifier (GUID) for the key credential associated with the risk detection. +func (m *ServicePrincipalRiskDetection) SetKeyIds(value []string)() { + m.keyIds = value +} +// SetLastUpdatedDateTime sets the lastUpdatedDateTime property value. Date and time when the risk detection was last updated. +func (m *ServicePrincipalRiskDetection) SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.lastUpdatedDateTime = value +} +// SetLocation sets the location property value. Location from where the sign-in was initiated. +func (m *ServicePrincipalRiskDetection) SetLocation(value SignInLocationable)() { + m.location = value +} +// SetRequestId sets the requestId property value. Request identifier of the sign-in activity associated with the risk detection. This property is null if the risk detection is not associated with a sign-in activity. Supports $filter (eq). +func (m *ServicePrincipalRiskDetection) SetRequestId(value *string)() { + m.requestId = value +} +// SetRiskDetail sets the riskDetail property value. Details of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: none, hidden, adminConfirmedServicePrincipalCompromised, adminDismissedAllRiskForServicePrincipal. Note that you must use the Prefer: include-unknown-enum-members request header to get the following value(s) in this evolvable enum: adminConfirmedServicePrincipalCompromised , adminDismissedAllRiskForServicePrincipal. +func (m *ServicePrincipalRiskDetection) SetRiskDetail(value *RiskDetail)() { + m.riskDetail = value +} +// SetRiskEventType sets the riskEventType property value. The type of risk event detected. The possible values are: investigationsThreatIntelligence, generic, adminConfirmedServicePrincipalCompromised, suspiciousSignins, leakedCredentials, anomalousServicePrincipalActivity, maliciousApplication, suspiciousApplication. +func (m *ServicePrincipalRiskDetection) SetRiskEventType(value *string)() { + m.riskEventType = value +} +// SetRiskLevel sets the riskLevel property value. Level of the detected risk. Note: Details for this property are only available for Workload Identities Premium customers. Events in tenants without this license will be returned hidden. The possible values are: low, medium, high, hidden, none. +func (m *ServicePrincipalRiskDetection) SetRiskLevel(value *RiskLevel)() { + m.riskLevel = value +} +// SetRiskState sets the riskState property value. The state of a detected risky service principal or sign-in activity. The possible values are: none, dismissed, atRisk, confirmedCompromised. +func (m *ServicePrincipalRiskDetection) SetRiskState(value *RiskState)() { + m.riskState = value +} +// SetServicePrincipalDisplayName sets the servicePrincipalDisplayName property value. The display name for the service principal. +func (m *ServicePrincipalRiskDetection) SetServicePrincipalDisplayName(value *string)() { + m.servicePrincipalDisplayName = value +} +// SetServicePrincipalId sets the servicePrincipalId property value. The unique identifier for the service principal. Supports $filter (eq). +func (m *ServicePrincipalRiskDetection) SetServicePrincipalId(value *string)() { + m.servicePrincipalId = value +} +// SetSource sets the source property value. Source of the risk detection. For example, identityProtection. +func (m *ServicePrincipalRiskDetection) SetSource(value *string)() { + m.source = value +} +// SetTokenIssuerType sets the tokenIssuerType property value. Indicates the type of token issuer for the detected sign-in risk. The possible values are: AzureAD. +func (m *ServicePrincipalRiskDetection) SetTokenIssuerType(value *TokenIssuerType)() { + m.tokenIssuerType = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_response.go b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_response.go new file mode 100644 index 000000000..4363e8f5c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalRiskDetectionCollectionResponse +type ServicePrincipalRiskDetectionCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServicePrincipalRiskDetectionable +} +// NewServicePrincipalRiskDetectionCollectionResponse instantiates a new ServicePrincipalRiskDetectionCollectionResponse and sets the default values. +func NewServicePrincipalRiskDetectionCollectionResponse()(*ServicePrincipalRiskDetectionCollectionResponse) { + m := &ServicePrincipalRiskDetectionCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServicePrincipalRiskDetectionCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServicePrincipalRiskDetectionCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServicePrincipalRiskDetectionCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServicePrincipalRiskDetectionCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServicePrincipalRiskDetectionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServicePrincipalRiskDetectionable, len(val)) + for i, v := range val { + res[i] = v.(ServicePrincipalRiskDetectionable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServicePrincipalRiskDetectionCollectionResponse) GetValue()([]ServicePrincipalRiskDetectionable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServicePrincipalRiskDetectionCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServicePrincipalRiskDetectionCollectionResponse) SetValue(value []ServicePrincipalRiskDetectionable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_responseable.go new file mode 100644 index 000000000..8a7d179fd --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_risk_detection_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalRiskDetectionCollectionResponseable +type ServicePrincipalRiskDetectionCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServicePrincipalRiskDetectionable) + SetValue(value []ServicePrincipalRiskDetectionable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principal_risk_detectionable.go b/src/internal/connector/graph/betasdk/models/service_principal_risk_detectionable.go new file mode 100644 index 000000000..689f430c3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principal_risk_detectionable.go @@ -0,0 +1,52 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalRiskDetectionable +type ServicePrincipalRiskDetectionable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetActivity()(*ActivityType) + GetActivityDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAdditionalInfo()(*string) + GetAppId()(*string) + GetCorrelationId()(*string) + GetDetectedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetDetectionTimingType()(*RiskDetectionTimingType) + GetIpAddress()(*string) + GetKeyIds()([]string) + GetLastUpdatedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetLocation()(SignInLocationable) + GetRequestId()(*string) + GetRiskDetail()(*RiskDetail) + GetRiskEventType()(*string) + GetRiskLevel()(*RiskLevel) + GetRiskState()(*RiskState) + GetServicePrincipalDisplayName()(*string) + GetServicePrincipalId()(*string) + GetSource()(*string) + GetTokenIssuerType()(*TokenIssuerType) + SetActivity(value *ActivityType)() + SetActivityDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAdditionalInfo(value *string)() + SetAppId(value *string)() + SetCorrelationId(value *string)() + SetDetectedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetDetectionTimingType(value *RiskDetectionTimingType)() + SetIpAddress(value *string)() + SetKeyIds(value []string)() + SetLastUpdatedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetLocation(value SignInLocationable)() + SetRequestId(value *string)() + SetRiskDetail(value *RiskDetail)() + SetRiskEventType(value *string)() + SetRiskLevel(value *RiskLevel)() + SetRiskState(value *RiskState)() + SetServicePrincipalDisplayName(value *string)() + SetServicePrincipalId(value *string)() + SetSource(value *string)() + SetTokenIssuerType(value *TokenIssuerType)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_principalable.go b/src/internal/connector/graph/betasdk/models/service_principalable.go new file mode 100644 index 000000000..34af687df --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_principalable.go @@ -0,0 +1,125 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22 "github.com/google/uuid" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServicePrincipalable +type ServicePrincipalable interface { + DirectoryObjectable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountEnabled()(*bool) + GetAddIns()([]AddInable) + GetAlternativeNames()([]string) + GetAppDescription()(*string) + GetAppDisplayName()(*string) + GetAppId()(*string) + GetApplicationTemplateId()(*string) + GetAppManagementPolicies()([]AppManagementPolicyable) + GetAppOwnerOrganizationId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetAppRoleAssignedTo()([]AppRoleAssignmentable) + GetAppRoleAssignmentRequired()(*bool) + GetAppRoleAssignments()([]AppRoleAssignmentable) + GetAppRoles()([]AppRoleable) + GetClaimsMappingPolicies()([]ClaimsMappingPolicyable) + GetCreatedObjects()([]DirectoryObjectable) + GetCustomSecurityAttributes()(CustomSecurityAttributeValueable) + GetDelegatedPermissionClassifications()([]DelegatedPermissionClassificationable) + GetDescription()(*string) + GetDisabledByMicrosoftStatus()(*string) + GetDisplayName()(*string) + GetEndpoints()([]Endpointable) + GetErrorUrl()(*string) + GetFederatedIdentityCredentials()([]FederatedIdentityCredentialable) + GetHomepage()(*string) + GetHomeRealmDiscoveryPolicies()([]HomeRealmDiscoveryPolicyable) + GetInfo()(InformationalUrlable) + GetKeyCredentials()([]KeyCredentialable) + GetLicenseDetails()([]LicenseDetailsable) + GetLoginUrl()(*string) + GetLogoutUrl()(*string) + GetMemberOf()([]DirectoryObjectable) + GetNotes()(*string) + GetNotificationEmailAddresses()([]string) + GetOauth2PermissionGrants()([]OAuth2PermissionGrantable) + GetOwnedObjects()([]DirectoryObjectable) + GetOwners()([]DirectoryObjectable) + GetPasswordCredentials()([]PasswordCredentialable) + GetPasswordSingleSignOnSettings()(PasswordSingleSignOnSettingsable) + GetPreferredSingleSignOnMode()(*string) + GetPreferredTokenSigningKeyEndDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetPreferredTokenSigningKeyThumbprint()(*string) + GetPublishedPermissionScopes()([]PermissionScopeable) + GetPublisherName()(*string) + GetReplyUrls()([]string) + GetSamlMetadataUrl()(*string) + GetSamlSingleSignOnSettings()(SamlSingleSignOnSettingsable) + GetServicePrincipalNames()([]string) + GetServicePrincipalType()(*string) + GetSignInAudience()(*string) + GetSynchronization()(Synchronizationable) + GetTags()([]string) + GetTokenEncryptionKeyId()(*i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID) + GetTokenIssuancePolicies()([]TokenIssuancePolicyable) + GetTokenLifetimePolicies()([]TokenLifetimePolicyable) + GetTransitiveMemberOf()([]DirectoryObjectable) + GetVerifiedPublisher()(VerifiedPublisherable) + SetAccountEnabled(value *bool)() + SetAddIns(value []AddInable)() + SetAlternativeNames(value []string)() + SetAppDescription(value *string)() + SetAppDisplayName(value *string)() + SetAppId(value *string)() + SetApplicationTemplateId(value *string)() + SetAppManagementPolicies(value []AppManagementPolicyable)() + SetAppOwnerOrganizationId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetAppRoleAssignedTo(value []AppRoleAssignmentable)() + SetAppRoleAssignmentRequired(value *bool)() + SetAppRoleAssignments(value []AppRoleAssignmentable)() + SetAppRoles(value []AppRoleable)() + SetClaimsMappingPolicies(value []ClaimsMappingPolicyable)() + SetCreatedObjects(value []DirectoryObjectable)() + SetCustomSecurityAttributes(value CustomSecurityAttributeValueable)() + SetDelegatedPermissionClassifications(value []DelegatedPermissionClassificationable)() + SetDescription(value *string)() + SetDisabledByMicrosoftStatus(value *string)() + SetDisplayName(value *string)() + SetEndpoints(value []Endpointable)() + SetErrorUrl(value *string)() + SetFederatedIdentityCredentials(value []FederatedIdentityCredentialable)() + SetHomepage(value *string)() + SetHomeRealmDiscoveryPolicies(value []HomeRealmDiscoveryPolicyable)() + SetInfo(value InformationalUrlable)() + SetKeyCredentials(value []KeyCredentialable)() + SetLicenseDetails(value []LicenseDetailsable)() + SetLoginUrl(value *string)() + SetLogoutUrl(value *string)() + SetMemberOf(value []DirectoryObjectable)() + SetNotes(value *string)() + SetNotificationEmailAddresses(value []string)() + SetOauth2PermissionGrants(value []OAuth2PermissionGrantable)() + SetOwnedObjects(value []DirectoryObjectable)() + SetOwners(value []DirectoryObjectable)() + SetPasswordCredentials(value []PasswordCredentialable)() + SetPasswordSingleSignOnSettings(value PasswordSingleSignOnSettingsable)() + SetPreferredSingleSignOnMode(value *string)() + SetPreferredTokenSigningKeyEndDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetPreferredTokenSigningKeyThumbprint(value *string)() + SetPublishedPermissionScopes(value []PermissionScopeable)() + SetPublisherName(value *string)() + SetReplyUrls(value []string)() + SetSamlMetadataUrl(value *string)() + SetSamlSingleSignOnSettings(value SamlSingleSignOnSettingsable)() + SetServicePrincipalNames(value []string)() + SetServicePrincipalType(value *string)() + SetSignInAudience(value *string)() + SetSynchronization(value Synchronizationable)() + SetTags(value []string)() + SetTokenEncryptionKeyId(value *i561e97a8befe7661a44c8f54600992b4207a3a0cf6770e5559949bc276de2e22.UUID)() + SetTokenIssuancePolicies(value []TokenIssuancePolicyable)() + SetTokenLifetimePolicies(value []TokenLifetimePolicyable)() + SetTransitiveMemberOf(value []DirectoryObjectable)() + SetVerifiedPublisher(value VerifiedPublisherable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_start_type.go b/src/internal/connector/graph/betasdk/models/service_start_type.go new file mode 100644 index 000000000..8ea090990 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_start_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceStartType int + +const ( + // Manual service start type(default) + MANUAL_SERVICESTARTTYPE ServiceStartType = iota + // Automatic service start type + AUTOMATIC_SERVICESTARTTYPE + // Service start type disabled + DISABLED_SERVICESTARTTYPE +) + +func (i ServiceStartType) String() string { + return []string{"manual", "automatic", "disabled"}[i] +} +func ParseServiceStartType(v string) (interface{}, error) { + result := MANUAL_SERVICESTARTTYPE + switch v { + case "manual": + result = MANUAL_SERVICESTARTTYPE + case "automatic": + result = AUTOMATIC_SERVICESTARTTYPE + case "disabled": + result = DISABLED_SERVICESTARTTYPE + default: + return 0, errors.New("Unknown ServiceStartType value: " + v) + } + return &result, nil +} +func SerializeServiceStartType(values []ServiceStartType) []string { + 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/service_update_category.go b/src/internal/connector/graph/betasdk/models/service_update_category.go new file mode 100644 index 000000000..497ef6f82 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_category.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceUpdateCategory int + +const ( + PREVENTORFIXISSUE_SERVICEUPDATECATEGORY ServiceUpdateCategory = iota + PLANFORCHANGE_SERVICEUPDATECATEGORY + STAYINFORMED_SERVICEUPDATECATEGORY + UNKNOWNFUTUREVALUE_SERVICEUPDATECATEGORY +) + +func (i ServiceUpdateCategory) String() string { + return []string{"preventOrFixIssue", "planForChange", "stayInformed", "unknownFutureValue"}[i] +} +func ParseServiceUpdateCategory(v string) (interface{}, error) { + result := PREVENTORFIXISSUE_SERVICEUPDATECATEGORY + switch v { + case "preventOrFixIssue": + result = PREVENTORFIXISSUE_SERVICEUPDATECATEGORY + case "planForChange": + result = PLANFORCHANGE_SERVICEUPDATECATEGORY + case "stayInformed": + result = STAYINFORMED_SERVICEUPDATECATEGORY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEUPDATECATEGORY + default: + return 0, errors.New("Unknown ServiceUpdateCategory value: " + v) + } + return &result, nil +} +func SerializeServiceUpdateCategory(values []ServiceUpdateCategory) []string { + 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/service_update_message.go b/src/internal/connector/graph/betasdk/models/service_update_message.go new file mode 100644 index 000000000..0d3ee6286 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_message.go @@ -0,0 +1,341 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessage +type ServiceUpdateMessage struct { + ServiceAnnouncementBase + // The expected deadline of the action for the message. + actionRequiredByDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // A collection of serviceAnnouncementAttachments. + attachments []ServiceAnnouncementAttachmentable + // The zip file of all attachments for a message. + attachmentsArchive []byte + // The body property + body ItemBodyable + // The category property + category *ServiceUpdateCategory + // Indicates whether the message has any attachment. + hasAttachments *bool + // Indicates whether the message describes a major update for the service. + isMajorChange *bool + // The affected services by the service message. + services []string + // The severity property + severity *ServiceUpdateSeverity + // A collection of tags for the service message. Tags are provided by the service team/support team who post the message to tell whether this message contains privacy data, or whether this message is for a service new feature update, and so on. + tags []string + // Represents user viewpoints data of the service message. This data includes message status such as whether the user has archived, read, or marked the message as favorite. This property is null when accessed with application permissions. + viewPoint ServiceUpdateMessageViewpointable +} +// NewServiceUpdateMessage instantiates a new ServiceUpdateMessage and sets the default values. +func NewServiceUpdateMessage()(*ServiceUpdateMessage) { + m := &ServiceUpdateMessage{ + ServiceAnnouncementBase: *NewServiceAnnouncementBase(), + } + odataTypeValue := "#microsoft.graph.serviceUpdateMessage"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateServiceUpdateMessageFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceUpdateMessageFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceUpdateMessage(), nil +} +// GetActionRequiredByDateTime gets the actionRequiredByDateTime property value. The expected deadline of the action for the message. +func (m *ServiceUpdateMessage) GetActionRequiredByDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.actionRequiredByDateTime +} +// GetAttachments gets the attachments property value. A collection of serviceAnnouncementAttachments. +func (m *ServiceUpdateMessage) GetAttachments()([]ServiceAnnouncementAttachmentable) { + return m.attachments +} +// GetAttachmentsArchive gets the attachmentsArchive property value. The zip file of all attachments for a message. +func (m *ServiceUpdateMessage) GetAttachmentsArchive()([]byte) { + return m.attachmentsArchive +} +// GetBody gets the body property value. The body property +func (m *ServiceUpdateMessage) GetBody()(ItemBodyable) { + return m.body +} +// GetCategory gets the category property value. The category property +func (m *ServiceUpdateMessage) GetCategory()(*ServiceUpdateCategory) { + return m.category +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceUpdateMessage) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.ServiceAnnouncementBase.GetFieldDeserializers() + res["actionRequiredByDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetActionRequiredByDateTime(val) + } + return nil + } + res["attachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceAnnouncementAttachmentFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceAnnouncementAttachmentable, len(val)) + for i, v := range val { + res[i] = v.(ServiceAnnouncementAttachmentable) + } + m.SetAttachments(res) + } + return nil + } + res["attachmentsArchive"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetByteArrayValue() + if err != nil { + return err + } + if val != nil { + m.SetAttachmentsArchive(val) + } + return nil + } + res["body"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateItemBodyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetBody(val.(ItemBodyable)) + } + return nil + } + res["category"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceUpdateCategory) + if err != nil { + return err + } + if val != nil { + m.SetCategory(val.(*ServiceUpdateCategory)) + } + return nil + } + res["hasAttachments"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasAttachments(val) + } + return nil + } + res["isMajorChange"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsMajorChange(val) + } + return nil + } + res["services"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetServices(res) + } + return nil + } + res["severity"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseServiceUpdateSeverity) + if err != nil { + return err + } + if val != nil { + m.SetSeverity(val.(*ServiceUpdateSeverity)) + } + return nil + } + res["tags"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfPrimitiveValues("string") + if err != nil { + return err + } + if val != nil { + res := make([]string, len(val)) + for i, v := range val { + res[i] = *(v.(*string)) + } + m.SetTags(res) + } + return nil + } + res["viewPoint"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateServiceUpdateMessageViewpointFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetViewPoint(val.(ServiceUpdateMessageViewpointable)) + } + return nil + } + return res +} +// GetHasAttachments gets the hasAttachments property value. Indicates whether the message has any attachment. +func (m *ServiceUpdateMessage) GetHasAttachments()(*bool) { + return m.hasAttachments +} +// GetIsMajorChange gets the isMajorChange property value. Indicates whether the message describes a major update for the service. +func (m *ServiceUpdateMessage) GetIsMajorChange()(*bool) { + return m.isMajorChange +} +// GetServices gets the services property value. The affected services by the service message. +func (m *ServiceUpdateMessage) GetServices()([]string) { + return m.services +} +// GetSeverity gets the severity property value. The severity property +func (m *ServiceUpdateMessage) GetSeverity()(*ServiceUpdateSeverity) { + return m.severity +} +// GetTags gets the tags property value. A collection of tags for the service message. Tags are provided by the service team/support team who post the message to tell whether this message contains privacy data, or whether this message is for a service new feature update, and so on. +func (m *ServiceUpdateMessage) GetTags()([]string) { + return m.tags +} +// GetViewPoint gets the viewPoint property value. Represents user viewpoints data of the service message. This data includes message status such as whether the user has archived, read, or marked the message as favorite. This property is null when accessed with application permissions. +func (m *ServiceUpdateMessage) GetViewPoint()(ServiceUpdateMessageViewpointable) { + return m.viewPoint +} +// Serialize serializes information the current object +func (m *ServiceUpdateMessage) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.ServiceAnnouncementBase.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("actionRequiredByDateTime", m.GetActionRequiredByDateTime()) + if err != nil { + return err + } + } + if m.GetAttachments() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAttachments())) + for i, v := range m.GetAttachments() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("attachments", cast) + if err != nil { + return err + } + } + { + err = writer.WriteByteArrayValue("attachmentsArchive", m.GetAttachmentsArchive()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("body", m.GetBody()) + if err != nil { + return err + } + } + if m.GetCategory() != nil { + cast := (*m.GetCategory()).String() + err = writer.WriteStringValue("category", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("hasAttachments", m.GetHasAttachments()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isMajorChange", m.GetIsMajorChange()) + if err != nil { + return err + } + } + if m.GetServices() != nil { + err = writer.WriteCollectionOfStringValues("services", m.GetServices()) + if err != nil { + return err + } + } + if m.GetSeverity() != nil { + cast := (*m.GetSeverity()).String() + err = writer.WriteStringValue("severity", &cast) + if err != nil { + return err + } + } + if m.GetTags() != nil { + err = writer.WriteCollectionOfStringValues("tags", m.GetTags()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("viewPoint", m.GetViewPoint()) + if err != nil { + return err + } + } + return nil +} +// SetActionRequiredByDateTime sets the actionRequiredByDateTime property value. The expected deadline of the action for the message. +func (m *ServiceUpdateMessage) SetActionRequiredByDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.actionRequiredByDateTime = value +} +// SetAttachments sets the attachments property value. A collection of serviceAnnouncementAttachments. +func (m *ServiceUpdateMessage) SetAttachments(value []ServiceAnnouncementAttachmentable)() { + m.attachments = value +} +// SetAttachmentsArchive sets the attachmentsArchive property value. The zip file of all attachments for a message. +func (m *ServiceUpdateMessage) SetAttachmentsArchive(value []byte)() { + m.attachmentsArchive = value +} +// SetBody sets the body property value. The body property +func (m *ServiceUpdateMessage) SetBody(value ItemBodyable)() { + m.body = value +} +// SetCategory sets the category property value. The category property +func (m *ServiceUpdateMessage) SetCategory(value *ServiceUpdateCategory)() { + m.category = value +} +// SetHasAttachments sets the hasAttachments property value. Indicates whether the message has any attachment. +func (m *ServiceUpdateMessage) SetHasAttachments(value *bool)() { + m.hasAttachments = value +} +// SetIsMajorChange sets the isMajorChange property value. Indicates whether the message describes a major update for the service. +func (m *ServiceUpdateMessage) SetIsMajorChange(value *bool)() { + m.isMajorChange = value +} +// SetServices sets the services property value. The affected services by the service message. +func (m *ServiceUpdateMessage) SetServices(value []string)() { + m.services = value +} +// SetSeverity sets the severity property value. The severity property +func (m *ServiceUpdateMessage) SetSeverity(value *ServiceUpdateSeverity)() { + m.severity = value +} +// SetTags sets the tags property value. A collection of tags for the service message. Tags are provided by the service team/support team who post the message to tell whether this message contains privacy data, or whether this message is for a service new feature update, and so on. +func (m *ServiceUpdateMessage) SetTags(value []string)() { + m.tags = value +} +// SetViewPoint sets the viewPoint property value. Represents user viewpoints data of the service message. This data includes message status such as whether the user has archived, read, or marked the message as favorite. This property is null when accessed with application permissions. +func (m *ServiceUpdateMessage) SetViewPoint(value ServiceUpdateMessageViewpointable)() { + m.viewPoint = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_message_collection_response.go b/src/internal/connector/graph/betasdk/models/service_update_message_collection_response.go new file mode 100644 index 000000000..990b2f577 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_message_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessageCollectionResponse +type ServiceUpdateMessageCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []ServiceUpdateMessageable +} +// NewServiceUpdateMessageCollectionResponse instantiates a new ServiceUpdateMessageCollectionResponse and sets the default values. +func NewServiceUpdateMessageCollectionResponse()(*ServiceUpdateMessageCollectionResponse) { + m := &ServiceUpdateMessageCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateServiceUpdateMessageCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceUpdateMessageCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceUpdateMessageCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceUpdateMessageCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateServiceUpdateMessageFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ServiceUpdateMessageable, len(val)) + for i, v := range val { + res[i] = v.(ServiceUpdateMessageable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *ServiceUpdateMessageCollectionResponse) GetValue()([]ServiceUpdateMessageable) { + return m.value +} +// Serialize serializes information the current object +func (m *ServiceUpdateMessageCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *ServiceUpdateMessageCollectionResponse) SetValue(value []ServiceUpdateMessageable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_message_collection_responseable.go b/src/internal/connector/graph/betasdk/models/service_update_message_collection_responseable.go new file mode 100644 index 000000000..a1ff79a84 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_message_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessageCollectionResponseable +type ServiceUpdateMessageCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]ServiceUpdateMessageable) + SetValue(value []ServiceUpdateMessageable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_message_viewpoint.go b/src/internal/connector/graph/betasdk/models/service_update_message_viewpoint.go new file mode 100644 index 000000000..1e116ee72 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_message_viewpoint.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessageViewpoint +type ServiceUpdateMessageViewpoint 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 whether the user archived the message. + isArchived *bool + // Indicates whether the user marked the message as favorite. + isFavorited *bool + // Indicates whether the user read the message. + isRead *bool + // The OdataType property + odataType *string +} +// NewServiceUpdateMessageViewpoint instantiates a new serviceUpdateMessageViewpoint and sets the default values. +func NewServiceUpdateMessageViewpoint()(*ServiceUpdateMessageViewpoint) { + m := &ServiceUpdateMessageViewpoint{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateServiceUpdateMessageViewpointFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateServiceUpdateMessageViewpointFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewServiceUpdateMessageViewpoint(), 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 *ServiceUpdateMessageViewpoint) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ServiceUpdateMessageViewpoint) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["isArchived"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsArchived(val) + } + return nil + } + res["isFavorited"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsFavorited(val) + } + return nil + } + res["isRead"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsRead(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 + } + return res +} +// GetIsArchived gets the isArchived property value. Indicates whether the user archived the message. +func (m *ServiceUpdateMessageViewpoint) GetIsArchived()(*bool) { + return m.isArchived +} +// GetIsFavorited gets the isFavorited property value. Indicates whether the user marked the message as favorite. +func (m *ServiceUpdateMessageViewpoint) GetIsFavorited()(*bool) { + return m.isFavorited +} +// GetIsRead gets the isRead property value. Indicates whether the user read the message. +func (m *ServiceUpdateMessageViewpoint) GetIsRead()(*bool) { + return m.isRead +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ServiceUpdateMessageViewpoint) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *ServiceUpdateMessageViewpoint) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("isArchived", m.GetIsArchived()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isFavorited", m.GetIsFavorited()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("isRead", m.GetIsRead()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *ServiceUpdateMessageViewpoint) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetIsArchived sets the isArchived property value. Indicates whether the user archived the message. +func (m *ServiceUpdateMessageViewpoint) SetIsArchived(value *bool)() { + m.isArchived = value +} +// SetIsFavorited sets the isFavorited property value. Indicates whether the user marked the message as favorite. +func (m *ServiceUpdateMessageViewpoint) SetIsFavorited(value *bool)() { + m.isFavorited = value +} +// SetIsRead sets the isRead property value. Indicates whether the user read the message. +func (m *ServiceUpdateMessageViewpoint) SetIsRead(value *bool)() { + m.isRead = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ServiceUpdateMessageViewpoint) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_message_viewpointable.go b/src/internal/connector/graph/betasdk/models/service_update_message_viewpointable.go new file mode 100644 index 000000000..1925692b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_message_viewpointable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessageViewpointable +type ServiceUpdateMessageViewpointable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetIsArchived()(*bool) + GetIsFavorited()(*bool) + GetIsRead()(*bool) + GetOdataType()(*string) + SetIsArchived(value *bool)() + SetIsFavorited(value *bool)() + SetIsRead(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_messageable.go b/src/internal/connector/graph/betasdk/models/service_update_messageable.go new file mode 100644 index 000000000..e4f7c656e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_messageable.go @@ -0,0 +1,34 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ServiceUpdateMessageable +type ServiceUpdateMessageable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + ServiceAnnouncementBaseable + GetActionRequiredByDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetAttachments()([]ServiceAnnouncementAttachmentable) + GetAttachmentsArchive()([]byte) + GetBody()(ItemBodyable) + GetCategory()(*ServiceUpdateCategory) + GetHasAttachments()(*bool) + GetIsMajorChange()(*bool) + GetServices()([]string) + GetSeverity()(*ServiceUpdateSeverity) + GetTags()([]string) + GetViewPoint()(ServiceUpdateMessageViewpointable) + SetActionRequiredByDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetAttachments(value []ServiceAnnouncementAttachmentable)() + SetAttachmentsArchive(value []byte)() + SetBody(value ItemBodyable)() + SetCategory(value *ServiceUpdateCategory)() + SetHasAttachments(value *bool)() + SetIsMajorChange(value *bool)() + SetServices(value []string)() + SetSeverity(value *ServiceUpdateSeverity)() + SetTags(value []string)() + SetViewPoint(value ServiceUpdateMessageViewpointable)() +} diff --git a/src/internal/connector/graph/betasdk/models/service_update_severity.go b/src/internal/connector/graph/betasdk/models/service_update_severity.go new file mode 100644 index 000000000..1f2556025 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/service_update_severity.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type ServiceUpdateSeverity int + +const ( + NORMAL_SERVICEUPDATESEVERITY ServiceUpdateSeverity = iota + HIGH_SERVICEUPDATESEVERITY + CRITICAL_SERVICEUPDATESEVERITY + UNKNOWNFUTUREVALUE_SERVICEUPDATESEVERITY +) + +func (i ServiceUpdateSeverity) String() string { + return []string{"normal", "high", "critical", "unknownFutureValue"}[i] +} +func ParseServiceUpdateSeverity(v string) (interface{}, error) { + result := NORMAL_SERVICEUPDATESEVERITY + switch v { + case "normal": + result = NORMAL_SERVICEUPDATESEVERITY + case "high": + result = HIGH_SERVICEUPDATESEVERITY + case "critical": + result = CRITICAL_SERVICEUPDATESEVERITY + case "unknownFutureValue": + result = UNKNOWNFUTUREVALUE_SERVICEUPDATESEVERITY + default: + return 0, errors.New("Unknown ServiceUpdateSeverity value: " + v) + } + return &result, nil +} +func SerializeServiceUpdateSeverity(values []ServiceUpdateSeverity) []string { + 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/session_lifetime_policy.go b/src/internal/connector/graph/betasdk/models/session_lifetime_policy.go new file mode 100644 index 000000000..71ef8ba9e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/session_lifetime_policy.go @@ -0,0 +1,124 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SessionLifetimePolicy +type SessionLifetimePolicy 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 human-readable details of the conditional access session management policy applied to the sign-in. + detail *string + // If a conditional access session management policy required the user to authenticate in this sign-in event, this field describes the policy type that required authentication. The possible values are: rememberMultifactorAuthenticationOnTrustedDevices, tenantTokenLifetimePolicy, audienceTokenLifetimePolicy, signInFrequencyPeriodicReauthentication, ngcMfa, signInFrequencyEveryTime, unknownFutureValue. + expirationRequirement *ExpirationRequirement + // The OdataType property + odataType *string +} +// NewSessionLifetimePolicy instantiates a new sessionLifetimePolicy and sets the default values. +func NewSessionLifetimePolicy()(*SessionLifetimePolicy) { + m := &SessionLifetimePolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSessionLifetimePolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSessionLifetimePolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSessionLifetimePolicy(), 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 *SessionLifetimePolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDetail gets the detail property value. The human-readable details of the conditional access session management policy applied to the sign-in. +func (m *SessionLifetimePolicy) GetDetail()(*string) { + return m.detail +} +// GetExpirationRequirement gets the expirationRequirement property value. If a conditional access session management policy required the user to authenticate in this sign-in event, this field describes the policy type that required authentication. The possible values are: rememberMultifactorAuthenticationOnTrustedDevices, tenantTokenLifetimePolicy, audienceTokenLifetimePolicy, signInFrequencyPeriodicReauthentication, ngcMfa, signInFrequencyEveryTime, unknownFutureValue. +func (m *SessionLifetimePolicy) GetExpirationRequirement()(*ExpirationRequirement) { + return m.expirationRequirement +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SessionLifetimePolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["detail"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDetail(val) + } + return nil + } + res["expirationRequirement"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseExpirationRequirement) + if err != nil { + return err + } + if val != nil { + m.SetExpirationRequirement(val.(*ExpirationRequirement)) + } + 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 + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SessionLifetimePolicy) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *SessionLifetimePolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("detail", m.GetDetail()) + if err != nil { + return err + } + } + if m.GetExpirationRequirement() != nil { + cast := (*m.GetExpirationRequirement()).String() + err := writer.WriteStringValue("expirationRequirement", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *SessionLifetimePolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDetail sets the detail property value. The human-readable details of the conditional access session management policy applied to the sign-in. +func (m *SessionLifetimePolicy) SetDetail(value *string)() { + m.detail = value +} +// SetExpirationRequirement sets the expirationRequirement property value. If a conditional access session management policy required the user to authenticate in this sign-in event, this field describes the policy type that required authentication. The possible values are: rememberMultifactorAuthenticationOnTrustedDevices, tenantTokenLifetimePolicy, audienceTokenLifetimePolicy, signInFrequencyPeriodicReauthentication, ngcMfa, signInFrequencyEveryTime, unknownFutureValue. +func (m *SessionLifetimePolicy) SetExpirationRequirement(value *ExpirationRequirement)() { + m.expirationRequirement = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SessionLifetimePolicy) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_response.go b/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_response.go new file mode 100644 index 000000000..fbfb22ba1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SessionLifetimePolicyCollectionResponse +type SessionLifetimePolicyCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SessionLifetimePolicyable +} +// NewSessionLifetimePolicyCollectionResponse instantiates a new SessionLifetimePolicyCollectionResponse and sets the default values. +func NewSessionLifetimePolicyCollectionResponse()(*SessionLifetimePolicyCollectionResponse) { + m := &SessionLifetimePolicyCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSessionLifetimePolicyCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSessionLifetimePolicyCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSessionLifetimePolicyCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SessionLifetimePolicyCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSessionLifetimePolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SessionLifetimePolicyable, len(val)) + for i, v := range val { + res[i] = v.(SessionLifetimePolicyable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SessionLifetimePolicyCollectionResponse) GetValue()([]SessionLifetimePolicyable) { + return m.value +} +// Serialize serializes information the current object +func (m *SessionLifetimePolicyCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SessionLifetimePolicyCollectionResponse) SetValue(value []SessionLifetimePolicyable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_responseable.go b/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_responseable.go new file mode 100644 index 000000000..2170701de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/session_lifetime_policy_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SessionLifetimePolicyCollectionResponseable +type SessionLifetimePolicyCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SessionLifetimePolicyable) + SetValue(value []SessionLifetimePolicyable)() +} diff --git a/src/internal/connector/graph/betasdk/models/session_lifetime_policyable.go b/src/internal/connector/graph/betasdk/models/session_lifetime_policyable.go new file mode 100644 index 000000000..977e28b3c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/session_lifetime_policyable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SessionLifetimePolicyable +type SessionLifetimePolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDetail()(*string) + GetExpirationRequirement()(*ExpirationRequirement) + GetOdataType()(*string) + SetDetail(value *string)() + SetExpirationRequirement(value *ExpirationRequirement)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_source.go b/src/internal/connector/graph/betasdk/models/setting_source.go new file mode 100644 index 000000000..dc6fe7f8b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_source.go @@ -0,0 +1,150 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingSource +type SettingSource struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Not yet documented + displayName *string + // Not yet documented + id *string + // The OdataType property + odataType *string + // The sourceType property + sourceType *SettingSourceType +} +// NewSettingSource instantiates a new settingSource and sets the default values. +func NewSettingSource()(*SettingSource) { + m := &SettingSource{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSettingSourceFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingSourceFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingSource(), 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 *SettingSource) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDisplayName gets the displayName property value. Not yet documented +func (m *SettingSource) GetDisplayName()(*string) { + return m.displayName +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingSource) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["displayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDisplayName(val) + } + return nil + } + res["id"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetId(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["sourceType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSettingSourceType) + if err != nil { + return err + } + if val != nil { + m.SetSourceType(val.(*SettingSourceType)) + } + return nil + } + return res +} +// GetId gets the id property value. Not yet documented +func (m *SettingSource) GetId()(*string) { + return m.id +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SettingSource) GetOdataType()(*string) { + return m.odataType +} +// GetSourceType gets the sourceType property value. The sourceType property +func (m *SettingSource) GetSourceType()(*SettingSourceType) { + return m.sourceType +} +// Serialize serializes information the current object +func (m *SettingSource) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("displayName", m.GetDisplayName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("id", m.GetId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetSourceType() != nil { + cast := (*m.GetSourceType()).String() + err := writer.WriteStringValue("sourceType", &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 *SettingSource) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDisplayName sets the displayName property value. Not yet documented +func (m *SettingSource) SetDisplayName(value *string)() { + m.displayName = value +} +// SetId sets the id property value. Not yet documented +func (m *SettingSource) SetId(value *string)() { + m.id = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SettingSource) SetOdataType(value *string)() { + m.odataType = value +} +// SetSourceType sets the sourceType property value. The sourceType property +func (m *SettingSource) SetSourceType(value *SettingSourceType)() { + m.sourceType = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_source_collection_response.go b/src/internal/connector/graph/betasdk/models/setting_source_collection_response.go new file mode 100644 index 000000000..7d1c82459 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_source_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingSourceCollectionResponse +type SettingSourceCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SettingSourceable +} +// NewSettingSourceCollectionResponse instantiates a new SettingSourceCollectionResponse and sets the default values. +func NewSettingSourceCollectionResponse()(*SettingSourceCollectionResponse) { + m := &SettingSourceCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSettingSourceCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingSourceCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingSourceCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingSourceCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingSourceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingSourceable, len(val)) + for i, v := range val { + res[i] = v.(SettingSourceable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SettingSourceCollectionResponse) GetValue()([]SettingSourceable) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingSourceCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SettingSourceCollectionResponse) SetValue(value []SettingSourceable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_source_collection_responseable.go b/src/internal/connector/graph/betasdk/models/setting_source_collection_responseable.go new file mode 100644 index 000000000..185e9ec6e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_source_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingSourceCollectionResponseable +type SettingSourceCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SettingSourceable) + SetValue(value []SettingSourceable)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_source_type.go b/src/internal/connector/graph/betasdk/models/setting_source_type.go new file mode 100644 index 000000000..f6e945a94 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_source_type.go @@ -0,0 +1,34 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SettingSourceType int + +const ( + DEVICECONFIGURATION_SETTINGSOURCETYPE SettingSourceType = iota + DEVICEINTENT_SETTINGSOURCETYPE +) + +func (i SettingSourceType) String() string { + return []string{"deviceConfiguration", "deviceIntent"}[i] +} +func ParseSettingSourceType(v string) (interface{}, error) { + result := DEVICECONFIGURATION_SETTINGSOURCETYPE + switch v { + case "deviceConfiguration": + result = DEVICECONFIGURATION_SETTINGSOURCETYPE + case "deviceIntent": + result = DEVICEINTENT_SETTINGSOURCETYPE + default: + return 0, errors.New("Unknown SettingSourceType value: " + v) + } + return &result, nil +} +func SerializeSettingSourceType(values []SettingSourceType) []string { + 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/setting_sourceable.go b/src/internal/connector/graph/betasdk/models/setting_sourceable.go new file mode 100644 index 000000000..e28676eae --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_sourceable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingSourceable +type SettingSourceable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDisplayName()(*string) + GetId()(*string) + GetOdataType()(*string) + GetSourceType()(*SettingSourceType) + SetDisplayName(value *string)() + SetId(value *string)() + SetOdataType(value *string)() + SetSourceType(value *SettingSourceType)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_state_device_summary.go b/src/internal/connector/graph/betasdk/models/setting_state_device_summary.go new file mode 100644 index 000000000..e62381301 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_state_device_summary.go @@ -0,0 +1,268 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingStateDeviceSummary device Compilance Policy and Configuration for a Setting State summary +type SettingStateDeviceSummary struct { + Entity + // Device Compliant count for the setting + compliantDeviceCount *int32 + // Device conflict error count for the setting + conflictDeviceCount *int32 + // Device error count for the setting + errorDeviceCount *int32 + // Name of the InstancePath for the setting + instancePath *string + // Device NonCompliant count for the setting + nonCompliantDeviceCount *int32 + // Device Not Applicable count for the setting + notApplicableDeviceCount *int32 + // Device Compliant count for the setting + remediatedDeviceCount *int32 + // Name of the setting + settingName *string + // Device Unkown count for the setting + unknownDeviceCount *int32 +} +// NewSettingStateDeviceSummary instantiates a new settingStateDeviceSummary and sets the default values. +func NewSettingStateDeviceSummary()(*SettingStateDeviceSummary) { + m := &SettingStateDeviceSummary{ + Entity: *NewEntity(), + } + return m +} +// CreateSettingStateDeviceSummaryFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingStateDeviceSummaryFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingStateDeviceSummary(), nil +} +// GetCompliantDeviceCount gets the compliantDeviceCount property value. Device Compliant count for the setting +func (m *SettingStateDeviceSummary) GetCompliantDeviceCount()(*int32) { + return m.compliantDeviceCount +} +// GetConflictDeviceCount gets the conflictDeviceCount property value. Device conflict error count for the setting +func (m *SettingStateDeviceSummary) GetConflictDeviceCount()(*int32) { + return m.conflictDeviceCount +} +// GetErrorDeviceCount gets the errorDeviceCount property value. Device error count for the setting +func (m *SettingStateDeviceSummary) GetErrorDeviceCount()(*int32) { + return m.errorDeviceCount +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingStateDeviceSummary) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["compliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCompliantDeviceCount(val) + } + return nil + } + res["conflictDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetConflictDeviceCount(val) + } + return nil + } + res["errorDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetErrorDeviceCount(val) + } + return nil + } + res["instancePath"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInstancePath(val) + } + return nil + } + res["nonCompliantDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNonCompliantDeviceCount(val) + } + return nil + } + res["notApplicableDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetNotApplicableDeviceCount(val) + } + return nil + } + res["remediatedDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemediatedDeviceCount(val) + } + return nil + } + res["settingName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSettingName(val) + } + return nil + } + res["unknownDeviceCount"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetUnknownDeviceCount(val) + } + return nil + } + return res +} +// GetInstancePath gets the instancePath property value. Name of the InstancePath for the setting +func (m *SettingStateDeviceSummary) GetInstancePath()(*string) { + return m.instancePath +} +// GetNonCompliantDeviceCount gets the nonCompliantDeviceCount property value. Device NonCompliant count for the setting +func (m *SettingStateDeviceSummary) GetNonCompliantDeviceCount()(*int32) { + return m.nonCompliantDeviceCount +} +// GetNotApplicableDeviceCount gets the notApplicableDeviceCount property value. Device Not Applicable count for the setting +func (m *SettingStateDeviceSummary) GetNotApplicableDeviceCount()(*int32) { + return m.notApplicableDeviceCount +} +// GetRemediatedDeviceCount gets the remediatedDeviceCount property value. Device Compliant count for the setting +func (m *SettingStateDeviceSummary) GetRemediatedDeviceCount()(*int32) { + return m.remediatedDeviceCount +} +// GetSettingName gets the settingName property value. Name of the setting +func (m *SettingStateDeviceSummary) GetSettingName()(*string) { + return m.settingName +} +// GetUnknownDeviceCount gets the unknownDeviceCount property value. Device Unkown count for the setting +func (m *SettingStateDeviceSummary) GetUnknownDeviceCount()(*int32) { + return m.unknownDeviceCount +} +// Serialize serializes information the current object +func (m *SettingStateDeviceSummary) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteInt32Value("compliantDeviceCount", m.GetCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("conflictDeviceCount", m.GetConflictDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("errorDeviceCount", m.GetErrorDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("instancePath", m.GetInstancePath()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("nonCompliantDeviceCount", m.GetNonCompliantDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("notApplicableDeviceCount", m.GetNotApplicableDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("remediatedDeviceCount", m.GetRemediatedDeviceCount()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("settingName", m.GetSettingName()) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("unknownDeviceCount", m.GetUnknownDeviceCount()) + if err != nil { + return err + } + } + return nil +} +// SetCompliantDeviceCount sets the compliantDeviceCount property value. Device Compliant count for the setting +func (m *SettingStateDeviceSummary) SetCompliantDeviceCount(value *int32)() { + m.compliantDeviceCount = value +} +// SetConflictDeviceCount sets the conflictDeviceCount property value. Device conflict error count for the setting +func (m *SettingStateDeviceSummary) SetConflictDeviceCount(value *int32)() { + m.conflictDeviceCount = value +} +// SetErrorDeviceCount sets the errorDeviceCount property value. Device error count for the setting +func (m *SettingStateDeviceSummary) SetErrorDeviceCount(value *int32)() { + m.errorDeviceCount = value +} +// SetInstancePath sets the instancePath property value. Name of the InstancePath for the setting +func (m *SettingStateDeviceSummary) SetInstancePath(value *string)() { + m.instancePath = value +} +// SetNonCompliantDeviceCount sets the nonCompliantDeviceCount property value. Device NonCompliant count for the setting +func (m *SettingStateDeviceSummary) SetNonCompliantDeviceCount(value *int32)() { + m.nonCompliantDeviceCount = value +} +// SetNotApplicableDeviceCount sets the notApplicableDeviceCount property value. Device Not Applicable count for the setting +func (m *SettingStateDeviceSummary) SetNotApplicableDeviceCount(value *int32)() { + m.notApplicableDeviceCount = value +} +// SetRemediatedDeviceCount sets the remediatedDeviceCount property value. Device Compliant count for the setting +func (m *SettingStateDeviceSummary) SetRemediatedDeviceCount(value *int32)() { + m.remediatedDeviceCount = value +} +// SetSettingName sets the settingName property value. Name of the setting +func (m *SettingStateDeviceSummary) SetSettingName(value *string)() { + m.settingName = value +} +// SetUnknownDeviceCount sets the unknownDeviceCount property value. Device Unkown count for the setting +func (m *SettingStateDeviceSummary) SetUnknownDeviceCount(value *int32)() { + m.unknownDeviceCount = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_response.go b/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_response.go new file mode 100644 index 000000000..693f776c6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingStateDeviceSummaryCollectionResponse +type SettingStateDeviceSummaryCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SettingStateDeviceSummaryable +} +// NewSettingStateDeviceSummaryCollectionResponse instantiates a new SettingStateDeviceSummaryCollectionResponse and sets the default values. +func NewSettingStateDeviceSummaryCollectionResponse()(*SettingStateDeviceSummaryCollectionResponse) { + m := &SettingStateDeviceSummaryCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSettingStateDeviceSummaryCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingStateDeviceSummaryCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingStateDeviceSummaryCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingStateDeviceSummaryCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingStateDeviceSummaryFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingStateDeviceSummaryable, len(val)) + for i, v := range val { + res[i] = v.(SettingStateDeviceSummaryable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SettingStateDeviceSummaryCollectionResponse) GetValue()([]SettingStateDeviceSummaryable) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingStateDeviceSummaryCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SettingStateDeviceSummaryCollectionResponse) SetValue(value []SettingStateDeviceSummaryable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_responseable.go b/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_responseable.go new file mode 100644 index 000000000..c2c88282f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_state_device_summary_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingStateDeviceSummaryCollectionResponseable +type SettingStateDeviceSummaryCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SettingStateDeviceSummaryable) + SetValue(value []SettingStateDeviceSummaryable)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_state_device_summaryable.go b/src/internal/connector/graph/betasdk/models/setting_state_device_summaryable.go new file mode 100644 index 000000000..56828a525 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_state_device_summaryable.go @@ -0,0 +1,29 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingStateDeviceSummaryable +type SettingStateDeviceSummaryable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetCompliantDeviceCount()(*int32) + GetConflictDeviceCount()(*int32) + GetErrorDeviceCount()(*int32) + GetInstancePath()(*string) + GetNonCompliantDeviceCount()(*int32) + GetNotApplicableDeviceCount()(*int32) + GetRemediatedDeviceCount()(*int32) + GetSettingName()(*string) + GetUnknownDeviceCount()(*int32) + SetCompliantDeviceCount(value *int32)() + SetConflictDeviceCount(value *int32)() + SetErrorDeviceCount(value *int32)() + SetInstancePath(value *string)() + SetNonCompliantDeviceCount(value *int32)() + SetNotApplicableDeviceCount(value *int32)() + SetRemediatedDeviceCount(value *int32)() + SetSettingName(value *string)() + SetUnknownDeviceCount(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_template_value.go b/src/internal/connector/graph/betasdk/models/setting_template_value.go new file mode 100644 index 000000000..e2f10112b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_template_value.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingTemplateValue +type SettingTemplateValue struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Default value for the setting. Read-only. + defaultValue *string + // Description of the setting. Read-only. + description *string + // Name of the setting. Read-only. + name *string + // The OdataType property + odataType *string + // Type of the setting. Read-only. + type_escaped *string +} +// NewSettingTemplateValue instantiates a new settingTemplateValue and sets the default values. +func NewSettingTemplateValue()(*SettingTemplateValue) { + m := &SettingTemplateValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSettingTemplateValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingTemplateValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingTemplateValue(), 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 *SettingTemplateValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDefaultValue gets the defaultValue property value. Default value for the setting. Read-only. +func (m *SettingTemplateValue) GetDefaultValue()(*string) { + return m.defaultValue +} +// GetDescription gets the description property value. Description of the setting. Read-only. +func (m *SettingTemplateValue) GetDescription()(*string) { + return m.description +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingTemplateValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["defaultValue"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDefaultValue(val) + } + return nil + } + res["description"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetDescription(val) + } + return nil + } + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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["type"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetType(val) + } + return nil + } + return res +} +// GetName gets the name property value. Name of the setting. Read-only. +func (m *SettingTemplateValue) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SettingTemplateValue) GetOdataType()(*string) { + return m.odataType +} +// GetType gets the type property value. Type of the setting. Read-only. +func (m *SettingTemplateValue) GetType()(*string) { + return m.type_escaped +} +// Serialize serializes information the current object +func (m *SettingTemplateValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("defaultValue", m.GetDefaultValue()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("description", m.GetDescription()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("name", m.GetName()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("type", m.GetType()) + 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 *SettingTemplateValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDefaultValue sets the defaultValue property value. Default value for the setting. Read-only. +func (m *SettingTemplateValue) SetDefaultValue(value *string)() { + m.defaultValue = value +} +// SetDescription sets the description property value. Description of the setting. Read-only. +func (m *SettingTemplateValue) SetDescription(value *string)() { + m.description = value +} +// SetName sets the name property value. Name of the setting. Read-only. +func (m *SettingTemplateValue) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SettingTemplateValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetType sets the type property value. Type of the setting. Read-only. +func (m *SettingTemplateValue) SetType(value *string)() { + m.type_escaped = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_template_value_collection_response.go b/src/internal/connector/graph/betasdk/models/setting_template_value_collection_response.go new file mode 100644 index 000000000..086fdcdc8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_template_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingTemplateValueCollectionResponse +type SettingTemplateValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SettingTemplateValueable +} +// NewSettingTemplateValueCollectionResponse instantiates a new SettingTemplateValueCollectionResponse and sets the default values. +func NewSettingTemplateValueCollectionResponse()(*SettingTemplateValueCollectionResponse) { + m := &SettingTemplateValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSettingTemplateValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingTemplateValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingTemplateValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingTemplateValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingTemplateValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingTemplateValueable, len(val)) + for i, v := range val { + res[i] = v.(SettingTemplateValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SettingTemplateValueCollectionResponse) GetValue()([]SettingTemplateValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingTemplateValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SettingTemplateValueCollectionResponse) SetValue(value []SettingTemplateValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_template_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/setting_template_value_collection_responseable.go new file mode 100644 index 000000000..d2d4449f0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_template_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingTemplateValueCollectionResponseable +type SettingTemplateValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SettingTemplateValueable) + SetValue(value []SettingTemplateValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_template_valueable.go b/src/internal/connector/graph/betasdk/models/setting_template_valueable.go new file mode 100644 index 000000000..478cad3a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_template_valueable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingTemplateValueable +type SettingTemplateValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDefaultValue()(*string) + GetDescription()(*string) + GetName()(*string) + GetOdataType()(*string) + GetType()(*string) + SetDefaultValue(value *string)() + SetDescription(value *string)() + SetName(value *string)() + SetOdataType(value *string)() + SetType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_value.go b/src/internal/connector/graph/betasdk/models/setting_value.go new file mode 100644 index 000000000..c77edd914 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_value.go @@ -0,0 +1,123 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingValue +type SettingValue struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Name of the setting (as defined by the directorySettingTemplate). + name *string + // The OdataType property + odataType *string + // Value of the setting. + value *string +} +// NewSettingValue instantiates a new settingValue and sets the default values. +func NewSettingValue()(*SettingValue) { + m := &SettingValue{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSettingValueFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingValueFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingValue(), 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 *SettingValue) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingValue) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["name"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetName(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 +} +// GetName gets the name property value. Name of the setting (as defined by the directorySettingTemplate). +func (m *SettingValue) GetName()(*string) { + return m.name +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SettingValue) GetOdataType()(*string) { + return m.odataType +} +// GetValue gets the value property value. Value of the setting. +func (m *SettingValue) GetValue()(*string) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingValue) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("name", m.GetName()) + 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 *SettingValue) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetName sets the name property value. Name of the setting (as defined by the directorySettingTemplate). +func (m *SettingValue) SetName(value *string)() { + m.name = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SettingValue) SetOdataType(value *string)() { + m.odataType = value +} +// SetValue sets the value property value. Value of the setting. +func (m *SettingValue) SetValue(value *string)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_value_collection_response.go b/src/internal/connector/graph/betasdk/models/setting_value_collection_response.go new file mode 100644 index 000000000..9b9d9cdf1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_value_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingValueCollectionResponse +type SettingValueCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SettingValueable +} +// NewSettingValueCollectionResponse instantiates a new SettingValueCollectionResponse and sets the default values. +func NewSettingValueCollectionResponse()(*SettingValueCollectionResponse) { + m := &SettingValueCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSettingValueCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingValueCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettingValueCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SettingValueCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSettingValueFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SettingValueable, len(val)) + for i, v := range val { + res[i] = v.(SettingValueable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SettingValueCollectionResponse) GetValue()([]SettingValueable) { + return m.value +} +// Serialize serializes information the current object +func (m *SettingValueCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SettingValueCollectionResponse) SetValue(value []SettingValueable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/setting_value_collection_responseable.go b/src/internal/connector/graph/betasdk/models/setting_value_collection_responseable.go new file mode 100644 index 000000000..10f01d3b5 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_value_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingValueCollectionResponseable +type SettingValueCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SettingValueable) + SetValue(value []SettingValueable)() +} diff --git a/src/internal/connector/graph/betasdk/models/setting_valueable.go b/src/internal/connector/graph/betasdk/models/setting_valueable.go new file mode 100644 index 000000000..596c898bc --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setting_valueable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SettingValueable +type SettingValueable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetName()(*string) + GetOdataType()(*string) + GetValue()(*string) + SetName(value *string)() + SetOdataType(value *string)() + SetValue(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/settings.go b/src/internal/connector/graph/betasdk/models/settings.go new file mode 100644 index 000000000..7628edae1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/settings.go @@ -0,0 +1,149 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Settings +type Settings struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Specifies if the user's primary mailbox is hosted in the cloud and is enabled for Microsoft Graph. + hasGraphMailbox *bool + // Specifies if the user has a MyAnalytics license assigned. + hasLicense *bool + // Specifies if the user opted out of MyAnalytics. + hasOptedOut *bool + // The OdataType property + odataType *string +} +// NewSettings instantiates a new settings and sets the default values. +func NewSettings()(*Settings) { + m := &Settings{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSettingsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSettingsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSettings(), 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 *Settings) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Settings) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["hasGraphMailbox"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasGraphMailbox(val) + } + return nil + } + res["hasLicense"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasLicense(val) + } + return nil + } + res["hasOptedOut"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetHasOptedOut(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 + } + return res +} +// GetHasGraphMailbox gets the hasGraphMailbox property value. Specifies if the user's primary mailbox is hosted in the cloud and is enabled for Microsoft Graph. +func (m *Settings) GetHasGraphMailbox()(*bool) { + return m.hasGraphMailbox +} +// GetHasLicense gets the hasLicense property value. Specifies if the user has a MyAnalytics license assigned. +func (m *Settings) GetHasLicense()(*bool) { + return m.hasLicense +} +// GetHasOptedOut gets the hasOptedOut property value. Specifies if the user opted out of MyAnalytics. +func (m *Settings) GetHasOptedOut()(*bool) { + return m.hasOptedOut +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Settings) GetOdataType()(*string) { + return m.odataType +} +// Serialize serializes information the current object +func (m *Settings) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteBoolValue("hasGraphMailbox", m.GetHasGraphMailbox()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasLicense", m.GetHasLicense()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("hasOptedOut", m.GetHasOptedOut()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + 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 *Settings) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetHasGraphMailbox sets the hasGraphMailbox property value. Specifies if the user's primary mailbox is hosted in the cloud and is enabled for Microsoft Graph. +func (m *Settings) SetHasGraphMailbox(value *bool)() { + m.hasGraphMailbox = value +} +// SetHasLicense sets the hasLicense property value. Specifies if the user has a MyAnalytics license assigned. +func (m *Settings) SetHasLicense(value *bool)() { + m.hasLicense = value +} +// SetHasOptedOut sets the hasOptedOut property value. Specifies if the user opted out of MyAnalytics. +func (m *Settings) SetHasOptedOut(value *bool)() { + m.hasOptedOut = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Settings) SetOdataType(value *string)() { + m.odataType = value +} diff --git a/src/internal/connector/graph/betasdk/models/settingsable.go b/src/internal/connector/graph/betasdk/models/settingsable.go new file mode 100644 index 000000000..93a5c1646 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/settingsable.go @@ -0,0 +1,19 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Settingsable +type Settingsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetHasGraphMailbox()(*bool) + GetHasLicense()(*bool) + GetHasOptedOut()(*bool) + GetOdataType()(*string) + SetHasGraphMailbox(value *bool)() + SetHasLicense(value *bool)() + SetHasOptedOut(value *bool)() + SetOdataType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/setup_status.go b/src/internal/connector/graph/betasdk/models/setup_status.go new file mode 100644 index 000000000..9986e2e08 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/setup_status.go @@ -0,0 +1,52 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SetupStatus int + +const ( + UNKNOWN_SETUPSTATUS SetupStatus = iota + NOTREGISTEREDYET_SETUPSTATUS + REGISTEREDSETUPNOTSTARTED_SETUPSTATUS + REGISTEREDSETUPINPROGRESS_SETUPSTATUS + REGISTRATIONANDSETUPCOMPLETED_SETUPSTATUS + REGISTRATIONFAILED_SETUPSTATUS + REGISTRATIONTIMEDOUT_SETUPSTATUS + DISABLED_SETUPSTATUS +) + +func (i SetupStatus) String() string { + return []string{"unknown", "notRegisteredYet", "registeredSetupNotStarted", "registeredSetupInProgress", "registrationAndSetupCompleted", "registrationFailed", "registrationTimedOut", "disabled"}[i] +} +func ParseSetupStatus(v string) (interface{}, error) { + result := UNKNOWN_SETUPSTATUS + switch v { + case "unknown": + result = UNKNOWN_SETUPSTATUS + case "notRegisteredYet": + result = NOTREGISTEREDYET_SETUPSTATUS + case "registeredSetupNotStarted": + result = REGISTEREDSETUPNOTSTARTED_SETUPSTATUS + case "registeredSetupInProgress": + result = REGISTEREDSETUPINPROGRESS_SETUPSTATUS + case "registrationAndSetupCompleted": + result = REGISTRATIONANDSETUPCOMPLETED_SETUPSTATUS + case "registrationFailed": + result = REGISTRATIONFAILED_SETUPSTATUS + case "registrationTimedOut": + result = REGISTRATIONTIMEDOUT_SETUPSTATUS + case "disabled": + result = DISABLED_SETUPSTATUS + default: + return 0, errors.New("Unknown SetupStatus value: " + v) + } + return &result, nil +} +func SerializeSetupStatus(values []SetupStatus) []string { + 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/share_action.go b/src/internal/connector/graph/betasdk/models/share_action.go new file mode 100644 index 000000000..2df9376c0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_action.go @@ -0,0 +1,105 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ShareAction +type ShareAction 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 OdataType property + odataType *string + // The identities the item was shared with in this action. + recipients []IdentitySetable +} +// NewShareAction instantiates a new shareAction and sets the default values. +func NewShareAction()(*ShareAction) { + m := &ShareAction{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateShareActionFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateShareActionFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewShareAction(), 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 *ShareAction) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *ShareAction) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["recipients"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]IdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(IdentitySetable) + } + m.SetRecipients(res) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *ShareAction) GetOdataType()(*string) { + return m.odataType +} +// GetRecipients gets the recipients property value. The identities the item was shared with in this action. +func (m *ShareAction) GetRecipients()([]IdentitySetable) { + return m.recipients +} +// Serialize serializes information the current object +func (m *ShareAction) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + if m.GetRecipients() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetRecipients())) + for i, v := range m.GetRecipients() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err := writer.WriteCollectionOfObjectValues("recipients", 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 *ShareAction) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *ShareAction) SetOdataType(value *string)() { + m.odataType = value +} +// SetRecipients sets the recipients property value. The identities the item was shared with in this action. +func (m *ShareAction) SetRecipients(value []IdentitySetable)() { + m.recipients = value +} diff --git a/src/internal/connector/graph/betasdk/models/share_actionable.go b/src/internal/connector/graph/betasdk/models/share_actionable.go new file mode 100644 index 000000000..56d77b1b2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_actionable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// ShareActionable +type ShareActionable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetRecipients()([]IdentitySetable) + SetOdataType(value *string)() + SetRecipients(value []IdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identity.go b/src/internal/connector/graph/betasdk/models/share_point_identity.go new file mode 100644 index 000000000..d68531806 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identity.go @@ -0,0 +1,62 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentity +type SharePointIdentity struct { + Identity + // The sign in name of the SharePoint identity. + loginName *string +} +// NewSharePointIdentity instantiates a new SharePointIdentity and sets the default values. +func NewSharePointIdentity()(*SharePointIdentity) { + m := &SharePointIdentity{ + Identity: *NewIdentity(), + } + odataTypeValue := "#microsoft.graph.sharePointIdentity"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSharePointIdentityFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharePointIdentityFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharePointIdentity(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharePointIdentity) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Identity.GetFieldDeserializers() + res["loginName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetLoginName(val) + } + return nil + } + return res +} +// GetLoginName gets the loginName property value. The sign in name of the SharePoint identity. +func (m *SharePointIdentity) GetLoginName()(*string) { + return m.loginName +} +// Serialize serializes information the current object +func (m *SharePointIdentity) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Identity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("loginName", m.GetLoginName()) + if err != nil { + return err + } + } + return nil +} +// SetLoginName sets the loginName property value. The sign in name of the SharePoint identity. +func (m *SharePointIdentity) SetLoginName(value *string)() { + m.loginName = value +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identity_set.go b/src/internal/connector/graph/betasdk/models/share_point_identity_set.go new file mode 100644 index 000000000..3ece04a97 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identity_set.go @@ -0,0 +1,114 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentitySet +type SharePointIdentitySet struct { + IdentitySet + // The group associated with this action. Optional. + group Identityable + // The SharePoint group associated with this action. Optional. + siteGroup SharePointIdentityable + // The SharePoint user associated with this action. Optional. + siteUser SharePointIdentityable +} +// NewSharePointIdentitySet instantiates a new SharePointIdentitySet and sets the default values. +func NewSharePointIdentitySet()(*SharePointIdentitySet) { + m := &SharePointIdentitySet{ + IdentitySet: *NewIdentitySet(), + } + odataTypeValue := "#microsoft.graph.sharePointIdentitySet"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSharePointIdentitySetFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharePointIdentitySetFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharePointIdentitySet(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharePointIdentitySet) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.IdentitySet.GetFieldDeserializers() + res["group"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetGroup(val.(Identityable)) + } + return nil + } + res["siteGroup"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharePointIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSiteGroup(val.(SharePointIdentityable)) + } + return nil + } + res["siteUser"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharePointIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSiteUser(val.(SharePointIdentityable)) + } + return nil + } + return res +} +// GetGroup gets the group property value. The group associated with this action. Optional. +func (m *SharePointIdentitySet) GetGroup()(Identityable) { + return m.group +} +// GetSiteGroup gets the siteGroup property value. The SharePoint group associated with this action. Optional. +func (m *SharePointIdentitySet) GetSiteGroup()(SharePointIdentityable) { + return m.siteGroup +} +// GetSiteUser gets the siteUser property value. The SharePoint user associated with this action. Optional. +func (m *SharePointIdentitySet) GetSiteUser()(SharePointIdentityable) { + return m.siteUser +} +// Serialize serializes information the current object +func (m *SharePointIdentitySet) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.IdentitySet.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("group", m.GetGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("siteGroup", m.GetSiteGroup()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("siteUser", m.GetSiteUser()) + if err != nil { + return err + } + } + return nil +} +// SetGroup sets the group property value. The group associated with this action. Optional. +func (m *SharePointIdentitySet) SetGroup(value Identityable)() { + m.group = value +} +// SetSiteGroup sets the siteGroup property value. The SharePoint group associated with this action. Optional. +func (m *SharePointIdentitySet) SetSiteGroup(value SharePointIdentityable)() { + m.siteGroup = value +} +// SetSiteUser sets the siteUser property value. The SharePoint user associated with this action. Optional. +func (m *SharePointIdentitySet) SetSiteUser(value SharePointIdentityable)() { + m.siteUser = value +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_response.go b/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_response.go new file mode 100644 index 000000000..f5860f70a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentitySetCollectionResponse +type SharePointIdentitySetCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharePointIdentitySetable +} +// NewSharePointIdentitySetCollectionResponse instantiates a new SharePointIdentitySetCollectionResponse and sets the default values. +func NewSharePointIdentitySetCollectionResponse()(*SharePointIdentitySetCollectionResponse) { + m := &SharePointIdentitySetCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharePointIdentitySetCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharePointIdentitySetCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharePointIdentitySetCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharePointIdentitySetCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharePointIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharePointIdentitySetable, len(val)) + for i, v := range val { + res[i] = v.(SharePointIdentitySetable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharePointIdentitySetCollectionResponse) GetValue()([]SharePointIdentitySetable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharePointIdentitySetCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharePointIdentitySetCollectionResponse) SetValue(value []SharePointIdentitySetable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_responseable.go b/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_responseable.go new file mode 100644 index 000000000..4d091a8e4 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identity_set_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentitySetCollectionResponseable +type SharePointIdentitySetCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharePointIdentitySetable) + SetValue(value []SharePointIdentitySetable)() +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identity_setable.go b/src/internal/connector/graph/betasdk/models/share_point_identity_setable.go new file mode 100644 index 000000000..7bbda942e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identity_setable.go @@ -0,0 +1,17 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentitySetable +type SharePointIdentitySetable interface { + IdentitySetable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetGroup()(Identityable) + GetSiteGroup()(SharePointIdentityable) + GetSiteUser()(SharePointIdentityable) + SetGroup(value Identityable)() + SetSiteGroup(value SharePointIdentityable)() + SetSiteUser(value SharePointIdentityable)() +} diff --git a/src/internal/connector/graph/betasdk/models/share_point_identityable.go b/src/internal/connector/graph/betasdk/models/share_point_identityable.go new file mode 100644 index 000000000..8f06e1269 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/share_point_identityable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharePointIdentityable +type SharePointIdentityable interface { + Identityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLoginName()(*string) + SetLoginName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared.go b/src/internal/connector/graph/betasdk/models/shared.go new file mode 100644 index 000000000..2d3e8a57f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared.go @@ -0,0 +1,176 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Shared +type Shared 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 OdataType property + odataType *string + // The identity of the owner of the shared item. Read-only. + owner IdentitySetable + // Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only. + scope *string + // The identity of the user who shared the item. Read-only. + sharedBy IdentitySetable + // The UTC date and time when the item was shared. Read-only. + sharedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time +} +// NewShared instantiates a new shared and sets the default values. +func NewShared()(*Shared) { + m := &Shared{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharedFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewShared(), 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 *Shared) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *Shared) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(IdentitySetable)) + } + return nil + } + res["scope"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetScope(val) + } + return nil + } + res["sharedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharedBy(val.(IdentitySetable)) + } + return nil + } + res["sharedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSharedDateTime(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *Shared) GetOdataType()(*string) { + return m.odataType +} +// GetOwner gets the owner property value. The identity of the owner of the shared item. Read-only. +func (m *Shared) GetOwner()(IdentitySetable) { + return m.owner +} +// GetScope gets the scope property value. Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only. +func (m *Shared) GetScope()(*string) { + return m.scope +} +// GetSharedBy gets the sharedBy property value. The identity of the user who shared the item. Read-only. +func (m *Shared) GetSharedBy()(IdentitySetable) { + return m.sharedBy +} +// GetSharedDateTime gets the sharedDateTime property value. The UTC date and time when the item was shared. Read-only. +func (m *Shared) GetSharedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.sharedDateTime +} +// Serialize serializes information the current object +func (m *Shared) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("scope", m.GetScope()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sharedBy", m.GetSharedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("sharedDateTime", m.GetSharedDateTime()) + 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 *Shared) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *Shared) SetOdataType(value *string)() { + m.odataType = value +} +// SetOwner sets the owner property value. The identity of the owner of the shared item. Read-only. +func (m *Shared) SetOwner(value IdentitySetable)() { + m.owner = value +} +// SetScope sets the scope property value. Indicates the scope of how the item is shared: anonymous, organization, or users. Read-only. +func (m *Shared) SetScope(value *string)() { + m.scope = value +} +// SetSharedBy sets the sharedBy property value. The identity of the user who shared the item. Read-only. +func (m *Shared) SetSharedBy(value IdentitySetable)() { + m.sharedBy = value +} +// SetSharedDateTime sets the sharedDateTime property value. The UTC date and time when the item was shared. Read-only. +func (m *Shared) SetSharedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.sharedDateTime = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_apple_device_user.go b/src/internal/connector/graph/betasdk/models/shared_apple_device_user.go new file mode 100644 index 000000000..c7ccf5af0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_apple_device_user.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedAppleDeviceUser +type SharedAppleDeviceUser struct { + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Data quota + dataQuota *int64 + // Data to sync + dataToSync *bool + // Data quota + dataUsed *int64 + // The OdataType property + odataType *string + // User name + userPrincipalName *string +} +// NewSharedAppleDeviceUser instantiates a new sharedAppleDeviceUser and sets the default values. +func NewSharedAppleDeviceUser()(*SharedAppleDeviceUser) { + m := &SharedAppleDeviceUser{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharedAppleDeviceUserFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedAppleDeviceUserFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedAppleDeviceUser(), 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 *SharedAppleDeviceUser) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetDataQuota gets the dataQuota property value. Data quota +func (m *SharedAppleDeviceUser) GetDataQuota()(*int64) { + return m.dataQuota +} +// GetDataToSync gets the dataToSync property value. Data to sync +func (m *SharedAppleDeviceUser) GetDataToSync()(*bool) { + return m.dataToSync +} +// GetDataUsed gets the dataUsed property value. Data quota +func (m *SharedAppleDeviceUser) GetDataUsed()(*int64) { + return m.dataUsed +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedAppleDeviceUser) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["dataQuota"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDataQuota(val) + } + return nil + } + res["dataToSync"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDataToSync(val) + } + return nil + } + res["dataUsed"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt64Value() + if err != nil { + return err + } + if val != nil { + m.SetDataUsed(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["userPrincipalName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetUserPrincipalName(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SharedAppleDeviceUser) GetOdataType()(*string) { + return m.odataType +} +// GetUserPrincipalName gets the userPrincipalName property value. User name +func (m *SharedAppleDeviceUser) GetUserPrincipalName()(*string) { + return m.userPrincipalName +} +// Serialize serializes information the current object +func (m *SharedAppleDeviceUser) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteInt64Value("dataQuota", m.GetDataQuota()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("dataToSync", m.GetDataToSync()) + if err != nil { + return err + } + } + { + err := writer.WriteInt64Value("dataUsed", m.GetDataUsed()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("userPrincipalName", m.GetUserPrincipalName()) + 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 *SharedAppleDeviceUser) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetDataQuota sets the dataQuota property value. Data quota +func (m *SharedAppleDeviceUser) SetDataQuota(value *int64)() { + m.dataQuota = value +} +// SetDataToSync sets the dataToSync property value. Data to sync +func (m *SharedAppleDeviceUser) SetDataToSync(value *bool)() { + m.dataToSync = value +} +// SetDataUsed sets the dataUsed property value. Data quota +func (m *SharedAppleDeviceUser) SetDataUsed(value *int64)() { + m.dataUsed = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SharedAppleDeviceUser) SetOdataType(value *string)() { + m.odataType = value +} +// SetUserPrincipalName sets the userPrincipalName property value. User name +func (m *SharedAppleDeviceUser) SetUserPrincipalName(value *string)() { + m.userPrincipalName = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_response.go new file mode 100644 index 000000000..849fa215f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedAppleDeviceUserCollectionResponse +type SharedAppleDeviceUserCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedAppleDeviceUserable +} +// NewSharedAppleDeviceUserCollectionResponse instantiates a new SharedAppleDeviceUserCollectionResponse and sets the default values. +func NewSharedAppleDeviceUserCollectionResponse()(*SharedAppleDeviceUserCollectionResponse) { + m := &SharedAppleDeviceUserCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedAppleDeviceUserCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedAppleDeviceUserCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedAppleDeviceUserCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedAppleDeviceUserCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedAppleDeviceUserFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedAppleDeviceUserable, len(val)) + for i, v := range val { + res[i] = v.(SharedAppleDeviceUserable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedAppleDeviceUserCollectionResponse) GetValue()([]SharedAppleDeviceUserable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedAppleDeviceUserCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedAppleDeviceUserCollectionResponse) SetValue(value []SharedAppleDeviceUserable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_responseable.go new file mode 100644 index 000000000..39e973474 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_apple_device_user_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedAppleDeviceUserCollectionResponseable +type SharedAppleDeviceUserCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedAppleDeviceUserable) + SetValue(value []SharedAppleDeviceUserable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_apple_device_userable.go b/src/internal/connector/graph/betasdk/models/shared_apple_device_userable.go new file mode 100644 index 000000000..337e31aa2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_apple_device_userable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedAppleDeviceUserable +type SharedAppleDeviceUserable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDataQuota()(*int64) + GetDataToSync()(*bool) + GetDataUsed()(*int64) + GetOdataType()(*string) + GetUserPrincipalName()(*string) + SetDataQuota(value *int64)() + SetDataToSync(value *bool)() + SetDataUsed(value *int64)() + SetOdataType(value *string)() + SetUserPrincipalName(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_drive_item.go b/src/internal/connector/graph/betasdk/models/shared_drive_item.go new file mode 100644 index 000000000..e80e87037 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_drive_item.go @@ -0,0 +1,252 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedDriveItem +type SharedDriveItem struct { + BaseItem + // Used to access the underlying driveItem + driveItem DriveItemable + // All driveItems contained in the sharing root. This collection cannot be enumerated. + items []DriveItemable + // Used to access the underlying list + list Listable + // Used to access the underlying listItem + listItem ListItemable + // Information about the owner of the shared item being referenced. + owner IdentitySetable + // Used to access the permission representing the underlying sharing link + permission Permissionable + // The root property + root DriveItemable + // Used to access the underlying site + site Siteable +} +// NewSharedDriveItem instantiates a new SharedDriveItem and sets the default values. +func NewSharedDriveItem()(*SharedDriveItem) { + m := &SharedDriveItem{ + BaseItem: *NewBaseItem(), + } + odataTypeValue := "#microsoft.graph.sharedDriveItem"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSharedDriveItemFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedDriveItemFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedDriveItem(), nil +} +// GetDriveItem gets the driveItem property value. Used to access the underlying driveItem +func (m *SharedDriveItem) GetDriveItem()(DriveItemable) { + return m.driveItem +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedDriveItem) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseItem.GetFieldDeserializers() + res["driveItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetDriveItem(val.(DriveItemable)) + } + return nil + } + res["items"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]DriveItemable, len(val)) + for i, v := range val { + res[i] = v.(DriveItemable) + } + m.SetItems(res) + } + return nil + } + res["list"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetList(val.(Listable)) + } + return nil + } + res["listItem"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateListItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetListItem(val.(ListItemable)) + } + return nil + } + res["owner"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetOwner(val.(IdentitySetable)) + } + return nil + } + res["permission"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreatePermissionFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetPermission(val.(Permissionable)) + } + return nil + } + res["root"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetRoot(val.(DriveItemable)) + } + return nil + } + res["site"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSiteFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSite(val.(Siteable)) + } + return nil + } + return res +} +// GetItems gets the items property value. All driveItems contained in the sharing root. This collection cannot be enumerated. +func (m *SharedDriveItem) GetItems()([]DriveItemable) { + return m.items +} +// GetList gets the list property value. Used to access the underlying list +func (m *SharedDriveItem) GetList()(Listable) { + return m.list +} +// GetListItem gets the listItem property value. Used to access the underlying listItem +func (m *SharedDriveItem) GetListItem()(ListItemable) { + return m.listItem +} +// GetOwner gets the owner property value. Information about the owner of the shared item being referenced. +func (m *SharedDriveItem) GetOwner()(IdentitySetable) { + return m.owner +} +// GetPermission gets the permission property value. Used to access the permission representing the underlying sharing link +func (m *SharedDriveItem) GetPermission()(Permissionable) { + return m.permission +} +// GetRoot gets the root property value. The root property +func (m *SharedDriveItem) GetRoot()(DriveItemable) { + return m.root +} +// GetSite gets the site property value. Used to access the underlying site +func (m *SharedDriveItem) GetSite()(Siteable) { + return m.site +} +// Serialize serializes information the current object +func (m *SharedDriveItem) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseItem.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("driveItem", m.GetDriveItem()) + if err != nil { + return err + } + } + if m.GetItems() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetItems())) + for i, v := range m.GetItems() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("items", cast) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("list", m.GetList()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("listItem", m.GetListItem()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("owner", m.GetOwner()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("permission", m.GetPermission()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("root", m.GetRoot()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("site", m.GetSite()) + if err != nil { + return err + } + } + return nil +} +// SetDriveItem sets the driveItem property value. Used to access the underlying driveItem +func (m *SharedDriveItem) SetDriveItem(value DriveItemable)() { + m.driveItem = value +} +// SetItems sets the items property value. All driveItems contained in the sharing root. This collection cannot be enumerated. +func (m *SharedDriveItem) SetItems(value []DriveItemable)() { + m.items = value +} +// SetList sets the list property value. Used to access the underlying list +func (m *SharedDriveItem) SetList(value Listable)() { + m.list = value +} +// SetListItem sets the listItem property value. Used to access the underlying listItem +func (m *SharedDriveItem) SetListItem(value ListItemable)() { + m.listItem = value +} +// SetOwner sets the owner property value. Information about the owner of the shared item being referenced. +func (m *SharedDriveItem) SetOwner(value IdentitySetable)() { + m.owner = value +} +// SetPermission sets the permission property value. Used to access the permission representing the underlying sharing link +func (m *SharedDriveItem) SetPermission(value Permissionable)() { + m.permission = value +} +// SetRoot sets the root property value. The root property +func (m *SharedDriveItem) SetRoot(value DriveItemable)() { + m.root = value +} +// SetSite sets the site property value. Used to access the underlying site +func (m *SharedDriveItem) SetSite(value Siteable)() { + m.site = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_response.go new file mode 100644 index 000000000..e5b3386f9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedDriveItemCollectionResponse +type SharedDriveItemCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedDriveItemable +} +// NewSharedDriveItemCollectionResponse instantiates a new SharedDriveItemCollectionResponse and sets the default values. +func NewSharedDriveItemCollectionResponse()(*SharedDriveItemCollectionResponse) { + m := &SharedDriveItemCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedDriveItemCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedDriveItemCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedDriveItemCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedDriveItemCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedDriveItemFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedDriveItemable, len(val)) + for i, v := range val { + res[i] = v.(SharedDriveItemable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedDriveItemCollectionResponse) GetValue()([]SharedDriveItemable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedDriveItemCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedDriveItemCollectionResponse) SetValue(value []SharedDriveItemable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_responseable.go new file mode 100644 index 000000000..3c3277a3b --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_drive_item_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedDriveItemCollectionResponseable +type SharedDriveItemCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedDriveItemable) + SetValue(value []SharedDriveItemable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_drive_itemable.go b/src/internal/connector/graph/betasdk/models/shared_drive_itemable.go new file mode 100644 index 000000000..dfb8052f7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_drive_itemable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedDriveItemable +type SharedDriveItemable interface { + BaseItemable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetDriveItem()(DriveItemable) + GetItems()([]DriveItemable) + GetList()(Listable) + GetListItem()(ListItemable) + GetOwner()(IdentitySetable) + GetPermission()(Permissionable) + GetRoot()(DriveItemable) + GetSite()(Siteable) + SetDriveItem(value DriveItemable)() + SetItems(value []DriveItemable)() + SetList(value Listable)() + SetListItem(value ListItemable)() + SetOwner(value IdentitySetable)() + SetPermission(value Permissionable)() + SetRoot(value DriveItemable)() + SetSite(value Siteable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain.go b/src/internal/connector/graph/betasdk/models/shared_email_domain.go new file mode 100644 index 000000000..43ac595de --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain.go @@ -0,0 +1,60 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomain provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharedEmailDomain struct { + Entity + // The provisioningStatus property + provisioningStatus *string +} +// NewSharedEmailDomain instantiates a new sharedEmailDomain and sets the default values. +func NewSharedEmailDomain()(*SharedEmailDomain) { + m := &SharedEmailDomain{ + Entity: *NewEntity(), + } + return m +} +// CreateSharedEmailDomainFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedEmailDomainFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedEmailDomain(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedEmailDomain) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["provisioningStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetProvisioningStatus(val) + } + return nil + } + return res +} +// GetProvisioningStatus gets the provisioningStatus property value. The provisioningStatus property +func (m *SharedEmailDomain) GetProvisioningStatus()(*string) { + return m.provisioningStatus +} +// Serialize serializes information the current object +func (m *SharedEmailDomain) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteStringValue("provisioningStatus", m.GetProvisioningStatus()) + if err != nil { + return err + } + } + return nil +} +// SetProvisioningStatus sets the provisioningStatus property value. The provisioningStatus property +func (m *SharedEmailDomain) SetProvisioningStatus(value *string)() { + m.provisioningStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_response.go new file mode 100644 index 000000000..08d2e3656 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainCollectionResponse +type SharedEmailDomainCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedEmailDomainable +} +// NewSharedEmailDomainCollectionResponse instantiates a new SharedEmailDomainCollectionResponse and sets the default values. +func NewSharedEmailDomainCollectionResponse()(*SharedEmailDomainCollectionResponse) { + m := &SharedEmailDomainCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedEmailDomainCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedEmailDomainCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedEmailDomainCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedEmailDomainCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedEmailDomainFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedEmailDomainable, len(val)) + for i, v := range val { + res[i] = v.(SharedEmailDomainable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedEmailDomainCollectionResponse) GetValue()([]SharedEmailDomainable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedEmailDomainCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedEmailDomainCollectionResponse) SetValue(value []SharedEmailDomainable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_responseable.go new file mode 100644 index 000000000..aeaf12098 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainCollectionResponseable +type SharedEmailDomainCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedEmailDomainable) + SetValue(value []SharedEmailDomainable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation.go new file mode 100644 index 000000000..315c08343 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation.go @@ -0,0 +1,113 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainInvitation provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharedEmailDomainInvitation struct { + Entity + // The expiryTime property + expiryTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The invitationDomain property + invitationDomain *string + // The invitationStatus property + invitationStatus *string +} +// NewSharedEmailDomainInvitation instantiates a new sharedEmailDomainInvitation and sets the default values. +func NewSharedEmailDomainInvitation()(*SharedEmailDomainInvitation) { + m := &SharedEmailDomainInvitation{ + Entity: *NewEntity(), + } + return m +} +// CreateSharedEmailDomainInvitationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedEmailDomainInvitationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedEmailDomainInvitation(), nil +} +// GetExpiryTime gets the expiryTime property value. The expiryTime property +func (m *SharedEmailDomainInvitation) GetExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.expiryTime +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedEmailDomainInvitation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["expiryTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetExpiryTime(val) + } + return nil + } + res["invitationDomain"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationDomain(val) + } + return nil + } + res["invitationStatus"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetInvitationStatus(val) + } + return nil + } + return res +} +// GetInvitationDomain gets the invitationDomain property value. The invitationDomain property +func (m *SharedEmailDomainInvitation) GetInvitationDomain()(*string) { + return m.invitationDomain +} +// GetInvitationStatus gets the invitationStatus property value. The invitationStatus property +func (m *SharedEmailDomainInvitation) GetInvitationStatus()(*string) { + return m.invitationStatus +} +// Serialize serializes information the current object +func (m *SharedEmailDomainInvitation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteTimeValue("expiryTime", m.GetExpiryTime()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invitationDomain", m.GetInvitationDomain()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("invitationStatus", m.GetInvitationStatus()) + if err != nil { + return err + } + } + return nil +} +// SetExpiryTime sets the expiryTime property value. The expiryTime property +func (m *SharedEmailDomainInvitation) SetExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.expiryTime = value +} +// SetInvitationDomain sets the invitationDomain property value. The invitationDomain property +func (m *SharedEmailDomainInvitation) SetInvitationDomain(value *string)() { + m.invitationDomain = value +} +// SetInvitationStatus sets the invitationStatus property value. The invitationStatus property +func (m *SharedEmailDomainInvitation) SetInvitationStatus(value *string)() { + m.invitationStatus = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_response.go new file mode 100644 index 000000000..3c1fd1f7a --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainInvitationCollectionResponse +type SharedEmailDomainInvitationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedEmailDomainInvitationable +} +// NewSharedEmailDomainInvitationCollectionResponse instantiates a new SharedEmailDomainInvitationCollectionResponse and sets the default values. +func NewSharedEmailDomainInvitationCollectionResponse()(*SharedEmailDomainInvitationCollectionResponse) { + m := &SharedEmailDomainInvitationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedEmailDomainInvitationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedEmailDomainInvitationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedEmailDomainInvitationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedEmailDomainInvitationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedEmailDomainInvitationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedEmailDomainInvitationable, len(val)) + for i, v := range val { + res[i] = v.(SharedEmailDomainInvitationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedEmailDomainInvitationCollectionResponse) GetValue()([]SharedEmailDomainInvitationable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedEmailDomainInvitationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedEmailDomainInvitationCollectionResponse) SetValue(value []SharedEmailDomainInvitationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_responseable.go new file mode 100644 index 000000000..662253c14 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitation_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainInvitationCollectionResponseable +type SharedEmailDomainInvitationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedEmailDomainInvitationable) + SetValue(value []SharedEmailDomainInvitationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domain_invitationable.go b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitationable.go new file mode 100644 index 000000000..1b1adce70 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domain_invitationable.go @@ -0,0 +1,18 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainInvitationable +type SharedEmailDomainInvitationable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetExpiryTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetInvitationDomain()(*string) + GetInvitationStatus()(*string) + SetExpiryTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetInvitationDomain(value *string)() + SetInvitationStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_email_domainable.go b/src/internal/connector/graph/betasdk/models/shared_email_domainable.go new file mode 100644 index 000000000..e5d4aae43 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_email_domainable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedEmailDomainable +type SharedEmailDomainable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetProvisioningStatus()(*string) + SetProvisioningStatus(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_insight.go b/src/internal/connector/graph/betasdk/models/shared_insight.go new file mode 100644 index 000000000..39fde8ceb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_insight.go @@ -0,0 +1,186 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedInsight provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharedInsight struct { + Entity + // Details about the shared item. Read only. + lastShared SharingDetailable + // The lastSharedMethod property + lastSharedMethod Entityable + // Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. + resource Entityable + // Reference properties of the shared document, such as the url and type of the document. Read-only + resourceReference ResourceReferenceable + // Properties that you can use to visualize the document in your experience. Read-only + resourceVisualization ResourceVisualizationable + // The sharingHistory property + sharingHistory []SharingDetailable +} +// NewSharedInsight instantiates a new sharedInsight and sets the default values. +func NewSharedInsight()(*SharedInsight) { + m := &SharedInsight{ + Entity: *NewEntity(), + } + return m +} +// CreateSharedInsightFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedInsightFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedInsight(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedInsight) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.Entity.GetFieldDeserializers() + res["lastShared"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharingDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastShared(val.(SharingDetailable)) + } + return nil + } + res["lastSharedMethod"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEntityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetLastSharedMethod(val.(Entityable)) + } + return nil + } + res["resource"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateEntityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResource(val.(Entityable)) + } + return nil + } + res["resourceReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResourceReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResourceReference(val.(ResourceReferenceable)) + } + return nil + } + res["resourceVisualization"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResourceVisualizationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetResourceVisualization(val.(ResourceVisualizationable)) + } + return nil + } + res["sharingHistory"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharingDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharingDetailable, len(val)) + for i, v := range val { + res[i] = v.(SharingDetailable) + } + m.SetSharingHistory(res) + } + return nil + } + return res +} +// GetLastShared gets the lastShared property value. Details about the shared item. Read only. +func (m *SharedInsight) GetLastShared()(SharingDetailable) { + return m.lastShared +} +// GetLastSharedMethod gets the lastSharedMethod property value. The lastSharedMethod property +func (m *SharedInsight) GetLastSharedMethod()(Entityable) { + return m.lastSharedMethod +} +// GetResource gets the resource property value. Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. +func (m *SharedInsight) GetResource()(Entityable) { + return m.resource +} +// GetResourceReference gets the resourceReference property value. Reference properties of the shared document, such as the url and type of the document. Read-only +func (m *SharedInsight) GetResourceReference()(ResourceReferenceable) { + return m.resourceReference +} +// GetResourceVisualization gets the resourceVisualization property value. Properties that you can use to visualize the document in your experience. Read-only +func (m *SharedInsight) GetResourceVisualization()(ResourceVisualizationable) { + return m.resourceVisualization +} +// GetSharingHistory gets the sharingHistory property value. The sharingHistory property +func (m *SharedInsight) GetSharingHistory()([]SharingDetailable) { + return m.sharingHistory +} +// Serialize serializes information the current object +func (m *SharedInsight) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.Entity.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("lastShared", m.GetLastShared()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("lastSharedMethod", m.GetLastSharedMethod()) + if err != nil { + return err + } + } + { + err = writer.WriteObjectValue("resource", m.GetResource()) + if err != nil { + return err + } + } + if m.GetSharingHistory() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetSharingHistory())) + for i, v := range m.GetSharingHistory() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("sharingHistory", cast) + if err != nil { + return err + } + } + return nil +} +// SetLastShared sets the lastShared property value. Details about the shared item. Read only. +func (m *SharedInsight) SetLastShared(value SharingDetailable)() { + m.lastShared = value +} +// SetLastSharedMethod sets the lastSharedMethod property value. The lastSharedMethod property +func (m *SharedInsight) SetLastSharedMethod(value Entityable)() { + m.lastSharedMethod = value +} +// SetResource sets the resource property value. Used for navigating to the item that was shared. For file attachments, the type is fileAttachment. For linked attachments, the type is driveItem. +func (m *SharedInsight) SetResource(value Entityable)() { + m.resource = value +} +// SetResourceReference sets the resourceReference property value. Reference properties of the shared document, such as the url and type of the document. Read-only +func (m *SharedInsight) SetResourceReference(value ResourceReferenceable)() { + m.resourceReference = value +} +// SetResourceVisualization sets the resourceVisualization property value. Properties that you can use to visualize the document in your experience. Read-only +func (m *SharedInsight) SetResourceVisualization(value ResourceVisualizationable)() { + m.resourceVisualization = value +} +// SetSharingHistory sets the sharingHistory property value. The sharingHistory property +func (m *SharedInsight) SetSharingHistory(value []SharingDetailable)() { + m.sharingHistory = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_insight_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_insight_collection_response.go new file mode 100644 index 000000000..a2bd3db44 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_insight_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedInsightCollectionResponse +type SharedInsightCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedInsightable +} +// NewSharedInsightCollectionResponse instantiates a new SharedInsightCollectionResponse and sets the default values. +func NewSharedInsightCollectionResponse()(*SharedInsightCollectionResponse) { + m := &SharedInsightCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedInsightCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedInsightCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedInsightCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedInsightCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedInsightFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedInsightable, len(val)) + for i, v := range val { + res[i] = v.(SharedInsightable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedInsightCollectionResponse) GetValue()([]SharedInsightable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedInsightCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedInsightCollectionResponse) SetValue(value []SharedInsightable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_insight_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_insight_collection_responseable.go new file mode 100644 index 000000000..b8d7585b9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_insight_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedInsightCollectionResponseable +type SharedInsightCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedInsightable) + SetValue(value []SharedInsightable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_insightable.go b/src/internal/connector/graph/betasdk/models/shared_insightable.go new file mode 100644 index 000000000..4f4c99bc3 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_insightable.go @@ -0,0 +1,23 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedInsightable +type SharedInsightable interface { + Entityable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetLastShared()(SharingDetailable) + GetLastSharedMethod()(Entityable) + GetResource()(Entityable) + GetResourceReference()(ResourceReferenceable) + GetResourceVisualization()(ResourceVisualizationable) + GetSharingHistory()([]SharingDetailable) + SetLastShared(value SharingDetailable)() + SetLastSharedMethod(value Entityable)() + SetResource(value Entityable)() + SetResourceReference(value ResourceReferenceable)() + SetResourceVisualization(value ResourceVisualizationable)() + SetSharingHistory(value []SharingDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_account_deletion_policy_type.go b/src/internal/connector/graph/betasdk/models/shared_p_c_account_deletion_policy_type.go new file mode 100644 index 000000000..1de51887e --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_account_deletion_policy_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharedPCAccountDeletionPolicyType int + +const ( + // Delete immediately. + IMMEDIATE_SHAREDPCACCOUNTDELETIONPOLICYTYPE SharedPCAccountDeletionPolicyType = iota + // Delete at disk space threshold. + DISKSPACETHRESHOLD_SHAREDPCACCOUNTDELETIONPOLICYTYPE + // Delete at disk space threshold or inactive threshold. + DISKSPACETHRESHOLDORINACTIVETHRESHOLD_SHAREDPCACCOUNTDELETIONPOLICYTYPE +) + +func (i SharedPCAccountDeletionPolicyType) String() string { + return []string{"immediate", "diskSpaceThreshold", "diskSpaceThresholdOrInactiveThreshold"}[i] +} +func ParseSharedPCAccountDeletionPolicyType(v string) (interface{}, error) { + result := IMMEDIATE_SHAREDPCACCOUNTDELETIONPOLICYTYPE + switch v { + case "immediate": + result = IMMEDIATE_SHAREDPCACCOUNTDELETIONPOLICYTYPE + case "diskSpaceThreshold": + result = DISKSPACETHRESHOLD_SHAREDPCACCOUNTDELETIONPOLICYTYPE + case "diskSpaceThresholdOrInactiveThreshold": + result = DISKSPACETHRESHOLDORINACTIVETHRESHOLD_SHAREDPCACCOUNTDELETIONPOLICYTYPE + default: + return 0, errors.New("Unknown SharedPCAccountDeletionPolicyType value: " + v) + } + return &result, nil +} +func SerializeSharedPCAccountDeletionPolicyType(values []SharedPCAccountDeletionPolicyType) []string { + 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/shared_p_c_account_manager_policy.go b/src/internal/connector/graph/betasdk/models/shared_p_c_account_manager_policy.go new file mode 100644 index 000000000..7b5bed8a6 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_account_manager_policy.go @@ -0,0 +1,176 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCAccountManagerPolicy sharedPC Account Manager Policy. Only applies when the account manager is enabled. +type SharedPCAccountManagerPolicy struct { + // Possible values for when accounts are deleted on a shared PC. + accountDeletionPolicy *SharedPCAccountDeletionPolicyType + // Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + additionalData map[string]interface{} + // Sets the percentage of available disk space a PC should have before it stops deleting cached shared PC accounts. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 + cacheAccountsAboveDiskFreePercentage *int32 + // Specifies when the accounts will start being deleted when they have not been logged on during the specified period, given as number of days. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. + inactiveThresholdDays *int32 + // The OdataType property + odataType *string + // Sets the percentage of disk space remaining on a PC before cached accounts will be deleted to free disk space. Accounts that have been inactive the longest will be deleted first. Only applies when AccountDeletionPolicy is DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 + removeAccountsBelowDiskFreePercentage *int32 +} +// NewSharedPCAccountManagerPolicy instantiates a new sharedPCAccountManagerPolicy and sets the default values. +func NewSharedPCAccountManagerPolicy()(*SharedPCAccountManagerPolicy) { + m := &SharedPCAccountManagerPolicy{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharedPCAccountManagerPolicyFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedPCAccountManagerPolicyFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedPCAccountManagerPolicy(), nil +} +// GetAccountDeletionPolicy gets the accountDeletionPolicy property value. Possible values for when accounts are deleted on a shared PC. +func (m *SharedPCAccountManagerPolicy) GetAccountDeletionPolicy()(*SharedPCAccountDeletionPolicyType) { + return m.accountDeletionPolicy +} +// 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 *SharedPCAccountManagerPolicy) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetCacheAccountsAboveDiskFreePercentage gets the cacheAccountsAboveDiskFreePercentage property value. Sets the percentage of available disk space a PC should have before it stops deleting cached shared PC accounts. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 +func (m *SharedPCAccountManagerPolicy) GetCacheAccountsAboveDiskFreePercentage()(*int32) { + return m.cacheAccountsAboveDiskFreePercentage +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedPCAccountManagerPolicy) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["accountDeletionPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSharedPCAccountDeletionPolicyType) + if err != nil { + return err + } + if val != nil { + m.SetAccountDeletionPolicy(val.(*SharedPCAccountDeletionPolicyType)) + } + return nil + } + res["cacheAccountsAboveDiskFreePercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetCacheAccountsAboveDiskFreePercentage(val) + } + return nil + } + res["inactiveThresholdDays"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetInactiveThresholdDays(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["removeAccountsBelowDiskFreePercentage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetRemoveAccountsBelowDiskFreePercentage(val) + } + return nil + } + return res +} +// GetInactiveThresholdDays gets the inactiveThresholdDays property value. Specifies when the accounts will start being deleted when they have not been logged on during the specified period, given as number of days. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. +func (m *SharedPCAccountManagerPolicy) GetInactiveThresholdDays()(*int32) { + return m.inactiveThresholdDays +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SharedPCAccountManagerPolicy) GetOdataType()(*string) { + return m.odataType +} +// GetRemoveAccountsBelowDiskFreePercentage gets the removeAccountsBelowDiskFreePercentage property value. Sets the percentage of disk space remaining on a PC before cached accounts will be deleted to free disk space. Accounts that have been inactive the longest will be deleted first. Only applies when AccountDeletionPolicy is DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 +func (m *SharedPCAccountManagerPolicy) GetRemoveAccountsBelowDiskFreePercentage()(*int32) { + return m.removeAccountsBelowDiskFreePercentage +} +// Serialize serializes information the current object +func (m *SharedPCAccountManagerPolicy) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + if m.GetAccountDeletionPolicy() != nil { + cast := (*m.GetAccountDeletionPolicy()).String() + err := writer.WriteStringValue("accountDeletionPolicy", &cast) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("cacheAccountsAboveDiskFreePercentage", m.GetCacheAccountsAboveDiskFreePercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("inactiveThresholdDays", m.GetInactiveThresholdDays()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteInt32Value("removeAccountsBelowDiskFreePercentage", m.GetRemoveAccountsBelowDiskFreePercentage()) + if err != nil { + return err + } + } + { + err := writer.WriteAdditionalData(m.GetAdditionalData()) + if err != nil { + return err + } + } + return nil +} +// SetAccountDeletionPolicy sets the accountDeletionPolicy property value. Possible values for when accounts are deleted on a shared PC. +func (m *SharedPCAccountManagerPolicy) SetAccountDeletionPolicy(value *SharedPCAccountDeletionPolicyType)() { + m.accountDeletionPolicy = value +} +// 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 *SharedPCAccountManagerPolicy) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetCacheAccountsAboveDiskFreePercentage sets the cacheAccountsAboveDiskFreePercentage property value. Sets the percentage of available disk space a PC should have before it stops deleting cached shared PC accounts. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 +func (m *SharedPCAccountManagerPolicy) SetCacheAccountsAboveDiskFreePercentage(value *int32)() { + m.cacheAccountsAboveDiskFreePercentage = value +} +// SetInactiveThresholdDays sets the inactiveThresholdDays property value. Specifies when the accounts will start being deleted when they have not been logged on during the specified period, given as number of days. Only applies when AccountDeletionPolicy is DiskSpaceThreshold or DiskSpaceThresholdOrInactiveThreshold. +func (m *SharedPCAccountManagerPolicy) SetInactiveThresholdDays(value *int32)() { + m.inactiveThresholdDays = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SharedPCAccountManagerPolicy) SetOdataType(value *string)() { + m.odataType = value +} +// SetRemoveAccountsBelowDiskFreePercentage sets the removeAccountsBelowDiskFreePercentage property value. Sets the percentage of disk space remaining on a PC before cached accounts will be deleted to free disk space. Accounts that have been inactive the longest will be deleted first. Only applies when AccountDeletionPolicy is DiskSpaceThresholdOrInactiveThreshold. Valid values 0 to 100 +func (m *SharedPCAccountManagerPolicy) SetRemoveAccountsBelowDiskFreePercentage(value *int32)() { + m.removeAccountsBelowDiskFreePercentage = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_account_manager_policyable.go b/src/internal/connector/graph/betasdk/models/shared_p_c_account_manager_policyable.go new file mode 100644 index 000000000..896a8d801 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_account_manager_policyable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCAccountManagerPolicyable +type SharedPCAccountManagerPolicyable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountDeletionPolicy()(*SharedPCAccountDeletionPolicyType) + GetCacheAccountsAboveDiskFreePercentage()(*int32) + GetInactiveThresholdDays()(*int32) + GetOdataType()(*string) + GetRemoveAccountsBelowDiskFreePercentage()(*int32) + SetAccountDeletionPolicy(value *SharedPCAccountDeletionPolicyType)() + SetCacheAccountsAboveDiskFreePercentage(value *int32)() + SetInactiveThresholdDays(value *int32)() + SetOdataType(value *string)() + SetRemoveAccountsBelowDiskFreePercentage(value *int32)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_allowed_account_type.go b/src/internal/connector/graph/betasdk/models/shared_p_c_allowed_account_type.go new file mode 100644 index 000000000..587c6d4aa --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_allowed_account_type.go @@ -0,0 +1,40 @@ +package models +import ( + "errors" +) +// Provides operations to manage the sites property of the microsoft.graph.browserSiteList entity. +type SharedPCAllowedAccountType int + +const ( + // Not configured. Default value. + NOTCONFIGURED_SHAREDPCALLOWEDACCOUNTTYPE SharedPCAllowedAccountType = iota + // Only guest accounts. + GUEST_SHAREDPCALLOWEDACCOUNTTYPE + // Only domain-joined accounts. + DOMAIN_SHAREDPCALLOWEDACCOUNTTYPE +) + +func (i SharedPCAllowedAccountType) String() string { + return []string{"notConfigured", "guest", "domain"}[i] +} +func ParseSharedPCAllowedAccountType(v string) (interface{}, error) { + result := NOTCONFIGURED_SHAREDPCALLOWEDACCOUNTTYPE + switch v { + case "notConfigured": + result = NOTCONFIGURED_SHAREDPCALLOWEDACCOUNTTYPE + case "guest": + result = GUEST_SHAREDPCALLOWEDACCOUNTTYPE + case "domain": + result = DOMAIN_SHAREDPCALLOWEDACCOUNTTYPE + default: + return 0, errors.New("Unknown SharedPCAllowedAccountType value: " + v) + } + return &result, nil +} +func SerializeSharedPCAllowedAccountType(values []SharedPCAllowedAccountType) []string { + 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/shared_p_c_configuration.go b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration.go new file mode 100644 index 000000000..902e8915c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration.go @@ -0,0 +1,511 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCConfiguration +type SharedPCConfiguration struct { + DeviceConfiguration + // Specifies how accounts are managed on a shared PC. Only applies when disableAccountManager is false. + accountManagerPolicy SharedPCAccountManagerPolicyable + // Type of accounts that are allowed to share the PC. + allowedAccounts *SharedPCAllowedAccountType + // Specifies whether local storage is allowed on a shared PC. + allowLocalStorage *bool + // Disables the account manager for shared PC mode. + disableAccountManager *bool + // Specifies whether the default shared PC education environment policies should be disabled. For Windows 10 RS2 and later, this policy will be applied without setting Enabled to true. + disableEduPolicies *bool + // Specifies whether the default shared PC power policies should be disabled. + disablePowerPolicies *bool + // Disables the requirement to sign in whenever the device wakes up from sleep mode. + disableSignInOnResume *bool + // Enables shared PC mode and applies the shared pc policies. + enabled *bool + // Possible values of a property + fastFirstSignIn *Enablement + // Specifies the time in seconds that a device must sit idle before the PC goes to sleep. Setting this value to 0 prevents the sleep timeout from occurring. + idleTimeBeforeSleepInSeconds *int32 + // Specifies the display text for the account shown on the sign-in screen which launches the app specified by SetKioskAppUserModelId. Only applies when KioskAppUserModelId is set. + kioskAppDisplayName *string + // Specifies the application user model ID of the app to use with assigned access. + kioskAppUserModelId *string + // Possible values of a property + localStorage *Enablement + // Specifies the daily start time of maintenance hour. + maintenanceStartTime *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly + // Possible values of a property + setAccountManager *Enablement + // Possible values of a property + setEduPolicies *Enablement + // Possible values of a property + setPowerPolicies *Enablement + // Possible values of a property + signInOnResume *Enablement +} +// NewSharedPCConfiguration instantiates a new SharedPCConfiguration and sets the default values. +func NewSharedPCConfiguration()(*SharedPCConfiguration) { + m := &SharedPCConfiguration{ + DeviceConfiguration: *NewDeviceConfiguration(), + } + odataTypeValue := "#microsoft.graph.sharedPCConfiguration"; + m.SetOdataType(&odataTypeValue); + return m +} +// CreateSharedPCConfigurationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedPCConfigurationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedPCConfiguration(), nil +} +// GetAccountManagerPolicy gets the accountManagerPolicy property value. Specifies how accounts are managed on a shared PC. Only applies when disableAccountManager is false. +func (m *SharedPCConfiguration) GetAccountManagerPolicy()(SharedPCAccountManagerPolicyable) { + return m.accountManagerPolicy +} +// GetAllowedAccounts gets the allowedAccounts property value. Type of accounts that are allowed to share the PC. +func (m *SharedPCConfiguration) GetAllowedAccounts()(*SharedPCAllowedAccountType) { + return m.allowedAccounts +} +// GetAllowLocalStorage gets the allowLocalStorage property value. Specifies whether local storage is allowed on a shared PC. +func (m *SharedPCConfiguration) GetAllowLocalStorage()(*bool) { + return m.allowLocalStorage +} +// GetDisableAccountManager gets the disableAccountManager property value. Disables the account manager for shared PC mode. +func (m *SharedPCConfiguration) GetDisableAccountManager()(*bool) { + return m.disableAccountManager +} +// GetDisableEduPolicies gets the disableEduPolicies property value. Specifies whether the default shared PC education environment policies should be disabled. For Windows 10 RS2 and later, this policy will be applied without setting Enabled to true. +func (m *SharedPCConfiguration) GetDisableEduPolicies()(*bool) { + return m.disableEduPolicies +} +// GetDisablePowerPolicies gets the disablePowerPolicies property value. Specifies whether the default shared PC power policies should be disabled. +func (m *SharedPCConfiguration) GetDisablePowerPolicies()(*bool) { + return m.disablePowerPolicies +} +// GetDisableSignInOnResume gets the disableSignInOnResume property value. Disables the requirement to sign in whenever the device wakes up from sleep mode. +func (m *SharedPCConfiguration) GetDisableSignInOnResume()(*bool) { + return m.disableSignInOnResume +} +// GetEnabled gets the enabled property value. Enables shared PC mode and applies the shared pc policies. +func (m *SharedPCConfiguration) GetEnabled()(*bool) { + return m.enabled +} +// GetFastFirstSignIn gets the fastFirstSignIn property value. Possible values of a property +func (m *SharedPCConfiguration) GetFastFirstSignIn()(*Enablement) { + return m.fastFirstSignIn +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedPCConfiguration) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.DeviceConfiguration.GetFieldDeserializers() + res["accountManagerPolicy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateSharedPCAccountManagerPolicyFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetAccountManagerPolicy(val.(SharedPCAccountManagerPolicyable)) + } + return nil + } + res["allowedAccounts"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseSharedPCAllowedAccountType) + if err != nil { + return err + } + if val != nil { + m.SetAllowedAccounts(val.(*SharedPCAllowedAccountType)) + } + return nil + } + res["allowLocalStorage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetAllowLocalStorage(val) + } + return nil + } + res["disableAccountManager"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableAccountManager(val) + } + return nil + } + res["disableEduPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableEduPolicies(val) + } + return nil + } + res["disablePowerPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisablePowerPolicies(val) + } + return nil + } + res["disableSignInOnResume"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetDisableSignInOnResume(val) + } + return nil + } + res["enabled"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetEnabled(val) + } + return nil + } + res["fastFirstSignIn"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetFastFirstSignIn(val.(*Enablement)) + } + return nil + } + res["idleTimeBeforeSleepInSeconds"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetInt32Value() + if err != nil { + return err + } + if val != nil { + m.SetIdleTimeBeforeSleepInSeconds(val) + } + return nil + } + res["kioskAppDisplayName"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskAppDisplayName(val) + } + return nil + } + res["kioskAppUserModelId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetKioskAppUserModelId(val) + } + return nil + } + res["localStorage"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetLocalStorage(val.(*Enablement)) + } + return nil + } + res["maintenanceStartTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeOnlyValue() + if err != nil { + return err + } + if val != nil { + m.SetMaintenanceStartTime(val) + } + return nil + } + res["setAccountManager"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSetAccountManager(val.(*Enablement)) + } + return nil + } + res["setEduPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSetEduPolicies(val.(*Enablement)) + } + return nil + } + res["setPowerPolicies"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSetPowerPolicies(val.(*Enablement)) + } + return nil + } + res["signInOnResume"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetEnumValue(ParseEnablement) + if err != nil { + return err + } + if val != nil { + m.SetSignInOnResume(val.(*Enablement)) + } + return nil + } + return res +} +// GetIdleTimeBeforeSleepInSeconds gets the idleTimeBeforeSleepInSeconds property value. Specifies the time in seconds that a device must sit idle before the PC goes to sleep. Setting this value to 0 prevents the sleep timeout from occurring. +func (m *SharedPCConfiguration) GetIdleTimeBeforeSleepInSeconds()(*int32) { + return m.idleTimeBeforeSleepInSeconds +} +// GetKioskAppDisplayName gets the kioskAppDisplayName property value. Specifies the display text for the account shown on the sign-in screen which launches the app specified by SetKioskAppUserModelId. Only applies when KioskAppUserModelId is set. +func (m *SharedPCConfiguration) GetKioskAppDisplayName()(*string) { + return m.kioskAppDisplayName +} +// GetKioskAppUserModelId gets the kioskAppUserModelId property value. Specifies the application user model ID of the app to use with assigned access. +func (m *SharedPCConfiguration) GetKioskAppUserModelId()(*string) { + return m.kioskAppUserModelId +} +// GetLocalStorage gets the localStorage property value. Possible values of a property +func (m *SharedPCConfiguration) GetLocalStorage()(*Enablement) { + return m.localStorage +} +// GetMaintenanceStartTime gets the maintenanceStartTime property value. Specifies the daily start time of maintenance hour. +func (m *SharedPCConfiguration) GetMaintenanceStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) { + return m.maintenanceStartTime +} +// GetSetAccountManager gets the setAccountManager property value. Possible values of a property +func (m *SharedPCConfiguration) GetSetAccountManager()(*Enablement) { + return m.setAccountManager +} +// GetSetEduPolicies gets the setEduPolicies property value. Possible values of a property +func (m *SharedPCConfiguration) GetSetEduPolicies()(*Enablement) { + return m.setEduPolicies +} +// GetSetPowerPolicies gets the setPowerPolicies property value. Possible values of a property +func (m *SharedPCConfiguration) GetSetPowerPolicies()(*Enablement) { + return m.setPowerPolicies +} +// GetSignInOnResume gets the signInOnResume property value. Possible values of a property +func (m *SharedPCConfiguration) GetSignInOnResume()(*Enablement) { + return m.signInOnResume +} +// Serialize serializes information the current object +func (m *SharedPCConfiguration) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.DeviceConfiguration.Serialize(writer) + if err != nil { + return err + } + { + err = writer.WriteObjectValue("accountManagerPolicy", m.GetAccountManagerPolicy()) + if err != nil { + return err + } + } + if m.GetAllowedAccounts() != nil { + cast := (*m.GetAllowedAccounts()).String() + err = writer.WriteStringValue("allowedAccounts", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("allowLocalStorage", m.GetAllowLocalStorage()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableAccountManager", m.GetDisableAccountManager()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableEduPolicies", m.GetDisableEduPolicies()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disablePowerPolicies", m.GetDisablePowerPolicies()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("disableSignInOnResume", m.GetDisableSignInOnResume()) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("enabled", m.GetEnabled()) + if err != nil { + return err + } + } + if m.GetFastFirstSignIn() != nil { + cast := (*m.GetFastFirstSignIn()).String() + err = writer.WriteStringValue("fastFirstSignIn", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteInt32Value("idleTimeBeforeSleepInSeconds", m.GetIdleTimeBeforeSleepInSeconds()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskAppDisplayName", m.GetKioskAppDisplayName()) + if err != nil { + return err + } + } + { + err = writer.WriteStringValue("kioskAppUserModelId", m.GetKioskAppUserModelId()) + if err != nil { + return err + } + } + if m.GetLocalStorage() != nil { + cast := (*m.GetLocalStorage()).String() + err = writer.WriteStringValue("localStorage", &cast) + if err != nil { + return err + } + } + { + err = writer.WriteTimeOnlyValue("maintenanceStartTime", m.GetMaintenanceStartTime()) + if err != nil { + return err + } + } + if m.GetSetAccountManager() != nil { + cast := (*m.GetSetAccountManager()).String() + err = writer.WriteStringValue("setAccountManager", &cast) + if err != nil { + return err + } + } + if m.GetSetEduPolicies() != nil { + cast := (*m.GetSetEduPolicies()).String() + err = writer.WriteStringValue("setEduPolicies", &cast) + if err != nil { + return err + } + } + if m.GetSetPowerPolicies() != nil { + cast := (*m.GetSetPowerPolicies()).String() + err = writer.WriteStringValue("setPowerPolicies", &cast) + if err != nil { + return err + } + } + if m.GetSignInOnResume() != nil { + cast := (*m.GetSignInOnResume()).String() + err = writer.WriteStringValue("signInOnResume", &cast) + if err != nil { + return err + } + } + return nil +} +// SetAccountManagerPolicy sets the accountManagerPolicy property value. Specifies how accounts are managed on a shared PC. Only applies when disableAccountManager is false. +func (m *SharedPCConfiguration) SetAccountManagerPolicy(value SharedPCAccountManagerPolicyable)() { + m.accountManagerPolicy = value +} +// SetAllowedAccounts sets the allowedAccounts property value. Type of accounts that are allowed to share the PC. +func (m *SharedPCConfiguration) SetAllowedAccounts(value *SharedPCAllowedAccountType)() { + m.allowedAccounts = value +} +// SetAllowLocalStorage sets the allowLocalStorage property value. Specifies whether local storage is allowed on a shared PC. +func (m *SharedPCConfiguration) SetAllowLocalStorage(value *bool)() { + m.allowLocalStorage = value +} +// SetDisableAccountManager sets the disableAccountManager property value. Disables the account manager for shared PC mode. +func (m *SharedPCConfiguration) SetDisableAccountManager(value *bool)() { + m.disableAccountManager = value +} +// SetDisableEduPolicies sets the disableEduPolicies property value. Specifies whether the default shared PC education environment policies should be disabled. For Windows 10 RS2 and later, this policy will be applied without setting Enabled to true. +func (m *SharedPCConfiguration) SetDisableEduPolicies(value *bool)() { + m.disableEduPolicies = value +} +// SetDisablePowerPolicies sets the disablePowerPolicies property value. Specifies whether the default shared PC power policies should be disabled. +func (m *SharedPCConfiguration) SetDisablePowerPolicies(value *bool)() { + m.disablePowerPolicies = value +} +// SetDisableSignInOnResume sets the disableSignInOnResume property value. Disables the requirement to sign in whenever the device wakes up from sleep mode. +func (m *SharedPCConfiguration) SetDisableSignInOnResume(value *bool)() { + m.disableSignInOnResume = value +} +// SetEnabled sets the enabled property value. Enables shared PC mode and applies the shared pc policies. +func (m *SharedPCConfiguration) SetEnabled(value *bool)() { + m.enabled = value +} +// SetFastFirstSignIn sets the fastFirstSignIn property value. Possible values of a property +func (m *SharedPCConfiguration) SetFastFirstSignIn(value *Enablement)() { + m.fastFirstSignIn = value +} +// SetIdleTimeBeforeSleepInSeconds sets the idleTimeBeforeSleepInSeconds property value. Specifies the time in seconds that a device must sit idle before the PC goes to sleep. Setting this value to 0 prevents the sleep timeout from occurring. +func (m *SharedPCConfiguration) SetIdleTimeBeforeSleepInSeconds(value *int32)() { + m.idleTimeBeforeSleepInSeconds = value +} +// SetKioskAppDisplayName sets the kioskAppDisplayName property value. Specifies the display text for the account shown on the sign-in screen which launches the app specified by SetKioskAppUserModelId. Only applies when KioskAppUserModelId is set. +func (m *SharedPCConfiguration) SetKioskAppDisplayName(value *string)() { + m.kioskAppDisplayName = value +} +// SetKioskAppUserModelId sets the kioskAppUserModelId property value. Specifies the application user model ID of the app to use with assigned access. +func (m *SharedPCConfiguration) SetKioskAppUserModelId(value *string)() { + m.kioskAppUserModelId = value +} +// SetLocalStorage sets the localStorage property value. Possible values of a property +func (m *SharedPCConfiguration) SetLocalStorage(value *Enablement)() { + m.localStorage = value +} +// SetMaintenanceStartTime sets the maintenanceStartTime property value. Specifies the daily start time of maintenance hour. +func (m *SharedPCConfiguration) SetMaintenanceStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() { + m.maintenanceStartTime = value +} +// SetSetAccountManager sets the setAccountManager property value. Possible values of a property +func (m *SharedPCConfiguration) SetSetAccountManager(value *Enablement)() { + m.setAccountManager = value +} +// SetSetEduPolicies sets the setEduPolicies property value. Possible values of a property +func (m *SharedPCConfiguration) SetSetEduPolicies(value *Enablement)() { + m.setEduPolicies = value +} +// SetSetPowerPolicies sets the setPowerPolicies property value. Possible values of a property +func (m *SharedPCConfiguration) SetSetPowerPolicies(value *Enablement)() { + m.setPowerPolicies = value +} +// SetSignInOnResume sets the signInOnResume property value. Possible values of a property +func (m *SharedPCConfiguration) SetSignInOnResume(value *Enablement)() { + m.signInOnResume = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_response.go new file mode 100644 index 000000000..c03df2e0c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCConfigurationCollectionResponse +type SharedPCConfigurationCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedPCConfigurationable +} +// NewSharedPCConfigurationCollectionResponse instantiates a new SharedPCConfigurationCollectionResponse and sets the default values. +func NewSharedPCConfigurationCollectionResponse()(*SharedPCConfigurationCollectionResponse) { + m := &SharedPCConfigurationCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedPCConfigurationCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedPCConfigurationCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedPCConfigurationCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedPCConfigurationCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedPCConfigurationFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedPCConfigurationable, len(val)) + for i, v := range val { + res[i] = v.(SharedPCConfigurationable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedPCConfigurationCollectionResponse) GetValue()([]SharedPCConfigurationable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedPCConfigurationCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedPCConfigurationCollectionResponse) SetValue(value []SharedPCConfigurationable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_responseable.go new file mode 100644 index 000000000..2f8f54897 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_configuration_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCConfigurationCollectionResponseable +type SharedPCConfigurationCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedPCConfigurationable) + SetValue(value []SharedPCConfigurationable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_p_c_configurationable.go b/src/internal/connector/graph/betasdk/models/shared_p_c_configurationable.go new file mode 100644 index 000000000..a0272935f --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_p_c_configurationable.go @@ -0,0 +1,47 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedPCConfigurationable +type SharedPCConfigurationable interface { + DeviceConfigurationable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetAccountManagerPolicy()(SharedPCAccountManagerPolicyable) + GetAllowedAccounts()(*SharedPCAllowedAccountType) + GetAllowLocalStorage()(*bool) + GetDisableAccountManager()(*bool) + GetDisableEduPolicies()(*bool) + GetDisablePowerPolicies()(*bool) + GetDisableSignInOnResume()(*bool) + GetEnabled()(*bool) + GetFastFirstSignIn()(*Enablement) + GetIdleTimeBeforeSleepInSeconds()(*int32) + GetKioskAppDisplayName()(*string) + GetKioskAppUserModelId()(*string) + GetLocalStorage()(*Enablement) + GetMaintenanceStartTime()(*i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly) + GetSetAccountManager()(*Enablement) + GetSetEduPolicies()(*Enablement) + GetSetPowerPolicies()(*Enablement) + GetSignInOnResume()(*Enablement) + SetAccountManagerPolicy(value SharedPCAccountManagerPolicyable)() + SetAllowedAccounts(value *SharedPCAllowedAccountType)() + SetAllowLocalStorage(value *bool)() + SetDisableAccountManager(value *bool)() + SetDisableEduPolicies(value *bool)() + SetDisablePowerPolicies(value *bool)() + SetDisableSignInOnResume(value *bool)() + SetEnabled(value *bool)() + SetFastFirstSignIn(value *Enablement)() + SetIdleTimeBeforeSleepInSeconds(value *int32)() + SetKioskAppDisplayName(value *string)() + SetKioskAppUserModelId(value *string)() + SetLocalStorage(value *Enablement)() + SetMaintenanceStartTime(value *i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.TimeOnly)() + SetSetAccountManager(value *Enablement)() + SetSetEduPolicies(value *Enablement)() + SetSetPowerPolicies(value *Enablement)() + SetSignInOnResume(value *Enablement)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info.go b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info.go new file mode 100644 index 000000000..6949cc7b7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info.go @@ -0,0 +1,94 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedWithChannelTeamInfo +type SharedWithChannelTeamInfo struct { + TeamInfo + // A collection of team members who have access to the shared channel. + allowedMembers []ConversationMemberable + // Indicates whether the team is the host of the channel. + isHostTeam *bool +} +// NewSharedWithChannelTeamInfo instantiates a new SharedWithChannelTeamInfo and sets the default values. +func NewSharedWithChannelTeamInfo()(*SharedWithChannelTeamInfo) { + m := &SharedWithChannelTeamInfo{ + TeamInfo: *NewTeamInfo(), + } + return m +} +// CreateSharedWithChannelTeamInfoFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedWithChannelTeamInfoFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedWithChannelTeamInfo(), nil +} +// GetAllowedMembers gets the allowedMembers property value. A collection of team members who have access to the shared channel. +func (m *SharedWithChannelTeamInfo) GetAllowedMembers()([]ConversationMemberable) { + return m.allowedMembers +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedWithChannelTeamInfo) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.TeamInfo.GetFieldDeserializers() + res["allowedMembers"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateConversationMemberFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]ConversationMemberable, len(val)) + for i, v := range val { + res[i] = v.(ConversationMemberable) + } + m.SetAllowedMembers(res) + } + return nil + } + res["isHostTeam"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetIsHostTeam(val) + } + return nil + } + return res +} +// GetIsHostTeam gets the isHostTeam property value. Indicates whether the team is the host of the channel. +func (m *SharedWithChannelTeamInfo) GetIsHostTeam()(*bool) { + return m.isHostTeam +} +// Serialize serializes information the current object +func (m *SharedWithChannelTeamInfo) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.TeamInfo.Serialize(writer) + if err != nil { + return err + } + if m.GetAllowedMembers() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetAllowedMembers())) + for i, v := range m.GetAllowedMembers() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("allowedMembers", cast) + if err != nil { + return err + } + } + { + err = writer.WriteBoolValue("isHostTeam", m.GetIsHostTeam()) + if err != nil { + return err + } + } + return nil +} +// SetAllowedMembers sets the allowedMembers property value. A collection of team members who have access to the shared channel. +func (m *SharedWithChannelTeamInfo) SetAllowedMembers(value []ConversationMemberable)() { + m.allowedMembers = value +} +// SetIsHostTeam sets the isHostTeam property value. Indicates whether the team is the host of the channel. +func (m *SharedWithChannelTeamInfo) SetIsHostTeam(value *bool)() { + m.isHostTeam = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_response.go b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_response.go new file mode 100644 index 000000000..c758c04e0 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedWithChannelTeamInfoCollectionResponse +type SharedWithChannelTeamInfoCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharedWithChannelTeamInfoable +} +// NewSharedWithChannelTeamInfoCollectionResponse instantiates a new SharedWithChannelTeamInfoCollectionResponse and sets the default values. +func NewSharedWithChannelTeamInfoCollectionResponse()(*SharedWithChannelTeamInfoCollectionResponse) { + m := &SharedWithChannelTeamInfoCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharedWithChannelTeamInfoCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharedWithChannelTeamInfoCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharedWithChannelTeamInfoCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharedWithChannelTeamInfoFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharedWithChannelTeamInfoable, len(val)) + for i, v := range val { + res[i] = v.(SharedWithChannelTeamInfoable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharedWithChannelTeamInfoCollectionResponse) GetValue()([]SharedWithChannelTeamInfoable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharedWithChannelTeamInfoCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharedWithChannelTeamInfoCollectionResponse) SetValue(value []SharedWithChannelTeamInfoable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_responseable.go b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_responseable.go new file mode 100644 index 000000000..bb6d6d5c2 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_info_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedWithChannelTeamInfoCollectionResponseable +type SharedWithChannelTeamInfoCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharedWithChannelTeamInfoable) + SetValue(value []SharedWithChannelTeamInfoable)() +} diff --git a/src/internal/connector/graph/betasdk/models/shared_with_channel_team_infoable.go b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_infoable.go new file mode 100644 index 000000000..28f1314a8 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/shared_with_channel_team_infoable.go @@ -0,0 +1,15 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharedWithChannelTeamInfoable +type SharedWithChannelTeamInfoable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + TeamInfoable + GetAllowedMembers()([]ConversationMemberable) + GetIsHostTeam()(*bool) + SetAllowedMembers(value []ConversationMemberable)() + SetIsHostTeam(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharedable.go b/src/internal/connector/graph/betasdk/models/sharedable.go new file mode 100644 index 000000000..8c6af6a78 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharedable.go @@ -0,0 +1,22 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// Sharedable +type Sharedable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetOwner()(IdentitySetable) + GetScope()(*string) + GetSharedBy()(IdentitySetable) + GetSharedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + SetOdataType(value *string)() + SetOwner(value IdentitySetable)() + SetScope(value *string)() + SetSharedBy(value IdentitySetable)() + SetSharedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharepoint_ids.go b/src/internal/connector/graph/betasdk/models/sharepoint_ids.go new file mode 100644 index 000000000..f69999a35 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharepoint_ids.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharepointIds +type SharepointIds 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 unique identifier (guid) for the item's list in SharePoint. + listId *string + // An integer identifier for the item within the containing list. + listItemId *string + // The unique identifier (guid) for the item within OneDrive for Business or a SharePoint site. + listItemUniqueId *string + // The OdataType property + odataType *string + // The unique identifier (guid) for the item's site collection (SPSite). + siteId *string + // The SharePoint URL for the site that contains the item. + siteUrl *string + // The unique identifier (guid) for the tenancy. + tenantId *string + // The unique identifier (guid) for the item's site (SPWeb). + webId *string +} +// NewSharepointIds instantiates a new sharepointIds and sets the default values. +func NewSharepointIds()(*SharepointIds) { + m := &SharepointIds{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharepointIdsFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharepointIdsFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharepointIds(), 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 *SharepointIds) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharepointIds) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["listId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetListId(val) + } + return nil + } + res["listItemId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetListItemId(val) + } + return nil + } + res["listItemUniqueId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetListItemUniqueId(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["siteId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteId(val) + } + return nil + } + res["siteUrl"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSiteUrl(val) + } + return nil + } + res["tenantId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetTenantId(val) + } + return nil + } + res["webId"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetWebId(val) + } + return nil + } + return res +} +// GetListId gets the listId property value. The unique identifier (guid) for the item's list in SharePoint. +func (m *SharepointIds) GetListId()(*string) { + return m.listId +} +// GetListItemId gets the listItemId property value. An integer identifier for the item within the containing list. +func (m *SharepointIds) GetListItemId()(*string) { + return m.listItemId +} +// GetListItemUniqueId gets the listItemUniqueId property value. The unique identifier (guid) for the item within OneDrive for Business or a SharePoint site. +func (m *SharepointIds) GetListItemUniqueId()(*string) { + return m.listItemUniqueId +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SharepointIds) GetOdataType()(*string) { + return m.odataType +} +// GetSiteId gets the siteId property value. The unique identifier (guid) for the item's site collection (SPSite). +func (m *SharepointIds) GetSiteId()(*string) { + return m.siteId +} +// GetSiteUrl gets the siteUrl property value. The SharePoint URL for the site that contains the item. +func (m *SharepointIds) GetSiteUrl()(*string) { + return m.siteUrl +} +// GetTenantId gets the tenantId property value. The unique identifier (guid) for the tenancy. +func (m *SharepointIds) GetTenantId()(*string) { + return m.tenantId +} +// GetWebId gets the webId property value. The unique identifier (guid) for the item's site (SPWeb). +func (m *SharepointIds) GetWebId()(*string) { + return m.webId +} +// Serialize serializes information the current object +func (m *SharepointIds) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("listId", m.GetListId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("listItemId", m.GetListItemId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("listItemUniqueId", m.GetListItemUniqueId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("siteId", m.GetSiteId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("siteUrl", m.GetSiteUrl()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("tenantId", m.GetTenantId()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("webId", m.GetWebId()) + 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 *SharepointIds) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetListId sets the listId property value. The unique identifier (guid) for the item's list in SharePoint. +func (m *SharepointIds) SetListId(value *string)() { + m.listId = value +} +// SetListItemId sets the listItemId property value. An integer identifier for the item within the containing list. +func (m *SharepointIds) SetListItemId(value *string)() { + m.listItemId = value +} +// SetListItemUniqueId sets the listItemUniqueId property value. The unique identifier (guid) for the item within OneDrive for Business or a SharePoint site. +func (m *SharepointIds) SetListItemUniqueId(value *string)() { + m.listItemUniqueId = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SharepointIds) SetOdataType(value *string)() { + m.odataType = value +} +// SetSiteId sets the siteId property value. The unique identifier (guid) for the item's site collection (SPSite). +func (m *SharepointIds) SetSiteId(value *string)() { + m.siteId = value +} +// SetSiteUrl sets the siteUrl property value. The SharePoint URL for the site that contains the item. +func (m *SharepointIds) SetSiteUrl(value *string)() { + m.siteUrl = value +} +// SetTenantId sets the tenantId property value. The unique identifier (guid) for the tenancy. +func (m *SharepointIds) SetTenantId(value *string)() { + m.tenantId = value +} +// SetWebId sets the webId property value. The unique identifier (guid) for the item's site (SPWeb). +func (m *SharepointIds) SetWebId(value *string)() { + m.webId = value +} diff --git a/src/internal/connector/graph/betasdk/models/sharepoint_idsable.go b/src/internal/connector/graph/betasdk/models/sharepoint_idsable.go new file mode 100644 index 000000000..2c9c0acd7 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharepoint_idsable.go @@ -0,0 +1,27 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharepointIdsable +type SharepointIdsable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetListId()(*string) + GetListItemId()(*string) + GetListItemUniqueId()(*string) + GetOdataType()(*string) + GetSiteId()(*string) + GetSiteUrl()(*string) + GetTenantId()(*string) + GetWebId()(*string) + SetListId(value *string)() + SetListItemId(value *string)() + SetListItemUniqueId(value *string)() + SetOdataType(value *string)() + SetSiteId(value *string)() + SetSiteUrl(value *string)() + SetTenantId(value *string)() + SetWebId(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_detail.go b/src/internal/connector/graph/betasdk/models/sharing_detail.go new file mode 100644 index 000000000..31726ad4c --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_detail.go @@ -0,0 +1,196 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingDetail +type SharingDetail 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 OdataType property + odataType *string + // The user who shared the document. + sharedBy InsightIdentityable + // The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. + sharedDateTime *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time + // The sharingReference property + sharingReference ResourceReferenceable + // The subject with which the document was shared. + sharingSubject *string + // Determines the way the document was shared, can be by a 'Link', 'Attachment', 'Group', 'Site'. + sharingType *string +} +// NewSharingDetail instantiates a new sharingDetail and sets the default values. +func NewSharingDetail()(*SharingDetail) { + m := &SharingDetail{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharingDetailFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharingDetailFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharingDetail(), 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 *SharingDetail) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharingDetail) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + 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["sharedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateInsightIdentityFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharedBy(val.(InsightIdentityable)) + } + return nil + } + res["sharedDateTime"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetTimeValue() + if err != nil { + return err + } + if val != nil { + m.SetSharedDateTime(val) + } + return nil + } + res["sharingReference"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateResourceReferenceFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetSharingReference(val.(ResourceReferenceable)) + } + return nil + } + res["sharingSubject"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSharingSubject(val) + } + return nil + } + res["sharingType"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetSharingType(val) + } + return nil + } + return res +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SharingDetail) GetOdataType()(*string) { + return m.odataType +} +// GetSharedBy gets the sharedBy property value. The user who shared the document. +func (m *SharingDetail) GetSharedBy()(InsightIdentityable) { + return m.sharedBy +} +// GetSharedDateTime gets the sharedDateTime property value. The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *SharingDetail) GetSharedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) { + return m.sharedDateTime +} +// GetSharingReference gets the sharingReference property value. The sharingReference property +func (m *SharingDetail) GetSharingReference()(ResourceReferenceable) { + return m.sharingReference +} +// GetSharingSubject gets the sharingSubject property value. The subject with which the document was shared. +func (m *SharingDetail) GetSharingSubject()(*string) { + return m.sharingSubject +} +// GetSharingType gets the sharingType property value. Determines the way the document was shared, can be by a 'Link', 'Attachment', 'Group', 'Site'. +func (m *SharingDetail) GetSharingType()(*string) { + return m.sharingType +} +// Serialize serializes information the current object +func (m *SharingDetail) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("sharedBy", m.GetSharedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteTimeValue("sharedDateTime", m.GetSharedDateTime()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sharingSubject", m.GetSharingSubject()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("sharingType", m.GetSharingType()) + 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 *SharingDetail) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SharingDetail) SetOdataType(value *string)() { + m.odataType = value +} +// SetSharedBy sets the sharedBy property value. The user who shared the document. +func (m *SharingDetail) SetSharedBy(value InsightIdentityable)() { + m.sharedBy = value +} +// SetSharedDateTime sets the sharedDateTime property value. The date and time the file was last shared. The timestamp represents date and time information using ISO 8601 format and is always in UTC time. For example, midnight UTC on Jan 1, 2014 is 2014-01-01T00:00:00Z. Read-only. +func (m *SharingDetail) SetSharedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() { + m.sharedDateTime = value +} +// SetSharingReference sets the sharingReference property value. The sharingReference property +func (m *SharingDetail) SetSharingReference(value ResourceReferenceable)() { + m.sharingReference = value +} +// SetSharingSubject sets the sharingSubject property value. The subject with which the document was shared. +func (m *SharingDetail) SetSharingSubject(value *string)() { + m.sharingSubject = value +} +// SetSharingType sets the sharingType property value. Determines the way the document was shared, can be by a 'Link', 'Attachment', 'Group', 'Site'. +func (m *SharingDetail) SetSharingType(value *string)() { + m.sharingType = value +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_detail_collection_response.go b/src/internal/connector/graph/betasdk/models/sharing_detail_collection_response.go new file mode 100644 index 000000000..b885a5436 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_detail_collection_response.go @@ -0,0 +1,68 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingDetailCollectionResponse +type SharingDetailCollectionResponse struct { + BaseCollectionPaginationCountResponse + // The value property + value []SharingDetailable +} +// NewSharingDetailCollectionResponse instantiates a new SharingDetailCollectionResponse and sets the default values. +func NewSharingDetailCollectionResponse()(*SharingDetailCollectionResponse) { + m := &SharingDetailCollectionResponse{ + BaseCollectionPaginationCountResponse: *NewBaseCollectionPaginationCountResponse(), + } + return m +} +// CreateSharingDetailCollectionResponseFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharingDetailCollectionResponseFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharingDetailCollectionResponse(), nil +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharingDetailCollectionResponse) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := m.BaseCollectionPaginationCountResponse.GetFieldDeserializers() + res["value"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetCollectionOfObjectValues(CreateSharingDetailFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + res := make([]SharingDetailable, len(val)) + for i, v := range val { + res[i] = v.(SharingDetailable) + } + m.SetValue(res) + } + return nil + } + return res +} +// GetValue gets the value property value. The value property +func (m *SharingDetailCollectionResponse) GetValue()([]SharingDetailable) { + return m.value +} +// Serialize serializes information the current object +func (m *SharingDetailCollectionResponse) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + err := m.BaseCollectionPaginationCountResponse.Serialize(writer) + if err != nil { + return err + } + if m.GetValue() != nil { + cast := make([]i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, len(m.GetValue())) + for i, v := range m.GetValue() { + cast[i] = v.(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable) + } + err = writer.WriteCollectionOfObjectValues("value", cast) + if err != nil { + return err + } + } + return nil +} +// SetValue sets the value property value. The value property +func (m *SharingDetailCollectionResponse) SetValue(value []SharingDetailable)() { + m.value = value +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_detail_collection_responseable.go b/src/internal/connector/graph/betasdk/models/sharing_detail_collection_responseable.go new file mode 100644 index 000000000..cadb9b9c9 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_detail_collection_responseable.go @@ -0,0 +1,13 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingDetailCollectionResponseable +type SharingDetailCollectionResponseable interface { + BaseCollectionPaginationCountResponseable + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetValue()([]SharingDetailable) + SetValue(value []SharingDetailable)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_detailable.go b/src/internal/connector/graph/betasdk/models/sharing_detailable.go new file mode 100644 index 000000000..593da7ce1 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_detailable.go @@ -0,0 +1,24 @@ +package models + +import ( + i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e "time" + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingDetailable +type SharingDetailable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetOdataType()(*string) + GetSharedBy()(InsightIdentityable) + GetSharedDateTime()(*i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time) + GetSharingReference()(ResourceReferenceable) + GetSharingSubject()(*string) + GetSharingType()(*string) + SetOdataType(value *string)() + SetSharedBy(value InsightIdentityable)() + SetSharedDateTime(value *i336074805fc853987abe6f7fe3ad97a6a6f3077a16391fec744f671a015fbd7e.Time)() + SetSharingReference(value ResourceReferenceable)() + SetSharingSubject(value *string)() + SetSharingType(value *string)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_invitation.go b/src/internal/connector/graph/betasdk/models/sharing_invitation.go new file mode 100644 index 000000000..a325084bb --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_invitation.go @@ -0,0 +1,175 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingInvitation +type SharingInvitation 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 email address provided for the recipient of the sharing invitation. Read-only. + email *string + // Provides information about who sent the invitation that created this permission, if that information is available. Read-only. + invitedBy IdentitySetable + // The OdataType property + odataType *string + // The redeemedBy property + redeemedBy *string + // If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only. + signInRequired *bool +} +// NewSharingInvitation instantiates a new sharingInvitation and sets the default values. +func NewSharingInvitation()(*SharingInvitation) { + m := &SharingInvitation{ + } + m.SetAdditionalData(make(map[string]interface{})); + return m +} +// CreateSharingInvitationFromDiscriminatorValue creates a new instance of the appropriate class based on discriminator value +func CreateSharingInvitationFromDiscriminatorValue(parseNode i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable, error) { + return NewSharingInvitation(), 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 *SharingInvitation) GetAdditionalData()(map[string]interface{}) { + return m.additionalData +} +// GetEmail gets the email property value. The email address provided for the recipient of the sharing invitation. Read-only. +func (m *SharingInvitation) GetEmail()(*string) { + return m.email +} +// GetFieldDeserializers the deserialization information for the current model +func (m *SharingInvitation) GetFieldDeserializers()(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) { + res := make(map[string]func(i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode)(error)) + res["email"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetEmail(val) + } + return nil + } + res["invitedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetObjectValue(CreateIdentitySetFromDiscriminatorValue) + if err != nil { + return err + } + if val != nil { + m.SetInvitedBy(val.(IdentitySetable)) + } + 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["redeemedBy"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetStringValue() + if err != nil { + return err + } + if val != nil { + m.SetRedeemedBy(val) + } + return nil + } + res["signInRequired"] = func (n i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.ParseNode) error { + val, err := n.GetBoolValue() + if err != nil { + return err + } + if val != nil { + m.SetSignInRequired(val) + } + return nil + } + return res +} +// GetInvitedBy gets the invitedBy property value. Provides information about who sent the invitation that created this permission, if that information is available. Read-only. +func (m *SharingInvitation) GetInvitedBy()(IdentitySetable) { + return m.invitedBy +} +// GetOdataType gets the @odata.type property value. The OdataType property +func (m *SharingInvitation) GetOdataType()(*string) { + return m.odataType +} +// GetRedeemedBy gets the redeemedBy property value. The redeemedBy property +func (m *SharingInvitation) GetRedeemedBy()(*string) { + return m.redeemedBy +} +// GetSignInRequired gets the signInRequired property value. If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only. +func (m *SharingInvitation) GetSignInRequired()(*bool) { + return m.signInRequired +} +// Serialize serializes information the current object +func (m *SharingInvitation) Serialize(writer i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.SerializationWriter)(error) { + { + err := writer.WriteStringValue("email", m.GetEmail()) + if err != nil { + return err + } + } + { + err := writer.WriteObjectValue("invitedBy", m.GetInvitedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("@odata.type", m.GetOdataType()) + if err != nil { + return err + } + } + { + err := writer.WriteStringValue("redeemedBy", m.GetRedeemedBy()) + if err != nil { + return err + } + } + { + err := writer.WriteBoolValue("signInRequired", m.GetSignInRequired()) + 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 *SharingInvitation) SetAdditionalData(value map[string]interface{})() { + m.additionalData = value +} +// SetEmail sets the email property value. The email address provided for the recipient of the sharing invitation. Read-only. +func (m *SharingInvitation) SetEmail(value *string)() { + m.email = value +} +// SetInvitedBy sets the invitedBy property value. Provides information about who sent the invitation that created this permission, if that information is available. Read-only. +func (m *SharingInvitation) SetInvitedBy(value IdentitySetable)() { + m.invitedBy = value +} +// SetOdataType sets the @odata.type property value. The OdataType property +func (m *SharingInvitation) SetOdataType(value *string)() { + m.odataType = value +} +// SetRedeemedBy sets the redeemedBy property value. The redeemedBy property +func (m *SharingInvitation) SetRedeemedBy(value *string)() { + m.redeemedBy = value +} +// SetSignInRequired sets the signInRequired property value. If true the recipient of the invitation needs to sign in in order to access the shared item. Read-only. +func (m *SharingInvitation) SetSignInRequired(value *bool)() { + m.signInRequired = value +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_invitationable.go b/src/internal/connector/graph/betasdk/models/sharing_invitationable.go new file mode 100644 index 000000000..735537582 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_invitationable.go @@ -0,0 +1,21 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingInvitationable +type SharingInvitationable interface { + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.AdditionalDataHolder + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91.Parsable + GetEmail()(*string) + GetInvitedBy()(IdentitySetable) + GetOdataType()(*string) + GetRedeemedBy()(*string) + GetSignInRequired()(*bool) + SetEmail(value *string)() + SetInvitedBy(value IdentitySetable)() + SetOdataType(value *string)() + SetRedeemedBy(value *string)() + SetSignInRequired(value *bool)() +} diff --git a/src/internal/connector/graph/betasdk/models/sharing_link.go b/src/internal/connector/graph/betasdk/models/sharing_link.go new file mode 100644 index 000000000..4ced8b611 --- /dev/null +++ b/src/internal/connector/graph/betasdk/models/sharing_link.go @@ -0,0 +1,253 @@ +package models + +import ( + i878a80d2330e89d26896388a3f487eef27b0a0e6c010c493bf80be1452208f91 "github.com/microsoft/kiota-abstractions-go/serialization" +) + +// SharingLink +type SharingLink 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 app the link is associated with. + application Identityable + // The configuratorUrl property + configuratorUrl *string + // The OdataType property + odataType *string + // If true then the user can only use this link to view the item on the web, and cannot use it to download the contents of the item. Only for OneDrive for Business and SharePoint. + preventsDownload *bool + // The scope of the link represented by this permission. Value anonymous indicates the link is usable by anyone, organization indicates the link is only usable for users signed into the same tenant. + scope *string + // The type of the link created. + type_escaped *string + // For embed links, this property contains the HTML code for an